#!/usr/bin/env node
import { createRequire as __createRequire } from "module"; const require = __createRequire(import.meta.url);
var __defProp = Object.defineProperty;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
  get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
}) : x)(function(x) {
  if (typeof require !== "undefined") return require.apply(this, arguments);
  throw Error('Dynamic require of "' + x + '" is not supported');
});
var __esm = (fn, res) => function __init() {
  return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
};
var __export = (target, all) => {
  for (var name in all)
    __defProp(target, name, { get: all[name], enumerable: true });
};

// ../../node_modules/chrome-devtools-mcp/build/src/third_party/lighthouse-devtools-mcp-bundle.js
import process2 from "process";
import process3 from "process";
import { EventEmitter } from "events";
import process4 from "process";
import path from "path";
import path2 from "path";
import { EventEmitter as EventEmitter2 } from "events";
import path6 from "path";
import fs from "fs";
import path3 from "path";
import stream from "stream";
import { createGzip, gunzipSync } from "zlib";
import path5 from "path";
import path4 from "path";
import EventEmitter4 from "events";
import EventEmitter3 from "events";
import { EventEmitter as EventEmitter5 } from "events";
function getRawTag(value) {
  var isOwn = hasOwnProperty.call(value, symToStringTag), tag2 = value[symToStringTag];
  try {
    value[symToStringTag] = void 0;
    var unmasked = true;
  } catch (e) {
  }
  var result = nativeObjectToString.call(value);
  if (unmasked) {
    if (isOwn) {
      value[symToStringTag] = tag2;
    } else {
      delete value[symToStringTag];
    }
  }
  return result;
}
function objectToString(value) {
  return nativeObjectToString2.call(value);
}
function baseGetTag(value) {
  if (value == null) {
    return value === void 0 ? undefinedTag : nullTag;
  }
  return symToStringTag2 && symToStringTag2 in Object(value) ? getRawTag_default(value) : objectToString_default(value);
}
function isObjectLike(value) {
  return value != null && typeof value == "object";
}
function isObject(value) {
  var type2 = typeof value;
  return value != null && (type2 == "object" || type2 == "function");
}
function isFunction(value) {
  if (!isObject_default(value)) {
    return false;
  }
  var tag2 = baseGetTag_default(value);
  return tag2 == funcTag || tag2 == genTag || tag2 == asyncTag || tag2 == proxyTag;
}
function isMasked(func) {
  return !!maskSrcKey && maskSrcKey in func;
}
function toSource(func) {
  if (func != null) {
    try {
      return funcToString.call(func);
    } catch (e) {
    }
    try {
      return func + "";
    } catch (e) {
    }
  }
  return "";
}
function baseIsNative(value) {
  if (!isObject_default(value) || isMasked_default(value)) {
    return false;
  }
  var pattern2 = isFunction_default(value) ? reIsNative : reIsHostCtor;
  return pattern2.test(toSource_default(value));
}
function getValue(object2, key) {
  return object2 == null ? void 0 : object2[key];
}
function getNative(object2, key) {
  var value = getValue_default(object2, key);
  return baseIsNative_default(value) ? value : void 0;
}
function isIndex(value, length) {
  var type2 = typeof value;
  length = length == null ? MAX_SAFE_INTEGER : length;
  return !!length && (type2 == "number" || type2 != "symbol" && reIsUint.test(value)) && (value > -1 && value % 1 == 0 && value < length);
}
function eq(value, other) {
  return value === other || value !== value && other !== other;
}
function isLength(value) {
  return typeof value == "number" && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER2;
}
function isArrayLike(value) {
  return value != null && isLength_default(value.length) && !isFunction_default(value);
}
function isPrototype(value) {
  var Ctor = value && value.constructor, proto = typeof Ctor == "function" && Ctor.prototype || objectProto4;
  return value === proto;
}
function baseTimes(n, iteratee) {
  var index2 = -1, result = Array(n);
  while (++index2 < n) {
    result[index2] = iteratee(index2);
  }
  return result;
}
function baseIsArguments(value) {
  return isObjectLike_default(value) && baseGetTag_default(value) == argsTag;
}
function stubFalse() {
  return false;
}
function baseIsTypedArray(value) {
  return isObjectLike_default(value) && isLength_default(value.length) && !!typedArrayTags[baseGetTag_default(value)];
}
function baseUnary(func) {
  return function(value) {
    return func(value);
  };
}
function arrayLikeKeys(value, inherited) {
  var isArr = isArray_default(value), isArg = !isArr && isArguments_default(value), isBuff = !isArr && !isArg && isBuffer_default(value), isType = !isArr && !isArg && !isBuff && isTypedArray_default(value), skipIndexes = isArr || isArg || isBuff || isType, result = skipIndexes ? baseTimes_default(value.length, String) : [], length = result.length;
  for (var key in value) {
    if ((inherited || hasOwnProperty4.call(value, key)) && !(skipIndexes && // Safari 9 has enumerable `arguments.length` in strict mode.
    (key == "length" || // Node.js 0.10 has enumerable non-index properties on buffers.
    isBuff && (key == "offset" || key == "parent") || // PhantomJS 2 has enumerable non-index properties on typed arrays.
    isType && (key == "buffer" || key == "byteLength" || key == "byteOffset") || // Skip index properties.
    isIndex_default(key, length)))) {
      result.push(key);
    }
  }
  return result;
}
function overArg(func, transform2) {
  return function(arg) {
    return func(transform2(arg));
  };
}
function baseKeys(object2) {
  if (!isPrototype_default(object2)) {
    return nativeKeys_default(object2);
  }
  var result = [];
  for (var key in Object(object2)) {
    if (hasOwnProperty5.call(object2, key) && key != "constructor") {
      result.push(key);
    }
  }
  return result;
}
function keys(object2) {
  return isArrayLike_default(object2) ? arrayLikeKeys_default(object2) : baseKeys_default(object2);
}
function hashClear() {
  this.__data__ = nativeCreate_default ? nativeCreate_default(null) : {};
  this.size = 0;
}
function hashDelete(key) {
  var result = this.has(key) && delete this.__data__[key];
  this.size -= result ? 1 : 0;
  return result;
}
function hashGet(key) {
  var data312 = this.__data__;
  if (nativeCreate_default) {
    var result = data312[key];
    return result === HASH_UNDEFINED ? void 0 : result;
  }
  return hasOwnProperty6.call(data312, key) ? data312[key] : void 0;
}
function hashHas(key) {
  var data312 = this.__data__;
  return nativeCreate_default ? data312[key] !== void 0 : hasOwnProperty7.call(data312, key);
}
function hashSet(key, value) {
  var data312 = this.__data__;
  this.size += this.has(key) ? 0 : 1;
  data312[key] = nativeCreate_default && value === void 0 ? HASH_UNDEFINED2 : value;
  return this;
}
function Hash(entries) {
  var index2 = -1, length = entries == null ? 0 : entries.length;
  this.clear();
  while (++index2 < length) {
    var entry = entries[index2];
    this.set(entry[0], entry[1]);
  }
}
function listCacheClear() {
  this.__data__ = [];
  this.size = 0;
}
function assocIndexOf(array2, key) {
  var length = array2.length;
  while (length--) {
    if (eq_default(array2[length][0], key)) {
      return length;
    }
  }
  return -1;
}
function listCacheDelete(key) {
  var data312 = this.__data__, index2 = assocIndexOf_default(data312, key);
  if (index2 < 0) {
    return false;
  }
  var lastIndex = data312.length - 1;
  if (index2 == lastIndex) {
    data312.pop();
  } else {
    splice.call(data312, index2, 1);
  }
  --this.size;
  return true;
}
function listCacheGet(key) {
  var data312 = this.__data__, index2 = assocIndexOf_default(data312, key);
  return index2 < 0 ? void 0 : data312[index2][1];
}
function listCacheHas(key) {
  return assocIndexOf_default(this.__data__, key) > -1;
}
function listCacheSet(key, value) {
  var data312 = this.__data__, index2 = assocIndexOf_default(data312, key);
  if (index2 < 0) {
    ++this.size;
    data312.push([key, value]);
  } else {
    data312[index2][1] = value;
  }
  return this;
}
function ListCache(entries) {
  var index2 = -1, length = entries == null ? 0 : entries.length;
  this.clear();
  while (++index2 < length) {
    var entry = entries[index2];
    this.set(entry[0], entry[1]);
  }
}
function mapCacheClear() {
  this.size = 0;
  this.__data__ = {
    "hash": new Hash_default(),
    "map": new (Map_default || ListCache_default)(),
    "string": new Hash_default()
  };
}
function isKeyable(value) {
  var type2 = typeof value;
  return type2 == "string" || type2 == "number" || type2 == "symbol" || type2 == "boolean" ? value !== "__proto__" : value === null;
}
function getMapData(map2, key) {
  var data312 = map2.__data__;
  return isKeyable_default(key) ? data312[typeof key == "string" ? "string" : "hash"] : data312.map;
}
function mapCacheDelete(key) {
  var result = getMapData_default(this, key)["delete"](key);
  this.size -= result ? 1 : 0;
  return result;
}
function mapCacheGet(key) {
  return getMapData_default(this, key).get(key);
}
function mapCacheHas(key) {
  return getMapData_default(this, key).has(key);
}
function mapCacheSet(key, value) {
  var data312 = getMapData_default(this, key), size = data312.size;
  data312.set(key, value);
  this.size += data312.size == size ? 0 : 1;
  return this;
}
function MapCache(entries) {
  var index2 = -1, length = entries == null ? 0 : entries.length;
  this.clear();
  while (++index2 < length) {
    var entry = entries[index2];
    this.set(entry[0], entry[1]);
  }
}
function arrayPush(array2, values) {
  var index2 = -1, length = values.length, offset = array2.length;
  while (++index2 < length) {
    array2[offset + index2] = values[index2];
  }
  return array2;
}
function stackClear() {
  this.__data__ = new ListCache_default();
  this.size = 0;
}
function stackDelete(key) {
  var data312 = this.__data__, result = data312["delete"](key);
  this.size = data312.size;
  return result;
}
function stackGet(key) {
  return this.__data__.get(key);
}
function stackHas(key) {
  return this.__data__.has(key);
}
function stackSet(key, value) {
  var data312 = this.__data__;
  if (data312 instanceof ListCache_default) {
    var pairs = data312.__data__;
    if (!Map_default || pairs.length < LARGE_ARRAY_SIZE - 1) {
      pairs.push([key, value]);
      this.size = ++data312.size;
      return this;
    }
    data312 = this.__data__ = new MapCache_default(pairs);
  }
  data312.set(key, value);
  this.size = data312.size;
  return this;
}
function Stack(entries) {
  var data312 = this.__data__ = new ListCache_default(entries);
  this.size = data312.size;
}
function arrayFilter(array2, predicate) {
  var index2 = -1, length = array2 == null ? 0 : array2.length, resIndex = 0, result = [];
  while (++index2 < length) {
    var value = array2[index2];
    if (predicate(value, index2, array2)) {
      result[resIndex++] = value;
    }
  }
  return result;
}
function stubArray() {
  return [];
}
function baseGetAllKeys(object2, keysFunc, symbolsFunc) {
  var result = keysFunc(object2);
  return isArray_default(object2) ? result : arrayPush_default(result, symbolsFunc(object2));
}
function getAllKeys(object2) {
  return baseGetAllKeys_default(object2, keys_default, getSymbols_default);
}
function setCacheAdd(value) {
  this.__data__.set(value, HASH_UNDEFINED3);
  return this;
}
function setCacheHas(value) {
  return this.__data__.has(value);
}
function SetCache(values) {
  var index2 = -1, length = values == null ? 0 : values.length;
  this.__data__ = new MapCache_default();
  while (++index2 < length) {
    this.add(values[index2]);
  }
}
function arraySome(array2, predicate) {
  var index2 = -1, length = array2 == null ? 0 : array2.length;
  while (++index2 < length) {
    if (predicate(array2[index2], index2, array2)) {
      return true;
    }
  }
  return false;
}
function cacheHas(cache, key) {
  return cache.has(key);
}
function equalArrays(array2, other, bitmask, customizer, equalFunc, stack) {
  var isPartial = bitmask & COMPARE_PARTIAL_FLAG, arrLength = array2.length, othLength = other.length;
  if (arrLength != othLength && !(isPartial && othLength > arrLength)) {
    return false;
  }
  var arrStacked = stack.get(array2);
  var othStacked = stack.get(other);
  if (arrStacked && othStacked) {
    return arrStacked == other && othStacked == array2;
  }
  var index2 = -1, result = true, seen = bitmask & COMPARE_UNORDERED_FLAG ? new SetCache_default() : void 0;
  stack.set(array2, other);
  stack.set(other, array2);
  while (++index2 < arrLength) {
    var arrValue = array2[index2], othValue = other[index2];
    if (customizer) {
      var compared = isPartial ? customizer(othValue, arrValue, index2, other, array2, stack) : customizer(arrValue, othValue, index2, array2, other, stack);
    }
    if (compared !== void 0) {
      if (compared) {
        continue;
      }
      result = false;
      break;
    }
    if (seen) {
      if (!arraySome_default(other, function(othValue2, othIndex) {
        if (!cacheHas_default(seen, othIndex) && (arrValue === othValue2 || equalFunc(arrValue, othValue2, bitmask, customizer, stack))) {
          return seen.push(othIndex);
        }
      })) {
        result = false;
        break;
      }
    } else if (!(arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) {
      result = false;
      break;
    }
  }
  stack["delete"](array2);
  stack["delete"](other);
  return result;
}
function mapToArray(map2) {
  var index2 = -1, result = Array(map2.size);
  map2.forEach(function(value, key) {
    result[++index2] = [key, value];
  });
  return result;
}
function setToArray(set) {
  var index2 = -1, result = Array(set.size);
  set.forEach(function(value) {
    result[++index2] = value;
  });
  return result;
}
function equalByTag(object2, other, tag2, bitmask, customizer, equalFunc, stack) {
  switch (tag2) {
    case dataViewTag3:
      if (object2.byteLength != other.byteLength || object2.byteOffset != other.byteOffset) {
        return false;
      }
      object2 = object2.buffer;
      other = other.buffer;
    case arrayBufferTag2:
      if (object2.byteLength != other.byteLength || !equalFunc(new Uint8Array_default(object2), new Uint8Array_default(other))) {
        return false;
      }
      return true;
    case boolTag2:
    case dateTag2:
    case numberTag2:
      return eq_default(+object2, +other);
    case errorTag2:
      return object2.name == other.name && object2.message == other.message;
    case regexpTag2:
    case stringTag2:
      return object2 == other + "";
    case mapTag3:
      var convert = mapToArray_default;
    case setTag3:
      var isPartial = bitmask & COMPARE_PARTIAL_FLAG2;
      convert || (convert = setToArray_default);
      if (object2.size != other.size && !isPartial) {
        return false;
      }
      var stacked = stack.get(object2);
      if (stacked) {
        return stacked == other;
      }
      bitmask |= COMPARE_UNORDERED_FLAG2;
      stack.set(object2, other);
      var result = equalArrays_default(convert(object2), convert(other), bitmask, customizer, equalFunc, stack);
      stack["delete"](object2);
      return result;
    case symbolTag:
      if (symbolValueOf) {
        return symbolValueOf.call(object2) == symbolValueOf.call(other);
      }
  }
  return false;
}
function equalObjects(object2, other, bitmask, customizer, equalFunc, stack) {
  var isPartial = bitmask & COMPARE_PARTIAL_FLAG3, objProps = getAllKeys_default(object2), objLength = objProps.length, othProps = getAllKeys_default(other), othLength = othProps.length;
  if (objLength != othLength && !isPartial) {
    return false;
  }
  var index2 = objLength;
  while (index2--) {
    var key = objProps[index2];
    if (!(isPartial ? key in other : hasOwnProperty8.call(other, key))) {
      return false;
    }
  }
  var objStacked = stack.get(object2);
  var othStacked = stack.get(other);
  if (objStacked && othStacked) {
    return objStacked == other && othStacked == object2;
  }
  var result = true;
  stack.set(object2, other);
  stack.set(other, object2);
  var skipCtor = isPartial;
  while (++index2 < objLength) {
    key = objProps[index2];
    var objValue = object2[key], othValue = other[key];
    if (customizer) {
      var compared = isPartial ? customizer(othValue, objValue, key, other, object2, stack) : customizer(objValue, othValue, key, object2, other, stack);
    }
    if (!(compared === void 0 ? objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack) : compared)) {
      result = false;
      break;
    }
    skipCtor || (skipCtor = key == "constructor");
  }
  if (result && !skipCtor) {
    var objCtor = object2.constructor, othCtor = other.constructor;
    if (objCtor != othCtor && ("constructor" in object2 && "constructor" in other) && !(typeof objCtor == "function" && objCtor instanceof objCtor && typeof othCtor == "function" && othCtor instanceof othCtor)) {
      result = false;
    }
  }
  stack["delete"](object2);
  stack["delete"](other);
  return result;
}
function baseIsEqualDeep(object2, other, bitmask, customizer, equalFunc, stack) {
  var objIsArr = isArray_default(object2), othIsArr = isArray_default(other), objTag = objIsArr ? arrayTag2 : getTag_default(object2), othTag = othIsArr ? arrayTag2 : getTag_default(other);
  objTag = objTag == argsTag3 ? objectTag3 : objTag;
  othTag = othTag == argsTag3 ? objectTag3 : othTag;
  var objIsObj = objTag == objectTag3, othIsObj = othTag == objectTag3, isSameTag = objTag == othTag;
  if (isSameTag && isBuffer_default(object2)) {
    if (!isBuffer_default(other)) {
      return false;
    }
    objIsArr = true;
    objIsObj = false;
  }
  if (isSameTag && !objIsObj) {
    stack || (stack = new Stack_default());
    return objIsArr || isTypedArray_default(object2) ? equalArrays_default(object2, other, bitmask, customizer, equalFunc, stack) : equalByTag_default(object2, other, objTag, bitmask, customizer, equalFunc, stack);
  }
  if (!(bitmask & COMPARE_PARTIAL_FLAG4)) {
    var objIsWrapped = objIsObj && hasOwnProperty9.call(object2, "__wrapped__"), othIsWrapped = othIsObj && hasOwnProperty9.call(other, "__wrapped__");
    if (objIsWrapped || othIsWrapped) {
      var objUnwrapped = objIsWrapped ? object2.value() : object2, othUnwrapped = othIsWrapped ? other.value() : other;
      stack || (stack = new Stack_default());
      return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack);
    }
  }
  if (!isSameTag) {
    return false;
  }
  stack || (stack = new Stack_default());
  return equalObjects_default(object2, other, bitmask, customizer, equalFunc, stack);
}
function baseIsEqual(value, other, bitmask, customizer, stack) {
  if (value === other) {
    return true;
  }
  if (value == null || other == null || !isObjectLike_default(value) && !isObjectLike_default(other)) {
    return value !== value && other !== other;
  }
  return baseIsEqualDeep_default(value, other, bitmask, customizer, baseIsEqual, stack);
}
function isEqual(value, other) {
  return baseIsEqual_default(value, other);
}
function erf(x) {
  const sign = Math.sign(x);
  x = Math.abs(x);
  const a1 = 0.254829592;
  const a2 = -0.284496736;
  const a3 = 1.421413741;
  const a4 = -1.453152027;
  const a5 = 1.061405429;
  const p = 0.3275911;
  const t = 1 / (1 + p * x);
  const y = t * (a1 + t * (a2 + t * (a3 + t * (a4 + t * a5))));
  return sign * (1 - y * Math.exp(-x * x));
}
function getLogNormalScore({ median, p10 }, value) {
  if (median <= 0)
    throw new Error("median must be greater than zero");
  if (p10 <= 0)
    throw new Error("p10 must be greater than zero");
  if (p10 >= median)
    throw new Error("p10 must be less than the median");
  if (value <= 0)
    return 1;
  const INVERSE_ERFC_ONE_FIFTH = 0.9061938024368232;
  const xRatio = Math.max(Number.MIN_VALUE, value / median);
  const xLogRatio = Math.log(xRatio);
  const p10Ratio = Math.max(Number.MIN_VALUE, p10 / median);
  const p10LogRatio = -Math.log(p10Ratio);
  const standardizedX = xLogRatio * INVERSE_ERFC_ONE_FIFTH / p10LogRatio;
  const complementaryPercentile = (1 - erf(standardizedX)) / 2;
  let score;
  if (value <= p10) {
    score = Math.max(MIN_PASSING_SCORE, Math.min(1, complementaryPercentile));
  } else if (value <= median) {
    score = Math.max(MIN_AVERAGE_SCORE, Math.min(MAX_AVERAGE_SCORE, complementaryPercentile));
  } else {
    score = Math.max(0, Math.min(MAX_FAILING_SCORE, complementaryPercentile));
  }
  return score;
}
function __extends(d, b) {
  if (typeof b !== "function" && b !== null)
    throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
  extendStatics(d, b);
  function __() {
    this.constructor = d;
  }
  __name(__, "__");
  d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
}
function __rest(s, e) {
  var t = {};
  for (var p in s)
    if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
      t[p] = s[p];
  if (s != null && typeof Object.getOwnPropertySymbols === "function")
    for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
      if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
        t[p[i]] = s[p[i]];
    }
  return t;
}
function __decorate(decorators, target, key, desc) {
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
    r = Reflect.decorate(decorators, target, key, desc);
  else
    for (var i = decorators.length - 1; i >= 0; i--)
      if (d = decorators[i])
        r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
  return c > 3 && r && Object.defineProperty(target, key, r), r;
}
function __param(paramIndex, decorator) {
  return function(target, key) {
    decorator(target, key, paramIndex);
  };
}
function __esDecorate(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {
  function accept(f) {
    if (f !== void 0 && typeof f !== "function")
      throw new TypeError("Function expected");
    return f;
  }
  __name(accept, "accept");
  var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value";
  var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null;
  var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});
  var _, done = false;
  for (var i = decorators.length - 1; i >= 0; i--) {
    var context2 = {};
    for (var p in contextIn)
      context2[p] = p === "access" ? {} : contextIn[p];
    for (var p in contextIn.access)
      context2.access[p] = contextIn.access[p];
    context2.addInitializer = function(f) {
      if (done)
        throw new TypeError("Cannot add initializers after decoration has completed");
      extraInitializers.push(accept(f || null));
    };
    var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context2);
    if (kind === "accessor") {
      if (result === void 0)
        continue;
      if (result === null || typeof result !== "object")
        throw new TypeError("Object expected");
      if (_ = accept(result.get))
        descriptor.get = _;
      if (_ = accept(result.set))
        descriptor.set = _;
      if (_ = accept(result.init))
        initializers.unshift(_);
    } else if (_ = accept(result)) {
      if (kind === "field")
        initializers.unshift(_);
      else
        descriptor[key] = _;
    }
  }
  if (target)
    Object.defineProperty(target, contextIn.name, descriptor);
  done = true;
}
function __runInitializers(thisArg, initializers, value) {
  var useValue = arguments.length > 2;
  for (var i = 0; i < initializers.length; i++) {
    value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);
  }
  return useValue ? value : void 0;
}
function __propKey(x) {
  return typeof x === "symbol" ? x : "".concat(x);
}
function __setFunctionName(f, name, prefix) {
  if (typeof name === "symbol")
    name = name.description ? "[".concat(name.description, "]") : "";
  return Object.defineProperty(f, "name", { configurable: true, value: prefix ? "".concat(prefix, " ", name) : name });
}
function __metadata(metadataKey, metadataValue) {
  if (typeof Reflect === "object" && typeof Reflect.metadata === "function")
    return Reflect.metadata(metadataKey, metadataValue);
}
function __awaiter(thisArg, _arguments, P, generator) {
  function adopt(value) {
    return value instanceof P ? value : new P(function(resolve2) {
      resolve2(value);
    });
  }
  __name(adopt, "adopt");
  return new (P || (P = Promise))(function(resolve2, reject) {
    function fulfilled(value) {
      try {
        step(generator.next(value));
      } catch (e) {
        reject(e);
      }
    }
    __name(fulfilled, "fulfilled");
    function rejected(value) {
      try {
        step(generator["throw"](value));
      } catch (e) {
        reject(e);
      }
    }
    __name(rejected, "rejected");
    function step(result) {
      result.done ? resolve2(result.value) : adopt(result.value).then(fulfilled, rejected);
    }
    __name(step, "step");
    step((generator = generator.apply(thisArg, _arguments || [])).next());
  });
}
function __generator(thisArg, body) {
  var _ = { label: 0, sent: /* @__PURE__ */ __name(function() {
    if (t[0] & 1)
      throw t[1];
    return t[1];
  }, "sent"), trys: [], ops: [] }, f, y, t, g;
  return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() {
    return this;
  }), g;
  function verb(n) {
    return function(v) {
      return step([n, v]);
    };
  }
  __name(verb, "verb");
  function step(op) {
    if (f)
      throw new TypeError("Generator is already executing.");
    while (g && (g = 0, op[0] && (_ = 0)), _)
      try {
        if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done)
          return t;
        if (y = 0, t)
          op = [op[0] & 2, t.value];
        switch (op[0]) {
          case 0:
          case 1:
            t = op;
            break;
          case 4:
            _.label++;
            return { value: op[1], done: false };
          case 5:
            _.label++;
            y = op[1];
            op = [0];
            continue;
          case 7:
            op = _.ops.pop();
            _.trys.pop();
            continue;
          default:
            if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
              _ = 0;
              continue;
            }
            if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) {
              _.label = op[1];
              break;
            }
            if (op[0] === 6 && _.label < t[1]) {
              _.label = t[1];
              t = op;
              break;
            }
            if (t && _.label < t[2]) {
              _.label = t[2];
              _.ops.push(op);
              break;
            }
            if (t[2])
              _.ops.pop();
            _.trys.pop();
            continue;
        }
        op = body.call(thisArg, _);
      } catch (e) {
        op = [6, e];
        y = 0;
      } finally {
        f = t = 0;
      }
    if (op[0] & 5)
      throw op[1];
    return { value: op[0] ? op[1] : void 0, done: true };
  }
  __name(step, "step");
}
function __exportStar(m, o) {
  for (var p in m)
    if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p))
      __createBinding(o, m, p);
}
function __values(o) {
  var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
  if (m)
    return m.call(o);
  if (o && typeof o.length === "number")
    return {
      next: /* @__PURE__ */ __name(function() {
        if (o && i >= o.length)
          o = void 0;
        return { value: o && o[i++], done: !o };
      }, "next")
    };
  throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
}
function __read(o, n) {
  var m = typeof Symbol === "function" && o[Symbol.iterator];
  if (!m)
    return o;
  var i = m.call(o), r, ar = [], e;
  try {
    while ((n === void 0 || n-- > 0) && !(r = i.next()).done)
      ar.push(r.value);
  } catch (error) {
    e = { error };
  } finally {
    try {
      if (r && !r.done && (m = i["return"]))
        m.call(i);
    } finally {
      if (e)
        throw e.error;
    }
  }
  return ar;
}
function __spread() {
  for (var ar = [], i = 0; i < arguments.length; i++)
    ar = ar.concat(__read(arguments[i]));
  return ar;
}
function __spreadArrays() {
  for (var s = 0, i = 0, il = arguments.length; i < il; i++)
    s += arguments[i].length;
  for (var r = Array(s), k = 0, i = 0; i < il; i++)
    for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
      r[k] = a[j];
  return r;
}
function __spreadArray(to, from2, pack) {
  if (pack || arguments.length === 2)
    for (var i = 0, l = from2.length, ar; i < l; i++) {
      if (ar || !(i in from2)) {
        if (!ar)
          ar = Array.prototype.slice.call(from2, 0, i);
        ar[i] = from2[i];
      }
    }
  return to.concat(ar || Array.prototype.slice.call(from2));
}
function __await(v) {
  return this instanceof __await ? (this.v = v, this) : new __await(v);
}
function __asyncGenerator(thisArg, _arguments, generator) {
  if (!Symbol.asyncIterator)
    throw new TypeError("Symbol.asyncIterator is not defined.");
  var g = generator.apply(thisArg, _arguments || []), i, q = [];
  return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function() {
    return this;
  }, i;
  function verb(n) {
    if (g[n])
      i[n] = function(v) {
        return new Promise(function(a, b) {
          q.push([n, v, a, b]) > 1 || resume(n, v);
        });
      };
  }
  __name(verb, "verb");
  function resume(n, v) {
    try {
      step(g[n](v));
    } catch (e) {
      settle(q[0][3], e);
    }
  }
  __name(resume, "resume");
  function step(r) {
    r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r);
  }
  __name(step, "step");
  function fulfill(value) {
    resume("next", value);
  }
  __name(fulfill, "fulfill");
  function reject(value) {
    resume("throw", value);
  }
  __name(reject, "reject");
  function settle(f, v) {
    if (f(v), q.shift(), q.length)
      resume(q[0][0], q[0][1]);
  }
  __name(settle, "settle");
}
function __asyncDelegator(o) {
  var i, p;
  return i = {}, verb("next"), verb("throw", function(e) {
    throw e;
  }), verb("return"), i[Symbol.iterator] = function() {
    return this;
  }, i;
  function verb(n, f) {
    i[n] = o[n] ? function(v) {
      return (p = !p) ? { value: __await(o[n](v)), done: false } : f ? f(v) : v;
    } : f;
  }
  __name(verb, "verb");
}
function __asyncValues(o) {
  if (!Symbol.asyncIterator)
    throw new TypeError("Symbol.asyncIterator is not defined.");
  var m = o[Symbol.asyncIterator], i;
  return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function() {
    return this;
  }, i);
  function verb(n) {
    i[n] = o[n] && function(v) {
      return new Promise(function(resolve2, reject) {
        v = o[n](v), settle(resolve2, reject, v.done, v.value);
      });
    };
  }
  __name(verb, "verb");
  function settle(resolve2, reject, d, v) {
    Promise.resolve(v).then(function(v2) {
      resolve2({ value: v2, done: d });
    }, reject);
  }
  __name(settle, "settle");
}
function __makeTemplateObject(cooked, raw) {
  if (Object.defineProperty) {
    Object.defineProperty(cooked, "raw", { value: raw });
  } else {
    cooked.raw = raw;
  }
  return cooked;
}
function __importStar(mod2) {
  if (mod2 && mod2.__esModule)
    return mod2;
  var result = {};
  if (mod2 != null) {
    for (var k in mod2)
      if (k !== "default" && Object.prototype.hasOwnProperty.call(mod2, k))
        __createBinding(result, mod2, k);
  }
  __setModuleDefault(result, mod2);
  return result;
}
function __importDefault(mod2) {
  return mod2 && mod2.__esModule ? mod2 : { default: mod2 };
}
function __classPrivateFieldGet(receiver2, state, kind, f) {
  if (kind === "a" && !f)
    throw new TypeError("Private accessor was defined without a getter");
  if (typeof state === "function" ? receiver2 !== state || !f : !state.has(receiver2))
    throw new TypeError("Cannot read private member from an object whose class did not declare it");
  return kind === "m" ? f : kind === "a" ? f.call(receiver2) : f ? f.value : state.get(receiver2);
}
function __classPrivateFieldSet(receiver2, state, value, kind, f) {
  if (kind === "m")
    throw new TypeError("Private method is not writable");
  if (kind === "a" && !f)
    throw new TypeError("Private accessor was defined without a setter");
  if (typeof state === "function" ? receiver2 !== state || !f : !state.has(receiver2))
    throw new TypeError("Cannot write private member to an object whose class did not declare it");
  return kind === "a" ? f.call(receiver2, value) : f ? f.value = value : state.set(receiver2, value), value;
}
function __classPrivateFieldIn(state, receiver2) {
  if (receiver2 === null || typeof receiver2 !== "object" && typeof receiver2 !== "function")
    throw new TypeError("Cannot use 'in' operator on non-object");
  return typeof state === "function" ? receiver2 === state : state.has(receiver2);
}
function __addDisposableResource(env2, value, async2) {
  if (value !== null && value !== void 0) {
    if (typeof value !== "object" && typeof value !== "function")
      throw new TypeError("Object expected.");
    var dispose;
    if (async2) {
      if (!Symbol.asyncDispose)
        throw new TypeError("Symbol.asyncDispose is not defined.");
      dispose = value[Symbol.asyncDispose];
    }
    if (dispose === void 0) {
      if (!Symbol.dispose)
        throw new TypeError("Symbol.dispose is not defined.");
      dispose = value[Symbol.dispose];
    }
    if (typeof dispose !== "function")
      throw new TypeError("Object not disposable.");
    env2.stack.push({ value, dispose, async: async2 });
  } else if (async2) {
    env2.stack.push({ async: true });
  }
  return value;
}
function __disposeResources(env2) {
  function fail(e) {
    env2.error = env2.hasError ? new _SuppressedError(e, env2.error, "An error was suppressed during disposal.") : e;
    env2.hasError = true;
  }
  __name(fail, "fail");
  function next() {
    while (env2.stack.length) {
      var rec = env2.stack.pop();
      try {
        var result = rec.dispose && rec.dispose.call(rec.value);
        if (rec.async)
          return Promise.resolve(result).then(next, function(e) {
            fail(e);
            return next();
          });
      } catch (e) {
        fail(e);
      }
    }
    if (env2.hasError)
      throw env2.error;
  }
  __name(next, "next");
  return next();
}
function __extends2(d, b) {
  if (typeof b !== "function" && b !== null)
    throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
  extendStatics2(d, b);
  function __() {
    this.constructor = d;
  }
  __name(__, "__");
  d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
}
function __rest2(s, e) {
  var t = {};
  for (var p in s)
    if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
      t[p] = s[p];
  if (s != null && typeof Object.getOwnPropertySymbols === "function")
    for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
      if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
        t[p[i]] = s[p[i]];
    }
  return t;
}
function __decorate2(decorators, target, key, desc) {
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
    r = Reflect.decorate(decorators, target, key, desc);
  else
    for (var i = decorators.length - 1; i >= 0; i--)
      if (d = decorators[i])
        r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
  return c > 3 && r && Object.defineProperty(target, key, r), r;
}
function __param2(paramIndex, decorator) {
  return function(target, key) {
    decorator(target, key, paramIndex);
  };
}
function __esDecorate2(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {
  function accept(f) {
    if (f !== void 0 && typeof f !== "function")
      throw new TypeError("Function expected");
    return f;
  }
  __name(accept, "accept");
  var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value";
  var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null;
  var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});
  var _, done = false;
  for (var i = decorators.length - 1; i >= 0; i--) {
    var context2 = {};
    for (var p in contextIn)
      context2[p] = p === "access" ? {} : contextIn[p];
    for (var p in contextIn.access)
      context2.access[p] = contextIn.access[p];
    context2.addInitializer = function(f) {
      if (done)
        throw new TypeError("Cannot add initializers after decoration has completed");
      extraInitializers.push(accept(f || null));
    };
    var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context2);
    if (kind === "accessor") {
      if (result === void 0)
        continue;
      if (result === null || typeof result !== "object")
        throw new TypeError("Object expected");
      if (_ = accept(result.get))
        descriptor.get = _;
      if (_ = accept(result.set))
        descriptor.set = _;
      if (_ = accept(result.init))
        initializers.unshift(_);
    } else if (_ = accept(result)) {
      if (kind === "field")
        initializers.unshift(_);
      else
        descriptor[key] = _;
    }
  }
  if (target)
    Object.defineProperty(target, contextIn.name, descriptor);
  done = true;
}
function __runInitializers2(thisArg, initializers, value) {
  var useValue = arguments.length > 2;
  for (var i = 0; i < initializers.length; i++) {
    value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);
  }
  return useValue ? value : void 0;
}
function __propKey2(x) {
  return typeof x === "symbol" ? x : "".concat(x);
}
function __setFunctionName2(f, name, prefix) {
  if (typeof name === "symbol")
    name = name.description ? "[".concat(name.description, "]") : "";
  return Object.defineProperty(f, "name", { configurable: true, value: prefix ? "".concat(prefix, " ", name) : name });
}
function __metadata2(metadataKey, metadataValue) {
  if (typeof Reflect === "object" && typeof Reflect.metadata === "function")
    return Reflect.metadata(metadataKey, metadataValue);
}
function __awaiter2(thisArg, _arguments, P, generator) {
  function adopt(value) {
    return value instanceof P ? value : new P(function(resolve2) {
      resolve2(value);
    });
  }
  __name(adopt, "adopt");
  return new (P || (P = Promise))(function(resolve2, reject) {
    function fulfilled(value) {
      try {
        step(generator.next(value));
      } catch (e) {
        reject(e);
      }
    }
    __name(fulfilled, "fulfilled");
    function rejected(value) {
      try {
        step(generator["throw"](value));
      } catch (e) {
        reject(e);
      }
    }
    __name(rejected, "rejected");
    function step(result) {
      result.done ? resolve2(result.value) : adopt(result.value).then(fulfilled, rejected);
    }
    __name(step, "step");
    step((generator = generator.apply(thisArg, _arguments || [])).next());
  });
}
function __generator2(thisArg, body) {
  var _ = { label: 0, sent: /* @__PURE__ */ __name(function() {
    if (t[0] & 1)
      throw t[1];
    return t[1];
  }, "sent"), trys: [], ops: [] }, f, y, t, g;
  return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() {
    return this;
  }), g;
  function verb(n) {
    return function(v) {
      return step([n, v]);
    };
  }
  __name(verb, "verb");
  function step(op) {
    if (f)
      throw new TypeError("Generator is already executing.");
    while (g && (g = 0, op[0] && (_ = 0)), _)
      try {
        if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done)
          return t;
        if (y = 0, t)
          op = [op[0] & 2, t.value];
        switch (op[0]) {
          case 0:
          case 1:
            t = op;
            break;
          case 4:
            _.label++;
            return { value: op[1], done: false };
          case 5:
            _.label++;
            y = op[1];
            op = [0];
            continue;
          case 7:
            op = _.ops.pop();
            _.trys.pop();
            continue;
          default:
            if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
              _ = 0;
              continue;
            }
            if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) {
              _.label = op[1];
              break;
            }
            if (op[0] === 6 && _.label < t[1]) {
              _.label = t[1];
              t = op;
              break;
            }
            if (t && _.label < t[2]) {
              _.label = t[2];
              _.ops.push(op);
              break;
            }
            if (t[2])
              _.ops.pop();
            _.trys.pop();
            continue;
        }
        op = body.call(thisArg, _);
      } catch (e) {
        op = [6, e];
        y = 0;
      } finally {
        f = t = 0;
      }
    if (op[0] & 5)
      throw op[1];
    return { value: op[0] ? op[1] : void 0, done: true };
  }
  __name(step, "step");
}
function __exportStar2(m, o) {
  for (var p in m)
    if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p))
      __createBinding2(o, m, p);
}
function __values2(o) {
  var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
  if (m)
    return m.call(o);
  if (o && typeof o.length === "number")
    return {
      next: /* @__PURE__ */ __name(function() {
        if (o && i >= o.length)
          o = void 0;
        return { value: o && o[i++], done: !o };
      }, "next")
    };
  throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
}
function __read2(o, n) {
  var m = typeof Symbol === "function" && o[Symbol.iterator];
  if (!m)
    return o;
  var i = m.call(o), r, ar = [], e;
  try {
    while ((n === void 0 || n-- > 0) && !(r = i.next()).done)
      ar.push(r.value);
  } catch (error) {
    e = { error };
  } finally {
    try {
      if (r && !r.done && (m = i["return"]))
        m.call(i);
    } finally {
      if (e)
        throw e.error;
    }
  }
  return ar;
}
function __spread2() {
  for (var ar = [], i = 0; i < arguments.length; i++)
    ar = ar.concat(__read2(arguments[i]));
  return ar;
}
function __spreadArrays2() {
  for (var s = 0, i = 0, il = arguments.length; i < il; i++)
    s += arguments[i].length;
  for (var r = Array(s), k = 0, i = 0; i < il; i++)
    for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
      r[k] = a[j];
  return r;
}
function __spreadArray2(to, from2, pack) {
  if (pack || arguments.length === 2)
    for (var i = 0, l = from2.length, ar; i < l; i++) {
      if (ar || !(i in from2)) {
        if (!ar)
          ar = Array.prototype.slice.call(from2, 0, i);
        ar[i] = from2[i];
      }
    }
  return to.concat(ar || Array.prototype.slice.call(from2));
}
function __await2(v) {
  return this instanceof __await2 ? (this.v = v, this) : new __await2(v);
}
function __asyncGenerator2(thisArg, _arguments, generator) {
  if (!Symbol.asyncIterator)
    throw new TypeError("Symbol.asyncIterator is not defined.");
  var g = generator.apply(thisArg, _arguments || []), i, q = [];
  return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function() {
    return this;
  }, i;
  function verb(n) {
    if (g[n])
      i[n] = function(v) {
        return new Promise(function(a, b) {
          q.push([n, v, a, b]) > 1 || resume(n, v);
        });
      };
  }
  __name(verb, "verb");
  function resume(n, v) {
    try {
      step(g[n](v));
    } catch (e) {
      settle(q[0][3], e);
    }
  }
  __name(resume, "resume");
  function step(r) {
    r.value instanceof __await2 ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r);
  }
  __name(step, "step");
  function fulfill(value) {
    resume("next", value);
  }
  __name(fulfill, "fulfill");
  function reject(value) {
    resume("throw", value);
  }
  __name(reject, "reject");
  function settle(f, v) {
    if (f(v), q.shift(), q.length)
      resume(q[0][0], q[0][1]);
  }
  __name(settle, "settle");
}
function __asyncDelegator2(o) {
  var i, p;
  return i = {}, verb("next"), verb("throw", function(e) {
    throw e;
  }), verb("return"), i[Symbol.iterator] = function() {
    return this;
  }, i;
  function verb(n, f) {
    i[n] = o[n] ? function(v) {
      return (p = !p) ? { value: __await2(o[n](v)), done: false } : f ? f(v) : v;
    } : f;
  }
  __name(verb, "verb");
}
function __asyncValues2(o) {
  if (!Symbol.asyncIterator)
    throw new TypeError("Symbol.asyncIterator is not defined.");
  var m = o[Symbol.asyncIterator], i;
  return m ? m.call(o) : (o = typeof __values2 === "function" ? __values2(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function() {
    return this;
  }, i);
  function verb(n) {
    i[n] = o[n] && function(v) {
      return new Promise(function(resolve2, reject) {
        v = o[n](v), settle(resolve2, reject, v.done, v.value);
      });
    };
  }
  __name(verb, "verb");
  function settle(resolve2, reject, d, v) {
    Promise.resolve(v).then(function(v2) {
      resolve2({ value: v2, done: d });
    }, reject);
  }
  __name(settle, "settle");
}
function __makeTemplateObject2(cooked, raw) {
  if (Object.defineProperty) {
    Object.defineProperty(cooked, "raw", { value: raw });
  } else {
    cooked.raw = raw;
  }
  return cooked;
}
function __importStar2(mod2) {
  if (mod2 && mod2.__esModule)
    return mod2;
  var result = {};
  if (mod2 != null) {
    for (var k in mod2)
      if (k !== "default" && Object.prototype.hasOwnProperty.call(mod2, k))
        __createBinding2(result, mod2, k);
  }
  __setModuleDefault2(result, mod2);
  return result;
}
function __importDefault2(mod2) {
  return mod2 && mod2.__esModule ? mod2 : { default: mod2 };
}
function __classPrivateFieldGet2(receiver2, state, kind, f) {
  if (kind === "a" && !f)
    throw new TypeError("Private accessor was defined without a getter");
  if (typeof state === "function" ? receiver2 !== state || !f : !state.has(receiver2))
    throw new TypeError("Cannot read private member from an object whose class did not declare it");
  return kind === "m" ? f : kind === "a" ? f.call(receiver2) : f ? f.value : state.get(receiver2);
}
function __classPrivateFieldSet2(receiver2, state, value, kind, f) {
  if (kind === "m")
    throw new TypeError("Private method is not writable");
  if (kind === "a" && !f)
    throw new TypeError("Private accessor was defined without a setter");
  if (typeof state === "function" ? receiver2 !== state || !f : !state.has(receiver2))
    throw new TypeError("Cannot write private member to an object whose class did not declare it");
  return kind === "a" ? f.call(receiver2, value) : f ? f.value = value : state.set(receiver2, value), value;
}
function __classPrivateFieldIn2(state, receiver2) {
  if (receiver2 === null || typeof receiver2 !== "object" && typeof receiver2 !== "function")
    throw new TypeError("Cannot use 'in' operator on non-object");
  return typeof state === "function" ? receiver2 === state : state.has(receiver2);
}
function __addDisposableResource2(env2, value, async2) {
  if (value !== null && value !== void 0) {
    if (typeof value !== "object" && typeof value !== "function")
      throw new TypeError("Object expected.");
    var dispose;
    if (async2) {
      if (!Symbol.asyncDispose)
        throw new TypeError("Symbol.asyncDispose is not defined.");
      dispose = value[Symbol.asyncDispose];
    }
    if (dispose === void 0) {
      if (!Symbol.dispose)
        throw new TypeError("Symbol.dispose is not defined.");
      dispose = value[Symbol.dispose];
    }
    if (typeof dispose !== "function")
      throw new TypeError("Object not disposable.");
    env2.stack.push({ value, dispose, async: async2 });
  } else if (async2) {
    env2.stack.push({ async: true });
  }
  return value;
}
function __disposeResources2(env2) {
  function fail(e) {
    env2.error = env2.hasError ? new _SuppressedError2(e, env2.error, "An error was suppressed during disposal.") : e;
    env2.hasError = true;
  }
  __name(fail, "fail");
  function next() {
    while (env2.stack.length) {
      var rec = env2.stack.pop();
      try {
        var result = rec.dispose && rec.dispose.call(rec.value);
        if (rec.async)
          return Promise.resolve(result).then(next, function(e) {
            fail(e);
            return next();
          });
      } catch (e) {
        fail(e);
      }
    }
    if (env2.hasError)
      throw env2.error;
  }
  __name(next, "next");
  return next();
}
function __extends3(d, b) {
  if (typeof b !== "function" && b !== null)
    throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
  extendStatics3(d, b);
  function __() {
    this.constructor = d;
  }
  __name(__, "__");
  d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
}
function __rest3(s, e) {
  var t = {};
  for (var p in s)
    if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
      t[p] = s[p];
  if (s != null && typeof Object.getOwnPropertySymbols === "function")
    for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
      if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
        t[p[i]] = s[p[i]];
    }
  return t;
}
function __decorate3(decorators, target, key, desc) {
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
    r = Reflect.decorate(decorators, target, key, desc);
  else
    for (var i = decorators.length - 1; i >= 0; i--)
      if (d = decorators[i])
        r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
  return c > 3 && r && Object.defineProperty(target, key, r), r;
}
function __param3(paramIndex, decorator) {
  return function(target, key) {
    decorator(target, key, paramIndex);
  };
}
function __esDecorate3(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {
  function accept(f) {
    if (f !== void 0 && typeof f !== "function")
      throw new TypeError("Function expected");
    return f;
  }
  __name(accept, "accept");
  var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value";
  var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null;
  var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});
  var _, done = false;
  for (var i = decorators.length - 1; i >= 0; i--) {
    var context2 = {};
    for (var p in contextIn)
      context2[p] = p === "access" ? {} : contextIn[p];
    for (var p in contextIn.access)
      context2.access[p] = contextIn.access[p];
    context2.addInitializer = function(f) {
      if (done)
        throw new TypeError("Cannot add initializers after decoration has completed");
      extraInitializers.push(accept(f || null));
    };
    var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context2);
    if (kind === "accessor") {
      if (result === void 0)
        continue;
      if (result === null || typeof result !== "object")
        throw new TypeError("Object expected");
      if (_ = accept(result.get))
        descriptor.get = _;
      if (_ = accept(result.set))
        descriptor.set = _;
      if (_ = accept(result.init))
        initializers.unshift(_);
    } else if (_ = accept(result)) {
      if (kind === "field")
        initializers.unshift(_);
      else
        descriptor[key] = _;
    }
  }
  if (target)
    Object.defineProperty(target, contextIn.name, descriptor);
  done = true;
}
function __runInitializers3(thisArg, initializers, value) {
  var useValue = arguments.length > 2;
  for (var i = 0; i < initializers.length; i++) {
    value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);
  }
  return useValue ? value : void 0;
}
function __propKey3(x) {
  return typeof x === "symbol" ? x : "".concat(x);
}
function __setFunctionName3(f, name, prefix) {
  if (typeof name === "symbol")
    name = name.description ? "[".concat(name.description, "]") : "";
  return Object.defineProperty(f, "name", { configurable: true, value: prefix ? "".concat(prefix, " ", name) : name });
}
function __metadata3(metadataKey, metadataValue) {
  if (typeof Reflect === "object" && typeof Reflect.metadata === "function")
    return Reflect.metadata(metadataKey, metadataValue);
}
function __awaiter3(thisArg, _arguments, P, generator) {
  function adopt(value) {
    return value instanceof P ? value : new P(function(resolve2) {
      resolve2(value);
    });
  }
  __name(adopt, "adopt");
  return new (P || (P = Promise))(function(resolve2, reject) {
    function fulfilled(value) {
      try {
        step(generator.next(value));
      } catch (e) {
        reject(e);
      }
    }
    __name(fulfilled, "fulfilled");
    function rejected(value) {
      try {
        step(generator["throw"](value));
      } catch (e) {
        reject(e);
      }
    }
    __name(rejected, "rejected");
    function step(result) {
      result.done ? resolve2(result.value) : adopt(result.value).then(fulfilled, rejected);
    }
    __name(step, "step");
    step((generator = generator.apply(thisArg, _arguments || [])).next());
  });
}
function __generator3(thisArg, body) {
  var _ = { label: 0, sent: /* @__PURE__ */ __name(function() {
    if (t[0] & 1)
      throw t[1];
    return t[1];
  }, "sent"), trys: [], ops: [] }, f, y, t, g;
  return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() {
    return this;
  }), g;
  function verb(n) {
    return function(v) {
      return step([n, v]);
    };
  }
  __name(verb, "verb");
  function step(op) {
    if (f)
      throw new TypeError("Generator is already executing.");
    while (g && (g = 0, op[0] && (_ = 0)), _)
      try {
        if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done)
          return t;
        if (y = 0, t)
          op = [op[0] & 2, t.value];
        switch (op[0]) {
          case 0:
          case 1:
            t = op;
            break;
          case 4:
            _.label++;
            return { value: op[1], done: false };
          case 5:
            _.label++;
            y = op[1];
            op = [0];
            continue;
          case 7:
            op = _.ops.pop();
            _.trys.pop();
            continue;
          default:
            if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
              _ = 0;
              continue;
            }
            if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) {
              _.label = op[1];
              break;
            }
            if (op[0] === 6 && _.label < t[1]) {
              _.label = t[1];
              t = op;
              break;
            }
            if (t && _.label < t[2]) {
              _.label = t[2];
              _.ops.push(op);
              break;
            }
            if (t[2])
              _.ops.pop();
            _.trys.pop();
            continue;
        }
        op = body.call(thisArg, _);
      } catch (e) {
        op = [6, e];
        y = 0;
      } finally {
        f = t = 0;
      }
    if (op[0] & 5)
      throw op[1];
    return { value: op[0] ? op[1] : void 0, done: true };
  }
  __name(step, "step");
}
function __exportStar3(m, o) {
  for (var p in m)
    if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p))
      __createBinding3(o, m, p);
}
function __values3(o) {
  var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
  if (m)
    return m.call(o);
  if (o && typeof o.length === "number")
    return {
      next: /* @__PURE__ */ __name(function() {
        if (o && i >= o.length)
          o = void 0;
        return { value: o && o[i++], done: !o };
      }, "next")
    };
  throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
}
function __read3(o, n) {
  var m = typeof Symbol === "function" && o[Symbol.iterator];
  if (!m)
    return o;
  var i = m.call(o), r, ar = [], e;
  try {
    while ((n === void 0 || n-- > 0) && !(r = i.next()).done)
      ar.push(r.value);
  } catch (error) {
    e = { error };
  } finally {
    try {
      if (r && !r.done && (m = i["return"]))
        m.call(i);
    } finally {
      if (e)
        throw e.error;
    }
  }
  return ar;
}
function __spread3() {
  for (var ar = [], i = 0; i < arguments.length; i++)
    ar = ar.concat(__read3(arguments[i]));
  return ar;
}
function __spreadArrays3() {
  for (var s = 0, i = 0, il = arguments.length; i < il; i++)
    s += arguments[i].length;
  for (var r = Array(s), k = 0, i = 0; i < il; i++)
    for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
      r[k] = a[j];
  return r;
}
function __spreadArray3(to, from2, pack) {
  if (pack || arguments.length === 2)
    for (var i = 0, l = from2.length, ar; i < l; i++) {
      if (ar || !(i in from2)) {
        if (!ar)
          ar = Array.prototype.slice.call(from2, 0, i);
        ar[i] = from2[i];
      }
    }
  return to.concat(ar || Array.prototype.slice.call(from2));
}
function __await3(v) {
  return this instanceof __await3 ? (this.v = v, this) : new __await3(v);
}
function __asyncGenerator3(thisArg, _arguments, generator) {
  if (!Symbol.asyncIterator)
    throw new TypeError("Symbol.asyncIterator is not defined.");
  var g = generator.apply(thisArg, _arguments || []), i, q = [];
  return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function() {
    return this;
  }, i;
  function verb(n) {
    if (g[n])
      i[n] = function(v) {
        return new Promise(function(a, b) {
          q.push([n, v, a, b]) > 1 || resume(n, v);
        });
      };
  }
  __name(verb, "verb");
  function resume(n, v) {
    try {
      step(g[n](v));
    } catch (e) {
      settle(q[0][3], e);
    }
  }
  __name(resume, "resume");
  function step(r) {
    r.value instanceof __await3 ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r);
  }
  __name(step, "step");
  function fulfill(value) {
    resume("next", value);
  }
  __name(fulfill, "fulfill");
  function reject(value) {
    resume("throw", value);
  }
  __name(reject, "reject");
  function settle(f, v) {
    if (f(v), q.shift(), q.length)
      resume(q[0][0], q[0][1]);
  }
  __name(settle, "settle");
}
function __asyncDelegator3(o) {
  var i, p;
  return i = {}, verb("next"), verb("throw", function(e) {
    throw e;
  }), verb("return"), i[Symbol.iterator] = function() {
    return this;
  }, i;
  function verb(n, f) {
    i[n] = o[n] ? function(v) {
      return (p = !p) ? { value: __await3(o[n](v)), done: false } : f ? f(v) : v;
    } : f;
  }
  __name(verb, "verb");
}
function __asyncValues3(o) {
  if (!Symbol.asyncIterator)
    throw new TypeError("Symbol.asyncIterator is not defined.");
  var m = o[Symbol.asyncIterator], i;
  return m ? m.call(o) : (o = typeof __values3 === "function" ? __values3(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function() {
    return this;
  }, i);
  function verb(n) {
    i[n] = o[n] && function(v) {
      return new Promise(function(resolve2, reject) {
        v = o[n](v), settle(resolve2, reject, v.done, v.value);
      });
    };
  }
  __name(verb, "verb");
  function settle(resolve2, reject, d, v) {
    Promise.resolve(v).then(function(v2) {
      resolve2({ value: v2, done: d });
    }, reject);
  }
  __name(settle, "settle");
}
function __makeTemplateObject3(cooked, raw) {
  if (Object.defineProperty) {
    Object.defineProperty(cooked, "raw", { value: raw });
  } else {
    cooked.raw = raw;
  }
  return cooked;
}
function __importStar3(mod2) {
  if (mod2 && mod2.__esModule)
    return mod2;
  var result = {};
  if (mod2 != null) {
    for (var k in mod2)
      if (k !== "default" && Object.prototype.hasOwnProperty.call(mod2, k))
        __createBinding3(result, mod2, k);
  }
  __setModuleDefault3(result, mod2);
  return result;
}
function __importDefault3(mod2) {
  return mod2 && mod2.__esModule ? mod2 : { default: mod2 };
}
function __classPrivateFieldGet3(receiver2, state, kind, f) {
  if (kind === "a" && !f)
    throw new TypeError("Private accessor was defined without a getter");
  if (typeof state === "function" ? receiver2 !== state || !f : !state.has(receiver2))
    throw new TypeError("Cannot read private member from an object whose class did not declare it");
  return kind === "m" ? f : kind === "a" ? f.call(receiver2) : f ? f.value : state.get(receiver2);
}
function __classPrivateFieldSet3(receiver2, state, value, kind, f) {
  if (kind === "m")
    throw new TypeError("Private method is not writable");
  if (kind === "a" && !f)
    throw new TypeError("Private accessor was defined without a setter");
  if (typeof state === "function" ? receiver2 !== state || !f : !state.has(receiver2))
    throw new TypeError("Cannot write private member to an object whose class did not declare it");
  return kind === "a" ? f.call(receiver2, value) : f ? f.value = value : state.set(receiver2, value), value;
}
function __classPrivateFieldIn3(state, receiver2) {
  if (receiver2 === null || typeof receiver2 !== "object" && typeof receiver2 !== "function")
    throw new TypeError("Cannot use 'in' operator on non-object");
  return typeof state === "function" ? receiver2 === state : state.has(receiver2);
}
function __addDisposableResource3(env2, value, async2) {
  if (value !== null && value !== void 0) {
    if (typeof value !== "object" && typeof value !== "function")
      throw new TypeError("Object expected.");
    var dispose;
    if (async2) {
      if (!Symbol.asyncDispose)
        throw new TypeError("Symbol.asyncDispose is not defined.");
      dispose = value[Symbol.asyncDispose];
    }
    if (dispose === void 0) {
      if (!Symbol.dispose)
        throw new TypeError("Symbol.dispose is not defined.");
      dispose = value[Symbol.dispose];
    }
    if (typeof dispose !== "function")
      throw new TypeError("Object not disposable.");
    env2.stack.push({ value, dispose, async: async2 });
  } else if (async2) {
    env2.stack.push({ async: true });
  }
  return value;
}
function __disposeResources3(env2) {
  function fail(e) {
    env2.error = env2.hasError ? new _SuppressedError3(e, env2.error, "An error was suppressed during disposal.") : e;
    env2.hasError = true;
  }
  __name(fail, "fail");
  function next() {
    while (env2.stack.length) {
      var rec = env2.stack.pop();
      try {
        var result = rec.dispose && rec.dispose.call(rec.value);
        if (rec.async)
          return Promise.resolve(result).then(next, function(e) {
            fail(e);
            return next();
          });
      } catch (e) {
        fail(e);
      }
    }
    if (env2.hasError)
      throw env2.error;
  }
  __name(next, "next");
  return next();
}
function getModulePath(importMeta) {
  return url_default.fileURLToPath(importMeta.url);
}
function isObjectOfUnknownValues(val) {
  return typeof val === "object" && val !== null && !Array.isArray(val);
}
function isObjectOrArrayOfUnknownValues(val) {
  return typeof val === "object" && val !== null;
}
function collectAllCustomElementsFromICU(icuElements, customElements = /* @__PURE__ */ new Map()) {
  for (const el of icuElements) {
    if (el.type === TYPE.literal || el.type === TYPE.pound)
      continue;
    customElements.set(el.value, el);
    if (el.type === TYPE.plural) {
      for (const option of Object.values(el.options)) {
        collectAllCustomElementsFromICU(option.value, customElements);
      }
    }
  }
  return customElements;
}
function _preformatValues(messageFormatter, values = {}, lhlMessage) {
  const customElements = collectAllCustomElementsFromICU(messageFormatter.getAst());
  const formattedValues = {};
  for (const [id2, element] of customElements) {
    if (!(id2 in values)) {
      throw new Error(`ICU Message "${lhlMessage}" contains a value reference ("${id2}") that wasn't provided`);
    }
    const value = values[id2];
    if (element.type !== TYPE.number) {
      formattedValues[id2] = value;
      continue;
    }
    if (typeof value !== "number") {
      throw new Error(`ICU Message "${lhlMessage}" contains a numeric reference ("${id2}") but provided value was not a number`);
    }
    if (element.style === "milliseconds") {
      formattedValues[id2] = Math.round(value / 10) * 10;
    } else if (element.style === "seconds" && id2 === "timeInMs") {
      formattedValues[id2] = Math.round(value / 100) / 10;
    } else if (element.style === "bytes") {
      formattedValues[id2] = value / 1024;
    } else {
      formattedValues[id2] = value;
    }
  }
  for (const valueId of Object.keys(values)) {
    if (valueId in formattedValues)
      continue;
    if (valueId === "errorCode") {
      formattedValues.errorCode = values.errorCode;
      continue;
    }
    throw new Error(`Provided value "${valueId}" does not match any placeholder in ICU message "${lhlMessage}"`);
  }
  return formattedValues;
}
function escapeIcuMessage(message) {
  return message.replace(/'/g, `''`).replace(/\\{/g, `'{`).replace(/\\}/g, `'}`);
}
function formatMessage(message, values, locale) {
  message = escapeIcuMessage(message);
  const localeForMessageFormat = locale === "en-XA" || locale === "en-XL" ? "de-DE" : locale;
  const IntlMessageFormatCtor = import_intl_messageformat.default.IntlMessageFormat || import_intl_messageformat.default;
  const formatter2 = new IntlMessageFormatCtor(message, localeForMessageFormat, formats, {
    ignoreTag: true
  });
  const valuesForMessageFormat = _preformatValues(formatter2, values, message);
  const formattedResult = formatter2.format(valuesForMessageFormat);
  if (typeof formattedResult !== "string") {
    throw new Error("unexpected formatted result");
  }
  return formattedResult;
}
function _localizeIcuMessage(icuMessage, locale) {
  const localeMessages = _getLocaleMessages(locale);
  const localeMessage = localeMessages[icuMessage.i18nId];
  if (!localeMessage) {
    return icuMessage.formattedDefault;
  }
  return formatMessage(localeMessage.message, icuMessage.values, locale);
}
function getRendererFormattedStrings(locale) {
  const localeMessages = _getLocaleMessages(locale);
  const icuMessageIds = Object.keys(localeMessages).filter((f) => f.startsWith("report/renderer/report-utils.js"));
  const strings = {};
  for (const icuMessageId of icuMessageIds) {
    const { filename, key } = getIcuMessageIdParts(icuMessageId);
    if (!filename.endsWith("report-utils.js")) {
      throw new Error(`Unexpected message: ${icuMessageId}`);
    }
    strings[key] = localeMessages[icuMessageId].message;
  }
  return strings;
}
function isIcuMessage(icuMessageOrNot) {
  if (!isObjectOfUnknownValues(icuMessageOrNot)) {
    return false;
  }
  const { i18nId, values, formattedDefault } = icuMessageOrNot;
  if (typeof i18nId !== "string") {
    return false;
  }
  if (typeof formattedDefault !== "string") {
    return false;
  }
  if (values !== void 0) {
    if (!isObjectOfUnknownValues(values)) {
      return false;
    }
    for (const value of Object.values(values)) {
      if (typeof value !== "string" && typeof value !== "number") {
        return false;
      }
    }
  }
  return MESSAGE_I18N_ID_REGEX.test(i18nId);
}
function getFormatted(icuMessageOrRawString, locale) {
  if (isIcuMessage(icuMessageOrRawString)) {
    return _localizeIcuMessage(icuMessageOrRawString, locale);
  }
  if (typeof icuMessageOrRawString === "string") {
    return icuMessageOrRawString;
  }
  throw new Error("Attempted to format invalid icuMessage type");
}
function _formatPathAsString(pathInLHR) {
  let pathAsString = "";
  for (const property of pathInLHR) {
    if (/^[a-z]+$/i.test(property)) {
      if (pathAsString.length)
        pathAsString += ".";
      pathAsString += property;
    } else {
      if (/]|"|'|\s/.test(property))
        throw new Error(`Cannot handle "${property}" in i18n`);
      pathAsString += `[${property}]`;
    }
  }
  return pathAsString;
}
function replaceIcuMessages(inputObject, locale) {
  function replaceInObject(subObject, icuMessagePaths2, pathInLHR = []) {
    if (!isObjectOrArrayOfUnknownValues(subObject))
      return;
    for (const [property, possibleIcuMessage] of Object.entries(subObject)) {
      const currentPathInLHR = pathInLHR.concat([property]);
      if (isIcuMessage(possibleIcuMessage)) {
        const formattedString = getFormatted(possibleIcuMessage, locale);
        const messageInstancesInLHR = icuMessagePaths2[possibleIcuMessage.i18nId] || [];
        const currentPathAsString = _formatPathAsString(currentPathInLHR);
        messageInstancesInLHR.push(possibleIcuMessage.values ? { values: possibleIcuMessage.values, path: currentPathAsString } : currentPathAsString);
        subObject[property] = formattedString;
        icuMessagePaths2[possibleIcuMessage.i18nId] = messageInstancesInLHR;
      } else {
        replaceInObject(possibleIcuMessage, icuMessagePaths2, currentPathInLHR);
      }
    }
  }
  __name(replaceInObject, "replaceInObject");
  const icuMessagePaths = {};
  replaceInObject(inputObject, icuMessagePaths);
  return icuMessagePaths;
}
function _getLocaleMessages(locale) {
  const localeMessages = LOCALE_MESSAGES[locale];
  if (!localeMessages) {
    if (locale === DEFAULT_LOCALE) {
      return {};
    }
    throw new Error(`Unsupported locale '${locale}'`);
  }
  return localeMessages;
}
function getAvailableLocales() {
  const localesWithMessages = /* @__PURE__ */ new Set([...Object.keys(LOCALE_MESSAGES), DEFAULT_LOCALE]);
  return (
    /** @type {Array<LH.Locale>} */
    [...localesWithMessages].sort()
  );
}
function getIcuMessageIdParts(i18nMessageId) {
  if (!MESSAGE_I18N_ID_REGEX.test(i18nMessageId)) {
    throw Error(`"${i18nMessageId}" does not appear to be a valid ICU message id`);
  }
  const [filename, key] = i18nMessageId.split(" | ");
  return { filename, key };
}
function lookupLocale(locales2, possibleLocales) {
  if (typeof Intl !== "object") {
    throw new Error("Lighthouse must be run in Node with `Intl` support. See https://nodejs.org/api/intl.html for help");
  }
  const canonicalLocales = Intl.getCanonicalLocales(locales2);
  const availableLocales = Intl.NumberFormat.supportedLocalesOf(canonicalLocales);
  const localesWithMessages = possibleLocales || getAvailableLocales();
  const localesWithmessagesObj = (
    /** @type {Record<LH.Locale, LhlMessages>} */
    Object.fromEntries(localesWithMessages.map((l) => [l, {}]))
  );
  const closestLocale = (0, import_lookup_closest_locale.default)(availableLocales, localesWithmessagesObj);
  if (!closestLocale) {
    if (Intl.NumberFormat.supportedLocalesOf("es").length === 0) {
      lighthouse_logger_default.warn("i18n", "Requested locale not available in this version of node. The `full-icu` npm module can provide additional locales. For help, see https://github.com/GoogleChrome/lighthouse/blob/main/readme.md#how-do-i-get-localized-lighthouse-results-via-the-cli");
    }
    lighthouse_logger_default.warn("i18n", `locale(s) '${locales2}' not available. Falling back to default '${DEFAULT_LOCALE}'`);
  }
  return closestLocale || DEFAULT_LOCALE;
}
function createIcuMessageFn(filename, fileStrings = {}) {
  if (filename.startsWith("file://"))
    filename = url_default.fileURLToPath(filename);
  if (path2.isAbsolute(filename))
    filename = path2.relative(LH_ROOT, filename);
  const mergedStrings = { ...UIStrings, ...fileStrings };
  const getIcuMessageFn = /* @__PURE__ */ __name((message, values) => {
    const keyname = Object.keys(mergedStrings).find((key) => mergedStrings[key] === message);
    if (!keyname)
      throw new Error(`Could not locate: ${message}`);
    const filenameToLookup = keyname in fileStrings ? filename : path2.relative(LH_ROOT, getModulePath({ url: "core/lib/i18n/i18n.js" }));
    const unixStyleFilename = filenameToLookup.replace(/\\/g, "/");
    const i18nId = `${unixStyleFilename} | ${keyname}`;
    return {
      i18nId,
      values,
      formattedDefault: formatMessage(message, values, DEFAULT_LOCALE)
    };
  }, "getIcuMessageFn");
  return getIcuMessageFn;
}
function isStringOrIcuMessage(value) {
  return typeof value === "string" || isIcuMessage(value);
}
function isNonNetworkProtocol(protocol2) {
  const urlScheme = protocol2.includes(":") ? protocol2.slice(0, protocol2.indexOf(":")) : protocol2;
  return NON_NETWORK_SCHEMES.includes(urlScheme);
}
function calculateTbtImpactForEvent(event, startTimeMs, endTimeMs, topLevelEvent) {
  let threshold = BLOCKING_TIME_THRESHOLD;
  if (topLevelEvent) {
    threshold *= event.duration / topLevelEvent.duration;
  }
  if (event.duration < threshold) {
    return 0;
  }
  if (event.end < startTimeMs) {
    return 0;
  }
  if (event.start > endTimeMs) {
    return 0;
  }
  const clippedStart = Math.max(event.start, startTimeMs);
  const clippedEnd = Math.min(event.end, endTimeMs);
  const clippedDuration = clippedEnd - clippedStart;
  if (clippedDuration < threshold) {
    return 0;
  }
  return clippedDuration - threshold;
}
function calculateSumOfBlockingTime(topLevelEvents, startTimeMs, endTimeMs) {
  if (endTimeMs <= startTimeMs) {
    return 0;
  }
  let sumBlockingTime = 0;
  for (const event of topLevelEvents) {
    sumBlockingTime += calculateTbtImpactForEvent(event, startTimeMs, endTimeMs);
  }
  return sumBlockingTime;
}
function configToCacheKey(config32) {
  return JSON.stringify(config32);
}
function isExtensionPayloadMarker(payload) {
  return payload.dataType === "marker";
}
function isExtensionEntryObj(payload) {
  const hasTrack = "track" in payload && Boolean(payload.track);
  const validEntryType = payload.dataType === "track-entry" || payload.dataType === void 0;
  return validEntryType && hasTrack;
}
function isConsoleTimestampPayloadTrackEntry(payload) {
  return payload.url !== void 0 && payload.description !== void 0;
}
function isValidExtensionPayload(payload) {
  return isExtensionPayloadMarker(payload) || isExtensionEntryObj(payload) || isConsoleTimestampPayloadTrackEntry(payload);
}
function isSyntheticExtensionEntry(entry) {
  return entry.cat === "devtools.extension";
}
function isTimeRangeAnnotation(annotation) {
  return annotation.type === "TIME_RANGE";
}
function isEntryLabelAnnotation(annotation) {
  return annotation.type === "ENTRY_LABEL";
}
function isEntriesLinkAnnotation(annotation) {
  return annotation.type === "ENTRIES_LINK";
}
function traceEventKeyToValues(key) {
  const parts = key.split("-");
  const type2 = parts[0];
  switch (type2) {
    case EventKeyType.PROFILE_CALL:
      if (parts.length !== 5 || !parts.every((part, i) => i === 0 || typeof part === "number" || !isNaN(parseInt(part, 10)))) {
        throw new Error(`Invalid ProfileCallKey: ${key}`);
      }
      return {
        type: parts[0],
        processID: parseInt(parts[1], 10),
        threadID: parseInt(parts[2], 10),
        sampleIndex: parseInt(parts[3], 10),
        protocol: parseInt(parts[4], 10)
      };
    case EventKeyType.RAW_EVENT:
      if (parts.length !== 2 || !(typeof parts[1] === "number" || !isNaN(parseInt(parts[1], 10)))) {
        throw new Error(`Invalid RawEvent Key: ${key}`);
      }
      return {
        type: parts[0],
        rawIndex: parseInt(parts[1], 10)
      };
    case EventKeyType.SYNTHETIC_EVENT:
      if (parts.length !== 2 || !(typeof parts[1] === "number" || !isNaN(parseInt(parts[1], 10)))) {
        throw new Error(`Invalid SyntheticEvent Key: ${key}`);
      }
      return {
        type: parts[0],
        rawIndex: parseInt(parts[1], 10)
      };
    case EventKeyType.LEGACY_TIMELINE_FRAME: {
      if (parts.length !== 2 || Number.isNaN(parseInt(parts[1], 10))) {
        throw new Error(`Invalid LegacyTimelineFrame Key: ${key}`);
      }
      return {
        type: type2,
        rawIndex: parseInt(parts[1], 10)
      };
    }
    default:
      throw new Error(`Unknown trace event key: ${key}`);
  }
}
function Micro(value) {
  return value;
}
function Milli(value) {
  return value;
}
function Seconds(value) {
  return value;
}
function isNestableAsyncPhase(phase) {
  return phase === Phase.ASYNC_NESTABLE_START || phase === Phase.ASYNC_NESTABLE_END || phase === Phase.ASYNC_NESTABLE_INSTANT;
}
function isPhaseAsync(phase) {
  return isNestableAsyncPhase(phase) || phase === Phase.ASYNC_BEGIN || phase === Phase.ASYNC_STEP_INTO || phase === Phase.ASYNC_END || phase === Phase.ASYNC_STEP_PAST;
}
function isFlowPhase(phase) {
  return phase === Phase.FLOW_START || phase === Phase.FLOW_STEP || phase === Phase.FLOW_END;
}
function objectIsCallFrame(object2) {
  return "functionName" in object2 && typeof object2.functionName === "string" && ("scriptId" in object2 && (typeof object2.scriptId === "string" || typeof object2.scriptId === "number")) && ("columnNumber" in object2 && typeof object2.columnNumber === "number") && ("lineNumber" in object2 && typeof object2.lineNumber === "number") && ("url" in object2 && typeof object2.url === "string");
}
function isRunTask(event) {
  return event.name === Name.RUN_TASK && event.ph === Phase.COMPLETE;
}
function isAuctionWorkletRunningInProcess(event) {
  return event.name === "AuctionWorkletRunningInProcess";
}
function isAuctionWorkletDoneWithProcess(event) {
  return event.name === "AuctionWorkletDoneWithProcess";
}
function isLegacyScreenshot(event) {
  return event.name === Name.SCREENSHOT && "id" in event;
}
function isLegacySyntheticScreenshot(event) {
  return event.name === Name.SCREENSHOT && "dataUri" in (event.args ?? {});
}
function isScreenshot(event) {
  return event.name === Name.SCREENSHOT && "source_id" in (event.args ?? {});
}
function isMarkerEvent(event) {
  if (event.ph === Phase.INSTANT || event.ph === Phase.MARK) {
    return markerTypeGuards.some((fn) => fn(event));
  }
  return false;
}
function eventIsPageLoadEvent(event) {
  if (event.ph === Phase.INSTANT || event.ph === Phase.MARK) {
    return pageLoadEventTypeGuards.some((fn) => fn(event));
  }
  return false;
}
function isTracingSessionIdForWorker(event) {
  return event.name === "TracingSessionIdForWorker";
}
function isScheduleStyleInvalidationTracking(event) {
  return event.name === Name.SCHEDULE_STYLE_INVALIDATION_TRACKING;
}
function isStyleRecalcInvalidationTracking(event) {
  return event.name === Name.STYLE_RECALC_INVALIDATION_TRACKING;
}
function isStyleInvalidatorInvalidationTracking(event) {
  return event.name === Name.STYLE_INVALIDATOR_INVALIDATION_TRACKING;
}
function isBeginCommitCompositorFrame(event) {
  return event.name === Name.BEGIN_COMMIT_COMPOSITOR_FRAME;
}
function isParseMetaViewport(event) {
  return event.name === Name.PARSE_META_VIEWPORT;
}
function isLinkPreconnect(event) {
  return event.name === Name.LINK_PRECONNECT;
}
function isScheduleStyleRecalculation(event) {
  return event.name === Name.SCHEDULE_STYLE_RECALCULATION;
}
function isRenderFrameImplCreateChildFrame(event) {
  return event.name === Name.RENDER_FRAME_IMPL_CREATE_CHILD_FRAME;
}
function isLayoutImageUnsized(event) {
  return event.name === Name.LAYOUT_IMAGE_UNSIZED;
}
function isPairableAsyncBegin(e) {
  return e.ph === Phase.ASYNC_NESTABLE_START;
}
function isPairableAsyncEnd(e) {
  return e.ph === Phase.ASYNC_NESTABLE_END;
}
function isPairableAsyncInstant(e) {
  return e.ph === Phase.ASYNC_NESTABLE_INSTANT;
}
function isAnimationFrameAsyncStart(data312) {
  return data312.name === Name.ANIMATION_FRAME && data312.ph === Phase.ASYNC_NESTABLE_START;
}
function isAnimationFrameAsyncEnd(data312) {
  return data312.name === Name.ANIMATION_FRAME && data312.ph === Phase.ASYNC_NESTABLE_END;
}
function isAnimationFramePresentation(data312) {
  return data312.name === Name.ANIMATION_FRAME_PRESENTATION;
}
function isPipelineReporter(event) {
  return event.name === Name.PIPELINE_REPORTER;
}
function isSyntheticBased(event) {
  return "rawSourceEvent" in event;
}
function isSyntheticInteraction(event) {
  return Boolean("interactionId" in event && event.args?.data && "beginEvent" in event.args.data && "endEvent" in event.args.data);
}
function isDrawFrame(event) {
  return event.name === Name.DRAW_FRAME && event.ph === Phase.INSTANT;
}
function isBeginFrame(event) {
  return Boolean(event.name === Name.BEGIN_FRAME && event.args && "frameSeqId" in event.args);
}
function isDroppedFrame(event) {
  return Boolean(event.name === Name.DROPPED_FRAME && event.args && "frameSeqId" in event.args);
}
function isRequestMainThreadFrame(event) {
  return event.name === Name.REQUEST_MAIN_THREAD_FRAME;
}
function isBeginMainThreadFrame(event) {
  return event.name === Name.BEGIN_MAIN_THREAD_FRAME;
}
function isNeedsBeginFrameChanged(event) {
  return event.name === Name.NEEDS_BEGIN_FRAME_CHANGED;
}
function isCommit(event) {
  return Boolean(event.name === Name.COMMIT && event.args && "frameSeqId" in event.args);
}
function isRasterTask(event) {
  return event.name === Name.RASTER_TASK;
}
function isCompositeLayers(event) {
  return event.name === Name.COMPOSITE_LAYERS;
}
function isActivateLayerTree(event) {
  return event.name === Name.ACTIVATE_LAYER_TREE;
}
function isInvalidationTracking(event) {
  return isScheduleStyleInvalidationTracking(event) || isStyleRecalcInvalidationTracking(event) || isStyleInvalidatorInvalidationTracking(event) || isLayoutInvalidationTracking(event);
}
function isDrawLazyPixelRef(event) {
  return event.name === Name.DRAW_LAZY_PIXEL_REF;
}
function isDecodeLazyPixelRef(event) {
  return event.name === Name.DECODE_LAZY_PIXEL_REF;
}
function isDecodeImage(event) {
  return event.name === Name.DECODE_IMAGE;
}
function isSelectorStats(event) {
  return event.name === Name.SELECTOR_STATS;
}
function isRecalcStyle(event) {
  return event.name === Name.RECALC_STYLE;
}
function isLayout(event) {
  return event.name === Name.LAYOUT && Boolean(event.args && "beginData" in event.args);
}
function isInvalidateLayout(event) {
  return event.name === Name.INVALIDATE_LAYOUT;
}
function isDebuggerAsyncTaskScheduled(event) {
  return event.name === Name.DEBUGGER_ASYNC_TASK_SCHEDULED;
}
function isDebuggerAsyncTaskRun(event) {
  return event.name === Name.DEBUGGER_ASYNC_TASK_RUN;
}
function ProfileID(value) {
  return value;
}
function CallFrameID(value) {
  return value;
}
function SampleIndex(value) {
  return value;
}
function ProcessID(value) {
  return value;
}
function ThreadID(value) {
  return value;
}
function WorkerId(value) {
  return value;
}
function isComplete(event) {
  return event.ph === Phase.COMPLETE;
}
function isBegin(event) {
  return event.ph === Phase.BEGIN;
}
function isEnd(event) {
  return event.ph === Phase.END;
}
function isDispatch(event) {
  return event.name === "EventDispatch" && event.ph === Phase.COMPLETE;
}
function isInstant(event) {
  return event.ph === Phase.INSTANT;
}
function isRendererEvent(event) {
  return isInstant(event) || isComplete(event);
}
function isFireIdleCallback(event) {
  return event.name === "FireIdleCallback" && event.ph === Phase.COMPLETE;
}
function isSchedulePostMessage(event) {
  return event.name === Name.SCHEDULE_POST_MESSAGE;
}
function isHandlePostMessage(event) {
  return event.name === Name.HANDLE_POST_MESSAGE && event.ph === Phase.COMPLETE;
}
function isUpdateCounters(event) {
  return event.name === "UpdateCounters";
}
function isDOMStats(event) {
  return event.name === "DOMStats";
}
function isThreadName(event) {
  return event.name === Name.THREAD_NAME;
}
function isProcessName(event) {
  return event.name === "process_name";
}
function isTracingStartedInBrowser(event) {
  return event.name === Name.TRACING_STARTED_IN_BROWSER;
}
function isFrameCommittedInBrowser(event) {
  return event.name === "FrameCommittedInBrowser";
}
function isCommitLoad(event) {
  return event.name === "CommitLoad";
}
function isAnimation(event) {
  return event.name === "Animation" && event.cat.includes("devtools.timeline");
}
function isSyntheticAnimation(event) {
  if (event.name !== "Animation" || !event.cat.includes("devtools.timeline")) {
    return false;
  }
  const data312 = event.args?.data;
  if (!data312) {
    return false;
  }
  return "beginEvent" in data312 && "endEvent" in data312;
}
function isLayoutShift(event) {
  return event.name === Name.LAYOUT_SHIFT;
}
function isLayoutInvalidationTracking(event) {
  return event.name === Name.LAYOUT_INVALIDATION_TRACKING;
}
function isFirstContentfulPaint(event) {
  return event.name === "firstContentfulPaint";
}
function isLargestContentfulPaintCandidate(event) {
  return event.name === Name.MARK_LCP_CANDIDATE;
}
function isLargestImagePaintCandidate(event) {
  return event.name === "LargestImagePaint::Candidate";
}
function isLargestTextPaintCandidate(event) {
  return event.name === "LargestTextPaint::Candidate";
}
function isMarkLoad(event) {
  return event.name === "MarkLoad";
}
function isFirstPaint(event) {
  return event.name === "firstPaint";
}
function isMarkDOMContent(event) {
  return event.name === "MarkDOMContent";
}
function isInteractiveTime(event) {
  return event.name === "InteractiveTime";
}
function isEventTiming(event) {
  return event.name === Name.EVENT_TIMING;
}
function isEventTimingEnd(event) {
  return isEventTiming(event) && event.ph === Phase.ASYNC_NESTABLE_END;
}
function isEventTimingStart(event) {
  return isEventTiming(event) && event.ph === Phase.ASYNC_NESTABLE_START;
}
function isGPUTask(event) {
  return event.name === "GPUTask";
}
function isProfile(event) {
  return event.name === Name.PROFILE;
}
function isSyntheticCpuProfile(event) {
  return event.name === Name.CPU_PROFILE && event.ph === Phase.COMPLETE;
}
function isProfileChunk(event) {
  return event.name === Name.PROFILE_CHUNK;
}
function isResourceChangePriority(event) {
  return event.name === "ResourceChangePriority";
}
function isResourceSendRequest(event) {
  return event.name === "ResourceSendRequest";
}
function isResourceReceiveResponse(event) {
  return event.name === "ResourceReceiveResponse";
}
function isResourceMarkAsCached(event) {
  return event.name === "ResourceMarkAsCached";
}
function isResourceFinish(event) {
  return event.name === "ResourceFinish";
}
function isResourceWillSendRequest(event) {
  return event.name === "ResourceWillSendRequest";
}
function isResourceReceivedData(event) {
  return event.name === "ResourceReceivedData";
}
function isReceivedDataEvent(event) {
  return event.name === "ResourceReceivedData" || event.name === "ResourceFinish" || event.name === "ResourceReceiveResponse";
}
function isSyntheticNetworkRequest(event) {
  return event.name === Name.SYNTHETIC_NETWORK_REQUEST;
}
function isSyntheticWebSocketConnection(event) {
  return event.name === "SyntheticWebSocketConnection";
}
function isNetworkTrackEntry(event) {
  return isSyntheticNetworkRequest(event) || isSyntheticWebSocketConnection(event) || isWebSocketTraceEvent(event);
}
function isPrePaint(event) {
  return event.name === "PrePaint";
}
function isNavigationStart(event) {
  return event.name === "navigationStart" && event.args?.data?.documentLoaderURL !== "";
}
function isDidCommitSameDocumentNavigation(event) {
  return event.name === "RenderFrameHostImpl::DidCommitSameDocumentNavigation" && event.ph === Phase.COMPLETE;
}
function isMainFrameViewport(event) {
  return event.name === "PaintTimingVisualizer::Viewport";
}
function isSyntheticUserTiming(event) {
  if (event.cat !== "blink.user_timing") {
    return false;
  }
  const data312 = event.args?.data;
  if (!data312) {
    return false;
  }
  return "beginEvent" in data312 && "endEvent" in data312;
}
function isSyntheticConsoleTiming(event) {
  if (event.cat !== "blink.console") {
    return false;
  }
  const data312 = event.args?.data;
  if (!data312) {
    return false;
  }
  return "beginEvent" in data312 && "endEvent" in data312;
}
function isUserTiming(event) {
  return event.cat === "blink.user_timing";
}
function isDomLoading(event) {
  return event.name === Name.DOM_LOADING;
}
function isBeginRemoteFontLoad(event) {
  return event.name === Name.BEGIN_REMOTE_FONT_LOAD;
}
function isRemoteFontLoaded(event) {
  return event.name === Name.REMOTE_FONT_LOADED;
}
function isPerformanceMeasure(event) {
  return isUserTiming(event) && isPhaseAsync(event.ph);
}
function isPerformanceMeasureBegin(event) {
  return isPerformanceMeasure(event) && event.ph === Phase.ASYNC_NESTABLE_START;
}
function isPerformanceMark(event) {
  return isUserTiming(event) && (event.ph === Phase.MARK || event.ph === Phase.INSTANT);
}
function isConsoleTime(event) {
  return event.cat === "blink.console" && isPhaseAsync(event.ph);
}
function isConsoleTimeStamp(event) {
  return event.ph === Phase.INSTANT && event.name === Name.TIME_STAMP;
}
function isUserTimingMeasure(event) {
  return event.name === Name.USER_TIMING_MEASURE;
}
function isParseHTML(event) {
  return event.name === "ParseHTML";
}
function isSyntheticLayoutShift(event) {
  return event.name === Name.SYNTHETIC_LAYOUT_SHIFT;
}
function isSyntheticLayoutShiftCluster(event) {
  return event.name === Name.SYNTHETIC_LAYOUT_SHIFT_CLUSTER;
}
function isProfileCall(event) {
  return "callFrame" in event;
}
function isPaint(event) {
  return event.name === Name.PAINT;
}
function isPaintImage(event) {
  return event.name === Name.PAINT_IMAGE && event.ph === Phase.COMPLETE;
}
function isScrollLayer(event) {
  return event.name === Name.SCROLL_LAYER && event.ph === Phase.COMPLETE;
}
function isSetLayerId(event) {
  return event.name === Name.SET_LAYER_TREE_ID;
}
function isUpdateLayer(event) {
  return event.name === Name.UPDATE_LAYER;
}
function isDisplayListItemListSnapshot(event) {
  return event.name === Name.DISPLAY_ITEM_LIST_SNAPSHOT;
}
function isLayerTreeHostImplSnapshot(event) {
  return event.name === Name.LAYER_TREE_HOST_IMPL_SNAPSHOT;
}
function isFireAnimationFrame(event) {
  return event.name === Name.FIRE_ANIMATION_FRAME && event.ph === Phase.COMPLETE;
}
function isTimerInstall(event) {
  return event.name === Name.TIMER_INSTALL;
}
function isTimerFire(event) {
  return event.name === Name.TIMER_FIRE && event.ph === Phase.COMPLETE;
}
function isRequestIdleCallback(event) {
  return event.name === Name.REQUEST_IDLE_CALLBACK;
}
function isWebSocketCreate(event) {
  return event.name === Name.WEB_SOCKET_CREATE;
}
function isWebSocketInfo(event) {
  return event.name === Name.WEB_SOCKET_SEND_HANDSHAKE_REQUEST || event.name === Name.WEB_SOCKET_RECEIVE_HANDSHAKE_REQUEST || event.name === Name.WEB_SOCKET_DESTROY;
}
function isWebSocketTransfer(event) {
  return event.name === Name.WEB_SOCKET_SEND || event.name === Name.WEB_SOCKET_RECEIVE;
}
function isWebSocketSendHandshakeRequest(event) {
  return event.name === Name.WEB_SOCKET_SEND_HANDSHAKE_REQUEST;
}
function isWebSocketReceiveHandshakeResponse(event) {
  return event.name === Name.WEB_SOCKET_RECEIVE_HANDSHAKE_REQUEST;
}
function isWebSocketDestroy(event) {
  return event.name === Name.WEB_SOCKET_DESTROY;
}
function isWebSocketTraceEvent(event) {
  return isWebSocketCreate(event) || isWebSocketInfo(event) || isWebSocketTransfer(event);
}
function isWebSocketEvent(event) {
  return isWebSocketTraceEvent(event) || isSyntheticWebSocketConnection(event);
}
function isV8Compile(event) {
  return event.name === Name.COMPILE && event.ph === Phase.COMPLETE;
}
function isFunctionCall(event) {
  return event.name === Name.FUNCTION_CALL && event.ph === Phase.COMPLETE;
}
function isSchedulePostTaskCallback(event) {
  return event.name === Name.SCHEDULE_POST_TASK_CALLBACK;
}
function isRunPostTaskCallback(event) {
  return event.name === Name.RUN_POST_TASK_CALLBACK && event.ph === Phase.COMPLETE;
}
function isAbortPostTaskCallback(event) {
  return event.name === Name.ABORT_POST_TASK_CALLBACK && event.ph === Phase.COMPLETE;
}
function isJSInvocationEvent(event) {
  switch (event.name) {
    case Name.RUN_MICROTASKS:
    case Name.FUNCTION_CALL:
    // TODO(paulirish): Define types for these Evaluate* events
    case Name.EVALUATE_SCRIPT:
    case Name.EVALUATE_MODULE:
    case Name.EVENT_DISPATCH:
    case Name.V8_EXECUTE:
    case Name.V8_CONSOLE_RUN_TASK:
      return true;
  }
  if (event.name.startsWith("v8") || event.name.startsWith("V8")) {
    return true;
  }
  if (isConsoleRunTask(event)) {
    return true;
  }
  return false;
}
function isConsoleRunTask(event) {
  return event.name === Name.V8_CONSOLE_RUN_TASK;
}
function isFlowPhaseEvent(event) {
  return event.ph === Phase.FLOW_START || event.ph === Phase.FLOW_STEP || event.ph === Phase.FLOW_END;
}
function isParseAuthorStyleSheetEvent(event) {
  return event.name === Name.PARSE_AUTHOR_STYLE_SHEET && event.ph === Phase.COMPLETE;
}
function isLegacyTimelineFrame(data312) {
  return "idle" in data312 && typeof data312.idle === "boolean";
}
function isRundownScriptCompiled(event) {
  return event.cat === "disabled-by-default-devtools.target-rundown";
}
function isRundownScript(event) {
  return event.cat === "disabled-by-default-devtools.v8-source-rundown" && event.name === "ScriptCatchup";
}
function isRundownScriptSource(event) {
  return event.cat === "disabled-by-default-devtools.v8-source-rundown-sources" && event.name === "ScriptCatchup";
}
function isRundownScriptSourceLarge(event) {
  return event.cat === "disabled-by-default-devtools.v8-source-rundown-sources" && event.name === "LargeScriptCatchup";
}
function isAnyScriptSourceEvent(event) {
  return event.cat === "disabled-by-default-devtools.v8-source-rundown-sources";
}
function getEntityForEvent(event, entityMappings32) {
  const url = getNonResolvedURL(event);
  if (!url) {
    return;
  }
  return getEntityForUrl(url, entityMappings32);
}
function getEntityForUrl(url, entityMappings32) {
  const cachedByUrl = entityMappings32.entityByUrlCache.get(url);
  if (cachedByUrl) {
    return cachedByUrl;
  }
  const entity = import_third_party_web.default.getEntity(url) ?? makeUpEntity(entityMappings32.createdEntityCache, url);
  if (entity) {
    entityMappings32.entityByUrlCache.set(url, entity);
  }
  return entity;
}
function getNonResolvedURL(entry, handlerData) {
  if (TraceEvents_exports.isProfileCall(entry)) {
    return entry.callFrame.url;
  }
  if (TraceEvents_exports.isSyntheticNetworkRequest(entry)) {
    return entry.args.data.url;
  }
  if (TraceEvents_exports.isParseAuthorStyleSheetEvent(entry) && entry.args) {
    return entry.args.data.stylesheetUrl;
  }
  if (entry.args?.data?.stackTrace && entry.args.data.stackTrace.length > 0) {
    return entry.args.data.stackTrace[0].url;
  }
  if (TraceEvents_exports.isParseHTML(entry)) {
    return entry.args.beginData.url;
  }
  if (handlerData) {
    if (TraceEvents_exports.isDecodeImage(entry)) {
      const paintEvent = handlerData.ImagePainting.paintImageForEvent.get(entry);
      return paintEvent ? getNonResolvedURL(paintEvent, handlerData) : null;
    }
    if (TraceEvents_exports.isDrawLazyPixelRef(entry) && entry.args?.LazyPixelRef) {
      const paintEvent = handlerData.ImagePainting.paintImageByDrawLazyPixelRef.get(entry.args.LazyPixelRef);
      return paintEvent ? getNonResolvedURL(paintEvent, handlerData) : null;
    }
  }
  if (entry.args?.data?.url) {
    return entry.args.data.url;
  }
  const requestId = entry.args?.data?.requestId;
  if (handlerData && requestId) {
    const url = handlerData.NetworkRequests.byId.get(requestId)?.args.data.url;
    if (url) {
      return url;
    }
  }
  return null;
}
function makeUpEntity(entityCache, url) {
  if (url.startsWith("chrome-extension:")) {
    return makeUpChromeExtensionEntity(entityCache, url);
  }
  if (!url.startsWith("http")) {
    return;
  }
  const rootDomain = import_third_party_web.default.getRootDomain(url);
  if (!rootDomain) {
    return;
  }
  if (entityCache.has(rootDomain)) {
    return entityCache.get(rootDomain);
  }
  const unrecognizedEntity = {
    name: rootDomain,
    company: rootDomain,
    category: "",
    categories: [],
    domains: [rootDomain],
    averageExecutionTime: 0,
    totalExecutionTime: 0,
    totalOccurrences: 0,
    isUnrecognized: true
  };
  entityCache.set(rootDomain, unrecognizedEntity);
  return unrecognizedEntity;
}
function getChromeExtensionOrigin(url) {
  return url.protocol + "//" + url.host;
}
function makeUpChromeExtensionEntity(entityCache, url, extensionName) {
  const parsedUrl = new URL(url);
  const origin = getChromeExtensionOrigin(parsedUrl);
  const host = new URL(origin).host;
  const name = extensionName || host;
  const cachedEntity = entityCache.get(origin);
  if (cachedEntity) {
    return cachedEntity;
  }
  const chromeExtensionEntity = {
    name,
    company: name,
    category: "Chrome Extension",
    homepage: "https://chromewebstore.google.com/detail/" + host,
    categories: [],
    domains: [origin],
    averageExecutionTime: 0,
    totalExecutionTime: 0,
    totalOccurrences: 0
  };
  entityCache.set(origin, chromeExtensionEntity);
  return chromeExtensionEntity;
}
function addEventToEntityMapping(event, entityMappings32) {
  if (entityMappings32.entityByEvent.has(event)) {
    return;
  }
  const entity = getEntityForEvent(event, entityMappings32);
  if (!entity) {
    return;
  }
  const mappedEvents = entityMappings32.eventsByEntity.get(entity);
  if (mappedEvents) {
    mappedEvents.push(event);
  } else {
    entityMappings32.eventsByEntity.set(entity, [event]);
  }
  entityMappings32.entityByEvent.set(event, entity);
}
function addNetworkRequestToEntityMapping(networkRequest, entityMappings32, requestTraceEvents) {
  const entity = getEntityForEvent(networkRequest, entityMappings32);
  if (!entity) {
    return;
  }
  const eventsToMap = [networkRequest, ...Object.values(requestTraceEvents).flat()];
  const mappedEvents = entityMappings32.eventsByEntity.get(entity);
  if (mappedEvents) {
    mappedEvents.push(...eventsToMap);
  } else {
    entityMappings32.eventsByEntity.set(entity, eventsToMap);
  }
  for (const evt of eventsToMap) {
    entityMappings32.entityByEvent.set(evt, entity);
  }
}
function swap(array2, i1, i2) {
  const temp = array2[i1];
  array2[i1] = array2[i2];
  array2[i2] = temp;
}
function partition(array2, comparator2, left2, right2, pivotIndex) {
  const pivotValue = array2[pivotIndex];
  swap(array2, right2, pivotIndex);
  let storeIndex = left2;
  for (let i = left2; i < right2; ++i) {
    if (comparator2(array2[i], pivotValue) < 0) {
      swap(array2, storeIndex, i);
      ++storeIndex;
    }
  }
  swap(array2, right2, storeIndex);
  return storeIndex;
}
function quickSortRange(array2, comparator2, left2, right2, sortWindowLeft, sortWindowRight) {
  if (right2 <= left2) {
    return;
  }
  const pivotIndex = Math.floor(Math.random() * (right2 - left2)) + left2;
  const pivotNewIndex = partition(array2, comparator2, left2, right2, pivotIndex);
  if (sortWindowLeft < pivotNewIndex) {
    quickSortRange(array2, comparator2, left2, pivotNewIndex - 1, sortWindowLeft, sortWindowRight);
  }
  if (pivotNewIndex < sortWindowRight) {
    quickSortRange(array2, comparator2, pivotNewIndex + 1, right2, sortWindowLeft, sortWindowRight);
  }
}
function sortRange(array2, comparator2, leftBound, rightBound, sortWindowLeft, sortWindowRight) {
  if (leftBound === 0 && rightBound === array2.length - 1 && sortWindowLeft === 0 && sortWindowRight >= rightBound) {
    array2.sort(comparator2);
  } else {
    quickSortRange(array2, comparator2, leftBound, rightBound, sortWindowLeft, sortWindowRight);
  }
  return array2;
}
function mergeOrIntersect(array1, array2, comparator2, mergeNotIntersect) {
  const result = [];
  let i = 0;
  let j = 0;
  while (i < array1.length && j < array2.length) {
    const compareValue = comparator2(array1[i], array2[j]);
    if (mergeNotIntersect || !compareValue) {
      result.push(compareValue <= 0 ? array1[i] : array2[j]);
    }
    if (compareValue <= 0) {
      i++;
    }
    if (compareValue >= 0) {
      j++;
    }
  }
  if (mergeNotIntersect) {
    while (i < array1.length) {
      result.push(array1[i++]);
    }
    while (j < array2.length) {
      result.push(array2[j++]);
    }
  }
  return result;
}
function lowerBound(array2, needle, comparator2, left2, right2) {
  let l = left2 || 0;
  let r = right2 !== void 0 ? right2 : array2.length;
  while (l < r) {
    const m = l + r >> 1;
    if (comparator2(needle, array2[m]) > 0) {
      l = m + 1;
    } else {
      r = m;
    }
  }
  return r;
}
function upperBound(array2, needle, comparator2, left2, right2) {
  let l = left2 || 0;
  let r = right2 !== void 0 ? right2 : array2.length;
  while (l < r) {
    const m = l + r >> 1;
    if (comparator2(needle, array2[m]) >= 0) {
      l = m + 1;
    } else {
      r = m;
    }
  }
  return r;
}
function nearestIndex(arr, predicate, searchStart) {
  const searchFromEnd = searchStart === "END";
  if (arr.length === 0) {
    return null;
  }
  let left2 = 0;
  let right2 = arr.length - 1;
  let pivot = 0;
  let matchesPredicate = false;
  let moveToTheRight = false;
  let middle = 0;
  do {
    middle = left2 + (right2 - left2) / 2;
    pivot = searchFromEnd ? Math.ceil(middle) : Math.floor(middle);
    matchesPredicate = predicate(arr[pivot]);
    moveToTheRight = matchesPredicate === searchFromEnd;
    if (moveToTheRight) {
      left2 = Math.min(right2, pivot + (left2 === pivot ? 1 : 0));
    } else {
      right2 = Math.max(left2, pivot + (right2 === pivot ? -1 : 0));
    }
  } while (right2 !== left2);
  if (!predicate(arr[left2])) {
    return null;
  }
  return left2;
}
function nearestIndexFromBeginning(arr, predicate) {
  return nearestIndex(
    arr,
    predicate,
    "BEGINNING"
    /* NearestSearchStart.BEGINNING */
  );
}
function nearestIndexFromEnd(arr, predicate) {
  return nearestIndex(
    arr,
    predicate,
    "END"
    /* NearestSearchStart.END */
  );
}
function arrayDoesNotContainNullOrUndefined(arr) {
  return !arr.includes(null) && !arr.includes(void 0);
}
function getWithDefault(map2, key, defaultValueFactory) {
  let value = map2.get(key);
  if (value === void 0 || value === null) {
    value = defaultValueFactory(key);
    map2.set(key, value);
  }
  return value;
}
function assertNotNullOrUndefined(val, message) {
  if (val === null || val === void 0) {
    throw new Error(`Expected given value to not be null/undefined but it was: ${val}${message ? `
${message}` : ""}`);
  }
}
function assertNever(_type, message) {
  throw new Error(message);
}
function assertUnhandled(_caseVariable) {
  return _caseVariable;
}
function timeStampForEventAdjustedByClosestNavigation(event, traceBounds22, navigationsByNavigationId22, navigationsByFrameId22) {
  let eventTimeStamp = event.ts - traceBounds22.min;
  if (event.args?.data?.navigationId) {
    const navigationForEvent = navigationsByNavigationId22.get(event.args.data.navigationId);
    if (navigationForEvent) {
      eventTimeStamp = event.ts - navigationForEvent.ts;
    }
  } else if (event.args?.data?.frame) {
    const navigationForEvent = getNavigationForTraceEvent(event, event.args.data.frame, navigationsByFrameId22);
    if (navigationForEvent) {
      eventTimeStamp = event.ts - navigationForEvent.ts;
    }
  }
  return Timing_exports.Micro(eventTimeStamp);
}
function expandWindowByPercentOrToOneMillisecond(annotationWindow, maxTraceWindow, percentage) {
  let newMin = annotationWindow.min - annotationWindow.range * (percentage / 100) / 2;
  let newMax = annotationWindow.max + annotationWindow.range * (percentage / 100) / 2;
  if (newMax - newMin < 1e3) {
    const rangeMiddle = (annotationWindow.min + annotationWindow.max) / 2;
    newMin = rangeMiddle - 500;
    newMax = rangeMiddle + 500;
  }
  newMin = Math.max(newMin, maxTraceWindow.min);
  newMax = Math.min(newMax, maxTraceWindow.max);
  const expandedWindow = {
    min: Timing_exports.Micro(newMin),
    max: Timing_exports.Micro(newMax),
    range: Timing_exports.Micro(newMax - newMin)
  };
  return expandedWindow;
}
function eventTimingsMicroSeconds(event) {
  return {
    startTime: event.ts,
    endTime: event.ts + (event.dur ?? 0),
    duration: event.dur || 0
  };
}
function eventTimingsMilliSeconds(event) {
  return {
    startTime: event.ts / 1e3,
    endTime: (event.ts + (event.dur ?? 0)) / 1e3,
    duration: (event.dur || 0) / 1e3
  };
}
function traceWindowMilliSeconds(bounds) {
  return {
    min: microToMilli(bounds.min),
    max: microToMilli(bounds.max),
    range: microToMilli(bounds.range)
  };
}
function traceWindowMicroSecondsToMilliSeconds(bounds) {
  return {
    min: microToMilli(bounds.min),
    max: microToMilli(bounds.max),
    range: microToMilli(bounds.range)
  };
}
function traceWindowFromMilliSeconds(min, max) {
  const traceWindow = {
    min: milliToMicro(min),
    max: milliToMicro(max),
    range: Timing_exports.Micro(milliToMicro(max) - milliToMicro(min))
  };
  return traceWindow;
}
function traceWindowFromMicroSeconds(min, max) {
  const traceWindow = {
    min,
    max,
    range: max - min
  };
  return traceWindow;
}
function traceWindowFromEvent(event) {
  return {
    min: event.ts,
    max: event.ts + (event.dur ?? 0),
    range: event.dur ?? 0
  };
}
function traceWindowFromOverlay(overlay) {
  switch (overlay.type) {
    case "ENTRY_LABEL":
    case "ENTRY_OUTLINE":
    case "ENTRY_SELECTED": {
      return traceWindowFromEvent(overlay.entry);
    }
    case "TIMESPAN_BREAKDOWN": {
      const windows2 = overlay.sections.map((s) => s.bounds);
      if (overlay.entry) {
        windows2.push(traceWindowFromEvent(overlay.entry));
      }
      return combineTraceWindowsMicro(windows2);
    }
    case "CANDY_STRIPED_TIME_RANGE":
    case "TIME_RANGE": {
      return structuredClone(overlay.bounds);
    }
    case "ENTRIES_LINK": {
      const from2 = traceWindowFromEvent(overlay.entryFrom);
      if (!overlay.entryTo) {
        return from2;
      }
      const to = traceWindowFromEvent(overlay.entryTo);
      return combineTraceWindowsMicro([from2, to]);
    }
    case "TIMESTAMP_MARKER":
      return traceWindowFromMicroSeconds(overlay.timestamp, overlay.timestamp);
    case "TIMINGS_MARKER":
      return traceWindowFromMicroSeconds(overlay.adjustedTimestamp, overlay.adjustedTimestamp);
    case "BOTTOM_INFO_BAR":
      return null;
    default:
      TypescriptUtilities_exports.assertNever(overlay, `Unexpected overlay ${overlay}`);
  }
}
function combineTraceWindowsMicro(windows2) {
  if (!windows2.length) {
    return null;
  }
  const result = structuredClone(windows2[0]);
  for (const bounds of windows2.slice(1)) {
    result.min = Math.min(result.min, bounds.min);
    result.max = Math.max(result.max, bounds.max);
  }
  result.range = result.max - result.min;
  return result;
}
function boundsIncludeTimeRange(data312) {
  const { min: visibleMin, max: visibleMax } = data312.bounds;
  const { min: rangeMin, max: rangeMax } = data312.timeRange;
  return visibleMin <= rangeMax && visibleMax >= rangeMin;
}
function eventIsInBounds(event, bounds) {
  const startTime = event.ts;
  return startTime <= bounds.max && bounds.min < startTime + (event.dur ?? 0);
}
function timestampIsInBounds(bounds, timestamp) {
  return timestamp >= bounds.min && timestamp <= bounds.max;
}
function windowFitsInsideBounds(data312) {
  return data312.window.min >= data312.bounds.min && data312.window.max <= data312.bounds.max;
}
function windowsEqual(w1, w2) {
  return w1.min === w2.min && w1.max === w2.max;
}
function stackTraceInEvent(event) {
  if (event.args?.data?.stackTrace) {
    return event.args.data.stackTrace;
  }
  if (event.args?.stackTrace) {
    return event.args.stackTrace;
  }
  if (TraceEvents_exports.isRecalcStyle(event)) {
    return event.args.beginData?.stackTrace || null;
  }
  if (TraceEvents_exports.isLayout(event)) {
    return event.args.beginData.stackTrace ?? null;
  }
  if (TraceEvents_exports.isFunctionCall(event)) {
    const data312 = event.args.data;
    if (!data312) {
      return null;
    }
    const { columnNumber, lineNumber, url, scriptId, functionName: functionName2 } = data312;
    if (lineNumber === void 0 || functionName2 === void 0 || columnNumber === void 0 || scriptId === void 0 || url === void 0) {
      return null;
    }
    return [{ columnNumber, lineNumber, url, scriptId, functionName: functionName2 }];
  }
  if (TraceEvents_exports.isProfileCall(event)) {
    const callFrame = event.callFrame;
    if (!callFrame) {
      return null;
    }
    const { columnNumber, lineNumber, url, scriptId, functionName: functionName2 } = callFrame;
    if (lineNumber === void 0 || functionName2 === void 0 || columnNumber === void 0 || scriptId === void 0 || url === void 0) {
      return null;
    }
    return [{ columnNumber, lineNumber, url, scriptId, functionName: functionName2 }];
  }
  return null;
}
function extractOriginFromTrace(firstNavigationURL) {
  const url = new URL(firstNavigationURL);
  if (url) {
    if (url.host.startsWith("www.")) {
      return url.host.slice(4);
    }
    return url.host;
  }
  return null;
}
function addEventToProcessThread(event, eventsInProcessThread22) {
  const { tid, pid } = event;
  let eventsInThread = eventsInProcessThread22.get(pid);
  if (!eventsInThread) {
    eventsInThread = /* @__PURE__ */ new Map();
  }
  let events = eventsInThread.get(tid);
  if (!events) {
    events = [];
  }
  events.push(event);
  eventsInThread.set(event.tid, events);
  eventsInProcessThread22.set(event.pid, eventsInThread);
}
function compareBeginAndEnd(aBeginTime, bBeginTime, aEndTime, bEndTime) {
  if (aBeginTime < bBeginTime) {
    return -1;
  }
  if (aBeginTime > bBeginTime) {
    return 1;
  }
  if (aEndTime > bEndTime) {
    return -1;
  }
  if (aEndTime < bEndTime) {
    return 1;
  }
  return 0;
}
function eventTimeComparator(a, b) {
  const aBeginTime = a.ts;
  const bBeginTime = b.ts;
  const aDuration = a.dur ?? 0;
  const bDuration = b.dur ?? 0;
  const aEndTime = aBeginTime + aDuration;
  const bEndTime = bBeginTime + bDuration;
  const timeDifference = compareBeginAndEnd(aBeginTime, bBeginTime, aEndTime, bEndTime);
  if (timeDifference) {
    return timeDifference;
  }
  if (TraceEvents_exports.isProfileCall(a) && !TraceEvents_exports.isProfileCall(b)) {
    return -1;
  }
  if (TraceEvents_exports.isProfileCall(b) && !TraceEvents_exports.isProfileCall(a)) {
    return 1;
  }
  return 0;
}
function sortTraceEventsInPlace(events) {
  events.sort(eventTimeComparator);
}
function mergeEventsInOrder(eventsArray1, eventsArray2) {
  const result = [];
  let i = 0;
  let j = 0;
  while (i < eventsArray1.length && j < eventsArray2.length) {
    const event1 = eventsArray1[i];
    const event2 = eventsArray2[j];
    const compareValue = eventTimeComparator(event1, event2);
    if (compareValue <= 0) {
      result.push(event1);
      i++;
    }
    if (compareValue === 1) {
      result.push(event2);
      j++;
    }
  }
  while (i < eventsArray1.length) {
    result.push(eventsArray1[i++]);
  }
  while (j < eventsArray2.length) {
    result.push(eventsArray2[j++]);
  }
  return result;
}
function parseDevtoolsDetails(timingDetail, key) {
  try {
    const detailObj = JSON.parse(timingDetail);
    if (!(key in detailObj)) {
      return null;
    }
    if (!Extensions_exports.isValidExtensionPayload(detailObj[key])) {
      return null;
    }
    return detailObj[key];
  } catch {
    return null;
  }
}
function getNavigationForTraceEvent(event, eventFrameId, navigationsByFrameId22) {
  const navigations = navigationsByFrameId22.get(eventFrameId);
  if (!navigations || eventFrameId === "") {
    return null;
  }
  const eventNavigationIndex = ArrayUtilities_exports.nearestIndexFromEnd(navigations, (navigation2) => navigation2.ts <= event.ts);
  if (eventNavigationIndex === null) {
    return null;
  }
  return navigations[eventNavigationIndex];
}
function extractId(event) {
  return event.id ?? event.id2?.global ?? event.id2?.local;
}
function activeURLForFrameAtTime(frameId, time2, rendererProcessesByFrame) {
  const processData = rendererProcessesByFrame.get(frameId);
  if (!processData) {
    return null;
  }
  for (const processes22 of processData.values()) {
    for (const processInfo of processes22) {
      if (processInfo.window.min > time2 || processInfo.window.max < time2) {
        continue;
      }
      return processInfo.frame.url;
    }
  }
  return null;
}
function makeProfileCall(node2, profileId, sampleIndex, ts, pid, tid) {
  return {
    cat: "",
    name: "ProfileCall",
    nodeId: node2.id,
    args: {},
    ph: TraceEvents_exports.Phase.COMPLETE,
    pid,
    tid,
    ts,
    dur: Timing_exports.Micro(0),
    callFrame: node2.callFrame,
    sampleIndex,
    profileId
  };
}
function matchEvents(unpairedEvents) {
  sortTraceEventsInPlace(unpairedEvents);
  const matches = [];
  const beginEventsById = /* @__PURE__ */ new Map();
  const instantEventsById = /* @__PURE__ */ new Map();
  for (const event of unpairedEvents) {
    const id2 = getSyntheticId(event);
    if (id2 === void 0) {
      continue;
    }
    if (TraceEvents_exports.isPairableAsyncBegin(event)) {
      const existingEvents = beginEventsById.get(id2) ?? [];
      existingEvents.push(event);
      beginEventsById.set(id2, existingEvents);
    } else if (TraceEvents_exports.isPairableAsyncInstant(event)) {
      const existingEvents = instantEventsById.get(id2) ?? [];
      existingEvents.push(event);
      instantEventsById.set(id2, existingEvents);
    } else if (TraceEvents_exports.isPairableAsyncEnd(event)) {
      const beginEventsWithMatchingId = beginEventsById.get(id2) ?? [];
      const beginEvent = beginEventsWithMatchingId.pop();
      if (!beginEvent) {
        continue;
      }
      const instantEventsWithMatchingId = instantEventsById.get(id2) ?? [];
      const instantEventsForThisGroup = [];
      while (instantEventsWithMatchingId.length > 0) {
        if (instantEventsWithMatchingId[0].ts >= beginEvent.ts) {
          const event2 = instantEventsWithMatchingId.pop();
          if (event2) {
            instantEventsForThisGroup.push(event2);
          }
        } else {
          break;
        }
      }
      const matchingGroup = {
        begin: beginEvent,
        end: event,
        instant: instantEventsForThisGroup,
        syntheticId: id2
      };
      matches.push(matchingGroup);
    }
  }
  for (const [id2, beginEvents] of beginEventsById) {
    const beginEvent = beginEvents.pop();
    if (!beginEvent) {
      continue;
    }
    const matchingInstantEvents = instantEventsById.get(id2);
    if (matchingInstantEvents?.length) {
      matches.push({
        syntheticId: id2,
        begin: beginEvent,
        end: null,
        instant: matchingInstantEvents
      });
    }
  }
  return matches;
}
function getSyntheticId(event) {
  const id2 = extractId(event);
  return id2 && `${event.cat}:${id2}:${event.name}`;
}
function createSortedSyntheticEvents(matchedPairs) {
  const syntheticEvents22 = [];
  for (const eventsTriplet of matchedPairs) {
    let eventsArePairable = function(data312) {
      const instantEventsMatch = data312.instantEvents ? data312.instantEvents.some((e) => id2 === getSyntheticId(e)) : false;
      const endEventMatch = data312.endEvent ? id2 === getSyntheticId(data312.endEvent) : false;
      return Boolean(id2) && (instantEventsMatch || endEventMatch);
    };
    __name(eventsArePairable, "eventsArePairable");
    const id2 = eventsTriplet.syntheticId;
    const beginEvent = eventsTriplet.begin;
    const endEvent = eventsTriplet.end;
    const instantEvents = eventsTriplet.instant;
    if (!beginEvent || !(endEvent || instantEvents)) {
      continue;
    }
    const triplet = { beginEvent, endEvent, instantEvents };
    if (!eventsArePairable(triplet)) {
      continue;
    }
    const targetEvent = endEvent || beginEvent;
    const event = SyntheticEventsManager.registerSyntheticEvent({
      rawSourceEvent: triplet.beginEvent,
      cat: targetEvent.cat,
      ph: targetEvent.ph,
      pid: targetEvent.pid,
      tid: targetEvent.tid,
      id: id2,
      // Both events have the same name, so it doesn't matter which we pick to
      // use as the description
      name: beginEvent.name,
      dur: Timing_exports.Micro(targetEvent.ts - beginEvent.ts),
      ts: beginEvent.ts,
      args: {
        data: triplet
      }
    });
    if (event.dur < 0) {
      continue;
    }
    syntheticEvents22.push(event);
  }
  sortTraceEventsInPlace(syntheticEvents22);
  return syntheticEvents22;
}
function createMatchedSortedSyntheticEvents(unpairedAsyncEvents22) {
  const matchedPairs = matchEvents(unpairedAsyncEvents22);
  const syntheticEvents22 = createSortedSyntheticEvents(matchedPairs);
  return syntheticEvents22;
}
function getZeroIndexedLineAndColumnForEvent(event) {
  const numbers = getRawLineAndColumnNumbersForEvent(event);
  const { lineNumber, columnNumber } = numbers;
  switch (event.name) {
    // All these events have line/column numbers which are 1 indexed; so we
    // subtract to make them 0 indexed.
    case TraceEvents_exports.Name.FUNCTION_CALL:
    case TraceEvents_exports.Name.EVALUATE_SCRIPT:
    case TraceEvents_exports.Name.COMPILE:
    case TraceEvents_exports.Name.CACHE_SCRIPT: {
      return {
        lineNumber: typeof lineNumber === "number" ? lineNumber - 1 : void 0,
        columnNumber: typeof columnNumber === "number" ? columnNumber - 1 : void 0
      };
    }
    case TraceEvents_exports.Name.PROFILE_CALL: {
      const callFrame = event.callFrame;
      return {
        lineNumber: typeof lineNumber === "number" ? callFrame.lineNumber - 1 : void 0,
        columnNumber: typeof columnNumber === "number" ? callFrame.columnNumber - 1 : void 0
      };
    }
    default: {
      return numbers;
    }
  }
}
function getZeroIndexedStackTraceInEventPayload(event) {
  const stack = stackTraceInEvent(event);
  if (!stack) {
    return null;
  }
  switch (event.name) {
    case TraceEvents_exports.Name.SCHEDULE_STYLE_RECALCULATION:
    case TraceEvents_exports.Name.INVALIDATE_LAYOUT:
    case TraceEvents_exports.Name.FUNCTION_CALL:
    case TraceEvents_exports.Name.LAYOUT:
    case TraceEvents_exports.Name.RECALC_STYLE: {
      return stack.map(makeZeroBasedCallFrame);
    }
    default: {
      if (TraceEvents_exports.isUserTiming(event) || Extensions_exports.isSyntheticExtensionEntry(event)) {
        return stack.map(makeZeroBasedCallFrame);
      }
      return stack;
    }
  }
}
function getStackTraceTopCallFrameInEventPayload(event) {
  const stack = stackTraceInEvent(event);
  if (!stack || stack.length === 0) {
    return null;
  }
  switch (event.name) {
    case TraceEvents_exports.Name.SCHEDULE_STYLE_RECALCULATION:
    case TraceEvents_exports.Name.INVALIDATE_LAYOUT:
    case TraceEvents_exports.Name.FUNCTION_CALL:
    case TraceEvents_exports.Name.LAYOUT:
    case TraceEvents_exports.Name.RECALC_STYLE: {
      return makeZeroBasedCallFrame(stack[0]);
    }
    default: {
      if (TraceEvents_exports.isUserTiming(event) || Extensions_exports.isSyntheticExtensionEntry(event)) {
        return makeZeroBasedCallFrame(stack[0]);
      }
      return stack[0];
    }
  }
}
function makeZeroBasedCallFrame(callFrame) {
  const normalizedCallFrame = { ...callFrame };
  normalizedCallFrame.lineNumber = callFrame.lineNumber && callFrame.lineNumber - 1;
  normalizedCallFrame.columnNumber = callFrame.columnNumber && callFrame.columnNumber - 1;
  return normalizedCallFrame;
}
function getRawLineAndColumnNumbersForEvent(event) {
  if (!event.args?.data) {
    return {
      lineNumber: void 0,
      columnNumber: void 0
    };
  }
  let lineNumber = void 0;
  let columnNumber = void 0;
  if ("lineNumber" in event.args.data && typeof event.args.data.lineNumber === "number") {
    lineNumber = event.args.data.lineNumber;
  }
  if ("columnNumber" in event.args.data && typeof event.args.data.columnNumber === "number") {
    columnNumber = event.args.data.columnNumber;
  }
  return { lineNumber, columnNumber };
}
function frameIDForEvent(event) {
  if (event.args && "beginData" in event.args && typeof event.args.beginData === "object" && event.args.beginData !== null && "frame" in event.args.beginData && typeof event.args.beginData.frame === "string") {
    return event.args.beginData.frame;
  }
  if (event.args?.data?.frame) {
    return event.args.data.frame;
  }
  return null;
}
function isTopLevelEvent(event) {
  return event.cat.includes(DevToolsTimelineEventCategory) && event.name === TraceEvents_exports.Name.RUN_TASK;
}
function isExtensionUrl(url) {
  return url.startsWith("extensions:") || url.startsWith("chrome-extension:");
}
function topLevelEventIndexEndingAfter(events, time2) {
  let index2 = ArrayUtilities_exports.upperBound(events, time2, (time22, event) => time22 - event.ts) - 1;
  while (index2 > 0 && !isTopLevelEvent(events[index2])) {
    index2--;
  }
  return Math.max(index2, 0);
}
function findRecalcStyleEvents(events, startTime, endTime) {
  const foundEvents = [];
  const startEventIndex = topLevelEventIndexEndingAfter(events, startTime);
  for (let i = startEventIndex; i < events.length; i++) {
    const event = events[i];
    if (!TraceEvents_exports.isRecalcStyle(event)) {
      continue;
    }
    if (event.ts >= (endTime || Infinity)) {
      continue;
    }
    foundEvents.push(event);
  }
  return foundEvents;
}
function findNextEventAfterTimestamp(candidates, ts) {
  const index2 = ArrayUtilities_exports.nearestIndexFromBeginning(candidates, (candidate) => ts < candidate.ts);
  return index2 === null ? null : candidates[index2];
}
function findPreviousEventBeforeTimestamp(candidates, ts) {
  const index2 = ArrayUtilities_exports.nearestIndexFromEnd(candidates, (candidate) => candidate.ts < ts);
  return index2 === null ? null : candidates[index2];
}
function forEachEvent(events, config32) {
  const globalStartTime = config32.startTime ?? Timing_exports.Micro(0);
  const globalEndTime = config32.endTime || Timing_exports.Micro(Infinity);
  const ignoreAsyncEvents = config32.ignoreAsyncEvents === false ? false : true;
  const stack = [];
  const startEventIndex = topLevelEventIndexEndingAfter(events, globalStartTime);
  for (let i = startEventIndex; i < events.length; i++) {
    const currentEvent = events[i];
    const currentEventTimings = eventTimingsMicroSeconds(currentEvent);
    if (currentEventTimings.endTime < globalStartTime) {
      continue;
    }
    if (currentEventTimings.startTime > globalEndTime) {
      break;
    }
    const isIgnoredAsyncEvent = ignoreAsyncEvents && TraceEvents_exports.isPhaseAsync(currentEvent.ph);
    if (isIgnoredAsyncEvent || TraceEvents_exports.isFlowPhase(currentEvent.ph)) {
      continue;
    }
    let lastEventOnStack = stack.at(-1);
    let lastEventEndTime = lastEventOnStack ? eventTimingsMicroSeconds(lastEventOnStack).endTime : null;
    while (lastEventOnStack && lastEventEndTime && lastEventEndTime <= currentEventTimings.startTime) {
      stack.pop();
      config32.onEndEvent(lastEventOnStack);
      lastEventOnStack = stack.at(-1);
      lastEventEndTime = lastEventOnStack ? eventTimingsMicroSeconds(lastEventOnStack).endTime : null;
    }
    if (config32.eventFilter && !config32.eventFilter(currentEvent)) {
      continue;
    }
    if (currentEventTimings.duration) {
      config32.onStartEvent(currentEvent);
      stack.push(currentEvent);
    } else if (config32.onInstantEvent) {
      config32.onInstantEvent(currentEvent);
    }
  }
  while (stack.length) {
    const last2 = stack.pop();
    if (last2) {
      config32.onEndEvent(last2);
    }
  }
}
function eventHasCategory(event, category) {
  let parsedCategoriesForEvent = parsedCategories.get(event.cat);
  if (!parsedCategoriesForEvent) {
    parsedCategoriesForEvent = new Set(event.cat.split(",") || []);
  }
  return parsedCategoriesForEvent.has(category);
}
function isMatchingCallFrame(eventFrame, nodeFrame) {
  return eventFrame.columnNumber === nodeFrame.columnNumber && eventFrame.lineNumber === nodeFrame.lineNumber && String(eventFrame.scriptId) === nodeFrame.scriptId && eventFrame.url === nodeFrame.url && eventFrame.functionName === nodeFrame.functionName;
}
function eventContainsTimestamp(event, ts) {
  return event.ts <= ts && event.ts + (event.dur || 0) >= ts;
}
function extractSampleTraceId(event) {
  if (!event.args) {
    return null;
  }
  if ("beginData" in event.args) {
    const beginData = event.args["beginData"];
    return beginData.sampleTraceId ?? null;
  }
  return event.args?.sampleTraceId ?? event.args?.data?.sampleTraceId ?? null;
}
function treify(entries, options2) {
  const entryToNode42 = /* @__PURE__ */ new Map();
  const stack = [];
  nodeIdCount = -1;
  const tree = makeEmptyTraceEntryTree();
  for (let i = 0; i < entries.length; i++) {
    const event = entries[i];
    if (options2 && !options2.filter.has(event.name)) {
      continue;
    }
    const duration2 = event.dur || 0;
    const nodeId = makeTraceEntryNodeId();
    const node2 = makeEmptyTraceEntryNode(event, nodeId);
    if (stack.length === 0) {
      tree.roots.add(node2);
      node2.selfTime = Timing_exports.Micro(duration2);
      stack.push(node2);
      tree.maxDepth = Math.max(tree.maxDepth, stack.length);
      entryToNode42.set(event, node2);
      continue;
    }
    const parentNode = stack.at(-1);
    if (parentNode === void 0) {
      throw new Error("Impossible: no parent node found in the stack");
    }
    const parentEvent = parentNode.entry;
    const begin = event.ts;
    const parentBegin = parentEvent.ts;
    const parentDuration = parentEvent.dur || 0;
    const end = begin + duration2;
    const parentEnd = parentBegin + parentDuration;
    const startsBeforeParent = begin < parentBegin;
    if (startsBeforeParent) {
      throw new Error("Impossible: current event starts before the parent event");
    }
    const startsAfterParent = begin >= parentEnd;
    if (startsAfterParent) {
      stack.pop();
      i--;
      nodeIdCount--;
      continue;
    }
    const endsAfterParent = end > parentEnd;
    if (endsAfterParent) {
      continue;
    }
    node2.depth = stack.length;
    node2.parent = parentNode;
    parentNode.children.push(node2);
    node2.selfTime = Timing_exports.Micro(duration2);
    if (parentNode.selfTime !== void 0) {
      parentNode.selfTime = Timing_exports.Micro(parentNode.selfTime - (event.dur || 0));
    }
    stack.push(node2);
    tree.maxDepth = Math.max(tree.maxDepth, stack.length);
    entryToNode42.set(event, node2);
  }
  return { tree, entryToNode: entryToNode42 };
}
function walkTreeFromEntry(entryToNode42, rootEntry, onEntryStart, onEntryEnd) {
  const startNode = entryToNode42.get(rootEntry);
  if (!startNode) {
    return;
  }
  walkTreeByNode(entryToNode42, startNode, onEntryStart, onEntryEnd);
}
function walkEntireTree(entryToNode42, tree, onEntryStart, onEntryEnd, traceWindowToInclude, minDuration) {
  for (const rootNode of tree.roots) {
    walkTreeByNode(entryToNode42, rootNode, onEntryStart, onEntryEnd, traceWindowToInclude, minDuration);
  }
}
function walkTreeByNode(entryToNode42, rootNode, onEntryStart, onEntryEnd, traceWindowToInclude, minDuration) {
  if (traceWindowToInclude && !treeNodeIsInWindow(rootNode, traceWindowToInclude)) {
    return;
  }
  if (typeof minDuration !== "undefined") {
    const duration2 = Timing_exports.Micro(rootNode.entry.ts + Timing_exports.Micro(rootNode.entry.dur ?? 0));
    if (duration2 < minDuration) {
      return;
    }
  }
  onEntryStart(rootNode.entry);
  for (const child of rootNode.children) {
    walkTreeByNode(entryToNode42, child, onEntryStart, onEntryEnd, traceWindowToInclude, minDuration);
  }
  onEntryEnd(rootNode.entry);
}
function treeNodeIsInWindow(node2, traceWindow) {
  return eventIsInBounds(node2.entry, traceWindow);
}
function canBuildTreesFromEvents(events) {
  const stack = [];
  for (const event of events) {
    const startTime = event.ts;
    const endTime = event.ts + (event.dur ?? 0);
    let parent = stack.at(-1);
    if (parent === void 0) {
      stack.push(event);
      continue;
    }
    let parentEndTime = parent.ts + (parent.dur ?? 0);
    while (stack.length && startTime >= parentEndTime) {
      stack.pop();
      parent = stack.at(-1);
      if (parent === void 0) {
        break;
      }
      parentEndTime = parent.ts + (parent.dur ?? 0);
    }
    if (stack.length && endTime > parentEndTime) {
      return false;
    }
    stack.push(event);
  }
  return true;
}
function buildTrackDataFromExtensionEntries(extensionEntries, extensionTrackData22, entryToNode42) {
  const dataByTrack = /* @__PURE__ */ new Map();
  for (const entry of extensionEntries) {
    const key = entry.devtoolsObj.trackGroup || `track-name-${entry.devtoolsObj.track}`;
    const batchedData = MapUtilities_exports.getWithDefault(dataByTrack, key, () => ({
      name: entry.devtoolsObj.trackGroup || entry.devtoolsObj.track,
      isTrackGroup: Boolean(entry.devtoolsObj.trackGroup),
      entriesByTrack: { [entry.devtoolsObj.track]: [] }
    }));
    if (!batchedData.entriesByTrack[entry.devtoolsObj.track]) {
      batchedData.entriesByTrack[entry.devtoolsObj.track] = [];
    }
    const entriesInTrack = batchedData.entriesByTrack[entry.devtoolsObj.track];
    entriesInTrack.push(entry);
  }
  for (const trackData of dataByTrack.values()) {
    for (const entries of Object.values(trackData.entriesByTrack)) {
      sortTraceEventsInPlace(entries);
      if (canBuildTreesFromEvents(entries)) {
        for (const [entry, node2] of treify(entries).entryToNode) {
          entryToNode42.set(entry, node2);
        }
      }
    }
    extensionTrackData22.push(trackData);
  }
  return { extensionTrackData: extensionTrackData22, entryToNode: entryToNode42 };
}
function isSyntheticNetworkRequestEventRenderBlocking(event) {
  return !NON_RENDER_BLOCKING_VALUES.has(event.args.data.renderBlocking);
}
function isSyntheticNetworkRequestHighPriority(event) {
  return HIGH_NETWORK_PRIORITIES.has(event.args.data.priority);
}
function parseCacheControl(header) {
  if (!header) {
    return null;
  }
  const directives = header.split(",").map((directive) => directive.trim());
  const cacheControlOptions = {};
  for (const directive of directives) {
    const [key, value] = directive.split("=").map((part) => part.trim());
    switch (key) {
      case "max-age": {
        const maxAge = parseInt(value, 10);
        if (!isNaN(maxAge)) {
          cacheControlOptions["max-age"] = maxAge;
        }
        break;
      }
      case "no-cache":
        cacheControlOptions["no-cache"] = true;
        break;
      case "no-store":
        cacheControlOptions["no-store"] = true;
        break;
      case "must-revalidate":
        cacheControlOptions["must-revalidate"] = true;
        break;
      case "private":
        cacheControlOptions["private"] = true;
        break;
      default:
        break;
    }
  }
  return cacheControlOptions;
}
function isSyntheticNetworkRequestLocalhost(event) {
  try {
    const hostname2 = new URL(event.args.data.url).hostname;
    return SECURE_LOCALHOST_DOMAINS.includes(hostname2) || hostname2.endsWith(".localhost");
  } catch {
    return false;
  }
}
function threadKey(data312) {
  return `${data312.pid}-${data312.tid}`;
}
function reset() {
  animationFrameStarts = /* @__PURE__ */ new Map();
  animationFrameEnds = /* @__PURE__ */ new Map();
  animationFrames = [];
  presentationForFrame = /* @__PURE__ */ new Map();
  animationFramePresentations = /* @__PURE__ */ new Map();
  isEnabled = false;
}
function handleUserConfig(config32) {
  isEnabled = config32.enableAnimationsFrameHandler;
}
function handleEvent(event) {
  if (!isEnabled) {
    return;
  }
  if (TraceEvents_exports.isAnimationFrameAsyncStart(event)) {
    const key = threadKey(event);
    const existing = animationFrameStarts.get(key) ?? [];
    existing.push(event);
    animationFrameStarts.set(key, existing);
  } else if (TraceEvents_exports.isAnimationFrameAsyncEnd(event)) {
    const key = threadKey(event);
    const existing = animationFrameEnds.get(key) ?? [];
    existing.push(event);
    animationFrameEnds.set(key, existing);
  } else if (TraceEvents_exports.isAnimationFramePresentation(event) && event.args?.id) {
    animationFramePresentations.set(event.args.id, event);
  }
}
async function finalize() {
  for (const [key, startEvents] of animationFrameStarts.entries()) {
    const endEvents = animationFrameEnds.get(key);
    if (!endEvents) {
      continue;
    }
    Trace_exports.sortTraceEventsInPlace(startEvents);
    Trace_exports.sortTraceEventsInPlace(endEvents);
    for (let i = 0; i < startEvents.length; i++) {
      const endEvent = endEvents.at(i);
      if (!endEvent) {
        break;
      }
      const startEvent = startEvents[i];
      const syntheticEvent = SyntheticEvents_exports.SyntheticEventsManager.registerSyntheticEvent({
        rawSourceEvent: startEvent,
        ...startEvent,
        dur: Timing_exports.Micro(endEvent.ts - startEvent.ts),
        args: {
          data: {
            beginEvent: startEvent,
            endEvent
          }
        }
      });
      animationFrames.push(syntheticEvent);
      const id2 = startEvent.args?.id;
      if (id2) {
        const presentationEvent = animationFramePresentations.get(id2);
        if (presentationEvent) {
          presentationForFrame.set(syntheticEvent, presentationEvent);
        }
      }
    }
  }
}
function data() {
  return {
    animationFrames,
    presentationForFrame
  };
}
function deps() {
  return ["Meta"];
}
function reset2() {
  animations = [];
  animationsSyntheticEvents = [];
}
function handleEvent2(event) {
  if (TraceEvents_exports.isAnimation(event)) {
    animations.push(event);
    return;
  }
}
async function finalize2() {
  const syntheticEvents22 = Trace_exports.createMatchedSortedSyntheticEvents(animations);
  animationsSyntheticEvents.push(...syntheticEvents22);
}
function data2() {
  return {
    animations: animationsSyntheticEvents
  };
}
function reset3() {
  flows = [];
  flowEvents = [];
  nonFlowEvents = [];
  flowDataByGroupToken = /* @__PURE__ */ new Map();
  boundFlowData = /* @__PURE__ */ new Map();
  flowsById = /* @__PURE__ */ new Map();
}
function handleEvent3(event) {
  if (TraceEvents_exports.isFlowPhaseEvent(event)) {
    flowEvents.push(event);
    return;
  }
  nonFlowEvents.push(event);
}
function processNonFlowEvent(event) {
  const flowDataForEvent = boundFlowData.get(event.ts)?.get(event.pid)?.get(event.tid)?.get(event.cat);
  if (!flowDataForEvent) {
    return;
  }
  const { flows: flows22, bindingParsed } = flowDataForEvent;
  if (bindingParsed) {
    return;
  }
  for (const flowId of flows22) {
    const flow2 = MapUtilities_exports.getWithDefault(flowsById, flowId, () => /* @__PURE__ */ new Map());
    flow2.set(event.ts, event);
  }
  flowDataForEvent.bindingParsed = true;
}
function processFlowEvent(flowPhaseEvent) {
  const flowGroup = flowGroupTokenForFlowPhaseEvent(flowPhaseEvent);
  switch (flowPhaseEvent.ph) {
    case TraceEvents_exports.Phase.FLOW_START: {
      const flowMetadata = { flowId: flowPhaseEvent.id, times: /* @__PURE__ */ new Map([[flowPhaseEvent.ts, void 0]]) };
      flowDataByGroupToken.set(flowGroup, flowPhaseEvent.id);
      addFlowIdToEventBinding(flowPhaseEvent, flowMetadata.flowId);
      return;
    }
    case TraceEvents_exports.Phase.FLOW_STEP: {
      const flowId = flowDataByGroupToken.get(flowGroup);
      if (flowId === void 0) {
        return;
      }
      addFlowIdToEventBinding(flowPhaseEvent, flowId);
      return;
    }
    case TraceEvents_exports.Phase.FLOW_END: {
      const flowId = flowDataByGroupToken.get(flowGroup);
      if (flowId === void 0) {
        return;
      }
      addFlowIdToEventBinding(flowPhaseEvent, flowId);
      flowDataByGroupToken.delete(flowGroup);
    }
  }
}
function addFlowIdToEventBinding(event, flowId) {
  const flowsByPid = MapUtilities_exports.getWithDefault(boundFlowData, event.ts, () => /* @__PURE__ */ new Map());
  const flowsByTid = MapUtilities_exports.getWithDefault(flowsByPid, event.pid, () => /* @__PURE__ */ new Map());
  const flowsByCat = MapUtilities_exports.getWithDefault(flowsByTid, event.tid, () => /* @__PURE__ */ new Map());
  const flowData = MapUtilities_exports.getWithDefault(flowsByCat, event.cat, () => ({ flows: /* @__PURE__ */ new Set(), bindingParsed: false }));
  flowData.flows.add(flowId);
}
function flowGroupTokenForFlowPhaseEvent(event) {
  return `${event.cat}${ID_COMPONENT_SEPARATOR}${event.name}${ID_COMPONENT_SEPARATOR}${event.id}`;
}
async function finalize3() {
  flowEvents.forEach(processFlowEvent);
  nonFlowEvents.forEach(processNonFlowEvent);
  flows = [...flowsById.values()].map((flowMapping) => [...flowMapping.values()]).map((flow2) => flow2.filter((event) => event !== void 0)).filter((flow2) => flow2.length > 1);
}
function data3() {
  return {
    flows
  };
}
function reset4() {
  runningInProcessEvents = /* @__PURE__ */ new Map();
  doneWithProcessEvents = /* @__PURE__ */ new Map();
  createdSyntheticEvents = /* @__PURE__ */ new Map();
  utilityThreads = /* @__PURE__ */ new Map();
  v8HelperThreads = /* @__PURE__ */ new Map();
}
function handleEvent4(event) {
  if (TraceEvents_exports.isAuctionWorkletRunningInProcess(event)) {
    runningInProcessEvents.set(event.args.data.pid, event);
    return;
  }
  if (TraceEvents_exports.isAuctionWorkletDoneWithProcess(event)) {
    doneWithProcessEvents.set(event.args.data.pid, event);
    return;
  }
  if (TraceEvents_exports.isThreadName(event)) {
    if (event.args.name === "auction_worklet.CrUtilityMain") {
      utilityThreads.set(event.pid, event);
      return;
    }
    if (event.args.name === "AuctionV8HelperThread") {
      v8HelperThreads.set(event.pid, event);
    }
  }
}
function workletType(input) {
  switch (input) {
    case "seller":
      return TraceEvents_exports.AuctionWorkletType.SELLER;
    case "bidder":
      return TraceEvents_exports.AuctionWorkletType.BIDDER;
    default:
      return TraceEvents_exports.AuctionWorkletType.UNKNOWN;
  }
}
function makeSyntheticEventBase(event) {
  return SyntheticEvents_exports.SyntheticEventsManager.registerSyntheticEvent({
    rawSourceEvent: event,
    name: "SyntheticAuctionWorklet",
    s: TraceEvents_exports.Scope.THREAD,
    cat: event.cat,
    tid: event.tid,
    ts: event.ts,
    ph: TraceEvents_exports.Phase.INSTANT,
    pid: event.args.data.pid,
    host: event.args.data.host,
    target: event.args.data.target,
    type: workletType(event.args.data.type)
  });
}
async function finalize4() {
  for (const [pid, utilityThreadNameEvent] of utilityThreads) {
    const v8HelperEvent = v8HelperThreads.get(pid);
    if (!v8HelperEvent) {
      continue;
    }
    const runningEvent = runningInProcessEvents.get(pid);
    const doneWithEvent = doneWithProcessEvents.get(pid);
    let syntheticEvent = null;
    if (runningEvent) {
      syntheticEvent = {
        ...makeSyntheticEventBase(runningEvent),
        args: {
          data: {
            runningInProcessEvent: runningEvent,
            utilityThread: utilityThreadNameEvent,
            v8HelperThread: v8HelperEvent
          }
        }
      };
      if (doneWithEvent) {
        syntheticEvent.args.data.doneWithProcessEvent = doneWithEvent;
      }
    } else if (doneWithEvent) {
      syntheticEvent = {
        ...makeSyntheticEventBase(doneWithEvent),
        args: {
          data: {
            doneWithProcessEvent: doneWithEvent,
            utilityThread: utilityThreadNameEvent,
            v8HelperThread: v8HelperEvent
          }
        }
      };
      if (runningEvent) {
        syntheticEvent.args.data.runningInProcessEvent = runningEvent;
      }
    }
    if (syntheticEvent === null) {
      continue;
    }
    createdSyntheticEvents.set(pid, syntheticEvent);
  }
}
function data4() {
  return {
    worklets: createdSyntheticEvents
  };
}
function makeNewTraceBounds() {
  return {
    min: Timing_exports.Micro(Number.POSITIVE_INFINITY),
    max: Timing_exports.Micro(Number.NEGATIVE_INFINITY),
    range: Timing_exports.Micro(Number.POSITIVE_INFINITY)
  };
}
function reset5() {
  navigationsByFrameId = /* @__PURE__ */ new Map();
  navigationsByNavigationId = /* @__PURE__ */ new Map();
  finalDisplayUrlByNavigationId = /* @__PURE__ */ new Map();
  processNames = /* @__PURE__ */ new Map();
  mainFrameNavigations = [];
  browserProcessId = TraceEvents_exports.ProcessID(-1);
  browserThreadId = TraceEvents_exports.ThreadID(-1);
  gpuProcessId = TraceEvents_exports.ProcessID(-1);
  gpuThreadId = TraceEvents_exports.ThreadID(-1);
  viewportRect = null;
  topLevelRendererIds = /* @__PURE__ */ new Set();
  threadsInProcess = /* @__PURE__ */ new Map();
  rendererProcessesByFrameId = /* @__PURE__ */ new Map();
  framesByProcessId = /* @__PURE__ */ new Map();
  traceBounds = makeNewTraceBounds();
  traceStartedTimeFromTracingStartedEvent = Timing_exports.Micro(-1);
  traceIsGeneric = true;
}
function updateRendererProcessByFrame(event, frame) {
  const framesInProcessById = MapUtilities_exports.getWithDefault(framesByProcessId, frame.processId, () => /* @__PURE__ */ new Map());
  framesInProcessById.set(frame.frame, frame);
  const rendererProcessInFrame = MapUtilities_exports.getWithDefault(rendererProcessesByFrameId, frame.frame, () => /* @__PURE__ */ new Map());
  const rendererProcessInfo = MapUtilities_exports.getWithDefault(rendererProcessInFrame, frame.processId, () => {
    return [];
  });
  const lastProcessData = rendererProcessInfo.at(-1);
  if (lastProcessData && lastProcessData.frame.url === frame.url) {
    return;
  }
  rendererProcessInfo.push({
    frame,
    window: {
      min: event.ts,
      max: Timing_exports.Micro(0),
      range: Timing_exports.Micro(0)
    }
  });
}
function handleEvent5(event) {
  if (traceIsGeneric && CHROME_WEB_TRACE_EVENTS.has(event.name)) {
    traceIsGeneric = false;
  }
  if (TraceEvents_exports.isProcessName(event)) {
    processNames.set(event.pid, event);
  }
  if (event.ts !== 0 && !event.name.endsWith("::UMA") && eventPhasesOfInterestForTraceBounds.has(event.ph)) {
    traceBounds.min = Timing_exports.Micro(Math.min(event.ts, traceBounds.min));
    const eventDuration = event.dur ?? Timing_exports.Micro(0);
    traceBounds.max = Timing_exports.Micro(Math.max(event.ts + eventDuration, traceBounds.max));
  }
  if (TraceEvents_exports.isProcessName(event) && (event.args.name === "Browser" || event.args.name === "HeadlessBrowser")) {
    browserProcessId = event.pid;
    return;
  }
  if (TraceEvents_exports.isProcessName(event) && (event.args.name === "Gpu" || event.args.name === "GPU Process")) {
    gpuProcessId = event.pid;
    return;
  }
  if (TraceEvents_exports.isThreadName(event) && event.args.name === "CrGpuMain") {
    gpuThreadId = event.tid;
    return;
  }
  if (TraceEvents_exports.isThreadName(event) && event.args.name === "CrBrowserMain") {
    browserThreadId = event.tid;
  }
  if (TraceEvents_exports.isMainFrameViewport(event) && viewportRect === null) {
    const rectAsArray = event.args.data.viewport_rect;
    const viewportX = rectAsArray[0];
    const viewportY = rectAsArray[1];
    const viewportWidth = rectAsArray[2];
    const viewportHeight = rectAsArray[5];
    viewportRect = { x: viewportX, y: viewportY, width: viewportWidth, height: viewportHeight };
    devicePixelRatio2 = event.args.data.dpr;
  }
  if (TraceEvents_exports.isTracingStartedInBrowser(event)) {
    traceStartedTimeFromTracingStartedEvent = event.ts;
    if (!event.args.data) {
      throw new Error("No frames found in trace data");
    }
    for (const frame of event.args.data.frames ?? []) {
      updateRendererProcessByFrame(event, frame);
      if (!frame.parent) {
        topLevelRendererIds.add(frame.processId);
      }
      const traceHasPrimaryMainFrameFlag = "isInPrimaryMainFrame" in frame;
      const traceHasOutermostMainFrameFlag = "isOutermostMainFrame" in frame;
      if (traceHasPrimaryMainFrameFlag && traceHasOutermostMainFrameFlag) {
        if (frame.isInPrimaryMainFrame && frame.isOutermostMainFrame) {
          mainFrameId = frame.frame;
          mainFrameURL = frame.url;
        }
      } else if (traceHasOutermostMainFrameFlag) {
        if (frame.isOutermostMainFrame) {
          mainFrameId = frame.frame;
          mainFrameURL = frame.url;
        }
      } else if (!frame.parent && frame.url) {
        mainFrameId = frame.frame;
        mainFrameURL = frame.url;
      }
    }
    return;
  }
  if (TraceEvents_exports.isFrameCommittedInBrowser(event)) {
    const frame = event.args.data;
    if (!frame) {
      return;
    }
    updateRendererProcessByFrame(event, frame);
    if (frame.parent) {
      return;
    }
    topLevelRendererIds.add(frame.processId);
    return;
  }
  if (TraceEvents_exports.isCommitLoad(event)) {
    const frameData = event.args.data;
    if (!frameData) {
      return;
    }
    const { frame, name, url } = frameData;
    updateRendererProcessByFrame(event, { processId: event.pid, frame, name, url });
    return;
  }
  if (TraceEvents_exports.isThreadName(event)) {
    const threads = MapUtilities_exports.getWithDefault(threadsInProcess, event.pid, () => /* @__PURE__ */ new Map());
    threads.set(event.tid, event);
    return;
  }
  if (TraceEvents_exports.isNavigationStart(event) && event.args.data) {
    const navigationId = event.args.data.navigationId;
    if (navigationsByNavigationId.has(navigationId)) {
      return;
    }
    navigationsByNavigationId.set(navigationId, event);
    finalDisplayUrlByNavigationId.set(navigationId, event.args.data.documentLoaderURL);
    const frameId = event.args.frame;
    const existingFrameNavigations = navigationsByFrameId.get(frameId) || [];
    existingFrameNavigations.push(event);
    navigationsByFrameId.set(frameId, existingFrameNavigations);
    if (frameId === mainFrameId) {
      mainFrameNavigations.push(event);
    }
    return;
  }
  if (TraceEvents_exports.isResourceSendRequest(event)) {
    if (event.args.data.resourceType !== "Document") {
      return;
    }
    const maybeNavigationId = event.args.data.requestId;
    const navigation2 = navigationsByNavigationId.get(maybeNavigationId);
    if (!navigation2) {
      return;
    }
    finalDisplayUrlByNavigationId.set(maybeNavigationId, event.args.data.url);
    return;
  }
  if (TraceEvents_exports.isDidCommitSameDocumentNavigation(event)) {
    if (event.args.render_frame_host.frame_type !== "PRIMARY_MAIN_FRAME") {
      return;
    }
    const navigation2 = mainFrameNavigations.at(-1);
    const key = navigation2?.args.data?.navigationId ?? "";
    finalDisplayUrlByNavigationId.set(key, event.args.url);
    return;
  }
}
async function finalize5() {
  if (traceStartedTimeFromTracingStartedEvent >= 0) {
    traceBounds.min = traceStartedTimeFromTracingStartedEvent;
  }
  traceBounds.range = Timing_exports.Micro(traceBounds.max - traceBounds.min);
  for (const [, processWindows] of rendererProcessesByFrameId) {
    const processWindowValues = [...processWindows.values()].flat().sort((a, b) => {
      return a.window.min - b.window.min;
    });
    for (let i = 0; i < processWindowValues.length; i++) {
      const currentWindow = processWindowValues[i];
      const nextWindow = processWindowValues[i + 1];
      if (!nextWindow) {
        currentWindow.window.max = Timing_exports.Micro(traceBounds.max);
        currentWindow.window.range = Timing_exports.Micro(traceBounds.max - currentWindow.window.min);
      } else {
        currentWindow.window.max = Timing_exports.Micro(nextWindow.window.min - 1);
        currentWindow.window.range = Timing_exports.Micro(currentWindow.window.max - currentWindow.window.min);
      }
    }
  }
  for (const [frameId, navigations] of navigationsByFrameId) {
    if (rendererProcessesByFrameId.has(frameId)) {
      continue;
    }
    navigationsByFrameId.delete(frameId);
    for (const navigation2 of navigations) {
      if (!navigation2.args.data) {
        continue;
      }
      navigationsByNavigationId.delete(navigation2.args.data.navigationId);
    }
  }
  const firstMainFrameNav = mainFrameNavigations.at(0);
  const firstNavTimeThreshold = Timing_exports3.secondsToMicro(Timing_exports.Seconds(0.5));
  if (firstMainFrameNav) {
    const navigationIsWithinThreshold = firstMainFrameNav.ts - traceBounds.min < firstNavTimeThreshold;
    if (firstMainFrameNav.args.data?.isOutermostMainFrame && firstMainFrameNav.args.data?.documentLoaderURL && navigationIsWithinThreshold) {
      mainFrameURL = firstMainFrameNav.args.data.documentLoaderURL;
    }
  }
}
function data5() {
  return {
    traceBounds,
    browserProcessId,
    browserThreadId,
    processNames,
    gpuProcessId,
    gpuThreadId: gpuThreadId === TraceEvents_exports.ThreadID(-1) ? void 0 : gpuThreadId,
    viewportRect: viewportRect || void 0,
    devicePixelRatio: devicePixelRatio2 ?? void 0,
    mainFrameId,
    mainFrameURL,
    navigationsByFrameId,
    navigationsByNavigationId,
    finalDisplayUrlByNavigationId,
    threadsInProcess,
    rendererProcessesByFrame: rendererProcessesByFrameId,
    topLevelRendererIds,
    frameByProcessId: framesByProcessId,
    mainFrameNavigations,
    traceIsGeneric
  };
}
function storeTraceEventWithRequestId(requestId, key, value) {
  if (!requestMap.has(requestId)) {
    requestMap.set(requestId, {});
  }
  const traceEvents = requestMap.get(requestId);
  if (!traceEvents) {
    throw new Error(`Unable to locate trace events for request ID ${requestId}`);
  }
  if (Array.isArray(traceEvents[key])) {
    const target = traceEvents[key];
    const values = value;
    target.push(...values);
  } else {
    traceEvents[key] = value;
  }
}
function firstPositiveValueInList(entries) {
  for (const entry of entries) {
    if (entry && entry > 0) {
      return entry;
    }
  }
  return 0;
}
function reset6() {
  requestsById = /* @__PURE__ */ new Map();
  requestMap = /* @__PURE__ */ new Map();
  requestsByTime = [];
  networkRequestEventByInitiatorUrl = /* @__PURE__ */ new Map();
  eventToInitiatorMap = /* @__PURE__ */ new Map();
  webSocketData = /* @__PURE__ */ new Map();
  entityMappings = {
    eventsByEntity: /* @__PURE__ */ new Map(),
    entityByEvent: /* @__PURE__ */ new Map(),
    createdEntityCache: /* @__PURE__ */ new Map(),
    entityByUrlCache: /* @__PURE__ */ new Map()
  };
  linkPreconnectEvents = [];
}
function handleEvent6(event) {
  if (TraceEvents_exports.isResourceChangePriority(event)) {
    storeTraceEventWithRequestId(event.args.data.requestId, "changePriority", event);
    return;
  }
  if (TraceEvents_exports.isResourceWillSendRequest(event)) {
    storeTraceEventWithRequestId(event.args.data.requestId, "willSendRequests", [event]);
    return;
  }
  if (TraceEvents_exports.isResourceSendRequest(event)) {
    storeTraceEventWithRequestId(event.args.data.requestId, "sendRequests", [event]);
    return;
  }
  if (TraceEvents_exports.isResourceReceiveResponse(event)) {
    storeTraceEventWithRequestId(event.args.data.requestId, "receiveResponse", event);
    return;
  }
  if (TraceEvents_exports.isResourceReceivedData(event)) {
    storeTraceEventWithRequestId(event.args.data.requestId, "receivedData", [event]);
    return;
  }
  if (TraceEvents_exports.isResourceFinish(event)) {
    storeTraceEventWithRequestId(event.args.data.requestId, "resourceFinish", event);
    return;
  }
  if (TraceEvents_exports.isResourceMarkAsCached(event)) {
    storeTraceEventWithRequestId(event.args.data.requestId, "resourceMarkAsCached", event);
    return;
  }
  if (TraceEvents_exports.isWebSocketCreate(event) || TraceEvents_exports.isWebSocketInfo(event) || TraceEvents_exports.isWebSocketTransfer(event)) {
    const identifier = event.args.data.identifier;
    if (!webSocketData.has(identifier)) {
      if (event.args.data.frame) {
        webSocketData.set(identifier, {
          frame: event.args.data.frame,
          webSocketIdentifier: identifier,
          events: [],
          syntheticConnection: null
        });
      } else if (event.args.data.workerId) {
        webSocketData.set(identifier, {
          workerId: event.args.data.workerId,
          webSocketIdentifier: identifier,
          events: [],
          syntheticConnection: null
        });
      }
    }
    webSocketData.get(identifier)?.events.push(event);
  }
  if (TraceEvents_exports.isLinkPreconnect(event)) {
    linkPreconnectEvents.push(event);
    return;
  }
}
async function finalize6() {
  const { rendererProcessesByFrame } = data5();
  for (const [requestId, request3] of requestMap.entries()) {
    if (!request3.sendRequests) {
      continue;
    }
    const redirects = [];
    for (let i = 0; i < request3.sendRequests.length - 1; i++) {
      const sendRequest = request3.sendRequests[i];
      const nextSendRequest = request3.sendRequests[i + 1];
      let ts = sendRequest.ts;
      let dur = Timing_exports.Micro(nextSendRequest.ts - sendRequest.ts);
      if (request3.willSendRequests?.[i] && request3.willSendRequests[i + 1]) {
        const willSendRequest = request3.willSendRequests[i];
        const nextWillSendRequest = request3.willSendRequests[i + 1];
        ts = willSendRequest.ts;
        dur = Timing_exports.Micro(nextWillSendRequest.ts - willSendRequest.ts);
      }
      redirects.push({
        url: sendRequest.args.data.url,
        priority: sendRequest.args.data.priority,
        requestMethod: sendRequest.args.data.requestMethod,
        ts,
        dur
      });
    }
    const firstSendRequest = request3.sendRequests[0];
    const finalSendRequest = request3.sendRequests[request3.sendRequests.length - 1];
    if (finalSendRequest.args.data.url.startsWith("data:")) {
      continue;
    }
    const isLightrider = globalThis.isLightrider;
    if (isLightrider && request3.resourceFinish && request3.receiveResponse?.args.data.headers) {
      const lrSizeHeader = request3.receiveResponse.args.data.headers.find((h) => h.name === "X-TotalFetchedSize");
      if (lrSizeHeader) {
        const size = parseFloat(lrSizeHeader.value);
        if (!isNaN(size)) {
          request3.resourceFinish.args.data.encodedDataLength = size;
        }
      }
    }
    const isPushedResource = request3.resourceFinish?.args.data.encodedDataLength !== 0;
    const isDiskCached = !!request3.receiveResponse && request3.receiveResponse.args.data.fromCache && !request3.receiveResponse.args.data.fromServiceWorker && !isPushedResource;
    const isMemoryCached = request3.resourceMarkAsCached !== void 0;
    let timing = isMemoryCached ? void 0 : request3.receiveResponse?.args.data.timing;
    let lrServerResponseTime;
    if (isLightrider && request3.receiveResponse?.args.data.headers) {
      timing = {
        requestTime: Timing_exports3.microToSeconds(request3.sendRequests.at(0)?.ts ?? 0),
        connectEnd: 0,
        connectStart: 0,
        dnsEnd: 0,
        dnsStart: 0,
        proxyEnd: 0,
        proxyStart: 0,
        pushEnd: 0,
        pushStart: 0,
        receiveHeadersEnd: 0,
        receiveHeadersStart: 0,
        sendEnd: 0,
        sendStart: 0,
        sslEnd: 0,
        sslStart: 0,
        workerReady: 0,
        workerStart: 0,
        ...timing
      };
      const TCPMsHeader = request3.receiveResponse.args.data.headers.find((h) => h.name === "X-TCPMs");
      const TCPMs = TCPMsHeader ? Math.max(0, parseInt(TCPMsHeader.value, 10)) : 0;
      if (request3.receiveResponse.args.data.protocol.startsWith("h3")) {
        timing.connectStart = 0;
        timing.connectEnd = TCPMs;
      } else {
        timing.connectStart = 0;
        timing.sslStart = TCPMs / 2;
        timing.connectEnd = TCPMs;
        timing.sslEnd = TCPMs;
      }
      const ResponseMsHeader = request3.receiveResponse.args.data.headers.find((h) => h.name === "X-ResponseMs");
      if (ResponseMsHeader) {
        lrServerResponseTime = Math.max(0, parseInt(ResponseMsHeader.value, 10));
      }
    }
    const allowedProtocols2 = [
      "blob:",
      "file:",
      "filesystem:",
      "http:",
      "https:"
    ];
    if (!allowedProtocols2.some((p) => firstSendRequest.args.data.url.startsWith(p))) {
      continue;
    }
    const initialPriority = finalSendRequest.args.data.priority;
    let finalPriority = initialPriority;
    if (request3.changePriority) {
      finalPriority = request3.changePriority.args.data.priority;
    }
    const startTime = request3.willSendRequests?.length ? Timing_exports.Micro(request3.willSendRequests[0].ts) : Timing_exports.Micro(firstSendRequest.ts);
    const endRedirectTime = request3.willSendRequests?.length ? Timing_exports.Micro(request3.willSendRequests[request3.willSendRequests.length - 1].ts) : Timing_exports.Micro(finalSendRequest.ts);
    const endTime = request3.resourceFinish ? request3.resourceFinish.ts : endRedirectTime;
    const finishTime = request3.resourceFinish?.args.data.finishTime ? Timing_exports.Micro(request3.resourceFinish.args.data.finishTime * SECONDS_TO_MICROSECONDS) : Timing_exports.Micro(endTime);
    const networkDuration = Timing_exports.Micro(timing ? (finishTime || endRedirectTime) - endRedirectTime : 0);
    const processingDuration = Timing_exports.Micro(endTime - (finishTime || endTime));
    const redirectionDuration = Timing_exports.Micro(endRedirectTime - startTime);
    const queueingFromTraceData = timing ? timing.requestTime * SECONDS_TO_MICROSECONDS - endRedirectTime : 0;
    const queueing = Timing_exports.Micro(NumberUtilities_exports.clamp(queueingFromTraceData, 0, Number.MAX_VALUE));
    const stalled = timing ? Timing_exports.Micro(firstPositiveValueInList([
      timing.dnsStart * MILLISECONDS_TO_MICROSECONDS,
      timing.connectStart * MILLISECONDS_TO_MICROSECONDS,
      timing.sendStart * MILLISECONDS_TO_MICROSECONDS,
      request3.receiveResponse ? request3.receiveResponse.ts - endRedirectTime : null
    ])) : request3.receiveResponse ? Timing_exports.Micro(request3.receiveResponse.ts - startTime) : Timing_exports.Micro(0);
    const sendStartTime = timing ? Timing_exports.Micro(timing.requestTime * SECONDS_TO_MICROSECONDS + timing.sendStart * MILLISECONDS_TO_MICROSECONDS) : startTime;
    const waiting = timing ? Timing_exports.Micro((timing.receiveHeadersEnd - timing.sendEnd) * MILLISECONDS_TO_MICROSECONDS) : Timing_exports.Micro(0);
    const serverResponseTime = timing ? Timing_exports.Micro(((timing.receiveHeadersStart ?? timing.receiveHeadersEnd) - timing.sendEnd) * MILLISECONDS_TO_MICROSECONDS) : Timing_exports.Micro(0);
    const downloadStart = timing ? Timing_exports.Micro(timing.requestTime * SECONDS_TO_MICROSECONDS + timing.receiveHeadersEnd * MILLISECONDS_TO_MICROSECONDS) : startTime;
    const download = timing ? Timing_exports.Micro((finishTime || downloadStart) - downloadStart) : request3.receiveResponse ? Timing_exports.Micro(endTime - request3.receiveResponse.ts) : Timing_exports.Micro(0);
    const totalTime = Timing_exports.Micro(networkDuration + processingDuration);
    const dnsLookup = timing ? Timing_exports.Micro((timing.dnsEnd - timing.dnsStart) * MILLISECONDS_TO_MICROSECONDS) : Timing_exports.Micro(0);
    const ssl = timing ? Timing_exports.Micro((timing.sslEnd - timing.sslStart) * MILLISECONDS_TO_MICROSECONDS) : Timing_exports.Micro(0);
    const proxyNegotiation = timing ? Timing_exports.Micro((timing.proxyEnd - timing.proxyStart) * MILLISECONDS_TO_MICROSECONDS) : Timing_exports.Micro(0);
    const requestSent = timing ? Timing_exports.Micro((timing.sendEnd - timing.sendStart) * MILLISECONDS_TO_MICROSECONDS) : Timing_exports.Micro(0);
    const initialConnection = timing ? Timing_exports.Micro((timing.connectEnd - timing.connectStart) * MILLISECONDS_TO_MICROSECONDS) : Timing_exports.Micro(0);
    const { frame, url, renderBlocking } = finalSendRequest.args.data;
    const { encodedDataLength, decodedBodyLength } = request3.resourceFinish ? request3.resourceFinish.args.data : { encodedDataLength: 0, decodedBodyLength: 0 };
    const parsedUrl = new URL(url);
    const isHttps = parsedUrl.protocol === "https:";
    const requestingFrameUrl = Trace_exports.activeURLForFrameAtTime(frame, finalSendRequest.ts, rendererProcessesByFrame) || "";
    const networkEvent = SyntheticEvents_exports.SyntheticEventsManager.registerSyntheticEvent({
      rawSourceEvent: finalSendRequest,
      args: {
        data: {
          // All data we create from trace events should be added to |syntheticData|.
          syntheticData: {
            dnsLookup,
            download,
            downloadStart,
            finishTime,
            initialConnection,
            isDiskCached,
            isHttps,
            isMemoryCached,
            isPushedResource,
            networkDuration,
            processingDuration,
            proxyNegotiation,
            queueing,
            redirectionDuration,
            requestSent,
            sendStartTime,
            ssl,
            stalled,
            totalTime,
            waiting,
            serverResponseTime
          },
          // All fields below are from TraceEventsForNetworkRequest.
          decodedBodyLength,
          encodedDataLength,
          frame,
          fromServiceWorker: request3.receiveResponse?.args.data.fromServiceWorker,
          isLinkPreload: finalSendRequest.args.data.isLinkPreload || false,
          mimeType: request3.receiveResponse?.args.data.mimeType ?? "",
          priority: finalPriority,
          initialPriority,
          protocol: request3.receiveResponse?.args.data.protocol ?? "unknown",
          redirects,
          // In the event the property isn't set, assume non-blocking.
          renderBlocking: renderBlocking ?? "non_blocking",
          requestId,
          requestingFrameUrl,
          requestMethod: finalSendRequest.args.data.requestMethod,
          resourceType: finalSendRequest.args.data.resourceType ?? "Other",
          statusCode: request3.receiveResponse?.args.data.statusCode ?? 0,
          responseHeaders: request3.receiveResponse?.args.data.headers ?? null,
          fetchPriorityHint: finalSendRequest.args.data.fetchPriorityHint ?? "auto",
          initiator: finalSendRequest.args.data.initiator,
          stackTrace: finalSendRequest.args.data.stackTrace,
          timing,
          lrServerResponseTime,
          url,
          failed: request3.resourceFinish?.args.data.didFail ?? false,
          finished: Boolean(request3.resourceFinish),
          hasResponse: Boolean(request3.receiveResponse),
          connectionId: request3.receiveResponse?.args.data.connectionId,
          connectionReused: request3.receiveResponse?.args.data.connectionReused
        }
      },
      cat: "loading",
      name: TraceEvents_exports.Name.SYNTHETIC_NETWORK_REQUEST,
      ph: TraceEvents_exports.Phase.COMPLETE,
      dur: Timing_exports.Micro(endTime - startTime),
      tdur: Timing_exports.Micro(endTime - startTime),
      ts: Timing_exports.Micro(startTime),
      tts: Timing_exports.Micro(startTime),
      pid: finalSendRequest.pid,
      tid: finalSendRequest.tid
    });
    requestsByTime.push(networkEvent);
    requestsById.set(networkEvent.args.data.requestId, networkEvent);
    addNetworkRequestToEntityMapping(networkEvent, entityMappings, request3);
    const initiatorUrl = networkEvent.args.data.initiator?.url || Trace_exports.getStackTraceTopCallFrameInEventPayload(networkEvent)?.url;
    if (initiatorUrl) {
      const events = networkRequestEventByInitiatorUrl.get(initiatorUrl) ?? [];
      events.push(networkEvent);
      networkRequestEventByInitiatorUrl.set(initiatorUrl, events);
    }
  }
  for (const request3 of requestsByTime) {
    const initiatedEvents = networkRequestEventByInitiatorUrl.get(request3.args.data.url);
    if (initiatedEvents) {
      for (const initiatedEvent of initiatedEvents) {
        eventToInitiatorMap.set(initiatedEvent, request3);
      }
    }
  }
  finalizeWebSocketData();
}
function data6() {
  return {
    byId: requestsById,
    byTime: requestsByTime,
    eventToInitiator: eventToInitiatorMap,
    webSocket: [...webSocketData.values()],
    entityMappings: {
      entityByEvent: entityMappings.entityByEvent,
      eventsByEntity: entityMappings.eventsByEntity,
      createdEntityCache: entityMappings.createdEntityCache,
      entityByUrlCache: entityMappings.entityByUrlCache
    },
    linkPreconnectEvents
  };
}
function deps2() {
  return ["Meta"];
}
function finalizeWebSocketData() {
  webSocketData.forEach((data312) => {
    let startEvent = null;
    let endEvent = null;
    for (const event of data312.events) {
      if (TraceEvents_exports.isWebSocketCreate(event)) {
        startEvent = event;
      }
      if (TraceEvents_exports.isWebSocketDestroy(event)) {
        endEvent = event;
      }
    }
    data312.syntheticConnection = createSyntheticWebSocketConnection(startEvent, endEvent, data312.events[0]);
  });
}
function createSyntheticWebSocketConnection(startEvent, endEvent, firstRecordedEvent) {
  const { traceBounds: traceBounds22 } = data5();
  const startTs = startEvent ? startEvent.ts : traceBounds22.min;
  const endTs = endEvent ? endEvent.ts : traceBounds22.max;
  const duration2 = endTs - startTs;
  const mainEvent = startEvent || endEvent || firstRecordedEvent;
  return {
    name: "SyntheticWebSocketConnection",
    cat: mainEvent.cat,
    ph: TraceEvents_exports.Phase.COMPLETE,
    ts: startTs,
    dur: duration2,
    pid: mainEvent.pid,
    tid: mainEvent.tid,
    s: mainEvent.s,
    rawSourceEvent: mainEvent,
    _tag: "SyntheticEntryTag",
    args: {
      data: {
        identifier: mainEvent.args.data.identifier,
        priority: "Low",
        url: mainEvent.args.data.url || ""
      }
    }
  };
}
function parseCPUProfileData(parseOptions) {
  for (const [processId, profiles] of preprocessedData) {
    for (const [profileId, preProcessedData] of profiles) {
      let buildProfileCallsForCPUProfile = function() {
        profileModel.forEachFrame(openFrameCallback, closeFrameCallback);
        function openFrameCallback(depth, node2, sampleIndex, timeStampMilliseconds) {
          if (threadId === void 0) {
            return;
          }
          const ts = Timing_exports3.milliToMicro(Timing_exports.Milli(timeStampMilliseconds));
          const nodeId = node2.id;
          const profileCall = Trace_exports.makeProfileCall(node2, profileId, sampleIndex, ts, processId, threadId);
          finalizedData.profileCalls.push(profileCall);
          indexStack.push(finalizedData.profileCalls.length - 1);
          const traceEntryNode = TreeHelpers_exports.makeEmptyTraceEntryNode(profileCall, nodeId);
          entryToNode.set(profileCall, traceEntryNode);
          traceEntryNode.depth = depth;
          if (indexStack.length === 1) {
            finalizedData.profileTree?.roots.add(traceEntryNode);
          }
        }
        __name(openFrameCallback, "openFrameCallback");
        function closeFrameCallback(_depth, _node, _sampleIndex, _timeStampMillis, durMs, selfTimeMs) {
          const profileCallIndex = indexStack.pop();
          const profileCall = profileCallIndex !== void 0 && finalizedData.profileCalls[profileCallIndex];
          if (!profileCall) {
            return;
          }
          const { callFrame, ts, pid, tid } = profileCall;
          const traceEntryNode = entryToNode.get(profileCall);
          if (callFrame === void 0 || ts === void 0 || pid === void 0 || profileId === void 0 || tid === void 0 || traceEntryNode === void 0) {
            return;
          }
          const dur = Timing_exports3.milliToMicro(Timing_exports.Milli(durMs));
          const selfTime = Timing_exports3.milliToMicro(Timing_exports.Milli(selfTimeMs));
          profileCall.dur = dur;
          traceEntryNode.selfTime = selfTime;
          const parentIndex = indexStack.at(-1);
          const parent = parentIndex !== void 0 && finalizedData.profileCalls.at(parentIndex);
          const parentNode = parent && entryToNode.get(parent);
          if (!parentNode) {
            return;
          }
          traceEntryNode.parent = parentNode;
          parentNode.children.push(traceEntryNode);
        }
        __name(closeFrameCallback, "closeFrameCallback");
      };
      __name(buildProfileCallsForCPUProfile, "buildProfileCallsForCPUProfile");
      const threadId = preProcessedData.threadId;
      if (!preProcessedData.rawProfile.nodes.length || threadId === void 0) {
        continue;
      }
      const indexStack = [];
      const profileModel = new CPUProfileDataModel_exports.CPUProfileDataModel(preProcessedData.rawProfile);
      const profileTree = TreeHelpers_exports.makeEmptyTraceEntryTree();
      profileTree.maxDepth = profileModel.maxDepth;
      const finalizedData = {
        rawProfile: preProcessedData.rawProfile,
        parsedProfile: profileModel,
        profileCalls: [],
        profileTree,
        profileId
      };
      const dataByThread = MapUtilities_exports.getWithDefault(profilesInProcess, processId, () => /* @__PURE__ */ new Map());
      dataByThread.set(threadId, finalizedData);
      if (parseOptions.isCPUProfile) {
        buildProfileCallsForCPUProfile();
      }
    }
  }
}
function reset7() {
  preprocessedData = /* @__PURE__ */ new Map();
  profilesInProcess = /* @__PURE__ */ new Map();
  entryToNode = /* @__PURE__ */ new Map();
}
function handleEvent7(event) {
  if (TraceEvents_exports.isSyntheticCpuProfile(event)) {
    const profileData = getOrCreatePreProcessedData(event.pid, event.id);
    profileData.rawProfile = event.args.data.cpuProfile;
    profileData.threadId = event.tid;
    return;
  }
  if (TraceEvents_exports.isProfile(event)) {
    const profileData = getOrCreatePreProcessedData(event.pid, event.id);
    profileData.rawProfile.startTime = event.ts;
    profileData.threadId = event.tid;
    return;
  }
  if (TraceEvents_exports.isProfileChunk(event)) {
    const profileData = getOrCreatePreProcessedData(event.pid, event.id);
    const cdpProfile = profileData.rawProfile;
    const nodesAndSamples = event.args?.data?.cpuProfile || { samples: [] };
    const samples = nodesAndSamples?.samples || [];
    const traceIds = event.args?.data?.cpuProfile?.trace_ids;
    for (const n of nodesAndSamples?.nodes || []) {
      const lineNumber = typeof n.callFrame.lineNumber === "undefined" ? -1 : n.callFrame.lineNumber;
      const columnNumber = typeof n.callFrame.columnNumber === "undefined" ? -1 : n.callFrame.columnNumber;
      const scriptId = String(n.callFrame.scriptId);
      const url = n.callFrame.url || "";
      const node2 = {
        ...n,
        callFrame: {
          ...n.callFrame,
          url,
          lineNumber,
          columnNumber,
          scriptId
        }
      };
      cdpProfile.nodes.push(node2);
    }
    const timeDeltas = event.args.data?.timeDeltas || [];
    const lines = event.args.data?.lines || Array(samples.length).fill(0);
    cdpProfile.samples?.push(...samples);
    cdpProfile.timeDeltas?.push(...timeDeltas);
    cdpProfile.lines?.push(...lines);
    if (traceIds) {
      cdpProfile.traceIds ??= {};
      for (const key in traceIds) {
        cdpProfile.traceIds[key] = traceIds[key];
      }
    }
    if (cdpProfile.samples && cdpProfile.timeDeltas && cdpProfile.samples.length !== cdpProfile.timeDeltas.length) {
      console.error("Failed to parse CPU profile.");
      return;
    }
    if (!cdpProfile.endTime && cdpProfile.timeDeltas) {
      const timeDeltas2 = cdpProfile.timeDeltas;
      cdpProfile.endTime = timeDeltas2.reduce((x, y) => x + y, cdpProfile.startTime);
    }
    return;
  }
}
async function finalize7(parseOptions = {}) {
  parseCPUProfileData(parseOptions);
}
function data7() {
  return {
    profilesInProcess,
    entryToNode
  };
}
function getOrCreatePreProcessedData(processId, profileId) {
  const profileById = MapUtilities_exports.getWithDefault(preprocessedData, processId, () => /* @__PURE__ */ new Map());
  return MapUtilities_exports.getWithDefault(profileById, profileId, () => ({
    rawProfile: {
      startTime: 0,
      endTime: 0,
      nodes: [],
      samples: [],
      timeDeltas: [],
      lines: []
    },
    profileId
  }));
}
function getProfileCallFunctionName(data312, entry) {
  const profile = data312.profilesInProcess.get(entry.pid)?.get(entry.tid);
  const node2 = profile?.parsedProfile.nodeById(entry.nodeId);
  if (node2?.functionName) {
    return node2.functionName;
  }
  return entry.callFrame.functionName;
}
function handleUserConfig2(userConfig) {
  config = userConfig;
}
function reset8() {
  processes = /* @__PURE__ */ new Map();
  entryToNode2 = /* @__PURE__ */ new Map();
  entityMappings2 = {
    eventsByEntity: /* @__PURE__ */ new Map(),
    entityByEvent: /* @__PURE__ */ new Map(),
    createdEntityCache: /* @__PURE__ */ new Map(),
    entityByUrlCache: /* @__PURE__ */ new Map()
  };
  completeEventStack = [];
  compositorTileWorkers = [];
}
function handleEvent8(event) {
  if (TraceEvents_exports.isThreadName(event) && event.args.name?.startsWith("CompositorTileWorker")) {
    compositorTileWorkers.push({
      pid: event.pid,
      tid: event.tid
    });
  }
  if (TraceEvents_exports.isBegin(event) || TraceEvents_exports.isEnd(event)) {
    const process52 = getOrCreateRendererProcess(processes, event.pid);
    const thread = getOrCreateRendererThread(process52, event.tid);
    const completeEvent = makeCompleteEvent(event);
    if (!completeEvent) {
      return;
    }
    thread.entries.push(completeEvent);
    return;
  }
  if (TraceEvents_exports.isInstant(event) || TraceEvents_exports.isComplete(event)) {
    const process52 = getOrCreateRendererProcess(processes, event.pid);
    const thread = getOrCreateRendererThread(process52, event.tid);
    thread.entries.push(event);
  }
  if (TraceEvents_exports.isLayout(event)) {
    const process52 = getOrCreateRendererProcess(processes, event.pid);
    const thread = getOrCreateRendererThread(process52, event.tid);
    thread.layoutEvents.push(event);
  }
  if (TraceEvents_exports.isRecalcStyle(event)) {
    const process52 = getOrCreateRendererProcess(processes, event.pid);
    const thread = getOrCreateRendererThread(process52, event.tid);
    thread.recalcStyleEvents.push(event);
  }
}
async function finalize8() {
  const { mainFrameId: mainFrameId22, rendererProcessesByFrame, threadsInProcess: threadsInProcess22 } = data5();
  entityMappings2 = data6().entityMappings;
  assignMeta(processes, mainFrameId22, rendererProcessesByFrame, threadsInProcess22);
  sanitizeProcesses(processes);
  buildHierarchy(processes);
  sanitizeThreads(processes);
}
function data8() {
  return {
    processes,
    compositorTileWorkers: gatherCompositorThreads(),
    entryToNode: entryToNode2,
    entityMappings: {
      entityByEvent: entityMappings2.entityByEvent,
      eventsByEntity: entityMappings2.eventsByEntity,
      createdEntityCache: entityMappings2.createdEntityCache,
      entityByUrlCache: entityMappings2.entityByUrlCache
    }
  };
}
function gatherCompositorThreads() {
  const threadsByProcess = /* @__PURE__ */ new Map();
  for (const worker of compositorTileWorkers) {
    const byProcess = threadsByProcess.get(worker.pid) || [];
    byProcess.push(worker.tid);
    threadsByProcess.set(worker.pid, byProcess);
  }
  return threadsByProcess;
}
function assignMeta(processes22, mainFrameId22, rendererProcessesByFrame, threadsInProcess22) {
  assignOrigin(processes22, rendererProcessesByFrame);
  assignIsMainFrame(processes22, mainFrameId22, rendererProcessesByFrame);
  assignThreadName(processes22, threadsInProcess22);
}
function assignOrigin(processes22, rendererProcessesByFrame) {
  for (const renderProcessesByPid of rendererProcessesByFrame.values()) {
    for (const [pid, processWindows] of renderProcessesByPid) {
      for (const processInfo of processWindows.flat()) {
        const process52 = getOrCreateRendererProcess(processes22, pid);
        if (process52.url === null || process52.url === "about:blank") {
          try {
            new URL(processInfo.frame.url);
            process52.url = processInfo.frame.url;
          } catch {
            process52.url = null;
          }
        }
      }
    }
  }
}
function assignIsMainFrame(processes22, mainFrameId22, rendererProcessesByFrame) {
  for (const [frameId, renderProcessesByPid] of rendererProcessesByFrame) {
    for (const [pid] of renderProcessesByPid) {
      const process52 = getOrCreateRendererProcess(processes22, pid);
      if (frameId === mainFrameId22) {
        process52.isOnMainFrame = true;
      }
    }
  }
}
function assignThreadName(processes22, threadsInProcess22) {
  for (const [pid, process52] of processes22) {
    for (const [tid, threadInfo] of threadsInProcess22.get(pid) ?? []) {
      const thread = getOrCreateRendererThread(process52, tid);
      thread.name = threadInfo?.args.name ?? `${tid}`;
    }
  }
}
function sanitizeProcesses(processes22) {
  const auctionWorklets = data4().worklets;
  const metaData = data5();
  if (metaData.traceIsGeneric) {
    return;
  }
  for (const [pid, process52] of processes22) {
    if (process52.url === null) {
      const maybeWorklet = auctionWorklets.get(pid);
      if (maybeWorklet) {
        process52.url = maybeWorklet.host;
      } else {
        processes22.delete(pid);
      }
      continue;
    }
  }
}
function sanitizeThreads(processes22) {
  for (const [, process52] of processes22) {
    for (const [tid, thread] of process52.threads) {
      if (!thread.tree?.roots.size) {
        process52.threads.delete(tid);
      }
    }
  }
}
function buildHierarchy(processes22, options2) {
  const samplesData = data7();
  for (const [pid, process52] of processes22) {
    for (const [tid, thread] of process52.threads) {
      if (!thread.entries.length) {
        thread.tree = TreeHelpers_exports.makeEmptyTraceEntryTree();
        continue;
      }
      Trace_exports.sortTraceEventsInPlace(thread.entries);
      const samplesDataForThread = samplesData.profilesInProcess.get(pid)?.get(tid);
      if (samplesDataForThread) {
        const cpuProfile = samplesDataForThread.parsedProfile;
        const samplesIntegrator = cpuProfile && new SamplesIntegrator_exports.SamplesIntegrator(cpuProfile, samplesDataForThread.profileId, pid, tid, config);
        const profileCalls = samplesIntegrator?.buildProfileCalls(thread.entries);
        if (samplesIntegrator && profileCalls) {
          thread.entries = Trace_exports.mergeEventsInOrder(thread.entries, profileCalls);
          thread.profileCalls = profileCalls;
          const jsSamples = samplesIntegrator.jsSampleEvents;
          if (jsSamples.length) {
            thread.entries = Trace_exports.mergeEventsInOrder(thread.entries, jsSamples);
          }
        }
      }
      const treeData = TreeHelpers_exports.treify(thread.entries, options2);
      thread.tree = treeData.tree;
      for (const [entry, node2] of treeData.entryToNode) {
        entryToNode2.set(entry, node2);
        addEventToEntityMapping(entry, entityMappings2);
      }
    }
  }
}
function makeCompleteEvent(event) {
  if (TraceEvents_exports.isEnd(event)) {
    const beginEvent = completeEventStack.pop();
    if (!beginEvent) {
      return null;
    }
    if (beginEvent.name !== event.name || beginEvent.cat !== event.cat) {
      console.error("Begin/End events mismatch at " + beginEvent.ts + " (" + beginEvent.name + ") vs. " + event.ts + " (" + event.name + ")");
      return null;
    }
    beginEvent.dur = Timing_exports.Micro(event.ts - beginEvent.ts);
    return null;
  }
  const syntheticComplete = {
    ...event,
    ph: TraceEvents_exports.Phase.COMPLETE,
    dur: Timing_exports.Micro(0)
  };
  completeEventStack.push(syntheticComplete);
  return syntheticComplete;
}
function deps3() {
  return ["Meta", "Samples", "AuctionWorklets", "NetworkRequests"];
}
function reset9() {
  schedulerToRunEntryPoints = /* @__PURE__ */ new Map();
  asyncCallToScheduler = /* @__PURE__ */ new Map();
  taskScheduleForTaskRunEvent = /* @__PURE__ */ new Map();
  runEntryPointToScheduler = /* @__PURE__ */ new Map();
}
function handleEvent9(_) {
}
async function finalize9() {
  const { flows: flows22 } = data3();
  const { entryToNode: entryToNode42 } = data8();
  for (const flow2 of flows22) {
    let maybeAsyncTaskScheduled = flow2.at(0);
    if (!maybeAsyncTaskScheduled) {
      continue;
    }
    if (TraceEvents_exports.isDebuggerAsyncTaskRun(maybeAsyncTaskScheduled)) {
      maybeAsyncTaskScheduled = taskScheduleForTaskRunEvent.get(maybeAsyncTaskScheduled);
    }
    if (!maybeAsyncTaskScheduled || !TraceEvents_exports.isDebuggerAsyncTaskScheduled(maybeAsyncTaskScheduled)) {
      continue;
    }
    const taskName = maybeAsyncTaskScheduled.args.taskName;
    const asyncTaskRun = flow2.at(1);
    if (!asyncTaskRun || !TraceEvents_exports.isDebuggerAsyncTaskRun(asyncTaskRun)) {
      continue;
    }
    taskScheduleForTaskRunEvent.set(asyncTaskRun, maybeAsyncTaskScheduled);
    const asyncCaller = findNearestJSAncestor(maybeAsyncTaskScheduled, entryToNode42);
    const asyncEntryPoint = findFirstJsInvocationForAsyncTaskRun(asyncTaskRun, entryToNode42);
    runEntryPointToScheduler.set(asyncEntryPoint || asyncTaskRun, { taskName, scheduler: asyncCaller || maybeAsyncTaskScheduled });
    if (!asyncCaller || !asyncEntryPoint) {
      continue;
    }
    const entryPoints = MapUtilities_exports.getWithDefault(schedulerToRunEntryPoints, asyncCaller, () => []);
    entryPoints.push(asyncEntryPoint);
    const scheduledProfileCalls = findFirstJSCallsForAsyncTaskRun(asyncTaskRun, entryToNode42);
    for (const call of scheduledProfileCalls) {
      asyncCallToScheduler.set(call, { taskName, scheduler: asyncCaller });
    }
  }
}
function findNearestJSAncestor(asyncTaskScheduled, entryToNode42) {
  let node2 = entryToNode42.get(asyncTaskScheduled)?.parent;
  while (node2) {
    if (TraceEvents_exports.isProfileCall(node2.entry) || acceptJSInvocationsPredicate(node2.entry)) {
      return node2.entry;
    }
    node2 = node2.parent;
  }
  return null;
}
function acceptJSInvocationsPredicate(event) {
  const eventIsConsoleRunTask = TraceEvents_exports.isConsoleRunTask(event);
  const eventIsV8EntryPoint = event.name.startsWith("v8") || event.name.startsWith("V8");
  return TraceEvents_exports.isJSInvocationEvent(event) && (eventIsConsoleRunTask || !eventIsV8EntryPoint);
}
function findFirstJsInvocationForAsyncTaskRun(asyncTaskRun, entryToNode42) {
  return findFirstDescendantsOfType(asyncTaskRun, entryToNode42, acceptJSInvocationsPredicate, TraceEvents_exports.isDebuggerAsyncTaskRun).at(0);
}
function findFirstJSCallsForAsyncTaskRun(asyncTaskRun, entryToNode42) {
  return findFirstDescendantsOfType(asyncTaskRun, entryToNode42, TraceEvents_exports.isProfileCall, TraceEvents_exports.isDebuggerAsyncTaskRun);
}
function findFirstDescendantsOfType(root2, entryToNode42, predicateAccept, predicateIgnore) {
  const node2 = entryToNode42.get(root2);
  if (!node2) {
    return [];
  }
  const childrenGroups = [[...node2.children]];
  const firstDescendants = [];
  for (let i = 0; i < childrenGroups.length; i++) {
    const siblings = childrenGroups[i];
    for (let j = 0; j < siblings.length; j++) {
      const node22 = siblings[j];
      if (predicateAccept(node22.entry)) {
        firstDescendants.push(node22.entry);
      } else if (!predicateIgnore(node22.entry)) {
        childrenGroups.push([...node22.children]);
      }
    }
  }
  return firstDescendants;
}
function data9() {
  return {
    schedulerToRunEntryPoints,
    asyncCallToScheduler,
    runEntryPointToScheduler
  };
}
function deps4() {
  return ["Renderer", "Flows"];
}
function reset10() {
  domStatsByFrameId = /* @__PURE__ */ new Map();
}
function handleEvent10(event) {
  if (!TraceEvents_exports.isDOMStats(event)) {
    return;
  }
  const domStatEvents = MapUtilities_exports.getWithDefault(domStatsByFrameId, event.args.data.frame, () => []);
  domStatEvents.push(event);
}
async function finalize10() {
}
function data10() {
  return { domStatsByFrameId };
}
function reset11() {
  syntheticEvents = [];
  performanceMeasureEvents = [];
  performanceMarkEvents = [];
  consoleTimings = [];
  timestampEvents = [];
  measureTraceByTraceId = /* @__PURE__ */ new Map();
}
function getEventTimings(event) {
  if ("dur" in event) {
    return { start: event.ts, end: Timing_exports.Micro(event.ts + (event.dur ?? 0)) };
  }
  if (TraceEvents_exports.isConsoleTimeStamp(event)) {
    const { start, end } = event.args.data || {};
    if (typeof start === "number" && typeof end === "number") {
      return { start: Timing_exports.Micro(start), end: Timing_exports.Micro(end) };
    }
  }
  return { start: event.ts, end: event.ts };
}
function getEventTrack(event) {
  if (event.cat === "blink.user_timing") {
    const detailString = event.args.data.beginEvent.args?.detail;
    if (detailString) {
      const details = Trace_exports.parseDevtoolsDetails(detailString, "devtools");
      if (details && "track" in details) {
        return details.track;
      }
    }
  } else if (TraceEvents_exports.isConsoleTimeStamp(event)) {
    const track = event.args.data?.track;
    return typeof track === "string" ? track : void 0;
  }
  return void 0;
}
function userTimingComparator(a, b, originalArray) {
  const { start: aStart, end: aEnd } = getEventTimings(a);
  const { start: bStart, end: bEnd } = getEventTimings(b);
  const timeDifference = Trace_exports.compareBeginAndEnd(aStart, bStart, aEnd, bEnd);
  if (timeDifference) {
    return timeDifference;
  }
  const aTrack = getEventTrack(a);
  const bTrack = getEventTrack(b);
  if (aTrack !== bTrack) {
    return 0;
  }
  const aIndex = originalArray.indexOf(a);
  const bIndex = originalArray.indexOf(b);
  return bIndex - aIndex;
}
function handleEvent11(event) {
  if (ignoredNames.includes(event.name)) {
    return;
  }
  if (TraceEvents_exports.isUserTimingMeasure(event)) {
    measureTraceByTraceId.set(event.args.traceId, event);
  }
  if (TraceEvents_exports.isPerformanceMeasure(event)) {
    performanceMeasureEvents.push(event);
    return;
  }
  if (TraceEvents_exports.isPerformanceMark(event)) {
    performanceMarkEvents.push(event);
  }
  if (TraceEvents_exports.isConsoleTime(event)) {
    consoleTimings.push(event);
  }
  if (TraceEvents_exports.isConsoleTimeStamp(event)) {
    timestampEvents.push(event);
  }
}
async function finalize11() {
  const asyncEvents = [...performanceMeasureEvents, ...consoleTimings];
  syntheticEvents = Trace_exports.createMatchedSortedSyntheticEvents(asyncEvents);
  syntheticEvents = syntheticEvents.sort((a, b) => userTimingComparator(a, b, [...syntheticEvents]));
  timestampEvents = timestampEvents.sort((a, b) => userTimingComparator(a, b, [...timestampEvents]));
}
function data11() {
  return {
    consoleTimings: syntheticEvents.filter((e) => e.cat === "blink.console"),
    performanceMeasures: syntheticEvents.filter((e) => e.cat === "blink.user_timing"),
    performanceMarks: performanceMarkEvents,
    timestampEvents,
    measureTraceByTraceId
  };
}
function handleEvent12(_event) {
}
function reset12() {
  extensionTrackEntries = [];
  syntheticConsoleEntriesForTimingsTrack = [];
  extensionTrackData = [];
  extensionMarkers = [];
  entryToNode3 = /* @__PURE__ */ new Map();
  timeStampByName = /* @__PURE__ */ new Map();
}
async function finalize12() {
  createExtensionFlameChartEntries();
}
function createExtensionFlameChartEntries() {
  const pairedMeasures = data11().performanceMeasures;
  const marks = data11().performanceMarks;
  const mergedRawExtensionEvents = Trace_exports.mergeEventsInOrder(pairedMeasures, marks);
  extractPerformanceAPIExtensionEntries(mergedRawExtensionEvents);
  extractConsoleAPIExtensionEntries();
  Trace_exports.sortTraceEventsInPlace(extensionTrackEntries);
  Extensions_exports2.buildTrackDataFromExtensionEntries(extensionTrackEntries, extensionTrackData, entryToNode3);
}
function extractConsoleAPIExtensionEntries() {
  const consoleTimeStamps = data11().timestampEvents;
  for (const currentTimeStamp of consoleTimeStamps) {
    if (!currentTimeStamp.args.data) {
      continue;
    }
    const timeStampName = String(currentTimeStamp.args.data.name ?? currentTimeStamp.args.data.message);
    timeStampByName.set(timeStampName, currentTimeStamp);
    const { devtoolsObj: extensionData, userDetail } = extensionDataInConsoleTimeStamp(currentTimeStamp);
    const start = currentTimeStamp.args.data.start;
    const end = currentTimeStamp.args.data.end;
    if (!extensionData && !start && !end) {
      continue;
    }
    const startTimeStamp = typeof start === "number" ? Timing_exports.Micro(start) : timeStampByName.get(String(start))?.ts;
    const endTimeStamp = typeof end === "number" ? Timing_exports.Micro(end) : timeStampByName.get(String(end))?.ts;
    if (endTimeStamp !== void 0 && startTimeStamp === void 0) {
      continue;
    }
    const entryStartTime = startTimeStamp ?? currentTimeStamp.ts;
    const entryEndTime = endTimeStamp ?? currentTimeStamp.ts;
    if (extensionData) {
      const unregisteredExtensionEntry = {
        ...currentTimeStamp,
        name: timeStampName,
        cat: "devtools.extension",
        devtoolsObj: extensionData,
        userDetail,
        rawSourceEvent: currentTimeStamp,
        dur: Timing_exports.Micro(entryEndTime - entryStartTime),
        ts: entryStartTime,
        ph: TraceEvents_exports.Phase.COMPLETE
      };
      const extensionEntry = SyntheticEvents_exports.SyntheticEventsManager.registerSyntheticEvent(unregisteredExtensionEntry);
      extensionTrackEntries.push(extensionEntry);
      continue;
    }
    const unregisteredSyntheticTimeStamp = {
      ...currentTimeStamp,
      name: timeStampName,
      cat: "disabled-by-default-v8.inspector",
      ph: TraceEvents_exports.Phase.COMPLETE,
      ts: entryStartTime,
      dur: Timing_exports.Micro(entryEndTime - entryStartTime),
      rawSourceEvent: currentTimeStamp
    };
    const syntheticTimeStamp = SyntheticEvents_exports.SyntheticEventsManager.registerSyntheticEvent(unregisteredSyntheticTimeStamp);
    syntheticConsoleEntriesForTimingsTrack.push(syntheticTimeStamp);
  }
}
function extractPerformanceAPIExtensionEntries(timings) {
  for (const timing of timings) {
    const { devtoolsObj, userDetail } = extensionDataInPerformanceTiming(timing);
    if (!devtoolsObj) {
      continue;
    }
    const extensionSyntheticEntry = {
      name: timing.name,
      ph: Extensions_exports.isExtensionPayloadMarker(devtoolsObj) ? TraceEvents_exports.Phase.INSTANT : TraceEvents_exports.Phase.COMPLETE,
      pid: timing.pid,
      tid: timing.tid,
      ts: timing.ts,
      dur: timing.dur,
      cat: "devtools.extension",
      devtoolsObj,
      userDetail,
      rawSourceEvent: TraceEvents_exports.isSyntheticUserTiming(timing) ? timing.rawSourceEvent : timing
    };
    if (Extensions_exports.isExtensionPayloadMarker(devtoolsObj)) {
      const extensionMarker = SyntheticEvents_exports.SyntheticEventsManager.registerSyntheticEvent(extensionSyntheticEntry);
      extensionMarkers.push(extensionMarker);
      continue;
    }
    if (Extensions_exports.isExtensionEntryObj(extensionSyntheticEntry.devtoolsObj)) {
      const extensionTrackEntry = SyntheticEvents_exports.SyntheticEventsManager.registerSyntheticEvent(extensionSyntheticEntry);
      extensionTrackEntries.push(extensionTrackEntry);
      continue;
    }
  }
}
function extensionDataInPerformanceTiming(timing) {
  const timingDetail = TraceEvents_exports.isPerformanceMark(timing) ? timing.args.data?.detail : timing.args.data.beginEvent.args.detail;
  if (!timingDetail) {
    return { devtoolsObj: null, userDetail: null };
  }
  const devtoolsObj = Trace_exports.parseDevtoolsDetails(timingDetail, "devtools");
  let userDetail = null;
  try {
    userDetail = JSON.parse(timingDetail);
    delete userDetail.devtools;
  } catch {
  }
  return { devtoolsObj, userDetail };
}
function extensionDataInConsoleTimeStamp(timeStamp) {
  if (!timeStamp.args.data || !timeStamp.args.data.track) {
    return { devtoolsObj: null, userDetail: null };
  }
  let userDetail = null;
  try {
    userDetail = JSON.parse(timeStamp.args.data?.devtools || '""');
  } catch {
  }
  const devtoolsObj = {
    // the color is defaulted to primary if it's value isn't one from
    // the defined palette (see ExtensionUI::extensionEntryColor) so
    // we don't need to check the value is valid here.
    color: String(timeStamp.args.data.color),
    track: String(timeStamp.args.data.track),
    dataType: "track-entry",
    trackGroup: timeStamp.args.data.trackGroup !== void 0 ? String(timeStamp.args.data.trackGroup) : void 0
  };
  return { devtoolsObj, userDetail };
}
function data12() {
  return {
    entryToNode: entryToNode3,
    extensionTrackData,
    extensionMarkers,
    syntheticConsoleEntriesForTimingsTrack
  };
}
function deps5() {
  return ["UserTimings"];
}
function reset13() {
  paintEvents = [];
  snapshotEvents = [];
  paintToSnapshotMap = /* @__PURE__ */ new Map();
  lastPaintForLayerId = {};
  currentMainFrameLayerTreeId = null;
  updateLayerEvents = [];
  relevantEvents = [];
}
function handleEvent13(event) {
  if (TraceEvents_exports.isPaint(event) || TraceEvents_exports.isDisplayListItemListSnapshot(event) || TraceEvents_exports.isUpdateLayer(event) || TraceEvents_exports.isSetLayerId(event)) {
    relevantEvents.push(event);
  }
}
async function finalize13() {
  const metaData = data5();
  Trace_exports.sortTraceEventsInPlace(relevantEvents);
  for (const event of relevantEvents) {
    if (TraceEvents_exports.isSetLayerId(event)) {
      if (metaData.mainFrameId !== event.args.data.frame) {
        continue;
      }
      currentMainFrameLayerTreeId = event.args.data.layerTreeId;
    } else if (TraceEvents_exports.isUpdateLayer(event)) {
      updateLayerEvents.push(event);
    } else if (TraceEvents_exports.isPaint(event)) {
      if (!event.args.data.layerId) {
        continue;
      }
      paintEvents.push(event);
      lastPaintForLayerId[event.args.data.layerId] = event;
      continue;
    } else if (TraceEvents_exports.isDisplayListItemListSnapshot(event)) {
      let lastUpdateLayerEventForThread = null;
      for (let i = updateLayerEvents.length - 1; i > -1; i--) {
        const updateEvent = updateLayerEvents[i];
        if (updateEvent.pid === event.pid && updateEvent.tid === event.tid) {
          lastUpdateLayerEventForThread = updateEvent;
          break;
        }
      }
      if (!lastUpdateLayerEventForThread) {
        continue;
      }
      if (lastUpdateLayerEventForThread.args.layerTreeId !== currentMainFrameLayerTreeId) {
        continue;
      }
      const paintEvent = lastPaintForLayerId[lastUpdateLayerEventForThread.args.layerId];
      if (!paintEvent) {
        continue;
      }
      snapshotEvents.push(event);
      paintToSnapshotMap.set(paintEvent, event);
    }
  }
}
function data13() {
  return {
    paints: paintEvents,
    snapshots: snapshotEvents,
    paintsToSnapshots: paintToSnapshotMap
  };
}
function deps6() {
  return ["Meta"];
}
function getThreadTypeForRendererThread(pid, thread, auctionWorkletsData) {
  let threadType = ThreadType.OTHER;
  if (thread.name === "CrRendererMain") {
    threadType = ThreadType.MAIN_THREAD;
  } else if (thread.name === "DedicatedWorker thread") {
    threadType = ThreadType.WORKER;
  } else if (thread.name?.startsWith("CompositorTileWorker")) {
    threadType = ThreadType.RASTERIZER;
  } else if (auctionWorkletsData.worklets.has(pid)) {
    threadType = ThreadType.AUCTION_WORKLET;
  } else if (thread.name?.startsWith("ThreadPool")) {
    threadType = ThreadType.THREAD_POOL;
  }
  return threadType;
}
function threadsInRenderer(rendererData, auctionWorkletsData) {
  const foundThreads = [];
  if (rendererData.processes.size) {
    for (const [pid, process52] of rendererData.processes) {
      for (const [tid, thread] of process52.threads) {
        if (!thread.tree) {
          continue;
        }
        const threadType = getThreadTypeForRendererThread(pid, thread, auctionWorkletsData);
        foundThreads.push({
          name: thread.name,
          pid,
          tid,
          processIsOnMainFrame: process52.isOnMainFrame,
          entries: thread.entries,
          tree: thread.tree,
          type: threadType,
          entryToNode: rendererData.entryToNode
        });
      }
    }
  }
  return foundThreads;
}
function threadsInTrace(handlerData) {
  const cached2 = threadsInHandlerDataCache.get(handlerData);
  if (cached2) {
    return cached2;
  }
  const threadsFromRenderer = threadsInRenderer(handlerData.Renderer, handlerData.AuctionWorklets);
  if (threadsFromRenderer.length) {
    threadsInHandlerDataCache.set(handlerData, threadsFromRenderer);
    return threadsFromRenderer;
  }
  const foundThreads = [];
  if (handlerData.Samples.profilesInProcess.size) {
    for (const [pid, process52] of handlerData.Samples.profilesInProcess) {
      for (const [tid, thread] of process52) {
        if (!thread.profileTree) {
          continue;
        }
        foundThreads.push({
          pid,
          tid,
          // CPU Profile threads do not have a name.
          name: null,
          entries: thread.profileCalls,
          // There is no concept of a "Main Frame" in a CPU profile.
          processIsOnMainFrame: false,
          tree: thread.profileTree,
          type: ThreadType.CPU_PROFILE,
          entryToNode: handlerData.Samples.entryToNode
        });
      }
    }
  }
  threadsInHandlerDataCache.set(handlerData, foundThreads);
  return foundThreads;
}
function isFrameEvent(event) {
  return TraceEvents_exports.isSetLayerId(event) || TraceEvents_exports.isBeginFrame(event) || TraceEvents_exports.isDroppedFrame(event) || TraceEvents_exports.isRequestMainThreadFrame(event) || TraceEvents_exports.isBeginMainThreadFrame(event) || TraceEvents_exports.isNeedsBeginFrameChanged(event) || // Note that "Commit" is the replacement for "CompositeLayers" so in a trace
  // we wouldn't expect to see a combination of these. All "new" trace
  // recordings use "Commit", but we can easily support "CompositeLayers" too
  // to not break older traces being imported.
  TraceEvents_exports.isCommit(event) || TraceEvents_exports.isCompositeLayers(event) || TraceEvents_exports.isActivateLayerTree(event) || TraceEvents_exports.isDrawFrame(event);
}
function entryIsTopLevel(entry) {
  const devtoolsTimelineCategory = "disabled-by-default-devtools.timeline";
  return entry.name === TraceEvents_exports.Name.RUN_TASK && entry.cat.includes(devtoolsTimelineCategory);
}
function reset14() {
  model = null;
  relevantFrameEvents = [];
}
function handleEvent14(event) {
  if (isFrameEvent(event) || TraceEvents_exports.isLayerTreeHostImplSnapshot(event) || entryIsTopLevel(event) || MAIN_FRAME_MARKERS.has(event.name) || TraceEvents_exports.isPaint(event)) {
    relevantFrameEvents.push(event);
  }
}
async function finalize14() {
  Trace_exports.sortTraceEventsInPlace(relevantFrameEvents);
  const modelForTrace = new TimelineFrameModel(relevantFrameEvents, data8(), data4(), data5(), data13());
  model = modelForTrace;
}
function data14() {
  return {
    frames: model?.frames() ?? [],
    framesById: model?.framesById() ?? {}
  };
}
function deps7() {
  return ["Meta", "Renderer", "AuctionWorklets", "LayerTree"];
}
function framesWithinWindow(frames22, startTime, endTime) {
  const firstFrame = ArrayUtilities_exports.lowerBound(frames22, startTime || 0, (time2, frame) => time2 - frame.endTime);
  const lastFrame = ArrayUtilities_exports.lowerBound(frames22, endTime || Infinity, (time2, frame) => time2 - frame.startTime);
  return frames22.slice(firstFrame, lastFrame);
}
function reset15() {
  eventsInProcessThread = /* @__PURE__ */ new Map();
  mainGPUThreadTasks = [];
}
function handleEvent15(event) {
  if (!TraceEvents_exports.isGPUTask(event)) {
    return;
  }
  Trace_exports.addEventToProcessThread(event, eventsInProcessThread);
}
async function finalize15() {
  const { gpuProcessId: gpuProcessId22, gpuThreadId: gpuThreadId22 } = data5();
  const gpuThreadsForProcess = eventsInProcessThread.get(gpuProcessId22);
  if (gpuThreadsForProcess && gpuThreadId22) {
    mainGPUThreadTasks = gpuThreadsForProcess.get(gpuThreadId22) || [];
  }
}
function data15() {
  return {
    mainGPUThreadTasks
  };
}
function deps8() {
  return ["Meta"];
}
function reset16() {
  paintImageEvents = /* @__PURE__ */ new Map();
  decodeLazyPixelRefEvents = /* @__PURE__ */ new Map();
  paintImageByLazyPixelRef = /* @__PURE__ */ new Map();
  eventToPaintImage = /* @__PURE__ */ new Map();
  urlToPaintImage = /* @__PURE__ */ new Map();
  paintEventToCorrectedDisplaySize = /* @__PURE__ */ new Map();
  didCorrectForHostDpr = false;
}
function handleEvent16(event) {
  if (TraceEvents_exports.isPaintImage(event)) {
    const forProcess = paintImageEvents.get(event.pid) || /* @__PURE__ */ new Map();
    const forThread = forProcess.get(event.tid) || [];
    forThread.push(event);
    forProcess.set(event.tid, forThread);
    paintImageEvents.set(event.pid, forProcess);
    if (event.args.data.url) {
      const paintsForUrl = MapUtilities_exports.getWithDefault(urlToPaintImage, event.args.data.url, () => []);
      paintsForUrl.push(event);
    }
    return;
  }
  if (TraceEvents_exports.isDecodeLazyPixelRef(event) && typeof event.args?.LazyPixelRef !== "undefined") {
    const forProcess = decodeLazyPixelRefEvents.get(event.pid) || /* @__PURE__ */ new Map();
    const forThread = forProcess.get(event.tid) || [];
    forThread.push(event);
    forProcess.set(event.tid, forThread);
    decodeLazyPixelRefEvents.set(event.pid, forProcess);
  }
  if (TraceEvents_exports.isDrawLazyPixelRef(event) && typeof event.args?.LazyPixelRef !== "undefined") {
    const lastPaintEvent = paintImageEvents.get(event.pid)?.get(event.tid)?.at(-1);
    if (!lastPaintEvent) {
      return;
    }
    paintImageByLazyPixelRef.set(event.args.LazyPixelRef, lastPaintEvent);
    return;
  }
  if (TraceEvents_exports.isDecodeImage(event)) {
    const lastPaintImageEventOnThread = paintImageEvents.get(event.pid)?.get(event.tid)?.at(-1);
    if (lastPaintImageEventOnThread) {
      eventToPaintImage.set(event, lastPaintImageEventOnThread);
      return;
    }
    const lastDecodeLazyPixelRef = decodeLazyPixelRefEvents.get(event.pid)?.get(event.tid)?.at(-1);
    if (typeof lastDecodeLazyPixelRef?.args?.LazyPixelRef === "undefined") {
      return;
    }
    const paintEvent = paintImageByLazyPixelRef.get(lastDecodeLazyPixelRef.args.LazyPixelRef);
    if (!paintEvent) {
      return;
    }
    eventToPaintImage.set(event, paintEvent);
  }
}
async function finalize16(options2) {
  if (!options2.metadata?.hostDPR) {
    return;
  }
  const { devicePixelRatio: emulatedDpr } = data5();
  if (!emulatedDpr) {
    return;
  }
  for (const byThread of paintImageEvents.values()) {
    for (const paintEvents22 of byThread.values()) {
      for (const paintEvent of paintEvents22) {
        const cssPixelsWidth = paintEvent.args.data.width / options2.metadata.hostDPR;
        const cssPixelsHeight = paintEvent.args.data.height / options2.metadata.hostDPR;
        const width = cssPixelsWidth * emulatedDpr;
        const height = cssPixelsHeight * emulatedDpr;
        paintEventToCorrectedDisplaySize.set(paintEvent, { width, height });
      }
    }
  }
  didCorrectForHostDpr = true;
}
function data16() {
  return {
    paintImageByDrawLazyPixelRef: paintImageByLazyPixelRef,
    paintImageForEvent: eventToPaintImage,
    paintImageEventForUrl: urlToPaintImage,
    paintEventToCorrectedDisplaySize,
    didCorrectForHostDpr
  };
}
function reset17() {
  lastScheduleStyleRecalcByFrame = /* @__PURE__ */ new Map();
  lastInvalidationEventForFrame = /* @__PURE__ */ new Map();
  lastRecalcByFrame = /* @__PURE__ */ new Map();
  timerInstallEventsById = /* @__PURE__ */ new Map();
  eventToInitiatorMap2 = /* @__PURE__ */ new Map();
  initiatorToEventsMap = /* @__PURE__ */ new Map();
  requestIdleCallbackEventsById = /* @__PURE__ */ new Map();
  webSocketCreateEventsById = /* @__PURE__ */ new Map();
  schedulePostTaskCallbackEventsById = /* @__PURE__ */ new Map();
}
function storeInitiator(data312) {
  eventToInitiatorMap2.set(data312.event, data312.initiator);
  const eventsForInitiator = initiatorToEventsMap.get(data312.initiator) || [];
  eventsForInitiator.push(data312.event);
  initiatorToEventsMap.set(data312.initiator, eventsForInitiator);
}
function handleEvent17(event) {
  if (TraceEvents_exports.isScheduleStyleRecalculation(event)) {
    lastScheduleStyleRecalcByFrame.set(event.args.data.frame, event);
  } else if (TraceEvents_exports.isRecalcStyle(event)) {
    if (event.args.beginData) {
      lastRecalcByFrame.set(event.args.beginData.frame, event);
      const scheduledStyleForFrame = lastScheduleStyleRecalcByFrame.get(event.args.beginData.frame);
      if (scheduledStyleForFrame) {
        storeInitiator({
          event,
          initiator: scheduledStyleForFrame
        });
      }
    }
  } else if (TraceEvents_exports.isInvalidateLayout(event)) {
    let invalidationInitiator = event;
    if (!lastInvalidationEventForFrame.has(event.args.data.frame)) {
      const lastRecalcStyleForFrame = lastRecalcByFrame.get(event.args.data.frame);
      if (lastRecalcStyleForFrame) {
        const { endTime } = Timing_exports3.eventTimingsMicroSeconds(lastRecalcStyleForFrame);
        const initiatorOfRecalcStyle = eventToInitiatorMap2.get(lastRecalcStyleForFrame);
        if (initiatorOfRecalcStyle && endTime && endTime > event.ts) {
          invalidationInitiator = initiatorOfRecalcStyle;
        }
      }
    }
    lastInvalidationEventForFrame.set(event.args.data.frame, invalidationInitiator);
  } else if (TraceEvents_exports.isLayout(event)) {
    const lastInvalidation = lastInvalidationEventForFrame.get(event.args.beginData.frame);
    if (lastInvalidation) {
      storeInitiator({
        event,
        initiator: lastInvalidation
      });
    }
    lastInvalidationEventForFrame.delete(event.args.beginData.frame);
  } else if (TraceEvents_exports.isTimerInstall(event)) {
    timerInstallEventsById.set(event.args.data.timerId, event);
  } else if (TraceEvents_exports.isTimerFire(event)) {
    const matchingInstall = timerInstallEventsById.get(event.args.data.timerId);
    if (matchingInstall) {
      storeInitiator({ event, initiator: matchingInstall });
    }
  } else if (TraceEvents_exports.isRequestIdleCallback(event)) {
    requestIdleCallbackEventsById.set(event.args.data.id, event);
  } else if (TraceEvents_exports.isFireIdleCallback(event)) {
    const matchingRequestEvent = requestIdleCallbackEventsById.get(event.args.data.id);
    if (matchingRequestEvent) {
      storeInitiator({
        event,
        initiator: matchingRequestEvent
      });
    }
  } else if (TraceEvents_exports.isWebSocketCreate(event)) {
    webSocketCreateEventsById.set(event.args.data.identifier, event);
  } else if (TraceEvents_exports.isWebSocketInfo(event) || TraceEvents_exports.isWebSocketTransfer(event)) {
    const matchingCreateEvent = webSocketCreateEventsById.get(event.args.data.identifier);
    if (matchingCreateEvent) {
      storeInitiator({
        event,
        initiator: matchingCreateEvent
      });
    }
  } else if (TraceEvents_exports.isSchedulePostTaskCallback(event)) {
    schedulePostTaskCallbackEventsById.set(event.args.data.taskId, event);
  } else if (TraceEvents_exports.isRunPostTaskCallback(event) || TraceEvents_exports.isAbortPostTaskCallback(event)) {
    const matchingSchedule = schedulePostTaskCallbackEventsById.get(event.args.data.taskId);
    if (matchingSchedule) {
      storeInitiator({ event, initiator: matchingSchedule });
    }
  }
}
function createRelationshipsFromFlows() {
  const flows22 = data3().flows;
  for (let i = 0; i < flows22.length; i++) {
    const flow2 = flows22[i];
    for (let j = 0; j < flow2.length - 1; j++) {
      storeInitiator({ event: flow2[j + 1], initiator: flow2[j] });
    }
  }
}
function createRelationshipsFromAsyncJSCalls() {
  const asyncCallEntries = data9().schedulerToRunEntryPoints.entries();
  for (const [asyncCaller, asyncCallees] of asyncCallEntries) {
    for (const asyncCallee of asyncCallees) {
      storeInitiator({ event: asyncCallee, initiator: asyncCaller });
    }
  }
}
async function finalize17() {
  createRelationshipsFromFlows();
  createRelationshipsFromAsyncJSCalls();
}
function data17() {
  return {
    eventToInitiator: eventToInitiatorMap2,
    initiatorToEvents: initiatorToEventsMap
  };
}
function deps9() {
  return ["Flows", "AsyncJSCalls"];
}
function reset18() {
  frameStateByFrame.clear();
  maxInvalidationsPerEvent = null;
}
function handleUserConfig3(userConfig) {
  maxInvalidationsPerEvent = userConfig.maxInvalidationEventsPerEvent;
}
function getState(frameId) {
  let frameState = frameStateByFrame.get(frameId);
  if (!frameState) {
    frameState = {
      invalidationsForEvent: /* @__PURE__ */ new Map(),
      invalidationCountForEvent: /* @__PURE__ */ new Map(),
      lastRecalcStyleEvent: null,
      pendingInvalidations: [],
      hasPainted: false
    };
    frameStateByFrame.set(frameId, frameState);
  }
  return frameState;
}
function getFrameId(event) {
  if (TraceEvents_exports.isRecalcStyle(event) || TraceEvents_exports.isLayout(event)) {
    return event.args.beginData?.frame ?? null;
  }
  return event.args?.data?.frame ?? null;
}
function addInvalidationToEvent(frameState, event, invalidation) {
  const existingInvalidations = frameState.invalidationsForEvent.get(event) || [];
  existingInvalidations.push(invalidation);
  if (maxInvalidationsPerEvent !== null && existingInvalidations.length > maxInvalidationsPerEvent) {
    existingInvalidations.shift();
  }
  frameState.invalidationsForEvent.set(event, existingInvalidations);
  const count = frameState.invalidationCountForEvent.get(event) ?? 0;
  frameState.invalidationCountForEvent.set(event, count + 1);
}
function handleEvent18(event) {
  if (maxInvalidationsPerEvent === 0) {
    return;
  }
  const frameId = getFrameId(event);
  if (!frameId) {
    return;
  }
  const thisFrame = getState(frameId);
  if (TraceEvents_exports.isRecalcStyle(event)) {
    thisFrame.lastRecalcStyleEvent = event;
    for (const invalidation of thisFrame.pendingInvalidations) {
      if (TraceEvents_exports.isLayoutInvalidationTracking(invalidation)) {
        continue;
      }
      addInvalidationToEvent(thisFrame, event, invalidation);
    }
    return;
  }
  if (TraceEvents_exports.isInvalidationTracking(event)) {
    if (thisFrame.hasPainted) {
      thisFrame.pendingInvalidations.length = 0;
      thisFrame.lastRecalcStyleEvent = null;
      thisFrame.hasPainted = false;
    }
    if (thisFrame.lastRecalcStyleEvent && (TraceEvents_exports.isScheduleStyleInvalidationTracking(event) || TraceEvents_exports.isStyleRecalcInvalidationTracking(event) || TraceEvents_exports.isStyleInvalidatorInvalidationTracking(event))) {
      const recalcLastRecalc = thisFrame.lastRecalcStyleEvent;
      const recalcEndTime = recalcLastRecalc.ts + (recalcLastRecalc.dur || 0);
      if (event.ts >= recalcLastRecalc.ts && event.ts <= recalcEndTime) {
        addInvalidationToEvent(thisFrame, recalcLastRecalc, event);
      }
    }
    thisFrame.pendingInvalidations.push(event);
    return;
  }
  if (TraceEvents_exports.isPaint(event)) {
    thisFrame.hasPainted = true;
    return;
  }
  if (TraceEvents_exports.isLayout(event)) {
    for (const invalidation of thisFrame.pendingInvalidations) {
      if (!TraceEvents_exports.isLayoutInvalidationTracking(invalidation)) {
        continue;
      }
      addInvalidationToEvent(thisFrame, event, invalidation);
    }
  }
}
async function finalize18() {
}
function data18() {
  const invalidationsForEvent = /* @__PURE__ */ new Map();
  const invalidationCountForEvent = /* @__PURE__ */ new Map();
  for (const frame of frameStateByFrame.values()) {
    for (const [event, invalidations] of frame.invalidationsForEvent.entries()) {
      invalidationsForEvent.set(event, invalidations);
    }
    for (const [event, count] of frame.invalidationCountForEvent.entries()) {
      invalidationCountForEvent.set(event, count);
    }
  }
  return {
    invalidationsForEvent,
    invalidationCountForEvent
  };
}
function reset19() {
  metricScoresByFrameId = /* @__PURE__ */ new Map();
  pageLoadEventsArray = [];
  allMarkerEvents = [];
  selectedLCPCandidateEvents = /* @__PURE__ */ new Set();
}
function handleEvent19(event) {
  if (!TraceEvents_exports.eventIsPageLoadEvent(event)) {
    return;
  }
  pageLoadEventsArray.push(event);
}
function storePageLoadMetricAgainstNavigationId(navigation2, event) {
  const navigationId = navigation2.args.data?.navigationId;
  if (!navigationId) {
    throw new Error("Navigation event unexpectedly had no navigation ID.");
  }
  const frameId = getFrameIdForPageLoadEvent(event);
  const { rendererProcessesByFrame } = data5();
  const rendererProcessesInFrame = rendererProcessesByFrame.get(frameId);
  if (!rendererProcessesInFrame) {
    return;
  }
  const processData = rendererProcessesInFrame.get(event.pid);
  if (!processData) {
    return;
  }
  if (TraceEvents_exports.isNavigationStart(event)) {
    return;
  }
  if (TraceEvents_exports.isFirstContentfulPaint(event)) {
    const fcpTime = Timing_exports.Micro(event.ts - navigation2.ts);
    const classification = scoreClassificationForFirstContentfulPaint(fcpTime);
    const metricScore = { event, metricName: MetricName.FCP, classification, navigation: navigation2, timing: fcpTime };
    storeMetricScore(frameId, navigationId, metricScore);
    return;
  }
  if (TraceEvents_exports.isFirstPaint(event)) {
    const paintTime = Timing_exports.Micro(event.ts - navigation2.ts);
    const classification = ScoreClassification.UNCLASSIFIED;
    const metricScore = { event, metricName: MetricName.FP, classification, navigation: navigation2, timing: paintTime };
    storeMetricScore(frameId, navigationId, metricScore);
    return;
  }
  if (TraceEvents_exports.isMarkDOMContent(event)) {
    const dclTime = Timing_exports.Micro(event.ts - navigation2.ts);
    const metricScore = {
      event,
      metricName: MetricName.DCL,
      classification: scoreClassificationForDOMContentLoaded(dclTime),
      navigation: navigation2,
      timing: dclTime
    };
    storeMetricScore(frameId, navigationId, metricScore);
    return;
  }
  if (TraceEvents_exports.isInteractiveTime(event)) {
    const ttiValue = Timing_exports.Micro(event.ts - navigation2.ts);
    const tti = {
      event,
      metricName: MetricName.TTI,
      classification: scoreClassificationForTimeToInteractive(ttiValue),
      navigation: navigation2,
      timing: ttiValue
    };
    storeMetricScore(frameId, navigationId, tti);
    const tbtValue = Timing_exports3.milliToMicro(Timing_exports.Milli(event.args.args.total_blocking_time_ms));
    const tbt = {
      event,
      metricName: MetricName.TBT,
      classification: scoreClassificationForTotalBlockingTime(tbtValue),
      navigation: navigation2,
      timing: tbtValue
    };
    storeMetricScore(frameId, navigationId, tbt);
    return;
  }
  if (TraceEvents_exports.isMarkLoad(event)) {
    const loadTime = Timing_exports.Micro(event.ts - navigation2.ts);
    const metricScore = {
      event,
      metricName: MetricName.L,
      classification: ScoreClassification.UNCLASSIFIED,
      navigation: navigation2,
      timing: loadTime
    };
    storeMetricScore(frameId, navigationId, metricScore);
    return;
  }
  if (TraceEvents_exports.isLargestContentfulPaintCandidate(event)) {
    const candidateIndex = event.args.data?.candidateIndex;
    if (!candidateIndex) {
      throw new Error("Largest Contentful Paint unexpectedly had no candidateIndex.");
    }
    const lcpTime = Timing_exports.Micro(event.ts - navigation2.ts);
    const lcp = {
      event,
      metricName: MetricName.LCP,
      classification: scoreClassificationForLargestContentfulPaint(lcpTime),
      navigation: navigation2,
      timing: lcpTime
    };
    const metricsByNavigation = MapUtilities_exports.getWithDefault(metricScoresByFrameId, frameId, () => /* @__PURE__ */ new Map());
    const metrics2 = MapUtilities_exports.getWithDefault(metricsByNavigation, navigationId, () => /* @__PURE__ */ new Map());
    const lastLCPCandidate = metrics2.get(MetricName.LCP);
    if (lastLCPCandidate === void 0) {
      selectedLCPCandidateEvents.add(lcp.event);
      storeMetricScore(frameId, navigationId, lcp);
      return;
    }
    const lastLCPCandidateEvent = lastLCPCandidate.event;
    if (!TraceEvents_exports.isLargestContentfulPaintCandidate(lastLCPCandidateEvent)) {
      return;
    }
    const lastCandidateIndex = lastLCPCandidateEvent.args.data?.candidateIndex;
    if (!lastCandidateIndex) {
      return;
    }
    if (lastCandidateIndex < candidateIndex) {
      selectedLCPCandidateEvents.delete(lastLCPCandidateEvent);
      selectedLCPCandidateEvents.add(lcp.event);
      storeMetricScore(frameId, navigationId, lcp);
    }
    return;
  }
  if (TraceEvents_exports.isLayoutShift(event)) {
    return;
  }
  return assertNever(event, `Unexpected event type: ${event}`);
}
function storeMetricScore(frameId, navigationId, metricScore) {
  const metricsByNavigation = MapUtilities_exports.getWithDefault(metricScoresByFrameId, frameId, () => /* @__PURE__ */ new Map());
  const metrics2 = MapUtilities_exports.getWithDefault(metricsByNavigation, navigationId, () => /* @__PURE__ */ new Map());
  metrics2.delete(metricScore.metricName);
  metrics2.set(metricScore.metricName, metricScore);
}
function getFrameIdForPageLoadEvent(event) {
  if (TraceEvents_exports.isFirstContentfulPaint(event) || TraceEvents_exports.isInteractiveTime(event) || TraceEvents_exports.isLargestContentfulPaintCandidate(event) || TraceEvents_exports.isNavigationStart(event) || TraceEvents_exports.isLayoutShift(event) || TraceEvents_exports.isFirstPaint(event)) {
    return event.args.frame;
  }
  if (TraceEvents_exports.isMarkDOMContent(event) || TraceEvents_exports.isMarkLoad(event)) {
    const frameId = event.args.data?.frame;
    if (!frameId) {
      throw new Error("MarkDOMContent unexpectedly had no frame ID.");
    }
    return frameId;
  }
  assertNever(event, `Unexpected event type: ${event}`);
}
function getNavigationForPageLoadEvent(event) {
  if (TraceEvents_exports.isFirstContentfulPaint(event) || TraceEvents_exports.isLargestContentfulPaintCandidate(event) || TraceEvents_exports.isFirstPaint(event)) {
    const navigationId = event.args.data?.navigationId;
    if (!navigationId) {
      throw new Error("Trace event unexpectedly had no navigation ID.");
    }
    const { navigationsByNavigationId: navigationsByNavigationId22 } = data5();
    const navigation2 = navigationsByNavigationId22.get(navigationId);
    if (!navigation2) {
      return null;
    }
    return navigation2;
  }
  if (TraceEvents_exports.isMarkDOMContent(event) || TraceEvents_exports.isInteractiveTime(event) || TraceEvents_exports.isLayoutShift(event) || TraceEvents_exports.isMarkLoad(event)) {
    const frameId = getFrameIdForPageLoadEvent(event);
    const { navigationsByFrameId: navigationsByFrameId22 } = data5();
    return Trace_exports.getNavigationForTraceEvent(event, frameId, navigationsByFrameId22);
  }
  if (TraceEvents_exports.isNavigationStart(event)) {
    return null;
  }
  return assertNever(event, `Unexpected event type: ${event}`);
}
function scoreClassificationForFirstContentfulPaint(fcpScoreInMicroseconds) {
  const FCP_GOOD_TIMING = Timing_exports3.secondsToMicro(Timing_exports.Seconds(1.8));
  const FCP_MEDIUM_TIMING = Timing_exports3.secondsToMicro(Timing_exports.Seconds(3));
  let scoreClassification = ScoreClassification.BAD;
  if (fcpScoreInMicroseconds <= FCP_MEDIUM_TIMING) {
    scoreClassification = ScoreClassification.OK;
  }
  if (fcpScoreInMicroseconds <= FCP_GOOD_TIMING) {
    scoreClassification = ScoreClassification.GOOD;
  }
  return scoreClassification;
}
function scoreClassificationForTimeToInteractive(ttiTimeInMicroseconds) {
  const TTI_GOOD_TIMING = Timing_exports3.secondsToMicro(Timing_exports.Seconds(3.8));
  const TTI_MEDIUM_TIMING = Timing_exports3.secondsToMicro(Timing_exports.Seconds(7.3));
  let scoreClassification = ScoreClassification.BAD;
  if (ttiTimeInMicroseconds <= TTI_MEDIUM_TIMING) {
    scoreClassification = ScoreClassification.OK;
  }
  if (ttiTimeInMicroseconds <= TTI_GOOD_TIMING) {
    scoreClassification = ScoreClassification.GOOD;
  }
  return scoreClassification;
}
function scoreClassificationForLargestContentfulPaint(lcpTimeInMicroseconds) {
  const LCP_GOOD_TIMING = Timing_exports3.secondsToMicro(Timing_exports.Seconds(2.5));
  const LCP_MEDIUM_TIMING = Timing_exports3.secondsToMicro(Timing_exports.Seconds(4));
  let scoreClassification = ScoreClassification.BAD;
  if (lcpTimeInMicroseconds <= LCP_MEDIUM_TIMING) {
    scoreClassification = ScoreClassification.OK;
  }
  if (lcpTimeInMicroseconds <= LCP_GOOD_TIMING) {
    scoreClassification = ScoreClassification.GOOD;
  }
  return scoreClassification;
}
function scoreClassificationForDOMContentLoaded(_dclTimeInMicroseconds) {
  return ScoreClassification.UNCLASSIFIED;
}
function scoreClassificationForTotalBlockingTime(tbtTimeInMicroseconds) {
  const TBT_GOOD_TIMING = Timing_exports3.milliToMicro(Timing_exports.Milli(200));
  const TBT_MEDIUM_TIMING = Timing_exports3.milliToMicro(Timing_exports.Milli(600));
  let scoreClassification = ScoreClassification.BAD;
  if (tbtTimeInMicroseconds <= TBT_MEDIUM_TIMING) {
    scoreClassification = ScoreClassification.OK;
  }
  if (tbtTimeInMicroseconds <= TBT_GOOD_TIMING) {
    scoreClassification = ScoreClassification.GOOD;
  }
  return scoreClassification;
}
function gatherFinalLCPEvents() {
  const allFinalLCPEvents = [];
  const dataForAllFrames = [...metricScoresByFrameId.values()];
  const dataForAllNavigations = dataForAllFrames.flatMap((frameData) => [...frameData.values()]);
  for (let i = 0; i < dataForAllNavigations.length; i++) {
    const navigationData = dataForAllNavigations[i];
    const lcpInNavigation = navigationData.get(MetricName.LCP);
    if (!lcpInNavigation?.event) {
      continue;
    }
    allFinalLCPEvents.push(lcpInNavigation.event);
  }
  return allFinalLCPEvents;
}
async function finalize19() {
  pageLoadEventsArray.sort((a, b) => a.ts - b.ts);
  for (const pageLoadEvent of pageLoadEventsArray) {
    const navigation2 = getNavigationForPageLoadEvent(pageLoadEvent);
    if (navigation2) {
      storePageLoadMetricAgainstNavigationId(navigation2, pageLoadEvent);
    }
  }
  const allFinalLCPEvents = gatherFinalLCPEvents();
  const mainFrame = data5().mainFrameId;
  const allEventsButLCP = pageLoadEventsArray.filter((event) => !TraceEvents_exports.isLargestContentfulPaintCandidate(event));
  const markerEvents = [...allFinalLCPEvents, ...allEventsButLCP].filter(TraceEvents_exports.isMarkerEvent);
  allMarkerEvents = markerEvents.filter((event) => getFrameIdForPageLoadEvent(event) === mainFrame).sort((a, b) => a.ts - b.ts);
}
function data19() {
  return {
    metricScoresByFrameId,
    allMarkerEvents
  };
}
function deps10() {
  return ["Meta"];
}
function metricIsLCP(metric) {
  return metric.metricName === MetricName.LCP;
}
function reset20() {
  imagePaintsByNodeIdAndProcess = /* @__PURE__ */ new Map();
  lcpRequestByNavigationId = /* @__PURE__ */ new Map();
}
function handleEvent20(event) {
  if (!TraceEvents_exports.isLargestImagePaintCandidate(event) || !event.args.data) {
    return;
  }
  const imagePaintsByNodeId = MapUtilities_exports.getWithDefault(imagePaintsByNodeIdAndProcess, event.pid, () => /* @__PURE__ */ new Map());
  imagePaintsByNodeId.set(event.args.data.DOMNodeId, event);
}
async function finalize20() {
  const requests = data6().byTime;
  const { traceBounds: traceBounds22, navigationsByNavigationId: navigationsByNavigationId22 } = data5();
  const metricScoresByFrameId22 = data19().metricScoresByFrameId;
  for (const [navigationId, navigation2] of navigationsByNavigationId22) {
    const lcpMetric = metricScoresByFrameId22.get(navigation2.args.frame)?.get(navigationId)?.get(MetricName.LCP);
    const lcpEvent = lcpMetric?.event;
    if (!lcpEvent || !TraceEvents_exports.isLargestContentfulPaintCandidate(lcpEvent)) {
      continue;
    }
    const nodeId = lcpEvent.args.data?.nodeId;
    if (!nodeId) {
      continue;
    }
    const lcpImagePaintEvent = imagePaintsByNodeIdAndProcess.get(lcpEvent.pid)?.get(nodeId);
    const lcpUrl = lcpImagePaintEvent?.args.data?.imageUrl;
    if (!lcpUrl) {
      continue;
    }
    const startTime = navigation2?.ts ?? traceBounds22.min;
    const endTime = lcpImagePaintEvent.ts;
    let lcpRequest;
    for (const request3 of requests) {
      if (request3.ts < startTime) {
        continue;
      }
      if (request3.ts >= endTime) {
        break;
      }
      if (request3.args.data.url === lcpUrl || request3.args.data.redirects.some((r) => r.url === lcpUrl)) {
        lcpRequest = request3;
        break;
      }
    }
    if (lcpRequest) {
      lcpRequestByNavigationId.set(navigationId, lcpRequest);
    }
  }
}
function data20() {
  return { lcpRequestByNavigationId };
}
function deps11() {
  return ["Meta", "NetworkRequests", "PageLoadMetrics"];
}
function reset21() {
  textPaintByDOMNodeId = /* @__PURE__ */ new Map();
}
function handleEvent21(event) {
  if (!TraceEvents_exports.isLargestTextPaintCandidate(event)) {
    return;
  }
  if (!event.args.data) {
    return;
  }
  textPaintByDOMNodeId.set(event.args.data.DOMNodeId, event);
}
async function finalize21() {
}
function data21() {
  return textPaintByDOMNodeId;
}
function reset22() {
  unpairedAsyncEvents = [];
  legacyScreenshotEvents = [];
  syntheticScreenshots = [];
  modernScreenshotEvents = [];
  frameSequenceToTs = {};
}
function handleEvent22(event) {
  if (TraceEvents_exports.isLegacyScreenshot(event)) {
    legacyScreenshotEvents.push(event);
  } else if (TraceEvents_exports.isScreenshot(event)) {
    modernScreenshotEvents.push(event);
  } else if (TraceEvents_exports.isPipelineReporter(event)) {
    unpairedAsyncEvents.push(event);
  }
}
async function finalize22() {
  const pipelineReporterEvents = Trace_exports.createMatchedSortedSyntheticEvents(unpairedAsyncEvents);
  frameSequenceToTs = Object.fromEntries(pipelineReporterEvents.map((evt) => {
    const args2 = evt.args.data.beginEvent.args;
    const frameReporter = "frame_reporter" in args2 ? args2.frame_reporter : args2.chrome_frame_reporter;
    const frameSequenceId = frameReporter.frame_sequence;
    const presentationTs = Timing_exports.Micro(evt.ts + evt.dur);
    return [frameSequenceId, presentationTs];
  }));
  for (const snapshotEvent of legacyScreenshotEvents) {
    const { cat, name, ph, pid, tid } = snapshotEvent;
    const syntheticEvent = SyntheticEvents_exports.SyntheticEventsManager.registerSyntheticEvent({
      rawSourceEvent: snapshotEvent,
      cat,
      name,
      ph,
      pid,
      tid,
      // TODO(paulirish, crbug.com/41363012): investigate why getPresentationTimestamp(snapshotEvent) seems less accurate. Resolve screenshot timing inaccuracy.
      // `getPresentationTimestamp(snapshotEvent) - snapshotEvent.ts` is how many microsec the screenshot should be adjusted to the right/later
      ts: snapshotEvent.ts,
      args: {
        dataUri: `data:image/jpg;base64,${snapshotEvent.args.snapshot}`
      }
    });
    syntheticScreenshots.push(syntheticEvent);
  }
}
function screenshotImageDataUri(event) {
  if (TraceEvents_exports.isLegacySyntheticScreenshot(event)) {
    return event.args.dataUri;
  }
  return `data:image/jpg;base64,${event.args.snapshot}`;
}
function data22() {
  return {
    legacySyntheticScreenshots: syntheticScreenshots.length ? syntheticScreenshots : null,
    screenshots: modernScreenshotEvents.length ? modernScreenshotEvents : null
  };
}
function deps12() {
  return ["Meta"];
}
function reset23() {
  layoutShiftEvents = [];
  layoutInvalidationEvents = [];
  scheduleStyleInvalidationEvents = [];
  styleRecalcInvalidationEvents = [];
  prePaintEvents = [];
  paintImageEvents2 = [];
  renderFrameImplCreateChildFrameEvents = [];
  layoutImageUnsizedEvents = [];
  domLoadingEvents = [];
  remoteFonts = [];
  backendNodeIds = /* @__PURE__ */ new Set();
  clusters = [];
  sessionMaxScore = 0;
  scoreRecords = [];
  clsWindowID = -1;
  clustersByNavigationId = /* @__PURE__ */ new Map();
}
function handleEvent23(event) {
  if (TraceEvents_exports.isLayoutShift(event) && !event.args.data?.had_recent_input) {
    layoutShiftEvents.push(event);
    return;
  }
  if (TraceEvents_exports.isLayoutInvalidationTracking(event)) {
    layoutInvalidationEvents.push(event);
    return;
  }
  if (TraceEvents_exports.isScheduleStyleInvalidationTracking(event)) {
    scheduleStyleInvalidationEvents.push(event);
  }
  if (TraceEvents_exports.isStyleRecalcInvalidationTracking(event)) {
    styleRecalcInvalidationEvents.push(event);
  }
  if (TraceEvents_exports.isPrePaint(event)) {
    prePaintEvents.push(event);
    return;
  }
  if (TraceEvents_exports.isRenderFrameImplCreateChildFrame(event)) {
    renderFrameImplCreateChildFrameEvents.push(event);
  }
  if (TraceEvents_exports.isDomLoading(event)) {
    domLoadingEvents.push(event);
  }
  if (TraceEvents_exports.isLayoutImageUnsized(event)) {
    layoutImageUnsizedEvents.push(event);
  }
  if (TraceEvents_exports.isBeginRemoteFontLoad(event)) {
    remoteFonts.push({
      display: event.args.display,
      url: event.args.url,
      beginRemoteFontLoadEvent: event
    });
  }
  if (TraceEvents_exports.isRemoteFontLoaded(event)) {
    for (const remoteFont of remoteFonts) {
      if (remoteFont.url === event.args.url) {
        remoteFont.name = event.args.name;
      }
    }
  }
  if (TraceEvents_exports.isPaintImage(event)) {
    paintImageEvents2.push(event);
  }
}
function traceWindowFromTime(time2) {
  return {
    min: time2,
    max: time2,
    range: Timing_exports.Micro(0)
  };
}
function updateTraceWindowMax(traceWindow, newMax) {
  traceWindow.max = newMax;
  traceWindow.range = Timing_exports.Micro(traceWindow.max - traceWindow.min);
}
function findScreenshots(timestamp) {
  const data312 = data22();
  if (data312.screenshots) {
    const before = Trace_exports.findPreviousEventBeforeTimestamp(data312.screenshots, timestamp);
    const after = before ? data312.screenshots[data312.screenshots.indexOf(before) + 1] : null;
    return { before, after };
  }
  if (data312.legacySyntheticScreenshots) {
    const before = Trace_exports.findPreviousEventBeforeTimestamp(data312.legacySyntheticScreenshots, timestamp);
    const after = before ? data312.legacySyntheticScreenshots[data312.legacySyntheticScreenshots.indexOf(before) + 1] : null;
    return { before, after };
  }
  return { before: null, after: null };
}
function buildScoreRecords() {
  const { traceBounds: traceBounds22 } = data5();
  scoreRecords.push({ ts: traceBounds22.min, score: 0 });
  for (const cluster of clusters) {
    let clusterScore = 0;
    if (cluster.events[0].args.data) {
      scoreRecords.push({ ts: cluster.clusterWindow.min, score: cluster.events[0].args.data.weighted_score_delta });
    }
    for (let i = 0; i < cluster.events.length; i++) {
      const event = cluster.events[i];
      if (!event.args.data) {
        continue;
      }
      clusterScore += event.args.data.weighted_score_delta;
      scoreRecords.push({ ts: event.ts, score: clusterScore });
    }
    scoreRecords.push({ ts: cluster.clusterWindow.max, score: 0 });
  }
}
function collectNodes() {
  backendNodeIds.clear();
  for (const layoutShift of layoutShiftEvents) {
    if (!layoutShift.args.data?.impacted_nodes) {
      continue;
    }
    for (const node2 of layoutShift.args.data.impacted_nodes) {
      backendNodeIds.add(node2.node_id);
    }
  }
  for (const layoutInvalidation of layoutInvalidationEvents) {
    if (!layoutInvalidation.args.data?.nodeId) {
      continue;
    }
    backendNodeIds.add(layoutInvalidation.args.data.nodeId);
  }
  for (const scheduleStyleInvalidation of scheduleStyleInvalidationEvents) {
    if (!scheduleStyleInvalidation.args.data?.nodeId) {
      continue;
    }
    backendNodeIds.add(scheduleStyleInvalidation.args.data.nodeId);
  }
}
async function finalize23() {
  layoutShiftEvents.sort((a, b) => a.ts - b.ts);
  prePaintEvents.sort((a, b) => a.ts - b.ts);
  layoutInvalidationEvents.sort((a, b) => a.ts - b.ts);
  renderFrameImplCreateChildFrameEvents.sort((a, b) => a.ts - b.ts);
  domLoadingEvents.sort((a, b) => a.ts - b.ts);
  layoutImageUnsizedEvents.sort((a, b) => a.ts - b.ts);
  remoteFonts.sort((a, b) => a.beginRemoteFontLoadEvent.ts - b.beginRemoteFontLoadEvent.ts);
  paintImageEvents2.sort((a, b) => a.ts - b.ts);
  await buildLayoutShiftsClusters();
  buildScoreRecords();
  collectNodes();
}
async function buildLayoutShiftsClusters() {
  const { navigationsByFrameId: navigationsByFrameId22, mainFrameId: mainFrameId22, traceBounds: traceBounds22 } = data5();
  const navigations = navigationsByFrameId22.get(mainFrameId22) || [];
  if (layoutShiftEvents.length === 0) {
    return;
  }
  let firstShiftTime = layoutShiftEvents[0].ts;
  let lastShiftTime = layoutShiftEvents[0].ts;
  let lastShiftNavigation = null;
  for (const event of layoutShiftEvents) {
    const clusterDurationExceeded = event.ts - firstShiftTime > MAX_CLUSTER_DURATION;
    const maxTimeDeltaSinceLastShiftExceeded = event.ts - lastShiftTime > MAX_SHIFT_TIME_DELTA;
    const currentShiftNavigation = ArrayUtilities_exports.nearestIndexFromEnd(navigations, (nav) => nav.ts < event.ts);
    const hasNavigated = lastShiftNavigation !== currentShiftNavigation && currentShiftNavigation !== null;
    if (clusterDurationExceeded || maxTimeDeltaSinceLastShiftExceeded || hasNavigated || !clusters.length) {
      const clusterStartTime = event.ts;
      const endTimeByMaxSessionDuration = clusterDurationExceeded ? firstShiftTime + MAX_CLUSTER_DURATION : Infinity;
      const endTimeByMaxShiftGap = maxTimeDeltaSinceLastShiftExceeded ? lastShiftTime + MAX_SHIFT_TIME_DELTA : Infinity;
      const endTimeByNavigation = hasNavigated ? navigations[currentShiftNavigation].ts : Infinity;
      const previousClusterEndTime = Math.min(endTimeByMaxSessionDuration, endTimeByMaxShiftGap, endTimeByNavigation);
      if (clusters.length > 0) {
        const currentCluster2 = clusters[clusters.length - 1];
        updateTraceWindowMax(currentCluster2.clusterWindow, Timing_exports.Micro(previousClusterEndTime));
      }
      const navigationId = currentShiftNavigation === null ? TraceEvents_exports.NO_NAVIGATION : navigations[currentShiftNavigation].args.data?.navigationId;
      clusters.push(SyntheticEvents_exports.SyntheticEventsManager.registerSyntheticEvent({
        name: "SyntheticLayoutShiftCluster",
        // Will be replaced by the worst layout shift in the next for loop.
        rawSourceEvent: event,
        events: [],
        clusterWindow: traceWindowFromTime(clusterStartTime),
        clusterCumulativeScore: 0,
        scoreWindows: {
          good: traceWindowFromTime(clusterStartTime)
        },
        navigationId,
        // Set default Event so that this event is treated accordingly for the track appender.
        ts: event.ts,
        pid: event.pid,
        tid: event.tid,
        ph: TraceEvents_exports.Phase.COMPLETE,
        cat: "",
        dur: Timing_exports.Micro(-1)
        // This `cluster.dur` is updated below.
      }));
      firstShiftTime = clusterStartTime;
    }
    const currentCluster = clusters[clusters.length - 1];
    const timeFromNavigation = currentShiftNavigation !== null ? Timing_exports.Micro(event.ts - navigations[currentShiftNavigation].ts) : void 0;
    currentCluster.clusterCumulativeScore += event.args.data ? event.args.data.weighted_score_delta : 0;
    if (!event.args.data) {
      continue;
    }
    const shift = SyntheticEvents_exports.SyntheticEventsManager.registerSyntheticEvent({
      rawSourceEvent: event,
      ...event,
      name: TraceEvents_exports.Name.SYNTHETIC_LAYOUT_SHIFT,
      args: {
        frame: event.args.frame,
        data: {
          ...event.args.data,
          rawEvent: event,
          navigationId: currentCluster.navigationId ?? void 0
        }
      },
      parsedData: {
        timeFromNavigation,
        screenshots: findScreenshots(event.ts),
        cumulativeWeightedScoreInWindow: currentCluster.clusterCumulativeScore,
        // The score of the session window is temporarily set to 0 just
        // to initialize it. Since we need to get the score of all shifts
        // in the session window to determine its value, its definite
        // value is set when stepping through the built clusters.
        sessionWindowData: { cumulativeWindowScore: 0, id: clusters.length }
      }
    });
    currentCluster.events.push(shift);
    updateTraceWindowMax(currentCluster.clusterWindow, event.ts);
    lastShiftTime = event.ts;
    lastShiftNavigation = currentShiftNavigation;
  }
  for (const cluster of clusters) {
    let weightedScore = 0;
    let windowID = -1;
    if (cluster === clusters[clusters.length - 1]) {
      const clusterEndByMaxDuration = MAX_CLUSTER_DURATION + cluster.clusterWindow.min;
      const clusterEndByMaxGap = cluster.clusterWindow.max + MAX_SHIFT_TIME_DELTA;
      const nextNavigationIndex = ArrayUtilities_exports.nearestIndexFromBeginning(navigations, (nav) => nav.ts > cluster.clusterWindow.max);
      const nextNavigationTime = nextNavigationIndex ? navigations[nextNavigationIndex].ts : Infinity;
      const clusterEnd = Math.min(clusterEndByMaxDuration, clusterEndByMaxGap, traceBounds22.max, nextNavigationTime);
      updateTraceWindowMax(cluster.clusterWindow, Timing_exports.Micro(clusterEnd));
    }
    let largestScore = 0;
    let worstShiftEvent = null;
    for (const shift of cluster.events) {
      weightedScore += shift.args.data ? shift.args.data.weighted_score_delta : 0;
      windowID = shift.parsedData.sessionWindowData.id;
      const ts = shift.ts;
      shift.parsedData.sessionWindowData.cumulativeWindowScore = cluster.clusterCumulativeScore;
      if (weightedScore < LayoutShiftsThreshold.NEEDS_IMPROVEMENT) {
        updateTraceWindowMax(cluster.scoreWindows.good, ts);
      } else if (weightedScore >= LayoutShiftsThreshold.NEEDS_IMPROVEMENT && weightedScore < LayoutShiftsThreshold.BAD) {
        if (!cluster.scoreWindows.needsImprovement) {
          updateTraceWindowMax(cluster.scoreWindows.good, Timing_exports.Micro(ts - 1));
          cluster.scoreWindows.needsImprovement = traceWindowFromTime(ts);
        }
        updateTraceWindowMax(cluster.scoreWindows.needsImprovement, ts);
      } else if (weightedScore >= LayoutShiftsThreshold.BAD) {
        if (!cluster.scoreWindows.bad) {
          if (cluster.scoreWindows.needsImprovement) {
            updateTraceWindowMax(cluster.scoreWindows.needsImprovement, Timing_exports.Micro(ts - 1));
          } else {
            updateTraceWindowMax(cluster.scoreWindows.good, Timing_exports.Micro(ts - 1));
          }
          cluster.scoreWindows.bad = traceWindowFromTime(shift.ts);
        }
        updateTraceWindowMax(cluster.scoreWindows.bad, ts);
      }
      if (cluster.scoreWindows.bad) {
        updateTraceWindowMax(cluster.scoreWindows.bad, cluster.clusterWindow.max);
      } else if (cluster.scoreWindows.needsImprovement) {
        updateTraceWindowMax(cluster.scoreWindows.needsImprovement, cluster.clusterWindow.max);
      } else {
        updateTraceWindowMax(cluster.scoreWindows.good, cluster.clusterWindow.max);
      }
      const score = shift.args.data?.weighted_score_delta;
      if (score !== void 0 && score > largestScore) {
        largestScore = score;
        worstShiftEvent = shift;
      }
    }
    if (worstShiftEvent) {
      cluster.worstShiftEvent = worstShiftEvent;
      cluster.rawSourceEvent = worstShiftEvent;
    }
    cluster.ts = cluster.events[0].ts;
    const lastShiftTimings = Timing_exports3.eventTimingsMicroSeconds(cluster.events[cluster.events.length - 1]);
    cluster.dur = Timing_exports.Micro(lastShiftTimings.endTime - cluster.events[0].ts + MAX_SHIFT_TIME_DELTA);
    if (weightedScore > sessionMaxScore) {
      clsWindowID = windowID;
      sessionMaxScore = weightedScore;
    }
    if (cluster.navigationId) {
      const clustersForId = MapUtilities_exports.getWithDefault(clustersByNavigationId, cluster.navigationId, () => {
        return [];
      });
      clustersForId.push(cluster);
    }
  }
}
function data23() {
  return {
    clusters,
    sessionMaxScore,
    clsWindowID,
    prePaintEvents,
    layoutInvalidationEvents,
    scheduleStyleInvalidationEvents,
    styleRecalcInvalidationEvents,
    renderFrameImplCreateChildFrameEvents,
    domLoadingEvents,
    layoutImageUnsizedEvents,
    remoteFonts,
    scoreRecords,
    backendNodeIds,
    clustersByNavigationId,
    paintImageEvents: paintImageEvents2
  };
}
function deps13() {
  return ["Screenshots", "Meta"];
}
function scoreClassificationForLayoutShift(score) {
  let state = ScoreClassification.GOOD;
  if (score >= LayoutShiftsThreshold.NEEDS_IMPROVEMENT) {
    state = ScoreClassification.OK;
  }
  if (score >= LayoutShiftsThreshold.BAD) {
    state = ScoreClassification.BAD;
  }
  return state;
}
function reset24() {
  updateCountersByProcess = /* @__PURE__ */ new Map();
}
function handleEvent24(event) {
  if (TraceEvents_exports.isUpdateCounters(event)) {
    const countersForProcess = MapUtilities_exports.getWithDefault(updateCountersByProcess, event.pid, () => []);
    countersForProcess.push(event);
    updateCountersByProcess.set(event.pid, countersForProcess);
  }
}
async function finalize24() {
}
function data24() {
  return { updateCountersByProcess };
}
function reset25() {
  frames = /* @__PURE__ */ new Map();
}
function handleEvent25(event) {
  if (TraceEvents_exports.isTracingStartedInBrowser(event)) {
    for (const frame of event.args.data?.frames ?? []) {
      frames.set(frame.frame, frame);
    }
    return;
  }
  if (TraceEvents_exports.isCommitLoad(event)) {
    const frameData = event.args.data;
    if (!frameData) {
      return;
    }
    const frame = frames.get(frameData.frame);
    if (!frame) {
      return;
    }
    frames.set(frameData.frame, {
      ...frame,
      url: frameData.url || frame.url,
      name: frameData.name || frameData.name
    });
  }
}
async function finalize25() {
}
function data25() {
  return {
    frames
  };
}
function completeURL(base, url) {
  if (url.startsWith("data:") || url.startsWith("blob:") || url.startsWith("javascript:") || url.startsWith("mailto:")) {
    return url;
  }
  try {
    return new URL(url, base).href;
  } catch {
  }
  return null;
}
function deps14() {
  return ["Meta", "NetworkRequests"];
}
function reset26() {
  scriptById = /* @__PURE__ */ new Map();
}
function handleEvent26(event) {
  const getOrMakeScript = /* @__PURE__ */ __name((isolate, scriptIdAsNumber) => {
    const scriptId = String(scriptIdAsNumber);
    const key = `${isolate}.${scriptId}`;
    return MapUtilities_exports.getWithDefault(scriptById, key, () => ({ isolate, scriptId, frame: "", ts: event.ts }));
  }, "getOrMakeScript");
  if (TraceEvents_exports.isRundownScriptCompiled(event) && event.args.data) {
    const { isolate, scriptId, frame } = event.args.data;
    const script = getOrMakeScript(isolate, scriptId);
    script.frame = frame;
    script.ts = event.ts;
    return;
  }
  if (TraceEvents_exports.isRundownScript(event)) {
    const { isolate, scriptId, url, sourceUrl, sourceMapUrl, sourceMapUrlElided } = event.args.data;
    const script = getOrMakeScript(isolate, scriptId);
    script.url = url;
    script.ts = event.ts;
    if (sourceUrl) {
      script.sourceUrl = sourceUrl;
    }
    if (sourceMapUrlElided) {
      script.sourceMapUrlElided = true;
    } else if (sourceMapUrl) {
      script.sourceMapUrl = sourceMapUrl;
    }
    return;
  }
  if (TraceEvents_exports.isRundownScriptSource(event)) {
    const { isolate, scriptId, sourceText } = event.args.data;
    const script = getOrMakeScript(isolate, scriptId);
    script.content = sourceText;
    return;
  }
  if (TraceEvents_exports.isRundownScriptSourceLarge(event)) {
    const { isolate, scriptId, sourceText } = event.args.data;
    const script = getOrMakeScript(isolate, scriptId);
    script.content = (script.content ?? "") + sourceText;
    return;
  }
}
function findFrame(meta, frameId) {
  for (const frames22 of meta.frameByProcessId?.values()) {
    const frame = frames22.get(frameId);
    if (frame) {
      return frame;
    }
  }
  return null;
}
function findNetworkRequest(networkRequests, script) {
  if (!script.url) {
    return null;
  }
  return networkRequests.find((request3) => request3.args.data.url === script.url) ?? null;
}
function computeMappingEndColumns(map2) {
  const result = /* @__PURE__ */ new Map();
  const mappings = map2.mappings();
  for (let i = 0; i < mappings.length - 1; i++) {
    const mapping = mappings[i];
    const nextMapping = mappings[i + 1];
    if (mapping.lineNumber === nextMapping.lineNumber) {
      result.set(mapping, nextMapping.columnNumber);
    }
  }
  return result;
}
function computeGeneratedFileSizes(script) {
  if (!script.sourceMap) {
    throw new Error("expected source map");
  }
  const map2 = script.sourceMap;
  const content = script.content ?? "";
  const contentLength = content.length;
  const lines = content.split("\n");
  const files = {};
  const totalBytes = contentLength;
  let unmappedBytes = totalBytes;
  const mappingEndCols = computeMappingEndColumns(script.sourceMap);
  for (const mapping of map2.mappings()) {
    const source2 = mapping.sourceURL;
    const lineNum = mapping.lineNumber;
    const colNum = mapping.columnNumber;
    const lastColNum = mappingEndCols.get(mapping);
    if (!source2) {
      continue;
    }
    const line = lines[lineNum];
    if (line === null || line === void 0) {
      const errorMessage = `${map2.url()} mapping for line out of bounds: ${lineNum + 1}`;
      return { errorMessage };
    }
    if (colNum > line.length) {
      const errorMessage = `${map2.url()} mapping for column out of bounds: ${lineNum + 1}:${colNum}`;
      return { errorMessage };
    }
    let mappingLength = 0;
    if (lastColNum !== void 0) {
      if (lastColNum > line.length) {
        const errorMessage = `${map2.url()} mapping for last column out of bounds: ${lineNum + 1}:${lastColNum}`;
        return { errorMessage };
      }
      mappingLength = lastColNum - colNum;
    } else {
      mappingLength = line.length - colNum + 1;
    }
    files[source2] = (files[source2] || 0) + mappingLength;
    unmappedBytes -= mappingLength;
  }
  return {
    files,
    unmappedBytes,
    totalBytes
  };
}
function getScriptGeneratedSizes(script) {
  if (script.sourceMap && !script.sizes) {
    script.sizes = computeGeneratedFileSizes(script);
  }
  return script.sizes ?? null;
}
function findCachedRawSourceMap(script, options2) {
  if (options2.isFreshRecording || !options2.metadata?.sourceMaps) {
    return;
  }
  if (script.sourceMapUrlElided) {
    if (!script.url) {
      return;
    }
    const cachedSourceMap = options2.metadata.sourceMaps.find((m) => m.url === script.url);
    if (cachedSourceMap) {
      return cachedSourceMap.sourceMap;
    }
    return;
  }
  if (!script.sourceMapUrl) {
    return;
  }
  const isDataUrl = script.sourceMapUrl.startsWith("data:");
  if (!isDataUrl) {
    const cachedSourceMap = options2.metadata.sourceMaps.find((m) => m.sourceMapUrl === script.sourceMapUrl);
    if (cachedSourceMap) {
      return cachedSourceMap.sourceMap;
    }
  }
  return;
}
async function finalize26(options2) {
  const meta = data5();
  const networkRequests = [...data6().byId.values()];
  const documentUrls = /* @__PURE__ */ new Set();
  for (const frames22 of meta.frameByProcessId.values()) {
    for (const frame of frames22.values()) {
      documentUrls.add(frame.url);
    }
  }
  for (const script of scriptById.values()) {
    script.request = findNetworkRequest(networkRequests, script) ?? void 0;
    script.inline = !!script.url && documentUrls.has(script.url);
  }
  if (!options2.resolveSourceMap) {
    return;
  }
  const promises2 = [];
  for (const script of scriptById.values()) {
    if (!script.frame || !script.url || !script.sourceMapUrl && !script.sourceMapUrlElided) {
      continue;
    }
    const frameUrl = findFrame(meta, script.frame)?.url;
    if (!frameUrl) {
      continue;
    }
    let sourceUrl = script.url;
    if (script.sourceUrl) {
      sourceUrl = completeURL(frameUrl, script.sourceUrl) ?? script.sourceUrl;
    }
    let sourceMapUrl;
    if (script.sourceMapUrl) {
      sourceMapUrl = completeURL(sourceUrl, script.sourceMapUrl);
      if (!sourceMapUrl) {
        continue;
      }
      script.sourceMapUrl = sourceMapUrl;
    }
    const params = {
      scriptId: script.scriptId,
      scriptUrl: script.url,
      sourceUrl,
      sourceMapUrl: sourceMapUrl ?? "",
      frame: script.frame,
      cachedRawSourceMap: findCachedRawSourceMap(script, options2)
    };
    const promise = options2.resolveSourceMap(params).then((sourceMap2) => {
      if (sourceMap2) {
        script.sourceMap = sourceMap2;
      }
    });
    promises2.push(promise.catch((e) => {
      console.error("Uncaught error when resolving source map", params, e);
    }));
  }
  await Promise.all(promises2);
}
function data26() {
  return {
    scripts: [...scriptById.values()]
  };
}
function reset27() {
  lastRecalcStyleEvent = null;
  lastInvalidatedNode = null;
  selectorDataForRecalcStyle = /* @__PURE__ */ new Map();
  invalidatedNodeList = [];
}
function handleEvent27(event) {
  if (TraceEvents_exports.isStyleRecalcInvalidationTracking(event)) {
    if (event.args.data.subtree && event.args.data.reason === TraceEvents_exports.StyleRecalcInvalidationReason.RELATED_STYLE_RULE && lastInvalidatedNode && event.args.data.nodeId === lastInvalidatedNode.backendNodeId) {
      lastInvalidatedNode.subtree = true;
      return;
    }
  }
  if (TraceEvents_exports.isSelectorStats(event) && lastRecalcStyleEvent && event.args.selector_stats) {
    selectorDataForRecalcStyle.set(lastRecalcStyleEvent, {
      timings: event.args.selector_stats.selector_timings
    });
    return;
  }
  if (TraceEvents_exports.isStyleInvalidatorInvalidationTracking(event)) {
    const selectorList = new Array();
    event.args.data.selectors?.forEach((selector) => {
      selectorList.push({
        selector: selector.selector,
        styleSheetId: selector.style_sheet_id
      });
    });
    if (selectorList.length > 0) {
      lastInvalidatedNode = {
        frame: event.args.data.frame,
        backendNodeId: event.args.data.nodeId,
        type: TraceEvents_exports.InvalidationEventType.StyleInvalidatorInvalidationTracking,
        selectorList,
        ts: event.ts,
        tts: event.tts,
        subtree: false,
        lastRecalcStyleEventTs: lastRecalcStyleEvent ? lastRecalcStyleEvent.ts : Timing_exports.Micro(0)
      };
      invalidatedNodeList.push(lastInvalidatedNode);
    }
  }
  if (TraceEvents_exports.isRecalcStyle(event)) {
    lastRecalcStyleEvent = event;
    return;
  }
}
async function finalize27() {
}
function data27() {
  return {
    dataForRecalcStyleEvent: selectorDataForRecalcStyle,
    invalidatedNodeList
  };
}
function reset28() {
  beginCommitCompositorFrameEvents = [];
  parseMetaViewportEvents = [];
  interactionEvents = [];
  eventTimingStartEventsForInteractions = [];
  eventTimingEndEventsForInteractions = [];
  interactionEventsWithNoNesting = [];
  longestInteractionEvent = null;
}
function handleEvent28(event) {
  if (TraceEvents_exports.isBeginCommitCompositorFrame(event)) {
    beginCommitCompositorFrameEvents.push(event);
    return;
  }
  if (TraceEvents_exports.isParseMetaViewport(event)) {
    parseMetaViewportEvents.push(event);
    return;
  }
  if (!TraceEvents_exports.isEventTiming(event)) {
    return;
  }
  if (TraceEvents_exports.isEventTimingEnd(event)) {
    eventTimingEndEventsForInteractions.push(event);
  }
  if (!event.args.data || !TraceEvents_exports.isEventTimingStart(event)) {
    return;
  }
  const { duration: duration2, interactionId } = event.args.data;
  if (duration2 < 1 || interactionId === void 0 || interactionId === 0) {
    return;
  }
  eventTimingStartEventsForInteractions.push(event);
}
function categoryOfInteraction(interaction) {
  if (pointerEventTypes.has(interaction.type)) {
    return "POINTER";
  }
  if (keyboardEventTypes.has(interaction.type)) {
    return "KEYBOARD";
  }
  return "OTHER";
}
function removeNestedInteractionsAndSetProcessingTime(interactions) {
  const earliestEventForEndTimePerCategory = {
    POINTER: /* @__PURE__ */ new Map(),
    KEYBOARD: /* @__PURE__ */ new Map(),
    OTHER: /* @__PURE__ */ new Map()
  };
  function storeEventIfEarliestForCategoryAndEndTime(interaction) {
    const category = categoryOfInteraction(interaction);
    const earliestEventForEndTime = earliestEventForEndTimePerCategory[category];
    const endTime = Timing_exports.Micro(interaction.ts + interaction.dur);
    const earliestCurrentEvent = earliestEventForEndTime.get(endTime);
    if (!earliestCurrentEvent) {
      earliestEventForEndTime.set(endTime, interaction);
      return;
    }
    if (interaction.ts < earliestCurrentEvent.ts) {
      earliestEventForEndTime.set(endTime, interaction);
    } else if (interaction.ts === earliestCurrentEvent.ts && interaction.interactionId === earliestCurrentEvent.interactionId) {
      const currentProcessingDuration = earliestCurrentEvent.processingEnd - earliestCurrentEvent.processingStart;
      const newProcessingDuration = interaction.processingEnd - interaction.processingStart;
      if (newProcessingDuration > currentProcessingDuration) {
        earliestEventForEndTime.set(endTime, interaction);
      }
    }
    if (interaction.processingStart < earliestCurrentEvent.processingStart) {
      earliestCurrentEvent.processingStart = interaction.processingStart;
      writeSyntheticTimespans(earliestCurrentEvent);
    }
    if (interaction.processingEnd > earliestCurrentEvent.processingEnd) {
      earliestCurrentEvent.processingEnd = interaction.processingEnd;
      writeSyntheticTimespans(earliestCurrentEvent);
    }
  }
  __name(storeEventIfEarliestForCategoryAndEndTime, "storeEventIfEarliestForCategoryAndEndTime");
  for (const interaction of interactions) {
    storeEventIfEarliestForCategoryAndEndTime(interaction);
  }
  const keptEvents = Object.values(earliestEventForEndTimePerCategory).flatMap((eventsByEndTime) => Array.from(eventsByEndTime.values()));
  keptEvents.sort((eventA, eventB) => {
    return eventA.ts - eventB.ts;
  });
  return keptEvents;
}
function writeSyntheticTimespans(event) {
  const startEvent = event.args.data.beginEvent;
  const endEvent = event.args.data.endEvent;
  event.inputDelay = Timing_exports.Micro(event.processingStart - startEvent.ts);
  event.mainThreadHandling = Timing_exports.Micro(event.processingEnd - event.processingStart);
  event.presentationDelay = Timing_exports.Micro(endEvent.ts - event.processingEnd);
}
async function finalize28() {
  const { navigationsByFrameId: navigationsByFrameId22 } = data5();
  const beginAndEndEvents = ArrayUtilities_exports.mergeOrdered(eventTimingStartEventsForInteractions, eventTimingEndEventsForInteractions, Trace_exports.eventTimeComparator);
  const beginEventById = /* @__PURE__ */ new Map();
  for (const event of beginAndEndEvents) {
    if (TraceEvents_exports.isEventTimingStart(event)) {
      const forId = beginEventById.get(event.id) ?? [];
      forId.push(event);
      beginEventById.set(event.id, forId);
    } else if (TraceEvents_exports.isEventTimingEnd(event)) {
      const beginEvents = beginEventById.get(event.id) ?? [];
      const beginEvent = beginEvents.pop();
      if (!beginEvent) {
        continue;
      }
      const { type: type2, interactionId, timeStamp, processingStart, processingEnd } = beginEvent.args.data;
      if (!type2 || !interactionId || !timeStamp || !processingStart || !processingEnd) {
        continue;
      }
      const processingStartRelativeToTraceTime = Timing_exports.Micro(Timing_exports3.milliToMicro(processingStart) - Timing_exports3.milliToMicro(timeStamp) + beginEvent.ts);
      const processingEndRelativeToTraceTime = Timing_exports.Micro(Timing_exports3.milliToMicro(processingEnd) - Timing_exports3.milliToMicro(timeStamp) + beginEvent.ts);
      const frameId = beginEvent.args.frame ?? beginEvent.args.data.frame ?? "";
      const navigation2 = Trace_exports.getNavigationForTraceEvent(beginEvent, frameId, navigationsByFrameId22);
      const navigationId = navigation2?.args.data?.navigationId;
      const interactionEvent = SyntheticEvents_exports.SyntheticEventsManager.registerSyntheticEvent({
        // Use the start event to define the common fields.
        rawSourceEvent: beginEvent,
        cat: beginEvent.cat,
        name: beginEvent.name,
        pid: beginEvent.pid,
        tid: beginEvent.tid,
        ph: beginEvent.ph,
        processingStart: processingStartRelativeToTraceTime,
        processingEnd: processingEndRelativeToTraceTime,
        // These will be set in writeSyntheticTimespans()
        inputDelay: Timing_exports.Micro(-1),
        mainThreadHandling: Timing_exports.Micro(-1),
        presentationDelay: Timing_exports.Micro(-1),
        args: {
          data: {
            beginEvent,
            endEvent: event,
            frame: frameId,
            navigationId
          }
        },
        ts: beginEvent.ts,
        dur: Timing_exports.Micro(event.ts - beginEvent.ts),
        type: beginEvent.args.data.type,
        interactionId: beginEvent.args.data.interactionId
      });
      writeSyntheticTimespans(interactionEvent);
      interactionEvents.push(interactionEvent);
    }
  }
  Trace_exports.sortTraceEventsInPlace(interactionEvents);
  interactionEventsWithNoNesting.push(...removeNestedInteractionsAndSetProcessingTime(interactionEvents));
  for (const interactionEvent of interactionEventsWithNoNesting) {
    if (!longestInteractionEvent || longestInteractionEvent.dur < interactionEvent.dur) {
      longestInteractionEvent = interactionEvent;
    }
  }
}
function data28() {
  return {
    beginCommitCompositorFrameEvents,
    parseMetaViewportEvents,
    interactionEvents,
    interactionEventsWithNoNesting,
    longestInteractionEvent,
    interactionsOverThreshold: new Set(interactionEvents.filter((event) => {
      return event.dur > LONG_INTERACTION_THRESHOLD;
    }))
  };
}
function deps15() {
  return ["Meta"];
}
function scoreClassificationForInteractionToNextPaint(timing) {
  if (timing <= INP_GOOD_TIMING) {
    return ScoreClassification.GOOD;
  }
  if (timing <= INP_MEDIUM_TIMING) {
    return ScoreClassification.OK;
  }
  return ScoreClassification.BAD;
}
function reset29() {
  sessionIdEvents = [];
  workerIdByThread = /* @__PURE__ */ new Map();
  workerURLById = /* @__PURE__ */ new Map();
}
function handleEvent29(event) {
  if (TraceEvents_exports.isTracingSessionIdForWorker(event)) {
    sessionIdEvents.push(event);
  }
}
async function finalize29() {
  for (const sessionIdEvent of sessionIdEvents) {
    if (!sessionIdEvent.args.data) {
      continue;
    }
    workerIdByThread.set(sessionIdEvent.args.data.workerThreadId, sessionIdEvent.args.data.workerId);
    workerURLById.set(sessionIdEvent.args.data.workerId, sessionIdEvent.args.data.url);
  }
}
function data29() {
  return {
    workerSessionIdEvents: sessionIdEvents,
    workerIdByThread,
    workerURLById
  };
}
function reset30() {
  warningsPerEvent = /* @__PURE__ */ new Map();
  eventsPerWarning = /* @__PURE__ */ new Map();
  allEventsStack = [];
  jsInvokeStack = [];
  taskReflowEvents = [];
  longTaskEvents = [];
}
function storeWarning(event, warning) {
  const existingWarnings = MapUtilities_exports.getWithDefault(warningsPerEvent, event, () => []);
  existingWarnings.push(warning);
  warningsPerEvent.set(event, existingWarnings);
  const existingEvents = MapUtilities_exports.getWithDefault(eventsPerWarning, warning, () => []);
  existingEvents.push(event);
  eventsPerWarning.set(warning, existingEvents);
}
function handleEvent30(event) {
  processForcedReflowWarning(event);
  if (event.name === TraceEvents_exports.Name.RUN_TASK) {
    const { duration: duration2 } = Timing_exports3.eventTimingsMicroSeconds(event);
    if (duration2 > LONG_MAIN_THREAD_TASK_THRESHOLD) {
      longTaskEvents.push(event);
    }
    return;
  }
  if (TraceEvents_exports.isFireIdleCallback(event)) {
    const { duration: duration2 } = Timing_exports3.eventTimingsMilliSeconds(event);
    if (duration2 > event.args.data.allottedMilliseconds) {
      storeWarning(event, "IDLE_CALLBACK_OVER_TIME");
    }
    return;
  }
}
function processForcedReflowWarning(event) {
  accomodateEventInStack(event, allEventsStack);
  accomodateEventInStack(
    event,
    jsInvokeStack,
    /* pushEventToStack */
    TraceEvents_exports.isJSInvocationEvent(event)
  );
  if (jsInvokeStack.length) {
    if (event.name === TraceEvents_exports.Name.LAYOUT || event.name === TraceEvents_exports.Name.RECALC_STYLE) {
      taskReflowEvents.push(event);
      return;
    }
  }
  if (allEventsStack.length === 1) {
    const totalTime = taskReflowEvents.reduce((time2, event2) => time2 + (event2.dur || 0), 0);
    if (totalTime >= FORCED_REFLOW_THRESHOLD) {
      taskReflowEvents.forEach((reflowEvent) => storeWarning(reflowEvent, "FORCED_REFLOW"));
    }
    taskReflowEvents.length = 0;
  }
}
function accomodateEventInStack(event, stack, pushEventToStack = true) {
  let nextItem = stack.at(-1);
  while (nextItem && event.ts > nextItem.ts + (nextItem.dur || 0)) {
    stack.pop();
    nextItem = stack.at(-1);
  }
  if (!pushEventToStack) {
    return;
  }
  stack.push(event);
}
function deps16() {
  return ["UserInteractions", "Workers"];
}
async function finalize30() {
  const longInteractions = data28().interactionsOverThreshold;
  for (const interaction of longInteractions) {
    storeWarning(interaction, "LONG_INTERACTION");
  }
  for (const event of longTaskEvents) {
    if (!(event.tid, data29().workerIdByThread.has(event.tid))) {
      storeWarning(event, "LONG_TASK");
    }
  }
  longTaskEvents.length = 0;
}
function data30() {
  return {
    perEvent: warningsPerEvent,
    perWarning: eventsPerWarning
  };
}
function normalizeSource(source2) {
  source2 = source2.replace(/\?$/, "");
  const lastNodeModulesIndex = source2.lastIndexOf("node_modules");
  if (lastNodeModulesIndex !== -1) {
    source2 = source2.substring(lastNodeModulesIndex);
  }
  return source2;
}
function shouldIgnoreSource(source2) {
  if (source2.includes("webpack/bootstrap")) {
    return true;
  }
  if (source2.includes("(webpack)/buildin")) {
    return true;
  }
  if (source2.includes("external ")) {
    return true;
  }
  return false;
}
function normalizeDuplication(duplication) {
  for (const [key, data312] of duplication) {
    data312.duplicates.sort((a, b) => b.attributedSize - a.attributedSize);
    if (data312.duplicates.length > 1) {
      const largestResourceSize = data312.duplicates[0].attributedSize;
      data312.duplicates = data312.duplicates.filter((duplicate) => {
        const percentSize = duplicate.attributedSize / largestResourceSize;
        return percentSize >= RELATIVE_SIZE_THRESHOLD;
      });
    }
    data312.duplicates = data312.duplicates.filter((duplicate) => duplicate.attributedSize >= ABSOLUTE_SIZE_THRESHOLD_BYTES);
    if (data312.duplicates.length <= 1) {
      duplication.delete(key);
      continue;
    }
    data312.estimatedDuplicateBytes = data312.duplicates.slice(1).reduce((acc, cur) => acc + cur.attributedSize, 0);
  }
}
function indexOfOrLength(haystack, needle, startPosition = 0) {
  const index2 = haystack.indexOf(needle, startPosition);
  return index2 === -1 ? haystack.length : index2;
}
function getNodeModuleName(source2) {
  const sourceSplit = source2.split("node_modules/");
  source2 = sourceSplit[sourceSplit.length - 1];
  const indexFirstSlash = indexOfOrLength(source2, "/");
  if (source2[0] === "@") {
    return source2.slice(0, indexOfOrLength(source2, "/", indexFirstSlash + 1));
  }
  return source2.slice(0, indexFirstSlash);
}
function groupByNodeModules(duplication) {
  const groupedDuplication = /* @__PURE__ */ new Map();
  for (const [source2, data312] of duplication) {
    if (!source2.includes("node_modules")) {
      groupedDuplication.set(source2, data312);
      continue;
    }
    const nodeModuleKey = "node_modules/" + getNodeModuleName(source2);
    const aggregatedData = groupedDuplication.get(nodeModuleKey) ?? {
      duplicates: [],
      // This is calculated in normalizeDuplication.
      estimatedDuplicateBytes: 0
    };
    groupedDuplication.set(nodeModuleKey, aggregatedData);
    for (const { script, attributedSize } of data312.duplicates) {
      let duplicate = aggregatedData.duplicates.find((d) => d.script === script);
      if (!duplicate) {
        duplicate = { script, attributedSize: 0 };
        aggregatedData.duplicates.push(duplicate);
      }
      duplicate.attributedSize += attributedSize;
    }
  }
  return groupedDuplication;
}
function sorted(duplication) {
  return new Map([...duplication].sort((a, b) => b[1].estimatedDuplicateBytes - a[1].estimatedDuplicateBytes));
}
function computeScriptDuplication(scriptsData, compressionRatios) {
  const sourceDatasMap = /* @__PURE__ */ new Map();
  for (const script of scriptsData.scripts) {
    if (!script.content || !script.sourceMap) {
      continue;
    }
    const sizes = ModelHandlers_exports.Scripts.getScriptGeneratedSizes(script);
    if (!sizes) {
      continue;
    }
    if ("errorMessage" in sizes) {
      console.error(sizes.errorMessage);
      continue;
    }
    const sourceDataArray = [];
    sourceDatasMap.set(script, sourceDataArray);
    const sources = script.sourceMap.sourceURLs();
    for (let i = 0; i < sources.length; i++) {
      if (shouldIgnoreSource(sources[i])) {
        continue;
      }
      const sourceSize = sizes.files[sources[i]];
      sourceDataArray.push({
        source: normalizeSource(sources[i]),
        resourceSize: sourceSize
      });
    }
  }
  const duplication = /* @__PURE__ */ new Map();
  for (const [script, sourceDataArray] of sourceDatasMap) {
    for (const sourceData of sourceDataArray) {
      let data312 = duplication.get(sourceData.source);
      if (!data312) {
        data312 = { estimatedDuplicateBytes: 0, duplicates: [] };
        duplication.set(sourceData.source, data312);
      }
      const compressionRatio = script.request ? compressionRatios.get(script.request?.args.data.requestId) ?? 1 : 1;
      const transferSize = Math.round(sourceData.resourceSize * compressionRatio);
      data312.duplicates.push({
        script,
        attributedSize: transferSize
      });
    }
  }
  const duplicationGroupedByNodeModules = groupByNodeModules(duplication);
  normalizeDuplication(duplication);
  normalizeDuplication(duplicationGroupedByNodeModules);
  return {
    duplication: sorted(duplication),
    duplicationGroupedByNodeModules: sorted(duplicationGroupedByNodeModules)
  };
}
function clearCacheForTrace(data312) {
  stackTraceForEventInTrace.delete(data312);
}
function get(event, data312) {
  let cacheForTrace = stackTraceForEventInTrace.get(data312);
  if (!cacheForTrace) {
    cacheForTrace = /* @__PURE__ */ new Map();
    stackTraceForEventInTrace.set(data312, cacheForTrace);
  }
  const resultFromCache = cacheForTrace.get(event);
  if (resultFromCache) {
    return resultFromCache;
  }
  let result = null;
  if (Extensions_exports.isSyntheticExtensionEntry(event)) {
    result = getForExtensionEntry(event, data312);
  } else if (TraceEvents_exports.isPerformanceMeasureBegin(event)) {
    result = getForPerformanceMeasure(event, data312);
  } else {
    result = getForEvent(event, data312);
    const payloadCallFrames = getTraceEventPayloadStackAsProtocolCallFrame(event).filter((callFrame) => !isNativeJSFunction(callFrame));
    if (!result.callFrames.length) {
      result.callFrames = payloadCallFrames;
    } else {
      for (let i = 0; i < payloadCallFrames.length && i < result.callFrames.length; i++) {
        result.callFrames[i] = payloadCallFrames[i];
      }
    }
  }
  if (result) {
    cacheForTrace.set(event, result);
  }
  return result;
}
function getForEvent(event, data312) {
  const entryToNode42 = data312.Renderer.entryToNode.size > 0 ? data312.Renderer.entryToNode : data312.Samples.entryToNode;
  const topStackTrace = { callFrames: [] };
  let stackTrace = topStackTrace;
  let currentEntry;
  let node2 = entryToNode42.get(event);
  const traceCache = stackTraceForEventInTrace.get(data312) || /* @__PURE__ */ new Map();
  stackTraceForEventInTrace.set(data312, traceCache);
  while (node2) {
    if (!TraceEvents_exports.isProfileCall(node2.entry)) {
      const maybeAsyncParent = data312.AsyncJSCalls.runEntryPointToScheduler.get(node2.entry);
      if (!maybeAsyncParent) {
        node2 = node2.parent;
        continue;
      }
      const maybeAsyncParentNode2 = maybeAsyncParent && entryToNode42.get(maybeAsyncParent.scheduler);
      if (maybeAsyncParentNode2) {
        stackTrace = addAsyncParentToStack(stackTrace, maybeAsyncParent.taskName);
        node2 = maybeAsyncParentNode2;
      }
      continue;
    }
    currentEntry = node2.entry;
    const stackTraceFromCache = traceCache.get(node2.entry);
    if (stackTraceFromCache) {
      stackTrace.callFrames.push(...stackTraceFromCache.callFrames.filter((callFrame) => !isNativeJSFunction(callFrame)));
      stackTrace.parent = stackTraceFromCache.parent;
      stackTrace.description = stackTrace.description || stackTraceFromCache.description;
      break;
    }
    if (!isNativeJSFunction(currentEntry.callFrame)) {
      stackTrace.callFrames.push(currentEntry.callFrame);
    }
    const maybeAsyncParentEvent = data312.AsyncJSCalls.asyncCallToScheduler.get(currentEntry);
    const maybeAsyncParentNode = maybeAsyncParentEvent && entryToNode42.get(maybeAsyncParentEvent.scheduler);
    if (maybeAsyncParentNode) {
      stackTrace = addAsyncParentToStack(stackTrace, maybeAsyncParentEvent.taskName);
      node2 = maybeAsyncParentNode;
      continue;
    }
    node2 = node2.parent;
  }
  return topStackTrace;
}
function addAsyncParentToStack(stackTrace, taskName) {
  const parent = { callFrames: [] };
  stackTrace.parent = parent;
  parent.description = taskName;
  return parent;
}
function getForExtensionEntry(event, data312) {
  const rawEvent = event.rawSourceEvent;
  if (TraceEvents_exports.isPerformanceMeasureBegin(rawEvent)) {
    return getForPerformanceMeasure(rawEvent, data312);
  }
  if (!rawEvent) {
    return null;
  }
  return get(rawEvent, data312);
}
function getForPerformanceMeasure(event, data312) {
  let rawEvent = event;
  if (event.args.traceId === void 0) {
    return null;
  }
  rawEvent = data312.UserTimings.measureTraceByTraceId.get(event.args.traceId);
  if (!rawEvent) {
    return null;
  }
  return get(rawEvent, data312);
}
function isNativeJSFunction({ columnNumber, lineNumber, url, scriptId }) {
  return lineNumber === -1 && columnNumber === -1 && url === "" && scriptId === "0";
}
function getTraceEventPayloadStackAsProtocolCallFrame(event) {
  const payloadCallStack = Trace_exports.getZeroIndexedStackTraceInEventPayload(event) || [];
  const callFrames = [];
  for (const frame of payloadCallStack) {
    callFrames.push({ ...frame, scriptId: String(frame.scriptId) });
  }
  return callFrames;
}
function generateEventID(event) {
  if (TraceEvents_exports.isProfileCall(event)) {
    const name = SamplesIntegrator.isNativeRuntimeFrame(event.callFrame) ? SamplesIntegrator.nativeGroup(event.callFrame.functionName) : event.callFrame.functionName;
    const location = event.callFrame.scriptId || event.callFrame.url || "";
    return `f:${name}@${location}`;
  }
  if (TraceEvents_exports.isConsoleTimeStamp(event) && event.args.data) {
    return `${event.name}:${event.args.data.name}`;
  }
  if (TraceEvents_exports.isSyntheticNetworkRequest(event) || TraceEvents_exports.isReceivedDataEvent(event)) {
    return `req:${event.args.data.requestId}`;
  }
  return event.name;
}
function collectMainThreadActivity(data312) {
  const mainFrameMainThread = data312.Renderer.processes.values().find((p) => {
    const url = p.url ?? "";
    return p.isOnMainFrame && !url.startsWith("about:") && !url.startsWith("chrome:");
  })?.threads.values().find((t) => t.name === "CrRendererMain");
  if (!mainFrameMainThread) {
    return [];
  }
  return mainFrameMainThread.entries;
}
function summarizeByThirdParty(data312, traceBounds22) {
  const mainThreadEvents = collectMainThreadActivity(data312).sort(Trace_exports.eventTimeComparator);
  const groupingFunction = /* @__PURE__ */ __name((event) => {
    const entity = data312.Renderer.entityMappings.entityByEvent.get(event);
    return entity?.name ?? "";
  }, "groupingFunction");
  const node2 = getBottomUpTree(mainThreadEvents, traceBounds22, groupingFunction);
  const summaries = summarizeBottomUpByEntity(node2, data312);
  return summaries;
}
function summarizeByURL(data312, traceBounds22) {
  const mainThreadEvents = collectMainThreadActivity(data312).sort(Trace_exports.eventTimeComparator);
  const groupingFunction = /* @__PURE__ */ __name((event) => {
    return helpers_exports.getNonResolvedURL(event, data312) ?? "";
  }, "groupingFunction");
  const node2 = getBottomUpTree(mainThreadEvents, traceBounds22, groupingFunction);
  const summaries = summarizeBottomUpByURL(node2, data312);
  return summaries;
}
function summarizeBottomUpByEntity(root2, data312) {
  const summaries = [];
  const topNodes = [...root2.children().values()].flat();
  for (const node2 of topNodes) {
    if (node2.id === "") {
      continue;
    }
    const entity = data312.Renderer.entityMappings.entityByEvent.get(node2.event);
    if (!entity) {
      continue;
    }
    const summary = {
      transferSize: node2.transferSize,
      mainThreadTime: Timing_exports.Milli(node2.selfTime),
      entity,
      relatedEvents: data312.Renderer.entityMappings.eventsByEntity.get(entity) ?? []
    };
    summaries.push(summary);
  }
  return summaries;
}
function summarizeBottomUpByURL(root2, data312) {
  const summaries = [];
  const allRequests = data312.NetworkRequests.byTime;
  const topNodes = [...root2.children().values()].flat();
  for (const node2 of topNodes) {
    if (node2.id === "" || typeof node2.id !== "string") {
      continue;
    }
    const entity = data312.Renderer.entityMappings.entityByEvent.get(node2.event);
    if (!entity) {
      continue;
    }
    const url = node2.id;
    const request3 = allRequests.find((r) => r.args.data.url === url);
    const summary = {
      request: request3,
      url,
      entity,
      transferSize: node2.transferSize,
      mainThreadTime: Timing_exports.Milli(node2.selfTime)
    };
    summaries.push(summary);
  }
  return summaries;
}
function getBottomUpTree(mainThreadEvents, tracebounds, groupingFunction) {
  const visibleEvents = Trace_exports.VISIBLE_TRACE_EVENT_TYPES.values().toArray();
  const filter2 = new VisibleEventsFilter(visibleEvents.concat([TraceEvents_exports.Name.SYNTHETIC_NETWORK_REQUEST]));
  const startTime = Timing_exports3.microToMilli(tracebounds.min);
  const endTime = Timing_exports3.microToMilli(tracebounds.max);
  return new BottomUpRootNode(mainThreadEvents, {
    textFilter: new ExclusiveNameFilter([]),
    filters: [filter2],
    startTime,
    endTime,
    eventGroupIdCallback: groupingFunction,
    calculateTransferSize: true,
    // Ensure we group by 3P alongside eventID for correct 3P grouping.
    forceGroupIdCallback: true
  });
}
function erf2(x) {
  const sign = Math.sign(x);
  x = Math.abs(x);
  const a1 = 0.254829592;
  const a2 = -0.284496736;
  const a3 = 1.421413741;
  const a4 = -1.453152027;
  const a5 = 1.061405429;
  const p = 0.3275911;
  const t = 1 / (1 + p * x);
  const y = t * (a1 + t * (a2 + t * (a3 + t * (a4 + t * a5))));
  return sign * (1 - y * Math.exp(-x * x));
}
function getLogNormalScore2({ median, p10 }, value) {
  if (median <= 0) {
    throw new Error("median must be greater than zero");
  }
  if (p10 <= 0) {
    throw new Error("p10 must be greater than zero");
  }
  if (p10 >= median) {
    throw new Error("p10 must be less than the median");
  }
  if (value <= 0) {
    return 1;
  }
  const INVERSE_ERFC_ONE_FIFTH = 0.9061938024368232;
  const xRatio = Math.max(Number.MIN_VALUE, value / median);
  const xLogRatio = Math.log(xRatio);
  const p10Ratio = Math.max(Number.MIN_VALUE, p10 / median);
  const p10LogRatio = -Math.log(p10Ratio);
  const standardizedX = xLogRatio * INVERSE_ERFC_ONE_FIFTH / p10LogRatio;
  const complementaryPercentile = (1 - erf2(standardizedX)) / 2;
  let score;
  if (value <= p10) {
    score = Math.max(MIN_PASSING_SCORE2, Math.min(1, complementaryPercentile));
  } else if (value <= median) {
    score = Math.max(MIN_AVERAGE_SCORE2, Math.min(MAX_AVERAGE_SCORE2, complementaryPercentile));
  } else {
    score = Math.max(0, Math.min(MAX_FAILING_SCORE2, complementaryPercentile));
  }
  return score;
}
function linearInterpolation(x0, y0, x1, y1, x) {
  const slope = (y1 - y0) / (x1 - x0);
  return y0 + (x - x0) * slope;
}
function getInsight(insightName, insightSet) {
  const insight = insightSet.model[insightName];
  if (insight instanceof Error) {
    return null;
  }
  return insight;
}
function getLCP(insightSet) {
  const insight = getInsight(InsightKeys.LCP_BREAKDOWN, insightSet);
  if (!insight || !insight.lcpMs || !insight.lcpEvent) {
    return null;
  }
  const value = Timing_exports3.milliToMicro(insight.lcpMs);
  return { value, event: insight.lcpEvent };
}
function getINP(insightSet) {
  const insight = getInsight(InsightKeys.INP_BREAKDOWN, insightSet);
  if (!insight?.longestInteractionEvent?.dur) {
    return null;
  }
  const value = insight.longestInteractionEvent.dur;
  return { value, event: insight.longestInteractionEvent };
}
function getCLS(insightSet) {
  const insight = getInsight(InsightKeys.CLS_CULPRITS, insightSet);
  if (!insight) {
    return { value: 0, worstClusterEvent: null };
  }
  let maxScore = 0;
  let worstCluster;
  for (const cluster of insight.clusters) {
    if (cluster.clusterCumulativeScore > maxScore) {
      maxScore = cluster.clusterCumulativeScore;
      worstCluster = cluster;
    }
  }
  return { value: maxScore, worstClusterEvent: worstCluster ?? null };
}
function evaluateLCPMetricScore(value) {
  return getLogNormalScore2({ p10: 2500, median: 4e3 }, value);
}
function evaluateINPMetricScore(value) {
  return getLogNormalScore2({ p10: 200, median: 500 }, value);
}
function evaluateCLSMetricScore(value) {
  return getLogNormalScore2({ p10: 0.1, median: 0.25 }, value);
}
function getPageResult(cruxFieldData, url, origin, scope2 = null) {
  return cruxFieldData.find((result) => {
    const key = scope2 ? result[`${scope2.pageScope}-${scope2.deviceScope}`]?.record.key : (result["url-ALL"] || result["origin-ALL"])?.record.key;
    return key?.url && key.url === url || key?.origin && key.origin === origin;
  });
}
function getMetricResult(pageResult, name, scope2 = null) {
  const scopes = [];
  if (scope2) {
    scopes.push(scope2);
  } else {
    scopes.push({ pageScope: "url", deviceScope: "ALL" });
    scopes.push({ pageScope: "origin", deviceScope: "ALL" });
  }
  for (const scope22 of scopes) {
    const key = `${scope22.pageScope}-${scope22.deviceScope}`;
    let value = pageResult[key]?.record.metrics[name]?.percentiles?.p75;
    if (typeof value === "string") {
      value = Number(value);
    }
    if (typeof value === "number" && Number.isFinite(value)) {
      return { value, pageScope: scope22.pageScope };
    }
  }
  return null;
}
function getMetricTimingResult(pageResult, name, scope2 = null) {
  const result = getMetricResult(pageResult, name, scope2);
  if (result) {
    const valueMs = result.value;
    return { value: Timing_exports3.milliToMicro(valueMs), pageScope: result.pageScope };
  }
  return null;
}
function getFieldMetricsForInsightSet(insightSet, metadata2, scope2 = null) {
  const cruxFieldData = metadata2?.cruxFieldData;
  if (!cruxFieldData) {
    return null;
  }
  const pageResult = getPageResult(cruxFieldData, insightSet.url.href, insightSet.url.origin, scope2);
  if (!pageResult) {
    return null;
  }
  return {
    fcp: getMetricTimingResult(pageResult, "first_contentful_paint", scope2),
    lcp: getMetricTimingResult(pageResult, "largest_contentful_paint", scope2),
    inp: getMetricTimingResult(pageResult, "interaction_to_next_paint", scope2),
    cls: getMetricResult(pageResult, "cumulative_layout_shift", scope2),
    lcpBreakdown: {
      ttfb: getMetricTimingResult(pageResult, "largest_contentful_paint_image_time_to_first_byte", scope2),
      loadDelay: getMetricTimingResult(pageResult, "largest_contentful_paint_image_resource_load_delay", scope2),
      loadDuration: getMetricTimingResult(pageResult, "largest_contentful_paint_image_resource_load_duration", scope2),
      renderDelay: getMetricTimingResult(pageResult, "largest_contentful_paint_image_element_render_delay", scope2)
    }
  };
}
function calculateMetricWeightsForSorting(insightSet, metadata2) {
  const weights = {
    lcp: 1 / 3,
    inp: 1 / 3,
    cls: 1 / 3
  };
  const cruxFieldData = metadata2?.cruxFieldData;
  if (!cruxFieldData) {
    return weights;
  }
  const fieldMetrics = getFieldMetricsForInsightSet(insightSet, metadata2);
  if (!fieldMetrics) {
    return weights;
  }
  const fieldLcp = fieldMetrics.lcp?.value ?? null;
  const fieldInp = fieldMetrics.inp?.value ?? null;
  const fieldCls = fieldMetrics.cls?.value ?? null;
  const fieldLcpScore = fieldLcp !== null ? evaluateLCPMetricScore(Timing_exports3.microToMilli(fieldLcp)) : 0;
  const fieldInpScore = fieldInp !== null ? evaluateINPMetricScore(Timing_exports3.microToMilli(fieldInp)) : 0;
  const fieldClsScore = fieldCls !== null ? evaluateCLSMetricScore(fieldCls) : 0;
  const fieldLcpScoreInverted = 1 - fieldLcpScore;
  const fieldInpScoreInverted = 1 - fieldInpScore;
  const fieldClsScoreInverted = 1 - fieldClsScore;
  const invertedSum = fieldLcpScoreInverted + fieldInpScoreInverted + fieldClsScoreInverted;
  if (!invertedSum) {
    return weights;
  }
  weights.lcp = fieldLcpScoreInverted / invertedSum;
  weights.inp = fieldInpScoreInverted / invertedSum;
  weights.cls = fieldClsScoreInverted / invertedSum;
  return weights;
}
function estimateSavingsWithGraphs(wastedBytesByRequestId, simulator, graph22) {
  const simulationBeforeChanges = simulator.simulate(graph22);
  const originalTransferSizes = /* @__PURE__ */ new Map();
  graph22.traverse((node2) => {
    if (node2.type !== "network") {
      return;
    }
    const wastedBytes = wastedBytesByRequestId.get(node2.request.requestId);
    if (!wastedBytes) {
      return;
    }
    const original = node2.request.transferSize;
    originalTransferSizes.set(node2.request.requestId, original);
    node2.request.transferSize = Math.max(original - wastedBytes, 0);
  });
  const simulationAfterChanges = simulator.simulate(graph22);
  graph22.traverse((node2) => {
    if (node2.type !== "network") {
      return;
    }
    const originalTransferSize = originalTransferSizes.get(node2.request.requestId);
    if (originalTransferSize === void 0) {
      return;
    }
    node2.request.transferSize = originalTransferSize;
  });
  let savings = simulationBeforeChanges.timeInMs - simulationAfterChanges.timeInMs;
  savings = Math.round(savings / GRAPH_SAVINGS_PRECISION) * GRAPH_SAVINGS_PRECISION;
  return Timing_exports.Milli(savings);
}
function metricSavingsForWastedBytes(wastedBytesByRequestId, context2) {
  if (!context2.navigation || !context2.lantern) {
    return;
  }
  if (!wastedBytesByRequestId.size) {
    return { FCP: Timing_exports.Milli(0), LCP: Timing_exports.Milli(0) };
  }
  const simulator = context2.lantern.simulator;
  const fcpGraph = context2.lantern.metrics.firstContentfulPaint.optimisticGraph;
  const lcpGraph = context2.lantern.metrics.largestContentfulPaint.optimisticGraph;
  return {
    FCP: estimateSavingsWithGraphs(wastedBytesByRequestId, simulator, fcpGraph),
    LCP: estimateSavingsWithGraphs(wastedBytesByRequestId, simulator, lcpGraph)
  };
}
function isRequestCompressed(request3) {
  if (!request3.args.data.responseHeaders) {
    return false;
  }
  const patterns = [
    /^content-encoding$/i,
    /^x-content-encoding-over-network$/i,
    /^x-original-content-encoding$/i
    // Lightrider.
  ];
  const compressionTypes = ["gzip", "br", "deflate", "zstd"];
  return request3.args.data.responseHeaders.some((header) => patterns.some((p) => header.name.match(p)) && compressionTypes.includes(header.value));
}
function isRequestServedFromBrowserCache(request3) {
  if (!request3.args.data.responseHeaders || request3.args.data.failed) {
    return false;
  }
  if (request3.args.data.statusCode === 304) {
    return true;
  }
  const { transferSize, resourceSize } = getRequestSizes(request3);
  const ratio = resourceSize ? transferSize / resourceSize : 0;
  if (ratio < 0.01) {
    return true;
  }
  return false;
}
function getRequestSizes(request3) {
  const resourceSize = request3.args.data.decodedBodyLength;
  const transferSize = request3.args.data.encodedDataLength;
  return { resourceSize, transferSize };
}
function estimateCompressedContentSize(request3, totalBytes, resourceType) {
  if (!request3 || isRequestServedFromBrowserCache(request3)) {
    switch (resourceType) {
      case "Stylesheet":
        return Math.round(totalBytes * 0.2);
      case "Script":
      case "Document":
        return Math.round(totalBytes * 0.33);
      default:
        return Math.round(totalBytes * 0.5);
    }
  }
  const { transferSize, resourceSize } = getRequestSizes(request3);
  let contentTransferSize = transferSize;
  if (!isRequestCompressed(request3)) {
    contentTransferSize = resourceSize;
  }
  if (request3.args.data.resourceType === resourceType) {
    return contentTransferSize;
  }
  const compressionRatio = Number.isFinite(resourceSize) && resourceSize > 0 ? contentTransferSize / resourceSize : 1;
  return Math.round(totalBytes * compressionRatio);
}
function estimateCompressionRatioForScript(script) {
  if (!script.request) {
    return 1;
  }
  const request3 = script.request;
  const contentLength = request3.args.data.decodedBodyLength ?? script.content?.length ?? 0;
  const compressedSize = estimateCompressedContentSize(
    request3,
    contentLength,
    "Script"
    /* Protocol.Network.ResourceType.Script */
  );
  if (contentLength === 0 || compressedSize === 0) {
    return 1;
  }
  const compressionRatio = compressedSize / contentLength;
  return compressionRatio;
}
function calculateDocFirstByteTs(docRequest) {
  if (docRequest.args.data.protocol === "file") {
    return docRequest.ts;
  }
  const timing = docRequest.args.data.timing;
  if (!timing) {
    return null;
  }
  return Timing_exports.Micro(Timing_exports3.secondsToMicro(timing.requestTime) + Timing_exports3.milliToMicro(timing.receiveHeadersStart ?? timing.receiveHeadersEnd));
}
function insightBounds(insight, insightSetBounds) {
  const overlays = insight.createOverlays?.() ?? [];
  const windows2 = overlays.map(Timing_exports3.traceWindowFromOverlay).filter((bounds) => !!bounds);
  const overlaysBounds = Timing_exports3.combineTraceWindowsMicro(windows2);
  if (overlaysBounds) {
    return overlaysBounds;
  }
  return insightSetBounds;
}
function finalize31(partialModel) {
  return {
    insightKey: InsightKeys.CACHE,
    strings: UIStrings2,
    title: i18nString(UIStrings2.title),
    description: i18nString(UIStrings2.description),
    docs: "https://developer.chrome.com/docs/performance/insights/cache",
    category: InsightCategory.ALL,
    state: partialModel.requests.length > 0 ? "fail" : "pass",
    ...partialModel
  };
}
function isCacheable(request3) {
  if (Network_exports.NON_NETWORK_SCHEMES.includes(request3.args.data.protocol)) {
    return false;
  }
  return Boolean(Network_exports.CACHEABLE_STATUS_CODES.has(request3.args.data.statusCode) && Network_exports.STATIC_RESOURCE_TYPES.has(
    request3.args.data.resourceType || "Other"
    /* Protocol.Network.ResourceType.Other */
  ));
}
function computeCacheLifetimeInSeconds(headers, cacheControl) {
  if (cacheControl?.["max-age"] !== void 0) {
    return cacheControl["max-age"];
  }
  const expiresHeaders = headers.find((h) => h.name === "expires")?.value ?? null;
  if (expiresHeaders) {
    const expires = new Date(expiresHeaders).getTime();
    if (!expires) {
      return 0;
    }
    return Math.ceil((expires - Date.now()) / 1e3);
  }
  return null;
}
function getCacheHitProbability(maxAgeInSeconds) {
  const RESOURCE_AGE_IN_HOURS_DECILES = [0, 0.2, 1, 3, 8, 12, 24, 48, 72, 168, 8760, Infinity];
  const maxAgeInHours = maxAgeInSeconds / 3600;
  const upperDecileIndex = RESOURCE_AGE_IN_HOURS_DECILES.findIndex((decile) => decile >= maxAgeInHours);
  if (upperDecileIndex === RESOURCE_AGE_IN_HOURS_DECILES.length - 1) {
    return 1;
  }
  if (upperDecileIndex === 0) {
    return 0;
  }
  const upperDecileValue = RESOURCE_AGE_IN_HOURS_DECILES[upperDecileIndex];
  const lowerDecileValue = RESOURCE_AGE_IN_HOURS_DECILES[upperDecileIndex - 1];
  const upperDecile = upperDecileIndex / 10;
  const lowerDecile = (upperDecileIndex - 1) / 10;
  return linearInterpolation(lowerDecileValue, lowerDecile, upperDecileValue, upperDecile, maxAgeInHours);
}
function getCombinedHeaders(responseHeaders) {
  const headers = /* @__PURE__ */ new Map();
  for (const header of responseHeaders) {
    const name = header.name.toLowerCase();
    if (headers.get(name)) {
      headers.set(name, `${headers.get(name)}, ${header.value}`);
    } else {
      headers.set(name, header.value);
    }
  }
  return headers;
}
function cachingDisabled(headers, parsedCacheControl) {
  const cacheControl = headers?.get("cache-control") ?? null;
  const pragma = headers?.get("pragma") ?? null;
  if (!cacheControl && pragma?.includes("no-cache")) {
    return true;
  }
  if (parsedCacheControl && (parsedCacheControl["must-revalidate"] || parsedCacheControl["no-cache"] || parsedCacheControl["no-store"] || parsedCacheControl["private"])) {
    return true;
  }
  return false;
}
function isCacheInsight(model22) {
  return model22.insightKey === InsightKeys.CACHE;
}
function generateInsight(data312, context2) {
  const isWithinContext = /* @__PURE__ */ __name((event) => Timing_exports3.eventIsInBounds(event, context2.bounds), "isWithinContext");
  const contextRequests = data312.NetworkRequests.byTime.filter(isWithinContext);
  const results = [];
  let totalWastedBytes = 0;
  const wastedBytesByRequestId = /* @__PURE__ */ new Map();
  for (const req of contextRequests) {
    if (!req.args.data.responseHeaders || !isCacheable(req)) {
      continue;
    }
    const headers = getCombinedHeaders(req.args.data.responseHeaders);
    const cacheControl = headers.get("cache-control") ?? null;
    const parsedDirectives = Network_exports.parseCacheControl(cacheControl);
    if (cachingDisabled(headers, parsedDirectives)) {
      continue;
    }
    let ttl = computeCacheLifetimeInSeconds(req.args.data.responseHeaders, parsedDirectives);
    if (ttl !== null && (!Number.isFinite(ttl) || ttl <= 0)) {
      continue;
    }
    ttl = ttl || 0;
    const ttlDays = ttl / 86400;
    if (ttlDays >= 30) {
      continue;
    }
    const cacheHitProbability = getCacheHitProbability(ttl);
    if (cacheHitProbability > IGNORE_THRESHOLD_IN_PERCENT) {
      continue;
    }
    const transferSize = req.args.data.encodedDataLength || 0;
    const wastedBytes = (1 - cacheHitProbability) * transferSize;
    wastedBytesByRequestId.set(req.args.data.requestId, wastedBytes);
    totalWastedBytes += wastedBytes;
    results.push({ request: req, ttl, wastedBytes });
  }
  results.sort((a, b) => {
    return b.request.args.data.decodedBodyLength - a.request.args.data.decodedBodyLength || a.ttl - b.ttl;
  });
  return finalize31({
    relatedEvents: results.map((r) => r.request),
    requests: results,
    metricSavings: metricSavingsForWastedBytes(wastedBytesByRequestId, context2),
    wastedBytes: totalWastedBytes
  });
}
function createOverlayForRequest(request3) {
  return {
    type: "ENTRY_OUTLINE",
    entry: request3,
    outlineReason: "ERROR"
  };
}
function createOverlays(model22) {
  return model22.requests.map((req) => createOverlayForRequest(req.request));
}
function isInRootCauseWindow(event, targetEvent) {
  const eventEnd = event.dur ? event.ts + event.dur : event.ts;
  return eventEnd < targetEvent.ts && eventEnd >= targetEvent.ts - ROOT_CAUSE_WINDOW;
}
function getNonCompositedFailure(animationEvent) {
  const failures = [];
  const beginEvent = animationEvent.args.data.beginEvent;
  const instantEvents = animationEvent.args.data.instantEvents || [];
  for (const event of instantEvents) {
    const failureMask = event.args.data.compositeFailed;
    const unsupportedProperties = event.args.data.unsupportedProperties;
    if (!failureMask) {
      continue;
    }
    const failureReasons = ACTIONABLE_FAILURE_REASONS.filter((reason) => failureMask & reason.flag).map((reason) => reason.failure);
    const failure = {
      name: beginEvent.args.data.displayName,
      failureReasons,
      unsupportedProperties,
      animation: animationEvent
    };
    failures.push(failure);
  }
  return failures;
}
function getNonCompositedFailureRootCauses(animationEvents, prePaintEvents22, shiftsByPrePaint, rootCausesByShift) {
  const allAnimationFailures = [];
  for (const animation of animationEvents) {
    const failures = getNonCompositedFailure(animation);
    if (!failures) {
      continue;
    }
    allAnimationFailures.push(...failures);
    const nextPrePaint = getNextEvent(prePaintEvents22, animation);
    if (!nextPrePaint) {
      continue;
    }
    if (!isInRootCauseWindow(animation, nextPrePaint)) {
      continue;
    }
    const shifts = shiftsByPrePaint.get(nextPrePaint);
    if (!shifts) {
      continue;
    }
    for (const shift of shifts) {
      const rootCausesForShift = rootCausesByShift.get(shift);
      if (!rootCausesForShift) {
        throw new Error("Unaccounted shift");
      }
      rootCausesForShift.nonCompositedAnimations.push(...failures);
    }
  }
  return allAnimationFailures;
}
function getShiftsByPrePaintEvents(layoutShifts, prePaintEvents22) {
  const shiftsByPrePaint = /* @__PURE__ */ new Map();
  for (const prePaintEvent of prePaintEvents22) {
    const firstShiftIndex = ArrayUtilities_exports.nearestIndexFromBeginning(layoutShifts, (shift) => shift.ts >= prePaintEvent.ts);
    if (firstShiftIndex === null) {
      continue;
    }
    for (let i = firstShiftIndex; i < layoutShifts.length; i++) {
      const shift = layoutShifts[i];
      if (shift.ts >= prePaintEvent.ts && shift.ts <= prePaintEvent.ts + prePaintEvent.dur) {
        const shiftsInPrePaint = MapUtilities_exports.getWithDefault(shiftsByPrePaint, prePaintEvent, () => []);
        shiftsInPrePaint.push(shift);
      }
      if (shift.ts > prePaintEvent.ts + prePaintEvent.dur) {
        break;
      }
    }
  }
  return shiftsByPrePaint;
}
function getNextEvent(sourceEvents, targetEvent) {
  const index2 = ArrayUtilities_exports.nearestIndexFromBeginning(sourceEvents, (source2) => source2.ts > targetEvent.ts + (targetEvent.dur || 0));
  if (index2 === null) {
    return void 0;
  }
  return sourceEvents[index2];
}
function getIframeRootCauses(data312, iframeCreatedEvents, prePaintEvents22, shiftsByPrePaint, rootCausesByShift, domLoadingEvents22) {
  for (const iframeEvent of iframeCreatedEvents) {
    const nextPrePaint = getNextEvent(prePaintEvents22, iframeEvent);
    if (!nextPrePaint) {
      continue;
    }
    const shifts = shiftsByPrePaint.get(nextPrePaint);
    if (!shifts) {
      continue;
    }
    for (const shift of shifts) {
      const rootCausesForShift = rootCausesByShift.get(shift);
      if (!rootCausesForShift) {
        throw new Error("Unaccounted shift");
      }
      const domEvent = domLoadingEvents22.find((e) => {
        const maxIframe = Timing_exports.Micro(iframeEvent.ts + (iframeEvent.dur ?? 0));
        return e.ts >= iframeEvent.ts && e.ts <= maxIframe;
      });
      if (domEvent?.args.frame) {
        const frame = domEvent.args.frame;
        let url;
        const processes22 = data312.Meta.rendererProcessesByFrame.get(frame);
        if (processes22 && processes22.size > 0) {
          url = [...processes22.values()][0]?.[0].frame.url;
        }
        rootCausesForShift.iframes.push({ frame, url });
      }
    }
  }
  return rootCausesByShift;
}
function getUnsizedImageRootCauses(unsizedImageEvents, paintImageEvents32, shiftsByPrePaint, rootCausesByShift) {
  shiftsByPrePaint.forEach((shifts, prePaint) => {
    const paintImage = getNextEvent(paintImageEvents32, prePaint);
    if (!paintImage) {
      return;
    }
    const matchingNode = unsizedImageEvents.find((unsizedImage) => unsizedImage.args.data.nodeId === paintImage.args.data.nodeId);
    if (!matchingNode) {
      return;
    }
    for (const shift of shifts) {
      const rootCausesForShift = rootCausesByShift.get(shift);
      if (!rootCausesForShift) {
        throw new Error("Unaccounted shift");
      }
      rootCausesForShift.unsizedImages.push({
        backendNodeId: matchingNode.args.data.nodeId,
        paintImageEvent: paintImage
      });
    }
  });
  return rootCausesByShift;
}
function isCLSCulpritsInsight(insight) {
  return insight.insightKey === InsightKeys.CLS_CULPRITS;
}
function getFontRootCauses(networkRequests, prePaintEvents22, shiftsByPrePaint, rootCausesByShift) {
  const fontRequests = networkRequests.filter((req) => req.args.data.resourceType === "Font" && req.args.data.mimeType.startsWith("font"));
  for (const req of fontRequests) {
    const nextPrePaint = getNextEvent(prePaintEvents22, req);
    if (!nextPrePaint) {
      continue;
    }
    if (!isInRootCauseWindow(req, nextPrePaint)) {
      continue;
    }
    const shifts = shiftsByPrePaint.get(nextPrePaint);
    if (!shifts) {
      continue;
    }
    for (const shift of shifts) {
      const rootCausesForShift = rootCausesByShift.get(shift);
      if (!rootCausesForShift) {
        throw new Error("Unaccounted shift");
      }
      rootCausesForShift.webFonts.push(req);
    }
  }
  return rootCausesByShift;
}
function getTopCulprits(cluster, culpritsByShift) {
  const MAX_TOP_CULPRITS = 3;
  const causes = [];
  const shifts = cluster.events;
  for (const shift of shifts) {
    const culprits = culpritsByShift.get(shift);
    if (!culprits) {
      continue;
    }
    const fontReq = culprits.webFonts;
    const iframes = culprits.iframes;
    const animations22 = culprits.nonCompositedAnimations;
    const unsizedImages = culprits.unsizedImages;
    for (let i = 0; i < fontReq.length && causes.length < MAX_TOP_CULPRITS; i++) {
      causes.push({ type: LayoutShiftType.WEB_FONT, description: i18nString2(UIStrings3.webFont) });
    }
    for (let i = 0; i < iframes.length && causes.length < MAX_TOP_CULPRITS; i++) {
      causes.push({ type: LayoutShiftType.IFRAMES, description: i18nString2(UIStrings3.injectedIframe) });
    }
    for (let i = 0; i < animations22.length && causes.length < MAX_TOP_CULPRITS; i++) {
      causes.push({ type: LayoutShiftType.ANIMATIONS, description: i18nString2(UIStrings3.animation) });
    }
    for (let i = 0; i < unsizedImages.length && causes.length < MAX_TOP_CULPRITS; i++) {
      causes.push({
        type: LayoutShiftType.UNSIZED_IMAGE,
        description: i18nString2(UIStrings3.unsizedImage),
        url: unsizedImages[i].paintImageEvent.args.data.url || "",
        backendNodeId: unsizedImages[i].backendNodeId,
        frame: unsizedImages[i].paintImageEvent.args.data.frame || ""
      });
    }
    if (causes.length >= MAX_TOP_CULPRITS) {
      break;
    }
  }
  return causes.slice(0, MAX_TOP_CULPRITS);
}
function finalize32(partialModel) {
  let state = "pass";
  if (partialModel.worstCluster) {
    const classification = ModelHandlers_exports.LayoutShifts.scoreClassificationForLayoutShift(partialModel.worstCluster.clusterCumulativeScore);
    if (classification === ModelHandlers_exports.PageLoadMetrics.ScoreClassification.GOOD) {
      state = "informative";
    } else {
      state = "fail";
    }
  }
  return {
    insightKey: InsightKeys.CLS_CULPRITS,
    strings: UIStrings3,
    title: i18nString2(UIStrings3.title),
    description: i18nString2(UIStrings3.description),
    docs: "https://developer.chrome.com/docs/performance/insights/cls-culprit",
    category: InsightCategory.CLS,
    state,
    ...partialModel
  };
}
function generateInsight2(data312, context2) {
  const isWithinContext = /* @__PURE__ */ __name((event) => Timing_exports3.eventIsInBounds(event, context2.bounds), "isWithinContext");
  const compositeAnimationEvents = data312.Animations.animations.filter(isWithinContext);
  const iframeEvents = data312.LayoutShifts.renderFrameImplCreateChildFrameEvents.filter(isWithinContext);
  const networkRequests = data312.NetworkRequests.byTime.filter(isWithinContext);
  const domLoadingEvents22 = data312.LayoutShifts.domLoadingEvents.filter(isWithinContext);
  const unsizedImageEvents = data312.LayoutShifts.layoutImageUnsizedEvents.filter(isWithinContext);
  const clusterKey = context2.navigation ? context2.navigationId : TraceEvents_exports.NO_NAVIGATION;
  const clusters22 = data312.LayoutShifts.clustersByNavigationId.get(clusterKey) ?? [];
  const clustersByScore = [...clusters22].sort((a, b) => b.clusterCumulativeScore - a.clusterCumulativeScore);
  const worstCluster = clustersByScore.at(0);
  const layoutShifts = clusters22.flatMap((cluster) => cluster.events);
  const prePaintEvents22 = data312.LayoutShifts.prePaintEvents.filter(isWithinContext);
  const paintImageEvents32 = data312.LayoutShifts.paintImageEvents.filter(isWithinContext);
  const rootCausesByShift = /* @__PURE__ */ new Map();
  const shiftsByPrePaint = getShiftsByPrePaintEvents(layoutShifts, prePaintEvents22);
  for (const shift of layoutShifts) {
    rootCausesByShift.set(shift, { iframes: [], webFonts: [], nonCompositedAnimations: [], unsizedImages: [] });
  }
  getIframeRootCauses(data312, iframeEvents, prePaintEvents22, shiftsByPrePaint, rootCausesByShift, domLoadingEvents22);
  getFontRootCauses(networkRequests, prePaintEvents22, shiftsByPrePaint, rootCausesByShift);
  getUnsizedImageRootCauses(unsizedImageEvents, paintImageEvents32, shiftsByPrePaint, rootCausesByShift);
  const animationFailures = getNonCompositedFailureRootCauses(compositeAnimationEvents, prePaintEvents22, shiftsByPrePaint, rootCausesByShift);
  const relatedEvents = [...layoutShifts];
  if (worstCluster) {
    relatedEvents.push(worstCluster);
  }
  const topCulpritsByCluster = /* @__PURE__ */ new Map();
  for (const cluster of clusters22) {
    topCulpritsByCluster.set(cluster, getTopCulprits(cluster, rootCausesByShift));
  }
  return finalize32({
    relatedEvents,
    animationFailures,
    shifts: rootCausesByShift,
    clusters: clusters22,
    worstCluster,
    topCulpritsByCluster
  });
}
function createOverlays2(model22) {
  const clustersByScore = model22.clusters.toSorted((a, b) => b.clusterCumulativeScore - a.clusterCumulativeScore) ?? [];
  const worstCluster = clustersByScore[0];
  if (!worstCluster) {
    return [];
  }
  const range2 = Timing_exports.Micro(worstCluster.dur ?? 0);
  const max = Timing_exports.Micro(worstCluster.ts + range2);
  return [{
    type: "TIMESPAN_BREAKDOWN",
    sections: [
      {
        bounds: { min: worstCluster.ts, range: range2, max },
        label: i18nString2(UIStrings3.worstLayoutShiftCluster),
        showDuration: false
      }
    ],
    // This allows for the overlay to sit over the layout shift.
    entry: worstCluster.events[0],
    renderLocation: "ABOVE_EVENT"
  }];
}
function isDocumentLatencyInsight(x) {
  return x.insightKey === "DocumentLatency";
}
function getServerResponseTime(request3) {
  const isLightrider = globalThis.isLightrider;
  if (isLightrider) {
    return request3.args.data.lrServerResponseTime ?? null;
  }
  const timing = request3.args.data.timing;
  if (!timing) {
    return null;
  }
  const ms2 = Timing_exports3.microToMilli(request3.args.data.syntheticData.serverResponseTime);
  return Math.round(ms2);
}
function getCompressionSavings(request3) {
  const isCompressed = isRequestCompressed(request3);
  if (isCompressed) {
    return 0;
  }
  const originalSize = request3.args.data.decodedBodyLength;
  let estimatedSavings = 0;
  switch (request3.args.data.mimeType) {
    case "text/css":
      estimatedSavings = Math.round(originalSize * 0.8);
      break;
    case "text/html":
    case "text/javascript":
      estimatedSavings = Math.round(originalSize * 0.67);
      break;
    case "text/plain":
    case "text/xml":
    case "text/x-component":
    case "application/javascript":
    case "application/json":
    case "application/manifest+json":
    case "application/vnd.api+json":
    case "application/xml":
    case "application/xhtml+xml":
    case "application/rss+xml":
    case "application/atom+xml":
    case "application/vnd.ms-fontobject":
    case "application/x-font-ttf":
    case "application/x-font-opentype":
    case "application/x-font-truetype":
    case "image/svg+xml":
    case "image/x-icon":
    case "image/vnd.microsoft.icon":
    case "font/ttf":
    case "font/eot":
    case "font/otf":
    case "font/opentype":
      estimatedSavings = Math.round(originalSize * 0.5);
      break;
    default:
  }
  return estimatedSavings < IGNORE_THRESHOLD_IN_BYTES ? 0 : estimatedSavings;
}
function finalize33(partialModel) {
  let hasFailure = false;
  if (partialModel.data) {
    hasFailure = !partialModel.data.checklist.usesCompression.value || !partialModel.data.checklist.serverResponseIsFast.value || !partialModel.data.checklist.noRedirects.value;
  }
  return {
    insightKey: InsightKeys.DOCUMENT_LATENCY,
    strings: UIStrings4,
    title: i18nString3(UIStrings4.title),
    description: i18nString3(UIStrings4.description),
    docs: "https://developer.chrome.com/docs/performance/insights/document-latency",
    category: InsightCategory.ALL,
    state: hasFailure ? "fail" : "pass",
    ...partialModel
  };
}
function generateInsight3(data312, context2) {
  if (!context2.navigation) {
    return finalize33({});
  }
  const millisToString2 = context2.options.insightTimeFormatters?.milli ?? ((bytes2) => ({ __i18nMillis: bytes2 }));
  const documentRequest = data312.NetworkRequests.byId.get(context2.navigationId);
  if (!documentRequest) {
    return finalize33({ warnings: [InsightWarning.NO_DOCUMENT_REQUEST] });
  }
  const serverResponseTime = getServerResponseTime(documentRequest);
  if (serverResponseTime === null) {
    throw new Error("missing document request timing");
  }
  const serverResponseTooSlow = serverResponseTime > TOO_SLOW_THRESHOLD_MS;
  let overallSavingsMs = 0;
  if (serverResponseTime > TOO_SLOW_THRESHOLD_MS) {
    overallSavingsMs = Math.max(serverResponseTime - TARGET_MS, 0);
  }
  const redirectDuration = Math.round(documentRequest.args.data.syntheticData.redirectionDuration / 1e3);
  overallSavingsMs += redirectDuration;
  const metricSavings = {
    FCP: overallSavingsMs,
    LCP: overallSavingsMs
  };
  const uncompressedResponseBytes = getCompressionSavings(documentRequest);
  const noRedirects = redirectDuration === 0;
  const serverResponseIsFast = !serverResponseTooSlow;
  const usesCompression = uncompressedResponseBytes === 0;
  return finalize33({
    relatedEvents: [documentRequest],
    data: {
      serverResponseTime,
      redirectDuration: Timing_exports.Milli(redirectDuration),
      uncompressedResponseBytes,
      documentRequest,
      checklist: {
        noRedirects: {
          label: noRedirects ? i18nString3(UIStrings4.passingRedirects) : i18nString3(UIStrings4.failedRedirects, {
            PH1: documentRequest.args.data.redirects.length,
            PH2: millisToString2(redirectDuration)
          }),
          value: noRedirects
        },
        serverResponseIsFast: {
          label: serverResponseIsFast ? i18nString3(UIStrings4.passingServerResponseTime, { PH1: millisToString2(serverResponseTime) }) : i18nString3(UIStrings4.failedServerResponseTime, { PH1: millisToString2(serverResponseTime) }),
          value: serverResponseIsFast
        },
        usesCompression: {
          label: usesCompression ? i18nString3(UIStrings4.passingTextCompression) : i18nString3(UIStrings4.failedTextCompression),
          value: usesCompression
        }
      }
    },
    metricSavings,
    wastedBytes: uncompressedResponseBytes
  });
}
function createOverlays3(model22) {
  if (!model22.data?.documentRequest) {
    return [];
  }
  const overlays = [];
  const event = model22.data.documentRequest;
  const redirectDurationMicro = Timing_exports3.milliToMicro(model22.data.redirectDuration);
  const sections = [];
  if (model22.data.redirectDuration) {
    const bounds = Timing_exports3.traceWindowFromMicroSeconds(event.ts, event.ts + redirectDurationMicro);
    sections.push({ bounds, label: i18nString3(UIStrings4.redirectsLabel), showDuration: true });
    overlays.push({ type: "CANDY_STRIPED_TIME_RANGE", bounds, entry: event });
  }
  if (!model22.data.checklist.serverResponseIsFast.value) {
    const serverResponseTimeMicro = Timing_exports3.milliToMicro(model22.data.serverResponseTime);
    const sendEnd = event.args.data.timing?.sendEnd ?? Timing_exports.Milli(0);
    const sendEndMicro = Timing_exports3.milliToMicro(sendEnd);
    const bounds = Timing_exports3.traceWindowFromMicroSeconds(sendEndMicro, sendEndMicro + serverResponseTimeMicro);
    sections.push({ bounds, label: i18nString3(UIStrings4.serverResponseTimeLabel), showDuration: true });
  }
  if (model22.data.uncompressedResponseBytes) {
    const bounds = Timing_exports3.traceWindowFromMicroSeconds(event.args.data.syntheticData.downloadStart, event.args.data.syntheticData.downloadStart + event.args.data.syntheticData.download);
    sections.push({ bounds, label: i18nString3(UIStrings4.uncompressedDownload), showDuration: true });
    overlays.push({ type: "CANDY_STRIPED_TIME_RANGE", bounds, entry: event });
  }
  if (sections.length) {
    overlays.push({
      type: "TIMESPAN_BREAKDOWN",
      sections,
      entry: model22.data.documentRequest,
      // Always render below because the document request is guaranteed to be
      // the first request in the network track.
      renderLocation: "BELOW_EVENT"
    });
  }
  overlays.push({
    type: "ENTRY_SELECTED",
    entry: model22.data.documentRequest
  });
  return overlays;
}
function finalize34(partialModel) {
  const relatedEvents = [...partialModel.largeLayoutUpdates, ...partialModel.largeStyleRecalcs];
  return {
    insightKey: InsightKeys.DOM_SIZE,
    strings: UIStrings5,
    title: i18nString4(UIStrings5.title),
    description: i18nString4(UIStrings5.description),
    docs: "https://developer.chrome.com/docs/performance/insights/dom-size",
    category: InsightCategory.INP,
    state: relatedEvents.length > 0 ? "informative" : "pass",
    ...partialModel,
    relatedEvents
  };
}
function isDomSizeInsight(model22) {
  return model22.insightKey === InsightKeys.DOM_SIZE;
}
function generateInsight4(data312, context2) {
  const isWithinContext = /* @__PURE__ */ __name((event) => Timing_exports3.eventIsInBounds(event, context2.bounds), "isWithinContext");
  const mainTid = context2.navigation?.tid;
  const largeLayoutUpdates = [];
  const largeStyleRecalcs = [];
  const threads = Threads_exports.threadsInRenderer(data312.Renderer, data312.AuctionWorklets);
  for (const thread of threads) {
    if (thread.type !== Threads_exports.ThreadType.MAIN_THREAD) {
      continue;
    }
    if (mainTid === void 0) {
      if (!thread.processIsOnMainFrame) {
        continue;
      }
    } else if (thread.tid !== mainTid) {
      continue;
    }
    const rendererThread = data312.Renderer.processes.get(thread.pid)?.threads.get(thread.tid);
    if (!rendererThread) {
      continue;
    }
    const { entries, layoutEvents, recalcStyleEvents } = rendererThread;
    if (!entries.length) {
      continue;
    }
    const first2 = entries[0];
    const last2 = entries[entries.length - 1];
    const timeRange2 = Timing_exports3.traceWindowFromMicroSeconds(first2.ts, Timing_exports.Micro(last2.ts + (last2.dur ?? 0)));
    if (!Timing_exports3.boundsIncludeTimeRange({ timeRange: timeRange2, bounds: context2.bounds })) {
      continue;
    }
    for (const event of layoutEvents) {
      if (event.dur < DOM_SIZE_DURATION_THRESHOLD || !isWithinContext(event)) {
        continue;
      }
      const { dirtyObjects } = event.args.beginData;
      if (dirtyObjects > LAYOUT_OBJECTS_THRESHOLD) {
        largeLayoutUpdates.push(event);
      }
    }
    for (const event of recalcStyleEvents) {
      if (event.dur < DOM_SIZE_DURATION_THRESHOLD || !isWithinContext(event)) {
        continue;
      }
      const { elementCount } = event.args;
      if (elementCount > STYLE_RECALC_ELEMENTS_THRESHOLD) {
        largeStyleRecalcs.push(event);
      }
    }
  }
  const largeUpdates = [
    ...largeLayoutUpdates.map((event) => {
      const duration2 = event.dur / 1e3;
      const size = event.args.beginData.dirtyObjects;
      const label = i18nString4(UIStrings5.largeLayout, { PH1: size });
      return { label, duration: duration2, size, event };
    }),
    ...largeStyleRecalcs.map((event) => {
      const duration2 = event.dur / 1e3;
      const size = event.args.elementCount;
      const label = i18nString4(UIStrings5.largeStyleRecalc, { PH1: size });
      return { label, duration: duration2, size, event };
    })
  ].sort((a, b) => b.duration - a.duration).slice(0, 5);
  const domStatsEvents = data312.DOMStats.domStatsByFrameId.get(context2.frameId)?.filter(isWithinContext) ?? [];
  let maxDOMStats;
  for (const domStats of domStatsEvents) {
    const navigationPid = context2.navigation?.pid;
    if (navigationPid && domStats.pid !== navigationPid) {
      continue;
    }
    if (!maxDOMStats || domStats.args.data.totalElements > maxDOMStats.args.data.totalElements) {
      maxDOMStats = domStats;
    }
  }
  return finalize34({
    largeLayoutUpdates,
    largeStyleRecalcs,
    largeUpdates,
    maxDOMStats
  });
}
function createOverlays4(model22) {
  const entries = [...model22.largeStyleRecalcs, ...model22.largeLayoutUpdates];
  return entries.map((entry) => ({
    type: "ENTRY_OUTLINE",
    entry,
    outlineReason: "ERROR"
  }));
}
function finalize35(partialModel) {
  const requests = partialModel.scriptsWithDuplication.map((script) => script.request).filter((e) => !!e);
  return {
    insightKey: InsightKeys.DUPLICATE_JAVASCRIPT,
    strings: UIStrings6,
    title: i18nString5(UIStrings6.title),
    description: i18nString5(UIStrings6.description),
    docs: "https://developer.chrome.com/docs/performance/insights/duplicated-javascript",
    category: InsightCategory.LCP,
    state: Boolean(partialModel.duplication.values().next().value) ? "fail" : "pass",
    relatedEvents: [...new Set(requests)],
    ...partialModel
  };
}
function isDuplicatedJavaScriptInsight(model22) {
  return model22.insightKey === InsightKeys.DUPLICATE_JAVASCRIPT;
}
function generateInsight5(data312, context2) {
  const scripts = data312.Scripts.scripts.filter((script) => {
    if (script.frame !== context2.frameId) {
      return false;
    }
    if (script.url?.startsWith("chrome-extension://")) {
      return false;
    }
    return Timing_exports3.timestampIsInBounds(context2.bounds, script.ts);
  });
  const compressionRatios = /* @__PURE__ */ new Map();
  for (const script of scripts) {
    if (script.request) {
      compressionRatios.set(script.request.args.data.requestId, estimateCompressionRatioForScript(script));
    }
  }
  const { duplication, duplicationGroupedByNodeModules } = ScriptDuplication_exports.computeScriptDuplication({ scripts }, compressionRatios);
  const scriptsWithDuplication = [...duplication.values().flatMap((data32) => data32.duplicates.map((d) => d.script))];
  const wastedBytesByRequestId = /* @__PURE__ */ new Map();
  for (const { duplicates } of duplication.values()) {
    for (let i = 1; i < duplicates.length; i++) {
      const sourceData = duplicates[i];
      if (!sourceData.script.request) {
        continue;
      }
      const transferSize = sourceData.attributedSize;
      const requestId = sourceData.script.request.args.data.requestId;
      wastedBytesByRequestId.set(requestId, (wastedBytesByRequestId.get(requestId) || 0) + transferSize);
    }
  }
  return finalize35({
    duplication,
    duplicationGroupedByNodeModules,
    scriptsWithDuplication: [...new Set(scriptsWithDuplication)],
    scripts,
    mainDocumentUrl: context2.navigation?.args.data?.url ?? data312.Meta.mainFrameURL,
    metricSavings: metricSavingsForWastedBytes(wastedBytesByRequestId, context2),
    wastedBytes: wastedBytesByRequestId.values().reduce((acc, cur) => acc + cur, 0)
  });
}
function createOverlays5(model22) {
  return model22.scriptsWithDuplication.map((script) => script.request).filter((e) => !!e).map((request3) => {
    return {
      type: "ENTRY_OUTLINE",
      entry: request3,
      outlineReason: "ERROR"
    };
  });
}
function finalize36(partialModel) {
  return {
    insightKey: InsightKeys.FONT_DISPLAY,
    strings: UIStrings7,
    title: i18nString6(UIStrings7.title),
    description: i18nString6(UIStrings7.description),
    docs: "https://developer.chrome.com/docs/performance/insights/font-display",
    category: InsightCategory.INP,
    state: partialModel.fonts.find((font) => font.wastedTime > 0) ? "fail" : "pass",
    ...partialModel
  };
}
function isFontDisplayInsight(model22) {
  return model22.insightKey === InsightKeys.FONT_DISPLAY;
}
function generateInsight6(data312, context2) {
  const fonts = [];
  for (const remoteFont of data312.LayoutShifts.remoteFonts) {
    const event = remoteFont.beginRemoteFontLoadEvent;
    if (!Timing_exports3.eventIsInBounds(event, context2.bounds)) {
      continue;
    }
    const requestId = `${event.pid}.${event.args.id}`;
    const request3 = data312.NetworkRequests.byId.get(requestId);
    if (!request3) {
      continue;
    }
    if (!/^(block|fallback|auto)$/.test(remoteFont.display)) {
      continue;
    }
    const wastedTimeMicro = Timing_exports.Micro(request3.args.data.syntheticData.finishTime - request3.args.data.syntheticData.sendStartTime);
    let wastedTime = NumberUtilities_exports.floor(Timing_exports3.microToMilli(wastedTimeMicro), 1 / 5);
    if (wastedTime === 0) {
      continue;
    }
    wastedTime = Math.min(wastedTime, 3e3);
    fonts.push({
      name: remoteFont.name,
      request: request3,
      display: remoteFont.display,
      wastedTime
    });
  }
  fonts.sort((a, b) => b.wastedTime - a.wastedTime);
  const savings = Math.max(...fonts.map((f) => f.wastedTime));
  return finalize36({
    relatedEvents: fonts.map((f) => f.request),
    fonts,
    metricSavings: { FCP: savings }
  });
}
function createOverlays6(model22) {
  return model22.fonts.map((font) => ({
    type: "ENTRY_OUTLINE",
    entry: font.request,
    outlineReason: font.wastedTime ? "ERROR" : "INFO"
  }));
}
function getCallFrameId(callFrame) {
  return callFrame.scriptId + ":" + callFrame.lineNumber + ":" + callFrame.columnNumber;
}
function getLargestTopLevelFunctionData(forcedReflowEvents, traceParsedData) {
  const entryToNodeMap = traceParsedData.Renderer.entryToNode;
  const dataByTopLevelFunction = /* @__PURE__ */ new Map();
  if (forcedReflowEvents.length === 0) {
    return;
  }
  for (const event of forcedReflowEvents) {
    const traceNode = entryToNodeMap.get(event);
    if (!traceNode) {
      continue;
    }
    let node2 = traceNode.parent;
    let topLevelFunctionCall;
    let topLevelFunctionCallEvent;
    while (node2) {
      const eventData = node2.entry;
      if (TraceEvents_exports.isProfileCall(eventData)) {
        topLevelFunctionCall = eventData.callFrame;
        topLevelFunctionCallEvent = eventData;
      } else {
        if (TraceEvents_exports.isFunctionCall(eventData) && eventData.args.data && TraceEvents_exports.objectIsCallFrame(eventData.args.data)) {
          topLevelFunctionCall = eventData.args.data;
          topLevelFunctionCallEvent = eventData;
        }
        break;
      }
      node2 = node2.parent;
    }
    if (!topLevelFunctionCall || !topLevelFunctionCallEvent) {
      continue;
    }
    const aggregatedDataId = getCallFrameId(topLevelFunctionCall);
    const aggregatedData = MapUtilities_exports.getWithDefault(dataByTopLevelFunction, aggregatedDataId, () => ({
      topLevelFunctionCall,
      totalReflowTime: 0,
      topLevelFunctionCallEvents: []
    }));
    aggregatedData.totalReflowTime += event.dur ?? 0;
    aggregatedData.topLevelFunctionCallEvents.push(topLevelFunctionCallEvent);
  }
  let topTimeConsumingData = void 0;
  dataByTopLevelFunction.forEach((data312) => {
    if (!topTimeConsumingData || data312.totalReflowTime > topTimeConsumingData.totalReflowTime) {
      topTimeConsumingData = data312;
    }
  });
  return topTimeConsumingData;
}
function finalize37(partialModel) {
  return {
    insightKey: InsightKeys.FORCED_REFLOW,
    strings: UIStrings8,
    title: i18nString7(UIStrings8.title),
    description: i18nString7(UIStrings8.description),
    docs: "https://developer.chrome.com/docs/performance/insights/forced-reflow",
    category: InsightCategory.ALL,
    state: partialModel.aggregatedBottomUpData.length !== 0 ? "fail" : "pass",
    ...partialModel
  };
}
function getBottomCallFrameForEvent(event, traceParsedData) {
  const profileStackTrace = StackTraceForEvent_exports.get(event, traceParsedData);
  const eventTopCallFrame = Trace_exports.getStackTraceTopCallFrameInEventPayload(event);
  return profileStackTrace?.callFrames[0] ?? eventTopCallFrame ?? null;
}
function isForcedReflowInsight(model22) {
  return model22.insightKey === InsightKeys.FORCED_REFLOW;
}
function generateInsight7(traceParsedData, context2) {
  const isWithinContext = /* @__PURE__ */ __name((event) => {
    const frameId = Trace_exports.frameIDForEvent(event);
    if (frameId !== context2.frameId) {
      return false;
    }
    return Timing_exports3.eventIsInBounds(event, context2.bounds);
  }, "isWithinContext");
  const bottomUpDataMap = /* @__PURE__ */ new Map();
  const events = traceParsedData.Warnings.perWarning.get("FORCED_REFLOW")?.filter(isWithinContext) ?? [];
  for (const event of events) {
    const bottomCallFrame = getBottomCallFrameForEvent(event, traceParsedData);
    const bottomCallId = bottomCallFrame ? getCallFrameId(bottomCallFrame) : "UNATTRIBUTED";
    const bottomUpData = MapUtilities_exports.getWithDefault(bottomUpDataMap, bottomCallId, () => ({
      bottomUpData: bottomCallFrame,
      totalTime: 0,
      relatedEvents: []
    }));
    bottomUpData.totalTime += event.dur ?? 0;
    bottomUpData.relatedEvents.push(event);
  }
  const topLevelFunctionCallData = getLargestTopLevelFunctionData(events, traceParsedData);
  return finalize37({
    relatedEvents: events,
    topLevelFunctionCallData,
    aggregatedBottomUpData: [...bottomUpDataMap.values()]
  });
}
function createOverlays7(model22) {
  if (!model22.topLevelFunctionCallData) {
    return [];
  }
  const allBottomUpEvents = [...model22.aggregatedBottomUpData.values().flatMap((data312) => data312.relatedEvents)];
  return [
    ...createOverlayForEvents(model22.topLevelFunctionCallData.topLevelFunctionCallEvents, "INFO"),
    ...createOverlayForEvents(allBottomUpEvents)
  ];
}
function createOverlayForEvents(events, outlineReason = "ERROR") {
  return events.map((e) => ({
    type: "ENTRY_OUTLINE",
    entry: e,
    outlineReason
  }));
}
function isImageDeliveryInsight(model22) {
  return model22.insightKey === "ImageDelivery";
}
function getOptimizationMessage(optimization) {
  switch (optimization.type) {
    case ImageOptimizationType.ADJUST_COMPRESSION:
      return i18nString8(UIStrings9.useCompression);
    case ImageOptimizationType.MODERN_FORMAT_OR_COMPRESSION:
      return i18nString8(UIStrings9.useModernFormat);
    case ImageOptimizationType.VIDEO_FORMAT:
      return i18nString8(UIStrings9.useVideoFormat);
    case ImageOptimizationType.RESPONSIVE_SIZE:
      return i18nString8(UIStrings9.useResponsiveSize, {
        PH1: `${optimization.fileDimensions.width}x${optimization.fileDimensions.height}`,
        PH2: `${optimization.displayDimensions.width}x${optimization.displayDimensions.height}`
      });
  }
}
function getOptimizationMessageWithBytes(optimization) {
  const byteSavingsText = /* @__PURE__ */ ((bytes2) => ({ __i18nBytes: bytes2 }))(optimization.byteSavings);
  const optimizationMessage = getOptimizationMessage(optimization);
  return i18nString8(UIStrings9.estimatedSavings, { PH1: optimizationMessage, PH2: byteSavingsText });
}
function finalize38(partialModel) {
  return {
    insightKey: InsightKeys.IMAGE_DELIVERY,
    strings: UIStrings9,
    title: i18nString8(UIStrings9.title),
    description: i18nString8(UIStrings9.description),
    docs: "https://developer.chrome.com/docs/performance/insights/image-delivery",
    category: InsightCategory.LCP,
    state: partialModel.optimizableImages.length > 0 ? "fail" : "pass",
    ...partialModel,
    relatedEvents: new Map(partialModel.optimizableImages.map((image) => [image.request, image.optimizations.map(getOptimizationMessageWithBytes)]))
  };
}
function estimateGIFPercentSavings(request3) {
  return Math.round(29.1 * Math.log10(request3.args.data.decodedBodyLength) - 100.7) / 100;
}
function getDisplayedSize(data312, paintImage) {
  return data312.ImagePainting.paintEventToCorrectedDisplaySize.get(paintImage) ?? {
    width: paintImage.args.data.width,
    height: paintImage.args.data.height
  };
}
function getPixelCounts(data312, paintImage) {
  const { width, height } = getDisplayedSize(data312, paintImage);
  return {
    filePixels: paintImage.args.data.srcWidth * paintImage.args.data.srcHeight,
    displayedPixels: width * height
  };
}
function generateInsight8(data312, context2) {
  const isWithinContext = /* @__PURE__ */ __name((event) => Timing_exports3.eventIsInBounds(event, context2.bounds), "isWithinContext");
  const contextRequests = data312.NetworkRequests.byTime.filter(isWithinContext);
  const optimizableImages = [];
  for (const request3 of contextRequests) {
    if (request3.args.data.resourceType !== "Image") {
      continue;
    }
    if (request3.args.data.mimeType === "image/svg+xml") {
      continue;
    }
    const url = request3.args.data.redirects[0]?.url ?? request3.args.data.url;
    const imagePaints = data312.ImagePainting.paintImageEventForUrl.get(url)?.filter(isWithinContext);
    if (!imagePaints?.length) {
      continue;
    }
    const largestImagePaint = imagePaints.reduce((prev, curr) => {
      const prevPixels = getPixelCounts(data312, prev).displayedPixels;
      const currPixels = getPixelCounts(data312, curr).displayedPixels;
      return prevPixels > currPixels ? prev : curr;
    });
    const { filePixels: imageFilePixels, displayedPixels: largestImageDisplayPixels } = getPixelCounts(data312, largestImagePaint);
    const imageBytes = Math.min(request3.args.data.decodedBodyLength, request3.args.data.encodedDataLength);
    const bytesPerPixel = imageBytes / imageFilePixels;
    let optimizations = [];
    if (request3.args.data.mimeType === "image/gif") {
      if (imageBytes > GIF_SIZE_THRESHOLD) {
        const percentSavings = estimateGIFPercentSavings(request3);
        const byteSavings = Math.round(imageBytes * percentSavings);
        optimizations.push({ type: ImageOptimizationType.VIDEO_FORMAT, byteSavings });
      }
    } else if (bytesPerPixel > TARGET_BYTES_PER_PIXEL_AVIF) {
      const idealAvifImageSize = Math.round(TARGET_BYTES_PER_PIXEL_AVIF * imageFilePixels);
      const byteSavings = imageBytes - idealAvifImageSize;
      if (request3.args.data.mimeType !== "image/webp" && request3.args.data.mimeType !== "image/avif") {
        optimizations.push({ type: ImageOptimizationType.MODERN_FORMAT_OR_COMPRESSION, byteSavings });
      } else {
        optimizations.push({ type: ImageOptimizationType.ADJUST_COMPRESSION, byteSavings });
      }
    }
    const imageByteSavingsFromFormat = Math.max(0, ...optimizations.map((o) => o.byteSavings));
    let imageByteSavings = imageByteSavingsFromFormat;
    const wastedPixelRatio = 1 - largestImageDisplayPixels / imageFilePixels;
    if (wastedPixelRatio > 0 && !largestImagePaint.args.data.isCSS) {
      const byteSavings = Math.round(wastedPixelRatio * imageBytes);
      const hadBreakpoints = largestImagePaint.args.data.isPicture || largestImagePaint.args.data.srcsetAttribute;
      if (!hadBreakpoints || byteSavings > BYTE_SAVINGS_THRESHOLD_RESPONSIVE_BREAKPOINTS) {
        imageByteSavings += Math.round(wastedPixelRatio * (imageBytes - imageByteSavingsFromFormat));
        const { width, height } = getDisplayedSize(data312, largestImagePaint);
        optimizations.push({
          type: ImageOptimizationType.RESPONSIVE_SIZE,
          byteSavings,
          fileDimensions: {
            width: Math.round(largestImagePaint.args.data.srcWidth),
            height: Math.round(largestImagePaint.args.data.srcHeight)
          },
          displayDimensions: {
            width: Math.round(width),
            height: Math.round(height)
          }
        });
      }
    }
    optimizations = optimizations.filter((optimization) => optimization.byteSavings > BYTE_SAVINGS_THRESHOLD);
    if (optimizations.length > 0) {
      optimizableImages.push({
        request: request3,
        largestImagePaint,
        optimizations,
        byteSavings: imageByteSavings
      });
    }
  }
  const wastedBytesByRequestId = /* @__PURE__ */ new Map();
  for (const image of optimizableImages) {
    wastedBytesByRequestId.set(image.request.args.data.requestId, image.byteSavings);
  }
  optimizableImages.sort((a, b) => {
    if (b.byteSavings !== a.byteSavings) {
      return b.byteSavings - a.byteSavings;
    }
    return b.request.args.data.decodedBodyLength - a.request.args.data.decodedBodyLength;
  });
  return finalize38({
    optimizableImages,
    metricSavings: metricSavingsForWastedBytes(wastedBytesByRequestId, context2),
    wastedBytes: optimizableImages.reduce((total, img) => total + img.byteSavings, 0)
  });
}
function createOverlayForRequest2(request3) {
  return {
    type: "ENTRY_OUTLINE",
    entry: request3,
    outlineReason: "ERROR"
  };
}
function createOverlays8(model22) {
  return model22.optimizableImages.map((image) => createOverlayForRequest2(image.request));
}
function isINPBreakdownInsight(insight) {
  return insight.insightKey === InsightKeys.INP_BREAKDOWN;
}
function finalize39(partialModel) {
  let state = "pass";
  if (partialModel.longestInteractionEvent) {
    const classification = ModelHandlers_exports.UserInteractions.scoreClassificationForInteractionToNextPaint(partialModel.longestInteractionEvent.dur);
    if (classification === ModelHandlers_exports.PageLoadMetrics.ScoreClassification.GOOD) {
      state = "informative";
    } else {
      state = "fail";
    }
  }
  return {
    insightKey: InsightKeys.INP_BREAKDOWN,
    strings: UIStrings10,
    title: i18nString9(UIStrings10.title),
    description: i18nString9(UIStrings10.description),
    docs: "https://developer.chrome.com/docs/performance/insights/inp-breakdown",
    category: InsightCategory.INP,
    state,
    ...partialModel
  };
}
function generateInsight9(data312, context2) {
  const interactionEvents22 = data312.UserInteractions.interactionEventsWithNoNesting.filter((event) => {
    return Timing_exports3.eventIsInBounds(event, context2.bounds);
  });
  if (!interactionEvents22.length) {
    return finalize39({});
  }
  const longestByInteractionId = /* @__PURE__ */ new Map();
  for (const event of interactionEvents22) {
    const key = event.interactionId;
    const longest = longestByInteractionId.get(key);
    if (!longest || event.dur > longest.dur) {
      longestByInteractionId.set(key, event);
    }
  }
  const normalizedInteractionEvents = [...longestByInteractionId.values()];
  normalizedInteractionEvents.sort((a, b) => b.dur - a.dur);
  const highPercentileIndex = Math.min(9, Math.floor(normalizedInteractionEvents.length / 50));
  return finalize39({
    relatedEvents: [normalizedInteractionEvents[0]],
    longestInteractionEvent: normalizedInteractionEvents[0],
    highPercentileInteractionEvent: normalizedInteractionEvents[highPercentileIndex]
  });
}
function createOverlaysForSubpart(event, subpartIndex = -1) {
  const p1 = Timing_exports3.traceWindowFromMicroSeconds(event.ts, event.ts + event.inputDelay);
  const p2 = Timing_exports3.traceWindowFromMicroSeconds(p1.max, p1.max + event.mainThreadHandling);
  const p3 = Timing_exports3.traceWindowFromMicroSeconds(p2.max, p2.max + event.presentationDelay);
  let sections = [
    { bounds: p1, label: i18nString9(UIStrings10.inputDelay), showDuration: true },
    { bounds: p2, label: i18nString9(UIStrings10.processingDuration), showDuration: true },
    { bounds: p3, label: i18nString9(UIStrings10.presentationDelay), showDuration: true }
  ];
  if (subpartIndex !== -1) {
    sections = [sections[subpartIndex]];
  }
  return [
    {
      type: "TIMESPAN_BREAKDOWN",
      sections,
      renderLocation: "BELOW_EVENT",
      entry: event
    }
  ];
}
function createOverlays9(model22) {
  const event = model22.longestInteractionEvent;
  if (!event) {
    return [];
  }
  return createOverlaysForSubpart(event);
}
function isLCPBreakdownInsight(model22) {
  return model22.insightKey === "LCPBreakdown";
}
function anyValuesNaN(...values) {
  return values.some((v) => Number.isNaN(v));
}
function determineSubparts(nav, docRequest, lcpEvent, lcpRequest) {
  const firstDocByteTs = calculateDocFirstByteTs(docRequest);
  if (firstDocByteTs === null) {
    return null;
  }
  const ttfb = Timing_exports3.traceWindowFromMicroSeconds(nav.ts, firstDocByteTs);
  ttfb.label = i18nString10(UIStrings11.timeToFirstByte);
  let renderDelay = Timing_exports3.traceWindowFromMicroSeconds(ttfb.max, lcpEvent.ts);
  renderDelay.label = i18nString10(UIStrings11.elementRenderDelay);
  if (!lcpRequest) {
    if (anyValuesNaN(ttfb.range, renderDelay.range)) {
      return null;
    }
    return { ttfb, renderDelay };
  }
  const lcpStartTs = lcpRequest.ts;
  const lcpReqEndTs = lcpRequest.args.data.syntheticData.finishTime;
  const loadDelay = Timing_exports3.traceWindowFromMicroSeconds(ttfb.max, lcpStartTs);
  const loadDuration = Timing_exports3.traceWindowFromMicroSeconds(lcpStartTs, lcpReqEndTs);
  renderDelay = Timing_exports3.traceWindowFromMicroSeconds(lcpReqEndTs, lcpEvent.ts);
  loadDelay.label = i18nString10(UIStrings11.resourceLoadDelay);
  loadDuration.label = i18nString10(UIStrings11.resourceLoadDuration);
  renderDelay.label = i18nString10(UIStrings11.elementRenderDelay);
  if (anyValuesNaN(ttfb.range, loadDelay.range, loadDuration.range, renderDelay.range)) {
    return null;
  }
  return {
    ttfb,
    loadDelay,
    loadDuration,
    renderDelay
  };
}
function finalize40(partialModel) {
  const relatedEvents = [];
  if (partialModel.lcpEvent) {
    relatedEvents.push(partialModel.lcpEvent);
  }
  if (partialModel.lcpRequest) {
    relatedEvents.push(partialModel.lcpRequest);
  }
  let state = "pass";
  if (partialModel.lcpMs !== void 0) {
    const classification = ModelHandlers_exports.PageLoadMetrics.scoreClassificationForLargestContentfulPaint(Timing_exports3.milliToMicro(partialModel.lcpMs));
    if (classification === ModelHandlers_exports.PageLoadMetrics.ScoreClassification.GOOD) {
      state = "informative";
    } else {
      state = "fail";
    }
  }
  return {
    insightKey: InsightKeys.LCP_BREAKDOWN,
    strings: UIStrings11,
    title: i18nString10(UIStrings11.title),
    description: i18nString10(UIStrings11.description),
    docs: "https://developer.chrome.com/docs/performance/insights/lcp-breakdown",
    category: InsightCategory.LCP,
    state,
    ...partialModel,
    relatedEvents
  };
}
function generateInsight10(data312, context2) {
  if (!context2.navigation) {
    return finalize40({});
  }
  const networkRequests = data312.NetworkRequests;
  const frameMetrics = data312.PageLoadMetrics.metricScoresByFrameId.get(context2.frameId);
  if (!frameMetrics) {
    throw new Error("no frame metrics");
  }
  const navMetrics = frameMetrics.get(context2.navigationId);
  if (!navMetrics) {
    throw new Error("no navigation metrics");
  }
  const metricScore = navMetrics.get(ModelHandlers_exports.PageLoadMetrics.MetricName.LCP);
  const lcpEvent = metricScore?.event;
  if (!lcpEvent || !TraceEvents_exports.isLargestContentfulPaintCandidate(lcpEvent)) {
    return finalize40({ warnings: [InsightWarning.NO_LCP] });
  }
  const lcpMs = Timing_exports3.microToMilli(metricScore.timing);
  const lcpTs = metricScore.event?.ts ? Timing_exports3.microToMilli(metricScore.event?.ts) : void 0;
  const lcpRequest = data312.LargestImagePaint.lcpRequestByNavigationId.get(context2.navigationId);
  const docRequest = networkRequests.byId.get(context2.navigationId);
  if (!docRequest) {
    return finalize40({ lcpMs, lcpTs, lcpEvent, lcpRequest, warnings: [InsightWarning.NO_DOCUMENT_REQUEST] });
  }
  return finalize40({
    lcpMs,
    lcpTs,
    lcpEvent,
    lcpRequest,
    subparts: determineSubparts(context2.navigation, docRequest, lcpEvent, lcpRequest) ?? void 0
  });
}
function createOverlays10(model22) {
  if (!model22.subparts || !model22.lcpTs) {
    return [];
  }
  const overlays = [
    {
      type: "TIMESPAN_BREAKDOWN",
      sections: Object.values(model22.subparts).map((subpart) => ({ bounds: subpart, label: subpart.label, showDuration: true }))
    }
  ];
  if (model22.lcpRequest) {
    overlays.push({ type: "ENTRY_OUTLINE", entry: model22.lcpRequest, outlineReason: "INFO" });
  }
  return overlays;
}
function isLCPDiscoveryInsight(model22) {
  return model22.insightKey === "LCPDiscovery";
}
function finalize41(partialModel) {
  const relatedEvents = partialModel.lcpEvent && partialModel.lcpRequest ? (
    // TODO: add entire request initiator chain?
    [partialModel.lcpEvent, partialModel.lcpRequest]
  ) : [];
  return {
    insightKey: InsightKeys.LCP_DISCOVERY,
    strings: UIStrings12,
    title: i18nString11(UIStrings12.title),
    description: i18nString11(UIStrings12.description),
    docs: "https://developer.chrome.com/docs/performance/insights/lcp-discovery",
    category: InsightCategory.LCP,
    state: partialModel.lcpRequest && partialModel.checklist && (!partialModel.checklist.eagerlyLoaded.value || !partialModel.checklist.requestDiscoverable.value || !partialModel.checklist.priorityHinted.value) ? "fail" : "pass",
    ...partialModel,
    relatedEvents
  };
}
function generateInsight11(data312, context2) {
  if (!context2.navigation) {
    return finalize41({});
  }
  const networkRequests = data312.NetworkRequests;
  const frameMetrics = data312.PageLoadMetrics.metricScoresByFrameId.get(context2.frameId);
  if (!frameMetrics) {
    throw new Error("no frame metrics");
  }
  const navMetrics = frameMetrics.get(context2.navigationId);
  if (!navMetrics) {
    throw new Error("no navigation metrics");
  }
  const metricScore = navMetrics.get(ModelHandlers_exports.PageLoadMetrics.MetricName.LCP);
  const lcpEvent = metricScore?.event;
  if (!lcpEvent || !TraceEvents_exports.isLargestContentfulPaintCandidate(lcpEvent)) {
    return finalize41({ warnings: [InsightWarning.NO_LCP] });
  }
  const docRequest = networkRequests.byId.get(context2.navigationId);
  if (!docRequest) {
    return finalize41({ warnings: [InsightWarning.NO_DOCUMENT_REQUEST] });
  }
  const lcpRequest = data312.LargestImagePaint.lcpRequestByNavigationId.get(context2.navigationId);
  if (!lcpRequest) {
    return finalize41({ lcpEvent });
  }
  const initiatorUrl = lcpRequest.args.data.initiator?.url;
  const initiatedByMainDoc = lcpRequest?.args.data.initiator?.type === "parser" && docRequest.args.data.url === initiatorUrl;
  const imgPreloadedOrFoundInHTML = lcpRequest?.args.data.isLinkPreload || initiatedByMainDoc;
  const imageLoadingAttr = lcpEvent.args.data?.loadingAttr;
  const imageFetchPriorityHint = lcpRequest?.args.data.fetchPriorityHint;
  const earliestDiscoveryTime = calculateDocFirstByteTs(docRequest);
  const priorityHintFound = imageFetchPriorityHint === "high";
  return finalize41({
    lcpEvent,
    lcpRequest,
    earliestDiscoveryTimeTs: earliestDiscoveryTime ? Timing_exports.Micro(earliestDiscoveryTime) : void 0,
    checklist: {
      priorityHinted: {
        label: priorityHintFound ? i18nString11(UIStrings12.fetchPriorityApplied) : i18nString11(UIStrings12.fetchPriorityShouldBeApplied),
        value: priorityHintFound
      },
      requestDiscoverable: { label: i18nString11(UIStrings12.requestDiscoverable), value: imgPreloadedOrFoundInHTML },
      eagerlyLoaded: { label: i18nString11(UIStrings12.lazyLoadNotApplied), value: imageLoadingAttr !== "lazy" }
    }
  });
}
function getImageData(model22) {
  if (!model22.lcpRequest || !model22.checklist) {
    return null;
  }
  const shouldIncreasePriorityHint = !model22.checklist.priorityHinted.value;
  const shouldPreloadImage = !model22.checklist.requestDiscoverable.value;
  const shouldRemoveLazyLoading = !model22.checklist.eagerlyLoaded.value;
  const imageLCP = shouldIncreasePriorityHint !== void 0 && shouldPreloadImage !== void 0 && shouldRemoveLazyLoading !== void 0;
  if (!imageLCP) {
    return null;
  }
  const data312 = {
    checklist: model22.checklist,
    request: model22.lcpRequest,
    discoveryDelay: null,
    estimatedSavings: model22.metricSavings?.LCP ?? null
  };
  if (model22.earliestDiscoveryTimeTs && model22.lcpRequest) {
    const discoveryDelay = model22.lcpRequest.ts - model22.earliestDiscoveryTimeTs;
    data312.discoveryDelay = Timing_exports.Micro(discoveryDelay);
  }
  return data312;
}
function createOverlays11(model22) {
  const imageResults = getImageData(model22);
  if (!imageResults?.discoveryDelay) {
    return [];
  }
  const delay = Timing_exports3.traceWindowFromMicroSeconds(Timing_exports.Micro(imageResults.request.ts - imageResults.discoveryDelay), imageResults.request.ts);
  return [
    {
      type: "ENTRY_OUTLINE",
      entry: imageResults.request,
      outlineReason: "ERROR"
    },
    {
      type: "CANDY_STRIPED_TIME_RANGE",
      bounds: delay,
      entry: imageResults.request
    },
    {
      type: "TIMESPAN_BREAKDOWN",
      sections: [{
        bounds: delay,
        // This is overridden in the component.
        label: `${imageResults.discoveryDelay} microseconds`,
        showDuration: false
      }],
      entry: imageResults.request,
      renderLocation: "ABOVE_EVENT"
    }
  ];
}
function buildPolyfillExpression(object2, property, coreJs3Module) {
  const qt = /* @__PURE__ */ __name((token) => `['"]${token}['"]`, "qt");
  let expression = "";
  if (object2) {
    expression += `${object2}\\.${property}\\s?=[^=]`;
  } else {
    expression += `(?:window\\.|[\\s;]+)${property}\\s?=[^=]`;
  }
  if (object2) {
    expression += `|${object2}\\[${qt(property)}\\]\\s?=[^=]`;
  }
  expression += `|defineProperty\\(${object2 || "window"},\\s?${qt(property)}`;
  if (object2) {
    expression += `|\\(${object2},\\s*{${property}:.*},\\s*{${property}`;
  }
  if (object2) {
    const objectWithoutPrototype = object2.replace(".prototype", "");
    expression += `|{target:${qt(objectWithoutPrototype)}[^;]*},{${property}:`;
  } else {
  }
  expression += `|${coreJs3Module.replaceAll(".", "\\.")}(?:\\.js)?"`;
  return expression;
}
function getCoreJsPolyfillData() {
  return polyfillModuleData.filter((d) => d.corejs).map((d) => {
    return {
      name: d.name,
      coreJs3Module: d.modules[0]
    };
  });
}
function getPolyfillPatterns() {
  const patterns = [];
  for (const { name, coreJs3Module } of getCoreJsPolyfillData()) {
    const parts = name.split(".");
    const object2 = parts.length > 1 ? parts.slice(0, parts.length - 1).join(".") : null;
    const property = parts[parts.length - 1];
    patterns.push({
      name,
      expression: buildPolyfillExpression(object2, property, coreJs3Module)
    });
  }
  return patterns;
}
function getTransformPatterns() {
  const count = /* @__PURE__ */ __name((content, pattern2) => {
    if (typeof pattern2 === "string") {
      return content.split(pattern2).length - 1;
    }
    return (content.match(pattern2) ?? []).length;
  }, "count");
  return [
    // @babel/plugin-transform-classes
    //
    // input:
    //
    // class MyTestClass {
    //   log() {
    //     console.log(1);
    //   }
    // };
    //
    // output:
    //
    // function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
    // function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
    // function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
    // function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
    // function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
    // let MyTestClass = function () {
    //   function MyTestClass() {
    //     _classCallCheck(this, MyTestClass);
    //   }
    //   return _createClass(MyTestClass, [{
    //     key: "log",
    //     value: function log() {
    //       console.log(1);
    //     }
    //   }]);
    // }();
    {
      name: "@babel/plugin-transform-classes",
      expression: "Cannot call a class as a function",
      estimateBytes: /* @__PURE__ */ __name((content) => {
        return 1e3 + (count(content, "_classCallCheck") - 1) * "_classCallCheck()".length;
      }, "estimateBytes")
    },
    {
      name: "@babel/plugin-transform-regenerator",
      expression: "Generator is already running|regeneratorRuntime",
      // Example of this transform: https://gist.github.com/connorjclark/af8bccfff377ac44efc104a79bc75da2
      // `regeneratorRuntime.awrap` is generated for every usage of `await`, and adds ~80 bytes each.
      estimateBytes: /* @__PURE__ */ __name((content) => {
        return count(content, /regeneratorRuntime\(?\)?\.a?wrap/g) * 80;
      }, "estimateBytes")
    },
    {
      name: "@babel/plugin-transform-spread",
      expression: "Invalid attempt to spread non-iterable instance",
      estimateBytes: /* @__PURE__ */ __name((content) => {
        const per = "_toConsumableArray()".length;
        return 1169 + count(content, /\.apply\(void 0,\s?_toConsumableArray/g) * per;
      }, "estimateBytes")
    }
  ];
}
function estimateWastedBytes(content, matches) {
  const polyfillResults = matches.filter((m) => !m.name.startsWith("@"));
  const transformResults = matches.filter((m) => m.name.startsWith("@"));
  let estimatedWastedBytesFromPolyfills = 0;
  const modulesSeen = /* @__PURE__ */ new Set();
  for (const result of polyfillResults) {
    const modules = graph.dependencies[result.name];
    if (!modules)
      continue;
    for (const module2 of modules) {
      modulesSeen.add(module2);
    }
  }
  estimatedWastedBytesFromPolyfills += [...modulesSeen].reduce((acc, moduleIndex) => {
    return acc + graph.moduleSizes[moduleIndex];
  }, 0);
  estimatedWastedBytesFromPolyfills = Math.min(estimatedWastedBytesFromPolyfills, graph.maxSize);
  let estimatedWastedBytesFromTransforms = 0;
  for (const result of transformResults) {
    const pattern2 = getTransformPatterns().find((p) => p.name === result.name);
    if (!pattern2 || !pattern2.estimateBytes || !content)
      continue;
    estimatedWastedBytesFromTransforms += pattern2.estimateBytes(content);
  }
  const estimatedWastedBytes = estimatedWastedBytesFromPolyfills + estimatedWastedBytesFromTransforms;
  return estimatedWastedBytes;
}
function detectLegacyJavaScript(content, map2) {
  if (!content)
    return { matches: [], estimatedByteSavings: 0 };
  let matches = matcher.match(content);
  if (map2) {
    for (const { name, modules } of polyfillModuleData) {
      if (matches.some((m) => m.name === name))
        continue;
      const source2 = map2.sourceURLs().find((source22) => modules.some((module2) => {
        return source22.endsWith(`/${module2}.js`) || source22.includes(`node_modules/${module2}/`);
      }));
      if (!source2)
        continue;
      const mapping = map2.mappings().find((m) => m.sourceURL === source2);
      if (mapping) {
        matches.push({ name, line: mapping.lineNumber, column: mapping.columnNumber });
      } else {
        matches.push({ name, line: 0, column: 0 });
      }
    }
  }
  matches = matches.sort((a, b) => a.name > b.name ? 1 : a.name === b.name ? 0 : -1);
  return {
    matches,
    estimatedByteSavings: estimateWastedBytes(content, matches)
  };
}
function finalize42(partialModel) {
  const requests = [...partialModel.legacyJavaScriptResults.keys()].map((script) => script.request).filter((e) => !!e);
  return {
    insightKey: InsightKeys.LEGACY_JAVASCRIPT,
    strings: UIStrings13,
    title: i18nString12(UIStrings13.title),
    description: i18nString12(UIStrings13.description),
    docs: "https://developer.chrome.com/docs/performance/insights/legacy-javascript",
    category: InsightCategory.ALL,
    state: requests.length ? "fail" : "pass",
    relatedEvents: [...new Set(requests)],
    ...partialModel
  };
}
function isLegacyJavaScript(model22) {
  return model22.insightKey === InsightKeys.LEGACY_JAVASCRIPT;
}
function generateInsight12(data312, context2) {
  const scripts = data312.Scripts.scripts.filter((script) => {
    if (script.frame !== context2.frameId) {
      return false;
    }
    if (script.url?.startsWith("chrome-extension://")) {
      return false;
    }
    return Timing_exports3.timestampIsInBounds(context2.bounds, script.ts) || script.request && Timing_exports3.eventIsInBounds(script.request, context2.bounds);
  });
  const legacyJavaScriptResults = /* @__PURE__ */ new Map();
  const wastedBytesByRequestId = /* @__PURE__ */ new Map();
  for (const script of scripts) {
    if (!script.content || script.content.length < BYTE_THRESHOLD) {
      continue;
    }
    const result = detectLegacyJavaScript2(script.content, script.sourceMap);
    if (result.estimatedByteSavings < BYTE_THRESHOLD) {
      continue;
    }
    const compressionRatio = estimateCompressionRatioForScript(script);
    const transferSize = Math.round(result.estimatedByteSavings * compressionRatio);
    result.estimatedByteSavings = transferSize;
    legacyJavaScriptResults.set(script, result);
    if (script.request) {
      const requestId = script.request.args.data.requestId;
      wastedBytesByRequestId.set(requestId, transferSize);
    }
  }
  const sorted22 = new Map([...legacyJavaScriptResults].sort((a, b) => b[1].estimatedByteSavings - a[1].estimatedByteSavings));
  return finalize42({
    legacyJavaScriptResults: sorted22,
    metricSavings: metricSavingsForWastedBytes(wastedBytesByRequestId, context2),
    wastedBytes: wastedBytesByRequestId.values().reduce((acc, cur) => acc + cur, 0)
  });
}
function createOverlays12(model22) {
  return [...model22.legacyJavaScriptResults.keys()].map((script) => script.request).filter((e) => !!e).map((request3) => {
    return {
      type: "ENTRY_OUTLINE",
      entry: request3,
      outlineReason: "ERROR"
    };
  });
}
function isModernHTTPInsight(model22) {
  return model22.insightKey === InsightKeys.MODERN_HTTP;
}
function isMultiplexableStaticAsset(request3, entityMappings32, firstPartyEntity) {
  if (!Network_exports.STATIC_RESOURCE_TYPES.has(request3.args.data.resourceType)) {
    return false;
  }
  if (request3.args.data.decodedBodyLength < 100) {
    const entity = entityMappings32.entityByEvent.get(request3);
    if (entity) {
      if (firstPartyEntity?.name === entity.name) {
        return true;
      }
      if (!entity.isUnrecognized) {
        return false;
      }
    }
  }
  return true;
}
function determineHttp1Requests(requests, entityMappings32, firstPartyEntity) {
  const http1Requests = [];
  const groupedByOrigin = /* @__PURE__ */ new Map();
  for (const record2 of requests) {
    const url = new URL(record2.args.data.url);
    if (!isMultiplexableStaticAsset(record2, entityMappings32, firstPartyEntity)) {
      continue;
    }
    if (Network_exports.isSyntheticNetworkRequestLocalhost(record2)) {
      continue;
    }
    const originRequests = MapUtilities_exports.getWithDefault(groupedByOrigin, url.origin, () => []);
    originRequests.push(record2);
  }
  const seenURLs = /* @__PURE__ */ new Set();
  for (const request3 of requests) {
    if (seenURLs.has(request3.args.data.url)) {
      continue;
    }
    if (request3.args.data.fromServiceWorker) {
      continue;
    }
    const isOldHttp = /HTTP\/[01][.\d]?/i.test(request3.args.data.protocol);
    if (!isOldHttp) {
      continue;
    }
    const url = new URL(request3.args.data.url);
    const group = groupedByOrigin.get(url.origin) || [];
    if (group.length < 6) {
      continue;
    }
    seenURLs.add(request3.args.data.url);
    http1Requests.push(request3);
  }
  return http1Requests;
}
function computeWasteWithGraph(urlsToChange, graph22, simulator) {
  const simulationBefore = simulator.simulate(graph22);
  const originalProtocols = /* @__PURE__ */ new Map();
  graph22.traverse((node2) => {
    if (node2.type !== "network") {
      return;
    }
    if (!urlsToChange.has(node2.request.url)) {
      return;
    }
    originalProtocols.set(node2.request.requestId, node2.request.protocol);
    node2.request.protocol = "h2";
  });
  const simulationAfter = simulator.simulate(graph22);
  graph22.traverse((node2) => {
    if (node2.type !== "network") {
      return;
    }
    const originalProtocol = originalProtocols.get(node2.request.requestId);
    if (originalProtocol === void 0) {
      return;
    }
    node2.request.protocol = originalProtocol;
  });
  const savings = simulationBefore.timeInMs - simulationAfter.timeInMs;
  return NumberUtilities_exports.floor(savings, 1 / 10);
}
function computeMetricSavings(http1Requests, context2) {
  if (!context2.navigation || !context2.lantern) {
    return;
  }
  const urlsToChange = new Set(http1Requests.map((r) => r.args.data.url));
  const fcpGraph = context2.lantern.metrics.firstContentfulPaint.optimisticGraph;
  const lcpGraph = context2.lantern.metrics.largestContentfulPaint.optimisticGraph;
  return {
    FCP: computeWasteWithGraph(urlsToChange, fcpGraph, context2.lantern.simulator),
    LCP: computeWasteWithGraph(urlsToChange, lcpGraph, context2.lantern.simulator)
  };
}
function finalize43(partialModel) {
  return {
    insightKey: InsightKeys.MODERN_HTTP,
    strings: UIStrings14,
    title: i18nString13(UIStrings14.title),
    description: i18nString13(UIStrings14.description),
    docs: "https://developer.chrome.com/docs/performance/insights/modern-http",
    category: InsightCategory.LCP,
    state: partialModel.http1Requests.length > 0 ? "fail" : "pass",
    ...partialModel,
    relatedEvents: partialModel.http1Requests
  };
}
function generateInsight13(data312, context2) {
  const isWithinContext = /* @__PURE__ */ __name((event) => Timing_exports3.eventIsInBounds(event, context2.bounds), "isWithinContext");
  const contextRequests = data312.NetworkRequests.byTime.filter(isWithinContext);
  const entityMappings32 = data312.NetworkRequests.entityMappings;
  const firstPartyUrl = context2.navigation?.args.data?.documentLoaderURL ?? data312.Meta.mainFrameURL;
  const firstPartyEntity = helpers_exports.getEntityForUrl(firstPartyUrl, entityMappings32);
  const http1Requests = determineHttp1Requests(contextRequests, entityMappings32, firstPartyEntity ?? null);
  return finalize43({
    http1Requests,
    metricSavings: computeMetricSavings(http1Requests, context2)
  });
}
function createOverlayForRequest3(request3) {
  return {
    type: "ENTRY_OUTLINE",
    entry: request3,
    outlineReason: "ERROR"
  };
}
function createOverlays13(model22) {
  return model22.http1Requests.map((req) => createOverlayForRequest3(req)) ?? [];
}
function finalize44(partialModel) {
  return {
    insightKey: InsightKeys.NETWORK_DEPENDENCY_TREE,
    strings: UIStrings15,
    title: i18nString14(UIStrings15.title),
    description: i18nString14(UIStrings15.description),
    docs: "https://developer.chrome.com/docs/performance/insights/network-dependency-tree",
    category: InsightCategory.LCP,
    state: partialModel.fail ? "fail" : "pass",
    ...partialModel
  };
}
function isCritical(request3, context2) {
  if (request3.args.data.requestId === context2.navigationId) {
    return true;
  }
  if (request3.args.data.isLinkPreload) {
    return false;
  }
  const isIframe = request3.args.data.resourceType === "Document" && request3.args.data.frame !== context2.frameId;
  if (nonCriticalResourceTypes.has(request3.args.data.resourceType) || isIframe || // Treat any missed images, primarily favicons, as non-critical resources
  request3.args.data.mimeType.startsWith("image/")) {
    return false;
  }
  const initiatorUrl = request3.args.data.initiator?.url || Trace_exports.getStackTraceTopCallFrameInEventPayload(request3)?.url;
  if (!initiatorUrl) {
    return false;
  }
  const isBlocking = Network_exports.isSyntheticNetworkRequestEventRenderBlocking(request3);
  const isHighPriority = Network_exports.isSyntheticNetworkRequestHighPriority(request3);
  return isHighPriority || isBlocking;
}
function findMaxLeafNode(node2) {
  if (node2.children.length === 0) {
    return node2;
  }
  let maxLeaf = node2.children[0];
  for (const child of node2.children) {
    const leaf = findMaxLeafNode(child);
    if (leaf.timeFromInitialRequest > maxLeaf.timeFromInitialRequest) {
      maxLeaf = leaf;
    }
  }
  return maxLeaf;
}
function sortRecursively(nodes) {
  for (const node2 of nodes) {
    if (node2.children.length > 0) {
      node2.children.sort((nodeA, nodeB) => {
        const leafA = findMaxLeafNode(nodeA);
        const leafB = findMaxLeafNode(nodeB);
        return leafB.timeFromInitialRequest - leafA.timeFromInitialRequest;
      });
      sortRecursively(node2.children);
    }
  }
}
function generateNetworkDependencyTree(context2) {
  const rootNodes = [];
  const relatedEvents = /* @__PURE__ */ new Map();
  let maxTime = Timing_exports.Micro(0);
  let fail = false;
  let longestChain = [];
  function addChain(path72) {
    if (path72.length === 0) {
      return;
    }
    if (path72.length >= 2) {
      fail = true;
    }
    const initialRequest = path72[0];
    const lastRequest = path72[path72.length - 1];
    const totalChainTime = Timing_exports.Micro(lastRequest.ts + lastRequest.dur - initialRequest.ts);
    if (totalChainTime > maxTime) {
      maxTime = totalChainTime;
      longestChain = path72;
    }
    let currentNodes = rootNodes;
    for (let depth = 0; depth < path72.length; ++depth) {
      const request3 = path72[depth];
      let found = currentNodes.find((node2) => node2.request === request3);
      if (!found) {
        const timeFromInitialRequest = Timing_exports.Micro(request3.ts + request3.dur - initialRequest.ts);
        found = {
          request: request3,
          timeFromInitialRequest,
          children: [],
          relatedRequests: /* @__PURE__ */ new Set()
        };
        currentNodes.push(found);
      }
      path72.forEach((request22) => found?.relatedRequests.add(request22));
      relatedEvents.set(request3, depth < 2 ? [] : [i18nString14(UIStrings15.warningDescription)]);
      currentNodes = found.children;
    }
  }
  __name(addChain, "addChain");
  const seenNodes = /* @__PURE__ */ new Set();
  function getNextNodes(node2) {
    return node2.getDependents().filter((n) => n.getDependencies().every((d) => seenNodes.has(d)));
  }
  __name(getNextNodes, "getNextNodes");
  context2.lantern?.graph.traverse((node2, traversalPath) => {
    seenNodes.add(node2);
    if (node2.type !== "network") {
      return;
    }
    const networkNode = node2;
    if (!isCritical(networkNode.rawRequest, context2)) {
      return;
    }
    const networkPath = traversalPath.filter((node22) => node22.type === "network").reverse().map((node22) => node22.rawRequest);
    if (networkPath.some((request3) => !isCritical(request3, context2))) {
      return;
    }
    if (node2.isNonNetworkProtocol) {
      return;
    }
    addChain(networkPath);
  }, getNextNodes);
  if (longestChain.length > 0) {
    let currentNodes = rootNodes;
    for (const request3 of longestChain) {
      const found = currentNodes.find((node2) => node2.request === request3);
      if (found) {
        found.isLongest = true;
        currentNodes = found.children;
      } else {
        console.error("Some request in the longest chain is not found");
      }
    }
  }
  sortRecursively(rootNodes);
  return {
    rootNodes,
    maxTime,
    fail,
    relatedEvents
  };
}
function getSecurityOrigin(url) {
  const parsedURL = new ParsedURL(url);
  return parsedURL.securityOrigin();
}
function handleLinkResponseHeaderPart(trimmedPart) {
  if (!trimmedPart) {
    return null;
  }
  const urlStart = trimmedPart.indexOf("<");
  const urlEnd = trimmedPart.indexOf(">");
  if (urlStart !== 0 || urlEnd === -1 || urlEnd <= urlStart) {
    return null;
  }
  const url = trimmedPart.substring(urlStart + 1, urlEnd).trim();
  if (!url) {
    return null;
  }
  const paramsString = trimmedPart.substring(urlEnd + 1).trim();
  if (paramsString) {
    const params = paramsString.split(";");
    for (const param of params) {
      const trimmedParam = param.trim();
      if (!trimmedParam) {
        continue;
      }
      const eqIndex = trimmedParam.indexOf("=");
      if (eqIndex === -1) {
        continue;
      }
      const paramName = trimmedParam.substring(0, eqIndex).trim().toLowerCase();
      let paramValue = trimmedParam.substring(eqIndex + 1).trim();
      if (paramValue.startsWith('"') && paramValue.endsWith('"')) {
        paramValue = paramValue.substring(1, paramValue.length - 1);
      }
      if (paramName === "rel" && paramValue === "preconnect") {
        return { url, headerText: trimmedPart };
      }
    }
  }
  return null;
}
function handleLinkResponseHeader(linkHeaderValue) {
  if (!linkHeaderValue) {
    return [];
  }
  const preconnectedOrigins = [];
  for (let i = 0; i < linkHeaderValue.length; ) {
    const firstUrlEnd = linkHeaderValue.indexOf(">", i);
    if (firstUrlEnd === -1) {
      break;
    }
    const commaIndex = linkHeaderValue.indexOf(",", firstUrlEnd);
    const partEnd = commaIndex !== -1 ? commaIndex : linkHeaderValue.length;
    const part = linkHeaderValue.substring(i, partEnd);
    if (partEnd + 1 <= i) {
      console.warn("unexpected infinite loop, bailing");
      break;
    }
    i = partEnd + 1;
    const preconnectedOrigin = handleLinkResponseHeaderPart(part.trim());
    if (preconnectedOrigin) {
      preconnectedOrigins.push(preconnectedOrigin);
    }
  }
  return preconnectedOrigins;
}
function generatePreconnectedOrigins(data312, context2, contextRequests, preconnectCandidates) {
  const preconnectedOrigins = [];
  for (const event of data312.NetworkRequests.linkPreconnectEvents) {
    preconnectedOrigins.push({
      node_id: event.args.data.node_id,
      frame: event.args.data.frame,
      url: event.args.data.url,
      // For each origin the page wanted to preconnect to:
      // - if we found no network requests to that origin at all then we issue a unused warning
      unused: !contextRequests.some((request3) => getSecurityOrigin(event.args.data.url) === getSecurityOrigin(request3.args.data.url)),
      // - else (we found network requests to the same origin) and if some of those network requests is too slow (if
      //   they are preconnect candidates), then we issue a unused warning with crossorigin hint
      crossorigin: preconnectCandidates.some((candidate) => candidate.origin === getSecurityOrigin(event.args.data.url)),
      source: "DOM"
    });
  }
  const documentRequest = data312.NetworkRequests.byId.get(context2.navigationId);
  documentRequest?.args.data.responseHeaders?.forEach((header) => {
    if (header.name.toLowerCase() === "link") {
      const preconnectedOriginsFromResponseHeader = handleLinkResponseHeader(header.value);
      preconnectedOriginsFromResponseHeader?.forEach((origin) => preconnectedOrigins.push({
        url: origin.url,
        headerText: origin.headerText,
        request: documentRequest,
        // For each origin the page wanted to preconnect to:
        // - if we found no network requests to that origin at all then we issue a unused warning
        unused: !contextRequests.some((request3) => getSecurityOrigin(origin.url) === getSecurityOrigin(request3.args.data.url)),
        // - else (we found network requests to the same origin) and if some of those network requests is too slow (if
        //   they are preconnect candidates), then we issue a unused warning with crossorigin hint
        crossorigin: preconnectCandidates.some((candidate) => candidate.origin === getSecurityOrigin(origin.url)),
        source: "ResponseHeader"
      }));
    }
  });
  return preconnectedOrigins;
}
function hasValidTiming(request3) {
  return !!request3.args.data.timing && request3.args.data.timing.connectEnd >= 0 && request3.args.data.timing.connectStart >= 0;
}
function hasAlreadyConnectedToOrigin(request3) {
  const { timing } = request3.args.data;
  if (!timing) {
    return false;
  }
  if (timing.dnsStart === -1 && timing.dnsEnd === -1 && timing.connectStart === -1 && timing.connectEnd === -1) {
    return true;
  }
  if (timing.dnsEnd - timing.dnsStart === 0 && timing.connectEnd - timing.connectStart === 0) {
    return true;
  }
  return false;
}
function socketStartTimeIsBelowThreshold(request3, mainResource) {
  const timeSinceMainEnd = Math.max(0, request3.args.data.syntheticData.sendStartTime - mainResource.args.data.syntheticData.finishTime);
  return Timing_exports3.microToMilli(timeSinceMainEnd) < PRECONNECT_SOCKET_MAX_IDLE_IN_MS;
}
function candidateRequestsByOrigin(data312, mainResource, contextRequests, lcpGraphURLs) {
  const origins = /* @__PURE__ */ new Map();
  contextRequests.forEach((request3) => {
    if (!hasValidTiming(request3)) {
      return;
    }
    if (data312.NetworkRequests.eventToInitiator.get(request3) === mainResource) {
      return;
    }
    const url = new URL(request3.args.data.url);
    if (url.origin === "null") {
      return;
    }
    const mainOrigin = new URL(mainResource.args.data.url).origin;
    if (url.origin === mainOrigin) {
      return;
    }
    if (!lcpGraphURLs.has(request3.args.data.url)) {
      return;
    }
    if (hasAlreadyConnectedToOrigin(request3)) {
      return;
    }
    if (!socketStartTimeIsBelowThreshold(request3, mainResource)) {
      return;
    }
    const originRequests = MapUtilities_exports.getWithDefault(origins, url.origin, () => []);
    originRequests.push(request3);
  });
  return origins;
}
function generatePreconnectCandidates(data312, context2, contextRequests) {
  if (!context2.lantern) {
    return [];
  }
  const documentRequest = data312.NetworkRequests.byId.get(context2.navigationId);
  if (!documentRequest) {
    return [];
  }
  const { rtt, additionalRttByOrigin } = context2.lantern.simulator.getOptions();
  const lcpGraph = context2.lantern.metrics.largestContentfulPaint.pessimisticGraph;
  const fcpGraph = context2.lantern.metrics.firstContentfulPaint.pessimisticGraph;
  const lcpGraphURLs = /* @__PURE__ */ new Set();
  lcpGraph.traverse((node2) => {
    if (node2.type === "network") {
      lcpGraphURLs.add(node2.request.url);
    }
  });
  const fcpGraphURLs = /* @__PURE__ */ new Set();
  fcpGraph.traverse((node2) => {
    if (node2.type === "network") {
      fcpGraphURLs.add(node2.request.url);
    }
  });
  const groupedOrigins = candidateRequestsByOrigin(data312, documentRequest, contextRequests, lcpGraphURLs);
  let maxWastedLcp = Timing_exports.Milli(0);
  let maxWastedFcp = Timing_exports.Milli(0);
  let preconnectCandidates = [];
  groupedOrigins.forEach((requests) => {
    const firstRequestOfOrigin = requests[0];
    if (!firstRequestOfOrigin.args.data.timing) {
      return;
    }
    const firstRequestOfOriginParsedURL = new ParsedURL(firstRequestOfOrigin.args.data.url);
    const origin = firstRequestOfOriginParsedURL.securityOrigin();
    const additionalRtt = additionalRttByOrigin.get(origin) ?? 0;
    let connectionTime = Timing_exports.Milli(rtt + additionalRtt);
    if (firstRequestOfOriginParsedURL.scheme === "https") {
      connectionTime = Timing_exports.Milli(connectionTime * 2);
    }
    const timeBetweenMainResourceAndDnsStart = Timing_exports.Micro(firstRequestOfOrigin.args.data.syntheticData.sendStartTime - documentRequest.args.data.syntheticData.finishTime + Timing_exports3.milliToMicro(firstRequestOfOrigin.args.data.timing.dnsStart));
    const wastedMs = Math.min(connectionTime, Timing_exports3.microToMilli(timeBetweenMainResourceAndDnsStart));
    if (wastedMs < IGNORE_THRESHOLD_IN_MILLISECONDS) {
      return;
    }
    maxWastedLcp = Math.max(wastedMs, maxWastedLcp);
    if (fcpGraphURLs.has(firstRequestOfOrigin.args.data.url)) {
      maxWastedFcp = Math.max(wastedMs, maxWastedFcp);
    }
    preconnectCandidates.push({
      origin,
      wastedMs
    });
  });
  preconnectCandidates = preconnectCandidates.sort((a, b) => b.wastedMs - a.wastedMs);
  return preconnectCandidates.slice(0, TOO_MANY_PRECONNECTS_THRESHOLD);
}
function isNetworkDependencyTreeInsight(model22) {
  return model22.insightKey === InsightKeys.NETWORK_DEPENDENCY_TREE;
}
function generateInsight14(data312, context2) {
  if (!context2.navigation) {
    return finalize44({
      rootNodes: [],
      maxTime: 0,
      fail: false,
      preconnectedOrigins: [],
      preconnectCandidates: []
    });
  }
  const { rootNodes, maxTime, fail, relatedEvents } = generateNetworkDependencyTree(context2);
  const isWithinContext = /* @__PURE__ */ __name((event) => Timing_exports3.eventIsInBounds(event, context2.bounds), "isWithinContext");
  const contextRequests = data312.NetworkRequests.byTime.filter(isWithinContext);
  const preconnectCandidates = generatePreconnectCandidates(data312, context2, contextRequests);
  const preconnectedOrigins = generatePreconnectedOrigins(data312, context2, contextRequests, preconnectCandidates);
  return finalize44({
    rootNodes,
    maxTime,
    fail,
    relatedEvents,
    preconnectedOrigins,
    preconnectCandidates
  });
}
function createOverlays14(model22) {
  function walk(nodes, overlays2) {
    nodes.forEach((node2) => {
      overlays2.push({
        type: "ENTRY_OUTLINE",
        entry: node2.request,
        outlineReason: "ERROR"
      });
      walk(node2.children, overlays2);
    });
  }
  __name(walk, "walk");
  const overlays = [];
  walk(model22.rootNodes, overlays);
  return overlays;
}
function normalizePath(path72) {
  if (path72.indexOf("..") === -1 && path72.indexOf(".") === -1) {
    return path72;
  }
  const segments = (path72[0] === "/" ? path72.substring(1) : path72).split("/");
  const normalizedSegments = [];
  for (const segment of segments) {
    if (segment === ".") {
      continue;
    } else if (segment === "..") {
      normalizedSegments.pop();
    } else {
      normalizedSegments.push(segment);
    }
  }
  let normalizedPath = normalizedSegments.join("/");
  if (path72[0] === "/" && normalizedPath) {
    normalizedPath = "/" + normalizedPath;
  }
  if (normalizedPath[normalizedPath.length - 1] !== "/" && (path72[path72.length - 1] === "/" || segments[segments.length - 1] === "." || segments[segments.length - 1] === "..")) {
    normalizedPath = normalizedPath + "/";
  }
  return normalizedPath;
}
function schemeIs(url, scheme) {
  try {
    return new URL(url).protocol === scheme;
  } catch {
    return false;
  }
}
function isRenderBlockingInsight(insight) {
  return insight.insightKey === "RenderBlocking";
}
function getNodesAndTimingByRequestId(nodeTimings) {
  const requestIdToNode = /* @__PURE__ */ new Map();
  for (const [node2, nodeTiming] of nodeTimings) {
    if (node2.type !== "network") {
      continue;
    }
    requestIdToNode.set(node2.request.requestId, { node: node2, nodeTiming });
  }
  return requestIdToNode;
}
function estimateSavingsWithGraphs2(deferredIds, lanternContext) {
  const simulator = lanternContext.simulator;
  const fcpGraph = lanternContext.metrics.firstContentfulPaint.optimisticGraph;
  const { nodeTimings } = lanternContext.simulator.simulate(fcpGraph);
  const adjustedNodeTimings = new Map(nodeTimings);
  const totalChildNetworkBytes = 0;
  const minimalFCPGraph = fcpGraph.cloneWithRelationships((node2) => {
    const canDeferRequest = deferredIds.has(node2.id);
    return !canDeferRequest;
  });
  if (minimalFCPGraph.type !== "network") {
    throw new Error("minimalFCPGraph not a NetworkNode");
  }
  const estimateBeforeInline = Math.max(...Array.from(Array.from(adjustedNodeTimings).map((timing) => timing[1].endTime)));
  const originalTransferSize = minimalFCPGraph.request.transferSize;
  const safeTransferSize = originalTransferSize || 0;
  minimalFCPGraph.request.transferSize = safeTransferSize + totalChildNetworkBytes;
  const estimateAfterInline = simulator.simulate(minimalFCPGraph).timeInMs;
  minimalFCPGraph.request.transferSize = originalTransferSize;
  return Math.round(Math.max(estimateBeforeInline - estimateAfterInline, 0));
}
function hasImageLCP(data312, context2) {
  return data312.LargestImagePaint.lcpRequestByNavigationId.has(context2.navigationId);
}
function computeSavings(data312, context2, renderBlockingRequests) {
  if (!context2.lantern) {
    return;
  }
  const nodesAndTimingsByRequestId = getNodesAndTimingByRequestId(context2.lantern.metrics.firstContentfulPaint.optimisticEstimate.nodeTimings);
  const metricSavings = { FCP: 0, LCP: 0 };
  const requestIdToWastedMs = /* @__PURE__ */ new Map();
  const deferredNodeIds = /* @__PURE__ */ new Set();
  for (const request3 of renderBlockingRequests) {
    const nodeAndTiming = nodesAndTimingsByRequestId.get(request3.args.data.requestId);
    if (!nodeAndTiming) {
      continue;
    }
    const { node: node2, nodeTiming } = nodeAndTiming;
    node2.traverse((node22) => deferredNodeIds.add(node22.id));
    const wastedMs = Math.round(nodeTiming.duration);
    if (wastedMs < MINIMUM_WASTED_MS) {
      continue;
    }
    requestIdToWastedMs.set(node2.id, wastedMs);
  }
  if (requestIdToWastedMs.size) {
    metricSavings.FCP = estimateSavingsWithGraphs2(deferredNodeIds, context2.lantern);
    if (!hasImageLCP(data312, context2)) {
      metricSavings.LCP = metricSavings.FCP;
    }
  }
  return { metricSavings, requestIdToWastedMs };
}
function finalize45(partialModel) {
  return {
    insightKey: InsightKeys.RENDER_BLOCKING,
    strings: UIStrings16,
    title: i18nString15(UIStrings16.title),
    description: i18nString15(UIStrings16.description),
    docs: "https://developer.chrome.com/docs/performance/insights/render-blocking",
    category: InsightCategory.LCP,
    state: partialModel.renderBlockingRequests.length > 0 ? "fail" : "pass",
    ...partialModel
  };
}
function generateInsight15(data312, context2) {
  if (!context2.navigation) {
    return finalize45({
      renderBlockingRequests: []
    });
  }
  const firstPaintTs = data312.PageLoadMetrics.metricScoresByFrameId.get(context2.frameId)?.get(context2.navigationId)?.get(ModelHandlers_exports.PageLoadMetrics.MetricName.FP)?.event?.ts;
  if (!firstPaintTs) {
    return finalize45({
      renderBlockingRequests: [],
      warnings: [InsightWarning.NO_FP]
    });
  }
  let renderBlockingRequests = [];
  for (const req of data312.NetworkRequests.byTime) {
    if (req.args.data.frame !== context2.frameId) {
      continue;
    }
    if (!Network_exports.isSyntheticNetworkRequestEventRenderBlocking(req)) {
      continue;
    }
    if (req.args.data.syntheticData.finishTime > firstPaintTs) {
      continue;
    }
    if (req.args.data.renderBlocking === "in_body_parser_blocking") {
      const priority = req.args.data.priority;
      const isScript = req.args.data.resourceType === "Script";
      const isBlockingScript = isScript && priority === "High";
      if (priority !== "VeryHigh" && !isBlockingScript) {
        continue;
      }
    }
    const navigation2 = Trace_exports.getNavigationForTraceEvent(req, context2.frameId, data312.Meta.navigationsByFrameId);
    if (navigation2 === context2.navigation) {
      renderBlockingRequests.push(req);
    }
  }
  const savings = computeSavings(data312, context2, renderBlockingRequests);
  renderBlockingRequests = renderBlockingRequests.sort((a, b) => {
    return b.dur - a.dur;
  });
  return finalize45({
    relatedEvents: renderBlockingRequests,
    renderBlockingRequests,
    ...savings
  });
}
function createOverlayForRequest4(request3) {
  return {
    type: "ENTRY_OUTLINE",
    entry: request3,
    outlineReason: "ERROR"
  };
}
function createOverlays15(model22) {
  return model22.renderBlockingRequests.map((request3) => createOverlayForRequest4(request3));
}
function aggregateSelectorStats(data312, context2) {
  const selectorMap = /* @__PURE__ */ new Map();
  for (const [event, value] of data312.dataForRecalcStyleEvent) {
    if (event.args.beginData?.frame !== context2.frameId) {
      continue;
    }
    if (!Timing_exports3.eventIsInBounds(event, context2.bounds)) {
      continue;
    }
    for (const timing of value.timings) {
      const key = timing[SelectorTimingsKey.Selector] + "_" + timing[SelectorTimingsKey.StyleSheetId];
      const findTiming = selectorMap.get(key);
      if (findTiming !== void 0) {
        findTiming[SelectorTimingsKey.Elapsed] += timing[SelectorTimingsKey.Elapsed];
        findTiming[SelectorTimingsKey.FastRejectCount] += timing[SelectorTimingsKey.FastRejectCount];
        findTiming[SelectorTimingsKey.MatchAttempts] += timing[SelectorTimingsKey.MatchAttempts];
        findTiming[SelectorTimingsKey.MatchCount] += timing[SelectorTimingsKey.MatchCount];
      } else {
        selectorMap.set(key, { ...timing });
      }
    }
  }
  return [...selectorMap.values()];
}
function finalize46(partialModel) {
  return {
    insightKey: InsightKeys.SLOW_CSS_SELECTOR,
    strings: UIStrings17,
    title: i18nString16(UIStrings17.title),
    description: i18nString16(UIStrings17.description),
    docs: "https://developer.chrome.com/docs/performance/insights/slow-css-selector",
    category: InsightCategory.ALL,
    state: partialModel.topSelectorElapsedMs && partialModel.topSelectorMatchAttempts ? "informative" : "pass",
    ...partialModel
  };
}
function isSlowCSSSelectorInsight(model22) {
  return model22.insightKey === InsightKeys.SLOW_CSS_SELECTOR;
}
function generateInsight16(data312, context2) {
  const selectorStatsData = data312.SelectorStats;
  if (!selectorStatsData) {
    throw new Error("no selector stats data");
  }
  const selectorTimings = aggregateSelectorStats(selectorStatsData, context2);
  let totalElapsedUs = 0;
  let totalMatchAttempts = 0;
  let totalMatchCount = 0;
  selectorTimings.map((timing) => {
    totalElapsedUs += timing[SelectorTimingsKey.Elapsed];
    totalMatchAttempts += timing[SelectorTimingsKey.MatchAttempts];
    totalMatchCount += timing[SelectorTimingsKey.MatchCount];
  });
  let topSelectorElapsedMs = null;
  let topSelectorMatchAttempts = null;
  if (selectorTimings.length > 0) {
    topSelectorElapsedMs = selectorTimings.reduce((a, b) => {
      return a[SelectorTimingsKey.Elapsed] > b[SelectorTimingsKey.Elapsed] ? a : b;
    });
    if (topSelectorElapsedMs && topSelectorElapsedMs[SelectorTimingsKey.Elapsed] < slowCSSSelectorThreshold) {
      topSelectorElapsedMs = null;
    }
    topSelectorMatchAttempts = selectorTimings.reduce((a, b) => {
      return a[SelectorTimingsKey.MatchAttempts] > b[SelectorTimingsKey.MatchAttempts] ? a : b;
    });
  }
  return finalize46({
    // TODO: should we identify RecalcStyle events as linked to this insight?
    relatedEvents: [],
    totalElapsedMs: Timing_exports.Milli(totalElapsedUs / 1e3),
    totalMatchAttempts,
    totalMatchCount,
    topSelectorElapsedMs,
    topSelectorMatchAttempts
  });
}
function createOverlays16(_) {
  return [];
}
function getRelatedEvents(summaries, firstPartyEntity) {
  const relatedEvents = [];
  for (const summary of summaries) {
    if (summary.entity !== firstPartyEntity) {
      relatedEvents.push(...summary.relatedEvents);
    }
  }
  return relatedEvents;
}
function finalize47(partialModel) {
  return {
    insightKey: InsightKeys.THIRD_PARTIES,
    strings: UIStrings18,
    title: i18nString17(UIStrings18.title),
    description: i18nString17(UIStrings18.description),
    docs: "https://developer.chrome.com/docs/performance/insights/third-parties",
    category: InsightCategory.ALL,
    state: partialModel.entitySummaries.find((summary) => summary.entity !== partialModel.firstPartyEntity) ? "informative" : "pass",
    ...partialModel
  };
}
function isThirdPartyInsight(model22) {
  return model22.insightKey === InsightKeys.THIRD_PARTIES;
}
function generateInsight17(data312, context2) {
  const entitySummaries = ThirdParties_exports.summarizeByThirdParty(data312, context2.bounds);
  const firstPartyUrl = context2.navigation?.args.data?.documentLoaderURL ?? data312.Meta.mainFrameURL;
  const firstPartyEntity = import_third_party_web.default.getEntity(firstPartyUrl) || helpers_exports.makeUpEntity(data312.Renderer.entityMappings.createdEntityCache, firstPartyUrl);
  return finalize47({
    relatedEvents: getRelatedEvents(entitySummaries, firstPartyEntity),
    firstPartyEntity,
    entitySummaries
  });
}
function createOverlaysForSummary(summary) {
  const overlays = [];
  for (const event of summary.relatedEvents) {
    if (event.dur === void 0 || event.dur < 1e3) {
      continue;
    }
    const overlay = {
      type: "ENTRY_OUTLINE",
      entry: event,
      outlineReason: "INFO"
    };
    overlays.push(overlay);
  }
  return overlays;
}
function createOverlays17(model22) {
  const overlays = [];
  const summaries = model22.entitySummaries ?? [];
  for (const summary of summaries) {
    if (summary.entity === model22.firstPartyEntity) {
      continue;
    }
    const summaryOverlays = createOverlaysForSummary(summary);
    overlays.push(...summaryOverlays);
  }
  return overlays;
}
function finalize48(partialModel) {
  return {
    insightKey: InsightKeys.VIEWPORT,
    strings: UIStrings19,
    title: i18nString18(UIStrings19.title),
    description: i18nString18(UIStrings19.description),
    docs: "https://developer.chrome.com/docs/performance/insights/viewport",
    category: InsightCategory.INP,
    state: partialModel.mobileOptimized === false ? "fail" : "pass",
    ...partialModel
  };
}
function isViewportInsight(model22) {
  return model22.insightKey === InsightKeys.VIEWPORT;
}
function generateInsight18(data312, context2) {
  const viewportEvent = data312.UserInteractions.parseMetaViewportEvents.find((event) => {
    if (event.args.data.frame !== context2.frameId) {
      return false;
    }
    return Timing_exports3.eventIsInBounds(event, context2.bounds);
  });
  const compositorEvents = data312.UserInteractions.beginCommitCompositorFrameEvents.filter((event) => {
    if (event.args.frame !== context2.frameId) {
      return false;
    }
    if (viewportEvent && event.ts < viewportEvent.ts) {
      return false;
    }
    return Timing_exports3.eventIsInBounds(event, context2.bounds);
  });
  if (!compositorEvents.length) {
    return finalize48({
      mobileOptimized: null,
      warnings: [InsightWarning.NO_LAYOUT]
    });
  }
  for (const event of compositorEvents) {
    if (!event.args.is_mobile_optimized) {
      const longPointerInteractions = [...data312.UserInteractions.interactionsOverThreshold.values()].filter((interaction) => ModelHandlers_exports.UserInteractions.categoryOfInteraction(interaction) === "POINTER" && interaction.inputDelay >= 5e4);
      const inputDelay = Math.max(0, ...longPointerInteractions.map((interaction) => interaction.inputDelay)) / 1e3;
      const inpMetricSavings = NumberUtilities_exports.clamp(inputDelay, 0, 300);
      return finalize48({
        mobileOptimized: false,
        viewportEvent,
        longPointerInteractions,
        metricSavings: { INP: inpMetricSavings }
      });
    }
  }
  return finalize48({
    mobileOptimized: true,
    viewportEvent
  });
}
function createOverlays18(model22) {
  if (!model22.longPointerInteractions) {
    return [];
  }
  return model22.longPointerInteractions.map((interaction) => {
    const delay = Math.min(interaction.inputDelay, 300 * 1e3);
    const bounds = Timing_exports3.traceWindowFromMicroSeconds(Timing_exports.Micro(interaction.ts), Timing_exports.Micro(interaction.ts + delay));
    return {
      type: "TIMESPAN_BREAKDOWN",
      entry: interaction,
      sections: [{ bounds, label: i18nString18(UIStrings19.mobileTapDelayLabel), showDuration: true }],
      renderLocation: "ABOVE_EVENT"
    };
  });
}
function createProcessedNavigation(data312, frameId, navigationId) {
  const scoresByNav = data312.PageLoadMetrics.metricScoresByFrameId.get(frameId);
  if (!scoresByNav) {
    throw new core_exports.LanternError("missing metric scores for frame");
  }
  const scores = scoresByNav.get(navigationId);
  if (!scores) {
    throw new core_exports.LanternError("missing metric scores for specified navigation");
  }
  const getTimestampOrUndefined = /* @__PURE__ */ __name((metric) => {
    const metricScore = scores.get(metric);
    if (!metricScore?.event) {
      return;
    }
    return metricScore.event.ts;
  }, "getTimestampOrUndefined");
  const getTimestamp = /* @__PURE__ */ __name((metric) => {
    const metricScore = scores.get(metric);
    if (!metricScore?.event) {
      throw new core_exports.LanternError(`missing metric: ${metric}`);
    }
    return metricScore.event.ts;
  }, "getTimestamp");
  return {
    timestamps: {
      firstContentfulPaint: getTimestamp(ModelHandlers_exports.PageLoadMetrics.MetricName.FCP),
      largestContentfulPaint: getTimestampOrUndefined(ModelHandlers_exports.PageLoadMetrics.MetricName.LCP)
    }
  };
}
function createParsedUrl(url) {
  if (typeof url === "string") {
    url = new URL(url);
  }
  return {
    scheme: url.protocol.split(":")[0],
    // Intentional, DevTools uses different terminology
    host: url.hostname,
    securityOrigin: url.origin
  };
}
function findWorkerThreads(trace2) {
  const workerThreads = /* @__PURE__ */ new Map();
  const workerCreationEvents = ["ServiceWorker thread", "DedicatedWorker thread"];
  for (const event of trace2.traceEvents) {
    if (event.name !== "thread_name" || !event.args.name) {
      continue;
    }
    if (!workerCreationEvents.includes(event.args.name)) {
      continue;
    }
    const tids = workerThreads.get(event.pid);
    if (tids) {
      tids.push(event.tid);
    } else {
      workerThreads.set(event.pid, [event.tid]);
    }
  }
  return workerThreads;
}
function createLanternRequest(parsedTrace, workerThreads, request3) {
  if (request3.args.data.hasResponse && request3.args.data.connectionId === void 0) {
    throw new core_exports.LanternError("Trace is too old");
  }
  let url;
  try {
    url = new URL(request3.args.data.url);
  } catch {
    return;
  }
  const timing = request3.args.data.timing ? {
    // These two timings are not included in the trace.
    workerFetchStart: -1,
    workerRespondWithSettled: -1,
    receiveHeadersStart: -1,
    ...request3.args.data.timing
  } : void 0;
  const networkRequestTime = timing ? timing.requestTime * 1e3 : request3.args.data.syntheticData.downloadStart / 1e3;
  let fromWorker = false;
  const tids = workerThreads.get(request3.pid);
  if (tids?.includes(request3.tid)) {
    fromWorker = true;
  }
  if (parsedTrace.Workers.workerIdByThread.has(request3.tid)) {
    fromWorker = true;
  }
  const initiator = request3.args.data.initiator ?? {
    type: "other"
    /* Protocol.Network.InitiatorType.Other */
  };
  if (request3.args.data.stackTrace) {
    const callFrames = request3.args.data.stackTrace.map((f) => {
      return {
        scriptId: String(f.scriptId),
        url: f.url,
        lineNumber: f.lineNumber - 1,
        columnNumber: f.columnNumber - 1,
        functionName: f.functionName
      };
    });
    initiator.stack = { callFrames };
  }
  let resourceType = request3.args.data.resourceType;
  if (request3.args.data.initiator?.fetchType === "xmlhttprequest") {
    resourceType = "XHR";
  } else if (request3.args.data.initiator?.fetchType === "fetch") {
    resourceType = "Fetch";
  }
  let resourceSize = request3.args.data.decodedBodyLength ?? 0;
  if (url.protocol === "data:" && resourceSize === 0) {
    const commaIndex = url.pathname.indexOf(",");
    if (url.pathname.substring(0, commaIndex).includes(";base64")) {
      resourceSize = atob(url.pathname.substring(commaIndex + 1)).length;
    } else {
      resourceSize = url.pathname.length - commaIndex - 1;
    }
  }
  return {
    rawRequest: request3,
    requestId: request3.args.data.requestId,
    connectionId: request3.args.data.connectionId ?? 0,
    connectionReused: request3.args.data.connectionReused ?? false,
    url: request3.args.data.url,
    protocol: request3.args.data.protocol,
    parsedURL: createParsedUrl(url),
    documentURL: request3.args.data.requestingFrameUrl,
    rendererStartTime: request3.ts / 1e3,
    networkRequestTime,
    responseHeadersEndTime: request3.args.data.syntheticData.downloadStart / 1e3,
    networkEndTime: request3.args.data.syntheticData.finishTime / 1e3,
    transferSize: request3.args.data.encodedDataLength,
    resourceSize,
    fromDiskCache: request3.args.data.syntheticData.isDiskCached,
    fromMemoryCache: request3.args.data.syntheticData.isMemoryCached,
    isLinkPreload: request3.args.data.isLinkPreload,
    finished: request3.args.data.finished,
    failed: request3.args.data.failed,
    statusCode: request3.args.data.statusCode,
    initiator,
    timing,
    resourceType,
    mimeType: request3.args.data.mimeType,
    priority: request3.args.data.priority,
    frameId: request3.args.data.frame,
    fromWorker,
    serverResponseTime: request3.args.data.lrServerResponseTime ?? void 0,
    // Set later.
    redirects: void 0,
    redirectSource: void 0,
    redirectDestination: void 0,
    initiatorRequest: void 0
  };
}
function chooseInitiatorRequest(request3, requestsByURL) {
  if (request3.redirectSource) {
    return request3.redirectSource;
  }
  const initiatorURL = graph_exports.PageDependencyGraph.getNetworkInitiators(request3)[0];
  let candidates = requestsByURL.get(initiatorURL) || [];
  candidates = candidates.filter((c) => {
    return c.responseHeadersEndTime <= request3.rendererStartTime && c.finished && !c.failed;
  });
  if (candidates.length > 1) {
    const nonPrefetchCandidates = candidates.filter((cand) => cand.resourceType !== types_exports.NetworkRequestTypes.Other);
    if (nonPrefetchCandidates.length) {
      candidates = nonPrefetchCandidates;
    }
  }
  if (candidates.length > 1) {
    const sameFrameCandidates = candidates.filter((cand) => cand.frameId === request3.frameId);
    if (sameFrameCandidates.length) {
      candidates = sameFrameCandidates;
    }
  }
  if (candidates.length > 1 && request3.initiator.type === "parser") {
    const documentCandidates = candidates.filter((cand) => cand.resourceType === types_exports.NetworkRequestTypes.Document);
    if (documentCandidates.length) {
      candidates = documentCandidates;
    }
  }
  if (candidates.length > 1) {
    const linkPreloadCandidates = candidates.filter((c) => c.isLinkPreload);
    if (linkPreloadCandidates.length) {
      const nonPreloadCandidates = candidates.filter((c) => !c.isLinkPreload);
      const allPreloaded = nonPreloadCandidates.every((c) => c.fromDiskCache || c.fromMemoryCache);
      if (nonPreloadCandidates.length && allPreloaded) {
        candidates = linkPreloadCandidates;
      }
    }
  }
  return candidates.length === 1 ? candidates[0] : null;
}
function linkInitiators(lanternRequests) {
  const requestsByURL = /* @__PURE__ */ new Map();
  for (const request3 of lanternRequests) {
    const requests = requestsByURL.get(request3.url) || [];
    requests.push(request3);
    requestsByURL.set(request3.url, requests);
  }
  for (const request3 of lanternRequests) {
    const initiatorRequest = chooseInitiatorRequest(request3, requestsByURL);
    if (initiatorRequest) {
      request3.initiatorRequest = initiatorRequest;
    }
  }
}
function createNetworkRequests(trace2, data312, startTime = 0, endTime = Number.POSITIVE_INFINITY) {
  const workerThreads = findWorkerThreads(trace2);
  const lanternRequestsNoRedirects = [];
  for (const request3 of data312.NetworkRequests.byTime) {
    if (request3.ts >= startTime && request3.ts < endTime) {
      const lanternRequest = createLanternRequest(data312, workerThreads, request3);
      if (lanternRequest) {
        lanternRequestsNoRedirects.push(lanternRequest);
      }
    }
  }
  const lanternRequests = [];
  for (const request3 of [...lanternRequestsNoRedirects]) {
    if (!request3.rawRequest) {
      continue;
    }
    const redirects = request3.rawRequest.args.data.redirects;
    if (!redirects.length) {
      lanternRequests.push(request3);
      continue;
    }
    const requestChain = [];
    for (const redirect of redirects) {
      const redirectedRequest = structuredClone(request3);
      redirectedRequest.networkRequestTime = redirect.ts / 1e3;
      redirectedRequest.rendererStartTime = redirectedRequest.networkRequestTime;
      redirectedRequest.networkEndTime = (redirect.ts + redirect.dur) / 1e3;
      redirectedRequest.responseHeadersEndTime = redirectedRequest.networkEndTime;
      redirectedRequest.timing = {
        requestTime: redirectedRequest.networkRequestTime / 1e3,
        receiveHeadersStart: redirectedRequest.responseHeadersEndTime,
        receiveHeadersEnd: redirectedRequest.responseHeadersEndTime,
        proxyStart: -1,
        proxyEnd: -1,
        dnsStart: -1,
        dnsEnd: -1,
        connectStart: -1,
        connectEnd: -1,
        sslStart: -1,
        sslEnd: -1,
        sendStart: -1,
        sendEnd: -1,
        workerStart: -1,
        workerReady: -1,
        workerFetchStart: -1,
        workerRespondWithSettled: -1,
        pushStart: -1,
        pushEnd: -1
      };
      redirectedRequest.url = redirect.url;
      redirectedRequest.parsedURL = createParsedUrl(redirect.url);
      redirectedRequest.statusCode = 302;
      redirectedRequest.resourceType = void 0;
      redirectedRequest.transferSize = 400;
      requestChain.push(redirectedRequest);
      lanternRequests.push(redirectedRequest);
    }
    requestChain.push(request3);
    lanternRequests.push(request3);
    for (let i = 0; i < requestChain.length; i++) {
      const request22 = requestChain[i];
      if (i > 0) {
        request22.redirectSource = requestChain[i - 1];
        request22.redirects = requestChain.slice(0, i);
      }
      if (i !== requestChain.length - 1) {
        request22.redirectDestination = requestChain[i + 1];
      }
    }
    for (let i = 1; i < requestChain.length; i++) {
      requestChain[i].requestId = `${requestChain[i - 1].requestId}:redirect`;
    }
  }
  linkInitiators(lanternRequests);
  return lanternRequests;
}
function collectMainThreadEvents(trace2, data312) {
  const Meta = data312.Meta;
  const mainFramePids = Meta.mainFrameNavigations.length ? new Set(Meta.mainFrameNavigations.map((nav) => nav.pid)) : Meta.topLevelRendererIds;
  const rendererPidToTid = /* @__PURE__ */ new Map();
  for (const pid of mainFramePids) {
    const threads = Meta.threadsInProcess.get(pid) ?? [];
    let found = false;
    for (const [tid, thread] of threads) {
      if (thread.args.name === "CrRendererMain") {
        rendererPidToTid.set(pid, tid);
        found = true;
        break;
      }
    }
    if (found) {
      continue;
    }
    for (const [tid, thread] of threads) {
      if (thread.args.name === "CrBrowserMain") {
        rendererPidToTid.set(pid, tid);
        found = true;
        break;
      }
    }
  }
  return trace2.traceEvents.filter((e) => rendererPidToTid.get(e.pid) === e.tid);
}
function createGraph(requests, trace2, data312, url) {
  const mainThreadEvents = collectMainThreadEvents(trace2, data312);
  if (!url) {
    url = {
      requestedUrl: requests[0].url,
      mainDocumentUrl: ""
    };
    let request3 = requests[0];
    while (request3.redirectDestination) {
      request3 = request3.redirectDestination;
    }
    url.mainDocumentUrl = request3.url;
  }
  return graph_exports.PageDependencyGraph.createGraph(mainThreadEvents, requests, url);
}
function calculateProgress(value, phase) {
  if (phase === 0.8) {
    return value * (0.8 - 0.2) + 0.2;
  }
  return value * phase;
}
function sortHandlers(traceHandlers) {
  const sortedMap = /* @__PURE__ */ new Map();
  const visited = /* @__PURE__ */ new Set();
  const visitHandler = /* @__PURE__ */ __name((handlerName) => {
    if (sortedMap.has(handlerName)) {
      return;
    }
    if (visited.has(handlerName)) {
      let stackPath = "";
      for (const handler2 of visited) {
        if (stackPath || handler2 === handlerName) {
          stackPath += `${handler2}->`;
        }
      }
      stackPath += handlerName;
      throw new Error(`Found dependency cycle in trace event handlers: ${stackPath}`);
    }
    visited.add(handlerName);
    const handler = traceHandlers[handlerName];
    if (!handler) {
      return;
    }
    const deps172 = handler.deps?.();
    if (deps172) {
      deps172.forEach(visitHandler);
    }
    sortedMap.set(handlerName, handler);
  }, "visitHandler");
  for (const handlerName of Object.keys(traceHandlers)) {
    visitHandler(handlerName);
  }
  return sortedMap;
}
function makeComputedArtifact(computableArtifact, keys2) {
  const request3 = /* @__PURE__ */ __name((dependencies2, context2) => {
    const computedName = computableArtifact.name;
    for (const key of keys2 || []) {
      if (dependencies2 && typeof dependencies2 === "object" && dependencies2[key] === void 0) {
        const err = new Error(`missing required key "${String(key)}" for computed artifact ${computableArtifact.name}`);
        if (isUnderTest) {
          throw err;
        } else {
          lighthouse_logger_default.error(`lh:computed:${computedName}`, err);
        }
      }
    }
    const pickedDependencies = keys2 ? Object.fromEntries(keys2.map((key) => [key, dependencies2[key]])) : dependencies2;
    const computedCache = (
      /** @type {Map<string, ArbitraryEqualityMap>} */
      context2.computedCache
    );
    const cache = computedCache.get(computedName) || new ArbitraryEqualityMap();
    computedCache.set(computedName, cache);
    const computed = cache.get(pickedDependencies);
    if (computed) {
      return computed;
    }
    const status = { msg: `Computing artifact: ${computedName}`, id: `lh:computed:${computedName}` };
    lighthouse_logger_default.time(status, "verbose");
    const artifactPromise = (
      /** @type {ReturnType<C['compute_']>} */
      computableArtifact.compute_(pickedDependencies, context2)
    );
    cache.set(pickedDependencies, artifactPromise);
    artifactPromise.then(() => lighthouse_logger_default.timeEnd(status)).catch(() => lighthouse_logger_default.timeEnd(status));
    return artifactPromise;
  }, "request");
  return Object.assign(computableArtifact, { request: request3 });
}
function rewriteChromeInternalUrl(url) {
  if (!url || !url.startsWith("chrome://"))
    return url;
  if (url.endsWith("/"))
    url = url.replace(/\/$/, "");
  return url.replace(/^chrome:\/\/chrome\//, "chrome://");
}
function wrapRuntimeEvalErrorInBrowser(err) {
  if (!err || typeof err === "string") {
    err = new Error(err);
  }
  return {
    __failedInBrowser: true,
    name: err.name || "Error",
    message: err.message || "unknown error",
    stack: err.stack
  };
}
function getElementsInDocument2(selector) {
  const realMatchesFn = window.__ElementMatches || window.Element.prototype.matches;
  const results = [];
  const _findAllElements = /* @__PURE__ */ __name((nodes) => {
    for (const el of nodes) {
      if (!selector || realMatchesFn.call(el, selector)) {
        const matchedEl = el;
        results.push(matchedEl);
      }
      if (el.shadowRoot) {
        _findAllElements(el.shadowRoot.querySelectorAll("*"));
      }
    }
  }, "_findAllElements");
  _findAllElements(document.querySelectorAll("*"));
  return results;
}
function getOuterHTMLSnippet(element, ignoreAttrs = [], snippetCharacterLimit = 500) {
  const ATTRIBUTE_CHAR_LIMIT = 75;
  const autoFillIgnoreAttrs = ["autofill-information", "autofill-prediction", "title"];
  if (element instanceof ShadowRoot) {
    element = element.host;
  }
  try {
    const clone2 = element.cloneNode();
    const template = element.ownerDocument.createElement("template");
    template.content.append(clone2);
    ignoreAttrs.concat(autoFillIgnoreAttrs).forEach((attribute) => {
      clone2.removeAttribute(attribute);
    });
    let charCount = 0;
    for (const attributeName of clone2.getAttributeNames()) {
      if (charCount > snippetCharacterLimit) {
        clone2.removeAttribute(attributeName);
        continue;
      }
      let attributeValue = clone2.getAttribute(attributeName);
      if (attributeValue === null)
        continue;
      let dirty = false;
      if (attributeName === "src" && "currentSrc" in element) {
        const elementWithSrc = (
          /** @type {HTMLImageElement|HTMLMediaElement} */
          element
        );
        const currentSrc = elementWithSrc.currentSrc;
        const documentHref = elementWithSrc.ownerDocument.location.href;
        if (new URL(attributeValue, documentHref).toString() !== currentSrc) {
          attributeValue = currentSrc;
          dirty = true;
        }
      }
      const truncatedString = truncate(attributeValue, ATTRIBUTE_CHAR_LIMIT);
      if (truncatedString !== attributeValue)
        dirty = true;
      attributeValue = truncatedString;
      if (dirty) {
        if (attributeName === "style") {
          const elementWithStyle = (
            /** @type {HTMLElement} */
            clone2
          );
          elementWithStyle.style.cssText = attributeValue;
        } else {
          clone2.setAttribute(attributeName, attributeValue);
        }
      }
      charCount += attributeName.length + attributeValue.length;
    }
    const reOpeningTag = /^[\s\S]*?>/;
    const [match] = clone2.outerHTML.match(reOpeningTag) || [];
    if (match && charCount > snippetCharacterLimit) {
      return match.slice(0, match.length - 1) + " \u2026>";
    }
    return match || "";
  } catch (_) {
    return `<${element.localName}>`;
  }
}
function computeBenchmarkIndex() {
  function benchmarkIndexGC() {
    const start = Date.now();
    let iterations = 0;
    while (Date.now() - start < 500) {
      let s = "";
      for (let j = 0; j < 1e4; j++)
        s += "a";
      if (s.length === 1)
        throw new Error("will never happen, but prevents compiler optimizations");
      iterations++;
    }
    const durationInSeconds = (Date.now() - start) / 1e3;
    return Math.round(iterations / 10 / durationInSeconds);
  }
  __name(benchmarkIndexGC, "benchmarkIndexGC");
  function benchmarkIndexNoGC() {
    const arrA = [];
    const arrB = [];
    for (let i = 0; i < 1e5; i++)
      arrA[i] = arrB[i] = i;
    const start = Date.now();
    let iterations = 0;
    while (iterations % 10 !== 0 || Date.now() - start < 500) {
      const src2 = iterations % 2 === 0 ? arrA : arrB;
      const tgt = iterations % 2 === 0 ? arrB : arrA;
      for (let j = 0; j < src2.length; j++)
        tgt[j] = src2[j];
      iterations++;
    }
    const durationInSeconds = (Date.now() - start) / 1e3;
    return Math.round(iterations / 10 / durationInSeconds);
  }
  __name(benchmarkIndexNoGC, "benchmarkIndexNoGC");
  return (benchmarkIndexGC() + benchmarkIndexNoGC()) / 2;
}
function getNodePath(node2) {
  const isShadowRoot = /* @__PURE__ */ __name((node22) => node22.nodeType === Node.DOCUMENT_FRAGMENT_NODE, "isShadowRoot");
  const getNodeParent = /* @__PURE__ */ __name((node22) => isShadowRoot(node22) ? node22.host : node22.parentNode, "getNodeParent");
  function getNodeIndex(node22) {
    if (isShadowRoot(node22)) {
      return "a";
    }
    let index2 = 0;
    let prevNode;
    while (prevNode = node22.previousSibling) {
      node22 = prevNode;
      if (node22.nodeType === Node.TEXT_NODE && (node22.nodeValue || "").trim().length === 0)
        continue;
      index2++;
    }
    return index2;
  }
  __name(getNodeIndex, "getNodeIndex");
  let currentNode = node2;
  const path72 = [];
  while (currentNode && getNodeParent(currentNode)) {
    const index2 = getNodeIndex(currentNode);
    path72.push([index2, currentNode.nodeName]);
    currentNode = getNodeParent(currentNode);
  }
  path72.reverse();
  return path72.join(",");
}
function getNodeSelector(element) {
  function getSelectorPart(element2) {
    let part = element2.tagName.toLowerCase();
    if (element2.id) {
      part += "#" + element2.id;
    } else if (element2.classList.length > 0) {
      part += "." + element2.classList[0];
    }
    return part;
  }
  __name(getSelectorPart, "getSelectorPart");
  const parts = [];
  while (parts.length < 4) {
    parts.unshift(getSelectorPart(element));
    if (!element.parentElement) {
      break;
    }
    element = element.parentElement;
    if (element.tagName === "HTML") {
      break;
    }
  }
  return parts.join(" > ");
}
function isPositionFixed(element) {
  function getStyleAttrValue(element2, attr) {
    return element2.style[attr] || window.getComputedStyle(element2)[attr];
  }
  __name(getStyleAttrValue, "getStyleAttrValue");
  const htmlEl = document.querySelector("html");
  if (!htmlEl)
    throw new Error("html element not found in document");
  if (htmlEl.scrollHeight <= htmlEl.clientHeight || !["scroll", "auto", "visible"].includes(getStyleAttrValue(htmlEl, "overflowY"))) {
    return false;
  }
  let currentEl = element;
  while (currentEl) {
    const position = getStyleAttrValue(currentEl, "position");
    if (position === "fixed" || position === "sticky") {
      return true;
    }
    currentEl = currentEl.parentElement;
  }
  return false;
}
function getNodeLabel(element) {
  const tagName = element.tagName.toLowerCase();
  if (tagName !== "html" && tagName !== "body") {
    const nodeLabel = element instanceof HTMLElement && element.innerText || element.getAttribute("alt") || element.getAttribute("aria-label");
    if (nodeLabel) {
      return truncate(nodeLabel, 80);
    } else {
      const nodeToUseForLabel = element.querySelector("[alt], [aria-label]");
      if (nodeToUseForLabel) {
        return getNodeLabel(nodeToUseForLabel);
      }
    }
  }
  return null;
}
function getBoundingClientRect(element) {
  const realBoundingClientRect = window.__HTMLElementBoundingClientRect || window.HTMLElement.prototype.getBoundingClientRect;
  const rect = realBoundingClientRect.call(element);
  return {
    top: Math.round(rect.top),
    bottom: Math.round(rect.bottom),
    left: Math.round(rect.left),
    right: Math.round(rect.right),
    width: Math.round(rect.width),
    height: Math.round(rect.height)
  };
}
function wrapRequestIdleCallback(cpuSlowdownMultiplier) {
  const safetyAllowanceMs = 10;
  const maxExecutionTimeMs = Math.floor((50 - safetyAllowanceMs) / cpuSlowdownMultiplier);
  const nativeRequestIdleCallback = window.requestIdleCallback;
  window.requestIdleCallback = (cb, options2) => {
    const cbWrap = /* @__PURE__ */ __name((deadline) => {
      const start = Date.now();
      deadline.__timeRemaining = deadline.timeRemaining;
      deadline.timeRemaining = () => {
        const timeRemaining = deadline.__timeRemaining();
        return Math.min(timeRemaining, Math.max(0, maxExecutionTimeMs - (Date.now() - start)));
      };
      deadline.timeRemaining.toString = () => {
        return "function timeRemaining() { [native code] }";
      };
      cb(deadline);
    }, "cbWrap");
    return nativeRequestIdleCallback(cbWrap, options2);
  };
  window.requestIdleCallback.toString = () => {
    return "function requestIdleCallback() { [native code] }";
  };
}
function getNodeDetails2(element) {
  if (!window.__lighthouseNodesDontTouchOrAllVarianceGoesAway) {
    window.__lighthouseNodesDontTouchOrAllVarianceGoesAway = /* @__PURE__ */ new Map();
  }
  element = element instanceof ShadowRoot ? element.host : element;
  const selector = getNodeSelector(element);
  let lhId = window.__lighthouseNodesDontTouchOrAllVarianceGoesAway.get(element);
  if (!lhId) {
    lhId = [
      window.__lighthouseExecutionContextUniqueIdentifier === void 0 ? "page" : window.__lighthouseExecutionContextUniqueIdentifier,
      window.__lighthouseNodesDontTouchOrAllVarianceGoesAway.size,
      element.tagName
    ].join("-");
    window.__lighthouseNodesDontTouchOrAllVarianceGoesAway.set(element, lhId);
  }
  const details = {
    lhId,
    devtoolsNodePath: getNodePath(element),
    selector,
    boundingRect: getBoundingClientRect(element),
    snippet: getOuterHTMLSnippet(element),
    nodeLabel: getNodeLabel(element) || selector
  };
  return details;
}
function truncate(string2, characterLimit) {
  return Util.truncate(string2, characterLimit);
}
function isBundledEnvironment() {
  if (global.isDevtools || global.isLightrider)
    return true;
  const require5 = createRequire({ url: "core/lib/page-functions.js" }.url);
  try {
    require5.resolve("lighthouse-logger");
    return false;
  } catch (err) {
    return true;
  }
}
function createEsbuildFunctionWrapper() {
  if (!isBundledEnvironment()) {
    return "";
  }
  const functionAsString = (() => {
    const a = /* @__PURE__ */ __name(() => {
    }, "a");
  }).toString().replace("/* @__PURE__ */", "");
  const functionStringMatch = functionAsString.match(/=\s*([\w_]+)\(/);
  if (!functionStringMatch) {
    throw new Error("Could not determine esbuild function wrapper name");
  }
  const esbuildFunctionWrapper = /* @__PURE__ */ __name((fn, value) => Object.defineProperty(fn, "name", { value, configurable: true }), "esbuildFunctionWrapper");
  const wrapperFnName = functionStringMatch[1];
  return `let ${wrapperFnName}=${esbuildFunctionWrapper}`;
}
function getRuntimeFunctionName(fn) {
  const match = fn.toString().match(/function ([\w$]+)/);
  if (!match)
    throw new Error(`could not find function name for: ${fn}`);
  return match[1];
}
async function runA11yChecks() {
  const axe = window.axe;
  const application = `lighthouse-${Math.random()}`;
  axe.configure({
    branding: {
      application
    },
    noHtml: true
  });
  const axeResults = await axe.run(document, {
    elementRef: true,
    runOnly: {
      type: "tag",
      values: [
        "wcag2a",
        "wcag2aa"
      ]
    },
    // resultTypes doesn't limit the output of the axeResults object. Instead, if it's defined,
    // some expensive element identification is done only for the respective types. https://github.com/dequelabs/axe-core/blob/f62f0cf18f7b69b247b0b6362cf1ae71ffbf3a1b/lib/core/reporters/helpers/process-aggregate.js#L61-L97
    resultTypes: ["violations", "inapplicable"],
    rules: {
      // Consider http://go/prcpg for expert review of the aXe rules.
      "accesskeys": { enabled: true },
      "area-alt": { enabled: false },
      "aria-allowed-role": { enabled: true },
      "aria-braille-equivalent": { enabled: false },
      "aria-conditional-attr": { enabled: true },
      "aria-deprecated-role": { enabled: true },
      "aria-dialog-name": { enabled: true },
      "aria-prohibited-attr": { enabled: true },
      "aria-roledescription": { enabled: false },
      "aria-treeitem-name": { enabled: true },
      "aria-text": { enabled: true },
      "audio-caption": { enabled: false },
      "blink": { enabled: false },
      "duplicate-id": { enabled: false },
      "empty-heading": { enabled: true },
      "frame-focusable-content": { enabled: false },
      "frame-title-unique": { enabled: false },
      "heading-order": { enabled: true },
      "html-xml-lang-mismatch": { enabled: true },
      "identical-links-same-purpose": { enabled: true },
      "image-redundant-alt": { enabled: true },
      "input-button-name": { enabled: true },
      "label-content-name-mismatch": { enabled: true },
      "landmark-one-main": { enabled: true },
      "link-in-text-block": { enabled: true },
      "marquee": { enabled: false },
      "meta-viewport": { enabled: true },
      // https://github.com/dequelabs/axe-core/issues/2958
      "nested-interactive": { enabled: false },
      "no-autoplay-audio": { enabled: false },
      "role-img-alt": { enabled: false },
      "scrollable-region-focusable": { enabled: false },
      "select-name": { enabled: true },
      "server-side-image-map": { enabled: false },
      "skip-link": { enabled: true },
      // https://github.com/GoogleChrome/lighthouse/issues/16163
      "summary-name": { enabled: false },
      "svg-img-alt": { enabled: false },
      "tabindex": { enabled: true },
      "table-duplicate-name": { enabled: true },
      "table-fake-caption": { enabled: true },
      "target-size": { enabled: true },
      "td-has-header": { enabled: true }
    }
  });
  document.documentElement.scrollTop = 0;
  return {
    violations: axeResults.violations.map(createAxeRuleResultArtifact),
    incomplete: axeResults.incomplete.map(createAxeRuleResultArtifact),
    notApplicable: axeResults.inapplicable.map((result) => ({ id: result.id })),
    // FYI: inapplicable => notApplicable!
    passes: axeResults.passes.map((result) => ({ id: result.id })),
    version: axeResults.testEngine.version
  };
}
async function runA11yChecksAndResetScroll() {
  const originalScrollPosition = {
    x: window.scrollX,
    y: window.scrollY
  };
  try {
    return await runA11yChecks();
  } finally {
    window.scrollTo(originalScrollPosition.x, originalScrollPosition.y);
  }
}
function createAxeRuleResultArtifact(result) {
  const nodes = result.nodes.map((node2) => {
    const { target, failureSummary, element } = node2;
    const nodeDetails = getNodeDetails(
      /** @type {HTMLElement} */
      element
    );
    const relatedNodeElements = /* @__PURE__ */ new Set();
    const impactToNumber = /* @__PURE__ */ __name((impact) => [null, "minor", "moderate", "serious", "critical"].indexOf(impact), "impactToNumber");
    const checkResults = [...node2.any, ...node2.all, ...node2.none].sort((a, b) => impactToNumber(b.impact) - impactToNumber(a.impact));
    for (const checkResult of checkResults) {
      for (const relatedNode of checkResult.relatedNodes || []) {
        const relatedElement = relatedNode.element;
        if (relatedNodeElements.size >= 3)
          break;
        if (!relatedElement)
          continue;
        if (element === relatedElement)
          continue;
        relatedNodeElements.add(relatedElement);
      }
    }
    const relatedNodeDetails = [...relatedNodeElements].map(getNodeDetails);
    return {
      target,
      failureSummary,
      node: nodeDetails,
      relatedNodes: relatedNodeDetails
    };
  });
  const resultError = result.error;
  let error;
  if (resultError instanceof Error) {
    error = {
      name: resultError.name,
      message: resultError.message
    };
  }
  return {
    id: result.id,
    impact: result.impact || void 0,
    tags: result.tags,
    nodes,
    error
  };
}
function handlePotentialMissingNodeError(err) {
  if (/No node.*found/.test(err.message) || /Node.*does not belong to the document/.test(err.message)) {
    return void 0;
  }
  throw err;
}
async function resolveDevtoolsNodePathToObjectId(session, path72) {
  try {
    const { nodeId } = await session.sendCommand("DOM.pushNodeByPathToFrontend", { path: path72 });
    const { object: { objectId } } = await session.sendCommand("DOM.resolveNode", { nodeId });
    return objectId;
  } catch (err) {
    return handlePotentialMissingNodeError(err);
  }
}
function collectAnchorElements() {
  const resolveURLOrEmpty = /* @__PURE__ */ __name((url) => {
    try {
      return new URL(url, window.location.href).href;
    } catch (_) {
      return "";
    }
  }, "resolveURLOrEmpty");
  function getTruncatedOnclick(node2) {
    const onclick = node2.getAttribute("onclick") || "";
    return onclick.slice(0, 1024);
  }
  __name(getTruncatedOnclick, "getTruncatedOnclick");
  function getLangOfInnerText(node2) {
    let curNodeLang = null;
    for (const child of node2.querySelectorAll("*")) {
      if (!child.textContent)
        continue;
      const childLang = child.closest("[lang]")?.getAttribute("lang");
      if (!childLang)
        continue;
      if (!curNodeLang) {
        curNodeLang = childLang;
        continue;
      }
      if (curNodeLang.split("-")[0] !== childLang.split("-")[0]) {
        return null;
      }
    }
    return curNodeLang ?? node2.closest("[lang]")?.getAttribute("lang") ?? null;
  }
  __name(getLangOfInnerText, "getLangOfInnerText");
  const anchorElements = getElementsInDocument("a");
  const langElements = getElementsInDocument("[lang]");
  const documentHasSingleLang = langElements.length === 1 && (langElements[0].nodeName === "BODY" || langElements[0].nodeName === "HTML");
  const singleLang = documentHasSingleLang ? langElements[0].getAttribute("lang") : null;
  return anchorElements.map((node2) => {
    if (node2 instanceof HTMLAnchorElement) {
      return {
        href: node2.href,
        rawHref: node2.getAttribute("href") || "",
        onclick: getTruncatedOnclick(node2),
        role: node2.getAttribute("role") || "",
        name: node2.name,
        text: node2.innerText,
        // we don't want to return hidden text, so use innerText
        textLang: singleLang ?? getLangOfInnerText(node2) ?? void 0,
        rel: node2.rel,
        target: node2.target,
        id: node2.getAttribute("id") || "",
        attributeNames: node2.getAttributeNames(),
        // @ts-expect-error - getNodeDetails put into scope via stringification
        node: getNodeDetails(node2)
      };
    }
    return {
      href: resolveURLOrEmpty(node2.href.baseVal),
      rawHref: node2.getAttribute("href") || "",
      onclick: getTruncatedOnclick(node2),
      role: node2.getAttribute("role") || "",
      text: node2.textContent || "",
      textLang: singleLang ?? getLangOfInnerText(node2) ?? void 0,
      rel: "",
      target: node2.target.baseVal || "",
      id: node2.getAttribute("id") || "",
      attributeNames: node2.getAttributeNames(),
      // @ts-expect-error - getNodeDetails put into scope via stringification
      node: getNodeDetails(node2)
    };
  });
}
async function getEventListeners(session, devtoolsNodePath) {
  const objectId = await resolveDevtoolsNodePathToObjectId(session, devtoolsNodePath);
  if (!objectId)
    return [];
  const response = await session.sendCommand("DOMDebugger.getEventListeners", {
    objectId
  });
  return response.listeners.map(({ type: type2 }) => ({ type: type2 }));
}
function remoteObjectToString(obj) {
  if (typeof obj.value !== "undefined" || obj.type === "undefined") {
    return String(obj.value);
  }
  if (typeof obj.description === "string" && obj.description !== obj.className) {
    return obj.description;
  }
  const type2 = obj.subtype || obj.type;
  const className = obj.className || "Object";
  return `[${type2} ${className}]`;
}
function getDoctype() {
  if (!document.doctype) {
    return null;
  }
  const documentCompatMode = document.compatMode;
  const { name, publicId, systemId } = document.doctype;
  return { name, publicId, systemId, documentCompatMode };
}
function getClientRect(element) {
  const clientRect = element.getBoundingClientRect();
  return {
    // Just grab the DOMRect properties we want, excluding x/y/width/height
    top: clientRect.top,
    bottom: clientRect.bottom,
    left: clientRect.left,
    right: clientRect.right
  };
}
function getPosition(element, computedStyle) {
  if (element.parentElement && element.parentElement.tagName === "PICTURE") {
    const parentStyle = window.getComputedStyle(element.parentElement);
    return parentStyle.getPropertyValue("position");
  }
  return computedStyle.getPropertyValue("position");
}
function getHTMLImages(allElements) {
  const allImageElements = (
    /** @type {Array<HTMLImageElement>} */
    allElements.filter((element) => {
      return element.localName === "img";
    })
  );
  return allImageElements.map((element) => {
    const computedStyle = window.getComputedStyle(element);
    const isPicture = !!element.parentElement && element.parentElement.tagName === "PICTURE";
    const canTrustNaturalDimensions = !isPicture && !element.srcset;
    return {
      // currentSrc used over src to get the url as determined by the browser
      // after taking into account srcset/media/sizes/etc.
      src: element.currentSrc,
      srcset: element.srcset,
      displayedWidth: element.width,
      displayedHeight: element.height,
      clientRect: getClientRect(element),
      attributeWidth: element.getAttribute("width"),
      attributeHeight: element.getAttribute("height"),
      naturalDimensions: canTrustNaturalDimensions ? { width: element.naturalWidth, height: element.naturalHeight } : void 0,
      cssRules: void 0,
      // this will get overwritten below
      computedStyles: {
        position: getPosition(element, computedStyle),
        objectFit: computedStyle.getPropertyValue("object-fit"),
        imageRendering: computedStyle.getPropertyValue("image-rendering")
      },
      isCss: false,
      isPicture,
      loading: element.loading,
      isInShadowDOM: element.getRootNode() instanceof ShadowRoot,
      fetchPriority: element.fetchPriority,
      // @ts-expect-error - getNodeDetails put into scope via stringification
      node: getNodeDetails(element)
    };
  });
}
function getCSSImages(allElements) {
  const CSS_URL_REGEX = /^url\("([^"]+)"\)$/;
  const images = [];
  for (const element of allElements) {
    const style = window.getComputedStyle(element);
    if (!style.backgroundImage || !CSS_URL_REGEX.test(style.backgroundImage))
      continue;
    const imageMatch = style.backgroundImage.match(CSS_URL_REGEX);
    const url = imageMatch[1];
    images.push({
      src: url,
      srcset: "",
      displayedWidth: element.clientWidth,
      displayedHeight: element.clientHeight,
      clientRect: getClientRect(element),
      attributeWidth: null,
      attributeHeight: null,
      naturalDimensions: void 0,
      cssEffectiveRules: void 0,
      computedStyles: {
        position: getPosition(element, style),
        objectFit: "",
        imageRendering: style.getPropertyValue("image-rendering")
      },
      isCss: true,
      isPicture: false,
      isInShadowDOM: element.getRootNode() instanceof ShadowRoot,
      // @ts-expect-error - getNodeDetails put into scope via stringification
      node: getNodeDetails(element)
    });
  }
  return images;
}
function collectImageElementInfo() {
  const allElements = getElementsInDocument();
  return getHTMLImages(allElements).concat(getCSSImages(allElements));
}
function determineNaturalSize(url) {
  return new Promise((resolve2, reject) => {
    const img = new Image();
    img.addEventListener("error", (_) => reject(new Error("determineNaturalSize failed img load")));
    img.addEventListener("load", () => {
      resolve2({
        naturalWidth: img.naturalWidth,
        naturalHeight: img.naturalHeight
      });
    });
    img.src = url;
  });
}
function findSizeDeclaration(rule, property) {
  if (!rule || !rule.cssProperties)
    return;
  const definedProp = rule.cssProperties.find(({ name }) => name === property);
  if (!definedProp)
    return;
  return definedProp.value;
}
function findMostSpecificMatchedCSSRule(matchedCSSRules = [], isDeclarationOfInterest) {
  let mostSpecificRule;
  for (let i = matchedCSSRules.length - 1; i >= 0; i--) {
    if (isDeclarationOfInterest(matchedCSSRules[i].rule.style)) {
      mostSpecificRule = matchedCSSRules[i].rule;
      break;
    }
  }
  if (mostSpecificRule) {
    return {
      type: "Regular",
      ...mostSpecificRule.style,
      parentRule: {
        origin: mostSpecificRule.origin,
        selectors: mostSpecificRule.selectorList.selectors
      }
    };
  }
}
function findMostSpecificCSSRule(matchedCSSRules, property) {
  const isDeclarationofInterest = /* @__PURE__ */ __name((declaration2) => findSizeDeclaration(declaration2, property), "isDeclarationofInterest");
  const rule = findMostSpecificMatchedCSSRule(matchedCSSRules, isDeclarationofInterest);
  if (!rule)
    return;
  return findSizeDeclaration(rule, property);
}
function getEffectiveSizingRule({ attributesStyle, inlineStyle, matchedCSSRules }, property) {
  const inlineRule = findSizeDeclaration(inlineStyle, property);
  if (inlineRule)
    return inlineRule;
  const attributeRule = findSizeDeclaration(attributesStyle, property);
  if (attributeRule)
    return attributeRule;
  const matchedRule = findMostSpecificCSSRule(matchedCSSRules, property);
  if (matchedRule)
    return matchedRule;
  return null;
}
function getPixelArea(element) {
  if (element.naturalDimensions) {
    return element.naturalDimensions.height * element.naturalDimensions.width;
  }
  return element.displayedHeight * element.displayedWidth;
}
function collectElements() {
  const inputArtifacts = [];
  const formElToArtifact = /* @__PURE__ */ new Map();
  const labelElToArtifact = /* @__PURE__ */ new Map();
  const formEls = getElementsInDocument("form");
  for (const formEl of formEls) {
    formElToArtifact.set(formEl, {
      id: formEl.id,
      name: formEl.name,
      autocomplete: formEl.autocomplete,
      // @ts-expect-error - getNodeDetails put into scope via stringification
      node: getNodeDetails(formEl)
    });
  }
  const labelEls = getElementsInDocument("label");
  for (const labelEl of labelEls) {
    labelElToArtifact.set(labelEl, {
      for: labelEl.htmlFor,
      // @ts-expect-error - getNodeDetails put into scope via stringification
      node: getNodeDetails(labelEl)
    });
  }
  const inputEls = getElementsInDocument("textarea, input, select");
  for (const inputEl of inputEls) {
    const parentFormEl = inputEl.form;
    const parentFormIndex = parentFormEl ? [...formElToArtifact.keys()].indexOf(parentFormEl) : void 0;
    const labelIndices = [...inputEl.labels || []].map((labelEl) => {
      return [...labelElToArtifact.keys()].indexOf(labelEl);
    });
    let preventsPaste;
    if (!inputEl.readOnly) {
      preventsPaste = !inputEl.dispatchEvent(new ClipboardEvent("paste", { cancelable: true }));
    }
    inputArtifacts.push({
      parentFormIndex,
      labelIndices,
      id: inputEl.id,
      name: inputEl.name,
      type: inputEl.type,
      placeholder: inputEl instanceof HTMLSelectElement ? void 0 : inputEl.placeholder,
      autocomplete: {
        property: inputEl.autocomplete,
        attribute: inputEl.getAttribute("autocomplete"),
        // Requires `--enable-features=AutofillShowTypePredictions`.
        prediction: inputEl.getAttribute("autofill-prediction")
      },
      preventsPaste,
      // @ts-expect-error - getNodeDetails put into scope via stringification
      node: getNodeDetails(inputEl)
    });
  }
  return {
    inputs: inputArtifacts,
    forms: [...formElToArtifact.values()],
    labels: [...labelElToArtifact.values()]
  };
}
function normalizeUrlOrNull(url, finalDisplayedUrl) {
  try {
    return new URL(url, finalDisplayedUrl).href;
  } catch (_) {
    return null;
  }
}
function getCrossoriginFromHeader(value) {
  if (value === "anonymous")
    return "anonymous";
  if (value === "use-credentials")
    return "use-credentials";
  return null;
}
function getLinkElementsInDOM() {
  const browserElements = getElementsInDocument("link");
  const linkElements = [];
  for (const link2 of browserElements) {
    if (!(link2 instanceof HTMLLinkElement))
      continue;
    const hrefRaw = link2.getAttribute("href") || "";
    const source2 = link2.closest("head") ? "head" : "body";
    linkElements.push({
      rel: link2.rel,
      href: link2.href,
      hreflang: link2.hreflang,
      as: link2.as,
      crossOrigin: link2.crossOrigin,
      hrefRaw,
      source: source2,
      fetchPriority: link2.fetchPriority,
      // @ts-expect-error - put into scope via stringification
      node: getNodeDetails(link2)
    });
  }
  return linkElements;
}
async function fetchResponseBodyFromCache(session, requestId, timeout2 = 1e3) {
  requestId = NetworkRequest.getRequestIdForBackend(requestId);
  session.setNextProtocolTimeout(timeout2);
  const result = await session.sendCommand("Network.getResponseBody", { requestId });
  return result.body;
}
function collectMetaElements() {
  const functions = (
    /** @type {typeof pageFunctions} */
    {
      // @ts-expect-error - getElementsInDocument put into scope via stringification
      getElementsInDocument,
      // @ts-expect-error - getNodeDetails put into scope via stringification
      getNodeDetails
    }
  );
  const metas = functions.getElementsInDocument("head meta");
  return metas.map((meta) => {
    const getAttribute = /* @__PURE__ */ __name((name) => {
      const attr = meta.attributes.getNamedItem(name);
      if (!attr)
        return;
      return attr.value;
    }, "getAttribute");
    return {
      name: meta.name.toLowerCase(),
      content: meta.content,
      property: getAttribute("property"),
      httpEquiv: meta.httpEquiv ? meta.httpEquiv.toLowerCase() : void 0,
      charset: getAttribute("charset"),
      node: functions.getNodeDetails(meta)
    };
  });
}
async function runInSeriesOrParallel(values, promiseMapper, runInSeries) {
  if (runInSeries) {
    const results = [];
    for (const value of values) {
      const result = await promiseMapper(value);
      results.push(result);
    }
    return results;
  } else {
    const promises2 = values.map(promiseMapper);
    return await Promise.all(promises2);
  }
}
function isLighthouseRuntimeEvaluateScript(script) {
  if (!script.embedderName)
    return true;
  return script.hasSourceURL && script.url === "_lighthouse-eval.js";
}
async function detectLibraries() {
  const libraries = [];
  const libraryDetectorTests = d41d8cd98f00b204e9800998ecf8427e_LibraryDetectorTests;
  for (const [name, lib] of Object.entries(libraryDetectorTests)) {
    try {
      let timeout2;
      const timeoutPromise = new Promise((r) => timeout2 = setTimeout(() => r(false), 1e3));
      const result = await Promise.race([lib.test(window), timeoutPromise]);
      if (timeout2)
        clearTimeout(timeout2);
      if (result) {
        libraries.push({
          id: lib.id,
          name,
          version: result.version,
          npm: lib.npm
        });
      }
    } catch (e) {
    }
  }
  return libraries;
}
function getViewportDimensions() {
  return {
    innerWidth: window.innerWidth,
    innerHeight: window.innerHeight,
    outerWidth: window.outerWidth,
    outerHeight: window.outerHeight,
    devicePixelRatio: window.devicePixelRatio
  };
}
function getTranslatedDescription(finding) {
  let result = FINDING_TO_UI_STRING[finding.type];
  if (!result) {
    lighthouse_logger_default.warn("CSP Evaluator", `No translation found for description: ${finding.description}`);
    return finding.description;
  }
  if (isIcuMessage(result))
    return result;
  if (typeof result === "string")
    return str_69(result, { keyword: finding.value || "" });
  result = result[finding.directive];
  if (!result) {
    lighthouse_logger_default.warn("CSP Evaluator", `No translation found for description: ${finding.description}`);
    return finding.description;
  }
  return result;
}
function parseCsp(rawCsp) {
  return new import_parser.CspParser(rawCsp).csp;
}
function evaluateRawCspsForXss(rawCsps) {
  const parsedCsps = rawCsps.map(parseCsp);
  const bypasses = (0, import_lighthouse_checks.evaluateForFailure)(parsedCsps);
  const warnings = (0, import_lighthouse_checks.evaluateForWarnings)(parsedCsps);
  const syntax = (0, import_lighthouse_checks.evaluateForSyntaxErrors)(parsedCsps);
  return { bypasses, warnings, syntax };
}
function computeGeneratedFileSizes2(map2, contentLength, content) {
  const lines = content.split("\n");
  const files = {};
  const totalBytes = contentLength;
  let unmappedBytes = totalBytes;
  map2.computeLastGeneratedColumns();
  for (const mapping of map2.mappings()) {
    const source2 = mapping.sourceURL;
    const lineNum = mapping.lineNumber;
    const colNum = mapping.columnNumber;
    const lastColNum = mapping.lastColumnNumber;
    if (!source2)
      continue;
    const line = lines[lineNum];
    if (line === null || line === void 0) {
      const errorMessage = `${map2.url()} mapping for line out of bounds: ${lineNum + 1}`;
      lighthouse_logger_default.error("JSBundles", errorMessage);
      return { errorMessage };
    }
    if (colNum > line.length) {
      const errorMessage = `${map2.url()} mapping for column out of bounds: ${lineNum + 1}:${colNum}`;
      lighthouse_logger_default.error("JSBundles", errorMessage);
      return { errorMessage };
    }
    let mappingLength = 0;
    if (lastColNum !== void 0) {
      if (lastColNum > line.length) {
        const errorMessage = `${map2.url()} mapping for last column out of bounds: ${lineNum + 1}:${lastColNum}`;
        lighthouse_logger_default.error("JSBundles", errorMessage);
        return { errorMessage };
      }
      mappingLength = lastColNum - colNum;
    } else {
      mappingLength = line.length - colNum + 1;
    }
    files[source2] = (files[source2] || 0) + mappingLength;
    unmappedBytes -= mappingLength;
  }
  return {
    files,
    unmappedBytes,
    totalBytes
  };
}
function getIssueDetailDescription(issueDetails) {
  let message;
  const type2 = (
    /** @type {keyof DEPRECATIONS_METADATA} */
    issueDetails.type
  );
  const maybeEnglishMessage = UIStrings90[type2];
  if (maybeEnglishMessage) {
    message = deprecationsStr_(maybeEnglishMessage);
  }
  const links = [];
  const deprecationMeta = DEPRECATIONS_METADATA[type2];
  const feature = deprecationMeta?.chromeStatusFeature ?? 0;
  if (feature !== 0) {
    links.push({
      link: `https://chromestatus.com/feature/${feature}`,
      linkTitle: str_71(UIStrings91.feature)
    });
  }
  const milestone = deprecationMeta?.milestone ?? 0;
  if (milestone !== 0) {
    links.push({
      link: "https://chromiumdash.appspot.com/schedule",
      linkTitle: str_71(UIStrings91.milestone, { milestone })
    });
  }
  return {
    substitutions: /* @__PURE__ */ new Map([
      ["PLACEHOLDER_title", str_71(UIStrings91.title)],
      ["PLACEHOLDER_message", message]
    ]),
    links,
    message
  };
}
function isVisible(imageRect, viewportDimensions) {
  return (imageRect.bottom - imageRect.top) * (imageRect.right - imageRect.left) > 0 && imageRect.top <= viewportDimensions.innerHeight && imageRect.bottom >= 0 && imageRect.left <= viewportDimensions.innerWidth && imageRect.right >= 0;
}
function isSmallerThanViewport(imageRect, viewportDimensions) {
  return imageRect.bottom - imageRect.top <= viewportDimensions.innerHeight && imageRect.right - imageRect.left <= viewportDimensions.innerWidth;
}
function isCandidate(image, imageRecord) {
  const artisticImageRenderingValues = ["pixelated", "crisp-edges"];
  const densityDescriptorRegex = / \d+(\.\d+)?x/;
  if (image.displayedWidth <= 1 || image.displayedHeight <= 1) {
    return false;
  }
  if (!image.naturalDimensions || !image.naturalDimensions.width || !image.naturalDimensions.height) {
    return false;
  }
  if (imageRecord?.mimeType === "image/svg+xml") {
    return false;
  }
  if (url_utils_default.guessMimeType(image.src) === "image/svg+xml") {
    return false;
  }
  if (image.isCss) {
    return false;
  }
  if (image.computedStyles.objectFit !== "fill") {
    return false;
  }
  if (artisticImageRenderingValues.includes(image.computedStyles.imageRendering)) {
    return false;
  }
  if (densityDescriptorRegex.test(image.srcset)) {
    return false;
  }
  return true;
}
function imageHasNaturalDimensions(image) {
  return !!image.naturalDimensions;
}
function imageHasRightSize(image, DPR) {
  const [expectedWidth, expectedHeight] = allowedImageSize(image.displayedWidth, image.displayedHeight, DPR);
  return image.naturalDimensions.width >= expectedWidth && image.naturalDimensions.height >= expectedHeight;
}
function getResult(image, DPR) {
  const [expectedWidth, expectedHeight] = expectedImageSize(image.displayedWidth, image.displayedHeight, DPR);
  return {
    url: url_utils_default.elideDataURI(image.src),
    node: Audit.makeNodeItem(image.node),
    displayedSize: `${image.displayedWidth} x ${image.displayedHeight}`,
    actualSize: `${image.naturalDimensions.width} x ${image.naturalDimensions.height}`,
    actualPixels: image.naturalDimensions.width * image.naturalDimensions.height,
    expectedSize: `${expectedWidth} x ${expectedHeight}`,
    expectedPixels: expectedWidth * expectedHeight
  };
}
function allowedImageSize(displayedWidth, displayedHeight, DPR) {
  let factor = SMALL_IMAGE_FACTOR;
  if (displayedWidth > SMALL_IMAGE_THRESHOLD || displayedHeight > SMALL_IMAGE_THRESHOLD) {
    factor = LARGE_IMAGE_FACTOR;
  }
  const requiredDpr = quantizeDpr(DPR);
  const width = Math.ceil(factor * requiredDpr * displayedWidth);
  const height = Math.ceil(factor * requiredDpr * displayedHeight);
  return [width, height];
}
function expectedImageSize(displayedWidth, displayedHeight, DPR) {
  const width = Math.ceil(quantizeDpr(DPR) * displayedWidth);
  const height = Math.ceil(quantizeDpr(DPR) * displayedHeight);
  return [width, height];
}
function deduplicateResultsByUrl(results) {
  results.sort((a, b) => a.url === b.url ? 0 : a.url < b.url ? -1 : 1);
  const deduplicated = [];
  for (const r of results) {
    const previousResult = deduplicated[deduplicated.length - 1];
    if (previousResult && previousResult.url === r.url) {
      if (previousResult.expectedPixels < r.expectedPixels) {
        deduplicated[deduplicated.length - 1] = r;
      }
    } else {
      deduplicated.push(r);
    }
  }
  return deduplicated;
}
function sortResultsBySizeDelta(results) {
  return results.sort((a, b) => b.expectedPixels - b.actualPixels - (a.expectedPixels - a.actualPixels));
}
function quantizeDpr(dpr) {
  if (dpr >= 2) {
    return 2;
  }
  if (dpr >= 1.5) {
    return 1.5;
  }
  return 1;
}
function isValidLang(lang) {
  let array2 = langs;
  while (lang.length < 3) {
    lang += "`";
  }
  for (let i = 0; i <= lang.length - 1; i++) {
    const index2 = lang.charCodeAt(i) - 96;
    array2 = array2[index2];
    if (!array2) {
      return false;
    }
  }
  return true;
}
function isFullyQualified(href) {
  return href.startsWith("http:") || href.startsWith("https:");
}
function isExpectedLanguageCode(hreflang) {
  if (hreflang.toLowerCase() === NO_LANGUAGE) {
    return true;
  }
  const [lang] = hreflang.split("-");
  return isValidLang(lang.toLowerCase());
}
function isUnavailable(directive) {
  const parts = directive.split(":");
  if (parts.length <= 1 || parts[0] !== UNAVAILABLE_AFTER) {
    return false;
  }
  const date2 = Date.parse(parts.slice(1).join(":"));
  return !isNaN(date2) && date2 < Date.now();
}
function hasBlockingDirective(directives) {
  return directives.split(",").map((d) => d.toLowerCase().trim()).some((d) => BLOCKLIST.has(d) || isUnavailable(d));
}
function getUserAgentFromHeaderDirectives(directives) {
  const parts = directives.match(/^([^,:]+):/);
  if (!!parts && parts[1].toLowerCase() !== UNAVAILABLE_AFTER) {
    return parts[1];
  }
}
function verifyDirective(directiveName, directiveValue) {
  if (!DIRECTIVE_SAFELIST.has(directiveName)) {
    throw new Error("Unknown directive");
  }
  if (directiveName === DIRECTIVE_SITEMAP) {
    let sitemapUrl;
    try {
      sitemapUrl = new URL(directiveValue);
    } catch (e) {
      throw new Error("Invalid sitemap URL");
    }
    if (!SITEMAP_VALID_PROTOCOLS.has(sitemapUrl.protocol)) {
      throw new Error("Invalid sitemap URL protocol");
    }
  }
  if (directiveName === DIRECTIVE_USER_AGENT && !directiveValue) {
    throw new Error("No user-agent specified");
  }
  if (directiveName === DIRECTIVE_ALLOW || directiveName === DIRECTIVE_DISALLOW) {
    if (directiveValue !== "" && directiveValue[0] !== "/" && directiveValue[0] !== "*") {
      throw new Error('Pattern should either be empty, start with "/" or "*"');
    }
    const dollarIndex = directiveValue.indexOf("$");
    if (dollarIndex !== -1 && dollarIndex !== directiveValue.length - 1) {
      throw new Error('"$" should only be used at the end of the pattern');
    }
  }
}
function parseLine(line) {
  const hashIndex = line.indexOf("#");
  if (hashIndex !== -1) {
    line = line.substr(0, hashIndex);
  }
  line = line.trim();
  if (line.length === 0) {
    return null;
  }
  const colonIndex = line.indexOf(":");
  if (colonIndex === -1) {
    throw new Error("Syntax not understood");
  }
  const directiveName = line.slice(0, colonIndex).trim().toLowerCase();
  const directiveValue = line.slice(colonIndex + 1).trim();
  verifyDirective(directiveName, directiveValue);
  return {
    directive: directiveName,
    value: directiveValue
  };
}
function validateRobots(content) {
  const errors2 = [];
  let inGroup = false;
  content.split(/\r\n|\r|\n/).forEach((line, index2) => {
    let parsedLine;
    try {
      parsedLine = parseLine(line);
    } catch (e) {
      errors2.push({
        index: (index2 + 1).toString(),
        line,
        message: e.message.toString()
      });
    }
    if (!parsedLine) {
      return;
    }
    if (parsedLine.directive === DIRECTIVE_USER_AGENT) {
      inGroup = true;
    } else if (!inGroup && DIRECTIVES_GROUP_MEMBERS.has(parsedLine.directive)) {
      errors2.push({
        index: (index2 + 1).toString(),
        line,
        message: "No user-agent specified"
      });
    }
  });
  return errors2;
}
function getStackPacks(pageStacks) {
  if (!pageStacks)
    return [];
  const packs = [];
  for (const pageStack of pageStacks) {
    const stackPackToIncl = stackPacksToInclude.find((stackPackToIncl2) => stackPackToIncl2.requiredStacks.includes(`${pageStack.detector}:${pageStack.id}`));
    if (!stackPackToIncl) {
      continue;
    }
    const matchedPack = import_lighthouse_stack_packs.default.find((pack) => pack.id === stackPackToIncl.packId);
    if (!matchedPack) {
      lighthouse_logger_default.warn("StackPacks", `'${stackPackToIncl.packId}' stack pack was matched but is not found in stack-packs lib`);
      continue;
    }
    const str_1052 = createIcuMessageFn(`node_modules/lighthouse-stack-packs/packs/${matchedPack.id}.js`, matchedPack.UIStrings);
    const descriptions = {};
    const UIStrings1252 = matchedPack.UIStrings;
    for (const key in UIStrings1252) {
      if (UIStrings1252[key]) {
        descriptions[key] = str_1052(UIStrings1252[key]);
      }
    }
    packs.push({
      id: matchedPack.id,
      title: matchedPack.title,
      iconDataURL: matchedPack.icon,
      descriptions
    });
  }
  return packs.sort((a, b) => {
    const aVal = stackPacksToInclude.findIndex((p) => p.packId === a.id);
    const bVal = stackPacksToInclude.findIndex((p) => p.packId === b.id);
    return aVal - bVal;
  });
}
async function writeJson(contents, path72, gzip) {
  const writeStream = fs.createWriteStream(gzip ? path72 + ".gz" : path72);
  if (gzip) {
    await stream.promises.pipeline(contents, createGzip(), writeStream);
  } else {
    await stream.promises.pipeline(contents, writeStream);
  }
}
function readJson(filename, reviver) {
  if (fs.existsSync(filename + ".gz")) {
    filename = filename + ".gz";
  }
  if (!filename.endsWith(".json.gz")) {
    return JSON.parse(fs.readFileSync(filename, "utf8"), reviver);
  }
  const buffer = gunzipSync(fs.readFileSync(filename));
  return JSON.parse(buffer.toString("utf8"), reviver);
}
function endsWithSuffix(filename, suffix) {
  return filename.endsWith(suffix) || filename.endsWith(suffix + ".gz");
}
function loadArtifacts(basePath) {
  lighthouse_logger_default.log("Reading artifacts from disk:", basePath);
  if (!fs.existsSync(basePath)) {
    throw new Error("No saved artifacts found at " + basePath);
  }
  const artifacts = readJson(path3.join(basePath, artifactsFilename), LighthouseError.parseReviver);
  const filenames = fs.readdirSync(basePath);
  filenames.filter((f) => endsWithSuffix(f, devtoolsFilename)).forEach((filename) => {
    const devtoolsLog = readJson(path3.join(basePath, filename));
    if (filename.startsWith(devtoolsFilename)) {
      artifacts.DevtoolsLog = devtoolsLog;
    } else if (filename.startsWith(errorPrefix)) {
      artifacts.DevtoolsLogError = devtoolsLog;
    }
  });
  filenames.filter((f) => endsWithSuffix(f, traceFilename)).forEach((filename) => {
    let trace2 = readJson(path3.join(basePath, filename));
    if (Array.isArray(trace2)) {
      trace2 = { traceEvents: trace2 };
    }
    if (filename.startsWith(traceFilename)) {
      artifacts.Trace = trace2;
    } else if (filename.startsWith(errorPrefix)) {
      artifacts.TraceError = trace2;
    }
  });
  if (Array.isArray(artifacts.Timing)) {
    artifacts.Timing.forEach((entry) => entry.gather = true);
  }
  return artifacts;
}
function stringifyReplacer(key, value) {
  if (value instanceof Error) {
    return LighthouseError.stringifyReplacer(value);
  }
  return value;
}
async function saveArtifacts(artifacts, basePath, options2 = {}) {
  const status = { msg: "Saving artifacts", id: "lh:assetSaver:saveArtifacts" };
  lighthouse_logger_default.time(status);
  fs.mkdirSync(basePath, { recursive: true });
  const filenames = fs.readdirSync(basePath);
  for (const filename of filenames) {
    const isPreviousFile = filename.endsWith(traceFilename) || filename.endsWith(devtoolsFilename) || filename.endsWith(traceFilename + ".gz") || filename.endsWith(devtoolsFilename + ".gz") || filename === artifactsFilename || filename === artifactsFilename + ".gz";
    if (isPreviousFile) {
      fs.unlinkSync(`${basePath}/${filename}`);
    }
  }
  const { DevtoolsLog: DevtoolsLog2, Trace: Trace2, DevtoolsLogError, TraceError, ...restArtifacts } = artifacts;
  if (Trace2) {
    await saveTrace(Trace2, `${basePath}/${traceFilename}`, options2);
  }
  if (TraceError) {
    await saveTrace(TraceError, `${basePath}/${errorPrefix}${traceFilename}`, options2);
  }
  if (DevtoolsLog2) {
    await saveDevtoolsLog(DevtoolsLog2, `${basePath}/${devtoolsFilename}`, options2);
  }
  if (DevtoolsLogError) {
    await saveDevtoolsLog(DevtoolsLogError, `${basePath}/${errorPrefix}${devtoolsFilename}`, options2);
  }
  const restArtifactsString = JSON.stringify(restArtifacts, stringifyReplacer, 2);
  await writeJson(function* () {
    yield restArtifactsString;
    yield "\n";
  }, `${basePath}/${artifactsFilename}`, !!options2.gzip);
  lighthouse_logger_default.log("Artifacts saved to disk in folder:", basePath);
  lighthouse_logger_default.timeEnd(status);
}
function saveLhr(lhr, basePath) {
  fs.writeFileSync(`${basePath}/lhr.report.json`, JSON.stringify(lhr, null, 2));
}
function* arrayOfObjectsJsonGenerator(arrayOfObjects) {
  const ITEMS_PER_ITERATION = 500;
  yield "[\n";
  if (arrayOfObjects.length > 0) {
    const itemsIterator = arrayOfObjects[Symbol.iterator]();
    const firstItem = itemsIterator.next().value;
    yield `  ${JSON.stringify(firstItem)}`;
    let itemsRemaining = ITEMS_PER_ITERATION;
    let itemsJSON = "";
    for (const item of itemsIterator) {
      itemsJSON += `,
  ${JSON.stringify(item)}`;
      itemsRemaining--;
      if (itemsRemaining === 0) {
        yield itemsJSON;
        itemsRemaining = ITEMS_PER_ITERATION;
        itemsJSON = "";
      }
    }
    yield itemsJSON;
  }
  yield "\n]";
}
function* traceJsonGenerator(traceData) {
  const { traceEvents, ...rest } = traceData;
  yield "{\n";
  yield '"traceEvents": ';
  yield* arrayOfObjectsJsonGenerator(traceEvents);
  for (const [key, value] of Object.entries(rest)) {
    yield `,
"${key}": ${JSON.stringify(value, null, 2)}`;
  }
  yield "}\n";
}
function saveTrace(traceData, traceFilename2, options2 = {}) {
  const traceIter = traceJsonGenerator(traceData);
  return writeJson(traceIter, traceFilename2, !!options2.gzip);
}
function saveDevtoolsLog(devtoolsLog, devtoolLogFilename, options2 = {}) {
  return writeJson(function* () {
    yield* arrayOfObjectsJsonGenerator(devtoolsLog);
    yield "\n";
  }, devtoolLogFilename, !!options2.gzip);
}
function isValidArtifactDependency(dependent, dependency) {
  const levels = { timespan: 0, snapshot: 1, navigation: 2 };
  const dependentLevel = Math.min(...dependent.instance.meta.supportedModes.map((l) => levels[l]));
  const dependencyLevel = Math.min(...dependency.instance.meta.supportedModes.map((l) => levels[l]));
  if (dependentLevel === levels.timespan)
    return dependencyLevel === levels.timespan;
  if (dependentLevel === levels.snapshot)
    return dependencyLevel === levels.snapshot;
  return true;
}
function assertValidPluginName(config32, pluginName) {
  const parts = pluginName.split("/");
  if (parts.length === 2) {
    pluginName = parts[1];
  }
  if (!pluginName.startsWith("lighthouse-plugin-")) {
    throw new Error(`plugin name '${pluginName}' does not start with 'lighthouse-plugin-'`);
  }
  if (config32.categories?.[pluginName]) {
    throw new Error(`plugin name '${pluginName}' not allowed because it is the id of a category already found in config`);
  }
}
function assertValidArtifact(artifactDefn) {
  const gatherer = artifactDefn.gatherer.instance;
  if (typeof gatherer.meta !== "object") {
    throw new Error(`Gatherer for ${artifactDefn.id} did not provide a meta object.`);
  }
  if (gatherer.meta.supportedModes.length === 0) {
    throw new Error(`Gatherer for ${artifactDefn.id} did not support any gather modes.`);
  }
  if (typeof gatherer.getArtifact !== "function" || gatherer.getArtifact === base_gatherer_default.prototype.getArtifact) {
    throw new Error(`Gatherer for ${artifactDefn.id} did not define a "getArtifact" method.`);
  }
}
function assertValidAudit(auditDefinition) {
  const { implementation, path: auditPath } = auditDefinition;
  const auditName = auditPath || implementation?.meta?.id || "Unknown audit";
  if (typeof implementation.audit !== "function" || implementation.audit === Audit.audit) {
    throw new Error(`${auditName} has no audit() method.`);
  }
  if (typeof implementation.meta.id !== "string") {
    throw new Error(`${auditName} has no meta.id property, or the property is not a string.`);
  }
  if (!isStringOrIcuMessage(implementation.meta.title)) {
    throw new Error(`${auditName} has no meta.title property, or the property is not a string.`);
  }
  const scoreDisplayMode = implementation.meta.scoreDisplayMode || Audit.SCORING_MODES.BINARY;
  if (!isStringOrIcuMessage(implementation.meta.failureTitle) && scoreDisplayMode === Audit.SCORING_MODES.BINARY) {
    throw new Error(`${auditName} has no meta.failureTitle and should.`);
  }
  if (!isStringOrIcuMessage(implementation.meta.description)) {
    throw new Error(`${auditName} has no meta.description property, or the property is not a string.`);
  } else if (implementation.meta.description === "") {
    throw new Error(`${auditName} has an empty meta.description string. Please add a description for the UI.`);
  }
  if (!Array.isArray(implementation.meta.requiredArtifacts)) {
    throw new Error(`${auditName} has no meta.requiredArtifacts property, or the property is not an array.`);
  }
}
function assertValidCategories(categories, audits, groups) {
  if (!categories) {
    return;
  }
  const auditsKeyedById = new Map((audits || []).map((audit) => {
    return [audit.implementation.meta.id, audit];
  }));
  Object.keys(categories).forEach((categoryId) => {
    categories[categoryId].auditRefs.forEach((auditRef, index2) => {
      if (!auditRef.id) {
        throw new Error(`missing an audit id at ${categoryId}[${index2}]`);
      }
      const audit = auditsKeyedById.get(auditRef.id);
      if (!audit) {
        throw new Error(`could not find ${auditRef.id} audit for category ${categoryId}`);
      }
      const auditImpl = audit.implementation;
      const isManual = auditImpl.meta.scoreDisplayMode === "manual";
      if (categoryId === "accessibility" && !auditRef.group && !isManual) {
        throw new Error(`${auditRef.id} accessibility audit does not have a group`);
      }
      if (auditRef.weight > 0 && isManual) {
        throw new Error(`${auditRef.id} is manual but has a positive weight`);
      }
      if (auditRef.group && (!groups || !groups[auditRef.group])) {
        throw new Error(`${auditRef.id} references unknown group ${auditRef.group}`);
      }
    });
  });
}
function assertValidSettings(settings) {
  if (!settings.formFactor) {
    throw new Error(`\`settings.formFactor\` must be defined as 'mobile' or 'desktop'. See https://github.com/GoogleChrome/lighthouse/blob/main/docs/emulation.md`);
  }
  if (!settings.screenEmulation.disabled) {
    if (settings.screenEmulation.mobile !== (settings.formFactor === "mobile")) {
      throw new Error(`Screen emulation mobile setting (${settings.screenEmulation.mobile}) does not match formFactor setting (${settings.formFactor}). See https://github.com/GoogleChrome/lighthouse/blob/main/docs/emulation.md`);
    }
  }
  const skippedAndOnlyAuditId = settings.skipAudits?.find((auditId) => settings.onlyAudits?.includes(auditId));
  if (skippedAndOnlyAuditId) {
    throw new Error(`${skippedAndOnlyAuditId} appears in both skipAudits and onlyAudits`);
  }
}
function assertValidArtifacts(artifactDefns) {
  const availableArtifacts = /* @__PURE__ */ new Set();
  for (const artifact of artifactDefns) {
    assertValidArtifact(artifact);
    if (availableArtifacts.has(artifact.id)) {
      throw new Error(`Config defined multiple artifacts with id '${artifact.id}'`);
    }
    availableArtifacts.add(artifact.id);
    if (!artifact.dependencies)
      continue;
    for (const [dependencyKey, { id: dependencyId }] of Object.entries(artifact.dependencies)) {
      if (availableArtifacts.has(dependencyId))
        continue;
      throwInvalidDependencyOrder(artifact.id, dependencyKey);
    }
  }
}
function assertValidConfig(resolvedConfig) {
  assertValidArtifacts(resolvedConfig.artifacts || []);
  for (const auditDefn of resolvedConfig.audits || []) {
    assertValidAudit(auditDefn);
  }
  assertValidCategories(resolvedConfig.categories, resolvedConfig.audits, resolvedConfig.groups);
  assertValidSettings(resolvedConfig.settings);
}
function throwInvalidDependencyOrder(artifactId, dependencyKey) {
  throw new Error([
    `Failed to find dependency "${dependencyKey}" for "${artifactId}" artifact`,
    `Check that...`,
    `  1. A gatherer exposes a matching Symbol that satisfies "${dependencyKey}".`,
    `  2. "${dependencyKey}" is configured to run before "${artifactId}"`
  ].join("\n"));
}
function throwInvalidArtifactDependency(artifactId, dependencyKey) {
  throw new Error([
    `Dependency "${dependencyKey}" for "${artifactId}" artifact is invalid.`,
    `The dependency must be collected before the dependent.`
  ].join("\n"));
}
function getAuditIdsInCategories(allCategories, onlyCategories) {
  if (!allCategories)
    return /* @__PURE__ */ new Set();
  onlyCategories = onlyCategories || Object.keys(allCategories);
  const categories = onlyCategories.map((categoryId) => allCategories[categoryId]);
  const auditRefs = categories.flatMap((category) => category?.auditRefs || []);
  return new Set(auditRefs.map((auditRef) => auditRef.id));
}
function filterArtifactsByAvailableAudits(artifacts, audits) {
  if (!artifacts)
    return null;
  if (!audits)
    return artifacts;
  const artifactsById = new Map(artifacts.map((artifact) => [artifact.id, artifact]));
  const artifactIdsToKeep = /* @__PURE__ */ new Set([
    ...filterResistantArtifactIds,
    ...audits.flatMap((audit) => audit.implementation.meta.requiredArtifacts)
  ]);
  let previousSize = 0;
  while (previousSize !== artifactIdsToKeep.size) {
    previousSize = artifactIdsToKeep.size;
    for (const artifactId of artifactIdsToKeep) {
      const artifact = artifactsById.get(artifactId);
      if (!artifact)
        continue;
      if (!artifact.dependencies)
        continue;
      for (const dep of Object.values(artifact.dependencies)) {
        artifactIdsToKeep.add(dep.id);
      }
    }
  }
  return artifacts.filter((artifact) => artifactIdsToKeep.has(artifact.id));
}
function filterArtifactsByGatherMode(artifacts, mode2) {
  if (!artifacts)
    return null;
  return artifacts.filter((artifact) => {
    return artifact.gatherer.instance.meta.supportedModes.includes(mode2);
  });
}
function filterAuditsByAvailableArtifacts(audits, availableArtifacts) {
  if (!audits)
    return null;
  const availableArtifactIds = new Set(availableArtifacts.map((artifact) => artifact.id).concat(baseArtifactKeys));
  return audits.filter((audit) => {
    const meta = audit.implementation.meta;
    return meta.requiredArtifacts.every((id2) => availableArtifactIds.has(id2));
  });
}
function filterAuditsByGatherMode(audits, mode2) {
  if (!audits)
    return null;
  return audits.filter((audit) => {
    const meta = audit.implementation.meta;
    return !meta.supportedModes || meta.supportedModes.includes(mode2);
  });
}
function filterCategoriesByGatherMode(categories, mode2) {
  if (!categories)
    return null;
  const categoriesToKeep = Object.entries(categories).filter(([_, category]) => {
    return !category.supportedModes || category.supportedModes.includes(mode2);
  });
  return Object.fromEntries(categoriesToKeep);
}
function filterCategoriesByExplicitFilters(categories, onlyCategories) {
  if (!categories || !onlyCategories)
    return categories;
  const categoriesToKeep = Object.entries(categories).filter(([categoryId]) => onlyCategories.includes(categoryId));
  return Object.fromEntries(categoriesToKeep);
}
function errorOnUnknownOnlyCategories(allCategories, onlyCategories) {
  if (!onlyCategories)
    return;
  const unknown2 = onlyCategories.filter((c) => !allCategories?.[c]);
  if (unknown2.length) {
    throw new Error(`unrecognized category in 'onlyCategories': ${unknown2.join(", ")}`);
  }
}
function filterCategoriesByAvailableAudits(categories, availableAudits) {
  if (!categories)
    return categories;
  const availableAuditIdToMeta = new Map(availableAudits.map((audit) => [audit.implementation.meta.id, audit.implementation.meta]));
  const categoryEntries = Object.entries(categories).map(([categoryId, category]) => {
    const filteredCategory = {
      ...category,
      auditRefs: category.auditRefs.filter((ref2) => availableAuditIdToMeta.has(ref2.id))
    };
    const didFilter = filteredCategory.auditRefs.length < category.auditRefs.length;
    const hasOnlyManualAudits = filteredCategory.auditRefs.every((ref2) => {
      const meta = availableAuditIdToMeta.get(ref2.id);
      if (!meta)
        return false;
      return meta.scoreDisplayMode === Audit.SCORING_MODES.MANUAL;
    });
    if (didFilter && hasOnlyManualAudits)
      filteredCategory.auditRefs = [];
    return [categoryId, filteredCategory];
  }).filter((entry) => typeof entry[1] === "object" && entry[1].auditRefs.length);
  return Object.fromEntries(categoryEntries);
}
function filterConfigByGatherMode(resolvedConfig, mode2) {
  const artifacts = filterArtifactsByGatherMode(resolvedConfig.artifacts, mode2);
  const supportedAudits = filterAuditsByGatherMode(resolvedConfig.audits, mode2);
  const audits = filterAuditsByAvailableArtifacts(supportedAudits, artifacts || []);
  const supportedCategories = filterCategoriesByGatherMode(resolvedConfig.categories, mode2);
  const categories = filterCategoriesByAvailableAudits(supportedCategories, audits || []);
  return {
    ...resolvedConfig,
    artifacts,
    audits,
    categories
  };
}
function filterConfigByExplicitFilters(resolvedConfig, filters) {
  const { onlyAudits, onlyCategories, skipAudits } = filters;
  if (onlyAudits && !onlyAudits.length) {
    throw new Error(`onlyAudits cannot be an empty array.`);
  }
  if (onlyCategories && !onlyCategories.length) {
    throw new Error(`onlyCategories cannot be an empty array.`);
  }
  errorOnUnknownOnlyCategories(resolvedConfig.categories, onlyCategories);
  let baseAuditIds = getAuditIdsInCategories(resolvedConfig.categories, void 0);
  if (onlyCategories) {
    baseAuditIds = getAuditIdsInCategories(resolvedConfig.categories, onlyCategories);
  } else if (onlyAudits) {
    baseAuditIds = /* @__PURE__ */ new Set();
  } else if (!resolvedConfig.categories || !Object.keys(resolvedConfig.categories).length) {
    baseAuditIds = new Set(resolvedConfig.audits?.map((audit) => audit.implementation.meta.id));
  }
  const auditIdsToKeep = new Set([
    ...baseAuditIds,
    // Start with our base audits.
    ...onlyAudits || [],
    // Additionally include the opt-in audits from `onlyAudits`.
    ...filterResistantAuditIds
    // Always include any filter-resistant audits.
  ].filter((auditId) => !skipAudits || !skipAudits.includes(auditId)));
  const audits = auditIdsToKeep.size && resolvedConfig.audits ? resolvedConfig.audits.filter((audit) => auditIdsToKeep.has(audit.implementation.meta.id)) : resolvedConfig.audits;
  const availableCategories = filterCategoriesByAvailableAudits(resolvedConfig.categories, audits || []);
  const categories = filterCategoriesByExplicitFilters(availableCategories, onlyCategories);
  let artifacts = filterArtifactsByAvailableAudits(resolvedConfig.artifacts, audits);
  if (artifacts && resolvedConfig.settings.disableFullPageScreenshot) {
    artifacts = artifacts.filter(({ id: id2 }) => id2 !== "FullPageScreenshot");
  }
  return {
    ...resolvedConfig,
    artifacts,
    audits,
    categories
  };
}
function isArrayOfUnknownObjects(arr) {
  return Array.isArray(arr) && arr.every(isObjectOfUnknownProperties);
}
function isObjectOfUnknownProperties(val) {
  return typeof val === "object" && val !== null && !Array.isArray(val);
}
function objectIsGatherMode(str) {
  if (typeof str !== "string")
    return false;
  return str === "navigation" || str === "timespan" || str === "snapshot";
}
function isArrayOfGatherModes(arr) {
  if (!Array.isArray(arr))
    return false;
  return arr.every(objectIsGatherMode);
}
function assertNoExcessProperties(obj, pluginName, objectName = "") {
  if (objectName) {
    objectName += " ";
  }
  const invalidKeys = Object.keys(obj);
  if (invalidKeys.length > 0) {
    const keys2 = invalidKeys.join(", ");
    throw new Error(`${pluginName} has unrecognized ${objectName}properties: [${keys2}]`);
  }
}
function isBundledEnvironment2() {
  if (global.isDevtools || global.isLightrider)
    return true;
  try {
    require4.resolve("lighthouse-logger");
    return false;
  } catch (err) {
    return true;
  }
}
function _mergeConfigFragment(base, extension2, overwriteArrays = false) {
  if (typeof base === "undefined" || base === null) {
    return extension2;
  } else if (typeof extension2 === "undefined") {
    return base;
  } else if (Array.isArray(extension2)) {
    if (overwriteArrays)
      return extension2;
    if (!Array.isArray(base))
      throw new TypeError(`Expected array but got ${typeof base}`);
    const merged = base.slice();
    extension2.forEach((item) => {
      if (!merged.some((candidate) => isEqual_default(candidate, item)))
        merged.push(item);
    });
    return merged;
  } else if (typeof extension2 === "object") {
    if (typeof base !== "object")
      throw new TypeError(`Expected object but got ${typeof base}`);
    if (Array.isArray(base))
      throw new TypeError("Expected object but got Array");
    Object.keys(extension2).forEach((key) => {
      const localOverwriteArrays = overwriteArrays || key === "settings" && typeof base[key] === "object";
      base[key] = _mergeConfigFragment(base[key], extension2[key], localOverwriteArrays);
    });
    return base;
  }
  return extension2;
}
function mergeConfigFragmentArrayByKey(baseArray, extensionArray, keyFn) {
  const itemsByKey = /* @__PURE__ */ new Map();
  const mergedArray = baseArray || [];
  for (let i = 0; i < mergedArray.length; i++) {
    const item = mergedArray[i];
    itemsByKey.set(keyFn(item), { index: i, item });
  }
  for (const item of extensionArray || []) {
    const baseItemEntry = itemsByKey.get(keyFn(item));
    if (baseItemEntry) {
      const baseItem = baseItemEntry.item;
      const merged = typeof item === "object" && typeof baseItem === "object" ? mergeConfigFragment(baseItem, item, true) : item;
      mergedArray[baseItemEntry.index] = merged;
    } else {
      mergedArray.push(item);
    }
  }
  return mergedArray;
}
function expandGathererShorthand(gatherer) {
  if (typeof gatherer === "string") {
    return { path: gatherer };
  } else if ("implementation" in gatherer || "instance" in gatherer) {
    return gatherer;
  } else if ("path" in gatherer) {
    if (typeof gatherer.path !== "string") {
      throw new Error("Invalid Gatherer type " + JSON.stringify(gatherer));
    }
    return gatherer;
  } else if (typeof gatherer === "function") {
    return { implementation: gatherer };
  } else if (gatherer && typeof gatherer.getArtifact === "function") {
    return { instance: gatherer };
  } else {
    throw new Error("Invalid Gatherer type " + JSON.stringify(gatherer));
  }
}
function expandAuditShorthand(audit) {
  if (typeof audit === "string") {
    return { path: audit, options: {} };
  } else if ("implementation" in audit && typeof audit.implementation.audit === "function") {
    return audit;
  } else if ("path" in audit && typeof audit.path === "string") {
    return audit;
  } else if ("audit" in audit && typeof audit.audit === "function") {
    return { implementation: audit, options: {} };
  } else {
    throw new Error("Invalid Audit type " + JSON.stringify(audit));
  }
}
async function requireWrapper(requirePath2) {
  if (path4.isAbsolute(requirePath2)) {
    requirePath2 = url_default.pathToFileURL(requirePath2).href;
  }
  let module2;
  if (bundledModules.has(requirePath2)) {
    module2 = await bundledModules.get(requirePath2);
  } else if (requirePath2.match(/\.(js|mjs|cjs)$/)) {
    module2 = await import(requirePath2);
  } else {
    requirePath2 += ".js";
    module2 = await import(requirePath2);
  }
  if (module2.default)
    return module2.default;
  const methods = /* @__PURE__ */ new Set(["meta"]);
  const possibleNamedExports = Object.keys(module2).filter((key) => {
    if (!(module2[key] && module2[key] instanceof Object))
      return false;
    return Object.getOwnPropertyNames(module2[key]).some((method) => methods.has(method));
  });
  if (possibleNamedExports.length === 1)
    return possibleNamedExports[0];
  if (possibleNamedExports.length > 1) {
    throw new Error(`module '${requirePath2}' has too many possible exports`);
  }
  throw new Error(`module '${requirePath2}' missing default export`);
}
async function requireGatherer(gathererPath, coreGathererList, configDir) {
  const coreGatherer = coreGathererList.find((a) => a === `${gathererPath}.js`);
  let requirePath2 = `../gather/gatherers/${gathererPath}`;
  if (!coreGatherer) {
    requirePath2 = resolveModulePath(gathererPath, configDir, "gatherer");
  }
  const GathererClass = (
    /** @type {GathererConstructor} */
    await requireWrapper(requirePath2)
  );
  return {
    instance: new GathererClass(),
    implementation: GathererClass,
    path: gathererPath
  };
}
function requireAudit(auditPath, coreAuditList, configDir) {
  const auditPathJs = `${auditPath}.js`;
  const coreAudit = coreAuditList.find((a) => a === auditPathJs);
  let requirePath2 = `../audits/${auditPath}`;
  if (!coreAudit) {
    if (isBundledEnvironment2()) {
      requirePath2 = auditPath;
    } else {
      const absolutePath = resolveModulePath(auditPath, configDir, "audit");
      if (isBundledEnvironment2()) {
        requirePath2 = path4.relative("", absolutePath);
      } else {
        requirePath2 = absolutePath;
      }
    }
  }
  return requireWrapper(requirePath2);
}
function cleanFlagsForSettings(flags = {}) {
  const settings = {};
  for (const key of Object.keys(flags)) {
    if (key in defaultSettings) {
      settings[key] = flags[key];
    }
  }
  return settings;
}
function resolveSettings(settingsJson = {}, overrides = void 0) {
  const locale = lookupLocale(overrides?.locale || settingsJson.locale);
  const { defaultSettings: defaultSettings2 } = constants_exports;
  const settingWithDefaults = mergeConfigFragment(deepClone(defaultSettings2), settingsJson, true);
  const settingsWithFlags = mergeConfigFragment(settingWithDefaults, cleanFlagsForSettings(overrides), true);
  settingsWithFlags.locale = locale;
  if (settingsWithFlags.emulatedUserAgent === true) {
    settingsWithFlags.emulatedUserAgent = userAgents[settingsWithFlags.formFactor];
  }
  assertValidSettings(settingsWithFlags);
  return settingsWithFlags;
}
async function mergePlugins(config32, configDir, flags) {
  const configPlugins = config32.plugins || [];
  const flagPlugins = flags?.plugins || [];
  const pluginNames = /* @__PURE__ */ new Set([...configPlugins, ...flagPlugins]);
  for (const pluginName of pluginNames) {
    assertValidPluginName(config32, pluginName);
    const pluginPath = isBundledEnvironment2() ? pluginName : resolveModulePath(pluginName, configDir, "plugin");
    const rawPluginJson = await requireWrapper(pluginPath);
    const pluginJson = config_plugin_default.parsePlugin(rawPluginJson, pluginName);
    config32 = mergeConfigFragment(config32, pluginJson);
  }
  return config32;
}
async function resolveGathererToDefn(gathererJson, coreGathererList, configDir) {
  const gathererDefn = expandGathererShorthand(gathererJson);
  if (gathererDefn.instance) {
    return {
      instance: gathererDefn.instance,
      implementation: gathererDefn.implementation,
      path: gathererDefn.path
    };
  } else if (gathererDefn.implementation) {
    const GathererClass = gathererDefn.implementation;
    return {
      instance: new GathererClass(),
      implementation: gathererDefn.implementation,
      path: gathererDefn.path
    };
  } else if (gathererDefn.path) {
    const path72 = gathererDefn.path;
    return requireGatherer(path72, coreGathererList, configDir);
  } else {
    throw new Error("Invalid expanded Gatherer: " + JSON.stringify(gathererDefn));
  }
}
async function resolveAuditsToDefns(audits, configDir) {
  if (!audits) {
    return null;
  }
  const coreList = Runner.getAuditList();
  const auditDefnsPromises = audits.map(async (auditJson) => {
    const auditDefn = expandAuditShorthand(auditJson);
    let implementation;
    if ("implementation" in auditDefn) {
      implementation = auditDefn.implementation;
    } else {
      implementation = await requireAudit(auditDefn.path, coreList, configDir);
    }
    return {
      implementation,
      path: auditDefn.path,
      options: auditDefn.options || {}
    };
  });
  const auditDefns = await Promise.all(auditDefnsPromises);
  const mergedAuditDefns = mergeOptionsOfItems(auditDefns);
  mergedAuditDefns.forEach((audit) => assertValidAudit(audit));
  return mergedAuditDefns;
}
function resolveModulePath(moduleIdentifier, configDir, category) {
  try {
    return require4.resolve(moduleIdentifier);
  } catch (e) {
  }
  try {
    return require4.resolve(moduleIdentifier, { paths: [process.cwd()] });
  } catch (e) {
  }
  const cwdPath = path4.resolve(process.cwd(), moduleIdentifier);
  try {
    return require4.resolve(cwdPath);
  } catch (e) {
  }
  const errorString = "Unable to locate " + (category ? `${category}: ` : "") + `\`${moduleIdentifier}\`.
     Tried to resolve the module from these locations:
       ${""}
       ${cwdPath}`;
  if (!configDir) {
    throw new Error(errorString);
  }
  const relativePath = path4.resolve(configDir, moduleIdentifier);
  try {
    return require4.resolve(relativePath);
  } catch (requireError) {
  }
  try {
    return require4.resolve(moduleIdentifier, { paths: [configDir] });
  } catch (requireError) {
  }
  throw new Error(errorString + `
       ${relativePath}`);
}
function shallowClone(item) {
  if (typeof item === "object") {
    return Object.assign(Object.create(Object.getPrototypeOf(item)), item);
  }
  return item;
}
function deepClone(json) {
  return JSON.parse(JSON.stringify(json));
}
function deepCloneConfigJson(json) {
  const cloned = deepClone(json);
  if (Array.isArray(json.audits)) {
    cloned.audits = json.audits.map((audit) => shallowClone(audit));
  }
  if (Array.isArray(json.artifacts)) {
    cloned.artifacts = json.artifacts.map((artifact) => ({
      ...artifact,
      gatherer: shallowClone(artifact.gatherer)
    }));
  }
  return cloned;
}
function resolveWorkingCopy(config32, context2) {
  let { configPath } = context2;
  if (configPath && !path5.isAbsolute(configPath)) {
    throw new Error("configPath must be an absolute path");
  }
  if (!config32) {
    config32 = default_config_default;
    configPath = defaultConfigPath;
  }
  const configDir = configPath ? path5.dirname(configPath) : void 0;
  return {
    configWorkingCopy: deepCloneConfigJson(config32),
    configPath,
    configDir
  };
}
function resolveExtensions(config32) {
  if (!config32.extends)
    return config32;
  if (config32.extends !== "lighthouse:default") {
    throw new Error("`lighthouse:default` is the only valid extension method.");
  }
  const { artifacts, ...extensionJSON } = config32;
  const defaultClone = deepCloneConfigJson(default_config_default);
  const mergedConfig = mergeConfigFragment(defaultClone, extensionJSON);
  mergedConfig.artifacts = mergeConfigFragmentArrayByKey(defaultClone.artifacts, artifacts, (artifact) => artifact.id);
  return mergedConfig;
}
function resolveArtifactDependencies(artifact, gatherer, artifactDefnsBySymbol) {
  if (!("dependencies" in gatherer.instance.meta))
    return void 0;
  const dependencies2 = Object.entries(gatherer.instance.meta.dependencies).map(([dependencyName, artifactSymbol]) => {
    const dependency = artifactDefnsBySymbol.get(artifactSymbol);
    if (!dependency)
      throwInvalidDependencyOrder(artifact.id, dependencyName);
    const validDependency = isValidArtifactDependency(gatherer, dependency.gatherer);
    if (!validDependency)
      throwInvalidArtifactDependency(artifact.id, dependencyName);
    return [dependencyName, { id: dependency.id }];
  });
  return Object.fromEntries(dependencies2);
}
async function resolveArtifactsToDefns(artifacts, configDir) {
  if (!artifacts)
    return null;
  const status = { msg: "Resolve artifact definitions", id: "lh:config:resolveArtifactsToDefns" };
  lighthouse_logger_default.time(status, "verbose");
  const sortedArtifacts = [...artifacts];
  sortedArtifacts.sort((a, b) => {
    const aPriority = internalArtifactPriorities[a.id] || 0;
    const bPriority = internalArtifactPriorities[b.id] || 0;
    return aPriority - bPriority;
  });
  const artifactDefnsBySymbol = /* @__PURE__ */ new Map();
  const coreGathererList = Runner.getGathererList();
  const artifactDefns = [];
  for (const artifactJson of sortedArtifacts) {
    const gathererJson = artifactJson.gatherer;
    const gatherer = await resolveGathererToDefn(gathererJson, coreGathererList, configDir);
    const artifact = {
      id: artifactJson.id,
      gatherer,
      dependencies: resolveArtifactDependencies(artifactJson, gatherer, artifactDefnsBySymbol)
    };
    const symbol = artifact.gatherer.instance.meta.symbol;
    if (symbol)
      artifactDefnsBySymbol.set(symbol, artifact);
    artifactDefns.push(artifact);
  }
  lighthouse_logger_default.timeEnd(status);
  return artifactDefns;
}
function overrideSettingsForGatherMode(settings, gatherMode) {
  if (gatherMode === "timespan") {
    if (settings.throttlingMethod === "simulate") {
      settings.throttlingMethod = "devtools";
    }
  }
}
function overrideThrottlingWindows(settings) {
  if (settings.throttlingMethod === "simulate")
    return;
  settings.cpuQuietThresholdMs = Math.max(settings.cpuQuietThresholdMs || 0, nonSimulatedSettingsOverrides.cpuQuietThresholdMs);
  settings.networkQuietThresholdMs = Math.max(settings.networkQuietThresholdMs || 0, nonSimulatedSettingsOverrides.networkQuietThresholdMs);
  settings.pauseAfterFcpMs = Math.max(settings.pauseAfterFcpMs || 0, nonSimulatedSettingsOverrides.pauseAfterFcpMs);
  settings.pauseAfterLoadMs = Math.max(settings.pauseAfterLoadMs || 0, nonSimulatedSettingsOverrides.pauseAfterLoadMs);
}
async function initializeConfig(gatherMode, config32, flags = {}) {
  const status = { msg: "Initialize config", id: "lh:config" };
  lighthouse_logger_default.time(status, "verbose");
  let { configWorkingCopy, configDir } = resolveWorkingCopy(config32, flags);
  configWorkingCopy = resolveExtensions(configWorkingCopy);
  configWorkingCopy = await mergePlugins(configWorkingCopy, configDir, flags);
  const settings = resolveSettings(configWorkingCopy.settings || {}, flags);
  overrideSettingsForGatherMode(settings, gatherMode);
  overrideThrottlingWindows(settings);
  const artifacts = await resolveArtifactsToDefns(configWorkingCopy.artifacts, configDir);
  let resolvedConfig = {
    artifacts,
    audits: await resolveAuditsToDefns(configWorkingCopy.audits, configDir),
    categories: configWorkingCopy.categories || null,
    groups: configWorkingCopy.groups || null,
    settings
  };
  assertValidConfig(resolvedConfig);
  resolvedConfig = filterConfigByGatherMode(resolvedConfig, gatherMode);
  resolvedConfig = filterConfigByExplicitFilters(resolvedConfig, settings);
  lighthouse_logger_default.timeEnd(status);
  return { resolvedConfig };
}
async function init(opts) {
  if (!opts.flags.enableErrorReporting) {
    return;
  }
  if (!sentryDelegate._shouldSample()) {
    return;
  }
  try {
    const Sentry2 = await Promise.resolve().then(() => (init_cjs(), cjs_exports));
    Sentry2.init({
      ...opts.environmentData,
      dsn: SENTRY_URL
    });
    let settings = opts.flags;
    try {
      const { resolvedConfig } = await initializeConfig("navigation", opts.config, opts.flags);
      settings = resolvedConfig.settings;
    } catch {
    }
    const baseTags = {
      channel: settings.channel,
      formFactor: settings.formFactor,
      throttlingMethod: settings.throttlingMethod
    };
    Sentry2.setTags(baseTags);
    const extras2 = {
      ...settings.throttling,
      url: opts.url
    };
    Sentry2.setExtras(extras2);
    sentryDelegate.captureMessage = (...args2) => Sentry2.captureMessage(...args2);
    sentryDelegate.captureBreadcrumb = (...args2) => Sentry2.addBreadcrumb(...args2);
    sentryDelegate.getContext = () => extras2;
    const sentryExceptionCache = /* @__PURE__ */ new Map();
    sentryDelegate.captureException = async (err, opts2 = {}) => {
      if (!err)
        return;
      if (err.expected)
        return;
      const tags = opts2.tags || {};
      if (tags.audit) {
        const key = `audit-${tags.audit}-${err.message}`;
        if (sentryExceptionCache.has(key))
          return;
        sentryExceptionCache.set(key, true);
      }
      if (tags.gatherer) {
        const key = `gatherer-${tags.gatherer}-${err.message}`;
        if (sentryExceptionCache.has(key))
          return;
        sentryExceptionCache.set(key, true);
      }
      if (err.protocolMethod) {
        opts2.fingerprint = ["{{ default }}", err.protocolMethod, err.protocolError];
        opts2.tags = opts2.tags || {};
        opts2.tags.protocolMethod = err.protocolMethod;
      }
      Sentry2.withScope((scope2) => {
        if (opts2.level) {
          scope2.setLevel(opts2.level);
        }
        if (opts2.tags) {
          scope2.setTags(opts2.tags);
        }
        let extra;
        if (opts2.extra)
          extra = { ...opts2.extra };
        if (err.extra)
          extra = { ...extra, ...err.extra };
        if (extra) {
          scope2.setExtras(extra);
        }
        Sentry2.captureException(err);
      });
    };
  } catch (e) {
    lighthouse_logger_default.warn("sentry", "Could not load Sentry, errors will not be reported.");
  }
}
function createDependencyError(dependency, error) {
  const err = new Error(`Dependency "${dependency.id}" failed with exception: ${error.message}`);
  err.expected = true;
  return err;
}
function getEmptyArtifactState() {
  return {
    startInstrumentation: {},
    startSensitiveInstrumentation: {},
    stopSensitiveInstrumentation: {},
    stopInstrumentation: {},
    getArtifact: {}
  };
}
async function collectPhaseArtifacts(options2) {
  const { driver, page, artifactDefinitions, artifactState, baseArtifacts, phase, gatherMode, computedCache, settings } = options2;
  const priorPhase = phaseToPriorPhase[phase];
  const priorPhaseArtifacts = priorPhase && artifactState[priorPhase] || {};
  const isFinalPhase = phase === "getArtifact";
  for (const artifactDefn of artifactDefinitions) {
    lighthouse_logger_default.verbose(`artifacts:${phase}`, artifactDefn.id);
    const gatherer = artifactDefn.gatherer.instance;
    const priorArtifactPromise = priorPhaseArtifacts[artifactDefn.id] || Promise.resolve();
    const artifactPromise = priorArtifactPromise.then(async () => {
      const dependencies2 = isFinalPhase ? await collectArtifactDependencies(artifactDefn, artifactState.getArtifact) : (
        /** @type {Dependencies} */
        {}
      );
      const status = {
        msg: `Getting artifact: ${artifactDefn.id}`,
        id: `lh:gather:getArtifact:${artifactDefn.id}`
      };
      if (isFinalPhase) {
        lighthouse_logger_default.time(status);
      }
      const artifact = await gatherer[phase]({
        gatherMode,
        driver,
        page,
        baseArtifacts,
        dependencies: dependencies2,
        computedCache,
        settings
      });
      if (isFinalPhase) {
        lighthouse_logger_default.timeEnd(status);
      }
      return artifact;
    });
    await artifactPromise.catch((err) => {
      Sentry.captureException(err, {
        tags: { gatherer: artifactDefn.id, phase },
        level: "error"
      });
      lighthouse_logger_default.error(artifactDefn.id, err.message);
    });
    artifactState[phase][artifactDefn.id] = artifactPromise;
  }
}
async function collectArtifactDependencies(artifact, artifactsById) {
  if (!artifact.dependencies)
    return (
      /** @type {Dependencies} */
      {}
    );
  const dependencyPromises = Object.entries(artifact.dependencies).map(async ([dependencyName, dependency]) => {
    const dependencyArtifact = artifactsById[dependency.id];
    if (dependencyArtifact === void 0)
      throw new Error(`"${dependency.id}" did not run`);
    if (dependencyArtifact instanceof Error) {
      throw createDependencyError(dependency, dependencyArtifact);
    }
    const dependencyPromise = Promise.resolve().then(() => dependencyArtifact).catch((err) => Promise.reject(createDependencyError(dependency, err)));
    return [dependencyName, await dependencyPromise];
  });
  return Object.fromEntries(await Promise.all(dependencyPromises));
}
async function awaitArtifacts(artifactState) {
  const artifacts = {};
  for (const [id2, promise] of Object.entries(artifactState.getArtifact)) {
    const artifact = await promise.catch((err) => err);
    if (artifact !== void 0)
      artifacts[id2] = artifact;
  }
  return artifacts;
}
async function getBrowserVersion(session) {
  const status = { msg: "Getting browser version", id: "lh:gather:getVersion" };
  lighthouse_logger_default.time(status, "verbose");
  const version3 = await session.sendCommand("Browser.getVersion");
  const match = version3.product.match(/\/(\d+)/);
  const milestone = match ? parseInt(match[1]) : 0;
  lighthouse_logger_default.timeEnd(status);
  return Object.assign(version3, { milestone });
}
async function getBenchmarkIndex(executionContext) {
  const status = { msg: "Benchmarking machine", id: "lh:gather:getBenchmarkIndex" };
  lighthouse_logger_default.time(status);
  const indexVal = await executionContext.evaluate(pageFunctions.computeBenchmarkIndex, {
    args: []
  });
  lighthouse_logger_default.timeEnd(status);
  return indexVal;
}
async function getDevicePixelRatio(executionContext) {
  const status = { msg: "Host device pixel ratio", id: "lh:gather:getDevicePixelRatio" };
  lighthouse_logger_default.time(status);
  const indexVal = await executionContext.evaluate(() => devicePixelRatio, {
    args: []
  });
  lighthouse_logger_default.timeEnd(status);
  return indexVal;
}
function getSlowHostCpuWarning(context2) {
  const { settings, baseArtifacts } = context2;
  const { throttling: throttling32, throttlingMethod } = settings;
  const defaultThrottling22 = defaultSettings.throttling;
  if (settings.channel !== "cli")
    return;
  const isThrottledMethod = throttlingMethod === "simulate" || throttlingMethod === "devtools";
  const isDefaultMultiplier = throttling32.cpuSlowdownMultiplier === defaultThrottling22.cpuSlowdownMultiplier;
  if (!isThrottledMethod || !isDefaultMultiplier)
    return;
  if (baseArtifacts.BenchmarkIndex > SLOW_CPU_BENCHMARK_INDEX_THRESHOLD)
    return;
  return str_99(UIStrings119.warningSlowHostCpu);
}
function getEnvironmentWarnings(context2) {
  return [
    getSlowHostCpuWarning(context2)
  ].filter((s) => !!s);
}
async function getBaseArtifacts(resolvedConfig, driver, context2) {
  const BenchmarkIndex = await getBenchmarkIndex(driver.executionContext);
  const { userAgent, product } = await getBrowserVersion(driver.defaultSession);
  const HostDPR = await getDevicePixelRatio(driver.executionContext);
  return {
    // Meta artifacts.
    fetchTime: (/* @__PURE__ */ new Date()).toJSON(),
    Timing: [],
    LighthouseRunWarnings: [],
    settings: resolvedConfig.settings,
    // Environment artifacts that can always be computed.
    BenchmarkIndex,
    HostDPR,
    HostUserAgent: userAgent,
    HostFormFactor: userAgent.includes("Android") || userAgent.includes("Mobile") ? "mobile" : "desktop",
    HostProduct: product,
    // Contextual artifacts whose collection changes based on gather mode.
    URL: {
      finalDisplayedUrl: ""
    },
    PageLoadError: null,
    GatherContext: context2
  };
}
function deduplicateWarnings(warnings) {
  const unique = [];
  for (const warning of warnings) {
    if (unique.some((existing) => isEqual_default(warning, existing)))
      continue;
    unique.push(warning);
  }
  return unique;
}
function finalizeArtifacts(baseArtifacts, gathererArtifacts) {
  baseArtifacts.LighthouseRunWarnings.push(...getEnvironmentWarnings({ settings: baseArtifacts.settings, baseArtifacts }));
  const artifacts = (
    /** @type {LH.Artifacts} */
    { ...baseArtifacts, ...gathererArtifacts }
  );
  artifacts.Timing = lighthouse_logger_default.getTimeEntries();
  artifacts.LighthouseRunWarnings = deduplicateWarnings(baseArtifacts.LighthouseRunWarnings);
  if (artifacts.PageLoadError && !artifacts.URL.finalDisplayedUrl) {
    artifacts.URL.finalDisplayedUrl = artifacts.URL.requestedUrl || "";
  }
  if (!artifacts.URL.finalDisplayedUrl)
    throw new Error("Runner did not set finalDisplayedUrl");
  return artifacts;
}
async function snapshotGather(page, options2 = {}) {
  const { flags = {}, config: config32 } = options2;
  lighthouse_logger_default.setLevel(flags.logLevel || "error");
  const { resolvedConfig } = await initializeConfig("snapshot", config32, flags);
  const driver = new Driver(page);
  await driver.connect();
  const computedCache = /* @__PURE__ */ new Map();
  const url = await driver.url();
  const runnerOptions = { resolvedConfig, computedCache };
  const gatherFn = /* @__PURE__ */ __name(async () => {
    const baseArtifacts = await getBaseArtifacts(resolvedConfig, driver, { gatherMode: "snapshot" });
    baseArtifacts.URL = {
      finalDisplayedUrl: url
    };
    const artifactDefinitions = resolvedConfig.artifacts || [];
    const artifactState = getEmptyArtifactState();
    await collectPhaseArtifacts({
      phase: "getArtifact",
      gatherMode: "snapshot",
      driver,
      page,
      baseArtifacts,
      artifactDefinitions,
      artifactState,
      computedCache,
      settings: resolvedConfig.settings
    });
    await driver.disconnect();
    const artifacts2 = await awaitArtifacts(artifactState);
    return finalizeArtifacts(baseArtifacts, artifacts2);
  }, "gatherFn");
  const artifacts = await Runner.gather(gatherFn, runnerOptions);
  return { artifacts, runnerOptions };
}
async function clearDataForOrigin(session, url, clearStorageTypes) {
  const status = { msg: "Cleaning origin data", id: "lh:storage:clearDataForOrigin" };
  lighthouse_logger_default.time(status);
  const warnings = [];
  const origin = new URL(url).origin;
  const typesToClear = clearStorageTypes.join(",");
  session.setNextProtocolTimeout(5e3);
  try {
    await session.sendCommand("Storage.clearDataForOrigin", {
      origin,
      storageTypes: typesToClear
    });
  } catch (err) {
    if (
      /** @type {LH.LighthouseError} */
      err.code === "PROTOCOL_TIMEOUT"
    ) {
      lighthouse_logger_default.warn("Driver", "clearDataForOrigin timed out");
      warnings.push(str_100(UIStrings120.warningOriginDataTimeout));
    } else {
      throw err;
    }
  } finally {
    lighthouse_logger_default.timeEnd(status);
  }
  return warnings;
}
async function getImportantStorageWarning(session, url) {
  const usageData = await session.sendCommand("Storage.getUsageAndQuota", {
    origin: url
  });
  const storageTypeNames = {
    local_storage: "Local Storage",
    indexeddb: "IndexedDB",
    websql: "Web SQL"
  };
  const locations = usageData.usageBreakdown.filter((usage2) => usage2.usage).map((usage2) => storageTypeNames[usage2.storageType] || "").filter(Boolean);
  if (locations.length) {
    return str_100(UIStrings120.warningData, {
      locations: locations.join(", "),
      locationCount: locations.length
    });
  }
}
async function clearBrowserCaches(session) {
  const status = { msg: "Cleaning browser cache", id: "lh:storage:clearBrowserCaches" };
  lighthouse_logger_default.time(status);
  const warnings = [];
  try {
    await session.sendCommand("Network.clearBrowserCache");
    await session.sendCommand("Network.setCacheDisabled", { cacheDisabled: true });
    await session.sendCommand("Network.setCacheDisabled", { cacheDisabled: false });
  } catch (err) {
    if (
      /** @type {LH.LighthouseError} */
      err.code === "PROTOCOL_TIMEOUT"
    ) {
      lighthouse_logger_default.warn("Driver", "clearBrowserCaches timed out");
      warnings.push(str_100(UIStrings120.warningCacheTimeout));
    } else {
      throw err;
    }
  } finally {
    lighthouse_logger_default.timeEnd(status);
  }
  return warnings;
}
function parseUseragentIntoMetadata(fullVersion, formFactor) {
  const [version3] = fullVersion.split(".", 1);
  const brands = [
    { brand: "Chromium", version: version3 },
    { brand: "Google Chrome", version: version3 }
  ];
  const motoGPowerDetails = {
    platform: "Android",
    platformVersion: "11.0",
    architecture: "",
    model: "moto g power (2022)"
  };
  const macDesktopDetails = {
    platform: "macOS",
    platformVersion: "10.15.7",
    architecture: "x86",
    model: ""
  };
  const mobile = formFactor === "mobile";
  return {
    brands,
    fullVersion,
    // Since config users can supply a custom useragent, they likely are emulating something
    // other than Moto G Power and MacOS Desktop.
    // TODO: Determine how to thoughtfully expose this metadata/client-hints configurability.
    ...mobile ? motoGPowerDetails : macDesktopDetails,
    mobile
  };
}
async function matchHostUAVersion(session, userAgent) {
  const { milestone } = await getBrowserVersion(session);
  const tweakedUA = userAgent.replace(/(Chrome\/)[\d.]+/, `$1${milestone}.0.0.0`);
  const fullVersion = `${milestone}.0.0.0`;
  return { tweakedUA, fullVersion };
}
async function emulate(session, settings) {
  if (settings.emulatedUserAgent !== false) {
    const userAgent = (
      /** @type {string} */
      settings.emulatedUserAgent
    );
    const { tweakedUA, fullVersion } = await matchHostUAVersion(session, userAgent);
    await session.sendCommand("Network.setUserAgentOverride", {
      userAgent: tweakedUA,
      userAgentMetadata: parseUseragentIntoMetadata(fullVersion, settings.formFactor)
    });
  }
  if (settings.screenEmulation.disabled !== true) {
    const { width, height, deviceScaleFactor, mobile } = settings.screenEmulation;
    const params = { width, height, deviceScaleFactor, mobile };
    await session.sendCommand("Emulation.setDeviceMetricsOverride", params);
    await session.sendCommand("Emulation.setTouchEmulationEnabled", {
      enabled: params.mobile
    });
  }
}
async function throttle(session, settings) {
  if (settings.throttlingMethod !== "devtools")
    return clearNetworkThrottling(session);
  await Promise.all([
    enableNetworkThrottling(session, settings.throttling),
    enableCPUThrottling(session, settings.throttling)
  ]);
}
async function clearThrottling(session) {
  await Promise.all([clearNetworkThrottling(session), clearCPUThrottling(session)]);
}
function enableNetworkThrottling(session, throttlingSettings) {
  const conditions = {
    offline: false,
    latency: throttlingSettings.requestLatencyMs || 0,
    downloadThroughput: throttlingSettings.downloadThroughputKbps || 0,
    uploadThroughput: throttlingSettings.uploadThroughputKbps || 0
  };
  conditions.downloadThroughput = Math.floor(conditions.downloadThroughput * 1024 / 8);
  conditions.uploadThroughput = Math.floor(conditions.uploadThroughput * 1024 / 8);
  return session.sendCommand("Network.emulateNetworkConditions", conditions);
}
function clearNetworkThrottling(session) {
  return session.sendCommandAndIgnore("Network.emulateNetworkConditions", NO_THROTTLING_METRICS);
}
function enableCPUThrottling(session, throttlingSettings) {
  const rate = throttlingSettings.cpuSlowdownMultiplier;
  return session.sendCommand("Emulation.setCPUThrottlingRate", { rate });
}
function clearCPUThrottling(session) {
  return session.sendCommandAndIgnore("Emulation.setCPUThrottlingRate", NO_CPU_THROTTLE_METRICS);
}
async function enableAsyncStacks(session) {
  const enable = /* @__PURE__ */ __name(async () => {
    await session.sendCommand("Debugger.enable");
    await session.sendCommand("Debugger.setSkipAllPauses", { skip: true });
    await session.sendCommand("Debugger.setAsyncCallStackDepth", { maxDepth: 8 });
  }, "enable");
  function onDebuggerPaused() {
    session.sendCommand("Debugger.resume");
  }
  __name(onDebuggerPaused, "onDebuggerPaused");
  function onFrameNavigated(event) {
    if (event.frame.parentId)
      return;
    enable().catch((err) => lighthouse_logger_default.error("Driver", err));
  }
  __name(onFrameNavigated, "onFrameNavigated");
  session.on("Debugger.paused", onDebuggerPaused);
  session.on("Page.frameNavigated", onFrameNavigated);
  await enable();
  return async () => {
    await session.sendCommandAndIgnore("Debugger.disable");
    session.off("Debugger.paused", onDebuggerPaused);
    session.off("Page.frameNavigated", onFrameNavigated);
  };
}
async function shimRequestIdleCallbackOnNewDocument(driver, settings) {
  await driver.executionContext.evaluateOnNewDocument(pageFunctions.wrapRequestIdleCallback, {
    args: [settings.throttling.cpuSlowdownMultiplier]
  });
}
async function dismissJavaScriptDialogs(session) {
  session.on("Page.javascriptDialogOpening", (data312) => {
    lighthouse_logger_default.warn("Driver", `${data312.type} dialog opened by the page automatically suppressed.`);
    session.sendCommand("Page.handleJavaScriptDialog", {
      accept: true,
      promptText: "Lighthouse prompt response"
    }).catch((err) => lighthouse_logger_default.warn("Driver", err));
  });
  await session.sendCommand("Page.enable");
}
async function resetStorageForUrl(session, url, clearStorageTypes) {
  const warnings = [];
  const clearDataWarnings = await clearDataForOrigin(session, url, clearStorageTypes);
  warnings.push(...clearDataWarnings);
  const clearCacheWarnings = await clearBrowserCaches(session);
  warnings.push(...clearCacheWarnings);
  const importantStorageWarning = await getImportantStorageWarning(session, url);
  if (importantStorageWarning)
    warnings.push(importantStorageWarning);
  return { warnings };
}
async function prepareThrottlingAndNetwork(session, settings) {
  const status = { msg: "Preparing network conditions", id: `lh:gather:prepareThrottlingAndNetwork` };
  lighthouse_logger_default.time(status);
  await throttle(session, settings);
  const blockedUrls = settings.blockedUrlPatterns || [];
  await session.sendCommand("Network.setBlockedURLs", { urls: blockedUrls });
  const headers = settings.extraHeaders;
  if (headers)
    await session.sendCommand("Network.setExtraHTTPHeaders", { headers });
  lighthouse_logger_default.timeEnd(status);
}
async function prepareDeviceEmulation(driver, settings) {
  await driver.defaultSession.sendCommand("Network.enable");
  await emulate(driver.defaultSession, settings);
}
async function warmUpIntlSegmenter(driver) {
  await driver.executionContext.evaluate(pageFunctions.truncate, {
    args: ["aaa", 2]
  });
}
async function prepareTargetForNavigationMode(driver, settings, requestor) {
  const status = { msg: "Preparing target for navigation mode", id: "lh:prepare:navigationMode" };
  lighthouse_logger_default.time(status);
  const warnings = [];
  await prepareDeviceEmulation(driver, settings);
  await dismissJavaScriptDialogs(driver.defaultSession);
  await driver.executionContext.cacheNativesOnNewDocument();
  if (settings.throttlingMethod === "simulate") {
    await shimRequestIdleCallbackOnNewDocument(driver, settings);
  }
  await warmUpIntlSegmenter(driver);
  const shouldResetStorage = !settings.disableStorageReset && // Without prior knowledge of the destination, we cannot know which URL to clear storage for.
  typeof requestor === "string";
  if (shouldResetStorage) {
    const { warnings: storageWarnings } = await resetStorageForUrl(driver.defaultSession, requestor, settings.clearStorageTypes);
    warnings.push(...storageWarnings);
  }
  await prepareThrottlingAndNetwork(driver.defaultSession, settings);
  lighthouse_logger_default.timeEnd(status);
  return { warnings };
}
function waitForNothing() {
  return { promise: Promise.resolve(), cancel() {
  } };
}
function waitForFrameNavigated(session) {
  let cancel = /* @__PURE__ */ __name(() => {
    throw new Error("waitForFrameNavigated.cancel() called before it was defined");
  }, "cancel");
  const promise = new Promise((resolve2, reject) => {
    session.once("Page.frameNavigated", resolve2);
    cancel = /* @__PURE__ */ __name(() => {
      session.off("Page.frameNavigated", resolve2);
      reject(new Error("Wait for navigated cancelled"));
    }, "cancel");
  });
  return { promise, cancel };
}
function waitForFcp(session, pauseAfterFcpMs, maxWaitForFcpMs) {
  let cancel = /* @__PURE__ */ __name(() => {
    throw new Error("waitForFcp.cancel() called before it was defined");
  }, "cancel");
  const promise = new Promise((resolve2, reject) => {
    const maxWaitTimeout = setTimeout(() => {
      reject(new LighthouseError(LighthouseError.errors.NO_FCP));
    }, maxWaitForFcpMs);
    let loadTimeout;
    const lifecycleListener = /* @__PURE__ */ __name((e) => {
      if (e.name === "firstContentfulPaint") {
        loadTimeout = setTimeout(() => {
          resolve2();
          cancel();
        }, pauseAfterFcpMs);
      }
    }, "lifecycleListener");
    session.on("Page.lifecycleEvent", lifecycleListener);
    let canceled = false;
    cancel = /* @__PURE__ */ __name(() => {
      if (canceled)
        return;
      canceled = true;
      session.off("Page.lifecycleEvent", lifecycleListener);
      maxWaitTimeout && clearTimeout(maxWaitTimeout);
      loadTimeout && clearTimeout(loadTimeout);
      reject(new Error("Wait for FCP canceled"));
    }, "cancel");
  });
  return {
    promise,
    cancel
  };
}
function waitForNetworkIdle(session, networkMonitor, networkQuietOptions) {
  let hasDCLFired = false;
  let idleTimeout;
  let cancel = /* @__PURE__ */ __name(() => {
    throw new Error("waitForNetworkIdle.cancel() called before it was defined");
  }, "cancel");
  const { networkQuietThresholdMs, busyEvent, idleEvent, isIdle } = networkQuietOptions;
  const promise = new Promise((resolve2, reject) => {
    const onIdle = /* @__PURE__ */ __name(() => {
      networkMonitor.once(busyEvent, onBusy);
      idleTimeout = setTimeout(() => {
        cancel();
        resolve2();
      }, networkQuietThresholdMs);
    }, "onIdle");
    const onBusy = /* @__PURE__ */ __name(() => {
      networkMonitor.once(idleEvent, onIdle);
      idleTimeout && clearTimeout(idleTimeout);
    }, "onBusy");
    const domContentLoadedListener = /* @__PURE__ */ __name(() => {
      hasDCLFired = true;
      if (isIdle(networkMonitor)) {
        onIdle();
      } else {
        onBusy();
      }
    }, "domContentLoadedListener");
    const logStatus = /* @__PURE__ */ __name(() => {
      if (!hasDCLFired) {
        lighthouse_logger_default.verbose("waitFor", "Waiting on DomContentLoaded");
        return;
      }
      const inflightRecords = networkMonitor.getInflightRequests();
      if (lighthouse_logger_default.isVerbose() && inflightRecords.length < 20 && inflightRecords.length > 0) {
        lighthouse_logger_default.verbose("waitFor", `=== Waiting on ${inflightRecords.length} requests to finish`);
        for (const record2 of inflightRecords) {
          lighthouse_logger_default.verbose("waitFor", `Waiting on ${record2.url.slice(0, 120)} to finish`);
        }
      }
    }, "logStatus");
    networkMonitor.on("requeststarted", logStatus);
    networkMonitor.on("requestfinished", logStatus);
    networkMonitor.on(busyEvent, logStatus);
    if (!networkQuietOptions.pretendDCLAlreadyFired) {
      session.once("Page.domContentEventFired", domContentLoadedListener);
    } else {
      domContentLoadedListener();
    }
    let canceled = false;
    cancel = /* @__PURE__ */ __name(() => {
      if (canceled)
        return;
      canceled = true;
      if (idleTimeout)
        clearTimeout(idleTimeout);
      if (!networkQuietOptions.pretendDCLAlreadyFired) {
        session.off("Page.domContentEventFired", domContentLoadedListener);
      }
      networkMonitor.removeListener(busyEvent, onBusy);
      networkMonitor.removeListener(idleEvent, onIdle);
      networkMonitor.removeListener("requeststarted", logStatus);
      networkMonitor.removeListener("requestfinished", logStatus);
      networkMonitor.removeListener(busyEvent, logStatus);
    }, "cancel");
  });
  return {
    promise,
    cancel
  };
}
function waitForCPUIdle(session, waitForCPUQuiet) {
  if (!waitForCPUQuiet) {
    return {
      promise: Promise.resolve(),
      cancel: /* @__PURE__ */ __name(() => void 0, "cancel")
    };
  }
  let lastTimeout;
  let canceled = false;
  async function checkForQuiet(executionContext2, resolve2) {
    if (canceled)
      return;
    const timeSinceLongTask = await executionContext2.evaluate(checkTimeSinceLastLongTaskInPage, { args: [], useIsolation: true });
    if (canceled)
      return;
    if (typeof timeSinceLongTask === "number") {
      if (timeSinceLongTask >= waitForCPUQuiet) {
        lighthouse_logger_default.verbose("waitFor", `CPU has been idle for ${timeSinceLongTask} ms`);
        resolve2();
      } else {
        lighthouse_logger_default.verbose("waitFor", `CPU has been idle for ${timeSinceLongTask} ms`);
        const timeToWait = waitForCPUQuiet - timeSinceLongTask;
        lastTimeout = setTimeout(() => checkForQuiet(executionContext2, resolve2), timeToWait);
      }
    }
  }
  __name(checkForQuiet, "checkForQuiet");
  let cancel = /* @__PURE__ */ __name(() => {
    throw new Error("waitForCPUIdle.cancel() called before it was defined");
  }, "cancel");
  const executionContext = new ExecutionContext(session);
  const promise = new Promise((resolve2, reject) => {
    executionContext.evaluate(registerPerformanceObserverInPage, { args: [], useIsolation: true }).then(() => checkForQuiet(executionContext, resolve2)).catch(reject);
    cancel = /* @__PURE__ */ __name(() => {
      if (canceled)
        return;
      canceled = true;
      if (lastTimeout)
        clearTimeout(lastTimeout);
      reject(new Error("Wait for CPU idle canceled"));
    }, "cancel");
  });
  return {
    promise,
    cancel
  };
}
function registerPerformanceObserverInPage() {
  if (window.____lastLongTask !== void 0)
    return;
  window.____lastLongTask = performance.now();
  const observer = new window.PerformanceObserver((entryList) => {
    const entries = entryList.getEntries();
    for (const entry of entries) {
      if (entry.entryType === "longtask") {
        const taskEnd = entry.startTime + entry.duration;
        window.____lastLongTask = Math.max(window.____lastLongTask || 0, taskEnd);
      }
    }
  });
  observer.observe({ type: "longtask", buffered: true });
}
function checkTimeSinceLastLongTaskInPage() {
  return new Promise((resolve2) => {
    const firstAttemptTs = performance.now();
    const firstAttemptLastLongTaskTs = window.____lastLongTask || 0;
    setTimeout(() => {
      const secondAttemptLastLongTaskTs = window.____lastLongTask || 0;
      const timeSinceLongTask = firstAttemptLastLongTaskTs === secondAttemptLastLongTaskTs ? (
        // The time of the last long task hasn't changed, the information from our first attempt is accurate.
        firstAttemptTs - firstAttemptLastLongTaskTs
      ) : (
        // The time of the last long task *did* change, we can't really trust the information we have.
        0
      );
      resolve2(timeSinceLongTask);
    }, 150);
  });
}
function waitForLoadEvent(session, pauseAfterLoadMs) {
  let cancel = /* @__PURE__ */ __name(() => {
    throw new Error("waitForLoadEvent.cancel() called before it was defined");
  }, "cancel");
  const promise = new Promise((resolve2, reject) => {
    let loadTimeout;
    const loadListener = /* @__PURE__ */ __name(function() {
      loadTimeout = setTimeout(resolve2, pauseAfterLoadMs);
    }, "loadListener");
    session.once("Page.loadEventFired", loadListener);
    let canceled = false;
    cancel = /* @__PURE__ */ __name(() => {
      if (canceled)
        return;
      canceled = true;
      session.off("Page.loadEventFired", loadListener);
      loadTimeout && clearTimeout(loadTimeout);
    }, "cancel");
  });
  return {
    promise,
    cancel
  };
}
async function isPageHung(session) {
  try {
    session.setNextProtocolTimeout(1e3);
    await session.sendCommand("Runtime.evaluate", {
      expression: '"ping"',
      returnByValue: true,
      timeout: 1e3
    });
    return false;
  } catch (err) {
    return true;
  }
}
async function waitForFullyLoaded(session, networkMonitor, options2) {
  const { pauseAfterFcpMs, pauseAfterLoadMs, networkQuietThresholdMs, cpuQuietThresholdMs, maxWaitForLoadedMs, maxWaitForFcpMs } = options2;
  const { waitForFcp: waitForFcp2, waitForLoadEvent: waitForLoadEvent2, waitForNetworkIdle: waitForNetworkIdle2, waitForCPUIdle: waitForCPUIdle2 } = options2._waitForTestOverrides || DEFAULT_WAIT_FUNCTIONS;
  let maxTimeoutHandle;
  const resolveOnFcp = maxWaitForFcpMs ? waitForFcp2(session, pauseAfterFcpMs, maxWaitForFcpMs) : waitForNothing();
  const resolveOnLoadEvent = waitForLoadEvent2(session, pauseAfterLoadMs);
  const resolveOnNetworkIdle = waitForNetworkIdle2(session, networkMonitor, {
    networkQuietThresholdMs,
    busyEvent: "network-2-busy",
    idleEvent: "network-2-idle",
    isIdle: /* @__PURE__ */ __name((recorder) => recorder.is2Idle(), "isIdle")
  });
  const resolveOnCriticalNetworkIdle = waitForNetworkIdle2(session, networkMonitor, {
    networkQuietThresholdMs,
    busyEvent: "network-critical-busy",
    idleEvent: "network-critical-idle",
    isIdle: /* @__PURE__ */ __name((recorder) => recorder.isCriticalIdle(), "isIdle")
  });
  let resolveOnCPUIdle = waitForNothing();
  if (lighthouse_logger_default.isVerbose()) {
    resolveOnFcp.promise.then(() => {
      lighthouse_logger_default.verbose("waitFor", "resolveOnFcp fired");
    });
    resolveOnLoadEvent.promise.then(() => {
      lighthouse_logger_default.verbose("waitFor", "resolveOnLoadEvent fired");
    });
    resolveOnNetworkIdle.promise.then(() => {
      lighthouse_logger_default.verbose("waitFor", "resolveOnNetworkIdle fired");
    });
    resolveOnCriticalNetworkIdle.promise.then(() => {
      lighthouse_logger_default.verbose("waitFor", "resolveOnCriticalNetworkIdle fired");
    });
  }
  const loadPromise = Promise.all([
    resolveOnFcp.promise,
    resolveOnLoadEvent.promise,
    resolveOnNetworkIdle.promise,
    resolveOnCriticalNetworkIdle.promise
  ]).then(() => {
    resolveOnCPUIdle = waitForCPUIdle2(session, cpuQuietThresholdMs);
    return resolveOnCPUIdle.promise;
  }).then(() => {
    const cleanupFn2 = /* @__PURE__ */ __name(async function() {
      lighthouse_logger_default.verbose("waitFor", "loadEventFired and network considered idle");
      return { timedOut: false };
    }, "cleanupFn");
    return cleanupFn2;
  }).catch((err) => {
    return function() {
      throw err;
    };
  });
  const maxTimeoutPromise = new Promise((resolve2, reject) => {
    maxTimeoutHandle = setTimeout(resolve2, maxWaitForLoadedMs);
  }).then((_) => {
    return async () => {
      lighthouse_logger_default.warn("waitFor", "Timed out waiting for page load. Checking if page is hung...");
      if (await isPageHung(session)) {
        lighthouse_logger_default.warn("waitFor", "Page appears to be hung, killing JavaScript...");
        void session.sendCommandAndIgnore("Emulation.setScriptExecutionDisabled", { value: true });
        void session.sendCommandAndIgnore("Runtime.terminateExecution");
        throw new LighthouseError(LighthouseError.errors.PAGE_HUNG);
      }
      const inflightRequestUrls = networkMonitor.getInflightRequests().map((request3) => request3.url);
      if (inflightRequestUrls.length > 0) {
        lighthouse_logger_default.warn("waitFor", "Remaining inflight requests URLs", inflightRequestUrls);
      }
      return { timedOut: true };
    };
  });
  const cleanupFn = await Promise.race([
    loadPromise,
    maxTimeoutPromise
  ]);
  maxTimeoutHandle && clearTimeout(maxTimeoutHandle);
  resolveOnFcp.cancel();
  resolveOnLoadEvent.cancel();
  resolveOnNetworkIdle.cancel();
  resolveOnCPUIdle.cancel();
  return cleanupFn();
}
function waitForUserToContinue(driver) {
  function createInPagePromise() {
    let resolve2 = /* @__PURE__ */ __name(() => {
    }, "resolve");
    const promise = new Promise((r) => resolve2 = r);
    console.log([
      `You have enabled Lighthouse navigation debug mode.`,
      `When you have finished inspecting the page, evaluate "continueLighthouseRun()"`,
      `in the console to continue with the Lighthouse run.`
    ].join(" "));
    window.continueLighthouseRun = resolve2;
    return promise;
  }
  __name(createInPagePromise, "createInPagePromise");
  driver.defaultSession.setNextProtocolTimeout(Infinity);
  return driver.executionContext.evaluate(createInPagePromise, { args: [] });
}
function resolveWaitForFullyLoadedOptions(options2) {
  let { pauseAfterFcpMs, pauseAfterLoadMs, networkQuietThresholdMs, cpuQuietThresholdMs } = options2;
  let maxWaitMs = options2.maxWaitForLoad;
  let maxFCPMs = options2.maxWaitForFcp;
  if (typeof pauseAfterFcpMs !== "number")
    pauseAfterFcpMs = DEFAULT_PAUSE_AFTER_FCP;
  if (typeof pauseAfterLoadMs !== "number")
    pauseAfterLoadMs = DEFAULT_PAUSE_AFTER_LOAD;
  if (typeof networkQuietThresholdMs !== "number") {
    networkQuietThresholdMs = DEFAULT_NETWORK_QUIET_THRESHOLD;
  }
  if (typeof cpuQuietThresholdMs !== "number")
    cpuQuietThresholdMs = DEFAULT_CPU_QUIET_THRESHOLD;
  if (typeof maxWaitMs !== "number")
    maxWaitMs = defaultSettings.maxWaitForLoad;
  if (typeof maxFCPMs !== "number")
    maxFCPMs = defaultSettings.maxWaitForFcp;
  if (!options2.waitUntil.includes("fcp"))
    maxFCPMs = void 0;
  return {
    pauseAfterFcpMs,
    pauseAfterLoadMs,
    networkQuietThresholdMs,
    cpuQuietThresholdMs,
    maxWaitForLoadedMs: maxWaitMs,
    maxWaitForFcpMs: maxFCPMs
  };
}
async function gotoURL(driver, requestor, options2) {
  const status = typeof requestor === "string" ? { msg: `Navigating to ${requestor}`, id: "lh:driver:navigate" } : { msg: "Navigating using a user defined function", id: "lh:driver:navigate" };
  lighthouse_logger_default.time(status);
  const session = driver.defaultSession;
  const networkMonitor = driver.networkMonitor;
  await session.sendCommand("Page.enable");
  await session.sendCommand("Page.setLifecycleEventsEnabled", { enabled: true });
  let waitForNavigationTriggered;
  if (typeof requestor === "string") {
    session.setNextProtocolTimeout(Infinity);
    waitForNavigationTriggered = session.sendCommand("Page.navigate", { url: requestor });
  } else {
    waitForNavigationTriggered = requestor();
  }
  const waitForNavigated = options2.waitUntil.includes("navigated");
  const waitForLoad = options2.waitUntil.includes("load");
  const waitForFcp2 = options2.waitUntil.includes("fcp");
  const waitConditionPromises = [];
  if (waitForNavigated) {
    const navigatedPromise = waitForFrameNavigated(session).promise;
    waitConditionPromises.push(navigatedPromise.then(() => ({ timedOut: false })));
  }
  if (waitForLoad) {
    const waitOptions = resolveWaitForFullyLoadedOptions(options2);
    waitConditionPromises.push(waitForFullyLoaded(session, networkMonitor, waitOptions));
  } else if (waitForFcp2) {
    throw new Error("Cannot wait for FCP without waiting for page load");
  }
  const waitConditions = await Promise.race([
    session.onCrashPromise(),
    Promise.all(waitConditionPromises)
  ]);
  const timedOut = waitConditions.some((condition) => condition.timedOut);
  const navigationUrls = await networkMonitor.getNavigationUrls();
  let requestedUrl = navigationUrls.requestedUrl;
  if (typeof requestor === "string") {
    if (requestedUrl && !url_utils_default.equalWithExcludedFragments(requestor, requestedUrl)) {
      lighthouse_logger_default.error("Navigation", `Provided URL (${requestor}) did not match initial navigation URL (${requestedUrl})`);
    }
    requestedUrl = requestor;
  }
  if (!requestedUrl)
    throw Error("No navigations detected when running user defined requestor.");
  const mainDocumentUrl = navigationUrls.mainDocumentUrl || requestedUrl;
  await waitForNavigationTriggered;
  if (options2.debugNavigation) {
    await waitForUserToContinue(driver);
  }
  lighthouse_logger_default.timeEnd(status);
  return {
    requestedUrl,
    mainDocumentUrl,
    warnings: getNavigationWarnings({ timedOut, mainDocumentUrl, requestedUrl })
  };
}
function getNavigationWarnings(navigation2) {
  const { requestedUrl, mainDocumentUrl } = navigation2;
  const warnings = [];
  if (navigation2.timedOut)
    warnings.push(str_102(UIStrings122.warningTimeout));
  if (!url_utils_default.equalWithExcludedFragments(requestedUrl, mainDocumentUrl)) {
    warnings.push(str_102(UIStrings122.warningRedirected, {
      requested: requestedUrl,
      final: mainDocumentUrl
    }));
  }
  return warnings;
}
function getNetworkError(mainRecord, context2) {
  if (!mainRecord) {
    return new LighthouseError(LighthouseError.errors.NO_DOCUMENT_REQUEST);
  } else if (mainRecord.failed) {
    const netErr = mainRecord.localizedFailDescription;
    if (netErr === "net::ERR_NAME_NOT_RESOLVED" || netErr === "net::ERR_NAME_RESOLUTION_FAILED" || netErr.startsWith("net::ERR_DNS_")) {
      return new LighthouseError(LighthouseError.errors.DNS_FAILURE);
    } else {
      return new LighthouseError(LighthouseError.errors.FAILED_DOCUMENT_REQUEST, { errorDetails: netErr });
    }
  } else if (mainRecord.hasErrorStatusCode()) {
    if (context2.ignoreStatusCode) {
      context2.warnings.push(str_103(UIStrings123.warningStatusCode, { errorCode: mainRecord.statusCode }));
    } else {
      return new LighthouseError(LighthouseError.errors.ERRORED_DOCUMENT_REQUEST, {
        statusCode: `${mainRecord.statusCode}`
      });
    }
  }
}
function getInterstitialError(mainRecord, networkRecords) {
  if (!mainRecord)
    return void 0;
  const interstitialRequest = networkRecords.find((record2) => record2.documentURL.startsWith("chrome-error://"));
  if (!interstitialRequest)
    return void 0;
  if (!mainRecord.failed)
    return void 0;
  if (mainRecord.localizedFailDescription.startsWith("net::ERR_CERT")) {
    return new LighthouseError(LighthouseError.errors.INSECURE_DOCUMENT_REQUEST, {
      securityMessages: mainRecord.localizedFailDescription
    });
  }
  return new LighthouseError(LighthouseError.errors.CHROME_INTERSTITIAL_ERROR);
}
function getNonHtmlError(finalRecord) {
  if (!finalRecord)
    return void 0;
  if (!finalRecord.mimeType || finalRecord.statusCode === -1)
    return void 0;
  if (finalRecord.mimeType !== HTML_MIME_TYPE && finalRecord.mimeType !== XHTML_MIME_TYPE) {
    return new LighthouseError(LighthouseError.errors.NOT_HTML, {
      mimeType: finalRecord.mimeType
    });
  }
  return void 0;
}
function getPageLoadError(navigationError, context2) {
  const { url, networkRecords } = context2;
  let mainRecord = core_exports.NetworkAnalyzer.findResourceForUrl(networkRecords, url);
  if (!mainRecord) {
    const documentRequests = networkRecords.filter((record2) => record2.resourceType === NetworkRequest.TYPES.Document);
    if (documentRequests.length) {
      mainRecord = documentRequests.reduce((min, r) => {
        return r.networkRequestTime < min.networkRequestTime ? r : min;
      });
    }
  }
  let finalRecord;
  if (mainRecord) {
    finalRecord = core_exports.NetworkAnalyzer.resolveRedirects(mainRecord);
  } else {
    return navigationError;
  }
  if (finalRecord?.mimeType === XHTML_MIME_TYPE) {
    context2.warnings.push(str_103(UIStrings123.warningXhtml));
  }
  const networkError = getNetworkError(mainRecord, context2);
  const interstitialError = getInterstitialError(mainRecord, networkRecords);
  const nonHtmlError = getNonHtmlError(finalRecord);
  if (interstitialError)
    return interstitialError;
  if (networkError)
    return networkError;
  if (nonHtmlError)
    return nonHtmlError;
  return navigationError;
}
async function _setup({ driver, resolvedConfig, requestor }) {
  await driver.connect();
  if (typeof requestor === "string" && !resolvedConfig.settings.skipAboutBlank) {
    await driver._networkMonitor?.disable();
    await gotoURL(driver, resolvedConfig.settings.blankPage, { waitUntil: ["navigated"] });
    await driver._networkMonitor?.enable();
  }
  const baseArtifacts = await getBaseArtifacts(resolvedConfig, driver, { gatherMode: "navigation" });
  const { warnings } = await prepareTargetForNavigationMode(driver, resolvedConfig.settings, requestor);
  baseArtifacts.LighthouseRunWarnings.push(...warnings);
  return { baseArtifacts };
}
async function _cleanupNavigation({ driver }) {
  await clearThrottling(driver.defaultSession);
}
async function _navigate(navigationContext) {
  const { driver, resolvedConfig, requestor } = navigationContext;
  try {
    const { requestedUrl, mainDocumentUrl, warnings } = await gotoURL(driver, requestor, {
      ...resolvedConfig.settings,
      waitUntil: resolvedConfig.settings.pauseAfterFcpMs ? ["fcp", "load"] : ["load"]
    });
    navigationContext.baseArtifacts.LighthouseRunWarnings.push(...warnings);
    return { requestedUrl, mainDocumentUrl, navigationError: void 0 };
  } catch (err) {
    if (!(err instanceof LighthouseError))
      throw err;
    if (err.code !== "NO_FCP" && err.code !== "PAGE_HUNG" && err.code !== "TARGET_CRASHED") {
      throw err;
    }
    if (typeof requestor !== "string")
      throw err;
    return {
      requestedUrl: requestor,
      mainDocumentUrl: requestor,
      navigationError: err
    };
  }
}
async function _collectDebugData(navigationContext, phaseState) {
  let devtoolsLog;
  let trace2;
  for (const definition of phaseState.artifactDefinitions) {
    const { instance: instance2 } = definition.gatherer;
    if (instance2 instanceof devtools_log_default) {
      devtoolsLog = instance2.getDebugData();
    } else if (instance2 instanceof trace_default) {
      trace2 = instance2.getDebugData();
    }
  }
  const records = devtoolsLog && await NetworkRecordsComputed.request(devtoolsLog, navigationContext);
  return { devtoolsLog, records, trace: trace2 };
}
async function _computeNavigationResult(navigationContext, phaseState, navigateResult) {
  const { navigationError, requestedUrl, mainDocumentUrl } = navigateResult;
  const debugData = await _collectDebugData(navigationContext, phaseState);
  const pageLoadError = debugData.records ? getPageLoadError(navigationError, {
    url: mainDocumentUrl,
    ignoreStatusCode: navigationContext.resolvedConfig.settings.ignoreStatusCode,
    networkRecords: debugData.records,
    warnings: navigationContext.baseArtifacts.LighthouseRunWarnings
  }) : navigationError;
  if (pageLoadError) {
    const locale = navigationContext.resolvedConfig.settings.locale;
    const localizedMessage = getFormatted(pageLoadError.friendlyMessage, locale);
    lighthouse_logger_default.error("NavigationRunner", localizedMessage, requestedUrl);
    const artifacts = {};
    if (debugData.devtoolsLog) {
      artifacts.DevtoolsLogError = debugData.devtoolsLog;
    }
    if (debugData.trace) {
      artifacts.TraceError = debugData.trace;
    }
    navigationContext.baseArtifacts.LighthouseRunWarnings.push(pageLoadError.friendlyMessage);
    navigationContext.baseArtifacts.PageLoadError = pageLoadError;
    return artifacts;
  } else {
    await collectPhaseArtifacts({ phase: "getArtifact", ...phaseState });
    return await awaitArtifacts(phaseState.artifactState);
  }
}
async function _navigation(navigationContext) {
  if (!navigationContext.resolvedConfig.artifacts) {
    throw new Error("No artifacts were defined on the config");
  }
  const artifactState = getEmptyArtifactState();
  const phaseState = {
    url: await navigationContext.driver.url(),
    gatherMode: (
      /** @type {const} */
      "navigation"
    ),
    driver: navigationContext.driver,
    page: navigationContext.page,
    computedCache: navigationContext.computedCache,
    artifactDefinitions: navigationContext.resolvedConfig.artifacts,
    artifactState,
    baseArtifacts: navigationContext.baseArtifacts,
    settings: navigationContext.resolvedConfig.settings
  };
  const disableAsyncStacks = await enableAsyncStacks(navigationContext.driver.defaultSession);
  await collectPhaseArtifacts({ phase: "startInstrumentation", ...phaseState });
  await collectPhaseArtifacts({ phase: "startSensitiveInstrumentation", ...phaseState });
  const navigateResult = await _navigate(navigationContext);
  if (!Object.values(phaseState.baseArtifacts.URL).every(Boolean)) {
    phaseState.baseArtifacts.URL = {
      requestedUrl: navigateResult.requestedUrl,
      mainDocumentUrl: navigateResult.mainDocumentUrl,
      finalDisplayedUrl: await navigationContext.driver.url()
    };
  }
  phaseState.url = navigateResult.mainDocumentUrl;
  await collectPhaseArtifacts({ phase: "stopSensitiveInstrumentation", ...phaseState });
  await collectPhaseArtifacts({ phase: "stopInstrumentation", ...phaseState });
  await disableAsyncStacks();
  await _cleanupNavigation(navigationContext);
  return _computeNavigationResult(navigationContext, phaseState, navigateResult);
}
async function _cleanup({ requestedUrl, driver, resolvedConfig, lhBrowser, lhPage }) {
  const didResetStorage = !resolvedConfig.settings.disableStorageReset && requestedUrl;
  if (didResetStorage) {
    await clearDataForOrigin(driver.defaultSession, requestedUrl, resolvedConfig.settings.clearStorageTypes);
  }
  await driver.disconnect();
  await lhPage?.close();
  await lhBrowser?.disconnect();
}
async function navigationGather(page, requestor, options2 = {}) {
  const { flags = {}, config: config32 } = options2;
  lighthouse_logger_default.setLevel(flags.logLevel || "error");
  const { resolvedConfig } = await initializeConfig("navigation", config32, flags);
  const computedCache = /* @__PURE__ */ new Map();
  const isCallback = typeof requestor === "function";
  const runnerOptions = { resolvedConfig, computedCache };
  const gatherFn = /* @__PURE__ */ __name(async () => {
    const normalizedRequestor = isCallback ? requestor : url_utils_default.normalizeUrl(requestor);
    let lhBrowser = void 0;
    let lhPage = void 0;
    if (!page) {
      const { hostname: hostname2 = DEFAULT_HOSTNAME, port = DEFAULT_PORT } = flags;
      lhBrowser = await puppeteer_core_default.connect({ browserURL: `http://${hostname2}:${port}`, defaultViewport: null });
      lhPage = await lhBrowser.newPage();
      page = lhPage;
    }
    const driver = new Driver(page);
    const context2 = {
      driver,
      lhBrowser,
      lhPage,
      page,
      resolvedConfig,
      requestor: normalizedRequestor,
      computedCache
    };
    const { baseArtifacts } = await _setup(context2);
    const artifacts2 = await _navigation({ ...context2, baseArtifacts });
    await _cleanup(context2);
    return finalizeArtifacts(baseArtifacts, artifacts2);
  }, "gatherFn");
  const artifacts = await Runner.gather(gatherFn, runnerOptions);
  return { artifacts, runnerOptions };
}
async function navigation(page, requestor, options2) {
  const gatherResult = await navigationGather(page, requestor, options2);
  return Runner.audit(gatherResult.artifacts, gatherResult.runnerOptions);
}
async function snapshot(page, options2) {
  const gatherResult = await snapshotGather(page, options2);
  return Runner.audit(gatherResult.artifacts, gatherResult.runnerOptions);
}
function generateReport(result, format2 = "html") {
  const reportOutput = ReportGenerator.generateReport(result, format2);
  if (Array.isArray(reportOutput)) {
    return reportOutput[0];
  } else {
    return reportOutput;
  }
}
var __create, __defProp2, __getOwnPropDesc, __getOwnPropNames2, __getProtoOf, __hasOwnProp, __name, __esm2, __commonJS, __export2, __copyProps, __toESM, __toCommonJS, init_process_global, init_lh, BaseGatherer, base_gatherer_default, init_base_gatherer, trace_exports, ShimGatherer, trace_default, init_trace, require_ms, require_common, require_browser, require_marky_cjs, import_debug, marky, isWindows, isBrowser, colors, Emitter, loggersByTitle, loggingBufferColumns, level_, Log, lighthouse_logger_default, init_lighthouse_logger, freeGlobal, freeGlobal_default, init_freeGlobal, freeSelf, root, root_default, init_root, Symbol2, Symbol_default, init_Symbol, objectProto, hasOwnProperty, nativeObjectToString, symToStringTag, getRawTag_default, init_getRawTag, objectProto2, nativeObjectToString2, objectToString_default, init_objectToString, nullTag, undefinedTag, symToStringTag2, baseGetTag_default, init_baseGetTag, isObjectLike_default, init_isObjectLike, isArray, isArray_default, init_isArray, isObject_default, init_isObject, asyncTag, funcTag, genTag, proxyTag, isFunction_default, init_isFunction, coreJsData, coreJsData_default, init_coreJsData, maskSrcKey, isMasked_default, init_isMasked, funcProto, funcToString, toSource_default, init_toSource, reRegExpChar, reIsHostCtor, funcProto2, objectProto3, funcToString2, hasOwnProperty2, reIsNative, baseIsNative_default, init_baseIsNative, getValue_default, init_getValue, getNative_default, init_getNative, WeakMap2, WeakMap_default, init_WeakMap, MAX_SAFE_INTEGER, reIsUint, isIndex_default, init_isIndex, eq_default, init_eq, MAX_SAFE_INTEGER2, isLength_default, init_isLength, isArrayLike_default, init_isArrayLike, objectProto4, isPrototype_default, init_isPrototype, baseTimes_default, init_baseTimes, argsTag, baseIsArguments_default, init_baseIsArguments, objectProto5, hasOwnProperty3, propertyIsEnumerable, isArguments, isArguments_default, init_isArguments, stubFalse_default, init_stubFalse, freeExports, freeModule, moduleExports, Buffer2, nativeIsBuffer, isBuffer, isBuffer_default, init_isBuffer, argsTag2, arrayTag, boolTag, dateTag, errorTag, funcTag2, mapTag, numberTag, objectTag, regexpTag, setTag, stringTag, weakMapTag, arrayBufferTag, dataViewTag, float32Tag, float64Tag, int8Tag, int16Tag, int32Tag, uint8Tag, uint8ClampedTag, uint16Tag, uint32Tag, typedArrayTags, baseIsTypedArray_default, init_baseIsTypedArray, baseUnary_default, init_baseUnary, freeExports2, freeModule2, moduleExports2, freeProcess, nodeUtil, nodeUtil_default, init_nodeUtil, nodeIsTypedArray, isTypedArray, isTypedArray_default, init_isTypedArray, objectProto6, hasOwnProperty4, arrayLikeKeys_default, init_arrayLikeKeys, overArg_default, init_overArg, nativeKeys, nativeKeys_default, init_nativeKeys, objectProto7, hasOwnProperty5, baseKeys_default, init_baseKeys, keys_default, init_keys, nativeCreate, nativeCreate_default, init_nativeCreate, hashClear_default, init_hashClear, hashDelete_default, init_hashDelete, HASH_UNDEFINED, objectProto8, hasOwnProperty6, hashGet_default, init_hashGet, objectProto9, hasOwnProperty7, hashHas_default, init_hashHas, HASH_UNDEFINED2, hashSet_default, init_hashSet, Hash_default, init_Hash, listCacheClear_default, init_listCacheClear, assocIndexOf_default, init_assocIndexOf, arrayProto, splice, listCacheDelete_default, init_listCacheDelete, listCacheGet_default, init_listCacheGet, listCacheHas_default, init_listCacheHas, listCacheSet_default, init_listCacheSet, ListCache_default, init_ListCache, Map2, Map_default, init_Map, mapCacheClear_default, init_mapCacheClear, isKeyable_default, init_isKeyable, getMapData_default, init_getMapData, mapCacheDelete_default, init_mapCacheDelete, mapCacheGet_default, init_mapCacheGet, mapCacheHas_default, init_mapCacheHas, mapCacheSet_default, init_mapCacheSet, MapCache_default, init_MapCache, arrayPush_default, init_arrayPush, stackClear_default, init_stackClear, stackDelete_default, init_stackDelete, stackGet_default, init_stackGet, stackHas_default, init_stackHas, LARGE_ARRAY_SIZE, stackSet_default, init_stackSet, Stack_default, init_Stack, arrayFilter_default, init_arrayFilter, stubArray_default, init_stubArray, objectProto10, propertyIsEnumerable2, nativeGetSymbols, getSymbols, getSymbols_default, init_getSymbols, baseGetAllKeys_default, init_baseGetAllKeys, getAllKeys_default, init_getAllKeys, DataView, DataView_default, init_DataView, Promise2, Promise_default, init_Promise, Set2, Set_default, init_Set, mapTag2, objectTag2, promiseTag, setTag2, weakMapTag2, dataViewTag2, dataViewCtorString, mapCtorString, promiseCtorString, setCtorString, weakMapCtorString, getTag, getTag_default, init_getTag, Uint8Array2, Uint8Array_default, init_Uint8Array, HASH_UNDEFINED3, setCacheAdd_default, init_setCacheAdd, setCacheHas_default, init_setCacheHas, SetCache_default, init_SetCache, arraySome_default, init_arraySome, cacheHas_default, init_cacheHas, COMPARE_PARTIAL_FLAG, COMPARE_UNORDERED_FLAG, equalArrays_default, init_equalArrays, mapToArray_default, init_mapToArray, setToArray_default, init_setToArray, COMPARE_PARTIAL_FLAG2, COMPARE_UNORDERED_FLAG2, boolTag2, dateTag2, errorTag2, mapTag3, numberTag2, regexpTag2, setTag3, stringTag2, symbolTag, arrayBufferTag2, dataViewTag3, symbolProto, symbolValueOf, equalByTag_default, init_equalByTag, COMPARE_PARTIAL_FLAG3, objectProto11, hasOwnProperty8, equalObjects_default, init_equalObjects, COMPARE_PARTIAL_FLAG4, argsTag3, arrayTag2, objectTag3, objectProto12, hasOwnProperty9, baseIsEqualDeep_default, init_baseIsEqualDeep, baseIsEqual_default, init_baseIsEqual, isEqual_default, init_isEqual, init_lodash, isUnderTest, init_lh_env, MIN_PASSING_SCORE, MAX_AVERAGE_SCORE, MIN_AVERAGE_SCORE, MAX_FAILING_SCORE, init_statistics, ELLIPSIS, NBSP, PASS_THRESHOLD, RATINGS, listOfTlds, Util, init_util, METRIC_SAVINGS_PRECISION, clampTo2Decimals, Audit, init_audit, tslib_es6_exports, extendStatics, __assign, __createBinding, __setModuleDefault, _SuppressedError, tslib_es6_default, init_tslib_es6, tslib_es6_exports2, extendStatics2, __assign2, __createBinding2, __setModuleDefault2, _SuppressedError2, tslib_es6_default2, init_tslib_es62, require_error, require_types, require_regex_generated, tslib_es6_exports3, extendStatics3, __assign3, __createBinding3, __setModuleDefault3, _SuppressedError3, tslib_es6_default3, init_tslib_es63, require_date_time, require_regex_generated2, require_number, require_icu_skeleton_parser, require_time_data_generated, require_date_time_pattern_generator, require_parser, require_icu_messageformat_parser, require_fast_memoize, require_error2, require_formatters, require_core, require_intl_messageformat, createRequire, init_module, URL2, fileURLToPath, url_default, init_url, init_esm_utils, init_type_verifiers, locales, init_locales, import_intl_messageformat, TYPE, LOCALE_MESSAGES, DEFAULT_LOCALE, CANONICAL_LOCALES, MESSAGE_I18N_ID_REGEX, formats, init_format, require_amp, require_angular, require_drupal, require_ezoic, require_gatsby, require_joomla, require_magento, require_next, require_nitropack, require_nuxt, require_octobercms, require_react, require_wix, require_wordpress, require_wp_rocket, require_lighthouse_stack_packs, require_lookup_closest_locale, LH_ROOT, pkg, lighthouseVersion, init_root2, import_lookup_closest_locale, UIStrings, init_i18n, LanternError, init_LanternError, UrlUtils, INITIAL_CWD, DEFAULT_SERVER_RESPONSE_PERCENTAGE, SERVER_RESPONSE_PERCENTAGE_OF_TTFB, NetworkAnalyzer, init_NetworkAnalyzer, core_exports, init_core, BaseNode, init_BaseNode, CPUNode, init_CPUNode, NON_NETWORK_SCHEMES, NetworkNode, init_NetworkNode, SCHEDULABLE_TASK_TITLE_LH, SCHEDULABLE_TASK_TITLE_ALT1, SCHEDULABLE_TASK_TITLE_ALT2, SCHEDULABLE_TASK_TITLE_ALT3, SIGNIFICANT_DUR_THRESHOLD_MS, IGNORED_MIME_TYPES_REGEX, PageDependencyGraph, init_PageDependencyGraph, graph_exports, init_graph, Metric, init_Metric, FirstContentfulPaint, init_FirstContentfulPaint, CRITICAL_LONG_TASK_THRESHOLD, Interactive, init_Interactive, LargestContentfulPaint, init_LargestContentfulPaint, MaxPotentialFID, init_MaxPotentialFID, mobileSlow4GRtt, SpeedIndex, init_SpeedIndex, TBTUtils_exports, BLOCKING_TIME_THRESHOLD, init_TBTUtils, TotalBlockingTime, init_TotalBlockingTime, metrics_exports, init_metrics, INITIAL_CONGESTION_WINDOW, TCP_SEGMENT_SIZE, TCPConnection, init_TCPConnection, DEFAULT_SERVER_RESPONSE_TIME, TLS_SCHEMES, CONNECTIONS_PER_ORIGIN, ConnectionPool, init_ConnectionPool, DEVTOOLS_RTT_ADJUSTMENT_FACTOR, DEVTOOLS_THROUGHPUT_ADJUSTMENT_FACTOR, throttling, Constants, init_Constants, DNS_RESOLUTION_RTT_MULTIPLIER, DNSCache, init_DNSCache, SimulatorTimingMap, init_SimulationTimingMap, defaultThrottling, DEFAULT_MAXIMUM_CONCURRENT_REQUESTS, DEFAULT_LAYOUT_TASK_MULTIPLIER, DEFAULT_MAXIMUM_CPU_TASK_DURATION, NodeState, PriorityStartTimePenalty, ALL_SIMULATION_NODE_TIMINGS, Simulator, init_Simulator, simulation_exports, init_simulation, NetworkRequestTypes, init_Lantern, types_exports, init_types, init_lantern, require_create_entity_finder_api, require_entities, require_lib, import_third_party_web, init_third_party_web, Configuration_exports, defaults, init_Configuration, Extensions_exports, extensionPalette, init_Extensions, File_exports, DataOrigin, EntriesLinkState, EventKeyType, init_File, init_Overlays, Timing_exports, init_Timing, TraceEvents_exports, Phase, Scope, AuctionWorkletType, markerTypeGuards, MarkerName, pageLoadEventTypeGuards, NO_NAVIGATION, LayoutInvalidationReason, StyleRecalcInvalidationReason, InvalidationEventType, SelectorTimingsKey, Name, Categories, init_TraceEvents, init_types2, helpers_exports, init_helpers, ArrayUtilities_exports, removeElement, binaryIndexOf, intersectOrdered, mergeOrdered, DEFAULT_COMPARATOR, init_ArrayUtilities, init_Brand, init_Constructor, init_DateUtilities, init_DevToolsPath, init_DOMUtilities, init_KeyboardUtilities, MapUtilities_exports, inverse, Multimap, init_MapUtilities, init_MimeType, NumberUtilities_exports, clamp, mod, toFixedIfFloating, floor, greatestCommonDivisor, commonRatios, aspectRatio, withThousandsSeparator, init_NumberUtilities, init_StringUtilities, init_Timing2, init_TypedArrayUtilities, TypescriptUtilities_exports, init_TypescriptUtilities, init_UIString, init_UserVisibleError, init_platform, SyntheticEvents_exports, activeManager, SyntheticEventsManager, init_SyntheticEvents, Timing_exports3, milliToMicro, secondsToMilli, secondsToMicro, microToMilli, microToSeconds, init_Timing3, Trace_exports, DevToolsTimelineEventCategory, parsedCategories, VISIBLE_TRACE_EVENT_TYPES, init_Trace, TreeHelpers_exports, nodeIdCount, makeTraceEntryNodeId, makeEmptyTraceEntryTree, makeEmptyTraceEntryNode, init_TreeHelpers, Extensions_exports2, init_Extensions2, Network_exports, NON_RENDER_BLOCKING_VALUES, HIGH_NETWORK_PRIORITIES, CACHEABLE_STATUS_CODES, STATIC_RESOURCE_TYPES, NON_NETWORK_SCHEMES2, SECURE_LOCALHOST_DOMAINS, init_Network, SamplesIntegrator_exports, _a, SamplesIntegrator, init_SamplesIntegrator, init_helpers2, AnimationFramesHandler_exports, animationFrameStarts, animationFrameEnds, animationFramePresentations, animationFrames, presentationForFrame, isEnabled, init_AnimationFramesHandler, AnimationHandler_exports, animations, animationsSyntheticEvents, init_AnimationHandler, FlowsHandler_exports, flowDataByGroupToken, boundFlowData, flowsById, flowEvents, nonFlowEvents, flows, ID_COMPONENT_SEPARATOR, init_FlowsHandler, AuctionWorkletsHandler_exports, runningInProcessEvents, doneWithProcessEvents, createdSyntheticEvents, utilityThreads, v8HelperThreads, init_AuctionWorkletsHandler, MetaHandler_exports, rendererProcessesByFrameId, mainFrameId, mainFrameURL, framesByProcessId, browserProcessId, browserThreadId, gpuProcessId, gpuThreadId, viewportRect, devicePixelRatio2, processNames, topLevelRendererIds, traceBounds, navigationsByFrameId, navigationsByNavigationId, finalDisplayUrlByNavigationId, mainFrameNavigations, threadsInProcess, traceStartedTimeFromTracingStartedEvent, eventPhasesOfInterestForTraceBounds, traceIsGeneric, CHROME_WEB_TRACE_EVENTS, init_MetaHandler, NetworkRequestsHandler_exports, MILLISECONDS_TO_MICROSECONDS, SECONDS_TO_MICROSECONDS, webSocketData, linkPreconnectEvents, requestMap, requestsById, requestsByTime, networkRequestEventByInitiatorUrl, eventToInitiatorMap, entityMappings, init_NetworkRequestsHandler, ProfileNode, ProfileTreeModel, init_ProfileTreeModel, CPUProfileDataModel_exports, CPUProfileNode, CPUProfileDataModel, init_CPUProfileDataModel, init_cpu_profile, SamplesHandler_exports, profilesInProcess, entryToNode, preprocessedData, init_SamplesHandler, RendererHandler_exports, processes, entityMappings2, compositorTileWorkers, entryToNode2, completeEventStack, config, makeRendererProcess, makeRendererThread, getOrCreateRendererProcess, getOrCreateRendererThread, init_RendererHandler, AsyncJSCallsHandler_exports, schedulerToRunEntryPoints, taskScheduleForTaskRunEvent, asyncCallToScheduler, runEntryPointToScheduler, init_AsyncJSCallsHandler, DOMStatsHandler_exports, domStatsByFrameId, init_DOMStatsHandler, UserTimingsHandler_exports, syntheticEvents, measureTraceByTraceId, performanceMeasureEvents, performanceMarkEvents, consoleTimings, timestampEvents, resourceTimingNames, navTimingNames, ignoredNames, init_UserTimingsHandler, ExtensionTraceDataHandler_exports, extensionTrackEntries, extensionTrackData, extensionMarkers, entryToNode3, timeStampByName, syntheticConsoleEntriesForTimingsTrack, init_ExtensionTraceDataHandler, LayerTreeHandler_exports, paintEvents, snapshotEvents, paintToSnapshotMap, lastPaintForLayerId, currentMainFrameLayerTreeId, updateLayerEvents, relevantEvents, init_LayerTreeHandler, Threads_exports, ThreadType, threadsInHandlerDataCache, init_Threads, FramesHandler_exports, model, relevantFrameEvents, MAIN_FRAME_MARKERS, TimelineFrameModel, TimelineFrame, LayerPaintEvent, PendingFrame, BeginFrameInfo, TimelineFrameBeginFrameQueue, init_FramesHandler, GPUHandler_exports, eventsInProcessThread, mainGPUThreadTasks, init_GPUHandler, ImagePaintingHandler_exports, paintImageEvents, decodeLazyPixelRefEvents, paintImageByLazyPixelRef, eventToPaintImage, urlToPaintImage, paintEventToCorrectedDisplaySize, didCorrectForHostDpr, init_ImagePaintingHandler, InitiatorsHandler_exports, lastScheduleStyleRecalcByFrame, lastInvalidationEventForFrame, lastRecalcByFrame, eventToInitiatorMap2, initiatorToEventsMap, timerInstallEventsById, requestIdleCallbackEventsById, webSocketCreateEventsById, schedulePostTaskCallbackEventsById, init_InitiatorsHandler, InvalidationsHandler_exports, frameStateByFrame, maxInvalidationsPerEvent, init_InvalidationsHandler, PageLoadMetricsHandler_exports, metricScoresByFrameId, allMarkerEvents, pageLoadEventsArray, selectedLCPCandidateEvents, ScoreClassification, MetricName, init_PageLoadMetricsHandler, LargestImagePaintHandler_exports, imagePaintsByNodeIdAndProcess, lcpRequestByNavigationId, init_LargestImagePaintHandler, LargestTextPaintHandler_exports, textPaintByDOMNodeId, init_LargestTextPaintHandler, ScreenshotsHandler_exports, unpairedAsyncEvents, legacyScreenshotEvents, modernScreenshotEvents, syntheticScreenshots, frameSequenceToTs, init_ScreenshotsHandler, LayoutShiftsHandler_exports, MAX_CLUSTER_DURATION, MAX_SHIFT_TIME_DELTA, layoutShiftEvents, layoutInvalidationEvents, scheduleStyleInvalidationEvents, styleRecalcInvalidationEvents, renderFrameImplCreateChildFrameEvents, domLoadingEvents, layoutImageUnsizedEvents, remoteFonts, backendNodeIds, prePaintEvents, paintImageEvents2, sessionMaxScore, clsWindowID, clusters, clustersByNavigationId, scoreRecords, LayoutShiftsThreshold, init_LayoutShiftsHandler, MemoryHandler_exports, updateCountersByProcess, init_MemoryHandler, PageFramesHandler_exports, frames, init_PageFramesHandler, ScriptsHandler_exports, scriptById, init_ScriptsHandler, SelectorStatsHandler_exports, lastRecalcStyleEvent, lastInvalidatedNode, selectorDataForRecalcStyle, invalidatedNodeList, init_SelectorStatsHandler, UserInteractionsHandler_exports, beginCommitCompositorFrameEvents, parseMetaViewportEvents, LONG_INTERACTION_THRESHOLD, INP_GOOD_TIMING, INP_MEDIUM_TIMING, longestInteractionEvent, interactionEvents, interactionEventsWithNoNesting, eventTimingStartEventsForInteractions, eventTimingEndEventsForInteractions, pointerEventTypes, keyboardEventTypes, init_UserInteractionsHandler, WorkersHandler_exports, sessionIdEvents, workerIdByThread, workerURLById, init_WorkersHandler, WarningsHandler_exports, warningsPerEvent, eventsPerWarning, allEventsStack, jsInvokeStack, taskReflowEvents, longTaskEvents, FORCED_REFLOW_THRESHOLD, LONG_MAIN_THREAD_TASK_THRESHOLD, init_WarningsHandler, ModelHandlers_exports, init_ModelHandlers, init_types3, init_handlers, init_EntityMapper, init_EventsSerializer, ScriptDuplication_exports, ABSOLUTE_SIZE_THRESHOLD_BYTES, RELATIVE_SIZE_THRESHOLD, init_ScriptDuplication, StackTraceForEvent_exports, stackTraceForEventInTrace, init_StackTraceForEvent, TraceFilter, VisibleEventsFilter, ExclusiveNameFilter, init_TraceFilter, Node2, BottomUpRootNode, GroupNode, BottomUpNode, init_TraceTree, ThirdParties_exports, init_ThirdParties, init_extras, MIN_PASSING_SCORE2, MAX_AVERAGE_SCORE2, MIN_AVERAGE_SCORE2, MAX_FAILING_SCORE2, init_Statistics, InsightWarning, InsightCategory, InsightKeys, init_types4, Common_exports, GRAPH_SAVINGS_PRECISION, init_Common, Cache_exports, UIStrings2, i18nString, IGNORE_THRESHOLD_IN_PERCENT, init_Cache, CLSCulprits_exports, UIStrings3, i18nString2, AnimationFailureReasons, LayoutShiftType, ACTIONABLE_FAILURE_REASONS, ROOT_CAUSE_WINDOW, init_CLSCulprits, DocumentLatency_exports, UIStrings4, i18nString3, TOO_SLOW_THRESHOLD_MS, TARGET_MS, IGNORE_THRESHOLD_IN_BYTES, init_DocumentLatency, DOMSize_exports, UIStrings5, i18nString4, DOM_SIZE_DURATION_THRESHOLD, LAYOUT_OBJECTS_THRESHOLD, STYLE_RECALC_ELEMENTS_THRESHOLD, init_DOMSize, DuplicatedJavaScript_exports, UIStrings6, i18nString5, init_DuplicatedJavaScript, FontDisplay_exports, UIStrings7, i18nString6, init_FontDisplay, ForcedReflow_exports, UIStrings8, i18nString7, init_ForcedReflow, ImageDelivery_exports, UIStrings9, i18nString8, TARGET_BYTES_PER_PIXEL_AVIF, GIF_SIZE_THRESHOLD, BYTE_SAVINGS_THRESHOLD, BYTE_SAVINGS_THRESHOLD_RESPONSIVE_BREAKPOINTS, ImageOptimizationType, init_ImageDelivery, INPBreakdown_exports, UIStrings10, i18nString9, init_INPBreakdown, LCPBreakdown_exports, UIStrings11, i18nString10, init_LCPBreakdown, LCPDiscovery_exports, UIStrings12, i18nString11, init_LCPDiscovery, legacy_javascript_exports, polyfill_module_data_default, polyfill_graph_data_default, polyfillModuleData, graph, CodePatternMatcher, matcher, init_legacy_javascript, init_legacy_javascript2, LegacyJavaScript_exports, detectLegacyJavaScript2, UIStrings13, i18nString12, BYTE_THRESHOLD, init_LegacyJavaScript, ModernHTTP_exports, UIStrings14, i18nString13, init_ModernHTTP, NetworkDependencyTree_exports, UIStrings15, i18nString14, nonCriticalResourceTypes, PRECONNECT_SOCKET_MAX_IDLE_IN_MS, IGNORE_THRESHOLD_IN_MILLISECONDS, TOO_MANY_PRECONNECTS_THRESHOLD, ParsedURL, init_NetworkDependencyTree, RenderBlocking_exports, UIStrings16, i18nString15, MINIMUM_WASTED_MS, init_RenderBlocking, SlowCSSSelector_exports, UIStrings17, i18nString16, slowCSSSelectorThreshold, init_SlowCSSSelector, ThirdParties_exports2, UIStrings18, i18nString17, init_ThirdParties2, Viewport_exports, UIStrings19, i18nString18, init_Viewport, Models_exports, init_Models, init_insights, init_LanternComputationData, _a2, TraceParseProgressEvent, TraceProcessor, init_Processor, init_ModelImpl, init_common, EventCategory, init_Styles, init_Name, init_trace2, init_lantern2, ACCEPTABLE_NAVIGATION_URL_REGEX, BASE_RESPONSE_LATENCY, SCHEDULABLE_TASK_TITLE_LH2, SCHEDULABLE_TASK_TITLE_ALT12, SCHEDULABLE_TASK_TITLE_ALT22, SCHEDULABLE_TASK_TITLE_ALT32, TraceProcessor2, init_trace_processor, ArbitraryEqualityMap, init_arbitrary_equality_map, init_computed_artifact, require_cjs, UIStrings20, str_, LHERROR_SENTINEL, ERROR_SENTINEL, LighthouseError, ERRORS, init_lh_error, import_tldts_icann, allowedProtocols, SECURE_SCHEMES, SECURE_LOCALHOST_DOMAINS2, NON_NETWORK_SCHEMES3, UrlUtils2, url_utils_default, init_url_utils, HEADER_TCP, HEADER_SSL, HEADER_REQ, HEADER_RES, HEADER_TOTAL, HEADER_FETCHED_SIZE, HEADER_PROTOCOL_IS_H2, RESOURCE_TYPES, NetworkRequest, init_network_request, RequestEventEmitter, NetworkRecorder, init_network_recorder, NetworkRecords, NetworkRecordsComputed, init_network_records, require2, axeSource, init_axe, esbuildFunctionWrapperString, names, getNodeLabelRawString, getOuterHTMLSnippetRawString, getNodeDetailsRawString, pageFunctions, init_page_functions, accessibility_exports, Accessibility, accessibility_default, init_accessibility, init_dom, anchor_elements_exports, AnchorElements, anchor_elements_default, init_anchor_elements, console_messages_exports, ConsoleMessages, console_messages_default, init_console_messages, devtools_log_exports, DevtoolsLog, DevtoolsMessageLog, devtools_log_default, init_devtools_log, doctype_exports, Doctype, doctype_default, init_doctype, image_elements_exports, ImageElements, image_elements_default, init_image_elements, inputs_exports, Inputs, inputs_default, init_inputs, inspector_issues_exports, InspectorIssues, inspector_issues_default, init_inspector_issues, require_link, MainResource, MainResourceComputed, init_main_resource, link_elements_exports, import_http_link_header, UIStrings22, str_3, LinkElements, link_elements_default, init_link_elements, init_network, main_document_content_exports, MainDocumentContent, main_document_content_default, init_main_document_content, meta_elements_exports, MetaElements, meta_elements_default, init_meta_elements, scripts_exports, Scripts, scripts_default, init_scripts, robots_txt_exports, RobotsTxt, robots_txt_default, init_robots_txt, require_ParsedURL, require_Common, require_Platform, require_SourceMap, require_SDK, source_maps_exports, import_SDK, SourceMaps, source_maps_default, init_source_maps, stacks_exports, require3, libDetectorSource, Stacks, stacks_default, init_stacks, viewport_dimensions_exports, ViewportDimensions, viewport_dimensions_default, init_viewport_dimensions, UIStrings23, str_4, AxeAudit, axe_audit_default, init_axe_audit, accesskeys_exports, UIStrings24, str_5, Accesskeys, accesskeys_default, init_accesskeys, aria_allowed_attr_exports, UIStrings25, str_6, ARIAAllowedAttr, aria_allowed_attr_default, init_aria_allowed_attr, aria_allowed_role_exports, UIStrings26, str_7, ARIAAllowedRole, aria_allowed_role_default, init_aria_allowed_role, aria_command_name_exports, UIStrings27, str_8, AriaCommandName, aria_command_name_default, init_aria_command_name, aria_conditional_attr_exports, UIStrings28, str_9, AriaConditionalAttr, aria_conditional_attr_default, init_aria_conditional_attr, aria_deprecated_role_exports, UIStrings29, str_10, AriaDeprecatedRole, aria_deprecated_role_default, init_aria_deprecated_role, aria_dialog_name_exports, UIStrings30, str_11, AriaDialogName, aria_dialog_name_default, init_aria_dialog_name, aria_hidden_body_exports, UIStrings31, str_12, AriaHiddenBody, aria_hidden_body_default, init_aria_hidden_body, aria_hidden_focus_exports, UIStrings32, str_13, AriaHiddenFocus, aria_hidden_focus_default, init_aria_hidden_focus, aria_input_field_name_exports, UIStrings33, str_14, AriaInputFieldName, aria_input_field_name_default, init_aria_input_field_name, aria_meter_name_exports, UIStrings34, str_15, AriaMeterName, aria_meter_name_default, init_aria_meter_name, aria_progressbar_name_exports, UIStrings35, str_16, AriaProgressbarName, aria_progressbar_name_default, init_aria_progressbar_name, aria_prohibited_attr_exports, UIStrings36, str_17, AriaProhibitedAttr, aria_prohibited_attr_default, init_aria_prohibited_attr, aria_required_attr_exports, UIStrings37, str_18, ARIARequiredAttr, aria_required_attr_default, init_aria_required_attr, aria_required_children_exports, UIStrings38, str_19, AriaRequiredChildren, aria_required_children_default, init_aria_required_children, aria_required_parent_exports, UIStrings39, str_20, AriaRequiredParent, aria_required_parent_default, init_aria_required_parent, aria_roles_exports, UIStrings40, str_21, AriaRoles, aria_roles_default, init_aria_roles, aria_text_exports, UIStrings41, str_22, AriaText, aria_text_default, init_aria_text, aria_toggle_field_name_exports, UIStrings42, str_23, AriaToggleFieldName, aria_toggle_field_name_default, init_aria_toggle_field_name, aria_tooltip_name_exports, UIStrings43, str_24, AriaTooltipName, aria_tooltip_name_default, init_aria_tooltip_name, aria_treeitem_name_exports, UIStrings44, str_25, AriaTreeitemName, aria_treeitem_name_default, init_aria_treeitem_name, aria_valid_attr_value_exports, UIStrings45, str_26, ARIAValidAttr, aria_valid_attr_value_default, init_aria_valid_attr_value, aria_valid_attr_exports, UIStrings46, str_27, ARIAValidAttr2, aria_valid_attr_default, init_aria_valid_attr, button_name_exports, UIStrings47, str_28, ButtonName, button_name_default, init_button_name, bypass_exports, UIStrings48, str_29, Bypass, bypass_default, init_bypass, color_contrast_exports, UIStrings49, str_30, ColorContrast, color_contrast_default, init_color_contrast, definition_list_exports, UIStrings50, str_31, DefinitionList, definition_list_default, init_definition_list, dlitem_exports, UIStrings51, str_32, DLItem, dlitem_default, init_dlitem, document_title_exports, UIStrings52, str_33, DocumentTitle, document_title_default, init_document_title, duplicate_id_aria_exports, UIStrings53, str_34, DuplicateIdAria, duplicate_id_aria_default, init_duplicate_id_aria, empty_heading_exports, UIStrings54, str_35, EmptyHeading, empty_heading_default, init_empty_heading, form_field_multiple_labels_exports, UIStrings55, str_36, FormFieldMultipleLabels, form_field_multiple_labels_default, init_form_field_multiple_labels, frame_title_exports, UIStrings56, str_37, FrameTitle, frame_title_default, init_frame_title, heading_order_exports, UIStrings57, str_38, HeadingOrder, heading_order_default, init_heading_order, html_has_lang_exports, UIStrings58, str_39, HTMLHasLang, html_has_lang_default, init_html_has_lang, html_lang_valid_exports, UIStrings59, str_40, HTMLLangValid, html_lang_valid_default, init_html_lang_valid, html_xml_lang_mismatch_exports, UIStrings60, str_41, HTMLXMLLangMismatch, html_xml_lang_mismatch_default, init_html_xml_lang_mismatch, identical_links_same_purpose_exports, UIStrings61, str_42, IdenticalLinksSamePurpose, identical_links_same_purpose_default, init_identical_links_same_purpose, image_alt_exports, UIStrings62, str_43, ImageAlt, image_alt_default, init_image_alt, image_redundant_alt_exports, UIStrings63, str_44, ImageRedundantAlt, image_redundant_alt_default, init_image_redundant_alt, input_button_name_exports, UIStrings64, str_45, InputButtonName, input_button_name_default, init_input_button_name, input_image_alt_exports, UIStrings65, str_46, InputImageAlt, input_image_alt_default, init_input_image_alt, label_content_name_mismatch_exports, UIStrings66, str_47, LabelContentNameMismatch, label_content_name_mismatch_default, init_label_content_name_mismatch, label_exports, UIStrings67, str_48, Label, label_default, init_label, landmark_one_main_exports, UIStrings68, str_49, LandmarkOneMain, landmark_one_main_default, init_landmark_one_main, link_in_text_block_exports, UIStrings69, str_50, LinkInTextBlock, link_in_text_block_default, init_link_in_text_block, link_name_exports, UIStrings70, str_51, LinkName, link_name_default, init_link_name, list_exports, UIStrings71, str_52, List, list_default, init_list, listitem_exports, UIStrings72, str_53, ListItem, listitem_default, init_listitem, ManualAudit, manual_audit_default, init_manual_audit, custom_controls_labels_exports, CustomControlsLabels, custom_controls_labels_default, init_custom_controls_labels, custom_controls_roles_exports, CustomControlsRoles, custom_controls_roles_default, init_custom_controls_roles, focus_traps_exports, FocusTraps, focus_traps_default, init_focus_traps, focusable_controls_exports, FocusableControls, focusable_controls_default, init_focusable_controls, interactive_element_affordance_exports, InteractiveElementAffordance, interactive_element_affordance_default, init_interactive_element_affordance, logical_tab_order_exports, LogicalTabOrder, logical_tab_order_default, init_logical_tab_order, managed_focus_exports, ManagedFocus, managed_focus_default, init_managed_focus, offscreen_content_hidden_exports, OffscreenContentHidden, offscreen_content_hidden_default, init_offscreen_content_hidden, use_landmarks_exports, UseLandmarks, use_landmarks_default, init_use_landmarks, visual_order_follows_dom_exports, VisualOrderFollowsDOM, visual_order_follows_dom_default, init_visual_order_follows_dom, meta_refresh_exports, UIStrings73, str_54, MetaRefresh, meta_refresh_default, init_meta_refresh, meta_viewport_exports, UIStrings74, str_55, MetaViewport, meta_viewport_default, init_meta_viewport, object_alt_exports, UIStrings75, str_56, ObjectAlt, object_alt_default, init_object_alt, select_name_exports, UIStrings76, str_57, SelectName, select_name_default, init_select_name, skip_link_exports, UIStrings77, str_58, SkipLink, skip_link_default, init_skip_link, tabindex_exports, UIStrings78, str_59, TabIndex, tabindex_default, init_tabindex, table_duplicate_name_exports, UIStrings79, str_60, TableDuplicateName, table_duplicate_name_default, init_table_duplicate_name, table_fake_caption_exports, UIStrings80, str_61, TableFakeCaption, table_fake_caption_default, init_table_fake_caption, target_size_exports, UIStrings81, str_62, TargetSize, target_size_default, init_target_size, td_has_header_exports, UIStrings82, str_63, TDHasHeader, td_has_header_default, init_td_has_header, td_headers_attr_exports, UIStrings83, str_64, TDHeadersAttr, td_headers_attr_default, init_td_headers_attr, th_has_data_cells_exports, UIStrings84, str_65, THHasDataCells, th_has_data_cells_default, init_th_has_data_cells, valid_lang_exports, UIStrings85, str_66, ValidLang, valid_lang_default, init_valid_lang, video_caption_exports, UIStrings86, str_67, VideoCaption, video_caption_default, init_video_caption, clickjacking_mitigation_exports, UIStrings87, str_68, ClickjackingMitigation, clickjacking_mitigation_default, init_clickjacking_mitigation, require_finding, require_csp, require_parser_checks, require_angular2, require_flash, require_jsonp, require_utils, require_security_checks, require_strictcsp_checks, require_lighthouse_checks, require_parser2, import_lighthouse_checks, import_finding, import_parser, import_csp, UIStrings88, str_69, FINDING_TO_UI_STRING, init_csp_evaluator, csp_xss_exports, UIStrings89, str_70, CspXss, csp_xss_default, init_csp_xss, import_SDK2, JSBundles, JSBundlesComputed, init_js_bundles, UIStrings90, DEPRECATIONS_METADATA, init_deprecations_strings, UIStrings91, str_71, deprecationsStr_, init_deprecation_description, deprecations_exports, UIStrings92, str_72, Deprecations, deprecations_default, init_deprecations, charset_exports, UIStrings93, str_73, CONTENT_TYPE_HEADER, IANA_REGEX, CHARSET_HTML_REGEX, CHARSET_HTTP_REGEX, CharsetDefined, charset_default, init_charset, LHTraceProcessor, lh_trace_processor_default, init_lh_trace_processor, ProcessedTrace, ProcessedTraceComputed, init_processed_trace, doctype_exports2, UIStrings94, str_74, Doctype2, doctype_default2, init_doctype2, ViolationAudit, violation_audit_default, init_violation_audit, geolocation_on_start_exports, UIStrings95, str_75, GeolocationOnStart, geolocation_on_start_default, init_geolocation_on_start, inspector_issues_exports2, UIStrings96, str_76, IssuesPanelEntries, inspector_issues_default2, init_inspector_issues2, js_libraries_exports, UIStrings97, str_77, JsLibrariesAudit, js_libraries_default, init_js_libraries, notification_on_start_exports, UIStrings98, str_78, NotificationOnStart, notification_on_start_default, init_notification_on_start, paste_preventing_inputs_exports, UIStrings99, str_79, PastePreventingInputsAudit, paste_preventing_inputs_default, init_paste_preventing_inputs, errors_in_console_exports, KB, MAX_CONSOLE_ERRORS, UIStrings100, str_80, ErrorLogs, errors_in_console_default, init_errors_in_console, has_hsts_exports, UIStrings101, str_81, HasHsts, has_hsts_default, init_has_hsts, image_aspect_ratio_exports, UIStrings102, str_82, THRESHOLD_PX, ImageAspectRatio, image_aspect_ratio_default, init_image_aspect_ratio, ImageRecords, ImageRecordsComputed, init_image_records, image_size_responsive_exports, UIStrings103, str_83, SMALL_IMAGE_FACTOR, LARGE_IMAGE_FACTOR, SMALL_IMAGE_THRESHOLD, ImageSizeResponsive, image_size_responsive_default, init_image_size_responsive, is_on_https_exports, UIStrings104, resolutionToString, str_84, HTTPS, is_on_https_default, init_is_on_https, origin_isolation_exports, UIStrings105, str_85, OriginIsolation, origin_isolation_default, init_origin_isolation, redirects_http_exports, UIStrings106, str_86, RedirectsHTTP, redirects_http_default, init_redirects_http, canonical_exports, UIStrings107, str_87, Canonical, canonical_default, init_canonical, crawlable_anchors_exports, UIStrings108, hrefAssociatedAttributes, str_88, CrawlableAnchors, crawlable_anchors_default, init_crawlable_anchors, langs, init_valid_langs, hreflang_exports, NO_LANGUAGE, UIStrings109, str_89, Hreflang, hreflang_default, init_hreflang, http_status_code_exports, HTTP_UNSUCCESSFUL_CODE_LOW, HTTP_UNSUCCESSFUL_CODE_HIGH, UIStrings110, str_90, HTTPStatusCode, http_status_code_default, init_http_status_code, require_Robots, require_robots_parser, is_crawlable_exports, import_robots_parser, BOT_USER_AGENTS, BLOCKLIST, ROBOTS_HEADER, UNAVAILABLE_AFTER, UIStrings111, str_91, IsCrawlable, is_crawlable_default, init_is_crawlable, link_text_exports, nonDescriptiveLinkTexts, UIStrings112, str_92, LinkText, link_text_default, init_link_text, structured_data_exports, UIStrings113, str_93, StructuredData, structured_data_default, init_structured_data, meta_description_exports, UIStrings114, str_94, Description, meta_description_default, init_meta_description, robots_txt_exports2, HTTP_CLIENT_ERROR_CODE_LOW, HTTP_SERVER_ERROR_CODE_LOW, DIRECTIVE_SITEMAP, DIRECTIVE_USER_AGENT, DIRECTIVE_ALLOW, DIRECTIVE_DISALLOW, DIRECTIVES_GROUP_MEMBERS, DIRECTIVE_SAFELIST, SITEMAP_VALID_PROTOCOLS, UIStrings115, str_95, RobotsTxt2, robots_txt_default2, init_robots_txt2, third_party_cookies_exports, UIStrings116, str_96, ThirdPartyCookies, third_party_cookies_default, init_third_party_cookies, trusted_types_xss_exports, import_csp2, UIStrings117, str_97, TrustedTypesXss, trusted_types_xss_default, init_trusted_types_xss, entity_classification_exports, EntityClassification, EntityClassificationComputed, init_entity_classification, valid_source_maps_exports, UIStrings118, str_98, LARGE_JS_BYTE_THRESHOLD, ValidSourceMaps, valid_source_maps_default, init_valid_source_maps, speedline_exports, Speedline, SpeedlineComputed, init_speedline, timing_summary_exports, TimingSummary, TimingSummaryComputed, init_timing_summary, trace_engine_result_exports, TraceEngineResult, TraceEngineResultComputed, init_trace_engine_result, bf_cache_failures_exports, ShimGatherer2, bf_cache_failures_default, init_bf_cache_failures, css_usage_exports, ShimGatherer3, css_usage_default, init_css_usage, full_page_screenshot_exports, ShimGatherer4, full_page_screenshot_default, init_full_page_screenshot, iframe_elements_exports, ShimGatherer5, iframe_elements_default, init_iframe_elements, js_usage_exports, ShimGatherer6, js_usage_default, init_js_usage, network_user_agent_exports, ShimGatherer7, network_user_agent_default, init_network_user_agent, stylesheets_exports, ShimGatherer8, stylesheets_default, init_stylesheets, trace_elements_exports, ShimGatherer9, trace_elements_default, init_trace_elements, autocomplete_exports, ShimAudit, autocomplete_default, init_autocomplete, bf_cache_exports, ShimAudit2, bf_cache_default, init_bf_cache, bootup_time_exports, ShimAudit3, bootup_time_default, init_bootup_time, total_byte_weight_exports, ShimAudit4, total_byte_weight_default, init_total_byte_weight, unminified_css_exports, ShimAudit5, unminified_css_default, init_unminified_css, unminified_javascript_exports, ShimAudit6, unminified_javascript_default, init_unminified_javascript, unused_css_rules_exports, ShimAudit7, unused_css_rules_default, init_unused_css_rules, unused_javascript_exports, ShimAudit8, unused_javascript_default, init_unused_javascript, diagnostics_exports, ShimAudit9, diagnostics_default, init_diagnostics, final_screenshot_exports, ShimAudit10, final_screenshot_default, init_final_screenshot, cache_insight_exports, ShimAudit11, cache_insight_default, init_cache_insight, cls_culprits_insight_exports, ShimAudit12, cls_culprits_insight_default, init_cls_culprits_insight, document_latency_insight_exports, ShimAudit13, document_latency_insight_default, init_document_latency_insight, dom_size_insight_exports, ShimAudit14, dom_size_insight_default, init_dom_size_insight, duplicated_javascript_insight_exports, ShimAudit15, duplicated_javascript_insight_default, init_duplicated_javascript_insight, font_display_insight_exports, ShimAudit16, font_display_insight_default, init_font_display_insight, forced_reflow_insight_exports, ShimAudit17, forced_reflow_insight_default, init_forced_reflow_insight, image_delivery_insight_exports, ShimAudit18, image_delivery_insight_default, init_image_delivery_insight, inp_breakdown_insight_exports, ShimAudit19, inp_breakdown_insight_default, init_inp_breakdown_insight, lcp_breakdown_insight_exports, ShimAudit20, lcp_breakdown_insight_default, init_lcp_breakdown_insight, lcp_discovery_insight_exports, ShimAudit21, lcp_discovery_insight_default, init_lcp_discovery_insight, legacy_javascript_insight_exports, ShimAudit22, legacy_javascript_insight_default, init_legacy_javascript_insight, modern_http_insight_exports, ShimAudit23, modern_http_insight_default, init_modern_http_insight, network_dependency_tree_insight_exports, ShimAudit24, network_dependency_tree_insight_default, init_network_dependency_tree_insight, render_blocking_insight_exports, ShimAudit25, render_blocking_insight_default, init_render_blocking_insight, slow_css_selector_insight_exports, ShimAudit26, slow_css_selector_insight_default, init_slow_css_selector_insight, third_parties_insight_exports, ShimAudit27, third_parties_insight_default, init_third_parties_insight, viewport_insight_exports, ShimAudit28, viewport_insight_default, init_viewport_insight, layout_shifts_exports, ShimAudit29, layout_shifts_default, init_layout_shifts, long_tasks_exports, ShimAudit30, long_tasks_default, init_long_tasks, main_thread_tasks_exports, ShimAudit31, main_thread_tasks_default, init_main_thread_tasks, mainthread_work_breakdown_exports, ShimAudit32, mainthread_work_breakdown_default, init_mainthread_work_breakdown, metrics_exports2, ShimAudit33, metrics_default, init_metrics2, cumulative_layout_shift_exports, ShimAudit34, cumulative_layout_shift_default, init_cumulative_layout_shift, first_contentful_paint_exports, ShimAudit35, first_contentful_paint_default, init_first_contentful_paint, interaction_to_next_paint_exports, ShimAudit36, interaction_to_next_paint_default, init_interaction_to_next_paint, interactive_exports, ShimAudit37, interactive_default, init_interactive, largest_contentful_paint_exports, ShimAudit38, largest_contentful_paint_default, init_largest_contentful_paint, max_potential_fid_exports, ShimAudit39, max_potential_fid_default, init_max_potential_fid, speed_index_exports, ShimAudit40, speed_index_default, init_speed_index, total_blocking_time_exports, ShimAudit41, total_blocking_time_default, init_total_blocking_time, network_requests_exports, ShimAudit42, network_requests_default, init_network_requests, network_rtt_exports, ShimAudit43, network_rtt_default, init_network_rtt, network_server_latency_exports, ShimAudit44, network_server_latency_default, init_network_server_latency, non_composited_animations_exports, ShimAudit45, non_composited_animations_default, init_non_composited_animations, oopif_iframe_test_audit_exports, ShimAudit46, oopif_iframe_test_audit_default, init_oopif_iframe_test_audit, predictive_perf_exports, ShimAudit47, predictive_perf_default, init_predictive_perf, redirects_exports, ShimAudit48, redirects_default, init_redirects, resource_summary_exports, ShimAudit49, resource_summary_default, init_resource_summary, screenshot_thumbnails_exports, ShimAudit50, screenshot_thumbnails_default, init_screenshot_thumbnails, script_treemap_data_exports, ShimAudit51, script_treemap_data_default, init_script_treemap_data, server_response_time_exports, ShimAudit52, server_response_time_default, init_server_response_time, unsized_images_exports, ShimAudit53, unsized_images_default, init_unsized_images, user_timings_exports, ShimAudit54, user_timings_default, init_user_timings, cjs_exports, cjs_default, init_cjs, clampTo2Decimals2, ReportScoring, import_lighthouse_stack_packs, stackPacksToInclude, NetworkAnalysis, NetworkAnalysisComputed, LoadSimulator, LoadSimulatorComputed, artifactsFilename, traceFilename, devtoolsFilename, errorPrefix, constants_exports, throttling2, MOTOGPOWER_EMULATION_METRICS, DESKTOP_EMULATION_METRICS, screenEmulationMetrics, MOTOG4_USERAGENT, DESKTOP_USERAGENT, userAgents, defaultSettings, nonSimulatedSettingsOverrides, UIStrings21, str_2, defaultConfig, default_config_default, baseArtifactKeySource, baseArtifactKeys, filterResistantAuditIds, filterResistantArtifactIds, ConfigPlugin, config_plugin_default, require4, mergeOptionsOfItems, mergeConfigFragment, bundledModules, defaultConfigPath, internalArtifactPriorities, SENTRY_URL, SAMPLE_RATE, noop, sentryDelegate, Sentry, reportAssets, ReportGenerator, Runner, ExecutionContext, DEFAULT_PROTOCOL_TIMEOUT, PPTR_BUFFER, MAX_TIMEOUT, CrdpEventEmitter, ProtocolSession, ProtocolEventEmitter, TargetManager, Fetcher, NetworkMonitorEventEmitter, NetworkMonitor, throwNotConnectedFn, throwingSession, Driver, phaseToPriorPhase, UIStrings119, SLOW_CPU_BENCHMARK_INDEX_THRESHOLD, str_99, UIStrings120, str_100, NO_THROTTLING_METRICS, NO_CPU_THROTTLE_METRICS, UIStrings121, str_101, puppeteer_core_default, DEFAULT_WAIT_FUNCTIONS, UIStrings122, str_102, DEFAULT_PAUSE_AFTER_FCP, DEFAULT_PAUSE_AFTER_LOAD, DEFAULT_NETWORK_QUIET_THRESHOLD, DEFAULT_CPU_QUIET_THRESHOLD, UIStrings123, str_103, HTML_MIME_TYPE, XHTML_MIME_TYPE, DEFAULT_HOSTNAME, DEFAULT_PORT, UIStrings124, str_104, config2, traceCategories;
var init_lighthouse_devtools_mcp_bundle = __esm({
  "../../node_modules/chrome-devtools-mcp/build/src/third_party/lighthouse-devtools-mcp-bundle.js"() {
    __create = Object.create;
    __defProp2 = Object.defineProperty;
    __getOwnPropDesc = Object.getOwnPropertyDescriptor;
    __getOwnPropNames2 = Object.getOwnPropertyNames;
    __getProtoOf = Object.getPrototypeOf;
    __hasOwnProp = Object.prototype.hasOwnProperty;
    __name = (target, value) => __defProp2(target, "name", { value, configurable: true });
    __esm2 = (fn, res) => function __init() {
      return fn && (res = (0, fn[__getOwnPropNames2(fn)[0]])(fn = 0)), res;
    };
    __commonJS = (cb, mod2) => function __require2() {
      return mod2 || (0, cb[__getOwnPropNames2(cb)[0]])((mod2 = { exports: {} }).exports, mod2), mod2.exports;
    };
    __export2 = (target, all) => {
      for (var name in all)
        __defProp2(target, name, { get: all[name], enumerable: true });
    };
    __copyProps = (to, from2, except, desc) => {
      if (from2 && typeof from2 === "object" || typeof from2 === "function") {
        for (let key of __getOwnPropNames2(from2))
          if (!__hasOwnProp.call(to, key) && key !== except)
            __defProp2(to, key, { get: () => from2[key], enumerable: !(desc = __getOwnPropDesc(from2, key)) || desc.enumerable });
      }
      return to;
    };
    __toESM = (mod2, isNodeMode, target) => (target = mod2 != null ? __create(__getProtoOf(mod2)) : {}, __copyProps(
      // If the importer is in node compatibility mode or this is not an ESM
      // file that has been converted to a CommonJS file using a Babel-
      // compatible transform (i.e. "__esModule" has not been set), then set
      // "default" to the CommonJS "module.exports" for node compatibility.
      isNodeMode || !mod2 || !mod2.__esModule ? __defProp2(target, "default", { value: mod2, enumerable: true }) : target,
      mod2
    ));
    __toCommonJS = (mod2) => __copyProps(__defProp2({}, "__esModule", { value: true }), mod2);
    init_process_global = __esm2({
      "build/process-global.js"() {
        "use strict";
        globalThis.process = process2;
      }
    });
    init_lh = __esm2({
      "types/lh.js"() {
        "use strict";
        init_process_global();
      }
    });
    init_base_gatherer = __esm2({
      "core/gather/base-gatherer.js"() {
        "use strict";
        init_process_global();
        init_lh();
        BaseGatherer = class {
          static {
            __name(this, "BaseGatherer");
          }
          /** @type {LH.Gatherer.GathererMeta} */
          meta = { supportedModes: [] };
          /**
           * Method to start observing a page for an arbitrary period of time.
           * @param {LH.Gatherer.Context} passContext
           * @return {Promise<void>|void}
           */
          startInstrumentation(passContext) {
          }
          /**
           * Method to start observing a page when the measurements are very sensitive and
           * should observe as little Lighthouse-induced work as possible.
           * @param {LH.Gatherer.Context} passContext
           * @return {Promise<void>|void}
           */
          startSensitiveInstrumentation(passContext) {
          }
          /**
           * Method to stop observing a page when the measurements are very sensitive and
           * should observe as little Lighthouse-induced work as possible.
           *
           * @param {LH.Gatherer.Context} passContext
           * @return {Promise<void>|void}
           */
          stopSensitiveInstrumentation(passContext) {
          }
          /**
           * Method to end observing a page after an arbitrary period of time.
           * @param {LH.Gatherer.Context} passContext
           * @return {Promise<void>|void}
           */
          stopInstrumentation(passContext) {
          }
          /**
           * Method to gather results about a page.
           * @param {LH.Gatherer.Context} passContext
           * @return {LH.Gatherer.PhaseResult}
           */
          getArtifact(passContext) {
          }
        };
        base_gatherer_default = BaseGatherer;
      }
    });
    trace_exports = {};
    __export2(trace_exports, {
      default: () => trace_default
    });
    init_trace = __esm2({
      "lh-gatherer-shim:/Users/alexrudenko/src/lighthouse/core/gather/gatherers/trace.js"() {
        init_process_global();
        init_base_gatherer();
        ShimGatherer = class extends base_gatherer_default {
          static {
            __name(this, "ShimGatherer");
          }
          meta = { supportedModes: ["navigation", "timespan", "snapshot"] };
          static getDefaultTraceCategories() {
            return [];
          }
          getArtifact() {
            return void 0;
          }
        };
        trace_default = ShimGatherer;
      }
    });
    require_ms = __commonJS({
      "node_modules/debug/node_modules/ms/index.js"(exports2, module2) {
        init_process_global();
        var s = 1e3;
        var m = s * 60;
        var h = m * 60;
        var d = h * 24;
        var w = d * 7;
        var y = d * 365.25;
        module2.exports = function(val, options2) {
          options2 = options2 || {};
          var type2 = typeof val;
          if (type2 === "string" && val.length > 0) {
            return parse2(val);
          } else if (type2 === "number" && isFinite(val)) {
            return options2.long ? fmtLong(val) : fmtShort(val);
          }
          throw new Error("val is not a non-empty string or a valid number. val=" + JSON.stringify(val));
        };
        function parse2(str) {
          str = String(str);
          if (str.length > 100) {
            return;
          }
          var match = /^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(str);
          if (!match) {
            return;
          }
          var n = parseFloat(match[1]);
          var type2 = (match[2] || "ms").toLowerCase();
          switch (type2) {
            case "years":
            case "year":
            case "yrs":
            case "yr":
            case "y":
              return n * y;
            case "weeks":
            case "week":
            case "w":
              return n * w;
            case "days":
            case "day":
            case "d":
              return n * d;
            case "hours":
            case "hour":
            case "hrs":
            case "hr":
            case "h":
              return n * h;
            case "minutes":
            case "minute":
            case "mins":
            case "min":
            case "m":
              return n * m;
            case "seconds":
            case "second":
            case "secs":
            case "sec":
            case "s":
              return n * s;
            case "milliseconds":
            case "millisecond":
            case "msecs":
            case "msec":
            case "ms":
              return n;
            default:
              return void 0;
          }
        }
        __name(parse2, "parse");
        function fmtShort(ms2) {
          var msAbs = Math.abs(ms2);
          if (msAbs >= d) {
            return Math.round(ms2 / d) + "d";
          }
          if (msAbs >= h) {
            return Math.round(ms2 / h) + "h";
          }
          if (msAbs >= m) {
            return Math.round(ms2 / m) + "m";
          }
          if (msAbs >= s) {
            return Math.round(ms2 / s) + "s";
          }
          return ms2 + "ms";
        }
        __name(fmtShort, "fmtShort");
        function fmtLong(ms2) {
          var msAbs = Math.abs(ms2);
          if (msAbs >= d) {
            return plural(ms2, msAbs, d, "day");
          }
          if (msAbs >= h) {
            return plural(ms2, msAbs, h, "hour");
          }
          if (msAbs >= m) {
            return plural(ms2, msAbs, m, "minute");
          }
          if (msAbs >= s) {
            return plural(ms2, msAbs, s, "second");
          }
          return ms2 + " ms";
        }
        __name(fmtLong, "fmtLong");
        function plural(ms2, msAbs, n, name) {
          var isPlural = msAbs >= n * 1.5;
          return Math.round(ms2 / n) + " " + name + (isPlural ? "s" : "");
        }
        __name(plural, "plural");
      }
    });
    require_common = __commonJS({
      "node_modules/debug/src/common.js"(exports2, module2) {
        init_process_global();
        function setup(env2) {
          createDebug.debug = createDebug;
          createDebug.default = createDebug;
          createDebug.coerce = coerce2;
          createDebug.disable = disable;
          createDebug.enable = enable;
          createDebug.enabled = enabled;
          createDebug.humanize = require_ms();
          createDebug.destroy = destroy;
          Object.keys(env2).forEach((key) => {
            createDebug[key] = env2[key];
          });
          createDebug.names = [];
          createDebug.skips = [];
          createDebug.formatters = {};
          function selectColor(namespace) {
            let hash = 0;
            for (let i = 0; i < namespace.length; i++) {
              hash = (hash << 5) - hash + namespace.charCodeAt(i);
              hash |= 0;
            }
            return createDebug.colors[Math.abs(hash) % createDebug.colors.length];
          }
          __name(selectColor, "selectColor");
          createDebug.selectColor = selectColor;
          function createDebug(namespace) {
            let prevTime;
            let enableOverride = null;
            let namespacesCache;
            let enabledCache;
            function debug2(...args2) {
              if (!debug2.enabled) {
                return;
              }
              const self2 = debug2;
              const curr = Number(/* @__PURE__ */ new Date());
              const ms2 = curr - (prevTime || curr);
              self2.diff = ms2;
              self2.prev = prevTime;
              self2.curr = curr;
              prevTime = curr;
              args2[0] = createDebug.coerce(args2[0]);
              if (typeof args2[0] !== "string") {
                args2.unshift("%O");
              }
              let index2 = 0;
              args2[0] = args2[0].replace(/%([a-zA-Z%])/g, (match, format2) => {
                if (match === "%%") {
                  return "%";
                }
                index2++;
                const formatter2 = createDebug.formatters[format2];
                if (typeof formatter2 === "function") {
                  const val = args2[index2];
                  match = formatter2.call(self2, val);
                  args2.splice(index2, 1);
                  index2--;
                }
                return match;
              });
              createDebug.formatArgs.call(self2, args2);
              const logFn = self2.log || createDebug.log;
              logFn.apply(self2, args2);
            }
            __name(debug2, "debug");
            debug2.namespace = namespace;
            debug2.useColors = createDebug.useColors();
            debug2.color = createDebug.selectColor(namespace);
            debug2.extend = extend2;
            debug2.destroy = createDebug.destroy;
            Object.defineProperty(debug2, "enabled", {
              enumerable: true,
              configurable: false,
              get: /* @__PURE__ */ __name(() => {
                if (enableOverride !== null) {
                  return enableOverride;
                }
                if (namespacesCache !== createDebug.namespaces) {
                  namespacesCache = createDebug.namespaces;
                  enabledCache = createDebug.enabled(namespace);
                }
                return enabledCache;
              }, "get"),
              set: /* @__PURE__ */ __name((v) => {
                enableOverride = v;
              }, "set")
            });
            if (typeof createDebug.init === "function") {
              createDebug.init(debug2);
            }
            return debug2;
          }
          __name(createDebug, "createDebug");
          function extend2(namespace, delimiter) {
            const newDebug = createDebug(this.namespace + (typeof delimiter === "undefined" ? ":" : delimiter) + namespace);
            newDebug.log = this.log;
            return newDebug;
          }
          __name(extend2, "extend");
          function enable(namespaces) {
            createDebug.save(namespaces);
            createDebug.namespaces = namespaces;
            createDebug.names = [];
            createDebug.skips = [];
            let i;
            const split = (typeof namespaces === "string" ? namespaces : "").split(/[\s,]+/);
            const len = split.length;
            for (i = 0; i < len; i++) {
              if (!split[i]) {
                continue;
              }
              namespaces = split[i].replace(/\*/g, ".*?");
              if (namespaces[0] === "-") {
                createDebug.skips.push(new RegExp("^" + namespaces.slice(1) + "$"));
              } else {
                createDebug.names.push(new RegExp("^" + namespaces + "$"));
              }
            }
          }
          __name(enable, "enable");
          function disable() {
            const namespaces = [
              ...createDebug.names.map(toNamespace),
              ...createDebug.skips.map(toNamespace).map((namespace) => "-" + namespace)
            ].join(",");
            createDebug.enable("");
            return namespaces;
          }
          __name(disable, "disable");
          function enabled(name) {
            if (name[name.length - 1] === "*") {
              return true;
            }
            let i;
            let len;
            for (i = 0, len = createDebug.skips.length; i < len; i++) {
              if (createDebug.skips[i].test(name)) {
                return false;
              }
            }
            for (i = 0, len = createDebug.names.length; i < len; i++) {
              if (createDebug.names[i].test(name)) {
                return true;
              }
            }
            return false;
          }
          __name(enabled, "enabled");
          function toNamespace(regexp) {
            return regexp.toString().substring(2, regexp.toString().length - 2).replace(/\.\*\?$/, "*");
          }
          __name(toNamespace, "toNamespace");
          function coerce2(val) {
            if (val instanceof Error) {
              return val.stack || val.message;
            }
            return val;
          }
          __name(coerce2, "coerce");
          function destroy() {
            console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");
          }
          __name(destroy, "destroy");
          createDebug.enable(createDebug.load());
          return createDebug;
        }
        __name(setup, "setup");
        module2.exports = setup;
      }
    });
    require_browser = __commonJS({
      "node_modules/debug/src/browser.js"(exports2, module2) {
        init_process_global();
        exports2.formatArgs = formatArgs2;
        exports2.save = save;
        exports2.load = load2;
        exports2.useColors = useColors;
        exports2.storage = localstorage();
        exports2.destroy = /* @__PURE__ */ (() => {
          let warned = false;
          return () => {
            if (!warned) {
              warned = true;
              console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");
            }
          };
        })();
        exports2.colors = [
          "#0000CC",
          "#0000FF",
          "#0033CC",
          "#0033FF",
          "#0066CC",
          "#0066FF",
          "#0099CC",
          "#0099FF",
          "#00CC00",
          "#00CC33",
          "#00CC66",
          "#00CC99",
          "#00CCCC",
          "#00CCFF",
          "#3300CC",
          "#3300FF",
          "#3333CC",
          "#3333FF",
          "#3366CC",
          "#3366FF",
          "#3399CC",
          "#3399FF",
          "#33CC00",
          "#33CC33",
          "#33CC66",
          "#33CC99",
          "#33CCCC",
          "#33CCFF",
          "#6600CC",
          "#6600FF",
          "#6633CC",
          "#6633FF",
          "#66CC00",
          "#66CC33",
          "#9900CC",
          "#9900FF",
          "#9933CC",
          "#9933FF",
          "#99CC00",
          "#99CC33",
          "#CC0000",
          "#CC0033",
          "#CC0066",
          "#CC0099",
          "#CC00CC",
          "#CC00FF",
          "#CC3300",
          "#CC3333",
          "#CC3366",
          "#CC3399",
          "#CC33CC",
          "#CC33FF",
          "#CC6600",
          "#CC6633",
          "#CC9900",
          "#CC9933",
          "#CCCC00",
          "#CCCC33",
          "#FF0000",
          "#FF0033",
          "#FF0066",
          "#FF0099",
          "#FF00CC",
          "#FF00FF",
          "#FF3300",
          "#FF3333",
          "#FF3366",
          "#FF3399",
          "#FF33CC",
          "#FF33FF",
          "#FF6600",
          "#FF6633",
          "#FF9900",
          "#FF9933",
          "#FFCC00",
          "#FFCC33"
        ];
        function useColors() {
          if (typeof window !== "undefined" && window.process && (window.process.type === "renderer" || window.process.__nwjs)) {
            return true;
          }
          if (typeof navigator !== "undefined" && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)) {
            return false;
          }
          return typeof document !== "undefined" && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance || // Is firebug? http://stackoverflow.com/a/398120/376773
          typeof window !== "undefined" && window.console && (window.console.firebug || window.console.exception && window.console.table) || // Is firefox >= v31?
          // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages
          typeof navigator !== "undefined" && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/) && parseInt(RegExp.$1, 10) >= 31 || // Double check webkit in userAgent just in case we are in a worker
          typeof navigator !== "undefined" && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/);
        }
        __name(useColors, "useColors");
        function formatArgs2(args2) {
          args2[0] = (this.useColors ? "%c" : "") + this.namespace + (this.useColors ? " %c" : " ") + args2[0] + (this.useColors ? "%c " : " ") + "+" + module2.exports.humanize(this.diff);
          if (!this.useColors) {
            return;
          }
          const c = "color: " + this.color;
          args2.splice(1, 0, c, "color: inherit");
          let index2 = 0;
          let lastC = 0;
          args2[0].replace(/%[a-zA-Z%]/g, (match) => {
            if (match === "%%") {
              return;
            }
            index2++;
            if (match === "%c") {
              lastC = index2;
            }
          });
          args2.splice(lastC, 0, c);
        }
        __name(formatArgs2, "formatArgs");
        exports2.log = console.debug || console.log || (() => {
        });
        function save(namespaces) {
          try {
            if (namespaces) {
              exports2.storage.setItem("debug", namespaces);
            } else {
              exports2.storage.removeItem("debug");
            }
          } catch (error) {
          }
        }
        __name(save, "save");
        function load2() {
          let r;
          try {
            r = exports2.storage.getItem("debug");
          } catch (error) {
          }
          if (!r && typeof process !== "undefined" && "env" in process) {
            r = process.env.DEBUG;
          }
          return r;
        }
        __name(load2, "load");
        function localstorage() {
          try {
            return localStorage;
          } catch (error) {
          }
        }
        __name(localstorage, "localstorage");
        module2.exports = require_common()(exports2);
        var { formatters } = module2.exports;
        formatters.j = function(v) {
          try {
            return JSON.stringify(v);
          } catch (error) {
            return "[UnexpectedJSONParseError]: " + error.message;
          }
        };
      }
    });
    require_marky_cjs = __commonJS({
      "node_modules/marky/lib/marky.cjs.js"(exports2) {
        "use strict";
        init_process_global();
        Object.defineProperty(exports2, "__esModule", { value: true });
        var perf = typeof performance !== "undefined" && performance;
        var nowForNode;
        {
          hrtime = process.hrtime;
          getNanoSeconds = /* @__PURE__ */ __name(function() {
            var hr2 = hrtime();
            return hr2[0] * 1e9 + hr2[1];
          }, "getNanoSeconds");
          loadTime = getNanoSeconds();
          nowForNode = /* @__PURE__ */ __name(function() {
            return (getNanoSeconds() - loadTime) / 1e6;
          }, "nowForNode");
        }
        var hrtime;
        var getNanoSeconds;
        var loadTime;
        var now = nowForNode;
        function throwIfEmpty2(name) {
          if (!name) {
            throw new Error("name must be non-empty");
          }
        }
        __name(throwIfEmpty2, "throwIfEmpty");
        function insertSorted(arr, item) {
          var low = 0;
          var high = arr.length;
          var mid;
          while (low < high) {
            mid = low + high >>> 1;
            if (arr[mid].startTime < item.startTime) {
              low = mid + 1;
            } else {
              high = mid;
            }
          }
          arr.splice(low, 0, item);
        }
        __name(insertSorted, "insertSorted");
        exports2.mark = void 0;
        exports2.stop = void 0;
        exports2.getEntries = void 0;
        exports2.clear = void 0;
        if (perf && perf.mark && perf.getEntriesByName && perf.getEntriesByType && perf.clearMeasures) {
          exports2.mark = function(name) {
            throwIfEmpty2(name);
            perf.mark("start " + name);
          };
          exports2.stop = function(name) {
            throwIfEmpty2(name);
            perf.mark("end " + name);
            perf.measure(name, "start " + name, "end " + name);
            var entries2 = perf.getEntriesByName(name);
            return entries2[entries2.length - 1];
          };
          exports2.getEntries = function() {
            return perf.getEntriesByType("measure");
          };
          exports2.clear = function() {
            perf.clearMarks();
            perf.clearMeasures();
          };
        } else {
          marks = {};
          entries = [];
          exports2.mark = function(name) {
            throwIfEmpty2(name);
            var startTime = now();
            marks["$" + name] = startTime;
          };
          exports2.stop = function(name) {
            throwIfEmpty2(name);
            var endTime = now();
            var startTime = marks["$" + name];
            if (!startTime) {
              throw new Error("no known mark: " + name);
            }
            var entry = {
              startTime,
              name,
              duration: endTime - startTime,
              entryType: "measure"
            };
            insertSorted(entries, entry);
            return entry;
          };
          exports2.getEntries = function() {
            return entries;
          };
          exports2.clear = function() {
            marks = {};
            entries = [];
          };
        }
        var marks;
        var entries;
      }
    });
    init_lighthouse_logger = __esm2({
      "lighthouse-logger/index.js"() {
        "use strict";
        init_process_global();
        import_debug = __toESM(require_browser(), 1);
        marky = __toESM(require_marky_cjs(), 1);
        isWindows = process3.platform === "win32";
        isBrowser = process3.browser;
        colors = {
          red: isBrowser ? "crimson" : 1,
          yellow: isBrowser ? "gold" : 3,
          cyan: isBrowser ? "darkturquoise" : 6,
          green: isBrowser ? "forestgreen" : 2,
          blue: isBrowser ? "steelblue" : 4,
          magenta: isBrowser ? "palevioletred" : 5
        };
        import_debug.default.colors = [colors.cyan, colors.green, colors.blue, colors.magenta];
        Emitter = class extends EventEmitter {
          static {
            __name(this, "Emitter");
          }
          // yarn build-types fails without this!
          // https://github.com/microsoft/TypeScript/issues/41672#issuecomment-2303803072
          constructor(options2) {
            super(options2);
          }
          /**
           * Fires off all status updates. Listen with
           * `require('lib/log').events.addListener('status', callback)`
           * @param {string} title
           * @param {!Array<*>} argsArray
           */
          issueStatus(title2, argsArray) {
            if (title2 === "status" || title2 === "statusEnd") {
              this.emit(title2, [title2, ...argsArray]);
            }
          }
          /**
           * Fires off all warnings. Listen with
           * `require('lib/log').events.addListener('warning', callback)`
           * @param {string} title
           * @param {!Array<*>} argsArray
           */
          issueWarning(title2, argsArray) {
            this.emit("warning", [title2, ...argsArray]);
          }
        };
        loggersByTitle = {};
        loggingBufferColumns = 25;
        Log = class _Log {
          static {
            __name(this, "Log");
          }
          static _logToStdErr(title2, argsArray) {
            const log = _Log.loggerfn(title2);
            log(...argsArray);
          }
          /**
           * @param {string} title
           */
          static loggerfn(title2) {
            title2 = `LH:${title2}`;
            let log = loggersByTitle[title2];
            if (!log) {
              log = (0, import_debug.default)(title2);
              loggersByTitle[title2] = log;
              if (title2.endsWith("error")) {
                log.color = colors.red;
              } else if (title2.endsWith("warn")) {
                log.color = colors.yellow;
              }
            }
            return log;
          }
          /**
           * @param {string} level
           */
          static setLevel(level) {
            level_ = level;
            switch (level) {
              case "silent":
                import_debug.default.enable("-LH:*");
                break;
              case "verbose":
                import_debug.default.enable("LH:*");
                break;
              case "warn":
                import_debug.default.enable("-LH:*, LH:*:warn, LH:*:error");
                break;
              case "error":
                import_debug.default.enable("-LH:*, LH:*:error");
                break;
              default:
                import_debug.default.enable("LH:*, -LH:*:verbose");
            }
          }
          /**
           * A simple formatting utility for event logging.
           * @param {string} prefix
           * @param {!Object} data A JSON-serializable object of event data to log.
           * @param {string=} level Optional logging level. Defaults to 'log'.
           */
          static formatProtocol(prefix, data312, level) {
            const columns = !process3 || process3.browser ? Infinity : process3.stdout.columns;
            const method = data312.method || "?????";
            const maxLength = columns - method.length - prefix.length - loggingBufferColumns;
            const snippet = data312.params && method !== "IO.read" ? JSON.stringify(data312.params).substr(0, maxLength) : "";
            _Log._logToStdErr(`${prefix}:${level || ""}`, [method, snippet]);
          }
          /**
           * @return {boolean}
           */
          static isVerbose() {
            return level_ === "verbose";
          }
          /**
           * @param {{msg: string, id: string, args?: any[]}} status
           * @param {string} level
           */
          static time({ msg, id: id2, args: args2 = [] }, level = "log") {
            marky.mark(id2);
            _Log[level]("status", msg, ...args2);
          }
          /**
           * @param {{msg: string, id: string, args?: any[]}} status
           * @param {string} level
           */
          static timeEnd({ msg, id: id2, args: args2 = [] }, level = "verbose") {
            _Log[level]("statusEnd", msg, ...args2);
            marky.stop(id2);
          }
          /**
           * @param {string} title
           * @param {...any} args
           */
          static log(title2, ...args2) {
            _Log.events.issueStatus(title2, args2);
            return _Log._logToStdErr(title2, args2);
          }
          /**
           * @param {string} title
           * @param {...any} args
           */
          static warn(title2, ...args2) {
            _Log.events.issueWarning(title2, args2);
            return _Log._logToStdErr(`${title2}:warn`, args2);
          }
          /**
           * @param {string} title
           * @param {...any} args
           */
          static error(title2, ...args2) {
            return _Log._logToStdErr(`${title2}:error`, args2);
          }
          /**
           * @param {string} title
           * @param {...any} args
           */
          static verbose(title2, ...args2) {
            _Log.events.issueStatus(title2, args2);
            return _Log._logToStdErr(`${title2}:verbose`, args2);
          }
          /**
           * Add surrounding escape sequences to turn a string green when logged.
           * @param {string} str
           * @return {string}
           */
          static greenify(str) {
            return `${_Log.green}${str}${_Log.reset}`;
          }
          /**
           * Add surrounding escape sequences to turn a string red when logged.
           * @param {string} str
           * @return {string}
           */
          static redify(str) {
            return `${_Log.red}${str}${_Log.reset}`;
          }
          static get green() {
            return "\x1B[32m";
          }
          static get red() {
            return "\x1B[31m";
          }
          static get yellow() {
            return "\x1B[33m";
          }
          static get purple() {
            return "\x1B[95m";
          }
          static get reset() {
            return "\x1B[0m";
          }
          static get bold() {
            return "\x1B[1m";
          }
          static get dim() {
            return "\x1B[2m";
          }
          static get tick() {
            return isWindows ? "\u221A" : "\u2713";
          }
          static get cross() {
            return isWindows ? "\xD7" : "\u2718";
          }
          static get whiteSmallSquare() {
            return isWindows ? "\u0387" : "\u25AB";
          }
          static get heavyHorizontal() {
            return isWindows ? "\u2500" : "\u2501";
          }
          static get heavyVertical() {
            return isWindows ? "\u2502 " : "\u2503 ";
          }
          static get heavyUpAndRight() {
            return isWindows ? "\u2514" : "\u2517";
          }
          static get heavyVerticalAndRight() {
            return isWindows ? "\u251C" : "\u2523";
          }
          static get heavyDownAndHorizontal() {
            return isWindows ? "\u252C" : "\u2533";
          }
          static get doubleLightHorizontal() {
            return "\u2500\u2500";
          }
        };
        Log.events = new Emitter();
        Log.takeTimeEntries = () => {
          const entries = marky.getEntries();
          marky.clear();
          return entries;
        };
        Log.getTimeEntries = () => marky.getEntries();
        lighthouse_logger_default = Log;
      }
    });
    init_freeGlobal = __esm2({
      "node_modules/lodash-es/_freeGlobal.js"() {
        init_process_global();
        freeGlobal = typeof global == "object" && global && global.Object === Object && global;
        freeGlobal_default = freeGlobal;
      }
    });
    init_root = __esm2({
      "node_modules/lodash-es/_root.js"() {
        init_process_global();
        init_freeGlobal();
        freeSelf = typeof self == "object" && self && self.Object === Object && self;
        root = freeGlobal_default || freeSelf || Function("return this")();
        root_default = root;
      }
    });
    init_Symbol = __esm2({
      "node_modules/lodash-es/_Symbol.js"() {
        init_process_global();
        init_root();
        Symbol2 = root_default.Symbol;
        Symbol_default = Symbol2;
      }
    });
    init_getRawTag = __esm2({
      "node_modules/lodash-es/_getRawTag.js"() {
        init_process_global();
        init_Symbol();
        objectProto = Object.prototype;
        hasOwnProperty = objectProto.hasOwnProperty;
        nativeObjectToString = objectProto.toString;
        symToStringTag = Symbol_default ? Symbol_default.toStringTag : void 0;
        __name(getRawTag, "getRawTag");
        getRawTag_default = getRawTag;
      }
    });
    init_objectToString = __esm2({
      "node_modules/lodash-es/_objectToString.js"() {
        init_process_global();
        objectProto2 = Object.prototype;
        nativeObjectToString2 = objectProto2.toString;
        __name(objectToString, "objectToString");
        objectToString_default = objectToString;
      }
    });
    init_baseGetTag = __esm2({
      "node_modules/lodash-es/_baseGetTag.js"() {
        init_process_global();
        init_Symbol();
        init_getRawTag();
        init_objectToString();
        nullTag = "[object Null]";
        undefinedTag = "[object Undefined]";
        symToStringTag2 = Symbol_default ? Symbol_default.toStringTag : void 0;
        __name(baseGetTag, "baseGetTag");
        baseGetTag_default = baseGetTag;
      }
    });
    init_isObjectLike = __esm2({
      "node_modules/lodash-es/isObjectLike.js"() {
        init_process_global();
        __name(isObjectLike, "isObjectLike");
        isObjectLike_default = isObjectLike;
      }
    });
    init_isArray = __esm2({
      "node_modules/lodash-es/isArray.js"() {
        init_process_global();
        isArray = Array.isArray;
        isArray_default = isArray;
      }
    });
    init_isObject = __esm2({
      "node_modules/lodash-es/isObject.js"() {
        init_process_global();
        __name(isObject, "isObject");
        isObject_default = isObject;
      }
    });
    init_isFunction = __esm2({
      "node_modules/lodash-es/isFunction.js"() {
        init_process_global();
        init_baseGetTag();
        init_isObject();
        asyncTag = "[object AsyncFunction]";
        funcTag = "[object Function]";
        genTag = "[object GeneratorFunction]";
        proxyTag = "[object Proxy]";
        __name(isFunction, "isFunction");
        isFunction_default = isFunction;
      }
    });
    init_coreJsData = __esm2({
      "node_modules/lodash-es/_coreJsData.js"() {
        init_process_global();
        init_root();
        coreJsData = root_default["__core-js_shared__"];
        coreJsData_default = coreJsData;
      }
    });
    init_isMasked = __esm2({
      "node_modules/lodash-es/_isMasked.js"() {
        init_process_global();
        init_coreJsData();
        maskSrcKey = function() {
          var uid2 = /[^.]+$/.exec(coreJsData_default && coreJsData_default.keys && coreJsData_default.keys.IE_PROTO || "");
          return uid2 ? "Symbol(src)_1." + uid2 : "";
        }();
        __name(isMasked, "isMasked");
        isMasked_default = isMasked;
      }
    });
    init_toSource = __esm2({
      "node_modules/lodash-es/_toSource.js"() {
        init_process_global();
        funcProto = Function.prototype;
        funcToString = funcProto.toString;
        __name(toSource, "toSource");
        toSource_default = toSource;
      }
    });
    init_baseIsNative = __esm2({
      "node_modules/lodash-es/_baseIsNative.js"() {
        init_process_global();
        init_isFunction();
        init_isMasked();
        init_isObject();
        init_toSource();
        reRegExpChar = /[\\^$.*+?()[\]{}|]/g;
        reIsHostCtor = /^\[object .+?Constructor\]$/;
        funcProto2 = Function.prototype;
        objectProto3 = Object.prototype;
        funcToString2 = funcProto2.toString;
        hasOwnProperty2 = objectProto3.hasOwnProperty;
        reIsNative = RegExp("^" + funcToString2.call(hasOwnProperty2).replace(reRegExpChar, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$");
        __name(baseIsNative, "baseIsNative");
        baseIsNative_default = baseIsNative;
      }
    });
    init_getValue = __esm2({
      "node_modules/lodash-es/_getValue.js"() {
        init_process_global();
        __name(getValue, "getValue");
        getValue_default = getValue;
      }
    });
    init_getNative = __esm2({
      "node_modules/lodash-es/_getNative.js"() {
        init_process_global();
        init_baseIsNative();
        init_getValue();
        __name(getNative, "getNative");
        getNative_default = getNative;
      }
    });
    init_WeakMap = __esm2({
      "node_modules/lodash-es/_WeakMap.js"() {
        init_process_global();
        init_getNative();
        init_root();
        WeakMap2 = getNative_default(root_default, "WeakMap");
        WeakMap_default = WeakMap2;
      }
    });
    init_isIndex = __esm2({
      "node_modules/lodash-es/_isIndex.js"() {
        init_process_global();
        MAX_SAFE_INTEGER = 9007199254740991;
        reIsUint = /^(?:0|[1-9]\d*)$/;
        __name(isIndex, "isIndex");
        isIndex_default = isIndex;
      }
    });
    init_eq = __esm2({
      "node_modules/lodash-es/eq.js"() {
        init_process_global();
        __name(eq, "eq");
        eq_default = eq;
      }
    });
    init_isLength = __esm2({
      "node_modules/lodash-es/isLength.js"() {
        init_process_global();
        MAX_SAFE_INTEGER2 = 9007199254740991;
        __name(isLength, "isLength");
        isLength_default = isLength;
      }
    });
    init_isArrayLike = __esm2({
      "node_modules/lodash-es/isArrayLike.js"() {
        init_process_global();
        init_isFunction();
        init_isLength();
        __name(isArrayLike, "isArrayLike");
        isArrayLike_default = isArrayLike;
      }
    });
    init_isPrototype = __esm2({
      "node_modules/lodash-es/_isPrototype.js"() {
        init_process_global();
        objectProto4 = Object.prototype;
        __name(isPrototype, "isPrototype");
        isPrototype_default = isPrototype;
      }
    });
    init_baseTimes = __esm2({
      "node_modules/lodash-es/_baseTimes.js"() {
        init_process_global();
        __name(baseTimes, "baseTimes");
        baseTimes_default = baseTimes;
      }
    });
    init_baseIsArguments = __esm2({
      "node_modules/lodash-es/_baseIsArguments.js"() {
        init_process_global();
        init_baseGetTag();
        init_isObjectLike();
        argsTag = "[object Arguments]";
        __name(baseIsArguments, "baseIsArguments");
        baseIsArguments_default = baseIsArguments;
      }
    });
    init_isArguments = __esm2({
      "node_modules/lodash-es/isArguments.js"() {
        init_process_global();
        init_baseIsArguments();
        init_isObjectLike();
        objectProto5 = Object.prototype;
        hasOwnProperty3 = objectProto5.hasOwnProperty;
        propertyIsEnumerable = objectProto5.propertyIsEnumerable;
        isArguments = baseIsArguments_default(/* @__PURE__ */ function() {
          return arguments;
        }()) ? baseIsArguments_default : function(value) {
          return isObjectLike_default(value) && hasOwnProperty3.call(value, "callee") && !propertyIsEnumerable.call(value, "callee");
        };
        isArguments_default = isArguments;
      }
    });
    init_stubFalse = __esm2({
      "node_modules/lodash-es/stubFalse.js"() {
        init_process_global();
        __name(stubFalse, "stubFalse");
        stubFalse_default = stubFalse;
      }
    });
    init_isBuffer = __esm2({
      "node_modules/lodash-es/isBuffer.js"() {
        init_process_global();
        init_root();
        init_stubFalse();
        freeExports = typeof exports == "object" && exports && !exports.nodeType && exports;
        freeModule = freeExports && typeof module == "object" && module && !module.nodeType && module;
        moduleExports = freeModule && freeModule.exports === freeExports;
        Buffer2 = moduleExports ? root_default.Buffer : void 0;
        nativeIsBuffer = Buffer2 ? Buffer2.isBuffer : void 0;
        isBuffer = nativeIsBuffer || stubFalse_default;
        isBuffer_default = isBuffer;
      }
    });
    init_baseIsTypedArray = __esm2({
      "node_modules/lodash-es/_baseIsTypedArray.js"() {
        init_process_global();
        init_baseGetTag();
        init_isLength();
        init_isObjectLike();
        argsTag2 = "[object Arguments]";
        arrayTag = "[object Array]";
        boolTag = "[object Boolean]";
        dateTag = "[object Date]";
        errorTag = "[object Error]";
        funcTag2 = "[object Function]";
        mapTag = "[object Map]";
        numberTag = "[object Number]";
        objectTag = "[object Object]";
        regexpTag = "[object RegExp]";
        setTag = "[object Set]";
        stringTag = "[object String]";
        weakMapTag = "[object WeakMap]";
        arrayBufferTag = "[object ArrayBuffer]";
        dataViewTag = "[object DataView]";
        float32Tag = "[object Float32Array]";
        float64Tag = "[object Float64Array]";
        int8Tag = "[object Int8Array]";
        int16Tag = "[object Int16Array]";
        int32Tag = "[object Int32Array]";
        uint8Tag = "[object Uint8Array]";
        uint8ClampedTag = "[object Uint8ClampedArray]";
        uint16Tag = "[object Uint16Array]";
        uint32Tag = "[object Uint32Array]";
        typedArrayTags = {};
        typedArrayTags[float32Tag] = typedArrayTags[float64Tag] = typedArrayTags[int8Tag] = typedArrayTags[int16Tag] = typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] = typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] = typedArrayTags[uint32Tag] = true;
        typedArrayTags[argsTag2] = typedArrayTags[arrayTag] = typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] = typedArrayTags[dataViewTag] = typedArrayTags[dateTag] = typedArrayTags[errorTag] = typedArrayTags[funcTag2] = typedArrayTags[mapTag] = typedArrayTags[numberTag] = typedArrayTags[objectTag] = typedArrayTags[regexpTag] = typedArrayTags[setTag] = typedArrayTags[stringTag] = typedArrayTags[weakMapTag] = false;
        __name(baseIsTypedArray, "baseIsTypedArray");
        baseIsTypedArray_default = baseIsTypedArray;
      }
    });
    init_baseUnary = __esm2({
      "node_modules/lodash-es/_baseUnary.js"() {
        init_process_global();
        __name(baseUnary, "baseUnary");
        baseUnary_default = baseUnary;
      }
    });
    init_nodeUtil = __esm2({
      "node_modules/lodash-es/_nodeUtil.js"() {
        init_process_global();
        init_freeGlobal();
        freeExports2 = typeof exports == "object" && exports && !exports.nodeType && exports;
        freeModule2 = freeExports2 && typeof module == "object" && module && !module.nodeType && module;
        moduleExports2 = freeModule2 && freeModule2.exports === freeExports2;
        freeProcess = moduleExports2 && freeGlobal_default.process;
        nodeUtil = function() {
          try {
            var types2 = freeModule2 && freeModule2.require && freeModule2.require("util").types;
            if (types2) {
              return types2;
            }
            return freeProcess && freeProcess.binding && freeProcess.binding("util");
          } catch (e) {
          }
        }();
        nodeUtil_default = nodeUtil;
      }
    });
    init_isTypedArray = __esm2({
      "node_modules/lodash-es/isTypedArray.js"() {
        init_process_global();
        init_baseIsTypedArray();
        init_baseUnary();
        init_nodeUtil();
        nodeIsTypedArray = nodeUtil_default && nodeUtil_default.isTypedArray;
        isTypedArray = nodeIsTypedArray ? baseUnary_default(nodeIsTypedArray) : baseIsTypedArray_default;
        isTypedArray_default = isTypedArray;
      }
    });
    init_arrayLikeKeys = __esm2({
      "node_modules/lodash-es/_arrayLikeKeys.js"() {
        init_process_global();
        init_baseTimes();
        init_isArguments();
        init_isArray();
        init_isBuffer();
        init_isIndex();
        init_isTypedArray();
        objectProto6 = Object.prototype;
        hasOwnProperty4 = objectProto6.hasOwnProperty;
        __name(arrayLikeKeys, "arrayLikeKeys");
        arrayLikeKeys_default = arrayLikeKeys;
      }
    });
    init_overArg = __esm2({
      "node_modules/lodash-es/_overArg.js"() {
        init_process_global();
        __name(overArg, "overArg");
        overArg_default = overArg;
      }
    });
    init_nativeKeys = __esm2({
      "node_modules/lodash-es/_nativeKeys.js"() {
        init_process_global();
        init_overArg();
        nativeKeys = overArg_default(Object.keys, Object);
        nativeKeys_default = nativeKeys;
      }
    });
    init_baseKeys = __esm2({
      "node_modules/lodash-es/_baseKeys.js"() {
        init_process_global();
        init_isPrototype();
        init_nativeKeys();
        objectProto7 = Object.prototype;
        hasOwnProperty5 = objectProto7.hasOwnProperty;
        __name(baseKeys, "baseKeys");
        baseKeys_default = baseKeys;
      }
    });
    init_keys = __esm2({
      "node_modules/lodash-es/keys.js"() {
        init_process_global();
        init_arrayLikeKeys();
        init_baseKeys();
        init_isArrayLike();
        __name(keys, "keys");
        keys_default = keys;
      }
    });
    init_nativeCreate = __esm2({
      "node_modules/lodash-es/_nativeCreate.js"() {
        init_process_global();
        init_getNative();
        nativeCreate = getNative_default(Object, "create");
        nativeCreate_default = nativeCreate;
      }
    });
    init_hashClear = __esm2({
      "node_modules/lodash-es/_hashClear.js"() {
        init_process_global();
        init_nativeCreate();
        __name(hashClear, "hashClear");
        hashClear_default = hashClear;
      }
    });
    init_hashDelete = __esm2({
      "node_modules/lodash-es/_hashDelete.js"() {
        init_process_global();
        __name(hashDelete, "hashDelete");
        hashDelete_default = hashDelete;
      }
    });
    init_hashGet = __esm2({
      "node_modules/lodash-es/_hashGet.js"() {
        init_process_global();
        init_nativeCreate();
        HASH_UNDEFINED = "__lodash_hash_undefined__";
        objectProto8 = Object.prototype;
        hasOwnProperty6 = objectProto8.hasOwnProperty;
        __name(hashGet, "hashGet");
        hashGet_default = hashGet;
      }
    });
    init_hashHas = __esm2({
      "node_modules/lodash-es/_hashHas.js"() {
        init_process_global();
        init_nativeCreate();
        objectProto9 = Object.prototype;
        hasOwnProperty7 = objectProto9.hasOwnProperty;
        __name(hashHas, "hashHas");
        hashHas_default = hashHas;
      }
    });
    init_hashSet = __esm2({
      "node_modules/lodash-es/_hashSet.js"() {
        init_process_global();
        init_nativeCreate();
        HASH_UNDEFINED2 = "__lodash_hash_undefined__";
        __name(hashSet, "hashSet");
        hashSet_default = hashSet;
      }
    });
    init_Hash = __esm2({
      "node_modules/lodash-es/_Hash.js"() {
        init_process_global();
        init_hashClear();
        init_hashDelete();
        init_hashGet();
        init_hashHas();
        init_hashSet();
        __name(Hash, "Hash");
        Hash.prototype.clear = hashClear_default;
        Hash.prototype["delete"] = hashDelete_default;
        Hash.prototype.get = hashGet_default;
        Hash.prototype.has = hashHas_default;
        Hash.prototype.set = hashSet_default;
        Hash_default = Hash;
      }
    });
    init_listCacheClear = __esm2({
      "node_modules/lodash-es/_listCacheClear.js"() {
        init_process_global();
        __name(listCacheClear, "listCacheClear");
        listCacheClear_default = listCacheClear;
      }
    });
    init_assocIndexOf = __esm2({
      "node_modules/lodash-es/_assocIndexOf.js"() {
        init_process_global();
        init_eq();
        __name(assocIndexOf, "assocIndexOf");
        assocIndexOf_default = assocIndexOf;
      }
    });
    init_listCacheDelete = __esm2({
      "node_modules/lodash-es/_listCacheDelete.js"() {
        init_process_global();
        init_assocIndexOf();
        arrayProto = Array.prototype;
        splice = arrayProto.splice;
        __name(listCacheDelete, "listCacheDelete");
        listCacheDelete_default = listCacheDelete;
      }
    });
    init_listCacheGet = __esm2({
      "node_modules/lodash-es/_listCacheGet.js"() {
        init_process_global();
        init_assocIndexOf();
        __name(listCacheGet, "listCacheGet");
        listCacheGet_default = listCacheGet;
      }
    });
    init_listCacheHas = __esm2({
      "node_modules/lodash-es/_listCacheHas.js"() {
        init_process_global();
        init_assocIndexOf();
        __name(listCacheHas, "listCacheHas");
        listCacheHas_default = listCacheHas;
      }
    });
    init_listCacheSet = __esm2({
      "node_modules/lodash-es/_listCacheSet.js"() {
        init_process_global();
        init_assocIndexOf();
        __name(listCacheSet, "listCacheSet");
        listCacheSet_default = listCacheSet;
      }
    });
    init_ListCache = __esm2({
      "node_modules/lodash-es/_ListCache.js"() {
        init_process_global();
        init_listCacheClear();
        init_listCacheDelete();
        init_listCacheGet();
        init_listCacheHas();
        init_listCacheSet();
        __name(ListCache, "ListCache");
        ListCache.prototype.clear = listCacheClear_default;
        ListCache.prototype["delete"] = listCacheDelete_default;
        ListCache.prototype.get = listCacheGet_default;
        ListCache.prototype.has = listCacheHas_default;
        ListCache.prototype.set = listCacheSet_default;
        ListCache_default = ListCache;
      }
    });
    init_Map = __esm2({
      "node_modules/lodash-es/_Map.js"() {
        init_process_global();
        init_getNative();
        init_root();
        Map2 = getNative_default(root_default, "Map");
        Map_default = Map2;
      }
    });
    init_mapCacheClear = __esm2({
      "node_modules/lodash-es/_mapCacheClear.js"() {
        init_process_global();
        init_Hash();
        init_ListCache();
        init_Map();
        __name(mapCacheClear, "mapCacheClear");
        mapCacheClear_default = mapCacheClear;
      }
    });
    init_isKeyable = __esm2({
      "node_modules/lodash-es/_isKeyable.js"() {
        init_process_global();
        __name(isKeyable, "isKeyable");
        isKeyable_default = isKeyable;
      }
    });
    init_getMapData = __esm2({
      "node_modules/lodash-es/_getMapData.js"() {
        init_process_global();
        init_isKeyable();
        __name(getMapData, "getMapData");
        getMapData_default = getMapData;
      }
    });
    init_mapCacheDelete = __esm2({
      "node_modules/lodash-es/_mapCacheDelete.js"() {
        init_process_global();
        init_getMapData();
        __name(mapCacheDelete, "mapCacheDelete");
        mapCacheDelete_default = mapCacheDelete;
      }
    });
    init_mapCacheGet = __esm2({
      "node_modules/lodash-es/_mapCacheGet.js"() {
        init_process_global();
        init_getMapData();
        __name(mapCacheGet, "mapCacheGet");
        mapCacheGet_default = mapCacheGet;
      }
    });
    init_mapCacheHas = __esm2({
      "node_modules/lodash-es/_mapCacheHas.js"() {
        init_process_global();
        init_getMapData();
        __name(mapCacheHas, "mapCacheHas");
        mapCacheHas_default = mapCacheHas;
      }
    });
    init_mapCacheSet = __esm2({
      "node_modules/lodash-es/_mapCacheSet.js"() {
        init_process_global();
        init_getMapData();
        __name(mapCacheSet, "mapCacheSet");
        mapCacheSet_default = mapCacheSet;
      }
    });
    init_MapCache = __esm2({
      "node_modules/lodash-es/_MapCache.js"() {
        init_process_global();
        init_mapCacheClear();
        init_mapCacheDelete();
        init_mapCacheGet();
        init_mapCacheHas();
        init_mapCacheSet();
        __name(MapCache, "MapCache");
        MapCache.prototype.clear = mapCacheClear_default;
        MapCache.prototype["delete"] = mapCacheDelete_default;
        MapCache.prototype.get = mapCacheGet_default;
        MapCache.prototype.has = mapCacheHas_default;
        MapCache.prototype.set = mapCacheSet_default;
        MapCache_default = MapCache;
      }
    });
    init_arrayPush = __esm2({
      "node_modules/lodash-es/_arrayPush.js"() {
        init_process_global();
        __name(arrayPush, "arrayPush");
        arrayPush_default = arrayPush;
      }
    });
    init_stackClear = __esm2({
      "node_modules/lodash-es/_stackClear.js"() {
        init_process_global();
        init_ListCache();
        __name(stackClear, "stackClear");
        stackClear_default = stackClear;
      }
    });
    init_stackDelete = __esm2({
      "node_modules/lodash-es/_stackDelete.js"() {
        init_process_global();
        __name(stackDelete, "stackDelete");
        stackDelete_default = stackDelete;
      }
    });
    init_stackGet = __esm2({
      "node_modules/lodash-es/_stackGet.js"() {
        init_process_global();
        __name(stackGet, "stackGet");
        stackGet_default = stackGet;
      }
    });
    init_stackHas = __esm2({
      "node_modules/lodash-es/_stackHas.js"() {
        init_process_global();
        __name(stackHas, "stackHas");
        stackHas_default = stackHas;
      }
    });
    init_stackSet = __esm2({
      "node_modules/lodash-es/_stackSet.js"() {
        init_process_global();
        init_ListCache();
        init_Map();
        init_MapCache();
        LARGE_ARRAY_SIZE = 200;
        __name(stackSet, "stackSet");
        stackSet_default = stackSet;
      }
    });
    init_Stack = __esm2({
      "node_modules/lodash-es/_Stack.js"() {
        init_process_global();
        init_ListCache();
        init_stackClear();
        init_stackDelete();
        init_stackGet();
        init_stackHas();
        init_stackSet();
        __name(Stack, "Stack");
        Stack.prototype.clear = stackClear_default;
        Stack.prototype["delete"] = stackDelete_default;
        Stack.prototype.get = stackGet_default;
        Stack.prototype.has = stackHas_default;
        Stack.prototype.set = stackSet_default;
        Stack_default = Stack;
      }
    });
    init_arrayFilter = __esm2({
      "node_modules/lodash-es/_arrayFilter.js"() {
        init_process_global();
        __name(arrayFilter, "arrayFilter");
        arrayFilter_default = arrayFilter;
      }
    });
    init_stubArray = __esm2({
      "node_modules/lodash-es/stubArray.js"() {
        init_process_global();
        __name(stubArray, "stubArray");
        stubArray_default = stubArray;
      }
    });
    init_getSymbols = __esm2({
      "node_modules/lodash-es/_getSymbols.js"() {
        init_process_global();
        init_arrayFilter();
        init_stubArray();
        objectProto10 = Object.prototype;
        propertyIsEnumerable2 = objectProto10.propertyIsEnumerable;
        nativeGetSymbols = Object.getOwnPropertySymbols;
        getSymbols = !nativeGetSymbols ? stubArray_default : function(object2) {
          if (object2 == null) {
            return [];
          }
          object2 = Object(object2);
          return arrayFilter_default(nativeGetSymbols(object2), function(symbol) {
            return propertyIsEnumerable2.call(object2, symbol);
          });
        };
        getSymbols_default = getSymbols;
      }
    });
    init_baseGetAllKeys = __esm2({
      "node_modules/lodash-es/_baseGetAllKeys.js"() {
        init_process_global();
        init_arrayPush();
        init_isArray();
        __name(baseGetAllKeys, "baseGetAllKeys");
        baseGetAllKeys_default = baseGetAllKeys;
      }
    });
    init_getAllKeys = __esm2({
      "node_modules/lodash-es/_getAllKeys.js"() {
        init_process_global();
        init_baseGetAllKeys();
        init_getSymbols();
        init_keys();
        __name(getAllKeys, "getAllKeys");
        getAllKeys_default = getAllKeys;
      }
    });
    init_DataView = __esm2({
      "node_modules/lodash-es/_DataView.js"() {
        init_process_global();
        init_getNative();
        init_root();
        DataView = getNative_default(root_default, "DataView");
        DataView_default = DataView;
      }
    });
    init_Promise = __esm2({
      "node_modules/lodash-es/_Promise.js"() {
        init_process_global();
        init_getNative();
        init_root();
        Promise2 = getNative_default(root_default, "Promise");
        Promise_default = Promise2;
      }
    });
    init_Set = __esm2({
      "node_modules/lodash-es/_Set.js"() {
        init_process_global();
        init_getNative();
        init_root();
        Set2 = getNative_default(root_default, "Set");
        Set_default = Set2;
      }
    });
    init_getTag = __esm2({
      "node_modules/lodash-es/_getTag.js"() {
        init_process_global();
        init_DataView();
        init_Map();
        init_Promise();
        init_Set();
        init_WeakMap();
        init_baseGetTag();
        init_toSource();
        mapTag2 = "[object Map]";
        objectTag2 = "[object Object]";
        promiseTag = "[object Promise]";
        setTag2 = "[object Set]";
        weakMapTag2 = "[object WeakMap]";
        dataViewTag2 = "[object DataView]";
        dataViewCtorString = toSource_default(DataView_default);
        mapCtorString = toSource_default(Map_default);
        promiseCtorString = toSource_default(Promise_default);
        setCtorString = toSource_default(Set_default);
        weakMapCtorString = toSource_default(WeakMap_default);
        getTag = baseGetTag_default;
        if (DataView_default && getTag(new DataView_default(new ArrayBuffer(1))) != dataViewTag2 || Map_default && getTag(new Map_default()) != mapTag2 || Promise_default && getTag(Promise_default.resolve()) != promiseTag || Set_default && getTag(new Set_default()) != setTag2 || WeakMap_default && getTag(new WeakMap_default()) != weakMapTag2) {
          getTag = /* @__PURE__ */ __name(function(value) {
            var result = baseGetTag_default(value), Ctor = result == objectTag2 ? value.constructor : void 0, ctorString = Ctor ? toSource_default(Ctor) : "";
            if (ctorString) {
              switch (ctorString) {
                case dataViewCtorString:
                  return dataViewTag2;
                case mapCtorString:
                  return mapTag2;
                case promiseCtorString:
                  return promiseTag;
                case setCtorString:
                  return setTag2;
                case weakMapCtorString:
                  return weakMapTag2;
              }
            }
            return result;
          }, "getTag");
        }
        getTag_default = getTag;
      }
    });
    init_Uint8Array = __esm2({
      "node_modules/lodash-es/_Uint8Array.js"() {
        init_process_global();
        init_root();
        Uint8Array2 = root_default.Uint8Array;
        Uint8Array_default = Uint8Array2;
      }
    });
    init_setCacheAdd = __esm2({
      "node_modules/lodash-es/_setCacheAdd.js"() {
        init_process_global();
        HASH_UNDEFINED3 = "__lodash_hash_undefined__";
        __name(setCacheAdd, "setCacheAdd");
        setCacheAdd_default = setCacheAdd;
      }
    });
    init_setCacheHas = __esm2({
      "node_modules/lodash-es/_setCacheHas.js"() {
        init_process_global();
        __name(setCacheHas, "setCacheHas");
        setCacheHas_default = setCacheHas;
      }
    });
    init_SetCache = __esm2({
      "node_modules/lodash-es/_SetCache.js"() {
        init_process_global();
        init_MapCache();
        init_setCacheAdd();
        init_setCacheHas();
        __name(SetCache, "SetCache");
        SetCache.prototype.add = SetCache.prototype.push = setCacheAdd_default;
        SetCache.prototype.has = setCacheHas_default;
        SetCache_default = SetCache;
      }
    });
    init_arraySome = __esm2({
      "node_modules/lodash-es/_arraySome.js"() {
        init_process_global();
        __name(arraySome, "arraySome");
        arraySome_default = arraySome;
      }
    });
    init_cacheHas = __esm2({
      "node_modules/lodash-es/_cacheHas.js"() {
        init_process_global();
        __name(cacheHas, "cacheHas");
        cacheHas_default = cacheHas;
      }
    });
    init_equalArrays = __esm2({
      "node_modules/lodash-es/_equalArrays.js"() {
        init_process_global();
        init_SetCache();
        init_arraySome();
        init_cacheHas();
        COMPARE_PARTIAL_FLAG = 1;
        COMPARE_UNORDERED_FLAG = 2;
        __name(equalArrays, "equalArrays");
        equalArrays_default = equalArrays;
      }
    });
    init_mapToArray = __esm2({
      "node_modules/lodash-es/_mapToArray.js"() {
        init_process_global();
        __name(mapToArray, "mapToArray");
        mapToArray_default = mapToArray;
      }
    });
    init_setToArray = __esm2({
      "node_modules/lodash-es/_setToArray.js"() {
        init_process_global();
        __name(setToArray, "setToArray");
        setToArray_default = setToArray;
      }
    });
    init_equalByTag = __esm2({
      "node_modules/lodash-es/_equalByTag.js"() {
        init_process_global();
        init_Symbol();
        init_Uint8Array();
        init_eq();
        init_equalArrays();
        init_mapToArray();
        init_setToArray();
        COMPARE_PARTIAL_FLAG2 = 1;
        COMPARE_UNORDERED_FLAG2 = 2;
        boolTag2 = "[object Boolean]";
        dateTag2 = "[object Date]";
        errorTag2 = "[object Error]";
        mapTag3 = "[object Map]";
        numberTag2 = "[object Number]";
        regexpTag2 = "[object RegExp]";
        setTag3 = "[object Set]";
        stringTag2 = "[object String]";
        symbolTag = "[object Symbol]";
        arrayBufferTag2 = "[object ArrayBuffer]";
        dataViewTag3 = "[object DataView]";
        symbolProto = Symbol_default ? Symbol_default.prototype : void 0;
        symbolValueOf = symbolProto ? symbolProto.valueOf : void 0;
        __name(equalByTag, "equalByTag");
        equalByTag_default = equalByTag;
      }
    });
    init_equalObjects = __esm2({
      "node_modules/lodash-es/_equalObjects.js"() {
        init_process_global();
        init_getAllKeys();
        COMPARE_PARTIAL_FLAG3 = 1;
        objectProto11 = Object.prototype;
        hasOwnProperty8 = objectProto11.hasOwnProperty;
        __name(equalObjects, "equalObjects");
        equalObjects_default = equalObjects;
      }
    });
    init_baseIsEqualDeep = __esm2({
      "node_modules/lodash-es/_baseIsEqualDeep.js"() {
        init_process_global();
        init_Stack();
        init_equalArrays();
        init_equalByTag();
        init_equalObjects();
        init_getTag();
        init_isArray();
        init_isBuffer();
        init_isTypedArray();
        COMPARE_PARTIAL_FLAG4 = 1;
        argsTag3 = "[object Arguments]";
        arrayTag2 = "[object Array]";
        objectTag3 = "[object Object]";
        objectProto12 = Object.prototype;
        hasOwnProperty9 = objectProto12.hasOwnProperty;
        __name(baseIsEqualDeep, "baseIsEqualDeep");
        baseIsEqualDeep_default = baseIsEqualDeep;
      }
    });
    init_baseIsEqual = __esm2({
      "node_modules/lodash-es/_baseIsEqual.js"() {
        init_process_global();
        init_baseIsEqualDeep();
        init_isObjectLike();
        __name(baseIsEqual, "baseIsEqual");
        baseIsEqual_default = baseIsEqual;
      }
    });
    init_isEqual = __esm2({
      "node_modules/lodash-es/isEqual.js"() {
        init_process_global();
        init_baseIsEqual();
        __name(isEqual, "isEqual");
        isEqual_default = isEqual;
      }
    });
    init_lodash = __esm2({
      "node_modules/lodash-es/lodash.js"() {
        init_process_global();
        init_isEqual();
      }
    });
    init_lh_env = __esm2({
      "core/lib/lh-env.js"() {
        "use strict";
        init_process_global();
        isUnderTest = !!process4.env.CI || process4.env.NODE_ENV === "test";
      }
    });
    init_statistics = __esm2({
      "shared/statistics.js"() {
        "use strict";
        init_process_global();
        MIN_PASSING_SCORE = 0.9;
        MAX_AVERAGE_SCORE = 0.8999999999999999;
        MIN_AVERAGE_SCORE = 0.5;
        MAX_FAILING_SCORE = 0.49999999999999994;
        __name(erf, "erf");
        __name(getLogNormalScore, "getLogNormalScore");
      }
    });
    init_util = __esm2({
      "shared/util.js"() {
        "use strict";
        init_process_global();
        init_statistics();
        ELLIPSIS = "\u2026";
        NBSP = "\xA0";
        PASS_THRESHOLD = 0.9;
        RATINGS = {
          PASS: { label: "pass", minScore: PASS_THRESHOLD },
          AVERAGE: { label: "average", minScore: 0.5 },
          FAIL: { label: "fail" },
          ERROR: { label: "error" }
        };
        listOfTlds = [
          "com",
          "co",
          "gov",
          "edu",
          "ac",
          "org",
          "go",
          "gob",
          "or",
          "net",
          "in",
          "ne",
          "nic",
          "gouv",
          "web",
          "spb",
          "blog",
          "jus",
          "kiev",
          "mil",
          "wi",
          "qc",
          "ca",
          "bel",
          "on"
        ];
        Util = class _Util {
          static {
            __name(this, "Util");
          }
          static get RATINGS() {
            return RATINGS;
          }
          static get PASS_THRESHOLD() {
            return PASS_THRESHOLD;
          }
          static get MS_DISPLAY_VALUE() {
            return `%10d${NBSP}ms`;
          }
          /**
           * If LHR is older than 10.0 it will not have the `finalDisplayedUrl` property.
           * Old LHRs should have the `finalUrl` property which will work fine for the report.
           *
           * @param {LH.Result} lhr
           */
          static getFinalDisplayedUrl(lhr) {
            if (lhr.finalDisplayedUrl)
              return lhr.finalDisplayedUrl;
            if (lhr.finalUrl)
              return lhr.finalUrl;
            throw new Error("Could not determine final displayed URL");
          }
          /**
           * If LHR is older than 10.0 it will not have the `mainDocumentUrl` property.
           * Old LHRs should have the `finalUrl` property which is the same as `mainDocumentUrl`.
           *
           * @param {LH.Result} lhr
           */
          static getMainDocumentUrl(lhr) {
            return lhr.mainDocumentUrl || lhr.finalUrl;
          }
          /**
           * @param {LH.Result} lhr
           * @return {LH.Result.FullPageScreenshot=}
           */
          static getFullPageScreenshot(lhr) {
            if (lhr.fullPageScreenshot) {
              return lhr.fullPageScreenshot;
            }
            const details = (
              /** @type {LH.Result.FullPageScreenshot=} */
              lhr.audits["full-page-screenshot"]?.details
            );
            return details;
          }
          /**
           * Given the entity classification dataset and a URL, identify the entity.
           * @param {string} url
           * @param {LH.Result.Entities=} entities
           * @return {LH.Result.LhrEntity|string}
           */
          static getEntityFromUrl(url, entities) {
            if (!entities) {
              return _Util.getPseudoRootDomain(url);
            }
            const entity = entities.find((e) => e.origins.find((origin) => url.startsWith(origin)));
            return entity || _Util.getPseudoRootDomain(url);
          }
          /**
           * Split a string by markdown code spans (enclosed in `backticks`), splitting
           * into segments that were enclosed in backticks (marked as `isCode === true`)
           * and those that outside the backticks (`isCode === false`).
           * @param {string} text
           * @return {Array<{isCode: true, text: string}|{isCode: false, text: string}>}
           */
          static splitMarkdownCodeSpans(text) {
            const segments = [];
            const parts = text.split(/`(.*?)`/g);
            for (let i = 0; i < parts.length; i++) {
              const text2 = parts[i];
              if (!text2)
                continue;
              const isCode = i % 2 !== 0;
              segments.push({
                isCode,
                text: text2
              });
            }
            return segments;
          }
          /**
           * Split a string on markdown links (e.g. [some link](https://...)) into
           * segments of plain text that weren't part of a link (marked as
           * `isLink === false`), and segments with text content and a URL that did make
           * up a link (marked as `isLink === true`).
           * @param {string} text
           * @return {Array<{isLink: true, text: string, linkHref: string}|{isLink: false, text: string}>}
           */
          static splitMarkdownLink(text) {
            const segments = [];
            const parts = text.split(/\[([^\]]+?)\]\((https?:\/\/.*?)\)/g);
            while (parts.length) {
              const [preambleText, linkText, linkHref] = parts.splice(0, 3);
              if (preambleText) {
                segments.push({
                  isLink: false,
                  text: preambleText
                });
              }
              if (linkText && linkHref) {
                segments.push({
                  isLink: true,
                  text: linkText,
                  linkHref
                });
              }
            }
            return segments;
          }
          /**
           * @param {string} string
           * @param {number} characterLimit
           * @param {string} ellipseSuffix
           */
          static truncate(string2, characterLimit, ellipseSuffix = "\u2026") {
            if (string2.length <= characterLimit) {
              return string2;
            }
            const segmenter2 = new Intl.Segmenter(void 0, { granularity: "grapheme" });
            const iterator2 = segmenter2.segment(string2)[Symbol.iterator]();
            let lastSegmentIndex = 0;
            for (let i = 0; i <= characterLimit - ellipseSuffix.length; i++) {
              const result = iterator2.next();
              if (result.done) {
                return string2;
              }
              lastSegmentIndex = result.value.index;
            }
            for (let i = 0; i < ellipseSuffix.length; i++) {
              if (iterator2.next().done) {
                return string2;
              }
            }
            return string2.slice(0, lastSegmentIndex) + ellipseSuffix;
          }
          /**
           * @param {URL} parsedUrl
           * @param {{numPathParts?: number, preserveQuery?: boolean, preserveHost?: boolean}=} options
           * @return {string}
           */
          static getURLDisplayName(parsedUrl, options2) {
            options2 = options2 || {
              numPathParts: void 0,
              preserveQuery: void 0,
              preserveHost: void 0
            };
            const numPathParts = options2.numPathParts !== void 0 ? options2.numPathParts : 2;
            const preserveQuery = options2.preserveQuery !== void 0 ? options2.preserveQuery : true;
            const preserveHost = options2.preserveHost || false;
            let name;
            if (parsedUrl.protocol === "about:" || parsedUrl.protocol === "data:") {
              name = parsedUrl.href;
            } else {
              name = parsedUrl.pathname;
              const parts = name.split("/").filter((part) => part.length);
              if (numPathParts && parts.length > numPathParts) {
                name = ELLIPSIS + parts.slice(-1 * numPathParts).join("/");
              }
              if (preserveHost) {
                name = `${parsedUrl.host}/${name.replace(/^\//, "")}`;
              }
              if (preserveQuery) {
                name = `${name}${parsedUrl.search}`;
              }
            }
            const MAX_LENGTH = 64;
            if (parsedUrl.protocol !== "data:") {
              name = name.slice(0, 200);
              name = name.replace(/([a-f0-9]{7})[a-f0-9]{13}[a-f0-9]*/g, `$1${ELLIPSIS}`);
              name = name.replace(/([a-zA-Z0-9-_]{9})(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])[a-zA-Z0-9-_]{10,}/g, `$1${ELLIPSIS}`);
              name = name.replace(/(\d{3})\d{6,}/g, `$1${ELLIPSIS}`);
              name = name.replace(/\u2026+/g, ELLIPSIS);
              if (name.length > MAX_LENGTH && name.includes("?")) {
                name = name.replace(/\?([^=]*)(=)?.*/, `?$1$2${ELLIPSIS}`);
                if (name.length > MAX_LENGTH) {
                  name = name.replace(/\?.*/, `?${ELLIPSIS}`);
                }
              }
            }
            if (name.length > MAX_LENGTH) {
              const dotIndex = name.lastIndexOf(".");
              if (dotIndex >= 0) {
                name = name.slice(0, MAX_LENGTH - 1 - (name.length - dotIndex)) + // Show file extension
                `${ELLIPSIS}${name.slice(dotIndex)}`;
              } else {
                name = name.slice(0, MAX_LENGTH - 1) + ELLIPSIS;
              }
            }
            return name;
          }
          /**
           * Returns the origin portion of a Chrome extension URL.
           * @param {string} url
           * @return {string}
           */
          static getChromeExtensionOrigin(url) {
            const parsedUrl = new URL(url);
            return parsedUrl.protocol + "//" + parsedUrl.host;
          }
          /**
           * Split a URL into a file, hostname and origin for easy display.
           * @param {string} url
           * @return {{file: string, hostname: string, origin: string}}
           */
          static parseURL(url) {
            const parsedUrl = new URL(url);
            return {
              file: _Util.getURLDisplayName(parsedUrl),
              hostname: parsedUrl.hostname,
              // Node's URL parsing behavior is different than Chrome and returns 'null'
              // for chrome-extension:// URLs. See https://github.com/nodejs/node/issues/21955.
              origin: parsedUrl.protocol === "chrome-extension:" ? _Util.getChromeExtensionOrigin(url) : parsedUrl.origin
            };
          }
          /**
           * @param {string|URL} value
           * @return {!URL}
           */
          static createOrReturnURL(value) {
            if (value instanceof URL) {
              return value;
            }
            return new URL(value);
          }
          /**
           * Gets the tld of a domain
           * This function is used only while rendering pre-10.0 LHRs.
           *
           * @param {string} hostname
           * @return {string} tld
           */
          static getPseudoTld(hostname2) {
            const tlds = hostname2.split(".").slice(-2);
            if (!listOfTlds.includes(tlds[0])) {
              return `.${tlds[tlds.length - 1]}`;
            }
            return `.${tlds.join(".")}`;
          }
          /**
           * Returns a primary domain for provided hostname (e.g. www.example.com -> example.com).
           * As it doesn't consult the Public Suffix List, it can sometimes lose detail.
           * See the `listOfTlds` comment above for more.
           * This function is used only while rendering pre-10.0 LHRs. See UrlUtils.getRootDomain
           * for the current method that makes use of PSL.
           * @param {string|URL} url hostname or URL object
           * @return {string}
           */
          static getPseudoRootDomain(url) {
            const hostname2 = _Util.createOrReturnURL(url).hostname;
            const tld = _Util.getPseudoTld(hostname2);
            const splitTld = tld.split(".");
            return hostname2.split(".").slice(-splitTld.length).join(".");
          }
          /**
           * Returns only lines that are near a message, or the first few lines if there are
           * no line messages.
           * @param {SnippetValue['lines']} lines
           * @param {SnippetValue['lineMessages']} lineMessages
           * @param {number} surroundingLineCount Number of lines to include before and after
           * the message. If this is e.g. 2 this function might return 5 lines.
           */
          static filterRelevantLines(lines, lineMessages, surroundingLineCount) {
            if (lineMessages.length === 0) {
              return lines.slice(0, surroundingLineCount * 2 + 1);
            }
            const minGapSize = 3;
            const lineNumbersToKeep = /* @__PURE__ */ new Set();
            lineMessages = lineMessages.sort((a, b) => (a.lineNumber || 0) - (b.lineNumber || 0));
            lineMessages.forEach(({ lineNumber }) => {
              let firstSurroundingLineNumber = lineNumber - surroundingLineCount;
              let lastSurroundingLineNumber = lineNumber + surroundingLineCount;
              while (firstSurroundingLineNumber < 1) {
                firstSurroundingLineNumber++;
                lastSurroundingLineNumber++;
              }
              if (lineNumbersToKeep.has(firstSurroundingLineNumber - minGapSize - 1)) {
                firstSurroundingLineNumber -= minGapSize;
              }
              for (let i = firstSurroundingLineNumber; i <= lastSurroundingLineNumber; i++) {
                const surroundingLineNumber = i;
                lineNumbersToKeep.add(surroundingLineNumber);
              }
            });
            return lines.filter((line) => lineNumbersToKeep.has(line.lineNumber));
          }
          /**
           * Computes a score between 0 and 1 based on the measured `value`. Score is determined by
           * considering a log-normal distribution governed by two control points (the 10th
           * percentile value and the median value) and represents the percentage of sites that are
           * greater than `value`.
           *
           * Score characteristics:
           * - within [0, 1]
           * - rounded to two digits
           * - value must meet or beat a controlPoint value to meet or exceed its percentile score:
           *   - value > median will give a score < 0.5; value ≤ median will give a score ≥ 0.5.
           *   - value > p10 will give a score < 0.9; value ≤ p10 will give a score ≥ 0.9.
           * - values < p10 will get a slight boost so a score of 1 is achievable by a
           *   `value` other than those close to 0. Scores of > ~0.99524 end up rounded to 1.
           * @param {{median: number, p10: number}} controlPoints
           * @param {number} value
           * @return {number}
           */
          static computeLogNormalScore(controlPoints, value) {
            let percentile = getLogNormalScore(controlPoints, value);
            if (percentile > 0.9) {
              percentile += 0.05 * (percentile - 0.9);
            }
            return Math.floor(percentile * 100) / 100;
          }
        };
      }
    });
    init_audit = __esm2({
      "core/audits/audit.js"() {
        "use strict";
        init_process_global();
        init_lh();
        init_lh_env();
        init_util();
        METRIC_SAVINGS_PRECISION = {
          FCP: 50,
          LCP: 50,
          INP: 50,
          TBT: 50,
          CLS: 1e-3
        };
        clampTo2Decimals = /* @__PURE__ */ __name((val) => Math.round(val * 100) / 100, "clampTo2Decimals");
        Audit = class _Audit {
          static {
            __name(this, "Audit");
          }
          /**
           * @return {LH.Audit.ScoreDisplayModes}
           */
          static get SCORING_MODES() {
            return {
              NUMERIC: "numeric",
              METRIC_SAVINGS: "metricSavings",
              BINARY: "binary",
              MANUAL: "manual",
              INFORMATIVE: "informative",
              NOT_APPLICABLE: "notApplicable",
              ERROR: "error"
            };
          }
          /**
           * @return {LH.Audit.Meta}
           */
          static get meta() {
            throw new Error("Audit meta information must be overridden.");
          }
          /**
           * @return {Object}
           */
          static get defaultOptions() {
            return {};
          }
          /* eslint-disable no-unused-vars */
          /**
           *
           * @param {LH.Artifacts} artifacts
           * @param {LH.Audit.Context} context
           * @return {LH.Audit.Product|Promise<LH.Audit.Product>}
           */
          static audit(artifacts, context2) {
            throw new Error("audit() method must be overridden");
          }
          /* eslint-enable no-unused-vars */
          /**
           * Computes a score between 0 and 1 based on the measured `value`. Score is determined by
           * considering a log-normal distribution governed by two control points (the 10th
           * percentile value and the median value) and represents the percentage of sites that are
           * greater than `value`.
           *
           * Score characteristics:
           * - within [0, 1]
           * - rounded to two digits
           * - value must meet or beat a controlPoint value to meet or exceed its percentile score:
           *   - value > median will give a score < 0.5; value ≤ median will give a score ≥ 0.5.
           *   - value > p10 will give a score < 0.9; value ≤ p10 will give a score ≥ 0.9.
           * - values < p10 will get a slight boost so a score of 1 is achievable by a
           *   `value` other than those close to 0. Scores of > ~0.99524 end up rounded to 1.
           * @param {{median: number, p10: number}} controlPoints
           * @param {number} value
           * @return {number}
           */
          static computeLogNormalScore(controlPoints, value) {
            return Util.computeLogNormalScore(controlPoints, value);
          }
          /**
           * This catches typos in the `key` property of a heading definition of table/opportunity details.
           * Throws an error if any of keys referenced by headings don't exist in at least one of the items.
           *
           * @param {LH.Audit.Details.Table['headings']|LH.Audit.Details.Opportunity['headings']} headings
           * @param {LH.Audit.Details.Opportunity['items']|LH.Audit.Details.Table['items']} items
           */
          static assertHeadingKeysExist(headings, items2) {
            if (!items2.length)
              return;
            if (!isUnderTest)
              return;
            for (const heading2 of headings) {
              if (heading2.key === null)
                continue;
              const key = heading2.key;
              if (items2.some((item) => key in item))
                continue;
              throw new Error(`"${heading2.key}" is missing from items`);
            }
          }
          /**
           * @param {LH.Audit.Details.Checklist['items']} items
           * @return {LH.Audit.Details.Checklist}
           */
          static makeChecklistDetails(items2) {
            return {
              type: "checklist",
              items: items2
            };
          }
          /**
           * @param {LH.Audit.Details.Table['headings']} headings
           * @param {LH.Audit.Details.Table['items']} results
           * @param {TableOptions=} options
           * @return {LH.Audit.Details.Table}
           */
          static makeTableDetails(headings, results, options2 = {}) {
            const { wastedBytes, wastedMs, sortedBy, skipSumming, isEntityGrouped } = options2;
            const summary = wastedBytes || wastedMs ? { wastedBytes, wastedMs } : void 0;
            if (results.length === 0) {
              return {
                type: "table",
                headings,
                items: [],
                summary
              };
            }
            _Audit.assertHeadingKeysExist(headings, results);
            return {
              type: "table",
              headings,
              items: results,
              summary,
              sortedBy,
              skipSumming,
              isEntityGrouped
            };
          }
          /**
           * @param {LH.Audit.Details.List['items']} items
           * @return {LH.Audit.Details.List}
           */
          static makeListDetails(items2) {
            return {
              type: "list",
              items: items2
            };
          }
          /**
           * @param {LH.IcuMessage | string=} title
           * @param {LH.IcuMessage | string=} description
           * @param {LH.Audit.Details.ListableDetail} value
           * @return {LH.Audit.Details.ListSectionItem}
           */
          static makeListDetailSectionItem(value, title2, description2) {
            return {
              type: "list-section",
              title: title2,
              description: description2,
              value
            };
          }
          /** @typedef {{
           * content: string;
           * title: string;
           * lineMessages: LH.Audit.Details.SnippetValue['lineMessages'];
           * generalMessages: LH.Audit.Details.SnippetValue['generalMessages'];
           * node?: LH.Audit.Details.NodeValue;
           * maxLineLength?: number;
           * maxLinesAroundMessage?: number;
           * }} SnippetInfo */
          /**
           * @param {SnippetInfo} snippetInfo
           * @return {LH.Audit.Details.SnippetValue}
           */
          static makeSnippetDetails({ content, title: title2, lineMessages, generalMessages, node: node2, maxLineLength = 200, maxLinesAroundMessage = 20 }) {
            const allLines = _Audit._makeSnippetLinesArray(content, maxLineLength);
            const lines = Util.filterRelevantLines(allLines, lineMessages, maxLinesAroundMessage);
            return {
              type: "snippet",
              lines,
              title: title2,
              lineMessages,
              generalMessages,
              lineCount: allLines.length,
              node: node2
            };
          }
          /**
           * @param {string} content
           * @param {number} maxLineLength
           * @return {LH.Audit.Details.SnippetValue['lines']}
           */
          static _makeSnippetLinesArray(content, maxLineLength) {
            return content.split("\n").map((line, lineIndex) => {
              const lineNumber = lineIndex + 1;
              const lineDetail = {
                content: Util.truncate(line, maxLineLength),
                lineNumber
              };
              if (line.length > maxLineLength) {
                lineDetail.truncated = true;
              }
              return lineDetail;
            });
          }
          /**
           * @param {LH.Audit.Details.Opportunity['headings']} headings
           * @param {LH.Audit.Details.Opportunity['items']} items
           * @param {OpportunityOptions} options
           * @return {LH.Audit.Details.Opportunity}
           */
          static makeOpportunityDetails(headings, items2, options2) {
            _Audit.assertHeadingKeysExist(headings, items2);
            const { overallSavingsMs, overallSavingsBytes, sortedBy, skipSumming, isEntityGrouped } = options2;
            return {
              type: "opportunity",
              headings: items2.length === 0 ? [] : headings,
              items: items2,
              overallSavingsMs,
              overallSavingsBytes,
              sortedBy,
              skipSumming,
              isEntityGrouped
            };
          }
          /**
           * @param {LH.Artifacts.NodeDetails} node
           * @return {LH.Audit.Details.NodeValue}
           */
          static makeNodeItem(node2) {
            return {
              type: "node",
              lhId: node2.lhId,
              path: node2.devtoolsNodePath,
              selector: node2.selector,
              boundingRect: node2.boundingRect,
              snippet: node2.snippet,
              nodeLabel: node2.nodeLabel
            };
          }
          /**
           * @param {LH.Artifacts.Bundle} bundle
           * @param {number} generatedLine
           * @param {number} generatedColumn
           * @return {LH.Audit.Details.SourceLocationValue['original']}
           */
          static _findOriginalLocation(bundle, generatedLine, generatedColumn) {
            const entry = bundle?.map.findEntry(generatedLine, generatedColumn);
            if (!entry)
              return;
            return {
              file: entry.sourceURL || "",
              line: entry.sourceLineNumber || 0,
              column: entry.sourceColumnNumber || 0
            };
          }
          /**
           * @param {string} url
           * @param {number} line 0-indexed
           * @param {number} column 0-indexed
           * @param {LH.Artifacts.Bundle=} bundle
           * @return {LH.Audit.Details.SourceLocationValue}
           */
          static makeSourceLocation(url, line, column, bundle) {
            return {
              type: "source-location",
              url,
              urlProvider: "network",
              line,
              column,
              original: bundle && this._findOriginalLocation(bundle, line, column)
            };
          }
          /**
           * @param {LH.Artifacts.ConsoleMessage} entry
           * @param {LH.Artifacts.Bundle=} bundle
           * @return {LH.Audit.Details.SourceLocationValue | undefined}
           */
          static makeSourceLocationFromConsoleMessage(entry, bundle) {
            if (!entry.url)
              return;
            const line = entry.lineNumber || 0;
            const column = entry.columnNumber || 0;
            return this.makeSourceLocation(entry.url, line, column, bundle);
          }
          /**
           * @param {number|null} score
           * @param {LH.Audit.ScoreDisplayMode} scoreDisplayMode
           * @param {string} auditId
           * @return {number|null}
           */
          static _normalizeAuditScore(score, scoreDisplayMode, auditId) {
            if (scoreDisplayMode === _Audit.SCORING_MODES.INFORMATIVE) {
              return 1;
            }
            if (scoreDisplayMode !== _Audit.SCORING_MODES.BINARY && scoreDisplayMode !== _Audit.SCORING_MODES.NUMERIC && scoreDisplayMode !== _Audit.SCORING_MODES.METRIC_SAVINGS) {
              return null;
            }
            if (score === null || !Number.isFinite(score)) {
              throw new Error(`Invalid score for ${auditId}: ${score}`);
            }
            if (score > 1)
              throw new Error(`Audit score for ${auditId} is > 1`);
            if (score < 0)
              throw new Error(`Audit score for ${auditId} is < 0`);
            score = clampTo2Decimals(score);
            return score;
          }
          /**
           * @param {LH.Audit.ProductMetricSavings|undefined} metricSavings
           * @return {LH.Audit.ProductMetricSavings|undefined}
           */
          static _quantizeMetricSavings(metricSavings) {
            if (!metricSavings)
              return;
            const normalizedMetricSavings = { ...metricSavings };
            for (
              const key of
              /** @type {Array<keyof LH.Audit.ProductMetricSavings>} */
              Object.keys(metricSavings)
            ) {
              let value = metricSavings[key];
              if (value === void 0)
                continue;
              value = Math.max(value, 0);
              const precision = METRIC_SAVINGS_PRECISION[key];
              if (precision !== void 0) {
                value = Math.round(value / precision) * precision;
              }
              normalizedMetricSavings[key] = value;
            }
            return normalizedMetricSavings;
          }
          /**
           * @param {typeof Audit} audit
           * @param {string | LH.IcuMessage} errorMessage
           * @param {string=} errorStack
           * @return {LH.RawIcu<LH.Audit.Result>}
           */
          static generateErrorAuditResult(audit, errorMessage, errorStack) {
            return _Audit.generateAuditResult(audit, {
              score: null,
              errorMessage,
              errorStack
            });
          }
          /**
           * @param {typeof Audit} audit
           * @param {LH.Audit.Product} product
           * @return {LH.RawIcu<LH.Audit.Result>}
           */
          static generateAuditResult(audit, product) {
            if (product.score === void 0) {
              throw new Error("generateAuditResult requires a score");
            }
            let scoreDisplayMode = audit.meta.scoreDisplayMode || _Audit.SCORING_MODES.BINARY;
            let score = product.score;
            if (product.errorMessage !== void 0) {
              scoreDisplayMode = _Audit.SCORING_MODES.ERROR;
            } else if (product.notApplicable) {
              scoreDisplayMode = _Audit.SCORING_MODES.NOT_APPLICABLE;
            } else if (product.scoreDisplayMode) {
              scoreDisplayMode = product.scoreDisplayMode;
            }
            const metricSavings = _Audit._quantizeMetricSavings(product.metricSavings);
            const hasSomeSavings = Object.values(metricSavings || {}).some((v) => v);
            if (scoreDisplayMode === _Audit.SCORING_MODES.METRIC_SAVINGS) {
              if (score && score >= Util.PASS_THRESHOLD) {
                score = 1;
              } else if (hasSomeSavings) {
                score = 0;
              } else {
                score = 0.5;
              }
            }
            score = _Audit._normalizeAuditScore(score, scoreDisplayMode, audit.meta.id);
            let auditTitle = audit.meta.title;
            if (audit.meta.failureTitle) {
              if (score !== null && score < Util.PASS_THRESHOLD) {
                auditTitle = audit.meta.failureTitle;
              }
            }
            const numericProduct = "numericUnit" in product ? product : void 0;
            return {
              id: audit.meta.id,
              title: auditTitle,
              description: audit.meta.description,
              score,
              scoreDisplayMode,
              numericValue: numericProduct?.numericValue,
              numericUnit: numericProduct?.numericUnit,
              displayValue: product.displayValue,
              explanation: product.explanation,
              errorMessage: product.errorMessage,
              errorStack: product.errorStack,
              warnings: product.warnings,
              scoringOptions: product.scoringOptions,
              metricSavings,
              details: product.details,
              guidanceLevel: audit.meta.guidanceLevel
            };
          }
          /**
           * @param {LH.Artifacts} artifacts
           * @param {LH.Audit.Context} context
           * @returns {LH.Artifacts.MetricComputationDataInput}
           */
          static makeMetricComputationDataInput(artifacts, context2) {
            const trace2 = artifacts.Trace;
            const devtoolsLog = artifacts.DevtoolsLog;
            const gatherContext = artifacts.GatherContext;
            const { URL: URL3, HostDPR, SourceMaps: SourceMaps2 } = artifacts;
            return { trace: trace2, devtoolsLog, gatherContext, settings: context2.settings, URL: URL3, SourceMaps: SourceMaps2, HostDPR, simulator: null };
          }
        };
      }
    });
    tslib_es6_exports = {};
    __export2(tslib_es6_exports, {
      __addDisposableResource: () => __addDisposableResource,
      __assign: () => __assign,
      __asyncDelegator: () => __asyncDelegator,
      __asyncGenerator: () => __asyncGenerator,
      __asyncValues: () => __asyncValues,
      __await: () => __await,
      __awaiter: () => __awaiter,
      __classPrivateFieldGet: () => __classPrivateFieldGet,
      __classPrivateFieldIn: () => __classPrivateFieldIn,
      __classPrivateFieldSet: () => __classPrivateFieldSet,
      __createBinding: () => __createBinding,
      __decorate: () => __decorate,
      __disposeResources: () => __disposeResources,
      __esDecorate: () => __esDecorate,
      __exportStar: () => __exportStar,
      __extends: () => __extends,
      __generator: () => __generator,
      __importDefault: () => __importDefault,
      __importStar: () => __importStar,
      __makeTemplateObject: () => __makeTemplateObject,
      __metadata: () => __metadata,
      __param: () => __param,
      __propKey: () => __propKey,
      __read: () => __read,
      __rest: () => __rest,
      __runInitializers: () => __runInitializers,
      __setFunctionName: () => __setFunctionName,
      __spread: () => __spread,
      __spreadArray: () => __spreadArray,
      __spreadArrays: () => __spreadArrays,
      __values: () => __values,
      default: () => tslib_es6_default
    });
    init_tslib_es6 = __esm2({
      "node_modules/intl-messageformat/node_modules/tslib/tslib.es6.mjs"() {
        init_process_global();
        extendStatics = /* @__PURE__ */ __name(function(d, b) {
          extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d2, b2) {
            d2.__proto__ = b2;
          } || function(d2, b2) {
            for (var p in b2)
              if (Object.prototype.hasOwnProperty.call(b2, p))
                d2[p] = b2[p];
          };
          return extendStatics(d, b);
        }, "extendStatics");
        __name(__extends, "__extends");
        __assign = /* @__PURE__ */ __name(function() {
          __assign = Object.assign || /* @__PURE__ */ __name(function __assign42(t) {
            for (var s, i = 1, n = arguments.length; i < n; i++) {
              s = arguments[i];
              for (var p in s)
                if (Object.prototype.hasOwnProperty.call(s, p))
                  t[p] = s[p];
            }
            return t;
          }, "__assign");
          return __assign.apply(this, arguments);
        }, "__assign");
        __name(__rest, "__rest");
        __name(__decorate, "__decorate");
        __name(__param, "__param");
        __name(__esDecorate, "__esDecorate");
        __name(__runInitializers, "__runInitializers");
        __name(__propKey, "__propKey");
        __name(__setFunctionName, "__setFunctionName");
        __name(__metadata, "__metadata");
        __name(__awaiter, "__awaiter");
        __name(__generator, "__generator");
        __createBinding = Object.create ? function(o, m, k, k2) {
          if (k2 === void 0)
            k2 = k;
          var desc = Object.getOwnPropertyDescriptor(m, k);
          if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
            desc = { enumerable: true, get: /* @__PURE__ */ __name(function() {
              return m[k];
            }, "get") };
          }
          Object.defineProperty(o, k2, desc);
        } : function(o, m, k, k2) {
          if (k2 === void 0)
            k2 = k;
          o[k2] = m[k];
        };
        __name(__exportStar, "__exportStar");
        __name(__values, "__values");
        __name(__read, "__read");
        __name(__spread, "__spread");
        __name(__spreadArrays, "__spreadArrays");
        __name(__spreadArray, "__spreadArray");
        __name(__await, "__await");
        __name(__asyncGenerator, "__asyncGenerator");
        __name(__asyncDelegator, "__asyncDelegator");
        __name(__asyncValues, "__asyncValues");
        __name(__makeTemplateObject, "__makeTemplateObject");
        __setModuleDefault = Object.create ? function(o, v) {
          Object.defineProperty(o, "default", { enumerable: true, value: v });
        } : function(o, v) {
          o["default"] = v;
        };
        __name(__importStar, "__importStar");
        __name(__importDefault, "__importDefault");
        __name(__classPrivateFieldGet, "__classPrivateFieldGet");
        __name(__classPrivateFieldSet, "__classPrivateFieldSet");
        __name(__classPrivateFieldIn, "__classPrivateFieldIn");
        __name(__addDisposableResource, "__addDisposableResource");
        _SuppressedError = typeof SuppressedError === "function" ? SuppressedError : function(error, suppressed, message) {
          var e = new Error(message);
          return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
        };
        __name(__disposeResources, "__disposeResources");
        tslib_es6_default = {
          __extends,
          __assign,
          __rest,
          __decorate,
          __param,
          __metadata,
          __awaiter,
          __generator,
          __createBinding,
          __exportStar,
          __values,
          __read,
          __spread,
          __spreadArrays,
          __spreadArray,
          __await,
          __asyncGenerator,
          __asyncDelegator,
          __asyncValues,
          __makeTemplateObject,
          __importStar,
          __importDefault,
          __classPrivateFieldGet,
          __classPrivateFieldSet,
          __classPrivateFieldIn,
          __addDisposableResource,
          __disposeResources
        };
      }
    });
    tslib_es6_exports2 = {};
    __export2(tslib_es6_exports2, {
      __addDisposableResource: () => __addDisposableResource2,
      __assign: () => __assign2,
      __asyncDelegator: () => __asyncDelegator2,
      __asyncGenerator: () => __asyncGenerator2,
      __asyncValues: () => __asyncValues2,
      __await: () => __await2,
      __awaiter: () => __awaiter2,
      __classPrivateFieldGet: () => __classPrivateFieldGet2,
      __classPrivateFieldIn: () => __classPrivateFieldIn2,
      __classPrivateFieldSet: () => __classPrivateFieldSet2,
      __createBinding: () => __createBinding2,
      __decorate: () => __decorate2,
      __disposeResources: () => __disposeResources2,
      __esDecorate: () => __esDecorate2,
      __exportStar: () => __exportStar2,
      __extends: () => __extends2,
      __generator: () => __generator2,
      __importDefault: () => __importDefault2,
      __importStar: () => __importStar2,
      __makeTemplateObject: () => __makeTemplateObject2,
      __metadata: () => __metadata2,
      __param: () => __param2,
      __propKey: () => __propKey2,
      __read: () => __read2,
      __rest: () => __rest2,
      __runInitializers: () => __runInitializers2,
      __setFunctionName: () => __setFunctionName2,
      __spread: () => __spread2,
      __spreadArray: () => __spreadArray2,
      __spreadArrays: () => __spreadArrays2,
      __values: () => __values2,
      default: () => tslib_es6_default2
    });
    init_tslib_es62 = __esm2({
      "node_modules/@formatjs/icu-messageformat-parser/node_modules/tslib/tslib.es6.mjs"() {
        init_process_global();
        extendStatics2 = /* @__PURE__ */ __name(function(d, b) {
          extendStatics2 = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d2, b2) {
            d2.__proto__ = b2;
          } || function(d2, b2) {
            for (var p in b2)
              if (Object.prototype.hasOwnProperty.call(b2, p))
                d2[p] = b2[p];
          };
          return extendStatics2(d, b);
        }, "extendStatics");
        __name(__extends2, "__extends");
        __assign2 = /* @__PURE__ */ __name(function() {
          __assign2 = Object.assign || /* @__PURE__ */ __name(function __assign42(t) {
            for (var s, i = 1, n = arguments.length; i < n; i++) {
              s = arguments[i];
              for (var p in s)
                if (Object.prototype.hasOwnProperty.call(s, p))
                  t[p] = s[p];
            }
            return t;
          }, "__assign");
          return __assign2.apply(this, arguments);
        }, "__assign");
        __name(__rest2, "__rest");
        __name(__decorate2, "__decorate");
        __name(__param2, "__param");
        __name(__esDecorate2, "__esDecorate");
        __name(__runInitializers2, "__runInitializers");
        __name(__propKey2, "__propKey");
        __name(__setFunctionName2, "__setFunctionName");
        __name(__metadata2, "__metadata");
        __name(__awaiter2, "__awaiter");
        __name(__generator2, "__generator");
        __createBinding2 = Object.create ? function(o, m, k, k2) {
          if (k2 === void 0)
            k2 = k;
          var desc = Object.getOwnPropertyDescriptor(m, k);
          if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
            desc = { enumerable: true, get: /* @__PURE__ */ __name(function() {
              return m[k];
            }, "get") };
          }
          Object.defineProperty(o, k2, desc);
        } : function(o, m, k, k2) {
          if (k2 === void 0)
            k2 = k;
          o[k2] = m[k];
        };
        __name(__exportStar2, "__exportStar");
        __name(__values2, "__values");
        __name(__read2, "__read");
        __name(__spread2, "__spread");
        __name(__spreadArrays2, "__spreadArrays");
        __name(__spreadArray2, "__spreadArray");
        __name(__await2, "__await");
        __name(__asyncGenerator2, "__asyncGenerator");
        __name(__asyncDelegator2, "__asyncDelegator");
        __name(__asyncValues2, "__asyncValues");
        __name(__makeTemplateObject2, "__makeTemplateObject");
        __setModuleDefault2 = Object.create ? function(o, v) {
          Object.defineProperty(o, "default", { enumerable: true, value: v });
        } : function(o, v) {
          o["default"] = v;
        };
        __name(__importStar2, "__importStar");
        __name(__importDefault2, "__importDefault");
        __name(__classPrivateFieldGet2, "__classPrivateFieldGet");
        __name(__classPrivateFieldSet2, "__classPrivateFieldSet");
        __name(__classPrivateFieldIn2, "__classPrivateFieldIn");
        __name(__addDisposableResource2, "__addDisposableResource");
        _SuppressedError2 = typeof SuppressedError === "function" ? SuppressedError : function(error, suppressed, message) {
          var e = new Error(message);
          return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
        };
        __name(__disposeResources2, "__disposeResources");
        tslib_es6_default2 = {
          __extends: __extends2,
          __assign: __assign2,
          __rest: __rest2,
          __decorate: __decorate2,
          __param: __param2,
          __metadata: __metadata2,
          __awaiter: __awaiter2,
          __generator: __generator2,
          __createBinding: __createBinding2,
          __exportStar: __exportStar2,
          __values: __values2,
          __read: __read2,
          __spread: __spread2,
          __spreadArrays: __spreadArrays2,
          __spreadArray: __spreadArray2,
          __await: __await2,
          __asyncGenerator: __asyncGenerator2,
          __asyncDelegator: __asyncDelegator2,
          __asyncValues: __asyncValues2,
          __makeTemplateObject: __makeTemplateObject2,
          __importStar: __importStar2,
          __importDefault: __importDefault2,
          __classPrivateFieldGet: __classPrivateFieldGet2,
          __classPrivateFieldSet: __classPrivateFieldSet2,
          __classPrivateFieldIn: __classPrivateFieldIn2,
          __addDisposableResource: __addDisposableResource2,
          __disposeResources: __disposeResources2
        };
      }
    });
    require_error = __commonJS({
      "node_modules/@formatjs/icu-messageformat-parser/error.js"(exports2) {
        "use strict";
        init_process_global();
        Object.defineProperty(exports2, "__esModule", { value: true });
        exports2.ErrorKind = void 0;
        var ErrorKind2;
        (function(ErrorKind22) {
          ErrorKind22[ErrorKind22["EXPECT_ARGUMENT_CLOSING_BRACE"] = 1] = "EXPECT_ARGUMENT_CLOSING_BRACE";
          ErrorKind22[ErrorKind22["EMPTY_ARGUMENT"] = 2] = "EMPTY_ARGUMENT";
          ErrorKind22[ErrorKind22["MALFORMED_ARGUMENT"] = 3] = "MALFORMED_ARGUMENT";
          ErrorKind22[ErrorKind22["EXPECT_ARGUMENT_TYPE"] = 4] = "EXPECT_ARGUMENT_TYPE";
          ErrorKind22[ErrorKind22["INVALID_ARGUMENT_TYPE"] = 5] = "INVALID_ARGUMENT_TYPE";
          ErrorKind22[ErrorKind22["EXPECT_ARGUMENT_STYLE"] = 6] = "EXPECT_ARGUMENT_STYLE";
          ErrorKind22[ErrorKind22["INVALID_NUMBER_SKELETON"] = 7] = "INVALID_NUMBER_SKELETON";
          ErrorKind22[ErrorKind22["INVALID_DATE_TIME_SKELETON"] = 8] = "INVALID_DATE_TIME_SKELETON";
          ErrorKind22[ErrorKind22["EXPECT_NUMBER_SKELETON"] = 9] = "EXPECT_NUMBER_SKELETON";
          ErrorKind22[ErrorKind22["EXPECT_DATE_TIME_SKELETON"] = 10] = "EXPECT_DATE_TIME_SKELETON";
          ErrorKind22[ErrorKind22["UNCLOSED_QUOTE_IN_ARGUMENT_STYLE"] = 11] = "UNCLOSED_QUOTE_IN_ARGUMENT_STYLE";
          ErrorKind22[ErrorKind22["EXPECT_SELECT_ARGUMENT_OPTIONS"] = 12] = "EXPECT_SELECT_ARGUMENT_OPTIONS";
          ErrorKind22[ErrorKind22["EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE"] = 13] = "EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE";
          ErrorKind22[ErrorKind22["INVALID_PLURAL_ARGUMENT_OFFSET_VALUE"] = 14] = "INVALID_PLURAL_ARGUMENT_OFFSET_VALUE";
          ErrorKind22[ErrorKind22["EXPECT_SELECT_ARGUMENT_SELECTOR"] = 15] = "EXPECT_SELECT_ARGUMENT_SELECTOR";
          ErrorKind22[ErrorKind22["EXPECT_PLURAL_ARGUMENT_SELECTOR"] = 16] = "EXPECT_PLURAL_ARGUMENT_SELECTOR";
          ErrorKind22[ErrorKind22["EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT"] = 17] = "EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT";
          ErrorKind22[ErrorKind22["EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT"] = 18] = "EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT";
          ErrorKind22[ErrorKind22["INVALID_PLURAL_ARGUMENT_SELECTOR"] = 19] = "INVALID_PLURAL_ARGUMENT_SELECTOR";
          ErrorKind22[ErrorKind22["DUPLICATE_PLURAL_ARGUMENT_SELECTOR"] = 20] = "DUPLICATE_PLURAL_ARGUMENT_SELECTOR";
          ErrorKind22[ErrorKind22["DUPLICATE_SELECT_ARGUMENT_SELECTOR"] = 21] = "DUPLICATE_SELECT_ARGUMENT_SELECTOR";
          ErrorKind22[ErrorKind22["MISSING_OTHER_CLAUSE"] = 22] = "MISSING_OTHER_CLAUSE";
          ErrorKind22[ErrorKind22["INVALID_TAG"] = 23] = "INVALID_TAG";
          ErrorKind22[ErrorKind22["INVALID_TAG_NAME"] = 25] = "INVALID_TAG_NAME";
          ErrorKind22[ErrorKind22["UNMATCHED_CLOSING_TAG"] = 26] = "UNMATCHED_CLOSING_TAG";
          ErrorKind22[ErrorKind22["UNCLOSED_TAG"] = 27] = "UNCLOSED_TAG";
        })(ErrorKind2 = exports2.ErrorKind || (exports2.ErrorKind = {}));
      }
    });
    require_types = __commonJS({
      "node_modules/@formatjs/icu-messageformat-parser/types.js"(exports2) {
        "use strict";
        init_process_global();
        Object.defineProperty(exports2, "__esModule", { value: true });
        exports2.createNumberElement = exports2.createLiteralElement = exports2.isDateTimeSkeleton = exports2.isNumberSkeleton = exports2.isTagElement = exports2.isPoundElement = exports2.isPluralElement = exports2.isSelectElement = exports2.isTimeElement = exports2.isDateElement = exports2.isNumberElement = exports2.isArgumentElement = exports2.isLiteralElement = exports2.SKELETON_TYPE = exports2.TYPE = void 0;
        var TYPE22;
        (function(TYPE3) {
          TYPE3[TYPE3["literal"] = 0] = "literal";
          TYPE3[TYPE3["argument"] = 1] = "argument";
          TYPE3[TYPE3["number"] = 2] = "number";
          TYPE3[TYPE3["date"] = 3] = "date";
          TYPE3[TYPE3["time"] = 4] = "time";
          TYPE3[TYPE3["select"] = 5] = "select";
          TYPE3[TYPE3["plural"] = 6] = "plural";
          TYPE3[TYPE3["pound"] = 7] = "pound";
          TYPE3[TYPE3["tag"] = 8] = "tag";
        })(TYPE22 = exports2.TYPE || (exports2.TYPE = {}));
        var SKELETON_TYPE2;
        (function(SKELETON_TYPE22) {
          SKELETON_TYPE22[SKELETON_TYPE22["number"] = 0] = "number";
          SKELETON_TYPE22[SKELETON_TYPE22["dateTime"] = 1] = "dateTime";
        })(SKELETON_TYPE2 = exports2.SKELETON_TYPE || (exports2.SKELETON_TYPE = {}));
        function isLiteralElement2(el) {
          return el.type === TYPE22.literal;
        }
        __name(isLiteralElement2, "isLiteralElement");
        exports2.isLiteralElement = isLiteralElement2;
        function isArgumentElement2(el) {
          return el.type === TYPE22.argument;
        }
        __name(isArgumentElement2, "isArgumentElement");
        exports2.isArgumentElement = isArgumentElement2;
        function isNumberElement2(el) {
          return el.type === TYPE22.number;
        }
        __name(isNumberElement2, "isNumberElement");
        exports2.isNumberElement = isNumberElement2;
        function isDateElement2(el) {
          return el.type === TYPE22.date;
        }
        __name(isDateElement2, "isDateElement");
        exports2.isDateElement = isDateElement2;
        function isTimeElement2(el) {
          return el.type === TYPE22.time;
        }
        __name(isTimeElement2, "isTimeElement");
        exports2.isTimeElement = isTimeElement2;
        function isSelectElement2(el) {
          return el.type === TYPE22.select;
        }
        __name(isSelectElement2, "isSelectElement");
        exports2.isSelectElement = isSelectElement2;
        function isPluralElement2(el) {
          return el.type === TYPE22.plural;
        }
        __name(isPluralElement2, "isPluralElement");
        exports2.isPluralElement = isPluralElement2;
        function isPoundElement2(el) {
          return el.type === TYPE22.pound;
        }
        __name(isPoundElement2, "isPoundElement");
        exports2.isPoundElement = isPoundElement2;
        function isTagElement2(el) {
          return el.type === TYPE22.tag;
        }
        __name(isTagElement2, "isTagElement");
        exports2.isTagElement = isTagElement2;
        function isNumberSkeleton2(el) {
          return !!(el && typeof el === "object" && el.type === SKELETON_TYPE2.number);
        }
        __name(isNumberSkeleton2, "isNumberSkeleton");
        exports2.isNumberSkeleton = isNumberSkeleton2;
        function isDateTimeSkeleton2(el) {
          return !!(el && typeof el === "object" && el.type === SKELETON_TYPE2.dateTime);
        }
        __name(isDateTimeSkeleton2, "isDateTimeSkeleton");
        exports2.isDateTimeSkeleton = isDateTimeSkeleton2;
        function createLiteralElement(value) {
          return {
            type: TYPE22.literal,
            value
          };
        }
        __name(createLiteralElement, "createLiteralElement");
        exports2.createLiteralElement = createLiteralElement;
        function createNumberElement(value, style) {
          return {
            type: TYPE22.number,
            value,
            style
          };
        }
        __name(createNumberElement, "createNumberElement");
        exports2.createNumberElement = createNumberElement;
      }
    });
    require_regex_generated = __commonJS({
      "node_modules/@formatjs/icu-messageformat-parser/regex.generated.js"(exports2) {
        "use strict";
        init_process_global();
        Object.defineProperty(exports2, "__esModule", { value: true });
        exports2.WHITE_SPACE_REGEX = exports2.SPACE_SEPARATOR_REGEX = void 0;
        exports2.SPACE_SEPARATOR_REGEX = /[ \xA0\u1680\u2000-\u200A\u202F\u205F\u3000]/;
        exports2.WHITE_SPACE_REGEX = /[\t-\r \x85\u200E\u200F\u2028\u2029]/;
      }
    });
    tslib_es6_exports3 = {};
    __export2(tslib_es6_exports3, {
      __addDisposableResource: () => __addDisposableResource3,
      __assign: () => __assign3,
      __asyncDelegator: () => __asyncDelegator3,
      __asyncGenerator: () => __asyncGenerator3,
      __asyncValues: () => __asyncValues3,
      __await: () => __await3,
      __awaiter: () => __awaiter3,
      __classPrivateFieldGet: () => __classPrivateFieldGet3,
      __classPrivateFieldIn: () => __classPrivateFieldIn3,
      __classPrivateFieldSet: () => __classPrivateFieldSet3,
      __createBinding: () => __createBinding3,
      __decorate: () => __decorate3,
      __disposeResources: () => __disposeResources3,
      __esDecorate: () => __esDecorate3,
      __exportStar: () => __exportStar3,
      __extends: () => __extends3,
      __generator: () => __generator3,
      __importDefault: () => __importDefault3,
      __importStar: () => __importStar3,
      __makeTemplateObject: () => __makeTemplateObject3,
      __metadata: () => __metadata3,
      __param: () => __param3,
      __propKey: () => __propKey3,
      __read: () => __read3,
      __rest: () => __rest3,
      __runInitializers: () => __runInitializers3,
      __setFunctionName: () => __setFunctionName3,
      __spread: () => __spread3,
      __spreadArray: () => __spreadArray3,
      __spreadArrays: () => __spreadArrays3,
      __values: () => __values3,
      default: () => tslib_es6_default3
    });
    init_tslib_es63 = __esm2({
      "node_modules/@formatjs/icu-skeleton-parser/node_modules/tslib/tslib.es6.mjs"() {
        init_process_global();
        extendStatics3 = /* @__PURE__ */ __name(function(d, b) {
          extendStatics3 = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d2, b2) {
            d2.__proto__ = b2;
          } || function(d2, b2) {
            for (var p in b2)
              if (Object.prototype.hasOwnProperty.call(b2, p))
                d2[p] = b2[p];
          };
          return extendStatics3(d, b);
        }, "extendStatics");
        __name(__extends3, "__extends");
        __assign3 = /* @__PURE__ */ __name(function() {
          __assign3 = Object.assign || /* @__PURE__ */ __name(function __assign42(t) {
            for (var s, i = 1, n = arguments.length; i < n; i++) {
              s = arguments[i];
              for (var p in s)
                if (Object.prototype.hasOwnProperty.call(s, p))
                  t[p] = s[p];
            }
            return t;
          }, "__assign");
          return __assign3.apply(this, arguments);
        }, "__assign");
        __name(__rest3, "__rest");
        __name(__decorate3, "__decorate");
        __name(__param3, "__param");
        __name(__esDecorate3, "__esDecorate");
        __name(__runInitializers3, "__runInitializers");
        __name(__propKey3, "__propKey");
        __name(__setFunctionName3, "__setFunctionName");
        __name(__metadata3, "__metadata");
        __name(__awaiter3, "__awaiter");
        __name(__generator3, "__generator");
        __createBinding3 = Object.create ? function(o, m, k, k2) {
          if (k2 === void 0)
            k2 = k;
          var desc = Object.getOwnPropertyDescriptor(m, k);
          if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
            desc = { enumerable: true, get: /* @__PURE__ */ __name(function() {
              return m[k];
            }, "get") };
          }
          Object.defineProperty(o, k2, desc);
        } : function(o, m, k, k2) {
          if (k2 === void 0)
            k2 = k;
          o[k2] = m[k];
        };
        __name(__exportStar3, "__exportStar");
        __name(__values3, "__values");
        __name(__read3, "__read");
        __name(__spread3, "__spread");
        __name(__spreadArrays3, "__spreadArrays");
        __name(__spreadArray3, "__spreadArray");
        __name(__await3, "__await");
        __name(__asyncGenerator3, "__asyncGenerator");
        __name(__asyncDelegator3, "__asyncDelegator");
        __name(__asyncValues3, "__asyncValues");
        __name(__makeTemplateObject3, "__makeTemplateObject");
        __setModuleDefault3 = Object.create ? function(o, v) {
          Object.defineProperty(o, "default", { enumerable: true, value: v });
        } : function(o, v) {
          o["default"] = v;
        };
        __name(__importStar3, "__importStar");
        __name(__importDefault3, "__importDefault");
        __name(__classPrivateFieldGet3, "__classPrivateFieldGet");
        __name(__classPrivateFieldSet3, "__classPrivateFieldSet");
        __name(__classPrivateFieldIn3, "__classPrivateFieldIn");
        __name(__addDisposableResource3, "__addDisposableResource");
        _SuppressedError3 = typeof SuppressedError === "function" ? SuppressedError : function(error, suppressed, message) {
          var e = new Error(message);
          return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
        };
        __name(__disposeResources3, "__disposeResources");
        tslib_es6_default3 = {
          __extends: __extends3,
          __assign: __assign3,
          __rest: __rest3,
          __decorate: __decorate3,
          __param: __param3,
          __metadata: __metadata3,
          __awaiter: __awaiter3,
          __generator: __generator3,
          __createBinding: __createBinding3,
          __exportStar: __exportStar3,
          __values: __values3,
          __read: __read3,
          __spread: __spread3,
          __spreadArrays: __spreadArrays3,
          __spreadArray: __spreadArray3,
          __await: __await3,
          __asyncGenerator: __asyncGenerator3,
          __asyncDelegator: __asyncDelegator3,
          __asyncValues: __asyncValues3,
          __makeTemplateObject: __makeTemplateObject3,
          __importStar: __importStar3,
          __importDefault: __importDefault3,
          __classPrivateFieldGet: __classPrivateFieldGet3,
          __classPrivateFieldSet: __classPrivateFieldSet3,
          __classPrivateFieldIn: __classPrivateFieldIn3,
          __addDisposableResource: __addDisposableResource3,
          __disposeResources: __disposeResources3
        };
      }
    });
    require_date_time = __commonJS({
      "node_modules/@formatjs/icu-skeleton-parser/date-time.js"(exports2) {
        "use strict";
        init_process_global();
        Object.defineProperty(exports2, "__esModule", { value: true });
        exports2.parseDateTimeSkeleton = void 0;
        var DATE_TIME_REGEX2 = /(?:[Eec]{1,6}|G{1,5}|[Qq]{1,5}|(?:[yYur]+|U{1,5})|[ML]{1,5}|d{1,2}|D{1,3}|F{1}|[abB]{1,5}|[hkHK]{1,2}|w{1,2}|W{1}|m{1,2}|s{1,2}|[zZOvVxX]{1,4})(?=([^']*'[^']*')*[^']*$)/g;
        function parseDateTimeSkeleton2(skeleton) {
          var result = {};
          skeleton.replace(DATE_TIME_REGEX2, function(match) {
            var len = match.length;
            switch (match[0]) {
              // Era
              case "G":
                result.era = len === 4 ? "long" : len === 5 ? "narrow" : "short";
                break;
              // Year
              case "y":
                result.year = len === 2 ? "2-digit" : "numeric";
                break;
              case "Y":
              case "u":
              case "U":
              case "r":
                throw new RangeError("`Y/u/U/r` (year) patterns are not supported, use `y` instead");
              // Quarter
              case "q":
              case "Q":
                throw new RangeError("`q/Q` (quarter) patterns are not supported");
              // Month
              case "M":
              case "L":
                result.month = ["numeric", "2-digit", "short", "long", "narrow"][len - 1];
                break;
              // Week
              case "w":
              case "W":
                throw new RangeError("`w/W` (week) patterns are not supported");
              case "d":
                result.day = ["numeric", "2-digit"][len - 1];
                break;
              case "D":
              case "F":
              case "g":
                throw new RangeError("`D/F/g` (day) patterns are not supported, use `d` instead");
              // Weekday
              case "E":
                result.weekday = len === 4 ? "short" : len === 5 ? "narrow" : "short";
                break;
              case "e":
                if (len < 4) {
                  throw new RangeError("`e..eee` (weekday) patterns are not supported");
                }
                result.weekday = ["short", "long", "narrow", "short"][len - 4];
                break;
              case "c":
                if (len < 4) {
                  throw new RangeError("`c..ccc` (weekday) patterns are not supported");
                }
                result.weekday = ["short", "long", "narrow", "short"][len - 4];
                break;
              // Period
              case "a":
                result.hour12 = true;
                break;
              case "b":
              // am, pm, noon, midnight
              case "B":
                throw new RangeError("`b/B` (period) patterns are not supported, use `a` instead");
              // Hour
              case "h":
                result.hourCycle = "h12";
                result.hour = ["numeric", "2-digit"][len - 1];
                break;
              case "H":
                result.hourCycle = "h23";
                result.hour = ["numeric", "2-digit"][len - 1];
                break;
              case "K":
                result.hourCycle = "h11";
                result.hour = ["numeric", "2-digit"][len - 1];
                break;
              case "k":
                result.hourCycle = "h24";
                result.hour = ["numeric", "2-digit"][len - 1];
                break;
              case "j":
              case "J":
              case "C":
                throw new RangeError("`j/J/C` (hour) patterns are not supported, use `h/H/K/k` instead");
              // Minute
              case "m":
                result.minute = ["numeric", "2-digit"][len - 1];
                break;
              // Second
              case "s":
                result.second = ["numeric", "2-digit"][len - 1];
                break;
              case "S":
              case "A":
                throw new RangeError("`S/A` (second) patterns are not supported, use `s` instead");
              // Zone
              case "z":
                result.timeZoneName = len < 4 ? "short" : "long";
                break;
              case "Z":
              // 1..3, 4, 5: The ISO8601 varios formats
              case "O":
              // 1, 4: miliseconds in day short, long
              case "v":
              // 1, 4: generic non-location format
              case "V":
              // 1, 2, 3, 4: time zone ID or city
              case "X":
              // 1, 2, 3, 4: The ISO8601 varios formats
              case "x":
                throw new RangeError("`Z/O/v/V/X/x` (timeZone) patterns are not supported, use `z` instead");
            }
            return "";
          });
          return result;
        }
        __name(parseDateTimeSkeleton2, "parseDateTimeSkeleton");
        exports2.parseDateTimeSkeleton = parseDateTimeSkeleton2;
      }
    });
    require_regex_generated2 = __commonJS({
      "node_modules/@formatjs/icu-skeleton-parser/regex.generated.js"(exports2) {
        "use strict";
        init_process_global();
        Object.defineProperty(exports2, "__esModule", { value: true });
        exports2.WHITE_SPACE_REGEX = void 0;
        exports2.WHITE_SPACE_REGEX = /[\t-\r \x85\u200E\u200F\u2028\u2029]/i;
      }
    });
    require_number = __commonJS({
      "node_modules/@formatjs/icu-skeleton-parser/number.js"(exports2) {
        "use strict";
        init_process_global();
        Object.defineProperty(exports2, "__esModule", { value: true });
        exports2.parseNumberSkeleton = exports2.parseNumberSkeletonFromString = void 0;
        var tslib_1 = (init_tslib_es63(), __toCommonJS(tslib_es6_exports3));
        var regex_generated_1 = require_regex_generated2();
        function parseNumberSkeletonFromString2(skeleton) {
          if (skeleton.length === 0) {
            throw new Error("Number skeleton cannot be empty");
          }
          var stringTokens = skeleton.split(regex_generated_1.WHITE_SPACE_REGEX).filter(function(x) {
            return x.length > 0;
          });
          var tokens = [];
          for (var _i = 0, stringTokens_1 = stringTokens; _i < stringTokens_1.length; _i++) {
            var stringToken = stringTokens_1[_i];
            var stemAndOptions = stringToken.split("/");
            if (stemAndOptions.length === 0) {
              throw new Error("Invalid number skeleton");
            }
            var stem = stemAndOptions[0], options2 = stemAndOptions.slice(1);
            for (var _a32 = 0, options_1 = options2; _a32 < options_1.length; _a32++) {
              var option = options_1[_a32];
              if (option.length === 0) {
                throw new Error("Invalid number skeleton");
              }
            }
            tokens.push({ stem, options: options2 });
          }
          return tokens;
        }
        __name(parseNumberSkeletonFromString2, "parseNumberSkeletonFromString");
        exports2.parseNumberSkeletonFromString = parseNumberSkeletonFromString2;
        function icuUnitToEcma2(unit) {
          return unit.replace(/^(.*?)-/, "");
        }
        __name(icuUnitToEcma2, "icuUnitToEcma");
        var FRACTION_PRECISION_REGEX2 = /^\.(?:(0+)(\*)?|(#+)|(0+)(#+))$/g;
        var SIGNIFICANT_PRECISION_REGEX2 = /^(@+)?(\+|#+)?[rs]?$/g;
        var INTEGER_WIDTH_REGEX2 = /(\*)(0+)|(#+)(0+)|(0+)/g;
        var CONCISE_INTEGER_WIDTH_REGEX2 = /^(0+)$/;
        function parseSignificantPrecision2(str) {
          var result = {};
          if (str[str.length - 1] === "r") {
            result.roundingPriority = "morePrecision";
          } else if (str[str.length - 1] === "s") {
            result.roundingPriority = "lessPrecision";
          }
          str.replace(SIGNIFICANT_PRECISION_REGEX2, function(_, g1, g2) {
            if (typeof g2 !== "string") {
              result.minimumSignificantDigits = g1.length;
              result.maximumSignificantDigits = g1.length;
            } else if (g2 === "+") {
              result.minimumSignificantDigits = g1.length;
            } else if (g1[0] === "#") {
              result.maximumSignificantDigits = g1.length;
            } else {
              result.minimumSignificantDigits = g1.length;
              result.maximumSignificantDigits = g1.length + (typeof g2 === "string" ? g2.length : 0);
            }
            return "";
          });
          return result;
        }
        __name(parseSignificantPrecision2, "parseSignificantPrecision");
        function parseSign2(str) {
          switch (str) {
            case "sign-auto":
              return {
                signDisplay: "auto"
              };
            case "sign-accounting":
            case "()":
              return {
                currencySign: "accounting"
              };
            case "sign-always":
            case "+!":
              return {
                signDisplay: "always"
              };
            case "sign-accounting-always":
            case "()!":
              return {
                signDisplay: "always",
                currencySign: "accounting"
              };
            case "sign-except-zero":
            case "+?":
              return {
                signDisplay: "exceptZero"
              };
            case "sign-accounting-except-zero":
            case "()?":
              return {
                signDisplay: "exceptZero",
                currencySign: "accounting"
              };
            case "sign-never":
            case "+_":
              return {
                signDisplay: "never"
              };
          }
        }
        __name(parseSign2, "parseSign");
        function parseConciseScientificAndEngineeringStem2(stem) {
          var result;
          if (stem[0] === "E" && stem[1] === "E") {
            result = {
              notation: "engineering"
            };
            stem = stem.slice(2);
          } else if (stem[0] === "E") {
            result = {
              notation: "scientific"
            };
            stem = stem.slice(1);
          }
          if (result) {
            var signDisplay = stem.slice(0, 2);
            if (signDisplay === "+!") {
              result.signDisplay = "always";
              stem = stem.slice(2);
            } else if (signDisplay === "+?") {
              result.signDisplay = "exceptZero";
              stem = stem.slice(2);
            }
            if (!CONCISE_INTEGER_WIDTH_REGEX2.test(stem)) {
              throw new Error("Malformed concise eng/scientific notation");
            }
            result.minimumIntegerDigits = stem.length;
          }
          return result;
        }
        __name(parseConciseScientificAndEngineeringStem2, "parseConciseScientificAndEngineeringStem");
        function parseNotationOptions2(opt) {
          var result = {};
          var signOpts = parseSign2(opt);
          if (signOpts) {
            return signOpts;
          }
          return result;
        }
        __name(parseNotationOptions2, "parseNotationOptions");
        function parseNumberSkeleton2(tokens) {
          var result = {};
          for (var _i = 0, tokens_1 = tokens; _i < tokens_1.length; _i++) {
            var token = tokens_1[_i];
            switch (token.stem) {
              case "percent":
              case "%":
                result.style = "percent";
                continue;
              case "%x100":
                result.style = "percent";
                result.scale = 100;
                continue;
              case "currency":
                result.style = "currency";
                result.currency = token.options[0];
                continue;
              case "group-off":
              case ",_":
                result.useGrouping = false;
                continue;
              case "precision-integer":
              case ".":
                result.maximumFractionDigits = 0;
                continue;
              case "measure-unit":
              case "unit":
                result.style = "unit";
                result.unit = icuUnitToEcma2(token.options[0]);
                continue;
              case "compact-short":
              case "K":
                result.notation = "compact";
                result.compactDisplay = "short";
                continue;
              case "compact-long":
              case "KK":
                result.notation = "compact";
                result.compactDisplay = "long";
                continue;
              case "scientific":
                result = tslib_1.__assign(tslib_1.__assign(tslib_1.__assign({}, result), { notation: "scientific" }), token.options.reduce(function(all, opt2) {
                  return tslib_1.__assign(tslib_1.__assign({}, all), parseNotationOptions2(opt2));
                }, {}));
                continue;
              case "engineering":
                result = tslib_1.__assign(tslib_1.__assign(tslib_1.__assign({}, result), { notation: "engineering" }), token.options.reduce(function(all, opt2) {
                  return tslib_1.__assign(tslib_1.__assign({}, all), parseNotationOptions2(opt2));
                }, {}));
                continue;
              case "notation-simple":
                result.notation = "standard";
                continue;
              // https://github.com/unicode-org/icu/blob/master/icu4c/source/i18n/unicode/unumberformatter.h
              case "unit-width-narrow":
                result.currencyDisplay = "narrowSymbol";
                result.unitDisplay = "narrow";
                continue;
              case "unit-width-short":
                result.currencyDisplay = "code";
                result.unitDisplay = "short";
                continue;
              case "unit-width-full-name":
                result.currencyDisplay = "name";
                result.unitDisplay = "long";
                continue;
              case "unit-width-iso-code":
                result.currencyDisplay = "symbol";
                continue;
              case "scale":
                result.scale = parseFloat(token.options[0]);
                continue;
              // https://unicode-org.github.io/icu/userguide/format_parse/numbers/skeletons.html#integer-width
              case "integer-width":
                if (token.options.length > 1) {
                  throw new RangeError("integer-width stems only accept a single optional option");
                }
                token.options[0].replace(INTEGER_WIDTH_REGEX2, function(_, g1, g2, g3, g4, g5) {
                  if (g1) {
                    result.minimumIntegerDigits = g2.length;
                  } else if (g3 && g4) {
                    throw new Error("We currently do not support maximum integer digits");
                  } else if (g5) {
                    throw new Error("We currently do not support exact integer digits");
                  }
                  return "";
                });
                continue;
            }
            if (CONCISE_INTEGER_WIDTH_REGEX2.test(token.stem)) {
              result.minimumIntegerDigits = token.stem.length;
              continue;
            }
            if (FRACTION_PRECISION_REGEX2.test(token.stem)) {
              if (token.options.length > 1) {
                throw new RangeError("Fraction-precision stems only accept a single optional option");
              }
              token.stem.replace(FRACTION_PRECISION_REGEX2, function(_, g1, g2, g3, g4, g5) {
                if (g2 === "*") {
                  result.minimumFractionDigits = g1.length;
                } else if (g3 && g3[0] === "#") {
                  result.maximumFractionDigits = g3.length;
                } else if (g4 && g5) {
                  result.minimumFractionDigits = g4.length;
                  result.maximumFractionDigits = g4.length + g5.length;
                } else {
                  result.minimumFractionDigits = g1.length;
                  result.maximumFractionDigits = g1.length;
                }
                return "";
              });
              var opt = token.options[0];
              if (opt === "w") {
                result = tslib_1.__assign(tslib_1.__assign({}, result), { trailingZeroDisplay: "stripIfInteger" });
              } else if (opt) {
                result = tslib_1.__assign(tslib_1.__assign({}, result), parseSignificantPrecision2(opt));
              }
              continue;
            }
            if (SIGNIFICANT_PRECISION_REGEX2.test(token.stem)) {
              result = tslib_1.__assign(tslib_1.__assign({}, result), parseSignificantPrecision2(token.stem));
              continue;
            }
            var signOpts = parseSign2(token.stem);
            if (signOpts) {
              result = tslib_1.__assign(tslib_1.__assign({}, result), signOpts);
            }
            var conciseScientificAndEngineeringOpts = parseConciseScientificAndEngineeringStem2(token.stem);
            if (conciseScientificAndEngineeringOpts) {
              result = tslib_1.__assign(tslib_1.__assign({}, result), conciseScientificAndEngineeringOpts);
            }
          }
          return result;
        }
        __name(parseNumberSkeleton2, "parseNumberSkeleton");
        exports2.parseNumberSkeleton = parseNumberSkeleton2;
      }
    });
    require_icu_skeleton_parser = __commonJS({
      "node_modules/@formatjs/icu-skeleton-parser/index.js"(exports2) {
        "use strict";
        init_process_global();
        Object.defineProperty(exports2, "__esModule", { value: true });
        var tslib_1 = (init_tslib_es63(), __toCommonJS(tslib_es6_exports3));
        tslib_1.__exportStar(require_date_time(), exports2);
        tslib_1.__exportStar(require_number(), exports2);
      }
    });
    require_time_data_generated = __commonJS({
      "node_modules/@formatjs/icu-messageformat-parser/time-data.generated.js"(exports2) {
        "use strict";
        init_process_global();
        Object.defineProperty(exports2, "__esModule", { value: true });
        exports2.timeData = void 0;
        exports2.timeData = {
          "001": [
            "H",
            "h"
          ],
          "AC": [
            "H",
            "h",
            "hb",
            "hB"
          ],
          "AD": [
            "H",
            "hB"
          ],
          "AE": [
            "h",
            "hB",
            "hb",
            "H"
          ],
          "AF": [
            "H",
            "hb",
            "hB",
            "h"
          ],
          "AG": [
            "h",
            "hb",
            "H",
            "hB"
          ],
          "AI": [
            "H",
            "h",
            "hb",
            "hB"
          ],
          "AL": [
            "h",
            "H",
            "hB"
          ],
          "AM": [
            "H",
            "hB"
          ],
          "AO": [
            "H",
            "hB"
          ],
          "AR": [
            "H",
            "h",
            "hB",
            "hb"
          ],
          "AS": [
            "h",
            "H"
          ],
          "AT": [
            "H",
            "hB"
          ],
          "AU": [
            "h",
            "hb",
            "H",
            "hB"
          ],
          "AW": [
            "H",
            "hB"
          ],
          "AX": [
            "H"
          ],
          "AZ": [
            "H",
            "hB",
            "h"
          ],
          "BA": [
            "H",
            "hB",
            "h"
          ],
          "BB": [
            "h",
            "hb",
            "H",
            "hB"
          ],
          "BD": [
            "h",
            "hB",
            "H"
          ],
          "BE": [
            "H",
            "hB"
          ],
          "BF": [
            "H",
            "hB"
          ],
          "BG": [
            "H",
            "hB",
            "h"
          ],
          "BH": [
            "h",
            "hB",
            "hb",
            "H"
          ],
          "BJ": [
            "H",
            "hB"
          ],
          "BL": [
            "H",
            "hB"
          ],
          "BM": [
            "h",
            "hb",
            "H",
            "hB"
          ],
          "BN": [
            "hb",
            "hB",
            "h",
            "H"
          ],
          "BO": [
            "H",
            "hB",
            "h",
            "hb"
          ],
          "BQ": [
            "H"
          ],
          "BR": [
            "H",
            "hB"
          ],
          "BS": [
            "h",
            "hb",
            "H",
            "hB"
          ],
          "BT": [
            "h",
            "H"
          ],
          "BW": [
            "H",
            "h",
            "hb",
            "hB"
          ],
          "BZ": [
            "H",
            "h",
            "hb",
            "hB"
          ],
          "CA": [
            "h",
            "hb",
            "H",
            "hB"
          ],
          "CC": [
            "H",
            "h",
            "hb",
            "hB"
          ],
          "CD": [
            "hB",
            "H"
          ],
          "CF": [
            "H",
            "h",
            "hB"
          ],
          "CG": [
            "H",
            "hB"
          ],
          "CH": [
            "H",
            "hB",
            "h"
          ],
          "CI": [
            "H",
            "hB"
          ],
          "CK": [
            "H",
            "h",
            "hb",
            "hB"
          ],
          "CL": [
            "H",
            "h",
            "hB",
            "hb"
          ],
          "CM": [
            "H",
            "h",
            "hB"
          ],
          "CN": [
            "H",
            "hB",
            "hb",
            "h"
          ],
          "CO": [
            "h",
            "H",
            "hB",
            "hb"
          ],
          "CP": [
            "H"
          ],
          "CR": [
            "H",
            "h",
            "hB",
            "hb"
          ],
          "CU": [
            "H",
            "h",
            "hB",
            "hb"
          ],
          "CV": [
            "H",
            "hB"
          ],
          "CX": [
            "H",
            "h",
            "hb",
            "hB"
          ],
          "CY": [
            "h",
            "H",
            "hb",
            "hB"
          ],
          "CZ": [
            "H"
          ],
          "DE": [
            "H",
            "hB"
          ],
          "DG": [
            "H",
            "h",
            "hb",
            "hB"
          ],
          "DJ": [
            "h",
            "H"
          ],
          "DK": [
            "H"
          ],
          "DM": [
            "h",
            "hb",
            "H",
            "hB"
          ],
          "DO": [
            "h",
            "H",
            "hB",
            "hb"
          ],
          "DZ": [
            "h",
            "hB",
            "hb",
            "H"
          ],
          "EA": [
            "H",
            "h",
            "hB",
            "hb"
          ],
          "EC": [
            "H",
            "hB",
            "h",
            "hb"
          ],
          "EE": [
            "H",
            "hB"
          ],
          "EG": [
            "h",
            "hB",
            "hb",
            "H"
          ],
          "EH": [
            "h",
            "hB",
            "hb",
            "H"
          ],
          "ER": [
            "h",
            "H"
          ],
          "ES": [
            "H",
            "hB",
            "h",
            "hb"
          ],
          "ET": [
            "hB",
            "hb",
            "h",
            "H"
          ],
          "FI": [
            "H"
          ],
          "FJ": [
            "h",
            "hb",
            "H",
            "hB"
          ],
          "FK": [
            "H",
            "h",
            "hb",
            "hB"
          ],
          "FM": [
            "h",
            "hb",
            "H",
            "hB"
          ],
          "FR": [
            "H",
            "hB"
          ],
          "GA": [
            "H",
            "hB"
          ],
          "GB": [
            "H",
            "h",
            "hb",
            "hB"
          ],
          "GD": [
            "h",
            "hb",
            "H",
            "hB"
          ],
          "GE": [
            "H",
            "hB",
            "h"
          ],
          "GF": [
            "H",
            "hB"
          ],
          "GG": [
            "H",
            "h",
            "hb",
            "hB"
          ],
          "GH": [
            "h",
            "H"
          ],
          "GI": [
            "H",
            "h",
            "hb",
            "hB"
          ],
          "GM": [
            "h",
            "hb",
            "H",
            "hB"
          ],
          "GN": [
            "H",
            "hB"
          ],
          "GP": [
            "H",
            "hB"
          ],
          "GQ": [
            "H",
            "hB",
            "h",
            "hb"
          ],
          "GR": [
            "h",
            "H",
            "hb",
            "hB"
          ],
          "GT": [
            "H",
            "h",
            "hB",
            "hb"
          ],
          "GU": [
            "h",
            "hb",
            "H",
            "hB"
          ],
          "GW": [
            "H",
            "hB"
          ],
          "GY": [
            "h",
            "hb",
            "H",
            "hB"
          ],
          "HK": [
            "h",
            "hB",
            "hb",
            "H"
          ],
          "HN": [
            "H",
            "h",
            "hB",
            "hb"
          ],
          "HR": [
            "H",
            "hB"
          ],
          "IC": [
            "H",
            "h",
            "hB",
            "hb"
          ],
          "ID": [
            "H"
          ],
          "IE": [
            "H",
            "h",
            "hb",
            "hB"
          ],
          "IL": [
            "H",
            "hB"
          ],
          "IM": [
            "H",
            "h",
            "hb",
            "hB"
          ],
          "IN": [
            "h",
            "H"
          ],
          "IO": [
            "H",
            "h",
            "hb",
            "hB"
          ],
          "IQ": [
            "h",
            "hB",
            "hb",
            "H"
          ],
          "IR": [
            "hB",
            "H"
          ],
          "IS": [
            "H"
          ],
          "IT": [
            "H",
            "hB"
          ],
          "JE": [
            "H",
            "h",
            "hb",
            "hB"
          ],
          "JM": [
            "h",
            "hb",
            "H",
            "hB"
          ],
          "JO": [
            "h",
            "hB",
            "hb",
            "H"
          ],
          "JP": [
            "H",
            "h",
            "K"
          ],
          "KE": [
            "hB",
            "hb",
            "H",
            "h"
          ],
          "KG": [
            "H",
            "h",
            "hB",
            "hb"
          ],
          "KH": [
            "hB",
            "h",
            "H",
            "hb"
          ],
          "KI": [
            "h",
            "hb",
            "H",
            "hB"
          ],
          "KM": [
            "H",
            "h",
            "hB",
            "hb"
          ],
          "KN": [
            "h",
            "hb",
            "H",
            "hB"
          ],
          "KP": [
            "h",
            "H",
            "hB",
            "hb"
          ],
          "KR": [
            "h",
            "H",
            "hB",
            "hb"
          ],
          "KW": [
            "h",
            "hB",
            "hb",
            "H"
          ],
          "KY": [
            "h",
            "hb",
            "H",
            "hB"
          ],
          "KZ": [
            "H",
            "hB"
          ],
          "LA": [
            "H",
            "hb",
            "hB",
            "h"
          ],
          "LB": [
            "h",
            "hB",
            "hb",
            "H"
          ],
          "LC": [
            "h",
            "hb",
            "H",
            "hB"
          ],
          "LI": [
            "H",
            "hB",
            "h"
          ],
          "LK": [
            "H",
            "h",
            "hB",
            "hb"
          ],
          "LR": [
            "h",
            "hb",
            "H",
            "hB"
          ],
          "LS": [
            "h",
            "H"
          ],
          "LT": [
            "H",
            "h",
            "hb",
            "hB"
          ],
          "LU": [
            "H",
            "h",
            "hB"
          ],
          "LV": [
            "H",
            "hB",
            "hb",
            "h"
          ],
          "LY": [
            "h",
            "hB",
            "hb",
            "H"
          ],
          "MA": [
            "H",
            "h",
            "hB",
            "hb"
          ],
          "MC": [
            "H",
            "hB"
          ],
          "MD": [
            "H",
            "hB"
          ],
          "ME": [
            "H",
            "hB",
            "h"
          ],
          "MF": [
            "H",
            "hB"
          ],
          "MH": [
            "h",
            "hb",
            "H",
            "hB"
          ],
          "MK": [
            "H",
            "h",
            "hb",
            "hB"
          ],
          "ML": [
            "H"
          ],
          "MM": [
            "hB",
            "hb",
            "H",
            "h"
          ],
          "MN": [
            "H",
            "h",
            "hb",
            "hB"
          ],
          "MO": [
            "h",
            "hB",
            "hb",
            "H"
          ],
          "MP": [
            "h",
            "hb",
            "H",
            "hB"
          ],
          "MQ": [
            "H",
            "hB"
          ],
          "MR": [
            "h",
            "hB",
            "hb",
            "H"
          ],
          "MS": [
            "H",
            "h",
            "hb",
            "hB"
          ],
          "MW": [
            "h",
            "hb",
            "H",
            "hB"
          ],
          "MX": [
            "H",
            "h",
            "hB",
            "hb"
          ],
          "MY": [
            "hb",
            "hB",
            "h",
            "H"
          ],
          "MZ": [
            "H",
            "hB"
          ],
          "NA": [
            "h",
            "H",
            "hB",
            "hb"
          ],
          "NC": [
            "H",
            "hB"
          ],
          "NE": [
            "H"
          ],
          "NF": [
            "H",
            "h",
            "hb",
            "hB"
          ],
          "NG": [
            "H",
            "h",
            "hb",
            "hB"
          ],
          "NI": [
            "H",
            "h",
            "hB",
            "hb"
          ],
          "NL": [
            "H",
            "hB"
          ],
          "NP": [
            "H",
            "h",
            "hB"
          ],
          "NR": [
            "H",
            "h",
            "hb",
            "hB"
          ],
          "NU": [
            "H",
            "h",
            "hb",
            "hB"
          ],
          "NZ": [
            "h",
            "hb",
            "H",
            "hB"
          ],
          "OM": [
            "h",
            "hB",
            "hb",
            "H"
          ],
          "PA": [
            "h",
            "H",
            "hB",
            "hb"
          ],
          "PE": [
            "H",
            "hB",
            "h",
            "hb"
          ],
          "PF": [
            "H",
            "h",
            "hB"
          ],
          "PG": [
            "h",
            "H"
          ],
          "PH": [
            "h",
            "hB",
            "hb",
            "H"
          ],
          "PK": [
            "h",
            "hB",
            "H"
          ],
          "PM": [
            "H",
            "hB"
          ],
          "PN": [
            "H",
            "h",
            "hb",
            "hB"
          ],
          "PR": [
            "h",
            "H",
            "hB",
            "hb"
          ],
          "PS": [
            "h",
            "hB",
            "hb",
            "H"
          ],
          "PT": [
            "H",
            "hB"
          ],
          "PW": [
            "h",
            "H"
          ],
          "PY": [
            "H",
            "h",
            "hB",
            "hb"
          ],
          "QA": [
            "h",
            "hB",
            "hb",
            "H"
          ],
          "RE": [
            "H",
            "hB"
          ],
          "RO": [
            "H",
            "hB"
          ],
          "RS": [
            "H",
            "hB",
            "h"
          ],
          "RU": [
            "H"
          ],
          "SA": [
            "h",
            "hB",
            "hb",
            "H"
          ],
          "SB": [
            "h",
            "hb",
            "H",
            "hB"
          ],
          "SC": [
            "H",
            "h",
            "hB"
          ],
          "SD": [
            "h",
            "hB",
            "hb",
            "H"
          ],
          "SE": [
            "H"
          ],
          "SG": [
            "h",
            "hb",
            "H",
            "hB"
          ],
          "SH": [
            "H",
            "h",
            "hb",
            "hB"
          ],
          "SI": [
            "H",
            "hB"
          ],
          "SJ": [
            "H"
          ],
          "SK": [
            "H"
          ],
          "SL": [
            "h",
            "hb",
            "H",
            "hB"
          ],
          "SM": [
            "H",
            "h",
            "hB"
          ],
          "SN": [
            "H",
            "h",
            "hB"
          ],
          "SO": [
            "h",
            "H"
          ],
          "SR": [
            "H",
            "hB"
          ],
          "SS": [
            "h",
            "hb",
            "H",
            "hB"
          ],
          "ST": [
            "H",
            "hB"
          ],
          "SV": [
            "H",
            "h",
            "hB",
            "hb"
          ],
          "SX": [
            "H",
            "h",
            "hb",
            "hB"
          ],
          "SY": [
            "h",
            "hB",
            "hb",
            "H"
          ],
          "SZ": [
            "h",
            "hb",
            "H",
            "hB"
          ],
          "TA": [
            "H",
            "h",
            "hb",
            "hB"
          ],
          "TC": [
            "h",
            "hb",
            "H",
            "hB"
          ],
          "TD": [
            "h",
            "H",
            "hB"
          ],
          "TF": [
            "H",
            "h",
            "hB"
          ],
          "TG": [
            "H",
            "hB"
          ],
          "TL": [
            "H",
            "hB",
            "hb",
            "h"
          ],
          "TN": [
            "h",
            "hB",
            "hb",
            "H"
          ],
          "TO": [
            "h",
            "H"
          ],
          "TR": [
            "H",
            "hB"
          ],
          "TT": [
            "h",
            "hb",
            "H",
            "hB"
          ],
          "TW": [
            "hB",
            "hb",
            "h",
            "H"
          ],
          "TZ": [
            "hB",
            "hb",
            "H",
            "h"
          ],
          "UA": [
            "H",
            "hB",
            "h"
          ],
          "UG": [
            "hB",
            "hb",
            "H",
            "h"
          ],
          "UM": [
            "h",
            "hb",
            "H",
            "hB"
          ],
          "US": [
            "h",
            "hb",
            "H",
            "hB"
          ],
          "UY": [
            "H",
            "h",
            "hB",
            "hb"
          ],
          "UZ": [
            "H",
            "hB",
            "h"
          ],
          "VA": [
            "H",
            "h",
            "hB"
          ],
          "VC": [
            "h",
            "hb",
            "H",
            "hB"
          ],
          "VE": [
            "h",
            "H",
            "hB",
            "hb"
          ],
          "VG": [
            "h",
            "hb",
            "H",
            "hB"
          ],
          "VI": [
            "h",
            "hb",
            "H",
            "hB"
          ],
          "VU": [
            "h",
            "H"
          ],
          "WF": [
            "H",
            "hB"
          ],
          "WS": [
            "h",
            "H"
          ],
          "XK": [
            "H",
            "hB",
            "h"
          ],
          "YE": [
            "h",
            "hB",
            "hb",
            "H"
          ],
          "YT": [
            "H",
            "hB"
          ],
          "ZA": [
            "H",
            "h",
            "hb",
            "hB"
          ],
          "ZM": [
            "h",
            "hb",
            "H",
            "hB"
          ],
          "af-ZA": [
            "H",
            "h",
            "hB",
            "hb"
          ],
          "ar-001": [
            "h",
            "hB",
            "hb",
            "H"
          ],
          "ca-ES": [
            "H",
            "h",
            "hB"
          ],
          "en-001": [
            "h",
            "hb",
            "H",
            "hB"
          ],
          "es-BO": [
            "H",
            "h",
            "hB",
            "hb"
          ],
          "es-BR": [
            "H",
            "h",
            "hB",
            "hb"
          ],
          "es-EC": [
            "H",
            "h",
            "hB",
            "hb"
          ],
          "es-ES": [
            "H",
            "h",
            "hB",
            "hb"
          ],
          "es-GQ": [
            "H",
            "h",
            "hB",
            "hb"
          ],
          "es-PE": [
            "H",
            "h",
            "hB",
            "hb"
          ],
          "fr-CA": [
            "H",
            "h",
            "hB"
          ],
          "gl-ES": [
            "H",
            "h",
            "hB"
          ],
          "gu-IN": [
            "hB",
            "hb",
            "h",
            "H"
          ],
          "hi-IN": [
            "hB",
            "h",
            "H"
          ],
          "it-CH": [
            "H",
            "h",
            "hB"
          ],
          "it-IT": [
            "H",
            "h",
            "hB"
          ],
          "kn-IN": [
            "hB",
            "h",
            "H"
          ],
          "ml-IN": [
            "hB",
            "h",
            "H"
          ],
          "mr-IN": [
            "hB",
            "hb",
            "h",
            "H"
          ],
          "pa-IN": [
            "hB",
            "hb",
            "h",
            "H"
          ],
          "ta-IN": [
            "hB",
            "h",
            "hb",
            "H"
          ],
          "te-IN": [
            "hB",
            "h",
            "H"
          ],
          "zu-ZA": [
            "H",
            "hB",
            "hb",
            "h"
          ]
        };
      }
    });
    require_date_time_pattern_generator = __commonJS({
      "node_modules/@formatjs/icu-messageformat-parser/date-time-pattern-generator.js"(exports2) {
        "use strict";
        init_process_global();
        Object.defineProperty(exports2, "__esModule", { value: true });
        exports2.getBestPattern = void 0;
        var time_data_generated_1 = require_time_data_generated();
        function getBestPattern(skeleton, locale) {
          var skeletonCopy = "";
          for (var patternPos = 0; patternPos < skeleton.length; patternPos++) {
            var patternChar = skeleton.charAt(patternPos);
            if (patternChar === "j") {
              var extraLength = 0;
              while (patternPos + 1 < skeleton.length && skeleton.charAt(patternPos + 1) === patternChar) {
                extraLength++;
                patternPos++;
              }
              var hourLen = 1 + (extraLength & 1);
              var dayPeriodLen = extraLength < 2 ? 1 : 3 + (extraLength >> 1);
              var dayPeriodChar = "a";
              var hourChar = getDefaultHourSymbolFromLocale(locale);
              if (hourChar == "H" || hourChar == "k") {
                dayPeriodLen = 0;
              }
              while (dayPeriodLen-- > 0) {
                skeletonCopy += dayPeriodChar;
              }
              while (hourLen-- > 0) {
                skeletonCopy = hourChar + skeletonCopy;
              }
            } else if (patternChar === "J") {
              skeletonCopy += "H";
            } else {
              skeletonCopy += patternChar;
            }
          }
          return skeletonCopy;
        }
        __name(getBestPattern, "getBestPattern");
        exports2.getBestPattern = getBestPattern;
        function getDefaultHourSymbolFromLocale(locale) {
          var hourCycle = locale.hourCycle;
          if (hourCycle === void 0 && // @ts-ignore hourCycle(s) is not identified yet
          locale.hourCycles && // @ts-ignore
          locale.hourCycles.length) {
            hourCycle = locale.hourCycles[0];
          }
          if (hourCycle) {
            switch (hourCycle) {
              case "h24":
                return "k";
              case "h23":
                return "H";
              case "h12":
                return "h";
              case "h11":
                return "K";
              default:
                throw new Error("Invalid hourCycle");
            }
          }
          var languageTag = locale.language;
          var regionTag;
          if (languageTag !== "root") {
            regionTag = locale.maximize().region;
          }
          var hourCycles = time_data_generated_1.timeData[regionTag || ""] || time_data_generated_1.timeData[languageTag || ""] || time_data_generated_1.timeData["".concat(languageTag, "-001")] || time_data_generated_1.timeData["001"];
          return hourCycles[0];
        }
        __name(getDefaultHourSymbolFromLocale, "getDefaultHourSymbolFromLocale");
      }
    });
    require_parser = __commonJS({
      "node_modules/@formatjs/icu-messageformat-parser/parser.js"(exports2) {
        "use strict";
        init_process_global();
        var _a32;
        Object.defineProperty(exports2, "__esModule", { value: true });
        exports2.Parser = void 0;
        var tslib_1 = (init_tslib_es62(), __toCommonJS(tslib_es6_exports2));
        var error_1 = require_error();
        var types_1 = require_types();
        var regex_generated_1 = require_regex_generated();
        var icu_skeleton_parser_1 = require_icu_skeleton_parser();
        var date_time_pattern_generator_1 = require_date_time_pattern_generator();
        var SPACE_SEPARATOR_START_REGEX2 = new RegExp("^".concat(regex_generated_1.SPACE_SEPARATOR_REGEX.source, "*"));
        var SPACE_SEPARATOR_END_REGEX2 = new RegExp("".concat(regex_generated_1.SPACE_SEPARATOR_REGEX.source, "*$"));
        function createLocation2(start, end) {
          return { start, end };
        }
        __name(createLocation2, "createLocation");
        var hasNativeStartsWith2 = !!String.prototype.startsWith && "_a".startsWith("a", 1);
        var hasNativeFromCodePoint2 = !!String.fromCodePoint;
        var hasNativeFromEntries2 = !!Object.fromEntries;
        var hasNativeCodePointAt2 = !!String.prototype.codePointAt;
        var hasTrimStart2 = !!String.prototype.trimStart;
        var hasTrimEnd2 = !!String.prototype.trimEnd;
        var hasNativeIsSafeInteger2 = !!Number.isSafeInteger;
        var isSafeInteger2 = hasNativeIsSafeInteger2 ? Number.isSafeInteger : function(n) {
          return typeof n === "number" && isFinite(n) && Math.floor(n) === n && Math.abs(n) <= 9007199254740991;
        };
        var REGEX_SUPPORTS_U_AND_Y2 = true;
        try {
          re2 = RE2("([^\\p{White_Space}\\p{Pattern_Syntax}]*)", "yu");
          REGEX_SUPPORTS_U_AND_Y2 = ((_a32 = re2.exec("a")) === null || _a32 === void 0 ? void 0 : _a32[0]) === "a";
        } catch (_) {
          REGEX_SUPPORTS_U_AND_Y2 = false;
        }
        var re2;
        var startsWith4 = hasNativeStartsWith2 ? (
          // Native
          /* @__PURE__ */ __name(function startsWith22(s, search, position) {
            return s.startsWith(search, position);
          }, "startsWith")
        ) : (
          // For IE11
          /* @__PURE__ */ __name(function startsWith22(s, search, position) {
            return s.slice(position, position + search.length) === search;
          }, "startsWith")
        );
        var fromCodePoint3 = hasNativeFromCodePoint2 ? String.fromCodePoint : (
          // IE11
          /* @__PURE__ */ __name(function fromCodePoint22() {
            var codePoints = [];
            for (var _i = 0; _i < arguments.length; _i++) {
              codePoints[_i] = arguments[_i];
            }
            var elements = "";
            var length = codePoints.length;
            var i = 0;
            var code2;
            while (length > i) {
              code2 = codePoints[i++];
              if (code2 > 1114111)
                throw RangeError(code2 + " is not a valid code point");
              elements += code2 < 65536 ? String.fromCharCode(code2) : String.fromCharCode(((code2 -= 65536) >> 10) + 55296, code2 % 1024 + 56320);
            }
            return elements;
          }, "fromCodePoint")
        );
        var fromEntries3 = (
          // native
          hasNativeFromEntries2 ? Object.fromEntries : (
            // Ponyfill
            /* @__PURE__ */ __name(function fromEntries22(entries) {
              var obj = {};
              for (var _i = 0, entries_1 = entries; _i < entries_1.length; _i++) {
                var _a4 = entries_1[_i], k = _a4[0], v = _a4[1];
                obj[k] = v;
              }
              return obj;
            }, "fromEntries")
          )
        );
        var codePointAt4 = hasNativeCodePointAt2 ? (
          // Native
          /* @__PURE__ */ __name(function codePointAt22(s, index2) {
            return s.codePointAt(index2);
          }, "codePointAt")
        ) : (
          // IE 11
          /* @__PURE__ */ __name(function codePointAt22(s, index2) {
            var size = s.length;
            if (index2 < 0 || index2 >= size) {
              return void 0;
            }
            var first2 = s.charCodeAt(index2);
            var second;
            return first2 < 55296 || first2 > 56319 || index2 + 1 === size || (second = s.charCodeAt(index2 + 1)) < 56320 || second > 57343 ? first2 : (first2 - 55296 << 10) + (second - 56320) + 65536;
          }, "codePointAt")
        );
        var trimStart4 = hasTrimStart2 ? (
          // Native
          /* @__PURE__ */ __name(function trimStart22(s) {
            return s.trimStart();
          }, "trimStart")
        ) : (
          // Ponyfill
          /* @__PURE__ */ __name(function trimStart22(s) {
            return s.replace(SPACE_SEPARATOR_START_REGEX2, "");
          }, "trimStart")
        );
        var trimEnd4 = hasTrimEnd2 ? (
          // Native
          /* @__PURE__ */ __name(function trimEnd22(s) {
            return s.trimEnd();
          }, "trimEnd")
        ) : (
          // Ponyfill
          /* @__PURE__ */ __name(function trimEnd22(s) {
            return s.replace(SPACE_SEPARATOR_END_REGEX2, "");
          }, "trimEnd")
        );
        function RE2(s, flag) {
          return new RegExp(s, flag);
        }
        __name(RE2, "RE");
        var matchIdentifierAtIndex2;
        if (REGEX_SUPPORTS_U_AND_Y2) {
          IDENTIFIER_PREFIX_RE_12 = RE2("([^\\p{White_Space}\\p{Pattern_Syntax}]*)", "yu");
          matchIdentifierAtIndex2 = /* @__PURE__ */ __name(function matchIdentifierAtIndex22(s, index2) {
            var _a4;
            IDENTIFIER_PREFIX_RE_12.lastIndex = index2;
            var match = IDENTIFIER_PREFIX_RE_12.exec(s);
            return (_a4 = match[1]) !== null && _a4 !== void 0 ? _a4 : "";
          }, "matchIdentifierAtIndex");
        } else {
          matchIdentifierAtIndex2 = /* @__PURE__ */ __name(function matchIdentifierAtIndex22(s, index2) {
            var match = [];
            while (true) {
              var c = codePointAt4(s, index2);
              if (c === void 0 || _isWhiteSpace2(c) || _isPatternSyntax2(c)) {
                break;
              }
              match.push(c);
              index2 += c >= 65536 ? 2 : 1;
            }
            return fromCodePoint3.apply(void 0, match);
          }, "matchIdentifierAtIndex");
        }
        var IDENTIFIER_PREFIX_RE_12;
        var Parser3 = (
          /** @class */
          function() {
            function Parser22(message, options2) {
              if (options2 === void 0) {
                options2 = {};
              }
              this.message = message;
              this.position = { offset: 0, line: 1, column: 1 };
              this.ignoreTag = !!options2.ignoreTag;
              this.locale = options2.locale;
              this.requiresOtherClause = !!options2.requiresOtherClause;
              this.shouldParseSkeletons = !!options2.shouldParseSkeletons;
            }
            __name(Parser22, "Parser");
            Parser22.prototype.parse = function() {
              if (this.offset() !== 0) {
                throw Error("parser can only be used once");
              }
              return this.parseMessage(0, "", false);
            };
            Parser22.prototype.parseMessage = function(nestingLevel, parentArgType, expectingCloseTag) {
              var elements = [];
              while (!this.isEOF()) {
                var char = this.char();
                if (char === 123) {
                  var result = this.parseArgument(nestingLevel, expectingCloseTag);
                  if (result.err) {
                    return result;
                  }
                  elements.push(result.val);
                } else if (char === 125 && nestingLevel > 0) {
                  break;
                } else if (char === 35 && (parentArgType === "plural" || parentArgType === "selectordinal")) {
                  var position = this.clonePosition();
                  this.bump();
                  elements.push({
                    type: types_1.TYPE.pound,
                    location: createLocation2(position, this.clonePosition())
                  });
                } else if (char === 60 && !this.ignoreTag && this.peek() === 47) {
                  if (expectingCloseTag) {
                    break;
                  } else {
                    return this.error(error_1.ErrorKind.UNMATCHED_CLOSING_TAG, createLocation2(this.clonePosition(), this.clonePosition()));
                  }
                } else if (char === 60 && !this.ignoreTag && _isAlpha2(this.peek() || 0)) {
                  var result = this.parseTag(nestingLevel, parentArgType);
                  if (result.err) {
                    return result;
                  }
                  elements.push(result.val);
                } else {
                  var result = this.parseLiteral(nestingLevel, parentArgType);
                  if (result.err) {
                    return result;
                  }
                  elements.push(result.val);
                }
              }
              return { val: elements, err: null };
            };
            Parser22.prototype.parseTag = function(nestingLevel, parentArgType) {
              var startPosition = this.clonePosition();
              this.bump();
              var tagName = this.parseTagName();
              this.bumpSpace();
              if (this.bumpIf("/>")) {
                return {
                  val: {
                    type: types_1.TYPE.literal,
                    value: "<".concat(tagName, "/>"),
                    location: createLocation2(startPosition, this.clonePosition())
                  },
                  err: null
                };
              } else if (this.bumpIf(">")) {
                var childrenResult = this.parseMessage(nestingLevel + 1, parentArgType, true);
                if (childrenResult.err) {
                  return childrenResult;
                }
                var children = childrenResult.val;
                var endTagStartPosition = this.clonePosition();
                if (this.bumpIf("</")) {
                  if (this.isEOF() || !_isAlpha2(this.char())) {
                    return this.error(error_1.ErrorKind.INVALID_TAG, createLocation2(endTagStartPosition, this.clonePosition()));
                  }
                  var closingTagNameStartPosition = this.clonePosition();
                  var closingTagName = this.parseTagName();
                  if (tagName !== closingTagName) {
                    return this.error(error_1.ErrorKind.UNMATCHED_CLOSING_TAG, createLocation2(closingTagNameStartPosition, this.clonePosition()));
                  }
                  this.bumpSpace();
                  if (!this.bumpIf(">")) {
                    return this.error(error_1.ErrorKind.INVALID_TAG, createLocation2(endTagStartPosition, this.clonePosition()));
                  }
                  return {
                    val: {
                      type: types_1.TYPE.tag,
                      value: tagName,
                      children,
                      location: createLocation2(startPosition, this.clonePosition())
                    },
                    err: null
                  };
                } else {
                  return this.error(error_1.ErrorKind.UNCLOSED_TAG, createLocation2(startPosition, this.clonePosition()));
                }
              } else {
                return this.error(error_1.ErrorKind.INVALID_TAG, createLocation2(startPosition, this.clonePosition()));
              }
            };
            Parser22.prototype.parseTagName = function() {
              var startOffset = this.offset();
              this.bump();
              while (!this.isEOF() && _isPotentialElementNameChar2(this.char())) {
                this.bump();
              }
              return this.message.slice(startOffset, this.offset());
            };
            Parser22.prototype.parseLiteral = function(nestingLevel, parentArgType) {
              var start = this.clonePosition();
              var value = "";
              while (true) {
                var parseQuoteResult = this.tryParseQuote(parentArgType);
                if (parseQuoteResult) {
                  value += parseQuoteResult;
                  continue;
                }
                var parseUnquotedResult = this.tryParseUnquoted(nestingLevel, parentArgType);
                if (parseUnquotedResult) {
                  value += parseUnquotedResult;
                  continue;
                }
                var parseLeftAngleResult = this.tryParseLeftAngleBracket();
                if (parseLeftAngleResult) {
                  value += parseLeftAngleResult;
                  continue;
                }
                break;
              }
              var location = createLocation2(start, this.clonePosition());
              return {
                val: { type: types_1.TYPE.literal, value, location },
                err: null
              };
            };
            Parser22.prototype.tryParseLeftAngleBracket = function() {
              if (!this.isEOF() && this.char() === 60 && (this.ignoreTag || // If at the opening tag or closing tag position, bail.
              !_isAlphaOrSlash2(this.peek() || 0))) {
                this.bump();
                return "<";
              }
              return null;
            };
            Parser22.prototype.tryParseQuote = function(parentArgType) {
              if (this.isEOF() || this.char() !== 39) {
                return null;
              }
              switch (this.peek()) {
                case 39:
                  this.bump();
                  this.bump();
                  return "'";
                // '{', '<', '>', '}'
                case 123:
                case 60:
                case 62:
                case 125:
                  break;
                case 35:
                  if (parentArgType === "plural" || parentArgType === "selectordinal") {
                    break;
                  }
                  return null;
                default:
                  return null;
              }
              this.bump();
              var codePoints = [this.char()];
              this.bump();
              while (!this.isEOF()) {
                var ch = this.char();
                if (ch === 39) {
                  if (this.peek() === 39) {
                    codePoints.push(39);
                    this.bump();
                  } else {
                    this.bump();
                    break;
                  }
                } else {
                  codePoints.push(ch);
                }
                this.bump();
              }
              return fromCodePoint3.apply(void 0, codePoints);
            };
            Parser22.prototype.tryParseUnquoted = function(nestingLevel, parentArgType) {
              if (this.isEOF()) {
                return null;
              }
              var ch = this.char();
              if (ch === 60 || ch === 123 || ch === 35 && (parentArgType === "plural" || parentArgType === "selectordinal") || ch === 125 && nestingLevel > 0) {
                return null;
              } else {
                this.bump();
                return fromCodePoint3(ch);
              }
            };
            Parser22.prototype.parseArgument = function(nestingLevel, expectingCloseTag) {
              var openingBracePosition = this.clonePosition();
              this.bump();
              this.bumpSpace();
              if (this.isEOF()) {
                return this.error(error_1.ErrorKind.EXPECT_ARGUMENT_CLOSING_BRACE, createLocation2(openingBracePosition, this.clonePosition()));
              }
              if (this.char() === 125) {
                this.bump();
                return this.error(error_1.ErrorKind.EMPTY_ARGUMENT, createLocation2(openingBracePosition, this.clonePosition()));
              }
              var value = this.parseIdentifierIfPossible().value;
              if (!value) {
                return this.error(error_1.ErrorKind.MALFORMED_ARGUMENT, createLocation2(openingBracePosition, this.clonePosition()));
              }
              this.bumpSpace();
              if (this.isEOF()) {
                return this.error(error_1.ErrorKind.EXPECT_ARGUMENT_CLOSING_BRACE, createLocation2(openingBracePosition, this.clonePosition()));
              }
              switch (this.char()) {
                // Simple argument: `{name}`
                case 125: {
                  this.bump();
                  return {
                    val: {
                      type: types_1.TYPE.argument,
                      // value does not include the opening and closing braces.
                      value,
                      location: createLocation2(openingBracePosition, this.clonePosition())
                    },
                    err: null
                  };
                }
                // Argument with options: `{name, format, ...}`
                case 44: {
                  this.bump();
                  this.bumpSpace();
                  if (this.isEOF()) {
                    return this.error(error_1.ErrorKind.EXPECT_ARGUMENT_CLOSING_BRACE, createLocation2(openingBracePosition, this.clonePosition()));
                  }
                  return this.parseArgumentOptions(nestingLevel, expectingCloseTag, value, openingBracePosition);
                }
                default:
                  return this.error(error_1.ErrorKind.MALFORMED_ARGUMENT, createLocation2(openingBracePosition, this.clonePosition()));
              }
            };
            Parser22.prototype.parseIdentifierIfPossible = function() {
              var startingPosition = this.clonePosition();
              var startOffset = this.offset();
              var value = matchIdentifierAtIndex2(this.message, startOffset);
              var endOffset = startOffset + value.length;
              this.bumpTo(endOffset);
              var endPosition = this.clonePosition();
              var location = createLocation2(startingPosition, endPosition);
              return { value, location };
            };
            Parser22.prototype.parseArgumentOptions = function(nestingLevel, expectingCloseTag, value, openingBracePosition) {
              var _a4;
              var typeStartPosition = this.clonePosition();
              var argType = this.parseIdentifierIfPossible().value;
              var typeEndPosition = this.clonePosition();
              switch (argType) {
                case "":
                  return this.error(error_1.ErrorKind.EXPECT_ARGUMENT_TYPE, createLocation2(typeStartPosition, typeEndPosition));
                case "number":
                case "date":
                case "time": {
                  this.bumpSpace();
                  var styleAndLocation = null;
                  if (this.bumpIf(",")) {
                    this.bumpSpace();
                    var styleStartPosition = this.clonePosition();
                    var result = this.parseSimpleArgStyleIfPossible();
                    if (result.err) {
                      return result;
                    }
                    var style = trimEnd4(result.val);
                    if (style.length === 0) {
                      return this.error(error_1.ErrorKind.EXPECT_ARGUMENT_STYLE, createLocation2(this.clonePosition(), this.clonePosition()));
                    }
                    var styleLocation = createLocation2(styleStartPosition, this.clonePosition());
                    styleAndLocation = { style, styleLocation };
                  }
                  var argCloseResult = this.tryParseArgumentClose(openingBracePosition);
                  if (argCloseResult.err) {
                    return argCloseResult;
                  }
                  var location_1 = createLocation2(openingBracePosition, this.clonePosition());
                  if (styleAndLocation && startsWith4(styleAndLocation === null || styleAndLocation === void 0 ? void 0 : styleAndLocation.style, "::", 0)) {
                    var skeleton = trimStart4(styleAndLocation.style.slice(2));
                    if (argType === "number") {
                      var result = this.parseNumberSkeletonFromString(skeleton, styleAndLocation.styleLocation);
                      if (result.err) {
                        return result;
                      }
                      return {
                        val: { type: types_1.TYPE.number, value, location: location_1, style: result.val },
                        err: null
                      };
                    } else {
                      if (skeleton.length === 0) {
                        return this.error(error_1.ErrorKind.EXPECT_DATE_TIME_SKELETON, location_1);
                      }
                      var dateTimePattern = skeleton;
                      if (this.locale) {
                        dateTimePattern = (0, date_time_pattern_generator_1.getBestPattern)(skeleton, this.locale);
                      }
                      var style = {
                        type: types_1.SKELETON_TYPE.dateTime,
                        pattern: dateTimePattern,
                        location: styleAndLocation.styleLocation,
                        parsedOptions: this.shouldParseSkeletons ? (0, icu_skeleton_parser_1.parseDateTimeSkeleton)(dateTimePattern) : {}
                      };
                      var type2 = argType === "date" ? types_1.TYPE.date : types_1.TYPE.time;
                      return {
                        val: { type: type2, value, location: location_1, style },
                        err: null
                      };
                    }
                  }
                  return {
                    val: {
                      type: argType === "number" ? types_1.TYPE.number : argType === "date" ? types_1.TYPE.date : types_1.TYPE.time,
                      value,
                      location: location_1,
                      style: (_a4 = styleAndLocation === null || styleAndLocation === void 0 ? void 0 : styleAndLocation.style) !== null && _a4 !== void 0 ? _a4 : null
                    },
                    err: null
                  };
                }
                case "plural":
                case "selectordinal":
                case "select": {
                  var typeEndPosition_1 = this.clonePosition();
                  this.bumpSpace();
                  if (!this.bumpIf(",")) {
                    return this.error(error_1.ErrorKind.EXPECT_SELECT_ARGUMENT_OPTIONS, createLocation2(typeEndPosition_1, tslib_1.__assign({}, typeEndPosition_1)));
                  }
                  this.bumpSpace();
                  var identifierAndLocation = this.parseIdentifierIfPossible();
                  var pluralOffset = 0;
                  if (argType !== "select" && identifierAndLocation.value === "offset") {
                    if (!this.bumpIf(":")) {
                      return this.error(error_1.ErrorKind.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE, createLocation2(this.clonePosition(), this.clonePosition()));
                    }
                    this.bumpSpace();
                    var result = this.tryParseDecimalInteger(error_1.ErrorKind.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE, error_1.ErrorKind.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE);
                    if (result.err) {
                      return result;
                    }
                    this.bumpSpace();
                    identifierAndLocation = this.parseIdentifierIfPossible();
                    pluralOffset = result.val;
                  }
                  var optionsResult = this.tryParsePluralOrSelectOptions(nestingLevel, argType, expectingCloseTag, identifierAndLocation);
                  if (optionsResult.err) {
                    return optionsResult;
                  }
                  var argCloseResult = this.tryParseArgumentClose(openingBracePosition);
                  if (argCloseResult.err) {
                    return argCloseResult;
                  }
                  var location_2 = createLocation2(openingBracePosition, this.clonePosition());
                  if (argType === "select") {
                    return {
                      val: {
                        type: types_1.TYPE.select,
                        value,
                        options: fromEntries3(optionsResult.val),
                        location: location_2
                      },
                      err: null
                    };
                  } else {
                    return {
                      val: {
                        type: types_1.TYPE.plural,
                        value,
                        options: fromEntries3(optionsResult.val),
                        offset: pluralOffset,
                        pluralType: argType === "plural" ? "cardinal" : "ordinal",
                        location: location_2
                      },
                      err: null
                    };
                  }
                }
                default:
                  return this.error(error_1.ErrorKind.INVALID_ARGUMENT_TYPE, createLocation2(typeStartPosition, typeEndPosition));
              }
            };
            Parser22.prototype.tryParseArgumentClose = function(openingBracePosition) {
              if (this.isEOF() || this.char() !== 125) {
                return this.error(error_1.ErrorKind.EXPECT_ARGUMENT_CLOSING_BRACE, createLocation2(openingBracePosition, this.clonePosition()));
              }
              this.bump();
              return { val: true, err: null };
            };
            Parser22.prototype.parseSimpleArgStyleIfPossible = function() {
              var nestedBraces = 0;
              var startPosition = this.clonePosition();
              while (!this.isEOF()) {
                var ch = this.char();
                switch (ch) {
                  case 39: {
                    this.bump();
                    var apostrophePosition = this.clonePosition();
                    if (!this.bumpUntil("'")) {
                      return this.error(error_1.ErrorKind.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE, createLocation2(apostrophePosition, this.clonePosition()));
                    }
                    this.bump();
                    break;
                  }
                  case 123: {
                    nestedBraces += 1;
                    this.bump();
                    break;
                  }
                  case 125: {
                    if (nestedBraces > 0) {
                      nestedBraces -= 1;
                    } else {
                      return {
                        val: this.message.slice(startPosition.offset, this.offset()),
                        err: null
                      };
                    }
                    break;
                  }
                  default:
                    this.bump();
                    break;
                }
              }
              return {
                val: this.message.slice(startPosition.offset, this.offset()),
                err: null
              };
            };
            Parser22.prototype.parseNumberSkeletonFromString = function(skeleton, location) {
              var tokens = [];
              try {
                tokens = (0, icu_skeleton_parser_1.parseNumberSkeletonFromString)(skeleton);
              } catch (e) {
                return this.error(error_1.ErrorKind.INVALID_NUMBER_SKELETON, location);
              }
              return {
                val: {
                  type: types_1.SKELETON_TYPE.number,
                  tokens,
                  location,
                  parsedOptions: this.shouldParseSkeletons ? (0, icu_skeleton_parser_1.parseNumberSkeleton)(tokens) : {}
                },
                err: null
              };
            };
            Parser22.prototype.tryParsePluralOrSelectOptions = function(nestingLevel, parentArgType, expectCloseTag, parsedFirstIdentifier) {
              var _a4;
              var hasOtherClause = false;
              var options2 = [];
              var parsedSelectors = /* @__PURE__ */ new Set();
              var selector = parsedFirstIdentifier.value, selectorLocation = parsedFirstIdentifier.location;
              while (true) {
                if (selector.length === 0) {
                  var startPosition = this.clonePosition();
                  if (parentArgType !== "select" && this.bumpIf("=")) {
                    var result = this.tryParseDecimalInteger(error_1.ErrorKind.EXPECT_PLURAL_ARGUMENT_SELECTOR, error_1.ErrorKind.INVALID_PLURAL_ARGUMENT_SELECTOR);
                    if (result.err) {
                      return result;
                    }
                    selectorLocation = createLocation2(startPosition, this.clonePosition());
                    selector = this.message.slice(startPosition.offset, this.offset());
                  } else {
                    break;
                  }
                }
                if (parsedSelectors.has(selector)) {
                  return this.error(parentArgType === "select" ? error_1.ErrorKind.DUPLICATE_SELECT_ARGUMENT_SELECTOR : error_1.ErrorKind.DUPLICATE_PLURAL_ARGUMENT_SELECTOR, selectorLocation);
                }
                if (selector === "other") {
                  hasOtherClause = true;
                }
                this.bumpSpace();
                var openingBracePosition = this.clonePosition();
                if (!this.bumpIf("{")) {
                  return this.error(parentArgType === "select" ? error_1.ErrorKind.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT : error_1.ErrorKind.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT, createLocation2(this.clonePosition(), this.clonePosition()));
                }
                var fragmentResult = this.parseMessage(nestingLevel + 1, parentArgType, expectCloseTag);
                if (fragmentResult.err) {
                  return fragmentResult;
                }
                var argCloseResult = this.tryParseArgumentClose(openingBracePosition);
                if (argCloseResult.err) {
                  return argCloseResult;
                }
                options2.push([
                  selector,
                  {
                    value: fragmentResult.val,
                    location: createLocation2(openingBracePosition, this.clonePosition())
                  }
                ]);
                parsedSelectors.add(selector);
                this.bumpSpace();
                _a4 = this.parseIdentifierIfPossible(), selector = _a4.value, selectorLocation = _a4.location;
              }
              if (options2.length === 0) {
                return this.error(parentArgType === "select" ? error_1.ErrorKind.EXPECT_SELECT_ARGUMENT_SELECTOR : error_1.ErrorKind.EXPECT_PLURAL_ARGUMENT_SELECTOR, createLocation2(this.clonePosition(), this.clonePosition()));
              }
              if (this.requiresOtherClause && !hasOtherClause) {
                return this.error(error_1.ErrorKind.MISSING_OTHER_CLAUSE, createLocation2(this.clonePosition(), this.clonePosition()));
              }
              return { val: options2, err: null };
            };
            Parser22.prototype.tryParseDecimalInteger = function(expectNumberError, invalidNumberError) {
              var sign = 1;
              var startingPosition = this.clonePosition();
              if (this.bumpIf("+")) {
              } else if (this.bumpIf("-")) {
                sign = -1;
              }
              var hasDigits = false;
              var decimal = 0;
              while (!this.isEOF()) {
                var ch = this.char();
                if (ch >= 48 && ch <= 57) {
                  hasDigits = true;
                  decimal = decimal * 10 + (ch - 48);
                  this.bump();
                } else {
                  break;
                }
              }
              var location = createLocation2(startingPosition, this.clonePosition());
              if (!hasDigits) {
                return this.error(expectNumberError, location);
              }
              decimal *= sign;
              if (!isSafeInteger2(decimal)) {
                return this.error(invalidNumberError, location);
              }
              return { val: decimal, err: null };
            };
            Parser22.prototype.offset = function() {
              return this.position.offset;
            };
            Parser22.prototype.isEOF = function() {
              return this.offset() === this.message.length;
            };
            Parser22.prototype.clonePosition = function() {
              return {
                offset: this.position.offset,
                line: this.position.line,
                column: this.position.column
              };
            };
            Parser22.prototype.char = function() {
              var offset = this.position.offset;
              if (offset >= this.message.length) {
                throw Error("out of bound");
              }
              var code2 = codePointAt4(this.message, offset);
              if (code2 === void 0) {
                throw Error("Offset ".concat(offset, " is at invalid UTF-16 code unit boundary"));
              }
              return code2;
            };
            Parser22.prototype.error = function(kind, location) {
              return {
                val: null,
                err: {
                  kind,
                  message: this.message,
                  location
                }
              };
            };
            Parser22.prototype.bump = function() {
              if (this.isEOF()) {
                return;
              }
              var code2 = this.char();
              if (code2 === 10) {
                this.position.line += 1;
                this.position.column = 1;
                this.position.offset += 1;
              } else {
                this.position.column += 1;
                this.position.offset += code2 < 65536 ? 1 : 2;
              }
            };
            Parser22.prototype.bumpIf = function(prefix) {
              if (startsWith4(this.message, prefix, this.offset())) {
                for (var i = 0; i < prefix.length; i++) {
                  this.bump();
                }
                return true;
              }
              return false;
            };
            Parser22.prototype.bumpUntil = function(pattern2) {
              var currentOffset = this.offset();
              var index2 = this.message.indexOf(pattern2, currentOffset);
              if (index2 >= 0) {
                this.bumpTo(index2);
                return true;
              } else {
                this.bumpTo(this.message.length);
                return false;
              }
            };
            Parser22.prototype.bumpTo = function(targetOffset) {
              if (this.offset() > targetOffset) {
                throw Error("targetOffset ".concat(targetOffset, " must be greater than or equal to the current offset ").concat(this.offset()));
              }
              targetOffset = Math.min(targetOffset, this.message.length);
              while (true) {
                var offset = this.offset();
                if (offset === targetOffset) {
                  break;
                }
                if (offset > targetOffset) {
                  throw Error("targetOffset ".concat(targetOffset, " is at invalid UTF-16 code unit boundary"));
                }
                this.bump();
                if (this.isEOF()) {
                  break;
                }
              }
            };
            Parser22.prototype.bumpSpace = function() {
              while (!this.isEOF() && _isWhiteSpace2(this.char())) {
                this.bump();
              }
            };
            Parser22.prototype.peek = function() {
              if (this.isEOF()) {
                return null;
              }
              var code2 = this.char();
              var offset = this.offset();
              var nextCode = this.message.charCodeAt(offset + (code2 >= 65536 ? 2 : 1));
              return nextCode !== null && nextCode !== void 0 ? nextCode : null;
            };
            return Parser22;
          }()
        );
        exports2.Parser = Parser3;
        function _isAlpha2(codepoint) {
          return codepoint >= 97 && codepoint <= 122 || codepoint >= 65 && codepoint <= 90;
        }
        __name(_isAlpha2, "_isAlpha");
        function _isAlphaOrSlash2(codepoint) {
          return _isAlpha2(codepoint) || codepoint === 47;
        }
        __name(_isAlphaOrSlash2, "_isAlphaOrSlash");
        function _isPotentialElementNameChar2(c) {
          return c === 45 || c === 46 || c >= 48 && c <= 57 || c === 95 || c >= 97 && c <= 122 || c >= 65 && c <= 90 || c == 183 || c >= 192 && c <= 214 || c >= 216 && c <= 246 || c >= 248 && c <= 893 || c >= 895 && c <= 8191 || c >= 8204 && c <= 8205 || c >= 8255 && c <= 8256 || c >= 8304 && c <= 8591 || c >= 11264 && c <= 12271 || c >= 12289 && c <= 55295 || c >= 63744 && c <= 64975 || c >= 65008 && c <= 65533 || c >= 65536 && c <= 983039;
        }
        __name(_isPotentialElementNameChar2, "_isPotentialElementNameChar");
        function _isWhiteSpace2(c) {
          return c >= 9 && c <= 13 || c === 32 || c === 133 || c >= 8206 && c <= 8207 || c === 8232 || c === 8233;
        }
        __name(_isWhiteSpace2, "_isWhiteSpace");
        function _isPatternSyntax2(c) {
          return c >= 33 && c <= 35 || c === 36 || c >= 37 && c <= 39 || c === 40 || c === 41 || c === 42 || c === 43 || c === 44 || c === 45 || c >= 46 && c <= 47 || c >= 58 && c <= 59 || c >= 60 && c <= 62 || c >= 63 && c <= 64 || c === 91 || c === 92 || c === 93 || c === 94 || c === 96 || c === 123 || c === 124 || c === 125 || c === 126 || c === 161 || c >= 162 && c <= 165 || c === 166 || c === 167 || c === 169 || c === 171 || c === 172 || c === 174 || c === 176 || c === 177 || c === 182 || c === 187 || c === 191 || c === 215 || c === 247 || c >= 8208 && c <= 8213 || c >= 8214 && c <= 8215 || c === 8216 || c === 8217 || c === 8218 || c >= 8219 && c <= 8220 || c === 8221 || c === 8222 || c === 8223 || c >= 8224 && c <= 8231 || c >= 8240 && c <= 8248 || c === 8249 || c === 8250 || c >= 8251 && c <= 8254 || c >= 8257 && c <= 8259 || c === 8260 || c === 8261 || c === 8262 || c >= 8263 && c <= 8273 || c === 8274 || c === 8275 || c >= 8277 && c <= 8286 || c >= 8592 && c <= 8596 || c >= 8597 && c <= 8601 || c >= 8602 && c <= 8603 || c >= 8604 && c <= 8607 || c === 8608 || c >= 8609 && c <= 8610 || c === 8611 || c >= 8612 && c <= 8613 || c === 8614 || c >= 8615 && c <= 8621 || c === 8622 || c >= 8623 && c <= 8653 || c >= 8654 && c <= 8655 || c >= 8656 && c <= 8657 || c === 8658 || c === 8659 || c === 8660 || c >= 8661 && c <= 8691 || c >= 8692 && c <= 8959 || c >= 8960 && c <= 8967 || c === 8968 || c === 8969 || c === 8970 || c === 8971 || c >= 8972 && c <= 8991 || c >= 8992 && c <= 8993 || c >= 8994 && c <= 9e3 || c === 9001 || c === 9002 || c >= 9003 && c <= 9083 || c === 9084 || c >= 9085 && c <= 9114 || c >= 9115 && c <= 9139 || c >= 9140 && c <= 9179 || c >= 9180 && c <= 9185 || c >= 9186 && c <= 9254 || c >= 9255 && c <= 9279 || c >= 9280 && c <= 9290 || c >= 9291 && c <= 9311 || c >= 9472 && c <= 9654 || c === 9655 || c >= 9656 && c <= 9664 || c === 9665 || c >= 9666 && c <= 9719 || c >= 9720 && c <= 9727 || c >= 9728 && c <= 9838 || c === 9839 || c >= 9840 && c <= 10087 || c === 10088 || c === 10089 || c === 10090 || c === 10091 || c === 10092 || c === 10093 || c === 10094 || c === 10095 || c === 10096 || c === 10097 || c === 10098 || c === 10099 || c === 10100 || c === 10101 || c >= 10132 && c <= 10175 || c >= 10176 && c <= 10180 || c === 10181 || c === 10182 || c >= 10183 && c <= 10213 || c === 10214 || c === 10215 || c === 10216 || c === 10217 || c === 10218 || c === 10219 || c === 10220 || c === 10221 || c === 10222 || c === 10223 || c >= 10224 && c <= 10239 || c >= 10240 && c <= 10495 || c >= 10496 && c <= 10626 || c === 10627 || c === 10628 || c === 10629 || c === 10630 || c === 10631 || c === 10632 || c === 10633 || c === 10634 || c === 10635 || c === 10636 || c === 10637 || c === 10638 || c === 10639 || c === 10640 || c === 10641 || c === 10642 || c === 10643 || c === 10644 || c === 10645 || c === 10646 || c === 10647 || c === 10648 || c >= 10649 && c <= 10711 || c === 10712 || c === 10713 || c === 10714 || c === 10715 || c >= 10716 && c <= 10747 || c === 10748 || c === 10749 || c >= 10750 && c <= 11007 || c >= 11008 && c <= 11055 || c >= 11056 && c <= 11076 || c >= 11077 && c <= 11078 || c >= 11079 && c <= 11084 || c >= 11085 && c <= 11123 || c >= 11124 && c <= 11125 || c >= 11126 && c <= 11157 || c === 11158 || c >= 11159 && c <= 11263 || c >= 11776 && c <= 11777 || c === 11778 || c === 11779 || c === 11780 || c === 11781 || c >= 11782 && c <= 11784 || c === 11785 || c === 11786 || c === 11787 || c === 11788 || c === 11789 || c >= 11790 && c <= 11798 || c === 11799 || c >= 11800 && c <= 11801 || c === 11802 || c === 11803 || c === 11804 || c === 11805 || c >= 11806 && c <= 11807 || c === 11808 || c === 11809 || c === 11810 || c === 11811 || c === 11812 || c === 11813 || c === 11814 || c === 11815 || c === 11816 || c === 11817 || c >= 11818 && c <= 11822 || c === 11823 || c >= 11824 && c <= 11833 || c >= 11834 && c <= 11835 || c >= 11836 && c <= 11839 || c === 11840 || c === 11841 || c === 11842 || c >= 11843 && c <= 11855 || c >= 11856 && c <= 11857 || c === 11858 || c >= 11859 && c <= 11903 || c >= 12289 && c <= 12291 || c === 12296 || c === 12297 || c === 12298 || c === 12299 || c === 12300 || c === 12301 || c === 12302 || c === 12303 || c === 12304 || c === 12305 || c >= 12306 && c <= 12307 || c === 12308 || c === 12309 || c === 12310 || c === 12311 || c === 12312 || c === 12313 || c === 12314 || c === 12315 || c === 12316 || c === 12317 || c >= 12318 && c <= 12319 || c === 12320 || c === 12336 || c === 64830 || c === 64831 || c >= 65093 && c <= 65094;
        }
        __name(_isPatternSyntax2, "_isPatternSyntax");
      }
    });
    require_icu_messageformat_parser = __commonJS({
      "node_modules/@formatjs/icu-messageformat-parser/index.js"(exports2) {
        "use strict";
        init_process_global();
        Object.defineProperty(exports2, "__esModule", { value: true });
        exports2._Parser = exports2.parse = void 0;
        var tslib_1 = (init_tslib_es62(), __toCommonJS(tslib_es6_exports2));
        var error_1 = require_error();
        var parser_1 = require_parser();
        var types_1 = require_types();
        function pruneLocation2(els) {
          els.forEach(function(el) {
            delete el.location;
            if ((0, types_1.isSelectElement)(el) || (0, types_1.isPluralElement)(el)) {
              for (var k in el.options) {
                delete el.options[k].location;
                pruneLocation2(el.options[k].value);
              }
            } else if ((0, types_1.isNumberElement)(el) && (0, types_1.isNumberSkeleton)(el.style)) {
              delete el.style.location;
            } else if (((0, types_1.isDateElement)(el) || (0, types_1.isTimeElement)(el)) && (0, types_1.isDateTimeSkeleton)(el.style)) {
              delete el.style.location;
            } else if ((0, types_1.isTagElement)(el)) {
              pruneLocation2(el.children);
            }
          });
        }
        __name(pruneLocation2, "pruneLocation");
        function parse2(message, opts) {
          if (opts === void 0) {
            opts = {};
          }
          opts = tslib_1.__assign({ shouldParseSkeletons: true, requiresOtherClause: true }, opts);
          var result = new parser_1.Parser(message, opts).parse();
          if (result.err) {
            var error = SyntaxError(error_1.ErrorKind[result.err.kind]);
            error.location = result.err.location;
            error.originalMessage = result.err.message;
            throw error;
          }
          if (!(opts === null || opts === void 0 ? void 0 : opts.captureLocation)) {
            pruneLocation2(result.val);
          }
          return result.val;
        }
        __name(parse2, "parse");
        exports2.parse = parse2;
        tslib_1.__exportStar(require_types(), exports2);
        exports2._Parser = parser_1.Parser;
      }
    });
    require_fast_memoize = __commonJS({
      "node_modules/@formatjs/fast-memoize/index.js"(exports2) {
        "use strict";
        init_process_global();
        Object.defineProperty(exports2, "__esModule", { value: true });
        exports2.strategies = exports2.memoize = void 0;
        function memoize2(fn, options2) {
          var cache = options2 && options2.cache ? options2.cache : cacheDefault2;
          var serializer = options2 && options2.serializer ? options2.serializer : serializerDefault2;
          var strategy = options2 && options2.strategy ? options2.strategy : strategyDefault2;
          return strategy(fn, {
            cache,
            serializer
          });
        }
        __name(memoize2, "memoize");
        exports2.memoize = memoize2;
        function isPrimitive2(value) {
          return value == null || typeof value === "number" || typeof value === "boolean";
        }
        __name(isPrimitive2, "isPrimitive");
        function monadic2(fn, cache, serializer, arg) {
          var cacheKey = isPrimitive2(arg) ? arg : serializer(arg);
          var computedValue = cache.get(cacheKey);
          if (typeof computedValue === "undefined") {
            computedValue = fn.call(this, arg);
            cache.set(cacheKey, computedValue);
          }
          return computedValue;
        }
        __name(monadic2, "monadic");
        function variadic2(fn, cache, serializer) {
          var args2 = Array.prototype.slice.call(arguments, 3);
          var cacheKey = serializer(args2);
          var computedValue = cache.get(cacheKey);
          if (typeof computedValue === "undefined") {
            computedValue = fn.apply(this, args2);
            cache.set(cacheKey, computedValue);
          }
          return computedValue;
        }
        __name(variadic2, "variadic");
        function assemble2(fn, context2, strategy, cache, serialize) {
          return strategy.bind(context2, fn, cache, serialize);
        }
        __name(assemble2, "assemble");
        function strategyDefault2(fn, options2) {
          var strategy = fn.length === 1 ? monadic2 : variadic2;
          return assemble2(fn, this, strategy, options2.cache.create(), options2.serializer);
        }
        __name(strategyDefault2, "strategyDefault");
        function strategyVariadic2(fn, options2) {
          return assemble2(fn, this, variadic2, options2.cache.create(), options2.serializer);
        }
        __name(strategyVariadic2, "strategyVariadic");
        function strategyMonadic(fn, options2) {
          return assemble2(fn, this, monadic2, options2.cache.create(), options2.serializer);
        }
        __name(strategyMonadic, "strategyMonadic");
        var serializerDefault2 = /* @__PURE__ */ __name(function() {
          return JSON.stringify(arguments);
        }, "serializerDefault");
        function ObjectWithoutPrototypeCache2() {
          this.cache = /* @__PURE__ */ Object.create(null);
        }
        __name(ObjectWithoutPrototypeCache2, "ObjectWithoutPrototypeCache");
        ObjectWithoutPrototypeCache2.prototype.get = function(key) {
          return this.cache[key];
        };
        ObjectWithoutPrototypeCache2.prototype.set = function(key, value) {
          this.cache[key] = value;
        };
        var cacheDefault2 = {
          create: /* @__PURE__ */ __name(function create2() {
            return new ObjectWithoutPrototypeCache2();
          }, "create")
        };
        exports2.strategies = {
          variadic: strategyVariadic2,
          monadic: strategyMonadic
        };
      }
    });
    require_error2 = __commonJS({
      "node_modules/intl-messageformat/src/error.js"(exports2) {
        "use strict";
        init_process_global();
        Object.defineProperty(exports2, "__esModule", { value: true });
        exports2.MissingValueError = exports2.InvalidValueTypeError = exports2.InvalidValueError = exports2.FormatError = exports2.ErrorCode = void 0;
        var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports));
        var ErrorCode2;
        (function(ErrorCode22) {
          ErrorCode22["MISSING_VALUE"] = "MISSING_VALUE";
          ErrorCode22["INVALID_VALUE"] = "INVALID_VALUE";
          ErrorCode22["MISSING_INTL_API"] = "MISSING_INTL_API";
        })(ErrorCode2 = exports2.ErrorCode || (exports2.ErrorCode = {}));
        var FormatError2 = (
          /** @class */
          function(_super) {
            tslib_1.__extends(FormatError22, _super);
            function FormatError22(msg, code2, originalMessage) {
              var _this = _super.call(this, msg) || this;
              _this.code = code2;
              _this.originalMessage = originalMessage;
              return _this;
            }
            __name(FormatError22, "FormatError");
            FormatError22.prototype.toString = function() {
              return "[formatjs Error: ".concat(this.code, "] ").concat(this.message);
            };
            return FormatError22;
          }(Error)
        );
        exports2.FormatError = FormatError2;
        var InvalidValueError2 = (
          /** @class */
          function(_super) {
            tslib_1.__extends(InvalidValueError22, _super);
            function InvalidValueError22(variableId, value, options2, originalMessage) {
              return _super.call(this, 'Invalid values for "'.concat(variableId, '": "').concat(value, '". Options are "').concat(Object.keys(options2).join('", "'), '"'), ErrorCode2.INVALID_VALUE, originalMessage) || this;
            }
            __name(InvalidValueError22, "InvalidValueError");
            return InvalidValueError22;
          }(FormatError2)
        );
        exports2.InvalidValueError = InvalidValueError2;
        var InvalidValueTypeError2 = (
          /** @class */
          function(_super) {
            tslib_1.__extends(InvalidValueTypeError22, _super);
            function InvalidValueTypeError22(value, type2, originalMessage) {
              return _super.call(this, 'Value for "'.concat(value, '" must be of type ').concat(type2), ErrorCode2.INVALID_VALUE, originalMessage) || this;
            }
            __name(InvalidValueTypeError22, "InvalidValueTypeError");
            return InvalidValueTypeError22;
          }(FormatError2)
        );
        exports2.InvalidValueTypeError = InvalidValueTypeError2;
        var MissingValueError2 = (
          /** @class */
          function(_super) {
            tslib_1.__extends(MissingValueError22, _super);
            function MissingValueError22(variableId, originalMessage) {
              return _super.call(this, 'The intl string context variable "'.concat(variableId, '" was not provided to the string "').concat(originalMessage, '"'), ErrorCode2.MISSING_VALUE, originalMessage) || this;
            }
            __name(MissingValueError22, "MissingValueError");
            return MissingValueError22;
          }(FormatError2)
        );
        exports2.MissingValueError = MissingValueError2;
      }
    });
    require_formatters = __commonJS({
      "node_modules/intl-messageformat/src/formatters.js"(exports2) {
        "use strict";
        init_process_global();
        Object.defineProperty(exports2, "__esModule", { value: true });
        exports2.formatToParts = exports2.isFormatXMLElementFn = exports2.PART_TYPE = void 0;
        var icu_messageformat_parser_1 = require_icu_messageformat_parser();
        var error_1 = require_error2();
        var PART_TYPE2;
        (function(PART_TYPE22) {
          PART_TYPE22[PART_TYPE22["literal"] = 0] = "literal";
          PART_TYPE22[PART_TYPE22["object"] = 1] = "object";
        })(PART_TYPE2 = exports2.PART_TYPE || (exports2.PART_TYPE = {}));
        function mergeLiteral2(parts) {
          if (parts.length < 2) {
            return parts;
          }
          return parts.reduce(function(all, part) {
            var lastPart = all[all.length - 1];
            if (!lastPart || lastPart.type !== PART_TYPE2.literal || part.type !== PART_TYPE2.literal) {
              all.push(part);
            } else {
              lastPart.value += part.value;
            }
            return all;
          }, []);
        }
        __name(mergeLiteral2, "mergeLiteral");
        function isFormatXMLElementFn2(el) {
          return typeof el === "function";
        }
        __name(isFormatXMLElementFn2, "isFormatXMLElementFn");
        exports2.isFormatXMLElementFn = isFormatXMLElementFn2;
        function formatToParts2(els, locales2, formatters, formats22, values, currentPluralValue, originalMessage) {
          if (els.length === 1 && (0, icu_messageformat_parser_1.isLiteralElement)(els[0])) {
            return [
              {
                type: PART_TYPE2.literal,
                value: els[0].value
              }
            ];
          }
          var result = [];
          for (var _i = 0, els_1 = els; _i < els_1.length; _i++) {
            var el = els_1[_i];
            if ((0, icu_messageformat_parser_1.isLiteralElement)(el)) {
              result.push({
                type: PART_TYPE2.literal,
                value: el.value
              });
              continue;
            }
            if ((0, icu_messageformat_parser_1.isPoundElement)(el)) {
              if (typeof currentPluralValue === "number") {
                result.push({
                  type: PART_TYPE2.literal,
                  value: formatters.getNumberFormat(locales2).format(currentPluralValue)
                });
              }
              continue;
            }
            var varName = el.value;
            if (!(values && varName in values)) {
              throw new error_1.MissingValueError(varName, originalMessage);
            }
            var value = values[varName];
            if ((0, icu_messageformat_parser_1.isArgumentElement)(el)) {
              if (!value || typeof value === "string" || typeof value === "number") {
                value = typeof value === "string" || typeof value === "number" ? String(value) : "";
              }
              result.push({
                type: typeof value === "string" ? PART_TYPE2.literal : PART_TYPE2.object,
                value
              });
              continue;
            }
            if ((0, icu_messageformat_parser_1.isDateElement)(el)) {
              var style = typeof el.style === "string" ? formats22.date[el.style] : (0, icu_messageformat_parser_1.isDateTimeSkeleton)(el.style) ? el.style.parsedOptions : void 0;
              result.push({
                type: PART_TYPE2.literal,
                value: formatters.getDateTimeFormat(locales2, style).format(value)
              });
              continue;
            }
            if ((0, icu_messageformat_parser_1.isTimeElement)(el)) {
              var style = typeof el.style === "string" ? formats22.time[el.style] : (0, icu_messageformat_parser_1.isDateTimeSkeleton)(el.style) ? el.style.parsedOptions : formats22.time.medium;
              result.push({
                type: PART_TYPE2.literal,
                value: formatters.getDateTimeFormat(locales2, style).format(value)
              });
              continue;
            }
            if ((0, icu_messageformat_parser_1.isNumberElement)(el)) {
              var style = typeof el.style === "string" ? formats22.number[el.style] : (0, icu_messageformat_parser_1.isNumberSkeleton)(el.style) ? el.style.parsedOptions : void 0;
              if (style && style.scale) {
                value = value * (style.scale || 1);
              }
              result.push({
                type: PART_TYPE2.literal,
                value: formatters.getNumberFormat(locales2, style).format(value)
              });
              continue;
            }
            if ((0, icu_messageformat_parser_1.isTagElement)(el)) {
              var children = el.children, value_1 = el.value;
              var formatFn = values[value_1];
              if (!isFormatXMLElementFn2(formatFn)) {
                throw new error_1.InvalidValueTypeError(value_1, "function", originalMessage);
              }
              var parts = formatToParts2(children, locales2, formatters, formats22, values, currentPluralValue);
              var chunks = formatFn(parts.map(function(p) {
                return p.value;
              }));
              if (!Array.isArray(chunks)) {
                chunks = [chunks];
              }
              result.push.apply(result, chunks.map(function(c) {
                return {
                  type: typeof c === "string" ? PART_TYPE2.literal : PART_TYPE2.object,
                  value: c
                };
              }));
            }
            if ((0, icu_messageformat_parser_1.isSelectElement)(el)) {
              var opt = el.options[value] || el.options.other;
              if (!opt) {
                throw new error_1.InvalidValueError(el.value, value, Object.keys(el.options), originalMessage);
              }
              result.push.apply(result, formatToParts2(opt.value, locales2, formatters, formats22, values));
              continue;
            }
            if ((0, icu_messageformat_parser_1.isPluralElement)(el)) {
              var opt = el.options["=".concat(value)];
              if (!opt) {
                if (!Intl.PluralRules) {
                  throw new error_1.FormatError('Intl.PluralRules is not available in this environment.\nTry polyfilling it using "@formatjs/intl-pluralrules"\n', error_1.ErrorCode.MISSING_INTL_API, originalMessage);
                }
                var rule = formatters.getPluralRules(locales2, { type: el.pluralType }).select(value - (el.offset || 0));
                opt = el.options[rule] || el.options.other;
              }
              if (!opt) {
                throw new error_1.InvalidValueError(el.value, value, Object.keys(el.options), originalMessage);
              }
              result.push.apply(result, formatToParts2(opt.value, locales2, formatters, formats22, values, value - (el.offset || 0)));
              continue;
            }
          }
          return mergeLiteral2(result);
        }
        __name(formatToParts2, "formatToParts");
        exports2.formatToParts = formatToParts2;
      }
    });
    require_core = __commonJS({
      "node_modules/intl-messageformat/src/core.js"(exports2) {
        "use strict";
        init_process_global();
        Object.defineProperty(exports2, "__esModule", { value: true });
        exports2.IntlMessageFormat = void 0;
        var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports));
        var icu_messageformat_parser_1 = require_icu_messageformat_parser();
        var fast_memoize_1 = require_fast_memoize();
        var formatters_1 = require_formatters();
        function mergeConfig2(c1, c2) {
          if (!c2) {
            return c1;
          }
          return tslib_1.__assign(tslib_1.__assign(tslib_1.__assign({}, c1 || {}), c2 || {}), Object.keys(c1).reduce(function(all, k) {
            all[k] = tslib_1.__assign(tslib_1.__assign({}, c1[k]), c2[k] || {});
            return all;
          }, {}));
        }
        __name(mergeConfig2, "mergeConfig");
        function mergeConfigs2(defaultConfig2, configs) {
          if (!configs) {
            return defaultConfig2;
          }
          return Object.keys(defaultConfig2).reduce(function(all, k) {
            all[k] = mergeConfig2(defaultConfig2[k], configs[k]);
            return all;
          }, tslib_1.__assign({}, defaultConfig2));
        }
        __name(mergeConfigs2, "mergeConfigs");
        function createFastMemoizeCache2(store) {
          return {
            create: /* @__PURE__ */ __name(function() {
              return {
                get: /* @__PURE__ */ __name(function(key) {
                  return store[key];
                }, "get"),
                set: /* @__PURE__ */ __name(function(key, value) {
                  store[key] = value;
                }, "set")
              };
            }, "create")
          };
        }
        __name(createFastMemoizeCache2, "createFastMemoizeCache");
        function createDefaultFormatters2(cache) {
          if (cache === void 0) {
            cache = {
              number: {},
              dateTime: {},
              pluralRules: {}
            };
          }
          return {
            getNumberFormat: (0, fast_memoize_1.memoize)(function() {
              var _a32;
              var args2 = [];
              for (var _i = 0; _i < arguments.length; _i++) {
                args2[_i] = arguments[_i];
              }
              return new ((_a32 = Intl.NumberFormat).bind.apply(_a32, tslib_1.__spreadArray([void 0], args2, false)))();
            }, {
              cache: createFastMemoizeCache2(cache.number),
              strategy: fast_memoize_1.strategies.variadic
            }),
            getDateTimeFormat: (0, fast_memoize_1.memoize)(function() {
              var _a32;
              var args2 = [];
              for (var _i = 0; _i < arguments.length; _i++) {
                args2[_i] = arguments[_i];
              }
              return new ((_a32 = Intl.DateTimeFormat).bind.apply(_a32, tslib_1.__spreadArray([void 0], args2, false)))();
            }, {
              cache: createFastMemoizeCache2(cache.dateTime),
              strategy: fast_memoize_1.strategies.variadic
            }),
            getPluralRules: (0, fast_memoize_1.memoize)(function() {
              var _a32;
              var args2 = [];
              for (var _i = 0; _i < arguments.length; _i++) {
                args2[_i] = arguments[_i];
              }
              return new ((_a32 = Intl.PluralRules).bind.apply(_a32, tslib_1.__spreadArray([void 0], args2, false)))();
            }, {
              cache: createFastMemoizeCache2(cache.pluralRules),
              strategy: fast_memoize_1.strategies.variadic
            })
          };
        }
        __name(createDefaultFormatters2, "createDefaultFormatters");
        var IntlMessageFormat2 = exports2.IntlMessageFormat = /** @class */
        function() {
          function IntlMessageFormat3(message, locales2, overrideFormats, opts) {
            if (locales2 === void 0) {
              locales2 = IntlMessageFormat3.defaultLocale;
            }
            var _this = this;
            this.formatterCache = {
              number: {},
              dateTime: {},
              pluralRules: {}
            };
            this.format = function(values) {
              var parts = _this.formatToParts(values);
              if (parts.length === 1) {
                return parts[0].value;
              }
              var result = parts.reduce(function(all, part) {
                if (!all.length || part.type !== formatters_1.PART_TYPE.literal || typeof all[all.length - 1] !== "string") {
                  all.push(part.value);
                } else {
                  all[all.length - 1] += part.value;
                }
                return all;
              }, []);
              if (result.length <= 1) {
                return result[0] || "";
              }
              return result;
            };
            this.formatToParts = function(values) {
              return (0, formatters_1.formatToParts)(_this.ast, _this.locales, _this.formatters, _this.formats, values, void 0, _this.message);
            };
            this.resolvedOptions = function() {
              var _a4;
              return {
                locale: ((_a4 = _this.resolvedLocale) === null || _a4 === void 0 ? void 0 : _a4.toString()) || Intl.NumberFormat.supportedLocalesOf(_this.locales)[0]
              };
            };
            this.getAst = function() {
              return _this.ast;
            };
            this.locales = locales2;
            this.resolvedLocale = IntlMessageFormat3.resolveLocale(locales2);
            if (typeof message === "string") {
              this.message = message;
              if (!IntlMessageFormat3.__parse) {
                throw new TypeError("IntlMessageFormat.__parse must be set to process `message` of type `string`");
              }
              var _a32 = opts || {}, formatters = _a32.formatters, parseOpts = tslib_1.__rest(_a32, ["formatters"]);
              this.ast = IntlMessageFormat3.__parse(message, tslib_1.__assign(tslib_1.__assign({}, parseOpts), { locale: this.resolvedLocale }));
            } else {
              this.ast = message;
            }
            if (!Array.isArray(this.ast)) {
              throw new TypeError("A message must be provided as a String or AST.");
            }
            this.formats = mergeConfigs2(IntlMessageFormat3.formats, overrideFormats);
            this.formatters = opts && opts.formatters || createDefaultFormatters2(this.formatterCache);
          }
          __name(IntlMessageFormat3, "IntlMessageFormat");
          Object.defineProperty(IntlMessageFormat3, "defaultLocale", {
            get: /* @__PURE__ */ __name(function() {
              if (!IntlMessageFormat3.memoizedDefaultLocale) {
                IntlMessageFormat3.memoizedDefaultLocale = new Intl.NumberFormat().resolvedOptions().locale;
              }
              return IntlMessageFormat3.memoizedDefaultLocale;
            }, "get"),
            enumerable: false,
            configurable: true
          });
          IntlMessageFormat3.memoizedDefaultLocale = null;
          IntlMessageFormat3.resolveLocale = function(locales2) {
            if (typeof Intl.Locale === "undefined") {
              return;
            }
            var supportedLocales = Intl.NumberFormat.supportedLocalesOf(locales2);
            if (supportedLocales.length > 0) {
              return new Intl.Locale(supportedLocales[0]);
            }
            return new Intl.Locale(typeof locales2 === "string" ? locales2 : locales2[0]);
          };
          IntlMessageFormat3.__parse = icu_messageformat_parser_1.parse;
          IntlMessageFormat3.formats = {
            number: {
              integer: {
                maximumFractionDigits: 0
              },
              currency: {
                style: "currency"
              },
              percent: {
                style: "percent"
              }
            },
            date: {
              short: {
                month: "numeric",
                day: "numeric",
                year: "2-digit"
              },
              medium: {
                month: "short",
                day: "numeric",
                year: "numeric"
              },
              long: {
                month: "long",
                day: "numeric",
                year: "numeric"
              },
              full: {
                weekday: "long",
                month: "long",
                day: "numeric",
                year: "numeric"
              }
            },
            time: {
              short: {
                hour: "numeric",
                minute: "numeric"
              },
              medium: {
                hour: "numeric",
                minute: "numeric",
                second: "numeric"
              },
              long: {
                hour: "numeric",
                minute: "numeric",
                second: "numeric",
                timeZoneName: "short"
              },
              full: {
                hour: "numeric",
                minute: "numeric",
                second: "numeric",
                timeZoneName: "short"
              }
            }
          };
          return IntlMessageFormat3;
        }();
      }
    });
    require_intl_messageformat = __commonJS({
      "node_modules/intl-messageformat/index.js"(exports2) {
        "use strict";
        init_process_global();
        Object.defineProperty(exports2, "__esModule", { value: true });
        var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports));
        var core_1 = require_core();
        tslib_1.__exportStar(require_formatters(), exports2);
        tslib_1.__exportStar(require_core(), exports2);
        tslib_1.__exportStar(require_error2(), exports2);
        exports2.default = core_1.IntlMessageFormat;
      }
    });
    init_module = __esm2({
      "replace-modules:module"() {
        init_process_global();
        createRequire = /* @__PURE__ */ __name(() => ({
          resolve() {
            throw new Error("createRequire.resolve is not supported");
          }
        }), "createRequire");
      }
    });
    init_url = __esm2({
      "replace-modules:url"() {
        init_process_global();
        URL2 = globalThis.URL;
        fileURLToPath = /* @__PURE__ */ __name((url) => url, "fileURLToPath");
        url_default = { URL: URL2, fileURLToPath };
      }
    });
    init_esm_utils = __esm2({
      "shared/esm-utils.js"() {
        "use strict";
        init_process_global();
        init_module();
        init_url();
        __name(getModulePath, "getModulePath");
      }
    });
    init_type_verifiers = __esm2({
      "shared/type-verifiers.js"() {
        "use strict";
        init_process_global();
        __name(isObjectOfUnknownValues, "isObjectOfUnknownValues");
        __name(isObjectOrArrayOfUnknownValues, "isObjectOrArrayOfUnknownValues");
      }
    });
    init_locales = __esm2({
      "replace-modules:/Users/alexrudenko/src/lighthouse/shared/localization/locales.js"() {
        init_process_global();
        locales = {};
      }
    });
    init_format = __esm2({
      "shared/localization/format.js"() {
        "use strict";
        init_process_global();
        import_intl_messageformat = __toESM(require_intl_messageformat(), 1);
        init_esm_utils();
        init_type_verifiers();
        init_locales();
        TYPE = /** @type {const} */
        {
          literal: 0,
          argument: 1,
          number: 2,
          date: 3,
          time: 4,
          select: 5,
          plural: 6,
          pound: 7,
          tag: 8
        };
        LOCALE_MESSAGES = locales;
        DEFAULT_LOCALE = "en-US";
        CANONICAL_LOCALES = ["ar-XB.json", "ar.json", "bg.json", "ca.json", "cs.json", "da.json", "de.json", "el.json", "en-GB.json", "en-US.json", "en-XA.json", "en-XL.json", "es-419.json", "es.json", "fi.json", "fil.json", "fr.json", "he.json", "hi.json", "hr.json", "hu.json", "id.json", "it.json", "ja.json", "ko.json", "lt.json", "lv.json", "nl.json", "no.json", "pl.json", "pt-PT.json", "pt.json", "ro.json", "ru.json", "sk.json", "sl.json", "sr-Latn.json", "sr.json", "sv.json", "ta.json", "te.json", "th.json", "tr.json", "uk.json", "vi.json", "zh-HK.json", "zh-TW.json", "zh.json"].filter((basename2) => basename2.endsWith(".json") && !basename2.endsWith(".ctc.json")).map((locale) => locale.replace(".json", "")).sort();
        MESSAGE_I18N_ID_REGEX = / | [^\s]+$/;
        formats = {
          number: {
            bytes: {
              maximumFractionDigits: 0
            },
            milliseconds: {
              maximumFractionDigits: 0
            },
            seconds: {
              // Force the seconds to the tenths place for limited output and ease of scanning
              minimumFractionDigits: 1,
              maximumFractionDigits: 1
            },
            extendedPercent: {
              // Force allow up to two digits after decimal place in percentages. (Intl.NumberFormat options)
              maximumFractionDigits: 2,
              style: "percent"
            }
          }
        };
        __name(collectAllCustomElementsFromICU, "collectAllCustomElementsFromICU");
        __name(_preformatValues, "_preformatValues");
        __name(escapeIcuMessage, "escapeIcuMessage");
        __name(formatMessage, "formatMessage");
        __name(_localizeIcuMessage, "_localizeIcuMessage");
        __name(getRendererFormattedStrings, "getRendererFormattedStrings");
        __name(isIcuMessage, "isIcuMessage");
        __name(getFormatted, "getFormatted");
        __name(_formatPathAsString, "_formatPathAsString");
        __name(replaceIcuMessages, "replaceIcuMessages");
        __name(_getLocaleMessages, "_getLocaleMessages");
        __name(getAvailableLocales, "getAvailableLocales");
        __name(getIcuMessageIdParts, "getIcuMessageIdParts");
      }
    });
    require_amp = __commonJS({
      "node_modules/lighthouse-stack-packs/packs/amp.js"(exports2, module2) {
        init_process_global();
        var icon = `data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 256 256"><path fill="%230379c4" fill-rule="evenodd" d="m171.887 116.28-53.696 89.36h-9.728l9.617-58.227-30.2.047a4.852 4.852 0 0 1-4.855-4.855c0-1.152 1.07-3.102 1.07-3.102l53.52-89.254 9.9.043-9.86 58.317 30.413-.043a4.852 4.852 0 0 1 4.855 4.855c0 1.088-.427 2.044-1.033 2.854l.004.004zM128 0C57.306 0 0 57.3 0 128s57.306 128 128 128 128-57.306 128-128S198.7 0 128 0z"/></svg>`;
        var UIStrings1252 = {
          /** Additional description of a Lighthouse audit that tells the user how they can improve image loading by using WebP in the context of AMP. This is displayed after a user expands the section to see more. No character length limits. 'Learn More' becomes link text to additional documentation. */
          "modern-image-formats": "Consider displaying all [`amp-img`](https://amp.dev/documentation/components/amp-img/?format=websites) components in WebP formats while specifying an appropriate fallback for other browsers. [Learn more](https://amp.dev/documentation/components/amp-img/#example:-specifying-a-fallback-image).",
          /** Additional description of a Lighthouse audit that tells the user how images are automatically lazy loaded for the AMP framewok. This is displayed after a user expands the section to see more. No character length limits. 'Learn More' becomes link text to additional documentation. */
          "offscreen-images": "Ensure that you are using [`amp-img`](https://amp.dev/documentation/components/amp-img/?format=websites) for images to automatically lazy-load. [Learn more](https://amp.dev/documentation/guides-and-tutorials/develop/media_iframes_3p/?format=websites#images).",
          /** Additional description of a Lighthouse audit that tells the user how they can improve performance by reducing the amount of render blocking resources present on their page in the context of the AMP framework. This is displayed after a user expands the section to see more. No character length limits. 'Learn More' becomes link text to additional documentation. */
          "render-blocking-resources": "Use tools such as [AMP Optimizer](https://github.com/ampproject/amp-toolbox/tree/master/packages/optimizer) to [server-side render AMP layouts](https://amp.dev/documentation/guides-and-tutorials/optimize-and-measure/server-side-rendering/).",
          /** Additional description of a Lighthouse audit that tells the user how they can improve performance by ensuring all the CSS written is supported by the AMP framework. This is displayed after a user expands the section to see more. No character length limits. 'Learn More' becomes link text to additional documentation. */
          "unminified-css": "Refer to the [AMP documentation](https://amp.dev/documentation/guides-and-tutorials/develop/style_and_layout/style_pages/) to ensure all styles are supported.",
          /** Additional description of a Lighthouse audit that tells the user how they can improve performance by using a runtime-managed animated image in the context of the AMP framework. This is displayed after a user expands the section to see more. No character length limits. 'Learn More' becomes link text to additional documentation. */
          "efficient-animated-content": "For animated content, use [`amp-anim`](https://amp.dev/documentation/components/amp-anim/) to minimize CPU usage when the content is offscreen.",
          /** Additional description of a Lighthouse audit that tells the user how they can improve performance by using responsive images in the context of the AMP framework. This is displayed after a user expands the section to see more. No character length limits. 'Learn More' becomes link text to additional documentation. */
          "uses-responsive-images": "The [`amp-img`](https://amp.dev/documentation/components/amp-img/?format=websites) component supports the [`srcset`](https://web.dev/use-srcset-to-automatically-choose-the-right-image/) attribute to specify which image assets to use based on the screen size. [Learn more](https://amp.dev/documentation/guides-and-tutorials/develop/style_and_layout/art_direction/)."
        };
        module2.exports = {
          id: "amp",
          title: "AMP",
          icon,
          UIStrings: UIStrings1252
        };
      }
    });
    require_angular = __commonJS({
      "node_modules/lighthouse-stack-packs/packs/angular.js"(exports2, module2) {
        init_process_global();
        var icon = `data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 250 250"><path fill="%23dd0031" d="M125 30 31.9 63.2l14.2 123.1L125 230l78.9-43.7 14.2-123.1z"/><path fill="%23c3002f" d="M125 30v22.2-.1V230l78.9-43.7 14.2-123.1L125 30z"/><path fill="%23fff" d="M125 52.1 66.8 182.6h21.7l11.7-29.2h49.4l11.7 29.2H183L125 52.1zm17 83.3h-34l17-40.9 17 40.9z"/></svg>`;
        var UIStrings1252 = {
          /** Additional description of a Lighthouse audit that tells the user how they can improve site loading performance by reducing the total bytes delivered by their page in the context of the Angular framework. This is displayed after a user expands the section to see more. No character length limits. 'Learn More' becomes link text to additional documentation. */
          "total-byte-weight": "Apply [route-level code splitting](https://web.dev/route-level-code-splitting-in-angular/) to minimize the size of your JavaScript bundles. Also, consider precaching assets with the [Angular service worker](https://web.dev/precaching-with-the-angular-service-worker/).",
          /** Additional description of a Lighthouse audit that tells the user how they can improve performance by minifying their CSS and JS files in the context of the Angular framework. This is displayed after a user expands the section to see more. No character length limits. 'Learn More' becomes link text to additional documentation. */
          "unminified-warning": "If you are using Angular CLI, ensure that builds are generated in production mode. [Learn more](https://angular.io/guide/deployment#enable-runtime-production-mode).",
          /** Additional description of a Lighthouse audit that tells the user how they can improve performance by removing unused Javascript files in the context of the Angular framework. This is displayed after a user expands the section to see more. No character length limits. 'Learn More' becomes link text to additional documentation. */
          "unused-javascript": "If you are using Angular CLI, include source maps in your production build to inspect your bundles. [Learn more](https://angular.io/guide/deployment#inspect-the-bundles).",
          /** Additional description of a Lighthouse audit that tells the user how they can use responsive images in the context of the Angular framework. This is displayed after a user expands the section to see more. No character length limits. 'Learn More' becomes link text to additional documentation. */
          "uses-responsive-images": "Consider using the `BreakpointObserver` utility in the Component Dev Kit (CDK) to manage image breakpoints. [Learn more](https://material.angular.io/cdk/layout/overview).",
          /** Additional description of a Lighthouse audit that tells the user how they can use preload to improve performance in the context of the Angular framework. This is displayed after a user expands the section to see more. No character length limits. 'Learn More' becomes link text to additional documentation. */
          "uses-rel-preload": "Preload routes ahead of time to speed up navigation. [Learn more](https://web.dev/route-preloading-in-angular/).",
          /** Additional description of a Lighthouse audit that tells the user and *how* they should reduce the size of the web page's DOM in the context of the Angular framework. 'Learn More' becomes link text to additional documentation. */
          "dom-size": "Consider virtual scrolling with the Component Dev Kit (CDK) if very large lists are being rendered. [Learn more](https://web.dev/virtualize-lists-with-angular-cdk/)."
        };
        module2.exports = {
          id: "angular",
          title: "Angular",
          icon,
          UIStrings: UIStrings1252
        };
      }
    });
    require_drupal = __commonJS({
      "node_modules/lighthouse-stack-packs/packs/drupal.js"(exports2, module2) {
        init_process_global();
        var icon = `data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 186.525 243.713"><path fill="%23009cde" d="M131.64 51.91C114.491 34.769 98.13 18.429 93.26 0c-4.87 18.429-21.234 34.769-38.38 51.91C29.16 77.613 0 106.743 0 150.434a93.263 93.263 0 1 0 186.525 0c0-43.688-29.158-72.821-54.885-98.524m-92 120.256c-5.719-.194-26.824-36.571 12.329-75.303l25.909 28.3a2.215 2.215 0 0 1-.173 3.306c-6.183 6.34-32.534 32.765-35.81 41.902-.675 1.886-1.663 1.815-2.256 1.795m53.624 47.943a32.075 32.075 0 0 1-32.076-32.075 33.423 33.423 0 0 1 7.995-21.187c5.784-7.072 24.077-26.963 24.077-26.963s18.012 20.183 24.033 26.896a31.368 31.368 0 0 1 8.046 21.254 32.076 32.076 0 0 1-32.075 32.075m61.392-52.015c-.691 1.512-2.26 4.036-4.376 4.113-3.773.138-4.176-1.796-6.965-5.923-6.122-9.06-59.551-64.9-69.545-75.699-8.79-9.498-1.238-16.195 2.266-19.704 4.395-4.403 17.224-17.225 17.224-17.225s38.255 36.296 54.19 61.096 10.444 46.26 7.206 53.342"/></svg>`;
        var UIStrings1252 = {
          /** Additional description of a Lighthouse audit that tells the user how they can improve performance by removing unused CSS, in the context of the `Drupal` CMS platform. This is displayed after a user expands the section to see more. No character length limits. 'Learn More' becomes link text to additional documentation. */
          "unused-css-rules": "Consider removing unused CSS rules and only attach the needed `Drupal` libraries to the relevant page or component in a page. See the [`Drupal` documentation](https://www.drupal.org/docs/develop/theming-drupal/adding-assets-css-js-to-a-drupal-theme-via-librariesyml#define) for details. To identify attached libraries that are adding extraneous CSS, try running [code coverage](https://developer.chrome.com/docs/devtools/coverage) in Chrome DevTools. You can identify the theme/module responsible from the URL of the stylesheet when CSS aggregation is disabled in your `Drupal` site. Look out for themes/modules that have many stylesheets in the list which have a lot of red in code coverage. A theme/module should only attach a stylesheet library if it is actually used on the page.",
          /** Additional description of a Lighthouse audit that tells the user how they can improve image loading by using webp in the context of the `Drupal` CMS platform. This is displayed after a user expands the section to see more. No character length limits. 'Learn More' becomes link text to additional documentation. */
          "modern-image-formats": "Consider configuring [WebP image formats with a Convert image style](https://www.drupal.org/docs/core-modules-and-themes/core-modules/image-module/working-with-images#styles) on your site.",
          /** Additional description of a Lighthouse audit that tells the user how they can improve performance by lazy loading images that are initially offscreen in the context of the `Drupal` CMS platform. This is displayed after a user expands the section to see more. No character length limits. 'Learn More' becomes link text to additional documentation. */
          "offscreen-images": "Consider configuring lazy load images in `Drupal`. The field formatters for images support `lazy` or `eager`.",
          /** Additional description of a Lighthouse audit that tells the user how they can improve site loading performance by reducing the total bytes delivered by their page in the context of the `Drupal` CMS platform. This is displayed after a user expands the section to see more. No character length limits. 'Learn More' becomes link text to additional documentation. */
          "total-byte-weight": "Consider using [Responsive Image Styles](https://www.drupal.org/documentation/modules/responsive_image) to reduce the size of images loaded on your page. If you are using `Views` to show multiple content items on a page, consider implementing pagination to limit the number of content items shown on a given page.",
          /** Additional description of a Lighthouse audit that tells the user how they can improve performance by reducing the amount of render blocking resources present on their page, in the context of the `Drupal` CMS platform. This is displayed after a user expands the section to see more. No character length limits. 'Learn More' becomes link text to additional documentation. */
          "render-blocking-resources": "Consider using [a module](https://www.drupal.org/project/critical_css) to inline critical CSS and JavaScript, and use the defer attribute for non-critical CSS or JavaScript.",
          /** Additional description of a Lighthouse audit that tells the user how they can improve performance by minifying their CSS files in the context of the `Drupal` CMS platform. This is displayed after a user expands the section to see more. No character length limits. 'Learn More' becomes link text to additional documentation. */
          "unminified-css": 'Ensure you have enabled "Aggregate CSS files" in the "Administration \xBB Configuration \xBB Development" page.',
          /** Additional description of a Lighthouse audit that tells the user how they can improve performance by minifying their Javascript files in the context of the `Drupal` CMS platform. This is displayed after a user expands the section to see more. No character length limits. 'Learn More' becomes link text to additional documentation. */
          "unminified-javascript": 'Ensure you have enabled "Aggregate JavaScript files" in the "Administration \xBB Configuration \xBB Development" page.',
          /** Additional description of a Lighthouse audit that tells the user how they can improve performance by encoding animated images as video, in the context of the `Drupal` CMS platform. This is displayed after a user expands the section to see more. No character length limits. 'Learn More' becomes link text to additional documentation. */
          "efficient-animated-content": "Consider uploading your `GIF` to a service which will make it available to embed as an HTML5 video.",
          /** Additional description of a Lighthouse audit that tells the user how they can improve performance by removing unused Javascript files in the context of the `Drupal` CMS platform. This is displayed after a user expands the section to see more. No character length limits. 'Learn More' becomes link text to additional documentation. */
          "unused-javascript": "Consider removing unused JavaScript assets and only attach the needed `Drupal` libraries to the relevant page or component in a page. See the [Drupal documentation](https://www.drupal.org/docs/develop/theming-drupal/adding-assets-css-js-to-a-drupal-theme-via-librariesyml#define) for details. To identify attached libraries that are adding extraneous JavaScript, try running [code coverage](https://developer.chrome.com/docs/devtools/coverage) in Chrome DevTools. You can identify the theme/module responsible from the URL of the script when JavaScript aggregation is disabled in your `Drupal` site. Look out for themes/modules that have many scripts in the list which have a lot of red in code coverage. A theme/module should only attach a script library if it is actually used on the page.",
          /** Additional description of a Lighthouse audit that tells the user how they can improve their site by enabling long caching in the context of the `Drupal` CMS platform. This is displayed after a user expands the section to see more. No character length limits. 'Learn More' becomes link text to additional documentation. */
          "uses-long-cache-ttl": 'Set the "Browser and proxy cache maximum age" in the "Administration \xBB Configuration \xBB Development" page. Read about [`Drupal` cache and optimizing for performance](https://www.drupal.org/docs/8/api/cache-api/cache-api).',
          /** Additional description of a Lighthouse audit that tells the user how they can improve site performance by optimizing images, in the context of the `Drupal` CMS platform. This is displayed after a user expands the section to see more. No character length limits. 'Learn More' becomes link text to additional documentation. */
          "uses-optimized-images": "Consider using [a module](https://www.drupal.org/project/project_module?f%5B0%5D=&f%5B1%5D=&f%5B2%5D=im_vid_3%3A123&f%5B3%5D=&f%5B4%5D=sm_field_project_type%3Afull&f%5B5%5D=&f%5B6%5D=&text=image&solrsort=iss_project_release_usage+desc&op=Search) that automatically optimizes and reduces the size of images uploaded through the site while retaining quality. Also, ensure you are using the native [Responsive Image Styles](https://www.drupal.org/documentation/modules/responsive_image) provided from `Drupal` for all images rendered on the site.",
          /** Additional description of a Lighthouse audit for a third-party framework called `Drupal`. This is displayed after a user expands the section to see more. No character length limits. 'Learn More' becomes link text to additional documentation. */
          "uses-text-compression": "Text-based resources should be served with compression (gzip, deflate or brotli) to minimize total network bytes. Consider using a CDN that natively supports this, or configure the web server to perform this operation. [Learn more](https://developers.google.com/web/tools/lighthouse/audits/text-compression).",
          /** Additional description of a Lighthouse audit that tells the user how they can improve performance by using responsive images in the context of the `Drupal` CMS platform. This is displayed after a user expands the section to see more. No character length limits. 'Learn More' becomes link text to additional documentation. */
          "uses-responsive-images": "Ensure that you are using the native [Responsive Image Styles](https://www.drupal.org/documentation/modules/responsive_image) provided from `Drupal`. Use the Responsive Image Styles when rendering image fields through view modes, views, or images uploaded through the WYSIWYG editor.",
          /** Additional description of a Lighthouse audit for a third-party framework called `Drupal`. This is displayed after a user expands the section to see more. No character length limits. 'Learn More' becomes link text to additional documentation. */
          "prioritize-lcp-image": "If the LCP element is dynamically added to the page, you should optimize the image in order to improve LCP. [Learn more](https://www.smashingmagazine.com/2023/08/methods-improving-drupal-largest-contentful-paint-core-web-vital/).",
          /** Additional description of a Lighthouse audit that tells the user how they can improve the time to first byte speed metric, in the context of the `Drupal` CMS platform. This is displayed after a user expands the section to see more. No character length limits. 'Learn More' becomes link text to additional documentation. */
          "server-response-time": "Offload traffic with one or more `Drupal` caching modules such as `Internal Page Cache`, `Internal Dynamic Page Cache`, and `BigPipe`. Couple these with a CDN to further improve response time. Your hosting servers should make use of PHP OPcache. Consider using memory-caching such as Redis or Memcached to reduce database query times. Lastly use performant themes, modules, and faster servers to lower server response time.",
          /** Additional description of a Lighthouse audit for a third-party framework called `Drupal`. This is displayed after a user expands the section to see more. No character length limits. 'Learn More' becomes link text to additional documentation. */
          "redirects": "Redirects introduce additional delays before the page can be loaded. If the [Redirect](https://www.drupal.org/project/redirect) module is installed, review if unnecessary redirects can be removed. [Learn more](https://developers.google.com/web/tools/lighthouse/audits/redirects).",
          /** Additional description of a Lighthouse audit that tells the user how they can add preconnect or dns-prefetch resource hints, in the context of the `Drupal` CMS platform. This is displayed after a user expands the section to see more. No character length limits. 'Learn More' becomes link text to additional documentation. */
          "uses-rel-preconnect": "`Preconnect` or `dns-prefetch` resource hints can be added by installing and configuring [a module](https://www.drupal.org/project/project_module?f%5B0%5D=&f%5B1%5D=&f%5B2%5D=&f%5B3%5D=&f%5B4%5D=sm_field_project_type%3Afull&f%5B5%5D=&f%5B6%5D=&text=Preconnect&solrsort=score+desc&op=Search) that provides facilities for user agent resource hints."
        };
        module2.exports = {
          id: "drupal",
          title: "Drupal",
          icon,
          UIStrings: UIStrings1252
        };
      }
    });
    require_ezoic = __commonJS({
      "node_modules/lighthouse-stack-packs/packs/ezoic.js"(exports2, module2) {
        init_process_global();
        var icon = `data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 82 82"><path fill="%235FA624" fill-rule="evenodd" d="M81.37 48.117C85.301 25.821 70.413 4.56 48.117.63 25.821-3.3 4.56 11.586.63 33.883-3.3 56.178 11.586 77.44 33.883 81.37 56.18 85.301 77.44 70.412 81.37 48.117Zm-8.935-14.17c2.77 12.357-1.942 25.721-12.96 33.436-14.57 10.203-34.656 6.662-44.859-7.909a32.434 32.434 0 0 1-2.869-4.98l28.7-20.097a6.53 6.53 0 1 0-3.744-5.347L9.564 48.054c-2.768-12.359 1.943-25.724 12.96-33.439 14.572-10.203 34.656-6.662 44.86 7.91a32.349 32.349 0 0 1 2.868 4.98L41.554 47.6a6.53 6.53 0 1 0 3.746 5.35l27.136-19.003Z"/></svg>`;
        var UIStrings1252 = {
          /** Additional description of a Lighthouse audit for a third-party framework called `Ezoic`. This is displayed after a user expands the section to see more. No character length limits. Ezoic Leap is Ezoic's site speed improvement toolset. Remove Unused CSS is a setting name. */
          "unused-css-rules": "Use [Ezoic Leap](https://pubdash.ezoic.com/leap) and enable `Remove Unused CSS` to help with this issue. It will identify the CSS classes that are actually used on each page of your site, and remove any others to keep the file size small.",
          /** Additional description of a Lighthouse audit for a third-party framework called `Ezoic`. This is displayed after a user expands the section to see more. No character length limits. Ezoic Leap is Ezoic's site speed improvement toolset. Next-Gen Formats is a setting name.*/
          "modern-image-formats": "Use [Ezoic Leap](https://pubdash.ezoic.com/leap) and enable `Next-Gen Formats` to convert images to WebP.",
          /** Additional description of a Lighthouse audit for a third-party framework called `Ezoic`. This is displayed after a user expands the section to see more. No character length limits. Ezoic Leap is Ezoic's site speed improvement toolset. Lazy Load Images is a setting name.*/
          "offscreen-images": "Use [Ezoic Leap](https://pubdash.ezoic.com/leap) and enable `Lazy Load Images` to defer loading off-screen images until they are needed.",
          /** Additional description of a Lighthouse audit for a third-party framework called `Ezoic`. This is displayed after a user expands the section to see more. No character length limits. Ezoic Leap is Ezoic's site speed improvement toolset. Script Delay is a setting name.*/
          "render-blocking-resources": "Use [Ezoic Leap](https://pubdash.ezoic.com/leap) and enable `Script Delay` to defer non-critical JS.",
          /** Additional description of a Lighthouse audit for a third-party framework called `Ezoic`. This is displayed after a user expands the section to see more. No character length limits. Ezoic Leap is Ezoic's site speed improvement toolset. Minify CSS is a setting name.*/
          "unminified-css": "Use [Ezoic Leap](https://pubdash.ezoic.com/leap) and enable `Minify CSS` to automatically minify your CSS to reduce network payload sizes.",
          /** Additional description of a Lighthouse audit for a third-party framework called `Ezoic`. This is displayed after a user expands the section to see more. No character length limits. Ezoic Leap is Ezoic's site speed improvement toolset. Minify Javascript is a setting name.*/
          "unminified-javascript": "Use [Ezoic Leap](https://pubdash.ezoic.com/leap) and enable `Minify Javascript` to automatically minify your JS to reduce network payload sizes.",
          /** Additional description of a Lighthouse audit for a third-party framework called `Ezoic`. This is displayed after a user expands the section to see more. No character length limits. Ezoic Leap is Ezoic's site speed improvement toolset. Efficient Static Cache Policy is a setting name.*/
          "uses-long-cache-ttl": "Use [Ezoic Leap](https://pubdash.ezoic.com/leap) and enable `Efficient Static Cache Policy` to set recommended values in the caching header for static assests.",
          /** Additional description of a Lighthouse audit for a third-party framework called `Ezoic`. This is displayed after a user expands the section to see more. No character length limits. Ezoic Leap is Ezoic's site speed improvement toolset. Next-Gen Formats is a setting name.*/
          "uses-optimized-images": "Use [Ezoic Leap](https://pubdash.ezoic.com/leap) and enable `Next-Gen Formats` to convert images to WebP.",
          /** Additional description of a Lighthouse audit for a third-party framework called `Ezoic`. This is displayed after a user expands the section to see more. No character length limits. Ezoic Leap is Ezoic's site speed improvement toolset. Resize Images is a setting name.*/
          "uses-responsive-images": "Use [Ezoic Leap](https://pubdash.ezoic.com/leap) and enable `Resize Images` to resize images to a device appropriate size, reducing network payload sizes.",
          /** Additional description of a Lighthouse audit for a third-party framework called `Ezoic`. This is displayed after a user expands the section to see more. No character length limits. Ezoic Cloud Caching is Ezoic's CDN.*/
          "server-response-time": "Use [Ezoic Cloud Caching](https://pubdash.ezoic.com/leap/caching) to cache your content across our world wide network, improving time to first byte.",
          /** Additional description of a Lighthouse audit for a third-party framework called `Ezoic`. This is displayed after a user expands the section to see more. No character length limits. Ezoic Leap is Ezoic's site speed improvement toolset. Pre-Connect Origins is a setting name.*/
          "uses-rel-preconnect": "Use [Ezoic Leap](https://pubdash.ezoic.com/leap) and enable `Pre-Connect Origins` to automatically add `preconnect` resource hints to establish early connections to important third-party origins.",
          /** Additional description of a Lighthouse audit for a third-party framework called `Ezoic`. This is displayed after a user expands the section to see more. No character length limits. Ezoic Leap is Ezoic's site speed improvement toolset. Preload Fonts and Preload Background Images are setting names.*/
          "uses-rel-preload": "Use [Ezoic Leap](https://pubdash.ezoic.com/leap) and enable `Preload Fonts` and `Preload Background Images` to add `preload` links to prioritize fetching resources that are currently requested later in page load.",
          /** Additional description of a Lighthouse audit for a third-party framework called `Ezoic`. This is displayed after a user expands the section to see more. No character length limits. Ezoic Leap is Ezoic's site speed improvement toolset. Optimize Fonts is a setting name.*/
          "font-display": "Use [Ezoic Leap](https://pubdash.ezoic.com/leap) and enable `Optimize Fonts` to automatically leverage the `font-display` CSS feature to ensure text is user-visible while webfonts are loading."
        };
        module2.exports = {
          id: "ezoic",
          title: "Ezoic",
          icon,
          UIStrings: UIStrings1252
        };
      }
    });
    require_gatsby = __commonJS({
      "node_modules/lighthouse-stack-packs/packs/gatsby.js"(exports2, module2) {
        init_process_global();
        var icon = `data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 28 28"><circle cx="14" cy="14" r="14" fill="%23639"/><path fill="%23fff" d="M6.2 21.8C4.1 19.7 3 16.9 3 14.2L13.9 25c-2.8-.1-5.6-1.1-7.7-3.2zm10.2 2.9L3.3 11.6C4.4 6.7 8.8 3 14 3c3.7 0 6.9 1.8 8.9 4.5l-1.5 1.3C19.7 6.5 17 5 14 5c-3.9 0-7.2 2.5-8.5 6L17 22.5c2.9-1 5.1-3.5 5.8-6.5H18v-2h7c0 5.2-3.7 9.6-8.6 10.7z"/></svg>`;
        var UIStrings1252 = {
          /** Additional description of a Lighthouse audit that tells the user how they can remove unused CSS rules by configuring the Gatsby plugin `gatsby-plugin-purgecss` which sets up PurgeCSS */
          "unused-css-rules": "Use the `PurgeCSS` `Gatsby` plugin to remove unused rules from stylesheets. [Learn more](https://purgecss.com/plugins/gatsby.html).",
          /** Additional description of a Lighthouse audit that tells the user to use the gatsby-plugin-image component to automatically optimize image format */
          "modern-image-formats": "Use the `gatsby-plugin-image` component instead of `<img>` to automatically optimize image format. [Learn more](https://www.gatsbyjs.com/docs/how-to/images-and-media/using-gatsby-plugin-image).",
          /** Additional description of a Lighthouse audit that tells the user to defer loading images which are not shown on screen using the gatsby-plugin-image component */
          "offscreen-images": "Use the `gatsby-plugin-image` component instead of `<img>` to automatically lazy-load images. [Learn more](https://www.gatsbyjs.com/docs/how-to/images-and-media/using-gatsby-plugin-image).",
          /** Additional description of a Lighthouse audit that tells the user to use gatsby-script to defer loading of non-critical third-party libraries */
          "render-blocking-resources": "Use the `Gatsby Script API` to defer loading of non-critical third-party scripts. [Learn more](https://www.gatsbyjs.com/docs/reference/built-in-components/gatsby-script/).",
          /** Additional description of a Lighthouse audit that tells the user to use Webpack Bundle Analyzer to discover JavaScript code that is not used */
          "unused-javascript": "Use `Webpack Bundle Analyzer` to detect unused JavaScript code. [Learn more](https://www.gatsbyjs.com/plugins/gatsby-plugin-webpack-bundle-analyser-v2/)",
          /** Additional description of a Lighthouse audit that tells the user to enable caching for assets (e.g. images) and artifacts that don't change between deployments */
          "uses-long-cache-ttl": "Configure caching for immutable assets. [Learn more](https://www.gatsbyjs.com/docs/how-to/previews-deploys-hosting/caching/).",
          /** Additional description of a Lighthouse audit that tells the user to use the gatsby-plugin-image component to adjust image quality */
          "uses-optimized-images": "Use the `gatsby-plugin-image` component instead of `<img>` to adjust image quality. [Learn more](https://www.gatsbyjs.com/docs/how-to/images-and-media/using-gatsby-plugin-image).",
          /** Additional description of a Lighthouse audit that tells the user to serve responsive images using the gatsby-plugin-image component with appropriate `sizes` set */
          "uses-responsive-images": "Use the `gatsby-plugin-image` component to set appropriate `sizes`. [Learn more](https://www.gatsbyjs.com/docs/how-to/images-and-media/using-gatsby-plugin-image).",
          /** Additional description of a Lighthouse audit that tells the user to use the gatsby-plugin-image component to automatically preload LCP images. "prop" is short for "property" */
          "prioritize-lcp-image": "Use the `gatsby-plugin-image` component and set the `loading` prop to `eager`. [Learn more](https://www.gatsbyjs.com/docs/reference/built-in-components/gatsby-plugin-image#shared-props)."
        };
        module2.exports = {
          id: "gatsby",
          title: "Gatsby",
          icon,
          UIStrings: UIStrings1252
        };
      }
    });
    require_joomla = __commonJS({
      "node_modules/lighthouse-stack-packs/packs/joomla.js"(exports2, module2) {
        "use strict";
        init_process_global();
        var icon = `data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" preserveAspectRatio="xMidYMid" viewBox="0 0 256 258"><path fill="%23F9AE41" d="M255.7 35.6a33.7 33.7 0 0 0-67-4.8l-.4-.2c-27.6-12.4-50.8 9.6-50.8 9.6l-61.4 61.7 24.3 23.4 49.4-48.6c23-23 35.6-7.4 35.6-7.4 17.4 14.6.6 32 .6 32l24.9 24c20.3-22 21.5-41.1 15.3-56.3a33.7 33.7 0 0 0 29.5-33.4"/><path fill="%23EE4035" d="m226.5 190.5.2-.3c12.4-27.6-9.6-50.8-9.6-50.8L155.4 78l-23.3 24.3 48.5 49.4c23 23 7.5 35.6 7.5 35.6-14.7 17.4-32 .6-32 .6l-24 24.9c21.9 20.3 41 21.5 56.2 15.3a33.7 33.7 0 1 0 38.2-37.6"/><path fill="%234F91CD" d="m156 133-49.5 48.6c-23 23-35.6 7.4-35.6 7.4-17.4-14.6-.6-32-.6-32l-24.9-24c-20.3 22-21.4 41.1-15.3 56.3a33.7 33.7 0 1 0 37.6 38.2l.3.2c27.6 12.4 50.8-9.6 50.8-9.6l61.4-61.7-24.3-23.4"/><path fill="%237AC043" d="M75.7 106.6c-23-23-7.4-35.6-7.4-35.6 14.6-17.4 32-.6 32-.6l24-24.9c-22-20.3-41-21.5-56.3-15.3a33.7 33.7 0 1 0-38.2 37.6l-.2.3C17.2 95.7 39.2 119 39.2 119l61.7 61.4 23.4-24.3-48.6-49.4"/></svg>`;
        var UIStrings1252 = {
          /** Additional description of a Lighthouse audit that tells the user how they can improve performance by removing unused CSS, in the context of the Joomla CMS platform. This is displayed after a user expands the section to see more. No character length limits. 'Learn More' becomes link text to additional documentation. */
          "unused-css-rules": "Consider reducing, or switching, the number of [Joomla extensions](https://extensions.joomla.org/) loading unused CSS in your page. To identify extensions that are adding extraneous CSS, try running [code coverage](https://developers.google.com/web/updates/2017/04/devtools-release-notes#coverage) in Chrome DevTools. You can identify the theme/plugin responsible from the URL of the stylesheet. Look out for plugins that have many stylesheets in the list which have a lot of red in code coverage. A plugin should only enqueue a stylesheet if it is actually used on the page.",
          /** Additional description of a Lighthouse audit that tells the user how they can improve image loading by using webp in the context of the Joomla CMS platform. This is displayed after a user expands the section to see more. No character length limits. 'Learn More' becomes link text to additional documentation. */
          "modern-image-formats": "Consider using a [plugin](https://extensions.joomla.org/instant-search/?jed_live%5Bquery%5D=webp) or service that will automatically convert your uploaded images to the optimal formats.",
          /** Additional description of a Lighthouse audit that tells the user how they can improve performance by lazy loading images that are initially offscreen in the context of the Joomla CMS platform. This is displayed after a user expands the section to see more. No character length limits. 'Learn More' becomes link text to additional documentation. */
          "offscreen-images": "Install a [lazy-load Joomla plugin](https://extensions.joomla.org/instant-search/?jed_live%5Bquery%5D=lazy%20loading) that provides the ability to defer any offscreen images, or switch to a template that provides that functionality. Starting with Joomla 4.0, all new images will [automatically](https://github.com/joomla/joomla-cms/pull/30748) get the `loading` attribute from the core.",
          /** Additional description of a Lighthouse audit that tells the user how they can improve site loading performance by reducing the total bytes delivered by their page in the context of the Joomla CMS platform. This is displayed after a user expands the section to see more. No character length limits. 'Learn More' becomes link text to additional documentation. */
          "total-byte-weight": "Consider showing excerpts in your article categories (e.g. via the read more link), reducing the number of articles shown on a given page, breaking your long posts into multiple pages, or using a plugin to lazy-load comments.",
          /** Additional description of a Lighthouse audit that tells the user how they can improve performance by reducing the amount of render blocking resources present on their page, in the context of the Joomla CMS platform. This is displayed after a user expands the section to see more. No character length limits. 'Learn More' becomes link text to additional documentation. */
          "render-blocking-resources": "There are a number of Joomla plugins that can help you [inline critical assets](https://extensions.joomla.org/instant-search/?jed_live%5Bquery%5D=performance) or [defer less important resources](https://extensions.joomla.org/instant-search/?jed_live%5Bquery%5D=performance). Beware that optimizations provided by these plugins may break features of your templates or plugins, so you will need to test these thoroughly.",
          /** Additional description of a Lighthouse audit that tells the user how they can improve performance by minifying their CSS files in the context of the Joomla CMS platform. This is displayed after a user expands the section to see more. No character length limits. 'Learn More' becomes link text to additional documentation. */
          "unminified-css": "A number of [Joomla extensions](https://extensions.joomla.org/instant-search/?jed_live%5Bquery%5D=performance) can speed up your site by concatenating, minifying, and compressing your css styles. There are also templates that provide this functionality.",
          /** Additional description of a Lighthouse audit that tells the user how they can improve performance by minifying their Javascript files in the context of the Joomla CMS platform. This is displayed after a user expands the section to see more. No character length limits. 'Learn More' becomes link text to additional documentation. */
          "unminified-javascript": "A number of [Joomla extensions](https://extensions.joomla.org/instant-search/?jed_live%5Bquery%5D=performance) can speed up your site by concatenating, minifying, and compressing your scripts. There are also templates that provide this functionality.",
          /** Additional description of a Lighthouse audit that tells the user how they can improve performance by encoding animated images as video, in the context of the Joomla CMS platform. This is displayed after a user expands the section to see more. No character length limits. 'Learn More' becomes link text to additional documentation. */
          "efficient-animated-content": "Consider uploading your GIF to a service which will make it available to embed as an HTML5 video.",
          /** Additional description of a Lighthouse audit that tells the user how they can improve performance by removing unused Javascript files in the context of the Joomla CMS platform. This is displayed after a user expands the section to see more. No character length limits. 'Learn More' becomes link text to additional documentation. */
          "unused-javascript": "Consider reducing, or switching, the number of [Joomla extensions](https://extensions.joomla.org/) loading unused JavaScript in your page. To identify plugins that are adding extraneous JS, try running [code coverage](https://developers.google.com/web/updates/2017/04/devtools-release-notes#coverage) in Chrome DevTools. You can identify the extension responsible from the URL of the script. Look out for extensions that have many scripts in the list which have a lot of red in code coverage. An extension should only enqueue a script if it is actually used on the page.",
          /** Additional description of a Lighthouse audit that tells the user how they can improve their site by enabling long caching in the context of the Joomla CMS platform. This is displayed after a user expands the section to see more. No character length limits. 'Learn More' becomes link text to additional documentation. */
          "uses-long-cache-ttl": "Read about [Browser Caching in Joomla](https://docs.joomla.org/Cache).",
          /** Additional description of a Lighthouse audit that tells the user how they can improve site performance by optimizing images, in the context of the Joomla CMS platform. This is displayed after a user expands the section to see more. No character length limits. 'Learn More' becomes link text to additional documentation. */
          "uses-optimized-images": "Consider using an [image optimization plugin](https://extensions.joomla.org/instant-search/?jed_live%5Bquery%5D=performance) that compresses your images while retaining quality.",
          /** Additional description of a Lighthouse audit that tells the user how they can improve performance via enabling text compression in the context of the Joomla CMS platform. This is displayed after a user expands the section to see more. No character length limits. 'Learn More' becomes link text to additional documentation. */
          "uses-text-compression": "You can enable text compression by enabling Gzip Page Compression in Joomla (System > Global configuration > Server).",
          /** Additional description of a Lighthouse audit that tells the user how they can improve performance by using responsive images in the context of the Joomla CMS platform. This is displayed after a user expands the section to see more. No character length limits. 'Learn More' becomes link text to additional documentation. */
          "uses-responsive-images": "Consider using a [responsive images plugin](https://extensions.joomla.org/instant-search/?jed_live%5Bquery%5D=responsive%20images) to use responsive images in your content.",
          /** Additional description of a Lighthouse audit that tells the user how they can improve the server-response-time speed metric, in the context of the Joomla CMS platform. This is displayed after a user expands the section to see more. No character length limits. 'Learn More' becomes link text to additional documentation. */
          "server-response-time": "Templates, extensions, and server specifications all contribute to server response time. Consider finding a more optimized template, carefully selecting an optimization extension, and/or upgrading your server."
        };
        module2.exports = {
          id: "joomla",
          title: "Joomla",
          icon,
          UIStrings: UIStrings1252
        };
      }
    });
    require_magento = __commonJS({
      "node_modules/lighthouse-stack-packs/packs/magento.js"(exports2, module2) {
        init_process_global();
        var icon = `data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" fill="%23f26322" viewBox="0 0 1000 1000"><path d="M916.9 267.4v465.3l-111.3 67.4V331.4l-1.5-.9-303.9-189-304.6 189.2-1.2.8V799L83.1 732.6V267.4l.7-.4L500.3 10l416 257 .6.4zM560.7 468.5v383.3L500.3 890l-61-38.2V306.7l-136 84.3v476.6l197 122.5 196.4-122.5V391l-136-84.3v161.8z"/></svg>`;
        var UIStrings1252 = {
          /** Additional description of a Lighthouse audit that tells the user how they can improve image loading by using webp in the context of the Magento platform. This is displayed after a user expands the section to see more. No character length limits. 'Learn More' becomes link text to additional documentation. */
          "modern-image-formats": "Consider searching the [Magento Marketplace](https://marketplace.magento.com/catalogsearch/result/?q=webp) for a variety of third-party extensions to leverage newer image formats.",
          /** Additional description of a Lighthouse audit that tells the user how they can improve performance by lazy loading images that are initially offscreen in the context of the Magento platform. This is displayed after a user expands the section to see more. No character length limits. 'Learn More' becomes link text to additional documentation. */
          "offscreen-images": "Consider modifying your product and catalog templates to make use of the web platform's [lazy loading](https://web.dev/native-lazy-loading) feature.",
          /** Additional description of a Lighthouse audit that tells the user how they can improve site loading performance by disabling JS bundling in the context of the Magento platform. This is displayed after a user expands the section to see more. No character length limits. 'Learn More' becomes link text to additional documentation. */
          "disable-bundling": "Disable Magento's built-in [JavaScript bundling and minification](https://devdocs.magento.com/guides/v2.3/frontend-dev-guide/themes/js-bundling.html), and consider using [baler](https://github.com/magento/baler/) instead.",
          /** Additional description of a Lighthouse audit that tells the user how they can improve performance by minifying their CSS files in the context of the Magento platform. This is displayed after a user expands the section to see more. No character length limits. 'Learn More' becomes link text to additional documentation. */
          "unminified-css": `Enable the "Minify CSS Files" option in your store's Developer settings. [Learn more](https://devdocs.magento.com/guides/v2.3/performance-best-practices/configuration.html?itm_source=devdocs&itm_medium=search_page&itm_campaign=federated_search&itm_term=minify%20css%20files).`,
          /** Additional description of a Lighthouse audit that tells the user how they can improve performance by minifying their Javascript files in the context of the Magento platform. This is displayed after a user expands the section to see more. No character length limits. 'Learn More' becomes link text to additional documentation. */
          "unminified-javascript": "Use [Terser](https://www.npmjs.com/package/terser) to minify all JavaScript assets from static content deployment, and disable the built-in minification feature.",
          /** Additional description of a Lighthouse audit that tells the user how they can improve performance by removing unused Javascript files in the context of the Magento platform. This is displayed after a user expands the section to see more. No character length limits. 'Learn More' becomes link text to additional documentation. */
          "unused-javascript": "Disable Magento's built-in [JavaScript bundling](https://devdocs.magento.com/guides/v2.3/frontend-dev-guide/themes/js-bundling.html).",
          /** Additional description of a Lighthouse audit that tells the user how they can improve site performance by optimizing images, in the context of the Magento platform. This is displayed after a user expands the section to see more. No character length limits. 'Learn More' becomes link text to additional documentation. */
          "uses-optimized-images": "Consider searching the [Magento Marketplace](https://marketplace.magento.com/catalogsearch/result/?q=optimize%20image) for a variety of third party extensions to optimize images.",
          /** Additional description of a Lighthouse audit that tells the user how they can improve the time to first byte speed metric, in the context of the Magento platform. This is displayed after a user expands the section to see more. No character length limits. 'Learn More' becomes link text to additional documentation. */
          "server-response-time": "Use Magento's [Varnish integration](https://devdocs.magento.com/guides/v2.3/config-guide/varnish/config-varnish.html).",
          /** Additional description of a Lighthouse audit that tells the user how they can add preconnect or dns-prefetch resource hints, in the context of the Magento platform. This is displayed after a user expands the section to see more. No character length limits. 'Learn More' becomes link text to additional documentation. */
          "uses-rel-preconnect": "Preconnect or dns-prefetch resource hints can be added by [modifying a themes's layout](https://devdocs.magento.com/guides/v2.3/frontend-dev-guide/layouts/xml-manage.html).",
          /** Additional description of a Lighthouse audit that tells the user how they can add preload tags, in the context of the Magento platform. This is displayed after a user expands the section to see more. No character length limits. 'Learn More' becomes link text to additional documentation. */
          "uses-rel-preload": "`<link rel=preload>` tags can be added by [modifying a themes's layout](https://devdocs.magento.com/guides/v2.3/frontend-dev-guide/layouts/xml-manage.html).",
          /** Additional description of a Lighthouse audit that tells the user how they can minimize critical request chains, in the context of the Magento platform. This is displayed after a user expands the section to see more. No character length limits. 'Learn More' becomes link text to additional documentation. */
          "critical-request-chains": "If you are not bundling your JavaScript assets, consider using [baler](https://github.com/magento/baler).",
          /** Additional description of a Lighthouse audit that tells the user how they can specify font-display, in the context of the Magento platform. This is displayed after a user expands the section to see more. No character length limits. 'Learn More' becomes link text to additional documentation. */
          "font-display": "Specify `@font-display` when [defining custom fonts](https://devdocs.magento.com/guides/v2.3/frontend-dev-guide/css-topics/using-fonts.html)."
        };
        module2.exports = {
          id: "magento",
          title: "Magento",
          icon,
          UIStrings: UIStrings1252
        };
      }
    });
    require_next = __commonJS({
      "node_modules/lighthouse-stack-packs/packs/next.js"(exports2, module2) {
        init_process_global();
        var icon = `data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 207 124"><path fill="%23000" d="M48.942 32.632h38.96v3.082h-35.39v23.193H85.79v3.082H52.513v25.464h35.794v3.081H48.942V32.632Zm42.45 0h4.139l18.343 25.464 18.749-25.464L158.124.287l-41.896 60.485 21.59 29.762h-4.302l-19.642-27.086L94.15 90.534h-4.22l21.751-29.762-20.29-28.14Zm47.967 3.082v-3.082h44.397v3.082h-20.453v54.82h-3.571v-54.82h-20.373ZM.203 32.632h4.464l61.557 91.671-25.439-33.769L3.936 37.011l-.162 53.523H.203zm183.194 53.891c.738 0 1.276-.563 1.276-1.29 0-.727-.538-1.29-1.276-1.29-.73 0-1.277.563-1.277 1.29 0 .727.547 1.29 1.277 1.29Zm3.509-3.393c0 2.146 1.555 3.549 3.822 3.549 2.414 0 3.874-1.446 3.874-3.956v-8.837h-1.946v8.828c0 1.394-.704 2.138-1.946 2.138-1.112 0-1.867-.692-1.893-1.722h-1.911Zm10.24-.113c.14 2.233 2.007 3.662 4.787 3.662 2.97 0 4.83-1.498 4.83-3.887 0-1.878-1.06-2.917-3.632-3.514l-1.38-.338c-1.634-.38-2.294-.891-2.294-1.783 0-1.125 1.025-1.86 2.563-1.86 1.459 0 2.466.718 2.649 1.869h1.893c-.113-2.103-1.971-3.583-4.516-3.583-2.737 0-4.56 1.48-4.56 3.704 0 1.835 1.033 2.926 3.3 3.454l1.616.39c1.659.389 2.388.96 2.388 1.912 0 1.108-1.146 1.913-2.71 1.913-1.676 0-2.84-.753-3.005-1.939h-1.928Z"/></svg>`;
        var UIStrings1252 = {
          /** Additional description of a Lighthouse audit that tells the user how they can remove unusused CSS rules by configuring a plugin named PurgeCSS. */
          "unused-css-rules": "Consider setting up `PurgeCSS` in `Next.js` configuration to remove unused rules from stylesheets. [Learn more](https://purgecss.com/guides/next.html).",
          /** Additional description of a Lighthouse audit that tells the user to use the next/image component to automatically optimize image format. */
          "modern-image-formats": "Use the `next/image` component instead of `<img>` to automatically optimize image format. [Learn more](https://nextjs.org/docs/app/getting-started/images).",
          /** Additional description of a Lighthouse audit that tells the user to defer loading images which are not shown on screen using the next/image component. */
          "offscreen-images": "Use the `next/image` component instead of `<img>` to automatically lazy-load images. [Learn more](https://nextjs.org/docs/app/getting-started/images).",
          /** Additional description of a Lighthouse audit that tells the user to use next/script to defer loading of non-critical third-party libraries. */
          "render-blocking-resources": "Use the `next/script` component to defer loading of non-critical third-party scripts. [Learn more](https://nextjs.org/docs/app/guides/scripts).",
          /** Additional description of a Lighthouse audit that tells the user to use Webpack Bundle Analyzer to discover JavaScript code that is not used. */
          "unused-javascript": "Use `Webpack Bundle Analyzer` to detect unused JavaScript code. [Learn more](https://github.com/vercel/next.js/tree/canary/packages/next-bundle-analyzer)",
          /** Additional description of a Lighthouse audit that tells the user to enable caching for assets (e.g. images) and server-side rendered (SSR) pages that don't change between deployments. */
          "uses-long-cache-ttl": "Configure caching for immutable assets and `Server-side Rendered` (SSR) pages. [Learn more](https://nextjs.org/docs/13/pages/building-your-application/deploying/production-checklist#caching).",
          /** Additional description of a Lighthouse audit that tells the user to use the next/image component to adjust image quality. */
          "uses-optimized-images": "Use the `next/image` component instead of `<img>` to adjust image quality. [Learn more](https://nextjs.org/docs/app/getting-started/images).",
          /** Additional description of a Lighthouse audit that tells the user to enable compression (gzip, brotli) on their servers. */
          "uses-text-compression": "Enable compression on your Next.js server. [Learn more](https://nextjs.org/docs/api-reference/next.config.js/compression).",
          /** Additional description of a Lighthouse audit that tells the user to serve responsive images using the next/image component with appropriate `sizes` set. */
          "uses-responsive-images": "Use the `next/image` component to set the appropriate `sizes`. [Learn more](https://nextjs.org/docs/api-reference/next/image#sizes).",
          /** Additional description of a Lighthouse audit that tells the user to analyze the performance of their applications using Next.js Analytics. */
          "user-timings": "Consider using `Next.js Analytics` to measure your app's real-world performance. [Learn more](https://nextjs.org/docs/pages/guides/analytics).",
          /** Additional description of a Lighthouse audit that tells the user to use the next/image component to automatically preload LCP images. */
          "prioritize-lcp-image": 'Use the `next/image` component and set "priority" to true to preload LCP image. [Learn more](https://nextjs.org/docs/api-reference/next/image#priority).',
          /** Additional description of a Lighthouse audit that tells the user to use the next/image component to make sure `width` and `height` of image elements are always specified. */
          "unsized-images": "Use the `next/image` component to make sure images are always sized appropriately. [Learn more](https://nextjs.org/docs/api-reference/next/image#width)."
        };
        module2.exports = {
          id: "next.js",
          title: "Next.js",
          icon,
          UIStrings: UIStrings1252
        };
      }
    });
    require_nitropack = __commonJS({
      "node_modules/lighthouse-stack-packs/packs/nitropack.js"(exports2, module2) {
        init_process_global();
        var icon = `data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="142" height="54"><g fill="none" fill-rule="evenodd"><g fill="%231B004E"><path d="M19.486 53.24h-3.891L4.682 39.247v13.936H0V32.946h5.444l9.475 12.398V32.946h4.567zM21.346 32.94h4.647v3.57h-4.647v-3.57Zm0 5.477h4.647V53.18h-4.647V38.417ZM40.569 53.183H36c-3.408 0-4.991-1.625-4.991-4.697v-6.22h-3.777V38.42h3.777v-5.474h4.598v5.474h4.958v3.846h-4.958v4.588c0 1.597.477 2.252 2.197 2.252h2.764v4.077ZM46.688 53.183h-4.57V38.42h4.57v2.308c.31-.686 1.351-2.336 4.425-2.336h3.13v4.56h-4.004c-2.593 0-3.55.967-3.55 3.019v7.212ZM70.612 45.802c0 4.56-3.409 7.75-8.01 7.75s-8.006-3.19-8.006-7.75c0-4.56 3.408-7.755 8.006-7.755 4.598 0 8.01 3.195 8.01 7.755Zm-4.599 0c0-2.14-1.35-3.733-3.408-3.733-2.057 0-3.44 1.594-3.44 3.733 0 2.139 1.41 3.733 3.44 3.733 2.03 0 3.408-1.598 3.408-3.733ZM72.47 32.946h11.7c4.543 0 7.192 2.28 7.192 6.526 0 4.247-2.649 6.577-7.191 6.577h-6.935v7.125h-4.765V32.946Zm4.766 4.218v4.676h6.485c1.832 0 2.736-.883 2.736-2.34 0-1.565-.904-2.336-2.736-2.336h-6.485ZM102.662 51.016c-.254.485-1.636 2.48-4.71 2.48-3.665 0-6.627-2.906-6.627-7.694 0-4.789 2.962-7.667 6.656-7.667 2.962 0 4.372 1.851 4.626 2.336v-2.05h4.567v14.762h-4.512v-2.167Zm-3.327-8.932c-2.03 0-3.384 1.594-3.384 3.733 0 2.14 1.354 3.733 3.384 3.733s3.327-1.597 3.327-3.733-1.298-3.733-3.327-3.733ZM119.184 43.578a2.98 2.98 0 0 0-2.749-1.494c-1.918 0-3.13 1.594-3.13 3.733 0 2.14 1.24 3.758 3.158 3.758 1.807 0 2.625-1.168 2.764-1.51h4.4c-.143 2.052-2.116 5.5-7.275 5.5-4.286 0-7.641-3.078-7.641-7.75 0-4.673 3.328-7.755 7.585-7.755 5.159 0 7.105 3.392 7.33 5.53l-4.442-.012ZM129.712 46.6v6.577h-4.567V32.194h4.567v11.998l5.838-5.784h5.751l-6.994 6.811 7.362 7.952h-5.921z"/></g><g fill="%2325F5CE"><path d="M49.159 4.65c12.832 0 23.235 10.41 23.235 23.251h4.648C77.042 12.491 64.558 0 49.159 0c-15.4 0-27.883 12.492-27.883 27.901h4.647c0-12.841 10.403-23.25 23.236-23.25Z"/><path d="M44.852 25.793a3.632 3.632 0 0 1 2.6-5.097L63.8 16.951 50.426 27.09a3.626 3.626 0 0 1-5.574-1.296Z"/></g></g></svg>`;
        var UIStrings1252 = {
          /** Additional description of a Lighthouse audit for a third-party framework called `NitroPack`. This is displayed after a user expands the section to see more. No character length limits. `Reduce Unused CSS` is the name of a feature and becomes link text to additional documentation.*/
          "unused-css-rules": "Enable [`Reduce Unused CSS`](https://support.nitropack.io/hc/en-us/articles/360020418457-Reduce-Unused-CSS) to remove CSS rules that are not applicable to this page.",
          /** Additional description of a Lighthouse audit for a third-party framework called `NitroPack`. This is displayed after a user expands the section to see more. No character length limits. `Image Optimization` is the name of a feature and becomes link text to additional documentation. `WebP` is the name of a standardized image format for the web.*/
          "modern-image-formats": "Use [`Image Optimization`](https://support.nitropack.io/hc/en-us/articles/16547237162513) to automatically convert your images to WebP.",
          /** Additional description of a Lighthouse audit for a third-party framework called `NitroPack`. This is displayed after a user expands the section to see more. No character length limits. `Automatic Image Lazy Loading` is the name of a feature and becomes link text to additional documentation.*/
          "offscreen-images": "Defer offscreen images by enabling [`Automatic Image Lazy Loading`](https://support.nitropack.io/hc/en-us/articles/12457493524369-NitroPack-Lazy-Loading-Feature-for-Images).",
          /** Additional description of a Lighthouse audit for a third-party framework called `NitroPack`. This is displayed after a user expands the section to see more. No character length limits. `Remove render-blocking resources` is the name of a feature and becomes link text to additional documentation.*/
          "render-blocking-resources": "Enable [`Remove render-blocking resources`](https://support.nitropack.io/hc/en-us/articles/13820893500049-How-to-Deal-with-Render-Blocking-Resources-in-NitroPack) in NitroPack for faster initial load times.",
          /** Additional description of a Lighthouse audit for a third-party framework called `NitroPack`. This is displayed after a user expands the section to see more. No character length limits. `Minify resources` is the name of a feature and becomes link text to additional documentation.*/
          "unminified-css": "Enable [`Minify resources`](https://support.nitropack.io/hc/en-us/articles/360061059394-Minify-Resources) in your Caching settings to reduce the size of your CSS, HTML, and JavaScript files for faster load times.",
          /** Additional description of a Lighthouse audit for a third-party framework called `NitroPack`. This is displayed after a user expands the section to see more. No character length limits. `Minify resources` is the name of a feature and becomes link text to additional documentation.*/
          "unminified-javascript": "Enable [`Minify resources`](https://support.nitropack.io/hc/en-us/articles/360061059394-Minify-Resources) in your Caching settings to reduce the size of your JS, HTML, and CSS files for faster load times.",
          /** Additional description of a Lighthouse audit for a third-party framework called `NitroPack`. This is displayed after a user expands the section to see more. No character length limits. `Delayed Scripts` is the name of a feature and becomes link text to additional documentation.*/
          "unused-javascript": "Configure [`Delayed Scripts`](https://support.nitropack.io/hc/en-us/articles/1500002600942-Delayed-Scripts) in NitroPack to delay loading of scripts until they are needed.",
          /** Additional description of a Lighthouse audit for a third-party framework called `NitroPack`. This is displayed after a user expands the section to see more. No character length limits. `Improve Server Response Time` is the name of a feature and becomes link text to additional documentation.*/
          "uses-long-cache-ttl": "Go to the [`Improve Server Response Time`](https://support.nitropack.io/hc/en-us/articles/1500002321821-Improve-Server-Response-Time) feature in the `Caching` menu and adjust your page cache expiration time to improve loading times and user experience.",
          /** Additional description of a Lighthouse audit for a third-party framework called `NitroPack`. This is displayed after a user expands the section to see more. No character length limits. `Image Optimization` is the name of a feature and becomes link text to additional documentation.*/
          "uses-optimized-images": "Automatically compress, optimize, and convert your images into WebP by enabling the [`Image Optimization`](https://support.nitropack.io/hc/en-us/articles/14177271695121-How-to-serve-images-in-next-gen-formats-using-NitroPack) setting.",
          /** Additional description of a Lighthouse audit for a third-party framework called `NitroPack`. This is displayed after a user expands the section to see more. No character length limits. `Adaptive Image Sizing` is the name of a feature and becomes link text to additional documentation.*/
          "uses-responsive-images": "Enable [`Adaptive Image Sizing`](https://support.nitropack.io/hc/en-us/articles/10123833029905-How-to-Enable-Adaptive-Image-Sizing-For-Your-Site) to preemptively optimize your images and make them match the dimensions of the containers they\u2019re displayed in across all devices.",
          /** Additional description of a Lighthouse audit for a third-party framework called `NitroPack`. This is displayed after a user expands the section to see more. No character length limits. `HTML Lazy Load` is the name of a feature.*/
          "dom-size": "Contact your account manager to enable [`HTML Lazy Load`](https://support.nitropack.io/hc/en-us/articles/17144942904337). Configuring it will prioritize and optimize your page rendering performance.",
          /** Additional description of a Lighthouse audit for a third-party framework called `NitroPack`. This is displayed after a user expands the section to see more. No character length limits. `Override Font Rendering Behavior` is the name of a feature and becomes link text to additional documentation.*/
          "font-display": "Use the [`Override Font Rendering Behavior`](https://support.nitropack.io/hc/en-us/articles/16547358865041) option in NitroPack to set a desired value for the CSS font-display rule."
        };
        module2.exports = {
          id: "nitropack",
          title: "NitroPack",
          icon,
          UIStrings: UIStrings1252
        };
      }
    });
    require_nuxt = __commonJS({
      "node_modules/lighthouse-stack-packs/packs/nuxt.js"(exports2, module2) {
        init_process_global();
        var icon = `data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 512 512"><path fill="%2300DC82" d="M281.44 397.667h156.88c5.006 0 9.798-1.759 14.133-4.244.336-2.481 8.805-5.596 11.307-9.894 2.502-4.297 4.242-9.173 4.24-14.134-.002-4.962-1.734-9.836-4.24-14.131l-106-182.321c-2.502-4.297-5.559-7.413-9.893-9.894-4.335-2.48-10.542-4.24-15.547-4.24-5.005 0-9.799 1.76-14.133 4.24-4.335 2.481-7.392 5.597-9.894 9.894l-26.853 46.64-53.707-90.457c-2.504-4.296-5.557-8.823-9.893-11.303-4.336-2.481-9.127-2.827-14.133-2.827-5.006 0-9.798.346-14.134 2.827-4.335 2.48-8.802 7.007-11.306 11.303L46.827 355.268c-2.506 4.295-2.8259.169-2.827 14.131-.002 4.961.325 9.836 2.827 14.134 2.502 4.297 6.97 7.413 11.306 9.894 4.336 2.481 9.127 4.24 14.134 4.24H171.2c39.201 0 67.734-17.585 87.627-50.88L306.88 263.4l25.44-43.813 77.733 132.853H306.88l-25.44 45.227ZM169.787 352.44h-69.254l103.174-178.08L256 263.4l-34.639 60.384c-13.21 21.603-28.272 28.656-51.574 28.656Z"/></svg>`;
        var UIStrings1252 = {
          /** Additional description of a Lighthouse audit that tells the user to use the nuxt/image component to serve modern formats like WebP. */
          "modern-image-formats": 'Use the `nuxt/image` component and set `format="webp"`. [Learn more](https://image.nuxt.com/usage/nuxt-img#format).',
          /** Additional description of a Lighthouse audit that tells the user to use the nuxt/image component to defer loading images which are not shown on screen. */
          "offscreen-images": 'Use the `nuxt/image` component and set `loading="lazy"` for offscreen images. [Learn more](https://image.nuxt.com/usage/nuxt-img#loading).',
          /** Additional description of a Lighthouse audit that tells the user to use the nuxt/image component to automatically compress their images. */
          "uses-optimized-images": "Use the `nuxt/image` component and set the appropriate `quality`. [Learn more](https://image.nuxt.com/usage/nuxt-img#quality).",
          /** Additional description of a Lighthouse audit that tells the user to use the nuxt/image component to serve appropriately sized images to different devices. */
          "uses-responsive-images": "Use the `nuxt/image` component and set the appropriate `sizes`. [Learn more](https://image.nuxt.com/usage/nuxt-img#sizes).",
          /** Additional description of a Lighthouse audit that tells the user to use the nuxt/image component to prioritize the loading of the image that is part of the Largest Contentful Paint (LCP). */
          "prioritize-lcp-image": "Use the `nuxt/image` component and specify `preload` for LCP image. [Learn more](https://image.nuxt.com/usage/nuxt-img#preload).",
          /** Additional description of a Lighthouse audit that tells the user to use the nuxt/image component to provide explicit `width` and `height` for images to prevent layout shift. */
          "unsized-images": "Use the `nuxt/image` component and specify explicit `width` and `height`. [Learn more](https://image.nuxt.com/usage/nuxt-img#width-height)."
        };
        module2.exports = {
          id: "nuxt",
          title: "Nuxt",
          icon,
          UIStrings: UIStrings1252
        };
      }
    });
    require_octobercms = __commonJS({
      "node_modules/lighthouse-stack-packs/packs/octobercms.js"(exports2, module2) {
        init_process_global();
        var icon = `data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 310 310"><path fill="none" d="M-1-1h802v602H-1z"/><path fill="%23de6c26" d="M135 6.9c-14.2 4.4-34.9 21.8-49.9 42C55.8 88.5 39.6 135.8 41.4 177c.8 20.2 4.9 35.5 14.4 54.5 13.6 27.4 40.8 55.1 65.5 66.9 14.1 6.7 13.4 6.9 14.1-2.8.3-4.4 1-32.4 1.6-62.1 2.7-137.3 4.4-176 8.2-191.3.6-2.3 1.4-4.2 1.9-4.2 1.2 0 3.6 9.1 4.9 18.3.5 4.3 1 17.7 1 29.8 0 12 .3 21.9.7 21.9.3 0 5.7-5 11.9-11 6.9-6.8 12-11 13.3-11 1.8 0 1.9.3 1 2.7-1.2 3.1-7.9 13.2-19.1 28.5L153 128l.1 31.2c.1 17.2.4 37.4.8 44.9l.6 13.7 11-12.6c14-16 35.1-37.1 39.5-39.6l3.3-1.9-.6 3.2c-2 9.8-9.5 20.7-37.4 54.3L154 240.8v31.1c0 18.3.4 31.1.9 31.1 2.8 0 19.3-6.4 26.8-10.5 13.8-7.3 23.8-15 38.3-29.5 15.7-15.7 24.4-27.4 33.4-45.2 20.5-40 21-80.3 1.6-119-17.8-35.6-54.6-72.1-87.8-86.9-11.7-5.3-24.6-7.3-32.2-5z"/></svg>`;
        var UIStrings1252 = {
          /** Additional description of a Lighthouse audit that tells the user how they can improve performance by removing unused CSS, in the context of the October CMS platform. This is displayed after a user expands the section to see more. No character length limits. 'Learn More' becomes link text to additional documentation. */
          "unused-css-rules": "Consider reviewing the [plugins](https://octobercms.com/plugins) loading unused CSS on the website. To identify plugins that add unnecessary CSS, run [code coverage](https://developers.google.com/web/updates/2017/04/devtools-release-notes#coverage) in Chrome DevTools. Identify the theme/plugin responsible from the stylesheet URL. Look for plugins with many stylesheets with lots of red in code coverage. A plugin should only add a stylesheet if it is actually used on the web page.",
          /** Additional description of a Lighthouse audit that tells the user how they can improve image loading by using webp in the context of the October CMS platform. This is displayed after a user expands the section to see more. No character length limits. 'Learn More' becomes link text to additional documentation. */
          "modern-image-formats": "Consider using a [plugin](https://octobercms.com/plugins?search=image) or service that will automatically convert the uploaded images to the optimal formats. [WebP lossless images](https://developers.google.com/speed/webp) are 26% smaller in size compared to PNGs and 25-34% smaller than comparable JPEG images at the equivalent SSIM quality index. Another next-gen image format to consider is [AVIF](https://jakearchibald.com/2020/avif-has-landed/).",
          /** Additional description of a Lighthouse audit that tells the user how they can improve performance by lazy loading images that are initially offscreen in the context of the October CMS platform. This is displayed after a user expands the section to see more. No character length limits. 'Learn More' becomes link text to additional documentation. */
          "offscreen-images": "Consider installing an [image lazy loading plugin](https://octobercms.com/plugins?search=lazy) that provides the ability to defer any offscreen images, or switch to a theme that provides that functionality. Also consider using [the AMP plugin](https://octobercms.com/plugins?search=Accelerated+Mobile+Pages).",
          /** Additional description of a Lighthouse audit that tells the user how they can improve site loading performance by reducing the total bytes delivered by their page in the context of the October CMS platform. This is displayed after a user expands the section to see more. No character length limits. 'Learn More' becomes link text to additional documentation. */
          "total-byte-weight": "Consider showing excerpts in the post lists (e.g. using a `show more` button), reducing the number of posts shown on a given web page, breaking long posts into multiple web pages, or using a plugin to lazy-load comments.",
          /** Additional description of a Lighthouse audit that tells the user how they can improve performance by reducing the amount of render blocking resources present on their page, in the context of the October CMS platform. This is displayed after a user expands the section to see more. No character length limits. 'Learn More' becomes link text to additional documentation. */
          "render-blocking-resources": "There are many plugins that help [inline critical assets](https://octobercms.com/plugins?search=css). These plugins may break other plugins, so you should test thoroughly.",
          /** Additional description of a Lighthouse audit that tells the user how they can improve performance by minifying their CSS files in the context of the October CMS platform. This is displayed after a user expands the section to see more. No character length limits. 'Learn More' becomes link text to additional documentation. */
          "unminified-css": "There are many [plugins](https://octobercms.com/plugins?search=css) that can speed up a website by concatenating, minifying and compressing the styles. Using a build process to do this minification up-front can speed up development.",
          /** Additional description of a Lighthouse audit that tells the user how they can improve performance by minifying their Javascript files in the context of the October CMS platform. This is displayed after a user expands the section to see more. No character length limits. 'Learn More' becomes link text to additional documentation. */
          "unminified-javascript": "There are many [plugins](https://octobercms.com/plugins?search=javascript) that can speed up a website by concatenating, minifying and compressing the scripts. Using a build process to do this minification up-front can speed up development.",
          /** Additional description of a Lighthouse audit that tells the user how they can improve performance by encoding animated images as video, in the context of the October CMS platform. This is displayed after a user expands the section to see more. No character length limits. 'Learn More' becomes link text to additional documentation. */
          "efficient-animated-content": "[Replace animated GIFs with video](https://web.dev/replace-gifs-with-videos/) for faster web page loads and consider using modern file formats such as [WebM](https://web.dev/replace-gifs-with-videos/#create-webm-videos) or [AV1](https://developers.google.com/web/updates/2018/09/chrome-70-media-updates#av1-decoder) to improve compression efficiency by greater than 30% over the current state-of-the-art video codec, VP9.",
          /** Additional description of a Lighthouse audit that tells the user how they can improve performance by removing unused Javascript files in the context of the October CMS platform. This is displayed after a user expands the section to see more. No character length limits. 'Learn More' becomes link text to additional documentation. */
          "unused-javascript": "Consider reviewing the [plugins](https://octobercms.com/plugins?search=javascript) that load unused JavaScript in the web page. To identify plugins that add unnecessary JavaScript, run [code coverage](https://developers.google.com/web/updates/2017/04/devtools-release-notes#coverage) in Chrome DevTools. Identify the theme/plugin responsible from the URL of the script. Look for plugins with many scripts with lots of red in code coverage. A plugin should only add a script if it is actually used on the web page.",
          /** Additional description of a Lighthouse audit that tells the user how they can improve their site by enabling long caching in the context of the October CMS platform. This is displayed after a user expands the section to see more. No character length limits. 'Learn More' becomes link text to additional documentation. */
          "uses-long-cache-ttl": "Read about [preventing unnecessary network requests with the HTTP Cache](https://web.dev/http-cache/#caching-checklist). There are many [plugins](https://octobercms.com/plugins?search=Caching) that can be used to speed up caching.",
          /** Additional description of a Lighthouse audit that tells the user how they can improve site performance by optimizing images, in the context of the October CMS platform. This is displayed after a user expands the section to see more. No character length limits. 'Learn More' becomes link text to additional documentation. */
          "uses-optimized-images": "Consider using an [image optimization plugin](https://octobercms.com/plugins?search=image) to compresses images while retaining the quality.",
          /** Additional description of a Lighthouse audit that tells the user how they can improve performance via enabling text compression in the context of the October CMS platform. This is displayed after a user expands the section to see more. No character length limits. 'Learn More' becomes link text to additional documentation. */
          "uses-text-compression": "Enable text compression in the web server configuration.",
          /** Additional description of a Lighthouse audit that tells the user how they can improve performance by using responsive images in the context of the October CMS platform. This is displayed after a user expands the section to see more. No character length limits. 'Learn More' becomes link text to additional documentation. */
          "uses-responsive-images": "Upload images directly in the media manager to ensure the required image sizes are available. Consider using the [resize filter](https://octobercms.com/docs/markup/filter-resize) or an [image resizing plugin](https://octobercms.com/plugins?search=image) to ensure the optimal image sizes are used.",
          /** Additional description of a Lighthouse audit that tells the user how they can improve the time to first byte speed metric, in the context of the October CMS platform. This is displayed after a user expands the section to see more. No character length limits. 'Learn More' becomes link text to additional documentation. */
          "server-response-time": "Themes, plugins and server specifications all contribute to the server response time. Consider finding a more optimized theme, carefully selecting an optimization plugin and/or upgrade the server. October CMS also allows developers to use [`Queues`](https://octobercms.com/docs/services/queues) to defer the processing of a time consuming task, such as sending an e-mail. This drastically speeds up web requests."
        };
        module2.exports = {
          id: "octobercms",
          title: "October CMS",
          icon,
          UIStrings: UIStrings1252
        };
      }
    });
    require_react = __commonJS({
      "node_modules/lighthouse-stack-packs/packs/react.js"(exports2, module2) {
        init_process_global();
        var icon = `data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 841.9 595.3"><g fill="%2361DAFB"><path d="M666.3 296.5c0-32.5-40.7-63.3-103.1-82.4 14.4-63.6 8-114.2-20.2-130.4-6.5-3.8-14.1-5.6-22.4-5.6v22.3c4.6 0 8.3.9 11.4 2.6 13.6 7.8 19.5 37.5 14.9 75.7-1.1 9.4-2.9 19.3-5.1 29.4-19.6-4.8-41-8.5-63.5-10.9-13.5-18.5-27.5-35.3-41.6-50 32.6-30.3 63.2-46.9 84-46.9V78c-27.5 0-63.5 19.6-99.9 53.6-36.4-33.8-72.4-53.2-99.9-53.2v22.3c20.7 0 51.4 16.5 84 46.6-14 14.7-28 31.4-41.3 49.9-22.6 2.4-44 6.1-63.6 11-2.3-10-4-19.7-5.2-29-4.7-38.2 1.1-67.9 14.6-75.8 3-1.8 6.9-2.6 11.5-2.6V78.5c-8.4 0-16 1.8-22.6 5.6-28.1 16.2-34.4 66.7-19.9 130.1-62.2 19.2-102.7 49.9-102.7 82.3 0 32.5 40.7 63.3 103.1 82.4-14.4 63.6-8 114.2 20.2 130.4 6.5 3.8 14.1 5.6 22.5 5.6 27.5 0 63.5-19.6 99.9-53.6 36.4 33.8 72.4 53.2 99.9 53.2 8.4 0 16-1.8 22.6-5.6 28.1-16.2 34.4-66.7 19.9-130.1 62-19.1 102.5-49.9 102.5-82.3zm-130.2-66.7c-3.7 12.9-8.3 26.2-13.5 39.5-4.1-8-8.4-16-13.1-24-4.6-8-9.5-15.8-14.4-23.4 14.2 2.1 27.9 4.7 41 7.9zm-45.8 106.5c-7.8 13.5-15.8 26.3-24.1 38.2-14.9 1.3-30 2-45.2 2-15.1 0-30.2-.7-45-1.9-8.3-11.9-16.4-24.6-24.2-38-7.6-13.1-14.5-26.4-20.8-39.8 6.2-13.4 13.2-26.8 20.7-39.9 7.8-13.5 15.8-26.3 24.1-38.2 14.9-1.3 30-2 45.2-2 15.1 0 30.2.7 45 1.9 8.3 11.9 16.4 24.6 24.2 38 7.6 13.1 14.5 26.4 20.8 39.8-6.3 13.4-13.2 26.8-20.7 39.9zm32.3-13c5.4 13.4 10 26.8 13.8 39.8-13.1 3.2-26.9 5.9-41.2 8 4.9-7.7 9.8-15.6 14.4-23.7 4.6-8 8.9-16.1 13-24.1zM421.2 430c-9.3-9.6-18.6-20.3-27.8-32 9 .4 18.2.7 27.5.7 9.4 0 18.7-.2 27.8-.7-9 11.7-18.3 22.4-27.5 32zm-74.4-58.9c-14.2-2.1-27.9-4.7-41-7.9 3.7-12.9 8.3-26.2 13.5-39.5 4.1 8 8.4 16 13.1 24 4.7 8 9.5 15.8 14.4 23.4zM420.7 163c9.3 9.6 18.6 20.3 27.8 32-9-.4-18.2-.7-27.5-.7-9.4 0-18.7.2-27.8.7 9-11.7 18.3-22.4 27.5-32zm-74 58.9c-4.9 7.7-9.8 15.6-14.4 23.7-4.6 8-8.9 16-13 24-5.4-13.4-10-26.8-13.8-39.8 13.1-3.1 26.9-5.8 41.2-7.9zm-90.5 125.2c-35.4-15.1-58.3-34.9-58.3-50.6 0-15.7 22.9-35.6 58.3-50.6 8.6-3.7 18-7 27.7-10.1 5.7 19.6 13.2 40 22.5 60.9-9.2 20.8-16.6 41.1-22.2 60.6-9.9-3.1-19.3-6.5-28-10.2zM310 490c-13.6-7.8-19.5-37.5-14.9-75.7 1.1-9.4 2.9-19.3 5.1-29.4 19.6 4.8 41 8.5 63.5 10.9 13.5 18.5 27.5 35.3 41.6 50-32.6 30.3-63.2 46.9-84 46.9-4.5-.1-8.3-1-11.3-2.7zm237.2-76.2c4.7 38.2-1.1 67.9-14.6 75.8-3 1.8-6.9 2.6-11.5 2.6-20.7 0-51.4-16.5-84-46.6 14-14.7 28-31.4 41.3-49.9 22.6-2.4 44-6.1 63.6-11 2.3 10.1 4.1 19.8 5.2 29.1zm38.5-66.7c-8.6 3.7-18 7-27.7 10.1-5.7-19.6-13.2-40-22.5-60.9 9.2-20.8 16.6-41.1 22.2-60.6 9.9 3.1 19.3 6.5 28.1 10.2 35.4 15.1 58.3 34.9 58.3 50.6-.1 15.7-23 35.6-58.4 50.6zM320.8 78.4z"/><circle cx="420.9" cy="296.5" r="45.7"/><path d="M520.5 78.1z"/></g></svg>`;
        var UIStrings1252 = {
          /** Additional description of a Lighthouse audit that tells the user how they can improve performance by minifying their CSS files in the context of the React library. This is displayed after a user expands the section to see more. No character length limits. 'Learn More' becomes link text to additional documentation. */
          "unminified-css": "If your build system minifies CSS files automatically, ensure that you are deploying the production build of your application. You can check this with the React Developer Tools extension. [Learn more](https://reactjs.org/docs/optimizing-performance.html#use-the-production-build).",
          /** Additional description of a Lighthouse audit that tells the user how they can improve performance by minifying their Javascript files in the context of the React library. This is displayed after a user expands the section to see more. No character length limits. 'Learn More' becomes link text to additional documentation. */
          "unminified-javascript": "If your build system minifies JS files automatically, ensure that you are deploying the production build of your application. You can check this with the React Developer Tools extension. [Learn more](https://reactjs.org/docs/optimizing-performance.html#use-the-production-build).",
          /** Additional description of a Lighthouse audit that tells the user how they can improve performance by removing unused Javascript files in the context of the React library. This is displayed after a user expands the section to see more. No character length limits. 'Learn More' becomes link text to additional documentation. */
          "unused-javascript": "If you are not server-side rendering, [split your JavaScript bundles](https://web.dev/code-splitting-suspense/) with `React.lazy()`. Otherwise, code-split using a third-party library such as [loadable-components](https://loadable-components.com/).",
          /** Additional description of a Lighthouse audit that tells the user how they can improve the time to first byte speed metric, in the context of the React library. This is displayed after a user expands the section to see more. No character length limits. 'Learn More' becomes link text to additional documentation. */
          "server-response-time": "If you are server-side rendering any React components, consider using `renderToPipeableStream()` or `renderToStaticNodeStream()` to allow the client to receive and hydrate different parts of the markup instead of all at once. [Learn more](https://reactjs.org/docs/react-dom-server.html#renderToPipeableStream).",
          /** Additional description of a Lighthouse audit that tells the user how they can minimize redirects, in the context of the React library. This is displayed after a user expands the section to see more. No character length limits. 'Learn More' becomes link text to additional documentation. */
          "redirects": "If you are using React Router, minimize usage of the `<Redirect>` component for [route navigations](https://reacttraining.com/react-router/web/api/Redirect).",
          /** Additional description of a Lighthouse audit that tells the user how they can use the Profiler to help measure performance. This is displayed after a user expands the section to see more. No character length limits. 'Learn More' becomes link text to additional documentation. */
          "user-timings": "Use the React DevTools Profiler, which makes use of the Profiler API, to measure the rendering performance of your components. [Learn more.](https://reactjs.org/blog/2018/09/10/introducing-the-react-profiler.html)",
          /** Additional description of a Lighthouse audit that tells the user *why* and *how* they should reduce the size of the web page"s DOM, in the context of the React library, as well as how to maximize component performance when many DOM nodes are present. 'Learn More' becomes link text to additional documentation. */
          "dom-size": 'Consider using a "windowing" library like `react-window` to minimize the number of DOM nodes created if you are rendering many repeated elements on the page. [Learn more](https://web.dev/virtualize-long-lists-react-window/). Also, minimize unnecessary re-renders using [`shouldComponentUpdate`](https://reactjs.org/docs/optimizing-performance.html#shouldcomponentupdate-in-action), [`PureComponent`](https://reactjs.org/docs/react-api.html#reactpurecomponent), or [`React.memo`](https://reactjs.org/docs/react-api.html#reactmemo) and [skip effects](https://reactjs.org/docs/hooks-effect.html#tip-optimizing-performance-by-skipping-effects) only until certain dependencies have changed if you are using the `Effect` hook to improve runtime performance.'
        };
        module2.exports = {
          id: "react",
          title: "React",
          icon,
          UIStrings: UIStrings1252
        };
      }
    });
    require_wix = __commonJS({
      "node_modules/lighthouse-stack-packs/packs/wix.js"(exports2, module2) {
        init_process_global();
        var icon = `data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 71 28"><path fill-rule="evenodd" d="M0 .032s2.796-.356 4.66 1.31C5.81 2.37 6.145 4.008 6.145 4.008L9.952 18.96l3.165-12.239c.309-1.301.864-2.909 1.743-3.997 1.121-1.385 3.398-1.472 3.641-1.472.242 0 2.519.087 3.639 1.472.88 1.088 1.435 2.696 1.744 3.997l3.165 12.239 3.806-14.953s.336-1.638 1.486-2.666C34.205-.324 37 .032 37 .032l-7.289 27.945s-2.404.176-3.607-.446c-1.58-.816-2.332-1.447-3.289-5.249l-.099-.395c-.349-1.399-.883-3.59-1.424-5.813l-.162-.667-.162-.664c-.779-3.198-1.497-6.143-1.612-6.517-.108-.351-.236-1.187-.855-1.187-.607 0-.746.837-.857 1.187-.13.412-.99 3.955-1.856 7.514l-.162.667c-.512 2.107-1.01 4.151-1.341 5.48l-.1.395c-.956 3.802-1.708 4.433-3.288 5.249-1.204.622-3.608.446-3.608.446zM43.998 5v.995L44 5.994v16.628c-.014 3.413-.373 4.17-1.933 4.956-1.213.61-3.067.379-3.067.379V9.332c0-.935.315-1.548 1.477-2.098.693-.329 1.34-.58 2.012-.953C43.54 5.703 43.998 5 43.998 5zM46 .125s3.877-.673 5.797 1.107c1.228 1.14 2.602 3.19 2.602 3.19l3.38 4.965c.164.258.378.54.72.54.343 0 .558-.282.722-.54l3.38-4.965s1.374-2.05 2.602-3.19C67.123-.548 71 .125 71 .125l-9.186 13.923 9.161 13.881-.032.004c-.38.045-4.036.423-5.855-1.266-1.229-1.138-2.487-2.992-2.487-2.992l-3.38-4.964c-.164-.26-.379-.54-.721-.54-.343 0-.557.28-.721.54l-3.38 4.964s-1.19 1.854-2.418 2.992c-1.92 1.783-5.957 1.262-5.957 1.262l9.161-13.88zM43.96 0H44c0 1.91-.186 3.042-1.387 3.923-.384.28-1.048.71-1.826.992C39.719 5.304 39 6 39 6c0-3.476.53-4.734 1.95-5.48.865-.452 2.272-.514 2.82-.52z"></path></svg>`;
        var UIStrings1252 = {
          /** Additional description of a Lighthouse audit that tells the user to optimize image formats, in the context of the Wix CMS platform. */
          "modern-image-formats": "Upload images using `Wix Media Manager` to ensure they are automatically served as WebP. Find [more ways to optimize](https://support.wix.com/en/article/site-performance-optimizing-your-media) your site's media.",
          /** Additional description of a Lighthouse audit that tells the user to defer loading of non-critical third-party libraries, in the context of the Wix CMS platform. */
          "render-blocking-resources": "When [adding third-party code](https://support.wix.com/en/article/site-performance-using-third-party-code-on-your-site) in the `Custom Code` tab of your site's dashboard, make sure it's deferred or loaded at the end of the code body. Where possible, use Wix\u2019s [integrations](https://support.wix.com/en/article/about-marketing-integrations) to embed marketing tools on your site. ",
          /** Additional description of a Lighthouse audit that tells the user how they can improve performance by avoiding animated images and using videos where possible, in the context of the Wix CMS platform. */
          "efficient-animated-content": "Place videos inside `VideoBoxes`, customize them using `Video Masks` or add `Transparent Videos`. [Learn more](https://support.wix.com/en/article/wix-video-about-wix-video).",
          /** Additional description of a Lighthouse audit that tells the user to be aware of JavaScript code that is not used, particularly from third-parties, in the context of the Wix CMS platform. */
          "unused-javascript": "Review any third-party code you've added to your site in the `Custom Code` tab of your site's dashboard and only keep the services that are necessary to your site. [Find out more](https://support.wix.com/en/article/site-performance-removing-unused-javascript).",
          /** Additional description of a Lighthouse audit that tells the user how they can improve the server response time, in the context of the Wix CMS platform. */
          "server-response-time": "Wix utilizes CDNs and caching to serve responses as fast as possible for most visitors. Consider [manually enabling caching](https://support.wix.com/en/article/site-performance-caching-pages-to-optimize-loading-speed) for your site, especially if using `Velo`."
        };
        module2.exports = {
          id: "wix",
          title: "Wix",
          icon,
          UIStrings: UIStrings1252
        };
      }
    });
    require_wordpress = __commonJS({
      "node_modules/lighthouse-stack-packs/packs/wordpress.js"(exports2, module2) {
        init_process_global();
        var icon = `data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 122.5 122.5"><g fill="%232f3439"><path d="M8.7 61.3c0 20.8 12.1 38.7 29.6 47.3l-25-68.7c-3 6.5-4.6 13.7-4.6 21.4zm88-2.7c0-6.5-2.3-11-4.3-14.5-2.7-4.3-5.2-8-5.2-12.3 0-4.8 3.7-9.3 8.9-9.3h.7a52.4 52.4 0 0 0-79.4 9.9h3.3c5.5 0 14-.6 14-.6 2.9-.2 3.2 4 .4 4.3 0 0-2.9.4-6 .5l19.1 57L59.7 59l-8.2-22.5c-2.8-.1-5.5-.5-5.5-.5-2.8-.1-2.5-4.5.3-4.3 0 0 8.7.7 13.9.7 5.5 0 14-.7 14-.7 2.8-.2 3.2 4 .3 4.3 0 0-2.8.4-6 .5l19 56.5 5.2-17.5c2.3-7.3 4-12.5 4-17z"/><path d="m62.2 65.9-15.8 45.8a52.6 52.6 0 0 0 32.3-.9l-.4-.7zM107.4 36a49.6 49.6 0 0 1-3.6 24.2l-16.1 46.5A52.5 52.5 0 0 0 107.4 36z"/><path d="M61.3 0a61.3 61.3 0 1 0 .1 122.7A61.3 61.3 0 0 0 61.3 0zm0 119.7a58.5 58.5 0 1 1 .1-117 58.5 58.5 0 0 1-.1 117z"/></g></svg>`;
        var UIStrings1252 = {
          /** Additional description of a Lighthouse audit that tells the user how they can improve performance by removing unused CSS, in the context of the Wordpress CMS platform. This is displayed after a user expands the section to see more. No character length limits. 'Learn More' becomes link text to additional documentation. */
          "unused-css-rules": "Consider reducing, or switching, the number of [WordPress plugins](https://wordpress.org/plugins/) loading unused CSS in your page. To identify plugins that are adding extraneous CSS, try running [code coverage](https://developer.chrome.com/docs/devtools/coverage/) in Chrome DevTools. You can identify the theme/plugin responsible from the URL of the stylesheet. Look out for plugins that have many stylesheets in the list which have a lot of red in code coverage. A plugin should only enqueue a stylesheet if it is actually used on the page.",
          /** Additional description of a Lighthouse audit that tells the user how they can improve image loading by using webp in the context of the Wordpress CMS platform. This is displayed after a user expands the section to see more. No character length limits. */
          "modern-image-formats": "Consider using the [Performance Lab](https://wordpress.org/plugins/performance-lab/) plugin to automatically convert your uploaded JPEG images into WebP, wherever supported.",
          /** Additional description of a Lighthouse audit that tells the user how they can improve performance by lazy loading images that are initially offscreen in the context of the Wordpress CMS platform. This is displayed after a user expands the section to see more. No character length limits. 'Learn More' becomes link text to additional documentation. */
          "offscreen-images": "Install a [lazy-load WordPress plugin](https://wordpress.org/plugins/search/lazy+load/) that provides the ability to defer any offscreen images, or switch to a theme that provides that functionality. Also consider using [the AMP plugin](https://wordpress.org/plugins/amp/).",
          /** Additional description of a Lighthouse audit that tells the user how they can improve site loading performance by reducing the total bytes delivered by their page in the context of the Wordpress CMS platform. This is displayed after a user expands the section to see more. No character length limits. 'Learn More' becomes link text to additional documentation. */
          "total-byte-weight": "Consider showing excerpts in your post lists (e.g. via the more tag), reducing the number of posts shown on a given page, breaking your long posts into multiple pages, or using a plugin to lazy-load comments.",
          /** Additional description of a Lighthouse audit that tells the user how they can improve performance by reducing the amount of render blocking resources present on their page, in the context of the Wordpress CMS platform. This is displayed after a user expands the section to see more. No character length limits. 'Learn More' becomes link text to additional documentation. */
          "render-blocking-resources": "There are a number of WordPress plugins that can help you [inline critical assets](https://wordpress.org/plugins/search/critical+css/) or [defer less important resources](https://wordpress.org/plugins/search/defer+css+javascript/). Beware that optimizations provided by these plugins may break features of your theme or plugins, so you will likely need to make code changes.",
          /** Additional description of a Lighthouse audit that tells the user how they can improve performance by minifying their CSS files in the context of the Wordpress CMS platform. This is displayed after a user expands the section to see more. No character length limits. 'Learn More' becomes link text to additional documentation. */
          "unminified-css": "A number of [WordPress plugins](https://wordpress.org/plugins/search/minify+css/) can speed up your site by concatenating, minifying, and compressing your styles. You may also want to use a build process to do this minification up-front if possible.",
          /** Additional description of a Lighthouse audit that tells the user how they can improve performance by minifying their Javascript files in the context of the Wordpress CMS platform. This is displayed after a user expands the section to see more. No character length limits. 'Learn More' becomes link text to additional documentation. */
          "unminified-javascript": "A number of [WordPress plugins](https://wordpress.org/plugins/search/minify+javascript/) can speed up your site by concatenating, minifying, and compressing your scripts. You may also want to use a build process to do this minification up front if possible.",
          /** Additional description of a Lighthouse audit that tells the user how they can improve performance by encoding animated images as video, in the context of the Wordpress CMS platform. This is displayed after a user expands the section to see more. No character length limits. 'Learn More' becomes link text to additional documentation. */
          "efficient-animated-content": "Consider uploading your GIF to a service which will make it available to embed as an HTML5 video.",
          /** Additional description of a Lighthouse audit that tells the user how they can improve performance by removing unused Javascript files in the context of the Wordpress CMS platform. This is displayed after a user expands the section to see more. No character length limits. 'Learn More' becomes link text to additional documentation. */
          "unused-javascript": "Consider reducing, or switching, the number of [WordPress plugins](https://wordpress.org/plugins/) loading unused JavaScript in your page. To identify plugins that are adding extraneous JS, try running [code coverage](https://developer.chrome.com/docs/devtools/coverage/) in Chrome DevTools. You can identify the theme/plugin responsible from the URL of the script. Look out for plugins that have many scripts in the list which have a lot of red in code coverage. A plugin should only enqueue a script if it is actually used on the page.",
          /** Additional description of a Lighthouse audit that tells the user how they can improve their site by enabling long caching in the context of the Wordpress CMS platform. This is displayed after a user expands the section to see more. No character length limits. 'Learn More' becomes link text to additional documentation. */
          "uses-long-cache-ttl": "Read about [Browser Caching in WordPress](https://wordpress.org/support/article/optimization/#browser-caching).",
          /** Additional description of a Lighthouse audit that tells the user how they can improve site performance by optimizing images, in the context of the Wordpress CMS platform. This is displayed after a user expands the section to see more. No character length limits. 'Learn More' becomes link text to additional documentation. */
          "uses-optimized-images": "Consider using an [image optimization WordPress plugin](https://wordpress.org/plugins/search/optimize+images/) that compresses your images while retaining quality.",
          /** Additional description of a Lighthouse audit that tells the user how they can improve performance via enabling text compression in the context of the Wordpress CMS platform. This is displayed after a user expands the section to see more. No character length limits. 'Learn More' becomes link text to additional documentation. */
          "uses-text-compression": "You can enable text compression in your web server configuration.",
          /** Additional description of a Lighthouse audit that tells the user how they can improve performance by using responsive images in the context of the Wordpress CMS platform. This is displayed after a user expands the section to see more. No character length limits. 'Learn More' becomes link text to additional documentation. */
          "uses-responsive-images": "Upload images directly through the [media library](https://wordpress.org/support/article/media-library-screen/) to ensure that the required image sizes are available, and then insert them from the media library or use the image widget to ensure the optimal image sizes are used (including those for the responsive breakpoints). Avoid using `Full Size` images unless the dimensions are adequate for their usage. [Learn More](https://wordpress.org/support/article/inserting-images-into-posts-and-pages/).",
          /** Additional description of a Lighthouse audit that tells the user how they can improve the time to first byte speed metric, in the context of the Wordpress CMS platform. This is displayed after a user expands the section to see more. No character length limits. 'Learn More' becomes link text to additional documentation. */
          "server-response-time": "Choose a lightweight theme (ideally a block theme) and implement full-page caching or a static site solution. Disable unnecessary plugins to minimize server overhead. Consider upgrading your hosting to managed or dedicated service."
        };
        module2.exports = {
          id: "wordpress",
          title: "WordPress",
          icon,
          UIStrings: UIStrings1252
        };
      }
    });
    require_wp_rocket = __commonJS({
      "node_modules/lighthouse-stack-packs/packs/wp-rocket.js"(exports2, module2) {
        init_process_global();
        var icon = `data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 294 524"><defs><linearGradient id="a" x1="36.742%" x2="37.116%" y1="100.518%" y2="-.001%"><stop offset="0%" stop-color="%23DD5F29"/><stop offset="26.042%" stop-color="%23F26B32"/><stop offset="100%" stop-color="%23FAC932"/></linearGradient><linearGradient id="b" x1="28.046%" x2="28.421%" y1="100.518%" y2="-.003%"><stop offset="0%" stop-color="%23DD5F29"/><stop offset="26.042%" stop-color="%23F26B32"/><stop offset="100%" stop-color="%23FAC932"/></linearGradient><linearGradient id="c" x1="38.215%" x2="38.589%" y1="100.518%" y2="0%"><stop offset="0%" stop-color="%23DD5F29"/><stop offset="26.042%" stop-color="%23F26B32"/><stop offset="100%" stop-color="%23FAC932"/></linearGradient></defs><g fill="none" fill-rule="evenodd"><path fill="url(%23a)" d="M218.617 270.615c-9.752 0-18.896-5.689-23.366-14.63l-7.72-17.27h-76.6l-7.722 17.27c-4.47 8.941-13.613 14.63-23.366 14.63H75.78l32.712 249.306c1.625 4.671 4.673 4.671 6.502 0l32.51-79.648 28.242 79.442c1.625 4.676 4.673 4.676 6.501 0L220.04 270.82l-1.423-.204Z" transform="translate(-1.58 -.2)"/><path fill="url(%23b)" d="M184.47 231.784h-70.3l-10.77 24.179c-3.657 7.314-10.768 12.597-18.489 14.02L109.7 423.791c1.625 2.844 4.673 2.844 6.501 0l31.697-48.155 29.055 47.951c1.829 2.845 4.673 2.845 6.502 0l28.039-154.012c-6.908-2.032-13.004-6.908-16.255-13.613l-10.768-24.18Z" transform="translate(-1.58 -.2)"/><path fill="url(%23c)" d="m195.259 255.988-46.123-103.014-45.92 103.014c-1.625 3.048-3.656 5.69-6.095 7.925l19.1 102.2c1.015 1.423 3.657 1.83 5.485 0l25.601-33.931 25.602 33.728c1.625 2.032 4.47 1.626 5.485 0l21.131-103.42c-1.625-2.032-3.047-4.064-4.266-6.502Z" transform="translate(-1.58 -.2)"/><path fill="%23F56F46" d="M.439 12.559c-1.422-4.877 1.422-8.33 6.299-8.33H47.17c2.845 0 5.486 2.437 6.299 4.876l29.665 116.83h1.422l53.437-121.3c1.016-2.032 3.048-3.86 5.892-3.86h6.299c3.047 0 5.08 1.625 5.892 3.86l53.437 121.3h1.423L240.6 9.105c.61-2.439 3.454-4.877 6.299-4.877h40.433c4.877 0 7.518 3.454 6.299 8.33l-65.221 231.63c-.61 2.845-3.454 4.876-6.298 4.876h-5.487c-2.438 0-4.876-1.625-5.892-3.86l-63.19-141.009h-1.015L83.744 245.203c-1.016 2.032-3.454 3.86-5.892 3.86h-5.486c-2.845 0-5.486-2.031-6.299-4.876L.44 12.559Z"/></g></svg>`;
        var UIStrings1252 = {
          /** Additional description of a Lighthouse audit for a third-party framework called 'WP Rocket'. This is displayed after a user expands the section to see more. No character length limits. Remove Unused CSS is a name of the feature */
          "unused-css-rules": `Enable [Remove Unused CSS](https://docs.wp-rocket.me/article/1529-remove-unused-css) in 'WP Rocket' to fix this issue. It reduces page size by removing all CSS and stylesheets that are not used while keeping only the used CSS for each page.`,
          /** Additional description of a Lighthouse audit for a third-party framework called 'WP Rocket'. This is displayed after a user expands the section to see more. No character length limits. `Imagify` is an image optimization add-on */
          "modern-image-formats": `Enable 'Imagify' from the Image Optimization tab in 'WP Rocket' to convert your images to WebP.`,
          /** Additional description of a Lighthouse audit for a third-party framework called 'WP Rocket'. This is displayed after a user expands the section to see more. No character length limits. Delay JavaScript, LazyLoad for iframes and videos and Replace YouTube iframe with preview image are names of the features */
          "unused-javascript": `Enable [Delay JavaScript execution](https://docs.wp-rocket.me/article/1349-delay-javascript-execution) in 'WP Rocket' to fix this problem. It will improve the loading of your page by delaying the execution of scripts until user interaction. If your site has iframes, you can use WP Rocket's [LazyLoad for iframes and videos](https://docs.wp-rocket.me/article/1674-lazyload-for-iframes-and-videos) and [Replace YouTube iframe with preview image](https://docs.wp-rocket.me/article/1488-replace-youtube-iframe-with-preview-image) as well.`,
          /** Additional description of a Lighthouse audit for a third-party framework called 'WP Rocket'. This is displayed after a user expands the section to see more. No character length limits. Remove Unused CSS, Load JavaScript deferred are names of the features */
          "render-blocking-resources": `Enable [Remove Unused CSS](https://docs.wp-rocket.me/article/1529-remove-unused-css) and [Load JavaScript deferred](https://docs.wp-rocket.me/article/1265-load-javascript-deferred) in 'WP Rocket' to address this recommendation. These features will respectively optimize the CSS and JavaScript files so that they don't block the rendering of your page.`,
          /** Additional description of a Lighthouse audit for a third-party framework called 'WP Rocket'. This is displayed after a user expands the section to see more. No character length limits. Minify CSS Files is a name of the feature */
          "unminified-css": `Enable [Minify CSS files](https://docs.wp-rocket.me/article/1350-css-minify-combine) in 'WP Rocket' to fix this issue. Any spaces and comments in your site's CSS files will be removed to make the file size smaller and faster to download.`,
          /** Additional description of a Lighthouse audit for a third-party framework called 'WP Rocket'. This is displayed after a user expands the section to see more. No character length limits. Minify JavaScript Files is a name of the feature */
          "unminified-javascript": `Enable [Minify JavaScript files](https://docs.wp-rocket.me/article/1351-javascript-minify-combine) in 'WP Rocket' to fix this issue. Empty spaces and comments will be removed from JavaScript files to make their size smaller and faster to download.`,
          /** Additional description of a Lighthouse audit for a third-party framework called 'WP Rocket'. This is displayed after a user expands the section to see more. No character length limits. `Imagify` is an image optimization add-on */
          "uses-optimized-images": `Enable 'Imagify' from the Image Optimization tab in 'WP Rocket' and run Bulk Optimization to compress your images.`,
          /** Additional description of a Lighthouse audit for a third-party framework called 'WP Rocket'. This is displayed after a user expands the section to see more. No character length limits. Prefetch DNS Requests, Enable CDN are names of the features */
          "uses-rel-preconnect": `Use [Prefetch DNS Requests](https://docs.wp-rocket.me/article/1302-prefetch-dns-requests) in 'WP Rocket' to add "dns-prefetch" and speed up the connection with external domains. Also, 'WP Rocket' automatically adds "preconnect" to [Google Fonts domain](https://docs.wp-rocket.me/article/1312-optimize-google-fonts) and any CNAME(S) added via the [Enable CDN](https://docs.wp-rocket.me/article/42-using-wp-rocket-with-a-cdn) feature.`,
          /** Additional description of a Lighthouse audit for a third-party framework called 'WP Rocket'. This is displayed after a user expands the section to see more. No character length limits. Remove Unused CSS is a name of the feature*/
          "uses-rel-preload": `To fix this issue for fonts, enable [Remove Unused CSS](https://docs.wp-rocket.me/article/1529-remove-unused-css) in 'WP Rocket'. Your site's critical fonts will be preloaded with priority.`,
          /** Additional description of a Lighthouse audit for a third-party framework called 'WP Rocket'. This is displayed after a user expands the section to see more. No character length limits. LazyLoad for images is a name of the feature*/
          "offscreen-images": `Enable [LazyLoad](https://docs.wp-rocket.me/article/1141-lazyload-for-images) in WP Rocket to fix this recommendation. This feature delays the loading of the images until the visitor scrolls down the page and actually needs to see them.`
        };
        module2.exports = {
          id: "wp-rocket",
          title: "WP Rocket",
          icon,
          UIStrings: UIStrings1252
        };
      }
    });
    require_lighthouse_stack_packs = __commonJS({
      "node_modules/lighthouse-stack-packs/index.js"(exports2, module2) {
        init_process_global();
        var stackPacks2 = [
          require_amp(),
          require_angular(),
          require_drupal(),
          require_ezoic(),
          require_gatsby(),
          require_joomla(),
          require_magento(),
          require_next(),
          require_nitropack(),
          require_nuxt(),
          require_octobercms(),
          require_react(),
          require_wix(),
          require_wordpress(),
          require_wp_rocket()
        ];
        module2.exports = stackPacks2;
      }
    });
    require_lookup_closest_locale = __commonJS({
      "node_modules/lookup-closest-locale/index.js"(exports2, module2) {
        init_process_global();
        module2.exports = /* @__PURE__ */ __name(function lookupClosestLocale2(locale, available) {
          if (typeof locale === "string" && available[locale])
            return locale;
          var locales2 = [].concat(locale || []);
          for (var l = 0, ll = locales2.length; l < ll; ++l) {
            var current = locales2[l].split("-");
            while (current.length) {
              var candidate = current.join("-");
              if (available[candidate])
                return candidate;
              current.pop();
            }
          }
        }, "lookupClosestLocale");
      }
    });
    init_root2 = __esm2({
      "shared/root.js"() {
        "use strict";
        init_process_global();
        init_esm_utils();
        LH_ROOT = path.dirname("");
        pkg = JSON.parse(`{
  "name": "lighthouse",
  "type": "module",
  "version": "13.0.3",
  "description": "Automated auditing, performance metrics, and best practices for the web.",
  "main": "./core/index.js",
  "bin": {
    "lighthouse": "./cli/index.js",
    "chrome-debug": "./core/scripts/manual-chrome-launcher.js",
    "smokehouse": "./cli/test/smokehouse/frontends/smokehouse-bin.js"
  },
  "engines": {
    "node": ">=22.19"
  },
  "scripts": {
    "prepack": "yarn build-report --standalone --flow --esm && yarn build-types",
    "postpack": "yarn clean-types",
    "build-all": "yarn build-report && yarn build-cdt-strings && yarn build-devtools && concurrently 'yarn build-extension' 'yarn build-lr' 'yarn build-viewer' 'yarn build-treemap' 'yarn build-smokehouse-bundle' 'yarn build-legacy-javascript' 'yarn build-devtools-mcp' && yarn build-pack",
    "build-cdt-lib": "node ./build/build-cdt-lib.js",
    "build-cdt-strings": "node ./build/build-cdt-strings.js",
    "build-extension": "yarn build-extension-chrome && yarn build-extension-firefox",
    "build-extension-chrome": "node ./build/build-extension.js chrome",
    "build-extension-firefox": "node ./build/build-extension.js firefox",
    "build-devtools": "yarn reset-link && node ./build/build-bundle.js clients/devtools/devtools-entry.js dist/lighthouse-dt-bundle.js && node ./build/build-dt-report-resources.js",
    "build-legacy-javascript": "node ./build/build-legacy-javascript.js",
    "build-devtools-mcp": "node ./build/build-bundle-mcp.js clients/devtools-mcp/devtools-mcp-entry.js dist/lighthouse-devtools-mcp-bundle.js",
    "build-smokehouse-bundle": "node ./build/build-smokehouse-bundle.js",
    "build-lr": "yarn reset-link && node --max-old-space-size=4096 ./build/build-lightrider-bundles.js",
    "build-pack": "bash build/build-pack.sh",
    "build-report": "node build/build-report-components.js && node build/build-report.js",
    "build-sample-reports": "yarn build-report && node build/build-sample-reports.js",
    "build-treemap": "node ./build/build-treemap.js",
    "build-viewer": "node ./build/build-viewer.js",
    "build-types": "yarn type-check && rsync -a .tmp/tsbuildinfo/ ./ --include='*.d.ts' --include='*.d.cts' --exclude='*.map' --exclude='*.tsbuildinfo'",
    "reset-link": "(yarn unlink || true) && yarn link && yarn link lighthouse",
    "c8": "bash core/scripts/c8.sh",
    "clean": "rm -r dist proto/scripts/*.json proto/scripts/*_pb2.* proto/scripts/*_pb.* proto/scripts/__pycache__ proto/scripts/*.pyc *.report.html *.report.dom.html *.report.json *.devtoolslog.json *.trace.json shared/localization/locales/*.ctc.json || true",
    "clean-types": "git clean -xfq '*.d.ts' '*.d.cts' -e 'node_modules/' -e 'dist/' -e '.tmp/' -e '**/types/'",
    "lint": "[ \\"$CI\\" = true ] && eslint --quiet -f codeframe . || eslint .",
    "smoke": "node -r source-map-support/register cli/test/smokehouse/frontends/smokehouse-bin.js",
    "debug": "node --inspect-brk ./cli/index.js",
    "start": "yarn build-report --standalone && node ./cli/index.js",
    "mocha": "node core/test/scripts/run-mocha-tests.js",
    "test": "yarn diff:sample-json && yarn lint --quiet && yarn unit && yarn type-check",
    "test-bundle": "yarn smoke --runner bundle",
    "test-clients": "yarn mocha --testMatch clients/**/*-test.js && yarn mocha --testMatch clients/**/*-test-pptr.js",
    "test-viewer": "yarn unit-viewer && yarn mocha --testMatch viewer/**/*-test-pptr.js --timeout 35000",
    "test-treemap": "yarn unit-treemap && yarn mocha --testMatch treemap/**/*-test-pptr.js --timeout 35000",
    "test-lantern": "bash core/scripts/test-lantern.sh",
    "test-legacy-javascript": "bash core/scripts/test-legacy-javascript.sh",
    "test-docs": "yarn --cwd docs/recipes/ test",
    "test-proto": "yarn compile-proto && yarn build-proto-roundtrip",
    "unit-core": "yarn mocha core",
    "unit-cli": "yarn mocha --testMatch cli/**/*-test.js",
    "unit-lantern-trace": "INTERNAL_LANTERN_USE_TRACE=1 yarn mocha core/test/computed/metrics core/test/audits",
    "unit-report": "yarn mocha --testMatch report/**/*-test.js",
    "unit-treemap": "yarn mocha --testMatch treemap/**/*-test.js",
    "unit-viewer": "yarn mocha --testMatch viewer/**/*-test.js",
    "unit-flow": "bash flow-report/test/run-flow-report-tests.sh",
    "unit": "yarn unit-flow && yarn mocha && yarn unit-lantern-trace",
    "unit:ci": "NODE_OPTIONS=--max-old-space-size=8192 npm run unit",
    "unit-lantern-trace:ci": "NODE_OPTIONS=--max-old-space-size=8192 npm run unit-lantern-trace",
    "core-unit": "yarn unit-core",
    "cli-unit": "yarn unit-cli",
    "viewer-unit": "yarn unit-viewer",
    "watch": "yarn unit-core --watch",
    "unit:cicoverage": "yarn c8 --all yarn unit:ci && yarn c8 --all yarn unit-lantern-trace:ci",
    "coverage": "yarn unit:cicoverage && c8 report --reporter html",
    "coverage:smoke": "yarn c8 yarn smoke -j=1 && c8 report --reporter html",
    "devtools": "bash core/scripts/roll-to-devtools.sh",
    "chrome": "node core/scripts/manual-chrome-launcher.js",
    "fast": "node ./cli/index.js --preset=desktop --throttlingMethod=provided",
    "deploy-treemap": "yarn build-treemap --deploy",
    "deploy-viewer": "yarn build-viewer --deploy",
    "vercel-build": "yarn build-sample-reports && yarn build-viewer && yarn build-treemap",
    "dogfood-lhci": "./core/scripts/dogfood-lhci.sh",
    "timing-trace": "node core/scripts/generate-timing-trace.js",
    "changelog": "conventional-changelog --config ./build/changelog-generator/index.cjs --infile changelog.md --same-file",
    "type-check": "tsc --build ./tsconfig-all.json",
    "i18n:checks": "./core/scripts/i18n/assert-strings-collected.sh",
    "i18n:collect-strings": "node core/scripts/i18n/collect-strings.js",
    "update:lantern-baseline": "node core/scripts/lantern/update-baseline-lantern-values.js",
    "update:sample-artifacts": "node core/scripts/update-report-fixtures.js",
    "update:sample-json": "yarn i18n:collect-strings && node ./cli -A=./core/test/results/artifacts --config-path=./core/test/results/sample-config.js --output=json --output-path=./core/test/results/sample_v2.json && node core/scripts/cleanup-LHR-for-diff.js ./core/test/results/sample_v2.json --only-remove-timing && node ./core/scripts/update-flow-fixtures.js",
    "update:flow-sample-json": "yarn i18n:collect-strings && node ./core/scripts/update-flow-fixtures.js",
    "test-devtools": "bash core/test/devtools-tests/test-locally.sh",
    "open-devtools": "bash core/scripts/open-devtools.sh",
    "run-devtools": "node core/scripts/pptr-run-devtools.js",
    "diff:sample-json": "yarn i18n:checks && bash core/scripts/assert-golden-lhr-unchanged.sh",
    "diff:flow-sample-json": "yarn i18n:collect-strings && bash core/scripts/assert-baseline-flow-result-unchanged.sh",
    "computeBenchmarkIndex": "./core/scripts/benchmark.js",
    "save-latest-run": "./core/scripts/save-latest-run.sh",
    "compile-proto": "protoc --python_out=./ ./proto/lighthouse-result.proto && mv ./proto/*_pb2.py ./proto/scripts || (echo \\"\u274C Install protobuf = 3.20.x to compile the proto file.\\" && false)",
    "build-proto-roundtrip": "mkdir -p .tmp && python3 proto/scripts/json_roundtrip_via_proto.py",
    "static-server": "node cli/test/fixtures/static-server.js",
    "serve-dist": "cd dist && python3 -m http.server 7878",
    "serve-gh-pages": "cd dist/gh-pages && python3 -m http.server 7333",
    "serve-treemap": "yarn serve-gh-pages",
    "serve-viewer": "yarn serve-gh-pages",
    "flow-report": "yarn build-report --flow && node ./core/scripts/build-test-flow-report.js",
    "generate-insight-audits": "node core/scripts/generate-insight-audits.js"
  },
  "devDependencies": {
    "@build-tracker/cli": "^1.0.0-beta.15",
    "@esbuild-kit/esm-loader": "^2.6.5",
    "@esbuild-plugins/node-modules-polyfill": "^0.1.4",
    "@eslint/compat": "^1.3.0",
    "@eslint/eslintrc": "^3.3.1",
    "@eslint/js": "^9.28.0",
    "@formatjs/icu-messageformat-parser": "^2.6.2",
    "@jest/fake-timers": "^29.7.0",
    "@testing-library/preact": "^3.1.1",
    "@testing-library/preact-hooks": "^1.1.0",
    "@types/archiver": "^2.1.2",
    "@types/chrome": "^0.0.154",
    "@types/configstore": "^6.0.2",
    "@types/cpy": "^5.1.0",
    "@types/debug": "^4.1.7",
    "@types/eslint": "^9.6.1",
    "@types/estree": "^0.0.50",
    "@types/gh-pages": "^2.0.0",
    "@types/google.analytics": "0.0.39",
    "@types/gtag.js": "0.0.20",
    "@types/jpeg-js": "^0.3.7",
    "@types/jsdom": "^16.2.13",
    "@types/lodash-es": "^4.17.12",
    "@types/mocha": "^9.0.0",
    "@types/node": "*",
    "@types/pako": "^1.0.1",
    "@types/resize-observer-browser": "^0.1.1",
    "@types/resolve": "^1.20.2",
    "@types/semver": "^5.5.0",
    "@types/ws": "^7.0.0",
    "@types/yargs": "^17.0.8",
    "@types/yargs-parser": "^20.2.1",
    "@typescript-eslint/eslint-plugin": "^8.34.0",
    "@typescript-eslint/parser": "^8.34.0",
    "acorn": "^8.5.0",
    "angular": "^1.7.4",
    "archiver": "^7.0.1",
    "builtin-modules": "^3.3.0",
    "c8": "^7.11.3",
    "chalk": "^2.4.1",
    "chrome-devtools-frontend": "1.0.1526630",
    "colors": "^1.4.0",
    "concurrently": "^9.2.1",
    "conventional-changelog-cli": "^2.1.1",
    "core-js-compat": "^3.44.0",
    "cpy": "^8.1.2",
    "csv-validator": "^0.0.3",
    "esbuild": "0.25.9",
    "eslint": "^9.28.0",
    "eslint-config-google": "^0.14.0",
    "eslint-formatter-codeframe": "^7.32.1",
    "eslint-plugin-import": "^2.25.3",
    "eslint-plugin-local-rules": "1.1.0",
    "expect": "^28.1.0",
    "firebase": "^9.0.2",
    "gh-pages": "^2.0.1",
    "glob": "^7.1.3",
    "globals": "^15.14.0",
    "idb-keyval": "2.2.0",
    "jest-mock": "^29.7.0",
    "jest-snapshot": "^29.7.0",
    "jsdom": "^12.2.0",
    "lighthouse-plugin-soft-navigation": "^1.1.0",
    "magic-string": "^0.25.7",
    "mime-types": "^2.1.30",
    "mocha": "^10.0.0",
    "pako": "^2.1.0",
    "preact": "^10.7.2",
    "pretty-json-stringify": "^0.0.2",
    "puppeteer": "^24.23.0",
    "resolve": "^1.22.10",
    "rollup-plugin-polyfill-node": "^0.12.0",
    "source-map-support": "^0.5.21",
    "terser": "^5.18.2",
    "testdouble": "^3.20.2",
    "typed-query-selector": "^2.12.0",
    "typescript": "5.8.2",
    "wait-for-expect": "^3.0.2",
    "webtreemap-cdt": "^3.2.1"
  },
  "dependencies": {
    "@paulirish/trace_engine": "0.0.61",
    "@sentry/node": "^9.28.1",
    "axe-core": "^4.11.0",
    "chrome-launcher": "^1.2.1",
    "configstore": "^7.0.0",
    "csp_evaluator": "1.1.5",
    "devtools-protocol": "0.0.1527314",
    "enquirer": "^2.3.6",
    "http-link-header": "^1.1.1",
    "intl-messageformat": "^10.5.3",
    "jpeg-js": "^0.4.4",
    "js-library-detector": "^6.7.0",
    "lighthouse-logger": "^2.0.2",
    "lighthouse-stack-packs": "1.12.3",
    "lodash-es": "^4.17.21",
    "lookup-closest-locale": "6.2.0",
    "open": "^8.4.0",
    "puppeteer-core": "^24.23.0",
    "robots-parser": "^3.0.1",
    "speedline-core": "^1.4.3",
    "third-party-web": "^0.27.0",
    "tldts-icann": "^7.0.17",
    "ws": "^7.0.0",
    "yargs": "^17.3.1",
    "yargs-parser": "^21.0.0"
  },
  "resolutions": {
    "puppeteer/**/devtools-protocol": "0.0.1527314",
    "puppeteer-core/**/devtools-protocol": "0.0.1527314"
  },
  "repository": "GoogleChrome/lighthouse",
  "keywords": [
    "google",
    "chrome",
    "devtools"
  ],
  "author": "Google LLC",
  "license": "Apache-2.0",
  "bugs": {
    "url": "https://github.com/GoogleChrome/lighthouse/issues"
  },
  "homepage": "https://github.com/GoogleChrome/lighthouse#readme",
  "packageManager": "yarn@1.22.22+sha512.a6b2f7906b721bba3d67d4aff083df04dad64c399707841b7acf00f6b133b7ac24255f2652fa22ae3534329dc6180534e98d17432037ff6fd140556e2bb3137e"
}
`);
        lighthouseVersion = pkg.version;
      }
    });
    init_i18n = __esm2({
      "core/lib/i18n/i18n.js"() {
        "use strict";
        init_process_global();
        init_url();
        import_lookup_closest_locale = __toESM(require_lookup_closest_locale(), 1);
        init_lighthouse_logger();
        init_format();
        init_root2();
        init_format();
        init_esm_utils();
        UIStrings = {
          /** Used to show the duration in milliseconds that something lasted. The `{timeInMs}` placeholder will be replaced with the time duration, shown in milliseconds (e.g. 63 ms) */
          ms: "{timeInMs, number, milliseconds}\xA0ms",
          /** Used to show the duration in seconds that something lasted. The {timeInMs} placeholder will be replaced with the time duration, shown in seconds (e.g. 5.2 s) */
          seconds: "{timeInMs, number, seconds}\xA0s",
          /** Label shown per-audit to show how many bytes smaller the page could be if the user implemented the suggestions. The `{wastedBytes}` placeholder will be replaced with the number of bytes, shown in kibibytes (e.g. 148 KiB) */
          displayValueByteSavings: "Est savings of {wastedBytes, number, bytes}\xA0KiB",
          /** Label shown per-audit to show how many milliseconds faster the page load could be if the user implemented the suggestions. The `{wastedMs}` placeholder will be replaced with the time duration, shown in milliseconds (e.g. 140 ms) */
          displayValueMsSavings: "Est savings of {wastedMs, number, milliseconds}\xA0ms",
          /** Label shown per-audit to show how many HTML elements did not pass the audit. The `{# elements found}` placeholder will be replaced with the number of failing HTML elements. */
          displayValueElementsFound: `{nodeCount, plural, =1 {1 element found} other {# elements found}}`,
          /** Label for a column in a data table; entries will be the URL of a web resource */
          columnURL: "URL",
          /** Label for a column in a data table; entries will be the size or quantity of some resource, e.g. the width and height dimensions of an image or the number of images in a web page. */
          columnSize: "Size",
          /** Label for a column in a data table; entries will be the file size of a web resource in kilobytes. */
          columnResourceSize: "Resource Size",
          /** Label for a column in a data table; entries will be the download size of a web resource in kilobytes. */
          columnTransferSize: "Transfer Size",
          /** Label for a column in a data table; entries will be the time to live value of the cache header on a web resource. */
          columnCacheTTL: "Cache TTL",
          /** Label for a column in a data table; entries will be the number of kilobytes the user could reduce their page by if they implemented the suggestions. */
          columnWastedBytes: "Est Savings",
          /** Label for a column in a data table; entries will be the number of milliseconds the user could reduce page load by if they implemented the suggestions. */
          columnWastedMs: "Est Savings",
          /** Label for a table column that displays how much time each row spent blocking other work on the main thread, entries will be the number of milliseconds spent. */
          columnBlockingTime: "Main-Thread Blocking Time",
          /** Label for a column in a data table; entries will be the number of milliseconds spent during a particular activity. */
          columnTimeSpent: "Time Spent",
          /** Label for a column in a data table; entries will be the location of a specific line of code in a file, in the format "line: 102". */
          columnLocation: "Location",
          /** Label for a column in a data table; entries will be types of resources loaded over the network, e.g. "Scripts", "Third-Party", "Stylesheet". */
          columnResourceType: "Resource Type",
          /** Label for a column in a data table; entries will be the number of network requests done by a webpage. */
          columnRequests: "Requests",
          /** Label for a column in a data table; entries will be the names of arbitrary objects, e.g. the name of a Javascript library, or the name of a user defined timing event. */
          columnName: "Name",
          /** Label for a column in a data table; entries will be the locations of JavaScript or CSS code, e.g. the name of a Javascript package or module. */
          columnSource: "Source",
          /** Label for a column in a data table; entries will be a representation of a DOM element. */
          columnElement: "Element",
          /** Label for a column in a data table; entries will be the number of milliseconds since the page started loading. */
          columnStartTime: "Start Time",
          /** Label for a column in a data table; entries will be the total number of milliseconds from the start time until the end time. */
          columnDuration: "Duration",
          /** Label for a column in a data table; entries will be a representation of a DOM element that did not meet certain suggestions. */
          columnFailingElem: "Failing Elements",
          /** Label for a column in a data table; entries will be a description of the table item. */
          columnDescription: "Description",
          /** Label for a row in a data table; the row represents the total number of something. */
          total: "Total",
          /** Label for a row in a data table; entries will be the total number and byte size of all resources loaded by a web page. */
          totalResourceType: "Total",
          /** Label for a row in a data table; entries will be the total number and byte size of all 'Document' resources loaded by a web page. */
          documentResourceType: "Document",
          /** Label for a row in a data table; entries will be the total number and byte size of all 'Script' resources loaded by a web page. 'Script' refers to JavaScript or other files that are executable by a browser. */
          scriptResourceType: "Script",
          /** Label for a row in a data table; entries will be the total number and byte size of all 'Stylesheet' resources loaded by a web page. 'Stylesheet' refers to CSS stylesheets. */
          stylesheetResourceType: "Stylesheet",
          /** Label for a row in a data table; entries will be the total number and byte size of all 'Image' resources loaded by a web page. */
          imageResourceType: "Image",
          /** Label for a row in a data table; entries will be the total number and byte size of all 'Media' resources loaded by a web page. 'Media' refers to audio and video files. */
          mediaResourceType: "Media",
          /** Label for a row in a data table; entries will be the total number and byte size of all 'Font' resources loaded by a web page. */
          fontResourceType: "Font",
          /** Label for a row in a data table; entries will be the total number and byte size of all resources loaded by a web page that don't fit into the categories of Document, Script, Stylesheet, Image, Media, & Font.*/
          otherResourceType: "Other",
          /** Label for a row in a data table; entries will be the total number and byte size of all third-party resources loaded by a web page. 'Third-party resources are items loaded from URLs that aren't controlled by the owner of the web page. */
          thirdPartyResourceType: "Third-party",
          /** Label used to identify a value in a table where many individual values are aggregated to a single value, for brevity. "Other resources" could also be read as "the rest of the resources". Resource refers to network resources requested by the browser. */
          otherResourcesLabel: "Other resources",
          /** The name of the metric that marks the time at which the first text or image is painted by the browser. Shown to users as the label for the numeric metric value. Ideally fits within a ~40 character limit. */
          firstContentfulPaintMetric: "First Contentful Paint",
          /** The name of the metric that marks the time at which the page is fully loaded and is able to quickly respond to user input (clicks, taps, and keypresses feel responsive). Shown to users as the label for the numeric metric value. Ideally fits within a ~40 character limit. */
          interactiveMetric: "Time to Interactive",
          /** The name of the metric that marks the time at which a majority of the content has been painted by the browser. Shown to users as the label for the numeric metric value. Ideally fits within a ~40 character limit. */
          firstMeaningfulPaintMetric: "First Meaningful Paint",
          /** The name of a metric that calculates the total duration of blocking time for a web page. Blocking times are time periods when the page would be blocked (prevented) from responding to user input (clicks, taps, and keypresses will feel slow to respond). Shown to users as the label for the numeric metric value. Ideally fits within a ~40 character limit. */
          totalBlockingTimeMetric: "Total Blocking Time",
          /** The name of the metric "Maximum Potential First Input Delay" that marks the maximum estimated time between the page receiving input (a user clicking, tapping, or typing) and the page responding. Shown to users as the label for the numeric metric value. Ideally fits within a ~40 character limit. */
          maxPotentialFIDMetric: "Max Potential First Input Delay",
          /** The name of the metric that summarizes how quickly the page looked visually complete. The name of this metric is largely abstract and can be loosely translated. Shown to users as the label for the numeric metric value. Ideally fits within a ~40 character limit. */
          speedIndexMetric: "Speed Index",
          /** The name of the metric that marks the time at which the largest text or image is painted by the browser. Shown to users as the label for the numeric metric value. Ideally fits within a ~40 character limit. */
          largestContentfulPaintMetric: "Largest Contentful Paint",
          /** The name of the metric "Cumulative Layout Shift" that indicates how much the page changes its layout while it loads. If big segments of the page shift their location during load, the Cumulative Layout Shift will be higher. Shown to users as the label for the numeric metric value. Ideally fits within a ~40 character limit. */
          cumulativeLayoutShiftMetric: "Cumulative Layout Shift",
          /** The name of the "Interaction to Next Paint" metric that measures the time between a user interaction and when the browser displays a response on screen. Shown to users as the label for the numeric metric value. Ideally fits within a ~40 character limit. */
          interactionToNextPaint: "Interaction to Next Paint",
          /** Table item value for the severity of a small, or low impact vulnerability. Part of a ranking scale in the form: low, medium, high. */
          itemSeverityLow: "Low",
          /** Table item value for the severity of a vulnerability. Part of a ranking scale in the form: low, medium, high. */
          itemSeverityMedium: "Medium",
          /** Table item value for the severity of a high impact, or dangerous vulnerability. Part of a ranking scale in the form: low, medium, high. */
          itemSeverityHigh: "High"
        };
        __name(lookupLocale, "lookupLocale");
        __name(createIcuMessageFn, "createIcuMessageFn");
        __name(isStringOrIcuMessage, "isStringOrIcuMessage");
      }
    });
    init_LanternError = __esm2({
      "node_modules/@paulirish/trace_engine/models/trace/lantern/core/LanternError.js"() {
        init_process_global();
        LanternError = class extends Error {
          static {
            __name(this, "LanternError");
          }
        };
      }
    });
    init_NetworkAnalyzer = __esm2({
      "node_modules/@paulirish/trace_engine/models/trace/lantern/core/NetworkAnalyzer.js"() {
        init_process_global();
        init_LanternError();
        UrlUtils = class {
          static {
            __name(this, "UrlUtils");
          }
          /**
           * There is fancy URL rewriting logic for the chrome://settings page that we need to work around.
           * Why? Special handling was added by Chrome team to allow a pushState transition between chrome:// pages.
           * As a result, the network URL (chrome://chrome/settings/) doesn't match the final document URL (chrome://settings/).
           */
          static rewriteChromeInternalUrl(url) {
            if (!url?.startsWith("chrome://")) {
              return url;
            }
            if (url.endsWith("/")) {
              url = url.replace(/\/$/, "");
            }
            return url.replace(/^chrome:\/\/chrome\//, "chrome://");
          }
          /**
           * Determine if url1 equals url2, ignoring URL fragments.
           */
          static equalWithExcludedFragments(url1, url2) {
            [url1, url2] = [url1, url2].map(this.rewriteChromeInternalUrl);
            try {
              const urla = new URL(url1);
              urla.hash = "";
              const urlb = new URL(url2);
              urlb.hash = "";
              return urla.href === urlb.href;
            } catch {
              return false;
            }
          }
        };
        INITIAL_CWD = 14 * 1024;
        DEFAULT_SERVER_RESPONSE_PERCENTAGE = 0.4;
        SERVER_RESPONSE_PERCENTAGE_OF_TTFB = {
          Document: 0.9,
          XHR: 0.9,
          Fetch: 0.9
        };
        NetworkAnalyzer = class _NetworkAnalyzer {
          static {
            __name(this, "NetworkAnalyzer");
          }
          static get summary() {
            return "__SUMMARY__";
          }
          static groupByOrigin(records) {
            const grouped = /* @__PURE__ */ new Map();
            records.forEach((item) => {
              const key = item.parsedURL.securityOrigin;
              const group = grouped.get(key) || [];
              group.push(item);
              grouped.set(key, group);
            });
            return grouped;
          }
          static getSummary(values) {
            values.sort((a, b) => a - b);
            let median;
            if (values.length === 0) {
              median = values[0];
            } else if (values.length % 2 === 0) {
              const a = values[Math.floor((values.length - 1) / 2)];
              const b = values[Math.floor((values.length - 1) / 2) + 1];
              median = (a + b) / 2;
            } else {
              median = values[Math.floor((values.length - 1) / 2)];
            }
            return {
              min: values[0],
              max: values[values.length - 1],
              avg: values.reduce((a, b) => a + b, 0) / values.length,
              median
            };
          }
          static summarize(values) {
            const summaryByKey = /* @__PURE__ */ new Map();
            const allEstimates = [];
            for (const [key, estimates] of values) {
              summaryByKey.set(key, _NetworkAnalyzer.getSummary(estimates));
              allEstimates.push(...estimates);
            }
            summaryByKey.set(_NetworkAnalyzer.summary, _NetworkAnalyzer.getSummary(allEstimates));
            return summaryByKey;
          }
          static estimateValueByOrigin(requests, iteratee) {
            const connectionWasReused = _NetworkAnalyzer.estimateIfConnectionWasReused(requests);
            const groupedByOrigin = _NetworkAnalyzer.groupByOrigin(requests);
            const estimates = /* @__PURE__ */ new Map();
            for (const [origin, originRequests] of groupedByOrigin.entries()) {
              let originEstimates = [];
              for (const request3 of originRequests) {
                const timing = request3.timing;
                if (!timing) {
                  continue;
                }
                const value = iteratee({
                  request: request3,
                  timing,
                  connectionReused: connectionWasReused.get(request3.requestId)
                });
                if (typeof value !== "undefined") {
                  originEstimates = originEstimates.concat(value);
                }
              }
              if (!originEstimates.length) {
                continue;
              }
              estimates.set(origin, originEstimates);
            }
            return estimates;
          }
          /**
           * Estimates the observed RTT to each origin based on how long the connection setup.
           * For h1 and h2, this could includes two estimates - one for the TCP handshake, another for
           * SSL negotiation.
           * For h3, we get only one estimate since QUIC establishes a secure connection in a
           * single handshake.
           * This is the most accurate and preferred method of measurement when the data is available.
           */
          static estimateRTTViaConnectionTiming(info) {
            const { timing, connectionReused, request: request3 } = info;
            if (connectionReused) {
              return;
            }
            const { connectStart, sslStart, sslEnd, connectEnd } = timing;
            if (connectEnd >= 0 && connectStart >= 0 && request3.protocol.startsWith("h3")) {
              return connectEnd - connectStart;
            }
            if (sslStart >= 0 && sslEnd >= 0 && sslStart !== connectStart) {
              return [connectEnd - sslStart, sslStart - connectStart];
            }
            if (connectStart >= 0 && connectEnd >= 0) {
              return connectEnd - connectStart;
            }
            return;
          }
          /**
           * Estimates the observed RTT to each origin based on how long a download took on a fresh connection.
           * NOTE: this will tend to overestimate the actual RTT quite significantly as the download can be
           * slow for other reasons as well such as bandwidth constraints.
           */
          static estimateRTTViaDownloadTiming(info) {
            const { timing, connectionReused, request: request3 } = info;
            if (connectionReused) {
              return;
            }
            if (request3.transferSize <= INITIAL_CWD) {
              return;
            }
            if (!Number.isFinite(timing.receiveHeadersEnd) || timing.receiveHeadersEnd < 0) {
              return;
            }
            const totalTime = request3.networkEndTime - request3.networkRequestTime;
            const downloadTimeAfterFirstByte = totalTime - timing.receiveHeadersEnd;
            const numberOfRoundTrips = Math.log2(request3.transferSize / INITIAL_CWD);
            if (numberOfRoundTrips > 5) {
              return;
            }
            return downloadTimeAfterFirstByte / numberOfRoundTrips;
          }
          /**
           * Estimates the observed RTT to each origin based on how long it took until Chrome could
           * start sending the actual request when a new connection was required.
           * NOTE: this will tend to overestimate the actual RTT as the request can be delayed for other
           * reasons as well such as more SSL handshakes if TLS False Start is not enabled.
           */
          static estimateRTTViaSendStartTiming(info) {
            const { timing, connectionReused, request: request3 } = info;
            if (connectionReused) {
              return;
            }
            if (!Number.isFinite(timing.sendStart) || timing.sendStart < 0) {
              return;
            }
            let roundTrips = 1;
            if (!request3.protocol.startsWith("h3")) {
              roundTrips += 1;
            }
            if (request3.parsedURL.scheme === "https") {
              roundTrips += 1;
            }
            return timing.sendStart / roundTrips;
          }
          /**
           * Estimates the observed RTT to each origin based on how long it took until Chrome received the
           * headers of the response (~TTFB).
           * NOTE: this is the most inaccurate way to estimate the RTT, but in some environments it's all
           * we have access to :(
           */
          static estimateRTTViaHeadersEndTiming(info) {
            const { timing, connectionReused, request: request3 } = info;
            if (!Number.isFinite(timing.receiveHeadersEnd) || timing.receiveHeadersEnd < 0) {
              return;
            }
            if (!request3.resourceType) {
              return;
            }
            const serverResponseTimePercentage = SERVER_RESPONSE_PERCENTAGE_OF_TTFB[request3.resourceType] || DEFAULT_SERVER_RESPONSE_PERCENTAGE;
            const estimatedServerResponseTime = timing.receiveHeadersEnd * serverResponseTimePercentage;
            let roundTrips = 1;
            if (!connectionReused) {
              roundTrips += 1;
              if (!request3.protocol.startsWith("h3")) {
                roundTrips += 1;
              }
              if (request3.parsedURL.scheme === "https") {
                roundTrips += 1;
              }
            }
            return Math.max((timing.receiveHeadersEnd - estimatedServerResponseTime) / roundTrips, 3);
          }
          /**
           * Given the RTT to each origin, estimates the observed server response times.
           */
          static estimateResponseTimeByOrigin(records, rttByOrigin) {
            return _NetworkAnalyzer.estimateValueByOrigin(records, ({ request: request3, timing }) => {
              if (request3.serverResponseTime !== void 0) {
                return request3.serverResponseTime;
              }
              if (!Number.isFinite(timing.receiveHeadersEnd) || timing.receiveHeadersEnd < 0) {
                return;
              }
              if (!Number.isFinite(timing.sendEnd) || timing.sendEnd < 0) {
                return;
              }
              const ttfb = timing.receiveHeadersEnd - timing.sendEnd;
              const origin = request3.parsedURL.securityOrigin;
              const rtt = rttByOrigin.get(origin) || rttByOrigin.get(_NetworkAnalyzer.summary) || 0;
              return Math.max(ttfb - rtt, 0);
            });
          }
          static canTrustConnectionInformation(requests) {
            const connectionIdWasStarted = /* @__PURE__ */ new Map();
            for (const request3 of requests) {
              const started = connectionIdWasStarted.get(request3.connectionId) || !request3.connectionReused;
              connectionIdWasStarted.set(request3.connectionId, started);
            }
            if (connectionIdWasStarted.size <= 1) {
              return false;
            }
            return Array.from(connectionIdWasStarted.values()).every((started) => started);
          }
          /**
           * Returns a map of requestId -> connectionReused, estimating the information if the information
           * available in the records themselves appears untrustworthy.
           */
          static estimateIfConnectionWasReused(records, options2) {
            const { forceCoarseEstimates = false } = options2 || {};
            if (!forceCoarseEstimates && _NetworkAnalyzer.canTrustConnectionInformation(records)) {
              return new Map(records.map((request3) => [request3.requestId, Boolean(request3.connectionReused)]));
            }
            const connectionWasReused = /* @__PURE__ */ new Map();
            const groupedByOrigin = _NetworkAnalyzer.groupByOrigin(records);
            for (const originRecords of groupedByOrigin.values()) {
              const earliestReusePossible = originRecords.map((request3) => request3.networkEndTime).reduce((a, b) => Math.min(a, b), Infinity);
              for (const request3 of originRecords) {
                connectionWasReused.set(request3.requestId, request3.networkRequestTime >= earliestReusePossible || request3.protocol === "h2");
              }
              const firstRecord = originRecords.reduce((a, b) => {
                return a.networkRequestTime > b.networkRequestTime ? b : a;
              });
              connectionWasReused.set(firstRecord.requestId, false);
            }
            return connectionWasReused;
          }
          /**
           * Estimates the RTT to each origin by examining observed network timing information.
           * Attempts to use the most accurate information first and falls back to coarser estimates when it
           * is unavailable.
           */
          static estimateRTTByOrigin(records, options2) {
            const {
              forceCoarseEstimates = false,
              // coarse estimates include lots of extra time and noise
              // multiply by some factor to deflate the estimates a bit.
              coarseEstimateMultiplier = 0.3,
              useDownloadEstimates = true,
              useSendStartEstimates = true,
              useHeadersEndEstimates = true
            } = options2 || {};
            const connectionWasReused = _NetworkAnalyzer.estimateIfConnectionWasReused(records);
            const groupedByOrigin = _NetworkAnalyzer.groupByOrigin(records);
            const estimatesByOrigin = /* @__PURE__ */ new Map();
            for (const [origin, originRequests] of groupedByOrigin.entries()) {
              let collectEstimates = function(estimator, multiplier = 1) {
                for (const request3 of originRequests) {
                  const timing = request3.timing;
                  if (!timing || !request3.transferSize) {
                    continue;
                  }
                  const estimates = estimator({
                    request: request3,
                    timing,
                    connectionReused: connectionWasReused.get(request3.requestId)
                  });
                  if (estimates === void 0) {
                    continue;
                  }
                  if (!Array.isArray(estimates)) {
                    originEstimates.push(estimates * multiplier);
                  } else {
                    originEstimates.push(...estimates.map((e) => e * multiplier));
                  }
                }
              };
              __name(collectEstimates, "collectEstimates");
              const originEstimates = [];
              if (!forceCoarseEstimates) {
                collectEstimates(this.estimateRTTViaConnectionTiming);
              }
              if (!originEstimates.length) {
                if (useDownloadEstimates) {
                  collectEstimates(this.estimateRTTViaDownloadTiming, coarseEstimateMultiplier);
                }
                if (useSendStartEstimates) {
                  collectEstimates(this.estimateRTTViaSendStartTiming, coarseEstimateMultiplier);
                }
                if (useHeadersEndEstimates) {
                  collectEstimates(this.estimateRTTViaHeadersEndTiming, coarseEstimateMultiplier);
                }
              }
              if (originEstimates.length) {
                estimatesByOrigin.set(origin, originEstimates);
              }
            }
            if (!estimatesByOrigin.size) {
              throw new LanternError("No timing information available");
            }
            return _NetworkAnalyzer.summarize(estimatesByOrigin);
          }
          /**
           * Estimates the server response time of each origin. RTT times can be passed in or will be
           * estimated automatically if not provided.
           */
          static estimateServerResponseTimeByOrigin(records, options2) {
            let rttByOrigin = options2?.rttByOrigin;
            if (!rttByOrigin) {
              rttByOrigin = /* @__PURE__ */ new Map();
              const rttSummaryByOrigin = _NetworkAnalyzer.estimateRTTByOrigin(records, options2);
              for (const [origin, summary] of rttSummaryByOrigin.entries()) {
                rttByOrigin.set(origin, summary.min);
              }
            }
            const estimatesByOrigin = _NetworkAnalyzer.estimateResponseTimeByOrigin(records, rttByOrigin);
            return _NetworkAnalyzer.summarize(estimatesByOrigin);
          }
          /**
           * Computes the average throughput for the given requests in bits/second.
           * Excludes data URI, failed or otherwise incomplete, and cached requests.
           * Returns null if there were no analyzable network requests.
           */
          static estimateThroughput(records) {
            let totalBytes = 0;
            const timeBoundaries = records.reduce((boundaries, request3) => {
              const scheme = request3.parsedURL?.scheme;
              if (scheme === "data" || request3.failed || !request3.finished || request3.statusCode > 300 || !request3.transferSize) {
                return boundaries;
              }
              totalBytes += request3.transferSize;
              boundaries.push({ time: request3.responseHeadersEndTime / 1e3, isStart: true });
              boundaries.push({ time: request3.networkEndTime / 1e3, isStart: false });
              return boundaries;
            }, []).sort((a, b) => a.time - b.time);
            if (!timeBoundaries.length) {
              return null;
            }
            let inflight = 0;
            let currentStart = 0;
            let totalDuration = 0;
            timeBoundaries.forEach((boundary) => {
              if (boundary.isStart) {
                if (inflight === 0) {
                  currentStart = boundary.time;
                }
                inflight++;
              } else {
                inflight--;
                if (inflight === 0) {
                  totalDuration += boundary.time - currentStart;
                }
              }
            });
            return totalBytes * 8 / totalDuration;
          }
          static computeRTTAndServerResponseTime(records) {
            const rttByOrigin = /* @__PURE__ */ new Map();
            for (const [origin, summary] of _NetworkAnalyzer.estimateRTTByOrigin(records).entries()) {
              rttByOrigin.set(origin, summary.min);
            }
            const minimumRtt = Math.min(...Array.from(rttByOrigin.values()));
            const responseTimeSummaries = _NetworkAnalyzer.estimateServerResponseTimeByOrigin(records, {
              rttByOrigin
            });
            const additionalRttByOrigin = /* @__PURE__ */ new Map();
            const serverResponseTimeByOrigin = /* @__PURE__ */ new Map();
            for (const [origin, summary] of responseTimeSummaries.entries()) {
              const rttForOrigin = rttByOrigin.get(origin) || minimumRtt;
              additionalRttByOrigin.set(origin, rttForOrigin - minimumRtt);
              serverResponseTimeByOrigin.set(origin, summary.median);
            }
            return {
              rtt: minimumRtt,
              additionalRttByOrigin,
              serverResponseTimeByOrigin
            };
          }
          static analyze(records) {
            const throughput = _NetworkAnalyzer.estimateThroughput(records);
            if (throughput === null) {
              return null;
            }
            return {
              throughput,
              ..._NetworkAnalyzer.computeRTTAndServerResponseTime(records)
            };
          }
          static findResourceForUrl(records, resourceUrl) {
            return records.find((request3) => resourceUrl.startsWith(request3.url) && UrlUtils.equalWithExcludedFragments(request3.url, resourceUrl));
          }
          static findLastDocumentForUrl(records, resourceUrl) {
            const matchingRequests = records.filter((request3) => request3.resourceType === "Document" && !request3.failed && // Note: `request.url` should never have a fragment, else this optimization gives wrong results.
            resourceUrl.startsWith(request3.url) && UrlUtils.equalWithExcludedFragments(request3.url, resourceUrl));
            return matchingRequests[matchingRequests.length - 1];
          }
          /**
           * Resolves redirect chain given a main document.
           * See: {@link NetworkAnalyzer.findLastDocumentForUrl} for how to retrieve main document.
           */
          static resolveRedirects(request3) {
            while (request3.redirectDestination) {
              request3 = request3.redirectDestination;
            }
            return request3;
          }
        };
      }
    });
    core_exports = {};
    __export2(core_exports, {
      LanternError: () => LanternError,
      NetworkAnalyzer: () => NetworkAnalyzer
    });
    init_core = __esm2({
      "node_modules/@paulirish/trace_engine/models/trace/lantern/core/core.js"() {
        init_process_global();
        init_LanternError();
        init_NetworkAnalyzer();
      }
    });
    init_BaseNode = __esm2({
      "node_modules/@paulirish/trace_engine/models/trace/lantern/graph/BaseNode.js"() {
        init_process_global();
        init_core();
        BaseNode = class _BaseNode {
          static {
            __name(this, "BaseNode");
          }
          static types = {
            NETWORK: "network",
            CPU: "cpu"
          };
          _id;
          _isMainDocument;
          dependents;
          dependencies;
          constructor(id2) {
            this._id = id2;
            this._isMainDocument = false;
            this.dependents = [];
            this.dependencies = [];
          }
          get id() {
            return this._id;
          }
          get type() {
            throw new LanternError("Unimplemented");
          }
          /**
           * In microseconds
           */
          get startTime() {
            throw new LanternError("Unimplemented");
          }
          /**
           * In microseconds
           */
          get endTime() {
            throw new LanternError("Unimplemented");
          }
          setIsMainDocument(value) {
            this._isMainDocument = value;
          }
          isMainDocument() {
            return this._isMainDocument;
          }
          getDependents() {
            return this.dependents.slice();
          }
          getNumberOfDependents() {
            return this.dependents.length;
          }
          getDependencies() {
            return this.dependencies.slice();
          }
          getNumberOfDependencies() {
            return this.dependencies.length;
          }
          getRootNode() {
            let rootNode = this;
            while (rootNode.dependencies.length) {
              rootNode = rootNode.dependencies[0];
            }
            return rootNode;
          }
          addDependent(node2) {
            node2.addDependency(this);
          }
          addDependency(node2) {
            if (node2 === this) {
              throw new LanternError("Cannot add dependency on itself");
            }
            if (this.dependencies.includes(node2)) {
              return;
            }
            node2.dependents.push(this);
            this.dependencies.push(node2);
          }
          removeDependent(node2) {
            node2.removeDependency(this);
          }
          removeDependency(node2) {
            if (!this.dependencies.includes(node2)) {
              return;
            }
            const thisIndex = node2.dependents.indexOf(this);
            node2.dependents.splice(thisIndex, 1);
            this.dependencies.splice(this.dependencies.indexOf(node2), 1);
          }
          // Unused in devtools, but used in LH.
          removeAllDependencies() {
            for (const node2 of this.dependencies.slice()) {
              this.removeDependency(node2);
            }
          }
          /**
           * Computes whether the given node is anywhere in the dependency graph of this node.
           * While this method can prevent cycles, it walks the graph and should be used sparingly.
           * Nodes are always considered dependent on themselves for the purposes of cycle detection.
           */
          isDependentOn(node2) {
            let isDependentOnNode = false;
            this.traverse((currentNode) => {
              if (isDependentOnNode) {
                return;
              }
              isDependentOnNode = currentNode === node2;
            }, (currentNode) => {
              if (isDependentOnNode) {
                return [];
              }
              return currentNode.getDependencies();
            });
            return isDependentOnNode;
          }
          /**
           * Clones the node's information without adding any dependencies/dependents.
           */
          cloneWithoutRelationships() {
            const node2 = new _BaseNode(this.id);
            node2.setIsMainDocument(this._isMainDocument);
            return node2;
          }
          /**
           * Clones the entire graph connected to this node filtered by the optional predicate. If a node is
           * included by the predicate, all nodes along the paths between the node and the root will be included. If the
           * node this was called on is not included in the resulting filtered graph, the method will throw.
           *
           * This does not clone NetworkNode's `record` or `rawRecord` fields. It may be reasonable to clone the former,
           * to assist in graph construction, but the latter should never be cloned as one constraint of Lantern is that
           * the underlying data records are accessible for plain object reference equality checks.
           */
          cloneWithRelationships(predicate) {
            const rootNode = this.getRootNode();
            const idsToIncludedClones = /* @__PURE__ */ new Map();
            rootNode.traverse((node2) => {
              if (idsToIncludedClones.has(node2.id)) {
                return;
              }
              if (predicate === void 0) {
                idsToIncludedClones.set(node2.id, node2.cloneWithoutRelationships());
                return;
              }
              if (predicate(node2)) {
                node2.traverse(
                  (node22) => idsToIncludedClones.set(node22.id, node22.cloneWithoutRelationships()),
                  // Dependencies already cloned have already cloned ancestors, so no need to visit again.
                  (node22) => node22.dependencies.filter((parent) => !idsToIncludedClones.has(parent.id))
                );
              }
            });
            rootNode.traverse((originalNode) => {
              const clonedNode = idsToIncludedClones.get(originalNode.id);
              if (!clonedNode) {
                return;
              }
              for (const dependency of originalNode.dependencies) {
                const clonedDependency = idsToIncludedClones.get(dependency.id);
                if (!clonedDependency) {
                  throw new LanternError("Dependency somehow not cloned");
                }
                clonedNode.addDependency(clonedDependency);
              }
            });
            const clonedThisNode = idsToIncludedClones.get(this.id);
            if (!clonedThisNode) {
              throw new LanternError("Cloned graph missing node");
            }
            return clonedThisNode;
          }
          /**
           * Traverses all connected nodes in BFS order, calling `callback` exactly once
           * on each. `traversalPath` is the shortest (though not necessarily unique)
           * path from `node` to the root of the iteration.
           *
           * The `getNextNodes` function takes a visited node and returns which nodes to
           * visit next. It defaults to returning the node's dependents.
           */
          traverse(callback, getNextNodes) {
            for (const { node: node2, traversalPath } of this.traverseGenerator(getNextNodes)) {
              callback(node2, traversalPath);
            }
          }
          /**
           * @see BaseNode.traverse
           */
          // clang-format off
          *traverseGenerator(getNextNodes) {
            if (!getNextNodes) {
              getNextNodes = /* @__PURE__ */ __name((node2) => node2.getDependents(), "getNextNodes");
            }
            const queue = [[this]];
            const visited = /* @__PURE__ */ new Set([this.id]);
            while (queue.length) {
              const traversalPath = queue.shift();
              const node2 = traversalPath[0];
              yield { node: node2, traversalPath };
              for (const nextNode of getNextNodes(node2)) {
                if (visited.has(nextNode.id)) {
                  continue;
                }
                visited.add(nextNode.id);
                queue.push([nextNode, ...traversalPath]);
              }
            }
          }
          /**
           * If the given node has a cycle, returns a path representing that cycle.
           * Else returns null.
           *
           * Does a DFS on in its dependent graph.
           */
          static findCycle(node2, direction = "both") {
            if (direction === "both") {
              return _BaseNode.findCycle(node2, "dependents") || _BaseNode.findCycle(node2, "dependencies");
            }
            const visited = /* @__PURE__ */ new Set();
            const currentPath = [];
            const toVisit = [node2];
            const depthAdded = /* @__PURE__ */ new Map([[node2, 0]]);
            while (toVisit.length) {
              const currentNode = toVisit.pop();
              if (currentPath.includes(currentNode)) {
                return currentPath;
              }
              if (visited.has(currentNode)) {
                continue;
              }
              while (currentPath.length > depthAdded.get(currentNode)) {
                currentPath.pop();
              }
              visited.add(currentNode);
              currentPath.push(currentNode);
              const nodesToExplore = direction === "dependents" ? currentNode.dependents : currentNode.dependencies;
              for (const nextNode of nodesToExplore) {
                if (toVisit.includes(nextNode)) {
                  continue;
                }
                toVisit.push(nextNode);
                depthAdded.set(nextNode, currentPath.length);
              }
            }
            return null;
          }
          canDependOn(node2) {
            return node2.startTime <= this.startTime;
          }
        };
      }
    });
    init_CPUNode = __esm2({
      "node_modules/@paulirish/trace_engine/models/trace/lantern/graph/CPUNode.js"() {
        init_process_global();
        init_BaseNode();
        CPUNode = class _CPUNode extends BaseNode {
          static {
            __name(this, "CPUNode");
          }
          _event;
          _childEvents;
          correctedEndTs;
          constructor(parentEvent, childEvents = [], correctedEndTs) {
            const nodeId = `${parentEvent.tid}.${parentEvent.ts}`;
            super(nodeId);
            this._event = parentEvent;
            this._childEvents = childEvents;
            this.correctedEndTs = correctedEndTs;
          }
          get type() {
            return BaseNode.types.CPU;
          }
          get startTime() {
            return this._event.ts;
          }
          get endTime() {
            if (this.correctedEndTs) {
              return this.correctedEndTs;
            }
            return this._event.ts + this._event.dur;
          }
          get duration() {
            return this.endTime - this.startTime;
          }
          get event() {
            return this._event;
          }
          get childEvents() {
            return this._childEvents;
          }
          /**
           * Returns true if this node contains a Layout task.
           */
          didPerformLayout() {
            return this._childEvents.some((evt) => evt.name === "Layout");
          }
          /**
           * Returns the script URLs that had their EvaluateScript events occur in this task.
           */
          getEvaluateScriptURLs() {
            const urls = /* @__PURE__ */ new Set();
            for (const event of this._childEvents) {
              if (event.name !== "EvaluateScript") {
                continue;
              }
              if (!event.args.data?.url) {
                continue;
              }
              urls.add(event.args.data.url);
            }
            return urls;
          }
          cloneWithoutRelationships() {
            return new _CPUNode(this._event, this._childEvents, this.correctedEndTs);
          }
        };
      }
    });
    init_NetworkNode = __esm2({
      "node_modules/@paulirish/trace_engine/models/trace/lantern/graph/NetworkNode.js"() {
        init_process_global();
        init_BaseNode();
        NON_NETWORK_SCHEMES = [
          "blob",
          // @see https://developer.mozilla.org/en-US/docs/Web/API/URL/createObjectURL
          "data",
          // @see https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/Data_URIs
          "intent",
          // @see https://developer.chrome.com/docs/multidevice/android/intents/
          "file",
          // @see https://en.wikipedia.org/wiki/File_URI_scheme
          "filesystem",
          // @see https://developer.mozilla.org/en-US/docs/Web/API/FileSystem
          "chrome-extension"
        ];
        __name(isNonNetworkProtocol, "isNonNetworkProtocol");
        NetworkNode = class _NetworkNode extends BaseNode {
          static {
            __name(this, "NetworkNode");
          }
          _request;
          constructor(networkRequest) {
            super(networkRequest.requestId);
            this._request = networkRequest;
          }
          get type() {
            return BaseNode.types.NETWORK;
          }
          get startTime() {
            return this._request.rendererStartTime * 1e3;
          }
          get endTime() {
            return this._request.networkEndTime * 1e3;
          }
          get rawRequest() {
            return this._request.rawRequest;
          }
          get request() {
            return this._request;
          }
          get initiatorType() {
            return this._request.initiator.type;
          }
          get fromDiskCache() {
            return Boolean(this._request.fromDiskCache);
          }
          get isNonNetworkProtocol() {
            return isNonNetworkProtocol(this.request.protocol) || // But `protocol` can fail to be populated if the request fails, so fallback to scheme.
            isNonNetworkProtocol(this.request.parsedURL.scheme);
          }
          /**
           * Returns whether this network request can be downloaded without a TCP connection.
           * During simulation we treat data coming in over a network connection separately from on-device data.
           */
          get isConnectionless() {
            return this.fromDiskCache || this.isNonNetworkProtocol;
          }
          hasRenderBlockingPriority() {
            const priority = this._request.priority;
            const isScript = this._request.resourceType === "Script";
            const isDocument = this._request.resourceType === "Document";
            const isBlockingScript = priority === "High" && isScript;
            const isBlockingHtmlImport = priority === "High" && isDocument;
            return priority === "VeryHigh" || isBlockingScript || isBlockingHtmlImport;
          }
          cloneWithoutRelationships() {
            const node2 = new _NetworkNode(this._request);
            node2.setIsMainDocument(this._isMainDocument);
            return node2;
          }
        };
      }
    });
    init_PageDependencyGraph = __esm2({
      "node_modules/@paulirish/trace_engine/models/trace/lantern/graph/PageDependencyGraph.js"() {
        init_process_global();
        init_core();
        init_CPUNode();
        init_NetworkNode();
        SCHEDULABLE_TASK_TITLE_LH = "RunTask";
        SCHEDULABLE_TASK_TITLE_ALT1 = "ThreadControllerImpl::RunTask";
        SCHEDULABLE_TASK_TITLE_ALT2 = "ThreadControllerImpl::DoWork";
        SCHEDULABLE_TASK_TITLE_ALT3 = "TaskQueueManager::ProcessTaskFromWorkQueue";
        SIGNIFICANT_DUR_THRESHOLD_MS = 10;
        IGNORED_MIME_TYPES_REGEX = /^video/;
        PageDependencyGraph = class _PageDependencyGraph {
          static {
            __name(this, "PageDependencyGraph");
          }
          static getNetworkInitiators(request3) {
            if (!request3.initiator) {
              return [];
            }
            if (request3.initiator.url) {
              return [request3.initiator.url];
            }
            if (request3.initiator.type === "script") {
              const scriptURLs = /* @__PURE__ */ new Set();
              let stack = request3.initiator.stack;
              while (stack) {
                const callFrames = stack.callFrames || [];
                for (const frame of callFrames) {
                  if (frame.url) {
                    scriptURLs.add(frame.url);
                  }
                }
                stack = stack.parent;
              }
              return Array.from(scriptURLs);
            }
            return [];
          }
          static getNetworkNodeOutput(networkRequests) {
            const nodes = [];
            const idToNodeMap = /* @__PURE__ */ new Map();
            const urlToNodeMap = /* @__PURE__ */ new Map();
            const frameIdToNodeMap = /* @__PURE__ */ new Map();
            networkRequests.forEach((request3) => {
              if (IGNORED_MIME_TYPES_REGEX.test(request3.mimeType)) {
                return;
              }
              if (request3.fromWorker) {
                return;
              }
              while (idToNodeMap.has(request3.requestId)) {
                request3.requestId += ":duplicate";
              }
              const node2 = new NetworkNode(request3);
              nodes.push(node2);
              const urlList = urlToNodeMap.get(request3.url) || [];
              urlList.push(node2);
              idToNodeMap.set(request3.requestId, node2);
              urlToNodeMap.set(request3.url, urlList);
              if (request3.frameId && request3.resourceType === "Document" && request3.documentURL === request3.url) {
                const value = frameIdToNodeMap.has(request3.frameId) ? null : node2;
                frameIdToNodeMap.set(request3.frameId, value);
              }
            });
            return { nodes, idToNodeMap, urlToNodeMap, frameIdToNodeMap };
          }
          static isScheduleableTask(evt) {
            return evt.name === SCHEDULABLE_TASK_TITLE_LH || evt.name === SCHEDULABLE_TASK_TITLE_ALT1 || evt.name === SCHEDULABLE_TASK_TITLE_ALT2 || evt.name === SCHEDULABLE_TASK_TITLE_ALT3;
          }
          /**
           * There should *always* be at least one top level event, having 0 typically means something is
           * drastically wrong with the trace and we should just give up early and loudly.
           */
          static assertHasToplevelEvents(events) {
            const hasToplevelTask = events.some(this.isScheduleableTask);
            if (!hasToplevelTask) {
              throw new LanternError("Could not find any top level events");
            }
          }
          static getCPUNodes(mainThreadEvents) {
            const nodes = [];
            let i = 0;
            _PageDependencyGraph.assertHasToplevelEvents(mainThreadEvents);
            while (i < mainThreadEvents.length) {
              const evt = mainThreadEvents[i];
              i++;
              if (!_PageDependencyGraph.isScheduleableTask(evt) || !evt.dur) {
                continue;
              }
              let correctedEndTs = void 0;
              const children = [];
              for (const endTime = evt.ts + evt.dur; i < mainThreadEvents.length && mainThreadEvents[i].ts < endTime; i++) {
                const event = mainThreadEvents[i];
                if (_PageDependencyGraph.isScheduleableTask(event) && event.dur) {
                  correctedEndTs = event.ts - 1;
                  break;
                }
                children.push(event);
              }
              nodes.push(new CPUNode(evt, children, correctedEndTs));
            }
            return nodes;
          }
          static linkNetworkNodes(rootNode, networkNodeOutput) {
            networkNodeOutput.nodes.forEach((node2) => {
              const directInitiatorRequest = node2.request.initiatorRequest || rootNode.request;
              const directInitiatorNode = networkNodeOutput.idToNodeMap.get(directInitiatorRequest.requestId) || rootNode;
              const canDependOnInitiator = !directInitiatorNode.isDependentOn(node2) && node2.canDependOn(directInitiatorNode);
              const initiators = _PageDependencyGraph.getNetworkInitiators(node2.request);
              if (initiators.length) {
                initiators.forEach((initiator) => {
                  const parentCandidates = networkNodeOutput.urlToNodeMap.get(initiator) || [];
                  if (parentCandidates.length === 1 && parentCandidates[0].startTime <= node2.startTime && !parentCandidates[0].isDependentOn(node2)) {
                    node2.addDependency(parentCandidates[0]);
                  } else if (canDependOnInitiator) {
                    directInitiatorNode.addDependent(node2);
                  }
                });
              } else if (canDependOnInitiator) {
                directInitiatorNode.addDependent(node2);
              }
              if (node2 !== rootNode && node2.getDependencies().length === 0 && node2.canDependOn(rootNode)) {
                node2.addDependency(rootNode);
              }
              if (!node2.request.redirects) {
                return;
              }
              const redirects = [...node2.request.redirects, node2.request];
              for (let i = 1; i < redirects.length; i++) {
                const redirectNode = networkNodeOutput.idToNodeMap.get(redirects[i - 1].requestId);
                const actualNode = networkNodeOutput.idToNodeMap.get(redirects[i].requestId);
                if (actualNode && redirectNode) {
                  actualNode.addDependency(redirectNode);
                }
              }
            });
          }
          static linkCPUNodes(rootNode, networkNodeOutput, cpuNodes) {
            const linkableResourceTypes = /* @__PURE__ */ new Set([
              "XHR",
              "Fetch",
              "Script"
            ]);
            function addDependentNetworkRequest(cpuNode, reqId) {
              const networkNode = networkNodeOutput.idToNodeMap.get(reqId);
              if (!networkNode || // Ignore all network nodes that started before this CPU task started
              // A network request that started earlier could not possibly have been started by this task
              networkNode.startTime <= cpuNode.startTime) {
                return;
              }
              const { request: request3 } = networkNode;
              const resourceType = request3.resourceType || request3.redirectDestination?.resourceType;
              if (!linkableResourceTypes.has(resourceType)) {
                return;
              }
              cpuNode.addDependent(networkNode);
            }
            __name(addDependentNetworkRequest, "addDependentNetworkRequest");
            function addDependencyOnFrame(cpuNode, frameId) {
              if (!frameId) {
                return;
              }
              const networkNode = networkNodeOutput.frameIdToNodeMap.get(frameId);
              if (!networkNode) {
                return;
              }
              if (networkNode.startTime >= cpuNode.startTime) {
                return;
              }
              cpuNode.addDependency(networkNode);
            }
            __name(addDependencyOnFrame, "addDependencyOnFrame");
            function addDependencyOnUrl(cpuNode, url) {
              if (!url) {
                return;
              }
              const minimumAllowableTimeSinceNetworkNodeEnd = -100 * 1e3;
              const candidates = networkNodeOutput.urlToNodeMap.get(url) || [];
              let minCandidate = null;
              let minDistance = Infinity;
              for (const candidate of candidates) {
                if (cpuNode.startTime <= candidate.startTime) {
                  return;
                }
                const distance = cpuNode.startTime - candidate.endTime;
                if (distance >= minimumAllowableTimeSinceNetworkNodeEnd && distance < minDistance) {
                  minCandidate = candidate;
                  minDistance = distance;
                }
              }
              if (!minCandidate) {
                return;
              }
              cpuNode.addDependency(minCandidate);
            }
            __name(addDependencyOnUrl, "addDependencyOnUrl");
            const timers = /* @__PURE__ */ new Map();
            for (const node2 of cpuNodes) {
              for (const evt of node2.childEvents) {
                if (!evt.args.data) {
                  continue;
                }
                const argsUrl = evt.args.data.url;
                const stackTraceUrls = (evt.args.data.stackTrace || []).map((l) => l.url).filter(Boolean);
                switch (evt.name) {
                  case "TimerInstall":
                    timers.set(evt.args.data.timerId, node2);
                    stackTraceUrls.forEach((url) => addDependencyOnUrl(node2, url));
                    break;
                  case "TimerFire": {
                    const installer = timers.get(evt.args.data.timerId);
                    if (!installer || installer.endTime > node2.startTime) {
                      break;
                    }
                    installer.addDependent(node2);
                    break;
                  }
                  case "InvalidateLayout":
                  case "ScheduleStyleRecalculation":
                    addDependencyOnFrame(node2, evt.args.data.frame);
                    stackTraceUrls.forEach((url) => addDependencyOnUrl(node2, url));
                    break;
                  case "EvaluateScript":
                    addDependencyOnFrame(node2, evt.args.data.frame);
                    addDependencyOnUrl(node2, argsUrl);
                    stackTraceUrls.forEach((url) => addDependencyOnUrl(node2, url));
                    break;
                  case "XHRReadyStateChange":
                    if (evt.args.data.readyState !== 4) {
                      break;
                    }
                    addDependencyOnUrl(node2, argsUrl);
                    stackTraceUrls.forEach((url) => addDependencyOnUrl(node2, url));
                    break;
                  case "FunctionCall":
                  case "v8.compile":
                    addDependencyOnFrame(node2, evt.args.data.frame);
                    addDependencyOnUrl(node2, argsUrl);
                    break;
                  case "ParseAuthorStyleSheet":
                    addDependencyOnFrame(node2, evt.args.data.frame);
                    addDependencyOnUrl(node2, evt.args.data.styleSheetUrl);
                    break;
                  case "ResourceSendRequest":
                    addDependencyOnFrame(node2, evt.args.data.frame);
                    addDependentNetworkRequest(node2, evt.args.data.requestId);
                    stackTraceUrls.forEach((url) => addDependencyOnUrl(node2, url));
                    break;
                }
              }
              if (node2.getNumberOfDependencies() === 0 && node2.canDependOn(rootNode)) {
                node2.addDependency(rootNode);
              }
            }
            const minimumEvtDur = SIGNIFICANT_DUR_THRESHOLD_MS * 1e3;
            let foundFirstLayout = false;
            let foundFirstPaint = false;
            let foundFirstParse = false;
            for (const node2 of cpuNodes) {
              let isFirst = false;
              if (!foundFirstLayout && node2.childEvents.some((evt) => evt.name === "Layout")) {
                isFirst = foundFirstLayout = true;
              }
              if (!foundFirstPaint && node2.childEvents.some((evt) => evt.name === "Paint")) {
                isFirst = foundFirstPaint = true;
              }
              if (!foundFirstParse && node2.childEvents.some((evt) => evt.name === "ParseHTML")) {
                isFirst = foundFirstParse = true;
              }
              if (isFirst || node2.duration >= minimumEvtDur) {
                continue;
              }
              if (node2.getNumberOfDependencies() === 1 || node2.getNumberOfDependents() <= 1) {
                _PageDependencyGraph.pruneNode(node2);
              }
            }
          }
          /**
           * Removes the given node from the graph, but retains all paths between its dependencies and
           * dependents.
           */
          static pruneNode(node2) {
            const dependencies2 = node2.getDependencies();
            const dependents = node2.getDependents();
            for (const dependency of dependencies2) {
              node2.removeDependency(dependency);
              for (const dependent of dependents) {
                dependency.addDependent(dependent);
              }
            }
            for (const dependent of dependents) {
              node2.removeDependent(dependent);
            }
          }
          /**
           * TODO: remove when CDT backend in Lighthouse is gone. Until then, this is a useful debugging tool
           * to find delta between using CDP or the trace to create the network requests.
           *
           * When a test fails using the trace backend, I enabled this debug method and copied the network
           * requests when CDP was used, then when trace is used, and diff'd them. This method helped
           * remove non-logical differences from the comparison (order of properties, slight rounding
           * discrepancies, removing object cycles, etc).
           *
           * When using for a unit test, make sure to do `.only` so you are getting what you expect.
           */
          static debugNormalizeRequests(lanternRequests) {
            for (const request3 of lanternRequests) {
              request3.rendererStartTime = Math.round(request3.rendererStartTime * 1e3) / 1e3;
              request3.networkRequestTime = Math.round(request3.networkRequestTime * 1e3) / 1e3;
              request3.responseHeadersEndTime = Math.round(request3.responseHeadersEndTime * 1e3) / 1e3;
              request3.networkEndTime = Math.round(request3.networkEndTime * 1e3) / 1e3;
            }
            for (const r of lanternRequests) {
              delete r.rawRequest;
              if (r.initiatorRequest) {
                r.initiatorRequest = { id: r.initiatorRequest.requestId };
              }
              if (r.redirectDestination) {
                r.redirectDestination = { id: r.redirectDestination.requestId };
              }
              if (r.redirectSource) {
                r.redirectSource = { id: r.redirectSource.requestId };
              }
              if (r.redirects) {
                r.redirects = r.redirects.map((r2) => r2.requestId);
              }
            }
            const requests = lanternRequests.map((r) => ({
              requestId: r.requestId,
              connectionId: r.connectionId,
              connectionReused: r.connectionReused,
              url: r.url,
              protocol: r.protocol,
              parsedURL: r.parsedURL,
              documentURL: r.documentURL,
              rendererStartTime: r.rendererStartTime,
              networkRequestTime: r.networkRequestTime,
              responseHeadersEndTime: r.responseHeadersEndTime,
              networkEndTime: r.networkEndTime,
              transferSize: r.transferSize,
              resourceSize: r.resourceSize,
              fromDiskCache: r.fromDiskCache,
              fromMemoryCache: r.fromMemoryCache,
              finished: r.finished,
              statusCode: r.statusCode,
              redirectSource: r.redirectSource,
              redirectDestination: r.redirectDestination,
              redirects: r.redirects,
              failed: r.failed,
              initiator: r.initiator,
              timing: r.timing ? {
                requestTime: r.timing.requestTime,
                proxyStart: r.timing.proxyStart,
                proxyEnd: r.timing.proxyEnd,
                dnsStart: r.timing.dnsStart,
                dnsEnd: r.timing.dnsEnd,
                connectStart: r.timing.connectStart,
                connectEnd: r.timing.connectEnd,
                sslStart: r.timing.sslStart,
                sslEnd: r.timing.sslEnd,
                workerStart: r.timing.workerStart,
                workerReady: r.timing.workerReady,
                workerFetchStart: r.timing.workerFetchStart,
                workerRespondWithSettled: r.timing.workerRespondWithSettled,
                sendStart: r.timing.sendStart,
                sendEnd: r.timing.sendEnd,
                pushStart: r.timing.pushStart,
                pushEnd: r.timing.pushEnd,
                receiveHeadersStart: r.timing.receiveHeadersStart,
                receiveHeadersEnd: r.timing.receiveHeadersEnd
              } : r.timing,
              resourceType: r.resourceType,
              mimeType: r.mimeType,
              priority: r.priority,
              initiatorRequest: r.initiatorRequest,
              frameId: r.frameId,
              fromWorker: r.fromWorker,
              isLinkPreload: r.isLinkPreload,
              serverResponseTime: r.serverResponseTime
            })).filter((r) => !r.fromWorker);
            const debug2 = requests;
            console.log(debug2);
          }
          static createGraph(mainThreadEvents, networkRequests, url) {
            const networkNodeOutput = _PageDependencyGraph.getNetworkNodeOutput(networkRequests);
            const cpuNodes = _PageDependencyGraph.getCPUNodes(mainThreadEvents);
            const { requestedUrl, mainDocumentUrl } = url;
            if (!requestedUrl) {
              throw new LanternError("requestedUrl is required to get the root request");
            }
            if (!mainDocumentUrl) {
              throw new LanternError("mainDocumentUrl is required to get the main resource");
            }
            const rootRequest = NetworkAnalyzer.findResourceForUrl(networkRequests, requestedUrl);
            if (!rootRequest) {
              throw new LanternError("rootRequest not found");
            }
            const rootNode = networkNodeOutput.idToNodeMap.get(rootRequest.requestId);
            if (!rootNode) {
              throw new LanternError("rootNode not found");
            }
            const mainDocumentRequest = NetworkAnalyzer.findLastDocumentForUrl(networkRequests, mainDocumentUrl);
            if (!mainDocumentRequest) {
              throw new LanternError("mainDocumentRequest not found");
            }
            const mainDocumentNode = networkNodeOutput.idToNodeMap.get(mainDocumentRequest.requestId);
            if (!mainDocumentNode) {
              throw new LanternError("mainDocumentNode not found");
            }
            _PageDependencyGraph.linkNetworkNodes(rootNode, networkNodeOutput);
            _PageDependencyGraph.linkCPUNodes(rootNode, networkNodeOutput, cpuNodes);
            mainDocumentNode.setIsMainDocument(true);
            if (NetworkNode.findCycle(rootNode)) {
              throw new LanternError("Invalid dependency graph created, cycle detected");
            }
            return rootNode;
          }
          // Unused, but useful for debugging.
          static printGraph(rootNode, widthInCharacters = 80) {
            function padRight(str, target, padChar = " ") {
              return str + padChar.repeat(Math.max(target - str.length, 0));
            }
            __name(padRight, "padRight");
            const nodes = [];
            rootNode.traverse((node2) => nodes.push(node2));
            nodes.sort((a, b) => a.startTime - b.startTime);
            const nodeToLabel = /* @__PURE__ */ new Map();
            rootNode.traverse((node2) => {
              const ascii = 65 + nodeToLabel.size;
              let label;
              if (ascii > 90) {
                label = `Z${ascii - 90}`;
              } else {
                label = String.fromCharCode(ascii);
              }
              nodeToLabel.set(node2, label);
            });
            const min = nodes[0].startTime;
            const max = nodes.reduce((max2, node2) => Math.max(max2, node2.endTime), 0);
            const totalTime = max - min;
            const timePerCharacter = totalTime / widthInCharacters;
            nodes.forEach((node2) => {
              const offset = Math.round((node2.startTime - min) / timePerCharacter);
              const length = Math.ceil((node2.endTime - node2.startTime) / timePerCharacter);
              const bar = padRight("", offset) + padRight("", length, "=");
              const displayName = node2.request ? node2.request.url : node2.type;
              console.log(padRight(bar, widthInCharacters), `| ${displayName.slice(0, 50)}`);
            });
            console.log();
            nodes.forEach((node2) => {
              const displayName = node2.request ? node2.request.url : node2.type;
              console.log(nodeToLabel.get(node2), displayName.slice(0, widthInCharacters - 5));
              for (const child of node2.dependents) {
                const displayName2 = child.request ? child.request.url : child.type;
                console.log("  ->", nodeToLabel.get(child), displayName2.slice(0, widthInCharacters - 10));
              }
              console.log();
            });
            const cyclePath = NetworkNode.findCycle(rootNode);
            console.log("Cycle?", cyclePath ? "yes" : "no");
            if (cyclePath) {
              const path72 = [...cyclePath];
              path72.push(path72[0]);
              console.log(path72.map((node2) => nodeToLabel.get(node2)).join(" -> "));
            }
          }
        };
      }
    });
    graph_exports = {};
    __export2(graph_exports, {
      BaseNode: () => BaseNode,
      CPUNode: () => CPUNode,
      NetworkNode: () => NetworkNode,
      PageDependencyGraph: () => PageDependencyGraph
    });
    init_graph = __esm2({
      "node_modules/@paulirish/trace_engine/models/trace/lantern/graph/graph.js"() {
        init_process_global();
        init_BaseNode();
        init_CPUNode();
        init_NetworkNode();
        init_PageDependencyGraph();
      }
    });
    init_Metric = __esm2({
      "node_modules/@paulirish/trace_engine/models/trace/lantern/metrics/Metric.js"() {
        init_process_global();
        init_core();
        init_graph();
        Metric = class {
          static {
            __name(this, "Metric");
          }
          static getScriptUrls(dependencyGraph, treatNodeAsRenderBlocking) {
            const scriptUrls = /* @__PURE__ */ new Set();
            dependencyGraph.traverse((node2) => {
              if (node2.type !== BaseNode.types.NETWORK) {
                return;
              }
              if (node2.request.resourceType !== "Script") {
                return;
              }
              if (treatNodeAsRenderBlocking?.(node2)) {
                scriptUrls.add(node2.request.url);
              }
            });
            return scriptUrls;
          }
          static get coefficients() {
            throw new LanternError("coefficients unimplemented!");
          }
          /**
           * Returns the coefficients, scaled by the throttling settings if needed by the metric.
           * Some lantern metrics (speed-index) use components in their estimate that are not
           * from the simulator. In this case, we need to adjust the coefficients as the target throttling
           * settings change.
           */
          static getScaledCoefficients(_rttMs) {
            return this.coefficients;
          }
          static getOptimisticGraph(_dependencyGraph, _processedNavigation) {
            throw new LanternError("Optimistic graph unimplemented!");
          }
          static getPessimisticGraph(_dependencyGraph, _processedNavigation) {
            throw new LanternError("Pessmistic graph unimplemented!");
          }
          static getEstimateFromSimulation(simulationResult, _extras) {
            return simulationResult;
          }
          static compute(data312, extras2) {
            const { simulator, graph: graph22, processedNavigation } = data312;
            const metricName = this.name.replace("Lantern", "");
            const optimisticGraph = this.getOptimisticGraph(graph22, processedNavigation);
            const pessimisticGraph = this.getPessimisticGraph(graph22, processedNavigation);
            let simulateOptions = { label: `optimistic${metricName}` };
            const optimisticSimulation = simulator.simulate(optimisticGraph, simulateOptions);
            simulateOptions = { label: `pessimistic${metricName}` };
            const pessimisticSimulation = simulator.simulate(pessimisticGraph, simulateOptions);
            const optimisticEstimate = this.getEstimateFromSimulation(optimisticSimulation, { ...extras2, optimistic: true });
            const pessimisticEstimate = this.getEstimateFromSimulation(pessimisticSimulation, { ...extras2, optimistic: false });
            const coefficients = this.getScaledCoefficients(simulator.rtt);
            const interceptMultiplier = coefficients.intercept > 0 ? Math.min(1, optimisticEstimate.timeInMs / 1e3) : 1;
            const timing = coefficients.intercept * interceptMultiplier + coefficients.optimistic * optimisticEstimate.timeInMs + coefficients.pessimistic * pessimisticEstimate.timeInMs;
            return {
              timing,
              optimisticEstimate,
              pessimisticEstimate,
              optimisticGraph,
              pessimisticGraph
            };
          }
        };
      }
    });
    init_FirstContentfulPaint = __esm2({
      "node_modules/@paulirish/trace_engine/models/trace/lantern/metrics/FirstContentfulPaint.js"() {
        init_process_global();
        init_graph();
        init_Metric();
        FirstContentfulPaint = class extends Metric {
          static {
            __name(this, "FirstContentfulPaint");
          }
          static get coefficients() {
            return {
              intercept: 0,
              optimistic: 0.5,
              pessimistic: 0.5
            };
          }
          /**
           * Computes the set of URLs that *appeared* to be render-blocking based on our filter,
           * *but definitely were not* render-blocking based on the timing of their EvaluateScript task.
           * It also computes the set of corresponding CPU node ids that were needed for the paint at the
           * given timestamp.
           */
          static getRenderBlockingNodeData(graph22, { cutoffTimestamp, treatNodeAsRenderBlocking, additionalCpuNodesToTreatAsRenderBlocking }) {
            const scriptUrlToNodeMap = /* @__PURE__ */ new Map();
            const cpuNodes = [];
            graph22.traverse((node2) => {
              if (node2.type === BaseNode.types.CPU) {
                if (node2.startTime <= cutoffTimestamp) {
                  cpuNodes.push(node2);
                }
                const scriptUrls = node2.getEvaluateScriptURLs();
                for (const url of scriptUrls) {
                  const existing = scriptUrlToNodeMap.get(url) || node2;
                  scriptUrlToNodeMap.set(url, node2.startTime < existing.startTime ? node2 : existing);
                }
              }
            });
            cpuNodes.sort((a, b) => a.startTime - b.startTime);
            const possiblyRenderBlockingScriptUrls = Metric.getScriptUrls(graph22, (node2) => {
              return node2.endTime <= cutoffTimestamp && treatNodeAsRenderBlocking(node2);
            });
            const definitelyNotRenderBlockingScriptUrls = /* @__PURE__ */ new Set();
            const renderBlockingCpuNodeIds = /* @__PURE__ */ new Set();
            for (const url of possiblyRenderBlockingScriptUrls) {
              const cpuNodeForUrl = scriptUrlToNodeMap.get(url);
              if (!cpuNodeForUrl) {
                continue;
              }
              if (cpuNodes.includes(cpuNodeForUrl)) {
                renderBlockingCpuNodeIds.add(cpuNodeForUrl.id);
                continue;
              }
              definitelyNotRenderBlockingScriptUrls.add(url);
            }
            const firstLayout = cpuNodes.find((node2) => node2.didPerformLayout());
            if (firstLayout) {
              renderBlockingCpuNodeIds.add(firstLayout.id);
            }
            const firstPaint = cpuNodes.find((node2) => node2.childEvents.some((e) => e.name === "Paint"));
            if (firstPaint) {
              renderBlockingCpuNodeIds.add(firstPaint.id);
            }
            const firstParse = cpuNodes.find((node2) => node2.childEvents.some((e) => e.name === "ParseHTML"));
            if (firstParse) {
              renderBlockingCpuNodeIds.add(firstParse.id);
            }
            if (additionalCpuNodesToTreatAsRenderBlocking) {
              cpuNodes.filter(additionalCpuNodesToTreatAsRenderBlocking).forEach((node2) => renderBlockingCpuNodeIds.add(node2.id));
            }
            return {
              definitelyNotRenderBlockingScriptUrls,
              renderBlockingCpuNodeIds
            };
          }
          /**
           * Computes the graph required for the first paint of interest.
           */
          static getFirstPaintBasedGraph(dependencyGraph, { cutoffTimestamp, treatNodeAsRenderBlocking, additionalCpuNodesToTreatAsRenderBlocking }) {
            const rbData = this.getRenderBlockingNodeData(dependencyGraph, {
              cutoffTimestamp,
              treatNodeAsRenderBlocking,
              additionalCpuNodesToTreatAsRenderBlocking
            });
            const { definitelyNotRenderBlockingScriptUrls, renderBlockingCpuNodeIds } = rbData;
            return dependencyGraph.cloneWithRelationships((node2) => {
              if (node2.type === BaseNode.types.NETWORK) {
                const endedAfterPaint = node2.endTime > cutoffTimestamp || node2.startTime > cutoffTimestamp;
                if (endedAfterPaint && !node2.isMainDocument()) {
                  return false;
                }
                const url = node2.request.url;
                if (definitelyNotRenderBlockingScriptUrls.has(url)) {
                  return false;
                }
                return treatNodeAsRenderBlocking(node2);
              }
              return renderBlockingCpuNodeIds.has(node2.id);
            });
          }
          static getOptimisticGraph(dependencyGraph, processedNavigation) {
            return this.getFirstPaintBasedGraph(dependencyGraph, {
              cutoffTimestamp: processedNavigation.timestamps.firstContentfulPaint,
              // In the optimistic graph we exclude resources that appeared to be render blocking but were
              // initiated by a script. While they typically have a very high importance and tend to have a
              // significant impact on the page's content, these resources don't technically block rendering.
              treatNodeAsRenderBlocking: /* @__PURE__ */ __name((node2) => node2.hasRenderBlockingPriority() && node2.initiatorType !== "script", "treatNodeAsRenderBlocking")
            });
          }
          static getPessimisticGraph(dependencyGraph, processedNavigation) {
            return this.getFirstPaintBasedGraph(dependencyGraph, {
              cutoffTimestamp: processedNavigation.timestamps.firstContentfulPaint,
              treatNodeAsRenderBlocking: /* @__PURE__ */ __name((node2) => node2.hasRenderBlockingPriority(), "treatNodeAsRenderBlocking")
            });
          }
        };
      }
    });
    init_Interactive = __esm2({
      "node_modules/@paulirish/trace_engine/models/trace/lantern/metrics/Interactive.js"() {
        init_process_global();
        init_core();
        init_graph();
        init_Metric();
        CRITICAL_LONG_TASK_THRESHOLD = 20;
        Interactive = class _Interactive extends Metric {
          static {
            __name(this, "Interactive");
          }
          static get coefficients() {
            return {
              intercept: 0,
              optimistic: 0.45,
              pessimistic: 0.55
            };
          }
          static getOptimisticGraph(dependencyGraph) {
            const minimumCpuTaskDuration = CRITICAL_LONG_TASK_THRESHOLD * 1e3;
            return dependencyGraph.cloneWithRelationships((node2) => {
              if (node2.type === BaseNode.types.CPU) {
                return node2.duration > minimumCpuTaskDuration;
              }
              const isImage = node2.request.resourceType === "Image";
              const isScript = node2.request.resourceType === "Script";
              return !isImage && (isScript || node2.request.priority === "High" || node2.request.priority === "VeryHigh");
            });
          }
          static getPessimisticGraph(dependencyGraph) {
            return dependencyGraph;
          }
          static getEstimateFromSimulation(simulationResult, extras2) {
            if (!extras2.lcpResult) {
              throw new LanternError("missing lcpResult");
            }
            const lastTaskAt = _Interactive.getLastLongTaskEndTime(simulationResult.nodeTimings);
            const minimumTime = extras2.optimistic ? extras2.lcpResult.optimisticEstimate.timeInMs : extras2.lcpResult.pessimisticEstimate.timeInMs;
            return {
              timeInMs: Math.max(minimumTime, lastTaskAt),
              nodeTimings: simulationResult.nodeTimings
            };
          }
          static compute(data312, extras2) {
            const lcpResult = extras2?.lcpResult;
            if (!lcpResult) {
              throw new LanternError("LCP is required to calculate the Interactive metric");
            }
            const metricResult = super.compute(data312, extras2);
            metricResult.timing = Math.max(metricResult.timing, lcpResult.timing);
            return metricResult;
          }
          static getLastLongTaskEndTime(nodeTimings, duration2 = 50) {
            return Array.from(nodeTimings.entries()).filter(([node2, timing]) => {
              if (node2.type !== BaseNode.types.CPU) {
                return false;
              }
              return timing.duration > duration2;
            }).map(([_, timing]) => timing.endTime).reduce((max, x) => Math.max(max || 0, x || 0), 0);
          }
        };
      }
    });
    init_LargestContentfulPaint = __esm2({
      "node_modules/@paulirish/trace_engine/models/trace/lantern/metrics/LargestContentfulPaint.js"() {
        init_process_global();
        init_core();
        init_FirstContentfulPaint();
        init_Metric();
        LargestContentfulPaint = class _LargestContentfulPaint extends Metric {
          static {
            __name(this, "LargestContentfulPaint");
          }
          static get coefficients() {
            return {
              intercept: 0,
              optimistic: 0.5,
              pessimistic: 0.5
            };
          }
          /**
           * Low priority image nodes are usually offscreen and very unlikely to be the
           * resource that is required for LCP. Our LCP graphs include everything except for these images.
           */
          static isNotLowPriorityImageNode(node2) {
            if (node2.type !== "network") {
              return true;
            }
            const isImage = node2.request.resourceType === "Image";
            const isLowPriority = node2.request.priority === "Low" || node2.request.priority === "VeryLow";
            return !isImage || !isLowPriority;
          }
          static getOptimisticGraph(dependencyGraph, processedNavigation) {
            const lcp = processedNavigation.timestamps.largestContentfulPaint;
            if (!lcp) {
              throw new LanternError("NO_LCP");
            }
            return FirstContentfulPaint.getFirstPaintBasedGraph(dependencyGraph, {
              cutoffTimestamp: lcp,
              treatNodeAsRenderBlocking: _LargestContentfulPaint.isNotLowPriorityImageNode
            });
          }
          static getPessimisticGraph(dependencyGraph, processedNavigation) {
            const lcp = processedNavigation.timestamps.largestContentfulPaint;
            if (!lcp) {
              throw new LanternError("NO_LCP");
            }
            return FirstContentfulPaint.getFirstPaintBasedGraph(dependencyGraph, {
              cutoffTimestamp: lcp,
              treatNodeAsRenderBlocking: /* @__PURE__ */ __name((_) => true, "treatNodeAsRenderBlocking"),
              // For pessimistic LCP we'll include *all* layout nodes
              additionalCpuNodesToTreatAsRenderBlocking: /* @__PURE__ */ __name((node2) => node2.didPerformLayout(), "additionalCpuNodesToTreatAsRenderBlocking")
            });
          }
          static getEstimateFromSimulation(simulationResult) {
            const nodeTimesNotOffscreenImages = Array.from(simulationResult.nodeTimings.entries()).filter((entry) => _LargestContentfulPaint.isNotLowPriorityImageNode(entry[0])).map((entry) => entry[1].endTime);
            return {
              timeInMs: Math.max(...nodeTimesNotOffscreenImages),
              nodeTimings: simulationResult.nodeTimings
            };
          }
          static compute(data312, extras2) {
            const fcpResult = extras2?.fcpResult;
            if (!fcpResult) {
              throw new LanternError("FCP is required to calculate the LCP metric");
            }
            const metricResult = super.compute(data312, extras2);
            metricResult.timing = Math.max(metricResult.timing, fcpResult.timing);
            return metricResult;
          }
        };
      }
    });
    init_MaxPotentialFID = __esm2({
      "node_modules/@paulirish/trace_engine/models/trace/lantern/metrics/MaxPotentialFID.js"() {
        init_process_global();
        init_core();
        init_graph();
        init_Metric();
        MaxPotentialFID = class _MaxPotentialFID extends Metric {
          static {
            __name(this, "MaxPotentialFID");
          }
          static get coefficients() {
            return {
              intercept: 0,
              optimistic: 0.5,
              pessimistic: 0.5
            };
          }
          static getOptimisticGraph(dependencyGraph) {
            return dependencyGraph;
          }
          static getPessimisticGraph(dependencyGraph) {
            return dependencyGraph;
          }
          static getEstimateFromSimulation(simulation2, extras2) {
            if (!extras2.fcpResult) {
              throw new LanternError("missing fcpResult");
            }
            const fcpTimeInMs = extras2.optimistic ? extras2.fcpResult.pessimisticEstimate.timeInMs : extras2.fcpResult.optimisticEstimate.timeInMs;
            const timings = _MaxPotentialFID.getTimingsAfterFCP(simulation2.nodeTimings, fcpTimeInMs);
            return {
              timeInMs: Math.max(...timings.map((timing) => timing.duration), 16),
              nodeTimings: simulation2.nodeTimings
            };
          }
          static compute(data312, extras2) {
            const fcpResult = extras2?.fcpResult;
            if (!fcpResult) {
              throw new LanternError("FCP is required to calculate the Max Potential FID metric");
            }
            return super.compute(data312, extras2);
          }
          static getTimingsAfterFCP(nodeTimings, fcpTimeInMs) {
            return Array.from(nodeTimings.entries()).filter(([node2, timing]) => node2.type === BaseNode.types.CPU && timing.endTime > fcpTimeInMs).map(([_, timing]) => timing);
          }
        };
      }
    });
    init_SpeedIndex = __esm2({
      "node_modules/@paulirish/trace_engine/models/trace/lantern/metrics/SpeedIndex.js"() {
        init_process_global();
        init_core();
        init_graph();
        init_Metric();
        mobileSlow4GRtt = 150;
        SpeedIndex = class _SpeedIndex extends Metric {
          static {
            __name(this, "SpeedIndex");
          }
          static get coefficients() {
            return {
              // Note that the optimistic estimate is based on the real observed speed index rather than a
              // real lantern graph (and the final estimate will be Math.max(FCP, Speed Index)).
              intercept: 0,
              optimistic: 1.4,
              pessimistic: 0.4
            };
          }
          static getScaledCoefficients(rttMs) {
            const defaultCoefficients = this.coefficients;
            const defaultRttExcess = mobileSlow4GRtt - 30;
            const multiplier = Math.max((rttMs - 30) / defaultRttExcess, 0);
            return {
              intercept: defaultCoefficients.intercept * multiplier,
              optimistic: 0.5 + (defaultCoefficients.optimistic - 0.5) * multiplier,
              pessimistic: 0.5 + (defaultCoefficients.pessimistic - 0.5) * multiplier
            };
          }
          static getOptimisticGraph(dependencyGraph) {
            return dependencyGraph;
          }
          static getPessimisticGraph(dependencyGraph) {
            return dependencyGraph;
          }
          static getEstimateFromSimulation(simulationResult, extras2) {
            if (!extras2.fcpResult) {
              throw new LanternError("missing fcpResult");
            }
            if (extras2.observedSpeedIndex === void 0) {
              throw new LanternError("missing observedSpeedIndex");
            }
            const fcpTimeInMs = extras2.fcpResult.pessimisticEstimate.timeInMs;
            const estimate = extras2.optimistic ? extras2.observedSpeedIndex : _SpeedIndex.computeLayoutBasedSpeedIndex(simulationResult.nodeTimings, fcpTimeInMs);
            return {
              timeInMs: estimate,
              nodeTimings: simulationResult.nodeTimings
            };
          }
          static compute(data312, extras2) {
            const fcpResult = extras2?.fcpResult;
            if (!fcpResult) {
              throw new LanternError("FCP is required to calculate the SpeedIndex metric");
            }
            const metricResult = super.compute(data312, extras2);
            metricResult.timing = Math.max(metricResult.timing, fcpResult.timing);
            return metricResult;
          }
          /**
           * Approximate speed index using layout events from the simulated node timings.
           * The layout-based speed index is the weighted average of the endTime of CPU nodes that contained
           * a 'Layout' task. log(duration) is used as the weight to stand for "significance" to the page.
           *
           * If no layout events can be found or the endTime of a CPU task is too early, FCP is used instead.
           *
           * This approach was determined after evaluating the accuracy/complexity tradeoff of many
           * different methods. Read more in the evaluation doc.
           *
           * @see https://docs.google.com/document/d/1qJWXwxoyVLVadezIp_Tgdk867G3tDNkkVRvUJSH3K1E/edit#
           */
          static computeLayoutBasedSpeedIndex(nodeTimings, fcpTimeInMs) {
            const layoutWeights = [];
            for (const [node2, timing] of nodeTimings.entries()) {
              if (node2.type !== BaseNode.types.CPU) {
                continue;
              }
              if (node2.childEvents.some((x) => x.name === "Layout")) {
                const timingWeight = Math.max(Math.log2(timing.endTime - timing.startTime), 0);
                layoutWeights.push({ time: timing.endTime, weight: timingWeight });
              }
            }
            const totalWeightedTime = layoutWeights.map((evt) => evt.weight * Math.max(evt.time, fcpTimeInMs)).reduce((a, b) => a + b, 0);
            const totalWeight = layoutWeights.map((evt) => evt.weight).reduce((a, b) => a + b, 0);
            if (!totalWeight) {
              return fcpTimeInMs;
            }
            return totalWeightedTime / totalWeight;
          }
        };
      }
    });
    TBTUtils_exports = {};
    __export2(TBTUtils_exports, {
      BLOCKING_TIME_THRESHOLD: () => BLOCKING_TIME_THRESHOLD,
      calculateSumOfBlockingTime: () => calculateSumOfBlockingTime,
      calculateTbtImpactForEvent: () => calculateTbtImpactForEvent
    });
    init_TBTUtils = __esm2({
      "node_modules/@paulirish/trace_engine/models/trace/lantern/metrics/TBTUtils.js"() {
        init_process_global();
        BLOCKING_TIME_THRESHOLD = 50;
        __name(calculateTbtImpactForEvent, "calculateTbtImpactForEvent");
        __name(calculateSumOfBlockingTime, "calculateSumOfBlockingTime");
      }
    });
    init_TotalBlockingTime = __esm2({
      "node_modules/@paulirish/trace_engine/models/trace/lantern/metrics/TotalBlockingTime.js"() {
        init_process_global();
        init_core();
        init_graph();
        init_Metric();
        init_TBTUtils();
        TotalBlockingTime = class _TotalBlockingTime extends Metric {
          static {
            __name(this, "TotalBlockingTime");
          }
          static get coefficients() {
            return {
              intercept: 0,
              optimistic: 0.5,
              pessimistic: 0.5
            };
          }
          static getOptimisticGraph(dependencyGraph) {
            return dependencyGraph;
          }
          static getPessimisticGraph(dependencyGraph) {
            return dependencyGraph;
          }
          static getEstimateFromSimulation(simulation2, extras2) {
            if (!extras2.fcpResult) {
              throw new LanternError("missing fcpResult");
            }
            if (!extras2.interactiveResult) {
              throw new LanternError("missing interactiveResult");
            }
            const fcpTimeInMs = extras2.optimistic ? extras2.fcpResult.pessimisticEstimate.timeInMs : extras2.fcpResult.optimisticEstimate.timeInMs;
            const interactiveTimeMs = extras2.optimistic ? extras2.interactiveResult.optimisticEstimate.timeInMs : extras2.interactiveResult.pessimisticEstimate.timeInMs;
            const minDurationMs = BLOCKING_TIME_THRESHOLD;
            const events = _TotalBlockingTime.getTopLevelEvents(simulation2.nodeTimings, minDurationMs);
            return {
              timeInMs: calculateSumOfBlockingTime(events, fcpTimeInMs, interactiveTimeMs),
              nodeTimings: simulation2.nodeTimings
            };
          }
          static compute(data312, extras2) {
            const fcpResult = extras2?.fcpResult;
            if (!fcpResult) {
              throw new LanternError("FCP is required to calculate the TBT metric");
            }
            const interactiveResult = extras2?.fcpResult;
            if (!interactiveResult) {
              throw new LanternError("Interactive is required to calculate the TBT metric");
            }
            return super.compute(data312, extras2);
          }
          static getTopLevelEvents(nodeTimings, minDurationMs) {
            const events = [];
            for (const [node2, timing] of nodeTimings.entries()) {
              if (node2.type !== BaseNode.types.CPU) {
                continue;
              }
              if (timing.duration < minDurationMs) {
                continue;
              }
              events.push({
                start: timing.startTime,
                end: timing.endTime,
                duration: timing.duration
              });
            }
            return events;
          }
        };
      }
    });
    metrics_exports = {};
    __export2(metrics_exports, {
      FirstContentfulPaint: () => FirstContentfulPaint,
      Interactive: () => Interactive,
      LargestContentfulPaint: () => LargestContentfulPaint,
      MaxPotentialFID: () => MaxPotentialFID,
      Metric: () => Metric,
      SpeedIndex: () => SpeedIndex,
      TBTUtils: () => TBTUtils_exports,
      TotalBlockingTime: () => TotalBlockingTime
    });
    init_metrics = __esm2({
      "node_modules/@paulirish/trace_engine/models/trace/lantern/metrics/metrics.js"() {
        init_process_global();
        init_FirstContentfulPaint();
        init_Interactive();
        init_LargestContentfulPaint();
        init_MaxPotentialFID();
        init_Metric();
        init_SpeedIndex();
        init_TotalBlockingTime();
        init_TBTUtils();
      }
    });
    init_TCPConnection = __esm2({
      "node_modules/@paulirish/trace_engine/models/trace/lantern/simulation/TCPConnection.js"() {
        init_process_global();
        INITIAL_CONGESTION_WINDOW = 10;
        TCP_SEGMENT_SIZE = 1460;
        TCPConnection = class _TCPConnection {
          static {
            __name(this, "TCPConnection");
          }
          warmed;
          ssl;
          h2;
          rtt;
          throughput;
          serverLatency;
          _congestionWindow;
          h2OverflowBytesDownloaded;
          constructor(rtt, throughput, serverLatency = 0, ssl = true, h2 = false) {
            this.warmed = false;
            this.ssl = ssl;
            this.h2 = h2;
            this.rtt = rtt;
            this.throughput = throughput;
            this.serverLatency = serverLatency;
            this._congestionWindow = INITIAL_CONGESTION_WINDOW;
            this.h2OverflowBytesDownloaded = 0;
          }
          static maximumSaturatedConnections(rtt, availableThroughput) {
            const roundTripsPerSecond = 1e3 / rtt;
            const bytesPerRoundTrip = TCP_SEGMENT_SIZE;
            const bytesPerSecond = roundTripsPerSecond * bytesPerRoundTrip;
            const minimumThroughputRequiredPerRequest = bytesPerSecond * 8;
            return Math.floor(availableThroughput / minimumThroughputRequiredPerRequest);
          }
          computeMaximumCongestionWindowInSegments() {
            const bytesPerSecond = this.throughput / 8;
            const secondsPerRoundTrip = this.rtt / 1e3;
            const bytesPerRoundTrip = bytesPerSecond * secondsPerRoundTrip;
            return Math.floor(bytesPerRoundTrip / TCP_SEGMENT_SIZE);
          }
          setThroughput(throughput) {
            this.throughput = throughput;
          }
          setCongestionWindow(congestion) {
            this._congestionWindow = congestion;
          }
          setWarmed(warmed) {
            this.warmed = warmed;
          }
          isH2() {
            return this.h2;
          }
          get congestionWindow() {
            return this._congestionWindow;
          }
          /**
           * Sets the number of excess bytes that are available to this connection on future downloads, only
           * applies to H2 connections.
           */
          setH2OverflowBytesDownloaded(bytes2) {
            if (!this.h2) {
              return;
            }
            this.h2OverflowBytesDownloaded = bytes2;
          }
          clone() {
            return Object.assign(new _TCPConnection(this.rtt, this.throughput), this);
          }
          /**
           * Simulates a network download of a particular number of bytes over an optional maximum amount of time
           * and returns information about the ending state.
           *
           * See https://hpbn.co/building-blocks-of-tcp/#three-way-handshake and
           *  https://hpbn.co/transport-layer-security-tls/#tls-handshake for details.
           */
          simulateDownloadUntil(bytesToDownload, options2) {
            const { timeAlreadyElapsed = 0, maximumTimeToElapse = Infinity, dnsResolutionTime = 0 } = options2 || {};
            if (this.warmed && this.h2) {
              bytesToDownload -= this.h2OverflowBytesDownloaded;
            }
            const twoWayLatency = this.rtt;
            const oneWayLatency = twoWayLatency / 2;
            const maximumCongestionWindow = this.computeMaximumCongestionWindowInSegments();
            let handshakeAndRequest = oneWayLatency;
            if (!this.warmed) {
              handshakeAndRequest = // DNS lookup
              dnsResolutionTime + // SYN
              oneWayLatency + // SYN ACK
              oneWayLatency + // ACK + initial request
              oneWayLatency + // ClientHello/ServerHello assuming TLS False Start is enabled (https://istlsfastyet.com/#server-performance).
              (this.ssl ? twoWayLatency : 0);
            }
            let roundTrips = Math.ceil(handshakeAndRequest / twoWayLatency);
            let timeToFirstByte = handshakeAndRequest + this.serverLatency + oneWayLatency;
            if (this.warmed && this.h2) {
              timeToFirstByte = 0;
            }
            const timeElapsedForTTFB = Math.max(timeToFirstByte - timeAlreadyElapsed, 0);
            const maximumDownloadTimeToElapse = maximumTimeToElapse - timeElapsedForTTFB;
            let congestionWindow = Math.min(this._congestionWindow, maximumCongestionWindow);
            let totalBytesDownloaded = 0;
            if (timeElapsedForTTFB > 0) {
              totalBytesDownloaded = congestionWindow * TCP_SEGMENT_SIZE;
            } else {
              roundTrips = 0;
            }
            let downloadTimeElapsed = 0;
            let bytesRemaining = bytesToDownload - totalBytesDownloaded;
            while (bytesRemaining > 0 && downloadTimeElapsed <= maximumDownloadTimeToElapse) {
              roundTrips++;
              downloadTimeElapsed += twoWayLatency;
              congestionWindow = Math.max(Math.min(maximumCongestionWindow, congestionWindow * 2), 1);
              const bytesDownloadedInWindow = congestionWindow * TCP_SEGMENT_SIZE;
              totalBytesDownloaded += bytesDownloadedInWindow;
              bytesRemaining -= bytesDownloadedInWindow;
            }
            const timeElapsed = timeElapsedForTTFB + downloadTimeElapsed;
            const extraBytesDownloaded = this.h2 ? Math.max(totalBytesDownloaded - bytesToDownload, 0) : 0;
            const bytesDownloaded = Math.max(Math.min(totalBytesDownloaded, bytesToDownload), 0);
            let connectionTiming;
            if (!this.warmed) {
              connectionTiming = {
                dnsResolutionTime,
                connectionTime: handshakeAndRequest - dnsResolutionTime,
                sslTime: this.ssl ? twoWayLatency : void 0,
                timeToFirstByte
              };
            } else if (this.h2) {
              connectionTiming = {
                timeToFirstByte
              };
            } else {
              connectionTiming = {
                connectionTime: handshakeAndRequest,
                timeToFirstByte
              };
            }
            return {
              roundTrips,
              timeElapsed,
              bytesDownloaded,
              extraBytesDownloaded,
              congestionWindow,
              connectionTiming
            };
          }
        };
      }
    });
    init_ConnectionPool = __esm2({
      "node_modules/@paulirish/trace_engine/models/trace/lantern/simulation/ConnectionPool.js"() {
        init_process_global();
        init_core();
        init_TCPConnection();
        DEFAULT_SERVER_RESPONSE_TIME = 30;
        TLS_SCHEMES = ["https", "wss"];
        CONNECTIONS_PER_ORIGIN = 6;
        ConnectionPool = class {
          static {
            __name(this, "ConnectionPool");
          }
          options;
          records;
          connectionsByOrigin;
          connectionsByRequest;
          _connectionsInUse;
          connectionReusedByRequestId;
          constructor(records, options2) {
            this.options = options2;
            this.records = records;
            this.connectionsByOrigin = /* @__PURE__ */ new Map();
            this.connectionsByRequest = /* @__PURE__ */ new Map();
            this._connectionsInUse = /* @__PURE__ */ new Set();
            this.connectionReusedByRequestId = NetworkAnalyzer.estimateIfConnectionWasReused(records, {
              forceCoarseEstimates: true
            });
            this.initializeConnections();
          }
          connectionsInUse() {
            return Array.from(this._connectionsInUse);
          }
          initializeConnections() {
            const connectionReused = this.connectionReusedByRequestId;
            const additionalRttByOrigin = this.options.additionalRttByOrigin;
            const serverResponseTimeByOrigin = this.options.serverResponseTimeByOrigin;
            const recordsByOrigin = NetworkAnalyzer.groupByOrigin(this.records);
            for (const [origin, requests] of recordsByOrigin.entries()) {
              const connections = [];
              const additionalRtt = additionalRttByOrigin.get(origin) || 0;
              const responseTime = serverResponseTimeByOrigin.get(origin) || DEFAULT_SERVER_RESPONSE_TIME;
              for (const request3 of requests) {
                if (connectionReused.get(request3.requestId)) {
                  continue;
                }
                const isTLS = TLS_SCHEMES.includes(request3.parsedURL.scheme);
                const isH2 = request3.protocol === "h2";
                const connection = new TCPConnection(this.options.rtt + additionalRtt, this.options.throughput, responseTime, isTLS, isH2);
                connections.push(connection);
              }
              if (!connections.length) {
                throw new LanternError(`Could not find a connection for origin: ${origin}`);
              }
              const minConnections = connections[0].isH2() ? 1 : CONNECTIONS_PER_ORIGIN;
              while (connections.length < minConnections) {
                connections.push(connections[0].clone());
              }
              this.connectionsByOrigin.set(origin, connections);
            }
          }
          findAvailableConnectionWithLargestCongestionWindow(connections) {
            let maxConnection = null;
            for (let i = 0; i < connections.length; i++) {
              const connection = connections[i];
              if (this._connectionsInUse.has(connection)) {
                continue;
              }
              const currentMax = maxConnection?.congestionWindow || -Infinity;
              if (connection.congestionWindow > currentMax) {
                maxConnection = connection;
              }
            }
            return maxConnection;
          }
          /**
           * This method finds an available connection to the origin specified by the network request or null
           * if no connection was available. If returned, connection will not be available for other network
           * records until release is called.
           */
          acquire(request3) {
            if (this.connectionsByRequest.has(request3)) {
              throw new LanternError("Record already has a connection");
            }
            const origin = request3.parsedURL.securityOrigin;
            const connections = this.connectionsByOrigin.get(origin) || [];
            const connectionToUse = this.findAvailableConnectionWithLargestCongestionWindow(connections);
            if (!connectionToUse) {
              return null;
            }
            this._connectionsInUse.add(connectionToUse);
            this.connectionsByRequest.set(request3, connectionToUse);
            return connectionToUse;
          }
          /**
           * Return the connection currently being used to fetch a request. If no connection
           * currently being used for this request, an error will be thrown.
           */
          acquireActiveConnectionFromRequest(request3) {
            const activeConnection = this.connectionsByRequest.get(request3);
            if (!activeConnection) {
              throw new LanternError("Could not find an active connection for request");
            }
            return activeConnection;
          }
          release(request3) {
            const connection = this.connectionsByRequest.get(request3);
            this.connectionsByRequest.delete(request3);
            if (connection) {
              this._connectionsInUse.delete(connection);
            }
          }
        };
      }
    });
    init_Constants = __esm2({
      "node_modules/@paulirish/trace_engine/models/trace/lantern/simulation/Constants.js"() {
        init_process_global();
        DEVTOOLS_RTT_ADJUSTMENT_FACTOR = 3.75;
        DEVTOOLS_THROUGHPUT_ADJUSTMENT_FACTOR = 0.9;
        throttling = {
          DEVTOOLS_RTT_ADJUSTMENT_FACTOR,
          DEVTOOLS_THROUGHPUT_ADJUSTMENT_FACTOR,
          // These values align with WebPageTest's definition of "Fast 3G"
          // But offer similar characteristics to roughly the 75th percentile of 4G connections.
          mobileSlow4G: {
            rttMs: 150,
            throughputKbps: 1.6 * 1024,
            requestLatencyMs: 150 * DEVTOOLS_RTT_ADJUSTMENT_FACTOR,
            downloadThroughputKbps: 1.6 * 1024 * DEVTOOLS_THROUGHPUT_ADJUSTMENT_FACTOR,
            uploadThroughputKbps: 750 * DEVTOOLS_THROUGHPUT_ADJUSTMENT_FACTOR,
            cpuSlowdownMultiplier: 4
          },
          // These values partially align with WebPageTest's definition of "Regular 3G".
          // These values are meant to roughly align with Chrome UX report's 3G definition which are based
          // on HTTP RTT of 300-1400ms and downlink throughput of <700kbps.
          mobileRegular3G: {
            rttMs: 300,
            throughputKbps: 700,
            requestLatencyMs: 300 * DEVTOOLS_RTT_ADJUSTMENT_FACTOR,
            downloadThroughputKbps: 700 * DEVTOOLS_THROUGHPUT_ADJUSTMENT_FACTOR,
            uploadThroughputKbps: 700 * DEVTOOLS_THROUGHPUT_ADJUSTMENT_FACTOR,
            cpuSlowdownMultiplier: 4
          },
          // Using a "broadband" connection type
          // Corresponds to "Dense 4G 25th percentile" in https://docs.google.com/document/d/1Ft1Bnq9-t4jK5egLSOc28IL4TvR-Tt0se_1faTA4KTY/edit#heading=h.bb7nfy2x9e5v
          desktopDense4G: {
            rttMs: 40,
            throughputKbps: 10 * 1024,
            cpuSlowdownMultiplier: 1,
            requestLatencyMs: 0,
            // 0 means unset
            downloadThroughputKbps: 0,
            uploadThroughputKbps: 0
          }
        };
        Constants = { throttling };
      }
    });
    init_DNSCache = __esm2({
      "node_modules/@paulirish/trace_engine/models/trace/lantern/simulation/DNSCache.js"() {
        init_process_global();
        DNS_RESOLUTION_RTT_MULTIPLIER = 2;
        DNSCache = class _DNSCache {
          static {
            __name(this, "DNSCache");
          }
          static rttMultiplier = DNS_RESOLUTION_RTT_MULTIPLIER;
          rtt;
          resolvedDomainNames;
          constructor({ rtt }) {
            this.rtt = rtt;
            this.resolvedDomainNames = /* @__PURE__ */ new Map();
          }
          getTimeUntilResolution(request3, options2) {
            const { requestedAt = 0, shouldUpdateCache = false } = options2 || {};
            const domain = request3.parsedURL.host;
            const cacheEntry = this.resolvedDomainNames.get(domain);
            let timeUntilResolved = this.rtt * _DNSCache.rttMultiplier;
            if (cacheEntry) {
              const timeUntilCachedIsResolved = Math.max(cacheEntry.resolvedAt - requestedAt, 0);
              timeUntilResolved = Math.min(timeUntilCachedIsResolved, timeUntilResolved);
            }
            const resolvedAt = requestedAt + timeUntilResolved;
            if (shouldUpdateCache) {
              this.updateCacheResolvedAtIfNeeded(request3, resolvedAt);
            }
            return timeUntilResolved;
          }
          updateCacheResolvedAtIfNeeded(request3, resolvedAt) {
            const domain = request3.parsedURL.host;
            const cacheEntry = this.resolvedDomainNames.get(domain) || { resolvedAt };
            cacheEntry.resolvedAt = Math.min(cacheEntry.resolvedAt, resolvedAt);
            this.resolvedDomainNames.set(domain, cacheEntry);
          }
          /**
           * Forcefully sets the DNS resolution time for a request.
           * Useful for testing and alternate execution simulations.
           */
          setResolvedAt(domain, resolvedAt) {
            this.resolvedDomainNames.set(domain, { resolvedAt });
          }
        };
      }
    });
    init_SimulationTimingMap = __esm2({
      "node_modules/@paulirish/trace_engine/models/trace/lantern/simulation/SimulationTimingMap.js"() {
        init_process_global();
        init_core();
        init_graph();
        SimulatorTimingMap = class {
          static {
            __name(this, "SimulatorTimingMap");
          }
          nodeTimings;
          constructor() {
            this.nodeTimings = /* @__PURE__ */ new Map();
          }
          getNodes() {
            return Array.from(this.nodeTimings.keys());
          }
          setReadyToStart(node2, values) {
            this.nodeTimings.set(node2, values);
          }
          setInProgress(node2, values) {
            const nodeTiming = {
              ...this.getQueued(node2),
              startTime: values.startTime,
              timeElapsed: 0
            };
            this.nodeTimings.set(node2, node2.type === BaseNode.types.NETWORK ? { ...nodeTiming, timeElapsedOvershoot: 0, bytesDownloaded: 0 } : nodeTiming);
          }
          setCompleted(node2, values) {
            const nodeTiming = {
              ...this.getInProgress(node2),
              endTime: values.endTime,
              connectionTiming: values.connectionTiming
            };
            this.nodeTimings.set(node2, nodeTiming);
          }
          setCpu(node2, values) {
            const nodeTiming = {
              ...this.getCpuStarted(node2),
              timeElapsed: values.timeElapsed
            };
            this.nodeTimings.set(node2, nodeTiming);
          }
          setCpuEstimated(node2, values) {
            const nodeTiming = {
              ...this.getCpuStarted(node2),
              estimatedTimeElapsed: values.estimatedTimeElapsed
            };
            this.nodeTimings.set(node2, nodeTiming);
          }
          setNetwork(node2, values) {
            const nodeTiming = {
              ...this.getNetworkStarted(node2),
              timeElapsed: values.timeElapsed,
              timeElapsedOvershoot: values.timeElapsedOvershoot,
              bytesDownloaded: values.bytesDownloaded
            };
            this.nodeTimings.set(node2, nodeTiming);
          }
          setNetworkEstimated(node2, values) {
            const nodeTiming = {
              ...this.getNetworkStarted(node2),
              estimatedTimeElapsed: values.estimatedTimeElapsed
            };
            this.nodeTimings.set(node2, nodeTiming);
          }
          getQueued(node2) {
            const timing = this.nodeTimings.get(node2);
            if (!timing) {
              throw new LanternError(`Node ${node2.id} not yet queued`);
            }
            return timing;
          }
          getCpuStarted(node2) {
            const timing = this.nodeTimings.get(node2);
            if (!timing) {
              throw new LanternError(`Node ${node2.id} not yet queued`);
            }
            if (!("startTime" in timing)) {
              throw new LanternError(`Node ${node2.id} not yet started`);
            }
            if ("bytesDownloaded" in timing) {
              throw new LanternError(`Node ${node2.id} timing not valid`);
            }
            return timing;
          }
          getNetworkStarted(node2) {
            const timing = this.nodeTimings.get(node2);
            if (!timing) {
              throw new LanternError(`Node ${node2.id} not yet queued`);
            }
            if (!("startTime" in timing)) {
              throw new LanternError(`Node ${node2.id} not yet started`);
            }
            if (!("bytesDownloaded" in timing)) {
              throw new LanternError(`Node ${node2.id} timing not valid`);
            }
            return timing;
          }
          getInProgress(node2) {
            const timing = this.nodeTimings.get(node2);
            if (!timing) {
              throw new LanternError(`Node ${node2.id} not yet queued`);
            }
            if (!("startTime" in timing)) {
              throw new LanternError(`Node ${node2.id} not yet started`);
            }
            if (!("estimatedTimeElapsed" in timing)) {
              throw new LanternError(`Node ${node2.id} not yet in progress`);
            }
            return timing;
          }
          getCompleted(node2) {
            const timing = this.nodeTimings.get(node2);
            if (!timing) {
              throw new LanternError(`Node ${node2.id} not yet queued`);
            }
            if (!("startTime" in timing)) {
              throw new LanternError(`Node ${node2.id} not yet started`);
            }
            if (!("estimatedTimeElapsed" in timing)) {
              throw new LanternError(`Node ${node2.id} not yet in progress`);
            }
            if (!("endTime" in timing)) {
              throw new LanternError(`Node ${node2.id} not yet completed`);
            }
            return timing;
          }
        };
      }
    });
    init_Simulator = __esm2({
      "node_modules/@paulirish/trace_engine/models/trace/lantern/simulation/Simulator.js"() {
        init_process_global();
        init_core();
        init_graph();
        init_ConnectionPool();
        init_Constants();
        init_DNSCache();
        init_SimulationTimingMap();
        init_TCPConnection();
        defaultThrottling = Constants.throttling.mobileSlow4G;
        DEFAULT_MAXIMUM_CONCURRENT_REQUESTS = 10;
        DEFAULT_LAYOUT_TASK_MULTIPLIER = 0.5;
        DEFAULT_MAXIMUM_CPU_TASK_DURATION = 1e4;
        NodeState = {
          NotReadyToStart: 0,
          ReadyToStart: 1,
          InProgress: 2,
          Complete: 3
        };
        PriorityStartTimePenalty = {
          VeryHigh: 0,
          High: 0.25,
          Medium: 0.5,
          Low: 1,
          VeryLow: 2
        };
        ALL_SIMULATION_NODE_TIMINGS = /* @__PURE__ */ new Map();
        Simulator = class _Simulator {
          static {
            __name(this, "Simulator");
          }
          static createSimulator(settings) {
            const { throttlingMethod, throttling: throttling32, precomputedLanternData, networkAnalysis } = settings;
            const options2 = {
              additionalRttByOrigin: networkAnalysis.additionalRttByOrigin,
              serverResponseTimeByOrigin: networkAnalysis.serverResponseTimeByOrigin,
              observedThroughput: networkAnalysis.throughput
            };
            if (precomputedLanternData) {
              options2.additionalRttByOrigin = new Map(Object.entries(precomputedLanternData.additionalRttByOrigin));
              options2.serverResponseTimeByOrigin = new Map(Object.entries(precomputedLanternData.serverResponseTimeByOrigin));
            }
            switch (throttlingMethod) {
              case "provided":
                options2.rtt = networkAnalysis.rtt;
                options2.throughput = networkAnalysis.throughput;
                options2.cpuSlowdownMultiplier = 1;
                options2.layoutTaskMultiplier = 1;
                break;
              case "devtools":
                if (throttling32) {
                  options2.rtt = throttling32.requestLatencyMs / Constants.throttling.DEVTOOLS_RTT_ADJUSTMENT_FACTOR;
                  options2.throughput = throttling32.downloadThroughputKbps * 1024 / Constants.throttling.DEVTOOLS_THROUGHPUT_ADJUSTMENT_FACTOR;
                }
                options2.cpuSlowdownMultiplier = 1;
                options2.layoutTaskMultiplier = 1;
                break;
              case "simulate":
                if (throttling32) {
                  options2.rtt = throttling32.rttMs;
                  options2.throughput = throttling32.throughputKbps * 1024;
                  options2.cpuSlowdownMultiplier = throttling32.cpuSlowdownMultiplier;
                }
                break;
              default:
                break;
            }
            return new _Simulator(options2);
          }
          options;
          _rtt;
          throughput;
          maximumConcurrentRequests;
          cpuSlowdownMultiplier;
          layoutTaskMultiplier;
          cachedNodeListByStartPosition;
          nodeTimings;
          numberInProgressByType;
          nodes;
          dns;
          connectionPool;
          constructor(options2) {
            this.options = Object.assign({
              rtt: defaultThrottling.rttMs,
              throughput: defaultThrottling.throughputKbps * 1024,
              maximumConcurrentRequests: DEFAULT_MAXIMUM_CONCURRENT_REQUESTS,
              cpuSlowdownMultiplier: defaultThrottling.cpuSlowdownMultiplier,
              layoutTaskMultiplier: DEFAULT_LAYOUT_TASK_MULTIPLIER,
              additionalRttByOrigin: /* @__PURE__ */ new Map(),
              serverResponseTimeByOrigin: /* @__PURE__ */ new Map()
            }, options2);
            this._rtt = this.options.rtt;
            this.throughput = this.options.throughput;
            this.maximumConcurrentRequests = Math.max(Math.min(TCPConnection.maximumSaturatedConnections(this._rtt, this.throughput), this.options.maximumConcurrentRequests), 1);
            this.cpuSlowdownMultiplier = this.options.cpuSlowdownMultiplier;
            this.layoutTaskMultiplier = this.cpuSlowdownMultiplier * this.options.layoutTaskMultiplier;
            this.cachedNodeListByStartPosition = [];
            this.nodeTimings = new SimulatorTimingMap();
            this.numberInProgressByType = /* @__PURE__ */ new Map();
            this.nodes = {};
            this.dns = new DNSCache({ rtt: this._rtt });
            this.connectionPool = null;
            if (!Number.isFinite(this._rtt)) {
              throw new LanternError(`Invalid rtt ${this._rtt}`);
            }
            if (!Number.isFinite(this.throughput)) {
              throw new LanternError(`Invalid throughput ${this.throughput}`);
            }
          }
          get rtt() {
            return this._rtt;
          }
          initializeConnectionPool(graph22) {
            const records = [];
            graph22.getRootNode().traverse((node2) => {
              if (node2.type === BaseNode.types.NETWORK) {
                records.push(node2.request);
              }
            });
            this.connectionPool = new ConnectionPool(records, this.options);
          }
          /**
           * Initializes the various state data structures such _nodeTimings and the _node Sets by state.
           */
          initializeAuxiliaryData() {
            this.nodeTimings = new SimulatorTimingMap();
            this.numberInProgressByType = /* @__PURE__ */ new Map();
            this.nodes = {};
            this.cachedNodeListByStartPosition = [];
            for (const state of Object.values(NodeState)) {
              this.nodes[state] = /* @__PURE__ */ new Set();
            }
          }
          numberInProgress(type2) {
            return this.numberInProgressByType.get(type2) || 0;
          }
          markNodeAsReadyToStart(node2, queuedTime) {
            const nodeStartPosition = _Simulator.computeNodeStartPosition(node2);
            const firstNodeIndexWithGreaterStartPosition = this.cachedNodeListByStartPosition.findIndex((candidate) => _Simulator.computeNodeStartPosition(candidate) > nodeStartPosition);
            const insertionIndex = firstNodeIndexWithGreaterStartPosition === -1 ? this.cachedNodeListByStartPosition.length : firstNodeIndexWithGreaterStartPosition;
            this.cachedNodeListByStartPosition.splice(insertionIndex, 0, node2);
            this.nodes[NodeState.ReadyToStart].add(node2);
            this.nodes[NodeState.NotReadyToStart].delete(node2);
            this.nodeTimings.setReadyToStart(node2, { queuedTime });
          }
          markNodeAsInProgress(node2, startTime) {
            const indexOfNodeToStart = this.cachedNodeListByStartPosition.indexOf(node2);
            this.cachedNodeListByStartPosition.splice(indexOfNodeToStart, 1);
            this.nodes[NodeState.InProgress].add(node2);
            this.nodes[NodeState.ReadyToStart].delete(node2);
            this.numberInProgressByType.set(node2.type, this.numberInProgress(node2.type) + 1);
            this.nodeTimings.setInProgress(node2, { startTime });
          }
          markNodeAsComplete(node2, endTime, connectionTiming) {
            this.nodes[NodeState.Complete].add(node2);
            this.nodes[NodeState.InProgress].delete(node2);
            this.numberInProgressByType.set(node2.type, this.numberInProgress(node2.type) - 1);
            this.nodeTimings.setCompleted(node2, { endTime, connectionTiming });
            for (const dependent of node2.getDependents()) {
              const dependencies2 = dependent.getDependencies();
              if (dependencies2.some((dep) => !this.nodes[NodeState.Complete].has(dep))) {
                continue;
              }
              this.markNodeAsReadyToStart(dependent, endTime);
            }
          }
          acquireConnection(request3) {
            return this.connectionPool.acquire(request3);
          }
          getNodesSortedByStartPosition() {
            return Array.from(this.cachedNodeListByStartPosition);
          }
          startNodeIfPossible(node2, totalElapsedTime) {
            if (node2.type === BaseNode.types.CPU) {
              if (this.numberInProgress(node2.type) === 0) {
                this.markNodeAsInProgress(node2, totalElapsedTime);
              }
              return;
            }
            if (node2.type !== BaseNode.types.NETWORK) {
              throw new LanternError("Unsupported");
            }
            if (!node2.isConnectionless) {
              const numberOfActiveRequests = this.numberInProgress(node2.type);
              if (numberOfActiveRequests >= this.maximumConcurrentRequests) {
                return;
              }
              const connection = this.acquireConnection(node2.request);
              if (!connection) {
                return;
              }
            }
            this.markNodeAsInProgress(node2, totalElapsedTime);
          }
          /**
           * Updates each connection in use with the available throughput based on the number of network requests
           * currently in flight.
           */
          updateNetworkCapacity() {
            const inFlight = this.numberInProgress(BaseNode.types.NETWORK);
            if (inFlight === 0) {
              return;
            }
            for (const connection of this.connectionPool.connectionsInUse()) {
              connection.setThroughput(this.throughput / inFlight);
            }
          }
          /**
           * Estimates the number of milliseconds remaining given current conditions before the node is complete.
           */
          estimateTimeRemaining(node2) {
            if (node2.type === BaseNode.types.CPU) {
              return this.estimateCPUTimeRemaining(node2);
            }
            if (node2.type === BaseNode.types.NETWORK) {
              return this.estimateNetworkTimeRemaining(node2);
            }
            throw new LanternError("Unsupported");
          }
          estimateCPUTimeRemaining(cpuNode) {
            const timingData = this.nodeTimings.getCpuStarted(cpuNode);
            const multiplier = cpuNode.didPerformLayout() ? this.layoutTaskMultiplier : this.cpuSlowdownMultiplier;
            const totalDuration = Math.min(Math.round(cpuNode.duration / 1e3 * multiplier), DEFAULT_MAXIMUM_CPU_TASK_DURATION);
            const estimatedTimeElapsed = totalDuration - timingData.timeElapsed;
            this.nodeTimings.setCpuEstimated(cpuNode, { estimatedTimeElapsed });
            return estimatedTimeElapsed;
          }
          estimateNetworkTimeRemaining(networkNode) {
            const request3 = networkNode.request;
            const timingData = this.nodeTimings.getNetworkStarted(networkNode);
            let timeElapsed = 0;
            if (networkNode.fromDiskCache) {
              const sizeInMb = (request3.resourceSize || 0) / 1024 / 1024;
              timeElapsed = 8 + 20 * sizeInMb - timingData.timeElapsed;
            } else if (networkNode.isNonNetworkProtocol) {
              const sizeInMb = (request3.resourceSize || 0) / 1024 / 1024;
              timeElapsed = 2 + 10 * sizeInMb - timingData.timeElapsed;
            } else {
              const connection = this.connectionPool.acquireActiveConnectionFromRequest(request3);
              const dnsResolutionTime = this.dns.getTimeUntilResolution(request3, {
                requestedAt: timingData.startTime,
                shouldUpdateCache: true
              });
              const timeAlreadyElapsed = timingData.timeElapsed;
              const calculation = connection.simulateDownloadUntil(request3.transferSize - timingData.bytesDownloaded, { timeAlreadyElapsed, dnsResolutionTime, maximumTimeToElapse: Infinity });
              timeElapsed = calculation.timeElapsed;
            }
            const estimatedTimeElapsed = timeElapsed + timingData.timeElapsedOvershoot;
            this.nodeTimings.setNetworkEstimated(networkNode, { estimatedTimeElapsed });
            return estimatedTimeElapsed;
          }
          /**
           * Computes and returns the minimum estimated completion time of the nodes currently in progress.
           */
          findNextNodeCompletionTime() {
            let minimumTime = Infinity;
            for (const node2 of this.nodes[NodeState.InProgress]) {
              minimumTime = Math.min(minimumTime, this.estimateTimeRemaining(node2));
            }
            return minimumTime;
          }
          /**
           * Given a time period, computes the progress toward completion that the node made during that time.
           */
          updateProgressMadeInTimePeriod(node2, timePeriodLength, totalElapsedTime) {
            const timingData = this.nodeTimings.getInProgress(node2);
            const isFinished = timingData.estimatedTimeElapsed === timePeriodLength;
            if (node2.type === BaseNode.types.CPU || node2.isConnectionless) {
              if (isFinished) {
                this.markNodeAsComplete(node2, totalElapsedTime);
              } else {
                timingData.timeElapsed += timePeriodLength;
              }
              return;
            }
            if (node2.type !== BaseNode.types.NETWORK) {
              throw new LanternError("Unsupported");
            }
            if (!("bytesDownloaded" in timingData)) {
              throw new LanternError("Invalid timing data");
            }
            const request3 = node2.request;
            const connection = this.connectionPool.acquireActiveConnectionFromRequest(request3);
            const dnsResolutionTime = this.dns.getTimeUntilResolution(request3, {
              requestedAt: timingData.startTime,
              shouldUpdateCache: true
            });
            const calculation = connection.simulateDownloadUntil(request3.transferSize - timingData.bytesDownloaded, {
              dnsResolutionTime,
              timeAlreadyElapsed: timingData.timeElapsed,
              maximumTimeToElapse: timePeriodLength - timingData.timeElapsedOvershoot
            });
            connection.setCongestionWindow(calculation.congestionWindow);
            connection.setH2OverflowBytesDownloaded(calculation.extraBytesDownloaded);
            if (isFinished) {
              connection.setWarmed(true);
              this.connectionPool.release(request3);
              this.markNodeAsComplete(node2, totalElapsedTime, calculation.connectionTiming);
            } else {
              timingData.timeElapsed += calculation.timeElapsed;
              timingData.timeElapsedOvershoot += calculation.timeElapsed - timePeriodLength;
              timingData.bytesDownloaded += calculation.bytesDownloaded;
            }
          }
          computeFinalNodeTimings() {
            const completeNodeTimingEntries = this.nodeTimings.getNodes().map((node2) => {
              return [node2, this.nodeTimings.getCompleted(node2)];
            });
            completeNodeTimingEntries.sort((a, b) => a[1].startTime - b[1].startTime);
            const nodeTimingEntries = completeNodeTimingEntries.map(([node2, timing]) => {
              return [
                node2,
                {
                  startTime: timing.startTime,
                  endTime: timing.endTime,
                  duration: timing.endTime - timing.startTime
                }
              ];
            });
            return {
              nodeTimings: new Map(nodeTimingEntries),
              completeNodeTimings: new Map(completeNodeTimingEntries)
            };
          }
          getOptions() {
            return this.options;
          }
          /**
           * Estimates the time taken to process all of the graph's nodes, returns the overall time along with
           * each node annotated by start/end times.
           *
           * Simulator/connection pool are allowed to deviate from what was
           * observed in the trace/devtoolsLog and start requests as soon as they are queued (i.e. do not
           * wait around for a warm connection to be available if the original request was fetched on a warm
           * connection).
           */
          simulate(graph22, options2) {
            if (BaseNode.findCycle(graph22)) {
              throw new LanternError("Cannot simulate graph with cycle");
            }
            options2 = Object.assign({
              label: void 0
            }, options2);
            this.dns = new DNSCache({ rtt: this._rtt });
            this.initializeConnectionPool(graph22);
            this.initializeAuxiliaryData();
            const nodesNotReadyToStart = this.nodes[NodeState.NotReadyToStart];
            const nodesReadyToStart = this.nodes[NodeState.ReadyToStart];
            const nodesInProgress = this.nodes[NodeState.InProgress];
            const rootNode = graph22.getRootNode();
            rootNode.traverse((node2) => nodesNotReadyToStart.add(node2));
            let totalElapsedTime = 0;
            let iteration = 0;
            this.markNodeAsReadyToStart(rootNode, totalElapsedTime);
            while (nodesReadyToStart.size || nodesInProgress.size) {
              for (const node2 of this.getNodesSortedByStartPosition()) {
                this.startNodeIfPossible(node2, totalElapsedTime);
              }
              if (!nodesInProgress.size) {
                throw new LanternError("Failed to start a node");
              }
              this.updateNetworkCapacity();
              const minimumTime = this.findNextNodeCompletionTime();
              totalElapsedTime += minimumTime;
              if (!Number.isFinite(minimumTime) || iteration > 1e5) {
                throw new LanternError("Simulation failed, depth exceeded");
              }
              iteration++;
              for (const node2 of nodesInProgress) {
                this.updateProgressMadeInTimePeriod(node2, minimumTime, totalElapsedTime);
              }
            }
            const { nodeTimings, completeNodeTimings } = this.computeFinalNodeTimings();
            ALL_SIMULATION_NODE_TIMINGS.set(options2.label || "unlabeled", completeNodeTimings);
            return {
              timeInMs: totalElapsedTime,
              nodeTimings
            };
          }
          computeWastedMsFromWastedBytes(wastedBytes) {
            const { throughput, observedThroughput } = this.options;
            const bitsPerSecond = throughput === 0 ? observedThroughput : throughput;
            if (bitsPerSecond === 0) {
              return 0;
            }
            const wastedBits = wastedBytes * 8;
            const wastedMs = wastedBits / bitsPerSecond * 1e3;
            return Math.round(wastedMs / 10) * 10;
          }
          // Used by Lighthouse asset-saver
          static get allNodeTimings() {
            return ALL_SIMULATION_NODE_TIMINGS;
          }
          /**
           * We attempt to start nodes by their observed start time using the request priority as a tie breaker.
           * When simulating, just because a low priority image started 5ms before a high priority image doesn't mean
           * it would have happened like that when the network was slower.
           */
          static computeNodeStartPosition(node2) {
            if (node2.type === "cpu") {
              return node2.startTime;
            }
            return node2.startTime + (PriorityStartTimePenalty[node2.request.priority] * 1e3 * 1e3 || 0);
          }
        };
      }
    });
    simulation_exports = {};
    __export2(simulation_exports, {
      ConnectionPool: () => ConnectionPool,
      Constants: () => Constants,
      DNSCache: () => DNSCache,
      Simulator: () => Simulator,
      SimulatorTimingMap: () => SimulatorTimingMap,
      TCPConnection: () => TCPConnection
    });
    init_simulation = __esm2({
      "node_modules/@paulirish/trace_engine/models/trace/lantern/simulation/simulation.js"() {
        init_process_global();
        init_ConnectionPool();
        init_Constants();
        init_DNSCache();
        init_SimulationTimingMap();
        init_Simulator();
        init_TCPConnection();
      }
    });
    init_Lantern = __esm2({
      "node_modules/@paulirish/trace_engine/models/trace/lantern/types/Lantern.js"() {
        init_process_global();
        NetworkRequestTypes = {
          XHR: "XHR",
          Fetch: "Fetch",
          EventSource: "EventSource",
          Script: "Script",
          Stylesheet: "Stylesheet",
          Image: "Image",
          Media: "Media",
          Font: "Font",
          Document: "Document",
          TextTrack: "TextTrack",
          WebSocket: "WebSocket",
          Other: "Other",
          Manifest: "Manifest",
          SignedExchange: "SignedExchange",
          Ping: "Ping",
          Preflight: "Preflight",
          CSPViolationReport: "CSPViolationReport",
          Prefetch: "Prefetch",
          FedCM: "FedCM"
        };
      }
    });
    types_exports = {};
    __export2(types_exports, {
      NetworkRequestTypes: () => NetworkRequestTypes
    });
    init_types = __esm2({
      "node_modules/@paulirish/trace_engine/models/trace/lantern/types/types.js"() {
        init_process_global();
        init_Lantern();
      }
    });
    init_lantern = __esm2({
      "node_modules/@paulirish/trace_engine/models/trace/lantern/lantern.js"() {
        init_process_global();
        init_core();
        init_graph();
        init_metrics();
        init_simulation();
        init_types();
      }
    });
    require_create_entity_finder_api = __commonJS({
      "node_modules/@paulirish/trace_engine/node_modules/third-party-web/lib/create-entity-finder-api.js"(exports2, module2) {
        init_process_global();
        var DOMAIN_IN_URL_REGEX = /:\/\/(\S*?)(:\d+)?(\/|$)/;
        var DOMAIN_CHARACTERS = /([a-z0-9.-]+\.[a-z0-9]+|localhost)/i;
        var IP_REGEX = /^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/;
        var ROOT_DOMAIN_REGEX = /[^.]+\.([^.]+|(gov|com|co|ne)\.\w{2})$/i;
        function getDomainFromOriginOrURL(originOrURL) {
          if (typeof originOrURL !== "string")
            return null;
          if (originOrURL.length > 1e4 || originOrURL.startsWith("data:"))
            return null;
          if (DOMAIN_IN_URL_REGEX.test(originOrURL))
            return originOrURL.match(DOMAIN_IN_URL_REGEX)[1];
          if (DOMAIN_CHARACTERS.test(originOrURL))
            return originOrURL.match(DOMAIN_CHARACTERS)[0];
          return null;
        }
        __name(getDomainFromOriginOrURL, "getDomainFromOriginOrURL");
        function getRootDomain(originOrURL) {
          const domain = getDomainFromOriginOrURL(originOrURL);
          if (!domain)
            return null;
          if (IP_REGEX.test(domain))
            return domain;
          const match = domain.match(ROOT_DOMAIN_REGEX);
          return match && match[0] || domain;
        }
        __name(getRootDomain, "getRootDomain");
        function sliceSubdomainFromDomain(domain, rootDomain) {
          if (domain.length <= rootDomain.length)
            return domain;
          return domain.split(".").slice(1).join(".");
        }
        __name(sliceSubdomainFromDomain, "sliceSubdomainFromDomain");
        function getEntityInDataset(entityByDomain, entityBySubDomain, entityByRootDomain, originOrURL) {
          const domain = getDomainFromOriginOrURL(originOrURL);
          const rootDomain = getRootDomain(domain);
          if (!domain || !rootDomain)
            return void 0;
          if (entityByDomain.has(domain))
            return entityByDomain.get(domain);
          for (let subdomain = domain; subdomain.length > rootDomain.length; subdomain = sliceSubdomainFromDomain(subdomain, rootDomain)) {
            if (entityBySubDomain.has(subdomain))
              return entityBySubDomain.get(subdomain);
          }
          if (entityByRootDomain.has(rootDomain))
            return entityByRootDomain.get(rootDomain);
          return void 0;
        }
        __name(getEntityInDataset, "getEntityInDataset");
        function getProductInDataset(entityByDomain, entityBySubDomain, entityByRootDomain, originOrURL) {
          const entity = getEntityInDataset(entityByDomain, entityBySubDomain, entityByRootDomain, originOrURL);
          const products = entity && entity.products;
          if (!products)
            return void 0;
          if (typeof originOrURL !== "string")
            return void 0;
          for (const product of products) {
            for (const pattern2 of product.urlPatterns) {
              if (pattern2 instanceof RegExp && pattern2.test(originOrURL))
                return product;
              if (typeof pattern2 === "string" && originOrURL.includes(pattern2))
                return product;
            }
          }
          return void 0;
        }
        __name(getProductInDataset, "getProductInDataset");
        function cloneEntities(entities) {
          return entities.map((entity_) => {
            const entity = {
              company: entity_.name,
              categories: [entity_.category],
              ...entity_
            };
            const products = (entity_.products || []).map((product) => ({
              company: entity.company,
              category: entity.category,
              categories: [entity.category],
              facades: [],
              ...product,
              urlPatterns: (product.urlPatterns || []).map((s) => s.startsWith("REGEXP:") ? new RegExp(s.slice("REGEXP:".length)) : s)
            }));
            entity.products = products;
            return entity;
          });
        }
        __name(cloneEntities, "cloneEntities");
        function createAPIFromDataset(entities_) {
          const entities = cloneEntities(entities_);
          const entityByDomain = /* @__PURE__ */ new Map();
          const entityByRootDomain = /* @__PURE__ */ new Map();
          const entityBySubDomain = /* @__PURE__ */ new Map();
          for (const entity of entities) {
            entity.totalExecutionTime = Number(entity.totalExecutionTime) || 0;
            entity.totalOccurrences = Number(entity.totalOccurrences) || 0;
            entity.averageExecutionTime = entity.totalExecutionTime / entity.totalOccurrences;
            for (const domain of entity.domains) {
              if (entityByDomain.has(domain)) {
                const duplicate = entityByDomain.get(domain);
                throw new Error(`Duplicate domain ${domain} (${entity.name} and ${duplicate.name})`);
              }
              entityByDomain.set(domain, entity);
              const rootDomain = getRootDomain(domain);
              if (domain.startsWith("*.")) {
                const wildcardDomain = domain.slice(2);
                if (wildcardDomain === rootDomain)
                  entityByRootDomain.set(rootDomain, entity);
                else
                  entityBySubDomain.set(wildcardDomain, entity);
              }
            }
          }
          for (const [rootDomain, entity] of entityByRootDomain.entries()) {
            if (!entity)
              entityByRootDomain.delete(rootDomain);
          }
          const getEntity = getEntityInDataset.bind(null, entityByDomain, entityBySubDomain, entityByRootDomain);
          const getProduct = getProductInDataset.bind(null, entityByDomain, entityBySubDomain, entityByRootDomain);
          return { getEntity, getProduct, getRootDomain, entities };
        }
        __name(createAPIFromDataset, "createAPIFromDataset");
        module2.exports = { createAPIFromDataset };
      }
    });
    require_entities = __commonJS({
      "node_modules/@paulirish/trace_engine/node_modules/third-party-web/dist/entities.json"(exports2, module2) {
        module2.exports = [
          { name: "Google/Doubleclick Ads", company: "Google", homepage: "https://marketingplatform.google.com/about/enterprise/", category: "ad", domains: ["adservice.google.com", "adservice.google.com.au", "adservice.google.com.sg", "adservice.google.com.br", "adservice.google.com.ua", "adservice.google.co.uk", "adservice.google.co.jp", "adservice.google.co.in", "adservice.google.co.kr", "adservice.google.co.id", "adservice.google.co.nz", "adservice.google.ie", "adservice.google.se", "adservice.google.de", "adservice.google.ca", "adservice.google.be", "adservice.google.es", "adservice.google.ch", "adservice.google.fr", "adservice.google.nl", "*.googleadservices.com", "*.googlesyndication.com", "*.googletagservices.com", "*.2mdn.net", "*.doubleclick.net"], examples: ["pagead2.googlesyndication.com", "tpc.googlesyndication.com", "ade.googlesyndication.com", "googleads.g.doubleclick.net", "googleads4.g.doubleclick.net", "securepubads.g.doubleclick.net", "pubads.g.doubleclick.net", "static.doubleclick.net", "cm.g.doubleclick.net", "bid.g.doubleclick.net", "s0.2mdn.net", "stats.g.doubleclick.net", "survey.g.doubleclick.net", "fls.doubleclick.net", "ad.doubleclick.net", "www.googleadservices.com", "https://www.googletagservices.com/tag/js/gpt.js"], totalExecutionTime: 3224311743, totalOccurrences: 1232210 },
          {
            name: "Facebook",
            homepage: "https://www.facebook.com",
            category: "social",
            domains: ["*.facebook.com", "*.atlassbx.com", "*.fbsbx.com", "fbcdn-photos-e-a.akamaihd.net", "*.facebook.net", "*.fbcdn.net"],
            examples: ["www.facebook.com", "connect.facebook.net", "staticxx.facebook.com", "static.xx.fbcdn.net", "m.facebook.com", "an.facebook.com", "platform-lookaside.fbsbx.com"],
            products: [{ name: "Facebook Messenger Customer Chat", urlPatterns: ["REGEXP:connect\\.facebook\\.net\\/.*\\/sdk\\/xfbml\\.customerchat\\.js"], facades: [{ name: "React Live Chat Loader", repo: "https://github.com/calibreapp/react-live-chat-loader" }] }],
            totalExecutionTime: 1097107210,
            totalOccurrences: 3157799
          },
          { name: "Instagram", homepage: "https://www.instagram.com", category: "social", domains: ["*.cdninstagram.com", "*.instagram.com"], examples: ["scontent.cdninstagram.com"], totalExecutionTime: 31988464, totalOccurrences: 20376 },
          { name: "Google CDN", company: "Google", homepage: "https://developers.google.com/speed/libraries/", category: "cdn", domains: ["ajax.googleapis.com", "commondatastorage.googleapis.com", "www.gstatic.com", "ssl.gstatic.com"], totalExecutionTime: 4805631169, totalOccurrences: 3192326 },
          {
            name: "Google Maps",
            company: "Google",
            homepage: "https://www.google.com/maps",
            category: "utility",
            domains: ["maps.google.com", "maps-api-ssl.google.com", "maps.googleapis.com", "mts.googleapis.com", "mt.googleapis.com", "mt0.googleapis.com", "mt1.googleapis.com", "mt2.googleapis.com", "mt3.googleapis.com", "khm0.googleapis.com", "khm1.googleapis.com", "khms.googleapis.com", "khms1.googleapis.com", "khms2.googleapis.com", "maps.gstatic.com"],
            totalExecutionTime: 904392768,
            totalOccurrences: 1195850
          },
          { name: "Other Google APIs/SDKs", company: "Google", homepage: "https://developers.google.com/apis-explorer/#p/", category: "utility", domains: ["accounts.google.com", "apis.google.com", "calendar.google.com", "clients2.google.com", "cse.google.com", "news.google.com", "pay.google.com", "payments.google.com", "play.google.com", "smartlock.google.com", "www.google.com", "www.google.de", "www.google.co.jp", "www.google.com.au", "www.google.co.uk", "www.google.ie", "www.google.com.sg", "www.google.co.in", "www.google.com.br", "www.google.ca", "www.google.co.kr", "www.google.co.nz", "www.google.co.id", "www.google.fr", "www.google.be", "www.google.com.ua", "www.google.nl", "www.google.ru", "www.google.se", "www.googleapis.com", "imasdk.googleapis.com", "storage.googleapis.com", "translate.googleapis.com", "translate.google.com", "translate-pa.googleapis.com", "lh3.googleusercontent.com", "jnn-pa.googleapis.com", "csi.gstatic.com"], totalExecutionTime: 1158368443, totalOccurrences: 2638940 },
          { name: "Firebase", homepage: "https://developers.google.com/apis-explorer/#p/", category: "utility", domains: ["firebasestorage.googleapis.com", "firestore.googleapis.com", "firebaseinstallations.googleapis.com", "firebase.googleapis.com", "firebaseremoteconfig.googleapis.com"], totalExecutionTime: 201194, totalOccurrences: 493 },
          { name: "Google Analytics", company: "Google", homepage: "https://marketingplatform.google.com/about/analytics/", category: "analytics", domains: ["*.google-analytics.com", "*.urchin.com", "analytics.google.com"], examples: ["www.google-analytics.com", "ssl.google-analytics.com", "analytics.google.com/g/collect"], totalExecutionTime: 495649535, totalOccurrences: 4231882 },
          { name: "Google Optimize", company: "Google", homepage: "https://marketingplatform.google.com/about/optimize/", category: "analytics", domains: ["www.googleoptimize.com"], examples: ["https://www.googleoptimize.com/optimize.js?id="], totalExecutionTime: 9330261, totalOccurrences: 38797 },
          { name: "Google AMP", company: "Google", homepage: "https://github.com/google/amp-client-id-library", category: "analytics", domains: ["ampcid.google.com"] },
          { name: "Google Tag Manager", company: "Google", homepage: "https://marketingplatform.google.com/about/tag-manager/", category: "tag-manager", domains: ["*.googletagmanager.com"], examples: ["www.googletagmanager.com"], totalExecutionTime: 6770912735, totalOccurrences: 8124119 },
          { name: "Google Fonts", company: "Google", homepage: "https://fonts.google.com/", category: "cdn", domains: ["fonts.googleapis.com", "fonts.gstatic.com"], totalExecutionTime: 53081, totalOccurrences: 220864 },
          { name: "Adobe TypeKit", company: "Adobe", homepage: "https://fonts.adobe.com/", category: "cdn", domains: ["*.typekit.com", "*.typekit.net"], examples: ["use.typekit.net", "p.typekit.net"], totalExecutionTime: 78981507, totalOccurrences: 119621 },
          { name: "YouTube", homepage: "https://youtube.com", category: "video", domains: ["*.youtube.com", "*.ggpht.com", "*.youtube-nocookie.com", "*.ytimg.com"], examples: ["www.youtube.com", "s.ytimg.com", "yt3.ggpht.com", "img.youtube.com", "fcmatch.youtube.com"], products: [{ name: "YouTube Embedded Player", urlPatterns: ["youtube.com/embed/"], facades: [{ name: "Lite YouTube", repo: "https://github.com/paulirish/lite-youtube-embed" }, { name: "Ngx Lite Video", repo: "https://github.com/karim-mamdouh/ngx-lite-video" }] }], totalExecutionTime: 6277579675, totalOccurrences: 977311 },
          { name: "Twitter", homepage: "https://twitter.com", category: "social", domains: ["*.vine.co", "*.twimg.com", "*.twitpic.com", "platform.twitter.com", "syndication.twitter.com"], examples: ["cdn.syndication.twimg.com", "abs.twimg.com", "pbs.twimg.com"], totalExecutionTime: 804233203, totalOccurrences: 319957 },
          { name: "AddThis", homepage: "https://www.addthis.com/", category: "social", domains: ["*.addthis.com", "*.addthiscdn.com", "*.addthisedge.com"], examples: ["s7.addthis.com", "r.dlx.addthis.com", "su.addthis.com", "x.dlx.addthis.com"], totalExecutionTime: 23, totalOccurrences: 42 },
          { name: "AddToAny", homepage: "https://www.addtoany.com/", category: "social", domains: ["*.addtoany.com"], examples: ["static.addtoany.com"], totalExecutionTime: 10606113, totalOccurrences: 66065 },
          { name: "Akamai", homepage: "https://www.akamai.com/", category: "cdn", domains: ["23.62.3.183", "*.akamaitechnologies.com", "*.akamaitechnologies.fr", "*.akamai.net", "*.akamaiedge.net", "*.akamaihd.net", "*.akamaized.net", "*.edgefcs.net", "*.edgekey.net", "edgesuite.net", "*.srip.net"], totalExecutionTime: 4795669, totalOccurrences: 9820 },
          { name: "Blogger", homepage: "https://www.blogger.com/", category: "hosting", domains: ["*.blogblog.com", "*.blogger.com", "*.blogspot.com", "images-blogger-opensocial.googleusercontent.com"], examples: ["1.bp.blogspot.com", "www.blogger.com"], totalExecutionTime: 58390438, totalOccurrences: 213326 },
          { name: "Gravatar", homepage: "https://en.gravatar.com/", category: "social", domains: ["*.gravatar.com"], examples: ["secure.gravatar.com", "www.gravatar.com"], totalExecutionTime: 9235, totalOccurrences: 43 },
          { name: "Yandex Metrica", company: "Yandex", homepage: "https://metrica.yandex.com/about?", category: "analytics", domains: ["mc.yandex.ru", "mc.yandex.com", "d31j93rd8oukbv.cloudfront.net"], totalExecutionTime: 1438544698, totalOccurrences: 602136 },
          { name: "Hotjar", homepage: "https://www.hotjar.com/", category: "analytics", domains: ["*.hotjar.com", "*.hotjar.io"], examples: ["script.hotjar.com", "static.hotjar.com", "in.hotjar.com", "vc.hotjar.io", "vars.hotjar.com"], totalExecutionTime: 241418055, totalOccurrences: 333356 },
          { name: "Baidu Analytics", homepage: "https://tongji.baidu.com/web/welcome/login", category: "analytics", domains: ["hm.baidu.com", "hmcdn.baidu.com"], examples: ["hm.baidu.com", "hmcdn.baidu.com"], totalExecutionTime: 7739347, totalOccurrences: 32612 },
          { name: "Insider", homepage: "", category: "analytics", domains: ["*.useinsider.com"], examples: ["hit.api.useinsider.com"], totalExecutionTime: 2214966, totalOccurrences: 1861 },
          { name: "Adobe Experience Cloud", company: "Adobe", homepage: "", category: "analytics", domains: ["*.2o7.net", "du8783wkf05yr.cloudfront.net", "*.hitbox.com", "*.imageg.net", "*.nedstat.com", "*.omtrdc.net"], examples: ["audiag.112.2o7.net", "du8783wkf05yr.cloudfront.net/NS_mbox.js"], totalExecutionTime: 2369, totalOccurrences: 38 },
          { name: "Adobe Tag Manager", company: "Adobe", homepage: "https://www.adobe.com/experience-platform/", category: "tag-manager", domains: ["*.adobedtm.com", "*.demdex.net", "*.everesttech.net", "sstats.adobe.com", "hbrt.adobe.com"], examples: ["assets.adobedtm.com", "sync-tm.everesttech.net", "cm.everesttech.net"], totalExecutionTime: 34937564, totalOccurrences: 200160 },
          { name: "jQuery CDN", homepage: "https://code.jquery.com/", category: "cdn", domains: ["*.jquery.com"], examples: ["code.jquery.com"], totalExecutionTime: 302334055, totalOccurrences: 724477 },
          { name: "Cloudflare CDN", homepage: "https://cdnjs.com/", category: "cdn", domains: ["cdnjs.cloudflare.com", "amp.cloudflare.com"], totalExecutionTime: 337711119, totalOccurrences: 666628 },
          { name: "Cloudflare", homepage: "https://www.cloudflare.com/website-optimization/", category: "utility", domains: ["ajax.cloudflare.com", "*.nel.cloudflare.com", "static.cloudflareinsights.com"], totalExecutionTime: 58723052, totalOccurrences: 467719 },
          { name: "WordPress", company: "Automattic", homepage: "https://wp.com/", category: "hosting", domains: ["*.wordpress.com", "s0.wp.com", "s2.wp.com", "*.w.org", "c0.wp.com", "s1.wp.com", "i0.wp.com", "i1.wp.com", "i2.wp.com", "widgets.wp.com"], examples: ["s.w.org"], totalExecutionTime: 220910650, totalOccurrences: 308694 },
          {
            name: "WordPress Site Stats",
            company: "Automattic",
            homepage: "https://wp.com/",
            category: "analytics",
            domains: ["pixel.wp.com", "stats.wp.com"],
            totalExecutionTime: 8573549,
            totalOccurrences: 128931
          },
          { name: "Hatena Blog", homepage: "https://hatenablog.com/", category: "hosting", domains: ["*.st-hatena.com", "*.hatena.ne.jp"], examples: ["cdn.blog.st-hatena.com", "cdn.pool.st-hatena.com", "cdn7.www.st-hatena.com", "s.hatena.ne.jp", "b.st-hatena.com"], totalExecutionTime: 106337940, totalOccurrences: 43183 },
          { name: "Shopify", homepage: "https://www.shopify.com/", category: "hosting", domains: ["*.shopify.com", "*.shopifyapps.com", "*.shopifycdn.com", "*.shopifysvc.com"], examples: ["cdn.shopify.com", "productreviews.shopifycdn.com", "monorail-edge.shopifysvc.com"], totalExecutionTime: 287428893, totalOccurrences: 338668 },
          { name: "Dealer", homepage: "https://www.dealer.com/", category: "hosting", domains: ["*.dealer.com"], examples: ["static.dealer.com"], totalExecutionTime: 871324, totalOccurrences: 2620 },
          { name: "PIXNET", homepage: "https://www.pixnet.net/", category: "social", domains: ["*.pixfs.net", "*.pixnet.net"], examples: ["front.pixfs.net", "falcon-asset.pixfs.net", "pixgame-asset.pixfs.net"], totalExecutionTime: 18541448, totalOccurrences: 13718 },
          { name: "Moat", homepage: "https://moat.com/", category: "ad", domains: ["*.moatads.com", "*.moatpixel.com"], examples: ["z.moatads.com", "px.moatads.com", "geo.moatads.com", "sejs.moatads.com", "mb.moatads.com", "v4.moatads.com"] },
          { name: "33 Across", homepage: "https://33across.com/", category: "ad", domains: ["*.33across.com"], examples: ["sic.33across.com", "cdn-sic.33across.com"], totalExecutionTime: 10002146, totalOccurrences: 192648 },
          { name: "OpenX", homepage: "https://www.openx.com/", category: "ad", domains: ["*.deliverimp.com", "*.openxadexchange.com", "*.servedbyopenx.com", "*.jump-time.net", "*.openx.net", "*.openxcdn.net"], examples: ["uk-ads.openx.net", "us-ads.openx.net", "33across-d.openx.net", "rtb.openx.net", "us-u.openx.net", "eu-u.openx.net", "u.openx.net"], totalExecutionTime: 6274934, totalOccurrences: 76561 },
          { name: "Amazon Ads", homepage: "https://ad.amazon.com/", category: "ad", domains: ["*.amazon-adsystem.com"], examples: ["s.amazon-adsystem.com", "c.amazon-adsystem.com", "aax.amazon-adsystem.com", "z-na.amazon-adsystem.com", "fls-na.amazon-adsystem.com", "aax-us-east.amazon-adsystem.com", "ir-na.amazon-adsystem.com"], totalExecutionTime: 98703856, totalOccurrences: 240331 },
          { name: "Rubicon Project", homepage: "https://rubiconproject.com/", category: "ad", domains: ["*.rubiconproject.com", "*.chango.com", "*.fimserve.com"], examples: ["pixel.rubiconproject.com", "fastlane.rubiconproject.com", "secure-assets.rubiconproject.com", "eus.rubiconproject.com", "pixel-us-east.rubiconproject.com", "token.rubiconproject.com", "ads.rubiconproject.com"], totalExecutionTime: 287111007, totalOccurrences: 270271 },
          { name: "The Trade Desk", homepage: "https://www.thetradedesk.com/", category: "ad", domains: ["*.adsrvr.org", "d1eoo1tco6rr5e.cloudfront.net"], examples: ["js.adsrvr.org", "match.adsrvr.org", "insight.adsrvr.org", "usw-lax.adsrvr.org", "data.adsrvr.org", "snap.adsrvr.org"], totalExecutionTime: 2197325, totalOccurrences: 25346 },
          { name: "Bidswitch", homepage: "https://www.bidswitch.com/", category: "ad", domains: ["*.bidswitch.net"], examples: ["x.bidswitch.net"], totalExecutionTime: 25660, totalOccurrences: 68217 },
          { name: "LiveRamp IdentityLink", homepage: "https://liveramp.com/discover-identitylink/", category: "analytics", domains: ["*.circulate.com", "*.rlcdn.com"], examples: ["idsync.rlcdn.com", "id.rlcdn.com", "api.rlcdn.com", "cdn.rlcdn.com"], totalExecutionTime: 141414, totalOccurrences: 1461 },
          { name: "Drawbridge", homepage: "https://www.drawbridge.com/", category: "ad", domains: ["*.adsymptotic.com"] },
          { name: "AOL / Oath / Verizon Media", homepage: "https://www.oath.com/", category: "ad", domains: ["*.advertising.com", "*.aol.com", "*.aolcdn.com", "*.blogsmithmedia.com", "*.oath.com", "*.aol.net", "*.tacoda.net", "*.aol.co.uk"], examples: [
            "pixel.advertising.com",
            "dtm.advertising.com",
            "tag.sp.advertising.com",
            "service.sp.advertising.com",
            "adtech.advertising.com",
            "adaptv.advertising.com",
            "mighty.aol.net",
            "consent.cmp.oath.com"
          ], totalExecutionTime: 165968, totalOccurrences: 278 },
          { name: "Xaxis", homepage: "https://www.xaxis.com/", category: "ad", domains: ["*.247realmedia.com", "*.mookie1.com", "*.gmads.net"], examples: ["t.mookie1.com", "odr.mookie1.com"], totalExecutionTime: 28343, totalOccurrences: 209 },
          { name: "Freshdesk", company: "Freshworks", homepage: "https://freshdesk.com/", category: "customer-success", domains: ["d36mpcpuzc4ztk.cloudfront.net"], totalExecutionTime: 64296, totalOccurrences: 225 },
          { name: "Help Scout", homepage: "https://www.helpscout.net/", category: "customer-success", domains: ["djtflbt20bdde.cloudfront.net", "*.helpscout.net"], examples: ["beacon-v2.helpscout.net"], products: [{ name: "Help Scout Beacon", urlPatterns: ["beacon-v2.helpscout.net"], facades: [{ name: "React Live Chat Loader", repo: "https://github.com/calibreapp/react-live-chat-loader" }] }], totalExecutionTime: 2186050, totalOccurrences: 4906 },
          { name: "Alexa", homepage: "https://www.alexa.com/", category: "analytics", domains: ["*.alexametrics.com", "d31qbv1cthcecs.cloudfront.net"], examples: ["certify.alexametrics.com"] },
          { name: "OneSignal", homepage: "https://onesignal.com/", category: "utility", domains: ["*.onesignal.com"], examples: ["cdn.onesignal.com", "https://onesignal.com/api/v1/sync/"], totalExecutionTime: 17761218, totalOccurrences: 68282 },
          { name: "Lucky Orange", homepage: "https://www.luckyorange.com/", category: "analytics", domains: ["*.luckyorange.com", "d10lpsik1i8c69.cloudfront.net", "*.luckyorange.net"], totalExecutionTime: 12779009, totalOccurrences: 16442 },
          { name: "Crazy Egg", homepage: "https://www.crazyegg.com/", category: "analytics", domains: ["*.cetrk.com", "*.crazyegg.com", "dnn506yrbagrg.cloudfront.net"], totalExecutionTime: 27593244, totalOccurrences: 43822 },
          { name: "Hello Bar", homepage: "https://www.hellobar.com/", category: "marketing", domains: ["*.hellobar.com"], totalExecutionTime: 1533955, totalOccurrences: 4502 },
          { name: "Yandex Ads", company: "Yandex", homepage: "https://yandex.com/adv/", category: "ad", domains: ["an.yandex.ru"], totalExecutionTime: 5171537, totalOccurrences: 8488 },
          { name: "Salesforce", homepage: "https://www.salesforce.com/products/marketing-cloud/", category: "analytics", domains: ["*.krxd.net"], examples: ["cdn.krxd.net", "beacon.krxd.net", "consumer.krxd.net", "usermatch.krxd.net"] },
          { name: "Salesforce Commerce Cloud", homepage: "https://www.salesforce.com/products/commerce-cloud/overview/", category: "hosting", domains: ["*.cquotient.com", "*.demandware.net", "demandware.edgesuite.net"], totalExecutionTime: 2045309, totalOccurrences: 4127 },
          { name: "Optimizely", homepage: "https://www.optimizely.com/", category: "analytics", domains: ["*.optimizely.com"], examples: ["cdn.optimizely.com", "cdn-pci.optimizely.com", "logx.optimizely.com", "cdn3.optimizely.com"], totalExecutionTime: 12599739, totalOccurrences: 15998 },
          { name: "LiveChat", homepage: "https://www.livechat.com/", category: "customer-success", domains: ["*.livechatinc.com", "*.livechat.com", "*.livechat-static.com"], examples: ["cdn.livechatinc.com", "secure.livechatinc.com"], totalExecutionTime: 49171416, totalOccurrences: 39034 },
          { name: "VK", homepage: "https://vk.com/", category: "social", domains: ["*.vk.com"], totalExecutionTime: 91334176, totalOccurrences: 22377 },
          { name: "Tumblr", homepage: "https://tumblr.com/", category: "social", domains: ["*.tumblr.com"], examples: ["assets.tumblr.com", "static.tumblr.com"], totalExecutionTime: 45570825, totalOccurrences: 18114 },
          { name: "Wistia", homepage: "https://wistia.com/", category: "video", domains: ["*.wistia.com", "embedwistia-a.akamaihd.net", "*.wistia.net"], examples: ["fast.wistia.com", "fast.wistia.net", "distillery.wistia.com", "pipedream.wistia.com"], totalExecutionTime: 115722112, totalOccurrences: 27059 },
          { name: "Brightcove", homepage: "https://www.brightcove.com/en/", category: "video", domains: ["*.brightcove.com", "*.brightcove.net", "*.zencdn.net"], examples: ["vjs.zencdn.net", "players.brightcove.net"], totalExecutionTime: 15099708, totalOccurrences: 13745 },
          { name: "JSDelivr CDN", homepage: "https://www.jsdelivr.com/", category: "cdn", domains: ["*.jsdelivr.net"], examples: ["cdn.jsdelivr.net"], totalExecutionTime: 260364458, totalOccurrences: 399959 },
          { name: "Sumo", homepage: "https://sumo.com/", category: "marketing", domains: ["*.sumo.com", "*.sumome.com", "sumo.b-cdn.net"], examples: ["sumo.b-cdn.net", "load.sumo.com", "load.sumome.com"], totalExecutionTime: 16489977, totalOccurrences: 10901 },
          { name: "Vimeo", homepage: "https://vimeo.com/", category: "video", domains: ["*.vimeo.com", "*.vimeocdn.com"], examples: ["f.vimeocdn.com", "player.vimeo.com", "i.vimeocdn.com"], products: [{ name: "Vimeo Embedded Player", urlPatterns: ["player.vimeo.com/video/"], facades: [{ name: "Lite Vimeo", repo: "https://github.com/slightlyoff/lite-vimeo" }, { name: "Lite Vimeo Embed", repo: "https://github.com/luwes/lite-vimeo-embed" }, { name: "Ngx Lite Video", repo: "https://github.com/karim-mamdouh/ngx-lite-video" }] }], totalExecutionTime: 263943622, totalOccurrences: 120397 },
          { name: "Disqus", homepage: "https://disqus.com/", category: "social", domains: ["*.disqus.com", "*.disquscdn.com"], examples: ["c.disquscdn.com"], totalExecutionTime: 3697272, totalOccurrences: 1775 },
          { name: "Yandex APIs", company: "Yandex", homepage: "https://yandex.ru/", category: "utility", domains: ["api-maps.yandex.ru", "money.yandex.ru"], totalExecutionTime: 40765111, totalOccurrences: 51601 },
          { name: "Yandex CDN", company: "Yandex", homepage: "https://yandex.ru/", category: "cdn", domains: ["*.yandex.st", "*.yastatic.net"], examples: ["https://yastatic.net/share2/share.js", "https://yastatic.net/jquery/2.1.4/jquery.min.js"] },
          { name: "Integral Ad Science", homepage: "https://integralads.com/uk/", category: "ad", domains: ["*.adsafeprotected.com", "*.iasds01.com"], examples: ["pixel.adsafeprotected.com", "static.adsafeprotected.com", "fw.adsafeprotected.com", "cdn.adsafeprotected.com", "dt.adsafeprotected.com"], totalExecutionTime: 88554254, totalOccurrences: 21660 },
          { name: "Tealium", homepage: "https://tealium.com/", category: "tag-manager", domains: ["*.aniview.com", "*.delvenetworks.com", "*.limelight.com", "*.tiqcdn.com", "*.llnwd.net", "*.tealiumiq.com"], examples: ["tags.tiqcdn.com", "tealium.hs.llnwd.net", "link.videoplatform.limelight.com", "datacloud.tealiumiq.com"], totalExecutionTime: 20176561, totalOccurrences: 75434 },
          { name: "Pubmatic", homepage: "https://pubmatic.com/", category: "ad", domains: ["*.pubmatic.com"], examples: ["image6.pubmatic.com", "ads.pubmatic.com", "image2.pubmatic.com", "simage2.pubmatic.com", "image4.pubmatic.com", "simage4.pubmatic.com", "image5.pubmatic.com", "hbopenbid.pubmatic.com"], totalExecutionTime: 417694368, totalOccurrences: 279418 },
          { name: "Olark", homepage: "https://www.olark.com/", category: "customer-success", domains: ["*.olark.com"], examples: ["static.olark.com"], totalExecutionTime: 9840846, totalOccurrences: 6534 },
          { name: "Tawk.to", homepage: "https://www.tawk.to/", category: "customer-success", domains: ["*.tawk.to"], examples: ["embed.tawk.to"], totalExecutionTime: 43074965, totalOccurrences: 111088 },
          { name: "OptinMonster", homepage: "https://optinmonster.com/", category: "marketing", domains: ["*.opmnstr.com", "*.optmnstr.com", "*.optmstr.com"], examples: ["a.optmstr.com", "api.opmnstr.com", "a.optmnstr.com"], totalExecutionTime: 1035991, totalOccurrences: 2346 },
          { name: "ZenDesk", homepage: "https://zendesk.com/", category: "customer-success", domains: ["*.zdassets.com", "*.zendesk.com", "*.zopim.com"], examples: ["assets.zendesk.com", "static.zdassets.com", "v2.zopim.com"], totalExecutionTime: 106701440, totalOccurrences: 72537 },
          { name: "Pusher", homepage: "https://pusher.com/", category: "utility", domains: ["*.pusher.com", "*.pusherapp.com"], examples: ["stats.pusher.com"], totalExecutionTime: 152727, totalOccurrences: 1698 },
          { name: "Drift", homepage: "https://www.drift.com/", category: "marketing", domains: ["*.drift.com", "*.driftt.com"], examples: ["js.driftt.com", "api.drift.com"], products: [{ name: "Drift Live Chat", urlPatterns: ["REGEXP:js\\.driftt\\.com\\/include\\/.*\\/.*\\.js"], facades: [{ name: "React Live Chat Loader", repo: "https://github.com/calibreapp/react-live-chat-loader" }] }], totalExecutionTime: 30179596, totalOccurrences: 5515 },
          { name: "Sentry", homepage: "https://sentry.io/", category: "utility", domains: ["*.getsentry.com", "*.ravenjs.com", "*.sentry-cdn.com", "*.sentry.io"], examples: ["cdn.ravenjs.com", "browser.sentry-cdn.com"], totalExecutionTime: 47937360, totalOccurrences: 85598 },
          { name: "Amazon Web Services", homepage: "https://aws.amazon.com/s3/", category: "other", domains: ["*.amazon.com", "*.amazonaws.com", "*.amazonwebapps.com", "*.amazonwebservices.com", "*.elasticbeanstalk.com", "*.images-amazon.com", "*.amazon.co.uk"], examples: ["s3.amazonaws.com", "us-east-1.amazonaws.com", "api-cdn.amazon.com", "ecx.images-amazon.com", "ws.amazon.co.uk"], totalExecutionTime: 51892201, totalOccurrences: 119152 },
          { name: "Amazon Pay", homepage: "https://pay.amazon.com", category: "utility", domains: ["payments.amazon.com", "*.payments-amazon.com"], totalExecutionTime: 1234650, totalOccurrences: 6833 },
          { name: "Media.net", homepage: "https://www.media.net/", category: "ad", domains: ["*.media.net", "*.mnet-ad.net"], examples: ["contextual.media.net", "cdnwest-xch.media.net", "hbx.media.net", "cs.media.net", "hblg.media.net"], totalExecutionTime: 24973689, totalOccurrences: 97679 },
          { name: "Yahoo!", homepage: "https://www.yahoo.com/", category: "ad", domains: ["*.bluelithium.com", "*.hostingprod.com", "*.lexity.com", "*.yahoo.com", "*.yahooapis.com", "*.yimg.com", "*.zenfs.com", "*.yahoo.net"], examples: ["ads.yahoo.com", "analytics.yahoo.com", "geo.yahoo.com", "udc.yahoo.com", "ganon.yahoo.com", "ads.yap.yahoo.com"], totalExecutionTime: 2617276, totalOccurrences: 24800 },
          { name: "Adroll", homepage: "https://www.adroll.com/", category: "ad", domains: ["*.adroll.com"], examples: ["d.adroll.com", "s.adroll.com"], totalExecutionTime: 11884188, totalOccurrences: 30782 },
          { name: "Twitch", homepage: "https://twitch.tv/", category: "video", domains: ["*.twitch.tv"], examples: ["player.twitch.tv"], totalExecutionTime: 18452667, totalOccurrences: 1255 },
          { name: "Taboola", homepage: "https://www.taboola.com/", category: "ad", domains: ["*.taboola.com", "*.taboolasyndication.com"], examples: ["cdn.taboola.com", "trc.taboola.com", "vidstat.taboola.com", "images.taboola.com"], totalExecutionTime: 32631891, totalOccurrences: 49191 },
          { name: "Sizmek", homepage: "https://www.sizmek.com/", category: "ad", domains: ["*.serving-sys.com", "*.peer39.net"], examples: ["secure-ds.serving-sys.com", "ds.serving-sys.com", "bs.serving-sys.com"], totalExecutionTime: 6679849, totalOccurrences: 4307 },
          { name: "Scorecard Research", homepage: "https://www.scorecardresearch.com/", category: "ad", domains: ["*.scorecardresearch.com"], examples: ["sb.scorecardresearch.com", "sa.scorecardresearch.com", "b.scorecardresearch.com"], totalExecutionTime: 4399371, totalOccurrences: 54577 },
          { name: "Criteo", homepage: "https://www.criteo.com/", category: "ad", domains: ["*.criteo.com", "*.emailretargeting.com", "*.criteo.net"], examples: ["static.criteo.net", "bidder.criteo.com", "dis.criteo.com", "gum.criteo.com", "sslwidget.criteo.com", "dis.us.criteo.com"], totalExecutionTime: 25625451, totalOccurrences: 213880 },
          { name: "Segment", homepage: "https://segment.com/", category: "analytics", domains: ["*.segment.com", "*.segment.io"], examples: ["cdn.segment.com", "api.segment.io"], totalExecutionTime: 11055141, totalOccurrences: 27036 },
          { name: "ShareThis", homepage: "https://www.sharethis.com/", category: "social", domains: ["*.sharethis.com"], examples: ["w.sharethis.com", "ws.sharethis.com", "t.sharethis.com"], totalExecutionTime: 30807804, totalOccurrences: 88829 },
          { name: "Distil Networks", homepage: "https://www.distilnetworks.com/", category: "utility", domains: ["*.areyouahuman.com"], examples: ["n-cdn.areyouahuman.com"] },
          { name: "Connexity", homepage: "https://connexity.com/", category: "analytics", domains: ["*.connexity.net"] },
          { name: "Popads", homepage: "https://www.popads.net/", category: "ad", domains: ["*.popads.net"], examples: ["serve.popads.net", "c1.popads.net"], totalExecutionTime: 756593, totalOccurrences: 427 },
          { name: "CreateJS CDN", homepage: "https://code.createjs.com/", category: "cdn", domains: ["*.createjs.com"], examples: ["code.createjs.com"], totalExecutionTime: 13654049, totalOccurrences: 3880 },
          { name: "Squarespace", homepage: "https://www.squarespace.com/", category: "hosting", domains: ["*.squarespace.com"], examples: ["static.squarespace.com", "static1.squarespace.com"], totalExecutionTime: 1106480464, totalOccurrences: 243154 },
          { name: "Media Math", homepage: "https://www.mediamath.com/", category: "ad", domains: ["*.mathads.com", "*.mathtag.com"], examples: ["mathid.mathtag.com", "sync.mathtag.com", "pixel.mathtag.com"], totalExecutionTime: 20783, totalOccurrences: 305 },
          { name: "Mixpanel", homepage: "https://mixpanel.com/", category: "analytics", domains: ["*.mixpanel.com", "*.mxpnl.com"], examples: ["cdn.mxpnl.com"], totalExecutionTime: 3250547, totalOccurrences: 18817 },
          { name: "FontAwesome CDN", homepage: "https://fontawesome.com/", category: "cdn", domains: ["*.fontawesome.com"], examples: ["use.fontawesome.com"], totalExecutionTime: 73007333, totalOccurrences: 291586 },
          { name: "Hubspot", homepage: "https://hubspot.com/", category: "marketing", domains: ["*.hs-scripts.com", "*.hubspot.com", "*.leadin.com", "*.hs-analytics.net", "*.hscollectedforms.net", "*.hscta.net", "*.hsforms.net", "*.hsleadflows.net", "*.hsstatic.net", "*.hubspot.net", "*.hsforms.com", "*.hs-banner.com", "*.hs-embed-reporting.com", "*.hs-growth-metrics.com", "*.hs-data.com", "*.hsadspixel.net", "*.hubapi.com"], examples: ["forms.hubspot.com", "js.hsforms.net", "js.hs-analytics.net", "js.leadin.com"], totalExecutionTime: 92224372, totalOccurrences: 154415 },
          { name: "Mailchimp", homepage: "https://mailchimp.com/", category: "marketing", domains: ["*.chimpstatic.com", "*.list-manage.com", "*.mailchimp.com"], examples: ["downloads.mailchimp.com"], totalExecutionTime: 21592375, totalOccurrences: 45506 },
          { name: "MGID", homepage: "https://www.mgid.com/", category: "ad", domains: ["*.mgid.com", "*.dt07.net"], examples: ["servicer.mgid.com"], totalExecutionTime: 22074076, totalOccurrences: 10437 },
          { name: "Stripe", homepage: "https://stripe.com", category: "utility", domains: ["*.stripe.com", "*.stripecdn.com", "*.stripe.network"], examples: ["m.stripe.network", "js.stripe.com"], totalExecutionTime: 166354648, totalOccurrences: 136440 },
          { name: "PayPal", homepage: "https://paypal.com", category: "utility", domains: ["*.paypal.com", "*.paypalobjects.com"], examples: ["www.paypalobjects.com"], totalExecutionTime: 64408205, totalOccurrences: 62800 },
          { name: "Market GID", homepage: "https://www.marketgid.com/", category: "ad", domains: ["*.marketgid.com"], examples: ["jsc.marketgid.com"] },
          { name: "Pinterest", homepage: "https://pinterest.com/", category: "social", domains: ["*.pinimg.com", "*.pinterest.com"], examples: ["assets.pinterest.com", "ct.pinterest.com", "log.pinterest.com"], totalExecutionTime: 17602311, totalOccurrences: 131448 },
          { name: "New Relic", homepage: "https://newrelic.com/", category: "utility", domains: ["*.newrelic.com", "*.nr-data.net"], examples: ["js-agent.newrelic.com", "bam.nr-data.net"], totalExecutionTime: 64592740, totalOccurrences: 227672 },
          { name: "AppDynamics", homepage: "https://www.appdynamics.com/", category: "utility", domains: ["*.appdynamics.com", "*.eum-appdynamics.com", "d3tjaysgumg9lf.cloudfront.net"], examples: ["cdn.appdynamics.com"], totalExecutionTime: 2509158, totalOccurrences: 2920 },
          { name: "Parking Crew", homepage: "https://parkingcrew.net/", category: "other", domains: ["d1lxhc4jvstzrp.cloudfront.net", "*.parkingcrew.net"], totalExecutionTime: 9, totalOccurrences: 1 },
          { name: "WordAds", company: "Automattic", homepage: "https://wordads.co/", category: "ad", domains: ["*.pubmine.com"], examples: ["s.pubmine.com"], totalExecutionTime: 74286347, totalOccurrences: 100449 },
          { name: "AppNexus", homepage: "https://www.appnexus.com/", category: "ad", domains: ["*.adnxs.com", "*.ctasnet.com", "*.adrdgt.com"], examples: ["acdn.adnxs.com", "secure.adnxs.com", "ib.adnxs.com", "sharethrough.adnxs.com", "cdn.adnxs.com", "vcdn.adnxs.com"], totalExecutionTime: 5948505, totalOccurrences: 234133 },
          {
            name: "Histats",
            homepage: "https://www.histats.com/",
            category: "analytics",
            domains: ["*.histats.com"],
            examples: ["s10.histats.com"],
            totalExecutionTime: 5601,
            totalOccurrences: 92
          },
          { name: "DoubleVerify", homepage: "https://www.doubleverify.com/", category: "ad", domains: ["*.doubleverify.com", "*.dvtps.com", "*.iqfp1.com"], examples: ["cdn.doubleverify.com", "cdn3.doubleverify.com", "tps.doubleverify.com", "tps712.doubleverify.com", "tps714.doubleverify.com", "tps706.doubleverify.com", "tps700.doubleverify.com", "tps707.doubleverify.com", "rtb2.doubleverify.com", "rtb0.doubleverify.com", "rtbcdn.doubleverify.com", "tps11020.doubleverify.com", "tm.iqfp1.com"], totalExecutionTime: 46891028, totalOccurrences: 19453 },
          { name: "Mediavine", homepage: "https://www.mediavine.com/", category: "ad", domains: ["*.mediavine.com"], examples: ["scripts.mediavine.com", "video.mediavine.com"], totalExecutionTime: 59009373, totalOccurrences: 12963 },
          { name: "Wix", homepage: "https://www.wix.com/", category: "hosting", domains: ["*.parastorage.com", "*.wix.com", "*.wixstatic.com", "*.wixapps.net"], examples: ["static.parastorage.com", "static.wixstatic.com", "www.wix.com", "instagram.codev.wixapps.net"], totalExecutionTime: 2112268981, totalOccurrences: 458273 },
          { name: "Webflow", homepage: "https://webflow.com/", category: "hosting", domains: ["*.uploads-ssl.webflow.com", "*.assets-global.website-files.com", "*.assets.website-files.com"], examples: ["uploads-ssl.webflow.com", "assets-global.website-files.com", "assets.website-files.com"] },
          { name: "Weebly", homepage: "https://www.weebly.com/", category: "hosting", domains: ["*.editmysite.com"], totalExecutionTime: 413019e3, totalOccurrences: 67864 },
          { name: "LinkedIn", homepage: "https://www.linkedin.com/", category: "social", domains: ["*.bizographics.com", "platform.linkedin.com", "*.slideshare.com", "*.slidesharecdn.com", "*.oribi.io"], totalExecutionTime: 5776577, totalOccurrences: 16507 },
          {
            name: "LinkedIn Ads",
            category: "ad",
            domains: ["*.licdn.com", "*.ads.linkedin.com", "ads.linkedin.com", "www.linkedin.com"],
            examples: ["snap.licdn.com"],
            totalExecutionTime: 22805542,
            totalOccurrences: 199088
          },
          { name: "Vox Media", homepage: "https://www.voxmedia.com/", category: "content", domains: ["*.vox-cdn.com", "*.voxmedia.com"], examples: ["cdn.vox-cdn.com"], totalExecutionTime: 910366, totalOccurrences: 320 },
          { name: "Hotmart", homepage: "https://www.hotmart.com/", category: "content", domains: ["*.hotmart.com"], examples: ["launchermodule.hotmart.com"], totalExecutionTime: 15363016, totalOccurrences: 4554 },
          { name: "SoundCloud", homepage: "https://www.soundcloud.com/", category: "content", domains: ["*.sndcdn.com", "*.soundcloud.com", "*.stratus.sc"], examples: ["widget.sndcdn.com"], totalExecutionTime: 15888610, totalOccurrences: 5859 },
          { name: "Spotify", homepage: "https://www.spotify.com/", category: "content", domains: ["*.scdn.co", "*.spotify.com"], examples: ["open.spotify.com", "open.scdn.co", "i.scdn.co"], totalExecutionTime: 99924, totalOccurrences: 10992 },
          { name: "AMP", homepage: "https://amp.dev/", category: "content", domains: ["*.ampproject.org"], examples: ["cdn.ampproject.org"], totalExecutionTime: 79590738, totalOccurrences: 66265 },
          { name: "Beeketing", homepage: "https://beeketing.com/", category: "marketing", domains: ["*.beeketing.com"], examples: ["sdk-cdn.beeketing.com", "sdk.beeketing.com"], totalExecutionTime: 2163106, totalOccurrences: 1971 },
          { name: "Albacross", homepage: "https://albacross.com/", category: "marketing", domains: ["*.albacross.com"], examples: ["serve.albacross.com"], totalExecutionTime: 100459, totalOccurrences: 1503 },
          { name: "TrafficJunky", homepage: "https://www.trafficjunky.com/", category: "ad", domains: ["*.contentabc.com", "*.trafficjunky.net"], examples: ["ads2.contentabc.com", "hw-cdn.contentabc.com", "media.trafficjunky.net", "ads.trafficjunky.net", "hw-cdn.trafficjunky.net"], totalExecutionTime: 2936, totalOccurrences: 62 },
          { name: "Bootstrap CDN", homepage: "https://www.bootstrapcdn.com/", category: "cdn", domains: ["*.bootstrapcdn.com"], examples: ["maxcdn.bootstrapcdn.com", "stackpath.bootstrapcdn.com"], totalExecutionTime: 2075388, totalOccurrences: 38731 },
          { name: "Shareaholic", homepage: "https://www.shareaholic.com/", category: "social", domains: ["*.shareaholic.com", "dsms0mj1bbhn4.cloudfront.net"], totalExecutionTime: 122180, totalOccurrences: 1429 },
          { name: "Snowplow", homepage: "https://snowplowanalytics.com/", category: "analytics", domains: ["d32hwlnfiv2gyn.cloudfront.net"], totalExecutionTime: 7099041, totalOccurrences: 58566 },
          { name: "RD Station", homepage: "https://www.rdstation.com/en/", category: "marketing", domains: ["d335luupugsy2.cloudfront.net"], totalExecutionTime: 7693701, totalOccurrences: 21846 },
          { name: "Jivochat", homepage: "https://www.jivochat.com/", category: "customer-success", domains: ["*.jivosite.com"], examples: ["cdn-ca.jivosite.com", "code.jivosite.com"], totalExecutionTime: 36663932, totalOccurrences: 57540 },
          { name: "Listrak", homepage: "https://www.listrak.com/", category: "marketing", domains: ["*.listrak.com", "*.listrakbi.com"], examples: ["cdn.listrakbi.com", "s1.listrakbi.com"], totalExecutionTime: 458776, totalOccurrences: 1045 },
          { name: "Ontame", homepage: "https://www.ontame.io", category: "analytics", domains: ["*.ontame.io"], examples: ["cdn.ontame.io", "collector.ontame.io"], totalExecutionTime: 23620, totalOccurrences: 101 },
          { name: "Ipify", homepage: "https://www.ipify.org", category: "utility", domains: ["*.ipify.org"], examples: ["api.ipify.org", "geo.ipify.org"], totalExecutionTime: 365905, totalOccurrences: 2753 },
          { name: "Ensighten", homepage: "https://www.ensighten.com/", category: "tag-manager", domains: ["*.ensighten.com"], examples: ["nexus.ensighten.com"], totalExecutionTime: 1774287, totalOccurrences: 3199 },
          { name: "EpiServer", homepage: "https://www.episerver.com", category: "content", domains: ["*.episerver.net"], examples: ["dl.episerver.net"], totalExecutionTime: 9010, totalOccurrences: 80 },
          { name: "mPulse", homepage: "https://developer.akamai.com/akamai-mpulse", category: "analytics", domains: ["*.akstat.io", "*.go-mpulse.net", "*.mpulse.net", "*.mpstat.us"], examples: ["c.go-mpulse.net", "0211c83c.akstat.io"], totalExecutionTime: 3089821, totalOccurrences: 30624 },
          { name: "Pingdom RUM", homepage: "https://www.pingdom.com/product/performance-monitoring/", category: "analytics", domains: ["*.pingdom.net"], examples: ["rum-static.pingdom.net", "rum-collector-2.pingdom.net"], totalExecutionTime: 106679, totalOccurrences: 1825 },
          { name: "SpeedCurve RUM", company: "SpeedCurve", homepage: "https://www.speedcurve.com/features/performance-monitoring/", category: "analytics", domains: ["*.speedcurve.com"], examples: ["cdn.speedcurve.com", "lux.speedcurve.com"], totalExecutionTime: 323903, totalOccurrences: 5358 },
          { name: "Radar", company: "Cedexis", homepage: "https://www.cedexis.com/radar/", category: "analytics", domains: ["*.cedexis-test.com", "*.cedexis.com", "*.cmdolb.com", "cedexis.leasewebcdn.com", "*.cedexis-radar.net", "*.cedexis.net", "cedexis-test01.insnw.net", "cedexisakamaitest.azureedge.net", "cedexispub.cdnetworks.net", "cs600.wac.alphacdn.net", "cs600.wpc.edgecastdns.net", "global2.cmdolb.com", "img-cedexis.mncdn.com", "a-cedexis.msedge.net", "zn3vgszfh.fastestcdn.net"], examples: ["radar.cedexis.com", "rpt.cedexis.com", "2-01-49cd-0002.cdx.cedexis.net", "bench.cedexis-test.com"], totalExecutionTime: 290925, totalOccurrences: 1133 },
          { name: "Byside", homepage: "https://byside.com", category: "analytics", domains: ["*.byside.com"], examples: ["byce2.byside.com", "wce2.byside.com"], totalExecutionTime: 45270, totalOccurrences: 87 },
          { name: "VWO", homepage: "https://vwo.com", category: "analytics", domains: ["*.vwo.com", "*.visualwebsiteoptimizer.com", "d5phz18u4wuww.cloudfront.net", "*.wingify.com"], examples: ["dev.visualwebsiteoptimizer.com"], totalExecutionTime: 6485310, totalOccurrences: 7903 },
          { name: "Bing Ads", homepage: "https://bingads.microsoft.com", category: "ad", domains: ["*.bing.com", "*.microsoft.com", "*.msn.com", "*.s-msft.com", "*.s-msn.com", "*.msads.net", "*.msecnd.net"], examples: ["bat.bing.com", "c.bing.com", "bat.r.msn.com", "ajax.microsoft.com"], totalExecutionTime: 14227177, totalOccurrences: 117720 },
          { name: "GoSquared", homepage: "https://www.gosquared.com", category: "analytics", domains: ["*.gosquared.com", "d1l6p2sc9645hc.cloudfront.net"], examples: ["data.gosquared.com", "data2.gosquared.com"], totalExecutionTime: 56152, totalOccurrences: 613 },
          { name: "Usabilla", homepage: "https://usabilla.com", category: "analytics", domains: ["*.usabilla.com", "d6tizftlrpuof.cloudfront.net"], examples: ["w.usabilla.com"], totalExecutionTime: 240166, totalOccurrences: 1354 },
          { name: "Fastly Insights", homepage: "https://insights.fastlylabs.com", category: "analytics", domains: ["*.fastly-insights.com"], examples: ["www.fastly-insights.com"], totalExecutionTime: 541189, totalOccurrences: 4449 },
          { name: "Visual IQ", homepage: "https://www.visualiq.com", category: "analytics", domains: ["*.myvisualiq.net"], examples: ["t.myvisualiq.net"] },
          { name: "Snapchat", homepage: "https://www.snapchat.com", category: "analytics", domains: ["*.snapchat.com", "*.sc-static.net"], examples: ["tr.snapchat.com"], totalExecutionTime: 177890, totalOccurrences: 1978 },
          { name: "Atlas Solutions", homepage: "https://atlassolutions.com", category: "analytics", domains: ["*.atdmt.com"], examples: ["ad.atdmt.com", "cx.atdmt.com"] },
          { name: "Quantcast", homepage: "https://www.quantcast.com", category: "analytics", domains: ["*.brtstats.com", "*.quantcount.com", "*.quantserve.com", "*.semantictec.com", "*.ntv.io"], examples: ["pixel.quantserve.com", "secure.quantserve.com", "cms.quantserve.com", "rules.quantcount.com"], totalExecutionTime: 12419392, totalOccurrences: 77646 },
          { name: "Spiceworks", homepage: "https://www.spiceworks.com", category: "analytics", domains: ["*.spiceworks.com"], examples: ["px.spiceworks.com"] },
          { name: "Marketo", homepage: "https://www.marketo.com", category: "analytics", domains: ["*.marketo.com", "*.mktoresp.com", "*.marketo.net"], examples: ["munchkin.marketo.net"], totalExecutionTime: 724464, totalOccurrences: 1798 },
          { name: "Intercom", homepage: "https://www.intercom.com", category: "customer-success", domains: ["*.intercomcdn.com", "*.intercom.io"], examples: ["js.intercomcdn.com", "api-iam.intercom.io", "widget.intercom.io", "nexus-websocket-a.intercom.io"], products: [{ name: "Intercom Widget", urlPatterns: ["widget.intercom.io", "js.intercomcdn.com/shim.latest.js"], facades: [{ name: "React Live Chat Loader", repo: "https://github.com/calibreapp/react-live-chat-loader" }, { name: "Intercom Facade", repo: "https://github.com/danielbachhuber/intercom-facade/" }] }], totalExecutionTime: 44601345, totalOccurrences: 35197 },
          { name: "Unpkg", homepage: "https://unpkg.com", category: "cdn", domains: ["*.unpkg.com", "*.npmcdn.com"], totalExecutionTime: 74666, totalOccurrences: 227 },
          { name: "ReadSpeaker", homepage: "https://www.readspeaker.com", category: "other", domains: ["*.readspeaker.com"], examples: ["sf1-eu.readspeaker.com"], totalExecutionTime: 727525, totalOccurrences: 6265 },
          { name: "Browsealoud", homepage: "https://www.texthelp.com/en-gb/products/browsealoud/", category: "other", domains: ["*.browsealoud.com", "*.texthelp.com"], examples: ["www.browsealoud.com"], totalExecutionTime: 665425, totalOccurrences: 1951 },
          { name: "15gifts", category: "customer-success", domains: ["*.15gifts.com", "*.primefuse.com"], examples: ["www.primefuse.com"] },
          { name: "1xRUN", category: "utility", domains: ["*.1xrun.com"] },
          { name: "2AdPro Media Solutions", category: "ad", domains: ["*.2adpro.com"] },
          { name: "301 Digital Media", category: "content", domains: ["*.301ads.com", "*.301network.com"] },
          { name: "360 picnic platform", company: "MediaV", category: "ad", domains: ["*.mediav.com"], totalExecutionTime: 4893, totalOccurrences: 78 },
          { name: "365 Media Group", category: "content", domains: ["*.365dm.com"] },
          { name: "365 Tech Services", category: "hosting", domains: ["*.365webservices.co.uk"] },
          { name: "3D Issue", category: "utility", domains: ["*.3dissue.com", "*.pressjack.com"], totalExecutionTime: 53823, totalOccurrences: 30 },
          { name: "47Line Technologies", category: "other", domains: ["*.pejs.net"] },
          { name: "4finance", category: "utility", domains: ["*.4finance.com"] },
          { name: "5miles", category: "content", domains: ["*.5milesapp.com"] },
          { name: "77Tool", company: "77Agency", category: "analytics", domains: ["*.77tracking.com"] },
          { name: "9xb", category: "ad", domains: ["*.9xb.com"] },
          { name: "@UK", category: "hosting", domains: ["*.uk-plc.net"] },
          { name: "A Perfect Pocket", category: "hosting", domains: ["*.aperfectpocketdata.com"] },
          { name: "A-FIS PTE", category: "analytics", domains: ["*.websta.me"] },
          { name: "AB Tasty", homepage: "https://www.abtasty.com/", category: "analytics", domains: ["*.abtasty.com", "d1447tq2m68ekg.cloudfront.net"], examples: ["try.abtasty.com"], totalExecutionTime: 1720461, totalOccurrences: 3363 },
          { name: "ABA RESEARCH", category: "analytics", domains: ["*.abaresearch.uk", "qmodal.azurewebsites.net"] },
          { name: "ADMIZED", category: "ad", domains: ["*.admized.com"] },
          { name: "ADNOLOGIES", category: "ad", domains: ["*.heias.com"] },
          { name: "ADventori", category: "ad", domains: ["*.adventori.com"], totalExecutionTime: 5790, totalOccurrences: 21 },
          { name: "AI Media Group", category: "ad", domains: ["*.aimediagroup.com"] },
          { name: "AIR.TV", category: "ad", domains: ["*.air.tv"] },
          { name: "AKQA", category: "ad", domains: ["*.srtk.net"] },
          { name: "AOL ad", company: "AOL", category: "ad", domains: ["*.atwola.com"] },
          { name: "AOL On", company: "AOL", category: "content", domains: ["*.5min.com"] },
          { name: "AOL Sponsored Listiings", company: "AOL", category: "ad", domains: ["*.adsonar.com"] },
          { name: "APSIS Lead", company: "APSIS International AB", category: "ad", domains: ["*.prospecteye.com"] },
          { name: "APSIS Profile Cloud", company: "APSIS", category: "analytics", domains: ["*.innomdc.com"] },
          { name: "APSIS Forms", company: "APSIS", category: "other", domains: ["*.apsisforms.com"], examples: ["forms.apsisforms.com"] },
          { name: "ARENA", company: "Altitude", category: "ad", domains: ["*.altitude-arena.com"], totalExecutionTime: 1, totalOccurrences: 1 },
          { name: "ARM", category: "analytics", domains: ["*.tag4arm.com"], totalExecutionTime: 5847, totalOccurrences: 83 },
          { name: "ASAPP", category: "other", domains: ["*.asapp.com"], totalExecutionTime: 37052, totalOccurrences: 31 },
          { name: "ASP", category: "hosting", domains: ["*.goshowoff.com"] },
          { name: "AT Internet", category: "analytics", domains: ["*.ati-host.net"] },
          { name: "ATTRAQT", category: "utility", domains: ["*.attraqt.com", "*.locayta.com"] },
          { name: "AVANSER", category: "analytics", domains: ["*.avanser.com.au"] },
          { name: "AVG", company: "AVG Technologies", category: "utility", domains: ["*.avg.com"], examples: ["omni.avg.com"] },
          { name: "AWeber", category: "ad", domains: ["*.aweber.com"], totalExecutionTime: 40945, totalOccurrences: 280 },
          { name: "AXS", category: "content", domains: ["*.axs.com"], totalExecutionTime: 49218, totalOccurrences: 8 },
          { name: "Accentuate", company: "Accentuate Digital", category: "utility", homepage: "https://www.accentuate.io/", domains: ["*.accentuate.io"], examples: ["cdn.accentuate.io", "original.accentuate.io"], totalExecutionTime: 1772, totalOccurrences: 17 },
          { name: "Accenture", category: "analytics", domains: ["*.tmvtp.com"] },
          { name: "Accord Holdings", category: "ad", domains: ["*.agcdn.com"] },
          { name: "Accordant Media", category: "ad", domains: ["*.a3cloud.net"], examples: ["segment.a3cloud.net"] },
          { name: "Account Kit", category: "other", domains: ["*.accountkit.com"] },
          { name: "Accuen Media (Omnicom Media Group)", category: "content", domains: ["*.p-td.com"] },
          {
            name: "Accuweather",
            category: "content",
            domains: ["*.accuweather.com"],
            totalExecutionTime: 291762,
            totalOccurrences: 1477
          },
          { name: "Acquisio", category: "ad", domains: ["*.acq.io"], totalExecutionTime: 1692, totalOccurrences: 32 },
          { name: "Act-On Software", category: "marketing", domains: ["*.actonsoftware.com"], totalExecutionTime: 98, totalOccurrences: 2 },
          { name: "ActBlue", category: "other", domains: ["*.actblue.com"], totalExecutionTime: 62800, totalOccurrences: 73 },
          { name: "Active Agent", category: "ad", domains: ["*.active-agent.com"] },
          { name: "ActiveCampaign", category: "ad", domains: ["*.trackcmp.net", "app-us1.com", "*.app-us1.com"], examples: ["trackcmp.net", "prism.app-us1.com", "diffuser-cdn.app-us1.com"], totalExecutionTime: 1605217, totalOccurrences: 19100 },
          { name: "AcuityAds", category: "ad", domains: ["*.acuityplatform.com"], totalExecutionTime: 2492, totalOccurrences: 693 },
          { name: "Acxiom", category: "ad", domains: ["*.acxiom-online.com", "*.acxiomapac.com", "*.delivery.net"] },
          { name: "Ad4Screen", category: "ad", domains: ["*.a4.tl"] },
          { name: "Ad6Media", category: "ad", domains: ["*.ad6media.fr"], totalExecutionTime: 821770, totalOccurrences: 654 },
          { name: "AdCurve", category: "ad", domains: ["*.shop2market.com"] },
          { name: "AdEasy", category: "ad", domains: ["*.adeasy.ru"] },
          { name: "AdExtent", category: "ad", domains: ["*.adextent.com"] },
          { name: "AdForge Edge", company: "AdForge", category: "ad", domains: ["*.adforgeinc.com"] },
          { name: "AdGear", company: "Samsung Electronics", category: "ad", domains: ["*.adgear.com", "*.adgrx.com"], totalExecutionTime: 19948, totalOccurrences: 42920 },
          { name: "AdInMedia", category: "ad", domains: ["*.fastapi.net"] },
          { name: "AdJug", category: "ad", domains: ["*.adjug.com"], examples: ["tracking.adjug.com", "uk.view.adjug.com"] },
          { name: "AdMatic", category: "ad", domains: ["*.admatic.com.tr"], totalExecutionTime: 1274496, totalOccurrences: 467 },
          { name: "AdMedia", category: "ad", domains: ["*.admedia.com"], examples: ["pixel.admedia.com"], totalExecutionTime: 2027, totalOccurrences: 7 },
          { name: "AdRecover", category: "ad", domains: ["*.adrecover.com"], totalExecutionTime: 5117, totalOccurrences: 46 },
          { name: "AdRiver", category: "ad", domains: ["*.adriver.ru"], totalExecutionTime: 1374767, totalOccurrences: 4740 },
          { name: "AdSniper", category: "ad", domains: ["*.adsniper.ru", "*.sniperlog.ru"], totalExecutionTime: 2366, totalOccurrences: 22 },
          { name: "AdSpeed", category: "ad", domains: ["*.adspeed.net"], totalExecutionTime: 4642, totalOccurrences: 16 },
          { name: "AdSpruce", category: "ad", domains: ["*.adspruce.com"] },
          { name: "AdSupply", category: "ad", domains: ["*.doublepimp.com"], totalExecutionTime: 1436, totalOccurrences: 13 },
          { name: "AdTheorent", category: "ad", domains: ["*.adentifi.com"], totalExecutionTime: 108, totalOccurrences: 1 },
          { name: "AdThink AudienceInsights", company: "AdThink Media", category: "analytics", domains: ["*.audienceinsights.net"] },
          { name: "AdTrue", company: "FPT AdTrue", category: "ad", domains: ["*.adtrue.com"] },
          { name: "AdYapper", category: "ad", domains: ["*.adyapper.com"] },
          { name: "Adacado", category: "ad", domains: ["*.adacado.com"], totalExecutionTime: 1777, totalOccurrences: 18 },
          { name: "Adap.tv", category: "ad", domains: ["*.adap.tv"] },
          { name: "Adapt Services", category: "hosting", domains: ["*.adcmps.com"] },
          { name: "Adaptive Web", category: "hosting", domains: ["*.adaptive.co.uk"] },
          { name: "Adara Media", category: "ad", domains: ["*.yieldoptimizer.com"], totalExecutionTime: 1324, totalOccurrences: 23 },
          { name: "Adblade", category: "ad", domains: ["*.adblade.com"], totalExecutionTime: 704, totalOccurrences: 7 },
          { name: "Adbrain", category: "ad", domains: ["*.adbrn.com"] },
          { name: "AddEvent", category: "utility", domains: ["*.addevent.com"], examples: ["www.addevent.com"], totalExecutionTime: 73230, totalOccurrences: 203 },
          { name: "AddShoppers", category: "social", domains: ["*.addshoppers.com", "d3rr3d0n31t48m.cloudfront.net", "*.shop.pe"], totalExecutionTime: 31574, totalOccurrences: 451 },
          { name: "AddThisEvent", category: "hosting", domains: ["*.addthisevent.com"] },
          { name: "Addoox MetaNetwork", company: "Addoox", category: "ad", domains: ["*.metanetwork.net"] },
          { name: "Addvantage Media", category: "ad", domains: ["*.addvantagemedia.com", "*.simplytechnology.net"] },
          { name: "AD EBis", category: "analytics", homepage: "https://www.ebis.ne.jp/", domains: ["*.ebis.ne.jp"], examples: ["taj1.ebis.ne.jp"], totalExecutionTime: 55086, totalOccurrences: 608 },
          { name: "Adecs", category: "customer-success", domains: ["*.adecs.co.uk"], examples: ["www.adecs.co.uk"] },
          { name: "Adelphic", category: "ad", domains: ["*.ipredictive.com"], totalExecutionTime: 8196, totalOccurrences: 112 },
          { name: "Adestra", category: "ad", domains: ["*.adestra.com", "*.msgfocus.com"] },
          { name: "Adform", category: "ad", domains: ["*.adform.net", "*.adformdsp.net"], totalExecutionTime: 1798751, totalOccurrences: 140125 },
          { name: "Adkontekst", category: "ad", domains: ["*.adkontekst.pl"] },
          { name: "Adlead", category: "ad", domains: ["*.webelapp.com"] },
          { name: "Adledge", category: "utility", domains: ["*.adledge.com"] },
          { name: "Adloox", category: "ad", domains: ["*.adlooxtracking.com"], totalExecutionTime: 103507, totalOccurrences: 112 },
          { name: "Adlux", category: "ad", domains: ["*.adlux.com"] },
          { name: "Admedo", category: "ad", domains: ["*.a8723.com", "*.adizio.com", "*.admedo.com"], examples: ["pool.a8723.com"], totalExecutionTime: 9586, totalOccurrences: 695 },
          { name: "Admeta", company: "Wideorbit", category: "ad", domains: ["*.atemda.com"] },
          { name: "Admetrics", company: "Next Tuesday", category: "analytics", domains: ["*.nt.vc"], examples: ["metrics.nt.vc"] },
          { name: "Admiral", category: "ad", domains: ["*.unknowntray.com"] },
          { name: "Admitad", category: "ad", domains: ["*.lenmit.com"], totalExecutionTime: 2335, totalOccurrences: 31 },
          { name: "Admixer for Publishers", company: "Admixer", category: "ad", domains: ["*.admixer.net"], totalExecutionTime: 1542643, totalOccurrences: 878 },
          { name: "Adnium", category: "ad", domains: ["*.adnium.com"] },
          { name: "Adnostic", company: "Dennis Publishing", category: "ad", domains: ["*.adnostic.co.uk"] },
          { name: "Adobe Marketing Cloud", company: "Adobe Systems", category: "ad", domains: ["*.adobetag.com"] },
          { name: "Adobe Scene7", company: "Adobe Systems", category: "content", domains: ["wwwimages.adobe.com", "*.scene7.com", "*.everestads.net", "*.everestjs.net"], totalExecutionTime: 808424, totalOccurrences: 702 },
          { name: "Adobe Systems", category: "content", domains: ["adobe.com", "www.adobe.com"], totalExecutionTime: 38836, totalOccurrences: 179 },
          { name: "Adobe Business Catalyst", homepage: "https://www.businesscatalyst.com/", category: "hosting", domains: ["*.businesscatalyst.com"] },
          { name: "Adocean", company: "Gemius", category: "ad", domains: ["*.adocean.pl"], totalExecutionTime: 1658274, totalOccurrences: 2151 },
          { name: "Adometry", company: "Google", category: "ad", domains: ["*.dmtry.com"] },
          {
            name: "Adomik",
            category: "analytics",
            domains: ["*.adomik.com"]
          },
          { name: "Adotmob", category: "ad", domains: ["*.adotmob.com"] },
          { name: "Adrian Quevedo", category: "hosting", domains: ["*.adrianquevedo.com"] },
          { name: "Adroit Digital Solutions", category: "ad", domains: ["*.imiclk.com", "*.abmr.net"] },
          { name: "AdsNative", category: "ad", domains: ["*.adsnative.com"] },
          { name: "AdsWizz", category: "ad", domains: ["*.adswizz.com"], totalExecutionTime: 479514, totalOccurrences: 1901 },
          { name: "Adscale", category: "ad", domains: ["*.adscale.de"], totalExecutionTime: 106237, totalOccurrences: 960 },
          { name: "Adschoom", company: "JSWeb Production", category: "ad", domains: ["*.adschoom.com"], totalExecutionTime: 491, totalOccurrences: 2 },
          { name: "Adscience", category: "ad", domains: ["*.adscience.nl"] },
          { name: "Adsiduous", category: "ad", domains: ["*.adsiduous.com"] },
          { name: "Adsty", category: "ad", domains: ["*.adx1.com"], totalExecutionTime: 698, totalOccurrences: 5 },
          { name: "Adtech (AOL)", category: "ad", domains: ["*.adtechus.com"], totalExecutionTime: 176, totalOccurrences: 2 },
          { name: "Adtegrity", category: "ad", domains: ["*.adtpix.com"], totalExecutionTime: 1735, totalOccurrences: 20 },
          { name: "Adthink", company: "Adthink Media", category: "ad", domains: ["*.adxcore.com", "*.dcoengine.com"], examples: ["d.adxcore.com"] },
          { name: "AdultWebmasterEmpire.Com", category: "ad", domains: ["*.awempire.com"], totalExecutionTime: 65091, totalOccurrences: 38 },
          { name: "Adunity", category: "ad", domains: ["*.adunity.com"] },
          { name: "Advance Magazine Group", category: "content", domains: ["*.condenastdigital.com", "*.condenet.com", "*.condenast.co.uk"], totalExecutionTime: 2531, totalOccurrences: 8 },
          { name: "Adverline Board", company: "Adverline", category: "ad", domains: ["*.adverline.com", "*.adnext.fr"] },
          { name: "AdvertServe", category: "ad", domains: ["*.advertserve.com"], totalExecutionTime: 112685, totalOccurrences: 437 },
          { name: "Advolution", category: "utility", domains: ["*.advolution.de"] },
          { name: "Adwise", category: "ad", domains: ["*.adwise.bg"], totalExecutionTime: 144, totalOccurrences: 2 },
          { name: "Adyen", category: "utility", domains: ["*.adyen.com"], totalExecutionTime: 6335144, totalOccurrences: 2363 },
          { name: "Adyoulike", category: "ad", domains: ["*.adyoulike.com", "*.omnitagjs.com", "*.adyoulike.net"], totalExecutionTime: 147862, totalOccurrences: 53190 },
          { name: "Adzerk", category: "ad", domains: ["*.adzerk.net"], totalExecutionTime: 35184, totalOccurrences: 117 },
          { name: "Adzip", company: "Adbox Digital", category: "ad", domains: ["*.adzip.co"] },
          { name: "AerServ", category: "ad", domains: ["*.aerserv.com"] },
          { name: "Affectv", category: "ad", domains: ["*.affectv.com", "*.affec.tv"], totalExecutionTime: 1187, totalOccurrences: 12 },
          { name: "Affiliate Window", company: "Digital Window", category: "ad", domains: ["*.dwin1.com"], totalExecutionTime: 561168, totalOccurrences: 5414 },
          { name: "Affiliatly", category: "ad", domains: ["*.affiliatly.com"], examples: ["www.affiliatly.com"], totalExecutionTime: 32020, totalOccurrences: 132 },
          { name: "Affino", category: "ad", domains: ["affino.com"] },
          { name: "Affirm", category: "utility", domains: ["*.affirm.com"], totalExecutionTime: 3997184, totalOccurrences: 6665 },
          { name: "Afterpay", company: "Block", category: "utility", homepage: "https://www.afterpay.com/", domains: ["*.afterpay.com"], examples: ["static-us.afterpay.com"], totalExecutionTime: 1270109, totalOccurrences: 8269 },
          { name: "Agenda Media", category: "ad", domains: ["*.agendamedia.co.uk"] },
          { name: "Aggregate Knowledge", company: "Neustar", category: "ad", domains: ["*.agkn.com"], totalExecutionTime: 14828, totalOccurrences: 344 },
          { name: "AgilOne", category: "marketing", domains: ["*.agilone.com"], totalExecutionTime: 4190, totalOccurrences: 53 },
          { name: "Agility", category: "hosting", domains: ["*.agilitycms.com"], totalExecutionTime: 3079, totalOccurrences: 4 },
          {
            name: "Ahalogy",
            category: "social",
            domains: ["*.ahalogy.com"]
          },
          { name: "Aheadworks", category: "utility", domains: ["*.aheadworks.com"] },
          { name: "AirPR", category: "analytics", domains: ["*.airpr.com"], totalExecutionTime: 416, totalOccurrences: 5 },
          { name: "Aira", category: "ad", domains: ["*.aira.net"], examples: ["www.aira.net"] },
          { name: "Airport Parking and Hotels", category: "content", domains: ["*.aph.com"], totalExecutionTime: 277, totalOccurrences: 3 },
          { name: "Akanoo", category: "analytics", domains: ["*.akanoo.com"] },
          { name: "Alchemy", company: "AndBeyond.Media", category: "ad", domains: ["*.andbeyond.media"], totalExecutionTime: 456340, totalOccurrences: 164 },
          { name: "AlephD", company: "AOL", category: "ad", domains: ["*.alephd.com"] },
          { name: "AliveChat", company: "AYU Technology Solutions", category: "customer-success", domains: ["*.websitealive.com", "*.websitealive7.com"] },
          { name: "All Access", category: "other", domains: ["*.allaccess.com.ph"] },
          { name: "Alliance for Audited Media", category: "ad", domains: ["*.aamsitecertifier.com"] },
          { name: "Allyde", category: "marketing", domains: ["*.mautic.com"] },
          { name: "AlphaSSL", category: "utility", domains: ["*.alphassl.com"], totalExecutionTime: 1146, totalOccurrences: 10 },
          { name: "Altitude", category: "ad", domains: ["*.altitudeplatform.com"] },
          { name: "Altocloud", category: "analytics", domains: ["*.altocloud.com"] },
          { name: "Amadeus", category: "content", domains: ["*.e-travel.com"] },
          { name: "Amazon CloudFront", company: "Amazon", category: "utility", domains: ["cloudfront.net"] },
          { name: "Ambassador", category: "ad", domains: ["*.getambassador.com"], totalExecutionTime: 21042, totalOccurrences: 89 },
          { name: "Ambient", company: "Ericcson", category: "other", domains: ["*.adnetwork.vn", "*.ambientplatform.vn"] },
          { name: "Amelia Communication", category: "hosting", domains: ["*.sara.media"] },
          { name: "Amobee", category: "marketing", domains: ["*.amgdgt.com", "*.kontera.com"] },
          { name: "Amplience", category: "marketing", domains: ["*.10cms.com", "*.amplience.com", "*.amplience.net", "*.bigcontent.io", "*.adis.ws"], totalExecutionTime: 4093, totalOccurrences: 17 },
          { name: "Amplitude Mobile Analytics", company: "Amplitude", category: "analytics", domains: ["*.amplitude.com", "d24n15hnbwhuhn.cloudfront.net"], totalExecutionTime: 8703641, totalOccurrences: 46524 },
          { name: "Anametrix", company: "Ensighten", category: "analytics", domains: ["*.anametrix.com"] },
          { name: "Ancora Platform", company: "Ancora Media Solutions", category: "ad", domains: ["*.ancoraplatform.com"] },
          { name: "Anedot", category: "other", domains: ["*.anedot.com"], totalExecutionTime: 84655, totalOccurrences: 21 },
          { name: "AnimateJS", category: "utility", domains: ["*.animatedjs.com"] },
          { name: "AnswerDash", category: "customer-success", domains: ["*.answerdash.com"], examples: ["p1.answerdash.com"] },
          { name: "Answers", category: "analytics", domains: ["*.answcdn.com", "*.answers.com", "*.dsply.com"] },
          { name: "Apester", category: "analytics", domains: ["*.apester.com", "*.qmerce.com"], totalExecutionTime: 25294, totalOccurrences: 166 },
          { name: "Apligraf SmartWeb", company: "Apligraf", category: "utility", domains: ["*.apligraf.com.br"] },
          { name: "Appier", category: "ad", domains: ["*.appier.net"], totalExecutionTime: 124524, totalOccurrences: 826 },
          { name: "Appsolute", category: "utility", homepage: "https://appsolute.us/", domains: ["dropahint.love"], examples: ["dropahint.love"], totalExecutionTime: 16362, totalOccurrences: 144 },
          { name: "Apptus eSales", company: "Apptus", category: "analytics", domains: ["*.apptus.com"] },
          { name: "Arbor", company: "LiveRamp", category: "other", domains: ["*.pippio.com"] },
          { name: "Ardent Creative", category: "hosting", domains: ["*.ardentcreative.co.uk"] },
          { name: "Arnold Clark Automobiles", category: "content", domains: ["*.arnoldclark.com"] },
          { name: "Atom Content Marketing", category: "content", domains: ["*.atomvault.net"], examples: [
            "danu.atomvault.net"
          ] },
          { name: "Atom Data", category: "other", domains: ["*.atomdata.io"] },
          { name: "Attribution", category: "ad", domains: ["*.attributionapp.com"], totalExecutionTime: 44124, totalOccurrences: 124 },
          { name: "Audience 360", company: "Datapoint Media", category: "ad", domains: ["*.dpmsrv.com"], totalExecutionTime: 578723, totalOccurrences: 371 },
          { name: "Audience Science", category: "ad", domains: ["*.revsci.net"] },
          { name: "AudienceSearch", company: "Intimate Merger", category: "ad", domains: ["*.im-apps.net"], totalExecutionTime: 9114981, totalOccurrences: 46726 },
          { name: "Auditorius", category: "ad", domains: ["*.audtd.com"] },
          { name: "Augur", category: "analytics", domains: ["*.augur.io"] },
          { name: "Auto Link Maker", company: "Apple", category: "ad", domains: ["*.apple.com"], examples: ["autolinkmaker.itunes.apple.com"], totalExecutionTime: 657122, totalOccurrences: 2479 },
          {
            name: "Autopilot",
            category: "ad",
            domains: ["*.autopilothq.com"],
            totalExecutionTime: 15490,
            totalOccurrences: 74
          },
          { name: "Avail", company: "RichRelevance", category: "ad", domains: ["*.avail.net"] },
          { name: "AvantLink", category: "ad", domains: ["*.avmws.com"], totalExecutionTime: 417, totalOccurrences: 8 },
          { name: "Avco Systems", category: "utility", domains: ["*.avcosystems.com"] },
          { name: "Avid Media", category: "customer-success", domains: ["*.adspdbl.com", "*.metadsp.co.uk"], totalExecutionTime: 58, totalOccurrences: 1 },
          { name: "Avocet Systems", category: "ad", domains: ["*.avocet.io", "ads.avct.cloud"] },
          { name: "Avora", category: "analytics", domains: ["*.truedash.com"], examples: ["truetag.truedash.com"] },
          { name: "Azure Traffic Manager", company: "Microsoft", category: "other", domains: ["*.gateway.net", "*.trafficmanager.net"], examples: ["analytics.gateway.net"], totalExecutionTime: 51660, totalOccurrences: 148 },
          { name: "Azure Web Services", company: "Microsoft", category: "cdn", domains: ["*.azurewebsites.net", "*.azureedge.net", "*.msedge.net", "*.windows.net"], totalExecutionTime: 35665078, totalOccurrences: 51378 },
          { name: "BAM", category: "analytics", domains: ["*.bam-x.com"] },
          { name: "Baifendian Technology", category: "marketing", domains: ["*.baifendian.com"] },
          { name: "Bankrate", category: "utility", domains: ["*.bankrate.com"] },
          { name: "BannerFlow", company: "Nordic Factory Solutions", category: "ad", domains: ["*.bannerflow.com"], totalExecutionTime: 50455, totalOccurrences: 42 },
          { name: "Barclaycard SmartPay", company: "Barclaycard", category: "utility", domains: ["*.barclaycardsmartpay.com"] },
          { name: "Barilliance", category: "analytics", domains: ["*.barilliance.net", "dn3y71tq7jf07.cloudfront.net"], totalExecutionTime: 7250, totalOccurrences: 26 },
          { name: "Barnebys", category: "other", domains: ["*.barnebys.com"], totalExecutionTime: 59682, totalOccurrences: 57 },
          { name: "Basis", company: "Basis Technologies", category: "ad", homepage: "https://basis.net/", domains: ["*.basis.net"], examples: ["cdn01.basis.net"], totalExecutionTime: 215661, totalOccurrences: 2623 },
          { name: "Batch Media", category: "ad", domains: ["*.t4ft.de"] },
          { name: "Bauer Consumer Media", category: "content", domains: ["*.bauercdn.com", "*.greatmagazines.co.uk"], examples: ["www.greatmagazines.co.uk"] },
          { name: "Baynote", category: "analytics", domains: ["*.baynote.net"] },
          { name: "Bazaarvoice", category: "analytics", domains: ["*.bazaarvoice.com", "*.feedmagnet.com"], totalExecutionTime: 1664795, totalOccurrences: 3375 },
          { name: "Beachfront Media", category: "ad", domains: ["*.bfmio.com"], totalExecutionTime: 7782, totalOccurrences: 771 },
          { name: "BeamPulse", category: "analytics", domains: ["*.beampulse.com"] },
          { name: "Beeswax", category: "ad", domains: ["*.bidr.io"], totalExecutionTime: 5298, totalOccurrences: 12735 },
          { name: "Beetailer", category: "social", domains: ["*.beetailer.com"], examples: ["www.beetailer.com"] },
          {
            name: "Best Of Media S.A.",
            category: "content",
            domains: ["*.servebom.com"],
            totalExecutionTime: 29,
            totalOccurrences: 67
          },
          { name: "Bet365", category: "ad", domains: ["*.bet365affiliates.com"] },
          { name: "Betfair", category: "other", domains: ["*.cdnbf.net"] },
          { name: "Betgenius", company: "Genius Sports", category: "content", domains: ["*.connextra.com"], totalExecutionTime: 84739, totalOccurrences: 287 },
          { name: "Better Banners", category: "ad", domains: ["*.betterbannerscloud.com"] },
          { name: "Better Business Bureau", category: "analytics", domains: ["*.bbb.org"], totalExecutionTime: 10819, totalOccurrences: 78 },
          { name: "Between Digital", category: "ad", domains: ["*.betweendigital.com"], totalExecutionTime: 88306, totalOccurrences: 787 },
          { name: "BidTheatre", category: "ad", domains: ["*.bidtheatre.com"], totalExecutionTime: 23106, totalOccurrences: 252 },
          { name: "Bidtellect", category: "ad", domains: ["*.bttrack.com"], totalExecutionTime: 2834, totalOccurrences: 19 },
          {
            name: "Bigcommerce",
            category: "marketing",
            domains: ["*.bigcommerce.com"],
            totalExecutionTime: 45747978,
            totalOccurrences: 19595
          },
          { name: "BitGravity", company: "Tata Communications", category: "content", domains: ["*.bitgravity.com"] },
          { name: "Bitly", category: "utility", domains: ["*.bitly.com", "*.lemde.fr", "*.bit.ly"], totalExecutionTime: 2977, totalOccurrences: 8 },
          { name: "Bizible", category: "ad", domains: ["*.bizible.com", "*.bizibly.com"], totalExecutionTime: 435247, totalOccurrences: 1186 },
          { name: "Bizrate", category: "analytics", domains: ["*.bizrate.com"], totalExecutionTime: 11197, totalOccurrences: 57 },
          { name: "BlastCasta", category: "social", domains: ["*.poweringnews.com"], examples: ["www.poweringnews.com"] },
          { name: "Blindado", category: "utility", domains: ["*.siteblindado.com"], totalExecutionTime: 41, totalOccurrences: 1 },
          { name: "Blis", category: "ad", domains: ["*.blismedia.com"] },
          { name: "Blogg.se", category: "hosting", domains: ["*.cdnme.se", "*.publishme.se"] },
          { name: "BloomReach", category: "ad", domains: ["*.brcdn.com", "*.brsrvr.com", "*.brsvr.com"], totalExecutionTime: 2695, totalOccurrences: 47 },
          { name: "Bloomberg", category: "content", domains: ["*.gotraffic.net"] },
          { name: "Shop Logic", company: "BloomReach", category: "marketing", domains: ["*.goshoplogic.com"] },
          { name: "Blue State Digital", category: "ad", domains: ["*.bsd.net"] },
          { name: "Blue Triangle Technologies", category: "analytics", domains: ["*.btttag.com"], totalExecutionTime: 102966, totalOccurrences: 182 },
          { name: "BlueCava", category: "ad", domains: ["*.bluecava.com"], totalExecutionTime: 466075, totalOccurrences: 5165 },
          { name: "BlueKai", company: "Oracle", category: "ad", domains: ["*.bkrtx.com", "*.bluekai.com"], totalExecutionTime: 4, totalOccurrences: 6 },
          { name: "Bluecore", category: "analytics", domains: ["*.bluecore.com"], examples: ["www.bluecore.com"], totalExecutionTime: 83612, totalOccurrences: 225 },
          { name: "Bluegg", category: "hosting", domains: ["d1va5oqn59yrvt.cloudfront.net"] },
          { name: "Bold Commerce", category: "utility", domains: [
            "*.shappify-cdn.com",
            "*.shappify.com",
            "*.boldapps.net"
          ], totalExecutionTime: 5072681, totalOccurrences: 9886 },
          { name: "BoldChat", company: "LogMeIn", category: "customer-success", domains: ["*.boldchat.com"] },
          { name: "Bombora", category: "ad", domains: ["*.mlno6.com"] },
          { name: "Bonnier", category: "content", domains: ["*.bonniercorp.com"] },
          { name: "Bookatable", category: "content", domains: ["*.bookatable.com", "*.livebookings.com"] },
          { name: "Booking.com", category: "content", domains: ["*.bstatic.com"], totalExecutionTime: 1652677, totalOccurrences: 2448 },
          { name: "Boomtrain", category: "ad", domains: ["*.boomtrain.com", "*.boomtrain.net"], totalExecutionTime: 360072, totalOccurrences: 2169 },
          { name: "BoostSuite", category: "ad", domains: ["*.poweredbyeden.com"] },
          { name: "Boostable", category: "ad", domains: ["*.boostable.com"] },
          { name: "Bootstrap Chinese network", category: "cdn", domains: ["*.bootcss.com"], totalExecutionTime: 427117, totalOccurrences: 881 },
          {
            name: "Booxscale",
            category: "ad",
            domains: ["*.booxscale.com"]
          },
          { name: "Borderfree", company: "pitney bowes", category: "utility", domains: ["*.borderfree.com", "*.fiftyone.com"] },
          { name: "BowNow", category: "analytics", homepage: "https://bow-now.jp/", domains: ["*.bownow.jp"], examples: ["contents.bownow.jp"], totalExecutionTime: 1298132, totalOccurrences: 2410 },
          { name: "Box", category: "hosting", domains: ["*.box.com"], totalExecutionTime: 15191, totalOccurrences: 223 },
          { name: "Boxever", category: "analytics", domains: ["*.boxever.com"] },
          { name: "Braintree Payments", company: "Paypal", category: "utility", domains: ["*.braintreegateway.com"], totalExecutionTime: 171291, totalOccurrences: 1141 },
          { name: "Branch Metrics", category: "ad", domains: ["*.branch.io", "*.app.link"], totalExecutionTime: 441792, totalOccurrences: 8288 },
          { name: "Brand Finance", category: "other", domains: ["*.brandirectory.com"] },
          { name: "Brand View", category: "analytics", domains: ["*.brandview.com"] },
          { name: "Brandscreen", category: "ad", domains: ["*.rtbidder.net"], examples: ["match.rtbidder.net"] },
          { name: "BridgeTrack", company: "Sapient", category: "ad", domains: ["*.bridgetrack.com"] },
          { name: "BrightRoll", company: "Yahoo!", category: "ad", domains: ["*.btrll.com"] },
          { name: "BrightTag / Signal", company: "Signal", homepage: "https://www.signal.co", category: "tag-manager", domains: ["*.btstatic.com", "*.thebrighttag.com"] },
          { name: "Brightcove ZenCoder", company: "Brightcove", category: "other", domains: ["*.zencoder.net"] },
          { name: "Bronto Software", category: "marketing", domains: ["*.bm23.com", "*.bronto.com", "*.brontops.com"] },
          { name: "Browser-Update.org", category: "other", domains: ["*.browser-update.org"] },
          { name: "Buffer", category: "social", domains: ["*.bufferapp.com"], totalExecutionTime: 535, totalOccurrences: 7 },
          { name: "Bugsnag", category: "utility", domains: ["*.bugsnag.com", "d2wy8f7a9ursnm.cloudfront.net"], examples: ["notify.bugsnag.com"], totalExecutionTime: 6197502, totalOccurrences: 15069 },
          { name: "Burst Media", category: "ad", domains: ["*.burstnet.com", "*.1rx.io"], examples: ["usermatch.burstnet.com"], totalExecutionTime: 1618, totalOccurrences: 52 },
          { name: "Burt", category: "analytics", domains: ["*.richmetrics.com", "*.burt.io"] },
          { name: "Business Message", category: "ad", domains: ["*.message-business.com"], totalExecutionTime: 7310, totalOccurrences: 21 },
          { name: "Business Week", company: "Bloomberg", category: "social", domains: ["*.bwbx.io"], totalExecutionTime: 67737, totalOccurrences: 9 },
          { name: "Buto", company: "Big Button", category: "ad", domains: ["*.buto.tv"] },
          { name: "Button", category: "ad", domains: ["*.btncdn.com"] },
          { name: "BuySellAds", category: "ad", domains: ["*.buysellads.com", "*.buysellads.net"], totalExecutionTime: 179225, totalOccurrences: 170 },
          { name: "BuySight (AOL)", category: "ad", domains: ["*.pulsemgr.com"] },
          { name: "Buyapowa", category: "ad", domains: [
            "*.co-buying.com"
          ], totalExecutionTime: 3038, totalOccurrences: 37 },
          { name: "BuzzFeed", category: "social", domains: ["*.buzzfed.com", "*.buzzfeed.com"], totalExecutionTime: 14608, totalOccurrences: 2 },
          { name: "C1X", category: "ad", domains: ["*.c1exchange.com"] },
          { name: "C3 Metrics", category: "analytics", domains: ["*.c3tag.com"], totalExecutionTime: 18122, totalOccurrences: 153 },
          { name: "CANDDi", company: "Campaign and Digital Intelligence", category: "ad", domains: ["*.canddi.com"], totalExecutionTime: 84756, totalOccurrences: 150 },
          { name: "CCM benchmark Group", category: "social", domains: ["*.ccm2.net"] },
          { name: "CD Networks", category: "utility", domains: ["*.gccdn.net"] },
          { name: "CDN Planet", category: "analytics", domains: ["*.cdnplanet.com"] },
          { name: "InAuth", category: "utility", homepage: "https://www.inauth.com/", domains: ["*.cdn-net.com"], examples: ["uk.cdn-net.com"], totalExecutionTime: 306346, totalOccurrences: 298 },
          { name: "CJ Affiliate", company: "Conversant", category: "ad", domains: ["*.cj.com", "*.dpbolvw.net"], totalExecutionTime: 7725, totalOccurrences: 17 },
          { name: "CJ Affiliate by Conversant", company: "Conversant", category: "ad", domains: ["*.ftjcfx.com"], totalExecutionTime: 8, totalOccurrences: 4 },
          { name: "CNBC", category: "content", domains: ["*.cnbc.com"], totalExecutionTime: 11468, totalOccurrences: 12 },
          { name: "CNET Content Solutions", company: "CBS Interactive", category: "content", domains: ["*.cnetcontent.com"], examples: ["cdn.cnetcontent.com", "ws.cnetcontent.com"] },
          { name: "CPEx", category: "content", domains: ["*.cpex.cz"], totalExecutionTime: 763356, totalOccurrences: 1104 },
          { name: "CPXi", category: "ad", domains: ["*.cpxinteractive.com"] },
          { name: "CUBED Attribution", company: "CUBED", category: "ad", domains: ["*.withcubed.com"], examples: ["data.withcubed.com"] },
          { name: "Cachefly", category: "utility", domains: ["*.cachefly.net"], totalExecutionTime: 128046, totalOccurrences: 258 },
          { name: "Calendly", category: "other", domains: ["*.calendly.com"], totalExecutionTime: 8622733, totalOccurrences: 4604 },
          { name: "CallRail", category: "analytics", domains: ["*.callrail.com"], totalExecutionTime: 8080185, totalOccurrences: 29537 },
          { name: "CallTrackingMetrics", category: "analytics", domains: ["*.tctm.co"], totalExecutionTime: 1981698, totalOccurrences: 7503 },
          { name: "Canned Banners", category: "ad", domains: ["*.cannedbanners.com"] },
          { name: "Canopy Labs", category: "analytics", domains: ["*.canopylabs.com"] },
          { name: "Capita", category: "utility", domains: ["*.crcom.co.uk"], examples: ["emmsrep.crcom.co.uk"] },
          { name: "Captify Media", category: "ad", domains: ["*.cpx.to"], totalExecutionTime: 1519, totalOccurrences: 31 },
          { name: "Captiify", category: "ad", domains: ["*.captifymedia.com"] },
          { name: "Captivate Ai", category: "ad", domains: ["*.captivate.ai"] },
          { name: "Captora", category: "marketing", domains: ["*.captora.com"] },
          {
            name: "Carcloud",
            category: "other",
            domains: ["*.carcloud.co.uk"]
          },
          { name: "Cardlytics", category: "ad", domains: ["*.cardlytics.com"] },
          { name: "Cardosa Enterprises", category: "analytics", domains: ["*.y-track.com"], totalExecutionTime: 778, totalOccurrences: 17 },
          { name: "Caspian Media", category: "ad", domains: ["*.caspianmedia.com"] },
          { name: "Cast", category: "utility", domains: ["*.cast.rocks"] },
          { name: "Catch", category: "other", domains: ["*.getcatch.com"], examples: ["app.getcatch.com", "assets.getcatch.com", "js.getcatch.com"], totalExecutionTime: 18282, totalOccurrences: 40 },
          { name: "Cavisson", category: "analytics", domains: ["*.cavisson.com"] },
          { name: "Cedato", category: "ad", domains: ["*.algovid.com", "*.vdoserv.com"] },
          { name: "Celebrus Technologies", category: "analytics", domains: ["*.celebrus.com"] },
          { name: "Celtra", category: "ad", domains: ["*.celtra.com"], totalExecutionTime: 369517, totalOccurrences: 427 },
          { name: "Centro", category: "ad", domains: ["*.brand-server.com"] },
          { name: "Ceros", category: "other", domains: ["ceros.com", "view.ceros.com"], totalExecutionTime: 64139, totalOccurrences: 149 },
          { name: "Ceros Analytics", company: "Ceros", category: "analytics", domains: ["api.ceros.com"] },
          { name: "Certona", category: "analytics", domains: ["*.certona.net"], totalExecutionTime: 376, totalOccurrences: 4 },
          { name: "Certum", category: "utility", domains: ["*.ocsp-certum.com", "*.certum.pl"], totalExecutionTime: 8544, totalOccurrences: 3 },
          { name: "Cgrdirect", category: "other", domains: ["*.cgrdirect.co.uk"] },
          { name: "Channel 5 Media", category: "ad", domains: ["*.five.tv"] },
          { name: "Channel.me", category: "customer-success", domains: ["*.channel.me"] },
          { name: "ChannelAdvisor", category: "ad", domains: ["*.channeladvisor.com", "*.searchmarketing.com"], totalExecutionTime: 3385, totalOccurrences: 25 },
          { name: "ChannelApe", company: "ChannelApe", category: "other", homepage: "https://www.channelape.com/", domains: ["*.channelape.com"], examples: ["callbacks.channelape.com"] },
          { name: "Chargeads Oscar", company: "Chargeads", category: "ad", domains: ["*.chargeads.com"] },
          { name: "Charities Aid Foundation", category: "utility", domains: ["*.cafonline.org"], totalExecutionTime: 4368, totalOccurrences: 7 },
          { name: "Chartbeat", category: "analytics", domains: ["*.chartbeat.com", "*.chartbeat.net"], totalExecutionTime: 1270560, totalOccurrences: 6246 },
          { name: "Cheapflights Media", company: "Momondo", category: "content", domains: ["*.momondo.net"] },
          { name: "CheckM8", category: "ad", domains: ["*.checkm8.com"] },
          { name: "CheckRate", company: "FreeStart", category: "utility", domains: ["*.checkrate.co.uk"] },
          { name: "Checkfront", category: "other", domains: ["*.checkfront.com", "dcg3jth5savst.cloudfront.net"], totalExecutionTime: 279282, totalOccurrences: 152 },
          { name: "CheetahMail", company: "Experian", category: "ad", domains: ["*.chtah.com"] },
          { name: "Chitika", category: "ad", domains: ["*.chitika.net"] },
          { name: "ChoiceStream", category: "ad", domains: ["*.choicestream.com"] },
          { name: "Cint", category: "social", domains: ["*.cint.com"], totalExecutionTime: 111659, totalOccurrences: 33 },
          { name: "Civic", category: "hosting", domains: ["*.civiccomputing.com"], totalExecutionTime: 2815742, totalOccurrences: 7253 },
          { name: "ClearRise", category: "customer-success", domains: ["*.clearrise.com"] },
          { name: "Clearstream", category: "ad", domains: ["*.clrstm.com"] },
          { name: "Clerk.io ApS", category: "analytics", domains: ["*.clerk.io"], totalExecutionTime: 1196778, totalOccurrences: 1915 },
          { name: "CleverDATA", category: "ad", domains: ["*.1dmp.io"] },
          { name: "CleverTap", category: "analytics", domains: ["d2r1yp2w7bby2u.cloudfront.net"], totalExecutionTime: 163519, totalOccurrences: 1321 },
          { name: "Click Density", category: "analytics", domains: ["*.clickdensity.com"] },
          { name: "Click4Assistance", category: "customer-success", domains: ["*.click4assistance.co.uk"], totalExecutionTime: 22710, totalOccurrences: 178 },
          { name: "ClickDesk", category: "customer-success", domains: ["*.clickdesk.com", "d1gwclp1pmzk26.cloudfront.net"], totalExecutionTime: 74975, totalOccurrences: 595 },
          { name: "ClickDimensions", category: "ad", domains: ["*.clickdimensions.com"], totalExecutionTime: 125295, totalOccurrences: 262 },
          { name: "Clickadu (Winner Solutions)", category: "ad", domains: ["*.clickadu.com"], totalExecutionTime: 10740, totalOccurrences: 4 },
          { name: "Clickagy Audience Lab", company: "Clickagy", category: "ad", domains: ["*.clickagy.com"], examples: ["aorta.clickagy.com"], totalExecutionTime: 44558, totalOccurrences: 667 },
          { name: "Clickio", category: "ad", domains: [] },
          { name: "Clicktale", category: "analytics", domains: ["*.cdngc.net", "*.clicktale.net"], examples: ["clicktalecdn.sslcs.cdngc.net"], totalExecutionTime: 288716, totalOccurrences: 256 },
          {
            name: "Clicktripz",
            category: "content",
            domains: ["*.clicktripz.com"],
            examples: ["static.clicktripz.com", "www.clicktripz.com"],
            totalExecutionTime: 502041,
            totalOccurrences: 354
          },
          { name: "Clik.com Websites", category: "content", domains: ["*.clikpic.com"] },
          { name: "Cloud Technologies", category: "ad", domains: ["*.behavioralengine.com", "*.behavioralmailing.com"] },
          { name: "Cloud-A", category: "other", domains: ["*.bulkstorage.ca"] },
          { name: "Cloud.typography", company: "Hoefler &amp; Co", category: "cdn", domains: ["*.typography.com"], totalExecutionTime: 3308, totalOccurrences: 364 },
          { name: "CloudSponge", category: "ad", domains: ["*.cloudsponge.com"] },
          { name: "CloudVPS", category: "other", domains: ["*.adoftheyear.com", "*.objectstore.eu"] },
          { name: "Cloudinary", category: "content", domains: ["*.cloudinary.com"], totalExecutionTime: 1188126, totalOccurrences: 2129 },
          { name: "Cloudqp", company: "Cloudwp", category: "other", domains: ["*.cloudwp.io"] },
          { name: "Cludo", category: "utility", domains: ["*.cludo.com"], totalExecutionTime: 25376, totalOccurrences: 249 },
          { name: "Cognesia", category: "marketing", domains: ["*.intelli-direct.com"] },
          { name: "CogoCast", company: "Cogo Labs", category: "ad", domains: ["*.cogocast.net"] },
          { name: "Colbenson", category: "utility", domains: ["*.colbenson.com"] },
          { name: "Collective", category: "ad", domains: ["*.collective-media.net"] },
          { name: "Com Laude", category: "other", domains: ["*.gdimg.net"] },
          { name: "Comm100", category: "customer-success", domains: ["*.comm100.com"], totalExecutionTime: 469389, totalOccurrences: 1045 },
          { name: "CommerceHub", category: "marketing", domains: ["*.mercent.com"] },
          { name: "Commission Factory", category: "ad", domains: ["*.cfjump.com"], totalExecutionTime: 961, totalOccurrences: 12 },
          { name: "Communicator", category: "ad", domains: ["*.communicatorcorp.com", "*.communicatoremail.com"] },
          { name: "Comodo", category: "utility", domains: ["*.comodo.com", "*.trust-provider.com", "*.trustlogo.com", "*.usertrust.com", "*.comodo.net"], examples: ["ocsp.trust-provider.com"], totalExecutionTime: 41752, totalOccurrences: 34 },
          { name: "Comodo Certificate Authority", company: "Comodo", category: "utility", domains: ["crt.comodoca.com", "*.comodoca4.com", "ocsp.comodoca.com", "ocsp.usertrust.com", "crt.usertrust.com"], examples: ["ocsp.comodoca4.com"] },
          { name: "Compete", company: "Millwood Brown Digital", category: "analytics", domains: ["*.c-col.com", "*.compete.com"] },
          { name: "Compuware", category: "analytics", domains: ["*.axf8.net"] },
          { name: "Conductrics", category: "analytics", domains: ["*.conductrics.com"], examples: ["cdn-v3.conductrics.com"], totalExecutionTime: 12705, totalOccurrences: 61 },
          { name: "Confirmit", category: "analytics", domains: ["*.confirmit.com"], totalExecutionTime: 32100, totalOccurrences: 195 },
          { name: "Connatix", category: "ad", domains: ["*.connatix.com"], totalExecutionTime: 6751327, totalOccurrences: 1195 },
          { name: "Connect Events", category: "hosting", domains: ["*.connectevents.com.au"] },
          {
            name: "Constant Contact",
            category: "ad",
            domains: ["*.ctctcdn.com"],
            totalExecutionTime: 604932,
            totalOccurrences: 17528
          },
          { name: "Constructor.io", category: "utility", domains: ["*.cnstrc.com"] },
          { name: "Contabo", category: "hosting", domains: ["185.2.100.179"] },
          { name: "Content Media Corporation", category: "content", domains: ["*.contentmedia.eu"] },
          { name: "ContentSquare", category: "analytics", domains: ["d1m6l9dfulcyw7.cloudfront.net", "*.content-square.net", "*.contentsquare.net"], totalExecutionTime: 3626830, totalOccurrences: 2948 },
          { name: "ContextWeb", category: "ad", domains: ["*.contextweb.com"], totalExecutionTime: 32437, totalOccurrences: 1909 },
          { name: "Continental Exchange Solutions", category: "utility", domains: ["*.hifx.com"] },
          { name: "Converge-Digital", category: "ad", domains: ["*.converge-digital.com"], examples: ["ads.converge-digital.com"] },
          {
            name: "Conversant",
            category: "analytics",
            domains: ["*.dotomi.com", "*.dtmpub.com", "*.emjcd.com", "mediaplex.com", "*.tqlkg.com", "*.fastclick.net"],
            examples: ["www.tqlkg.com"],
            totalExecutionTime: 6531550,
            totalOccurrences: 54802
          },
          { name: "Conversant Ad Server", company: "Conversant", category: "ad", domains: ["adfarm.mediaplex.com", "*.mediaplex.com"] },
          { name: "Conversant Tag Manager", company: "Conversant", category: "tag-manager", domains: ["*.mplxtms.com"], totalExecutionTime: 14146, totalOccurrences: 58 },
          { name: "Conversio", category: "ad", domains: ["*.conversio.com"] },
          { name: "Conversion Labs", category: "ad", domains: ["*.net.pl"], examples: ["conversionlabs.net.pl"], totalExecutionTime: 3243395, totalOccurrences: 1898 },
          { name: "Conversion Logic", category: "ad", domains: ["*.conversionlogic.net"] },
          { name: "Convert Insights", category: "analytics", domains: ["*.convertexperiments.com"], totalExecutionTime: 2575826, totalOccurrences: 4385 },
          { name: "ConvertMedia", category: "ad", domains: ["*.admailtiser.com", "*.basebanner.com", "*.cmbestsrv.com", "*.vidfuture.com", "*.zorosrv.com"], examples: ["www.cmbestsrv.com"] },
          { name: "Convertro", category: "ad", domains: [
            "*.convertro.com"
          ] },
          { name: "Conviva", category: "content", domains: ["*.conviva.com"], totalExecutionTime: 2955, totalOccurrences: 2 },
          { name: "Cookie Reports", category: "utility", domains: ["*.cookiereports.com"], totalExecutionTime: 280810, totalOccurrences: 671 },
          { name: "Cookie-Script.com", category: "utility", domains: ["*.cookie-script.com"], totalExecutionTime: 15051619, totalOccurrences: 58095 },
          { name: "CookieQ", company: "Baycloud Systems", category: "utility", domains: ["*.cookieq.com"] },
          { name: "CoolaData", category: "analytics", domains: ["*.cooladata.com"], totalExecutionTime: 1165, totalOccurrences: 15 },
          { name: "CopperEgg", category: "analytics", domains: ["*.copperegg.com", "d2vig74li2resi.cloudfront.net"] },
          { name: "Council ad Network", category: "ad", domains: ["*.counciladvertising.net"], totalExecutionTime: 18621, totalOccurrences: 94 },
          { name: "Covert Pics", category: "content", domains: ["*.covet.pics"], totalExecutionTime: 4496, totalOccurrences: 55 },
          { name: "Cox Digital Solutions", category: "ad", domains: ["*.afy11.net"] },
          { name: "Creafi Online Media", category: "ad", domains: ["*.creafi-online-media.com"] },
          { name: "Creators", category: "content", domains: ["*.creators.co"] },
          { name: "Crimson Hexagon Analytics", company: "Crimson Hexagon", category: "analytics", domains: ["*.hexagon-analytics.com"] },
          { name: "Crimtan", category: "ad", domains: ["*.ctnsnet.com"], totalExecutionTime: 59150, totalOccurrences: 74818 },
          { name: "Cross Pixel Media", category: "ad", domains: ["*.crsspxl.com"], totalExecutionTime: 493, totalOccurrences: 8 },
          { name: "Crosswise", category: "ad", domains: ["*.univide.com"], examples: ["p.univide.com"] },
          { name: "Crowd Control", company: "Lotame", category: "ad", domains: ["*.crwdcntrl.net"], totalExecutionTime: 16298725, totalOccurrences: 101196 },
          { name: "Crowd Ignite", category: "ad", domains: ["*.crowdignite.com"] },
          { name: "CrowdTwist", category: "ad", domains: ["*.crowdtwist.com"] },
          { name: "Crowdskout", category: "ad", domains: ["*.crowdskout.com"] },
          { name: "Crowdynews", category: "social", domains: ["*.breakingburner.com"] },
          { name: "Curalate", category: "marketing", domains: ["*.curalate.com", "d116tqlcqfmz3v.cloudfront.net"], totalExecutionTime: 628884, totalOccurrences: 683 },
          { name: "Customer Acquisition Cloud", company: "[24]7", category: "ad", domains: ["*.campanja.com"] },
          { name: "Customer.io", category: "ad", domains: ["*.customer.io"], totalExecutionTime: 210609, totalOccurrences: 1268 },
          { name: "Custora", category: "analytics", domains: ["*.custora.com"] },
          { name: "Cxense", category: "ad", domains: ["*.cxense.com", "*.cxpublic.com", "*.emediate.dk", "*.emediate.eu"], totalExecutionTime: 2218364, totalOccurrences: 3708 },
          { name: "CyberKnight", company: "Namogoo", category: "utility", domains: ["*.namogoo.com"] },
          { name: "CyberSource (Visa)", category: "utility", domains: ["*.authorize.net"], totalExecutionTime: 339030, totalOccurrences: 2682 },
          { name: "Cybernet Quest", category: "analytics", domains: ["*.cqcounter.com"] },
          { name: "D.A. Consortium", category: "ad", domains: ["*.eff1.net"] },
          { name: "D4t4 Solutions", category: "analytics", domains: ["*.u5e.com"] },
          { name: "DCSL Software", category: "hosting", domains: ["*.dcslsoftware.com"] },
          { name: "DMG Media", category: "content", domains: ["*.mol.im", "*.and.co.uk", "*.anm.co.uk", "*.dailymail.co.uk"], totalExecutionTime: 37855, totalOccurrences: 15 },
          { name: "DTSCOUT", category: "ad", domains: ["*.dtscout.com"], totalExecutionTime: 645362, totalOccurrences: 8311 },
          { name: "Dailykarma", category: "utility", homepage: "https://www.dailykarma.com/", domains: ["*.dailykarma.io"], examples: ["assets.dailykarma.io"], totalExecutionTime: 122378, totalOccurrences: 477 },
          {
            name: "Dailymotion",
            category: "content",
            domains: ["*.dailymotion.com", "*.dmxleo.com", "*.dm.gg", "*.pxlad.io", "*.dmcdn.net", "*.sublimevideo.net"],
            examples: ["ad.pxlad.io", "www.dailymotion.com"],
            totalExecutionTime: 56076026,
            totalOccurrences: 5142
          },
          { name: "Dash Hudson", company: "Dash Hudson", category: "content", domains: ["*.dashhudson.com"], examples: ["cdn.dashhudson.com"], totalExecutionTime: 154963, totalOccurrences: 91 },
          { name: "Datacamp", category: "utility", domains: ["*.cdn77.org"], totalExecutionTime: 3303608, totalOccurrences: 1181 },
          { name: "Datalicious", category: "tag-manager", domains: ["*.supert.ag", "*.optimahub.com"] },
          { name: "Datalogix", category: "ad", domains: ["*.nexac.com"] },
          { name: "Datawrapper", category: "utility", domains: ["*.datawrapper.de", "*.dwcdn.net"], examples: ["www.datawrapper.de"], totalExecutionTime: 951486, totalOccurrences: 249 },
          { name: "Dataxu", category: "marketing", domains: ["*.w55c.net"], totalExecutionTime: 10, totalOccurrences: 5 },
          { name: "DatoCMS", homepage: "https://www.datocms.com/", category: "content", domains: ["*.datocms-assets.com"], examples: ["www.datocms-assets.com"] },
          { name: "Datonics", category: "ad", domains: ["*.pro-market.net"], examples: ["pbid.pro-market.net"], totalExecutionTime: 16955, totalOccurrences: 254 },
          { name: "Dealtime", category: "content", domains: ["*.dealtime.com"] },
          { name: "Debenhams Geo Location", company: "Debenhams", category: "utility", domains: ["176.74.183.134"] },
          { name: "Decibel Insight", category: "analytics", domains: ["*.decibelinsight.net"], totalExecutionTime: 995190, totalOccurrences: 691 },
          { name: "Deep Forest Media", company: "Rakuten", category: "ad", domains: ["*.dpclk.com"] },
          { name: "DeepIntent", category: "ad", domains: ["*.deepintent.com"], totalExecutionTime: 3875, totalOccurrences: 206 },
          { name: "Delicious Media", category: "social", domains: ["*.delicious.com"] },
          { name: "Delineo", category: "ad", domains: ["*.delineo.com"], examples: ["www.delineo.com"] },
          { name: "Delta Projects AB", category: "ad", domains: ["*.de17a.com"], totalExecutionTime: 90548, totalOccurrences: 382 },
          { name: "Demand Media", category: "content", domains: ["*.dmtracker.com"] },
          {
            name: "DemandBase",
            category: "marketing",
            domains: ["*.demandbase.com"],
            totalExecutionTime: 393206,
            totalOccurrences: 2552
          },
          { name: "DemandJump", category: "analytics", domains: ["*.demandjump.com"] },
          { name: "Dennis Publishing", category: "content", domains: ["*.alphr.com"] },
          { name: "Devatics", category: "analytics", domains: ["*.devatics.com", "*.devatics.io"] },
          { name: "Developer Media", category: "ad", domains: ["*.developermedia.com"], totalExecutionTime: 4416, totalOccurrences: 17 },
          { name: "DialogTech", category: "ad", domains: ["*.dialogtech.com"] },
          { name: "DialogTech SourceTrak", company: "DialogTech", category: "ad", domains: ["d31y97ze264gaa.cloudfront.net"] },
          { name: "DigiCert", category: "utility", domains: ["*.digicert.com"], examples: ["ocsp.digicert.com"], totalExecutionTime: 26560, totalOccurrences: 83 },
          { name: "Digioh", category: "ad", domains: ["*.lightboxcdn.com"], totalExecutionTime: 1347082, totalOccurrences: 1303 },
          { name: "Digital Look", category: "content", domains: ["*.digitallook.com"] },
          { name: "Digital Media Exchange", company: "NDN", category: "content", domains: ["*.newsinc.com"] },
          { name: "Digital Millennium Copyright Act Services", category: "utility", domains: ["*.dmca.com"], totalExecutionTime: 8820, totalOccurrences: 70 },
          { name: "Digital Ocean", category: "other", domains: ["95.85.62.56"] },
          { name: "Digital Remedy", category: "ad", domains: ["*.consumedmedia.com"] },
          { name: "Digital Window", category: "ad", domains: ["*.awin1.com", "*.zenaps.com"], totalExecutionTime: 195, totalOccurrences: 4 },
          { name: "DigitalScirocco", category: "analytics", domains: ["*.digitalscirocco.net"] },
          { name: "Digitial Point", category: "utility", domains: ["*.dpstatic.com"] },
          { name: "Diligent (Adnetik)", category: "ad", domains: ["*.wtp101.com"] },
          { name: "Directed Edge", category: "social", domains: ["*.directededge.com"], examples: ["shopify.directededge.com"], totalExecutionTime: 8371, totalOccurrences: 81 },
          { name: "Distribute Travel", category: "ad", domains: ["*.dtrck.net"] },
          { name: "District M", category: "ad", domains: ["*.districtm.io"] },
          { name: "DistroScale", category: "ad", domains: ["*.jsrdn.com"], totalExecutionTime: 186009, totalOccurrences: 198 },
          { name: "Divido", category: "utility", domains: ["*.divido.com"] },
          { name: "Dow Jones", category: "content", domains: ["*.dowjones.com", "*.dowjoneson.com"] },
          { name: "Drifty Co", category: "utility", domains: ["*.onicframework.com"] },
          { name: "Drip", company: "The Numa Group", category: "ad", domains: ["*.getdrip.com"], totalExecutionTime: 120918, totalOccurrences: 1350 },
          { name: "Dropbox", category: "utility", domains: ["*.dropboxusercontent.com"], totalExecutionTime: 142552, totalOccurrences: 145 },
          { name: "Dyn Real User Monitoring", company: "Dyn", category: "analytics", domains: ["*.jisusaiche.biz", "*.dynapis.com", "*.jisusaiche.com", "*.dynapis.info"], examples: ["beacon.rum.dynapis.com"] },
          { name: "DynAdmic", category: "ad", domains: [
            "*.dyntrk.com"
          ] },
          { name: "Dynamic Converter", category: "utility", domains: ["*.dynamicconverter.com"], totalExecutionTime: 58723, totalOccurrences: 96 },
          { name: "Dynamic Dummy Image Generator", company: "Open Source", category: "utility", domains: ["*.dummyimage.com"] },
          { name: "Dynamic Logic", category: "ad", domains: ["*.dl-rms.com", "*.questionmarket.com"] },
          { name: "Dynamic Yield", category: "customer-success", domains: ["*.dynamicyield.com"], totalExecutionTime: 3580074, totalOccurrences: 1843 },
          { name: "Dynatrace", category: "analytics", domains: ["*.ruxit.com", "js-cdn.dynatrace.com"], totalExecutionTime: 4106731, totalOccurrences: 3221 },
          { name: "ec-concier", homepage: "https://ec-concier.com/", category: "marketing", domains: ["*.ec-concier.com"], examples: ["s.ec-concier.com", "gsync.ec-concier.com"] },
          { name: "ECT News Network", category: "content", domains: ["*.ectnews.com"] },
          { name: "ELITechGroup", category: "analytics", domains: ["*.elitechnology.com"] },
          {
            name: "EMAP",
            category: "content",
            domains: ["*.emap.com"]
          },
          { name: "EMedia Solutions", category: "ad", domains: ["*.e-shots.eu"], examples: ["www.e-shots.eu"] },
          { name: "EQ works", category: "ad", domains: ["*.eqads.com"] },
          { name: "ESV Digital", category: "analytics", domains: ["*.esearchvision.com"] },
          { name: "Ebiquity", category: "analytics", domains: ["*.ebiquitymedia.com"] },
          { name: "Eco Rebates", category: "ad", domains: ["*.ecorebates.com"] },
          { name: "Ecwid", category: "hosting", domains: ["*.ecwid.com", "*.shopsettings.com", "d3fi9i0jj23cau.cloudfront.net", "d3j0zfs7paavns.cloudfront.net"], totalExecutionTime: 3757012, totalOccurrences: 4362 },
          { name: "Edge Web Fonts", company: "Adobe Systems", category: "cdn", domains: ["*.edgefonts.net"], examples: ["use.edgefonts.net"] },
          { name: "Edition Digital", category: "ad", domains: ["*.editiondigital.com"] },
          { name: "Edot Web Technologies", category: "hosting", domains: ["*.edot.co.za"] },
          { name: "Effective Measure", category: "ad", domains: ["*.effectivemeasure.net"], totalExecutionTime: 17, totalOccurrences: 1 },
          { name: "Effiliation sa", category: "ad", domains: ["*.effiliation.com"], totalExecutionTime: 108, totalOccurrences: 3 },
          { name: "Ekm Systems", category: "analytics", domains: ["*.ekmsecure.com", "*.ekmpinpoint.co.uk"], examples: ["globalstats.ekmsecure.com"], totalExecutionTime: 67875, totalOccurrences: 789 },
          { name: "Elastera", category: "hosting", domains: ["*.elastera.net"] },
          { name: "Elastic Ad", category: "ad", domains: ["*.elasticad.net"], totalExecutionTime: 30225, totalOccurrences: 137 },
          { name: "Elastic Load Balancing", company: "Amazon Web Services", category: "hosting", domains: ["*.105app.com"], examples: ["rhpury.105app.com", "rhxtd.105app.com"] },
          { name: "Elecard StreamEye", company: "Elecard", category: "other", domains: ["*.streameye.net"] },
          { name: "Elevate", company: "Elevate Technology Solutions", category: "utility", domains: ["*.elevaate.technology"] },
          {
            name: "Elicit",
            category: "utility",
            domains: ["*.elicitapp.com"]
          },
          { name: "Elogia", category: "ad", domains: ["*.elogia.net"] },
          { name: "Email Attitude", company: "1000mercis", category: "ad", domains: ["*.email-attitude.com"] },
          { name: "EmailCenter", category: "ad", domains: ["*.emailcenteruk.com"] },
          { name: "Embedly", category: "content", domains: ["*.embedly.com", "*.embed.ly"], totalExecutionTime: 5014487, totalOccurrences: 10836 },
          { name: "EmpathyBroker Site Search", company: "EmpathyBroker", category: "utility", domains: ["*.empathybroker.com"] },
          { name: "Enfusen", category: "analytics", domains: ["*.enfusen.com"] },
          { name: "Engadget", company: "Engadget (AOL)", category: "content", domains: ["*.gdgt.com"], examples: ["media.gdgt.com"] },
          { name: "Engagio", category: "marketing", domains: ["*.engagio.com"] },
          { name: "Ensighten Manage", company: "Ensighten", category: "tag-manager", domains: ["*.levexis.com"] },
          { name: "EntityLink", category: "other", domains: ["*.entitytag.co.uk"] },
          { name: "Entrust Datacard", category: "utility", domains: ["*.entrust.com", "*.entrust.net"], examples: ["ocsp.entrust.com", "ocsp.entrust.net"], totalExecutionTime: 14041, totalOccurrences: 3 },
          { name: "Equiniti", category: "utility", domains: ["*.equiniti.com"] },
          { name: "Errorception", category: "utility", domains: ["*.errorception.com"] },
          { name: "Esri ArcGIS", company: "Esri", category: "utility", domains: ["*.arcgis.com", "*.arcgisonline.com"], totalExecutionTime: 21967746, totalOccurrences: 3432 },
          { name: "Ethnio", category: "analytics", domains: ["*.ethn.io"] },
          { name: "Eulerian Technologies", category: "ad", domains: ["*.eolcdn.com"] },
          { name: "Euroland", category: "utility", domains: ["*.euroland.com"], totalExecutionTime: 1, totalOccurrences: 3 },
          { name: "European Interactive Digital ad Alli", category: "utility", domains: ["*.edaa.eu"] },
          { name: "Eventbrite", category: "hosting", domains: ["*.evbuc.com", "*.eventbrite.co.uk"], totalExecutionTime: 4667, totalOccurrences: 33 },
          { name: "Everflow", category: "analytics", domains: ["*.tp88trk.com"], examples: ["www.tp88trk.com"], totalExecutionTime: 110842, totalOccurrences: 185 },
          { name: "Evergage", category: "analytics", domains: ["*.evergage.com", "*.evgnet.com"], examples: ["cdn.evgnet.com"], totalExecutionTime: 1095634, totalOccurrences: 2491 },
          { name: "Everquote", category: "content", domains: ["*.evq1.com"] },
          { name: "Everyday Health", category: "ad", domains: ["*.agoramedia.com"] },
          { name: "Evidon", category: "analytics", domains: ["*.evidon.com"], totalExecutionTime: 1260409, totalOccurrences: 2482 },
          { name: "Evolve Media", category: "content", domains: ["*.evolvemediallc.com"] },
          { name: "Exactag", category: "ad", domains: ["*.exactag.com"], totalExecutionTime: 662, totalOccurrences: 6 },
          { name: "ExoClick", category: "ad", domains: ["*.exoclick.com"], totalExecutionTime: 69348, totalOccurrences: 568 },
          { name: "Expedia", category: "content", domains: [
            "*.travel-assets.com",
            "*.trvl-media.com",
            "*.trvl-px.com",
            "*.uciservice.com"
          ], examples: ["www.trvl-px.com", "www.uciservice.com"], totalExecutionTime: 15443, totalOccurrences: 15 },
          { name: "Expedia Australia", company: "Expedia", category: "content", domains: ["*.expedia.com.au"], examples: ["www.expedia.com.au"] },
          { name: "Expedia Canada", company: "Expedia", category: "content", domains: ["*.expedia.ca"], examples: ["www.expedia.ca"] },
          { name: "Expedia France", company: "Expedia", category: "content", domains: ["*.expedia.fr"], examples: ["www.expedia.fr"] },
          { name: "Expedia Germany", company: "Expedia", category: "content", domains: ["*.expedia.de"], examples: ["www.expedia.de"] },
          { name: "Expedia Italy", company: "Expedia", category: "content", domains: ["*.expedia.it"], examples: ["www.expedia.it"] },
          { name: "Expedia Japan", company: "Expedia", category: "content", domains: ["*.expedia.co.jp"], examples: ["www.expedia.co.jp"] },
          { name: "Expedia USA", company: "Expedia", category: "content", domains: ["*.expedia.com"], examples: ["www.expedia.com"], totalExecutionTime: 40062, totalOccurrences: 19 },
          { name: "Expedia United Kingdom", company: "Expedia", category: "content", domains: ["*.expedia.co.uk"], examples: ["www.expedia.co.uk"] },
          { name: "Experian", category: "utility", domains: ["*.audienceiq.com", "*.experian.com", "*.experianmarketingservices.digital"] },
          { name: "Experian Cross-Channel Marketing Platform", company: "Experian", category: "marketing", domains: ["*.eccmp.com", "*.ccmp.eu"], totalExecutionTime: 1268, totalOccurrences: 24 },
          { name: "Exponea", category: "analytics", domains: ["*.exponea.com"], totalExecutionTime: 154832, totalOccurrences: 1303 },
          { name: "Exponential Interactive", category: "ad", domains: ["*.exponential.com"], totalExecutionTime: 5179, totalOccurrences: 120 },
          { name: "Extensis WebInk", category: "cdn", domains: ["*.webink.com"] },
          {
            name: "Extole",
            category: "ad",
            domains: ["*.extole.com", "*.extole.io"],
            examples: ["origin.extole.io"],
            totalExecutionTime: 21067,
            totalOccurrences: 44
          },
          { name: "Ey-Seren", category: "analytics", domains: ["*.webabacus.com"] },
          { name: "EyeView", category: "ad", domains: ["*.eyeviewads.com"] },
          { name: "Eyeota", category: "ad", domains: ["*.eyeota.net"], totalExecutionTime: 152570, totalOccurrences: 1827 },
          { name: "Ezakus Pretargeting", company: "Ezakus", category: "ad", domains: ["*.ezakus.net"] },
          { name: "Ezoic", category: "analytics", domains: ["*.ezoic.net"], totalExecutionTime: 93024, totalOccurrences: 173 },
          { name: "FLXone", company: "Teradata", category: "ad", domains: ["*.pangolin.blue", "*.flx1.com", "d2hlpp31teaww3.cloudfront.net", "*.flxpxl.com"], totalExecutionTime: 25037, totalOccurrences: 67 },
          { name: "Fairfax Media", category: "content", domains: ["ads.fairfax.com.au", "resources.fairfax.com.au"] },
          { name: "Fairfax Media Analtics", company: "Fairfax Media", category: "analytics", domains: ["analytics.fairfax.com.au"] },
          { name: "Falk Technologies", category: "ad", domains: ["*.angsrvr.com"] },
          { name: "Fanplayr", category: "analytics", domains: ["*.fanplayr.com", "d38nbbai6u794i.cloudfront.net"], totalExecutionTime: 69669, totalOccurrences: 154 },
          { name: "Fast Thinking", company: "NE Marketing", category: "marketing", domains: ["*.fast-thinking.co.uk"] },
          { name: "Fastest Forward", category: "analytics", domains: ["*.gaug.es"], totalExecutionTime: 13583, totalOccurrences: 261 },
          { name: "Fastly", category: "utility", domains: ["*.fastly.net"], totalExecutionTime: 21362072, totalOccurrences: 9582 },
          { name: "Feedbackify", company: "InsideMetrics", category: "analytics", domains: ["*.feedbackify.com"], totalExecutionTime: 42808, totalOccurrences: 173 },
          { name: "Feefo.com", company: "Feefo", category: "analytics", domains: ["*.feefo.com"], totalExecutionTime: 1362284, totalOccurrences: 2025 },
          { name: "Fidelity Media", category: "ad", domains: ["*.fidelity-media.com"], examples: ["x.fidelity-media.com"] },
          { name: "Filestack", category: "content", domains: ["*.filepicker.io"], examples: ["api.filepicker.io", "dialog.filepicker.io", "www.filepicker.io"], totalExecutionTime: 27297, totalOccurrences: 200 },
          { name: "Finsbury Media", category: "ad", domains: ["*.finsburymedia.com"], totalExecutionTime: 3470, totalOccurrences: 12 },
          { name: "Firepush", category: "utility", domains: ["*.firepush.io"] },
          { name: "FirstImpression", category: "ad", domains: ["*.firstimpression.io"], totalExecutionTime: 141056, totalOccurrences: 107 },
          { name: "Fit Analytics", category: "other", domains: ["*.fitanalytics.com"], examples: ["integrations.fitanalytics.com", "widget.fitanalytics.com", "metrics.fitanalytics.com"] },
          { name: "Fits Me", category: "analytics", domains: ["*.fits.me"] },
          { name: "Fivetran", category: "analytics", domains: ["*.fivetran.com"], totalExecutionTime: 2922, totalOccurrences: 3 },
          { name: "FlexShopper", category: "utility", domains: ["*.flexshopper.com"] },
          {
            name: "Flickr",
            category: "content",
            domains: ["*.flickr.com", "*.staticflickr.com"],
            totalExecutionTime: 262262,
            totalOccurrences: 524
          },
          { name: "Flipboard", category: "social", domains: ["*.flipboard.com"], totalExecutionTime: 50049, totalOccurrences: 41 },
          { name: "Flipdesk", category: "customer-success", homepage: "https://flipdesk.jp/", domains: ["*.flipdesk.jp"], examples: ["api.flipdesk.jp"], totalExecutionTime: 322297, totalOccurrences: 411 },
          { name: "Flipp", category: "analytics", domains: ["*.wishabi.com", "d2e0sxz09bo7k2.cloudfront.net", "*.wishabi.net"] },
          { name: "Flite", category: "ad", domains: ["*.flite.com"] },
          { name: "Flixmedia", category: "analytics", domains: ["*.flix360.com", "*.flixcar.com", "*.flixfacts.com", "*.flixsyndication.net", "*.flixfacts.co.uk"], totalExecutionTime: 32827, totalOccurrences: 19 },
          { name: "Flockler", category: "ad", domains: ["*.flockler.com"], totalExecutionTime: 504051, totalOccurrences: 1297 },
          { name: "Flowplayer", category: "content", domains: ["*.flowplayer.org"], totalExecutionTime: 218859, totalOccurrences: 862 },
          {
            name: "Flowzymes Ky",
            category: "cdn",
            domains: ["*.jquerytools.org"]
          },
          { name: "Fomo", category: "ad", domains: ["*.notifyapp.io"] },
          { name: "Fonecall", category: "analytics", domains: ["*.web-call-analytics.com"] },
          { name: "Fontdeck", category: "cdn", domains: ["*.fontdeck.com"] },
          { name: "Foodity Technologies", category: "ad", domains: ["*.foodity.com"] },
          { name: "Force24", category: "ad", domains: ["*.force24.co.uk"], totalExecutionTime: 10225, totalOccurrences: 112 },
          { name: "ForeSee", company: "Answers", category: "analytics", domains: ["*.4seeresults.com", "*.answerscloud.com", "*.foresee.com", "*.foreseeresults.com"], totalExecutionTime: 179704, totalOccurrences: 266 },
          { name: "Forensiq", category: "utility", domains: ["*.fqtag.com"], totalExecutionTime: 21937, totalOccurrences: 171 },
          { name: "Fort Awesome", category: "cdn", domains: ["*.fortawesome.com"], totalExecutionTime: 652365, totalOccurrences: 3635 },
          {
            name: "Forter",
            category: "utility",
            domains: ["*.forter.com"],
            totalExecutionTime: 6578955,
            totalOccurrences: 6930
          },
          { name: "Forward Internet Group", category: "hosting", domains: ["*.f3d.io"] },
          { name: "Forward3D", category: "ad", domains: ["*.forward3d.com"] },
          { name: "Fospha", category: "analytics", domains: ["*.fospha.com"], examples: ["router.fospha.com"] },
          { name: "Foursixty", category: "customer-success", domains: ["*.foursixty.com"] },
          { name: "FoxyCart", category: "utility", domains: ["*.foxycart.com"], totalExecutionTime: 361777, totalOccurrences: 669 },
          { name: "Fraudlogix", category: "utility", domains: ["*.yabidos.com"], totalExecutionTime: 47637, totalOccurrences: 357 },
          { name: "FreakOut", category: "ad", domains: ["*.fout.jp"], totalExecutionTime: 114328, totalOccurrences: 2036 },
          { name: "Freespee", category: "customer-success", domains: ["*.freespee.com"], examples: ["analytics.freespee.com"], totalExecutionTime: 67626, totalOccurrences: 484 },
          {
            name: "Freetobook",
            category: "content",
            domains: ["*.freetobook.com"],
            examples: ["www.freetobook.com"],
            totalExecutionTime: 297146,
            totalOccurrences: 649
          },
          { name: "Fresh 8 Gaming", category: "ad", domains: ["*.fresh8.co"], totalExecutionTime: 319849, totalOccurrences: 76 },
          { name: "Fresh Relevance", category: "analytics", domains: ["*.freshrelevance.com", "*.cloudfront.ne", "d1y9qtn9cuc3xw.cloudfront.net", "d81mfvml8p5ml.cloudfront.net", "dkpklk99llpj0.cloudfront.net"], examples: ["d1y9qtn9cuc3xw.cloudfront.ne"], totalExecutionTime: 91181, totalOccurrences: 300 },
          { name: "Friendbuy", category: "ad", domains: ["*.friendbuy.com", "djnf6e5yyirys.cloudfront.net"], totalExecutionTime: 17783, totalOccurrences: 150 },
          { name: "Frienefit", category: "ad", domains: ["*.frienefit.com"] },
          { name: "FuelX", category: "ad", domains: ["*.fuelx.com"] },
          { name: "Full Circle Studies", category: "analytics", domains: ["*.securestudies.com"] },
          { name: "FullStory", category: "analytics", domains: ["*.fullstory.com"], examples: ["rs.fullstory.com"], totalExecutionTime: 11575233, totalOccurrences: 14687 },
          { name: "Fyber", category: "ad", domains: ["*.fyber.com"] },
          { name: "G-Forces Web Management", category: "hosting", domains: ["*.gforcesinternal.co.uk"] },
          { name: "G4 Native", company: "Gravity4", category: "ad", domains: ["*.triggit.com"] },
          { name: "GET ME IN!  (TicketMaster)", category: "content", domains: ["*.getmein.com"] },
          { name: "GIPHY", category: "content", domains: ["*.giphy.com"], totalExecutionTime: 4831, totalOccurrences: 6 },
          { name: "GainCloud", company: "GainCloud Systems", category: "other", domains: ["*.egaincloud.net"] },
          { name: "Gath Adams", category: "content", domains: ["*.iwantthatflight.com.au"] },
          { name: "Gecko Tribe", category: "social", domains: ["*.geckotribe.com"] },
          { name: "Gemius", category: "ad", domains: ["*.gemius.pl"], totalExecutionTime: 2964756, totalOccurrences: 15596 },
          { name: "Genesis Media", category: "ad", domains: ["*.bzgint.com", "*.genesismedia.com", "*.genesismediaus.com"] },
          { name: "Genie Ventures", category: "ad", domains: ["*.genieventures.co.uk"] },
          { name: "Geniee", category: "ad", domains: ["*.href.asia", "*.genieessp.jp", "*.genieesspv.jp", "*.gssprt.jp"], examples: ["cs.gssprt.jp"], totalExecutionTime: 16956055, totalOccurrences: 16354 },
          { name: "Geniuslink", category: "analytics", domains: ["*.geni.us"], totalExecutionTime: 897, totalOccurrences: 3 },
          { name: "GeoRiot", category: "other", domains: ["*.georiot.com"] },
          { name: "GeoTrust", category: "utility", domains: ["*.geotrust.com"], totalExecutionTime: 3300, totalOccurrences: 2 },
          { name: "Geoplugin", category: "utility", domains: ["*.geoplugin.com", "*.geoplugin.net"], totalExecutionTime: 119, totalOccurrences: 3 },
          { name: "Georeferencer", company: "Klokan Technologies", category: "utility", domains: ["*.georeferencer.com"] },
          { name: "GetIntent RTBSuite", company: "GetIntent", category: "ad", domains: ["*.adhigh.net"], totalExecutionTime: 2768, totalOccurrences: 356 },
          {
            name: "GetResponse",
            category: "ad",
            domains: ["*.getresponse.com"],
            totalExecutionTime: 209076,
            totalOccurrences: 1019
          },
          { name: "GetSiteControl", company: "GetWebCraft", category: "utility", domains: ["*.getsitecontrol.com"], totalExecutionTime: 1739288, totalOccurrences: 3146 },
          { name: "GetSocial", category: "social", domains: ["*.getsocial.io"], totalExecutionTime: 1204, totalOccurrences: 11 },
          { name: "Getty Images", category: "content", domains: ["*.gettyimages.com", "*.gettyimages.co.uk"], examples: ["www.gettyimages.com"], totalExecutionTime: 17939, totalOccurrences: 65 },
          { name: "Gfycat", company: "Gycat", category: "utility", domains: ["*.gfycat.com"] },
          { name: "Ghostery Enterprise", company: "Ghostery", category: "marketing", domains: ["*.betrad.com"], totalExecutionTime: 1129, totalOccurrences: 26 },
          { name: "Giant Media", category: "ad", domains: ["*.videostat.com"] },
          { name: "Gigya", category: "analytics", domains: ["*.gigya.com"], totalExecutionTime: 2692493, totalOccurrences: 1995 },
          { name: "GitHub", category: "utility", domains: ["*.github.com", "*.githubusercontent.com", "*.github.io", "*.rawgit.com"], examples: ["raw.githubusercontent.com", "cdn.rawgit.com"], totalExecutionTime: 7126491, totalOccurrences: 14675 },
          { name: "Gladly", company: "Gladly", homepage: "https://www.gladly.com/", category: "customer-success", domains: ["*.gladly.com"], examples: ["cdn.gladly.com"], totalExecutionTime: 240417, totalOccurrences: 381 },
          { name: "Glassdoor", category: "content", domains: ["*.glassdoor.com"], totalExecutionTime: 68877, totalOccurrences: 19 },
          { name: "Gleam", category: "marketing", domains: ["*.gleam.io"], totalExecutionTime: 43249, totalOccurrences: 221 },
          { name: "Global Digital Markets", category: "ad", domains: ["*.gdmdigital.com"] },
          { name: "Global-e", category: "hosting", domains: ["*.global-e.com"], totalExecutionTime: 706185, totalOccurrences: 1314 },
          { name: "GlobalSign", category: "utility", domains: ["*.globalsign.com", "*.globalsign.net"], totalExecutionTime: 11228, totalOccurrences: 48 },
          { name: "GlobalWebIndex", category: "analytics", domains: ["*.globalwebindex.net"] },
          { name: "Globase International", category: "ad", domains: ["*.globase.com"] },
          { name: "GoDataFeed", category: "other", domains: ["*.godatafeed.com"] },
          { name: "Google APIs", company: "Google", category: "utility", domains: ["googleapis.com"] },
          { name: "Google Ad Block Detection", company: "Google", category: "ad", domains: ["*.0emn.com", "*.0fmm.com"] },
          { name: "Google Analytics Experiments", company: "Google", category: "analytics", domains: ["*.gexperiments1.com"] },
          { name: "Google DoubleClick Ad Exchange", company: "Google", category: "ad", domains: ["*.admeld.com"] },
          { name: "Google IPV6 Metrics", company: "Google", category: "analytics", domains: ["*.ipv6test.net"] },
          { name: "Google Plus", company: "Google", category: "social", domains: ["plus.google.com"], totalExecutionTime: 49945, totalOccurrences: 442 },
          {
            name: "Google Trusted Stores",
            company: "Google",
            category: "utility",
            domains: ["*.googlecommerce.com"],
            totalExecutionTime: 218,
            totalOccurrences: 5
          },
          { name: "Google Video", company: "Google", category: "content", domains: ["*.googlevideo.com"], totalExecutionTime: 4, totalOccurrences: 3 },
          { name: "Google reCAPTCHA", company: "Google", category: "utility", domains: ["*.recaptcha.net"], examples: ["api.recaptcha.net"], totalExecutionTime: 8694396, totalOccurrences: 25662 },
          { name: "GovMetric", company: "ROL Solutions", category: "analytics", domains: ["*.govmetric.com"], totalExecutionTime: 233, totalOccurrences: 6 },
          { name: "Granify", category: "analytics", domains: ["*.granify.com"], totalExecutionTime: 19211, totalOccurrences: 24 },
          { name: "Grapeshot", category: "ad", domains: ["*.gscontxt.net", "*.grapeshot.co.uk"], totalExecutionTime: 4945, totalOccurrences: 4 },
          { name: "Gravity (AOL)", category: "analytics", domains: ["*.grvcdn.com"] },
          { name: "Groovy Gecko", category: "content", domains: ["*.ggwebcast.com", "*.groovygecko.net"] },
          { name: "GroupM", category: "ad", domains: ["*.qservz.com"] },
          {
            name: "Guardian Media",
            category: "ad",
            domains: ["*.theguardian.com", "*.guardian.co.uk"],
            examples: ["oas.theguardian.com"]
          },
          { name: "GumGum", category: "ad", domains: ["*.gumgum.com"], totalExecutionTime: 3440651, totalOccurrences: 167535 },
          { name: "Gumtree", category: "content", domains: ["*.gumtree.com"] },
          { name: "H264 Codec", company: "Cisco", category: "other", domains: ["*.openh264.org"] },
          { name: "HERE", category: "analytics", domains: ["*.medio.com"] },
          { name: "HP Optimost", company: "Hewlett-Packard Development Company", category: "marketing", domains: ["*.hp.com", "d2uncb19xzxhzx.cloudfront.net"], examples: ["by.marketinghub.hp.com", "marketinghub.hp.com"], totalExecutionTime: 420577, totalOccurrences: 100 },
          { name: "Has Offers", company: "TUNE", category: "ad", domains: ["*.go2cloud.org"], totalExecutionTime: 0, totalOccurrences: 3 },
          { name: "Hawk Search", category: "utility", domains: ["*.hawksearch.com"], totalExecutionTime: 15097, totalOccurrences: 132 },
          {
            name: "Haymarket Media Group",
            category: "content",
            domains: ["*.brandrepublic.com", "*.hbpl.co.uk"]
          },
          { name: "Heap", category: "analytics", domains: ["*.heapanalytics.com"], totalExecutionTime: 5187800, totalOccurrences: 12078 },
          { name: "Hearst Communications", category: "content", domains: ["*.h-cdn.co", "*.hearstdigital.com", "*.hearstlabs.com", "*.hearst.io", "*.cdnds.net"] },
          { name: "Heatmap", category: "analytics", domains: ["*.heatmap.it"], totalExecutionTime: 7337, totalOccurrences: 141 },
          { name: "Heroku", category: "other", domains: ["*.herokuapp.com"], totalExecutionTime: 12602535, totalOccurrences: 14119 },
          { name: "Hexton", category: "utility", domains: ["*.hextom.com"], totalExecutionTime: 10806589, totalOccurrences: 24738 },
          { name: "Hibernia Networks", category: "utility", domains: ["*.hiberniacdn.com"] },
          { name: "High Impact Media", category: "ad", domains: ["*.reactx.com"] },
          {
            name: "Highcharts",
            category: "utility",
            domains: ["*.highcharts.com"],
            totalExecutionTime: 746540,
            totalOccurrences: 3181
          },
          { name: "Highwinds", category: "utility", domains: ["*.hwcdn.net"] },
          { name: "HitsLink", category: "analytics", domains: ["*.hitslink.com"], totalExecutionTime: 1452, totalOccurrences: 29 },
          { name: "Hola Networks", category: "other", domains: ["*.h-cdn.com"], totalExecutionTime: 83024, totalOccurrences: 42 },
          { name: "Hootsuite", category: "analytics", domains: ["*.hootsuite.com"] },
          { name: "HotUKDeals", category: "analytics", domains: ["*.hotukdeals.com"] },
          { name: "HotWords", company: "Media Response Group", category: "ad", domains: ["*.hotwords.com.br"] },
          { name: "HotelsCombined", category: "content", domains: ["*.datahc.com"], totalExecutionTime: 81, totalOccurrences: 2 },
          { name: "Hoverr", category: "ad", domains: ["*.hoverr.media"] },
          { name: "Hull.js", category: "utility", domains: ["*.hull.io", "*.hullapp.io"] },
          { name: "Hupso Website Analyzer", company: "Hupso", category: "analytics", domains: ["*.hupso.com"], totalExecutionTime: 20892, totalOccurrences: 248 },
          { name: "I-Behavior", company: "WPP", category: "ad", domains: ["*.ib-ibi.com"], totalExecutionTime: 23, totalOccurrences: 35 },
          { name: "i-mobile", company: "i-mobile", category: "ad", domains: ["*.i-mobile.co.jp"], examples: ["ssp-sync.i-mobile.co.jp"], totalExecutionTime: 3701005, totalOccurrences: 16595 },
          { name: "IBM Digital Analytics", company: "IBM", category: "analytics", domains: ["*.cmcore.com", "coremetrics.com", "data.coremetrics.com", "data.de.coremetrics.com", "libs.de.coremetrics.com", "tmscdn.de.coremetrics.com", "iocdn.coremetrics.com", "libs.coremetrics.com", "tmscdn.coremetrics.com", "*.s81c.com", "*.unica.com", "*.coremetrics.eu"], examples: ["data.coremetrics.eu"], totalExecutionTime: 126790, totalOccurrences: 169 },
          { name: "IBM Digital Data Exchange", company: "IBM", category: "tag-manager", domains: ["tagmanager.coremetrics.com"] },
          { name: "IBM Tealeaf", company: "IBM", category: "analytics", domains: ["*.ibmcloud.com"], examples: ["uscollector.tealeaf.ibmcloud.com"] },
          { name: "IBM Acoustic Campaign", company: "IBM", category: "analytics", domains: ["www.sc.pages01.net", "www.sc.pages02.net", "www.sc.pages03.net", "www.sc.pages04.net", "www.sc.pages05.net", "www.sc.pages06.net", "www.sc.pages07.net", "www.sc.pages08.net", "www.sc.pages09.net", "www.sc.pagesA.net"], examples: ["https://www.sc.pages01.net/lp/static/js/iMAWebCookie.js"], totalExecutionTime: 51361, totalOccurrences: 417 },
          { name: "ICF Technology", category: "content", domains: ["*.camads.net"] },
          { name: "IFDNRG", category: "hosting", domains: ["*.ifdnrg.com"] },
          { name: "IMRG", category: "analytics", domains: ["*.peermap.com", "*.imrg.org"], examples: ["benchmarking.imrg.org"] },
          { name: "IPONWEB", category: "ad", domains: ["*.company-target.com", "*.liadm.com", "*.iponweb.net", "*.p161.net"], examples: ["pool.udsp.iponweb.net"], totalExecutionTime: 8924906, totalOccurrences: 39154 },
          { name: "IQ Mobile", category: "utility", domains: ["*.iqm.cc"] },
          { name: "IS Group", category: "hosting", domains: ["*.creative-serving.com"], totalExecutionTime: 2127, totalOccurrences: 29 },
          { name: "IT Dienstleistungen Tim Prinzkosky", category: "utility", domains: ["*.flaticons.net"] },
          { name: "IXI Digital", company: "Equifax", category: "ad", domains: ["*.ixiaa.com"] },
          { name: "IcoMoon", category: "cdn", domains: ["d19ayerf5ehaab.cloudfront.net", "d1azc1qln24ryf.cloudfront.net"], totalExecutionTime: 54286, totalOccurrences: 180 },
          { name: "IdenTrust", category: "utility", domains: ["*.identrust.com"], totalExecutionTime: 2334, totalOccurrences: 1 },
          { name: "Ido", category: "customer-success", domains: ["*.idio.co"], totalExecutionTime: 2222, totalOccurrences: 12 },
          { name: "Ignition One", category: "marketing", domains: ["*.searchignite.com"] },
          { name: "ImageShack", category: "content", domains: ["*.yfrog.com"] },
          { name: "Imagen Studio", category: "utility", domains: ["*.telephonesky.com"] },
          { name: "Imagini Holdings", category: "ad", domains: ["*.vdna-assets.com"] },
          {
            name: "Img Safe",
            category: "content",
            domains: ["*.imgsafe.org"]
          },
          { name: "Imgur", category: "utility", domains: ["*.imgur.com"], totalExecutionTime: 3538, totalOccurrences: 30 },
          { name: "Impact Radius", category: "ad", domains: ["*.impactradius-event.com", "*.impactradius-go.com", "*.7eer.net", "d3cxv97fi8q177.cloudfront.net", "*.evyy.net", "*.ojrq.net", "utt.impactcdn.com", "*.sjv.io"], examples: ["a.impactradius-go.com", "microsoft-uk.evyy.net"], totalExecutionTime: 612310, totalOccurrences: 4274 },
          { name: "Improve Digital", category: "ad", domains: ["*.360yield.com"], totalExecutionTime: 28784, totalOccurrences: 732 },
          { name: "Improvely", category: "analytics", domains: ["*.iljmp.com"], totalExecutionTime: 129, totalOccurrences: 3 },
          { name: "InMobi", category: "ad", domains: ["*.inmobi.com"], totalExecutionTime: 24607375, totalOccurrences: 126087 },
          { name: "InSkin Media", category: "ad", domains: ["*.inskinad.com", "*.inskinmedia.com"] },
          { name: "Inbenta", category: "customer-success", domains: ["*.inbenta.com"], totalExecutionTime: 3923, totalOccurrences: 7 },
          { name: "Incisive Media", category: "content", domains: ["*.incisivemedia.com"] },
          { name: "Indeed", category: "content", domains: ["*.indeed.com"], totalExecutionTime: 81347, totalOccurrences: 55 },
          { name: "Index Exchange", company: "WPP", category: "ad", domains: ["*.casalemedia.com", "*.indexww.com"], totalExecutionTime: 892351, totalOccurrences: 32324 },
          { name: "Indoona", category: "other", domains: ["*.indoona.com"] },
          { name: "Infectious Media", category: "ad", domains: ["*.impdesk.com", "*.impressiondesk.com", "*.inmz.net"] },
          { name: "Inference Mobile", category: "ad", domains: ["*.inferencemobile.com"] },
          { name: "Infinity Tracking", category: "analytics", domains: ["*.infinity-tracking.net"], totalExecutionTime: 24308, totalOccurrences: 250 },
          { name: "Infoline", category: "analytics", domains: ["*.ioam.de"], totalExecutionTime: 8983, totalOccurrences: 95 },
          { name: "Infolinks", category: "ad", domains: ["*.infolinks.com"], totalExecutionTime: 7995389, totalOccurrences: 5950 },
          { name: "Infopark", category: "hosting", domains: ["*.scrvt.com"] },
          { name: "Infusionsoft", category: "ad", domains: ["*.infusionsoft.com"], totalExecutionTime: 345182, totalOccurrences: 723 },
          { name: "Ink", category: "ad", domains: ["*.inktad.com"] },
          { name: "Inktel Contact Center Solutions", company: "Inktel", category: "customer-success", domains: ["*.inktel.com"] },
          { name: "Inneractive", category: "ad", domains: ["*.inner-active.mobi"] },
          { name: "Innovid", category: "ad", homepage: "https://www.innovid.com/", domains: ["*.innovid.com"], examples: ["ag.innovid.com", "rtr.innovid.com"], totalExecutionTime: 115267, totalOccurrences: 1363 },
          { name: "Insight Express", category: "analytics", domains: ["*.insightexpressai.com"], totalExecutionTime: 1, totalOccurrences: 2 },
          { name: "Insipio", category: "other", domains: ["*.insipio.com"] },
          { name: "Inspectlet", category: "analytics", domains: [
            "*.inspectlet.com"
          ], totalExecutionTime: 7622183, totalOccurrences: 5346 },
          { name: "Instansive", category: "utility", domains: ["*.instansive.com"] },
          { name: "Instart", homepage: "https://www.instart.com/", category: "utility", domains: ["*.insnw.net"] },
          { name: "Instembedder", category: "content", domains: ["*.instaembedder.com"] },
          { name: "Instinctive", category: "ad", domains: ["*.instinctiveads.com"] },
          { name: "Intelligent Reach", category: "ad", domains: ["*.ist-track.com"] },
          { name: "Intent HQ", category: "analytics", domains: ["*.intenthq.com"] },
          { name: "Intent IQ", category: "ad", domains: ["*.intentiq.com"], totalExecutionTime: 48447, totalOccurrences: 1146 },
          { name: "Intercept Interactive", category: "ad", domains: ["*.undertone.com"], totalExecutionTime: 2293921, totalOccurrences: 21012 },
          { name: "Interest Graph", company: "AOL", category: "ad", domains: ["*.gravity.com"] },
          { name: "Internet Brands", category: "content", domains: ["*.ibpxl.com"] },
          { name: "Interpublic Group", category: "ad", domains: ["*.mbww.com"] },
          { name: "Interstate", category: "analytics", domains: ["*.interstateanalytics.com"] },
          { name: "Interview", category: "analytics", domains: ["*.efm.me"] },
          { name: "Intilery", category: "customer-success", domains: ["*.intilery-analytics.com"] },
          { name: "Investis", category: "utility", domains: ["*.investis.com"], totalExecutionTime: 244162, totalOccurrences: 282 },
          { name: "Investis Flife", category: "hosting", domains: ["*.quartalflife.com"] },
          { name: "Invodo", category: "ad", domains: ["*.invodo.com"], examples: ["e.invodo.com"] },
          { name: "iSite", category: "analytics", domains: ["*.isitetv.com"], examples: ["static.isitetv.com", "events.isitetv.com"] },
          { name: "Issue", category: "content", domains: ["*.issue.by"] },
          { name: "J.D. Williams & Co", category: "content", domains: ["*.drct2u.com"] },
          { name: "Janrain", category: "analytics", domains: ["*.janrain.com", "*.janrainbackplane.com", "*.rpxnow.com", "d3hmp0045zy3cs.cloudfront.net"], totalExecutionTime: 4006, totalOccurrences: 21 },
          { name: "Jellyfish", category: "ad", domains: ["*.jellyfish.net"] },
          { name: "JetStream", category: "content", domains: ["*.xlcdn.com"] },
          { name: "JingDong", category: "content", domains: ["*.3.com", "*.jd.com"], totalExecutionTime: 119043, totalOccurrences: 84 },
          { name: "Jivox", category: "ad", domains: ["*.jivox.com"], totalExecutionTime: 31166, totalOccurrences: 65 },
          { name: "Jobvite", category: "content", domains: ["*.jobvite.com"], totalExecutionTime: 6667, totalOccurrences: 4 },
          { name: "Johnston Press", category: "content", domains: ["*.johnstonpress.co.uk", "*.jpress.co.uk"] },
          { name: "Join the Dots (Research)", category: "social", domains: ["*.jtdiscuss.com"] },
          { name: "JotForm", category: "utility", domains: ["*.jotformpro.com"] },
          { name: "JuicyAds", category: "ad", domains: ["*.juicyads.com"], totalExecutionTime: 543292, totalOccurrences: 2092 },
          { name: "JustPremium", category: "ad", domains: ["*.net.net"], examples: ["d2nvliyzbo36lk.cloudfrontd2nvliyzbo36lk.cloudfront.net.net"] },
          { name: "JustPremium Ads", company: "JustPremium", category: "ad", domains: ["*.justpremium.com"], totalExecutionTime: 1061, totalOccurrences: 35 },
          { name: "JustUno", category: "ad", domains: ["*.justuno.com", "d2j3qa5nc37287.cloudfront.net"], totalExecutionTime: 773949, totalOccurrences: 1448 },
          { name: "KINX (Korea Internet Neutral eXchange)", category: "other", domains: ["*.kinxcdn.com"], totalExecutionTime: 1433, totalOccurrences: 4 },
          { name: "KISSmetrics", category: "analytics", domains: ["*.kissmetrics.com", "doug1izaerwt3.cloudfront.net", "dsyszv14g9ymi.cloudfront.net"], totalExecutionTime: 3896, totalOccurrences: 46 },
          { name: "Kaizen Platform", category: "analytics", domains: ["*.kaizenplatform.net"], examples: ["cdn.kaizenplatform.net", "log-v4.kaizenplatform.net"], totalExecutionTime: 85284, totalOccurrences: 183 },
          { name: "Kakao", category: "social", domains: ["*.daum.net", "*.daumcdn.net"], totalExecutionTime: 38351047, totalOccurrences: 62730 },
          { name: "Kaltura Video Platform", company: "Kaltura", category: "content", domains: ["*.kaltura.com"], examples: ["cdnsecakmi.kaltura.com"], totalExecutionTime: 2164237, totalOccurrences: 1017 },
          { name: "Kameleoon", homepage: "https://www.kameleoon.com/", category: "analytics", domains: ["*.kameleoon.com", "*.kameleoon.eu", "*.kameleoon.io"], examples: ["data.kameleoon.io", "kdm3fpv6il.kameleoon.eu"], totalExecutionTime: 2217218, totalOccurrences: 2337 },
          { name: "Kampyle", category: "analytics", domains: ["*.kampyle.com"], totalExecutionTime: 413304, totalOccurrences: 702 },
          { name: "Kantar", category: "analytics", domains: ["*.sesamestats.com"] },
          { name: "Kargo", category: "marketing", domains: ["*.kargo.com"], totalExecutionTime: 48285, totalOccurrences: 1135 },
          {
            name: "KARTE",
            company: "Plaid",
            homepage: "https://karte.io/",
            category: "marketing",
            domains: ["*.karte.io"],
            examples: ["static.karte.io", "t.karte.io"],
            totalExecutionTime: 1712123,
            totalOccurrences: 1729
          },
          { name: "Kauli", category: "ad", domains: ["*.kau.li"] },
          { name: "Keen", company: "Keen", homepage: "https://keen.io/", category: "analytics", domains: ["*.keen.io", "d26b395fwzu5fz.cloudfront.net"], totalExecutionTime: 24210, totalOccurrences: 416 },
          { name: "Kelkoo", category: "hosting", domains: ["*.kelkoo.com"] },
          { name: "Kenshoo", category: "marketing", domains: ["*.xg4ken.com"], totalExecutionTime: 710, totalOccurrences: 18 },
          { name: "Key CDN", category: "utility", domains: ["*.kxcdn.com"], totalExecutionTime: 4814875, totalOccurrences: 10025 },
          { name: "Keynote", company: "Dynatrace", category: "analytics", domains: ["*.keynote.com"] },
          { name: "Keywee", category: "ad", domains: ["*.keywee.co"], totalExecutionTime: 44984, totalOccurrences: 259 },
          { name: "Kiosked", category: "ad", domains: ["*.kiosked.com"], totalExecutionTime: 343355, totalOccurrences: 173 },
          {
            name: "Klarna",
            category: "utility",
            domains: ["*.klarna.com"],
            totalExecutionTime: 1374032,
            totalOccurrences: 10759
          },
          { name: "Klaviyo", category: "ad", domains: ["*.klaviyo.com"], totalExecutionTime: 113130218, totalOccurrences: 161289 },
          { name: "Klevu Search", company: "Klevu", category: "utility", domains: ["*.klevu.com"], totalExecutionTime: 1124647, totalOccurrences: 1463 },
          { name: "Klick2Contact", category: "customer-success", domains: ["*.klick2contact.com"] },
          { name: "Knight Lab", company: "Northwestern University", category: "utility", domains: ["*.knightlab.com"], totalExecutionTime: 350550, totalOccurrences: 448 },
          { name: "Kodajo", category: "other", domains: ["*.kodajo.com"] },
          { name: "Komoona", category: "ad", domains: ["*.komoona.com"] },
          { name: "Korrelate", company: "JD Power", category: "analytics", domains: ["*.korrelate.net"] },
          { name: "LKQD", category: "ad", domains: ["*.lkqd.net"] },
          { name: "Layer0", category: "cdn", domains: ["*.layer0.co"], examples: ["rum.layer0.co"] },
          { name: "Layershift", category: "hosting", domains: ["109.109.138.174"] },
          { name: "Lead Forensics", category: "ad", domains: ["*.200summit.com", "*.baw5tracker.com", "*.business-path-55.com", "*.bux1le001.com", "*.central-core-7.com", "*.direct-azr-78.com", "*.explore-123.com", "*.forensics1000.com", "*.gldsta-02-or.com", "*.green-bloc9.com", "*.lansrv040.com", "*.lead-123.com", "*.leadforensics.com", "*.mavic852.com", "*.mon-com-net.com", "*.peak-ip-54.com", "*.snta0034.com", "*.svr-prc-01.com", "*.syntace-094.com", "*.tghbn12.com", "*.trail-web.com", "*.web-01-gbl.com", "*.web-cntr-07.com", "*.trackdiscovery.net"], examples: ["www.baw5tracker.com", "www.lansrv040.com", "www.mon-com-net.com", "www.peak-ip-54.com", "www.tghbn12.com", "www.web-01-gbl.com"], totalExecutionTime: 45938, totalOccurrences: 307 },
          { name: "Lead Intelligence", company: "Magnetise Solutions", category: "ad", domains: ["*.leadintelligence.co.uk"] },
          { name: "LeadLander", category: "analytics", domains: ["*.formalyzer.com", "*.trackalyzer.com"] },
          { name: "Leaflet", category: "utility", domains: ["*.leafletjs.com"], totalExecutionTime: 3668, totalOccurrences: 69 },
          { name: "LeasdBoxer", company: "LeadBoxer", category: "ad", domains: ["*.leadboxer.com"], totalExecutionTime: 15328, totalOccurrences: 118 },
          { name: "LeaseWeb", homepage: "https://www.leaseweb.com/", category: "cdn", domains: ["*.lswcdn.net", "*.leasewebcdn.com"] },
          { name: "Leboncoin", category: "content", domains: ["*.leboncoin.fr"] },
          { name: "Lengow", category: "hosting", domains: ["*.lengow.com"] },
          { name: "Lessbuttons", category: "social", domains: ["*.lessbuttons.com"] },
          { name: "Letter Press", category: "ad", domains: ["*.getletterpress.com"] },
          { name: "Level 3 Communications", category: "utility", domains: ["footprint.net"] },
          { name: "Level3", category: "other", domains: ["secure.footprint.net"] },
          { name: "Lifestreet Media", category: "social", domains: ["*.lfstmedia.com"] },
          { name: "LiftSuggest", category: "analytics", domains: ["d2blwevgjs7yom.cloudfront.net"] },
          { name: "Ligatus", category: "ad", domains: ["*.ligadx.com"] },
          { name: "LightStep", category: "analytics", domains: ["*.lightstep.com"] },
          { name: "LightWidget", category: "utility", domains: ["*.lightwidget.com"], totalExecutionTime: 1825559, totalOccurrences: 9383 },
          { name: "Likelihood", company: "LIkeihood", category: "hosting", domains: ["*.likelihood.com"], examples: ["client.likelihood.com"] },
          { name: "LikeShop", company: "Dash Hudson", category: "content", domains: ["likeshop.me"], examples: ["likeshop.me"] },
          { name: "LINE Corporation", category: "ad", domains: ["*.line-scdn.net", "*.line.me"], examples: ["d.line-scdn.net", "tr.line.me"], totalExecutionTime: 3858282, totalOccurrences: 26881 },
          { name: "Linkcious", category: "analytics", domains: ["*.linkcious.com"] },
          { name: "Linking Mobile", category: "ad", domains: ["*.linkingmobile.com"] },
          {
            name: "LittleData",
            category: "analytics",
            homepage: "https://www.littledata.io/",
            domains: ["*.littledata.io"],
            examples: ["transactions.littledata.io"],
            totalExecutionTime: 832,
            totalOccurrences: 1
          },
          { name: "LiveBurst", category: "ad", domains: ["*.liveburst.com"] },
          { name: "LiveClicker", category: "ad", domains: ["*.liveclicker.net"] },
          { name: "LiveHelpNow", category: "customer-success", domains: ["*.livehelpnow.net"], totalExecutionTime: 284671, totalOccurrences: 819 },
          { name: "LiveInternet", category: "analytics", domains: ["*.yadro.ru"] },
          { name: "LiveJournal", category: "social", domains: ["*.livejournal.com", "*.livejournal.net"], totalExecutionTime: 63532309, totalOccurrences: 9109 },
          { name: "LivePerson", category: "customer-success", homepage: "https://www.liveperson.com/", domains: ["*.liveperson.com", "*.look.io", "*.liveperson.net", "*.lpsnmedia.net"], totalExecutionTime: 1930619, totalOccurrences: 2544 },
          { name: "LiveRail", company: "Facebook", category: "ad", domains: ["*.liverail.com", "*.lrcdn.net"], examples: ["scontent.lrcdn.net"] },
          {
            name: "LiveTex",
            category: "customer-success",
            domains: ["*.livetex.ru"],
            totalExecutionTime: 476954,
            totalOccurrences: 1911
          },
          { name: "Livefyre", category: "content", domains: ["*.fyre.co", "*.livefyre.com"] },
          { name: "Living Map Company", category: "utility", domains: ["*.livingmap.com"] },
          { name: "Local World", category: "content", domains: ["*.thelocalpeople.co.uk"] },
          { name: "LockerDome", category: "analytics", domains: ["*.lockerdome.com"], totalExecutionTime: 244, totalOccurrences: 3 },
          { name: "Logentries", company: "Rapid", category: "utility", domains: ["*.logentries.com"], examples: ["js.logentries.com"] },
          { name: "Logicalis", category: "analytics", domains: ["*.trovus.co.uk"] },
          { name: "LoginRadius", company: "LoginRadius", homepage: "https://www.loginradius.com/", category: "ad", domains: ["*.loginradius.com", "*.lrcontent.com"], examples: ["config.lrcontent.com"], totalExecutionTime: 15746, totalOccurrences: 131 },
          { name: "LongTail Ad Solutions", category: "ad", domains: ["*.jwpcdn.com", "*.jwplatform.com", "*.jwplayer.com", "*.jwpltx.com", "*.jwpsrv.com", "*.longtailvideo.com"], totalExecutionTime: 4531393, totalOccurrences: 5572 },
          { name: "Loop Commerce", category: "other", domains: ["*.loopassets.net"] },
          { name: "Loop11", category: "analytics", domains: ["*.loop11.com"], totalExecutionTime: 22278, totalOccurrences: 28 },
          { name: "LoopMe", category: "ad", domains: ["*.loopme.biz", "*.loopme.com", "*.vntsm.com", "*.loopme.me"], totalExecutionTime: 2112781, totalOccurrences: 11752 },
          { name: "Looper", category: "content", domains: ["*.looper.com"] },
          { name: "Loyalty Point", category: "ad", domains: ["*.loyaltypoint.pl"] },
          { name: "LoyaltyLion", category: "ad", domains: ["*.loyaltylion.com", "*.loyaltylion.net", "dg1f2pfrgjxdq.cloudfront.net"], totalExecutionTime: 2971522, totalOccurrences: 4114 },
          { name: "Luma Tag", category: "analytics", domains: ["*.lumatag.co.uk"] },
          { name: "Lumesse", category: "content", domains: ["*.recruitmentplatform.com"] },
          { name: "Luminate", category: "ad", domains: ["*.luminate.com"] },
          { name: "Lynchpin Analytics", category: "analytics", domains: ["*.lypn.net"] },
          { name: "Lyris", category: "ad", domains: ["*.clicktracks.com"] },
          { name: "Lytics", category: "ad", domains: ["*.lytics.io"], totalExecutionTime: 272463, totalOccurrences: 857 },
          { name: "MEC WebTrack", company: "MEC", category: "ad", domains: ["*.e-webtrack.net"] },
          { name: "MECLABS Institute", category: "analytics", domains: ["*.meclabs.com", "*.meclabsdata.com"] },
          { name: "MLveda", category: "utility", domains: ["*.mlveda.com"], examples: ["www.mlveda.com"], totalExecutionTime: 109345, totalOccurrences: 229 },
          { name: "Macromill", company: "Macromill", category: "analytics", homepage: "https://group.macromill.com/", domains: ["*.macromill.com"], examples: ["img.macromill.com/js/us000131vfg/4000000570-56/lognos.js"], totalExecutionTime: 5731, totalOccurrences: 9 },
          { name: "Macropod BugHerd", company: "Macropod", category: "utility", domains: ["*.bugherd.com"], examples: ["www.bugherd.com"], totalExecutionTime: 512091, totalOccurrences: 3523 },
          { name: "Madison Logic", category: "marketing", domains: ["*.ml314.com"], totalExecutionTime: 101, totalOccurrences: 3 },
          { name: "Madmetrics", company: "Keyade", category: "analytics", domains: ["*.keyade.com"] },
          { name: "Magnetic", category: "ad", domains: ["*.domdex.com", "d3ezl4ajpp2zy8.cloudfront.net"] },
          { name: "Magnetic Platform", company: "Magnetic", category: "ad", domains: ["*.magnetic.is"] },
          { name: "MailMunch", category: "ad", domains: ["*.mailmunch.co"], totalExecutionTime: 1414543, totalOccurrences: 19969 },
          { name: "MailPlus", category: "ad", domains: ["*.mailplus.nl"], totalExecutionTime: 83524, totalOccurrences: 304 },
          { name: "Mapbox", category: "utility", domains: ["*.mapbox.com"], totalExecutionTime: 13815633, totalOccurrences: 19555 },
          { name: "Maptive", category: "utility", domains: ["*.maptive.com"] },
          { name: "Marcaria.com", category: "other", domains: ["*.gooo.al"] },
          {
            name: "Marchex",
            category: "analytics",
            domains: ["*.voicestar.com", "*.marchex.io"],
            totalExecutionTime: 1378181,
            totalOccurrences: 7390
          },
          { name: "Mark and Mini", category: "ad", domains: ["*.markandmini.com"], examples: ["www.markandmini.com"] },
          { name: "Marker", category: "utility", domains: ["*.marker.io"], examples: ["edge.marker.io"], totalExecutionTime: 2331726, totalOccurrences: 1722 },
          { name: "Marketing Dashboards", company: "GroupM", category: "analytics", domains: ["*.m-decision.com"] },
          { name: "Marketizator", category: "analytics", domains: ["*.marketizator.com"] },
          { name: "Marketplace Web Service", company: "Amazon", category: "other", domains: ["*.ssl-images-amazon.com"], totalExecutionTime: 234709, totalOccurrences: 451 },
          { name: "Mashable", category: "social", domains: ["*.mshcdn.com"] },
          { name: "MatchWork", category: "utility", domains: ["*.matchwork.com"] },
          { name: "MathJax", category: "utility", domains: ["*.mathjax.org"], totalExecutionTime: 84751, totalOccurrences: 743 },
          { name: "Mather Economics", category: "analytics", domains: ["*.matheranalytics.com"], totalExecutionTime: 262501, totalOccurrences: 507 },
          { name: "MaxCDN Enterprise", company: "MaxCDN", category: "utility", domains: ["*.netdna-cdn.com", "*.netdna-ssl.com"] },
          { name: "MaxMind", category: "utility", domains: ["*.maxmind.com"], totalExecutionTime: 855332, totalOccurrences: 831 },
          { name: "MaxPoint Interactive", category: "ad", domains: ["*.mxptint.net"], totalExecutionTime: 20140, totalOccurrences: 23834 },
          { name: "Maxsi", category: "analytics", domains: ["*.evisitanalyst.com"] },
          { name: "Maxymiser", category: "analytics", domains: ["*.maxymiser.net, maxymiser.hs.llnwd.net"] },
          { name: "McAffee", category: "utility", domains: ["*.mcafeesecure.com", "*.scanalert.com"] },
          { name: "Measured", category: "analytics", domains: ["*.measured.com"], examples: ["tag.measured.com"], homepage: "https://www.measured.com/" },
          { name: "Media IQ", category: "analytics", domains: ["*.mediaiqdigital.com"] },
          { name: "Media Management Technologies", category: "ad", domains: [
            "*.speedshiftmedia.com"
          ], totalExecutionTime: 27147, totalOccurrences: 161 },
          { name: "Media Temple", category: "hosting", domains: ["*.goodlayers2.com"] },
          { name: "Mediabong", category: "ad", domains: ["*.mediabong.net"] },
          { name: "Mediahawk", category: "analytics", domains: ["*.mediahawk.co.uk"], totalExecutionTime: 51393, totalOccurrences: 239 },
          { name: "Mediahub", category: "ad", domains: ["*.hubverifyandoptimize.com", "*.projectwatchtower.com"] },
          { name: "Mediasyndicator", category: "ad", domains: ["*.creativesyndicator.com"] },
          { name: "Medium", category: "content", domains: ["*.medium.com"], totalExecutionTime: 216923262, totalOccurrences: 17027 },
          { name: "Meetrics", category: "ad", domains: ["*.de.com", "*.meetrics.net", "*.mxcdn.net"], examples: ["research.de.com"], totalExecutionTime: 102809, totalOccurrences: 63 },
          { name: "Mega", company: "Mega Information Technology", category: "other", domains: ["*.mgcdn.com"] },
          { name: "Melt", category: "ad", domains: ["*.meltdsp.com", "*.mesp.com"] },
          { name: "Meltwater Group", category: "customer-success", domains: ["*.meltwaternews.com"] },
          { name: "Meme", category: "ad", domains: ["*.viewwonder.com"] },
          { name: "MentAd", category: "ad", domains: ["*.mentad.com"] },
          { name: "Mention Me", category: "ad", domains: ["*.mention-me.com"], examples: ["tag.mention-me.com"], totalExecutionTime: 15233, totalOccurrences: 44 },
          { name: "Merchant Equipment Store", category: "utility", domains: ["*.merchantequip.com"], totalExecutionTime: 268, totalOccurrences: 1 },
          { name: "Merchenta", category: "customer-success", domains: ["*.merchenta.com"] },
          { name: "Merkle Digital Data Exchange", company: "Merkle", category: "ad", domains: ["*.brilig.com"] },
          { name: "Merkle Paid Search", company: "Merkle", category: "ad", domains: ["*.rkdms.com"], totalExecutionTime: 69291, totalOccurrences: 407 },
          { name: "Met Office", category: "content", domains: ["*.metoffice.gov.uk"], totalExecutionTime: 15029, totalOccurrences: 19 },
          { name: "Meta Broadcast", category: "social", domains: ["*.metabroadcast.com"], examples: ["voila.metabroadcast.com"] },
          { name: "Michael Associates", category: "ad", domains: ["*.checktestsite.com"], examples: ["www.checktestsite.com"] },
          { name: "Michelin", category: "content", domains: ["*.viamichelin.com"], totalExecutionTime: 8087, totalOccurrences: 7 },
          { name: "Microad", category: "ad", domains: ["*.microad.jp"], totalExecutionTime: 14626755, totalOccurrences: 23909 },
          { name: "Microsoft Certificate Services", company: "Microsoft", category: "utility", domains: ["*.msocsp.com"] },
          { name: "Microsoft Hosted Libs", company: "Microsoft", category: "cdn", domains: ["*.aspnetcdn.com"], examples: ["ajax.aspnetcdn.com"], totalExecutionTime: 4562478, totalOccurrences: 20042 },
          { name: "Microsoft XBox Live", company: "Microsoft", category: "marketing", domains: ["*.xboxlive.com"] },
          { name: "Mightypop", category: "ad", domains: ["*.mightypop.ca"] },
          { name: "Mika Tuupola", category: "utility", domains: [
            "*.appelsiini.net"
          ] },
          { name: "Millennial Media", category: "ad", domains: ["*.jumptap.com"] },
          { name: "Mirror Image Internet", category: "utility", domains: ["*.miisolutions.net"] },
          { name: "Mobify", category: "utility", domains: ["*.mobify.com", "*.mobify.net"] },
          { name: "Mobile Nations", category: "social", domains: ["*.mobilenations.com"] },
          { name: "Mobivate", category: "ad", domains: ["*.mobivatebulksms.com"] },
          { name: "Momondo", category: "content", domains: ["*.momondo.dk"] },
          { name: "Momondo Group", category: "content", domains: ["*.momondogrouo.com", "*.momondogroup.com"] },
          { name: "Monarch Ads", category: "ad", domains: ["*.monarchads.com"] },
          { name: "Monetate", category: "analytics", domains: ["*.monetate.net"], totalExecutionTime: 260345, totalOccurrences: 599 },
          { name: "MonetizeMore", category: "ad", domains: ["*.m2.ai"], totalExecutionTime: 8896, totalOccurrences: 47 },
          { name: "Monitor", company: "Econda", category: "analytics", domains: ["*.econda-monitor.de"], examples: ["www.econda-monitor.de"] },
          { name: "Monkey Frog Media", category: "content", domains: ["*.monkeyfrogmedia.com"] },
          { name: "Monotype", category: "cdn", domains: ["*.fonts.com", "*.fonts.net"], totalExecutionTime: 729465, totalOccurrences: 3185 },
          { name: "Moore-Wilson", category: "ad", domains: ["*.mwdev.co.uk"] },
          { name: "Moovweb", category: "utility", domains: ["*.moovweb.net"] },
          { name: "Mopinion", category: "analytics", domains: ["*.mopinion.com"], totalExecutionTime: 171681, totalOccurrences: 177 },
          { name: "MotionPoint", category: "other", domains: ["*.convertlanguage.com"], totalExecutionTime: 1843, totalOccurrences: 35 },
          { name: "Mouse3K", category: "analytics", domains: ["*.mouse3k.com"] },
          { name: "MouseStats", category: "analytics", domains: ["*.mousestats.com"] },
          { name: "Mouseflow", homepage: "https://mouseflow.com/", category: "analytics", domains: ["*.mouseflow.com"], totalExecutionTime: 331345, totalOccurrences: 6786 },
          { name: "Movable Ink", category: "analytics", domains: ["*.micpn.com"], totalExecutionTime: 439979, totalOccurrences: 4949 },
          { name: "MovingIMAGE24", category: "content", domains: ["*.edge-cdn.net"] },
          { name: "Moxielinks", category: "ad", domains: ["*.moxielinks.com"] },
          { name: "Moz Recommended Companies", company: "Moz", category: "analytics", domains: ["d2eeipcrcdle6.cloudfront.net"] },
          { name: "Mozilla", category: "utility", domains: ["*.mozilla.org"], examples: ["aus5.mozilla.org"], totalExecutionTime: 21085, totalOccurrences: 32 },
          { name: "Multiview", category: "content", domains: ["*.multiview.com", "*.track-mv.com"], totalExecutionTime: 8831, totalOccurrences: 58 },
          { name: "Mux", category: "analytics", domains: ["*.litix.io"], totalExecutionTime: 91580, totalOccurrences: 249 },
          { name: "MyAds", company: "MyBuys", category: "analytics", domains: ["*.veruta.com"] },
          { name: "MyBuys", category: "analytics", domains: ["*.mybuys.com"] },
          {
            name: "MyFonts",
            category: "cdn",
            domains: ["*.myfonts.net"],
            totalExecutionTime: 78,
            totalOccurrences: 4
          },
          { name: "MyRegistry", category: "other", domains: ["*.myregistry.com"], totalExecutionTime: 164086, totalOccurrences: 621 },
          { name: "MySpace", company: "Specific Media", category: "social", domains: ["*.myspace.com"] },
          { name: "Mynewsdesk", category: "utility", domains: ["*.mynewsdesk.com"], totalExecutionTime: 564, totalOccurrences: 31 },
          { name: "NAVIS", category: "content", domains: ["*.navistechnologies.info"] },
          { name: "NCC Group Real User Monitoring", company: "NCC Group", category: "analytics", domains: ["*.nccgroup-webperf.com"], examples: ["beacon-rumlive.rum.nccgroup-webperf.com", "config-rumlive.rum.nccgroup-webperf.com", "script-rumlive.rum.nccgroup-webperf.com"] },
          { name: "NEORY Marketing Cloud", company: "NEORY", category: "marketing", domains: ["*.ad-srv.net"], totalExecutionTime: 10976, totalOccurrences: 240 },
          { name: "Nanigans", category: "ad", domains: ["*.nanigans.com"] },
          { name: "Nano Interactive", category: "ad", domains: ["*.audiencemanager.de"], totalExecutionTime: 780, totalOccurrences: 10 },
          { name: "Nanorep", company: "Nanorep Technologies", category: "customer-success", domains: ["*.nanorep.com"] },
          { name: "Narrative", category: "ad", domains: ["*.narrative.io"], totalExecutionTime: 1228, totalOccurrences: 2 },
          { name: "Native Ads", category: "ad", domains: ["*.nativeads.com"] },
          { name: "Nativo", category: "ad", domains: ["*.postrelease.com"], totalExecutionTime: 28260, totalOccurrences: 35852 },
          { name: "Navegg", category: "ad", domains: ["*.navdmp.com"], totalExecutionTime: 51915, totalOccurrences: 805 },
          { name: "NaviStone", category: "ad", domains: ["*.murdoog.com"] },
          { name: "Naytev", category: "analytics", domains: ["*.naytev.com"] },
          { name: "Needle", category: "analytics", domains: ["*.needle.com"] },
          { name: "Neiman Marcus", category: "content", domains: ["*.ctscdn.com"] },
          { name: "Nend", category: "ad", domains: ["*.nend.net"] },
          {
            name: "Neodata",
            category: "ad",
            domains: ["*.neodatagroup.com"],
            totalExecutionTime: 12827,
            totalOccurrences: 86
          },
          { name: "Net Applications", category: "analytics", domains: ["*.hitsprocessor.com"] },
          { name: "Net Reviews", category: "analytics", domains: ["*.avis-verifies.com"], examples: ["www.avis-verifies.com"], totalExecutionTime: 1143140, totalOccurrences: 2442 },
          { name: "NetAffiliation", company: "Kwanco", category: "ad", domains: ["*.metaffiliation.com"], totalExecutionTime: 18519, totalOccurrences: 127 },
          { name: "NetDirector", company: "G-Forces Web Management", category: "other", domains: ["*.netdirector.co.uk"], totalExecutionTime: 3931, totalOccurrences: 1 },
          { name: "NetFlix", category: "content", domains: ["*.nflxext.com", "*.nflximg.net"], totalExecutionTime: 4364, totalOccurrences: 5 },
          { name: "Nielsen NetRatings SiteCensus", company: "The Nielsen Company", homepage: "http://www.nielsen-online.com/intlpage.html", category: "analytics", domains: ["*.imrworldwide.com"], totalExecutionTime: 6840006, totalOccurrences: 19525 },
          {
            name: "NetSeer",
            category: "ad",
            domains: ["*.netseer.com", "*.ns-cdn.com"]
          },
          { name: "NetShelter", company: "Ziff Davis Tech", category: "ad", domains: ["*.netshelter.net"] },
          { name: "Netmining", company: "Ignition One", category: "ad", domains: ["*.netmng.com"], totalExecutionTime: 7746, totalOccurrences: 92 },
          { name: "Netop", category: "customer-success", domains: ["*.netop.com"] },
          { name: "Network Solutions", category: "utility", domains: ["*.netsolssl.com", "*.networksolutions.com"], examples: ["ocsp.netsolssl.com"], totalExecutionTime: 2415, totalOccurrences: 2 },
          { name: "Neustar AdAdvisor", company: "Neustar", category: "ad", domains: ["*.adadvisor.net"] },
          { name: "New Approach Media", category: "ad", domains: ["*.newapproachmedia.co.uk"] },
          { name: "NewShareCounts", category: "social", domains: ["*.newsharecounts.com"] },
          { name: "News", category: "social", domains: [
            "*.news.com.au",
            "*.newsanalytics.com.au",
            "*.newsapi.com.au",
            "*.newscdn.com.au",
            "*.newsdata.com.au",
            "*.newsdiscover.com.au",
            "*.news-static.com"
          ], totalExecutionTime: 69261, totalOccurrences: 46 },
          { name: "Newsquest", category: "content", domains: ["*.newsquestdigital.co.uk"] },
          { name: "Newzulu", category: "content", domains: ["*.filemobile.com", "*.projects.fm"] },
          { name: "Nexcess.Net", category: "hosting", domains: ["*.nexcesscdn.net"] },
          { name: "Nexstar Media Group", category: "ad", domains: ["*.yashi.com"] },
          { name: "NextPerf", company: "Rakuten Marketing", category: "ad", domains: ["*.nxtck.com"] },
          { name: "Nine.com.au", company: "Nine Digital", category: "content", domains: ["*.9msn.com.au"] },
          { name: "NitroSell", category: "hosting", domains: ["*.nitrosell.com"] },
          { name: "Nochex", category: "utility", domains: ["*.nochex.com"] },
          { name: "Northern &amp; Shell Media Group", category: "content", domains: ["*.northernandshell.co.uk"] },
          { name: "Nosto", category: "analytics", domains: ["*.nosto.com"], totalExecutionTime: 703736, totalOccurrences: 1189 },
          { name: "Now Interact", category: "analytics", domains: ["*.nowinteract.com"] },
          { name: "Numberly", company: "1000mercis", category: "ad", domains: ["*.mmtro.com", "*.nzaza.com"], totalExecutionTime: 1827, totalOccurrences: 19 },
          { name: "NyaConcepts", category: "analytics", domains: ["*.xclusive.ly"] },
          { name: "O2", category: "other", domains: ["*.o2.co.uk"], examples: ["servedby.o2.co.uk"] },
          { name: "GoDaddy", homepage: "https://www.godaddy.com/", category: "utility", domains: ["*.godaddy.com", "*.wsimg.com"], examples: ["ocsp.godaddy.com", "seal.godaddy.com"], totalExecutionTime: 94698135, totalOccurrences: 110342 },
          { name: "ObjectPlanet", category: "analytics", domains: ["*.easypolls.net"], totalExecutionTime: 28470, totalOccurrences: 70 },
          { name: "OhMyAd", category: "ad", domains: ["*.ohmyad.co"], examples: ["pr.ohmyad.co"] },
          { name: "Okas Concepts", category: "utility", domains: ["*.okasconcepts.com"], totalExecutionTime: 1483515, totalOccurrences: 661 },
          { name: "Okta", category: "analytics", domains: ["*.okta.com"], totalExecutionTime: 1464920, totalOccurrences: 3542 },
          { name: "Olapic", category: "content", domains: ["*.photorank.me"], totalExecutionTime: 115, totalOccurrences: 2 },
          { name: "Ometria", category: "analytics", domains: ["*.ometria.com"], totalExecutionTime: 16630, totalOccurrences: 204 },
          { name: "Omniconvert", category: "analytics", domains: ["*.omniconvert.com", "d2tgfbvjf3q6hn.cloudfront.net", "d3vbj265bmdenw.cloudfront.net"], totalExecutionTime: 85855, totalOccurrences: 381 },
          { name: "Omniroot", company: "Verizon", category: "utility", domains: ["*.omniroot.com"], examples: ["ocsp.omniroot.com", "vassg142.ocsp.omniroot.com"] },
          { name: "OnAudience", company: "Cloud Technologies", category: "ad", domains: ["*.onaudience.com"] },
          { name: "OnScroll", category: "ad", domains: ["*.onscroll.com"] },
          { name: "OnState", category: "ad", domains: ["*.onstate.co.uk"] },
          { name: "OnYourMap", category: "utility", domains: ["*.onyourmap.com"] },
          { name: "One by AOL", company: "AOL", category: "ad", domains: ["*.adtechjp.com", "*.adtech.de"], totalExecutionTime: 1140, totalOccurrences: 17 },
          { name: "One by AOL:Mobile", company: "AOL", category: "ad", domains: ["*.nexage.com"], examples: ["ads.nexage.com", "hb.nexage.com"] },
          { name: "OneAll", category: "analytics", domains: ["*.oneall.com"], totalExecutionTime: 104501, totalOccurrences: 623 },
          { name: "OneSoon", category: "analytics", domains: ["*.adalyser.com"], totalExecutionTime: 33037, totalOccurrences: 437 },
          { name: "OneTag", category: "ad", domains: ["*.onetag-sys.com"] },
          { name: "Onet", category: "ad", domains: ["*.onet.pl"], totalExecutionTime: 531334, totalOccurrences: 760 },
          { name: "Online Rewards", company: "Mastercard", category: "ad", domains: ["*.loyaltygateway.com"] },
          { name: "Online republic", category: "content", domains: ["*.imallcdn.net"], totalExecutionTime: 67122, totalOccurrences: 58 },
          { name: "Ooyala", category: "ad", domains: ["*.ooyala.com"] },
          { name: "OpenTable", company: "Priceline Group", category: "content", domains: ["*.opentable.com", "*.opentable.co.uk", "*.toptable.co.uk"], examples: ["www.toptable.co.uk"], totalExecutionTime: 412090, totalOccurrences: 4314 },
          { name: "OpenX Ad Exchange", company: "OpenX Technologies", category: "ad", domains: ["*.liftdna.com"] },
          { name: "Opinion Stage", category: "analytics", domains: ["*.opinionstage.com"], examples: ["www.opinionstage.com"], totalExecutionTime: 113206, totalOccurrences: 145 },
          { name: "OpinionBar", category: "analytics", domains: ["*.opinionbar.com"] },
          { name: "Opta", company: "Perform Group", category: "content", domains: ["*.opta.net"], totalExecutionTime: 302785, totalOccurrences: 272 },
          { name: "OptiMonk", category: "ad", domains: ["*.optimonk.com"], totalExecutionTime: 10318415, totalOccurrences: 10615 },
          { name: "Optilead", category: "analytics", domains: ["*.dyn-img.com", "*.leadcall.co.uk", "*.optilead.co.uk"] },
          { name: "Optimatic", category: "ad", domains: ["*.optimatic.com"], examples: ["synch.optimatic.com"] },
          { name: "Optimise Media Group", category: "utility", domains: ["*.omguk.com"], totalExecutionTime: 6691, totalOccurrences: 41 },
          { name: "Optimost", company: "OpenText", category: "ad", domains: ["*.optimost.com"] },
          { name: "Optimove", company: "Mobius Solutions", category: "analytics", domains: ["*.optimove.net"], totalExecutionTime: 22679, totalOccurrences: 293 },
          { name: "Optorb", category: "ad", domains: ["*.optorb.com"] },
          { name: "Oracle", category: "marketing", domains: ["*.custhelp.com", "*.eloqua.com", "*.en25.com", "*.estara.com", "*.instantservice.com"], totalExecutionTime: 684920, totalOccurrences: 569 },
          { name: "Oracle Recommendations On Demand", company: "Oracle", category: "analytics", domains: ["*.atgsvcs.com"], totalExecutionTime: 8696, totalOccurrences: 96 },
          { name: "Oracle Responsys", company: "Oracle", category: "marketing", domains: ["*.adrsp.net", "*.responsys.net"] },
          { name: "Order Security-VOID", company: "Order Security", category: "analytics", domains: ["*.order-security.com"] },
          { name: "Oriel", category: "ad", domains: ["*.oriel.io"] },
          { name: "Outbrain", homepage: "https://www.outbrain.com/", category: "ad", domains: ["*.outbrain.com", "*.outbrainimg.com", "*.visualrevenue.com"], totalExecutionTime: 3373858, totalOccurrences: 13287 },
          { name: "OverStream", company: "Coull", category: "ad", domains: ["*.coull.com"], examples: ["ex1.coull.com"] },
          { name: "Overdrive", category: "content", domains: ["*.contentreserve.com"] },
          { name: "Overstock", category: "utility", domains: ["*.ostkcdn.com"] },
          { name: "OwnerIQ", category: "ad", domains: ["*.owneriq.net"], totalExecutionTime: 305561, totalOccurrences: 2173 },
          { name: "OzCart", category: "utility", domains: ["*.ozcart.com.au"] },
          { name: "Ozone Media", category: "ad", domains: ["*.adadyn.com"] },
          {
            name: "Loqate",
            company: "Loqate",
            category: "other",
            domains: ["*.pcapredict.com", "*.postcodeanywhere.co.uk"],
            totalExecutionTime: 136866,
            totalOccurrences: 777
          },
          { name: "PEER 1 Hosting", category: "hosting", domains: ["*.peer1.com"] },
          { name: "PERFORM", category: "content", domains: ["*.performgroup.com"] },
          { name: "PICnet", category: "hosting", domains: ["*.nonprofitsoapbox.com"] },
          { name: "Pacnet", company: "Telstra", category: "other", domains: ["*.cdndelivery.net"], examples: ["682968324.r.cdndelivery.net"] },
          { name: "Pagefair", category: "ad", domains: ["*.pagefair.com", "*.pagefair.net"] },
          { name: "Pagely", category: "other", domains: ["*.optnmstr.com"], totalExecutionTime: 99314, totalOccurrences: 487 },
          { name: "Pagesuite", category: "ad", domains: ["*.pagesuite-professional.co.uk"], totalExecutionTime: 12, totalOccurrences: 1 },
          { name: "Pardot", category: "marketing", domains: ["*.pardot.com"], totalExecutionTime: 73880, totalOccurrences: 550 },
          { name: "Parse.ly", category: "analytics", domains: ["*.parsely.com", "d1z2jf7jlzjs58.cloudfront.net"], totalExecutionTime: 1122662, totalOccurrences: 5204 },
          { name: "Pay per Click", company: "Eysys", category: "ad", domains: ["*.eysys.com"], examples: ["pla27.eysys.com"] },
          { name: "PayPal Ads", category: "ad", domains: ["*.where.com"] },
          { name: "Peaks & Pies", category: "analytics", domains: ["*.bunchbox.co"] },
          { name: "PebblePost", category: "ad", domains: ["*.pbbl.co"], totalExecutionTime: 147945, totalOccurrences: 725 },
          { name: "Peerius", category: "analytics", domains: ["*.peerius.com"] },
          { name: "Peermap", company: "IMRG", category: "analytics", domains: ["peermapcontent.affino.com"] },
          { name: "Penske Media", category: "content", domains: ["*.pmc.com"] },
          { name: "Penton", category: "utility", domains: ["*.pisces-penton.com"] },
          { name: "Pepper", category: "ad", domains: ["*.peppercorp.com"] },
          { name: "Perfect Audience", company: "Marin Software", category: "ad", domains: ["*.prfct.co", "*.marinsm.com", "*.perfectaudience.com"], totalExecutionTime: 405, totalOccurrences: 7 },
          { name: "Perfect Market", category: "ad", domains: [
            "*.perfectmarket.com"
          ] },
          { name: "Perfect Privacy", category: "other", domains: ["*.suitesmart.com"] },
          { name: "Perform Group", category: "content", domains: ["*.performfeeds.com", "*.premiumtv.co.uk"] },
          { name: "Performio", category: "ad", domains: ["*.performax.cz"], examples: ["ut.performax.cz"], totalExecutionTime: 117591, totalOccurrences: 337 },
          { name: "PerimeterX Bot Defender", company: "PerimeterX", category: "utility", domains: ["*.perimeterx.net", "*.pxi.pub"], totalExecutionTime: 172605, totalOccurrences: 68 },
          { name: "Periscope", category: "content", domains: ["*.periscope.tv"] },
          { name: "Permutive", category: "ad", domains: ["*.permutive.com", "d3alqb8vzo7fun.cloudfront.net"], totalExecutionTime: 1406714, totalOccurrences: 1124 },
          { name: "Petametrics", category: "analytics", domains: ["*.petametrics.com"] },
          { name: "PhotoBucket", category: "content", domains: ["*.photobucket.com"], totalExecutionTime: 2383529, totalOccurrences: 338 },
          { name: "Picreel", category: "analytics", domains: ["*.pcrl.co", "*.picreel.com"], totalExecutionTime: 45437, totalOccurrences: 300 },
          { name: "Pictela (AOL)", category: "analytics", domains: ["*.pictela.net"] },
          { name: "PistonHeads", category: "social", domains: ["*.pistonheads.com"] },
          { name: "Piwik", category: "analytics", domains: ["*.drtvtracker.com", "*.piwikpro.com", "*.raac33.net"], totalExecutionTime: 2813, totalOccurrences: 32 },
          { name: "Pixalate", category: "utility", domains: ["*.adrta.com"], totalExecutionTime: 4187, totalOccurrences: 13 },
          { name: "Pixlee", category: "social", domains: ["*.pixlee.com"], totalExecutionTime: 137281, totalOccurrences: 341 },
          { name: "Placed", category: "analytics", domains: ["*.placed.com"], totalExecutionTime: 691, totalOccurrences: 1 },
          { name: "Planning-inc", category: "analytics", domains: ["*.planning-inc.co.uk"] },
          { name: "PlayAd Media Group", category: "ad", domains: ["*.youplay.se"] },
          {
            name: "Playbuzz",
            category: "hosting",
            domains: ["*.playbuzz.com"],
            totalExecutionTime: 58184,
            totalOccurrences: 89
          },
          { name: "Pleenq", category: "ad", domains: ["*.pleenq.com"] },
          { name: "Plentific", category: "content", domains: ["*.plentific.com"] },
          { name: "PluginDetect", category: "other", domains: ["dtlilztwypawv.cloudfront.net"] },
          { name: "Po.st", company: "RadiumOne", category: "utility", domains: ["*.po.st"], totalExecutionTime: 178, totalOccurrences: 3 },
          { name: "Pointpin", category: "utility", domains: ["*.pointp.in"] },
          { name: "Pointroll (Garnett)", category: "ad", domains: ["*.pointroll.com"] },
          { name: "Polar", homepage: "https://polar.me/", category: "ad", domains: ["*.polarmobile.ca", "*.mediaeverywhere.com", "*.mediavoice.com", "*.plrsrvcs.com", "*.polarcdn-engine.com", "*.polarcdn-meraxes.com", "*.polarcdn-pentos.com", "*.polarcdn-static.com", "*.polarcdn-terrax.com", "*.polarcdn.com", "*.polarmobile.com", "*.poweredbypolar.com", "*.mediaconductor.me", "*.polaracademy.me"], totalExecutionTime: 66280, totalOccurrences: 223 },
          { name: "PollDaddy (Automattic)", category: "ad", domains: ["static.polldaddy.com", "*.poll.fm"], totalExecutionTime: 4752, totalOccurrences: 37 },
          { name: "Polldaddy", company: "Automattic", category: "analytics", domains: ["polldaddy.com", "*.polldaddy.com"], totalExecutionTime: 294207, totalOccurrences: 2715 },
          { name: "Polyfill service", company: "Polyfill.io", category: "other", domains: ["*.polyfill.io"] },
          { name: "MegaPopAds", category: "ad", domains: ["*.megapopads.com"] },
          { name: "Populis", category: "ad", domains: ["*.populisengage.com"] },
          { name: "Postimage.org", category: "content", domains: ["*.postimg.org"] },
          { name: "PowerFront", category: "hosting", domains: ["*.inside-graph.com"], totalExecutionTime: 220331, totalOccurrences: 370 },
          { name: "PowerReviews", category: "analytics", domains: ["*.powerreviews.com"], totalExecutionTime: 1208993, totalOccurrences: 1324 },
          { name: "Powerlinks.com", category: "ad", domains: ["*.powerlinks.com"] },
          { name: "Press+", category: "ad", domains: ["*.pipol.com", "*.ppjol.com", "*.ppjol.net"] },
          { name: "PressArea", category: "utility", domains: ["*.pressarea.com"], examples: ["www.pressarea.com"] },
          { name: "Pretio Interactive", category: "ad", domains: ["*.pretio.in"] },
          { name: "Prezi", category: "utility", domains: ["*.prezi.com"], totalExecutionTime: 72394, totalOccurrences: 79 },
          { name: "PriceGrabber", category: "content", domains: ["*.pgcdn.com", "*.pricegrabber.com"] },
          { name: "PriceRunner", category: "content", domains: ["*.pricerunner.com"], totalExecutionTime: 200, totalOccurrences: 6 },
          { name: "PrintFriendly", category: "utility", domains: ["*.printfriendly.com"], totalExecutionTime: 39464, totalOccurrences: 381 },
          { name: "Privy", category: "ad", domains: ["*.privy.com", "*.privymktg.com"], totalExecutionTime: 14992809, totalOccurrences: 18961 },
          { name: "Proclivity Media", category: "analytics", domains: ["*.pswec.com"] },
          { name: "Profitshare", category: "ad", domains: ["*.profitshare.ro"], totalExecutionTime: 60087, totalOccurrences: 194 },
          { name: "Programattik", category: "ad", domains: ["*.programattik.com"], totalExecutionTime: 95, totalOccurrences: 9 },
          { name: "Proper Media", category: "content", domains: ["*.proper.io"], totalExecutionTime: 253672, totalOccurrences: 109 },
          { name: "Property Week", category: "content", domains: ["*.propertyweek.com"], examples: ["www.propertyweek.com"] },
          { name: "Provide Support", category: "customer-success", domains: ["*.providesupport.com"], totalExecutionTime: 79281, totalOccurrences: 989 },
          { name: "Proweb Uk", category: "hosting", domains: ["*.proweb.net"] },
          { name: "Proximic (ComScore)", category: "ad", domains: ["*.proximic.com"] },
          { name: "Psyma", category: "ad", domains: ["*.psyma.com"], totalExecutionTime: 2496, totalOccurrences: 5 },
          { name: "PubFactory", company: "Safari Books Online", category: "content", domains: ["*.pubfactory.com"] },
          { name: "PubNation", category: "ad", domains: ["*.pubnation.com"], totalExecutionTime: 625439, totalOccurrences: 132 },
          { name: "Publicidad.net", category: "ad", domains: ["*.publicidad.tv"] },
          { name: "PublishThis", company: "Ultra Unlimited", category: "ad", domains: ["*.publishthis.com"] },
          { name: "Pulse Insights", category: "analytics", domains: ["*.pulseinsights.com"], totalExecutionTime: 5757, totalOccurrences: 53 },
          { name: "Pulsepoint", category: "marketing", domains: ["*.displaymarketplace.com"] },
          { name: "Purch", category: "ad", domains: ["*.bestofmedia.com", "*.purch.com"], examples: ["ramp.purch.com"] },
          { name: "Pure Chat", category: "customer-success", domains: ["*.purechat.com"], totalExecutionTime: 1129392, totalOccurrences: 3105 },
          { name: "PushCrew", category: "ad", domains: ["*.pushcrew.com"], totalExecutionTime: 170011, totalOccurrences: 823 },
          { name: "Q1Media", category: "ad", domains: ["*.q1media.com", "*.q1mediahydraplatform.com"] },
          { name: "Qbase Software Development", category: "hosting", domains: ["*.smartwebportal.co.uk"] },
          { name: "Qeryz", category: "analytics", domains: ["*.qeryz.com"] },
          { name: "Qode Interactive", category: "hosting", domains: ["*.qodeinteractive.com"], totalExecutionTime: 2503828, totalOccurrences: 147 },
          { name: "Qrius", category: "social", domains: ["*.qrius.me"] },
          { name: "Qualaroo", category: "analytics", domains: ["*.qualaroo.com"], totalExecutionTime: 54960, totalOccurrences: 347 },
          { name: "Qualtrics", category: "analytics", domains: ["*.qualtrics.com"], totalExecutionTime: 4907219, totalOccurrences: 7134 },
          { name: "Qubit", company: "Qubit", category: "analytics", domains: ["*.qubit.com", "*.qutics.com", "d3c3cq33003psk.cloudfront.net", "*.goqubit.com", "*.qubitproducts.com"], totalExecutionTime: 50060, totalOccurrences: 43 },
          { name: "Qubit Deliver", company: "Qubit", category: "analytics", domains: ["d1m54pdnjzjnhe.cloudfront.net", "d22rutvoghj3db.cloudfront.net", "dd6zx4ibq538k.cloudfront.net"] },
          { name: "QuestionPro", category: "analytics", domains: ["*.questionpro.com"], totalExecutionTime: 60868, totalOccurrences: 152 },
          { name: "Queue-it", category: "other", domains: ["*.queue-it.net"], totalExecutionTime: 60031, totalOccurrences: 143 },
          { name: "QuinStreet", category: "ad", domains: ["*.Quinstreet.com", "*.b2btechleadform.com", "*.qnsr.com", "*.qsstats.com"], examples: ["www.qsstats.com"] },
          { name: "QuoVadis", category: "utility", domains: ["*.quovadisglobal.com"] },
          { name: "Qzzr", category: "analytics", domains: ["*.movementventures.com", "*.qzzr.com"], examples: ["www.qzzr.com"] },
          { name: "RapidAPI", category: "utility", domains: ["*.rapidapi.com"], examples: ["telize-v1.p.rapidapi.com"], totalExecutionTime: 4218, totalOccurrences: 2 },
          { name: "RCS Media Group", category: "ad", domains: ["*.rcsadv.it"] },
          { name: "REVIVVE", category: "ad", domains: ["*.revivve.com"] },
          { name: "RSSinclude", category: "social", domains: ["*.rssinclude.com"] },
          { name: "RTB House AdPilot", company: "RTB House", category: "ad", domains: ["*.erne.co", "*.creativecdn.com"], totalExecutionTime: 1677125, totalOccurrences: 13287 },
          { name: "RTB Media", category: "ad", domains: ["*.rtb-media.me"] },
          { name: "RUN", category: "ad", domains: ["*.runadtag.com", "*.rundsp.com"] },
          { name: "Rackspace", category: "hosting", domains: ["*.rackcdn.com", "*.rackspacecloud.com", "*.raxcdn.com", "*.websitetestlink.com"], totalExecutionTime: 3573460, totalOccurrences: 2624 },
          { name: "RadiumOne", category: "ad", domains: ["*.gwallet.com", "*.r1-cdn.net"] },
          { name: "Rakuten DC Storm", company: "Rakuten", category: "analytics", domains: ["*.dc-storm.com", "*.h4k5.com", "*.stormiq.com"] },
          { name: "Rakuten LinkShare", company: "Rakuten", category: "ad", domains: ["*.linksynergy.com"], totalExecutionTime: 23285, totalOccurrences: 151 },
          { name: "Rakuten Marketing", company: "Rakuten", category: "ad", domains: ["*.rakuten-static.com", "*.rmtag.com", "tag.rmp.rakuten.com"], totalExecutionTime: 462276, totalOccurrences: 3399 },
          {
            name: "Rakuten MediaForge",
            company: "Rakuten",
            category: "ad",
            domains: ["*.mediaforge.com"],
            totalExecutionTime: 1650,
            totalOccurrences: 20
          },
          { name: "Rambler", company: "Rambler & Co", category: "utility", domains: ["*.rambler.ru"], totalExecutionTime: 54521084, totalOccurrences: 15831 },
          { name: "Ranker", category: "content", domains: ["*.ranker.com", "*.rnkr-static.com"] },
          { name: "Ravelin", category: "utility", domains: ["*.ravelin.com"] },
          { name: "Raygun", category: "utility", domains: ["*.raygun.io", "*.rapidzebra.io"], totalExecutionTime: 245714, totalOccurrences: 2539 },
          { name: "ReCollect", category: "utility", domains: ["*.recollect.net"], totalExecutionTime: 229879, totalOccurrences: 135 },
          { name: "ReSRC", category: "utility", domains: ["*.resrc.it"] },
          { name: "ReTargeter", category: "ad", domains: ["*.retargeter.com"] },
          { name: "Reach Group", category: "ad", domains: ["*.redintelligence.net"], totalExecutionTime: 1449, totalOccurrences: 199 },
          { name: "ReachDynamics", category: "ad", domains: ["*.rdcdn.com"] },
          { name: "ReachForce", category: "ad", domains: ["*.reachforce.com"] },
          { name: "ReachLocal", category: "ad", domains: ["*.rtrk.co.nz"], examples: ["rtsys.rtrk.co.nz"] },
          { name: "ReachMee", category: "content", domains: ["*.reachmee.com"], totalExecutionTime: 133135, totalOccurrences: 40 },
          { name: "Reactful", category: "analytics", domains: ["*.reactful.com"], totalExecutionTime: 12497, totalOccurrences: 42 },
          { name: "Realtime", company: "internet business technologies", category: "utility", domains: ["*.realtime.co"] },
          { name: "Realtime Media (Brian Communications)", category: "ad", domains: ["*.rtm.com"] },
          { name: "Realtime Targeting", category: "ad", domains: ["*.idtargeting.com"] },
          { name: "Realytics", category: "analytics", domains: ["dcniko1cv0rz.cloudfront.net", "*.realytics.net"], totalExecutionTime: 38343, totalOccurrences: 276 },
          { name: "RebelMouse", category: "ad", domains: ["*.rebelmouse.com", "*.rbl.ms"], examples: ["www.rebelmouse.com"], totalExecutionTime: 3876, totalOccurrences: 22 },
          { name: "Receiptful", category: "utility", domains: [
            "*.receiptful.com"
          ], totalExecutionTime: 58254, totalOccurrences: 361 },
          { name: "Recite Me", category: "other", domains: ["*.reciteme.com"], totalExecutionTime: 22320, totalOccurrences: 142 },
          { name: "RecoBell", category: "analytics", domains: ["*.recobell.io"] },
          { name: "Recommend", category: "analytics", domains: ["*.recommend.pro"] },
          { name: "Red Eye International", category: "ad", domains: ["*.pajmc.com"] },
          { name: "Redfish Group", category: "ad", domains: ["*.wmps.com"] },
          { name: "Reevoo", category: "analytics", domains: ["*.reevoo.com"], totalExecutionTime: 87323, totalOccurrences: 133 },
          { name: "Refersion", category: "ad", domains: ["*.refersion.com"], totalExecutionTime: 564360, totalOccurrences: 2170 },
          { name: "Refined Ads", category: "ad", domains: ["*.refinedads.com"] },
          { name: "Reflektion", category: "analytics", domains: ["*.reflektion.com", "d26opx5dl8t69i.cloudfront.net"] },
          { name: "Reflow", company: "Scenestealer", category: "ad", domains: ["*.reflow.tv"] },
          { name: "Reklama", category: "ad", domains: ["*.o2.pl", "*.wp.pl"], examples: ["dot.wp.pl", "px.o2.pl", "px.wp.pl"], totalExecutionTime: 846563, totalOccurrences: 1054 },
          { name: "Relevad ReleStar", company: "Relevad", category: "ad", domains: ["*.relestar.com"] },
          { name: "Remarketing Pixel", company: "Adsterra Network", category: "ad", domains: ["*.datadbs.com", "*.remarketingpixel.com"] },
          { name: "Remintrex", company: "SmartUp Venture", category: "ad", domains: ["*.remintrex.com"] },
          { name: "Republer", category: "ad", domains: ["*.republer.com"], examples: ["sync.republer.com"] },
          { name: "Research Now", category: "analytics", domains: ["*.researchgnow.com", "*.researchnow.com"], examples: ["tag.researchgnow.com"] },
          { name: "Research Online", company: "Skills Development Scotland", category: "content", domains: ["*.researchonline.org.uk"], examples: ["www.researchonline.org.uk"] },
          {
            name: "Resonance Insights",
            category: "analytics",
            domains: ["*.res-x.com"],
            totalExecutionTime: 2277,
            totalOccurrences: 20
          },
          { name: "Resonate Networks", category: "analytics", domains: ["*.reson8.com"], totalExecutionTime: 1739, totalOccurrences: 1 },
          { name: "Response Team", category: "ad", domains: ["*.i-transactads.com"] },
          { name: "ResponseTap", category: "analytics", domains: ["*.adinsight.com", "*.responsetap.com"], totalExecutionTime: 84074, totalOccurrences: 274 },
          { name: "ResponsiveVoice", category: "other", domains: ["*.responsivevoice.org"], totalExecutionTime: 851397, totalOccurrences: 6863 },
          { name: "Retention Science", category: "ad", domains: ["*.retentionscience.com", "d1stxfv94hrhia.cloudfront.net"], totalExecutionTime: 17276, totalOccurrences: 209 },
          { name: "Revcontent", category: "content", domains: ["*.revcontent.com"], totalExecutionTime: 1153469, totalOccurrences: 1251 },
          { name: "Revee", category: "ad", domains: ["*.revee.com"] },
          { name: "Revenue Conduit", category: "utility", domains: ["*.revenueconduit.com"] },
          {
            name: "RevenueMantra",
            category: "ad",
            domains: ["*.revenuemantra.com"]
          },
          { name: "Reviews.co.uk", category: "analytics", domains: ["*.reviews.co.uk"], totalExecutionTime: 425151, totalOccurrences: 1883 },
          { name: "Reviews.io", category: "analytics", domains: ["*.reviews.io"], totalExecutionTime: 1713955, totalOccurrences: 4516 },
          { name: "Revolver Maps", category: "analytics", domains: ["*.revolvermaps.com"], totalExecutionTime: 2132297, totalOccurrences: 2305 },
          { name: "Revv", category: "utility", domains: ["*.revv.co"], totalExecutionTime: 26667, totalOccurrences: 11 },
          { name: "RichRelevance", category: "analytics", domains: ["*.richrelevance.com"], totalExecutionTime: 3496, totalOccurrences: 19 },
          { name: "RightNow Service Cloud", company: "Oracle", category: "customer-success", domains: ["*.rightnowtech.com", "*.rnengage.com"], totalExecutionTime: 8970, totalOccurrences: 122 },
          { name: "Rightster", category: "ad", domains: ["*.ads-creativesyndicator.com"] },
          { name: "Riskified", category: "utility", domains: ["*.riskified.com"], totalExecutionTime: 373865, totalOccurrences: 1643 },
          { name: "Rockerbox", category: "analytics", homepage: "https://www.rockerbox.com/", domains: ["getrockerbox.com"], examples: ["getrockerbox.com"], totalExecutionTime: 19742, totalOccurrences: 162 },
          { name: "Rocket Fuel", category: "ad", domains: ["*.rfihub.com", "*.ru4.com", "*.rfihub.net", "*.ad1x.com"], totalExecutionTime: 356189, totalOccurrences: 3247 },
          { name: "Rollbar", category: "utility", domains: ["*.rollbar.com", "d37gvrvc0wt4s1.cloudfront.net"], examples: ["api.rollbar.com"], totalExecutionTime: 190180, totalOccurrences: 2349 },
          { name: "RomanCart", category: "utility", domains: ["*.romancart.com"], totalExecutionTime: 510, totalOccurrences: 5 },
          { name: "Rondavu", category: "ad", domains: ["*.rondavu.com"] },
          { name: "Roomkey", category: "content", domains: ["*.roomkey.com"], examples: ["www.roomkey.com"] },
          { name: "Roost", category: "utility", domains: ["*.goroost.com"] },
          { name: "Roxot", category: "ad", domains: ["*.rxthdr.com"] },
          { name: "Roxr Software", category: "analytics", domains: ["*.getclicky.com"], totalExecutionTime: 851573, totalOccurrences: 12877 },
          { name: "Rtoaster", company: "Brainpad", homepage: "https://www.brainpad.co.jp/rtoaster/", category: "marketing", domains: ["*.rtoaster.jp"], examples: ["rt.rtoaster.jp"], totalExecutionTime: 15065, totalOccurrences: 91 },
          { name: "Rubikloud.com", category: "analytics", domains: ["*.rubikloud.com"] },
          { name: "Ruler Analytics", company: "Ruler", category: "analytics", domains: ["*.nyltx.com", "*.ruleranalytics.com"], examples: ["www.ruleranalytics.com"], totalExecutionTime: 41074, totalOccurrences: 436 },
          { name: "Runner", company: "Rambler & Co", category: "content", domains: ["*.begun.ru"], totalExecutionTime: 26, totalOccurrences: 1 },
          { name: "S4M", category: "ad", domains: ["*.sam4m.com"] },
          { name: "SAP Hybris Marketing Convert", company: "SAP", category: "ad", domains: ["*.seewhy.com"] },
          { name: "SAS Institute", category: "ad", domains: ["*.aimatch.com", "*.sas.com"], totalExecutionTime: 59419, totalOccurrences: 29 },
          { name: "SATORI", homepage: "https://satori.marketing/", category: "marketing", domains: ["satori.segs.jp"], examples: ["satori.segs.jp/s.js"], totalExecutionTime: 62202, totalOccurrences: 816 },
          { name: "SC ShopMania Net SRL", category: "content", domains: ["*.shopmania.com"] },
          { name: "SDL Media Manager", company: "SDL", category: "other", domains: ["*.sdlmedia.com"] },
          { name: "SFR", category: "other", domains: ["*.sfr.fr"], examples: ["elr.sfr.fr"], totalExecutionTime: 22751, totalOccurrences: 22 },
          { name: "SLI Systems", category: "utility", domains: ["*.resultslist.com", "*.resultspage.com", "*.sli-spark.com"], totalExecutionTime: 2909, totalOccurrences: 33 },
          { name: "SMARTASSISTANT", company: "Smart Information Systems", category: "customer-success", domains: ["*.smartassistant.com"] },
          { name: "SMARTSTREAM.TV", category: "ad", domains: ["*.smartstream.tv"] },
          { name: "SPX", company: "Smaato", category: "ad", domains: ["*.smaato.net"], totalExecutionTime: 519, totalOccurrences: 13 },
          { name: "Sabio", category: "customer-success", domains: ["*.sabio.co.uk"], examples: ["www.sabio.co.uk"] },
          { name: "Sailthru", category: "analytics", domains: ["*.sail-horizon.com", "*.sail-personalize.com", "*.sail-track.com"], totalExecutionTime: 59245, totalOccurrences: 678 },
          { name: "Sailthru Sightlines", company: "Sailthru", category: "marketing", domains: ["*.sailthru.com"], totalExecutionTime: 6772, totalOccurrences: 18 },
          { name: "Sajari Pty", category: "utility", domains: ["*.sajari.com"], totalExecutionTime: 70019, totalOccurrences: 197 },
          { name: "SaleCycle", category: "ad", domains: ["*.salecycle.com", "d16fk4ms6rqz1v.cloudfront.net", "d22j4fzzszoii2.cloudfront.net", "d30ke5tqu2tkyx.cloudfront.net", "dn1i8v75r669j.cloudfront.net"], totalExecutionTime: 146399, totalOccurrences: 641 },
          { name: "Salesforce Live Agent", company: "Salesforce.com", category: "customer-success", domains: [
            "*.salesforceliveagent.com"
          ], totalExecutionTime: 100033, totalOccurrences: 675 },
          { name: "Salesforce.com", category: "ad", domains: ["*.force.com", "*.salesforce.com"], examples: ["secure.force.com"], totalExecutionTime: 1614051, totalOccurrences: 4970 },
          { name: "Samba TV", company: "Samba", category: "content", domains: ["*.samba.tv"], totalExecutionTime: 1690, totalOccurrences: 7 },
          { name: "Samplicio.us", category: "analytics", domains: ["*.samplicio.us"], totalExecutionTime: 1727, totalOccurrences: 5 },
          { name: "Say Media", category: "ad", domains: ["*.saymedia.com"] },
          { name: "Scenario", category: "analytics", domains: ["*.getscenario.com"] },
          { name: "Schuh (image shard)", company: "Schuh", category: "other", domains: ["d2ob0iztsaxy5v.cloudfront.net"] },
          { name: "Science Rockstars", category: "analytics", domains: ["*.persuasionapi.com"] },
          { name: "ScientiaMobile", category: "analytics", domains: ["*.wurflcloud.com", "*.wurfl.io"], totalExecutionTime: 627, totalOccurrences: 3 },
          { name: "Scoota", category: "ad", domains: ["*.rockabox.co", "*.scoota.co", "d31i2625d5nv27.cloudfront.net", "dyjnzf8evxrp2.cloudfront.net"] },
          { name: "ScribbleLive", category: "ad", domains: ["*.scribblelive.com"] },
          { name: "SearchForce", category: "ad", domains: ["*.searchforce.net"], totalExecutionTime: 118, totalOccurrences: 3 },
          { name: "SearchSpring", category: "utility", domains: ["*.searchspring.net"], totalExecutionTime: 1175588, totalOccurrences: 309 },
          { name: "Searchanise", category: "analytics", domains: ["*.searchanise.com"], examples: ["www.searchanise.com"], totalExecutionTime: 63519, totalOccurrences: 420 },
          { name: "Sears Holdings", category: "content", domains: ["*.shld.net"] },
          { name: "Secomapp", category: "utility", domains: ["*.secomapp.com"], totalExecutionTime: 2151952, totalOccurrences: 2137 },
          { name: "SecuredVisit", company: "4Cite Marketing", category: "ad", domains: ["*.securedvisit.com"], totalExecutionTime: 41054, totalOccurrences: 369 },
          { name: "SecurityMetrics", category: "utility", domains: ["*.securitymetrics.com"], totalExecutionTime: 8413, totalOccurrences: 2 },
          { name: "Segmento", category: "ad", domains: ["*.rutarget.ru"], totalExecutionTime: 17111, totalOccurrences: 226 },
          { name: "Segmint", category: "analytics", domains: ["*.segmint.net"], totalExecutionTime: 14122, totalOccurrences: 109 },
          { name: "Sekindo", category: "content", domains: ["*.sekindo.com"], totalExecutionTime: 376, totalOccurrences: 4 },
          { name: "Seldon", category: "analytics", domains: ["*.rummblelabs.com"] },
          { name: "SelectMedia International", category: "content", domains: ["*.selectmedia.asia"], totalExecutionTime: 186574, totalOccurrences: 68 },
          { name: "Selligent", category: "ad", domains: ["*.emsecure.net", "*.slgnt.eu", "targetemsecure.blob.core.windows.net"], totalExecutionTime: 163886, totalOccurrences: 506 },
          { name: "Sellpoints", category: "analytics", domains: ["*.sellpoints.com"] },
          { name: "Semantics3", category: "analytics", domains: [
            "*.hits.io"
          ] },
          { name: "Semasio", category: "analytics", domains: ["*.semasio.net"] },
          { name: "Semcasting Site Visitor Attribution", company: "Semcasting", category: "ad", domains: ["*.smartzonessva.com"] },
          { name: "Sentifi", category: "social", domains: ["*.sentifi.com"] },
          { name: "ServMetric", category: "analytics", domains: ["*.servmetric.com"] },
          { name: "ServiceSource International", category: "marketing", domains: ["*.scoutanalytics.net"], examples: ["scout.scoutanalytics.net"] },
          { name: "ServiceTick", category: "analytics", domains: ["*.servicetick.com"] },
          { name: "Servo", company: "Xervo", category: "hosting", domains: ["*.onmodulus.net"] },
          { name: "SessionCam", company: "ServiceTick", category: "analytics", domains: ["*.sessioncam.com", "d2oh4tlt9mrke9.cloudfront.net"] },
          { name: "Seznam", category: "utility", domains: ["*.imedia.cz"], totalExecutionTime: 1323711, totalOccurrences: 6863 },
          {
            name: "Sharethrough",
            category: "ad",
            domains: ["*.sharethrough.com"],
            totalExecutionTime: 46730,
            totalOccurrences: 833
          },
          { name: "SharpSpring", category: "marketing", domains: ["*.sharpspring.com", "*.marketingautomation.services"], totalExecutionTime: 632191, totalOccurrences: 2080 },
          { name: "ShopRunner", category: "content", domains: ["*.shoprunner.com", "*.s-9.us"], totalExecutionTime: 35573, totalOccurrences: 32 },
          { name: "ShopStorm", category: "utility", domains: ["*.shopstorm.com"] },
          { name: "Shopatron", category: "hosting", domains: ["*.shopatron.com"] },
          { name: "Shopgate", category: "utility", domains: ["*.shopgate.com"], totalExecutionTime: 15293, totalOccurrences: 25 },
          { name: "ShopiMind", company: "ShopIMind", category: "ad", domains: ["*.shopimind.com"] },
          { name: "Shopkeeper Tools", category: "utility", domains: ["*.shopkeepertools.com"], totalExecutionTime: 500, totalOccurrences: 6 },
          { name: "Sidecar", category: "other", domains: ["*.getsidecar.com", "d3v27wwd40f0xu.cloudfront.net"] },
          { name: "Sidereel", category: "analytics", domains: ["*.sidereel.com"] },
          { name: "Sift Science", category: "utility", domains: ["*.siftscience.com"], totalExecutionTime: 90167, totalOccurrences: 355 },
          { name: "Signal", category: "tag-manager", domains: ["*.sitetagger.co.uk"] },
          { name: "Signyfyd", category: "utility", domains: ["*.signifyd.com"], totalExecutionTime: 4752892, totalOccurrences: 2608 },
          { name: "Silktide", category: "hosting", domains: ["*.silktide.com"], totalExecutionTime: 132707, totalOccurrences: 390 },
          { name: "Silverpop", company: "IBM", category: "ad", domains: ["*.mkt912.com", "*.mkt922.com", "*.mkt932.com", "*.mkt941.com", "*.mkt51.net", "*.mkt61.net", "*.pages01.net", "*.pages02.net", "*.pages03.net", "*.pages04.net", "*.pages05.net"], totalExecutionTime: 4144, totalOccurrences: 58 },
          { name: "Simplaex", category: "marketing", domains: ["*.simplaex.net"] },
          { name: "SimpleReach", category: "analytics", domains: ["*.simplereach.com", "d8rk54i4mohrb.cloudfront.net"] },
          { name: "Simplestream", category: "content", domains: ["*.simplestream.com"], examples: ["player.simplestream.com"] },
          { name: "Simpli.fi", category: "ad", domains: ["*.simpli.fi"], totalExecutionTime: 974218, totalOccurrences: 16378 },
          { name: "Simplicity Marketing", category: "ad", domains: ["*.flashtalking.com"], totalExecutionTime: 579126, totalOccurrences: 2927 },
          { name: "SinnerSchrader Deutschland", category: "ad", domains: ["*.s2Betrieb.de"] },
          { name: "Sirv", category: "other", domains: ["*.sirv.com"], totalExecutionTime: 604262, totalOccurrences: 1034 },
          { name: "Site Meter", category: "analytics", domains: ["*.sitemeter.com"] },
          { name: "Site24x7 Real User Monitoring", company: "Site24x7", category: "analytics", domains: ["*.site24x7rum.com"], totalExecutionTime: 124283, totalOccurrences: 1007 },
          { name: "SiteGainer", category: "analytics", domains: ["*.sitegainer.com", "d191y0yd6d0jy4.cloudfront.net"] },
          { name: "SiteScout", company: "Centro", category: "ad", domains: ["*.pixel.ad", "*.sitescout.com"], totalExecutionTime: 256082, totalOccurrences: 3401 },
          { name: "Siteimprove", category: "utility", domains: ["*.siteimprove.com", "*.siteimproveanalytics.com"], totalExecutionTime: 28494, totalOccurrences: 361 },
          { name: "Six Degrees Group", category: "hosting", domains: ["*.fstech.co.uk"] },
          { name: "Skimbit", category: "ad", domains: ["*.redirectingat.com", "*.skimresources.com", "*.skimresources.net"], totalExecutionTime: 32940093, totalOccurrences: 86270 },
          { name: "Skimlinks", category: "ad", domains: ["*.skimlinks.com"] },
          { name: "SkyGlue Technology", category: "analytics", domains: ["*.skyglue.com"], totalExecutionTime: 2567, totalOccurrences: 24 },
          { name: "SkyScanner", category: "content", domains: ["*.skyscanner.net"], examples: ["api.skyscanner.net"], totalExecutionTime: 98147, totalOccurrences: 370 },
          { name: "Skybet", company: "Bonne Terre t/a Sky Vegas (Sky)", category: "other", domains: ["*.skybet.com"] },
          { name: "Skype", category: "other", domains: ["*.skype.com"], totalExecutionTime: 121901, totalOccurrences: 625 },
          {
            name: "Slate Group",
            category: "content",
            domains: ["*.cdnslate.com"]
          },
          { name: "SlimCut Media Outstream", company: "SlimCut Media", category: "ad", domains: ["*.freeskreen.com"] },
          { name: "Smart Insight Tracking", company: "Emarsys", category: "analytics", domains: ["*.scarabresearch.com"], totalExecutionTime: 361811, totalOccurrences: 1779 },
          { name: "Smart AdServer", category: "ad", domains: ["*.01net.com", "*.sascdn.com", "*.sasqos.com", "*.smartadserver.com"], examples: ["securite.01net.com"], totalExecutionTime: 22356737, totalOccurrences: 107812 },
          { name: "SmartFocus", category: "analytics", domains: ["*.emv2.com", "*.emv3.com", "*.predictiveintent.com", "*.smartfocus.com", "*.themessagecloud.com"] },
          { name: "Smarter Click", category: "ad", domains: ["*.smct.co", "*.smarterclick.co.uk"], totalExecutionTime: 761, totalOccurrences: 11 },
          {
            name: "SmarterHQ",
            category: "analytics",
            domains: ["*.smarterhq.io", "d1n00d49gkbray.cloudfront.net", "*.smarterremarketer.net"],
            totalExecutionTime: 2636,
            totalOccurrences: 28
          },
          { name: "Smarttools", category: "customer-success", domains: ["*.smartertrack.com"] },
          { name: "Smartzer", category: "ad", domains: ["*.smartzer.com"] },
          { name: "Snack Media", category: "content", domains: ["*.snack-media.com"], totalExecutionTime: 575613, totalOccurrences: 423 },
          { name: "Snacktools", category: "ad", domains: ["*.bannersnack.com"], totalExecutionTime: 162327, totalOccurrences: 303 },
          { name: "SnapEngage", category: "customer-success", domains: ["*.snapengage.com"], totalExecutionTime: 147012, totalOccurrences: 1038 },
          { name: "SnapWidget", category: "content", domains: ["*.snapwidget.com"] },
          { name: "Soasta", category: "analytics", domains: ["*.lognormal.net"] },
          { name: "SociableLabs", category: "ad", domains: ["*.sociablelabs.net", "*.sociablelabs.com"] },
          { name: "Social Annex", category: "customer-success", domains: ["*.socialannex.com"] },
          {
            name: "SocialShopWave",
            category: "social",
            domains: ["*.socialshopwave.com"],
            totalExecutionTime: 4962079,
            totalOccurrences: 3720
          },
          { name: "Socialphotos", category: "social", domains: ["*.slpht.com"], totalExecutionTime: 12590, totalOccurrences: 120 },
          { name: "Sociomantic Labs", company: "DunnHumby", category: "ad", domains: ["*.sociomantic.com"] },
          { name: "SodaHead", category: "analytics", domains: ["*.sodahead.com"], examples: ["pollware-cdn.sodahead.com"] },
          { name: "Softwebzone", category: "hosting", domains: ["*.softwebzone.com"], examples: ["www.softwebzone.com"] },
          { name: "Sojern", category: "marketing", domains: ["*.sojern.com"], totalExecutionTime: 2086952, totalOccurrences: 4422 },
          { name: "Sokrati", category: "marketing", domains: ["*.sokrati.com"] },
          { name: "Sonobi", category: "ad", domains: ["*.sonobi.com"], totalExecutionTime: 4682222, totalOccurrences: 81682 },
          { name: "Sooqr Search", company: "Sooqr", category: "utility", domains: ["*.sooqr.com"], totalExecutionTime: 176199, totalOccurrences: 396 },
          { name: "Sophus3", category: "analytics", domains: ["*.s3ae.com", "*.sophus3.com"], totalExecutionTime: 5605, totalOccurrences: 11 },
          { name: "Sorenson Media", category: "content", domains: ["*.sorensonmedia.com"] },
          { name: "Sortable", category: "ad", domains: ["*.deployads.com"] },
          { name: "Sotic", category: "hosting", domains: ["*.sotic.net", "*.soticservers.net"] },
          { name: "Soundest", category: "ad", domains: ["*.soundestlink.com", "*.soundest.net"], totalExecutionTime: 835, totalOccurrences: 102 },
          { name: "Sourcepoint", category: "ad", domains: ["*.decenthat.com", "*.fallingfalcon.com", "*.summerhamster.com", "d2lv4zbk7v5f93.cloudfront.net", "d3qxwzhswv93jk.cloudfront.net"], examples: ["www.decenthat.com", "www.fallingfalcon.com", "www.summerhamster.com"] },
          { name: "SourceKnowledge", homepage: "https://www.sourceknowledge.com", category: "ad", domains: ["*.provenpixel.com"], totalExecutionTime: 505, totalOccurrences: 8 },
          { name: "SpaceNet", category: "hosting", domains: ["*.nmm.de"] },
          { name: "Sparkflow", company: "Intercept Interactive", category: "ad", domains: ["*.sparkflow.net"] },
          { name: "Specific Media", category: "ad", domains: ["*.specificmedia.com", "*.adviva.net", "*.specificclick.net"] },
          { name: "Spicy", company: "Data-Centric Alliance", category: "ad", domains: ["*.sspicy.ru"] },
          { name: "Spoke", category: "customer-success", domains: ["*.121d8.com"] },
          { name: "Spongecell", category: "ad", domains: ["*.spongecell.com"] },
          { name: "Spot.IM", category: "social", domains: ["*.spot.im", "*.spotim.market"], totalExecutionTime: 192547, totalOccurrences: 342 },
          { name: "SpotXchange", category: "ad", domains: ["*.spotxcdn.com", "*.spotxchange.com", "*.spotx.tv"] },
          { name: "SpringServer", category: "ad", domains: ["*.springserve.com"], totalExecutionTime: 1192823, totalOccurrences: 1432 },
          { name: "Spylight", category: "other", domains: ["*.spylight.com"] },
          { name: "SreamAMG", company: "StreamAMG", category: "other", domains: ["*.streamamg.com"], totalExecutionTime: 85506, totalOccurrences: 62 },
          { name: "StackAdapt", category: "ad", domains: ["*.stackadapt.com"], totalExecutionTime: 1338506, totalOccurrences: 14912 },
          { name: "StackExchange", category: "social", domains: ["*.sstatic.net"], totalExecutionTime: 187262, totalOccurrences: 217 },
          { name: "Stackla PTY", category: "social", domains: ["*.stackla.com"], totalExecutionTime: 271026, totalOccurrences: 175 },
          { name: "Stailamedia", category: "ad", domains: ["*.stailamedia.com"] },
          { name: "Stamped.io", category: "analytics", domains: ["*.stamped.io"], totalExecutionTime: 1665115, totalOccurrences: 12460 },
          { name: "Starfield Services Root Certificate Authority", company: "Starfield Technologies", category: "utility", domains: ["*.starfieldtech.com", "ss2.us", "*.ss2.us"], examples: ["ocsp.starfieldtech.com"], totalExecutionTime: 18156, totalOccurrences: 39 },
          { name: "Starfield Technologies", category: "utility", domains: ["*.websiteprotection.com"], examples: ["seals.websiteprotection.com"] },
          { name: "StatCounter", category: "analytics", domains: ["*.statcounter.com"], totalExecutionTime: 5427381, totalOccurrences: 50769 },
          { name: "Statful", category: "analytics", domains: ["*.statful.com"] },
          { name: "Steelhouse", category: "ad", domains: ["*.steelhousemedia.com"], totalExecutionTime: 66172, totalOccurrences: 452 },
          { name: "Steepto", category: "ad", domains: ["*.steepto.com"], totalExecutionTime: 170, totalOccurrences: 1 },
          { name: "StellaService", category: "analytics", domains: ["*.stellaservice.com"] },
          { name: "StickyADS.tv", category: "ad", domains: ["*.stickyadstv.com"], totalExecutionTime: 2198555, totalOccurrences: 1462 },
          { name: "STINGRAY", company: "FlexOne", category: "ad", domains: ["*.impact-ad.jp"], examples: ["y.one.impact-ad.jp"], totalExecutionTime: 1261721, totalOccurrences: 9742 },
          { name: "Storify", company: "Adobe Systems", category: "social", domains: ["*.storify.com"] },
          { name: "Storm Tag Manager", company: "Rakuten", category: "tag-manager", domains: ["*.stormcontainertag.com"] },
          { name: "Storygize", category: "ad", domains: ["*.storygize.net"], examples: ["www.storygize.net"], totalExecutionTime: 60468, totalOccurrences: 154 },
          { name: "Strands", category: "utility", domains: ["*.strands.com"] },
          { name: "StreamRail", category: "ad", domains: ["*.streamrail.com", "*.streamrail.net"] },
          { name: "StrikeAd", category: "ad", domains: ["*.strikead.com"] },
          { name: "Struq", company: "Quantcast", category: "ad", domains: ["*.struq.com"] },
          { name: "Str\xC3\xB6er Digital Media", category: "ad", domains: ["*.stroeerdigitalmedia.de"] },
          { name: "StumbleUpon", category: "content", domains: ["*.stumble-upon.com", "*.stumbleupon.com"], totalExecutionTime: 18653, totalOccurrences: 17 },
          { name: "Sub2 Technologies", category: "analytics", domains: ["*.sub2tech.com"], totalExecutionTime: 6667, totalOccurrences: 31 },
          { name: "SublimeSkinz", category: "ad", domains: ["*.ayads.co"], totalExecutionTime: 339456, totalOccurrences: 772 },
          {
            name: "Sumo Logic",
            category: "utility",
            domains: ["*.sumologic.com"],
            totalExecutionTime: 19322,
            totalOccurrences: 9
          },
          { name: "Sunday Times Driving", category: "content", domains: ["*.driving.co.uk"] },
          { name: "SundaySky", category: "ad", domains: ["*.sundaysky.com", "dds6m601du5ji.cloudfront.net"], totalExecutionTime: 7435, totalOccurrences: 10 },
          { name: "Sunrise Integration", category: "utility", domains: ["*.sunriseintegration.com"] },
          { name: "Supertool Network Technology", category: "analytics", domains: ["*.miaozhen.com"], totalExecutionTime: 6166, totalOccurrences: 49 },
          { name: "Survata", category: "analytics", domains: ["*.survata.com"] },
          { name: "SurveyGizmo", category: "analytics", domains: ["*.surveygizmo.eu"], examples: ["www.surveygizmo.eu"] },
          { name: "SurveyMonkey", category: "analytics", domains: ["*.surveymonkey.com"], totalExecutionTime: 28632, totalOccurrences: 250 },
          { name: "Survicate", category: "analytics", domains: ["*.survicate.com"], totalExecutionTime: 933283, totalOccurrences: 3008 },
          { name: "Sweet Tooth", category: "ad", domains: ["*.sweettooth.io"], totalExecutionTime: 2673, totalOccurrences: 41 },
          { name: "Swiftype", category: "utility", domains: ["*.swiftype.com", "*.swiftypecdn.com"], totalExecutionTime: 383638, totalOccurrences: 982 },
          { name: "Switch Concepts", category: "ad", domains: ["*.switchadhub.com"] },
          { name: "SwitchAds", company: "Switch Concepts", category: "ad", domains: ["*.switchads.com"] },
          { name: "Swogo", category: "analytics", domains: ["*.xsellapp.com"] },
          { name: "Swoop", category: "ad", domains: ["*.swoop.com"], totalExecutionTime: 13511, totalOccurrences: 75 },
          { name: "Symantec", category: "utility", domains: ["*.norton.com", "*.symantec.com", "*.symcb.com", "*.symcd.com"], examples: ["extended-validation-ssl.websecurity.symantec.com"], totalExecutionTime: 184600, totalOccurrences: 363 },
          { name: "Syncapse", category: "social", domains: ["*.clickable.net"] },
          { name: "Synergetic", category: "ad", domains: ["*.synergetic.ag"] },
          { name: "Synthetix", category: "customer-success", domains: ["*.syn-finity.com", "*.synthetix-ec1.com", "*.synthetix.com"], examples: ["www.synthetix-ec1.com"], totalExecutionTime: 6284, totalOccurrences: 27 },
          { name: "Syte", category: "other", domains: ["*.syteapi.com"], examples: ["cdn.syteapi.com"], totalExecutionTime: 109749, totalOccurrences: 106 },
          { name: "TINT", category: "content", domains: ["*.71n7.com", "d33w9bm0n1egwm.cloudfront.net", "d36hc0p18k1aoc.cloudfront.net", "d3l7tj34e9fc43.cloudfront.net"], examples: ["www.71n7.com"] },
          { name: "TNS (Kantar Group)", category: "analytics", domains: ["*.tns-counter.ru"] },
          { name: "TRUSTe", category: "utility", domains: ["*.truste.com"], totalExecutionTime: 123425, totalOccurrences: 613 },
          { name: "TV Genius", company: "Ericcson Media Services", category: "content", domains: ["*.tvgenius.net"] },
          { name: "TVSquared", category: "ad", domains: ["*.tvsquared.com"], totalExecutionTime: 548667, totalOccurrences: 4082 },
          { name: "TVTY", category: "ad", domains: ["*.distribeo.com", "*.ogigl.com"] },
          { name: "Tactics bvba", category: "hosting", domains: ["*.influid.co"] },
          { name: "Tag Inspector", company: "InfoTrust", category: "analytics", domains: ["d22xmn10vbouk4.cloudfront.net"], totalExecutionTime: 51386, totalOccurrences: 171 },
          { name: "TagCommander", category: "tag-manager", domains: ["*.commander1.com", "*.tagcommander.com"], totalExecutionTime: 448164, totalOccurrences: 1509 },
          { name: "Tagboard", category: "social", domains: ["*.tagboard.com"], totalExecutionTime: 106499, totalOccurrences: 49 },
          { name: "Taggstar", company: "Taggstar UK", category: "ad", domains: ["*.taggstar.com"], totalExecutionTime: 16168, totalOccurrences: 68 },
          { name: "Tail Target", company: "Tail", category: "ad", domains: ["*.tailtarget.com"], totalExecutionTime: 176612, totalOccurrences: 873 },
          { name: "Tailored", category: "other", domains: ["d24qm7bu56swjs.cloudfront.net", "dw3vahmen1rfy.cloudfront.net", "*.tailored.to"] },
          { name: "Taleo Enterprise Cloud Service", company: "Oracle", category: "content", domains: ["*.taleo.net"], totalExecutionTime: 4178, totalOccurrences: 68 },
          { name: "Talkable", category: "ad", domains: ["*.talkable.com", "d2jjzw81hqbuqv.cloudfront.net"], examples: ["www.talkable.com"], totalExecutionTime: 154019, totalOccurrences: 601 },
          { name: "TapSense", category: "ad", domains: ["*.tapsense.com"] },
          { name: "Tapad", category: "ad", domains: ["*.tapad.com"], totalExecutionTime: 976, totalOccurrences: 54 },
          { name: "Teads", category: "ad", domains: ["*.teads.tv"], totalExecutionTime: 2295585, totalOccurrences: 7565 },
          { name: "Team Internet Tonic", company: "Team Internet", category: "ad", domains: ["*.dntrax.com"] },
          { name: "TechTarget", category: "content", domains: ["*.techtarget.com", "*.ttgtmedia.com"], totalExecutionTime: 11857, totalOccurrences: 24 },
          { name: "Technorati", company: "Synacor", category: "ad", domains: ["*.technoratimedia.com"], totalExecutionTime: 5382653, totalOccurrences: 27186 },
          { name: "Teedhaze", category: "content", domains: ["*.fuel451.com"] },
          { name: "Tell Apart", category: "analytics", domains: ["*.tellapart.com", "*.tellaparts.com"] },
          { name: "Tencent", category: "content", domains: ["*.qq.com", "*.ywxi.net"], totalExecutionTime: 2265040, totalOccurrences: 8726 },
          { name: "Thanx Media", category: "utility", domains: ["*.hawksearch.info"] },
          { name: "Thawte", category: "utility", domains: ["*.thawte.com"], examples: ["ocsp.thawte.com", "seal.thawte.com"], totalExecutionTime: 307, totalOccurrences: 1 },
          { name: "Thesis", category: "analytics", homepage: "https://www.thesistesting.com/", domains: ["*.ttsep.com"], examples: ["thix.ttsep.com"] },
          { name: "The AA", category: "ad", domains: ["*.adstheaa.com"] },
          { name: "The ADEX", category: "ad", domains: ["*.theadex.com"], totalExecutionTime: 13554, totalOccurrences: 129 },
          { name: "The Best Day", category: "social", domains: ["*.thebestday.com"] },
          { name: "The Filter", company: "Exabre", category: "analytics", domains: ["*.thefilter.com"] },
          { name: "The Guardian", category: "analytics", domains: ["*.ophan.co.uk"] },
          { name: "The Hut Group", category: "content", domains: ["*.thcdn.com"], totalExecutionTime: 497181, totalOccurrences: 281 },
          { name: "The Numa Group", category: "other", domains: ["*.hittail.com"] },
          { name: "The Publisher Desk", category: "ad", domains: ["*.206ads.com", "*.publisherdesk.com"] },
          { name: "The Sydney Morning Herald", company: "Fairfax Media", category: "content", domains: ["*.smh.com.au"] },
          { name: "The Wall Street Jounal", category: "content", domains: ["*.wsj.net"], totalExecutionTime: 3036, totalOccurrences: 5 },
          { name: "The Wall Street Journal", category: "content", domains: ["*.marketwatch.com"] },
          { name: "TheFind", category: "content", domains: ["*.thefind.com"] },
          { name: "Thinglink", category: "utility", domains: ["*.thinglink.com"], totalExecutionTime: 2987, totalOccurrences: 53 },
          { name: "Thirdpresence", category: "ad", domains: ["*.thirdpresence.com"] },
          { name: "ThreatMetrix", category: "utility", domains: ["*.online-metrix.net"], totalExecutionTime: 1901757, totalOccurrences: 3530 },
          { name: "Throtle", homepage: "https://throtle.io/", category: "analytics", domains: ["*.thrtle.com", "*.v12group.com"] },
          { name: "TicketMaster", category: "content", domains: ["*.t-x.io", "*.tmcs.net"] },
          { name: "TikTok", company: "ByteDance Ltd", homepage: "https://www.tiktok.com/en/", category: "social", domains: ["*.tiktok.com", "*.ipstatp.com"], examples: ["analytics.tiktok.com", "https://s0.ipstatp.com/ad/business/track-log.js"], totalExecutionTime: 111182189, totalOccurrences: 256224 },
          { name: "Tidio Live Chat", company: "Tidio", homepage: "https://www.tidiochat.com/en/", category: "customer-success", domains: ["*.tidiochat.com"], totalExecutionTime: 26584634, totalOccurrences: 24598 },
          {
            name: "Tiledesk Live Chat",
            company: "Tiledesk SRL",
            homepage: "https://www.tiledesk.com/",
            category: "customer-success",
            domains: ["*.tiledesk.com"],
            examples: ["widget.tiledesk.com"],
            totalExecutionTime: 253744,
            totalOccurrences: 103
          },
          { name: "Time", category: "content", domains: ["*.timeinc.net"] },
          { name: "Time2Perf", category: "ad", domains: ["*.time2perf.com"] },
          { name: "TinyURL", category: "utility", domains: ["*.tinyurl.com"] },
          { name: "Tivo", category: "analytics", domains: ["*.rovicorp.com"] },
          { name: "Tom&Co", category: "hosting", domains: ["*.tomandco.uk"] },
          { name: "Toms Native Ads", company: "Purch", category: "ad", domains: ["*.natoms.com"] },
          { name: "ToneMedia", category: "ad", domains: ["*.clickfuse.com"] },
          { name: "Tonic", company: "Team Internet", category: "ad", domains: ["*.dntx.com"] },
          { name: "Touch Commerce", category: "customer-success", domains: ["*.inq.com", "*.touchcommerce.com"], totalExecutionTime: 12673, totalOccurrences: 74 },
          { name: "ToutApp", category: "ad", domains: ["*.toutapp.com"] },
          { name: "TraceView", company: "Solarwinds", category: "analytics", domains: ["*.tracelytics.com", "d2gfdmu30u15x7.cloudfront.net"] },
          { name: "TrackJS", category: "analytics", domains: ["*.trackjs.com", "d2zah9y47r7bi2.cloudfront.net"], examples: ["usage.trackjs.com"], totalExecutionTime: 2112335, totalOccurrences: 2268 },
          { name: "Tradedoubler", category: "ad", domains: ["*.pvnsolutions.com", "*.tradedoubler.com"], totalExecutionTime: 31870, totalOccurrences: 165 },
          { name: "Tradelab", category: "ad", domains: ["*.tradelab.fr"], totalExecutionTime: 5013, totalOccurrences: 44 },
          { name: "TrafficFactory", category: "ad", domains: ["*.trafficfactory.biz"] },
          { name: "TrafficHunt", category: "ad", domains: ["*.traffichunt.com"] },
          { name: "TrafficStars", category: "ad", domains: ["*.trafficstars.com", "*.tsyndicate.com"], totalExecutionTime: 3435101, totalOccurrences: 7430 },
          { name: "Transifex", category: "utility", domains: ["*.transifex.com"], totalExecutionTime: 193259, totalOccurrences: 546 },
          { name: "Travelex", category: "utility", domains: ["*.travelex.net", "*.travelex.co.uk"], examples: ["api.travelex.net", "travelmoney.travelex.co.uk"] },
          { name: "Travelocity Canada", company: "Travelocity", category: "content", domains: ["*.travelocity.ca"], examples: ["www.travelocity.ca"] },
          { name: "Travelocity USA", company: "Travelocity", category: "content", domains: ["*.travelocity.com"], examples: ["www.travelocity.com"] },
          { name: "Travelzoo", category: "content", domains: ["*.travelzoo.com"] },
          { name: "Treasure Data", category: "analytics", domains: ["*.treasuredata.com"], totalExecutionTime: 1404314, totalOccurrences: 14403 },
          { name: "Tremor Video", category: "ad", domains: ["*.tremorhub.com", "*.videohub.tv"] },
          { name: "Trialfire", category: "analytics", domains: ["*.trialfire.com"], totalExecutionTime: 44579, totalOccurrences: 198 },
          { name: "Tribal Fusion", company: "Exponential Interactive", category: "ad", domains: ["*.tribalfusion.com"], totalExecutionTime: 96569, totalOccurrences: 158016 },
          { name: "Triblio", category: "marketing", domains: ["*.tribl.io"] },
          { name: "Triggered Messaging", company: "Fresh Relevance", category: "ad", domains: ["*.triggeredmessaging.com"] },
          { name: "Trinity Mirror", category: "content", domains: ["*.mirror.co.uk"], totalExecutionTime: 13841, totalOccurrences: 41 },
          { name: "Trinity Mirror Digital Media", category: "social", domains: ["*.tm-aws.com", "*.icnetwork.co.uk"] },
          { name: "TripAdvisor", category: "content", domains: ["*.jscache.com", "*.tacdn.com", "*.tamgrt.com", "*.tripadvisor.com", "*.viator.com", "*.tripadvisor.co.uk"], examples: ["www.jscache.com", "www.tamgrt.com"], totalExecutionTime: 749303, totalOccurrences: 2354 },
          { name: "TripleLift", category: "ad", domains: ["*.3lift.com"], totalExecutionTime: 8396, totalOccurrences: 4812 },
          { name: "Tru Optik", category: "ad", domains: ["*.truoptik.com"] },
          { name: "TruConversion", category: "analytics", domains: ["*.truconversion.com"], totalExecutionTime: 487670, totalOccurrences: 1008 },
          { name: "Trueffect", category: "marketing", domains: ["*.adlegend.com"] },
          {
            name: "Truefit",
            category: "analytics",
            domains: ["*.truefitcorp.com"],
            examples: ["cdn.truefitcorp.com", "fitrec.truefitcorp.com", "sch-cdn.truefitcorp.com"],
            totalExecutionTime: 4647,
            totalOccurrences: 20
          },
          { name: "Trust Guard", category: "utility", domains: ["*.trust-guard.com"], totalExecutionTime: 3346, totalOccurrences: 35 },
          { name: "Trust Pilot", category: "analytics", domains: ["*.trustpilot.com"], totalExecutionTime: 14795265, totalOccurrences: 54942 },
          { name: "Amazon Trust Services", company: "Amazon", category: "utility", domains: ["*.amazontrust.com", "o.ss2.us"], examples: ["ocsp.rootca1.amazontrust.com"], totalExecutionTime: 107, totalOccurrences: 1 },
          { name: "Google Trust Services", company: "Google", category: "utility", domains: ["*.pki.goog"], examples: ["ocsp.pki.goog"], totalExecutionTime: 18, totalOccurrences: 1 },
          { name: "Let's Encrypt", homepage: "https://letsencrypt.org/", category: "utility", domains: ["*.letsencrypt.org"], examples: ["ocsp.int-x3.letsencrypt.org"], totalExecutionTime: 76, totalOccurrences: 3 },
          { name: "TrustX", category: "ad", domains: ["*.trustx.org"] },
          { name: "Trusted Shops", category: "utility", domains: ["*.trustedshops.com"], totalExecutionTime: 7373870, totalOccurrences: 17267 },
          { name: "Trustev", company: "TransUnion", category: "utility", domains: ["*.trustev.com"], totalExecutionTime: 3272, totalOccurrences: 22 },
          { name: "Trustwave", category: "utility", domains: ["*.trustwave.com"], totalExecutionTime: 4600, totalOccurrences: 7 },
          { name: "Tryzens TradeState", company: "Tryzens", category: "analytics", domains: ["*.tryzens-analytics.com"], totalExecutionTime: 969, totalOccurrences: 9 },
          { name: "TubeMogul", category: "ad", domains: ["*.tubemogul.com"], totalExecutionTime: 24151, totalOccurrences: 51 },
          { name: "Turn", category: "ad", domains: ["*.turn.com"], totalExecutionTime: 4802, totalOccurrences: 72 },
          { name: "Tutorialize", category: "customer-success", domains: ["*.tutorialize.me"] },
          { name: "Twenga", category: "content", domains: ["*.twenga.fr", "*.c4tw.net", "*.twenga.co.uk"], examples: ["tracker.twenga.co.uk"] },
          { name: "Twitframe", company: "Superblock", category: "utility", domains: ["*.twitframe.com"] },
          { name: "Twitter Online Conversion Tracking", company: "Twitter", category: "ad", domains: ["*.ads-twitter.com", "analytics.twitter.com"], examples: ["static.ads-twitter.com"], totalExecutionTime: 6170585, totalOccurrences: 73452 },
          { name: "Twitter Short URL", company: "Twitter", category: "social", domains: ["*.t.co"] },
          { name: "Twyn Group", category: "ad", domains: ["*.twyn.com"] },
          { name: "Tynt", company: "33 Across", category: "ad", domains: ["*.tynt.com"], totalExecutionTime: 41643525, totalOccurrences: 212415 },
          { name: "Typepad", category: "hosting", domains: ["*.typepad.com"], totalExecutionTime: 834082, totalOccurrences: 813 },
          { name: "TyrbooBytes", category: "utility", domains: ["*.turbobytes.net"] },
          { name: "UPS i-parcel", company: "UPS", category: "other", domains: ["*.i-parcel.com"] },
          { name: "US Media Consulting", category: "ad", domains: ["*.mediade.sk"] },
          { name: "Ubertags", category: "tag-manager", domains: ["*.ubertags.com"] },
          { name: "Umbel", category: "analytics", domains: ["*.umbel.com"] },
          { name: "Unanimis", company: "Switch", category: "ad", domains: ["*.unanimis.co.uk"] },
          { name: "Unbounce", category: "ad", domains: ["*.ubembed.com", "*.unbounce.com", "d2xxq4ijfwetlm.cloudfront.net", "d9hhrg4mnvzow.cloudfront.net"], totalExecutionTime: 2902422, totalOccurrences: 8808 },
          { name: "Underdog Media", category: "ad", domains: ["*.underdog.media", "*.udmserve.net"], totalExecutionTime: 524141, totalOccurrences: 289 },
          { name: "Understand Digital", category: "ad", domains: ["*.redirecting2.net"] },
          { name: "Undertone", company: "Perion", category: "ad", domains: ["*.legolas-media.com"], examples: ["rt.legolas-media.com"] },
          { name: "Unidays", category: "ad", domains: ["*.myunidays.com", "*.unidays.world"] },
          { name: "Uniqodo", category: "ad", domains: ["*.uniqodo.com"] },
          { name: "Unite", category: "ad", domains: ["*.uadx.com"] },
          { name: "United Card Services", category: "utility", domains: ["*.ucs.su"] },
          { name: "United Internet", category: "hosting", domains: ["*.uicdn.com"], totalExecutionTime: 14225, totalOccurrences: 75 },
          { name: "United Internet Media", category: "ad", domains: ["*.ui-portal.de"], totalExecutionTime: 20307, totalOccurrences: 59 },
          { name: "United Internet Media AG", category: "hosting", domains: ["*.tifbs.net", "*.uicdn.net", "*.uimserv.net"], totalExecutionTime: 1737, totalOccurrences: 48 },
          { name: "Unknown", category: "other", domains: [] },
          { name: "Unruly Media", category: "ad", domains: ["*.unrulymedia.com"], totalExecutionTime: 679, totalOccurrences: 1789 },
          { name: "UpBuild", category: "ad", domains: ["*.upbuild.io"], examples: ["www.upbuild.io"] },
          { name: "UpSellit", category: "analytics", domains: ["*.upsellit.com"], examples: ["www.upsellit.com"], totalExecutionTime: 289920, totalOccurrences: 1013 },
          {
            name: "Upland Software",
            category: "hosting",
            domains: ["*.clickability.com"]
          },
          { name: "Airship", category: "marketing", domains: ["*.urbanairship.com", "*.aswpsdkus.com"], totalExecutionTime: 4666, totalOccurrences: 37 },
          { name: "UsabilityTools", category: "analytics", domains: ["*.usabilitytools.com"] },
          { name: "Usablenet.net", category: "utility", domains: ["*.usablenet.net"] },
          { name: "Use It Better", category: "analytics", domains: ["*.useitbetter.com"] },
          { name: "User Replay", category: "analytics", domains: ["*.userreplay.net"] },
          { name: "UserReport", category: "analytics", domains: ["*.userreport.com"], totalExecutionTime: 133479, totalOccurrences: 476 },
          { name: "Userneeds", category: "analytics", domains: ["*.userneeds.dk"] },
          { name: "Userzoom", category: "analytics", domains: ["*.userzoom.com"], totalExecutionTime: 5093, totalOccurrences: 4 },
          { name: "V12 Retail Finance", category: "utility", domains: ["*.v12finance.com"] },
          { name: "Vacaciones eDreams", category: "content", domains: ["*.odistatic.net"] },
          { name: "Varick Media Management", category: "ad", domains: ["*.vmmpxl.com"] },
          { name: "Vdopia Chocolate", company: "Vdopia", category: "ad", domains: ["*.vdopia.com"] },
          { name: "Ve", company: "Ve", homepage: "https://www.ve.com/", category: "marketing", domains: ["*.veinteractive.com", "*.ve.com"] },
          { name: "Ve Interactive", company: "Ve", category: "ad", domains: ["*.vepxl1.net", "*.adgenie.co.uk"] },
          { name: "Vee24", category: "customer-success", domains: ["*.vee24.com"], totalExecutionTime: 20941, totalOccurrences: 38 },
          { name: "Veeseo", category: "content", domains: ["*.veeseo.com"] },
          { name: "Venatus Media", category: "marketing", domains: ["*.alcvid.com", "*.venatusmedia.com"] },
          { name: "Veoxa", category: "ad", domains: ["*.veoxa.com"] },
          { name: "Vergic AB", category: "customer-success", domains: ["*.psplugin.com"], totalExecutionTime: 48232, totalOccurrences: 71 },
          { name: "Vergic Engage Platform", company: "Vergic", category: "customer-success", domains: [
            "*.vergic.com"
          ], totalExecutionTime: 41524, totalOccurrences: 57 },
          { name: "Verisign (Symantec)", category: "utility", domains: ["*.verisign.com"] },
          { name: "Verizon", category: "utility", domains: ["*.public-trust.com"], examples: ["www.public-trust.com"] },
          { name: "Verizon Digital Media CDN", homepage: "https://www.verizondigitalmedia.com/", category: "cdn", domains: ["*.edgecastcdn.net", "*.edgecastdns.net"], totalExecutionTime: 98698, totalOccurrences: 108 },
          { name: "Verizon Uplynk", company: "Verizon", category: "content", domains: ["*.uplynk.com"], totalExecutionTime: 572, totalOccurrences: 4 },
          { name: "Vero", company: "Semblance", category: "ad", domains: ["*.getvero.com", "d3qxef4rp70elm.cloudfront.net"], totalExecutionTime: 613, totalOccurrences: 10 },
          { name: "VertaMedia", category: "ad", domains: ["*.vertamedia.com"] },
          { name: "Vertical Mass", category: "ad", domains: ["*.vmweb.net"] },
          { name: "Vestorly", category: "ad", domains: ["*.oodalab.com"] },
          { name: "Vextras", category: "other", domains: ["*.vextras.com"], totalExecutionTime: 4484, totalOccurrences: 42 },
          { name: "Viacom", category: "content", domains: ["*.mtvnservices.com"], totalExecutionTime: 15501, totalOccurrences: 44 },
          { name: "Vibrant Media", category: "ad", domains: ["*.intellitxt.com", "*.picadmedia.com"] },
          { name: "VidPulse", category: "analytics", domains: ["*.vidpulse.com"] },
          { name: "Video Media Groep", category: "ad", domains: ["*.vmg.host", "*.inpagevideo.nl"] },
          { name: "VideoHub", company: "Tremor Video", category: "ad", domains: ["*.scanscout.com"], examples: ["dt.scanscout.com"] },
          { name: "Videology", category: "ad", domains: ["*.tidaltv.com"] },
          { name: "Vidible", category: "ad", domains: ["*.vidible.tv"] },
          { name: "VigLink", category: "ad", domains: ["*.viglink.com"], totalExecutionTime: 3670311, totalOccurrences: 6219 },
          { name: "Vindico", company: "Viant", category: "ad", domains: ["*.vindicosuite.com"] },
          {
            name: "Viocorp International",
            category: "content",
            domains: ["*.vioapi.com"]
          },
          { name: "ViralNinjas", category: "ad", domains: ["*.viralninjas.com"] },
          { name: "Virool", category: "ad", domains: ["*.virool.com"] },
          { name: "Virtual Earth", company: "Microsoft", category: "utility", domains: ["*.virtualearth.net"], totalExecutionTime: 54315, totalOccurrences: 312 },
          { name: "Visely", company: "Visely", category: "other", homepage: "https://visely.io/", domains: ["*.visely.io"] },
          { name: "VisScore", category: "analytics", domains: ["*.visscore.com", "d2hkbi3gan6yg6.cloudfront.net"] },
          { name: "Visible Measures", category: "ad", domains: ["*.visiblemeasures.com"], totalExecutionTime: 11, totalOccurrences: 13 },
          { name: "Visual Studio", company: "Microsoft", category: "utility", domains: ["*.visualstudio.com"], totalExecutionTime: 3464, totalOccurrences: 3 },
          { name: "VisualDNA", category: "ad", domains: ["*.visualdna.com"] },
          { name: "VisualVisitor", category: "ad", domains: ["*.id-visitors.com"], examples: ["frontend.id-visitors.com"], totalExecutionTime: 871, totalOccurrences: 14 },
          { name: "Vivocha S.p.A", category: "customer-success", domains: ["*.vivocha.com"], totalExecutionTime: 65471, totalOccurrences: 38 },
          { name: "Vizu (Nielsen)", category: "analytics", domains: ["*.vizu.com"] },
          { name: "Vizury", category: "ad", domains: ["*.vizury.com"], totalExecutionTime: 1296, totalOccurrences: 20 },
          { name: "VoiceFive", category: "analytics", domains: ["*.voicefive.com"] },
          { name: "Volvelle", company: "Optomaton", category: "ad", domains: ["*.volvelle.tech"] },
          { name: "VouchedFor", category: "analytics", domains: ["*.vouchedfor.co.uk"], totalExecutionTime: 30557, totalOccurrences: 18 },
          { name: "WARPCACHE", category: "utility", domains: ["*.warpcache.net"] },
          { name: "WISHLIST", company: "Shopapps", category: "social", domains: ["*.shopapps.in"] },
          { name: "WP Engine", category: "hosting", domains: ["*.wpengine.com"], totalExecutionTime: 651034, totalOccurrences: 341 },
          { name: "WalkMe", category: "customer-success", domains: ["*.walkme.com"], totalExecutionTime: 636459, totalOccurrences: 495 },
          { name: "Watching That", category: "other", domains: ["*.watchingthat.com"] },
          { name: "Wayfair", category: "analytics", domains: ["*.wayfair.com"], examples: ["t.wayfair.com"] },
          { name: "Web CEO", category: "other", domains: ["*.websiteceo.com"], examples: ["www.websiteceo.com"] },
          { name: "Web Dissector", company: "Beijing Gridsum Technologies", category: "analytics", domains: ["*.gridsumdissector.com", "*.webdissector.com"], examples: ["www.webdissector.com"] },
          { name: "Web Forensics", category: "analytics", domains: ["*.webforensics.co.uk"] },
          { name: "Web Security and Performance", company: "NCC Group", category: "utility", domains: ["*.nccgroup.trust"] },
          { name: "WebEngage", category: "customer-success", domains: ["*.webengage.co", "*.webengage.com", "d23nd6ymopvz52.cloudfront.net", "d3701cc9l7v9a6.cloudfront.net"], totalExecutionTime: 789975, totalOccurrences: 2283 },
          { name: "WebInsight", company: "dotMailer", category: "analytics", domains: ["*.trackedlink.net", "*.trackedweb.net"], totalExecutionTime: 21241, totalOccurrences: 277 },
          { name: "WebPageOne Solutions", category: "other", domains: ["*.webpageone.com"] },
          { name: "WebSpectator", category: "ad", domains: ["*.webspectator.com"] },
          { name: "WebTuna", company: "Application Performance", category: "analytics", domains: ["*.webtuna.com"] },
          { name: "WebVideoCore", company: "StreamingVideoProvider", category: "content", domains: ["*.webvideocore.net"], totalExecutionTime: 74152, totalOccurrences: 38 },
          { name: "WebWombat", category: "utility", domains: ["*.ic.com.au"] },
          { name: "Webcollage", category: "customer-success", domains: ["*.webcollage.net"] },
          { name: "Webcore", category: "ad", domains: ["*.onefeed.co.uk"] },
          { name: "Webkul", company: "Webkul Software", category: "utility", domains: ["*.webkul.com"], totalExecutionTime: 172788, totalOccurrences: 490 },
          { name: "Webmarked", category: "utility", domains: ["*.webmarked.net"], totalExecutionTime: 72467, totalOccurrences: 1077 },
          { name: "Weborama", category: "ad", domains: ["*.weborama.com", "*.weborama.fr"], totalExecutionTime: 45883, totalOccurrences: 372 },
          { name: "WebpageFX", category: "ad", domains: ["*.leadmanagerfx.com"], totalExecutionTime: 241118, totalOccurrences: 946 },
          { name: "Webphone", company: "IP WEB SERVICES", category: "customer-success", domains: ["*.webphone.net"], totalExecutionTime: 4605, totalOccurrences: 20 },
          { name: "Webselect selectcommerce", company: "Webselect Internet", category: "hosting", domains: ["*.webselect.net"] },
          { name: "Webthinking", category: "hosting", domains: ["*.webthinking.co.uk"] },
          { name: "Webtrekk", category: "analytics", domains: ["*.wbtrk.net", "*.webtrekk-asia.net", "*.webtrekk.net", "*.wt-eu02.net", "*.wt-safetag.com"], totalExecutionTime: 85572, totalOccurrences: 428 },
          { name: "Webtrends", category: "analytics", domains: ["*.webtrends.com", "*.webtrendslive.com", "d1q62gfb8siqnm.cloudfront.net"], totalExecutionTime: 1437, totalOccurrences: 6 },
          { name: "Webtype", category: "cdn", domains: ["*.webtype.com"], totalExecutionTime: 0, totalOccurrences: 1 },
          { name: "White Ops", category: "utility", domains: ["*.acexedge.com", "*.tagsrvcs.com"] },
          { name: "Whitespace", category: "ad", domains: ["*.whitespacers.com"] },
          { name: "WhosOn Live Chat Software", category: "customer-success", domains: ["*.whoson.com"], totalExecutionTime: 20753, totalOccurrences: 112 },
          { name: "Wibbitz", category: "other", domains: ["*.wibbitz.com"] },
          { name: "Wide Area Communications", category: "hosting", domains: ["*.widearea.co.uk"] },
          { name: "WideOrbit", category: "marketing", domains: ["*.admaym.com"] },
          { name: "William Reed", category: "content", domains: ["*.wrbm.com"], totalExecutionTime: 50, totalOccurrences: 1 },
          { name: "WillyFogg.com", category: "content", domains: ["*.willyfogg.com"] },
          { name: "Windows", company: "Microsoft", category: "utility", domains: ["*.windowsupdate.com"], examples: [
            "ctldl.windowsupdate.com"
          ] },
          { name: "WisePops", category: "utility", domains: ["*.wisepops.com"], totalExecutionTime: 2631328, totalOccurrences: 1950 },
          { name: "Wishlist King", company: "Appmate", category: "other", homepage: "https://appmate.io/", domains: ["*.appmate.io"], examples: ["api.appmate.io"], totalExecutionTime: 130543, totalOccurrences: 235 },
          { name: "Wishpond Technologies", category: "marketing", domains: ["*.wishpond.com", "*.wishpond.net"], totalExecutionTime: 771888, totalOccurrences: 1691 },
          { name: "WizRocket Technologies", category: "analytics", domains: ["*.wzrkt.com"], totalExecutionTime: 138, totalOccurrences: 2 },
          { name: "Woopra", category: "analytics", domains: ["*.woopra.com"], totalExecutionTime: 120767, totalOccurrences: 1366 },
          { name: "Woosmap", category: "utility", domains: ["*.woosmap.com"], totalExecutionTime: 58710, totalOccurrences: 139 },
          { name: "WorkCast", category: "hosting", domains: ["*.workcast.net"] },
          { name: "World News Media", category: "content", domains: ["*.wnmedia.co.uk"] },
          { name: "Worldpay", category: "utility", domains: ["*.worldpay.com"], totalExecutionTime: 25852, totalOccurrences: 18 },
          { name: "Wow Analytics", category: "analytics", domains: ["*.wowanalytics.co.uk"], totalExecutionTime: 11162, totalOccurrences: 73 },
          { name: "Wowcher", category: "ad", domains: ["*.wowcher.co.uk"] },
          { name: "Wufoo", category: "utility", domains: ["*.wufoo.com"], totalExecutionTime: 381206, totalOccurrences: 1507 },
          { name: "Wunderkind", category: "marketing", homepage: "https://www.wunderkind.co/", domains: ["*.bounceexchange.com", "*.bouncex.net", "*.wknd.ai", "*.cdnbasket.net", "*.cdnwidget.com"], examples: ["events.bouncex.net", "tag.wknd.ai", "data.cdnbasket.net", "pix.cdnwidget.com"], totalExecutionTime: 2016506, totalOccurrences: 1278 },
          { name: "Wyng", category: "ad", domains: ["*.offerpop.com"] },
          { name: "XMLSHOP", category: "hosting", domains: ["*.xmlshop.biz"] },
          { name: "XiTi", company: "AT Internet", category: "analytics", domains: ["*.xiti.com", "*.aticdn.net"], homepage: "https://www.atinternet.com/en/", examples: ["tag.aticdn.net/123456789/smarttag.js"], totalExecutionTime: 918257, totalOccurrences: 8483 },
          { name: "YUDU", category: "content", domains: ["*.yudu.com"] },
          { name: "Yahoo! Ad Exchange", company: "Yahoo!", category: "ad", domains: ["*.yieldmanager.com", "*.browsiprod.com"], examples: ["yield-manager.browsiprod.com"], totalExecutionTime: 12720569, totalOccurrences: 4994 },
          { name: "Yahoo! JAPAN Ads", company: "Yahoo! JAPAN", category: "ad", homepage: "https://marketing.yahoo.co.jp/service/yahooads/", domains: ["yads.c.yimg.jp", "s.yimg.jp", "b92.yahoo.co.jp"], examples: ["yads.c.yimg.jp/js/yads-async.js", "s.yimg.jp/images/listing/tool/yads/ydn/creative/video/ytop_video_timeline_sp.min.js", "b92.yahoo.co.jp/js/s_retargeting.js"], totalExecutionTime: 6236624, totalOccurrences: 37464 },
          { name: "Yahoo! Tag Manager", company: "Yahoo! JAPAN", category: "tag-manager", homepage: "https://marketing.yahoo.co.jp/service/tagmanager/", domains: ["*.yjtag.jp"], examples: ["s.yjtag.jp/tag.js"] },
          { name: "Yahoo! Small Business", company: "Yahoo!", category: "hosting", domains: ["*.aabacosmallbusiness.com"] },
          { name: "Yellow Robot", category: "ad", domains: ["*.backinstock.org"], totalExecutionTime: 15268, totalOccurrences: 508 },
          { name: "YieldPartners", category: "ad", domains: ["*.yieldpartners.com"] },
          { name: "Yieldbot", category: "ad", domains: ["*.yldbt.com"] },
          { name: "Yieldify", category: "ad", domains: ["*.yieldify.com", "*.yieldifylabs.com", "d33wq5gej88ld6.cloudfront.net", "dwmvwp56lzq5t.cloudfront.net"], examples: ["geo.yieldifylabs.com"], totalExecutionTime: 513761, totalOccurrences: 168 },
          { name: "Yieldlab", category: "ad", domains: ["*.yieldlab.net"], totalExecutionTime: 54, totalOccurrences: 8 },
          { name: "Yieldmo", category: "ad", domains: ["*.yieldmo.com"], totalExecutionTime: 51128, totalOccurrences: 2375 },
          { name: "Yieldr", category: "ad", domains: [
            "*.254a.com"
          ] },
          { name: "Yo", category: "utility", domains: ["*.yopify.com"] },
          { name: "YoYo", category: "utility", domains: ["*.goadservices.com"] },
          { name: "Yotpo", homepage: "https://www.yotpo.com/", category: "marketing", domains: ["*.yotpo.com", "*.swellrewards.com"], totalExecutionTime: 16919447, totalOccurrences: 26094 },
          { name: "Yottaa", category: "hosting", domains: ["*.yottaa.com", "*.yottaa.net"], totalExecutionTime: 798791, totalOccurrences: 753 },
          { name: "YourAmigo", category: "utility", domains: ["*.youramigo.com"] },
          { name: "YuMe", category: "ad", domains: ["*.yume.com", "*.yumenetworks.com"], examples: ["cks.yumenetworks.com"] },
          { name: "Yummley", category: "other", domains: ["*.yummly.com"], totalExecutionTime: 14163, totalOccurrences: 6 },
          { name: "ZEDO", category: "ad", domains: ["*.zedo.com"] },
          { name: "Zafu", category: "analytics", domains: ["*.zafu.com"] },
          { name: "Zaius", category: "ad", domains: ["*.zaius.com"] },
          {
            name: "Zamplus ad",
            category: "ad",
            domains: ["*.zampda.net"]
          },
          { name: "Zanox", category: "ad", domains: ["*.zanox.com", "*.zanox.ws"] },
          { name: "Zapper", category: "utility", domains: ["*.zapper.com"] },
          { name: "Zarget", category: "analytics", domains: ["*.zarget.com"] },
          { name: "Zemanta", category: "ad", domains: ["*.zemanta.com"], totalExecutionTime: 2735, totalOccurrences: 28 },
          { name: "Zen Internet", category: "other", domains: ["*.zyen.com"] },
          { name: "Zenovia Digital Exchange", category: "ad", domains: ["*.rhythmxchange.com", "*.zenoviaexchange.com"] },
          { name: "ZergNet", category: "content", domains: ["*.zergnet.com"], totalExecutionTime: 186, totalOccurrences: 4 },
          { name: "Zerogrey", category: "hosting", domains: ["*.zerogrey.com"] },
          { name: "Ziff Davis Tech", category: "ad", domains: ["*.adziff.com", "*.zdbb.net"], totalExecutionTime: 30706, totalOccurrences: 93 },
          { name: "Zmags", category: "marketing", domains: ["*.zmags.com"], totalExecutionTime: 262514, totalOccurrences: 119 },
          {
            name: "Zolando",
            category: "content",
            domains: ["*.ztat.net"],
            totalExecutionTime: 229623,
            totalOccurrences: 48
          },
          { name: "Zoover", category: "analytics", domains: ["*.zoover.nl", "*.zoover.co.uk"], totalExecutionTime: 9173, totalOccurrences: 2 },
          { name: "Zopim", category: "customer-success", domains: ["*.zopim.io"] },
          { name: "[24]7", category: "customer-success", domains: ["*.247-inc.net", "*.247inc.net", "d1af033869koo7.cloudfront.net"], totalExecutionTime: 24965, totalOccurrences: 20 },
          { name: "adKernel", category: "ad", domains: ["*.adkernel.com"], totalExecutionTime: 19140, totalOccurrences: 9621 },
          { name: "adMarketplace", company: "AMPexchange", category: "ad", domains: ["*.ampxchange.com", "*.admarketplace.net"] },
          { name: "addtocalendar", category: "utility", domains: ["*.addtocalendar.com"] },
          { name: "adnanny", category: "ad", domains: ["*.adserver01.de"], totalExecutionTime: 2, totalOccurrences: 6 },
          { name: "affilinet", category: "ad", domains: ["*.reussissonsensemble.fr", "*.successfultogether.co.uk"] },
          { name: "audioBoom", category: "social", domains: ["*.audioboom.com", "*.audioboo.fm"], totalExecutionTime: 136729, totalOccurrences: 57 },
          { name: "bPay by Barclaycard", company: "Barclays Bank", category: "utility", domains: ["*.bpay.co.uk"] },
          { name: "bRealTime", category: "ad", domains: ["*.brealtime.com"], totalExecutionTime: 4479, totalOccurrences: 76 },
          { name: "bd4travel", category: "analytics", domains: ["*.bd4travel.com"] },
          { name: "bizinformation-VOID", company: "bizinformation", category: "analytics", domains: ["*.bizinformation.org"] },
          { name: "carrot", category: "social", domains: ["*.sharebutton.co"] },
          { name: "cloudIQ", category: "analytics", domains: ["*.cloud-iq.com"] },
          { name: "comScore", category: "analytics", domains: ["*.adxpose.com", "*.comscore.com", "*.sitestat.com", "*.zqtk.net"], totalExecutionTime: 4938, totalOccurrences: 3 },
          { name: "content.ad", category: "ad", domains: ["*.content.ad"] },
          { name: "d3 Media", company: "d3 Technologies", category: "other", domains: ["*.d3sv.net"] },
          { name: "dexiMEDIA", category: "ad", domains: ["*.deximedia.com"] },
          { name: "dianomi", category: "ad", domains: ["*.dianomi.com", "*.dianomioffers.co.uk"], totalExecutionTime: 52461, totalOccurrences: 86 },
          { name: "donReach", category: "social", domains: ["*.donreach.com"] },
          { name: "dotMailer", category: "ad", domains: ["*.dmtrk.com", "*.dotmailer.com", "*.emlfiles.com"] },
          { name: "dotMailer Surveys", company: "dotMailer", category: "analytics", domains: ["*.dotmailer-surveys.com"] },
          { name: "dstillery", category: "ad", domains: ["*.dstillery.com", "*.media6degrees.com"], totalExecutionTime: 1160, totalOccurrences: 12 },
          { name: "eBay", category: "ad", domains: ["*.ebay.com", "*.ebayimg.com", "*.fetchback.com"], totalExecutionTime: 600826, totalOccurrences: 1026 },
          { name: "eBay Enterprise", category: "hosting", domains: ["*.csdata1.com", "*.gsipartners.com"] },
          { name: "eBuzzing", company: "Teads Managed Services", category: "ad", domains: ["*.ebz.io"] },
          { name: "eDigital Research", category: "customer-success", domains: ["*.edigitalresearch.com", "*.edigitalsurvey.com", "*.edrcdn.com", "*.ecustomeropinions.com"] },
          { name: "eGain", category: "analytics", domains: ["*.analytics-egain.com", "*.egain.com"], totalExecutionTime: 8418, totalOccurrences: 74 },
          { name: "eHost", category: "hosting", domains: ["*.ehosts.net"] },
          { name: "eKomi", category: "analytics", domains: ["*.ekomi.com", "*.ekomi.de"], totalExecutionTime: 51192, totalOccurrences: 17 },
          { name: "eWAY", company: "Web Active Pty", category: "utility", domains: ["*.eway.com.au"], examples: ["www.eway.com.au"], totalExecutionTime: 11094, totalOccurrences: 1 },
          { name: "eXTReMe digital", category: "analytics", domains: ["*.extreme-dm.com"], totalExecutionTime: 3491, totalOccurrences: 78 },
          { name: "eXelate", category: "ad", domains: ["*.exelator.com"], totalExecutionTime: 17905, totalOccurrences: 246 },
          { name: "ecommercefeed.net", category: "marketing", domains: ["*.ecommercefeed.net"] },
          { name: "engage:BDR", category: "ad", domains: ["*.bnmla.com", "*.ebdr3.com"] },
          { name: "epago", category: "ad", domains: ["*.adaos-ads.net"] },
          { name: "epoq internet services", category: "analytics", domains: ["*.epoq.de"], totalExecutionTime: 84260, totalOccurrences: 122 },
          { name: "etouches", category: "hosting", domains: ["*.etouches.com"], examples: ["www.etouches.com"] },
          { name: "etracker", category: "analytics", domains: ["*.etracker.com", "*.etracker.de"], examples: ["www.etracker.com"], totalExecutionTime: 2076262, totalOccurrences: 5626 },
          { name: "everestads.com", category: "content", domains: ["*.verestads.net"] },
          { name: "exebid.DCA", company: "Data-Centric Alliance", category: "ad", domains: ["*.exe.bid"] },
          { name: "eyeReturn Marketing", category: "marketing", domains: ["*.eyereturn.com"] },
          { name: "feedoptimise", category: "hosting", domains: ["*.feedoptimise.com", "d1w78njrm56n7g.cloudfront.net"], totalExecutionTime: 126, totalOccurrences: 2 },
          { name: "fifty-five", category: "ad", domains: ["*.55labs.com"] },
          { name: "fluct", category: "ad", domains: ["*.adingo.jp"], totalExecutionTime: 5114249, totalOccurrences: 12890 },
          { name: "freegeoip.net", company: "(community-funded)", category: "utility", domains: ["*.freegeoip.net"] },
          { name: "freewheel.tv", category: "content", domains: ["*.fwmrm.net"], totalExecutionTime: 3847, totalOccurrences: 42 },
          { name: "gnatta", category: "customer-success", domains: ["*.gnatta.com"] },
          { name: "home.pl", category: "hosting", domains: ["*.nscontext.eu"] },
          { name: "hyfn", category: "ad", domains: ["*.hyfn.com"] },
          { name: "iAdvize SAS", category: "customer-success", domains: ["*.iadvize.com"], totalExecutionTime: 286995, totalOccurrences: 844 },
          { name: "iBillboard", category: "ad", domains: ["*.ibillboard.com"], totalExecutionTime: 303, totalOccurrences: 2 },
          { name: "iCrossing", category: "ad", domains: ["*.ic-live.com"] },
          { name: "iFactory", company: "RDW Group", category: "hosting", domains: ["*.ifactory.com"] },
          { name: "iGoDigital", category: "analytics", domains: ["*.igodigital.com"], totalExecutionTime: 1800, totalOccurrences: 21 },
          { name: "iJento", company: "Fopsha", category: "ad", domains: ["*.ijento.com"] },
          { name: "iPage", category: "hosting", domains: ["*.ipage.com"], examples: ["www.ipage.com"], totalExecutionTime: 490, totalOccurrences: 6 },
          { name: "iPerceptions", category: "customer-success", domains: ["*.iperceptions.com"], totalExecutionTime: 626044, totalOccurrences: 4662 },
          { name: "iTunes", company: "Apple", category: "content", domains: ["*.mzstatic.com"] },
          { name: "imgix", company: "Zebrafish Labs", category: "utility", domains: ["*.imgix.net"], totalExecutionTime: 40073, totalOccurrences: 98 },
          { name: "infogr.am", category: "utility", domains: ["*.infogr.am", "*.jifo.co"], totalExecutionTime: 2008949, totalOccurrences: 233 },
          { name: "iotec", category: "analytics", domains: ["*.dsp.io"] },
          { name: "iovation", category: "utility", domains: [
            "*.iesnare.com"
          ], totalExecutionTime: 270232, totalOccurrences: 2159 },
          { name: "ipinfo.io", category: "utility", domains: ["*.ipinfo.io"] },
          { name: "issuu", category: "content", domains: ["*.issuu.com", "*.isu.pub"], totalExecutionTime: 5607951, totalOccurrences: 2714 },
          { name: "iubenda", category: "utility", domains: ["*.iubenda.com"], examples: ["www.iubenda.com"], totalExecutionTime: 69911073, totalOccurrences: 97074 },
          { name: "j2 Cloud Services", category: "ad", domains: ["*.campaigner.com"], totalExecutionTime: 12708, totalOccurrences: 28 },
          { name: "jsonip.com", category: "analytics", domains: ["*.jsonip.com"] },
          { name: "linkpulse", category: "analytics", domains: ["*.lp4.io"] },
          { name: "loGo_net", category: "analytics", domains: ["*.logo-net.co.uk"] },
          { name: "mainADV", category: "ad", domains: ["*.httptrack.com", "*.solocpm.com"] },
          { name: "mbr targeting", category: "ad", domains: ["*.m6r.eu"], totalExecutionTime: 17, totalOccurrences: 1 },
          { name: "media.ventive", category: "ad", domains: ["*.contentspread.net"] },
          { name: "metrigo", category: "ad", domains: ["*.metrigo.com"] },
          { name: "minicabit.com", category: "content", domains: ["*.minicabit.com"] },
          { name: "mobiManage", category: "hosting", domains: ["*.mobimanage.com"] },
          { name: "moving-pictures", category: "other", domains: ["*.moving-pictures.biz", "*.v6-moving-pictures.com", "*.vtstat.com", "*.moving-pictures.de"] },
          { name: "my6sense", category: "ad", domains: ["*.mynativeplatform.com"] },
          { name: "myThings", category: "ad", domains: ["*.mythings.com", "*.mythingsmedia.net"] },
          { name: "mymovies", category: "content", domains: ["*.mymovies.net"] },
          { name: "nRelate-VOID", company: "nRelate", category: "content", domains: ["*.nrelate.com"] },
          { name: "nToklo", category: "analytics", domains: ["*.ntoklo.com"] },
          { name: "neXeps", category: "ad", domains: ["*.nexeps.com"] },
          { name: "ninemsn Pty.", category: "utility", domains: ["*.ninemsn.com.au"] },
          { name: "nugg.ad", category: "ad", domains: [
            "*.nuggad.net"
          ] },
          { name: "numero interactive", company: "numero", category: "ad", domains: ["*.numerointeractive.com"] },
          { name: "optMD", company: "Optimax Media Delivery", category: "ad", domains: ["*.optmd.com"] },
          { name: "otracking.com", category: "analytics", domains: ["*.otracking.com"] },
          { name: "paysafecard", company: "Paysafe Group", category: "utility", domains: ["*.paysafecard.com"] },
          { name: "piano", category: "ad", domains: ["*.npttech.com", "*.tinypass.com"], examples: ["www.npttech.com"], totalExecutionTime: 1016108, totalOccurrences: 1146 },
          { name: "piclike", category: "ad", domains: ["*.piclike.us"] },
          { name: "placehold.it", category: "utility", domains: ["*.placehold.it"] },
          { name: "plista", category: "ad", domains: ["*.plista.com"] },
          { name: "prebid.org", category: "utility", domains: ["*.prebid.org"], totalExecutionTime: 462, totalOccurrences: 1 },
          { name: "reEmbed", category: "other", domains: ["*.reembed.com"] },
          { name: "reddit", category: "social", domains: [
            "*.reddit.com",
            "*.redditstatic.com"
          ], examples: ["www.redditstatic.com"], totalExecutionTime: 4113522, totalOccurrences: 18483 },
          { name: "rewardStyle.com", category: "ad", domains: ["*.rewardstyle.com"], totalExecutionTime: 280999, totalOccurrences: 1491 },
          { name: "rss2json", category: "utility", domains: ["*.rss2json.com"], totalExecutionTime: 1380, totalOccurrences: 18 },
          { name: "sage Pay", company: "Sage Pay Europe", category: "utility", domains: ["*.sagepay.com"], totalExecutionTime: 4481, totalOccurrences: 40 },
          { name: "section.io", category: "utility", domains: ["*.squixa.net"], examples: ["beacon.squixa.net", "s.squixa.net"] },
          { name: "smartclip", category: "ad", domains: ["*.smartclip.net"], totalExecutionTime: 41051, totalOccurrences: 21 },
          { name: "sovrn", category: "ad", domains: ["*.lijit.com"], totalExecutionTime: 2389059, totalOccurrences: 27306 },
          { name: "stackpile.io", company: "StackPile", category: "tag-manager", domains: ["*.stackpile.io"] },
          { name: "template-help.com", category: "hosting", domains: ["*.template-help.com"], totalExecutionTime: 16016, totalOccurrences: 13 },
          { name: "test", company: "test only", category: "other", domains: ["*.testtesttest.com"] },
          { name: "trueAnthem", category: "social", domains: ["*.tru.am"] },
          { name: "tweetmeme-VOID", company: "tweetmeme", category: "analytics", domains: ["*.tweetmeme.com"] },
          { name: "uLogin", category: "other", domains: ["*.ulogin.ru"] },
          { name: "uLogix", category: "ad", domains: ["*.ulogix.ru"] },
          { name: "ucfunnel ucX", company: "ucfunnel", category: "ad", domains: ["*.aralego.com"], totalExecutionTime: 1469345, totalOccurrences: 7945 },
          { name: "up-value", category: "ad", domains: ["*.up-value.de"] },
          { name: "wywy", category: "ad", domains: ["*.wywy.com", "*.wywyuserservice.com"] },
          {
            name: "CDK Dealer Management",
            company: "CDK Global",
            homepage: "https://www.cdkglobal.com/us",
            category: "hosting",
            domains: ["*.assets-cdk.com"],
            examples: ["media-cf.assets-cdk.com"],
            totalExecutionTime: 1052,
            totalOccurrences: 4
          },
          { name: "fam", company: "Fing Co Ltd.", homepage: "http://admin.fam-ad.com/report/", category: "ad", domains: ["*.fam-ad.com"], examples: ["img.fam-ad.com"], totalExecutionTime: 1816, totalOccurrences: 10 },
          { name: "zypmedia", category: "ad", domains: ["*.extend.tv"] },
          { name: "codigo", homepage: "https://www.codigo.se", category: "analytics", domains: ["*.codigo.se"], examples: ["analytics.codigo.se"], totalExecutionTime: 469, totalOccurrences: 10 },
          { name: "Playground", homepage: "https://playground.xyz", category: "ad", domains: ["*.playground.xyz"], examples: ["ads.playground.xyz"], totalExecutionTime: 2767, totalOccurrences: 26 },
          { name: "RAM", homepage: "https://www2.rampanel.com/", category: "analytics", domains: ["*.rampanel.com"], examples: ["inviso.rampanel.com"], totalExecutionTime: 15413, totalOccurrences: 1 },
          { name: "Adition", homepage: "https://www.adition.com", category: "ad", domains: ["*.adition.com"], examples: ["dsp.adfarm1.adition.com"], totalExecutionTime: 74399, totalOccurrences: 491 },
          { name: "Widespace", homepage: "https://www.widespace.com", category: "ad", domains: ["*.widespace.com"], examples: ["sync.widespace.com"] },
          { name: "Colpirio", homepage: "https://www.widespace.com", category: "analytics", domains: ["*.colpirio.com"], examples: ["proxy-tracker.colpirio.com"] },
          { name: "Brandmetrics", homepage: "https://www.brandmetrics.com", category: "analytics", domains: ["*.brandmetrics.com"], examples: ["collector.brandmetrics.com", "cdn.brandmetrics.com"], totalExecutionTime: 3689914, totalOccurrences: 30850 },
          { name: "EasyAd", homepage: "https://web.easy-ads.com/", category: "ad", domains: ["*.easy-ads.com"], examples: ["ads.easy-ads.com"] },
          { name: "Glimr", homepage: "https://glimr.io/", category: "analytics", domains: ["*.glimr.io"], examples: ["pixel.glimr.io"] },
          { name: "Webtreck", homepage: "https://www.webtrekk.com/en/home/", category: "analytics", domains: ["*.wcfbc.net"], examples: ["fbc.wcfbc.net"] },
          { name: "DigiTrust", homepage: "http://www.digitru.st/", category: "analytics", domains: ["*.digitru.st"], examples: ["cdn.digitru.st"] },
          { name: "Kantar Sifo", homepage: "https://www.kantarsifo.se", category: "analytics", domains: ["*.research-int.se"], examples: ["trafficgateway.research-int.se"], totalExecutionTime: 375, totalOccurrences: 1 },
          { name: "Concert", homepage: "https://concert.io/", category: "ad", domains: ["*.concert.io"], examples: ["cdn.concert.io"], totalExecutionTime: 317481, totalOccurrences: 336 },
          { name: "Emerse", homepage: "https://www.emerse.com/", category: "ad", domains: ["*.emerse.com"], examples: ["tracking.emerse.com"], totalExecutionTime: 2872, totalOccurrences: 13 },
          { name: "Iterate", homepage: "https://iteratehq.com/", category: "analytics", domains: ["*.iteratehq.com"], totalExecutionTime: 8751, totalOccurrences: 72 },
          { name: "Cookiebot", homepage: "https://www.cookiebot.com/", category: "utility", domains: ["*.cookiebot.com"], examples: [
            "consent.cookiebot.com"
          ], totalExecutionTime: 64865019, totalOccurrences: 187732 },
          { name: "Netlify", homepage: "https://www.netlify.com/", category: "utility", domains: ["*.netlify.com", "*.netlifyusercontent.com"], examples: ["cloud.netlifyusercontent.com"], totalExecutionTime: 299527, totalOccurrences: 1323 },
          { name: "Scroll", homepage: "https://scroll.com/", category: "utility", domains: ["*.scroll.com"], examples: ["static.scroll.com", "connect.scroll.com"] },
          { name: "Consumable", homepage: "https://consumable.com/", category: "ad", domains: ["*.serverbid.com"], totalExecutionTime: 15203, totalOccurrences: 266 },
          { name: "DMD Marketing", homepage: "https://www.dmdconnects.com/", category: "ad", domains: ["*.medtargetsystem.com"], totalExecutionTime: 257224, totalOccurrences: 846 },
          { name: "Catchpoint", homepage: "https://www.catchpoint.com/", category: "analytics", domains: ["*.3gl.net", "*.3genlabs.net"], totalExecutionTime: 14822, totalOccurrences: 160 },
          { name: "Terminus", homepage: "https://terminus.com/", category: "ad", domains: ["*.terminus.services"], totalExecutionTime: 28077, totalOccurrences: 207 },
          { name: "Acceptable Ads", homepage: "https://acceptableads.com/", category: "ad", domains: ["*.aaxads.com", "*.aaxdetect.com"], totalExecutionTime: 2200, totalOccurrences: 34 },
          { name: "ClearBrain", homepage: "https://www.clearbrain.com/", category: "analytics", domains: ["*.clearbrain.com"], examples: ["api.clearbrain.com"] },
          { name: "Optanon", homepage: "https://www.cookielaw.org/", category: "consent-provider", domains: ["*.onetrust.com", "*.cookielaw.org"], examples: ["cdn.cookielaw.org", "geolocation.onetrust.com"], totalExecutionTime: 55293468, totalOccurrences: 113700 },
          { name: "TrustArc", homepage: "https://www.trustarc.com/", category: "utility", domains: ["*.trustarc.com"], examples: ["choices.trustarc.com", "consent.trustarc.com"], totalExecutionTime: 2429376, totalOccurrences: 5941 },
          { name: "iSpot.tv", homepage: "https://www.ispot.tv/", category: "ad", domains: ["*.ispot.tv"], examples: ["pt.ispot.tv"], totalExecutionTime: 2947, totalOccurrences: 10 },
          { name: "RevJet", homepage: "https://www.revjet.com/", category: "ad", domains: ["*.revjet.com"], examples: ["pix.revjet.com", "ads.revjet.com"], totalExecutionTime: 54608, totalOccurrences: 36 },
          { name: "atlasRTX", homepage: "https://www.atlasrtx.com/", category: "customer-success", domains: ["*.atlasrtx.com"], examples: ["app.atlasrtx.com", "cdn.atlasrtx.com", "dev.atlasrtx.com"], totalExecutionTime: 52386, totalOccurrences: 46 },
          { name: "ContactAtOnce", homepage: "https://www.contactatonce.com/", category: "customer-success", domains: ["*.contactatonce.com"], examples: ["tag.contactatonce.com", "agentpresence.contactatonce.com"] },
          { name: "Algolia", homepage: "https://www.algolia.com/", category: "utility", domains: ["*.algolianet.com", "*.algolia.net", "*.algolia.io"], totalExecutionTime: 5603, totalOccurrences: 20 },
          { name: "EMX Digital", homepage: "https://emxdigital.com", category: "ad", domains: ["*.emxdgt.com"], totalExecutionTime: 9160, totalOccurrences: 166 },
          { name: "Moxie", homepage: "https://www.gomoxie.com/", category: "utility", domains: ["*.gomoxie.solutions"], totalExecutionTime: 24183, totalOccurrences: 28 },
          { name: "Scripps Network Digital", homepage: "https://www.scrippsnetworksdigital.com/", category: "ad", domains: ["*.snidigital.com"] },
          { name: "TurnTo", homepage: "https://www.turntonetworks.com/", category: "utility", domains: ["*.turnto.com"], totalExecutionTime: 4666, totalOccurrences: 32 },
          { name: "Quantum Metric", homepage: "https://www.quantummetric.com/", category: "analytics", domains: ["*.quantummetric.com"], totalExecutionTime: 1699724, totalOccurrences: 1140 },
          { name: "Carbon Ads", homepage: "https://www.carbonads.net/", category: "ad", domains: ["*.carbonads.net", "*.carbonads.com"], totalExecutionTime: 12059, totalOccurrences: 224 },
          { name: "Ably", homepage: "https://www.ably.io/", category: "utility", domains: ["*.ably.io"], totalExecutionTime: 17031, totalOccurrences: 125 },
          { name: "Sectigo", homepage: "https://sectigo.com/", category: "utility", domains: ["*.sectigo.com"], totalExecutionTime: 4576, totalOccurrences: 3 },
          { name: "Specless", homepage: "https://gospecless.com/", category: "ad", domains: ["*.specless.tech"] },
          { name: "Loggly", homepage: "https://www.loggly.com/", category: "analytics", domains: ["*.loggly.com", "d9jmv9u00p0mv.cloudfront.net"], examples: ["logs-01.loggly.com"], totalExecutionTime: 943, totalOccurrences: 5 },
          { name: "Intent Media", homepage: "https://intent.com/", category: "ad", domains: ["*.intentmedia.net"] },
          { name: "Supership", homepage: "https://supership.jp/", category: "ad", domains: ["*.socdm.com"], totalExecutionTime: 10809246, totalOccurrences: 17934 },
          { name: "F@N Communications", homepage: "https://www.fancs.com/", category: "ad", domains: ["*.ladsp.com"], examples: ["px.ladsp.com"], totalExecutionTime: 258835, totalOccurrences: 1768 },
          { name: "Vidyard", homepage: "https://www.vidyard.com/", category: "utility", domains: ["*.vidyard.com"], totalExecutionTime: 1165600, totalOccurrences: 1097 },
          { name: "RapidSSL", homepage: "https://www.rapidssl.com/", category: "utility", domains: ["*.rapidssl.com"], totalExecutionTime: 845, totalOccurrences: 2 },
          { name: "Coherent Path", homepage: "https://coherentpath.com/", category: "utility", domains: ["*.coherentpath.com"] },
          { name: "Attentive", homepage: "https://attentivemobile.com/", category: "ad", domains: ["*.attn.tv", "*.attentivemobile.com"], totalExecutionTime: 5554871, totalOccurrences: 9099 },
          { name: "emetriq", homepage: "https://www.emetriq.com/", category: "ad", domains: ["*.emetriq.de", "*.xplosion.de"], totalExecutionTime: 1917, totalOccurrences: 24 },
          { name: "Bonzai", homepage: "https://www.bonzai.co/", category: "ad", domains: ["*.bonzai.co"] },
          {
            name: "Freshchat",
            homepage: "https://www.freshworks.com/live-chat-software/",
            category: "customer-success",
            domains: ["*.freshchat.com", "*.freshworksapi.com"],
            products: [{ name: "Freshdesk Messaging", urlPatterns: ["wchat.freshchat.com"], facades: [{ name: "Freshdesk Messaging (formerly Freshchat) Facade", repo: "https://github.com/coliff/freshdesk-messaging-facade/" }] }],
            totalExecutionTime: 23350324,
            totalOccurrences: 7081
          },
          { name: "Contentful", homepage: "https://www.contentful.com/", category: "utility", domains: ["*.contentful.com"], examples: ["cdn.contentful.com"], totalExecutionTime: 4826, totalOccurrences: 2 },
          { name: "PureCars", homepage: "https://www.purecars.com/", category: "marketing", domains: ["*.purecars.com"], examples: ["cdn.purecars.com"], totalExecutionTime: 969442, totalOccurrences: 1292 },
          { name: "Tray Commerce", homepage: "https://www.tray.com.br/", category: "marketing", domains: ["*.tcdn.com.br"], examples: ["images.tcdn.com.br"], totalExecutionTime: 68362173, totalOccurrences: 14071 },
          { name: "AdScore", homepage: "https://www.adscore.com/", category: "ad", domains: ["*.adsco.re"], examples: ["c.adsco.re"], totalExecutionTime: 2812771, totalOccurrences: 4394 },
          { name: "WebsiteBuilder.com", homepage: "https://www.websitebuilder.com", category: "hosting", domains: ["*.mywebsitebuilder.com"], totalExecutionTime: 19568135, totalOccurrences: 4688 },
          { name: "mParticle", homepage: "https://www.mparticle.com/", category: "utility", domains: ["*.mparticle.com"], examples: ["jssdks.mparticle.com", "identity.mparticle.com"], totalExecutionTime: 403503, totalOccurrences: 1029 },
          { name: "Ada", homepage: "https://www.ada.support/", category: "customer-success", domains: ["*.ada.support"], examples: ["static.ada.support"], totalExecutionTime: 695777, totalOccurrences: 985 },
          { name: "Quora Ads", homepage: "https://www.quora.com/business/", category: "ad", domains: ["*.quora.com"], examples: ["q.quora.com"], totalExecutionTime: 1338719, totalOccurrences: 10614 },
          { name: "Auth0", homepage: "https://auth0.com/", category: "utility", domains: ["*.auth0.com"], examples: ["cdn.auth0.com"], totalExecutionTime: 245638, totalOccurrences: 816 },
          { name: "Bridgewell DSP", homepage: "https://www.bridgewell.com/", category: "ad", domains: ["*.scupio.com"], examples: ["img.scupio.com"], totalExecutionTime: 63728, totalOccurrences: 354 },
          { name: "Wicked Reports", homepage: "https://www.wickedreports.com/", category: "marketing", domains: ["*.wickedreports.com"], examples: ["widget.wickedreports.com"], totalExecutionTime: 148754, totalOccurrences: 483 },
          { name: "Jaywing", homepage: "https://jaywing.com/", category: "marketing", domains: ["*.jaywing.com"], examples: ["amazon.almanac.jaywing.com"] },
          { name: "Holimetrix", homepage: "https://u360.d-bi.fr/", category: "marketing", domains: ["*.d-bi.fr"], examples: ["u360.d-bi.fr"] },
          { name: "iZooto", homepage: "https://www.izooto.com", category: "marketing", domains: ["*.izooto.com"], examples: ["cdn.izooto.com"], totalExecutionTime: 1111125, totalOccurrences: 2022 },
          { name: "Ordergroove", homepage: "https://www.ordergroove.com/", category: "marketing", domains: ["*.ordergroove.com"], examples: ["static.ordergroove.com"], totalExecutionTime: 99990, totalOccurrences: 274 },
          { name: "PageSense", homepage: "https://www.zoho.com/pagesense/", category: "analytics", domains: ["*.pagesense.io"], examples: ["cdn.pagesense.io"], totalExecutionTime: 1996537, totalOccurrences: 6219 },
          { name: "Vizzit", homepage: "https://www.vizzit.se", category: "analytics", domains: ["*.vizzit.se"], examples: ["www.vizzit.se", "tag.vizzit.se"], totalExecutionTime: 739, totalOccurrences: 7 },
          { name: "Click Guardian", homepage: "https://www.clickguardian.co.uk/", category: "ad", domains: ["*.clickguardian.app", "*.clickguardian.co.uk"], examples: ["v2.clickguardian.app", "protection.clickguardian.co.uk"], totalExecutionTime: 202620, totalOccurrences: 1101 },
          { name: "Smartsupp", company: "Smartsupp.com", homepage: "https://www.smartsupp.com", category: "customer-success", domains: ["*.smartsuppchat.com", "*.smartsupp.com", "smartsupp-widget-161959.c.cdn77.org", "*.smartsuppcdn.com"], examples: ["widget-v1.smartsuppcdn.com"], totalExecutionTime: 9998165, totalOccurrences: 21505 },
          { name: "Smartlook", company: "Smartsupp.com", homepage: "https://www.smartlook.com/", category: "analytics", domains: ["*.smartlook.com"], totalExecutionTime: 1386251, totalOccurrences: 16221 },
          { name: "Luigis Box", company: "Luigis Box", homepage: "https://www.luigisbox.com/", category: "utility", domains: ["*.luigisbox.com"], totalExecutionTime: 2975273, totalOccurrences: 2356 },
          { name: "Targito", company: "VIVmail.cz", homepage: "https://www.targito.com", category: "marketing", domains: ["*.targito.com"], totalExecutionTime: 3145, totalOccurrences: 29 },
          { name: "Foxentry", company: "AVANTRO", homepage: "https://foxentry.cz/", category: "utility", domains: ["*.foxentry.cz"], totalExecutionTime: 758854, totalOccurrences: 2313 },
          { name: "Pendo", homepage: "https://www.pendo.io", category: "analytics", domains: [
            "*.pendo.io"
          ], examples: ["app.pendo.io"], totalExecutionTime: 4935190, totalOccurrences: 12203 },
          { name: "Braze", homepage: "https://www.braze.com", category: "analytics", domains: ["*.appboycdn.com"], examples: ["js.appboycdn.com"], totalExecutionTime: 399216, totalOccurrences: 2014 },
          { name: "Usersnap", homepage: "https://usersnap.com", category: "customer-success", domains: ["*.usersnap.com"], examples: ["api.usersnap.com", "cdn.usersnap.com"], totalExecutionTime: 334324, totalOccurrences: 437 },
          { name: "Rewardful", homepage: "https://www.getrewardful.com", category: "analytics", domains: ["*.wdfl.co"], examples: ["r.wdfl.co"], totalExecutionTime: 9094, totalOccurrences: 161 },
          { name: "Launch Darkly", homepage: "https://launchdarkly.com", category: "utility", domains: ["*.launchdarkly.com"], examples: ["app.launchdarkly.com", "events.launchdarkly.com"], totalExecutionTime: 10547, totalOccurrences: 6 },
          { name: "Statuspage", company: "Atlassian", homepage: "https://www.statuspage.io", category: "utility", domains: ["*.statuspage.io"], examples: ["1k6wzpspjf99.statuspage.io"], totalExecutionTime: 43124, totalOccurrences: 1212 },
          { name: "HyperInzerce", homepage: "https://hyperinzerce.cz", category: "ad", domains: ["*.hyperinzerce.cz"], examples: ["motorky.hyperinzerce.cz"], totalExecutionTime: 1035, totalOccurrences: 39 },
          { name: "POWr", homepage: "https://www.powr.io", category: "utility", domains: ["*.powr.io"], examples: ["www.powr.io"], totalExecutionTime: 191534674, totalOccurrences: 39716 },
          { name: "Coral", company: "Coral", homepage: "https://coralproject.net", category: "content", domains: ["*.coral.coralproject.net"], examples: ["company.coral.coralproject.net"], totalExecutionTime: 61135, totalOccurrences: 250 },
          { name: "Bolt", homepage: "https://www.bolt.com/", category: "utility", domains: ["*.bolt.com"], examples: ["connect.bolt.com"], totalExecutionTime: 513689, totalOccurrences: 217 },
          { name: "Judge.me", homepage: "https://judge.me/", category: "marketing", domains: ["*.judge.me"], examples: ["cdn.judge.me"], totalExecutionTime: 31886982, totalOccurrences: 27483 },
          { name: "Tilda", homepage: "https://tilda.cc/", category: "hosting", domains: ["*.tildacdn.com"], examples: ["stat.tildacdn.com", "static.tildacdn.com", "upwidget.tildacdn.com"], totalExecutionTime: 94734169, totalOccurrences: 70321 },
          { name: "SalesLoft", homepage: "https://salesloft.com/", category: "marketing", domains: ["*.salesloft.com"], examples: ["scout-cdn.salesloft.com"], totalExecutionTime: 42987, totalOccurrences: 705 },
          { name: "Accessibe Accessibility Overlay", company: "Accessibe", homepage: "https://accessibe.com/", category: "utility", domains: ["*.accessibe.com", "*.acsbapp.com", "*.acsbap.com"], examples: ["accessibe.com", "acsbapp.com"], totalExecutionTime: 285765, totalOccurrences: 808 },
          {
            name: "Builder",
            homepage: "https://www.builder.io/",
            category: "hosting",
            domains: ["*.builder.io"],
            examples: ["cdn.builder.io"],
            totalExecutionTime: 412358,
            totalOccurrences: 261
          },
          { name: "Pepperjam", homepage: "https://www.pepperjam.com/", category: "marketing", domains: ["*.pepperjam.com", "*.affiliatetechnology.com"], examples: ["container.pepperjam.com"], totalExecutionTime: 2308, totalOccurrences: 35 },
          { name: "Reach", homepage: "https://withreach.com/", category: "utility", domains: ["*.gointerpay.net"], examples: ["checkout.gointerpay.net"] },
          { name: "Chameleon", homepage: "https://www.trychameleon.com/", category: "marketing", domains: ["*.trychameleon.com"], examples: ["fast.trychameleon.com"], totalExecutionTime: 24218, totalOccurrences: 8 },
          { name: "Matomo", company: "InnoCraft", homepage: "https://matomo.org/", category: "analytics", domains: ["*.matomo.cloud"], totalExecutionTime: 3115176, totalOccurrences: 14345 },
          { name: "Segmanta", homepage: "https://segmanta.com/", category: "marketing", domains: ["*.segmanta.com"], examples: ["clientName.segmanta.com"] },
          { name: "Podsights", homepage: "https://podsights.com/", category: "marketing", domains: ["*.pdst.fm", "us-central1-adaptive-growth.cloudfunctions.net"], examples: ["cdn.pdst.fm", "sink.pdst.fm"], totalExecutionTime: 71990, totalOccurrences: 1140 },
          { name: "Chatwoot", homepage: "https://www.chatwoot.com/", category: "customer-success", domains: ["*.chatwoot.com"], examples: ["cdn.chatwoot.com", "app.chatwoot.com"], totalExecutionTime: 31973, totalOccurrences: 444 },
          { name: "Crisp", homepage: "https://crisp.chat/", category: "customer-success", domains: ["*.crisp.chat"], examples: ["client.crisp.chat", "client.relay.crisp.chat"], totalExecutionTime: 33757, totalOccurrences: 1052 },
          { name: "Admiral CMP", homepage: "https://www.getadmiral.com", category: "consent-provider", domains: ["admiral.mgr.consensu.org", "*.admiral.mgr.consensu.org"] },
          { name: "Adnuntius CMP", homepage: "https://adnuntius.com", category: "consent-provider", domains: ["adnuntiusconsent.mgr.consensu.org", "*.adnuntiusconsent.mgr.consensu.org"] },
          { name: "Clickio CMP", homepage: "https://clickio.com", category: "consent-provider", domains: ["clickio.mgr.consensu.org", "*.clickio.mgr.consensu.org"] },
          { name: "AppConsent CMP", homepage: "https://appconsent.io/en", category: "consent-provider", domains: ["appconsent.mgr.consensu.org", "*.appconsent.mgr.consensu.org"] },
          { name: "DMG Media CMP", homepage: "https://www.dmgmedia.co.uk", category: "consent-provider", domains: ["dmgmedia.mgr.consensu.org", "*.dmgmedia.mgr.consensu.org"] },
          { name: "Axel Springer CMP", homepage: "https://www.axelspringer.com", category: "consent-provider", domains: ["axelspringer.mgr.consensu.org", "*.axelspringer.mgr.consensu.org"] },
          { name: "Bedrock CMP", homepage: "https://www.bedrockstreaming.com", category: "consent-provider", domains: ["bedrock.mgr.consensu.org", "*.bedrock.mgr.consensu.org"] },
          { name: "BMIND CMP", homepage: "https://www.bmind.es", category: "consent-provider", domains: ["bmind.mgr.consensu.org", "*.bmind.mgr.consensu.org"] },
          { name: "Borlabs CMP", homepage: "https://borlabs.io", category: "consent-provider", domains: ["borlabs.mgr.consensu.org", "*.borlabs.mgr.consensu.org"] },
          { name: "Civic CMP", homepage: "https://www.civicuk.com", category: "consent-provider", domains: ["cookiecontrol.mgr.consensu.org", "*.cookiecontrol.mgr.consensu.org"] },
          { name: "Commanders Act CMP", homepage: "https://www.commandersact.com", category: "consent-provider", domains: ["commandersact.mgr.consensu.org", "*.commandersact.mgr.consensu.org"] },
          { name: "Complianz CMP", homepage: "https://complianz.io/", category: "consent-provider", domains: ["complianz.mgr.consensu.org", "*.complianz.mgr.consensu.org"] },
          { name: "Consent Desk CMP", homepage: "https://www.consentdesk.com/", category: "consent-provider", domains: ["consentdesk.mgr.consensu.org", "*.consentdesk.mgr.consensu.org"] },
          { name: "Consent Manager CMP", homepage: "https://consentmanager.net", category: "consent-provider", domains: ["consentmanager.mgr.consensu.org", "*.consentmanager.mgr.consensu.org"] },
          { name: "Conversant CMP", homepage: "https://www.conversantmedia.eu/", category: "consent-provider", domains: ["conversant.mgr.consensu.org", "*.conversant.mgr.consensu.org"] },
          { name: "Cookie Information CMP", homepage: "https://www.cookieinformation.com/", category: "consent-provider", domains: ["cookieinformation.mgr.consensu.org", "*.cookieinformation.mgr.consensu.org"] },
          { name: "Cookiebot CMP", homepage: "https://www.cookiebot.com", category: "consent-provider", domains: ["cookiebot.mgr.consensu.org", "*.cookiebot.mgr.consensu.org"] },
          { name: "Truendo CMP", homepage: "https://truendo.com/", category: "consent-provider", domains: ["truendo.mgr.consensu.org", "*.truendo.mgr.consensu.org"] },
          { name: "Dentsu CMP", homepage: "https://www.dentsuaegisnetwork.de/", category: "consent-provider", domains: ["dan.mgr.consensu.org", "*.dan.mgr.consensu.org"] },
          { name: "Didomi CMP", homepage: "https://www.didomi.io/en/", category: "consent-provider", domains: ["didomi.mgr.consensu.org", "*.didomi.mgr.consensu.org"] },
          { name: "Ensighten CMP", homepage: "https://www.ensighten.com/", category: "consent-provider", domains: ["ensighten.mgr.consensu.org", "*.ensighten.mgr.consensu.org"] },
          { name: "Evidon CMP", homepage: "https://evidon.com", category: "consent-provider", domains: ["evidon.mgr.consensu.org", "*.evidon.mgr.consensu.org"] },
          { name: "Ezoic CMP", homepage: "https://www.ezoic.com/", category: "consent-provider", domains: ["ezoic.mgr.consensu.org", "*.ezoic.mgr.consensu.org"] },
          { name: "Gemius CMP", homepage: "https://www.gemius.com", category: "consent-provider", domains: ["gemius.mgr.consensu.org", "*.gemius.mgr.consensu.org"] },
          { name: "NitroPay CMP", homepage: "https://nitropay.com/", category: "consent-provider", domains: ["nitropay.mgr.consensu.org", "*.nitropay.mgr.consensu.org"] },
          { name: "Google FundingChoices", homepage: "https://fundingchoices.google.com/start/", category: "consent-provider", domains: ["fundingchoices.mgr.consensu.org", "*.fundingchoices.mgr.consensu.org", "fundingchoicesmessages.google.com", "*.fundingchoicesmessages.google.com"], totalExecutionTime: 257806056, totalOccurrences: 400016 },
          { name: "Gravito CMP", homepage: "https://www.gravito.net/", category: "consent-provider", domains: ["gravito.mgr.consensu.org", "*.gravito.mgr.consensu.org"] },
          { name: "ID Ward CMP", homepage: "https://id-ward.com/enterprise", category: "consent-provider", domains: ["idward.mgr.consensu.org", "*.idward.mgr.consensu.org"] },
          { name: "iubenda CMP", homepage: "https://www.iubenda.com", category: "consent-provider", domains: ["iubenda.mgr.consensu.org", "*.iubenda.mgr.consensu.org"] },
          { name: "Jump CMP", homepage: "https://jumpgroup.it/", category: "consent-provider", domains: ["avacy.mgr.consensu.org", "*.avacy.mgr.consensu.org"] },
          { name: "LiveRamp CMP", homepage: "https://liveramp.com/", category: "consent-provider", domains: ["faktor.mgr.consensu.org", "*.faktor.mgr.consensu.org"] },
          { name: "Madvertise CMP", homepage: "https://madvertise.com/en/", category: "consent-provider", domains: ["madvertise.mgr.consensu.org", "*.madvertise.mgr.consensu.org"] },
          { name: "Mairdumont Netletic CMP", homepage: "https://www.mairdumont-netletix.com/", category: "consent-provider", domains: ["mdnxmp.mgr.consensu.org", "*.mdnxmp.mgr.consensu.org"] },
          { name: "Marfeel CMP", homepage: "https://www.marfeel.com/", category: "consent-provider", domains: ["marfeel.mgr.consensu.org", "*.marfeel.mgr.consensu.org"] },
          { name: "Mediavine CMP", homepage: "https://www.mediavine.com/", category: "consent-provider", domains: ["mediavine.mgr.consensu.org", "*.mediavine.mgr.consensu.org"] },
          { name: "ConsentServe CMP", homepage: "https://www.consentserve.com/", category: "consent-provider", domains: ["consentserve.mgr.consensu.org", "*.consentserve.mgr.consensu.org"] },
          { name: "Next14 CMP", homepage: "https://www.next14.com/", category: "consent-provider", domains: ["next14.mgr.consensu.org", "*.next14.mgr.consensu.org"] },
          { name: "AdRoll CMP", homepage: "https://www.adroll.com/", category: "consent-provider", domains: ["adroll.mgr.consensu.org", "*.adroll.mgr.consensu.org"] },
          { name: "Ogury CMP", homepage: "https://www.ogury.com/", category: "consent-provider", domains: ["ogury.mgr.consensu.org", "*.ogury.mgr.consensu.org"] },
          { name: "OneTag CMP", homepage: "https://onetag.net", category: "consent-provider", domains: ["onetag.mgr.consensu.org", "*.onetag.mgr.consensu.org"] },
          { name: "OneTrust CMP", homepage: "https://onetrust.com", category: "consent-provider", domains: ["onetrust.mgr.consensu.org", "*.onetrust.mgr.consensu.org"] },
          { name: "optAd360 CMP", homepage: "https://www.optad360.com/", category: "consent-provider", domains: ["optad360.mgr.consensu.org", "*.optad360.mgr.consensu.org"] },
          { name: "Osano CMP", homepage: "https://www.osano.com", category: "consent-provider", domains: ["osano.mgr.consensu.org", "*.osano.mgr.consensu.org"] },
          { name: "Playwire CMP", homepage: "https://www.playwire.com", category: "consent-provider", domains: ["playwire.mgr.consensu.org", "*.playwire.mgr.consensu.org"] },
          { name: "Pulselive CMP", homepage: "https://www.pulselive.com", category: "consent-provider", domains: ["pulselive.mgr.consensu.org", "*.pulselive.mgr.consensu.org"] },
          { name: "Quantcast Choice", homepage: "https://quantcast.com", category: "consent-provider", domains: ["quantcast.mgr.consensu.org", "*.quantcast.mgr.consensu.org"] },
          { name: "RCS Pubblicita CMP", homepage: "http://www.rcspubblicita.it/site/home.html", category: "consent-provider", domains: ["rcsmediagroup.mgr.consensu.org", "*.rcsmediagroup.mgr.consensu.org"] },
          { name: "Rich Audience CMP", homepage: "https://richaudience.com", category: "consent-provider", domains: ["richaudience.mgr.consensu.org", "*.richaudience.mgr.consensu.org"] },
          { name: "Ringier Axel Springer CMP", homepage: "https://www.ringieraxelspringer.pl/en/home/", category: "consent-provider", domains: ["rasp.mgr.consensu.org", "*.rasp.mgr.consensu.org"] },
          { name: "Secure Privacy CMP", homepage: "https://secureprivacy.ai/", category: "consent-provider", domains: ["secureprivacy.mgr.consensu.org", "*.secureprivacy.mgr.consensu.org"] },
          { name: "Securiti CMP", homepage: "https://securiti.ai/", category: "consent-provider", domains: ["securiti.mgr.consensu.org", "*.securiti.mgr.consensu.org"] },
          { name: "Seznam.cz CMP", homepage: "https://www.seznam.cz/", category: "consent-provider", domains: ["seznam.mgr.consensu.org", "*.seznam.mgr.consensu.org"] },
          { name: "ShareThis CMP", homepage: "https://sharethis.com", category: "consent-provider", domains: ["sharethis.mgr.consensu.org", "*.sharethis.mgr.consensu.org"] },
          { name: "ShinyStat CMP", homepage: "https://www.shinystat.com", category: "consent-provider", domains: ["shinystat.mgr.consensu.org", "*.shinystat.mgr.consensu.org"] },
          { name: "Sibbo CMP", homepage: "https://sibboventures.com/en/", category: "consent-provider", domains: ["sibboventures.mgr.consensu.org", "*.sibboventures.mgr.consensu.org"] },
          { name: "Singlespot CMP", homepage: "https://www.singlespot.com/en", category: "consent-provider", domains: ["singlespot.mgr.consensu.org", "*.singlespot.mgr.consensu.org"] },
          { name: "Sirdata CMP", homepage: "https://www.sirdata.com", category: "consent-provider", domains: ["sddan.mgr.consensu.org", "*.sddan.mgr.consensu.org"] },
          { name: "Snigel CMP", homepage: "https://snigel.com", category: "consent-provider", domains: ["snigelweb.mgr.consensu.org", "*.snigelweb.mgr.consensu.org"] },
          { name: "Sourcepoint CMP", homepage: "https://sourcepoint.com", category: "consent-provider", domains: ["sourcepoint.mgr.consensu.org", "*.sourcepoint.mgr.consensu.org"] },
          { name: "Pubtech CMP", homepage: "https://www.pubtech.ai/", category: "consent-provider", domains: ["pubtech.mgr.consensu.org", "*.pubtech.mgr.consensu.org"] },
          { name: "AdMetrics Pro CMP", homepage: "https://admetricspro.com", category: "consent-provider", domains: ["cmp.mgr.consensu.org", "*.cmp.mgr.consensu.org"] },
          { name: "Traffective CMP", homepage: "https://traffective.com", category: "consent-provider", domains: ["traffective.mgr.consensu.org", "*.traffective.mgr.consensu.org"] },
          { name: "UniConsent CMP", homepage: "https://www.uniconsent.com", category: "consent-provider", domains: ["uniconsent.mgr.consensu.org", "*.uniconsent.mgr.consensu.org", "cmp.uniconsent.com", "*.uniconsent.com"], totalExecutionTime: 829870, totalOccurrences: 1336 },
          { name: "TrustArc CMP", homepage: "https://trustarc.com/", category: "consent-provider", domains: ["trustarc.mgr.consensu.org", "*.trustarc.mgr.consensu.org"] },
          { name: "Usercentrics CMP", homepage: "https://usercentrics.com", category: "consent-provider", domains: ["usercentrics.mgr.consensu.org", "*.usercentrics.mgr.consensu.org", "*.usercentrics.eu", "*.services.usercentrics.eu"], totalExecutionTime: 53008518, totalOccurrences: 49602 },
          { name: "WebAds CMP", homepage: "https://www.webads.nl/", category: "consent-provider", domains: ["webads.mgr.consensu.org", "*.webads.mgr.consensu.org"] },
          { name: "Trustcommander", company: "Commandersact", homepage: "https://www.commandersact.com", category: "consent-provider", domains: ["*.trustcommander.net"], examples: ["cdn.trustcommander.net", "privacy.trustcommander.net"], totalExecutionTime: 324770, totalOccurrences: 1713 },
          { name: "Hubvisor", homepage: "https://www.hubvisor.io", category: "ad", domains: ["*.hubvisor.io"], examples: ["cdn.hubvisor.io", "stream.hubvisor.io"], totalExecutionTime: 404737, totalOccurrences: 492 },
          { name: "Castle", homepage: "https://castle.io", category: "utility", domains: ["*.castle.io", "d2t77mnxyo7adj.cloudfront.net"], examples: ["t.castle.io"] },
          { name: "Wigzo", homepage: "https://www.wigzo.com/", category: "marketing", domains: ["*.wigzo.com", "*.wigzopush.com"], examples: ["app.wigzo.com", "tracker.wigzopush.com"], totalExecutionTime: 215280, totalOccurrences: 762 },
          { name: "Convertful", homepage: "https://convertful.com/", category: "marketing", domains: ["*.convertful.com"], examples: ["app.convertful.com"], totalExecutionTime: 215317, totalOccurrences: 1534 },
          { name: "OpenLink", company: "MediaWallah", homepage: "https://www.mediawallah.com/", category: "ad", domains: ["*.mediawallahscript.com"], examples: ["partner.mediawallahscript.com"] },
          { name: "TPMN", company: "TPMN", homepage: "http://tpmn.io/", category: "ad", domains: ["*.tpmn.co.kr"], examples: ["ad.tpmn.co.kr"], totalExecutionTime: 354, totalOccurrences: 10 },
          { name: "HERO", company: "Klarna", homepage: "https://www.usehero.com/", category: "customer-success", domains: ["*.usehero.com"], examples: ["api.usehero.com", "cdn.usehero.com"], totalExecutionTime: 32092, totalOccurrences: 42 },
          { name: "Zync", company: "Zeta Global", homepage: "https://zetaglobal.com/", category: "marketing", domains: ["*.rezync.com"], examples: ["live.rezync.com"], totalExecutionTime: 25978, totalOccurrences: 246 },
          { name: "AdFuel Video", company: "AdFuel", homepage: "https://goadfuel.com/", category: "ad", domains: ["*.videoplayerhub.com"], examples: ["customer.videoplayerhub.com"], totalExecutionTime: 82951, totalOccurrences: 1407 },
          { name: "Prefix Box AI Search", company: "Prefix Box", homepage: "https://www.prefixbox.com/", category: "utility", domains: ["*.prefixbox.com"], examples: ["cdn.prefixbox.com"], totalExecutionTime: 51608, totalOccurrences: 58 },
          { name: "SpeedSize Service Worker", company: "SpeedSize", homepage: "https://speedsize.com/", category: "utility", domains: ["di6367dava8ow.cloudfront.net", "d2d22nphq0yz8t.cloudfront.net"], examples: ["di6367dava8ow.cloudfront.net"] },
          { name: "Vonage Video API", company: "Vonage", homepage: "https://www.vonage.com/communications-apis/video/", category: "video", domains: ["*.opentok.com"], examples: ["static.opentok.com"], totalExecutionTime: 220760, totalOccurrences: 304 },
          { name: "Checkout.com", company: "Checkout.com", homepage: "https://www.checkout.com", category: "utility", domains: ["*.checkout.com"], examples: ["cdn.checkout.com"], totalExecutionTime: 184372, totalOccurrences: 1367 },
          { name: "Noibu", company: "Noibu", homepage: "https://www.noibu.com", category: "utility", domains: ["*.noibu.com"], examples: ["input.noibu.com"], totalExecutionTime: 1453903, totalOccurrences: 613 },
          { name: "Clarity", company: "Microsoft", homepage: "https://clarity.microsoft.com/", category: "utility", domains: ["*.clarity.ms"], examples: ["c.clarity.ms"], totalExecutionTime: 208824616, totalOccurrences: 456309 },
          { name: "goinstore", company: "Emplifi", homepage: "https://goinstore.com/", category: "customer-success", domains: ["*.goinstore.com"], examples: ["gis.goinstore.com"] },
          { name: "SegmentStream", company: "SegmentStream", homepage: "https://segmentstream.com/", category: "marketing", domains: ["*.segmentstream.com"], examples: ["track.segmentstream.com"], totalExecutionTime: 8628, totalOccurrences: 13 },
          {
            name: "Amazon Associates",
            company: "Amazon",
            homepage: "https://affiliate-program.amazon.co.uk/",
            category: "marketing",
            domains: ["*.associates-amazon.com"],
            examples: ["assoc-na.associates-amazon.com"],
            totalExecutionTime: 50,
            totalOccurrences: 1
          },
          { name: "DotMetrics", company: "Ipsos", homepage: "https://www.dotmetrics.net/", category: "analytics", domains: ["*.dotmetrics.net"], examples: ["uk-script.dotmetrics.net"], totalExecutionTime: 159255, totalOccurrences: 817 },
          { name: "Truffle Bid", company: "Truffle", homepage: "https://truffle.bid/", category: "ad", domains: ["*.truffle.bid"], examples: ["matching.truffle.bid"], totalExecutionTime: 24026, totalOccurrences: 39 },
          { name: "Hybrid", company: "Hybrid", homepage: "https://hybrid.ai/", category: "ad", domains: ["*.hybrid.ai"], examples: ["dm-eu.hybrid.ai"], totalExecutionTime: 219740, totalOccurrences: 2326 },
          { name: "AdMan Media", company: "AdMan", homepage: "https://admanmedia.com/", category: "video", domains: ["*.admanmedia.com"], examples: ["cs.admanmedia.com"], totalExecutionTime: 1924, totalOccurrences: 202 },
          { name: "ID5 Identity Cloud", company: "ID5", homepage: "https://id5.io/", category: "ad", domains: ["id5-sync.com", "*.id5-sync.com"], examples: ["id5-sync.com"], totalExecutionTime: 26134069, totalOccurrences: 119336 },
          { name: "Audience Rate", company: "Audience Rate Limited", homepage: "https://www.audiencerate.com/", category: "ad", domains: ["*.audrte.com"], examples: ["a.audrte.com"] },
          { name: "Seedtag", company: "Seedtag Advertising", homepage: "https://www.seedtag.com/", category: "ad", domains: ["*.seedtag.com"], examples: ["s.seedtag.com"], totalExecutionTime: 3342567, totalOccurrences: 1503 },
          { name: "IVI", company: "IVI Technologies", homepage: "http://ivitechnologies.com/", category: "ad", domains: ["*.ivitrack.com"], examples: ["matching.ivitrack.com"], totalExecutionTime: 3746, totalOccurrences: 34 },
          { name: "Sportradar", company: "Sportradar", homepage: "https://www.sportradar.com/", category: "ad", domains: ["*.sportradarserving.com"], examples: ["a.sportradarserving.com"], totalExecutionTime: 520, totalOccurrences: 11 },
          { name: "ZEOTAP", company: "ZEOTAP", homepage: "https://zeotap.com/", category: "ad", domains: ["*.zeotap.com"], examples: ["spl.zeotap.com"], totalExecutionTime: 14368, totalOccurrences: 96 },
          { name: "Web Content Assessor", company: "TMT Digital", homepage: "https://mediatrust.com/", category: "ad", domains: ["*.webcontentassessor.com"], examples: ["scripts.webcontentassessor.com"], totalExecutionTime: 314249, totalOccurrences: 633 },
          { name: "Genie", company: "Media Force", homepage: "https://hellogenie.com/", category: "ad", domains: ["*.mfadsrvr.com"], examples: ["rtb.mfadsrvr.com"], totalExecutionTime: 37, totalOccurrences: 2 },
          { name: "mediarithmics", company: "mediarithmics", homepage: "https://www.mediarithmics.com/", category: "ad", domains: ["*.mediarithmics.com"], examples: ["cookie-matching.mediarithmics.com"], totalExecutionTime: 25799, totalOccurrences: 144 },
          { name: "Ozone Project", company: "The Ozone Project", homepage: "https://www.ozoneproject.com/", category: "ad", domains: ["*.the-ozone-project.com"], examples: ["elb.the-ozone-project.com"], totalExecutionTime: 152768, totalOccurrences: 910 },
          { name: "FiftyAurora", company: "Fifty", homepage: "https://fifty.io/", category: "ad", domains: ["*.fiftyt.com"], examples: ["visitor.fiftyt.com"] },
          { name: "smadex", company: "entravision", homepage: "https://smadex.com/", category: "ad", domains: ["*.smadex.com"], examples: ["cm.smadex.com"], totalExecutionTime: 5, totalOccurrences: 1 },
          { name: "AWX", company: "Trinity Mirror", category: "ad", domains: ["*.tm-awx.com"], examples: ["felix.data.tm-awx.com"], totalExecutionTime: 68744, totalOccurrences: 54 },
          { name: "XPO", company: "Knorex", category: "ad", homepage: "https://www.knorex.com/", domains: ["*.brand-display.com"], examples: ["dmp.brand-display.com"], totalExecutionTime: 388629, totalOccurrences: 477 },
          { name: "Viafoura", company: "Viafoura", category: "ad", homepage: "https://viafoura.com/", domains: ["*.viafoura.co", "*.viafoura.net"], examples: ["api.viafoura.co", "cdn.viafoura.net"], totalExecutionTime: 307404, totalOccurrences: 446 },
          { name: "Adnami", company: "Adnami", category: "ad", homepage: "https://www.adnami.io/", domains: ["*.adnami.io"], examples: ["macro.adnami.io"], totalExecutionTime: 272668, totalOccurrences: 1639 },
          { name: "LiveRamp Privacy Manager", company: "LiveRamp", category: "ad", homepage: "https://liveramp.com/privacy-legal-compliance/", domains: ["*.privacymanager.io"], examples: ["geo.privacymanager.io"], totalExecutionTime: 6546055, totalOccurrences: 22295 },
          { name: "Onfocus", company: "Onfocus SAS", category: "ad", domains: ["*.4dex.io"], examples: ["script.4dex.io"], totalExecutionTime: 4240761, totalOccurrences: 8836 },
          { name: "viewTag", company: "Advanced Store", category: "ad", domains: ["*.ad4m.at"], examples: ["ad4m.at", "as.ad4m.at"], totalExecutionTime: 458, totalOccurrences: 21 },
          { name: "MRP Prelytics", company: "Market Resource Partners", category: "ad", homepage: "https://www.mrpfd.com/", domains: ["*.mrpdata.net"], examples: ["j.mrpdata.net"] },
          { name: "iPROM", company: "iPROM", category: "ad", homepage: "https://iprom.eu/", domains: ["*.iprom.net"], examples: ["core.iprom.net"], totalExecutionTime: 114801, totalOccurrences: 72099 },
          { name: "Plausible", company: "Plausible", homepage: "https://plausible.io/", category: "analytics", domains: ["*.plausible.io"] },
          { name: "Micro Analytics", company: "Micro Analytics", homepage: "https://microanalytics.io/", category: "analytics", domains: ["padmin.microanalytics.io", "www.microanalytics.io", "dev.microanalytics.io", "status.microanalytics.io"] },
          { name: "Scale8", company: "Scale8", homepage: "https://scale8.com/", category: "analytics", domains: ["www.scale8.com", "api-dev.scale8.com", "cdn.scale8.com", "ui.scale8.com"] },
          { name: "Cabin", company: "Cabin", homepage: "https://withcabin.com/", category: "analytics", domains: ["*.withcabin.com"], totalExecutionTime: 3843, totalOccurrences: 100 },
          { name: "Appcues", company: "Appcues", homepage: "https://www.appcues.com/", category: "analytics", domains: ["*.appcues.com"], totalExecutionTime: 2154145, totalOccurrences: 2831 },
          { name: "Fathom Analytics", company: "Fathom", homepage: "https://usefathom.com/", category: "analytics", domains: ["*.usefathom.com"], totalExecutionTime: 145389, totalOccurrences: 1141 },
          { name: "Clearbit", company: "Clearbit", homepage: "https://clearbit.com/", category: "analytics", domains: ["*.clearbitjs.com", "*.clearbitscripts.com", "*.clearbit.com"], totalExecutionTime: 967253, totalOccurrences: 4171 },
          { name: "G2", company: "G2", homepage: "https://www.g2.com/", category: "utility", domains: ["*.g2.com", "*.g2crowd.com"], totalExecutionTime: 195752, totalOccurrences: 406 },
          { name: "Navu", company: "Navu", homepage: "https://navu.co/", category: "ad", domains: ["*.navu.co"] },
          { name: "InZynk", company: "InZynk", homepage: "https://inzynk.com/", category: "ad", domains: ["*.inzynk.com", "*.inzynk.io"], totalExecutionTime: 541, totalOccurrences: 8 },
          { name: "Integrate", company: "Integrate", homepage: "https://www.integrate.com/", category: "ad", domains: ["*.integrate.com", "*.listenloop.com"], totalExecutionTime: 14260, totalOccurrences: 39 },
          { name: "Ad Lightning", company: "Boltive", homepage: "https://www.adlightning.com/", category: "ad", domains: ["*.adlightning.com"], totalExecutionTime: 6879067, totalOccurrences: 3795 },
          { name: "GeoEdge", company: "GeoEdge", homepage: "https://www.geoedge.com/", category: "ad", domains: ["*.geoedge.com", "*.geoedge.be"], totalExecutionTime: 1039615, totalOccurrences: 1796 },
          { name: "Doofinder", company: "Doofinder", homepage: "https://www.doofinder.com/", category: "utility", domains: ["cdn.doofinder.com"], totalExecutionTime: 1750777, totalOccurrences: 12550 },
          { name: "Revlifter", company: "Revlifter", homepage: "https://www.revlifter.com/", category: "utility", domains: [
            "assets.revlifter.com"
          ] },
          { name: "Didomi", company: "Didomi", homepage: "https://www.didomi.io/", category: "consent-provider", domains: ["sdk.privacy-center.org", "api.privacy-center.org"], totalExecutionTime: 85132161, totalOccurrences: 84206 },
          { name: "Pubperf Analytics", company: "Pubperf", homepage: "https://www.pubperf.com/", category: "analytics", domains: ["*.pubperf.com"], totalExecutionTime: 51392, totalOccurrences: 400 }
        ];
      }
    });
    require_lib = __commonJS({
      "node_modules/@paulirish/trace_engine/node_modules/third-party-web/lib/index.js"(exports2, module2) {
        init_process_global();
        var { createAPIFromDataset } = require_create_entity_finder_api();
        var entities = require_entities();
        module2.exports = createAPIFromDataset(entities);
      }
    });
    init_third_party_web = __esm2({
      "node_modules/@paulirish/trace_engine/third_party/third-party-web/third-party-web.js"() {
        init_process_global();
        import_third_party_web = __toESM(require_lib(), 1);
      }
    });
    Configuration_exports = {};
    __export2(Configuration_exports, {
      configToCacheKey: () => configToCacheKey,
      defaults: () => defaults
    });
    init_Configuration = __esm2({
      "node_modules/@paulirish/trace_engine/models/trace/types/Configuration.js"() {
        init_process_global();
        defaults = /* @__PURE__ */ __name(() => ({
          includeRuntimeCallStats: false,
          showAllEvents: false,
          debugMode: false,
          maxInvalidationEventsPerEvent: 20,
          enableAnimationsFrameHandler: false
        }), "defaults");
        __name(configToCacheKey, "configToCacheKey");
      }
    });
    Extensions_exports = {};
    __export2(Extensions_exports, {
      extensionPalette: () => extensionPalette,
      isConsoleTimestampPayloadTrackEntry: () => isConsoleTimestampPayloadTrackEntry,
      isExtensionEntryObj: () => isExtensionEntryObj,
      isExtensionPayloadMarker: () => isExtensionPayloadMarker,
      isSyntheticExtensionEntry: () => isSyntheticExtensionEntry,
      isValidExtensionPayload: () => isValidExtensionPayload
    });
    init_Extensions = __esm2({
      "node_modules/@paulirish/trace_engine/models/trace/types/Extensions.js"() {
        init_process_global();
        extensionPalette = [
          "primary",
          "primary-light",
          "primary-dark",
          "secondary",
          "secondary-light",
          "secondary-dark",
          "tertiary",
          "tertiary-light",
          "tertiary-dark",
          "error",
          "warning"
        ];
        __name(isExtensionPayloadMarker, "isExtensionPayloadMarker");
        __name(isExtensionEntryObj, "isExtensionEntryObj");
        __name(isConsoleTimestampPayloadTrackEntry, "isConsoleTimestampPayloadTrackEntry");
        __name(isValidExtensionPayload, "isValidExtensionPayload");
        __name(isSyntheticExtensionEntry, "isSyntheticExtensionEntry");
      }
    });
    File_exports = {};
    __export2(File_exports, {
      DataOrigin: () => DataOrigin,
      EntriesLinkState: () => EntriesLinkState,
      EventKeyType: () => EventKeyType,
      isEntriesLinkAnnotation: () => isEntriesLinkAnnotation,
      isEntryLabelAnnotation: () => isEntryLabelAnnotation,
      isTimeRangeAnnotation: () => isTimeRangeAnnotation,
      traceEventKeyToValues: () => traceEventKeyToValues
    });
    init_File = __esm2({
      "node_modules/@paulirish/trace_engine/models/trace/types/File.js"() {
        init_process_global();
        (function(DataOrigin2) {
          DataOrigin2["CPU_PROFILE"] = "CPUProfile";
          DataOrigin2["TRACE_EVENTS"] = "TraceEvents";
        })(DataOrigin || (DataOrigin = {}));
        (function(EntriesLinkState2) {
          EntriesLinkState2["CREATION_NOT_STARTED"] = "creation_not_started";
          EntriesLinkState2["PENDING_TO_EVENT"] = "pending_to_event";
          EntriesLinkState2["CONNECTED"] = "connected";
        })(EntriesLinkState || (EntriesLinkState = {}));
        (function(EventKeyType2) {
          EventKeyType2["RAW_EVENT"] = "r";
          EventKeyType2["SYNTHETIC_EVENT"] = "s";
          EventKeyType2["PROFILE_CALL"] = "p";
          EventKeyType2["LEGACY_TIMELINE_FRAME"] = "l";
        })(EventKeyType || (EventKeyType = {}));
        __name(isTimeRangeAnnotation, "isTimeRangeAnnotation");
        __name(isEntryLabelAnnotation, "isEntryLabelAnnotation");
        __name(isEntriesLinkAnnotation, "isEntriesLinkAnnotation");
        __name(traceEventKeyToValues, "traceEventKeyToValues");
      }
    });
    init_Overlays = __esm2({
      "node_modules/@paulirish/trace_engine/models/trace/types/Overlays.js"() {
        init_process_global();
      }
    });
    Timing_exports = {};
    __export2(Timing_exports, {
      Micro: () => Micro,
      Milli: () => Milli,
      Seconds: () => Seconds
    });
    init_Timing = __esm2({
      "node_modules/@paulirish/trace_engine/models/trace/types/Timing.js"() {
        init_process_global();
        __name(Micro, "Micro");
        __name(Milli, "Milli");
        __name(Seconds, "Seconds");
      }
    });
    TraceEvents_exports = {};
    __export2(TraceEvents_exports, {
      AuctionWorkletType: () => AuctionWorkletType,
      CallFrameID: () => CallFrameID,
      Categories: () => Categories,
      InvalidationEventType: () => InvalidationEventType,
      LayoutInvalidationReason: () => LayoutInvalidationReason,
      MarkerName: () => MarkerName,
      NO_NAVIGATION: () => NO_NAVIGATION,
      Name: () => Name,
      Phase: () => Phase,
      ProcessID: () => ProcessID,
      ProfileID: () => ProfileID,
      SampleIndex: () => SampleIndex,
      Scope: () => Scope,
      SelectorTimingsKey: () => SelectorTimingsKey,
      StyleRecalcInvalidationReason: () => StyleRecalcInvalidationReason,
      ThreadID: () => ThreadID,
      WorkerId: () => WorkerId,
      eventIsPageLoadEvent: () => eventIsPageLoadEvent,
      isAbortPostTaskCallback: () => isAbortPostTaskCallback,
      isActivateLayerTree: () => isActivateLayerTree,
      isAnimation: () => isAnimation,
      isAnimationFrameAsyncEnd: () => isAnimationFrameAsyncEnd,
      isAnimationFrameAsyncStart: () => isAnimationFrameAsyncStart,
      isAnimationFramePresentation: () => isAnimationFramePresentation,
      isAnyScriptSourceEvent: () => isAnyScriptSourceEvent,
      isAuctionWorkletDoneWithProcess: () => isAuctionWorkletDoneWithProcess,
      isAuctionWorkletRunningInProcess: () => isAuctionWorkletRunningInProcess,
      isBegin: () => isBegin,
      isBeginCommitCompositorFrame: () => isBeginCommitCompositorFrame,
      isBeginFrame: () => isBeginFrame,
      isBeginMainThreadFrame: () => isBeginMainThreadFrame,
      isBeginRemoteFontLoad: () => isBeginRemoteFontLoad,
      isCommit: () => isCommit,
      isCommitLoad: () => isCommitLoad,
      isComplete: () => isComplete,
      isCompositeLayers: () => isCompositeLayers,
      isConsoleRunTask: () => isConsoleRunTask,
      isConsoleTime: () => isConsoleTime,
      isConsoleTimeStamp: () => isConsoleTimeStamp,
      isDOMStats: () => isDOMStats,
      isDebuggerAsyncTaskRun: () => isDebuggerAsyncTaskRun,
      isDebuggerAsyncTaskScheduled: () => isDebuggerAsyncTaskScheduled,
      isDecodeImage: () => isDecodeImage,
      isDecodeLazyPixelRef: () => isDecodeLazyPixelRef,
      isDidCommitSameDocumentNavigation: () => isDidCommitSameDocumentNavigation,
      isDispatch: () => isDispatch,
      isDisplayListItemListSnapshot: () => isDisplayListItemListSnapshot,
      isDomLoading: () => isDomLoading,
      isDrawFrame: () => isDrawFrame,
      isDrawLazyPixelRef: () => isDrawLazyPixelRef,
      isDroppedFrame: () => isDroppedFrame,
      isEnd: () => isEnd,
      isEventTiming: () => isEventTiming,
      isEventTimingEnd: () => isEventTimingEnd,
      isEventTimingStart: () => isEventTimingStart,
      isFireAnimationFrame: () => isFireAnimationFrame,
      isFireIdleCallback: () => isFireIdleCallback,
      isFirstContentfulPaint: () => isFirstContentfulPaint,
      isFirstPaint: () => isFirstPaint,
      isFlowPhase: () => isFlowPhase,
      isFlowPhaseEvent: () => isFlowPhaseEvent,
      isFrameCommittedInBrowser: () => isFrameCommittedInBrowser,
      isFunctionCall: () => isFunctionCall,
      isGPUTask: () => isGPUTask,
      isHandlePostMessage: () => isHandlePostMessage,
      isInstant: () => isInstant,
      isInteractiveTime: () => isInteractiveTime,
      isInvalidateLayout: () => isInvalidateLayout,
      isInvalidationTracking: () => isInvalidationTracking,
      isJSInvocationEvent: () => isJSInvocationEvent,
      isLargestContentfulPaintCandidate: () => isLargestContentfulPaintCandidate,
      isLargestImagePaintCandidate: () => isLargestImagePaintCandidate,
      isLargestTextPaintCandidate: () => isLargestTextPaintCandidate,
      isLayerTreeHostImplSnapshot: () => isLayerTreeHostImplSnapshot,
      isLayout: () => isLayout,
      isLayoutImageUnsized: () => isLayoutImageUnsized,
      isLayoutInvalidationTracking: () => isLayoutInvalidationTracking,
      isLayoutShift: () => isLayoutShift,
      isLegacyScreenshot: () => isLegacyScreenshot,
      isLegacySyntheticScreenshot: () => isLegacySyntheticScreenshot,
      isLegacyTimelineFrame: () => isLegacyTimelineFrame,
      isLinkPreconnect: () => isLinkPreconnect,
      isMainFrameViewport: () => isMainFrameViewport,
      isMarkDOMContent: () => isMarkDOMContent,
      isMarkLoad: () => isMarkLoad,
      isMarkerEvent: () => isMarkerEvent,
      isNavigationStart: () => isNavigationStart,
      isNeedsBeginFrameChanged: () => isNeedsBeginFrameChanged,
      isNestableAsyncPhase: () => isNestableAsyncPhase,
      isNetworkTrackEntry: () => isNetworkTrackEntry,
      isPaint: () => isPaint,
      isPaintImage: () => isPaintImage,
      isPairableAsyncBegin: () => isPairableAsyncBegin,
      isPairableAsyncEnd: () => isPairableAsyncEnd,
      isPairableAsyncInstant: () => isPairableAsyncInstant,
      isParseAuthorStyleSheetEvent: () => isParseAuthorStyleSheetEvent,
      isParseHTML: () => isParseHTML,
      isParseMetaViewport: () => isParseMetaViewport,
      isPerformanceMark: () => isPerformanceMark,
      isPerformanceMeasure: () => isPerformanceMeasure,
      isPerformanceMeasureBegin: () => isPerformanceMeasureBegin,
      isPhaseAsync: () => isPhaseAsync,
      isPipelineReporter: () => isPipelineReporter,
      isPrePaint: () => isPrePaint,
      isProcessName: () => isProcessName,
      isProfile: () => isProfile,
      isProfileCall: () => isProfileCall,
      isProfileChunk: () => isProfileChunk,
      isRasterTask: () => isRasterTask,
      isRecalcStyle: () => isRecalcStyle,
      isReceivedDataEvent: () => isReceivedDataEvent,
      isRemoteFontLoaded: () => isRemoteFontLoaded,
      isRenderFrameImplCreateChildFrame: () => isRenderFrameImplCreateChildFrame,
      isRendererEvent: () => isRendererEvent,
      isRequestIdleCallback: () => isRequestIdleCallback,
      isRequestMainThreadFrame: () => isRequestMainThreadFrame,
      isResourceChangePriority: () => isResourceChangePriority,
      isResourceFinish: () => isResourceFinish,
      isResourceMarkAsCached: () => isResourceMarkAsCached,
      isResourceReceiveResponse: () => isResourceReceiveResponse,
      isResourceReceivedData: () => isResourceReceivedData,
      isResourceSendRequest: () => isResourceSendRequest,
      isResourceWillSendRequest: () => isResourceWillSendRequest,
      isRunPostTaskCallback: () => isRunPostTaskCallback,
      isRunTask: () => isRunTask,
      isRundownScript: () => isRundownScript,
      isRundownScriptCompiled: () => isRundownScriptCompiled,
      isRundownScriptSource: () => isRundownScriptSource,
      isRundownScriptSourceLarge: () => isRundownScriptSourceLarge,
      isSchedulePostMessage: () => isSchedulePostMessage,
      isSchedulePostTaskCallback: () => isSchedulePostTaskCallback,
      isScheduleStyleInvalidationTracking: () => isScheduleStyleInvalidationTracking,
      isScheduleStyleRecalculation: () => isScheduleStyleRecalculation,
      isScreenshot: () => isScreenshot,
      isScrollLayer: () => isScrollLayer,
      isSelectorStats: () => isSelectorStats,
      isSetLayerId: () => isSetLayerId,
      isStyleInvalidatorInvalidationTracking: () => isStyleInvalidatorInvalidationTracking,
      isStyleRecalcInvalidationTracking: () => isStyleRecalcInvalidationTracking,
      isSyntheticAnimation: () => isSyntheticAnimation,
      isSyntheticBased: () => isSyntheticBased,
      isSyntheticConsoleTiming: () => isSyntheticConsoleTiming,
      isSyntheticCpuProfile: () => isSyntheticCpuProfile,
      isSyntheticInteraction: () => isSyntheticInteraction,
      isSyntheticLayoutShift: () => isSyntheticLayoutShift,
      isSyntheticLayoutShiftCluster: () => isSyntheticLayoutShiftCluster,
      isSyntheticNetworkRequest: () => isSyntheticNetworkRequest,
      isSyntheticUserTiming: () => isSyntheticUserTiming,
      isSyntheticWebSocketConnection: () => isSyntheticWebSocketConnection,
      isThreadName: () => isThreadName,
      isTimerFire: () => isTimerFire,
      isTimerInstall: () => isTimerInstall,
      isTracingSessionIdForWorker: () => isTracingSessionIdForWorker,
      isTracingStartedInBrowser: () => isTracingStartedInBrowser,
      isUpdateCounters: () => isUpdateCounters,
      isUpdateLayer: () => isUpdateLayer,
      isUserTiming: () => isUserTiming,
      isUserTimingMeasure: () => isUserTimingMeasure,
      isV8Compile: () => isV8Compile,
      isWebSocketCreate: () => isWebSocketCreate,
      isWebSocketDestroy: () => isWebSocketDestroy,
      isWebSocketEvent: () => isWebSocketEvent,
      isWebSocketInfo: () => isWebSocketInfo,
      isWebSocketReceiveHandshakeResponse: () => isWebSocketReceiveHandshakeResponse,
      isWebSocketSendHandshakeRequest: () => isWebSocketSendHandshakeRequest,
      isWebSocketTraceEvent: () => isWebSocketTraceEvent,
      isWebSocketTransfer: () => isWebSocketTransfer,
      objectIsCallFrame: () => objectIsCallFrame
    });
    init_TraceEvents = __esm2({
      "node_modules/@paulirish/trace_engine/models/trace/types/TraceEvents.js"() {
        init_process_global();
        (function(Phase2) {
          Phase2["BEGIN"] = "B";
          Phase2["END"] = "E";
          Phase2["COMPLETE"] = "X";
          Phase2["INSTANT"] = "I";
          Phase2["COUNTER"] = "C";
          Phase2["ASYNC_NESTABLE_START"] = "b";
          Phase2["ASYNC_NESTABLE_INSTANT"] = "n";
          Phase2["ASYNC_NESTABLE_END"] = "e";
          Phase2["ASYNC_STEP_INTO"] = "T";
          Phase2["ASYNC_BEGIN"] = "S";
          Phase2["ASYNC_END"] = "F";
          Phase2["ASYNC_STEP_PAST"] = "p";
          Phase2["FLOW_START"] = "s";
          Phase2["FLOW_STEP"] = "t";
          Phase2["FLOW_END"] = "f";
          Phase2["SAMPLE"] = "P";
          Phase2["OBJECT_CREATED"] = "N";
          Phase2["OBJECT_SNAPSHOT"] = "O";
          Phase2["OBJECT_DESTROYED"] = "D";
          Phase2["METADATA"] = "M";
          Phase2["MEMORY_DUMP_GLOBAL"] = "V";
          Phase2["MEMORY_DUMP_PROCESS"] = "v";
          Phase2["MARK"] = "R";
          Phase2["CLOCK_SYNC"] = "c";
        })(Phase || (Phase = {}));
        __name(isNestableAsyncPhase, "isNestableAsyncPhase");
        __name(isPhaseAsync, "isPhaseAsync");
        __name(isFlowPhase, "isFlowPhase");
        (function(Scope22) {
          Scope22["THREAD"] = "t";
          Scope22["PROCESS"] = "p";
          Scope22["GLOBAL"] = "g";
        })(Scope || (Scope = {}));
        __name(objectIsCallFrame, "objectIsCallFrame");
        __name(isRunTask, "isRunTask");
        (function(AuctionWorkletType2) {
          AuctionWorkletType2["BIDDER"] = "bidder";
          AuctionWorkletType2["SELLER"] = "seller";
          AuctionWorkletType2["UNKNOWN"] = "unknown";
        })(AuctionWorkletType || (AuctionWorkletType = {}));
        __name(isAuctionWorkletRunningInProcess, "isAuctionWorkletRunningInProcess");
        __name(isAuctionWorkletDoneWithProcess, "isAuctionWorkletDoneWithProcess");
        __name(isLegacyScreenshot, "isLegacyScreenshot");
        __name(isLegacySyntheticScreenshot, "isLegacySyntheticScreenshot");
        __name(isScreenshot, "isScreenshot");
        markerTypeGuards = [
          isMarkDOMContent,
          isMarkLoad,
          isFirstPaint,
          isFirstContentfulPaint,
          isLargestContentfulPaintCandidate,
          isNavigationStart
        ];
        MarkerName = ["MarkDOMContent", "MarkLoad", "firstPaint", "firstContentfulPaint", "largestContentfulPaint::Candidate"];
        __name(isMarkerEvent, "isMarkerEvent");
        pageLoadEventTypeGuards = [
          ...markerTypeGuards,
          isInteractiveTime
        ];
        __name(eventIsPageLoadEvent, "eventIsPageLoadEvent");
        __name(isTracingSessionIdForWorker, "isTracingSessionIdForWorker");
        NO_NAVIGATION = "NO_NAVIGATION";
        (function(LayoutInvalidationReason2) {
          LayoutInvalidationReason2["SIZE_CHANGED"] = "Size changed";
          LayoutInvalidationReason2["ATTRIBUTE"] = "Attribute";
          LayoutInvalidationReason2["ADDED_TO_LAYOUT"] = "Added to layout";
          LayoutInvalidationReason2["SCROLLBAR_CHANGED"] = "Scrollbar changed";
          LayoutInvalidationReason2["REMOVED_FROM_LAYOUT"] = "Removed from layout";
          LayoutInvalidationReason2["STYLE_CHANGED"] = "Style changed";
          LayoutInvalidationReason2["FONTS_CHANGED"] = "Fonts changed";
          LayoutInvalidationReason2["UNKNOWN"] = "Unknown";
        })(LayoutInvalidationReason || (LayoutInvalidationReason = {}));
        __name(isScheduleStyleInvalidationTracking, "isScheduleStyleInvalidationTracking");
        (function(StyleRecalcInvalidationReason2) {
          StyleRecalcInvalidationReason2["ANIMATION"] = "Animation";
          StyleRecalcInvalidationReason2["RELATED_STYLE_RULE"] = "Related style rule";
        })(StyleRecalcInvalidationReason || (StyleRecalcInvalidationReason = {}));
        __name(isStyleRecalcInvalidationTracking, "isStyleRecalcInvalidationTracking");
        __name(isStyleInvalidatorInvalidationTracking, "isStyleInvalidatorInvalidationTracking");
        __name(isBeginCommitCompositorFrame, "isBeginCommitCompositorFrame");
        __name(isParseMetaViewport, "isParseMetaViewport");
        __name(isLinkPreconnect, "isLinkPreconnect");
        __name(isScheduleStyleRecalculation, "isScheduleStyleRecalculation");
        __name(isRenderFrameImplCreateChildFrame, "isRenderFrameImplCreateChildFrame");
        __name(isLayoutImageUnsized, "isLayoutImageUnsized");
        __name(isPairableAsyncBegin, "isPairableAsyncBegin");
        __name(isPairableAsyncEnd, "isPairableAsyncEnd");
        __name(isPairableAsyncInstant, "isPairableAsyncInstant");
        __name(isAnimationFrameAsyncStart, "isAnimationFrameAsyncStart");
        __name(isAnimationFrameAsyncEnd, "isAnimationFrameAsyncEnd");
        __name(isAnimationFramePresentation, "isAnimationFramePresentation");
        __name(isPipelineReporter, "isPipelineReporter");
        __name(isSyntheticBased, "isSyntheticBased");
        __name(isSyntheticInteraction, "isSyntheticInteraction");
        __name(isDrawFrame, "isDrawFrame");
        __name(isBeginFrame, "isBeginFrame");
        __name(isDroppedFrame, "isDroppedFrame");
        __name(isRequestMainThreadFrame, "isRequestMainThreadFrame");
        __name(isBeginMainThreadFrame, "isBeginMainThreadFrame");
        __name(isNeedsBeginFrameChanged, "isNeedsBeginFrameChanged");
        __name(isCommit, "isCommit");
        __name(isRasterTask, "isRasterTask");
        __name(isCompositeLayers, "isCompositeLayers");
        __name(isActivateLayerTree, "isActivateLayerTree");
        __name(isInvalidationTracking, "isInvalidationTracking");
        __name(isDrawLazyPixelRef, "isDrawLazyPixelRef");
        __name(isDecodeLazyPixelRef, "isDecodeLazyPixelRef");
        __name(isDecodeImage, "isDecodeImage");
        (function(InvalidationEventType2) {
          InvalidationEventType2["StyleInvalidatorInvalidationTracking"] = "StyleInvalidatorInvalidationTracking";
          InvalidationEventType2["StyleRecalcInvalidationTracking"] = "StyleRecalcInvalidationTracking";
        })(InvalidationEventType || (InvalidationEventType = {}));
        (function(SelectorTimingsKey22) {
          SelectorTimingsKey22["Elapsed"] = "elapsed (us)";
          SelectorTimingsKey22["RejectPercentage"] = "reject_percentage";
          SelectorTimingsKey22["FastRejectCount"] = "fast_reject_count";
          SelectorTimingsKey22["MatchAttempts"] = "match_attempts";
          SelectorTimingsKey22["MatchCount"] = "match_count";
          SelectorTimingsKey22["Selector"] = "selector";
          SelectorTimingsKey22["StyleSheetId"] = "style_sheet_id";
          SelectorTimingsKey22["InvalidationCount"] = "invalidation_count";
        })(SelectorTimingsKey || (SelectorTimingsKey = {}));
        __name(isSelectorStats, "isSelectorStats");
        __name(isRecalcStyle, "isRecalcStyle");
        __name(isLayout, "isLayout");
        __name(isInvalidateLayout, "isInvalidateLayout");
        __name(isDebuggerAsyncTaskScheduled, "isDebuggerAsyncTaskScheduled");
        __name(isDebuggerAsyncTaskRun, "isDebuggerAsyncTaskRun");
        __name(ProfileID, "ProfileID");
        __name(CallFrameID, "CallFrameID");
        __name(SampleIndex, "SampleIndex");
        __name(ProcessID, "ProcessID");
        __name(ThreadID, "ThreadID");
        __name(WorkerId, "WorkerId");
        __name(isComplete, "isComplete");
        __name(isBegin, "isBegin");
        __name(isEnd, "isEnd");
        __name(isDispatch, "isDispatch");
        __name(isInstant, "isInstant");
        __name(isRendererEvent, "isRendererEvent");
        __name(isFireIdleCallback, "isFireIdleCallback");
        __name(isSchedulePostMessage, "isSchedulePostMessage");
        __name(isHandlePostMessage, "isHandlePostMessage");
        __name(isUpdateCounters, "isUpdateCounters");
        __name(isDOMStats, "isDOMStats");
        __name(isThreadName, "isThreadName");
        __name(isProcessName, "isProcessName");
        __name(isTracingStartedInBrowser, "isTracingStartedInBrowser");
        __name(isFrameCommittedInBrowser, "isFrameCommittedInBrowser");
        __name(isCommitLoad, "isCommitLoad");
        __name(isAnimation, "isAnimation");
        __name(isSyntheticAnimation, "isSyntheticAnimation");
        __name(isLayoutShift, "isLayoutShift");
        __name(isLayoutInvalidationTracking, "isLayoutInvalidationTracking");
        __name(isFirstContentfulPaint, "isFirstContentfulPaint");
        __name(isLargestContentfulPaintCandidate, "isLargestContentfulPaintCandidate");
        __name(isLargestImagePaintCandidate, "isLargestImagePaintCandidate");
        __name(isLargestTextPaintCandidate, "isLargestTextPaintCandidate");
        __name(isMarkLoad, "isMarkLoad");
        __name(isFirstPaint, "isFirstPaint");
        __name(isMarkDOMContent, "isMarkDOMContent");
        __name(isInteractiveTime, "isInteractiveTime");
        __name(isEventTiming, "isEventTiming");
        __name(isEventTimingEnd, "isEventTimingEnd");
        __name(isEventTimingStart, "isEventTimingStart");
        __name(isGPUTask, "isGPUTask");
        __name(isProfile, "isProfile");
        __name(isSyntheticCpuProfile, "isSyntheticCpuProfile");
        __name(isProfileChunk, "isProfileChunk");
        __name(isResourceChangePriority, "isResourceChangePriority");
        __name(isResourceSendRequest, "isResourceSendRequest");
        __name(isResourceReceiveResponse, "isResourceReceiveResponse");
        __name(isResourceMarkAsCached, "isResourceMarkAsCached");
        __name(isResourceFinish, "isResourceFinish");
        __name(isResourceWillSendRequest, "isResourceWillSendRequest");
        __name(isResourceReceivedData, "isResourceReceivedData");
        __name(isReceivedDataEvent, "isReceivedDataEvent");
        __name(isSyntheticNetworkRequest, "isSyntheticNetworkRequest");
        __name(isSyntheticWebSocketConnection, "isSyntheticWebSocketConnection");
        __name(isNetworkTrackEntry, "isNetworkTrackEntry");
        __name(isPrePaint, "isPrePaint");
        __name(isNavigationStart, "isNavigationStart");
        __name(isDidCommitSameDocumentNavigation, "isDidCommitSameDocumentNavigation");
        __name(isMainFrameViewport, "isMainFrameViewport");
        __name(isSyntheticUserTiming, "isSyntheticUserTiming");
        __name(isSyntheticConsoleTiming, "isSyntheticConsoleTiming");
        __name(isUserTiming, "isUserTiming");
        __name(isDomLoading, "isDomLoading");
        __name(isBeginRemoteFontLoad, "isBeginRemoteFontLoad");
        __name(isRemoteFontLoaded, "isRemoteFontLoaded");
        __name(isPerformanceMeasure, "isPerformanceMeasure");
        __name(isPerformanceMeasureBegin, "isPerformanceMeasureBegin");
        __name(isPerformanceMark, "isPerformanceMark");
        __name(isConsoleTime, "isConsoleTime");
        __name(isConsoleTimeStamp, "isConsoleTimeStamp");
        __name(isUserTimingMeasure, "isUserTimingMeasure");
        __name(isParseHTML, "isParseHTML");
        __name(isSyntheticLayoutShift, "isSyntheticLayoutShift");
        __name(isSyntheticLayoutShiftCluster, "isSyntheticLayoutShiftCluster");
        __name(isProfileCall, "isProfileCall");
        __name(isPaint, "isPaint");
        __name(isPaintImage, "isPaintImage");
        __name(isScrollLayer, "isScrollLayer");
        __name(isSetLayerId, "isSetLayerId");
        __name(isUpdateLayer, "isUpdateLayer");
        __name(isDisplayListItemListSnapshot, "isDisplayListItemListSnapshot");
        __name(isLayerTreeHostImplSnapshot, "isLayerTreeHostImplSnapshot");
        __name(isFireAnimationFrame, "isFireAnimationFrame");
        __name(isTimerInstall, "isTimerInstall");
        __name(isTimerFire, "isTimerFire");
        __name(isRequestIdleCallback, "isRequestIdleCallback");
        __name(isWebSocketCreate, "isWebSocketCreate");
        __name(isWebSocketInfo, "isWebSocketInfo");
        __name(isWebSocketTransfer, "isWebSocketTransfer");
        __name(isWebSocketSendHandshakeRequest, "isWebSocketSendHandshakeRequest");
        __name(isWebSocketReceiveHandshakeResponse, "isWebSocketReceiveHandshakeResponse");
        __name(isWebSocketDestroy, "isWebSocketDestroy");
        __name(isWebSocketTraceEvent, "isWebSocketTraceEvent");
        __name(isWebSocketEvent, "isWebSocketEvent");
        __name(isV8Compile, "isV8Compile");
        __name(isFunctionCall, "isFunctionCall");
        __name(isSchedulePostTaskCallback, "isSchedulePostTaskCallback");
        __name(isRunPostTaskCallback, "isRunPostTaskCallback");
        __name(isAbortPostTaskCallback, "isAbortPostTaskCallback");
        __name(isJSInvocationEvent, "isJSInvocationEvent");
        __name(isConsoleRunTask, "isConsoleRunTask");
        __name(isFlowPhaseEvent, "isFlowPhaseEvent");
        __name(isParseAuthorStyleSheetEvent, "isParseAuthorStyleSheetEvent");
        (function(Name22) {
          Name22["THREAD_NAME"] = "thread_name";
          Name22["PROGRAM"] = "Program";
          Name22["RUN_TASK"] = "RunTask";
          Name22["ASYNC_TASK"] = "AsyncTask";
          Name22["RUN_MICROTASKS"] = "RunMicrotasks";
          Name22["XHR_LOAD"] = "XHRLoad";
          Name22["XHR_READY_STATE_CHANGED"] = "XHRReadyStateChange";
          Name22["PARSE_HTML"] = "ParseHTML";
          Name22["PARSE_CSS"] = "ParseAuthorStyleSheet";
          Name22["COMPILE_CODE"] = "V8.CompileCode";
          Name22["COMPILE_MODULE"] = "V8.CompileModule";
          Name22["COMPILE"] = "v8.compile";
          Name22["COMPILE_SCRIPT"] = "V8.CompileScript";
          Name22["OPTIMIZE"] = "V8.OptimizeCode";
          Name22["WASM_STREAM_FROM_RESPONSE_CALLBACK"] = "v8.wasm.streamFromResponseCallback";
          Name22["WASM_COMPILED_MODULE"] = "v8.wasm.compiledModule";
          Name22["WASM_CACHED_MODULE"] = "v8.wasm.cachedModule";
          Name22["WASM_MODULE_CACHE_HIT"] = "v8.wasm.moduleCacheHit";
          Name22["WASM_MODULE_CACHE_INVALID"] = "v8.wasm.moduleCacheInvalid";
          Name22["PROFILE_CALL"] = "ProfileCall";
          Name22["EVALUATE_SCRIPT"] = "EvaluateScript";
          Name22["FUNCTION_CALL"] = "FunctionCall";
          Name22["EVENT_DISPATCH"] = "EventDispatch";
          Name22["EVALUATE_MODULE"] = "v8.evaluateModule";
          Name22["REQUEST_MAIN_THREAD_FRAME"] = "RequestMainThreadFrame";
          Name22["REQUEST_ANIMATION_FRAME"] = "RequestAnimationFrame";
          Name22["CANCEL_ANIMATION_FRAME"] = "CancelAnimationFrame";
          Name22["FIRE_ANIMATION_FRAME"] = "FireAnimationFrame";
          Name22["REQUEST_IDLE_CALLBACK"] = "RequestIdleCallback";
          Name22["CANCEL_IDLE_CALLBACK"] = "CancelIdleCallback";
          Name22["FIRE_IDLE_CALLBACK"] = "FireIdleCallback";
          Name22["TIMER_INSTALL"] = "TimerInstall";
          Name22["TIMER_REMOVE"] = "TimerRemove";
          Name22["TIMER_FIRE"] = "TimerFire";
          Name22["WEB_SOCKET_CREATE"] = "WebSocketCreate";
          Name22["WEB_SOCKET_SEND_HANDSHAKE"] = "WebSocketSendHandshakeRequest";
          Name22["WEB_SOCKET_RECEIVE_HANDSHAKE"] = "WebSocketReceiveHandshakeResponse";
          Name22["WEB_SOCKET_DESTROY"] = "WebSocketDestroy";
          Name22["WEB_SOCKET_SEND"] = "WebSocketSend";
          Name22["WEB_SOCKET_RECEIVE"] = "WebSocketReceive";
          Name22["CRYPTO_DO_ENCRYPT"] = "DoEncrypt";
          Name22["CRYPTO_DO_ENCRYPT_REPLY"] = "DoEncryptReply";
          Name22["CRYPTO_DO_DECRYPT"] = "DoDecrypt";
          Name22["CRYPTO_DO_DECRYPT_REPLY"] = "DoDecryptReply";
          Name22["CRYPTO_DO_DIGEST"] = "DoDigest";
          Name22["CRYPTO_DO_DIGEST_REPLY"] = "DoDigestReply";
          Name22["CRYPTO_DO_SIGN"] = "DoSign";
          Name22["CRYPTO_DO_SIGN_REPLY"] = "DoSignReply";
          Name22["CRYPTO_DO_VERIFY"] = "DoVerify";
          Name22["CRYPTO_DO_VERIFY_REPLY"] = "DoVerifyReply";
          Name22["V8_EXECUTE"] = "V8.Execute";
          Name22["V8_CONSOLE_RUN_TASK"] = "V8Console::runTask";
          Name22["SCHEDULE_POST_TASK_CALLBACK"] = "SchedulePostTaskCallback";
          Name22["RUN_POST_TASK_CALLBACK"] = "RunPostTaskCallback";
          Name22["ABORT_POST_TASK_CALLBACK"] = "AbortPostTaskCallback";
          Name22["DEBUGGER_ASYNC_TASK_RUN"] = "v8::Debugger::AsyncTaskRun";
          Name22["DEBUGGER_ASYNC_TASK_SCHEDULED"] = "v8::Debugger::AsyncTaskScheduled";
          Name22["GC"] = "GCEvent";
          Name22["DOMGC"] = "BlinkGC.AtomicPhase";
          Name22["MAJOR_GC"] = "MajorGC";
          Name22["MINOR_GC"] = "MinorGC";
          Name22["GC_COLLECT_GARBARGE"] = "BlinkGC.AtomicPhase";
          Name22["CPPGC_SWEEP"] = "CppGC.IncrementalSweep";
          Name22["SCHEDULE_STYLE_RECALCULATION"] = "ScheduleStyleRecalculation";
          Name22["LAYOUT"] = "Layout";
          Name22["RECALC_STYLE"] = "UpdateLayoutTree";
          Name22["INVALIDATE_LAYOUT"] = "InvalidateLayout";
          Name22["LAYOUT_INVALIDATION_TRACKING"] = "LayoutInvalidationTracking";
          Name22["COMPUTE_INTERSECTION"] = "ComputeIntersections";
          Name22["HIT_TEST"] = "HitTest";
          Name22["PRE_PAINT"] = "PrePaint";
          Name22["LAYERIZE"] = "Layerize";
          Name22["LAYOUT_SHIFT"] = "LayoutShift";
          Name22["SYNTHETIC_LAYOUT_SHIFT"] = "SyntheticLayoutShift";
          Name22["SYNTHETIC_LAYOUT_SHIFT_CLUSTER"] = "SyntheticLayoutShiftCluster";
          Name22["UPDATE_LAYER_TREE"] = "UpdateLayerTree";
          Name22["SCHEDULE_STYLE_INVALIDATION_TRACKING"] = "ScheduleStyleInvalidationTracking";
          Name22["STYLE_RECALC_INVALIDATION_TRACKING"] = "StyleRecalcInvalidationTracking";
          Name22["STYLE_INVALIDATOR_INVALIDATION_TRACKING"] = "StyleInvalidatorInvalidationTracking";
          Name22["SELECTOR_STATS"] = "SelectorStats";
          Name22["BEGIN_COMMIT_COMPOSITOR_FRAME"] = "BeginCommitCompositorFrame";
          Name22["PARSE_META_VIEWPORT"] = "ParseMetaViewport";
          Name22["SCROLL_LAYER"] = "ScrollLayer";
          Name22["UPDATE_LAYER"] = "UpdateLayer";
          Name22["PAINT_SETUP"] = "PaintSetup";
          Name22["PAINT"] = "Paint";
          Name22["PAINT_IMAGE"] = "PaintImage";
          Name22["COMMIT"] = "Commit";
          Name22["COMPOSITE_LAYERS"] = "CompositeLayers";
          Name22["RASTER_TASK"] = "RasterTask";
          Name22["IMAGE_DECODE_TASK"] = "ImageDecodeTask";
          Name22["IMAGE_UPLOAD_TASK"] = "ImageUploadTask";
          Name22["DECODE_IMAGE"] = "Decode Image";
          Name22["DRAW_LAZY_PIXEL_REF"] = "Draw LazyPixelRef";
          Name22["DECODE_LAZY_PIXEL_REF"] = "Decode LazyPixelRef";
          Name22["GPU_TASK"] = "GPUTask";
          Name22["RASTERIZE"] = "Rasterize";
          Name22["EVENT_TIMING"] = "EventTiming";
          Name22["OPTIMIZE_CODE"] = "V8.OptimizeCode";
          Name22["CACHE_SCRIPT"] = "v8.produceCache";
          Name22["CACHE_MODULE"] = "v8.produceModuleCache";
          Name22["V8_SAMPLE"] = "V8Sample";
          Name22["JIT_CODE_ADDED"] = "JitCodeAdded";
          Name22["JIT_CODE_MOVED"] = "JitCodeMoved";
          Name22["STREAMING_COMPILE_SCRIPT"] = "v8.parseOnBackground";
          Name22["STREAMING_COMPILE_SCRIPT_WAITING"] = "v8.parseOnBackgroundWaiting";
          Name22["STREAMING_COMPILE_SCRIPT_PARSING"] = "v8.parseOnBackgroundParsing";
          Name22["BACKGROUND_DESERIALIZE"] = "v8.deserializeOnBackground";
          Name22["FINALIZE_DESERIALIZATION"] = "V8.FinalizeDeserialization";
          Name22["COMMIT_LOAD"] = "CommitLoad";
          Name22["MARK_LOAD"] = "MarkLoad";
          Name22["MARK_DOM_CONTENT"] = "MarkDOMContent";
          Name22["MARK_FIRST_PAINT"] = "firstPaint";
          Name22["MARK_FCP"] = "firstContentfulPaint";
          Name22["MARK_LCP_CANDIDATE"] = "largestContentfulPaint::Candidate";
          Name22["MARK_LCP_INVALIDATE"] = "largestContentfulPaint::Invalidate";
          Name22["NAVIGATION_START"] = "navigationStart";
          Name22["CONSOLE_TIME"] = "ConsoleTime";
          Name22["USER_TIMING"] = "UserTiming";
          Name22["INTERACTIVE_TIME"] = "InteractiveTime";
          Name22["TIME_STAMP"] = "TimeStamp";
          Name22["BEGIN_FRAME"] = "BeginFrame";
          Name22["NEEDS_BEGIN_FRAME_CHANGED"] = "NeedsBeginFrameChanged";
          Name22["BEGIN_MAIN_THREAD_FRAME"] = "BeginMainThreadFrame";
          Name22["ACTIVATE_LAYER_TREE"] = "ActivateLayerTree";
          Name22["DRAW_FRAME"] = "DrawFrame";
          Name22["DROPPED_FRAME"] = "DroppedFrame";
          Name22["FRAME_STARTED_LOADING"] = "FrameStartedLoading";
          Name22["PIPELINE_REPORTER"] = "PipelineReporter";
          Name22["SCREENSHOT"] = "Screenshot";
          Name22["RESOURCE_WILL_SEND_REQUEST"] = "ResourceWillSendRequest";
          Name22["RESOURCE_SEND_REQUEST"] = "ResourceSendRequest";
          Name22["RESOURCE_RECEIVE_RESPONSE"] = "ResourceReceiveResponse";
          Name22["RESOURCE_RECEIVE_DATA"] = "ResourceReceivedData";
          Name22["RESOURCE_FINISH"] = "ResourceFinish";
          Name22["RESOURCE_MARK_AS_CACHED"] = "ResourceMarkAsCached";
          Name22["WEB_SOCKET_SEND_HANDSHAKE_REQUEST"] = "WebSocketSendHandshakeRequest";
          Name22["WEB_SOCKET_RECEIVE_HANDSHAKE_REQUEST"] = "WebSocketReceiveHandshakeResponse";
          Name22["CPU_PROFILE"] = "CpuProfile";
          Name22["PROFILE"] = "Profile";
          Name22["START_PROFILING"] = "CpuProfiler::StartProfiling";
          Name22["PROFILE_CHUNK"] = "ProfileChunk";
          Name22["UPDATE_COUNTERS"] = "UpdateCounters";
          Name22["JS_SAMPLE"] = "JSSample";
          Name22["ANIMATION"] = "Animation";
          Name22["PARSE_AUTHOR_STYLE_SHEET"] = "ParseAuthorStyleSheet";
          Name22["EMBEDDER_CALLBACK"] = "EmbedderCallback";
          Name22["SET_LAYER_TREE_ID"] = "SetLayerTreeId";
          Name22["TRACING_STARTED_IN_PAGE"] = "TracingStartedInPage";
          Name22["TRACING_STARTED_IN_BROWSER"] = "TracingStartedInBrowser";
          Name22["TRACING_SESSION_ID_FOR_WORKER"] = "TracingSessionIdForWorker";
          Name22["LAZY_PIXEL_REF"] = "LazyPixelRef";
          Name22["LAYER_TREE_HOST_IMPL_SNAPSHOT"] = "cc::LayerTreeHostImpl";
          Name22["PICTURE_SNAPSHOT"] = "cc::Picture";
          Name22["DISPLAY_ITEM_LIST_SNAPSHOT"] = "cc::DisplayItemList";
          Name22["INPUT_LATENCY_MOUSE_MOVE"] = "InputLatency::MouseMove";
          Name22["INPUT_LATENCY_MOUSE_WHEEL"] = "InputLatency::MouseWheel";
          Name22["IMPL_SIDE_FLING"] = "InputHandlerProxy::HandleGestureFling::started";
          Name22["SCHEDULE_POST_MESSAGE"] = "SchedulePostMessage";
          Name22["HANDLE_POST_MESSAGE"] = "HandlePostMessage";
          Name22["RENDER_FRAME_IMPL_CREATE_CHILD_FRAME"] = "RenderFrameImpl::createChildFrame";
          Name22["LAYOUT_IMAGE_UNSIZED"] = "LayoutImageUnsized";
          Name22["DOM_LOADING"] = "domLoading";
          Name22["BEGIN_REMOTE_FONT_LOAD"] = "BeginRemoteFontLoad";
          Name22["REMOTE_FONT_LOADED"] = "RemoteFontLoaded";
          Name22["ANIMATION_FRAME"] = "AnimationFrame";
          Name22["ANIMATION_FRAME_PRESENTATION"] = "AnimationFrame::Presentation";
          Name22["SYNTHETIC_NETWORK_REQUEST"] = "SyntheticNetworkRequest";
          Name22["USER_TIMING_MEASURE"] = "UserTiming::Measure";
          Name22["LINK_PRECONNECT"] = "LinkPreconnect";
        })(Name || (Name = {}));
        Categories = {
          Console: "blink.console",
          UserTiming: "blink.user_timing",
          Loading: "loading"
        };
        __name(isLegacyTimelineFrame, "isLegacyTimelineFrame");
        __name(isRundownScriptCompiled, "isRundownScriptCompiled");
        __name(isRundownScript, "isRundownScript");
        __name(isRundownScriptSource, "isRundownScriptSource");
        __name(isRundownScriptSourceLarge, "isRundownScriptSourceLarge");
        __name(isAnyScriptSourceEvent, "isAnyScriptSourceEvent");
      }
    });
    init_types2 = __esm2({
      "node_modules/@paulirish/trace_engine/models/trace/types/types.js"() {
        init_process_global();
        init_Configuration();
        init_Extensions();
        init_File();
        init_Overlays();
        init_Timing();
        init_TraceEvents();
      }
    });
    helpers_exports = {};
    __export2(helpers_exports, {
      addEventToEntityMapping: () => addEventToEntityMapping,
      addNetworkRequestToEntityMapping: () => addNetworkRequestToEntityMapping,
      getEntityForEvent: () => getEntityForEvent,
      getEntityForUrl: () => getEntityForUrl,
      getNonResolvedURL: () => getNonResolvedURL,
      makeUpEntity: () => makeUpEntity
    });
    init_helpers = __esm2({
      "node_modules/@paulirish/trace_engine/models/trace/handlers/helpers.js"() {
        init_process_global();
        init_third_party_web();
        init_types2();
        __name(getEntityForEvent, "getEntityForEvent");
        __name(getEntityForUrl, "getEntityForUrl");
        __name(getNonResolvedURL, "getNonResolvedURL");
        __name(makeUpEntity, "makeUpEntity");
        __name(getChromeExtensionOrigin, "getChromeExtensionOrigin");
        __name(makeUpChromeExtensionEntity, "makeUpChromeExtensionEntity");
        __name(addEventToEntityMapping, "addEventToEntityMapping");
        __name(addNetworkRequestToEntityMapping, "addNetworkRequestToEntityMapping");
      }
    });
    ArrayUtilities_exports = {};
    __export2(ArrayUtilities_exports, {
      DEFAULT_COMPARATOR: () => DEFAULT_COMPARATOR,
      arrayDoesNotContainNullOrUndefined: () => arrayDoesNotContainNullOrUndefined,
      binaryIndexOf: () => binaryIndexOf,
      intersectOrdered: () => intersectOrdered,
      lowerBound: () => lowerBound,
      mergeOrdered: () => mergeOrdered,
      nearestIndexFromBeginning: () => nearestIndexFromBeginning,
      nearestIndexFromEnd: () => nearestIndexFromEnd,
      removeElement: () => removeElement,
      sortRange: () => sortRange,
      upperBound: () => upperBound
    });
    init_ArrayUtilities = __esm2({
      "node_modules/@paulirish/trace_engine/core/platform/ArrayUtilities.js"() {
        init_process_global();
        removeElement = /* @__PURE__ */ __name((array2, element, firstOnly) => {
          let index2 = array2.indexOf(element);
          if (index2 === -1) {
            return false;
          }
          if (firstOnly) {
            array2.splice(index2, 1);
            return true;
          }
          for (let i = index2 + 1, n = array2.length; i < n; ++i) {
            if (array2[i] !== element) {
              array2[index2++] = array2[i];
            }
          }
          array2.length = index2;
          return true;
        }, "removeElement");
        __name(swap, "swap");
        __name(partition, "partition");
        __name(quickSortRange, "quickSortRange");
        __name(sortRange, "sortRange");
        binaryIndexOf = /* @__PURE__ */ __name((array2, value, comparator2) => {
          const index2 = lowerBound(array2, value, comparator2);
          return index2 < array2.length && comparator2(value, array2[index2]) === 0 ? index2 : -1;
        }, "binaryIndexOf");
        __name(mergeOrIntersect, "mergeOrIntersect");
        intersectOrdered = /* @__PURE__ */ __name((array1, array2, comparator2) => {
          return mergeOrIntersect(array1, array2, comparator2, false);
        }, "intersectOrdered");
        mergeOrdered = /* @__PURE__ */ __name((array1, array2, comparator2) => {
          return mergeOrIntersect(array1, array2, comparator2, true);
        }, "mergeOrdered");
        DEFAULT_COMPARATOR = /* @__PURE__ */ __name((a, b) => {
          return a < b ? -1 : a > b ? 1 : 0;
        }, "DEFAULT_COMPARATOR");
        __name(lowerBound, "lowerBound");
        __name(upperBound, "upperBound");
        __name(nearestIndex, "nearestIndex");
        __name(nearestIndexFromBeginning, "nearestIndexFromBeginning");
        __name(nearestIndexFromEnd, "nearestIndexFromEnd");
        __name(arrayDoesNotContainNullOrUndefined, "arrayDoesNotContainNullOrUndefined");
      }
    });
    init_Brand = __esm2({
      "node_modules/@paulirish/trace_engine/core/platform/Brand.js"() {
        init_process_global();
      }
    });
    init_Constructor = __esm2({
      "node_modules/@paulirish/trace_engine/core/platform/Constructor.js"() {
        init_process_global();
      }
    });
    init_DateUtilities = __esm2({
      "node_modules/@paulirish/trace_engine/core/platform/DateUtilities.js"() {
        init_process_global();
      }
    });
    init_DevToolsPath = __esm2({
      "node_modules/@paulirish/trace_engine/core/platform/DevToolsPath.js"() {
        init_process_global();
      }
    });
    init_DOMUtilities = __esm2({
      "node_modules/@paulirish/trace_engine/core/platform/DOMUtilities.js"() {
        init_process_global();
      }
    });
    init_KeyboardUtilities = __esm2({
      "node_modules/@paulirish/trace_engine/core/platform/KeyboardUtilities.js"() {
        init_process_global();
      }
    });
    MapUtilities_exports = {};
    __export2(MapUtilities_exports, {
      Multimap: () => Multimap,
      getWithDefault: () => getWithDefault,
      inverse: () => inverse
    });
    init_MapUtilities = __esm2({
      "node_modules/@paulirish/trace_engine/core/platform/MapUtilities.js"() {
        init_process_global();
        inverse = /* @__PURE__ */ __name(function(map2) {
          const result = new Multimap();
          for (const [key, value] of map2.entries()) {
            result.set(value, key);
          }
          return result;
        }, "inverse");
        Multimap = class {
          static {
            __name(this, "Multimap");
          }
          map = /* @__PURE__ */ new Map();
          set(key, value) {
            let set = this.map.get(key);
            if (!set) {
              set = /* @__PURE__ */ new Set();
              this.map.set(key, set);
            }
            set.add(value);
          }
          get(key) {
            return this.map.get(key) || /* @__PURE__ */ new Set();
          }
          has(key) {
            return this.map.has(key);
          }
          hasValue(key, value) {
            const set = this.map.get(key);
            if (!set) {
              return false;
            }
            return set.has(value);
          }
          get size() {
            return this.map.size;
          }
          delete(key, value) {
            const values = this.get(key);
            if (!values) {
              return false;
            }
            const result = values.delete(value);
            if (!values.size) {
              this.map.delete(key);
            }
            return result;
          }
          deleteAll(key) {
            this.map.delete(key);
          }
          keysArray() {
            return [...this.map.keys()];
          }
          keys() {
            return this.map.keys();
          }
          valuesArray() {
            const result = [];
            for (const set of this.map.values()) {
              result.push(...set.values());
            }
            return result;
          }
          clear() {
            this.map.clear();
          }
        };
        __name(getWithDefault, "getWithDefault");
      }
    });
    init_MimeType = __esm2({
      "node_modules/@paulirish/trace_engine/core/platform/MimeType.js"() {
        init_process_global();
      }
    });
    NumberUtilities_exports = {};
    __export2(NumberUtilities_exports, {
      aspectRatio: () => aspectRatio,
      clamp: () => clamp,
      floor: () => floor,
      greatestCommonDivisor: () => greatestCommonDivisor,
      mod: () => mod,
      toFixedIfFloating: () => toFixedIfFloating,
      withThousandsSeparator: () => withThousandsSeparator
    });
    init_NumberUtilities = __esm2({
      "node_modules/@paulirish/trace_engine/core/platform/NumberUtilities.js"() {
        init_process_global();
        clamp = /* @__PURE__ */ __name((num, min, max) => {
          let clampedNumber = num;
          if (num < min) {
            clampedNumber = min;
          } else if (num > max) {
            clampedNumber = max;
          }
          return clampedNumber;
        }, "clamp");
        mod = /* @__PURE__ */ __name((m, n) => {
          return (m % n + n) % n;
        }, "mod");
        toFixedIfFloating = /* @__PURE__ */ __name((value) => {
          if (!value || Number.isNaN(Number(value))) {
            return value;
          }
          const number2 = Number(value);
          return number2 % 1 ? number2.toFixed(3) : String(number2);
        }, "toFixedIfFloating");
        floor = /* @__PURE__ */ __name((value, precision = 0) => {
          if (precision > 0 && precision < 1) {
            precision = 1 / precision;
            return Math.floor(value / precision) * precision;
          }
          const mult = Math.pow(10, precision);
          return Math.floor(value * mult) / mult;
        }, "floor");
        greatestCommonDivisor = /* @__PURE__ */ __name((a, b) => {
          a = Math.round(a);
          b = Math.round(b);
          while (b !== 0) {
            const t = b;
            b = a % b;
            a = t;
          }
          return a;
        }, "greatestCommonDivisor");
        commonRatios = /* @__PURE__ */ new Map([
          ["8\u22365", "16\u223610"]
        ]);
        aspectRatio = /* @__PURE__ */ __name((width, height) => {
          const divisor = greatestCommonDivisor(width, height);
          if (divisor !== 0) {
            width /= divisor;
            height /= divisor;
          }
          const result = `${width}\u2236${height}`;
          return commonRatios.get(result) || result;
        }, "aspectRatio");
        withThousandsSeparator = /* @__PURE__ */ __name(function(num) {
          let str = String(num);
          const re2 = /(\d+)(\d{3})/;
          while (str.match(re2)) {
            str = str.replace(re2, "$1\xA0$2");
          }
          return str;
        }, "withThousandsSeparator");
      }
    });
    init_StringUtilities = __esm2({
      "node_modules/@paulirish/trace_engine/core/platform/StringUtilities.js"() {
        init_process_global();
      }
    });
    init_Timing2 = __esm2({
      "node_modules/@paulirish/trace_engine/core/platform/Timing.js"() {
        init_process_global();
      }
    });
    init_TypedArrayUtilities = __esm2({
      "node_modules/@paulirish/trace_engine/core/platform/TypedArrayUtilities.js"() {
        init_process_global();
      }
    });
    TypescriptUtilities_exports = {};
    __export2(TypescriptUtilities_exports, {
      assertNever: () => assertNever,
      assertNotNullOrUndefined: () => assertNotNullOrUndefined,
      assertUnhandled: () => assertUnhandled
    });
    init_TypescriptUtilities = __esm2({
      "node_modules/@paulirish/trace_engine/core/platform/TypescriptUtilities.js"() {
        init_process_global();
        __name(assertNotNullOrUndefined, "assertNotNullOrUndefined");
        __name(assertNever, "assertNever");
        __name(assertUnhandled, "assertUnhandled");
      }
    });
    init_UIString = __esm2({
      "node_modules/@paulirish/trace_engine/core/platform/UIString.js"() {
        init_process_global();
      }
    });
    init_UserVisibleError = __esm2({
      "node_modules/@paulirish/trace_engine/core/platform/UserVisibleError.js"() {
        init_process_global();
      }
    });
    init_platform = __esm2({
      "node_modules/@paulirish/trace_engine/core/platform/platform.js"() {
        init_process_global();
        init_ArrayUtilities();
        init_Brand();
        init_Constructor();
        init_DateUtilities();
        init_DevToolsPath();
        init_DOMUtilities();
        init_KeyboardUtilities();
        init_MapUtilities();
        init_MimeType();
        init_NumberUtilities();
        init_StringUtilities();
        init_Timing2();
        init_TypedArrayUtilities();
        init_TypescriptUtilities();
        init_UIString();
        init_UserVisibleError();
        init_TypescriptUtilities();
      }
    });
    SyntheticEvents_exports = {};
    __export2(SyntheticEvents_exports, {
      SyntheticEventsManager: () => SyntheticEventsManager
    });
    init_SyntheticEvents = __esm2({
      "node_modules/@paulirish/trace_engine/models/trace/helpers/SyntheticEvents.js"() {
        init_process_global();
        activeManager = null;
        SyntheticEventsManager = class _SyntheticEventsManager {
          static {
            __name(this, "SyntheticEventsManager");
          }
          /**
           * All synthetic entries created in a trace from a corresponding trace events.
           * (ProfileCalls are excluded because they are not based on a real trace event)
           */
          #syntheticTraces = [];
          /**
           * All raw entries from a trace.
           */
          #rawTraceEvents = [];
          static activate(manager) {
            activeManager = manager;
          }
          static createAndActivate(rawEvents) {
            const manager = new _SyntheticEventsManager(rawEvents);
            _SyntheticEventsManager.activate(manager);
            return manager;
          }
          static getActiveManager() {
            if (!activeManager) {
              throw new Error("Attempted to get a SyntheticEventsManager without initializing");
            }
            return activeManager;
          }
          static reset() {
            activeManager = null;
          }
          static registerSyntheticEvent(syntheticEvent) {
            try {
              return _SyntheticEventsManager.getActiveManager().#registerSyntheticEvent(syntheticEvent);
            } catch {
              return syntheticEvent;
            }
          }
          constructor(rawEvents) {
            this.#rawTraceEvents = rawEvents;
          }
          /**
           * Registers and returns a branded synthetic event. Synthetic events need to
           * be created with this method to ensure they are registered and made
           * available to load events using serialized keys.
           */
          #registerSyntheticEvent(syntheticEvent) {
            const rawIndex = this.#rawTraceEvents.indexOf(syntheticEvent.rawSourceEvent);
            if (rawIndex < 0) {
              throw new Error("Attempted to register a synthetic event paired to an unknown raw event.");
            }
            const eventAsSynthetic = syntheticEvent;
            this.#syntheticTraces[rawIndex] = eventAsSynthetic;
            return eventAsSynthetic;
          }
          syntheticEventForRawEventIndex(rawEventIndex) {
            const syntheticEvent = this.#syntheticTraces.at(rawEventIndex);
            if (!syntheticEvent) {
              throw new Error(`Attempted to get a synthetic event from an unknown raw event index: ${rawEventIndex}`);
            }
            return syntheticEvent;
          }
          getSyntheticTraces() {
            return this.#syntheticTraces;
          }
          getRawTraceEvents() {
            return this.#rawTraceEvents;
          }
        };
      }
    });
    Timing_exports3 = {};
    __export2(Timing_exports3, {
      boundsIncludeTimeRange: () => boundsIncludeTimeRange,
      combineTraceWindowsMicro: () => combineTraceWindowsMicro,
      eventIsInBounds: () => eventIsInBounds,
      eventTimingsMicroSeconds: () => eventTimingsMicroSeconds,
      eventTimingsMilliSeconds: () => eventTimingsMilliSeconds,
      expandWindowByPercentOrToOneMillisecond: () => expandWindowByPercentOrToOneMillisecond,
      microToMilli: () => microToMilli,
      microToSeconds: () => microToSeconds,
      milliToMicro: () => milliToMicro,
      secondsToMicro: () => secondsToMicro,
      secondsToMilli: () => secondsToMilli,
      timeStampForEventAdjustedByClosestNavigation: () => timeStampForEventAdjustedByClosestNavigation,
      timestampIsInBounds: () => timestampIsInBounds,
      traceWindowFromEvent: () => traceWindowFromEvent,
      traceWindowFromMicroSeconds: () => traceWindowFromMicroSeconds,
      traceWindowFromMilliSeconds: () => traceWindowFromMilliSeconds,
      traceWindowFromOverlay: () => traceWindowFromOverlay,
      traceWindowMicroSecondsToMilliSeconds: () => traceWindowMicroSecondsToMilliSeconds,
      traceWindowMilliSeconds: () => traceWindowMilliSeconds,
      windowFitsInsideBounds: () => windowFitsInsideBounds,
      windowsEqual: () => windowsEqual
    });
    init_Timing3 = __esm2({
      "node_modules/@paulirish/trace_engine/models/trace/helpers/Timing.js"() {
        init_process_global();
        init_platform();
        init_types2();
        init_Trace();
        milliToMicro = /* @__PURE__ */ __name((value) => Timing_exports.Micro(value * 1e3), "milliToMicro");
        secondsToMilli = /* @__PURE__ */ __name((value) => Timing_exports.Milli(value * 1e3), "secondsToMilli");
        secondsToMicro = /* @__PURE__ */ __name((value) => milliToMicro(secondsToMilli(value)), "secondsToMicro");
        microToMilli = /* @__PURE__ */ __name((value) => Timing_exports.Milli(value / 1e3), "microToMilli");
        microToSeconds = /* @__PURE__ */ __name((value) => Timing_exports.Seconds(value / 1e3 / 1e3), "microToSeconds");
        __name(timeStampForEventAdjustedByClosestNavigation, "timeStampForEventAdjustedByClosestNavigation");
        __name(expandWindowByPercentOrToOneMillisecond, "expandWindowByPercentOrToOneMillisecond");
        __name(eventTimingsMicroSeconds, "eventTimingsMicroSeconds");
        __name(eventTimingsMilliSeconds, "eventTimingsMilliSeconds");
        __name(traceWindowMilliSeconds, "traceWindowMilliSeconds");
        __name(traceWindowMicroSecondsToMilliSeconds, "traceWindowMicroSecondsToMilliSeconds");
        __name(traceWindowFromMilliSeconds, "traceWindowFromMilliSeconds");
        __name(traceWindowFromMicroSeconds, "traceWindowFromMicroSeconds");
        __name(traceWindowFromEvent, "traceWindowFromEvent");
        __name(traceWindowFromOverlay, "traceWindowFromOverlay");
        __name(combineTraceWindowsMicro, "combineTraceWindowsMicro");
        __name(boundsIncludeTimeRange, "boundsIncludeTimeRange");
        __name(eventIsInBounds, "eventIsInBounds");
        __name(timestampIsInBounds, "timestampIsInBounds");
        __name(windowFitsInsideBounds, "windowFitsInsideBounds");
        __name(windowsEqual, "windowsEqual");
      }
    });
    Trace_exports = {};
    __export2(Trace_exports, {
      VISIBLE_TRACE_EVENT_TYPES: () => VISIBLE_TRACE_EVENT_TYPES,
      activeURLForFrameAtTime: () => activeURLForFrameAtTime,
      addEventToProcessThread: () => addEventToProcessThread,
      compareBeginAndEnd: () => compareBeginAndEnd,
      createMatchedSortedSyntheticEvents: () => createMatchedSortedSyntheticEvents,
      eventContainsTimestamp: () => eventContainsTimestamp,
      eventHasCategory: () => eventHasCategory,
      eventTimeComparator: () => eventTimeComparator,
      extractId: () => extractId,
      extractOriginFromTrace: () => extractOriginFromTrace,
      extractSampleTraceId: () => extractSampleTraceId,
      findNextEventAfterTimestamp: () => findNextEventAfterTimestamp,
      findPreviousEventBeforeTimestamp: () => findPreviousEventBeforeTimestamp,
      findRecalcStyleEvents: () => findRecalcStyleEvents,
      forEachEvent: () => forEachEvent,
      frameIDForEvent: () => frameIDForEvent,
      getNavigationForTraceEvent: () => getNavigationForTraceEvent,
      getStackTraceTopCallFrameInEventPayload: () => getStackTraceTopCallFrameInEventPayload,
      getSyntheticId: () => getSyntheticId,
      getZeroIndexedLineAndColumnForEvent: () => getZeroIndexedLineAndColumnForEvent,
      getZeroIndexedStackTraceInEventPayload: () => getZeroIndexedStackTraceInEventPayload,
      isExtensionUrl: () => isExtensionUrl,
      isMatchingCallFrame: () => isMatchingCallFrame,
      isTopLevelEvent: () => isTopLevelEvent,
      makeProfileCall: () => makeProfileCall,
      makeZeroBasedCallFrame: () => makeZeroBasedCallFrame,
      mergeEventsInOrder: () => mergeEventsInOrder,
      parseDevtoolsDetails: () => parseDevtoolsDetails,
      sortTraceEventsInPlace: () => sortTraceEventsInPlace,
      stackTraceInEvent: () => stackTraceInEvent
    });
    init_Trace = __esm2({
      "node_modules/@paulirish/trace_engine/models/trace/helpers/Trace.js"() {
        init_process_global();
        init_platform();
        init_types2();
        init_SyntheticEvents();
        init_Timing3();
        __name(stackTraceInEvent, "stackTraceInEvent");
        __name(extractOriginFromTrace, "extractOriginFromTrace");
        __name(addEventToProcessThread, "addEventToProcessThread");
        __name(compareBeginAndEnd, "compareBeginAndEnd");
        __name(eventTimeComparator, "eventTimeComparator");
        __name(sortTraceEventsInPlace, "sortTraceEventsInPlace");
        __name(mergeEventsInOrder, "mergeEventsInOrder");
        __name(parseDevtoolsDetails, "parseDevtoolsDetails");
        __name(getNavigationForTraceEvent, "getNavigationForTraceEvent");
        __name(extractId, "extractId");
        __name(activeURLForFrameAtTime, "activeURLForFrameAtTime");
        __name(makeProfileCall, "makeProfileCall");
        __name(matchEvents, "matchEvents");
        __name(getSyntheticId, "getSyntheticId");
        __name(createSortedSyntheticEvents, "createSortedSyntheticEvents");
        __name(createMatchedSortedSyntheticEvents, "createMatchedSortedSyntheticEvents");
        __name(getZeroIndexedLineAndColumnForEvent, "getZeroIndexedLineAndColumnForEvent");
        __name(getZeroIndexedStackTraceInEventPayload, "getZeroIndexedStackTraceInEventPayload");
        __name(getStackTraceTopCallFrameInEventPayload, "getStackTraceTopCallFrameInEventPayload");
        __name(makeZeroBasedCallFrame, "makeZeroBasedCallFrame");
        __name(getRawLineAndColumnNumbersForEvent, "getRawLineAndColumnNumbersForEvent");
        __name(frameIDForEvent, "frameIDForEvent");
        DevToolsTimelineEventCategory = "disabled-by-default-devtools.timeline";
        __name(isTopLevelEvent, "isTopLevelEvent");
        __name(isExtensionUrl, "isExtensionUrl");
        __name(topLevelEventIndexEndingAfter, "topLevelEventIndexEndingAfter");
        __name(findRecalcStyleEvents, "findRecalcStyleEvents");
        __name(findNextEventAfterTimestamp, "findNextEventAfterTimestamp");
        __name(findPreviousEventBeforeTimestamp, "findPreviousEventBeforeTimestamp");
        __name(forEachEvent, "forEachEvent");
        parsedCategories = /* @__PURE__ */ new Map();
        __name(eventHasCategory, "eventHasCategory");
        __name(isMatchingCallFrame, "isMatchingCallFrame");
        __name(eventContainsTimestamp, "eventContainsTimestamp");
        __name(extractSampleTraceId, "extractSampleTraceId");
        VISIBLE_TRACE_EVENT_TYPES = /* @__PURE__ */ new Set([
          TraceEvents_exports.Name.ABORT_POST_TASK_CALLBACK,
          TraceEvents_exports.Name.ANIMATION,
          TraceEvents_exports.Name.ASYNC_TASK,
          TraceEvents_exports.Name.BACKGROUND_DESERIALIZE,
          TraceEvents_exports.Name.CACHE_MODULE,
          TraceEvents_exports.Name.CACHE_SCRIPT,
          TraceEvents_exports.Name.CANCEL_ANIMATION_FRAME,
          TraceEvents_exports.Name.CANCEL_IDLE_CALLBACK,
          TraceEvents_exports.Name.COMMIT,
          TraceEvents_exports.Name.COMPILE_CODE,
          TraceEvents_exports.Name.COMPILE_MODULE,
          TraceEvents_exports.Name.COMPILE,
          TraceEvents_exports.Name.COMPOSITE_LAYERS,
          TraceEvents_exports.Name.COMPUTE_INTERSECTION,
          TraceEvents_exports.Name.CONSOLE_TIME,
          TraceEvents_exports.Name.CPPGC_SWEEP,
          TraceEvents_exports.Name.CRYPTO_DO_DECRYPT_REPLY,
          TraceEvents_exports.Name.CRYPTO_DO_DECRYPT,
          TraceEvents_exports.Name.CRYPTO_DO_DIGEST_REPLY,
          TraceEvents_exports.Name.CRYPTO_DO_DIGEST,
          TraceEvents_exports.Name.CRYPTO_DO_ENCRYPT_REPLY,
          TraceEvents_exports.Name.CRYPTO_DO_ENCRYPT,
          TraceEvents_exports.Name.CRYPTO_DO_SIGN_REPLY,
          TraceEvents_exports.Name.CRYPTO_DO_SIGN,
          TraceEvents_exports.Name.CRYPTO_DO_VERIFY_REPLY,
          TraceEvents_exports.Name.CRYPTO_DO_VERIFY,
          TraceEvents_exports.Name.DECODE_IMAGE,
          TraceEvents_exports.Name.EMBEDDER_CALLBACK,
          TraceEvents_exports.Name.EVALUATE_MODULE,
          TraceEvents_exports.Name.EVALUATE_SCRIPT,
          TraceEvents_exports.Name.EVENT_DISPATCH,
          TraceEvents_exports.Name.EVENT_TIMING,
          TraceEvents_exports.Name.FINALIZE_DESERIALIZATION,
          TraceEvents_exports.Name.FIRE_ANIMATION_FRAME,
          TraceEvents_exports.Name.FIRE_IDLE_CALLBACK,
          TraceEvents_exports.Name.FUNCTION_CALL,
          TraceEvents_exports.Name.GC_COLLECT_GARBARGE,
          TraceEvents_exports.Name.GC,
          TraceEvents_exports.Name.GPU_TASK,
          TraceEvents_exports.Name.HANDLE_POST_MESSAGE,
          TraceEvents_exports.Name.HIT_TEST,
          TraceEvents_exports.Name.JS_SAMPLE,
          TraceEvents_exports.Name.LAYERIZE,
          TraceEvents_exports.Name.LAYOUT,
          TraceEvents_exports.Name.MAJOR_GC,
          TraceEvents_exports.Name.MINOR_GC,
          TraceEvents_exports.Name.OPTIMIZE_CODE,
          TraceEvents_exports.Name.PAINT_SETUP,
          TraceEvents_exports.Name.PAINT,
          TraceEvents_exports.Name.PARSE_AUTHOR_STYLE_SHEET,
          TraceEvents_exports.Name.PARSE_HTML,
          TraceEvents_exports.Name.PRE_PAINT,
          TraceEvents_exports.Name.PROFILE_CALL,
          TraceEvents_exports.Name.PROGRAM,
          TraceEvents_exports.Name.RASTER_TASK,
          TraceEvents_exports.Name.REQUEST_ANIMATION_FRAME,
          TraceEvents_exports.Name.REQUEST_IDLE_CALLBACK,
          TraceEvents_exports.Name.RESOURCE_FINISH,
          TraceEvents_exports.Name.RESOURCE_RECEIVE_DATA,
          TraceEvents_exports.Name.RESOURCE_RECEIVE_RESPONSE,
          TraceEvents_exports.Name.RESOURCE_SEND_REQUEST,
          TraceEvents_exports.Name.RESOURCE_WILL_SEND_REQUEST,
          TraceEvents_exports.Name.RUN_MICROTASKS,
          TraceEvents_exports.Name.RUN_POST_TASK_CALLBACK,
          TraceEvents_exports.Name.RUN_TASK,
          TraceEvents_exports.Name.SCHEDULE_POST_MESSAGE,
          TraceEvents_exports.Name.SCHEDULE_POST_TASK_CALLBACK,
          TraceEvents_exports.Name.SCHEDULE_STYLE_RECALCULATION,
          TraceEvents_exports.Name.SCROLL_LAYER,
          TraceEvents_exports.Name.START_PROFILING,
          TraceEvents_exports.Name.STREAMING_COMPILE_SCRIPT_PARSING,
          TraceEvents_exports.Name.STREAMING_COMPILE_SCRIPT_WAITING,
          TraceEvents_exports.Name.STREAMING_COMPILE_SCRIPT,
          TraceEvents_exports.Name.SYNTHETIC_LAYOUT_SHIFT_CLUSTER,
          TraceEvents_exports.Name.SYNTHETIC_LAYOUT_SHIFT,
          TraceEvents_exports.Name.TIME_STAMP,
          TraceEvents_exports.Name.TIMER_FIRE,
          TraceEvents_exports.Name.TIMER_INSTALL,
          TraceEvents_exports.Name.TIMER_REMOVE,
          TraceEvents_exports.Name.UPDATE_LAYER_TREE,
          TraceEvents_exports.Name.RECALC_STYLE,
          TraceEvents_exports.Name.USER_TIMING,
          TraceEvents_exports.Name.V8_CONSOLE_RUN_TASK,
          TraceEvents_exports.Name.WASM_CACHED_MODULE,
          TraceEvents_exports.Name.WASM_COMPILED_MODULE,
          TraceEvents_exports.Name.WASM_MODULE_CACHE_HIT,
          TraceEvents_exports.Name.WASM_MODULE_CACHE_INVALID,
          TraceEvents_exports.Name.WASM_STREAM_FROM_RESPONSE_CALLBACK,
          TraceEvents_exports.Name.WEB_SOCKET_CREATE,
          TraceEvents_exports.Name.WEB_SOCKET_DESTROY,
          TraceEvents_exports.Name.WEB_SOCKET_RECEIVE_HANDSHAKE_REQUEST,
          TraceEvents_exports.Name.WEB_SOCKET_RECEIVE,
          TraceEvents_exports.Name.WEB_SOCKET_SEND_HANDSHAKE_REQUEST,
          TraceEvents_exports.Name.WEB_SOCKET_SEND,
          TraceEvents_exports.Name.XHR_LOAD,
          TraceEvents_exports.Name.XHR_READY_STATE_CHANGED
        ]);
      }
    });
    TreeHelpers_exports = {};
    __export2(TreeHelpers_exports, {
      canBuildTreesFromEvents: () => canBuildTreesFromEvents,
      makeEmptyTraceEntryNode: () => makeEmptyTraceEntryNode,
      makeEmptyTraceEntryTree: () => makeEmptyTraceEntryTree,
      makeTraceEntryNodeId: () => makeTraceEntryNodeId,
      treify: () => treify,
      walkEntireTree: () => walkEntireTree,
      walkTreeFromEntry: () => walkTreeFromEntry
    });
    init_TreeHelpers = __esm2({
      "node_modules/@paulirish/trace_engine/models/trace/helpers/TreeHelpers.js"() {
        init_process_global();
        init_types2();
        init_Timing3();
        nodeIdCount = 0;
        makeTraceEntryNodeId = /* @__PURE__ */ __name(() => ++nodeIdCount, "makeTraceEntryNodeId");
        makeEmptyTraceEntryTree = /* @__PURE__ */ __name(() => ({
          roots: /* @__PURE__ */ new Set(),
          maxDepth: 0
        }), "makeEmptyTraceEntryTree");
        makeEmptyTraceEntryNode = /* @__PURE__ */ __name((entry, id2) => ({
          entry,
          id: id2,
          parent: null,
          children: [],
          depth: 0
        }), "makeEmptyTraceEntryNode");
        __name(treify, "treify");
        __name(walkTreeFromEntry, "walkTreeFromEntry");
        __name(walkEntireTree, "walkEntireTree");
        __name(walkTreeByNode, "walkTreeByNode");
        __name(treeNodeIsInWindow, "treeNodeIsInWindow");
        __name(canBuildTreesFromEvents, "canBuildTreesFromEvents");
      }
    });
    Extensions_exports2 = {};
    __export2(Extensions_exports2, {
      buildTrackDataFromExtensionEntries: () => buildTrackDataFromExtensionEntries
    });
    init_Extensions2 = __esm2({
      "node_modules/@paulirish/trace_engine/models/trace/helpers/Extensions.js"() {
        init_process_global();
        init_platform();
        init_Trace();
        init_TreeHelpers();
        __name(buildTrackDataFromExtensionEntries, "buildTrackDataFromExtensionEntries");
      }
    });
    Network_exports = {};
    __export2(Network_exports, {
      CACHEABLE_STATUS_CODES: () => CACHEABLE_STATUS_CODES,
      NON_NETWORK_SCHEMES: () => NON_NETWORK_SCHEMES2,
      STATIC_RESOURCE_TYPES: () => STATIC_RESOURCE_TYPES,
      isSyntheticNetworkRequestEventRenderBlocking: () => isSyntheticNetworkRequestEventRenderBlocking,
      isSyntheticNetworkRequestHighPriority: () => isSyntheticNetworkRequestHighPriority,
      isSyntheticNetworkRequestLocalhost: () => isSyntheticNetworkRequestLocalhost,
      parseCacheControl: () => parseCacheControl
    });
    init_Network = __esm2({
      "node_modules/@paulirish/trace_engine/models/trace/helpers/Network.js"() {
        init_process_global();
        NON_RENDER_BLOCKING_VALUES = /* @__PURE__ */ new Set([
          "non_blocking",
          "dynamically_injected_non_blocking",
          "potentially_blocking"
        ]);
        __name(isSyntheticNetworkRequestEventRenderBlocking, "isSyntheticNetworkRequestEventRenderBlocking");
        HIGH_NETWORK_PRIORITIES = /* @__PURE__ */ new Set([
          "VeryHigh",
          "High",
          "Medium"
        ]);
        __name(isSyntheticNetworkRequestHighPriority, "isSyntheticNetworkRequestHighPriority");
        CACHEABLE_STATUS_CODES = /* @__PURE__ */ new Set([200, 203, 206]);
        STATIC_RESOURCE_TYPES = /* @__PURE__ */ new Set([
          "Font",
          "Image",
          "Media",
          "Script",
          "Stylesheet"
        ]);
        NON_NETWORK_SCHEMES2 = [
          "blob",
          // @see https://developer.mozilla.org/en-US/docs/Web/API/URL/createObjectURL
          "data",
          // @see https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/Data_URIs
          "intent",
          // @see https://developer.chrome.com/docs/multidevice/android/intents/
          "file",
          // @see https://en.wikipedia.org/wiki/File_URI_scheme
          "filesystem",
          // @see https://developer.mozilla.org/en-US/docs/Web/API/FileSystem
          "chrome-extension"
        ];
        __name(parseCacheControl, "parseCacheControl");
        SECURE_LOCALHOST_DOMAINS = ["localhost", "127.0.0.1"];
        __name(isSyntheticNetworkRequestLocalhost, "isSyntheticNetworkRequestLocalhost");
      }
    });
    SamplesIntegrator_exports = {};
    __export2(SamplesIntegrator_exports, {
      SamplesIntegrator: () => SamplesIntegrator
    });
    init_SamplesIntegrator = __esm2({
      "node_modules/@paulirish/trace_engine/models/trace/helpers/SamplesIntegrator.js"() {
        init_process_global();
        init_types2();
        init_Timing3();
        init_Trace();
        SamplesIntegrator = class {
          static {
            __name(this, "SamplesIntegrator");
          }
          /**
           * The result of running the samples integrator. Holds the JS calls
           * with their approximated duration after integrating samples into the
           * trace event tree.
           */
          #constructedProfileCalls = [];
          /**
           * tracks the state of the JS stack at each point in time to update
           * the profile call durations as new events arrive. This doesn't only
           * happen with new profile calls (in which case we would compare the
           * stack in them) but also with trace events (in which case we would
           * update the duration of the events we are tracking at the moment).
           */
          #currentJSStack = [];
          /**
           * Process holding the CPU profile and trace events.
           */
          #processId;
          /**
           * Thread holding the CPU profile and trace events.
           */
          #threadId;
          /**
           * Tracks the depth of the JS stack at the moment a trace event starts
           * or ends. It is assumed that for the duration of a trace event, the
           * JS stack's depth cannot decrease, since JS calls that started
           * before a trace event cannot end during the trace event. So as trace
           * events arrive, we store the "locked" amount of JS frames that were
           * in the stack before the event came.
           */
          #lockedJsStackDepth = [];
          /**
           * Used to keep track when samples should be integrated even if they
           * are not children of invocation trace events. This is useful in
           * cases where we can be missing the start of JS invocation events if
           * we start tracing half-way through.
           */
          #fakeJSInvocation = false;
          /**
           * The parsed CPU profile, holding the tree hierarchy of JS frames and
           * the sample data.
           */
          #profileModel;
          /**
           * Because GC nodes don't have a stack, we artificially add a stack to
           * them which corresponds to that of the previous sample. This map
           * tracks which node is used for the stack of a GC call.
           * Note that GC samples are not shown in the flamechart, however they
           * are used during the construction of for profile calls, as we can
           * infer information about the duration of the executed code when a
           * GC node is sampled.
           */
          #nodeForGC = /* @__PURE__ */ new Map();
          #engineConfig;
          #profileId;
          /**
           * Keeps track of the individual samples from the CPU Profile.
           * Only used with Debug Mode experiment enabled.
           */
          jsSampleEvents = [];
          constructor(profileModel, profileId, pid, tid, configuration) {
            this.#profileModel = profileModel;
            this.#threadId = tid;
            this.#processId = pid;
            this.#engineConfig = configuration || Configuration_exports.defaults();
            this.#profileId = profileId;
          }
          buildProfileCalls(traceEvents) {
            const mergedEvents = mergeEventsInOrder(traceEvents, this.callsFromProfileSamples());
            const stack = [];
            for (let i = 0; i < mergedEvents.length; i++) {
              const event = mergedEvents[i];
              if (event.ph === TraceEvents_exports.Phase.INSTANT && !extractSampleTraceId(event)) {
                continue;
              }
              if (stack.length === 0) {
                if (TraceEvents_exports.isProfileCall(event)) {
                  this.#onProfileCall(event);
                  continue;
                }
                stack.push(event);
                this.#onTraceEventStart(event);
                continue;
              }
              const parentEvent = stack.at(-1);
              if (parentEvent === void 0) {
                continue;
              }
              const begin = event.ts;
              const parentBegin = parentEvent.ts;
              const parentDuration = parentEvent.dur || 0;
              const parentEnd = parentBegin + parentDuration;
              const startsAfterParent = begin >= parentEnd;
              if (startsAfterParent) {
                this.#onTraceEventEnd(parentEvent);
                stack.pop();
                i--;
                continue;
              }
              if (TraceEvents_exports.isProfileCall(event)) {
                this.#onProfileCall(event, parentEvent);
                continue;
              }
              this.#onTraceEventStart(event);
              stack.push(event);
            }
            while (stack.length) {
              const last2 = stack.pop();
              if (last2) {
                this.#onTraceEventEnd(last2);
              }
            }
            sortTraceEventsInPlace(this.jsSampleEvents);
            return this.#constructedProfileCalls;
          }
          #onTraceEventStart(event) {
            if (event.name === TraceEvents_exports.Name.RUN_MICROTASKS || event.name === TraceEvents_exports.Name.RUN_TASK) {
              this.#lockedJsStackDepth = [];
              this.#truncateJSStack(0, event.ts);
              this.#fakeJSInvocation = false;
            }
            if (this.#fakeJSInvocation) {
              this.#truncateJSStack(this.#lockedJsStackDepth.pop() || 0, event.ts);
              this.#fakeJSInvocation = false;
            }
            this.#extractStackTrace(event);
            this.#lockedJsStackDepth.push(this.#currentJSStack.length);
          }
          #onProfileCall(event, parent) {
            if (parent && TraceEvents_exports.isJSInvocationEvent(parent) || this.#fakeJSInvocation) {
              this.#extractStackTrace(event);
            } else if (TraceEvents_exports.isProfileCall(event) && this.#currentJSStack.length === 0) {
              this.#fakeJSInvocation = true;
              const stackDepthBefore = this.#currentJSStack.length;
              this.#extractStackTrace(event);
              this.#lockedJsStackDepth.push(stackDepthBefore);
            }
          }
          #onTraceEventEnd(event) {
            const endTime = Timing_exports.Micro(event.ts + (event.dur ?? 0));
            this.#truncateJSStack(this.#lockedJsStackDepth.pop() || 0, endTime);
          }
          /**
           * Builds the initial calls with no duration from samples. Their
           * purpose is to be merged with the trace event array being parsed so
           * that they can be traversed in order with them and their duration
           * can be updated as the SampleIntegrator callbacks are invoked.
           */
          callsFromProfileSamples() {
            const samples = this.#profileModel.samples;
            const timestamps = this.#profileModel.timestamps;
            if (!samples) {
              return [];
            }
            const calls = [];
            let prevNode;
            for (let i = 0; i < samples.length; i++) {
              const node2 = this.#profileModel.nodeByIndex(i);
              const timestamp = milliToMicro(Timing_exports.Milli(timestamps[i]));
              if (!node2) {
                continue;
              }
              const call = makeProfileCall(node2, this.#profileId, i, timestamp, this.#processId, this.#threadId);
              calls.push(call);
              if (this.#engineConfig.debugMode) {
                const traceId = this.#profileModel.traceIds?.[i];
                this.jsSampleEvents.push(this.#makeJSSampleEvent(call, timestamp, traceId));
              }
              if (node2.id === this.#profileModel.gcNode?.id && prevNode) {
                this.#nodeForGC.set(call, prevNode);
                continue;
              }
              prevNode = node2;
            }
            return calls;
          }
          /**
           * Given a synthetic profile call, returns an array of profile calls
           * representing the stack trace that profile call belongs to based on
           * its nodeId. The input profile call will be at the top of the
           * returned stack (last position), meaning that any other frames that
           * were effectively above it are omitted.
           * @param profileCall
           * @param overrideTimeStamp a custom timestamp to use for the returned
           * profile calls. If not defined, the timestamp of the input
           * profileCall is used instead. This param is useful for example when
           * creating the profile calls for a sample with a trace id, since the
           * timestamp of the corresponding trace event should be used instead
           * of the sample's.
           */
          #makeProfileCallsForStack(profileCall, overrideTimeStamp) {
            let node2 = this.#profileModel.nodeById(profileCall.nodeId);
            const isGarbageCollection = node2?.id === this.#profileModel.gcNode?.id;
            if (isGarbageCollection) {
              node2 = this.#nodeForGC.get(profileCall) || null;
            }
            if (!node2) {
              return [];
            }
            const callFrames = new Array(node2.depth + 1 + Number(isGarbageCollection));
            let i = callFrames.length - 1;
            if (isGarbageCollection) {
              callFrames[i--] = profileCall;
            }
            while (node2) {
              callFrames[i--] = makeProfileCall(node2, profileCall.profileId, profileCall.sampleIndex, overrideTimeStamp ?? profileCall.ts, this.#processId, this.#threadId);
              node2 = node2.parent;
            }
            return callFrames;
          }
          #getStackForSampleTraceId(traceId, timestamp) {
            const nodeId = this.#profileModel.traceIds?.[traceId];
            const node2 = nodeId && this.#profileModel.nodeById(nodeId);
            const maybeCallForTraceId = node2 && makeProfileCall(node2, this.#profileId, -1, timestamp, this.#processId, this.#threadId);
            if (!maybeCallForTraceId) {
              return null;
            }
            if (this.#engineConfig.debugMode) {
              this.jsSampleEvents.push(this.#makeJSSampleEvent(maybeCallForTraceId, timestamp, traceId));
            }
            return this.#makeProfileCallsForStack(maybeCallForTraceId);
          }
          /**
           * Update tracked stack using this event's call stack.
           */
          #extractStackTrace(event) {
            let stackTrace = this.#currentJSStack;
            if (TraceEvents_exports.isProfileCall(event)) {
              stackTrace = this.#makeProfileCallsForStack(event);
            }
            const traceId = extractSampleTraceId(event);
            const maybeCallForTraceId = traceId && this.#getStackForSampleTraceId(traceId, event.ts);
            if (maybeCallForTraceId) {
              stackTrace = maybeCallForTraceId;
            }
            _a.filterStackFrames(stackTrace, this.#engineConfig);
            const endTime = event.ts + (event.dur || 0);
            const minFrames = Math.min(stackTrace.length, this.#currentJSStack.length);
            let i;
            for (i = this.#lockedJsStackDepth.at(-1) || 0; i < minFrames; ++i) {
              const newFrame = stackTrace[i].callFrame;
              const oldFrame = this.#currentJSStack[i].callFrame;
              if (!_a.framesAreEqual(newFrame, oldFrame)) {
                break;
              }
              this.#currentJSStack[i].dur = Timing_exports.Micro(Math.max(this.#currentJSStack[i].dur || 0, endTime - this.#currentJSStack[i].ts));
            }
            this.#truncateJSStack(i, event.ts);
            for (; i < stackTrace.length; ++i) {
              const call = stackTrace[i];
              if (call.nodeId === this.#profileModel.programNode?.id || call.nodeId === this.#profileModel.root?.id || call.nodeId === this.#profileModel.idleNode?.id || call.nodeId === this.#profileModel.gcNode?.id) {
                continue;
              }
              this.#currentJSStack.push(call);
              this.#constructedProfileCalls.push(call);
            }
          }
          /**
           * When a call stack that differs from the one we are tracking has
           * been detected in the samples, the latter is "truncated" by
           * setting the ending time of its call frames and removing the top
           * call frames that aren't shared with the new call stack. This way,
           * we can update the tracked stack with the new call frames on top.
           * @param depth the amount of call frames from bottom to top that
           * should be kept in the tracking stack trace. AKA amount of shared
           * call frames between two stacks.
           * @param time the new end of the call frames in the stack.
           */
          #truncateJSStack(depth, time2) {
            if (this.#lockedJsStackDepth.length) {
              const lockedDepth = this.#lockedJsStackDepth.at(-1);
              if (lockedDepth && depth < lockedDepth) {
                console.error(`Child stack is shallower (${depth}) than the parent stack (${lockedDepth}) at ${time2}`);
                depth = lockedDepth;
              }
            }
            if (this.#currentJSStack.length < depth) {
              console.error(`Trying to truncate higher than the current stack size at ${time2}`);
              depth = this.#currentJSStack.length;
            }
            for (let k = 0; k < this.#currentJSStack.length; ++k) {
              this.#currentJSStack[k].dur = Timing_exports.Micro(Math.max(time2 - this.#currentJSStack[k].ts, 0));
            }
            this.#currentJSStack.length = depth;
          }
          #makeJSSampleEvent(call, timestamp, traceId) {
            const JSSampleEvent = {
              name: TraceEvents_exports.Name.JS_SAMPLE,
              cat: "devtools.timeline",
              args: {
                data: { traceId, stackTrace: this.#makeProfileCallsForStack(call).map((e) => e.callFrame) }
              },
              ph: TraceEvents_exports.Phase.INSTANT,
              ts: timestamp,
              dur: Timing_exports.Micro(0),
              pid: this.#processId,
              tid: this.#threadId
            };
            return JSSampleEvent;
          }
          static framesAreEqual(frame1, frame2) {
            return frame1.scriptId === frame2.scriptId && frame1.functionName === frame2.functionName && frame1.lineNumber === frame2.lineNumber;
          }
          static showNativeName(name, runtimeCallStatsEnabled) {
            return runtimeCallStatsEnabled && Boolean(_a.nativeGroup(name));
          }
          static nativeGroup(nativeName) {
            if (nativeName.startsWith("Parse")) {
              return _a.NativeGroups.PARSE;
            }
            if (nativeName.startsWith("Compile") || nativeName.startsWith("Recompile")) {
              return _a.NativeGroups.COMPILE;
            }
            return null;
          }
          static isNativeRuntimeFrame(frame) {
            return frame.url === "native V8Runtime";
          }
          static filterStackFrames(stack, engineConfig) {
            const showAllEvents = engineConfig.showAllEvents;
            if (showAllEvents) {
              return;
            }
            let previousNativeFrameName = null;
            let j = 0;
            for (let i = 0; i < stack.length; ++i) {
              const frame = stack[i].callFrame;
              const nativeRuntimeFrame = _a.isNativeRuntimeFrame(frame);
              if (nativeRuntimeFrame && !_a.showNativeName(frame.functionName, engineConfig.includeRuntimeCallStats)) {
                continue;
              }
              const nativeFrameName = nativeRuntimeFrame ? _a.nativeGroup(frame.functionName) : null;
              if (previousNativeFrameName && previousNativeFrameName === nativeFrameName) {
                continue;
              }
              previousNativeFrameName = nativeFrameName;
              stack[j++] = stack[i];
            }
            stack.length = j;
          }
          static createFakeTraceFromCpuProfile(profile, tid) {
            if (!profile) {
              return { traceEvents: [], metadata: {} };
            }
            const cpuProfileEvent = {
              cat: "disabled-by-default-devtools.timeline",
              name: TraceEvents_exports.Name.CPU_PROFILE,
              ph: TraceEvents_exports.Phase.COMPLETE,
              pid: TraceEvents_exports.ProcessID(1),
              tid,
              ts: Timing_exports.Micro(profile.startTime),
              dur: Timing_exports.Micro(profile.endTime - profile.startTime),
              args: { data: { cpuProfile: profile } },
              // Create an arbitrary profile id.
              id: "0x1"
            };
            return {
              traceEvents: [cpuProfileEvent],
              metadata: {
                dataOrigin: File_exports.DataOrigin.CPU_PROFILE
              }
            };
          }
          static extractCpuProfileFromFakeTrace(traceEvents) {
            const profileEvent = traceEvents.find((e) => TraceEvents_exports.isSyntheticCpuProfile(e));
            const profile = profileEvent?.args.data.cpuProfile;
            if (!profile) {
              throw new Error("Missing cpuProfile data");
            }
            return profile;
          }
        };
        _a = SamplesIntegrator;
        (function(SamplesIntegrator22) {
          let NativeGroups;
          (function(NativeGroups2) {
            NativeGroups2["COMPILE"] = "Compile";
            NativeGroups2["PARSE"] = "Parse";
          })(NativeGroups = SamplesIntegrator22.NativeGroups || (SamplesIntegrator22.NativeGroups = {}));
        })(SamplesIntegrator || (SamplesIntegrator = {}));
      }
    });
    init_helpers2 = __esm2({
      "node_modules/@paulirish/trace_engine/models/trace/helpers/helpers.js"() {
        init_process_global();
        init_Extensions2();
        init_Network();
        init_SamplesIntegrator();
        init_SyntheticEvents();
        init_Timing3();
        init_Trace();
        init_TreeHelpers();
      }
    });
    AnimationFramesHandler_exports = {};
    __export2(AnimationFramesHandler_exports, {
      data: () => data,
      deps: () => deps,
      finalize: () => finalize,
      handleEvent: () => handleEvent,
      handleUserConfig: () => handleUserConfig,
      reset: () => reset
    });
    init_AnimationFramesHandler = __esm2({
      "node_modules/@paulirish/trace_engine/models/trace/handlers/AnimationFramesHandler.js"() {
        init_process_global();
        init_helpers2();
        init_types2();
        __name(threadKey, "threadKey");
        animationFrameStarts = /* @__PURE__ */ new Map();
        animationFrameEnds = /* @__PURE__ */ new Map();
        animationFramePresentations = /* @__PURE__ */ new Map();
        animationFrames = [];
        presentationForFrame = /* @__PURE__ */ new Map();
        __name(reset, "reset");
        isEnabled = false;
        __name(handleUserConfig, "handleUserConfig");
        __name(handleEvent, "handleEvent");
        __name(finalize, "finalize");
        __name(data, "data");
        __name(deps, "deps");
      }
    });
    AnimationHandler_exports = {};
    __export2(AnimationHandler_exports, {
      data: () => data2,
      finalize: () => finalize2,
      handleEvent: () => handleEvent2,
      reset: () => reset2
    });
    init_AnimationHandler = __esm2({
      "node_modules/@paulirish/trace_engine/models/trace/handlers/AnimationHandler.js"() {
        init_process_global();
        init_helpers2();
        init_types2();
        animations = [];
        animationsSyntheticEvents = [];
        __name(reset2, "reset");
        __name(handleEvent2, "handleEvent");
        __name(finalize2, "finalize");
        __name(data2, "data");
      }
    });
    FlowsHandler_exports = {};
    __export2(FlowsHandler_exports, {
      data: () => data3,
      finalize: () => finalize3,
      handleEvent: () => handleEvent3,
      reset: () => reset3
    });
    init_FlowsHandler = __esm2({
      "node_modules/@paulirish/trace_engine/models/trace/handlers/FlowsHandler.js"() {
        init_process_global();
        init_platform();
        init_types2();
        flowDataByGroupToken = /* @__PURE__ */ new Map();
        boundFlowData = /* @__PURE__ */ new Map();
        flowsById = /* @__PURE__ */ new Map();
        flowEvents = [];
        nonFlowEvents = [];
        flows = [];
        ID_COMPONENT_SEPARATOR = "-$-";
        __name(reset3, "reset");
        __name(handleEvent3, "handleEvent");
        __name(processNonFlowEvent, "processNonFlowEvent");
        __name(processFlowEvent, "processFlowEvent");
        __name(addFlowIdToEventBinding, "addFlowIdToEventBinding");
        __name(flowGroupTokenForFlowPhaseEvent, "flowGroupTokenForFlowPhaseEvent");
        __name(finalize3, "finalize");
        __name(data3, "data");
      }
    });
    AuctionWorkletsHandler_exports = {};
    __export2(AuctionWorkletsHandler_exports, {
      data: () => data4,
      finalize: () => finalize4,
      handleEvent: () => handleEvent4,
      reset: () => reset4
    });
    init_AuctionWorkletsHandler = __esm2({
      "node_modules/@paulirish/trace_engine/models/trace/handlers/AuctionWorkletsHandler.js"() {
        init_process_global();
        init_helpers2();
        init_types2();
        runningInProcessEvents = /* @__PURE__ */ new Map();
        doneWithProcessEvents = /* @__PURE__ */ new Map();
        createdSyntheticEvents = /* @__PURE__ */ new Map();
        utilityThreads = /* @__PURE__ */ new Map();
        v8HelperThreads = /* @__PURE__ */ new Map();
        __name(reset4, "reset");
        __name(handleEvent4, "handleEvent");
        __name(workletType, "workletType");
        __name(makeSyntheticEventBase, "makeSyntheticEventBase");
        __name(finalize4, "finalize");
        __name(data4, "data");
      }
    });
    MetaHandler_exports = {};
    __export2(MetaHandler_exports, {
      data: () => data5,
      finalize: () => finalize5,
      handleEvent: () => handleEvent5,
      reset: () => reset5
    });
    init_MetaHandler = __esm2({
      "node_modules/@paulirish/trace_engine/models/trace/handlers/MetaHandler.js"() {
        init_process_global();
        init_platform();
        init_helpers2();
        init_types2();
        rendererProcessesByFrameId = /* @__PURE__ */ new Map();
        mainFrameId = "";
        mainFrameURL = "";
        framesByProcessId = /* @__PURE__ */ new Map();
        browserProcessId = TraceEvents_exports.ProcessID(-1);
        browserThreadId = TraceEvents_exports.ThreadID(-1);
        gpuProcessId = TraceEvents_exports.ProcessID(-1);
        gpuThreadId = TraceEvents_exports.ThreadID(-1);
        viewportRect = null;
        devicePixelRatio2 = null;
        processNames = /* @__PURE__ */ new Map();
        topLevelRendererIds = /* @__PURE__ */ new Set();
        __name(makeNewTraceBounds, "makeNewTraceBounds");
        traceBounds = makeNewTraceBounds();
        navigationsByFrameId = /* @__PURE__ */ new Map();
        navigationsByNavigationId = /* @__PURE__ */ new Map();
        finalDisplayUrlByNavigationId = /* @__PURE__ */ new Map();
        mainFrameNavigations = [];
        threadsInProcess = /* @__PURE__ */ new Map();
        traceStartedTimeFromTracingStartedEvent = Timing_exports.Micro(-1);
        eventPhasesOfInterestForTraceBounds = /* @__PURE__ */ new Set([
          TraceEvents_exports.Phase.BEGIN,
          TraceEvents_exports.Phase.END,
          TraceEvents_exports.Phase.COMPLETE,
          TraceEvents_exports.Phase.INSTANT
        ]);
        traceIsGeneric = true;
        CHROME_WEB_TRACE_EVENTS = /* @__PURE__ */ new Set([
          TraceEvents_exports.Name.TRACING_STARTED_IN_PAGE,
          TraceEvents_exports.Name.TRACING_SESSION_ID_FOR_WORKER,
          TraceEvents_exports.Name.TRACING_STARTED_IN_BROWSER,
          TraceEvents_exports.Name.CPU_PROFILE
        ]);
        __name(reset5, "reset");
        __name(updateRendererProcessByFrame, "updateRendererProcessByFrame");
        __name(handleEvent5, "handleEvent");
        __name(finalize5, "finalize");
        __name(data5, "data");
      }
    });
    NetworkRequestsHandler_exports = {};
    __export2(NetworkRequestsHandler_exports, {
      data: () => data6,
      deps: () => deps2,
      finalize: () => finalize6,
      handleEvent: () => handleEvent6,
      reset: () => reset6
    });
    init_NetworkRequestsHandler = __esm2({
      "node_modules/@paulirish/trace_engine/models/trace/handlers/NetworkRequestsHandler.js"() {
        init_process_global();
        init_platform();
        init_helpers2();
        init_types2();
        init_helpers();
        init_MetaHandler();
        MILLISECONDS_TO_MICROSECONDS = 1e3;
        SECONDS_TO_MICROSECONDS = 1e6;
        webSocketData = /* @__PURE__ */ new Map();
        linkPreconnectEvents = [];
        requestMap = /* @__PURE__ */ new Map();
        requestsById = /* @__PURE__ */ new Map();
        requestsByTime = [];
        networkRequestEventByInitiatorUrl = /* @__PURE__ */ new Map();
        eventToInitiatorMap = /* @__PURE__ */ new Map();
        entityMappings = {
          eventsByEntity: /* @__PURE__ */ new Map(),
          entityByEvent: /* @__PURE__ */ new Map(),
          createdEntityCache: /* @__PURE__ */ new Map(),
          entityByUrlCache: /* @__PURE__ */ new Map()
        };
        __name(storeTraceEventWithRequestId, "storeTraceEventWithRequestId");
        __name(firstPositiveValueInList, "firstPositiveValueInList");
        __name(reset6, "reset");
        __name(handleEvent6, "handleEvent");
        __name(finalize6, "finalize");
        __name(data6, "data");
        __name(deps2, "deps");
        __name(finalizeWebSocketData, "finalizeWebSocketData");
        __name(createSyntheticWebSocketConnection, "createSyntheticWebSocketConnection");
      }
    });
    init_ProfileTreeModel = __esm2({
      "node_modules/@paulirish/trace_engine/models/cpu_profile/ProfileTreeModel.js"() {
        init_process_global();
        ProfileNode = class {
          static {
            __name(this, "ProfileNode");
          }
          callFrame;
          callUID;
          self;
          total;
          id;
          parent;
          children;
          functionName;
          depth;
          deoptReason;
          constructor(callFrame) {
            this.callFrame = callFrame;
            this.callUID = `${callFrame.functionName}@${callFrame.scriptId}:${callFrame.lineNumber}:${callFrame.columnNumber}`;
            this.self = 0;
            this.total = 0;
            this.id = 0;
            this.functionName = callFrame.functionName;
            this.parent = null;
            this.children = [];
          }
          get scriptId() {
            return String(this.callFrame.scriptId);
          }
          get url() {
            return this.callFrame.url;
          }
          get lineNumber() {
            return this.callFrame.lineNumber;
          }
          get columnNumber() {
            return this.callFrame.columnNumber;
          }
          setFunctionName(name) {
            if (name === null) {
              return;
            }
            this.functionName = name;
          }
        };
        ProfileTreeModel = class {
          static {
            __name(this, "ProfileTreeModel");
          }
          root;
          total;
          maxDepth;
          initialize(root2) {
            this.root = root2;
            this.assignDepthsAndParents();
            this.total = this.calculateTotals(this.root);
          }
          assignDepthsAndParents() {
            const root2 = this.root;
            root2.depth = -1;
            root2.parent = null;
            this.maxDepth = 0;
            const nodesToTraverse = [root2];
            while (nodesToTraverse.length) {
              const parent = nodesToTraverse.pop();
              const depth = parent.depth + 1;
              if (depth > this.maxDepth) {
                this.maxDepth = depth;
              }
              const children = parent.children;
              for (const child of children) {
                child.depth = depth;
                child.parent = parent;
                nodesToTraverse.push(child);
              }
            }
          }
          calculateTotals(root2) {
            const nodesToTraverse = [root2];
            const dfsList = [];
            while (nodesToTraverse.length) {
              const node2 = nodesToTraverse.pop();
              node2.total = node2.self;
              dfsList.push(node2);
              nodesToTraverse.push(...node2.children);
            }
            while (dfsList.length > 1) {
              const node2 = dfsList.pop();
              if (node2.parent) {
                node2.parent.total += node2.total;
              }
            }
            return root2.total;
          }
        };
      }
    });
    CPUProfileDataModel_exports = {};
    __export2(CPUProfileDataModel_exports, {
      CPUProfileDataModel: () => CPUProfileDataModel,
      CPUProfileNode: () => CPUProfileNode
    });
    init_CPUProfileDataModel = __esm2({
      "node_modules/@paulirish/trace_engine/models/cpu_profile/CPUProfileDataModel.js"() {
        init_process_global();
        init_platform();
        init_ProfileTreeModel();
        CPUProfileNode = class extends ProfileNode {
          static {
            __name(this, "CPUProfileNode");
          }
          id;
          self;
          // Position ticks are available in profile nodes coming from CDP
          // profiles and not in those coming from tracing. They are used to
          // calculate the line level execution time shown in the Sources panel
          // after recording a profile. For trace CPU profiles we use the
          // `lines` array instead.
          positionTicks;
          deoptReason;
          constructor(node2, samplingInterval) {
            const callFrame = node2.callFrame || {
              // TODO(crbug.com/1172300) Ignored during the jsdoc to ts migration
              // @ts-expect-error
              functionName: node2["functionName"],
              // TODO(crbug.com/1172300) Ignored during the jsdoc to ts migration
              // @ts-expect-error
              scriptId: node2["scriptId"],
              // TODO(crbug.com/1172300) Ignored during the jsdoc to ts migration
              // @ts-expect-error
              url: node2["url"],
              // TODO(crbug.com/1172300) Ignored during the jsdoc to ts migration
              // @ts-expect-error
              lineNumber: node2["lineNumber"] - 1,
              // TODO(crbug.com/1172300) Ignored during the jsdoc to ts migration
              // @ts-expect-error
              columnNumber: node2["columnNumber"] - 1
            };
            super(callFrame);
            this.id = node2.id;
            this.self = (node2.hitCount || 0) * samplingInterval;
            this.positionTicks = node2.positionTicks;
            this.deoptReason = node2.deoptReason && node2.deoptReason !== "no reason" ? node2.deoptReason : null;
          }
        };
        CPUProfileDataModel = class extends ProfileTreeModel {
          static {
            __name(this, "CPUProfileDataModel");
          }
          profileStartTime;
          profileEndTime;
          timestamps;
          samples;
          /**
           * Contains trace ids assigned to samples, if any. Trace ids are
           * keyed by the sample index in the profile. These are only created
           * for CPU profiles coming from traces.
           */
          traceIds;
          lines;
          totalHitCount;
          profileHead;
          /**
           * A cache for the nodes we have parsed.
           * Note: "Parsed" nodes are different from the "Protocol" nodes, the
           * latter being the raw data we receive from the backend.
           */
          #idToParsedNode;
          gcNode;
          programNode;
          idleNode;
          #stackStartTimes;
          #stackChildrenDuration;
          constructor(profile) {
            super();
            const isLegacyFormat = Boolean(profile["head"]);
            if (isLegacyFormat) {
              this.profileStartTime = profile.startTime * 1e3;
              this.profileEndTime = profile.endTime * 1e3;
              this.timestamps = profile.timestamps;
              this.compatibilityConversionHeadToNodes(profile);
            } else {
              this.profileStartTime = profile.startTime / 1e3;
              this.profileEndTime = profile.endTime / 1e3;
              this.timestamps = this.convertTimeDeltas(profile);
            }
            this.traceIds = profile.traceIds;
            this.samples = profile.samples;
            this.lines = profile.lines;
            this.totalHitCount = 0;
            this.profileHead = this.translateProfileTree(profile.nodes);
            this.initialize(this.profileHead);
            this.extractMetaNodes();
            if (this.samples?.length) {
              this.sortSamples();
              this.normalizeTimestamps();
              this.fixMissingSamples();
            }
          }
          compatibilityConversionHeadToNodes(profile) {
            if (!profile.head || profile.nodes) {
              return;
            }
            const nodes = [];
            convertNodesTree(profile.head);
            profile.nodes = nodes;
            delete profile.head;
            function convertNodesTree(node2) {
              nodes.push(node2);
              node2.children = node2.children.map(convertNodesTree);
              return node2.id;
            }
            __name(convertNodesTree, "convertNodesTree");
          }
          /**
           * Calculate timestamps using timeDeltas. Some CPU profile formats,
           * like the ones contained in traces have timeDeltas instead of
           * timestamps.
           */
          convertTimeDeltas(profile) {
            if (!profile.timeDeltas) {
              return [];
            }
            let lastTimeMicroSec = profile.startTime;
            const timestamps = new Array(profile.timeDeltas.length);
            for (let i = 0; i < profile.timeDeltas.length; ++i) {
              lastTimeMicroSec += profile.timeDeltas[i];
              timestamps[i] = lastTimeMicroSec;
            }
            return timestamps;
          }
          /**
           * Creates a Tree of CPUProfileNodes using the Protocol.Profiler.ProfileNodes.
           * As the tree is built, samples of native code (prefixed with "native ") are
           * filtered out. Samples of filtered nodes are replaced with the parent of the
           * node being filtered.
           *
           * This function supports legacy and new definitions of the CDP Profiler.Profile
           * type.
           */
          translateProfileTree(nodes) {
            function buildChildrenFromParents(nodes2) {
              if (nodes2[0].children) {
                return;
              }
              nodes2[0].children = [];
              for (let i = 1; i < nodes2.length; ++i) {
                const node2 = nodes2[i];
                const parentNode = protocolNodeById.get(node2.parent);
                if (!parentNode) {
                  continue;
                }
                if (parentNode.children) {
                  parentNode.children.push(node2.id);
                } else {
                  parentNode.children = [node2.id];
                }
              }
            }
            __name(buildChildrenFromParents, "buildChildrenFromParents");
            function buildHitCountFromSamples(nodes2, samples) {
              if (typeof nodes2[0].hitCount === "number") {
                return;
              }
              if (!samples) {
                throw new Error("Error: Neither hitCount nor samples are present in profile.");
              }
              for (let i = 0; i < nodes2.length; ++i) {
                nodes2[i].hitCount = 0;
              }
              for (let i = 0; i < samples.length; ++i) {
                const node2 = protocolNodeById.get(samples[i]);
                if (node2?.hitCount === void 0) {
                  continue;
                }
                node2.hitCount++;
              }
            }
            __name(buildHitCountFromSamples, "buildHitCountFromSamples");
            const protocolNodeById = /* @__PURE__ */ new Map();
            for (let i = 0; i < nodes.length; ++i) {
              const node2 = nodes[i];
              protocolNodeById.set(node2.id, node2);
            }
            buildHitCountFromSamples(nodes, this.samples);
            buildChildrenFromParents(nodes);
            this.totalHitCount = nodes.reduce((acc, node2) => acc + (node2.hitCount || 0), 0);
            const sampleTime = (this.profileEndTime - this.profileStartTime) / this.totalHitCount;
            const root2 = nodes[0];
            const idToUseForRemovedNode = /* @__PURE__ */ new Map([[root2.id, root2.id]]);
            this.#idToParsedNode = /* @__PURE__ */ new Map();
            const resultRoot = new CPUProfileNode(root2, sampleTime);
            this.#idToParsedNode.set(root2.id, resultRoot);
            if (!root2.children) {
              throw new Error("Missing children for root");
            }
            const parentNodeStack = root2.children.map(() => resultRoot);
            const sourceNodeStack = root2.children.map((id2) => protocolNodeById.get(id2));
            while (sourceNodeStack.length) {
              let parentNode = parentNodeStack.pop();
              const sourceNode2 = sourceNodeStack.pop();
              if (!sourceNode2 || !parentNode) {
                continue;
              }
              if (!sourceNode2.children) {
                sourceNode2.children = [];
              }
              const targetNode = new CPUProfileNode(sourceNode2, sampleTime);
              parentNode.children.push(targetNode);
              parentNode = targetNode;
              idToUseForRemovedNode.set(sourceNode2.id, parentNode.id);
              parentNodeStack.push.apply(parentNodeStack, sourceNode2.children.map(() => parentNode));
              sourceNodeStack.push.apply(sourceNodeStack, sourceNode2.children.map((id2) => protocolNodeById.get(id2)));
              this.#idToParsedNode.set(sourceNode2.id, targetNode);
            }
            if (this.samples) {
              this.samples = this.samples.map((id2) => idToUseForRemovedNode.get(id2));
            }
            return resultRoot;
          }
          /**
           * Sorts the samples array using the timestamps array (there is a one
           * to one matching by index between the two).
           */
          sortSamples() {
            if (!this.timestamps || !this.samples) {
              return;
            }
            const timestamps = this.timestamps;
            const samples = this.samples;
            const orderedIndices = timestamps.map((_x, index2) => index2);
            orderedIndices.sort((a, b) => timestamps[a] - timestamps[b]);
            this.timestamps = [];
            this.samples = [];
            for (let i = 0; i < orderedIndices.length; i++) {
              const orderedIndex = orderedIndices[i];
              this.timestamps.push(timestamps[orderedIndex]);
              this.samples.push(samples[orderedIndex]);
            }
          }
          /**
           * Fills in timestamps and/or time deltas from legacy profiles where
           * they could be missing.
           */
          normalizeTimestamps() {
            if (!this.samples) {
              return;
            }
            let timestamps = this.timestamps;
            if (!timestamps) {
              const profileStartTime = this.profileStartTime;
              const interval = (this.profileEndTime - profileStartTime) / this.samples.length;
              timestamps = new Array(this.samples.length + 1);
              for (let i = 0; i < timestamps.length; ++i) {
                timestamps[i] = profileStartTime + i * interval;
              }
              this.timestamps = timestamps;
              return;
            }
            for (let i = 0; i < timestamps.length; ++i) {
              timestamps[i] /= 1e3;
            }
            if (this.samples.length === timestamps.length) {
              const lastTimestamp = timestamps.at(-1) || 0;
              const averageIntervalTime = (lastTimestamp - timestamps[0]) / (timestamps.length - 1);
              this.timestamps.push(lastTimestamp + averageIntervalTime);
            }
            this.profileStartTime = timestamps.at(0) || this.profileStartTime;
            this.profileEndTime = timestamps.at(-1) || this.profileEndTime;
          }
          /**
           * Some nodes do not refer to JS samples but to V8 system tasks, AKA
           * "meta" nodes. This function extracts those nodes from the profile.
           */
          extractMetaNodes() {
            const topLevelNodes = this.profileHead.children;
            for (let i = 0; i < topLevelNodes.length && !(this.gcNode && this.programNode && this.idleNode); i++) {
              const node2 = topLevelNodes[i];
              if (node2.functionName === "(garbage collector)") {
                this.gcNode = node2;
              } else if (node2.functionName === "(program)") {
                this.programNode = node2;
              } else if (node2.functionName === "(idle)") {
                this.idleNode = node2;
              }
            }
          }
          fixMissingSamples() {
            const samples = this.samples;
            if (!samples) {
              return;
            }
            const samplesCount = samples.length;
            if (!this.programNode || samplesCount < 3) {
              return;
            }
            const idToNode = this.#idToParsedNode;
            const programNodeId = this.programNode.id;
            const gcNodeId = this.gcNode ? this.gcNode.id : -1;
            const idleNodeId = this.idleNode ? this.idleNode.id : -1;
            let prevNodeId = samples[0];
            let nodeId = samples[1];
            for (let sampleIndex = 1; sampleIndex < samplesCount - 1; sampleIndex++) {
              const nextNodeId = samples[sampleIndex + 1];
              const prevNode = idToNode.get(prevNodeId);
              const nextNode = idToNode.get(nextNodeId);
              if (prevNodeId === void 0 || nextNodeId === void 0 || !prevNode || !nextNode) {
                console.error(`Unexpectedly found undefined nodes: ${prevNodeId} ${nextNodeId}`);
                continue;
              }
              if (nodeId === programNodeId && !isSystemNode(prevNodeId) && !isSystemNode(nextNodeId) && bottomNode(prevNode) === bottomNode(nextNode)) {
                samples[sampleIndex] = prevNodeId;
              }
              prevNodeId = nodeId;
              nodeId = nextNodeId;
            }
            function bottomNode(node2) {
              while (node2.parent?.parent) {
                node2 = node2.parent;
              }
              return node2;
            }
            __name(bottomNode, "bottomNode");
            function isSystemNode(nodeId2) {
              return nodeId2 === programNodeId || nodeId2 === gcNodeId || nodeId2 === idleNodeId;
            }
            __name(isSystemNode, "isSystemNode");
          }
          /**
           * Traverses the call tree derived from the samples calling back when a call is opened
           * and when it's closed
           */
          forEachFrame(openFrameCallback, closeFrameCallback, startTime, stopTime) {
            if (!this.profileHead || !this.samples) {
              return;
            }
            startTime = startTime || 0;
            stopTime = stopTime || Infinity;
            const samples = this.samples;
            const timestamps = this.timestamps;
            const idToNode = this.#idToParsedNode;
            const gcNode = this.gcNode;
            const samplesCount = samples.length;
            const startIndex = ArrayUtilities_exports.lowerBound(timestamps, startTime, ArrayUtilities_exports.DEFAULT_COMPARATOR);
            let stackTop = 0;
            const stackNodes = [];
            let prevId = this.profileHead.id;
            let sampleTime;
            let gcParentNode = null;
            const stackDepth = this.maxDepth + 3;
            if (!this.#stackStartTimes) {
              this.#stackStartTimes = new Array(stackDepth);
            }
            const stackStartTimes = this.#stackStartTimes;
            if (!this.#stackChildrenDuration) {
              this.#stackChildrenDuration = new Array(stackDepth);
            }
            const stackChildrenDuration = this.#stackChildrenDuration;
            let node2;
            let sampleIndex;
            for (sampleIndex = startIndex; sampleIndex < samplesCount; sampleIndex++) {
              sampleTime = timestamps[sampleIndex];
              if (sampleTime >= stopTime) {
                break;
              }
              const id2 = samples[sampleIndex];
              if (id2 === prevId) {
                continue;
              }
              node2 = idToNode.get(id2);
              let prevNode = idToNode.get(prevId) || null;
              if (!prevNode) {
                continue;
              }
              if (gcNode && node2 === gcNode) {
                gcParentNode = prevNode;
                openFrameCallback(gcParentNode.depth + 1, gcNode, sampleIndex, sampleTime);
                stackStartTimes[++stackTop] = sampleTime;
                stackChildrenDuration[stackTop] = 0;
                prevId = id2;
                continue;
              }
              if (gcNode && prevNode === gcNode && gcParentNode) {
                const start = stackStartTimes[stackTop];
                const duration2 = sampleTime - start;
                stackChildrenDuration[stackTop - 1] += duration2;
                closeFrameCallback(gcParentNode.depth + 1, gcNode, sampleIndex, start, duration2, duration2 - stackChildrenDuration[stackTop]);
                --stackTop;
                prevNode = gcParentNode;
                prevId = prevNode.id;
                gcParentNode = null;
              }
              while (node2 && node2.depth > prevNode.depth) {
                stackNodes.push(node2);
                node2 = node2.parent;
              }
              while (prevNode && prevNode !== node2) {
                const start = stackStartTimes[stackTop];
                const duration2 = sampleTime - start;
                stackChildrenDuration[stackTop - 1] += duration2;
                closeFrameCallback(prevNode.depth, prevNode, sampleIndex, start, duration2, duration2 - stackChildrenDuration[stackTop]);
                --stackTop;
                if (node2 && node2.depth === prevNode.depth) {
                  stackNodes.push(node2);
                  node2 = node2.parent;
                }
                prevNode = prevNode.parent;
              }
              while (stackNodes.length) {
                const currentNode = stackNodes.pop();
                if (!currentNode) {
                  break;
                }
                node2 = currentNode;
                openFrameCallback(currentNode.depth, currentNode, sampleIndex, sampleTime);
                stackStartTimes[++stackTop] = sampleTime;
                stackChildrenDuration[stackTop] = 0;
              }
              prevId = id2;
            }
            sampleTime = timestamps[sampleIndex] || this.profileEndTime;
            if (node2 && gcParentNode && idToNode.get(prevId) === gcNode) {
              const start = stackStartTimes[stackTop];
              const duration2 = sampleTime - start;
              stackChildrenDuration[stackTop - 1] += duration2;
              closeFrameCallback(gcParentNode.depth + 1, node2, sampleIndex, start, duration2, duration2 - stackChildrenDuration[stackTop]);
              --stackTop;
              prevId = gcParentNode.id;
            }
            for (let node22 = idToNode.get(prevId); node22?.parent; node22 = node22.parent) {
              const start = stackStartTimes[stackTop];
              const duration2 = sampleTime - start;
              stackChildrenDuration[stackTop - 1] += duration2;
              closeFrameCallback(node22.depth, node22, sampleIndex, start, duration2, duration2 - stackChildrenDuration[stackTop]);
              --stackTop;
            }
          }
          /**
           * Returns the node that corresponds to a given index of a sample.
           */
          nodeByIndex(index2) {
            return this.samples && this.#idToParsedNode.get(this.samples[index2]) || null;
          }
          /**
           * Returns the node that corresponds to a given node id.
           */
          nodeById(nodeId) {
            return this.#idToParsedNode.get(nodeId) || null;
          }
          nodes() {
            if (!this.#idToParsedNode) {
              return null;
            }
            return [...this.#idToParsedNode.values()];
          }
        };
      }
    });
    init_cpu_profile = __esm2({
      "node_modules/@paulirish/trace_engine/models/cpu_profile/cpu_profile.js"() {
        init_process_global();
        init_CPUProfileDataModel();
        init_ProfileTreeModel();
      }
    });
    SamplesHandler_exports = {};
    __export2(SamplesHandler_exports, {
      data: () => data7,
      finalize: () => finalize7,
      getProfileCallFunctionName: () => getProfileCallFunctionName,
      handleEvent: () => handleEvent7,
      reset: () => reset7
    });
    init_SamplesHandler = __esm2({
      "node_modules/@paulirish/trace_engine/models/trace/handlers/SamplesHandler.js"() {
        init_process_global();
        init_platform();
        init_cpu_profile();
        init_helpers2();
        init_types2();
        profilesInProcess = /* @__PURE__ */ new Map();
        entryToNode = /* @__PURE__ */ new Map();
        preprocessedData = /* @__PURE__ */ new Map();
        __name(parseCPUProfileData, "parseCPUProfileData");
        __name(reset7, "reset");
        __name(handleEvent7, "handleEvent");
        __name(finalize7, "finalize");
        __name(data7, "data");
        __name(getOrCreatePreProcessedData, "getOrCreatePreProcessedData");
        __name(getProfileCallFunctionName, "getProfileCallFunctionName");
      }
    });
    RendererHandler_exports = {};
    __export2(RendererHandler_exports, {
      assignIsMainFrame: () => assignIsMainFrame,
      assignMeta: () => assignMeta,
      assignOrigin: () => assignOrigin,
      assignThreadName: () => assignThreadName,
      buildHierarchy: () => buildHierarchy,
      data: () => data8,
      deps: () => deps3,
      finalize: () => finalize8,
      handleEvent: () => handleEvent8,
      handleUserConfig: () => handleUserConfig2,
      makeCompleteEvent: () => makeCompleteEvent,
      reset: () => reset8,
      sanitizeProcesses: () => sanitizeProcesses,
      sanitizeThreads: () => sanitizeThreads
    });
    init_RendererHandler = __esm2({
      "node_modules/@paulirish/trace_engine/models/trace/handlers/RendererHandler.js"() {
        init_process_global();
        init_platform();
        init_helpers2();
        init_types2();
        init_AuctionWorkletsHandler();
        init_helpers();
        init_MetaHandler();
        init_NetworkRequestsHandler();
        init_SamplesHandler();
        processes = /* @__PURE__ */ new Map();
        entityMappings2 = {
          eventsByEntity: /* @__PURE__ */ new Map(),
          entityByEvent: /* @__PURE__ */ new Map(),
          createdEntityCache: /* @__PURE__ */ new Map(),
          entityByUrlCache: /* @__PURE__ */ new Map()
        };
        compositorTileWorkers = Array();
        entryToNode2 = /* @__PURE__ */ new Map();
        completeEventStack = [];
        config = Configuration_exports.defaults();
        makeRendererProcess = /* @__PURE__ */ __name(() => ({
          url: null,
          isOnMainFrame: false,
          threads: /* @__PURE__ */ new Map()
        }), "makeRendererProcess");
        makeRendererThread = /* @__PURE__ */ __name(() => ({
          name: null,
          entries: [],
          profileCalls: [],
          layoutEvents: [],
          recalcStyleEvents: []
        }), "makeRendererThread");
        getOrCreateRendererProcess = /* @__PURE__ */ __name((processes22, pid) => {
          return MapUtilities_exports.getWithDefault(processes22, pid, makeRendererProcess);
        }, "getOrCreateRendererProcess");
        getOrCreateRendererThread = /* @__PURE__ */ __name((process52, tid) => {
          return MapUtilities_exports.getWithDefault(process52.threads, tid, makeRendererThread);
        }, "getOrCreateRendererThread");
        __name(handleUserConfig2, "handleUserConfig");
        __name(reset8, "reset");
        __name(handleEvent8, "handleEvent");
        __name(finalize8, "finalize");
        __name(data8, "data");
        __name(gatherCompositorThreads, "gatherCompositorThreads");
        __name(assignMeta, "assignMeta");
        __name(assignOrigin, "assignOrigin");
        __name(assignIsMainFrame, "assignIsMainFrame");
        __name(assignThreadName, "assignThreadName");
        __name(sanitizeProcesses, "sanitizeProcesses");
        __name(sanitizeThreads, "sanitizeThreads");
        __name(buildHierarchy, "buildHierarchy");
        __name(makeCompleteEvent, "makeCompleteEvent");
        __name(deps3, "deps");
      }
    });
    AsyncJSCallsHandler_exports = {};
    __export2(AsyncJSCallsHandler_exports, {
      data: () => data9,
      deps: () => deps4,
      finalize: () => finalize9,
      handleEvent: () => handleEvent9,
      reset: () => reset9
    });
    init_AsyncJSCallsHandler = __esm2({
      "node_modules/@paulirish/trace_engine/models/trace/handlers/AsyncJSCallsHandler.js"() {
        init_process_global();
        init_platform();
        init_types2();
        init_FlowsHandler();
        init_RendererHandler();
        schedulerToRunEntryPoints = /* @__PURE__ */ new Map();
        taskScheduleForTaskRunEvent = /* @__PURE__ */ new Map();
        asyncCallToScheduler = /* @__PURE__ */ new Map();
        runEntryPointToScheduler = /* @__PURE__ */ new Map();
        __name(reset9, "reset");
        __name(handleEvent9, "handleEvent");
        __name(finalize9, "finalize");
        __name(findNearestJSAncestor, "findNearestJSAncestor");
        __name(acceptJSInvocationsPredicate, "acceptJSInvocationsPredicate");
        __name(findFirstJsInvocationForAsyncTaskRun, "findFirstJsInvocationForAsyncTaskRun");
        __name(findFirstJSCallsForAsyncTaskRun, "findFirstJSCallsForAsyncTaskRun");
        __name(findFirstDescendantsOfType, "findFirstDescendantsOfType");
        __name(data9, "data");
        __name(deps4, "deps");
      }
    });
    DOMStatsHandler_exports = {};
    __export2(DOMStatsHandler_exports, {
      data: () => data10,
      finalize: () => finalize10,
      handleEvent: () => handleEvent10,
      reset: () => reset10
    });
    init_DOMStatsHandler = __esm2({
      "node_modules/@paulirish/trace_engine/models/trace/handlers/DOMStatsHandler.js"() {
        init_process_global();
        init_platform();
        init_types2();
        domStatsByFrameId = /* @__PURE__ */ new Map();
        __name(reset10, "reset");
        __name(handleEvent10, "handleEvent");
        __name(finalize10, "finalize");
        __name(data10, "data");
      }
    });
    UserTimingsHandler_exports = {};
    __export2(UserTimingsHandler_exports, {
      data: () => data11,
      finalize: () => finalize11,
      handleEvent: () => handleEvent11,
      reset: () => reset11,
      userTimingComparator: () => userTimingComparator
    });
    init_UserTimingsHandler = __esm2({
      "node_modules/@paulirish/trace_engine/models/trace/handlers/UserTimingsHandler.js"() {
        init_process_global();
        init_helpers2();
        init_types2();
        syntheticEvents = [];
        measureTraceByTraceId = /* @__PURE__ */ new Map();
        performanceMeasureEvents = [];
        performanceMarkEvents = [];
        consoleTimings = [];
        timestampEvents = [];
        __name(reset11, "reset");
        resourceTimingNames = [
          "workerStart",
          "redirectStart",
          "redirectEnd",
          "fetchStart",
          "domainLookupStart",
          "domainLookupEnd",
          "connectStart",
          "connectEnd",
          "secureConnectionStart",
          "requestStart",
          "responseStart",
          "responseEnd"
        ];
        navTimingNames = [
          "navigationStart",
          "unloadEventStart",
          "unloadEventEnd",
          "redirectStart",
          "redirectEnd",
          "fetchStart",
          "commitNavigationEnd",
          "domainLookupStart",
          "domainLookupEnd",
          "connectStart",
          "connectEnd",
          "secureConnectionStart",
          "requestStart",
          "responseStart",
          "responseEnd",
          "domLoading",
          "domInteractive",
          "domContentLoadedEventStart",
          "domContentLoadedEventEnd",
          "domComplete",
          "loadEventStart",
          "loadEventEnd"
        ];
        ignoredNames = [...resourceTimingNames, ...navTimingNames];
        __name(getEventTimings, "getEventTimings");
        __name(getEventTrack, "getEventTrack");
        __name(userTimingComparator, "userTimingComparator");
        __name(handleEvent11, "handleEvent");
        __name(finalize11, "finalize");
        __name(data11, "data");
      }
    });
    ExtensionTraceDataHandler_exports = {};
    __export2(ExtensionTraceDataHandler_exports, {
      data: () => data12,
      deps: () => deps5,
      extensionDataInConsoleTimeStamp: () => extensionDataInConsoleTimeStamp,
      extensionDataInPerformanceTiming: () => extensionDataInPerformanceTiming,
      extractConsoleAPIExtensionEntries: () => extractConsoleAPIExtensionEntries,
      extractPerformanceAPIExtensionEntries: () => extractPerformanceAPIExtensionEntries,
      finalize: () => finalize12,
      handleEvent: () => handleEvent12,
      reset: () => reset12
    });
    init_ExtensionTraceDataHandler = __esm2({
      "node_modules/@paulirish/trace_engine/models/trace/handlers/ExtensionTraceDataHandler.js"() {
        init_process_global();
        init_helpers2();
        init_types2();
        init_UserTimingsHandler();
        extensionTrackEntries = [];
        extensionTrackData = [];
        extensionMarkers = [];
        entryToNode3 = /* @__PURE__ */ new Map();
        timeStampByName = /* @__PURE__ */ new Map();
        syntheticConsoleEntriesForTimingsTrack = [];
        __name(handleEvent12, "handleEvent");
        __name(reset12, "reset");
        __name(finalize12, "finalize");
        __name(createExtensionFlameChartEntries, "createExtensionFlameChartEntries");
        __name(extractConsoleAPIExtensionEntries, "extractConsoleAPIExtensionEntries");
        __name(extractPerformanceAPIExtensionEntries, "extractPerformanceAPIExtensionEntries");
        __name(extensionDataInPerformanceTiming, "extensionDataInPerformanceTiming");
        __name(extensionDataInConsoleTimeStamp, "extensionDataInConsoleTimeStamp");
        __name(data12, "data");
        __name(deps5, "deps");
      }
    });
    LayerTreeHandler_exports = {};
    __export2(LayerTreeHandler_exports, {
      data: () => data13,
      deps: () => deps6,
      finalize: () => finalize13,
      handleEvent: () => handleEvent13,
      reset: () => reset13
    });
    init_LayerTreeHandler = __esm2({
      "node_modules/@paulirish/trace_engine/models/trace/handlers/LayerTreeHandler.js"() {
        init_process_global();
        init_helpers2();
        init_types2();
        init_MetaHandler();
        paintEvents = [];
        snapshotEvents = [];
        paintToSnapshotMap = /* @__PURE__ */ new Map();
        lastPaintForLayerId = {};
        currentMainFrameLayerTreeId = null;
        updateLayerEvents = [];
        relevantEvents = [];
        __name(reset13, "reset");
        __name(handleEvent13, "handleEvent");
        __name(finalize13, "finalize");
        __name(data13, "data");
        __name(deps6, "deps");
      }
    });
    Threads_exports = {};
    __export2(Threads_exports, {
      ThreadType: () => ThreadType,
      threadsInRenderer: () => threadsInRenderer,
      threadsInTrace: () => threadsInTrace
    });
    init_Threads = __esm2({
      "node_modules/@paulirish/trace_engine/models/trace/handlers/Threads.js"() {
        init_process_global();
        (function(ThreadType2) {
          ThreadType2["MAIN_THREAD"] = "MAIN_THREAD";
          ThreadType2["WORKER"] = "WORKER";
          ThreadType2["RASTERIZER"] = "RASTERIZER";
          ThreadType2["AUCTION_WORKLET"] = "AUCTION_WORKLET";
          ThreadType2["OTHER"] = "OTHER";
          ThreadType2["CPU_PROFILE"] = "CPU_PROFILE";
          ThreadType2["THREAD_POOL"] = "THREAD_POOL";
        })(ThreadType || (ThreadType = {}));
        __name(getThreadTypeForRendererThread, "getThreadTypeForRendererThread");
        __name(threadsInRenderer, "threadsInRenderer");
        threadsInHandlerDataCache = /* @__PURE__ */ new WeakMap();
        __name(threadsInTrace, "threadsInTrace");
      }
    });
    FramesHandler_exports = {};
    __export2(FramesHandler_exports, {
      LayerPaintEvent: () => LayerPaintEvent,
      PendingFrame: () => PendingFrame,
      TimelineFrameBeginFrameQueue: () => TimelineFrameBeginFrameQueue,
      TimelineFrameModel: () => TimelineFrameModel,
      data: () => data14,
      deps: () => deps7,
      finalize: () => finalize14,
      framesWithinWindow: () => framesWithinWindow,
      handleEvent: () => handleEvent14,
      reset: () => reset14
    });
    init_FramesHandler = __esm2({
      "node_modules/@paulirish/trace_engine/models/trace/handlers/FramesHandler.js"() {
        init_process_global();
        init_platform();
        init_helpers2();
        init_types2();
        init_AuctionWorkletsHandler();
        init_LayerTreeHandler();
        init_MetaHandler();
        init_RendererHandler();
        init_Threads();
        model = null;
        relevantFrameEvents = [];
        __name(isFrameEvent, "isFrameEvent");
        __name(entryIsTopLevel, "entryIsTopLevel");
        MAIN_FRAME_MARKERS = /* @__PURE__ */ new Set([
          TraceEvents_exports.Name.SCHEDULE_STYLE_RECALCULATION,
          TraceEvents_exports.Name.INVALIDATE_LAYOUT,
          TraceEvents_exports.Name.BEGIN_MAIN_THREAD_FRAME,
          TraceEvents_exports.Name.SCROLL_LAYER
        ]);
        __name(reset14, "reset");
        __name(handleEvent14, "handleEvent");
        __name(finalize14, "finalize");
        __name(data14, "data");
        __name(deps7, "deps");
        TimelineFrameModel = class {
          static {
            __name(this, "TimelineFrameModel");
          }
          #frames = [];
          #frameById = {};
          #beginFrameQueue = new TimelineFrameBeginFrameQueue();
          #lastFrame = null;
          #mainFrameCommitted = false;
          #mainFrameRequested = false;
          #lastLayerTree = null;
          #framePendingActivation = null;
          #framePendingCommit = null;
          #lastBeginFrame = null;
          #lastNeedsBeginFrame = null;
          #lastTaskBeginTime = null;
          #layerTreeId = null;
          #activeProcessId = null;
          #activeThreadId = null;
          #layerTreeData;
          constructor(allEvents, rendererData, auctionWorkletsData, metaData, layerTreeData) {
            const mainThreads = threadsInRenderer(rendererData, auctionWorkletsData).filter((thread) => {
              return thread.type === ThreadType.MAIN_THREAD && thread.processIsOnMainFrame;
            });
            const threadData = mainThreads.map((thread) => {
              return {
                tid: thread.tid,
                pid: thread.pid,
                startTime: thread.entries[0].ts
              };
            });
            this.#layerTreeData = layerTreeData;
            this.#addTraceEvents(allEvents, threadData, metaData.mainFrameId);
          }
          framesById() {
            return this.#frameById;
          }
          frames() {
            return this.#frames;
          }
          #handleBeginFrame(startTime, seqId) {
            if (!this.#lastFrame) {
              this.#startFrame(startTime, seqId);
            }
            this.#lastBeginFrame = startTime;
            this.#beginFrameQueue.addFrameIfNotExists(seqId, startTime, false, false);
          }
          #handleDroppedFrame(startTime, seqId, isPartial) {
            if (!this.#lastFrame) {
              this.#startFrame(startTime, seqId);
            }
            this.#beginFrameQueue.addFrameIfNotExists(seqId, startTime, true, isPartial);
            this.#beginFrameQueue.setDropped(seqId, true);
            this.#beginFrameQueue.setPartial(seqId, isPartial);
          }
          #handleDrawFrame(startTime, seqId) {
            if (!this.#lastFrame) {
              this.#startFrame(startTime, seqId);
              return;
            }
            if (this.#mainFrameCommitted || !this.#mainFrameRequested) {
              if (this.#lastNeedsBeginFrame) {
                const idleTimeEnd = this.#framePendingActivation ? this.#framePendingActivation.triggerTime : this.#lastBeginFrame || this.#lastNeedsBeginFrame;
                if (idleTimeEnd > this.#lastFrame.startTime) {
                  this.#lastFrame.idle = true;
                  this.#lastBeginFrame = null;
                }
                this.#lastNeedsBeginFrame = null;
              }
              const framesToVisualize = this.#beginFrameQueue.processPendingBeginFramesOnDrawFrame(seqId);
              for (const frame of framesToVisualize) {
                const isLastFrameIdle = this.#lastFrame.idle;
                this.#startFrame(frame.startTime, seqId);
                if (isLastFrameIdle && this.#framePendingActivation) {
                  this.#commitPendingFrame();
                }
                if (frame.isDropped) {
                  this.#lastFrame.dropped = true;
                }
                if (frame.isPartial) {
                  this.#lastFrame.isPartial = true;
                }
              }
            }
            this.#mainFrameCommitted = false;
          }
          #handleActivateLayerTree() {
            if (!this.#lastFrame) {
              return;
            }
            if (this.#framePendingActivation && !this.#lastNeedsBeginFrame) {
              this.#commitPendingFrame();
            }
          }
          #handleRequestMainThreadFrame() {
            if (!this.#lastFrame) {
              return;
            }
            this.#mainFrameRequested = true;
          }
          #handleCommit() {
            if (!this.#framePendingCommit) {
              return;
            }
            this.#framePendingActivation = this.#framePendingCommit;
            this.#framePendingCommit = null;
            this.#mainFrameRequested = false;
            this.#mainFrameCommitted = true;
          }
          #handleLayerTreeSnapshot(layerTree) {
            this.#lastLayerTree = layerTree;
          }
          #handleNeedFrameChanged(startTime, needsBeginFrame) {
            if (needsBeginFrame) {
              this.#lastNeedsBeginFrame = startTime;
            }
          }
          #startFrame(startTime, seqId) {
            if (this.#lastFrame) {
              this.#flushFrame(this.#lastFrame, startTime);
            }
            this.#lastFrame = new TimelineFrame(seqId, startTime, Timing_exports.Micro(startTime - data5().traceBounds.min));
          }
          #flushFrame(frame, endTime) {
            frame.setLayerTree(this.#lastLayerTree);
            frame.setEndTime(endTime);
            if (this.#lastLayerTree) {
              this.#lastLayerTree.paints = frame.paints;
            }
            const lastFrame = this.#frames[this.#frames.length - 1];
            if (this.#frames.length && lastFrame && (frame.startTime !== lastFrame.endTime || frame.startTime > frame.endTime)) {
              console.assert(false, `Inconsistent frame time for frame ${this.#frames.length} (${frame.startTime} - ${frame.endTime})`);
            }
            const newFramesLength = this.#frames.push(frame);
            frame.setIndex(newFramesLength - 1);
            if (typeof frame.mainFrameId === "number") {
              this.#frameById[frame.mainFrameId] = frame;
            }
          }
          #commitPendingFrame() {
            if (!this.#framePendingActivation || !this.#lastFrame) {
              return;
            }
            this.#lastFrame.paints = this.#framePendingActivation.paints;
            this.#lastFrame.mainFrameId = this.#framePendingActivation.mainFrameId;
            this.#framePendingActivation = null;
          }
          #addTraceEvents(events, threadData, mainFrameId22) {
            let j = 0;
            this.#activeThreadId = threadData.length && threadData[0].tid || null;
            this.#activeProcessId = threadData.length && threadData[0].pid || null;
            for (let i = 0; i < events.length; ++i) {
              while (j + 1 < threadData.length && threadData[j + 1].startTime <= events[i].ts) {
                this.#activeThreadId = threadData[++j].tid;
                this.#activeProcessId = threadData[j].pid;
              }
              this.#addTraceEvent(events[i], mainFrameId22);
            }
            this.#activeThreadId = null;
            this.#activeProcessId = null;
          }
          #addTraceEvent(event, mainFrameId22) {
            if (TraceEvents_exports.isSetLayerId(event) && event.args.data.frame === mainFrameId22) {
              this.#layerTreeId = event.args.data.layerTreeId;
            } else if (TraceEvents_exports.isLayerTreeHostImplSnapshot(event) && Number(event.id) === this.#layerTreeId) {
              this.#handleLayerTreeSnapshot({
                entry: event,
                paints: []
              });
            } else {
              if (isFrameEvent(event)) {
                this.#processCompositorEvents(event);
              }
              if (event.tid === this.#activeThreadId && event.pid === this.#activeProcessId) {
                this.#addMainThreadTraceEvent(event);
              }
            }
          }
          #processCompositorEvents(entry) {
            if (entry.args["layerTreeId"] !== this.#layerTreeId) {
              return;
            }
            if (TraceEvents_exports.isBeginFrame(entry)) {
              this.#handleBeginFrame(entry.ts, entry.args["frameSeqId"]);
            } else if (TraceEvents_exports.isDrawFrame(entry)) {
              this.#handleDrawFrame(entry.ts, entry.args["frameSeqId"]);
            } else if (TraceEvents_exports.isActivateLayerTree(entry)) {
              this.#handleActivateLayerTree();
            } else if (TraceEvents_exports.isRequestMainThreadFrame(entry)) {
              this.#handleRequestMainThreadFrame();
            } else if (TraceEvents_exports.isNeedsBeginFrameChanged(entry)) {
              this.#handleNeedFrameChanged(entry.ts, entry.args["data"] && Boolean(entry.args["data"]["needsBeginFrame"]));
            } else if (TraceEvents_exports.isDroppedFrame(entry)) {
              this.#handleDroppedFrame(entry.ts, entry.args["frameSeqId"], Boolean(entry.args["hasPartialUpdate"]));
            }
          }
          #addMainThreadTraceEvent(entry) {
            if (entryIsTopLevel(entry)) {
              this.#lastTaskBeginTime = entry.ts;
            }
            if (!this.#framePendingCommit && MAIN_FRAME_MARKERS.has(entry.name)) {
              this.#framePendingCommit = new PendingFrame(this.#lastTaskBeginTime || entry.ts);
            }
            if (!this.#framePendingCommit) {
              return;
            }
            if (TraceEvents_exports.isBeginMainThreadFrame(entry) && entry.args.data.frameId) {
              this.#framePendingCommit.mainFrameId = entry.args.data.frameId;
            }
            if (TraceEvents_exports.isPaint(entry)) {
              const snapshot2 = this.#layerTreeData.paintsToSnapshots.get(entry);
              if (snapshot2) {
                this.#framePendingCommit.paints.push(new LayerPaintEvent(entry, snapshot2));
              }
            }
            if ((TraceEvents_exports.isCompositeLayers(entry) || TraceEvents_exports.isCommit(entry)) && entry.args["layerTreeId"] === this.#layerTreeId) {
              this.#handleCommit();
            }
          }
        };
        TimelineFrame = class {
          static {
            __name(this, "TimelineFrame");
          }
          // These fields exist to satisfy the base Event type which all
          // "trace events" must implement. They aren't used, but doing this means we
          // can pass `TimelineFrame` instances into places that expect
          // Types.Events.Event.
          cat = "devtools.legacy_frame";
          name = "frame";
          ph = TraceEvents_exports.Phase.COMPLETE;
          ts;
          pid = TraceEvents_exports.ProcessID(-1);
          tid = TraceEvents_exports.ThreadID(-1);
          index = -1;
          startTime;
          startTimeOffset;
          endTime;
          duration;
          idle;
          dropped;
          isPartial;
          layerTree;
          paints;
          mainFrameId;
          seqId;
          constructor(seqId, startTime, startTimeOffset) {
            this.seqId = seqId;
            this.startTime = startTime;
            this.ts = startTime;
            this.startTimeOffset = startTimeOffset;
            this.endTime = this.startTime;
            this.duration = Timing_exports.Micro(0);
            this.idle = false;
            this.dropped = false;
            this.isPartial = false;
            this.layerTree = null;
            this.paints = [];
            this.mainFrameId = void 0;
          }
          setIndex(i) {
            this.index = i;
          }
          setEndTime(endTime) {
            this.endTime = endTime;
            this.duration = Timing_exports.Micro(this.endTime - this.startTime);
          }
          setLayerTree(layerTree) {
            this.layerTree = layerTree;
          }
          /**
           * Fake the `dur` field to meet the expected value given that we pretend
           * these TimelineFrame classes are trace events across the codebase.
           */
          get dur() {
            return this.duration;
          }
        };
        LayerPaintEvent = class {
          static {
            __name(this, "LayerPaintEvent");
          }
          #event;
          #snapshot;
          constructor(event, snapshot2) {
            this.#event = event;
            this.#snapshot = snapshot2;
          }
          layerId() {
            return this.#event.args.data.layerId;
          }
          event() {
            return this.#event;
          }
          picture() {
            const rect = this.#snapshot.args.snapshot.params?.layer_rect;
            const pictureData = this.#snapshot.args.snapshot.skp64;
            return rect && pictureData ? { rect, serializedPicture: pictureData } : null;
          }
        };
        PendingFrame = class {
          static {
            __name(this, "PendingFrame");
          }
          paints;
          mainFrameId;
          triggerTime;
          constructor(triggerTime) {
            this.paints = [];
            this.mainFrameId = void 0;
            this.triggerTime = triggerTime;
          }
        };
        BeginFrameInfo = class {
          static {
            __name(this, "BeginFrameInfo");
          }
          seqId;
          startTime;
          isDropped;
          isPartial;
          constructor(seqId, startTime, isDropped, isPartial) {
            this.seqId = seqId;
            this.startTime = startTime;
            this.isDropped = isDropped;
            this.isPartial = isPartial;
          }
        };
        TimelineFrameBeginFrameQueue = class {
          static {
            __name(this, "TimelineFrameBeginFrameQueue");
          }
          queueFrames = [];
          // Maps frameSeqId to BeginFrameInfo.
          mapFrames = {};
          // Add a BeginFrame to the queue, if it does not already exit.
          addFrameIfNotExists(seqId, startTime, isDropped, isPartial) {
            if (!(seqId in this.mapFrames)) {
              this.mapFrames[seqId] = new BeginFrameInfo(seqId, startTime, isDropped, isPartial);
              this.queueFrames.push(seqId);
            }
          }
          // Set a BeginFrame in queue as dropped.
          setDropped(seqId, isDropped) {
            if (seqId in this.mapFrames) {
              this.mapFrames[seqId].isDropped = isDropped;
            }
          }
          setPartial(seqId, isPartial) {
            if (seqId in this.mapFrames) {
              this.mapFrames[seqId].isPartial = isPartial;
            }
          }
          processPendingBeginFramesOnDrawFrame(seqId) {
            const framesToVisualize = [];
            if (seqId in this.mapFrames) {
              while (this.queueFrames[0] !== seqId) {
                const currentSeqId = this.queueFrames[0];
                if (this.mapFrames[currentSeqId].isDropped) {
                  framesToVisualize.push(this.mapFrames[currentSeqId]);
                }
                delete this.mapFrames[currentSeqId];
                this.queueFrames.shift();
              }
              framesToVisualize.push(this.mapFrames[seqId]);
              delete this.mapFrames[seqId];
              this.queueFrames.shift();
            }
            return framesToVisualize;
          }
        };
        __name(framesWithinWindow, "framesWithinWindow");
      }
    });
    GPUHandler_exports = {};
    __export2(GPUHandler_exports, {
      data: () => data15,
      deps: () => deps8,
      finalize: () => finalize15,
      handleEvent: () => handleEvent15,
      reset: () => reset15
    });
    init_GPUHandler = __esm2({
      "node_modules/@paulirish/trace_engine/models/trace/handlers/GPUHandler.js"() {
        init_process_global();
        init_helpers2();
        init_types2();
        init_MetaHandler();
        eventsInProcessThread = /* @__PURE__ */ new Map();
        mainGPUThreadTasks = [];
        __name(reset15, "reset");
        __name(handleEvent15, "handleEvent");
        __name(finalize15, "finalize");
        __name(data15, "data");
        __name(deps8, "deps");
      }
    });
    ImagePaintingHandler_exports = {};
    __export2(ImagePaintingHandler_exports, {
      data: () => data16,
      finalize: () => finalize16,
      handleEvent: () => handleEvent16,
      reset: () => reset16
    });
    init_ImagePaintingHandler = __esm2({
      "node_modules/@paulirish/trace_engine/models/trace/handlers/ImagePaintingHandler.js"() {
        init_process_global();
        init_platform();
        init_types2();
        init_MetaHandler();
        paintImageEvents = /* @__PURE__ */ new Map();
        decodeLazyPixelRefEvents = /* @__PURE__ */ new Map();
        paintImageByLazyPixelRef = /* @__PURE__ */ new Map();
        eventToPaintImage = /* @__PURE__ */ new Map();
        urlToPaintImage = /* @__PURE__ */ new Map();
        paintEventToCorrectedDisplaySize = /* @__PURE__ */ new Map();
        didCorrectForHostDpr = false;
        __name(reset16, "reset");
        __name(handleEvent16, "handleEvent");
        __name(finalize16, "finalize");
        __name(data16, "data");
      }
    });
    InitiatorsHandler_exports = {};
    __export2(InitiatorsHandler_exports, {
      data: () => data17,
      deps: () => deps9,
      finalize: () => finalize17,
      handleEvent: () => handleEvent17,
      reset: () => reset17
    });
    init_InitiatorsHandler = __esm2({
      "node_modules/@paulirish/trace_engine/models/trace/handlers/InitiatorsHandler.js"() {
        init_process_global();
        init_helpers2();
        init_types2();
        init_AsyncJSCallsHandler();
        init_FlowsHandler();
        lastScheduleStyleRecalcByFrame = /* @__PURE__ */ new Map();
        lastInvalidationEventForFrame = /* @__PURE__ */ new Map();
        lastRecalcByFrame = /* @__PURE__ */ new Map();
        eventToInitiatorMap2 = /* @__PURE__ */ new Map();
        initiatorToEventsMap = /* @__PURE__ */ new Map();
        timerInstallEventsById = /* @__PURE__ */ new Map();
        requestIdleCallbackEventsById = /* @__PURE__ */ new Map();
        webSocketCreateEventsById = /* @__PURE__ */ new Map();
        schedulePostTaskCallbackEventsById = /* @__PURE__ */ new Map();
        __name(reset17, "reset");
        __name(storeInitiator, "storeInitiator");
        __name(handleEvent17, "handleEvent");
        __name(createRelationshipsFromFlows, "createRelationshipsFromFlows");
        __name(createRelationshipsFromAsyncJSCalls, "createRelationshipsFromAsyncJSCalls");
        __name(finalize17, "finalize");
        __name(data17, "data");
        __name(deps9, "deps");
      }
    });
    InvalidationsHandler_exports = {};
    __export2(InvalidationsHandler_exports, {
      data: () => data18,
      finalize: () => finalize18,
      handleEvent: () => handleEvent18,
      handleUserConfig: () => handleUserConfig3,
      reset: () => reset18
    });
    init_InvalidationsHandler = __esm2({
      "node_modules/@paulirish/trace_engine/models/trace/handlers/InvalidationsHandler.js"() {
        init_process_global();
        init_types2();
        frameStateByFrame = /* @__PURE__ */ new Map();
        maxInvalidationsPerEvent = null;
        __name(reset18, "reset");
        __name(handleUserConfig3, "handleUserConfig");
        __name(getState, "getState");
        __name(getFrameId, "getFrameId");
        __name(addInvalidationToEvent, "addInvalidationToEvent");
        __name(handleEvent18, "handleEvent");
        __name(finalize18, "finalize");
        __name(data18, "data");
      }
    });
    PageLoadMetricsHandler_exports = {};
    __export2(PageLoadMetricsHandler_exports, {
      MetricName: () => MetricName,
      ScoreClassification: () => ScoreClassification,
      data: () => data19,
      deps: () => deps10,
      finalize: () => finalize19,
      getFrameIdForPageLoadEvent: () => getFrameIdForPageLoadEvent,
      handleEvent: () => handleEvent19,
      metricIsLCP: () => metricIsLCP,
      reset: () => reset19,
      scoreClassificationForDOMContentLoaded: () => scoreClassificationForDOMContentLoaded,
      scoreClassificationForFirstContentfulPaint: () => scoreClassificationForFirstContentfulPaint,
      scoreClassificationForLargestContentfulPaint: () => scoreClassificationForLargestContentfulPaint,
      scoreClassificationForTimeToInteractive: () => scoreClassificationForTimeToInteractive,
      scoreClassificationForTotalBlockingTime: () => scoreClassificationForTotalBlockingTime
    });
    init_PageLoadMetricsHandler = __esm2({
      "node_modules/@paulirish/trace_engine/models/trace/handlers/PageLoadMetricsHandler.js"() {
        init_process_global();
        init_platform();
        init_helpers2();
        init_types2();
        init_MetaHandler();
        metricScoresByFrameId = /* @__PURE__ */ new Map();
        allMarkerEvents = [];
        __name(reset19, "reset");
        pageLoadEventsArray = [];
        selectedLCPCandidateEvents = /* @__PURE__ */ new Set();
        __name(handleEvent19, "handleEvent");
        __name(storePageLoadMetricAgainstNavigationId, "storePageLoadMetricAgainstNavigationId");
        __name(storeMetricScore, "storeMetricScore");
        __name(getFrameIdForPageLoadEvent, "getFrameIdForPageLoadEvent");
        __name(getNavigationForPageLoadEvent, "getNavigationForPageLoadEvent");
        __name(scoreClassificationForFirstContentfulPaint, "scoreClassificationForFirstContentfulPaint");
        __name(scoreClassificationForTimeToInteractive, "scoreClassificationForTimeToInteractive");
        __name(scoreClassificationForLargestContentfulPaint, "scoreClassificationForLargestContentfulPaint");
        __name(scoreClassificationForDOMContentLoaded, "scoreClassificationForDOMContentLoaded");
        __name(scoreClassificationForTotalBlockingTime, "scoreClassificationForTotalBlockingTime");
        __name(gatherFinalLCPEvents, "gatherFinalLCPEvents");
        __name(finalize19, "finalize");
        __name(data19, "data");
        __name(deps10, "deps");
        (function(ScoreClassification2) {
          ScoreClassification2["GOOD"] = "good";
          ScoreClassification2["OK"] = "ok";
          ScoreClassification2["BAD"] = "bad";
          ScoreClassification2["UNCLASSIFIED"] = "unclassified";
        })(ScoreClassification || (ScoreClassification = {}));
        (function(MetricName2) {
          MetricName2["FCP"] = "FCP";
          MetricName2["FP"] = "FP";
          MetricName2["L"] = "L";
          MetricName2["LCP"] = "LCP";
          MetricName2["DCL"] = "DCL";
          MetricName2["TTI"] = "TTI";
          MetricName2["TBT"] = "TBT";
          MetricName2["CLS"] = "CLS";
          MetricName2["NAV"] = "Nav";
        })(MetricName || (MetricName = {}));
        __name(metricIsLCP, "metricIsLCP");
      }
    });
    LargestImagePaintHandler_exports = {};
    __export2(LargestImagePaintHandler_exports, {
      data: () => data20,
      deps: () => deps11,
      finalize: () => finalize20,
      handleEvent: () => handleEvent20,
      reset: () => reset20
    });
    init_LargestImagePaintHandler = __esm2({
      "node_modules/@paulirish/trace_engine/models/trace/handlers/LargestImagePaintHandler.js"() {
        init_process_global();
        init_platform();
        init_types2();
        init_MetaHandler();
        init_NetworkRequestsHandler();
        init_PageLoadMetricsHandler();
        imagePaintsByNodeIdAndProcess = /* @__PURE__ */ new Map();
        lcpRequestByNavigationId = /* @__PURE__ */ new Map();
        __name(reset20, "reset");
        __name(handleEvent20, "handleEvent");
        __name(finalize20, "finalize");
        __name(data20, "data");
        __name(deps11, "deps");
      }
    });
    LargestTextPaintHandler_exports = {};
    __export2(LargestTextPaintHandler_exports, {
      data: () => data21,
      finalize: () => finalize21,
      handleEvent: () => handleEvent21,
      reset: () => reset21
    });
    init_LargestTextPaintHandler = __esm2({
      "node_modules/@paulirish/trace_engine/models/trace/handlers/LargestTextPaintHandler.js"() {
        init_process_global();
        init_types2();
        textPaintByDOMNodeId = /* @__PURE__ */ new Map();
        __name(reset21, "reset");
        __name(handleEvent21, "handleEvent");
        __name(finalize21, "finalize");
        __name(data21, "data");
      }
    });
    ScreenshotsHandler_exports = {};
    __export2(ScreenshotsHandler_exports, {
      data: () => data22,
      deps: () => deps12,
      finalize: () => finalize22,
      handleEvent: () => handleEvent22,
      reset: () => reset22,
      screenshotImageDataUri: () => screenshotImageDataUri
    });
    init_ScreenshotsHandler = __esm2({
      "node_modules/@paulirish/trace_engine/models/trace/handlers/ScreenshotsHandler.js"() {
        init_process_global();
        init_helpers2();
        init_types2();
        unpairedAsyncEvents = [];
        legacyScreenshotEvents = [];
        modernScreenshotEvents = [];
        syntheticScreenshots = [];
        frameSequenceToTs = {};
        __name(reset22, "reset");
        __name(handleEvent22, "handleEvent");
        __name(finalize22, "finalize");
        __name(screenshotImageDataUri, "screenshotImageDataUri");
        __name(data22, "data");
        __name(deps12, "deps");
      }
    });
    LayoutShiftsHandler_exports = {};
    __export2(LayoutShiftsHandler_exports, {
      LayoutShiftsThreshold: () => LayoutShiftsThreshold,
      MAX_CLUSTER_DURATION: () => MAX_CLUSTER_DURATION,
      MAX_SHIFT_TIME_DELTA: () => MAX_SHIFT_TIME_DELTA,
      data: () => data23,
      deps: () => deps13,
      finalize: () => finalize23,
      handleEvent: () => handleEvent23,
      reset: () => reset23,
      scoreClassificationForLayoutShift: () => scoreClassificationForLayoutShift
    });
    init_LayoutShiftsHandler = __esm2({
      "node_modules/@paulirish/trace_engine/models/trace/handlers/LayoutShiftsHandler.js"() {
        init_process_global();
        init_platform();
        init_helpers2();
        init_types2();
        init_MetaHandler();
        init_PageLoadMetricsHandler();
        init_ScreenshotsHandler();
        MAX_CLUSTER_DURATION = Timing_exports3.milliToMicro(Timing_exports.Milli(5e3));
        MAX_SHIFT_TIME_DELTA = Timing_exports3.milliToMicro(Timing_exports.Milli(1e3));
        layoutShiftEvents = [];
        layoutInvalidationEvents = [];
        scheduleStyleInvalidationEvents = [];
        styleRecalcInvalidationEvents = [];
        renderFrameImplCreateChildFrameEvents = [];
        domLoadingEvents = [];
        layoutImageUnsizedEvents = [];
        remoteFonts = [];
        backendNodeIds = /* @__PURE__ */ new Set();
        prePaintEvents = [];
        paintImageEvents2 = [];
        sessionMaxScore = 0;
        clsWindowID = -1;
        clusters = [];
        clustersByNavigationId = /* @__PURE__ */ new Map();
        scoreRecords = [];
        __name(reset23, "reset");
        __name(handleEvent23, "handleEvent");
        __name(traceWindowFromTime, "traceWindowFromTime");
        __name(updateTraceWindowMax, "updateTraceWindowMax");
        __name(findScreenshots, "findScreenshots");
        __name(buildScoreRecords, "buildScoreRecords");
        __name(collectNodes, "collectNodes");
        __name(finalize23, "finalize");
        __name(buildLayoutShiftsClusters, "buildLayoutShiftsClusters");
        __name(data23, "data");
        __name(deps13, "deps");
        __name(scoreClassificationForLayoutShift, "scoreClassificationForLayoutShift");
        (function(LayoutShiftsThreshold2) {
          LayoutShiftsThreshold2[LayoutShiftsThreshold2["GOOD"] = 0] = "GOOD";
          LayoutShiftsThreshold2[LayoutShiftsThreshold2["NEEDS_IMPROVEMENT"] = 0.1] = "NEEDS_IMPROVEMENT";
          LayoutShiftsThreshold2[LayoutShiftsThreshold2["BAD"] = 0.25] = "BAD";
        })(LayoutShiftsThreshold || (LayoutShiftsThreshold = {}));
      }
    });
    MemoryHandler_exports = {};
    __export2(MemoryHandler_exports, {
      data: () => data24,
      finalize: () => finalize24,
      handleEvent: () => handleEvent24,
      reset: () => reset24
    });
    init_MemoryHandler = __esm2({
      "node_modules/@paulirish/trace_engine/models/trace/handlers/MemoryHandler.js"() {
        init_process_global();
        init_platform();
        init_types2();
        updateCountersByProcess = /* @__PURE__ */ new Map();
        __name(reset24, "reset");
        __name(handleEvent24, "handleEvent");
        __name(finalize24, "finalize");
        __name(data24, "data");
      }
    });
    PageFramesHandler_exports = {};
    __export2(PageFramesHandler_exports, {
      data: () => data25,
      finalize: () => finalize25,
      handleEvent: () => handleEvent25,
      reset: () => reset25
    });
    init_PageFramesHandler = __esm2({
      "node_modules/@paulirish/trace_engine/models/trace/handlers/PageFramesHandler.js"() {
        init_process_global();
        init_types2();
        frames = /* @__PURE__ */ new Map();
        __name(reset25, "reset");
        __name(handleEvent25, "handleEvent");
        __name(finalize25, "finalize");
        __name(data25, "data");
      }
    });
    ScriptsHandler_exports = {};
    __export2(ScriptsHandler_exports, {
      data: () => data26,
      deps: () => deps14,
      finalize: () => finalize26,
      getScriptGeneratedSizes: () => getScriptGeneratedSizes,
      handleEvent: () => handleEvent26,
      reset: () => reset26
    });
    init_ScriptsHandler = __esm2({
      "node_modules/@paulirish/trace_engine/models/trace/handlers/ScriptsHandler.js"() {
        init_process_global();
        init_platform();
        init_types2();
        init_MetaHandler();
        init_NetworkRequestsHandler();
        __name(completeURL, "completeURL");
        scriptById = /* @__PURE__ */ new Map();
        __name(deps14, "deps");
        __name(reset26, "reset");
        __name(handleEvent26, "handleEvent");
        __name(findFrame, "findFrame");
        __name(findNetworkRequest, "findNetworkRequest");
        __name(computeMappingEndColumns, "computeMappingEndColumns");
        __name(computeGeneratedFileSizes, "computeGeneratedFileSizes");
        __name(getScriptGeneratedSizes, "getScriptGeneratedSizes");
        __name(findCachedRawSourceMap, "findCachedRawSourceMap");
        __name(finalize26, "finalize");
        __name(data26, "data");
      }
    });
    SelectorStatsHandler_exports = {};
    __export2(SelectorStatsHandler_exports, {
      data: () => data27,
      finalize: () => finalize27,
      handleEvent: () => handleEvent27,
      reset: () => reset27
    });
    init_SelectorStatsHandler = __esm2({
      "node_modules/@paulirish/trace_engine/models/trace/handlers/SelectorStatsHandler.js"() {
        init_process_global();
        init_types2();
        lastRecalcStyleEvent = null;
        lastInvalidatedNode = null;
        selectorDataForRecalcStyle = /* @__PURE__ */ new Map();
        invalidatedNodeList = new Array();
        __name(reset27, "reset");
        __name(handleEvent27, "handleEvent");
        __name(finalize27, "finalize");
        __name(data27, "data");
      }
    });
    UserInteractionsHandler_exports = {};
    __export2(UserInteractionsHandler_exports, {
      LONG_INTERACTION_THRESHOLD: () => LONG_INTERACTION_THRESHOLD,
      categoryOfInteraction: () => categoryOfInteraction,
      data: () => data28,
      deps: () => deps15,
      finalize: () => finalize28,
      handleEvent: () => handleEvent28,
      removeNestedInteractionsAndSetProcessingTime: () => removeNestedInteractionsAndSetProcessingTime,
      reset: () => reset28,
      scoreClassificationForInteractionToNextPaint: () => scoreClassificationForInteractionToNextPaint
    });
    init_UserInteractionsHandler = __esm2({
      "node_modules/@paulirish/trace_engine/models/trace/handlers/UserInteractionsHandler.js"() {
        init_process_global();
        init_platform();
        init_helpers2();
        init_types2();
        init_MetaHandler();
        init_PageLoadMetricsHandler();
        beginCommitCompositorFrameEvents = [];
        parseMetaViewportEvents = [];
        LONG_INTERACTION_THRESHOLD = Timing_exports3.milliToMicro(Timing_exports.Milli(200));
        INP_GOOD_TIMING = LONG_INTERACTION_THRESHOLD;
        INP_MEDIUM_TIMING = Timing_exports3.milliToMicro(Timing_exports.Milli(500));
        longestInteractionEvent = null;
        interactionEvents = [];
        interactionEventsWithNoNesting = [];
        eventTimingStartEventsForInteractions = [];
        eventTimingEndEventsForInteractions = [];
        __name(reset28, "reset");
        __name(handleEvent28, "handleEvent");
        pointerEventTypes = /* @__PURE__ */ new Set([
          "pointerdown",
          "touchstart",
          "pointerup",
          "touchend",
          "mousedown",
          "mouseup",
          "click"
        ]);
        keyboardEventTypes = /* @__PURE__ */ new Set([
          "keydown",
          "keypress",
          "keyup"
        ]);
        __name(categoryOfInteraction, "categoryOfInteraction");
        __name(removeNestedInteractionsAndSetProcessingTime, "removeNestedInteractionsAndSetProcessingTime");
        __name(writeSyntheticTimespans, "writeSyntheticTimespans");
        __name(finalize28, "finalize");
        __name(data28, "data");
        __name(deps15, "deps");
        __name(scoreClassificationForInteractionToNextPaint, "scoreClassificationForInteractionToNextPaint");
      }
    });
    WorkersHandler_exports = {};
    __export2(WorkersHandler_exports, {
      data: () => data29,
      finalize: () => finalize29,
      handleEvent: () => handleEvent29,
      reset: () => reset29
    });
    init_WorkersHandler = __esm2({
      "node_modules/@paulirish/trace_engine/models/trace/handlers/WorkersHandler.js"() {
        init_process_global();
        init_types2();
        sessionIdEvents = [];
        workerIdByThread = /* @__PURE__ */ new Map();
        workerURLById = /* @__PURE__ */ new Map();
        __name(reset29, "reset");
        __name(handleEvent29, "handleEvent");
        __name(finalize29, "finalize");
        __name(data29, "data");
      }
    });
    WarningsHandler_exports = {};
    __export2(WarningsHandler_exports, {
      FORCED_REFLOW_THRESHOLD: () => FORCED_REFLOW_THRESHOLD,
      LONG_MAIN_THREAD_TASK_THRESHOLD: () => LONG_MAIN_THREAD_TASK_THRESHOLD,
      data: () => data30,
      deps: () => deps16,
      finalize: () => finalize30,
      handleEvent: () => handleEvent30,
      reset: () => reset30
    });
    init_WarningsHandler = __esm2({
      "node_modules/@paulirish/trace_engine/models/trace/handlers/WarningsHandler.js"() {
        init_process_global();
        init_platform();
        init_helpers2();
        init_types2();
        init_UserInteractionsHandler();
        init_WorkersHandler();
        warningsPerEvent = /* @__PURE__ */ new Map();
        eventsPerWarning = /* @__PURE__ */ new Map();
        allEventsStack = [];
        jsInvokeStack = [];
        taskReflowEvents = [];
        longTaskEvents = [];
        FORCED_REFLOW_THRESHOLD = Timing_exports3.milliToMicro(Timing_exports.Milli(30));
        LONG_MAIN_THREAD_TASK_THRESHOLD = Timing_exports3.milliToMicro(Timing_exports.Milli(50));
        __name(reset30, "reset");
        __name(storeWarning, "storeWarning");
        __name(handleEvent30, "handleEvent");
        __name(processForcedReflowWarning, "processForcedReflowWarning");
        __name(accomodateEventInStack, "accomodateEventInStack");
        __name(deps16, "deps");
        __name(finalize30, "finalize");
        __name(data30, "data");
      }
    });
    ModelHandlers_exports = {};
    __export2(ModelHandlers_exports, {
      AnimationFrames: () => AnimationFramesHandler_exports,
      Animations: () => AnimationHandler_exports,
      AsyncJSCalls: () => AsyncJSCallsHandler_exports,
      AuctionWorklets: () => AuctionWorkletsHandler_exports,
      DOMStats: () => DOMStatsHandler_exports,
      ExtensionTraceData: () => ExtensionTraceDataHandler_exports,
      Flows: () => FlowsHandler_exports,
      Frames: () => FramesHandler_exports,
      GPU: () => GPUHandler_exports,
      ImagePainting: () => ImagePaintingHandler_exports,
      Initiators: () => InitiatorsHandler_exports,
      Invalidations: () => InvalidationsHandler_exports,
      LargestImagePaint: () => LargestImagePaintHandler_exports,
      LargestTextPaint: () => LargestTextPaintHandler_exports,
      LayerTree: () => LayerTreeHandler_exports,
      LayoutShifts: () => LayoutShiftsHandler_exports,
      Memory: () => MemoryHandler_exports,
      Meta: () => MetaHandler_exports,
      NetworkRequests: () => NetworkRequestsHandler_exports,
      PageFrames: () => PageFramesHandler_exports,
      PageLoadMetrics: () => PageLoadMetricsHandler_exports,
      Renderer: () => RendererHandler_exports,
      Samples: () => SamplesHandler_exports,
      Screenshots: () => ScreenshotsHandler_exports,
      Scripts: () => ScriptsHandler_exports,
      SelectorStats: () => SelectorStatsHandler_exports,
      UserInteractions: () => UserInteractionsHandler_exports,
      UserTimings: () => UserTimingsHandler_exports,
      Warnings: () => WarningsHandler_exports,
      Workers: () => WorkersHandler_exports
    });
    init_ModelHandlers = __esm2({
      "node_modules/@paulirish/trace_engine/models/trace/handlers/ModelHandlers.js"() {
        init_process_global();
        init_AnimationFramesHandler();
        init_AnimationHandler();
        init_AsyncJSCallsHandler();
        init_AuctionWorkletsHandler();
        init_DOMStatsHandler();
        init_ExtensionTraceDataHandler();
        init_FlowsHandler();
        init_FramesHandler();
        init_GPUHandler();
        init_ImagePaintingHandler();
        init_InitiatorsHandler();
        init_InvalidationsHandler();
        init_LargestImagePaintHandler();
        init_LargestTextPaintHandler();
        init_LayerTreeHandler();
        init_LayoutShiftsHandler();
        init_MemoryHandler();
        init_MetaHandler();
        init_NetworkRequestsHandler();
        init_PageFramesHandler();
        init_PageLoadMetricsHandler();
        init_RendererHandler();
        init_SamplesHandler();
        init_ScreenshotsHandler();
        init_ScriptsHandler();
        init_SelectorStatsHandler();
        init_UserInteractionsHandler();
        init_UserTimingsHandler();
        init_WarningsHandler();
        init_WorkersHandler();
      }
    });
    init_types3 = __esm2({
      "node_modules/@paulirish/trace_engine/models/trace/handlers/types.js"() {
        init_process_global();
      }
    });
    init_handlers = __esm2({
      "node_modules/@paulirish/trace_engine/models/trace/handlers/handlers.js"() {
        init_process_global();
        init_helpers();
        init_ModelHandlers();
        init_Threads();
        init_types3();
      }
    });
    init_EntityMapper = __esm2({
      "node_modules/@paulirish/trace_engine/models/trace/EntityMapper.js"() {
        init_process_global();
        init_handlers();
        init_helpers2();
      }
    });
    init_EventsSerializer = __esm2({
      "node_modules/@paulirish/trace_engine/models/trace/EventsSerializer.js"() {
        init_process_global();
        init_helpers2();
        init_types2();
      }
    });
    ScriptDuplication_exports = {};
    __export2(ScriptDuplication_exports, {
      computeScriptDuplication: () => computeScriptDuplication,
      getNodeModuleName: () => getNodeModuleName,
      normalizeDuplication: () => normalizeDuplication,
      normalizeSource: () => normalizeSource
    });
    init_ScriptDuplication = __esm2({
      "node_modules/@paulirish/trace_engine/models/trace/extras/ScriptDuplication.js"() {
        init_process_global();
        init_handlers();
        ABSOLUTE_SIZE_THRESHOLD_BYTES = 1024 * 0.5;
        RELATIVE_SIZE_THRESHOLD = 0.1;
        __name(normalizeSource, "normalizeSource");
        __name(shouldIgnoreSource, "shouldIgnoreSource");
        __name(normalizeDuplication, "normalizeDuplication");
        __name(indexOfOrLength, "indexOfOrLength");
        __name(getNodeModuleName, "getNodeModuleName");
        __name(groupByNodeModules, "groupByNodeModules");
        __name(sorted, "sorted");
        __name(computeScriptDuplication, "computeScriptDuplication");
      }
    });
    StackTraceForEvent_exports = {};
    __export2(StackTraceForEvent_exports, {
      clearCacheForTrace: () => clearCacheForTrace,
      get: () => get,
      stackTraceForEventInTrace: () => stackTraceForEventInTrace
    });
    init_StackTraceForEvent = __esm2({
      "node_modules/@paulirish/trace_engine/models/trace/extras/StackTraceForEvent.js"() {
        init_process_global();
        init_helpers2();
        init_types2();
        stackTraceForEventInTrace = /* @__PURE__ */ new Map();
        __name(clearCacheForTrace, "clearCacheForTrace");
        __name(get, "get");
        __name(getForEvent, "getForEvent");
        __name(addAsyncParentToStack, "addAsyncParentToStack");
        __name(getForExtensionEntry, "getForExtensionEntry");
        __name(getForPerformanceMeasure, "getForPerformanceMeasure");
        __name(isNativeJSFunction, "isNativeJSFunction");
        __name(getTraceEventPayloadStackAsProtocolCallFrame, "getTraceEventPayloadStackAsProtocolCallFrame");
      }
    });
    init_TraceFilter = __esm2({
      "node_modules/@paulirish/trace_engine/models/trace/extras/TraceFilter.js"() {
        init_process_global();
        init_types2();
        TraceFilter = class {
          static {
            __name(this, "TraceFilter");
          }
        };
        VisibleEventsFilter = class _VisibleEventsFilter extends TraceFilter {
          static {
            __name(this, "VisibleEventsFilter");
          }
          visibleTypes;
          constructor(visibleTypes2) {
            super();
            this.visibleTypes = new Set(visibleTypes2);
          }
          accept(event) {
            if (Extensions_exports.isSyntheticExtensionEntry(event)) {
              return true;
            }
            return this.visibleTypes.has(_VisibleEventsFilter.eventType(event));
          }
          static eventType(event) {
            if (event.cat.includes("blink.console")) {
              return TraceEvents_exports.Name.CONSOLE_TIME;
            }
            if (event.cat.includes("blink.user_timing")) {
              return TraceEvents_exports.Name.USER_TIMING;
            }
            return event.name;
          }
        };
        ExclusiveNameFilter = class extends TraceFilter {
          static {
            __name(this, "ExclusiveNameFilter");
          }
          #excludeNames;
          constructor(excludeNames) {
            super();
            this.#excludeNames = new Set(excludeNames);
          }
          accept(event) {
            return !this.#excludeNames.has(event.name);
          }
        };
      }
    });
    init_TraceTree = __esm2({
      "node_modules/@paulirish/trace_engine/models/trace/extras/TraceTree.js"() {
        init_process_global();
        init_helpers2();
        init_SamplesIntegrator();
        init_types2();
        Node2 = class {
          static {
            __name(this, "Node");
          }
          /** ms */
          totalTime;
          /** ms */
          selfTime;
          transferSize;
          id;
          /** The first trace event encountered that necessitated the creation of this tree node. */
          event;
          /**
           * All of the trace events associated with this aggregate node.
           * Minor: In the case of Event Log (EventsTimelineTreeView), the node is not aggregate and this will only hold 1 event, the same that's in this.event
           */
          events;
          parent;
          groupId;
          isGroupNodeInternal;
          depth;
          constructor(id2, event) {
            this.totalTime = 0;
            this.selfTime = 0;
            this.transferSize = 0;
            this.id = id2;
            this.event = event;
            this.events = [event];
            this.groupId = "";
            this.isGroupNodeInternal = false;
            this.depth = 0;
          }
          isGroupNode() {
            return this.isGroupNodeInternal;
          }
          hasChildren() {
            throw new Error("Not implemented");
          }
          setHasChildren(_value) {
            throw new Error("Not implemented");
          }
          /**
           * Returns the direct descendants of this node.
           * @returns a map with ordered <nodeId, Node> tuples.
           */
          children() {
            throw new Error("Not implemented");
          }
          searchTree(matchFunction, results) {
            results = results || [];
            if (this.event && matchFunction(this.event)) {
              results.push(this);
            }
            for (const child of this.children().values()) {
              child.searchTree(matchFunction, results);
            }
            return results;
          }
        };
        BottomUpRootNode = class extends Node2 {
          static {
            __name(this, "BottomUpRootNode");
          }
          childrenInternal;
          textFilter;
          filter;
          startTime;
          endTime;
          totalTime;
          eventGroupIdCallback;
          calculateTransferSize;
          forceGroupIdCallback;
          constructor(events, { textFilter, filters, startTime, endTime, eventGroupIdCallback, calculateTransferSize, forceGroupIdCallback }) {
            super("", events[0]);
            this.childrenInternal = null;
            this.events = events;
            this.textFilter = textFilter;
            this.filter = (e) => filters.every((f) => f.accept(e));
            this.startTime = startTime;
            this.endTime = endTime;
            this.eventGroupIdCallback = eventGroupIdCallback;
            this.totalTime = endTime - startTime;
            this.calculateTransferSize = calculateTransferSize;
            this.forceGroupIdCallback = forceGroupIdCallback;
          }
          hasChildren() {
            return true;
          }
          filterChildren(children) {
            for (const [id2, child] of children) {
              if (child.event && child.depth <= 1 && !this.textFilter.accept(child.event)) {
                children.delete(id2);
              }
            }
            return children;
          }
          children() {
            if (!this.childrenInternal) {
              this.childrenInternal = this.filterChildren(this.grouppedTopNodes());
            }
            return this.childrenInternal;
          }
          // If no grouping is applied, the nodes returned here are what's initially shown in the bottom-up view.
          // "No grouping" == no grouping in UI dropdown == no groupingFunction…
          // … HOWEVER, nodes are still aggregated via `generateEventID`, which is ~= the event name.
          ungroupedTopNodes() {
            const root2 = this;
            const startTime = this.startTime;
            const endTime = this.endTime;
            const nodeById = /* @__PURE__ */ new Map();
            const selfTimeStack = [endTime - startTime];
            const firstNodeStack = [];
            const totalTimeById = /* @__PURE__ */ new Map();
            const eventGroupIdCallback = this.eventGroupIdCallback;
            const forceGroupIdCallback = this.forceGroupIdCallback;
            const sumTransferSizeOfInstantEvent = /* @__PURE__ */ __name((e) => {
              if (TraceEvents_exports.isReceivedDataEvent(e)) {
                let id2 = generateEventID(e);
                if (this.forceGroupIdCallback && this.eventGroupIdCallback) {
                  id2 = `${id2}-${this.eventGroupIdCallback(e)}`;
                }
                let node2 = nodeById.get(id2);
                if (!node2) {
                  node2 = new BottomUpNode(root2, id2, e, false, root2);
                  nodeById.set(id2, node2);
                } else {
                  node2.events.push(e);
                }
                if (e.name === "ResourceReceivedData") {
                  node2.transferSize += e.args.data.encodedDataLength;
                } else if (e.args.data.encodedDataLength > 0) {
                  node2.transferSize = e.args.data.encodedDataLength;
                }
              }
            }, "sumTransferSizeOfInstantEvent");
            Trace_exports.forEachEvent(this.events, {
              onStartEvent,
              onEndEvent,
              onInstantEvent: this.calculateTransferSize ? sumTransferSizeOfInstantEvent : void 0,
              startTime: Timing_exports3.milliToMicro(this.startTime),
              endTime: Timing_exports3.milliToMicro(this.endTime),
              eventFilter: this.filter,
              ignoreAsyncEvents: false
            });
            function onStartEvent(e) {
              const { startTime: currentStartTime, endTime: currentEndTime } = Timing_exports3.eventTimingsMilliSeconds(e);
              const actualEndTime = currentEndTime !== void 0 ? Math.min(currentEndTime, endTime) : endTime;
              const duration2 = actualEndTime - Math.max(currentStartTime, startTime);
              selfTimeStack[selfTimeStack.length - 1] -= duration2;
              selfTimeStack.push(duration2);
              let id2 = generateEventID(e);
              if (forceGroupIdCallback && eventGroupIdCallback) {
                id2 = `${id2}-${eventGroupIdCallback(e)}`;
              }
              const noNodeOnStack = !totalTimeById.has(id2);
              if (noNodeOnStack) {
                totalTimeById.set(id2, duration2);
              }
              firstNodeStack.push(noNodeOnStack);
            }
            __name(onStartEvent, "onStartEvent");
            function onEndEvent(event) {
              let id2 = generateEventID(event);
              if (forceGroupIdCallback && eventGroupIdCallback) {
                id2 = `${id2}-${eventGroupIdCallback(event)}`;
              }
              let node2 = nodeById.get(id2);
              if (!node2) {
                node2 = new BottomUpNode(root2, id2, event, false, root2);
                nodeById.set(id2, node2);
              } else {
                node2.events.push(event);
              }
              node2.selfTime += selfTimeStack.pop() || 0;
              if (firstNodeStack.pop()) {
                node2.totalTime += totalTimeById.get(id2) || 0;
                totalTimeById.delete(id2);
              }
              if (firstNodeStack.length) {
                node2.setHasChildren(true);
              }
            }
            __name(onEndEvent, "onEndEvent");
            this.selfTime = selfTimeStack.pop() || 0;
            for (const pair of nodeById) {
              if (pair[1].selfTime <= 0 && (!this.calculateTransferSize || pair[1].transferSize <= 0)) {
                nodeById.delete(pair[0]);
              }
            }
            return nodeById;
          }
          grouppedTopNodes() {
            const flatNodes = this.ungroupedTopNodes();
            if (!this.eventGroupIdCallback) {
              return flatNodes;
            }
            const groupNodes = /* @__PURE__ */ new Map();
            for (const node2 of flatNodes.values()) {
              const groupId = this.eventGroupIdCallback(node2.event);
              let groupNode = groupNodes.get(groupId);
              if (!groupNode) {
                groupNode = new GroupNode(groupId, this, node2.events);
                groupNodes.set(groupId, groupNode);
              } else {
                for (const e of node2.events) {
                  groupNode.events.push(e);
                }
              }
              groupNode.addChild(node2, node2.selfTime, node2.selfTime, node2.transferSize);
            }
            return groupNodes;
          }
        };
        GroupNode = class extends Node2 {
          static {
            __name(this, "GroupNode");
          }
          childrenInternal;
          isGroupNodeInternal;
          events;
          constructor(id2, parent, events) {
            super(id2, events[0]);
            this.events = events;
            this.childrenInternal = /* @__PURE__ */ new Map();
            this.parent = parent;
            this.isGroupNodeInternal = true;
          }
          addChild(child, selfTime, totalTime, transferSize) {
            this.childrenInternal.set(child.id, child);
            this.selfTime += selfTime;
            this.totalTime += totalTime;
            this.transferSize += transferSize;
            child.parent = this;
          }
          hasChildren() {
            return true;
          }
          children() {
            return this.childrenInternal;
          }
        };
        BottomUpNode = class _BottomUpNode extends Node2 {
          static {
            __name(this, "BottomUpNode");
          }
          parent;
          root;
          depth;
          cachedChildren;
          hasChildrenInternal;
          constructor(root2, id2, event, hasChildren, parent) {
            super(id2, event);
            this.parent = parent;
            this.root = root2;
            this.depth = (parent.depth || 0) + 1;
            this.cachedChildren = null;
            this.hasChildrenInternal = hasChildren;
          }
          hasChildren() {
            return this.hasChildrenInternal;
          }
          setHasChildren(value) {
            this.hasChildrenInternal = value;
          }
          children() {
            if (this.cachedChildren) {
              return this.cachedChildren;
            }
            const selfTimeStack = [0];
            const eventIdStack = [];
            const eventStack = [];
            const nodeById = /* @__PURE__ */ new Map();
            const startTime = this.root.startTime;
            const endTime = this.root.endTime;
            let lastTimeMarker = startTime;
            const self2 = this;
            Trace_exports.forEachEvent(this.root.events, {
              onStartEvent,
              onEndEvent,
              startTime: Timing_exports3.milliToMicro(startTime),
              endTime: Timing_exports3.milliToMicro(endTime),
              eventFilter: this.root.filter,
              ignoreAsyncEvents: false
            });
            function onStartEvent(e) {
              const { startTime: currentStartTime, endTime: currentEndTime } = Timing_exports3.eventTimingsMilliSeconds(e);
              const actualEndTime = currentEndTime !== void 0 ? Math.min(currentEndTime, endTime) : endTime;
              const duration2 = actualEndTime - Math.max(currentStartTime, startTime);
              if (duration2 < 0) {
                console.assert(false, "Negative duration of an event");
              }
              selfTimeStack[selfTimeStack.length - 1] -= duration2;
              selfTimeStack.push(duration2);
              const id2 = generateEventID(e);
              eventIdStack.push(id2);
              eventStack.push(e);
            }
            __name(onStartEvent, "onStartEvent");
            function onEndEvent(e) {
              const { startTime: currentStartTime, endTime: currentEndTime } = Timing_exports3.eventTimingsMilliSeconds(e);
              const selfTime = selfTimeStack.pop();
              const id2 = eventIdStack.pop();
              eventStack.pop();
              let node2;
              for (node2 = self2; node2.depth > 1; node2 = node2.parent) {
                if (node2.id !== eventIdStack[eventIdStack.length + 1 - node2.depth]) {
                  return;
                }
              }
              if (node2.id !== id2 || eventIdStack.length < self2.depth) {
                return;
              }
              const childId = eventIdStack[eventIdStack.length - self2.depth];
              node2 = nodeById.get(childId);
              if (!node2) {
                const event = eventStack[eventStack.length - self2.depth];
                const hasChildren = eventStack.length > self2.depth;
                node2 = new _BottomUpNode(self2.root, childId, event, hasChildren, self2);
                nodeById.set(childId, node2);
              } else {
                node2.events.push(e);
              }
              const actualEndTime = currentEndTime !== void 0 ? Math.min(currentEndTime, endTime) : endTime;
              const totalTime = actualEndTime - Math.max(currentStartTime, lastTimeMarker);
              node2.selfTime += selfTime || 0;
              node2.totalTime += totalTime;
              lastTimeMarker = actualEndTime;
            }
            __name(onEndEvent, "onEndEvent");
            this.cachedChildren = this.root.filterChildren(nodeById);
            return this.cachedChildren;
          }
          searchTree(matchFunction, results) {
            results = results || [];
            if (this.event && matchFunction(this.event)) {
              results.push(this);
            }
            return results;
          }
        };
        __name(generateEventID, "generateEventID");
      }
    });
    ThirdParties_exports = {};
    __export2(ThirdParties_exports, {
      summarizeByThirdParty: () => summarizeByThirdParty,
      summarizeByURL: () => summarizeByURL
    });
    init_ThirdParties = __esm2({
      "node_modules/@paulirish/trace_engine/models/trace/extras/ThirdParties.js"() {
        init_process_global();
        init_handlers();
        init_helpers2();
        init_types2();
        init_TraceFilter();
        init_TraceTree();
        __name(collectMainThreadActivity, "collectMainThreadActivity");
        __name(summarizeByThirdParty, "summarizeByThirdParty");
        __name(summarizeByURL, "summarizeByURL");
        __name(summarizeBottomUpByEntity, "summarizeBottomUpByEntity");
        __name(summarizeBottomUpByURL, "summarizeBottomUpByURL");
        __name(getBottomUpTree, "getBottomUpTree");
      }
    });
    init_extras = __esm2({
      "node_modules/@paulirish/trace_engine/models/trace/extras/extras.js"() {
        init_process_global();
        init_ScriptDuplication();
        init_StackTraceForEvent();
        init_ThirdParties();
        init_TraceFilter();
        init_TraceTree();
      }
    });
    init_Statistics = __esm2({
      "node_modules/@paulirish/trace_engine/models/trace/insights/Statistics.js"() {
        init_process_global();
        MIN_PASSING_SCORE2 = 0.9;
        MAX_AVERAGE_SCORE2 = 0.8999999999999999;
        MIN_AVERAGE_SCORE2 = 0.5;
        MAX_FAILING_SCORE2 = 0.49999999999999994;
        __name(erf2, "erf");
        __name(getLogNormalScore2, "getLogNormalScore");
        __name(linearInterpolation, "linearInterpolation");
      }
    });
    init_types4 = __esm2({
      "node_modules/@paulirish/trace_engine/models/trace/insights/types.js"() {
        init_process_global();
        (function(InsightWarning22) {
          InsightWarning22["NO_FP"] = "NO_FP";
          InsightWarning22["NO_LCP"] = "NO_LCP";
          InsightWarning22["NO_DOCUMENT_REQUEST"] = "NO_DOCUMENT_REQUEST";
          InsightWarning22["NO_LAYOUT"] = "NO_LAYOUT";
        })(InsightWarning || (InsightWarning = {}));
        (function(InsightCategory22) {
          InsightCategory22["ALL"] = "All";
          InsightCategory22["INP"] = "INP";
          InsightCategory22["LCP"] = "LCP";
          InsightCategory22["CLS"] = "CLS";
        })(InsightCategory || (InsightCategory = {}));
        (function(InsightKeys2) {
          InsightKeys2["LCP_BREAKDOWN"] = "LCPBreakdown";
          InsightKeys2["INP_BREAKDOWN"] = "INPBreakdown";
          InsightKeys2["CLS_CULPRITS"] = "CLSCulprits";
          InsightKeys2["THIRD_PARTIES"] = "ThirdParties";
          InsightKeys2["DOCUMENT_LATENCY"] = "DocumentLatency";
          InsightKeys2["DOM_SIZE"] = "DOMSize";
          InsightKeys2["DUPLICATE_JAVASCRIPT"] = "DuplicatedJavaScript";
          InsightKeys2["FONT_DISPLAY"] = "FontDisplay";
          InsightKeys2["FORCED_REFLOW"] = "ForcedReflow";
          InsightKeys2["IMAGE_DELIVERY"] = "ImageDelivery";
          InsightKeys2["LCP_DISCOVERY"] = "LCPDiscovery";
          InsightKeys2["LEGACY_JAVASCRIPT"] = "LegacyJavaScript";
          InsightKeys2["NETWORK_DEPENDENCY_TREE"] = "NetworkDependencyTree";
          InsightKeys2["RENDER_BLOCKING"] = "RenderBlocking";
          InsightKeys2["SLOW_CSS_SELECTOR"] = "SlowCSSSelector";
          InsightKeys2["VIEWPORT"] = "Viewport";
          InsightKeys2["MODERN_HTTP"] = "ModernHTTP";
          InsightKeys2["CACHE"] = "Cache";
        })(InsightKeys || (InsightKeys = {}));
      }
    });
    Common_exports = {};
    __export2(Common_exports, {
      calculateDocFirstByteTs: () => calculateDocFirstByteTs,
      calculateMetricWeightsForSorting: () => calculateMetricWeightsForSorting,
      estimateCompressedContentSize: () => estimateCompressedContentSize,
      estimateCompressionRatioForScript: () => estimateCompressionRatioForScript,
      evaluateCLSMetricScore: () => evaluateCLSMetricScore,
      evaluateINPMetricScore: () => evaluateINPMetricScore,
      evaluateLCPMetricScore: () => evaluateLCPMetricScore,
      getCLS: () => getCLS,
      getFieldMetricsForInsightSet: () => getFieldMetricsForInsightSet,
      getINP: () => getINP,
      getInsight: () => getInsight,
      getLCP: () => getLCP,
      insightBounds: () => insightBounds,
      isRequestCompressed: () => isRequestCompressed,
      isRequestServedFromBrowserCache: () => isRequestServedFromBrowserCache,
      metricSavingsForWastedBytes: () => metricSavingsForWastedBytes
    });
    init_Common = __esm2({
      "node_modules/@paulirish/trace_engine/models/trace/insights/Common.js"() {
        init_process_global();
        init_helpers2();
        init_types2();
        init_Statistics();
        init_types4();
        GRAPH_SAVINGS_PRECISION = 50;
        __name(getInsight, "getInsight");
        __name(getLCP, "getLCP");
        __name(getINP, "getINP");
        __name(getCLS, "getCLS");
        __name(evaluateLCPMetricScore, "evaluateLCPMetricScore");
        __name(evaluateINPMetricScore, "evaluateINPMetricScore");
        __name(evaluateCLSMetricScore, "evaluateCLSMetricScore");
        __name(getPageResult, "getPageResult");
        __name(getMetricResult, "getMetricResult");
        __name(getMetricTimingResult, "getMetricTimingResult");
        __name(getFieldMetricsForInsightSet, "getFieldMetricsForInsightSet");
        __name(calculateMetricWeightsForSorting, "calculateMetricWeightsForSorting");
        __name(estimateSavingsWithGraphs, "estimateSavingsWithGraphs");
        __name(metricSavingsForWastedBytes, "metricSavingsForWastedBytes");
        __name(isRequestCompressed, "isRequestCompressed");
        __name(isRequestServedFromBrowserCache, "isRequestServedFromBrowserCache");
        __name(getRequestSizes, "getRequestSizes");
        __name(estimateCompressedContentSize, "estimateCompressedContentSize");
        __name(estimateCompressionRatioForScript, "estimateCompressionRatioForScript");
        __name(calculateDocFirstByteTs, "calculateDocFirstByteTs");
        __name(insightBounds, "insightBounds");
      }
    });
    Cache_exports = {};
    __export2(Cache_exports, {
      UIStrings: () => UIStrings2,
      cachingDisabled: () => cachingDisabled,
      computeCacheLifetimeInSeconds: () => computeCacheLifetimeInSeconds,
      createOverlayForRequest: () => createOverlayForRequest,
      createOverlays: () => createOverlays,
      generateInsight: () => generateInsight,
      getCombinedHeaders: () => getCombinedHeaders,
      i18nString: () => i18nString,
      isCacheInsight: () => isCacheInsight,
      isCacheable: () => isCacheable
    });
    init_Cache = __esm2({
      "node_modules/@paulirish/trace_engine/models/trace/insights/Cache.js"() {
        init_process_global();
        init_helpers2();
        init_Common();
        init_Statistics();
        init_types4();
        UIStrings2 = {
          /**
           * @description Title of an insight that provides information and suggestions of resources that could improve their caching.
           */
          title: "Use efficient cache lifetimes",
          /**
           * @description Text to tell the user about how caching can help improve performance.
           */
          description: "A long cache lifetime can speed up repeat visits to your page. [Learn more about caching](https://developer.chrome.com/docs/performance/insights/cache).",
          /**
           * @description Column for a font loaded by the page to render text.
           */
          requestColumn: "Request",
          /**
           * @description Column for a resource cache's Time To Live.
           */
          cacheTTL: "Cache TTL",
          /**
           * @description Text describing that there were no requests found that need caching.
           */
          noRequestsToCache: "No requests with inefficient cache policies",
          /**
           * @description Table row value representing the remaining items not shown in the table due to size constraints. This row will always represent at least 2 items.
           * @example {5} PH1
           */
          others: "{PH1} others"
        };
        i18nString = /* @__PURE__ */ __name((i18nId, values) => ({ i18nId, values }), "i18nString");
        IGNORE_THRESHOLD_IN_PERCENT = 0.925;
        __name(finalize31, "finalize");
        __name(isCacheable, "isCacheable");
        __name(computeCacheLifetimeInSeconds, "computeCacheLifetimeInSeconds");
        __name(getCacheHitProbability, "getCacheHitProbability");
        __name(getCombinedHeaders, "getCombinedHeaders");
        __name(cachingDisabled, "cachingDisabled");
        __name(isCacheInsight, "isCacheInsight");
        __name(generateInsight, "generateInsight");
        __name(createOverlayForRequest, "createOverlayForRequest");
        __name(createOverlays, "createOverlays");
      }
    });
    CLSCulprits_exports = {};
    __export2(CLSCulprits_exports, {
      AnimationFailureReasons: () => AnimationFailureReasons,
      LayoutShiftType: () => LayoutShiftType,
      UIStrings: () => UIStrings3,
      createOverlays: () => createOverlays2,
      generateInsight: () => generateInsight2,
      getNonCompositedFailure: () => getNonCompositedFailure,
      i18nString: () => i18nString2,
      isCLSCulpritsInsight: () => isCLSCulpritsInsight
    });
    init_CLSCulprits = __esm2({
      "node_modules/@paulirish/trace_engine/models/trace/insights/CLSCulprits.js"() {
        init_process_global();
        init_platform();
        init_handlers();
        init_helpers2();
        init_types2();
        init_types4();
        UIStrings3 = {
          /** Title of an insight that provides details about why elements shift/move on the page. The causes for these shifts are referred to as culprits ("reasons"). */
          title: "Layout shift culprits",
          /**
           * @description Description of a DevTools insight that identifies the reasons that elements shift on the page.
           * This is displayed after a user expands the section to see more. No character length limits.
           */
          description: "Layout shifts occur when elements move absent any user interaction. [Investigate the causes of layout shifts](https://developer.chrome.com/docs/performance/insights/cls-culprit), such as elements being added, removed, or their fonts changing as the page loads.",
          /**
           * @description Text indicating the worst layout shift cluster.
           */
          worstLayoutShiftCluster: "Worst layout shift cluster",
          /**
           * @description Text indicating the worst layout shift cluster.
           */
          worstCluster: "Worst cluster",
          /**
           * @description Text indicating a layout shift cluster and its start time.
           * @example {32 ms} PH1
           */
          layoutShiftCluster: "Layout shift cluster @ {PH1}",
          /**
           * @description Text indicating the biggest reasons for the layout shifts.
           */
          topCulprits: "Top layout shift culprits",
          /**
           * @description Text for a culprit type of Injected iframe.
           */
          injectedIframe: "Injected iframe",
          /**
           * @description Text for a culprit type of web font request.
           */
          webFont: "Web font",
          /**
           * @description Text for a culprit type of Animation.
           */
          animation: "Animation",
          /**
           * @description Text for a culprit type of Unsized image.
           */
          unsizedImage: "Unsized image element",
          /**
           * @description Text status when there were no layout shifts detected.
           */
          noLayoutShifts: "No layout shifts",
          /**
           * @description Text status when there no layout shifts culprits/root causes were found.
           */
          noCulprits: "Could not detect any layout shift culprits"
        };
        i18nString2 = /* @__PURE__ */ __name((i18nId, values) => ({ i18nId, values }), "i18nString");
        (function(AnimationFailureReasons2) {
          AnimationFailureReasons2["ACCELERATED_ANIMATIONS_DISABLED"] = "ACCELERATED_ANIMATIONS_DISABLED";
          AnimationFailureReasons2["EFFECT_SUPPRESSED_BY_DEVTOOLS"] = "EFFECT_SUPPRESSED_BY_DEVTOOLS";
          AnimationFailureReasons2["INVALID_ANIMATION_OR_EFFECT"] = "INVALID_ANIMATION_OR_EFFECT";
          AnimationFailureReasons2["EFFECT_HAS_UNSUPPORTED_TIMING_PARAMS"] = "EFFECT_HAS_UNSUPPORTED_TIMING_PARAMS";
          AnimationFailureReasons2["EFFECT_HAS_NON_REPLACE_COMPOSITE_MODE"] = "EFFECT_HAS_NON_REPLACE_COMPOSITE_MODE";
          AnimationFailureReasons2["TARGET_HAS_INVALID_COMPOSITING_STATE"] = "TARGET_HAS_INVALID_COMPOSITING_STATE";
          AnimationFailureReasons2["TARGET_HAS_INCOMPATIBLE_ANIMATIONS"] = "TARGET_HAS_INCOMPATIBLE_ANIMATIONS";
          AnimationFailureReasons2["TARGET_HAS_CSS_OFFSET"] = "TARGET_HAS_CSS_OFFSET";
          AnimationFailureReasons2["ANIMATION_AFFECTS_NON_CSS_PROPERTIES"] = "ANIMATION_AFFECTS_NON_CSS_PROPERTIES";
          AnimationFailureReasons2["TRANSFORM_RELATED_PROPERTY_CANNOT_BE_ACCELERATED_ON_TARGET"] = "TRANSFORM_RELATED_PROPERTY_CANNOT_BE_ACCELERATED_ON_TARGET";
          AnimationFailureReasons2["TRANSFROM_BOX_SIZE_DEPENDENT"] = "TRANSFROM_BOX_SIZE_DEPENDENT";
          AnimationFailureReasons2["FILTER_RELATED_PROPERTY_MAY_MOVE_PIXELS"] = "FILTER_RELATED_PROPERTY_MAY_MOVE_PIXELS";
          AnimationFailureReasons2["UNSUPPORTED_CSS_PROPERTY"] = "UNSUPPORTED_CSS_PROPERTY";
          AnimationFailureReasons2["MIXED_KEYFRAME_VALUE_TYPES"] = "MIXED_KEYFRAME_VALUE_TYPES";
          AnimationFailureReasons2["TIMELINE_SOURCE_HAS_INVALID_COMPOSITING_STATE"] = "TIMELINE_SOURCE_HAS_INVALID_COMPOSITING_STATE";
          AnimationFailureReasons2["ANIMATION_HAS_NO_VISIBLE_CHANGE"] = "ANIMATION_HAS_NO_VISIBLE_CHANGE";
          AnimationFailureReasons2["AFFECTS_IMPORTANT_PROPERTY"] = "AFFECTS_IMPORTANT_PROPERTY";
          AnimationFailureReasons2["SVG_TARGET_HAS_INDEPENDENT_TRANSFORM_PROPERTY"] = "SVG_TARGET_HAS_INDEPENDENT_TRANSFORM_PROPERTY";
        })(AnimationFailureReasons || (AnimationFailureReasons = {}));
        (function(LayoutShiftType2) {
          LayoutShiftType2[LayoutShiftType2["WEB_FONT"] = 0] = "WEB_FONT";
          LayoutShiftType2[LayoutShiftType2["IFRAMES"] = 1] = "IFRAMES";
          LayoutShiftType2[LayoutShiftType2["ANIMATIONS"] = 2] = "ANIMATIONS";
          LayoutShiftType2[LayoutShiftType2["UNSIZED_IMAGE"] = 3] = "UNSIZED_IMAGE";
        })(LayoutShiftType || (LayoutShiftType = {}));
        ACTIONABLE_FAILURE_REASONS = [
          {
            flag: 1 << 0,
            failure: AnimationFailureReasons.ACCELERATED_ANIMATIONS_DISABLED
          },
          {
            flag: 1 << 1,
            failure: AnimationFailureReasons.EFFECT_SUPPRESSED_BY_DEVTOOLS
          },
          {
            flag: 1 << 2,
            failure: AnimationFailureReasons.INVALID_ANIMATION_OR_EFFECT
          },
          {
            flag: 1 << 3,
            failure: AnimationFailureReasons.EFFECT_HAS_UNSUPPORTED_TIMING_PARAMS
          },
          {
            flag: 1 << 4,
            failure: AnimationFailureReasons.EFFECT_HAS_NON_REPLACE_COMPOSITE_MODE
          },
          {
            flag: 1 << 5,
            failure: AnimationFailureReasons.TARGET_HAS_INVALID_COMPOSITING_STATE
          },
          {
            flag: 1 << 6,
            failure: AnimationFailureReasons.TARGET_HAS_INCOMPATIBLE_ANIMATIONS
          },
          {
            flag: 1 << 7,
            failure: AnimationFailureReasons.TARGET_HAS_CSS_OFFSET
          },
          // The failure 1 << 8 is marked as obsolete in Blink
          {
            flag: 1 << 9,
            failure: AnimationFailureReasons.ANIMATION_AFFECTS_NON_CSS_PROPERTIES
          },
          {
            flag: 1 << 10,
            failure: AnimationFailureReasons.TRANSFORM_RELATED_PROPERTY_CANNOT_BE_ACCELERATED_ON_TARGET
          },
          {
            flag: 1 << 11,
            failure: AnimationFailureReasons.TRANSFROM_BOX_SIZE_DEPENDENT
          },
          {
            flag: 1 << 12,
            failure: AnimationFailureReasons.FILTER_RELATED_PROPERTY_MAY_MOVE_PIXELS
          },
          {
            flag: 1 << 13,
            failure: AnimationFailureReasons.UNSUPPORTED_CSS_PROPERTY
          },
          // The failure 1 << 14 is marked as obsolete in Blink
          {
            flag: 1 << 15,
            failure: AnimationFailureReasons.MIXED_KEYFRAME_VALUE_TYPES
          },
          {
            flag: 1 << 16,
            failure: AnimationFailureReasons.TIMELINE_SOURCE_HAS_INVALID_COMPOSITING_STATE
          },
          {
            flag: 1 << 17,
            failure: AnimationFailureReasons.ANIMATION_HAS_NO_VISIBLE_CHANGE
          },
          {
            flag: 1 << 18,
            failure: AnimationFailureReasons.AFFECTS_IMPORTANT_PROPERTY
          },
          {
            flag: 1 << 19,
            failure: AnimationFailureReasons.SVG_TARGET_HAS_INDEPENDENT_TRANSFORM_PROPERTY
          }
        ];
        ROOT_CAUSE_WINDOW = Timing_exports3.secondsToMicro(Timing_exports.Seconds(0.5));
        __name(isInRootCauseWindow, "isInRootCauseWindow");
        __name(getNonCompositedFailure, "getNonCompositedFailure");
        __name(getNonCompositedFailureRootCauses, "getNonCompositedFailureRootCauses");
        __name(getShiftsByPrePaintEvents, "getShiftsByPrePaintEvents");
        __name(getNextEvent, "getNextEvent");
        __name(getIframeRootCauses, "getIframeRootCauses");
        __name(getUnsizedImageRootCauses, "getUnsizedImageRootCauses");
        __name(isCLSCulpritsInsight, "isCLSCulpritsInsight");
        __name(getFontRootCauses, "getFontRootCauses");
        __name(getTopCulprits, "getTopCulprits");
        __name(finalize32, "finalize");
        __name(generateInsight2, "generateInsight");
        __name(createOverlays2, "createOverlays");
      }
    });
    DocumentLatency_exports = {};
    __export2(DocumentLatency_exports, {
      UIStrings: () => UIStrings4,
      createOverlays: () => createOverlays3,
      generateInsight: () => generateInsight3,
      i18nString: () => i18nString3,
      isDocumentLatencyInsight: () => isDocumentLatencyInsight
    });
    init_DocumentLatency = __esm2({
      "node_modules/@paulirish/trace_engine/models/trace/insights/DocumentLatency.js"() {
        init_process_global();
        init_helpers2();
        init_types2();
        init_Common();
        init_types4();
        UIStrings4 = {
          /**
           * @description Title of an insight that provides a breakdown for how long it took to download the main document.
           */
          title: "Document request latency",
          /**
           * @description Description of an insight that provides a breakdown for how long it took to download the main document.
           */
          description: "Your first network request is the most important. [Reduce its latency](https://developer.chrome.com/docs/performance/insights/document-latency) by avoiding redirects, ensuring a fast server response, and enabling text compression.",
          /**
           * @description Text to tell the user that the document request does not have redirects.
           */
          passingRedirects: "Avoids redirects",
          /**
           * @description Text to tell the user that the document request had redirects.
           * @example {3} PH1
           * @example {1000 ms} PH2
           */
          failedRedirects: "Had redirects ({PH1} redirects, +{PH2})",
          /**
           * @description Text to tell the user that the time starting the document request to when the server started responding is acceptable.
           * @example {600 ms} PH1
           */
          passingServerResponseTime: "Server responds quickly (observed {PH1})",
          /**
           * @description Text to tell the user that the time starting the document request to when the server started responding is not acceptable.
           * @example {601 ms} PH1
           */
          failedServerResponseTime: "Server responded slowly (observed {PH1})",
          /**
           * @description Text to tell the user that text compression (like gzip) was applied.
           */
          passingTextCompression: "Applies text compression",
          /**
           * @description Text to tell the user that text compression (like gzip) was not applied.
           */
          failedTextCompression: "No compression applied",
          /**
           * @description Text for a label describing a network request event as having redirects.
           */
          redirectsLabel: "Redirects",
          /**
           * @description Text for a label describing a network request event as taking too long to start delivery by the server.
           */
          serverResponseTimeLabel: "Server response time",
          /**
           * @description Text for a label describing a network request event as taking longer to download because it wasn't compressed.
           */
          uncompressedDownload: "Uncompressed download"
        };
        i18nString3 = /* @__PURE__ */ __name((i18nId, values) => ({ i18nId, values }), "i18nString");
        TOO_SLOW_THRESHOLD_MS = 600;
        TARGET_MS = 100;
        IGNORE_THRESHOLD_IN_BYTES = 1400;
        __name(isDocumentLatencyInsight, "isDocumentLatencyInsight");
        __name(getServerResponseTime, "getServerResponseTime");
        __name(getCompressionSavings, "getCompressionSavings");
        __name(finalize33, "finalize");
        __name(generateInsight3, "generateInsight");
        __name(createOverlays3, "createOverlays");
      }
    });
    DOMSize_exports = {};
    __export2(DOMSize_exports, {
      UIStrings: () => UIStrings5,
      createOverlays: () => createOverlays4,
      generateInsight: () => generateInsight4,
      i18nString: () => i18nString4,
      isDomSizeInsight: () => isDomSizeInsight
    });
    init_DOMSize = __esm2({
      "node_modules/@paulirish/trace_engine/models/trace/insights/DOMSize.js"() {
        init_process_global();
        init_handlers();
        init_helpers2();
        init_types2();
        init_types4();
        UIStrings5 = {
          /**
           * @description Title of an insight that recommends reducing the size of the DOM tree as a means to improve page responsiveness. "DOM" is an acronym and should not be translated.
           */
          title: "Optimize DOM size",
          /**
           * @description Description of an insight that recommends reducing the size of the DOM tree as a means to improve page responsiveness. "DOM" is an acronym and should not be translated. "layout reflows" are when the browser will recompute the layout of content on the page.
           */
          description: "A large DOM can increase the duration of style calculations and layout reflows, impacting page responsiveness. A large DOM will also increase memory usage. [Learn how to avoid an excessive DOM size](https://developer.chrome.com/docs/performance/insights/dom-size).",
          /**
           * @description Header for a column containing the names of statistics as opposed to the actual statistic values.
           */
          statistic: "Statistic",
          /**
           * @description Header for a column containing the value of a statistic.
           */
          value: "Value",
          /**
           * @description Header for a column containing the page element related to a statistic.
           */
          element: "Element",
          /**
           * @description Label for a value representing the total number of elements on the page.
           */
          totalElements: "Total elements",
          /**
           * @description Label for a value representing the maximum depth of the Document Object Model (DOM). "DOM" is a acronym and should not be translated.
           */
          maxDOMDepth: "DOM depth",
          /**
           * @description Label for a value representing the maximum number of child elements of any parent element on the page.
           */
          maxChildren: "Most children",
          /**
           * @description Text for a section.
           */
          topUpdatesDescription: "These are the largest layout and style recalculation events. Their performance impact may be reduced by making the DOM simpler.",
          /**
           * @description Label used for a time duration.
           */
          duration: "Duration",
          /**
           * @description Message displayed in a table detailing how big a layout (rendering) is.
           * @example {134} PH1
           */
          largeLayout: "Layout ({PH1} objects)",
          /**
           * @description Message displayed in a table detailing how big a style recalculation (rendering) is.
           * @example {134} PH1
           */
          largeStyleRecalc: "Style recalculation ({PH1} elements)"
        };
        i18nString4 = /* @__PURE__ */ __name((i18nId, values) => ({ i18nId, values }), "i18nString");
        DOM_SIZE_DURATION_THRESHOLD = Timing_exports3.milliToMicro(Timing_exports.Milli(40));
        LAYOUT_OBJECTS_THRESHOLD = 100;
        STYLE_RECALC_ELEMENTS_THRESHOLD = 300;
        __name(finalize34, "finalize");
        __name(isDomSizeInsight, "isDomSizeInsight");
        __name(generateInsight4, "generateInsight");
        __name(createOverlays4, "createOverlays");
      }
    });
    DuplicatedJavaScript_exports = {};
    __export2(DuplicatedJavaScript_exports, {
      UIStrings: () => UIStrings6,
      createOverlays: () => createOverlays5,
      generateInsight: () => generateInsight5,
      i18nString: () => i18nString5,
      isDuplicatedJavaScriptInsight: () => isDuplicatedJavaScriptInsight
    });
    init_DuplicatedJavaScript = __esm2({
      "node_modules/@paulirish/trace_engine/models/trace/insights/DuplicatedJavaScript.js"() {
        init_process_global();
        init_extras();
        init_helpers2();
        init_Common();
        init_types4();
        UIStrings6 = {
          /**
           * @description Title of an insight that identifies multiple copies of the same JavaScript sources, and recommends removing the duplication.
           */
          title: "Duplicated JavaScript",
          /**
           * @description Description of an insight that identifies multiple copies of the same JavaScript sources, and recommends removing the duplication.
           */
          description: "Remove large, [duplicate JavaScript modules](https://developer.chrome.com/docs/performance/insights/duplicated-javascript) from bundles to reduce unnecessary bytes consumed by network activity.",
          /** Label for a column in a data table; entries will be the locations of JavaScript or CSS code, e.g. the name of a Javascript package or module. */
          columnSource: "Source",
          /** Label for a column in a data table; entries will be the number of wasted bytes due to duplication of a web resource. */
          columnDuplicatedBytes: "Duplicated bytes"
        };
        i18nString5 = /* @__PURE__ */ __name((i18nId, values) => ({ i18nId, values }), "i18nString");
        __name(finalize35, "finalize");
        __name(isDuplicatedJavaScriptInsight, "isDuplicatedJavaScriptInsight");
        __name(generateInsight5, "generateInsight");
        __name(createOverlays5, "createOverlays");
      }
    });
    FontDisplay_exports = {};
    __export2(FontDisplay_exports, {
      UIStrings: () => UIStrings7,
      createOverlays: () => createOverlays6,
      generateInsight: () => generateInsight6,
      i18nString: () => i18nString6,
      isFontDisplayInsight: () => isFontDisplayInsight
    });
    init_FontDisplay = __esm2({
      "node_modules/@paulirish/trace_engine/models/trace/insights/FontDisplay.js"() {
        init_process_global();
        init_platform();
        init_helpers2();
        init_types2();
        init_types4();
        UIStrings7 = {
          /** Title of an insight that provides details about the fonts used on the page, and the value of their `font-display` properties. */
          title: "Font display",
          /**
           * @description Text to tell the user about the font-display CSS feature to help improve a the UX of a page.
           */
          description: "Consider setting [`font-display`](https://developer.chrome.com/docs/performance/insights/font-display) to `swap` or `optional` to ensure text is consistently visible. `swap` can be further optimized to mitigate layout shifts with [font metric overrides](https://developer.chrome.com/blog/font-fallbacks).",
          /** Column for a font loaded by the page to render text. */
          fontColumn: "Font",
          /** Column for the amount of time wasted. */
          wastedTimeColumn: "Wasted time"
        };
        i18nString6 = /* @__PURE__ */ __name((i18nId, values) => ({ i18nId, values }), "i18nString");
        __name(finalize36, "finalize");
        __name(isFontDisplayInsight, "isFontDisplayInsight");
        __name(generateInsight6, "generateInsight");
        __name(createOverlays6, "createOverlays");
      }
    });
    ForcedReflow_exports = {};
    __export2(ForcedReflow_exports, {
      UIStrings: () => UIStrings8,
      createOverlayForEvents: () => createOverlayForEvents,
      createOverlays: () => createOverlays7,
      generateInsight: () => generateInsight7,
      i18nString: () => i18nString7,
      isForcedReflowInsight: () => isForcedReflowInsight
    });
    init_ForcedReflow = __esm2({
      "node_modules/@paulirish/trace_engine/models/trace/insights/ForcedReflow.js"() {
        init_process_global();
        init_platform();
        init_extras();
        init_helpers2();
        init_types2();
        init_types4();
        UIStrings8 = {
          /**
           * @description Title of an insight that provides details about Forced reflow.
           */
          title: "Forced reflow",
          /**
           * @description Text to describe the forced reflow.
           */
          description: "A forced reflow occurs when JavaScript queries geometric properties (such as `offsetWidth`) after styles have been invalidated by a change to the DOM state. This can result in poor performance. Learn more about [forced reflows](https://developer.chrome.com/docs/performance/insights/forced-reflow) and possible mitigations.",
          /**
           * @description Title of a list to provide related stack trace data
           */
          relatedStackTrace: "Stack trace",
          /**
           * @description Text to describe the top time-consuming function call
           */
          topTimeConsumingFunctionCall: "Top function call",
          /**
           * @description Text to describe the total reflow time
           */
          totalReflowTime: "Total reflow time",
          /**
           * @description Text to describe CPU processor tasks that could not be attributed to any specific source code.
           */
          unattributed: "[unattributed]",
          /**
           * @description Text for the name of anonymous functions
           */
          anonymous: "(anonymous)"
        };
        i18nString7 = /* @__PURE__ */ __name((i18nId, values) => ({ i18nId, values }), "i18nString");
        __name(getCallFrameId, "getCallFrameId");
        __name(getLargestTopLevelFunctionData, "getLargestTopLevelFunctionData");
        __name(finalize37, "finalize");
        __name(getBottomCallFrameForEvent, "getBottomCallFrameForEvent");
        __name(isForcedReflowInsight, "isForcedReflowInsight");
        __name(generateInsight7, "generateInsight");
        __name(createOverlays7, "createOverlays");
        __name(createOverlayForEvents, "createOverlayForEvents");
      }
    });
    ImageDelivery_exports = {};
    __export2(ImageDelivery_exports, {
      ImageOptimizationType: () => ImageOptimizationType,
      UIStrings: () => UIStrings9,
      createOverlayForRequest: () => createOverlayForRequest2,
      createOverlays: () => createOverlays8,
      generateInsight: () => generateInsight8,
      getOptimizationMessage: () => getOptimizationMessage,
      getOptimizationMessageWithBytes: () => getOptimizationMessageWithBytes,
      i18nString: () => i18nString8,
      isImageDeliveryInsight: () => isImageDeliveryInsight
    });
    init_ImageDelivery = __esm2({
      "node_modules/@paulirish/trace_engine/models/trace/insights/ImageDelivery.js"() {
        init_process_global();
        init_helpers2();
        init_Common();
        init_types4();
        UIStrings9 = {
          /**
           * @description Title of an insight that recommends ways to reduce the size of images downloaded and used on the page.
           */
          title: "Improve image delivery",
          /**
           * @description Description of an insight that recommends ways to reduce the size of images downloaded and used on the page.
           */
          description: "Reducing the download time of images can improve the perceived load time of the page and LCP. [Learn more about optimizing image size](https://developer.chrome.com/docs/performance/insights/image-delivery)",
          /**
           * @description Message displayed in a chip explaining that an image file size is large for the # of pixels it has and recommends possible adjustments to improve the image size.
           */
          useCompression: "Increasing the image compression factor could improve this image's download size.",
          /**
           * @description Message displayed in a chip explaining that an image file size is large for the # of pixels it has and recommends possible adjustments to improve the image size.
           */
          useModernFormat: "Using a modern image format (WebP, AVIF) or increasing the image compression could improve this image's download size.",
          /**
           * @description Message displayed in a chip advising the user to use video formats instead of GIFs because videos generally have smaller file sizes.
           */
          useVideoFormat: "Using video formats instead of GIFs can improve the download size of animated content.",
          /**
           * @description Message displayed in a chip explaining that an image was displayed on the page with dimensions much smaller than the image file dimensions.
           * @example {1000x500} PH1
           * @example {100x50} PH2
           */
          useResponsiveSize: "This image file is larger than it needs to be ({PH1}) for its displayed dimensions ({PH2}). Use responsive images to reduce the image download size.",
          /**
           * @description Column header for a table column containing network requests for images which can improve their file size (e.g. use a different format, increase compression, etc).
           */
          optimizeFile: "Optimize file size",
          /**
           * @description Table row value representing the remaining items not shown in the table due to size constraints. This row will always represent at least 2 items.
           * @example {5} PH1
           */
          others: "{PH1} others",
          /**
           * @description Text status indicating that no potential optimizations were found for any image file
           */
          noOptimizableImages: "No optimizable images",
          /**
           * @description Text describing the estimated number of bytes that an image file optimization can save. This text is appended to another block of text describing the image optimization in more detail. "Est" means "Estimated".
           * @example {Use the correct image dimensions to reduce the image file size.} PH1
           * @example {50 MB} PH2
           */
          estimatedSavings: "{PH1} (Est {PH2})"
        };
        i18nString8 = /* @__PURE__ */ __name((i18nId, values) => ({ i18nId, values }), "i18nString");
        TARGET_BYTES_PER_PIXEL_AVIF = 2 * 1 / 12;
        GIF_SIZE_THRESHOLD = 100 * 1024;
        BYTE_SAVINGS_THRESHOLD = 4096;
        BYTE_SAVINGS_THRESHOLD_RESPONSIVE_BREAKPOINTS = 12288;
        (function(ImageOptimizationType22) {
          ImageOptimizationType22["ADJUST_COMPRESSION"] = "ADJUST_COMPRESSION";
          ImageOptimizationType22["MODERN_FORMAT_OR_COMPRESSION"] = "MODERN_FORMAT_OR_COMPRESSION";
          ImageOptimizationType22["VIDEO_FORMAT"] = "VIDEO_FORMAT";
          ImageOptimizationType22["RESPONSIVE_SIZE"] = "RESPONSIVE_SIZE";
        })(ImageOptimizationType || (ImageOptimizationType = {}));
        __name(isImageDeliveryInsight, "isImageDeliveryInsight");
        __name(getOptimizationMessage, "getOptimizationMessage");
        __name(getOptimizationMessageWithBytes, "getOptimizationMessageWithBytes");
        __name(finalize38, "finalize");
        __name(estimateGIFPercentSavings, "estimateGIFPercentSavings");
        __name(getDisplayedSize, "getDisplayedSize");
        __name(getPixelCounts, "getPixelCounts");
        __name(generateInsight8, "generateInsight");
        __name(createOverlayForRequest2, "createOverlayForRequest");
        __name(createOverlays8, "createOverlays");
      }
    });
    INPBreakdown_exports = {};
    __export2(INPBreakdown_exports, {
      UIStrings: () => UIStrings10,
      createOverlays: () => createOverlays9,
      createOverlaysForSubpart: () => createOverlaysForSubpart,
      generateInsight: () => generateInsight9,
      i18nString: () => i18nString9,
      isINPBreakdownInsight: () => isINPBreakdownInsight
    });
    init_INPBreakdown = __esm2({
      "node_modules/@paulirish/trace_engine/models/trace/insights/INPBreakdown.js"() {
        init_process_global();
        init_handlers();
        init_helpers2();
        init_types4();
        UIStrings10 = {
          /**
           * @description Text to tell the user about the longest user interaction.
           */
          description: "Start investigating [how to improve INP](https://developer.chrome.com/docs/performance/insights/inp-breakdown) by looking at the longest subpart.",
          /**
           * @description Title for the performance insight "INP breakdown", which shows a breakdown of INP by subparts / sections.
           */
          title: "INP breakdown",
          /**
           * @description Label used for the subpart/component/stage/section of a larger duration.
           */
          subpart: "Subpart",
          /**
           * @description Label used for a time duration.
           */
          duration: "Duration",
          // TODO: these are repeated in InteractionBreakdown. Add a place for common strings?
          /**
           * @description Text shown next to the interaction event's input delay time in the detail view.
           */
          inputDelay: "Input delay",
          /**
           * @description Text shown next to the interaction event's thread processing duration in the detail view.
           */
          processingDuration: "Processing duration",
          /**
           * @description Text shown next to the interaction event's presentation delay time in the detail view.
           */
          presentationDelay: "Presentation delay",
          /**
           * @description Text status indicating that no user interactions were detected.
           */
          noInteractions: "No interactions detected"
        };
        i18nString9 = /* @__PURE__ */ __name((i18nId, values) => ({ i18nId, values }), "i18nString");
        __name(isINPBreakdownInsight, "isINPBreakdownInsight");
        __name(finalize39, "finalize");
        __name(generateInsight9, "generateInsight");
        __name(createOverlaysForSubpart, "createOverlaysForSubpart");
        __name(createOverlays9, "createOverlays");
      }
    });
    LCPBreakdown_exports = {};
    __export2(LCPBreakdown_exports, {
      UIStrings: () => UIStrings11,
      createOverlays: () => createOverlays10,
      generateInsight: () => generateInsight10,
      i18nString: () => i18nString10,
      isLCPBreakdownInsight: () => isLCPBreakdownInsight
    });
    init_LCPBreakdown = __esm2({
      "node_modules/@paulirish/trace_engine/models/trace/insights/LCPBreakdown.js"() {
        init_process_global();
        init_handlers();
        init_helpers2();
        init_types2();
        init_Common();
        init_types4();
        UIStrings11 = {
          /**
           * @description Title of an insight that provides details about the LCP metric, broken down by parts.
           */
          title: "LCP breakdown",
          /**
           * @description Description of a DevTools insight that presents a breakdown for the LCP metric by subparts.
           * This is displayed after a user expands the section to see more. No character length limits.
           */
          description: "Each [subpart has specific improvement strategies](https://developer.chrome.com/docs/performance/insights/lcp-breakdown). Ideally, most of the LCP time should be spent on loading the resources, not within delays.",
          /**
           * @description Time to first byte title for the Largest Contentful Paint's subparts timespan breakdown.
           */
          timeToFirstByte: "Time to first byte",
          /**
           * @description Resource load delay title for the Largest Contentful Paint subparts timespan breakdown.
           */
          resourceLoadDelay: "Resource load delay",
          /**
           * @description Resource load duration title for the Largest Contentful Paint subparts timespan breakdown.
           */
          resourceLoadDuration: "Resource load duration",
          /**
           * @description Element render delay title for the Largest Contentful Paint subparts timespan breakdown.
           */
          elementRenderDelay: "Element render delay",
          /**
           * @description Label used for the subpart (section) of a larger duration.
           */
          subpart: "Subpart",
          /**
           * @description Label used for the duration a single subpart (section) takes up of a larger duration.
           */
          duration: "Duration",
          /**
           * @description Label used for the duration a single subpart (section) takes up of a larger duration. The value will be the 75th percentile of aggregate data. "Field" means that the data was collected from real users in the field as opposed to the developers local environment. "Field" is synonymous with "Real user data".
           */
          fieldDuration: "Field p75",
          /**
           * @description Text status indicating that the the Largest Contentful Paint (LCP) metric timing was not found. "LCP" is an acronym and should not be translated.
           */
          noLcp: "No LCP detected"
        };
        i18nString10 = /* @__PURE__ */ __name((i18nId, values) => ({ i18nId, values }), "i18nString");
        __name(isLCPBreakdownInsight, "isLCPBreakdownInsight");
        __name(anyValuesNaN, "anyValuesNaN");
        __name(determineSubparts, "determineSubparts");
        __name(finalize40, "finalize");
        __name(generateInsight10, "generateInsight");
        __name(createOverlays10, "createOverlays");
      }
    });
    LCPDiscovery_exports = {};
    __export2(LCPDiscovery_exports, {
      UIStrings: () => UIStrings12,
      createOverlays: () => createOverlays11,
      generateInsight: () => generateInsight11,
      getImageData: () => getImageData,
      i18nString: () => i18nString11,
      isLCPDiscoveryInsight: () => isLCPDiscoveryInsight
    });
    init_LCPDiscovery = __esm2({
      "node_modules/@paulirish/trace_engine/models/trace/insights/LCPDiscovery.js"() {
        init_process_global();
        init_handlers();
        init_helpers2();
        init_types2();
        init_Common();
        init_types4();
        UIStrings12 = {
          /**
           * @description Title of an insight that provides details about the LCP metric, and the network requests necessary to load it. Details how the LCP request was discoverable - in other words, the path necessary to load it (ex: network requests, JavaScript)
           */
          title: "LCP request discovery",
          /**
           * @description Description of an insight that provides details about the LCP metric, and the network requests necessary to load it.
           */
          description: "[Optimize LCP](https://developer.chrome.com/docs/performance/insights/lcp-discovery) by making the LCP image discoverable from the HTML immediately, and avoiding lazy-loading",
          /**
           * @description Text to tell the user how long after the earliest discovery time their LCP element loaded.
           * @example {401ms} PH1
           */
          lcpLoadDelay: "LCP image loaded {PH1} after earliest start point.",
          /**
           * @description Text to tell the user that a fetchpriority property value of "high" is applied to the LCP request.
           */
          fetchPriorityApplied: "fetchpriority=high applied",
          /**
           * @description Text to tell the user that a fetchpriority property value of "high" should be applied to the LCP request.
           */
          fetchPriorityShouldBeApplied: "fetchpriority=high should be applied",
          /**
           * @description Text to tell the user that the LCP request is discoverable in the initial document.
           */
          requestDiscoverable: "Request is discoverable in initial document",
          /**
           * @description Text to tell the user that the LCP request does not have the lazy load property applied.
           */
          lazyLoadNotApplied: "lazy load not applied",
          /**
           * @description Text status indicating that the the Largest Contentful Paint (LCP) metric timing was not found. "LCP" is an acronym and should not be translated.
           */
          noLcp: "No LCP detected",
          /**
           * @description Text status indicating that the Largest Contentful Paint (LCP) metric was text rather than an image. "LCP" is an acronym and should not be translated.
           */
          noLcpResource: "No LCP resource detected because the LCP is not an image"
        };
        i18nString11 = /* @__PURE__ */ __name((i18nId, values) => ({ i18nId, values }), "i18nString");
        __name(isLCPDiscoveryInsight, "isLCPDiscoveryInsight");
        __name(finalize41, "finalize");
        __name(generateInsight11, "generateInsight");
        __name(getImageData, "getImageData");
        __name(createOverlays11, "createOverlays");
      }
    });
    legacy_javascript_exports = {};
    __export2(legacy_javascript_exports, {
      detectLegacyJavaScript: () => detectLegacyJavaScript,
      getCoreJsPolyfillData: () => getCoreJsPolyfillData,
      getTransformPatterns: () => getTransformPatterns
    });
    init_legacy_javascript = __esm2({
      "node_modules/legacy-javascript/legacy-javascript.js"() {
        init_process_global();
        polyfill_module_data_default = [
          {
            name: "focus-visible",
            modules: [
              "focus-visible"
            ]
          },
          {
            name: "Error.prototype.cause",
            modules: [
              "es.error.cause"
            ]
          },
          {
            name: "Array.prototype.at",
            modules: [
              "es.array.at",
              "esnext.array.at"
            ],
            corejs: true
          },
          {
            name: "Array.prototype.concat",
            modules: [
              "es.array.concat"
            ],
            corejs: true
          },
          {
            name: "Array.prototype.copyWithin",
            modules: [
              "es.array.copy-within"
            ],
            corejs: true
          },
          {
            name: "Array.prototype.every",
            modules: [
              "es.array.every"
            ],
            corejs: true
          },
          {
            name: "Array.prototype.fill",
            modules: [
              "es.array.fill"
            ],
            corejs: true
          },
          {
            name: "Array.prototype.filter",
            modules: [
              "es.array.filter"
            ],
            corejs: true
          },
          {
            name: "Array.prototype.find",
            modules: [
              "es.array.find"
            ],
            corejs: true
          },
          {
            name: "Array.prototype.findIndex",
            modules: [
              "es.array.find-index"
            ],
            corejs: true
          },
          {
            name: "Array.prototype.findLast",
            modules: [
              "es.array.find-last",
              "esnext.array.find-last"
            ],
            corejs: true
          },
          {
            name: "Array.prototype.findLastIndex",
            modules: [
              "es.array.find-last-index",
              "esnext.array.find-last-index"
            ],
            corejs: true
          },
          {
            name: "Array.prototype.flat",
            modules: [
              "es.array.flat"
            ],
            corejs: true
          },
          {
            name: "Array.prototype.flatMap",
            modules: [
              "es.array.flat-map"
            ],
            corejs: true
          },
          {
            name: "Array.prototype.forEach",
            modules: [
              "es.array.for-each"
            ],
            corejs: true
          },
          {
            name: "Array.from",
            modules: [
              "es.array.from"
            ],
            corejs: true
          },
          {
            name: "Array.prototype.includes",
            modules: [
              "es.array.includes"
            ],
            corejs: true
          },
          {
            name: "Array.prototype.indexOf",
            modules: [
              "es.array.index-of"
            ],
            corejs: true
          },
          {
            name: "Array.isArray",
            modules: [
              "es.array.is-array"
            ],
            corejs: true
          },
          {
            name: "Array.prototype.join",
            modules: [
              "es.array.join"
            ],
            corejs: true
          },
          {
            name: "Array.prototype.map",
            modules: [
              "es.array.map"
            ],
            corejs: true
          },
          {
            name: "Array.of",
            modules: [
              "es.array.of"
            ],
            corejs: true
          },
          {
            name: "Array.prototype.slice",
            modules: [
              "es.array.slice"
            ],
            corejs: true
          },
          {
            name: "Array.prototype.some",
            modules: [
              "es.array.some"
            ],
            corejs: true
          },
          {
            name: "Array.prototype.sort",
            modules: [
              "es.array.sort"
            ],
            corejs: true
          },
          {
            name: "Array.prototype.unshift",
            modules: [
              "es.array.unshift"
            ],
            corejs: true
          },
          {
            name: "Math.acosh",
            modules: [
              "es.math.acosh"
            ],
            corejs: true
          },
          {
            name: "Math.asinh",
            modules: [
              "es.math.asinh"
            ],
            corejs: true
          },
          {
            name: "Math.atanh",
            modules: [
              "es.math.atanh"
            ],
            corejs: true
          },
          {
            name: "Math.cbrt",
            modules: [
              "es.math.cbrt"
            ],
            corejs: true
          },
          {
            name: "Math.clz32",
            modules: [
              "es.math.clz32"
            ],
            corejs: true
          },
          {
            name: "Math.cosh",
            modules: [
              "es.math.cosh"
            ],
            corejs: true
          },
          {
            name: "Math.expm1",
            modules: [
              "es.math.expm1"
            ],
            corejs: true
          },
          {
            name: "Math.fround",
            modules: [
              "es.math.fround"
            ],
            corejs: true
          },
          {
            name: "Math.hypot",
            modules: [
              "es.math.hypot"
            ],
            corejs: true
          },
          {
            name: "Math.imul",
            modules: [
              "es.math.imul"
            ],
            corejs: true
          },
          {
            name: "Math.log10",
            modules: [
              "es.math.log10"
            ],
            corejs: true
          },
          {
            name: "Math.log1p",
            modules: [
              "es.math.log1p"
            ],
            corejs: true
          },
          {
            name: "Math.log2",
            modules: [
              "es.math.log2"
            ],
            corejs: true
          },
          {
            name: "Math.sign",
            modules: [
              "es.math.sign"
            ],
            corejs: true
          },
          {
            name: "Math.sinh",
            modules: [
              "es.math.sinh"
            ],
            corejs: true
          },
          {
            name: "Math.tanh",
            modules: [
              "es.math.tanh"
            ],
            corejs: true
          },
          {
            name: "Math.trunc",
            modules: [
              "es.math.trunc"
            ],
            corejs: true
          },
          {
            name: "Object.assign",
            modules: [
              "es.object.assign"
            ],
            corejs: true
          },
          {
            name: "Object.create",
            modules: [
              "es.object.create"
            ],
            corejs: true
          },
          {
            name: "Object.entries",
            modules: [
              "es.object.entries"
            ],
            corejs: true
          },
          {
            name: "Object.freeze",
            modules: [
              "es.object.freeze"
            ],
            corejs: true
          },
          {
            name: "Object.fromEntries",
            modules: [
              "es.object.from-entries"
            ],
            corejs: true
          },
          {
            name: "Object.getOwnPropertyDescriptor",
            modules: [
              "es.object.get-own-property-descriptor"
            ],
            corejs: true
          },
          {
            name: "Object.getOwnPropertyDescriptors",
            modules: [
              "es.object.get-own-property-descriptors"
            ],
            corejs: true
          },
          {
            name: "Object.getPrototypeOf",
            modules: [
              "es.object.get-prototype-of"
            ],
            corejs: true
          },
          {
            name: "Object.hasOwn",
            modules: [
              "es.object.has-own",
              "esnext.object.has-own"
            ],
            corejs: true
          },
          {
            name: "Object.is",
            modules: [
              "es.object.is"
            ],
            corejs: true
          },
          {
            name: "Object.isExtensible",
            modules: [
              "es.object.is-extensible"
            ],
            corejs: true
          },
          {
            name: "Object.isFrozen",
            modules: [
              "es.object.is-frozen"
            ],
            corejs: true
          },
          {
            name: "Object.isSealed",
            modules: [
              "es.object.is-sealed"
            ],
            corejs: true
          },
          {
            name: "Object.keys",
            modules: [
              "es.object.keys"
            ],
            corejs: true
          },
          {
            name: "Object.preventExtensions",
            modules: [
              "es.object.prevent-extensions"
            ],
            corejs: true
          },
          {
            name: "Object.seal",
            modules: [
              "es.object.seal"
            ],
            corejs: true
          },
          {
            name: "Object.setPrototypeOf",
            modules: [
              "es.object.set-prototype-of"
            ],
            corejs: true
          },
          {
            name: "Object.values",
            modules: [
              "es.object.values"
            ],
            corejs: true
          },
          {
            name: "Promise.any",
            modules: [
              "es.promise.any",
              "esnext.promise.any"
            ],
            corejs: true
          },
          {
            name: "Reflect.apply",
            modules: [
              "es.reflect.apply"
            ],
            corejs: true
          },
          {
            name: "Reflect.construct",
            modules: [
              "es.reflect.construct"
            ],
            corejs: true
          },
          {
            name: "Reflect.deleteProperty",
            modules: [
              "es.reflect.delete-property"
            ],
            corejs: true
          },
          {
            name: "Reflect.get",
            modules: [
              "es.reflect.get"
            ],
            corejs: true
          },
          {
            name: "Reflect.getOwnPropertyDescriptor",
            modules: [
              "es.reflect.get-own-property-descriptor"
            ],
            corejs: true
          },
          {
            name: "Reflect.getPrototypeOf",
            modules: [
              "es.reflect.get-prototype-of"
            ],
            corejs: true
          },
          {
            name: "Reflect.has",
            modules: [
              "es.reflect.has"
            ],
            corejs: true
          },
          {
            name: "Reflect.isExtensible",
            modules: [
              "es.reflect.is-extensible"
            ],
            corejs: true
          },
          {
            name: "Reflect.ownKeys",
            modules: [
              "es.reflect.own-keys"
            ],
            corejs: true
          },
          {
            name: "Reflect.preventExtensions",
            modules: [
              "es.reflect.prevent-extensions"
            ],
            corejs: true
          },
          {
            name: "Reflect.setPrototypeOf",
            modules: [
              "es.reflect.set-prototype-of"
            ],
            corejs: true
          },
          {
            name: "String.prototype.codePointAt",
            modules: [
              "es.string.code-point-at"
            ],
            corejs: true
          },
          {
            name: "String.prototype.endsWith",
            modules: [
              "es.string.ends-with"
            ],
            corejs: true
          },
          {
            name: "String.fromCodePoint",
            modules: [
              "es.string.from-code-point"
            ],
            corejs: true
          },
          {
            name: "String.prototype.includes",
            modules: [
              "es.string.includes"
            ],
            corejs: true
          },
          {
            name: "String.prototype.matchAll",
            modules: [
              "es.string.match-all",
              "esnext.string.match-all"
            ],
            corejs: true
          },
          {
            name: "String.raw",
            modules: [
              "es.string.raw"
            ],
            corejs: true
          },
          {
            name: "String.prototype.repeat",
            modules: [
              "es.string.repeat"
            ],
            corejs: true
          },
          {
            name: "String.prototype.replaceAll",
            modules: [
              "es.string.replace-all",
              "esnext.string.replace-all"
            ],
            corejs: true
          },
          {
            name: "String.prototype.startsWith",
            modules: [
              "es.string.starts-with"
            ],
            corejs: true
          },
          {
            name: "String.prototype.substr",
            modules: [
              "es.string.substr"
            ],
            corejs: true
          },
          {
            name: "String.prototype.trim",
            modules: [
              "es.string.trim"
            ],
            corejs: true
          },
          {
            name: "String.prototype.trimEnd",
            modules: [
              "es.string.trim-end"
            ],
            corejs: true
          },
          {
            name: "String.prototype.trimStart",
            modules: [
              "es.string.trim-start"
            ],
            corejs: true
          },
          {
            name: "String.prototype.link",
            modules: [
              "es.string.link"
            ],
            corejs: true
          },
          {
            name: "Promise.allSettled",
            modules: [
              "esnext.promise.all-settled"
            ],
            corejs: true
          }
        ];
        polyfill_graph_data_default = {
          moduleSizes: [
            26070,
            498,
            282,
            294,
            281,
            467,
            161,
            236,
            229,
            765,
            546,
            339,
            1608,
            723,
            729,
            1545,
            438,
            214,
            657,
            111,
            759,
            537,
            209,
            281,
            685,
            217,
            757,
            631,
            293,
            182,
            475,
            79,
            407,
            140,
            366,
            792,
            269,
            222,
            158,
            280,
            188,
            137,
            158,
            105,
            189,
            543,
            160,
            742,
            1436,
            88,
            904,
            146,
            314,
            375,
            183,
            1083,
            195,
            503,
            269,
            208,
            334,
            350,
            460,
            568,
            229,
            1155,
            334,
            266,
            30,
            120,
            309,
            370,
            358,
            1952,
            1638,
            304,
            153,
            274,
            1288,
            192,
            543,
            74,
            144,
            137,
            33,
            336,
            457,
            2122,
            535,
            711,
            1323,
            117,
            1961,
            244,
            557,
            318,
            119,
            124,
            108,
            144,
            96,
            133,
            441,
            210,
            1627,
            1956,
            693,
            1426,
            863,
            637,
            301,
            51,
            708,
            583,
            119,
            600,
            221,
            370,
            728,
            1085,
            552,
            629,
            125,
            1746,
            97,
            441,
            543,
            2756,
            371,
            447,
            548,
            243,
            266,
            217,
            99,
            440,
            183,
            546,
            137,
            464,
            207,
            983,
            503,
            237,
            382,
            249,
            675,
            402,
            254,
            223,
            164,
            214,
            191,
            831,
            218,
            202,
            232,
            124,
            249,
            160,
            251,
            217,
            717,
            78,
            561,
            1627,
            256,
            386,
            225,
            432,
            499,
            394,
            364,
            445,
            634,
            667,
            177,
            346,
            470,
            663,
            142,
            588,
            414,
            617,
            1559,
            380,
            2520,
            1040,
            417,
            289,
            238,
            220,
            214,
            303,
            163,
            141,
            510,
            397,
            137,
            137,
            133,
            133,
            390,
            266,
            137,
            183,
            215,
            191,
            485,
            328,
            575,
            799,
            533,
            148,
            215,
            589,
            589,
            130,
            362,
            562,
            471,
            179,
            186,
            1266,
            1456,
            521,
            1536,
            427,
            444,
            406,
            912,
            150,
            283,
            144,
            485,
            470,
            205,
            1268,
            796,
            658,
            306,
            3751,
            814,
            146,
            2328,
            1226,
            922,
            237,
            206,
            198,
            250,
            283,
            60,
            3e3
          ],
          dependencies: {
            "Array.prototype.at": [0, 5, 69, 105, 106, 116, 164],
            "Array.prototype.concat": [0, 16, 21, 22, 26, 34, 40, 76, 78, 155, 165],
            "Array.prototype.copyWithin": [0, 5, 9, 37, 69, 105, 106, 116, 166],
            "Array.prototype.every": [0, 15, 17, 21, 22, 26, 53, 59, 76, 78, 155, 167],
            "Array.prototype.fill": [0, 5, 10, 69, 105, 106, 116, 168],
            "Array.prototype.filter": [0, 15, 16, 21, 22, 26, 53, 59, 76, 78, 155, 169],
            "Array.prototype.find": [0, 5, 15, 21, 22, 26, 53, 59, 69, 76, 78, 105, 106, 116, 155, 173],
            "Array.prototype.findIndex": [0, 5, 15, 21, 22, 26, 53, 59, 69, 76, 78, 105, 106, 116, 155, 170],
            "Array.prototype.findLast": [0, 5, 14, 53, 59, 69, 105, 106, 116, 172],
            "Array.prototype.findLastIndex": [0, 5, 14, 53, 59, 69, 105, 106, 116, 171],
            "Array.prototype.flat": [0, 21, 22, 26, 40, 50, 53, 59, 76, 78, 155, 175],
            "Array.prototype.flatMap": [0, 21, 22, 26, 40, 50, 53, 59, 76, 78, 155, 174],
            "Array.prototype.forEach": [0, 11, 15, 17, 21, 22, 26, 53, 59, 76, 78, 155, 176],
            "Array.from": [0, 12, 23, 24, 26, 34, 53, 59, 62, 63, 75, 78, 88, 155, 177],
            "Array.prototype.includes": [0, 5, 69, 105, 106, 116, 178],
            "Array.prototype.indexOf": [0, 17, 59, 179],
            "Array.isArray": [0, 76, 180],
            "Array.prototype.join": [0, 17, 181],
            "Array.prototype.map": [0, 15, 16, 21, 22, 26, 53, 59, 76, 78, 155, 182],
            "Array.of": [0, 26, 34, 78, 155, 183],
            "Array.prototype.slice": [0, 16, 19, 26, 34, 76, 78, 155, 184],
            "Array.prototype.some": [0, 15, 17, 21, 22, 26, 53, 59, 76, 78, 155, 185],
            "Array.prototype.sort": [0, 17, 19, 20, 26, 37, 42, 43, 46, 155, 156, 186],
            "Array.prototype.unshift": [0, 18, 37, 40, 76, 187],
            "Math.acosh": [0, 97, 188],
            "Math.asinh": [0, 189],
            "Math.atanh": [0, 190],
            "Math.cbrt": [0, 100, 191],
            "Math.clz32": [0, 192],
            "Math.cosh": [0, 93, 193],
            "Math.expm1": [0, 93, 194],
            "Math.fround": [0, 94, 95, 99, 100, 195],
            "Math.hypot": [0, 196],
            "Math.imul": [0, 197],
            "Math.log10": [0, 96, 198],
            "Math.log1p": [0, 97, 199],
            "Math.log2": [0, 98, 200],
            "Math.sign": [0, 100, 201],
            "Math.sinh": [0, 93, 202],
            "Math.tanh": [0, 93, 203],
            "Math.trunc": [0, 204],
            "Object.assign": [0, 104, 116, 205],
            "Object.create": [0, 69, 105, 106, 116, 206],
            "Object.entries": [0, 29, 112, 116, 119, 207],
            "Object.freeze": [0, 8, 19, 51, 73, 109, 113, 208],
            "Object.fromEntries": [0, 26, 34, 53, 59, 62, 63, 75, 87, 88, 155, 209],
            "Object.getOwnPropertyDescriptor": [0, 210],
            "Object.getOwnPropertyDescriptors": [0, 34, 211],
            "Object.getPrototypeOf": [0, 29, 112, 212],
            "Object.hasOwn": [0, 213],
            "Object.is": [0, 134, 217],
            "Object.isExtensible": [0, 8, 113, 214],
            "Object.isFrozen": [0, 8, 215],
            "Object.isSealed": [0, 8, 216],
            "Object.keys": [0, 116, 218],
            "Object.preventExtensions": [0, 8, 19, 51, 73, 109, 113, 219],
            "Object.seal": [0, 8, 19, 51, 73, 109, 113, 220],
            "Object.setPrototypeOf": [0, 4, 58, 83, 118, 221],
            "Object.values": [0, 29, 112, 116, 119, 222],
            "Promise.any": [0, 24, 26, 47, 53, 59, 62, 63, 75, 87, 88, 102, 122, 123, 124, 125, 155, 224],
            "Reflect.apply": [0, 52, 225],
            "Reflect.construct": [0, 3, 19, 26, 52, 55, 69, 78, 105, 106, 116, 155, 226],
            "Reflect.deleteProperty": [0, 227],
            "Reflect.get": [0, 29, 79, 112, 230],
            "Reflect.getOwnPropertyDescriptor": [0, 228],
            "Reflect.getPrototypeOf": [0, 29, 112, 229],
            "Reflect.has": [0, 231],
            "Reflect.isExtensible": [0, 8, 113, 232],
            "Reflect.ownKeys": [0, 233],
            "Reflect.preventExtensions": [0, 51, 234],
            "Reflect.setPrototypeOf": [0, 4, 58, 83, 118, 235],
            "String.prototype.codePointAt": [0, 26, 141, 155, 156, 236],
            "String.prototype.endsWith": [0, 26, 28, 59, 85, 103, 155, 156, 237],
            "String.fromCodePoint": [0, 238],
            "String.prototype.includes": [0, 26, 28, 85, 103, 155, 156, 239],
            "String.prototype.matchAll": [0, 3, 6, 26, 29, 31, 59, 69, 78, 85, 89, 90, 105, 106, 112, 116, 126, 127, 128, 129, 130, 131, 132, 135, 139, 141, 155, 156, 241],
            "String.raw": [0, 26, 155, 156, 242],
            "String.prototype.repeat": [0, 26, 142, 155, 156, 243],
            "String.prototype.replaceAll": [0, 26, 65, 85, 128, 129, 155, 156, 244],
            "String.prototype.startsWith": [0, 26, 28, 59, 85, 103, 155, 156, 245],
            "String.prototype.substr": [0, 26, 155, 156, 246],
            "String.prototype.trim": [0, 26, 144, 146, 155, 156, 163, 251],
            "String.prototype.trimEnd": [0, 26, 143, 144, 146, 155, 156, 163, 247, 249],
            "String.prototype.trimStart": [0, 26, 144, 145, 146, 155, 156, 163, 248, 250],
            "String.prototype.link": [0, 26, 30, 140, 155, 156, 240],
            "Promise.allSettled": [0, 24, 26, 47, 53, 59, 62, 63, 75, 87, 88, 102, 122, 123, 124, 125, 155, 223, 252],
            "focus-visible": [253]
          },
          maxSize: 155835
        };
        polyfillModuleData = polyfill_module_data_default;
        graph = polyfill_graph_data_default;
        CodePatternMatcher = class {
          static {
            __name(this, "CodePatternMatcher");
          }
          /**
           * @param {Pattern[]} patterns
           */
          constructor(patterns) {
            this.patterns = patterns;
          }
          /**
           * @param {string} code
           * @return {PatternMatchResult[]}
           */
          match(code2) {
            if (!this.re) {
              const patternsExpression = this.patterns.map((pattern2) => `(${pattern2.expression})`).join("|");
              this.re = new RegExp(`(^\r
|\r|
)|${patternsExpression}`, "g");
            }
            this.re.lastIndex = 0;
            const seen = /* @__PURE__ */ new Set();
            const matches = [];
            let result;
            let line = 0;
            let lineBeginsAtIndex = 0;
            while ((result = this.re.exec(code2)) !== null) {
              const captureGroups = result.slice(1);
              const [isNewline, ...patternExpressionMatches] = captureGroups;
              if (isNewline) {
                line++;
                lineBeginsAtIndex = result.index + 1;
                continue;
              }
              const pattern2 = this.patterns[patternExpressionMatches.findIndex(Boolean)];
              if (seen.has(pattern2)) {
                continue;
              }
              seen.add(pattern2);
              matches.push({
                name: pattern2.name,
                line,
                column: result.index - lineBeginsAtIndex
              });
            }
            return matches;
          }
        };
        __name(buildPolyfillExpression, "buildPolyfillExpression");
        __name(getCoreJsPolyfillData, "getCoreJsPolyfillData");
        __name(getPolyfillPatterns, "getPolyfillPatterns");
        __name(getTransformPatterns, "getTransformPatterns");
        __name(estimateWastedBytes, "estimateWastedBytes");
        matcher = new CodePatternMatcher([
          ...getPolyfillPatterns(),
          ...getTransformPatterns()
        ]);
        __name(detectLegacyJavaScript, "detectLegacyJavaScript");
      }
    });
    init_legacy_javascript2 = __esm2({
      "node_modules/@paulirish/trace_engine/third_party/legacy-javascript/legacy-javascript.js"() {
        init_process_global();
        init_legacy_javascript();
      }
    });
    LegacyJavaScript_exports = {};
    __export2(LegacyJavaScript_exports, {
      UIStrings: () => UIStrings13,
      createOverlays: () => createOverlays12,
      generateInsight: () => generateInsight12,
      i18nString: () => i18nString12,
      isLegacyJavaScript: () => isLegacyJavaScript
    });
    init_LegacyJavaScript = __esm2({
      "node_modules/@paulirish/trace_engine/models/trace/insights/LegacyJavaScript.js"() {
        init_process_global();
        init_legacy_javascript2();
        init_helpers2();
        init_Common();
        init_types4();
        ({ detectLegacyJavaScript: detectLegacyJavaScript2 } = legacy_javascript_exports);
        UIStrings13 = {
          /**
           * @description Title of an insight that identifies polyfills for modern JavaScript features, and recommends their removal.
           */
          title: "Legacy JavaScript",
          /**
           * @description Description of an insight that identifies polyfills for modern JavaScript features, and recommends their removal.
           */
          description: "Polyfills and transforms enable older browsers to use new JavaScript features. However, many aren't necessary for modern browsers. Consider modifying your JavaScript build process to not transpile [Baseline](https://web.dev/articles/baseline-and-polyfills) features, unless you know you must support older browsers. [Learn why most sites can deploy ES6+ code without transpiling](https://developer.chrome.com/docs/performance/insights/legacy-javascript)",
          /** Label for a column in a data table; entries will be the individual JavaScript scripts. */
          columnScript: "Script",
          /** Label for a column in a data table; entries will be the number of wasted bytes (aka the estimated savings in terms of bytes). */
          columnWastedBytes: "Wasted bytes"
        };
        i18nString12 = /* @__PURE__ */ __name((i18nId, values) => ({ i18nId, values }), "i18nString");
        BYTE_THRESHOLD = 5e3;
        __name(finalize42, "finalize");
        __name(isLegacyJavaScript, "isLegacyJavaScript");
        __name(generateInsight12, "generateInsight");
        __name(createOverlays12, "createOverlays");
      }
    });
    ModernHTTP_exports = {};
    __export2(ModernHTTP_exports, {
      UIStrings: () => UIStrings14,
      createOverlayForRequest: () => createOverlayForRequest3,
      createOverlays: () => createOverlays13,
      determineHttp1Requests: () => determineHttp1Requests,
      generateInsight: () => generateInsight13,
      i18nString: () => i18nString13,
      isModernHTTPInsight: () => isModernHTTPInsight
    });
    init_ModernHTTP = __esm2({
      "node_modules/@paulirish/trace_engine/models/trace/insights/ModernHTTP.js"() {
        init_process_global();
        init_platform();
        init_handlers();
        init_helpers2();
        init_types4();
        UIStrings14 = {
          /**
           * @description Title of an insight that recommends using HTTP/2 over HTTP/1.1 because of the performance benefits. "HTTP" should not be translated.
           */
          title: "Modern HTTP",
          /**
           * @description Description of an insight that recommends recommends using HTTP/2 over HTTP/1.1 because of the performance benefits. "HTTP" should not be translated.
           */
          description: "HTTP/2 and HTTP/3 offer many benefits over HTTP/1.1, such as multiplexing. [Learn more about using modern HTTP](https://developer.chrome.com/docs/performance/insights/modern-http).",
          /**
           * @description Column header for a table where each cell represents a network request.
           */
          request: "Request",
          /**
           * @description Column header for a table where each cell represents the protocol of a network request.
           */
          protocol: "Protocol",
          /**
           * @description Text explaining that there were not requests that were slowed down by using HTTP/1.1. "HTTP/1.1" should not be translated.
           */
          noOldProtocolRequests: "No requests used HTTP/1.1, or its current use of HTTP/1.1 does not present a significant optimization opportunity. HTTP/1.1 requests are only flagged if six or more static assets originate from the same origin, and they are not served from a local development environment or a third-party source."
        };
        i18nString13 = /* @__PURE__ */ __name((i18nId, values) => ({ i18nId, values }), "i18nString");
        __name(isModernHTTPInsight, "isModernHTTPInsight");
        __name(isMultiplexableStaticAsset, "isMultiplexableStaticAsset");
        __name(determineHttp1Requests, "determineHttp1Requests");
        __name(computeWasteWithGraph, "computeWasteWithGraph");
        __name(computeMetricSavings, "computeMetricSavings");
        __name(finalize43, "finalize");
        __name(generateInsight13, "generateInsight");
        __name(createOverlayForRequest3, "createOverlayForRequest");
        __name(createOverlays13, "createOverlays");
      }
    });
    NetworkDependencyTree_exports = {};
    __export2(NetworkDependencyTree_exports, {
      ParsedURL: () => ParsedURL,
      TOO_MANY_PRECONNECTS_THRESHOLD: () => TOO_MANY_PRECONNECTS_THRESHOLD,
      UIStrings: () => UIStrings15,
      createOverlays: () => createOverlays14,
      generateInsight: () => generateInsight14,
      generatePreconnectCandidates: () => generatePreconnectCandidates,
      generatePreconnectedOrigins: () => generatePreconnectedOrigins,
      handleLinkResponseHeader: () => handleLinkResponseHeader,
      i18nString: () => i18nString14,
      isNetworkDependencyTreeInsight: () => isNetworkDependencyTreeInsight,
      normalizePath: () => normalizePath,
      schemeIs: () => schemeIs
    });
    init_NetworkDependencyTree = __esm2({
      "node_modules/@paulirish/trace_engine/models/trace/insights/NetworkDependencyTree.js"() {
        init_process_global();
        init_platform();
        init_helpers2();
        init_types2();
        init_types4();
        UIStrings15 = {
          /**
           * @description Title of an insight that recommends avoiding chaining critical requests.
           */
          title: "Network dependency tree",
          /**
           * @description Description of an insight that recommends avoiding chaining critical requests.
           */
          description: "[Avoid chaining critical requests](https://developer.chrome.com/docs/performance/insights/network-dependency-tree) by reducing the length of chains, reducing the download size of resources, or deferring the download of unnecessary resources to improve page load.",
          /**
           * @description Description of the warning that recommends avoiding chaining critical requests.
           */
          warningDescription: "Avoid chaining critical requests by reducing the length of chains, reducing the download size of resources, or deferring the download of unnecessary resources to improve page load.",
          /**
           * @description Text status indicating that there isn't long chaining critical network requests.
           */
          noNetworkDependencyTree: "No rendering tasks impacted by network dependencies",
          /**
           * @description Text for the maximum critical path latency. This refers to the longest chain of network requests that
           * the browser must download before it can render the page.
           */
          maxCriticalPathLatency: "Max critical path latency:",
          /** Label for a column in a data table; entries will be the network request */
          columnRequest: "Request",
          /** Label for a column in a data table; entries will be the time from main document till current network request. */
          columnTime: "Time",
          /**
           * @description Title of the table of the detected preconnect origins.
           */
          preconnectOriginsTableTitle: "Preconnected origins",
          /**
           * @description Description of the table of the detected preconnect origins.
           */
          preconnectOriginsTableDescription: "[preconnect](https://developer.chrome.com/docs/lighthouse/performance/uses-rel-preconnect/) hints help the browser establish a connection earlier in the page load, saving time when the first request for that origin is made. The following are the origins that the page preconnected to.",
          /**
           * @description Text status indicating that there isn't any preconnected origins.
           */
          noPreconnectOrigins: "no origins were preconnected",
          /**
           * @description A warning message that is shown when found more than 4 preconnected links. "preconnect" should not be translated.
           */
          tooManyPreconnectLinksWarning: "More than 4 `preconnect` connections were found. These should be used sparingly and only to the most important origins.",
          /**
           * @description A warning message that is shown when the user added preconnect for some unnecessary origins. "preconnect" should not be translated.
           */
          unusedWarning: "Unused preconnect. Only use `preconnect` for origins that the page is likely to request.",
          /**
           * @description A warning message that is shown when the user forget to set the `crossorigin` HTML attribute, or setting it to an incorrect value, on the link is a common mistake when adding preconnect links. "preconnect" should not be translated.
           * */
          crossoriginWarning: "Unused preconnect. Check that the `crossorigin` attribute is used properly.",
          /**
           * @description Label for a column in a data table; entries will be the source of the origin.
           */
          columnSource: "Source",
          /**
           * @description Text status indicating that there isn't preconnect candidates.
           */
          noPreconnectCandidates: "No additional origins are good candidates for preconnecting",
          /**
           * @description Title of the table that shows the origins that the page should have preconnected to.
           */
          estSavingTableTitle: "Preconnect candidates",
          /**
           * @description Description of the table that recommends preconnecting to the origins to save time. "preconnect" should not be translated.
           */
          estSavingTableDescription: "Add [preconnect](https://developer.chrome.com/docs/lighthouse/performance/uses-rel-preconnect/) hints to your most important origins, but try to use no more than 4.",
          /**
           * @description Label for a column in a data table; entries will be the origin of a web resource
           */
          columnOrigin: "Origin",
          /**
           * @description Label for a column in a data table; entries will be the number of milliseconds the user could reduce page load by if they implemented the suggestions.
           */
          columnWastedMs: "Est LCP savings"
        };
        i18nString14 = /* @__PURE__ */ __name((i18nId, values) => ({ i18nId, values }), "i18nString");
        nonCriticalResourceTypes = /* @__PURE__ */ new Set([
          "Image",
          "XHR",
          "Fetch",
          "EventSource"
        ]);
        PRECONNECT_SOCKET_MAX_IDLE_IN_MS = Timing_exports.Milli(15e3);
        IGNORE_THRESHOLD_IN_MILLISECONDS = Timing_exports.Milli(50);
        TOO_MANY_PRECONNECTS_THRESHOLD = 4;
        __name(finalize44, "finalize");
        __name(isCritical, "isCritical");
        __name(findMaxLeafNode, "findMaxLeafNode");
        __name(sortRecursively, "sortRecursively");
        __name(generateNetworkDependencyTree, "generateNetworkDependencyTree");
        __name(getSecurityOrigin, "getSecurityOrigin");
        __name(handleLinkResponseHeaderPart, "handleLinkResponseHeaderPart");
        __name(handleLinkResponseHeader, "handleLinkResponseHeader");
        __name(generatePreconnectedOrigins, "generatePreconnectedOrigins");
        __name(hasValidTiming, "hasValidTiming");
        __name(hasAlreadyConnectedToOrigin, "hasAlreadyConnectedToOrigin");
        __name(socketStartTimeIsBelowThreshold, "socketStartTimeIsBelowThreshold");
        __name(candidateRequestsByOrigin, "candidateRequestsByOrigin");
        __name(generatePreconnectCandidates, "generatePreconnectCandidates");
        __name(isNetworkDependencyTreeInsight, "isNetworkDependencyTreeInsight");
        __name(generateInsight14, "generateInsight");
        __name(createOverlays14, "createOverlays");
        __name(normalizePath, "normalizePath");
        __name(schemeIs, "schemeIs");
        ParsedURL = class _ParsedURL {
          static {
            __name(this, "ParsedURL");
          }
          isValid;
          url;
          scheme;
          user;
          host;
          port;
          path;
          queryParams;
          fragment;
          folderPathComponents;
          lastPathComponent;
          blobInnerScheme;
          constructor(url) {
            this.isValid = false;
            this.url = url;
            this.scheme = "";
            this.user = "";
            this.host = "";
            this.port = "";
            this.path = "";
            this.queryParams = "";
            this.fragment = "";
            this.folderPathComponents = "";
            this.lastPathComponent = "";
            const isBlobUrl = this.url.startsWith("blob:");
            const urlToMatch = isBlobUrl ? url.substring(5) : url;
            const match = urlToMatch.match(_ParsedURL.urlRegex());
            if (match) {
              this.isValid = true;
              if (isBlobUrl) {
                this.blobInnerScheme = match[2].toLowerCase();
                this.scheme = "blob";
              } else {
                this.scheme = match[2].toLowerCase();
              }
              this.user = match[3] ?? "";
              this.host = match[4] ?? "";
              this.port = match[5] ?? "";
              this.path = match[6] ?? "/";
              this.queryParams = match[7] ?? "";
              this.fragment = match[8] ?? "";
            } else {
              if (this.url.startsWith("data:")) {
                this.scheme = "data";
                return;
              }
              if (this.url.startsWith("blob:")) {
                this.scheme = "blob";
                return;
              }
              if (this.url === "about:blank") {
                this.scheme = "about";
                return;
              }
              this.path = this.url;
            }
            const lastSlashExceptTrailingIndex = this.path.lastIndexOf("/", this.path.length - 2);
            if (lastSlashExceptTrailingIndex !== -1) {
              this.lastPathComponent = this.path.substring(lastSlashExceptTrailingIndex + 1);
            } else {
              this.lastPathComponent = this.path;
            }
            const lastSlashIndex = this.path.lastIndexOf("/");
            if (lastSlashIndex !== -1) {
              this.folderPathComponents = this.path.substring(0, lastSlashIndex);
            }
          }
          static fromString(string2) {
            const parsedURL = new _ParsedURL(string2.toString());
            if (parsedURL.isValid) {
              return parsedURL;
            }
            return null;
          }
          static preEncodeSpecialCharactersInPath(path72) {
            for (const specialChar of ["%", ";", "#", "?", " "]) {
              path72 = path72.replaceAll(specialChar, encodeURIComponent(specialChar));
            }
            return path72;
          }
          static rawPathToEncodedPathString(path72) {
            const partiallyEncoded = _ParsedURL.preEncodeSpecialCharactersInPath(path72);
            if (path72.startsWith("/")) {
              return new URL(partiallyEncoded, "file:///").pathname;
            }
            return new URL("/" + partiallyEncoded, "file:///").pathname.substr(1);
          }
          /**
           * @param name Must not be encoded
           */
          static encodedFromParentPathAndName(parentPath, name) {
            return _ParsedURL.concatenate(parentPath, "/", _ParsedURL.preEncodeSpecialCharactersInPath(name));
          }
          /**
           * @param name Must not be encoded
           */
          static urlFromParentUrlAndName(parentUrl, name) {
            return _ParsedURL.concatenate(parentUrl, "/", _ParsedURL.preEncodeSpecialCharactersInPath(name));
          }
          static encodedPathToRawPathString(encPath) {
            return decodeURIComponent(encPath);
          }
          static rawPathToUrlString(fileSystemPath) {
            let preEncodedPath = _ParsedURL.preEncodeSpecialCharactersInPath(fileSystemPath.replace(/\\/g, "/"));
            preEncodedPath = preEncodedPath.replace(/\\/g, "/");
            if (!preEncodedPath.startsWith("file://")) {
              if (preEncodedPath.startsWith("/")) {
                preEncodedPath = "file://" + preEncodedPath;
              } else {
                preEncodedPath = "file:///" + preEncodedPath;
              }
            }
            return new URL(preEncodedPath).toString();
          }
          static relativePathToUrlString(relativePath, baseURL) {
            const preEncodedPath = _ParsedURL.preEncodeSpecialCharactersInPath(relativePath.replace(/\\/g, "/"));
            return new URL(preEncodedPath, baseURL).toString();
          }
          static urlToRawPathString(fileURL, isWindows2) {
            console.assert(fileURL.startsWith("file://"), "This must be a file URL.");
            const decodedFileURL = decodeURIComponent(fileURL);
            if (isWindows2) {
              return decodedFileURL.substr("file:///".length).replace(/\//g, "\\");
            }
            return decodedFileURL.substr("file://".length);
          }
          static sliceUrlToEncodedPathString(url, start) {
            return url.substring(start);
          }
          static substr(devToolsPath, from2, length) {
            return devToolsPath.substr(from2, length);
          }
          static substring(devToolsPath, start, end) {
            return devToolsPath.substring(start, end);
          }
          static prepend(prefix, devToolsPath) {
            return prefix + devToolsPath;
          }
          static concatenate(devToolsPath, ...appendage) {
            return devToolsPath.concat(...appendage);
          }
          static trim(devToolsPath) {
            return devToolsPath.trim();
          }
          static slice(devToolsPath, start, end) {
            return devToolsPath.slice(start, end);
          }
          static join(devToolsPaths, separator) {
            return devToolsPaths.join(separator);
          }
          static split(devToolsPath, separator, limit2) {
            return devToolsPath.split(separator, limit2);
          }
          static toLowerCase(devToolsPath) {
            return devToolsPath.toLowerCase();
          }
          static isValidUrlString(str) {
            return new _ParsedURL(str).isValid;
          }
          static urlWithoutHash(url) {
            const hashIndex = url.indexOf("#");
            if (hashIndex !== -1) {
              return url.substr(0, hashIndex);
            }
            return url;
          }
          static urlRegex() {
            if (_ParsedURL.urlRegexInstance) {
              return _ParsedURL.urlRegexInstance;
            }
            const schemeRegex = /([A-Za-z][A-Za-z0-9+.-]*):\/\//;
            const userRegex = /(?:([A-Za-z0-9\-._~%!$&'()*+,;=:]*)@)?/;
            const hostRegex = /((?:\[::\d?\])|(?:[^\s\/:]*))/;
            const portRegex = /(?::([\d]+))?/;
            const pathRegex = /(\/[^#?]*)?/;
            const queryRegex = /(?:\?([^#]*))?/;
            const fragmentRegex = /(?:#(.*))?/;
            _ParsedURL.urlRegexInstance = new RegExp("^(" + schemeRegex.source + userRegex.source + hostRegex.source + portRegex.source + ")" + pathRegex.source + queryRegex.source + fragmentRegex.source + "$");
            return _ParsedURL.urlRegexInstance;
          }
          static extractPath(url) {
            const parsedURL = this.fromString(url);
            return parsedURL ? parsedURL.path : "";
          }
          static extractOrigin(url) {
            const parsedURL = this.fromString(url);
            return parsedURL ? parsedURL.securityOrigin() : "";
          }
          static extractExtension(url) {
            url = _ParsedURL.urlWithoutHash(url);
            const indexOfQuestionMark = url.indexOf("?");
            if (indexOfQuestionMark !== -1) {
              url = url.substr(0, indexOfQuestionMark);
            }
            const lastIndexOfSlash = url.lastIndexOf("/");
            if (lastIndexOfSlash !== -1) {
              url = url.substr(lastIndexOfSlash + 1);
            }
            const lastIndexOfDot = url.lastIndexOf(".");
            if (lastIndexOfDot !== -1) {
              url = url.substr(lastIndexOfDot + 1);
              const lastIndexOfPercent = url.indexOf("%");
              if (lastIndexOfPercent !== -1) {
                return url.substr(0, lastIndexOfPercent);
              }
              return url;
            }
            return "";
          }
          static extractName(url) {
            let index2 = url.lastIndexOf("/");
            const pathAndQuery = index2 !== -1 ? url.substr(index2 + 1) : url;
            index2 = pathAndQuery.indexOf("?");
            return index2 < 0 ? pathAndQuery : pathAndQuery.substr(0, index2);
          }
          static completeURL(baseURL, href) {
            if (href.startsWith("data:") || href.startsWith("blob:") || href.startsWith("javascript:") || href.startsWith("mailto:")) {
              return href;
            }
            const trimmedHref = href.trim();
            const parsedHref = this.fromString(trimmedHref);
            if (parsedHref?.scheme) {
              const securityOrigin2 = parsedHref.securityOrigin();
              const pathText2 = normalizePath(parsedHref.path);
              const queryText2 = parsedHref.queryParams && `?${parsedHref.queryParams}`;
              const fragmentText = parsedHref.fragment && `#${parsedHref.fragment}`;
              return securityOrigin2 + pathText2 + queryText2 + fragmentText;
            }
            const parsedURL = this.fromString(baseURL);
            if (!parsedURL) {
              return null;
            }
            if (parsedURL.isDataURL()) {
              return href;
            }
            if (href.length > 1 && href.charAt(0) === "/" && href.charAt(1) === "/") {
              return parsedURL.scheme + ":" + href;
            }
            const securityOrigin = parsedURL.securityOrigin();
            const pathText = parsedURL.path;
            const queryText = parsedURL.queryParams ? "?" + parsedURL.queryParams : "";
            if (!href.length) {
              return securityOrigin + pathText + queryText;
            }
            if (href.charAt(0) === "#") {
              return securityOrigin + pathText + queryText + href;
            }
            if (href.charAt(0) === "?") {
              return securityOrigin + pathText + href;
            }
            const hrefMatches = href.match(/^[^#?]*/);
            if (!hrefMatches || !href.length) {
              throw new Error("Invalid href");
            }
            let hrefPath = hrefMatches[0];
            const hrefSuffix = href.substring(hrefPath.length);
            if (hrefPath.charAt(0) !== "/") {
              hrefPath = parsedURL.folderPathComponents + "/" + hrefPath;
            }
            return securityOrigin + normalizePath(hrefPath) + hrefSuffix;
          }
          static splitLineAndColumn(string2) {
            const beforePathMatch = string2.match(_ParsedURL.urlRegex());
            let beforePath = "";
            let pathAndAfter = string2;
            if (beforePathMatch) {
              beforePath = beforePathMatch[1];
              pathAndAfter = string2.substring(beforePathMatch[1].length);
            }
            const lineColumnRegEx = /(?::(\d+))?(?::(\d+))?$/;
            const lineColumnMatch = lineColumnRegEx.exec(pathAndAfter);
            let lineNumber;
            let columnNumber;
            console.assert(Boolean(lineColumnMatch));
            if (!lineColumnMatch) {
              return { url: string2, lineNumber: 0, columnNumber: 0 };
            }
            if (typeof lineColumnMatch[1] === "string") {
              lineNumber = parseInt(lineColumnMatch[1], 10);
              lineNumber = isNaN(lineNumber) ? void 0 : lineNumber - 1;
            }
            if (typeof lineColumnMatch[2] === "string") {
              columnNumber = parseInt(lineColumnMatch[2], 10);
              columnNumber = isNaN(columnNumber) ? void 0 : columnNumber - 1;
            }
            let url = beforePath + pathAndAfter.substring(0, pathAndAfter.length - lineColumnMatch[0].length);
            if (lineColumnMatch[1] === void 0 && lineColumnMatch[2] === void 0) {
              const wasmCodeOffsetRegex = /wasm-function\[\d+\]:0x([a-z0-9]+)$/g;
              const wasmCodeOffsetMatch = wasmCodeOffsetRegex.exec(pathAndAfter);
              if (wasmCodeOffsetMatch && typeof wasmCodeOffsetMatch[1] === "string") {
                url = _ParsedURL.removeWasmFunctionInfoFromURL(url);
                columnNumber = parseInt(wasmCodeOffsetMatch[1], 16);
                columnNumber = isNaN(columnNumber) ? void 0 : columnNumber;
              }
            }
            return { url, lineNumber, columnNumber };
          }
          static removeWasmFunctionInfoFromURL(url) {
            const wasmFunctionRegEx = /:wasm-function\[\d+\]/;
            const wasmFunctionIndex = url.search(wasmFunctionRegEx);
            if (wasmFunctionIndex === -1) {
              return url;
            }
            return _ParsedURL.substring(url, 0, wasmFunctionIndex);
          }
          static beginsWithWindowsDriveLetter(url) {
            return /^[A-Za-z]:/.test(url);
          }
          static beginsWithScheme(url) {
            return /^[A-Za-z][A-Za-z0-9+.-]*:/.test(url);
          }
          static isRelativeURL(url) {
            return !this.beginsWithScheme(url) || this.beginsWithWindowsDriveLetter(url);
          }
          isAboutBlank() {
            return this.url === "about:blank";
          }
          isDataURL() {
            return this.scheme === "data";
          }
          extractDataUrlMimeType() {
            const regexp = /^data:((?<type>\w+)\/(?<subtype>\w+))?(;base64)?,/;
            const match = this.url.match(regexp);
            return {
              type: match?.groups?.type,
              subtype: match?.groups?.subtype
            };
          }
          isBlobURL() {
            return this.url.startsWith("blob:");
          }
          lastPathComponentWithFragment() {
            return this.lastPathComponent + (this.fragment ? "#" + this.fragment : "");
          }
          domain() {
            if (this.isDataURL()) {
              return "data:";
            }
            return this.host + (this.port ? ":" + this.port : "");
          }
          securityOrigin() {
            if (this.isDataURL()) {
              return "data:";
            }
            const scheme = this.isBlobURL() ? this.blobInnerScheme : this.scheme;
            return scheme + "://" + this.domain();
          }
          urlWithoutScheme() {
            if (this.scheme && this.url.startsWith(this.scheme + "://")) {
              return this.url.substring(this.scheme.length + 3);
            }
            return this.url;
          }
          static urlRegexInstance = null;
        };
      }
    });
    RenderBlocking_exports = {};
    __export2(RenderBlocking_exports, {
      UIStrings: () => UIStrings16,
      createOverlayForRequest: () => createOverlayForRequest4,
      createOverlays: () => createOverlays15,
      generateInsight: () => generateInsight15,
      i18nString: () => i18nString15,
      isRenderBlockingInsight: () => isRenderBlockingInsight
    });
    init_RenderBlocking = __esm2({
      "node_modules/@paulirish/trace_engine/models/trace/insights/RenderBlocking.js"() {
        init_process_global();
        init_handlers();
        init_helpers2();
        init_types4();
        UIStrings16 = {
          /**
           * @description Title of an insight that provides the user with the list of network requests that blocked and therefore slowed down the page rendering and becoming visible to the user.
           */
          title: "Render blocking requests",
          /**
           * @description Text to describe that there are requests blocking rendering, which may affect LCP.
           */
          description: "Requests are blocking the page's initial render, which may delay LCP. [Deferring or inlining](https://developer.chrome.com/docs/performance/insights/render-blocking) can move these network requests out of the critical path.",
          /**
           * @description Label to describe a network request (that happens to be render-blocking).
           */
          renderBlockingRequest: "Request",
          /**
           * @description Label used for a time duration.
           */
          duration: "Duration",
          /**
           * @description Text status indicating that no requests blocked the initial render of a navigation
           */
          noRenderBlocking: "No render blocking requests for this navigation"
        };
        i18nString15 = /* @__PURE__ */ __name((i18nId, values) => ({ i18nId, values }), "i18nString");
        __name(isRenderBlockingInsight, "isRenderBlockingInsight");
        MINIMUM_WASTED_MS = 50;
        __name(getNodesAndTimingByRequestId, "getNodesAndTimingByRequestId");
        __name(estimateSavingsWithGraphs2, "estimateSavingsWithGraphs");
        __name(hasImageLCP, "hasImageLCP");
        __name(computeSavings, "computeSavings");
        __name(finalize45, "finalize");
        __name(generateInsight15, "generateInsight");
        __name(createOverlayForRequest4, "createOverlayForRequest");
        __name(createOverlays15, "createOverlays");
      }
    });
    SlowCSSSelector_exports = {};
    __export2(SlowCSSSelector_exports, {
      UIStrings: () => UIStrings17,
      createOverlays: () => createOverlays16,
      generateInsight: () => generateInsight16,
      i18nString: () => i18nString16,
      isSlowCSSSelectorInsight: () => isSlowCSSSelectorInsight
    });
    init_SlowCSSSelector = __esm2({
      "node_modules/@paulirish/trace_engine/models/trace/insights/SlowCSSSelector.js"() {
        init_process_global();
        init_helpers2();
        init_TraceEvents();
        init_types2();
        init_types4();
        UIStrings17 = {
          /**
           * @description Title of an insight that provides details about slow CSS selectors.
           */
          title: "CSS Selector costs",
          /**
           * @description Text to describe how to improve the performance of CSS selectors.
           */
          description: "If Recalculate Style costs remain high, selector optimization can reduce them. [Optimize the selectors](https://developer.chrome.com/docs/performance/insights/slow-css-selector) with both high elapsed time and high slow-path %. Simpler selectors, fewer selectors, a smaller DOM, and a shallower DOM will all reduce matching costs.",
          /**
           * @description Column name for count of elements that the engine attempted to match against a style rule
           */
          matchAttempts: "Match attempts",
          /**
           * @description Column name for count of elements that matched a style rule
           */
          matchCount: "Match count",
          /**
           * @description Column name for elapsed time spent computing a style rule
           */
          elapsed: "Elapsed time",
          /**
           * @description Column name for the selectors that took the longest amount of time/effort.
           */
          topSelectors: "Top selectors",
          /**
           * @description Column name for a total sum.
           */
          total: "Total",
          /**
           * @description Text status indicating that no CSS selector data was found.
           */
          enableSelectorData: "No CSS selector data was found. CSS selector stats need to be enabled in the performance panel settings.",
          /**
           * @description top CSS selector when ranked by elapsed time in ms
           */
          topSelectorElapsedTime: "Top selector elapsed time",
          /**
           * @description top CSS selector when ranked by match attempt
           */
          topSelectorMatchAttempt: "Top selector match attempt"
        };
        i18nString16 = /* @__PURE__ */ __name((i18nId, values) => ({ i18nId, values }), "i18nString");
        slowCSSSelectorThreshold = 500;
        __name(aggregateSelectorStats, "aggregateSelectorStats");
        __name(finalize46, "finalize");
        __name(isSlowCSSSelectorInsight, "isSlowCSSSelectorInsight");
        __name(generateInsight16, "generateInsight");
        __name(createOverlays16, "createOverlays");
      }
    });
    ThirdParties_exports2 = {};
    __export2(ThirdParties_exports2, {
      UIStrings: () => UIStrings18,
      createOverlays: () => createOverlays17,
      createOverlaysForSummary: () => createOverlaysForSummary,
      generateInsight: () => generateInsight17,
      i18nString: () => i18nString17,
      isThirdPartyInsight: () => isThirdPartyInsight
    });
    init_ThirdParties2 = __esm2({
      "node_modules/@paulirish/trace_engine/models/trace/insights/ThirdParties.js"() {
        init_process_global();
        init_third_party_web();
        init_extras();
        init_handlers();
        init_types4();
        UIStrings18 = {
          /** Title of an insight that provides details about the code on a web page that the user doesn't control (referred to as "third-party code"). */
          title: "3rd parties",
          /**
           * @description Description of a DevTools insight that identifies the code on the page that the user doesn't control.
           * This is displayed after a user expands the section to see more. No character length limits.
           */
          description: "3rd party code can significantly impact load performance. [Reduce and defer loading of 3rd party code](https://developer.chrome.com/docs/performance/insights/third-parties) to prioritize your page's content.",
          /** Label for a table column that displays the name of a third-party provider. */
          columnThirdParty: "3rd party",
          /** Label for a column in a data table; entries will be the download size of a web resource in kilobytes. */
          columnTransferSize: "Transfer size",
          /** Label for a table column that displays how much time each row spent running on the main thread, entries will be the number of milliseconds spent. */
          columnMainThreadTime: "Main thread time",
          /**
           * @description Text block indicating that no third party content was detected on the page
           */
          noThirdParties: "No third parties found"
        };
        i18nString17 = /* @__PURE__ */ __name((i18nId, values) => ({ i18nId, values }), "i18nString");
        __name(getRelatedEvents, "getRelatedEvents");
        __name(finalize47, "finalize");
        __name(isThirdPartyInsight, "isThirdPartyInsight");
        __name(generateInsight17, "generateInsight");
        __name(createOverlaysForSummary, "createOverlaysForSummary");
        __name(createOverlays17, "createOverlays");
      }
    });
    Viewport_exports = {};
    __export2(Viewport_exports, {
      UIStrings: () => UIStrings19,
      createOverlays: () => createOverlays18,
      generateInsight: () => generateInsight18,
      i18nString: () => i18nString18,
      isViewportInsight: () => isViewportInsight
    });
    init_Viewport = __esm2({
      "node_modules/@paulirish/trace_engine/models/trace/insights/Viewport.js"() {
        init_process_global();
        init_platform();
        init_handlers();
        init_helpers2();
        init_types2();
        init_types4();
        UIStrings19 = {
          /** Title of an insight that provides details about if the page's viewport is optimized for mobile viewing. */
          title: "Optimize viewport for mobile",
          /**
           * @description Text to tell the user how a viewport meta element can improve performance. \xa0 is a non-breaking space
           */
          description: "Tap interactions may be [delayed by up to 300\xA0ms](https://developer.chrome.com/docs/performance/insights/viewport) if the viewport is not optimized for mobile.",
          /**
           * @description Text for a label describing the portion of an interaction event that was delayed due to a bad mobile viewport.
           */
          mobileTapDelayLabel: "Mobile tap delay"
        };
        i18nString18 = /* @__PURE__ */ __name((i18nId, values) => ({ i18nId, values }), "i18nString");
        __name(finalize48, "finalize");
        __name(isViewportInsight, "isViewportInsight");
        __name(generateInsight18, "generateInsight");
        __name(createOverlays18, "createOverlays");
      }
    });
    Models_exports = {};
    __export2(Models_exports, {
      CLSCulprits: () => CLSCulprits_exports,
      Cache: () => Cache_exports,
      DOMSize: () => DOMSize_exports,
      DocumentLatency: () => DocumentLatency_exports,
      DuplicatedJavaScript: () => DuplicatedJavaScript_exports,
      FontDisplay: () => FontDisplay_exports,
      ForcedReflow: () => ForcedReflow_exports,
      INPBreakdown: () => INPBreakdown_exports,
      ImageDelivery: () => ImageDelivery_exports,
      LCPBreakdown: () => LCPBreakdown_exports,
      LCPDiscovery: () => LCPDiscovery_exports,
      LegacyJavaScript: () => LegacyJavaScript_exports,
      ModernHTTP: () => ModernHTTP_exports,
      NetworkDependencyTree: () => NetworkDependencyTree_exports,
      RenderBlocking: () => RenderBlocking_exports,
      SlowCSSSelector: () => SlowCSSSelector_exports,
      ThirdParties: () => ThirdParties_exports2,
      Viewport: () => Viewport_exports
    });
    init_Models = __esm2({
      "node_modules/@paulirish/trace_engine/models/trace/insights/Models.js"() {
        init_process_global();
        init_Cache();
        init_CLSCulprits();
        init_DocumentLatency();
        init_DOMSize();
        init_DuplicatedJavaScript();
        init_FontDisplay();
        init_ForcedReflow();
        init_ImageDelivery();
        init_INPBreakdown();
        init_LCPBreakdown();
        init_LCPDiscovery();
        init_LegacyJavaScript();
        init_ModernHTTP();
        init_NetworkDependencyTree();
        init_RenderBlocking();
        init_SlowCSSSelector();
        init_ThirdParties2();
        init_Viewport();
      }
    });
    init_insights = __esm2({
      "node_modules/@paulirish/trace_engine/models/trace/insights/insights.js"() {
        init_process_global();
        init_Cache();
        init_Common();
        init_Models();
        init_ModernHTTP();
        init_Statistics();
        init_types4();
      }
    });
    init_LanternComputationData = __esm2({
      "node_modules/@paulirish/trace_engine/models/trace/LanternComputationData.js"() {
        init_process_global();
        init_handlers();
        init_lantern();
        __name(createProcessedNavigation, "createProcessedNavigation");
        __name(createParsedUrl, "createParsedUrl");
        __name(findWorkerThreads, "findWorkerThreads");
        __name(createLanternRequest, "createLanternRequest");
        __name(chooseInitiatorRequest, "chooseInitiatorRequest");
        __name(linkInitiators, "linkInitiators");
        __name(createNetworkRequests, "createNetworkRequests");
        __name(collectMainThreadEvents, "collectMainThreadEvents");
        __name(createGraph, "createGraph");
      }
    });
    init_Processor = __esm2({
      "node_modules/@paulirish/trace_engine/models/trace/Processor.js"() {
        init_process_global();
        init_handlers();
        init_helpers2();
        init_insights();
        init_lantern();
        init_LanternComputationData();
        init_types2();
        TraceParseProgressEvent = class _TraceParseProgressEvent extends Event {
          static {
            __name(this, "TraceParseProgressEvent");
          }
          data;
          static eventName = "traceparseprogress";
          constructor(data312, init2 = { bubbles: true }) {
            super(_TraceParseProgressEvent.eventName, init2);
            this.data = data312;
          }
        };
        __name(calculateProgress, "calculateProgress");
        TraceProcessor = class extends EventTarget {
          static {
            __name(this, "TraceProcessor");
          }
          // We force the Meta handler to be enabled, so the TraceHandlers type here is
          // the model handlers the user passes in and the Meta handler.
          #traceHandlers;
          #status = "IDLE";
          #modelConfiguration = Configuration_exports.defaults();
          #data = null;
          #insights = null;
          static createWithAllHandlers() {
            return new _a2(ModelHandlers_exports, Configuration_exports.defaults());
          }
          /**
           * This function is kept for testing with `stub`.
           */
          static getInsightRunners() {
            return { ...Models_exports };
          }
          constructor(traceHandlers, modelConfiguration) {
            super();
            this.#verifyHandlers(traceHandlers);
            this.#traceHandlers = {
              Meta: ModelHandlers_exports.Meta,
              ...traceHandlers
            };
            if (modelConfiguration) {
              this.#modelConfiguration = modelConfiguration;
            }
            this.#passConfigToHandlers();
          }
          #passConfigToHandlers() {
            for (const handler of Object.values(this.#traceHandlers)) {
              if ("handleUserConfig" in handler && handler.handleUserConfig) {
                handler.handleUserConfig(this.#modelConfiguration);
              }
            }
          }
          /**
           * When the user passes in a set of handlers, we want to ensure that we have all
           * the required handlers. Handlers can depend on other handlers, so if the user
           * passes in FooHandler which depends on BarHandler, they must also pass in
           * BarHandler too. This method verifies that all dependencies are met, and
           * throws if not.
           **/
          #verifyHandlers(providedHandlers) {
            if (Object.keys(providedHandlers).length === Object.keys(ModelHandlers_exports).length) {
              return;
            }
            const requiredHandlerKeys = /* @__PURE__ */ new Set();
            for (const [handlerName, handler] of Object.entries(providedHandlers)) {
              requiredHandlerKeys.add(handlerName);
              const deps172 = "deps" in handler ? handler.deps() : [];
              for (const depName of deps172) {
                requiredHandlerKeys.add(depName);
              }
            }
            const providedHandlerKeys = new Set(Object.keys(providedHandlers));
            requiredHandlerKeys.delete("Meta");
            for (const requiredKey of requiredHandlerKeys) {
              if (!providedHandlerKeys.has(requiredKey)) {
                throw new Error(`Required handler ${requiredKey} not provided.`);
              }
            }
          }
          reset() {
            if (this.#status === "PARSING") {
              throw new Error("Trace processor can't reset while parsing.");
            }
            const handlers2 = Object.values(this.#traceHandlers);
            for (const handler of handlers2) {
              handler.reset();
            }
            this.#data = null;
            this.#insights = null;
            this.#status = "IDLE";
          }
          async parse(traceEvents, options2) {
            if (this.#status !== "IDLE") {
              throw new Error(`Trace processor can't start parsing when not idle. Current state: ${this.#status}`);
            }
            if (typeof options2.isCPUProfile === "undefined" && options2.metadata) {
              options2.isCPUProfile = options2.metadata.dataOrigin === File_exports.DataOrigin.CPU_PROFILE;
            }
            options2.logger?.start("total");
            try {
              this.#status = "PARSING";
              options2.logger?.start("parse");
              await this.#computeParsedTrace(traceEvents, options2);
              options2.logger?.end("parse");
              if (this.#data && !options2.isCPUProfile) {
                options2.logger?.start("insights");
                this.#computeInsights(this.#data, traceEvents, options2);
                options2.logger?.end("insights");
              }
              this.#status = "FINISHED_PARSING";
            } catch (e) {
              this.#status = "ERRORED_WHILE_PARSING";
              throw e;
            } finally {
              options2.logger?.end("total");
            }
          }
          /**
           * Run all the handlers and set the result to `#data`.
           */
          async #computeParsedTrace(traceEvents, options2) {
            const eventsPerChunk = 5e4;
            const sortedHandlers = [...sortHandlers(this.#traceHandlers).entries()];
            for (const [, handler] of sortedHandlers) {
              handler.reset();
            }
            options2.logger?.start("parse:handleEvent");
            for (let i = 0; i < traceEvents.length; ++i) {
              if (i % eventsPerChunk === 0 && i) {
                const percent = calculateProgress(
                  i / traceEvents.length,
                  0.2
                  /* ProgressPhase.HANDLE_EVENT */
                );
                this.dispatchEvent(new TraceParseProgressEvent({ percent }));
                await new Promise((resolve2) => setTimeout(resolve2, 0));
              }
              const event = traceEvents[i];
              for (let j = 0; j < sortedHandlers.length; ++j) {
                const [, handler] = sortedHandlers[j];
                handler.handleEvent(event);
              }
            }
            options2.logger?.end("parse:handleEvent");
            const finalizeOptions = {
              ...options2,
              allTraceEvents: traceEvents
            };
            for (let i = 0; i < sortedHandlers.length; i++) {
              const [name, handler] = sortedHandlers[i];
              if (handler.finalize) {
                options2.logger?.start(`parse:${name}:finalize`);
                await new Promise((resolve2) => setTimeout(resolve2, 0));
                await handler.finalize(finalizeOptions);
                options2.logger?.end(`parse:${name}:finalize`);
              }
              const percent = calculateProgress(
                i / sortedHandlers.length,
                0.8
                /* ProgressPhase.FINALIZE */
              );
              this.dispatchEvent(new TraceParseProgressEvent({ percent }));
            }
            options2.logger?.start("parse:handler.data()");
            const parsedTrace = {};
            for (const [name, handler] of Object.entries(this.#traceHandlers)) {
              Object.assign(parsedTrace, { [name]: handler.data() });
            }
            options2.logger?.end("parse:handler.data()");
            this.dispatchEvent(new TraceParseProgressEvent({
              percent: 1
              /* ProgressPhase.CLONE */
            }));
            this.#data = parsedTrace;
          }
          get data() {
            if (this.#status !== "FINISHED_PARSING") {
              return null;
            }
            return this.#data;
          }
          get insights() {
            if (this.#status !== "FINISHED_PARSING") {
              return null;
            }
            return this.#insights;
          }
          #createLanternContext(data312, traceEvents, frameId, navigationId, options2) {
            if (!data312.NetworkRequests || !data312.Workers || !data312.PageLoadMetrics) {
              return;
            }
            if (!data312.NetworkRequests.byTime.length) {
              throw new core_exports.LanternError("No network requests found in trace");
            }
            const navStarts = data312.Meta.navigationsByFrameId.get(frameId);
            const navStartIndex = navStarts?.findIndex((n) => n.args.data?.navigationId === navigationId);
            if (!navStarts || navStartIndex === void 0 || navStartIndex === -1) {
              throw new core_exports.LanternError("Could not find navigation start");
            }
            const startTime = navStarts[navStartIndex].ts;
            const endTime = navStartIndex + 1 < navStarts.length ? navStarts[navStartIndex + 1].ts : Number.POSITIVE_INFINITY;
            const boundedTraceEvents = traceEvents.filter((e) => e.ts >= startTime && e.ts < endTime);
            const trace2 = {
              traceEvents: boundedTraceEvents
            };
            const requests = createNetworkRequests(trace2, data312, startTime, endTime);
            const graph22 = createGraph(requests, trace2, data312);
            const processedNavigation = createProcessedNavigation(data312, frameId, navigationId);
            const networkAnalysis = core_exports.NetworkAnalyzer.analyze(requests);
            if (!networkAnalysis) {
              return;
            }
            const lanternSettings = {
              // TODO(crbug.com/372674229): if devtools throttling was on, does this network analysis capture
              // that? Do we need to set 'devtools' throttlingMethod?
              networkAnalysis,
              throttlingMethod: "provided",
              ...options2.lanternSettings
            };
            const simulator = simulation_exports.Simulator.createSimulator(lanternSettings);
            const computeData = { graph: graph22, simulator, processedNavigation };
            const fcpResult = metrics_exports.FirstContentfulPaint.compute(computeData);
            const lcpResult = metrics_exports.LargestContentfulPaint.compute(computeData, { fcpResult });
            const interactiveResult = metrics_exports.Interactive.compute(computeData, { lcpResult });
            const tbtResult = metrics_exports.TotalBlockingTime.compute(computeData, { fcpResult, interactiveResult });
            const metrics2 = {
              firstContentfulPaint: fcpResult,
              interactive: interactiveResult,
              largestContentfulPaint: lcpResult,
              totalBlockingTime: tbtResult
            };
            return { requests, graph: graph22, simulator, metrics: metrics2 };
          }
          /**
           * Sort the insight models based on the impact of each insight's estimated savings, additionally weighted by the
           * worst metrics according to field data (if present).
           */
          sortInsightSet(insightSet, metadata2) {
            const baselineOrder = {
              INPBreakdown: null,
              LCPBreakdown: null,
              LCPDiscovery: null,
              CLSCulprits: null,
              RenderBlocking: null,
              NetworkDependencyTree: null,
              ImageDelivery: null,
              DocumentLatency: null,
              FontDisplay: null,
              Viewport: null,
              DOMSize: null,
              ThirdParties: null,
              DuplicatedJavaScript: null,
              SlowCSSSelector: null,
              ForcedReflow: null,
              Cache: null,
              ModernHTTP: null,
              LegacyJavaScript: null
            };
            const weights = Common_exports.calculateMetricWeightsForSorting(insightSet, metadata2);
            const observedLcpMicro = Common_exports.getLCP(insightSet)?.value;
            const observedLcp = observedLcpMicro ? Timing_exports3.microToMilli(observedLcpMicro) : Timing_exports.Milli(0);
            const observedCls = Common_exports.getCLS(insightSet).value;
            const observedInpMicro = Common_exports.getINP(insightSet)?.value;
            const observedInp = observedInpMicro ? Timing_exports3.microToMilli(observedInpMicro) : Timing_exports.Milli(200);
            const observedLcpScore = observedLcp !== void 0 ? Common_exports.evaluateLCPMetricScore(observedLcp) : void 0;
            const observedInpScore = Common_exports.evaluateINPMetricScore(observedInp);
            const observedClsScore = Common_exports.evaluateCLSMetricScore(observedCls);
            const insightToSortingRank = /* @__PURE__ */ new Map();
            for (const [name, model22] of Object.entries(insightSet.model)) {
              const lcp = model22.metricSavings?.LCP ?? 0;
              const inp = model22.metricSavings?.INP ?? 0;
              const cls = model22.metricSavings?.CLS ?? 0;
              const lcpPostSavings = observedLcp !== void 0 ? Math.max(0, observedLcp - lcp) : void 0;
              const inpPostSavings = Math.max(0, observedInp - inp);
              const clsPostSavings = Math.max(0, observedCls - cls);
              let score = 0;
              if (weights.lcp && lcp && observedLcpScore !== void 0 && lcpPostSavings !== void 0) {
                score += weights.lcp * (Common_exports.evaluateLCPMetricScore(lcpPostSavings) - observedLcpScore);
              }
              if (weights.inp && inp && observedInpScore !== void 0) {
                score += weights.inp * (Common_exports.evaluateINPMetricScore(inpPostSavings) - observedInpScore);
              }
              if (weights.cls && cls && observedClsScore !== void 0) {
                score += weights.cls * (Common_exports.evaluateCLSMetricScore(clsPostSavings) - observedClsScore);
              }
              insightToSortingRank.set(name, score);
            }
            const baselineOrderKeys = Object.keys(baselineOrder);
            const orderedKeys = Object.keys(insightSet.model);
            orderedKeys.sort((a, b) => {
              const a1 = baselineOrderKeys.indexOf(a);
              const b1 = baselineOrderKeys.indexOf(b);
              if (a1 >= 0 && b1 >= 0) {
                return a1 - b1;
              }
              if (a1 >= 0) {
                return -1;
              }
              if (b1 >= 0) {
                return 1;
              }
              return 0;
            });
            orderedKeys.sort((a, b) => (insightToSortingRank.get(b) ?? 0) - (insightToSortingRank.get(a) ?? 0));
            const newModel = {};
            for (const key of orderedKeys) {
              const model22 = insightSet.model[key];
              newModel[key] = model22;
            }
            insightSet.model = newModel;
          }
          #computeInsightSet(data312, context2) {
            const logger2 = context2.options.logger;
            let id2, urlString, navigation2;
            if (context2.navigation) {
              id2 = context2.navigationId;
              urlString = data312.Meta.finalDisplayUrlByNavigationId.get(context2.navigationId) ?? data312.Meta.mainFrameURL;
              navigation2 = context2.navigation;
            } else {
              id2 = TraceEvents_exports.NO_NAVIGATION;
              urlString = data312.Meta.finalDisplayUrlByNavigationId.get("") ?? data312.Meta.mainFrameURL;
            }
            const insightSetModel = {};
            for (const [name, insight] of Object.entries(_a2.getInsightRunners())) {
              let model22;
              try {
                logger2?.start(`insights:${name}`);
                model22 = insight.generateInsight(data312, context2);
                model22.frameId = context2.frameId;
                const navId = context2.navigation?.args.data?.navigationId;
                if (navId) {
                  model22.navigationId = navId;
                }
                model22.createOverlays = () => {
                  return insight.createOverlays(model22);
                };
              } catch (err) {
                model22 = err;
              } finally {
                logger2?.end(`insights:${name}`);
              }
              Object.assign(insightSetModel, { [name]: model22 });
            }
            const isNavigation = id2 === TraceEvents_exports.NO_NAVIGATION;
            const trivialThreshold = Timing_exports3.milliToMicro(Timing_exports.Milli(5e3));
            const everyInsightPasses = Object.values(insightSetModel).filter((model22) => !(model22 instanceof Error)).every((model22) => model22.state === "pass");
            const noLcp = !insightSetModel.LCPBreakdown.lcpEvent;
            const noInp = !insightSetModel.INPBreakdown.longestInteractionEvent;
            const noLayoutShifts = insightSetModel.CLSCulprits.shifts?.size === 0;
            const shouldExclude = isNavigation && context2.bounds.range < trivialThreshold && everyInsightPasses && noLcp && noInp && noLayoutShifts;
            if (shouldExclude) {
              return;
            }
            let url;
            try {
              url = new URL(urlString);
            } catch {
              return;
            }
            const insightSet = {
              id: id2,
              url,
              navigation: navigation2,
              frameId: context2.frameId,
              bounds: context2.bounds,
              model: insightSetModel
            };
            if (!this.#insights) {
              this.#insights = /* @__PURE__ */ new Map();
            }
            this.#insights.set(insightSet.id, insightSet);
            this.sortInsightSet(insightSet, context2.options.metadata ?? null);
          }
          /**
           * Run all the insights and set the result to `#insights`.
           */
          #computeInsights(data312, traceEvents, options2) {
            this.#insights = /* @__PURE__ */ new Map();
            const navigations = data312.Meta.mainFrameNavigations.filter((navigation2) => navigation2.args.frame && navigation2.args.data?.navigationId);
            this.#computeInsightsForInitialTracePeriod(data312, navigations, options2);
            for (const [index2, navigation2] of navigations.entries()) {
              const min = navigation2.ts;
              const max = index2 + 1 < navigations.length ? navigations[index2 + 1].ts : data312.Meta.traceBounds.max;
              const bounds = Timing_exports3.traceWindowFromMicroSeconds(min, max);
              this.#computeInsightsForNavigation(navigation2, bounds, data312, traceEvents, options2);
            }
          }
          /**
           * Computes insights for the period before the first navigation, or for the entire trace if no navigations exist.
           */
          #computeInsightsForInitialTracePeriod(data312, navigations, options2) {
            const bounds = navigations.length > 0 ? Timing_exports3.traceWindowFromMicroSeconds(data312.Meta.traceBounds.min, navigations[0].ts) : data312.Meta.traceBounds;
            const context2 = {
              options: options2,
              bounds,
              frameId: data312.Meta.mainFrameId
              // No navigation or lantern context applies to this initial/no-navigation period.
            };
            this.#computeInsightSet(data312, context2);
          }
          /**
           * Computes insights for a specific navigation event.
           */
          #computeInsightsForNavigation(navigation2, bounds, data312, traceEvents, options2) {
            const frameId = navigation2.args.frame;
            const navigationId = navigation2.args.data?.navigationId;
            let lantern2;
            try {
              options2.logger?.start("insights:createLanternContext");
              lantern2 = this.#createLanternContext(data312, traceEvents, frameId, navigationId, options2);
            } catch (e) {
              const expectedErrors = [
                "mainDocumentRequest not found",
                "missing metric scores for main frame",
                "missing metric: FCP",
                "missing metric: LCP",
                "No network requests found in trace",
                "Trace is too old"
              ];
              if (!(e instanceof core_exports.LanternError)) {
                console.error(e);
              } else if (!expectedErrors.some((err) => e.message === err)) {
                console.error(e);
              }
            } finally {
              options2.logger?.end("insights:createLanternContext");
            }
            const context2 = {
              options: options2,
              bounds,
              frameId,
              navigation: navigation2,
              navigationId,
              lantern: lantern2
            };
            this.#computeInsightSet(data312, context2);
          }
        };
        _a2 = TraceProcessor;
        __name(sortHandlers, "sortHandlers");
      }
    });
    init_ModelImpl = __esm2({
      "node_modules/@paulirish/trace_engine/models/trace/ModelImpl.js"() {
        init_process_global();
        init_platform();
        init_handlers();
        init_helpers2();
        init_Processor();
        init_types2();
      }
    });
    init_common = __esm2({
      "node_modules/@paulirish/trace_engine/core/common/common.js"() {
        init_process_global();
      }
    });
    init_Styles = __esm2({
      "node_modules/@paulirish/trace_engine/models/trace/Styles.js"() {
        init_process_global();
        init_handlers();
        init_helpers2();
        init_types2();
        (function(EventCategory22) {
          EventCategory22["DRAWING"] = "drawing";
          EventCategory22["RASTERIZING"] = "rasterizing";
          EventCategory22["LAYOUT"] = "layout";
          EventCategory22["LOADING"] = "loading";
          EventCategory22["EXPERIENCE"] = "experience";
          EventCategory22["SCRIPTING"] = "scripting";
          EventCategory22["MESSAGING"] = "messaging";
          EventCategory22["RENDERING"] = "rendering";
          EventCategory22["PAINTING"] = "painting";
          EventCategory22["GPU"] = "gpu";
          EventCategory22["ASYNC"] = "async";
          EventCategory22["OTHER"] = "other";
          EventCategory22["IDLE"] = "idle";
        })(EventCategory || (EventCategory = {}));
      }
    });
    init_Name = __esm2({
      "node_modules/@paulirish/trace_engine/models/trace/Name.js"() {
        init_process_global();
        init_common();
        init_handlers();
        init_Styles();
        init_types2();
      }
    });
    init_trace2 = __esm2({
      "node_modules/@paulirish/trace_engine/models/trace/trace.js"() {
        init_process_global();
        init_EntityMapper();
        init_EventsSerializer();
        init_extras();
        init_handlers();
        init_helpers2();
        init_insights();
        init_lantern();
        init_LanternComputationData();
        init_ModelImpl();
        init_Name();
        init_Processor();
        init_Styles();
        init_types2();
      }
    });
    init_lantern2 = __esm2({
      "core/lib/lantern/lantern.js"() {
        "use strict";
        init_process_global();
        init_lantern();
        init_trace2();
      }
    });
    init_trace_processor = __esm2({
      "core/lib/tracehouse/trace-processor.js"() {
        "use strict";
        init_process_global();
        init_lighthouse_logger();
        ACCEPTABLE_NAVIGATION_URL_REGEX = /^(chrome|https?):/;
        BASE_RESPONSE_LATENCY = 16;
        SCHEDULABLE_TASK_TITLE_LH2 = "RunTask";
        SCHEDULABLE_TASK_TITLE_ALT12 = "ThreadControllerImpl::RunTask";
        SCHEDULABLE_TASK_TITLE_ALT22 = "ThreadControllerImpl::DoWork";
        SCHEDULABLE_TASK_TITLE_ALT32 = "TaskQueueManager::ProcessTaskFromWorkQueue";
        TraceProcessor2 = class _TraceProcessor {
          static {
            __name(this, "TraceProcessor");
          }
          static get TIMESPAN_MARKER_ID() {
            return "__lighthouseTimespanStart__";
          }
          /**
           * @return {Error}
           */
          static createNoNavstartError() {
            return new Error("No navigationStart event found");
          }
          /**
           * @return {Error}
           */
          static createNoResourceSendRequestError() {
            return new Error("No ResourceSendRequest event found");
          }
          /**
           * @return {Error}
           */
          static createNoTracingStartedError() {
            return new Error("No tracingStartedInBrowser event found");
          }
          /**
           * @return {Error}
           */
          static createNoFirstContentfulPaintError() {
            return new Error("No FirstContentfulPaint event found");
          }
          /**
           * @return {Error}
           */
          static createNoLighthouseMarkerError() {
            return new Error("No Lighthouse timespan marker event found");
          }
          /**
           * Returns true if the event is a navigation start event of a document whose URL seems valid.
           *
           * @param {LH.TraceEvent} event
           * @return {boolean}
           */
          static _isNavigationStartOfInterest(event) {
            if (event.name !== "navigationStart")
              return false;
            if (event.args.data?.documentLoaderURL === void 0)
              return true;
            if (!event.args.data?.documentLoaderURL)
              return false;
            return ACCEPTABLE_NAVIGATION_URL_REGEX.test(event.args.data.documentLoaderURL);
          }
          /**
           * This method sorts a group of trace events that have the same timestamp. We want to...
           *
           * 1. Put E events first, we finish off our existing events before we start new ones.
           * 2. Order B/X events by their duration, we want parents to start before child events.
           * 3. If we don't have any of this to go on, just use the position in the original array (stable sort).
           *
           * Note that the typical group size with the same timestamp will be quite small (<10 or so events),
           * and the number of groups typically ~1% of total trace, so the same ultra-performance-sensitive consideration
           * given to functions that run on entire traces does not necessarily apply here.
           *
           * @param {number[]} tsGroupIndices
           * @param {number[]} timestampSortedIndices
           * @param {number} indexOfTsGroupIndicesStart
           * @param {LH.TraceEvent[]} traceEvents
           * @return {number[]}
           */
          static _sortTimestampEventGroup(tsGroupIndices, timestampSortedIndices, indexOfTsGroupIndicesStart, traceEvents) {
            const lookupArrayIndexByTsIndex = /* @__PURE__ */ __name((i) => timestampSortedIndices[i], "lookupArrayIndexByTsIndex");
            const lookupEventByTsIndex = /* @__PURE__ */ __name((i) => traceEvents[lookupArrayIndexByTsIndex(i)], "lookupEventByTsIndex");
            const eEventIndices = [];
            const bxEventIndices = [];
            const otherEventIndices = [];
            for (const tsIndex of tsGroupIndices) {
              const arrayIndex = lookupArrayIndexByTsIndex(tsIndex);
              const event = lookupEventByTsIndex(tsIndex);
              if (event.ph === "E")
                eEventIndices.push(arrayIndex);
              else if (event.ph === "X" || event.ph === "B")
                bxEventIndices.push(arrayIndex);
              else
                otherEventIndices.push(arrayIndex);
            }
            const effectiveDuration = /* @__PURE__ */ new Map();
            for (const index2 of bxEventIndices) {
              const event = traceEvents[index2];
              if (event.ph === "X") {
                effectiveDuration.set(index2, event.dur);
              } else {
                let duration2 = Number.MAX_SAFE_INTEGER;
                let additionalNestedEventsWithSameName = 0;
                const startIndex = indexOfTsGroupIndicesStart + tsGroupIndices.length;
                for (let j = startIndex; j < timestampSortedIndices.length; j++) {
                  const potentialMatchingEvent = lookupEventByTsIndex(j);
                  const eventMatches = potentialMatchingEvent.name === event.name && potentialMatchingEvent.pid === event.pid && potentialMatchingEvent.tid === event.tid;
                  if (!eventMatches)
                    continue;
                  if (potentialMatchingEvent.ph === "E" && additionalNestedEventsWithSameName === 0) {
                    duration2 = potentialMatchingEvent.ts - event.ts;
                    break;
                  } else if (potentialMatchingEvent.ph === "E") {
                    additionalNestedEventsWithSameName--;
                  } else if (potentialMatchingEvent.ph === "B") {
                    additionalNestedEventsWithSameName++;
                  }
                }
                effectiveDuration.set(index2, duration2);
              }
            }
            bxEventIndices.sort((indexA, indexB) => (effectiveDuration.get(indexB) || 0) - (effectiveDuration.get(indexA) || 0) || indexA - indexB);
            otherEventIndices.sort((indexA, indexB) => indexA - indexB);
            return [...eEventIndices, ...bxEventIndices, ...otherEventIndices];
          }
          /**
           * Sorts and filters trace events by timestamp and respecting the nesting structure inherent to
           * parent/child event relationships.
           *
           * @param {LH.TraceEvent[]} traceEvents
           * @param {(e: LH.TraceEvent) => boolean} filter
           */
          static filteredTraceSort(traceEvents, filter2) {
            const indices = [];
            for (let srcIndex = 0; srcIndex < traceEvents.length; srcIndex++) {
              if (filter2(traceEvents[srcIndex])) {
                indices.push(srcIndex);
              }
            }
            indices.sort((indexA, indexB) => traceEvents[indexA].ts - traceEvents[indexB].ts);
            for (let i = 0; i < indices.length - 1; i++) {
              const ts = traceEvents[indices[i]].ts;
              const tsGroupIndices = [i];
              for (let j = i + 1; j < indices.length; j++) {
                if (traceEvents[indices[j]].ts !== ts)
                  break;
                tsGroupIndices.push(j);
              }
              if (tsGroupIndices.length === 1)
                continue;
              const finalIndexOrder = _TraceProcessor._sortTimestampEventGroup(tsGroupIndices, indices, i, traceEvents);
              indices.splice(i, finalIndexOrder.length, ...finalIndexOrder);
              i += tsGroupIndices.length - 1;
            }
            const sorted22 = [];
            for (let i = 0; i < indices.length; i++) {
              sorted22.push(traceEvents[indices[i]]);
            }
            return sorted22;
          }
          /**
           * There should *always* be at least one top level event, having 0 typically means something is
           * drastically wrong with the trace and we should just give up early and loudly.
           *
           * @param {LH.TraceEvent[]} events
           */
          static assertHasToplevelEvents(events) {
            const hasToplevelTask = events.some(this.isScheduleableTask);
            if (!hasToplevelTask) {
              throw new Error("Could not find any top level events");
            }
          }
          /**
           * Calculate duration at specified percentiles for given population of
           * durations.
           * If one of the durations overlaps the end of the window, the full
           * duration should be in the duration array, but the length not included
           * within the window should be given as `clippedLength`. For instance, if a
           * 50ms duration occurs 10ms before the end of the window, `50` should be in
           * the `durations` array, and `clippedLength` should be set to 40.
           * @see https://docs.google.com/document/d/1b9slyaB9yho91YTOkAQfpCdULFkZM9LqsipcX3t7He8/preview
           * @param {!Array<number>} durations Array of durations, sorted in ascending order.
           * @param {number} totalTime Total time (in ms) of interval containing durations.
           * @param {!Array<number>} percentiles Array of percentiles of interest, in ascending order.
           * @param {number=} clippedLength Optional length clipped from a duration overlapping end of window. Default of 0.
           * @return {!Array<{percentile: number, time: number}>}
           * @private
           */
          static _riskPercentiles(durations, totalTime, percentiles, clippedLength = 0) {
            let busyTime = 0;
            for (let i = 0; i < durations.length; i++) {
              busyTime += durations[i];
            }
            busyTime -= clippedLength;
            let completedTime = totalTime - busyTime;
            let duration2 = 0;
            let cdfTime = completedTime;
            const results = [];
            let durationIndex = -1;
            let remainingCount = durations.length + 1;
            if (clippedLength > 0) {
              remainingCount--;
            }
            for (const percentile of percentiles) {
              const percentileTime = percentile * totalTime;
              while (cdfTime < percentileTime && durationIndex < durations.length - 1) {
                completedTime += duration2;
                remainingCount -= duration2 < 0 ? -1 : 1;
                if (clippedLength > 0 && clippedLength < durations[durationIndex + 1]) {
                  duration2 = -clippedLength;
                  clippedLength = 0;
                } else {
                  durationIndex++;
                  duration2 = durations[durationIndex];
                }
                cdfTime = completedTime + Math.abs(duration2) * remainingCount;
              }
              results.push({
                percentile,
                time: Math.max(0, (percentileTime - completedTime) / remainingCount) + BASE_RESPONSE_LATENCY
              });
            }
            return results;
          }
          /**
           * Calculates the maximum queueing time (in ms) of high priority tasks for
           * selected percentiles within a window of the main thread.
           * @see https://docs.google.com/document/d/1b9slyaB9yho91YTOkAQfpCdULFkZM9LqsipcX3t7He8/preview
           * @param {Array<ToplevelEvent>} events
           * @param {number} startTime Start time (in ms relative to timeOrigin) of range of interest.
           * @param {number} endTime End time (in ms relative to timeOrigin) of range of interest.
           * @param {!Array<number>=} percentiles Optional array of percentiles to compute. Defaults to [0.5, 0.75, 0.9, 0.99, 1].
           * @return {!Array<{percentile: number, time: number}>}
           */
          static getRiskToResponsiveness(events, startTime, endTime, percentiles = [0.5, 0.75, 0.9, 0.99, 1]) {
            const totalTime = endTime - startTime;
            percentiles.sort((a, b) => a - b);
            const ret = this.getMainThreadTopLevelEventDurations(events, startTime, endTime);
            return this._riskPercentiles(ret.durations, totalTime, percentiles, ret.clippedLength);
          }
          /**
           * Provides durations in ms of all main thread top-level events
           * @param {Array<ToplevelEvent>} topLevelEvents
           * @param {number} startTime Optional start time (in ms relative to timeOrigin) of range of interest. Defaults to 0.
           * @param {number} endTime Optional end time (in ms relative to timeOrigin) of range of interest. Defaults to trace end.
           * @return {{durations: Array<number>, clippedLength: number}}
           */
          static getMainThreadTopLevelEventDurations(topLevelEvents, startTime = 0, endTime = Infinity) {
            const durations = [];
            let clippedLength = 0;
            for (const event of topLevelEvents) {
              if (event.end < startTime || event.start > endTime) {
                continue;
              }
              let duration2 = event.duration;
              let eventStart = event.start;
              if (eventStart < startTime) {
                eventStart = startTime;
                duration2 = event.end - startTime;
              }
              if (event.end > endTime) {
                clippedLength = duration2 - (endTime - eventStart);
              }
              durations.push(duration2);
            }
            durations.sort((a, b) => a - b);
            return {
              durations,
              clippedLength
            };
          }
          /**
           * Provides the top level events on the main thread with timestamps in ms relative to timeOrigin.
           * start.
           * @param {LH.Artifacts.ProcessedTrace} trace
           * @param {number=} startTime Optional start time (in ms relative to timeOrigin) of range of interest. Defaults to 0.
           * @param {number=} endTime Optional end time (in ms relative to timeOrigin) of range of interest. Defaults to trace end.
           * @return {Array<ToplevelEvent>}
           */
          static getMainThreadTopLevelEvents(trace2, startTime = 0, endTime = Infinity) {
            const topLevelEvents = [];
            let prevToplevel = void 0;
            for (const event of trace2.mainThreadEvents) {
              if (!this.isScheduleableTask(event) || !event.dur)
                continue;
              const start = (event.ts - trace2.timeOriginEvt.ts) / 1e3;
              const end = (event.ts + event.dur - trace2.timeOriginEvt.ts) / 1e3;
              if (start > endTime || end < startTime)
                continue;
              if (prevToplevel && start < prevToplevel.end) {
                prevToplevel.end = start - 1e-3;
              }
              prevToplevel = {
                start,
                end,
                duration: event.dur / 1e3
              };
              topLevelEvents.push(prevToplevel);
            }
            return topLevelEvents;
          }
          /**
           * @param {LH.TraceEvent[]} events
           * @return {{startingPid: number, frameId: string}}
           */
          static findMainFrameIds(events) {
            const startedInBrowserEvt = events.find((e) => e.name === "TracingStartedInBrowser");
            if (startedInBrowserEvt?.args.data?.frames) {
              const mainFrame = startedInBrowserEvt.args.data.frames.find((frame) => !frame.parent);
              const frameId = mainFrame?.frame;
              const pid = mainFrame?.processId;
              if (pid && frameId) {
                return {
                  startingPid: pid,
                  frameId
                };
              }
            }
            const startedInPageEvt = events.find((e) => e.name === "TracingStartedInPage");
            if (startedInPageEvt?.args?.data) {
              const frameId = startedInPageEvt.args.data.page;
              if (frameId) {
                return {
                  startingPid: startedInPageEvt.pid,
                  frameId
                };
              }
            }
            const navStartEvt = events.find((e) => this._isNavigationStartOfInterest(e) && e.args.data?.isLoadingMainFrame);
            const firstResourceSendEvt = events.find((e) => e.name === "ResourceSendRequest");
            if (navStartEvt?.args?.data && firstResourceSendEvt && firstResourceSendEvt.pid === navStartEvt.pid && firstResourceSendEvt.tid === navStartEvt.tid) {
              const frameId = navStartEvt.args.frame;
              if (frameId) {
                return {
                  startingPid: navStartEvt.pid,
                  frameId
                };
              }
            }
            throw this.createNoTracingStartedError();
          }
          /**
           * If there were any cross-origin navigations, there'll be more than one pid returned
           * @param {{startingPid: number, frameId: string}} mainFrameInfo
           * @param {LH.TraceEvent[]} keyEvents
           * @return {Map<number, number>} Map where keys are process IDs and their values are thread IDs
           */
          static findMainFramePidTids(mainFrameInfo, keyEvents) {
            const frameProcessEvts = keyEvents.filter((evt) => (
              // ProcessReadyInBrowser is used when a processID isn't available when the FrameCommittedInBrowser trace event is emitted.
              // In that case. FrameCommittedInBrowser has no processId, but a processPseudoId. and the ProcessReadyInBrowser event declares the proper processId.
              (evt.name === "FrameCommittedInBrowser" || evt.name === "ProcessReadyInBrowser") && evt.args?.data?.frame === mainFrameInfo.frameId && evt?.args?.data?.processId
            ));
            const mainFramePids = frameProcessEvts.length ? frameProcessEvts.map((e) => e?.args?.data?.processId) : [mainFrameInfo.startingPid];
            const pidToTid = /* @__PURE__ */ new Map();
            for (const pid of new Set(mainFramePids)) {
              const threadEvents = keyEvents.filter((e) => e.cat === "__metadata" && e.pid === pid && e.ph === "M" && e.name === "thread_name");
              let threadNameEvt = threadEvents.find((e) => e.args.name === "CrRendererMain");
              if (!threadNameEvt) {
                threadNameEvt = threadEvents.find((e) => e.args.name === "CrBrowserMain");
              }
              const tid = threadNameEvt?.tid;
              if (!tid) {
                throw new Error("Unable to determine tid for renderer process");
              }
              pidToTid.set(pid, tid);
            }
            return pidToTid;
          }
          /**
           * @param {LH.TraceEvent} evt
           * @return {boolean}
           */
          static isScheduleableTask(evt) {
            return evt.name === SCHEDULABLE_TASK_TITLE_LH2 || evt.name === SCHEDULABLE_TASK_TITLE_ALT12 || evt.name === SCHEDULABLE_TASK_TITLE_ALT22 || evt.name === SCHEDULABLE_TASK_TITLE_ALT32;
          }
          /**
           * @param {LH.TraceEvent} evt
           * @return {evt is LCPEvent}
           */
          static isLCPEvent(evt) {
            if (evt.name !== "largestContentfulPaint::Invalidate" && evt.name !== "largestContentfulPaint::Candidate")
              return false;
            return Boolean(evt.args?.frame);
          }
          /**
           * @param {LH.TraceEvent} evt
           * @return {evt is LCPCandidateEvent}
           */
          static isLCPCandidateEvent(evt) {
            return Boolean(evt.name === "largestContentfulPaint::Candidate" && evt.args?.frame && evt.args.data && evt.args.data.size !== void 0);
          }
          /**
           * The associated frame ID is set in different locations for different trace events.
           * This function checks all known locations for the frame ID and returns `undefined` if it's not found.
           *
           * @param {LH.TraceEvent} evt
           * @return {string|undefined}
           */
          static getFrameId(evt) {
            return evt.args?.data?.frame || evt.args.data?.frameID || evt.args.frame;
          }
          /**
           * Returns the maximum LCP event across all frames in `events`.
           * Sets `invalidated` flag if LCP of every frame is invalidated.
           *
           * LCP's trace event was first introduced in m78. We can't surface an LCP for older Chrome versions.
           * LCP comes from a frame's latest `largestContentfulPaint::Candidate`, but it can be invalidated by a `largestContentfulPaint::Invalidate` event.
           *
           * @param {LH.TraceEvent[]} events
           * @param {LH.TraceEvent} timeOriginEvent
           * @return {{lcp: LCPEvent | undefined, invalidated: boolean}}
           */
          static computeValidLCPAllFrames(events, timeOriginEvent) {
            const lcpEvents = events.filter(this.isLCPEvent).reverse();
            const finalLcpEventsByFrame = /* @__PURE__ */ new Map();
            for (const e of lcpEvents) {
              if (e.ts <= timeOriginEvent.ts)
                break;
              const frame = e.args.frame;
              if (finalLcpEventsByFrame.has(frame))
                continue;
              finalLcpEventsByFrame.set(frame, e);
            }
            let maxLcpAcrossFrames;
            for (const lcp of finalLcpEventsByFrame.values()) {
              if (!this.isLCPCandidateEvent(lcp))
                continue;
              if (!maxLcpAcrossFrames || lcp.args.data.size > maxLcpAcrossFrames.args.data.size) {
                maxLcpAcrossFrames = lcp;
              }
            }
            return {
              lcp: maxLcpAcrossFrames,
              // LCP events were found, but final LCP event of every frame was an invalidate event.
              invalidated: Boolean(!maxLcpAcrossFrames && finalLcpEventsByFrame.size)
            };
          }
          /**
           * @param {Array<{id: string, url: string, parent?: string}>} frames
           * @return {Map<string, string>}
           */
          static resolveRootFrames(frames22) {
            const parentFrames = /* @__PURE__ */ new Map();
            for (const frame of frames22) {
              if (!frame.parent)
                continue;
              parentFrames.set(frame.id, frame.parent);
            }
            const frameIdToRootFrameId = /* @__PURE__ */ new Map();
            for (const frame of frames22) {
              let cur = frame.id;
              while (parentFrames.has(cur)) {
                cur = /** @type {string} */
                parentFrames.get(cur);
              }
              if (cur === void 0) {
                throw new Error("Unexpected undefined frameId");
              }
              frameIdToRootFrameId.set(frame.id, cur);
            }
            return frameIdToRootFrameId;
          }
          /**
           * Finds key trace events, identifies main process/thread, and returns timings of trace events
           * in milliseconds since the time origin in addition to the standard microsecond monotonic timestamps.
           * @param {LH.Trace} trace
           * @param {{timeOriginDeterminationMethod?: TimeOriginDeterminationMethod}} [options]
           * @return {LH.Artifacts.ProcessedTrace}
          */
          static processTrace(trace2, options2) {
            const { timeOriginDeterminationMethod = "auto" } = options2 || {};
            const keyEvents = this.filteredTraceSort(trace2.traceEvents, (e) => {
              return e.cat.includes("blink.user_timing") || e.cat.includes("loading") || e.cat.includes("devtools.timeline") || e.cat === "__metadata";
            });
            const mainFrameInfo = this.findMainFrameIds(keyEvents);
            const rendererPidToTid = this.findMainFramePidTids(mainFrameInfo, keyEvents);
            const processEvents = _TraceProcessor.filteredTraceSort(trace2.traceEvents, (e) => rendererPidToTid.has(e.pid));
            const framesById = /* @__PURE__ */ new Map();
            const tracingStartedFrames = keyEvents.find((e) => e.name === "TracingStartedInBrowser")?.args?.data?.frames;
            if (tracingStartedFrames) {
              for (const frame of tracingStartedFrames) {
                framesById.set(frame.frame, {
                  id: frame.frame,
                  url: frame.url,
                  parent: frame.parent
                });
              }
            }
            keyEvents.filter(
              /** @return {evt is FrameCommittedEvent} */
              (evt) => {
                return Boolean(evt.name === "FrameCommittedInBrowser" && evt.args.data?.frame && evt.args.data.url !== void 0);
              }
            ).forEach((evt) => {
              framesById.set(evt.args.data.frame, {
                id: evt.args.data.frame,
                url: evt.args.data.url,
                parent: evt.args.data.parent
              });
            });
            const frames22 = [...framesById.values()];
            const frameIdToRootFrameId = this.resolveRootFrames(frames22);
            const inspectedTreeFrameIds = [...frameIdToRootFrameId.entries()].filter(([, rootFrameId]) => rootFrameId === mainFrameInfo.frameId).map(([child]) => child);
            function associatedToMainFrame(e) {
              const frameId = _TraceProcessor.getFrameId(e);
              return frameId === mainFrameInfo.frameId;
            }
            __name(associatedToMainFrame, "associatedToMainFrame");
            function associatedToAllFrames(e) {
              const frameId = _TraceProcessor.getFrameId(e);
              return frameId ? inspectedTreeFrameIds.includes(frameId) : false;
            }
            __name(associatedToAllFrames, "associatedToAllFrames");
            const frameEvents = keyEvents.filter((e) => associatedToMainFrame(e));
            let frameTreeEvents = [];
            if (frameIdToRootFrameId.has(mainFrameInfo.frameId)) {
              frameTreeEvents = keyEvents.filter((e) => associatedToAllFrames(e));
            } else {
              lighthouse_logger_default.warn("TraceProcessor", "frameTreeEvents may be incomplete, make sure the trace has frame events");
              frameIdToRootFrameId.set(mainFrameInfo.frameId, mainFrameInfo.frameId);
              frameTreeEvents = frameEvents;
            }
            const timeOriginEvt = this.computeTimeOrigin({ keyEvents, frameEvents, mainFrameInfo }, timeOriginDeterminationMethod);
            const mainThreadEvents = processEvents.filter((e) => e.tid === rendererPidToTid.get(e.pid));
            const traceEnd = this.computeTraceEnd(trace2.traceEvents, timeOriginEvt);
            return {
              frames: frames22,
              mainThreadEvents,
              frameEvents,
              frameTreeEvents,
              processEvents,
              mainFrameInfo,
              timeOriginEvt,
              timings: {
                timeOrigin: 0,
                traceEnd: traceEnd.timing
              },
              timestamps: {
                timeOrigin: timeOriginEvt.ts,
                traceEnd: traceEnd.timestamp
              },
              _keyEvents: keyEvents,
              _rendererPidToTid: rendererPidToTid
            };
          }
          /**
           * Finds key navigation trace events and computes timings of events in milliseconds since the time
           * origin in addition to the standard microsecond monotonic timestamps.
           * @param {LH.Artifacts.ProcessedTrace} processedTrace
           * @return {LH.Artifacts.ProcessedNavigation}
          */
          static processNavigation(processedTrace) {
            const { frameEvents, frameTreeEvents, timeOriginEvt, timings, timestamps } = processedTrace;
            const frameTimings = this.computeNavigationTimingsForFrame(frameEvents, { timeOriginEvt });
            const fcpAllFramesEvt = frameTreeEvents.find((e) => e.name === "firstContentfulPaint" && e.ts > timeOriginEvt.ts);
            if (!fcpAllFramesEvt) {
              throw this.createNoFirstContentfulPaintError();
            }
            const lcpAllFramesEvt = this.computeValidLCPAllFrames(frameTreeEvents, timeOriginEvt).lcp;
            const getTiming = /* @__PURE__ */ __name((ts) => (ts - timeOriginEvt.ts) / 1e3, "getTiming");
            const maybeGetTiming = /* @__PURE__ */ __name((ts) => ts === void 0 ? void 0 : getTiming(ts), "maybeGetTiming");
            return {
              timings: {
                timeOrigin: timings.timeOrigin,
                firstPaint: frameTimings.timings.firstPaint,
                firstContentfulPaint: frameTimings.timings.firstContentfulPaint,
                firstContentfulPaintAllFrames: getTiming(fcpAllFramesEvt.ts),
                largestContentfulPaint: frameTimings.timings.largestContentfulPaint,
                largestContentfulPaintAllFrames: maybeGetTiming(lcpAllFramesEvt?.ts),
                load: frameTimings.timings.load,
                domContentLoaded: frameTimings.timings.domContentLoaded,
                traceEnd: timings.traceEnd
              },
              timestamps: {
                timeOrigin: timestamps.timeOrigin,
                firstPaint: frameTimings.timestamps.firstPaint,
                firstContentfulPaint: frameTimings.timestamps.firstContentfulPaint,
                firstContentfulPaintAllFrames: fcpAllFramesEvt.ts,
                largestContentfulPaint: frameTimings.timestamps.largestContentfulPaint,
                largestContentfulPaintAllFrames: lcpAllFramesEvt?.ts,
                load: frameTimings.timestamps.load,
                domContentLoaded: frameTimings.timestamps.domContentLoaded,
                traceEnd: timestamps.traceEnd
              },
              firstPaintEvt: frameTimings.firstPaintEvt,
              firstContentfulPaintEvt: frameTimings.firstContentfulPaintEvt,
              firstContentfulPaintAllFramesEvt: fcpAllFramesEvt,
              largestContentfulPaintEvt: frameTimings.largestContentfulPaintEvt,
              largestContentfulPaintAllFramesEvt: lcpAllFramesEvt,
              loadEvt: frameTimings.loadEvt,
              domContentLoadedEvt: frameTimings.domContentLoadedEvt,
              lcpInvalidated: frameTimings.lcpInvalidated
            };
          }
          /**
           * Computes the last observable timestamp in a set of trace events.
           *
           * @param {Array<LH.TraceEvent>} events
           * @param {LH.TraceEvent} timeOriginEvt
           * @return {{timing: number, timestamp: number}}
           */
          static computeTraceEnd(events, timeOriginEvt) {
            let maxTs = -Infinity;
            for (const event of events) {
              maxTs = Math.max(event.ts + (event.dur || 0), maxTs);
            }
            return { timestamp: maxTs, timing: (maxTs - timeOriginEvt.ts) / 1e3 };
          }
          /**
           * Computes the time origin using the specified method.
           *
           *    - firstResourceSendRequest
           *      Uses the time that the very first network request is sent in the main frame.
           *      Eventually should be used in place of lastNavigationStart as the default for navigations.
           *      This method includes the cost of all redirects when evaluating a navigation (which matches lantern behavior).
           *      The only difference between firstResourceSendRequest and the first `navigationStart` is
           *      the unload time of `about:blank` (which is a Lighthouse implementation detail and shouldn't be included).
           *
           *    - lastNavigationStart
           *      Uses the time of the last `navigationStart` event in the main frame.
           *      The historical time origin of Lighthouse from 2016-Present.
           *      This method excludes the cost of client-side redirects when evaluating a navigation.
           *      Can also be skewed by several hundred milliseconds or even seconds when the browser takes a long
           *      time to unload `about:blank`.
           *
           * @param {{keyEvents: Array<LH.TraceEvent>, frameEvents: Array<LH.TraceEvent>, mainFrameInfo: {frameId: string}}} traceEventSubsets
           * @param {TimeOriginDeterminationMethod} method
           * @return {LH.TraceEvent}
           */
          static computeTimeOrigin(traceEventSubsets, method) {
            const lastNavigationStart = /* @__PURE__ */ __name(() => {
              const frameEvents = traceEventSubsets.frameEvents;
              return frameEvents.filter(this._isNavigationStartOfInterest).pop();
            }, "lastNavigationStart");
            const lighthouseMarker = /* @__PURE__ */ __name(() => {
              const frameEvents = traceEventSubsets.keyEvents;
              return frameEvents.find((evt) => evt.name === "clock_sync" && evt.args.sync_id === _TraceProcessor.TIMESPAN_MARKER_ID);
            }, "lighthouseMarker");
            switch (method) {
              case "firstResourceSendRequest": {
                const fetchStart = traceEventSubsets.keyEvents.find((event) => {
                  if (event.name !== "ResourceSendRequest")
                    return false;
                  const data312 = event.args.data || {};
                  return data312.frame === traceEventSubsets.mainFrameInfo.frameId;
                });
                if (!fetchStart)
                  throw this.createNoResourceSendRequestError();
                return fetchStart;
              }
              case "lastNavigationStart": {
                const navigationStart = lastNavigationStart();
                if (!navigationStart)
                  throw this.createNoNavstartError();
                return navigationStart;
              }
              case "lighthouseMarker": {
                const marker = lighthouseMarker();
                if (!marker)
                  throw this.createNoLighthouseMarkerError();
                return marker;
              }
              case "auto": {
                const marker = lighthouseMarker() || lastNavigationStart();
                if (!marker)
                  throw this.createNoNavstartError();
                return marker;
              }
            }
          }
          /**
           * Computes timings of trace events of key trace events in milliseconds since the time origin
           * in addition to the standard microsecond monotonic timestamps.
           * @param {Array<LH.TraceEvent>} frameEvents
           * @param {{timeOriginEvt: LH.TraceEvent}} options
          */
          static computeNavigationTimingsForFrame(frameEvents, options2) {
            const { timeOriginEvt } = options2;
            const firstPaint = frameEvents.find((e) => e.name === "firstPaint" && e.ts > timeOriginEvt.ts);
            const firstContentfulPaint = frameEvents.find((e) => e.name === "firstContentfulPaint" && e.ts > timeOriginEvt.ts);
            if (!firstContentfulPaint) {
              throw this.createNoFirstContentfulPaintError();
            }
            const lcpResult = this.computeValidLCPAllFrames(frameEvents, timeOriginEvt);
            const load2 = frameEvents.find((e) => e.name === "loadEventEnd" && e.ts > timeOriginEvt.ts);
            const domContentLoaded = frameEvents.find((e) => e.name === "domContentLoadedEventEnd" && e.ts > timeOriginEvt.ts);
            const getTimestamp = /* @__PURE__ */ __name((event) => event?.ts, "getTimestamp");
            const timestamps = {
              timeOrigin: timeOriginEvt.ts,
              firstPaint: getTimestamp(firstPaint),
              firstContentfulPaint: firstContentfulPaint.ts,
              largestContentfulPaint: getTimestamp(lcpResult.lcp),
              load: getTimestamp(load2),
              domContentLoaded: getTimestamp(domContentLoaded)
            };
            const getTiming = /* @__PURE__ */ __name((ts) => (ts - timeOriginEvt.ts) / 1e3, "getTiming");
            const maybeGetTiming = /* @__PURE__ */ __name((ts) => ts === void 0 ? void 0 : getTiming(ts), "maybeGetTiming");
            const timings = {
              timeOrigin: 0,
              firstPaint: maybeGetTiming(timestamps.firstPaint),
              firstContentfulPaint: getTiming(timestamps.firstContentfulPaint),
              largestContentfulPaint: maybeGetTiming(timestamps.largestContentfulPaint),
              load: maybeGetTiming(timestamps.load),
              domContentLoaded: maybeGetTiming(timestamps.domContentLoaded)
            };
            return {
              timings,
              timestamps,
              timeOriginEvt,
              firstPaintEvt: firstPaint,
              firstContentfulPaintEvt: firstContentfulPaint,
              largestContentfulPaintEvt: lcpResult.lcp,
              loadEvt: load2,
              domContentLoadedEvt: domContentLoaded,
              lcpInvalidated: lcpResult.invalidated
            };
          }
        };
      }
    });
    init_arbitrary_equality_map = __esm2({
      "core/lib/arbitrary-equality-map.js"() {
        "use strict";
        init_process_global();
        init_lodash();
        ArbitraryEqualityMap = class _ArbitraryEqualityMap {
          static {
            __name(this, "ArbitraryEqualityMap");
          }
          constructor() {
            this._equalsFn = _ArbitraryEqualityMap.deepEquals;
            this._entries = [];
          }
          /**
           * @param {function(*,*):boolean} equalsFn
           */
          setEqualityFn(equalsFn) {
            this._equalsFn = equalsFn;
          }
          /**
           * @param {*} key
           * @return {boolean}
           */
          has(key) {
            return this._findIndexOf(key) !== -1;
          }
          /**
           * @param {*} key
           * @return {*}
           */
          get(key) {
            const entry = this._entries[this._findIndexOf(key)];
            return entry?.value;
          }
          /**
           * @param {*} key
           * @param {*} value
           */
          set(key, value) {
            let index2 = this._findIndexOf(key);
            if (index2 === -1)
              index2 = this._entries.length;
            this._entries[index2] = { key, value };
          }
          /**
           * @param {*} key
           * @return {number}
           */
          _findIndexOf(key) {
            for (let i = 0; i < this._entries.length; i++) {
              if (this._equalsFn(key, this._entries[i].key))
                return i;
            }
            return -1;
          }
          /**
           * Determines whether two objects are deeply equal. Defers to lodash isEqual, but is kept here for
           * easy usage by consumers.
           * See https://lodash.com/docs/4.17.5#isEqual.
           * @param {*} objA
           * @param {*} objB
           * @return {boolean}
           */
          static deepEquals(objA, objB) {
            return isEqual_default(objA, objB);
          }
        };
      }
    });
    init_computed_artifact = __esm2({
      "core/computed/computed-artifact.js"() {
        "use strict";
        init_process_global();
        init_lighthouse_logger();
        init_arbitrary_equality_map();
        init_lh_env();
        __name(makeComputedArtifact, "makeComputedArtifact");
      }
    });
    require_cjs = __commonJS({
      "node_modules/tldts-icann/dist/cjs/index.js"(exports2) {
        "use strict";
        init_process_global();
        function shareSameDomainSuffix(hostname2, vhost) {
          if (hostname2.endsWith(vhost)) {
            return hostname2.length === vhost.length || hostname2[hostname2.length - vhost.length - 1] === ".";
          }
          return false;
        }
        __name(shareSameDomainSuffix, "shareSameDomainSuffix");
        function extractDomainWithSuffix(hostname2, publicSuffix) {
          const publicSuffixIndex = hostname2.length - publicSuffix.length - 2;
          const lastDotBeforeSuffixIndex = hostname2.lastIndexOf(".", publicSuffixIndex);
          if (lastDotBeforeSuffixIndex === -1) {
            return hostname2;
          }
          return hostname2.slice(lastDotBeforeSuffixIndex + 1);
        }
        __name(extractDomainWithSuffix, "extractDomainWithSuffix");
        function getDomain$1(suffix, hostname2, options2) {
          if (options2.validHosts !== null) {
            const validHosts = options2.validHosts;
            for (const vhost of validHosts) {
              if (
                /*@__INLINE__*/
                shareSameDomainSuffix(hostname2, vhost)
              ) {
                return vhost;
              }
            }
          }
          let numberOfLeadingDots = 0;
          if (hostname2.startsWith(".")) {
            while (numberOfLeadingDots < hostname2.length && hostname2[numberOfLeadingDots] === ".") {
              numberOfLeadingDots += 1;
            }
          }
          if (suffix.length === hostname2.length - numberOfLeadingDots) {
            return null;
          }
          return (
            /*@__INLINE__*/
            extractDomainWithSuffix(hostname2, suffix)
          );
        }
        __name(getDomain$1, "getDomain$1");
        function getDomainWithoutSuffix$1(domain, suffix) {
          return domain.slice(0, -suffix.length - 1);
        }
        __name(getDomainWithoutSuffix$1, "getDomainWithoutSuffix$1");
        function extractHostname(url, urlIsValidHostname) {
          let start = 0;
          let end = url.length;
          let hasUpper = false;
          if (!urlIsValidHostname) {
            if (url.startsWith("data:")) {
              return null;
            }
            while (start < url.length && url.charCodeAt(start) <= 32) {
              start += 1;
            }
            while (end > start + 1 && url.charCodeAt(end - 1) <= 32) {
              end -= 1;
            }
            if (url.charCodeAt(start) === 47 && url.charCodeAt(start + 1) === 47) {
              start += 2;
            } else {
              const indexOfProtocol = url.indexOf(":/", start);
              if (indexOfProtocol !== -1) {
                const protocolSize = indexOfProtocol - start;
                const c0 = url.charCodeAt(start);
                const c1 = url.charCodeAt(start + 1);
                const c2 = url.charCodeAt(start + 2);
                const c3 = url.charCodeAt(start + 3);
                const c4 = url.charCodeAt(start + 4);
                if (protocolSize === 5 && c0 === 104 && c1 === 116 && c2 === 116 && c3 === 112 && c4 === 115)
                  ;
                else if (protocolSize === 4 && c0 === 104 && c1 === 116 && c2 === 116 && c3 === 112)
                  ;
                else if (protocolSize === 3 && c0 === 119 && c1 === 115 && c2 === 115)
                  ;
                else if (protocolSize === 2 && c0 === 119 && c1 === 115)
                  ;
                else {
                  for (let i = start; i < indexOfProtocol; i += 1) {
                    const lowerCaseCode = url.charCodeAt(i) | 32;
                    if (!(lowerCaseCode >= 97 && lowerCaseCode <= 122 || // [a, z]
                    lowerCaseCode >= 48 && lowerCaseCode <= 57 || // [0, 9]
                    lowerCaseCode === 46 || // '.'
                    lowerCaseCode === 45 || // '-'
                    lowerCaseCode === 43)) {
                      return null;
                    }
                  }
                }
                start = indexOfProtocol + 2;
                while (url.charCodeAt(start) === 47) {
                  start += 1;
                }
              }
            }
            let indexOfIdentifier = -1;
            let indexOfClosingBracket = -1;
            let indexOfPort = -1;
            for (let i = start; i < end; i += 1) {
              const code2 = url.charCodeAt(i);
              if (code2 === 35 || // '#'
              code2 === 47 || // '/'
              code2 === 63) {
                end = i;
                break;
              } else if (code2 === 64) {
                indexOfIdentifier = i;
              } else if (code2 === 93) {
                indexOfClosingBracket = i;
              } else if (code2 === 58) {
                indexOfPort = i;
              } else if (code2 >= 65 && code2 <= 90) {
                hasUpper = true;
              }
            }
            if (indexOfIdentifier !== -1 && indexOfIdentifier > start && indexOfIdentifier < end) {
              start = indexOfIdentifier + 1;
            }
            if (url.charCodeAt(start) === 91) {
              if (indexOfClosingBracket !== -1) {
                return url.slice(start + 1, indexOfClosingBracket).toLowerCase();
              }
              return null;
            } else if (indexOfPort !== -1 && indexOfPort > start && indexOfPort < end) {
              end = indexOfPort;
            }
          }
          while (end > start + 1 && url.charCodeAt(end - 1) === 46) {
            end -= 1;
          }
          const hostname2 = start !== 0 || end !== url.length ? url.slice(start, end) : url;
          if (hasUpper) {
            return hostname2.toLowerCase();
          }
          return hostname2;
        }
        __name(extractHostname, "extractHostname");
        function isProbablyIpv4(hostname2) {
          if (hostname2.length < 7) {
            return false;
          }
          if (hostname2.length > 15) {
            return false;
          }
          let numberOfDots = 0;
          for (let i = 0; i < hostname2.length; i += 1) {
            const code2 = hostname2.charCodeAt(i);
            if (code2 === 46) {
              numberOfDots += 1;
            } else if (code2 < 48 || code2 > 57) {
              return false;
            }
          }
          return numberOfDots === 3 && hostname2.charCodeAt(0) !== 46 && hostname2.charCodeAt(hostname2.length - 1) !== 46;
        }
        __name(isProbablyIpv4, "isProbablyIpv4");
        function isProbablyIpv6(hostname2) {
          if (hostname2.length < 3) {
            return false;
          }
          let start = hostname2.startsWith("[") ? 1 : 0;
          let end = hostname2.length;
          if (hostname2[end - 1] === "]") {
            end -= 1;
          }
          if (end - start > 39) {
            return false;
          }
          let hasColon = false;
          for (; start < end; start += 1) {
            const code2 = hostname2.charCodeAt(start);
            if (code2 === 58) {
              hasColon = true;
            } else if (!(code2 >= 48 && code2 <= 57 || // 0-9
            code2 >= 97 && code2 <= 102 || // a-f
            code2 >= 65 && code2 <= 90)) {
              return false;
            }
          }
          return hasColon;
        }
        __name(isProbablyIpv6, "isProbablyIpv6");
        function isIp(hostname2) {
          return isProbablyIpv6(hostname2) || isProbablyIpv4(hostname2);
        }
        __name(isIp, "isIp");
        function isValidAscii(code2) {
          return code2 >= 97 && code2 <= 122 || code2 >= 48 && code2 <= 57 || code2 > 127;
        }
        __name(isValidAscii, "isValidAscii");
        function isValidHostname(hostname2) {
          if (hostname2.length > 255) {
            return false;
          }
          if (hostname2.length === 0) {
            return false;
          }
          if (
            /*@__INLINE__*/
            !isValidAscii(hostname2.charCodeAt(0)) && hostname2.charCodeAt(0) !== 46 && // '.' (dot)
            hostname2.charCodeAt(0) !== 95
          ) {
            return false;
          }
          let lastDotIndex = -1;
          let lastCharCode = -1;
          const len = hostname2.length;
          for (let i = 0; i < len; i += 1) {
            const code2 = hostname2.charCodeAt(i);
            if (code2 === 46) {
              if (
                // Check that previous label is < 63 bytes long (64 = 63 + '.')
                i - lastDotIndex > 64 || // Check that previous character was not already a '.'
                lastCharCode === 46 || // Check that the previous label does not end with a '-' (dash)
                lastCharCode === 45 || // Check that the previous label does not end with a '_' (underscore)
                lastCharCode === 95
              ) {
                return false;
              }
              lastDotIndex = i;
            } else if (!(isValidAscii(code2) || code2 === 45 || code2 === 95)) {
              return false;
            }
            lastCharCode = code2;
          }
          return (
            // Check that last label is shorter than 63 chars
            len - lastDotIndex - 1 <= 63 && // Check that the last character is an allowed trailing label character.
            // Since we already checked that the char is a valid hostname character,
            // we only need to check that it's different from '-'.
            lastCharCode !== 45
          );
        }
        __name(isValidHostname, "isValidHostname");
        function setDefaultsImpl({ allowIcannDomains = true, allowPrivateDomains = false, detectIp = true, extractHostname: extractHostname2 = true, mixedInputs = true, validHosts = null, validateHostname = true }) {
          return {
            allowIcannDomains,
            allowPrivateDomains,
            detectIp,
            extractHostname: extractHostname2,
            mixedInputs,
            validHosts,
            validateHostname
          };
        }
        __name(setDefaultsImpl, "setDefaultsImpl");
        var DEFAULT_OPTIONS = (
          /*@__INLINE__*/
          setDefaultsImpl({})
        );
        function setDefaults(options2) {
          if (options2 === void 0) {
            return DEFAULT_OPTIONS;
          }
          return (
            /*@__INLINE__*/
            setDefaultsImpl(options2)
          );
        }
        __name(setDefaults, "setDefaults");
        function getSubdomain$1(hostname2, domain) {
          if (domain.length === hostname2.length) {
            return "";
          }
          return hostname2.slice(0, -domain.length - 1);
        }
        __name(getSubdomain$1, "getSubdomain$1");
        function getEmptyResult() {
          return {
            domain: null,
            domainWithoutSuffix: null,
            hostname: null,
            isIcann: null,
            isIp: null,
            isPrivate: null,
            publicSuffix: null,
            subdomain: null
          };
        }
        __name(getEmptyResult, "getEmptyResult");
        function resetResult(result) {
          result.domain = null;
          result.domainWithoutSuffix = null;
          result.hostname = null;
          result.isIcann = null;
          result.isIp = null;
          result.isPrivate = null;
          result.publicSuffix = null;
          result.subdomain = null;
        }
        __name(resetResult, "resetResult");
        function parseImpl(url, step, suffixLookup2, partialOptions, result) {
          const options2 = (
            /*@__INLINE__*/
            setDefaults(partialOptions)
          );
          if (typeof url !== "string") {
            return result;
          }
          if (!options2.extractHostname) {
            result.hostname = url;
          } else if (options2.mixedInputs) {
            result.hostname = extractHostname(url, isValidHostname(url));
          } else {
            result.hostname = extractHostname(url, false);
          }
          if (options2.detectIp && result.hostname !== null) {
            result.isIp = isIp(result.hostname);
            if (result.isIp) {
              return result;
            }
          }
          if (options2.validateHostname && options2.extractHostname && result.hostname !== null && !isValidHostname(result.hostname)) {
            result.hostname = null;
            return result;
          }
          if (step === 0 || result.hostname === null) {
            return result;
          }
          suffixLookup2(result.hostname, options2, result);
          if (step === 2 || result.publicSuffix === null) {
            return result;
          }
          result.domain = getDomain$1(result.publicSuffix, result.hostname, options2);
          if (step === 3 || result.domain === null) {
            return result;
          }
          result.subdomain = getSubdomain$1(result.hostname, result.domain);
          if (step === 4) {
            return result;
          }
          result.domainWithoutSuffix = getDomainWithoutSuffix$1(result.domain, result.publicSuffix);
          return result;
        }
        __name(parseImpl, "parseImpl");
        function fastPathLookup(hostname2, options2, out) {
          if (!options2.allowPrivateDomains && hostname2.length > 3) {
            const last2 = hostname2.length - 1;
            const c3 = hostname2.charCodeAt(last2);
            const c2 = hostname2.charCodeAt(last2 - 1);
            const c1 = hostname2.charCodeAt(last2 - 2);
            const c0 = hostname2.charCodeAt(last2 - 3);
            if (c3 === 109 && c2 === 111 && c1 === 99 && c0 === 46) {
              out.isIcann = true;
              out.isPrivate = false;
              out.publicSuffix = "com";
              return true;
            } else if (c3 === 103 && c2 === 114 && c1 === 111 && c0 === 46) {
              out.isIcann = true;
              out.isPrivate = false;
              out.publicSuffix = "org";
              return true;
            } else if (c3 === 117 && c2 === 100 && c1 === 101 && c0 === 46) {
              out.isIcann = true;
              out.isPrivate = false;
              out.publicSuffix = "edu";
              return true;
            } else if (c3 === 118 && c2 === 111 && c1 === 103 && c0 === 46) {
              out.isIcann = true;
              out.isPrivate = false;
              out.publicSuffix = "gov";
              return true;
            } else if (c3 === 116 && c2 === 101 && c1 === 110 && c0 === 46) {
              out.isIcann = true;
              out.isPrivate = false;
              out.publicSuffix = "net";
              return true;
            } else if (c3 === 101 && c2 === 100 && c1 === 46) {
              out.isIcann = true;
              out.isPrivate = false;
              out.publicSuffix = "de";
              return true;
            }
          }
          return false;
        }
        __name(fastPathLookup, "fastPathLookup");
        var exceptions = /* @__PURE__ */ function() {
          const _68 = [1, {}], _69 = [0, { "city": _68 }];
          const exceptions2 = [0, { "ck": [0, { "www": _68 }], "jp": [0, { "kawasaki": _69, "kitakyushu": _69, "kobe": _69, "nagoya": _69, "sapporo": _69, "sendai": _69, "yokohama": _69 }] }];
          return exceptions2;
        }();
        var rules2 = /* @__PURE__ */ function() {
          const _70 = [1, {}], _71 = [1, { "com": _70, "edu": _70, "gov": _70, "mil": _70, "net": _70, "org": _70 }], _72 = [1, { "com": _70, "edu": _70, "gov": _70, "net": _70, "org": _70 }], _73 = [1, { "gov": _70 }], _74 = [0, { "*": _70 }], _75 = [1, { "co": _70, "com": _70, "edu": _70, "gov": _70, "net": _70, "org": _70 }], _76 = [1, { "com": _70, "edu": _70, "net": _70, "org": _70 }], _77 = [1, { "co": _70, "net": _70, "org": _70 }], _78 = [1, { "co": _70, "com": _70, "edu": _70, "gov": _70, "mil": _70, "net": _70, "nom": _70, "org": _70 }], _79 = [1, { "biz": _70, "com": _70, "edu": _70, "gov": _70, "info": _70, "net": _70, "org": _70 }], _80 = [1, { "gs": _70 }], _81 = [0, { "nes": _70 }], _82 = [1, { "k12": _70, "cc": _70, "lib": _70 }], _83 = [1, { "cc": _70 }], _84 = [1, { "cc": _70, "lib": _70 }];
          const rules22 = [0, {
            "ac": _71,
            "ad": _70,
            "ae": [1, { "ac": _70, "co": _70, "gov": _70, "mil": _70, "net": _70, "org": _70, "sch": _70 }],
            "aero": [1, { "airline": _70, "airport": _70, "accident-investigation": _70, "accident-prevention": _70, "aerobatic": _70, "aeroclub": _70, "aerodrome": _70, "agents": _70, "air-surveillance": _70, "air-traffic-control": _70, "aircraft": _70, "airtraffic": _70, "ambulance": _70, "association": _70, "author": _70, "ballooning": _70, "broker": _70, "caa": _70, "cargo": _70, "catering": _70, "certification": _70, "championship": _70, "charter": _70, "civilaviation": _70, "club": _70, "conference": _70, "consultant": _70, "consulting": _70, "control": _70, "council": _70, "crew": _70, "design": _70, "dgca": _70, "educator": _70, "emergency": _70, "engine": _70, "engineer": _70, "entertainment": _70, "equipment": _70, "exchange": _70, "express": _70, "federation": _70, "flight": _70, "freight": _70, "fuel": _70, "gliding": _70, "government": _70, "groundhandling": _70, "group": _70, "hanggliding": _70, "homebuilt": _70, "insurance": _70, "journal": _70, "journalist": _70, "leasing": _70, "logistics": _70, "magazine": _70, "maintenance": _70, "marketplace": _70, "media": _70, "microlight": _70, "modelling": _70, "navigation": _70, "parachuting": _70, "paragliding": _70, "passenger-association": _70, "pilot": _70, "press": _70, "production": _70, "recreation": _70, "repbody": _70, "res": _70, "research": _70, "rotorcraft": _70, "safety": _70, "scientist": _70, "services": _70, "show": _70, "skydiving": _70, "software": _70, "student": _70, "taxi": _70, "trader": _70, "trading": _70, "trainer": _70, "union": _70, "workinggroup": _70, "works": _70 }],
            "af": _72,
            "ag": [1, { "co": _70, "com": _70, "net": _70, "nom": _70, "org": _70 }],
            "ai": [1, { "com": _70, "net": _70, "off": _70, "org": _70 }],
            "al": _71,
            "am": [1, { "co": _70, "com": _70, "commune": _70, "net": _70, "org": _70 }],
            "ao": [1, { "co": _70, "ed": _70, "edu": _70, "gov": _70, "gv": _70, "it": _70, "og": _70, "org": _70, "pb": _70 }],
            "aq": _70,
            "ar": [1, { "bet": _70, "com": _70, "coop": _70, "edu": _70, "gob": _70, "gov": _70, "int": _70, "mil": _70, "musica": _70, "mutual": _70, "net": _70, "org": _70, "seg": _70, "senasa": _70, "tur": _70 }],
            "arpa": [1, { "e164": _70, "home": _70, "in-addr": _70, "ip6": _70, "iris": _70, "uri": _70, "urn": _70 }],
            "as": _73,
            "asia": _70,
            "at": [1, { "ac": [1, { "sth": _70 }], "co": _70, "gv": _70, "or": _70 }],
            "au": [1, { "asn": _70, "com": _70, "edu": [1, { "act": _70, "catholic": _70, "nsw": _70, "nt": _70, "qld": _70, "sa": _70, "tas": _70, "vic": _70, "wa": _70 }], "gov": [1, { "qld": _70, "sa": _70, "tas": _70, "vic": _70, "wa": _70 }], "id": _70, "net": _70, "org": _70, "conf": _70, "oz": _70, "act": _70, "nsw": _70, "nt": _70, "qld": _70, "sa": _70, "tas": _70, "vic": _70, "wa": _70 }],
            "aw": [1, { "com": _70 }],
            "ax": _70,
            "az": [1, {
              "biz": _70,
              "co": _70,
              "com": _70,
              "edu": _70,
              "gov": _70,
              "info": _70,
              "int": _70,
              "mil": _70,
              "name": _70,
              "net": _70,
              "org": _70,
              "pp": _70,
              "pro": _70
            }],
            "ba": _71,
            "bb": [1, { "biz": _70, "co": _70, "com": _70, "edu": _70, "gov": _70, "info": _70, "net": _70, "org": _70, "store": _70, "tv": _70 }],
            "bd": _74,
            "be": [1, { "ac": _70 }],
            "bf": _73,
            "bg": [1, { "0": _70, "1": _70, "2": _70, "3": _70, "4": _70, "5": _70, "6": _70, "7": _70, "8": _70, "9": _70, "a": _70, "b": _70, "c": _70, "d": _70, "e": _70, "f": _70, "g": _70, "h": _70, "i": _70, "j": _70, "k": _70, "l": _70, "m": _70, "n": _70, "o": _70, "p": _70, "q": _70, "r": _70, "s": _70, "t": _70, "u": _70, "v": _70, "w": _70, "x": _70, "y": _70, "z": _70 }],
            "bh": _72,
            "bi": [1, { "co": _70, "com": _70, "edu": _70, "or": _70, "org": _70 }],
            "biz": _70,
            "bj": [1, {
              "africa": _70,
              "agro": _70,
              "architectes": _70,
              "assur": _70,
              "avocats": _70,
              "co": _70,
              "com": _70,
              "eco": _70,
              "econo": _70,
              "edu": _70,
              "info": _70,
              "loisirs": _70,
              "money": _70,
              "net": _70,
              "org": _70,
              "ote": _70,
              "restaurant": _70,
              "resto": _70,
              "tourism": _70,
              "univ": _70
            }],
            "bm": _72,
            "bn": _72,
            "bo": [1, { "com": _70, "edu": _70, "gob": _70, "int": _70, "mil": _70, "net": _70, "org": _70, "tv": _70, "web": _70, "academia": _70, "agro": _70, "arte": _70, "blog": _70, "bolivia": _70, "ciencia": _70, "cooperativa": _70, "democracia": _70, "deporte": _70, "ecologia": _70, "economia": _70, "empresa": _70, "indigena": _70, "industria": _70, "info": _70, "medicina": _70, "movimiento": _70, "musica": _70, "natural": _70, "nombre": _70, "noticias": _70, "patria": _70, "plurinacional": _70, "politica": _70, "profesional": _70, "pueblo": _70, "revista": _70, "salud": _70, "tecnologia": _70, "tksat": _70, "transporte": _70, "wiki": _70 }],
            "br": [1, {
              "9guacu": _70,
              "abc": _70,
              "adm": _70,
              "adv": _70,
              "agr": _70,
              "aju": _70,
              "am": _70,
              "anani": _70,
              "aparecida": _70,
              "api": _70,
              "app": _70,
              "arq": _70,
              "art": _70,
              "ato": _70,
              "b": _70,
              "barueri": _70,
              "belem": _70,
              "bet": _70,
              "bhz": _70,
              "bib": _70,
              "bio": _70,
              "blog": _70,
              "bmd": _70,
              "boavista": _70,
              "bsb": _70,
              "campinagrande": _70,
              "campinas": _70,
              "caxias": _70,
              "cim": _70,
              "cng": _70,
              "cnt": _70,
              "com": _70,
              "contagem": _70,
              "coop": _70,
              "coz": _70,
              "cri": _70,
              "cuiaba": _70,
              "curitiba": _70,
              "def": _70,
              "des": _70,
              "det": _70,
              "dev": _70,
              "ecn": _70,
              "eco": _70,
              "edu": _70,
              "emp": _70,
              "enf": _70,
              "eng": _70,
              "esp": _70,
              "etc": _70,
              "eti": _70,
              "far": _70,
              "feira": _70,
              "flog": _70,
              "floripa": _70,
              "fm": _70,
              "fnd": _70,
              "fortal": _70,
              "fot": _70,
              "foz": _70,
              "fst": _70,
              "g12": _70,
              "geo": _70,
              "ggf": _70,
              "goiania": _70,
              "gov": [1, { "ac": _70, "al": _70, "am": _70, "ap": _70, "ba": _70, "ce": _70, "df": _70, "es": _70, "go": _70, "ma": _70, "mg": _70, "ms": _70, "mt": _70, "pa": _70, "pb": _70, "pe": _70, "pi": _70, "pr": _70, "rj": _70, "rn": _70, "ro": _70, "rr": _70, "rs": _70, "sc": _70, "se": _70, "sp": _70, "to": _70 }],
              "gru": _70,
              "ia": _70,
              "imb": _70,
              "ind": _70,
              "inf": _70,
              "jab": _70,
              "jampa": _70,
              "jdf": _70,
              "joinville": _70,
              "jor": _70,
              "jus": _70,
              "leg": _70,
              "leilao": _70,
              "lel": _70,
              "log": _70,
              "londrina": _70,
              "macapa": _70,
              "maceio": _70,
              "manaus": _70,
              "maringa": _70,
              "mat": _70,
              "med": _70,
              "mil": _70,
              "morena": _70,
              "mp": _70,
              "mus": _70,
              "natal": _70,
              "net": _70,
              "niteroi": _70,
              "nom": _74,
              "not": _70,
              "ntr": _70,
              "odo": _70,
              "ong": _70,
              "org": _70,
              "osasco": _70,
              "palmas": _70,
              "poa": _70,
              "ppg": _70,
              "pro": _70,
              "psc": _70,
              "psi": _70,
              "pvh": _70,
              "qsl": _70,
              "radio": _70,
              "rec": _70,
              "recife": _70,
              "rep": _70,
              "ribeirao": _70,
              "rio": _70,
              "riobranco": _70,
              "riopreto": _70,
              "salvador": _70,
              "sampa": _70,
              "santamaria": _70,
              "santoandre": _70,
              "saobernardo": _70,
              "saogonca": _70,
              "seg": _70,
              "sjc": _70,
              "slg": _70,
              "slz": _70,
              "social": _70,
              "sorocaba": _70,
              "srv": _70,
              "taxi": _70,
              "tc": _70,
              "tec": _70,
              "teo": _70,
              "the": _70,
              "tmp": _70,
              "trd": _70,
              "tur": _70,
              "tv": _70,
              "udi": _70,
              "vet": _70,
              "vix": _70,
              "vlog": _70,
              "wiki": _70,
              "xyz": _70,
              "zlg": _70
            }],
            "bs": _72,
            "bt": _72,
            "bv": _70,
            "bw": [1, { "ac": _70, "co": _70, "gov": _70, "net": _70, "org": _70 }],
            "by": [1, { "gov": _70, "mil": _70, "com": _70, "of": _70 }],
            "bz": _75,
            "ca": [1, { "ab": _70, "bc": _70, "mb": _70, "nb": _70, "nf": _70, "nl": _70, "ns": _70, "nt": _70, "nu": _70, "on": _70, "pe": _70, "qc": _70, "sk": _70, "yk": _70, "gc": _70 }],
            "cat": _70,
            "cc": _70,
            "cd": _73,
            "cf": _70,
            "cg": _70,
            "ch": _70,
            "ci": [1, { "ac": _70, "xn--aroport-bya": _70, "a\xE9roport": _70, "asso": _70, "co": _70, "com": _70, "ed": _70, "edu": _70, "go": _70, "gouv": _70, "int": _70, "net": _70, "or": _70, "org": _70 }],
            "ck": _74,
            "cl": [1, { "co": _70, "gob": _70, "gov": _70, "mil": _70 }],
            "cm": [1, { "co": _70, "com": _70, "gov": _70, "net": _70 }],
            "cn": [1, {
              "ac": _70,
              "com": _70,
              "edu": _70,
              "gov": _70,
              "mil": _70,
              "net": _70,
              "org": _70,
              "xn--55qx5d": _70,
              "\u516C\u53F8": _70,
              "xn--od0alg": _70,
              "\u7DB2\u7D61": _70,
              "xn--io0a7i": _70,
              "\u7F51\u7EDC": _70,
              "ah": _70,
              "bj": _70,
              "cq": _70,
              "fj": _70,
              "gd": _70,
              "gs": _70,
              "gx": _70,
              "gz": _70,
              "ha": _70,
              "hb": _70,
              "he": _70,
              "hi": _70,
              "hk": _70,
              "hl": _70,
              "hn": _70,
              "jl": _70,
              "js": _70,
              "jx": _70,
              "ln": _70,
              "mo": _70,
              "nm": _70,
              "nx": _70,
              "qh": _70,
              "sc": _70,
              "sd": _70,
              "sh": _70,
              "sn": _70,
              "sx": _70,
              "tj": _70,
              "tw": _70,
              "xj": _70,
              "xz": _70,
              "yn": _70,
              "zj": _70
            }],
            "co": [1, { "com": _70, "edu": _70, "gov": _70, "mil": _70, "net": _70, "nom": _70, "org": _70 }],
            "com": _70,
            "coop": _70,
            "cr": [1, { "ac": _70, "co": _70, "ed": _70, "fi": _70, "go": _70, "or": _70, "sa": _70 }],
            "cu": [1, { "com": _70, "edu": _70, "gob": _70, "inf": _70, "nat": _70, "net": _70, "org": _70 }],
            "cv": [1, { "com": _70, "edu": _70, "id": _70, "int": _70, "net": _70, "nome": _70, "org": _70, "publ": _70 }],
            "cw": _76,
            "cx": _73,
            "cy": [1, { "ac": _70, "biz": _70, "com": _70, "ekloges": _70, "gov": _70, "ltd": _70, "mil": _70, "net": _70, "org": _70, "press": _70, "pro": _70, "tm": _70 }],
            "cz": _73,
            "de": _70,
            "dj": _70,
            "dk": _70,
            "dm": _75,
            "do": [1, { "art": _70, "com": _70, "edu": _70, "gob": _70, "gov": _70, "mil": _70, "net": _70, "org": _70, "sld": _70, "web": _70 }],
            "dz": [1, { "art": _70, "asso": _70, "com": _70, "edu": _70, "gov": _70, "net": _70, "org": _70, "pol": _70, "soc": _70, "tm": _70 }],
            "ec": [1, { "abg": _70, "adm": _70, "agron": _70, "arqt": _70, "art": _70, "bar": _70, "chef": _70, "com": _70, "cont": _70, "cpa": _70, "cue": _70, "dent": _70, "dgn": _70, "disco": _70, "doc": _70, "edu": _70, "eng": _70, "esm": _70, "fin": _70, "fot": _70, "gal": _70, "gob": _70, "gov": _70, "gye": _70, "ibr": _70, "info": _70, "k12": _70, "lat": _70, "loj": _70, "med": _70, "mil": _70, "mktg": _70, "mon": _70, "net": _70, "ntr": _70, "odont": _70, "org": _70, "pro": _70, "prof": _70, "psic": _70, "psiq": _70, "pub": _70, "rio": _70, "rrpp": _70, "sal": _70, "tech": _70, "tul": _70, "tur": _70, "uio": _70, "vet": _70, "xxx": _70 }],
            "edu": _70,
            "ee": [1, {
              "aip": _70,
              "com": _70,
              "edu": _70,
              "fie": _70,
              "gov": _70,
              "lib": _70,
              "med": _70,
              "org": _70,
              "pri": _70,
              "riik": _70
            }],
            "eg": [1, { "ac": _70, "com": _70, "edu": _70, "eun": _70, "gov": _70, "info": _70, "me": _70, "mil": _70, "name": _70, "net": _70, "org": _70, "sci": _70, "sport": _70, "tv": _70 }],
            "er": _74,
            "es": [1, { "com": _70, "edu": _70, "gob": _70, "nom": _70, "org": _70 }],
            "et": [1, { "biz": _70, "com": _70, "edu": _70, "gov": _70, "info": _70, "name": _70, "net": _70, "org": _70 }],
            "eu": _70,
            "fi": [1, { "aland": _70 }],
            "fj": [1, { "ac": _70, "biz": _70, "com": _70, "gov": _70, "info": _70, "mil": _70, "name": _70, "net": _70, "org": _70, "pro": _70 }],
            "fk": _74,
            "fm": _76,
            "fo": _70,
            "fr": [1, { "asso": _70, "com": _70, "gouv": _70, "nom": _70, "prd": _70, "tm": _70, "avoues": _70, "cci": _70, "greta": _70, "huissier-justice": _70 }],
            "ga": _70,
            "gb": _70,
            "gd": [1, { "edu": _70, "gov": _70 }],
            "ge": [1, { "com": _70, "edu": _70, "gov": _70, "net": _70, "org": _70, "pvt": _70, "school": _70 }],
            "gf": _70,
            "gg": _77,
            "gh": [1, {
              "biz": _70,
              "com": _70,
              "edu": _70,
              "gov": _70,
              "mil": _70,
              "net": _70,
              "org": _70
            }],
            "gi": [1, { "com": _70, "edu": _70, "gov": _70, "ltd": _70, "mod": _70, "org": _70 }],
            "gl": [1, { "co": _70, "com": _70, "edu": _70, "net": _70, "org": _70 }],
            "gm": _70,
            "gn": [1, { "ac": _70, "com": _70, "edu": _70, "gov": _70, "net": _70, "org": _70 }],
            "gov": _70,
            "gp": [1, { "asso": _70, "com": _70, "edu": _70, "mobi": _70, "net": _70, "org": _70 }],
            "gq": _70,
            "gr": _72,
            "gs": _70,
            "gt": [1, { "com": _70, "edu": _70, "gob": _70, "ind": _70, "mil": _70, "net": _70, "org": _70 }],
            "gu": [1, { "com": _70, "edu": _70, "gov": _70, "guam": _70, "info": _70, "net": _70, "org": _70, "web": _70 }],
            "gw": _70,
            "gy": _75,
            "hk": [1, {
              "com": _70,
              "edu": _70,
              "gov": _70,
              "idv": _70,
              "net": _70,
              "org": _70,
              "xn--ciqpn": _70,
              "\u4E2A\u4EBA": _70,
              "xn--gmqw5a": _70,
              "\u500B\u4EBA": _70,
              "xn--55qx5d": _70,
              "\u516C\u53F8": _70,
              "xn--mxtq1m": _70,
              "\u653F\u5E9C": _70,
              "xn--lcvr32d": _70,
              "\u654E\u80B2": _70,
              "xn--wcvs22d": _70,
              "\u6559\u80B2": _70,
              "xn--gmq050i": _70,
              "\u7B87\u4EBA": _70,
              "xn--uc0atv": _70,
              "\u7D44\u7E54": _70,
              "xn--uc0ay4a": _70,
              "\u7D44\u7EC7": _70,
              "xn--od0alg": _70,
              "\u7DB2\u7D61": _70,
              "xn--zf0avx": _70,
              "\u7DB2\u7EDC": _70,
              "xn--mk0axi": _70,
              "\u7EC4\u7E54": _70,
              "xn--tn0ag": _70,
              "\u7EC4\u7EC7": _70,
              "xn--od0aq3b": _70,
              "\u7F51\u7D61": _70,
              "xn--io0a7i": _70,
              "\u7F51\u7EDC": _70
            }],
            "hm": _70,
            "hn": [1, { "com": _70, "edu": _70, "gob": _70, "mil": _70, "net": _70, "org": _70 }],
            "hr": [1, { "com": _70, "from": _70, "iz": _70, "name": _70 }],
            "ht": [1, { "adult": _70, "art": _70, "asso": _70, "com": _70, "coop": _70, "edu": _70, "firm": _70, "gouv": _70, "info": _70, "med": _70, "net": _70, "org": _70, "perso": _70, "pol": _70, "pro": _70, "rel": _70, "shop": _70 }],
            "hu": [1, { "2000": _70, "agrar": _70, "bolt": _70, "casino": _70, "city": _70, "co": _70, "erotica": _70, "erotika": _70, "film": _70, "forum": _70, "games": _70, "hotel": _70, "info": _70, "ingatlan": _70, "jogasz": _70, "konyvelo": _70, "lakas": _70, "media": _70, "news": _70, "org": _70, "priv": _70, "reklam": _70, "sex": _70, "shop": _70, "sport": _70, "suli": _70, "szex": _70, "tm": _70, "tozsde": _70, "utazas": _70, "video": _70 }],
            "id": [1, { "ac": _70, "biz": _70, "co": _70, "desa": _70, "go": _70, "kop": _70, "mil": _70, "my": _70, "net": _70, "or": _70, "ponpes": _70, "sch": _70, "web": _70 }],
            "ie": _73,
            "il": [1, { "ac": _70, "co": _70, "gov": _70, "idf": _70, "k12": _70, "muni": _70, "net": _70, "org": _70 }],
            "xn--4dbrk0ce": [1, { "xn--4dbgdty6c": _70, "xn--5dbhl8d": _70, "xn--8dbq2a": _70, "xn--hebda8b": _70 }],
            "\u05D9\u05E9\u05E8\u05D0\u05DC": [1, { "\u05D0\u05E7\u05D3\u05DE\u05D9\u05D4": _70, "\u05D9\u05E9\u05D5\u05D1": _70, "\u05E6\u05D4\u05DC": _70, "\u05DE\u05DE\u05E9\u05DC": _70 }],
            "im": [1, { "ac": _70, "co": [1, { "ltd": _70, "plc": _70 }], "com": _70, "net": _70, "org": _70, "tt": _70, "tv": _70 }],
            "in": [1, { "5g": _70, "6g": _70, "ac": _70, "ai": _70, "am": _70, "bihar": _70, "biz": _70, "business": _70, "ca": _70, "cn": _70, "co": _70, "com": _70, "coop": _70, "cs": _70, "delhi": _70, "dr": _70, "edu": _70, "er": _70, "firm": _70, "gen": _70, "gov": _70, "gujarat": _70, "ind": _70, "info": _70, "int": _70, "internet": _70, "io": _70, "me": _70, "mil": _70, "net": _70, "nic": _70, "org": _70, "pg": _70, "post": _70, "pro": _70, "res": _70, "travel": _70, "tv": _70, "uk": _70, "up": _70, "us": _70 }],
            "info": _70,
            "int": [1, { "eu": _70 }],
            "io": _78,
            "iq": _71,
            "ir": [1, { "ac": _70, "co": _70, "gov": _70, "id": _70, "net": _70, "org": _70, "sch": _70, "xn--mgba3a4f16a": _70, "\u0627\u06CC\u0631\u0627\u0646": _70, "xn--mgba3a4fra": _70, "\u0627\u064A\u0631\u0627\u0646": _70 }],
            "is": _70,
            "it": [1, {
              "edu": _70,
              "gov": _70,
              "abr": _70,
              "abruzzo": _70,
              "aosta-valley": _70,
              "aostavalley": _70,
              "bas": _70,
              "basilicata": _70,
              "cal": _70,
              "calabria": _70,
              "cam": _70,
              "campania": _70,
              "emilia-romagna": _70,
              "emiliaromagna": _70,
              "emr": _70,
              "friuli-v-giulia": _70,
              "friuli-ve-giulia": _70,
              "friuli-vegiulia": _70,
              "friuli-venezia-giulia": _70,
              "friuli-veneziagiulia": _70,
              "friuli-vgiulia": _70,
              "friuliv-giulia": _70,
              "friulive-giulia": _70,
              "friulivegiulia": _70,
              "friulivenezia-giulia": _70,
              "friuliveneziagiulia": _70,
              "friulivgiulia": _70,
              "fvg": _70,
              "laz": _70,
              "lazio": _70,
              "lig": _70,
              "liguria": _70,
              "lom": _70,
              "lombardia": _70,
              "lombardy": _70,
              "lucania": _70,
              "mar": _70,
              "marche": _70,
              "mol": _70,
              "molise": _70,
              "piedmont": _70,
              "piemonte": _70,
              "pmn": _70,
              "pug": _70,
              "puglia": _70,
              "sar": _70,
              "sardegna": _70,
              "sardinia": _70,
              "sic": _70,
              "sicilia": _70,
              "sicily": _70,
              "taa": _70,
              "tos": _70,
              "toscana": _70,
              "trentin-sud-tirol": _70,
              "xn--trentin-sd-tirol-rzb": _70,
              "trentin-s\xFCd-tirol": _70,
              "trentin-sudtirol": _70,
              "xn--trentin-sdtirol-7vb": _70,
              "trentin-s\xFCdtirol": _70,
              "trentin-sued-tirol": _70,
              "trentin-suedtirol": _70,
              "trentino": _70,
              "trentino-a-adige": _70,
              "trentino-aadige": _70,
              "trentino-alto-adige": _70,
              "trentino-altoadige": _70,
              "trentino-s-tirol": _70,
              "trentino-stirol": _70,
              "trentino-sud-tirol": _70,
              "xn--trentino-sd-tirol-c3b": _70,
              "trentino-s\xFCd-tirol": _70,
              "trentino-sudtirol": _70,
              "xn--trentino-sdtirol-szb": _70,
              "trentino-s\xFCdtirol": _70,
              "trentino-sued-tirol": _70,
              "trentino-suedtirol": _70,
              "trentinoa-adige": _70,
              "trentinoaadige": _70,
              "trentinoalto-adige": _70,
              "trentinoaltoadige": _70,
              "trentinos-tirol": _70,
              "trentinostirol": _70,
              "trentinosud-tirol": _70,
              "xn--trentinosd-tirol-rzb": _70,
              "trentinos\xFCd-tirol": _70,
              "trentinosudtirol": _70,
              "xn--trentinosdtirol-7vb": _70,
              "trentinos\xFCdtirol": _70,
              "trentinosued-tirol": _70,
              "trentinosuedtirol": _70,
              "trentinsud-tirol": _70,
              "xn--trentinsd-tirol-6vb": _70,
              "trentins\xFCd-tirol": _70,
              "trentinsudtirol": _70,
              "xn--trentinsdtirol-nsb": _70,
              "trentins\xFCdtirol": _70,
              "trentinsued-tirol": _70,
              "trentinsuedtirol": _70,
              "tuscany": _70,
              "umb": _70,
              "umbria": _70,
              "val-d-aosta": _70,
              "val-daosta": _70,
              "vald-aosta": _70,
              "valdaosta": _70,
              "valle-aosta": _70,
              "valle-d-aosta": _70,
              "valle-daosta": _70,
              "valleaosta": _70,
              "valled-aosta": _70,
              "valledaosta": _70,
              "vallee-aoste": _70,
              "xn--valle-aoste-ebb": _70,
              "vall\xE9e-aoste": _70,
              "vallee-d-aoste": _70,
              "xn--valle-d-aoste-ehb": _70,
              "vall\xE9e-d-aoste": _70,
              "valleeaoste": _70,
              "xn--valleaoste-e7a": _70,
              "vall\xE9eaoste": _70,
              "valleedaoste": _70,
              "xn--valledaoste-ebb": _70,
              "vall\xE9edaoste": _70,
              "vao": _70,
              "vda": _70,
              "ven": _70,
              "veneto": _70,
              "ag": _70,
              "agrigento": _70,
              "al": _70,
              "alessandria": _70,
              "alto-adige": _70,
              "altoadige": _70,
              "an": _70,
              "ancona": _70,
              "andria-barletta-trani": _70,
              "andria-trani-barletta": _70,
              "andriabarlettatrani": _70,
              "andriatranibarletta": _70,
              "ao": _70,
              "aosta": _70,
              "aoste": _70,
              "ap": _70,
              "aq": _70,
              "aquila": _70,
              "ar": _70,
              "arezzo": _70,
              "ascoli-piceno": _70,
              "ascolipiceno": _70,
              "asti": _70,
              "at": _70,
              "av": _70,
              "avellino": _70,
              "ba": _70,
              "balsan": _70,
              "balsan-sudtirol": _70,
              "xn--balsan-sdtirol-nsb": _70,
              "balsan-s\xFCdtirol": _70,
              "balsan-suedtirol": _70,
              "bari": _70,
              "barletta-trani-andria": _70,
              "barlettatraniandria": _70,
              "belluno": _70,
              "benevento": _70,
              "bergamo": _70,
              "bg": _70,
              "bi": _70,
              "biella": _70,
              "bl": _70,
              "bn": _70,
              "bo": _70,
              "bologna": _70,
              "bolzano": _70,
              "bolzano-altoadige": _70,
              "bozen": _70,
              "bozen-sudtirol": _70,
              "xn--bozen-sdtirol-2ob": _70,
              "bozen-s\xFCdtirol": _70,
              "bozen-suedtirol": _70,
              "br": _70,
              "brescia": _70,
              "brindisi": _70,
              "bs": _70,
              "bt": _70,
              "bulsan": _70,
              "bulsan-sudtirol": _70,
              "xn--bulsan-sdtirol-nsb": _70,
              "bulsan-s\xFCdtirol": _70,
              "bulsan-suedtirol": _70,
              "bz": _70,
              "ca": _70,
              "cagliari": _70,
              "caltanissetta": _70,
              "campidano-medio": _70,
              "campidanomedio": _70,
              "campobasso": _70,
              "carbonia-iglesias": _70,
              "carboniaiglesias": _70,
              "carrara-massa": _70,
              "carraramassa": _70,
              "caserta": _70,
              "catania": _70,
              "catanzaro": _70,
              "cb": _70,
              "ce": _70,
              "cesena-forli": _70,
              "xn--cesena-forl-mcb": _70,
              "cesena-forl\xEC": _70,
              "cesenaforli": _70,
              "xn--cesenaforl-i8a": _70,
              "cesenaforl\xEC": _70,
              "ch": _70,
              "chieti": _70,
              "ci": _70,
              "cl": _70,
              "cn": _70,
              "co": _70,
              "como": _70,
              "cosenza": _70,
              "cr": _70,
              "cremona": _70,
              "crotone": _70,
              "cs": _70,
              "ct": _70,
              "cuneo": _70,
              "cz": _70,
              "dell-ogliastra": _70,
              "dellogliastra": _70,
              "en": _70,
              "enna": _70,
              "fc": _70,
              "fe": _70,
              "fermo": _70,
              "ferrara": _70,
              "fg": _70,
              "fi": _70,
              "firenze": _70,
              "florence": _70,
              "fm": _70,
              "foggia": _70,
              "forli-cesena": _70,
              "xn--forl-cesena-fcb": _70,
              "forl\xEC-cesena": _70,
              "forlicesena": _70,
              "xn--forlcesena-c8a": _70,
              "forl\xECcesena": _70,
              "fr": _70,
              "frosinone": _70,
              "ge": _70,
              "genoa": _70,
              "genova": _70,
              "go": _70,
              "gorizia": _70,
              "gr": _70,
              "grosseto": _70,
              "iglesias-carbonia": _70,
              "iglesiascarbonia": _70,
              "im": _70,
              "imperia": _70,
              "is": _70,
              "isernia": _70,
              "kr": _70,
              "la-spezia": _70,
              "laquila": _70,
              "laspezia": _70,
              "latina": _70,
              "lc": _70,
              "le": _70,
              "lecce": _70,
              "lecco": _70,
              "li": _70,
              "livorno": _70,
              "lo": _70,
              "lodi": _70,
              "lt": _70,
              "lu": _70,
              "lucca": _70,
              "macerata": _70,
              "mantova": _70,
              "massa-carrara": _70,
              "massacarrara": _70,
              "matera": _70,
              "mb": _70,
              "mc": _70,
              "me": _70,
              "medio-campidano": _70,
              "mediocampidano": _70,
              "messina": _70,
              "mi": _70,
              "milan": _70,
              "milano": _70,
              "mn": _70,
              "mo": _70,
              "modena": _70,
              "monza": _70,
              "monza-brianza": _70,
              "monza-e-della-brianza": _70,
              "monzabrianza": _70,
              "monzaebrianza": _70,
              "monzaedellabrianza": _70,
              "ms": _70,
              "mt": _70,
              "na": _70,
              "naples": _70,
              "napoli": _70,
              "no": _70,
              "novara": _70,
              "nu": _70,
              "nuoro": _70,
              "og": _70,
              "ogliastra": _70,
              "olbia-tempio": _70,
              "olbiatempio": _70,
              "or": _70,
              "oristano": _70,
              "ot": _70,
              "pa": _70,
              "padova": _70,
              "padua": _70,
              "palermo": _70,
              "parma": _70,
              "pavia": _70,
              "pc": _70,
              "pd": _70,
              "pe": _70,
              "perugia": _70,
              "pesaro-urbino": _70,
              "pesarourbino": _70,
              "pescara": _70,
              "pg": _70,
              "pi": _70,
              "piacenza": _70,
              "pisa": _70,
              "pistoia": _70,
              "pn": _70,
              "po": _70,
              "pordenone": _70,
              "potenza": _70,
              "pr": _70,
              "prato": _70,
              "pt": _70,
              "pu": _70,
              "pv": _70,
              "pz": _70,
              "ra": _70,
              "ragusa": _70,
              "ravenna": _70,
              "rc": _70,
              "re": _70,
              "reggio-calabria": _70,
              "reggio-emilia": _70,
              "reggiocalabria": _70,
              "reggioemilia": _70,
              "rg": _70,
              "ri": _70,
              "rieti": _70,
              "rimini": _70,
              "rm": _70,
              "rn": _70,
              "ro": _70,
              "roma": _70,
              "rome": _70,
              "rovigo": _70,
              "sa": _70,
              "salerno": _70,
              "sassari": _70,
              "savona": _70,
              "si": _70,
              "siena": _70,
              "siracusa": _70,
              "so": _70,
              "sondrio": _70,
              "sp": _70,
              "sr": _70,
              "ss": _70,
              "xn--sdtirol-n2a": _70,
              "s\xFCdtirol": _70,
              "suedtirol": _70,
              "sv": _70,
              "ta": _70,
              "taranto": _70,
              "te": _70,
              "tempio-olbia": _70,
              "tempioolbia": _70,
              "teramo": _70,
              "terni": _70,
              "tn": _70,
              "to": _70,
              "torino": _70,
              "tp": _70,
              "tr": _70,
              "trani-andria-barletta": _70,
              "trani-barletta-andria": _70,
              "traniandriabarletta": _70,
              "tranibarlettaandria": _70,
              "trapani": _70,
              "trento": _70,
              "treviso": _70,
              "trieste": _70,
              "ts": _70,
              "turin": _70,
              "tv": _70,
              "ud": _70,
              "udine": _70,
              "urbino-pesaro": _70,
              "urbinopesaro": _70,
              "va": _70,
              "varese": _70,
              "vb": _70,
              "vc": _70,
              "ve": _70,
              "venezia": _70,
              "venice": _70,
              "verbania": _70,
              "vercelli": _70,
              "verona": _70,
              "vi": _70,
              "vibo-valentia": _70,
              "vibovalentia": _70,
              "vicenza": _70,
              "viterbo": _70,
              "vr": _70,
              "vs": _70,
              "vt": _70,
              "vv": _70
            }],
            "je": _77,
            "jm": _74,
            "jo": [1, { "agri": _70, "ai": _70, "com": _70, "edu": _70, "eng": _70, "fm": _70, "gov": _70, "mil": _70, "net": _70, "org": _70, "per": _70, "phd": _70, "sch": _70, "tv": _70 }],
            "jobs": _70,
            "jp": [1, {
              "ac": _70,
              "ad": _70,
              "co": _70,
              "ed": _70,
              "go": _70,
              "gr": _70,
              "lg": _70,
              "ne": _70,
              "or": _70,
              "aichi": [1, {
                "aisai": _70,
                "ama": _70,
                "anjo": _70,
                "asuke": _70,
                "chiryu": _70,
                "chita": _70,
                "fuso": _70,
                "gamagori": _70,
                "handa": _70,
                "hazu": _70,
                "hekinan": _70,
                "higashiura": _70,
                "ichinomiya": _70,
                "inazawa": _70,
                "inuyama": _70,
                "isshiki": _70,
                "iwakura": _70,
                "kanie": _70,
                "kariya": _70,
                "kasugai": _70,
                "kira": _70,
                "kiyosu": _70,
                "komaki": _70,
                "konan": _70,
                "kota": _70,
                "mihama": _70,
                "miyoshi": _70,
                "nishio": _70,
                "nisshin": _70,
                "obu": _70,
                "oguchi": _70,
                "oharu": _70,
                "okazaki": _70,
                "owariasahi": _70,
                "seto": _70,
                "shikatsu": _70,
                "shinshiro": _70,
                "shitara": _70,
                "tahara": _70,
                "takahama": _70,
                "tobishima": _70,
                "toei": _70,
                "togo": _70,
                "tokai": _70,
                "tokoname": _70,
                "toyoake": _70,
                "toyohashi": _70,
                "toyokawa": _70,
                "toyone": _70,
                "toyota": _70,
                "tsushima": _70,
                "yatomi": _70
              }],
              "akita": [1, { "akita": _70, "daisen": _70, "fujisato": _70, "gojome": _70, "hachirogata": _70, "happou": _70, "higashinaruse": _70, "honjo": _70, "honjyo": _70, "ikawa": _70, "kamikoani": _70, "kamioka": _70, "katagami": _70, "kazuno": _70, "kitaakita": _70, "kosaka": _70, "kyowa": _70, "misato": _70, "mitane": _70, "moriyoshi": _70, "nikaho": _70, "noshiro": _70, "odate": _70, "oga": _70, "ogata": _70, "semboku": _70, "yokote": _70, "yurihonjo": _70 }],
              "aomori": [1, { "aomori": _70, "gonohe": _70, "hachinohe": _70, "hashikami": _70, "hiranai": _70, "hirosaki": _70, "itayanagi": _70, "kuroishi": _70, "misawa": _70, "mutsu": _70, "nakadomari": _70, "noheji": _70, "oirase": _70, "owani": _70, "rokunohe": _70, "sannohe": _70, "shichinohe": _70, "shingo": _70, "takko": _70, "towada": _70, "tsugaru": _70, "tsuruta": _70 }],
              "chiba": [1, {
                "abiko": _70,
                "asahi": _70,
                "chonan": _70,
                "chosei": _70,
                "choshi": _70,
                "chuo": _70,
                "funabashi": _70,
                "futtsu": _70,
                "hanamigawa": _70,
                "ichihara": _70,
                "ichikawa": _70,
                "ichinomiya": _70,
                "inzai": _70,
                "isumi": _70,
                "kamagaya": _70,
                "kamogawa": _70,
                "kashiwa": _70,
                "katori": _70,
                "katsuura": _70,
                "kimitsu": _70,
                "kisarazu": _70,
                "kozaki": _70,
                "kujukuri": _70,
                "kyonan": _70,
                "matsudo": _70,
                "midori": _70,
                "mihama": _70,
                "minamiboso": _70,
                "mobara": _70,
                "mutsuzawa": _70,
                "nagara": _70,
                "nagareyama": _70,
                "narashino": _70,
                "narita": _70,
                "noda": _70,
                "oamishirasato": _70,
                "omigawa": _70,
                "onjuku": _70,
                "otaki": _70,
                "sakae": _70,
                "sakura": _70,
                "shimofusa": _70,
                "shirako": _70,
                "shiroi": _70,
                "shisui": _70,
                "sodegaura": _70,
                "sosa": _70,
                "tako": _70,
                "tateyama": _70,
                "togane": _70,
                "tohnosho": _70,
                "tomisato": _70,
                "urayasu": _70,
                "yachimata": _70,
                "yachiyo": _70,
                "yokaichiba": _70,
                "yokoshibahikari": _70,
                "yotsukaido": _70
              }],
              "ehime": [1, { "ainan": _70, "honai": _70, "ikata": _70, "imabari": _70, "iyo": _70, "kamijima": _70, "kihoku": _70, "kumakogen": _70, "masaki": _70, "matsuno": _70, "matsuyama": _70, "namikata": _70, "niihama": _70, "ozu": _70, "saijo": _70, "seiyo": _70, "shikokuchuo": _70, "tobe": _70, "toon": _70, "uchiko": _70, "uwajima": _70, "yawatahama": _70 }],
              "fukui": [1, { "echizen": _70, "eiheiji": _70, "fukui": _70, "ikeda": _70, "katsuyama": _70, "mihama": _70, "minamiechizen": _70, "obama": _70, "ohi": _70, "ono": _70, "sabae": _70, "sakai": _70, "takahama": _70, "tsuruga": _70, "wakasa": _70 }],
              "fukuoka": [1, {
                "ashiya": _70,
                "buzen": _70,
                "chikugo": _70,
                "chikuho": _70,
                "chikujo": _70,
                "chikushino": _70,
                "chikuzen": _70,
                "chuo": _70,
                "dazaifu": _70,
                "fukuchi": _70,
                "hakata": _70,
                "higashi": _70,
                "hirokawa": _70,
                "hisayama": _70,
                "iizuka": _70,
                "inatsuki": _70,
                "kaho": _70,
                "kasuga": _70,
                "kasuya": _70,
                "kawara": _70,
                "keisen": _70,
                "koga": _70,
                "kurate": _70,
                "kurogi": _70,
                "kurume": _70,
                "minami": _70,
                "miyako": _70,
                "miyama": _70,
                "miyawaka": _70,
                "mizumaki": _70,
                "munakata": _70,
                "nakagawa": _70,
                "nakama": _70,
                "nishi": _70,
                "nogata": _70,
                "ogori": _70,
                "okagaki": _70,
                "okawa": _70,
                "oki": _70,
                "omuta": _70,
                "onga": _70,
                "onojo": _70,
                "oto": _70,
                "saigawa": _70,
                "sasaguri": _70,
                "shingu": _70,
                "shinyoshitomi": _70,
                "shonai": _70,
                "soeda": _70,
                "sue": _70,
                "tachiarai": _70,
                "tagawa": _70,
                "takata": _70,
                "toho": _70,
                "toyotsu": _70,
                "tsuiki": _70,
                "ukiha": _70,
                "umi": _70,
                "usui": _70,
                "yamada": _70,
                "yame": _70,
                "yanagawa": _70,
                "yukuhashi": _70
              }],
              "fukushima": [1, {
                "aizubange": _70,
                "aizumisato": _70,
                "aizuwakamatsu": _70,
                "asakawa": _70,
                "bandai": _70,
                "date": _70,
                "fukushima": _70,
                "furudono": _70,
                "futaba": _70,
                "hanawa": _70,
                "higashi": _70,
                "hirata": _70,
                "hirono": _70,
                "iitate": _70,
                "inawashiro": _70,
                "ishikawa": _70,
                "iwaki": _70,
                "izumizaki": _70,
                "kagamiishi": _70,
                "kaneyama": _70,
                "kawamata": _70,
                "kitakata": _70,
                "kitashiobara": _70,
                "koori": _70,
                "koriyama": _70,
                "kunimi": _70,
                "miharu": _70,
                "mishima": _70,
                "namie": _70,
                "nango": _70,
                "nishiaizu": _70,
                "nishigo": _70,
                "okuma": _70,
                "omotego": _70,
                "ono": _70,
                "otama": _70,
                "samegawa": _70,
                "shimogo": _70,
                "shirakawa": _70,
                "showa": _70,
                "soma": _70,
                "sukagawa": _70,
                "taishin": _70,
                "tamakawa": _70,
                "tanagura": _70,
                "tenei": _70,
                "yabuki": _70,
                "yamato": _70,
                "yamatsuri": _70,
                "yanaizu": _70,
                "yugawa": _70
              }],
              "gifu": [1, { "anpachi": _70, "ena": _70, "gifu": _70, "ginan": _70, "godo": _70, "gujo": _70, "hashima": _70, "hichiso": _70, "hida": _70, "higashishirakawa": _70, "ibigawa": _70, "ikeda": _70, "kakamigahara": _70, "kani": _70, "kasahara": _70, "kasamatsu": _70, "kawaue": _70, "kitagata": _70, "mino": _70, "minokamo": _70, "mitake": _70, "mizunami": _70, "motosu": _70, "nakatsugawa": _70, "ogaki": _70, "sakahogi": _70, "seki": _70, "sekigahara": _70, "shirakawa": _70, "tajimi": _70, "takayama": _70, "tarui": _70, "toki": _70, "tomika": _70, "wanouchi": _70, "yamagata": _70, "yaotsu": _70, "yoro": _70 }],
              "gunma": [1, {
                "annaka": _70,
                "chiyoda": _70,
                "fujioka": _70,
                "higashiagatsuma": _70,
                "isesaki": _70,
                "itakura": _70,
                "kanna": _70,
                "kanra": _70,
                "katashina": _70,
                "kawaba": _70,
                "kiryu": _70,
                "kusatsu": _70,
                "maebashi": _70,
                "meiwa": _70,
                "midori": _70,
                "minakami": _70,
                "naganohara": _70,
                "nakanojo": _70,
                "nanmoku": _70,
                "numata": _70,
                "oizumi": _70,
                "ora": _70,
                "ota": _70,
                "shibukawa": _70,
                "shimonita": _70,
                "shinto": _70,
                "showa": _70,
                "takasaki": _70,
                "takayama": _70,
                "tamamura": _70,
                "tatebayashi": _70,
                "tomioka": _70,
                "tsukiyono": _70,
                "tsumagoi": _70,
                "ueno": _70,
                "yoshioka": _70
              }],
              "hiroshima": [1, { "asaminami": _70, "daiwa": _70, "etajima": _70, "fuchu": _70, "fukuyama": _70, "hatsukaichi": _70, "higashihiroshima": _70, "hongo": _70, "jinsekikogen": _70, "kaita": _70, "kui": _70, "kumano": _70, "kure": _70, "mihara": _70, "miyoshi": _70, "naka": _70, "onomichi": _70, "osakikamijima": _70, "otake": _70, "saka": _70, "sera": _70, "seranishi": _70, "shinichi": _70, "shobara": _70, "takehara": _70 }],
              "hokkaido": [1, {
                "abashiri": _70,
                "abira": _70,
                "aibetsu": _70,
                "akabira": _70,
                "akkeshi": _70,
                "asahikawa": _70,
                "ashibetsu": _70,
                "ashoro": _70,
                "assabu": _70,
                "atsuma": _70,
                "bibai": _70,
                "biei": _70,
                "bifuka": _70,
                "bihoro": _70,
                "biratori": _70,
                "chippubetsu": _70,
                "chitose": _70,
                "date": _70,
                "ebetsu": _70,
                "embetsu": _70,
                "eniwa": _70,
                "erimo": _70,
                "esan": _70,
                "esashi": _70,
                "fukagawa": _70,
                "fukushima": _70,
                "furano": _70,
                "furubira": _70,
                "haboro": _70,
                "hakodate": _70,
                "hamatonbetsu": _70,
                "hidaka": _70,
                "higashikagura": _70,
                "higashikawa": _70,
                "hiroo": _70,
                "hokuryu": _70,
                "hokuto": _70,
                "honbetsu": _70,
                "horokanai": _70,
                "horonobe": _70,
                "ikeda": _70,
                "imakane": _70,
                "ishikari": _70,
                "iwamizawa": _70,
                "iwanai": _70,
                "kamifurano": _70,
                "kamikawa": _70,
                "kamishihoro": _70,
                "kamisunagawa": _70,
                "kamoenai": _70,
                "kayabe": _70,
                "kembuchi": _70,
                "kikonai": _70,
                "kimobetsu": _70,
                "kitahiroshima": _70,
                "kitami": _70,
                "kiyosato": _70,
                "koshimizu": _70,
                "kunneppu": _70,
                "kuriyama": _70,
                "kuromatsunai": _70,
                "kushiro": _70,
                "kutchan": _70,
                "kyowa": _70,
                "mashike": _70,
                "matsumae": _70,
                "mikasa": _70,
                "minamifurano": _70,
                "mombetsu": _70,
                "moseushi": _70,
                "mukawa": _70,
                "muroran": _70,
                "naie": _70,
                "nakagawa": _70,
                "nakasatsunai": _70,
                "nakatombetsu": _70,
                "nanae": _70,
                "nanporo": _70,
                "nayoro": _70,
                "nemuro": _70,
                "niikappu": _70,
                "niki": _70,
                "nishiokoppe": _70,
                "noboribetsu": _70,
                "numata": _70,
                "obihiro": _70,
                "obira": _70,
                "oketo": _70,
                "okoppe": _70,
                "otaru": _70,
                "otobe": _70,
                "otofuke": _70,
                "otoineppu": _70,
                "oumu": _70,
                "ozora": _70,
                "pippu": _70,
                "rankoshi": _70,
                "rebun": _70,
                "rikubetsu": _70,
                "rishiri": _70,
                "rishirifuji": _70,
                "saroma": _70,
                "sarufutsu": _70,
                "shakotan": _70,
                "shari": _70,
                "shibecha": _70,
                "shibetsu": _70,
                "shikabe": _70,
                "shikaoi": _70,
                "shimamaki": _70,
                "shimizu": _70,
                "shimokawa": _70,
                "shinshinotsu": _70,
                "shintoku": _70,
                "shiranuka": _70,
                "shiraoi": _70,
                "shiriuchi": _70,
                "sobetsu": _70,
                "sunagawa": _70,
                "taiki": _70,
                "takasu": _70,
                "takikawa": _70,
                "takinoue": _70,
                "teshikaga": _70,
                "tobetsu": _70,
                "tohma": _70,
                "tomakomai": _70,
                "tomari": _70,
                "toya": _70,
                "toyako": _70,
                "toyotomi": _70,
                "toyoura": _70,
                "tsubetsu": _70,
                "tsukigata": _70,
                "urakawa": _70,
                "urausu": _70,
                "uryu": _70,
                "utashinai": _70,
                "wakkanai": _70,
                "wassamu": _70,
                "yakumo": _70,
                "yoichi": _70
              }],
              "hyogo": [1, { "aioi": _70, "akashi": _70, "ako": _70, "amagasaki": _70, "aogaki": _70, "asago": _70, "ashiya": _70, "awaji": _70, "fukusaki": _70, "goshiki": _70, "harima": _70, "himeji": _70, "ichikawa": _70, "inagawa": _70, "itami": _70, "kakogawa": _70, "kamigori": _70, "kamikawa": _70, "kasai": _70, "kasuga": _70, "kawanishi": _70, "miki": _70, "minamiawaji": _70, "nishinomiya": _70, "nishiwaki": _70, "ono": _70, "sanda": _70, "sannan": _70, "sasayama": _70, "sayo": _70, "shingu": _70, "shinonsen": _70, "shiso": _70, "sumoto": _70, "taishi": _70, "taka": _70, "takarazuka": _70, "takasago": _70, "takino": _70, "tamba": _70, "tatsuno": _70, "toyooka": _70, "yabu": _70, "yashiro": _70, "yoka": _70, "yokawa": _70 }],
              "ibaraki": [1, { "ami": _70, "asahi": _70, "bando": _70, "chikusei": _70, "daigo": _70, "fujishiro": _70, "hitachi": _70, "hitachinaka": _70, "hitachiomiya": _70, "hitachiota": _70, "ibaraki": _70, "ina": _70, "inashiki": _70, "itako": _70, "iwama": _70, "joso": _70, "kamisu": _70, "kasama": _70, "kashima": _70, "kasumigaura": _70, "koga": _70, "miho": _70, "mito": _70, "moriya": _70, "naka": _70, "namegata": _70, "oarai": _70, "ogawa": _70, "omitama": _70, "ryugasaki": _70, "sakai": _70, "sakuragawa": _70, "shimodate": _70, "shimotsuma": _70, "shirosato": _70, "sowa": _70, "suifu": _70, "takahagi": _70, "tamatsukuri": _70, "tokai": _70, "tomobe": _70, "tone": _70, "toride": _70, "tsuchiura": _70, "tsukuba": _70, "uchihara": _70, "ushiku": _70, "yachiyo": _70, "yamagata": _70, "yawara": _70, "yuki": _70 }],
              "ishikawa": [1, {
                "anamizu": _70,
                "hakui": _70,
                "hakusan": _70,
                "kaga": _70,
                "kahoku": _70,
                "kanazawa": _70,
                "kawakita": _70,
                "komatsu": _70,
                "nakanoto": _70,
                "nanao": _70,
                "nomi": _70,
                "nonoichi": _70,
                "noto": _70,
                "shika": _70,
                "suzu": _70,
                "tsubata": _70,
                "tsurugi": _70,
                "uchinada": _70,
                "wajima": _70
              }],
              "iwate": [1, { "fudai": _70, "fujisawa": _70, "hanamaki": _70, "hiraizumi": _70, "hirono": _70, "ichinohe": _70, "ichinoseki": _70, "iwaizumi": _70, "iwate": _70, "joboji": _70, "kamaishi": _70, "kanegasaki": _70, "karumai": _70, "kawai": _70, "kitakami": _70, "kuji": _70, "kunohe": _70, "kuzumaki": _70, "miyako": _70, "mizusawa": _70, "morioka": _70, "ninohe": _70, "noda": _70, "ofunato": _70, "oshu": _70, "otsuchi": _70, "rikuzentakata": _70, "shiwa": _70, "shizukuishi": _70, "sumita": _70, "tanohata": _70, "tono": _70, "yahaba": _70, "yamada": _70 }],
              "kagawa": [1, { "ayagawa": _70, "higashikagawa": _70, "kanonji": _70, "kotohira": _70, "manno": _70, "marugame": _70, "mitoyo": _70, "naoshima": _70, "sanuki": _70, "tadotsu": _70, "takamatsu": _70, "tonosho": _70, "uchinomi": _70, "utazu": _70, "zentsuji": _70 }],
              "kagoshima": [1, { "akune": _70, "amami": _70, "hioki": _70, "isa": _70, "isen": _70, "izumi": _70, "kagoshima": _70, "kanoya": _70, "kawanabe": _70, "kinko": _70, "kouyama": _70, "makurazaki": _70, "matsumoto": _70, "minamitane": _70, "nakatane": _70, "nishinoomote": _70, "satsumasendai": _70, "soo": _70, "tarumizu": _70, "yusui": _70 }],
              "kanagawa": [1, { "aikawa": _70, "atsugi": _70, "ayase": _70, "chigasaki": _70, "ebina": _70, "fujisawa": _70, "hadano": _70, "hakone": _70, "hiratsuka": _70, "isehara": _70, "kaisei": _70, "kamakura": _70, "kiyokawa": _70, "matsuda": _70, "minamiashigara": _70, "miura": _70, "nakai": _70, "ninomiya": _70, "odawara": _70, "oi": _70, "oiso": _70, "sagamihara": _70, "samukawa": _70, "tsukui": _70, "yamakita": _70, "yamato": _70, "yokosuka": _70, "yugawara": _70, "zama": _70, "zushi": _70 }],
              "kochi": [1, {
                "aki": _70,
                "geisei": _70,
                "hidaka": _70,
                "higashitsuno": _70,
                "ino": _70,
                "kagami": _70,
                "kami": _70,
                "kitagawa": _70,
                "kochi": _70,
                "mihara": _70,
                "motoyama": _70,
                "muroto": _70,
                "nahari": _70,
                "nakamura": _70,
                "nankoku": _70,
                "nishitosa": _70,
                "niyodogawa": _70,
                "ochi": _70,
                "okawa": _70,
                "otoyo": _70,
                "otsuki": _70,
                "sakawa": _70,
                "sukumo": _70,
                "susaki": _70,
                "tosa": _70,
                "tosashimizu": _70,
                "toyo": _70,
                "tsuno": _70,
                "umaji": _70,
                "yasuda": _70,
                "yusuhara": _70
              }],
              "kumamoto": [1, { "amakusa": _70, "arao": _70, "aso": _70, "choyo": _70, "gyokuto": _70, "kamiamakusa": _70, "kikuchi": _70, "kumamoto": _70, "mashiki": _70, "mifune": _70, "minamata": _70, "minamioguni": _70, "nagasu": _70, "nishihara": _70, "oguni": _70, "ozu": _70, "sumoto": _70, "takamori": _70, "uki": _70, "uto": _70, "yamaga": _70, "yamato": _70, "yatsushiro": _70 }],
              "kyoto": [1, { "ayabe": _70, "fukuchiyama": _70, "higashiyama": _70, "ide": _70, "ine": _70, "joyo": _70, "kameoka": _70, "kamo": _70, "kita": _70, "kizu": _70, "kumiyama": _70, "kyotamba": _70, "kyotanabe": _70, "kyotango": _70, "maizuru": _70, "minami": _70, "minamiyamashiro": _70, "miyazu": _70, "muko": _70, "nagaokakyo": _70, "nakagyo": _70, "nantan": _70, "oyamazaki": _70, "sakyo": _70, "seika": _70, "tanabe": _70, "uji": _70, "ujitawara": _70, "wazuka": _70, "yamashina": _70, "yawata": _70 }],
              "mie": [1, { "asahi": _70, "inabe": _70, "ise": _70, "kameyama": _70, "kawagoe": _70, "kiho": _70, "kisosaki": _70, "kiwa": _70, "komono": _70, "kumano": _70, "kuwana": _70, "matsusaka": _70, "meiwa": _70, "mihama": _70, "minamiise": _70, "misugi": _70, "miyama": _70, "nabari": _70, "shima": _70, "suzuka": _70, "tado": _70, "taiki": _70, "taki": _70, "tamaki": _70, "toba": _70, "tsu": _70, "udono": _70, "ureshino": _70, "watarai": _70, "yokkaichi": _70 }],
              "miyagi": [1, {
                "furukawa": _70,
                "higashimatsushima": _70,
                "ishinomaki": _70,
                "iwanuma": _70,
                "kakuda": _70,
                "kami": _70,
                "kawasaki": _70,
                "marumori": _70,
                "matsushima": _70,
                "minamisanriku": _70,
                "misato": _70,
                "murata": _70,
                "natori": _70,
                "ogawara": _70,
                "ohira": _70,
                "onagawa": _70,
                "osaki": _70,
                "rifu": _70,
                "semine": _70,
                "shibata": _70,
                "shichikashuku": _70,
                "shikama": _70,
                "shiogama": _70,
                "shiroishi": _70,
                "tagajo": _70,
                "taiwa": _70,
                "tome": _70,
                "tomiya": _70,
                "wakuya": _70,
                "watari": _70,
                "yamamoto": _70,
                "zao": _70
              }],
              "miyazaki": [1, { "aya": _70, "ebino": _70, "gokase": _70, "hyuga": _70, "kadogawa": _70, "kawaminami": _70, "kijo": _70, "kitagawa": _70, "kitakata": _70, "kitaura": _70, "kobayashi": _70, "kunitomi": _70, "kushima": _70, "mimata": _70, "miyakonojo": _70, "miyazaki": _70, "morotsuka": _70, "nichinan": _70, "nishimera": _70, "nobeoka": _70, "saito": _70, "shiiba": _70, "shintomi": _70, "takaharu": _70, "takanabe": _70, "takazaki": _70, "tsuno": _70 }],
              "nagano": [1, {
                "achi": _70,
                "agematsu": _70,
                "anan": _70,
                "aoki": _70,
                "asahi": _70,
                "azumino": _70,
                "chikuhoku": _70,
                "chikuma": _70,
                "chino": _70,
                "fujimi": _70,
                "hakuba": _70,
                "hara": _70,
                "hiraya": _70,
                "iida": _70,
                "iijima": _70,
                "iiyama": _70,
                "iizuna": _70,
                "ikeda": _70,
                "ikusaka": _70,
                "ina": _70,
                "karuizawa": _70,
                "kawakami": _70,
                "kiso": _70,
                "kisofukushima": _70,
                "kitaaiki": _70,
                "komagane": _70,
                "komoro": _70,
                "matsukawa": _70,
                "matsumoto": _70,
                "miasa": _70,
                "minamiaiki": _70,
                "minamimaki": _70,
                "minamiminowa": _70,
                "minowa": _70,
                "miyada": _70,
                "miyota": _70,
                "mochizuki": _70,
                "nagano": _70,
                "nagawa": _70,
                "nagiso": _70,
                "nakagawa": _70,
                "nakano": _70,
                "nozawaonsen": _70,
                "obuse": _70,
                "ogawa": _70,
                "okaya": _70,
                "omachi": _70,
                "omi": _70,
                "ookuwa": _70,
                "ooshika": _70,
                "otaki": _70,
                "otari": _70,
                "sakae": _70,
                "sakaki": _70,
                "saku": _70,
                "sakuho": _70,
                "shimosuwa": _70,
                "shinanomachi": _70,
                "shiojiri": _70,
                "suwa": _70,
                "suzaka": _70,
                "takagi": _70,
                "takamori": _70,
                "takayama": _70,
                "tateshina": _70,
                "tatsuno": _70,
                "togakushi": _70,
                "togura": _70,
                "tomi": _70,
                "ueda": _70,
                "wada": _70,
                "yamagata": _70,
                "yamanouchi": _70,
                "yasaka": _70,
                "yasuoka": _70
              }],
              "nagasaki": [1, {
                "chijiwa": _70,
                "futsu": _70,
                "goto": _70,
                "hasami": _70,
                "hirado": _70,
                "iki": _70,
                "isahaya": _70,
                "kawatana": _70,
                "kuchinotsu": _70,
                "matsuura": _70,
                "nagasaki": _70,
                "obama": _70,
                "omura": _70,
                "oseto": _70,
                "saikai": _70,
                "sasebo": _70,
                "seihi": _70,
                "shimabara": _70,
                "shinkamigoto": _70,
                "togitsu": _70,
                "tsushima": _70,
                "unzen": _70
              }],
              "nara": [1, { "ando": _70, "gose": _70, "heguri": _70, "higashiyoshino": _70, "ikaruga": _70, "ikoma": _70, "kamikitayama": _70, "kanmaki": _70, "kashiba": _70, "kashihara": _70, "katsuragi": _70, "kawai": _70, "kawakami": _70, "kawanishi": _70, "koryo": _70, "kurotaki": _70, "mitsue": _70, "miyake": _70, "nara": _70, "nosegawa": _70, "oji": _70, "ouda": _70, "oyodo": _70, "sakurai": _70, "sango": _70, "shimoichi": _70, "shimokitayama": _70, "shinjo": _70, "soni": _70, "takatori": _70, "tawaramoto": _70, "tenkawa": _70, "tenri": _70, "uda": _70, "yamatokoriyama": _70, "yamatotakada": _70, "yamazoe": _70, "yoshino": _70 }],
              "niigata": [1, {
                "aga": _70,
                "agano": _70,
                "gosen": _70,
                "itoigawa": _70,
                "izumozaki": _70,
                "joetsu": _70,
                "kamo": _70,
                "kariwa": _70,
                "kashiwazaki": _70,
                "minamiuonuma": _70,
                "mitsuke": _70,
                "muika": _70,
                "murakami": _70,
                "myoko": _70,
                "nagaoka": _70,
                "niigata": _70,
                "ojiya": _70,
                "omi": _70,
                "sado": _70,
                "sanjo": _70,
                "seiro": _70,
                "seirou": _70,
                "sekikawa": _70,
                "shibata": _70,
                "tagami": _70,
                "tainai": _70,
                "tochio": _70,
                "tokamachi": _70,
                "tsubame": _70,
                "tsunan": _70,
                "uonuma": _70,
                "yahiko": _70,
                "yoita": _70,
                "yuzawa": _70
              }],
              "oita": [1, { "beppu": _70, "bungoono": _70, "bungotakada": _70, "hasama": _70, "hiji": _70, "himeshima": _70, "hita": _70, "kamitsue": _70, "kokonoe": _70, "kuju": _70, "kunisaki": _70, "kusu": _70, "oita": _70, "saiki": _70, "taketa": _70, "tsukumi": _70, "usa": _70, "usuki": _70, "yufu": _70 }],
              "okayama": [1, { "akaiwa": _70, "asakuchi": _70, "bizen": _70, "hayashima": _70, "ibara": _70, "kagamino": _70, "kasaoka": _70, "kibichuo": _70, "kumenan": _70, "kurashiki": _70, "maniwa": _70, "misaki": _70, "nagi": _70, "niimi": _70, "nishiawakura": _70, "okayama": _70, "satosho": _70, "setouchi": _70, "shinjo": _70, "shoo": _70, "soja": _70, "takahashi": _70, "tamano": _70, "tsuyama": _70, "wake": _70, "yakage": _70 }],
              "okinawa": [1, { "aguni": _70, "ginowan": _70, "ginoza": _70, "gushikami": _70, "haebaru": _70, "higashi": _70, "hirara": _70, "iheya": _70, "ishigaki": _70, "ishikawa": _70, "itoman": _70, "izena": _70, "kadena": _70, "kin": _70, "kitadaito": _70, "kitanakagusuku": _70, "kumejima": _70, "kunigami": _70, "minamidaito": _70, "motobu": _70, "nago": _70, "naha": _70, "nakagusuku": _70, "nakijin": _70, "nanjo": _70, "nishihara": _70, "ogimi": _70, "okinawa": _70, "onna": _70, "shimoji": _70, "taketomi": _70, "tarama": _70, "tokashiki": _70, "tomigusuku": _70, "tonaki": _70, "urasoe": _70, "uruma": _70, "yaese": _70, "yomitan": _70, "yonabaru": _70, "yonaguni": _70, "zamami": _70 }],
              "osaka": [1, { "abeno": _70, "chihayaakasaka": _70, "chuo": _70, "daito": _70, "fujiidera": _70, "habikino": _70, "hannan": _70, "higashiosaka": _70, "higashisumiyoshi": _70, "higashiyodogawa": _70, "hirakata": _70, "ibaraki": _70, "ikeda": _70, "izumi": _70, "izumiotsu": _70, "izumisano": _70, "kadoma": _70, "kaizuka": _70, "kanan": _70, "kashiwara": _70, "katano": _70, "kawachinagano": _70, "kishiwada": _70, "kita": _70, "kumatori": _70, "matsubara": _70, "minato": _70, "minoh": _70, "misaki": _70, "moriguchi": _70, "neyagawa": _70, "nishi": _70, "nose": _70, "osakasayama": _70, "sakai": _70, "sayama": _70, "sennan": _70, "settsu": _70, "shijonawate": _70, "shimamoto": _70, "suita": _70, "tadaoka": _70, "taishi": _70, "tajiri": _70, "takaishi": _70, "takatsuki": _70, "tondabayashi": _70, "toyonaka": _70, "toyono": _70, "yao": _70 }],
              "saga": [1, {
                "ariake": _70,
                "arita": _70,
                "fukudomi": _70,
                "genkai": _70,
                "hamatama": _70,
                "hizen": _70,
                "imari": _70,
                "kamimine": _70,
                "kanzaki": _70,
                "karatsu": _70,
                "kashima": _70,
                "kitagata": _70,
                "kitahata": _70,
                "kiyama": _70,
                "kouhoku": _70,
                "kyuragi": _70,
                "nishiarita": _70,
                "ogi": _70,
                "omachi": _70,
                "ouchi": _70,
                "saga": _70,
                "shiroishi": _70,
                "taku": _70,
                "tara": _70,
                "tosu": _70,
                "yoshinogari": _70
              }],
              "saitama": [1, {
                "arakawa": _70,
                "asaka": _70,
                "chichibu": _70,
                "fujimi": _70,
                "fujimino": _70,
                "fukaya": _70,
                "hanno": _70,
                "hanyu": _70,
                "hasuda": _70,
                "hatogaya": _70,
                "hatoyama": _70,
                "hidaka": _70,
                "higashichichibu": _70,
                "higashimatsuyama": _70,
                "honjo": _70,
                "ina": _70,
                "iruma": _70,
                "iwatsuki": _70,
                "kamiizumi": _70,
                "kamikawa": _70,
                "kamisato": _70,
                "kasukabe": _70,
                "kawagoe": _70,
                "kawaguchi": _70,
                "kawajima": _70,
                "kazo": _70,
                "kitamoto": _70,
                "koshigaya": _70,
                "kounosu": _70,
                "kuki": _70,
                "kumagaya": _70,
                "matsubushi": _70,
                "minano": _70,
                "misato": _70,
                "miyashiro": _70,
                "miyoshi": _70,
                "moroyama": _70,
                "nagatoro": _70,
                "namegawa": _70,
                "niiza": _70,
                "ogano": _70,
                "ogawa": _70,
                "ogose": _70,
                "okegawa": _70,
                "omiya": _70,
                "otaki": _70,
                "ranzan": _70,
                "ryokami": _70,
                "saitama": _70,
                "sakado": _70,
                "satte": _70,
                "sayama": _70,
                "shiki": _70,
                "shiraoka": _70,
                "soka": _70,
                "sugito": _70,
                "toda": _70,
                "tokigawa": _70,
                "tokorozawa": _70,
                "tsurugashima": _70,
                "urawa": _70,
                "warabi": _70,
                "yashio": _70,
                "yokoze": _70,
                "yono": _70,
                "yorii": _70,
                "yoshida": _70,
                "yoshikawa": _70,
                "yoshimi": _70
              }],
              "shiga": [1, { "aisho": _70, "gamo": _70, "higashiomi": _70, "hikone": _70, "koka": _70, "konan": _70, "kosei": _70, "koto": _70, "kusatsu": _70, "maibara": _70, "moriyama": _70, "nagahama": _70, "nishiazai": _70, "notogawa": _70, "omihachiman": _70, "otsu": _70, "ritto": _70, "ryuoh": _70, "takashima": _70, "takatsuki": _70, "torahime": _70, "toyosato": _70, "yasu": _70 }],
              "shimane": [1, { "akagi": _70, "ama": _70, "gotsu": _70, "hamada": _70, "higashiizumo": _70, "hikawa": _70, "hikimi": _70, "izumo": _70, "kakinoki": _70, "masuda": _70, "matsue": _70, "misato": _70, "nishinoshima": _70, "ohda": _70, "okinoshima": _70, "okuizumo": _70, "shimane": _70, "tamayu": _70, "tsuwano": _70, "unnan": _70, "yakumo": _70, "yasugi": _70, "yatsuka": _70 }],
              "shizuoka": [
                1,
                { "arai": _70, "atami": _70, "fuji": _70, "fujieda": _70, "fujikawa": _70, "fujinomiya": _70, "fukuroi": _70, "gotemba": _70, "haibara": _70, "hamamatsu": _70, "higashiizu": _70, "ito": _70, "iwata": _70, "izu": _70, "izunokuni": _70, "kakegawa": _70, "kannami": _70, "kawanehon": _70, "kawazu": _70, "kikugawa": _70, "kosai": _70, "makinohara": _70, "matsuzaki": _70, "minamiizu": _70, "mishima": _70, "morimachi": _70, "nishiizu": _70, "numazu": _70, "omaezaki": _70, "shimada": _70, "shimizu": _70, "shimoda": _70, "shizuoka": _70, "susono": _70, "yaizu": _70, "yoshida": _70 }
              ],
              "tochigi": [1, { "ashikaga": _70, "bato": _70, "haga": _70, "ichikai": _70, "iwafune": _70, "kaminokawa": _70, "kanuma": _70, "karasuyama": _70, "kuroiso": _70, "mashiko": _70, "mibu": _70, "moka": _70, "motegi": _70, "nasu": _70, "nasushiobara": _70, "nikko": _70, "nishikata": _70, "nogi": _70, "ohira": _70, "ohtawara": _70, "oyama": _70, "sakura": _70, "sano": _70, "shimotsuke": _70, "shioya": _70, "takanezawa": _70, "tochigi": _70, "tsuga": _70, "ujiie": _70, "utsunomiya": _70, "yaita": _70 }],
              "tokushima": [1, { "aizumi": _70, "anan": _70, "ichiba": _70, "itano": _70, "kainan": _70, "komatsushima": _70, "matsushige": _70, "mima": _70, "minami": _70, "miyoshi": _70, "mugi": _70, "nakagawa": _70, "naruto": _70, "sanagochi": _70, "shishikui": _70, "tokushima": _70, "wajiki": _70 }],
              "tokyo": [1, { "adachi": _70, "akiruno": _70, "akishima": _70, "aogashima": _70, "arakawa": _70, "bunkyo": _70, "chiyoda": _70, "chofu": _70, "chuo": _70, "edogawa": _70, "fuchu": _70, "fussa": _70, "hachijo": _70, "hachioji": _70, "hamura": _70, "higashikurume": _70, "higashimurayama": _70, "higashiyamato": _70, "hino": _70, "hinode": _70, "hinohara": _70, "inagi": _70, "itabashi": _70, "katsushika": _70, "kita": _70, "kiyose": _70, "kodaira": _70, "koganei": _70, "kokubunji": _70, "komae": _70, "koto": _70, "kouzushima": _70, "kunitachi": _70, "machida": _70, "meguro": _70, "minato": _70, "mitaka": _70, "mizuho": _70, "musashimurayama": _70, "musashino": _70, "nakano": _70, "nerima": _70, "ogasawara": _70, "okutama": _70, "ome": _70, "oshima": _70, "ota": _70, "setagaya": _70, "shibuya": _70, "shinagawa": _70, "shinjuku": _70, "suginami": _70, "sumida": _70, "tachikawa": _70, "taito": _70, "tama": _70, "toshima": _70 }],
              "tottori": [1, { "chizu": _70, "hino": _70, "kawahara": _70, "koge": _70, "kotoura": _70, "misasa": _70, "nanbu": _70, "nichinan": _70, "sakaiminato": _70, "tottori": _70, "wakasa": _70, "yazu": _70, "yonago": _70 }],
              "toyama": [1, { "asahi": _70, "fuchu": _70, "fukumitsu": _70, "funahashi": _70, "himi": _70, "imizu": _70, "inami": _70, "johana": _70, "kamiichi": _70, "kurobe": _70, "nakaniikawa": _70, "namerikawa": _70, "nanto": _70, "nyuzen": _70, "oyabe": _70, "taira": _70, "takaoka": _70, "tateyama": _70, "toga": _70, "tonami": _70, "toyama": _70, "unazuki": _70, "uozu": _70, "yamada": _70 }],
              "wakayama": [1, { "arida": _70, "aridagawa": _70, "gobo": _70, "hashimoto": _70, "hidaka": _70, "hirogawa": _70, "inami": _70, "iwade": _70, "kainan": _70, "kamitonda": _70, "katsuragi": _70, "kimino": _70, "kinokawa": _70, "kitayama": _70, "koya": _70, "koza": _70, "kozagawa": _70, "kudoyama": _70, "kushimoto": _70, "mihama": _70, "misato": _70, "nachikatsuura": _70, "shingu": _70, "shirahama": _70, "taiji": _70, "tanabe": _70, "wakayama": _70, "yuasa": _70, "yura": _70 }],
              "yamagata": [1, { "asahi": _70, "funagata": _70, "higashine": _70, "iide": _70, "kahoku": _70, "kaminoyama": _70, "kaneyama": _70, "kawanishi": _70, "mamurogawa": _70, "mikawa": _70, "murayama": _70, "nagai": _70, "nakayama": _70, "nanyo": _70, "nishikawa": _70, "obanazawa": _70, "oe": _70, "oguni": _70, "ohkura": _70, "oishida": _70, "sagae": _70, "sakata": _70, "sakegawa": _70, "shinjo": _70, "shirataka": _70, "shonai": _70, "takahata": _70, "tendo": _70, "tozawa": _70, "tsuruoka": _70, "yamagata": _70, "yamanobe": _70, "yonezawa": _70, "yuza": _70 }],
              "yamaguchi": [1, { "abu": _70, "hagi": _70, "hikari": _70, "hofu": _70, "iwakuni": _70, "kudamatsu": _70, "mitou": _70, "nagato": _70, "oshima": _70, "shimonoseki": _70, "shunan": _70, "tabuse": _70, "tokuyama": _70, "toyota": _70, "ube": _70, "yuu": _70 }],
              "yamanashi": [1, { "chuo": _70, "doshi": _70, "fuefuki": _70, "fujikawa": _70, "fujikawaguchiko": _70, "fujiyoshida": _70, "hayakawa": _70, "hokuto": _70, "ichikawamisato": _70, "kai": _70, "kofu": _70, "koshu": _70, "kosuge": _70, "minami-alps": _70, "minobu": _70, "nakamichi": _70, "nanbu": _70, "narusawa": _70, "nirasaki": _70, "nishikatsura": _70, "oshino": _70, "otsuki": _70, "showa": _70, "tabayama": _70, "tsuru": _70, "uenohara": _70, "yamanakako": _70, "yamanashi": _70 }],
              "xn--ehqz56n": _70,
              "\u4E09\u91CD": _70,
              "xn--1lqs03n": _70,
              "\u4EAC\u90FD": _70,
              "xn--qqqt11m": _70,
              "\u4F50\u8CC0": _70,
              "xn--f6qx53a": _70,
              "\u5175\u5EAB": _70,
              "xn--djrs72d6uy": _70,
              "\u5317\u6D77\u9053": _70,
              "xn--mkru45i": _70,
              "\u5343\u8449": _70,
              "xn--0trq7p7nn": _70,
              "\u548C\u6B4C\u5C71": _70,
              "xn--5js045d": _70,
              "\u57FC\u7389": _70,
              "xn--kbrq7o": _70,
              "\u5927\u5206": _70,
              "xn--pssu33l": _70,
              "\u5927\u962A": _70,
              "xn--ntsq17g": _70,
              "\u5948\u826F": _70,
              "xn--uisz3g": _70,
              "\u5BAE\u57CE": _70,
              "xn--6btw5a": _70,
              "\u5BAE\u5D0E": _70,
              "xn--1ctwo": _70,
              "\u5BCC\u5C71": _70,
              "xn--6orx2r": _70,
              "\u5C71\u53E3": _70,
              "xn--rht61e": _70,
              "\u5C71\u5F62": _70,
              "xn--rht27z": _70,
              "\u5C71\u68A8": _70,
              "xn--nit225k": _70,
              "\u5C90\u961C": _70,
              "xn--rht3d": _70,
              "\u5CA1\u5C71": _70,
              "xn--djty4k": _70,
              "\u5CA9\u624B": _70,
              "xn--klty5x": _70,
              "\u5CF6\u6839": _70,
              "xn--kltx9a": _70,
              "\u5E83\u5CF6": _70,
              "xn--kltp7d": _70,
              "\u5FB3\u5CF6": _70,
              "xn--c3s14m": _70,
              "\u611B\u5A9B": _70,
              "xn--vgu402c": _70,
              "\u611B\u77E5": _70,
              "xn--efvn9s": _70,
              "\u65B0\u6F5F": _70,
              "xn--1lqs71d": _70,
              "\u6771\u4EAC": _70,
              "xn--4pvxs": _70,
              "\u6803\u6728": _70,
              "xn--uuwu58a": _70,
              "\u6C96\u7E04": _70,
              "xn--zbx025d": _70,
              "\u6ECB\u8CC0": _70,
              "xn--8pvr4u": _70,
              "\u718A\u672C": _70,
              "xn--5rtp49c": _70,
              "\u77F3\u5DDD": _70,
              "xn--ntso0iqx3a": _70,
              "\u795E\u5948\u5DDD": _70,
              "xn--elqq16h": _70,
              "\u798F\u4E95": _70,
              "xn--4it168d": _70,
              "\u798F\u5CA1": _70,
              "xn--klt787d": _70,
              "\u798F\u5CF6": _70,
              "xn--rny31h": _70,
              "\u79CB\u7530": _70,
              "xn--7t0a264c": _70,
              "\u7FA4\u99AC": _70,
              "xn--uist22h": _70,
              "\u8328\u57CE": _70,
              "xn--8ltr62k": _70,
              "\u9577\u5D0E": _70,
              "xn--2m4a15e": _70,
              "\u9577\u91CE": _70,
              "xn--32vp30h": _70,
              "\u9752\u68EE": _70,
              "xn--4it797k": _70,
              "\u9759\u5CA1": _70,
              "xn--5rtq34k": _70,
              "\u9999\u5DDD": _70,
              "xn--k7yn95e": _70,
              "\u9AD8\u77E5": _70,
              "xn--tor131o": _70,
              "\u9CE5\u53D6": _70,
              "xn--d5qv7z876c": _70,
              "\u9E7F\u5150\u5CF6": _70,
              "kawasaki": _74,
              "kitakyushu": _74,
              "kobe": _74,
              "nagoya": _74,
              "sapporo": _74,
              "sendai": _74,
              "yokohama": _74
            }],
            "ke": [1, { "ac": _70, "co": _70, "go": _70, "info": _70, "me": _70, "mobi": _70, "ne": _70, "or": _70, "sc": _70 }],
            "kg": _71,
            "kh": _74,
            "ki": _79,
            "km": [1, { "ass": _70, "com": _70, "edu": _70, "gov": _70, "mil": _70, "nom": _70, "org": _70, "prd": _70, "tm": _70, "asso": _70, "coop": _70, "gouv": _70, "medecin": _70, "notaires": _70, "pharmaciens": _70, "presse": _70, "veterinaire": _70 }],
            "kn": [1, { "edu": _70, "gov": _70, "net": _70, "org": _70 }],
            "kp": [1, {
              "com": _70,
              "edu": _70,
              "gov": _70,
              "org": _70,
              "rep": _70,
              "tra": _70
            }],
            "kr": [1, { "ac": _70, "ai": _70, "co": _70, "es": _70, "go": _70, "hs": _70, "io": _70, "it": _70, "kg": _70, "me": _70, "mil": _70, "ms": _70, "ne": _70, "or": _70, "pe": _70, "re": _70, "sc": _70, "busan": _70, "chungbuk": _70, "chungnam": _70, "daegu": _70, "daejeon": _70, "gangwon": _70, "gwangju": _70, "gyeongbuk": _70, "gyeonggi": _70, "gyeongnam": _70, "incheon": _70, "jeju": _70, "jeonbuk": _70, "jeonnam": _70, "seoul": _70, "ulsan": _70 }],
            "kw": [1, { "com": _70, "edu": _70, "emb": _70, "gov": _70, "ind": _70, "net": _70, "org": _70 }],
            "ky": _76,
            "kz": _71,
            "la": [1, { "com": _70, "edu": _70, "gov": _70, "info": _70, "int": _70, "net": _70, "org": _70, "per": _70 }],
            "lb": _72,
            "lc": _75,
            "li": _70,
            "lk": [1, { "ac": _70, "assn": _70, "com": _70, "edu": _70, "gov": _70, "grp": _70, "hotel": _70, "int": _70, "ltd": _70, "net": _70, "ngo": _70, "org": _70, "sch": _70, "soc": _70, "web": _70 }],
            "lr": _72,
            "ls": [1, {
              "ac": _70,
              "biz": _70,
              "co": _70,
              "edu": _70,
              "gov": _70,
              "info": _70,
              "net": _70,
              "org": _70,
              "sc": _70
            }],
            "lt": _73,
            "lu": _70,
            "lv": [1, { "asn": _70, "com": _70, "conf": _70, "edu": _70, "gov": _70, "id": _70, "mil": _70, "net": _70, "org": _70 }],
            "ly": [1, { "com": _70, "edu": _70, "gov": _70, "id": _70, "med": _70, "net": _70, "org": _70, "plc": _70, "sch": _70 }],
            "ma": [1, { "ac": _70, "co": _70, "gov": _70, "net": _70, "org": _70, "press": _70 }],
            "mc": [1, { "asso": _70, "tm": _70 }],
            "md": _70,
            "me": [1, { "ac": _70, "co": _70, "edu": _70, "gov": _70, "its": _70, "net": _70, "org": _70, "priv": _70 }],
            "mg": [1, { "co": _70, "com": _70, "edu": _70, "gov": _70, "mil": _70, "nom": _70, "org": _70, "prd": _70 }],
            "mh": _70,
            "mil": _70,
            "mk": [1, { "com": _70, "edu": _70, "gov": _70, "inf": _70, "name": _70, "net": _70, "org": _70 }],
            "ml": [1, { "ac": _70, "art": _70, "asso": _70, "com": _70, "edu": _70, "gouv": _70, "gov": _70, "info": _70, "inst": _70, "net": _70, "org": _70, "pr": _70, "presse": _70 }],
            "mm": _74,
            "mn": [1, { "edu": _70, "gov": _70, "org": _70 }],
            "mo": _72,
            "mobi": _70,
            "mp": _70,
            "mq": _70,
            "mr": _73,
            "ms": _72,
            "mt": _76,
            "mu": [1, { "ac": _70, "co": _70, "com": _70, "gov": _70, "net": _70, "or": _70, "org": _70 }],
            "museum": _70,
            "mv": [1, { "aero": _70, "biz": _70, "com": _70, "coop": _70, "edu": _70, "gov": _70, "info": _70, "int": _70, "mil": _70, "museum": _70, "name": _70, "net": _70, "org": _70, "pro": _70 }],
            "mw": [1, { "ac": _70, "biz": _70, "co": _70, "com": _70, "coop": _70, "edu": _70, "gov": _70, "int": _70, "net": _70, "org": _70 }],
            "mx": [1, { "com": _70, "edu": _70, "gob": _70, "net": _70, "org": _70 }],
            "my": [1, { "biz": _70, "com": _70, "edu": _70, "gov": _70, "mil": _70, "name": _70, "net": _70, "org": _70 }],
            "mz": [1, { "ac": _70, "adv": _70, "co": _70, "edu": _70, "gov": _70, "mil": _70, "net": _70, "org": _70 }],
            "na": [1, { "alt": _70, "co": _70, "com": _70, "gov": _70, "net": _70, "org": _70 }],
            "name": _70,
            "nc": [1, {
              "asso": _70,
              "nom": _70
            }],
            "ne": _70,
            "net": _70,
            "nf": [1, { "arts": _70, "com": _70, "firm": _70, "info": _70, "net": _70, "other": _70, "per": _70, "rec": _70, "store": _70, "web": _70 }],
            "ng": [1, { "com": _70, "edu": _70, "gov": _70, "i": _70, "mil": _70, "mobi": _70, "name": _70, "net": _70, "org": _70, "sch": _70 }],
            "ni": [1, { "ac": _70, "biz": _70, "co": _70, "com": _70, "edu": _70, "gob": _70, "in": _70, "info": _70, "int": _70, "mil": _70, "net": _70, "nom": _70, "org": _70, "web": _70 }],
            "nl": _70,
            "no": [1, {
              "fhs": _70,
              "folkebibl": _70,
              "fylkesbibl": _70,
              "idrett": _70,
              "museum": _70,
              "priv": _70,
              "vgs": _70,
              "dep": _70,
              "herad": _70,
              "kommune": _70,
              "mil": _70,
              "stat": _70,
              "aa": _80,
              "ah": _80,
              "bu": _80,
              "fm": _80,
              "hl": _80,
              "hm": _80,
              "jan-mayen": _80,
              "mr": _80,
              "nl": _80,
              "nt": _80,
              "of": _80,
              "ol": _80,
              "oslo": _80,
              "rl": _80,
              "sf": _80,
              "st": _80,
              "svalbard": _80,
              "tm": _80,
              "tr": _80,
              "va": _80,
              "vf": _80,
              "akrehamn": _70,
              "xn--krehamn-dxa": _70,
              "\xE5krehamn": _70,
              "algard": _70,
              "xn--lgrd-poac": _70,
              "\xE5lg\xE5rd": _70,
              "arna": _70,
              "bronnoysund": _70,
              "xn--brnnysund-m8ac": _70,
              "br\xF8nn\xF8ysund": _70,
              "brumunddal": _70,
              "bryne": _70,
              "drobak": _70,
              "xn--drbak-wua": _70,
              "dr\xF8bak": _70,
              "egersund": _70,
              "fetsund": _70,
              "floro": _70,
              "xn--flor-jra": _70,
              "flor\xF8": _70,
              "fredrikstad": _70,
              "hokksund": _70,
              "honefoss": _70,
              "xn--hnefoss-q1a": _70,
              "h\xF8nefoss": _70,
              "jessheim": _70,
              "jorpeland": _70,
              "xn--jrpeland-54a": _70,
              "j\xF8rpeland": _70,
              "kirkenes": _70,
              "kopervik": _70,
              "krokstadelva": _70,
              "langevag": _70,
              "xn--langevg-jxa": _70,
              "langev\xE5g": _70,
              "leirvik": _70,
              "mjondalen": _70,
              "xn--mjndalen-64a": _70,
              "mj\xF8ndalen": _70,
              "mo-i-rana": _70,
              "mosjoen": _70,
              "xn--mosjen-eya": _70,
              "mosj\xF8en": _70,
              "nesoddtangen": _70,
              "orkanger": _70,
              "osoyro": _70,
              "xn--osyro-wua": _70,
              "os\xF8yro": _70,
              "raholt": _70,
              "xn--rholt-mra": _70,
              "r\xE5holt": _70,
              "sandnessjoen": _70,
              "xn--sandnessjen-ogb": _70,
              "sandnessj\xF8en": _70,
              "skedsmokorset": _70,
              "slattum": _70,
              "spjelkavik": _70,
              "stathelle": _70,
              "stavern": _70,
              "stjordalshalsen": _70,
              "xn--stjrdalshalsen-sqb": _70,
              "stj\xF8rdalshalsen": _70,
              "tananger": _70,
              "tranby": _70,
              "vossevangen": _70,
              "aarborte": _70,
              "aejrie": _70,
              "afjord": _70,
              "xn--fjord-lra": _70,
              "\xE5fjord": _70,
              "agdenes": _70,
              "akershus": _81,
              "aknoluokta": _70,
              "xn--koluokta-7ya57h": _70,
              "\xE1k\u014Boluokta": _70,
              "al": _70,
              "xn--l-1fa": _70,
              "\xE5l": _70,
              "alaheadju": _70,
              "xn--laheadju-7ya": _70,
              "\xE1laheadju": _70,
              "alesund": _70,
              "xn--lesund-hua": _70,
              "\xE5lesund": _70,
              "alstahaug": _70,
              "alta": _70,
              "xn--lt-liac": _70,
              "\xE1lt\xE1": _70,
              "alvdal": _70,
              "amli": _70,
              "xn--mli-tla": _70,
              "\xE5mli": _70,
              "amot": _70,
              "xn--mot-tla": _70,
              "\xE5mot": _70,
              "andasuolo": _70,
              "andebu": _70,
              "andoy": _70,
              "xn--andy-ira": _70,
              "and\xF8y": _70,
              "ardal": _70,
              "xn--rdal-poa": _70,
              "\xE5rdal": _70,
              "aremark": _70,
              "arendal": _70,
              "xn--s-1fa": _70,
              "\xE5s": _70,
              "aseral": _70,
              "xn--seral-lra": _70,
              "\xE5seral": _70,
              "asker": _70,
              "askim": _70,
              "askoy": _70,
              "xn--asky-ira": _70,
              "ask\xF8y": _70,
              "askvoll": _70,
              "asnes": _70,
              "xn--snes-poa": _70,
              "\xE5snes": _70,
              "audnedaln": _70,
              "aukra": _70,
              "aure": _70,
              "aurland": _70,
              "aurskog-holand": _70,
              "xn--aurskog-hland-jnb": _70,
              "aurskog-h\xF8land": _70,
              "austevoll": _70,
              "austrheim": _70,
              "averoy": _70,
              "xn--avery-yua": _70,
              "aver\xF8y": _70,
              "badaddja": _70,
              "xn--bdddj-mrabd": _70,
              "b\xE5d\xE5ddj\xE5": _70,
              "xn--brum-voa": _70,
              "b\xE6rum": _70,
              "bahcavuotna": _70,
              "xn--bhcavuotna-s4a": _70,
              "b\xE1hcavuotna": _70,
              "bahccavuotna": _70,
              "xn--bhccavuotna-k7a": _70,
              "b\xE1hccavuotna": _70,
              "baidar": _70,
              "xn--bidr-5nac": _70,
              "b\xE1id\xE1r": _70,
              "bajddar": _70,
              "xn--bjddar-pta": _70,
              "b\xE1jddar": _70,
              "balat": _70,
              "xn--blt-elab": _70,
              "b\xE1l\xE1t": _70,
              "balestrand": _70,
              "ballangen": _70,
              "balsfjord": _70,
              "bamble": _70,
              "bardu": _70,
              "barum": _70,
              "batsfjord": _70,
              "xn--btsfjord-9za": _70,
              "b\xE5tsfjord": _70,
              "bearalvahki": _70,
              "xn--bearalvhki-y4a": _70,
              "bearalv\xE1hki": _70,
              "beardu": _70,
              "beiarn": _70,
              "berg": _70,
              "bergen": _70,
              "berlevag": _70,
              "xn--berlevg-jxa": _70,
              "berlev\xE5g": _70,
              "bievat": _70,
              "xn--bievt-0qa": _70,
              "biev\xE1t": _70,
              "bindal": _70,
              "birkenes": _70,
              "bjarkoy": _70,
              "xn--bjarky-fya": _70,
              "bjark\xF8y": _70,
              "bjerkreim": _70,
              "bjugn": _70,
              "bodo": _70,
              "xn--bod-2na": _70,
              "bod\xF8": _70,
              "bokn": _70,
              "bomlo": _70,
              "xn--bmlo-gra": _70,
              "b\xF8mlo": _70,
              "bremanger": _70,
              "bronnoy": _70,
              "xn--brnny-wuac": _70,
              "br\xF8nn\xF8y": _70,
              "budejju": _70,
              "buskerud": _81,
              "bygland": _70,
              "bykle": _70,
              "cahcesuolo": _70,
              "xn--hcesuolo-7ya35b": _70,
              "\u010D\xE1hcesuolo": _70,
              "davvenjarga": _70,
              "xn--davvenjrga-y4a": _70,
              "davvenj\xE1rga": _70,
              "davvesiida": _70,
              "deatnu": _70,
              "dielddanuorri": _70,
              "divtasvuodna": _70,
              "divttasvuotna": _70,
              "donna": _70,
              "xn--dnna-gra": _70,
              "d\xF8nna": _70,
              "dovre": _70,
              "drammen": _70,
              "drangedal": _70,
              "dyroy": _70,
              "xn--dyry-ira": _70,
              "dyr\xF8y": _70,
              "eid": _70,
              "eidfjord": _70,
              "eidsberg": _70,
              "eidskog": _70,
              "eidsvoll": _70,
              "eigersund": _70,
              "elverum": _70,
              "enebakk": _70,
              "engerdal": _70,
              "etne": _70,
              "etnedal": _70,
              "evenassi": _70,
              "xn--eveni-0qa01ga": _70,
              "even\xE1\u0161\u0161i": _70,
              "evenes": _70,
              "evje-og-hornnes": _70,
              "farsund": _70,
              "fauske": _70,
              "fedje": _70,
              "fet": _70,
              "finnoy": _70,
              "xn--finny-yua": _70,
              "finn\xF8y": _70,
              "fitjar": _70,
              "fjaler": _70,
              "fjell": _70,
              "fla": _70,
              "xn--fl-zia": _70,
              "fl\xE5": _70,
              "flakstad": _70,
              "flatanger": _70,
              "flekkefjord": _70,
              "flesberg": _70,
              "flora": _70,
              "folldal": _70,
              "forde": _70,
              "xn--frde-gra": _70,
              "f\xF8rde": _70,
              "forsand": _70,
              "fosnes": _70,
              "xn--frna-woa": _70,
              "fr\xE6na": _70,
              "frana": _70,
              "frei": _70,
              "frogn": _70,
              "froland": _70,
              "frosta": _70,
              "froya": _70,
              "xn--frya-hra": _70,
              "fr\xF8ya": _70,
              "fuoisku": _70,
              "fuossko": _70,
              "fusa": _70,
              "fyresdal": _70,
              "gaivuotna": _70,
              "xn--givuotna-8ya": _70,
              "g\xE1ivuotna": _70,
              "galsa": _70,
              "xn--gls-elac": _70,
              "g\xE1ls\xE1": _70,
              "gamvik": _70,
              "gangaviika": _70,
              "xn--ggaviika-8ya47h": _70,
              "g\xE1\u014Bgaviika": _70,
              "gaular": _70,
              "gausdal": _70,
              "giehtavuoatna": _70,
              "gildeskal": _70,
              "xn--gildeskl-g0a": _70,
              "gildesk\xE5l": _70,
              "giske": _70,
              "gjemnes": _70,
              "gjerdrum": _70,
              "gjerstad": _70,
              "gjesdal": _70,
              "gjovik": _70,
              "xn--gjvik-wua": _70,
              "gj\xF8vik": _70,
              "gloppen": _70,
              "gol": _70,
              "gran": _70,
              "grane": _70,
              "granvin": _70,
              "gratangen": _70,
              "grimstad": _70,
              "grong": _70,
              "grue": _70,
              "gulen": _70,
              "guovdageaidnu": _70,
              "ha": _70,
              "xn--h-2fa": _70,
              "h\xE5": _70,
              "habmer": _70,
              "xn--hbmer-xqa": _70,
              "h\xE1bmer": _70,
              "hadsel": _70,
              "xn--hgebostad-g3a": _70,
              "h\xE6gebostad": _70,
              "hagebostad": _70,
              "halden": _70,
              "halsa": _70,
              "hamar": _70,
              "hamaroy": _70,
              "hammarfeasta": _70,
              "xn--hmmrfeasta-s4ac": _70,
              "h\xE1mm\xE1rfeasta": _70,
              "hammerfest": _70,
              "hapmir": _70,
              "xn--hpmir-xqa": _70,
              "h\xE1pmir": _70,
              "haram": _70,
              "hareid": _70,
              "harstad": _70,
              "hasvik": _70,
              "hattfjelldal": _70,
              "haugesund": _70,
              "hedmark": [0, { "os": _70, "valer": _70, "xn--vler-qoa": _70, "v\xE5ler": _70 }],
              "hemne": _70,
              "hemnes": _70,
              "hemsedal": _70,
              "hitra": _70,
              "hjartdal": _70,
              "hjelmeland": _70,
              "hobol": _70,
              "xn--hobl-ira": _70,
              "hob\xF8l": _70,
              "hof": _70,
              "hol": _70,
              "hole": _70,
              "holmestrand": _70,
              "holtalen": _70,
              "xn--holtlen-hxa": _70,
              "holt\xE5len": _70,
              "hordaland": [0, { "os": _70 }],
              "hornindal": _70,
              "horten": _70,
              "hoyanger": _70,
              "xn--hyanger-q1a": _70,
              "h\xF8yanger": _70,
              "hoylandet": _70,
              "xn--hylandet-54a": _70,
              "h\xF8ylandet": _70,
              "hurdal": _70,
              "hurum": _70,
              "hvaler": _70,
              "hyllestad": _70,
              "ibestad": _70,
              "inderoy": _70,
              "xn--indery-fya": _70,
              "inder\xF8y": _70,
              "iveland": _70,
              "ivgu": _70,
              "jevnaker": _70,
              "jolster": _70,
              "xn--jlster-bya": _70,
              "j\xF8lster": _70,
              "jondal": _70,
              "kafjord": _70,
              "xn--kfjord-iua": _70,
              "k\xE5fjord": _70,
              "karasjohka": _70,
              "xn--krjohka-hwab49j": _70,
              "k\xE1r\xE1\u0161johka": _70,
              "karasjok": _70,
              "karlsoy": _70,
              "karmoy": _70,
              "xn--karmy-yua": _70,
              "karm\xF8y": _70,
              "kautokeino": _70,
              "klabu": _70,
              "xn--klbu-woa": _70,
              "kl\xE6bu": _70,
              "klepp": _70,
              "kongsberg": _70,
              "kongsvinger": _70,
              "kraanghke": _70,
              "xn--kranghke-b0a": _70,
              "kr\xE5anghke": _70,
              "kragero": _70,
              "xn--krager-gya": _70,
              "krager\xF8": _70,
              "kristiansand": _70,
              "kristiansund": _70,
              "krodsherad": _70,
              "xn--krdsherad-m8a": _70,
              "kr\xF8dsherad": _70,
              "xn--kvfjord-nxa": _70,
              "kv\xE6fjord": _70,
              "xn--kvnangen-k0a": _70,
              "kv\xE6nangen": _70,
              "kvafjord": _70,
              "kvalsund": _70,
              "kvam": _70,
              "kvanangen": _70,
              "kvinesdal": _70,
              "kvinnherad": _70,
              "kviteseid": _70,
              "kvitsoy": _70,
              "xn--kvitsy-fya": _70,
              "kvits\xF8y": _70,
              "laakesvuemie": _70,
              "xn--lrdal-sra": _70,
              "l\xE6rdal": _70,
              "lahppi": _70,
              "xn--lhppi-xqa": _70,
              "l\xE1hppi": _70,
              "lardal": _70,
              "larvik": _70,
              "lavagis": _70,
              "lavangen": _70,
              "leangaviika": _70,
              "xn--leagaviika-52b": _70,
              "lea\u014Bgaviika": _70,
              "lebesby": _70,
              "leikanger": _70,
              "leirfjord": _70,
              "leka": _70,
              "leksvik": _70,
              "lenvik": _70,
              "lerdal": _70,
              "lesja": _70,
              "levanger": _70,
              "lier": _70,
              "lierne": _70,
              "lillehammer": _70,
              "lillesand": _70,
              "lindas": _70,
              "xn--linds-pra": _70,
              "lind\xE5s": _70,
              "lindesnes": _70,
              "loabat": _70,
              "xn--loabt-0qa": _70,
              "loab\xE1t": _70,
              "lodingen": _70,
              "xn--ldingen-q1a": _70,
              "l\xF8dingen": _70,
              "lom": _70,
              "loppa": _70,
              "lorenskog": _70,
              "xn--lrenskog-54a": _70,
              "l\xF8renskog": _70,
              "loten": _70,
              "xn--lten-gra": _70,
              "l\xF8ten": _70,
              "lund": _70,
              "lunner": _70,
              "luroy": _70,
              "xn--lury-ira": _70,
              "lur\xF8y": _70,
              "luster": _70,
              "lyngdal": _70,
              "lyngen": _70,
              "malatvuopmi": _70,
              "xn--mlatvuopmi-s4a": _70,
              "m\xE1latvuopmi": _70,
              "malselv": _70,
              "xn--mlselv-iua": _70,
              "m\xE5lselv": _70,
              "malvik": _70,
              "mandal": _70,
              "marker": _70,
              "marnardal": _70,
              "masfjorden": _70,
              "masoy": _70,
              "xn--msy-ula0h": _70,
              "m\xE5s\xF8y": _70,
              "matta-varjjat": _70,
              "xn--mtta-vrjjat-k7af": _70,
              "m\xE1tta-v\xE1rjjat": _70,
              "meland": _70,
              "meldal": _70,
              "melhus": _70,
              "meloy": _70,
              "xn--mely-ira": _70,
              "mel\xF8y": _70,
              "meraker": _70,
              "xn--merker-kua": _70,
              "mer\xE5ker": _70,
              "midsund": _70,
              "midtre-gauldal": _70,
              "moareke": _70,
              "xn--moreke-jua": _70,
              "mo\xE5reke": _70,
              "modalen": _70,
              "modum": _70,
              "molde": _70,
              "more-og-romsdal": [0, {
                "heroy": _70,
                "sande": _70
              }],
              "xn--mre-og-romsdal-qqb": [0, { "xn--hery-ira": _70, "sande": _70 }],
              "m\xF8re-og-romsdal": [0, { "her\xF8y": _70, "sande": _70 }],
              "moskenes": _70,
              "moss": _70,
              "mosvik": _70,
              "muosat": _70,
              "xn--muost-0qa": _70,
              "muos\xE1t": _70,
              "naamesjevuemie": _70,
              "xn--nmesjevuemie-tcba": _70,
              "n\xE5\xE5mesjevuemie": _70,
              "xn--nry-yla5g": _70,
              "n\xE6r\xF8y": _70,
              "namdalseid": _70,
              "namsos": _70,
              "namsskogan": _70,
              "nannestad": _70,
              "naroy": _70,
              "narviika": _70,
              "narvik": _70,
              "naustdal": _70,
              "navuotna": _70,
              "xn--nvuotna-hwa": _70,
              "n\xE1vuotna": _70,
              "nedre-eiker": _70,
              "nesna": _70,
              "nesodden": _70,
              "nesseby": _70,
              "nesset": _70,
              "nissedal": _70,
              "nittedal": _70,
              "nord-aurdal": _70,
              "nord-fron": _70,
              "nord-odal": _70,
              "norddal": _70,
              "nordkapp": _70,
              "nordland": [0, { "bo": _70, "xn--b-5ga": _70, "b\xF8": _70, "heroy": _70, "xn--hery-ira": _70, "her\xF8y": _70 }],
              "nordre-land": _70,
              "nordreisa": _70,
              "nore-og-uvdal": _70,
              "notodden": _70,
              "notteroy": _70,
              "xn--nttery-byae": _70,
              "n\xF8tter\xF8y": _70,
              "odda": _70,
              "oksnes": _70,
              "xn--ksnes-uua": _70,
              "\xF8ksnes": _70,
              "omasvuotna": _70,
              "oppdal": _70,
              "oppegard": _70,
              "xn--oppegrd-ixa": _70,
              "oppeg\xE5rd": _70,
              "orkdal": _70,
              "orland": _70,
              "xn--rland-uua": _70,
              "\xF8rland": _70,
              "orskog": _70,
              "xn--rskog-uua": _70,
              "\xF8rskog": _70,
              "orsta": _70,
              "xn--rsta-fra": _70,
              "\xF8rsta": _70,
              "osen": _70,
              "osteroy": _70,
              "xn--ostery-fya": _70,
              "oster\xF8y": _70,
              "ostfold": [0, { "valer": _70 }],
              "xn--stfold-9xa": [0, { "xn--vler-qoa": _70 }],
              "\xF8stfold": [0, { "v\xE5ler": _70 }],
              "ostre-toten": _70,
              "xn--stre-toten-zcb": _70,
              "\xF8stre-toten": _70,
              "overhalla": _70,
              "ovre-eiker": _70,
              "xn--vre-eiker-k8a": _70,
              "\xF8vre-eiker": _70,
              "oyer": _70,
              "xn--yer-zna": _70,
              "\xF8yer": _70,
              "oygarden": _70,
              "xn--ygarden-p1a": _70,
              "\xF8ygarden": _70,
              "oystre-slidre": _70,
              "xn--ystre-slidre-ujb": _70,
              "\xF8ystre-slidre": _70,
              "porsanger": _70,
              "porsangu": _70,
              "xn--porsgu-sta26f": _70,
              "pors\xE1\u014Bgu": _70,
              "porsgrunn": _70,
              "rade": _70,
              "xn--rde-ula": _70,
              "r\xE5de": _70,
              "radoy": _70,
              "xn--rady-ira": _70,
              "rad\xF8y": _70,
              "xn--rlingen-mxa": _70,
              "r\xE6lingen": _70,
              "rahkkeravju": _70,
              "xn--rhkkervju-01af": _70,
              "r\xE1hkker\xE1vju": _70,
              "raisa": _70,
              "xn--risa-5na": _70,
              "r\xE1isa": _70,
              "rakkestad": _70,
              "ralingen": _70,
              "rana": _70,
              "randaberg": _70,
              "rauma": _70,
              "rendalen": _70,
              "rennebu": _70,
              "rennesoy": _70,
              "xn--rennesy-v1a": _70,
              "rennes\xF8y": _70,
              "rindal": _70,
              "ringebu": _70,
              "ringerike": _70,
              "ringsaker": _70,
              "risor": _70,
              "xn--risr-ira": _70,
              "ris\xF8r": _70,
              "rissa": _70,
              "roan": _70,
              "rodoy": _70,
              "xn--rdy-0nab": _70,
              "r\xF8d\xF8y": _70,
              "rollag": _70,
              "romsa": _70,
              "romskog": _70,
              "xn--rmskog-bya": _70,
              "r\xF8mskog": _70,
              "roros": _70,
              "xn--rros-gra": _70,
              "r\xF8ros": _70,
              "rost": _70,
              "xn--rst-0na": _70,
              "r\xF8st": _70,
              "royken": _70,
              "xn--ryken-vua": _70,
              "r\xF8yken": _70,
              "royrvik": _70,
              "xn--ryrvik-bya": _70,
              "r\xF8yrvik": _70,
              "ruovat": _70,
              "rygge": _70,
              "salangen": _70,
              "salat": _70,
              "xn--slat-5na": _70,
              "s\xE1lat": _70,
              "xn--slt-elab": _70,
              "s\xE1l\xE1t": _70,
              "saltdal": _70,
              "samnanger": _70,
              "sandefjord": _70,
              "sandnes": _70,
              "sandoy": _70,
              "xn--sandy-yua": _70,
              "sand\xF8y": _70,
              "sarpsborg": _70,
              "sauda": _70,
              "sauherad": _70,
              "sel": _70,
              "selbu": _70,
              "selje": _70,
              "seljord": _70,
              "siellak": _70,
              "sigdal": _70,
              "siljan": _70,
              "sirdal": _70,
              "skanit": _70,
              "xn--sknit-yqa": _70,
              "sk\xE1nit": _70,
              "skanland": _70,
              "xn--sknland-fxa": _70,
              "sk\xE5nland": _70,
              "skaun": _70,
              "skedsmo": _70,
              "ski": _70,
              "skien": _70,
              "skierva": _70,
              "xn--skierv-uta": _70,
              "skierv\xE1": _70,
              "skiptvet": _70,
              "skjak": _70,
              "xn--skjk-soa": _70,
              "skj\xE5k": _70,
              "skjervoy": _70,
              "xn--skjervy-v1a": _70,
              "skjerv\xF8y": _70,
              "skodje": _70,
              "smola": _70,
              "xn--smla-hra": _70,
              "sm\xF8la": _70,
              "snaase": _70,
              "xn--snase-nra": _70,
              "sn\xE5ase": _70,
              "snasa": _70,
              "xn--snsa-roa": _70,
              "sn\xE5sa": _70,
              "snillfjord": _70,
              "snoasa": _70,
              "sogndal": _70,
              "sogne": _70,
              "xn--sgne-gra": _70,
              "s\xF8gne": _70,
              "sokndal": _70,
              "sola": _70,
              "solund": _70,
              "somna": _70,
              "xn--smna-gra": _70,
              "s\xF8mna": _70,
              "sondre-land": _70,
              "xn--sndre-land-0cb": _70,
              "s\xF8ndre-land": _70,
              "songdalen": _70,
              "sor-aurdal": _70,
              "xn--sr-aurdal-l8a": _70,
              "s\xF8r-aurdal": _70,
              "sor-fron": _70,
              "xn--sr-fron-q1a": _70,
              "s\xF8r-fron": _70,
              "sor-odal": _70,
              "xn--sr-odal-q1a": _70,
              "s\xF8r-odal": _70,
              "sor-varanger": _70,
              "xn--sr-varanger-ggb": _70,
              "s\xF8r-varanger": _70,
              "sorfold": _70,
              "xn--srfold-bya": _70,
              "s\xF8rfold": _70,
              "sorreisa": _70,
              "xn--srreisa-q1a": _70,
              "s\xF8rreisa": _70,
              "sortland": _70,
              "sorum": _70,
              "xn--srum-gra": _70,
              "s\xF8rum": _70,
              "spydeberg": _70,
              "stange": _70,
              "stavanger": _70,
              "steigen": _70,
              "steinkjer": _70,
              "stjordal": _70,
              "xn--stjrdal-s1a": _70,
              "stj\xF8rdal": _70,
              "stokke": _70,
              "stor-elvdal": _70,
              "stord": _70,
              "stordal": _70,
              "storfjord": _70,
              "strand": _70,
              "stranda": _70,
              "stryn": _70,
              "sula": _70,
              "suldal": _70,
              "sund": _70,
              "sunndal": _70,
              "surnadal": _70,
              "sveio": _70,
              "svelvik": _70,
              "sykkylven": _70,
              "tana": _70,
              "telemark": [0, { "bo": _70, "xn--b-5ga": _70, "b\xF8": _70 }],
              "time": _70,
              "tingvoll": _70,
              "tinn": _70,
              "tjeldsund": _70,
              "tjome": _70,
              "xn--tjme-hra": _70,
              "tj\xF8me": _70,
              "tokke": _70,
              "tolga": _70,
              "tonsberg": _70,
              "xn--tnsberg-q1a": _70,
              "t\xF8nsberg": _70,
              "torsken": _70,
              "xn--trna-woa": _70,
              "tr\xE6na": _70,
              "trana": _70,
              "tranoy": _70,
              "xn--trany-yua": _70,
              "tran\xF8y": _70,
              "troandin": _70,
              "trogstad": _70,
              "xn--trgstad-r1a": _70,
              "tr\xF8gstad": _70,
              "tromsa": _70,
              "tromso": _70,
              "xn--troms-zua": _70,
              "troms\xF8": _70,
              "trondheim": _70,
              "trysil": _70,
              "tvedestrand": _70,
              "tydal": _70,
              "tynset": _70,
              "tysfjord": _70,
              "tysnes": _70,
              "xn--tysvr-vra": _70,
              "tysv\xE6r": _70,
              "tysvar": _70,
              "ullensaker": _70,
              "ullensvang": _70,
              "ulvik": _70,
              "unjarga": _70,
              "xn--unjrga-rta": _70,
              "unj\xE1rga": _70,
              "utsira": _70,
              "vaapste": _70,
              "vadso": _70,
              "xn--vads-jra": _70,
              "vads\xF8": _70,
              "xn--vry-yla5g": _70,
              "v\xE6r\xF8y": _70,
              "vaga": _70,
              "xn--vg-yiab": _70,
              "v\xE5g\xE5": _70,
              "vagan": _70,
              "xn--vgan-qoa": _70,
              "v\xE5gan": _70,
              "vagsoy": _70,
              "xn--vgsy-qoa0j": _70,
              "v\xE5gs\xF8y": _70,
              "vaksdal": _70,
              "valle": _70,
              "vang": _70,
              "vanylven": _70,
              "vardo": _70,
              "xn--vard-jra": _70,
              "vard\xF8": _70,
              "varggat": _70,
              "xn--vrggt-xqad": _70,
              "v\xE1rgg\xE1t": _70,
              "varoy": _70,
              "vefsn": _70,
              "vega": _70,
              "vegarshei": _70,
              "xn--vegrshei-c0a": _70,
              "veg\xE5rshei": _70,
              "vennesla": _70,
              "verdal": _70,
              "verran": _70,
              "vestby": _70,
              "vestfold": [0, { "sande": _70 }],
              "vestnes": _70,
              "vestre-slidre": _70,
              "vestre-toten": _70,
              "vestvagoy": _70,
              "xn--vestvgy-ixa6o": _70,
              "vestv\xE5g\xF8y": _70,
              "vevelstad": _70,
              "vik": _70,
              "vikna": _70,
              "vindafjord": _70,
              "voagat": _70,
              "volda": _70,
              "voss": _70
            }],
            "np": _74,
            "nr": _79,
            "nu": _70,
            "nz": [1, { "ac": _70, "co": _70, "cri": _70, "geek": _70, "gen": _70, "govt": _70, "health": _70, "iwi": _70, "kiwi": _70, "maori": _70, "xn--mori-qsa": _70, "m\u0101ori": _70, "mil": _70, "net": _70, "org": _70, "parliament": _70, "school": _70 }],
            "om": [1, { "co": _70, "com": _70, "edu": _70, "gov": _70, "med": _70, "museum": _70, "net": _70, "org": _70, "pro": _70 }],
            "onion": _70,
            "org": _70,
            "pa": [1, { "abo": _70, "ac": _70, "com": _70, "edu": _70, "gob": _70, "ing": _70, "med": _70, "net": _70, "nom": _70, "org": _70, "sld": _70 }],
            "pe": [1, { "com": _70, "edu": _70, "gob": _70, "mil": _70, "net": _70, "nom": _70, "org": _70 }],
            "pf": [1, { "com": _70, "edu": _70, "org": _70 }],
            "pg": _74,
            "ph": [1, { "com": _70, "edu": _70, "gov": _70, "i": _70, "mil": _70, "net": _70, "ngo": _70, "org": _70 }],
            "pk": [1, { "ac": _70, "biz": _70, "com": _70, "edu": _70, "fam": _70, "gkp": _70, "gob": _70, "gog": _70, "gok": _70, "gop": _70, "gos": _70, "gov": _70, "net": _70, "org": _70, "web": _70 }],
            "pl": [1, { "com": _70, "net": _70, "org": _70, "agro": _70, "aid": _70, "atm": _70, "auto": _70, "biz": _70, "edu": _70, "gmina": _70, "gsm": _70, "info": _70, "mail": _70, "media": _70, "miasta": _70, "mil": _70, "nieruchomosci": _70, "nom": _70, "pc": _70, "powiat": _70, "priv": _70, "realestate": _70, "rel": _70, "sex": _70, "shop": _70, "sklep": _70, "sos": _70, "szkola": _70, "targi": _70, "tm": _70, "tourism": _70, "travel": _70, "turystyka": _70, "gov": [1, { "ap": _70, "griw": _70, "ic": _70, "is": _70, "kmpsp": _70, "konsulat": _70, "kppsp": _70, "kwp": _70, "kwpsp": _70, "mup": _70, "mw": _70, "oia": _70, "oirm": _70, "oke": _70, "oow": _70, "oschr": _70, "oum": _70, "pa": _70, "pinb": _70, "piw": _70, "po": _70, "pr": _70, "psp": _70, "psse": _70, "pup": _70, "rzgw": _70, "sa": _70, "sdn": _70, "sko": _70, "so": _70, "sr": _70, "starostwo": _70, "ug": _70, "ugim": _70, "um": _70, "umig": _70, "upow": _70, "uppo": _70, "us": _70, "uw": _70, "uzs": _70, "wif": _70, "wiih": _70, "winb": _70, "wios": _70, "witd": _70, "wiw": _70, "wkz": _70, "wsa": _70, "wskr": _70, "wsse": _70, "wuoz": _70, "wzmiuw": _70, "zp": _70, "zpisdn": _70 }], "augustow": _70, "babia-gora": _70, "bedzin": _70, "beskidy": _70, "bialowieza": _70, "bialystok": _70, "bielawa": _70, "bieszczady": _70, "boleslawiec": _70, "bydgoszcz": _70, "bytom": _70, "cieszyn": _70, "czeladz": _70, "czest": _70, "dlugoleka": _70, "elblag": _70, "elk": _70, "glogow": _70, "gniezno": _70, "gorlice": _70, "grajewo": _70, "ilawa": _70, "jaworzno": _70, "jelenia-gora": _70, "jgora": _70, "kalisz": _70, "karpacz": _70, "kartuzy": _70, "kaszuby": _70, "katowice": _70, "kazimierz-dolny": _70, "kepno": _70, "ketrzyn": _70, "klodzko": _70, "kobierzyce": _70, "kolobrzeg": _70, "konin": _70, "konskowola": _70, "kutno": _70, "lapy": _70, "lebork": _70, "legnica": _70, "lezajsk": _70, "limanowa": _70, "lomza": _70, "lowicz": _70, "lubin": _70, "lukow": _70, "malbork": _70, "malopolska": _70, "mazowsze": _70, "mazury": _70, "mielec": _70, "mielno": _70, "mragowo": _70, "naklo": _70, "nowaruda": _70, "nysa": _70, "olawa": _70, "olecko": _70, "olkusz": _70, "olsztyn": _70, "opoczno": _70, "opole": _70, "ostroda": _70, "ostroleka": _70, "ostrowiec": _70, "ostrowwlkp": _70, "pila": _70, "pisz": _70, "podhale": _70, "podlasie": _70, "polkowice": _70, "pomorskie": _70, "pomorze": _70, "prochowice": _70, "pruszkow": _70, "przeworsk": _70, "pulawy": _70, "radom": _70, "rawa-maz": _70, "rybnik": _70, "rzeszow": _70, "sanok": _70, "sejny": _70, "skoczow": _70, "slask": _70, "slupsk": _70, "sosnowiec": _70, "stalowa-wola": _70, "starachowice": _70, "stargard": _70, "suwalki": _70, "swidnica": _70, "swiebodzin": _70, "swinoujscie": _70, "szczecin": _70, "szczytno": _70, "tarnobrzeg": _70, "tgory": _70, "turek": _70, "tychy": _70, "ustka": _70, "walbrzych": _70, "warmia": _70, "warszawa": _70, "waw": _70, "wegrow": _70, "wielun": _70, "wlocl": _70, "wloclawek": _70, "wodzislaw": _70, "wolomin": _70, "wroclaw": _70, "zachpomor": _70, "zagan": _70, "zarow": _70, "zgora": _70, "zgorzelec": _70 }],
            "pm": _70,
            "pn": [1, { "co": _70, "edu": _70, "gov": _70, "net": _70, "org": _70 }],
            "post": _70,
            "pr": [1, { "biz": _70, "com": _70, "edu": _70, "gov": _70, "info": _70, "isla": _70, "name": _70, "net": _70, "org": _70, "pro": _70, "ac": _70, "est": _70, "prof": _70 }],
            "pro": [1, { "aaa": _70, "aca": _70, "acct": _70, "avocat": _70, "bar": _70, "cpa": _70, "eng": _70, "jur": _70, "law": _70, "med": _70, "recht": _70 }],
            "ps": [1, { "com": _70, "edu": _70, "gov": _70, "net": _70, "org": _70, "plo": _70, "sec": _70 }],
            "pt": [1, { "com": _70, "edu": _70, "gov": _70, "int": _70, "net": _70, "nome": _70, "org": _70, "publ": _70 }],
            "pw": _73,
            "py": [1, { "com": _70, "coop": _70, "edu": _70, "gov": _70, "mil": _70, "net": _70, "org": _70 }],
            "qa": [1, { "com": _70, "edu": _70, "gov": _70, "mil": _70, "name": _70, "net": _70, "org": _70, "sch": _70 }],
            "re": [1, { "asso": _70, "com": _70 }],
            "ro": [1, { "arts": _70, "com": _70, "firm": _70, "info": _70, "nom": _70, "nt": _70, "org": _70, "rec": _70, "store": _70, "tm": _70, "www": _70 }],
            "rs": [1, { "ac": _70, "co": _70, "edu": _70, "gov": _70, "in": _70, "org": _70 }],
            "ru": _70,
            "rw": [1, { "ac": _70, "co": _70, "coop": _70, "gov": _70, "mil": _70, "net": _70, "org": _70 }],
            "sa": [1, {
              "com": _70,
              "edu": _70,
              "gov": _70,
              "med": _70,
              "net": _70,
              "org": _70,
              "pub": _70,
              "sch": _70
            }],
            "sb": _72,
            "sc": _72,
            "sd": [1, { "com": _70, "edu": _70, "gov": _70, "info": _70, "med": _70, "net": _70, "org": _70, "tv": _70 }],
            "se": [1, { "a": _70, "ac": _70, "b": _70, "bd": _70, "brand": _70, "c": _70, "d": _70, "e": _70, "f": _70, "fh": _70, "fhsk": _70, "fhv": _70, "g": _70, "h": _70, "i": _70, "k": _70, "komforb": _70, "kommunalforbund": _70, "komvux": _70, "l": _70, "lanbib": _70, "m": _70, "n": _70, "naturbruksgymn": _70, "o": _70, "org": _70, "p": _70, "parti": _70, "pp": _70, "press": _70, "r": _70, "s": _70, "t": _70, "tm": _70, "u": _70, "w": _70, "x": _70, "y": _70, "z": _70 }],
            "sg": _72,
            "sh": [1, { "com": _70, "gov": _70, "mil": _70, "net": _70, "org": _70 }],
            "si": _70,
            "sj": _70,
            "sk": _70,
            "sl": _72,
            "sm": _70,
            "sn": [1, { "art": _70, "com": _70, "edu": _70, "gouv": _70, "org": _70, "perso": _70, "univ": _70 }],
            "so": [1, {
              "com": _70,
              "edu": _70,
              "gov": _70,
              "me": _70,
              "net": _70,
              "org": _70
            }],
            "sr": _70,
            "ss": [1, { "biz": _70, "co": _70, "com": _70, "edu": _70, "gov": _70, "me": _70, "net": _70, "org": _70, "sch": _70 }],
            "st": [1, { "co": _70, "com": _70, "consulado": _70, "edu": _70, "embaixada": _70, "mil": _70, "net": _70, "org": _70, "principe": _70, "saotome": _70, "store": _70 }],
            "su": _70,
            "sv": [1, { "com": _70, "edu": _70, "gob": _70, "org": _70, "red": _70 }],
            "sx": _73,
            "sy": _71,
            "sz": [1, { "ac": _70, "co": _70, "org": _70 }],
            "tc": _70,
            "td": _70,
            "tel": _70,
            "tf": _70,
            "tg": _70,
            "th": [1, { "ac": _70, "co": _70, "go": _70, "in": _70, "mi": _70, "net": _70, "or": _70 }],
            "tj": [1, { "ac": _70, "biz": _70, "co": _70, "com": _70, "edu": _70, "go": _70, "gov": _70, "int": _70, "mil": _70, "name": _70, "net": _70, "nic": _70, "org": _70, "test": _70, "web": _70 }],
            "tk": _70,
            "tl": _73,
            "tm": _78,
            "tn": [1, {
              "com": _70,
              "ens": _70,
              "fin": _70,
              "gov": _70,
              "ind": _70,
              "info": _70,
              "intl": _70,
              "mincom": _70,
              "nat": _70,
              "net": _70,
              "org": _70,
              "perso": _70,
              "tourism": _70
            }],
            "to": _71,
            "tr": [1, { "av": _70, "bbs": _70, "bel": _70, "biz": _70, "com": _70, "dr": _70, "edu": _70, "gen": _70, "gov": _70, "info": _70, "k12": _70, "kep": _70, "mil": _70, "name": _70, "net": _70, "org": _70, "pol": _70, "tel": _70, "tsk": _70, "tv": _70, "web": _70, "nc": _73 }],
            "tt": [1, { "biz": _70, "co": _70, "com": _70, "edu": _70, "gov": _70, "info": _70, "mil": _70, "name": _70, "net": _70, "org": _70, "pro": _70 }],
            "tv": _70,
            "tw": [1, { "club": _70, "com": _70, "ebiz": _70, "edu": _70, "game": _70, "gov": _70, "idv": _70, "mil": _70, "net": _70, "org": _70 }],
            "tz": [1, { "ac": _70, "co": _70, "go": _70, "hotel": _70, "info": _70, "me": _70, "mil": _70, "mobi": _70, "ne": _70, "or": _70, "sc": _70, "tv": _70 }],
            "ua": [1, {
              "com": _70,
              "edu": _70,
              "gov": _70,
              "in": _70,
              "net": _70,
              "org": _70,
              "cherkassy": _70,
              "cherkasy": _70,
              "chernigov": _70,
              "chernihiv": _70,
              "chernivtsi": _70,
              "chernovtsy": _70,
              "ck": _70,
              "cn": _70,
              "cr": _70,
              "crimea": _70,
              "cv": _70,
              "dn": _70,
              "dnepropetrovsk": _70,
              "dnipropetrovsk": _70,
              "donetsk": _70,
              "dp": _70,
              "if": _70,
              "ivano-frankivsk": _70,
              "kh": _70,
              "kharkiv": _70,
              "kharkov": _70,
              "kherson": _70,
              "khmelnitskiy": _70,
              "khmelnytskyi": _70,
              "kiev": _70,
              "kirovograd": _70,
              "km": _70,
              "kr": _70,
              "kropyvnytskyi": _70,
              "krym": _70,
              "ks": _70,
              "kv": _70,
              "kyiv": _70,
              "lg": _70,
              "lt": _70,
              "lugansk": _70,
              "luhansk": _70,
              "lutsk": _70,
              "lv": _70,
              "lviv": _70,
              "mk": _70,
              "mykolaiv": _70,
              "nikolaev": _70,
              "od": _70,
              "odesa": _70,
              "odessa": _70,
              "pl": _70,
              "poltava": _70,
              "rivne": _70,
              "rovno": _70,
              "rv": _70,
              "sb": _70,
              "sebastopol": _70,
              "sevastopol": _70,
              "sm": _70,
              "sumy": _70,
              "te": _70,
              "ternopil": _70,
              "uz": _70,
              "uzhgorod": _70,
              "uzhhorod": _70,
              "vinnica": _70,
              "vinnytsia": _70,
              "vn": _70,
              "volyn": _70,
              "yalta": _70,
              "zakarpattia": _70,
              "zaporizhzhe": _70,
              "zaporizhzhia": _70,
              "zhitomir": _70,
              "zhytomyr": _70,
              "zp": _70,
              "zt": _70
            }],
            "ug": [1, {
              "ac": _70,
              "co": _70,
              "com": _70,
              "edu": _70,
              "go": _70,
              "gov": _70,
              "mil": _70,
              "ne": _70,
              "or": _70,
              "org": _70,
              "sc": _70,
              "us": _70
            }],
            "uk": [1, { "ac": _70, "co": _70, "gov": _70, "ltd": _70, "me": _70, "net": _70, "nhs": _70, "org": _70, "plc": _70, "police": _70, "sch": _74 }],
            "us": [1, {
              "dni": _70,
              "isa": _70,
              "nsn": _70,
              "ak": _82,
              "al": _82,
              "ar": _82,
              "as": _82,
              "az": _82,
              "ca": _82,
              "co": _82,
              "ct": _82,
              "dc": _82,
              "de": _83,
              "fl": _82,
              "ga": _82,
              "gu": _82,
              "hi": _84,
              "ia": _82,
              "id": _82,
              "il": _82,
              "in": _82,
              "ks": _82,
              "ky": _82,
              "la": _82,
              "ma": [1, { "k12": [1, { "chtr": _70, "paroch": _70, "pvt": _70 }], "cc": _70, "lib": _70 }],
              "md": _82,
              "me": _82,
              "mi": [1, { "k12": _70, "cc": _70, "lib": _70, "ann-arbor": _70, "cog": _70, "dst": _70, "eaton": _70, "gen": _70, "mus": _70, "tec": _70, "washtenaw": _70 }],
              "mn": _82,
              "mo": _82,
              "ms": [1, { "k12": _70, "cc": _70 }],
              "mt": _82,
              "nc": _82,
              "nd": _84,
              "ne": _82,
              "nh": _82,
              "nj": _82,
              "nm": _82,
              "nv": _82,
              "ny": _82,
              "oh": _82,
              "ok": _82,
              "or": _82,
              "pa": _82,
              "pr": _82,
              "ri": _84,
              "sc": _82,
              "sd": _84,
              "tn": _82,
              "tx": _82,
              "ut": _82,
              "va": _82,
              "vi": _82,
              "vt": _82,
              "wa": _82,
              "wi": _82,
              "wv": _83,
              "wy": _82
            }],
            "uy": [1, { "com": _70, "edu": _70, "gub": _70, "mil": _70, "net": _70, "org": _70 }],
            "uz": [1, { "co": _70, "com": _70, "net": _70, "org": _70 }],
            "va": _70,
            "vc": _71,
            "ve": [1, { "arts": _70, "bib": _70, "co": _70, "com": _70, "e12": _70, "edu": _70, "emprende": _70, "firm": _70, "gob": _70, "gov": _70, "info": _70, "int": _70, "mil": _70, "net": _70, "nom": _70, "org": _70, "rar": _70, "rec": _70, "store": _70, "tec": _70, "web": _70 }],
            "vg": [1, { "edu": _70 }],
            "vi": [1, { "co": _70, "com": _70, "k12": _70, "net": _70, "org": _70 }],
            "vn": [1, { "ac": _70, "ai": _70, "biz": _70, "com": _70, "edu": _70, "gov": _70, "health": _70, "id": _70, "info": _70, "int": _70, "io": _70, "name": _70, "net": _70, "org": _70, "pro": _70, "angiang": _70, "bacgiang": _70, "backan": _70, "baclieu": _70, "bacninh": _70, "baria-vungtau": _70, "bentre": _70, "binhdinh": _70, "binhduong": _70, "binhphuoc": _70, "binhthuan": _70, "camau": _70, "cantho": _70, "caobang": _70, "daklak": _70, "daknong": _70, "danang": _70, "dienbien": _70, "dongnai": _70, "dongthap": _70, "gialai": _70, "hagiang": _70, "haiduong": _70, "haiphong": _70, "hanam": _70, "hanoi": _70, "hatinh": _70, "haugiang": _70, "hoabinh": _70, "hungyen": _70, "khanhhoa": _70, "kiengiang": _70, "kontum": _70, "laichau": _70, "lamdong": _70, "langson": _70, "laocai": _70, "longan": _70, "namdinh": _70, "nghean": _70, "ninhbinh": _70, "ninhthuan": _70, "phutho": _70, "phuyen": _70, "quangbinh": _70, "quangnam": _70, "quangngai": _70, "quangninh": _70, "quangtri": _70, "soctrang": _70, "sonla": _70, "tayninh": _70, "thaibinh": _70, "thainguyen": _70, "thanhhoa": _70, "thanhphohochiminh": _70, "thuathienhue": _70, "tiengiang": _70, "travinh": _70, "tuyenquang": _70, "vinhlong": _70, "vinhphuc": _70, "yenbai": _70 }],
            "vu": _76,
            "wf": _70,
            "ws": _72,
            "yt": _70,
            "xn--mgbaam7a8h": _70,
            "\u0627\u0645\u0627\u0631\u0627\u062A": _70,
            "xn--y9a3aq": _70,
            "\u0570\u0561\u0575": _70,
            "xn--54b7fta0cc": _70,
            "\u09AC\u09BE\u0982\u09B2\u09BE": _70,
            "xn--90ae": _70,
            "\u0431\u0433": _70,
            "xn--mgbcpq6gpa1a": _70,
            "\u0627\u0644\u0628\u062D\u0631\u064A\u0646": _70,
            "xn--90ais": _70,
            "\u0431\u0435\u043B": _70,
            "xn--fiqs8s": _70,
            "\u4E2D\u56FD": _70,
            "xn--fiqz9s": _70,
            "\u4E2D\u570B": _70,
            "xn--lgbbat1ad8j": _70,
            "\u0627\u0644\u062C\u0632\u0627\u0626\u0631": _70,
            "xn--wgbh1c": _70,
            "\u0645\u0635\u0631": _70,
            "xn--e1a4c": _70,
            "\u0435\u044E": _70,
            "xn--qxa6a": _70,
            "\u03B5\u03C5": _70,
            "xn--mgbah1a3hjkrd": _70,
            "\u0645\u0648\u0631\u064A\u062A\u0627\u0646\u064A\u0627": _70,
            "xn--node": _70,
            "\u10D2\u10D4": _70,
            "xn--qxam": _70,
            "\u03B5\u03BB": _70,
            "xn--j6w193g": [1, { "xn--gmqw5a": _70, "xn--55qx5d": _70, "xn--mxtq1m": _70, "xn--wcvs22d": _70, "xn--uc0atv": _70, "xn--od0alg": _70 }],
            "\u9999\u6E2F": [1, { "\u500B\u4EBA": _70, "\u516C\u53F8": _70, "\u653F\u5E9C": _70, "\u6559\u80B2": _70, "\u7D44\u7E54": _70, "\u7DB2\u7D61": _70 }],
            "xn--2scrj9c": _70,
            "\u0CAD\u0CBE\u0CB0\u0CA4": _70,
            "xn--3hcrj9c": _70,
            "\u0B2D\u0B3E\u0B30\u0B24": _70,
            "xn--45br5cyl": _70,
            "\u09AD\u09BE\u09F0\u09A4": _70,
            "xn--h2breg3eve": _70,
            "\u092D\u093E\u0930\u0924\u092E\u094D": _70,
            "xn--h2brj9c8c": _70,
            "\u092D\u093E\u0930\u094B\u0924": _70,
            "xn--mgbgu82a": _70,
            "\u0680\u0627\u0631\u062A": _70,
            "xn--rvc1e0am3e": _70,
            "\u0D2D\u0D3E\u0D30\u0D24\u0D02": _70,
            "xn--h2brj9c": _70,
            "\u092D\u093E\u0930\u0924": _70,
            "xn--mgbbh1a": _70,
            "\u0628\u0627\u0631\u062A": _70,
            "xn--mgbbh1a71e": _70,
            "\u0628\u06BE\u0627\u0631\u062A": _70,
            "xn--fpcrj9c3d": _70,
            "\u0C2D\u0C3E\u0C30\u0C24\u0C4D": _70,
            "xn--gecrj9c": _70,
            "\u0AAD\u0ABE\u0AB0\u0AA4": _70,
            "xn--s9brj9c": _70,
            "\u0A2D\u0A3E\u0A30\u0A24": _70,
            "xn--45brj9c": _70,
            "\u09AD\u09BE\u09B0\u09A4": _70,
            "xn--xkc2dl3a5ee0h": _70,
            "\u0B87\u0BA8\u0BCD\u0BA4\u0BBF\u0BAF\u0BBE": _70,
            "xn--mgba3a4f16a": _70,
            "\u0627\u06CC\u0631\u0627\u0646": _70,
            "xn--mgba3a4fra": _70,
            "\u0627\u064A\u0631\u0627\u0646": _70,
            "xn--mgbtx2b": _70,
            "\u0639\u0631\u0627\u0642": _70,
            "xn--mgbayh7gpa": _70,
            "\u0627\u0644\u0627\u0631\u062F\u0646": _70,
            "xn--3e0b707e": _70,
            "\uD55C\uAD6D": _70,
            "xn--80ao21a": _70,
            "\u049B\u0430\u0437": _70,
            "xn--q7ce6a": _70,
            "\u0EA5\u0EB2\u0EA7": _70,
            "xn--fzc2c9e2c": _70,
            "\u0DBD\u0D82\u0D9A\u0DCF": _70,
            "xn--xkc2al3hye2a": _70,
            "\u0B87\u0BB2\u0B99\u0BCD\u0B95\u0BC8": _70,
            "xn--mgbc0a9azcg": _70,
            "\u0627\u0644\u0645\u063A\u0631\u0628": _70,
            "xn--d1alf": _70,
            "\u043C\u043A\u0434": _70,
            "xn--l1acc": _70,
            "\u043C\u043E\u043D": _70,
            "xn--mix891f": _70,
            "\u6FB3\u9580": _70,
            "xn--mix082f": _70,
            "\u6FB3\u95E8": _70,
            "xn--mgbx4cd0ab": _70,
            "\u0645\u0644\u064A\u0633\u064A\u0627": _70,
            "xn--mgb9awbf": _70,
            "\u0639\u0645\u0627\u0646": _70,
            "xn--mgbai9azgqp6j": _70,
            "\u067E\u0627\u06A9\u0633\u062A\u0627\u0646": _70,
            "xn--mgbai9a5eva00b": _70,
            "\u067E\u0627\u0643\u0633\u062A\u0627\u0646": _70,
            "xn--ygbi2ammx": _70,
            "\u0641\u0644\u0633\u0637\u064A\u0646": _70,
            "xn--90a3ac": [1, { "xn--80au": _70, "xn--90azh": _70, "xn--d1at": _70, "xn--c1avg": _70, "xn--o1ac": _70, "xn--o1ach": _70 }],
            "\u0441\u0440\u0431": [1, { "\u0430\u043A": _70, "\u043E\u0431\u0440": _70, "\u043E\u0434": _70, "\u043E\u0440\u0433": _70, "\u043F\u0440": _70, "\u0443\u043F\u0440": _70 }],
            "xn--p1ai": _70,
            "\u0440\u0444": _70,
            "xn--wgbl6a": _70,
            "\u0642\u0637\u0631": _70,
            "xn--mgberp4a5d4ar": _70,
            "\u0627\u0644\u0633\u0639\u0648\u062F\u064A\u0629": _70,
            "xn--mgberp4a5d4a87g": _70,
            "\u0627\u0644\u0633\u0639\u0648\u062F\u06CC\u0629": _70,
            "xn--mgbqly7c0a67fbc": _70,
            "\u0627\u0644\u0633\u0639\u0648\u062F\u06CC\u06C3": _70,
            "xn--mgbqly7cvafr": _70,
            "\u0627\u0644\u0633\u0639\u0648\u062F\u064A\u0647": _70,
            "xn--mgbpl2fh": _70,
            "\u0633\u0648\u062F\u0627\u0646": _70,
            "xn--yfro4i67o": _70,
            "\u65B0\u52A0\u5761": _70,
            "xn--clchc0ea0b2g2a9gcd": _70,
            "\u0B9A\u0BBF\u0B99\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0BC2\u0BB0\u0BCD": _70,
            "xn--ogbpf8fl": _70,
            "\u0633\u0648\u0631\u064A\u0629": _70,
            "xn--mgbtf8fl": _70,
            "\u0633\u0648\u0631\u064A\u0627": _70,
            "xn--o3cw4h": [1, { "xn--o3cyx2a": _70, "xn--12co0c3b4eva": _70, "xn--m3ch0j3a": _70, "xn--h3cuzk1di": _70, "xn--12c1fe0br": _70, "xn--12cfi8ixb8l": _70 }],
            "\u0E44\u0E17\u0E22": [1, { "\u0E17\u0E2B\u0E32\u0E23": _70, "\u0E18\u0E38\u0E23\u0E01\u0E34\u0E08": _70, "\u0E40\u0E19\u0E47\u0E15": _70, "\u0E23\u0E31\u0E10\u0E1A\u0E32\u0E25": _70, "\u0E28\u0E36\u0E01\u0E29\u0E32": _70, "\u0E2D\u0E07\u0E04\u0E4C\u0E01\u0E23": _70 }],
            "xn--pgbs0dh": _70,
            "\u062A\u0648\u0646\u0633": _70,
            "xn--kpry57d": _70,
            "\u53F0\u7063": _70,
            "xn--kprw13d": _70,
            "\u53F0\u6E7E": _70,
            "xn--nnx388a": _70,
            "\u81FA\u7063": _70,
            "xn--j1amh": _70,
            "\u0443\u043A\u0440": _70,
            "xn--mgb2ddes": _70,
            "\u0627\u0644\u064A\u0645\u0646": _70,
            "xxx": _70,
            "ye": _71,
            "za": [0, { "ac": _70, "agric": _70, "alt": _70, "co": _70, "edu": _70, "gov": _70, "grondar": _70, "law": _70, "mil": _70, "net": _70, "ngo": _70, "nic": _70, "nis": _70, "nom": _70, "org": _70, "school": _70, "tm": _70, "web": _70 }],
            "zm": [1, { "ac": _70, "biz": _70, "co": _70, "com": _70, "edu": _70, "gov": _70, "info": _70, "mil": _70, "net": _70, "org": _70, "sch": _70 }],
            "zw": [1, { "ac": _70, "co": _70, "gov": _70, "mil": _70, "org": _70 }],
            "aaa": _70,
            "aarp": _70,
            "abb": _70,
            "abbott": _70,
            "abbvie": _70,
            "abc": _70,
            "able": _70,
            "abogado": _70,
            "abudhabi": _70,
            "academy": _70,
            "accenture": _70,
            "accountant": _70,
            "accountants": _70,
            "aco": _70,
            "actor": _70,
            "ads": _70,
            "adult": _70,
            "aeg": _70,
            "aetna": _70,
            "afl": _70,
            "africa": _70,
            "agakhan": _70,
            "agency": _70,
            "aig": _70,
            "airbus": _70,
            "airforce": _70,
            "airtel": _70,
            "akdn": _70,
            "alibaba": _70,
            "alipay": _70,
            "allfinanz": _70,
            "allstate": _70,
            "ally": _70,
            "alsace": _70,
            "alstom": _70,
            "amazon": _70,
            "americanexpress": _70,
            "americanfamily": _70,
            "amex": _70,
            "amfam": _70,
            "amica": _70,
            "amsterdam": _70,
            "analytics": _70,
            "android": _70,
            "anquan": _70,
            "anz": _70,
            "aol": _70,
            "apartments": _70,
            "app": _70,
            "apple": _70,
            "aquarelle": _70,
            "arab": _70,
            "aramco": _70,
            "archi": _70,
            "army": _70,
            "art": _70,
            "arte": _70,
            "asda": _70,
            "associates": _70,
            "athleta": _70,
            "attorney": _70,
            "auction": _70,
            "audi": _70,
            "audible": _70,
            "audio": _70,
            "auspost": _70,
            "author": _70,
            "auto": _70,
            "autos": _70,
            "aws": _70,
            "axa": _70,
            "azure": _70,
            "baby": _70,
            "baidu": _70,
            "banamex": _70,
            "band": _70,
            "bank": _70,
            "bar": _70,
            "barcelona": _70,
            "barclaycard": _70,
            "barclays": _70,
            "barefoot": _70,
            "bargains": _70,
            "baseball": _70,
            "basketball": _70,
            "bauhaus": _70,
            "bayern": _70,
            "bbc": _70,
            "bbt": _70,
            "bbva": _70,
            "bcg": _70,
            "bcn": _70,
            "beats": _70,
            "beauty": _70,
            "beer": _70,
            "berlin": _70,
            "best": _70,
            "bestbuy": _70,
            "bet": _70,
            "bharti": _70,
            "bible": _70,
            "bid": _70,
            "bike": _70,
            "bing": _70,
            "bingo": _70,
            "bio": _70,
            "black": _70,
            "blackfriday": _70,
            "blockbuster": _70,
            "blog": _70,
            "bloomberg": _70,
            "blue": _70,
            "bms": _70,
            "bmw": _70,
            "bnpparibas": _70,
            "boats": _70,
            "boehringer": _70,
            "bofa": _70,
            "bom": _70,
            "bond": _70,
            "boo": _70,
            "book": _70,
            "booking": _70,
            "bosch": _70,
            "bostik": _70,
            "boston": _70,
            "bot": _70,
            "boutique": _70,
            "box": _70,
            "bradesco": _70,
            "bridgestone": _70,
            "broadway": _70,
            "broker": _70,
            "brother": _70,
            "brussels": _70,
            "build": _70,
            "builders": _70,
            "business": _70,
            "buy": _70,
            "buzz": _70,
            "bzh": _70,
            "cab": _70,
            "cafe": _70,
            "cal": _70,
            "call": _70,
            "calvinklein": _70,
            "cam": _70,
            "camera": _70,
            "camp": _70,
            "canon": _70,
            "capetown": _70,
            "capital": _70,
            "capitalone": _70,
            "car": _70,
            "caravan": _70,
            "cards": _70,
            "care": _70,
            "career": _70,
            "careers": _70,
            "cars": _70,
            "casa": _70,
            "case": _70,
            "cash": _70,
            "casino": _70,
            "catering": _70,
            "catholic": _70,
            "cba": _70,
            "cbn": _70,
            "cbre": _70,
            "center": _70,
            "ceo": _70,
            "cern": _70,
            "cfa": _70,
            "cfd": _70,
            "chanel": _70,
            "channel": _70,
            "charity": _70,
            "chase": _70,
            "chat": _70,
            "cheap": _70,
            "chintai": _70,
            "christmas": _70,
            "chrome": _70,
            "church": _70,
            "cipriani": _70,
            "circle": _70,
            "cisco": _70,
            "citadel": _70,
            "citi": _70,
            "citic": _70,
            "city": _70,
            "claims": _70,
            "cleaning": _70,
            "click": _70,
            "clinic": _70,
            "clinique": _70,
            "clothing": _70,
            "cloud": _70,
            "club": _70,
            "clubmed": _70,
            "coach": _70,
            "codes": _70,
            "coffee": _70,
            "college": _70,
            "cologne": _70,
            "commbank": _70,
            "community": _70,
            "company": _70,
            "compare": _70,
            "computer": _70,
            "comsec": _70,
            "condos": _70,
            "construction": _70,
            "consulting": _70,
            "contact": _70,
            "contractors": _70,
            "cooking": _70,
            "cool": _70,
            "corsica": _70,
            "country": _70,
            "coupon": _70,
            "coupons": _70,
            "courses": _70,
            "cpa": _70,
            "credit": _70,
            "creditcard": _70,
            "creditunion": _70,
            "cricket": _70,
            "crown": _70,
            "crs": _70,
            "cruise": _70,
            "cruises": _70,
            "cuisinella": _70,
            "cymru": _70,
            "cyou": _70,
            "dad": _70,
            "dance": _70,
            "data": _70,
            "date": _70,
            "dating": _70,
            "datsun": _70,
            "day": _70,
            "dclk": _70,
            "dds": _70,
            "deal": _70,
            "dealer": _70,
            "deals": _70,
            "degree": _70,
            "delivery": _70,
            "dell": _70,
            "deloitte": _70,
            "delta": _70,
            "democrat": _70,
            "dental": _70,
            "dentist": _70,
            "desi": _70,
            "design": _70,
            "dev": _70,
            "dhl": _70,
            "diamonds": _70,
            "diet": _70,
            "digital": _70,
            "direct": _70,
            "directory": _70,
            "discount": _70,
            "discover": _70,
            "dish": _70,
            "diy": _70,
            "dnp": _70,
            "docs": _70,
            "doctor": _70,
            "dog": _70,
            "domains": _70,
            "dot": _70,
            "download": _70,
            "drive": _70,
            "dtv": _70,
            "dubai": _70,
            "dunlop": _70,
            "dupont": _70,
            "durban": _70,
            "dvag": _70,
            "dvr": _70,
            "earth": _70,
            "eat": _70,
            "eco": _70,
            "edeka": _70,
            "education": _70,
            "email": _70,
            "emerck": _70,
            "energy": _70,
            "engineer": _70,
            "engineering": _70,
            "enterprises": _70,
            "epson": _70,
            "equipment": _70,
            "ericsson": _70,
            "erni": _70,
            "esq": _70,
            "estate": _70,
            "eurovision": _70,
            "eus": _70,
            "events": _70,
            "exchange": _70,
            "expert": _70,
            "exposed": _70,
            "express": _70,
            "extraspace": _70,
            "fage": _70,
            "fail": _70,
            "fairwinds": _70,
            "faith": _70,
            "family": _70,
            "fan": _70,
            "fans": _70,
            "farm": _70,
            "farmers": _70,
            "fashion": _70,
            "fast": _70,
            "fedex": _70,
            "feedback": _70,
            "ferrari": _70,
            "ferrero": _70,
            "fidelity": _70,
            "fido": _70,
            "film": _70,
            "final": _70,
            "finance": _70,
            "financial": _70,
            "fire": _70,
            "firestone": _70,
            "firmdale": _70,
            "fish": _70,
            "fishing": _70,
            "fit": _70,
            "fitness": _70,
            "flickr": _70,
            "flights": _70,
            "flir": _70,
            "florist": _70,
            "flowers": _70,
            "fly": _70,
            "foo": _70,
            "food": _70,
            "football": _70,
            "ford": _70,
            "forex": _70,
            "forsale": _70,
            "forum": _70,
            "foundation": _70,
            "fox": _70,
            "free": _70,
            "fresenius": _70,
            "frl": _70,
            "frogans": _70,
            "frontier": _70,
            "ftr": _70,
            "fujitsu": _70,
            "fun": _70,
            "fund": _70,
            "furniture": _70,
            "futbol": _70,
            "fyi": _70,
            "gal": _70,
            "gallery": _70,
            "gallo": _70,
            "gallup": _70,
            "game": _70,
            "games": _70,
            "gap": _70,
            "garden": _70,
            "gay": _70,
            "gbiz": _70,
            "gdn": _70,
            "gea": _70,
            "gent": _70,
            "genting": _70,
            "george": _70,
            "ggee": _70,
            "gift": _70,
            "gifts": _70,
            "gives": _70,
            "giving": _70,
            "glass": _70,
            "gle": _70,
            "global": _70,
            "globo": _70,
            "gmail": _70,
            "gmbh": _70,
            "gmo": _70,
            "gmx": _70,
            "godaddy": _70,
            "gold": _70,
            "goldpoint": _70,
            "golf": _70,
            "goo": _70,
            "goodyear": _70,
            "goog": _70,
            "google": _70,
            "gop": _70,
            "got": _70,
            "grainger": _70,
            "graphics": _70,
            "gratis": _70,
            "green": _70,
            "gripe": _70,
            "grocery": _70,
            "group": _70,
            "gucci": _70,
            "guge": _70,
            "guide": _70,
            "guitars": _70,
            "guru": _70,
            "hair": _70,
            "hamburg": _70,
            "hangout": _70,
            "haus": _70,
            "hbo": _70,
            "hdfc": _70,
            "hdfcbank": _70,
            "health": _70,
            "healthcare": _70,
            "help": _70,
            "helsinki": _70,
            "here": _70,
            "hermes": _70,
            "hiphop": _70,
            "hisamitsu": _70,
            "hitachi": _70,
            "hiv": _70,
            "hkt": _70,
            "hockey": _70,
            "holdings": _70,
            "holiday": _70,
            "homedepot": _70,
            "homegoods": _70,
            "homes": _70,
            "homesense": _70,
            "honda": _70,
            "horse": _70,
            "hospital": _70,
            "host": _70,
            "hosting": _70,
            "hot": _70,
            "hotel": _70,
            "hotels": _70,
            "hotmail": _70,
            "house": _70,
            "how": _70,
            "hsbc": _70,
            "hughes": _70,
            "hyatt": _70,
            "hyundai": _70,
            "ibm": _70,
            "icbc": _70,
            "ice": _70,
            "icu": _70,
            "ieee": _70,
            "ifm": _70,
            "ikano": _70,
            "imamat": _70,
            "imdb": _70,
            "immo": _70,
            "immobilien": _70,
            "inc": _70,
            "industries": _70,
            "infiniti": _70,
            "ing": _70,
            "ink": _70,
            "institute": _70,
            "insurance": _70,
            "insure": _70,
            "international": _70,
            "intuit": _70,
            "investments": _70,
            "ipiranga": _70,
            "irish": _70,
            "ismaili": _70,
            "ist": _70,
            "istanbul": _70,
            "itau": _70,
            "itv": _70,
            "jaguar": _70,
            "java": _70,
            "jcb": _70,
            "jeep": _70,
            "jetzt": _70,
            "jewelry": _70,
            "jio": _70,
            "jll": _70,
            "jmp": _70,
            "jnj": _70,
            "joburg": _70,
            "jot": _70,
            "joy": _70,
            "jpmorgan": _70,
            "jprs": _70,
            "juegos": _70,
            "juniper": _70,
            "kaufen": _70,
            "kddi": _70,
            "kerryhotels": _70,
            "kerryproperties": _70,
            "kfh": _70,
            "kia": _70,
            "kids": _70,
            "kim": _70,
            "kindle": _70,
            "kitchen": _70,
            "kiwi": _70,
            "koeln": _70,
            "komatsu": _70,
            "kosher": _70,
            "kpmg": _70,
            "kpn": _70,
            "krd": _70,
            "kred": _70,
            "kuokgroup": _70,
            "kyoto": _70,
            "lacaixa": _70,
            "lamborghini": _70,
            "lamer": _70,
            "land": _70,
            "landrover": _70,
            "lanxess": _70,
            "lasalle": _70,
            "lat": _70,
            "latino": _70,
            "latrobe": _70,
            "law": _70,
            "lawyer": _70,
            "lds": _70,
            "lease": _70,
            "leclerc": _70,
            "lefrak": _70,
            "legal": _70,
            "lego": _70,
            "lexus": _70,
            "lgbt": _70,
            "lidl": _70,
            "life": _70,
            "lifeinsurance": _70,
            "lifestyle": _70,
            "lighting": _70,
            "like": _70,
            "lilly": _70,
            "limited": _70,
            "limo": _70,
            "lincoln": _70,
            "link": _70,
            "live": _70,
            "living": _70,
            "llc": _70,
            "llp": _70,
            "loan": _70,
            "loans": _70,
            "locker": _70,
            "locus": _70,
            "lol": _70,
            "london": _70,
            "lotte": _70,
            "lotto": _70,
            "love": _70,
            "lpl": _70,
            "lplfinancial": _70,
            "ltd": _70,
            "ltda": _70,
            "lundbeck": _70,
            "luxe": _70,
            "luxury": _70,
            "madrid": _70,
            "maif": _70,
            "maison": _70,
            "makeup": _70,
            "man": _70,
            "management": _70,
            "mango": _70,
            "map": _70,
            "market": _70,
            "marketing": _70,
            "markets": _70,
            "marriott": _70,
            "marshalls": _70,
            "mattel": _70,
            "mba": _70,
            "mckinsey": _70,
            "med": _70,
            "media": _70,
            "meet": _70,
            "melbourne": _70,
            "meme": _70,
            "memorial": _70,
            "men": _70,
            "menu": _70,
            "merck": _70,
            "merckmsd": _70,
            "miami": _70,
            "microsoft": _70,
            "mini": _70,
            "mint": _70,
            "mit": _70,
            "mitsubishi": _70,
            "mlb": _70,
            "mls": _70,
            "mma": _70,
            "mobile": _70,
            "moda": _70,
            "moe": _70,
            "moi": _70,
            "mom": _70,
            "monash": _70,
            "money": _70,
            "monster": _70,
            "mormon": _70,
            "mortgage": _70,
            "moscow": _70,
            "moto": _70,
            "motorcycles": _70,
            "mov": _70,
            "movie": _70,
            "msd": _70,
            "mtn": _70,
            "mtr": _70,
            "music": _70,
            "nab": _70,
            "nagoya": _70,
            "navy": _70,
            "nba": _70,
            "nec": _70,
            "netbank": _70,
            "netflix": _70,
            "network": _70,
            "neustar": _70,
            "new": _70,
            "news": _70,
            "next": _70,
            "nextdirect": _70,
            "nexus": _70,
            "nfl": _70,
            "ngo": _70,
            "nhk": _70,
            "nico": _70,
            "nike": _70,
            "nikon": _70,
            "ninja": _70,
            "nissan": _70,
            "nissay": _70,
            "nokia": _70,
            "norton": _70,
            "now": _70,
            "nowruz": _70,
            "nowtv": _70,
            "nra": _70,
            "nrw": _70,
            "ntt": _70,
            "nyc": _70,
            "obi": _70,
            "observer": _70,
            "office": _70,
            "okinawa": _70,
            "olayan": _70,
            "olayangroup": _70,
            "ollo": _70,
            "omega": _70,
            "one": _70,
            "ong": _70,
            "onl": _70,
            "online": _70,
            "ooo": _70,
            "open": _70,
            "oracle": _70,
            "orange": _70,
            "organic": _70,
            "origins": _70,
            "osaka": _70,
            "otsuka": _70,
            "ott": _70,
            "ovh": _70,
            "page": _70,
            "panasonic": _70,
            "paris": _70,
            "pars": _70,
            "partners": _70,
            "parts": _70,
            "party": _70,
            "pay": _70,
            "pccw": _70,
            "pet": _70,
            "pfizer": _70,
            "pharmacy": _70,
            "phd": _70,
            "philips": _70,
            "phone": _70,
            "photo": _70,
            "photography": _70,
            "photos": _70,
            "physio": _70,
            "pics": _70,
            "pictet": _70,
            "pictures": _70,
            "pid": _70,
            "pin": _70,
            "ping": _70,
            "pink": _70,
            "pioneer": _70,
            "pizza": _70,
            "place": _70,
            "play": _70,
            "playstation": _70,
            "plumbing": _70,
            "plus": _70,
            "pnc": _70,
            "pohl": _70,
            "poker": _70,
            "politie": _70,
            "porn": _70,
            "praxi": _70,
            "press": _70,
            "prime": _70,
            "prod": _70,
            "productions": _70,
            "prof": _70,
            "progressive": _70,
            "promo": _70,
            "properties": _70,
            "property": _70,
            "protection": _70,
            "pru": _70,
            "prudential": _70,
            "pub": _70,
            "pwc": _70,
            "qpon": _70,
            "quebec": _70,
            "quest": _70,
            "racing": _70,
            "radio": _70,
            "read": _70,
            "realestate": _70,
            "realtor": _70,
            "realty": _70,
            "recipes": _70,
            "red": _70,
            "redumbrella": _70,
            "rehab": _70,
            "reise": _70,
            "reisen": _70,
            "reit": _70,
            "reliance": _70,
            "ren": _70,
            "rent": _70,
            "rentals": _70,
            "repair": _70,
            "report": _70,
            "republican": _70,
            "rest": _70,
            "restaurant": _70,
            "review": _70,
            "reviews": _70,
            "rexroth": _70,
            "rich": _70,
            "richardli": _70,
            "ricoh": _70,
            "ril": _70,
            "rio": _70,
            "rip": _70,
            "rocks": _70,
            "rodeo": _70,
            "rogers": _70,
            "room": _70,
            "rsvp": _70,
            "rugby": _70,
            "ruhr": _70,
            "run": _70,
            "rwe": _70,
            "ryukyu": _70,
            "saarland": _70,
            "safe": _70,
            "safety": _70,
            "sakura": _70,
            "sale": _70,
            "salon": _70,
            "samsclub": _70,
            "samsung": _70,
            "sandvik": _70,
            "sandvikcoromant": _70,
            "sanofi": _70,
            "sap": _70,
            "sarl": _70,
            "sas": _70,
            "save": _70,
            "saxo": _70,
            "sbi": _70,
            "sbs": _70,
            "scb": _70,
            "schaeffler": _70,
            "schmidt": _70,
            "scholarships": _70,
            "school": _70,
            "schule": _70,
            "schwarz": _70,
            "science": _70,
            "scot": _70,
            "search": _70,
            "seat": _70,
            "secure": _70,
            "security": _70,
            "seek": _70,
            "select": _70,
            "sener": _70,
            "services": _70,
            "seven": _70,
            "sew": _70,
            "sex": _70,
            "sexy": _70,
            "sfr": _70,
            "shangrila": _70,
            "sharp": _70,
            "shell": _70,
            "shia": _70,
            "shiksha": _70,
            "shoes": _70,
            "shop": _70,
            "shopping": _70,
            "shouji": _70,
            "show": _70,
            "silk": _70,
            "sina": _70,
            "singles": _70,
            "site": _70,
            "ski": _70,
            "skin": _70,
            "sky": _70,
            "skype": _70,
            "sling": _70,
            "smart": _70,
            "smile": _70,
            "sncf": _70,
            "soccer": _70,
            "social": _70,
            "softbank": _70,
            "software": _70,
            "sohu": _70,
            "solar": _70,
            "solutions": _70,
            "song": _70,
            "sony": _70,
            "soy": _70,
            "spa": _70,
            "space": _70,
            "sport": _70,
            "spot": _70,
            "srl": _70,
            "stada": _70,
            "staples": _70,
            "star": _70,
            "statebank": _70,
            "statefarm": _70,
            "stc": _70,
            "stcgroup": _70,
            "stockholm": _70,
            "storage": _70,
            "store": _70,
            "stream": _70,
            "studio": _70,
            "study": _70,
            "style": _70,
            "sucks": _70,
            "supplies": _70,
            "supply": _70,
            "support": _70,
            "surf": _70,
            "surgery": _70,
            "suzuki": _70,
            "swatch": _70,
            "swiss": _70,
            "sydney": _70,
            "systems": _70,
            "tab": _70,
            "taipei": _70,
            "talk": _70,
            "taobao": _70,
            "target": _70,
            "tatamotors": _70,
            "tatar": _70,
            "tattoo": _70,
            "tax": _70,
            "taxi": _70,
            "tci": _70,
            "tdk": _70,
            "team": _70,
            "tech": _70,
            "technology": _70,
            "temasek": _70,
            "tennis": _70,
            "teva": _70,
            "thd": _70,
            "theater": _70,
            "theatre": _70,
            "tiaa": _70,
            "tickets": _70,
            "tienda": _70,
            "tips": _70,
            "tires": _70,
            "tirol": _70,
            "tjmaxx": _70,
            "tjx": _70,
            "tkmaxx": _70,
            "tmall": _70,
            "today": _70,
            "tokyo": _70,
            "tools": _70,
            "top": _70,
            "toray": _70,
            "toshiba": _70,
            "total": _70,
            "tours": _70,
            "town": _70,
            "toyota": _70,
            "toys": _70,
            "trade": _70,
            "trading": _70,
            "training": _70,
            "travel": _70,
            "travelers": _70,
            "travelersinsurance": _70,
            "trust": _70,
            "trv": _70,
            "tube": _70,
            "tui": _70,
            "tunes": _70,
            "tushu": _70,
            "tvs": _70,
            "ubank": _70,
            "ubs": _70,
            "unicom": _70,
            "university": _70,
            "uno": _70,
            "uol": _70,
            "ups": _70,
            "vacations": _70,
            "vana": _70,
            "vanguard": _70,
            "vegas": _70,
            "ventures": _70,
            "verisign": _70,
            "versicherung": _70,
            "vet": _70,
            "viajes": _70,
            "video": _70,
            "vig": _70,
            "viking": _70,
            "villas": _70,
            "vin": _70,
            "vip": _70,
            "virgin": _70,
            "visa": _70,
            "vision": _70,
            "viva": _70,
            "vivo": _70,
            "vlaanderen": _70,
            "vodka": _70,
            "volvo": _70,
            "vote": _70,
            "voting": _70,
            "voto": _70,
            "voyage": _70,
            "wales": _70,
            "walmart": _70,
            "walter": _70,
            "wang": _70,
            "wanggou": _70,
            "watch": _70,
            "watches": _70,
            "weather": _70,
            "weatherchannel": _70,
            "webcam": _70,
            "weber": _70,
            "website": _70,
            "wed": _70,
            "wedding": _70,
            "weibo": _70,
            "weir": _70,
            "whoswho": _70,
            "wien": _70,
            "wiki": _70,
            "williamhill": _70,
            "win": _70,
            "windows": _70,
            "wine": _70,
            "winners": _70,
            "wme": _70,
            "wolterskluwer": _70,
            "woodside": _70,
            "work": _70,
            "works": _70,
            "world": _70,
            "wow": _70,
            "wtc": _70,
            "wtf": _70,
            "xbox": _70,
            "xerox": _70,
            "xihuan": _70,
            "xin": _70,
            "xn--11b4c3d": _70,
            "\u0915\u0949\u092E": _70,
            "xn--1ck2e1b": _70,
            "\u30BB\u30FC\u30EB": _70,
            "xn--1qqw23a": _70,
            "\u4F5B\u5C71": _70,
            "xn--30rr7y": _70,
            "\u6148\u5584": _70,
            "xn--3bst00m": _70,
            "\u96C6\u56E2": _70,
            "xn--3ds443g": _70,
            "\u5728\u7EBF": _70,
            "xn--3pxu8k": _70,
            "\u70B9\u770B": _70,
            "xn--42c2d9a": _70,
            "\u0E04\u0E2D\u0E21": _70,
            "xn--45q11c": _70,
            "\u516B\u5366": _70,
            "xn--4gbrim": _70,
            "\u0645\u0648\u0642\u0639": _70,
            "xn--55qw42g": _70,
            "\u516C\u76CA": _70,
            "xn--55qx5d": _70,
            "\u516C\u53F8": _70,
            "xn--5su34j936bgsg": _70,
            "\u9999\u683C\u91CC\u62C9": _70,
            "xn--5tzm5g": _70,
            "\u7F51\u7AD9": _70,
            "xn--6frz82g": _70,
            "\u79FB\u52A8": _70,
            "xn--6qq986b3xl": _70,
            "\u6211\u7231\u4F60": _70,
            "xn--80adxhks": _70,
            "\u043C\u043E\u0441\u043A\u0432\u0430": _70,
            "xn--80aqecdr1a": _70,
            "\u043A\u0430\u0442\u043E\u043B\u0438\u043A": _70,
            "xn--80asehdb": _70,
            "\u043E\u043D\u043B\u0430\u0439\u043D": _70,
            "xn--80aswg": _70,
            "\u0441\u0430\u0439\u0442": _70,
            "xn--8y0a063a": _70,
            "\u8054\u901A": _70,
            "xn--9dbq2a": _70,
            "\u05E7\u05D5\u05DD": _70,
            "xn--9et52u": _70,
            "\u65F6\u5C1A": _70,
            "xn--9krt00a": _70,
            "\u5FAE\u535A": _70,
            "xn--b4w605ferd": _70,
            "\u6DE1\u9A6C\u9521": _70,
            "xn--bck1b9a5dre4c": _70,
            "\u30D5\u30A1\u30C3\u30B7\u30E7\u30F3": _70,
            "xn--c1avg": _70,
            "\u043E\u0440\u0433": _70,
            "xn--c2br7g": _70,
            "\u0928\u0947\u091F": _70,
            "xn--cck2b3b": _70,
            "\u30B9\u30C8\u30A2": _70,
            "xn--cckwcxetd": _70,
            "\u30A2\u30DE\u30BE\u30F3": _70,
            "xn--cg4bki": _70,
            "\uC0BC\uC131": _70,
            "xn--czr694b": _70,
            "\u5546\u6807": _70,
            "xn--czrs0t": _70,
            "\u5546\u5E97": _70,
            "xn--czru2d": _70,
            "\u5546\u57CE": _70,
            "xn--d1acj3b": _70,
            "\u0434\u0435\u0442\u0438": _70,
            "xn--eckvdtc9d": _70,
            "\u30DD\u30A4\u30F3\u30C8": _70,
            "xn--efvy88h": _70,
            "\u65B0\u95FB": _70,
            "xn--fct429k": _70,
            "\u5BB6\u96FB": _70,
            "xn--fhbei": _70,
            "\u0643\u0648\u0645": _70,
            "xn--fiq228c5hs": _70,
            "\u4E2D\u6587\u7F51": _70,
            "xn--fiq64b": _70,
            "\u4E2D\u4FE1": _70,
            "xn--fjq720a": _70,
            "\u5A31\u4E50": _70,
            "xn--flw351e": _70,
            "\u8C37\u6B4C": _70,
            "xn--fzys8d69uvgm": _70,
            "\u96FB\u8A0A\u76C8\u79D1": _70,
            "xn--g2xx48c": _70,
            "\u8D2D\u7269": _70,
            "xn--gckr3f0f": _70,
            "\u30AF\u30E9\u30A6\u30C9": _70,
            "xn--gk3at1e": _70,
            "\u901A\u8CA9": _70,
            "xn--hxt814e": _70,
            "\u7F51\u5E97": _70,
            "xn--i1b6b1a6a2e": _70,
            "\u0938\u0902\u0917\u0920\u0928": _70,
            "xn--imr513n": _70,
            "\u9910\u5385": _70,
            "xn--io0a7i": _70,
            "\u7F51\u7EDC": _70,
            "xn--j1aef": _70,
            "\u043A\u043E\u043C": _70,
            "xn--jlq480n2rg": _70,
            "\u4E9A\u9A6C\u900A": _70,
            "xn--jvr189m": _70,
            "\u98DF\u54C1": _70,
            "xn--kcrx77d1x4a": _70,
            "\u98DE\u5229\u6D66": _70,
            "xn--kput3i": _70,
            "\u624B\u673A": _70,
            "xn--mgba3a3ejt": _70,
            "\u0627\u0631\u0627\u0645\u0643\u0648": _70,
            "xn--mgba7c0bbn0a": _70,
            "\u0627\u0644\u0639\u0644\u064A\u0627\u0646": _70,
            "xn--mgbab2bd": _70,
            "\u0628\u0627\u0632\u0627\u0631": _70,
            "xn--mgbca7dzdo": _70,
            "\u0627\u0628\u0648\u0638\u0628\u064A": _70,
            "xn--mgbi4ecexp": _70,
            "\u0643\u0627\u062B\u0648\u0644\u064A\u0643": _70,
            "xn--mgbt3dhd": _70,
            "\u0647\u0645\u0631\u0627\u0647": _70,
            "xn--mk1bu44c": _70,
            "\uB2F7\uCEF4": _70,
            "xn--mxtq1m": _70,
            "\u653F\u5E9C": _70,
            "xn--ngbc5azd": _70,
            "\u0634\u0628\u0643\u0629": _70,
            "xn--ngbe9e0a": _70,
            "\u0628\u064A\u062A\u0643": _70,
            "xn--ngbrx": _70,
            "\u0639\u0631\u0628": _70,
            "xn--nqv7f": _70,
            "\u673A\u6784": _70,
            "xn--nqv7fs00ema": _70,
            "\u7EC4\u7EC7\u673A\u6784": _70,
            "xn--nyqy26a": _70,
            "\u5065\u5EB7": _70,
            "xn--otu796d": _70,
            "\u62DB\u8058": _70,
            "xn--p1acf": _70,
            "\u0440\u0443\u0441": _70,
            "xn--pssy2u": _70,
            "\u5927\u62FF": _70,
            "xn--q9jyb4c": _70,
            "\u307F\u3093\u306A": _70,
            "xn--qcka1pmc": _70,
            "\u30B0\u30FC\u30B0\u30EB": _70,
            "xn--rhqv96g": _70,
            "\u4E16\u754C": _70,
            "xn--rovu88b": _70,
            "\u66F8\u7C4D": _70,
            "xn--ses554g": _70,
            "\u7F51\u5740": _70,
            "xn--t60b56a": _70,
            "\uB2F7\uB137": _70,
            "xn--tckwe": _70,
            "\u30B3\u30E0": _70,
            "xn--tiq49xqyj": _70,
            "\u5929\u4E3B\u6559": _70,
            "xn--unup4y": _70,
            "\u6E38\u620F": _70,
            "xn--vermgensberater-ctb": _70,
            "verm\xF6gensberater": _70,
            "xn--vermgensberatung-pwb": _70,
            "verm\xF6gensberatung": _70,
            "xn--vhquv": _70,
            "\u4F01\u4E1A": _70,
            "xn--vuq861b": _70,
            "\u4FE1\u606F": _70,
            "xn--w4r85el8fhu5dnra": _70,
            "\u5609\u91CC\u5927\u9152\u5E97": _70,
            "xn--w4rs40l": _70,
            "\u5609\u91CC": _70,
            "xn--xhq521b": _70,
            "\u5E7F\u4E1C": _70,
            "xn--zfr164b": _70,
            "\u653F\u52A1": _70,
            "xyz": _70,
            "yachts": _70,
            "yahoo": _70,
            "yamaxun": _70,
            "yandex": _70,
            "yodobashi": _70,
            "yoga": _70,
            "yokohama": _70,
            "you": _70,
            "youtube": _70,
            "yun": _70,
            "zappos": _70,
            "zara": _70,
            "zero": _70,
            "zip": _70,
            "zone": _70,
            "zuerich": _70
          }];
          return rules22;
        }();
        function lookupInTrie(parts, trie, index2) {
          let result = null;
          let node2 = trie;
          while (node2 !== void 0) {
            if (node2[0] === 1) {
              result = {
                index: index2 + 1
              };
            }
            if (index2 === -1) {
              break;
            }
            const succ = node2[1];
            node2 = Object.prototype.hasOwnProperty.call(succ, parts[index2]) ? succ[parts[index2]] : succ["*"];
            index2 -= 1;
          }
          return result;
        }
        __name(lookupInTrie, "lookupInTrie");
        function suffixLookup(hostname2, options2, out) {
          var _a32;
          if (fastPathLookup(hostname2, options2, out)) {
            return;
          }
          const hostnameParts = hostname2.split(".");
          const exceptionMatch = lookupInTrie(hostnameParts, exceptions, hostnameParts.length - 1);
          if (exceptionMatch !== null) {
            out.publicSuffix = hostnameParts.slice(exceptionMatch.index + 1).join(".");
            return;
          }
          const rulesMatch = lookupInTrie(hostnameParts, rules2, hostnameParts.length - 1);
          if (rulesMatch !== null) {
            out.publicSuffix = hostnameParts.slice(rulesMatch.index).join(".");
            return;
          }
          out.publicSuffix = (_a32 = hostnameParts[hostnameParts.length - 1]) !== null && _a32 !== void 0 ? _a32 : null;
        }
        __name(suffixLookup, "suffixLookup");
        var RESULT = getEmptyResult();
        function parse2(url, options2 = {}) {
          return parseImpl(url, 5, suffixLookup, options2, getEmptyResult());
        }
        __name(parse2, "parse");
        function getHostname(url, options2 = {}) {
          resetResult(RESULT);
          return parseImpl(url, 0, suffixLookup, options2, RESULT).hostname;
        }
        __name(getHostname, "getHostname");
        function getPublicSuffix(url, options2 = {}) {
          resetResult(RESULT);
          return parseImpl(url, 2, suffixLookup, options2, RESULT).publicSuffix;
        }
        __name(getPublicSuffix, "getPublicSuffix");
        function getDomain2(url, options2 = {}) {
          resetResult(RESULT);
          return parseImpl(url, 3, suffixLookup, options2, RESULT).domain;
        }
        __name(getDomain2, "getDomain");
        function getSubdomain(url, options2 = {}) {
          resetResult(RESULT);
          return parseImpl(url, 4, suffixLookup, options2, RESULT).subdomain;
        }
        __name(getSubdomain, "getSubdomain");
        function getDomainWithoutSuffix(url, options2 = {}) {
          resetResult(RESULT);
          return parseImpl(url, 5, suffixLookup, options2, RESULT).domainWithoutSuffix;
        }
        __name(getDomainWithoutSuffix, "getDomainWithoutSuffix");
        exports2.getDomain = getDomain2;
        exports2.getDomainWithoutSuffix = getDomainWithoutSuffix;
        exports2.getHostname = getHostname;
        exports2.getPublicSuffix = getPublicSuffix;
        exports2.getSubdomain = getSubdomain;
        exports2.parse = parse2;
      }
    });
    init_lh_error = __esm2({
      "core/lib/lh-error.js"() {
        "use strict";
        init_process_global();
        init_i18n();
        UIStrings20 = {
          /**
           * @description Error message explaining that the Lighthouse run was not able to collect screenshots through Chrome.
           * @example {NO_SPEEDLINE_FRAMES} errorCode
           * */
          didntCollectScreenshots: `Chrome didn't collect any screenshots during the page load. Please make sure there is content visible on the page, and then try re-running Lighthouse. ({errorCode})`,
          /**
           * @description Error message explaining that the performance trace was not able to be recorded for the Lighthouse run.
           * @example {NO_TRACING_STARTED} errorCode
           * */
          badTraceRecording: "Something went wrong with recording the trace over your page load. Please run Lighthouse again. ({errorCode})",
          /**
           * @description Error message explaining that the First Contentful Paint metric was not seen during the page load.
           * @example {NO_FCP} errorCode
           * */
          noFcp: "The page did not paint any content. Please ensure you keep the browser window in the foreground during the load and try again. ({errorCode})",
          /**
           * @description Error message explaining that the Largest Contentful Paint metric was not seen during the page load.
           * @example {NO_LCP} errorCode
           * */
          noLcp: "The page did not display content that qualifies as a Largest Contentful Paint (LCP). Ensure the page has a valid LCP element and then try again. ({errorCode})",
          /**
           * @description Error message explaining that the page loaded too slowly to perform a Lighthouse run.
           * @example {NO_TTI_CPU_IDLE_PERIOD} errorCode
           * */
          pageLoadTookTooLong: "Your page took too long to load. Please follow the opportunities in the report to reduce your page load time, and then try re-running Lighthouse. ({errorCode})",
          /** Error message explaining that Lighthouse could not load the requested URL and the steps that might be taken to fix the unreliability. */
          pageLoadFailed: "Lighthouse was unable to reliably load the page you requested. Make sure you are testing the correct URL and that the server is properly responding to all requests.",
          /**
           * @description Error message explaining that Lighthouse could not load the requested URL and the steps that might be taken to fix the unreliability.
           * @example {404} statusCode
           * */
          pageLoadFailedWithStatusCode: "Lighthouse was unable to reliably load the page you requested. Make sure you are testing the correct URL and that the server is properly responding to all requests. (Status code: {statusCode})",
          /**
           * @description Error message explaining that Lighthouse could not load the requested URL and the steps that might be taken to fix the unreliability.
           * @example {FAILED_DOCUMENT_REQUEST} errorDetails
           * */
          pageLoadFailedWithDetails: "Lighthouse was unable to reliably load the page you requested. Make sure you are testing the correct URL and that the server is properly responding to all requests. (Details: {errorDetails})",
          /**
           * @description Error message explaining that the security certificate of the page Lighthouse observed was invalid, so the URL cannot be accessed. securityMessages will be replaced with one or more strings from the browser explaining what was insecure about the page load.
           * @example {net::ERR_CERT_DATE_INVALID} securityMessages
           * */
          pageLoadFailedInsecure: "The URL you have provided does not have a valid security certificate. {securityMessages}",
          /** Error message explaining that Chrome prevented the page from loading and displayed an interstitial screen instead, so the URL cannot be accessed. */
          pageLoadFailedInterstitial: "Chrome prevented page load with an interstitial. Make sure you are testing the correct URL and that the server is properly responding to all requests.",
          /** Error message explaining that Chrome has encountered an error during the Lighthouse run, and that Chrome should be restarted. */
          internalChromeError: "An internal Chrome error occurred. Please restart Chrome and try re-running Lighthouse.",
          /** Error message explaining that fetching the resources of the webpage has taken longer than the maximum time. */
          requestContentTimeout: "Fetching resource content has exceeded the allotted time",
          /**
           * @description Error message explaining that the webpage is non-HTML, so audits are ill-defined.
           * @example {application/xml} mimeType
           * */
          notHtml: "The page provided is not HTML (served as MIME type {mimeType}).",
          /** Error message explaining that the provided URL Lighthouse points to is not valid, and cannot be loaded. */
          urlInvalid: "The URL you have provided appears to be invalid.",
          /**
           * @description Error message explaining that the Chrome Devtools protocol has exceeded the maximum timeout allowed.
           * @example {Network.enable} protocolMethod
           * */
          protocolTimeout: "Waiting for DevTools protocol response has exceeded the allotted time. (Method: {protocolMethod})",
          /** Error message explaining that the requested page could not be resolved by the DNS server. */
          dnsFailure: "DNS servers could not resolve the provided domain.",
          /** Error message explaining that Lighthouse couldn't complete because the page has stopped responding to its instructions. */
          pageLoadFailedHung: "Lighthouse was unable to reliably load the URL you requested because the page stopped responding.",
          /** Error message explaining that Lighthouse timed out while waiting for the initial connection to the Chrome Devtools protocol. */
          criTimeout: "Timeout waiting for initial Debugger Protocol connection.",
          /**
           * @description Error message explaining that a resource that was required for testing was never collected. "artifactName" will be replaced with the name of the resource that wasn't collected.
           * @example {MainDocumentContent} artifactName
           * */
          missingRequiredArtifact: "Required {artifactName} gatherer did not run.",
          /**
           * @description Error message explaining that there was an error while trying to collect a resource that was required for testing. "artifactName" will be replaced with the name of the resource that wasn't collected; "errorMessage" will be replaced with a string description of the error that occurred.
           * @example {MainDocumentContent} artifactName
           * @example {Could not find main document} errorMessage
           * */
          erroredRequiredArtifact: "Required {artifactName} gatherer encountered an error: {errorMessage}",
          /**
           * @description Error message explaining that a feature is unavailable due to an old version of Chrome. "featureName" will be replaced by the name of the feature which is not supported.
           * @example {Largest Contentful Paint} featureName
           * */
          oldChromeDoesNotSupportFeature: "This version of Chrome is too old to support '{featureName}'. Use a newer version to see full results.",
          /** Error message explaining that the browser tab that Lighthouse is inspecting has crashed. */
          targetCrashed: "Browser tab has unexpectedly crashed."
        };
        str_ = createIcuMessageFn({ url: "core/lib/lh-error.js" }.url, UIStrings20);
        LHERROR_SENTINEL = "__LighthouseErrorSentinel";
        ERROR_SENTINEL = "__ErrorSentinel";
        LighthouseError = class _LighthouseError extends Error {
          static {
            __name(this, "LighthouseError");
          }
          /**
           * @param {LighthouseErrorDefinition} errorDefinition
           * @param {Record<string, string|undefined>=} properties
           * @param {LHErrorOptions=} options
           */
          constructor(errorDefinition, properties2, options2) {
            super(errorDefinition.code, options2);
            this.name = "LighthouseError";
            this.code = errorDefinition.code;
            this.friendlyMessage = str_(errorDefinition.message, { errorCode: this.code, ...properties2 });
            this.lhrRuntimeError = !!errorDefinition.lhrRuntimeError;
            if (properties2)
              Object.assign(this, properties2);
            Error.captureStackTrace(this, _LighthouseError);
          }
          /**
           * @param {string} method
           * @param {{message: string, data?: string|undefined}} protocolError
           * @return {Error|LighthouseError}
           */
          static fromProtocolMessage(method, protocolError) {
            const matchedErrorDefinition = Object.values(_LighthouseError.errors).filter((e) => e.pattern).find((e) => e.pattern && e.pattern.test(protocolError.message));
            if (matchedErrorDefinition) {
              return new _LighthouseError(matchedErrorDefinition);
            }
            let errMsg = `(${method}): ${protocolError.message}`;
            if (protocolError.data)
              errMsg += ` (${protocolError.data})`;
            const error = new Error(`Protocol error ${errMsg}`);
            return Object.assign(error, { protocolMethod: method, protocolError: protocolError.message });
          }
          /**
           * A JSON.stringify replacer to serialize LighthouseErrors and (as a fallback) Errors.
           * Returns a simplified version of the error object that can be reconstituted
           * as a copy of the original error at parse time.
           * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify#The_replacer_parameter
           * @param {Error|LighthouseError} err
           * @return {SerializedBaseError|SerializedLighthouseError}
           */
          static stringifyReplacer(err) {
            if (err instanceof _LighthouseError) {
              const { name, code: code2, message, friendlyMessage, lhrRuntimeError, stack, cause, ...properties2 } = err;
              return {
                sentinel: LHERROR_SENTINEL,
                code: code2,
                stack,
                cause,
                properties: (
                  /** @type {{ [p: string]: string | undefined }} */
                  properties2
                )
              };
            }
            if (err instanceof Error) {
              const { message, stack, cause } = err;
              const code2 = err.code;
              return {
                sentinel: ERROR_SENTINEL,
                message,
                code: code2,
                stack,
                cause
              };
            }
            throw new Error("Invalid value for LighthouseError stringification");
          }
          /**
           * A JSON.parse reviver. If any value passed in is a serialized Error or
           * LighthouseError, the error is recreated as the original object. Otherwise, the
           * value is passed through unchanged.
           * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/parse#Using_the_reviver_parameter
           * @param {string} key
           * @param {any} possibleError
           * @return {any}
           */
          static parseReviver(key, possibleError) {
            if (typeof possibleError === "object" && possibleError !== null) {
              if (possibleError.sentinel === LHERROR_SENTINEL) {
                const { code: code2, stack, cause, properties: properties2 } = (
                  /** @type {SerializedLighthouseError} */
                  possibleError
                );
                const errorDefinition = _LighthouseError.errors[
                  /** @type {keyof typeof ERRORS} */
                  code2
                ];
                const lhError = new _LighthouseError(errorDefinition, properties2, { cause });
                lhError.stack = stack;
                return lhError;
              }
              if (possibleError.sentinel === ERROR_SENTINEL) {
                const { message, code: code2, stack, cause } = (
                  /** @type {SerializedBaseError} */
                  possibleError
                );
                const opts = cause ? { cause } : void 0;
                const error = new Error(message, opts);
                Object.assign(error, { code: code2, stack });
                return error;
              }
            }
            return possibleError;
          }
        };
        ERRORS = {
          // Screenshot/speedline errors
          NO_SPEEDLINE_FRAMES: {
            code: "NO_SPEEDLINE_FRAMES",
            message: UIStrings20.didntCollectScreenshots,
            lhrRuntimeError: true
          },
          SPEEDINDEX_OF_ZERO: {
            code: "SPEEDINDEX_OF_ZERO",
            message: UIStrings20.didntCollectScreenshots,
            lhrRuntimeError: true
          },
          NO_SCREENSHOTS: {
            code: "NO_SCREENSHOTS",
            message: UIStrings20.didntCollectScreenshots,
            lhrRuntimeError: true
          },
          INVALID_SPEEDLINE: {
            code: "INVALID_SPEEDLINE",
            message: UIStrings20.didntCollectScreenshots,
            lhrRuntimeError: true
          },
          // Trace parsing errors
          NO_TRACING_STARTED: {
            code: "NO_TRACING_STARTED",
            message: UIStrings20.badTraceRecording,
            lhrRuntimeError: true
          },
          NO_RESOURCE_REQUEST: {
            code: "NO_RESOURCE_REQUEST",
            message: UIStrings20.badTraceRecording,
            lhrRuntimeError: true
          },
          NO_NAVSTART: {
            code: "NO_NAVSTART",
            message: UIStrings20.badTraceRecording,
            lhrRuntimeError: true
          },
          NO_FCP: {
            code: "NO_FCP",
            message: UIStrings20.noFcp,
            lhrRuntimeError: true
          },
          NO_DCL: {
            code: "NO_DCL",
            message: UIStrings20.badTraceRecording,
            lhrRuntimeError: true
          },
          NO_FMP: {
            code: "NO_FMP",
            message: UIStrings20.badTraceRecording
          },
          NO_LCP: {
            code: "NO_LCP",
            message: UIStrings20.noLcp
          },
          NO_LCP_ALL_FRAMES: {
            code: "NO_LCP_ALL_FRAMES",
            message: UIStrings20.noLcp
          },
          UNSUPPORTED_OLD_CHROME: {
            code: "UNSUPPORTED_OLD_CHROME",
            message: UIStrings20.oldChromeDoesNotSupportFeature
          },
          // TTI calculation failures
          NO_TTI_CPU_IDLE_PERIOD: { code: "NO_TTI_CPU_IDLE_PERIOD", message: UIStrings20.pageLoadTookTooLong },
          NO_TTI_NETWORK_IDLE_PERIOD: {
            code: "NO_TTI_NETWORK_IDLE_PERIOD",
            message: UIStrings20.pageLoadTookTooLong
          },
          // Page load failures
          NO_DOCUMENT_REQUEST: {
            code: "NO_DOCUMENT_REQUEST",
            message: UIStrings20.pageLoadFailed,
            lhrRuntimeError: true
          },
          /* Used when DevTools reports loading failed. Usually an internal (Chrome) issue.
           * Requries an additional `errorDetails` field for translation.
           */
          FAILED_DOCUMENT_REQUEST: {
            code: "FAILED_DOCUMENT_REQUEST",
            message: UIStrings20.pageLoadFailedWithDetails,
            lhrRuntimeError: true
          },
          /* Used when status code is 4xx or 5xx.
           * Requires an additional `statusCode` field for translation.
           */
          ERRORED_DOCUMENT_REQUEST: {
            code: "ERRORED_DOCUMENT_REQUEST",
            message: UIStrings20.pageLoadFailedWithStatusCode,
            lhrRuntimeError: true
          },
          /* Used when security error prevents page load.
           * Requires an additional `securityMessages` field for translation.
           */
          INSECURE_DOCUMENT_REQUEST: {
            code: "INSECURE_DOCUMENT_REQUEST",
            message: UIStrings20.pageLoadFailedInsecure,
            lhrRuntimeError: true
          },
          /* Used when any Chrome interstitial error prevents page load.
           */
          CHROME_INTERSTITIAL_ERROR: {
            code: "CHROME_INTERSTITIAL_ERROR",
            message: UIStrings20.pageLoadFailedInterstitial,
            lhrRuntimeError: true
          },
          /* Used when the page stopped responding and did not finish loading. */
          PAGE_HUNG: {
            code: "PAGE_HUNG",
            message: UIStrings20.pageLoadFailedHung,
            lhrRuntimeError: true
          },
          /* Used when the page is non-HTML. */
          NOT_HTML: {
            code: "NOT_HTML",
            message: UIStrings20.notHtml,
            lhrRuntimeError: true
          },
          // Protocol internal failures
          TRACING_ALREADY_STARTED: {
            code: "TRACING_ALREADY_STARTED",
            message: UIStrings20.internalChromeError,
            pattern: /Tracing.*started/,
            lhrRuntimeError: true
          },
          PARSING_PROBLEM: {
            code: "PARSING_PROBLEM",
            message: UIStrings20.internalChromeError,
            pattern: /Parsing problem/,
            lhrRuntimeError: true
          },
          READ_FAILED: {
            code: "READ_FAILED",
            message: UIStrings20.internalChromeError,
            pattern: /Read failed/,
            lhrRuntimeError: true
          },
          // URL parsing failures
          INVALID_URL: {
            code: "INVALID_URL",
            message: UIStrings20.urlInvalid
          },
          /* Protocol timeout failures
           * Requires an additional `protocolMethod` field for translation.
           */
          PROTOCOL_TIMEOUT: {
            code: "PROTOCOL_TIMEOUT",
            message: UIStrings20.protocolTimeout,
            lhrRuntimeError: true
          },
          // DNS failure on main document (no resolution, timed out, etc)
          DNS_FAILURE: {
            code: "DNS_FAILURE",
            message: UIStrings20.dnsFailure,
            lhrRuntimeError: true
          },
          /** A timeout in the initial connection to the debugger protocol. */
          CRI_TIMEOUT: {
            code: "CRI_TIMEOUT",
            message: UIStrings20.criTimeout,
            lhrRuntimeError: true
          },
          /**
           * Error internal to Runner used when an artifact required for an audit is missing.
           * Requires an additional `artifactName` field for translation.
          */
          MISSING_REQUIRED_ARTIFACT: {
            code: "MISSING_REQUIRED_ARTIFACT",
            message: UIStrings20.missingRequiredArtifact
          },
          /**
           * Error internal to Runner used when an artifact required for an audit was an error.
           * Requires additional `artifactName` and `errorMessage` fields for translation.
          */
          ERRORED_REQUIRED_ARTIFACT: {
            code: "ERRORED_REQUIRED_ARTIFACT",
            message: UIStrings20.erroredRequiredArtifact
          },
          /** The page has crashed and will no longer respond to 99% of CDP commmands. */
          TARGET_CRASHED: {
            code: "TARGET_CRASHED",
            message: UIStrings20.targetCrashed,
            lhrRuntimeError: true
          }
          // Hey! When adding a new error type, update lighthouse-result.proto too.
          // Only necessary for runtime errors, which come from artifacts or pageLoadErrors.
        };
        LighthouseError.errors = ERRORS;
        LighthouseError.NO_ERROR = "NO_ERROR";
        LighthouseError.UNKNOWN_ERROR = "UNKNOWN_ERROR";
      }
    });
    init_url_utils = __esm2({
      "core/lib/url-utils.js"() {
        "use strict";
        init_process_global();
        import_tldts_icann = __toESM(require_cjs(), 1);
        init_util();
        init_lh_error();
        allowedProtocols = [
          "https:",
          "http:",
          "chrome:",
          "chrome-extension:"
        ];
        SECURE_SCHEMES = [
          "data",
          "https",
          "wss",
          "blob",
          "chrome",
          "chrome-extension",
          "about",
          "filesystem"
        ];
        SECURE_LOCALHOST_DOMAINS2 = ["localhost", "127.0.0.1"];
        NON_NETWORK_SCHEMES3 = [
          "blob",
          // @see https://developer.mozilla.org/en-US/docs/Web/API/URL/createObjectURL
          "data",
          // @see https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/Data_URIs
          "intent",
          // @see https://developer.chrome.com/docs/multidevice/android/intents/
          "file",
          // @see https://en.wikipedia.org/wiki/File_URI_scheme
          "filesystem",
          // @see https://developer.mozilla.org/en-US/docs/Web/API/FileSystem
          "chrome-extension"
        ];
        __name(rewriteChromeInternalUrl, "rewriteChromeInternalUrl");
        UrlUtils2 = class _UrlUtils {
          static {
            __name(this, "UrlUtils");
          }
          /**
           * @param {string} url
           * @return {boolean}
           */
          static isValid(url) {
            try {
              new URL(url);
              return true;
            } catch (e) {
              return false;
            }
          }
          /**
           * @param {string} urlA
           * @param {string} urlB
           * @return {boolean}
           */
          static hostsMatch(urlA, urlB) {
            try {
              return new URL(urlA).host === new URL(urlB).host;
            } catch (e) {
              return false;
            }
          }
          /**
           * @param {string} urlA
           * @param {string} urlB
           * @return {boolean}
           */
          static originsMatch(urlA, urlB) {
            try {
              return new URL(urlA).origin === new URL(urlB).origin;
            } catch (e) {
              return false;
            }
          }
          /**
           * @param {string} url
           * @return {?string}
           */
          static getOrigin(url) {
            try {
              const urlInfo = new URL(url);
              if (urlInfo.protocol === "chrome-extension:") {
                return Util.getChromeExtensionOrigin(url);
              }
              return urlInfo.host && urlInfo.origin || null;
            } catch (e) {
              return null;
            }
          }
          /**
           * Returns a primary domain for provided hostname (e.g. www.example.com -> example.com).
           * @param {string|URL} url hostname or URL object
           * @return {string}
           */
          static getRootDomain(url) {
            const parsedUrl = Util.createOrReturnURL(url);
            return (0, import_tldts_icann.getDomain)(parsedUrl.href) || parsedUrl.hostname;
          }
          /**
           * Check if rootDomains matches
           *
           * @param {string|URL} urlA
           * @param {string|URL} urlB
           */
          static rootDomainsMatch(urlA, urlB) {
            let urlAInfo;
            let urlBInfo;
            try {
              urlAInfo = Util.createOrReturnURL(urlA);
              urlBInfo = Util.createOrReturnURL(urlB);
            } catch (err) {
              return false;
            }
            if (!urlAInfo.hostname || !urlBInfo.hostname) {
              return false;
            }
            const urlARootDomain = _UrlUtils.getRootDomain(urlAInfo);
            const urlBRootDomain = _UrlUtils.getRootDomain(urlBInfo);
            return urlARootDomain === urlBRootDomain;
          }
          /**
           * @param {string} url
           * @param {{numPathParts: number, preserveQuery: boolean, preserveHost: boolean}=} options
           * @return {string}
           */
          static getURLDisplayName(url, options2) {
            return Util.getURLDisplayName(new URL(url), options2);
          }
          /**
           * Limits data URIs to 100 characters, returns all other strings untouched.
           * @param {string} url
           * @return {string}
           */
          static elideDataURI(url) {
            try {
              const parsed = new URL(url);
              return parsed.protocol === "data:" ? Util.truncate(url, 100) : url;
            } catch (e) {
              return url;
            }
          }
          /**
           * Determine if url1 equals url2, ignoring URL fragments.
           * @param {string} url1
           * @param {string} url2
           * @return {boolean}
           */
          static equalWithExcludedFragments(url1, url2) {
            [url1, url2] = [url1, url2].map(rewriteChromeInternalUrl);
            try {
              const urla = new URL(url1);
              urla.hash = "";
              const urlb = new URL(url2);
              urlb.hash = "";
              return urla.href === urlb.href;
            } catch (e) {
              return false;
            }
          }
          /**
           * Determine if the url has a protocol that we're able to test
           * @param {string} url
           * @return {boolean}
           */
          static isProtocolAllowed(url) {
            try {
              const parsed = new URL(url);
              return allowedProtocols.includes(parsed.protocol);
            } catch (e) {
              return false;
            }
          }
          /**
           * Is the host localhost-enough to satisfy the "secure context" definition
           * https://github.com/GoogleChrome/lighthouse/pull/11766#discussion_r582340683
           * @param {string} hostname Either a `new URL(url).hostname` or a `networkRequest.parsedUrl.host`
           * @return {boolean}
           */
          static isLikeLocalhost(hostname2) {
            return SECURE_LOCALHOST_DOMAINS2.includes(hostname2) || hostname2.endsWith(".localhost");
          }
          /**
           * @param {NetworkRequest['parsedURL']['scheme']} scheme
           * @return {boolean}
           */
          static isSecureScheme(scheme) {
            return SECURE_SCHEMES.includes(scheme);
          }
          /**
           * Use `NetworkRequest.isNonNetworkRequest(req)` if working with a request.
           * Note: the `protocol` field from CDP can be 'h2', 'http', (not 'https'!) or it'll be url's scheme.
           *   https://source.chromium.org/chromium/chromium/src/+/main:content/browser/devtools/protocol/network_handler.cc;l=598-611;drc=56d4a9a9deb30be73adcee8737c73bcb2a5ab64f
           * However, a `new URL(href).protocol` has a colon suffix.
           *   https://url.spec.whatwg.org/#dom-url-protocol
           * A URL's `scheme` is specced as the `protocol` sans-colon, but isn't exposed on a URL object.
           * This method can take all 3 of these string types as a parameter.
           * @param {NetworkRequest['protocol'] | URL['protocol']} protocol Either a networkRequest's `protocol` per CDP or a `new URL(href).protocol`
           * @return {boolean}
           */
          static isNonNetworkProtocol(protocol2) {
            const urlScheme = protocol2.includes(":") ? protocol2.slice(0, protocol2.indexOf(":")) : protocol2;
            return NON_NETWORK_SCHEMES3.includes(urlScheme);
          }
          /**
           * @param {string} src
           * @return {string|undefined}
           */
          static guessMimeType(src2) {
            let url;
            try {
              url = new URL(src2);
            } catch {
              return void 0;
            }
            if (url.protocol === "data:") {
              const match2 = url.pathname.match(/^(image\/(png|jpeg|svg\+xml|webp|gif|avif))[;,]/);
              if (!match2)
                return void 0;
              return match2[1];
            }
            const match = url.pathname.toLowerCase().match(/\.(png|jpeg|jpg|svg|webp|gif|avif)$/);
            if (!match)
              return void 0;
            const ext = match[1];
            if (ext === "svg")
              return "image/svg+xml";
            if (ext === "jpg")
              return "image/jpeg";
            return `image/${ext}`;
          }
          /**
           * @param {string|undefined} url
           * @return {string}
           */
          static normalizeUrl(url) {
            if (url && this.isValid(url) && this.isProtocolAllowed(url)) {
              return new URL(url).href;
            } else {
              throw new LighthouseError(LighthouseError.errors.INVALID_URL);
            }
          }
        };
        UrlUtils2.INVALID_URL_DEBUG_STRING = "Lighthouse was unable to determine the URL of some script executions. It's possible a Chrome extension or other eval'd code is the source.";
        url_utils_default = UrlUtils2;
      }
    });
    init_network_request = __esm2({
      "core/lib/network-request.js"() {
        "use strict";
        init_process_global();
        init_lh();
        init_lantern2();
        init_url_utils();
        HEADER_TCP = "X-TCPMs";
        HEADER_SSL = "X-SSLMs";
        HEADER_REQ = "X-RequestMs";
        HEADER_RES = "X-ResponseMs";
        HEADER_TOTAL = "X-TotalMs";
        HEADER_FETCHED_SIZE = "X-TotalFetchedSize";
        HEADER_PROTOCOL_IS_H2 = "X-ProtocolIsH2";
        RESOURCE_TYPES = {
          XHR: "XHR",
          Fetch: "Fetch",
          EventSource: "EventSource",
          Script: "Script",
          Stylesheet: "Stylesheet",
          Image: "Image",
          Media: "Media",
          Font: "Font",
          Document: "Document",
          TextTrack: "TextTrack",
          WebSocket: "WebSocket",
          Other: "Other",
          Manifest: "Manifest",
          SignedExchange: "SignedExchange",
          Ping: "Ping",
          Preflight: "Preflight",
          CSPViolationReport: "CSPViolationReport",
          Prefetch: "Prefetch",
          FedCM: "FedCM"
        };
        NetworkRequest = class _NetworkRequest {
          static {
            __name(this, "NetworkRequest");
          }
          constructor() {
            this.requestId = "";
            this.connectionId = 0;
            this.connectionReused = false;
            this.url = "";
            this.protocol = "";
            this.isSecure = false;
            this.isValid = false;
            this.parsedURL = /** @type {ParsedURL} */
            { scheme: "" };
            this.documentURL = "";
            this.rendererStartTime = -1;
            this.networkRequestTime = -1;
            this.responseHeadersEndTime = -1;
            this.networkEndTime = -1;
            this.transferSize = 0;
            this.responseHeadersTransferSize = 0;
            this.resourceSize = 0;
            this.fromDiskCache = false;
            this.fromMemoryCache = false;
            this.fromPrefetchCache = false;
            this.lrStatistics = void 0;
            this.finished = false;
            this.requestMethod = "";
            this.statusCode = -1;
            this.redirectSource = void 0;
            this.redirectDestination = void 0;
            this.redirects = void 0;
            this.failed = false;
            this.localizedFailDescription = "";
            this.initiator = { type: "other" };
            this.timing = void 0;
            this.resourceType = void 0;
            this.mimeType = "";
            this.priority = "Low";
            this.initiatorRequest = void 0;
            this.responseHeaders = [];
            this.responseHeadersText = "";
            this.fetchedViaServiceWorker = false;
            this.frameId = "";
            this.sessionId = void 0;
            this.sessionTargetType = void 0;
            this.fromWorker = false;
            this.isLinkPreload = false;
          }
          /**
           * @return {boolean}
           */
          hasErrorStatusCode() {
            return this.statusCode >= 400;
          }
          /**
           * @param {NetworkRequest} initiatorRequest
           */
          setInitiatorRequest(initiatorRequest) {
            this.initiatorRequest = initiatorRequest;
          }
          /**
           * @param {LH.Crdp.Network.RequestWillBeSentEvent} data
           */
          onRequestWillBeSent(data312) {
            this.requestId = data312.requestId;
            let url;
            try {
              url = new URL(data312.request.url);
            } catch (e) {
              return;
            }
            this.url = data312.request.url;
            this.documentURL = data312.documentURL;
            this.parsedURL = {
              scheme: url.protocol.split(":")[0],
              // Intentional, DevTools uses different terminology
              host: url.hostname,
              securityOrigin: url.origin
            };
            this.isSecure = url_utils_default.isSecureScheme(this.parsedURL.scheme);
            this.rendererStartTime = data312.timestamp * 1e3;
            this.networkRequestTime = this.rendererStartTime;
            this.responseHeadersEndTime = this.rendererStartTime;
            this.requestMethod = data312.request.method;
            this.initiator = data312.initiator;
            this.resourceType = data312.type && RESOURCE_TYPES[data312.type];
            this.priority = data312.request.initialPriority;
            this.frameId = data312.frameId;
            this.isLinkPreload = data312.initiator.type === "preload" || !!data312.request.isLinkPreload;
            this.isValid = true;
          }
          onRequestServedFromCache() {
            this.fromMemoryCache = true;
          }
          /**
           * @param {LH.Crdp.Network.ResponseReceivedEvent} data
           */
          onResponseReceived(data312) {
            this._onResponse(data312.response, data312.timestamp, data312.type);
            this._updateProtocolForLightrider();
            this.frameId = data312.frameId;
          }
          /**
           * @param {LH.Crdp.Network.ResponseReceivedExtraInfoEvent} data
           */
          onResponseReceivedExtraInfo(data312) {
            this.responseHeadersText = data312.headersText || "";
          }
          /**
           * @param {LH.Crdp.Network.DataReceivedEvent} data
           */
          onDataReceived(data312) {
            this.resourceSize += data312.dataLength;
            if (data312.encodedDataLength !== -1) {
              this.transferSize += data312.encodedDataLength;
            }
          }
          /**
           * @param {LH.Crdp.Network.LoadingFinishedEvent} data
           */
          onLoadingFinished(data312) {
            if (this.finished)
              return;
            this.finished = true;
            this.networkEndTime = data312.timestamp * 1e3;
            if (data312.encodedDataLength >= 0) {
              this.transferSize = data312.encodedDataLength;
            }
            this._updateResponseHeadersEndTimeIfNecessary();
            this._updateTransferSizeForLightrider();
            this._updateTimingsForLightrider();
          }
          /**
           * @param {LH.Crdp.Network.LoadingFailedEvent} data
           */
          onLoadingFailed(data312) {
            if (this.finished)
              return;
            this.finished = true;
            this.networkEndTime = data312.timestamp * 1e3;
            this.failed = true;
            this.resourceType = data312.type && RESOURCE_TYPES[data312.type];
            this.localizedFailDescription = data312.errorText;
            this._updateResponseHeadersEndTimeIfNecessary();
            this._updateTransferSizeForLightrider();
            this._updateTimingsForLightrider();
          }
          /**
           * @param {LH.Crdp.Network.ResourceChangedPriorityEvent} data
           */
          onResourceChangedPriority(data312) {
            this.priority = data312.newPriority;
          }
          /**
           * @param {LH.Crdp.Network.RequestWillBeSentEvent} data
           */
          onRedirectResponse(data312) {
            if (!data312.redirectResponse)
              throw new Error("Missing redirectResponse data");
            this._onResponse(data312.redirectResponse, data312.timestamp, data312.type);
            this.resourceType = void 0;
            this.finished = true;
            this.networkEndTime = data312.timestamp * 1e3;
            this._updateResponseHeadersEndTimeIfNecessary();
          }
          /**
           * @param {string|undefined} sessionId
           */
          setSession(sessionId) {
            this.sessionId = sessionId;
          }
          get isOutOfProcessIframe() {
            return this.sessionTargetType === "iframe";
          }
          /**
           * @param {LH.Crdp.Network.Response} response
           * @param {number} timestamp in seconds
           * @param {LH.Crdp.Network.ResponseReceivedEvent['type']=} resourceType
           */
          _onResponse(response, timestamp, resourceType) {
            this.url = response.url;
            this.connectionId = response.connectionId;
            this.connectionReused = response.connectionReused;
            if (response.protocol)
              this.protocol = response.protocol;
            this.responseTimestamp = timestamp * 1e3;
            this.transferSize = response.encodedDataLength;
            this.responseHeadersTransferSize = response.encodedDataLength;
            if (typeof response.fromDiskCache === "boolean")
              this.fromDiskCache = response.fromDiskCache;
            if (typeof response.fromPrefetchCache === "boolean") {
              this.fromPrefetchCache = response.fromPrefetchCache;
            }
            this.statusCode = response.status;
            this.timing = response.timing;
            if (resourceType)
              this.resourceType = RESOURCE_TYPES[resourceType];
            this.mimeType = response.mimeType;
            this.responseHeaders = _NetworkRequest._headersDictToHeadersArray(response.headers);
            this.fetchedViaServiceWorker = !!response.fromServiceWorker;
            if (this.fromMemoryCache)
              this.timing = void 0;
            if (this.timing)
              this._recomputeTimesWithResourceTiming(this.timing);
          }
          /**
           * Resolve differences between conflicting timing signals. Based on the property setters in DevTools.
           * @see https://github.com/ChromeDevTools/devtools-frontend/blob/56a99365197b85c24b732ac92b0ac70feed80179/front_end/sdk/NetworkRequest.js#L485-L502
           * @param {LH.Crdp.Network.ResourceTiming} timing
           */
          _recomputeTimesWithResourceTiming(timing) {
            if (timing.requestTime === -1 || timing.receiveHeadersEnd === -1)
              return;
            this.networkRequestTime = timing.requestTime * 1e3;
            const headersReceivedTime = this.networkRequestTime + timing.receiveHeadersEnd;
            this.responseHeadersEndTime = headersReceivedTime;
            if (this.responseTimestamp !== void 0) {
              this.responseHeadersEndTime = Math.min(this.responseHeadersEndTime, this.responseTimestamp);
            }
            this.responseHeadersEndTime = Math.max(this.responseHeadersEndTime, this.networkRequestTime);
            this.networkEndTime = Math.max(this.networkEndTime, this.responseHeadersEndTime);
          }
          /**
           * Update responseHeadersEndTime to the networkEndTime if networkEndTime is earlier.
           * A response can't be received after the entire request finished.
           */
          _updateResponseHeadersEndTimeIfNecessary() {
            this.responseHeadersEndTime = Math.min(this.networkEndTime, this.responseHeadersEndTime);
          }
          /**
           * LR loses transfer size information, but passes it in the 'X-TotalFetchedSize' header.
           * 'X-TotalFetchedSize' is the canonical transfer size in LR. Nothing should supersede it.
           *
           * The total length of the encoded data is spread out among multiple events. The sum of the
           * values in onResponseReceived and all the onDataReceived events typically equals the value
           * seen on the onLoadingFinished event. In <1% of cases we see the values differ. As we process
           * onResponseReceived and onDataReceived we accumulate the total encodedDataLength. When we
           * process onLoadingFinished, we override the accumulated total. We do this so that if the
           * request is aborted or fails, we still get a value via the accumulation.
           *
           * In Lightrider, due to instrumentation limitations, our values for encodedDataLength are bogus
           * and not valid. However the resource's true encodedDataLength/transferSize is shared via a
           * special response header, X-TotalFetchedSize. In this situation, we read this value from
           * responseReceived, use it for the transferSize and ignore the encodedDataLength values in
           * both dataReceived and loadingFinished.
           */
          _updateTransferSizeForLightrider() {
            if (!global.isLightrider)
              return;
            const totalFetchedSize = this.responseHeaders.find((item) => item.name === HEADER_FETCHED_SIZE);
            if (!totalFetchedSize)
              return;
            const floatValue = parseFloat(totalFetchedSize.value);
            if (isNaN(floatValue))
              return;
            this.transferSize = floatValue;
          }
          /**
           * LR loses protocol information.
           */
          _updateProtocolForLightrider() {
            if (!global.isLightrider)
              return;
            if (this.responseHeaders.some((item) => item.name === HEADER_PROTOCOL_IS_H2)) {
              this.protocol = "h2";
            }
          }
          /**
           * LR gets additional, accurate timing information from its underlying fetch infrastructure.  This
           * is passed in via X-Headers similar to 'X-TotalFetchedSize'.
           */
          _updateTimingsForLightrider() {
            if (!global.isLightrider)
              return;
            const totalHeader = this.responseHeaders.find((item) => item.name === HEADER_TOTAL);
            if (!totalHeader)
              return;
            let totalMs = parseInt(totalHeader.value);
            const TCPMsHeader = this.responseHeaders.find((item) => item.name === HEADER_TCP);
            const SSLMsHeader = this.responseHeaders.find((item) => item.name === HEADER_SSL);
            const requestMsHeader = this.responseHeaders.find((item) => item.name === HEADER_REQ);
            const responseMsHeader = this.responseHeaders.find((item) => item.name === HEADER_RES);
            const TCPMs = TCPMsHeader ? Math.max(0, parseInt(TCPMsHeader.value)) : 0;
            const SSLMs = SSLMsHeader ? Math.max(0, parseInt(SSLMsHeader.value)) : 0;
            const requestMs = requestMsHeader ? Math.max(0, parseInt(requestMsHeader.value)) : 0;
            const responseMs = responseMsHeader ? Math.max(0, parseInt(responseMsHeader.value)) : 0;
            if (Number.isNaN(TCPMs + requestMs + responseMs + totalMs)) {
              return;
            }
            if (TCPMs + requestMs + responseMs !== totalMs) {
              const delta = Math.abs(TCPMs + requestMs + responseMs - totalMs);
              if (delta >= 25)
                return;
              totalMs = TCPMs + requestMs + responseMs;
            }
            if (SSLMs > TCPMs) {
              return;
            }
            this.lrStatistics = {
              endTimeDeltaMs: this.networkEndTime - (this.networkRequestTime + totalMs),
              TCPMs,
              requestMs,
              responseMs
            };
            this.serverResponseTime = responseMs;
          }
          /**
           * Convert the requestId to backend-version by removing the `:redirect` portion
           *
           * @param {string} requestId
           * @return {string}
           */
          static getRequestIdForBackend(requestId) {
            return requestId.replace(/(:redirect)+$/, "");
          }
          /**
           * Based on DevTools NetworkManager.
           * @see https://github.com/ChromeDevTools/devtools-frontend/blob/3415ee28e86a3f4bcc2e15b652d22069938df3a6/front_end/sdk/NetworkManager.js#L285-L297
           * @param {LH.Crdp.Network.Headers} headersDict
           * @return {Array<HeaderEntry>}
           */
          static _headersDictToHeadersArray(headersDict) {
            const result = [];
            for (const name of Object.keys(headersDict)) {
              const values = headersDict[name].split("\n");
              for (let i = 0; i < values.length; ++i) {
                result.push({ name, value: values[i] });
              }
            }
            return result;
          }
          static get TYPES() {
            return RESOURCE_TYPES;
          }
          /**
           * @param {NetworkRequest} record
           * @return {Lantern.Types.NetworkRequest<NetworkRequest>}
           */
          static asLanternNetworkRequest(record2) {
            let timing = record2.timing;
            let serverResponseTime;
            if (global.isLightrider && record2.lrStatistics) {
              if (record2.protocol.startsWith("h3")) {
                timing = {
                  connectStart: 0,
                  connectEnd: record2.lrStatistics.TCPMs
                };
              } else {
                timing = {
                  connectStart: 0,
                  sslStart: record2.lrStatistics.TCPMs / 2,
                  connectEnd: record2.lrStatistics.TCPMs,
                  sslEnd: record2.lrStatistics.TCPMs
                };
                serverResponseTime = record2.lrStatistics.requestMs;
              }
            }
            record2.fromWorker = record2.sessionTargetType === "worker";
            return {
              rawRequest: record2,
              ...record2,
              timing,
              serverResponseTime
            };
          }
          /**
           * @param {Pick<NetworkRequest, 'protocol'|'parsedURL'>} record
           * @return {boolean}
           */
          static isNonNetworkRequest(record2) {
            return url_utils_default.isNonNetworkProtocol(record2.protocol) || // But `protocol` can fail to be populated if the request fails, so fallback to scheme.
            url_utils_default.isNonNetworkProtocol(record2.parsedURL.scheme);
          }
          /**
           * Technically there's not alignment on URLs that create "secure connections" vs "secure contexts"
           * https://github.com/GoogleChrome/lighthouse/pull/11766#discussion_r582340683
           * But for our purposes, we don't need to worry too much.
           * @param {NetworkRequest} record
           * @return {boolean}
           */
          static isSecureRequest(record2) {
            return url_utils_default.isSecureScheme(record2.parsedURL.scheme) || url_utils_default.isSecureScheme(record2.protocol) || url_utils_default.isLikeLocalhost(record2.parsedURL.host) || _NetworkRequest.isHstsRequest(record2);
          }
          /**
           * Returns whether the network request was an HSTS redirect request.
           * @param {NetworkRequest} record
           * @return {boolean}
           */
          static isHstsRequest(record2) {
            const destination = record2.redirectDestination;
            if (!destination)
              return false;
            const reasonHeader = record2.responseHeaders.find((header) => header.name === "Non-Authoritative-Reason");
            const reason = reasonHeader?.value;
            return reason === "HSTS" && _NetworkRequest.isSecureRequest(destination);
          }
          /**
           * Returns whether the network request was sent encoded.
           * @param {NetworkRequest} record
           * @return {boolean}
           */
          static isContentEncoded(record2) {
            const patterns = global.isLightrider ? [
              /^x-original-content-encoding$/i
            ] : [
              /^content-encoding$/i,
              /^x-content-encoding-over-network$/i
            ];
            const compressionTypes = ["gzip", "br", "deflate", "zstd"];
            return record2.responseHeaders.some((header) => patterns.some((p) => header.name.match(p)) && compressionTypes.includes(header.value));
          }
          /**
           * Resource size is almost always the right one to be using because of the below:
           *     `transferSize = resourceSize + headers.length`.
           * HOWEVER, there are some cases where an image is compressed again over the network and transfer size
           * is smaller (see https://github.com/GoogleChrome/lighthouse/pull/4968).
           * Use the min of the two numbers to be safe.
           * `tranferSize` of cached records is 0
           * @param {NetworkRequest} networkRecord
           * @return {number}
           */
          static getResourceSizeOnNetwork(networkRecord) {
            return Math.min(networkRecord.resourceSize || 0, networkRecord.transferSize || Infinity);
          }
        };
        NetworkRequest.HEADER_TCP = HEADER_TCP;
        NetworkRequest.HEADER_SSL = HEADER_SSL;
        NetworkRequest.HEADER_REQ = HEADER_REQ;
        NetworkRequest.HEADER_RES = HEADER_RES;
        NetworkRequest.HEADER_TOTAL = HEADER_TOTAL;
        NetworkRequest.HEADER_FETCHED_SIZE = HEADER_FETCHED_SIZE;
        NetworkRequest.HEADER_PROTOCOL_IS_H2 = HEADER_PROTOCOL_IS_H2;
      }
    });
    init_network_recorder = __esm2({
      "core/lib/network-recorder.js"() {
        "use strict";
        init_process_global();
        init_lighthouse_logger();
        init_lh();
        init_lantern2();
        init_network_request();
        RequestEventEmitter = /** @type {RequestEmitter} */
        EventEmitter2;
        NetworkRecorder = class _NetworkRecorder extends RequestEventEmitter {
          static {
            __name(this, "NetworkRecorder");
          }
          /**
           * Creates an instance of NetworkRecorder.
           */
          constructor() {
            super();
            this._records = [];
            this._recordsById = /* @__PURE__ */ new Map();
          }
          /**
           * Returns the array of raw network request data without finalizing the initiator and
           * redirect chain.
           * @return {Array<NetworkRequest>}
           */
          getRawRecords() {
            return Array.from(this._records);
          }
          /**
           * Listener for the DevTools SDK NetworkManager's RequestStarted event, which includes both
           * web socket and normal request creation.
           * @param {NetworkRequest} request
           * @private
           */
          onRequestStarted(request3) {
            this._records.push(request3);
            this._recordsById.set(request3.requestId, request3);
            this.emit("requeststarted", request3);
          }
          /**
           * Listener for the DevTools SDK NetworkManager's RequestFinished event, which includes
           * request finish, failure, and redirect, as well as the closing of web sockets.
           * @param {NetworkRequest} request
           * @private
           */
          onRequestFinished(request3) {
            this.emit("requestfinished", request3);
          }
          // The below methods proxy network data into the NetworkRequest object which mimics the
          // DevTools SDK network layer.
          /**
           * @param {{params: LH.Crdp.Network.RequestWillBeSentEvent, targetType: LH.Protocol.TargetType, sessionId?: string}} event
           */
          onRequestWillBeSent(event) {
            const data312 = event.params;
            const originalRequest = this._findRealRequestAndSetSession(data312.requestId, event.targetType, event.sessionId);
            if (!originalRequest) {
              const request3 = new NetworkRequest();
              request3.onRequestWillBeSent(data312);
              request3.sessionId = event.sessionId;
              request3.sessionTargetType = event.targetType;
              this.onRequestStarted(request3);
              lighthouse_logger_default.verbose("network", `request will be sent to ${request3.url}`);
              return;
            }
            if (!data312.redirectResponse) {
              return;
            }
            const modifiedData = {
              ...data312,
              // Copy over the initiator as well to match DevTools behavior
              initiator: originalRequest.initiator,
              requestId: `${originalRequest.requestId}:redirect`
            };
            const redirectedRequest = new NetworkRequest();
            redirectedRequest.onRequestWillBeSent(modifiedData);
            originalRequest.onRedirectResponse(data312);
            lighthouse_logger_default.verbose("network", `${originalRequest.url} redirected to ${redirectedRequest.url}`);
            originalRequest.redirectDestination = redirectedRequest;
            redirectedRequest.redirectSource = originalRequest;
            this.onRequestStarted(redirectedRequest);
            this.onRequestFinished(originalRequest);
          }
          /**
           * @param {{params: LH.Crdp.Network.RequestServedFromCacheEvent, targetType: LH.Protocol.TargetType, sessionId?: string}} event
           */
          onRequestServedFromCache(event) {
            const data312 = event.params;
            const request3 = this._findRealRequestAndSetSession(data312.requestId, event.targetType, event.sessionId);
            if (!request3)
              return;
            lighthouse_logger_default.verbose("network", `${request3.url} served from cache`);
            request3.onRequestServedFromCache();
          }
          /**
           * @param {{params: LH.Crdp.Network.ResponseReceivedEvent, targetType: LH.Protocol.TargetType, sessionId?: string}} event
           */
          onResponseReceived(event) {
            const data312 = event.params;
            const request3 = this._findRealRequestAndSetSession(data312.requestId, event.targetType, event.sessionId);
            if (!request3)
              return;
            lighthouse_logger_default.verbose("network", `${request3.url} response received`);
            request3.onResponseReceived(data312);
          }
          /**
           * @param {{params: LH.Crdp.Network.ResponseReceivedExtraInfoEvent, targetType: LH.Protocol.TargetType, sessionId?: string}} event
           */
          onResponseReceivedExtraInfo(event) {
            const data312 = event.params;
            const request3 = this._findRealRequestAndSetSession(data312.requestId, event.targetType, event.sessionId);
            if (!request3)
              return;
            lighthouse_logger_default.verbose("network", `${request3.url} response received extra info`);
            request3.onResponseReceivedExtraInfo(data312);
          }
          /**
           * @param {{params: LH.Crdp.Network.DataReceivedEvent, targetType: LH.Protocol.TargetType, sessionId?: string}} event
           */
          onDataReceived(event) {
            const data312 = event.params;
            const request3 = this._findRealRequestAndSetSession(data312.requestId, event.targetType, event.sessionId);
            if (!request3)
              return;
            lighthouse_logger_default.verbose("network", `${request3.url} data received`);
            request3.onDataReceived(data312);
          }
          /**
           * @param {{params: LH.Crdp.Network.LoadingFinishedEvent, targetType: LH.Protocol.TargetType, sessionId?: string}} event
           */
          onLoadingFinished(event) {
            const data312 = event.params;
            const request3 = this._findRealRequestAndSetSession(data312.requestId, event.targetType, event.sessionId);
            if (!request3)
              return;
            lighthouse_logger_default.verbose("network", `${request3.url} loading finished`);
            request3.onLoadingFinished(data312);
            this.onRequestFinished(request3);
          }
          /**
           * @param {{params: LH.Crdp.Network.LoadingFailedEvent, targetType: LH.Protocol.TargetType, sessionId?: string}} event
           */
          onLoadingFailed(event) {
            const data312 = event.params;
            const request3 = this._findRealRequestAndSetSession(data312.requestId, event.targetType, event.sessionId);
            if (!request3)
              return;
            lighthouse_logger_default.verbose("network", `${request3.url} loading failed`);
            request3.onLoadingFailed(data312);
            this.onRequestFinished(request3);
          }
          /**
           * @param {{params: LH.Crdp.Network.ResourceChangedPriorityEvent, targetType: LH.Protocol.TargetType, sessionId?: string}} event
           */
          onResourceChangedPriority(event) {
            const data312 = event.params;
            const request3 = this._findRealRequestAndSetSession(data312.requestId, event.targetType, event.sessionId);
            if (!request3)
              return;
            request3.onResourceChangedPriority(data312);
          }
          /**
           * Routes network events to their handlers, so we can construct networkRecords
           * @param {LH.Protocol.RawEventMessage} event
           */
          dispatch(event) {
            switch (event.method) {
              case "Network.requestWillBeSent":
                return this.onRequestWillBeSent(event);
              case "Network.requestServedFromCache":
                return this.onRequestServedFromCache(event);
              case "Network.responseReceived":
                return this.onResponseReceived(event);
              case "Network.responseReceivedExtraInfo":
                return this.onResponseReceivedExtraInfo(event);
              case "Network.dataReceived":
                return this.onDataReceived(event);
              case "Network.loadingFinished":
                return this.onLoadingFinished(event);
              case "Network.loadingFailed":
                return this.onLoadingFailed(event);
              case "Network.resourceChangedPriority":
                return this.onResourceChangedPriority(event);
              default:
                return;
            }
          }
          /**
           * Redirected requests all have identical requestIds over the protocol. Once a request has been
           * redirected all future messages referrencing that requestId are about the new destination, not
           * the original. This method is a helper for finding the real request object to which the current
           * message is referring.
           *
           * @param {string} requestId
           * @param {LH.Protocol.TargetType} targetType
           * @param {string|undefined} sessionId
           * @return {NetworkRequest|undefined}
           */
          _findRealRequestAndSetSession(requestId, targetType, sessionId) {
            let request3 = this._recordsById.get(requestId);
            if (!request3 || !request3.isValid)
              return void 0;
            while (request3.redirectDestination) {
              request3 = request3.redirectDestination;
            }
            request3.setSession(sessionId);
            request3.sessionTargetType = targetType;
            return request3;
          }
          /**
           * @param {NetworkRequest} record The record to find the initiator of
           * @param {Map<string, NetworkRequest[]>} recordsByURL
           * @return {NetworkRequest|null}
           * @private
           */
          static _chooseInitiatorRequest(record2, recordsByURL) {
            if (record2.redirectSource) {
              return record2.redirectSource;
            }
            const initiatorURL = graph_exports.PageDependencyGraph.getNetworkInitiators(record2)[0];
            let candidates = recordsByURL.get(initiatorURL) || [];
            candidates = candidates.filter((c) => {
              return c.responseHeadersEndTime <= record2.rendererStartTime && c.finished && !c.failed;
            });
            if (candidates.length > 1) {
              const nonPrefetchCandidates = candidates.filter((cand) => cand.resourceType !== NetworkRequest.TYPES.Other);
              if (nonPrefetchCandidates.length) {
                candidates = nonPrefetchCandidates;
              }
            }
            if (candidates.length > 1) {
              const sameFrameCandidates = candidates.filter((cand) => cand.frameId === record2.frameId);
              if (sameFrameCandidates.length) {
                candidates = sameFrameCandidates;
              }
            }
            if (candidates.length > 1 && record2.initiator.type === "parser") {
              const documentCandidates = candidates.filter((cand) => cand.resourceType === NetworkRequest.TYPES.Document);
              if (documentCandidates.length) {
                candidates = documentCandidates;
              }
            }
            if (candidates.length > 1) {
              const linkPreloadCandidates = candidates.filter((c) => c.isLinkPreload);
              if (linkPreloadCandidates.length) {
                const nonPreloadCandidates = candidates.filter((c) => !c.isLinkPreload);
                const allPreloaded = nonPreloadCandidates.every((c) => c.fromDiskCache || c.fromMemoryCache);
                if (nonPreloadCandidates.length && allPreloaded) {
                  candidates = linkPreloadCandidates;
                }
              }
            }
            return candidates.length === 1 ? candidates[0] : null;
          }
          /**
           * Construct network records from a log of devtools protocol messages.
           * @param {LH.DevtoolsLog} devtoolsLog
           * @return {Array<LH.Artifacts.NetworkRequest>}
           */
          static recordsFromLogs(devtoolsLog) {
            const networkRecorder = new _NetworkRecorder();
            devtoolsLog.forEach((message) => networkRecorder.dispatch(message));
            const records = networkRecorder.getRawRecords().filter((record2) => record2.isValid);
            const recordsByURL = /* @__PURE__ */ new Map();
            for (const record2 of records) {
              const records2 = recordsByURL.get(record2.url) || [];
              records2.push(record2);
              recordsByURL.set(record2.url, records2);
            }
            for (const record2 of records) {
              const initiatorRequest = _NetworkRecorder._chooseInitiatorRequest(record2, recordsByURL);
              if (initiatorRequest) {
                record2.setInitiatorRequest(initiatorRequest);
              }
              let finalRecord = record2;
              while (finalRecord.redirectDestination)
                finalRecord = finalRecord.redirectDestination;
              if (finalRecord === record2 || finalRecord.redirects)
                continue;
              const redirects = [];
              for (let redirect = finalRecord.redirectSource; redirect; redirect = redirect.redirectSource) {
                redirects.unshift(redirect);
              }
              finalRecord.redirects = redirects;
            }
            return records;
          }
        };
      }
    });
    init_network_records = __esm2({
      "core/computed/network-records.js"() {
        "use strict";
        init_process_global();
        init_lh();
        init_computed_artifact();
        init_network_recorder();
        NetworkRecords = class {
          static {
            __name(this, "NetworkRecords");
          }
          /**
           * @param {LH.DevtoolsLog} devtoolsLog
           * @return {Promise<Array<LH.Artifacts.NetworkRequest>>} networkRecords
           */
          static async compute_(devtoolsLog) {
            return NetworkRecorder.recordsFromLogs(devtoolsLog);
          }
        };
        NetworkRecordsComputed = makeComputedArtifact(NetworkRecords, null);
      }
    });
    init_axe = __esm2({
      "core/lib/axe.js"() {
        "use strict";
        init_process_global();
        init_module();
        require2 = /* @__PURE__ */ createRequire({ url: "core/lib/axe.js" }.url);
        axeSource = `/*! axe v4.11.0
 * Copyright (c) 2015 - 2025 Deque Systems, Inc.
 *
 * Your use of this Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
 *
 * This entire copyright notice must appear in every copy of this file you
 * distribute or in any file that contains substantial portions of this source
 * code.
 */
!function e(t){var n=t,r=t.document;function a(e){return(a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var o=o||{},i=(o.version="4.11.0","function"==typeof define&&define.amd&&define("axe-core",[],(function(){return o})),"object"===("undefined"==typeof module?"undefined":a(module))&&module.exports&&"function"==typeof e.toString&&(o.source="("+e.toString()+')(typeof window === "object" ? window : this);',module.exports=o),"function"==typeof t.getComputedStyle&&(t.axe=o),["precision","format","inGamut"]),l=["space"],u=["algorithm"],s=["method"],c=["maxDeltaE","deltaEMethod","steps","maxSteps"],d=["variant"],p=["matches"],f=["chromium"],m=["noImplicit"],h=["noPresentational"],g=["node"],v=["relatedNodes"],b=["node"],y=["node"],D=["environmentData"],w=["environmentData"],x=["environmentData"],E=["environmentData"],A=["environmentData"];function F(e,t,n){return(t=Y(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function C(e,t,n){var r;return N()?Reflect.construct.apply(null,arguments):((r=[null]).push.apply(r,t),t=new(e.bind.apply(e,r)),n&&_(t,n.prototype),t)}function k(e,t){if(null==e)return{};var n,r=((e,t)=>{if(null==e)return{};var n,r={};for(n in e)!{}.hasOwnProperty.call(e,n)||-1!==t.indexOf(n)||(r[n]=e[n]);return r})(e,t);if(Object.getOwnPropertySymbols)for(var a=Object.getOwnPropertySymbols(e),o=0;o<a.length;o++)n=a[o],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(r[n]=e[n]);return r}function R(e,t,n){t=T(t);var r=e;if((t=N()?Reflect.construct(t,n||[],T(e).constructor):t.apply(e,n))&&("object"==a(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");if(void 0!==(t=r))return t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}function N(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(N=function(){return!!e})()}function T(e){return(T=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function S(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&_(e,t)}function _(e,t){return(_=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function O(){return(O=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n,r=arguments[t];for(n in r)!{}.hasOwnProperty.call(r,n)||(e[n]=r[n])}return e}).apply(null,arguments)}function M(e){return(e=>{if(Array.isArray(e))return Z(e)})(e)||P(e)||X(e)||(()=>{throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")})()}function P(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function I(e,t,n){j(e,t),t.set(e,n)}function B(e,t){j(e,t),t.add(e)}function j(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function L(e,t){return e.get(z(e,t))}function q(e,t,n){e.set(z(e,t),n)}function z(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}function V(e,t){return $(e)||((e,t)=>{var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,a,o,i,l=[],u=!0,s=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=o.call(n)).done)&&(l.push(r.value),l.length!==t);u=!0);}catch(e){s=!0,a=e}finally{try{if(!u&&null!=n.return&&(i=n.return(),Object(i)!==i))return}finally{if(s)throw a}}return l}})(e,t)||X(e,t)||G()}function G(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function $(e){if(Array.isArray(e))return e}function H(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function U(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Y(r.key),r)}}function W(e,t,n){return t&&U(e.prototype,t),n&&U(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function Y(e){return e=((e,t)=>{if("object"!=a(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return String(e);if(n=n.call(e,"string"),"object"==a(n))throw new TypeError("@@toPrimitive must return a primitive value.");return n})(e),"symbol"==a(e)?e:e+""}function K(e,t){var n,r,a,o,i="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(i)return a=!(r=!0),{s:function(){i=i.call(e)},n:function(){var e=i.next();return r=e.done,e},e:function(e){a=!0,n=e},f:function(){try{r||null==i.return||i.return()}finally{if(a)throw n}}};if(Array.isArray(e)||(i=X(e))||t&&e&&"number"==typeof e.length)return i&&(e=i),o=0,{s:t=function(){},n:function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}},e:function(e){throw e},f:t};throw new TypeError("Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function X(e,t){var n;if(e)return"string"==typeof e?Z(e,t):"Map"===(n="Object"===(n={}.toString.call(e).slice(8,-1))&&e.constructor?e.constructor.name:n)||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Z(e,t):void 0}function Z(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function a(e){return(a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var J,Q,ee,te,ne,re,ae,oe,ie,le,ue=void 0;function se(e,t){return function(){return t||e((t={exports:{}}).exports,t),t.exports}}function ce(e,t){for(var n in t)me(e,n,{get:t[n],enumerable:!0})}function de(e){return function(e,t,n){if(t&&"object"===a(t)||"function"==typeof t){var r,o=K(ve(t));try{for(o.s();!(r=o.n()).done;)(()=>{var a=r.value;ge.call(e,a)||"default"===a||me(e,a,{get:function(){return t[a]},enumerable:!(n=be(t,a))||n.enumerable})})()}catch(e){o.e(e)}finally{o.f()}}return e}((t=me(null!=e?fe(he(e)):{},"default",e&&e.__esModule&&"default"in e?{get:function(){return e.default},enumerable:!0}:{value:e,enumerable:!0}),me(t,"__esModule",{value:!0})),e);var t}function pe(e,t,n){(t="symbol"!==a(t)?t+"":t)in e?me(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n}var fe=Object.create,me=Object.defineProperty,he=Object.getPrototypeOf,ge=Object.prototype.hasOwnProperty,ve=Object.getOwnPropertyNames,be=Object.getOwnPropertyDescriptor,ye=se((function(e,o){var i;i=function(){function e(e){return"function"==typeof e}var o=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)},i=0,l=void 0,u=void 0,s=function(e,t){h[i]=e,h[i+1]=t,2===(i+=2)&&(u?u(g):D())},c=void 0!==t?t:void 0,d=(d=c||{}).MutationObserver||d.WebKitMutationObserver,p="undefined"==typeof self&&"undefined"!=typeof process&&"[object process]"==={}.toString.call(process),f="undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof importScripts&&"undefined"!=typeof MessageChannel;function m(){var e=setTimeout;return function(){return e(g,1)}}var h=new Array(1e3);function g(){for(var e=0;e<i;e+=2)(0,h[e])(h[e+1]),h[e]=void 0,h[e+1]=void 0;i=0}var v,b,y,D=void 0;function w(e,t){var n,r=this,a=new this.constructor(A),o=(void 0===a[E]&&B(a),r._state);return o?(n=arguments[o-1],s((function(){return P(o,a,n,r._result)}))):O(r,a,e,t),a}function x(e){var t;return e&&"object"===a(e)&&e.constructor===this?e:(N(t=new this(A),e),t)}D=p?function(){return process.nextTick(g)}:d?(b=0,p=new d(g),y=r.createTextNode(""),p.observe(y,{characterData:!0}),function(){y.data=b=++b%2}):f?((v=new MessageChannel).port1.onmessage=g,function(){return v.port2.postMessage(0)}):(void 0===c?function(){try{var e=Function("return this")().require("vertx");return void 0!==(l=e.runOnLoop||e.runOnContext)?function(){l(g)}:m()}catch(e){return m()}}:m)();var E=Math.random().toString(36).substring(2);function A(){}var F=void 0,C=1,k=2;function R(t,n,r){var a,o;n.constructor===t.constructor&&r===w&&n.constructor.resolve===x?(a=t,(o=n)._state===C?S(a,o._result):o._state===k?_(a,o._result):O(o,void 0,(function(e){return N(a,e)}),(function(e){return _(a,e)}))):void 0!==r&&e(r)?function(e,t,n){s((function(e){var r=!1,a=((e,t,n,r)=>{try{e.call(t,n,r)}catch(e){return e}})(n,t,(function(n){r||(r=!0,(t!==n?N:S)(e,n))}),(function(t){r||(r=!0,_(e,t))}),e._label);!r&&a&&(r=!0,_(e,a))}),e)}(t,n,r):S(t,n)}function N(e,t){if(e===t)_(e,new TypeError("You cannot resolve a promise with itself"));else if(r=a(n=t),null===n||"object"!==r&&"function"!==r)S(e,t);else{n=void 0;try{n=t.then}catch(t){return void _(e,t)}R(e,t,n)}var n,r}function T(e){e._onerror&&e._onerror(e._result),M(e)}function S(e,t){e._state===F&&(e._result=t,e._state=C,0!==e._subscribers.length)&&s(M,e)}function _(e,t){e._state===F&&(e._state=k,e._result=t,s(T,e))}function O(e,t,n,r){var a=e._subscribers,o=a.length;e._onerror=null,a[o]=t,a[o+C]=n,a[o+k]=r,0===o&&e._state&&s(M,e)}function M(e){var t=e._subscribers,n=e._state;if(0!==t.length){for(var r,a=void 0,o=e._result,i=0;i<t.length;i+=3)r=t[i],a=t[i+n],r?P(n,r,a,o):a(o);e._subscribers.length=0}}function P(t,n,r,a){var o=e(r),i=void 0,l=void 0,u=!0;if(o){try{i=r(a)}catch(t){u=!1,l=t}if(n===i)return void _(n,new TypeError("A promises callback cannot return that same promise."))}else i=a;n._state===F&&(o&&u?N(n,i):!1===u?_(n,l):t===C?S(n,i):t===k&&_(n,i))}var I=0;function B(e){e[E]=I++,e._state=void 0,e._result=void 0,e._subscribers=[]}L.prototype._enumerate=function(e){for(var t=0;this._state===F&&t<e.length;t++)this._eachEntry(e[t],t)},L.prototype._eachEntry=function(e,t){var n=this._instanceConstructor,r=n.resolve;if(r===x){var a,o=void 0,i=void 0,l=!1;try{o=e.then}catch(t){l=!0,i=t}o===w&&e._state!==F?this._settledAt(e._state,t,e._result):"function"!=typeof o?(this._remaining--,this._result[t]=e):n===q?(a=new n(A),l?_(a,i):R(a,e,o),this._willSettleAt(a,t)):this._willSettleAt(new n((function(t){return t(e)})),t)}else this._willSettleAt(r(e),t)},L.prototype._settledAt=function(e,t,n){var r=this.promise;r._state===F&&(this._remaining--,e===k?_(r,n):this._result[t]=n),0===this._remaining&&S(r,this._result)},L.prototype._willSettleAt=function(e,t){var n=this;O(e,void 0,(function(e){return n._settledAt(C,t,e)}),(function(e){return n._settledAt(k,t,e)}))};var j=L;function L(e,t){this._instanceConstructor=e,this.promise=new e(A),this.promise[E]||B(this.promise),o(t)?(this.length=t.length,this._remaining=t.length,this._result=new Array(this.length),0!==this.length&&(this.length=this.length||0,this._enumerate(t),0!==this._remaining)||S(this.promise,this._result)):_(this.promise,new Error("Array Methods must be provided an Array"))}z.prototype.catch=function(e){return this.then(null,e)},z.prototype.finally=function(t){var n=this.constructor;return e(t)?this.then((function(e){return n.resolve(t()).then((function(){return e}))}),(function(e){return n.resolve(t()).then((function(){throw e}))})):this.then(t,t)};var q=z;function z(e){if(this[E]=I++,this._result=this._state=void 0,this._subscribers=[],A!==e){if("function"!=typeof e)throw new TypeError("You must pass a resolver function as the first argument to the promise constructor");if(!(this instanceof z))throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.");var t=this;try{e((function(e){N(t,e)}),(function(e){_(t,e)}))}catch(e){_(t,e)}}}return q.prototype.then=w,q.all=function(e){return new j(this,e).promise},q.race=function(e){var t=this;return o(e)?new t((function(n,r){for(var a=e.length,o=0;o<a;o++)t.resolve(e[o]).then(n,r)})):new t((function(e,t){return t(new TypeError("You must pass an array to race."))}))},q.resolve=x,q.reject=function(e){var t=new this(A);return _(t,e),t},q._setScheduler=function(e){u=e},q._setAsap=function(e){s=e},q._asap=s,q.polyfill=function(){var e=void 0;if(void 0!==n)e=n;else if("undefined"!=typeof self)e=self;else try{e=Function("return this")()}catch(e){throw new Error("polyfill failed because global object is unavailable in this environment")}var t=e.Promise;if(t){var r=null;try{r=Object.prototype.toString.call(t.resolve())}catch(e){}if("[object Promise]"===r&&!t.cast)return}e.Promise=q},q.Promise=q},"object"===a(e)&&void 0!==o?o.exports=i():"function"==typeof define&&define.amd?define(i):e.ES6Promise=i()})),De=se((function(e){var t,n,r=1e5,o=(t=Object.prototype.toString,n=Object.prototype.hasOwnProperty,{Class:function(e){return t.call(e).replace(/^\\[object *|\\]$/g,"")},HasProperty:function(e,t){return t in e},HasOwnProperty:function(e,t){return n.call(e,t)},IsCallable:function(e){return"function"==typeof e},ToInt32:function(e){return e>>0},ToUint32:function(e){return e>>>0}}),i=Math.LN2,l=Math.abs,u=Math.floor,s=Math.log,c=Math.min,d=Math.pow,p=Math.round;function f(e,t,n){return e<t?t:n<e?n:e}var m,h,g,v,b,y,D,w,x,E,A,F=Object.getOwnPropertyNames||function(e){if(e!==Object(e))throw new TypeError("Object.getOwnPropertyNames called on non-object");var t,n=[];for(t in e)o.HasOwnProperty(e,t)&&n.push(t);return n};function C(e){if(F&&m)for(var t=F(e),n=0;n<t.length;n+=1)m(e,t[n],{value:e[t[n]],writable:!1,enumerable:!1,configurable:!1})}function k(e){if(m){if(e.length>r)throw new RangeError("Array too large for polyfill");for(var t=0;t<e.length;t+=1)(t=>{m(e,t,{get:function(){return e._getter(t)},set:function(n){e._setter(t,n)},enumerable:!0,configurable:!1})})(t)}}function R(e,t){return e<<(t=32-t)>>t}function N(e,t){return e<<(t=32-t)>>>t}function T(e){return N(e[0],8)}function S(e,t,n){var r,a,o,p,f,m,h,g=(1<<t-1)-1;function v(e){var t=u(e);return(e=e-t)<.5||!(.5<e||t%2)?t:t+1}for(e!=e?(a=(1<<t)-1,o=d(2,n-1),r=0):e===1/0||e===-1/0?(a=(1<<t)-1,r=e<(o=0)?1:0):0===e?r=1/e==-1/(o=a=0)?1:0:(r=e<0,(e=l(e))>=d(2,1-g)?(a=c(u(s(e)/i),1023),2<=(o=v(e/d(2,a)*d(2,n)))/d(2,n)&&(a+=1,o=1),g<a?(a=(1<<t)-1,o=0):(a+=g,o-=d(2,n))):(a=0,o=v(e/d(2,1-g-n)))),f=[],p=n;p;--p)f.push(o%2?1:0),o=u(o/2);for(p=t;p;--p)f.push(a%2?1:0),a=u(a/2);for(f.push(r?1:0),f.reverse(),m=f.join(""),h=[];m.length;)h.push(parseInt(m.substring(0,8),2)),m=m.substring(8);return h}function _(e,t,n){for(var r,a,o,i,l,u,s=[],c=e.length;c;--c)for(a=e[c-1],r=8;r;--r)s.push(a%2?1:0),a>>=1;return s.reverse(),u=s.join(""),o=(1<<t-1)-1,i=parseInt(u.substring(0,1),2)?-1:1,l=parseInt(u.substring(1,1+t),2),u=parseInt(u.substring(1+t),2),l===(1<<t)-1?0===u?1/0*i:NaN:0<l?i*d(2,l-o)*(1+u/d(2,n)):0!==u?i*d(2,-(o-1))*(u/d(2,n)):i<0?-0:0}function O(e){if((e=o.ToInt32(e))<0)throw new RangeError("ArrayBuffer size is not a small enough positive integer");var t;for(this.byteLength=e,this._bytes=[],this._bytes.length=e,t=0;t<this.byteLength;t+=1)this._bytes[t]=0;C(this)}function M(){}function P(e,t,n){var r=function(e,t,n){var i,l,u,s;if(arguments.length&&"number"!=typeof e)if("object"===a(e)&&e.constructor===r)for(this.length=(i=e).length,this.byteLength=this.length*this.BYTES_PER_ELEMENT,this.buffer=new O(this.byteLength),u=this.byteOffset=0;u<this.length;u+=1)this._setter(u,i._getter(u));else if("object"!==a(e)||e instanceof O||"ArrayBuffer"===o.Class(e)){if("object"!==a(e)||!(e instanceof O||"ArrayBuffer"===o.Class(e)))throw new TypeError("Unexpected argument type(s)");if(this.buffer=e,this.byteOffset=o.ToUint32(t),this.byteOffset>this.buffer.byteLength)throw new RangeError("byteOffset out of range");if(this.byteOffset%this.BYTES_PER_ELEMENT)throw new RangeError("ArrayBuffer length minus the byteOffset is not a multiple of the element size.");if(arguments.length<3){if(this.byteLength=this.buffer.byteLength-this.byteOffset,this.byteLength%this.BYTES_PER_ELEMENT)throw new RangeError("length of buffer minus byteOffset not a multiple of the element size");this.length=this.byteLength/this.BYTES_PER_ELEMENT}else this.length=o.ToUint32(n),this.byteLength=this.length*this.BYTES_PER_ELEMENT;if(this.byteOffset+this.byteLength>this.buffer.byteLength)throw new RangeError("byteOffset and length reference an area beyond the end of the buffer")}else for(this.length=o.ToUint32((l=e).length),this.byteLength=this.length*this.BYTES_PER_ELEMENT,this.buffer=new O(this.byteLength),u=this.byteOffset=0;u<this.length;u+=1)s=l[u],this._setter(u,Number(s));else{if(this.length=o.ToInt32(e),n<0)throw new RangeError("ArrayBufferView size is not a small enough positive integer");this.byteLength=this.length*this.BYTES_PER_ELEMENT,this.buffer=new O(this.byteLength),this.byteOffset=0}this.constructor=r,C(this),k(this)};return(r.prototype=new M).BYTES_PER_ELEMENT=e,r.prototype._pack=t,r.prototype._unpack=n,r.BYTES_PER_ELEMENT=e,r.prototype.get=r.prototype._getter=function(e){if(arguments.length<1)throw new SyntaxError("Not enough arguments");if(!((e=o.ToUint32(e))>=this.length)){for(var t=[],n=0,r=this.byteOffset+e*this.BYTES_PER_ELEMENT;n<this.BYTES_PER_ELEMENT;n+=1,r+=1)t.push(this.buffer._bytes[r]);return this._unpack(t)}},r.prototype._setter=function(e,t){if(arguments.length<2)throw new SyntaxError("Not enough arguments");if((e=o.ToUint32(e))<this.length)for(var n=this._pack(t),r=0,a=this.byteOffset+e*this.BYTES_PER_ELEMENT;r<this.BYTES_PER_ELEMENT;r+=1,a+=1)this.buffer._bytes[a]=n[r]},r.prototype.set=function(e,t){if(arguments.length<1)throw new SyntaxError("Not enough arguments");var n,r,i,l,u,s,c,d,p,f;if("object"===a(e)&&e.constructor===this.constructor){if(n=e,(i=o.ToUint32(t))+n.length>this.length)throw new RangeError("Offset plus length of array is out of range");if(d=this.byteOffset+i*this.BYTES_PER_ELEMENT,p=n.length*this.BYTES_PER_ELEMENT,n.buffer===this.buffer){for(f=[],u=0,s=n.byteOffset;u<p;u+=1,s+=1)f[u]=n.buffer._bytes[s];for(u=0,c=d;u<p;u+=1,c+=1)this.buffer._bytes[c]=f[u]}else for(u=0,s=n.byteOffset,c=d;u<p;u+=1,s+=1,c+=1)this.buffer._bytes[c]=n.buffer._bytes[s]}else{if("object"!==a(e)||void 0===e.length)throw new TypeError("Unexpected argument type(s)");if(l=o.ToUint32((r=e).length),(i=o.ToUint32(t))+l>this.length)throw new RangeError("Offset plus length of array is out of range");for(u=0;u<l;u+=1)s=r[u],this._setter(i+u,Number(s))}},r.prototype.subarray=function(e,t){return e=o.ToInt32(e),t=o.ToInt32(t),arguments.length<1&&(e=0),arguments.length<2&&(t=this.length),e<0&&(e=this.length+e),t<0&&(t=this.length+t),e=f(e,0,this.length),t=(t=f(t,0,this.length))-e,new this.constructor(this.buffer,this.byteOffset+e*this.BYTES_PER_ELEMENT,t=t<0?0:t)},r}function I(e,t){return o.IsCallable(e.get)?e.get(t):e[t]}function B(t,n,r){if(0===arguments.length)t=new e.ArrayBuffer(0);else if(!(t instanceof e.ArrayBuffer||"ArrayBuffer"===o.Class(t)))throw new TypeError("TypeError");if(this.buffer=t||new e.ArrayBuffer(0),this.byteOffset=o.ToUint32(n),this.byteOffset>this.buffer.byteLength)throw new RangeError("byteOffset out of range");if(this.byteLength=arguments.length<3?this.buffer.byteLength-this.byteOffset:o.ToUint32(r),this.byteOffset+this.byteLength>this.buffer.byteLength)throw new RangeError("byteOffset and length reference an area beyond the end of the buffer");C(this)}function j(t){return function(n,r){if((n=o.ToUint32(n))+t.BYTES_PER_ELEMENT>this.byteLength)throw new RangeError("Array index out of range");n+=this.byteOffset;for(var a=new e.Uint8Array(this.buffer,n,t.BYTES_PER_ELEMENT),i=[],l=0;l<t.BYTES_PER_ELEMENT;l+=1)i.push(I(a,l));return Boolean(r)===Boolean(A)&&i.reverse(),I(new t(new e.Uint8Array(i).buffer),0)}}function L(t){return function(n,r,a){if((n=o.ToUint32(n))+t.BYTES_PER_ELEMENT>this.byteLength)throw new RangeError("Array index out of range");r=new t([r]);for(var i=new e.Uint8Array(r.buffer),l=[],u=0;u<t.BYTES_PER_ELEMENT;u+=1)l.push(I(i,u));Boolean(a)===Boolean(A)&&l.reverse(),new e.Uint8Array(this.buffer,n,t.BYTES_PER_ELEMENT).set(l)}}m=Object.defineProperty&&(()=>{try{return Object.defineProperty({},"x",{}),1}catch(e){}})()?Object.defineProperty:function(e,t,n){if(!e===Object(e))throw new TypeError("Object.defineProperty called on non-object");return o.HasProperty(n,"get")&&Object.prototype.__defineGetter__&&Object.prototype.__defineGetter__.call(e,t,n.get),o.HasProperty(n,"set")&&Object.prototype.__defineSetter__&&Object.prototype.__defineSetter__.call(e,t,n.set),o.HasProperty(n,"value")&&(e[t]=n.value),e},e.ArrayBuffer=e.ArrayBuffer||O,E=P(1,(function(e){return[255&e]}),(function(e){return R(e[0],8)})),h=P(1,(function(e){return[255&e]}),T),g=P(1,(function(e){return[(e=p(Number(e)))<0?0:255<e?255:255&e]}),T),v=P(2,(function(e){return[e>>8&255,255&e]}),(function(e){return R(e[0]<<8|e[1],16)})),b=P(2,(function(e){return[e>>8&255,255&e]}),(function(e){return N(e[0]<<8|e[1],16)})),y=P(4,(function(e){return[e>>24&255,e>>16&255,e>>8&255,255&e]}),(function(e){return R(e[0]<<24|e[1]<<16|e[2]<<8|e[3],32)})),D=P(4,(function(e){return[e>>24&255,e>>16&255,e>>8&255,255&e]}),(function(e){return N(e[0]<<24|e[1]<<16|e[2]<<8|e[3],32)})),w=P(4,(function(e){return S(e,8,23)}),(function(e){return _(e,8,23)})),x=P(8,(function(e){return S(e,11,52)}),(function(e){return _(e,11,52)})),e.Int8Array=e.Int8Array||E,e.Uint8Array=e.Uint8Array||h,e.Uint8ClampedArray=e.Uint8ClampedArray||g,e.Int16Array=e.Int16Array||v,e.Uint16Array=e.Uint16Array||b,e.Int32Array=e.Int32Array||y,e.Uint32Array=e.Uint32Array||D,e.Float32Array=e.Float32Array||w,e.Float64Array=e.Float64Array||x,E=new e.Uint16Array([4660]),A=18===I(new e.Uint8Array(E.buffer),0),B.prototype.getUint8=j(e.Uint8Array),B.prototype.getInt8=j(e.Int8Array),B.prototype.getUint16=j(e.Uint16Array),B.prototype.getInt16=j(e.Int16Array),B.prototype.getUint32=j(e.Uint32Array),B.prototype.getInt32=j(e.Int32Array),B.prototype.getFloat32=j(e.Float32Array),B.prototype.getFloat64=j(e.Float64Array),B.prototype.setUint8=L(e.Uint8Array),B.prototype.setInt8=L(e.Int8Array),B.prototype.setUint16=L(e.Uint16Array),B.prototype.setInt16=L(e.Int16Array),B.prototype.setUint32=L(e.Uint32Array),B.prototype.setInt32=L(e.Int32Array),B.prototype.setFloat32=L(e.Float32Array),B.prototype.setFloat64=L(e.Float64Array),e.DataView=e.DataView||B})),we=se((function(e){function r(){if(void 0===this)throw new TypeError("Constructor WeakMap requires 'new'");if(c(this,"_id","_WeakMap_"+i()+"."+i()),0<arguments.length)throw new TypeError("WeakMap iterable is not supported")}function o(e,t){if(!l(e)||!u.call(e,"_id"))throw new TypeError(t+" method called on incompatible receiver "+a(e))}function i(){return Math.random().toString().substring(2)}function l(e){return Object(e)===e}var u,s,c;(e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:void 0!==t?t:void 0!==n?n:e).WeakMap||(u=Object.prototype.hasOwnProperty,s=Object.defineProperty&&(()=>{try{return 1===Object.defineProperty({},"x",{value:1}).x}catch(e){}})(),e.WeakMap=((c=function(e,t,n){s?Object.defineProperty(e,t,{configurable:!0,writable:!0,value:n}):e[t]=n})(r.prototype,"delete",(function(e){var t;return o(this,"delete"),!!l(e)&&!(!(t=e[this._id])||t[0]!==e||(delete e[this._id],0))})),c(r.prototype,"get",(function(e){var t;return o(this,"get"),l(e)&&(t=e[this._id])&&t[0]===e?t[1]:void 0})),c(r.prototype,"has",(function(e){var t;return o(this,"has"),!!l(e)&&!(!(t=e[this._id])||t[0]!==e)})),c(r.prototype,"set",(function(e,t){var n;if(o(this,"set"),l(e))return(n=e[this._id])&&n[0]===e?n[1]=t:c(e,this._id,[e,t]),this;throw new TypeError("Invalid value used as weak map key")})),c(r,"_polyfill",!0),r))})),xe=se((function(e,r){function o(e){return e&&e.Math===Math&&e}r.exports=o("object"==("undefined"==typeof globalThis?"undefined":a(globalThis))&&globalThis)||o("object"==(void 0===t?"undefined":a(t))&&t)||o("object"==("undefined"==typeof self?"undefined":a(self))&&self)||o("object"==(void 0===n?"undefined":a(n))&&n)||o("object"==a(e)&&e)||function(){return this}()||Function("return this")()})),Ee=se((function(e,t){t.exports=function(e){try{return!!e()}catch(e){return!0}}})),Ae=se((function(e,t){var n=Ee();t.exports=!n((function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")}))})),Fe=se((function(e,t){var n=Ae(),r=Function.prototype,o=r.apply,i=r.call;t.exports="object"==("undefined"==typeof Reflect?"undefined":a(Reflect))&&Reflect.apply||(n?i.bind(o):function(){return i.apply(o,arguments)})})),Ce=se((function(e,t){var n=Ae(),r=(a=Function.prototype).call,a=n&&a.bind.bind(r,r);t.exports=n?a:function(e){return function(){return r.apply(e,arguments)}}})),ke=se((function(e,t){var n=Ce(),r=n({}.toString),a=n("".slice);t.exports=function(e){return a(r(e),8,-1)}})),Re=se((function(e,t){var n=ke(),r=Ce();t.exports=function(e){if("Function"===n(e))return r(e)}})),Ne=se((function(e,t){var n="object"==(void 0===r?"undefined":a(r))&&r.all;t.exports=void 0===n&&void 0!==n?function(e){return"function"==typeof e||e===n}:function(e){return"function"==typeof e}})),Te=se((function(e,t){var n=Ee();t.exports=!n((function(){return 7!==Object.defineProperty({},1,{get:function(){return 7}})[1]}))})),Se=se((function(e,t){var n=Ae(),r=Function.prototype.call;t.exports=n?r.bind(r):function(){return r.apply(r,arguments)}})),_e=se((function(e){var t={}.propertyIsEnumerable,n=Object.getOwnPropertyDescriptor,r=n&&!t.call({1:2},1);e.f=r?function(e){return!!(e=n(this,e))&&e.enumerable}:t})),Oe=se((function(e,t){t.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}})),Me=se((function(e,t){var n=Ce(),r=Ee(),a=ke(),o=Object,i=n("".split);t.exports=r((function(){return!o("z").propertyIsEnumerable(0)}))?function(e){return"String"===a(e)?i(e,""):o(e)}:o})),Pe=se((function(e,t){t.exports=function(e){return null==e}})),Ie=se((function(e,t){var n=Pe(),r=TypeError;t.exports=function(e){if(n(e))throw new r("Can't call method on "+e);return e}})),Be=se((function(e,t){var n=Me(),r=Ie();t.exports=function(e){return n(r(e))}})),je=se((function(e,t){var n=Ne();t.exports=function(e){return"object"==a(e)?null!==e:n(e)}})),Le=se((function(e,t){t.exports={}})),qe=se((function(e,t){function n(e){return o(e)?e:void 0}var r=Le(),a=xe(),o=Ne();t.exports=function(e,t){return arguments.length<2?n(r[e])||n(a[e]):r[e]&&r[e][t]||a[e]&&a[e][t]}})),ze=se((function(e,t){var n=Ce();t.exports=n({}.isPrototypeOf)})),Ve=se((function(e,t){var n=(n=xe().navigator)&&n.userAgent;t.exports=n?String(n):""})),Ge=se((function(e,t){var n,r,a=xe(),o=Ve(),i=a.process;a=a.Deno;!(r=(a=(i=i&&i.versions||a&&a.version)&&i.v8)?0<(n=a.split("."))[0]&&n[0]<4?1:+(n[0]+n[1]):r)&&o&&(!(n=o.match(/Edge\\/(\\d+)/))||74<=n[1])&&(n=o.match(/Chrome\\/(\\d+)/))&&(r=+n[1]),t.exports=r})),$e=se((function(e,t){var n=Ge(),r=Ee(),a=xe().String;t.exports=!!Object.getOwnPropertySymbols&&!r((function(){var e=Symbol("symbol detection");return!a(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&n&&n<41}))})),He=se((function(e,t){var n=$e();t.exports=n&&!Symbol.sham&&"symbol"==a(Symbol.iterator)})),Ue=se((function(e,t){var n=qe(),r=Ne(),o=ze(),i=He(),l=Object;t.exports=i?function(e){return"symbol"==a(e)}:function(e){var t=n("Symbol");return r(t)&&o(t.prototype,l(e))}})),We=se((function(e,t){var n=String;t.exports=function(e){try{return n(e)}catch(e){return"Object"}}})),Ye=se((function(e,t){var n=Ne(),r=We(),a=TypeError;t.exports=function(e){if(n(e))return e;throw new a(r(e)+" is not a function")}})),Ke=se((function(e,t){var n=Ye(),r=Pe();t.exports=function(e,t){return e=e[t],r(e)?void 0:n(e)}})),Xe=se((function(e,t){var n=Se(),r=Ne(),a=je(),o=TypeError;t.exports=function(e,t){var i,l;if("string"===t&&r(i=e.toString)&&!a(l=n(i,e)))return l;if(r(i=e.valueOf)&&!a(l=n(i,e)))return l;if("string"!==t&&r(i=e.toString)&&!a(l=n(i,e)))return l;throw new o("Can't convert object to primitive value")}})),Ze=se((function(e,t){t.exports=!0})),Je=se((function(e,t){var n=xe(),r=Object.defineProperty;t.exports=function(e,t){try{r(n,e,{value:t,configurable:!0,writable:!0})}catch(r){n[e]=t}return t}})),Qe=se((function(e,t){var n=Ze(),r=xe(),a=Je(),o="__core-js_shared__";((t=t.exports=r[o]||a(o,{})).versions||(t.versions=[])).push({version:"3.44.0",mode:n?"pure":"global",copyright:"\xA9 2014-2025 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.44.0/LICENSE",source:"https://github.com/zloirock/core-js"})})),et=se((function(e,t){var n=Qe();t.exports=function(e,t){return n[e]||(n[e]=t||{})}})),tt=se((function(e,t){var n=Ie(),r=Object;t.exports=function(e){return r(n(e))}})),nt=se((function(e,t){var n=Ce(),r=tt(),a=n({}.hasOwnProperty);t.exports=Object.hasOwn||function(e,t){return a(r(e),t)}})),rt=se((function(e,t){var n=Ce(),r=0,a=Math.random(),o=n(1.1.toString);t.exports=function(e){return"Symbol("+(void 0===e?"":e)+")_"+o(++r+a,36)}})),at=se((function(e,t){var n=xe(),r=et(),a=nt(),o=rt(),i=$e(),l=He(),u=n.Symbol,s=r("wks"),c=l?u.for||u:u&&u.withoutSetter||o;t.exports=function(e){return a(s,e)||(s[e]=i&&a(u,e)?u[e]:c("Symbol."+e)),s[e]}})),ot=se((function(e,t){var n=Se(),r=je(),a=Ue(),o=Ke(),i=Xe(),l=at(),u=TypeError,s=l("toPrimitive");t.exports=function(e,t){if(!r(e)||a(e))return e;var l=o(e,s);if(l){if(l=n(l,e,t=void 0===t?"default":t),!r(l)||a(l))return l;throw new u("Can't convert object to primitive value")}return i(e,t=void 0===t?"number":t)}})),it=se((function(e,t){var n=ot(),r=Ue();t.exports=function(e){return e=n(e,"string"),r(e)?e:e+""}})),lt=se((function(e,t){var n=xe(),r=je(),a=n.document,o=r(a)&&r(a.createElement);t.exports=function(e){return o?a.createElement(e):{}}})),ut=se((function(e,t){var n=Te(),r=Ee(),a=lt();t.exports=!n&&!r((function(){return 7!==Object.defineProperty(a("div"),"a",{get:function(){return 7}}).a}))})),st=se((function(e){var t=Te(),n=Se(),r=_e(),a=Oe(),o=Be(),i=it(),l=nt(),u=ut(),s=Object.getOwnPropertyDescriptor;e.f=t?s:function(e,t){if(e=o(e),t=i(t),u)try{return s(e,t)}catch(e){}if(l(e,t))return a(!n(r.f,e,t),e[t])}})),ct=se((function(e,t){function n(e,t){return(e=l[i(e)])===s||e!==u&&(a(t)?r(t):!!t)}var r=Ee(),a=Ne(),o=/#|\\.prototype\\./,i=n.normalize=function(e){return String(e).replace(o,".").toLowerCase()},l=n.data={},u=n.NATIVE="N",s=n.POLYFILL="P";t.exports=n})),dt=se((function(e,t){var n=Re(),r=Ye(),a=Ae(),o=n(n.bind);t.exports=function(e,t){return r(e),void 0===t?e:a?o(e,t):function(){return e.apply(t,arguments)}}})),pt=se((function(e,t){var n=Te(),r=Ee();t.exports=n&&r((function(){return 42!==Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype}))})),ft=se((function(e,t){var n=je(),r=String,a=TypeError;t.exports=function(e){if(n(e))return e;throw new a(r(e)+" is not an object")}})),mt=se((function(e){var t=Te(),n=ut(),r=pt(),a=ft(),o=it(),i=TypeError,l=Object.defineProperty,u=Object.getOwnPropertyDescriptor,s="enumerable",c="configurable",d="writable";e.f=t?r?function(e,t,n){var r;return a(e),t=o(t),a(n),"function"==typeof e&&"prototype"===t&&"value"in n&&d in n&&!n[d]&&(r=u(e,t))&&r[d]&&(e[t]=n.value,n={configurable:(c in n?n:r)[c],enumerable:(s in n?n:r)[s],writable:!1}),l(e,t,n)}:l:function(e,t,r){if(a(e),t=o(t),a(r),n)try{return l(e,t,r)}catch(e){}if("get"in r||"set"in r)throw new i("Accessors not supported");return"value"in r&&(e[t]=r.value),e}})),ht=se((function(e,t){var n=Te(),r=mt(),a=Oe();t.exports=n?function(e,t,n){return r.f(e,t,a(1,n))}:function(e,t,n){return e[t]=n,e}})),gt=se((function(e,t){function n(e){function t(n,r,a){if(this instanceof t){switch(arguments.length){case 0:return new e;case 1:return new e(n);case 2:return new e(n,r)}return new e(n,r,a)}return o(e,this,arguments)}return t.prototype=e.prototype,t}var r=xe(),o=Fe(),i=Re(),l=Ne(),u=st().f,s=ct(),c=Le(),d=dt(),p=ht(),f=nt();Qe(),t.exports=function(e,t){var o,m,h,g,v,b,y=e.target,D=e.global,w=e.stat,x=e.proto,E=D?r:w?r[y]:r[y]&&r[y].prototype,A=D?c:c[y]||p(c,y,{})[y],F=A.prototype;for(m in t)v=!(o=s(D?m:y+(w?".":"#")+m,e.forced))&&E&&f(E,m),g=A[m],v&&(b=e.dontCallGetSet?(b=u(E,m))&&b.value:E[m]),h=v&&b?b:t[m],(o||x||a(g)!=a(h))&&(v=e.bind&&v?d(h,r):e.wrap&&v?n(h):x&&l(h)?i(h):h,(e.sham||h&&h.sham||g&&g.sham)&&p(v,"sham",!0),p(A,m,v),x)&&(f(c,g=y+"Prototype")||p(c,g,{}),p(c[g],m,h),e.real)&&F&&(o||!F[m])&&p(F,m,h)}})),vt=se((function(){gt()({target:"Object",stat:!0},{hasOwn:nt()})})),bt=se((function(e,t){vt();var n=Le();t.exports=n.Object.hasOwn})),yt=se((function(e,t){var n=bt();t.exports=n})),Dt=se((function(e,t){var n=yt();t.exports=n})),wt=se((function(e,t){var n=et(),r=rt(),a=n("keys");t.exports=function(e){return a[e]||(a[e]=r(e))}})),xt=se((function(e,t){var n=Ee();t.exports=!n((function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype}))})),Et=se((function(e,t){var n=nt(),r=Ne(),a=tt(),o=wt(),i=xt(),l=o("IE_PROTO"),u=Object,s=u.prototype;t.exports=i?u.getPrototypeOf:function(e){var t;e=a(e);return n(e,l)?e[l]:(t=e.constructor,r(t)&&e instanceof t?t.prototype:e instanceof u?s:null)}})),At=se((function(e,t){var n=Math.ceil,r=Math.floor;t.exports=Math.trunc||function(e){return(0<(e=+e)?r:n)(e)}})),Ft=se((function(e,t){var n=At();t.exports=function(e){return(e=+e)!=e||0==e?0:n(e)}})),Ct=se((function(e,t){var n=Ft(),r=Math.max,a=Math.min;t.exports=function(e,t){return(e=n(e))<0?r(e+t,0):a(e,t)}})),kt=se((function(e,t){var n=Ft(),r=Math.min;t.exports=function(e){return 0<(e=n(e))?r(e,9007199254740991):0}})),Rt=se((function(e,t){var n=kt();t.exports=function(e){return n(e.length)}})),Nt=se((function(e,t){function n(e){return function(t,n,i){var l=r(t),u=o(l);if(0!==u){var s,c=a(i,u);if(e&&n!=n){for(;c<u;)if((s=l[c++])!=s)return!0}else for(;c<u;c++)if((e||c in l)&&l[c]===n)return e||c||0}return!e&&-1}}var r=Be(),a=Ct(),o=Rt();t.exports={includes:n(!0),indexOf:n(!1)}})),Tt=se((function(e,t){t.exports={}})),St=se((function(e,t){var n=Ce(),r=nt(),a=Be(),o=Nt().indexOf,i=Tt(),l=n([].push);t.exports=function(e,t){var n,u=a(e),s=0,c=[];for(n in u)!r(i,n)&&r(u,n)&&l(c,n);for(;t.length>s;)!r(u,n=t[s++])||~o(c,n)||l(c,n);return c}})),_t=se((function(e,t){t.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]})),Ot=se((function(e,t){var n=St(),r=_t();t.exports=Object.keys||function(e){return n(e,r)}})),Mt=se((function(e,t){function n(e){return function(t){for(var n,a=u(t),o=l(a),p=d&&null===i(a),f=o.length,m=0,h=[];m<f;)n=o[m++],r&&!(p?n in a:s(a,n))||c(h,e?[n,a[n]]:a[n]);return h}}var r=Te(),a=Ee(),o=Ce(),i=Et(),l=Ot(),u=Be(),s=o(_e().f),c=o([].push),d=r&&a((function(){var e=Object.create(null);return e[2]=2,!s(e,2)}));t.exports={entries:n(!0),values:n(!1)}})),Pt=se((function(){var e=gt(),t=Mt().values;e({target:"Object",stat:!0},{values:function(e){return t(e)}})})),It=se((function(e,t){Pt();var n=Le();t.exports=n.Object.values})),Bt=se((function(e,t){var n=It();t.exports=n})),jt=se((function(e,t){var n=Bt();t.exports=n})),Lt=se((function(e,t){var n={};n[at()("toStringTag")]="z",t.exports="[object z]"===String(n)})),qt=se((function(e,t){var n=Lt(),r=Ne(),a=ke(),o=at()("toStringTag"),i=Object,l="Arguments"===a(function(){return arguments}());t.exports=n?a:function(e){var t;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(t=((e,t)=>{try{return e[t]}catch(e){}})(e=i(e),o))?t:l?a(e):"Object"===(t=a(e))&&r(e.callee)?"Arguments":t}})),zt=se((function(e,t){var n=qt(),r=String;t.exports=function(e){if("Symbol"===n(e))throw new TypeError("Cannot convert a Symbol value to a string");return r(e)}})),Vt=se((function(e,t){function n(e){return function(t,n){t=o(i(t)),n=a(n);var r,c=t.length;return n<0||c<=n?e?"":void 0:(r=u(t,n))<55296||56319<r||n+1===c||(c=u(t,n+1))<56320||57343<c?e?l(t,n):r:e?s(t,n,n+2):c-56320+(r-55296<<10)+65536}}var r=Ce(),a=Ft(),o=zt(),i=Ie(),l=r("".charAt),u=r("".charCodeAt),s=r("".slice);t.exports={codeAt:n(!1),charAt:n(!0)}})),Gt=se((function(e,t){var n=xe(),r=Ne();n=n.WeakMap;t.exports=r(n)&&/native code/.test(String(n))})),$t=se((function(e,t){var n,r,a,o,i=Gt(),l=xe(),u=je(),s=ht(),c=nt(),d=Qe(),p=wt(),f=Tt(),m="Object already initialized",h=l.TypeError,g=(l=l.WeakMap,i||d.state?((a=d.state||(d.state=new l)).get=a.get,a.has=a.has,a.set=a.set,n=function(e,t){if(a.has(e))throw new h(m);return t.facade=e,a.set(e,t),t},r=function(e){return a.get(e)||{}},function(e){return a.has(e)}):(f[o=p("state")]=!0,n=function(e,t){if(c(e,o))throw new h(m);return t.facade=e,s(e,o,t),t},r=function(e){return c(e,o)?e[o]:{}},function(e){return c(e,o)}));t.exports={set:n,get:r,has:g,enforce:function(e){return g(e)?r(e):n(e,{})},getterFor:function(e){return function(t){if(u(t)&&(t=r(t)).type===e)return t;throw new h("Incompatible receiver, "+e+" required")}}}})),Ht=se((function(e,t){var n=Te(),r=nt(),a=Function.prototype,o=n&&Object.getOwnPropertyDescriptor,i=(r=r(a,"name"))&&"something"===function(){}.name;n=r&&(!n||o(a,"name").configurable);t.exports={EXISTS:r,PROPER:i,CONFIGURABLE:n}})),Ut=se((function(e){var t=Te(),n=pt(),r=mt(),a=ft(),o=Be(),i=Ot();e.f=t&&!n?Object.defineProperties:function(e,t){a(e);for(var n,l=o(t),u=i(t),s=u.length,c=0;c<s;)r.f(e,n=u[c++],l[n]);return e}})),Wt=se((function(e,t){var n=qe();t.exports=n("document","documentElement")})),Yt=se((function(e,t){function n(){}var a,o=ft(),i=Ut(),l=_t(),u=Tt(),s=Wt(),c=lt(),d=wt(),p="prototype",f="script",m=d("IE_PROTO"),h=function(e){return"<"+f+">"+e+"</"+f+">"},g=function(){try{a=new ActiveXObject("htmlfile")}catch(e){}g=void 0===r||r.domain&&a?function(e){e.write(h("")),e.close();var t=e.parentWindow.Object;return e=null,t}(a):(e=c("iframe"),t="java"+f+":",e.style.display="none",s.appendChild(e),e.src=String(t),(t=e.contentWindow.document).open(),t.write(h("document.F=Object")),t.close(),t.F);for(var e,t,n=l.length;n--;)delete g[p][l[n]];return g()};u[m]=!0,t.exports=Object.create||function(e,t){var r;return null!==e?(n[p]=o(e),r=new n,n[p]=null,r[m]=e):r=g(),void 0===t?r:i.f(r,t)}})),Kt=se((function(e,t){var n=ht();t.exports=function(e,t,r,a){return a&&a.enumerable?e[t]=r:n(e,t,r),e}})),Xt=se((function(e,t){var n,r,a=Ee(),o=Ne(),i=je(),l=Yt(),u=Et(),s=Kt(),c=at(),d=Ze(),p=c("iterator");c=!1;[].keys&&("next"in(r=[].keys())?(u=u(u(r)))!==Object.prototype&&(n=u):c=!0),!i(n)||a((function(){var e={};return n[p].call(e)!==e}))?n={}:d&&(n=l(n)),o(n[p])||s(n,p,(function(){return this})),t.exports={IteratorPrototype:n,BUGGY_SAFARI_ITERATORS:c}})),Zt=se((function(e,t){var n=Lt(),r=qt();t.exports=n?{}.toString:function(){return"[object "+r(this)+"]"}})),Jt=se((function(e,t){var n=Lt(),r=mt().f,a=ht(),o=nt(),i=Zt(),l=at()("toStringTag");t.exports=function(e,t,u,s){(u=u?e:e&&e.prototype)&&(o(u,l)||r(u,l,{configurable:!0,value:t}),s)&&!n&&a(u,"toString",i)}})),Qt=se((function(e,t){t.exports={}})),en=se((function(e,t){function n(){return this}var r=Xt().IteratorPrototype,a=Yt(),o=Oe(),i=Jt(),l=Qt();t.exports=function(e,t,u,s){return t+=" Iterator",e.prototype=a(r,{next:o(+!s,u)}),i(e,t,!1,!0),l[t]=n,e}})),tn=se((function(e,t){var n=Ce(),r=Ye();t.exports=function(e,t,a){try{return n(r(Object.getOwnPropertyDescriptor(e,t)[a]))}catch(e){}}})),nn=se((function(e,t){var n=je();t.exports=function(e){return n(e)||null===e}})),rn=se((function(e,t){var n=nn(),r=String,a=TypeError;t.exports=function(e){if(n(e))return e;throw new a("Can't set "+r(e)+" as a prototype")}})),an=se((function(e,t){var n=tn(),r=je(),a=Ie(),o=rn();t.exports=Object.setPrototypeOf||("__proto__"in{}?(()=>{var e,t=!1,i={};try{(e=n(Object.prototype,"__proto__","set"))(i,[]),t=i instanceof Array}catch(i){}return function(n,i){return a(n),o(i),r(n)&&(t?e(n,i):n.__proto__=i),n}})():void 0)})),on=se((function(e,t){function n(){return this}var r=gt(),a=Se(),o=Ze(),i=Ht(),l=Ne(),u=en(),s=Et(),c=an(),d=Jt(),p=ht(),f=Kt(),m=at(),h=Qt(),g=Xt(),v=i.PROPER,b=i.CONFIGURABLE,y=g.IteratorPrototype,D=g.BUGGY_SAFARI_ITERATORS,w=m("iterator"),x="values",E="entries";t.exports=function(e,t,i,m,g,A,F){function C(e){if(e===g&&_)return _;if(!D&&e&&e in T)return T[e];switch(e){case"keys":case x:case E:return function(){return new i(this,e)}}return function(){return new i(this)}}u(i,t,m);m=t+" Iterator";var k,R,N=!1,T=e.prototype,S=T[w]||T["@@iterator"]||g&&T[g],_=!D&&S||C(g),O="Array"===t&&T.entries||S;if(O&&(O=s(O.call(new e)))!==Object.prototype&&O.next&&(o||s(O)===y||(c?c(O,y):l(O[w])||f(O,w,n)),d(O,m,!0,!0),o)&&(h[m]=n),v&&g===x&&S&&S.name!==x&&(!o&&b?p(T,"name",x):(N=!0,_=function(){return a(S,this)})),g)if(k={values:C(x),keys:A?_:C("keys"),entries:C(E)},F)for(R in k)!D&&!N&&R in T||f(T,R,k[R]);else r({target:t,proto:!0,forced:D||N},k);return o&&!F||T[w]===_||f(T,w,_,{name:g}),h[t]=_,k}})),ln=se((function(e,t){t.exports=function(e,t){return{value:e,done:t}}})),un=se((function(){var e=Vt().charAt,t=zt(),n=$t(),r=on(),a=ln(),o="String Iterator",i=n.set,l=n.getterFor(o);r(String,"String",(function(e){i(this,{type:o,string:t(e),index:0})}),(function(){var t=l(this),n=t.string,r=t.index;return r>=n.length?a(void 0,!0):(n=e(n,r),t.index+=n.length,a(n,!1))}))})),sn=se((function(e,t){var n=Se(),r=ft(),a=Ke();t.exports=function(e,t,o){var i,l;r(e);try{if(!(i=a(e,"return"))){if("throw"===t)throw o;return o}i=n(i,e)}catch(e){l=!0,i=e}if("throw"===t)throw o;if(l)throw i;return r(i),o}})),cn=se((function(e,t){var n=ft(),r=sn();t.exports=function(e,t,a,o){try{return o?t(n(a)[0],a[1]):t(a)}catch(t){r(e,"throw",t)}}})),dn=se((function(e,t){var n=at(),r=Qt(),a=n("iterator"),o=Array.prototype;t.exports=function(e){return void 0!==e&&(r.Array===e||o[a]===e)}})),pn=se((function(e,t){var n=Ce(),r=Ne(),a=Qe(),o=n(Function.toString);r(a.inspectSource)||(a.inspectSource=function(e){return o(e)}),t.exports=a.inspectSource})),fn=se((function(e,t){function n(){}function r(e){if(!l(e))return!1;try{return d(n,[],e),!0}catch(e){return!1}}function a(e){if(!l(e))return!1;switch(u(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return m||!!f(p,c(e))}catch(e){return!0}}var o=Ce(),i=Ee(),l=Ne(),u=qt(),s=qe(),c=pn(),d=s("Reflect","construct"),p=/^\\s*(?:class|function)\\b/,f=o(p.exec),m=!p.test(n);a.sham=!0,t.exports=!d||i((function(){var e;return r(r.call)||!r(Object)||!r((function(){e=!0}))||e}))?a:r})),mn=se((function(e,t){var n=Te(),r=mt(),a=Oe();t.exports=function(e,t,o){n?r.f(e,t,a(0,o)):e[t]=o}})),hn=se((function(e,t){var n=qt(),r=Ke(),a=Pe(),o=Qt(),i=at()("iterator");t.exports=function(e){if(!a(e))return r(e,i)||r(e,"@@iterator")||o[n(e)]}})),gn=se((function(e,t){var n=Se(),r=Ye(),a=ft(),o=We(),i=hn(),l=TypeError;t.exports=function(e,t){if(t=arguments.length<2?i(e):t,r(t))return a(n(t,e));throw new l(o(e)+" is not iterable")}})),vn=se((function(e,t){var n=dt(),r=Se(),a=tt(),o=cn(),i=dn(),l=fn(),u=Rt(),s=mn(),c=gn(),d=hn(),p=Array;t.exports=function(e){var t,f,m,h,g,v,b,y=a(e),D=(e=l(this),1<(b=arguments.length)?arguments[1]:void 0),w=void 0!==D,x=0;if(!(b=(w&&(D=n(D,2<b?arguments[2]:void 0)),d(y)))||this===p&&i(b))for(t=u(y),f=e?new this(t):p(t);x<t;x++)v=w?D(y[x],x):y[x],s(f,x,v);else for(f=e?new this:[],g=(h=c(y,b)).next;!(m=r(g,h)).done;x++)v=w?o(h,D,[m.value,x],!0):m.value,s(f,x,v);return f.length=x,f}})),bn=se((function(e,t){var n,r,a=at()("iterator"),o=!1;try{n=0,(r={next:function(){return{done:!!n++}},return:function(){o=!0}})[a]=function(){return this},Array.from(r,(function(){throw 2}))}catch(e){}t.exports=function(e,t){try{if(!t&&!o)return!1}catch(e){return!1}var n=!1;try{var r={};r[a]=function(){return{next:function(){return{done:n=!0}}}},e(r)}catch(e){}return n}})),yn=se((function(){var e=gt(),t=vn();e({target:"Array",stat:!0,forced:!bn()((function(e){Array.from(e)}))},{from:t})})),Dn=se((function(e,t){un(),yn();var n=Le();t.exports=n.Array.from})),wn=se((function(e,t){var n=Dn();t.exports=n})),xn=se((function(e,t){var n=wn();t.exports=n})),En=se((function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.isIdentStart=function(e){return"a"<=e&&e<="z"||"A"<=e&&e<="Z"||"-"===e||"_"===e},e.isIdent=function(e){return"a"<=e&&e<="z"||"A"<=e&&e<="Z"||"0"<=e&&e<="9"||"-"===e||"_"===e},e.isHex=function(e){return"a"<=e&&e<="f"||"A"<=e&&e<="F"||"0"<=e&&e<="9"},e.escapeIdentifier=function(t){for(var n=t.length,r="",a=0;a<n;){var o=t.charAt(a);if(e.identSpecialChars[o])r+="\\\\"+o;else if("_"===o||"-"===o||"A"<=o&&o<="Z"||"a"<=o&&o<="z"||0!==a&&"0"<=o&&o<="9")r+=o;else{if(55296==(63488&(o=o.charCodeAt(0)))){var i=t.charCodeAt(a++);if(55296!=(64512&o)||56320!=(64512&i))throw Error("UCS-2(decode): illegal sequence");o=((1023&o)<<10)+(1023&i)+65536}r+="\\\\"+o.toString(16)+" "}a++}return r},e.escapeStr=function(t){for(var n,r=t.length,a="",o=0;o<r;){var i=t.charAt(o);'"'===i?i='\\\\"':"\\\\"===i?i="\\\\\\\\":void 0!==(n=e.strReplacementsRev[i])&&(i=n),a+=i,o++}return'"'+a+'"'},e.identSpecialChars={"!":!0,'"':!0,"#":!0,$:!0,"%":!0,"&":!0,"'":!0,"(":!0,")":!0,"*":!0,"+":!0,",":!0,".":!0,"/":!0,";":!0,"<":!0,"=":!0,">":!0,"?":!0,"@":!0,"[":!0,"\\\\":!0,"]":!0,"^":!0,"\`":!0,"{":!0,"|":!0,"}":!0,"~":!0},e.strReplacementsRev={"\\n":"\\\\n","\\r":"\\\\r","\\t":"\\\\t","\\f":"\\\\f","\\v":"\\\\v"},e.singleQuoteEscapeChars={n:"\\n",r:"\\r",t:"\\t",f:"\\f","\\\\":"\\\\","'":"'"},e.doubleQuotesEscapeChars={n:"\\n",r:"\\r",t:"\\t",f:"\\f","\\\\":"\\\\",'"':'"'}})),An=se((function(e){Object.defineProperty(e,"__esModule",{value:!0});var t=En();e.parseCssSelector=function(e,n,r,a,o,i){var l=e.length,u="";function s(r,a){var o="";for(n++,u=e.charAt(n);n<l;){if(u===r)return n++,o;var i;if("\\\\"===u)if(n++,(u=e.charAt(n))===r)o+=r;else if(void 0!==(i=a[u]))o+=i;else{if(t.isHex(u)){var s=u;for(n++,u=e.charAt(n);t.isHex(u);)s+=u,n++,u=e.charAt(n);" "===u&&(n++,u=e.charAt(n)),o+=String.fromCharCode(parseInt(s,16));continue}o+=u}else o+=u;n++,u=e.charAt(n)}return o}function c(){var r="";for(u=e.charAt(n);n<l;){if(!t.isIdent(u)){if("\\\\"!==u)return r;if(l<=++n)throw Error("Expected symbol but end of file reached.");if(u=e.charAt(n),!t.identSpecialChars[u]&&t.isHex(u)){var a=u;for(n++,u=e.charAt(n);t.isHex(u);)a+=u,n++,u=e.charAt(n);" "===u&&(n++,u=e.charAt(n)),r+=String.fromCharCode(parseInt(a,16));continue}}r+=u,n++,u=e.charAt(n)}return r}function d(){for(u=e.charAt(n);" "===u||"\\t"===u||"\\n"===u||"\\r"===u||"\\f"===u;)n++,u=e.charAt(n)}function p(){var t=f();if(!t)return null;var r=t;for(u=e.charAt(n);","===u;){if(n++,d(),"selectors"!==r.type&&(r={type:"selectors",selectors:[t]}),!(t=f()))throw Error('Rule expected after ",".');r.selectors.push(t)}return r}function f(){d();var t={type:"ruleSet"},r=m();if(!r)return null;for(var a=t;r&&(r.type="rule",a.rule=r,a=r,d(),u=e.charAt(n),!(l<=n||","===u||")"===u));)if(o[u]){var i=u;if(n++,d(),!(r=m()))throw Error('Rule expected after "'+i+'".');r.nestingOperator=i}else(r=m())&&(r.nestingOperator=null);return t}function m(){for(var o=null;n<l;)if("*"===(u=e.charAt(n)))n++,(o=o||{}).tagName="*";else if(t.isIdentStart(u)||"\\\\"===u)(o=o||{}).tagName=c();else if("."===u)n++,((o=o||{}).classNames=o.classNames||[]).push(c());else if("#"===u)n++,(o=o||{}).id=c();else if("["===u){n++,d();var f={name:c()};if(d(),"]"===u)n++;else{var m="";if(a[u]&&(m=u,n++,u=e.charAt(n)),l<=n)throw Error('Expected "=" but end of file reached.');if("="!==u)throw Error('Expected "=" but "'+u+'" found.');f.operator=m+"=",n++,d();var h="";if(f.valueType="string",'"'===u)h=s('"',t.doubleQuotesEscapeChars);else if("'"===u)h=s("'",t.singleQuoteEscapeChars);else if(i&&"$"===u)n++,h=c(),f.valueType="substitute";else{for(;n<l&&"]"!==u;)h+=u,n++,u=e.charAt(n);h=h.trim()}if(d(),l<=n)throw Error('Expected "]" but end of file reached.');if("]"!==u)throw Error('Expected "]" but "'+u+'" found.');n++,f.value=h}((o=o||{}).attrs=o.attrs||[]).push(f)}else{if(":"!==u)break;if(n++,f={name:m=c()},"("===u){n++;var g="";if(d(),"selector"===r[m])f.valueType="selector",g=p();else{if(f.valueType=r[m]||"string",'"'===u)g=s('"',t.doubleQuotesEscapeChars);else if("'"===u)g=s("'",t.singleQuoteEscapeChars);else if(i&&"$"===u)n++,g=c(),f.valueType="substitute";else{for(;n<l&&")"!==u;)g+=u,n++,u=e.charAt(n);g=g.trim()}d()}if(l<=n)throw Error('Expected ")" but end of file reached.');if(")"!==u)throw Error('Expected ")" but "'+u+'" found.');n++,f.value=g}((o=o||{}).pseudos=o.pseudos||[]).push(f)}return o}var h=p();if(n<l)throw Error('Rule expected but "'+e.charAt(n)+'" found.');return h}})),Fn=se((function(e){Object.defineProperty(e,"__esModule",{value:!0});var t=En();e.renderEntity=function e(n){var r="";switch(n.type){case"ruleSet":for(var a=n.rule,o=[];a;)a.nestingOperator&&o.push(a.nestingOperator),o.push(e(a)),a=a.rule;r=o.join(" ");break;case"selectors":r=n.selectors.map(e).join(", ");break;case"rule":n.tagName&&(r="*"===n.tagName?"*":t.escapeIdentifier(n.tagName)),n.id&&(r+="#"+t.escapeIdentifier(n.id)),n.classNames&&(r+=n.classNames.map((function(e){return"."+t.escapeIdentifier(e)})).join("")),n.attrs&&(r+=n.attrs.map((function(e){return"operator"in e?"substitute"===e.valueType?"["+t.escapeIdentifier(e.name)+e.operator+"$"+e.value+"]":"["+t.escapeIdentifier(e.name)+e.operator+t.escapeStr(e.value)+"]":"["+t.escapeIdentifier(e.name)+"]"})).join("")),n.pseudos&&(r+=n.pseudos.map((function(n){return n.valueType?"selector"===n.valueType?":"+t.escapeIdentifier(n.name)+"("+e(n.value)+")":"substitute"===n.valueType?":"+t.escapeIdentifier(n.name)+"($"+n.value+")":"numeric"===n.valueType?":"+t.escapeIdentifier(n.name)+"("+n.value+")":":"+t.escapeIdentifier(n.name)+"("+t.escapeIdentifier(n.value)+")":":"+t.escapeIdentifier(n.name)})).join(""));break;default:throw Error('Unknown entity type: "'+n.type+'".')}return r}})),Cn=se((function(e){Object.defineProperty(e,"__esModule",{value:!0});var t=An(),n=Fn();function r(){this.pseudos={},this.attrEqualityMods={},this.ruleNestingOperators={},this.substitutesEnabled=!1}r.prototype.registerSelectorPseudos=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var n=0,r=e;n<r.length;n++)this.pseudos[r[n]]="selector";return this},r.prototype.unregisterSelectorPseudos=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var n=0,r=e;n<r.length;n++)delete this.pseudos[r[n]];return this},r.prototype.registerNumericPseudos=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var n=0,r=e;n<r.length;n++)this.pseudos[r[n]]="numeric";return this},r.prototype.unregisterNumericPseudos=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var n=0,r=e;n<r.length;n++)delete this.pseudos[r[n]];return this},r.prototype.registerNestingOperators=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var n=0,r=e;n<r.length;n++)this.ruleNestingOperators[r[n]]=!0;return this},r.prototype.unregisterNestingOperators=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var n=0,r=e;n<r.length;n++)delete this.ruleNestingOperators[r[n]];return this},r.prototype.registerAttrEqualityMods=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var n=0,r=e;n<r.length;n++)this.attrEqualityMods[r[n]]=!0;return this},r.prototype.unregisterAttrEqualityMods=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var n=0,r=e;n<r.length;n++)delete this.attrEqualityMods[r[n]];return this},r.prototype.enableSubstitutes=function(){return this.substitutesEnabled=!0,this},r.prototype.disableSubstitutes=function(){return this.substitutesEnabled=!1,this},r.prototype.parse=function(e){return t.parseCssSelector(e,0,this.pseudos,this.attrEqualityMods,this.ruleNestingOperators,this.substitutesEnabled)},r.prototype.render=function(e){return n.renderEntity(e).trim()},e.CssSelectorParser=r})),kn=se((function(e,r){var o={name:"doT",version:"1.1.1",templateSettings:{evaluate:/\\{\\{([\\s\\S]+?(\\}?)+)\\}\\}/g,interpolate:/\\{\\{=([\\s\\S]+?)\\}\\}/g,encode:/\\{\\{!([\\s\\S]+?)\\}\\}/g,use:/\\{\\{#([\\s\\S]+?)\\}\\}/g,useParams:/(^|[^\\w$])def(?:\\.|\\[[\\'\\"])([\\w$\\.]+)(?:[\\'\\"]\\])?\\s*\\:\\s*([\\w$\\.]+|\\"[^\\"]+\\"|\\'[^\\']+\\'|\\{[^\\}]+\\})/g,define:/\\{\\{##\\s*([\\w\\.$]+)\\s*(\\:|=)([\\s\\S]+?)#\\}\\}/g,defineParams:/^\\s*([\\w$]+):([\\s\\S]+)/,conditional:/\\{\\{\\?(\\?)?\\s*([\\s\\S]*?)\\s*\\}\\}/g,iterate:/\\{\\{~\\s*(?:\\}\\}|([\\s\\S]+?)\\s*\\:\\s*([\\w$]+)\\s*(?:\\:\\s*([\\w$]+))?\\s*\\}\\})/g,varname:"it",strip:!0,append:!0,selfcontained:!1,doNotSkipEncoded:!1},template:void 0,compile:void 0,log:!0};if("object"!==("undefined"==typeof globalThis?"undefined":a(globalThis)))try{Object.defineProperty(Object.prototype,"__magic__",{get:function(){return this},configurable:!0}),__magic__.globalThis=__magic__,delete Object.prototype.__magic__}catch(e){t.globalThis=function(){if("undefined"!=typeof self)return self;if(void 0!==t)return t;if(void 0!==n)return n;if(void 0!==this)return this;throw new Error("Unable to locate global \`this\`")}()}o.encodeHTMLSource=function(e){var t={"&":"&#38;","<":"&#60;",">":"&#62;",'"':"&#34;","'":"&#39;","/":"&#47;"},n=e?/[&<>"'\\/]/g:/&(?!#?\\w+;)|<|>|"|'|\\//g;return function(e){return e?e.toString().replace(n,(function(e){return t[e]||e})):""}},void 0!==r&&r.exports?r.exports=o:"function"==typeof define&&define.amd?define((function(){return o})):globalThis.doT=o;var i={append:{start:"'+(",end:")+'",startencode:"'+encodeHTML("},split:{start:"';out+=(",end:");out+='",startencode:"';out+=encodeHTML("}},l=/$^/;function u(e){return e.replace(/\\\\('|\\\\)/g,"$1").replace(/[\\r\\t\\n]/g," ")}o.template=function(e,t,n){var r,a,s=(t=t||o.templateSettings).append?i.append:i.split,c=0;n=t.use||t.define?function e(t,n,r){return("string"==typeof n?n:n.toString()).replace(t.define||l,(function(e,n,a,o){return(n=0===n.indexOf("def.")?n.substring(4):n)in r||(":"===a?(t.defineParams&&o.replace(t.defineParams,(function(e,t,a){r[n]={arg:t,text:a}})),n in r||(r[n]=o)):new Function("def","def['"+n+"']="+o)(r)),""})).replace(t.use||l,(function(n,a){return t.useParams&&(a=a.replace(t.useParams,(function(e,t,n,a){var o;if(r[n]&&r[n].arg&&a)return o=(n+":"+a).replace(/'|\\\\/g,"_"),r.__exp=r.__exp||{},r.__exp[o]=r[n].text.replace(new RegExp("(^|[^\\\\w$])"+r[n].arg+"([^\\\\w$])","g"),"$1"+a+"$2"),t+"def.__exp['"+o+"']"}))),(a=new Function("def","return "+a)(r))&&e(t,a,r)}))}(t,e,n||{}):e,n=("var out='"+(t.strip?n.replace(/(^|\\r|\\n)\\t* +| +\\t*(\\r|\\n|$)/g," ").replace(/\\r|\\n|\\t|\\/\\*[\\s\\S]*?\\*\\//g,""):n).replace(/'|\\\\/g,"\\\\$&").replace(t.interpolate||l,(function(e,t){return s.start+u(t)+s.end})).replace(t.encode||l,(function(e,t){return r=!0,s.startencode+u(t)+s.end})).replace(t.conditional||l,(function(e,t,n){return t?n?"';}else if("+u(n)+"){out+='":"';}else{out+='":n?"';if("+u(n)+"){out+='":"';}out+='"})).replace(t.iterate||l,(function(e,t,n,r){return t?(c+=1,a=r||"i"+c,t=u(t),"';var arr"+c+"="+t+";if(arr"+c+"){var "+n+","+a+"=-1,l"+c+"=arr"+c+".length-1;while("+a+"<l"+c+"){"+n+"=arr"+c+"["+a+"+=1];out+='"):"';} } out+='"})).replace(t.evaluate||l,(function(e,t){return"';"+u(t)+"out+='"}))+"';return out;").replace(/\\n/g,"\\\\n").replace(/\\t/g,"\\\\t").replace(/\\r/g,"\\\\r").replace(/(\\s|;|\\}|^|\\{)out\\+='';/g,"$1").replace(/\\+''/g,"");r&&(t.selfcontained||!globalThis||globalThis._encodeHTML||(globalThis._encodeHTML=o.encodeHTMLSource(t.doNotSkipEncoded)),n="var encodeHTML = typeof _encodeHTML !== 'undefined' ? _encodeHTML : ("+o.encodeHTMLSource.toString()+"("+(t.doNotSkipEncoded||"")+"));"+n);try{return new Function(t.varname,n)}catch(e){throw"undefined"!=typeof console&&console.log("Could not create a template function: "+n),e}},o.compile=function(e,t){return o.template(e,null,t)}})),Rn=se((function(e,t){t.exports=function(){}})),Nn=se((function(e,t){var n=Rn()();t.exports=function(e){return e!==n&&null!==e}})),Tn=se((function(e,t){var n=Nn(),r=Array.prototype.forEach,a=Object.create;t.exports=function(e){var t=a(null);return r.call(arguments,(function(e){if(n(e)){var r,a=Object(e),o=t;for(r in a)o[r]=a[r]}})),t}})),Sn=se((function(e,t){t.exports=function(){var e=Math.sign;return"function"==typeof e&&1===e(10)&&-1===e(-20)}})),_n=se((function(e,t){t.exports=function(e){return e=Number(e),isNaN(e)||0===e?e:0<e?1:-1}})),On=se((function(e,t){t.exports=Sn()()?Math.sign:_n()})),Mn=se((function(e,t){var n=On(),r=Math.abs,a=Math.floor;t.exports=function(e){return isNaN(e)?0:0!==(e=Number(e))&&isFinite(e)?n(e)*a(r(e)):e}})),Pn=se((function(e,t){var n=Mn(),r=Math.max;t.exports=function(e){return r(0,n(e))}})),In=se((function(e,t){var n=Pn();t.exports=function(e,t,r){return isNaN(e)?0<=t?r&&t?t-1:t:1:!1!==e&&n(e)}})),Bn=se((function(e,t){t.exports=function(e){if("function"!=typeof e)throw new TypeError(e+" is not a function");return e}})),jn=se((function(e,t){var n=Nn();t.exports=function(e){if(n(e))return e;throw new TypeError("Cannot use null or undefined")}})),Ln=se((function(e,t){var n=Bn(),r=jn(),a=Function.prototype.bind,o=Function.prototype.call,i=Object.keys,l=Object.prototype.propertyIsEnumerable;t.exports=function(e,t){return function(u,s){var c,d=arguments[2],p=arguments[3];return u=Object(r(u)),n(s),c=i(u),p&&c.sort("function"==typeof p?a.call(p,u):void 0),"function"!=typeof e&&(e=c[e]),o.call(e,c,(function(e,n){return l.call(u,e)?o.call(s,d,u[e],e,u,n):t}))}}})),qn=se((function(e,t){t.exports=Ln()("forEach")})),zn=se((function(){})),Vn=se((function(e,t){t.exports=function(){var e=Object.assign;return"function"==typeof e&&(e(e={foo:"raz"},{bar:"dwa"},{trzy:"trzy"}),e.foo+e.bar+e.trzy==="razdwatrzy")}})),Gn=se((function(e,t){t.exports=function(){try{return Object.keys("primitive"),!0}catch(e){return!1}}})),$n=se((function(e,t){var n=Nn(),r=Object.keys;t.exports=function(e){return r(n(e)?Object(e):e)}})),Hn=se((function(e,t){t.exports=Gn()()?Object.keys:$n()})),Un=se((function(e,t){var n=Hn(),r=jn(),a=Math.max;t.exports=function(e,t){var o,i,l,u=a(arguments.length,2);for(e=Object(r(e)),l=function(n){try{e[n]=t[n]}catch(n){o=o||n}},i=1;i<u;++i)n(t=arguments[i]).forEach(l);if(void 0!==o)throw o;return e}})),Wn=se((function(e,t){t.exports=Vn()()?Object.assign:Un()})),Yn=se((function(e,t){var n=Nn(),r={function:!0,object:!0};t.exports=function(e){return n(e)&&r[a(e)]||!1}})),Kn=se((function(e,t){var n=Wn(),r=Yn(),a=Nn(),o=Error.captureStackTrace;t.exports=function(e){e=new Error(e);var i=arguments[1],l=arguments[2];return a(l)||r(i)&&(l=i,i=null),a(l)&&n(e,l),a(i)&&(e.code=i),o&&o(e,t.exports),e}})),Xn=se((function(e,t){var n=jn(),r=Object.defineProperty,a=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyNames,i=Object.getOwnPropertySymbols;t.exports=function(e,t){var l,u=Object(n(t));if(e=Object(n(e)),o(u).forEach((function(n){try{r(e,n,a(t,n))}catch(n){l=n}})),"function"==typeof i&&i(u).forEach((function(n){try{r(e,n,a(t,n))}catch(n){l=n}})),void 0!==l)throw l;return e}})),Zn=se((function(e,t){function n(e,t){return t}var r,a,o,i,l,u=Pn();try{Object.defineProperty(n,"length",{configurable:!0,writable:!1,enumerable:!1,value:1})}catch(e){}1===n.length?(r={configurable:!0,writable:!1,enumerable:!1},a=Object.defineProperty,t.exports=function(e,t){return t=u(t),e.length===t?e:(r.value=t,a(e,"length",r))}):(i=Xn(),l=[],o=function(e){var t,n=0;if(l[e])return l[e];for(t=[];e--;)t.push("a"+(++n).toString(36));return new Function("fn","return function ("+t.join(", ")+") { return fn.apply(this, arguments); };")},t.exports=function(e,t){if(t=u(t),e.length===t)return e;t=o(t)(e);try{i(t,e)}catch(e){}return t})})),Jn=se((function(e,t){t.exports=function(e){return null!=e}})),Qn=se((function(e,t){var n=Jn(),r={object:!0,function:!0,undefined:!0};t.exports=function(e){return!!n(e)&&hasOwnProperty.call(r,a(e))}})),er=se((function(e,t){var n=Qn();t.exports=function(e){if(!n(e))return!1;try{return!!e.constructor&&e.constructor.prototype===e}catch(e){return!1}}})),tr=se((function(e,t){var n=er();t.exports=function(e){if("function"!=typeof e)return!1;if(!hasOwnProperty.call(e,"length"))return!1;try{if("number"!=typeof e.length)return!1;if("function"!=typeof e.call)return!1;if("function"!=typeof e.apply)return!1}catch(e){return!1}return!n(e)}})),nr=se((function(e,t){var n=tr(),r=/^\\s*class[\\s{/}]/,a=Function.prototype.toString;t.exports=function(e){return!!n(e)&&!r.test(a.call(e))}})),rr=se((function(e,t){var n="razdwatrzy";t.exports=function(){return"function"==typeof n.contains&&!0===n.contains("dwa")&&!1===n.contains("foo")}})),ar=se((function(e,t){var n=String.prototype.indexOf;t.exports=function(e){return-1<n.call(this,e,arguments[1])}})),or=se((function(e,t){t.exports=rr()()?String.prototype.contains:ar()})),ir=se((function(e,t){var n=Jn(),r=nr(),a=Wn(),o=Tn(),i=or();(t.exports=function(e,t){var r,l,u,s;return arguments.length<2||"string"!=typeof e?(s=t,t=e,e=null):s=arguments[2],n(e)?(r=i.call(e,"c"),l=i.call(e,"e"),u=i.call(e,"w")):l=!(r=u=!0),e={value:t,configurable:r,enumerable:l,writable:u},s?a(o(s),e):e}).gs=function(e,t,l){var u,s;return"string"!=typeof e?(s=l,l=t,t=e,e=null):s=arguments[3],n(t)?r(t)?n(l)?r(l)||(s=l,l=void 0):l=void 0:(s=t,t=l=void 0):t=void 0,e=n(e)?(u=i.call(e,"c"),i.call(e,"e")):!(u=!0),t={get:t,set:l,configurable:u,enumerable:e},s?a(o(s),t):t}})),lr=se((function(e,t){var n=ir(),r=Bn(),o=Function.prototype.apply,i=Function.prototype.call,l=Object.create,u=Object.defineProperty,s=Object.defineProperties,c=Object.prototype.hasOwnProperty,d={configurable:!0,enumerable:!1,writable:!0},p=function(e,t){var n;return r(t),c.call(this,"__ee__")?n=this.__ee__:(n=d.value=l(null),u(this,"__ee__",d),d.value=null),n[e]?"object"===a(n[e])?n[e].push(t):n[e]=[n[e],t]:n[e]=t,this},f=function(e,t){var n,a;return r(t),a=this,p.call(this,e,n=function(){m.call(a,e,n),o.call(t,this,arguments)}),n.__eeOnceListener__=t,this},m=function(e,t){var n,o,i,l;if(r(t),c.call(this,"__ee__")&&(n=this.__ee__)[e])if("object"===a(o=n[e]))for(l=0;i=o[l];++l)i!==t&&i.__eeOnceListener__!==t||(2===o.length?n[e]=o[l?0:1]:o.splice(l,1));else o!==t&&o.__eeOnceListener__!==t||delete n[e];return this},h=function(e){var t,n,r,l,u;if(c.call(this,"__ee__")&&(l=this.__ee__[e]))if("object"===a(l)){for(n=arguments.length,u=new Array(n-1),t=1;t<n;++t)u[t-1]=arguments[t];for(l=l.slice(),t=0;r=l[t];++t)o.call(r,this,u)}else switch(arguments.length){case 1:i.call(l,this);break;case 2:i.call(l,this,arguments[1]);break;case 3:i.call(l,this,arguments[1],arguments[2]);break;default:for(n=arguments.length,u=new Array(n-1),t=1;t<n;++t)u[t-1]=arguments[t];o.call(l,this,u)}},g={on:p,once:f,off:m,emit:h},v={on:n(p),once:n(f),off:n(m),emit:n(h)},b=s({},v);t.exports=e=function(e){return null==e?l(b):s(Object(e),v)},e.methods=g})),ur=se((function(e,t){t.exports=function(){var e,t=Array.from;return"function"==typeof t&&(e=t(t=["raz","dwa"]),Boolean(e&&e!==t&&"dwa"===e[1]))}})),sr=se((function(e,t){t.exports=function(){return"object"===("undefined"==typeof globalThis?"undefined":a(globalThis))&&!!globalThis&&globalThis.Array===Array}})),cr=se((function(e,n){function r(){if("object"===("undefined"==typeof self?"undefined":a(self))&&self)return self;if("object"===(void 0===t?"undefined":a(t))&&t)return t;throw new Error("Unable to resolve global \`this\`")}n.exports=function(){if(this)return this;try{Object.defineProperty(Object.prototype,"__global__",{get:function(){return this},configurable:!0})}catch(e){return r()}try{return __global__||r()}finally{delete Object.prototype.__global__}}()})),dr=se((function(e,t){t.exports=sr()()?globalThis:cr()})),pr=se((function(e,t){var n=dr(),r={object:!0,symbol:!0};t.exports=function(){var e,t=n.Symbol;if("function"!=typeof t)return!1;e=t("test symbol");try{String(e)}catch(e){return!1}return!!r[a(t.iterator)]&&!!r[a(t.toPrimitive)]&&!!r[a(t.toStringTag)]}})),fr=se((function(e,t){t.exports=function(e){return!!e&&("symbol"===a(e)||!!e.constructor&&"Symbol"===e.constructor.name&&"Symbol"===e[e.constructor.toStringTag])}})),mr=se((function(e,t){var n=fr();t.exports=function(e){if(n(e))return e;throw new TypeError(e+" is not a symbol")}})),hr=se((function(e,t){var n=ir(),r=Object.create,a=Object.defineProperty,o=Object.prototype,i=r(null);t.exports=function(e){for(var t,r,l=0;i[e+(l||"")];)++l;return i[e+=l||""]=!0,a(o,t="@@"+e,n.gs(null,(function(e){r||(r=!0,a(this,t,n(e)),r=!1)}))),t}})),gr=se((function(e,t){var n=ir(),r=dr().Symbol;t.exports=function(e){return Object.defineProperties(e,{hasInstance:n("",r&&r.hasInstance||e("hasInstance")),isConcatSpreadable:n("",r&&r.isConcatSpreadable||e("isConcatSpreadable")),iterator:n("",r&&r.iterator||e("iterator")),match:n("",r&&r.match||e("match")),replace:n("",r&&r.replace||e("replace")),search:n("",r&&r.search||e("search")),species:n("",r&&r.species||e("species")),split:n("",r&&r.split||e("split")),toPrimitive:n("",r&&r.toPrimitive||e("toPrimitive")),toStringTag:n("",r&&r.toStringTag||e("toStringTag")),unscopables:n("",r&&r.unscopables||e("unscopables"))})}})),vr=se((function(e,t){var n=ir(),r=mr(),a=Object.create(null);t.exports=function(e){return Object.defineProperties(e,{for:n((function(t){return a[t]||(a[t]=e(String(t)))})),keyFor:n((function(e){for(var t in r(e),a)if(a[t]===e)return t}))})}})),br=se((function(e,t){var n,r,o,i=ir(),l=mr(),u=dr().Symbol,s=hr(),c=gr(),d=vr(),p=Object.create,f=Object.defineProperties,m=Object.defineProperty;if("function"==typeof u)try{String(u()),o=!0}catch(e){}else u=null;r=function(e){if(this instanceof r)throw new TypeError("Symbol is not a constructor");return n(e)},t.exports=n=function e(t){var n;if(this instanceof e)throw new TypeError("Symbol is not a constructor");return o?u(t):(n=p(r.prototype),t=void 0===t?"":String(t),f(n,{__description__:i("",t),__name__:i("",s(t))}))},c(n),d(n),f(r.prototype,{constructor:i(n),toString:i("",(function(){return this.__name__}))}),f(n.prototype,{toString:i((function(){return"Symbol ("+l(this).__description__+")"})),valueOf:i((function(){return l(this)}))}),m(n.prototype,n.toPrimitive,i("",(function(){var e=l(this);return"symbol"===a(e)?e:e.toString()}))),m(n.prototype,n.toStringTag,i("c","Symbol")),m(r.prototype,n.toStringTag,i("c",n.prototype[n.toStringTag])),m(r.prototype,n.toPrimitive,i("c",n.prototype[n.toPrimitive]))})),yr=se((function(e,t){t.exports=pr()()?dr().Symbol:br()})),Dr=se((function(e,t){var n=Object.prototype.toString,r=n.call(function(){return arguments}());t.exports=function(e){return n.call(e)===r}})),wr=se((function(e,t){var n=Object.prototype.toString,r=RegExp.prototype.test.bind(/^[object [A-Za-z0-9]*Function]$/);t.exports=function(e){return"function"==typeof e&&r(n.call(e))}})),xr=se((function(e,t){var n=Object.prototype.toString,r=n.call("");t.exports=function(e){return"string"==typeof e||e&&"object"===a(e)&&(e instanceof String||n.call(e)===r)||!1}})),Er=se((function(e,t){var n=yr().iterator,r=Dr(),a=wr(),o=Pn(),i=Bn(),l=jn(),u=Nn(),s=xr(),c=Array.isArray,d=Function.prototype.call,p={configurable:!0,enumerable:!0,writable:!0,value:null},f=Object.defineProperty;t.exports=function(e){var t,m,h,g,v,b,y,D,w,x,E=arguments[1],A=arguments[2];if(e=Object(l(e)),u(E)&&i(E),this&&this!==Array&&a(this))t=this;else{if(!E){if(r(e))return 1!==(v=e.length)?Array.apply(null,e):((g=new Array(1))[0]=e[0],g);if(c(e)){for(g=new Array(v=e.length),m=0;m<v;++m)g[m]=e[m];return g}}g=[]}if(!c(e))if(void 0!==(w=e[n])){for(y=i(w).call(e),t&&(g=new t),D=y.next(),m=0;!D.done;)x=E?d.call(E,A,D.value,m):D.value,t?(p.value=x,f(g,m,p)):g[m]=x,D=y.next(),++m;v=m}else if(s(e)){for(v=e.length,t&&(g=new t),h=m=0;m<v;++m)x=e[m],m+1<v&&55296<=(b=x.charCodeAt(0))&&b<=56319&&(x+=e[++m]),x=E?d.call(E,A,x,h):x,t?(p.value=x,f(g,h,p)):g[h]=x,++h;v=h}if(void 0===v)for(v=o(e.length),t&&(g=new t(v)),m=0;m<v;++m)x=E?d.call(E,A,e[m],m):e[m],t?(p.value=x,f(g,m,p)):g[m]=x;return t&&(p.value=null,g.length=v),g}})),Ar=se((function(e,t){t.exports=ur()()?Array.from:Er()})),Fr=se((function(e,t){var n=Ar(),r=Array.isArray;t.exports=function(e){return r(e)?e:n(e)}})),Cr=se((function(e,t){var n=Fr(),r=Nn(),a=Bn(),o=Array.prototype.slice,i=function(e){return this.map((function(t,n){return t?t(e[n]):e[n]})).concat(o.call(e,this.length))};t.exports=function(e){return(e=n(e)).forEach((function(e){r(e)&&a(e)})),i.bind(e)}})),kr=se((function(e,t){var n=Bn();t.exports=function(e){var t;return"function"==typeof e?{set:e,get:e}:(t={get:n(e.get)},void 0!==e.set?(t.set=n(e.set),e.delete&&(t.delete=n(e.delete)),e.clear&&(t.clear=n(e.clear))):t.set=t.get,t)}})),Rr=se((function(e,t){var n=Kn(),r=Zn(),a=ir(),o=lr().methods,i=Cr(),l=kr(),u=Function.prototype.apply,s=Function.prototype.call,c=Object.create,d=Object.defineProperties,p=o.on,f=o.emit;t.exports=function(e,t,o){var m,h,g,v,b,y,D,w,x,E,A,F=c(null),C=!1!==t?t:isNaN(e.length)?1:e.length;return o.normalizer&&(E=l(o.normalizer),h=E.get,g=E.set,v=E.delete,b=E.clear),null!=o.resolvers&&(A=i(o.resolvers)),E=h?r((function(t){var r,a,o=arguments;if(A&&(o=A(o)),null!==(r=h(o))&&hasOwnProperty.call(F,r))return D&&m.emit("get",r,o,this),F[r];if(a=1===o.length?s.call(e,this,o[0]):u.call(e,this,o),null===r){if(null!==(r=h(o)))throw n("Circular invocation","CIRCULAR_INVOCATION");r=g(o)}else if(hasOwnProperty.call(F,r))throw n("Circular invocation","CIRCULAR_INVOCATION");return F[r]=a,w&&m.emit("set",r,null,a),a}),C):0===t?function(){var t;if(hasOwnProperty.call(F,"data"))return D&&m.emit("get","data",arguments,this),F.data;if(t=arguments.length?u.call(e,this,arguments):s.call(e,this),hasOwnProperty.call(F,"data"))throw n("Circular invocation","CIRCULAR_INVOCATION");return F.data=t,w&&m.emit("set","data",null,t),t}:function(t){var r,a=arguments;if(A&&(a=A(arguments)),r=String(a[0]),hasOwnProperty.call(F,r))return D&&m.emit("get",r,a,this),F[r];if(a=1===a.length?s.call(e,this,a[0]):u.call(e,this,a),hasOwnProperty.call(F,r))throw n("Circular invocation","CIRCULAR_INVOCATION");return F[r]=a,w&&m.emit("set",r,null,a),a},m={original:e,memoized:E,profileName:o.profileName,get:function(e){return A&&(e=A(e)),h?h(e):String(e[0])},has:function(e){return hasOwnProperty.call(F,e)},delete:function(e){var t;hasOwnProperty.call(F,e)&&(v&&v(e),t=F[e],delete F[e],x)&&m.emit("delete",e,t)},clear:function(){var e=F;b&&b(),F=c(null),m.emit("clear",e)},on:function(e,t){return"get"===e?D=!0:"set"===e?w=!0:"delete"===e&&(x=!0),p.call(this,e,t)},emit:f,updateEnv:function(){e=m.original}},o=h?r((function(e){var t=arguments;A&&(t=A(t)),null!==(t=h(t))&&m.delete(t)}),C):0===t?function(){return m.delete("data")}:function(e){return A&&(e=A(arguments)[0]),m.delete(e)},C=r((function(){var e=arguments;return 0===t?F.data:(A&&(e=A(e)),e=h?h(e):String(e[0]),F[e])})),y=r((function(){var e=arguments;return 0===t?m.has("data"):(A&&(e=A(e)),null!==(e=h?h(e):String(e[0]))&&m.has(e))})),d(E,{__memoized__:a(!0),delete:a(o),clear:a(m.clear),_get:a(C),_has:a(y)}),m}})),Nr=se((function(e,t){var n=Bn(),r=qn(),a=zn(),o=Rr(),i=In();t.exports=function e(t){var l,u,s;if(n(t),(l=Object(arguments[1])).async&&l.promise)throw new Error("Options 'async' and 'promise' cannot be used together");return hasOwnProperty.call(t,"__memoized__")&&!l.force?t:(u=i(l.length,t.length,l.async&&a.async),s=o(t,u,l),r(a,(function(e,t){l[t]&&e(l[t],s,l)})),e.__profiler__&&e.__profiler__(s),s.updateEnv(),s.memoized)}})),Tr=se((function(e,t){t.exports=function(e){var t,n,r=e.length;if(!r)return"";for(t=String(e[n=0]);--r;)t+=""+e[++n];return t}})),Sr=se((function(e,t){t.exports=function(e){return e?function(t){for(var n=String(t[0]),r=0,a=e;--a;)n+=""+t[++r];return n}:function(){return""}}})),_r=se((function(e,t){t.exports=function(){var e=Number.isNaN;return"function"==typeof e&&!e({})&&e(NaN)&&!e(34)}})),Or=se((function(e,t){t.exports=function(e){return e!=e}})),Mr=se((function(e,t){t.exports=_r()()?Number.isNaN:Or()})),Pr=se((function(e,t){var n=Mr(),r=Pn(),a=jn(),o=Array.prototype.indexOf,i=Object.prototype.hasOwnProperty,l=Math.abs,u=Math.floor;t.exports=function(e){var t,s,c;if(!n(e))return o.apply(this,arguments);for(s=r(a(this).length),e=arguments[1],t=e=isNaN(e)?0:0<=e?u(e):r(this.length)-u(l(e));t<s;++t)if(i.call(this,t)&&(c=this[t],n(c)))return t;return-1}})),Ir=se((function(e,t){var n=Pr(),r=Object.create;t.exports=function(){var e=0,t=[],a=r(null);return{get:function(e){var r,a=0,o=t,i=e.length;if(0===i)return o[i]||null;if(o=o[i]){for(;a<i-1;){if(-1===(r=n.call(o[0],e[a])))return null;o=o[1][r],++a}return-1===(r=n.call(o[0],e[a]))?null:o[1][r]||null}return null},set:function(r){var o,i=0,l=t,u=r.length;if(0===u)l[u]=++e;else{for(l[u]||(l[u]=[[],[]]),l=l[u];i<u-1;)-1===(o=n.call(l[0],r[i]))&&(o=l[0].push(r[i])-1,l[1].push([[],[]])),l=l[1][o],++i;-1===(o=n.call(l[0],r[i]))&&(o=l[0].push(r[i])-1),l[1][o]=++e}return a[e]=r,e},delete:function(e){var r,o=0,i=t,l=a[e],u=l.length,s=[];if(0===u)delete i[u];else if(i=i[u]){for(;o<u-1;){if(-1===(r=n.call(i[0],l[o])))return;s.push(i,r),i=i[1][r],++o}if(-1===(r=n.call(i[0],l[o])))return;for(e=i[1][r],i[0].splice(r,1),i[1].splice(r,1);!i[0].length&&s.length;)r=s.pop(),(i=s.pop())[0].splice(r,1),i[1].splice(r,1)}delete a[e]},clear:function(){t=[],a=r(null)}}}})),Br=se((function(e,t){var n=Pr();t.exports=function(){var e=0,t=[],r=[];return{get:function(e){return-1===(e=n.call(t,e[0]))?null:r[e]},set:function(n){return t.push(n[0]),r.push(++e),e},delete:function(e){-1!==(e=n.call(r,e))&&(t.splice(e,1),r.splice(e,1))},clear:function(){t=[],r=[]}}}})),jr=se((function(e,t){var n=Pr(),r=Object.create;t.exports=function(e){var t=0,a=[[],[]],o=r(null);return{get:function(t){for(var r,o=0,i=a;o<e-1;){if(-1===(r=n.call(i[0],t[o])))return null;i=i[1][r],++o}return-1!==(r=n.call(i[0],t[o]))&&i[1][r]||null},set:function(r){for(var i,l=0,u=a;l<e-1;)-1===(i=n.call(u[0],r[l]))&&(i=u[0].push(r[l])-1,u[1].push([[],[]])),u=u[1][i],++l;return-1===(i=n.call(u[0],r[l]))&&(i=u[0].push(r[l])-1),u[1][i]=++t,o[t]=r,t},delete:function(t){for(var r,i=0,l=a,u=[],s=o[t];i<e-1;){if(-1===(r=n.call(l[0],s[i])))return;u.push(l,r),l=l[1][r],++i}if(-1!==(r=n.call(l[0],s[i]))){for(t=l[1][r],l[0].splice(r,1),l[1].splice(r,1);!l[0].length&&u.length;)r=u.pop(),(l=u.pop())[0].splice(r,1),l[1].splice(r,1);delete o[t]}},clear:function(){a=[[],[]],o=r(null)}}}})),Lr=se((function(e,t){var n=Bn(),r=qn(),a=Function.prototype.call;t.exports=function(e,t){var o={},i=arguments[2];return n(t),r(e,(function(e,n,r,l){o[n]=a.call(t,i,e,n,r,l)})),o}})),qr=se((function(e,t){function n(e){if("function"!=typeof e)throw new TypeError(e+" is not a function");return e}function o(e){var t,a,o=r.createTextNode(""),i=0;return new e((function(){var e;if(t)a&&(t=a.concat(t));else{if(!a)return;t=a}if(a=t,t=null,"function"==typeof a)e=a,a=null,e();else for(o.data=i=++i%2;a;)e=a.shift(),a.length||(a=null),e()})).observe(o,{characterData:!0}),function(e){n(e),t?"function"==typeof t?t=[t,e]:t.push(e):(t=e,o.data=i=++i%2)}}t.exports=(()=>{if("object"===("undefined"==typeof process?"undefined":a(process))&&process&&"function"==typeof process.nextTick)return process.nextTick;if("function"==typeof queueMicrotask)return function(e){queueMicrotask(n(e))};if("object"===(void 0===r?"undefined":a(r))&&r){if("function"==typeof MutationObserver)return o(MutationObserver);if("function"==typeof WebKitMutationObserver)return o(WebKitMutationObserver)}return"function"==typeof setImmediate?function(e){setImmediate(n(e))}:"function"==typeof setTimeout||"object"===("undefined"==typeof setTimeout?"undefined":a(setTimeout))?function(e){setTimeout(n(e),0)}:null})()})),zr=se((function(){var e=Ar(),t=Lr(),n=Xn(),r=Zn(),a=qr(),o=Array.prototype.slice,i=Function.prototype.apply,l=Object.create;zn().async=function(u,s){var c,d,p,f=l(null),m=l(null),h=s.memoized,g=s.original;s.memoized=r((function(e){var t=arguments,n=t[t.length-1];return"function"==typeof n&&(c=n,t=o.call(t,0,-1)),h.apply(d=this,p=t)}),h);try{n(s.memoized,h)}catch(u){}s.on("get",(function(e){var t,n,r;c&&(f[e]?("function"==typeof f[e]?f[e]=[f[e],c]:f[e].push(c),c=null):(t=c,n=d,r=p,c=d=p=null,a((function(){var a;hasOwnProperty.call(m,e)?(a=m[e],s.emit("getasync",e,r,n),i.call(t,a.context,a.args)):(c=t,d=n,p=r,h.apply(n,r))}))))})),s.original=function(){var t,n,r,o;return c?(t=e(arguments),r=c,c=d=p=null,t.push(n=function t(n){var r,l,u=t.id;if(null==u)a(i.bind(t,this,arguments));else if(delete t.id,r=f[u],delete f[u],r)return l=e(arguments),s.has(u)&&(n?s.delete(u):(m[u]={context:this,args:l},s.emit("setasync",u,"function"==typeof r?1:r.length))),"function"==typeof r?o=i.call(r,this,l):r.forEach((function(e){o=i.call(e,this,l)}),this),o}),o=i.call(g,this,t),n.cb=r,c=n,o):i.call(g,this,arguments)},s.on("set",(function(e){c?(f[e]?"function"==typeof f[e]?f[e]=[f[e],c.cb]:f[e].push(c.cb):f[e]=c.cb,delete c.cb,c.id=e,c=null):s.delete(e)})),s.on("delete",(function(e){var t;hasOwnProperty.call(f,e)||m[e]&&(t=m[e],delete m[e],s.emit("deleteasync",e,o.call(t.args,1)))})),s.on("clear",(function(){var e=m;m=l(null),s.emit("clearasync",t(e,(function(e){return o.call(e.args,1)})))}))}})),Vr=se((function(e,t){var n=Array.prototype.forEach,r=Object.create;t.exports=function(e){var t=r(null);return n.call(arguments,(function(e){t[e]=!0})),t}})),Gr=se((function(e,t){t.exports=function(e){return"function"==typeof e}})),$r=se((function(e,t){var n=Gr();t.exports=function(e){try{return e&&n(e.toString)?e.toString():String(e)}catch(e){throw new TypeError("Passed argument cannot be stringifed")}}})),Hr=se((function(e,t){var n=jn(),r=$r();t.exports=function(e){return r(n(e))}})),Ur=se((function(e,t){var n=Gr();t.exports=function(e){try{return e&&n(e.toString)?e.toString():String(e)}catch(e){return"<Non-coercible to string value>"}}})),Wr=se((function(e,t){var n=Ur(),r=/[\\n\\r\\u2028\\u2029]/g;t.exports=function(e){return(e=100<(e=n(e)).length?e.slice(0,99)+"\u2026":e).replace(r,(function(e){return JSON.stringify(e).slice(1,-1)}))}})),Yr=se((function(e,t){function n(e){return!!e&&("object"===a(e)||"function"==typeof e)&&"function"==typeof e.then}t.exports=n,t.exports.default=n})),Kr=se((function(){var e=Lr(),t=Vr(),n=Hr(),r=Wr(),a=Yr(),o=qr(),i=Object.create,l=t("then","then:finally","done","done:finally");zn().promise=function(t,u){var s=i(null),c=i(null),d=i(null);if(!0===t)t=null;else if(t=n(t),!l[t])throw new TypeError("'"+r(t)+"' is not valid promise mode");u.on("set",(function(e,n,r){var i=!1;if(a(r)){s[e]=1,d[e]=r;var l=function(t){var n=s[e];if(i)throw new Error("Memoizee error: Detected unordered then|done & finally resolution, which in turn makes proper detection of success/failure impossible (when in 'done:finally' mode)\\nConsider to rely on 'then' or 'done' mode instead.");n&&(delete s[e],c[e]=t,u.emit("setasync",e,n))},p=function(){i=!0,s[e]&&(delete s[e],delete d[e],u.delete(e))},f=t;if("then"===(f=f||"then")){var m=function(){o(p)};"function"==typeof(r=r.then((function(e){o(l.bind(this,e))}),m)).finally&&r.finally(m)}else if("done"===f){if("function"!=typeof r.done)throw new Error("Memoizee error: Retrieved promise does not implement 'done' in 'done' mode");r.done(l,p)}else if("done:finally"===f){if("function"!=typeof r.done)throw new Error("Memoizee error: Retrieved promise does not implement 'done' in 'done:finally' mode");if("function"!=typeof r.finally)throw new Error("Memoizee error: Retrieved promise does not implement 'finally' in 'done:finally' mode");r.done(l),r.finally(p)}}else c[e]=r,u.emit("setasync",e,1)})),u.on("get",(function(e,t,n){var r,i;s[e]?++s[e]:(r=d[e],i=function(){u.emit("getasync",e,t,n)},a(r)?"function"==typeof r.done?r.done(i):r.then((function(){o(i)})):i())})),u.on("delete",(function(e){var t;delete d[e],s[e]?delete s[e]:hasOwnProperty.call(c,e)&&(t=c[e],delete c[e],u.emit("deleteasync",e,[t]))})),u.on("clear",(function(){var t=c;c=i(null),s=i(null),d=i(null),u.emit("clearasync",e(t,(function(e){return[e]})))}))}})),Xr=se((function(){var e=Bn(),t=qn(),n=zn(),r=Function.prototype.apply;n.dispose=function(a,o,i){var l;e(a),i.async&&n.async||i.promise&&n.promise?(o.on("deleteasync",l=function(e,t){r.call(a,null,t)}),o.on("clearasync",(function(e){t(e,(function(e,t){l(t,e)}))}))):(o.on("delete",l=function(e,t){a(t)}),o.on("clear",(function(e){t(e,(function(e,t){l(t,e)}))})))}})),Zr=se((function(e,t){t.exports=2147483647})),Jr=se((function(e,t){var n=Pn(),r=Zr();t.exports=function(e){if(e=n(e),r<e)throw new TypeError(e+" exceeds maximum possible timeout");return e}})),Qr=se((function(){var e=Ar(),t=qn(),n=qr(),r=Yr(),a=Jr(),o=zn(),i=Function.prototype,l=Math.max,u=Math.min,s=Object.create;o.maxAge=function(c,d,p){var f,m,h,g;(c=a(c))&&(f=s(null),m=p.async&&o.async||p.promise&&o.promise?"async":"",d.on("set"+m,(function(e){f[e]=setTimeout((function(){d.delete(e)}),c),"function"==typeof f[e].unref&&f[e].unref(),g&&(g[e]&&"nextTick"!==g[e]&&clearTimeout(g[e]),g[e]=setTimeout((function(){delete g[e]}),h),"function"==typeof g[e].unref)&&g[e].unref()})),d.on("delete"+m,(function(e){clearTimeout(f[e]),delete f[e],g&&("nextTick"!==g[e]&&clearTimeout(g[e]),delete g[e])})),p.preFetch&&(h=!0===p.preFetch||isNaN(p.preFetch)?.333:l(u(Number(p.preFetch),1),0))&&(g={},h=(1-h)*c,d.on("get"+m,(function(t,a,o){g[t]||(g[t]="nextTick",n((function(){var n;"nextTick"===g[t]&&(delete g[t],d.delete(t),p.async&&(a=e(a)).push(i),n=d.memoized.apply(o,a),p.promise)&&r(n)&&("function"==typeof n.done?n.done(i,i):n.then(i,i))})))}))),d.on("clear"+m,(function(){t(f,(function(e){clearTimeout(e)})),f={},g&&(t(g,(function(e){"nextTick"!==e&&clearTimeout(e)})),g={})})))}})),ea=se((function(e,t){var n=Pn(),r=Object.create,a=Object.prototype.hasOwnProperty;t.exports=function(e){var t,o=0,i=1,l=r(null),u=r(null),s=0;return e=n(e),{hit:function(n){var r=u[n],c=++s;if(l[c]=n,u[n]=c,!r)return++o<=e?void 0:(n=l[i],t(n),n);if(delete l[r],i===r)for(;!a.call(l,++i););},delete:t=function(e){var t=u[e];if(t&&(delete l[t],delete u[e],--o,i===t))if(o)for(;!a.call(l,++i););else s=0,i=1},clear:function(){o=0,i=1,l=r(null),u=r(null),s=0}}}})),ta=se((function(){var e=Pn(),t=ea(),n=zn();n.max=function(r,a,o){var i;(r=e(r))&&(i=t(r),r=o.async&&n.async||o.promise&&n.promise?"async":"",a.on("set"+r,o=function(e){void 0!==(e=i.hit(e))&&a.delete(e)}),a.on("get"+r,o),a.on("delete"+r,i.delete),a.on("clear"+r,i.clear))}})),na=se((function(){var e=ir(),t=zn(),n=Object.create,r=Object.defineProperties;t.refCounter=function(a,o,i){var l=n(null);i=i.async&&t.async||i.promise&&t.promise?"async":"";o.on("set"+i,(function(e,t){l[e]=t||1})),o.on("get"+i,(function(e){++l[e]})),o.on("delete"+i,(function(e){delete l[e]})),o.on("clear"+i,(function(){l={}})),r(o.memoized,{deleteRef:e((function(){var e=o.get(arguments);return null!==e&&l[e]?!--l[e]&&(o.delete(e),!0):null})),getRefCount:e((function(){var e=o.get(arguments);return null!==e&&l[e]||0}))})}})),ra=se((function(e,t){var n=Tn(),r=In(),a=Nr();t.exports=function(e){var t,o=n(arguments[1]);return o.normalizer||0!==(t=o.length=r(o.length,e.length,o.async))&&(o.primitive?!1===t?o.normalizer=Tr():1<t&&(o.normalizer=Sr()(t)):o.normalizer=!1===t?Ir()():1===t?Br()():jr()(t)),o.async&&zr(),o.promise&&Kr(),o.dispose&&Xr(),o.maxAge&&Qr(),o.max&&ta(),o.refCounter&&na(),a(e,o)}})),aa={helpUrlBase:"https://dequeuniversity.com/rules/",gridSize:200,selectorSimilarFilterLimit:700,results:[],resultGroups:[],resultGroupMap:{},impact:Object.freeze(["minor","moderate","serious","critical"]),preload:Object.freeze({assets:["cssom","media"],timeout:1e4}),allOrigins:"<unsafe_all_origins>",sameOrigin:"<same_origin>",serializableErrorProps:Object.freeze(["message","stack","name","code","ruleId","method"])},oa=([{name:"NA",value:"inapplicable",priority:0,group:"inapplicable"},{name:"PASS",value:"passed",priority:1,group:"passes"},{name:"CANTTELL",value:"cantTell",priority:2,group:"incomplete"},{name:"FAIL",value:"failed",priority:3,group:"violations"}].forEach((function(e){var t=e.name,n=e.value,r=e.priority;e=e.group;aa[t]=n,aa[t+"_PRIO"]=r,aa[t+"_GROUP"]=e,aa.results[r]=n,aa.resultGroups[r]=e,aa.resultGroupMap[n]=e})),Object.freeze(aa.results),Object.freeze(aa.resultGroups),Object.freeze(aa.resultGroupMap),Object.freeze(aa),aa),ia=function(){"object"===("undefined"==typeof console?"undefined":a(console))&&console.log&&Function.prototype.apply.call(console.log,console,arguments)},la=/[\\t\\r\\n\\f]/g,ua=W((function e(){H(this,e),this.parent=void 0}),[{key:"props",get:function(){throw new Error('VirtualNode class must have a "props" object consisting of "nodeType" and "nodeName" properties')}},{key:"attrNames",get:function(){throw new Error('VirtualNode class must have an "attrNames" property')}},{key:"attr",value:function(){throw new Error('VirtualNode class must have an "attr" function')}},{key:"hasAttr",value:function(){throw new Error('VirtualNode class must have a "hasAttr" function')}},{key:"hasClass",value:function(e){var t=this.attr("class");return!!t&&(e=" "+e+" ",0<=(" "+t+" ").replace(la," ").indexOf(e))}}]),sa={},ca=(ce(sa,{DqElement:function(){return Pd},RuleError:function(){return wm},aggregate:function(){return ca},aggregateChecks:function(){return ga},aggregateNodeResults:function(){return ba},aggregateResult:function(){return Da},areStylesSet:function(){return wa},assert:function(){return xa},checkHelper:function(){return Id},clone:function(){return Bd},closest:function(){return Wd},collectResultsFromFrames:function(){return zp},contains:function(){return Vp},convertSelector:function(){return Hd},cssParser:function(){return jd},deepMerge:function(){return $p},escapeSelector:function(){return Aa},extendMetaData:function(){return Hp},filterHtmlAttrs:function(){return gm},finalizeRuleResult:function(){return va},findBy:function(){return jp},getAllChecks:function(){return Bp},getAncestry:function(){return Rl},getBaseLang:function(){return of},getCheckMessage:function(){return hf},getCheckOption:function(){return gf},getEnvironmentData:function(){return vf},getFlattenedTree:function(){return tf},getFrameContexts:function(){return Ef},getFriendlyUriEnd:function(){return Ra},getNodeAttributes:function(){return Na},getNodeFromTree:function(){return _l},getPreloadConfig:function(){return cm},getRootNode:function(){return Ml},getRule:function(){return Af},getScroll:function(){return Cf},getScrollState:function(){return kf},getSelector:function(){return Fl},getSelectorData:function(){return wl},getShadowSelector:function(){return pl},getStandards:function(){return Rf},getStyleSheetFactory:function(){return Tf},getXpath:function(){return Nl},injectStyle:function(){return Sf},isArrayLike:function(){return _f},isContextObject:function(){return Pf},isContextProp:function(){return If},isContextSpec:function(){return Mf},isHidden:function(){return Lf},isHtmlElement:function(){return qf},isLabelledFramesSelector:function(){return Bf},isLabelledShadowDomSelector:function(){return jf},isNodeInContext:function(){return zf},isShadowRoot:function(){return Wp},isValidLang:function(){return Rm},isXHTML:function(){return dl},matchAncestry:function(){return Gf},matches:function(){return Ld},matchesExpression:function(){return Ud},matchesSelector:function(){return Ta},memoize:function(){return cl},mergeResults:function(){return qp},nodeLookup:function(){return Hf},nodeSerializer:function(){return Ip},nodeSorter:function(){return $f},objectHasOwn:function(){return Of},parseCrossOriginStylesheet:function(){return Xf},parseSameOriginStylesheet:function(){return Yf},parseStylesheet:function(){return Kf},parseTabindex:function(){return Zf},performanceTimer:function(){return Qf},pollyfillElementsFromPoint:function(){return em},preload:function(){return um},preloadCssom:function(){return am},preloadMedia:function(){return lm},processMessage:function(){return mf},publishMetaData:function(){return dm},querySelectorAll:function(){return fm},querySelectorAllFilter:function(){return rm},queue:function(){return Qd},respondable:function(){return Np},ruleShouldRun:function(){return hm},select:function(){return bm},sendCommandToFrame:function(){return Sp},serializeError:function(){return ym},setScrollState:function(){return xm},shadowSelect:function(){return Em},shadowSelectAll:function(){return Am},shouldPreload:function(){return sm},toArray:function(){return Ea},tokenList:function(){return Yp},uniqueArray:function(){return tm},uuid:function(){return pp},validInputTypes:function(){return Fm},validLangs:function(){return km}}),function(e,t,n){return t=t.slice(),n&&t.push(n),n=t.map((function(t){return e.indexOf(t)})).sort(),e[n.pop()]}),da=oa.CANTTELL_PRIO,pa=oa.FAIL_PRIO,fa=[],ma=(fa[oa.PASS_PRIO]=!0,fa[oa.CANTTELL_PRIO]=null,fa[oa.FAIL_PRIO]=!1,["any","all","none"]);function ha(e,t){ma.reduce((function(n,r){return n[r]=(e[r]||[]).map((function(e){return t(e,r)})),n}),{})}var ga=function(e){var t=Object.assign({},e),n=(ha(t,(function(e,t){var n=void 0===e.result?-1:fa.indexOf(e.result);e.priority=-1!==n?n:oa.CANTTELL_PRIO,"none"===t&&(e.priority===oa.PASS_PRIO?e.priority=oa.FAIL_PRIO:e.priority===oa.FAIL_PRIO&&(e.priority=oa.PASS_PRIO))})),{all:t.all.reduce((function(e,t){return Math.max(e,t.priority)}),0),none:t.none.reduce((function(e,t){return Math.max(e,t.priority)}),0),any:t.any.reduce((function(e,t){return Math.min(e,t.priority)}),4)%4}),r=(t.priority=Math.max(n.all,n.none,n.any),[]);return ma.forEach((function(e){t[e]=t[e].filter((function(r){return r.priority===t.priority&&r.priority===n[e]})),t[e].forEach((function(e){return r.push(e.impact)}))})),[da,pa].includes(t.priority)?t.impact=ca(oa.impact,r):t.impact=null,ha(t,(function(e){delete e.result,delete e.priority})),t.result=oa.results[t.priority],delete t.priority,t};function va(e){var t=o._audit.rules.find((function(t){return t.id===e.id}));return t&&t.impact&&e.nodes.forEach((function(e){["any","all","none"].forEach((function(n){(e[n]||[]).forEach((function(e){e.impact=t.impact}))}))})),Object.assign(e,ba(e.nodes)),delete e.nodes,e}var ba=function(e){var t={},n=((e=e.map((function(e){if(e.any&&e.all&&e.none)return ga(e);if(Array.isArray(e.node))return va(e);throw new TypeError("Invalid Result type")})))&&e.length?(n=e.map((function(e){return e.result})),t.result=ca(oa.results,n,t.result)):t.result="inapplicable",oa.resultGroups.forEach((function(e){return t[e]=[]})),e.forEach((function(e){var n=oa.resultGroupMap[e.result];t[n].push(e)})),oa.FAIL_GROUP);return 0===t[n].length&&(n=oa.CANTTELL_GROUP),0<t[n].length?(e=t[n].map((function(e){return e.impact})),t.impact=ca(oa.impact,e)||null):t.impact=null,t};function ya(e,t,n){var r=Object.assign({},t);r.nodes=(r[n]||[]).concat(),oa.resultGroups.forEach((function(e){delete r[e]})),e[n].push(r)}var Da=function(e){var t={};return oa.resultGroups.forEach((function(e){return t[e]=[]})),e.forEach((function(e){e.error?ya(t,e,oa.CANTTELL_GROUP):e.result===oa.NA?ya(t,e,oa.NA_GROUP):oa.resultGroups.forEach((function(n){Array.isArray(e[n])&&0<e[n].length&&ya(t,e,n)}))})),t},wa=function e(n,r,a){var o=t.getComputedStyle(n,null);if(!o)return!1;for(var i=0;i<r.length;++i){var l=r[i];if(o.getPropertyValue(l.property)===l.value)return!0}return!(!n.parentNode||n.nodeName.toUpperCase()===a.toUpperCase())&&e(n.parentNode,r,a)},xa=function(e,t){if(!e)throw new Error(t)},Ea=function(e){return Array.prototype.slice.call(e)},Aa=function(e){for(var t,n=String(e),r=n.length,a=-1,o="",i=n.charCodeAt(0);++a<r;)0==(t=n.charCodeAt(a))?o+="\uFFFD":o+=1<=t&&t<=31||127==t||0==a&&48<=t&&t<=57||1==a&&48<=t&&t<=57&&45==i?"\\\\"+t.toString(16)+" ":0==a&&1==r&&45==t||!(128<=t||45==t||95==t||48<=t&&t<=57||65<=t&&t<=90||97<=t&&t<=122)?"\\\\"+n.charAt(a):n.charAt(a);return o};function Fa(e,t){return[e.substring(0,t),e.substring(t)]}function Ca(e){return e.replace(/\\s+$/,"")}var ka,Ra=function(){var e,t,n,r,a,o,i,l,u=0<arguments.length&&void 0!==arguments[0]?arguments[0]:"",s=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{};if(!(u.length<=1||"data:"===u.substr(0,5)||"javascript:"===u.substr(0,11)||u.includes("?")))return e=s.currentDomain,s=void 0===(s=s.maxLength)?25:s,i=o=l=a=r="",(n=u).includes("#")&&(u=(t=V(Fa(u,u.indexOf("#")),2))[0],i=t[1]),u.includes("?")&&(u=(t=V(Fa(u,u.indexOf("?")),2))[0],o=t[1]),u.includes("://")?(r=(t=V(u.split("://"),2))[0],a=(t=V(Fa(u=t[1],u.indexOf("/")),2))[0],u=t[1]):"//"===u.substr(0,2)&&(a=(t=V(Fa(u=u.substr(2),u.indexOf("/")),2))[0],u=t[1]),(a="www."===a.substr(0,4)?a.substr(4):a)&&a.includes(":")&&(a=(t=V(Fa(a,a.indexOf(":")),2))[0],l=t[1]),n=(t={original:n,protocol:r,domain:a,port:l,path:u,query:o,hash:i}).domain,r=t.hash,l=(a=t.path).substr(a.substr(0,a.length-2).lastIndexOf("/")+1),r?l&&(l+r).length<=s?Ca(l+r):l.length<2&&2<r.length&&r.length<=s?Ca(r):void 0:n&&n.length<s&&a.length<=1||a==="/"+l&&n&&e&&n!==e&&(n+a).length<=s?Ca(n+a):(-1===(u=l.lastIndexOf("."))||1<u)&&(-1!==u||2<l.length)&&l.length<=s&&!l.match(/index(\\.[a-zA-Z]{2-4})?/)&&!function(e){return 0!==(e=0<arguments.length&&void 0!==e?e:"").length&&(e.match(/[0-9]/g)||"").length>=e.length/2}(l)?Ca(l):void 0},Na=function(e){return(e.attributes instanceof t.NamedNodeMap?e:e.cloneNode(!1)).attributes},Ta=function(e,t){return!!e[ka=ka&&e[ka]?ka:(e=>{for(var t,n=["matches","matchesSelector","mozMatchesSelector","webkitMatchesSelector","msMatchesSelector"],r=n.length,a=0;a<r;a++)if(e[t=n[a]])return t})(e)]&&e[ka](t)},Sa={},_a=(ye=(ce(Sa,{ArrayFrom:function(){return sl.default},Colorjs:function(){return rl},CssSelectorParser:function(){return _a.CssSelectorParser},doT:function(){return Oa.default},emojiRegexText:function(){return Ma},memoize:function(){return Pa.default}}),de(ye())),De=de(De()),we=(de(we()),de(Dt())),Dt=de(jt()),jt=de(xn()),"hasOwn"in Object||(Object.hasOwn=we.default),"values"in Object||(Object.values=Dt.default),"Promise"in t||ye.default.polyfill(),"Uint32Array"in t||(t.Uint32Array=De.Uint32Array),t.Uint32Array&&("some"in t.Uint32Array.prototype||Object.defineProperty(t.Uint32Array.prototype,"some",{value:Array.prototype.some}),"reduce"in t.Uint32Array.prototype||Object.defineProperty(t.Uint32Array.prototype,"reduce",{value:Array.prototype.reduce})),"function"!=typeof Object.assign&&(Object.assign=function(e){if(null==e)throw new TypeError("Cannot convert undefined or null to object");for(var t=Object(e),n=1;n<arguments.length;n++){var r=arguments[n];if(null!=r)for(var a in r)r.hasOwnProperty(a)&&(t[a]=r[a])}return t}),Array.prototype.find||Object.defineProperty(Array.prototype,"find",{value:function(e){if(null===this)throw new TypeError("Array.prototype.find called on null or undefined");if("function"!=typeof e)throw new TypeError("predicate must be a function");for(var t,n=Object(this),r=n.length>>>0,a=arguments[1],o=0;o<r;o++)if(t=n[o],e.call(a,t,o,n))return t}}),Array.prototype.findIndex||Object.defineProperty(Array.prototype,"findIndex",{value:function(e,t){if(null===this)throw new TypeError("Array.prototype.find called on null or undefined");if("function"!=typeof e)throw new TypeError("predicate must be a function");for(var n,r=Object(this),a=r.length>>>0,o=0;o<a;o++)if(n=r[o],e.call(t,n,o,r))return o;return-1}}),Array.prototype.includes||Object.defineProperty(Array.prototype,"includes",{value:function(e){var t=Object(this),n=parseInt(t.length,10)||0;if(0!==n){var r,a,o=parseInt(arguments[1],10)||0;for(0<=o?r=o:(r=n+o)<0&&(r=0);r<n;){if(e===(a=t[r])||e!=e&&a!=a)return!0;r++}}return!1}}),Array.prototype.some||Object.defineProperty(Array.prototype,"some",{value:function(e){if(null==this)throw new TypeError("Array.prototype.some called on null or undefined");if("function"!=typeof e)throw new TypeError;for(var t=Object(this),n=t.length>>>0,r=2<=arguments.length?arguments[1]:void 0,a=0;a<n;a++)if(a in t&&e.call(r,t[a],a,t))return!0;return!1}}),Array.from||(Array.from=jt.default),String.prototype.includes||(String.prototype.includes=function(e,t){return!((t="number"!=typeof t?0:t)+e.length>this.length)&&-1!==this.indexOf(e,t)}),Array.prototype.flat||Object.defineProperty(Array.prototype,"flat",{configurable:!0,value:function e(){var t=isNaN(arguments[0])?1:Number(arguments[0]);return t?Array.prototype.reduce.call(this,(function(n,r){return Array.isArray(r)?n.push.apply(n,e.call(r,t-1)):n.push(r),n}),[]):Array.prototype.slice.call(this)},writable:!0}),!t.Node||"isConnected"in t.Node.prototype||Object.defineProperty(t.Node.prototype,"isConnected",{get:function(){return!(this.ownerDocument&&this.ownerDocument.compareDocumentPosition(this)&this.DOCUMENT_POSITION_DISCONNECTED)}}),de(Cn())),Oa=de(kn()),Ma=function(){return/[#*0-9]\\uFE0F?\\u20E3|[\\xA9\\xAE\\u203C\\u2049\\u2122\\u2139\\u2194-\\u2199\\u21A9\\u21AA\\u231A\\u231B\\u2328\\u23CF\\u23ED-\\u23EF\\u23F1\\u23F2\\u23F8-\\u23FA\\u24C2\\u25AA\\u25AB\\u25B6\\u25C0\\u25FB\\u25FC\\u25FE\\u2600-\\u2604\\u260E\\u2611\\u2614\\u2615\\u2618\\u2620\\u2622\\u2623\\u2626\\u262A\\u262E\\u262F\\u2638-\\u263A\\u2640\\u2642\\u2648-\\u2653\\u265F\\u2660\\u2663\\u2665\\u2666\\u2668\\u267B\\u267E\\u267F\\u2692\\u2694-\\u2697\\u2699\\u269B\\u269C\\u26A0\\u26A7\\u26AA\\u26B0\\u26B1\\u26BD\\u26BE\\u26C4\\u26C8\\u26CF\\u26D1\\u26E9\\u26F0-\\u26F5\\u26F7\\u26F8\\u26FA\\u2702\\u2708\\u2709\\u270F\\u2712\\u2714\\u2716\\u271D\\u2721\\u2733\\u2734\\u2744\\u2747\\u2757\\u2763\\u27A1\\u2934\\u2935\\u2B05-\\u2B07\\u2B1B\\u2B1C\\u2B55\\u3030\\u303D\\u3297\\u3299]\\uFE0F?|[\\u261D\\u270C\\u270D](?:\\uD83C[\\uDFFB-\\uDFFF]|\\uFE0F)?|[\\u270A\\u270B](?:\\uD83C[\\uDFFB-\\uDFFF])?|[\\u23E9-\\u23EC\\u23F0\\u23F3\\u25FD\\u2693\\u26A1\\u26AB\\u26C5\\u26CE\\u26D4\\u26EA\\u26FD\\u2705\\u2728\\u274C\\u274E\\u2753-\\u2755\\u2795-\\u2797\\u27B0\\u27BF\\u2B50]|\\u26D3\\uFE0F?(?:\\u200D\\uD83D\\uDCA5)?|\\u26F9(?:\\uD83C[\\uDFFB-\\uDFFF]|\\uFE0F)?(?:\\u200D[\\u2640\\u2642]\\uFE0F?)?|\\u2764\\uFE0F?(?:\\u200D(?:\\uD83D\\uDD25|\\uD83E\\uDE79))?|\\uD83C(?:[\\uDC04\\uDD70\\uDD71\\uDD7E\\uDD7F\\uDE02\\uDE37\\uDF21\\uDF24-\\uDF2C\\uDF36\\uDF7D\\uDF96\\uDF97\\uDF99-\\uDF9B\\uDF9E\\uDF9F\\uDFCD\\uDFCE\\uDFD4-\\uDFDF\\uDFF5\\uDFF7]\\uFE0F?|[\\uDF85\\uDFC2\\uDFC7](?:\\uD83C[\\uDFFB-\\uDFFF])?|[\\uDFC4\\uDFCA](?:\\uD83C[\\uDFFB-\\uDFFF])?(?:\\u200D[\\u2640\\u2642]\\uFE0F?)?|[\\uDFCB\\uDFCC](?:\\uD83C[\\uDFFB-\\uDFFF]|\\uFE0F)?(?:\\u200D[\\u2640\\u2642]\\uFE0F?)?|[\\uDCCF\\uDD8E\\uDD91-\\uDD9A\\uDE01\\uDE1A\\uDE2F\\uDE32-\\uDE36\\uDE38-\\uDE3A\\uDE50\\uDE51\\uDF00-\\uDF20\\uDF2D-\\uDF35\\uDF37-\\uDF43\\uDF45-\\uDF4A\\uDF4C-\\uDF7C\\uDF7E-\\uDF84\\uDF86-\\uDF93\\uDFA0-\\uDFC1\\uDFC5\\uDFC6\\uDFC8\\uDFC9\\uDFCF-\\uDFD3\\uDFE0-\\uDFF0\\uDFF8-\\uDFFF]|\\uDDE6\\uD83C[\\uDDE8-\\uDDEC\\uDDEE\\uDDF1\\uDDF2\\uDDF4\\uDDF6-\\uDDFA\\uDDFC\\uDDFD\\uDDFF]|\\uDDE7\\uD83C[\\uDDE6\\uDDE7\\uDDE9-\\uDDEF\\uDDF1-\\uDDF4\\uDDF6-\\uDDF9\\uDDFB\\uDDFC\\uDDFE\\uDDFF]|\\uDDE8\\uD83C[\\uDDE6\\uDDE8\\uDDE9\\uDDEB-\\uDDEE\\uDDF0-\\uDDF7\\uDDFA-\\uDDFF]|\\uDDE9\\uD83C[\\uDDEA\\uDDEC\\uDDEF\\uDDF0\\uDDF2\\uDDF4\\uDDFF]|\\uDDEA\\uD83C[\\uDDE6\\uDDE8\\uDDEA\\uDDEC\\uDDED\\uDDF7-\\uDDFA]|\\uDDEB\\uD83C[\\uDDEE-\\uDDF0\\uDDF2\\uDDF4\\uDDF7]|\\uDDEC\\uD83C[\\uDDE6\\uDDE7\\uDDE9-\\uDDEE\\uDDF1-\\uDDF3\\uDDF5-\\uDDFA\\uDDFC\\uDDFE]|\\uDDED\\uD83C[\\uDDF0\\uDDF2\\uDDF3\\uDDF7\\uDDF9\\uDDFA]|\\uDDEE\\uD83C[\\uDDE8-\\uDDEA\\uDDF1-\\uDDF4\\uDDF6-\\uDDF9]|\\uDDEF\\uD83C[\\uDDEA\\uDDF2\\uDDF4\\uDDF5]|\\uDDF0\\uD83C[\\uDDEA\\uDDEC-\\uDDEE\\uDDF2\\uDDF3\\uDDF5\\uDDF7\\uDDFC\\uDDFE\\uDDFF]|\\uDDF1\\uD83C[\\uDDE6-\\uDDE8\\uDDEE\\uDDF0\\uDDF7-\\uDDFB\\uDDFE]|\\uDDF2\\uD83C[\\uDDE6\\uDDE8-\\uDDED\\uDDF0-\\uDDFF]|\\uDDF3\\uD83C[\\uDDE6\\uDDE8\\uDDEA-\\uDDEC\\uDDEE\\uDDF1\\uDDF4\\uDDF5\\uDDF7\\uDDFA\\uDDFF]|\\uDDF4\\uD83C\\uDDF2|\\uDDF5\\uD83C[\\uDDE6\\uDDEA-\\uDDED\\uDDF0-\\uDDF3\\uDDF7-\\uDDF9\\uDDFC\\uDDFE]|\\uDDF6\\uD83C\\uDDE6|\\uDDF7\\uD83C[\\uDDEA\\uDDF4\\uDDF8\\uDDFA\\uDDFC]|\\uDDF8\\uD83C[\\uDDE6-\\uDDEA\\uDDEC-\\uDDF4\\uDDF7-\\uDDF9\\uDDFB\\uDDFD-\\uDDFF]|\\uDDF9\\uD83C[\\uDDE6\\uDDE8\\uDDE9\\uDDEB-\\uDDED\\uDDEF-\\uDDF4\\uDDF7\\uDDF9\\uDDFB\\uDDFC\\uDDFF]|\\uDDFA\\uD83C[\\uDDE6\\uDDEC\\uDDF2\\uDDF3\\uDDF8\\uDDFE\\uDDFF]|\\uDDFB\\uD83C[\\uDDE6\\uDDE8\\uDDEA\\uDDEC\\uDDEE\\uDDF3\\uDDFA]|\\uDDFC\\uD83C[\\uDDEB\\uDDF8]|\\uDDFD\\uD83C\\uDDF0|\\uDDFE\\uD83C[\\uDDEA\\uDDF9]|\\uDDFF\\uD83C[\\uDDE6\\uDDF2\\uDDFC]|\\uDF44(?:\\u200D\\uD83D\\uDFEB)?|\\uDF4B(?:\\u200D\\uD83D\\uDFE9)?|\\uDFC3(?:\\uD83C[\\uDFFB-\\uDFFF])?(?:\\u200D(?:[\\u2640\\u2642]\\uFE0F?(?:\\u200D\\u27A1\\uFE0F?)?|\\u27A1\\uFE0F?))?|\\uDFF3\\uFE0F?(?:\\u200D(?:\\u26A7\\uFE0F?|\\uD83C\\uDF08))?|\\uDFF4(?:\\u200D\\u2620\\uFE0F?|\\uDB40\\uDC67\\uDB40\\uDC62\\uDB40(?:\\uDC65\\uDB40\\uDC6E\\uDB40\\uDC67|\\uDC73\\uDB40\\uDC63\\uDB40\\uDC74|\\uDC77\\uDB40\\uDC6C\\uDB40\\uDC73)\\uDB40\\uDC7F)?)|\\uD83D(?:[\\uDC3F\\uDCFD\\uDD49\\uDD4A\\uDD6F\\uDD70\\uDD73\\uDD76-\\uDD79\\uDD87\\uDD8A-\\uDD8D\\uDDA5\\uDDA8\\uDDB1\\uDDB2\\uDDBC\\uDDC2-\\uDDC4\\uDDD1-\\uDDD3\\uDDDC-\\uDDDE\\uDDE1\\uDDE3\\uDDE8\\uDDEF\\uDDF3\\uDDFA\\uDECB\\uDECD-\\uDECF\\uDEE0-\\uDEE5\\uDEE9\\uDEF0\\uDEF3]\\uFE0F?|[\\uDC42\\uDC43\\uDC46-\\uDC50\\uDC66\\uDC67\\uDC6B-\\uDC6D\\uDC72\\uDC74-\\uDC76\\uDC78\\uDC7C\\uDC83\\uDC85\\uDC8F\\uDC91\\uDCAA\\uDD7A\\uDD95\\uDD96\\uDE4C\\uDE4F\\uDEC0\\uDECC](?:\\uD83C[\\uDFFB-\\uDFFF])?|[\\uDC6E-\\uDC71\\uDC73\\uDC77\\uDC81\\uDC82\\uDC86\\uDC87\\uDE45-\\uDE47\\uDE4B\\uDE4D\\uDE4E\\uDEA3\\uDEB4\\uDEB5](?:\\uD83C[\\uDFFB-\\uDFFF])?(?:\\u200D[\\u2640\\u2642]\\uFE0F?)?|[\\uDD74\\uDD90](?:\\uD83C[\\uDFFB-\\uDFFF]|\\uFE0F)?|[\\uDC00-\\uDC07\\uDC09-\\uDC14\\uDC16-\\uDC25\\uDC27-\\uDC3A\\uDC3C-\\uDC3E\\uDC40\\uDC44\\uDC45\\uDC51-\\uDC65\\uDC6A\\uDC79-\\uDC7B\\uDC7D-\\uDC80\\uDC84\\uDC88-\\uDC8E\\uDC90\\uDC92-\\uDCA9\\uDCAB-\\uDCFC\\uDCFF-\\uDD3D\\uDD4B-\\uDD4E\\uDD50-\\uDD67\\uDDA4\\uDDFB-\\uDE2D\\uDE2F-\\uDE34\\uDE37-\\uDE41\\uDE43\\uDE44\\uDE48-\\uDE4A\\uDE80-\\uDEA2\\uDEA4-\\uDEB3\\uDEB7-\\uDEBF\\uDEC1-\\uDEC5\\uDED0-\\uDED2\\uDED5-\\uDED8\\uDEDC-\\uDEDF\\uDEEB\\uDEEC\\uDEF4-\\uDEFC\\uDFE0-\\uDFEB\\uDFF0]|\\uDC08(?:\\u200D\\u2B1B)?|\\uDC15(?:\\u200D\\uD83E\\uDDBA)?|\\uDC26(?:\\u200D(?:\\u2B1B|\\uD83D\\uDD25))?|\\uDC3B(?:\\u200D\\u2744\\uFE0F?)?|\\uDC41\\uFE0F?(?:\\u200D\\uD83D\\uDDE8\\uFE0F?)?|\\uDC68(?:\\u200D(?:[\\u2695\\u2696\\u2708]\\uFE0F?|\\u2764\\uFE0F?\\u200D\\uD83D(?:\\uDC8B\\u200D\\uD83D)?\\uDC68|\\uD83C[\\uDF3E\\uDF73\\uDF7C\\uDF93\\uDFA4\\uDFA8\\uDFEB\\uDFED]|\\uD83D(?:[\\uDC68\\uDC69]\\u200D\\uD83D(?:\\uDC66(?:\\u200D\\uD83D\\uDC66)?|\\uDC67(?:\\u200D\\uD83D[\\uDC66\\uDC67])?)|[\\uDCBB\\uDCBC\\uDD27\\uDD2C\\uDE80\\uDE92]|\\uDC66(?:\\u200D\\uD83D\\uDC66)?|\\uDC67(?:\\u200D\\uD83D[\\uDC66\\uDC67])?)|\\uD83E(?:[\\uDDAF\\uDDBC\\uDDBD](?:\\u200D\\u27A1\\uFE0F?)?|[\\uDDB0-\\uDDB3]))|\\uD83C(?:\\uDFFB(?:\\u200D(?:[\\u2695\\u2696\\u2708]\\uFE0F?|\\u2764\\uFE0F?\\u200D\\uD83D(?:\\uDC8B\\u200D\\uD83D)?\\uDC68\\uD83C[\\uDFFB-\\uDFFF]|\\uD83C[\\uDF3E\\uDF73\\uDF7C\\uDF93\\uDFA4\\uDFA8\\uDFEB\\uDFED]|\\uD83D(?:[\\uDCBB\\uDCBC\\uDD27\\uDD2C\\uDE80\\uDE92]|\\uDC30\\u200D\\uD83D\\uDC68\\uD83C[\\uDFFC-\\uDFFF])|\\uD83E(?:[\\uDD1D\\uDEEF]\\u200D\\uD83D\\uDC68\\uD83C[\\uDFFC-\\uDFFF]|[\\uDDAF\\uDDBC\\uDDBD](?:\\u200D\\u27A1\\uFE0F?)?|[\\uDDB0-\\uDDB3])))?|\\uDFFC(?:\\u200D(?:[\\u2695\\u2696\\u2708]\\uFE0F?|\\u2764\\uFE0F?\\u200D\\uD83D(?:\\uDC8B\\u200D\\uD83D)?\\uDC68\\uD83C[\\uDFFB-\\uDFFF]|\\uD83C[\\uDF3E\\uDF73\\uDF7C\\uDF93\\uDFA4\\uDFA8\\uDFEB\\uDFED]|\\uD83D(?:[\\uDCBB\\uDCBC\\uDD27\\uDD2C\\uDE80\\uDE92]|\\uDC30\\u200D\\uD83D\\uDC68\\uD83C[\\uDFFB\\uDFFD-\\uDFFF])|\\uD83E(?:[\\uDD1D\\uDEEF]\\u200D\\uD83D\\uDC68\\uD83C[\\uDFFB\\uDFFD-\\uDFFF]|[\\uDDAF\\uDDBC\\uDDBD](?:\\u200D\\u27A1\\uFE0F?)?|[\\uDDB0-\\uDDB3])))?|\\uDFFD(?:\\u200D(?:[\\u2695\\u2696\\u2708]\\uFE0F?|\\u2764\\uFE0F?\\u200D\\uD83D(?:\\uDC8B\\u200D\\uD83D)?\\uDC68\\uD83C[\\uDFFB-\\uDFFF]|\\uD83C[\\uDF3E\\uDF73\\uDF7C\\uDF93\\uDFA4\\uDFA8\\uDFEB\\uDFED]|\\uD83D(?:[\\uDCBB\\uDCBC\\uDD27\\uDD2C\\uDE80\\uDE92]|\\uDC30\\u200D\\uD83D\\uDC68\\uD83C[\\uDFFB\\uDFFC\\uDFFE\\uDFFF])|\\uD83E(?:[\\uDD1D\\uDEEF]\\u200D\\uD83D\\uDC68\\uD83C[\\uDFFB\\uDFFC\\uDFFE\\uDFFF]|[\\uDDAF\\uDDBC\\uDDBD](?:\\u200D\\u27A1\\uFE0F?)?|[\\uDDB0-\\uDDB3])))?|\\uDFFE(?:\\u200D(?:[\\u2695\\u2696\\u2708]\\uFE0F?|\\u2764\\uFE0F?\\u200D\\uD83D(?:\\uDC8B\\u200D\\uD83D)?\\uDC68\\uD83C[\\uDFFB-\\uDFFF]|\\uD83C[\\uDF3E\\uDF73\\uDF7C\\uDF93\\uDFA4\\uDFA8\\uDFEB\\uDFED]|\\uD83D(?:[\\uDCBB\\uDCBC\\uDD27\\uDD2C\\uDE80\\uDE92]|\\uDC30\\u200D\\uD83D\\uDC68\\uD83C[\\uDFFB-\\uDFFD\\uDFFF])|\\uD83E(?:[\\uDD1D\\uDEEF]\\u200D\\uD83D\\uDC68\\uD83C[\\uDFFB-\\uDFFD\\uDFFF]|[\\uDDAF\\uDDBC\\uDDBD](?:\\u200D\\u27A1\\uFE0F?)?|[\\uDDB0-\\uDDB3])))?|\\uDFFF(?:\\u200D(?:[\\u2695\\u2696\\u2708]\\uFE0F?|\\u2764\\uFE0F?\\u200D\\uD83D(?:\\uDC8B\\u200D\\uD83D)?\\uDC68\\uD83C[\\uDFFB-\\uDFFF]|\\uD83C[\\uDF3E\\uDF73\\uDF7C\\uDF93\\uDFA4\\uDFA8\\uDFEB\\uDFED]|\\uD83D(?:[\\uDCBB\\uDCBC\\uDD27\\uDD2C\\uDE80\\uDE92]|\\uDC30\\u200D\\uD83D\\uDC68\\uD83C[\\uDFFB-\\uDFFE])|\\uD83E(?:[\\uDD1D\\uDEEF]\\u200D\\uD83D\\uDC68\\uD83C[\\uDFFB-\\uDFFE]|[\\uDDAF\\uDDBC\\uDDBD](?:\\u200D\\u27A1\\uFE0F?)?|[\\uDDB0-\\uDDB3])))?))?|\\uDC69(?:\\u200D(?:[\\u2695\\u2696\\u2708]\\uFE0F?|\\u2764\\uFE0F?\\u200D\\uD83D(?:\\uDC8B\\u200D\\uD83D)?[\\uDC68\\uDC69]|\\uD83C[\\uDF3E\\uDF73\\uDF7C\\uDF93\\uDFA4\\uDFA8\\uDFEB\\uDFED]|\\uD83D(?:[\\uDCBB\\uDCBC\\uDD27\\uDD2C\\uDE80\\uDE92]|\\uDC66(?:\\u200D\\uD83D\\uDC66)?|\\uDC67(?:\\u200D\\uD83D[\\uDC66\\uDC67])?|\\uDC69\\u200D\\uD83D(?:\\uDC66(?:\\u200D\\uD83D\\uDC66)?|\\uDC67(?:\\u200D\\uD83D[\\uDC66\\uDC67])?))|\\uD83E(?:[\\uDDAF\\uDDBC\\uDDBD](?:\\u200D\\u27A1\\uFE0F?)?|[\\uDDB0-\\uDDB3]))|\\uD83C(?:\\uDFFB(?:\\u200D(?:[\\u2695\\u2696\\u2708]\\uFE0F?|\\u2764\\uFE0F?\\u200D\\uD83D(?:[\\uDC68\\uDC69]|\\uDC8B\\u200D\\uD83D[\\uDC68\\uDC69])\\uD83C[\\uDFFB-\\uDFFF]|\\uD83C[\\uDF3E\\uDF73\\uDF7C\\uDF93\\uDFA4\\uDFA8\\uDFEB\\uDFED]|\\uD83D(?:[\\uDCBB\\uDCBC\\uDD27\\uDD2C\\uDE80\\uDE92]|\\uDC30\\u200D\\uD83D\\uDC69\\uD83C[\\uDFFC-\\uDFFF])|\\uD83E(?:[\\uDDAF\\uDDBC\\uDDBD](?:\\u200D\\u27A1\\uFE0F?)?|[\\uDDB0-\\uDDB3]|\\uDD1D\\u200D\\uD83D[\\uDC68\\uDC69]\\uD83C[\\uDFFC-\\uDFFF]|\\uDEEF\\u200D\\uD83D\\uDC69\\uD83C[\\uDFFC-\\uDFFF])))?|\\uDFFC(?:\\u200D(?:[\\u2695\\u2696\\u2708]\\uFE0F?|\\u2764\\uFE0F?\\u200D\\uD83D(?:[\\uDC68\\uDC69]|\\uDC8B\\u200D\\uD83D[\\uDC68\\uDC69])\\uD83C[\\uDFFB-\\uDFFF]|\\uD83C[\\uDF3E\\uDF73\\uDF7C\\uDF93\\uDFA4\\uDFA8\\uDFEB\\uDFED]|\\uD83D(?:[\\uDCBB\\uDCBC\\uDD27\\uDD2C\\uDE80\\uDE92]|\\uDC30\\u200D\\uD83D\\uDC69\\uD83C[\\uDFFB\\uDFFD-\\uDFFF])|\\uD83E(?:[\\uDDAF\\uDDBC\\uDDBD](?:\\u200D\\u27A1\\uFE0F?)?|[\\uDDB0-\\uDDB3]|\\uDD1D\\u200D\\uD83D[\\uDC68\\uDC69]\\uD83C[\\uDFFB\\uDFFD-\\uDFFF]|\\uDEEF\\u200D\\uD83D\\uDC69\\uD83C[\\uDFFB\\uDFFD-\\uDFFF])))?|\\uDFFD(?:\\u200D(?:[\\u2695\\u2696\\u2708]\\uFE0F?|\\u2764\\uFE0F?\\u200D\\uD83D(?:[\\uDC68\\uDC69]|\\uDC8B\\u200D\\uD83D[\\uDC68\\uDC69])\\uD83C[\\uDFFB-\\uDFFF]|\\uD83C[\\uDF3E\\uDF73\\uDF7C\\uDF93\\uDFA4\\uDFA8\\uDFEB\\uDFED]|\\uD83D(?:[\\uDCBB\\uDCBC\\uDD27\\uDD2C\\uDE80\\uDE92]|\\uDC30\\u200D\\uD83D\\uDC69\\uD83C[\\uDFFB\\uDFFC\\uDFFE\\uDFFF])|\\uD83E(?:[\\uDDAF\\uDDBC\\uDDBD](?:\\u200D\\u27A1\\uFE0F?)?|[\\uDDB0-\\uDDB3]|\\uDD1D\\u200D\\uD83D[\\uDC68\\uDC69]\\uD83C[\\uDFFB\\uDFFC\\uDFFE\\uDFFF]|\\uDEEF\\u200D\\uD83D\\uDC69\\uD83C[\\uDFFB\\uDFFC\\uDFFE\\uDFFF])))?|\\uDFFE(?:\\u200D(?:[\\u2695\\u2696\\u2708]\\uFE0F?|\\u2764\\uFE0F?\\u200D\\uD83D(?:[\\uDC68\\uDC69]|\\uDC8B\\u200D\\uD83D[\\uDC68\\uDC69])\\uD83C[\\uDFFB-\\uDFFF]|\\uD83C[\\uDF3E\\uDF73\\uDF7C\\uDF93\\uDFA4\\uDFA8\\uDFEB\\uDFED]|\\uD83D(?:[\\uDCBB\\uDCBC\\uDD27\\uDD2C\\uDE80\\uDE92]|\\uDC30\\u200D\\uD83D\\uDC69\\uD83C[\\uDFFB-\\uDFFD\\uDFFF])|\\uD83E(?:[\\uDDAF\\uDDBC\\uDDBD](?:\\u200D\\u27A1\\uFE0F?)?|[\\uDDB0-\\uDDB3]|\\uDD1D\\u200D\\uD83D[\\uDC68\\uDC69]\\uD83C[\\uDFFB-\\uDFFD\\uDFFF]|\\uDEEF\\u200D\\uD83D\\uDC69\\uD83C[\\uDFFB-\\uDFFD\\uDFFF])))?|\\uDFFF(?:\\u200D(?:[\\u2695\\u2696\\u2708]\\uFE0F?|\\u2764\\uFE0F?\\u200D\\uD83D(?:[\\uDC68\\uDC69]|\\uDC8B\\u200D\\uD83D[\\uDC68\\uDC69])\\uD83C[\\uDFFB-\\uDFFF]|\\uD83C[\\uDF3E\\uDF73\\uDF7C\\uDF93\\uDFA4\\uDFA8\\uDFEB\\uDFED]|\\uD83D(?:[\\uDCBB\\uDCBC\\uDD27\\uDD2C\\uDE80\\uDE92]|\\uDC30\\u200D\\uD83D\\uDC69\\uD83C[\\uDFFB-\\uDFFE])|\\uD83E(?:[\\uDDAF\\uDDBC\\uDDBD](?:\\u200D\\u27A1\\uFE0F?)?|[\\uDDB0-\\uDDB3]|\\uDD1D\\u200D\\uD83D[\\uDC68\\uDC69]\\uD83C[\\uDFFB-\\uDFFE]|\\uDEEF\\u200D\\uD83D\\uDC69\\uD83C[\\uDFFB-\\uDFFE])))?))?|\\uDD75(?:\\uD83C[\\uDFFB-\\uDFFF]|\\uFE0F)?(?:\\u200D[\\u2640\\u2642]\\uFE0F?)?|\\uDE2E(?:\\u200D\\uD83D\\uDCA8)?|\\uDE35(?:\\u200D\\uD83D\\uDCAB)?|\\uDE36(?:\\u200D\\uD83C\\uDF2B\\uFE0F?)?|\\uDE42(?:\\u200D[\\u2194\\u2195]\\uFE0F?)?|\\uDEB6(?:\\uD83C[\\uDFFB-\\uDFFF])?(?:\\u200D(?:[\\u2640\\u2642]\\uFE0F?(?:\\u200D\\u27A1\\uFE0F?)?|\\u27A1\\uFE0F?))?)|\\uD83E(?:[\\uDD0C\\uDD0F\\uDD18-\\uDD1F\\uDD30-\\uDD34\\uDD36\\uDD77\\uDDB5\\uDDB6\\uDDBB\\uDDD2\\uDDD3\\uDDD5\\uDEC3-\\uDEC5\\uDEF0\\uDEF2-\\uDEF8](?:\\uD83C[\\uDFFB-\\uDFFF])?|[\\uDD26\\uDD35\\uDD37-\\uDD39\\uDD3C-\\uDD3E\\uDDB8\\uDDB9\\uDDCD\\uDDCF\\uDDD4\\uDDD6-\\uDDDD](?:\\uD83C[\\uDFFB-\\uDFFF])?(?:\\u200D[\\u2640\\u2642]\\uFE0F?)?|[\\uDDDE\\uDDDF](?:\\u200D[\\u2640\\u2642]\\uFE0F?)?|[\\uDD0D\\uDD0E\\uDD10-\\uDD17\\uDD20-\\uDD25\\uDD27-\\uDD2F\\uDD3A\\uDD3F-\\uDD45\\uDD47-\\uDD76\\uDD78-\\uDDB4\\uDDB7\\uDDBA\\uDDBC-\\uDDCC\\uDDD0\\uDDE0-\\uDDFF\\uDE70-\\uDE7C\\uDE80-\\uDE8A\\uDE8E-\\uDEC2\\uDEC6\\uDEC8\\uDECD-\\uDEDC\\uDEDF-\\uDEEA\\uDEEF]|\\uDDCE(?:\\uD83C[\\uDFFB-\\uDFFF])?(?:\\u200D(?:[\\u2640\\u2642]\\uFE0F?(?:\\u200D\\u27A1\\uFE0F?)?|\\u27A1\\uFE0F?))?|\\uDDD1(?:\\u200D(?:[\\u2695\\u2696\\u2708]\\uFE0F?|\\uD83C[\\uDF3E\\uDF73\\uDF7C\\uDF84\\uDF93\\uDFA4\\uDFA8\\uDFEB\\uDFED]|\\uD83D[\\uDCBB\\uDCBC\\uDD27\\uDD2C\\uDE80\\uDE92]|\\uD83E(?:[\\uDDAF\\uDDBC\\uDDBD](?:\\u200D\\u27A1\\uFE0F?)?|[\\uDDB0-\\uDDB3\\uDE70]|\\uDD1D\\u200D\\uD83E\\uDDD1|\\uDDD1\\u200D\\uD83E\\uDDD2(?:\\u200D\\uD83E\\uDDD2)?|\\uDDD2(?:\\u200D\\uD83E\\uDDD2)?))|\\uD83C(?:\\uDFFB(?:\\u200D(?:[\\u2695\\u2696\\u2708]\\uFE0F?|\\u2764\\uFE0F?\\u200D(?:\\uD83D\\uDC8B\\u200D)?\\uD83E\\uDDD1\\uD83C[\\uDFFC-\\uDFFF]|\\uD83C[\\uDF3E\\uDF73\\uDF7C\\uDF84\\uDF93\\uDFA4\\uDFA8\\uDFEB\\uDFED]|\\uD83D(?:[\\uDCBB\\uDCBC\\uDD27\\uDD2C\\uDE80\\uDE92]|\\uDC30\\u200D\\uD83E\\uDDD1\\uD83C[\\uDFFC-\\uDFFF])|\\uD83E(?:[\\uDDAF\\uDDBC\\uDDBD](?:\\u200D\\u27A1\\uFE0F?)?|[\\uDDB0-\\uDDB3\\uDE70]|\\uDD1D\\u200D\\uD83E\\uDDD1\\uD83C[\\uDFFB-\\uDFFF]|\\uDEEF\\u200D\\uD83E\\uDDD1\\uD83C[\\uDFFC-\\uDFFF])))?|\\uDFFC(?:\\u200D(?:[\\u2695\\u2696\\u2708]\\uFE0F?|\\u2764\\uFE0F?\\u200D(?:\\uD83D\\uDC8B\\u200D)?\\uD83E\\uDDD1\\uD83C[\\uDFFB\\uDFFD-\\uDFFF]|\\uD83C[\\uDF3E\\uDF73\\uDF7C\\uDF84\\uDF93\\uDFA4\\uDFA8\\uDFEB\\uDFED]|\\uD83D(?:[\\uDCBB\\uDCBC\\uDD27\\uDD2C\\uDE80\\uDE92]|\\uDC30\\u200D\\uD83E\\uDDD1\\uD83C[\\uDFFB\\uDFFD-\\uDFFF])|\\uD83E(?:[\\uDDAF\\uDDBC\\uDDBD](?:\\u200D\\u27A1\\uFE0F?)?|[\\uDDB0-\\uDDB3\\uDE70]|\\uDD1D\\u200D\\uD83E\\uDDD1\\uD83C[\\uDFFB-\\uDFFF]|\\uDEEF\\u200D\\uD83E\\uDDD1\\uD83C[\\uDFFB\\uDFFD-\\uDFFF])))?|\\uDFFD(?:\\u200D(?:[\\u2695\\u2696\\u2708]\\uFE0F?|\\u2764\\uFE0F?\\u200D(?:\\uD83D\\uDC8B\\u200D)?\\uD83E\\uDDD1\\uD83C[\\uDFFB\\uDFFC\\uDFFE\\uDFFF]|\\uD83C[\\uDF3E\\uDF73\\uDF7C\\uDF84\\uDF93\\uDFA4\\uDFA8\\uDFEB\\uDFED]|\\uD83D(?:[\\uDCBB\\uDCBC\\uDD27\\uDD2C\\uDE80\\uDE92]|\\uDC30\\u200D\\uD83E\\uDDD1\\uD83C[\\uDFFB\\uDFFC\\uDFFE\\uDFFF])|\\uD83E(?:[\\uDDAF\\uDDBC\\uDDBD](?:\\u200D\\u27A1\\uFE0F?)?|[\\uDDB0-\\uDDB3\\uDE70]|\\uDD1D\\u200D\\uD83E\\uDDD1\\uD83C[\\uDFFB-\\uDFFF]|\\uDEEF\\u200D\\uD83E\\uDDD1\\uD83C[\\uDFFB\\uDFFC\\uDFFE\\uDFFF])))?|\\uDFFE(?:\\u200D(?:[\\u2695\\u2696\\u2708]\\uFE0F?|\\u2764\\uFE0F?\\u200D(?:\\uD83D\\uDC8B\\u200D)?\\uD83E\\uDDD1\\uD83C[\\uDFFB-\\uDFFD\\uDFFF]|\\uD83C[\\uDF3E\\uDF73\\uDF7C\\uDF84\\uDF93\\uDFA4\\uDFA8\\uDFEB\\uDFED]|\\uD83D(?:[\\uDCBB\\uDCBC\\uDD27\\uDD2C\\uDE80\\uDE92]|\\uDC30\\u200D\\uD83E\\uDDD1\\uD83C[\\uDFFB-\\uDFFD\\uDFFF])|\\uD83E(?:[\\uDDAF\\uDDBC\\uDDBD](?:\\u200D\\u27A1\\uFE0F?)?|[\\uDDB0-\\uDDB3\\uDE70]|\\uDD1D\\u200D\\uD83E\\uDDD1\\uD83C[\\uDFFB-\\uDFFF]|\\uDEEF\\u200D\\uD83E\\uDDD1\\uD83C[\\uDFFB-\\uDFFD\\uDFFF])))?|\\uDFFF(?:\\u200D(?:[\\u2695\\u2696\\u2708]\\uFE0F?|\\u2764\\uFE0F?\\u200D(?:\\uD83D\\uDC8B\\u200D)?\\uD83E\\uDDD1\\uD83C[\\uDFFB-\\uDFFE]|\\uD83C[\\uDF3E\\uDF73\\uDF7C\\uDF84\\uDF93\\uDFA4\\uDFA8\\uDFEB\\uDFED]|\\uD83D(?:[\\uDCBB\\uDCBC\\uDD27\\uDD2C\\uDE80\\uDE92]|\\uDC30\\u200D\\uD83E\\uDDD1\\uD83C[\\uDFFB-\\uDFFE])|\\uD83E(?:[\\uDDAF\\uDDBC\\uDDBD](?:\\u200D\\u27A1\\uFE0F?)?|[\\uDDB0-\\uDDB3\\uDE70]|\\uDD1D\\u200D\\uD83E\\uDDD1\\uD83C[\\uDFFB-\\uDFFF]|\\uDEEF\\u200D\\uD83E\\uDDD1\\uD83C[\\uDFFB-\\uDFFE])))?))?|\\uDEF1(?:\\uD83C(?:\\uDFFB(?:\\u200D\\uD83E\\uDEF2\\uD83C[\\uDFFC-\\uDFFF])?|\\uDFFC(?:\\u200D\\uD83E\\uDEF2\\uD83C[\\uDFFB\\uDFFD-\\uDFFF])?|\\uDFFD(?:\\u200D\\uD83E\\uDEF2\\uD83C[\\uDFFB\\uDFFC\\uDFFE\\uDFFF])?|\\uDFFE(?:\\u200D\\uD83E\\uDEF2\\uD83C[\\uDFFB-\\uDFFD\\uDFFF])?|\\uDFFF(?:\\u200D\\uD83E\\uDEF2\\uD83C[\\uDFFB-\\uDFFE])?))?)/g},Pa=de(ra());function Ia(e,t){var n=e.length,r=(Array.isArray(e[0])||(e=[e]),(t=Array.isArray(t[0])?t:t.map((function(e){return[e]})))[0].length),a=t[0].map((function(e,n){return t.map((function(e){return e[n]}))}));e=e.map((function(e){return a.map((function(t){var n=0;if(Array.isArray(e))for(var r=0;r<e.length;r++)n+=e[r]*(t[r]||0);else{var a,o=K(t);try{for(o.s();!(a=o.n()).done;)n+=e*a.value}catch(t){o.e(t)}finally{o.f()}}return n}))}));return 1===n&&(e=e[0]),1===r?e.map((function(e){return e[0]})):e}function Ba(e){return"string"===ja(e)}function ja(e){return(Object.prototype.toString.call(e).match(/^\\[object\\s+(.*?)\\]$/)[1]||"").toLowerCase()}function La(e,t){e=+e,t=+t;var n=(Math.floor(e)+"").length;return n<t?+e.toFixed(t-n):(n=Math.pow(10,n-t),Math.round(e/n)*n)}function qa(e){var t,n;if(e)return e=e.trim(),t=/^-?[\\d.]+$/,(e=e.match(/^([a-z]+)\\((.+?)\\)$/i))?(n=[],e[2].replace(/\\/?\\s*([-\\w.]+(?:%|deg)?)/g,(function(e,r){/%$/.test(r)?(r=new Number(r.slice(0,-1)/100)).type="<percentage>":/deg$/.test(r)?((r=new Number(+r.slice(0,-3))).type="<angle>",r.unit="deg"):t.test(r)&&((r=new Number(r)).type="<number>"),e.startsWith("/")&&((r=r instanceof Number?r:new Number(r)).alpha=!0),n.push(r)})),{name:e[1].toLowerCase(),rawName:e[1],rawArgs:e[2],args:n}):void 0}function za(e){return e[e.length-1]}function Va(e,t,n){return isNaN(e)?t:isNaN(t)?e:e+(t-e)*n}function Ga(e,t,n){return(n-e)/(t-e)}function $a(e,t,n){return Va(t[0],t[1],Ga(e[0],e[1],n))}function Ha(e){return e.map((function(e){return e.split("|").map((function(e){var t,n=(e=e.trim()).match(/^(<[a-z]+>)\\[(-?[.\\d]+),\\s*(-?[.\\d]+)\\]?$/);return n?((t=new String(n[1])).range=[+n[2],+n[3]],t):e}))}))}we=Object.freeze({__proto__:null,isString:Ba,type:ja,toPrecision:La,parseFunction:qa,last:za,interpolate:Va,interpolateInv:Ga,mapRange:$a,parseCoordGrammar:Ha,multiplyMatrices:Ia});var Ua=new(W((function e(){H(this,e)}),[{key:"add",value:function(e,t,n){if("string"!=typeof arguments[0])for(var e in arguments[0])this.add(e,arguments[0][e],t);else(Array.isArray(e)?e:[e]).forEach((function(e){this[e]=this[e]||[],t&&this[e][n?"unshift":"push"](t)}),this)}},{key:"run",value:function(e,t){this[e]=this[e]||[],this[e].forEach((function(e){e.call(t&&t.context?t.context:t,t)}))}}])),Wa={gamut_mapping:"lch.c",precision:5,deltaE:"76"},Ya={D50:[.3457/.3585,1,.2958/.3585],D65:[.3127/.329,1,.3583/.329]};function Ka(e){return Array.isArray(e)?e:Ya[e]}function Xa(e,t,n,r){if(r=3<arguments.length&&void 0!==r?r:{},e=Ka(e),t=Ka(t),!e||!t)throw new TypeError("Missing white point to convert ".concat(e?"":"from").concat(e||t?"":"/").concat(t?"":"to"));if(e===t)return n;if(e={W1:e,W2:t,XYZ:n,options:r},Ua.run("chromatic-adaptation-start",e),e.M||(e.W1===Ya.D65&&e.W2===Ya.D50?e.M=[[1.0479298208405488,.022946793341019088,-.05019222954313557],[.029627815688159344,.990434484573249,-.01707382502938514],[-.009243058152591178,.015055144896577895,.7518742899580008]]:e.W1===Ya.D50&&e.W2===Ya.D65&&(e.M=[[.9554734527042182,-.023098536874261423,.0632593086610217],[-.028369706963208136,1.0099954580058226,.021041398966943008],[.012314001688319899,-.020507696433477912,1.3303659366080753]])),Ua.run("chromatic-adaptation-end",e),e.M)return Ia(e.M,e.XYZ);throw new TypeError("Only Bradford CAT with white points D50 and D65 supported for now.")}J=new WeakSet,Q=new WeakMap;var Za=W((function e(t){H(this,e),B(this,J),I(this,Q,void 0),this.id=t.id,this.name=t.name,this.base=t.base?Za.get(t.base):null,this.aliases=t.aliases,this.base&&(this.fromBase=t.fromBase,this.toBase=t.toBase);var n,r=null!=(r=t.coords)?r:this.base.coords;this.coords=r,r=null!=(r=null!=(r=t.white)?r:this.base.white)?r:"D65";for(n in this.white=Ka(r),this.formats=null!=(r=t.formats)?r:{},this.formats){var a=this.formats[n];a.type||(a.type="function"),a.name||(a.name=n)}!t.cssId||null!=(r=this.formats.functions)&&r.color?null==(r=this.formats)||!r.color||null!=(r=this.formats)&&r.color.id||(this.formats.color.id=this.id):(this.formats.color={id:t.cssId},Object.defineProperty(this,"cssId",{value:t.cssId})),this.referred=t.referred,q(Q,this,z(J,this,Qa).call(this).reverse()),Ua.run("colorspace-init-end",this)}),[{key:"inGamut",value:function(e){var t,n=(1<arguments.length&&void 0!==arguments[1]?arguments[1]:{}).epsilon,r=void 0===n?75e-6:n;return this.isPolar?(e=this.toBase(e),this.base.inGamut(e,{epsilon:r})):(t=Object.values(this.coords),e.every((function(e,n){var a;return"angle"===(n=t[n]).type||!n.range||!!Number.isNaN(e)||(a=(n=V(n.range,2))[0],n=n[1],(void 0===a||a-r<=e)&&(void 0===n||e<=n+r))})))}},{key:"cssId",get:function(){var e;return(null==(e=this.formats.functions)||null==(e=e.color)?void 0:e.id)||this.id}},{key:"isPolar",get:function(){for(var e in this.coords)if("angle"===this.coords[e].type)return!0;return!1}},{key:"getFormat",value:function(e){return"object"===a(e)||(e="default"===e?Object.values(this.formats)[0]:this.formats[e])?z(J,this,Ja).call(this,e):null}},{key:"to",value:function(e,t){var n;if(1===arguments.length&&(e=(n=[e.space,e.coords])[0],t=n[1]),this!==(e=Za.get(e))){t=t.map((function(e){return Number.isNaN(e)?0:e}));for(var r,a,o=L(Q,this),i=L(Q,e),l=0;l<o.length&&o[l]===i[l];l++)r=o[l],a=l;if(!r)throw new Error("Cannot convert between color spaces ".concat(this," and ").concat(e,": no connection space was found"));for(var u=o.length-1;a<u;u--)t=o[u].toBase(t);for(var s=a+1;s<i.length;s++)t=i[s].fromBase(t)}return t}},{key:"from",value:function(e,t){var n;return 1===arguments.length&&(e=(n=[e.space,e.coords])[0],t=n[1]),(e=Za.get(e)).to(this,t)}},{key:"toString",value:function(){return"".concat(this.name," (").concat(this.id,")")}},{key:"getMinCoords",value:function(){var e,t=[];for(e in this.coords){var n=(n=this.coords[e]).range||n.refRange;t.push(null!=(n=null==n?void 0:n.min)?n:0)}return t}}],[{key:"all",get:function(){return M(new Set(Object.values(Za.registry)))}},{key:"register",value:function(e,t){if(1===arguments.length&&(e=(t=arguments[0]).id),t=this.get(t),this.registry[e]&&this.registry[e]!==t)throw new Error("Duplicate color space registration: '".concat(e,"'"));if(this.registry[e]=t,1===arguments.length&&t.aliases){var n,r=K(t.aliases);try{for(r.s();!(n=r.n()).done;){var a=n.value;this.register(a,t)}}catch(e){r.e(e)}finally{r.f()}}return t}},{key:"get",value:function(e){if(!e||e instanceof Za)return e;if("string"===ja(e)){var t=Za.registry[e.toLowerCase()];if(t)return t;throw new TypeError('No color space found with id = "'.concat(e,'"'))}for(var n=arguments.length,r=new Array(1<n?n-1:0),a=1;a<n;a++)r[a-1]=arguments[a];if(r.length)return Za.get.apply(Za,r);throw new TypeError("".concat(e," is not a valid color space"))}},{key:"resolveCoord",value:function(e,t){var n,r;if(r="string"===ja(e)?e.includes(".")?(n=(r=V(e.split("."),2))[0],r[1]):(n=void 0,e):Array.isArray(e)?(n=(r=V(e,2))[0],r[1]):(n=e.space,e.coordId),!(n=(n=Za.get(n))||t))throw new TypeError("Cannot resolve coordinate reference ".concat(e,": No color space specified and relative references are not allowed here"));if(("number"===(t=ja(r))||"string"===t&&0<=r)&&(e=Object.entries(n.coords)[r]))return O({space:n,id:e[0],index:r},e[1]);n=Za.get(n);var a,o=r.toLowerCase(),i=0;for(a in n.coords){var l,u=n.coords[a];if(a.toLowerCase()===o||(null==(l=u.name)?void 0:l.toLowerCase())===o)return O({space:n,id:a,index:i},u);i++}throw new TypeError('No "'.concat(r,'" coordinate found in ').concat(n.name,". Its coordinates are: ").concat(Object.keys(n.coords).join(", ")))}}]);function Ja(e){var t;return e.coords&&!e.coordGrammar&&(e.type||(e.type="function"),e.name||(e.name="color"),e.coordGrammar=Ha(e.coords),t=Object.entries(this.coords).map((function(t,n){(t=V(t,2))[0],t=t[1],n=e.coordGrammar[n][0],t=t.range||t.refRange;var r=n.range,a="";return"<percentage>"==n?(r=[0,100],a="%"):"<angle>"==n&&(a="deg"),{fromRange:t,toRange:r,suffix:a}})),e.serializeCoords=function(e,n){return e.map((function(e,r){var a=(r=t[r]).fromRange,o=r.toRange;r=r.suffix;return e=La(e=a&&o?$a(a,o,e):e,n),r&&(e+=r),e}))}),e}function Qa(){for(var e=[this],t=this;t=t.base;)e.push(t);return e}var eo=Za,to=(pe(eo,"registry",{}),pe(eo,"DEFAULT_FORMAT",{type:"functions",name:"color"}),new eo({id:"xyz-d65",name:"XYZ D65",coords:{x:{name:"X"},y:{name:"Y"},z:{name:"Z"}},white:"D65",formats:{color:{ids:["xyz-d65","xyz"]}},aliases:["xyz"]}));S(no,eo),Dt=W(no);function no(e){var t;return H(this,no),e.coords||(e.coords={r:{range:[0,1],name:"Red"},g:{range:[0,1],name:"Green"},b:{range:[0,1],name:"Blue"}}),e.base||(e.base=to),e.toXYZ_M&&e.fromXYZ_M&&(null==e.toBase&&(e.toBase=function(n){return n=Ia(e.toXYZ_M,n),t.white!==t.base.white?Xa(t.white,t.base.white,n):n}),null==e.fromBase)&&(e.fromBase=function(n){return n=Xa(t.base.white,t.white,n),Ia(e.fromXYZ_M,n)}),null==e.referred&&(e.referred="display"),t=R(this,no,[e])}function ro(e){var t={str:null==(s=String(e))?void 0:s.trim()};if(Ua.run("parse-start",t),t.color)return t.color;if(t.parsed=qa(t.str),t.parsed){var n=t.parsed.name;if("color"===n){var r,a=t.parsed.args.shift(),o=0<t.parsed.rawArgs.indexOf("/")?t.parsed.args.pop():1,i=K(eo.all);try{var l;for(i.s();!(r=i.n()).done;)if(l=(()=>{var e,n=r.value,i=n.getFormat("color");if(i&&(a===i.id||null!=(i=i.ids)&&i.includes(a)))return i=Object.keys(n.coords).length,(e=Array(i).fill(0)).forEach((function(n,r){return e[r]=t.parsed.args[r]||0})),{v:{spaceId:n.id,coords:e,alpha:o}}})())return l.v}catch(e){i.e(e)}finally{i.f()}var u,s="";throw a in eo.registry&&(u=null==(u=eo.registry[a].formats)||null==(u=u.functions)||null==(u=u.color)?void 0:u.id)&&(s="Did you mean color(".concat(u,")?")),new TypeError("Cannot parse color(".concat(a,"). ")+(s||"Missing a plugin?"))}var c,d=K(eo.all);try{var p;for(d.s();!(c=d.n()).done;)if(p=(()=>{var e,r,a=c.value,o=a.getFormat(n);if(o&&"function"===o.type)return e=1,(o.lastAlpha||za(t.parsed.args).alpha)&&(e=t.parsed.args.pop()),r=t.parsed.args,o.coordGrammar&&Object.entries(a.coords).forEach((function(e,t){var a=(e=V(e,2))[0],i=(e=e[1],o.coordGrammar[t]),l=null==(u=r[t])?void 0:u.type;if(!(i=i.find((function(e){return e==l}))))throw u=e.name||a,new TypeError("".concat(l," not allowed for ").concat(u," in ").concat(n,"()"));a=i.range;var u=e.range||e.refRange;(a="<percentage>"===l?a||[0,1]:a)&&u&&(r[t]=$a(a,u,r[t]))})),{v:{spaceId:a.id,coords:r,alpha:e}}})())return p.v}catch(e){d.e(e)}finally{d.f()}}else{var f,m=K(eo.all);try{for(m.s();!(f=m.n()).done;){var h,g=f.value;for(h in g.formats){var v=g.formats[h];if("custom"===v.type&&(!v.test||v.test(t.str))){var b=v.parse(t.str);if(b)return null==b.alpha&&(b.alpha=1),b}}}}catch(e){m.e(e)}finally{m.f()}}throw new TypeError("Could not parse ".concat(e," as a color. Missing a plugin?"))}function ao(e){var t;if(e)return(t=(e=Ba(e)?ro(e):e).space||e.spaceId)instanceof eo||(e.space=eo.get(t)),void 0===e.alpha&&(e.alpha=1),e;throw new TypeError("Empty color reference")}function oo(e,t){return(t=eo.get(t)).from(e)}function io(e,t){var n=(t=eo.resolveCoord(t,e.space)).space;t=t.index;return oo(e,n)[t]}function lo(e,t,n){return t=eo.get(t),e.coords=t.to(e.space,n),e}function uo(e,t,n){if(e=ao(e),2===arguments.length&&"object"===ja(t)){var r,a=t;for(r in a)uo(e,r,a[r])}else{"function"==typeof n&&(n=n(io(e,t)));var o=(t=eo.resolveCoord(t,e.space)).space,i=(t=t.index,oo(e,o));i[t]=n,lo(e,o,i)}return e}ye=new eo({id:"xyz-d50",name:"XYZ D50",white:"D50",base:to,fromBase:function(e){return Xa(to.white,"D50",e)},toBase:function(e){return Xa("D50",to.white,e)},formats:{color:{}}});var so=24389/27,co=Ya.D50,po=new eo({id:"lab",name:"Lab",coords:{l:{refRange:[0,100],name:"L"},a:{refRange:[-125,125]},b:{refRange:[-125,125]}},white:co,base:ye,fromBase:function(e){return e=e.map((function(e,t){return e/co[t]})).map((function(e){return 216/24389<e?Math.cbrt(e):(so*e+16)/116})),[116*e[1]-16,500*(e[0]-e[1]),200*(e[1]-e[2])]},toBase:function(e){var t=[];return t[1]=(e[0]+16)/116,t[0]=e[1]/500+t[1],t[2]=t[1]-e[2]/200,[24/116<t[0]?Math.pow(t[0],3):(116*t[0]-16)/so,8<e[0]?Math.pow((e[0]+16)/116,3):e[0]/so,24/116<t[2]?Math.pow(t[2],3):(116*t[2]-16)/so].map((function(e,t){return e*co[t]}))},formats:{lab:{coords:["<number> | <percentage>","<number>","<number>"]}}});function fo(e){return(e%360+360)%360}var mo=new eo({id:"lch",name:"LCH",coords:{l:{refRange:[0,100],name:"Lightness"},c:{refRange:[0,150],name:"Chroma"},h:{refRange:[0,360],type:"angle",name:"Hue"}},base:po,fromBase:function(e){var t=(e=V(e,3))[0],n=e[1],r=(e=e[2],Math.abs(n)<.02&&Math.abs(e)<.02?NaN:180*Math.atan2(e,n)/Math.PI);return[t,Math.sqrt(Math.pow(n,2)+Math.pow(e,2)),fo(r)]},toBase:function(e){var t=(e=V(e,3))[0],n=e[1];e=e[2];return n<0&&(n=0),isNaN(e)&&(e=0),[t,n*Math.cos(e*Math.PI/180),n*Math.sin(e*Math.PI/180)]},formats:{lch:{coords:["<number> | <percentage>","<number>","<number> | <angle>"]}}}),ho=Math.pow(25,7),go=Math.PI,vo=180/go,bo=go/180;function yo(e,t){var n=void 0===(n=(a=2<arguments.length&&void 0!==arguments[2]?arguments[2]:{}).kL)?1:n,r=void 0===(r=a.kC)?1:r,a=void 0===(a=a.kH)?1:a,o=(e=V(po.from(e),3))[0],i=e[1],l=(e=e[2],mo.from(po,[o,i,e])[1]),u=(t=V(po.from(t),3))[0],s=t[1],c=(t=t[2],l=((l=l<0?0:l)+(c=(c=mo.from(po,[u,s,t])[1])<0?0:c))/2,Math.pow(l,7)),d=(c=(1+(l=.5*(1-Math.sqrt(c/(c+ho)))))*i,i=(1+l)*s,l=Math.sqrt(Math.pow(c,2)+Math.pow(e,2)),s=Math.sqrt(Math.pow(i,2)+Math.pow(t,2)),e=0==c&&0===e?0:Math.atan2(e,c),c=0==i&&0===t?0:Math.atan2(t,i),t=(e<0&&(e+=2*go),c<0&&(c+=2*go),u-o),i=s-l,(c*=vo)-(e*=vo)),p=(e=e+c,c=Math.abs(d),d=(l*s==0?p=0:c<=180?p=d:180<d?p=d-360:d<-180?p=360+d:console.log("the unthinkable has happened"),2*Math.sqrt(s*l)*Math.sin(p*bo/2)),(o+u)/2);o=(l+s)/2,u=Math.pow(o,7),l=l*s==0?e:c<=180?e/2:e<360?(e+360)/2:(e-360)/2,c=1+.015*(s=Math.pow(p-50,2))/Math.sqrt(20+s),e=1+.045*o,p=1,s=1+.015*o*((p-=.17*Math.cos((l-30)*bo))+.24*Math.cos(2*l*bo)+.32*Math.cos((3*l+6)*bo)-.2*Math.cos((4*l-63)*bo)),o=30*Math.exp(-1*Math.pow((l-275)/25,2)),p=2*Math.sqrt(u/(u+ho)),l=-1*Math.sin(2*o*bo)*p,u=Math.pow(t/(n*c),2),u=(u+=Math.pow(i/(r*e),2))+Math.pow(d/(a*s),2)+i/(r*e)*l*(d/(a*s));return Math.sqrt(u)}var Do=75e-6;function wo(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:e.space,n=void 0===(n=(2<arguments.length&&void 0!==arguments[2]?arguments[2]:{}).epsilon)?Do:n,r=(e=ao(e),t=eo.get(t),e.coords);return t!==e.space&&(r=t.from(e)),t.inGamut(r,{epsilon:n})}function xo(e){return{space:e.space,coords:e.coords.slice(),alpha:e.alpha}}function Eo(e){var t=void 0===(t=(a=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{}).method)?Wa.gamut_mapping:t,n=void 0===(a=a.space)?e.space:a;if(Ba(arguments[1])&&(n=arguments[1]),!wo(e,n=eo.get(n),{epsilon:0})){var r,a=Ao(e,n);if("clip"!==t&&!wo(e,n)){var o=Eo(xo(a),{method:"clip",space:n});if(2<yo(e,o)){for(var i=eo.resolveCoord(t),l=i.space,u=i.id,s=Ao(a,l),c=(i.range||i.refRange)[0],d=io(s,u);.01<d-c;)yo(s,Eo(xo(s),{space:n,method:"clip"}))-2<.01?c=io(s,u):d=io(s,u),uo(s,u,(c+d)/2);a=Ao(s,n)}else a=o}"clip"!==t&&wo(a,n,{epsilon:0})||(r=Object.values(n.coords).map((function(e){return e.range||[]})),a.coords=a.coords.map((function(e,t){var n=(t=V(r[t],2))[0];t=t[1];return void 0!==n&&(e=Math.max(n,e)),void 0!==t?Math.min(e,t):e}))),n!==e.space&&(a=Ao(a,e.space)),e.coords=a.coords}return e}function Ao(e,t){var n=(2<arguments.length&&void 0!==arguments[2]?arguments[2]:{}).inGamut,r=(e=ao(e),(t=eo.get(t)).from(e));t={space:t,coords:r,alpha:e.alpha};return n?Eo(t):t}function Fo(e){var t=void 0===(n=(a=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{}).precision)?Wa.precision:n,n=void 0===(n=a.format)?"default":n,r=void 0===(r=a.inGamut)||r,a=k(a,i),o=n,l=(n=null!=(l=null!=(l=(e=ao(e)).space.getFormat(n))?l:e.space.getFormat("default"))?l:eo.DEFAULT_FORMAT,r=r||n.toGamut,(l=e.coords).map((function(e){return e||0})));if(r&&!wo(e)&&(l=Eo(xo(e),!0===r?void 0:r).coords),"custom"===n.type){if(a.precision=t,!n.serialize)throw new TypeError("format ".concat(o," can only be used to parse colors, not for serialization"));u=n.serialize(l,e.alpha,a)}else{r=n.name||"color",o=(n.serializeCoords?l=n.serializeCoords(l,t):null!==t&&(l=l.map((function(e){return La(e,t)}))),M(l)),a=("color"===r&&(l=n.id||(null==(a=n.ids)?void 0:a[0])||e.space.id,o.unshift(l)),e.alpha),l=(null!==t&&(a=La(a,t)),e.alpha<1&&!n.noAlpha?"".concat(n.commas?",":" /"," ").concat(a):"");var u="".concat(r,"(").concat(o.join(n.commas?", ":" ")).concat(l,")")}return u}Ao.returns=Eo.returns="color";De=new Dt({id:"rec2020-linear",name:"Linear REC.2020",white:"D65",toXYZ_M:[[.6369580483012914,.14461690358620832,.1688809751641721],[.2627002120112671,.6779980715188708,.05930171646986196],[0,.028072693049087428,1.060985057710791]],fromXYZ_M:[[1.716651187971268,-.355670783776392,-.25336628137366],[-.666684351832489,1.616481236634939,.0157685458139111],[.017639857445311,-.042770613257809,.942103121235474]],formats:{color:{}}});var Co=1.09929682680944,ko=.018053968510807,Ro=(jt=new Dt({id:"rec2020",name:"REC.2020",base:De,toBase:function(e){return e.map((function(e){return e<4.5*ko?e/4.5:Math.pow((e+Co-1)/Co,1/.45)}))},fromBase:function(e){return e.map((function(e){return ko<=e?Co*Math.pow(e,.45)-(Co-1):4.5*e}))},formats:{color:{}}}),Cn=new Dt({id:"p3-linear",name:"Linear P3",white:"D65",toXYZ_M:[[.4865709486482162,.26566769316909306,.1982172852343625],[.2289745640697488,.6917385218365064,.079286914093745],[0,.04511338185890264,1.043944368900976]],fromXYZ_M:[[2.493496911941425,-.9313836179191239,-.40271078445071684],[-.8294889695615747,1.7626640603183463,.023624685841943577],[.03584583024378447,-.07617238926804182,.9568845240076872]]}),kn=new Dt({id:"srgb-linear",name:"Linear sRGB",white:"D65",toXYZ_M:[[.41239079926595934,.357584339383878,.1804807884018343],[.21263900587151027,.715168678767756,.07219231536073371],[.01933081871559182,.11919477979462598,.9505321522496607]],fromXYZ_M:[[3.2409699419045226,-1.537383177570094,-.4986107602930034],[-.9692436362808796,1.8759675015077202,.04155505740717559],[.05563007969699366,-.20397695888897652,1.0569715142428786]],formats:{color:{}}}),{aliceblue:[240/255,248/255,1],antiquewhite:[250/255,235/255,215/255],aqua:[0,1,1],aquamarine:[127/255,1,212/255],azure:[240/255,1,1],beige:[245/255,245/255,220/255],bisque:[1,228/255,196/255],black:[0,0,0],blanchedalmond:[1,235/255,205/255],blue:[0,0,1],blueviolet:[138/255,43/255,226/255],brown:[165/255,42/255,42/255],burlywood:[222/255,184/255,135/255],cadetblue:[95/255,158/255,160/255],chartreuse:[127/255,1,0],chocolate:[210/255,105/255,30/255],coral:[1,127/255,80/255],cornflowerblue:[100/255,149/255,237/255],cornsilk:[1,248/255,220/255],crimson:[220/255,20/255,60/255],cyan:[0,1,1],darkblue:[0,0,139/255],darkcyan:[0,139/255,139/255],darkgoldenrod:[184/255,134/255,11/255],darkgray:[169/255,169/255,169/255],darkgreen:[0,100/255,0],darkgrey:[169/255,169/255,169/255],darkkhaki:[189/255,183/255,107/255],darkmagenta:[139/255,0,139/255],darkolivegreen:[85/255,107/255,47/255],darkorange:[1,140/255,0],darkorchid:[.6,50/255,.8],darkred:[139/255,0,0],darksalmon:[233/255,150/255,122/255],darkseagreen:[143/255,188/255,143/255],darkslateblue:[72/255,61/255,139/255],darkslategray:[47/255,79/255,79/255],darkslategrey:[47/255,79/255,79/255],darkturquoise:[0,206/255,209/255],darkviolet:[148/255,0,211/255],deeppink:[1,20/255,147/255],deepskyblue:[0,191/255,1],dimgray:[105/255,105/255,105/255],dimgrey:[105/255,105/255,105/255],dodgerblue:[30/255,144/255,1],firebrick:[178/255,34/255,34/255],floralwhite:[1,250/255,240/255],forestgreen:[34/255,139/255,34/255],fuchsia:[1,0,1],gainsboro:[220/255,220/255,220/255],ghostwhite:[248/255,248/255,1],gold:[1,215/255,0],goldenrod:[218/255,165/255,32/255],gray:[128/255,128/255,128/255],green:[0,128/255,0],greenyellow:[173/255,1,47/255],grey:[128/255,128/255,128/255],honeydew:[240/255,1,240/255],hotpink:[1,105/255,180/255],indianred:[205/255,92/255,92/255],indigo:[75/255,0,130/255],ivory:[1,1,240/255],khaki:[240/255,230/255,140/255],lavender:[230/255,230/255,250/255],lavenderblush:[1,240/255,245/255],lawngreen:[124/255,252/255,0],lemonchiffon:[1,250/255,205/255],lightblue:[173/255,216/255,230/255],lightcoral:[240/255,128/255,128/255],lightcyan:[224/255,1,1],lightgoldenrodyellow:[250/255,250/255,210/255],lightgray:[211/255,211/255,211/255],lightgreen:[144/255,238/255,144/255],lightgrey:[211/255,211/255,211/255],lightpink:[1,182/255,193/255],lightsalmon:[1,160/255,122/255],lightseagreen:[32/255,178/255,170/255],lightskyblue:[135/255,206/255,250/255],lightslategray:[119/255,136/255,.6],lightslategrey:[119/255,136/255,.6],lightsteelblue:[176/255,196/255,222/255],lightyellow:[1,1,224/255],lime:[0,1,0],limegreen:[50/255,205/255,50/255],linen:[250/255,240/255,230/255],magenta:[1,0,1],maroon:[128/255,0,0],mediumaquamarine:[.4,205/255,170/255],mediumblue:[0,0,205/255],mediumorchid:[186/255,85/255,211/255],mediumpurple:[147/255,112/255,219/255],mediumseagreen:[60/255,179/255,113/255],mediumslateblue:[123/255,104/255,238/255],mediumspringgreen:[0,250/255,154/255],mediumturquoise:[72/255,209/255,.8],mediumvioletred:[199/255,21/255,133/255],midnightblue:[25/255,25/255,112/255],mintcream:[245/255,1,250/255],mistyrose:[1,228/255,225/255],moccasin:[1,228/255,181/255],navajowhite:[1,222/255,173/255],navy:[0,0,128/255],oldlace:[253/255,245/255,230/255],olive:[128/255,128/255,0],olivedrab:[107/255,142/255,35/255],orange:[1,165/255,0],orangered:[1,69/255,0],orchid:[218/255,112/255,214/255],palegoldenrod:[238/255,232/255,170/255],palegreen:[152/255,251/255,152/255],paleturquoise:[175/255,238/255,238/255],palevioletred:[219/255,112/255,147/255],papayawhip:[1,239/255,213/255],peachpuff:[1,218/255,185/255],peru:[205/255,133/255,63/255],pink:[1,192/255,203/255],plum:[221/255,160/255,221/255],powderblue:[176/255,224/255,230/255],purple:[128/255,0,128/255],rebeccapurple:[.4,.2,.6],red:[1,0,0],rosybrown:[188/255,143/255,143/255],royalblue:[65/255,105/255,225/255],saddlebrown:[139/255,69/255,19/255],salmon:[250/255,128/255,114/255],sandybrown:[244/255,164/255,96/255],seagreen:[46/255,139/255,87/255],seashell:[1,245/255,238/255],sienna:[160/255,82/255,45/255],silver:[192/255,192/255,192/255],skyblue:[135/255,206/255,235/255],slateblue:[106/255,90/255,205/255],slategray:[112/255,128/255,144/255],slategrey:[112/255,128/255,144/255],snow:[1,250/255,250/255],springgreen:[0,1,127/255],steelblue:[70/255,130/255,180/255],tan:[210/255,180/255,140/255],teal:[0,128/255,128/255],thistle:[216/255,191/255,216/255],tomato:[1,99/255,71/255],turquoise:[64/255,224/255,208/255],violet:[238/255,130/255,238/255],wheat:[245/255,222/255,179/255],white:[1,1,1],whitesmoke:[245/255,245/255,245/255],yellow:[1,1,0],yellowgreen:[154/255,205/255,50/255]}),No=(ra=new Dt({id:"srgb",name:"sRGB",base:kn,fromBase:function(e){return e.map((function(e){var t=e<0?-1:1,n=e*t;return.0031308<n?t*(1.055*Math.pow(n,1/2.4)-.055):12.92*e}))},toBase:function(e){return e.map((function(e){var t=e<0?-1:1,n=e*t;return n<.04045?e/12.92:t*Math.pow((.055+n)/1.055,2.4)}))},formats:{rgb:{coords:ra=Array(3).fill("<percentage> | <number>[0, 255]")},rgb_number:{name:"rgb",commas:!0,coords:No=Array(3).fill("<number>[0, 255]"),noAlpha:!0},color:{},rgba:{coords:ra,commas:!0,lastAlpha:!0},rgba_number:{name:"rgba",commas:!0,coords:No},hex:{type:"custom",toGamut:!0,test:function(e){return/^#([a-f0-9]{3,4}){1,2}$/i.test(e)},parse:function(e){e.length<=5&&(e=e.replace(/[a-f0-9]/gi,"$&$&"));var t=[];return e.replace(/[a-f0-9]{2}/gi,(function(e){t.push(parseInt(e,16)/255)})),{spaceId:"srgb",coords:t.slice(0,3),alpha:t.slice(3)[0]}},serialize:function(e,t){var n=void 0===(n=(2<arguments.length&&void 0!==arguments[2]?arguments[2]:{}).collapse)||n,r=(t<1&&e.push(t),e=e.map((function(e){return Math.round(255*e)})),n&&e.every((function(e){return e%17==0})));return"#"+e.map((function(e){return r?(e/17).toString(16):e.toString(16).padStart(2,"0")})).join("")}},keyword:{type:"custom",test:function(e){return/^[a-z]+$/i.test(e)},parse:function(e){var t={spaceId:"srgb",coords:null,alpha:1};if("transparent"===(e=e.toLowerCase())?(t.coords=Ro.black,t.alpha=0):t.coords=Ro[e],t.coords)return t}}}}),new Dt({id:"p3",name:"P3",base:Cn,fromBase:ra.fromBase,toBase:ra.toBase,formats:{color:{id:"display-p3"}}}));if(Wa.display_space=ra,"undefined"!=typeof CSS&&null!=(ue=CSS)&&ue.supports)for(var To=0,So=[po,jt,No];To<So.length;To++){var _o=So[To],Oo=_o.getMinCoords();Oo=Fo({space:_o,coords:Oo,alpha:1});if(CSS.supports("color",Oo)){Wa.display_space=_o;break}}function Mo(e,t){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:"lab",r=(e=(n=eo.get(n)).from(e),n.from(t));return Math.sqrt(e.reduce((function(e,t,n){return n=r[n],isNaN(t)||isNaN(n)?e:e+Math.pow(n-t,2)}),0))}function Po(e){return io(e,[to,"y"])}function Io(e,t){uo(e,[to,"y"],t)}ue=Object.freeze({__proto__:null,getLuminance:Po,setLuminance:Io,register:function(e){Object.defineProperty(e.prototype,"luminance",{get:function(){return Po(this)},set:function(e){Io(this,e)}})}});function Bo(e){return.022<=e?e:e+Math.pow(.022-e,1.414)}function jo(e){var t=e<0?-1:1;e=Math.abs(e);return t*Math.pow(e,2.4)}var Lo=24389/27,qo=Ya.D65,zo=new eo({id:"lab-d65",name:"Lab D65",coords:{l:{refRange:[0,100],name:"L"},a:{refRange:[-125,125]},b:{refRange:[-125,125]}},white:qo,base:to,fromBase:function(e){return e=e.map((function(e,t){return e/qo[t]})).map((function(e){return 216/24389<e?Math.cbrt(e):(Lo*e+16)/116})),[116*e[1]-16,500*(e[0]-e[1]),200*(e[1]-e[2])]},toBase:function(e){var t=[];return t[1]=(e[0]+16)/116,t[0]=e[1]/500+t[1],t[2]=t[1]-e[2]/200,[24/116<t[0]?Math.pow(t[0],3):(116*t[0]-16)/Lo,8<e[0]?Math.pow((e[0]+16)/116,3):e[0]/Lo,24/116<t[2]?Math.pow(t[2],3):(116*t[2]-16)/Lo].map((function(e,t){return e*qo[t]}))},formats:{"lab-d65":{coords:["<number> | <percentage>","<number>","<number>"]}}}),Vo=.5*Math.pow(5,.5)+.5,Go=Object.freeze({__proto__:null,contrastWCAG21:function(e,t){var n;return e=ao(e),t=ao(t),(e=Math.max(Po(e),0))<(t=Math.max(Po(t),0))&&(e=(n=[t,e])[0],t=n[1]),(e+.05)/(t+.05)},contrastAPCA:function(e,t){t=ao(t),e=ao(e);var n=(t=V((t=Ao(t,"srgb")).coords,3))[0],r=t[1],a=(t=t[2],.2126729*jo(n)+.7151522*jo(r)+.072175*jo(t));n=(e=V((e=Ao(e,"srgb")).coords,3))[0],r=e[1],t=e[2],e=.2126729*jo(n)+.7151522*jo(r)+.072175*jo(t),t=(n=Bo(a))<(r=Bo(e)),a=Math.abs(r-n)<5e-4?0:t?1.14*(Math.pow(r,.56)-Math.pow(n,.57)):1.14*(Math.pow(r,.65)-Math.pow(n,.62));return 100*(Math.abs(a)<.1?0:0<a?a-.027:a+.027)},contrastMichelson:function(e,t){e=ao(e),t=ao(t);var n=((e=Math.max(Po(e),0))<(t=Math.max(Po(t),0))&&(e=(n=[t,e])[0],t=n[1]),e+t);return 0===n?0:(e-t)/n},contrastWeber:function(e,t){var n;return e=ao(e),t=ao(t),(e=Math.max(Po(e),0))<(t=Math.max(Po(t),0))&&(e=(n=[t,e])[0],t=n[1]),0===t?5e4:(e-t)/t},contrastLstar:function(e,t){return e=ao(e),t=ao(t),e=io(e,[po,"l"]),t=io(t,[po,"l"]),Math.abs(e-t)},contrastDeltaPhi:function(e,t){return e=ao(e),t=ao(t),e=io(e,[zo,"l"]),t=io(t,[zo,"l"]),e=Math.abs(Math.pow(e,Vo)-Math.pow(t,Vo)),(t=Math.pow(e,1/Vo)*Math.SQRT2-40)<7.5?0:t}});function $o(e){var t=(e=V(oo(e,to),3))[0],n=e[1];return[4*t/(e=t+15*n+3*e[2]),9*n/e]}function Ho(e){var t=(e=V(oo(e,to),3))[0],n=e[1];return[t/(e=t+n+e[2]),n/e]}var Uo=Object.freeze({__proto__:null,uv:$o,xy:Ho,register:function(e){Object.defineProperty(e.prototype,"uv",{get:function(){return $o(this)}}),Object.defineProperty(e.prototype,"xy",{get:function(){return Ho(this)}})}}),Wo=Math.PI/180,Yo=new eo({id:"xyz-abs-d65",name:"Absolute XYZ D65",coords:{x:{refRange:[0,9504.7],name:"Xa"},y:{refRange:[0,1e4],name:"Ya"},z:{refRange:[0,10888.3],name:"Za"}},base:to,fromBase:function(e){return e.map((function(e){return Math.max(203*e,0)}))},toBase:function(e){return e.map((function(e){return Math.max(e/203,0)}))}}),Ko=2610/Math.pow(2,14),Xo=Math.pow(2,14)/2610,Zo=3424/Math.pow(2,12),Jo=2413/Math.pow(2,7),Qo=2392/Math.pow(2,7),ei=1.7*2523/Math.pow(2,5),ti=Math.pow(2,5)/(1.7*2523),ni=16295499532821565e-27,ri=[[.41478972,.579999,.014648],[-.20151,1.120649,.0531008],[-.0166008,.2648,.6684799]],ai=[[1.9242264357876067,-1.0047923125953657,.037651404030618],[.35031676209499907,.7264811939316552,-.06538442294808501],[-.09098281098284752,-.3127282905230739,1.5227665613052603]],oi=[[.5,.5,0],[3.524,-4.066708,.542708],[.199076,1.096799,-1.295875]],ii=[[1,.1386050432715393,.05804731615611886],[.9999999999999999,-.1386050432715393,-.05804731615611886],[.9999999999999998,-.09601924202631895,-.8118918960560388]],li=new eo({id:"jzazbz",name:"Jzazbz",coords:{jz:{refRange:[0,1],name:"Jz"},az:{refRange:[-.5,.5]},bz:{refRange:[-.5,.5]}},base:Yo,fromBase:function(e){var t=(e=V(e,3))[0],n=e[2];e=Ia(ri,[1.15*t-(1.15-1)*n,.66*e[1]-(.66-1)*t,n]).map((function(e){var t=Zo+Jo*Math.pow(e/1e4,Ko);e=1+Qo*Math.pow(e/1e4,Ko);return Math.pow(t/e,ei)}));return[(1-.56)*(n=(t=V(Ia(oi,e),3))[0])/(1+-.56*n)-ni,t[1],t[2]]},toBase:function(e){var t=(e=V(e,3))[0],n=(t=Ia(ii,[(t+ni)/(1-.56- -.56*(t+ni)),e[1],e[2]]).map((function(e){var t=Zo-Math.pow(e,ti);e=Qo*Math.pow(e,ti)-Jo;return 1e4*Math.pow(t/e,Xo)})),t=(e=V(Ia(ai,t),3))[0],e[2]);return[t=(t+(1.15-1)*n)/1.15,(e[1]+(.66-1)*t)/.66,n]},formats:{color:{}}}),ui=new eo({id:"jzczhz",name:"JzCzHz",coords:{jz:{refRange:[0,1],name:"Jz"},cz:{refRange:[0,1],name:"Chroma"},hz:{refRange:[0,360],type:"angle",name:"Hue"}},base:li,fromBase:function(e){var t=(e=V(e,3))[0],n=e[1],r=(e=e[2],Math.abs(n)<2e-4&&Math.abs(e)<2e-4?NaN:180*Math.atan2(e,n)/Math.PI);return[t,Math.sqrt(Math.pow(n,2)+Math.pow(e,2)),fo(r)]},toBase:function(e){return[e[0],e[1]*Math.cos(e[2]*Math.PI/180),e[1]*Math.sin(e[2]*Math.PI/180)]},formats:{color:{}}}),si=2610/16384,ci=[[.3592,.6976,-.0358],[-.1922,1.1004,.0755],[.007,.0749,.8434]],di=[[.5,.5,0],[6610/4096,-13613/4096,7003/4096],[17933/4096,-17390/4096,-543/4096]],pi=[[.9999888965628402,.008605050147287059,.11103437159861648],[1.00001110343716,-.008605050147287059,-.11103437159861648],[1.0000320633910054,.56004913547279,-.3206339100541203]],fi=[[2.0701800566956137,-1.326456876103021,.20661600684785517],[.3649882500326575,.6804673628522352,-.04542175307585323],[-.04959554223893211,-.04942116118675749,1.1879959417328034]],mi=new eo({id:"ictcp",name:"ICTCP",coords:{i:{refRange:[0,1],name:"I"},ct:{refRange:[-.5,.5],name:"CT"},cp:{refRange:[-.5,.5],name:"CP"}},base:Yo,fromBase:function(e){var t=e=Ia(ci,e);return t=e.map((function(e){var t=.8359375+2413/128*Math.pow(e/1e4,si);e=1+18.6875*Math.pow(e/1e4,si);return Math.pow(t/e,2523/32)})),Ia(di,t)},toBase:function(e){return e=Ia(pi,e).map((function(e){var t=Math.max(Math.pow(e,32/2523)-.8359375,0);e=2413/128-18.6875*Math.pow(e,32/2523);return 1e4*Math.pow(t/e,16384/2610)})),Ia(fi,e)},formats:{color:{}}}),hi=[[.8190224432164319,.3619062562801221,-.12887378261216414],[.0329836671980271,.9292868468965546,.03614466816999844],[.048177199566046255,.26423952494422764,.6335478258136937]],gi=[[1.2268798733741557,-.5578149965554813,.28139105017721583],[-.04057576262431372,1.1122868293970594,-.07171106666151701],[-.07637294974672142,-.4214933239627914,1.5869240244272418]],vi=[[.2104542553,.793617785,-.0040720468],[1.9779984951,-2.428592205,.4505937099],[.0259040371,.7827717662,-.808675766]],bi=[[.9999999984505198,.39633779217376786,.2158037580607588],[1.0000000088817609,-.10556134232365635,-.06385417477170591],[1.0000000546724108,-.08948418209496575,-1.2914855378640917]],yi=new eo({id:"oklab",name:"OKLab",coords:{l:{refRange:[0,1],name:"L"},a:{refRange:[-.4,.4]},b:{refRange:[-.4,.4]}},white:"D65",base:to,fromBase:function(e){return e=Ia(hi,e).map((function(e){return Math.cbrt(e)})),Ia(vi,e)},toBase:function(e){return e=Ia(bi,e).map((function(e){return Math.pow(e,3)})),Ia(gi,e)},formats:{oklab:{coords:["<number> | <percentage>","<number>","<number>"]}}}),Di=Object.freeze({__proto__:null,deltaE76:function(e,t){return Mo(e,t,"lab")},deltaECMC:function(e,t){var n=void 0===(n=(r=2<arguments.length&&void 0!==arguments[2]?arguments[2]:{}).l)?2:n,r=void 0===(r=r.c)?1:r,a=(e=V(po.from(e),3))[0],o=e[1],i=(e=e[2],(l=V(mo.from(po,[a,o,e]),3))[1]),l=l[2],u=(t=V(po.from(t),3))[0],s=t[1],c=(t=t[2],mo.from(po,[u,s,t])[1]);u=a-u,c=(i=i<0?0:i)-(c=c<0?0:c),e-=t,t=Math.pow(o-s,2)+Math.pow(e,2)-Math.pow(c,2),o=.511,16<=a&&(o=.040975*a/(1+.01765*a)),s=.0638*i/(1+.0131*i)+.638,e=164<=(l=Number.isNaN(l)?0:l)&&l<=345?.56+Math.abs(.2*Math.cos((l+168)*Wo)):.36+Math.abs(.4*Math.cos((l+35)*Wo)),a=Math.pow(i,4),i=s*((l=Math.sqrt(a/(a+1900)))*e+1-l),a=Math.pow(u/(n*o),2),a=(a+=Math.pow(c/(r*s),2))+t/Math.pow(i,2);return Math.sqrt(a)},deltaE2000:yo,deltaEJz:function(e,t){var n=(e=V(ui.from(e),3))[0],r=e[1],a=(e=e[2],(t=V(ui.from(t),3))[0]),o=t[1];t=t[2],n-=a,a=r-o,Number.isNaN(e)&&Number.isNaN(t)?t=e=0:Number.isNaN(e)?e=t:Number.isNaN(t)&&(t=e),e-=t,t=2*Math.sqrt(r*o)*Math.sin(e/2*(Math.PI/180));return Math.sqrt(Math.pow(n,2)+Math.pow(a,2)+Math.pow(t,2))},deltaEITP:function(e,t){var n=(e=V(mi.from(e),3))[0],r=e[1],a=(e=e[2],(t=V(mi.from(t),3))[0]),o=t[1];t=t[2];return 720*Math.sqrt(Math.pow(n-a,2)+.25*Math.pow(r-o,2)+Math.pow(e-t,2))},deltaEOK:function(e,t){var n=(e=V(yi.from(e),3))[0],r=e[1],a=(e=e[2],(t=V(yi.from(t),3))[0]);r-=t[1],e-=t[2];return Math.sqrt(Math.pow(n-a,2)+Math.pow(r,2)+Math.pow(e,2))}});function wi(e,t){var n,r,a=(r=r=Ba(r=2<arguments.length&&void 0!==arguments[2]?arguments[2]:{})?{method:r}:r).method,o=void 0===a?Wa.deltaE:a,i=k(r,s);for(n in e=ao(e),t=ao(t),Di)if("deltae"+o.toLowerCase()===n.toLowerCase())return Di[n](e,t,i);throw new TypeError("Unknown deltaE method: ".concat(o))}var xi=Object.freeze({__proto__:null,lighten:function(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:.25;return uo(e,[eo.get("oklch","lch"),"l"],(function(e){return e*(1+t)}))},darken:function(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:.25;return uo(e,[eo.get("oklch","lch"),"l"],(function(e){return e*(1-t)}))}});function Ei(e,t){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:.5,r=3<arguments.length&&void 0!==arguments[3]?arguments[3]:{},a=(e=(a=[ao(e),ao(t)])[0],t=a[1],"object"===ja(n)&&(n=(a=[.5,n])[0],r=a[1]),r);return Fi(e,t,{space:a.space,outputSpace:a.outputSpace,premultiplied:a.premultiplied})(n)}function Ai(e,t){var n,r,a=2<arguments.length&&void 0!==arguments[2]?arguments[2]:{},o=(s=(Ci(e)&&(a=t,e=(s=V((n=e).rangeArgs.colors,2))[0],t=s[1]),a)).maxDeltaE,i=s.deltaEMethod,l=(a=void 0===(a=s.steps)?2:a,void 0===(u=s.maxSteps)?1e3:u),u=k(s,c),s=(n||(s=[ao(e),ao(t)],n=Fi(e=s[0],t=s[1],u)),wi(e,t)),d=(u=0<o?Math.max(a,Math.ceil(s/o)+1):a,[]);if(void 0!==l&&(u=Math.min(u,l)),d=1===u?[{p:.5,color:n(.5)}]:(r=1/(u-1),Array.from({length:u},(function(e,t){return{p:t*=r,color:n(t)}}))),0<o)for(var p=d.reduce((function(e,t,n){return 0===n?0:(t=wi(t.color,d[n-1].color,i),Math.max(e,t))}),0);o<p;){p=0;for(var f=1;f<d.length&&d.length<l;f++){var m=d[f-1],h=d[f],g=(h.p+m.p)/2,v=n(g);p=Math.max(p,wi(v,m.color),wi(v,h.color));d.splice(f,0,{p:g,color:n(g)}),f++}}return d=d.map((function(e){return e.color}))}function Fi(e,t){var n,r,a,o,i,l,u,s,c,d,p,f,m=2<arguments.length&&void 0!==arguments[2]?arguments[2]:{};return Ci(e)?(a=e,o=t,Fi.apply(void 0,M(a.rangeArgs.colors).concat([O({},a.rangeArgs.options,o)]))):(p=m.space,f=m.outputSpace,n=m.progression,r=m.premultiplied,e=ao(e),t=ao(t),e=xo(e),t=xo(t),a={colors:[e,t],options:m},p=p?eo.get(p):eo.registry[Wa.interpolationSpace]||e.space,f=f?eo.get(f):p,e=Ao(e,p),t=Ao(t,p),e=Eo(e),t=Eo(t),p.coords.h&&"angle"===p.coords.h.type&&(o=m.hue=m.hue||"shorter",s=[(l=[io(e,m=[p,"h"]),io(t,m)])[0],l=l[1]],u="raw"===(u=o)?s:(c=(s=V(s.map(fo),2))[0],d=(s=s[1])-c,"increasing"===u?d<0&&(s+=360):"decreasing"===u?0<d&&(c+=360):"longer"===u?-180<d&&d<180&&(0<d?s+=360:c+=360):"shorter"===u&&(180<d?c+=360:d<-180&&(s+=360)),[c,s]),i=(d=V(u,2))[0],l=d[1],uo(e,m,i),uo(t,m,l)),r&&(e.coords=e.coords.map((function(t){return t*e.alpha})),t.coords=t.coords.map((function(e){return e*t.alpha}))),Object.assign((function(a){a=n?n(a):a;var o=e.coords.map((function(e,n){return Va(e,t.coords[n],a)})),i=Va(e.alpha,t.alpha,a);o={space:p,coords:o,alpha:i};return r&&(o.coords=o.coords.map((function(e){return e/i}))),f!==p?Ao(o,f):o}),{rangeArgs:a}))}function Ci(e){return"function"===ja(e)&&!!e.rangeArgs}Wa.interpolationSpace="lab";var ki=Object.freeze({__proto__:null,mix:Ei,steps:Ai,range:Fi,isRange:Ci,register:function(e){e.defineFunction("mix",Ei,{returns:"color"}),e.defineFunction("range",Fi,{returns:"function<color>"}),e.defineFunction("steps",Ai,{returns:"array<color>"})}}),Ri=new eo({id:"hsl",name:"HSL",coords:{h:{refRange:[0,360],type:"angle",name:"Hue"},s:{range:[0,100],name:"Saturation"},l:{range:[0,100],name:"Lightness"}},base:ra,fromBase:function(e){var t=Math.max.apply(Math,M(e)),n=Math.min.apply(Math,M(e)),r=(e=V(e,3))[0],a=e[1],o=e[2],i=NaN,l=(e=0,(n+t)/2),u=t-n;if(0!=u){switch(e=0==l||1==l?0:(t-l)/Math.min(l,1-l),t){case r:i=(a-o)/u+(a<o?6:0);break;case a:i=(o-r)/u+2;break;case o:i=(r-a)/u+4}i*=60}return[i,100*e,100*l]},toBase:function(e){var t=(e=V(e,3))[0],n=e[1],r=e[2];function a(e){e=(e+t/30)%12;var a=n*Math.min(r,1-r);return r-a*Math.max(-1,Math.min(e-3,9-e,1))}return(t%=360)<0&&(t+=360),n/=100,r/=100,[a(0),a(8),a(4)]},formats:{hsl:{toGamut:!0,coords:["<number> | <angle>","<percentage>","<percentage>"]},hsla:{coords:["<number> | <angle>","<percentage>","<percentage>"],commas:!0,lastAlpha:!0}}}),Ni=new eo({id:"hsv",name:"HSV",coords:{h:{refRange:[0,360],type:"angle",name:"Hue"},s:{range:[0,100],name:"Saturation"},v:{range:[0,100],name:"Value"}},base:Ri,fromBase:function(e){var t=(e=V(e,3))[0],n=e[1];e=e[2];return[t,0==(n=(e/=100)+(n/=100)*Math.min(e,1-e))?0:200*(1-e/n),100*n]},toBase:function(e){var t=(e=V(e,3))[0],n=e[1];e=e[2];return[t,0==(n=(e/=100)*(1-(n/=100)/2))||1==n?0:(e-n)/Math.min(n,1-n)*100,100*n]},formats:{color:{toGamut:!0}}}),Ti=new eo({id:"hwb",name:"HWB",coords:{h:{refRange:[0,360],type:"angle",name:"Hue"},w:{range:[0,100],name:"Whiteness"},b:{range:[0,100],name:"Blackness"}},base:Ni,fromBase:function(e){var t=(e=V(e,3))[0],n=e[2];return[t,n*(100-e[1])/100,100-n]},toBase:function(e){var t=(e=V(e,3))[0],n=e[1],r=(e=e[2],(n/=100)+(e/=100));return 1<=r?[t,0,n/r*100]:[t,100*(0==(r=1-e)?0:1-n/r),100*r]},formats:{hwb:{toGamut:!0,coords:["<number> | <angle>","<percentage>","<percentage>"]}}}),Si=new Dt({id:"a98rgb-linear",name:"Linear Adobe\xAE 98 RGB compatible",white:"D65",toXYZ_M:[[.5766690429101305,.1855582379065463,.1882286462349947],[.29734497525053605,.6273635662554661,.07529145849399788],[.02703136138641234,.07068885253582723,.9913375368376388]],fromXYZ_M:[[2.0415879038107465,-.5650069742788596,-.34473135077832956],[-.9692436362808795,1.8759675015077202,.04155505740717557],[.013444280632031142,-.11836239223101838,1.0151749943912054]]}),_i=new Dt({id:"a98rgb",name:"Adobe\xAE 98 RGB compatible",base:Si,toBase:function(e){return e.map((function(e){return Math.pow(Math.abs(e),563/256)*Math.sign(e)}))},fromBase:function(e){return e.map((function(e){return Math.pow(Math.abs(e),256/563)*Math.sign(e)}))},formats:{color:{id:"a98-rgb"}}}),Oi=new Dt({id:"prophoto-linear",name:"Linear ProPhoto",white:"D50",base:ye,toXYZ_M:[[.7977604896723027,.13518583717574031,.0313493495815248],[.2880711282292934,.7118432178101014,8565396060525902e-20],[0,0,.8251046025104601]],fromXYZ_M:[[1.3457989731028281,-.25558010007997534,-.05110628506753401],[-.5446224939028347,1.5082327413132781,.02053603239147973],[0,0,1.2119675456389454]]}),Mi=new Dt({id:"prophoto",name:"ProPhoto",base:Oi,toBase:function(e){return e.map((function(e){return e<.03125?e/16:Math.pow(e,1.8)}))},fromBase:function(e){return e.map((function(e){return 1/512<=e?Math.pow(e,1/1.8):16*e}))},formats:{color:{id:"prophoto-rgb"}}}),Pi=new eo({id:"oklch",name:"OKLCh",coords:{l:{refRange:[0,1],name:"Lightness"},c:{refRange:[0,.4],name:"Chroma"},h:{refRange:[0,360],type:"angle",name:"Hue"}},white:"D65",base:yi,fromBase:function(e){var t=(e=V(e,3))[0],n=e[1],r=(e=e[2],Math.abs(n)<2e-4&&Math.abs(e)<2e-4?NaN:180*Math.atan2(e,n)/Math.PI);return[t,Math.sqrt(Math.pow(n,2)+Math.pow(e,2)),fo(r)]},toBase:function(e){var t,n=(e=V(e,3))[0],r=e[1];e=e[2],r=isNaN(e)?t=0:(t=r*Math.cos(e*Math.PI/180),r*Math.sin(e*Math.PI/180));return[n,t,r]},formats:{oklch:{coords:["<number> | <percentage>","<number>","<number> | <angle>"]}}}),Ii=2610/Math.pow(2,14),Bi=Math.pow(2,14)/2610,ji=2523/Math.pow(2,5),Li=Math.pow(2,5)/2523,qi=3424/Math.pow(2,12),zi=2413/Math.pow(2,7),Vi=2392/Math.pow(2,7),Gi=new Dt({id:"rec2100pq",name:"REC.2100-PQ",base:De,toBase:function(e){return e.map((function(e){return 1e4*Math.pow(Math.max(Math.pow(e,Li)-qi,0)/(zi-Vi*Math.pow(e,Li)),Bi)/203}))},fromBase:function(e){return e.map((function(e){e=Math.max(203*e/1e4,0);var t=qi+zi*Math.pow(e,Ii);e=1+Vi*Math.pow(e,Ii);return Math.pow(t/e,ji)}))},formats:{color:{id:"rec2100-pq"}}}),$i=.17883277,Hi=.28466892,Ui=.55991073,Wi=3.7743,Yi=new Dt({id:"rec2100hlg",cssid:"rec2100-hlg",name:"REC.2100-HLG",referred:"scene",base:De,toBase:function(e){return e.map((function(e){return e<=.5?Math.pow(e,2)/3*Wi:Math.exp((e-Ui)/$i+Hi)/12*Wi}))},fromBase:function(e){return e.map((function(e){return(e/=Wi)<=1/12?Math.sqrt(3*e):$i*Math.log(12*e-Hi)+Ui}))},formats:{color:{id:"rec2100-hlg"}}}),Ki={};function Xi(e){var t=e.id;Ki[t]=e}function Zi(e,t,n){var r=(e=V(Ia((n=Ki[2<arguments.length&&void 0!==n?n:"Bradford"]).toCone_M,e),3))[0],a=e[1];e=e[2],t=V(Ia(n.toCone_M,t),3),r=Ia([[t[0]/r,0,0],[0,t[1]/a,0],[0,0,t[2]/e]],n.toCone_M);return Ia(n.fromCone_M,r)}Ua.add("chromatic-adaptation-start",(function(e){e.options.method&&(e.M=Zi(e.W1,e.W2,e.options.method))})),Ua.add("chromatic-adaptation-end",(function(e){e.M||(e.M=Zi(e.W1,e.W2,e.options.method))})),Xi({id:"von Kries",toCone_M:[[.40024,.7076,-.08081],[-.2263,1.16532,.0457],[0,0,.91822]],fromCone_M:[[1.8599364,-1.1293816,.2198974],[.3611914,.6388125,-64e-7],[0,0,1.0890636]]}),Xi({id:"Bradford",toCone_M:[[.8951,.2664,-.1614],[-.7502,1.7135,.0367],[.0389,-.0685,1.0296]],fromCone_M:[[.9869929,-.1470543,.1599627],[.4323053,.5183603,.0492912],[-.0085287,.0400428,.9684867]]}),Xi({id:"CAT02",toCone_M:[[.7328,.4296,-.1624],[-.7036,1.6975,.0061],[.003,.0136,.9834]],fromCone_M:[[1.0961238,-.278869,.1827452],[.454369,.4735332,.0720978],[-.0096276,-.005698,1.0153256]]}),Xi({id:"CAT16",toCone_M:[[.401288,.650173,-.051461],[-.250268,1.204414,.045854],[-.002079,.048952,.953127]],fromCone_M:[[1.862067855087233,-1.011254630531685,.1491867754444518],[.3875265432361372,.6214474419314753,-.008973985167612518],[-.01584149884933386,-.03412293802851557,1.04996443687785]]}),Object.assign(Ya,{A:[1.0985,1,.35585],C:[.98074,1,1.18232],D55:[.95682,1,.92149],D75:[.94972,1,1.22638],E:[1,1,1],F2:[.99186,1,.67393],F7:[.95041,1,1.08747],F11:[1.00962,1,.6435]}),Ya.ACES=[.32168/.33767,1,.34065/.33767];var Ji=new Dt({id:"acescg",name:"ACEScg",coords:{r:{range:[0,65504],name:"Red"},g:{range:[0,65504],name:"Green"},b:{range:[0,65504],name:"Blue"}},referred:"scene",white:Ya.ACES,toXYZ_M:[[.6624541811085053,.13400420645643313,.1561876870049078],[.27222871678091454,.6740817658111484,.05368951740793705],[-.005574649490394108,.004060733528982826,1.0103391003129971]],fromXYZ_M:[[1.6410233796943257,-.32480329418479,-.23642469523761225],[-.6636628587229829,1.6153315916573379,.016756347685530137],[.011721894328375376,-.008284441996237409,.9883948585390215]],formats:{color:{}}}),Qi=Math.pow(2,-16),el=-.35828683,tl=(Math.log2(65504)+9.72)/17.52,nl=(Dt=new Dt({id:"acescc",name:"ACEScc",coords:{r:{range:[el,tl],name:"Red"},g:{range:[el,tl],name:"Green"},b:{range:[el,tl],name:"Blue"}},referred:"scene",base:Ji,toBase:function(e){return e.map((function(e){return e<=(9.72-15)/17.52?2*(Math.pow(2,17.52*e-9.72)-Qi):e<tl?Math.pow(2,17.52*e-9.72):65504}))},fromBase:function(e){return e.map((function(e){return e<=0?(Math.log2(Qi)+9.72)/17.52:e<Qi?(Math.log2(Qi+.5*e)+9.72)/17.52:(Math.log2(e)+9.72)/17.52}))},formats:{color:{}}}),Object.freeze({__proto__:null,XYZ_D65:to,XYZ_D50:ye,XYZ_ABS_D65:Yo,Lab_D65:zo,Lab:po,LCH:mo,sRGB_Linear:kn,sRGB:ra,HSL:Ri,HWB:Ti,HSV:Ni,P3_Linear:Cn,P3:No,A98RGB_Linear:Si,A98RGB:_i,ProPhoto_Linear:Oi,ProPhoto:Mi,REC_2020_Linear:De,REC_2020:jt,OKLab:yi,OKLCH:Pi,Jzazbz:li,JzCzHz:ui,ICTCP:mi,REC_2100_PQ:Gi,REC_2100_HLG:Yi,ACEScg:Ji,ACEScc:Dt})),rl=(ee=new WeakMap,W((function e(){var t=this;H(this,e),I(this,ee,void 0);for(var n,r,a,o=arguments.length,i=new Array(o),l=0;l<o;l++)i[l]=arguments[l];a=(a=1===i.length?ao(i[0]):a)?(n=a.space||a.spaceId,r=a.coords,a.alpha):(n=i[0],r=i[1],i[2]),q(ee,this,eo.get(n)),this.coords=r?r.slice():[0,0,0],this.alpha=a<1?a:1;for(var u=0;u<this.coords.length;u++)"NaN"===this.coords[u]&&(this.coords[u]=NaN);for(var s in L(ee,this).coords)(e=>{Object.defineProperty(t,e,{get:function(){return t.get(e)},set:function(n){return t.set(e,n)}})})(s)}),[{key:"space",get:function(){return L(ee,this)}},{key:"spaceId",get:function(){return L(ee,this).id}},{key:"clone",value:function(){return new rl(this.space,this.coords,this.alpha)}},{key:"toJSON",value:function(){return{spaceId:this.spaceId,coords:this.coords,alpha:this.alpha}}},{key:"display",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=function(e){var t,n=void 0===(n=(r=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{}).space)?Wa.display_space:n,r=k(r,l),a=Fo(e,r);return"undefined"==typeof CSS||null!=(t=CSS)&&t.supports("color",a)||!Wa.display_space?(a=new String(a)).color=e:(t=Ao(e,n),(a=new String(Fo(t,r))).color=t),a}.apply(void 0,[this].concat(t));return r.color=new rl(r.color),r}}],[{key:"get",value:function(e){if(e instanceof rl)return e;for(var t=arguments.length,n=new Array(1<t?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return C(rl,[e].concat(n))}},{key:"defineFunction",value:function(e,t){function n(){var e,n=t.apply(void 0,arguments);return"color"===o?n=rl.get(n):"function<color>"===o?(e=n,n=function(){var t=e.apply(void 0,arguments);return rl.get(t)},Object.assign(n,e)):"array<color>"===o&&(n=n.map((function(e){return rl.get(e)}))),n}var r=2<arguments.length&&void 0!==arguments[2]?arguments[2]:t,a=void 0===(a=r.instance)||a,o=r.returns;e in rl||(rl[e]=n),a&&(rl.prototype[e]=function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return n.apply(void 0,[this].concat(t))})}},{key:"defineFunctions",value:function(e){for(var t in e)rl.defineFunction(t,e[t],e[t])}},{key:"extend",value:function(e){if(e.register)e.register(rl);else for(var t in e)rl.defineFunction(t,e[t])}}]));rl.defineFunctions({get:io,getAll:oo,set:uo,setAll:lo,to:Ao,equals:function(e,t){return e=ao(e),t=ao(t),e.space===t.space&&e.alpha===t.alpha&&e.coords.every((function(e,n){return e===t.coords[n]}))},inGamut:wo,toGamut:Eo,distance:Mo,toString:Fo}),Object.assign(rl,{util:we,hooks:Ua,WHITES:Ya,Space:eo,spaces:eo.registry,parse:ro,defaults:Wa});for(var al,ol=0,il=Object.keys(nl);ol<il.length;ol++){var ll=il[ol];eo.register(nl[ll])}for(al in eo.registry)ul(al,eo.registry[al]);function ul(e,t){Object.keys(t.coords),Object.values(t.coords).map((function(e){return e.name}));var n=e.replace(/-/g,"_");Object.defineProperty(rl.prototype,n,{get:function(){var n=this,r=this.getAll(e);return"undefined"==typeof Proxy?r:new Proxy(r,{has:function(e,n){try{return eo.resolveCoord([t,n]),!0}catch(e){}return Reflect.has(e,n)},get:function(e,n,r){if(n&&"symbol"!==a(n)&&!(n in e)){var o=eo.resolveCoord([t,n]).index;if(0<=o)return e[o]}return Reflect.get(e,n,r)},set:function(r,o,i,l){if(o&&"symbol"!==a(o)&&!(o in r)||0<=o){var u=eo.resolveCoord([t,o]).index;if(0<=u)return r[u]=i,n.setAll(e,r),!0}return Reflect.set(r,o,i,l)}})},set:function(t){this.setAll(e,t)},configurable:!0,enumerable:!0})}Ua.add("colorspace-init-end",(function(e){var t;ul(e.id,e),null!=(t=e.aliases)&&t.forEach((function(t){ul(t,e)}))})),rl.extend(Di),rl.extend({deltaE:wi}),rl.extend(xi),rl.extend({contrast:function(e,t){var n,r=2<arguments.length&&void 0!==arguments[2]?arguments[2]:{},a=(r=r=Ba(r)?{algorithm:r}:r).algorithm,o=k(r,u);if(!a)throw r=Object.keys(Go).map((function(e){return e.replace(/^contrast/,"")})).join(", "),new TypeError("contrast() function needs a contrast algorithm. Please specify one of: ".concat(r));for(n in e=ao(e),t=ao(t),Go)if("contrast"+a.toLowerCase()===n.toLowerCase())return Go[n](e,t,o);throw new TypeError("Unknown contrast algorithm: ".concat(a))}}),rl.extend(Uo),rl.extend(ue),rl.extend(ki),rl.extend(Go);var sl=de(xn()),cl=(Oa.default.templateSettings.strip=!1,o._memoizedFns=[],function(e){return e=(0,Pa.default)(e),o._memoizedFns.push(e),e}),dl=cl((function(e){return!(null==e||!e.createElement)&&"A"===e.createElement("A").localName}));function pl(e,t){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:{};if(!t)return"";var a=t.getRootNode&&t.getRootNode()||r;if(11!==a.nodeType)return e(t,n,a);for(var o=[];11===a.nodeType;){if(!a.host)return"";o.unshift({elm:t,doc:a}),a=(t=a.host).getRootNode()}return o.unshift({elm:t,doc:a}),o.map((function(t){return e(t.elm,n,t.doc)}))}var fl=["class","style","id","selected","checked","disabled","tabindex","aria-checked","aria-selected","aria-invalid","aria-activedescendant","aria-busy","aria-disabled","aria-expanded","aria-grabbed","aria-pressed","aria-valuenow","xmlns"],ml=31,hl=/([\\\\"])/g,gl=/(\\r\\n|\\r|\\n)/g;function vl(e){return e.replace(hl,"\\\\$1").replace(gl,"\\\\a ")}function bl(e,t){var n,r=t.name;return-1!==r.indexOf("href")||-1!==r.indexOf("src")?(n=Ra(e.getAttribute(r)))?Aa(t.name)+'$="'+vl(n)+'"':Aa(t.name)+'="'+vl(e.getAttribute(r))+'"':Aa(r)+'="'+vl(t.value)+'"'}function yl(e,t){return e.count<t.count?-1:e.count===t.count?0:1}function Dl(e){return!fl.includes(e.name)&&-1===e.name.indexOf(":")&&(!e.value||e.value.length<ml)}function wl(e){for(var t={classes:{},tags:{},attributes:{}},n=(e=Array.isArray(e)?e:[e]).slice(),r=[];n.length;)(()=>{var e,a=n.pop(),o=a.actualNode;for(o.querySelectorAll&&(e=o.nodeName,t.tags[e]?t.tags[e]++:t.tags[e]=1,o.classList&&Array.from(o.classList).forEach((function(e){e=Aa(e),t.classes[e]?t.classes[e]++:t.classes[e]=1})),o.hasAttributes())&&Array.from(Na(o)).filter(Dl).forEach((function(e){(e=bl(o,e))&&(t.attributes[e]?t.attributes[e]++:t.attributes[e]=1)})),a.children.length&&(r.push(n),n=a.children.slice());!n.length&&r.length;)n=r.pop()})();return t}function xl(e){var t=dl(r);return Aa(t?e.localName:e.nodeName.toLowerCase())}function El(e,t){var n,r,a,o,i,l,u,s,c,d="",p=(r=e,a=[],o=t.classes,i=t.tags,r.classList&&Array.from(r.classList).forEach((function(e){e=Aa(e),o[e]<i[r.nodeName]&&a.push({name:e,count:o[e],species:"class"})})),a.sort(yl));l=e,u=[],s=t.attributes,c=t.tags,l.hasAttributes()&&Array.from(Na(l)).filter(Dl).forEach((function(e){(e=bl(l,e))&&s[e]<c[l.nodeName]&&u.push({name:e,count:s[e],species:"attribute"})})),t=u.sort(yl);return p.length&&1===p[0].count?n=[p[0]]:t.length&&1===t[0].count?(n=[t[0]],d=xl(e)):((n=p.concat(t)).sort(yl),(n=n.slice(0,3)).some((function(e){return"class"===e.species}))?n.sort((function(e,t){return e.species!==t.species&&"class"===e.species?-1:e.species===t.species?0:1})):d=xl(e)),d+n.reduce((function(e,t){switch(t.species){case"class":return e+"."+t.name;case"attribute":return e+"["+t.name+"]"}return e}),"")}function Al(e,t,n){if(!o._selectorData)throw new Error("Expect axe._selectorData to be set up");var a,i,l=void 0!==(t=t.toRoot)&&t;do{var u=(e=>{var t;if(e.getAttribute("id"))return t=e.getRootNode&&e.getRootNode()||r,(e="#"+Aa(e.getAttribute("id")||"")).match(/player_uid_/)||1!==t.querySelectorAll(e).length?void 0:e})(e);u||(u=El(e,o._selectorData),u+=((e,t)=>{var n=e.parentNode&&Array.from(e.parentNode.children||"")||[];return n.find((function(n){return n!==e&&Ta(n,t)}))?":nth-child("+(1+n.indexOf(e))+")":""})(e,u)),a=a?u+" > "+a:u,i=!i||i.length>oa.selectorSimilarFilterLimit?Cl(n,a):i.filter((function(e){return Ta(e,a)})),e=e.parentElement}while((1<i.length||l)&&e&&11!==e.nodeType);return 1===i.length?a:-1!==a.indexOf(" > ")?":root"+a.substring(a.indexOf(" > ")):":root"}var Fl=cl((function(e,t){return pl(Al,e,t)})),Cl=cl((function(e,t){return Array.from(e.querySelectorAll(t))}));function kl(e){var t=e.nodeName.toLowerCase(),n=e.parentElement,r=e.parentNode,a="";return"head"!==t&&"body"!==t&&1<(null==r?void 0:r.children.length)&&(r=Array.prototype.indexOf.call(r.children,e)+1,a=":nth-child(".concat(r,")")),n?kl(n)+" > "+t+a:t+a}function Rl(e,t){return pl(kl,e,t)}var Nl=function(e){return function e(t,n){var r,a,o,i;if(!t)return[];if(!n&&9===t.nodeType)return[{str:"html"}];if(n=n||[],t.parentNode&&t.parentNode!==t&&(n=e(t.parentNode,n)),t.previousSibling){for(a=1,r=t.previousSibling;1===r.nodeType&&r.nodeName===t.nodeName&&a++,r=r.previousSibling;);1===a&&(a=null)}else if(t.nextSibling)for(r=t.nextSibling;r=1===r.nodeType&&r.nodeName===t.nodeName?(a=1,null):(a=null,r.previousSibling););return 1===t.nodeType&&((o={}).str=t.nodeName.toLowerCase(),(i=t.getAttribute&&Aa(t.getAttribute("id")))&&1===t.ownerDocument.querySelectorAll("#"+i).length&&(o.id=t.getAttribute("id")),1<a&&(o.count=a),n.push(o)),n}(e).reduce((function(e,t){return t.id?"//".concat(t.str,"[@id='").concat(t.id,"']"):e+"/".concat(t.str)+(0<t.count?"[".concat(t.count,"]"):"")}),"")},Tl={},Sl={set:function(e,t){var n;xa("string"==typeof(n=e),"key must be a string, "+a(n)+" given"),xa(""!==n,"key must not be empty"),Tl[e]=t},get:function(e,t){var n;return xa("function"==typeof(n=t)||void 0===n,"creator must be a function or undefined, "+a(n)+" given"),e in Tl?Tl[e]:"function"==typeof t?(n=t(),xa(void 0!==n,"Cache creator function should not return undefined"),this.set(e,n),Tl[e]):void 0},clear:function(){Tl={}}},_l=function(e,t){return t=t||e,Sl.get("nodeMap")?Sl.get("nodeMap").get(t):null},Ol={},Ml=(ce(Ol,{createGrid:function(){return Su},findElmsInContext:function(){return Il},findNearbyElms:function(){return Lu},findUp:function(){return jl},findUpVirtual:function(){return Bl},focusDisabled:function(){return Uu},getComposedParent:function(){return ou},getElementByReference:function(){return Xu},getElementCoordinates:function(){return lu},getElementStack:function(){return es},getModalDialog:function(){return zu},getNodeGrid:function(){return ju},getOverflowHiddenAncestors:function(){return zl},getRootNode:function(){return Pl},getScrollOffset:function(){return iu},getTabbableElements:function(){return ts},getTargetRects:function(){return os},getTargetSize:function(){return is},getTextElementStack:function(){return zc},getViewportSize:function(){return uu},getVisibleChildTextRects:function(){return Lc},hasContent:function(){return Wc},hasContentVirtual:function(){return Uc},hasLangText:function(){return Yc},idrefs:function(){return us},insertedIntoFocusOrder:function(){return Kc},isCurrentPageLink:function(){return Ku},isFocusable:function(){return rs},isHTML5:function(){return Qc},isHiddenForEveryone:function(){return nu},isHiddenWithCSS:function(){return Jc},isInTabOrder:function(){return as},isInTextBlock:function(){return rd},isInert:function(){return Vu},isModalOpen:function(){return ad},isMultiline:function(){return od},isNativelyFocusable:function(){return ns},isNode:function(){return id},isOffscreen:function(){return su},isOpaque:function(){return vd},isSkipLink:function(){return bd},isVisible:function(){return xd},isVisibleOnScreen:function(){return du},isVisibleToScreenReaders:function(){return nc},isVisualContent:function(){return Gc},reduceToElementsBelowFloating:function(){return Ed},shadowElementsFromPoint:function(){return Cd},urlPropsFromAttribute:function(){return kd},visuallyContains:function(){return Ad},visuallyOverlaps:function(){return Rd},visuallySort:function(){return Zu}}),function(e){var t=e.getRootNode&&e.getRootNode()||r;return t===e?r:t}),Pl=Ml,Il=function(e){var t=e.context,n=e.attr,r=void 0===(r=e.elm)?"":r;e=Aa(e.value),t=9===t.nodeType||11===t.nodeType?t:Pl(t);return Array.from(t.querySelectorAll(r+"["+n+"="+e+"]"))},Bl=function(e,t){var n=e.actualNode;if(!e.shadowId&&"function"==typeof e.actualNode.closest)return e.actualNode.closest(t)||null;for(;(n=(n=n.assignedSlot||n.parentNode)&&11===n.nodeType?n.host:n)&&!Ta(n,t)&&n!==r.documentElement;);return n&&Ta(n,t)?n:null},jl=function(e,t){return Bl(_l(e),t)};function Ll(e,t){return(0|e.left)<(0|t.right)&&(0|e.right)>(0|t.left)&&(0|e.top)<(0|t.bottom)&&(0|e.bottom)>(0|t.top)}var ql=cl((function(e){var t=[];return e?("hidden"===e.getComputedStylePropertyValue("overflow")&&t.push(e),t.concat(ql(e.parent))):t})),zl=ql,Vl=/rect\\s*\\(([0-9]+)px,?\\s*([0-9]+)px,?\\s*([0-9]+)px,?\\s*([0-9]+)px\\s*\\)/,Gl=/(\\w+)\\((\\d+)/;function $l(e){return["style","script","noscript","template"].includes(e.props.nodeName)}function Hl(e){return"area"!==e.props.nodeName&&"none"===e.getComputedStylePropertyValue("display")}function Ul(e){return!(1<arguments.length&&void 0!==arguments[1]?arguments[1]:{}).isAncestor&&["hidden","collapse"].includes(e.getComputedStylePropertyValue("visibility"))}function Wl(e){return!!(1<arguments.length&&void 0!==arguments[1]?arguments[1]:{}).isAncestor&&"hidden"===e.getComputedStylePropertyValue("content-visibility")}function Yl(e){return"true"===e.attr("aria-hidden")}function Kl(e){return"0"===e.getComputedStylePropertyValue("opacity")}function Xl(e){var t=Cf(e.actualNode),n=parseInt(e.getComputedStylePropertyValue("height"));e=parseInt(e.getComputedStylePropertyValue("width"));return!!t&&(0===n||0===e)}function Zl(e){var t,n,r;return!(1<arguments.length&&void 0!==arguments[1]?arguments[1]:{}).isAncestor&&"fixed"!==(t=e.getComputedStylePropertyValue("position"))&&!!(n=zl(e)).length&&(r=e.boundingClientRect,n.some((function(n){return!("absolute"===t&&!((e,t)=>{for(var n=e.parent;n&&n!==t;){if(["relative","sticky"].includes(n.getComputedStylePropertyValue("position")))return 1;n=n.parent}})(e,n)&&"static"===n.getComputedStylePropertyValue("position"))&&((n=n.boundingClientRect).width<2||n.height<2||!Ll(r,n))})))}function Jl(e){var t=e.getComputedStylePropertyValue("clip").match(Vl),n=e.getComputedStylePropertyValue("clip-path").match(Gl);if(t&&5===t.length&&(e=e.getComputedStylePropertyValue("position"),["fixed","absolute"].includes(e)))return t[3]-t[1]<=0&&t[2]-t[4]<=0;if(n){e=n[1];var r=parseInt(n[2],10);switch(e){case"inset":return 50<=r;case"circle":return 0===r}}return!1}function Ql(e,t){var n,r=Wd(e,"map");return!r||!((r=r.attr("name"))&&(e=Ml(e.actualNode))&&9===e.nodeType&&(n=fm(o._tree,'img[usemap="#'.concat(Aa(r),'"]')))&&n.length)||n.some((function(e){return!t(e)}))}function eu(e){var t;return"details"===(null==(t=e.parent)?void 0:t.props.nodeName)&&(("summary"!==e.props.nodeName||e.parent.children.find((function(e){return"summary"===e.props.nodeName}))!==e)&&!e.parent.hasAttr("open"))}var tu=[Hl,Ul,Wl,eu];function nu(e){var t=(n=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{}).skipAncestors,n=void 0!==(n=n.isAncestor)&&n;return e=Hf(e).vNode,(t?ru:au)(e,n)}var ru=cl((function(e,t){return!!$l(e)||!(!e.actualNode||!tu.some((function(n){return n(e,{isAncestor:t})}))&&e.actualNode.isConnected)})),au=cl((function(e,t){return!!ru(e,t)||!!e.parent&&au(e.parent,!0)})),ou=function e(t){if(t.assignedSlot)return e(t.assignedSlot);if(t.parentNode){if(1===(t=t.parentNode).nodeType)return t;if(t.host)return t.host}return null},iu=function(e){var t,n;return 9===(e=!e.nodeType&&e.document?e.document:e).nodeType?(t=e.documentElement,n=e.body,{left:t&&t.scrollLeft||n&&n.scrollLeft||0,top:t&&t.scrollTop||n&&n.scrollTop||0}):{left:e.scrollLeft,top:e.scrollTop}},lu=function(e){var t=(n=iu(r)).left,n=n.top;return{top:(e=e.getBoundingClientRect()).top+n,right:e.right+t,bottom:e.bottom+n,left:e.left+t,width:e.right-e.left,height:e.bottom-e.top}},uu=function(e){var t=e.document,n=t.documentElement;return e.innerWidth?{width:e.innerWidth,height:e.innerHeight}:n?{width:n.clientWidth,height:n.clientHeight}:{width:(e=t.body).clientWidth,height:e.clientHeight}},su=function(e){if((1<arguments.length&&void 0!==arguments[1]?arguments[1]:{}).isAncestor)return!1;if(e=Hf(e).domNode){var n=r.documentElement,a=t.getComputedStyle(e),o=t.getComputedStyle(r.body||n).getPropertyValue("direction"),i=lu(e);if(i.bottom<0&&(((e,t)=>{for(e=ou(e);e&&"html"!==e.nodeName.toLowerCase();){if(e.scrollTop&&0<=(t+=e.scrollTop))return;e=ou(e)}return 1})(e,i.bottom)||"absolute"===a.position))return!0;if(0!==i.left||0!==i.right)if("ltr"===o){if(i.right<=0)return!0}else if(e=Math.max(n.scrollWidth,uu(t).width),i.left>=e)return!0;return!1}},cu=[Kl,Xl,Zl,Jl,su];function du(e){return e=Hf(e).vNode,pu(e)}var pu=cl((function(e,t){return e.actualNode&&"area"===e.props.nodeName?!Ql(e,pu):!(nu(e,{skipAncestors:!0,isAncestor:t})||e.actualNode&&cu.some((function(n){return n(e,{isAncestor:t})})))&&(!e.parent||pu(e.parent,!0))}));function fu(e,n){var r=Math.min(e.top,n.top),a=Math.max(e.right,n.right),o=Math.max(e.bottom,n.bottom);e=Math.min(e.left,n.left);return new t.DOMRect(e,r,a-e,o-r)}function mu(e,t){var n=e.x;e=e.y;return t.top<=e&&n<=t.right&&e<=t.bottom&&t.left<=n}var hu={};function gu(e,n){var r=Math.max(e.left,n.left),a=Math.min(e.right,n.right),o=Math.max(e.top,n.top);e=Math.min(e.bottom,n.bottom);return a<=r||e<=o?null:new t.DOMRect(r,o,a-r,e-o)}function vu(e){var n=e.left;return new t.DOMPoint(n+e.width/2,e.top+e.height/2)}ce(hu,{getBoundingRect:function(){return fu},getIntersectionRect:function(){return gu},getOffset:function(){return Du},getRectCenter:function(){return vu},hasVisualOverlap:function(){return xu},isPointInRect:function(){return mu},rectHasMinimumSize:function(){return yu},rectsOverlap:function(){return Ll},splitRects:function(){return Eu}});var bu=.05;function yu(e,t){return e<=t.width+bu&&e<=t.height+bu}function Du(e,t){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:12,r=(e=os(e),os(t));if(!e.length||!r.length)return null;var a,o=vu(e.reduce(fu)),i=1/0,l=K(r);try{for(l.s();!(a=l.n()).done;){var u=a.value;if(mu(o,u))return 0;var s=wu(o,((e,t)=>({x:e.x<t.left?t.left:e.x>t.right?t.right:e.x,y:t=e.y<t.top?t.top:e.y>t.bottom?t.bottom:e.y}))(o,u));i=Math.min(i,s)}}catch(e){l.e(e)}finally{l.f()}return yu(2*n,is(t))?i:(e=wu(o,vu(r.reduce(fu)))-n,Math.max(0,Math.min(i,e)))}function wu(e,t){return Math.hypot(e.x-t.x,e.y-t.y)}function xu(e,t){var n=e.boundingClientRect,r=t.boundingClientRect;return!(n.left>=r.right||n.right<=r.left||n.top>=r.bottom||n.bottom<=r.top)&&0<Zu(e,t)}function Eu(e,t){var n,r=[e],a=K(t);try{var o=function(){var e=n.value;if(4e3<(r=r.reduce((function(t,n){return t.concat(((e,t)=>{var n=e.top,r=e.left,a=e.bottom,o=e.right,i=n<t.bottom&&a>t.top,l=r<t.right&&o>t.left,u=[];if(Au(t.top,n,a)&&l&&u.push({top:n,left:r,bottom:t.top,right:o}),Au(t.right,r,o)&&i&&u.push({top:n,left:t.right,bottom:a,right:o}),Au(t.bottom,n,a)&&l&&u.push({top:t.bottom,right:o,bottom:a,left:r}),Au(t.left,r,o)&&i&&u.push({top:n,left:r,bottom:a,right:t.left}),0===u.length){if(((e,t)=>e.top>=t.top&&e.left>=t.left&&e.bottom<=t.bottom&&e.right<=t.right)(e,t))return[];u.push(e)}return u.map(Fu)})(n,e))}),[])).length)throw new Error("splitRects: Too many rects")};for(a.s();!(n=a.n()).done;)o()}catch(e){a.e(e)}finally{a.f()}return r}var Au=function(e,t,n){return t<e&&e<n};function Fu(e){return new t.DOMRect(e.left,e.top,e.right-e.left,e.bottom-e.top)}var Cu=0,ku=.1,Ru=.2,Nu=.3,Tu=0;function Su(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:r.body,n=1<arguments.length?arguments[1]:void 0,a=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;if(!Sl.get("gridCreated")||a){Sl.set("gridCreated",!0),a||(l=(l=_l(r.documentElement))||new Sd(r.documentElement),Tu=0,l._stackingOrder=[Mu(Cu,Tu++,null)],Pu(n=null!=n?n:new Iu,l),Cf(l.actualNode)&&(i=new Iu(l),l._subGrid=i));for(var i,l,u=r.createTreeWalker(e,t.NodeFilter.SHOW_ELEMENT,null,!1),s=a?u.nextNode():u.currentNode;s;){var c=_l(s),d=(c&&c.parent?a=c.parent:s.assignedSlot?a=_l(s.assignedSlot):s.parentElement?a=_l(s.parentElement):s.parentNode&&_l(s.parentNode)&&(a=_l(s.parentNode)),(c=c||new o.VirtualNode(s,a))._stackingOrder=((e,t,n)=>{var r=t._stackingOrder.slice(),a=(_u(e,t)&&-1!==(a=r.findIndex((function(e){return e=e.stackLevel,[Cu,Ru,Nu].includes(e)})))&&r.splice(a,r.length-a),((e,t)=>{var n=((e,t)=>"static"!==e.getComputedStylePropertyValue("position")||Ou(t)?e.getComputedStylePropertyValue("z-index"):"auto")(e,t);return["auto","0"].includes(n)?"static"!==e.getComputedStylePropertyValue("position")?Nu:"none"!==e.getComputedStylePropertyValue("float")?Ru:_u(e,t)?ku:null:parseInt(n)})(e,t));return null!==a&&r.push(Mu(a,n,e)),r})(c,a,Tu++),((e,t)=>{for(var n=null,r=[e];t;){if(Cf(t.actualNode)){n=t;break}if(t._scrollRegionParent){n=t._scrollRegionParent;break}r.push(t),t=_l(t.actualNode.parentElement||t.actualNode.parentNode)}return r.forEach((function(e){return e._scrollRegionParent=n})),n})(c,a)),p=(d=d?d._subGrid:n,Cf(c.actualNode)&&(p=new Iu(c),c._subGrid=p),c.boundingClientRect);0!==p.width&&0!==p.height&&du(s)&&Pu(d,c),Wp(s)&&Su(s.shadowRoot,d,c),s=u.nextNode()}}return oa.gridSize}function _u(e,t){var n=e.getComputedStylePropertyValue("position"),r=e.getComputedStylePropertyValue("z-index");return"fixed"===n||"sticky"===n||"auto"!==r&&"static"!==n||"1"!==e.getComputedStylePropertyValue("opacity")||"none"!==(e.getComputedStylePropertyValue("-webkit-transform")||e.getComputedStylePropertyValue("-ms-transform")||e.getComputedStylePropertyValue("transform")||"none")||(n=e.getComputedStylePropertyValue("mix-blend-mode"))&&"normal"!==n||(n=e.getComputedStylePropertyValue("filter"))&&"none"!==n||(n=e.getComputedStylePropertyValue("perspective"))&&"none"!==n||(n=e.getComputedStylePropertyValue("clip-path"))&&"none"!==n||"none"!==(e.getComputedStylePropertyValue("-webkit-mask")||e.getComputedStylePropertyValue("mask")||"none")||"none"!==(e.getComputedStylePropertyValue("-webkit-mask-image")||e.getComputedStylePropertyValue("mask-image")||"none")||"none"!==(e.getComputedStylePropertyValue("-webkit-mask-border")||e.getComputedStylePropertyValue("mask-border")||"none")||"isolate"===e.getComputedStylePropertyValue("isolation")||"transform"===(n=e.getComputedStylePropertyValue("will-change"))||"opacity"===n||"touch"===e.getComputedStylePropertyValue("-webkit-overflow-scrolling")||(n=e.getComputedStylePropertyValue("contain"),["layout","paint","strict","content"].includes(n))||!("auto"===r||!Ou(t))}function Ou(e){if(e)return e=e.getComputedStylePropertyValue("display"),["flex","inline-flex","grid","inline-grid"].includes(e)}function Mu(e,t,n){return{stackLevel:e,treeOrder:t,vNode:n}}function Pu(e,t){var n=zl(t);t.clientRects.forEach((function(r){r=n.reduce((function(e,t){return e&&gu(e,t.boundingClientRect)}),r);r&&(null==t._grid&&(t._grid=e),r=e.getGridPositionOfRect(r),e.loopGridPosition(r,(function(e){e.includes(t)||e.push(t)})))}))}var Iu=W((function e(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:null;H(this,e),this.container=t,this.cells=[]}),[{key:"toGridIndex",value:function(e){return Math.floor(e/oa.gridSize)}},{key:"getCellFromPoint",value:function(e){var t=e.x;e=e.y,xa(this.boundaries,"Grid does not have cells added"),e=this.toGridIndex(e),t=this.toGridIndex(t);return null!=(t=(e=(xa(mu({y:e,x:t},this.boundaries),"Element midpoint exceeds the grid bounds"),null!=(e=this.cells[e-this.cells._negativeIndex])?e:[]))[t-e._negativeIndex])?t:[]}},{key:"loopGridPosition",value:function(e,t){var n=(o=e).left,r=o.right,a=o.top,o=o.bottom;this.boundaries&&(e=fu(this.boundaries,e)),this.boundaries=e,Bu(this.cells,a,o,(function(e,a){Bu(e,n,r,(function(e,n){t(e,{row:a,col:n})}))}))}},{key:"getGridPositionOfRect",value:function(e){var n=e.top,r=e.right,a=e.bottom,o=(e=e.left,1<arguments.length&&void 0!==arguments[1]?arguments[1]:0);n=this.toGridIndex(n-o),r=this.toGridIndex(r+o-1),a=this.toGridIndex(a+o-1),e=this.toGridIndex(e-o);return new t.DOMRect(e,n,r-e,a-n)}}]);function Bu(e,t,n,r){if(null!=e._negativeIndex||(e._negativeIndex=0),t<e._negativeIndex){for(var a=0;a<e._negativeIndex-t;a++)e.splice(0,0,[]);e._negativeIndex=t}for(var o,i=n-e._negativeIndex,l=t-e._negativeIndex;l<=i;l++)null==e[o=l]&&(e[o]=[]),r(e[l],l+e._negativeIndex)}function ju(e){return Su(),Hf(e).vNode._grid}function Lu(e){var t,n,r,a=1<arguments.length&&void 0!==arguments[1]?arguments[1]:0,o=ju(e);return null!=o&&null!=(n=o.cells)&&n.length?(n=e.boundingClientRect,t=qu(e),n=o.getGridPositionOfRect(n,a),r=[],o.loopGridPosition(n,(function(n){var a,o=K(n);try{for(o.s();!(a=o.n()).done;){var i=a.value;i&&i!==e&&!r.includes(i)&&t===qu(i)&&r.push(i)}}catch(n){o.e(n)}finally{o.f()}})),r):[]}var qu=cl((function(e){return!!e&&("fixed"===e.getComputedStylePropertyValue("position")||qu(e.parent))})),zu=cl((function(){var e;return o._tree&&(e=rm(o._tree[0],"dialog[open]",(function(e){var t=e.boundingClientRect;return r.elementsFromPoint(t.left+1,t.top+1).includes(e.actualNode)&&du(e)}))).length?e.find((function(e){var t=e.boundingClientRect;return r.elementsFromPoint(t.left-10,t.top-10).includes(e.actualNode)}))||(null!=(e=e.find((function(e){e=null!=(e=(e=>{Su();var n=o._tree[0]._grid,r=new t.DOMRect(0,0,t.innerWidth,t.innerHeight);if(n)for(var a=0;a<n.cells.length;a++){var i=n.cells[a];if(i)for(var l=0;l<i.length;l++){var u=i[l];if(u)for(var s=0;s<u.length;s++){var c=u[s],d=gu(c.boundingClientRect,r);if("html"!==c.props.nodeName&&c!==e&&"none"!==c.getComputedStylePropertyValue("pointer-events")&&d)return{vNode:c,rect:d}}}}})(e))?e:{};var n=e.vNode;e=e.rect;return!!n&&!r.elementsFromPoint(e.left+1,e.top+1).includes(n.actualNode)})))?e:null):null}));function Vu(e){var t=(n=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{}).skipAncestors,n=n.isAncestor;return(t?Gu:$u)(e,n)}var Gu=cl((function(e,t){return!!e.hasAttr("inert")||!(t||!e.actualNode||!(t=zu())||Vp(t,e))})),$u=cl((function(e,t){return!!Gu(e,t)||!!e.parent&&$u(e.parent,!0)})),Hu=["button","command","fieldset","keygen","optgroup","option","select","textarea","input"],Uu=function(e){var t=Hf(e).vNode;if(e=t.props.nodeName,Hu.includes(e)&&t.hasAttr("disabled")||Vu(t))return!0;for(var n=t.parent,r=[],a=!1;n&&n.shadowId===t.shadowId&&!a&&(r.push(n),"legend"!==n.props.nodeName);){if(void 0!==n._inDisabledFieldset){a=n._inDisabledFieldset;break}"fieldset"===n.props.nodeName&&n.hasAttr("disabled")&&(a=!0),n=n.parent}return r.forEach((function(e){return e._inDisabledFieldset=a})),!!a||"area"!==t.props.nodeName&&!!t.actualNode&&nu(t)},Wu=/^\\/\\#/,Yu=/^#[!/]/;function Ku(e){var n,r,a,o,i=e.getAttribute("href");return!(!i||"#"===i)&&(!!Wu.test(i)||(o=e.hash,n=e.protocol,r=e.hostname,a=e.port,e=e.pathname,!Yu.test(o)&&("#"===i.charAt(0)||("string"!=typeof(null==(o=t.location)?void 0:o.origin)||-1===t.location.origin.indexOf("://")?null:(i=t.location.origin+t.location.pathname,o=r?"".concat(n,"//").concat(r).concat(a?":".concat(a):""):t.location.origin,(o+=e?("/"!==e[0]?"/":"")+e:t.location.pathname)===i)))))}var Xu=function(e,t){var n=e.getAttribute(t);return n&&("href"!==t||Ku(e))?(-1!==n.indexOf("#")&&(n=decodeURIComponent(n.substr(n.indexOf("#")+1))),(t=r.getElementById(n))||((t=r.getElementsByName(n)).length?t[0]:null)):null};function Zu(e,n){Su();for(var r=Math.max(e._stackingOrder.length,n._stackingOrder.length),a=0;a<r;a++){if(void 0===n._stackingOrder[a])return-1;if(void 0===e._stackingOrder[a])return 1;if(n._stackingOrder[a].stackLevel>e._stackingOrder[a].stackLevel)return 1;if(n._stackingOrder[a].stackLevel<e._stackingOrder[a].stackLevel)return-1;if(n._stackingOrder[a].treeOrder!==e._stackingOrder[a].treeOrder)return n._stackingOrder[a].treeOrder-e._stackingOrder[a].treeOrder}var o=e.actualNode,i=n.actualNode;if(o.getRootNode&&o.getRootNode()!==i.getRootNode()){for(var l=[];o;)l.push({root:o.getRootNode(),node:o}),o=o.getRootNode().host;for(;i&&!l.find((function(e){return e.root===i.getRootNode()}));)i=i.getRootNode().host;if((o=l.find((function(e){return e.root===i.getRootNode()})).node)===i)return e.actualNode.getRootNode()!==o.getRootNode()?-1:1}var u,s=(d=t.Node).DOCUMENT_POSITION_FOLLOWING,c=d.DOCUMENT_POSITION_CONTAINS,d=d.DOCUMENT_POSITION_CONTAINED_BY;s=(u=o.compareDocumentPosition(i))&s?1:-1,c=u&c||u&d;return(u=Ju(e))===(d=Ju(n))||c?s:d-u}function Ju(e){return-1!==e.getComputedStylePropertyValue("display").indexOf("inline")?2:function e(t){if(!t)return!1;if(void 0!==t._isFloated)return t._isFloated;var n=t.getComputedStylePropertyValue("float");return"none"!==n?t._isFloated=!0:(n=e(t.parent),t._isFloated=n,n)}(e)?1:0}function Qu(e,t,n){n=2<arguments.length&&void 0!==n&&n,t=vu(t);var a=e.getCellFromPoint(t)||[],o=Math.floor(t.x),i=Math.floor(t.y);t=a.filter((function(e){return e.clientRects.some((function(e){var t=e.left,n=e.top;return o<Math.floor(t+e.width)&&o>=Math.floor(t)&&i<Math.floor(n+e.height)&&i>=Math.floor(n)}))}));return(a=e.container)&&(t=Qu(a._grid,a.boundingClientRect,!0).concat(t)),n?t:t.sort(Zu).map((function(e){return e.actualNode})).concat(r.documentElement).filter((function(e,t,n){return n.indexOf(e)===t}))}var es=function(e){var t=ju(e);return t?Qu(t,_l(e).boundingClientRect):[]},ts=function(e){return fm(e,"*").filter((function(e){var t=e.isFocusable;return null!==(e=Zf(e.actualNode.getAttribute("tabindex")))?t&&0<=e:t}))},ns=function(e){var t=Hf(e).vNode;if(t&&!Uu(t))switch(t.props.nodeName){case"a":case"area":if(t.hasAttr("href"))return!0;break;case"input":return"hidden"!==t.props.type;case"textarea":case"select":case"summary":case"button":return!0;case"details":return!fm(t,"summary").length}return!1};function rs(e){return 1===(e=Hf(e).vNode).props.nodeType&&!(Uu(e)||!ns(e)&&null===Zf(e.attr("tabindex")))}function as(e){return 1===(e=Hf(e).vNode).props.nodeType&&!(Zf(e.attr("tabindex"))<=-1)&&rs(e)}var os=cl((function(e){var t=e.boundingClientRect,n=Lu(e).filter((function(t){return xu(e,t)&&"none"!==t.getComputedStylePropertyValue("pointer-events")&&!(Vp(e,t)&&!as(t))}));return n.length?(n=n.map((function(e){return e.boundingClientRect})),Eu(t,n)):[t]})),is=cl((function(e,t){return((e,t)=>e.reduce((function(e,n){var r=yu(t,e);return r!==yu(t,n)?r?e:n:(r=e.width*e.height,n.width*n.height<r?e:n)})))(os(e),t)})),ls={},us=(ce(ls,{accessibleText:function(){return ss},accessibleTextVirtual:function(){return kc},autocomplete:function(){return Sc},formControlValue:function(){return gc},formControlValueMethods:function(){return mc},hasUnicode:function(){return Fc},isHumanInterpretable:function(){return Tc},isIconLigature:function(){return Cc},isValidAutocomplete:function(){return _c},label:function(){return Ic},labelText:function(){return yc},labelVirtual:function(){return Pc},nativeElementType:function(){return Bc},nativeTextAlternative:function(){return Ac},nativeTextMethods:function(){return Ec},removeUnicode:function(){return Nc},sanitize:function(){return Ns},subtreeText:function(){return bc},titleText:function(){return Js},unsupported:function(){return tc},visible:function(){return Mc},visibleTextNodes:function(){return jc},visibleVirtual:function(){return ac}}),function(e,t){e=e.actualNode||e;try{var n=Pl(e),r=[];if(a=e.getAttribute(t))for(var a=Yp(a),o=0;o<a.length;o++)r.push(n.getElementById(a[o]));return r}catch(e){throw new TypeError("Cannot resolve id references for non-DOM nodes")}}),ss=function(e,t){return kc(_l(e),t)},cs=function(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},n=Hf(e).vNode;return 1!==(null==n?void 0:n.props.nodeType)||1!==n.props.nodeType||t.inLabelledByContext||t.inControlContext||!n.attr("aria-labelledby")?"":us(n,"aria-labelledby").filter((function(e){return e})).reduce((function(e,r){return r=ss(r,O({inLabelledByContext:!0,startNode:t.startNode||n},t)),e?"".concat(e," ").concat(r):r}),"")};function ds(e){return 1===(null==(e=Hf(e).vNode)?void 0:e.props.nodeType)&&e.attr("aria-label")||""}var ps={"aria-activedescendant":{type:"idref",allowEmpty:!0},"aria-atomic":{type:"boolean",global:!0},"aria-autocomplete":{type:"nmtoken",values:["inline","list","both","none"]},"aria-braillelabel":{type:"string",allowEmpty:!0,global:!0},"aria-brailleroledescription":{type:"string",allowEmpty:!0,global:!0},"aria-busy":{type:"boolean",global:!0},"aria-checked":{type:"nmtoken",values:["false","mixed","true","undefined"]},"aria-colcount":{type:"int",minValue:-1},"aria-colindex":{type:"int",minValue:1},"aria-colspan":{type:"int",minValue:1},"aria-controls":{type:"idrefs",allowEmpty:!0,global:!0},"aria-current":{type:"nmtoken",allowEmpty:!0,values:["page","step","location","date","time","true","false"],global:!0},"aria-describedby":{type:"idrefs",allowEmpty:!0,global:!0},"aria-description":{type:"string",allowEmpty:!0,global:!0},"aria-details":{type:"idref",allowEmpty:!0,global:!0},"aria-disabled":{type:"boolean",global:!0},"aria-dropeffect":{type:"nmtokens",values:["copy","execute","link","move","none","popup"],global:!0},"aria-errormessage":{type:"idref",allowEmpty:!0,global:!0},"aria-expanded":{type:"nmtoken",values:["true","false","undefined"]},"aria-flowto":{type:"idrefs",allowEmpty:!0,global:!0},"aria-grabbed":{type:"nmtoken",values:["true","false","undefined"],global:!0},"aria-haspopup":{type:"nmtoken",allowEmpty:!0,values:["true","false","menu","listbox","tree","grid","dialog"],global:!0},"aria-hidden":{type:"nmtoken",values:["true","false","undefined"],global:!0},"aria-invalid":{type:"nmtoken",values:["grammar","false","spelling","true"],global:!0},"aria-keyshortcuts":{type:"string",allowEmpty:!0,global:!0},"aria-label":{type:"string",allowEmpty:!0,global:!0},"aria-labelledby":{type:"idrefs",allowEmpty:!0,global:!0},"aria-level":{type:"int",minValue:1},"aria-live":{type:"nmtoken",values:["assertive","off","polite"],global:!0},"aria-modal":{type:"boolean"},"aria-multiline":{type:"boolean"},"aria-multiselectable":{type:"boolean"},"aria-orientation":{type:"nmtoken",values:["horizontal","undefined","vertical"]},"aria-owns":{type:"idrefs",allowEmpty:!0,global:!0},"aria-placeholder":{type:"string",allowEmpty:!0},"aria-posinset":{type:"int",minValue:1},"aria-pressed":{type:"nmtoken",values:["false","mixed","true","undefined"]},"aria-readonly":{type:"boolean"},"aria-relevant":{type:"nmtokens",values:["additions","all","removals","text"],global:!0},"aria-required":{type:"boolean"},"aria-roledescription":{type:"string",allowEmpty:!0,global:!0},"aria-rowcount":{type:"int",minValue:-1},"aria-rowindex":{type:"int",minValue:1},"aria-rowspan":{type:"int",minValue:0},"aria-selected":{type:"nmtoken",values:["false","true","undefined"]},"aria-setsize":{type:"int",minValue:-1},"aria-sort":{type:"nmtoken",values:["ascending","descending","none","other"]},"aria-valuemax":{type:"decimal"},"aria-valuemin":{type:"decimal"},"aria-valuenow":{type:"decimal"},"aria-valuetext":{type:"string",allowEmpty:!0}},fs={alert:{type:"structure",allowedAttrs:["aria-expanded"],superclassRole:["section"]},alertdialog:{type:"window",allowedAttrs:["aria-expanded","aria-modal"],superclassRole:["alert","dialog"],accessibleNameRequired:!0},application:{type:"landmark",allowedAttrs:["aria-activedescendant","aria-expanded"],superclassRole:["structure"],accessibleNameRequired:!0},article:{type:"structure",allowedAttrs:["aria-posinset","aria-setsize","aria-expanded"],superclassRole:["document"]},banner:{type:"landmark",allowedAttrs:["aria-expanded"],superclassRole:["landmark"]},blockquote:{type:"structure",superclassRole:["section"]},button:{type:"widget",allowedAttrs:["aria-expanded","aria-pressed"],superclassRole:["command"],accessibleNameRequired:!0,nameFromContent:!0,childrenPresentational:!0},caption:{type:"structure",requiredContext:["figure","table","grid","treegrid"],superclassRole:["section"],prohibitedAttrs:["aria-label","aria-labelledby"]},cell:{type:"structure",requiredContext:["row"],allowedAttrs:["aria-colindex","aria-colspan","aria-rowindex","aria-rowspan","aria-expanded"],superclassRole:["section"],nameFromContent:!0},checkbox:{type:"widget",requiredAttrs:["aria-checked"],allowedAttrs:["aria-readonly","aria-expanded","aria-required"],superclassRole:["input"],accessibleNameRequired:!0,nameFromContent:!0,childrenPresentational:!0},code:{type:"structure",superclassRole:["section"],prohibitedAttrs:["aria-label","aria-labelledby"]},columnheader:{type:"structure",requiredContext:["row"],allowedAttrs:["aria-sort","aria-colindex","aria-colspan","aria-expanded","aria-readonly","aria-required","aria-rowindex","aria-rowspan","aria-selected"],superclassRole:["cell","gridcell","sectionhead"],accessibleNameRequired:!1,nameFromContent:!0},combobox:{type:"widget",requiredAttrs:["aria-expanded","aria-controls"],allowedAttrs:["aria-owns","aria-autocomplete","aria-readonly","aria-required","aria-activedescendant","aria-orientation"],superclassRole:["select"],accessibleNameRequired:!0},command:{type:"abstract",superclassRole:["widget"]},complementary:{type:"landmark",allowedAttrs:["aria-expanded"],superclassRole:["landmark"]},composite:{type:"abstract",superclassRole:["widget"]},contentinfo:{type:"landmark",allowedAttrs:["aria-expanded"],superclassRole:["landmark"]},comment:{type:"structure",allowedAttrs:["aria-level","aria-posinset","aria-setsize"],superclassRole:["article"]},definition:{type:"structure",allowedAttrs:["aria-expanded"],superclassRole:["section"]},deletion:{type:"structure",superclassRole:["section"],prohibitedAttrs:["aria-label","aria-labelledby"]},dialog:{type:"window",allowedAttrs:["aria-expanded","aria-modal"],superclassRole:["window"],accessibleNameRequired:!0},directory:{type:"structure",deprecated:!0,allowedAttrs:["aria-expanded"],superclassRole:["list"],nameFromContent:!0},document:{type:"structure",allowedAttrs:["aria-expanded"],superclassRole:["structure"]},emphasis:{type:"structure",superclassRole:["section"],prohibitedAttrs:["aria-label","aria-labelledby"]},feed:{type:"structure",requiredOwned:["article"],allowedAttrs:["aria-expanded"],superclassRole:["list"]},figure:{type:"structure",allowedAttrs:["aria-expanded"],superclassRole:["section"],nameFromContent:!0},form:{type:"landmark",allowedAttrs:["aria-expanded"],superclassRole:["landmark"]},grid:{type:"composite",requiredOwned:["rowgroup","row"],allowedAttrs:["aria-level","aria-multiselectable","aria-readonly","aria-activedescendant","aria-colcount","aria-expanded","aria-rowcount"],superclassRole:["composite","table"],accessibleNameRequired:!1},gridcell:{type:"widget",requiredContext:["row"],allowedAttrs:["aria-readonly","aria-required","aria-selected","aria-colindex","aria-colspan","aria-expanded","aria-rowindex","aria-rowspan"],superclassRole:["cell","widget"],nameFromContent:!0},group:{type:"structure",allowedAttrs:["aria-activedescendant","aria-expanded"],superclassRole:["section"]},heading:{type:"structure",requiredAttrs:["aria-level"],allowedAttrs:["aria-expanded"],superclassRole:["sectionhead"],accessibleNameRequired:!1,nameFromContent:!0},img:{type:"structure",allowedAttrs:["aria-expanded"],superclassRole:["section"],accessibleNameRequired:!0,childrenPresentational:!0},input:{type:"abstract",superclassRole:["widget"]},insertion:{type:"structure",superclassRole:["section"],prohibitedAttrs:["aria-label","aria-labelledby"]},landmark:{type:"abstract",superclassRole:["section"]},link:{type:"widget",allowedAttrs:["aria-expanded"],superclassRole:["command"],accessibleNameRequired:!0,nameFromContent:!0},list:{type:"structure",requiredOwned:["listitem"],allowedAttrs:["aria-expanded"],superclassRole:["section"]},listbox:{type:"widget",requiredOwned:["group","option"],allowedAttrs:["aria-multiselectable","aria-readonly","aria-required","aria-activedescendant","aria-expanded","aria-orientation"],superclassRole:["select"],accessibleNameRequired:!0},listitem:{type:"structure",requiredContext:["list"],allowedAttrs:["aria-level","aria-posinset","aria-setsize","aria-expanded"],superclassRole:["section"],nameFromContent:!0},log:{type:"structure",allowedAttrs:["aria-expanded"],superclassRole:["section"]},main:{type:"landmark",allowedAttrs:["aria-expanded"],superclassRole:["landmark"]},marquee:{type:"structure",allowedAttrs:["aria-expanded"],superclassRole:["section"]},math:{type:"structure",allowedAttrs:["aria-expanded"],superclassRole:["section"],childrenPresentational:!0},menu:{type:"composite",requiredOwned:["group","menuitemradio","menuitem","menuitemcheckbox","menu","separator"],allowedAttrs:["aria-activedescendant","aria-expanded","aria-orientation"],superclassRole:["select"]},menubar:{type:"composite",requiredOwned:["group","menuitemradio","menuitem","menuitemcheckbox","menu","separator"],allowedAttrs:["aria-activedescendant","aria-expanded","aria-orientation"],superclassRole:["menu"]},menuitem:{type:"widget",requiredContext:["menu","menubar","group"],allowedAttrs:["aria-posinset","aria-setsize","aria-expanded"],superclassRole:["command"],accessibleNameRequired:!0,nameFromContent:!0},menuitemcheckbox:{type:"widget",requiredContext:["menu","menubar","group"],requiredAttrs:["aria-checked"],allowedAttrs:["aria-expanded","aria-posinset","aria-readonly","aria-setsize"],superclassRole:["checkbox","menuitem"],accessibleNameRequired:!0,nameFromContent:!0,childrenPresentational:!0},menuitemradio:{type:"widget",requiredContext:["menu","menubar","group"],requiredAttrs:["aria-checked"],allowedAttrs:["aria-expanded","aria-posinset","aria-readonly","aria-setsize"],superclassRole:["menuitemcheckbox","radio"],accessibleNameRequired:!0,nameFromContent:!0,childrenPresentational:!0},meter:{type:"structure",requiredAttrs:["aria-valuenow"],allowedAttrs:["aria-valuemax","aria-valuemin","aria-valuetext"],superclassRole:["range"],accessibleNameRequired:!0,childrenPresentational:!0},mark:{type:"structure",superclassRole:["section"],prohibitedAttrs:["aria-label","aria-labelledby"]},navigation:{type:"landmark",allowedAttrs:["aria-expanded"],superclassRole:["landmark"]},none:{type:"structure",superclassRole:["structure"],prohibitedAttrs:["aria-label","aria-labelledby"]},note:{type:"structure",allowedAttrs:["aria-expanded"],superclassRole:["section"]},option:{type:"widget",requiredContext:["group","listbox"],allowedAttrs:["aria-selected","aria-checked","aria-posinset","aria-setsize"],superclassRole:["input"],accessibleNameRequired:!0,nameFromContent:!0,childrenPresentational:!0},paragraph:{type:"structure",superclassRole:["section"],prohibitedAttrs:["aria-label","aria-labelledby"]},presentation:{type:"structure",superclassRole:["structure"],prohibitedAttrs:["aria-label","aria-labelledby"]},progressbar:{type:"widget",allowedAttrs:["aria-expanded","aria-valuemax","aria-valuemin","aria-valuenow","aria-valuetext"],superclassRole:["range"],accessibleNameRequired:!0,childrenPresentational:!0},radio:{type:"widget",requiredAttrs:["aria-checked"],allowedAttrs:["aria-posinset","aria-setsize","aria-required"],superclassRole:["input"],accessibleNameRequired:!0,nameFromContent:!0,childrenPresentational:!0},radiogroup:{type:"composite",allowedAttrs:["aria-readonly","aria-required","aria-activedescendant","aria-expanded","aria-orientation"],superclassRole:["select"],accessibleNameRequired:!1},range:{type:"abstract",superclassRole:["widget"]},region:{type:"landmark",allowedAttrs:["aria-expanded"],superclassRole:["landmark"],accessibleNameRequired:!1},roletype:{type:"abstract",superclassRole:[]},row:{type:"structure",requiredContext:["grid","rowgroup","table","treegrid"],requiredOwned:["cell","columnheader","gridcell","rowheader"],allowedAttrs:["aria-colindex","aria-level","aria-rowindex","aria-selected","aria-activedescendant","aria-expanded","aria-posinset","aria-setsize"],superclassRole:["group","widget"],nameFromContent:!0},rowgroup:{type:"structure",requiredContext:["grid","table","treegrid"],requiredOwned:["row"],superclassRole:["structure"],nameFromContent:!0},rowheader:{type:"structure",requiredContext:["row"],allowedAttrs:["aria-sort","aria-colindex","aria-colspan","aria-expanded","aria-readonly","aria-required","aria-rowindex","aria-rowspan","aria-selected"],superclassRole:["cell","gridcell","sectionhead"],accessibleNameRequired:!1,nameFromContent:!0},scrollbar:{type:"widget",requiredAttrs:["aria-valuenow"],allowedAttrs:["aria-controls","aria-orientation","aria-valuemax","aria-valuemin","aria-valuetext"],superclassRole:["range"],childrenPresentational:!0},search:{type:"landmark",allowedAttrs:["aria-expanded"],superclassRole:["landmark"]},searchbox:{type:"widget",allowedAttrs:["aria-activedescendant","aria-autocomplete","aria-multiline","aria-placeholder","aria-readonly","aria-required"],superclassRole:["textbox"],accessibleNameRequired:!0},section:{type:"abstract",superclassRole:["structure"],nameFromContent:!0},sectionhead:{type:"abstract",superclassRole:["structure"],nameFromContent:!0},select:{type:"abstract",superclassRole:["composite","group"]},separator:{type:"structure",requiredAttrs:["aria-valuenow"],allowedAttrs:["aria-valuemax","aria-valuemin","aria-orientation","aria-valuetext"],superclassRole:["structure","widget"],childrenPresentational:!0},slider:{type:"widget",requiredAttrs:["aria-valuenow"],allowedAttrs:["aria-valuemax","aria-valuemin","aria-orientation","aria-readonly","aria-required","aria-valuetext"],superclassRole:["input","range"],accessibleNameRequired:!0,childrenPresentational:!0},spinbutton:{type:"widget",allowedAttrs:["aria-valuemax","aria-valuemin","aria-readonly","aria-required","aria-activedescendant","aria-valuetext","aria-valuenow"],superclassRole:["composite","input","range"],accessibleNameRequired:!0},status:{type:"structure",allowedAttrs:["aria-expanded"],superclassRole:["section"]},strong:{type:"structure",superclassRole:["section"],prohibitedAttrs:["aria-label","aria-labelledby"]},structure:{type:"abstract",superclassRole:["roletype"]},subscript:{type:"structure",superclassRole:["section"],prohibitedAttrs:["aria-label","aria-labelledby"]},superscript:{type:"structure",superclassRole:["section"],prohibitedAttrs:["aria-label","aria-labelledby"]},switch:{type:"widget",requiredAttrs:["aria-checked"],allowedAttrs:["aria-expanded","aria-readonly","aria-required"],superclassRole:["checkbox"],accessibleNameRequired:!0,nameFromContent:!0,childrenPresentational:!0},suggestion:{type:"structure",requiredOwned:["insertion","deletion"],superclassRole:["section"],prohibitedAttrs:["aria-label","aria-labelledby"]},tab:{type:"widget",requiredContext:["tablist"],allowedAttrs:["aria-posinset","aria-selected","aria-setsize","aria-expanded"],superclassRole:["sectionhead","widget"],nameFromContent:!0,childrenPresentational:!0},table:{type:"structure",requiredOwned:["rowgroup","row"],allowedAttrs:["aria-colcount","aria-rowcount","aria-expanded"],superclassRole:["section"],accessibleNameRequired:!1,nameFromContent:!0},tablist:{type:"composite",requiredOwned:["tab"],allowedAttrs:["aria-level","aria-multiselectable","aria-orientation","aria-activedescendant","aria-expanded"],superclassRole:["composite"]},tabpanel:{type:"structure",allowedAttrs:["aria-expanded"],superclassRole:["section"],accessibleNameRequired:!1},term:{type:"structure",allowedAttrs:["aria-expanded"],superclassRole:["section"],nameFromContent:!0},text:{type:"structure",superclassRole:["section"],nameFromContent:!0},textbox:{type:"widget",allowedAttrs:["aria-activedescendant","aria-autocomplete","aria-multiline","aria-placeholder","aria-readonly","aria-required"],superclassRole:["input"],accessibleNameRequired:!0},time:{type:"structure",superclassRole:["section"]},timer:{type:"structure",allowedAttrs:["aria-expanded"],superclassRole:["status"]},toolbar:{type:"structure",allowedAttrs:["aria-orientation","aria-activedescendant","aria-expanded"],superclassRole:["group"],accessibleNameRequired:!0},tooltip:{type:"structure",allowedAttrs:["aria-expanded"],superclassRole:["section"],nameFromContent:!0},tree:{type:"composite",requiredOwned:["group","treeitem"],allowedAttrs:["aria-multiselectable","aria-required","aria-activedescendant","aria-expanded","aria-orientation"],superclassRole:["select"],accessibleNameRequired:!1},treegrid:{type:"composite",requiredOwned:["rowgroup","row"],allowedAttrs:["aria-activedescendant","aria-colcount","aria-expanded","aria-level","aria-multiselectable","aria-orientation","aria-readonly","aria-required","aria-rowcount"],superclassRole:["grid","tree"],accessibleNameRequired:!1},treeitem:{type:"widget",requiredContext:["group","tree"],allowedAttrs:["aria-checked","aria-expanded","aria-level","aria-posinset","aria-selected","aria-setsize"],superclassRole:["listitem","option"],accessibleNameRequired:!0,nameFromContent:!0},widget:{type:"abstract",superclassRole:["roletype"]},window:{type:"abstract",superclassRole:["roletype"]}},ms=(el={a:{variant:{href:{matches:"[href]",contentTypes:["interactive","phrasing","flow"],allowedRoles:["button","checkbox","menuitem","menuitemcheckbox","menuitemradio","option","radio","switch","tab","treeitem","doc-backlink","doc-biblioref","doc-glossref","doc-noteref"],namingMethods:["subtreeText"]},default:{contentTypes:["phrasing","flow"],allowedRoles:!0}}},abbr:{contentTypes:["phrasing","flow"],allowedRoles:!0},address:{contentTypes:["flow"],allowedRoles:!0},area:{variant:{href:{matches:"[href]",allowedRoles:!1},default:{allowedRoles:["button","link"]}},contentTypes:["phrasing","flow"],namingMethods:["altText"]},article:{contentTypes:["sectioning","flow"],allowedRoles:["feed","presentation","none","document","application","main","region"],shadowRoot:!0},aside:{contentTypes:["sectioning","flow"],allowedRoles:["feed","note","presentation","none","region","search","doc-dedication","doc-example","doc-footnote","doc-glossary","doc-pullquote","doc-tip"]},audio:{variant:{controls:{matches:"[controls]",contentTypes:["interactive","embedded","phrasing","flow"]},default:{contentTypes:["embedded","phrasing","flow"]}},allowedRoles:["application"],chromiumRole:"Audio"},b:{contentTypes:["phrasing","flow"],allowedRoles:!0},base:{allowedRoles:!1,noAriaAttrs:!0},bdi:{contentTypes:["phrasing","flow"],allowedRoles:!0},bdo:{contentTypes:["phrasing","flow"],allowedRoles:!0},blockquote:{contentTypes:["flow"],allowedRoles:!0,shadowRoot:!0},body:{allowedRoles:!1,shadowRoot:!0},br:{contentTypes:["phrasing","flow"],allowedRoles:["presentation","none"],namingMethods:["titleText","singleSpace"]},button:{contentTypes:["interactive","phrasing","flow"],allowedRoles:["checkbox","combobox","gridcell","link","menuitem","menuitemcheckbox","menuitemradio","option","radio","separator","slider","switch","tab","treeitem"],namingMethods:["subtreeText"]},canvas:{allowedRoles:!0,contentTypes:["embedded","phrasing","flow"],chromiumRole:"Canvas"},caption:{allowedRoles:!1},cite:{contentTypes:["phrasing","flow"],allowedRoles:!0},code:{contentTypes:["phrasing","flow"],allowedRoles:!0},col:{allowedRoles:!1,noAriaAttrs:!0},colgroup:{allowedRoles:!1,noAriaAttrs:!0},data:{contentTypes:["phrasing","flow"],allowedRoles:!0},datalist:{contentTypes:["phrasing","flow"],allowedRoles:!1,noAriaAttrs:!0,implicitAttrs:{"aria-multiselectable":"false"}},dd:{allowedRoles:!1},del:{contentTypes:["phrasing","flow"],allowedRoles:!0},dfn:{contentTypes:["phrasing","flow"],allowedRoles:!0},details:{contentTypes:["interactive","flow"],allowedRoles:!1},dialog:{contentTypes:["flow"],allowedRoles:["alertdialog"]},div:{contentTypes:["flow"],allowedRoles:!0,shadowRoot:!0},dl:{contentTypes:["flow"],allowedRoles:["group","list","presentation","none"],chromiumRole:"DescriptionList"},dt:{allowedRoles:["listitem"]},em:{contentTypes:["phrasing","flow"],allowedRoles:!0},embed:{contentTypes:["interactive","embedded","phrasing","flow"],allowedRoles:["application","document","img","presentation","none"],chromiumRole:"EmbeddedObject"},fieldset:{contentTypes:["flow"],allowedRoles:["none","presentation","radiogroup"],namingMethods:["fieldsetLegendText"]},figcaption:{allowedRoles:["group","none","presentation"]},figure:{contentTypes:["flow"],allowedRoles:!0,namingMethods:["figureText","titleText"]},footer:{contentTypes:["flow"],allowedRoles:["group","none","presentation","doc-footnote"],shadowRoot:!0},form:{contentTypes:["flow"],allowedRoles:["form","search","none","presentation"]},h1:{contentTypes:["heading","flow"],allowedRoles:["none","presentation","tab","doc-subtitle"],shadowRoot:!0,implicitAttrs:{"aria-level":"1"}},h2:{contentTypes:["heading","flow"],allowedRoles:["none","presentation","tab","doc-subtitle"],shadowRoot:!0,implicitAttrs:{"aria-level":"2"}},h3:{contentTypes:["heading","flow"],allowedRoles:["none","presentation","tab","doc-subtitle"],shadowRoot:!0,implicitAttrs:{"aria-level":"3"}},h4:{contentTypes:["heading","flow"],allowedRoles:["none","presentation","tab","doc-subtitle"],shadowRoot:!0,implicitAttrs:{"aria-level":"4"}},h5:{contentTypes:["heading","flow"],allowedRoles:["none","presentation","tab","doc-subtitle"],shadowRoot:!0,implicitAttrs:{"aria-level":"5"}},h6:{contentTypes:["heading","flow"],allowedRoles:["none","presentation","tab","doc-subtitle"],shadowRoot:!0,implicitAttrs:{"aria-level":"6"}},head:{allowedRoles:!1,noAriaAttrs:!0},header:{contentTypes:["flow"],allowedRoles:["group","none","presentation","doc-footnote"],shadowRoot:!0},hgroup:{contentTypes:["heading","flow"],allowedRoles:!0},hr:{contentTypes:["flow"],allowedRoles:["none","presentation","doc-pagebreak"],namingMethods:["titleText","singleSpace"]},html:{allowedRoles:!1,noAriaAttrs:!0},i:{contentTypes:["phrasing","flow"],allowedRoles:!0},iframe:{contentTypes:["interactive","embedded","phrasing","flow"],allowedRoles:["application","document","img","none","presentation"],chromiumRole:"Iframe"},img:{variant:{nonEmptyAlt:{matches:[{attributes:{alt:"/.+/"}},{hasAccessibleName:!0}],allowedRoles:["button","checkbox","link","math","menuitem","menuitemcheckbox","menuitemradio","meter","option","progressbar","radio","scrollbar","separator","slider","switch","tab","treeitem","doc-cover"]},usemap:{matches:"[usemap]",contentTypes:["interactive","embedded","flow"]},default:{allowedRoles:["presentation","none"],contentTypes:["embedded","flow"]}},namingMethods:["altText"]},input:{variant:{button:{matches:{properties:{type:"button"}},allowedRoles:["checkbox","combobox","link","menuitem","menuitemcheckbox","menuitemradio","option","radio","switch","tab"]},buttonType:{matches:{properties:{type:["button","submit","reset"]}},namingMethods:["valueText","titleText","buttonDefaultText"]},checkboxPressed:{matches:{properties:{type:"checkbox"},attributes:{"aria-pressed":"/.*/"}},allowedRoles:["button","menuitemcheckbox","option","switch"],implicitAttrs:{"aria-checked":"false"}},checkbox:{matches:{properties:{type:"checkbox"},attributes:{"aria-pressed":null}},allowedRoles:["menuitemcheckbox","option","switch"],implicitAttrs:{"aria-checked":"false"}},noRoles:{matches:{properties:{type:["color","date","datetime-local","file","month","number","password","range","reset","submit","time","week"]}},allowedRoles:!1},hidden:{matches:{properties:{type:"hidden"}},contentTypes:["flow"],allowedRoles:!1,noAriaAttrs:!0},image:{matches:{properties:{type:"image"}},allowedRoles:["link","menuitem","menuitemcheckbox","menuitemradio","radio","switch"],namingMethods:["altText","valueText","labelText","titleText","buttonDefaultText"]},radio:{matches:{properties:{type:"radio"}},allowedRoles:["menuitemradio"],implicitAttrs:{"aria-checked":"false"}},textWithList:{matches:{properties:{type:"text"},attributes:{list:"/.*/"}},allowedRoles:!1},default:{contentTypes:["interactive","flow"],allowedRoles:["combobox","searchbox","spinbutton"],implicitAttrs:{"aria-valuenow":""},namingMethods:["labelText","placeholderText"]}}},ins:{contentTypes:["phrasing","flow"],allowedRoles:!0},kbd:{contentTypes:["phrasing","flow"],allowedRoles:!0},label:{contentTypes:["interactive","phrasing","flow"],allowedRoles:!1,chromiumRole:"Label"},legend:{allowedRoles:!1},li:{allowedRoles:["menuitem","menuitemcheckbox","menuitemradio","option","none","presentation","radio","separator","tab","treeitem","doc-biblioentry","doc-endnote"],implicitAttrs:{"aria-setsize":"1","aria-posinset":"1"}},link:{contentTypes:["phrasing","flow"],allowedRoles:!1,noAriaAttrs:!0},main:{contentTypes:["flow"],allowedRoles:!1,shadowRoot:!0},map:{contentTypes:["phrasing","flow"],allowedRoles:!1,noAriaAttrs:!0},math:{contentTypes:["embedded","phrasing","flow"],allowedRoles:!1},mark:{contentTypes:["phrasing","flow"],allowedRoles:!0},menu:{contentTypes:["flow"],allowedRoles:["directory","group","listbox","menu","menubar","none","presentation","radiogroup","tablist","toolbar","tree"]},meta:{variant:{itemprop:{matches:"[itemprop]",contentTypes:["phrasing","flow"]}},allowedRoles:!1,noAriaAttrs:!0},meter:{contentTypes:["phrasing","flow"],allowedRoles:!1,chromiumRole:"progressbar"},nav:{contentTypes:["sectioning","flow"],allowedRoles:["doc-index","doc-pagelist","doc-toc","menu","menubar","none","presentation","tablist"],shadowRoot:!0},noscript:{contentTypes:["phrasing","flow"],allowedRoles:!1,noAriaAttrs:!0},object:{variant:{usemap:{matches:"[usemap]",contentTypes:["interactive","embedded","phrasing","flow"]},default:{contentTypes:["embedded","phrasing","flow"]}},allowedRoles:["application","document","img"],chromiumRole:"PluginObject"},ol:{contentTypes:["flow"],allowedRoles:["directory","group","listbox","menu","menubar","none","presentation","radiogroup","tablist","toolbar","tree"]},optgroup:{allowedRoles:!1},option:{allowedRoles:!1,implicitAttrs:{"aria-selected":"false"}},output:{contentTypes:["phrasing","flow"],allowedRoles:!0,namingMethods:["subtreeText"]},p:{contentTypes:["flow"],allowedRoles:!0,shadowRoot:!0},param:{allowedRoles:!1,noAriaAttrs:!0},picture:{contentTypes:["phrasing","flow"],allowedRoles:!1,noAriaAttrs:!0},pre:{contentTypes:["flow"],allowedRoles:!0},progress:{contentTypes:["phrasing","flow"],allowedRoles:!1,implicitAttrs:{"aria-valuemax":"100","aria-valuemin":"0","aria-valuenow":"0"}},q:{contentTypes:["phrasing","flow"],allowedRoles:!0},rp:{allowedRoles:!0},rt:{allowedRoles:!0},ruby:{contentTypes:["phrasing","flow"],allowedRoles:!0},s:{contentTypes:["phrasing","flow"],allowedRoles:!0},samp:{contentTypes:["phrasing","flow"],allowedRoles:!0},script:{contentTypes:["phrasing","flow"],allowedRoles:!1,noAriaAttrs:!0},search:{contentTypes:["flow"],allowedRoles:["form","group","none","presentation","region","search"]},section:{contentTypes:["sectioning","flow"],allowedRoles:["alert","alertdialog","application","banner","complementary","contentinfo","dialog","document","feed","group","log","main","marquee","navigation","none","note","presentation","search","status","tabpanel","doc-abstract","doc-acknowledgments","doc-afterword","doc-appendix","doc-bibliography","doc-chapter","doc-colophon","doc-conclusion","doc-credit","doc-credits","doc-dedication","doc-endnotes","doc-epigraph","doc-epilogue","doc-errata","doc-example","doc-foreword","doc-glossary","doc-index","doc-introduction","doc-notice","doc-pagelist","doc-part","doc-preface","doc-prologue","doc-pullquote","doc-qna","doc-toc"],shadowRoot:!0},select:{variant:{combobox:{matches:{attributes:{multiple:null,size:[null,"1"]}},allowedRoles:["menu"]},default:{allowedRoles:!1}},contentTypes:["interactive","phrasing","flow"],implicitAttrs:{"aria-valuenow":""},namingMethods:["labelText"]},slot:{contentTypes:["phrasing","flow"],allowedRoles:!1,noAriaAttrs:!0},small:{contentTypes:["phrasing","flow"],allowedRoles:!0},source:{allowedRoles:!1,noAriaAttrs:!0},span:{contentTypes:["phrasing","flow"],allowedRoles:!0,shadowRoot:!0},strong:{contentTypes:["phrasing","flow"],allowedRoles:!0},style:{allowedRoles:!1,noAriaAttrs:!0},svg:{contentTypes:["embedded","phrasing","flow"],allowedRoles:!0,chromiumRole:"SVGRoot",namingMethods:["svgTitleText"]},sub:{contentTypes:["phrasing","flow"],allowedRoles:!0},summary:{allowedRoles:!1,namingMethods:["subtreeText"]},sup:{contentTypes:["phrasing","flow"],allowedRoles:!0},table:{contentTypes:["flow"],allowedRoles:!0,namingMethods:["tableCaptionText","tableSummaryText"]},tbody:{allowedRoles:!0},template:{contentTypes:["phrasing","flow"],allowedRoles:!1,noAriaAttrs:!0},textarea:{contentTypes:["interactive","phrasing","flow"],allowedRoles:!1,implicitAttrs:{"aria-valuenow":"","aria-multiline":"true"},namingMethods:["labelText","placeholderText"]},tfoot:{allowedRoles:!0},thead:{allowedRoles:!0},time:{contentTypes:["phrasing","flow"],allowedRoles:!0},title:{allowedRoles:!1,noAriaAttrs:!0},td:{allowedRoles:!0},th:{allowedRoles:!0},tr:{allowedRoles:!0},track:{allowedRoles:!1,noAriaAttrs:!0},u:{contentTypes:["phrasing","flow"],allowedRoles:!0},ul:{contentTypes:["flow"],allowedRoles:["directory","group","listbox","menu","menubar","none","presentation","radiogroup","tablist","toolbar","tree"]},var:{contentTypes:["phrasing","flow"],allowedRoles:!0},video:{variant:{controls:{matches:"[controls]",contentTypes:["interactive","embedded","phrasing","flow"]},default:{contentTypes:["embedded","phrasing","flow"]}},allowedRoles:["application"],chromiumRole:"video"},wbr:{contentTypes:["phrasing","flow"],allowedRoles:["presentation","none"]}},ye={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]},{ariaAttrs:ps,ariaRoles:O({},fs,{"doc-abstract":{type:"section",allowedAttrs:["aria-expanded"],superclassRole:["section"]},"doc-acknowledgments":{type:"landmark",allowedAttrs:["aria-expanded"],superclassRole:["landmark"]},"doc-afterword":{type:"landmark",allowedAttrs:["aria-expanded"],superclassRole:["landmark"]},"doc-appendix":{type:"landmark",allowedAttrs:["aria-expanded"],superclassRole:["landmark"]},"doc-backlink":{type:"link",allowedAttrs:["aria-expanded"],nameFromContent:!0,superclassRole:["link"]},"doc-biblioentry":{type:"listitem",allowedAttrs:["aria-expanded","aria-level","aria-posinset","aria-setsize"],superclassRole:["listitem"],deprecated:!0},"doc-bibliography":{type:"landmark",allowedAttrs:["aria-expanded"],superclassRole:["landmark"]},"doc-biblioref":{type:"link",allowedAttrs:["aria-expanded"],nameFromContent:!0,superclassRole:["link"]},"doc-chapter":{type:"landmark",allowedAttrs:["aria-expanded"],superclassRole:["landmark"]},"doc-colophon":{type:"section",allowedAttrs:["aria-expanded"],superclassRole:["section"]},"doc-conclusion":{type:"landmark",allowedAttrs:["aria-expanded"],superclassRole:["landmark"]},"doc-cover":{type:"img",allowedAttrs:["aria-expanded"],superclassRole:["img"]},"doc-credit":{type:"section",allowedAttrs:["aria-expanded"],superclassRole:["section"]},"doc-credits":{type:"landmark",allowedAttrs:["aria-expanded"],superclassRole:["landmark"]},"doc-dedication":{type:"section",allowedAttrs:["aria-expanded"],superclassRole:["section"]},"doc-endnote":{type:"listitem",allowedAttrs:["aria-expanded","aria-level","aria-posinset","aria-setsize"],superclassRole:["listitem"],deprecated:!0},"doc-endnotes":{type:"landmark",allowedAttrs:["aria-expanded"],superclassRole:["landmark"]},"doc-epigraph":{type:"section",allowedAttrs:["aria-expanded"],superclassRole:["section"]},"doc-epilogue":{type:"landmark",allowedAttrs:["aria-expanded"],superclassRole:["landmark"]},"doc-errata":{type:"landmark",allowedAttrs:["aria-expanded"],superclassRole:["landmark"]},"doc-example":{type:"section",allowedAttrs:["aria-expanded"],superclassRole:["section"]},"doc-footnote":{type:"section",allowedAttrs:["aria-expanded"],superclassRole:["section"]},"doc-foreword":{type:"landmark",allowedAttrs:["aria-expanded"],superclassRole:["landmark"]},"doc-glossary":{type:"landmark",allowedAttrs:["aria-expanded"],superclassRole:["landmark"]},"doc-glossref":{type:"link",allowedAttrs:["aria-expanded"],nameFromContent:!0,superclassRole:["link"]},"doc-index":{type:"navigation",allowedAttrs:["aria-expanded"],superclassRole:["navigation"]},"doc-introduction":{type:"landmark",allowedAttrs:["aria-expanded"],superclassRole:["landmark"]},"doc-noteref":{type:"link",allowedAttrs:["aria-expanded"],nameFromContent:!0,superclassRole:["link"]},"doc-notice":{type:"note",allowedAttrs:["aria-expanded"],superclassRole:["note"]},"doc-pagebreak":{type:"separator",allowedAttrs:["aria-expanded","aria-orientation"],superclassRole:["separator"],childrenPresentational:!0},"doc-pagelist":{type:"navigation",allowedAttrs:["aria-expanded"],superclassRole:["navigation"]},"doc-part":{type:"landmark",allowedAttrs:["aria-expanded"],superclassRole:["landmark"]},"doc-preface":{type:"landmark",allowedAttrs:["aria-expanded"],superclassRole:["landmark"]},"doc-prologue":{type:"landmark",allowedAttrs:["aria-expanded"],superclassRole:["landmark"]},"doc-pullquote":{type:"none",superclassRole:["none"]},"doc-qna":{type:"section",allowedAttrs:["aria-expanded"],superclassRole:["section"]},"doc-subtitle":{type:"sectionhead",allowedAttrs:["aria-expanded"],superclassRole:["sectionhead"]},"doc-tip":{type:"note",allowedAttrs:["aria-expanded"],superclassRole:["note"]},"doc-toc":{type:"navigation",allowedAttrs:["aria-expanded"],superclassRole:["navigation"]}},{"graphics-document":{type:"structure",superclassRole:["document"],accessibleNameRequired:!0},"graphics-object":{type:"structure",superclassRole:["group"],nameFromContent:!0},"graphics-symbol":{type:"structure",superclassRole:["img"],accessibleNameRequired:!0,childrenPresentational:!0}}),htmlElms:el,cssColors:ye}),hs=O({},ms),gs=hs,vs=function(e){return!!(e=gs.ariaRoles[e])&&!!e.unsupported},bs=function(e){var t=(n=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{}).allowAbstract,n=void 0!==(n=n.flagUnsupported)&&n,r=gs.ariaRoles[e];e=vs(e);return!(!r||n&&e||!t&&"abstract"===r.type)},ys=function(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},n=t.fallback,r=t.abstracts,a=t.dpub;return 1===(e=e instanceof ua?e:_l(e)).props.nodeType&&(t=(e.attr("role")||"").trim().toLowerCase(),(n?Yp(t):[t]).find((function(e){return!(!a&&"doc-"===e.substr(0,4))&&bs(e,{allowAbstract:r})})))||null},Ds=function(e){return Object.keys(gs.htmlElms).filter((function(t){return(t=gs.htmlElms[t]).contentTypes?t.contentTypes.includes(e):!!t.variant&&!(!t.variant.default||!t.variant.default.contentTypes)&&t.variant.default.contentTypes.includes(e)}))},ws=function(){return Sl.get("globalAriaAttrs",(function(){return Object.keys(gs.ariaAttrs).filter((function(e){return gs.ariaAttrs[e].global}))}))},xs=cl((function(e){for(var t=[],n=e.rows,r=0,a=n.length;r<a;r++)for(var o=n[r].cells,i=(t[r]=t[r]||[],0),l=0,u=o.length;l<u;l++)for(var s=0;s<o[l].colSpan;s++){for(var c=o[l].getAttribute("rowspan"),d=0===parseInt(c)||0===o[l].rowspan?n.length:o[l].rowSpan,p=0;p<d;p++){for(t[r+p]=t[r+p]||[];t[r+p][i];)i++;t[r+p][i]=o[l]}i++}return t})),Es=cl((function(e,t){var n,r;for(t=t||xs(jl(e,"table")),n=0;n<t.length;n++)if(t[n]&&-1!==(r=t[n].indexOf(e)))return{x:r,y:n}}));function As(e){var t,n=(e=Hf(e)).vNode,r=(e=e.domNode,n.attr("scope")),a=ys(n);if(["td","th"].includes(n.props.nodeName))return"columnheader"===a?"col":"rowheader"===a?"row":"col"===r||"row"===r?r:"th"===n.props.nodeName&&(n.actualNode?(a=xs(jl(e,"table")))[(t=Es(e,a)).y].every((function(e){return"TH"===e.nodeName.toUpperCase()}))?"col":a.map((function(e){return e[t.x]})).every((function(e){return e&&"TH"===e.nodeName.toUpperCase()}))?"row":"auto":"auto");throw new TypeError("Expected TD or TH element")}var Fs=function(e){return-1!==["col","auto"].indexOf(As(e))},Cs=function(e){return["row","auto"].includes(As(e))};function ks(){return Sl.get("sectioningContentSelector",(function(){return Ds("sectioning").map((function(e){return"".concat(e,":not([role])")})).join(", ")+" , [role=article], [role=complementary], [role=navigation], [role=region]"}))}function Rs(){return Sl.get("sectioningContentPlusMainSelector",(function(){return ks()+" , main:not([role]), [role=main]"}))}var Ns=function(e){return e?e.replace(/\\r\\n/g,"\\n").replace(/\\u00A0/g," ").replace(/[\\s]{2,}/g," ").trim():""};function Ts(e,t){return t=void 0!==(t=(1<arguments.length&&void 0!==t?t:{}).checkTitle)&&t,Ns(cs(e))||Ns(ds(e))||t&&1===(null==e?void 0:e.props.nodeType)&&Ns(e.attr("title"))}var Ss={a:function(e){return e.hasAttr("href")?"link":null},area:function(e){return e.hasAttr("href")?"link":null},article:"article",aside:function(e){return Wd(e.parent,ks())&&!Ts(e,{checkTitle:!0})?null:"complementary"},body:"document",button:"button",datalist:"listbox",dd:"definition",dfn:"term",details:"group",dialog:"dialog",dt:"term",fieldset:"group",figure:"figure",footer:function(e){return Wd(e,Rs())?null:"contentinfo"},form:function(e){return Ts(e)?"form":null},h1:"heading",h2:"heading",h3:"heading",h4:"heading",h5:"heading",h6:"heading",header:function(e){return Wd(e,Rs())?null:"banner"},hr:"separator",img:function(e){var t=e.hasAttr("alt")&&!e.attr("alt"),n=ws().find((function(t){return e.hasAttr(t)}));return!t||n||rs(e)?"img":"presentation"},input:function(e){var t,n;switch(e.hasAttr("list")&&(n=(t=us(e.actualNode,"list").filter((function(e){return!!e}))[0])&&"datalist"===t.nodeName.toLowerCase()),e.props.type){case"checkbox":return"checkbox";case"number":return"spinbutton";case"radio":return"radio";case"range":return"slider";case"search":return n?"combobox":"searchbox";case"button":case"image":case"reset":case"submit":return"button";case"text":case"tel":case"url":case"email":case"":return n?"combobox":"textbox";default:return"textbox"}},li:"listitem",main:"main",math:"math",menu:"list",meter:"meter",nav:"navigation",ol:"list",optgroup:"group",option:"option",output:"status",progress:"progressbar",search:"search",section:function(e){return Ts(e)?"region":null},select:function(e){return e.hasAttr("multiple")||1<parseInt(e.attr("size"))?"listbox":"combobox"},summary:"button",table:"table",tbody:"rowgroup",td:function(e){return e=Wd(e,"table"),e=ys(e),["grid","treegrid"].includes(e)?"gridcell":"cell"},textarea:"textbox",tfoot:"rowgroup",th:function(e){return Fs(e)?"columnheader":Cs(e)?"rowheader":void 0},thead:"rowgroup",tr:"row",ul:"list"},_s=function(e,t){var n=a(t);if(Array.isArray(t)&&void 0!==e)return t.includes(e);if("function"===n)return!!t(e);if(null!=e){if(t instanceof RegExp)return t.test(e);if(/^\\/.*\\/$/.test(t))return n=t.substring(1,t.length-1),new RegExp(n).test(e)}return t===e};function Os(e,t){return _s(!!kc(e),t)}var Ms=function(e,t){if("object"!==a(t)||Array.isArray(t)||t instanceof RegExp)throw new Error("Expect matcher to be an object");return Object.keys(t).every((function(n){return _s(e(n),t[n])}))};function Ps(e,t){return e=Hf(e).vNode,Ms((function(t){return e.attr(t)}),t)}function Is(e,t){return!!t(e)}function Bs(e,t){return _s(ys(e),t)}function js(e,t){return _s(Ws(e),t)}function Ls(e,t){return e=Hf(e).vNode,_s(e.props.nodeName,t)}function qs(e,t){return e=Hf(e).vNode,Ms((function(t){return e.props[t]}),t)}function zs(e,t){return _s(Xs(e),t)}var Vs={hasAccessibleName:Os,attributes:Ps,condition:Is,explicitRole:Bs,implicitRole:js,nodeName:Ls,properties:qs,semanticRole:zs},Gs=function e(t,n){return t=Hf(t).vNode,Array.isArray(n)?n.some((function(n){return e(t,n)})):"string"==typeof n?Ld(t,n):Object.keys(n).every((function(e){var r;if(Vs[e])return r=n[e],(0,Vs[e])(t,r);throw new Error('Unknown matcher type "'.concat(e,'"'))}))},$s=function(e,t){return Gs(e,t)},Hs=($s.hasAccessibleName=Os,$s.attributes=Ps,$s.condition=Is,$s.explicitRole=Bs,$s.fromDefinition=Gs,$s.fromFunction=Ms,$s.fromPrimative=_s,$s.implicitRole=js,$s.nodeName=Ls,$s.properties=qs,$s.semanticRole=zs,$s),Us=function(e){var t=(1<arguments.length&&void 0!==arguments[1]?arguments[1]:{}).noMatchAccessibleName,n=void 0!==t&&t,r=gs.htmlElms[e.props.nodeName];if(!r)return{};if(!r.variant)return r;var a,o,i=r.variant,l=k(r,d);for(a in i)if(i.hasOwnProperty(a)&&"default"!==a){for(var u=i[a],s=u.matches,c=k(u,p),f=Array.isArray(s)?s:[s],m=0;m<f.length&&n;m++)if(f[m].hasOwnProperty("hasAccessibleName"))return r;if(Hs(e,s))for(var h in c)c.hasOwnProperty(h)&&(l[h]=c[h])}for(o in i.default)i.default.hasOwnProperty(o)&&void 0===l[o]&&(l[o]=i.default[o]);return l},Ws=function(e){var t=(1<arguments.length&&void 0!==arguments[1]?arguments[1]:{}).chromium,n=e instanceof ua?e:_l(e);if(e=n.actualNode,n)return e=n.props.nodeName,!(e=Ss[e])&&t?Us(n).chromiumRole||null:"function"==typeof e?e(n):e||null;throw new ReferenceError("Cannot get implicit role of a node outside the current scope.")},Ys={td:["tr"],th:["tr"],tr:["thead","tbody","tfoot","table"],thead:["table"],tbody:["table"],tfoot:["table"],li:["ol","ul"],dt:["dl","div"],dd:["dl","div"],div:["dl"]};function Ks(e){return ws().some((function(t){return e.hasAttr(t)}))||rs(e)}var Xs=function(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},n=t.noPresentational;e=function(e,t){var n,r=(t=1<arguments.length&&void 0!==t?t:{}).noImplicit;t=k(t,m);return 1!==(e=Hf(e).vNode).props.nodeType?null:!(n=ys(e,t))||["presentation","none"].includes(n)&&Ks(e)?r?null:function(e,t){var n=t.chromium;return t=k(t,f),(n=Ws(e,{chromium:n}))?function e(t,n){var r=Ys[t.props.nodeName];if(r){if(t.parent)return r.includes(t.parent.props.nodeName)?(r=ys(t.parent,n),["none","presentation"].includes(r)&&!Ks(t.parent)?r:r?null:e(t.parent,n)):null;if(t.actualNode)throw new ReferenceError("Cannot determine role presentational inheritance of a required parent outside the current scope.")}return null}(e,t)||n:null}(e,t):n}(e,k(t,h));return n&&["presentation","none"].includes(e)?null:e},Zs=["iframe"],Js=function(e){var t=Hf(e).vNode;return 1!==t.props.nodeType||!e.hasAttr("title")||!$s(t,Zs)&&["none","presentation"].includes(Xs(t))?"":t.attr("title")},Qs=function(e){var t,n=(1<arguments.length&&void 0!==arguments[1]?arguments[1]:{}).strict;return 1===(e=e instanceof ua?e:_l(e)).props.nodeType&&(e=Xs(e),!(!(t=gs.ariaRoles[e])||!t.nameFromContent)||!n&&(!t||["presentation","none"].includes(e)))},ec=function(e){var t=e.actualNode,n=e.children;if(n)return e.hasAttr("aria-owns")?(e=us(t,"aria-owns").filter((function(e){return!!e})).map((function(e){return o.utils.getNodeFromTree(e)})),[].concat(M(n),M(e))):M(n);throw new Error("getOwnedVirtual requires a virtual node")},tc={accessibleNameFromFieldValue:["progressbar"]};function nc(e){return e=Hf(e).vNode,rc(e)}var rc=cl((function(e,t){return!Yl(e)&&!Vu(e,{skipAncestors:!0,isAncestor:t})&&(e.actualNode&&"area"===e.props.nodeName?!Ql(e,rc):!nu(e,{skipAncestors:!0,isAncestor:t})&&(!e.parent||rc(e.parent,!0)))})),ac=function e(t,n,r){var a=Hf(t).vNode,o=n?nc:du,i=!t.actualNode||(t.actualNode,o(t));o=a.children.map((function(t){var a=(o=t.props).nodeType,o=o.nodeValue;if(3===a){if(o&&i)return o}else if(!r)return e(t,n)})).join("");return Ns(o)},oc=["button","checkbox","color","file","hidden","image","password","radio","reset","submit"],ic=function(e){var t=(e=e instanceof ua?e:_l(e)).props.nodeName;return"textarea"===t||"input"===t&&!oc.includes((e.attr("type")||"").toLowerCase())},lc=function(e){return"select"===(e=e instanceof ua?e:_l(e)).props.nodeName},uc=function(e){return"textbox"===ys(e)},sc=function(e){return"listbox"===ys(e)},cc=function(e){return"combobox"===ys(e)},dc=["progressbar","scrollbar","slider","spinbutton"],pc=function(e){return e=ys(e),dc.includes(e)},fc=["textbox","progressbar","scrollbar","slider","spinbutton","combobox","listbox"],mc={nativeTextboxValue:function(e){return e=Hf(e).vNode,ic(e)&&e.props.value||""},nativeSelectValue:function(e){if(e=Hf(e).vNode,!lc(e))return"";var t=(e=fm(e,"option")).filter((function(e){return e.props.selected}));return t.length||t.push(e[0]),t.map((function(e){return ac(e)})).join(" ")||""},ariaTextboxValue:function(e){var t=(e=Hf(e)).vNode;e=e.domNode;return uc(t)?e&&nu(e)?e.textContent:ac(t,!0):""},ariaListboxValue:hc,ariaComboboxValue:function(e,t){e=Hf(e).vNode;return cc(e)&&(e=ec(e).filter((function(e){return"listbox"===Xs(e)}))[0])?hc(e,t):""},ariaRangeValue:function(e){e=Hf(e).vNode;return pc(e)&&e.hasAttr("aria-valuenow")?(e=+e.attr("aria-valuenow"),isNaN(e)?"0":String(e)):""}};function hc(e,t){e=Hf(e).vNode;return sc(e)&&0!==(e=ec(e).filter((function(e){return"option"===Xs(e)&&"true"===e.attr("aria-selected")}))).length?kc(e[0],t):""}var gc=function(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},n=e.actualNode,r=tc.accessibleNameFromFieldValue||[],a=Xs(e);return t.startNode===e||!fc.includes(a)||r.includes(a)?"":(r=Object.keys(mc).map((function(e){return mc[e]})).reduce((function(n,r){return n||r(e,t)}),""),t.debug&&ia(r||"{empty-value}",n,t),r)},vc=Ds("phrasing").concat(["#text"]),bc=function(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},n=kc.alreadyProcessed;t.startNode=t.startNode||e;var r=(o=t).strict,a=o.inControlContext,o=o.inLabelledByContext,i=Xs(e),l=Us(e,{noMatchAccessibleName:!0}).contentTypes;return n(e,t)||1!==e.props.nodeType||null!=l&&l.includes("embedded")||fc.includes(i)||!(t.subtreeDescendant||t.inLabelledByContext||Qs(e,{strict:r}))?"":(r||(t=O({subtreeDescendant:!a&&!o},t)),ec(e).reduce((function(e,n){var r=t,a=n.props.nodeName;return(n=kc(n,r))?(vc.includes(a)||(" "!==n[0]&&(n+=" "),e&&" "!==e[e.length-1]&&(n=" "+n)),e+n):e}),""))},yc=function(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},n=kc.alreadyProcessed;if(t.inControlContext||t.inLabelledByContext||n(e,t))return"";t.startNode||(t.startNode=e);var r,a=O({inControlContext:!0},t);n=(e=>{if(!e.attr("id"))return[];if(e.actualNode)return Il({elm:"label",attr:"for",value:e.attr("id"),context:e.actualNode});throw new TypeError("Cannot resolve explicit label reference for non-DOM nodes")})(e);return(t=Wd(e,"label"))?(r=[].concat(M(n),[t.actualNode])).sort($f):r=n,r.map((function(e){return ss(e,a)})).filter((function(e){return""!==e})).join(" ")},Dc={submit:"Submit",image:"Submit",reset:"Reset",button:""};function wc(e,t){return t.attr(e)||""}function xc(e,t,n){t=t.actualNode;var r=[e=e.toLowerCase(),t.nodeName.toLowerCase()].join(",");return(t=t.querySelector(r))&&t.nodeName.toLowerCase()===e?ss(t,n):""}var Ec={valueText:function(e){return e.props.value||""},buttonDefaultText:function(e){return Dc[e.props.type]||""},tableCaptionText:xc.bind(null,"caption"),figureText:xc.bind(null,"figcaption"),svgTitleText:xc.bind(null,"title"),fieldsetLegendText:xc.bind(null,"legend"),altText:wc.bind(null,"alt"),tableSummaryText:wc.bind(null,"summary"),titleText:Js,subtreeText:bc,labelText:yc,singleSpace:function(){return" "},placeholderText:wc.bind(null,"placeholder")};function Ac(e){var t,n=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},r=e.actualNode;return 1!==e.props.nodeType||["presentation","none"].includes(Xs(e))?"":(t=(Us(e,{noMatchAccessibleName:!0}).namingMethods||[]).map((function(e){return Ec[e]})).reduce((function(t,r){return t||r(e,n)}),""),n.debug&&o.log(t||"{empty-value}",r,n),t)}var Fc=function(e,t){var n=t.emoji,r=t.nonBmp,a=(t=t.punctuations,!1);return n&&(a=a||Ma().test(e)),r&&(a=a||/[\\u1D00-\\u1D7F\\u1D80-\\u1DBF\\u1DC0-\\u1DFF\\u20A0-\\u20CF\\u20D0-\\u20FF\\u2100-\\u214F\\u2150-\\u218F\\u2190-\\u21FF\\u2200-\\u22FF\\u2300-\\u23FF\\u2400-\\u243F\\u2440-\\u245F\\u2460-\\u24FF\\u2500-\\u257F\\u2580-\\u259F\\u25A0-\\u25FF\\u2600-\\u26FF\\u2700-\\u27BF\\uE000-\\uF8FF]/g.test(e)||/[\\uDB80-\\uDBBF][\\uDC00-\\uDFFF]/g.test(e)||/[\\xAD\\u0600-\\u0605\\u061C\\u06DD\\u070F\\u08E2\\u180E\\u200B-\\u200F\\u202A-\\u202E\\u2060-\\u2064\\u2066-\\u206F\\uFEFF\\uFFF9-\\uFFFB]|\\uD804[\\uDCBD\\uDCCD]|\\uD80D[\\uDC30-\\uDC38]|\\uD82F[\\uDCA0-\\uDCA3]|\\uD834[\\uDD73-\\uDD7A]|\\uDB40[\\uDC01\\uDC20-\\uDC7F]/g.test(e)),t?a||/[\\u2000-\\u206F\\u2E00-\\u2E7F\\\\'!"#$%&\\xa3\\xa2\\xa5\\xa7\\u20ac()*+,\\-.\\/:;<=>?@\\[\\]^_\`{|}~\\xb1]/g.test(e):a};function Cc(e){var n=1<arguments.length&&void 0!==arguments[1]?arguments[1]:.15,a=2<arguments.length&&void 0!==arguments[2]?arguments[2]:3,o=e.actualNode.nodeValue.trim();if(!Ns(o)||Fc(o,{emoji:!0,nonBmp:!0}))return!1;var i,l=Sl.get("canvasContext",(function(){return r.createElement("canvas").getContext("2d",{willReadFrequently:!0})})),u=l.canvas;if((i=((i=Sl.get("fonts",(function(){return{}})))[e=t.getComputedStyle(e.parent.actualNode).getPropertyValue("font-family")]||(i[e]={occurrences:0,numLigatures:0}),i[e])).occurrences>=a){if(i.numLigatures/i.occurrences==1)return!0;if(0===i.numLigatures)return!1}i.occurrences++;var s="".concat(a=30,"px ").concat(e),c=(l.font=s,o.charAt(0)),d=l.measureText(c).width;if(0===d)return i.numLigatures++,!0;d<30&&(d*=p=30/d,s="".concat(a*=p,"px ").concat(e)),u.width=d,u.height=a,l.font=s,l.textAlign="left",l.textBaseline="top",l.fillText(c,0,0);var p=new Uint32Array(l.getImageData(0,0,d,a).data.buffer);if(!p.some((function(e){return e})))return i.numLigatures++,!0;l.clearRect(0,0,d,a),l.fillText(o,0,0);var f=new Uint32Array(l.getImageData(0,0,d,a).data.buffer);e=p.reduce((function(e,t,n){return 0===t&&0===f[n]||0!==t&&0!==f[n]?e:++e}),0),u=o.split("").reduce((function(e,t){return e+l.measureText(t).width}),0),s=l.measureText(o).width;return n<=e/p.length&&n<=1-s/u&&(i.numLigatures++,!0)}function kc(e){var t,n,r,a,i,l=((e,t)=>(t.startNode||(t=O({startNode:e},t)),1===e.props.nodeType&&t.inLabelledByContext&&void 0===t.includeHidden?O({includeHidden:!nc(e)},t):t))(e,1<arguments.length&&void 0!==arguments[1]?arguments[1]:{});return((e,t)=>e&&1===e.props.nodeType&&!t.includeHidden&&!nc(e))(e,l)||(t=e,n=(i=l).ignoreIconLigature,r=i.pixelThreshold,a=null!=(a=i.occurrenceThreshold)?a:i.occuranceThreshold,3===t.props.nodeType&&n&&Cc(t,r,a))?"":(i=[cs,ds,Ac,gc,bc,Rc,Js].reduce((function(t,n){return""!==(t=l.startNode===e?Ns(t):t)?t:n(e,l)}),""),l.debug&&o.log(i||"{empty-value}",e.actualNode,l),i)}function Rc(e){return 3!==e.props.nodeType?"":e.props.nodeValue}kc.alreadyProcessed=function(e,t){return t.processed=t.processed||[],!!t.processed.includes(e)||(t.processed.push(e),!1)};var Nc=function(e,t){var n=t.emoji,r=t.nonBmp;t=t.punctuations;return n&&(e=e.replace(Ma(),"")),r&&(e=e.replace(/[\\u1D00-\\u1D7F\\u1D80-\\u1DBF\\u1DC0-\\u1DFF\\u20A0-\\u20CF\\u20D0-\\u20FF\\u2100-\\u214F\\u2150-\\u218F\\u2190-\\u21FF\\u2200-\\u22FF\\u2300-\\u23FF\\u2400-\\u243F\\u2440-\\u245F\\u2460-\\u24FF\\u2500-\\u257F\\u2580-\\u259F\\u25A0-\\u25FF\\u2600-\\u26FF\\u2700-\\u27BF\\uE000-\\uF8FF]/g,"").replace(/[\\uDB80-\\uDBBF][\\uDC00-\\uDFFF]/g,"").replace(/[\\xAD\\u0600-\\u0605\\u061C\\u06DD\\u070F\\u08E2\\u180E\\u200B-\\u200F\\u202A-\\u202E\\u2060-\\u2064\\u2066-\\u206F\\uFEFF\\uFFF9-\\uFFFB]|\\uD804[\\uDCBD\\uDCCD]|\\uD80D[\\uDC30-\\uDC38]|\\uD82F[\\uDCA0-\\uDCA3]|\\uD834[\\uDD73-\\uDD7A]|\\uDB40[\\uDC01\\uDC20-\\uDC7F]/g,"")),t?e.replace(/[\\u2000-\\u206F\\u2E00-\\u2E7F\\\\'!"#$%&\\xa3\\xa2\\xa5\\xa7\\u20ac()*+,\\-.\\/:;<=>?@\\[\\]^_\`{|}~\\xb1]/g,""):e},Tc=function(e){var t;return 0===Ns(e).length||1===(t=e).length&&t.match(/\\D/)||["aa","abc"].includes(e.toLowerCase())||(e=>(e=Nc(e,{emoji:!0,nonBmp:!0,punctuations:!0}),!Ns(e)))(e)?0:1},Sc={stateTerms:["on","off"],standaloneTerms:["name","honorific-prefix","given-name","additional-name","family-name","honorific-suffix","nickname","username","new-password","current-password","organization-title","organization","street-address","address-line1","address-line2","address-line3","address-level4","address-level3","address-level2","address-level1","country","country-name","postal-code","cc-name","cc-given-name","cc-additional-name","cc-family-name","cc-number","cc-exp","cc-exp-month","cc-exp-year","cc-csc","cc-type","transaction-currency","transaction-amount","language","bday","bday-day","bday-month","bday-year","sex","url","photo","one-time-code"],qualifiers:["home","work","mobile","fax","pager"],qualifiedTerms:["tel","tel-country-code","tel-national","tel-area-code","tel-local","tel-local-prefix","tel-local-suffix","tel-extension","email","impp"],locations:["billing","shipping"]},_c=function(e){var t=void 0!==(t=(l=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{}).looseTyped)&&t,n=void 0===(n=l.stateTerms)?[]:n,r=void 0===(r=l.locations)?[]:r,a=void 0===(a=l.qualifiers)?[]:a,o=void 0===(o=l.standaloneTerms)?[]:o,i=void 0===(i=l.qualifiedTerms)?[]:i,l=void 0===(l=l.ignoredValues)?[]:l;return e=e.toLowerCase().trim(),!(!(n=n.concat(Sc.stateTerms)).includes(e)&&""!==e)||(a=a.concat(Sc.qualifiers),r=r.concat(Sc.locations),o=o.concat(Sc.standaloneTerms),i=i.concat(Sc.qualifiedTerms),!("webauthn"===(n=e.split(/\\s+/g))[n.length-1]&&(n.pop(),0===n.length)||!t&&(8<n[0].length&&"section-"===n[0].substr(0,8)&&n.shift(),r.includes(n[0])&&n.shift(),a.includes(n[0])&&(n.shift(),o=[]),1!==n.length))&&(l.includes(e=n[n.length-1])?void 0:o.includes(e)||i.includes(e)))},Oc=function(e){var t;return e.attr("aria-labelledby")&&(t=us(e.actualNode,"aria-labelledby").map((function(e){return(e=_l(e))?ac(e):""})).join(" ").trim())?t:(t=(t=e.attr("aria-label"))&&Ns(t))||null},Mc=function(e,t,n){return e=_l(e),ac(e,t,n)},Pc=function(e){if(t=Oc(e))return t;if(e.attr("id")){if(!e.actualNode)throw new TypeError("Cannot resolve explicit label reference for non-DOM nodes");var t,n=Aa(e.attr("id"));if(t=(n=Pl(e.actualNode).querySelector('label[for="'+n+'"]'))&&Mc(n,!0))return t}return(t=(n=Wd(e,"label"))&&ac(n,!0))||null},Ic=function(e){return e=_l(e),Pc(e)},Bc=[{matches:[{nodeName:"textarea"},{nodeName:"input",properties:{type:["text","password","search","tel","email","url"]}}],namingMethods:"labelText"},{matches:{nodeName:"input",properties:{type:["button","submit","reset"]}},namingMethods:["valueText","titleText","buttonDefaultText"]},{matches:{nodeName:"input",properties:{type:"image"}},namingMethods:["altText","valueText","labelText","titleText","buttonDefaultText"]},{matches:"button",namingMethods:"subtreeText"},{matches:"fieldset",namingMethods:"fieldsetLegendText"},{matches:"OUTPUT",namingMethods:"subtreeText"},{matches:[{nodeName:"select"},{nodeName:"input",properties:{type:/^(?!text|password|search|tel|email|url|button|submit|reset)/}}],namingMethods:"labelText"},{matches:"summary",namingMethods:"subtreeText"},{matches:"figure",namingMethods:["figureText","titleText"]},{matches:"img",namingMethods:"altText"},{matches:"table",namingMethods:["tableCaptionText","tableSummaryText"]},{matches:["hr","br"],namingMethods:["titleText","singleSpace"]}],jc=function e(t){var n=du(t),r=[];return t.children.forEach((function(t){3===t.actualNode.nodeType?n&&r.push(t):r=r.concat(e(t))})),r},Lc=cl((function(e){var t=_l(e),n=t.boundingClientRect,a=[],o=zl(t);return e.childNodes.forEach((function(e){var t,i;3!==e.nodeType||""===Ns(e.nodeValue)||((t=r.createRange()).selectNodeContents(e),e=Array.from(t.getClientRects()),i=n,e.some((function(e){return!mu(vu(e),i)})))||a.push.apply(a,M(qc(e,o)))})),a.length?a:qc([n],o)}));function qc(e,t){var n=[];return e.forEach((function(e){e.width<1||e.height<1||(e=t.reduce((function(e,t){return e&&gu(e,t.boundingClientRect)}),e))&&n.push(e)})),n}var zc=function(e){var t=ju(e);return t?Lc(e).map((function(e){return Qu(t,e)})):[]},Vc=["checkbox","img","meter","progressbar","scrollbar","radio","slider","spinbutton","textbox"],Gc=function(e){var t=Hf(e).vNode;if(e=o.commons.aria.getExplicitRole(t))return-1!==Vc.indexOf(e);switch(t.props.nodeName){case"img":case"iframe":case"object":case"video":case"audio":case"canvas":case"svg":case"math":case"button":case"select":case"textarea":case"keygen":case"progress":case"meter":return!0;case"input":return"hidden"!==t.props.type;default:return!1}},$c=["head","title","template","script","style","iframe","object","video","audio","noscript"];function Hc(e){return!$c.includes(e.props.nodeName)&&e.children.some((function(e){return 3===(e=e.props).nodeType&&e.nodeValue.trim()}))}var Uc=function e(t,n,r){return Hc(t)||Gc(t.actualNode)||!r&&!!Oc(t)||!n&&t.children.some((function(t){return 1===t.actualNode.nodeType&&e(t)}))},Wc=function(e,t,n){return e=_l(e),Uc(e,t,n)};function Yc(e){return!(void 0!==e.children&&!Hc(e))||(1===e.props.nodeType&&Gc(e)?!!o.commons.text.accessibleTextVirtual(e):e.children.some((function(e){return!e.attr("lang")&&Yc(e)&&!nu(e)})))}var Kc=function(e){return-1<Zf(e.getAttribute("tabindex"))&&rs(e)&&!ns(e)};function Xc(e,t){var n=(e=Hf(e)).vNode;e=e.domNode;return n?(void 0===n._isHiddenWithCSS&&(n._isHiddenWithCSS=Zc(e,t)),n._isHiddenWithCSS):Zc(e,t)}function Zc(e,n){if(9===e.nodeType)return!1;if(11===e.nodeType&&(e=e.host),["STYLE","SCRIPT"].includes(e.nodeName.toUpperCase()))return!1;var r,a=t.getComputedStyle(e,null);if(a)return"none"===a.getPropertyValue("display")||(r=["hidden","collapse"],a=a.getPropertyValue("visibility"),!(!r.includes(a)||n))||!!(r.includes(a)&&n&&r.includes(n))||!(!(n=ou(e))||r.includes(a))&&Xc(n,a);throw new Error("Style does not exist for the given element.")}var Jc=Xc,Qc=function(e){return null!==(e=e.doctype)&&"html"===e.name&&!e.publicId&&!e.systemId},ed=function(e){(e instanceof ua||null!=(n=t)&&n.Node&&e instanceof t.Node)&&(e=o.commons.aria.getRole(e));var n=gs.ariaRoles[e];return(null==n?void 0:n.type)||null},td=["block","list-item","table","flex","grid","inline-block"];function nd(e){return e=t.getComputedStyle(e).getPropertyValue("display"),td.includes(e)||"table-"===e.substr(0,6)}var rd=function(e,t){var n,r,a,o;return!nd(e)&&(n=(e=>{for(var t=ou(e);t&&!nd(t);)t=ou(t);return _l(t)})(e),a=r="",o=0,function e(t,n){!1!==n(t.actualNode)&&t.children.forEach((function(t){return e(t,n)}))}(n,(function(t){if(2===o)return!1;if(3===t.nodeType&&(r+=t.nodeValue),1===t.nodeType){var n=(t.nodeName||"").toUpperCase();if(t===e&&(o=1),!["BR","HR"].includes(n))return!("none"===t.style.display||"hidden"===t.style.overflow||!["",null,"none"].includes(t.style.float)||!["",null,"relative"].includes(t.style.position))&&("widget"===ed(t)?(a+=t.textContent,!1):void 0);0===o?a=r="":o=2}})),r=Ns(r),null!=t&&t.noLengthCompare?0!==r.length:(a=Ns(a),r.length>a.length))},ad=function(e){if(e=(e=e||{}).modalPercent||.75,Sl.get("isModalOpen"))return Sl.get("isModalOpen");if(rm(o._tree[0],"dialog, [role=dialog], [aria-modal=true]",du).length)return Sl.set("isModalOpen",!0),!0;for(var n,a=uu(t),i=a.width*e,l=a.height*e,u=(e=(a.width-i)/2,(a.height-l)/2),s=[{x:e,y:u},{x:a.width-e,y:u},{x:a.width/2,y:a.height/2},{x:e,y:a.height-u},{x:a.width-e,y:a.height-u}].map((function(e){return Array.from(r.elementsFromPoint(e.x,e.y))})),c=0;c<s.length;c++)if(n=(()=>{var e=s[c].find((function(e){return e=t.getComputedStyle(e),parseInt(e.width,10)>=i&&parseInt(e.height,10)>=l&&"none"!==e.getPropertyValue("pointer-events")&&("absolute"===e.position||"fixed"===e.position)}));if(e&&s.every((function(t){return t.includes(e)})))return Sl.set("isModalOpen",!0),{v:!0}})())return n.v;Sl.set("isModalOpen",void 0)};function od(e){var t,n=1<arguments.length&&void 0!==arguments[1]?arguments[1]:2,r=e.ownerDocument.createRange(),a=(r.setStart(e,0),r.setEnd(e,e.childNodes.length),0),o=0,i=K(r.getClientRects());try{for(i.s();!(t=i.n()).done;){var l=t.value;if(!(l.height<=n))if(l.top+n<a)a=Math.max(a,l.bottom);else{if(0!==o)return!0;a=l.bottom,o++}}}catch(e){i.e(e)}finally{i.f()}return!1}var id=function(e){return e instanceof t.Node},ld="color.incompleteData",ud={set:function(e,t){if("string"!=typeof e)throw new Error("Incomplete data: key must be a string");var n=Sl.get(ld,(function(){return{}}));return t&&(n[e]=t),n[e]},get:function(e){var t=Sl.get(ld);return null==t?void 0:t[e]},clear:function(){Sl.set(ld,{})}},sd=function(e,n){var r=e.nodeName.toUpperCase();return["IMG","CANVAS","OBJECT","IFRAME","VIDEO","SVG"].includes(r)?(ud.set("bgColor","imgNode"),!0):((e="none"!==(r=(n=n||t.getComputedStyle(e)).getPropertyValue("background-image")))&&(n=/gradient/.test(r),ud.set("bgColor",n?"bgGradient":"bgImage")),e)},cd=/^#[0-9a-f]{3,8}$/i,dd=/hsl\\(\\s*([-\\d.]+)(rad|turn)/,pd=(te=new WeakMap,ne=new WeakMap,re=new WeakMap,ae=new WeakMap,oe=new WeakMap,ie=new WeakMap,le=new WeakSet,W((function e(t,n,r){var a,o,i,l=3<arguments.length&&void 0!==arguments[3]?arguments[3]:1;H(this,e),B(this,le),I(this,te,void 0),I(this,ne,void 0),I(this,re,void 0),I(this,ae,void 0),I(this,oe,void 0),I(this,ie,void 0),t instanceof pd?(a=t.r,o=t.g,i=t.b,this.r=a,this.g=o,this.b=i,this.alpha=t.alpha):(this.red=t,this.green=n,this.blue=r,this.alpha=l)}),[{key:"r",get:function(){return L(te,this)},set:function(e){q(te,this,e),q(ae,this,Math.round(255*hd(e,0,1)))}},{key:"g",get:function(){return L(ne,this)},set:function(e){q(ne,this,e),q(oe,this,Math.round(255*hd(e,0,1)))}},{key:"b",get:function(){return L(re,this)},set:function(e){q(re,this,e),q(ie,this,Math.round(255*hd(e,0,1)))}},{key:"red",get:function(){return L(ae,this)},set:function(e){q(te,this,e/255),q(ae,this,hd(e,0,255))}},{key:"green",get:function(){return L(oe,this)},set:function(e){q(ne,this,e/255),q(oe,this,hd(e,0,255))}},{key:"blue",get:function(){return L(ie,this)},set:function(e){q(re,this,e/255),q(ie,this,hd(e,0,255))}},{key:"toHexString",value:function(){var e=Math.round(this.red).toString(16),t=Math.round(this.green).toString(16),n=Math.round(this.blue).toString(16);return"#"+(15.5<this.red?e:"0"+e)+(15.5<this.green?t:"0"+t)+(15.5<this.blue?n:"0"+n)}},{key:"toJSON",value:function(){return{red:this.red,green:this.green,blue:this.blue,alpha:this.alpha}}},{key:"parseString",value:function(e){e=e.replace(dd,(function(e,t,n){var r=t+n;switch(n){case"rad":return e.replace(r,180*t/Math.PI);case"turn":return e.replace(r,360*t)}}));try{"Prototype"in t&&"Version"in t.Prototype&&(n=Array.from,Array.from=sl.default);var n,r=new rl(e).to("srgb");n&&(Array.from=n,n=null),this.r=r.r,this.g=r.g,this.b=r.b,this.alpha=+r.alpha}catch(n){throw new Error('Unable to parse color "'.concat(e,'"'))}return this}},{key:"parseRgbString",value:function(e){this.parseString(e)}},{key:"parseHexString",value:function(e){e.match(cd)&&![6,8].includes(e.length)&&this.parseString(e)}},{key:"parseColorFnString",value:function(e){this.parseString(e)}},{key:"getRelativeLuminance",value:function(){var e=this.r,t=this.g,n=this.b;return.2126*(e<=.03928?e/12.92:Math.pow((e+.055)/1.055,2.4))+.7152*(t<=.03928?t/12.92:Math.pow((t+.055)/1.055,2.4))+.0722*(n<=.03928?n/12.92:Math.pow((n+.055)/1.055,2.4))}},{key:"getLuminosity",value:function(){return.3*this.r+.59*this.g+.11*this.b}},{key:"setLuminosity",value:function(e){return e-=this.getLuminosity(),z(le,this,fd).call(this,e).clip()}},{key:"getSaturation",value:function(){return Math.max(this.r,this.g,this.b)-Math.min(this.r,this.g,this.b)}},{key:"setSaturation",value:function(e){var t=new pd(this),n=V([{name:"r",value:t.r},{name:"g",value:t.g},{name:"b",value:t.b}].sort((function(e,t){return e.value-t.value})),3),r=n[0],a=n[1];return(n=n[2]).value>r.value?(a.value=(a.value-r.value)*e/(n.value-r.value),n.value=e):a.value=n.value=0,r.value=0,t[n.name]=n.value,t[r.name]=r.value,t[a.name]=a.value,t}},{key:"clip",value:function(){var e=new pd(this),t=e.getLuminosity(),n=Math.min(e.r,e.g,e.b),r=Math.max(e.r,e.g,e.b);return n<0&&(e.r=t+(e.r-t)*t/(t-n),e.g=t+(e.g-t)*t/(t-n),e.b=t+(e.b-t)*t/(t-n)),1<r&&(e.r=t+(e.r-t)*(1-t)/(r-t),e.g=t+(e.g-t)*(1-t)/(r-t),e.b=t+(e.b-t)*(1-t)/(r-t)),e}}]));function fd(e){var t=new pd(this);return t.r+=e,t.g+=e,t.b+=e,t}var md=pd;function hd(e,t,n){return Math.min(Math.max(t,e),n)}var gd=function(e){var t=new md;return t.parseString(e.getPropertyValue("background-color")),0!==t.alpha&&(e=e.getPropertyValue("opacity"),t.alpha=t.alpha*e),t},vd=function(e){var n=t.getComputedStyle(e);return sd(e,n)||1===gd(n).alpha};function bd(e){var t;return!(!e.href||(t=Sl.get("firstPageLink",yd))&&e.compareDocumentPosition(t.actualNode)!==e.DOCUMENT_POSITION_FOLLOWING)}function yd(){return(t.location.origin?fm(o._tree,'a[href]:not([href^="javascript:"])').find((function(e){return!Ku(e.actualNode)})):fm(o._tree,'a:not([href^="#"]):not([href^="/#"]):not([href^="javascript:"])')[0])||null}var Dd=/rect\\s*\\(([0-9]+)px,?\\s*([0-9]+)px,?\\s*([0-9]+)px,?\\s*([0-9]+)px\\s*\\)/,wd=/(\\w+)\\((\\d+)/;var xd=function e(n,r,a){if(!n)throw new TypeError("Cannot determine if element is visible for non-DOM nodes");var i,l,u,s=n instanceof ua?n:_l(n),c=(n=s?s.actualNode:n,"_isVisible"+(r?"ScreenReader":"")),d=(p=null!=(p=t.Node)?p:{}).DOCUMENT_NODE,p=p.DOCUMENT_FRAGMENT_NODE,f=(s?s.props:n).nodeType,m=s?s.props.nodeName:n.nodeName.toLowerCase();return s&&void 0!==s[c]?s[c]:f===d||!["style","script","noscript","template"].includes(m)&&(n&&f===p&&(n=n.host),(!r||"true"!==(s?s.attr("aria-hidden"):n.getAttribute("aria-hidden")))&&(n?null!==(d=t.getComputedStyle(n,null))&&("area"===m?(i=r,l=a,!!(p=jl(f=n,"map"))&&!!(p=p.getAttribute("name"))&&!(!(f=Pl(f))||9!==f.nodeType||!(u=fm(o._tree,'img[usemap="#'.concat(Aa(p),'"]')))||!u.length)&&u.some((function(t){return e(t.actualNode,i,l)}))):"none"!==d.getPropertyValue("display")&&(m=parseInt(d.getPropertyValue("height")),f=parseInt(d.getPropertyValue("width")),u=(p=Cf(n))&&0===m,p=p&&0===f,m="absolute"===d.getPropertyValue("position")&&(m<2||f<2)&&"hidden"===d.getPropertyValue("overflow"),!(!r&&((e=>{var t=e.getPropertyValue("clip").match(Dd),n=e.getPropertyValue("clip-path").match(wd);if(t&&5===t.length&&(e=e.getPropertyValue("position"),["fixed","absolute"].includes(e)))return t[3]-t[1]<=0&&t[2]-t[4]<=0;if(n){e=n[1];var r=parseInt(n[2],10);switch(e){case"inset":return 50<=r;case"circle":return 0===r}}})(d)||"0"===d.getPropertyValue("opacity")||u||p||m)||!a&&("hidden"===d.getPropertyValue("visibility")||!r&&su(n))))&&(f=!1,(p=n.assignedSlot||n.parentNode)&&(f=e(p,r,!0)),s&&(s[c]=f),f)):(m=!0,(a=s.parent)&&(m=e(a,r,!0)),s&&(s[c]=m),m)))},Ed=function(e,n){for(var r=["fixed","sticky"],a=[],o=!1,i=0;i<e.length;++i){var l=e[i],u=(l===n&&(o=!0),t.getComputedStyle(l));o||-1===r.indexOf(u.position)?a.push(l):a=[]}return a};function Ad(e,n){var r=Fd(n);do{var a,o,i,l,u,s,c=Fd(e);if(c===r||c===n)return a=e,o=n,s=(u=t.getComputedStyle(o)).getPropertyValue("overflow"),"inline"===u.getPropertyValue("display")||(a=Array.from(a.getClientRects()),i=o.getBoundingClientRect(),l={left:i.left,top:i.top,width:i.width,height:i.height},(["scroll","auto"].includes(s)||o instanceof t.HTMLHtmlElement)&&(l.width=o.scrollWidth,l.height=o.scrollHeight),1===a.length&&"hidden"===s&&"nowrap"===u.getPropertyValue("white-space")&&(a[0]=l),a.some((function(e){return!(Math.ceil(e.left)<Math.floor(l.left)||Math.ceil(e.top)<Math.floor(l.top)||Math.floor(e.left+e.width)>Math.ceil(l.left+l.width)||Math.floor(e.top+e.height)>Math.ceil(l.top+l.height))})))}while(e=c);return!1}function Fd(e){for(var t=_l(e).parent;t;){if(Cf(t.actualNode))return t.actualNode;t=t.parent}}var Cd=function e(t,n){var a=2<arguments.length&&void 0!==arguments[2]?arguments[2]:r,o=3<arguments.length&&void 0!==arguments[3]?arguments[3]:0;if(999<o)throw new Error("Infinite loop detected");return Array.from(a.elementsFromPoint(t,n)||[]).filter((function(e){return Pl(e)===a})).reduce((function(r,a){var i;return Wp(a)&&(i=e(t,n,a.shadowRoot,o+1),!(r=r.concat(i)).length||!Ad(r[0],a))||r.push(a),r}),[])},kd=function(e,t){var n,a;if(e.hasAttribute(t))return a=e.nodeName.toUpperCase(),n=e,["A","AREA"].includes(a)&&!e.ownerSVGElement||((n=r.createElement("a")).href=e.getAttribute(t)),a=["https:","ftps:"].includes(n.protocol)?n.protocol.replace(/s:$/,":"):n.protocol,t=(e=(e=(t=e=/^\\//.test(n.pathname)?n.pathname:"/".concat(n.pathname)).split("/").pop())&&-1!==e.indexOf(".")?{pathname:t.replace(e,""),filename:/index./.test(e)?"":e}:{pathname:t,filename:""}).pathname,e=e.filename,{protocol:a,hostname:n.hostname,port:(a=n.port,["443","80"].includes(a)?"":a),pathname:/\\/$/.test(t)?t:"".concat(t,"/"),search:(e=>{var t={};if(e&&e.length){var n=e.substring(1).split("&");if(n&&n.length)for(var r=0;r<n.length;r++){var a=(o=V(n[r].split("="),2))[0],o=void 0===(o=o[1])?"":o;t[decodeURIComponent(a)]=decodeURIComponent(o)}}return t})(n.search),hash:(a=n.hash)&&(t=a.match(/#!?\\/?/g))&&"#"!==V(t,1)[0]?a:"",filename:e}},Rd=function(e,n){var r=n.getBoundingClientRect(),a=r.top,o=r.left,i=a-n.scrollTop,l=(a=a-n.scrollTop+n.scrollHeight,o-n.scrollLeft);o=o-n.scrollLeft+n.scrollWidth;return!(e.left>o&&e.left>r.right||e.top>a&&e.top>r.bottom||e.right<l&&e.right<r.left||e.bottom<i&&e.bottom<r.top)&&(o=t.getComputedStyle(n),!(e.left>r.right||e.top>r.bottom)||"scroll"===o.overflow||"auto"===o.overflow||n instanceof t.HTMLBodyElement||n instanceof t.HTMLHtmlElement)},Nd=0;function Td(e,t,n){var r;return H(this,Td),(r=R(this,Td)).shadowId=n,r.children=[],r.actualNode=e,(r.parent=t)||(Nd=0),r.nodeIndex=Nd++,r._isHidden=null,r._cache={},r._isXHTML=dl(e.ownerDocument),"input"===e.nodeName.toLowerCase()&&(n=e.getAttribute("type"),n=r._isXHTML?n:(n||"").toLowerCase(),Fm().includes(n)||(n="text"),r._type=n),Sl.get("nodeMap")&&Sl.get("nodeMap").set(e,r),r}S(Td,ua);var Sd=W(Td,[{key:"props",get:function(){var e,t,n,r;return this._cache.hasOwnProperty("props")||(e=(r=this.actualNode).nodeType,t=r.nodeName,n=r.id,r=r.nodeValue,this._cache.props={nodeType:e,nodeName:this._isXHTML?t:t.toLowerCase(),id:n,type:this._type,nodeValue:r},1===e&&(this._cache.props.multiple=this.actualNode.multiple,this._cache.props.value=this.actualNode.value,this._cache.props.selected=this.actualNode.selected,this._cache.props.checked=this.actualNode.checked,this._cache.props.indeterminate=this.actualNode.indeterminate)),this._cache.props}},{key:"attr",value:function(e){return"function"!=typeof this.actualNode.getAttribute?null:this.actualNode.getAttribute(e)}},{key:"hasAttr",value:function(e){return"function"==typeof this.actualNode.hasAttribute&&this.actualNode.hasAttribute(e)}},{key:"attrNames",get:function(){var e;return this._cache.hasOwnProperty("attrNames")||(e=(this.actualNode.attributes instanceof t.NamedNodeMap?this.actualNode:this.actualNode.cloneNode(!1)).attributes,this._cache.attrNames=Array.from(e).map((function(e){return e.name}))),this._cache.attrNames}},{key:"getComputedStylePropertyValue",value:function(e){var n="computedStyle_"+e;return this._cache.hasOwnProperty(n)||(this._cache.hasOwnProperty("computedStyle")||(this._cache.computedStyle=t.getComputedStyle(this.actualNode)),this._cache[n]=this._cache.computedStyle.getPropertyValue(e)),this._cache[n]}},{key:"isFocusable",get:function(){return this._cache.hasOwnProperty("isFocusable")||(this._cache.isFocusable=rs(this.actualNode)),this._cache.isFocusable}},{key:"tabbableElements",get:function(){return this._cache.hasOwnProperty("tabbableElements")||(this._cache.tabbableElements=ts(this)),this._cache.tabbableElements}},{key:"clientRects",get:function(){return this._cache.hasOwnProperty("clientRects")||(this._cache.clientRects=Array.from(this.actualNode.getClientRects()).filter((function(e){return 0<e.width}))),this._cache.clientRects}},{key:"boundingClientRect",get:function(){return this._cache.hasOwnProperty("boundingClientRect")||(this._cache.boundingClientRect=this.actualNode.getBoundingClientRect()),this._cache.boundingClientRect}}]),_d="DqElm.RunOptions";function Od(e){var n=e.outerHTML;return(n=n||"function"!=typeof t.XMLSerializer?n:(new t.XMLSerializer).serializeToString(e))||""}var Md=cl((function(e,t,n){var r;return null==n&&(n={}),t=(t=null==t?null:t)||(null!=(r=Sl.get(_d))?r:{}),this.spec=n,e instanceof ua?(this._virtualNode=e,this._element=e.actualNode):(this._element=e,this._virtualNode=_l(e)),this.fromFrame=1<(null==(r=this.spec.selector)?void 0:r.length),this._includeElementInJson=t.elementRef,t.absolutePaths&&(this._options={toRoot:!0}),this.nodeIndexes=[],Array.isArray(this.spec.nodeIndexes)?this.nodeIndexes=this.spec.nodeIndexes:"number"==typeof(null==(n=this._virtualNode)?void 0:n.nodeIndex)&&(this.nodeIndexes=[this._virtualNode.nodeIndex]),this.source=null,o._audit.noHtml||(this.source=null!=(e=this.spec.source)?e:function(e){if(e){var t=Od(e),n=(_l(e)||new Sd(e)).props.nodeName;if(!(t.length<300)){var r=[];if(t=e.cloneNode(!1),e=Na(t),(t=Od(t)).length<300){var a,o="",i=K(e);try{for(i.s();!(a=i.n()).done;){var l=a.value,u={name:l.name,value:l.value};o+=" ".concat(u.name,'="').concat(u.value,'"')}}catch(e){i.e(e)}finally{i.f()}return"<".concat(n).concat(o,">")}var s,c="<".concat(n,">").length,d=K(e);try{for(d.s();!(s=d.n()).done;){var p=s.value,f=p.name,m=p.value;if(300<c)break;var h={name:f,value:m},g=h.value,v=20<(v=h.name).length?v.substring(0,20)+"...":v,b=(g=20<g.length?g.substring(0,20)+"...":g,"".concat(v,'="').concat(g,'"'));c+=(" "+b).length,r.push(b)}}catch(e){d.e(e)}finally{d.f()}300<(t="<".concat(n," ").concat(r.join(" "),">")).length?t=t.substring(0,300)+" ...>":r.length<e.length&&(t=t.substring(0,t.length-1)+" ...>")}return t}return""}(this._element)),this})),Pd=(Md.prototype={get selector(){return this.spec.selector||[Fl(this.element,this._options)]},get ancestry(){return this.spec.ancestry||[Rl(this.element)]},get xpath(){return this.spec.xpath||[Nl(this.element)]},get element(){return this._element},toJSON:function(){var e={selector:this.selector,source:this.source,xpath:this.xpath,ancestry:this.ancestry,nodeIndexes:this.nodeIndexes,fromFrame:this.fromFrame};return this._includeElementInJson&&(e.element=this._element),e}},Md.fromFrame=function(e,t,n){return e=Md.mergeSpecs(e,n),new Md(n.element,t,e)},Md.mergeSpecs=function(e,t){return O({},e,{selector:[].concat(M(t.selector),M(e.selector)),ancestry:[].concat(M(t.ancestry),M(e.ancestry)),xpath:[].concat(M(t.xpath),M(e.xpath)),nodeIndexes:[].concat(M(t.nodeIndexes),M(e.nodeIndexes)),fromFrame:!0})},Md.setRunOptions=function(e){var t=e.elementRef;Sl.set(_d,{elementRef:t,absolutePaths:e.absolutePaths})},Md),Id=function(e,n,r,a){return{isAsync:!1,async:function(){return this.isAsync=!0,function(t){t instanceof Error==0?(e.result=t,r(e)):a(t)}},data:function(t){e.data=t},relatedNodes:function(n){t.Node&&(n=n instanceof t.Node||n instanceof ua?[n]:Ea(n),e.relatedNodes=[],n.forEach((function(n){(n=n instanceof ua?n.actualNode:n)instanceof t.Node&&(n=new Pd(n),e.relatedNodes.push(n))})))}}};function Bd(e){return function e(n,r){var o,i;if(null===n||"object"!==a(n))return n;if(null!=(o=t)&&o.Node&&n instanceof t.Node||null!=(o=t)&&o.HTMLCollection&&n instanceof t.HTMLCollection||"nodeName"in n&&"nodeType"in n&&"ownerDocument"in n)return n;if(r.has(n))return r.get(n);if(Array.isArray(n))return i=[],r.set(n,i),n.forEach((function(t){i.push(e(t,r))})),i;var l={};for(var u in r.set(n,l),n)l[u]=e(n[u],r);return l}(e,new Map)}(Yo=new _a.CssSelectorParser).registerSelectorPseudos("not"),Yo.registerSelectorPseudos("is"),Yo.registerNestingOperators(">"),Yo.registerAttrEqualityMods("^","$","*","~");var jd=Yo;function Ld(e,t){return Hd(t).some((function(t){return Ud(e,t)}))}function qd(e,t){return i=t,1===(o=e).props.nodeType&&("*"===i.tag||o.props.nodeName===i.tag)&&(a=e,!(o=t).classes||o.classes.every((function(e){return a.hasClass(e.value)})))&&(r=e,!(i=t).attributes||i.attributes.every((function(e){var t=r.attr(e.key);return null!==t&&e.test(t)})))&&(o=e,!(i=t).id||o.props.id===i.id)&&(n=e,!((o=t).pseudos&&!o.pseudos.every((function(e){if("not"===e.name)return!e.expressions.some((function(e){return Ud(n,e)}));if("is"===e.name)return e.expressions.some((function(e){return Ud(n,e)}));throw new Error("the pseudo selector "+e.name+" has not yet been implemented")}))));var n,r,a,o,i}zd=/(?=[\\-\\[\\]{}()*+?.\\\\\\^$|,#\\s])/g;var zd,Vd=function(e){return e.replace(zd,"\\\\")},Gd=/\\\\/g;function $d(e){return e.map((function(e){for(var t=[],n=e.rule;n;)t.push({tag:n.tagName?n.tagName.toLowerCase():"*",combinator:n.nestingOperator||" ",id:n.id,attributes:(e=>{if(e)return e.map((function(e){var t,n,r=e.name.replace(Gd,""),a=(e.value||"").replace(Gd,"");switch(e.operator){case"^=":n=new RegExp("^"+Vd(a));break;case"$=":n=new RegExp(Vd(a)+"$");break;case"~=":n=new RegExp("(^|\\\\s)"+Vd(a)+"(\\\\s|$)");break;case"|=":n=new RegExp("^"+Vd(a)+"(-|$)");break;case"=":t=function(e){return a===e};break;case"*=":t=function(e){return e&&e.includes(a)};break;case"!=":t=function(e){return a!==e};break;default:t=function(e){return null!==e}}return""===a&&/^[*$^]=$/.test(e.operator)&&(t=function(){return!1}),{key:r,value:a,type:void 0===e.value?"attrExist":"attrValue",test:t=t||function(e){return e&&n.test(e)}}}))})(n.attrs),classes:(e=>{if(e)return e.map((function(e){return{value:e=e.replace(Gd,""),regexp:new RegExp("(^|\\\\s)"+Vd(e)+"(\\\\s|$)")}}))})(n.classNames),pseudos:(e=>{if(e)return e.map((function(e){var t;return["is","not"].includes(e.name)&&(t=$d(t=(t=e.value).selectors||[t])),{name:e.name,expressions:t,value:e.value}}))})(n.pseudos)}),n=n.rule;return t}))}function Hd(e){return $d((e=jd.parse(e)).selectors||[e])}function Ud(e,t,n){return function e(t,n,r,a){if(!t)return!1;for(var o=Array.isArray(n)?n[r]:n,i=qd(t,o);!i&&a&&t.parent;)i=qd(t=t.parent,o);if(0<r){if(!1===[" ",">"].includes(o.combinator))throw new Error("axe.utils.matchesExpression does not support the combinator: "+o.combinator);i=i&&e(t.parent,n,r-1," "===o.combinator)}return i}(e,t,t.length-1,n)}var Wd=function(e,t){for(;e;){if(Ld(e,t))return e;if(void 0===e.parent)throw new TypeError("Cannot resolve parent for non-DOM nodes");e=e.parent}return null};function Yd(){}function Kd(e){if("function"!=typeof e)throw new TypeError("Queue methods require functions as arguments")}for(var Xd,Zd,Jd,Qd=function(){function e(e){t=e,setTimeout((function(){null!=t&&ia("Uncaught error (of queue)",t)}),1)}var t,n=[],r=0,o=0,i=Yd,l=!1,u=e;function s(e){return i=Yd,u(e),n}function c(){for(var e=n.length;r<e;r++){var t=n[r];try{t.call(null,(e=>function(t){n[e]=t,--o||i===Yd||(l=!0,i(n))})(r),s)}catch(e){s(e)}}}var d={defer:function(e){var r;if("object"===a(e)&&e.then&&e.catch&&(r=e,e=function(e,t){r.then(e).catch(t)}),Kd(e),void 0===t){if(l)throw new Error("Queue already completed");return n.push(e),++o,c(),d}},then:function(e){if(Kd(e),i!==Yd)throw new Error("queue \`then\` already set");return t||(i=e,o)||(l=!0,i(n)),d},catch:function(n){if(Kd(n),u!==e)throw new Error("queue \`catch\` already set");return t?(n(t),t=null):u=n,d},abort:s};return d},ep=t.crypto||t.msCrypto,tp=(!Zd&&ep&&ep.getRandomValues&&(Xd=new Uint8Array(16),Zd=function(){return ep.getRandomValues(Xd),Xd}),Zd||(Jd=new Array(16),Zd=function(){for(var e,t=0;t<16;t++)0==(3&t)&&(e=4294967296*Math.random()),Jd[t]=e>>>((3&t)<<3)&255;return Jd}),"function"==typeof t.Buffer?t.Buffer:Array),np=[],rp={},ap=0;ap<256;ap++)np[ap]=(ap+256).toString(16).substr(1),rp[np[ap]]=ap;function op(e,t){return t=t||0,np[e[t++]]+np[e[t++]]+np[e[t++]]+np[e[t++]]+"-"+np[e[t++]]+np[e[t++]]+"-"+np[e[t++]]+np[e[t++]]+"-"+np[e[t++]]+np[e[t++]]+"-"+np[e[t++]]+np[e[t++]]+np[e[t++]]+np[e[t++]]+np[e[t++]]+np[e[+t]]}var ip=[1|(kn=Zd())[0],kn[1],kn[2],kn[3],kn[4],kn[5]],lp=16383&(kn[6]<<8|kn[7]),up=0,sp=0;function cp(e,t,n){var r=t&&n||0,a=t||[],o=(n=null!=(e=e||{}).clockseq?e.clockseq:lp,null!=e.msecs?e.msecs:(new Date).getTime()),i=null!=e.nsecs?e.nsecs:sp+1;if((l=o-up+(i-sp)/1e4)<0&&null==e.clockseq&&(n=n+1&16383),1e4<=(i=(l<0||up<o)&&null==e.nsecs?0:i))throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");up=o,lp=n;for(var l=(1e4*(268435455&(o+=122192928e5))+(sp=i))%4294967296,u=(i=(a[r++]=l>>>24&255,a[r++]=l>>>16&255,a[r++]=l>>>8&255,a[r++]=255&l,o/4294967296*1e4&268435455),a[r++]=i>>>8&255,a[r++]=255&i,a[r++]=i>>>24&15|16,a[r++]=i>>>16&255,a[r++]=n>>>8|128,a[r++]=255&n,e.node||ip),s=0;s<6;s++)a[r+s]=u[s];return t||op(a)}function dp(e,t,n){var r=t&&n||0,a=("string"==typeof e&&(t="binary"==e?new tp(16):null,e=null),(e=e||{}).random||(e.rng||Zd)());if(a[6]=15&a[6]|64,a[8]=63&a[8]|128,t)for(var o=0;o<16;o++)t[r+o]=a[o];return t||op(a)}(ra=dp).v1=cp,ra.v4=dp,ra.parse=function(e,t,n){var r=t&&n||0,a=0;for(t=t||[],e.toLowerCase().replace(/[0-9a-f]{2}/g,(function(e){a<16&&(t[r+a++]=rp[e])}));a<16;)t[r+a++]=0;return t},ra.unparse=op,ra.BufferClass=tp,o._uuid=cp();var pp=dp,fp=Object.freeze(["EvalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"]);function mp(){var e="axeAPI",t="";return(e=void 0!==o&&o._audit&&o._audit.application?o._audit.application:e)+"."+(void 0!==o?o.version:t)}function hp(e){vp(e),xa(t.parent===e,"Source of the response must be the parent window.")}function gp(e){vp(e),xa(e.parent===t,"Respondable target must be a frame in the current window")}function vp(e){xa(t!==e,"Messages can not be sent to the same window.")}var bp={},yp=[];function Dp(){var e="".concat(dp(),":").concat(dp());return yp.includes(e)?Dp():(yp.push(e),e)}function wp(e,t,n,r){var a,i,l,u;return(n?hp:gp)(e),t.message instanceof Error&&!n?(o.log(t.message),!1):(i=(u=O({messageId:Dp()},t)).topic,l=u.message,i={channelId:u.channelId,topic:i,messageId:u.messageId,keepalive:!!u.keepalive,source:mp()},l instanceof Error?i.error={name:l.name,message:l.message,stack:l.stack}:i.payload=l,a=JSON.stringify(i),!(!(u=o._audit.allowedOrigins)||!u.length||("function"==typeof r&&function(e,t,n){n=!(2<arguments.length&&void 0!==n)||n,xa(!bp[e],"A replyHandler already exists for this message channel."),bp[e]={replyHandler:t,sendToParent:n}}(t.channelId,r,n),u.forEach((function(t){try{e.postMessage(a,t)}catch(n){if(n instanceof e.DOMException)throw new Error('allowedOrigins value "'.concat(t,'" is not a valid origin'));throw n}})),0)))}function xp(e,t,n){var r=!(2<arguments.length&&void 0!==n)||n;return function(n,a,o){wp(e,{channelId:t,message:n,keepalive:a},r,o)}}function Ep(e,n){var r,i,l,u=e.origin,s=e.data;e=e.source;try{var c=function(e){var n,r,o,i;try{n=JSON.parse(e)}catch(e){return}if(null!==(e=n)&&"object"===a(e)&&"string"==typeof e.channelId&&e.source===mp())return r=(e=n).topic,o=e.channelId,i=e.messageId,e=e.keepalive,{topic:r,message:"object"===a(n.error)?(e=>{var n=e.message||"Unknown error occurred",r=fp.includes(e.name)?e.name:"Error";return r=t[r]||Error,e.stack&&(n+="\\n"+e.stack.replace(e.message,"")),new r(n)})(n.error):n.payload,messageId:i,channelId:o,keepalive:!!e}}(s)||{},d=c.channelId,p=c.message,f=c.messageId;if(i=u,((l=o._audit.allowedOrigins)&&l.includes("*")||l.includes(i))&&(r=f,!yp.includes(r))&&(yp.push(r),1))if(p instanceof Error&&e.parent!==t)o.log(p);else try{if(c.topic){var m=xp(e,d);hp(e),n(c,m)}else{var h=e,g=(b=c).channelId,v=b.message,b=b.keepalive,y=(D=(e=>bp[e])(g)||{}).replyHandler,D=D.sendToParent;if(y){(D?hp:gp)(h),h=xp(h,g,D),!b&&g&&(e=>{delete bp[e]})(g);try{y(v,b,h)}catch(n){o.log(n),h(n,b)}}}}catch(n){var w=e,x=n,E=d;if(!w.parent!==t)o.log(x);else try{wp(w,{topic:null,channelId:E,message:x,messageId:Dp(),keepalive:!0},!0)}catch(n){return void o.log(n)}}}catch(n){o.log(n)}}var Ap,Fp,Cp={open:function(e){var n;if("function"==typeof t.addEventListener)return t.addEventListener("message",n=function(t){Ep(t,e)},!1),function(){t.removeEventListener("message",n,!1)}},post:function(e,n,r){return"function"==typeof t.addEventListener&&wp(e,n,!1,r)}};function kp(e){e.updateMessenger(Cp)}var Rp={};function Np(e,t,n,r,a){return t={topic:t,message:n,channelId:"".concat(dp(),":").concat(dp()),keepalive:r},Fp(e,t,a)}function Tp(e,t){var n=e.topic,r=e.message;e=e.keepalive;if(n=Rp[n])try{n(r,e,t)}catch(n){o.log(n),t(n,e)}}function Sp(e,t,n,r){var a,o=e.contentWindow,i=null!=(i=null==(i=t.options)?void 0:i.pingWaitTime)?i:500;o?0===i?_p(e,t,n,r):(a=setTimeout((function(){a=setTimeout((function(){t.debug?r(Op("No response from frame",e)):n(null)}),0)}),i),Np(o,"axe.ping",null,void 0,(function(){clearTimeout(a),_p(e,t,n,r)}))):(ia("Frame does not have a content window",e),n(null))}function _p(e,t,n,r){var a=null!=(a=null==(a=t.options)?void 0:a.frameWaitTime)?a:6e4,o=e.contentWindow,i=setTimeout((function(){r(Op("Axe in frame timed out",e))}),a);Np(o,"axe.start",t,void 0,(function(e){clearTimeout(i),(e instanceof Error==0?n:r)(e)}))}function Op(e,t){var n;return o._tree&&(n=Fl(t)),new Error(e+": "+(n||t))}Np.updateMessenger=function(e){var t=e.open;e=e.post,xa("function"==typeof t,"open callback must be a function"),xa("function"==typeof e,"post callback must be a function"),Ap&&Ap(),t=t(Tp);Ap=t?(xa("function"==typeof t,"open callback must return a cleanup function"),t):null,Fp=e},Np.subscribe=function(e,t){xa("function"==typeof t,"Subscriber callback must be a function"),xa(!Rp[e],"Topic ".concat(e," is already registered to.")),Rp[e]=t},Np.isInFrame=function(){return!!(0<arguments.length&&void 0!==arguments[0]?arguments[0]:t).frameElement},kp(Np);var Mp=null,Pp={update:function(e){xa("object"===a(e),"serializer must be an object"),Mp=e},toSpec:function(e){return Pp.dqElmToSpec(new Pd(e))},dqElmToSpec:function(e,t){var n,r,a,o,i;return e instanceof Pd==0?e:(t&&(r=(n=e).fromFrame,a=t.ancestry,o=t.xpath,i=!1!==t.selectors||r,(n=new Pd(n.element,t,{source:n.source,nodeIndexes:n.nodeIndexes,selector:i?n.selector:[":root"],ancestry:a?n.ancestry:[":root"],xpath:o?n.xpath:"/"})).fromFrame=r,e=n),"function"==typeof(null==(t=Mp)?void 0:t.toSpec)?Mp.toSpec(e):e.toJSON())},mergeSpecs:function(e,t){var n;return("function"==typeof(null==(n=Mp)?void 0:n.mergeSpecs)?Mp:Pd).mergeSpecs(e,t)},mapRawResults:function(e){return e.map((function(e){return O({},e,{nodes:Pp.mapRawNodeResults(e.nodes)})}))},mapRawNodeResults:function(e){return null==e?void 0:e.map((function(e){var t=e.node,n=k(e,g);n.node=Pp.dqElmToSpec(t);for(var r=0,a=["any","all","none"];r<a.length;r++){var o=a[r];n[o]=n[o].map((function(e){var t=e.relatedNodes;return(e=k(e,v)).relatedNodes=t.map(Pp.dqElmToSpec),e}))}return n}))}},Ip=Pp,Bp=function(e){return[].concat(e.any||[]).concat(e.all||[]).concat(e.none||[])},jp=function(e,t,n){if(Array.isArray(e))return e.find((function(e){return null!==e&&"object"===a(e)&&Object.hasOwn(e,t)&&e[t]===n}))};function Lp(e,t){for(var n=0<arguments.length&&void 0!==e?e:[],r=1<arguments.length&&void 0!==t?t:[],a=Math.max(null==n?void 0:n.length,null==r?void 0:r.length),o=0;o<a;o++){var i=null==n?void 0:n[o],l=null==r?void 0:r[o];if("number"!=typeof i||isNaN(i))return 0===o?1:-1;if("number"!=typeof l||isNaN(l))return 0===o?-1:1;if(i!==l)return i-l}return 0}var qp=function(e,t){var n=[];return e.forEach((function(e){var t,r=(r=e)&&r.results?Array.isArray(r.results)?r.results.length?r.results:null:[r.results]:null;r&&r.length&&(t=(e=>e.frameElement?Ip.toSpec(e.frameElement):e.frameSpec||null)(e),r.forEach((function(e){e.nodes&&t&&(a=e.nodes,r=t,a.forEach((function(e){e.node=Ip.mergeSpecs(e.node,r),Bp(e).forEach((function(e){e.relatedNodes=e.relatedNodes.map((function(e){return Ip.mergeSpecs(e,r)}))}))})));var r,a=jp(n,"id",e.id);a?(e.nodes.length&&((e,t)=>{for(var n=t[0].node,r=0;r<e.length;r++){var a,o=Lp((a=e[r].node).nodeIndexes,n.nodeIndexes);if(0<o||0===o&&n.selector.length<a.selector.length)return e.splice.apply(e,[r,0].concat(M(t)))}e.push.apply(e,M(t))})(a.nodes,e.nodes),e.error&&null==a.error&&(a.error=e.error)):n.push(e)})))})),n.forEach((function(e){e.nodes&&e.nodes.sort((function(e,t){return Lp(e.node.nodeIndexes,t.node.nodeIndexes)}))})),n};function zp(e,t,n,r,a,o){t=O({},t,{elementRef:!1});var i=Qd();e.frames.forEach((function(e){var a=e.node,o=k(e,b);i.defer((function(e,i){Sp(a,{options:t,command:n,parameter:r,context:o},(function(t){return e(t?{results:t,frameElement:a}:null)}),i)}))})),i.then((function(e){a(qp(e,t))})).catch(o)}function Vp(e,t){if(!e.shadowId&&!t.shadowId&&e.actualNode&&"function"==typeof e.actualNode.contains)return e.actualNode.contains(t.actualNode);do{if(e===t)return!0;if(t.nodeIndex<e.nodeIndex)return!1}while(t=t.parent);return!1}var Gp,$p=function e(){for(var t={},n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return r.forEach((function(n){if(n&&"object"===a(n)&&!Array.isArray(n))for(var r=0,o=Object.keys(n);r<o.length;r++){var i=o[r];!t.hasOwnProperty(i)||"object"!==a(n[i])||Array.isArray(t[i])?t[i]=n[i]:t[i]=e(t[i],n[i])}})),t},Hp=function(e,t){Object.assign(e,t),Object.keys(t).filter((function(e){return"function"==typeof t[e]})).forEach((function(n){e[n]=null;try{e[n]=t[n](e)}catch(n){}}))},Up=["article","aside","blockquote","body","div","footer","h1","h2","h3","h4","h5","h6","header","main","nav","p","section","span"],Wp=function(e){return!!(e.shadowRoot&&(e=e.nodeName.toLowerCase(),Up.includes(e)||/^[a-z][a-z0-9_.-]*-[a-z0-9_.-]*$/.test(e)))},Yp=function(e){return(e||"").trim().replace(/\\s{2,}/g," ").split(" ")},Kp=" [idsMap]";function Xp(e,t,n){var r=e[0]._selectorMap;if(r){for(var a=e[0].shadowId,o=0;o<t.length;o++)if(1<t[o].length&&t[o].some(Zp))return;var i=new Set,l=(t.forEach((function(e){var t,n=((e,t,n)=>{var r=e[e.length-1],a=null,o=1<e.length||!!r.pseudos||!!r.classes;if(Zp(r))a=t["*"];else{if(r.id){if(!t[Kp]||!Object.hasOwn(t[Kp],r.id)||null==(e=t[Kp][r.id])||!e.length)return;a=t[Kp][r.id].filter((function(e){return e.shadowId===n}))}if(r.tag&&"*"!==r.tag){if(null==(e=t[r.tag])||!e.length)return;e=t[r.tag];a=a?Jp(e,a):e}if(r.classes){if(null==(e=t["[class]"])||!e.length)return;e=t["[class]"],a=a?Jp(e,a):e}if(r.attributes)for(var i=0;i<r.attributes.length;i++){var l=r.attributes[i];if("attrValue"===l.type&&(o=!0),null==(u=t["[".concat(l.key,"]")])||!u.length)return;var u=t["[".concat(l.key,"]")];a=a?Jp(u,a):u}}return{nodes:a,isComplexSelector:o}})(e,r,a);null!=n&&null!=(t=n.nodes)&&t.forEach((function(t){n.isComplexSelector&&!Ud(t,e)||i.add(t)}))})),[]);return i.forEach((function(e){return l.push(e)})),(l=n?l.filter(n):l).sort((function(e,t){return e.nodeIndex-t.nodeIndex}))}}function Zp(e){return"*"===e.tag&&!e.attributes&&!e.id&&!e.classes}function Jp(e,t){return e.filter((function(e){return t.includes(e)}))}function Qp(e,t,n){Object.hasOwn(n,e)||(n[e]=[]),n[e].push(t)}function ef(e,t){1===e.props.nodeType&&(Qp(e.props.nodeName,e,t),Qp("*",e,t),e.attrNames.forEach((function(n){"id"===n&&(t[Kp]=t[Kp]||{},Yp(e.attr(n)).forEach((function(n){Qp(n,e,t[Kp])}))),Qp("[".concat(n,"]"),e,t)})))}function tf(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:r.documentElement,t=1<arguments.length?arguments[1]:void 0,n=(Gp=!1,{});return(e=(Sl.set("nodeMap",new WeakMap),Sl.set("selectorMap",n),af(e,t,null)))[0]._selectorMap=n,e[0]._hasShadowRoot=Gp,e}function nf(e,t,n){return ef(e=new Sd(e,t,n),Sl.get("selectorMap")),e}function rf(e,t,n){var r=[];return e.forEach((function(e){(e=af(e,n,t))&&r.push.apply(r,M(e))})),r}function af(e,n,a){var o,i,l=(e=e.documentElement?e.documentElement:e).nodeName.toLowerCase();return Wp(e)?(Gp=!0,o=nf(e,a,n),n="a"+Math.random().toString().substring(2),i=Array.from(e.shadowRoot.childNodes),o.children=rf(i,o,n),[o]):"content"===l&&"function"==typeof e.getDistributedNodes?rf(i=Array.from(e.getDistributedNodes()),a,n):"slot"===l&&"function"==typeof e.assignedNodes?((i=Array.from(e.assignedNodes())).length||(i=(e=>{var t=[];for(e=e.firstChild;e;)t.push(e),e=e.nextSibling;return t})(e)),t.getComputedStyle(e),rf(i,a,n)):e.nodeType===r.ELEMENT_NODE?(o=nf(e,a,n),i=Array.from(e.childNodes),o.children=rf(i,o,n),[o]):e.nodeType===r.TEXT_NODE?[nf(e,a)]:void 0}var of=function(e){return e?e.trim().split("-")[0].toLowerCase():""},lf=function(e){var t={};return t.none=e.none.concat(e.all),t.any=e.any,Object.keys(t).map((function(e){var n;return t[e].length&&(n=o._audit.data.failureSummaries[e])&&"function"==typeof n.failureMessage?n.failureMessage(t[e].map((function(e){return e.message||""}))):void 0})).filter((function(e){return void 0!==e})).join("\\n\\n")};function uf(){var e=o._audit.data.incompleteFallbackMessage;return"string"!=typeof(e="function"==typeof e?e():e)?"":e}var sf=oa.resultGroups;function cf(e,t){var n=o.utils.aggregateResult(e);return sf.forEach((function(e){t.resultTypes&&!t.resultTypes.includes(e)&&(n[e]||[]).forEach((function(e){Array.isArray(e.nodes)&&0<e.nodes.length&&(e.nodes=[e.nodes[0]])})),n[e]=(n[e]||[]).map((function(e){return e=Object.assign({},e),Array.isArray(e.nodes)&&0<e.nodes.length&&(e.nodes=e.nodes.map((function(e){var n,r,o;return"object"===a(e.node)&&(n=df(e.node,t),Object.assign(e,n)),delete e.result,delete e.node,r=e,o=t,["any","all","none"].forEach((function(e){Array.isArray(r[e])&&r[e].filter((function(e){return Array.isArray(e.relatedNodes)})).forEach((function(e){e.relatedNodes=e.relatedNodes.map((function(e){return df(e,o)}))}))})),e}))),sf.forEach((function(t){return delete e[t]})),delete e.pageLevel,delete e.result,e}))})),n}function df(e,t){e=0<arguments.length&&void 0!==e?e:{},t=1<arguments.length?t:void 0,e=Ip.dqElmToSpec(e,t);var n,r={};return o._audit.noHtml?r.html=null:r.html=null!=(n=e.source)?n:"Undefined",t.elementRef&&!e.fromFrame&&(r.element=null!=(n=e.element)?n:null),!1===t.selectors&&!e.fromFrame||(r.target=null!=(n=e.selector)?n:[":root"]),t.ancestry&&(r.ancestry=null!=(n=e.ancestry)?n:[":root"]),t.xpath&&(r.xpath=null!=(n=e.xpath)?n:["/"]),r}var pf=/\\$\\{\\s?data\\s?\\}/g;function ff(e,t){if("string"==typeof t)return e.replace(pf,t);for(var n in t){var r;t.hasOwnProperty(n)&&(r=new RegExp("\\\\\${\\\\s?data\\\\."+n+"\\\\s?}","g"),n=void 0===t[n]?"":String(t[n]),e=e.replace(r,n))}return e}var mf=function e(t,n){var r;if(t)return Array.isArray(n)?(n.values=n.join(", "),"string"==typeof t.singular&&"string"==typeof t.plural?ff(1===n.length?t.singular:t.plural,n):ff(t,n)):"string"==typeof t?ff(t,n):"string"==typeof n?ff(t[n],n):(r=t.default||uf(),e(r=n&&n.messageKey&&t[n.messageKey]?t[n.messageKey]:r,n))},hf=function(e,t,n){var r=o._audit.data.checks[e];if(!r)throw new Error("Cannot get message for unknown check: ".concat(e,"."));if(r.messages[t])return mf(r.messages[t],n);throw new Error('Check "'.concat(e,'"" does not have a "').concat(t,'" message.'))},gf=function(e,t,n){t=((n.rules&&n.rules[t]||{}).checks||{})[e.id];var r=(n.checks||{})[e.id],a=e.enabled;e=e.options;return r&&(r.hasOwnProperty("enabled")&&(a=r.enabled),r.hasOwnProperty("options"))&&(e=r.options),t&&(t.hasOwnProperty("enabled")&&(a=t.enabled),t.hasOwnProperty("options"))&&(e=t.options),{enabled:a,options:e,absolutePaths:n.absolutePaths}};function vf(){var e,n,r,i,l=0<arguments.length&&void 0!==arguments[0]?arguments[0]:null,u=1<arguments.length&&void 0!==arguments[1]?arguments[1]:t;return l&&"object"===a(l)?l:"object"!==a(u)?{}:{testEngine:{name:"axe-core",version:o.version},testRunner:{name:o._audit.brand},testEnvironment:(l=u).navigator&&"object"===a(l.navigator)?(e=l.navigator,n=l.innerHeight,r=l.innerWidth,l=(e=>(e=e.screen).orientation||e.msOrientation||e.mozOrientation)(l)||{},i=l.angle,l=l.type,{userAgent:e.userAgent,windowWidth:r,windowHeight:n,orientationAngle:i,orientationType:l}):{},timestamp:(new Date).toISOString(),url:null==(e=u.location)?void 0:e.href}}function bf(e,t){var n=t.focusable;t=t.page;return{node:e,include:[],exclude:[],initiator:!1,focusable:n&&(e=>null===(e=Zf(e.getAttribute("tabindex")))||0<=e)(e),size:(e=>{var t=parseInt(e.getAttribute("width"),10),n=parseInt(e.getAttribute("height"),10);return(isNaN(t)||isNaN(n))&&(e=e.getBoundingClientRect(),t=isNaN(t)?e.width:t,n=isNaN(n)?e.height:n),{width:t,height:n}})(e),page:t}}function yf(e){var n=0<arguments.length&&void 0!==e?e:[],r=[];_f(n)||(n=[n]);for(var a=0;a<n.length;a++){var o=(e=>{if(e instanceof t.Node)return e;if("string"==typeof e)return[e];var n;if(Bf(e)?(n=e,Df(Array.isArray(n.fromFrames),"fromFrames property must be an array"),Df(n.fromFrames.every((function(e){return!Of(e,"fromFrames")})),"Invalid context; fromFrames selector must be appended, rather than nested"),Df(!Of(n,"fromShadowDom"),"fromFrames and fromShadowDom cannot be used on the same object"),e=e.fromFrames):jf(e)&&(e=[e]),Array.isArray(e)){var r,a=[],o=K(e);try{for(o.s();!(r=o.n()).done;){var i=r.value;if(jf(i)&&((e=>{Df(Array.isArray(e.fromShadowDom),"fromShadowDom property must be an array"),Df(e.fromShadowDom.every((function(e){return!Of(e,"fromFrames")})),"shadow selector must be inside fromFrame instead"),Df(e.fromShadowDom.every((function(e){return!Of(e,"fromShadowDom")})),"fromShadowDom selector must be appended, rather than nested")})(i),i=i.fromShadowDom),"string"!=typeof i&&!(e=>Array.isArray(e)&&e.every((function(e){return"string"==typeof e})))(i))return;a.push(i)}}catch(e){o.e(e)}finally{o.f()}return a}})(n[a]);o&&r.push(o)}return r}function Df(e,t){xa(e,"Invalid context; ".concat(t,"\\nSee: https://github.com/dequelabs/axe-core/blob/master/doc/context.md"))}function wf(e,n){for(var r=[],a=0,o=e[n].length;a<o;a++){var i=e[n][a];i instanceof t.Node?i.documentElement instanceof t.Node?r.push(e.flatTree[0]):r.push(_l(i)):i&&i.length&&(1<i.length?((e,t,n)=>{e.frames=e.frames||[],Am(n.shift()).forEach((function(r){var a=e.frames.find((function(e){return e.node===r}));a||(a=bf(r,e),e.frames.push(a)),a[t].push(n)}))})(e,n,i):(i=Am(i[0]),r.push.apply(r,M(i.map((function(e){return _l(e)}))))))}return r.filter((function(e){return e}))}function xf(e,n){var o=this,i=(e=Bd(e),this.frames=[],this.page="boolean"==typeof(null==(i=e)?void 0:i.page)?e.page:void 0,this.initiator="boolean"!=typeof(null==(i=e)?void 0:i.initiator)||e.initiator,this.focusable="boolean"!=typeof(null==(i=e)?void 0:i.focusable)||e.focusable,this.size="object"===a(null==(i=e)?void 0:i.size)?e.size:{},e=(e=>{if(Pf(e)){var t=" must be used inside include or exclude. It should not be on the same object.";Df(!Of(e,"fromFrames"),"fromFrames"+t),Df(!Of(e,"fromShadowDom"),"fromShadowDom"+t)}else{if(!If(e))return{include:[r],exclude:[]};e={include:e,exclude:[]}}return 0===(t=yf(e.include)).length&&t.push(r),{include:t,exclude:e=yf(e.exclude)}})(e),this.flatTree=null!=n?n:tf((e=>{for(var n=e.include,a=(e=e.exclude,Array.from(n).concat(Array.from(e))),o=0;o<a.length;o++){var i=a[o];if(i instanceof t.Element)return i.ownerDocument.documentElement;if(i instanceof t.Document)return i.documentElement}return r.documentElement})(e)),this.exclude=e.exclude,this.include=e.include,this.include=wf(this,"include"),this.exclude=wf(this,"exclude"),bm("frame, iframe",this).forEach((function(e){var t;zf(e,o)&&(t=o,nc(e=e.actualNode))&&!jp(t.frames,"node",e)&&t.frames.push(bf(e,t))})),void 0===this.page&&(this.page=(e=>1===(e=e.include).length&&e[0].actualNode===r.documentElement)(this),this.frames.forEach((function(e){e.page=o.page}))),this);if(0===i.include.length&&0===i.frames.length)throw i=Np.isInFrame()?"frame":"page",new Error("No elements found for include in "+i+" Context");Array.isArray(this.include)||(this.include=Array.from(this.include)),this.include.sort($f)}function Ef(e){return!1===(1<arguments.length&&void 0!==arguments[1]?arguments[1]:{}).iframes?[]:new xf(e).frames.map((function(e){var t=e.node;return(e=k(e,y)).initiator=!1,{frameSelector:Rl(t),frameContext:e}}))}function Af(e){var t=o._audit.rules.find((function(t){return t.id===e}));if(t)return t;throw new Error("Cannot find rule by id: ".concat(e))}function Ff(e,t){return e=e.getPropertyValue(t),["scroll","auto"].includes(e)}var Cf=cl((function(e){var n,r,a=1<arguments.length&&void 0!==arguments[1]?arguments[1]:0,o=e.scrollWidth>e.clientWidth+a;a=e.clientHeight+a<e.scrollHeight;if(o||a)return n=Ff(r=t.getComputedStyle(e),"overflow-x"),r=Ff(r,"overflow-y"),o&&n||a&&r?{elm:e,top:e.scrollTop,left:e.scrollLeft}:void 0})),kf=function(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:t,n=e.document.documentElement;return[void 0!==e.pageXOffset?{elm:e,top:e.pageYOffset,left:e.pageXOffset}:{elm:n,top:n.scrollTop,left:n.scrollLeft}].concat(function e(t){return Array.from(t.children||t.childNodes||[]).reduce((function(t,n){var r=Cf(n);return r&&t.push(r),t.concat(e(n))}),[])}(r.body))};function Rf(){return Bd(gs)}var Nf,Tf=function(e){if(e)return function(t){var n=t.data,r=void 0!==(r=t.isCrossOrigin)&&r,a=t.shadowId,o=t.root,i=t.priority,l=(t=void 0!==(t=t.isLink)&&t,e.createElement("style"));return t?(t=e.createTextNode('@import "'.concat(n.href,'"')),l.appendChild(t)):l.appendChild(e.createTextNode(n)),e.head.appendChild(l),{sheet:l.sheet,isCrossOrigin:r,shadowId:a,root:o,priority:i}};throw new Error("axe.utils.getStyleSheetFactory should be invoked with an argument")},Sf=function(e){var t;return Nf&&Nf.parentNode?(void 0===Nf.styleSheet?Nf.appendChild(r.createTextNode(e)):Nf.styleSheet.cssText+=e,Nf):e?(t=r.head||r.getElementsByTagName("head")[0],(Nf=r.createElement("style")).type="text/css",void 0===Nf.styleSheet?Nf.appendChild(r.createTextNode(e)):Nf.styleSheet.cssText=e,t.appendChild(Nf),Nf):void 0};function _f(e){return!!e&&"object"===a(e)&&"number"==typeof e.length&&e instanceof t.Node==0}function Of(e,t){return!(!e||"object"!==a(e))&&Object.prototype.hasOwnProperty.call(e,t)}function Mf(e){return Pf(e)||If(e)}function Pf(e){return["include","exclude"].some((function(t){return Of(e,t)&&If(e[t])}))}function If(e){return"string"==typeof e||e instanceof t.Node||Bf(e)||jf(e)||_f(e)}function Bf(e){return Of(e,"fromFrames")}function jf(e){return Of(e,"fromShadowDom")}var Lf=function e(n,r){var a,o=_l(n);return 9!==n.nodeType&&(11===n.nodeType&&(n=n.host),o&&null!==o._isHidden?o._isHidden:!(a=t.getComputedStyle(n,null))||!n.parentNode||"none"===a.getPropertyValue("display")||!r&&"hidden"===a.getPropertyValue("visibility")||"true"===n.getAttribute("aria-hidden")||(r=e(n.assignedSlot||n.parentNode,!0),o&&(o._isHidden=r),r))},qf=function(e){var t=null!=(t=null==(t=e.props)?void 0:t.nodeName)?t:e.nodeName.toLowerCase();return"http://www.w3.org/2000/svg"!==e.namespaceURI&&!!gs.htmlElms[t]};function zf(e,t){var n=void 0===(n=t.include)?[]:n;t=void 0===(t=t.exclude)?[]:t,n=n.filter((function(t){return Vp(t,e)}));return 0!==n.length&&(0===(t=t.filter((function(t){return Vp(t,e)}))).length||(n=Vf(n),Vp(Vf(t),n)))}function Vf(e){var t,n,r=K(e);try{for(r.s();!(n=r.n()).done;){var a=n.value;t&&Vp(a,t)||(t=a)}}catch(e){r.e(e)}finally{r.f()}return t}function Gf(e,t){return e.length===t.length&&e.every((function(e,n){var r=t[n];return Array.isArray(e)?e.length===r.length&&e.every((function(e,t){return r[t]===e})):e===r}))}var $f=function(e,t){return(e=e.actualNode||e)===(t=t.actualNode||t)?0:4&e.compareDocumentPosition(t)?-1:1};function Hf(e){return e instanceof ua?{vNode:e,domNode:e.actualNode}:{vNode:_l(e),domNode:e}}var Uf,Wf,Yf=function(e,t,n,r){var a,o=4<arguments.length&&void 0!==arguments[4]&&arguments[4],i=Array.from(e.cssRules);return i?(a=i.filter((function(e){return 3===e.type}))).length?(a=a.filter((function(e){return e.href})).map((function(e){return e.href})).filter((function(e){return!r.includes(e)})).map((function(e,a){a=[].concat(M(n),[a]);var o=/^https?:\\/\\/|^\\/\\//i.test(e);return Xf(e,t,a,r,o)})),(i=i.filter((function(e){return 3!==e.type}))).length&&a.push(Promise.resolve(t.convertDataToStylesheet({data:i.map((function(e){return e.cssText})).join(),isCrossOrigin:o,priority:n,root:t.rootNode,shadowId:t.shadowId}))),Promise.all(a)):Promise.resolve({isCrossOrigin:o,priority:n,root:t.rootNode,shadowId:t.shadowId,sheet:e}):Promise.resolve()},Kf=function(e,t,n,r){var a=4<arguments.length&&void 0!==arguments[4]&&arguments[4];return(e=>{try{return!(!e.cssRules&&e.href)}catch(e){return!1}})(e)?Yf(e,t,n,r,a):Xf(e.href,t,n,r,!0)},Xf=function(e,n,r,a,o){return a.push(e),new Promise((function(n,r){var a=new t.XMLHttpRequest;a.open("GET",e),a.timeout=oa.preload.timeout,a.addEventListener("error",r),a.addEventListener("timeout",r),a.addEventListener("loadend",(function(e){if(e.loaded&&a.responseText)return n(a.responseText);r(a.responseText)})),a.send()})).then((function(e){return e=n.convertDataToStylesheet({data:e,isCrossOrigin:o,priority:r,root:n.rootNode,shadowId:n.shadowId}),Kf(e.sheet,n,r,a,e.isCrossOrigin)}))},Zf=function(e){return"string"==typeof e&&(e=e.trim().match(/^([-+]?\\d+)/))?Number(e[1]):null};function Jf(){if(t.performance)return t.performance.now()}Uf=Jf(),Wf=!1;var Qf={start:function(){this.reset(),Wf=!0,this.mark("mark_axe_start")},end:function(){this.mark("mark_axe_end"),this.measure("axe","mark_axe_start","mark_axe_end",!0),this.logMeasures("axe"),this.clearMark("mark_axe_start","mark_axe_end"),Wf=!1},auditStart:function(){Wf||this.reset(),this.mark("mark_audit_start")},auditEnd:function(){this.mark("mark_audit_end"),this.measure("audit_start_to_end","mark_audit_start","mark_audit_end",!0),this.logMeasures(),this.clearMark("mark_audit_start","mark_audit_end")},mark:function(e){var n;null!=(n=t.performance)&&n.mark&&t.performance.mark(e)},measure:function(e,n,r){var a,o=3<arguments.length&&void 0!==arguments[3]&&arguments[3];if(null!=(a=t.performance)&&a.measure){try{t.performance.measure(e,n,r)}catch(e){this._log(e)}o||this.clearMark(n,r)}},logMeasures:function(e){function n(e){return Array.isArray(e)?e[e.length-1]:e}function r(e){o._log("Measure "+e.name+" took "+e.duration+"ms")}var a,o=this;if(null!=(a=t.performance)&&a.getEntriesByType&&null!=(a=t.performance)&&a.getEntriesByName){var i=n(t.performance.getEntriesByName("mark_axe_start"))||n(t.performance.getEntriesByName("mark_audit_start"));if(i)for(var l=t.performance.getEntriesByType("measure").filter((function(e){return e.startTime>=i.startTime})),u=0;u<l.length;++u){var s=l[u];if(s.name===e)return void r(s);e||r(s)}else this._log("Axe must be started before using performanceTimer")}},timeElapsed:function(){return Jf()-Uf},clearMark:function(){var e;if(null!=(e=t.performance)&&e.clearMarks){for(var n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];for(var o=0,i=r;o<i.length;o++){var l=i[o];t.performance.clearMarks(l)}}},reset:function(){Uf=Jf()},_log:function(e){ia(e)}};function em(){var e,t,n,a;return r.elementsFromPoint||r.msElementsFromPoint||((e=r.createElement("x")).style.cssText="pointer-events:auto",e="auto"===e.style.pointerEvents,t=e?"pointer-events":"visibility",n=e?"none":"hidden",(a=r.createElement("style")).innerHTML=e?"* { pointer-events: all }":"* { visibility: visible }",function(e,o){var i,l,u,s=[],c=[];for(r.head.appendChild(a);(i=r.elementFromPoint(e,o))&&-1===s.indexOf(i);)s.push(i),c.push({value:i.style.getPropertyValue(t),priority:i.style.getPropertyPriority(t)}),i.style.setProperty(t,n,"important");for(s.indexOf(r.documentElement)<s.length-1&&(s.splice(s.indexOf(r.documentElement),1),s.push(r.documentElement)),l=c.length;u=c[--l];)s[l].style.setProperty(t,u.value||"",u.priority);return r.head.removeChild(a),s})}"function"==typeof t.addEventListener&&(r.elementsFromPoint=em());var tm=function(e,t){return e.concat(t).filter((function(e,t,n){return n.indexOf(e)===t}))};function nm(e,t,n,r,a){return(a=a||{}).vNodes=e,a.vNodesIndex=0,a.anyLevel=t,a.thisLevel=n,a.parentShadowId=r,a}var rm=function(e,t,n){if(r=Xp(e=Array.isArray(e)?e:[e],t=Hd(t),n))return r;for(var r=e,a=(e=t,n),o=Sl.get("qsa.recycledLocalVariables",(function(){return[]})),i=[],l=nm(Array.isArray(r)?r:[r],e,null,r[0].shadowId,o.pop()),u=[];l.vNodesIndex<l.vNodes.length;){for(var s,c=l.vNodes[l.vNodesIndex++],d=null,p=null,f=((null==(s=l.anyLevel)?void 0:s.length)||0)+((null==(s=l.thisLevel)?void 0:s.length)||0),m=!1,h=0;h<f;h++){var g=h<((null==(g=l.anyLevel)?void 0:g.length)||0)?l.anyLevel[h]:l.thisLevel[h-((null==(g=l.anyLevel)?void 0:g.length)||0)];if((!g[0].id||c.shadowId===l.parentShadowId)&&Ud(c,g[0]))if(1===g.length)m||a&&!a(c)||(u.push(c),m=!0);else{var v=g.slice(1);if(!1===[" ",">"].includes(v[0].combinator))throw new Error("axe.utils.querySelectorAll does not support the combinator: "+g[1].combinator);(">"===v[0].combinator?d=d||[]:p=p||[]).push(v)}g[0].id&&c.shadowId!==l.parentShadowId||null==(v=l.anyLevel)||!v.includes(g)||(p=p||[]).push(g)}for(c.children&&c.children.length&&(i.push(l),l=nm(c.children,p,d,c.shadowId,o.pop()));l.vNodesIndex===l.vNodes.length&&i.length;)o.push(l),l=i.pop()}return u},am=function(e){var t,n,a,i;e=void 0===(e=e.treeRoot)?o._tree[0]:e;return t=[],e=rm(e,"*",(function(e){return!t.includes(e.shadowId)&&(t.push(e.shadowId),!0)})).map((function(e){return{shadowId:e.shadowId,rootNode:Ml(e.actualNode)}})),(e=tm(e,[])).length?(n=r.implementation.createHTMLDocument("Dynamic document for loading cssom"),n=Tf(n),a=n,i=[],e.forEach((function(e,t){var n=e.rootNode,r=((e,t,n)=>{t=11===e.nodeType&&t?((e,t)=>Array.from(e.children).filter(om).reduce((function(n,r){var a=r.nodeName.toUpperCase();r="STYLE"===a?r.textContent:r;return(r=t({data:r,isLink:"LINK"===a,root:e})).sheet&&n.push(r.sheet),n}),[]))(e,n):(e=>Array.from(e.styleSheets).filter((function(e){return!!e.media&&im(e.media.mediaText)})))(e);var r=[];return t.filter((function(e){if(e.href){if(r.includes(e.href))return!1;r.push(e.href)}return!0}))})(n,e=e.shadowId,a);if(!r)return Promise.all(i);var o=t+1,l={rootNode:n,shadowId:e,convertDataToStylesheet:a,rootIndex:o},u=[];t=Promise.all(r.map((function(e,t){return Kf(e,l,[o,t],u)})));i.push(t)})),Promise.all(i).then((function e(t){return t.reduce((function(t,n){return Array.isArray(n)?t.concat(e(n)):t.concat(n)}),[])}))):Promise.resolve()};function om(e){var t=e.nodeName.toUpperCase(),n=e.getAttribute("href"),r=e.getAttribute("rel");n="LINK"===t&&n&&r&&e.rel.toUpperCase().includes("STYLESHEET");return"STYLE"===t||n&&im(e.media)}function im(e){return!e||!e.toUpperCase().includes("PRINT")}var lm=function(e){return e=void 0===(e=e.treeRoot)?o._tree[0]:e,e=rm(e,"video[autoplay], audio[autoplay]",(function(e){return("none"!==(e=e.actualNode).preload||0!==e.readyState||e.networkState===e.NETWORK_LOADING)&&!(e.hasAttribute("paused")||e.hasAttribute("muted")||(e.hasAttribute("src")?!e.getAttribute("src"):Array.from(e.getElementsByTagName("source")).filter((function(e){return!!e.getAttribute("src")})).length<=0))})),Promise.all(e.map((function(e){var t;e=e.actualNode;return t=e,new Promise((function(e){0<t.readyState&&e(t),t.addEventListener("loadedmetadata",(function n(){t.removeEventListener("loadedmetadata",n),e(t)}))}))})))};function um(e){var t={cssom:am,media:lm};return sm(e)?new Promise((function(n,r){var a=cm(e),o=a.assets,i=setTimeout((function(){return r(new Error("Preload assets timed out."))}),a.timeout);Promise.all(o.map((function(n){return t[n](e).then((function(e){return F({},n,e)}))}))).then((function(e){e=e.reduce((function(e,t){return O({},e,t)}),{}),clearTimeout(i),n(e)})).catch((function(e){clearTimeout(i),r(e)}))})):Promise.resolve()}function sm(e){return!e||null==e.preload||("boolean"==typeof e.preload?e.preload:"object"===a(e=e.preload)&&Array.isArray(e.assets))}function cm(e){var t=(n=oa.preload).assets,n={assets:t,timeout:n.timeout};if(e.preload&&"boolean"!=typeof e.preload){if(!e.preload.assets.every((function(e){return t.includes(e.toLowerCase())})))throw new Error("Requested assets, not supported. Supported assets are: ".concat(t.join(", "),"."));n.assets=tm(e.preload.assets.map((function(e){return e.toLowerCase()})),[]),e.preload.timeout&&"number"==typeof e.preload.timeout&&!isNaN(e.preload.timeout)&&(n.timeout=e.preload.timeout)}return n}function dm(e){var t=o._audit.data.checks||{},n=o._audit.data.rules||{},r=jp(o._audit.rules,"id",e.id)||{},a=(e.tags=Bd(r.tags||[]),pm(t,!0,r)),i=pm(t,!1,r);e.nodes.forEach((function(e){e.any.forEach(a),e.all.forEach(a),e.none.forEach(i)})),Hp(e,Bd(n[e.id]||{}))}function pm(e,t,n){return function(r){var o,i=(o=e[r.id]||{}).messages||{};delete(o=Object.assign({},o)).messages,n.reviewOnFail||void 0!==r.result?o.message=r.result===t?i.pass:i.fail:("object"!==a(i.incomplete)||Array.isArray(r.data)||(o.message=((e,t)=>{function n(e){return e.incomplete&&e.incomplete.default?e.incomplete.default:uf()}if(!e||!e.missingData)return e&&e.messageKey?t.incomplete[e.messageKey]:n(t);try{var r=t.incomplete[e.missingData[0].reason];if(r)return r;throw new Error}catch(r){return"string"==typeof e.missingData?t.incomplete[e.missingData]:n(t)}})(r.data,i)),o.message||(o.message=i.incomplete)),"function"!=typeof o.message&&(o.message=mf(o.message,r.data)),Hp(r,o)}}var fm=function(e,t){return rm(e,t)};function mm(e,t){var n,r=o._audit&&o._audit.tagExclude?o._audit.tagExclude:[],a=t.hasOwnProperty("include")||t.hasOwnProperty("exclude")?(n=t.include||[],n=Array.isArray(n)?n:[n],a=t.exclude||[],(a=Array.isArray(a)?a:[a]).concat(r.filter((function(e){return-1===n.indexOf(e)})))):(n=Array.isArray(t)?t:[t],r.filter((function(e){return-1===n.indexOf(e)})));return!!(n.some((function(t){return-1!==e.tags.indexOf(t)}))||0===n.length&&!1!==e.enabled)&&a.every((function(t){return-1===e.tags.indexOf(t)}))}var hm=function(e,t,n){var r=n.runOnly||{};n=(n.rules||{})[e.id];return!(e.pageLevel&&!t.page)&&("rule"===r.type?-1!==r.values.indexOf(e.id):n&&"boolean"==typeof n.enabled?n.enabled:"tag"===r.type&&r.values?mm(e,r.values):mm(e,[]))};function gm(e,t){var n,r,a;return t?(a=e.cloneNode(!1),n=Na(a),a=1===a.nodeType?(r=a.outerHTML,Sl.get(r,(function(){return vm(a,n,e,t)}))):vm(a,n,e,t),Array.from(e.childNodes).forEach((function(e){a.appendChild(gm(e,t))})),a):e}function vm(e,t,n,a){return t&&(e=r.createElement(e.nodeName),Array.from(t).forEach((function(t){var r,o,i;r=n,o=t.name,void 0!==(i=a)[o]&&(!0===i[o]||Ta(r,i[o]))||e.setAttribute(t.name,t.value)}))),e}function bm(e,t){var n=[];if(o._selectCache)for(var r=0,a=o._selectCache.length;r<a;r++){var i=o._selectCache[r];if(i.selector===e)return i.result}for(var l,u=t.include.reduce((function(e,t){return e.length&&Vp(e[e.length-1],t)||e.push(t),e}),[]),s=(l=t).exclude&&0!==l.exclude.length?function(e){return zf(e,l)}:null,c=0;c<u.length;c++){var d=u[c];n=((e,t)=>{if(0===e.length)return t;var n;e.length<t.length&&(n=e,e=t,t=n);for(var r=0,a=t.length;r<a;r++)e.includes(t[r])||e.push(t[r]);return e})(n,rm(d,e,s))}return o._selectCache&&o._selectCache.push({selector:e,result:n}),n}function ym(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:0;if("object"!==a(e)||null===e)return{message:String(e)};var n,r={},o=K(oa.serializableErrorProps);try{for(o.s();!(n=o.n()).done;){var i=n.value;["string","number","boolean"].includes(a(e[i]))&&(r[i]=e[i])}}catch(e){o.e(e)}finally{o.f()}return e.cause&&(r.cause=t<10?ym(e.cause,t+1):"..."),r}function Dm(e){var t,n,r=e.error,a=e.ruleId,o=e.method;e=e.errorNode;return H(this,Dm),(n=R(this,Dm)).name=null!=(t=r.name)?t:"RuleError",n.message=r.message,n.stack=r.stack,r.cause&&(n.cause=ym(r.cause)),a&&(n.ruleId=a,n.message+=" Skipping ".concat(n.ruleId," rule.")),o&&(n.method=o),e&&(n.errorNode=e),n}S(Dm,function(e){var t="function"==typeof Map?new Map:void 0;return function(e){if(null===e||!(e=>{try{return-1!==Function.toString.call(e).indexOf("[native code]")}catch(t){return"function"==typeof e}})(e))return e;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,n)}function n(){return C(e,arguments,T(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),_(n,e)}(e)}(Error));var wm=W(Dm),xm=function(e){e.forEach((function(e){var n=e.elm,r=e.top;e=e.left;if(n===t)return n.scroll(e,r);n.scrollTop=r,n.scrollLeft=e}))};function Em(e){return function e(t,n){var r=t.shift();return n=r?n.querySelector(r):null,0===t.length?n:null!=n&&n.shadowRoot?e(t,n.shadowRoot):null}(Array.isArray(e)?M(e):[e],r)}function Am(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:r,n=Array.isArray(e)?M(e):[e];return 0===e.length?[]:function e(t,n){t=function(e){return $(e)||P(e)||X(e)||G()}(t);var r=t[0],a=t.slice(1);if(t=n.querySelectorAll(r),0===a.length)return Array.from(t);var o,i=[],l=K(t);try{for(l.s();!(o=l.n()).done;){var u=o.value;null!=u&&u.shadowRoot&&i.push.apply(i,M(e(a,u.shadowRoot)))}}catch(e){l.e(e)}finally{l.f()}return i}(n,t)}var Fm=function(){return["hidden","text","search","tel","url","email","password","date","month","week","time","datetime-local","number","range","color","checkbox","radio","file","submit","image","reset","button"]},Cm=[,[,[1,1,1,1,1,1,1,1,1,1,,1,1,1,1,1,1,1,,1,1,1,1,1,1,,1],[1,1,1,1,1,1,1,1,1,1,1,,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1],[,1,1,,1,1,1,,1,1,,1,1,1,1,,1,1,1,1,1,1,1,1,1,1,1],[,1,1,,1,1,1,1,1,1,1,,1,,1,1,1,1,1,1,1,1,,1,1,1,1],[1,1,1,1,1,1,,,,,,1,1,1,1,,,1,1,1,,1,,1,,1,1],[1,1,1,,1,1,,1,1,1,,1,,,1,1,1,,,1,1,1,,,,,1],[,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1],[,1,1,,,,,1,1,1,,1,1,1,1,1,1,,1,1,1],[,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,,,1,1,1],[,1,,,,,,1,,1,,,,,1,,1,,,,1,1,,1,,,1],[1,,1,1,1,1,1,1,1,1,1,1,1,1,,1,1,1,1,1,1,1,1,1,1,1,1],[,1,,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1],[1,1,1,1,,1,1,1,,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1],[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1],[,1,1,1,1,1,1,1,1,1,1,1,1,1,1,,,,1,1,1,1,,,1,,1],[,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1],[,1,,1,1,,,1,,,,,1,1,1,,1,,1,,1,,,,,,1],[1,,1,1,1,1,,,1,1,1,1,1,,1,1,1,1,1,1,1,1,1,1,1,1,1],[1,1,1,1,1,1,1,1,1,1,1,1,1,,1,1,1,1,1,1,1,1,1,1,1,1,1],[,1,1,1,1,1,,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1],[,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,,1,1,1,1],[1,,1,,1,,,,,1,,1,1,1,1,1,,,,1,1,1,1],[,1,1,1,1,1,,1,1,1,,1,,1,1,1,,,1,1,1,1,1,1,1,1],[,,1,,,1,,1,,,,1,1,1,,,,,,,,,,,1],[1,1,1,1,1,1,,1,1,1,,1,1,,1,1,1,1,1,1,1,1,,,1,1,1],[1,1,1,1,1,,,1,,,1,,,1,1,1,,,,,1,,,,,,1]],[,[1,1,1,1,1,1,1,1,1,1,1,,1,,1,1,1,,1,1,1,1,1,1,1,1,1],[,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1],[,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,,1,1],[,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1],[1,1,1,1,1,1,1,1,1,1,1,1,,1,,1,1,1,1,1,1,1,1,1,1,1,1],[,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,,1,1,1,1],[1,1,1,1,1,1,1,1,,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1],[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1],[1,1,1,1,1,1,1,1,,,1,1,1,1,1,1,1,1,1,,1,1,1,1,1,1,1],[,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1],[,1,1,1,1,,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1],[,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,,1,1,1,1,1],[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1],[1,1,1,1,1,1,1,1,,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1],[1,1,1,,,1,1,1,1,1,1,1,1,1,1,1,1,1,1,,1,1,1,1,1,1,1],[,1,1,,1,,,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1],[,1,1,1,1,,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1],[1,1,1,1,1,,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1],[1,1,1,1,,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1],[,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1],[,1,1,1,1,1,1,1,1,1,1,1,,1,1,1,1,1,,1,1,1,1,1,1,1,1],[,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,,1,1,1,1,1,1,1],[,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,,1,1,1,1],[,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,,1,1,1,1,,1],[,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,,1,1,1,1,1],[,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1]],[,[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,,1,1,1,1,1,1],[,1,1,1,1,1,,1,1,1,1,1,1,,1,1,,1,1,1,1,1,1,1,,1],[,1,,1,1,1,,1,1,,1,,1,1,1,1,1,1,1,1],[,1,,1,1,1,1,1,1,1,1,,,1,1,1,,,1,1,,,,,,1,1],[1,1,1,,,,,1,,,,1,1,,1,,,,,,1,,,,,1],[,1,,,1,,,1,,,,,,1],[,1,,1,,,,1,,,,1],[1,,1,1,1,,1,1,1,,1,1,1,1,1,1,1,1,1,,1,,,1,1,1,1],[,1,1,1,1,1,,,1,,,1,,1,1,,1,,1,,,,,1,,1],[,1,,,,1,,,1,1,,1,,1,1,1,1,,1,1,,,1,,,1],[,1,1,,,,,,1,,,,1,1,1,1,,1,1,1,1,1,1,,1,1,1],[,1,,1,1,1,,,1,1,1,1,1,1,,1,,,,,1,1,,1,,1],[,1,,1,,1,,1,,1,,1,1,1,1,1,,,1,1,1],[,1,1,1,,,,1,1,1,,1,1,,,1,1,,1,1,1,1,,1,1],[1,1,1,1,1,1,1,1,1,,1,1,1,1,1,1,1,1,,,1,1,1,1,1,1,1],[,1,1,1,,1,1,1,,1,,,,,1,1,1,,,1,,1,,,1,1],[,,,,1,,,,,,,,,,,,,,,,,1],[1,1,1,1,1,,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,,1,1,1,1,1],[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,,1,1],[,1,,1,1,1,,1,1,,,,1,1,1,1,1,,,1,1,1,,,,,1],[1,1,1,1,,,,1,1,1,1,1,1,1,,1,1,1,1,1,1,1,1,1,1,1],[1,,,,,,,1,,,,,,,1],[,1,1,,1,1,,1,,,,,,,,,,,,,1],,[1,1,1,,,,,,,,,,,,,1],[,,,,,,,,1,,,1,,,1,1,,,,,1]],[,[1,1,,1,1,1,1,1,1,1,1,1,1,1,,1,1,1,1,1,,1,1,1,1,1,1],[,1,1,,1,1,1,1,,1,1,,1,1,1,1,1,1,1,,1,1,1,1,,1],[,,,1,,,,,,,,,,,,,,,1],[,1,,,1,1,,1,,1,1,,,,1,1,,,1,1,,,,1],[1,,,1,1,1,1,1,1,1,,1,1,1,1,,1,1,1,1,,,1,,,,1],,[,1,1,1,1,1,,1,1,1,,1,1,,1,1,,,1,1,1,1,,1,1,,1],[,1,,,1,,,1,,1,,,1,1,1,1,,,1,1,,1,1,1,1],[,1,1,1,1,,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,,1,1,1,1],[,1,1,1,1,1,1,,,1,1,1,1,1,1,1,,,1,,,1,,1],[,1,,,,,,,,,,1,1,,,,,,1,1,,,,,1],[,,,,,,,1,,,,1,,1,1],[,1,1,1,1,1,1,1,,,,1,1,1,1,1,,,1,1,,1,1,1,1,1],[,1,,,1,1,,1,,1,1,1,,,1,1,,,1,,1,1,1,1,,1],[,1,1,1,,1,1,,1,1,,1,1,,1,1,1,1,1,1,1,,1,1,1,1,1],[,,,,,,,,,,,,,,,,1],,[,1,1,1,1,1,,1,1,1,,,1,,1,1,,1,1,1,1,1,,1,,1],[,,1,,,1,,,1,1,,,1,,1,1,,1],[,1,1,,1,,,,1,1,,1,,1,1,1,1,,1,1,1,1,,,,1],[,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,,1,1,1,1,1,1],[1,1],[,1,,,,,,,,,,1,1,,,,,,1,1,,1,,1,,1,1],,[,1,1,,1,,,1,,1,,,,1,1,1,,,,,,1,,,,1],[1,1,,,1,1,,1,,,,,1,,1]],[,[,1],[,,,1,,,,1,,,,1,,,,1,,,1,,,1],[,,,,,,,,,,,,,,,,,,1,1,,,,,,1],,[1,,,,,1],[,1,,,,1,,,,1],[,1,,,,,,,,,,,1,,,1,,,,,,,,,1,1],[,,,,,,,,,,,,,,,,,,,,,1],[,,,,,,,,,,,,,,,,1,,,,1,,1],[,1],[,1,,1,,1,,1,,1,,1,1,1,,1,1,,1,,,,,,,1],[1,,,,,1,,,1,1,,1,,1,,1,1,,,,,1,,,1],[,1,1,,,1,,1,,1,,1,,1,1,1,1,,,1,,1,,1,1,1],[1,1,1,1,1,,1,,1,,,,1,1,1,1,,1,1,,,1,1,1,1],[1,,,,,,,,,,,,,,,,,,,,1],[,,,,,,,,,1],,[,1,,,,,,1,1,1,,1,,,,1,,,1,1,1,,,1],[1,,,,,1,,1,1,1,,1,1,1,1,1,,1,,1,,1,,,1,1],[1,,1,1,,,,,1,,,,,,1,1,,,1,1,1,1,,,1,,1],[1,,,,,,,,,,,,,,,,,1],[,,,,,1,,,1,,,,,,1],[,,,,,,,,,,,,,,,1],[,,,,,,,,,,,,,,,,,,,,1],[,1,,,,,,,,,,,,,,1],[,1,,,,1]],[,[1,1,1,,1,,1,1,1,1,1,1,1,1,1,,1,,1,,1,1,,,1,1,1],[,,,,,,,,,,,,1],[,,,,,,,,,,,,,,,,,,,1],,[,,,,,,,,,,,,,,,,,,1],[1,,,,,,,,,1,,,,1],[,,,,,,,,,,,,,,,,,,1],,[1,1,,,,1,1,,,,,,1,,,,1,,1,,1,1,,1],[1],[,,,,,,,,,,,1,,,,,,,,,,,1],[,1,,,,,,,1,1,,,1,,1,,,,1,,,,,,,1],[,,,,,,,,,,,,,,,,1,,,,,1],[,,1,,,,,1,,1],[1,,,,1,,,,,1,,,,1,1,,,,1,1,,,,,1],[,,,,,1],[,,,,,,,,,,,,,,,,,,,1],[1,,,1,1,,,,,,,1,,1,,1,1,1,1,1,1],[,,,,,1,,,,,,,1,,,,,,,1],,[,,1,1,1,1,1,,1,1,1,,,1,1,,,1,1,,1,1,1,,,1],[,,,,,,,,,,,,,,,,,,1],[,1,,,,1],,[1]],[,[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1],[,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,,1,1,1,1,1,1],[,,,1,1,1,1,,,,,,1,,1,,,,1,,1],[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,,1,1,1,1,1,,,1],[,1,1,1,1,,1,1,1,1,1,1,1,1,,,,1,,1,,,1,1,1,1,1],[,,,,,,,,,,,1,,,,,,,,,1,,,,1],[,1,1,,1,1,,1,,,,1,1,,1,1,,,1,,1,1,,1],[,1,,1,,1,,,1,,,1,1,,1,1,,,1,1,1],[,1,1,1,1,1,,1,1,,,,1,1,1,1,1,1,1,1,1,1,,1,1,1,1],[,,,,,,,,,1,,1,,1,1,,,,1,,,1],[,1,,,1,1,,,,,,,,,1,1,1,,,,,1],[1,,,1,1,,,,1,1,1,1,1,,,1,,,1,,,1,,1,,1],[,1,1,,1,1,,1,1,,,,1,1,1,,,1,1,,,1,1,1,1,1,1],[1,1,1,1,1,1,,1,1,1,1,1,1,1,1,1,,1,1,,1,1,,1,,,1],[,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,,1,1,1,1],[,1,,,,1,,,,,,,,,1],[,1,,,,,,,,1,,,,,1,,,,1,,,1],[,1,1,1,1,,,1,1,1,1,1,,1,,1,,1,1,1,1,1,1,1,1,1,1],[,,,,,1,,1,,,,,1,1,1,1,1,,,1,,,,1],[,1,,,,,,,,1,,,,,,,,,,,,1],[1,1,1,1,1,1,1,1,1,1,,1,1,1,1,1,1,1,1,1,1,1,1,1,1,,1],[1,1,,1,,1,1,,,,1,,1,1,1,1,1,,1,1,,,,,,1],[,1,1,1,1,1,1,1,,1,1,,,1,1,,,,1,,1,1,,1,1],[,,,,,,,,,,,,,,,,,,,,,,,,1],[,1,1,,1,1,1,1,,1,,,1,1,1,1,,,1,,,,,,,1],[,1,,,,,,,,1,,,,,1]],[,[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,,,1,1,1,1,1],[,1,1,,,,,,,,,,,,1,1,,,,,,1],[,1,,,,,,,1],[,,,,,,,,,,,,,,1,,,,,1,,,,,,1],[1,1,,,1,,,1,1,1,,,,1],,[,,,,,,,,,,,,,1,,,,,,,,,,1],[,,,,,,,,,1,,,,,,,,,1,,,,,,,1],[1,1,1,,1,,1,1,1,1,1,1,1,1,,1,,,1,,1,,,1,1],[,,,,,,,,,1],[,1,,,,1,,,,,,1,,,1,,,,,1],[,1,1,,1,1,,,,,,,,,,,,,,,1,1],[,1,1,1,1,1,1,1,1,1,1,1,1,1,1,,1,1,1,1,1,1,1,1,1,1,1],[,1,,,1,1,,1,1,1,1,,,,1,1,,,,1,,1],[1,1,1,1,1,1,,,1,1,1,1,1,1,,1,1,,1,1,1,,1,1,,1,1],[,,,,,,,,,,,,,,,1,,,,1],,[1,1,,1,,1,,,,,,1,,1,,1,1,,1,,1,1,,1,1,,1],[,,1,,,,,,1,,,,1,,1,,,,,1],[1,,,,,,,,,1,,,,,,1,,,,1,,1,,,1],[1,,1,1,1,1,1,1,1,1,1,1,1,1,,1,1,1,1,1,1,1,1,1,1,1,1],[,,,1,,1,,,,,,1,,,1,,,,,,,,1],[,1,,1,,,,,,,,,,,,1],,[1,1,,,,,,,,,,,,,,,,,,,,,,1,1],[1]],[,[1,,,,,,,,,1,,,,,1,,1,,1],[,1,1,,1,1,,1,1,1,,,1,1,1,,,,1,,,1,,,,1],[,1,,,,,,,1,,,,1,,,,,,1],[1,1,1,1,1,1,,,,1,,,,,,,,,1,1,1,1],[1],[,1,1,,,1,1,,,,,1,,1,,,,,,,,1,,,,1],[1,,1,,,1,,1,,,,,1,1,1,1,,,,1,,,,1],[,,1,,,,,,,1,,,,,,,1,,,,,,,1],[1,,,,,,,,,,,,,,1,,,,1],[,,,1,,1,,,,,1,,,,1,1,,,,1],[1,,,,,1,,,,1,,1,1,,,1,1,,1,1,1,,1,1,1,,1],[,1,1,,,,,1,,1,,1,1,1,,1,1,,,1,,1,1,1],[,1,,,,1,,,,1,,,1,,1,1,,,1,1,,,,,,1],[1,,1,1,,1,,1,1,,1,,1,1,1,1,1,,,1,1,,,,,,1],[1,,,,,,,,,,,,,,,,,,1,,,1,,1],[,,,,,,,,,1,,,,,,1],[,,,,,,,,,,,,,,,,,,,,,1,,1],[,1,,,,1,,,1,1,,1,,,1,1,,,1,,,1,,,1,1],[1,1,,1,1,1,,1,1,1,,1,,1,1,1,,,1,,1,1],[1,,1,1,1,1,,,,1,,1,1,1,,1,,,1,1,1,,1,1,1,1,1],[1,,,,,,,,,,,,,1],[,,1,,,,,,,,,,,,,,,,,,,,1],[1,,,,,,,,,,,1,,1,,1,,,,1],[,,,1,,,,,,,,,1],[,1,,,,,,,,,,,,,,1,,,,,,,,,1],[,,,,,,,,1,1,,,,,,,,,1,,,,,,,,1]],[,[1,1,1,1,1,1,1,,1,,1,1,1,1,1,1,,1,1,1,1,1,,,1,1,1],[,,,,,1,,,,1,1,1,,,1,1,,,1,,1,1,,1],[,,,,,,,,,,,,,,,,,,,1,1],[,1,,,,,,1,,,,,,,,,,,,,1],[,,1,,,1,,1,1,1,,1,1,,1,,,,1,,1,1],,[,,1,,,1,,,,,,1,,,,1],[,,,,,,,,,1,,,,,,,,,,1],[1,1,1,1,1,1,,1,1,1,,,1,1,,1,,1,,,1,1,1,,,1],[,,,,,1,,,,,,,,,,,,,1],[,1,,,,,,,,,,,,1,,1,1,,1,,,1],[,,,,,1,,,,,,,,,,,,,,1],[,1,1,1,1,,,,,1,,,1,,1,,,,1,1,,,,1,1],[,1,,,1,,,1,,1,1,,1,,,,,,,1],[,,1,,1,,,1,,,,,,,,,,,1,1,,,,1],[,1,,,,,,,,,,,,,,,,,1,,,,,,1],[,,,,,,,,,,,,,,,,,,1],[,1,1,,,,,,,,,,,,,,,,1,,1,1],[,,,,,,,,,,,,1],,[,1,1,1,1,,,,1,1,,1,1,1,1,1,1,,1,1,1,1,,1,,1],[1,,,,1,,,,,,,,,,1],[1,,,,,,,,,1],,[,1,,,,1,,,,,,,,,,,,,,,,,,,,1]],[,[1,1,1,1,1,1,1,1,1,1,1,1,,1,,1,1,1,1,,,,1,1,1,1],[,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1],[,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1],[,1,,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,,1,1,1,1,1,1,1],[,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1],[,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1],[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1],[,1,1,1,1,1,1,1,1,1,1,1,1,,1,1,1,1,1,1,1,1,1,1,1,1,1],[1,1,1,1,1,1,1,1,1,1,1,,1,1,,1,1,1,,1,1,1,1,1,1,1,1],[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,,1,1,1],[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1],[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1],[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1],[1,1,1,1,1,1,1,1,,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1],[1,1,,1,1,1,1,1,1,1,1,1,1,,,1,1,1,,1,1,1,1,1,1,1,1],[,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1],[,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1],[1,1,1,1,1,1,1,,1,1,1,1,1,1,1,1,1,,1,1,1,1,1,1,1,1,1],[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1],[,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1],[1,,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,,1,1,1,1,1,1,1,1],[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1],[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1],[,1,1,1,1,1,1,,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1],[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1],[,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1]],[,[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,,1,1,1,1,,1,,1,1,1,1],[1,1,1,1,,1,1,1,,1,1,1,1,1,1,1,,1,1,1,1,1,1,1,1,1,1],[,,,1,1,1,1,,1,,,,1,1,,,1,1,,1],[,1,1,,1,,,1,1,1,1,1,1,1,1,1,1,1],[,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1],[,1,,,,,,,,,,,,,1],[1,1,1,,,,,1,1,1,,1,1,1,1,,,1,1,,1,1,,,,,1],[,1,,,,,,,1,1,,,1,1,1,,1,,,1,1,1],[1,1,1,1,1,1,1,1,1,1,1,1,1,,,1,1,1,1,1,,1,1,1,1,1,1],[,1,,,,1,,,,1,,,1,,,,1,,,,,,,1,1],[,1,1,1,1,1,,,1,1,1,,1,1,1,1,,,1,1,1,1,,,,1],[,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,,1,,1,,,1],[,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,,,1,1,1,1,1,1],[1,1,1,,1,,,1,1,1,1,,1,1,1,1,,,,1,,1,,1,,,1],[1,1,1,1,,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1],[,1,,,,1,,,,,,,,,1,1,,,,,,,,,1],,[,1,,1,,1,,1,,1,,1,1,1,1,1,,,1,,1,,1,,,,1],[,1,,,1,1,,1,1,1,,,1,1,1,1,1,,1,1,1,,1,,,1],[1,,,1,,,,1,1,1,,,,,1,1,,,,1,,1],[1,1,,1,1,1,1,,,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,,1,1],[1,1,,,,,,,,1,,1,,,,,,,,1,,1],[,1,,,,1,,1,1,,,,1,1,,1,,,,1,1,1,,1],,[,1,,,,,,1,,,,,,,1],[,,,,,,,,1,,,,1,,1,,,,,,,,,,,,1]],[,[,1,1,,1,1,1,1,,1,1,1,,1,1,,1,1,,1,1,1,1,1,1,,1],[,1,1,1,1,1,1,,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1],[,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1],[,1,1,1,1,1,1,1,1,1,1,1,1,1,1,,1,1,1,1,1,1,1,1,1,1,1],[,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,,1,1],[,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1],[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1],[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,,1,1,1,1],[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,,1,1,1,1],[,1,1,1,1,1,,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1],[1,1,1,1,,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1],[1,1,1,1,1,1,1,,1,1,1,1,1,1,1,1,1,1,1,1,,1,1,1,1,,1],[,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,,1,1,1,1,1,1,1],[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1],[1,1,,1,1,1,1,1,1,1,1,1,,1,,1,1,1,1,1,1,1,1,1,1,1,1],[,1,1,1,1,1,,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1],[,1,1,1,,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1],[1,1,1,1,1,1,1,1,1,,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1],[1,,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1],[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1],[,1,1,1,1,1,,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,,1,1,1],[,1,1,,1,1,1,1,1,1,,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1],[,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1],[,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1],[1,,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1],[,1,1,1,1,1,,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1]],[,[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,,,1,1,1,1],[1,1,1,1,1,1,1,1,1,1,1,1,,1,1,1,1,1,1,1,1,1,1,1,1,1],[,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,,,1,,1],[1,1,1,1,1,,1,1,1,1,1,1,1,1,1,,1,1,1,1,1,1,1,1,1,1,1],[1,1,1,1,1,1,1,1,1,1,1,1,,1,1,1,,1,1,1,1,1,1,1,1,1,1],[,1,,,1,,,,,,,,1,,,,,,1,,,1],[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1],[,1,1,1,1,1,1,1,1,1,,1,,1,1,1,1,1,1,,1,1,1,1,1,1,1],[,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,,1,1,1,1,1,1,1,1,1,1],[,1,1,,1,,,,1,1,1,,1,1,1,1,,,1,1,1,1,,,1,1,1],[,1,1,1,1,1,1,1,1,1,1,1,,1,1,1,1,1,1,1,1,1,1,1,1,,1],[1,1,,1,,1,,1,,1,1,1,1,1,1,1,,1,1,,,1,1,1,1,1,1],[,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1],[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,,1,1,1,1,1,1,1,1,1,1,1],[1,1,,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,,1,1,1,1,1,,1,1],[,1,1,,,,,1,1,1,,,1,,1,1,,,,1,,1,,,1,1],[,,,,,,,1,,,,1,1,1,1,1,,1,,,,,,,,1],[1,1,1,1,,1,1,1,,1,,1,1,1,1,,1,,1,,1,1,,,1,,1],[,1,1,1,1,1,1,1,1,1,,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1],[,,,,1,1,,1,,1,1,1,,1,,1,1,,1,1,,1,,1,1,1,1],[,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1],[1,,,,,,,,1,,,,,1,,1],[,1,1,1,,1,,1,,1,,,,1,,1,,,1,,,,,,1,1],[,1,,,1,1,,1,,1,,1,1,1,1,1,,1,1,,,1,,,1],[1,,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1],[,1,1,,1,,,,,1,,1,,1,,,,,,1,,1,,,,1,1]],[,[,1,,1,,,,,,,,,,,,,,,1,,,,1],[,,,,,,,,,1,,1,1,1,,1,,,1,,1,1],[1,1,,,,,,,1,,,,,,,1,,,,,,1],[,1,,,,,,,,,,1,,,,,,,,,1,1],,[,,,,,,,,,,,,,,,1,,,,1,,1],[,,1,1,,1,,1,,,,,,,,1,,,,,,1],[,,,,,,,,,,,,,,,,,,,,1,1],[,1,,,,,,,,,,,,,1],[1,,1,1,,,,1,,,,,,,,,1,,,1,,,1,1],[,1,1,,1,1,,1,1,1,1,1,1,1,1,1,,,1,1,,1,1,,1],[,1,,,1,1,,,,,,1,,1,,1,,,1,,1,1],[1,1,1,1,,1,,1,,1,,1,1,,1,1,1,1,1,,1,1,1,1,1],[,1,1,,,1,,1,,1,1,1,,,1,1,1,,1,1,1,1,,1,1],[,,,,1,,,1,,,,,,,1,,,,1,1],[,1,,,,,,,,,,1,,1,,1,,,,,1,,,,,1],,[1,1,,1,,1,,1,1,,,,,,1,1,,,1,1,1,1,1,1,1,1,1],[1,1,,1,,,,,,1,,,,,,1,1,,,,1,1,,,1],[,1,1,,1,1,,,,1,,1,1,1,1,1,,1,1,1,1,1,,1,1,1,1],[,1,1,,,1,,,,1,,,,1,1],[,,,,1],[,,,,,,,,,1,,,1],,[,,1,,1,,,,,,,,,1,,,,,,,,,,,,1],[,,,,,,,,,,,,,1]],[,[1,1,1,1,1,1,1,1,1,1,,1,1,1,,1,1,1,1,1,1,1,1,1,1,1,1],[,,1,1,,1,1,1,1,1,,,1,1,1,1,1,,1,1,1,1,1,,,1,1],[,1,1,1,1,1,1,1,1,1,1,1,1,1,1,,1,,1,,,,,1],[,1,,1,,,,,,1,,,,,1,1,,,,,1,1],[,1,1,,1,1,1,1,1,1,1,1,1,1,,1,1,1,,1,,,1,,1,1,1],[,1,,,,1,,,,,,,1],[,1,,,1,,,1,,1,,1,1,,1,,,,,1,,1,,,,1,1],[,1,,,1,,,1,1,1,,1,1,1,1,1,,1,1,,1,1,1,1],[1,1,1,1,1,1,1,1,1,1,1,,1,1,1,1,1,,1,1,1,1,1,1,1,1,1],[,,,,,,,,,,,,,,,,,,,,1],[,1,1,1,,,,1,1,,,,,,1,1,1,,1,1,1,1],[1,1,1,1,1,1,1,1,1,,1,1,1,,1,1,1,1,1,1,1,1,1,1,,1,1],[,1,1,1,1,1,1,,1,1,1,1,1,1,1,1,,1,1,1,1,1,,1,1,1,1],[,1,1,1,1,1,,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1],[,,,1,1,1,1,1,1,1,,1,,1,1,1,1,1,,1,1,,1,1,1,1,1],[,1,,,,1,,,,1,,1,1,1,1,1,1,1,1,1,1,1],[,1,,,,1,,,,,,,,1,,,,,,,,,,1],[,1,1,1,1,1,1,1,1,1,,1,1,1,1,1,1,1,1,1,1,1,,1,1,1,1],[1,1,,1,1,1,,1,1,1,,,1,1,1,1,1,1,1,1,1,1,,1,,1],[1,1,,,,,,,1,1,,,,,1,1,1,1,1,,1,1,1,1,,1],[,1,1,1,1,1,1,1,,1,1,1,,1,,1,1,1,1,,1,1,,1,1,1,1],,[,1,1,,,,,1,,1,,,,1,1,1,,,1,,,,,1],[,,,,,,,,,,,,,1],[,,,,,1,,,,,,,,1,1,,,,,1,,1,,,1,1],[,,,,,,,,,,,,,,1]],[,[,1],,,,,,,,,,,,,,,,,,,,[1,1,1,1,1,,1,1,1,1,,1,1,1,1,,1,1,1,1,,,1,1,1,1,1],[,1,,1,,1,,,1,1,1,,1,1,1,1,1,,,1,,,,1,,1,1],[,1,,1,,1,,,1,,,,,1,,,,,,1,1],[,1,,1,,,,,1,,,,1,,1,1,1,1,1,1,1,1,,1],[,1,,,,,,,,,,,,,,,1]],[,[,1,1,1,1,,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1],[,,1,,,,,,,,,1,1,,,,1],[,,,,,,1],[,,1],[,1,1,,,1,,1,,1,1,,1,1,1,,,,1,1,1,,,,,1],,[,1,,,,1,,,,,,1,,,1,,,,1,1,,1],[,,,,,,,1,,,,,,,,,1],[,1,,,,1,1,,,,,,1,1,1,,,,1,,1,1],[,,,,,,,1,,1,,,,,,,,,,1],[,1,1,,,,,,1,1,,,,1,,,,,,,1,,,1],,[1,1,1,1,1,1,1,1,1,1,,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1],[1,1,,,1,,,1,,,,,1,,1,,1,,1,,,,,1],[1,1,1,1,1,1,1,1,,,,,1,1,,1,1,,1,,,1,,1],[,,,,,,,,,,,,,,1,,,,,,1],,[,,,,,,,,,1,,,,,,1,,,,,1],[,,1,,,,,,,1,,,1,1],[,,,1,,,,,1,,,,,1,,,,,,1,,,,1],[1,,1,1,,1,1,1,1,1,,1,,,,1,1,1,,,1,1,,,,1,1],,[1,1,,,,,,,,,,1,,1,,1,,,1],[,,,,1,,,,,,,,,,,,,,,,,,,1],[,,,,,,,,,,,,,,1,,,,,1,,1],[,,,,,,,,1]],[,[1,1,1,1,1,1,1,,1,1,1,1,1,1,,1,1,1,1,1,1,1,1,1,1,1,1],[,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1],[1,1,1,,,1,1,1,1,1,,1,1,,1,1,1,1,,1,1,1,1,1,1],[1,1,1,1,,1,1,1,1,,1,1,1,1,1,1,1,1,1,1,1,1,1,,1,,1],[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,,1,1],[,,1,,,1,,,,,,,,1,,,,,,1,,,,1],[1,1,1,1,1,1,,1,1,1,1,1,1,1,1,1,1,,1,1,1,1,,1,1,1,1],[1,1,1,1,1,1,,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1],[1,1,1,,1,1,1,1,1,1,1,1,1,1,,1,1,1,1,1,1,1,1,1,1,1,1],[,1,1,,1,1,,1,,,,1,1,1,1,1,1,,1,1,1,1,,1],[1,1,1,1,1,1,1,1,1,1,1,1,,1,1,1,1,1,1,1,1,1,1,1,1,1,1],[1,1,,1,1,1,1,1,1,1,1,,1,1,1,,1,1,1,1,1,1,,1,1,1,1],[1,1,1,1,1,,1,1,1,1,1,1,1,1,1,,1,1,1,1,1,1,1,1,1,1,1],[1,,1,1,,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,,1,1,1,1,1,1],[1,1,1,1,1,1,,1,1,1,1,1,1,,1,1,1,1,1,1,,1,1,1,1,1,1],[,,1,1,1,1,,1,,1,,1,1,1,1,1,1,1,1,1,1,1,1,,1,1],[1,1,,,,,,,1,,1,1,,1,1,1,,1,1,1,1,1],[1,1,1,1,,1,1,1,1,1,,1,1,1,1,1,,1,1,1,1,1,1,1,1,1,1],[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,,1,1,1],[1,1,1,,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,,1],[1,1,1,1,,1,,1,,1,1,1,1,1,,,,1,1,1,1,,1,1,1,1,1],[1,1,1,1,,1,,,,,,1,,1,,,,,1,1,,,,,1],[1,,1,1,,,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1],[,,1,1,,1,,1,,,,1,1,1,1,1,,,1,1,,1,,1],[,1,1,1,1,,,,,1,,1,1,1,1,1,,,1,1,,,,1,1,1],[,1,1,1,1,1,,1,,,,,1,,1,,1,,,1,,,1,1,,1]],[,[1,1,1,1,1,1,1,1,,1,1,1,1,,1,1,1,1,1,1,,1,1,1,1,1,1],[,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1],[,1,1,1,1,1,1,1,1,1,,1,1,1,1,1,1,1,,1,1,1,,1,1,1,1],[,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,,1,1,1,1,1,1,,1,1],[1,1,1,1,1,1,1,1,1,1,,1,,1,1,1,1,1,1,1,1,1,1,1,1,1,1],[,,,,,,,,,1,,,,,1,1,,,1,,1],[1,1,1,1,1,1,1,1,1,1,1,,,,1,1,1,1,1,1,1,1,1,1,1,1,1],[1,,,1,1,1,1,,1,1,,1,1,1,1,,1,1,1,1,1,1,1,1,1,1,1],[1,1,,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,,1,1,1,1,1,1,1,1],[,1,,,,,,1,,1,1,,1,1,1,1,1,,,1,,1,,1],[1,1,1,,1,1,1,1,,,,1,1,1,1,,1,1,1,1,1,1,1,1,1,,1],[1,1,1,1,1,,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1],[,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,,1,1],[1,1,1,1,1,1,1,1,1,1,,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1],[1,,1,1,1,1,1,1,1,1,1,,1,1,,1,1,1,1,1,,1,1,1,1,1,1],[,1,,1,,1,1,1,,1,1,1,1,1,1,1,1,1,1,,1,1,1,1,1,1,1],[,,1,,,,,,,,,,1,1,1,1,1,1,1,,1,1,,1],[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1],[1,1,1,1,1,1,1,1,1,1,1,1,1,1,,,1,1,1,1,1,1,1,1,1,1,1],[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,,1,1],[,1,1,1,1,1,1,1,1,1,1,,1,1,1,1,1,1,,1,1,1,1,1,1,1,1],[,1,,,1,1,,,,,,1,1,1,1,1,,,,1,1,1,,1,1,1],[1,1,1,1,1,1,1,1,1,,,,1,1,1,1,1,1,1,,1,1,,1,1,1],[,1,1,1,,1,,1,1,1,1,,,1,1,1,,1,1,1,1,1,,,1,1],[1,1,,,,1,,,1,1,1,,1,,1,,1,,1,1,1,1,1,,1,,1],[,1,,,,,,,1,,1,,1,1,1,1,,,,,,,,,1]],[,[,,,,,,,,,,,,,1,1,,,,1],[,1,,,,,,,,1,,,1,,,,,,1,,,1,,,,1],,[,1,,,,1,,1,,1,1,,1,1,,,,,,,,1],[,,,,,,,,,,,,,,,,,,,1],[,,,,,,,,,1],[1,1,1,,,1,,,,,,,,,1,1,,,,,,,,,,1],[,1,,,,,,,,,,,,,1],[,,,,,,,,,,,,,,,,,,,1,,,1],[,,,,,,,,,1],[1,1,,,,,,1,1,1,,1,1,,,,1,1,,1,,1,1,1,,1],[,1,1,1,,1,1,,,1,,1,1,1,1,,,,,,,1,,1],[,1,1,1,1,,,1,,1,,,,1,1,1,1,,1,1,,1],[,1,,,1,1,,1,,,,1,,1,1,,1,,1,,,1,,,1,,1],[,,,,,,,,,,,1],[,,,,,,,,,1,,,,,,,,,,,,,1],,[1,1,1,1,,1,1,1,1,1,1,1,1,1,1,1,1,,1,,1,1,1,1,1,1,1],[,1,,,,,,,1,1,,1,,,,,1,,,1,,1],[,1,,,,1,,,1,,,,,,,,1,,1,,,1],[,,,,,,,,,,,,,1,1,,,,1,,,1],[,,,,,1,,,1,,,,1],[,1],,[,1],[1,,,,,,,,,,,,,,1,,,,,1]],[,[,1,,,,1,1,1,1,1,1,,1,1,1,1,1,,1,1,,1,1,,,1],[,,1,,,,,,,,,1],,,[1,,,1,1,,,,,,,,1,1,,1,1,,1],,[,,,,,,,,,,,,,,,,,,1,,1],,[1,,,1,1,,1,1,,,,,1,,1,,,,,1,1,,1],,[,1,,,,,,,,1,1,1,1,1,,1,1,,,,1,1],[,,,,,,,,,,,,,,,,1,,,1],[,1,1,1,1,1,1,1,1,1,1,1,1,1,,,1,1,1,1,,1,1,1,1,1,1],[,,,,,,,,,,,1,,1,,,1],[1,,,,,,,,,,,,,,,,,,1,,1],,,[,1,,,,,,,,,,,,,,1,,,,1,1],[,,,,,,,,,1,,,1,,,,,,,,,,1],[,,,,,,,,,,,,,,,1],[,,,,,,,,,,,,,1,1,,,,,,1],,[,1]],[,[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1],[,1,1,,,1,1,,1,1,1,1,1,1,,,1,1,1,1,1,,1,1],[,1,,,,,,,,1],[,,,,1,,,1,,,1,1,,,,,,,,,,1,,,,1],[,1,,1,1,,,1,1,1,,,,1,1,1,1,,1,1,1,1,,1],[,,,,,,,1],[,1,1,,,,,1,,1,,,,,,1,,,,,,1,,1,,1],[,1,,,,,,1,,,,1,,,,,,,,,,1],[,,1,1,,1,1,1,1,1,1,1,1,1,1,,,,1,,1,1,1,1,,1],[,1,,,,,,,,1],[,1,1,,1,,,,,,,,1,,,,,,1,,,1,,1,,1],[,1,,1,,1,,1,1,1,,1,1,1,,1,,,1,1,,1,1,1,1,1],[,1,1,1,1,1,,,1,1,,,,1,1,1,,,,1,1,,,1,1],[,,1,1,1,1,,1,,1,,1,,1,1,1,1,,,,,1,,1,,1],[1,1,1,1,1,1,1,1,,1,,1,,1,1,1,,,1,1,,,,1,,1],[,,,1],,[,1,1,,1,,,1,1,1,,1,1,1,1,1,1,,1,1,,1,1,1,1,1,1],[,1,,,,,,1,,1,,1,,,,,,,1,1,,1,1],[,,,,,,1,,1,1,,1,,1,,,,,,,,,,1],[,1,1,,1,,,,1,,,,1,1,1,,,,1,,1,1,1,,1,1],,[,1,1,,,,,,,,,,,,,1,,,1,,,,,1],[,1,,,,,,,,,,,,,,,,,,,,,,1],[,1,1,,,,,,,1,,,,1,,,,,1,,,,,,,1]],[,[,1,1,1,1,1,,1,,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,,1],[,1,1,1,1,1,,1,,1,1,,,1,1,1,1,,1,,,,,1,1,1],[,,1,1,,1,,1,1,,,,1,1,1,1,,,1,,1,1,1,1,,1],[,1,,1,,,,,,,,1,,1,,1,,,,,,,,,,1],[,,1,,1,,,1,,,,,1,1,,,1,,1,1,1,1],[,1],[,1,1,,1,,1,1,,1,,,1,1,1,,,,1,,,1,,1],[1,1,,1,1,1,,,,,,,,,,,,,1,,1,1,1],[,1,1,,,,,,,1,,,1,,1,,1,,1,1,,,1,,,1],[,,1,,,,,,,,,,,,,,,,,,1],[,1,1,1,1,1,1,1,1,1,1,1,1,,1,1,1,1,1,1,1,1,1,1,1,1,1],[,1,1,1,1,1,,1,,1,,,,,1,1,1,,,1,,1,,,,1],[,1,1,1,1,1,1,1,1,,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1],[,1,1,,1,,,1,1,1,,1,,1,1,1,,,1,1,1,1,,,,1,1],[,,,1,1,,,1,,1,,1,,1,1,1,1,,1,,,,,1],[,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1],[,1,,,,,,,,,,,,,,,,,,,1],[,1,1,,1,1,,1,,1,,,,1,1,,,1,1,,1,1,,1],[,1,1,1,1,1,,,1,1,1,,1,1,1,1,1,1,1,1,,1,1,,,1],[,1,1,1,1,1,,1,1,1,1,,1,1,1,1,1,1,1,1,1,1,1,1,,1,1],[,1,1,,1,,,1,,,1,,1,1,1,1,1,,1,,1,1],[,,,,,1,,,,1,,,,,1,1,,,,1],[,1,,1,1,1,,1,,,1,1,1,,,1,,,1,,1,,,1],[,,1,,,,,,,,,1,,1,,,,,1,,1],[,1,1,,,,,,,,1,1,1,,,,,,,,1,,,,,1],[,,,,,,,,1,,,,,1,,,1]],[,[,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1],[,1,1,,1,1,,,1,1,1,1,1,1,1,1,,,,,,,,,1,1],[,,,,,,,,1,,,,1,,1,,1],[,1,,,1,1,,1,,,,1,,,,,,,,1],[,1,,1,,1,,,,1,1,,1,,1,,,,1,1,1,1,1,,,1],,[,1,,,,,,,,1,,,1,1,,,1,,1,1,,1,,1],[,1,,,1,,,,,,,,1,,,,,,,1],[1,1,,,,,1,1,1,1,1,1,1,1,1,,1,1,1,1,1,1,1,,1,1,1],,[,1,,,,,,1,,1,,1,1,1,1,1,,,1,,1,1,,,,1],[,1,1,,,1,,1,,1,,,1,1,1,1,,,1,,,1,,,,1],[,1,1,1,1,1,,1,1,1,,1,1,1,1,1,1,1,1,1,1,,,,1,,1],[,1,,,1,1,,1,1,,,1,1,,1,1,,1,,1,,1],[1,,1,,,,,1,,1,,1,1,1,1,,,,,1,1,,,,1,1],[,1,1,,,,,1,1,,,1,,1,1,1,1,,,,,,,,,,1],,[,1,1,,,1,,,,1,,1,1,1,1,1,,,,1,,,,1,,1],[,,,1,1,,,1,,,,,1,,1,1,1,,1,1,,,,,,1],[,1,,,,,,,,,,,1,,,,1,,,,,,,1,,1],[,1,1,1,1,1,1,1,,1,1,1,1,1,1,,1,1,1,,1,1,,1,1,1,1],[,1,,,,,,,,,,,,,,,,,,,1],[,1,,,,,,1,,,,,1,,1,,,1,1,,1,1,,1],[,1,,,,,,1,,,,,1,1,,,,,,,,1,,,,1],[,,,,,,,,,,,,,,,,,,1,,,1,,,,,1],[,,,,,,,1,,,,1]],[,[1,1,1,1,1,1,1,1,1,1,1,1,1,1,,1,1,1,1,1,1,1,1,1,1,1,1],[,1,,1,,1,,,,,,,1,,,,,,,,1,,,1],[,1,,,,,,,1],[,,,,,,,,,,1],[,1,,,,,,1,1,,,,,,1],,[,1,1,,,,,,1,,,,,1,1,,,,1],[1,,1,,1,,,,,1,,,,,1,,,,,,,,,1,1],[,1,1,,,,,,,,,1,1,1,1,,,,1,,,,,1,,,1],,[,1,1,,1,,,1,1,,,1,,,1,1,1,,1,,1,1,1,,,,1],[,,,,,1,,,,,1,,,1,1,,,1,,1,,,,1],[,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1],[,1,,,1,1,,1,,,,1,,,,,,,,1],[,,,1,,,,,1,,,,,1,,1,,1,1,1],[,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1],[,,,,,1],[,1,,,,,,1,,,,,,,1,1,1,,,1],[,1,,,,,,,,,,1,1,1,,,,,1,,,1],[,,,,,1,,1,,,,,1,1,1,,1,1,,1,1,1,,,1,1],[1,1,,,,,,,1,,,,,1,1,,,,,,,,,,,1],,[,1],[,,,,,,,,,,,,,,,,,,,,,,,,1],[,,1,,,,,1,,,1,,,,1,,1],[,1,,,,,,,,,1]]];function km(e){e=Array.isArray(e)?e:Cm;var t=[];return e.forEach((function(e,n){var r=String.fromCharCode(n+96).replace("\`","");Array.isArray(e)?t=t.concat(km(e).map((function(e){return r+e}))):t.push(r)})),t}var Rm=function(e){for(var t=Cm;e.length<3;)e+="\`";for(var n=0;n<=e.length-1;n++)if(!(t=t[e.charCodeAt(n)-96]))return!1;return!0};S(Nm,ua),Ri=W(Nm,[{key:"props",get:function(){return this._props}},{key:"attr",value:function(e){return null!=(e=this._attrs[e])?e:null}},{key:"hasAttr",value:function(e){return void 0!==this._attrs[e]}},{key:"attrNames",get:function(){return Object.keys(this._attrs)}}]);function Nm(e){var t,n,r;return H(this,Nm),(t=R(this,Nm))._props=(e=>{var t=null!=(t=e.nodeName)?t:_m[e.nodeType],n=null!=(n=null!=(n=e.nodeType)?n:Sm[e.nodeName])?n:1,r=(xa("number"==typeof n,"nodeType has to be a number, got '".concat(n,"'")),xa("string"==typeof t,"nodeName has to be a string, got '".concat(t,"'")),t=t.toLowerCase(),null);return"input"===t&&(r=(e.type||e.attributes&&e.attributes.type||"").toLowerCase(),Fm().includes(r)||(r="text")),e=O({},e,{nodeType:n,nodeName:t}),r&&(e.type=r),delete e.attributes,Object.freeze(e)})(e),t._attrs=(e=e.attributes,n=void 0===e?{}:e,r={htmlFor:"for",className:"class"},Object.keys(n).reduce((function(e,t){var o=n[t];return xa("object"!==a(o)||null===o,"expects attributes not to be an object, '".concat(t,"' was")),void 0!==o&&(e[r[t]||t]=null!==o?String(o):null),e}),{})),t}var Tm,Sm={"#cdata-section":2,"#text":3,"#comment":8,"#document":9,"#document-fragment":11},_m={},Om=(Object.keys(Sm).forEach((function(e){_m[Sm[e]]=e})),Ri),Mm=function(e,t){if(e=e||function(){},t=t||o.log,!o._audit)throw new Error("No audit configured");var n=o.utils.queue(),a=[],i=(Object.keys(o.plugins).forEach((function(e){n.defer((function(t){function n(e){a.push(e),t()}try{o.plugins[e].cleanup(t,n)}catch(e){n(e)}}))})),o.utils.getFlattenedTree(r.body));o.utils.querySelectorAll(i,"iframe, frame").forEach((function(e){n.defer((function(t,n){return o.utils.sendCommandToFrame(e.actualNode,{command:"cleanup-plugin"},t,n)}))})),n.then((function(n){0===a.length?e(n):t(a)})).catch(t)},Pm={};function Im(e){return Pm.hasOwnProperty(e)}function Bm(e){return"string"==typeof e&&Pm[e]?Pm[e]:"function"==typeof e?e:Tm}var jm={},Lm=(ce(jm,{getAllCells:function(){return Lm},getCellPosition:function(){return Es},getHeaders:function(){return zm},getScope:function(){return As},isColumnHeader:function(){return Fs},isDataCell:function(){return Vm},isDataTable:function(){return Gm},isHeader:function(){return $m},isRowHeader:function(){return Cs},toArray:function(){return xs},toGrid:function(){return xs},traverse:function(){return Hm}}),function(e){for(var t,n,r=[],a=0,o=e.rows.length;a<o;a++)for(t=0,n=e.rows[a].cells.length;t<n;t++)r.push(e.rows[a].cells[t]);return r});function qm(e,t,n){for(var r,a="row"===e?"_rowHeaders":"_colHeaders",i="row"===e?Cs:Fs,l=(s=n[t.y][t.x]).colSpan-1,u=s.getAttribute("rowspan"),s=(u=0===parseInt(u)||0===s.rowspan?n.length:s.rowSpan,t.y+(u-1)),c=t.x+l,d="row"===e?t.y:0,p="row"===e?0:t.x,f=[],m=s;d<=m&&!r;m--)for(var h=c;p<=h;h--){var g=n[m]?n[m][h]:void 0;if(g){var v=o.utils.getNodeFromTree(g);if(v[a]){r=v[a];break}f.push(g)}}return r=(r||[]).concat(f.filter(i)),f.forEach((function(e){o.utils.getNodeFromTree(e)[a]=r})),r}var zm=function(e,t){if(e.getAttribute("headers")){var n=us(e,"headers");if(n.filter((function(e){return e})).length)return n}return t=t||xs(jl(e,"table")),e=qm("row",n=Es(e,t),t),n=qm("col",n,t),[].concat(e,n).reverse()},Vm=function(e){var t;return!(!e.children.length&&!e.textContent.trim())&&((t=ys(e))?["cell","gridcell"].includes(t):"TD"===e.nodeName.toUpperCase())},Gm=function(e){var n=ys(e);if(("presentation"===n||"none"===n)&&!rs(e))return!1;if("true"===e.getAttribute("contenteditable")||jl(e,'[contenteditable="true"]'))return!0;if("grid"===n||"treegrid"===n||"table"===n)return!0;if("landmark"===ed(n))return!0;if("0"===e.getAttribute("datatable"))return!1;if(e.getAttribute("summary"))return!0;if(e.tHead||e.tFoot||e.caption)return!0;for(var r=0,a=e.children.length;r<a;r++)if("COLGROUP"===e.children[r].nodeName.toUpperCase())return!0;for(var o,i,l,u=0,s=e.rows.length,c=!1,d=0;d<s;d++)for(var p,f=0,m=(p=e.rows[d]).cells.length;f<m;f++){if("TH"===(o=p.cells[f]).nodeName.toUpperCase())return!0;if(c||o.offsetWidth===o.clientWidth&&o.offsetHeight===o.clientHeight||(c=!0),o.getAttribute("scope")||o.getAttribute("headers")||o.getAttribute("abbr"))return!0;if(["columnheader","rowheader"].includes(ys(o)))return!0;if(1===o.children.length&&"ABBR"===o.children[0].nodeName.toUpperCase())return!0;u++}if(e.getElementsByTagName("table").length)return!1;if(s<2)return!1;if(1===(n=e.rows[Math.ceil(s/2)]).cells.length&&1===n.cells[0].colSpan)return!1;if(5<=n.cells.length)return!0;if(c)return!0;for(var h=0;h<s;h++){if(p=e.rows[h],i&&i!==t.getComputedStyle(p).getPropertyValue("background-color"))return!0;if(i=t.getComputedStyle(p).getPropertyValue("background-color"),l&&l!==t.getComputedStyle(p).getPropertyValue("background-image"))return!0;l=t.getComputedStyle(p).getPropertyValue("background-image")}return 20<=s||!(lu(e).width>.95*uu(t).width||u<10||e.querySelector("object, embed, iframe, applet"))},$m=function(e){return!(!Fs(e)&&!Cs(e))||!!e.getAttribute("id")&&(e=Aa(e.getAttribute("id")),!!r.querySelector('[headers~="'.concat(e,'"]')))},Hm=function(e,t,n,r){if(Array.isArray(t)&&(r=n,n=t,t={x:0,y:0}),"string"==typeof e)switch(e){case"left":e={x:-1,y:0};break;case"up":e={x:0,y:-1};break;case"right":e={x:1,y:0};break;case"down":e={x:0,y:1}}return function e(t,n,r,a){var o,i=r[n.y]?r[n.y][n.x]:void 0;return i?"function"==typeof a&&!0===(o=a(i,n,r))?[i]:((o=e(t,{x:n.x+t.x,y:n.y+t.y},r,a)).unshift(i),o):[]}(e,{x:t.x+e.x,y:t.y+e.y},n,r)},Um={},Wm=(ce(Um,{allowedAttr:function(){return Wm},arialabelText:function(){return ds},arialabelledbyText:function(){return cs},getAccessibleRefs:function(){return Km},getElementUnallowedRoles:function(){return Qm},getExplicitRole:function(){return ys},getImplicitRole:function(){return Ws},getOwnedVirtual:function(){return ec},getRole:function(){return Xs},getRoleType:function(){return ed},getRolesByType:function(){return th},getRolesWithNameFromContents:function(){return oh},implicitNodes:function(){return lh},implicitRole:function(){return Ws},isAccessibleRef:function(){return uh},isAriaRoleAllowedOnElement:function(){return Xm},isComboboxPopup:function(){return sh},isUnsupportedRole:function(){return vs},isValidRole:function(){return bs},label:function(){return dh},labelVirtual:function(){return Oc},lookupTable:function(){return ih},namedFromContents:function(){return Qs},requiredAttr:function(){return ph},requiredContext:function(){return fh},requiredOwned:function(){return mh},validateAttr:function(){return gh},validateAttrValue:function(){return hh}}),function(e){e=gs.ariaRoles[e];var t=M(ws());return e&&(e.allowedAttrs&&t.push.apply(t,M(e.allowedAttrs)),e.requiredAttrs)&&t.push.apply(t,M(e.requiredAttrs)),t}),Ym=/^idrefs?$/,Km=function(e){e=e.actualNode||e;var t=(t=Pl(e)).documentElement||t,n=Sl.get("idRefsByRoot",(function(){return new Map})),r=n.get(t);return r||(r=new Map,n.set(t,r),function e(t,n,r){if(t.hasAttribute){var a;"LABEL"===t.nodeName.toUpperCase()&&t.hasAttribute("for")&&(a=t.getAttribute("for"),n.has(a)?n.get(a).push(t):n.set(a,[t]));for(var o=0;o<r.length;++o){var i=Ns(t.getAttribute(r[o])||"");if(i){var l,u=K(Yp(i));try{for(u.s();!(l=u.n()).done;){var s=l.value;n.has(s)?n.get(s).push(t):n.set(s,[t])}}catch(e){u.e(e)}finally{u.f()}}}}for(var c=0;c<t.childNodes.length;c++)1===t.childNodes[c].nodeType&&e(t.childNodes[c],n,r)}(t,r,Object.keys(gs.ariaAttrs).filter((function(e){return e=gs.ariaAttrs[e].type,Ym.test(e)})))),null!=(n=r.get(e.id))?n:[]},Xm=function(e,t){e=e instanceof ua?e:_l(e);var n=Ws(e);e=Us(e);return Array.isArray(e.allowedRoles)?e.allowedRoles.includes(t):t!==n&&!!e.allowedRoles},Zm=["doc-backlink","doc-biblioentry","doc-biblioref","doc-cover","doc-endnote","doc-glossref","doc-noteref"],Jm={header:"banner",footer:"contentinfo"},Qm=function(e){var t,n,r=!(1<arguments.length&&void 0!==arguments[1])||arguments[1],a=Hf(e).vNode;return qf(a)?(e=a.props.nodeName,t=Ws(a)||Jm[e],e=[],((n=a)?(n.hasAttr("role")&&(n=Yp(n.attr("role").toLowerCase()),e=e.concat(n)),e.filter((function(e){return bs(e)}))):e).filter((function(e){var n=a,o=t;return!(r&&e===o||(!Zm.includes(e)||ed(e)===o)&&Xm(n,e))}))):[]},eh=function(e){return Object.keys(gs.ariaRoles).filter((function(t){return gs.ariaRoles[t].type===e}))},th=function(e){return eh(e)},nh=function(){return Sl.get("ariaRolesNameFromContent",(function(){return Object.keys(gs.ariaRoles).filter((function(e){return gs.ariaRoles[e].nameFromContent}))}))};function rh(e){return null===e}function ah(e){return null!==e}var oh=function(){return nh()},ih=((Ti={attributes:{"aria-activedescendant":{type:"idref",allowEmpty:!0,unsupported:!1},"aria-atomic":{type:"boolean",values:["true","false"],unsupported:!1},"aria-autocomplete":{type:"nmtoken",values:["inline","list","both","none"],unsupported:!1},"aria-busy":{type:"boolean",values:["true","false"],unsupported:!1},"aria-checked":{type:"nmtoken",values:["true","false","mixed","undefined"],unsupported:!1},"aria-colcount":{type:"int",unsupported:!1},"aria-colindex":{type:"int",unsupported:!1},"aria-colspan":{type:"int",unsupported:!1},"aria-controls":{type:"idrefs",allowEmpty:!0,unsupported:!1},"aria-current":{type:"nmtoken",allowEmpty:!0,values:["page","step","location","date","time","true","false"],unsupported:!1},"aria-describedby":{type:"idrefs",allowEmpty:!0,unsupported:!1},"aria-describedat":{unsupported:!0,unstandardized:!0},"aria-details":{type:"idref",allowEmpty:!0,unsupported:!1},"aria-disabled":{type:"boolean",values:["true","false"],unsupported:!1},"aria-dropeffect":{type:"nmtokens",values:["copy","move","reference","execute","popup","none"],unsupported:!1},"aria-errormessage":{type:"idref",allowEmpty:!0,unsupported:!1},"aria-expanded":{type:"nmtoken",values:["true","false","undefined"],unsupported:!1},"aria-flowto":{type:"idrefs",allowEmpty:!0,unsupported:!1},"aria-grabbed":{type:"nmtoken",values:["true","false","undefined"],unsupported:!1},"aria-haspopup":{type:"nmtoken",allowEmpty:!0,values:["true","false","menu","listbox","tree","grid","dialog"],unsupported:!1},"aria-hidden":{type:"boolean",values:["true","false"],unsupported:!1},"aria-invalid":{type:"nmtoken",allowEmpty:!0,values:["true","false","spelling","grammar"],unsupported:!1},"aria-keyshortcuts":{type:"string",allowEmpty:!0,unsupported:!1},"aria-label":{type:"string",allowEmpty:!0,unsupported:!1},"aria-labelledby":{type:"idrefs",allowEmpty:!0,unsupported:!1},"aria-level":{type:"int",unsupported:!1},"aria-live":{type:"nmtoken",values:["off","polite","assertive"],unsupported:!1},"aria-modal":{type:"boolean",values:["true","false"],unsupported:!1},"aria-multiline":{type:"boolean",values:["true","false"],unsupported:!1},"aria-multiselectable":{type:"boolean",values:["true","false"],unsupported:!1},"aria-orientation":{type:"nmtoken",values:["horizontal","vertical"],unsupported:!1},"aria-owns":{type:"idrefs",allowEmpty:!0,unsupported:!1},"aria-placeholder":{type:"string",allowEmpty:!0,unsupported:!1},"aria-posinset":{type:"int",unsupported:!1},"aria-pressed":{type:"nmtoken",values:["true","false","mixed","undefined"],unsupported:!1},"aria-readonly":{type:"boolean",values:["true","false"],unsupported:!1},"aria-relevant":{type:"nmtokens",values:["additions","removals","text","all"],unsupported:!1},"aria-required":{type:"boolean",values:["true","false"],unsupported:!1},"aria-roledescription":{type:"string",allowEmpty:!0,unsupported:!1},"aria-rowcount":{type:"int",unsupported:!1},"aria-rowindex":{type:"int",unsupported:!1},"aria-rowspan":{type:"int",unsupported:!1},"aria-selected":{type:"nmtoken",values:["true","false","undefined"],unsupported:!1},"aria-setsize":{type:"int",unsupported:!1},"aria-sort":{type:"nmtoken",values:["ascending","descending","other","none"],unsupported:!1},"aria-valuemax":{type:"decimal",unsupported:!1},"aria-valuemin":{type:"decimal",unsupported:!1},"aria-valuenow":{type:"decimal",unsupported:!1},"aria-valuetext":{type:"string",unsupported:!1}},globalAttributes:["aria-atomic","aria-busy","aria-controls","aria-current","aria-describedby","aria-details","aria-disabled","aria-dropeffect","aria-flowto","aria-grabbed","aria-haspopup","aria-hidden","aria-invalid","aria-keyshortcuts","aria-label","aria-labelledby","aria-live","aria-owns","aria-relevant","aria-roledescription"]}).role={alert:{type:"widget",attributes:{allowed:["aria-expanded","aria-errormessage"]},owned:null,nameFrom:["author"],context:null,unsupported:!1,allowedElements:["section"]},alertdialog:{type:"widget",attributes:{allowed:["aria-expanded","aria-modal","aria-errormessage"]},owned:null,nameFrom:["author"],context:null,unsupported:!1,allowedElements:["dialog","section"]},application:{type:"landmark",attributes:{allowed:["aria-expanded","aria-errormessage","aria-activedescendant"]},owned:null,nameFrom:["author"],context:null,unsupported:!1,allowedElements:["article","audio","embed","iframe","object","section","svg","video"]},article:{type:"structure",attributes:{allowed:["aria-expanded","aria-posinset","aria-setsize","aria-errormessage"]},owned:null,nameFrom:["author"],context:null,implicit:["article"],unsupported:!1},banner:{type:"landmark",attributes:{allowed:["aria-expanded","aria-errormessage"]},owned:null,nameFrom:["author"],context:null,implicit:["header"],unsupported:!1,allowedElements:["section"]},button:{type:"widget",attributes:{allowed:["aria-expanded","aria-pressed","aria-errormessage"]},owned:null,nameFrom:["author","contents"],context:null,implicit:["button",'input[type="button"]','input[type="image"]','input[type="reset"]','input[type="submit"]',"summary"],unsupported:!1,allowedElements:[{nodeName:"a",attributes:{href:ah}}]},cell:{type:"structure",attributes:{allowed:["aria-colindex","aria-colspan","aria-rowindex","aria-rowspan","aria-errormessage"]},owned:null,nameFrom:["author","contents"],context:["row"],implicit:["td","th"],unsupported:!1},checkbox:{type:"widget",attributes:{allowed:["aria-checked","aria-required","aria-readonly","aria-errormessage"]},owned:null,nameFrom:["author","contents"],context:null,implicit:['input[type="checkbox"]'],unsupported:!1,allowedElements:["button"]},columnheader:{type:"structure",attributes:{allowed:["aria-colindex","aria-colspan","aria-expanded","aria-rowindex","aria-rowspan","aria-required","aria-readonly","aria-selected","aria-sort","aria-errormessage"]},owned:null,nameFrom:["author","contents"],context:["row"],implicit:["th"],unsupported:!1},combobox:{type:"composite",attributes:{allowed:["aria-autocomplete","aria-required","aria-activedescendant","aria-orientation","aria-errormessage"],required:["aria-expanded"]},owned:{all:["listbox","tree","grid","dialog","textbox"]},nameFrom:["author"],context:null,unsupported:!1,allowedElements:[{nodeName:"input",properties:{type:["text","search","tel","url","email"]}}]},command:{nameFrom:["author"],type:"abstract",unsupported:!1},complementary:{type:"landmark",attributes:{allowed:["aria-expanded","aria-errormessage"]},owned:null,nameFrom:["author"],context:null,implicit:["aside"],unsupported:!1,allowedElements:["section"]},composite:{nameFrom:["author"],type:"abstract",unsupported:!1},contentinfo:{type:"landmark",attributes:{allowed:["aria-expanded","aria-errormessage"]},owned:null,nameFrom:["author"],context:null,implicit:["footer"],unsupported:!1,allowedElements:["section"]},definition:{type:"structure",attributes:{allowed:["aria-expanded","aria-errormessage"]},owned:null,nameFrom:["author"],context:null,implicit:["dd","dfn"],unsupported:!1},dialog:{type:"widget",attributes:{allowed:["aria-expanded","aria-modal","aria-errormessage"]},owned:null,nameFrom:["author"],context:null,implicit:["dialog"],unsupported:!1,allowedElements:["section"]},directory:{type:"structure",attributes:{allowed:["aria-expanded","aria-errormessage"]},owned:null,nameFrom:["author","contents"],context:null,unsupported:!1,allowedElements:["ol","ul"]},document:{type:"structure",attributes:{allowed:["aria-expanded","aria-errormessage"]},owned:null,nameFrom:["author"],context:null,implicit:["body"],unsupported:!1,allowedElements:["article","embed","iframe","object","section","svg"]},"doc-abstract":{type:"section",attributes:{allowed:["aria-expanded","aria-errormessage"]},owned:null,nameFrom:["author"],context:null,unsupported:!1,allowedElements:["section"]},"doc-acknowledgments":{type:"landmark",attributes:{allowed:["aria-expanded","aria-errormessage"]},owned:null,nameFrom:["author"],context:null,unsupported:!1,allowedElements:["section"]},"doc-afterword":{type:"landmark",attributes:{allowed:["aria-expanded","aria-errormessage"]},owned:null,nameFrom:["author"],context:null,unsupported:!1,allowedElements:["section"]},"doc-appendix":{type:"landmark",attributes:{allowed:["aria-expanded","aria-errormessage"]},owned:null,nameFrom:["author"],context:null,unsupported:!1,allowedElements:["section"]},"doc-backlink":{type:"link",attributes:{allowed:["aria-expanded","aria-errormessage"]},owned:null,nameFrom:["author","contents"],context:null,unsupported:!1,allowedElements:[{nodeName:"a",attributes:{href:ah}}]},"doc-biblioentry":{type:"listitem",attributes:{allowed:["aria-expanded","aria-level","aria-posinset","aria-setsize","aria-errormessage"]},owned:null,nameFrom:["author"],context:["doc-bibliography"],unsupported:!1,allowedElements:["li"]},"doc-bibliography":{type:"landmark",attributes:{allowed:["aria-expanded","aria-errormessage"]},owned:{one:["doc-biblioentry"]},nameFrom:["author"],context:null,unsupported:!1,allowedElements:["section"]},"doc-biblioref":{type:"link",attributes:{allowed:["aria-expanded","aria-errormessage"]},owned:null,nameFrom:["author","contents"],context:null,unsupported:!1,allowedElements:[{nodeName:"a",attributes:{href:ah}}]},"doc-chapter":{type:"landmark",attributes:{allowed:["aria-expanded","aria-errormessage"]},owned:null,namefrom:["author"],context:null,unsupported:!1,allowedElements:["section"]},"doc-colophon":{type:"section",attributes:{allowed:["aria-expanded","aria-errormessage"]},owned:null,namefrom:["author"],context:null,unsupported:!1,allowedElements:["section"]},"doc-conclusion":{type:"landmark",attributes:{allowed:["aria-expanded","aria-errormessage"]},owned:null,namefrom:["author"],context:null,unsupported:!1,allowedElements:["section"]},"doc-cover":{type:"img",attributes:{allowed:["aria-expanded","aria-errormessage"]},owned:null,namefrom:["author"],context:null,unsupported:!1},"doc-credit":{type:"section",attributes:{allowed:["aria-expanded","aria-errormessage"]},owned:null,namefrom:["author"],context:null,unsupported:!1,allowedElements:["section"]},"doc-credits":{type:"landmark",attributes:{allowed:["aria-expanded","aria-errormessage"]},owned:null,namefrom:["author"],context:null,unsupported:!1,allowedElements:["section"]},"doc-dedication":{type:"section",attributes:{allowed:["aria-expanded","aria-errormessage"]},owned:null,namefrom:["author"],context:null,unsupported:!1,allowedElements:["section"]},"doc-endnote":{type:"listitem",attributes:{allowed:["aria-expanded","aria-level","aria-posinset","aria-setsize","aria-errormessage"]},owned:null,namefrom:["author"],context:["doc-endnotes"],unsupported:!1,allowedElements:["li"]},"doc-endnotes":{type:"landmark",attributes:{allowed:["aria-expanded","aria-errormessage"]},owned:{one:["doc-endnote"]},namefrom:["author"],context:null,unsupported:!1,allowedElements:["section"]},"doc-epigraph":{type:"section",attributes:{allowed:["aria-expanded","aria-errormessage"]},owned:null,namefrom:["author"],context:null,unsupported:!1},"doc-epilogue":{type:"landmark",attributes:{allowed:["aria-expanded","aria-errormessage"]},owned:null,namefrom:["author"],context:null,unsupported:!1,allowedElements:["section"]},"doc-errata":{type:"landmark",attributes:{allowed:["aria-expanded","aria-errormessage"]},owned:null,namefrom:["author"],context:null,unsupported:!1,allowedElements:["section"]},"doc-example":{type:"section",attributes:{allowed:["aria-expanded","aria-errormessage"]},owned:null,namefrom:["author"],context:null,unsupported:!1,allowedElements:["aside","section"]},"doc-footnote":{type:"section",attributes:{allowed:["aria-expanded","aria-errormessage"]},owned:null,namefrom:["author"],context:null,unsupported:!1,allowedElements:["aside","footer","header"]},"doc-foreword":{type:"landmark",attributes:{allowed:["aria-expanded","aria-errormessage"]},owned:null,namefrom:["author"],context:null,unsupported:!1,allowedElements:["section"]},"doc-glossary":{type:"landmark",attributes:{allowed:["aria-expanded","aria-errormessage"]},owned:["term","definition"],namefrom:["author"],context:null,unsupported:!1,allowedElements:["dl"]},"doc-glossref":{type:"link",attributes:{allowed:["aria-expanded","aria-errormessage"]},owned:null,namefrom:["author","contents"],context:null,unsupported:!1,allowedElements:[{nodeName:"a",attributes:{href:ah}}]},"doc-index":{type:"navigation",attributes:{allowed:["aria-expanded","aria-errormessage"]},owned:null,namefrom:["author"],context:null,unsupported:!1,allowedElements:["nav","section"]},"doc-introduction":{type:"landmark",attributes:{allowed:["aria-expanded","aria-errormessage"]},owned:null,namefrom:["author"],context:null,unsupported:!1,allowedElements:["section"]},"doc-noteref":{type:"link",attributes:{allowed:["aria-expanded"]},owned:null,namefrom:["author","contents"],context:null,unsupported:!1,allowedElements:[{nodeName:"a",attributes:{href:ah}}]},"doc-notice":{type:"note",attributes:{allowed:["aria-expanded"]},owned:null,namefrom:["author"],context:null,unsupported:!1,allowedElements:["section"]},"doc-pagebreak":{type:"separator",attributes:{allowed:["aria-expanded"]},owned:null,namefrom:["author"],context:null,unsupported:!1,allowedElements:["hr"]},"doc-pagelist":{type:"navigation",attributes:{allowed:["aria-expanded"]},owned:null,namefrom:["author"],context:null,unsupported:!1,allowedElements:["nav","section"]},"doc-part":{type:"landmark",attributes:{allowed:["aria-expanded"]},owned:null,namefrom:["author"],context:null,unsupported:!1,allowedElements:["section"]},"doc-preface":{type:"landmark",attributes:{allowed:["aria-expanded"]},owned:null,namefrom:["author"],context:null,unsupported:!1,allowedElements:["section"]},"doc-prologue":{type:"landmark",attributes:{allowed:["aria-expanded","aria-errormessage"]},owned:null,namefrom:["author"],context:null,unsupported:!1,allowedElements:["section"]},"doc-pullquote":{type:"none",attributes:{allowed:["aria-expanded"]},owned:null,namefrom:["author"],context:null,unsupported:!1,allowedElements:["aside","section"]},"doc-qna":{type:"section",attributes:{allowed:["aria-expanded"]},owned:null,namefrom:["author"],context:null,unsupported:!1,allowedElements:["section"]},"doc-subtitle":{type:"sectionhead",attributes:{allowed:["aria-expanded"]},owned:null,namefrom:["author"],context:null,unsupported:!1,allowedElements:{nodeName:["h1","h2","h3","h4","h5","h6"]}},"doc-tip":{type:"note",attributes:{allowed:["aria-expanded"]},owned:null,namefrom:["author"],context:null,unsupported:!1,allowedElements:["aside"]},"doc-toc":{type:"navigation",attributes:{allowed:["aria-expanded","aria-errormessage"]},owned:null,namefrom:["author"],context:null,unsupported:!1,allowedElements:["nav","section"]},feed:{type:"structure",attributes:{allowed:["aria-expanded","aria-errormessage"]},owned:{one:["article"]},nameFrom:["author"],context:null,unsupported:!1,allowedElements:["article","aside","section"]},figure:{type:"structure",attributes:{allowed:["aria-expanded","aria-errormessage"]},owned:null,nameFrom:["author","contents"],context:null,implicit:["figure"],unsupported:!1},form:{type:"landmark",attributes:{allowed:["aria-expanded","aria-errormessage"]},owned:null,nameFrom:["author"],context:null,implicit:["form"],unsupported:!1},grid:{type:"composite",attributes:{allowed:["aria-activedescendant","aria-expanded","aria-colcount","aria-level","aria-multiselectable","aria-readonly","aria-rowcount","aria-errormessage"]},owned:{one:["rowgroup","row"]},nameFrom:["author"],context:null,implicit:["table"],unsupported:!1},gridcell:{type:"widget",attributes:{allowed:["aria-colindex","aria-colspan","aria-expanded","aria-rowindex","aria-rowspan","aria-selected","aria-readonly","aria-required","aria-errormessage"]},owned:null,nameFrom:["author","contents"],context:["row"],implicit:["td","th"],unsupported:!1},group:{type:"structure",attributes:{allowed:["aria-activedescendant","aria-expanded","aria-errormessage"]},owned:null,nameFrom:["author"],context:null,implicit:["details","optgroup"],unsupported:!1,allowedElements:["dl","figcaption","fieldset","figure","footer","header","ol","ul"]},heading:{type:"structure",attributes:{required:["aria-level"],allowed:["aria-expanded","aria-errormessage"]},owned:null,nameFrom:["author","contents"],context:null,implicit:["h1","h2","h3","h4","h5","h6"],unsupported:!1},img:{type:"structure",attributes:{allowed:["aria-expanded","aria-errormessage"]},owned:null,nameFrom:["author"],context:null,implicit:["img"],unsupported:!1,allowedElements:["embed","iframe","object","svg"]},input:{nameFrom:["author"],type:"abstract",unsupported:!1},landmark:{nameFrom:["author"],type:"abstract",unsupported:!1},link:{type:"widget",attributes:{allowed:["aria-expanded","aria-errormessage"]},owned:null,nameFrom:["author","contents"],context:null,implicit:["a[href]","area[href]"],unsupported:!1,allowedElements:["button",{nodeName:"input",properties:{type:["image","button"]}}]},list:{type:"structure",attributes:{allowed:["aria-expanded","aria-errormessage"]},owned:{all:["listitem"]},nameFrom:["author"],context:null,implicit:["ol","ul","dl"],unsupported:!1},listbox:{type:"composite",attributes:{allowed:["aria-activedescendant","aria-multiselectable","aria-readonly","aria-required","aria-expanded","aria-orientation","aria-errormessage"]},owned:{all:["option"]},nameFrom:["author"],context:null,implicit:["select"],unsupported:!1,allowedElements:["ol","ul"]},listitem:{type:"structure",attributes:{allowed:["aria-level","aria-posinset","aria-setsize","aria-expanded","aria-errormessage"]},owned:null,nameFrom:["author","contents"],context:["list"],implicit:["li","dt"],unsupported:!1},log:{type:"widget",attributes:{allowed:["aria-expanded","aria-errormessage"]},owned:null,nameFrom:["author"],context:null,unsupported:!1,allowedElements:["section"]},main:{type:"landmark",attributes:{allowed:["aria-expanded","aria-errormessage"]},owned:null,nameFrom:["author"],context:null,implicit:["main"],unsupported:!1,allowedElements:["article","section"]},marquee:{type:"widget",attributes:{allowed:["aria-expanded","aria-errormessage"]},owned:null,nameFrom:["author"],context:null,unsupported:!1,allowedElements:["section"]},math:{type:"structure",attributes:{allowed:["aria-expanded","aria-errormessage"]},owned:null,nameFrom:["author"],context:null,implicit:["math"],unsupported:!1},menu:{type:"composite",attributes:{allowed:["aria-activedescendant","aria-expanded","aria-orientation","aria-errormessage"]},owned:{one:["menuitem","menuitemradio","menuitemcheckbox"]},nameFrom:["author"],context:null,implicit:['menu[type="context"]'],unsupported:!1,allowedElements:["ol","ul"]},menubar:{type:"composite",attributes:{allowed:["aria-activedescendant","aria-expanded","aria-orientation","aria-errormessage"]},owned:{one:["menuitem","menuitemradio","menuitemcheckbox"]},nameFrom:["author"],context:null,unsupported:!1,allowedElements:["ol","ul"]},menuitem:{type:"widget",attributes:{allowed:["aria-posinset","aria-setsize","aria-expanded","aria-errormessage"]},owned:null,nameFrom:["author","contents"],context:["menu","menubar"],implicit:['menuitem[type="command"]'],unsupported:!1,allowedElements:["button","li",{nodeName:"iput",properties:{type:["image","button"]}},{nodeName:"a",attributes:{href:ah}}]},menuitemcheckbox:{type:"widget",attributes:{allowed:["aria-checked","aria-posinset","aria-setsize","aria-errormessage"]},owned:null,nameFrom:["author","contents"],context:["menu","menubar"],implicit:['menuitem[type="checkbox"]'],unsupported:!1,allowedElements:[{nodeName:["button","li"]},{nodeName:"input",properties:{type:["checkbox","image","button"]}},{nodeName:"a",attributes:{href:ah}}]},menuitemradio:{type:"widget",attributes:{allowed:["aria-checked","aria-selected","aria-posinset","aria-setsize","aria-errormessage"]},owned:null,nameFrom:["author","contents"],context:["menu","menubar"],implicit:['menuitem[type="radio"]'],unsupported:!1,allowedElements:[{nodeName:["button","li"]},{nodeName:"input",properties:{type:["image","button","radio"]}},{nodeName:"a",attributes:{href:ah}}]},navigation:{type:"landmark",attributes:{allowed:["aria-expanded","aria-errormessage"]},owned:null,nameFrom:["author"],context:null,implicit:["nav"],unsupported:!1,allowedElements:["section"]},none:{type:"structure",attributes:null,owned:null,nameFrom:["author"],context:null,unsupported:!1,allowedElements:[{nodeName:["article","aside","dl","embed","figcaption","fieldset","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hr","iframe","li","ol","section","ul"]},{nodeName:"img",attributes:{alt:ah}}]},note:{type:"structure",attributes:{allowed:["aria-expanded","aria-errormessage"]},owned:null,nameFrom:["author"],context:null,unsupported:!1,allowedElements:["aside"]},option:{type:"widget",attributes:{allowed:["aria-selected","aria-posinset","aria-setsize","aria-checked","aria-errormessage"]},owned:null,nameFrom:["author","contents"],context:["listbox"],implicit:["option"],unsupported:!1,allowedElements:[{nodeName:["button","li"]},{nodeName:"input",properties:{type:["checkbox","button"]}},{nodeName:"a",attributes:{href:ah}}]},presentation:{type:"structure",attributes:null,owned:null,nameFrom:["author"],context:null,unsupported:!1,allowedElements:[{nodeName:["article","aside","dl","embed","figcaption","fieldset","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hr","iframe","li","ol","section","ul"]},{nodeName:"img",attributes:{alt:ah}}]},progressbar:{type:"widget",attributes:{allowed:["aria-valuetext","aria-valuenow","aria-valuemax","aria-valuemin","aria-expanded","aria-errormessage"]},owned:null,nameFrom:["author"],context:null,implicit:["progress"],unsupported:!1},radio:{type:"widget",attributes:{allowed:["aria-selected","aria-posinset","aria-setsize","aria-required","aria-errormessage","aria-checked"]},owned:null,nameFrom:["author","contents"],context:null,implicit:['input[type="radio"]'],unsupported:!1,allowedElements:[{nodeName:["button","li"]},{nodeName:"input",properties:{type:["image","button"]}}]},radiogroup:{type:"composite",attributes:{allowed:["aria-activedescendant","aria-required","aria-expanded","aria-readonly","aria-errormessage","aria-orientation"]},owned:{all:["radio"]},nameFrom:["author"],context:null,unsupported:!1,allowedElements:{nodeName:["ol","ul","fieldset"]}},range:{nameFrom:["author"],type:"abstract",unsupported:!1},region:{type:"landmark",attributes:{allowed:["aria-expanded","aria-errormessage"]},owned:null,nameFrom:["author"],context:null,implicit:["section[aria-label]","section[aria-labelledby]","section[title]"],unsupported:!1,allowedElements:{nodeName:["article","aside"]}},roletype:{type:"abstract",unsupported:!1},row:{type:"structure",attributes:{allowed:["aria-activedescendant","aria-colindex","aria-expanded","aria-level","aria-selected","aria-rowindex","aria-errormessage"]},owned:{one:["cell","columnheader","rowheader","gridcell"]},nameFrom:["author","contents"],context:["rowgroup","grid","treegrid","table"],implicit:["tr"],unsupported:!1},rowgroup:{type:"structure",attributes:{allowed:["aria-activedescendant","aria-expanded","aria-errormessage"]},owned:{all:["row"]},nameFrom:["author","contents"],context:["grid","table","treegrid"],implicit:["tbody","thead","tfoot"],unsupported:!1},rowheader:{type:"structure",attributes:{allowed:["aria-colindex","aria-colspan","aria-expanded","aria-rowindex","aria-rowspan","aria-required","aria-readonly","aria-selected","aria-sort","aria-errormessage"]},owned:null,nameFrom:["author","contents"],context:["row"],implicit:["th"],unsupported:!1},scrollbar:{type:"widget",attributes:{required:["aria-controls","aria-valuenow"],allowed:["aria-valuetext","aria-orientation","aria-errormessage","aria-valuemax","aria-valuemin"]},owned:null,nameFrom:["author"],context:null,unsupported:!1},search:{type:"landmark",attributes:{allowed:["aria-expanded","aria-errormessage"]},owned:null,nameFrom:["author"],context:null,unsupported:!1,allowedElements:{nodeName:["aside","form","section"]}},searchbox:{type:"widget",attributes:{allowed:["aria-activedescendant","aria-autocomplete","aria-multiline","aria-readonly","aria-required","aria-placeholder","aria-errormessage"]},owned:null,nameFrom:["author"],context:null,implicit:['input[type="search"]'],unsupported:!1,allowedElements:{nodeName:"input",properties:{type:"text"}}},section:{nameFrom:["author","contents"],type:"abstract",unsupported:!1},sectionhead:{nameFrom:["author","contents"],type:"abstract",unsupported:!1},select:{nameFrom:["author"],type:"abstract",unsupported:!1},separator:{type:"structure",attributes:{allowed:["aria-expanded","aria-orientation","aria-valuenow","aria-valuemax","aria-valuemin","aria-valuetext","aria-errormessage"]},owned:null,nameFrom:["author"],context:null,implicit:["hr"],unsupported:!1,allowedElements:["li"]},slider:{type:"widget",attributes:{allowed:["aria-valuetext","aria-orientation","aria-readonly","aria-errormessage","aria-valuemax","aria-valuemin"],required:["aria-valuenow"]},owned:null,nameFrom:["author"],context:null,implicit:['input[type="range"]'],unsupported:!1},spinbutton:{type:"widget",attributes:{allowed:["aria-valuetext","aria-required","aria-readonly","aria-errormessage","aria-valuemax","aria-valuemin"],required:["aria-valuenow"]},owned:null,nameFrom:["author"],context:null,implicit:['input[type="number"]'],unsupported:!1,allowedElements:{nodeName:"input",properties:{type:["text","tel"]}}},status:{type:"widget",attributes:{allowed:["aria-expanded","aria-errormessage"]},owned:null,nameFrom:["author"],context:null,implicit:["output"],unsupported:!1,allowedElements:["section"]},structure:{type:"abstract",unsupported:!1},switch:{type:"widget",attributes:{allowed:["aria-errormessage"],required:["aria-checked"]},owned:null,nameFrom:["author","contents"],context:null,unsupported:!1,allowedElements:["button",{nodeName:"input",properties:{type:["checkbox","image","button"]}},{nodeName:"a",attributes:{href:ah}}]},tab:{type:"widget",attributes:{allowed:["aria-selected","aria-expanded","aria-setsize","aria-posinset","aria-errormessage"]},owned:null,nameFrom:["author","contents"],context:["tablist"],unsupported:!1,allowedElements:[{nodeName:["button","h1","h2","h3","h4","h5","h6","li"]},{nodeName:"input",properties:{type:"button"}},{nodeName:"a",attributes:{href:ah}}]},table:{type:"structure",attributes:{allowed:["aria-colcount","aria-rowcount","aria-errormessage"]},owned:{one:["rowgroup","row"]},nameFrom:["author","contents"],context:null,implicit:["table"],unsupported:!1},tablist:{type:"composite",attributes:{allowed:["aria-activedescendant","aria-expanded","aria-level","aria-multiselectable","aria-orientation","aria-errormessage"]},owned:{all:["tab"]},nameFrom:["author"],context:null,unsupported:!1,allowedElements:["ol","ul"]},tabpanel:{type:"widget",attributes:{allowed:["aria-expanded","aria-errormessage"]},owned:null,nameFrom:["author"],context:null,unsupported:!1,allowedElements:["section"]},term:{type:"structure",attributes:{allowed:["aria-expanded","aria-errormessage"]},owned:null,nameFrom:["author","contents"],context:null,implicit:["dt"],unsupported:!1},textbox:{type:"widget",attributes:{allowed:["aria-activedescendant","aria-autocomplete","aria-multiline","aria-readonly","aria-required","aria-placeholder","aria-errormessage"]},owned:null,nameFrom:["author"],context:null,implicit:['input[type="text"]','input[type="email"]','input[type="password"]','input[type="tel"]','input[type="url"]',"input:not([type])","textarea"],unsupported:!1},timer:{type:"widget",attributes:{allowed:["aria-expanded","aria-errormessage"]},owned:null,nameFrom:["author"],context:null,unsupported:!1},toolbar:{type:"structure",attributes:{allowed:["aria-activedescendant","aria-expanded","aria-orientation","aria-errormessage"]},owned:null,nameFrom:["author"],context:null,implicit:['menu[type="toolbar"]'],unsupported:!1,allowedElements:["ol","ul"]},tooltip:{type:"structure",attributes:{allowed:["aria-expanded","aria-errormessage"]},owned:null,nameFrom:["author","contents"],context:null,unsupported:!1},tree:{type:"composite",attributes:{allowed:["aria-activedescendant","aria-multiselectable","aria-required","aria-expanded","aria-orientation","aria-errormessage"]},owned:{all:["treeitem"]},nameFrom:["author"],context:null,unsupported:!1,allowedElements:["ol","ul"]},treegrid:{type:"composite",attributes:{allowed:["aria-activedescendant","aria-colcount","aria-expanded","aria-level","aria-multiselectable","aria-readonly","aria-required","aria-rowcount","aria-orientation","aria-errormessage"]},owned:{one:["rowgroup","row"]},nameFrom:["author"],context:null,unsupported:!1},treeitem:{type:"widget",attributes:{allowed:["aria-checked","aria-selected","aria-expanded","aria-level","aria-posinset","aria-setsize","aria-errormessage"]},owned:null,nameFrom:["author","contents"],context:["group","tree"],unsupported:!1,allowedElements:["li",{nodeName:"a",attributes:{href:ah}}]},widget:{type:"abstract",unsupported:!1},window:{nameFrom:["author"],type:"abstract",unsupported:!1}},Ti.implicitHtmlRole=Ss,Ti.elementsAllowedNoRole=[{nodeName:["base","body","caption","col","colgroup","datalist","dd","details","dt","head","html","keygen","label","legend","main","map","math","meta","meter","noscript","optgroup","param","picture","progress","script","source","style","template","textarea","title","track"]},{nodeName:"area",attributes:{href:ah}},{nodeName:"input",properties:{type:["color","data","datatime","file","hidden","month","number","password","range","reset","submit","time","week"]}},{nodeName:"link",attributes:{href:ah}},{nodeName:"menu",attributes:{type:"context"}},{nodeName:"menuitem",attributes:{type:["command","checkbox","radio"]}},{nodeName:"select",condition:function(e){return e instanceof o.AbstractVirtualNode||(e=o.utils.getNodeFromTree(e)),1<Number(e.attr("size"))},properties:{multiple:!0}},{nodeName:["clippath","cursor","defs","desc","feblend","fecolormatrix","fecomponenttransfer","fecomposite","feconvolvematrix","fediffuselighting","fedisplacementmap","fedistantlight","fedropshadow","feflood","fefunca","fefuncb","fefuncg","fefuncr","fegaussianblur","feimage","femerge","femergenode","femorphology","feoffset","fepointlight","fespecularlighting","fespotlight","fetile","feturbulence","filter","hatch","hatchpath","lineargradient","marker","mask","meshgradient","meshpatch","meshrow","metadata","mpath","pattern","radialgradient","solidcolor","stop","switch","view"]}],Ti.elementsAllowedAnyRole=[{nodeName:"a",attributes:{href:rh}},{nodeName:"img",attributes:{alt:rh}},{nodeName:["abbr","address","canvas","div","p","pre","blockquote","ins","del","output","span","table","tbody","thead","tfoot","td","em","strong","small","s","cite","q","dfn","abbr","time","code","var","samp","kbd","sub","sup","i","b","u","mark","ruby","rt","rp","bdi","bdo","br","wbr","th","tr"]}],Ti.evaluateRoleForElement={A:function(e){var t=e.node;return"http://www.w3.org/2000/svg"===t.namespaceURI||!t.href.length||e.out},AREA:function(e){return!e.node.href},BUTTON:function(e){var t=e.node,n=e.role;e=e.out;return"menu"===t.getAttribute("type")?"menuitem"===n:e},IMG:function(e){var t=e.node,n=e.role,r=e.out;switch(t.alt){case null:return r;case"":return"presentation"===n||"none"===n;default:return"presentation"!==n&&"none"!==n}},INPUT:function(e){var t=e.node,n=e.role,r=e.out;switch(t.type){case"button":case"image":return r;case"checkbox":return!("button"!==n||!t.hasAttribute("aria-pressed"))||r;case"radio":return"menuitemradio"===n;case"text":return"combobox"===n||"searchbox"===n||"spinbutton"===n;case"tel":return"combobox"===n||"spinbutton"===n;case"url":case"search":case"email":return"combobox"===n;default:return!1}},LI:function(e){var t=e.node;e=e.out;return!o.utils.matchesSelector(t,"ol li, ul li")||e},MENU:function(e){return"context"!==e.node.getAttribute("type")},OPTION:function(e){return e=e.node,!o.utils.matchesSelector(e,"select > option, datalist > option, optgroup > option")},SELECT:function(e){var t=e.node;return!t.multiple&&t.size<=1&&"menu"===e.role},SVG:function(e){var t=e.node;return!(!t.parentNode||"http://www.w3.org/2000/svg"!==t.parentNode.namespaceURI)||e.out}},Ti.rolesOfType={widget:["button","checkbox","dialog","gridcell","link","log","marquee","menuitem","menuitemcheckbox","menuitemradio","option","progressbar","radio","scrollbar","searchbox","slider","spinbutton","status","switch","tab","tabpanel","textbox","timer","tooltip","tree","treeitem"]},Ti),lh=function(e){var t=null;return(e=ih.role[e])&&e.implicit?Bd(e.implicit):t},uh=function(e){return!!Km(e).length};function sh(e){var t=(1<arguments.length&&void 0!==arguments[1]?arguments[1]:{}).popupRoles,n=Xs(e);if(!(t=null!=t?t:ps["aria-haspopup"].values).includes(n))return!1;if(t=(e=>{for(;e=e.parent;)if(null!==Xs(e,{noPresentational:!0}))return e;return null})(e),ch(t))return!0;if(!(n=e.props.id))return!1;if(e.actualNode)return t=Ml(e.actualNode).querySelectorAll('[aria-owns~="'.concat(n,'"][role~="combobox"]:not(select),\\n     [aria-controls~="').concat(n,'"][role~="combobox"]:not(select)')),Array.from(t).some(ch);throw new Error("Unable to determine combobox popup without an actualNode")}var ch=function(e){return e&&"combobox"===Xs(e)},dh=function(e){return e=_l(e),Oc(e)},ph=function(e){return(e=gs.ariaRoles[e])&&Array.isArray(e.requiredAttrs)?M(e.requiredAttrs):[]},fh=function(e){return(e=gs.ariaRoles[e])&&Array.isArray(e.requiredContext)?M(e.requiredContext):null},mh=function(e){return(e=gs.ariaRoles[e])&&Array.isArray(e.requiredOwned)?M(e.requiredOwned):null},hh=function(e,t){var n,r=(e=e instanceof ua?e:_l(e)).attr(t),a=gs.ariaAttrs[t];if(!a)return!0;if(a.allowEmpty&&(!r||""===r.trim()))return!0;switch(a.type){case"boolean":return["true","false"].includes(r.toLowerCase());case"nmtoken":return"string"==typeof r&&a.values.includes(r.toLowerCase());case"nmtokens":return(n=Yp(r)).reduce((function(e,t){return e&&a.values.includes(t)}),0!==n.length);case"idref":try{var o=Pl(e.actualNode);return!(!r||!o.getElementById(r))}catch(e){throw new TypeError("Cannot resolve id references for partial DOM")}case"idrefs":return us(e,t).some((function(e){return!!e}));case"string":return""!==r.trim();case"decimal":return!(!(n=r.match(/^[-+]?([0-9]*)\\.?([0-9]*)$/))||!n[1]&&!n[2]);case"int":return o=void 0!==a.minValue?a.minValue:-1/0,/^[-+]?[0-9]+$/.test(r)&&parseInt(r)>=o}},gh=function(e){return!!gs.ariaAttrs[e]};var vh=["cell-header-not-in-table","cell-header-not-th","header-refs-self","empty-hdrs"],bh=vh[0],yh=vh[1],Dh=vh[2],wh=vh[3];function xh(e){return"caption"===e.props.nodeName}var Eh={};ce(Eh,{getAriaRolesByType:function(){return eh},getAriaRolesSupportingNameFromContent:function(){return nh},getElementSpec:function(){return Us},getElementsByContentType:function(){return Ds},getGlobalAriaAttrs:function(){return ws},implicitHtmlRoles:function(){return Ss}}),Ni=du;var Ah=["alert","log","status"];function Fh(e){return e=t.getComputedStyle((e=>{for(var t=e,n=e.textContent.trim(),r=n;r===n&&void 0!==t;){var a=-1;if(0===(e=t).children.length)return e;for(;a++,""===(r=e.children[a].textContent.trim())&&a+1<e.children.length;);t=e.children[a]}return e})(e)),{fontWeight:(e=>{switch(e){case"lighter":return 100;case"normal":return 400;case"bold":return 700;case"bolder":return 900}return e=parseInt(e),isNaN(e)?400:e})(e.getPropertyValue("font-weight")),fontSize:parseInt(e.getPropertyValue("font-size")),isItalic:"italic"===e.getPropertyValue("font-style")}}function Ch(e,t,n){return n.reduce((function(n,r){return n||(!r.size||e.fontSize/r.size>t.fontSize)&&(!r.weight||e.fontWeight-r.weight>t.fontWeight)&&(!r.italic||e.isItalic&&!t.isItalic)}),!1)}var kh=/[;,\\s]/,Rh=/^[0-9.]+$/;ce(Cn={},{aria:function(){return Um},color:function(){return Nh},dom:function(){return Ol},forms:function(){return ig},matches:function(){return Hs},math:function(){return hu},standards:function(){return Eh},table:function(){return jm},text:function(){return ls},utils:function(){return sa}});var Nh={},Th=(ce(Nh,{Color:function(){return md},centerPointOfRect:function(){return Th},elementHasImage:function(){return sd},elementIsDistinct:function(){return _h},filteredRectStack:function(){return Mh},flattenColors:function(){return Bh},flattenShadowColors:function(){return Lh},getBackgroundColor:function(){return eg},getBackgroundStack:function(){return qh},getContrast:function(){return rg},getForegroundColor:function(){return ag},getOwnBackgroundColor:function(){return gd},getRectStack:function(){return Oh},getStackingContext:function(){return Kh},getStrokeColorsFromShadows:function(){return Hh},getTextShadowColors:function(){return Yh},hasValidContrastRatio:function(){return og},incompleteData:function(){return ud},parseTextShadows:function(){return Wh},stackingContextToColor:function(){return Xh}}),function(e){if(!(e.left>t.innerWidth||t.innerHeight<e.top))return{x:Math.min(Math.ceil(e.left+e.width/2),t.innerWidth-1),y:Math.min(Math.ceil(e.top+e.height/2),t.innerHeight-1)}});function Sh(e){return e.getPropertyValue("font-family").split(/[,;]/g).map((function(e){return e.trim().toLowerCase()}))}var _h=function(e,n){var r,a=t.getComputedStyle(e);return"none"!==a.getPropertyValue("background-image")||!!["border-bottom","border-top","outline"].reduce((function(e,t){var n=new md;return n.parseString(a.getPropertyValue(t+"-color")),e||"none"!==a.getPropertyValue(t+"-style")&&0<parseFloat(a.getPropertyValue(t+"-width"))&&0!==n.alpha}),!1)||(r=t.getComputedStyle(n),Sh(a)[0]!==Sh(r)[0])||(e=["text-decoration-line","text-decoration-style","font-weight","font-style","font-size"].reduce((function(e,t){return e||a.getPropertyValue(t)!==r.getPropertyValue(t)}),!1),(n=a.getPropertyValue("text-decoration")).split(" ").length<3?e||n!==r.getPropertyValue("text-decoration"):e)},Oh=function(e){var t=es(e);return!(e=zc(e))||e.length<=1?[t]:e.some((function(e){return void 0===e}))?null:(e.splice(0,0,t),e)},Mh=function(e){var t,n,r=Oh(e);return r&&1===r.length?r[0]:r&&1<r.length?(t=r.shift(),r.forEach((function(a,o){var i,l;0!==o&&(i=r[o-1],l=r[o],n=i.every((function(e,t){return e===l[t]}))||t.includes(e))})),n?r[0]:(ud.set("bgColor","elmPartiallyObscuring"),null)):(ud.set("bgColor","outsideViewport"),null)},Ph=["hue","saturation","color","luminosity"],Ih={normal:function(e,t){return t},multiply:function(e,t){return t*e},screen:function(e,t){return e+t-e*t},overlay:function(e,t){return this["hard-light"](t,e)},darken:function(e,t){return Math.min(e,t)},lighten:function(e,t){return Math.max(e,t)},"color-dodge":function(e,t){return 0===e?0:1===t?1:Math.min(1,e/(1-t))},"color-burn":function(e,t){return 1===e?1:0===t?0:1-Math.min(1,(1-e)/t)},"hard-light":function(e,t){return t<=.5?this.multiply(e,2*t):this.screen(e,2*t-1)},"soft-light":function(e,t){return t<=.5?e-(1-2*t)*e*(1-e):e+(2*t-1)*((e<=.25?((16*e-12)*e+4)*e:Math.sqrt(e))-e)},difference:function(e,t){return Math.abs(e-t)},exclusion:function(e,t){return e+t-2*e*t},hue:function(e,t){return t.setSaturation(e.getSaturation()).setLuminosity(e.getLuminosity())},saturation:function(e,t){return e.setSaturation(t.getSaturation()).setLuminosity(e.getLuminosity())},color:function(e,t){return t.setLuminosity(e.getLuminosity())},luminosity:function(e,t){return e.setLuminosity(t.getLuminosity())}};function Bh(e,t){var n,r=((e,t,n)=>{var r;return Ph.includes(n)?Ih[n](e,t):(r=new md,["r","g","b"].forEach((function(a){r[a]=Ih[n](e[a],t[a])})),r)})(t,e,2<arguments.length&&void 0!==arguments[2]?arguments[2]:"normal"),a=jh(e.red,e.alpha,t.red,t.alpha,255*r.r),o=jh(e.green,e.alpha,t.green,t.alpha,255*r.g);r=jh(e.blue,e.alpha,t.blue,t.alpha,255*r.b);return 0===(e=(t=e.alpha+t.alpha*(1-e.alpha),e=0,n=1,Math.min(Math.max(e,t),n)))?new md(a,o,r,e):(t=Math.round(a/e),n=Math.round(o/e),a=Math.round(r/e),new md(t,n,a,e))}function jh(e,t,n,r,a){return t*(1-r)*e+t*r*a+(1-t)*r*n}function Lh(e,t){var n=e.alpha,r=(1-n)*t.red+n*e.red;return new md(r,(1-n)*t.green+n*e.green,(1-n)*t.blue+n*e.blue,e.alpha+t.alpha*(1-e.alpha))}function qh(e){for(var n=zc(e).map((function(n){return(e=>{var n=e.indexOf(r.body),a=gd(t.getComputedStyle(r.documentElement));return 1<n&&0===a.alpha&&!sd(r.documentElement)&&(1<n&&(e.splice(n,1),e.push(r.body)),0<(a=e.indexOf(r.documentElement)))&&(e.splice(a,1),e.push(r.documentElement)),e})(n=Ed(n,e))})),a=0;a<n.length;a++){var o=n[a];if(o[0]!==e)return ud.set("bgColor","bgOverlap"),null;if(0!==a&&!((e,t)=>{if(e!==t){if(null===e||null===t)return;if(e.length!==t.length)return;for(var n=0;n<e.length;++n)if(e[n]!==t[n])return}return 1})(o,n[0]))return ud.set("bgColor","elmPartiallyObscuring"),null}return n[0]||null}var zh=.54,Vh=.5,Gh=1.5,$h=["top","right","bottom","left"];function Hh(e){var t=void 0!==(t=(1<arguments.length&&void 0!==arguments[1]?arguments[1]:{}).ignoreEdgeCount)&&t;e=(e=>{var t,n={},r=K(e);try{for(r.s();!(t=r.n()).done;){var a=t.value,o=a.colorStr,i=a.pixels,l=(null!=n[o]||(n[o]={top:[],right:[],bottom:[],left:[]}),n[o]),u=V(i,2),s=u[0],c=u[1];Vh<s?l.right.push(s):Vh<-s&&l.left.push(-s),Vh<c?l.bottom.push(c):Vh<-c&&l.top.push(-c)}}catch(e){r.e(e)}finally{r.f()}return n})(e),e=Object.entries(e).map((function(e){var t=(e=V(e,2))[0],n=e[1];e=$h.filter((function(e){return 0!==n[e].length})).length;return{colorStr:t,sides:n,edgeCount:e}}));return!t&&e.some((function(e){return 1<(e=e.edgeCount)&&e<4}))?null:e.map(Uh).filter((function(e){return null!==e}))}function Uh(e){var t,n,r=e.colorStr,a=e.sides;return 4!==e.edgeCount?null:((e=new md).parseString(r),n=!(t=0),$h.forEach((function(e){t+=a[e].length/4,n=n&&a[e].every((function(e){return Gh<e}))})),n||(e.alpha=1-Math.pow(zh,t)),e)}function Wh(e){var t={pixels:[]},n=[t];if(!(o=e.trim()))return[];for(;o;){var r=o.match(/^[a-z]+(\\([^)]+\\))?/i)||o.match(/^#[0-9a-f]+/i),a=o.match(/^([0-9.-]+)px/i)||o.match(/^(0)/);if(r)xa(!t.colorStr,"Multiple colors identified in text-shadow: ".concat(e)),o=o.replace(r[0],"").trim(),t.colorStr=r[0];else if(a){xa(t.pixels.length<3,"Too many pixel units in text-shadow: ".concat(e));var o=o.replace(a[0],"").trim();r=parseFloat(("."===a[1][0]?"0":"")+a[1]);t.pixels.push(r)}else{if(","!==o[0])throw new Error("Unable to process text-shadows: ".concat(o));xa(2<=t.pixels.length,"Missing pixel value in text-shadow: ".concat(e)),n.push(t={pixels:[]}),o=o.substr(1).trim()}}return n.forEach((function(e){2===(e=e.pixels).length&&e.push(0)})),n}function Yh(e){var n,r=(n=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{}).minRatio,a=n.maxRatio,o=n.ignoreEdgeCount,i=[],l=t.getComputedStyle(e);if("none"!==(n=l.getPropertyValue("text-shadow"))){e=l.getPropertyValue("font-size");var u,s=parseInt(e),c=(xa(!1===isNaN(s),"Unable to determine font-size value ".concat(e)),[]),d=K(Wh(n));try{for(d.s();!(u=d.n()).done;){var p=u.value,f=p.colorStr||l.getPropertyValue("color"),m=V(p.pixels,3),h=m[0],g=m[1],v=m[2],b=void 0===v?0:v;if(!(a&&s*a<=b))if(r&&b<s*r)c.push({colorStr:f,pixels:p.pixels});else{if(0<c.length){var y=Hh(c,{ignoreEdgeCount:o});if(null===y)return null;i.push.apply(i,M(y)),c.splice(0,c.length)}var D=(e=>{var t=e.colorStr,n=e.offsetY,r=e.blurRadius,a=e.fontSize;return e.offsetX>r||r<n?new md(0,0,0,0):((e=new md).parseString(t),e.alpha*=((e,t)=>0===e?1:.185/(e/t+.4))(r,a),e)})({colorStr:f,offsetX:h,offsetY:g,blurRadius:b,fontSize:s});i.push(D)}}}catch(e){d.e(e)}finally{d.f()}if(0<c.length){if(null===(e=Hh(c,{ignoreEdgeCount:o})))return null;i.push.apply(i,M(e))}}return i}function Kh(e,t){var n,r,a=_l(e);return a._stackingContext||(n=[],r=new Map,(t=null!=t?t:qh(e)).forEach((function(e){var t=(t=e=_l(e),(o=new md).parseString(t.getComputedStylePropertyValue("background-color")),o),a=e._stackingOrder.filter((function(e){return!!e.vNode})),o=(a.forEach((function(e,t){e=e.vNode;var o=null==(o=a[t-1])?void 0:o.vNode;o=Qh(r,e,o);0!==t||r.get(e)||n.unshift(o),r.set(e,o)})),null==(o=a[a.length-1])?void 0:o.vNode);e=Qh(r,e,o);a.length||n.unshift(e),e.bgColor=t})),a._stackingContext=n)}function Xh(e){var t;return null!=(t=e.descendants)&&t.length?(t=Bh(e.descendants.reduce(Zh,Jh()),e.bgColor,e.descendants[0].blendMode)).alpha*=e.opacity:(t=e.bgColor).alpha*=e.opacity,{color:t,blendMode:e.blendMode}}function Zh(e,t){return e=e instanceof md?e:Xh(e).color,Bh(Xh(t).color,e,t.blendMode)}function Jh(e,t){return{vNode:e,ancestor:t,opacity:parseFloat(null!=(t=null==e?void 0:e.getComputedStylePropertyValue("opacity"))?t:1),bgColor:new md(0,0,0,0),blendMode:(null==e?void 0:e.getComputedStylePropertyValue("mix-blend-mode"))||void 0,descendants:[]}}function Qh(e,t,n){var r=e.get(n);e=null!=(e=e.get(t))?e:Jh(t,r);return r&&n!==t&&!r.descendants.includes(e)&&r.descendants.unshift(e),e}function eg(e){var n=1<arguments.length&&void 0!==arguments[1]?arguments[1]:[],a=2<arguments.length&&void 0!==arguments[2]?arguments[2]:.1,o=_l(e),i=o._cache.getBackgroundColor;return i?(n.push.apply(n,M(i.bgElms)),ud.set("bgColor",i.incompleteData),i.bgColor):(i=((e,n,a)=>{var o=qh(e);if(!o)return null;var i=Lc(e);(a=null!=(a=Yh(e,{minRatio:a,ignoreEdgeCount:!0}))?a:[]).length&&(a=[{color:a.reduce(Lh)}]);for(var l=0;l<o.length;l++){var u=o[l],s=t.getComputedStyle(u);if(sd(u,s))return n.push(u),null;var c=gd(s);if(0!==c.alpha){if("inline"!==s.getPropertyValue("display")&&!tg(u,i))return n.push(u),ud.set("bgColor","elmPartiallyObscured"),null;if(n.push(u),1===c.alpha)break}}var d=(a=(d=Kh(e,o)).map(Xh).concat(a),((e,n)=>{var a,o,i,l,u=[];return n||(n=r.documentElement,l=r.body,n=t.getComputedStyle(n),a=t.getComputedStyle(l),o=gd(n),l=0!==(i=gd(a)).alpha&&tg(l,e.getBoundingClientRect()),(0!==i.alpha&&0===o.alpha||l&&1!==i.alpha)&&u.unshift({color:i,blendMode:ng(a.getPropertyValue("mix-blend-mode"))}),0===o.alpha)||l&&1===i.alpha||u.unshift({color:o,blendMode:ng(n.getPropertyValue("mix-blend-mode"))}),u})(e,o.includes(r.body)));return a.unshift.apply(a,M(d)),0===a.length?new md(255,255,255,1):(e=a.reduce((function(e,t){return Bh(t.color,e.color instanceof md?e.color:e,t.blendMode)})),Bh(e.color instanceof md?e.color:e,new md(255,255,255,1)))})(e,n,a),o._cache.getBackgroundColor={bgColor:i,bgElms:n,incompleteData:ud.get("bgColor")},i)}function tg(e,n){n=Array.isArray(n)?n:[n];var r=e.getBoundingClientRect(),a=r.right,o=r.bottom,i=t.getComputedStyle(e).getPropertyValue("overflow");return(["scroll","auto"].includes(i)||e instanceof t.HTMLHtmlElement)&&(a=r.left+e.scrollWidth,o=r.top+e.scrollHeight),n.every((function(e){return e.top>=r.top&&e.bottom<=o&&e.left>=r.left&&e.right<=a}))}function ng(e){return e||void 0}var rg=function(e,t){return t&&e?(t.alpha<1&&(t=Bh(t,e)),e=e.getRelativeLuminance(),t=t.getRelativeLuminance(),(Math.max(t,e)+.05)/(Math.min(t,e)+.05)):null};function ag(e,n,r){for(var a=3<arguments.length&&void 0!==arguments[3]?arguments[3]:{},o=t.getComputedStyle(e),i=[],l=0,u=[function(){var e,t,n=o,r=void 0===(r=(r=a).textStrokeEmMin)?0:r;return 0===(t=parseFloat(n.getPropertyValue("-webkit-text-stroke-width")))||(e=n.getPropertyValue("font-size"),t/=parseFloat(e),isNaN(t))||t<r?null:(e=n.getPropertyValue("-webkit-text-stroke-color"),(new md).parseString(e))},function(){return e=o,(new md).parseString(e.getPropertyValue("-webkit-text-fill-color")||e.getPropertyValue("color"));var e},function(){return Yh(e,{minRatio:0})}];l<u.length;l++){var s=(0,u[l])();if(s&&(i=i.concat(s),1===s.alpha))break}var c=i.reduce((function(e,t){return Bh(e,t)}));return null===(r=null==r?eg(e,[]):r)?(r=ud.get("bgColor"),ud.set("fgColor",r),null):Bh(((e,t,n)=>{for(;t;){var r;1===t.opacity&&t.ancestor||(e.alpha*=t.opacity,r=(null==(r=t.ancestor)?void 0:r.descendants)||n,(r=(r=1!==t.opacity?r.slice(0,r.indexOf(t)):r).map(Xh)).length&&(r=r.reduce((function(e,t){return Bh(t.color,e.color instanceof md?e.color:e)}),{color:new md(0,0,0,0),blendMode:"normal"}),e=Bh(e,r))),t=t.ancestor}return e})(c,function e(t,n){var r,a=K(t);try{for(a.s();!(r=a.n()).done;){var o,i=r.value;if((null==(o=i.vNode)?void 0:o.actualNode)===n)return i;var l=e(i.descendants,n);if(l)return l}}catch(e){a.e(e)}finally{a.f()}}(r=Kh(e),e),r),new md(255,255,255,1))}var og=function(e,t,n,r){return e=rg(e,t),{isValid:(t=r&&Math.ceil(72*n)/96<14||!r&&Math.ceil(72*n)/96<18?4.5:3)<e,contrastRatio:e,expectedContrastRatio:t}},ig={},lg=(ce(ig,{isAriaCombobox:function(){return cc},isAriaListbox:function(){return sc},isAriaRange:function(){return pc},isAriaTextbox:function(){return uc},isDisabled:function(){return ug},isNativeSelect:function(){return lc},isNativeTextbox:function(){return ic}}),["fieldset","button","select","input","textarea"]),ug=function e(t){var n,r,a=t._isDisabled;return"boolean"!=typeof a&&(n=t.props.nodeName,r=t.attr("aria-disabled"),a=!(!lg.includes(n)||!t.hasAttr("disabled"))||(r?"true"===r.toLowerCase():!!t.parent&&e(t.parent)),t._isDisabled=a),a};function sg(e,t){var n=null==(n=t.data)?void 0:n.headingOrder,r=dg(t.node.ancestry,1);return n&&(t=n.map((function(e){return O({},e,{ancestry:r.concat(e.ancestry)})})),-1===(n=((e,t)=>{for(;t.length;){var n=cg(e,t);if(-1!==n)return n;t=dg(t,1)}return-1})(e,r))?e.push.apply(e,M(t)):e.splice.apply(e,[n,0].concat(M(t)))),e}function cg(e,t){return e.findIndex((function(e){return Gf(e.ancestry,t)}))}function dg(e,t){return e.slice(0,e.length-t)}function pg(e,t){return e=e.boundingClientRect,t=t.boundingClientRect,e.top>=t.top&&e.left>=t.left&&e.bottom<=t.bottom&&e.right<=t.right}function fg(e){return{width:Math.round(10*e.width)/10,height:Math.round(10*e.height)/10}}function mg(e,t){return Vp(e,t)&&!as(t)}function hg(e){return e.map((function(e){return e.actualNode}))}function gg(e,t){var n=1<arguments.length&&void 0!==t&&t;return e.map((function(e){return{vChild:e,nested:n}}))}function vg(e){return""!==(e||"").trim()}function bg(e){return e=Nc(e,{emoji:!0,nonBmp:!0,punctuations:!0}),Ns(e)}function yg(e){return null!==(e=Zf(e.attr("tabindex")))&&e<0}var Dg=["block","list-item","table","flex","grid","inline-block"];function wg(e){return e=t.getComputedStyle(e).getPropertyValue("display"),-1!==Dg.indexOf(e)||"table-"===e.substr(0,6)}function xg(e,t){return e=e.getRelativeLuminance(),t=t.getRelativeLuminance(),(Math.max(e,t)+.05)/(Math.min(e,t)+.05)}var Eg=["block","list-item","table","flex","grid","inline-block"];function Ag(e){return e=t.getComputedStyle(e).getPropertyValue("display"),-1!==Eg.indexOf(e)||"table-"===e.substr(0,6)}var Fg=cl((function(e,n){function r(e,t){return a.getPropertyValue(e)===t}var a=t.getComputedStyle(e,n);return r("content","none")||r("display","none")||r("visibility","hidden")||!1===r("position","absolute")||0===gd(a).alpha&&r("background-image","none")?0:(e=Cg(a.getPropertyValue("width")),n=Cg(a.getPropertyValue("height")),"px"!==e.unit||"px"!==n.unit?0===e.value||0===n.value?0:1/0:e.value*n.value)}));function Cg(e){var t=(e=V(e.match(/^([0-9.]+)([a-z]+)$/i)||[],3))[1];e=void 0===(e=e[2])?"":e;return{value:parseFloat(void 0===t?"":t),unit:e.toLowerCase()}}var kg={ARTICLE:!0,ASIDE:!0,NAV:!0,SECTION:!0},Rg={alert:!0,alertdialog:!0,application:!0,article:!0,banner:!1,complementary:!0,contentinfo:!0,dialog:!0,form:!0,log:!0,main:!0,navigation:!0,region:!0,search:!1,status:!0,tabpanel:!0};function Ng(e,t,n,r){var a=ys(e);if(!(n=n||fh(a)))return null;for(var o=n.includes("group"),i=r?e:e.parent;i;){var l=Xs(i,{noPresentational:!0});if(l){if("group"!==l||!o)return n.includes(l)?null:n;t.includes(a)&&n.push(a),n=n.filter((function(e){return"group"!==e}))}i=i.parent}return n}function Tg(e){return 3===(e=e.vNode).props.nodeType?0<e.props.nodeValue.trim().length:Uc(e,!1,!0)}var Sg=cl((function(e){var t;if(e)return(t=Xs(e,{noPresentational:!0,chromium:!0}))?ed(t):Sg(e.parent)}));function _g(e){var t,n,r=(1<arguments.length&&void 0!==arguments[1]?arguments[1]:{}).invalidTableRowAttrs,a=2<arguments.length?arguments[2]:void 0;r=null!=(t=null==r||null==(t=r.filter)?void 0:t.call(r,(function(e){return a.hasAttr(e)})))?t:[];return 0===r.length||!(t=(t=(e=>{if(e.parent)return Wd(e,'table:not([role]), [role~="treegrid"], [role~="table"], [role~="grid"]')})(a))&&Xs(t))||"treegrid"===t||(n="row".concat(1<r.length?"Plural":"Singular"),this.data({messageKey:n,invalidAttrs:r,ownerRole:t}),!1)}function Og(e,t,n){var r=(a=n.props).nodeName,a=a.type,o=(e=>e?(e=e.toLowerCase(),["mixed","true"].includes(e)?e:"false"):"")(n.attr("aria-checked"));return"input"!==r||"checkbox"!==a||!o||o===(r=(e=>e.props.indeterminate?"mixed":e.props.checked?"true":"false")(n))||(this.data({messageKey:"checkbox",checkState:r}),!1)}var Mg={row:_g,checkbox:Og};var Pg=function(e,t){try{return"svg"===t.props.nodeName||!!Wd(t,"svg")}catch(e){return!1}},Ig=[function(e,t){return Bg(t)},function(e,t){return"area"!==t.props.nodeName},function(e,t){return!Pg(0,t)},function(e,t){return rs(t)},function(e,t){return as(t)||!jg(t)},function(e){return!rd(e,{noLengthCompare:!0})}];function Bg(e){return"widget"===ed(e)}var jg=cl((function e(t){return!(null==t||!t.parent)&&(!(!Bg(t.parent)||!as(t.parent))||e(t.parent))})),Lg=function(e,t){var n=ys(t);return!(n&&!["none","presentation"].includes(n)&&!(fs[n]||{}).accessibleNameRequired&&!rs(t))},qg=function(e,t,n){return n.initiator},zg={emoji:!0,nonBmp:!1,punctuations:!0},Vg={"abstractrole-evaluate":function(e,t,n){return 0<(n=Yp(n.attr("role")).filter((function(e){return"abstract"===ed(e)}))).length&&(this.data(n),!0)},"accesskeys-after":function(e){var t={};return e.filter((function(e){if(e.data){var n=e.data.toUpperCase();if(!t[n])return(t[n]=e).relatedNodes=[],!0;t[n].relatedNodes.push(e.relatedNodes[0])}return!1})).map((function(e){return e.result=!!e.relatedNodes.length,e}))},"accesskeys-evaluate":function(e,t,n){return nu(n)||(this.data(n.attr("accesskey")),this.relatedNodes([e])),!0},"alt-space-value-evaluate":function(e,t,n){return"string"==typeof(n=n.attr("alt"))&&/^\\s+$/.test(n)},"aria-allowed-attr-evaluate":function(e,t,n){var r,a=[],o=Xs(n),i=Wm(o),l=(Array.isArray(t[o])&&(i=tm(t[o].concat(i))),K(n.attrNames));try{for(l.s();!(r=l.n()).done;){var u=r.value;!gh(u)||i.includes(u)||((e,t,n)=>"aria-required"===e&&"false"===t||!("aria-multiline"!==e||"false"!==t||!n.hasAttr("contenteditable")))(u,n.attr(u),n)||a.push(u)}}catch(e){l.e(e)}finally{l.f()}return!a.length||(this.data(a.map((function(e){return e+'="'+n.attr(e)+'"'}))),!(o||qf(n)||rs(n))&&void 0)},"aria-allowed-attr-matches":function(e,t){var n=/^aria-/,r=t.attrNames;if(r.length)for(var a=0,o=r.length;a<o;a++)if(n.test(r[a]))return!0;return!1},"aria-allowed-role-evaluate":function(e){var t=2<arguments.length?arguments[2]:void 0,n=void 0===(n=(r=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{}).allowImplicit)||n,r=void 0===(r=r.ignoredTags)?[]:r,a=t.props.nodeName;return!!r.map((function(e){return e.toLowerCase()})).includes(a)||!(r=Qm(t,n)).length||(this.data(r),!nc(t)&&void 0)},"aria-allowed-role-matches":function(e,t){return null!==ys(t,{dpub:!0,fallback:!0})},"aria-busy-evaluate":function(e,t,n){return"true"===n.attr("aria-busy")},"aria-conditional-attr-evaluate":function(e,t,n){var r=Xs(n);return!Mg[r]||Mg[r].call(this,e,t,n)},"aria-conditional-checkbox-attr-evaluate":Og,"aria-conditional-row-attr-evaluate":_g,"aria-errormessage-evaluate":function(e,t,n){t=Array.isArray(t)?t:[];var r=n.attr("aria-errormessage"),a=n.hasAttr("aria-errormessage"),o=n.attr("aria-invalid");return!n.hasAttr("aria-invalid")||"false"===o||-1!==t.indexOf(r)||!a||(this.data(Yp(r)),function(e){if(""===e.trim())return gs.ariaAttrs["aria-errormessage"].allowEmpty;var t;try{t=e&&us(n,"aria-errormessage")[0]}catch(t){return void this.data({messageKey:"idrefs",values:Yp(e)})}return t?nc(t)?"alert"===ys(t)||"assertive"===t.getAttribute("aria-live")||"polite"===t.getAttribute("aria-live")||-1<Yp(n.attr("aria-describedby")).indexOf(e):(this.data({messageKey:"hidden",values:Yp(e)}),!1):void 0}.call(this,r))},"aria-has-attr-matches":function(e,t){var n=/^aria-/;return t.attrNames.some((function(e){return n.test(e)}))},"aria-hidden-body-evaluate":function(e,t,n){return"true"!==n.attr("aria-hidden")},"aria-hidden-focus-matches":function(e){return function e(t){return!t||"true"!==t.getAttribute("aria-hidden")&&e(ou(t))}(ou(e))},"aria-label-evaluate":function(e,t,n){return!!Ns(ds(n))},"aria-labelledby-evaluate":function(e,t,n){try{return!!Ns(cs(n))}catch(e){}},"aria-level-evaluate":function(e,t,n){if(n=n.attr("aria-level"),!(6<(n=parseInt(n,10))))return!0},"aria-prohibited-attr-evaluate":function(e){var t,n=2<arguments.length?arguments[2]:void 0,r=(null==(r=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{})?void 0:r.elementsAllowedAriaLabel)||[],a=n.props.nodeName,o=Xs(n,{chromium:!0,fallback:!0});return 0!==(r=((e,t,n,r)=>{var a=gs.ariaRoles[t];return a?a.prohibitedAttrs||[]:t||r.includes(n)||"widget"===Sg(e)?[]:["aria-label","aria-labelledby"]})(n,o,a,r).filter((function(e){return!!n.attrNames.includes(e)&&""!==Ns(n.attr(e))}))).length&&(t=null!==o?"hasRole":"noRole",this.data({role:o,nodeName:a,messageKey:t+=1<r.length?"Plural":"Singular",prohibited:r}),o=bc(n,{subtreeDescendant:!0}),""===Ns(o)||void 0)},"aria-required-attr-evaluate":function(e){var t,n=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},r=2<arguments.length?arguments[2]:void 0,a=ys(r),o=r.attrNames,i=ph(a);return Array.isArray(n[a])&&(i=tm(n[a],i)),!(a&&o.length&&i.length&&(n=r,"separator"!==a||rs(n))&&(o=r,"combobox"!==a||"false"!==o.attr("aria-expanded"))&&("slider"!==a||null==(n=r.attr("aria-valuetext"))||!n.trim())&&(t=Us(r),(o=i.filter((function(e){return!(r.attr(e)||void 0!==(null==(n=(n=t).implicitAttrs)?void 0:n[e]));var n}))).length)&&(this.data(o),1))},"aria-required-children-evaluate":function(e,t,n){t=t&&Array.isArray(t.reviewEmpty)?t.reviewEmpty:[];var r,a,o,i=ys(n,{dpub:!0}),l=mh(i);return null===l||((a=(r=((e,t)=>{function n(){if(3===r.props.nodeType&&a.push({vNode:r,role:null}),1!==r.props.nodeType||!nc(r))return 1;var e,n=Xs(r,{noPresentational:!0}),i=(e=r,ws().find((function(t){return e.hasAttr(t)}))),l=!!i||rs(r);!n&&!l||["group","rowgroup"].includes(n)&&t.some((function(e){return e===n}))?o.push.apply(o,M(r.children)):(n||l)&&a.push({role:n,attr:i||"tabindex",vNode:r})}for(var r,a=[],o=ec(e);r=o.shift();)n();return a})(n,l)).filter((function(e){var t=e.role;return 1===e.vNode.props.nodeType&&!l.includes(t)}))).length?(this.relatedNodes(a.map((function(e){return e.vNode}))),this.data({messageKey:"unallowed",values:a.map((function(e){var t=e.vNode,n=(e=e.attr,t.props),r=n.nodeName;return 3===n.nodeType?"#text":(n=ys(t,{dpub:!0}))?"[role=".concat(n,"]"):e?r+"[".concat(e,"]"):r})).filter((function(e,t,n){return n.indexOf(e)===t})).join(", ")}),!1):(o=l,!!r.some((function(e){return(e=e.role)&&o.includes(e)}))||("true"===n.attr("aria-busy")?(this.data({messageKey:"aria-busy"}),!0):(this.data(l),!(!t.includes(i)||r.some(Tg))&&void 0))))},"aria-required-children-matches":function(e,t){return t=ys(t,{dpub:!0}),!!mh(t)},"aria-required-parent-evaluate":function(e,t,n){var r=t&&Array.isArray(t.ownGroupRoles)?t.ownGroupRoles:[],a=Ng(n,r);if(!a)return!0;var o=(e=>{for(var t,n=[];e;)e.getAttribute("id")&&(t=Aa(e.getAttribute("id")),t=Pl(e).querySelector("[aria-owns~=".concat(t,"]")))&&n.push(t),e=e.parentElement;return n.length?n:null})(e);if(o)for(var i=0,l=o.length;i<l;i++)if(!(a=Ng(_l(o[i]),r,a,!0)))return!0;return this.data(a),!1},"aria-required-parent-matches":function(e,t){return t=ys(t),!!fh(t)},"aria-roledescription-evaluate":function(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},n=Xs(2<arguments.length?arguments[2]:void 0);return!!(t.supportedRoles||[]).includes(n)||!(!n||"presentation"===n||"none"===n)&&void 0},"aria-unsupported-attr-evaluate":function(e,t,n){return!!(n=n.attrNames.filter((function(t){var n=gs.ariaAttrs[t];return!!gh(t)&&(t=n.unsupported,"object"!==a(t)?!!t:!Hs(e,t.exceptions))}))).length&&(this.data(n),!0)},"aria-valid-attr-evaluate":function(e,t,n){t=Array.isArray(t.value)?t.value:[];var r=[],a=/^aria-/;return n.attrNames.forEach((function(e){-1===t.indexOf(e)&&a.test(e)&&!gh(e)&&r.push(e)})),!r.length||(this.data(r),!1)},"aria-valid-attr-value-evaluate":function(e,t,n){t=Array.isArray(t.value)?t.value:[];var r="",a="",i=[],l=/^aria-/,u=["aria-errormessage"],s={"aria-controls":function(){var e=!1===["false",null].includes(n.attr("aria-haspopup"));return e&&(r='aria-controls="'.concat(n.attr("aria-controls"),'"'),a="controlsWithinPopup"),"false"!==n.attr("aria-expanded")&&"false"!==n.attr("aria-selected")&&0==e},"aria-current":function(e){e||(r='aria-current="'.concat(n.attr("aria-current"),'"'),a="ariaCurrent")},"aria-owns":function(){return"false"!==n.attr("aria-expanded")},"aria-describedby":function(e){e||(r='aria-describedby="'.concat(n.attr("aria-describedby"),'"'),a=o._tree&&o._tree[0]._hasShadowRoot?"noIdShadow":"noId")},"aria-labelledby":function(e){e||(r='aria-labelledby="'.concat(n.attr("aria-labelledby"),'"'),a=o._tree&&o._tree[0]._hasShadowRoot?"noIdShadow":"noId")}};return n.attrNames.forEach((function(e){if(!u.includes(e)&&!t.includes(e)&&l.test(e)){var o,c=n.attr(e);try{o=hh(n,e)}catch(o){return r="".concat(e,'="').concat(c,'"'),void(a="idrefs")}s[e]&&!s[e](o)||o||(""===c&&(o=e,"string"!==(null==(o=gs.ariaAttrs[e])?void 0:o.type))?(r=e,a="empty"):i.push("".concat(e,'="').concat(c,'"')))}})),i.length?(this.data(i),!1):!r||void this.data({messageKey:a,needsReview:r})},"attr-non-space-content-evaluate":function(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},n=2<arguments.length?arguments[2]:void 0;if(t.attribute&&"string"==typeof t.attribute)return n.hasAttr(t.attribute)?(n=n.attr(t.attribute),!!Ns(n)||(this.data({messageKey:"emptyAttr"}),!1)):(this.data({messageKey:"noAttr"}),!1);throw new TypeError("attr-non-space-content requires options.attribute to be a string")},"autocomplete-appropriate-evaluate":function(e,t,n){var r,o,i;return"input"!==n.props.nodeName||(o={bday:["text","search","date"],email:["text","search","email"],username:["text","search","email"],"street-address":["text"],tel:["text","search","tel"],"tel-country-code":["text","search","tel"],"tel-national":["text","search","tel"],"tel-area-code":["text","search","tel"],"tel-local":["text","search","tel"],"tel-local-prefix":["text","search","tel"],"tel-local-suffix":["text","search","tel"],"tel-extension":["text","search","tel"],"cc-number":r=["text","search","number","tel"],"cc-exp":["text","search","month","tel"],"cc-exp-month":r,"cc-exp-year":r,"cc-csc":r,"transaction-amount":r,"bday-day":r,"bday-month":r,"bday-year":r,"new-password":["text","search","password"],"current-password":["text","search","password"],url:i=["text","search","url"],photo:i,impp:i},"object"===a(t)&&Object.keys(t).forEach((function(e){o[e]||(o[e]=[]),o[e]=o[e].concat(t[e])})),i=(r=n.attr("autocomplete").split(/\\s+/g).map((function(e){return e.toLowerCase()})))[r.length-1],!!Sc.stateTerms.includes(i))||(r=o[i],i=n.hasAttr("type")?Ns(n.attr("type")).toLowerCase():"text",i=Fm().includes(i)?i:"text",void 0===r?"text"===i:r.includes(i))},"autocomplete-matches":function(e,t){var n=t.attr("autocomplete");if(!n||""===Ns(n))return!1;if(n=t.props.nodeName,!1===["textarea","input","select"].includes(n))return!1;var r=t.attr("aria-readonly")||"false";return!t.hasAttr("readonly")&&"true"!==r.toLowerCase()&&(("input"!==n||!["submit","reset","button","hidden"].includes(t.props.type))&&(r=t.attr("aria-disabled")||"false",!t.hasAttr("disabled")&&"true"!==r.toLowerCase()&&(n=ys(t),(!((r=Zf(t.attr("tabindex")))<0&&t.hasAttr("role"))||void 0!==(n=gs.ariaRoles[n])&&"widget"===n.type)&&!(r<0&&t.actualNode&&!du(t)&&!nc(t)))))},"autocomplete-valid-evaluate":function(e,t,n){return n=n.attr("autocomplete")||"",_c(n,t)},"avoid-inline-spacing-evaluate":function(e,t){return!(0<(t=t.cssProperties.filter((function(t){if("important"===e.style.getPropertyPriority(t))return t}))).length&&(this.data(t),1))},"braille-label-equivalent-evaluate":function(e,t,n){var r;if(!(null!=(r=n.attr("aria-braillelabel"))?r:"").trim())return!0;try{return""!==Ns(kc(n))}catch(e){}},"braille-roledescription-equivalent-evaluate":function(e,t,n){var r=null!=(r=n.attr("aria-brailleroledescription"))?r:"";return""===Ns(r)||("string"!=typeof(r=n.attr("aria-roledescription"))?(this.data({messageKey:"noRoleDescription"}),!1):""!==Ns(r)||(this.data({messageKey:"emptyRoleDescription"}),!1))},"bypass-matches":function(e,t,n){return!qg(0,0,n)||!!e.querySelector("a[href]")},"caption-evaluate":function(e,t,n){return!fm(n,"track").some((function(e){return"captions"===(e.attr("kind")||"").toLowerCase()}))&&void 0},"caption-faked-evaluate":function(e){var t=xs(e),n=t[0];return t.length<=1||n.length<=1||e.rows.length<=1||n.reduce((function(e,t,r){return e||t!==n[r+1]&&void 0!==n[r+1]}),!1)},"color-contrast-evaluate":function(e,n,r){var a=n.ignoreUnicode,o=n.ignoreLength,i=n.ignorePseudo,l=n.boldValue,u=n.boldTextPt,s=n.largeTextPt,c=n.contrastRatio,d=n.shadowOutlineEmMax,p=n.pseudoSizeThreshold;if(!du(e))return this.data({messageKey:"hidden"}),!0;var f=ac(r,!1,!0);if(a&&(h=Fc(a=f,m={nonBmp:!0}),a=""===Ns(Nc(a,m)),h)&&a)this.data({messageKey:"nonBmp"});else{var m=t.getComputedStyle(e),h=parseFloat(m.getPropertyValue("font-size"));a=m.getPropertyValue("font-weight"),l=parseFloat(a)>=l||"bold"===a,a=Math.ceil(72*h)/96,a=(u=l&&a<u||!l&&a<s?c.normal:c.large).expected,s=u.minThreshold,c=u.maxThreshold,u=((e,t)=>{var n=void 0===(n=t.pseudoSizeThreshold)?.25:n;if(!(t=void 0!==(t=t.ignorePseudo)&&t)){var r=(t=e.boundingClientRect).width*t.height*n;do{if(r<Fg(e.actualNode,":before")+Fg(e.actualNode,":after"))return e}while(e=e.parent)}})(r,{ignorePseudo:i,pseudoSizeThreshold:p});if(u)this.data({fontSize:"".concat((72*h/96).toFixed(1),"pt (").concat(h,"px)"),fontWeight:l?"bold":"normal",messageKey:"pseudoContent",expectedContrastRatio:a+":1"}),this.relatedNodes(u.actualNode);else{var g,v,b;if(null!==(r=Yh(e,{minRatio:.001,maxRatio:d})))return u=ag(e,!(i=[]),p=eg(e,i,d),n),n=d=e=null,0===r.length?e=rg(p,u):u&&p&&(n=[].concat(M(r),[p]).reduce(Lh),r=rg(p,u),b=rg(p,n),g=rg(n,u),(e=Math.max(r,b,g))!==r)&&(d=g<b?"shadowOnBgColor":"fgOnShadowColor"),r=a<e,"number"==typeof s&&("number"!=typeof e||e<s)||"number"==typeof c&&("number"!=typeof e||c<e)?(this.data({contrastRatio:e}),!0):(g=Math.floor(100*e)/100,null===p?v=ud.get("bgColor"):r||(v=d),b=1===f.length,(s=1==g)?v=ud.set("bgColor","equalRatio"):r||!b||o||(v="shortTextContent"),this.data({fgColor:u?u.toHexString():void 0,bgColor:p?p.toHexString():void 0,contrastRatio:g,fontSize:"".concat((72*h/96).toFixed(1),"pt (").concat(h,"px)"),fontWeight:l?"bold":"normal",messageKey:v,expectedContrastRatio:a+":1",shadowColor:n?n.toHexString():void 0}),null===u||null===p||s||b&&!o&&!r?(v=null,ud.clear(),void this.relatedNodes(i)):(r||this.relatedNodes(i),r));this.data({messageKey:"complexTextShadows"})}}},"color-contrast-matches":function(e,n){var a=(f=n.props).nodeName;if("option"===a)return!1;if("select"===a&&!e.options.length)return!1;if("input"===a&&["hidden","range","color","checkbox","radio","image"].includes(f.type))return!1;if(ug(n)||Vu(n))return!1;if(["input","select","textarea"].includes(a)){if(f=t.getComputedStyle(e),f=parseInt(f.getPropertyValue("text-indent"),10)){var o={top:(o=e.getBoundingClientRect()).top,bottom:o.bottom,left:o.left+f,right:o.right+f};if(!Rd(o,e))return!1}return!0}if(f=Bl(n,"label"),"label"===a||f){if(o=f||e,a=f?_l(f):n,o.htmlFor&&(o=(f=Pl(o).getElementById(o.htmlFor))&&_l(f))&&ug(o))return!1;if((f=fm(a,'input:not([type="hidden"],[type="image"],[type="button"],[type="submit"],[type="reset"]), select, textarea')[0])&&ug(f))return!1}for(var i,l=[],u=n;u;)u.props.id&&(i=Km(u).filter((function(e){return Yp(e.getAttribute("aria-labelledby")||"").includes(u.props.id)})).map((function(e){return _l(e)})),l.push.apply(l,M(i))),u=u.parent;if(0<l.length&&l.every(ug))return!1;if(""===(a=ac(o=n,!1,!0))||""===Nc(a,zg)||!o.children.some((function(e){return"#text"===e.props.nodeName&&!Cc(e)})))return!1;if(!parseFloat(n.getComputedStylePropertyValue("font-size")))return!1;for(var s=r.createRange(),c=n.children,d=0;d<c.length;d++){var p=c[d];3===p.actualNode.nodeType&&""!==Ns(p.actualNode.nodeValue)&&s.selectNodeContents(p.actualNode)}var f=Array.from(s.getClientRects()),m=zl(n);return f.some((function(t){var n,r=Rd(t,e);return m.length?(n=m.some((function(e){return Ll(t,e.boundingClientRect)})),r&&n):r}))},"css-orientation-lock-evaluate":function(e,t,n,r){r=void 0===(r=(r||{}).cssom)?void 0:r;var a=void 0===(t=(t||{}).degreeThreshold)?0:t;if(r&&r.length){for(var o=!1,i=[],l=r.reduce((function(e,t){var n,r=t.sheet;return e[n=(n=t.shadowId)||"topDocument"]||(e[n]={root:t.root,rules:[]}),r&&r.cssRules&&(t=Array.from(r.cssRules),e[n].rules=e[n].rules.concat(t)),e}),{}),u=function(){var e=c[s],t=(e=l[e]).root;if(!(e=e.rules.filter(d)).length)return 1;e.forEach((function(e){e=e.cssRules,Array.from(e).forEach((function(e){var n=(e=>{var t=e.selectorText;e=e.style;return!(!t||e.length<=0||!(t=e.transform||e.webkitTransform||e.msTransform||!1)&&!e.rotate||(t=(e=>e&&(e=e.match(/(rotate|rotateZ|rotate3d|matrix|matrix3d)\\(([^)]+)\\)(?!.*(rotate|rotateZ|rotate3d|matrix|matrix3d))/))?p((e=V(e,3))[1],e[2]):0)(t),e=p("rotate",e.rotate),!(t+=e))||(t=Math.abs(t),Math.abs(t-180)%180<=a))&&Math.abs(t-90)%90<=a})(e);n&&"HTML"!==e.selectorText.toUpperCase()&&(e=Array.from(t.querySelectorAll(e.selectorText))||[],i=i.concat(e)),o=o||n}))}))},s=0,c=Object.keys(l);s<c.length;s++)u();return!o||(i.length&&this.relatedNodes(i),!1)}function d(e){var t=e.type;e=e.cssText;return 4===t&&(/orientation:\\s*landscape/i.test(e)||/orientation:\\s*portrait/i.test(e))}function p(e,t){switch(e){case"rotate":case"rotateZ":return f(t);case"rotate3d":var n=V(t.split(",").map((function(e){return e.trim()})),4),r=n[2];n=n[3];return 0===parseInt(r)?void 0:f(n);case"matrix":case"matrix3d":var a,o;return(r=(r=t).split(",")).length<=6?(a=(o=V(r,2))[0],o=o[1],m(Math.atan2(parseFloat(o),parseFloat(a)))):(o=parseFloat(r[8]),a=Math.asin(o),o=Math.cos(a),m(Math.acos(parseFloat(r[0])/o)));default:return 0}}function f(e){var t=V(e.match(/(deg|grad|rad|turn)/)||[],1)[0];if(!t)return 0;var n=parseFloat(e.replace(t,""));switch(t){case"rad":return m(n);case"grad":var r=n;return(r%=400)<0&&(r+=400),Math.round(r/400*360);case"turn":return Math.round(360/(1/n));default:return parseInt(n)}}function m(e){return Math.round(e*(180/Math.PI))}},"data-table-large-matches":function(e){return!!Gm(e)&&3<=(e=xs(e)).length&&3<=e[0].length&&3<=e[1].length&&3<=e[2].length},"data-table-matches":function(e){return Gm(e)},"deprecatedrole-evaluate":function(e,t,n){n=Xs(n,{dpub:!0,fallback:!0});var r=gs.ariaRoles[n];return!(null==r||!r.deprecated||(this.data(n),0))},"dlitem-evaluate":function(e){var t=(e=ou(e)).nodeName.toUpperCase(),n=ys(e);return"DIV"===t&&["presentation","none",null].includes(n)&&(t=(e=ou(e)).nodeName.toUpperCase(),n=ys(e)),"DL"===t&&!(n&&!["presentation","none","list"].includes(n))},"doc-has-title-evaluate":function(){var e=r.title;return!!Ns(e)},"duplicate-id-active-matches":function(e){var t=e.getAttribute("id").trim();t='*[id="'.concat(Aa(t),'"]'),t=Array.from(Pl(e).querySelectorAll(t));return!uh(e)&&t.some(rs)},"duplicate-id-after":function(e){var t=[];return e.filter((function(e){return-1===t.indexOf(e.data)&&(t.push(e.data),!0)}))},"duplicate-id-aria-matches":function(e){return uh(e)},"duplicate-id-evaluate":function(e){var t,n=e.getAttribute("id").trim();return!n||(t=Pl(e),(t=Array.from(t.querySelectorAll('[id="'.concat(Aa(n),'"]'))).filter((function(t){return t!==e}))).length&&this.relatedNodes(t),this.data(n),0===t.length)},"duplicate-id-misc-matches":function(e){var t=e.getAttribute("id").trim();t='*[id="'.concat(Aa(t),'"]'),t=Array.from(Pl(e).querySelectorAll(t));return!uh(e)&&t.every((function(e){return!rs(e)}))},"duplicate-img-label-evaluate":function(e,t,n){return!["none","presentation"].includes(Xs(n))&&!!(t=Wd(n,t.parentSelector))&&""!==(t=ac(t,!0).toLowerCase())&&t===kc(n).toLowerCase()},"exists-evaluate":function(){},"explicit-evaluate":function(e,t,n){var r=this;if(!n.attr("id"))return!1;if(n.actualNode){var a=Pl(n.actualNode),o=Aa(n.attr("id"));a=Array.from(a.querySelectorAll('label[for="'.concat(o,'"]')));if(this.relatedNodes(a),!a.length)return!1;try{return a.some((function(e){return!du(e)||(e=Ns(ss(e,{inControlContext:!0,startNode:n})),r.data({explicitLabel:e}),!!e)}))}catch(e){}}},"fallbackrole-evaluate":function(e,t,n){var r=Yp(n.attr("role"));return!(r.length<=1)&&(!(!Ws(n)&&2===r.length&&r.includes("none")&&r.includes("presentation"))||void 0)},"focusable-content-evaluate":function(e,t,n){var r=n.tabbableElements;return!!r&&0<r.filter((function(e){return e!==n})).length},"focusable-disabled-evaluate":function(e,t,n){var r=["button","fieldset","input","select","textarea"];return!((n=n.tabbableElements)&&n.length&&(n=n.filter((function(e){return r.includes(e.props.nodeName)})),this.relatedNodes(n.map((function(e){return e.actualNode}))),0!==n.length)&&!ad())||!!n.every((function(e){var t=e.getComputedStylePropertyValue("pointer-events"),n=parseInt(e.getComputedStylePropertyValue("width")),r=parseInt(e.getComputedStylePropertyValue("height"));return e.actualNode.onfocus||(0===n||0===r)&&"none"===t}))&&void 0},"focusable-element-evaluate":function(e,t,n){return!(!n.hasAttr("contenteditable")||!function e(t){return"true"===(t=t.attr("contenteditable"))||""===t||"false"!==t&&(!!(t=Wd(n.parent,"[contenteditable]"))&&e(t))}(n))||as(n)},"focusable-modal-open-evaluate":function(e,t,n){return!(n=n.tabbableElements.map((function(e){return e.actualNode})))||!n.length||!ad()||void this.relatedNodes(n)},"focusable-no-name-evaluate":function(e,t,n){if(!as(n))return!1;try{return!kc(n)}catch(e){}},"focusable-not-tabbable-evaluate":function(e,t,n){var r=["button","fieldset","input","select","textarea"];return!((n=n.tabbableElements)&&n.length&&(n=n.filter((function(e){return!r.includes(e.props.nodeName)})),this.relatedNodes(n.map((function(e){return e.actualNode}))),0!==n.length)&&!ad())||!!n.every((function(e){var t=e.getComputedStylePropertyValue("pointer-events"),n=parseInt(e.getComputedStylePropertyValue("width")),r=parseInt(e.getComputedStylePropertyValue("height"));return e.actualNode.onfocus||(0===n||0===r)&&"none"===t}))&&void 0},"frame-focusable-content-evaluate":function(e,t,n){if(n.children)try{return!n.children.some((function e(t){if(as(t))return!0;if(!t.children){if(1===t.props.nodeType)throw new Error("Cannot determine children");return!1}return t.children.some((function(t){return e(t)}))}))}catch(e){}},"frame-focusable-content-matches":function(e,t,n){var r;return!n.initiator&&!n.focusable&&1<(null==(r=n.size)?void 0:r.width)*(null==(r=n.size)?void 0:r.height)},"frame-tested-after":function(e){var t={};return e.filter((function(e){var n;return"html"!==e.node.ancestry[e.node.ancestry.length-1]?(n=e.node.ancestry.flat(1/0).join(" > "),t[n]=e,!0):(n=e.node.ancestry.slice(0,e.node.ancestry.length-1).flat(1/0).join(" > "),t[n]&&(t[n].result=!0),!1)}))},"frame-tested-evaluate":function(e,t){return!t.isViolation&&void 0},"frame-title-has-text-matches":function(e){return e=e.getAttribute("title"),!!Ns(e)},"has-alt-evaluate":function(e,t,n){var r=n.props.nodeName;return!!["img","input","area"].includes(r)&&n.hasAttr("alt")},"has-descendant-after":function(e){return e.some((function(e){return!0===e.result}))&&e.forEach((function(e){e.result=!0})),e},"has-descendant-evaluate":function(e,t,n){if(t&&t.selector&&"string"==typeof t.selector)return!(!t.passForModal||!ad())||(n=rm(n,t.selector,nc),this.relatedNodes(n.map((function(e){return e.actualNode}))),0<n.length);throw new TypeError("has-descendant requires options.selector to be a string")},"has-global-aria-attribute-evaluate":function(e,t,n){var r=ws().filter((function(e){return n.hasAttr(e)}));return this.data(r),0<r.length},"has-implicit-chromium-role-matches":function(e,t){return null!==Ws(t,{chromium:!0})},"has-lang-evaluate":function(e,t,n){var a=void 0!==r&&dl(r);return t.attributes.includes("xml:lang")&&t.attributes.includes("lang")&&vg(n.attr("xml:lang"))&&!vg(n.attr("lang"))&&!a?(this.data({messageKey:"noXHTML"}),!1):!!t.attributes.some((function(e){return vg(n.attr(e))}))||(this.data({messageKey:"noLang"}),!1)},"has-text-content-evaluate":function(e,t,n){try{return""!==Ns(bc(n))}catch(e){}},"has-widget-role-evaluate":function(e,t,n){return null!==(n=ys(n))&&("widget"===(n=ed(n))||"composite"===n)},"heading-matches":function(e,t){return"heading"===Xs(t)},"heading-order-after":function(e){(t=M(t=e)).sort((function(e,t){return e=e.node,t=t.node,e.ancestry.length-t.ancestry.length}));var t,n=t.reduce(sg,[]).filter((function(e){return-1!==e.level}));return e.forEach((function(e){e.result=((e,t)=>{var n=null!=(n=null==(n=t[e=cg(t,e.node.ancestry)])?void 0:n.level)?n:-1;t=null!=(t=null==(t=t[e-1])?void 0:t.level)?t:-1;return 0===e||(-1!==n?n-t<=1:void 0)})(e,n)})),e},"heading-order-evaluate":function(){var e,t=Sl.get("headingOrder");return t||(t=(e=rm(o._tree[0],"h1, h2, h3, h4, h5, h6, [role=heading], iframe, frame",nc)).map((function(e){return{ancestry:[Rl(e.actualNode)],level:(t=(t=Xs(e))&&t.includes("heading"),n=e.attr("aria-level"),r=parseInt(n,10),e=V(e.props.nodeName.match(/h(\\d)/)||[],2)[1],t?e&&!n?parseInt(e,10):isNaN(r)||r<1?e?parseInt(e,10):2:r||-1:-1)};var t,n,r})),this.data({headingOrder:t}),Sl.set("headingOrder",e)),!0},"help-same-as-label-evaluate":function(e,t,n){n=Pc(n);var r=e.getAttribute("title");return!!n&&(r||(r="",e.getAttribute("aria-describedby")&&(r=us(e,"aria-describedby").map((function(e){return e?ss(e):""})).join(""))),Ns(r)===Ns(n))},"hidden-content-evaluate":function(e,n,r){if(!["SCRIPT","HEAD","TITLE","NOSCRIPT","STYLE","TEMPLATE"].includes(e.nodeName.toUpperCase())&&Uc(r)){if("none"===(r=t.getComputedStyle(e)).getPropertyValue("display"))return;if("hidden"===r.getPropertyValue("visibility")&&(!(e=(r=ou(e))&&t.getComputedStyle(r))||"hidden"!==e.getPropertyValue("visibility")))return}return!0},"hidden-explicit-label-evaluate":function(e,t,n){if(n.hasAttr("id")){if(!n.actualNode)return;var r,a=Pl(e);e=Aa(e.getAttribute("id"));if((a=a.querySelector('label[for="'.concat(e,'"]')))&&!nc(a)){try{r=kc(n).trim()}catch(e){return}return""===r}}return!1},"html-namespace-matches":function(e,t){return!Pg(0,t)},"html5-scope-evaluate":function(e){return!Qc(r)||"TH"===e.nodeName.toUpperCase()},"identical-links-same-purpose-after":function(e){if(e.length<2)return e;for(var t=e.filter((function(e){return void 0!==e.result})),n=[],r={},o=function(e){var o=t[e],i=(u=o.data).name,l=u.urlProps;if(r[i])return 1;var u=t.filter((function(t,n){return t.data.name===i&&n!==e})),s=u.every((function(e){return function e(t,n){var r,o;return!(!t||!n)&&(r=Object.getOwnPropertyNames(t),o=Object.getOwnPropertyNames(n),r.length===o.length)&&r.every((function(r){var o=t[r];r=n[r];return a(o)===a(r)&&("object"===a(o)||"object"===a(r)?e(o,r):o===r)}))}(e.data.urlProps,l)}));u.length&&!s&&(o.result=void 0),o.relatedNodes=[],(s=o.relatedNodes).push.apply(s,M(u.map((function(e){return e.relatedNodes[0]})))),r[i]=u,n.push(o)},i=0;i<t.length;i++)o(i);return n},"identical-links-same-purpose-evaluate":function(e,t,n){if(n=ls.accessibleTextVirtual(n),n=ls.sanitize(ls.removeUnicode(n,{emoji:!0,nonBmp:!0,punctuations:!0})).toLowerCase())return n={name:n,urlProps:Ol.urlPropsFromAttribute(e,"href")},this.data(n),this.relatedNodes([e]),!0},"identical-links-same-purpose-matches":function(e,t){return!(!kc(t)||(t=Xs(e))&&"link"!==t)},"implicit-evaluate":function(e,t,n){try{var r,a=Wd(n,"label");return!!a&&(r=Ns(kc(a,{inControlContext:!0,startNode:n})),a.actualNode&&this.relatedNodes([a.actualNode]),this.data({implicitLabel:r}),!!r)}catch(e){}},"inline-style-property-evaluate":function(e,n){var r=n.cssProperty,a=n.absoluteValues,o=n.minValue,i=n.maxValue,l=void 0===(l=n.normalValue)?0:l,u=n.multiLineOnly;return!!(!n.noImportant&&"important"!==e.style.getPropertyPriority(r)||u&&!od(e))||(n={},"number"==typeof o&&(n.minValue=o),"number"==typeof i&&(n.maxValue=i),u=e.style.getPropertyValue(r),["inherit","unset","revert","revert-layer"].includes(u)?(this.data(O({value:u},n)),!0):(u=((e,n)=>{var r=n.cssProperty,a=n.absoluteValues;n=n.normalValue;return"normal"===(r=(e=t.getComputedStyle(e)).getPropertyValue(r))||(n=parseFloat(r),a)?n:(a=parseFloat(e.getPropertyValue("font-size")),e=Math.round(n/a*100)/100,isNaN(e)?r:e)})(e,{absoluteValues:a,cssProperty:r,normalValue:l}),this.data(O({value:u},n)),"number"==typeof u?("number"!=typeof o||o<=u)&&("number"!=typeof i||u<=i):void 0))},"inserted-into-focus-order-matches":function(e){return Kc(e)},"internal-link-present-evaluate":function(e,t,n){return fm(n,"a[href]").some((function(e){return/^#[^/!]/.test(e.attr("href"))}))},"invalid-children-evaluate":function(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},n=2<arguments.length?arguments[2]:void 0,r=[],a=[];if(n.children){for(var o=gg(n.children);o.length;){var i=(l=o.shift()).vChild,l=l.nested;if(t.divGroups&&!l&&"div"===(u=i).props.nodeName&&null===ys(u)){if(!i.children)return;var u=gg(i.children,!0);o.push.apply(o,M(u))}else u=((e,t,n)=>{var r=void 0===(r=n.validRoles)?[]:r,a=(n=void 0===(n=n.validNodeNames)?[]:n,(i=e.props).nodeName),o=i.nodeType,i=i.nodeValue;t=t?"div > ":"";return 3===o&&""!==i.trim()?t+"#text":!(1!==o||!nc(e))&&((i=ys(e))?!r.includes(i)&&t+"[role=".concat(i,"]"):!n.includes(a)&&t+a)})(i,l,t),u&&(a.includes(u)||a.push(u),1===(null==i||null==(l=i.actualNode)?void 0:l.nodeType))&&r.push(i.actualNode)}return 0!==a.length&&(this.data({values:a.join(", ")}),this.relatedNodes(r),!0)}},"invalidrole-evaluate":function(e,t,n){return!!(n=Yp(n.attr("role"))).every((function(e){return!bs(e.toLowerCase(),{allowAbstract:!0})}))&&(this.data(n),!0)},"is-element-focusable-evaluate":function(e,t,n){return rs(n)},"is-initiator-matches":qg,"is-on-screen-evaluate":Ni,"is-visible-matches":du,"is-visible-on-screen-matches":function(e,t){return du(t)},"label-content-name-mismatch-evaluate":function(e,t,n){var r=null==t?void 0:t.pixelThreshold,a=null!=(a=null==t?void 0:t.occurrenceThreshold)?a:null==t?void 0:t.occuranceThreshold;return t=ss(e).toLowerCase(),!(e=Ns(bc(n,{subtreeDescendant:!0,ignoreIconLigature:!0,pixelThreshold:r,occurrenceThreshold:a})).toLowerCase())||(Tc(t)<1||Tc(e)<1?void 0:(n=e,r=bg(r=t),n=bg(n),!(!r||!n)&&r.includes(n)))},"label-content-name-mismatch-matches":function(e,t){var n=Xs(e);return!!(n&&eh("widget").includes(n)&&nh().includes(n)&&(Ns(ds(t))||Ns(cs(e)))&&Ns(ac(t)))},"label-matches":function(e,t){return"input"!==t.props.nodeName||!1===t.hasAttr("type")||(t=t.attr("type").toLowerCase(),!1===["hidden","image","button","submit","reset"].includes(t))},"landmark-has-body-context-matches":function(e,t){return e.hasAttribute("role")||!Bl(t,"article, aside, main, nav, section")},"landmark-is-top-level-evaluate":function(e){var t=eh("landmark"),n=ou(e),r=Xs(e);for(this.data({role:r});n;){var a=ys(n);if((a=a||"FORM"===n.nodeName.toUpperCase()?a:Ws(n))&&t.includes(a)&&("main"!==a||"complementary"!==r))return!1;n=ou(n)}return!0},"landmark-is-unique-after":function(e){var t=[];return e.filter((function(e){var n=t.find((function(t){return e.data.role===t.data.role&&e.data.accessibleText===t.data.accessibleText}));return n?(n.result=!1,n.relatedNodes.push(e.relatedNodes[0]),!1):(t.push(e),e.relatedNodes=[],!0)}))},"landmark-is-unique-evaluate":function(e,t,n){var r=Xs(e);return n=(n=kc(n))?n.toLowerCase():null,this.data({role:r,accessibleText:n}),this.relatedNodes([e]),!0},"landmark-unique-matches":function(e,t){return n=t,a=eh("landmark"),!!(o=Xs(n))&&("section"!==(r=n.props.nodeName)&&"form"!==r?0<=a.indexOf(o)||"region"===o:!!kc(n))&&nc(t);var n,r,a,o},"layout-table-matches":function(e){return!Gm(e)&&!rs(e)},"link-in-text-block-evaluate":function(e,t){var n=t.requiredContrastRatio;if(t=t.allowSameColor,Ag(e))return!1;for(var r=ou(e);r&&1===r.nodeType&&!Ag(r);)r=ou(r);if(r){this.relatedNodes([r]);var a=ag(e),o=ag(r),i=(e=eg(e),eg(r)),l=a&&o?xg(a,o):void 0;if((l=l&&Math.floor(100*l)/100)&&n<=l)return!0;var u=e&&i?xg(e,i):void 0;if((u=u&&Math.floor(100*u)/100)&&n<=u)return!0;if(u){if(l)return!(!t||1!==l||1!==u)||(1===l&&1<u?this.data({messageKey:"bgContrast",contrastRatio:u,requiredContrastRatio:n,nodeBackgroundColor:e?e.toHexString():void 0,parentBackgroundColor:i?i.toHexString():void 0}):this.data({messageKey:"fgContrast",contrastRatio:l,requiredContrastRatio:n,nodeColor:a?a.toHexString():void 0,parentColor:o?o.toHexString():void 0}),!1)}else u=null!=(t=ud.get("bgColor"))?t:"bgContrast",this.data({messageKey:u}),ud.clear()}},"link-in-text-block-matches":function(e){var t=Ns(e.innerText),n=ys(e);return!(n&&"link"!==n||!t||!du(e))&&rd(e)},"link-in-text-block-style-evaluate":function(e){if(wg(e))return!1;for(var n=ou(e);n&&1===n.nodeType&&!wg(n);)n=ou(n);return n?(this.relatedNodes([n]),!!_h(e,n)||!!(e=>{for(var n=0,r=["before","after"];n<r.length;n++){var a=r[n];if("none"!==t.getComputedStyle(e,":".concat(a)).getPropertyValue("content"))return 1}})(e)&&void this.data({messageKey:"pseudoContent"})):void 0},"listitem-evaluate":function(e,t,n){var r;if(n=n.parent)return r=n.props.nodeName,n=ys(n),!!["presentation","none","list"].includes(n)||(n&&bs(n)?(this.data({messageKey:"roleNotValid"}),!1):["ul","ol","menu"].includes(r))},"matches-definition-evaluate":function(e,t,n){return Hs(n,t.matcher)},"meta-refresh-evaluate":function(e,t,n){var r=(a=t||{}).minDelay,a=a.maxDelay;return!(n=V((n.attr("content")||"").trim().split(kh),1)[0]).match(Rh)||(n=parseFloat(n),this.data({redirectDelay:n}),"number"==typeof r&&n<=t.minDelay)||"number"==typeof a&&n>t.maxDelay},"meta-viewport-scale-evaluate":function(e,t,n){var r,a=void 0===(a=(t=t||{}).scaleMinimum)?2:a;return t=void 0!==(t=t.lowerBound)&&t,!((n=n.attr("content")||"")&&(n=n.split(/[;,]/).reduce((function(e,t){var n;return(t=t.trim())&&(n=(t=V(t.split("="),2))[0],t=t[1],n)&&t&&(n=n.toLowerCase().trim(),t=t.toLowerCase().trim(),"maximum-scale"===n&&"yes"===t&&(t=1),"maximum-scale"===n&&parseFloat(t)<0||(e[n]=t)),e}),{}),!(t&&n["maximum-scale"]&&parseFloat(n["maximum-scale"])<t))&&(t||"no"!==n["user-scalable"]?(r=parseFloat(n["user-scalable"]),!t&&n["user-scalable"]&&(r||0===r)&&-1<r&&r<1?(this.data("user-scalable"),1):n["maximum-scale"]&&parseFloat(n["maximum-scale"])<a&&(this.data("maximum-scale"),1)):(this.data("user-scalable=no"),1)))},"multiple-label-evaluate":function(e){var t=Aa(e.getAttribute("id")),n=e.parentNode,r=(r=Pl(e)).documentElement||r,a=Array.from(r.querySelectorAll('label[for="'.concat(t,'"]')));for(a.length&&(a=a.filter((function(e){return!nu(e)})));n;)"LABEL"===n.nodeName.toUpperCase()&&-1===a.indexOf(n)&&a.push(n),n=n.parentNode;return this.relatedNodes(a),1<a.length&&(1<(r=a.filter(nc)).length||!us(e,"aria-labelledby").includes(r[0]))&&void 0},"nested-interactive-matches":function(e,t){return!!(t=Xs(t))&&!!gs.ariaRoles[t].childrenPresentational},"no-autoplay-audio-evaluate":function(e,t){var n,r=e.hasAttribute("controls");return e.hasAttribute("loop")?r:e.duration?(t=void 0===(t=t.allowedDuration)?3:t,(e.currentSrc?(n=(e=>{if(e=e.match(/#t=(.*)/))return V(e,2)[1].split(",").map((function(e){if(/:/.test(e)){for(var t=e.split(":"),n=0,r=1;0<t.length;)n+=r*parseInt(t.pop(),10),r*=60;return parseFloat(n)}return parseFloat(e)}))})(e.currentSrc))?1!==n.length?Math.abs(n[1]-n[0]):Math.abs(e.duration-n[0]):Math.abs(e.duration-(e.currentTime||0)):0)<=t||!!r):void console.warn("axe.utils.preloadMedia did not load metadata")},"no-autoplay-audio-matches":function(e){return!!e.currentSrc&&!e.hasAttribute("paused")&&!e.hasAttribute("muted")},"no-empty-role-matches":function(e,t){return!!t.hasAttr("role")&&!!t.attr("role").trim()},"no-explicit-name-required-matches":Lg,"no-focusable-content-evaluate":function(e,t,n){if(n.children)try{var r,a=function e(t){if(!t.children){if(1===t.props.nodeType)throw new Error("Cannot determine children");return[]}var n=[];return t.children.forEach((function(t){"widget"===ed(t)&&rs(t)?n.push(t):n.push.apply(n,M(e(t)))})),n}(n);return!a.length||(0<(r=a.filter(yg)).length?(this.data({messageKey:"notHidden"}),this.relatedNodes(r)):this.relatedNodes(a),!1)}catch(e){}},"no-implicit-explicit-label-evaluate":function(e,t,n){var r,a,o=Xs(n,{noImplicit:!0});this.data(o);try{r=Ns(yc(n)).toLowerCase(),a=Ns(kc(n)).toLowerCase()}catch(e){return}return!(!a&&!r||(a||!r)&&a.includes(r))&&void 0},"no-naming-method-matches":function(e,t){var n=Us(t).namingMethods;return!(n&&0!==n.length||"combobox"===ys(t)&&fm(t,'input:not([type="hidden"])').length||sh(t,{popupRoles:["listbox"]}))},"no-negative-tabindex-matches":function(e,t){return null===(t=Zf(t.attr("tabindex")))||0<=t},"no-role-matches":function(e,t){return!t.attr("role")},"non-empty-if-present-evaluate":function(e,t,n){var r=n.props.nodeName,a=(n.attr("type")||"").toLowerCase();return(n=n.attr("value"))&&this.data({messageKey:"has-label"}),!("input"!==r||!["submit","reset"].includes(a))&&null===n},"not-html-matches":function(e,t){return"html"!==t.props.nodeName},"object-is-loaded-matches":function(e,t){return[Lg,function(e){var t;return null==e||null==(t=e.ownerDocument)||!t.createRange||((t=e.ownerDocument.createRange()).setStart(e,0),t.setEnd(e,e.childNodes.length),0===t.getClientRects().length)}].every((function(n){return n(e,t)}))},"only-dlitems-evaluate":function(e,t,n){var r=["definition","term","list"];return(n=n.children.reduce((function(e,t){var n=t.actualNode;return"DIV"===n.nodeName.toUpperCase()&&null===Xs(n)?e.concat(t.children):e.concat(t)}),[]).reduce((function(e,t){var n,a=(t=t.actualNode).nodeName.toUpperCase();return 1===t.nodeType&&nc(t)?(n=ys(t),("DT"!==a&&"DD"!==a||n)&&!r.includes(n)&&e.badNodes.push(t)):3===t.nodeType&&""!==t.nodeValue.trim()&&(e.hasNonEmptyTextNode=!0),e}),{badNodes:[],hasNonEmptyTextNode:!1})).badNodes.length&&this.relatedNodes(n.badNodes),!!n.badNodes.length||n.hasNonEmptyTextNode},"only-listitems-evaluate":function(e,t,n){var r=!1,a=!1,o=!0,i=[],l=[],u=[];if(n.children.forEach((function(e){var t,n,s=e.actualNode;3===s.nodeType&&""!==s.nodeValue.trim()?r=!0:1===s.nodeType&&nc(s)&&(o=!1,t="LI"===s.nodeName.toUpperCase(),n="listitem"===(e=Xs(e)),t||n||i.push(s),t&&!n&&(l.push(s),u.includes(e)||u.push(e)),n)&&(a=!0)})),r||i.length)this.relatedNodes(i);else{if(o||a)return!1;this.relatedNodes(l),this.data({messageKey:"roleNotValid",roles:u.join(", ")})}return!0},"p-as-heading-evaluate":function(e,t,n){var r=(i=Array.from(e.parentNode.children)).indexOf(e),a=(t=t||{}).margins||[],o=i.slice(r+1).find((function(e){return"P"===e.nodeName.toUpperCase()})),i=i.slice(0,r).reverse().find((function(e){return"P"===e.nodeName.toUpperCase()})),l=(r=Fh(e),o?Fh(o):null),u=(i=i?Fh(i):null,t.passLength);return t=t.failLength,e=e.textContent.trim().length,(o=null==o?void 0:o.textContent.trim().length)*u<e||!l||!Ch(r,l,a)||!!((u=Bl(n,"blockquote"))&&"BLOCKQUOTE"===u.nodeName.toUpperCase()||i&&!Ch(r,i,a)||o*t<e)&&void 0},"p-as-heading-matches":function(e){var t=Array.from(e.parentNode.childNodes),n=e.textContent.trim();return!(0===n.length||2<=(n.match(/[.!?:;](?![.!?:;])/g)||[]).length)&&0!==t.slice(t.indexOf(e)+1).filter((function(e){return"P"===e.nodeName.toUpperCase()&&""!==e.textContent.trim()})).length},"page-no-duplicate-after":function(e){return e.filter((function(e){return"ignored"!==e.data}))},"page-no-duplicate-evaluate":function(e,t,n){if(!t||!t.selector||"string"!=typeof t.selector)throw new TypeError("page-no-duplicate requires options.selector to be a string");var r="page-no-duplicate;"+t.selector;if(!Sl.get(r))return Sl.set(r,!0),r=rm(o._tree[0],t.selector,nc),"string"==typeof t.nativeScopeFilter&&(r=r.filter((function(e){return e.actualNode.hasAttribute("role")||!Bl(e,t.nativeScopeFilter)}))),"string"==typeof t.role&&(r=r.filter((function(e){return Xs(e)===t.role}))),this.relatedNodes(r.filter((function(e){return e!==n})).map((function(e){return e.actualNode}))),r.length<=1;this.data("ignored")},"presentation-role-conflict-matches":function(e,t){return null!==Ws(t,{chromiumRoles:!0})},"presentational-role-evaluate":function(e,t,n){var r=ys(n);if(["presentation","none"].includes(r)&&["iframe","frame"].includes(n.props.nodeName)&&n.hasAttr("title"))this.data({messageKey:"iframe",nodeName:n.props.nodeName});else{var a,o=Xs(n);if(["presentation","none"].includes(o))return this.data({role:o}),!0;["presentation","none"].includes(r)&&(r=ws().some((function(e){return n.hasAttr(e)})),a=rs(n),this.data({messageKey:r&&!a?"globalAria":!r&&a?"focusable":"both",role:o}))}return!1},"region-after":function(e){var t=e.filter((function(e){return e.data.isIframe}));return e.forEach((function(e){if(!e.result&&1!==e.node.ancestry.length){var n,r=e.node.ancestry.slice(0,-1),a=K(t);try{for(a.s();!(n=a.n()).done;){var o=n.value;if(Gf(r,o.node.ancestry)){e.result=o.result;break}}}catch(e){a.e(e)}finally{a.f()}}})),t.forEach((function(e){e.result||(e.result=!0)})),e},"region-evaluate":function(e,t,n){return this.data({isIframe:["iframe","frame"].includes(n.props.nodeName)}),!Sl.get("regionlessNodes",(function(){return function e(t,n){var a=t.actualNode;if("button"===Xs(t)||function(e,t){var n=e.actualNode,r=Xs(e),a=(n=(n.getAttribute("aria-live")||"").toLowerCase().trim(),eh("landmark"));return!!(["assertive","polite"].includes(n)||Ah.includes(r)||a.includes(r)||t.regionMatcher&&Hs(e,t.regionMatcher))}(t,n)||["iframe","frame"].includes(t.props.nodeName)||bd(t.actualNode)&&Xu(t.actualNode,"href")||!nc(a)){for(var o=t;o;)o._hasRegionDescendant=!0,o=o.parent;return["iframe","frame"].includes(t.props.nodeName)?[t]:[]}return a!==r.body&&Wc(a,!0)&&!function(e){return["none","presentation"].includes(Xs(e))&&!Hc(e)}(t)?[t]:t.children.filter((function(e){return 1===(e=e.actualNode).nodeType})).map((function(t){return e(t,n)})).reduce((function(e,t){return e.concat(t)}),[])}(o._tree[0],t).map((function(e){for(;e.parent&&!e.parent._hasRegionDescendant&&e.parent.actualNode!==r.body;)e=e.parent;return e})).filter((function(e,t,n){return n.indexOf(e)===t}))})).includes(n)},"same-caption-summary-evaluate":function(e,t,n){var r;if(void 0!==n.children)return r=n.attr("summary"),!(!(n=!!(n=n.children.find(xh))&&Ns(bc(n)))||!r)&&Ns(r).toLowerCase()===Ns(n).toLowerCase()},"scope-value-evaluate":function(e,t){return e=e.getAttribute("scope").toLowerCase(),-1!==t.values.indexOf(e)},"scrollable-region-focusable-matches":function(e,t){return void 0!==Cf(e,13)&&!1===sh(t)&&fm(t,"*").some((function(e){return Uc(e,!0,!0)}))},"skip-link-evaluate":function(e){return!!(e=Xu(e,"href"))&&(nc(e)||void 0)},"skip-link-matches":function(e){return bd(e)&&su(e)},"structured-dlitems-evaluate":function(e,t,n){var r=n.children;if(!r||!r.length)return!1;for(var a,o=!1,i=!1,l=0;l<r.length;l++){if((o="DT"===(a=r[l].props.nodeName.toUpperCase())||o)&&"DD"===a)return!1;"DD"===a&&(i=!0)}return o||i},"summary-interactive-matches":function(e,t){var n,r,a=t.parent;return!("details"!==a.props.nodeName||(r=null==(r=(n=t).actualNode)?void 0:r.parentElement)&&r!==n.parent.actualNode)&&a.children.find((function(e){return"summary"===e.props.nodeName}))===t},"svg-namespace-matches":Pg,"svg-non-empty-title-evaluate":function(e,t,n){if(n.children){if(n=n.children.find((function(e){return"title"===e.props.nodeName})),!n)return this.data({messageKey:"noTitle"}),!1;try{if(""===bc(n,{includeHidden:!0}).trim())return this.data({messageKey:"emptyTitle"}),!1}catch(e){return}return!0}},"tabindex-evaluate":function(e,t,n){return null===(n=Zf(n.attr("tabindex")))||n<=0},"table-or-grid-role-matches":function(e,t){return t=Xs(t),["treegrid","grid","table"].includes(t)},"target-offset-evaluate":function(e,t,n){var r=(null==t?void 0:t.minOffset)||24;if(yu(10*r,n.boundingClientRect))return this.data({messageKey:"large",minOffset:r}),!0;var a,o,i=[],l=r,u=K(Lu(n,r));try{for(u.s();!(a=u.n()).done;){var s=a.value;if("widget"===ed(s)&&rs(s)){var c=null;try{c=Du(n,s,r/2)}catch(e){if(e.message.startsWith("splitRects"))return void this.data({messageKey:"tooManyRects",closestOffset:0,minOffset:r});throw e}null===c||r<=.05+(c=2*(o=c,Math.round(10*o)/10))||(l=Math.min(l,c),i.push(s))}}}catch(e){u.e(e)}finally{u.f()}return 0===i.length?(this.data({closestOffset:l,minOffset:r}),!0):(this.relatedNodes(i.map((function(e){return e.actualNode}))),i.some(as)?(this.data({closestOffset:l,minOffset:r}),!as(n)&&void 0):void this.data({messageKey:"nonTabbableNeighbor",closestOffset:l,minOffset:r}))},"target-size-evaluate":function(e,t,n){t=(null==t?void 0:t.minSize)||24;var r,a,o,i,l,u,s=n.boundingClientRect;return yu(10*t,s)?(this.data({messageKey:"large",minSize:t}),!0):(l=yu.bind(null,t),i=Lu(n),a=n,r=i.filter((function(e){return!pg(e,a)&&mg(a,e)})),o=(i=((e,t)=>{var n,r=[],a=[],o=K(t);try{for(o.s();!(n=o.n()).done;){var i=n.value;!mg(e,i)&&xu(e,i)&&"none"!==i.getComputedStylePropertyValue("pointer-events")&&(pg(e,i)?r:a).push(i)}}catch(e){o.e(e)}finally{o.f()}return{fullyObscuringElms:r,partialObscuringElms:a}})(n,i)).fullyObscuringElms,i=i.partialObscuringElms,!r.length||!o.length&&l(s)?o.length?(this.relatedNodes(hg(o)),this.data({messageKey:"obscured"}),!0):(o=!as(n)&&void 0,l(s)?(i=i.filter((function(e){return"widget"===ed(e)&&rs(e)}))).length?(n=((e,t)=>{var n;e=e.boundingClientRect,t=t.map((function(e){return e.boundingClientRect}));try{n=Eu(e,t)}catch(e){return null}var r=void 0;return n.reduce((function(e,t){var n=yu(r,e);return n!==yu(r,t)?n?e:t:(n=e.width*e.height,t.width*t.height<n?e:t)}))})(n,i))?l(n)?(this.data(O({minSize:t},fg(n||s))),this.relatedNodes(hg(i)),!0):r.length?(this.data({minSize:t,messageKey:"contentOverflow"}),void this.relatedNodes(hg(r))):(l=i.every(as),u="partiallyObscured".concat(l?"":"NonTabbable"),this.data(O({messageKey:u,minSize:t},fg(n))),this.relatedNodes(hg(i)),l?o:void 0):void this.data({minSize:t,messageKey:"tooManyRects"}):(this.data(O({minSize:t},fg(s))),!0):(this.data(O({minSize:t},fg(s))),o)):(this.data({minSize:t,messageKey:"contentOverflow"}),void this.relatedNodes(hg(r))))},"td-has-header-evaluate":function(e){var t=[],n=Lm(e),r=xs(e);return n.forEach((function(e){Wc(e)&&Vm(e)&&!dh(e)&&!zm(e,r).some((function(e){return null!==e&&!!Wc(e)}))&&t.push(e)})),!t.length||(this.relatedNodes(t),!1)},"td-headers-attr-evaluate":function(e){for(var t=[],n={},r=0;r<e.rows.length;r++)for(var a=e.rows[r],o=0;o<a.cells.length;o++){var i=a.cells[o],l=(t.push(i),i.getAttribute("id"));l&&(n[l]=Xs(i))}var u,s=F(F(F(F({},Dh,new Set),bh,new Set),yh,new Set),wh,new Set),c=(t.forEach((function(e){var t,r;e.hasAttribute("headers")&&nc(e)&&((t=e.getAttribute("headers").trim())?(r=e.getAttribute("id"),Yp(t).forEach((function(t){r&&t===r?s[Dh].add(e):n[t]?["columnheader","rowheader"].includes(n[t])||s[yh].add(e):s[bh].add(e)}))):s[wh].add(e))})),K(vh));try{for(c.s();!(u=c.n()).done;){var d=u.value;if(0<s[d].size)return this.relatedNodes(M(s[d])),d===wh?void 0:(this.data({messageKey:d}),!1)}}catch(e){c.e(e)}finally{c.f()}return!0},"th-has-data-cells-evaluate":function(e){var t=Lm(e),n=this,r=[],a=(t=(t.forEach((function(e){var t;(t=((t=e.getAttribute("headers"))&&(r=r.concat(t.split(/\\s+/))),e.getAttribute("aria-labelledby")))&&(r=r.concat(t.split(/\\s+/)))})),t.filter((function(e){return""!==Ns(e.textContent)&&("TH"===e.nodeName.toUpperCase()||-1!==["rowheader","columnheader"].indexOf(ys(e)))}))),xs(e)),o=!0;return t.forEach((function(e){var t,i;e.getAttribute("id")&&r.includes(e.getAttribute("id"))||(t=Es(e,a),i=!1,(i=!(i=Fs(e)?Hm("down",t,a).find((function(t){return!Fs(t)&&zm(t,a).includes(e)})):i)&&Cs(e)?Hm("right",t,a).find((function(t){return!Cs(t)&&zm(t,a).includes(e)})):i)||n.relatedNodes(e),o=o&&i)})),!!o||void 0},"title-only-evaluate":function(e,t,n){var r=Pc(n),a=Js(n);return n=n.attr("aria-describedby"),!(r||!a&&!n)},"unique-frame-title-after":function(e){var t={};return e.forEach((function(e){t[e.data]=void 0!==t[e.data]?++t[e.data]:0})),e.forEach((function(e){e.result=!!t[e.data]})),e},"unique-frame-title-evaluate":function(e,t,n){return n=Ns(n.attr("title")).toLowerCase(),this.data(n),!0},"unsupportedrole-evaluate":function(e,t,n){n=Xs(n,{dpub:!0,fallback:!0});var r=vs(n);return r&&this.data(n),r},"valid-lang-evaluate":function(e,t,n){var r=[];return t.attributes.forEach((function(e){var a,o,i=n.attr(e);"string"==typeof i&&(a=of(i),o=t.value?!t.value.map(of).includes(a):!Rm(a),""!==a&&o||""!==i&&!Ns(i))&&r.push(e+'="'+n.attr(e)+'"')})),!!r.length&&!("html"!==n.props.nodeName&&!Yc(n)||(this.data(r),0))},"valid-scrollable-semantics-evaluate":function(e,t){return(n=ys(n=e))&&(Rg[n]||t.roles.includes(n))||(t=(t=e).nodeName.toUpperCase(),kg[t])||!1;var n},"widget-not-inline-matches":function(e,t){return Ig.every((function(n){return n(e,t)}))},"window-is-top-matches":function(e){return e.ownerDocument.defaultView.self===e.ownerDocument.defaultView.top},"xml-lang-mismatch-evaluate":function(e,t,n){return of(n.attr("lang"))===of(n.attr("xml:lang"))},"xml-lang-mismatch-matches":function(e){var t=of(e.getAttribute("lang"));return e=of(e.getAttribute("xml:lang")),Rm(t)&&Rm(e)}},Gg=function(e){this.id=e.id,this.data=null,this.relatedNodes=[],this.result=null};function $g(e){if("string"!=typeof e)return e;if(Vg[e])return Vg[e];if(/^\\s*function[\\s\\w]*\\(/.test(e))return new Function("return "+e+";")();throw new ReferenceError("Function ID does not exist in the metadata-function-map: ".concat(e))}function Hg(e){return e=0<arguments.length&&void 0!==e?e:{},Array.isArray(e)||"object"!==a(e)?{value:e}:e}function Ug(e){e&&(this.id=e.id,this.configure(e))}Ug.prototype.enabled=!0,Ug.prototype.run=function(e,t,n,r,a){var o=((t=t||{}).hasOwnProperty("enabled")?t:this).enabled,i=this.getOptions(t.options);if(o){var l;o=new Gg(this),t=Id(o,t,r,a);try{l=this.evaluate.call(t,e.actualNode,i,e,n)}catch(t){return e&&e.actualNode&&(t.errorNode=Ip.toSpec(e)),void a(t)}t.isAsync||(o.result=l,r(o))}else r(null)},Ug.prototype.runSync=function(e,t,n){if(!(void 0===(a=(t=t||{}).enabled)?this.enabled:a))return null;var r,a=this.getOptions(t.options),o=new Gg(this);(t=Id(o,t)).async=function(){throw new Error("Cannot run async check while in a synchronous run")};try{r=this.evaluate.call(t,e.actualNode,a,e,n)}catch(t){throw e&&e.actualNode&&(t.errorNode=Ip.toSpec(e)),t}return o.result=r,o},Ug.prototype.configure=function(e){var t=this;e.evaluate&&!Vg[e.evaluate]||(this._internalCheck=!0),e.hasOwnProperty("enabled")&&(this.enabled=e.enabled),e.hasOwnProperty("options")&&(this._internalCheck?this.options=Hg(e.options):this.options=e.options),["evaluate","after"].filter((function(t){return e.hasOwnProperty(t)})).forEach((function(n){return t[n]=$g(e[n])}))},Ug.prototype.getOptions=function(e){return this._internalCheck?$p(this.options,Hg(e||{})):e||this.options};var Wg=Ug,Yg=function(e){this.id=e.id,this.result=oa.NA,this.pageLevel=e.pageLevel,this.impact=null,this.nodes=[]};function Kg(e,t){this._audit=t,this.id=e.id,this.selector=e.selector||"*",e.impact&&(xa(oa.impact.includes(e.impact),"Impact ".concat(e.impact," is not a valid impact")),this.impact=e.impact),this.excludeHidden="boolean"!=typeof e.excludeHidden||e.excludeHidden,this.enabled="boolean"!=typeof e.enabled||e.enabled,this.pageLevel="boolean"==typeof e.pageLevel&&e.pageLevel,this.reviewOnFail="boolean"==typeof e.reviewOnFail&&e.reviewOnFail,this.any=e.any||[],this.all=e.all||[],this.none=e.none||[],this.tags=e.tags||[],this.preload=!!e.preload,this.actIds=e.actIds,e.matches&&(this.matches=$g(e.matches))}function Xg(e){var t,n;if(e.length)return t=!1,n={},e.forEach((function(e){var r=e.results.filter((function(e){return e}));(n[e.type]=r).length&&(t=!0)})),t?n:null}Kg.prototype.matches=function(){return!0},Kg.prototype.gather=function(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},n="mark_gather_start_"+this.id,r="mark_gather_end_"+this.id,a="mark_isVisibleToScreenReaders_start_"+this.id,o="mark_isVisibleToScreenReaders_end_"+this.id;t.performanceTimer&&Qf.mark(n),e=bm(this.selector,e);return this.excludeHidden&&(t.performanceTimer&&Qf.mark(a),e=e.filter(nc),t.performanceTimer)&&(Qf.mark(o),Qf.measure("rule_"+this.id+"#gather_axe.utils.isVisibleToScreenReaders",a,o)),t.performanceTimer&&(Qf.mark(r),Qf.measure("rule_"+this.id+"#gather",n,r)),e},Kg.prototype.runChecks=function(e,t,n,r,a,o){var i=this,l=Qd();this[e].forEach((function(e){var a=i._audit.checks[e.id||e],o=gf(a,i.id,n);l.defer((function(e,n){a.run(t,o,r,e,(function(e){n(new wm({ruleId:i.id,method:"".concat(a.id,"#evaluate"),errorNode:new Pd(t),error:e}))}))}))})),l.then((function(t){t=t.filter((function(e){return e})),a({type:e,results:t})})).catch(o)},Kg.prototype.runChecksSync=function(e,t,n,r){var a=this,o=[];return this[e].forEach((function(e){e=a._audit.checks[e.id||e];var i=gf(e,a.id,n);o.push(e.runSync(t,i,r))})),{type:e,results:o=o.filter((function(e){return e}))}},Kg.prototype.run=function(e){var t,n=this,r=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},a=2<arguments.length?arguments[2]:void 0,o=3<arguments.length?arguments[3]:void 0,i=(r.performanceTimer&&this._trackPerformance(),Qd()),l=new Yg(this);try{t=this.gatherAndMatchNodes(e,r)}catch(t){return void o(t)}r.performanceTimer&&this._logGatherPerformance(t),t.forEach((function(t){i.defer((function(a,o){var i=Qd();["any","all","none"].forEach((function(a){i.defer((function(o,i){n.runChecks(a,t,r,e,o,i)}))})),i.then((function(e){var r=Xg(e);r&&(r.node=new Pd(t),l.nodes.push(r),n.reviewOnFail)&&(["any","all"].forEach((function(e){r[e].forEach((function(e){!1===e.result&&(e.result=void 0)}))})),r.none.forEach((function(e){!0===e.result&&(e.result=void 0)}))),a()})).catch((function(e){return o(e)}))}))})),i.then((function(){r.performanceTimer&&n._logRulePerformance(),setTimeout((function(){a(l)}),0)})).catch((function(e){r.performanceTimer&&n._logRulePerformance(),o(e)}))},Kg.prototype.runSync=function(e){var t=this,n=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},r=(n.performanceTimer&&this._trackPerformance(),new Yg(this)),a=this.gatherAndMatchNodes(e,n);return n.performanceTimer&&this._logGatherPerformance(a),a.forEach((function(a){var o=[],i=(["any","all","none"].forEach((function(r){o.push(t.runChecksSync(r,a,n,e))})),Xg(o));i&&(i.node=a.actualNode?new Pd(a):null,r.nodes.push(i),t.reviewOnFail)&&(["any","all"].forEach((function(e){i[e].forEach((function(e){!1===e.result&&(e.result=void 0)}))})),i.none.forEach((function(e){!0===e.result&&(e.result=void 0)})))})),n.performanceTimer&&this._logRulePerformance(),r},Kg.prototype._trackPerformance=function(){this._markStart="mark_rule_start_"+this.id,this._markEnd="mark_rule_end_"+this.id,this._markChecksStart="mark_runchecks_start_"+this.id,this._markChecksEnd="mark_runchecks_end_"+this.id},Kg.prototype._logGatherPerformance=function(e){ia("gather for ".concat(this.id," (").concat(e.length," nodes): ").concat(Qf.timeElapsed(),"ms")),Qf.mark(this._markChecksStart)},Kg.prototype._logRulePerformance=function(){Qf.mark(this._markChecksEnd),Qf.mark(this._markEnd),Qf.measure("runchecks_"+this.id,this._markChecksStart,this._markChecksEnd),Qf.measure("rule_"+this.id,this._markStart,this._markEnd)},Kg.prototype.gatherAndMatchNodes=function(e,t){var n=this,r="mark_matches_start_"+this.id,a="mark_matches_end_"+this.id,o=this.gather(e,t);return t.performanceTimer&&Qf.mark(r),o=o.filter((function(t){try{return n.matches(t.actualNode,t,e)}catch(e){throw new wm({ruleId:n.id,method:"#matches",errorNode:new Pd(t),error:e})}})),t.performanceTimer&&(Qf.mark(a),Qf.measure("rule_"+this.id+"#matches",r,a)),o},Kg.prototype.after=function(e,t){var n,r,a,o,i=this;return Bp(n=this).map((function(e){return(e=n._audit.checks[e.id||e])&&"function"==typeof e.after?e:null})).filter(Boolean).forEach((function(n){l=e.nodes,r=n.id,a=[],l.forEach((function(e){Bp(e).forEach((function(t){t.id===r&&(t.node=e.node,a.push(t))}))}));var r,a,o,l=a,u=gf(n,i.id,t);try{o=n.after(l,u.options)}catch(l){throw new wm({ruleId:i.id,method:"".concat(n.id,"#after"),errorNode:null==(u=e.nodes)||null==(u=u[0])?void 0:u.node,error:l})}i.reviewOnFail&&o.forEach((function(e){var t=(i.any.includes(e.id)||i.all.includes(e.id))&&!1===e.result,n=i.none.includes(e.id)&&!0===e.result;(t||n)&&(e.result=void 0)})),l.forEach((function(e){delete e.node,-1===o.indexOf(e)&&(e.filtered=!0)}))})),e.nodes=(a=["any","all","none"],o=(r=e).nodes.filter((function(e){var t=0;return a.forEach((function(n){e[n]=e[n].filter((function(e){return!0!==e.filtered})),t+=e[n].length})),0<t})),o=r.pageLevel&&o.length?[o.reduce((function(e,t){if(e)return a.forEach((function(n){e[n].push.apply(e[n],t[n])})),e}))]:o),e},Kg.prototype.configure=function(e){e.hasOwnProperty("selector")&&(this.selector=e.selector),e.hasOwnProperty("excludeHidden")&&(this.excludeHidden="boolean"!=typeof e.excludeHidden||e.excludeHidden),e.hasOwnProperty("enabled")&&(this.enabled="boolean"!=typeof e.enabled||e.enabled),e.hasOwnProperty("pageLevel")&&(this.pageLevel="boolean"==typeof e.pageLevel&&e.pageLevel),e.hasOwnProperty("reviewOnFail")&&(this.reviewOnFail="boolean"==typeof e.reviewOnFail&&e.reviewOnFail),e.hasOwnProperty("any")&&(this.any=e.any),e.hasOwnProperty("all")&&(this.all=e.all),e.hasOwnProperty("none")&&(this.none=e.none),e.hasOwnProperty("tags")&&(this.tags=e.tags),e.hasOwnProperty("actIds")&&(this.actIds=e.actIds),e.hasOwnProperty("matches")&&(this.matches=$g(e.matches)),e.impact&&(xa(oa.impact.includes(e.impact),"Impact ".concat(e.impact," is not a valid impact")),this.impact=e.impact)};var Zg=/\\{\\{.+?\\}\\}/g,Jg=W((function e(t){H(this,e),this.lang="en",this.defaultConfig=t,this.standards=gs,this._init(),this._defaultLocale=null}),[{key:"_setDefaultLocale",value:function(){if(!this._defaultLocale){for(var e={checks:{},rules:{},failureSummaries:{},incompleteFallbackMessage:"",lang:this.lang},t=Object.keys(this.data.checks),n=0;n<t.length;n++){var r=t[n],a=this.data.checks[r].messages,o=a.pass;e.checks[r]={pass:o,fail:a.fail,incomplete:a.incomplete}}for(var i=Object.keys(this.data.rules),l=0;l<i.length;l++){var u=i[l],s=this.data.rules[u],c=s.description;e.rules[u]={description:c,help:s.help}}for(var d=Object.keys(this.data.failureSummaries),p=0;p<d.length;p++){var f=d[p],m=this.data.failureSummaries[f].failureMessage;e.failureSummaries[f]={failureMessage:m}}e.incompleteFallbackMessage=this.data.incompleteFallbackMessage,this._defaultLocale=e}}},{key:"_resetLocale",value:function(){var e=this._defaultLocale;e&&this.applyLocale(e)}},{key:"_applyCheckLocale",value:function(e){for(var t=Object.keys(e),n=0;n<t.length;n++){var r=t[n];if(!this.data.checks[r])throw new Error('Locale provided for unknown check: "'.concat(r,'"'));this.data.checks[r]=tv(this.data.checks[r],e[r])}}},{key:"_applyRuleLocale",value:function(e){for(var t=Object.keys(e),n=0;n<t.length;n++){var r=t[n];if(!this.data.rules[r])throw new Error('Locale provided for unknown rule: "'.concat(r,'"'));this.data.rules[r]=nv(this.data.rules[r],e[r])}}},{key:"_applyFailureSummaries",value:function(e){for(var t=Object.keys(e),n=0;n<t.length;n++){var r=t[n];if(!this.data.failureSummaries[r])throw new Error('Locale provided for unknown failureMessage: "'.concat(r,'"'));this.data.failureSummaries[r]=rv(this.data.failureSummaries[r],e[r])}}},{key:"applyLocale",value:function(e){this._setDefaultLocale(),e.checks&&this._applyCheckLocale(e.checks),e.rules&&this._applyRuleLocale(e.rules),e.failureSummaries&&this._applyFailureSummaries(e.failureSummaries,"failureSummaries"),e.incompleteFallbackMessage&&(this.data.incompleteFallbackMessage=av(this.data.incompleteFallbackMessage,e.incompleteFallbackMessage)),e.lang&&(this.lang=e.lang)}},{key:"setAllowedOrigins",value:function(e){var t,n=Qg(),r=(this.allowedOrigins=[],K(e));try{for(r.s();!(t=r.n()).done;){var a=t.value;if(a===oa.allOrigins)return void(this.allowedOrigins=["*"]);a!==oa.sameOrigin?this.allowedOrigins.push(a):n&&this.allowedOrigins.push(n)}}catch(e){r.e(e)}finally{r.f()}}},{key:"_init",value:function(){var e=(e=>{var t;return e?(t=Bd(e)).commons=e.commons:t={},t.reporter=t.reporter||null,t.noHtml=t.noHtml||!1,t.allowedOrigins||(e=Qg(),t.allowedOrigins=e?[e]:[]),t.rules=t.rules||[],t.checks=t.checks||[],t.data=O({checks:{},rules:{}},t.data),t})(this.defaultConfig);this.lang=e.lang||"en",this.reporter=e.reporter,this.commands={},this.rules=[],this.checks={},this.brand="axe",this.application="axeAPI",this.tagExclude=["experimental","deprecated"],this.noHtml=e.noHtml,this.allowedOrigins=e.allowedOrigins,ev(e.rules,this,"addRule"),ev(e.checks,this,"addCheck"),this.data={},this.data.checks=e.data&&e.data.checks||{},this.data.rules=e.data&&e.data.rules||{},this.data.failureSummaries=e.data&&e.data.failureSummaries||{},this.data.incompleteFallbackMessage=e.data&&e.data.incompleteFallbackMessage||"",this._constructHelpUrls()}},{key:"registerCommand",value:function(e){this.commands[e.id]=e.callback}},{key:"addRule",value:function(e){e.metadata&&(this.data.rules[e.id]=e.metadata);var t=this.getRule(e.id);t?t.configure(e):this.rules.push(new Kg(e,this))}},{key:"addCheck",value:function(e){var t=e.metadata;"object"===a(t)&&(this.data.checks[e.id]=t,"object"===a(t.messages))&&Object.keys(t.messages).filter((function(e){return t.messages.hasOwnProperty(e)&&"string"==typeof t.messages[e]})).forEach((function(e){0===t.messages[e].indexOf("function")&&(t.messages[e]=new Function("return "+t.messages[e]+";")())})),this.checks[e.id]?this.checks[e.id].configure(e):this.checks[e.id]=new Wg(e)}},{key:"run",value:function(e,t,n,r){this.normalizeOptions(t),Pd.setRunOptions(t),o._selectCache=[],l=this.rules,a=e,i=t;var a,i,l=l.reduce((function(e,t){return hm(t,a,i)&&(t.preload?e.later:e.now).push(t),e}),{now:[],later:[]}),u=l.now,s=l.later,c=Qd();u.forEach((function(n){c.defer(ov(n,e,t))})),l=Qd();(u=(s.length&&l.defer((function(e){um(t).then((function(t){return e(t)})).catch((function(t){console.warn("Couldn't load preload assets: ",t),e(void 0)}))})),Qd())).defer(c),u.defer(l),u.then((function(a){var i,l=a.pop(),u=(l&&l.length&&(l=l[0])&&(e=O({},e,l)),a[0]);s.length?(i=Qd(),s.forEach((function(n){n=ov(n,e,t),i.defer(n)})),i.then((function(e){o._selectCache=void 0,n(u.concat(e).filter((function(e){return!!e})))})).catch(r)):(o._selectCache=void 0,n(u.filter((function(e){return!!e}))))})).catch(r)}},{key:"after",value:function(e,t){var n=this.rules;return e.map((function(e){if(e.error)return e;var r=jp(n,"id",e.id);if(!r)throw new Error("Result for unknown rule. You may be running mismatch axe-core versions");try{return r.after(e,t)}catch(e){if(t.debug)throw e;return iv(r,e)}}))}},{key:"getRule",value:function(e){return this.rules.find((function(t){return t.id===e}))}},{key:"normalizeOptions",value:function(e){var t=[],n=[];if(this.rules.forEach((function(e){n.push(e.id),e.tags.forEach((function(e){t.includes(e)||t.push(e)}))})),["object","string"].includes(a(e.runOnly))){if("string"==typeof e.runOnly&&(e.runOnly=[e.runOnly]),Array.isArray(e.runOnly)){var r=e.runOnly.find((function(e){return t.includes(e)})),i=e.runOnly.find((function(e){return n.includes(e)}));if(r&&i)throw new Error("runOnly cannot be both rules and tags");e.runOnly=i?{type:"rule",values:e.runOnly}:{type:"tag",values:e.runOnly}}if((r=e.runOnly).value&&!r.values&&(r.values=r.value,delete r.value),!Array.isArray(r.values)||0===r.values.length)throw new Error("runOnly.values must be a non-empty array");if(["rule","rules"].includes(r.type))r.type="rule",r.values.forEach((function(e){if(!n.includes(e))throw new Error("unknown rule \`"+e+"\` in options.runOnly")}));else{if(!["tag","tags",void 0].includes(r.type))throw new Error("Unknown runOnly type '".concat(r.type,"'"));r.type="tag",i=r.values.filter((function(e){return!t.includes(e)&&!/wcag2[1-3]a{1,3}/.test(e)})),0!==i.length&&o.log("Could not find tags \`"+i.join("\`, \`")+"\`")}}return"object"===a(e.rules)&&Object.keys(e.rules).forEach((function(e){if(!n.includes(e))throw new Error("unknown rule \`"+e+"\` in options.rules")})),e}},{key:"setBranding",value:function(e){var t={brand:this.brand,application:this.application};"string"==typeof e&&(this.application=e),e&&e.hasOwnProperty("brand")&&e.brand&&"string"==typeof e.brand&&(this.brand=e.brand),e&&e.hasOwnProperty("application")&&e.application&&"string"==typeof e.application&&(this.application=e.application),this._constructHelpUrls(t)}},{key:"_constructHelpUrls",value:function(){var e=this,t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:null,n=(o.version.match(/^[1-9][0-9]*\\.[0-9]+/)||["x.y"])[0];this.rules.forEach((function(r){e.data.rules[r.id]||(e.data.rules[r.id]={});var a=e.data.rules[r.id];("string"!=typeof a.helpUrl||t&&a.helpUrl===lv(t,r.id,n))&&(a.helpUrl=lv(e,r.id,n))}))}},{key:"resetRulesAndChecks",value:function(){this._init(),this._resetLocale()}}]);function Qg(){return t.origin&&"null"!==t.origin?t.origin:t.location&&t.location.origin&&"null"!==t.location.origin?t.location.origin:void 0}function ev(e,t,n){for(var r=0,a=e.length;r<a;r++)t[n](e[r])}var tv=function(e,t){var n=t.pass,r=t.fail;return"string"==typeof n&&Zg.test(n)&&(n=Oa.default.compile(n)),"string"==typeof r&&Zg.test(r)&&(r=Oa.default.compile(r)),O({},e,{messages:{pass:n||e.messages.pass,fail:r||e.messages.fail,incomplete:"object"===a(e.messages.incomplete)?O({},e.messages.incomplete,t.incomplete):t.incomplete}})},nv=function(e,t){var n=t.help;t=t.description;return"string"==typeof n&&Zg.test(n)&&(n=Oa.default.compile(n)),"string"==typeof t&&Zg.test(t)&&(t=Oa.default.compile(t)),O({},e,{help:n||e.help,description:t||e.description})},rv=function(e,t){return O({},e,{failureMessage:(t="string"==typeof(t=t.failureMessage)&&Zg.test(t)?Oa.default.compile(t):t)||e.failureMessage})},av=function(e,t){return(t="string"==typeof t&&Zg.test(t)?Oa.default.compile(t):t)||e};function ov(e,t,n){return n.performanceTimer&&Qf.mark("mark_rule_start_"+e.id),function(r,a){e.run(t,n,(function(e){return r(e)}),(function(t){n.debug?a(t):r(iv(e,t))}))}}function iv(e,t){var n=t.errorNode,a=[{id:"error-occurred",result:void 0,data:t=ym(t),relatedNodes:[]}];n=n||new Pd(r.documentElement);return Object.assign(new Yg(e),{error:t,result:oa.CANTTELL,nodes:[{any:[],all:[],none:a,node:n}]})}function lv(e,t,n){var r=e.brand,a=e.application;e=e.lang;return oa.helpUrlBase+r+"/"+(n||o.version.substring(0,o.version.lastIndexOf(".")))+"/"+t+"?application="+encodeURIComponent(a)+(e&&"en"!==e?"&lang="+encodeURIComponent(e):"")}function uv(e){var n=t&&"Node"in t&&"NodeList"in t,a=!!r;if(!n||!a){if(!e||!e.ownerDocument)throw new Error('Required "window" or "document" globals not defined and cannot be deduced from the context. Either set the globals before running or pass in a valid Element.');a||(Sl.set("globalDocumentSet",!0),r=e.ownerDocument),n||(Sl.set("globalWindowSet",!0),t=r.defaultView)}}var sv=function(){Sl.get("globalDocumentSet")&&(Sl.set("globalDocumentSet",!1),r=null),Sl.get("globalWindowSet")&&(Sl.set("globalWindowSet",!1),t=null),o._memoizedFns.forEach((function(e){return e.clear()})),Sl.clear(),o._tree=void 0,o._selectorData=void 0,o._selectCache=void 0};function cv(e,t,n,r){try{e=new xf(e),o._tree=e.flatTree,o._selectorData=wl(e.flatTree)}catch(a){return sv(),r(a)}var a=Qd(),i=o._audit;t.performanceTimer&&Qf.auditStart(),e.frames.length&&!1!==t.iframes&&a.defer((function(n,r){zp(e,t,"rules",null,n,r)})),a.defer((function(n,r){i.run(e,t,n,r)})),a.then((function(a){try{t.performanceTimer&&Qf.auditEnd();var o=qp(a.map((function(e){return{results:e}})));e.initiator&&(t.performanceTimer&&Qf.mark("auditAfterStart"),o=i.after(o,t),t.performanceTimer&&(Qf.mark("auditAfterEnd"),Qf.measure("audit.after","auditAfterStart","auditAfterEnd"),Qf.logMeasures("audit.after")),o.forEach(dm),o=o.map(va));try{n(o,sv)}catch(a){sv(),ia(a)}}catch(a){sv(),r(a)}})).catch((function(e){sv(),r(e)}))}function dv(e){this._run=e.run,this._collect=e.collect,this._registry={},e.commands.forEach((function(e){o._audit.registerCommand(e)}))}function pv(e){var t=(e=V(e,3))[0],n=e[1],i=(e=e[2],new TypeError("axe.run arguments are invalid"));if(!Mf(t)){if(void 0!==e)throw i;e=n,n=t,t=r}if("object"!==a(n)){if(void 0!==e)throw i;e=n,n={}}if("function"!=typeof e&&void 0!==e)throw i;return(n=Bd(n)).reporter=null!=(i=null!=(i=n.reporter)?i:null==(i=o._audit)?void 0:i.reporter)?i:"v1",{context:t,options:n,callback:e}}t.top!==t&&(Np.subscribe("axe.start",(function(e,t,n){function a(e){e instanceof Error==0&&(e=new Error(e)),n(e)}var i=n,l=e&&e.context||{},u=(l.hasOwnProperty("include")&&!l.include.length&&(l.include=[r]),e&&e.options||{});switch(e.command){case"rules":return cv(l,u,(function(e,t){e=Ip.mapRawResults(e),i(e),t()}),a);case"cleanup-plugin":return Mm(i,a);default:if(o._audit&&o._audit.commands&&o._audit.commands[e.command])return o._audit.commands[e.command](e,n)}})),Np.subscribe("axe.ping",(function(e,t,n){n({axe:!0})}))),dv.prototype.run=function(){return this._run.apply(this,arguments)},dv.prototype.collect=function(){return this._collect.apply(this,arguments)},dv.prototype.cleanup=function(e){var t=o.utils.queue(),n=this;Object.keys(this._registry).forEach((function(e){t.defer((function(t){n._registry[e].cleanup(t)}))})),t.then(e)},dv.prototype.add=function(e){this._registry[e.id]=e};var fv=function(){};var mv=function(e,t,n){if("function"==typeof t&&(n=t,t={}),!e||!Array.isArray(e))return n(e);n(e.map((function(e){for(var t=O({},e),n=0,r=["passes","violations","incomplete","inapplicable"];n<r.length;n++){var a=r[n];t[a]=Ip.mapRawNodeResults(t[a])}return t})))};No={base:{Audit:Jg,CheckResult:Gg,Check:Wg,Context:xf,RuleResult:Yg,Rule:Kg,metadataFunctionMap:Vg},public:{reporters:Pm},helpers:{failureSummary:lf,incompleteFallbackMessage:uf,processAggregate:cf},utils:{setDefaultFrameMessenger:kp,cacheNodeSelectors:ef,getNodesMatchingExpression:Xp,convertSelector:Hd},commons:{dom:{nativelyHidden:$l,displayHidden:Hl,visibilityHidden:Ul,contentVisibiltyHidden:Wl,ariaHidden:Yl,opacityHidden:Kl,scrollHidden:Xl,overflowHidden:Zl,clipHidden:Jl,areaHidden:Ql,detailsHidden:eu}}};o._thisWillBeDeletedDoNotUse=No,o.constants=oa,o.log=ia,o.AbstractVirtualNode=ua,o.SerialVirtualNode=Om,o.VirtualNode=Sd,o._cache=Sl,o.imports=Sa,o.cleanup=Mm,o.configure=function(e){var t=o._audit;if(!t)throw new Error("No audit configured");if(e.axeVersion||e.ver){var n=e.axeVersion||e.ver;if(!/^\\d+\\.\\d+\\.\\d+(-canary)?/.test(n))throw new Error("Invalid configured version ".concat(n));var r=(a=V(n.split("-"),2))[0],a=a[1],i=(r=V(r.split(".").map(Number),3))[0],l=r[1],u=(r=r[2],(s=V(o.version.split("-"),2))[0]),s=s[1],c=(u=V(u.split(".").map(Number),3))[0],d=u[1];u=u[2];if(i!==c||d<l||d===l&&u<r||i===c&&l===d&&r===u&&a&&a!==s)throw new Error("Configured version ".concat(n," is not compatible with current axe version ").concat(o.version))}if(e.reporter&&("function"==typeof e.reporter||Im(e.reporter))&&(t.reporter=e.reporter),e.checks){if(!Array.isArray(e.checks))throw new TypeError("Checks property must be an array");e.checks.forEach((function(e){if(!e.id)throw new TypeError("Configured check ".concat(JSON.stringify(e)," is invalid. Checks must be an object with at least an id property"));t.addCheck(e)}))}var p,f=[];if(e.rules){if(!Array.isArray(e.rules))throw new TypeError("Rules property must be an array");e.rules.forEach((function(e){if(!e.id)throw new TypeError("Configured rule ".concat(JSON.stringify(e)," is invalid. Rules must be an object with at least an id property"));f.push(e.id),t.addRule(e)}))}if(e.disableOtherRules&&t.rules.forEach((function(e){!1===f.includes(e.id)&&(e.enabled=!1)})),void 0!==e.branding?t.setBranding(e.branding):t._constructHelpUrls(),e.tagExclude&&(t.tagExclude=e.tagExclude),e.locale&&t.applyLocale(e.locale),e.standards&&(p=e.standards,Object.keys(hs).forEach((function(e){p[e]&&(hs[e]=$p(hs[e],p[e]))}))),e.noHtml&&(t.noHtml=!0),e.allowedOrigins){if(!Array.isArray(e.allowedOrigins))throw new TypeError("Allowed origins property must be an array");if(e.allowedOrigins.includes("*"))throw new Error('"*" is not allowed. Use "'.concat(oa.allOrigins,'" instead'));t.setAllowedOrigins(e.allowedOrigins)}},o.frameMessenger=function(e){Np.updateMessenger(e)},o.getRules=function(e){var t=(e=e||[]).length?o._audit.rules.filter((function(t){return!!e.filter((function(e){return-1!==t.tags.indexOf(e)})).length})):o._audit.rules,n=o._audit.data.rules||{};return t.map((function(e){var t=n[e.id]||{};return{ruleId:e.id,description:t.description,help:t.help,helpUrl:t.helpUrl,tags:e.tags,actIds:e.actIds}}))},o._load=function(e){o._audit=new Jg(e)},o.plugins={},o.registerPlugin=function(e){o.plugins[e.id]=new dv(e)},o.hasReporter=Im,o.getReporter=Bm,o.addReporter=function(e,t,n){Pm[e]=t,n&&(Tm=t)},o.reset=function(){var e=o._audit;if(!e)throw new Error("No audit configured");e.resetRulesAndChecks(),Object.keys(hs).forEach((function(e){hs[e]=ms[e]}))},o._runRules=cv,o.runVirtualRule=function(e,t){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:{},r=(n.reporter=n.reporter||o._audit.reporter||"v1",o._selectorData={},t instanceof ua||(t=new Om(t)),Af(e));if(r)return dm(r=(r=Object.create(r,{excludeHidden:{value:!1}})).runSync({initiator:!0,include:[t],exclude:[],frames:[],page:!1,focusable:!0,size:{},flatTree:[]},n)),va(r),(t=Da([r])).violations.forEach((function(e){return e.nodes.forEach((function(e){e.failureSummary=lf(e)}))})),O({},vf(),t,{toolOptions:n});throw new Error("unknown rule \`"+e+"\`")},o.run=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];uv(t[0]);var r=(c=pv(t)).context,a=c.options,i=void 0===(c=c.callback)?fv:c,l=(c=(e=>{var t,n,r;return"function"==typeof Promise&&e===fv?t=new Promise((function(e,t){n=t,r=e})):(r=function(t){return e(null,t)},n=function(t){return e(t)}),{thenable:t,reject:n,resolve:r}})(i)).thenable,u=c.resolve,s=c.reject;try{xa(o._audit,"No audit configured"),xa(!o._running,"Axe is already running. Use \`await axe.run()\` to wait for the previous run to finish before starting a new run.")}catch(e){var c=e;if("function"!=typeof i||i===fv)throw c;return void i(c.message)}return o._running=!0,a.performanceTimer&&Qf.start(),o._runRules(r,a,(function(e,t){function n(e){o._running=!1,t();try{s(e)}catch(e){o.log(e)}}try{a.performanceTimer&&Qf.mark("reporterStart");var r=e,i=a,l=function(e){a.performanceTimer&&(Qf.mark("reporterEnd"),Qf.measure("reporter","reporterStart","reporterEnd"),Qf.logMeasures("reporter"),Qf.end()),o._running=!1,t();try{u(e)}catch(e){o.log(e)}},c=n;void 0!==(r=Bm(i.reporter)(r,i,l,c))&&l(r)}catch(e){n(e)}}),(function(e){a.performanceTimer&&Qf.end(),o._running=!1,i(e),s(e)})),l},o.setup=function(e){if(o._tree)throw new Error("Axe is already setup. Call \`axe.teardown()\` before calling \`axe.setup\` again.");return uv(e=e&&"object"===a(e.documentElement)&&"object"===a(e.defaultView)?e.documentElement:e),o._tree=tf(e),o._selectorData=wl(o._tree),o._tree[0]},o.teardown=sv,o.runPartial=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=(a=pv(t)).options,a=a.context,i=(xa(o._audit,"Axe is not configured. Audit is missing."),xa(!o._running,"Axe is already running. Use \`await axe.run()\` to wait for the previous run to finish before starting a new run."),new xf(a,o._tree));return o._tree=i.flatTree,o._selectorData=wl(i.flatTree),o._running=!0,r.elementRef=!1,new Promise((function(e,t){o._audit.run(i,r,e,t)})).then((function(e){e=Ip.mapRawResults(e);var t,n=i.frames.map((function(e){return e=e.node,Ip.toSpec(e)}));return i.initiator&&(t=vf()),o._running=!1,sv(),{results:e,frames:n,environmentData:t}})).catch((function(e){return o._running=!1,sv(),Promise.reject(e)}))},o.finishRun=function(e){var t,n=Bd(n=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{}),r=(e.find((function(e){return e.environmentData}))||{}).environmentData;o._audit.normalizeOptions(n),n.reporter=null!=(p=null!=(p=n.reporter)?p:null==(p=o._audit)?void 0:p.reporter)?p:"v1";var a=[],i=K(p=e);try{for(i.s();!(t=i.n()).done;){var l,u=t.value,s=a.shift();u&&(u.frameSpec=null!=s?s:null,l=(e=>{var t=e.frames,n=e.frameSpec;return n?t.map((function(e){return Ip.mergeSpecs(e,n)})):t})(u),a.unshift.apply(a,M(l)))}}catch(e){i.e(e)}finally{i.f()}var c,d,p=qp(e);return(p=o._audit.after(p,n)).forEach(dm),p=p.map(va),c=p,d=O({environmentData:r},n),new Promise((function(e,t){Bm(d.reporter)(c,d,e,t)}))},o.commons=Cn,o.utils=sa,o.addReporter("na",(function(e,t,n){console.warn('"na" reporter will be deprecated in axe v4.0. Use the "v2" reporter instead.'),"function"==typeof t&&(n=t,t={});var r=t.environmentData,a=k(a=t,D);n(O({},vf(r),{toolOptions:a},cf(e,t)))})),o.addReporter("no-passes",(function(e,t,n){"function"==typeof t&&(n=t,t={});var r=t.environmentData,a=k(a=t,w);t.resultTypes=["violations"],e=cf(e,t).violations,n(O({},vf(r),{toolOptions:a,violations:e}))})),o.addReporter("rawEnv",(function(e,t,n){"function"==typeof t&&(n=t,t={});var r=t.environmentData;t=k(t,x),mv(e,t,(function(e){var t=vf(r);n({raw:e,env:t})}))})),o.addReporter("raw",mv),o.addReporter("v1",(function(e,t,n){function r(e){e.nodes.forEach((function(e){e.failureSummary=lf(e)}))}"function"==typeof t&&(n=t,t={});var a=t.environmentData,o=k(o=t,E);(e=cf(e,t)).incomplete.forEach(r),e.violations.forEach(r),n(O({},vf(a),{toolOptions:o},e))})),o.addReporter("v2",(function(e,t,n){"function"==typeof t&&(n=t,t={});var r=t.environmentData,a=k(a=t,A);e=cf(e,t),n(O({},vf(r),{toolOptions:a},e))}),!0),o._load({lang:"en",data:{rules:{accesskeys:{description:"Ensure every accesskey attribute value is unique",help:"accesskey attribute value should be unique"},"area-alt":{description:"Ensure <area> elements of image maps have alternative text",help:"Active <area> elements must have alternative text"},"aria-allowed-attr":{description:"Ensure an element's role supports its ARIA attributes",help:"Elements must only use supported ARIA attributes"},"aria-allowed-role":{description:"Ensure role attribute has an appropriate value for the element",help:"ARIA role should be appropriate for the element"},"aria-braille-equivalent":{description:"Ensure aria-braillelabel and aria-brailleroledescription have a non-braille equivalent",help:"aria-braille attributes must have a non-braille equivalent"},"aria-command-name":{description:"Ensure every ARIA button, link and menuitem has an accessible name",help:"ARIA commands must have an accessible name"},"aria-conditional-attr":{description:"Ensure ARIA attributes are used as described in the specification of the element's role",help:"ARIA attributes must be used as specified for the element's role"},"aria-deprecated-role":{description:"Ensure elements do not use deprecated roles",help:"Deprecated ARIA roles must not be used"},"aria-dialog-name":{description:"Ensure every ARIA dialog and alertdialog node has an accessible name",help:"ARIA dialog and alertdialog nodes should have an accessible name"},"aria-hidden-body":{description:'Ensure aria-hidden="true" is not present on the document body.',help:'aria-hidden="true" must not be present on the document body'},"aria-hidden-focus":{description:"Ensure aria-hidden elements are not focusable nor contain focusable elements",help:"ARIA hidden element must not be focusable or contain focusable elements"},"aria-input-field-name":{description:"Ensure every ARIA input field has an accessible name",help:"ARIA input fields must have an accessible name"},"aria-meter-name":{description:"Ensure every ARIA meter node has an accessible name",help:"ARIA meter nodes must have an accessible name"},"aria-progressbar-name":{description:"Ensure every ARIA progressbar node has an accessible name",help:"ARIA progressbar nodes must have an accessible name"},"aria-prohibited-attr":{description:"Ensure ARIA attributes are not prohibited for an element's role",help:"Elements must only use permitted ARIA attributes"},"aria-required-attr":{description:"Ensure elements with ARIA roles have all required ARIA attributes",help:"Required ARIA attributes must be provided"},"aria-required-children":{description:"Ensure elements with an ARIA role that require child roles contain them",help:"Certain ARIA roles must contain particular children"},"aria-required-parent":{description:"Ensure elements with an ARIA role that require parent roles are contained by them",help:"Certain ARIA roles must be contained by particular parents"},"aria-roledescription":{description:"Ensure aria-roledescription is only used on elements with an implicit or explicit role",help:"aria-roledescription must be on elements with a semantic role"},"aria-roles":{description:"Ensure all elements with a role attribute use a valid value",help:"ARIA roles used must conform to valid values"},"aria-text":{description:'Ensure role="text" is used on elements with no focusable descendants',help:'"role=text" should have no focusable descendants'},"aria-toggle-field-name":{description:"Ensure every ARIA toggle field has an accessible name",help:"ARIA toggle fields must have an accessible name"},"aria-tooltip-name":{description:"Ensure every ARIA tooltip node has an accessible name",help:"ARIA tooltip nodes must have an accessible name"},"aria-treeitem-name":{description:"Ensure every ARIA treeitem node has an accessible name",help:"ARIA treeitem nodes should have an accessible name"},"aria-valid-attr-value":{description:"Ensure all ARIA attributes have valid values",help:"ARIA attributes must conform to valid values"},"aria-valid-attr":{description:"Ensure attributes that begin with aria- are valid ARIA attributes",help:"ARIA attributes must conform to valid names"},"audio-caption":{description:"Ensure <audio> elements have captions",help:"<audio> elements must have a captions track"},"autocomplete-valid":{description:"Ensure the autocomplete attribute is correct and suitable for the form field",help:"autocomplete attribute must be used correctly"},"avoid-inline-spacing":{description:"Ensure that text spacing set through style attributes can be adjusted with custom stylesheets",help:"Inline text spacing must be adjustable with custom stylesheets"},blink:{description:"Ensure <blink> elements are not used",help:"<blink> elements are deprecated and must not be used"},"button-name":{description:"Ensure buttons have discernible text",help:"Buttons must have discernible text"},bypass:{description:"Ensure each page has at least one mechanism for a user to bypass navigation and jump straight to the content",help:"Page must have means to bypass repeated blocks"},"color-contrast-enhanced":{description:"Ensure the contrast between foreground and background colors meets WCAG 2 AAA enhanced contrast ratio thresholds",help:"Elements must meet enhanced color contrast ratio thresholds"},"color-contrast":{description:"Ensure the contrast between foreground and background colors meets WCAG 2 AA minimum contrast ratio thresholds",help:"Elements must meet minimum color contrast ratio thresholds"},"css-orientation-lock":{description:"Ensure content is not locked to any specific display orientation, and the content is operable in all display orientations",help:"CSS Media queries must not lock display orientation"},"definition-list":{description:"Ensure <dl> elements are structured correctly",help:"<dl> elements must only directly contain properly-ordered <dt> and <dd> groups, <script>, <template> or <div> elements"},dlitem:{description:"Ensure <dt> and <dd> elements are contained by a <dl>",help:"<dt> and <dd> elements must be contained by a <dl>"},"document-title":{description:"Ensure each HTML document contains a non-empty <title> element",help:"Documents must have <title> element to aid in navigation"},"duplicate-id-active":{description:"Ensure every id attribute value of active elements is unique",help:"IDs of active elements must be unique"},"duplicate-id-aria":{description:"Ensure every id attribute value used in ARIA and in labels is unique",help:"IDs used in ARIA and labels must be unique"},"duplicate-id":{description:"Ensure every id attribute value is unique",help:"id attribute value must be unique"},"empty-heading":{description:"Ensure headings have discernible text",help:"Headings should not be empty"},"empty-table-header":{description:"Ensure table headers have discernible text",help:"Table header text should not be empty"},"focus-order-semantics":{description:"Ensure elements in the focus order have a role appropriate for interactive content",help:"Elements in the focus order should have an appropriate role"},"form-field-multiple-labels":{description:"Ensure form field does not have multiple label elements",help:"Form field must not have multiple label elements"},"frame-focusable-content":{description:"Ensure <frame> and <iframe> elements with focusable content do not have tabindex=-1",help:"Frames with focusable content must not have tabindex=-1"},"frame-tested":{description:"Ensure <iframe> and <frame> elements contain the axe-core script",help:"Frames should be tested with axe-core"},"frame-title-unique":{description:"Ensure <iframe> and <frame> elements contain a unique title attribute",help:"Frames must have a unique title attribute"},"frame-title":{description:"Ensure <iframe> and <frame> elements have an accessible name",help:"Frames must have an accessible name"},"heading-order":{description:"Ensure the order of headings is semantically correct",help:"Heading levels should only increase by one"},"hidden-content":{description:"Inform users about hidden content.",help:"Hidden content on the page should be analyzed"},"html-has-lang":{description:"Ensure every HTML document has a lang attribute",help:"<html> element must have a lang attribute"},"html-lang-valid":{description:"Ensure the lang attribute of the <html> element has a valid value",help:"<html> element must have a valid value for the lang attribute"},"html-xml-lang-mismatch":{description:"Ensure that HTML elements with both valid lang and xml:lang attributes agree on the base language of the page",help:"HTML elements with lang and xml:lang must have the same base language"},"identical-links-same-purpose":{description:"Ensure that links with the same accessible name serve a similar purpose",help:"Links with the same name must have a similar purpose"},"image-alt":{description:"Ensure <img> elements have alternative text or a role of none or presentation",help:"Images must have alternative text"},"image-redundant-alt":{description:"Ensure image alternative is not repeated as text",help:"Alternative text of images should not be repeated as text"},"input-button-name":{description:"Ensure input buttons have discernible text",help:"Input buttons must have discernible text"},"input-image-alt":{description:'Ensure <input type="image"> elements have alternative text',help:"Image buttons must have alternative text"},"label-content-name-mismatch":{description:"Ensure that elements labelled through their content must have their visible text as part of their accessible name",help:"Elements must have their visible text as part of their accessible name"},"label-title-only":{description:"Ensure that every form element has a visible label and is not solely labeled using hidden labels, or the title or aria-describedby attributes",help:"Form elements should have a visible label"},label:{description:"Ensure every form element has a label",help:"Form elements must have labels"},"landmark-banner-is-top-level":{description:"Ensure the banner landmark is at top level",help:"Banner landmark should not be contained in another landmark"},"landmark-complementary-is-top-level":{description:"Ensure the complementary landmark or aside is at top level",help:"Aside should not be contained in another landmark"},"landmark-contentinfo-is-top-level":{description:"Ensure the contentinfo landmark is at top level",help:"Contentinfo landmark should not be contained in another landmark"},"landmark-main-is-top-level":{description:"Ensure the main landmark is at top level",help:"Main landmark should not be contained in another landmark"},"landmark-no-duplicate-banner":{description:"Ensure the document has at most one banner landmark",help:"Document should not have more than one banner landmark"},"landmark-no-duplicate-contentinfo":{description:"Ensure the document has at most one contentinfo landmark",help:"Document should not have more than one contentinfo landmark"},"landmark-no-duplicate-main":{description:"Ensure the document has at most one main landmark",help:"Document should not have more than one main landmark"},"landmark-one-main":{description:"Ensure the document has a main landmark",help:"Document should have one main landmark"},"landmark-unique":{description:"Ensure landmarks are unique",help:"Landmarks should have a unique role or role/label/title (i.e. accessible name) combination"},"link-in-text-block":{description:"Ensure links are distinguished from surrounding text in a way that does not rely on color",help:"Links must be distinguishable without relying on color"},"link-name":{description:"Ensure links have discernible text",help:"Links must have discernible text"},list:{description:"Ensure that lists are structured correctly",help:"<ul> and <ol> must only directly contain <li>, <script> or <template> elements"},listitem:{description:"Ensure <li> elements are used semantically",help:"<li> elements must be contained in a <ul> or <ol>"},marquee:{description:"Ensure <marquee> elements are not used",help:"<marquee> elements are deprecated and must not be used"},"meta-refresh-no-exceptions":{description:'Ensure <meta http-equiv="refresh"> is not used for delayed refresh',help:"Delayed refresh must not be used"},"meta-refresh":{description:'Ensure <meta http-equiv="refresh"> is not used for delayed refresh',help:"Delayed refresh under 20 hours must not be used"},"meta-viewport-large":{description:'Ensure <meta name="viewport"> can scale a significant amount',help:"Users should be able to zoom and scale the text up to 500%"},"meta-viewport":{description:'Ensure <meta name="viewport"> does not disable text scaling and zooming',help:"Zooming and scaling must not be disabled"},"nested-interactive":{description:"Ensure interactive controls are not nested as they are not always announced by screen readers or can cause focus problems for assistive technologies",help:"Interactive controls must not be nested"},"no-autoplay-audio":{description:"Ensure <video> or <audio> elements do not autoplay audio for more than 3 seconds without a control mechanism to stop or mute the audio",help:"<video> or <audio> elements must not play automatically"},"object-alt":{description:"Ensure <object> elements have alternative text",help:"<object> elements must have alternative text"},"p-as-heading":{description:"Ensure bold, italic text and font-size is not used to style <p> elements as a heading",help:"Styled <p> elements must not be used as headings"},"page-has-heading-one":{description:"Ensure that the page, or at least one of its frames contains a level-one heading",help:"Page should contain a level-one heading"},"presentation-role-conflict":{description:"Ensure elements marked as presentational do not have global ARIA or tabindex so that all screen readers ignore them",help:"Elements marked as presentational should be consistently ignored"},region:{description:"Ensure all page content is contained by landmarks",help:"All page content should be contained by landmarks"},"role-img-alt":{description:'Ensure [role="img"] elements have alternative text',help:'[role="img"] elements must have alternative text'},"scope-attr-valid":{description:"Ensure the scope attribute is used correctly on tables",help:"scope attribute should be used correctly"},"scrollable-region-focusable":{description:"Ensure elements that have scrollable content are accessible by keyboard",help:"Scrollable region must have keyboard access"},"select-name":{description:"Ensure select element has an accessible name",help:"Select element must have an accessible name"},"server-side-image-map":{description:"Ensure that server-side image maps are not used",help:"Server-side image maps must not be used"},"skip-link":{description:"Ensure all skip links have a focusable target",help:"The skip-link target should exist and be focusable"},"summary-name":{description:"Ensure summary elements have discernible text",help:"Summary elements must have discernible text"},"svg-img-alt":{description:"Ensure <svg> elements with an img, graphics-document or graphics-symbol role have accessible text",help:"<svg> elements with an img role must have alternative text"},tabindex:{description:"Ensure tabindex attribute values are not greater than 0",help:"Elements should not have tabindex greater than zero"},"table-duplicate-name":{description:"Ensure the <caption> element does not contain the same text as the summary attribute",help:"Tables should not have the same summary and caption"},"table-fake-caption":{description:"Ensure that tables with a caption use the <caption> element.",help:"Data or header cells must not be used to give caption to a data table."},"target-size":{description:"Ensure touch targets have sufficient size and space",help:"All touch targets must be 24px large, or leave sufficient space"},"td-has-header":{description:"Ensure that each non-empty data cell in a <table> larger than 3 by 3  has one or more table headers",help:"Non-empty <td> elements in larger <table> must have an associated table header"},"td-headers-attr":{description:"Ensure that each cell in a table that uses the headers attribute refers only to other <th> elements in that table",help:"Table cell headers attributes must refer to other <th> elements in the same table"},"th-has-data-cells":{description:"Ensure that <th> elements and elements with role=columnheader/rowheader have data cells they describe",help:"Table headers in a data table must refer to data cells"},"valid-lang":{description:"Ensure lang attributes have valid values",help:"lang attribute must have a valid value"},"video-caption":{description:"Ensure <video> elements have captions",help:"<video> elements must have captions"}},checks:{abstractrole:{impact:"serious",messages:{pass:"Abstract roles are not used",fail:{singular:"Abstract role cannot be directly used: \${data.values}",plural:"Abstract roles cannot be directly used: \${data.values}"}}},"aria-allowed-attr":{impact:"critical",messages:{pass:"ARIA attributes are used correctly for the defined role",fail:{singular:"ARIA attribute is not allowed: \${data.values}",plural:"ARIA attributes are not allowed: \${data.values}"},incomplete:"Check that there is no problem if the ARIA attribute is ignored on this element: \${data.values}"}},"aria-allowed-role":{impact:"minor",messages:{pass:"ARIA role is allowed for given element",fail:{singular:"ARIA role \${data.values} is not allowed for given element",plural:"ARIA roles \${data.values} are not allowed for given element"},incomplete:{singular:"ARIA role \${data.values} must be removed when the element is made visible, as it is not allowed for the element",plural:"ARIA roles \${data.values} must be removed when the element is made visible, as they are not allowed for the element"}}},"aria-busy":{impact:"serious",messages:{pass:"Element has an aria-busy attribute",fail:'Element uses aria-busy="true" while showing a loader'}},"aria-conditional-attr":{impact:"serious",messages:{pass:"ARIA attribute is allowed",fail:{checkbox:'Remove aria-checked, or set it to "\${data.checkState}" to match the real checkbox state',rowSingular:"This attribute is supported with treegrid rows, but not \${data.ownerRole}: \${data.invalidAttrs}",rowPlural:"These attributes are supported with treegrid rows, but not \${data.ownerRole}: \${data.invalidAttrs}"}}},"aria-errormessage":{impact:"critical",messages:{pass:"aria-errormessage exists and references elements visible to screen readers that use a supported aria-errormessage technique",fail:{singular:"aria-errormessage value \`\${data.values}\` must use a technique to announce the message (e.g., aria-live, aria-describedby, role=alert, etc.)",plural:"aria-errormessage values \`\${data.values}\` must use a technique to announce the message (e.g., aria-live, aria-describedby, role=alert, etc.)",hidden:"aria-errormessage value \`\${data.values}\` cannot reference a hidden element"},incomplete:{singular:"Ensure aria-errormessage value \`\${data.values}\` references an existing element",plural:"Ensure aria-errormessage values \`\${data.values}\` reference existing elements",idrefs:"Unable to determine if aria-errormessage element exists on the page: \${data.values}"}}},"aria-hidden-body":{impact:"critical",messages:{pass:"No aria-hidden attribute is present on document body",fail:"aria-hidden=true should not be present on the document body"}},"aria-level":{impact:"serious",messages:{pass:"aria-level values are valid",incomplete:"aria-level values greater than 6 are not supported in all screenreader and browser combinations"}},"aria-prohibited-attr":{impact:"serious",messages:{pass:"ARIA attribute is allowed",fail:{hasRolePlural:'\${data.prohibited} attributes cannot be used with role "\${data.role}".',hasRoleSingular:'\${data.prohibited} attribute cannot be used with role "\${data.role}".',noRolePlural:"\${data.prohibited} attributes cannot be used on a \${data.nodeName} with no valid role attribute.",noRoleSingular:"\${data.prohibited} attribute cannot be used on a \${data.nodeName} with no valid role attribute."},incomplete:{hasRoleSingular:'\${data.prohibited} attribute is not well supported with role "\${data.role}".',hasRolePlural:'\${data.prohibited} attributes are not well supported with role "\${data.role}".',noRoleSingular:"\${data.prohibited} attribute is not well supported on a \${data.nodeName} with no valid role attribute.",noRolePlural:"\${data.prohibited} attributes are not well supported on a \${data.nodeName} with no valid role attribute."}}},"aria-required-attr":{impact:"critical",messages:{pass:"All required ARIA attributes are present",fail:{singular:"Required ARIA attribute not present: \${data.values}",plural:"Required ARIA attributes not present: \${data.values}"}}},"aria-required-children":{impact:"critical",messages:{pass:{default:"Required ARIA children are present","aria-busy":"Element has an aria-busy attribute, so it is allowed to omit required children"},fail:{singular:"Required ARIA child role not present: \${data.values}",plural:"Required ARIA children role not present: \${data.values}",unallowed:"Element has children which are not allowed: \${data.values}"},incomplete:{singular:"Expecting ARIA child role to be added: \${data.values}",plural:"Expecting ARIA children role to be added: \${data.values}"}}},"aria-required-parent":{impact:"critical",messages:{pass:"Required ARIA parent role present",fail:{singular:"Required ARIA parent role not present: \${data.values}",plural:"Required ARIA parents role not present: \${data.values}"}}},"aria-roledescription":{impact:"serious",messages:{pass:"aria-roledescription used on a supported semantic role",incomplete:"Check that the aria-roledescription is announced by supported screen readers",fail:"Give the element a role that supports aria-roledescription"}},"aria-unsupported-attr":{impact:"critical",messages:{pass:"ARIA attribute is supported",fail:"ARIA attribute is not widely supported in screen readers and assistive technologies: \${data.values}"}},"aria-valid-attr-value":{impact:"critical",messages:{pass:"ARIA attribute values are valid",fail:{singular:"Invalid ARIA attribute value: \${data.values}",plural:"Invalid ARIA attribute values: \${data.values}"},incomplete:{noId:"ARIA attribute element ID does not exist on the page: \${data.needsReview}",noIdShadow:"ARIA attribute element ID does not exist on the page or is a descendant of a different shadow DOM tree: \${data.needsReview}",ariaCurrent:'ARIA attribute value is invalid and will be treated as "aria-current=true": \${data.needsReview}',idrefs:"Unable to determine if ARIA attribute element ID exists on the page: \${data.needsReview}",empty:"ARIA attribute value is ignored while empty: \${data.needsReview}",controlsWithinPopup:"Unable to determine if aria-controls referenced ID exists on the page while using aria-haspopup: \${data.needsReview}"}}},"aria-valid-attr":{impact:"critical",messages:{pass:"ARIA attribute name is valid",fail:{singular:"Invalid ARIA attribute name: \${data.values}",plural:"Invalid ARIA attribute names: \${data.values}"}}},"braille-label-equivalent":{impact:"serious",messages:{pass:"aria-braillelabel is used on an element with accessible text",fail:"aria-braillelabel is used on an element with no accessible text",incomplete:"Unable to compute accessible text"}},"braille-roledescription-equivalent":{impact:"serious",messages:{pass:"aria-brailleroledescription is used on an element with aria-roledescription",fail:{noRoleDescription:"aria-brailleroledescription is used on an element with no aria-roledescription",emptyRoleDescription:"aria-brailleroledescription is used on an element with an empty aria-roledescription"}}},deprecatedrole:{impact:"minor",messages:{pass:"ARIA role is not deprecated",fail:"The role used is deprecated: \${data}"}},fallbackrole:{impact:"serious",messages:{pass:"Only one role value used",fail:"Use only one role value, since fallback roles are not supported in older browsers",incomplete:"Use only role 'presentation' or 'none' since they are synonymous."}},"has-global-aria-attribute":{impact:"minor",messages:{pass:{singular:"Element has global ARIA attribute: \${data.values}",plural:"Element has global ARIA attributes: \${data.values}"},fail:"Element does not have global ARIA attribute"}},"has-widget-role":{impact:"minor",messages:{pass:"Element has a widget role.",fail:"Element does not have a widget role."}},invalidrole:{impact:"critical",messages:{pass:"ARIA role is valid",fail:{singular:"Role must be one of the valid ARIA roles: \${data.values}",plural:"Roles must be one of the valid ARIA roles: \${data.values}"}}},"is-element-focusable":{impact:"minor",messages:{pass:"Element is focusable.",fail:"Element is not focusable."}},"no-implicit-explicit-label":{impact:"serious",messages:{pass:"There is no mismatch between a <label> and accessible name",incomplete:"Check that the <label> does not need be part of the ARIA \${data} field's name"}},unsupportedrole:{impact:"critical",messages:{pass:"ARIA role is supported",fail:"The role used is not widely supported in screen readers and assistive technologies: \${data}"}},"valid-scrollable-semantics":{impact:"minor",messages:{pass:"Element has valid semantics for an element in the focus order.",fail:"Element has invalid semantics for an element in the focus order."}},"color-contrast-enhanced":{impact:"serious",messages:{pass:"Element has sufficient color contrast of \${data.contrastRatio}",fail:{default:"Element has insufficient color contrast of \${data.contrastRatio} (foreground color: \${data.fgColor}, background color: \${data.bgColor}, font size: \${data.fontSize}, font weight: \${data.fontWeight}). Expected contrast ratio of \${data.expectedContrastRatio}",fgOnShadowColor:"Element has insufficient color contrast of \${data.contrastRatio} between the foreground and shadow color (foreground color: \${data.fgColor}, text-shadow color: \${data.shadowColor}, font size: \${data.fontSize}, font weight: \${data.fontWeight}). Expected contrast ratio of \${data.expectedContrastRatio}",shadowOnBgColor:"Element has insufficient color contrast of \${data.contrastRatio} between the shadow color and background color (text-shadow color: \${data.shadowColor}, background color: \${data.bgColor}, font size: \${data.fontSize}, font weight: \${data.fontWeight}). Expected contrast ratio of \${data.expectedContrastRatio}"},incomplete:{default:"Unable to determine contrast ratio",bgImage:"Element's background color could not be determined due to a background image",bgGradient:"Element's background color could not be determined due to a background gradient",imgNode:"Element's background color could not be determined because element contains an image node",bgOverlap:"Element's background color could not be determined because it is overlapped by another element",fgAlpha:"Element's foreground color could not be determined because of alpha transparency",elmPartiallyObscured:"Element's background color could not be determined because it's partially obscured by another element",elmPartiallyObscuring:"Element's background color could not be determined because it partially overlaps other elements",outsideViewport:"Element's background color could not be determined because it's outside the viewport",equalRatio:"Element has a 1:1 contrast ratio with the background",shortTextContent:"Element content is too short to determine if it is actual text content",nonBmp:"Element content contains only non-text characters",pseudoContent:"Element's background color could not be determined due to a pseudo element"}}},"color-contrast":{impact:"serious",messages:{pass:{default:"Element has sufficient color contrast of \${data.contrastRatio}",hidden:"Element is hidden"},fail:{default:"Element has insufficient color contrast of \${data.contrastRatio} (foreground color: \${data.fgColor}, background color: \${data.bgColor}, font size: \${data.fontSize}, font weight: \${data.fontWeight}). Expected contrast ratio of \${data.expectedContrastRatio}",fgOnShadowColor:"Element has insufficient color contrast of \${data.contrastRatio} between the foreground and shadow color (foreground color: \${data.fgColor}, text-shadow color: \${data.shadowColor}, font size: \${data.fontSize}, font weight: \${data.fontWeight}). Expected contrast ratio of \${data.expectedContrastRatio}",shadowOnBgColor:"Element has insufficient color contrast of \${data.contrastRatio} between the shadow color and background color (text-shadow color: \${data.shadowColor}, background color: \${data.bgColor}, font size: \${data.fontSize}, font weight: \${data.fontWeight}). Expected contrast ratio of \${data.expectedContrastRatio}"},incomplete:{default:"Unable to determine contrast ratio",bgImage:"Element's background color could not be determined due to a background image",bgGradient:"Element's background color could not be determined due to a background gradient",imgNode:"Element's background color could not be determined because element contains an image node",bgOverlap:"Element's background color could not be determined because it is overlapped by another element",complexTextShadows:"Element's contrast could not be determined because it uses complex text shadows",fgAlpha:"Element's foreground color could not be determined because of alpha transparency",elmPartiallyObscured:"Element's background color could not be determined because it's partially obscured by another element",elmPartiallyObscuring:"Element's background color could not be determined because it partially overlaps other elements",outsideViewport:"Element's background color could not be determined because it's outside the viewport",equalRatio:"Element has a 1:1 contrast ratio with the background",shortTextContent:"Element content is too short to determine if it is actual text content",nonBmp:"Element content contains only non-text characters",pseudoContent:"Element's background color could not be determined due to a pseudo element"}}},"link-in-text-block-style":{impact:"serious",messages:{pass:"Links can be distinguished from surrounding text by visual styling",incomplete:{default:"Check if the link needs styling to distinguish it from nearby text",pseudoContent:"Check if the link's pseudo style is sufficient to distinguish it from the surrounding text"},fail:"The link has no styling (such as underline) to distinguish it from the surrounding text"}},"link-in-text-block":{impact:"serious",messages:{pass:"Links can be distinguished from surrounding text in some way other than by color",fail:{fgContrast:"The link has insufficient color contrast of \${data.contrastRatio}:1 with the surrounding text. (Minimum contrast is \${data.requiredContrastRatio}:1, link text: \${data.nodeColor}, surrounding text: \${data.parentColor})",bgContrast:"The link background has insufficient color contrast of \${data.contrastRatio} (Minimum contrast is \${data.requiredContrastRatio}:1, link background color: \${data.nodeBackgroundColor}, surrounding background color: \${data.parentBackgroundColor})"},incomplete:{default:"Element's foreground contrast ratio could not be determined",bgContrast:"Element's background contrast ratio could not be determined",bgImage:"Element's contrast ratio could not be determined due to a background image",bgGradient:"Element's contrast ratio could not be determined due to a background gradient",imgNode:"Element's contrast ratio could not be determined because element contains an image node",bgOverlap:"Element's contrast ratio could not be determined because of element overlap"}}},"autocomplete-appropriate":{impact:"serious",messages:{pass:"The autocomplete value is on an appropriate element",fail:"The autocomplete value is inappropriate for this type of input"}},"autocomplete-valid":{impact:"serious",messages:{pass:"the autocomplete attribute is correctly formatted",fail:"the autocomplete attribute is incorrectly formatted",incomplete:"the autocomplete attribute has a non-standard value. Check whether any standard value could be used instead."}},accesskeys:{impact:"serious",messages:{pass:"Accesskey attribute value is unique",fail:"Document has multiple elements with the same accesskey"}},"focusable-content":{impact:"serious",messages:{pass:"Element contains focusable elements",fail:"Element should have focusable content"}},"focusable-disabled":{impact:"serious",messages:{pass:"No focusable elements contained within element",incomplete:"Check if the focusable elements immediately move the focus indicator",fail:"Focusable content should be disabled or be removed from the DOM"}},"focusable-element":{impact:"serious",messages:{pass:"Element is focusable",fail:"Element should be focusable"}},"focusable-modal-open":{impact:"serious",messages:{pass:"No focusable elements while a modal is open",incomplete:"Check that focusable elements are not tabbable in the current state"}},"focusable-no-name":{impact:"serious",messages:{pass:"Element is not in tab order or has accessible text",fail:"Element is in tab order and does not have accessible text",incomplete:"Unable to determine if element has an accessible name"}},"focusable-not-tabbable":{impact:"serious",messages:{pass:"No focusable elements contained within element",incomplete:"Check if the focusable elements immediately move the focus indicator",fail:'Focusable content should have tabindex="-1" or be removed from the DOM'}},"frame-focusable-content":{impact:"serious",messages:{pass:"Element does not have focusable descendants",fail:"Element has focusable descendants",incomplete:"Could not determine if element has descendants"}},"landmark-is-top-level":{impact:"moderate",messages:{pass:"The \${data.role} landmark is at the top level.",fail:"The \${data.role} landmark is contained in another landmark."}},"no-focusable-content":{impact:"serious",messages:{pass:"Element does not have focusable descendants",fail:{default:"Element has focusable descendants",notHidden:'Using a negative tabindex on an element inside an interactive control does not prevent assistive technologies from focusing the element (even with aria-hidden="true")'},incomplete:"Could not determine if element has descendants"}},"page-has-heading-one":{impact:"moderate",messages:{pass:"Page has at least one level-one heading",fail:"Page must have a level-one heading"}},"page-has-main":{impact:"moderate",messages:{pass:"Document has at least one main landmark",fail:"Document does not have a main landmark"}},"page-no-duplicate-banner":{impact:"moderate",messages:{pass:"Document does not have more than one banner landmark",fail:"Document has more than one banner landmark"}},"page-no-duplicate-contentinfo":{impact:"moderate",messages:{pass:"Document does not have more than one contentinfo landmark",fail:"Document has more than one contentinfo landmark"}},"page-no-duplicate-main":{impact:"moderate",messages:{pass:"Document does not have more than one main landmark",fail:"Document has more than one main landmark"}},tabindex:{impact:"serious",messages:{pass:"Element does not have a tabindex greater than 0",fail:"Element has a tabindex greater than 0"}},"alt-space-value":{impact:"critical",messages:{pass:"Element has a valid alt attribute value",fail:"Element has an alt attribute containing only a space character, which is not ignored by all screen readers"}},"duplicate-img-label":{impact:"minor",messages:{pass:"Element does not duplicate existing text in <img> alt text",fail:"Element contains <img> element with alt text that duplicates existing text"}},"explicit-label":{impact:"critical",messages:{pass:"Element has an explicit <label>",fail:"Element does not have an explicit <label>",incomplete:"Unable to determine if form element has an explicit <label>"}},"help-same-as-label":{impact:"minor",messages:{pass:"Help text (title or aria-describedby) does not duplicate label text",fail:"Help text (title or aria-describedby) text is the same as the label text"}},"hidden-explicit-label":{impact:"critical",messages:{pass:"Form element has a visible explicit <label>",fail:"Form element has explicit <label> that is hidden",incomplete:"Unable to determine if form element has explicit <label> that is hidden"}},"implicit-label":{impact:"critical",messages:{pass:"Element has an implicit (wrapped) <label>",fail:"Element does not have an implicit (wrapped) <label>",incomplete:"Unable to determine if form element has an implicit (wrapped) <label>"}},"label-content-name-mismatch":{impact:"serious",messages:{pass:"Element contains visible text as part of it's accessible name",fail:"Text inside the element is not included in the accessible name"}},"multiple-label":{impact:"moderate",messages:{pass:"Form field does not have multiple label elements",incomplete:"Multiple label elements is not widely supported in assistive technologies. Ensure the first label contains all necessary information."}},"title-only":{impact:"serious",messages:{pass:"Form element does not solely use title attribute for its label",fail:"Only title used to generate label for form element"}},"landmark-is-unique":{impact:"moderate",messages:{pass:"Landmarks must have a unique role or role/label/title (i.e. accessible name) combination",fail:"The landmark must have a unique aria-label, aria-labelledby, or title to make landmarks distinguishable"}},"has-lang":{impact:"serious",messages:{pass:"The <html> element has a lang attribute",fail:{noXHTML:"The xml:lang attribute is not valid on HTML pages, use the lang attribute.",noLang:"The <html> element does not have a lang attribute"}}},"valid-lang":{impact:"serious",messages:{pass:"Value of lang attribute is included in the list of valid languages",fail:"Value of lang attribute not included in the list of valid languages"}},"xml-lang-mismatch":{impact:"moderate",messages:{pass:"Lang and xml:lang attributes have the same base language",fail:"Lang and xml:lang attributes do not have the same base language"}},dlitem:{impact:"serious",messages:{pass:"Description list item has a <dl> parent element",fail:"Description list item does not have a <dl> parent element"}},listitem:{impact:"serious",messages:{pass:'List item has a <ul>, <ol> or role="list" parent element',fail:{default:"List item does not have a <ul>, <ol> parent element",roleNotValid:'List item parent element has a role that is not role="list"'}}},"only-dlitems":{impact:"serious",messages:{pass:"dl element only has direct children that are allowed inside; <dt>, <dd>, or <div> elements",fail:"dl element has direct children that are not allowed: \${data.values}"}},"only-listitems":{impact:"serious",messages:{pass:"List element only has direct children that are allowed inside <li> elements",fail:"List element has direct children that are not allowed: \${data.values}"}},"structured-dlitems":{impact:"serious",messages:{pass:"When not empty, element has both <dt> and <dd> elements",fail:"When not empty, element does not have at least one <dt> element followed by at least one <dd> element"}},caption:{impact:"critical",messages:{pass:"The multimedia element has a captions track",incomplete:"Check that captions are available for the element"}},"frame-tested":{impact:"critical",messages:{pass:"The iframe was tested with axe-core",fail:"The iframe could not be tested with axe-core",incomplete:"The iframe still has to be tested with axe-core"}},"no-autoplay-audio":{impact:"moderate",messages:{pass:"<video> or <audio> does not output audio for more than allowed duration or has controls mechanism",fail:"<video> or <audio> outputs audio for more than allowed duration and does not have a controls mechanism",incomplete:"Check that the <video> or <audio> does not output audio for more than allowed duration or provides a controls mechanism"}},"css-orientation-lock":{impact:"serious",messages:{pass:"Display is operable, and orientation lock does not exist",fail:"CSS Orientation lock is applied, and makes display inoperable",incomplete:"CSS Orientation lock cannot be determined"}},"meta-viewport-large":{impact:"minor",messages:{pass:"<meta> tag does not prevent significant zooming on mobile devices",fail:"<meta> tag limits zooming on mobile devices"}},"meta-viewport":{impact:"critical",messages:{pass:"<meta> tag does not disable zooming on mobile devices",fail:"\${data} on <meta> tag disables zooming on mobile devices"}},"target-offset":{impact:"serious",messages:{pass:{default:"Target has sufficient space from its closest neighbors. Safe clickable space has a diameter of \${data.closestOffset}px which is at least \${data.minOffset}px.",large:"Target far exceeds the minimum size of \${data.minOffset}px."},fail:"Target has insufficient space to its closest neighbors. Safe clickable space has a diameter of \${data.closestOffset}px instead of at least \${data.minOffset}px.",incomplete:{default:"Element with negative tabindex has insufficient space to its closest neighbors. Safe clickable space has a diameter of \${data.closestOffset}px instead of at least \${data.minOffset}px. Is this a target?",nonTabbableNeighbor:"Target has insufficient space to its closest neighbors. Safe clickable space has a diameter of \${data.closestOffset}px instead of at least \${data.minOffset}px. Is the neighbor a target?",tooManyRects:"Could not get the target size because there are too many overlapping elements"}}},"target-size":{impact:"serious",messages:{pass:{default:"Control has sufficient size (\${data.width}px by \${data.height}px, should be at least \${data.minSize}px by \${data.minSize}px)",obscured:"Control is ignored because it is fully obscured and thus not clickable",large:"Target far exceeds the minimum size of \${data.minSize}px."},fail:{default:"Target has insufficient size (\${data.width}px by \${data.height}px, should be at least \${data.minSize}px by \${data.minSize}px)",partiallyObscured:"Target has insufficient size because it is partially obscured (smallest space is \${data.width}px by \${data.height}px, should be at least \${data.minSize}px by \${data.minSize}px)"},incomplete:{default:"Element with negative tabindex has insufficient size (\${data.width}px by \${data.height}px, should be at least \${data.minSize}px by \${data.minSize}px). Is this a target?",contentOverflow:"Element size could not be accurately determined due to overflow content",partiallyObscured:"Element with negative tabindex has insufficient size because it is partially obscured (smallest space is \${data.width}px by \${data.height}px, should be at least \${data.minSize}px by \${data.minSize}px). Is this a target?",partiallyObscuredNonTabbable:"Target has insufficient size because it is partially obscured by a neighbor with negative tabindex (smallest space is \${data.width}px by \${data.height}px, should be at least \${data.minSize}px by \${data.minSize}px). Is the neighbor a target?",tooManyRects:"Could not get the target size because there are too many overlapping elements"}}},"header-present":{impact:"serious",messages:{pass:"Page has a heading",fail:"Page does not have a heading"}},"heading-order":{impact:"moderate",messages:{pass:"Heading order valid",fail:"Heading order invalid",incomplete:"Unable to determine previous heading"}},"identical-links-same-purpose":{impact:"minor",messages:{pass:"There are no other links with the same name, that go to a different URL",incomplete:"Check that links have the same purpose, or are intentionally ambiguous."}},"internal-link-present":{impact:"serious",messages:{pass:"Valid skip link found",fail:"No valid skip link found"}},landmark:{impact:"serious",messages:{pass:"Page has a landmark region",fail:"Page does not have a landmark region"}},"meta-refresh-no-exceptions":{impact:"minor",messages:{pass:"<meta> tag does not immediately refresh the page",fail:"<meta> tag forces timed refresh of page"}},"meta-refresh":{impact:"critical",messages:{pass:"<meta> tag does not immediately refresh the page",fail:"<meta> tag forces timed refresh of page (less than 20 hours)"}},"p-as-heading":{impact:"serious",messages:{pass:"<p> elements are not styled as headings",fail:"Heading elements should be used instead of styled <p> elements",incomplete:"Unable to determine if <p> elements are styled as headings"}},region:{impact:"moderate",messages:{pass:"All page content is contained by landmarks",fail:"Some page content is not contained by landmarks"}},"skip-link":{impact:"moderate",messages:{pass:"Skip link target exists",incomplete:"Skip link target should become visible on activation",fail:"No skip link target"}},"unique-frame-title":{impact:"serious",messages:{pass:"Element's title attribute is unique",fail:"Element's title attribute is not unique"}},"duplicate-id-active":{impact:"serious",messages:{pass:"Document has no active elements that share the same id attribute",fail:"Document has active elements with the same id attribute: \${data}"}},"duplicate-id-aria":{impact:"critical",messages:{pass:"Document has no elements referenced with ARIA or labels that share the same id attribute",fail:"Document has multiple elements referenced with ARIA with the same id attribute: \${data}"}},"duplicate-id":{impact:"minor",messages:{pass:"Document has no static elements that share the same id attribute",fail:"Document has multiple static elements with the same id attribute: \${data}"}},"aria-label":{impact:"serious",messages:{pass:"aria-label attribute exists and is not empty",fail:"aria-label attribute does not exist or is empty"}},"aria-labelledby":{impact:"serious",messages:{pass:"aria-labelledby attribute exists and references elements that are visible to screen readers",fail:"aria-labelledby attribute does not exist, references elements that do not exist or references elements that are empty",incomplete:"Ensure aria-labelledby references an existing element"}},"avoid-inline-spacing":{impact:"serious",messages:{pass:"No inline styles with '!important' that affect text spacing has been specified",fail:{singular:"Remove '!important' from inline style \${data.values}, as overriding this is not supported by most browsers",plural:"Remove '!important' from inline styles \${data.values}, as overriding this is not supported by most browsers"}}},"button-has-visible-text":{impact:"critical",messages:{pass:"Element has inner text that is visible to screen readers",fail:"Element does not have inner text that is visible to screen readers",incomplete:"Unable to determine if element has children"}},"doc-has-title":{impact:"serious",messages:{pass:"Document has a non-empty <title> element",fail:"Document does not have a non-empty <title> element"}},"error-occurred":{messages:{pass:"",incomplete:"Axe encountered an error; test the page for this type of problem manually"}},exists:{impact:"minor",messages:{pass:"Element does not exist",incomplete:"Element exists"}},"has-alt":{impact:"critical",messages:{pass:"Element has an alt attribute",fail:"Element does not have an alt attribute"}},"has-visible-text":{impact:"minor",messages:{pass:"Element has text that is visible to screen readers",fail:"Element does not have text that is visible to screen readers",incomplete:"Unable to determine if element has children"}},"important-letter-spacing":{impact:"serious",messages:{pass:"Letter-spacing in the style attribute is not set to !important, or meets the minimum",fail:"letter-spacing in the style attribute must not use !important, or be at \${data.minValue}em (current \${data.value}em)"}},"important-line-height":{impact:"serious",messages:{pass:"line-height in the style attribute is not set to !important, or meets the minimum",fail:"line-height in the style attribute must not use !important, or be at \${data.minValue}em (current \${data.value}em)"}},"important-word-spacing":{impact:"serious",messages:{pass:"word-spacing in the style attribute is not set to !important, or meets the minimum",fail:"word-spacing in the style attribute must not use !important, or be at \${data.minValue}em (current \${data.value}em)"}},"is-on-screen":{impact:"serious",messages:{pass:"Element is not visible",fail:"Element is visible"}},"non-empty-alt":{impact:"critical",messages:{pass:"Element has a non-empty alt attribute",fail:{noAttr:"Element has no alt attribute",emptyAttr:"Element has an empty alt attribute"}}},"non-empty-if-present":{impact:"critical",messages:{pass:{default:"Element does not have a value attribute","has-label":"Element has a non-empty value attribute"},fail:"Element has a value attribute and the value attribute is empty"}},"non-empty-placeholder":{impact:"serious",messages:{pass:"Element has a placeholder attribute",fail:{noAttr:"Element has no placeholder attribute",emptyAttr:"Element has an empty placeholder attribute"}}},"non-empty-title":{impact:"serious",messages:{pass:"Element has a title attribute",fail:{noAttr:"Element has no title attribute",emptyAttr:"Element has an empty title attribute"}}},"non-empty-value":{impact:"critical",messages:{pass:"Element has a non-empty value attribute",fail:{noAttr:"Element has no value attribute",emptyAttr:"Element has an empty value attribute"}}},"presentational-role":{impact:"minor",messages:{pass:'Element\\'s default semantics were overridden with role="\${data.role}"',fail:{default:'Element\\'s default semantics were not overridden with role="none" or role="presentation"',globalAria:"Element's role is not presentational because it has a global ARIA attribute",focusable:"Element's role is not presentational because it is focusable",both:"Element's role is not presentational because it has a global ARIA attribute and is focusable",iframe:'Using the "title" attribute on an \${data.nodeName} element with a presentational role behaves inconsistently between screen readers'}}},"role-none":{impact:"minor",messages:{pass:'Element\\'s default semantics were overridden with role="none"',fail:'Element\\'s default semantics were not overridden with role="none"'}},"role-presentation":{impact:"minor",messages:{pass:'Element\\'s default semantics were overridden with role="presentation"',fail:'Element\\'s default semantics were not overridden with role="presentation"'}},"svg-non-empty-title":{impact:"serious",messages:{pass:"Element has a child that is a title",fail:{noTitle:"Element has no child that is a title",emptyTitle:"Element child title is empty"},incomplete:"Unable to determine element has a child that is a title"}},"caption-faked":{impact:"serious",messages:{pass:"The first row of a table is not used as a caption",fail:"The first child of the table should be a caption instead of a table cell"}},"html5-scope":{impact:"moderate",messages:{pass:"Scope attribute is only used on table header elements (<th>)",fail:"In HTML 5, scope attributes may only be used on table header elements (<th>)"}},"same-caption-summary":{impact:"minor",messages:{pass:"Content of summary attribute and <caption> are not duplicated",fail:"Content of summary attribute and <caption> element are identical",incomplete:"Unable to determine if <table> element has a caption"}},"scope-value":{impact:"critical",messages:{pass:"Scope attribute is used correctly",fail:"The value of the scope attribute may only be 'row' or 'col'"}},"td-has-header":{impact:"critical",messages:{pass:"All non-empty data cells have table headers",fail:"Some non-empty data cells do not have table headers"}},"td-headers-attr":{impact:"serious",messages:{pass:"The headers attribute is exclusively used to refer to other header cells in the table",incomplete:"The headers attribute is empty",fail:{"cell-header-not-in-table":"The headers attribute is not exclusively used to refer to other header cells in the table","cell-header-not-th":"The headers attribute must refer to header cells, not data cells","header-refs-self":"The element with headers attribute refers to itself"}}},"th-has-data-cells":{impact:"serious",messages:{pass:"All table header cells refer to data cells",fail:"Not all table header cells refer to data cells",incomplete:"Table data cells are missing or empty"}},"hidden-content":{impact:"minor",messages:{pass:"All content on the page has been analyzed.",fail:"There were problems analyzing the content on this page.",incomplete:"There is hidden content on the page that was not analyzed. You will need to trigger the display of this content in order to analyze it."}}},failureSummaries:{any:{failureMessage:function(e){var t="Fix any of the following:",n=e;if(n)for(var r=-1,a=n.length-1;r<a;)t+="\\n  "+n[r+=1].split("\\n").join("\\n  ");return t}},none:{failureMessage:function(e){var t="Fix all of the following:",n=e;if(n)for(var r=-1,a=n.length-1;r<a;)t+="\\n  "+n[r+=1].split("\\n").join("\\n  ");return t}}},incompleteFallbackMessage:"axe couldn't tell the reason. Time to break out the element inspector!"},rules:[{id:"accesskeys",impact:"serious",selector:"[accesskey]",excludeHidden:!1,tags:["cat.keyboard","best-practice"],all:[],any:[],none:["accesskeys"]},{id:"area-alt",impact:"critical",selector:"map area[href]",excludeHidden:!1,tags:["cat.text-alternatives","wcag2a","wcag244","wcag412","section508","section508.22.a","TTv5","TT6.a","EN-301-549","EN-9.2.4.4","EN-9.4.1.2","ACT","RGAAv4","RGAA-1.1.2"],actIds:["c487ae"],all:[],any:[{options:{attribute:"alt"},id:"non-empty-alt"},"aria-label","aria-labelledby",{options:{attribute:"title"},id:"non-empty-title"}],none:[]},{id:"aria-allowed-attr",impact:"critical",matches:"aria-allowed-attr-matches",tags:["cat.aria","wcag2a","wcag412","EN-301-549","EN-9.4.1.2","RGAAv4","RGAA-7.1.1"],actIds:["5c01ea"],all:[{options:{validTreeRowAttrs:["aria-posinset","aria-setsize","aria-expanded","aria-level"]},id:"aria-allowed-attr"}],any:[],none:["aria-unsupported-attr"]},{id:"aria-allowed-role",impact:"minor",excludeHidden:!1,selector:"[role]",matches:"aria-allowed-role-matches",tags:["cat.aria","best-practice"],all:[],any:[{options:{allowImplicit:!0,ignoredTags:[]},id:"aria-allowed-role"}],none:[]},{id:"aria-braille-equivalent",reviewOnFail:!0,impact:"serious",selector:"[aria-brailleroledescription], [aria-braillelabel]",tags:["cat.aria","wcag2a","wcag412","EN-301-549","EN-9.4.1.2"],all:["braille-roledescription-equivalent","braille-label-equivalent"],any:[],none:[]},{id:"aria-command-name",impact:"serious",selector:'[role="link"], [role="button"], [role="menuitem"]',matches:"no-naming-method-matches",tags:["cat.aria","wcag2a","wcag412","TTv5","TT6.a","EN-301-549","EN-9.4.1.2","ACT","RGAAv4","RGAA-11.9.1"],actIds:["97a4e1"],all:[],any:["has-visible-text","aria-label","aria-labelledby",{options:{attribute:"title"},id:"non-empty-title"}],none:[]},{id:"aria-conditional-attr",impact:"serious",matches:"aria-allowed-attr-matches",tags:["cat.aria","wcag2a","wcag412","EN-301-549","EN-9.4.1.2","RGAAv4","RGAA-7.1.1"],actIds:["5c01ea"],all:[{options:{invalidTableRowAttrs:["aria-posinset","aria-setsize","aria-expanded","aria-level"]},id:"aria-conditional-attr"}],any:[],none:[]},{id:"aria-deprecated-role",impact:"minor",selector:"[role]",matches:"no-empty-role-matches",tags:["cat.aria","wcag2a","wcag412","EN-301-549","EN-9.4.1.2","RGAAv4","RGAA-7.1.1"],actIds:["674b10"],all:[],any:[],none:["deprecatedrole"]},{id:"aria-dialog-name",impact:"serious",selector:'[role="dialog"], [role="alertdialog"]',matches:"no-naming-method-matches",tags:["cat.aria","best-practice"],all:[],any:["aria-label","aria-labelledby",{options:{attribute:"title"},id:"non-empty-title"}],none:[]},{id:"aria-hidden-body",impact:"critical",selector:"body",excludeHidden:!1,matches:"is-initiator-matches",tags:["cat.aria","wcag2a","wcag131","wcag412","EN-301-549","EN-9.1.3.1","EN-9.4.1.2","RGAAv4","RGAA-7.1.1"],all:[],any:["aria-hidden-body"],none:[]},{id:"aria-hidden-focus",impact:"serious",selector:'[aria-hidden="true"]',matches:"aria-hidden-focus-matches",excludeHidden:!1,tags:["cat.name-role-value","wcag2a","wcag412","TTv5","TT6.a","EN-301-549","EN-9.4.1.2","RGAAv4","RGAA-7.1.1"],actIds:["6cfa84"],all:["focusable-modal-open","focusable-disabled","focusable-not-tabbable"],any:[],none:[]},{id:"aria-input-field-name",impact:"serious",selector:'[role="combobox"], [role="listbox"], [role="searchbox"], [role="slider"], [role="spinbutton"], [role="textbox"]',matches:"no-naming-method-matches",tags:["cat.aria","wcag2a","wcag412","TTv5","TT5.c","EN-301-549","EN-9.4.1.2","ACT","RGAAv4","RGAA-11.1.1"],actIds:["e086e5"],all:[],any:["aria-label","aria-labelledby",{options:{attribute:"title"},id:"non-empty-title"}],none:["no-implicit-explicit-label"]},{id:"aria-meter-name",impact:"serious",selector:'[role="meter"]',matches:"no-naming-method-matches",tags:["cat.aria","wcag2a","wcag111","EN-301-549","EN-9.1.1.1","RGAAv4","RGAA-11.1.1"],all:[],any:["aria-label","aria-labelledby",{options:{attribute:"title"},id:"non-empty-title"}],none:[]},{id:"aria-progressbar-name",impact:"serious",selector:'[role="progressbar"]',matches:"no-naming-method-matches",tags:["cat.aria","wcag2a","wcag111","EN-301-549","EN-9.1.1.1","RGAAv4","RGAA-11.1.1"],all:[],any:["aria-label","aria-labelledby",{options:{attribute:"title"},id:"non-empty-title"}],none:[]},{id:"aria-prohibited-attr",impact:"serious",matches:"aria-allowed-attr-matches",tags:["cat.aria","wcag2a","wcag412","EN-301-549","EN-9.4.1.2","RGAAv4","RGAA-7.1.1"],actIds:["5c01ea"],all:[],any:[],none:[{options:{elementsAllowedAriaLabel:["applet","input"]},id:"aria-prohibited-attr"}]},{id:"aria-required-attr",impact:"critical",selector:"[role]",tags:["cat.aria","wcag2a","wcag412","EN-301-549","EN-9.4.1.2","RGAAv4","RGAA-7.1.1"],actIds:["4e8ab6"],all:[],any:["aria-required-attr"],none:[]},{id:"aria-required-children",impact:"critical",selector:"[role]",matches:"aria-required-children-matches",tags:["cat.aria","wcag2a","wcag131","EN-301-549","EN-9.1.3.1","RGAAv4","RGAA-9.3.1"],actIds:["bc4a75","ff89c9"],all:[],any:[{options:{reviewEmpty:["doc-bibliography","doc-endnotes","grid","list","listbox","menu","menubar","table","tablist","tree","treegrid","rowgroup"]},id:"aria-required-children"}],none:[]},{id:"aria-required-parent",impact:"critical",selector:"[role]",matches:"aria-required-parent-matches",tags:["cat.aria","wcag2a","wcag131","EN-301-549","EN-9.1.3.1","RGAAv4","RGAA-9.3.1"],actIds:["ff89c9"],all:[],any:[{options:{ownGroupRoles:["listitem","treeitem"]},id:"aria-required-parent"}],none:[]},{id:"aria-roledescription",impact:"serious",selector:"[aria-roledescription]",tags:["cat.aria","wcag2a","wcag412","EN-301-549","EN-9.4.1.2","deprecated"],enabled:!1,all:[],any:[{options:{supportedRoles:["button","img","checkbox","radio","combobox","menuitemcheckbox","menuitemradio"]},id:"aria-roledescription"}],none:[]},{id:"aria-roles",impact:"critical",selector:"[role]",matches:"no-empty-role-matches",tags:["cat.aria","wcag2a","wcag412","EN-301-549","EN-9.4.1.2","RGAAv4","RGAA-7.1.1"],actIds:["674b10"],all:[],any:[],none:["invalidrole","abstractrole","unsupportedrole"]},{id:"aria-text",impact:"serious",selector:"[role=text]",tags:["cat.aria","best-practice"],all:[],any:["no-focusable-content"],none:[]},{id:"aria-toggle-field-name",impact:"serious",selector:'[role="checkbox"], [role="menuitemcheckbox"], [role="menuitemradio"], [role="radio"], [role="switch"], [role="option"]',matches:"no-naming-method-matches",tags:["cat.aria","wcag2a","wcag412","TTv5","TT5.c","EN-301-549","EN-9.4.1.2","ACT","RGAAv4","RGAA-7.1.1"],actIds:["e086e5"],all:[],any:["has-visible-text","aria-label","aria-labelledby",{options:{attribute:"title"},id:"non-empty-title"}],none:["no-implicit-explicit-label"]},{id:"aria-tooltip-name",impact:"serious",selector:'[role="tooltip"]',matches:"no-naming-method-matches",tags:["cat.aria","wcag2a","wcag412","EN-301-549","EN-9.4.1.2"],all:[],any:["has-visible-text","aria-label","aria-labelledby",{options:{attribute:"title"},id:"non-empty-title"}],none:[]},{id:"aria-treeitem-name",impact:"serious",selector:'[role="treeitem"]',matches:"no-naming-method-matches",tags:["cat.aria","best-practice"],all:[],any:["has-visible-text","aria-label","aria-labelledby",{options:{attribute:"title"},id:"non-empty-title"}],none:[]},{id:"aria-valid-attr-value",impact:"critical",matches:"aria-has-attr-matches",tags:["cat.aria","wcag2a","wcag412","EN-301-549","EN-9.4.1.2","RGAAv4","RGAA-7.1.1"],actIds:["6a7281"],all:[{options:[],id:"aria-valid-attr-value"},"aria-errormessage","aria-level"],any:[],none:[]},{id:"aria-valid-attr",impact:"critical",matches:"aria-has-attr-matches",tags:["cat.aria","wcag2a","wcag412","EN-301-549","EN-9.4.1.2","RGAAv4","RGAA-7.1.1"],actIds:["5f99a7"],all:[],any:[{options:[],id:"aria-valid-attr"}],none:[]},{id:"audio-caption",impact:"critical",selector:"audio",enabled:!1,excludeHidden:!1,tags:["cat.time-and-media","wcag2a","wcag121","EN-301-549","EN-9.1.2.1","section508","section508.22.a","deprecated"],actIds:["2eb176","afb423"],all:[],any:[],none:["caption"]},{id:"autocomplete-valid",impact:"serious",matches:"autocomplete-matches",tags:["cat.forms","wcag21aa","wcag135","EN-301-549","EN-9.1.3.5","ACT","RGAAv4","RGAA-11.13.1"],actIds:["73f2c2"],all:[{options:{stateTerms:["none","false","true","disabled","enabled","undefined","null","xoff","xon"],ignoredValues:["text","pronouns","gender","message","content"]},id:"autocomplete-valid"}],any:[],none:[]},{id:"avoid-inline-spacing",impact:"serious",selector:"[style]",matches:"is-visible-on-screen-matches",tags:["cat.structure","wcag21aa","wcag1412","EN-301-549","EN-9.1.4.12","ACT"],actIds:["24afc2","9e45ec","78fd32"],all:[{options:{cssProperty:"letter-spacing",minValue:.12},id:"important-letter-spacing"},{options:{cssProperty:"word-spacing",minValue:.16},id:"important-word-spacing"},{options:{multiLineOnly:!0,cssProperty:"line-height",minValue:1.5,normalValue:1},id:"important-line-height"}],any:[],none:[]},{id:"blink",impact:"serious",selector:"blink",excludeHidden:!1,tags:["cat.time-and-media","wcag2a","wcag222","section508","section508.22.j","TTv5","TT2.b","EN-301-549","EN-9.2.2.2","RGAAv4","RGAA-13.8.1"],all:[],any:[],none:["is-on-screen"]},{id:"button-name",impact:"critical",selector:"button",matches:"no-explicit-name-required-matches",tags:["cat.name-role-value","wcag2a","wcag412","section508","section508.22.a","TTv5","TT6.a","EN-301-549","EN-9.4.1.2","ACT","RGAAv4","RGAA-11.9.1"],actIds:["97a4e1","m6b1q3"],all:[],any:["button-has-visible-text","aria-label","aria-labelledby",{options:{attribute:"title"},id:"non-empty-title"},"implicit-label","explicit-label","presentational-role"],none:[]},{id:"bypass",impact:"serious",selector:"html",pageLevel:!0,matches:"bypass-matches",reviewOnFail:!0,tags:["cat.keyboard","wcag2a","wcag241","section508","section508.22.o","TTv5","TT9.a","EN-301-549","EN-9.2.4.1","RGAAv4","RGAA-12.7.1"],actIds:["cf77f2","047fe0","b40fd1","3e12e1","ye5d6e"],all:[],any:["internal-link-present",{options:{selector:":is(h1, h2, h3, h4, h5, h6):not([role]), [role=heading]"},id:"header-present"},{options:{selector:"main, [role=main]"},id:"landmark"}],none:[]},{id:"color-contrast-enhanced",impact:"serious",matches:"color-contrast-matches",excludeHidden:!1,enabled:!1,tags:["cat.color","wcag2aaa","wcag146","ACT"],actIds:["09o5cg"],all:[],any:[{options:{ignoreUnicode:!0,ignoreLength:!1,ignorePseudo:!1,boldValue:700,boldTextPt:14,largeTextPt:18,contrastRatio:{normal:{expected:7,minThreshold:4.5},large:{expected:4.5,minThreshold:3}},pseudoSizeThreshold:.25,shadowOutlineEmMax:.1,textStrokeEmMin:.03},id:"color-contrast-enhanced"}],none:[]},{id:"color-contrast",impact:"serious",matches:"color-contrast-matches",excludeHidden:!1,tags:["cat.color","wcag2aa","wcag143","TTv5","TT13.c","EN-301-549","EN-9.1.4.3","ACT","RGAAv4","RGAA-3.2.1"],actIds:["afw4f7","09o5cg"],all:[],any:[{options:{ignoreUnicode:!0,ignoreLength:!1,ignorePseudo:!1,boldValue:700,boldTextPt:14,largeTextPt:18,contrastRatio:{normal:{expected:4.5},large:{expected:3}},pseudoSizeThreshold:.25,shadowOutlineEmMax:.2,textStrokeEmMin:.03},id:"color-contrast"}],none:[]},{id:"css-orientation-lock",impact:"serious",selector:"html",tags:["cat.structure","wcag134","wcag21aa","EN-301-549","EN-9.1.3.4","RGAAv4","RGAA-13.9.1","experimental"],actIds:["b33eff"],all:[{options:{degreeThreshold:2},id:"css-orientation-lock"}],any:[],none:[],preload:!0},{id:"definition-list",impact:"serious",selector:"dl",matches:"no-role-matches",tags:["cat.structure","wcag2a","wcag131","EN-301-549","EN-9.1.3.1","RGAAv4","RGAA-9.3.3"],all:[],any:[],none:["structured-dlitems",{options:{validRoles:["definition","term","listitem"],validNodeNames:["dt","dd"],divGroups:!0},id:"only-dlitems"}]},{id:"dlitem",impact:"serious",selector:"dd, dt",matches:"no-role-matches",tags:["cat.structure","wcag2a","wcag131","EN-301-549","EN-9.1.3.1","RGAAv4","RGAA-9.3.3"],all:[],any:["dlitem"],none:[]},{id:"document-title",impact:"serious",selector:"html",matches:"is-initiator-matches",tags:["cat.text-alternatives","wcag2a","wcag242","TTv5","TT12.a","EN-301-549","EN-9.2.4.2","ACT","RGAAv4","RGAA-8.5.1"],actIds:["2779a5"],all:[],any:["doc-has-title"],none:[]},{id:"duplicate-id-active",impact:"serious",selector:"[id]",matches:"duplicate-id-active-matches",excludeHidden:!1,tags:["cat.parsing","wcag2a-obsolete","wcag411","deprecated"],enabled:!1,actIds:["3ea0c8"],all:[],any:["duplicate-id-active"],none:[]},{id:"duplicate-id-aria",impact:"critical",selector:"[id]",matches:"duplicate-id-aria-matches",excludeHidden:!1,tags:["cat.parsing","wcag2a","wcag412","EN-301-549","EN-9.4.1.2","RGAAv4","RGAA-8.2.1"],reviewOnFail:!0,actIds:["3ea0c8"],all:[],any:["duplicate-id-aria"],none:[]},{id:"duplicate-id",impact:"minor",selector:"[id]",matches:"duplicate-id-misc-matches",excludeHidden:!1,tags:["cat.parsing","wcag2a-obsolete","wcag411","deprecated"],enabled:!1,actIds:["3ea0c8"],all:[],any:["duplicate-id"],none:[]},{id:"empty-heading",impact:"minor",selector:'h1, h2, h3, h4, h5, h6, [role="heading"]',matches:"heading-matches",tags:["cat.name-role-value","best-practice"],actIds:["ffd0e9"],all:[],any:["has-visible-text","aria-label","aria-labelledby",{options:{attribute:"title"},id:"non-empty-title"}],none:[]},{id:"empty-table-header",impact:"minor",selector:'th:not([role]), [role="rowheader"], [role="columnheader"]',tags:["cat.name-role-value","best-practice"],all:[],any:["has-visible-text"],none:[]},{id:"focus-order-semantics",impact:"minor",selector:"div, h1, h2, h3, h4, h5, h6, [role=heading], p, span",matches:"inserted-into-focus-order-matches",tags:["cat.keyboard","best-practice","RGAAv4","RGAA-12.8.1","experimental"],all:[],any:[{options:[],id:"has-widget-role"},{options:{roles:["tooltip"]},id:"valid-scrollable-semantics"}],none:[]},{id:"form-field-multiple-labels",impact:"moderate",selector:"input, select, textarea",matches:"label-matches",tags:["cat.forms","wcag2a","wcag332","TTv5","TT5.c","EN-301-549","EN-9.3.3.2","RGAAv4","RGAA-11.2.1"],all:[],any:[],none:["multiple-label"]},{id:"frame-focusable-content",impact:"serious",selector:"html",matches:"frame-focusable-content-matches",tags:["cat.keyboard","wcag2a","wcag211","TTv5","TT4.a","EN-301-549","EN-9.2.1.1","RGAAv4","RGAA-7.3.2"],actIds:["akn7bn"],all:[],any:["frame-focusable-content"],none:[]},{id:"frame-tested",impact:"critical",selector:"html, frame, iframe",tags:["cat.structure","best-practice","review-item"],all:[{options:{isViolation:!1},id:"frame-tested"}],any:[],none:[]},{id:"frame-title-unique",impact:"serious",selector:"frame[title], iframe[title]",matches:"frame-title-has-text-matches",tags:["cat.text-alternatives","wcag2a","wcag412","TTv5","TT12.d","EN-301-549","EN-9.4.1.2","RGAAv4","RGAA-2.2.1"],actIds:["4b1c6c"],all:[],any:[],none:["unique-frame-title"],reviewOnFail:!0},{id:"frame-title",impact:"serious",selector:"frame, iframe",matches:"no-negative-tabindex-matches",tags:["cat.text-alternatives","wcag2a","wcag412","section508","section508.22.i","TTv5","TT12.d","EN-301-549","EN-9.4.1.2","RGAAv4","RGAA-2.1.1"],actIds:["cae760"],all:[],any:[{options:{attribute:"title"},id:"non-empty-title"},"aria-label","aria-labelledby","presentational-role"],none:[]},{id:"heading-order",impact:"moderate",selector:"h1, h2, h3, h4, h5, h6, [role=heading]",matches:"heading-matches",tags:["cat.semantics","best-practice"],all:[],any:["heading-order"],none:[]},{id:"hidden-content",impact:"minor",selector:"*",excludeHidden:!1,tags:["cat.structure","best-practice","experimental","review-item"],all:[],any:["hidden-content"],none:[]},{id:"html-has-lang",impact:"serious",selector:"html",matches:"is-initiator-matches",tags:["cat.language","wcag2a","wcag311","TTv5","TT11.a","EN-301-549","EN-9.3.1.1","ACT","RGAAv4","RGAA-8.3.1"],actIds:["b5c3f8"],all:[],any:[{options:{attributes:["lang","xml:lang"]},id:"has-lang"}],none:[]},{id:"html-lang-valid",impact:"serious",selector:'html[lang]:not([lang=""]), html[xml\\\\:lang]:not([xml\\\\:lang=""])',tags:["cat.language","wcag2a","wcag311","TTv5","TT11.a","EN-301-549","EN-9.3.1.1","ACT","RGAAv4","RGAA-8.4.1"],actIds:["bf051a"],all:[],any:[],none:[{options:{attributes:["lang","xml:lang"]},id:"valid-lang"}]},{id:"html-xml-lang-mismatch",impact:"moderate",selector:"html[lang][xml\\\\:lang]",matches:"xml-lang-mismatch-matches",tags:["cat.language","wcag2a","wcag311","EN-301-549","EN-9.3.1.1","ACT","RGAAv4","RGAA-8.3.1"],actIds:["5b7ae0"],all:["xml-lang-mismatch"],any:[],none:[]},{id:"identical-links-same-purpose",impact:"minor",selector:'a[href], area[href], [role="link"]',excludeHidden:!1,enabled:!1,matches:"identical-links-same-purpose-matches",tags:["cat.semantics","wcag2aaa","wcag249"],actIds:["b20e66"],all:["identical-links-same-purpose"],any:[],none:[]},{id:"image-alt",impact:"critical",selector:"img",matches:"no-explicit-name-required-matches",tags:["cat.text-alternatives","wcag2a","wcag111","section508","section508.22.a","TTv5","TT7.a","TT7.b","EN-301-549","EN-9.1.1.1","ACT","RGAAv4","RGAA-1.1.1"],actIds:["23a2a8"],all:[],any:["has-alt","aria-label","aria-labelledby",{options:{attribute:"title"},id:"non-empty-title"},"presentational-role"],none:["alt-space-value"]},{id:"image-redundant-alt",impact:"minor",selector:"img",tags:["cat.text-alternatives","best-practice"],all:[],any:[],none:[{options:{parentSelector:"button, [role=button], a[href], p, li, td, th"},id:"duplicate-img-label"}]},{id:"input-button-name",impact:"critical",selector:'input[type="button"], input[type="submit"], input[type="reset"]',matches:"no-explicit-name-required-matches",tags:["cat.name-role-value","wcag2a","wcag412","section508","section508.22.a","TTv5","TT5.c","EN-301-549","EN-9.4.1.2","ACT","RGAAv4","RGAA-11.9.1"],actIds:["97a4e1"],all:[],any:["non-empty-if-present",{options:{attribute:"value"},id:"non-empty-value"},"aria-label","aria-labelledby",{options:{attribute:"title"},id:"non-empty-title"},"implicit-label","explicit-label","presentational-role"],none:[]},{id:"input-image-alt",impact:"critical",selector:'input[type="image"]',matches:"no-explicit-name-required-matches",tags:["cat.text-alternatives","wcag2a","wcag111","wcag412","section508","section508.22.a","TTv5","TT7.a","EN-301-549","EN-9.1.1.1","EN-9.4.1.2","ACT","RGAAv4","RGAA-1.1.3"],actIds:["59796f"],all:[],any:[{options:{attribute:"alt"},id:"non-empty-alt"},"aria-label","aria-labelledby",{options:{attribute:"title"},id:"non-empty-title"},"implicit-label","explicit-label"],none:[]},{id:"label-content-name-mismatch",impact:"serious",matches:"label-content-name-mismatch-matches",tags:["cat.semantics","wcag21a","wcag253","EN-301-549","EN-9.2.5.3","RGAAv4","RGAA-6.1.5","experimental"],actIds:["2ee8b8"],all:[],any:[{options:{pixelThreshold:.1,occurrenceThreshold:3},id:"label-content-name-mismatch"}],none:[]},{id:"label-title-only",impact:"serious",selector:"input, select, textarea",matches:"label-matches",tags:["cat.forms","best-practice"],all:[],any:[],none:["title-only"]},{id:"label",impact:"critical",selector:"input, textarea",matches:"label-matches",tags:["cat.forms","wcag2a","wcag412","section508","section508.22.n","TTv5","TT5.c","EN-301-549","EN-9.4.1.2","ACT","RGAAv4","RGAA-11.1.1"],actIds:["e086e5"],all:[],any:["implicit-label","explicit-label","aria-label","aria-labelledby",{options:{attribute:"title"},id:"non-empty-title"},{options:{attribute:"placeholder"},id:"non-empty-placeholder"},"presentational-role"],none:["hidden-explicit-label"]},{id:"landmark-banner-is-top-level",impact:"moderate",selector:"header:not([role]), [role=banner]",matches:"landmark-has-body-context-matches",tags:["cat.semantics","best-practice"],all:[],any:["landmark-is-top-level"],none:[]},{id:"landmark-complementary-is-top-level",impact:"moderate",selector:"aside:not([role]), [role=complementary]",tags:["cat.semantics","best-practice"],all:[],any:["landmark-is-top-level"],none:[]},{id:"landmark-contentinfo-is-top-level",impact:"moderate",selector:"footer:not([role]), [role=contentinfo]",matches:"landmark-has-body-context-matches",tags:["cat.semantics","best-practice"],all:[],any:["landmark-is-top-level"],none:[]},{id:"landmark-main-is-top-level",impact:"moderate",selector:"main:not([role]), [role=main]",tags:["cat.semantics","best-practice"],all:[],any:["landmark-is-top-level"],none:[]},{id:"landmark-no-duplicate-banner",impact:"moderate",selector:"header:not([role]), [role=banner]",tags:["cat.semantics","best-practice"],all:[],any:[{options:{selector:"header:not([role]), [role=banner]",role:"banner"},id:"page-no-duplicate-banner"}],none:[]},{id:"landmark-no-duplicate-contentinfo",impact:"moderate",selector:"footer:not([role]), [role=contentinfo]",tags:["cat.semantics","best-practice"],all:[],any:[{options:{selector:"footer:not([role]), [role=contentinfo]",role:"contentinfo"},id:"page-no-duplicate-contentinfo"}],none:[]},{id:"landmark-no-duplicate-main",impact:"moderate",selector:"main:not([role]), [role=main]",tags:["cat.semantics","best-practice"],all:[],any:[{options:{selector:"main:not([role]), [role='main']"},id:"page-no-duplicate-main"}],none:[]},{id:"landmark-one-main",impact:"moderate",selector:"html",tags:["cat.semantics","best-practice"],all:[{options:{selector:"main:not([role]), [role='main']",passForModal:!0},id:"page-has-main"}],any:[],none:[]},{id:"landmark-unique",impact:"moderate",selector:"[role=banner], [role=complementary], [role=contentinfo], [role=main], [role=navigation], [role=region], [role=search], [role=form], form, footer, header, aside, main, nav, section",tags:["cat.semantics","best-practice"],matches:"landmark-unique-matches",all:[],any:["landmark-is-unique"],none:[]},{id:"link-in-text-block",impact:"serious",selector:"a[href], [role=link]",matches:"link-in-text-block-matches",excludeHidden:!1,tags:["cat.color","wcag2a","wcag141","TTv5","TT13.a","EN-301-549","EN-9.1.4.1","RGAAv4","RGAA-10.6.1"],all:[],any:[{options:{requiredContrastRatio:3,allowSameColor:!0},id:"link-in-text-block"},"link-in-text-block-style"],none:[]},{id:"link-name",impact:"serious",selector:"a[href]",tags:["cat.name-role-value","wcag2a","wcag244","wcag412","section508","section508.22.a","TTv5","TT6.a","EN-301-549","EN-9.2.4.4","EN-9.4.1.2","ACT","RGAAv4","RGAA-6.2.1"],actIds:["c487ae"],all:[],any:["has-visible-text","aria-label","aria-labelledby",{options:{attribute:"title"},id:"non-empty-title"}],none:["focusable-no-name"]},{id:"list",impact:"serious",selector:"ul, ol",matches:"no-role-matches",tags:["cat.structure","wcag2a","wcag131","EN-301-549","EN-9.1.3.1","RGAAv4","RGAA-9.3.1"],all:[],any:[],none:[{options:{validRoles:["listitem"],validNodeNames:["li"]},id:"only-listitems"}]},{id:"listitem",impact:"serious",selector:"li",matches:"no-role-matches",tags:["cat.structure","wcag2a","wcag131","EN-301-549","EN-9.1.3.1","RGAAv4","RGAA-9.3.1"],all:[],any:["listitem"],none:[]},{id:"marquee",impact:"serious",selector:"marquee",excludeHidden:!1,tags:["cat.parsing","wcag2a","wcag222","TTv5","TT2.b","EN-301-549","EN-9.2.2.2","RGAAv4","RGAA-13.8.1"],all:[],any:[],none:["is-on-screen"]},{id:"meta-refresh-no-exceptions",impact:"minor",selector:'meta[http-equiv="refresh"][content]',excludeHidden:!1,enabled:!1,tags:["cat.time-and-media","wcag2aaa","wcag224","wcag325"],actIds:["bisz58"],all:[],any:[{options:{minDelay:72e3,maxDelay:!1},id:"meta-refresh-no-exceptions"}],none:[]},{id:"meta-refresh",impact:"critical",selector:'meta[http-equiv="refresh"][content]',excludeHidden:!1,tags:["cat.time-and-media","wcag2a","wcag221","TTv5","TT8.a","EN-301-549","EN-9.2.2.1","RGAAv4","RGAA-13.1.2"],actIds:["bc659a","bisz58"],all:[],any:[{options:{minDelay:0,maxDelay:72e3},id:"meta-refresh"}],none:[]},{id:"meta-viewport-large",impact:"minor",selector:'meta[name="viewport"]',matches:"is-initiator-matches",excludeHidden:!1,tags:["cat.sensory-and-visual-cues","best-practice"],all:[],any:[{options:{scaleMinimum:5,lowerBound:2},id:"meta-viewport-large"}],none:[]},{id:"meta-viewport",impact:"moderate",selector:'meta[name="viewport"]',matches:"is-initiator-matches",excludeHidden:!1,tags:["cat.sensory-and-visual-cues","wcag2aa","wcag144","EN-301-549","EN-9.1.4.4","ACT","RGAAv4","RGAA-10.4.2"],actIds:["b4f0c3"],all:[],any:[{options:{scaleMinimum:2},id:"meta-viewport"}],none:[]},{id:"nested-interactive",impact:"serious",matches:"nested-interactive-matches",tags:["cat.keyboard","wcag2a","wcag412","TTv5","TT6.a","EN-301-549","EN-9.4.1.2","RGAAv4","RGAA-7.1.1"],actIds:["307n5z"],all:[],any:["no-focusable-content"],none:[]},{id:"no-autoplay-audio",impact:"moderate",excludeHidden:!1,selector:"audio[autoplay], video[autoplay]",matches:"no-autoplay-audio-matches",reviewOnFail:!0,tags:["cat.time-and-media","wcag2a","wcag142","TTv5","TT2.a","EN-301-549","EN-9.1.4.2","ACT","RGAAv4","RGAA-4.10.1"],actIds:["80f0bf"],preload:!0,all:[{options:{allowedDuration:3},id:"no-autoplay-audio"}],any:[],none:[]},{id:"object-alt",impact:"serious",selector:"object[data]",matches:"object-is-loaded-matches",tags:["cat.text-alternatives","wcag2a","wcag111","section508","section508.22.a","EN-301-549","EN-9.1.1.1","RGAAv4","RGAA-1.1.6"],actIds:["8fc3b6"],all:[],any:["aria-label","aria-labelledby",{options:{attribute:"title"},id:"non-empty-title"},"presentational-role"],none:[]},{id:"p-as-heading",impact:"serious",selector:"p",matches:"p-as-heading-matches",tags:["cat.semantics","wcag2a","wcag131","EN-301-549","EN-9.1.3.1","RGAAv4","RGAA-9.1.3","experimental"],all:[{options:{margins:[{weight:150,italic:!0},{weight:150,size:1.15},{italic:!0,size:1.15},{size:1.4}],passLength:1,failLength:.5},id:"p-as-heading"}],any:[],none:[]},{id:"page-has-heading-one",impact:"moderate",selector:"html",tags:["cat.semantics","best-practice"],all:[{options:{selector:"h1:not([role], [aria-level]), :is(h1, h2, h3, h4, h5, h6):not([role])[aria-level=1], [role=heading][aria-level=1]",passForModal:!0},id:"page-has-heading-one"}],any:[],none:[]},{id:"presentation-role-conflict",impact:"minor",selector:'img[alt=\\'\\'], [role="none"], [role="presentation"]',matches:"has-implicit-chromium-role-matches",tags:["cat.aria","best-practice","ACT"],actIds:["46ca7f"],all:[],any:[],none:["is-element-focusable","has-global-aria-attribute"]},{id:"region",impact:"moderate",selector:"body *",tags:["cat.keyboard","best-practice","RGAAv4","RGAA-9.2.1"],all:[],any:[{options:{regionMatcher:"dialog, [role=dialog], [role=alertdialog], svg"},id:"region"}],none:[]},{id:"role-img-alt",impact:"serious",selector:"[role='img']:not(img, area, input, object)",matches:"html-namespace-matches",tags:["cat.text-alternatives","wcag2a","wcag111","section508","section508.22.a","TTv5","TT7.a","EN-301-549","EN-9.1.1.1","ACT","RGAAv4","RGAA-1.1.1"],actIds:["23a2a8"],all:[],any:["aria-label","aria-labelledby",{options:{attribute:"title"},id:"non-empty-title"}],none:[]},{id:"scope-attr-valid",impact:"moderate",selector:"td[scope], th[scope]",tags:["cat.tables","best-practice"],all:["html5-scope",{options:{values:["row","col","rowgroup","colgroup"]},id:"scope-value"}],any:[],none:[]},{id:"scrollable-region-focusable",impact:"serious",selector:"*:not(select,textarea)",matches:"scrollable-region-focusable-matches",tags:["cat.keyboard","wcag2a","wcag211","wcag213","TTv5","TT4.a","EN-301-549","EN-9.2.1.1","EN-9.2.1.3","RGAAv4","RGAA-7.3.2"],actIds:["0ssw9k"],all:[],any:["focusable-content","focusable-element"],none:[]},{id:"select-name",impact:"critical",selector:"select",tags:["cat.forms","wcag2a","wcag412","section508","section508.22.n","TTv5","TT5.c","EN-301-549","EN-9.4.1.2","ACT","RGAAv4","RGAA-11.1.1"],actIds:["e086e5"],all:[],any:["implicit-label","explicit-label","aria-label","aria-labelledby",{options:{attribute:"title"},id:"non-empty-title"},"presentational-role"],none:["hidden-explicit-label"]},{id:"server-side-image-map",impact:"minor",selector:"img[ismap]",tags:["cat.text-alternatives","wcag2a","wcag211","section508","section508.22.f","TTv5","TT4.a","EN-301-549","EN-9.2.1.1","RGAAv4","RGAA-1.1.4"],all:[],any:[],none:["exists"]},{id:"skip-link",impact:"moderate",selector:'a[href^="#"], a[href^="/#"]',matches:"skip-link-matches",tags:["cat.keyboard","best-practice","RGAAv4","RGAA-12.7.1"],all:[],any:["skip-link"],none:[]},{id:"summary-name",impact:"serious",selector:"summary",matches:"summary-interactive-matches",tags:["cat.name-role-value","wcag2a","wcag412","section508","section508.22.a","TTv5","TT6.a","EN-301-549","EN-9.4.1.2"],all:[],any:["has-visible-text","aria-label","aria-labelledby",{options:{attribute:"title"},id:"non-empty-title"}],none:[]},{id:"svg-img-alt",impact:"serious",selector:'[role="img"], [role="graphics-symbol"], svg[role="graphics-document"]',matches:"svg-namespace-matches",tags:["cat.text-alternatives","wcag2a","wcag111","section508","section508.22.a","TTv5","TT7.a","EN-301-549","EN-9.1.1.1","ACT","RGAAv4","RGAA-1.1.5"],actIds:["7d6734"],all:[],any:["svg-non-empty-title","aria-label","aria-labelledby",{options:{attribute:"title"},id:"non-empty-title"}],none:[]},{id:"tabindex",impact:"serious",selector:"[tabindex]",tags:["cat.keyboard","best-practice"],all:[],any:["tabindex"],none:[]},{id:"table-duplicate-name",impact:"minor",selector:"table",tags:["cat.tables","best-practice","RGAAv4","RGAA-5.2.1"],all:[],any:[],none:["same-caption-summary"]},{id:"table-fake-caption",impact:"serious",selector:"table",matches:"data-table-matches",tags:["cat.tables","experimental","wcag2a","wcag131","section508","section508.22.g","EN-301-549","EN-9.1.3.1","RGAAv4","RGAA-5.4.1"],all:["caption-faked"],any:[],none:[]},{id:"target-size",impact:"serious",selector:"*",enabled:!1,matches:"widget-not-inline-matches",tags:["cat.sensory-and-visual-cues","wcag22aa","wcag258"],all:[],any:[{options:{minSize:24},id:"target-size"},{options:{minOffset:24},id:"target-offset"}],none:[]},{id:"td-has-header",impact:"critical",selector:"table",matches:"data-table-large-matches",tags:["cat.tables","experimental","wcag2a","wcag131","section508","section508.22.g","TTv5","TT14.b","EN-301-549","EN-9.1.3.1","RGAAv4","RGAA-5.7.4"],all:["td-has-header"],any:[],none:[]},{id:"td-headers-attr",impact:"serious",selector:"table",matches:"table-or-grid-role-matches",tags:["cat.tables","wcag2a","wcag131","section508","section508.22.g","TTv5","TT14.b","EN-301-549","EN-9.1.3.1","RGAAv4","RGAA-5.7.4"],actIds:["a25f45"],all:["td-headers-attr"],any:[],none:[]},{id:"th-has-data-cells",impact:"serious",selector:"table",matches:"data-table-matches",tags:["cat.tables","wcag2a","wcag131","section508","section508.22.g","TTv5","TT14.b","EN-301-549","EN-9.1.3.1","RGAAv4","RGAA-5.7.1"],actIds:["d0f69e"],all:["th-has-data-cells"],any:[],none:[]},{id:"valid-lang",impact:"serious",selector:"[lang]:not(html), [xml\\\\:lang]:not(html)",tags:["cat.language","wcag2aa","wcag312","TTv5","TT11.b","EN-301-549","EN-9.3.1.2","ACT","RGAAv4","RGAA-8.7.1"],actIds:["de46e4"],all:[],any:[],none:[{options:{attributes:["lang","xml:lang"]},id:"valid-lang"}]},{id:"video-caption",impact:"critical",selector:"video",tags:["cat.text-alternatives","wcag2a","wcag122","section508","section508.22.a","TTv5","TT17.a","EN-301-549","EN-9.1.2.2","RGAAv4","RGAA-4.3.1"],actIds:["eac66b"],all:[],any:[],none:["caption"]}],checks:[{id:"abstractrole",evaluate:"abstractrole-evaluate"},{id:"aria-allowed-attr",evaluate:"aria-allowed-attr-evaluate",options:{validTreeRowAttrs:["aria-posinset","aria-setsize","aria-expanded","aria-level"]}},{id:"aria-allowed-role",evaluate:"aria-allowed-role-evaluate",options:{allowImplicit:!0,ignoredTags:[]}},{id:"aria-busy",evaluate:"aria-busy-evaluate",deprecated:!0},{id:"aria-conditional-attr",evaluate:"aria-conditional-attr-evaluate",options:{invalidTableRowAttrs:["aria-posinset","aria-setsize","aria-expanded","aria-level"]}},{id:"aria-errormessage",evaluate:"aria-errormessage-evaluate"},{id:"aria-hidden-body",evaluate:"aria-hidden-body-evaluate"},{id:"aria-level",evaluate:"aria-level-evaluate"},{id:"aria-prohibited-attr",evaluate:"aria-prohibited-attr-evaluate",options:{elementsAllowedAriaLabel:["applet","input"]}},{id:"aria-required-attr",evaluate:"aria-required-attr-evaluate"},{id:"aria-required-children",evaluate:"aria-required-children-evaluate",options:{reviewEmpty:["doc-bibliography","doc-endnotes","grid","list","listbox","menu","menubar","table","tablist","tree","treegrid","rowgroup"]}},{id:"aria-required-parent",evaluate:"aria-required-parent-evaluate",options:{ownGroupRoles:["listitem","treeitem"]}},{id:"aria-roledescription",evaluate:"aria-roledescription-evaluate",options:{supportedRoles:["button","img","checkbox","radio","combobox","menuitemcheckbox","menuitemradio"]}},{id:"aria-unsupported-attr",evaluate:"aria-unsupported-attr-evaluate"},{id:"aria-valid-attr-value",evaluate:"aria-valid-attr-value-evaluate",options:[]},{id:"aria-valid-attr",evaluate:"aria-valid-attr-evaluate",options:[]},{id:"braille-label-equivalent",evaluate:"braille-label-equivalent-evaluate"},{id:"braille-roledescription-equivalent",evaluate:"braille-roledescription-equivalent-evaluate"},{id:"deprecatedrole",evaluate:"deprecatedrole-evaluate"},{id:"fallbackrole",evaluate:"fallbackrole-evaluate"},{id:"has-global-aria-attribute",evaluate:"has-global-aria-attribute-evaluate"},{id:"has-widget-role",evaluate:"has-widget-role-evaluate",options:[]},{id:"invalidrole",evaluate:"invalidrole-evaluate"},{id:"is-element-focusable",evaluate:"is-element-focusable-evaluate"},{id:"no-implicit-explicit-label",evaluate:"no-implicit-explicit-label-evaluate"},{id:"unsupportedrole",evaluate:"unsupportedrole-evaluate"},{id:"valid-scrollable-semantics",evaluate:"valid-scrollable-semantics-evaluate",options:{roles:["tooltip"]}},{id:"color-contrast-enhanced",evaluate:"color-contrast-evaluate",options:{ignoreUnicode:!0,ignoreLength:!1,ignorePseudo:!1,boldValue:700,boldTextPt:14,largeTextPt:18,contrastRatio:{normal:{expected:7,minThreshold:4.5},large:{expected:4.5,minThreshold:3}},pseudoSizeThreshold:.25,shadowOutlineEmMax:.1,textStrokeEmMin:.03}},{id:"color-contrast",evaluate:"color-contrast-evaluate",options:{ignoreUnicode:!0,ignoreLength:!1,ignorePseudo:!1,boldValue:700,boldTextPt:14,largeTextPt:18,contrastRatio:{normal:{expected:4.5},large:{expected:3}},pseudoSizeThreshold:.25,shadowOutlineEmMax:.2,textStrokeEmMin:.03}},{id:"link-in-text-block-style",evaluate:"link-in-text-block-style-evaluate"},{id:"link-in-text-block",evaluate:"link-in-text-block-evaluate",options:{requiredContrastRatio:3,allowSameColor:!0}},{id:"autocomplete-appropriate",evaluate:"autocomplete-appropriate-evaluate",deprecated:!0},{id:"autocomplete-valid",evaluate:"autocomplete-valid-evaluate",options:{stateTerms:["none","false","true","disabled","enabled","undefined","null","xoff","xon"],ignoredValues:["text","pronouns","gender","message","content"]}},{id:"accesskeys",evaluate:"accesskeys-evaluate",after:"accesskeys-after"},{id:"focusable-content",evaluate:"focusable-content-evaluate"},{id:"focusable-disabled",evaluate:"focusable-disabled-evaluate"},{id:"focusable-element",evaluate:"focusable-element-evaluate"},{id:"focusable-modal-open",evaluate:"focusable-modal-open-evaluate"},{id:"focusable-no-name",evaluate:"focusable-no-name-evaluate"},{id:"focusable-not-tabbable",evaluate:"focusable-not-tabbable-evaluate"},{id:"frame-focusable-content",evaluate:"frame-focusable-content-evaluate"},{id:"landmark-is-top-level",evaluate:"landmark-is-top-level-evaluate"},{id:"no-focusable-content",evaluate:"no-focusable-content-evaluate"},{id:"page-has-heading-one",evaluate:"has-descendant-evaluate",after:"has-descendant-after",options:{selector:"h1:not([role], [aria-level]), :is(h1, h2, h3, h4, h5, h6):not([role])[aria-level=1], [role=heading][aria-level=1]",passForModal:!0}},{id:"page-has-main",evaluate:"has-descendant-evaluate",after:"has-descendant-after",options:{selector:"main:not([role]), [role='main']",passForModal:!0}},{id:"page-no-duplicate-banner",evaluate:"page-no-duplicate-evaluate",after:"page-no-duplicate-after",options:{selector:"header:not([role]), [role=banner]",role:"banner"}},{id:"page-no-duplicate-contentinfo",evaluate:"page-no-duplicate-evaluate",after:"page-no-duplicate-after",options:{selector:"footer:not([role]), [role=contentinfo]",role:"contentinfo"}},{id:"page-no-duplicate-main",evaluate:"page-no-duplicate-evaluate",after:"page-no-duplicate-after",options:{selector:"main:not([role]), [role='main']"}},{id:"tabindex",evaluate:"tabindex-evaluate"},{id:"alt-space-value",evaluate:"alt-space-value-evaluate"},{id:"duplicate-img-label",evaluate:"duplicate-img-label-evaluate",options:{parentSelector:"button, [role=button], a[href], p, li, td, th"}},{id:"explicit-label",evaluate:"explicit-evaluate"},{id:"help-same-as-label",evaluate:"help-same-as-label-evaluate"},{id:"hidden-explicit-label",evaluate:"hidden-explicit-label-evaluate"},{id:"implicit-label",evaluate:"implicit-evaluate"},{id:"label-content-name-mismatch",evaluate:"label-content-name-mismatch-evaluate",options:{pixelThreshold:.1,occurrenceThreshold:3}},{id:"multiple-label",evaluate:"multiple-label-evaluate"},{id:"title-only",evaluate:"title-only-evaluate"},{id:"landmark-is-unique",evaluate:"landmark-is-unique-evaluate",after:"landmark-is-unique-after"},{id:"has-lang",evaluate:"has-lang-evaluate",options:{attributes:["lang","xml:lang"]}},{id:"valid-lang",evaluate:"valid-lang-evaluate",options:{attributes:["lang","xml:lang"]}},{id:"xml-lang-mismatch",evaluate:"xml-lang-mismatch-evaluate"},{id:"dlitem",evaluate:"dlitem-evaluate"},{id:"listitem",evaluate:"listitem-evaluate"},{id:"only-dlitems",evaluate:"invalid-children-evaluate",options:{validRoles:["definition","term","listitem"],validNodeNames:["dt","dd"],divGroups:!0}},{id:"only-listitems",evaluate:"invalid-children-evaluate",options:{validRoles:["listitem"],validNodeNames:["li"]}},{id:"structured-dlitems",evaluate:"structured-dlitems-evaluate"},{id:"caption",evaluate:"caption-evaluate"},{id:"frame-tested",evaluate:"frame-tested-evaluate",after:"frame-tested-after",options:{isViolation:!1}},{id:"no-autoplay-audio",evaluate:"no-autoplay-audio-evaluate",options:{allowedDuration:3}},{id:"css-orientation-lock",evaluate:"css-orientation-lock-evaluate",options:{degreeThreshold:2}},{id:"meta-viewport-large",evaluate:"meta-viewport-scale-evaluate",options:{scaleMinimum:5,lowerBound:2}},{id:"meta-viewport",evaluate:"meta-viewport-scale-evaluate",options:{scaleMinimum:2}},{id:"target-offset",evaluate:"target-offset-evaluate",options:{minOffset:24}},{id:"target-size",evaluate:"target-size-evaluate",options:{minSize:24}},{id:"header-present",evaluate:"has-descendant-evaluate",after:"has-descendant-after",options:{selector:":is(h1, h2, h3, h4, h5, h6):not([role]), [role=heading]"}},{id:"heading-order",evaluate:"heading-order-evaluate",after:"heading-order-after"},{id:"identical-links-same-purpose",evaluate:"identical-links-same-purpose-evaluate",after:"identical-links-same-purpose-after"},{id:"internal-link-present",evaluate:"internal-link-present-evaluate"},{id:"landmark",evaluate:"has-descendant-evaluate",options:{selector:"main, [role=main]"}},{id:"meta-refresh-no-exceptions",evaluate:"meta-refresh-evaluate",options:{minDelay:72e3,maxDelay:!1}},{id:"meta-refresh",evaluate:"meta-refresh-evaluate",options:{minDelay:0,maxDelay:72e3}},{id:"p-as-heading",evaluate:"p-as-heading-evaluate",options:{margins:[{weight:150,italic:!0},{weight:150,size:1.15},{italic:!0,size:1.15},{size:1.4}],passLength:1,failLength:.5}},{id:"region",evaluate:"region-evaluate",after:"region-after",options:{regionMatcher:"dialog, [role=dialog], [role=alertdialog], svg"}},{id:"skip-link",evaluate:"skip-link-evaluate"},{id:"unique-frame-title",evaluate:"unique-frame-title-evaluate",after:"unique-frame-title-after"},{id:"duplicate-id-active",evaluate:"duplicate-id-evaluate",after:"duplicate-id-after"},{id:"duplicate-id-aria",evaluate:"duplicate-id-evaluate",after:"duplicate-id-after"},{id:"duplicate-id",evaluate:"duplicate-id-evaluate",after:"duplicate-id-after"},{id:"aria-label",evaluate:"aria-label-evaluate"},{id:"aria-labelledby",evaluate:"aria-labelledby-evaluate"},{id:"avoid-inline-spacing",evaluate:"avoid-inline-spacing-evaluate",options:{cssProperties:["line-height","letter-spacing","word-spacing"]}},{id:"button-has-visible-text",evaluate:"has-text-content-evaluate"},{id:"doc-has-title",evaluate:"doc-has-title-evaluate"},{id:"error-occurred",evaluate:"exists-evaluate"},{id:"exists",evaluate:"exists-evaluate"},{id:"has-alt",evaluate:"has-alt-evaluate"},{id:"has-visible-text",evaluate:"has-text-content-evaluate"},{id:"important-letter-spacing",evaluate:"inline-style-property-evaluate",options:{cssProperty:"letter-spacing",minValue:.12}},{id:"important-line-height",evaluate:"inline-style-property-evaluate",options:{multiLineOnly:!0,cssProperty:"line-height",minValue:1.5,normalValue:1}},{id:"important-word-spacing",evaluate:"inline-style-property-evaluate",options:{cssProperty:"word-spacing",minValue:.16}},{id:"is-on-screen",evaluate:"is-on-screen-evaluate"},{id:"non-empty-alt",evaluate:"attr-non-space-content-evaluate",options:{attribute:"alt"}},{id:"non-empty-if-present",evaluate:"non-empty-if-present-evaluate"},{id:"non-empty-placeholder",evaluate:"attr-non-space-content-evaluate",options:{attribute:"placeholder"}},{id:"non-empty-title",evaluate:"attr-non-space-content-evaluate",options:{attribute:"title"}},{id:"non-empty-value",evaluate:"attr-non-space-content-evaluate",options:{attribute:"value"}},{id:"presentational-role",evaluate:"presentational-role-evaluate"},{id:"role-none",evaluate:"matches-definition-evaluate",deprecated:!0,options:{matcher:{attributes:{role:"none"}}}},{id:"role-presentation",evaluate:"matches-definition-evaluate",deprecated:!0,options:{matcher:{attributes:{role:"presentation"}}}},{id:"svg-non-empty-title",evaluate:"svg-non-empty-title-evaluate"},{id:"caption-faked",evaluate:"caption-faked-evaluate"},{id:"html5-scope",evaluate:"html5-scope-evaluate"},{id:"same-caption-summary",evaluate:"same-caption-summary-evaluate"},{id:"scope-value",evaluate:"scope-value-evaluate",options:{values:["row","col","rowgroup","colgroup"]}},{id:"td-has-header",evaluate:"td-has-header-evaluate"},{id:"td-headers-attr",evaluate:"td-headers-attr-evaluate"},{id:"th-has-data-cells",evaluate:"th-has-data-cells-evaluate"},{id:"hidden-content",evaluate:"hidden-content-evaluate"}]})}("object"==typeof window?window:this);`;
      }
    });
    init_page_functions = __esm2({
      "core/lib/page-functions.js"() {
        "use strict";
        init_process_global();
        init_module();
        init_util();
        __name(wrapRuntimeEvalErrorInBrowser, "wrapRuntimeEvalErrorInBrowser");
        __name(getElementsInDocument2, "getElementsInDocument");
        __name(getOuterHTMLSnippet, "getOuterHTMLSnippet");
        __name(computeBenchmarkIndex, "computeBenchmarkIndex");
        __name(getNodePath, "getNodePath");
        __name(getNodeSelector, "getNodeSelector");
        __name(isPositionFixed, "isPositionFixed");
        __name(getNodeLabel, "getNodeLabel");
        __name(getBoundingClientRect, "getBoundingClientRect");
        __name(wrapRequestIdleCallback, "wrapRequestIdleCallback");
        __name(getNodeDetails2, "getNodeDetails");
        __name(truncate, "truncate");
        __name(isBundledEnvironment, "isBundledEnvironment");
        esbuildFunctionWrapperString = createEsbuildFunctionWrapper();
        __name(createEsbuildFunctionWrapper, "createEsbuildFunctionWrapper");
        __name(getRuntimeFunctionName, "getRuntimeFunctionName");
        names = {
          truncate: getRuntimeFunctionName(truncate),
          getNodeLabel: getRuntimeFunctionName(getNodeLabel),
          getOuterHTMLSnippet: getRuntimeFunctionName(getOuterHTMLSnippet),
          getNodeDetails: getRuntimeFunctionName(getNodeDetails2)
        };
        truncate.toString = () => `function ${names.truncate}(string, characterLimit) {
  const Util = { ${Util.truncate} };
  return Util.truncate(string, characterLimit);
}`;
        getNodeLabelRawString = getNodeLabel.toString();
        getNodeLabel.toString = () => `function ${names.getNodeLabel}(element) {
  ${truncate};
  return (${getNodeLabelRawString})(element);
}`;
        getOuterHTMLSnippetRawString = getOuterHTMLSnippet.toString();
        getOuterHTMLSnippet.toString = () => `function ${names.getOuterHTMLSnippet}(element, ignoreAttrs = [], snippetCharacterLimit = 500) {
  ${truncate};
  return (${getOuterHTMLSnippetRawString})(element, ignoreAttrs, snippetCharacterLimit);
}`;
        getNodeDetailsRawString = getNodeDetails2.toString();
        getNodeDetails2.toString = () => `function ${names.getNodeDetails}(element) {
  ${truncate};
  ${getNodePath};
  ${getNodeSelector};
  ${getBoundingClientRect};
  ${getOuterHTMLSnippetRawString};
  ${getNodeLabelRawString};
  return (${getNodeDetailsRawString})(element);
}`;
        pageFunctions = {
          wrapRuntimeEvalErrorInBrowser,
          getElementsInDocument: getElementsInDocument2,
          getOuterHTMLSnippet,
          computeBenchmarkIndex,
          getNodeDetails: getNodeDetails2,
          getNodePath,
          getNodeSelector,
          getNodeLabel,
          isPositionFixed,
          wrapRequestIdleCallback,
          getBoundingClientRect,
          truncate,
          esbuildFunctionWrapperString,
          getRuntimeFunctionName
        };
      }
    });
    accessibility_exports = {};
    __export2(accessibility_exports, {
      default: () => accessibility_default
    });
    init_accessibility = __esm2({
      "core/gather/gatherers/accessibility.js"() {
        "use strict";
        init_process_global();
        init_base_gatherer();
        init_axe();
        init_page_functions();
        __name(runA11yChecks, "runA11yChecks");
        __name(runA11yChecksAndResetScroll, "runA11yChecksAndResetScroll");
        __name(createAxeRuleResultArtifact, "createAxeRuleResultArtifact");
        Accessibility = class extends base_gatherer_default {
          static {
            __name(this, "Accessibility");
          }
          /** @type {LH.Gatherer.GathererMeta} */
          meta = {
            supportedModes: ["snapshot", "navigation"]
          };
          static pageFns = {
            runA11yChecks,
            createAxeRuleResultArtifact
          };
          /**
           * @param {LH.Gatherer.Context} passContext
           * @return {Promise<LH.Artifacts.Accessibility>}
           */
          getArtifact(passContext) {
            const driver = passContext.driver;
            return driver.executionContext.evaluate(runA11yChecksAndResetScroll, {
              args: [],
              useIsolation: true,
              deps: [
                axeSource,
                pageFunctions.getNodeDetails,
                createAxeRuleResultArtifact,
                runA11yChecks
              ]
            });
          }
        };
        accessibility_default = Accessibility;
      }
    });
    init_dom = __esm2({
      "core/gather/driver/dom.js"() {
        "use strict";
        init_process_global();
        __name(handlePotentialMissingNodeError, "handlePotentialMissingNodeError");
        __name(resolveDevtoolsNodePathToObjectId, "resolveDevtoolsNodePathToObjectId");
      }
    });
    anchor_elements_exports = {};
    __export2(anchor_elements_exports, {
      default: () => anchor_elements_default
    });
    init_anchor_elements = __esm2({
      "core/gather/gatherers/anchor-elements.js"() {
        "use strict";
        init_process_global();
        init_base_gatherer();
        init_page_functions();
        init_dom();
        __name(collectAnchorElements, "collectAnchorElements");
        __name(getEventListeners, "getEventListeners");
        AnchorElements = class extends base_gatherer_default {
          static {
            __name(this, "AnchorElements");
          }
          /** @type {LH.Gatherer.GathererMeta} */
          meta = {
            supportedModes: ["snapshot", "navigation"]
          };
          /**
           * @param {LH.Gatherer.Context} passContext
           * @return {Promise<LH.Artifacts['AnchorElements']>}
           */
          async getArtifact(passContext) {
            const session = passContext.driver.defaultSession;
            const anchors = await passContext.driver.executionContext.evaluate(collectAnchorElements, {
              args: [],
              useIsolation: true,
              deps: [
                pageFunctions.getElementsInDocument,
                pageFunctions.getNodeDetails
              ]
            });
            await session.sendCommand("DOM.enable");
            await session.sendCommand("DOM.getDocument", { depth: -1, pierce: true });
            const anchorsWithEventListeners = anchors.map((anchor) => {
              return getEventListeners(session, anchor.node.devtoolsNodePath).then((listeners) => {
                return {
                  ...anchor,
                  listeners
                };
              });
            });
            const result = await Promise.all(anchorsWithEventListeners);
            await session.sendCommand("DOM.disable");
            return result;
          }
        };
        anchor_elements_default = AnchorElements;
      }
    });
    console_messages_exports = {};
    __export2(console_messages_exports, {
      default: () => console_messages_default
    });
    init_console_messages = __esm2({
      "core/gather/gatherers/console-messages.js"() {
        "use strict";
        init_process_global();
        init_base_gatherer();
        __name(remoteObjectToString, "remoteObjectToString");
        ConsoleMessages = class extends base_gatherer_default {
          static {
            __name(this, "ConsoleMessages");
          }
          /** @type {LH.Gatherer.GathererMeta} */
          meta = {
            supportedModes: ["timespan", "navigation"]
          };
          constructor() {
            super();
            this._logEntries = [];
            this._onConsoleAPICalled = this.onConsoleAPICalled.bind(this);
            this._onExceptionThrown = this.onExceptionThrown.bind(this);
            this._onLogEntryAdded = this.onLogEntry.bind(this);
          }
          /**
           * Handles events for when a script invokes a console API.
           * @param {LH.Crdp.Runtime.ConsoleAPICalledEvent} event
           */
          onConsoleAPICalled(event) {
            const { type: type2 } = event;
            if (type2 !== "warning" && type2 !== "error") {
              return;
            }
            const args2 = event.args || [];
            const text = args2.map(remoteObjectToString).join(" ");
            if (!text && !event.stackTrace) {
              return;
            }
            const { url, lineNumber, columnNumber } = event.stackTrace?.callFrames[0] || {};
            const consoleMessage = {
              eventType: "consoleAPI",
              source: type2 === "warning" ? "console.warn" : "console.error",
              level: type2,
              text,
              stackTrace: event.stackTrace,
              timestamp: event.timestamp,
              url,
              lineNumber,
              columnNumber
            };
            this._logEntries.push(consoleMessage);
          }
          /**
           * Handles exception thrown events.
           * @param {LH.Crdp.Runtime.ExceptionThrownEvent} event
           */
          onExceptionThrown(event) {
            const text = event.exceptionDetails.exception ? event.exceptionDetails.exception.description : event.exceptionDetails.text;
            if (!text) {
              return;
            }
            const consoleMessage = {
              eventType: "exception",
              source: "exception",
              level: "error",
              text,
              stackTrace: event.exceptionDetails.stackTrace,
              timestamp: event.timestamp,
              url: event.exceptionDetails.url,
              scriptId: event.exceptionDetails.scriptId,
              lineNumber: event.exceptionDetails.lineNumber,
              columnNumber: event.exceptionDetails.columnNumber
            };
            this._logEntries.push(consoleMessage);
          }
          /**
           * Handles browser reports logged to the console, including interventions,
           * deprecations, violations, and more.
           * @param {LH.Crdp.Log.EntryAddedEvent} event
           */
          onLogEntry(event) {
            const { source: source2, level, text, stackTrace, timestamp, url, lineNumber } = event.entry;
            const firstStackFrame = event.entry.stackTrace?.callFrames[0];
            this._logEntries.push({
              eventType: "protocolLog",
              source: source2,
              level,
              text,
              stackTrace,
              timestamp,
              url,
              scriptId: firstStackFrame?.scriptId,
              lineNumber,
              columnNumber: firstStackFrame?.columnNumber
            });
          }
          /**
           * @param {LH.Gatherer.Context} passContext
           */
          async startInstrumentation(passContext) {
            const session = passContext.driver.defaultSession;
            session.on("Log.entryAdded", this._onLogEntryAdded);
            await session.sendCommand("Log.enable");
            await session.sendCommand("Log.startViolationsReport", {
              config: [{ name: "discouragedAPIUse", threshold: -1 }]
            });
            session.on("Runtime.consoleAPICalled", this._onConsoleAPICalled);
            session.on("Runtime.exceptionThrown", this._onExceptionThrown);
            await session.sendCommand("Runtime.enable");
          }
          /**
           * @param {LH.Gatherer.Context} passContext
           * @return {Promise<void>}
           */
          async stopInstrumentation({ driver }) {
            await driver.defaultSession.sendCommand("Log.stopViolationsReport");
            await driver.defaultSession.off("Log.entryAdded", this._onLogEntryAdded);
            await driver.defaultSession.sendCommand("Log.disable");
            await driver.defaultSession.off("Runtime.consoleAPICalled", this._onConsoleAPICalled);
            await driver.defaultSession.off("Runtime.exceptionThrown", this._onExceptionThrown);
            await driver.defaultSession.sendCommand("Runtime.disable");
          }
          /**
           * @return {Promise<LH.Artifacts['ConsoleMessages']>}
           */
          async getArtifact() {
            return this._logEntries;
          }
        };
        console_messages_default = ConsoleMessages;
      }
    });
    devtools_log_exports = {};
    __export2(devtools_log_exports, {
      DevtoolsMessageLog: () => DevtoolsMessageLog,
      default: () => devtools_log_default
    });
    init_devtools_log = __esm2({
      "core/gather/gatherers/devtools-log.js"() {
        "use strict";
        init_process_global();
        init_base_gatherer();
        DevtoolsLog = class _DevtoolsLog extends base_gatherer_default {
          static {
            __name(this, "DevtoolsLog");
          }
          static symbol = Symbol("DevtoolsLog");
          /** @type {LH.Gatherer.GathererMeta} */
          meta = {
            symbol: _DevtoolsLog.symbol,
            supportedModes: ["timespan", "navigation"]
          };
          constructor() {
            super();
            this._messageLog = new DevtoolsMessageLog(/^(Page|Network|Target|Runtime)\./);
            this._onProtocolMessage = (e) => this._messageLog.record(e);
          }
          /**
           * @param {LH.Gatherer.Context} passContext
           */
          async startSensitiveInstrumentation({ driver }) {
            this._messageLog.reset();
            this._messageLog.beginRecording();
            driver.targetManager.on("protocolevent", this._onProtocolMessage);
            await driver.defaultSession.sendCommand("Page.enable");
          }
          /**
           * @param {LH.Gatherer.Context} passContext
           */
          async stopSensitiveInstrumentation({ driver }) {
            this._messageLog.endRecording();
            driver.targetManager.off("protocolevent", this._onProtocolMessage);
          }
          /**
           * @return {LH.Artifacts['DevtoolsLog']}
           */
          getDebugData() {
            return this._messageLog.messages;
          }
          /**
           * @return {Promise<LH.Artifacts['DevtoolsLog']>}
           */
          async getArtifact() {
            return this._messageLog.messages;
          }
        };
        DevtoolsMessageLog = class {
          static {
            __name(this, "DevtoolsMessageLog");
          }
          /**
           * @param {RegExp=} regexFilter
           */
          constructor(regexFilter) {
            this._filter = regexFilter;
            this._messages = [];
            this._isRecording = false;
          }
          /**
           * @return {LH.DevtoolsLog}
           */
          get messages() {
            return this._messages;
          }
          reset() {
            this._messages = [];
          }
          beginRecording() {
            this._isRecording = true;
          }
          endRecording() {
            this._isRecording = false;
          }
          /**
           * Records a message if method matches filter and recording has been started.
           * @param {LH.Protocol.RawEventMessage} message
           */
          record(message) {
            if (!this._isRecording)
              return;
            if (typeof message.method !== "string")
              return;
            if (this._filter && !this._filter.test(message.method))
              return;
            this._messages.push(message);
          }
        };
        devtools_log_default = DevtoolsLog;
      }
    });
    doctype_exports = {};
    __export2(doctype_exports, {
      default: () => doctype_default
    });
    init_doctype = __esm2({
      "core/gather/gatherers/dobetterweb/doctype.js"() {
        "use strict";
        init_process_global();
        init_base_gatherer();
        __name(getDoctype, "getDoctype");
        Doctype = class extends base_gatherer_default {
          static {
            __name(this, "Doctype");
          }
          /** @type {LH.Gatherer.GathererMeta} */
          meta = {
            supportedModes: ["snapshot", "navigation"]
          };
          /**
           * @param {LH.Gatherer.Context} passContext
           * @return {Promise<LH.Artifacts['Doctype']>}
           */
          getArtifact(passContext) {
            const driver = passContext.driver;
            return driver.executionContext.evaluate(getDoctype, {
              args: [],
              useIsolation: true
            });
          }
        };
        doctype_default = Doctype;
      }
    });
    image_elements_exports = {};
    __export2(image_elements_exports, {
      default: () => image_elements_default
    });
    init_image_elements = __esm2({
      "core/gather/gatherers/image-elements.js"() {
        "use strict";
        init_process_global();
        init_lighthouse_logger();
        init_base_gatherer();
        init_page_functions();
        __name(getClientRect, "getClientRect");
        __name(getPosition, "getPosition");
        __name(getHTMLImages, "getHTMLImages");
        __name(getCSSImages, "getCSSImages");
        __name(collectImageElementInfo, "collectImageElementInfo");
        __name(determineNaturalSize, "determineNaturalSize");
        __name(findSizeDeclaration, "findSizeDeclaration");
        __name(findMostSpecificMatchedCSSRule, "findMostSpecificMatchedCSSRule");
        __name(findMostSpecificCSSRule, "findMostSpecificCSSRule");
        __name(getEffectiveSizingRule, "getEffectiveSizingRule");
        __name(getPixelArea, "getPixelArea");
        ImageElements = class extends base_gatherer_default {
          static {
            __name(this, "ImageElements");
          }
          /** @type {LH.Gatherer.GathererMeta} */
          meta = {
            supportedModes: ["snapshot", "timespan", "navigation"]
          };
          constructor() {
            super();
            this._naturalSizeCache = /* @__PURE__ */ new Map();
          }
          /**
           * @param {LH.Gatherer.Driver} driver
           * @param {LH.Artifacts.ImageElement} element
           */
          async fetchElementWithSizeInformation(driver, element) {
            const url = element.src;
            let size = this._naturalSizeCache.get(url);
            if (!size) {
              try {
                driver.defaultSession.setNextProtocolTimeout(250);
                size = await driver.executionContext.evaluate(determineNaturalSize, {
                  args: [url],
                  useIsolation: true
                });
                this._naturalSizeCache.set(url, size);
              } catch (_) {
              }
            }
            if (!size)
              return;
            element.naturalDimensions = { width: size.naturalWidth, height: size.naturalHeight };
          }
          /**
           * Images might be sized via CSS. In order to compute unsized-images failures, we need to collect
           * matched CSS rules to see if this is the case.
           * @url http://go/dwoqq (googlers only)
           * @param {LH.Gatherer.ProtocolSession} session
           * @param {string} devtoolsNodePath
           * @param {LH.Artifacts.ImageElement} element
           */
          async fetchSourceRules(session, devtoolsNodePath, element) {
            try {
              const { nodeId } = await session.sendCommand("DOM.pushNodeByPathToFrontend", {
                path: devtoolsNodePath
              });
              if (!nodeId)
                return;
              const matchedRules = await session.sendCommand("CSS.getMatchedStylesForNode", {
                nodeId
              });
              const width = getEffectiveSizingRule(matchedRules, "width");
              const height = getEffectiveSizingRule(matchedRules, "height");
              const aspectRatio2 = getEffectiveSizingRule(matchedRules, "aspect-ratio");
              element.cssEffectiveRules = { width, height, aspectRatio: aspectRatio2 };
            } catch (err) {
              if (/No node.*found/.test(err.message))
                return;
              throw err;
            }
          }
          /**
           *
           * @param {LH.Gatherer.Driver} driver
           * @param {LH.Artifacts.ImageElement[]} elements
           */
          async collectExtraDetails(driver, elements) {
            let reachedGatheringBudget = false;
            setTimeout((_) => reachedGatheringBudget = true, 5e3);
            let skippedCount = 0;
            for (const element of elements) {
              if (reachedGatheringBudget) {
                skippedCount++;
                continue;
              }
              if (!element.isInShadowDOM && !element.isCss) {
                await this.fetchSourceRules(driver.defaultSession, element.node.devtoolsNodePath, element);
              }
              if (element.isPicture || element.isCss || element.srcset) {
                await this.fetchElementWithSizeInformation(driver, element);
              }
            }
            if (reachedGatheringBudget) {
              lighthouse_logger_default.warn("ImageElements", `Reached gathering budget of 5s. Skipped extra details for ${skippedCount}/${elements.length}`);
            }
          }
          /**
           * @param {LH.Gatherer.Context} context
           * @return {Promise<LH.Artifacts['ImageElements']>}
           */
          async getArtifact(context2) {
            const session = context2.driver.defaultSession;
            const executionContext = context2.driver.executionContext;
            const elements = await executionContext.evaluate(collectImageElementInfo, {
              args: [],
              useIsolation: true,
              deps: [
                pageFunctions.getElementsInDocument,
                pageFunctions.getBoundingClientRect,
                pageFunctions.getNodeDetails,
                getClientRect,
                getPosition,
                getHTMLImages,
                getCSSImages
              ]
            });
            await Promise.all([
              session.sendCommand("DOM.enable"),
              session.sendCommand("CSS.enable"),
              session.sendCommand("DOM.getDocument", { depth: -1, pierce: true })
            ]);
            elements.sort((a, b) => getPixelArea(b) - getPixelArea(a));
            await this.collectExtraDetails(context2.driver, elements);
            await Promise.all([
              session.sendCommand("DOM.disable"),
              session.sendCommand("CSS.disable")
            ]);
            return elements;
          }
        };
        image_elements_default = ImageElements;
      }
    });
    inputs_exports = {};
    __export2(inputs_exports, {
      default: () => inputs_default
    });
    init_inputs = __esm2({
      "core/gather/gatherers/inputs.js"() {
        "use strict";
        init_process_global();
        init_base_gatherer();
        init_page_functions();
        __name(collectElements, "collectElements");
        Inputs = class extends base_gatherer_default {
          static {
            __name(this, "Inputs");
          }
          /** @type {LH.Gatherer.GathererMeta} */
          meta = {
            supportedModes: ["snapshot", "navigation"]
          };
          /**
           * @param {LH.Gatherer.Context} passContext
           * @return {Promise<LH.Artifacts['Inputs']>}
           */
          async getArtifact(passContext) {
            return passContext.driver.executionContext.evaluate(collectElements, {
              args: [],
              useIsolation: true,
              deps: [
                pageFunctions.getElementsInDocument,
                pageFunctions.getNodeDetails
              ]
            });
          }
        };
        inputs_default = Inputs;
      }
    });
    inspector_issues_exports = {};
    __export2(inspector_issues_exports, {
      default: () => inspector_issues_default
    });
    init_inspector_issues = __esm2({
      "core/gather/gatherers/inspector-issues.js"() {
        "use strict";
        init_process_global();
        init_base_gatherer();
        init_network_records();
        init_devtools_log();
        InspectorIssues = class extends base_gatherer_default {
          static {
            __name(this, "InspectorIssues");
          }
          /** @type {LH.Gatherer.GathererMeta<'DevtoolsLog'>} */
          meta = {
            supportedModes: ["timespan", "navigation"],
            dependencies: { DevtoolsLog: devtools_log_default.symbol }
          };
          constructor() {
            super();
            this._issues = [];
            this._onIssueAdded = this.onIssueAdded.bind(this);
          }
          /**
           * @param {LH.Crdp.Audits.IssueAddedEvent} entry
           */
          onIssueAdded(entry) {
            this._issues.push(entry.issue);
          }
          /**
           * @param {LH.Gatherer.Context} context
           */
          async startInstrumentation(context2) {
            const session = context2.driver.defaultSession;
            session.on("Audits.issueAdded", this._onIssueAdded);
            await session.sendCommand("Audits.enable");
          }
          /**
           * @param {LH.Gatherer.Context} context
           */
          async stopInstrumentation(context2) {
            const session = context2.driver.defaultSession;
            session.off("Audits.issueAdded", this._onIssueAdded);
            await session.sendCommand("Audits.disable");
          }
          /**
           * @param {LH.Gatherer.Context<'DevtoolsLog'>} context
           * @return {Promise<LH.Artifacts.InspectorIssues>}
           */
          async getArtifact(context2) {
            const devtoolsLog = context2.dependencies.DevtoolsLog;
            const networkRecords = await NetworkRecordsComputed.request(devtoolsLog, context2);
            const artifact = {};
            for (const issue2 of this._issues) {
              const detailsKey = (
                /** @type {keyof LH.Crdp.Audits.InspectorIssueDetails} */
                Object.keys(issue2.details)[0]
              );
              const details = issue2.details[detailsKey];
              if (!details) {
                continue;
              }
              const artifactKey = (
                /** @type {LH.Artifacts.InspectorIssuesKeyToArtifactKey<typeof detailsKey>} */
                detailsKey.replace("Details", "")
              );
              const requestId = "request" in details && details.request && details.request.requestId;
              if (requestId) {
                if (networkRecords.find((req) => req.requestId === requestId)) {
                  if (!artifact[artifactKey]) {
                    artifact[artifactKey] = [];
                  }
                  artifact[artifactKey].push(details);
                }
              } else {
                if (!artifact[artifactKey]) {
                  artifact[artifactKey] = [];
                }
                artifact[artifactKey].push(details);
              }
            }
            return artifact;
          }
        };
        inspector_issues_default = InspectorIssues;
      }
    });
    require_link = __commonJS({
      "node_modules/http-link-header/lib/link.js"(exports2, module2) {
        "use strict";
        init_process_global();
        var COMPATIBLE_ENCODING_PATTERN = /^utf-?8|ascii|utf-?16-?le|ucs-?2|base-?64|latin-?1$/i;
        var WS_TRIM_PATTERN = /^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g;
        var WS_CHAR_PATTERN = /\s|\uFEFF|\xA0/;
        var WS_FOLD_PATTERN = /\r?\n[\x20\x09]+/g;
        var DELIMITER_PATTERN = /[;,"]/;
        var WS_DELIMITER_PATTERN = /[;,"]|\s/;
        var TOKEN_PATTERN = /^[!#$%&'*+\-\.^_`|~\da-zA-Z]+$/;
        var STATE = {
          IDLE: 1 << 0,
          URI: 1 << 1,
          ATTR: 1 << 2
        };
        function trim(value) {
          return value.replace(WS_TRIM_PATTERN, "");
        }
        __name(trim, "trim");
        function hasWhitespace(value) {
          return WS_CHAR_PATTERN.test(value);
        }
        __name(hasWhitespace, "hasWhitespace");
        function skipWhitespace(value, offset) {
          while (hasWhitespace(value[offset])) {
            offset++;
          }
          return offset;
        }
        __name(skipWhitespace, "skipWhitespace");
        function needsQuotes(value) {
          return WS_DELIMITER_PATTERN.test(value) || !TOKEN_PATTERN.test(value);
        }
        __name(needsQuotes, "needsQuotes");
        function shallowCompareObjects(object1, object2) {
          return Object.keys(object1).length === Object.keys(object2).length && Object.keys(object1).every((key) => key in object2 && object1[key] === object2[key]);
        }
        __name(shallowCompareObjects, "shallowCompareObjects");
        var Link = class _Link {
          static {
            __name(this, "Link");
          }
          /**
           * Link
           * @constructor
           * @param {String} [value]
           * @returns {Link}
           */
          constructor(value) {
            this.refs = [];
            if (value) {
              this.parse(value);
            }
          }
          /**
           * Get refs with given relation type
           * @param {String} value
           * @returns {Array<Object>}
           */
          rel(value) {
            var links = [];
            var type2 = value.toLowerCase();
            for (var i = 0; i < this.refs.length; i++) {
              if (this.refs[i].rel.toLowerCase() === type2) {
                links.push(this.refs[i]);
              }
            }
            return links;
          }
          /**
           * Get refs where given attribute has a given value
           * @param {String} attr
           * @param {String} value
           * @returns {Array<Object>}
           */
          get(attr, value) {
            attr = attr.toLowerCase();
            var links = [];
            for (var i = 0; i < this.refs.length; i++) {
              if (this.refs[i][attr] === value) {
                links.push(this.refs[i]);
              }
            }
            return links;
          }
          /** Sets a reference. */
          set(link2) {
            this.refs.push(link2);
            return this;
          }
          /**
           * Sets a reference if a reference with similar properties isn’t already set.
           */
          setUnique(link2) {
            if (!this.refs.some((ref2) => shallowCompareObjects(ref2, link2))) {
              this.refs.push(link2);
            }
            return this;
          }
          has(attr, value) {
            attr = attr.toLowerCase();
            for (var i = 0; i < this.refs.length; i++) {
              if (this.refs[i][attr] === value) {
                return true;
              }
            }
            return false;
          }
          parse(value, offset) {
            offset = offset || 0;
            value = offset ? value.slice(offset) : value;
            value = trim(value).replace(WS_FOLD_PATTERN, "");
            var state = STATE.IDLE;
            var length = value.length;
            var offset = 0;
            var ref2 = null;
            while (offset < length) {
              if (state === STATE.IDLE) {
                if (hasWhitespace(value[offset])) {
                  offset++;
                  continue;
                } else if (value[offset] === "<") {
                  if (ref2 != null) {
                    ref2.rel != null ? this.refs.push(..._Link.expandRelations(ref2)) : this.refs.push(ref2);
                  }
                  var end = value.indexOf(">", offset);
                  if (end === -1)
                    throw new Error("Expected end of URI delimiter at offset " + offset);
                  ref2 = { uri: value.slice(offset + 1, end) };
                  offset = end;
                  state = STATE.URI;
                } else {
                  throw new Error('Unexpected character "' + value[offset] + '" at offset ' + offset);
                }
                offset++;
              } else if (state === STATE.URI) {
                if (hasWhitespace(value[offset])) {
                  offset++;
                  continue;
                } else if (value[offset] === ";") {
                  state = STATE.ATTR;
                  offset++;
                } else if (value[offset] === ",") {
                  state = STATE.IDLE;
                  offset++;
                } else {
                  throw new Error('Unexpected character "' + value[offset] + '" at offset ' + offset);
                }
              } else if (state === STATE.ATTR) {
                if (value[offset] === ";" || hasWhitespace(value[offset])) {
                  offset++;
                  continue;
                }
                var end = value.indexOf("=", offset);
                if (end === -1)
                  end = value.indexOf(";", offset);
                if (end === -1)
                  end = value.length;
                var attr = trim(value.slice(offset, end)).toLowerCase();
                var attrValue = "";
                offset = end + 1;
                offset = skipWhitespace(value, offset);
                if (value[offset] === '"') {
                  offset++;
                  while (offset < length) {
                    if (value[offset] === '"') {
                      offset++;
                      break;
                    }
                    if (value[offset] === "\\") {
                      offset++;
                    }
                    attrValue += value[offset];
                    offset++;
                  }
                } else {
                  var end = offset + 1;
                  while (!DELIMITER_PATTERN.test(value[end]) && end < length) {
                    end++;
                  }
                  attrValue = value.slice(offset, end);
                  offset = end;
                }
                if (ref2[attr] && _Link.isSingleOccurenceAttr(attr)) {
                } else if (attr[attr.length - 1] === "*") {
                  ref2[attr] = _Link.parseExtendedValue(attrValue);
                } else {
                  attrValue = attr === "type" ? attrValue.toLowerCase() : attrValue;
                  if (ref2[attr] != null) {
                    if (Array.isArray(ref2[attr])) {
                      ref2[attr].push(attrValue);
                    } else {
                      ref2[attr] = [ref2[attr], attrValue];
                    }
                  } else {
                    ref2[attr] = attrValue;
                  }
                }
                switch (value[offset]) {
                  case ",":
                    state = STATE.IDLE;
                    break;
                  case ";":
                    state = STATE.ATTR;
                    break;
                }
                offset++;
              } else {
                throw new Error('Unknown parser state "' + state + '"');
              }
            }
            if (ref2 != null) {
              ref2.rel != null ? this.refs.push(..._Link.expandRelations(ref2)) : this.refs.push(ref2);
            }
            ref2 = null;
            return this;
          }
          toString() {
            var refs = [];
            var link2 = "";
            var ref2 = null;
            for (var i = 0; i < this.refs.length; i++) {
              ref2 = this.refs[i];
              link2 = Object.keys(this.refs[i]).reduce(function(link22, attr) {
                if (attr === "uri")
                  return link22;
                return link22 + "; " + _Link.formatAttribute(attr, ref2[attr]);
              }, "<" + ref2.uri + ">");
              refs.push(link2);
            }
            return refs.join(", ");
          }
        };
        Link.isCompatibleEncoding = function(value) {
          return COMPATIBLE_ENCODING_PATTERN.test(value);
        };
        Link.parse = function(value, offset) {
          return new Link().parse(value, offset);
        };
        Link.isSingleOccurenceAttr = function(attr) {
          return attr === "rel" || attr === "type" || attr === "media" || attr === "title" || attr === "title*";
        };
        Link.isTokenAttr = function(attr) {
          return attr === "rel" || attr === "type" || attr === "anchor";
        };
        Link.escapeQuotes = function(value) {
          return value.replace(/"/g, '\\"');
        };
        Link.expandRelations = function(ref2) {
          var rels = ref2.rel.split(" ");
          return rels.map(function(rel) {
            var value = Object.assign({}, ref2);
            value.rel = rel;
            return value;
          });
        };
        Link.parseExtendedValue = function(value) {
          var parts = /([^']+)?(?:'([^']*)')?(.+)/.exec(value);
          return {
            language: parts[2].toLowerCase(),
            encoding: Link.isCompatibleEncoding(parts[1]) ? null : parts[1].toLowerCase(),
            value: Link.isCompatibleEncoding(parts[1]) ? decodeURIComponent(parts[3]) : parts[3]
          };
        };
        Link.formatExtendedAttribute = function(attr, data312) {
          var encoding = (data312.encoding || "utf-8").toUpperCase();
          var language = data312.language || "en";
          var encodedValue = "";
          if (Buffer.isBuffer(data312.value) && Link.isCompatibleEncoding(encoding)) {
            encodedValue = data312.value.toString(encoding);
          } else if (Buffer.isBuffer(data312.value)) {
            encodedValue = data312.value.toString("hex").replace(/[0-9a-f]{2}/gi, "%$1");
          } else {
            encodedValue = encodeURIComponent(data312.value);
          }
          return attr + "=" + encoding + "'" + language + "'" + encodedValue;
        };
        Link.formatAttribute = function(attr, value) {
          if (Array.isArray(value)) {
            return value.map((item) => {
              return Link.formatAttribute(attr, item);
            }).join("; ");
          }
          if (attr[attr.length - 1] === "*" || typeof value !== "string") {
            return Link.formatExtendedAttribute(attr, value);
          }
          if (Link.isTokenAttr(attr)) {
            value = needsQuotes(value) ? '"' + Link.escapeQuotes(value) + '"' : Link.escapeQuotes(value);
          } else if (needsQuotes(value)) {
            value = encodeURIComponent(value);
            value = value.replace(/%20/g, " ").replace(/%2C/g, ",").replace(/%3B/g, ";");
            value = '"' + value + '"';
          }
          return attr + "=" + value;
        };
        module2.exports = Link;
      }
    });
    init_main_resource = __esm2({
      "core/computed/main-resource.js"() {
        "use strict";
        init_process_global();
        init_lantern2();
        init_computed_artifact();
        init_network_records();
        MainResource = class {
          static {
            __name(this, "MainResource");
          }
          /**
           * @param {{URL: LH.Artifacts['URL'], devtoolsLog: LH.DevtoolsLog}} data
           * @param {LH.Artifacts.ComputedContext} context
           * @return {Promise<LH.Artifacts.NetworkRequest>}
           */
          static async compute_(data312, context2) {
            const { mainDocumentUrl } = data312.URL;
            if (!mainDocumentUrl)
              throw new Error("mainDocumentUrl must exist to get the main resource");
            const records = await NetworkRecordsComputed.request(data312.devtoolsLog, context2);
            const mainResource = core_exports.NetworkAnalyzer.findLastDocumentForUrl(records, mainDocumentUrl);
            if (!mainResource) {
              throw new Error("Unable to identify the main resource");
            }
            return mainResource;
          }
        };
        MainResourceComputed = makeComputedArtifact(MainResource, ["URL", "devtoolsLog"]);
      }
    });
    link_elements_exports = {};
    __export2(link_elements_exports, {
      UIStrings: () => UIStrings22,
      default: () => link_elements_default
    });
    init_link_elements = __esm2({
      "core/gather/gatherers/link-elements.js"() {
        "use strict";
        init_process_global();
        import_http_link_header = __toESM(require_link(), 1);
        init_base_gatherer();
        init_page_functions();
        init_devtools_log();
        init_main_resource();
        init_util();
        init_i18n();
        UIStrings22 = {
          /**
           * @description Warning message explaining that there was an error parsing a link header in an HTTP response. `error` will be an english string with more details on the error. `header` will be the value of the header that caused the error. `link` is a type of HTTP header and should not be translated.
           * @example {Expected attribute delimiter at offset 94} error
           * @example {<https://assets.calendly.com/assets/booking/css/booking-d0ac32b1.css>; rel=preload; as=style; nopush} error
           */
          headerParseWarning: "Error parsing `link` header ({error}): `{header}`"
        };
        str_3 = createIcuMessageFn({ url: "core/gather/gatherers/link-elements.js" }.url, UIStrings22);
        __name(normalizeUrlOrNull, "normalizeUrlOrNull");
        __name(getCrossoriginFromHeader, "getCrossoriginFromHeader");
        __name(getLinkElementsInDOM, "getLinkElementsInDOM");
        LinkElements = class _LinkElements extends base_gatherer_default {
          static {
            __name(this, "LinkElements");
          }
          /** @type {LH.Gatherer.GathererMeta<'DevtoolsLog'>} */
          meta = {
            supportedModes: ["timespan", "navigation"],
            dependencies: { DevtoolsLog: devtools_log_default.symbol }
          };
          /**
           * @param {LH.Gatherer.Context} context
           * @return {Promise<LH.Artifacts['LinkElements']>}
           */
          static getLinkElementsInDOM(context2) {
            return context2.driver.executionContext.evaluate(getLinkElementsInDOM, {
              args: [],
              useIsolation: true,
              deps: [
                pageFunctions.getNodeDetails,
                pageFunctions.getElementsInDocument
              ]
            });
          }
          /**
           * @param {LH.Gatherer.Context} context
           * @param {LH.Artifacts['DevtoolsLog']} devtoolsLog
           * @return {Promise<LH.Artifacts['LinkElements']>}
           */
          static async getLinkElementsInHeaders(context2, devtoolsLog) {
            const mainDocument = await MainResourceComputed.request({ devtoolsLog, URL: context2.baseArtifacts.URL }, context2);
            const linkElements = [];
            for (const header of mainDocument.responseHeaders) {
              if (header.name.toLowerCase() !== "link")
                continue;
              let parsedRefs = [];
              try {
                parsedRefs = import_http_link_header.default.parse(header.value).refs;
              } catch (err) {
                const truncatedHeader = Util.truncate(header.value, 100);
                const warning = str_3(UIStrings22.headerParseWarning, {
                  error: err.message,
                  header: truncatedHeader
                });
                context2.baseArtifacts.LighthouseRunWarnings.push(warning);
              }
              for (const link2 of parsedRefs) {
                linkElements.push({
                  rel: link2.rel || "",
                  href: normalizeUrlOrNull(link2.uri, context2.baseArtifacts.URL.finalDisplayedUrl),
                  hrefRaw: link2.uri || "",
                  hreflang: link2.hreflang || "",
                  as: link2.as || "",
                  crossOrigin: getCrossoriginFromHeader(link2.crossorigin),
                  source: "headers",
                  fetchPriority: link2.fetchpriority,
                  node: null
                });
              }
            }
            return linkElements;
          }
          /**
           * @param {LH.Gatherer.Context<'DevtoolsLog'>} context
           * @return {Promise<LH.Artifacts['LinkElements']>}
           */
          async getArtifact(context2) {
            const devtoolsLog = context2.dependencies.DevtoolsLog;
            const fromDOM = await _LinkElements.getLinkElementsInDOM(context2);
            const fromHeaders = await _LinkElements.getLinkElementsInHeaders(context2, devtoolsLog);
            const linkElements = fromDOM.concat(fromHeaders);
            for (const link2 of linkElements) {
              link2.rel = link2.rel.toLowerCase();
            }
            return linkElements;
          }
        };
        link_elements_default = LinkElements;
      }
    });
    init_network = __esm2({
      "core/gather/driver/network.js"() {
        "use strict";
        init_process_global();
        init_network_request();
        __name(fetchResponseBodyFromCache, "fetchResponseBodyFromCache");
      }
    });
    main_document_content_exports = {};
    __export2(main_document_content_exports, {
      default: () => main_document_content_default
    });
    init_main_document_content = __esm2({
      "core/gather/gatherers/main-document-content.js"() {
        "use strict";
        init_process_global();
        init_base_gatherer();
        init_devtools_log();
        init_network();
        init_main_resource();
        MainDocumentContent = class extends base_gatherer_default {
          static {
            __name(this, "MainDocumentContent");
          }
          /** @type {LH.Gatherer.GathererMeta<'DevtoolsLog'>} */
          meta = {
            supportedModes: ["navigation"],
            dependencies: { DevtoolsLog: devtools_log_default.symbol }
          };
          /**
           * @param {LH.Gatherer.Context<'DevtoolsLog'>} context
           * @return {Promise<LH.Artifacts['MainDocumentContent']>}
           */
          async getArtifact(context2) {
            const devtoolsLog = context2.dependencies.DevtoolsLog;
            const mainResource = await MainResourceComputed.request({ devtoolsLog, URL: context2.baseArtifacts.URL }, context2);
            const session = context2.driver.defaultSession;
            return fetchResponseBodyFromCache(session, mainResource.requestId);
          }
        };
        main_document_content_default = MainDocumentContent;
      }
    });
    meta_elements_exports = {};
    __export2(meta_elements_exports, {
      default: () => meta_elements_default
    });
    init_meta_elements = __esm2({
      "core/gather/gatherers/meta-elements.js"() {
        "use strict";
        init_process_global();
        init_base_gatherer();
        init_page_functions();
        __name(collectMetaElements, "collectMetaElements");
        MetaElements = class extends base_gatherer_default {
          static {
            __name(this, "MetaElements");
          }
          /** @type {LH.Gatherer.GathererMeta} */
          meta = {
            supportedModes: ["snapshot", "navigation"]
          };
          /**
           * @param {LH.Gatherer.Context} passContext
           * @return {Promise<LH.Artifacts['MetaElements']>}
           */
          getArtifact(passContext) {
            const driver = passContext.driver;
            return driver.executionContext.evaluate(collectMetaElements, {
              args: [],
              useIsolation: true,
              deps: [
                pageFunctions.getElementsInDocument,
                pageFunctions.getNodeDetails
              ]
            });
          }
        };
        meta_elements_default = MetaElements;
      }
    });
    scripts_exports = {};
    __export2(scripts_exports, {
      default: () => scripts_default
    });
    init_scripts = __esm2({
      "core/gather/gatherers/scripts.js"() {
        "use strict";
        init_process_global();
        init_base_gatherer();
        __name(runInSeriesOrParallel, "runInSeriesOrParallel");
        __name(isLighthouseRuntimeEvaluateScript, "isLighthouseRuntimeEvaluateScript");
        Scripts = class _Scripts extends base_gatherer_default {
          static {
            __name(this, "Scripts");
          }
          static symbol = Symbol("Scripts");
          /** @type {LH.Gatherer.GathererMeta} */
          meta = {
            symbol: _Scripts.symbol,
            supportedModes: ["timespan", "navigation"]
          };
          /** @type {LH.Crdp.Debugger.ScriptParsedEvent[]} */
          _scriptParsedEvents = [];
          /** @type {Array<string | undefined>} */
          _scriptContents = [];
          constructor() {
            super();
            this.onScriptParsed = this.onScriptParsed.bind(this);
          }
          /**
           * @param {LH.Crdp.Debugger.ScriptParsedEvent} params
           */
          onScriptParsed(params) {
            if (!isLighthouseRuntimeEvaluateScript(params)) {
              this._scriptParsedEvents.push(params);
            }
          }
          /**
           * @param {LH.Gatherer.Context} context
           */
          async startInstrumentation(context2) {
            const session = context2.driver.defaultSession;
            session.on("Debugger.scriptParsed", this.onScriptParsed);
            await session.sendCommand("Debugger.enable");
          }
          /**
           * @param {LH.Gatherer.Context} context
           */
          async stopInstrumentation(context2) {
            const session = context2.driver.defaultSession;
            const formFactor = context2.baseArtifacts.HostFormFactor;
            session.off("Debugger.scriptParsed", this.onScriptParsed);
            this._scriptContents = await runInSeriesOrParallel(
              this._scriptParsedEvents,
              ({ scriptId }) => {
                return session.sendCommand("Debugger.getScriptSource", { scriptId }).then((resp) => resp.scriptSource).catch(() => void 0);
              },
              formFactor === "mobile"
              /* runInSeries */
            );
            await session.sendCommand("Debugger.disable");
          }
          async getArtifact() {
            const scripts = this._scriptParsedEvents.map((event, i) => {
              return {
                name: event.url,
                ...event,
                // embedderName is optional on the protocol because backends like Node may not set it.
                // For our purposes, it is always set. But just in case it isn't... fallback to the url.
                url: event.embedderName || event.url,
                content: this._scriptContents[i]
              };
            });
            return scripts;
          }
        };
        scripts_default = Scripts;
      }
    });
    robots_txt_exports = {};
    __export2(robots_txt_exports, {
      default: () => robots_txt_default
    });
    init_robots_txt = __esm2({
      "core/gather/gatherers/seo/robots-txt.js"() {
        "use strict";
        init_process_global();
        init_base_gatherer();
        RobotsTxt = class extends base_gatherer_default {
          static {
            __name(this, "RobotsTxt");
          }
          /** @type {LH.Gatherer.GathererMeta} */
          meta = {
            supportedModes: ["snapshot", "navigation"]
          };
          /**
           * @param {LH.Gatherer.Context} passContext
           * @return {Promise<LH.Artifacts['RobotsTxt']>}
           */
          async getArtifact(passContext) {
            const { finalDisplayedUrl } = passContext.baseArtifacts.URL;
            const robotsUrl = new URL("/robots.txt", finalDisplayedUrl).href;
            return passContext.driver.fetcher.fetchResource(robotsUrl).catch((err) => ({ status: null, content: null, errorMessage: err.message }));
          }
        };
        robots_txt_default = RobotsTxt;
      }
    });
    require_ParsedURL = __commonJS({
      "core/lib/cdt/generated/ParsedURL.js"(exports2) {
        "use strict";
        init_process_global();
        Object.defineProperty(exports2, "__esModule", { value: true });
        exports2.ParsedURL = void 0;
        exports2.normalizePath = normalizePath22;
        exports2.schemeIs = schemeIs22;
        function normalizePath22(path72) {
          if (path72.indexOf("..") === -1 && path72.indexOf(".") === -1) {
            return path72;
          }
          const segments = (path72[0] === "/" ? path72.substring(1) : path72).split("/");
          const normalizedSegments = [];
          for (const segment of segments) {
            if (segment === ".") {
              continue;
            } else if (segment === "..") {
              normalizedSegments.pop();
            } else {
              normalizedSegments.push(segment);
            }
          }
          let normalizedPath = normalizedSegments.join("/");
          if (path72[0] === "/" && normalizedPath) {
            normalizedPath = "/" + normalizedPath;
          }
          if (normalizedPath[normalizedPath.length - 1] !== "/" && (path72[path72.length - 1] === "/" || segments[segments.length - 1] === "." || segments[segments.length - 1] === "..")) {
            normalizedPath = normalizedPath + "/";
          }
          return normalizedPath;
        }
        __name(normalizePath22, "normalizePath");
        function schemeIs22(url, scheme) {
          try {
            return new URL(url).protocol === scheme;
          } catch {
            return false;
          }
        }
        __name(schemeIs22, "schemeIs");
        var ParsedURL3 = class _ParsedURL {
          static {
            __name(this, "ParsedURL");
          }
          isValid;
          url;
          scheme;
          user;
          host;
          port;
          path;
          queryParams;
          fragment;
          folderPathComponents;
          lastPathComponent;
          blobInnerScheme;
          #displayNameInternal;
          #dataURLDisplayNameInternal;
          constructor(url) {
            this.isValid = false;
            this.url = url;
            this.scheme = "";
            this.user = "";
            this.host = "";
            this.port = "";
            this.path = "";
            this.queryParams = "";
            this.fragment = "";
            this.folderPathComponents = "";
            this.lastPathComponent = "";
            const isBlobUrl = this.url.startsWith("blob:");
            const urlToMatch = isBlobUrl ? url.substring(5) : url;
            const match = urlToMatch.match(_ParsedURL.urlRegex());
            if (match) {
              this.isValid = true;
              if (isBlobUrl) {
                this.blobInnerScheme = match[2].toLowerCase();
                this.scheme = "blob";
              } else {
                this.scheme = match[2].toLowerCase();
              }
              this.user = match[3] ?? "";
              this.host = match[4] ?? "";
              this.port = match[5] ?? "";
              this.path = match[6] ?? "/";
              this.queryParams = match[7] ?? "";
              this.fragment = match[8] ?? "";
            } else {
              if (this.url.startsWith("data:")) {
                this.scheme = "data";
                return;
              }
              if (this.url.startsWith("blob:")) {
                this.scheme = "blob";
                return;
              }
              if (this.url === "about:blank") {
                this.scheme = "about";
                return;
              }
              this.path = this.url;
            }
            const lastSlashExceptTrailingIndex = this.path.lastIndexOf("/", this.path.length - 2);
            if (lastSlashExceptTrailingIndex !== -1) {
              this.lastPathComponent = this.path.substring(lastSlashExceptTrailingIndex + 1);
            } else {
              this.lastPathComponent = this.path;
            }
            const lastSlashIndex = this.path.lastIndexOf("/");
            if (lastSlashIndex !== -1) {
              this.folderPathComponents = this.path.substring(0, lastSlashIndex);
            }
          }
          static concatenate(devToolsPath, ...appendage) {
            return devToolsPath.concat(...appendage);
          }
          static beginsWithWindowsDriveLetter(url) {
            return /^[A-Za-z]:/.test(url);
          }
          static beginsWithScheme(url) {
            return /^[A-Za-z][A-Za-z0-9+.-]*:/.test(url);
          }
          static isRelativeURL(url) {
            return !this.beginsWithScheme(url) || this.beginsWithWindowsDriveLetter(url);
          }
          get displayName() {
            if (this.#displayNameInternal) {
              return this.#displayNameInternal;
            }
            if (this.isDataURL()) {
              return this.dataURLDisplayName();
            }
            if (this.isBlobURL()) {
              return this.url;
            }
            if (this.isAboutBlank()) {
              return this.url;
            }
            this.#displayNameInternal = this.lastPathComponent;
            if (!this.#displayNameInternal) {
              this.#displayNameInternal = (this.host || "") + "/";
            }
            if (this.#displayNameInternal === "/") {
              this.#displayNameInternal = this.url;
            }
            return this.#displayNameInternal;
          }
          static urlRegexInstance = null;
        };
        exports2.ParsedURL = ParsedURL3;
      }
    });
    require_Common = __commonJS({
      "core/lib/cdt/Common.js"(exports2, module2) {
        "use strict";
        init_process_global();
        var ParsedURL3 = require_ParsedURL();
        module2.exports = {
          ParsedURL: ParsedURL3
        };
      }
    });
    require_Platform = __commonJS({
      "core/lib/cdt/Platform.js"(exports2, module2) {
        "use strict";
        init_process_global();
        function lowerBound22(array2, needle, comparator2, left2, right2) {
          let l = left2 || 0;
          let r = right2 !== void 0 ? right2 : array2.length;
          while (l < r) {
            const m = l + r >> 1;
            if (comparator2(needle, array2[m]) > 0) {
              l = m + 1;
            } else {
              r = m;
            }
          }
          return r;
        }
        __name(lowerBound22, "lowerBound");
        function upperBound22(array2, needle, comparator2, left2, right2) {
          let l = left2 || 0;
          let r = right2 !== void 0 ? right2 : array2.length;
          while (l < r) {
            const m = l + r >> 1;
            if (comparator2(needle, array2[m]) >= 0) {
              l = m + 1;
            } else {
              r = m;
            }
          }
          return r;
        }
        __name(upperBound22, "upperBound");
        module2.exports = {
          ArrayUtilities: {
            lowerBound: lowerBound22,
            upperBound: upperBound22
          },
          DevToolsPath: {
            EmptyUrlString: ""
          }
        };
      }
    });
    require_SourceMap = __commonJS({
      "core/lib/cdt/generated/SourceMap.js"(exports2, module2) {
        "use strict";
        init_process_global();
        var Common2 = require_Common();
        var Platform = require_Platform();
        var BASE64_CHARS2 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
        var BASE64_CODES2 = new Uint8Array(123);
        for (let index2 = 0; index2 < BASE64_CHARS2.length; ++index2) {
          BASE64_CODES2[BASE64_CHARS2.charCodeAt(index2)] = index2;
        }
        Object.defineProperty(exports2, "__esModule", { value: true });
        exports2.TokenIterator = exports2.SourceMap = exports2.SourceMapEntry = void 0;
        exports2.parseSourceMap = parseSourceMap2;
        function parseSourceMap2(content) {
          if (content.startsWith(")]}")) {
            content = content.substring(content.indexOf("\n"));
          }
          if (content.charCodeAt(0) === 65279) {
            content = content.slice(1);
          }
          return JSON.parse(content);
        }
        __name(parseSourceMap2, "parseSourceMap");
        var SourceMapEntry2 = class {
          static {
            __name(this, "SourceMapEntry");
          }
          lineNumber;
          columnNumber;
          sourceIndex;
          sourceURL;
          sourceLineNumber;
          sourceColumnNumber;
          name;
          constructor(lineNumber, columnNumber, sourceIndex, sourceURL, sourceLineNumber, sourceColumnNumber, name) {
            this.lineNumber = lineNumber;
            this.columnNumber = columnNumber;
            this.sourceIndex = sourceIndex;
            this.sourceURL = sourceURL;
            this.sourceLineNumber = sourceLineNumber;
            this.sourceColumnNumber = sourceColumnNumber;
            this.name = name;
          }
          static compare(entry1, entry2) {
            if (entry1.lineNumber !== entry2.lineNumber) {
              return entry1.lineNumber - entry2.lineNumber;
            }
            return entry1.columnNumber - entry2.columnNumber;
          }
        };
        exports2.SourceMapEntry = SourceMapEntry2;
        var SourceMap2 = class {
          static {
            __name(this, "SourceMap");
          }
          #json;
          #compiledURLInternal;
          #sourceMappingURL;
          #baseURL;
          #mappingsInternal;
          #sourceInfos = [];
          #sourceInfoByURL = /* @__PURE__ */ new Map();
          #scopesInfo = null;
          /**
           * @param {string} compiledURL
           * @param {string} sourceMappingURL
           * @param {object} payload
           * Implements Source Map V3 model. See https://github.com/google/closure-compiler/wiki/Source-Maps
           * for format description.
           */
          constructor(compiledURL, sourceMappingURL, payload) {
            this.#json = payload;
            this.#compiledURLInternal = compiledURL;
            this.#sourceMappingURL = sourceMappingURL;
            this.#baseURL = Common2.ParsedURL.schemeIs(sourceMappingURL, "data:") ? compiledURL : sourceMappingURL;
            this.#mappingsInternal = null;
            if ("sections" in this.#json) {
              if (this.#json.sections.find((section) => "url" in section)) {
                console.warn(`SourceMap "${sourceMappingURL}" contains unsupported "URL" field in one of its sections.`);
              }
            }
            this.eachSection(this.parseSources.bind(this));
          }
          #sourceIndex(sourceURL) {
            return this.#sourceInfos.findIndex((info) => info.sourceURL === sourceURL);
          }
          compiledURL() {
            return this.#compiledURLInternal;
          }
          url() {
            return this.#sourceMappingURL;
          }
          sourceURLs() {
            return [...this.#sourceInfoByURL.keys()];
          }
          embeddedContentByURL(sourceURL) {
            const entry = this.#sourceInfoByURL.get(sourceURL);
            if (!entry) {
              return null;
            }
            return entry.content;
          }
          hasScopeInfo() {
            this.#ensureMappingsProcessed();
            return this.#scopesInfo !== null;
          }
          findEntry(lineNumber, columnNumber, inlineFrameIndex) {
            this.#ensureMappingsProcessed();
            if (inlineFrameIndex && this.#scopesInfo !== null) {
              const { inlinedFunctions } = this.#scopesInfo.findInlinedFunctions(lineNumber, columnNumber);
              const { callsite } = inlinedFunctions[inlineFrameIndex - 1];
              if (!callsite) {
                console.error("Malformed source map. Expected to have a callsite info for index", inlineFrameIndex);
                return null;
              }
              return {
                lineNumber,
                columnNumber,
                sourceIndex: callsite.sourceIndex,
                sourceURL: this.sourceURLs()[callsite.sourceIndex],
                sourceLineNumber: callsite.line,
                sourceColumnNumber: callsite.column,
                name: void 0
              };
            }
            const mappings = this.mappings();
            const index2 = Platform.ArrayUtilities.upperBound(mappings, void 0, (unused, entry) => lineNumber - entry.lineNumber || columnNumber - entry.columnNumber);
            return index2 ? mappings[index2 - 1] : null;
          }
          findEntryRanges(lineNumber, columnNumber) {
            const mappings = this.mappings();
            const endIndex = Platform.ArrayUtilities.upperBound(mappings, void 0, (unused, entry) => lineNumber - entry.lineNumber || columnNumber - entry.columnNumber);
            if (!endIndex) {
              return null;
            }
            const startIndex = endIndex - 1;
            const sourceURL = mappings[startIndex].sourceURL;
            if (!sourceURL) {
              return null;
            }
            const endLine = endIndex < mappings.length ? mappings[endIndex].lineNumber : 2 ** 31 - 1;
            const endColumn = endIndex < mappings.length ? mappings[endIndex].columnNumber : 2 ** 31 - 1;
            const range2 = new TextUtils.TextRange.TextRange(mappings[startIndex].lineNumber, mappings[startIndex].columnNumber, endLine, endColumn);
            const reverseMappings = this.reversedMappings(sourceURL);
            const startSourceLine = mappings[startIndex].sourceLineNumber;
            const startSourceColumn = mappings[startIndex].sourceColumnNumber;
            const endReverseIndex = Platform.ArrayUtilities.upperBound(reverseMappings, void 0, (unused, i) => startSourceLine - mappings[i].sourceLineNumber || startSourceColumn - mappings[i].sourceColumnNumber);
            if (!endReverseIndex) {
              return null;
            }
            const endSourceLine = endReverseIndex < reverseMappings.length ? mappings[reverseMappings[endReverseIndex]].sourceLineNumber : 2 ** 31 - 1;
            const endSourceColumn = endReverseIndex < reverseMappings.length ? mappings[reverseMappings[endReverseIndex]].sourceColumnNumber : 2 ** 31 - 1;
            const sourceRange = new TextUtils.TextRange.TextRange(startSourceLine, startSourceColumn, endSourceLine, endSourceColumn);
            return { range: range2, sourceRange, sourceURL };
          }
          sourceLineMapping(sourceURL, lineNumber, columnNumber) {
            const mappings = this.mappings();
            const reverseMappings = this.reversedMappings(sourceURL);
            const first2 = Platform.ArrayUtilities.lowerBound(reverseMappings, lineNumber, lineComparator);
            const last2 = Platform.ArrayUtilities.upperBound(reverseMappings, lineNumber, lineComparator);
            if (first2 >= reverseMappings.length || mappings[reverseMappings[first2]].sourceLineNumber !== lineNumber) {
              return null;
            }
            const columnMappings = reverseMappings.slice(first2, last2);
            if (!columnMappings.length) {
              return null;
            }
            const index2 = Platform.ArrayUtilities.lowerBound(columnMappings, columnNumber, (columnNumber2, i) => columnNumber2 - mappings[i].sourceColumnNumber);
            return index2 >= columnMappings.length ? mappings[columnMappings[columnMappings.length - 1]] : mappings[columnMappings[index2]];
            function lineComparator(lineNumber2, i) {
              return lineNumber2 - mappings[i].sourceLineNumber;
            }
            __name(lineComparator, "lineComparator");
          }
          findReverseIndices(sourceURL, lineNumber, columnNumber) {
            const mappings = this.mappings();
            const reverseMappings = this.reversedMappings(sourceURL);
            const endIndex = Platform.ArrayUtilities.upperBound(reverseMappings, void 0, (unused, i) => lineNumber - mappings[i].sourceLineNumber || columnNumber - mappings[i].sourceColumnNumber);
            let startIndex = endIndex;
            while (startIndex > 0 && mappings[reverseMappings[startIndex - 1]].sourceLineNumber === mappings[reverseMappings[endIndex - 1]].sourceLineNumber && mappings[reverseMappings[startIndex - 1]].sourceColumnNumber === mappings[reverseMappings[endIndex - 1]].sourceColumnNumber) {
              --startIndex;
            }
            return reverseMappings.slice(startIndex, endIndex);
          }
          findReverseEntries(sourceURL, lineNumber, columnNumber) {
            const mappings = this.mappings();
            return this.findReverseIndices(sourceURL, lineNumber, columnNumber).map((i) => mappings[i]);
          }
          findReverseRanges(sourceURL, lineNumber, columnNumber) {
            const mappings = this.mappings();
            const indices = this.findReverseIndices(sourceURL, lineNumber, columnNumber);
            const ranges = [];
            for (let i = 0; i < indices.length; ++i) {
              const startIndex = indices[i];
              let endIndex = startIndex + 1;
              while (i + 1 < indices.length && endIndex === indices[i + 1]) {
                ++endIndex;
                ++i;
              }
              const startLine = mappings[startIndex].lineNumber;
              const startColumn = mappings[startIndex].columnNumber;
              const endLine = endIndex < mappings.length ? mappings[endIndex].lineNumber : 2 ** 31 - 1;
              const endColumn = endIndex < mappings.length ? mappings[endIndex].columnNumber : 2 ** 31 - 1;
              ranges.push(new TextUtils.TextRange.TextRange(startLine, startColumn, endLine, endColumn));
            }
            return ranges;
          }
          /** @return {Array<{lineNumber: number, columnNumber: number, sourceURL?: string, sourceLineNumber: number, sourceColumnNumber: number, name?: string, lastColumnNumber?: number}>} */
          mappings() {
            this.#ensureMappingsProcessed();
            return this.#mappingsInternal ?? [];
          }
          reversedMappings(sourceURL) {
            this.#ensureMappingsProcessed();
            return this.#sourceInfoByURL.get(sourceURL)?.reverseMappings ?? [];
          }
          #ensureMappingsProcessed() {
            if (this.#mappingsInternal === null) {
              this.#mappingsInternal = [];
              try {
                this.eachSection(this.parseMap.bind(this));
              } catch (e) {
                console.error("Failed to parse source map", e);
                this.#mappingsInternal = [];
              }
              this.mappings().sort(SourceMapEntry2.compare);
              this.#computeReverseMappings(this.#mappingsInternal);
              this.#json = null;
            }
          }
          #computeReverseMappings(mappings) {
            const reverseMappingsPerUrl = /* @__PURE__ */ new Map();
            for (let i = 0; i < mappings.length; i++) {
              const entryUrl = mappings[i].sourceURL;
              if (!entryUrl) {
                continue;
              }
              let reverseMap = reverseMappingsPerUrl.get(entryUrl);
              if (!reverseMap) {
                reverseMap = [];
                reverseMappingsPerUrl.set(entryUrl, reverseMap);
              }
              reverseMap.push(i);
            }
            for (const [url, reverseMap] of reverseMappingsPerUrl.entries()) {
              const info = this.#sourceInfoByURL.get(url);
              if (!info) {
                continue;
              }
              reverseMap.sort(sourceMappingComparator);
              info.reverseMappings = reverseMap;
            }
            function sourceMappingComparator(indexA, indexB) {
              const a = mappings[indexA];
              const b = mappings[indexB];
              return a.sourceLineNumber - b.sourceLineNumber || a.sourceColumnNumber - b.sourceColumnNumber || a.lineNumber - b.lineNumber || a.columnNumber - b.columnNumber;
            }
            __name(sourceMappingComparator, "sourceMappingComparator");
          }
          eachSection(callback) {
            if (!this.#json) {
              return;
            }
            if ("sections" in this.#json) {
              let sourcesIndex = 0;
              for (const section of this.#json.sections) {
                if ("map" in section) {
                  callback(section.map, sourcesIndex, section.offset.line, section.offset.column);
                  sourcesIndex += section.map.sources.length;
                }
              }
            } else {
              callback(this.#json, 0, 0, 0);
            }
          }
          parseSources(sourceMap2) {
            const sourceRoot = sourceMap2.sourceRoot ?? "";
            const ignoreList = new Set(sourceMap2.ignoreList ?? sourceMap2.x_google_ignoreList);
            for (let i = 0; i < sourceMap2.sources.length; ++i) {
              let href = sourceMap2.sources[i];
              if (Common2.ParsedURL.ParsedURL.isRelativeURL(href)) {
                if (sourceRoot && !sourceRoot.endsWith("/") && href && !href.startsWith("/")) {
                  href = sourceRoot.concat("/", href);
                } else {
                  href = sourceRoot.concat(href);
                }
              }
              const url = href;
              const source2 = sourceMap2.sourcesContent && sourceMap2.sourcesContent[i];
              const sourceInfo = {
                sourceURL: url,
                content: source2 ?? null,
                ignoreListHint: ignoreList.has(i),
                reverseMappings: null
              };
              this.#sourceInfos.push(sourceInfo);
              if (!this.#sourceInfoByURL.has(url)) {
                this.#sourceInfoByURL.set(url, sourceInfo);
              }
            }
          }
          parseMap(map2, baseSourceIndex, baseLineNumber, baseColumnNumber) {
            let sourceIndex = baseSourceIndex;
            let lineNumber = baseLineNumber;
            let columnNumber = baseColumnNumber;
            let sourceLineNumber = 0;
            let sourceColumnNumber = 0;
            let nameIndex = 0;
            const names22 = map2.names ?? [];
            const tokenIter = new TokenIterator3(map2.mappings);
            let sourceURL = this.#sourceInfos[sourceIndex].sourceURL;
            while (true) {
              if (tokenIter.peek() === ",") {
                tokenIter.next();
              } else {
                while (tokenIter.peek() === ";") {
                  lineNumber += 1;
                  columnNumber = 0;
                  tokenIter.next();
                }
                if (!tokenIter.hasNext()) {
                  break;
                }
              }
              columnNumber += tokenIter.nextVLQ();
              if (!tokenIter.hasNext() || this.isSeparator(tokenIter.peek())) {
                this.mappings().push(new SourceMapEntry2(lineNumber, columnNumber));
                continue;
              }
              const sourceIndexDelta = tokenIter.nextVLQ();
              if (sourceIndexDelta) {
                sourceIndex += sourceIndexDelta;
                sourceURL = this.#sourceInfos[sourceIndex].sourceURL;
              }
              sourceLineNumber += tokenIter.nextVLQ();
              sourceColumnNumber += tokenIter.nextVLQ();
              if (!tokenIter.hasNext() || this.isSeparator(tokenIter.peek())) {
                this.mappings().push(new SourceMapEntry2(lineNumber, columnNumber, sourceIndex, sourceURL, sourceLineNumber, sourceColumnNumber));
                continue;
              }
              nameIndex += tokenIter.nextVLQ();
              this.mappings().push(new SourceMapEntry2(lineNumber, columnNumber, sourceIndex, sourceURL, sourceLineNumber, sourceColumnNumber, names22[nameIndex]));
            }
            if (false) {
              if (!this.#scopesInfo) {
                this.#scopesInfo = new SourceMapScopesInfo_js_1.SourceMapScopesInfo(this, [], []);
              }
              if (map2.originalScopes && map2.generatedRanges) {
                const { originalScopes, generatedRanges } = (0, SourceMapScopes_js_1.decodeScopes)(map2, { line: baseLineNumber, column: baseColumnNumber });
                this.#scopesInfo.addOriginalScopes(originalScopes);
                this.#scopesInfo.addGeneratedRanges(generatedRanges);
              } else if (map2.x_com_bloomberg_sourcesFunctionMappings) {
                const originalScopes = this.parseBloombergScopes(map2);
                this.#scopesInfo.addOriginalScopes(originalScopes);
              } else {
                this.#scopesInfo.addOriginalScopes(new Array(map2.sources.length));
              }
            }
          }
          isSeparator(char) {
            return char === "," || char === ";";
          }
          mapsOrigin() {
            const mappings = this.mappings();
            if (mappings.length > 0) {
              const firstEntry = mappings[0];
              return firstEntry?.lineNumber === 0 || firstEntry.columnNumber === 0;
            }
            return false;
          }
          hasIgnoreListHint(sourceURL) {
            return this.#sourceInfoByURL.get(sourceURL)?.ignoreListHint ?? false;
          }
          /**
           * Returns a list of ranges in the generated script for original sources that
           * match a predicate. Each range is a [begin, end) pair, meaning that code at
           * the beginning location, up to but not including the end location, matches
           * the predicate.
           */
          findRanges(predicate, options2) {
            const mappings = this.mappings();
            const ranges = [];
            if (!mappings.length) {
              return [];
            }
            let current = null;
            if ((mappings[0].lineNumber !== 0 || mappings[0].columnNumber !== 0) && options2?.isStartMatching) {
              current = TextUtils.TextRange.TextRange.createUnboundedFromLocation(0, 0);
              ranges.push(current);
            }
            for (const { sourceURL, lineNumber, columnNumber } of mappings) {
              const ignoreListHint = sourceURL && predicate(sourceURL);
              if (!current && ignoreListHint) {
                current = TextUtils.TextRange.TextRange.createUnboundedFromLocation(lineNumber, columnNumber);
                ranges.push(current);
                continue;
              }
              if (current && !ignoreListHint) {
                current.endLine = lineNumber;
                current.endColumn = columnNumber;
                current = null;
              }
            }
            return ranges;
          }
          expandCallFrame(frame) {
            this.#ensureMappingsProcessed();
            if (this.#scopesInfo === null) {
              return [frame];
            }
            return this.#scopesInfo.expandCallFrame(frame);
          }
          resolveScopeChain(frame) {
            this.#ensureMappingsProcessed();
            if (this.#scopesInfo === null) {
              return null;
            }
            return this.#scopesInfo.resolveMappedScopeChain(frame);
          }
          findOriginalFunctionName(position) {
            this.#ensureMappingsProcessed();
            return this.#scopesInfo?.findOriginalFunctionName(position) ?? null;
          }
        };
        exports2.SourceMap = SourceMap2;
        var VLQ_BASE_SHIFT2 = 5;
        var VLQ_BASE_MASK2 = (1 << 5) - 1;
        var VLQ_CONTINUATION_MASK2 = 1 << 5;
        var TokenIterator3 = class {
          static {
            __name(this, "TokenIterator");
          }
          #string;
          #position;
          constructor(string2) {
            this.#string = string2;
            this.#position = 0;
          }
          next() {
            return this.#string.charAt(this.#position++);
          }
          /** Returns the unicode value of the next character and advances the iterator  */
          nextCharCode() {
            return this.#string.charCodeAt(this.#position++);
          }
          peek() {
            return this.#string.charAt(this.#position);
          }
          hasNext() {
            return this.#position < this.#string.length;
          }
          nextVLQ() {
            let result = 0;
            let shift = 0;
            let digit = VLQ_CONTINUATION_MASK2;
            while (digit & VLQ_CONTINUATION_MASK2) {
              if (!this.hasNext()) {
                throw new Error("Unexpected end of input while decodling VLQ number!");
              }
              const charCode = this.nextCharCode();
              digit = BASE64_CODES2[charCode];
              if (charCode !== 65 && digit === 0) {
                throw new Error(`Unexpected char '${String.fromCharCode(charCode)}' encountered while decoding`);
              }
              result += (digit & VLQ_BASE_MASK2) << shift;
              shift += VLQ_BASE_SHIFT2;
            }
            const negative = result & 1;
            result >>= 1;
            return negative ? -result : result;
          }
          /**
           * @returns the next VLQ number without iterating further. Or returns null if
           * the iterator is at the end or it's not a valid number.
           */
          peekVLQ() {
            const pos = this.#position;
            try {
              return this.nextVLQ();
            } catch {
              return null;
            } finally {
              this.#position = pos;
            }
          }
        };
        exports2.TokenIterator = TokenIterator3;
        module2.exports = SourceMap2;
        SourceMap2.parseSourceMap = parseSourceMap2;
      }
    });
    require_SDK = __commonJS({
      "core/lib/cdt/SDK.js"(exports2, module2) {
        "use strict";
        init_process_global();
        var SDK3 = {
          SourceMap: require_SourceMap()
        };
        SDK3.SourceMap.prototype.computeLastGeneratedColumns = function() {
          const mappings = this.mappings();
          if (mappings.length && mappings[0].lastColumnNumber !== void 0)
            return;
          for (let i = 0; i < mappings.length - 1; i++) {
            const mapping = mappings[i];
            const nextMapping = mappings[i + 1];
            if (mapping.lineNumber === nextMapping.lineNumber) {
              mapping.lastColumnNumber = nextMapping.columnNumber;
            }
          }
        };
        module2.exports = SDK3;
      }
    });
    source_maps_exports = {};
    __export2(source_maps_exports, {
      default: () => source_maps_default
    });
    init_source_maps = __esm2({
      "core/gather/gatherers/source-maps.js"() {
        "use strict";
        init_process_global();
        import_SDK = __toESM(require_SDK(), 1);
        init_base_gatherer();
        init_scripts();
        SourceMaps = class _SourceMaps extends base_gatherer_default {
          static {
            __name(this, "SourceMaps");
          }
          static symbol = Symbol("SourceMaps");
          /** @type {LH.Gatherer.GathererMeta<'Scripts'>} */
          meta = {
            symbol: _SourceMaps.symbol,
            supportedModes: ["timespan", "navigation"],
            dependencies: { Scripts: scripts_default.symbol }
          };
          /**
           * @param {LH.Gatherer.Driver} driver
           * @param {string} sourceMapUrl
           * @return {Promise<LH.Artifacts.RawSourceMap>}
           */
          async fetchSourceMap(driver, sourceMapUrl) {
            const response = await driver.fetcher.fetchResource(sourceMapUrl, { timeout: 1500 });
            if (response.content === null) {
              throw new Error(`Failed fetching source map (${response.status})`);
            }
            return import_SDK.default.SourceMap.parseSourceMap(response.content);
          }
          /**
           * @param {string} sourceMapURL
           * @return {LH.Artifacts.RawSourceMap}
           */
          parseSourceMapFromDataUrl(sourceMapURL) {
            const buffer = Buffer.from(sourceMapURL.split(",")[1], "base64");
            return import_SDK.default.SourceMap.parseSourceMap(buffer.toString());
          }
          /**
           * @param {string} url
           * @param {string} base
           * @return {string|undefined}
           */
          _resolveUrl(url, base) {
            try {
              return new URL(url, base).href;
            } catch (e) {
              return;
            }
          }
          /**
           * @param {LH.Gatherer.Driver} driver
           * @param {LH.Artifacts.Script} script
           * @return {Promise<LH.Artifacts.SourceMap>}
           */
          async _retrieveMapFromScript(driver, script) {
            if (!script.sourceMapURL) {
              throw new Error("precondition failed: event.sourceMapURL should exist");
            }
            const isSourceMapADataUri = script.sourceMapURL.startsWith("data:");
            const scriptUrl = script.name;
            const rawSourceMapUrl = isSourceMapADataUri ? script.sourceMapURL : this._resolveUrl(script.sourceMapURL, script.name);
            if (!rawSourceMapUrl) {
              return {
                scriptId: script.scriptId,
                scriptUrl,
                errorMessage: `Could not resolve map url: ${script.sourceMapURL}`
              };
            }
            const sourceMapUrl = isSourceMapADataUri ? void 0 : rawSourceMapUrl;
            try {
              const map2 = isSourceMapADataUri ? this.parseSourceMapFromDataUrl(rawSourceMapUrl) : await this.fetchSourceMap(driver, rawSourceMapUrl);
              if (typeof map2.version !== "number")
                throw new Error("Map has no numeric `version` field");
              if (!Array.isArray(map2.sources))
                throw new Error("Map has no `sources` list");
              if (typeof map2.mappings !== "string")
                throw new Error("Map has no `mappings` field");
              if (map2.sections) {
                map2.sections = map2.sections.filter((section) => section.map);
              }
              return {
                scriptId: script.scriptId,
                scriptUrl,
                sourceMapUrl,
                map: map2
              };
            } catch (err) {
              return {
                scriptId: script.scriptId,
                scriptUrl,
                sourceMapUrl,
                errorMessage: err.toString()
              };
            }
          }
          /**
           * @param {LH.Gatherer.Context<'Scripts'>} context
           * @return {Promise<LH.Artifacts['SourceMaps']>}
           */
          async getArtifact(context2) {
            const eventProcessPromises = context2.dependencies.Scripts.filter((script) => script.sourceMapURL).map((script) => this._retrieveMapFromScript(context2.driver, script));
            return Promise.all(eventProcessPromises);
          }
        };
        source_maps_default = SourceMaps;
      }
    });
    stacks_exports = {};
    __export2(stacks_exports, {
      default: () => stacks_default
    });
    init_stacks = __esm2({
      "core/gather/gatherers/stacks.js"() {
        "use strict";
        init_process_global();
        init_module();
        init_lighthouse_logger();
        init_base_gatherer();
        require3 = /* @__PURE__ */ createRequire({ url: "core/gather/gatherers/stacks.js" }.url);
        libDetectorSource = `function _createTimeoutHelper(){let e;return{timeoutPromise:new Promise(((t,o)=>{e=setTimeout((()=>o(new Error("Timed out"))),5e3)})),clearTimeout:()=>clearTimeout(e)}}var UNKNOWN_VERSION=null,d41d8cd98f00b204e9800998ecf8427e_LibraryDetectorTests={GWT:{id:"gwt",icon:"gwt",url:"http://www.gwtproject.org/",test:function(e){var t=e.document,o=t.getElementById("__gwt_historyFrame"),n=t.gwt_uid,r=t.body.__listener,i=t.body.__eventBits,s=e.__gwt_activeModules,c=e.__gwt_jsonp__,u=e.__gwt_scriptsLoaded||e.__gwt_stylesLoaded||e.__gwt_activeModules;if(o||n||r||i||s||c||u){for(var a=t.getElementsByTagName("iframe"),l=UNKNOWN_VERSION,N=0;N<a.length;N++)try{if(a[N].tabIndex<0&&a[N].contentWindow&&a[N].contentWindow.$gwt_version){l=a[N].contentWindow.$gwt_version;break}}catch(e){}return"0.0.999"==l&&(l="Google Internal"),{version:l}}return!1}},Ink:{id:"ink",icon:"ink",url:"http://ink.sapo.pt/",test:function(e){return!(!e.Ink||!e.Ink.createModule)&&{version:UNKNOWN_VERSION}}},Vaadin:{id:"vaadin",icon:"vaadin",url:"https://vaadin.com/",test:function(e){return!(!e.vaadin||!e.vaadin.registerWidgetset)&&{version:UNKNOWN_VERSION}}},Bootstrap:{id:"bootstrap",icon:"bootstrap",url:"http://getbootstrap.com/",npm:"bootstrap",test:function(e){var t,o=e.$&&e.$.fn;if(o&&(["affix","alert","button","carousel","collapse","dropdown","modal","popover","scrollspy","tab","tooltip"].some((function(o){if(e.$.fn[o]){if(e.$.fn[o].Constructor&&e.$.fn[o].Constructor.VERSION)return t=e.$.fn[o].Constructor.VERSION,!0;if(new RegExp("\\\\$this\\\\.data\\\\((?:'|\\")(?:bs\\\\.){1}"+o).test(e.$.fn[o].toString()))return t=">= 3.0.0 & <= 3.1.1",!0;if(new RegExp("\\\\$this\\\\.data\\\\((?:'|\\")"+o).test(e.$.fn[o].toString()))return t=">= 2.0.0 & <= 2.3.2",!0}return!1})),t))return{version:t};return!1}},Zurb:{id:"zurb",icon:"zurb",url:"https://foundation.zurb.com/",npm:"foundation-sites",test:function(e){return!(!e.Foundation||!e.Foundation.Toggler)&&{version:e.Foundation.version||UNKNOWN_VERSION}}},Polymer:{id:"polymer",icon:"polymer",url:"https://www.polymer-project.org/",npm:"@polymer/polymer",test:function(e){return!(!e.Polymer||!e.Polymer.dom)&&{version:e.Polymer.version||UNKNOWN_VERSION}}},LitElement:{id:"litelement",icon:"polymer",url:"https://lit-element.polymer-project.org/",npm:"lit-element",test:function(e){if(e.litElementVersions&&e.litElementVersions.length){var t=[...e.litElementVersions].sort(((e,t)=>e.localeCompare(t,void 0,{numeric:!0})));return{version:t[t.length-1]}}return!1}},"lit-html":{id:"lit-html",icon:"polymer",url:"https://lit-html.polymer-project.org/",npm:"lit-element",test:function(e){if(e.litHtmlVersions&&e.litHtmlVersions.length){var t=[...e.litHtmlVersions].sort(((e,t)=>e.localeCompare(t,void 0,{numeric:!0})));return{version:t[t.length-1]}}return!1}},Highcharts:{id:"highcharts",icon:"highcharts",url:"http://www.highcharts.com",npm:"highcharts",test:function(e){return!(!e.Highcharts||!e.Highcharts.Point)&&{version:e.Highcharts.version||UNKNOWN_VERSION}}},InfoVis:{id:"jit",icon:"jit",url:"http://philogb.github.com/jit/",test:function(e){return!(!e.$jit||!e.$jit.PieChart)&&{version:e.$jit.version||UNKNOWN_VERSION}}},FlotCharts:{id:"flotcharts",icon:"flotcharts",url:"http://www.flotcharts.org/",npm:"flot",test:function(e){return!(!e.$||!e.$.plot)&&{version:e.$.plot.version||UNKNOWN_VERSION}}},CreateJS:{id:"createjs",icon:"createjs",url:"https://createjs.com/",npm:"createjs",test:function(e){return!(!e.createjs||!e.createjs.promote)&&{version:UNKNOWN_VERSION}}},"Google Maps":{id:"gmaps",icon:"gmaps",url:"https://developers.google.com/maps/",test:function(e){return!(!e.google||!e.google.maps)&&{version:e.google.maps.version||UNKNOWN_VERSION}}},jQuery:{id:"jquery",icon:"jquery",url:"http://jquery.com",npm:"jquery",test:function(e){var t=e.jQuery||e.$;return!!(t&&t.fn&&t.fn.jquery)&&{version:t.fn.jquery.replace(/[^\\d+\\.+]/g,"")||UNKNOWN_VERSION}}},"jQuery (Fast path)":{id:"jquery-fast",icon:"jquery",url:"http://jquery.com",npm:"jquery",test:function(e){var t=e.jQuery||e.$;return!(!t||!t.fn)&&{version:UNKNOWN_VERSION}}},"jQuery UI":{id:"jquery_ui",icon:"jquery_ui",url:"http://jqueryui.com",npm:"jquery-ui",test:function(e){var t=e.jQuery||e.$||e.$jq||e.$j;if(t&&t.fn&&t.fn.jquery&&t.ui){for(var o="accordion,datepicker,dialog,draggable,droppable,progressbar,resizable,selectable,slider,menu,grid,tabs".split(","),n=[],r=0;r<o.length;r++)t.ui[o[r]]&&n.push(o[r].substr(0,1).toUpperCase()+o[r].substr(1));return{version:t.ui.version||UNKNOWN_VERSION,details:n.length?"Plugins used: "+n.join(","):""}}return!1}},Dojo:{id:"dojo",icon:"dojo",url:"http://dojotoolkit.org",npm:"dojo",test:function(e){return!(!e.dojo||!e.dojo.delegate)&&{version:e.dojo.version?e.dojo.version.toString():UNKNOWN_VERSION,details:"Details: "+(e.dijit?"Uses Dijit":"none")}}},Prototype:{id:"prototype",icon:"prototype",url:"http://prototypejs.org",test:function(e){return!(!e.Prototype||!e.Prototype.BrowserFeatures)&&{version:e.Prototype.Version||UNKNOWN_VERSION}}},Scriptaculous:{id:"scriptaculous",icon:"scriptaculous",url:"http://script.aculo.us",test:function(e){return!(!e.Scriptaculous||!e.Scriptaculous.load)&&{version:e.Scriptaculous.Version||UNKNOWN_VERSION}}},MooTools:{id:"mootools",icon:"mootools",url:"https://mootools.net/",test:function(e){return!(!e.MooTools||!e.MooTools.build)&&{version:e.MooTools.version||UNKNOWN_VERSION}}},Spry:{id:"spry",icon:"spry",url:"http://labs.adobe.com/technologies/spry",test:function(e){return!(!e.Spry||!e.Spry.Data)&&{version:UNKNOWN_VERSION}}},"YUI 2":{id:"yui",icon:"yui",url:"http://developer.yahoo.com/yui/2/",test:function(e){return!(!e.YAHOO||!e.YAHOO.util)&&{version:e.YAHOO.VERSION||UNKNOWN_VERSION}}},"YUI 3":{id:"yui3",icon:"yui3",url:"https://yuilibrary.com/",npm:"yui",test:function(e){return!(!e.YUI||!e.YUI.Env)&&{version:e.YUI.version||UNKNOWN_VERSION}}},Qooxdoo:{id:"qooxdoo",icon:"qooxdoo",url:"http://www.qooxdoo.org/",npm:"qooxdoo",test:function(e){return!(!e.qx||!e.qx.Bootstrap)&&{version:UNKNOWN_VERSION}}},"Ext JS":{id:"extjs",icon:"extjs",url:"https://www.sencha.com/products/extjs/",test:function(e){return e.Ext&&e.Ext.versions?{version:e.Ext.versions.core.version}:!!e.Ext&&{version:e.Ext.version||UNKNOWN_VERSION}}},Ezoic:{id:"ezoic",icon:"ezoic",url:"https://www.ezoic.com/",test:function(e){return!(!e.__ez||!e.__ez.template)&&{version:UNKNOWN_VERSION}}},base2:{id:"base2",icon:"base2",url:"http://code.google.com/p/base2",test:function(e){return!(!e.base2||!e.base2.dom)&&{version:e.base2.version||UNKNOWN_VERSION}}},"Closure Library":{id:"closure",icon:"closure",url:"https://developers.google.com/closure/library/",npm:"google-closure-library",test:function(e){return!(!e.goog||!e.goog.provide)&&{version:UNKNOWN_VERSION}}},"Rapha&euml;l":{id:"raphael",icon:"raphael",url:"http://dmitrybaranovskiy.github.io/raphael/",test:function(e){return!(!e.Raphael||!e.Raphael.circle)&&{version:e.Raphael.version||UNKNOWN_VERSION}}},React:{id:"react",icon:"react",url:"https://reactjs.org/",npm:"react",test:function(e){function t(e){return null!=e&&null!=e._reactRootContainer}var o=document.getElementById("react-root"),n=document.querySelector("*[data-reactroot]");return!!(t(document.body)||t(document.body.firstElementChild)||null!=document.createTreeWalker(document.body,NodeFilter.SHOW_ELEMENT,(function(e){return t(e)?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP})).nextNode()||o&&o.innerText.length>0||n||e.React&&e.React.Component)&&{version:e.React&&e.React.version||UNKNOWN_VERSION}}},"React (Fast path)":{id:"react-fast",icon:"react",url:"https://reactjs.org/",npm:"react",test:function(e){function t(e){return null!=e&&null!=e._reactRootContainer}var o=document.getElementById("react-root"),n=document.querySelector("*[data-reactroot]");return!!(t(document.body)||t(document.body.firstElementChild)||o||n||e.React)&&{version:e.React&&e.React.version||UNKNOWN_VERSION}}},"Next.js":{id:"next",icon:"next",url:"https://nextjs.org/",npm:"next",test:function(e){return!(!e.__NEXT_DATA__||!e.__NEXT_DATA__.buildId)&&{version:window.next&&window.next.version||UNKNOWN_VERSION}}},"Next.js (Fast path)":{id:"next-fast",icon:"next",url:"https://nextjs.org/",npm:"next",test:function(e){return!!e.__NEXT_DATA__&&{version:UNKNOWN_VERSION}}},Preact:{id:"preact",icon:"preact",url:"https://preactjs.com/",npm:"preact",test:function(e){var t="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("preactattr");function o(e){return"__k"in e&&"props"in e.__k&&"type"in e.__k||("_component"in e||"__preactattr_"in e||t&&null!=e[t])}function n(e){return null!=e&&o(e)&&e}var r=n(document.body)||n(document.body.firstElementChild);if(r||(r=document.createTreeWalker(document.body,NodeFilter.SHOW_ELEMENT,(function(e){return o(e)?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP})).nextNode()),r||e.preact){var i=UNKNOWN_VERSION;return r&&("__k"in r&&(i="10"),"__preactattr_"in r&&(i="8"),t&&null!=r[t]&&(i="7")),{version:i}}return!1}},"Preact (Fast path)":{id:"preact-fast",icon:"preact",url:"https://preactjs.com/",npm:"preact",test:function(e){var t=UNKNOWN_VERSION;function o(e){return null!=e&&function(e){return null!=e.__k?(t="10",!0):null!=e._component||null!=e.__preactattr_}(e)}return!(!o(document.body)&&!o(document.body.firstElementChild)&&!e.preact)&&{version:t}}},Modernizr:{id:"modernizr",icon:"modernizr",url:"https://modernizr.com/",npm:"modernizr",test:function(e){return!(!e.Modernizr||!e.Modernizr.addTest)&&{version:e.Modernizr._version||UNKNOWN_VERSION}}},"Processing.js":{id:"processingjs",icon:"processingjs",url:"http://processingjs.org",npm:"processing-js",test:function(e){return!(!e.Processing||!e.Processing.box)&&{version:Processing.version||UNKNOWN_VERSION}}},Backbone:{id:"backbone",icon:"backbone",url:"http://backbonejs.org/",npm:"backbone",test:function(e){return!(!e.Backbone||!e.Backbone.Model.extend)&&{version:e.Backbone.VERSION||UNKNOWN_VERSION}}},Leaflet:{id:"leaflet",icon:"leaflet",url:"http://leafletjs.com",npm:"leaflet",test:function(e){return!(!e.L||!e.L.GeoJSON||!e.L.marker&&!e.L.Marker)&&{version:e.L.version||e.L.VERSION||UNKNOWN_VERSION}}},Mapbox:{id:"mapbox",icon:"mapbox",url:"https://www.mapbox.com/",npm:"mapbox-gl",test:function(e){return!!(e.L&&e.L.mapbox&&e.L.mapbox.geocoder)&&{version:e.L.mapbox.VERSION||UNKNOWN_VERSION}}},"Lo-Dash":{id:"lodash",icon:"lodash",url:"https://lodash.com/",npm:"lodash",test:function(e){var t="function"==typeof(t=e._)&&t,o="function"==typeof(o=t&&t.chain)&&o,n=(o||t||function(){return{}})(1);return!(!t||!n.__wrapped__)&&{version:t.VERSION||UNKNOWN_VERSION}}},Underscore:{id:"underscore",icon:"underscore",url:"http://underscorejs.org/",npm:"underscore",test:function(e){return!(!e._||"function"!=typeof e._.tap||d41d8cd98f00b204e9800998ecf8427e_LibraryDetectorTests["Lo-Dash"].test(e))&&{version:e._.VERSION||UNKNOWN_VERSION}}},Sammy:{id:"sammy",icon:"sammy",url:"http://sammyjs.org",test:function(e){return!(!e.Sammy||!e.Sammy.Application.curry)&&{version:e.Sammy.VERSION||UNKNOWN_VERSION}}},Rico:{id:"rico",icon:"rico",url:"http://openrico.sourceforge.net/examples/index.html",test:function(e){return!(!e.Rico||!window.Rico.checkIfComplete)&&{version:e.Rico.Version||UNKNOWN_VERSION}}},MochiKit:{id:"mochikit",icon:"mochikit",url:"https://mochi.github.io/mochikit/",test:function(e){return!(!e.MochiKit||!e.MochiKit.Base.module)&&{version:MochiKit.VERSION||UNKNOWN_VERSION}}},"gRapha&euml;l":{id:"graphael",icon:"graphael",url:"https://github.com/DmitryBaranovskiy/g.raphael",test:function(e){return!(!e.Raphael||!e.Raphael.fn.g)&&{version:UNKNOWN_VERSION}}},Glow:{id:"glow",icon:"glow",url:"http://www.bbc.co.uk/glow/",test:function(e){return e.gloader&&e.gloader.getRequests?{version:UNKNOWN_VERSION}:e.glow&&e.glow.dom?{version:e.glow.VERSION||UNKNOWN_VERSION}:!!e.Glow&&{version:e.Glow.version||UNKNOWN_VERSION}}},"Socket.IO":{id:"socketio",icon:"socketio",url:"https://socket.io/",npm:"socket.io",test:function(e){return!(!e.io||!e.io.sockets&&!e.io.Socket)&&{version:e.io.version||UNKNOWN_VERSION}}},Mustache:{id:"mustache",icon:"mustache",url:"http://mustache.github.io/",npm:"mustache",test:function(e){return!(!e.Mustache||!e.Mustache.to_html)&&{version:e.Mustache.version||UNKNOWN_VERSION}}},"Fabric.js":{id:"fabricjs",icon:"icon38",url:"http://fabricjs.com/",npm:"fabric",test:function(e){return!(!e.fabric||!e.fabric.util)&&{version:e.fabric.version||UNKNOWN_VERSION}}},FuseJS:{id:"fusejs",icon:"fusejs",url:"http://fusejs.io/",npm:"fuse.js",test:function(e){return!!e.Fuse&&{version:UNKNOWN_VERSION}}},"Tween.js":{id:"tweenjs",icon:"icon38",url:"https://github.com/tweenjs/tween.js",npm:"tween.js",test:function(e){return!(!e.TWEEN||!e.TWEEN.Easing)&&{version:UNKNOWN_VERSION}}},SproutCore:{id:"sproutcore",icon:"sproutcore",url:"http://sproutcore.com/",test:function(e){return!(!e.SC||!e.SC.Application)&&{version:UNKNOWN_VERSION}}},"Zepto.js":{id:"zepto",icon:"zepto",url:"http://zeptojs.com",npm:"zepto",test:function(e){return!(!e.Zepto||!e.Zepto.fn)&&{version:UNKNOWN_VERSION}}},"three.js":{id:"threejs",icon:"icon38",url:"https://threejs.org/",npm:"three",test:function(e){return e.THREE&&e.THREE.REVISION?{version:"r"+e.THREE.REVISION}:!!e.THREE&&{version:UNKNOWN_VERSION}}},PhiloGL:{id:"philogl",icon:"philogl",url:"http://www.senchalabs.org/philogl/",npm:"philogl",test:function(e){return!(!e.PhiloGL||!e.PhiloGL.Camera)&&{version:e.PhiloGL.version||UNKNOWN_VERSION}}},CamanJS:{id:"camanjs",icon:"camanjs",url:"http://camanjs.com/",npm:"caman",test:function(e){return e.Caman&&e.Caman.version?{version:e.Caman.version.release}:!!e.Caman&&{version:UNKNOWN_VERSION}}},yepnope:{id:"yepnope",icon:"yepnope",url:"http://yepnopejs.com/",test:function(e){return!(!e.yepnope||!e.yepnope.injectJs)&&{version:UNKNOWN_VERSION}}},LABjs:{id:"labjs",icon:"icon38",url:"https://github.com/getify/LABjs",test:function(e){return!(!e.$LAB||!e.$LAB.setOptions)&&{version:UNKNOWN_VERSION}}},"Head JS":{id:"headjs",icon:"headjs",url:"http://headjs.com/",npm:"headjs",test:function(e){return!(!e.head||!e.head.js)&&{version:UNKNOWN_VERSION}}},ControlJS:{id:"controljs",icon:"icon38",url:"http://stevesouders.com/controljs/",test:function(e){return!(!e.CJS||!e.CJS.start)&&{version:UNKNOWN_VERSION}}},RequireJS:{id:"requirejs",icon:"requirejs",url:"http://requirejs.org/",npm:"requirejs",test:function(e){var t=e.require||e.requirejs;return!(!t||!(t.load||t.s&&t.s.contexts&&t.s.contexts._&&(t.s.contexts._.loaded||t.s.contexts._.load)))&&{version:t.version||UNKNOWN_VERSION}}},RightJS:{id:"rightjs",icon:"rightjs",url:"http://rightjs.org/",test:function(e){return!(!e.RightJS||!e.RightJS.isNode)&&{version:e.RightJS.version||UNKNOWN_VERSION}}},"jQuery Tools":{id:"jquerytools",icon:"jquerytools",url:"http://jquerytools.github.io/",test:function(e){var t=e.jQuery||e.$;return!(!t||!t.tools)&&{version:t.tools.version||UNKNOWN_VERSION}}},Pusher:{id:"pusher",icon:"pusher",url:"https://pusher.com/docs/",npm:"pusher-js",test:function(e){return!(!e.Pusher||!e.Pusher.Channel)&&{version:e.Pusher.VERSION||UNKNOWN_VERSION}}},"Paper.js":{id:"paperjs",icon:"paperjs",url:"http://paperjs.org/",npm:"paper",test:function(e){return!(!e.paper||!e.paper.Point)&&{version:e.paper.version||UNKNOWN_VERSION}}},Swiffy:{id:"swiffy",icon:"icon38",url:"https://developers.google.com/swiffy/",test:function(e){return!(!e.swiffy||!e.swiffy.Stage)&&{version:UNKNOWN_VERSION}}},Move:{id:"move",icon:"move",url:"https://github.com/rsms/move",npm:"move",test:function(e){return!(!e.move||!e.move.compile)&&{version:e.move.version()||UNKNOWN_VERSION}}},AmplifyJS:{id:"amplifyjs",icon:"amplifyjs",url:"http://amplifyjs.com/",npm:"amplifyjs",test:function(e){return!(!e.amplify||!e.amplify.publish)&&{version:UNKNOWN_VERSION}}},"Popcorn.js":{id:"popcornjs",icon:"popcornjs",url:"https://github.com/mozilla/popcorn-js/",test:function(e){return!(!e.Popcorn||!e.Popcorn.Events)&&{version:e.Popcorn.version||UNKNOWN_VERSION}}},D3:{id:"d3",icon:"d3",url:"https://d3js.org/",npm:"d3",test:function(e){return!(!e.d3||!e.d3.select)&&{version:e.d3.version||UNKNOWN_VERSION}}},Handlebars:{id:"handlebars",icon:"handlebars",url:"http://handlebarsjs.com/",npm:"handlebars",test:function(e){return!(!e.Handlebars||!e.Handlebars.compile)&&{version:e.Handlebars.VERSION||UNKNOWN_VERSION}}},Handsontable:{id:"handsontable",icon:"handsontable",url:"https://handsontable.com/",npm:"handsontable",test:function(e){return!(!e.Handsontable||!e.Handsontable.Core)&&{version:e.Handsontable.version||UNKNOWN_VERSION}}},Knockout:{id:"knockout",icon:"knockout",url:"http://knockoutjs.com/",npm:"knockout",test:function(e){return!(!e.ko||!e.ko.applyBindings)&&{version:e.ko.version||UNKNOWN_VERSION}}},Spine:{id:"spine",icon:"icon38",url:"http://spine.github.io/",test:function(e){return!(!e.Spine||!e.Spine.Controller)&&{version:e.Spine.version||UNKNOWN_VERSION}}},"jQuery Mobile":{id:"jquery-mobile",icon:"jquery_mobile",url:"http://jquerymobile.com/",npm:"jquery-mobile",test:function(e){var t=e.jQuery||e.$||e.$jq||e.$j;return!!(t&&t.fn&&t.fn.jquery&&t.mobile)&&{version:t.mobile.version||UNKNOWN_VERSION}}},"WebFont Loader":{id:"webfontloader",icon:"icon38",url:"https://github.com/typekit/webfontloader",npm:"webfontloader",test:function(e){return!(!e.WebFont||!e.WebFont.load)&&{version:UNKNOWN_VERSION}}},Angular:{id:"angular",icon:"angular",url:"https://angular.io/",npm:"@angular/core",test:function(e){var t=e.document.querySelector("[ng-version]");return t?{version:t.getAttribute("ng-version")||UNKNOWN_VERSION}:!!(e.ng&&e.ng.probe instanceof Function)&&{version:UNKNOWN_VERSION}}},AngularJS:{id:"angularjs",icon:"angularjs",url:"https://angularjs.org/",npm:"angular",test:function(e){var t=e.angular;return!!(t&&t.version&&t.version.full)&&{version:t.version.full}}},Ionic:{id:"ionic",icon:"ionic",url:"https://ionicframework.com/",npm:"@ionic/cli",test:function(e){var t=e.document.querySelector("ion-app");return!(!t||"ION-APP"!==t.nodeName)&&{version:UNKNOWN_VERSION}}},"Ember.js":{id:"emberjs",icon:"emberjs",url:"https://emberjs.com/",npm:"ember-source",test:function(e){var t=e.Ember||e.Em;return!(!t||!t.GUID_KEY)&&{version:t.VERSION||UNKNOWN_VERSION}}},"Hammer.js":{id:"hammerjs",icon:"hammerjs",url:"http://eightmedia.github.io/hammer.js/",npm:"hammerjs",test:function(e){return!(!e.Hammer||!e.Hammer.Pinch)&&{version:e.Hammer.VERSION||"&lt; 1.0.10"}}},"Visibility.js":{id:"visibilityjs",icon:"icon38",url:"https://github.com/ai/visibilityjs",npm:"visibilityjs",test:function(e){return!(!e.Visibility||!e.Visibility.every)&&{version:UNKNOWN_VERSION}}},"Velocity.js":{id:"velocityjs",icon:"icon38",url:"http://velocityjs.org/",npm:"velocity-animate",test:function(e){var t=e.jQuery||e.$,o=t?t.Velocity:e.Velocity;return o&&o.RegisterEffect&&o.version?{version:o.version.major+"."+o.version.minor+"."+o.version.patch}:!(!o||!o.RegisterEffect)&&{version:UNKNOWN_VERSION}}},"IfVisible.js":{id:"ifvisiblejs",icon:"icon38",url:"http://serkanyersen.github.io/ifvisible.js/",npm:"ifvisible.js",test:function(e){var t=e.ifvisible;return!(!t||"ifvisible.object.event.identifier"!==t.__ceGUID)&&{version:UNKNOWN_VERSION}}},"Pixi.js":{id:"pixi",icon:"pixi",url:"http://www.pixijs.com/",npm:"pixi.js",test:function(e){var t=e.PIXI;return!!(t&&t.WebGLRenderer&&t.VERSION)&&{version:t.VERSION.replace("v","")||UNKNOWN_VERSION}}},"DC.js":{id:"dcjs",icon:"dcjs",url:"http://dc-js.github.io/dc.js/",npm:"dc",test:function(e){var t=e.dc;return!(!t||!t.registerChart)&&{version:t.version||UNKNOWN_VERSION}}},"GreenSock JS":{id:"greensock",icon:"greensock",url:"https://greensock.com/gsap",npm:"gsap",test:function(e){return!(!e.TweenMax||!e.TweenMax.pauseAll)&&{version:e.TweenMax.version||UNKNOWN_VERSION}}},FastClick:{id:"fastclick",icon:"fastclick",url:"https://github.com/ftlabs/fastclick",npm:"fastclick",test:function(e){return!(!e.FastClick||!e.FastClick.notNeeded)&&{version:UNKNOWN_VERSION}}},Isotope:{id:"isotope",icon:"isotope",url:"https://isotope.metafizzy.co/",npm:"isotope-layout",test:function(e){return!!(e.Isotope||null!=e.$&&e.$.Isotope)&&{version:UNKNOWN_VERSION}}},Marionette:{id:"marionette",icon:"marionette",url:"https://marionettejs.com/",npm:"backbone.marionette",test:function(e){return!(!e.Marionette||!e.Marionette.Application)&&{version:e.Marionette.VERSION||UNKNOWN_VERSION}}},Can:{id:"canjs",icon:"canjs",url:"https://canjs.com/",npm:"can",test:function(e){return!(!e.can||!e.can.Construct)&&{version:e.can.VERSION||UNKNOWN_VERSION}}},Vue:{id:"vue",icon:"vue",url:"https://vuejs.org/",npm:"vue",test:function(e){return!(null===document.createTreeWalker(document.body,NodeFilter.SHOW_ELEMENT,(function(e){return null!=e.__vue__?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP})).nextNode()&&!e.Vue)&&{version:e.Vue&&e.Vue.version||UNKNOWN_VERSION}}},"Vue (Fast path)":{id:"vue-fast",icon:"vue",url:"https://vuejs.org/",npm:"vue",test:function(e){return!!e.Vue&&{version:e.Vue&&e.Vue.version||UNKNOWN_VERSION}}},"Nuxt.js":{id:"nuxt",icon:"nuxt",url:"https://nuxtjs.org/",npm:"nuxt",test:function(e){return!!(e.__NUXT__||e.$nuxt||[...e.document.querySelectorAll("*")].some((e=>e.__vue__?.nuxt)))&&{version:UNKNOWN_VERSION}}},"Nuxt.js (Fast path)":{id:"nuxt-fast",icon:"nuxt",url:"https://nuxtjs.org/",npm:"nuxt",test:function(e){return!(!e.__NUXT__&&!e.$nuxt)&&{version:UNKNOWN_VERSION}}},Two:{id:"two",icon:"two",url:"https://two.js.org/",npm:"two.js",test:function(e){return!(!e.Two||!e.Two.Utils)&&{version:e.Two.Version||UNKNOWN_VERSION}}},Brewser:{id:"brewser",icon:"brewser",url:"https://robertpataki.github.io/brewser/",npm:"brewser",test:function(e){return!(!e.BREWSER||!e.BREWSER.ua)&&{version:BREWSER.VERSION||UNKNOWN_VERSION}}},"Material Design Lite":{id:"materialdesignlite",icon:"mdl",url:"https://getmdl.io/",npm:"material-design-lite",test:function(e){return!(!e.componentHandler||!e.componentHandler.upgradeElement)&&{version:UNKNOWN_VERSION}}},"Kendo UI":{id:"kendoui",icon:"kendoui",url:"https://github.com/telerik/kendo-ui-core",npm:"kendo-ui-core",test:function(e){return!!(e.kendo&&e.kendo.View&&e.kendo.View.extend)&&{version:e.kendo.version||UNKNOWN_VERSION}}},"Matter.js":{id:"matterjs",icon:"matter-js",url:"http://brm.io/matter-js/",npm:"matter-js",test:function(e){return!(!e.Matter||!e.Matter.Engine)&&{version:UNKNOWN_VERSION}}},Riot:{id:"riot",icon:"riot",url:"http://riotjs.com/",npm:"riot",test:function(e){return!(!e.riot||!e.riot.mixin)&&{version:e.riot.version||UNKNOWN_VERSION}}},"Sea.js":{id:"seajs",icon:"icon38",url:"https://seajs.github.io/seajs/docs/",npm:"seajs",test:function(e){return!(!e.seajs||!e.seajs.use)&&{version:e.seajs.version||UNKNOWN_VERSION}}},"Moment.js":{id:"momentjs",icon:"momentjs",url:"http://momentjs.com/",npm:"moment",test:function(e){return!(!e.moment||!e.moment.isMoment&&!e.moment.lang)&&{version:e.moment.version||UNKNOWN_VERSION}}},"Moment Timezone":{id:"moment-timezone",icon:"momentjs",url:"http://momentjs.com/timezone/",npm:"moment-timezone",test:function(e){return!(!e.moment||!e.moment.tz)&&{version:e.moment.tz.version||UNKNOWN_VERSION}}},ScrollMagic:{id:"scrollmagic",icon:"scrollmagic",url:"http://scrollmagic.io/",npm:"scrollmagic",test:function(e){return!(!e.ScrollMagic||!e.ScrollMagic.Controller)&&{version:ScrollMagic.version||UNKNOWN_VERSION}}},SWFObject:{id:"swfobject",icon:"icon38",url:"https://github.com/swfobject/swfobject",test:function(e){return e.swfobject&&e.swfobject.embedSWF?{version:e.swfobject.version||UNKNOWN_VERSION}:!(!e.deconcept||!e.deconcept.SWFObject)&&{version:UNKNOWN_VERSION}}},FlexSlider:{id:"flexslider",icon:"icon38",url:"https://woocommerce.com/flexslider/",npm:"flexslider",test:function(e){var t=e.jQuery||e.$||e.$jq||e.$j;return!!(t&&t.fn&&t.fn.jquery&&t.flexslider)&&{version:UNKNOWN_VERSION}}},SPF:{id:"spf",icon:"icon38",url:"https://youtube.github.io/spfjs/",npm:"spf",test:function(e){return!(!e.spf||!e.spf.init)&&{version:UNKNOWN_VERSION}}},"Numeral.js":{id:"numeraljs",icon:"icon38",url:"http://numeraljs.com/",npm:"numeraljs",test:function(e){return!(!e.numeral||!e.isNumeral)&&{version:e.numeral.version||UNKNOWN_VERSION}}},"boomerang.js":{id:"boomerangjs",icon:"icon38",url:"https://soasta.github.io/boomerang/",npm:"boomerangjs",test:function(e){return!!(e.BOOMR&&e.BOOMR.utils&&e.BOOMR.init)&&{version:e.BOOMR.version||UNKNOWN_VERSION}}},Framer:{id:"framer",icon:"framer",url:"https://framer.com/",npm:"framerjs",test:function(e){return!(!e.Framer||!e.Framer.Layer)&&{version:e.Framer.Version.build||UNKNOWN_VERSION}}},Marko:{id:"marko",icon:"marko",url:"https://markojs.com/",npm:"marko",test:function(e){return!!document.querySelector("[data-marko-key], [data-marko]")&&{version:UNKNOWN_VERSION}}},AMP:{id:"amp",icon:"amp",url:"https://amp.dev/",npm:"https://www.npmjs.com/org/ampproject",test:function(e){var t=e.document.documentElement.getAttribute("amp-version");return!!t&&{version:t}}},Gatsby:{id:"gatsby",icon:"gatsby",url:"https://www.gatsbyjs.org/",npm:"gatsby",test:function(e){return!!document.getElementById("___gatsby")&&{version:UNKNOWN_VERSION}}},Shopify:{id:"shopify",icon:"shopify",url:"https://www.shopify.com/",npm:null,test:function(e){return!(!e.Shopify||!e.Shopify.shop)&&{version:UNKNOWN_VERSION}}},Magento:{id:"magento",icon:"magento",url:"https://magento.com/",npm:null,test:function(e){const t=/\\/static(?:\\/version\\d+)?\\/frontend\\/.+\\/.+\\/requirejs\\/require(?:\\.min)?\\.js/;return!!Array.from(document.querySelectorAll("script[src]")||[]).some((e=>t.test(e.src)))&&{version:2}}},WordPress:{id:"wordpress",icon:"wordpress",url:"https://wordpress.org/",npm:null,test:function(e){const t=!!document.querySelector('link[rel="https://api.w.org/"]'),o=!!document.querySelectorAll('link[href*="wp-includes"], script[src*="wp-includes"]').length;if(!t&&!o)return!1;const n=document.querySelector('meta[name=generator][content^="WordPress"]');return{version:n?n.getAttribute("content").replace(/^\\w+\\s/,""):UNKNOWN_VERSION}}},Wix:{id:"wix",icon:"wix",url:"https://www.wix.com/",npm:null,test:function(e){return(e.wixPerformanceMeasurements&&e.wixPerformanceMeasurements.info||!(!e.wixBiSession||!e.wixBiSession.info))&&{version:UNKNOWN_VERSION}}},Workbox:{id:"workbox",icon:"workbox",url:"https://developers.google.com/web/tools/workbox/",npm:"workbox-sw",test:async function(e){var t=e.navigator;if(!("serviceWorker"in t))return!1;const{timeoutPromise:o,clearTimeout:n}=_createTimeoutHelper(),r=t.serviceWorker.getRegistration().then((function(e){var o=t.serviceWorker.controller?t.serviceWorker.controller.scriptURL:e.active.scriptURL;return fetch(o,{credentials:"include",headers:{"service-worker":"script"}}).then((function(e){return e.text()})).then((function(e){if(/new Workbox|new workbox|workbox\\.precaching\\.|workbox\\.strategies/gm.test(e)){var t=/workbox.*?\\b((0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(-(0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(\\.(0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*)?(\\+[0-9a-zA-Z-]+(\\.[0-9a-zA-Z-]+)*)?)\\b/gim.exec(e),o=UNKNOWN_VERSION;return Array.isArray(t)&&t.length>1&&t[1]&&(o=t[1]),{version:o}}return!1}))})).catch((function(e){return!1}));return Promise.race([r,o]).catch((function(e){return!1})).finally((e=>(n(),e)))}},Boq:{id:"boq",icon:"icon38",url:"https://github.com/johnmichel/Library-Detector-for-Chrome/pull/143",npm:null,test:function(e){return!!e.WIZ_global_data&&{version:UNKNOWN_VERSION}}},Wiz:{id:"wiz",icon:"icon38",url:"https://github.com/johnmichel/Library-Detector-for-Chrome/pull/147",npm:null,test:function(e){return!!document.__wizdispatcher&&{version:UNKNOWN_VERSION}}},"core-js":{id:"corejs",icon:"icon38",url:"https://github.com/zloirock/core-js",npm:"core-js",test:function(e){const t=e["__core-js_shared__"],o=e.core;if(t){const e=t.versions;return{version:Array.isArray(e)?e.map((e=>\`core-js-\${e.mode}@\${e.version}\`)).join("; "):UNKNOWN_VERSION}}return!!o&&{version:o.version||UNKNOWN_VERSION}}},Drupal:{id:"drupal",icon:"drupal",url:"https://www.drupal.org/",npm:null,test:function(e){const t=document.querySelector('meta[name="generator"][content^="Drupal"]'),o=t?t.getAttribute("content").replace(/\\D+/gi,""):UNKNOWN_VERSION,n=/\\/sites\\/(?:default|all)\\/(?:themes|modules|files)/,r=Array.from(document.querySelectorAll("link,style,script")||[]);return!!(r.some((e=>n.test(e.src)))||r.some((e=>n.test(e.href)))||t||e.Drupal&&e.Drupal.behaviors)&&{version:o}}},TYPO3:{id:"typo3",icon:"typo3",url:"https://typo3.org/",npm:null,test:function(e){const t=document.querySelector('meta[name="generator"][content^="TYPO3"]'),o=/\\/(typo3conf|typo3temp|fileadmin)/,n=Array.from(document.querySelectorAll("link,style,script")||[]);return!!(t||n.some((e=>o.test(e.src)))||n.some((e=>o.test(e.href))))&&{version:UNKNOWN_VERSION}}},"Create React App":{id:"create-react-app",icon:"cra",url:"https://create-react-app.dev/",npm:"react-scripts",test:function(e){let t,o,n=e.document.body.firstElementChild;do{"noscript"===n.localName?t=n:"root"===n.id&&(o=n)}while(n=n.nextElementSibling);return!!(o&&t&&/You need to enable JavaScript to run this app/.test(t.textContent))&&{version:UNKNOWN_VERSION}}},"Guess.js":{id:"guessjs",icon:"guessjs",url:"https://guess-js.github.io/",test:function(e){return!(!e.__GUESS__||!e.__GUESS__.guess)&&{version:UNKNOWN_VERSION}}},"October CMS":{id:"octobercms",icon:"october",url:"https://octobercms.com/",npm:null,test:function(e){const t=document.querySelector('meta[name="generator"][content^="OctoberCMS"]'),o=document.querySelector('meta[name="generator"][content^="October CMS"]'),n=/\\/modules\\/system\\/assets\\/(css|js)\\/framework(\\.extras|\\.combined)?(-min)?/,r=Array.from(document.querySelectorAll("link,style,script")||[]);return!!(t||o||r.some((e=>n.test(e.src||e.href))))&&{version:UNKNOWN_VERSION}}},Joomla:{id:"joomla",icon:"joomla",url:"https://www.joomla.org/",npm:null,test:function(e){const t=document.querySelector('meta[name=generator][content^="Joomla"]'),o=!!document.querySelectorAll('script[src*="/media/jui/js/bootstrap.min.js"]').length;return t?{version:t.getAttribute("content").replace(/^\\w+\\s/,"")}:!(!e.Joomla&&!o)&&{version:UNKNOWN_VERSION}}},Sugar:{id:"sugar",icon:"sugar",url:"https://sugarjs.com",npm:"sugar",test:function(e){return e.Sugar?{version:e.Sugar.VERSION||UNKNOWN_VERSION}:!!e.Array.SugarMethods&&{version:UNKNOWN_VERSION}}},Bento:{id:"bentojs",icon:"bentojs",url:"https://bentojs.dev",npm:"https://www.npmjs.com/org/bentoproject",test:function(e){return!(!e.BENTO||!e.BENTO.push)&&{version:UNKNOWN_VERSION}}},"WP Rocket":{id:"wp-rocket",icon:"wp-rocket",url:"https://wp-rocket.me/",npm:null,test:async function(e){const t="undefined"!=typeof RocketLazyLoadScripts||"undefined"!=typeof RocketPreloadLinksConfig||"undefined"!=typeof rocket_lazy,o=!!document.querySelector("style#wpr-usedcss"),n=document.lastChild.nodeType===Node.COMMENT_NODE&&document.lastChild.textContent.includes("WP Rocket");return!!(o||t||n)&&{version:UNKNOWN_VERSION}}},NitroPack:{id:"nitropack",icon:"nitropack",url:"https://nitropack.io/",npm:null,test:async function(e){return!!document.querySelector('meta[name="generator"][content="NitroPack"]')&&{version:UNKNOWN_VERSION}}},Remix:{id:"remix",icon:"remix",url:"https://remix.run/",npm:"remix",test:function(e){return!!e.__remixContext&&{version:UNKNOWN_VERSION}}}};`;
        __name(detectLibraries, "detectLibraries");
        Stacks = class _Stacks extends base_gatherer_default {
          static {
            __name(this, "Stacks");
          }
          constructor() {
            super();
            this.meta = {
              supportedModes: ["snapshot", "navigation"]
            };
          }
          /**
           * @param {LH.Gatherer.Driver['executionContext']} executionContext
           * @return {Promise<LH.Artifacts['Stacks']>}
           */
          static async collectStacks(executionContext) {
            const status = { msg: "Collect stacks", id: "lh:gather:collectStacks" };
            lighthouse_logger_default.time(status);
            const jsLibraries = await executionContext.evaluate(detectLibraries, {
              args: [],
              deps: [libDetectorSource]
            });
            const stacks = jsLibraries.map((lib) => ({
              detector: "js",
              id: lib.id,
              name: lib.name,
              version: typeof lib.version === "number" ? String(lib.version) : lib.version || void 0,
              npm: lib.npm || void 0
            }));
            lighthouse_logger_default.timeEnd(status);
            return stacks;
          }
          /**
           * @param {LH.Gatherer.Context} context
           * @return {Promise<LH.Artifacts['Stacks']>}
           */
          async getArtifact(context2) {
            try {
              return await _Stacks.collectStacks(context2.driver.executionContext);
            } catch {
              return [];
            }
          }
        };
        stacks_default = Stacks;
      }
    });
    viewport_dimensions_exports = {};
    __export2(viewport_dimensions_exports, {
      default: () => viewport_dimensions_default
    });
    init_viewport_dimensions = __esm2({
      "core/gather/gatherers/viewport-dimensions.js"() {
        "use strict";
        init_process_global();
        init_base_gatherer();
        __name(getViewportDimensions, "getViewportDimensions");
        ViewportDimensions = class extends base_gatherer_default {
          static {
            __name(this, "ViewportDimensions");
          }
          /** @type {LH.Gatherer.GathererMeta} */
          meta = {
            supportedModes: ["snapshot", "timespan", "navigation"]
          };
          /**
           * @param {LH.Gatherer.Context} passContext
           * @return {Promise<LH.Artifacts.ViewportDimensions>}
           */
          async getArtifact(passContext) {
            const driver = passContext.driver;
            const dimensions = await driver.executionContext.evaluate(getViewportDimensions, {
              args: [],
              useIsolation: true
            });
            const allNumeric = Object.values(dimensions).every(Number.isFinite);
            if (!allNumeric) {
              const results = JSON.stringify(dimensions);
              throw new Error(`ViewportDimensions results were not numeric: ${results}`);
            }
            return dimensions;
          }
        };
        viewport_dimensions_default = ViewportDimensions;
      }
    });
    init_axe_audit = __esm2({
      "core/audits/accessibility/axe-audit.js"() {
        "use strict";
        init_process_global();
        init_audit();
        init_i18n();
        UIStrings23 = {
          /** Label of a table column that identifies HTML elements that have failed an audit. */
          failingElementsHeader: "Failing Elements"
        };
        str_4 = createIcuMessageFn({ url: "core/audits/accessibility/axe-audit.js" }.url, UIStrings23);
        AxeAudit = class extends Audit {
          static {
            __name(this, "AxeAudit");
          }
          /**
           * Base class for audit rules which reflect assessment performed by the aXe accessibility library
           * See https://github.com/dequelabs/axe-core/blob/6b444546cff492a62a70a74a8fc3c62bd4729400/doc/API.md#results-object for result type and format details
           *
           * @param {LH.Artifacts} artifacts Accessibility gatherer artifacts. Note that AxeAudit
           * expects the meta name for the class to match the rule id from aXe.
           * @return {LH.Audit.Product}
           */
          static audit(artifacts) {
            const notApplicables = artifacts.Accessibility.notApplicable || [];
            const isNotApplicable = notApplicables.find((result) => result.id === this.meta.id);
            if (isNotApplicable) {
              return {
                score: null,
                notApplicable: true
              };
            }
            const incomplete = artifacts.Accessibility.incomplete || [];
            const incompleteResult = incomplete.find((result) => result.id === this.meta.id);
            if (incompleteResult?.error) {
              return {
                score: null,
                errorMessage: `axe-core Error: ${incompleteResult.error.message || "Unknown error"}`
              };
            }
            const isInformative = this.meta.scoreDisplayMode === Audit.SCORING_MODES.INFORMATIVE;
            const violations = artifacts.Accessibility.violations || [];
            const failureCases = isInformative ? violations.concat(incomplete) : violations;
            const rule = failureCases.find((result) => result.id === this.meta.id);
            const impact = rule?.impact;
            const tags = rule?.tags;
            if (isInformative && !rule) {
              return {
                score: null,
                notApplicable: true
              };
            }
            let items2 = [];
            if (rule?.nodes) {
              items2 = rule.nodes.map((axeNode) => ({
                node: {
                  ...Audit.makeNodeItem(axeNode.node),
                  explanation: axeNode.failureSummary
                },
                subItems: axeNode.relatedNodes.length ? {
                  type: "subitems",
                  items: axeNode.relatedNodes.map((node2) => ({ relatedNode: Audit.makeNodeItem(node2) }))
                } : void 0
              }));
            }
            const headings = [
              /* eslint-disable max-len */
              { key: "node", valueType: "node", subItemsHeading: { key: "relatedNode", valueType: "node" }, label: str_4(UIStrings23.failingElementsHeader) }
              /* eslint-enable max-len */
            ];
            let debugData;
            if (impact || tags) {
              debugData = {
                type: "debugdata",
                impact,
                tags
              };
            }
            return {
              score: Number(rule === void 0),
              details: { ...Audit.makeTableDetails(headings, items2), debugData }
            };
          }
        };
        axe_audit_default = AxeAudit;
      }
    });
    accesskeys_exports = {};
    __export2(accesskeys_exports, {
      UIStrings: () => UIStrings24,
      default: () => accesskeys_default
    });
    init_accesskeys = __esm2({
      "core/audits/accessibility/accesskeys.js"() {
        "use strict";
        init_process_global();
        init_axe_audit();
        init_i18n();
        UIStrings24 = {
          /** Title of an accessibility audit that evaluates if the accesskey HTML attribute values are unique across all elements. This title is descriptive of the successful state and is shown to users when no user action is required. */
          title: "`[accesskey]` values are unique",
          /** Title of an accessibility audit that evaluates if the ARIA HTML attributes are misaligned with the aria-role HTML attribute specificed on the element, such mismatches are invalid. This title is descriptive of the failing state and is shown to users when there is a failure that needs to be addressed. */
          failureTitle: "`[accesskey]` values are not unique",
          /** Description of a Lighthouse audit that tells the user *why* they should try to pass. This is displayed after a user expands the section to see more. No character length limits. The last sentence starting with 'Learn' becomes link text to additional documentation. */
          description: "Access keys let users quickly focus a part of the page. For proper navigation, each access key must be unique. [Learn more about access keys](https://dequeuniversity.com/rules/axe/4.11/accesskeys)."
        };
        str_5 = createIcuMessageFn({ url: "core/audits/accessibility/accesskeys.js" }.url, UIStrings24);
        Accesskeys = class extends axe_audit_default {
          static {
            __name(this, "Accesskeys");
          }
          /**
           * @return {LH.Audit.Meta}
           */
          static get meta() {
            return {
              id: "accesskeys",
              title: str_5(UIStrings24.title),
              failureTitle: str_5(UIStrings24.failureTitle),
              description: str_5(UIStrings24.description),
              requiredArtifacts: ["Accessibility"]
            };
          }
        };
        accesskeys_default = Accesskeys;
      }
    });
    aria_allowed_attr_exports = {};
    __export2(aria_allowed_attr_exports, {
      UIStrings: () => UIStrings25,
      default: () => aria_allowed_attr_default
    });
    init_aria_allowed_attr = __esm2({
      "core/audits/accessibility/aria-allowed-attr.js"() {
        "use strict";
        init_process_global();
        init_axe_audit();
        init_i18n();
        UIStrings25 = {
          /** Title of an accessibility audit that evaluates if the ARIA HTML attributes are misaligned with the aria-role HTML attribute specificed on the element, such mismatches are invalid. This title is descriptive of the successful state and is shown to users when no user action is required. */
          title: "`[aria-*]` attributes match their roles",
          /** Title of an accessibility audit that evaluates if the ARIA HTML attributes are misaligned with the aria-role HTML attribute specificed on the element, such mismatches are invalid. This title is descriptive of the failing state and is shown to users when there is a failure that needs to be addressed. */
          failureTitle: "`[aria-*]` attributes do not match their roles",
          /** Description of a Lighthouse audit that tells the user *why* they should try to pass. This is displayed after a user expands the section to see more. No character length limits. The last sentence starting with 'Learn' becomes link text to additional documentation. */
          description: "Each ARIA `role` supports a specific subset of `aria-*` attributes. Mismatching these invalidates the `aria-*` attributes. [Learn how to match ARIA attributes to their roles](https://dequeuniversity.com/rules/axe/4.11/aria-allowed-attr)."
        };
        str_6 = createIcuMessageFn({ url: "core/audits/accessibility/aria-allowed-attr.js" }.url, UIStrings25);
        ARIAAllowedAttr = class extends axe_audit_default {
          static {
            __name(this, "ARIAAllowedAttr");
          }
          /**
           * @return {LH.Audit.Meta}
           */
          static get meta() {
            return {
              id: "aria-allowed-attr",
              title: str_6(UIStrings25.title),
              failureTitle: str_6(UIStrings25.failureTitle),
              description: str_6(UIStrings25.description),
              requiredArtifacts: ["Accessibility"]
            };
          }
        };
        aria_allowed_attr_default = ARIAAllowedAttr;
      }
    });
    aria_allowed_role_exports = {};
    __export2(aria_allowed_role_exports, {
      UIStrings: () => UIStrings26,
      default: () => aria_allowed_role_default
    });
    init_aria_allowed_role = __esm2({
      "core/audits/accessibility/aria-allowed-role.js"() {
        "use strict";
        init_process_global();
        init_axe_audit();
        init_i18n();
        UIStrings26 = {
          /** Title of an accessibility audit that evaluates if the ARIA role attributes are valid for the HTML element. This title is descriptive of the successful state and is shown to users when no user action is required. */
          title: "Uses ARIA roles only on compatible elements",
          /** Title of an accessibility audit that evaluates if the ARIA role attributes are valid for the HTML element. This title is descriptive of the failing state and is shown to users when there is a failure that needs to be addressed. */
          failureTitle: "Uses ARIA roles on incompatible elements",
          /** Description of a Lighthouse audit that tells the user *why* they should try to pass. This is displayed after a user expands the section to see more. No character length limits. The last sentence starting with 'Learn' becomes link text to additional documentation. */
          description: "Many HTML elements can only be assigned certain ARIA roles. Using ARIA roles where they are not allowed can interfere with the accessibility of the web page. [Learn more about ARIA roles](https://dequeuniversity.com/rules/axe/4.11/aria-allowed-role)."
        };
        str_7 = createIcuMessageFn({ url: "core/audits/accessibility/aria-allowed-role.js" }.url, UIStrings26);
        ARIAAllowedRole = class extends axe_audit_default {
          static {
            __name(this, "ARIAAllowedRole");
          }
          /**
           * @return {LH.Audit.Meta}
           */
          static get meta() {
            return {
              id: "aria-allowed-role",
              title: str_7(UIStrings26.title),
              failureTitle: str_7(UIStrings26.failureTitle),
              description: str_7(UIStrings26.description),
              scoreDisplayMode: axe_audit_default.SCORING_MODES.INFORMATIVE,
              requiredArtifacts: ["Accessibility"]
            };
          }
        };
        aria_allowed_role_default = ARIAAllowedRole;
      }
    });
    aria_command_name_exports = {};
    __export2(aria_command_name_exports, {
      UIStrings: () => UIStrings27,
      default: () => aria_command_name_default
    });
    init_aria_command_name = __esm2({
      "core/audits/accessibility/aria-command-name.js"() {
        "use strict";
        init_process_global();
        init_axe_audit();
        init_i18n();
        UIStrings27 = {
          /** Title of an accessibility audit that evaluates if important HTML elements have an accessible name. This title is descriptive of the successful state and is shown to users when no user action is required. */
          title: "`button`, `link`, and `menuitem` elements have accessible names",
          /** Title of an accessibility audit that evaluates if important HTML elements do not have accessible names. This title is descriptive of the failing state and is shown to users when there is a failure that needs to be addressed. */
          failureTitle: "`button`, `link`, and `menuitem` elements do not have accessible names.",
          /** Description of a Lighthouse audit that tells the user *why* they should have accessible names for HTML elements. This is displayed after a user expands the section to see more. No character length limits. The last sentence starting with 'Learn' becomes link text to additional documentation. */
          description: "When an element doesn't have an accessible name, screen readers announce it with a generic name, making it unusable for users who rely on screen readers. [Learn how to make command elements more accessible](https://dequeuniversity.com/rules/axe/4.11/aria-command-name)."
        };
        str_8 = createIcuMessageFn({ url: "core/audits/accessibility/aria-command-name.js" }.url, UIStrings27);
        AriaCommandName = class extends axe_audit_default {
          static {
            __name(this, "AriaCommandName");
          }
          /**
           * @return {LH.Audit.Meta}
           */
          static get meta() {
            return {
              id: "aria-command-name",
              title: str_8(UIStrings27.title),
              failureTitle: str_8(UIStrings27.failureTitle),
              description: str_8(UIStrings27.description),
              requiredArtifacts: ["Accessibility"]
            };
          }
        };
        aria_command_name_default = AriaCommandName;
      }
    });
    aria_conditional_attr_exports = {};
    __export2(aria_conditional_attr_exports, {
      UIStrings: () => UIStrings28,
      default: () => aria_conditional_attr_default
    });
    init_aria_conditional_attr = __esm2({
      "core/audits/accessibility/aria-conditional-attr.js"() {
        "use strict";
        init_process_global();
        init_axe_audit();
        init_i18n();
        UIStrings28 = {
          /** Title of an accessibility audit that checks if ARIA attributes are used as specified for element roles. This title is descriptive of the successful state and is shown to users when no user action is required. */
          title: "ARIA attributes are used as specified for the element's role",
          /** Title of an accessibility audit that checks if ARIA attributes are used as specified for element roles. This title is descriptive of the failing state and is shown to users when there is a failure that needs to be addressed. */
          failureTitle: "ARIA attributes are not used as specified for the element's role",
          /** Description of a Lighthouse audit that tells the user *why* they should try to pass. This is displayed after a user expands the section to see more. No character length limits. The last sentence starting with 'Learn' becomes link text to additional documentation. */
          description: "Some ARIA attributes are only allowed on an element under certain conditions. [Learn more about conditional ARIA attributes](https://dequeuniversity.com/rules/axe/4.11/aria-conditional-attr)."
        };
        str_9 = createIcuMessageFn({ url: "core/audits/accessibility/aria-conditional-attr.js" }.url, UIStrings28);
        AriaConditionalAttr = class extends axe_audit_default {
          static {
            __name(this, "AriaConditionalAttr");
          }
          /**
           * @return {LH.Audit.Meta}
           */
          static get meta() {
            return {
              id: "aria-conditional-attr",
              title: str_9(UIStrings28.title),
              failureTitle: str_9(UIStrings28.failureTitle),
              description: str_9(UIStrings28.description),
              requiredArtifacts: ["Accessibility"]
            };
          }
        };
        aria_conditional_attr_default = AriaConditionalAttr;
      }
    });
    aria_deprecated_role_exports = {};
    __export2(aria_deprecated_role_exports, {
      UIStrings: () => UIStrings29,
      default: () => aria_deprecated_role_default
    });
    init_aria_deprecated_role = __esm2({
      "core/audits/accessibility/aria-deprecated-role.js"() {
        "use strict";
        init_process_global();
        init_axe_audit();
        init_i18n();
        UIStrings29 = {
          /** Title of an accessibility audit that checks if deprecated ARIA roles are used. This title is descriptive of the successful state and is shown to users when no user action is required. */
          title: "Deprecated ARIA roles were not used",
          /** Title of an accessibility audit that checks if deprecated ARIA roles are used. This title is descriptive of the failing state and is shown to users when there is a failure that needs to be addressed. */
          failureTitle: "Deprecated ARIA roles were used",
          /** Description of a Lighthouse audit that tells the user *why* they should try to pass. This is displayed after a user expands the section to see more. No character length limits. The last sentence starting with 'Learn' becomes link text to additional documentation. */
          description: "Deprecated ARIA roles may not be processed correctly by assistive technology. [Learn more about deprecated ARIA roles](https://dequeuniversity.com/rules/axe/4.11/aria-deprecated-role)."
        };
        str_10 = createIcuMessageFn({ url: "core/audits/accessibility/aria-deprecated-role.js" }.url, UIStrings29);
        AriaDeprecatedRole = class extends axe_audit_default {
          static {
            __name(this, "AriaDeprecatedRole");
          }
          /**
           * @return {LH.Audit.Meta}
           */
          static get meta() {
            return {
              id: "aria-deprecated-role",
              title: str_10(UIStrings29.title),
              failureTitle: str_10(UIStrings29.failureTitle),
              description: str_10(UIStrings29.description),
              requiredArtifacts: ["Accessibility"]
            };
          }
        };
        aria_deprecated_role_default = AriaDeprecatedRole;
      }
    });
    aria_dialog_name_exports = {};
    __export2(aria_dialog_name_exports, {
      UIStrings: () => UIStrings30,
      default: () => aria_dialog_name_default
    });
    init_aria_dialog_name = __esm2({
      "core/audits/accessibility/aria-dialog-name.js"() {
        "use strict";
        init_process_global();
        init_axe_audit();
        init_i18n();
        UIStrings30 = {
          /** Title of an accessibility audit that evaluates if ARIA dialog elements have an accessible name. This title is descriptive of the successful state and is shown to users when no user action is required. */
          title: 'Elements with `role="dialog"` or `role="alertdialog"` have accessible names.',
          /** Title of an accessibility audit that evaluates if ARIA dialog elements do not have accessible names. This title is descriptive of the failing state and is shown to users when there is a failure that needs to be addressed. */
          failureTitle: 'Elements with `role="dialog"` or `role="alertdialog"` do not have accessible names.',
          /** Description of a Lighthouse audit that tells the user *why* they should have accessible names for ARIA dialog elements. This is displayed after a user expands the section to see more. No character length limits. The last sentence starting with 'Learn' becomes link text to additional documentation. */
          description: "ARIA dialog elements without accessible names may prevent screen readers users from discerning the purpose of these elements. [Learn how to make ARIA dialog elements more accessible](https://dequeuniversity.com/rules/axe/4.11/aria-dialog-name)."
        };
        str_11 = createIcuMessageFn({ url: "core/audits/accessibility/aria-dialog-name.js" }.url, UIStrings30);
        AriaDialogName = class extends axe_audit_default {
          static {
            __name(this, "AriaDialogName");
          }
          /**
           * @return {LH.Audit.Meta}
           */
          static get meta() {
            return {
              id: "aria-dialog-name",
              title: str_11(UIStrings30.title),
              failureTitle: str_11(UIStrings30.failureTitle),
              description: str_11(UIStrings30.description),
              requiredArtifacts: ["Accessibility"]
            };
          }
        };
        aria_dialog_name_default = AriaDialogName;
      }
    });
    aria_hidden_body_exports = {};
    __export2(aria_hidden_body_exports, {
      UIStrings: () => UIStrings31,
      default: () => aria_hidden_body_default
    });
    init_aria_hidden_body = __esm2({
      "core/audits/accessibility/aria-hidden-body.js"() {
        "use strict";
        init_process_global();
        init_axe_audit();
        init_i18n();
        UIStrings31 = {
          /** Title of an accessibility audit that checks if the html <body> element does not have an aria-hidden attribute set on it. This title is descriptive of the successful state and is shown to users when no user action is required. */
          title: '`[aria-hidden="true"]` is not present on the document `<body>`',
          /** Title of an accessibility audit that checks if the html <body> element does not have an aria-hidden attribute set on it. This title is descriptive of the failing state and is shown to users when there is a failure that needs to be addressed. */
          failureTitle: '`[aria-hidden="true"]` is present on the document `<body>`',
          /** Description of a Lighthouse audit that tells the user *why* they should try to pass. This is displayed after a user expands the section to see more. No character length limits. The last sentence starting with 'Learn' becomes link text to additional documentation. */
          description: 'Assistive technologies, like screen readers, work inconsistently when `aria-hidden="true"` is set on the document `<body>`. [Learn how `aria-hidden` affects the document body](https://dequeuniversity.com/rules/axe/4.11/aria-hidden-body).'
        };
        str_12 = createIcuMessageFn({ url: "core/audits/accessibility/aria-hidden-body.js" }.url, UIStrings31);
        AriaHiddenBody = class extends axe_audit_default {
          static {
            __name(this, "AriaHiddenBody");
          }
          /**
           * @return {LH.Audit.Meta}
           */
          static get meta() {
            return {
              id: "aria-hidden-body",
              title: str_12(UIStrings31.title),
              failureTitle: str_12(UIStrings31.failureTitle),
              description: str_12(UIStrings31.description),
              requiredArtifacts: ["Accessibility"]
            };
          }
        };
        aria_hidden_body_default = AriaHiddenBody;
      }
    });
    aria_hidden_focus_exports = {};
    __export2(aria_hidden_focus_exports, {
      UIStrings: () => UIStrings32,
      default: () => aria_hidden_focus_default
    });
    init_aria_hidden_focus = __esm2({
      "core/audits/accessibility/aria-hidden-focus.js"() {
        "use strict";
        init_process_global();
        init_axe_audit();
        init_i18n();
        UIStrings32 = {
          /** Title of an accessibility audit that checks if all elements that have an aria-hidden attribute do not contain focusable descendent elements. This title is descriptive of the successful state and is shown to users when no user action is required. */
          title: '`[aria-hidden="true"]` elements do not contain focusable descendents',
          /** Title of an accessibility audit that checks if all elements that have an aria-hidden attribute do not contain focusable descendent elements. This title is descriptive of the failing state and is shown to users when there is a failure that needs to be addressed. */
          failureTitle: '`[aria-hidden="true"]` elements contain focusable descendents',
          /** Description of a Lighthouse audit that tells the user *why* they should try to pass. This is displayed after a user expands the section to see more. No character length limits. The last sentence starting with 'Learn' becomes link text to additional documentation. */
          description: 'Focusable descendents within an `[aria-hidden="true"]` element prevent those interactive elements from being available to users of assistive technologies like screen readers. [Learn how `aria-hidden` affects focusable elements](https://dequeuniversity.com/rules/axe/4.11/aria-hidden-focus).'
        };
        str_13 = createIcuMessageFn({ url: "core/audits/accessibility/aria-hidden-focus.js" }.url, UIStrings32);
        AriaHiddenFocus = class extends axe_audit_default {
          static {
            __name(this, "AriaHiddenFocus");
          }
          /**
           * @return {LH.Audit.Meta}
           */
          static get meta() {
            return {
              id: "aria-hidden-focus",
              title: str_13(UIStrings32.title),
              failureTitle: str_13(UIStrings32.failureTitle),
              description: str_13(UIStrings32.description),
              requiredArtifacts: ["Accessibility"]
            };
          }
        };
        aria_hidden_focus_default = AriaHiddenFocus;
      }
    });
    aria_input_field_name_exports = {};
    __export2(aria_input_field_name_exports, {
      UIStrings: () => UIStrings33,
      default: () => aria_input_field_name_default
    });
    init_aria_input_field_name = __esm2({
      "core/audits/accessibility/aria-input-field-name.js"() {
        "use strict";
        init_process_global();
        init_axe_audit();
        init_i18n();
        UIStrings33 = {
          /** Title of an accessibility audit that checks that all ARIA input fields have an accessible name. This title is descriptive of the successful state and is shown to users when no user action is required. */
          title: "ARIA input fields have accessible names",
          /** Title of an accessibility audit that checks that all ARIA input fields have an accessible name. This title is descriptive of the failing state and is shown to users when there is a failure that needs to be addressed. */
          failureTitle: "ARIA input fields do not have accessible names",
          /** Description of a Lighthouse audit that tells the user *why* they should try to pass. This is displayed after a user expands the section to see more. No character length limits. The last sentence starting with 'Learn' becomes link text to additional documentation. */
          description: "When an input field doesn't have an accessible name, screen readers announce it with a generic name, making it unusable for users who rely on screen readers. [Learn more about input field labels](https://dequeuniversity.com/rules/axe/4.11/aria-input-field-name)."
        };
        str_14 = createIcuMessageFn({ url: "core/audits/accessibility/aria-input-field-name.js" }.url, UIStrings33);
        AriaInputFieldName = class extends axe_audit_default {
          static {
            __name(this, "AriaInputFieldName");
          }
          /**
           * @return {LH.Audit.Meta}
           */
          static get meta() {
            return {
              id: "aria-input-field-name",
              title: str_14(UIStrings33.title),
              failureTitle: str_14(UIStrings33.failureTitle),
              description: str_14(UIStrings33.description),
              requiredArtifacts: ["Accessibility"]
            };
          }
        };
        aria_input_field_name_default = AriaInputFieldName;
      }
    });
    aria_meter_name_exports = {};
    __export2(aria_meter_name_exports, {
      UIStrings: () => UIStrings34,
      default: () => aria_meter_name_default
    });
    init_aria_meter_name = __esm2({
      "core/audits/accessibility/aria-meter-name.js"() {
        "use strict";
        init_process_global();
        init_axe_audit();
        init_i18n();
        UIStrings34 = {
          /** Title of an accessibility audit that evaluates if meter HTML elements have an accessible name. This title is descriptive of the successful state and is shown to users when no user action is required. */
          title: "ARIA `meter` elements have accessible names",
          /** Title of an accessibility audit that evaluates if meter HTML elements do not have accessible names. This title is descriptive of the failing state and is shown to users when there is a failure that needs to be addressed. */
          failureTitle: "ARIA `meter` elements do not have accessible names.",
          /** Description of a Lighthouse audit that tells the user *why* they should have accessible names for HTML 'meter' elements. This is displayed after a user expands the section to see more. No character length limits. 'Learn how...' becomes link text to additional documentation. */
          description: "When a meter element doesn't have an accessible name, screen readers announce it with a generic name, making it unusable for users who rely on screen readers. [Learn how to name `meter` elements](https://dequeuniversity.com/rules/axe/4.11/aria-meter-name)."
        };
        str_15 = createIcuMessageFn({ url: "core/audits/accessibility/aria-meter-name.js" }.url, UIStrings34);
        AriaMeterName = class extends axe_audit_default {
          static {
            __name(this, "AriaMeterName");
          }
          /**
           * @return {LH.Audit.Meta}
           */
          static get meta() {
            return {
              id: "aria-meter-name",
              title: str_15(UIStrings34.title),
              failureTitle: str_15(UIStrings34.failureTitle),
              description: str_15(UIStrings34.description),
              requiredArtifacts: ["Accessibility"]
            };
          }
        };
        aria_meter_name_default = AriaMeterName;
      }
    });
    aria_progressbar_name_exports = {};
    __export2(aria_progressbar_name_exports, {
      UIStrings: () => UIStrings35,
      default: () => aria_progressbar_name_default
    });
    init_aria_progressbar_name = __esm2({
      "core/audits/accessibility/aria-progressbar-name.js"() {
        "use strict";
        init_process_global();
        init_axe_audit();
        init_i18n();
        UIStrings35 = {
          /** Title of an accessibility audit that evaluates if progressbar HTML elements have an accessible name. This title is descriptive of the successful state and is shown to users when no user action is required. */
          title: "ARIA `progressbar` elements have accessible names",
          /** Title of an accessibility audit that evaluates if progressbar HTML elements do not have accessible names. This title is descriptive of the failing state and is shown to users when there is a failure that needs to be addressed. */
          failureTitle: "ARIA `progressbar` elements do not have accessible names.",
          /** Description of a Lighthouse audit that tells the user *why* they should try to pass. This is displayed after a user expands the section to see more. No character length limits. The last sentence starting with 'Learn' becomes link text to additional documentation. */
          description: "When a `progressbar` element doesn't have an accessible name, screen readers announce it with a generic name, making it unusable for users who rely on screen readers. [Learn how to label `progressbar` elements](https://dequeuniversity.com/rules/axe/4.11/aria-progressbar-name)."
        };
        str_16 = createIcuMessageFn({ url: "core/audits/accessibility/aria-progressbar-name.js" }.url, UIStrings35);
        AriaProgressbarName = class extends axe_audit_default {
          static {
            __name(this, "AriaProgressbarName");
          }
          /**
           * @return {LH.Audit.Meta}
           */
          static get meta() {
            return {
              id: "aria-progressbar-name",
              title: str_16(UIStrings35.title),
              failureTitle: str_16(UIStrings35.failureTitle),
              description: str_16(UIStrings35.description),
              requiredArtifacts: ["Accessibility"]
            };
          }
        };
        aria_progressbar_name_default = AriaProgressbarName;
      }
    });
    aria_prohibited_attr_exports = {};
    __export2(aria_prohibited_attr_exports, {
      UIStrings: () => UIStrings36,
      default: () => aria_prohibited_attr_default
    });
    init_aria_prohibited_attr = __esm2({
      "core/audits/accessibility/aria-prohibited-attr.js"() {
        "use strict";
        init_process_global();
        init_axe_audit();
        init_i18n();
        UIStrings36 = {
          /** Title of an accessibility audit that checks if elements use prohibited ARIA attributes. This title is descriptive of the successful state and is shown to users when no user action is required. */
          title: "Elements use only permitted ARIA attributes",
          /** Title of an accessibility audit that checks if elements use prohibited ARIA attributes. This title is descriptive of the failing state and is shown to users when there is a failure that needs to be addressed. */
          failureTitle: "Elements use prohibited ARIA attributes",
          /** Description of a Lighthouse audit that tells the user *why* they should try to pass. This is displayed after a user expands the section to see more. No character length limits. The last sentence starting with 'Learn' becomes link text to additional documentation. */
          description: "Using ARIA attributes in roles where they are prohibited can mean that important information is not communicated to users of assistive technologies. [Learn more about prohibited ARIA roles](https://dequeuniversity.com/rules/axe/4.11/aria-prohibited-attr)."
        };
        str_17 = createIcuMessageFn({ url: "core/audits/accessibility/aria-prohibited-attr.js" }.url, UIStrings36);
        AriaProhibitedAttr = class extends axe_audit_default {
          static {
            __name(this, "AriaProhibitedAttr");
          }
          /**
           * @return {LH.Audit.Meta}
           */
          static get meta() {
            return {
              id: "aria-prohibited-attr",
              title: str_17(UIStrings36.title),
              failureTitle: str_17(UIStrings36.failureTitle),
              description: str_17(UIStrings36.description),
              requiredArtifacts: ["Accessibility"]
            };
          }
        };
        aria_prohibited_attr_default = AriaProhibitedAttr;
      }
    });
    aria_required_attr_exports = {};
    __export2(aria_required_attr_exports, {
      UIStrings: () => UIStrings37,
      default: () => aria_required_attr_default
    });
    init_aria_required_attr = __esm2({
      "core/audits/accessibility/aria-required-attr.js"() {
        "use strict";
        init_process_global();
        init_axe_audit();
        init_i18n();
        UIStrings37 = {
          /** Title of an accessibility audit that evaluates if all elements with the aria-role attribute have the other corresponding ARIA attributes set as well. This title is descriptive of the successful state and is shown to users when no user action is required. */
          title: "`[role]`s have all required `[aria-*]` attributes",
          /** Title of an accessibility audit that evaluates if all elements with the aria-role attribute have the other corresponding ARIA attributes set as well. This title is descriptive of the failing state and is shown to users when there is a failure that needs to be addressed. */
          failureTitle: "`[role]`s do not have all required `[aria-*]` attributes",
          /** Description of a Lighthouse audit that tells the user *why* they should try to pass. This is displayed after a user expands the section to see more. No character length limits. The last sentence starting with 'Learn' becomes link text to additional documentation. */
          description: "Some ARIA roles have required attributes that describe the state of the element to screen readers. [Learn more about roles and required attributes](https://dequeuniversity.com/rules/axe/4.11/aria-required-attr)."
        };
        str_18 = createIcuMessageFn({ url: "core/audits/accessibility/aria-required-attr.js" }.url, UIStrings37);
        ARIARequiredAttr = class extends axe_audit_default {
          static {
            __name(this, "ARIARequiredAttr");
          }
          /**
           * @return {LH.Audit.Meta}
           */
          static get meta() {
            return {
              id: "aria-required-attr",
              title: str_18(UIStrings37.title),
              failureTitle: str_18(UIStrings37.failureTitle),
              description: str_18(UIStrings37.description),
              requiredArtifacts: ["Accessibility"]
            };
          }
        };
        aria_required_attr_default = ARIARequiredAttr;
      }
    });
    aria_required_children_exports = {};
    __export2(aria_required_children_exports, {
      UIStrings: () => UIStrings38,
      default: () => aria_required_children_default
    });
    init_aria_required_children = __esm2({
      "core/audits/accessibility/aria-required-children.js"() {
        "use strict";
        init_process_global();
        init_axe_audit();
        init_i18n();
        UIStrings38 = {
          /** Title of an accessibility audit that evaluates if the elements with an aria-role that require child elements have the required children. This title is descriptive of the successful state and is shown to users when no user action is required. */
          title: "Elements with an ARIA `[role]` that require children to contain a specific `[role]` have all required children.",
          /** Title of an accessibility audit that evaluates if the elements with an aria-role that require child elements have the required children. This title is descriptive of the failing state and is shown to users when there is a failure that needs to be addressed. */
          failureTitle: "Elements with an ARIA `[role]` that require children to contain a specific `[role]` are missing some or all of those required children.",
          /** Description of a Lighthouse audit that tells the user *why* they should try to pass. This is displayed after a user expands the section to see more. No character length limits. The last sentence starting with 'Learn' becomes link text to additional documentation. */
          description: "Some ARIA parent roles must contain specific child roles to perform their intended accessibility functions. [Learn more about roles and required children elements](https://dequeuniversity.com/rules/axe/4.11/aria-required-children)."
        };
        str_19 = createIcuMessageFn({ url: "core/audits/accessibility/aria-required-children.js" }.url, UIStrings38);
        AriaRequiredChildren = class extends axe_audit_default {
          static {
            __name(this, "AriaRequiredChildren");
          }
          /**
           * @return {LH.Audit.Meta}
           */
          static get meta() {
            return {
              id: "aria-required-children",
              title: str_19(UIStrings38.title),
              failureTitle: str_19(UIStrings38.failureTitle),
              description: str_19(UIStrings38.description),
              requiredArtifacts: ["Accessibility"]
            };
          }
        };
        aria_required_children_default = AriaRequiredChildren;
      }
    });
    aria_required_parent_exports = {};
    __export2(aria_required_parent_exports, {
      UIStrings: () => UIStrings39,
      default: () => aria_required_parent_default
    });
    init_aria_required_parent = __esm2({
      "core/audits/accessibility/aria-required-parent.js"() {
        "use strict";
        init_process_global();
        init_axe_audit();
        init_i18n();
        UIStrings39 = {
          /** Title of an accessibility audit that evaluates valid aria-role usage. Some ARIA roles require that elements must be a child of specific parent element. This audit checks that when those roles are used, the element with the role is in fact a child of the required parent. This title is descriptive of the successful state and is shown to users when no user action is required. */
          title: "`[role]`s are contained by their required parent element",
          /** Title of an accessibility audit that evaluates valid aria-role usage. Some ARIA roles require that elements must be a child of specific parent element. This audit checks that when those roles are used, the element with the role is in fact a child of the required parent. This title is descriptive of the failing state and is shown to users when there is a failure that needs to be addressed. */
          failureTitle: "`[role]`s are not contained by their required parent element",
          /** Description of a Lighthouse audit that tells the user *why* they should try to pass. This is displayed after a user expands the section to see more. No character length limits. The last sentence starting with 'Learn' becomes link text to additional documentation. */
          description: "Some ARIA child roles must be contained by specific parent roles to properly perform their intended accessibility functions. [Learn more about ARIA roles and required parent element](https://dequeuniversity.com/rules/axe/4.11/aria-required-parent)."
        };
        str_20 = createIcuMessageFn({ url: "core/audits/accessibility/aria-required-parent.js" }.url, UIStrings39);
        AriaRequiredParent = class extends axe_audit_default {
          static {
            __name(this, "AriaRequiredParent");
          }
          /**
           * @return {LH.Audit.Meta}
           */
          static get meta() {
            return {
              id: "aria-required-parent",
              title: str_20(UIStrings39.title),
              failureTitle: str_20(UIStrings39.failureTitle),
              description: str_20(UIStrings39.description),
              requiredArtifacts: ["Accessibility"]
            };
          }
        };
        aria_required_parent_default = AriaRequiredParent;
      }
    });
    aria_roles_exports = {};
    __export2(aria_roles_exports, {
      UIStrings: () => UIStrings40,
      default: () => aria_roles_default
    });
    init_aria_roles = __esm2({
      "core/audits/accessibility/aria-roles.js"() {
        "use strict";
        init_process_global();
        init_axe_audit();
        init_i18n();
        UIStrings40 = {
          /** Title of an accessibility audit that evaluates if all elements have valid aria-role HTML attributes. This title is descriptive of the successful state and is shown to users when no user action is required. */
          title: "`[role]` values are valid",
          /** Title of an accessibility audit that evaluates if all elements have valid aria-role HTML attributes. This title is descriptive of the failing state and is shown to users when there is a failure that needs to be addressed. */
          failureTitle: "`[role]` values are not valid",
          /** Description of a Lighthouse audit that tells the user *why* they should try to pass. This is displayed after a user expands the section to see more. No character length limits. The last sentence starting with 'Learn' becomes link text to additional documentation. */
          description: "ARIA roles must have valid values in order to perform their intended accessibility functions. [Learn more about valid ARIA roles](https://dequeuniversity.com/rules/axe/4.11/aria-roles)."
        };
        str_21 = createIcuMessageFn({ url: "core/audits/accessibility/aria-roles.js" }.url, UIStrings40);
        AriaRoles = class extends axe_audit_default {
          static {
            __name(this, "AriaRoles");
          }
          /**
           * @return {LH.Audit.Meta}
           */
          static get meta() {
            return {
              id: "aria-roles",
              title: str_21(UIStrings40.title),
              failureTitle: str_21(UIStrings40.failureTitle),
              description: str_21(UIStrings40.description),
              requiredArtifacts: ["Accessibility"]
            };
          }
        };
        aria_roles_default = AriaRoles;
      }
    });
    aria_text_exports = {};
    __export2(aria_text_exports, {
      UIStrings: () => UIStrings41,
      default: () => aria_text_default
    });
    init_aria_text = __esm2({
      "core/audits/accessibility/aria-text.js"() {
        "use strict";
        init_process_global();
        init_axe_audit();
        init_i18n();
        UIStrings41 = {
          /** Title of an accessibility audit that evaluates if elements with `role=text` have no focusable descendents. This title is descriptive of the successful state and is shown to users when no user action is required. */
          title: "Elements with the `role=text` attribute do not have focusable descendents.",
          /** Title of an accessibility audit that evaluates if elements with `role=text` have focusable descendents. This title is descriptive of the successful state and is shown to users when no user action is required. */
          failureTitle: "Elements with the `role=text` attribute do have focusable descendents.",
          /** Description of a Lighthouse audit that tells the user *why* they should try to pass. This is displayed after a user expands the section to see more. No character length limits. The last sentence starting with 'Learn' becomes link text to additional documentation. */
          description: "Adding `role=text` around a text node split by markup enables VoiceOver to treat it as one phrase, but the element's focusable descendents will not be announced. [Learn more about the `role=text` attribute](https://dequeuniversity.com/rules/axe/4.11/aria-text)."
        };
        str_22 = createIcuMessageFn({ url: "core/audits/accessibility/aria-text.js" }.url, UIStrings41);
        AriaText = class extends axe_audit_default {
          static {
            __name(this, "AriaText");
          }
          /**
           * @return {LH.Audit.Meta}
           */
          static get meta() {
            return {
              id: "aria-text",
              title: str_22(UIStrings41.title),
              failureTitle: str_22(UIStrings41.failureTitle),
              description: str_22(UIStrings41.description),
              requiredArtifacts: ["Accessibility"]
            };
          }
        };
        aria_text_default = AriaText;
      }
    });
    aria_toggle_field_name_exports = {};
    __export2(aria_toggle_field_name_exports, {
      UIStrings: () => UIStrings42,
      default: () => aria_toggle_field_name_default
    });
    init_aria_toggle_field_name = __esm2({
      "core/audits/accessibility/aria-toggle-field-name.js"() {
        "use strict";
        init_process_global();
        init_axe_audit();
        init_i18n();
        UIStrings42 = {
          /** Title of an accessibility audit that checks that all ARIA toggle fields have an accessible name. This title is descriptive of the successful state and is shown to users when no user action is required. */
          title: "ARIA toggle fields have accessible names",
          /** Title of an accessibility audit that checks that all ARIA toggle fields have an accessible name. This title is descriptive of the failing state and is shown to users when there is a failure that needs to be addressed. */
          failureTitle: "ARIA toggle fields do not have accessible names",
          /** Description of a Lighthouse audit that tells the user *why* they should try to pass. This is displayed after a user expands the section to see more. No character length limits. The last sentence starting with 'Learn' becomes link text to additional documentation. */
          description: "When a toggle field doesn't have an accessible name, screen readers announce it with a generic name, making it unusable for users who rely on screen readers. [Learn more about toggle fields](https://dequeuniversity.com/rules/axe/4.11/aria-toggle-field-name)."
        };
        str_23 = createIcuMessageFn({ url: "core/audits/accessibility/aria-toggle-field-name.js" }.url, UIStrings42);
        AriaToggleFieldName = class extends axe_audit_default {
          static {
            __name(this, "AriaToggleFieldName");
          }
          /**
           * @return {LH.Audit.Meta}
           */
          static get meta() {
            return {
              id: "aria-toggle-field-name",
              title: str_23(UIStrings42.title),
              failureTitle: str_23(UIStrings42.failureTitle),
              description: str_23(UIStrings42.description),
              requiredArtifacts: ["Accessibility"]
            };
          }
        };
        aria_toggle_field_name_default = AriaToggleFieldName;
      }
    });
    aria_tooltip_name_exports = {};
    __export2(aria_tooltip_name_exports, {
      UIStrings: () => UIStrings43,
      default: () => aria_tooltip_name_default
    });
    init_aria_tooltip_name = __esm2({
      "core/audits/accessibility/aria-tooltip-name.js"() {
        "use strict";
        init_process_global();
        init_axe_audit();
        init_i18n();
        UIStrings43 = {
          /** Title of an accessibility audit that evaluates if tooltip HTML elements have an accessible name. This title is descriptive of the successful state and is shown to users when no user action is required. */
          title: "ARIA `tooltip` elements have accessible names",
          /** Title of an accessibility audit that evaluates if tooltip HTML elements do not have accessible names. This title is descriptive of the failing state and is shown to users when there is a failure that needs to be addressed. */
          failureTitle: "ARIA `tooltip` elements do not have accessible names.",
          /** Description of a Lighthouse audit that tells the user *why* they should have accessible names for HTML 'tooltip' elements. This is displayed after a user expands the section to see more. No character length limits. 'Learn how...' becomes link text to additional documentation. */
          description: "When a tooltip element doesn't have an accessible name, screen readers announce it with a generic name, making it unusable for users who rely on screen readers. [Learn how to name `tooltip` elements](https://dequeuniversity.com/rules/axe/4.11/aria-tooltip-name)."
        };
        str_24 = createIcuMessageFn({ url: "core/audits/accessibility/aria-tooltip-name.js" }.url, UIStrings43);
        AriaTooltipName = class extends axe_audit_default {
          static {
            __name(this, "AriaTooltipName");
          }
          /**
           * @return {LH.Audit.Meta}
           */
          static get meta() {
            return {
              id: "aria-tooltip-name",
              title: str_24(UIStrings43.title),
              failureTitle: str_24(UIStrings43.failureTitle),
              description: str_24(UIStrings43.description),
              requiredArtifacts: ["Accessibility"]
            };
          }
        };
        aria_tooltip_name_default = AriaTooltipName;
      }
    });
    aria_treeitem_name_exports = {};
    __export2(aria_treeitem_name_exports, {
      UIStrings: () => UIStrings44,
      default: () => aria_treeitem_name_default
    });
    init_aria_treeitem_name = __esm2({
      "core/audits/accessibility/aria-treeitem-name.js"() {
        "use strict";
        init_process_global();
        init_axe_audit();
        init_i18n();
        UIStrings44 = {
          /** Title of an accessibility audit that evaluates if treeitem HTML elements have an accessible name. This title is descriptive of the successful state and is shown to users when no user action is required. */
          title: "ARIA `treeitem` elements have accessible names",
          /** Title of an accessibility audit that evaluates if treeitem HTML elements do not have accessible names. This title is descriptive of the failing state and is shown to users when there is a failure that needs to be addressed. */
          failureTitle: "ARIA `treeitem` elements do not have accessible names.",
          /** Description of a Lighthouse audit that tells the user *why* they should have accessible names for HTML elements. This is displayed after a user expands the section to see more. No character length limits. The last sentence starting with 'Learn' becomes link text to additional documentation. */
          description: "When a `treeitem` element doesn't have an accessible name, screen readers announce it with a generic name, making it unusable for users who rely on screen readers. [Learn more about labeling `treeitem` elements](https://dequeuniversity.com/rules/axe/4.11/aria-treeitem-name)."
        };
        str_25 = createIcuMessageFn({ url: "core/audits/accessibility/aria-treeitem-name.js" }.url, UIStrings44);
        AriaTreeitemName = class extends axe_audit_default {
          static {
            __name(this, "AriaTreeitemName");
          }
          /**
           * @return {LH.Audit.Meta}
           */
          static get meta() {
            return {
              id: "aria-treeitem-name",
              title: str_25(UIStrings44.title),
              failureTitle: str_25(UIStrings44.failureTitle),
              description: str_25(UIStrings44.description),
              requiredArtifacts: ["Accessibility"]
            };
          }
        };
        aria_treeitem_name_default = AriaTreeitemName;
      }
    });
    aria_valid_attr_value_exports = {};
    __export2(aria_valid_attr_value_exports, {
      UIStrings: () => UIStrings45,
      default: () => aria_valid_attr_value_default
    });
    init_aria_valid_attr_value = __esm2({
      "core/audits/accessibility/aria-valid-attr-value.js"() {
        "use strict";
        init_process_global();
        init_axe_audit();
        init_i18n();
        UIStrings45 = {
          /** Title of an accessibility audit that evaluates if all elements that have an ARIA HTML attribute have a valid value for that attribute. This title is descriptive of the successful state and is shown to users when no user action is required. */
          title: "`[aria-*]` attributes have valid values",
          /** Title of an accessibility audit that evaluates if all elements that have an ARIA HTML attribute have a valid value for that attribute. This title is descriptive of the failing state and is shown to users when there is a failure that needs to be addressed. */
          failureTitle: "`[aria-*]` attributes do not have valid values",
          /** Description of a Lighthouse audit that tells the user *why* they should try to pass. This is displayed after a user expands the section to see more. No character length limits. The last sentence starting with 'Learn' becomes link text to additional documentation. */
          description: "Assistive technologies, like screen readers, can't interpret ARIA attributes with invalid values. [Learn more about valid values for ARIA attributes](https://dequeuniversity.com/rules/axe/4.11/aria-valid-attr-value)."
        };
        str_26 = createIcuMessageFn({ url: "core/audits/accessibility/aria-valid-attr-value.js" }.url, UIStrings45);
        ARIAValidAttr = class extends axe_audit_default {
          static {
            __name(this, "ARIAValidAttr");
          }
          /**
           * @return {LH.Audit.Meta}
           */
          static get meta() {
            return {
              id: "aria-valid-attr-value",
              title: str_26(UIStrings45.title),
              failureTitle: str_26(UIStrings45.failureTitle),
              description: str_26(UIStrings45.description),
              requiredArtifacts: ["Accessibility"]
            };
          }
        };
        aria_valid_attr_value_default = ARIAValidAttr;
      }
    });
    aria_valid_attr_exports = {};
    __export2(aria_valid_attr_exports, {
      UIStrings: () => UIStrings46,
      default: () => aria_valid_attr_default
    });
    init_aria_valid_attr = __esm2({
      "core/audits/accessibility/aria-valid-attr.js"() {
        "use strict";
        init_process_global();
        init_axe_audit();
        init_i18n();
        UIStrings46 = {
          /** Title of an accessibility audit that evaluates if all elements with ARIA HTML attributes have spelled the name of attribute correctly. This title is descriptive of the successful state and is shown to users when no user action is required. */
          title: "`[aria-*]` attributes are valid and not misspelled",
          /** Title of an accessibility audit that evaluates if all elements with ARIA HTML attributes have spelled the name of attribute correctly. This title is descriptive of the failing state and is shown to users when there is a failure that needs to be addressed. */
          failureTitle: "`[aria-*]` attributes are not valid or misspelled",
          /** Description of a Lighthouse audit that tells the user *why* they should try to pass. This is displayed after a user expands the section to see more. No character length limits. The last sentence starting with 'Learn' becomes link text to additional documentation. */
          description: "Assistive technologies, like screen readers, can't interpret ARIA attributes with invalid names. [Learn more about valid ARIA attributes](https://dequeuniversity.com/rules/axe/4.11/aria-valid-attr)."
        };
        str_27 = createIcuMessageFn({ url: "core/audits/accessibility/aria-valid-attr.js" }.url, UIStrings46);
        ARIAValidAttr2 = class extends axe_audit_default {
          static {
            __name(this, "ARIAValidAttr");
          }
          /**
           * @return {LH.Audit.Meta}
           */
          static get meta() {
            return {
              id: "aria-valid-attr",
              title: str_27(UIStrings46.title),
              failureTitle: str_27(UIStrings46.failureTitle),
              description: str_27(UIStrings46.description),
              requiredArtifacts: ["Accessibility"]
            };
          }
        };
        aria_valid_attr_default = ARIAValidAttr2;
      }
    });
    button_name_exports = {};
    __export2(button_name_exports, {
      UIStrings: () => UIStrings47,
      default: () => button_name_default
    });
    init_button_name = __esm2({
      "core/audits/accessibility/button-name.js"() {
        "use strict";
        init_process_global();
        init_axe_audit();
        init_i18n();
        UIStrings47 = {
          /** Title of an accessibility audit that evaluates if all button elements have names accessible to screen readers. This title is descriptive of the successful state and is shown to users when no user action is required. */
          title: "Buttons have an accessible name",
          /** Title of an accessibility audit that evaluates if all button elements have names accessible to screen readers. This title is descriptive of the failing state and is shown to users when there is a failure that needs to be addressed. */
          failureTitle: "Buttons do not have an accessible name",
          /** Description of a Lighthouse audit that tells the user *why* they should try to pass. This is displayed after a user expands the section to see more. No character length limits. The last sentence starting with 'Learn' becomes link text to additional documentation. */
          description: `When a button doesn't have an accessible name, screen readers announce it as "button", making it unusable for users who rely on screen readers. [Learn how to make buttons more accessible](https://dequeuniversity.com/rules/axe/4.11/button-name).`
        };
        str_28 = createIcuMessageFn({ url: "core/audits/accessibility/button-name.js" }.url, UIStrings47);
        ButtonName = class extends axe_audit_default {
          static {
            __name(this, "ButtonName");
          }
          /**
           * @return {LH.Audit.Meta}
           */
          static get meta() {
            return {
              id: "button-name",
              title: str_28(UIStrings47.title),
              failureTitle: str_28(UIStrings47.failureTitle),
              description: str_28(UIStrings47.description),
              requiredArtifacts: ["Accessibility"]
            };
          }
        };
        button_name_default = ButtonName;
      }
    });
    bypass_exports = {};
    __export2(bypass_exports, {
      UIStrings: () => UIStrings48,
      default: () => bypass_default
    });
    init_bypass = __esm2({
      "core/audits/accessibility/bypass.js"() {
        "use strict";
        init_process_global();
        init_axe_audit();
        init_i18n();
        UIStrings48 = {
          /** Title of an accessibility audit that evaluates if the page has elements that let screen reader users skip over repetitive content. `heading`, `skip link`, and `landmark region` are technical terms for the elements that enable quick page navigation. This title is descriptive of the successful state and is shown to users when no user action is required. */
          title: "The page contains a heading, skip link, or landmark region",
          /** Title of an accessibility audit that evaluates if the page has elements that let screen reader users skip over repetitive content. `heading`, `skip link`, and `landmark region` are technical terms for the elements that enable quick page navigation. This title is descriptive of the failing state and is shown to users when there is a failure that needs to be addressed. */
          failureTitle: "The page does not contain a heading, skip link, or landmark region",
          /** Description of a Lighthouse audit that tells the user *why* they should try to pass. This is displayed after a user expands the section to see more. No character length limits. The last sentence starting with 'Learn' becomes link text to additional documentation. */
          description: "Adding ways to bypass repetitive content lets keyboard users navigate the page more efficiently. [Learn more about bypass blocks](https://dequeuniversity.com/rules/axe/4.11/bypass)."
        };
        str_29 = createIcuMessageFn({ url: "core/audits/accessibility/bypass.js" }.url, UIStrings48);
        Bypass = class extends axe_audit_default {
          static {
            __name(this, "Bypass");
          }
          /**
           * @return {LH.Audit.Meta}
           */
          static get meta() {
            return {
              id: "bypass",
              title: str_29(UIStrings48.title),
              failureTitle: str_29(UIStrings48.failureTitle),
              description: str_29(UIStrings48.description),
              scoreDisplayMode: axe_audit_default.SCORING_MODES.INFORMATIVE,
              requiredArtifacts: ["Accessibility"]
            };
          }
        };
        bypass_default = Bypass;
      }
    });
    color_contrast_exports = {};
    __export2(color_contrast_exports, {
      UIStrings: () => UIStrings49,
      default: () => color_contrast_default
    });
    init_color_contrast = __esm2({
      "core/audits/accessibility/color-contrast.js"() {
        "use strict";
        init_process_global();
        init_axe_audit();
        init_i18n();
        UIStrings49 = {
          /** Title of an accessibility audit that evaluates if all foreground colors are distinct enough from their background colors to be legible for users. This title is descriptive of the successful state and is shown to users when no user action is required. */
          title: "Background and foreground colors have a sufficient contrast ratio",
          /** Title of an accessibility audit that evaluates if all foreground colors are distinct enough from their background colors to be legible for users. This title is descriptive of the failing state and is shown to users when there is a failure that needs to be addressed. */
          failureTitle: "Background and foreground colors do not have a sufficient contrast ratio.",
          /** Description of a Lighthouse audit that tells the user *why* they should try to pass. This is displayed after a user expands the section to see more. No character length limits. The last sentence starting with 'Learn' becomes link text to additional documentation. */
          description: "Low-contrast text is difficult or impossible for many users to read. [Learn how to provide sufficient color contrast](https://dequeuniversity.com/rules/axe/4.11/color-contrast)."
        };
        str_30 = createIcuMessageFn({ url: "core/audits/accessibility/color-contrast.js" }.url, UIStrings49);
        ColorContrast = class extends axe_audit_default {
          static {
            __name(this, "ColorContrast");
          }
          /**
           * @return {LH.Audit.Meta}
           */
          static get meta() {
            return {
              id: "color-contrast",
              title: str_30(UIStrings49.title),
              failureTitle: str_30(UIStrings49.failureTitle),
              description: str_30(UIStrings49.description),
              requiredArtifacts: ["Accessibility"]
            };
          }
        };
        color_contrast_default = ColorContrast;
      }
    });
    definition_list_exports = {};
    __export2(definition_list_exports, {
      UIStrings: () => UIStrings50,
      default: () => definition_list_default
    });
    init_definition_list = __esm2({
      "core/audits/accessibility/definition-list.js"() {
        "use strict";
        init_process_global();
        init_axe_audit();
        init_i18n();
        UIStrings50 = {
          /** Title of an accessibility audit that evaluates if all the definition list elements have valid markup for screen readers. This title is descriptive of the successful state and is shown to users when no user action is required. */
          title: "`<dl>`'s contain only properly-ordered `<dt>` and `<dd>` groups, `<script>`, `<template>` or `<div>` elements.",
          /** Title of an accessibility audit that evaluates if all the definition list elements have valid markup for screen readers. This title is descriptive of the failing state and is shown to users when there is a failure that needs to be addressed. */
          failureTitle: "`<dl>`'s do not contain only properly-ordered `<dt>` and `<dd>` groups, `<script>`, `<template>` or `<div>` elements.",
          /** Description of a Lighthouse audit that tells the user *why* they should try to pass. This is displayed after a user expands the section to see more. No character length limits. The last sentence starting with 'Learn' becomes link text to additional documentation. */
          description: "When definition lists are not properly marked up, screen readers may produce confusing or inaccurate output. [Learn how to structure definition lists correctly](https://dequeuniversity.com/rules/axe/4.11/definition-list)."
        };
        str_31 = createIcuMessageFn({ url: "core/audits/accessibility/definition-list.js" }.url, UIStrings50);
        DefinitionList = class extends axe_audit_default {
          static {
            __name(this, "DefinitionList");
          }
          /**
           * @return {LH.Audit.Meta}
           */
          static get meta() {
            return {
              id: "definition-list",
              title: str_31(UIStrings50.title),
              failureTitle: str_31(UIStrings50.failureTitle),
              description: str_31(UIStrings50.description),
              requiredArtifacts: ["Accessibility"]
            };
          }
        };
        definition_list_default = DefinitionList;
      }
    });
    dlitem_exports = {};
    __export2(dlitem_exports, {
      UIStrings: () => UIStrings51,
      default: () => dlitem_default
    });
    init_dlitem = __esm2({
      "core/audits/accessibility/dlitem.js"() {
        "use strict";
        init_process_global();
        init_axe_audit();
        init_i18n();
        UIStrings51 = {
          /** Title of an accessibility audit that evaluates if all definition list item elements (`<dt>`/`<dd>`) have a definition list parent element (`<dl>`). This title is descriptive of the successful state and is shown to users when no user action is required. */
          title: "Definition list items are wrapped in `<dl>` elements",
          /** Title of an accessibility audit that evaluates if all definition list item elements (`<dt>`/`<dd>`) have a definition list parent element (`<dl>`). This title is descriptive of the failing state and is shown to users when there is a failure that needs to be addressed. */
          failureTitle: "Definition list items are not wrapped in `<dl>` elements",
          /** Description of a Lighthouse audit that tells the user *why* they should try to pass. This is displayed after a user expands the section to see more. No character length limits. The last sentence starting with 'Learn' becomes link text to additional documentation. */
          description: "Definition list items (`<dt>` and `<dd>`) must be wrapped in a parent `<dl>` element to ensure that screen readers can properly announce them. [Learn how to structure definition lists correctly](https://dequeuniversity.com/rules/axe/4.11/dlitem)."
        };
        str_32 = createIcuMessageFn({ url: "core/audits/accessibility/dlitem.js" }.url, UIStrings51);
        DLItem = class extends axe_audit_default {
          static {
            __name(this, "DLItem");
          }
          /**
           * @return {LH.Audit.Meta}
           */
          static get meta() {
            return {
              id: "dlitem",
              title: str_32(UIStrings51.title),
              failureTitle: str_32(UIStrings51.failureTitle),
              description: str_32(UIStrings51.description),
              requiredArtifacts: ["Accessibility"]
            };
          }
        };
        dlitem_default = DLItem;
      }
    });
    document_title_exports = {};
    __export2(document_title_exports, {
      UIStrings: () => UIStrings52,
      default: () => document_title_default
    });
    init_document_title = __esm2({
      "core/audits/accessibility/document-title.js"() {
        "use strict";
        init_process_global();
        init_axe_audit();
        init_i18n();
        UIStrings52 = {
          /** Title of an accessibility audit that evaluates if the page has a <title> element that describes the page. This title is descriptive of the successful state and is shown to users when no user action is required. */
          title: "Document has a `<title>` element",
          /** Title of an accessibility audit that evaluates if the page has a <title> element that describes the page. This title is descriptive of the failing state and is shown to users when there is a failure that needs to be addressed. */
          failureTitle: "Document doesn't have a `<title>` element",
          /** Description of a Lighthouse audit that tells the user *why* they should try to pass. This is displayed after a user expands the section to see more. No character length limits. The last sentence starting with 'Learn' becomes link text to additional documentation. */
          description: "The title gives screen reader users an overview of the page, and search engine users rely on it heavily to determine if a page is relevant to their search. [Learn more about document titles](https://dequeuniversity.com/rules/axe/4.11/document-title)."
        };
        str_33 = createIcuMessageFn({ url: "core/audits/accessibility/document-title.js" }.url, UIStrings52);
        DocumentTitle = class extends axe_audit_default {
          static {
            __name(this, "DocumentTitle");
          }
          /**
           * @return {LH.Audit.Meta}
           */
          static get meta() {
            return {
              id: "document-title",
              title: str_33(UIStrings52.title),
              failureTitle: str_33(UIStrings52.failureTitle),
              description: str_33(UIStrings52.description),
              requiredArtifacts: ["Accessibility"]
            };
          }
        };
        document_title_default = DocumentTitle;
      }
    });
    duplicate_id_aria_exports = {};
    __export2(duplicate_id_aria_exports, {
      UIStrings: () => UIStrings53,
      default: () => duplicate_id_aria_default
    });
    init_duplicate_id_aria = __esm2({
      "core/audits/accessibility/duplicate-id-aria.js"() {
        "use strict";
        init_process_global();
        init_axe_audit();
        init_i18n();
        UIStrings53 = {
          /** Title of an accessibility audit that checks if there are any duplicate ARIA IDs on the page. This title is descriptive of the successful state and is shown to users when no user action is required. */
          title: "ARIA IDs are unique",
          /** Title of an accessibility audit that checks if there are any duplicate ARIA IDs on the page. This title is descriptive of the failing state and is shown to users when there is a failure that needs to be addressed. */
          failureTitle: "ARIA IDs are not unique",
          /** Description of a Lighthouse audit that tells the user *why* they should try to pass. This is displayed after a user expands the section to see more. No character length limits. The last sentence starting with 'Learn' becomes link text to additional documentation. */
          description: "The value of an ARIA ID must be unique to prevent other instances from being overlooked by assistive technologies. [Learn how to fix duplicate ARIA IDs](https://dequeuniversity.com/rules/axe/4.11/duplicate-id-aria)."
        };
        str_34 = createIcuMessageFn({ url: "core/audits/accessibility/duplicate-id-aria.js" }.url, UIStrings53);
        DuplicateIdAria = class extends axe_audit_default {
          static {
            __name(this, "DuplicateIdAria");
          }
          /**
           * @return {LH.Audit.Meta}
           */
          static get meta() {
            return {
              id: "duplicate-id-aria",
              title: str_34(UIStrings53.title),
              failureTitle: str_34(UIStrings53.failureTitle),
              description: str_34(UIStrings53.description),
              scoreDisplayMode: axe_audit_default.SCORING_MODES.INFORMATIVE,
              requiredArtifacts: ["Accessibility"]
            };
          }
        };
        duplicate_id_aria_default = DuplicateIdAria;
      }
    });
    empty_heading_exports = {};
    __export2(empty_heading_exports, {
      UIStrings: () => UIStrings54,
      default: () => empty_heading_default
    });
    init_empty_heading = __esm2({
      "core/audits/accessibility/empty-heading.js"() {
        "use strict";
        init_process_global();
        init_axe_audit();
        init_i18n();
        UIStrings54 = {
          /** Title of an accessibility audit that checks if all heading elements have content. This title is descriptive of the successful state and is shown to users when no user action is required. */
          title: "All heading elements contain content.",
          /** Title of an accessibility audit that checks if all heading elements have content. This title is descriptive of the failing state and is shown to users when there is a failure that needs to be addressed. */
          failureTitle: "Heading elements do not contain content.",
          /** Description of a Lighthouse audit that tells the user *why* they should try to pass. This is displayed after a user expands the section to see more. No character length limits. The last sentence starting with 'Learn' becomes link text to additional documentation. */
          description: "A heading with no content or inaccessible text prevent screen reader users from accessing information on the page's structure. [Learn more about headings](https://dequeuniversity.com/rules/axe/4.11/empty-heading)."
        };
        str_35 = createIcuMessageFn({ url: "core/audits/accessibility/empty-heading.js" }.url, UIStrings54);
        EmptyHeading = class extends axe_audit_default {
          static {
            __name(this, "EmptyHeading");
          }
          /**
           * @return {LH.Audit.Meta}
           */
          static get meta() {
            return {
              id: "empty-heading",
              title: str_35(UIStrings54.title),
              failureTitle: str_35(UIStrings54.failureTitle),
              description: str_35(UIStrings54.description),
              scoreDisplayMode: axe_audit_default.SCORING_MODES.INFORMATIVE,
              requiredArtifacts: ["Accessibility"]
            };
          }
        };
        empty_heading_default = EmptyHeading;
      }
    });
    form_field_multiple_labels_exports = {};
    __export2(form_field_multiple_labels_exports, {
      UIStrings: () => UIStrings55,
      default: () => form_field_multiple_labels_default
    });
    init_form_field_multiple_labels = __esm2({
      "core/audits/accessibility/form-field-multiple-labels.js"() {
        "use strict";
        init_process_global();
        init_axe_audit();
        init_i18n();
        UIStrings55 = {
          /** Title of an accessibility audit that checks if any form fields have multiple label elements. This title is descriptive of the successful state and is shown to users when no user action is required. */
          title: "No form fields have multiple labels",
          /** Title of an accessibility audit that checks if any form fields have multiple label elements. This title is descriptive of the failing state and is shown to users when there is a failure that needs to be addressed. */
          failureTitle: "Form fields have multiple labels",
          /** Description of a Lighthouse audit that tells the user *why* they should try to pass. This is displayed after a user expands the section to see more. No character length limits. The last sentence starting with 'Learn' becomes link text to additional documentation. */
          description: "Form fields with multiple labels can be confusingly announced by assistive technologies like screen readers which use either the first, the last, or all of the labels. [Learn how to use form labels](https://dequeuniversity.com/rules/axe/4.11/form-field-multiple-labels)."
        };
        str_36 = createIcuMessageFn({ url: "core/audits/accessibility/form-field-multiple-labels.js" }.url, UIStrings55);
        FormFieldMultipleLabels = class extends axe_audit_default {
          static {
            __name(this, "FormFieldMultipleLabels");
          }
          /**
           * @return {LH.Audit.Meta}
           */
          static get meta() {
            return {
              id: "form-field-multiple-labels",
              title: str_36(UIStrings55.title),
              failureTitle: str_36(UIStrings55.failureTitle),
              description: str_36(UIStrings55.description),
              scoreDisplayMode: axe_audit_default.SCORING_MODES.INFORMATIVE,
              requiredArtifacts: ["Accessibility"]
            };
          }
        };
        form_field_multiple_labels_default = FormFieldMultipleLabels;
      }
    });
    frame_title_exports = {};
    __export2(frame_title_exports, {
      UIStrings: () => UIStrings56,
      default: () => frame_title_default
    });
    init_frame_title = __esm2({
      "core/audits/accessibility/frame-title.js"() {
        "use strict";
        init_process_global();
        init_axe_audit();
        init_i18n();
        UIStrings56 = {
          /** Title of an accessibility audit that evaluates if all `<frame>` and `<iframe>` elements on the page have a title HTML attribute to describe their contents. This title is descriptive of the successful state and is shown to users when no user action is required. */
          title: "`<frame>` or `<iframe>` elements have a title",
          /** Title of an accessibility audit that evaluates if all `<frame>` and `<iframe>` elements on the page have a title HTML attribute to describe their contents. This title is descriptive of the failing state and is shown to users when there is a failure that needs to be addressed. */
          failureTitle: "`<frame>` or `<iframe>` elements do not have a title",
          /** Description of a Lighthouse audit that tells the user *why* they should try to pass. This is displayed after a user expands the section to see more. No character length limits. The last sentence starting with 'Learn' becomes link text to additional documentation. */
          description: "Screen reader users rely on frame titles to describe the contents of frames. [Learn more about frame titles](https://dequeuniversity.com/rules/axe/4.11/frame-title)."
        };
        str_37 = createIcuMessageFn({ url: "core/audits/accessibility/frame-title.js" }.url, UIStrings56);
        FrameTitle = class extends axe_audit_default {
          static {
            __name(this, "FrameTitle");
          }
          /**
           * @return {LH.Audit.Meta}
           */
          static get meta() {
            return {
              id: "frame-title",
              title: str_37(UIStrings56.title),
              failureTitle: str_37(UIStrings56.failureTitle),
              description: str_37(UIStrings56.description),
              requiredArtifacts: ["Accessibility"]
            };
          }
        };
        frame_title_default = FrameTitle;
      }
    });
    heading_order_exports = {};
    __export2(heading_order_exports, {
      UIStrings: () => UIStrings57,
      default: () => heading_order_default
    });
    init_heading_order = __esm2({
      "core/audits/accessibility/heading-order.js"() {
        "use strict";
        init_process_global();
        init_axe_audit();
        init_i18n();
        UIStrings57 = {
          /** Title of an accessibility audit that checks if heading elements (<h1>, <h2>, etc) appear in numeric order and only ever increase in steps of 1. This title is descriptive of the successful state and is shown to users when no user action is required. */
          title: "Heading elements appear in a sequentially-descending order",
          /** Title of an accessibility audit that checks if heading elements (<h1>, <h2>, etc) appear in numeric order and only ever increase in steps of 1. This title is descriptive of the failing state and is shown to users when there is a failure that needs to be addressed. */
          failureTitle: "Heading elements are not in a sequentially-descending order",
          /** Description of a Lighthouse audit that tells the user *why* they should try to pass. This is displayed after a user expands the section to see more. No character length limits. The last sentence starting with 'Learn' becomes link text to additional documentation. */
          description: "Properly ordered headings that do not skip levels convey the semantic structure of the page, making it easier to navigate and understand when using assistive technologies. [Learn more about heading order](https://dequeuniversity.com/rules/axe/4.11/heading-order)."
        };
        str_38 = createIcuMessageFn({ url: "core/audits/accessibility/heading-order.js" }.url, UIStrings57);
        HeadingOrder = class extends axe_audit_default {
          static {
            __name(this, "HeadingOrder");
          }
          /**
           * @return {LH.Audit.Meta}
           */
          static get meta() {
            return {
              id: "heading-order",
              title: str_38(UIStrings57.title),
              failureTitle: str_38(UIStrings57.failureTitle),
              description: str_38(UIStrings57.description),
              requiredArtifacts: ["Accessibility"]
            };
          }
        };
        heading_order_default = HeadingOrder;
      }
    });
    html_has_lang_exports = {};
    __export2(html_has_lang_exports, {
      UIStrings: () => UIStrings58,
      default: () => html_has_lang_default
    });
    init_html_has_lang = __esm2({
      "core/audits/accessibility/html-has-lang.js"() {
        "use strict";
        init_process_global();
        init_axe_audit();
        init_i18n();
        UIStrings58 = {
          /** Title of an accessibility audit that evaluates if the root HTML tag has a lang attribute identifying the page's language. This title is descriptive of the successful state and is shown to users when no user action is required. */
          title: "`<html>` element has a `[lang]` attribute",
          /** Title of an accessibility audit that evaluates if the root HTML tag has a lang attribute identifying the page's language. This title is descriptive of the failing state and is shown to users when there is a failure that needs to be addressed. */
          failureTitle: "`<html>` element does not have a `[lang]` attribute",
          /** Description of a Lighthouse audit that tells the user *why* they should try to pass. This is displayed after a user expands the section to see more. No character length limits. The last sentence starting with 'Learn' becomes link text to additional documentation. */
          description: "If a page doesn't specify a `lang` attribute, a screen reader assumes that the page is in the default language that the user chose when setting up the screen reader. If the page isn't actually in the default language, then the screen reader might not announce the page's text correctly. [Learn more about the `lang` attribute](https://dequeuniversity.com/rules/axe/4.11/html-has-lang)."
        };
        str_39 = createIcuMessageFn({ url: "core/audits/accessibility/html-has-lang.js" }.url, UIStrings58);
        HTMLHasLang = class extends axe_audit_default {
          static {
            __name(this, "HTMLHasLang");
          }
          /**
           * @return {LH.Audit.Meta}
           */
          static get meta() {
            return {
              id: "html-has-lang",
              title: str_39(UIStrings58.title),
              failureTitle: str_39(UIStrings58.failureTitle),
              description: str_39(UIStrings58.description),
              requiredArtifacts: ["Accessibility"]
            };
          }
        };
        html_has_lang_default = HTMLHasLang;
      }
    });
    html_lang_valid_exports = {};
    __export2(html_lang_valid_exports, {
      UIStrings: () => UIStrings59,
      default: () => html_lang_valid_default
    });
    init_html_lang_valid = __esm2({
      "core/audits/accessibility/html-lang-valid.js"() {
        "use strict";
        init_process_global();
        init_axe_audit();
        init_i18n();
        UIStrings59 = {
          /** Title of an accessibility audit that evaluates if the value for root HTML tag's lang attribute is a valid BCP 47 language. This title is descriptive of the successful state and is shown to users when no user action is required. */
          title: "`<html>` element has a valid value for its `[lang]` attribute",
          /** Title of an accessibility audit that evaluates if the value for root HTML tag's lang attribute is a valid BCP 47 language. This title is descriptive of the failing state and is shown to users when there is a failure that needs to be addressed. */
          failureTitle: "`<html>` element does not have a valid value for its `[lang]` attribute.",
          /** Description of a Lighthouse audit that tells the user *why* they should try to pass. This is displayed after a user expands the section to see more. No character length limits. The last sentence starting with 'Learn' becomes link text to additional documentation. */
          description: "Specifying a valid [BCP 47 language](https://www.w3.org/International/questions/qa-choosing-language-tags#question) helps screen readers announce text properly. [Learn how to use the `lang` attribute](https://dequeuniversity.com/rules/axe/4.11/html-lang-valid)."
        };
        str_40 = createIcuMessageFn({ url: "core/audits/accessibility/html-lang-valid.js" }.url, UIStrings59);
        HTMLLangValid = class extends axe_audit_default {
          static {
            __name(this, "HTMLLangValid");
          }
          /**
           * @return {LH.Audit.Meta}
           */
          static get meta() {
            return {
              id: "html-lang-valid",
              title: str_40(UIStrings59.title),
              failureTitle: str_40(UIStrings59.failureTitle),
              description: str_40(UIStrings59.description),
              requiredArtifacts: ["Accessibility"]
            };
          }
        };
        html_lang_valid_default = HTMLLangValid;
      }
    });
    html_xml_lang_mismatch_exports = {};
    __export2(html_xml_lang_mismatch_exports, {
      UIStrings: () => UIStrings60,
      default: () => html_xml_lang_mismatch_default
    });
    init_html_xml_lang_mismatch = __esm2({
      "core/audits/accessibility/html-xml-lang-mismatch.js"() {
        "use strict";
        init_process_global();
        init_axe_audit();
        init_i18n();
        UIStrings60 = {
          /** Title of an accessibility audit that evaluates if the xml:lang attribute, if present, has the same base language as the `lang` attribute. This title is descriptive of the successful state and is shown to users when no user action is required. */
          title: "`<html>` element has an `[xml:lang]` attribute with the same base language as the `[lang]` attribute.",
          /** Title of an accessibility audit that evaluates if the xml:lang attribute, if present, has the same base language as the `lang` attribute. This title is descriptive of the failing state and is shown to users when there is a failure that needs to be addressed. */
          failureTitle: "`<html>` element does not have an `[xml:lang]` attribute with the same base language as the `[lang]` attribute.",
          /** Description of a Lighthouse audit that tells the user *why* they should try to pass. This is displayed after a user expands the section to see more. No character length limits. The last sentence starting with 'Learn' becomes link text to additional documentation. */
          description: "If the webpage does not specify a consistent language, then the screen reader might not announce the page's text correctly. [Learn more about the `lang` attribute](https://dequeuniversity.com/rules/axe/4.11/html-xml-lang-mismatch)."
        };
        str_41 = createIcuMessageFn({ url: "core/audits/accessibility/html-xml-lang-mismatch.js" }.url, UIStrings60);
        HTMLXMLLangMismatch = class extends axe_audit_default {
          static {
            __name(this, "HTMLXMLLangMismatch");
          }
          /**
           * @return {LH.Audit.Meta}
           */
          static get meta() {
            return {
              id: "html-xml-lang-mismatch",
              title: str_41(UIStrings60.title),
              failureTitle: str_41(UIStrings60.failureTitle),
              description: str_41(UIStrings60.description),
              requiredArtifacts: ["Accessibility"]
            };
          }
        };
        html_xml_lang_mismatch_default = HTMLXMLLangMismatch;
      }
    });
    identical_links_same_purpose_exports = {};
    __export2(identical_links_same_purpose_exports, {
      UIStrings: () => UIStrings61,
      default: () => identical_links_same_purpose_default
    });
    init_identical_links_same_purpose = __esm2({
      "core/audits/accessibility/identical-links-same-purpose.js"() {
        "use strict";
        init_process_global();
        init_axe_audit();
        init_i18n();
        UIStrings61 = {
          /** Title of an accessibility audit that checks if identical links have the same purpose. This title is descriptive of the successful state and is shown to users when no user action is required. */
          title: "Identical links have the same purpose.",
          /** Title of an accessibility audit that checks if identical links have the same purpose. This title is descriptive of the failing state and is shown to users when there is a failure that needs to be addressed. */
          failureTitle: "Identical links do not have the same purpose.",
          /** Description of a Lighthouse audit that tells the user *why* they should try to pass. This is displayed after a user expands the section to see more. No character length limits. The last sentence starting with 'Learn' becomes link text to additional documentation. */
          description: "Links with the same destination should have the same description, to help users understand the link's purpose and decide whether to follow it. [Learn more about identical links](https://dequeuniversity.com/rules/axe/4.11/identical-links-same-purpose)."
        };
        str_42 = createIcuMessageFn({ url: "core/audits/accessibility/identical-links-same-purpose.js" }.url, UIStrings61);
        IdenticalLinksSamePurpose = class extends axe_audit_default {
          static {
            __name(this, "IdenticalLinksSamePurpose");
          }
          /**
           * @return {LH.Audit.Meta}
           */
          static get meta() {
            return {
              id: "identical-links-same-purpose",
              title: str_42(UIStrings61.title),
              failureTitle: str_42(UIStrings61.failureTitle),
              description: str_42(UIStrings61.description),
              scoreDisplayMode: axe_audit_default.SCORING_MODES.INFORMATIVE,
              requiredArtifacts: ["Accessibility"]
            };
          }
        };
        identical_links_same_purpose_default = IdenticalLinksSamePurpose;
      }
    });
    image_alt_exports = {};
    __export2(image_alt_exports, {
      UIStrings: () => UIStrings62,
      default: () => image_alt_default
    });
    init_image_alt = __esm2({
      "core/audits/accessibility/image-alt.js"() {
        "use strict";
        init_process_global();
        init_axe_audit();
        init_i18n();
        UIStrings62 = {
          /** Title of an accessibility audit that evaluates if all image elements have the alt HTML attribute to describe their contents. This title is descriptive of the successful state and is shown to users when no user action is required. */
          title: "Image elements have `[alt]` attributes",
          /** Title of an accessibility audit that evaluates if all image elements have the alt HTML attribute to describe their contents. This title is descriptive of the failing state and is shown to users when there is a failure that needs to be addressed. */
          failureTitle: "Image elements do not have `[alt]` attributes",
          /** Description of a Lighthouse audit that tells the user *why* they should try to pass. This is displayed after a user expands the section to see more. No character length limits. The last sentence starting with 'Learn' becomes link text to additional documentation. */
          description: "Informative elements should aim for short, descriptive alternate text. Decorative elements can be ignored with an empty alt attribute. [Learn more about the `alt` attribute](https://dequeuniversity.com/rules/axe/4.11/image-alt)."
        };
        str_43 = createIcuMessageFn({ url: "core/audits/accessibility/image-alt.js" }.url, UIStrings62);
        ImageAlt = class extends axe_audit_default {
          static {
            __name(this, "ImageAlt");
          }
          /**
           * @return {LH.Audit.Meta}
           */
          static get meta() {
            return {
              id: "image-alt",
              title: str_43(UIStrings62.title),
              failureTitle: str_43(UIStrings62.failureTitle),
              description: str_43(UIStrings62.description),
              requiredArtifacts: ["Accessibility"]
            };
          }
        };
        image_alt_default = ImageAlt;
      }
    });
    image_redundant_alt_exports = {};
    __export2(image_redundant_alt_exports, {
      UIStrings: () => UIStrings63,
      default: () => image_redundant_alt_default
    });
    init_image_redundant_alt = __esm2({
      "core/audits/accessibility/image-redundant-alt.js"() {
        "use strict";
        init_process_global();
        init_axe_audit();
        init_i18n();
        UIStrings63 = {
          /** Title of an accessibility audit that evaluates if all image elements have the alt HTML attribute that is not redundant. This title is descriptive of the successful state and is shown to users when no user action is required. */
          title: "Image elements do not have `[alt]` attributes that are redundant text.",
          /** Title of an accessibility audit that evaluates if all image elements have the alt HTML attribute that is not redundant. This title is descriptive of the failing state and is shown to users when there is a failure that needs to be addressed. */
          failureTitle: "Image elements have `[alt]` attributes that are redundant text.",
          /** Description of a Lighthouse audit that tells the user *why* they should try to pass. This is displayed after a user expands the section to see more. No character length limits. The last sentence starting with 'Learn' becomes link text to additional documentation. */
          description: "Informative elements should aim for short, descriptive alternative text. Alternative text that is exactly the same as the text adjacent to the link or image is potentially confusing for screen reader users, because the text will be read twice. [Learn more about the `alt` attribute](https://dequeuniversity.com/rules/axe/4.11/image-redundant-alt)."
        };
        str_44 = createIcuMessageFn({ url: "core/audits/accessibility/image-redundant-alt.js" }.url, UIStrings63);
        ImageRedundantAlt = class extends axe_audit_default {
          static {
            __name(this, "ImageRedundantAlt");
          }
          /**
           * @return {LH.Audit.Meta}
           */
          static get meta() {
            return {
              id: "image-redundant-alt",
              title: str_44(UIStrings63.title),
              failureTitle: str_44(UIStrings63.failureTitle),
              description: str_44(UIStrings63.description),
              scoreDisplayMode: axe_audit_default.SCORING_MODES.INFORMATIVE,
              requiredArtifacts: ["Accessibility"]
            };
          }
        };
        image_redundant_alt_default = ImageRedundantAlt;
      }
    });
    input_button_name_exports = {};
    __export2(input_button_name_exports, {
      UIStrings: () => UIStrings64,
      default: () => input_button_name_default
    });
    init_input_button_name = __esm2({
      "core/audits/accessibility/input-button-name.js"() {
        "use strict";
        init_process_global();
        init_axe_audit();
        init_i18n();
        UIStrings64 = {
          /** Title of an accessibility audit that evaluates if all input buttons have discernible text. This title is descriptive of the successful state and is shown to users when no user action is required. */
          title: "Input buttons have discernible text.",
          /** Title of an accessibility audit that evaluates if all input buttons have discernible text. This title is descriptive of the failing state and is shown to users when there is a failure that needs to be addressed. */
          failureTitle: "Input buttons do not have discernible text.",
          /** Description of a Lighthouse audit that tells the user *why* they should try to pass. This is displayed after a user expands the section to see more. No character length limits. The last sentence starting with 'Learn' becomes link text to additional documentation. */
          description: "Adding discernable and accessible text to input buttons may help screen reader users understand the purpose of the input button. [Learn more about input buttons](https://dequeuniversity.com/rules/axe/4.11/input-button-name)."
        };
        str_45 = createIcuMessageFn({ url: "core/audits/accessibility/input-button-name.js" }.url, UIStrings64);
        InputButtonName = class extends axe_audit_default {
          static {
            __name(this, "InputButtonName");
          }
          /**
           * @return {LH.Audit.Meta}
           */
          static get meta() {
            return {
              id: "input-button-name",
              title: str_45(UIStrings64.title),
              failureTitle: str_45(UIStrings64.failureTitle),
              description: str_45(UIStrings64.description),
              requiredArtifacts: ["Accessibility"]
            };
          }
        };
        input_button_name_default = InputButtonName;
      }
    });
    input_image_alt_exports = {};
    __export2(input_image_alt_exports, {
      UIStrings: () => UIStrings65,
      default: () => input_image_alt_default
    });
    init_input_image_alt = __esm2({
      "core/audits/accessibility/input-image-alt.js"() {
        "use strict";
        init_process_global();
        init_axe_audit();
        init_i18n();
        UIStrings65 = {
          /** Title of an accessibility audit that evaluates if all input elements of type image have an alt HTML attribute to describe their contents. This title is descriptive of the successful state and is shown to users when no user action is required. */
          title: '`<input type="image">` elements have `[alt]` text',
          /** Title of an accessibility audit that evaluates if all input elements of type image have an alt HTML attribute to describe their contents. This title is descriptive of the failing state and is shown to users when there is a failure that needs to be addressed. */
          failureTitle: '`<input type="image">` elements do not have `[alt]` text',
          /** Description of a Lighthouse audit that tells the user *why* they should try to pass. This is displayed after a user expands the section to see more. No character length limits. The last sentence starting with 'Learn' becomes link text to additional documentation. */
          description: "When an image is being used as an `<input>` button, providing alternative text can help screen reader users understand the purpose of the button. [Learn about input image alt text](https://dequeuniversity.com/rules/axe/4.11/input-image-alt)."
        };
        str_46 = createIcuMessageFn({ url: "core/audits/accessibility/input-image-alt.js" }.url, UIStrings65);
        InputImageAlt = class extends axe_audit_default {
          static {
            __name(this, "InputImageAlt");
          }
          /**
           * @return {LH.Audit.Meta}
           */
          static get meta() {
            return {
              id: "input-image-alt",
              title: str_46(UIStrings65.title),
              failureTitle: str_46(UIStrings65.failureTitle),
              description: str_46(UIStrings65.description),
              requiredArtifacts: ["Accessibility"]
            };
          }
        };
        input_image_alt_default = InputImageAlt;
      }
    });
    label_content_name_mismatch_exports = {};
    __export2(label_content_name_mismatch_exports, {
      UIStrings: () => UIStrings66,
      default: () => label_content_name_mismatch_default
    });
    init_label_content_name_mismatch = __esm2({
      "core/audits/accessibility/label-content-name-mismatch.js"() {
        "use strict";
        init_process_global();
        init_axe_audit();
        init_i18n();
        UIStrings66 = {
          /** Title of an accessibility audit that evaluates if elements labeled through their content have their visible text as part of their accessible name. This title is descriptive of the successful state and is shown to users when no user action is required. */
          title: "Elements with visible text labels have matching accessible names.",
          /** Title of an accessibility audit that evaluates if elements labeled through their content have their visible text as part of their accessible name. This title is descriptive of the failing state and is shown to users when there is a failure that needs to be addressed. */
          failureTitle: "Elements with visible text labels do not have matching accessible names.",
          /** Description of a Lighthouse audit that tells the user *why* they should try to pass. This is displayed after a user expands the section to see more. No character length limits. The last sentence starting with 'Learn' becomes link text to additional documentation. */
          description: "Visible text labels that do not match the accessible name can result in a confusing experience for screen reader users. [Learn more about accessible names](https://dequeuniversity.com/rules/axe/4.11/label-content-name-mismatch)."
        };
        str_47 = createIcuMessageFn({ url: "core/audits/accessibility/label-content-name-mismatch.js" }.url, UIStrings66);
        LabelContentNameMismatch = class extends axe_audit_default {
          static {
            __name(this, "LabelContentNameMismatch");
          }
          /**
           * @return {LH.Audit.Meta}
           */
          static get meta() {
            return {
              id: "label-content-name-mismatch",
              title: str_47(UIStrings66.title),
              failureTitle: str_47(UIStrings66.failureTitle),
              description: str_47(UIStrings66.description),
              requiredArtifacts: ["Accessibility"]
            };
          }
        };
        label_content_name_mismatch_default = LabelContentNameMismatch;
      }
    });
    label_exports = {};
    __export2(label_exports, {
      UIStrings: () => UIStrings67,
      default: () => label_default
    });
    init_label = __esm2({
      "core/audits/accessibility/label.js"() {
        "use strict";
        init_process_global();
        init_axe_audit();
        init_i18n();
        UIStrings67 = {
          /** Title of an accessibility audit that evaluates if all form elements have corresponding label elements. This title is descriptive of the successful state and is shown to users when no user action is required. */
          title: "Form elements have associated labels",
          /** Title of an accessibility audit that evaluates if all form elements have corresponding label elements. This title is descriptive of the failing state and is shown to users when there is a failure that needs to be addressed. */
          failureTitle: "Form elements do not have associated labels",
          /** Description of a Lighthouse audit that tells the user *why* they should try to pass. This is displayed after a user expands the section to see more. No character length limits. The last sentence starting with 'Learn' becomes link text to additional documentation. */
          description: "Labels ensure that form controls are announced properly by assistive technologies, like screen readers. [Learn more about form element labels](https://dequeuniversity.com/rules/axe/4.11/label)."
        };
        str_48 = createIcuMessageFn({ url: "core/audits/accessibility/label.js" }.url, UIStrings67);
        Label = class extends axe_audit_default {
          static {
            __name(this, "Label");
          }
          /**
           * @return {LH.Audit.Meta}
           */
          static get meta() {
            return {
              id: "label",
              title: str_48(UIStrings67.title),
              failureTitle: str_48(UIStrings67.failureTitle),
              description: str_48(UIStrings67.description),
              requiredArtifacts: ["Accessibility"]
            };
          }
        };
        label_default = Label;
      }
    });
    landmark_one_main_exports = {};
    __export2(landmark_one_main_exports, {
      UIStrings: () => UIStrings68,
      default: () => landmark_one_main_default
    });
    init_landmark_one_main = __esm2({
      "core/audits/accessibility/landmark-one-main.js"() {
        "use strict";
        init_process_global();
        init_axe_audit();
        init_i18n();
        UIStrings68 = {
          /** Title of an accessibility audit that checks if the document has a main landmark. This title is descriptive of the successful state and is shown to users when no user action is required. */
          title: "Document has a main landmark.",
          /** Title of an accessibility audit that checks if the document has a main landmark. This title is descriptive of the failing state and is shown to users when there is a failure that needs to be addressed. */
          failureTitle: "Document does not have a main landmark.",
          /** Description of a Lighthouse audit that tells the user *why* they should try to pass. This is displayed after a user expands the section to see more. No character length limits. The last sentence starting with 'Learn' becomes link text to additional documentation. */
          description: "One main landmark helps screen reader users navigate a web page. [Learn more about landmarks](https://dequeuniversity.com/rules/axe/4.11/landmark-one-main)."
        };
        str_49 = createIcuMessageFn({ url: "core/audits/accessibility/landmark-one-main.js" }.url, UIStrings68);
        LandmarkOneMain = class extends axe_audit_default {
          static {
            __name(this, "LandmarkOneMain");
          }
          /**
           * @return {LH.Audit.Meta}
           */
          static get meta() {
            return {
              id: "landmark-one-main",
              title: str_49(UIStrings68.title),
              failureTitle: str_49(UIStrings68.failureTitle),
              description: str_49(UIStrings68.description),
              requiredArtifacts: ["Accessibility"]
            };
          }
        };
        landmark_one_main_default = LandmarkOneMain;
      }
    });
    link_in_text_block_exports = {};
    __export2(link_in_text_block_exports, {
      UIStrings: () => UIStrings69,
      default: () => link_in_text_block_default
    });
    init_link_in_text_block = __esm2({
      "core/audits/accessibility/link-in-text-block.js"() {
        "use strict";
        init_process_global();
        init_axe_audit();
        init_i18n();
        UIStrings69 = {
          /** Title of an accessibility audit that evaluates if all link elements can be distinguished without relying on color. This title is descriptive of the successful state and is shown to users when no user action is required. */
          title: "Links are distinguishable without relying on color.",
          /** Title of an accessibility audit that evaluates if all link elements can be distinguished without relying on color. This title is descriptive of the failing state and is shown to users when there is a failure that needs to be addressed. */
          failureTitle: "Links rely on color to be distinguishable.",
          /** Description of a Lighthouse audit that tells the user *why* they should try to pass. This is displayed after a user expands the section to see more. No character length limits. The last sentence starting with 'Learn' becomes link text to additional documentation. */
          description: "Low-contrast text is difficult or impossible for many users to read. Link text that is discernible improves the experience for users with low vision. [Learn how to make links distinguishable](https://dequeuniversity.com/rules/axe/4.11/link-in-text-block)."
        };
        str_50 = createIcuMessageFn({ url: "core/audits/accessibility/link-in-text-block.js" }.url, UIStrings69);
        LinkInTextBlock = class extends axe_audit_default {
          static {
            __name(this, "LinkInTextBlock");
          }
          /**
           * @return {LH.Audit.Meta}
           */
          static get meta() {
            return {
              id: "link-in-text-block",
              title: str_50(UIStrings69.title),
              failureTitle: str_50(UIStrings69.failureTitle),
              description: str_50(UIStrings69.description),
              requiredArtifacts: ["Accessibility"]
            };
          }
        };
        link_in_text_block_default = LinkInTextBlock;
      }
    });
    link_name_exports = {};
    __export2(link_name_exports, {
      UIStrings: () => UIStrings70,
      default: () => link_name_default
    });
    init_link_name = __esm2({
      "core/audits/accessibility/link-name.js"() {
        "use strict";
        init_process_global();
        init_axe_audit();
        init_i18n();
        UIStrings70 = {
          /** Title of an accessibility audit that evaluates if all link elements have a non-generic name to screen readers. This title is descriptive of the successful state and is shown to users when no user action is required. */
          title: "Links have a discernible name",
          /** Title of an accessibility audit that evaluates if all link elements have a non-generic name to screen readers. This title is descriptive of the failing state and is shown to users when there is a failure that needs to be addressed. */
          failureTitle: "Links do not have a discernible name",
          /** Description of a Lighthouse audit that tells the user *why* they should try to pass. This is displayed after a user expands the section to see more. No character length limits. The last sentence starting with 'Learn' becomes link text to additional documentation. */
          description: "Link text (and alternate text for images, when used as links) that is discernible, unique, and focusable improves the navigation experience for screen reader users. [Learn how to make links accessible](https://dequeuniversity.com/rules/axe/4.11/link-name)."
        };
        str_51 = createIcuMessageFn({ url: "core/audits/accessibility/link-name.js" }.url, UIStrings70);
        LinkName = class extends axe_audit_default {
          static {
            __name(this, "LinkName");
          }
          /**
           * @return {LH.Audit.Meta}
           */
          static get meta() {
            return {
              id: "link-name",
              title: str_51(UIStrings70.title),
              failureTitle: str_51(UIStrings70.failureTitle),
              description: str_51(UIStrings70.description),
              requiredArtifacts: ["Accessibility"]
            };
          }
        };
        link_name_default = LinkName;
      }
    });
    list_exports = {};
    __export2(list_exports, {
      UIStrings: () => UIStrings71,
      default: () => list_default
    });
    init_list = __esm2({
      "core/audits/accessibility/list.js"() {
        "use strict";
        init_process_global();
        init_axe_audit();
        init_i18n();
        UIStrings71 = {
          /** Title of an accessibility audit that evaluates if all list elements have a valid structure containing only list items. This title is descriptive of the successful state and is shown to users when no user action is required. */
          title: "Lists contain only `<li>` elements and script supporting elements (`<script>` and `<template>`).",
          /** Title of an accessibility audit that evaluates if all list elements have a valid structure containing only list items. This title is descriptive of the failing state and is shown to users when there is a failure that needs to be addressed. */
          failureTitle: "Lists do not contain only `<li>` elements and script supporting elements (`<script>` and `<template>`).",
          /** Description of a Lighthouse audit that tells the user *why* they should try to pass. This is displayed after a user expands the section to see more. No character length limits. The last sentence starting with 'Learn' becomes link text to additional documentation. */
          description: "Screen readers have a specific way of announcing lists. Ensuring proper list structure aids screen reader output. [Learn more about proper list structure](https://dequeuniversity.com/rules/axe/4.11/list)."
        };
        str_52 = createIcuMessageFn({ url: "core/audits/accessibility/list.js" }.url, UIStrings71);
        List = class extends axe_audit_default {
          static {
            __name(this, "List");
          }
          /**
           * @return {LH.Audit.Meta}
           */
          static get meta() {
            return {
              id: "list",
              title: str_52(UIStrings71.title),
              failureTitle: str_52(UIStrings71.failureTitle),
              description: str_52(UIStrings71.description),
              requiredArtifacts: ["Accessibility"]
            };
          }
        };
        list_default = List;
      }
    });
    listitem_exports = {};
    __export2(listitem_exports, {
      UIStrings: () => UIStrings72,
      default: () => listitem_default
    });
    init_listitem = __esm2({
      "core/audits/accessibility/listitem.js"() {
        "use strict";
        init_process_global();
        init_axe_audit();
        init_i18n();
        UIStrings72 = {
          /** Title of an accessibility audit that evaluates if any list item elements do not have list parent elements. This title is descriptive of the successful state and is shown to users when no user action is required. */
          title: "List items (`<li>`) are contained within `<ul>`, `<ol>` or `<menu>` parent elements",
          /** Title of an accessibility audit that evaluates if any list item elements do not have list parent elements. This title is descriptive of the failing state and is shown to users when there is a failure that needs to be addressed. */
          failureTitle: "List items (`<li>`) are not contained within `<ul>`, `<ol>` or `<menu>` parent elements.",
          /** Description of a Lighthouse audit that tells the user *why* they should try to pass. This is displayed after a user expands the section to see more. No character length limits. The last sentence starting with 'Learn' becomes link text to additional documentation. */
          description: "Screen readers require list items (`<li>`) to be contained within a parent `<ul>`, `<ol>` or `<menu>` to be announced properly. [Learn more about proper list structure](https://dequeuniversity.com/rules/axe/4.11/listitem)."
        };
        str_53 = createIcuMessageFn({ url: "core/audits/accessibility/listitem.js" }.url, UIStrings72);
        ListItem = class extends axe_audit_default {
          static {
            __name(this, "ListItem");
          }
          /**
           * @return {LH.Audit.Meta}
           */
          static get meta() {
            return {
              id: "listitem",
              title: str_53(UIStrings72.title),
              failureTitle: str_53(UIStrings72.failureTitle),
              description: str_53(UIStrings72.description),
              requiredArtifacts: ["Accessibility"]
            };
          }
        };
        listitem_default = ListItem;
      }
    });
    init_manual_audit = __esm2({
      "core/audits/manual/manual-audit.js"() {
        "use strict";
        init_process_global();
        init_audit();
        ManualAudit = class extends Audit {
          static {
            __name(this, "ManualAudit");
          }
          /**
           * @return {Pick<LH.Audit.Meta, 'scoreDisplayMode'|'requiredArtifacts'>}
           */
          static get partialMeta() {
            return {
              scoreDisplayMode: Audit.SCORING_MODES.MANUAL,
              requiredArtifacts: []
            };
          }
          /**
           * @return {LH.Audit.Product}
           */
          static audit() {
            return {
              score: 0
              // displayValue: '(needs manual verification)'
            };
          }
        };
        manual_audit_default = ManualAudit;
      }
    });
    custom_controls_labels_exports = {};
    __export2(custom_controls_labels_exports, {
      default: () => custom_controls_labels_default
    });
    init_custom_controls_labels = __esm2({
      "core/audits/accessibility/manual/custom-controls-labels.js"() {
        "use strict";
        init_process_global();
        init_manual_audit();
        CustomControlsLabels = class extends manual_audit_default {
          static {
            __name(this, "CustomControlsLabels");
          }
          /**
           * @return {LH.Audit.Meta}
           */
          static get meta() {
            return Object.assign({
              id: "custom-controls-labels",
              description: "Custom interactive controls have associated labels, provided by aria-label or aria-labelledby. [Learn more about custom controls and labels](https://developer.chrome.com/docs/lighthouse/accessibility/custom-controls-labels/).",
              title: "Custom controls have associated labels"
            }, super.partialMeta);
          }
        };
        custom_controls_labels_default = CustomControlsLabels;
      }
    });
    custom_controls_roles_exports = {};
    __export2(custom_controls_roles_exports, {
      default: () => custom_controls_roles_default
    });
    init_custom_controls_roles = __esm2({
      "core/audits/accessibility/manual/custom-controls-roles.js"() {
        "use strict";
        init_process_global();
        init_manual_audit();
        CustomControlsRoles = class extends manual_audit_default {
          static {
            __name(this, "CustomControlsRoles");
          }
          /**
           * @return {LH.Audit.Meta}
           */
          static get meta() {
            return Object.assign({
              id: "custom-controls-roles",
              description: "Custom interactive controls have appropriate ARIA roles. [Learn how to add roles to custom controls](https://developer.chrome.com/docs/lighthouse/accessibility/custom-control-roles/).",
              title: "Custom controls have ARIA roles"
            }, super.partialMeta);
          }
        };
        custom_controls_roles_default = CustomControlsRoles;
      }
    });
    focus_traps_exports = {};
    __export2(focus_traps_exports, {
      default: () => focus_traps_default
    });
    init_focus_traps = __esm2({
      "core/audits/accessibility/manual/focus-traps.js"() {
        "use strict";
        init_process_global();
        init_manual_audit();
        FocusTraps = class extends manual_audit_default {
          static {
            __name(this, "FocusTraps");
          }
          /**
           * @return {LH.Audit.Meta}
           */
          static get meta() {
            return Object.assign({
              id: "focus-traps",
              description: "A user can tab into and out of any control or region without accidentally trapping their focus. [Learn how to avoid focus traps](https://developer.chrome.com/docs/lighthouse/accessibility/focus-traps/).",
              title: "User focus is not accidentally trapped in a region"
            }, super.partialMeta);
          }
        };
        focus_traps_default = FocusTraps;
      }
    });
    focusable_controls_exports = {};
    __export2(focusable_controls_exports, {
      default: () => focusable_controls_default
    });
    init_focusable_controls = __esm2({
      "core/audits/accessibility/manual/focusable-controls.js"() {
        "use strict";
        init_process_global();
        init_manual_audit();
        FocusableControls = class extends manual_audit_default {
          static {
            __name(this, "FocusableControls");
          }
          /**
           * @return {LH.Audit.Meta}
           */
          static get meta() {
            return Object.assign({
              id: "focusable-controls",
              description: "Custom interactive controls are keyboard focusable and display a focus indicator. [Learn how to make custom controls focusable](https://developer.chrome.com/docs/lighthouse/accessibility/focusable-controls/).",
              title: "Interactive controls are keyboard focusable"
            }, super.partialMeta);
          }
        };
        focusable_controls_default = FocusableControls;
      }
    });
    interactive_element_affordance_exports = {};
    __export2(interactive_element_affordance_exports, {
      default: () => interactive_element_affordance_default
    });
    init_interactive_element_affordance = __esm2({
      "core/audits/accessibility/manual/interactive-element-affordance.js"() {
        "use strict";
        init_process_global();
        init_manual_audit();
        InteractiveElementAffordance = class extends manual_audit_default {
          static {
            __name(this, "InteractiveElementAffordance");
          }
          /**
           * @return {LH.Audit.Meta}
           */
          static get meta() {
            return Object.assign({
              id: "interactive-element-affordance",
              description: "Interactive elements, such as links and buttons, should indicate their state and be distinguishable from non-interactive elements. [Learn how to decorate interactive elements with affordance hints](https://developer.chrome.com/docs/lighthouse/accessibility/interactive-element-affordance/).",
              title: "Interactive elements indicate their purpose and state"
            }, super.partialMeta);
          }
        };
        interactive_element_affordance_default = InteractiveElementAffordance;
      }
    });
    logical_tab_order_exports = {};
    __export2(logical_tab_order_exports, {
      default: () => logical_tab_order_default
    });
    init_logical_tab_order = __esm2({
      "core/audits/accessibility/manual/logical-tab-order.js"() {
        "use strict";
        init_process_global();
        init_manual_audit();
        LogicalTabOrder = class extends manual_audit_default {
          static {
            __name(this, "LogicalTabOrder");
          }
          /**
           * @return {LH.Audit.Meta}
           */
          static get meta() {
            return Object.assign({
              id: "logical-tab-order",
              description: "Tabbing through the page follows the visual layout. Users cannot focus elements that are offscreen. [Learn more about logical tab ordering](https://developer.chrome.com/docs/lighthouse/accessibility/logical-tab-order/).",
              title: "The page has a logical tab order"
            }, super.partialMeta);
          }
        };
        logical_tab_order_default = LogicalTabOrder;
      }
    });
    managed_focus_exports = {};
    __export2(managed_focus_exports, {
      default: () => managed_focus_default
    });
    init_managed_focus = __esm2({
      "core/audits/accessibility/manual/managed-focus.js"() {
        "use strict";
        init_process_global();
        init_manual_audit();
        ManagedFocus = class extends manual_audit_default {
          static {
            __name(this, "ManagedFocus");
          }
          /**
           * @return {LH.Audit.Meta}
           */
          static get meta() {
            return Object.assign({
              id: "managed-focus",
              description: "If new content, such as a dialog, is added to the page, the user's focus is directed to it. [Learn how to direct focus to new content](https://developer.chrome.com/docs/lighthouse/accessibility/managed-focus/).",
              title: "The user's focus is directed to new content added to the page"
            }, super.partialMeta);
          }
        };
        managed_focus_default = ManagedFocus;
      }
    });
    offscreen_content_hidden_exports = {};
    __export2(offscreen_content_hidden_exports, {
      default: () => offscreen_content_hidden_default
    });
    init_offscreen_content_hidden = __esm2({
      "core/audits/accessibility/manual/offscreen-content-hidden.js"() {
        "use strict";
        init_process_global();
        init_manual_audit();
        OffscreenContentHidden = class extends manual_audit_default {
          static {
            __name(this, "OffscreenContentHidden");
          }
          /**
           * @return {LH.Audit.Meta}
           */
          static get meta() {
            return Object.assign({
              id: "offscreen-content-hidden",
              description: "Offscreen content is hidden with display: none or aria-hidden=true. [Learn how to properly hide offscreen content](https://developer.chrome.com/docs/lighthouse/accessibility/offscreen-content-hidden/).",
              title: "Offscreen content is hidden from assistive technology"
            }, super.partialMeta);
          }
        };
        offscreen_content_hidden_default = OffscreenContentHidden;
      }
    });
    use_landmarks_exports = {};
    __export2(use_landmarks_exports, {
      default: () => use_landmarks_default
    });
    init_use_landmarks = __esm2({
      "core/audits/accessibility/manual/use-landmarks.js"() {
        "use strict";
        init_process_global();
        init_manual_audit();
        UseLandmarks = class extends manual_audit_default {
          static {
            __name(this, "UseLandmarks");
          }
          /**
           * @return {LH.Audit.Meta}
           */
          static get meta() {
            return Object.assign({
              id: "use-landmarks",
              description: "Landmark elements (`<main>`, `<nav>`, etc.) are used to improve the keyboard navigation of the page for assistive technology. [Learn more about landmark elements](https://developer.chrome.com/docs/lighthouse/accessibility/use-landmarks/).",
              title: "HTML5 landmark elements are used to improve navigation"
            }, super.partialMeta);
          }
        };
        use_landmarks_default = UseLandmarks;
      }
    });
    visual_order_follows_dom_exports = {};
    __export2(visual_order_follows_dom_exports, {
      default: () => visual_order_follows_dom_default
    });
    init_visual_order_follows_dom = __esm2({
      "core/audits/accessibility/manual/visual-order-follows-dom.js"() {
        "use strict";
        init_process_global();
        init_manual_audit();
        VisualOrderFollowsDOM = class extends manual_audit_default {
          static {
            __name(this, "VisualOrderFollowsDOM");
          }
          /**
           * @return {LH.Audit.Meta}
           */
          static get meta() {
            return Object.assign({
              id: "visual-order-follows-dom",
              description: "DOM order matches the visual order, improving navigation for assistive technology. [Learn more about DOM and visual ordering](https://developer.chrome.com/docs/lighthouse/accessibility/visual-order-follows-dom/).",
              title: "Visual order on the page follows DOM order"
            }, super.partialMeta);
          }
        };
        visual_order_follows_dom_default = VisualOrderFollowsDOM;
      }
    });
    meta_refresh_exports = {};
    __export2(meta_refresh_exports, {
      UIStrings: () => UIStrings73,
      default: () => meta_refresh_default
    });
    init_meta_refresh = __esm2({
      "core/audits/accessibility/meta-refresh.js"() {
        "use strict";
        init_process_global();
        init_axe_audit();
        init_i18n();
        UIStrings73 = {
          /** Title of an accessibility audit that evaluates if the page uses a meta tag that refreshes the page automatically. This title is descriptive of the successful state and is shown to users when no user action is required. */
          title: 'The document does not use `<meta http-equiv="refresh">`',
          /** Title of an accessibility audit that evaluates if the page uses a meta tag that refreshes the page automatically. This title is descriptive of the failing state and is shown to users when there is a failure that needs to be addressed. */
          failureTitle: 'The document uses `<meta http-equiv="refresh">`',
          /** Description of a Lighthouse audit that tells the user *why* they should try to pass. This is displayed after a user expands the section to see more. No character length limits. The last sentence starting with 'Learn' becomes link text to additional documentation. */
          description: "Users do not expect a page to refresh automatically, and doing so will move focus back to the top of the page. This may create a frustrating or confusing experience. [Learn more about the refresh meta tag](https://dequeuniversity.com/rules/axe/4.11/meta-refresh)."
        };
        str_54 = createIcuMessageFn({ url: "core/audits/accessibility/meta-refresh.js" }.url, UIStrings73);
        MetaRefresh = class extends axe_audit_default {
          static {
            __name(this, "MetaRefresh");
          }
          /**
           * @return {LH.Audit.Meta}
           */
          static get meta() {
            return {
              id: "meta-refresh",
              title: str_54(UIStrings73.title),
              failureTitle: str_54(UIStrings73.failureTitle),
              description: str_54(UIStrings73.description),
              requiredArtifacts: ["Accessibility"]
            };
          }
        };
        meta_refresh_default = MetaRefresh;
      }
    });
    meta_viewport_exports = {};
    __export2(meta_viewport_exports, {
      UIStrings: () => UIStrings74,
      default: () => meta_viewport_default
    });
    init_meta_viewport = __esm2({
      "core/audits/accessibility/meta-viewport.js"() {
        "use strict";
        init_process_global();
        init_axe_audit();
        init_i18n();
        UIStrings74 = {
          /** Title of an accessibility audit that evaluates if the page has limited the scaling properties of the page in a way that harms users with low vision. This title is descriptive of the successful state and is shown to users when no user action is required. */
          title: '`[user-scalable="no"]` is not used in the `<meta name="viewport">` element and the `[maximum-scale]` attribute is not less than 5.',
          /** Title of an accessibility audit that evaluates if the page has limited the scaling properties of the page in a way that harms users with low vision. This title is descriptive of the failing state and is shown to users when there is a failure that needs to be addressed. */
          failureTitle: '`[user-scalable="no"]` is used in the `<meta name="viewport">` element or the `[maximum-scale]` attribute is less than 5.',
          /** Description of a Lighthouse audit that tells the user *why* they should try to pass. This is displayed after a user expands the section to see more. No character length limits. The last sentence starting with 'Learn' becomes link text to additional documentation. */
          description: "Disabling zooming is problematic for users with low vision who rely on screen magnification to properly see the contents of a web page. [Learn more about the viewport meta tag](https://dequeuniversity.com/rules/axe/4.11/meta-viewport)."
        };
        str_55 = createIcuMessageFn({ url: "core/audits/accessibility/meta-viewport.js" }.url, UIStrings74);
        MetaViewport = class extends axe_audit_default {
          static {
            __name(this, "MetaViewport");
          }
          /**
           * @return {LH.Audit.Meta}
           */
          static get meta() {
            return {
              id: "meta-viewport",
              title: str_55(UIStrings74.title),
              failureTitle: str_55(UIStrings74.failureTitle),
              description: str_55(UIStrings74.description),
              requiredArtifacts: ["Accessibility"]
            };
          }
        };
        meta_viewport_default = MetaViewport;
      }
    });
    object_alt_exports = {};
    __export2(object_alt_exports, {
      UIStrings: () => UIStrings75,
      default: () => object_alt_default
    });
    init_object_alt = __esm2({
      "core/audits/accessibility/object-alt.js"() {
        "use strict";
        init_process_global();
        init_axe_audit();
        init_i18n();
        UIStrings75 = {
          /** Title of an accessibility audit that evaluates if all object elements have an alt HTML attribute that describes their contents. This title is descriptive of the successful state and is shown to users when no user action is required. */
          title: "`<object>` elements have alternate text",
          /** Title of an accessibility audit that evaluates if all object elements have an alt HTML attribute that describes their contents. This title is descriptive of the failing state and is shown to users when there is a failure that needs to be addressed. */
          failureTitle: "`<object>` elements do not have alternate text",
          /** Description of a Lighthouse audit that tells the user *why* they should try to pass. This is displayed after a user expands the section to see more. No character length limits. The last sentence starting with 'Learn' becomes link text to additional documentation. */
          description: "Screen readers cannot translate non-text content. Adding alternate text to `<object>` elements helps screen readers convey meaning to users. [Learn more about alt text for `object` elements](https://dequeuniversity.com/rules/axe/4.11/object-alt)."
        };
        str_56 = createIcuMessageFn({ url: "core/audits/accessibility/object-alt.js" }.url, UIStrings75);
        ObjectAlt = class extends axe_audit_default {
          static {
            __name(this, "ObjectAlt");
          }
          /**
           * @return {LH.Audit.Meta}
           */
          static get meta() {
            return {
              id: "object-alt",
              title: str_56(UIStrings75.title),
              failureTitle: str_56(UIStrings75.failureTitle),
              description: str_56(UIStrings75.description),
              requiredArtifacts: ["Accessibility"]
            };
          }
        };
        object_alt_default = ObjectAlt;
      }
    });
    select_name_exports = {};
    __export2(select_name_exports, {
      UIStrings: () => UIStrings76,
      default: () => select_name_default
    });
    init_select_name = __esm2({
      "core/audits/accessibility/select-name.js"() {
        "use strict";
        init_process_global();
        init_axe_audit();
        init_i18n();
        UIStrings76 = {
          /** Title of an accessibility audit that evaluates if all select elements have programmatically associated label elements. This title is descriptive of the successful state and is shown to users when no user action is required. */
          title: "Select elements have associated label elements.",
          /** Title of an accessibility audit that evaluates if all select elements have programmatically associated label elements. This title is descriptive of the failing state and is shown to users when there is a failure that needs to be addressed. */
          failureTitle: "Select elements do not have associated label elements.",
          /** Description of a Lighthouse audit that tells the user *why* they should try to pass. This is displayed after a user expands the section to see more. No character length limits. The last sentence starting with 'Learn' becomes link text to additional documentation. */
          description: "Form elements without effective labels can create frustrating experiences for screen reader users. [Learn more about the `select` element](https://dequeuniversity.com/rules/axe/4.11/select-name)."
        };
        str_57 = createIcuMessageFn({ url: "core/audits/accessibility/select-name.js" }.url, UIStrings76);
        SelectName = class extends axe_audit_default {
          static {
            __name(this, "SelectName");
          }
          /**
           * @return {LH.Audit.Meta}
           */
          static get meta() {
            return {
              id: "select-name",
              title: str_57(UIStrings76.title),
              failureTitle: str_57(UIStrings76.failureTitle),
              description: str_57(UIStrings76.description),
              requiredArtifacts: ["Accessibility"]
            };
          }
        };
        select_name_default = SelectName;
      }
    });
    skip_link_exports = {};
    __export2(skip_link_exports, {
      UIStrings: () => UIStrings77,
      default: () => skip_link_default
    });
    init_skip_link = __esm2({
      "core/audits/accessibility/skip-link.js"() {
        "use strict";
        init_process_global();
        init_axe_audit();
        init_i18n();
        UIStrings77 = {
          /** Title of an accessibility audit that evaluates if the skip link is focusable. This title is descriptive of the successful state and is shown to users when no user action is required. */
          title: "Skip links are focusable.",
          /** Title of an accessibility audit that evaluates if the skip link is focusable. This title is descriptive of the failing state and is shown to users when there is a failure that needs to be addressed. */
          failureTitle: "Skip links are not focusable.",
          /** Description of a Lighthouse audit that tells the user *why* they should try to pass. This is displayed after a user expands the section to see more. No character length limits. The last sentence starting with 'Learn' becomes link text to additional documentation. */
          description: "Including a skip link can help users skip to the main content to save time. [Learn more about skip links](https://dequeuniversity.com/rules/axe/4.11/skip-link)."
        };
        str_58 = createIcuMessageFn({ url: "core/audits/accessibility/skip-link.js" }.url, UIStrings77);
        SkipLink = class extends axe_audit_default {
          static {
            __name(this, "SkipLink");
          }
          /**
           * @return {LH.Audit.Meta}
           */
          static get meta() {
            return {
              id: "skip-link",
              title: str_58(UIStrings77.title),
              failureTitle: str_58(UIStrings77.failureTitle),
              description: str_58(UIStrings77.description),
              requiredArtifacts: ["Accessibility"]
            };
          }
        };
        skip_link_default = SkipLink;
      }
    });
    tabindex_exports = {};
    __export2(tabindex_exports, {
      UIStrings: () => UIStrings78,
      default: () => tabindex_default
    });
    init_tabindex = __esm2({
      "core/audits/accessibility/tabindex.js"() {
        "use strict";
        init_process_global();
        init_axe_audit();
        init_i18n();
        UIStrings78 = {
          /** Title of an accessibility audit that evaluates if any elements have custom tabindex HTML attributes that might frustrate users of assitive technology. This title is descriptive of the successful state and is shown to users when no user action is required. */
          title: "No element has a `[tabindex]` value greater than 0",
          /** Title of an accessibility audit that evaluates if any elements have custom tabindex HTML attributes that might frustrate users of assitive technology. This title is descriptive of the failing state and is shown to users when there is a failure that needs to be addressed. */
          failureTitle: "Some elements have a `[tabindex]` value greater than 0",
          /** Description of a Lighthouse audit that tells the user *why* they should try to pass. This is displayed after a user expands the section to see more. No character length limits. The last sentence starting with 'Learn' becomes link text to additional documentation. */
          description: "A value greater than 0 implies an explicit navigation ordering. Although technically valid, this often creates frustrating experiences for users who rely on assistive technologies. [Learn more about the `tabindex` attribute](https://dequeuniversity.com/rules/axe/4.11/tabindex)."
        };
        str_59 = createIcuMessageFn({ url: "core/audits/accessibility/tabindex.js" }.url, UIStrings78);
        TabIndex = class extends axe_audit_default {
          static {
            __name(this, "TabIndex");
          }
          /**
           * @return {LH.Audit.Meta}
           */
          static get meta() {
            return {
              id: "tabindex",
              title: str_59(UIStrings78.title),
              failureTitle: str_59(UIStrings78.failureTitle),
              description: str_59(UIStrings78.description),
              requiredArtifacts: ["Accessibility"]
            };
          }
        };
        tabindex_default = TabIndex;
      }
    });
    table_duplicate_name_exports = {};
    __export2(table_duplicate_name_exports, {
      UIStrings: () => UIStrings79,
      default: () => table_duplicate_name_default
    });
    init_table_duplicate_name = __esm2({
      "core/audits/accessibility/table-duplicate-name.js"() {
        "use strict";
        init_process_global();
        init_axe_audit();
        init_i18n();
        UIStrings79 = {
          /** Title of an accessibility audit that evaluates if tables have different content in the summary attribute and caption element. This title is descriptive of the successful state and is shown to users when no user action is required. */
          title: "Tables have different content in the summary attribute and `<caption>`.",
          /** Title of an accessibility audit that evaluates if tables have different content in the summary attribute and caption element. This title is descriptive of the failing state and is shown to users when there is a failure that needs to be addressed. */
          failureTitle: "Tables have the same content in the summary attribute and `<caption>.`",
          /** Description of a Lighthouse audit that tells the user *why* they should try to pass. This is displayed after a user expands the section to see more. No character length limits. The last sentence starting with 'Learn' becomes link text to additional documentation. */
          description: "The summary attribute should describe the table structure, while `<caption>` should have the onscreen title. Accurate table mark-up helps users of screen readers. [Learn more about summary and caption](https://dequeuniversity.com/rules/axe/4.11/table-duplicate-name)."
        };
        str_60 = createIcuMessageFn({ url: "core/audits/accessibility/table-duplicate-name.js" }.url, UIStrings79);
        TableDuplicateName = class extends axe_audit_default {
          static {
            __name(this, "TableDuplicateName");
          }
          /**
           * @return {LH.Audit.Meta}
           */
          static get meta() {
            return {
              id: "table-duplicate-name",
              title: str_60(UIStrings79.title),
              failureTitle: str_60(UIStrings79.failureTitle),
              description: str_60(UIStrings79.description),
              scoreDisplayMode: axe_audit_default.SCORING_MODES.INFORMATIVE,
              requiredArtifacts: ["Accessibility"]
            };
          }
        };
        table_duplicate_name_default = TableDuplicateName;
      }
    });
    table_fake_caption_exports = {};
    __export2(table_fake_caption_exports, {
      UIStrings: () => UIStrings80,
      default: () => table_fake_caption_default
    });
    init_table_fake_caption = __esm2({
      "core/audits/accessibility/table-fake-caption.js"() {
        "use strict";
        init_process_global();
        init_axe_audit();
        init_i18n();
        UIStrings80 = {
          /** Title of an accessibility audit that evaluates if all tables use caption instead of colspan to indicate a caption. This title is descriptive of the successful state and is shown to users when no user action is required. */
          title: "Tables use `<caption>` instead of cells with the `[colspan]` attribute to indicate a caption.",
          /** Title of an accessibility audit that evaluates if all tables use caption instead of colspan to indicate a caption. This title is descriptive of the failing state and is shown to users when there is a failure that needs to be addressed. */
          failureTitle: "Tables do not use `<caption>` instead of cells with the `[colspan]` attribute to indicate a caption.",
          /** Description of a Lighthouse audit that tells the user *why* they should try to pass. This is displayed after a user expands the section to see more. No character length limits. The last sentence starting with 'Learn' becomes link text to additional documentation. */
          description: "Screen readers have features to make navigating tables easier. Ensuring that tables use the actual caption element instead of cells with the `[colspan]` attribute may improve the experience for screen reader users. [Learn more about captions](https://dequeuniversity.com/rules/axe/4.11/table-fake-caption)."
        };
        str_61 = createIcuMessageFn({ url: "core/audits/accessibility/table-fake-caption.js" }.url, UIStrings80);
        TableFakeCaption = class extends axe_audit_default {
          static {
            __name(this, "TableFakeCaption");
          }
          /**
           * @return {LH.Audit.Meta}
           */
          static get meta() {
            return {
              id: "table-fake-caption",
              title: str_61(UIStrings80.title),
              failureTitle: str_61(UIStrings80.failureTitle),
              description: str_61(UIStrings80.description),
              requiredArtifacts: ["Accessibility"]
            };
          }
        };
        table_fake_caption_default = TableFakeCaption;
      }
    });
    target_size_exports = {};
    __export2(target_size_exports, {
      UIStrings: () => UIStrings81,
      default: () => target_size_default
    });
    init_target_size = __esm2({
      "core/audits/accessibility/target-size.js"() {
        "use strict";
        init_process_global();
        init_axe_audit();
        init_i18n();
        UIStrings81 = {
          /** Title of an accessibility audit that checks if all touch targets have sufficient size and spacing. This title is descriptive of the successful state and is shown to users when no user action is required. */
          title: "Touch targets have sufficient size and spacing.",
          /** Title of an accessibility audit that checks if all touch targets have sufficient size and spacing. This title is descriptive of the failing state and is shown to users when there is a failure that needs to be addressed. */
          failureTitle: "Touch targets do not have sufficient size or spacing.",
          /** Description of a Lighthouse audit that tells the user *why* they should try to pass. This is displayed after a user expands the section to see more. No character length limits. The last sentence starting with 'Learn' becomes link text to additional documentation. */
          description: "Touch targets with sufficient size and spacing help users who may have difficulty targeting small controls to activate the targets. [Learn more about touch targets](https://dequeuniversity.com/rules/axe/4.11/target-size)."
        };
        str_62 = createIcuMessageFn({ url: "core/audits/accessibility/target-size.js" }.url, UIStrings81);
        TargetSize = class extends axe_audit_default {
          static {
            __name(this, "TargetSize");
          }
          /**
           * @return {LH.Audit.Meta}
           */
          static get meta() {
            return {
              id: "target-size",
              title: str_62(UIStrings81.title),
              failureTitle: str_62(UIStrings81.failureTitle),
              description: str_62(UIStrings81.description),
              requiredArtifacts: ["Accessibility"]
            };
          }
        };
        target_size_default = TargetSize;
      }
    });
    td_has_header_exports = {};
    __export2(td_has_header_exports, {
      UIStrings: () => UIStrings82,
      default: () => td_has_header_default
    });
    init_td_has_header = __esm2({
      "core/audits/accessibility/td-has-header.js"() {
        "use strict";
        init_process_global();
        init_axe_audit();
        init_i18n();
        UIStrings82 = {
          /** Title of an accessibility audit that evaluates if all large table elements use the headers HTML attribute. This title is descriptive of the successful state and is shown to users when no user action is required. */
          title: "`<td>` elements in a large `<table>` have one or more table headers.",
          /** Title of an accessibility audit that evaluates if all large table elements use the headers HTML attribute. This title is descriptive of the failing state and is shown to users when there is a failure that needs to be addressed. */
          failureTitle: "`<td>` elements in a large `<table>` do not have table headers.",
          /** Description of a Lighthouse audit that tells the user *why* they should try to pass. This is displayed after a user expands the section to see more. No character length limits. The last sentence starting with 'Learn' becomes link text to additional documentation. */
          description: "Screen readers have features to make navigating tables easier. Ensuring that `<td>` elements in a large table (3 or more cells in width and height) have an associated table header may improve the experience for screen reader users. [Learn more about table headers](https://dequeuniversity.com/rules/axe/4.11/td-has-header)."
        };
        str_63 = createIcuMessageFn({ url: "core/audits/accessibility/td-has-header.js" }.url, UIStrings82);
        TDHasHeader = class extends axe_audit_default {
          static {
            __name(this, "TDHasHeader");
          }
          /**
           * @return {LH.Audit.Meta}
           */
          static get meta() {
            return {
              id: "td-has-header",
              title: str_63(UIStrings82.title),
              failureTitle: str_63(UIStrings82.failureTitle),
              description: str_63(UIStrings82.description),
              requiredArtifacts: ["Accessibility"]
            };
          }
        };
        td_has_header_default = TDHasHeader;
      }
    });
    td_headers_attr_exports = {};
    __export2(td_headers_attr_exports, {
      UIStrings: () => UIStrings83,
      default: () => td_headers_attr_default
    });
    init_td_headers_attr = __esm2({
      "core/audits/accessibility/td-headers-attr.js"() {
        "use strict";
        init_process_global();
        init_axe_audit();
        init_i18n();
        UIStrings83 = {
          /** Title of an accessibility audit that evaluates if all table cell elements in a table that use the headers HTML attribute use it correctly to refer to header cells within the same table. This title is descriptive of the successful state and is shown to users when no user action is required. */
          title: "Cells in a `<table>` element that use the `[headers]` attribute refer to table cells within the same table.",
          /** Title of an accessibility audit that evaluates if all table cell elements in a table that use the headers HTML attribute use it correctly to refer to header cells within the same table. This title is descriptive of the failing state and is shown to users when there is a failure that needs to be addressed. */
          failureTitle: "Cells in a `<table>` element that use the `[headers]` attribute refer to an element `id` not found within the same table.",
          /** Description of a Lighthouse audit that tells the user *why* they should try to pass. This is displayed after a user expands the section to see more. No character length limits. The last sentence starting with 'Learn' becomes link text to additional documentation. */
          description: "Screen readers have features to make navigating tables easier. Ensuring `<td>` cells using the `[headers]` attribute only refer to other cells in the same table may improve the experience for screen reader users. [Learn more about the `headers` attribute](https://dequeuniversity.com/rules/axe/4.11/td-headers-attr)."
        };
        str_64 = createIcuMessageFn({ url: "core/audits/accessibility/td-headers-attr.js" }.url, UIStrings83);
        TDHeadersAttr = class extends axe_audit_default {
          static {
            __name(this, "TDHeadersAttr");
          }
          /**
           * @return {LH.Audit.Meta}
           */
          static get meta() {
            return {
              id: "td-headers-attr",
              title: str_64(UIStrings83.title),
              failureTitle: str_64(UIStrings83.failureTitle),
              description: str_64(UIStrings83.description),
              requiredArtifacts: ["Accessibility"]
            };
          }
        };
        td_headers_attr_default = TDHeadersAttr;
      }
    });
    th_has_data_cells_exports = {};
    __export2(th_has_data_cells_exports, {
      UIStrings: () => UIStrings84,
      default: () => th_has_data_cells_default
    });
    init_th_has_data_cells = __esm2({
      "core/audits/accessibility/th-has-data-cells.js"() {
        "use strict";
        init_process_global();
        init_axe_audit();
        init_i18n();
        UIStrings84 = {
          /** Title of an accessibility audit that evaluates if all table header elements have children. This title is descriptive of the successful state and is shown to users when no user action is required. */
          title: '`<th>` elements and elements with `[role="columnheader"/"rowheader"]` have data cells they describe.',
          /** Title of an accessibility audit that evaluates if all table header elements have children. This title is descriptive of the failing state and is shown to users when there is a failure that needs to be addressed. */
          failureTitle: '`<th>` elements and elements with `[role="columnheader"/"rowheader"]` do not have data cells they describe.',
          /** Description of a Lighthouse audit that tells the user *why* they should try to pass. This is displayed after a user expands the section to see more. No character length limits. The last sentence starting with 'Learn' becomes link text to additional documentation. */
          description: "Screen readers have features to make navigating tables easier. Ensuring table headers always refer to some set of cells may improve the experience for screen reader users. [Learn more about table headers](https://dequeuniversity.com/rules/axe/4.11/th-has-data-cells)."
        };
        str_65 = createIcuMessageFn({ url: "core/audits/accessibility/th-has-data-cells.js" }.url, UIStrings84);
        THHasDataCells = class extends axe_audit_default {
          static {
            __name(this, "THHasDataCells");
          }
          /**
           * @return {LH.Audit.Meta}
           */
          static get meta() {
            return {
              id: "th-has-data-cells",
              title: str_65(UIStrings84.title),
              failureTitle: str_65(UIStrings84.failureTitle),
              description: str_65(UIStrings84.description),
              scoreDisplayMode: axe_audit_default.SCORING_MODES.INFORMATIVE,
              requiredArtifacts: ["Accessibility"]
            };
          }
        };
        th_has_data_cells_default = THHasDataCells;
      }
    });
    valid_lang_exports = {};
    __export2(valid_lang_exports, {
      UIStrings: () => UIStrings85,
      default: () => valid_lang_default
    });
    init_valid_lang = __esm2({
      "core/audits/accessibility/valid-lang.js"() {
        "use strict";
        init_process_global();
        init_axe_audit();
        init_i18n();
        UIStrings85 = {
          /** Title of an accessibility audit that evaluates if all lang HTML attributes are valid BCP 47 languages. This title is descriptive of the successful state and is shown to users when no user action is required. */
          title: "`[lang]` attributes have a valid value",
          /** Title of an accessibility audit that evaluates if all lang HTML attributes are valid BCP 47 languages. This title is descriptive of the failing state and is shown to users when there is a failure that needs to be addressed. */
          failureTitle: "`[lang]` attributes do not have a valid value",
          /** Description of a Lighthouse audit that tells the user *why* they should try to pass. This is displayed after a user expands the section to see more. No character length limits. The last sentence starting with 'Learn' becomes link text to additional documentation. */
          description: "Specifying a valid [BCP 47 language](https://www.w3.org/International/questions/qa-choosing-language-tags#question) on elements helps ensure that text is pronounced correctly by a screen reader. [Learn how to use the `lang` attribute](https://dequeuniversity.com/rules/axe/4.11/valid-lang)."
        };
        str_66 = createIcuMessageFn({ url: "core/audits/accessibility/valid-lang.js" }.url, UIStrings85);
        ValidLang = class extends axe_audit_default {
          static {
            __name(this, "ValidLang");
          }
          /**
           * @return {LH.Audit.Meta}
           */
          static get meta() {
            return {
              id: "valid-lang",
              title: str_66(UIStrings85.title),
              failureTitle: str_66(UIStrings85.failureTitle),
              description: str_66(UIStrings85.description),
              requiredArtifacts: ["Accessibility"]
            };
          }
        };
        valid_lang_default = ValidLang;
      }
    });
    video_caption_exports = {};
    __export2(video_caption_exports, {
      UIStrings: () => UIStrings86,
      default: () => video_caption_default
    });
    init_video_caption = __esm2({
      "core/audits/accessibility/video-caption.js"() {
        "use strict";
        init_process_global();
        init_axe_audit();
        init_i18n();
        UIStrings86 = {
          /** Title of an accessibility audit that evaluates if all video elements contain a child track element that has captions describing their audio. This title is descriptive of the successful state and is shown to users when no user action is required. */
          title: '`<video>` elements contain a `<track>` element with `[kind="captions"]`',
          /** Title of an accessibility audit that evaluates if all video elements contain a child track element that has captions describing their audio. This title is descriptive of the failing state and is shown to users when there is a failure that needs to be addressed. */
          failureTitle: '`<video>` elements do not contain a `<track>` element with `[kind="captions"]`.',
          /** Description of a Lighthouse audit that tells the user *why* they should try to pass. This is displayed after a user expands the section to see more. No character length limits. The last sentence starting with 'Learn' becomes link text to additional documentation. */
          description: "When a video provides a caption it is easier for deaf and hearing impaired users to access its information. [Learn more about video captions](https://dequeuniversity.com/rules/axe/4.11/video-caption)."
        };
        str_67 = createIcuMessageFn({ url: "core/audits/accessibility/video-caption.js" }.url, UIStrings86);
        VideoCaption = class extends axe_audit_default {
          static {
            __name(this, "VideoCaption");
          }
          /**
           * @return {LH.Audit.Meta}
           */
          static get meta() {
            return {
              id: "video-caption",
              title: str_67(UIStrings86.title),
              failureTitle: str_67(UIStrings86.failureTitle),
              description: str_67(UIStrings86.description),
              scoreDisplayMode: axe_audit_default.SCORING_MODES.INFORMATIVE,
              requiredArtifacts: ["Accessibility"]
            };
          }
        };
        video_caption_default = VideoCaption;
      }
    });
    clickjacking_mitigation_exports = {};
    __export2(clickjacking_mitigation_exports, {
      UIStrings: () => UIStrings87,
      default: () => clickjacking_mitigation_default
    });
    init_clickjacking_mitigation = __esm2({
      "core/audits/clickjacking-mitigation.js"() {
        "use strict";
        init_process_global();
        init_audit();
        init_main_resource();
        init_i18n();
        UIStrings87 = {
          /** Title of a Lighthouse audit that evaluates whether the set CSP or XFO header is mitigating clickjacking attacks. "XFO" stands for "X-Frame-Options" and should not be translated. "CSP" stands for "Content-Security-Policy" and should not be translated. "clickjacking" should not be translated. */
          title: "Mitigate clickjacking with XFO or CSP",
          /** Description of a Lighthouse audit that evaluates whether the set CSP or XFO header is mitigating clickjacking attacks. This is displayed after a user expands the section to see more. "clickjacking" should not be translated. No character length limits. The last sentence starting with 'Learn' becomes link text to additional documentation. "XFO" stands for "X-Frame-Options" and should not be translated. "CSP" stands for "Content-Security-Policy" and should not be translated. */
          description: "The `X-Frame-Options` (XFO) header or the `frame-ancestors` directive in the `Content-Security-Policy` (CSP) header control where a page can be embedded. These can mitigate clickjacking attacks by blocking some or all sites from embedding the page. [Learn more about mitigating clickjacking](https://developer.chrome.com/docs/lighthouse/best-practices/clickjacking-mitigation).",
          /** Summary text for the results of a Lighthouse audit that evaluates whether the page is mitigating clickjacking attacks with a frame control policy. This text is displayed if the page does not control how it can be embedded on other pages. */
          noClickjackingMitigation: "No frame control policy found",
          /** Label for a column in a data table; entries will be the severity of an issue with the page's frame control policy. */
          columnSeverity: "Severity"
        };
        str_68 = createIcuMessageFn({ url: "core/audits/clickjacking-mitigation.js" }.url, UIStrings87);
        ClickjackingMitigation = class extends Audit {
          static {
            __name(this, "ClickjackingMitigation");
          }
          /**
           * @return {LH.Audit.Meta}
           */
          static get meta() {
            return {
              id: "clickjacking-mitigation",
              scoreDisplayMode: Audit.SCORING_MODES.INFORMATIVE,
              title: str_68(UIStrings87.title),
              description: str_68(UIStrings87.description),
              requiredArtifacts: ["DevtoolsLog", "URL"],
              supportedModes: ["navigation"]
            };
          }
          /**
           * @param {LH.Artifacts} artifacts
           * @param {LH.Audit.Context} context
           * @return {Promise<{cspHeaders: string[], xfoHeaders: string[]}>}
           */
          static async getRawCspsAndXfo(artifacts, context2) {
            const devtoolsLog = artifacts.DevtoolsLog;
            const mainResource = await MainResourceComputed.request({ devtoolsLog, URL: artifacts.URL }, context2);
            const cspHeaders = mainResource.responseHeaders.filter((h) => {
              return h.name.toLowerCase() === "content-security-policy";
            }).flatMap((h) => h.value.split(",")).filter((rawCsp) => rawCsp.replace(/\s/g, ""));
            let xfoHeaders = mainResource.responseHeaders.filter((h) => {
              return h.name.toLowerCase() === "x-frame-options";
            }).flatMap((h) => h.value);
            xfoHeaders = xfoHeaders.map((v) => v.toLowerCase().replace(/\s/g, ""));
            return { cspHeaders, xfoHeaders };
          }
          /**
           * @param {string | undefined} directive
           * @param {LH.IcuMessage | string} findingDescription
           * @param {LH.IcuMessage=} severity
           * @return {LH.Audit.Details.TableItem}
           */
          static findingToTableItem(directive, findingDescription, severity) {
            return {
              description: findingDescription,
              severity
            };
          }
          /**
           * @param {string[]} cspHeaders
           * @param {string[]} xfoHeaders
           * @return {{score: number, results: LH.Audit.Details.TableItem[]}}
           */
          static constructResults(cspHeaders, xfoHeaders) {
            const allowedDirectives = ["deny", "sameorigin"];
            for (const cspHeader of cspHeaders) {
              if (cspHeader.includes("frame-ancestors")) {
                return { score: 1, results: [] };
              }
            }
            for (const actualDirective of xfoHeaders) {
              if (allowedDirectives.includes(actualDirective)) {
                return { score: 1, results: [] };
              }
            }
            return {
              score: 0,
              results: [{
                severity: str_68(UIStrings.itemSeverityHigh),
                description: str_68(UIStrings87.noClickjackingMitigation)
              }]
            };
          }
          /**
           * @param {LH.Artifacts} artifacts
           * @param {LH.Audit.Context} context
           * @return {Promise<LH.Audit.Product>}
           */
          static async audit(artifacts, context2) {
            const { cspHeaders, xfoHeaders } = await this.getRawCspsAndXfo(artifacts, context2);
            const { score, results } = this.constructResults(cspHeaders, xfoHeaders);
            const headings = [
              /* eslint-disable max-len */
              { key: "description", valueType: "text", subItemsHeading: { key: "description" }, label: str_68(UIStrings.columnDescription) },
              { key: "severity", valueType: "text", subItemsHeading: { key: "severity" }, label: str_68(UIStrings87.columnSeverity) }
              /* eslint-enable max-len */
            ];
            const details = Audit.makeTableDetails(headings, results);
            return {
              score,
              notApplicable: !results.length,
              details
            };
          }
        };
        clickjacking_mitigation_default = ClickjackingMitigation;
      }
    });
    require_finding = __commonJS({
      "node_modules/csp_evaluator/dist/finding.js"(exports2) {
        "use strict";
        init_process_global();
        Object.defineProperty(exports2, "__esModule", { value: true });
        exports2.Type = exports2.Severity = exports2.Finding = void 0;
        var Finding = class _Finding {
          static {
            __name(this, "Finding");
          }
          constructor(type2, description2, severity, directive, value) {
            this.type = type2;
            this.description = description2;
            this.severity = severity;
            this.directive = directive;
            this.value = value;
          }
          static getHighestSeverity(findings) {
            if (findings.length === 0) {
              return Severity.NONE;
            }
            const severities = findings.map((finding) => finding.severity);
            const min = /* @__PURE__ */ __name((prev, cur) => prev < cur ? prev : cur, "min");
            return severities.reduce(min, Severity.NONE);
          }
          equals(obj) {
            if (!(obj instanceof _Finding)) {
              return false;
            }
            return obj.type === this.type && obj.description === this.description && obj.severity === this.severity && obj.directive === this.directive && obj.value === this.value;
          }
        };
        exports2.Finding = Finding;
        var Severity;
        (function(Severity2) {
          Severity2[Severity2["HIGH"] = 10] = "HIGH";
          Severity2[Severity2["SYNTAX"] = 20] = "SYNTAX";
          Severity2[Severity2["MEDIUM"] = 30] = "MEDIUM";
          Severity2[Severity2["HIGH_MAYBE"] = 40] = "HIGH_MAYBE";
          Severity2[Severity2["STRICT_CSP"] = 45] = "STRICT_CSP";
          Severity2[Severity2["MEDIUM_MAYBE"] = 50] = "MEDIUM_MAYBE";
          Severity2[Severity2["INFO"] = 60] = "INFO";
          Severity2[Severity2["NONE"] = 100] = "NONE";
        })(Severity = exports2.Severity || (exports2.Severity = {}));
        var Type2;
        (function(Type3) {
          Type3[Type3["MISSING_SEMICOLON"] = 100] = "MISSING_SEMICOLON";
          Type3[Type3["UNKNOWN_DIRECTIVE"] = 101] = "UNKNOWN_DIRECTIVE";
          Type3[Type3["INVALID_KEYWORD"] = 102] = "INVALID_KEYWORD";
          Type3[Type3["NONCE_CHARSET"] = 106] = "NONCE_CHARSET";
          Type3[Type3["MISSING_DIRECTIVES"] = 300] = "MISSING_DIRECTIVES";
          Type3[Type3["SCRIPT_UNSAFE_INLINE"] = 301] = "SCRIPT_UNSAFE_INLINE";
          Type3[Type3["SCRIPT_UNSAFE_EVAL"] = 302] = "SCRIPT_UNSAFE_EVAL";
          Type3[Type3["PLAIN_URL_SCHEMES"] = 303] = "PLAIN_URL_SCHEMES";
          Type3[Type3["PLAIN_WILDCARD"] = 304] = "PLAIN_WILDCARD";
          Type3[Type3["SCRIPT_ALLOWLIST_BYPASS"] = 305] = "SCRIPT_ALLOWLIST_BYPASS";
          Type3[Type3["OBJECT_ALLOWLIST_BYPASS"] = 306] = "OBJECT_ALLOWLIST_BYPASS";
          Type3[Type3["NONCE_LENGTH"] = 307] = "NONCE_LENGTH";
          Type3[Type3["IP_SOURCE"] = 308] = "IP_SOURCE";
          Type3[Type3["DEPRECATED_DIRECTIVE"] = 309] = "DEPRECATED_DIRECTIVE";
          Type3[Type3["SRC_HTTP"] = 310] = "SRC_HTTP";
          Type3[Type3["SRC_NO_PROTOCOL"] = 311] = "SRC_NO_PROTOCOL";
          Type3[Type3["EXPERIMENTAL"] = 312] = "EXPERIMENTAL";
          Type3[Type3["WILDCARD_URL"] = 313] = "WILDCARD_URL";
          Type3[Type3["X_FRAME_OPTIONS_OBSOLETED"] = 314] = "X_FRAME_OPTIONS_OBSOLETED";
          Type3[Type3["STYLE_UNSAFE_INLINE"] = 315] = "STYLE_UNSAFE_INLINE";
          Type3[Type3["STATIC_NONCE"] = 316] = "STATIC_NONCE";
          Type3[Type3["SCRIPT_UNSAFE_HASHES"] = 317] = "SCRIPT_UNSAFE_HASHES";
          Type3[Type3["STRICT_DYNAMIC"] = 400] = "STRICT_DYNAMIC";
          Type3[Type3["STRICT_DYNAMIC_NOT_STANDALONE"] = 401] = "STRICT_DYNAMIC_NOT_STANDALONE";
          Type3[Type3["NONCE_HASH"] = 402] = "NONCE_HASH";
          Type3[Type3["UNSAFE_INLINE_FALLBACK"] = 403] = "UNSAFE_INLINE_FALLBACK";
          Type3[Type3["ALLOWLIST_FALLBACK"] = 404] = "ALLOWLIST_FALLBACK";
          Type3[Type3["IGNORED"] = 405] = "IGNORED";
          Type3[Type3["REQUIRE_TRUSTED_TYPES_FOR_SCRIPTS"] = 500] = "REQUIRE_TRUSTED_TYPES_FOR_SCRIPTS";
          Type3[Type3["REPORTING_DESTINATION_MISSING"] = 600] = "REPORTING_DESTINATION_MISSING";
          Type3[Type3["REPORT_TO_ONLY"] = 601] = "REPORT_TO_ONLY";
        })(Type2 = exports2.Type || (exports2.Type = {}));
      }
    });
    require_csp = __commonJS({
      "node_modules/csp_evaluator/dist/csp.js"(exports2) {
        "use strict";
        init_process_global();
        Object.defineProperty(exports2, "__esModule", { value: true });
        exports2.CspError = exports2.isHash = exports2.HASH_PATTERN = exports2.STRICT_HASH_PATTERN = exports2.isNonce = exports2.NONCE_PATTERN = exports2.STRICT_NONCE_PATTERN = exports2.isUrlScheme = exports2.isKeyword = exports2.isDirective = exports2.Version = exports2.FETCH_DIRECTIVES = exports2.Directive = exports2.TrustedTypesSink = exports2.Keyword = exports2.Csp = void 0;
        var finding_1 = require_finding();
        var Csp = class _Csp {
          static {
            __name(this, "Csp");
          }
          constructor(directives = {}) {
            this.directives = {};
            for (const [directive, directiveValues] of Object.entries(directives)) {
              if (directiveValues) {
                this.directives[directive] = [...directiveValues];
              }
            }
          }
          clone() {
            return new _Csp(this.directives);
          }
          convertToString() {
            let cspString = "";
            for (const [directive, directiveValues] of Object.entries(this.directives)) {
              cspString += directive;
              if (directiveValues !== void 0) {
                for (let value, i = 0; value = directiveValues[i]; i++) {
                  cspString += " ";
                  cspString += value;
                }
              }
              cspString += "; ";
            }
            return cspString;
          }
          getEffectiveCsp(cspVersion, optFindings) {
            const findings = optFindings || [];
            const effectiveCsp = this.clone();
            [Directive3.SCRIPT_SRC, Directive3.SCRIPT_SRC_ATTR, Directive3.SCRIPT_SRC_ELEM].forEach((directiveToNormalize) => {
              const directive = effectiveCsp.getEffectiveDirective(directiveToNormalize);
              const values = this.directives[directive] || [];
              const effectiveCspValues = effectiveCsp.directives[directive];
              if (effectiveCspValues && (effectiveCsp.policyHasScriptNonces(directive) || effectiveCsp.policyHasScriptHashes(directive))) {
                if (cspVersion >= Version.CSP2) {
                  if (values.includes(Keyword.UNSAFE_INLINE)) {
                    arrayRemove(effectiveCspValues, Keyword.UNSAFE_INLINE);
                    findings.push(new finding_1.Finding(finding_1.Type.IGNORED, "unsafe-inline is ignored if a nonce or a hash is present. (CSP2 and above)", finding_1.Severity.NONE, directive, Keyword.UNSAFE_INLINE));
                  }
                } else {
                  for (const value of values) {
                    if (value.startsWith("'nonce-") || value.startsWith("'sha")) {
                      arrayRemove(effectiveCspValues, value);
                    }
                  }
                }
              }
              if (effectiveCspValues && this.policyHasStrictDynamic(directive)) {
                if (cspVersion >= Version.CSP3) {
                  for (const value of values) {
                    if (!value.startsWith("'") || value === Keyword.SELF || value === Keyword.UNSAFE_INLINE) {
                      arrayRemove(effectiveCspValues, value);
                      findings.push(new finding_1.Finding(finding_1.Type.IGNORED, "Because of strict-dynamic this entry is ignored in CSP3 and above", finding_1.Severity.NONE, directive, value));
                    }
                  }
                } else {
                  arrayRemove(effectiveCspValues, Keyword.STRICT_DYNAMIC);
                }
              }
            });
            if (cspVersion < Version.CSP3) {
              delete effectiveCsp.directives[Directive3.REPORT_TO];
              delete effectiveCsp.directives[Directive3.WORKER_SRC];
              delete effectiveCsp.directives[Directive3.MANIFEST_SRC];
              delete effectiveCsp.directives[Directive3.TRUSTED_TYPES];
              delete effectiveCsp.directives[Directive3.REQUIRE_TRUSTED_TYPES_FOR];
              delete effectiveCsp.directives[Directive3.SCRIPT_SRC_ATTR];
              delete effectiveCsp.directives[Directive3.SCRIPT_SRC_ELEM];
              delete effectiveCsp.directives[Directive3.STYLE_SRC_ATTR];
              delete effectiveCsp.directives[Directive3.STYLE_SRC_ELEM];
            }
            return effectiveCsp;
          }
          getEffectiveDirective(directive) {
            if (directive in this.directives) {
              return directive;
            }
            if ((directive === Directive3.SCRIPT_SRC_ATTR || directive === Directive3.SCRIPT_SRC_ELEM) && Directive3.SCRIPT_SRC in this.directives) {
              return Directive3.SCRIPT_SRC;
            }
            if ((directive === Directive3.STYLE_SRC_ATTR || directive === Directive3.STYLE_SRC_ELEM) && Directive3.STYLE_SRC in this.directives) {
              return Directive3.STYLE_SRC;
            }
            if (exports2.FETCH_DIRECTIVES.includes(directive)) {
              return Directive3.DEFAULT_SRC;
            }
            return directive;
          }
          getEffectiveDirectives(directives) {
            const effectiveDirectives = new Set(directives.map((val) => this.getEffectiveDirective(val)));
            return [...effectiveDirectives];
          }
          policyHasScriptNonces(directive) {
            const directiveName = this.getEffectiveDirective(directive || Directive3.SCRIPT_SRC);
            const values = this.directives[directiveName] || [];
            return values.some((val) => isNonce(val));
          }
          policyHasScriptHashes(directive) {
            const directiveName = this.getEffectiveDirective(directive || Directive3.SCRIPT_SRC);
            const values = this.directives[directiveName] || [];
            return values.some((val) => isHash(val));
          }
          policyHasStrictDynamic(directive) {
            const directiveName = this.getEffectiveDirective(directive || Directive3.SCRIPT_SRC);
            const values = this.directives[directiveName] || [];
            return values.includes(Keyword.STRICT_DYNAMIC);
          }
        };
        exports2.Csp = Csp;
        var Keyword;
        (function(Keyword2) {
          Keyword2["SELF"] = "'self'";
          Keyword2["NONE"] = "'none'";
          Keyword2["UNSAFE_INLINE"] = "'unsafe-inline'";
          Keyword2["UNSAFE_EVAL"] = "'unsafe-eval'";
          Keyword2["WASM_EVAL"] = "'wasm-eval'";
          Keyword2["WASM_UNSAFE_EVAL"] = "'wasm-unsafe-eval'";
          Keyword2["STRICT_DYNAMIC"] = "'strict-dynamic'";
          Keyword2["UNSAFE_HASHED_ATTRIBUTES"] = "'unsafe-hashed-attributes'";
          Keyword2["UNSAFE_HASHES"] = "'unsafe-hashes'";
          Keyword2["REPORT_SAMPLE"] = "'report-sample'";
          Keyword2["BLOCK"] = "'block'";
          Keyword2["ALLOW"] = "'allow'";
          Keyword2["INLINE_SPECULATION_RULES"] = "'inline-speculation-rules'";
        })(Keyword = exports2.Keyword || (exports2.Keyword = {}));
        var TrustedTypesSink;
        (function(TrustedTypesSink2) {
          TrustedTypesSink2["SCRIPT"] = "'script'";
        })(TrustedTypesSink = exports2.TrustedTypesSink || (exports2.TrustedTypesSink = {}));
        var Directive3;
        (function(Directive4) {
          Directive4["CHILD_SRC"] = "child-src";
          Directive4["CONNECT_SRC"] = "connect-src";
          Directive4["DEFAULT_SRC"] = "default-src";
          Directive4["FONT_SRC"] = "font-src";
          Directive4["FRAME_SRC"] = "frame-src";
          Directive4["IMG_SRC"] = "img-src";
          Directive4["MEDIA_SRC"] = "media-src";
          Directive4["OBJECT_SRC"] = "object-src";
          Directive4["SCRIPT_SRC"] = "script-src";
          Directive4["SCRIPT_SRC_ATTR"] = "script-src-attr";
          Directive4["SCRIPT_SRC_ELEM"] = "script-src-elem";
          Directive4["STYLE_SRC"] = "style-src";
          Directive4["STYLE_SRC_ATTR"] = "style-src-attr";
          Directive4["STYLE_SRC_ELEM"] = "style-src-elem";
          Directive4["PREFETCH_SRC"] = "prefetch-src";
          Directive4["MANIFEST_SRC"] = "manifest-src";
          Directive4["WORKER_SRC"] = "worker-src";
          Directive4["BASE_URI"] = "base-uri";
          Directive4["PLUGIN_TYPES"] = "plugin-types";
          Directive4["SANDBOX"] = "sandbox";
          Directive4["DISOWN_OPENER"] = "disown-opener";
          Directive4["FORM_ACTION"] = "form-action";
          Directive4["FRAME_ANCESTORS"] = "frame-ancestors";
          Directive4["NAVIGATE_TO"] = "navigate-to";
          Directive4["REPORT_TO"] = "report-to";
          Directive4["REPORT_URI"] = "report-uri";
          Directive4["BLOCK_ALL_MIXED_CONTENT"] = "block-all-mixed-content";
          Directive4["UPGRADE_INSECURE_REQUESTS"] = "upgrade-insecure-requests";
          Directive4["REFLECTED_XSS"] = "reflected-xss";
          Directive4["REFERRER"] = "referrer";
          Directive4["REQUIRE_SRI_FOR"] = "require-sri-for";
          Directive4["TRUSTED_TYPES"] = "trusted-types";
          Directive4["REQUIRE_TRUSTED_TYPES_FOR"] = "require-trusted-types-for";
          Directive4["WEBRTC"] = "webrtc";
        })(Directive3 = exports2.Directive || (exports2.Directive = {}));
        exports2.FETCH_DIRECTIVES = [
          Directive3.CHILD_SRC,
          Directive3.CONNECT_SRC,
          Directive3.DEFAULT_SRC,
          Directive3.FONT_SRC,
          Directive3.FRAME_SRC,
          Directive3.IMG_SRC,
          Directive3.MANIFEST_SRC,
          Directive3.MEDIA_SRC,
          Directive3.OBJECT_SRC,
          Directive3.SCRIPT_SRC,
          Directive3.SCRIPT_SRC_ATTR,
          Directive3.SCRIPT_SRC_ELEM,
          Directive3.STYLE_SRC,
          Directive3.STYLE_SRC_ATTR,
          Directive3.STYLE_SRC_ELEM,
          Directive3.WORKER_SRC
        ];
        var Version;
        (function(Version2) {
          Version2[Version2["CSP1"] = 1] = "CSP1";
          Version2[Version2["CSP2"] = 2] = "CSP2";
          Version2[Version2["CSP3"] = 3] = "CSP3";
        })(Version = exports2.Version || (exports2.Version = {}));
        function isDirective(directive) {
          return Object.values(Directive3).includes(directive);
        }
        __name(isDirective, "isDirective");
        exports2.isDirective = isDirective;
        function isKeyword(keyword2) {
          return Object.values(Keyword).includes(keyword2);
        }
        __name(isKeyword, "isKeyword");
        exports2.isKeyword = isKeyword;
        function isUrlScheme(urlScheme) {
          const pattern2 = new RegExp("^[a-zA-Z][+a-zA-Z0-9.-]*:$");
          return pattern2.test(urlScheme);
        }
        __name(isUrlScheme, "isUrlScheme");
        exports2.isUrlScheme = isUrlScheme;
        exports2.STRICT_NONCE_PATTERN = new RegExp("^'nonce-[a-zA-Z0-9+/_-]+[=]{0,2}'$");
        exports2.NONCE_PATTERN = new RegExp("^'nonce-(.+)'$");
        function isNonce(nonce, strictCheck) {
          const pattern2 = strictCheck ? exports2.STRICT_NONCE_PATTERN : exports2.NONCE_PATTERN;
          return pattern2.test(nonce);
        }
        __name(isNonce, "isNonce");
        exports2.isNonce = isNonce;
        exports2.STRICT_HASH_PATTERN = new RegExp("^'(sha256|sha384|sha512)-[a-zA-Z0-9+/]+[=]{0,2}'$");
        exports2.HASH_PATTERN = new RegExp("^'(sha256|sha384|sha512)-(.+)'$");
        function isHash(hash, strictCheck) {
          const pattern2 = strictCheck ? exports2.STRICT_HASH_PATTERN : exports2.HASH_PATTERN;
          return pattern2.test(hash);
        }
        __name(isHash, "isHash");
        exports2.isHash = isHash;
        var CspError = class extends Error {
          static {
            __name(this, "CspError");
          }
          constructor(message) {
            super(message);
          }
        };
        exports2.CspError = CspError;
        function arrayRemove(arr, item) {
          if (arr.includes(item)) {
            const idx = arr.findIndex((elem) => item === elem);
            arr.splice(idx, 1);
          }
        }
        __name(arrayRemove, "arrayRemove");
      }
    });
    require_parser_checks = __commonJS({
      "node_modules/csp_evaluator/dist/checks/parser_checks.js"(exports2) {
        "use strict";
        init_process_global();
        var __createBinding42 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) {
          if (k2 === void 0)
            k2 = k;
          Object.defineProperty(o, k2, { enumerable: true, get: /* @__PURE__ */ __name(function() {
            return m[k];
          }, "get") });
        } : function(o, m, k, k2) {
          if (k2 === void 0)
            k2 = k;
          o[k2] = m[k];
        });
        var __setModuleDefault42 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) {
          Object.defineProperty(o, "default", { enumerable: true, value: v });
        } : function(o, v) {
          o["default"] = v;
        });
        var __importStar42 = exports2 && exports2.__importStar || function(mod2) {
          if (mod2 && mod2.__esModule)
            return mod2;
          var result = {};
          if (mod2 != null) {
            for (var k in mod2)
              if (k !== "default" && Object.prototype.hasOwnProperty.call(mod2, k))
                __createBinding42(result, mod2, k);
          }
          __setModuleDefault42(result, mod2);
          return result;
        };
        Object.defineProperty(exports2, "__esModule", { value: true });
        exports2.checkInvalidKeyword = exports2.checkMissingSemicolon = exports2.checkUnknownDirective = void 0;
        var csp = __importStar42(require_csp());
        var csp_1 = require_csp();
        var finding_1 = require_finding();
        function checkUnknownDirective(parsedCsp) {
          const findings = [];
          for (const directive of Object.keys(parsedCsp.directives)) {
            if (csp.isDirective(directive)) {
              continue;
            }
            if (directive.endsWith(":")) {
              findings.push(new finding_1.Finding(finding_1.Type.UNKNOWN_DIRECTIVE, "CSP directives don't end with a colon.", finding_1.Severity.SYNTAX, directive));
            } else {
              findings.push(new finding_1.Finding(finding_1.Type.UNKNOWN_DIRECTIVE, 'Directive "' + directive + '" is not a known CSP directive.', finding_1.Severity.SYNTAX, directive));
            }
          }
          return findings;
        }
        __name(checkUnknownDirective, "checkUnknownDirective");
        exports2.checkUnknownDirective = checkUnknownDirective;
        function checkMissingSemicolon(parsedCsp) {
          const findings = [];
          for (const [directive, directiveValues] of Object.entries(parsedCsp.directives)) {
            if (directiveValues === void 0) {
              continue;
            }
            for (const value of directiveValues) {
              if (csp.isDirective(value)) {
                findings.push(new finding_1.Finding(finding_1.Type.MISSING_SEMICOLON, 'Did you forget the semicolon? "' + value + '" seems to be a directive, not a value.', finding_1.Severity.SYNTAX, directive, value));
              }
            }
          }
          return findings;
        }
        __name(checkMissingSemicolon, "checkMissingSemicolon");
        exports2.checkMissingSemicolon = checkMissingSemicolon;
        function checkInvalidKeyword(parsedCsp) {
          const findings = [];
          const keywordsNoTicks = Object.values(csp_1.Keyword).map((k) => k.replace(/'/g, ""));
          for (const [directive, directiveValues] of Object.entries(parsedCsp.directives)) {
            if (directiveValues === void 0) {
              continue;
            }
            for (const value of directiveValues) {
              if (keywordsNoTicks.some((k) => k === value) || value.startsWith("nonce-") || value.match(/^(sha256|sha384|sha512)-/)) {
                findings.push(new finding_1.Finding(finding_1.Type.INVALID_KEYWORD, 'Did you forget to surround "' + value + '" with single-ticks?', finding_1.Severity.SYNTAX, directive, value));
                continue;
              }
              if (!value.startsWith("'")) {
                continue;
              }
              if (directive === csp.Directive.REQUIRE_TRUSTED_TYPES_FOR) {
                if (value === csp.TrustedTypesSink.SCRIPT) {
                  continue;
                }
              } else if (directive === csp.Directive.TRUSTED_TYPES) {
                if (value === "'allow-duplicates'" || value === "'none'") {
                  continue;
                }
              } else {
                if (csp.isKeyword(value) || csp.isHash(value) || csp.isNonce(value)) {
                  continue;
                }
              }
              findings.push(new finding_1.Finding(finding_1.Type.INVALID_KEYWORD, value + " seems to be an invalid CSP keyword.", finding_1.Severity.SYNTAX, directive, value));
            }
          }
          return findings;
        }
        __name(checkInvalidKeyword, "checkInvalidKeyword");
        exports2.checkInvalidKeyword = checkInvalidKeyword;
      }
    });
    require_angular2 = __commonJS({
      "node_modules/csp_evaluator/dist/allowlist_bypasses/angular.js"(exports2) {
        "use strict";
        init_process_global();
        Object.defineProperty(exports2, "__esModule", { value: true });
        exports2.URLS = void 0;
        exports2.URLS = [
          "//gstatic.com/fsn/angular_js-bundle1.js",
          "//www.gstatic.com/fsn/angular_js-bundle1.js",
          "//www.googleadservices.com/pageadimg/imgad",
          "//yandex.st/angularjs/1.2.16/angular-cookies.min.js",
          "//yastatic.net/angularjs/1.2.23/angular.min.js",
          "//yuedust.yuedu.126.net/js/components/angular/angular.js",
          "//art.jobs.netease.com/script/angular.js",
          "//csu-c45.kxcdn.com/angular/angular.js",
          "//elysiumwebsite.s3.amazonaws.com/uploads/blog-media/rockstar/angular.min.js",
          "//inno.blob.core.windows.net/new/libs/AngularJS/1.2.1/angular.min.js",
          "//gift-talk.kakao.com/public/javascripts/angular.min.js",
          "//ajax.googleapis.com/ajax/libs/angularjs/1.2.0rc1/angular-route.min.js",
          "//master-sumok.ru/vendors/angular/angular-cookies.js",
          "//ayicommon-a.akamaihd.net/static/vendor/angular-1.4.2.min.js",
          "//pangxiehaitao.com/framework/angular-1.3.9/angular-animate.min.js",
          "//cdnjs.cloudflare.com/ajax/libs/angular.js/1.2.16/angular.min.js",
          "//96fe3ee995e96e922b6b-d10c35bd0a0de2c718b252bc575fdb73.ssl.cf1.rackcdn.com/angular.js",
          "//oss.maxcdn.com/angularjs/1.2.20/angular.min.js",
          "//reports.zemanta.com/smedia/common/angularjs/1.2.11/angular.js",
          "//cdn.shopify.com/s/files/1/0225/6463/t/1/assets/angular-animate.min.js",
          "//parademanagement.com.s3-website-ap-southeast-1.amazonaws.com/js/angular.min.js",
          "//cdn.jsdelivr.net/angularjs/1.1.2/angular.min.js",
          "//eb2883ede55c53e09fd5-9c145fb03d93709ea57875d307e2d82e.ssl.cf3.rackcdn.com/components/angular-resource.min.js",
          "//andors-trail.googlecode.com/git/AndorsTrailEdit/lib/angular.min.js",
          "//cdn.walkme.com/General/EnvironmentTests/angular/angular.min.js",
          "//laundrymail.com/angular/angular.js",
          "//s3-eu-west-1.amazonaws.com/staticancpa/js/angular-cookies.min.js",
          "//collade.demo.stswp.com/js/vendor/angular.min.js",
          "//mrfishie.github.io/sailor/bower_components/angular/angular.min.js",
          "//askgithub.com/static/js/angular.min.js",
          "//services.amazon.com/solution-providers/assets/vendor/angular-cookies.min.js",
          "//raw.githubusercontent.com/angular/code.angularjs.org/master/1.0.7/angular-resource.js",
          "//prb-resume.appspot.com/bower_components/angular-animate/angular-animate.js",
          "//dl.dropboxusercontent.com/u/30877786/angular.min.js",
          "//static.tumblr.com/x5qdx0r/nPOnngtff/angular-resource.min_1_.js",
          "//storage.googleapis.com/assets-prod.urbansitter.net/us-sym/assets/vendor/angular-sanitize/angular-sanitize.min.js",
          "//twitter.github.io/labella.js/bower_components/angular/angular.min.js",
          "//cdn2-casinoroom.global.ssl.fastly.net/js/lib/angular-animate.min.js",
          "//www.adobe.com/devnet-apps/flashshowcase/lib/angular/angular.1.1.5.min.js",
          "//eternal-sunset.herokuapp.com/bower_components/angular/angular.js",
          "//cdn.bootcss.com/angular.js/1.2.0/angular.min.js"
        ];
      }
    });
    require_flash = __commonJS({
      "node_modules/csp_evaluator/dist/allowlist_bypasses/flash.js"(exports2) {
        "use strict";
        init_process_global();
        Object.defineProperty(exports2, "__esModule", { value: true });
        exports2.URLS = void 0;
        exports2.URLS = [
          "//vk.com/swf/video.swf",
          "//ajax.googleapis.com/ajax/libs/yui/2.8.0r4/build/charts/assets/charts.swf"
        ];
      }
    });
    require_jsonp = __commonJS({
      "node_modules/csp_evaluator/dist/allowlist_bypasses/jsonp.js"(exports2) {
        "use strict";
        init_process_global();
        Object.defineProperty(exports2, "__esModule", { value: true });
        exports2.URLS = exports2.NEEDS_EVAL = void 0;
        exports2.NEEDS_EVAL = [
          "googletagmanager.com",
          "www.googletagmanager.com",
          "www.googleadservices.com",
          "google-analytics.com",
          "ssl.google-analytics.com",
          "www.google-analytics.com"
        ];
        exports2.URLS = [
          "//bebezoo.1688.com/fragment/index.htm",
          "//www.google-analytics.com/gtm/js",
          "//googleads.g.doubleclick.net/pagead/conversion/1036918760/wcm",
          "//www.googleadservices.com/pagead/conversion/1070110417/wcm",
          "//www.google.com/tools/feedback/escalation-options",
          "//pin.aliyun.com/check_audio",
          "//offer.alibaba.com/market/CID100002954/5/fetchKeyword.do",
          "//ccrprod.alipay.com/ccr/arriveTime.json",
          "//group.aliexpress.com/ajaxAcquireGroupbuyProduct.do",
          "//detector.alicdn.com/2.7.3/index.php",
          "//suggest.taobao.com/sug",
          "//translate.google.com/translate_a/l",
          "//count.tbcdn.cn//counter3",
          "//wb.amap.com/channel.php",
          "//translate.googleapis.com/translate_a/l",
          "//afpeng.alimama.com/ex",
          "//accounts.google.com/o/oauth2/revoke",
          "//pagead2.googlesyndication.com/relatedsearch",
          "//yandex.ru/soft/browsers/check",
          "//api.facebook.com/restserver.php",
          "//mts0.googleapis.com/maps/vt",
          "//syndication.twitter.com/widgets/timelines/765840589183213568",
          "//www.youtube.com/profile_style",
          "//googletagmanager.com/gtm/js",
          "//mc.yandex.ru/watch/24306916/1",
          "//share.yandex.net/counter/gpp/",
          "//ok.go.mail.ru/lady_on_lady_recipes_r.json",
          "//d1f69o4buvlrj5.cloudfront.net/__efa_15_1_ornpba.xekq.arg/optout_check",
          "//www.googletagmanager.com/gtm/js",
          "//api.vk.com/method/wall.get",
          "//www.sharethis.com/get-publisher-info.php",
          "//google.ru/maps/vt",
          "//pro.netrox.sc/oapi/h_checksite.ashx",
          "//vimeo.com/api/oembed.json/",
          "//de.blog.newrelic.com/wp-admin/admin-ajax.php",
          "//ajax.googleapis.com/ajax/services/search/news",
          "//ssl.google-analytics.com/gtm/js",
          "//pubsub.pubnub.com/subscribe/demo/hello_world/",
          "//pass.yandex.ua/services",
          "//id.rambler.ru/script/topline_info.js",
          "//m.addthis.com/live/red_lojson/100eng.json",
          "//passport.ngs.ru/ajax/check",
          "//catalog.api.2gis.ru/ads/search",
          "//gum.criteo.com/sync",
          "//maps.google.com/maps/vt",
          "//ynuf.alipay.com/service/um.json",
          "//securepubads.g.doubleclick.net/gampad/ads",
          "//c.tiles.mapbox.com/v3/texastribune.tx-congress-cvap/6/15/26.grid.json",
          "//rexchange.begun.ru/banners",
          "//an.yandex.ru/page/147484",
          "//links.services.disqus.com/api/ping",
          "//api.map.baidu.com/",
          "//tj.gongchang.com/api/keywordrecomm/",
          "//data.gongchang.com/livegrail/",
          "//ulogin.ru/token.php",
          "//beta.gismeteo.ru/api/informer/layout.js/120x240-3/ru/",
          "//maps.googleapis.com/maps/api/js/GeoPhotoService.GetMetadata",
          "//a.config.skype.com/config/v1/Skype/908_1.33.0.111/SkypePersonalization",
          "//maps.beeline.ru/w",
          "//target.ukr.net/",
          "//www.meteoprog.ua/data/weather/informer/Poltava.js",
          "//cdn.syndication.twimg.com/widgets/timelines/599200054310604802",
          "//wslocker.ru/client/user.chk.php",
          "//community.adobe.com/CommunityPod/getJSON",
          "//maps.google.lv/maps/vt",
          "//dev.virtualearth.net/REST/V1/Imagery/Metadata/AerialWithLabels/26.318581",
          "//awaps.yandex.ru/10/8938/02400400.",
          "//a248.e.akamai.net/h5.hulu.com/h5.mp4",
          "//nominatim.openstreetmap.org/",
          "//plugins.mozilla.org/en-us/plugins_list.json",
          "//h.cackle.me/widget/32153/bootstrap",
          "//graph.facebook.com/1/",
          "//fellowes.ugc.bazaarvoice.com/data/reviews.json",
          "//widgets.pinterest.com/v3/pidgets/boards/ciciwin/hedgehog-squirrel-crafts/pins/",
          "//se.wikipedia.org/w/api.php",
          "//cse.google.com/api/007627024705277327428/cse/r3vs7b0fcli/queries/js",
          "//relap.io/api/v2/similar_pages_jsonp.js",
          "//c1n3.hypercomments.com/stream/subscribe",
          "//maps.google.de/maps/vt",
          "//books.google.com/books",
          "//connect.mail.ru/share_count",
          "//tr.indeed.com/m/newjobs",
          "//www-onepick-opensocial.googleusercontent.com/gadgets/proxy",
          "//www.panoramio.com/map/get_panoramas.php",
          "//client.siteheart.com/streamcli/client",
          "//www.facebook.com/restserver.php",
          "//autocomplete.travelpayouts.com/avia",
          "//www.googleapis.com/freebase/v1/topic/m/0344_",
          "//mts1.googleapis.com/mapslt/ft",
          "//publish.twitter.com/oembed",
          "//fast.wistia.com/embed/medias/o75jtw7654.json",
          "//partner.googleadservices.com/gampad/ads",
          "//pass.yandex.ru/services",
          "//gupiao.baidu.com/stocks/stockbets",
          "//widget.admitad.com/widget/init",
          "//api.instagram.com/v1/tags/partykungen23328/media/recent",
          "//video.media.yql.yahoo.com/v1/video/sapi/streams/063fb76c-6c70-38c5-9bbc-04b7c384de2b",
          "//ib.adnxs.com/jpt",
          "//pass.yandex.com/services",
          "//www.google.de/maps/vt",
          "//clients1.google.com/complete/search",
          "//api.userlike.com/api/chat/slot/proactive/",
          "//www.youku.com/index_cookielist/s/jsonp",
          "//mt1.googleapis.com/mapslt/ft",
          "//api.mixpanel.com/track/",
          "//wpd.b.qq.com/cgi/get_sign.php",
          "//pipes.yahooapis.com/pipes/pipe.run",
          "//gdata.youtube.com/feeds/api/videos/WsJIHN1kNWc",
          "//9.chart.apis.google.com/chart",
          "//cdn.syndication.twitter.com/moments/709229296800440320",
          "//api.flickr.com/services/feeds/photos_friends.gne",
          "//cbks0.googleapis.com/cbk",
          "//www.blogger.com/feeds/5578653387562324002/posts/summary/4427562025302749269",
          "//query.yahooapis.com/v1/public/yql",
          "//kecngantang.blogspot.com/feeds/posts/default/-/Komik",
          "//www.travelpayouts.com/widgets/50f53ce9ada1b54bcc000031.json",
          "//i.cackle.me/widget/32586/bootstrap",
          "//translate.yandex.net/api/v1.5/tr.json/detect",
          "//a.tiles.mapbox.com/v3/zentralmedia.map-n2raeauc.jsonp",
          "//maps.google.ru/maps/vt",
          "//c1n2.hypercomments.com/stream/subscribe",
          "//rec.ydf.yandex.ru/cookie",
          "//cdn.jsdelivr.net"
        ];
      }
    });
    require_utils = __commonJS({
      "node_modules/csp_evaluator/dist/utils.js"(exports2) {
        "use strict";
        init_process_global();
        Object.defineProperty(exports2, "__esModule", { value: true });
        exports2.applyCheckFunktionToDirectives = exports2.matchWildcardUrls = exports2.getHostname = exports2.getSchemeFreeUrl = void 0;
        function getSchemeFreeUrl(url) {
          url = url.replace(/^\w[+\w.-]*:\/\//i, "");
          url = url.replace(/^\/\//, "");
          return url;
        }
        __name(getSchemeFreeUrl, "getSchemeFreeUrl");
        exports2.getSchemeFreeUrl = getSchemeFreeUrl;
        function getHostname(url) {
          const hostname2 = new URL("https://" + getSchemeFreeUrl(url).replace(":*", "").replace("*", "wildcard_placeholder")).hostname.replace("wildcard_placeholder", "*");
          const ipv6Regex2 = /^\[[\d:]+\]/;
          if (getSchemeFreeUrl(url).match(ipv6Regex2) && !hostname2.match(ipv6Regex2)) {
            return "[" + hostname2 + "]";
          }
          return hostname2;
        }
        __name(getHostname, "getHostname");
        exports2.getHostname = getHostname;
        function setScheme(u) {
          if (u.startsWith("//")) {
            return u.replace("//", "https://");
          }
          return u;
        }
        __name(setScheme, "setScheme");
        function matchWildcardUrls(cspUrlString, listOfUrlStrings) {
          const cspUrl = new URL(setScheme(cspUrlString.replace(":*", "").replace("*", "wildcard_placeholder")));
          const listOfUrls = listOfUrlStrings.map((u) => new URL(setScheme(u)));
          const host = cspUrl.hostname.toLowerCase();
          const hostHasWildcard = host.startsWith("wildcard_placeholder.");
          const wildcardFreeHost = host.replace(/^\wildcard_placeholder/i, "");
          const path72 = cspUrl.pathname;
          const hasPath = path72 !== "/";
          for (const url of listOfUrls) {
            const domain = url.hostname;
            if (!domain.endsWith(wildcardFreeHost)) {
              continue;
            }
            if (!hostHasWildcard && host !== domain) {
              continue;
            }
            if (hasPath) {
              if (path72.endsWith("/")) {
                if (!url.pathname.startsWith(path72)) {
                  continue;
                }
              } else {
                if (url.pathname !== path72) {
                  continue;
                }
              }
            }
            return url;
          }
          return null;
        }
        __name(matchWildcardUrls, "matchWildcardUrls");
        exports2.matchWildcardUrls = matchWildcardUrls;
        function applyCheckFunktionToDirectives(parsedCsp, check2) {
          const directiveNames = Object.keys(parsedCsp.directives);
          for (const directive of directiveNames) {
            const directiveValues = parsedCsp.directives[directive];
            if (directiveValues) {
              check2(directive, directiveValues);
            }
          }
        }
        __name(applyCheckFunktionToDirectives, "applyCheckFunktionToDirectives");
        exports2.applyCheckFunktionToDirectives = applyCheckFunktionToDirectives;
      }
    });
    require_security_checks = __commonJS({
      "node_modules/csp_evaluator/dist/checks/security_checks.js"(exports2) {
        "use strict";
        init_process_global();
        var __createBinding42 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) {
          if (k2 === void 0)
            k2 = k;
          Object.defineProperty(o, k2, { enumerable: true, get: /* @__PURE__ */ __name(function() {
            return m[k];
          }, "get") });
        } : function(o, m, k, k2) {
          if (k2 === void 0)
            k2 = k;
          o[k2] = m[k];
        });
        var __setModuleDefault42 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) {
          Object.defineProperty(o, "default", { enumerable: true, value: v });
        } : function(o, v) {
          o["default"] = v;
        });
        var __importStar42 = exports2 && exports2.__importStar || function(mod2) {
          if (mod2 && mod2.__esModule)
            return mod2;
          var result = {};
          if (mod2 != null) {
            for (var k in mod2)
              if (k !== "default" && Object.prototype.hasOwnProperty.call(mod2, k))
                __createBinding42(result, mod2, k);
          }
          __setModuleDefault42(result, mod2);
          return result;
        };
        Object.defineProperty(exports2, "__esModule", { value: true });
        exports2.checkHasConfiguredReporting = exports2.checkSrcHttp = exports2.checkNonceLength = exports2.checkDeprecatedDirective = exports2.checkIpSource = exports2.looksLikeIpAddress = exports2.checkFlashObjectAllowlistBypass = exports2.checkScriptAllowlistBypass = exports2.checkMissingDirectives = exports2.checkMultipleMissingBaseUriDirective = exports2.checkMissingBaseUriDirective = exports2.checkMissingScriptSrcDirective = exports2.checkMissingObjectSrcDirective = exports2.checkWildcards = exports2.checkPlainUrlSchemes = exports2.checkScriptUnsafeEval = exports2.checkScriptUnsafeInline = exports2.URL_SCHEMES_CAUSING_XSS = exports2.DIRECTIVES_CAUSING_XSS = void 0;
        var angular = __importStar42(require_angular2());
        var flash = __importStar42(require_flash());
        var jsonp = __importStar42(require_jsonp());
        var csp = __importStar42(require_csp());
        var csp_1 = require_csp();
        var finding_1 = require_finding();
        var utils2 = __importStar42(require_utils());
        exports2.DIRECTIVES_CAUSING_XSS = [
          csp_1.Directive.SCRIPT_SRC,
          csp_1.Directive.SCRIPT_SRC_ATTR,
          csp_1.Directive.SCRIPT_SRC_ELEM,
          csp_1.Directive.OBJECT_SRC,
          csp_1.Directive.BASE_URI
        ];
        exports2.URL_SCHEMES_CAUSING_XSS = ["data:", "http:", "https:"];
        function checkScriptUnsafeInline(effectiveCsp) {
          const violations = [];
          const directivesToCheck = effectiveCsp.getEffectiveDirectives([
            csp_1.Directive.SCRIPT_SRC,
            csp_1.Directive.SCRIPT_SRC_ATTR,
            csp_1.Directive.SCRIPT_SRC_ELEM
          ]);
          for (const directive of directivesToCheck) {
            const values = effectiveCsp.directives[directive] || [];
            if (values.includes(csp_1.Keyword.UNSAFE_INLINE)) {
              violations.push(new finding_1.Finding(finding_1.Type.SCRIPT_UNSAFE_INLINE, `'unsafe-inline' allows the execution of unsafe in-page scripts and event handlers.`, finding_1.Severity.HIGH, directive, csp_1.Keyword.UNSAFE_INLINE));
            }
            if (values.includes(csp_1.Keyword.UNSAFE_HASHES)) {
              violations.push(new finding_1.Finding(finding_1.Type.SCRIPT_UNSAFE_HASHES, `'unsafe-hashes', while safer than 'unsafe-inline', allows the execution of unsafe in-page scripts and event handlers as long as their hashes appear in the CSP. Please refactor them to no longer use inline scripts if possible.`, finding_1.Severity.MEDIUM_MAYBE, directive, csp_1.Keyword.UNSAFE_HASHES));
            }
          }
          return violations;
        }
        __name(checkScriptUnsafeInline, "checkScriptUnsafeInline");
        exports2.checkScriptUnsafeInline = checkScriptUnsafeInline;
        function checkScriptUnsafeEval(parsedCsp) {
          const violations = [];
          const directivesToCheck = parsedCsp.getEffectiveDirectives([
            csp_1.Directive.SCRIPT_SRC,
            csp_1.Directive.SCRIPT_SRC_ATTR,
            csp_1.Directive.SCRIPT_SRC_ELEM
          ]);
          for (const directive of directivesToCheck) {
            const values = parsedCsp.directives[directive] || [];
            if (values.includes(csp_1.Keyword.UNSAFE_EVAL)) {
              violations.push(new finding_1.Finding(finding_1.Type.SCRIPT_UNSAFE_EVAL, `'unsafe-eval' allows the execution of code injected into DOM APIs such as eval().`, finding_1.Severity.MEDIUM_MAYBE, directive, csp_1.Keyword.UNSAFE_EVAL));
            }
          }
          return violations;
        }
        __name(checkScriptUnsafeEval, "checkScriptUnsafeEval");
        exports2.checkScriptUnsafeEval = checkScriptUnsafeEval;
        function checkPlainUrlSchemes(parsedCsp) {
          const violations = [];
          const directivesToCheck = parsedCsp.getEffectiveDirectives(exports2.DIRECTIVES_CAUSING_XSS);
          for (const directive of directivesToCheck) {
            const values = parsedCsp.directives[directive] || [];
            for (const value of values) {
              if (exports2.URL_SCHEMES_CAUSING_XSS.includes(value)) {
                violations.push(new finding_1.Finding(finding_1.Type.PLAIN_URL_SCHEMES, value + " URI in " + directive + " allows the execution of unsafe scripts.", finding_1.Severity.HIGH, directive, value));
              }
            }
          }
          return violations;
        }
        __name(checkPlainUrlSchemes, "checkPlainUrlSchemes");
        exports2.checkPlainUrlSchemes = checkPlainUrlSchemes;
        function checkWildcards(parsedCsp) {
          const violations = [];
          const directivesToCheck = parsedCsp.getEffectiveDirectives(exports2.DIRECTIVES_CAUSING_XSS);
          for (const directive of directivesToCheck) {
            const values = parsedCsp.directives[directive] || [];
            for (const value of values) {
              const url = utils2.getSchemeFreeUrl(value);
              if (url === "*") {
                violations.push(new finding_1.Finding(finding_1.Type.PLAIN_WILDCARD, directive + ` should not allow '*' as source`, finding_1.Severity.HIGH, directive, value));
                continue;
              }
            }
          }
          return violations;
        }
        __name(checkWildcards, "checkWildcards");
        exports2.checkWildcards = checkWildcards;
        function checkMissingObjectSrcDirective(parsedCsp) {
          let objectRestrictions = [];
          if (csp_1.Directive.OBJECT_SRC in parsedCsp.directives) {
            objectRestrictions = parsedCsp.directives[csp_1.Directive.OBJECT_SRC];
          } else if (csp_1.Directive.DEFAULT_SRC in parsedCsp.directives) {
            objectRestrictions = parsedCsp.directives[csp_1.Directive.DEFAULT_SRC];
          }
          if (objectRestrictions !== void 0 && objectRestrictions.length >= 1) {
            return [];
          }
          return [new finding_1.Finding(finding_1.Type.MISSING_DIRECTIVES, `Missing object-src allows the injection of plugins which can execute JavaScript. Can you set it to 'none'?`, finding_1.Severity.HIGH, csp_1.Directive.OBJECT_SRC)];
        }
        __name(checkMissingObjectSrcDirective, "checkMissingObjectSrcDirective");
        exports2.checkMissingObjectSrcDirective = checkMissingObjectSrcDirective;
        function checkMissingScriptSrcDirective(parsedCsp) {
          if (csp_1.Directive.SCRIPT_SRC in parsedCsp.directives || csp_1.Directive.DEFAULT_SRC in parsedCsp.directives) {
            return [];
          }
          return [new finding_1.Finding(finding_1.Type.MISSING_DIRECTIVES, "script-src directive is missing.", finding_1.Severity.HIGH, csp_1.Directive.SCRIPT_SRC)];
        }
        __name(checkMissingScriptSrcDirective, "checkMissingScriptSrcDirective");
        exports2.checkMissingScriptSrcDirective = checkMissingScriptSrcDirective;
        function checkMissingBaseUriDirective(parsedCsp) {
          return checkMultipleMissingBaseUriDirective([parsedCsp]);
        }
        __name(checkMissingBaseUriDirective, "checkMissingBaseUriDirective");
        exports2.checkMissingBaseUriDirective = checkMissingBaseUriDirective;
        function checkMultipleMissingBaseUriDirective(parsedCsps) {
          const needsBaseUri = /* @__PURE__ */ __name((csp2) => csp2.policyHasScriptNonces() || csp2.policyHasScriptHashes() && csp2.policyHasStrictDynamic(), "needsBaseUri");
          const hasBaseUri = /* @__PURE__ */ __name((csp2) => csp_1.Directive.BASE_URI in csp2.directives, "hasBaseUri");
          if (parsedCsps.some(needsBaseUri) && !parsedCsps.some(hasBaseUri)) {
            const description2 = `Missing base-uri allows the injection of base tags. They can be used to set the base URL for all relative (script) URLs to an attacker controlled domain. Can you set it to 'none' or 'self'?`;
            return [new finding_1.Finding(finding_1.Type.MISSING_DIRECTIVES, description2, finding_1.Severity.HIGH, csp_1.Directive.BASE_URI)];
          }
          return [];
        }
        __name(checkMultipleMissingBaseUriDirective, "checkMultipleMissingBaseUriDirective");
        exports2.checkMultipleMissingBaseUriDirective = checkMultipleMissingBaseUriDirective;
        function checkMissingDirectives(parsedCsp) {
          return [
            ...checkMissingObjectSrcDirective(parsedCsp),
            ...checkMissingScriptSrcDirective(parsedCsp),
            ...checkMissingBaseUriDirective(parsedCsp)
          ];
        }
        __name(checkMissingDirectives, "checkMissingDirectives");
        exports2.checkMissingDirectives = checkMissingDirectives;
        function checkScriptAllowlistBypass(parsedCsp) {
          const violations = [];
          parsedCsp.getEffectiveDirectives([csp_1.Directive.SCRIPT_SRC, csp_1.Directive.SCRIPT_SRC_ELEM]).forEach((effectiveScriptSrcDirective) => {
            const scriptSrcValues = parsedCsp.directives[effectiveScriptSrcDirective] || [];
            if (scriptSrcValues.includes(csp_1.Keyword.NONE)) {
              return;
            }
            for (const value of scriptSrcValues) {
              if (value === csp_1.Keyword.SELF) {
                violations.push(new finding_1.Finding(finding_1.Type.SCRIPT_ALLOWLIST_BYPASS, `'self' can be problematic if you host JSONP, AngularJS or user uploaded files.`, finding_1.Severity.MEDIUM_MAYBE, effectiveScriptSrcDirective, value));
                continue;
              }
              if (value.startsWith("'")) {
                continue;
              }
              if (csp.isUrlScheme(value) || value.indexOf(".") === -1) {
                continue;
              }
              const url = "//" + utils2.getSchemeFreeUrl(value);
              const angularBypass = utils2.matchWildcardUrls(url, angular.URLS);
              let jsonpBypass = utils2.matchWildcardUrls(url, jsonp.URLS);
              if (jsonpBypass) {
                const evalRequired = jsonp.NEEDS_EVAL.includes(jsonpBypass.hostname);
                const evalPresent = scriptSrcValues.includes(csp_1.Keyword.UNSAFE_EVAL);
                if (evalRequired && !evalPresent) {
                  jsonpBypass = null;
                }
              }
              if (jsonpBypass || angularBypass) {
                let bypassDomain = "";
                let bypassTxt = "";
                if (jsonpBypass) {
                  bypassDomain = jsonpBypass.hostname;
                  bypassTxt = " JSONP endpoints";
                }
                if (angularBypass) {
                  bypassDomain = angularBypass.hostname;
                  bypassTxt += bypassTxt.trim() === "" ? "" : " and";
                  bypassTxt += " Angular libraries";
                }
                violations.push(new finding_1.Finding(finding_1.Type.SCRIPT_ALLOWLIST_BYPASS, bypassDomain + " is known to host" + bypassTxt + " which allow to bypass this CSP.", finding_1.Severity.HIGH, effectiveScriptSrcDirective, value));
              } else {
                violations.push(new finding_1.Finding(finding_1.Type.SCRIPT_ALLOWLIST_BYPASS, `No bypass found; make sure that this URL doesn't serve JSONP replies or Angular libraries.`, finding_1.Severity.MEDIUM_MAYBE, effectiveScriptSrcDirective, value));
              }
            }
          });
          return violations;
        }
        __name(checkScriptAllowlistBypass, "checkScriptAllowlistBypass");
        exports2.checkScriptAllowlistBypass = checkScriptAllowlistBypass;
        function checkFlashObjectAllowlistBypass(parsedCsp) {
          const violations = [];
          const effectiveObjectSrcDirective = parsedCsp.getEffectiveDirective(csp_1.Directive.OBJECT_SRC);
          const objectSrcValues = parsedCsp.directives[effectiveObjectSrcDirective] || [];
          const pluginTypes = parsedCsp.directives[csp_1.Directive.PLUGIN_TYPES];
          if (pluginTypes && !pluginTypes.includes("application/x-shockwave-flash")) {
            return [];
          }
          for (const value of objectSrcValues) {
            if (value === csp_1.Keyword.NONE) {
              return [];
            }
            const url = "//" + utils2.getSchemeFreeUrl(value);
            const flashBypass = utils2.matchWildcardUrls(url, flash.URLS);
            if (flashBypass) {
              violations.push(new finding_1.Finding(finding_1.Type.OBJECT_ALLOWLIST_BYPASS, flashBypass.hostname + " is known to host Flash files which allow to bypass this CSP.", finding_1.Severity.HIGH, effectiveObjectSrcDirective, value));
            } else if (effectiveObjectSrcDirective === csp_1.Directive.OBJECT_SRC) {
              violations.push(new finding_1.Finding(finding_1.Type.OBJECT_ALLOWLIST_BYPASS, `Can you restrict object-src to 'none' only?`, finding_1.Severity.MEDIUM_MAYBE, effectiveObjectSrcDirective, value));
            }
          }
          return violations;
        }
        __name(checkFlashObjectAllowlistBypass, "checkFlashObjectAllowlistBypass");
        exports2.checkFlashObjectAllowlistBypass = checkFlashObjectAllowlistBypass;
        function looksLikeIpAddress(maybeIp) {
          if (maybeIp.startsWith("[") && maybeIp.endsWith("]")) {
            return true;
          }
          if (/^[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}$/.test(maybeIp)) {
            return true;
          }
          return false;
        }
        __name(looksLikeIpAddress, "looksLikeIpAddress");
        exports2.looksLikeIpAddress = looksLikeIpAddress;
        function checkIpSource(parsedCsp) {
          const violations = [];
          const checkIp = /* @__PURE__ */ __name((directive, directiveValues) => {
            for (const value of directiveValues) {
              const host = utils2.getHostname(value);
              if (looksLikeIpAddress(host)) {
                if (host === "127.0.0.1") {
                  violations.push(new finding_1.Finding(finding_1.Type.IP_SOURCE, directive + " directive allows localhost as source. Please make sure to remove this in production environments.", finding_1.Severity.INFO, directive, value));
                } else {
                  violations.push(new finding_1.Finding(finding_1.Type.IP_SOURCE, directive + " directive has an IP-Address as source: " + host + " (will be ignored by browsers!). ", finding_1.Severity.INFO, directive, value));
                }
              }
            }
          }, "checkIp");
          utils2.applyCheckFunktionToDirectives(parsedCsp, checkIp);
          return violations;
        }
        __name(checkIpSource, "checkIpSource");
        exports2.checkIpSource = checkIpSource;
        function checkDeprecatedDirective(parsedCsp) {
          const violations = [];
          if (csp_1.Directive.REFLECTED_XSS in parsedCsp.directives) {
            violations.push(new finding_1.Finding(finding_1.Type.DEPRECATED_DIRECTIVE, "reflected-xss is deprecated since CSP2. Please, use the X-XSS-Protection header instead.", finding_1.Severity.INFO, csp_1.Directive.REFLECTED_XSS));
          }
          if (csp_1.Directive.REFERRER in parsedCsp.directives) {
            violations.push(new finding_1.Finding(finding_1.Type.DEPRECATED_DIRECTIVE, "referrer is deprecated since CSP2. Please, use the Referrer-Policy header instead.", finding_1.Severity.INFO, csp_1.Directive.REFERRER));
          }
          if (csp_1.Directive.DISOWN_OPENER in parsedCsp.directives) {
            violations.push(new finding_1.Finding(finding_1.Type.DEPRECATED_DIRECTIVE, "disown-opener is deprecated since CSP3. Please, use the Cross Origin Opener Policy header instead.", finding_1.Severity.INFO, csp_1.Directive.DISOWN_OPENER));
          }
          if (csp_1.Directive.PREFETCH_SRC in parsedCsp.directives) {
            violations.push(new finding_1.Finding(finding_1.Type.DEPRECATED_DIRECTIVE, "prefetch-src is deprecated since CSP3. Be aware that this feature may cease to work at any time.", finding_1.Severity.INFO, csp_1.Directive.PREFETCH_SRC));
          }
          return violations;
        }
        __name(checkDeprecatedDirective, "checkDeprecatedDirective");
        exports2.checkDeprecatedDirective = checkDeprecatedDirective;
        function checkNonceLength(parsedCsp) {
          const noncePattern = new RegExp("^'nonce-(.+)'$");
          const violations = [];
          utils2.applyCheckFunktionToDirectives(parsedCsp, (directive, directiveValues) => {
            for (const value of directiveValues) {
              const match = value.match(noncePattern);
              if (!match) {
                continue;
              }
              const nonceValue = match[1];
              if (nonceValue.length < 8) {
                violations.push(new finding_1.Finding(finding_1.Type.NONCE_LENGTH, "Nonces should be at least 8 characters long.", finding_1.Severity.MEDIUM, directive, value));
              }
              if (!csp.isNonce(value, true)) {
                violations.push(new finding_1.Finding(finding_1.Type.NONCE_CHARSET, "Nonces should only use the base64 charset.", finding_1.Severity.INFO, directive, value));
              }
            }
          });
          return violations;
        }
        __name(checkNonceLength, "checkNonceLength");
        exports2.checkNonceLength = checkNonceLength;
        function checkSrcHttp(parsedCsp) {
          const violations = [];
          utils2.applyCheckFunktionToDirectives(parsedCsp, (directive, directiveValues) => {
            for (const value of directiveValues) {
              const description2 = directive === csp_1.Directive.REPORT_URI ? "Use HTTPS to send violation reports securely." : "Allow only resources downloaded over HTTPS.";
              if (value.startsWith("http://")) {
                violations.push(new finding_1.Finding(finding_1.Type.SRC_HTTP, description2, finding_1.Severity.MEDIUM, directive, value));
              }
            }
          });
          return violations;
        }
        __name(checkSrcHttp, "checkSrcHttp");
        exports2.checkSrcHttp = checkSrcHttp;
        function checkHasConfiguredReporting(parsedCsp) {
          const reportUriValues = parsedCsp.directives[csp_1.Directive.REPORT_URI] || [];
          if (reportUriValues.length > 0) {
            return [];
          }
          const reportToValues = parsedCsp.directives[csp_1.Directive.REPORT_TO] || [];
          if (reportToValues.length > 0) {
            return [new finding_1.Finding(finding_1.Type.REPORT_TO_ONLY, `This CSP policy only provides a reporting destination via the 'report-to' directive. This directive is only supported in Chromium-based browsers so it is recommended to also use a 'report-uri' directive.`, finding_1.Severity.INFO, csp_1.Directive.REPORT_TO)];
          }
          return [new finding_1.Finding(finding_1.Type.REPORTING_DESTINATION_MISSING, "This CSP policy does not configure a reporting destination. This makes it difficult to maintain the CSP policy over time and monitor for any breakages.", finding_1.Severity.INFO, csp_1.Directive.REPORT_URI)];
        }
        __name(checkHasConfiguredReporting, "checkHasConfiguredReporting");
        exports2.checkHasConfiguredReporting = checkHasConfiguredReporting;
      }
    });
    require_strictcsp_checks = __commonJS({
      "node_modules/csp_evaluator/dist/checks/strictcsp_checks.js"(exports2) {
        "use strict";
        init_process_global();
        var __createBinding42 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) {
          if (k2 === void 0)
            k2 = k;
          Object.defineProperty(o, k2, { enumerable: true, get: /* @__PURE__ */ __name(function() {
            return m[k];
          }, "get") });
        } : function(o, m, k, k2) {
          if (k2 === void 0)
            k2 = k;
          o[k2] = m[k];
        });
        var __setModuleDefault42 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) {
          Object.defineProperty(o, "default", { enumerable: true, value: v });
        } : function(o, v) {
          o["default"] = v;
        });
        var __importStar42 = exports2 && exports2.__importStar || function(mod2) {
          if (mod2 && mod2.__esModule)
            return mod2;
          var result = {};
          if (mod2 != null) {
            for (var k in mod2)
              if (k !== "default" && Object.prototype.hasOwnProperty.call(mod2, k))
                __createBinding42(result, mod2, k);
          }
          __setModuleDefault42(result, mod2);
          return result;
        };
        Object.defineProperty(exports2, "__esModule", { value: true });
        exports2.checkRequiresTrustedTypesForScripts = exports2.checkAllowlistFallback = exports2.checkUnsafeInlineFallback = exports2.checkStrictDynamicNotStandalone = exports2.checkStrictDynamic = void 0;
        var csp = __importStar42(require_csp());
        var csp_1 = require_csp();
        var finding_1 = require_finding();
        function checkStrictDynamic(parsedCsp) {
          const directiveName = parsedCsp.getEffectiveDirective(csp.Directive.SCRIPT_SRC);
          const values = parsedCsp.directives[directiveName] || [];
          const schemeOrHostPresent = values.some((v) => !v.startsWith("'"));
          if (schemeOrHostPresent && !values.includes(csp_1.Keyword.STRICT_DYNAMIC)) {
            return [new finding_1.Finding(finding_1.Type.STRICT_DYNAMIC, "Host allowlists can frequently be bypassed. Consider using 'strict-dynamic' in combination with CSP nonces or hashes.", finding_1.Severity.STRICT_CSP, directiveName)];
          }
          return [];
        }
        __name(checkStrictDynamic, "checkStrictDynamic");
        exports2.checkStrictDynamic = checkStrictDynamic;
        function checkStrictDynamicNotStandalone(parsedCsp) {
          const directiveName = parsedCsp.getEffectiveDirective(csp.Directive.SCRIPT_SRC);
          const values = parsedCsp.directives[directiveName] || [];
          if (values.includes(csp_1.Keyword.STRICT_DYNAMIC) && (!parsedCsp.policyHasScriptNonces() && !parsedCsp.policyHasScriptHashes())) {
            return [new finding_1.Finding(finding_1.Type.STRICT_DYNAMIC_NOT_STANDALONE, "'strict-dynamic' without a CSP nonce/hash will block all scripts.", finding_1.Severity.INFO, directiveName)];
          }
          return [];
        }
        __name(checkStrictDynamicNotStandalone, "checkStrictDynamicNotStandalone");
        exports2.checkStrictDynamicNotStandalone = checkStrictDynamicNotStandalone;
        function checkUnsafeInlineFallback(parsedCsp) {
          if (!parsedCsp.policyHasScriptNonces() && !parsedCsp.policyHasScriptHashes()) {
            return [];
          }
          const directiveName = parsedCsp.getEffectiveDirective(csp.Directive.SCRIPT_SRC);
          const values = parsedCsp.directives[directiveName] || [];
          if (!values.includes(csp_1.Keyword.UNSAFE_INLINE)) {
            return [new finding_1.Finding(finding_1.Type.UNSAFE_INLINE_FALLBACK, "Consider adding 'unsafe-inline' (ignored by browsers supporting nonces/hashes) to be backward compatible with older browsers.", finding_1.Severity.STRICT_CSP, directiveName)];
          }
          return [];
        }
        __name(checkUnsafeInlineFallback, "checkUnsafeInlineFallback");
        exports2.checkUnsafeInlineFallback = checkUnsafeInlineFallback;
        function checkAllowlistFallback(parsedCsp) {
          const directiveName = parsedCsp.getEffectiveDirective(csp.Directive.SCRIPT_SRC);
          const values = parsedCsp.directives[directiveName] || [];
          if (!values.includes(csp_1.Keyword.STRICT_DYNAMIC)) {
            return [];
          }
          if (!values.some((v) => ["http:", "https:", "*"].includes(v) || v.includes("."))) {
            return [new finding_1.Finding(finding_1.Type.ALLOWLIST_FALLBACK, "Consider adding https: and http: url schemes (ignored by browsers supporting 'strict-dynamic') to be backward compatible with older browsers.", finding_1.Severity.STRICT_CSP, directiveName)];
          }
          return [];
        }
        __name(checkAllowlistFallback, "checkAllowlistFallback");
        exports2.checkAllowlistFallback = checkAllowlistFallback;
        function checkRequiresTrustedTypesForScripts(parsedCsp) {
          const directiveName = parsedCsp.getEffectiveDirective(csp.Directive.REQUIRE_TRUSTED_TYPES_FOR);
          const values = parsedCsp.directives[directiveName] || [];
          if (!values.includes(csp.TrustedTypesSink.SCRIPT)) {
            return [new finding_1.Finding(finding_1.Type.REQUIRE_TRUSTED_TYPES_FOR_SCRIPTS, `Consider requiring Trusted Types for scripts to lock down DOM XSS injection sinks. You can do this by adding "require-trusted-types-for 'script'" to your policy.`, finding_1.Severity.INFO, csp.Directive.REQUIRE_TRUSTED_TYPES_FOR)];
          }
          return [];
        }
        __name(checkRequiresTrustedTypesForScripts, "checkRequiresTrustedTypesForScripts");
        exports2.checkRequiresTrustedTypesForScripts = checkRequiresTrustedTypesForScripts;
      }
    });
    require_lighthouse_checks = __commonJS({
      "node_modules/csp_evaluator/dist/lighthouse/lighthouse_checks.js"(exports2) {
        "use strict";
        init_process_global();
        Object.defineProperty(exports2, "__esModule", { value: true });
        exports2.evaluateForSyntaxErrors = exports2.evaluateForWarnings = exports2.evaluateForFailure = void 0;
        var parser_checks_1 = require_parser_checks();
        var security_checks_1 = require_security_checks();
        var strictcsp_checks_1 = require_strictcsp_checks();
        var csp_1 = require_csp();
        function arrayContains(arr, elem) {
          return arr.some((e) => e.equals(elem));
        }
        __name(arrayContains, "arrayContains");
        function setIntersection(sets) {
          const intersection2 = [];
          if (sets.length === 0) {
            return intersection2;
          }
          const firstSet = sets[0];
          for (const elem of firstSet) {
            if (sets.every((set) => arrayContains(set, elem))) {
              intersection2.push(elem);
            }
          }
          return intersection2;
        }
        __name(setIntersection, "setIntersection");
        function setUnion2(sets) {
          const union2 = [];
          for (const set of sets) {
            for (const elem of set) {
              if (!arrayContains(union2, elem)) {
                union2.push(elem);
              }
            }
          }
          return union2;
        }
        __name(setUnion2, "setUnion");
        function atLeastOnePasses(parsedCsps, checker) {
          const findings = [];
          for (const parsedCsp of parsedCsps) {
            findings.push(checker(parsedCsp));
          }
          return setIntersection(findings);
        }
        __name(atLeastOnePasses, "atLeastOnePasses");
        function atLeastOneFails(parsedCsps, checker) {
          const findings = [];
          for (const parsedCsp of parsedCsps) {
            findings.push(checker(parsedCsp));
          }
          return setUnion2(findings);
        }
        __name(atLeastOneFails, "atLeastOneFails");
        function evaluateForFailure2(parsedCsps) {
          const targetsXssFindings = [
            ...atLeastOnePasses(parsedCsps, security_checks_1.checkMissingScriptSrcDirective),
            ...atLeastOnePasses(parsedCsps, security_checks_1.checkMissingObjectSrcDirective),
            ...security_checks_1.checkMultipleMissingBaseUriDirective(parsedCsps)
          ];
          const effectiveCsps = parsedCsps.map((csp) => csp.getEffectiveCsp(csp_1.Version.CSP3));
          const effectiveCspsWithScript = effectiveCsps.filter((csp) => {
            const directiveName = csp.getEffectiveDirective(csp_1.Directive.SCRIPT_SRC);
            return csp.directives[directiveName];
          });
          const robust = [
            ...atLeastOnePasses(effectiveCspsWithScript, strictcsp_checks_1.checkStrictDynamic),
            ...atLeastOnePasses(effectiveCspsWithScript, security_checks_1.checkScriptUnsafeInline),
            ...atLeastOnePasses(effectiveCsps, security_checks_1.checkWildcards),
            ...atLeastOnePasses(effectiveCsps, security_checks_1.checkPlainUrlSchemes)
          ];
          return [...targetsXssFindings, ...robust];
        }
        __name(evaluateForFailure2, "evaluateForFailure");
        exports2.evaluateForFailure = evaluateForFailure2;
        function evaluateForWarnings2(parsedCsps) {
          return [
            ...atLeastOneFails(parsedCsps, strictcsp_checks_1.checkUnsafeInlineFallback),
            ...atLeastOneFails(parsedCsps, strictcsp_checks_1.checkAllowlistFallback)
          ];
        }
        __name(evaluateForWarnings2, "evaluateForWarnings");
        exports2.evaluateForWarnings = evaluateForWarnings2;
        function evaluateForSyntaxErrors2(parsedCsps) {
          const allFindings = [];
          for (const csp of parsedCsps) {
            const findings = [
              ...security_checks_1.checkNonceLength(csp),
              ...parser_checks_1.checkUnknownDirective(csp),
              ...security_checks_1.checkDeprecatedDirective(csp),
              ...parser_checks_1.checkMissingSemicolon(csp),
              ...parser_checks_1.checkInvalidKeyword(csp)
            ];
            allFindings.push(findings);
          }
          return allFindings;
        }
        __name(evaluateForSyntaxErrors2, "evaluateForSyntaxErrors");
        exports2.evaluateForSyntaxErrors = evaluateForSyntaxErrors2;
      }
    });
    require_parser2 = __commonJS({
      "node_modules/csp_evaluator/dist/parser.js"(exports2) {
        "use strict";
        init_process_global();
        var __createBinding42 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) {
          if (k2 === void 0)
            k2 = k;
          Object.defineProperty(o, k2, { enumerable: true, get: /* @__PURE__ */ __name(function() {
            return m[k];
          }, "get") });
        } : function(o, m, k, k2) {
          if (k2 === void 0)
            k2 = k;
          o[k2] = m[k];
        });
        var __setModuleDefault42 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) {
          Object.defineProperty(o, "default", { enumerable: true, value: v });
        } : function(o, v) {
          o["default"] = v;
        });
        var __importStar42 = exports2 && exports2.__importStar || function(mod2) {
          if (mod2 && mod2.__esModule)
            return mod2;
          var result = {};
          if (mod2 != null) {
            for (var k in mod2)
              if (k !== "default" && Object.prototype.hasOwnProperty.call(mod2, k))
                __createBinding42(result, mod2, k);
          }
          __setModuleDefault42(result, mod2);
          return result;
        };
        Object.defineProperty(exports2, "__esModule", { value: true });
        exports2.TEST_ONLY = exports2.CspParser = void 0;
        var csp = __importStar42(require_csp());
        var CspParser2 = class {
          static {
            __name(this, "CspParser");
          }
          constructor(unparsedCsp) {
            this.csp = new csp.Csp();
            this.parse(unparsedCsp);
          }
          parse(unparsedCsp) {
            this.csp = new csp.Csp();
            const directiveTokens = unparsedCsp.split(";");
            for (let i = 0; i < directiveTokens.length; i++) {
              const directiveToken = directiveTokens[i].trim();
              const directiveParts = directiveToken.match(/\S+/g);
              if (Array.isArray(directiveParts)) {
                const directiveName = directiveParts[0].toLowerCase();
                if (directiveName in this.csp.directives) {
                  continue;
                }
                if (!csp.isDirective(directiveName)) {
                }
                const directiveValues = [];
                for (let directiveValue, j = 1; directiveValue = directiveParts[j]; j++) {
                  directiveValue = normalizeDirectiveValue(directiveValue);
                  if (!directiveValues.includes(directiveValue)) {
                    directiveValues.push(directiveValue);
                  }
                }
                this.csp.directives[directiveName] = directiveValues;
              }
            }
            return this.csp;
          }
        };
        exports2.CspParser = CspParser2;
        function normalizeDirectiveValue(directiveValue) {
          directiveValue = directiveValue.trim();
          const directiveValueLower = directiveValue.toLowerCase();
          if (csp.isKeyword(directiveValueLower) || csp.isUrlScheme(directiveValue)) {
            return directiveValueLower;
          }
          return directiveValue;
        }
        __name(normalizeDirectiveValue, "normalizeDirectiveValue");
        exports2.TEST_ONLY = { normalizeDirectiveValue };
      }
    });
    init_csp_evaluator = __esm2({
      "core/lib/csp-evaluator.js"() {
        "use strict";
        init_process_global();
        import_lighthouse_checks = __toESM(require_lighthouse_checks(), 1);
        import_finding = __toESM(require_finding(), 1);
        import_parser = __toESM(require_parser2(), 1);
        import_csp = __toESM(require_csp(), 1);
        init_lighthouse_logger();
        init_i18n();
        init_format();
        UIStrings88 = {
          /** Message shown when a CSP does not have a base-uri directive. Shown in a table with a list of other CSP vulnerabilities and suggestions. "CSP" stands for "Content Security Policy". "base-uri", "'none'", and "'self'" do not need to be translated. */
          missingBaseUri: "Missing `base-uri` allows injected `<base>` tags to set the base URL for all relative URLs (e.g. scripts) to an attacker controlled domain. Consider setting `base-uri` to `'none'` or `'self'`.",
          /** Message shown when a CSP does not have a script-src directive. Shown in a table with a list of other CSP vulnerabilities and suggestions. "CSP" stands for "Content Security Policy". "script-src" does not need to be translated. */
          missingScriptSrc: "`script-src` directive is missing. This can allow the execution of unsafe scripts.",
          /** Message shown when a CSP does not have a script-src directive. Shown in a table with a list of other CSP vulnerabilities and suggestions. "CSP" stands for "Content Security Policy". "object-src" and "'none'" do not need to be translated. */
          missingObjectSrc: "Missing `object-src` allows the injection of plugins that execute unsafe scripts. Consider setting `object-src` to `'none'` if you can.",
          /** Message shown when a CSP uses a domain allowlist to filter out malicious scripts. Shown in a table with a list of other CSP vulnerabilities and suggestions. "CSP" stands for "Content Security Policy". "CSP", "'strict-dynamic'", "nonces", and "hashes" do not need to be translated. "allowlists" can be interpreted as "whitelist". */
          strictDynamic: "Host allowlists can frequently be bypassed. Consider using CSP nonces or hashes instead, along with `'strict-dynamic'` if necessary.",
          /** Message shown when a CSP allows inline scripts to be run in the page. Shown in a table with a list of other CSP vulnerabilities and suggestions. "CSP" stands for "Content Security Policy". "CSP", "'unsafe-inline'", "nonces", and "hashes" do not need to be translated. */
          unsafeInline: "`'unsafe-inline'` allows the execution of unsafe in-page scripts and event handlers. Consider using CSP nonces or hashes to allow scripts individually.",
          /** Message shown when a CSP is not backwards compatible with browsers that do not support CSP nonces/hashes. Shown in a table with a list of other CSP vulnerabilities and suggestions. "CSP" stands for "Content Security Policy". "'unsafe-inline'", "nonces", and "hashes" do not need to be translated. */
          unsafeInlineFallback: "Consider adding `'unsafe-inline'` (ignored by browsers supporting nonces/hashes) to be backward compatible with older browsers.",
          /** Message shown when a CSP is not backwards compatible with browsers that do not support the 'strict-dynamic' keyword. Shown in a table with a list of other CSP vulnerabilities and suggestions. "CSP" stands for "Content Security Policy". "http:", "https:", and "'strict-dynamic'" do not need to be translated. */
          allowlistFallback: "Consider adding https: and http: URL schemes (ignored by browsers supporting `'strict-dynamic'`) to be backward compatible with older browsers.",
          /** Message shown when a CSP only provides a reporting destination through the report-to directive. Shown in a table with a list of other CSP vulnerabilities and suggestions. "CSP" stands for "Content Security Policy". "report-to", "report-uri", and "Chromium" do not need to be translated. */
          reportToOnly: "The reporting destination is only configured via the report-to directive. This directive is only supported in Chromium-based browsers so it is recommended to also use a `report-uri` directive.",
          /** Message shown when a CSP does not provide a reporting destination. Shown in a table with a list of other CSP vulnerabilities and suggestions. "CSP" stands for "Content Security Policy". "CSP" does not need to be translated. */
          reportingDestinationMissing: "No CSP configures a reporting destination. This makes it difficult to maintain the CSP over time and monitor for any breakages.",
          /** Message shown when a CSP nonce has less than 8 characters. Shown in a table with a list of other CSP vulnerabilities and suggestions. "CSP" stands for "Content Security Policy". "Nonces" does not need to be translated. */
          nonceLength: "Nonces should be at least 8 characters long.",
          /** Message shown when a CSP nonce does not use teh base64 charset. Shown in a table with a list of other CSP vulnerabilities and suggestions. "CSP" stands for "Content Security Policy". "Nonces" and "base84" do not need to be translated. "charset" can be interpreted as "a set of characters". */
          nonceCharset: "Nonces should use the base64 charset.",
          /**
           * @description Message shown when a CSP is missing a semicolon. Shown in a table with a list of other CSP vulnerabilities and suggestions. "CSP" stands for "Content Security Policy".
           * @example {'object-src'} keyword
           */
          missingSemicolon: "Did you forget the semicolon? {keyword} seems to be a directive, not a keyword.",
          /** Message shown when a CSP contains an unknown keyword. Shown in a table with a list of other CSP vulnerabilities and suggestions. "CSP" stands for "Content Security Policy". "CSP" does not need to be translated. */
          unknownDirective: "Unknown CSP directive.",
          /**
           * @description Message shown when a CSP contains an invalid keyword. Shown in a table with a list of other CSP vulnerabilities and suggestions. "CSP" stands for "Content Security Policy".
           * @example {'invalid-keyword'} keyword
           */
          unknownKeyword: "{keyword} seems to be an invalid keyword.",
          /** Message shown when a CSP uses the deprecated reflected-xss directive. Shown in a table with a list of other CSP vulnerabilities and suggestions. "CSP" stands for "Content Security Policy". "reflected-xss", "CSP2" and "X-XSS-Protection" do not need to be translated. */
          deprecatedReflectedXSS: "`reflected-xss` is deprecated since CSP2. Please, use the X-XSS-Protection header instead.",
          /** Message shown when a CSP uses the deprecated referrer directive. Shown in a table with a list of other CSP vulnerabilities and suggestions. "CSP" stands for "Content Security Policy". "referrer", "CSP2" and "Referrer-Policy" do not need to be translated. */
          deprecatedReferrer: "`referrer` is deprecated since CSP2. Please, use the Referrer-Policy header instead.",
          /** Message shown when a CSP uses the deprecated disown-opener directive. Shown in a table with a list of other CSP vulnerabilities and suggestions. "CSP" stands for "Content Security Policy". "disown-opener", "CSP3" and "Cross-Origin-Opener-Policy" do not need to be translated. */
          deprecatedDisownOpener: "`disown-opener` is deprecated since CSP3. Please, use the Cross-Origin-Opener-Policy header instead.",
          /**
           * @description Message shown when a CSP wildcard allows unsafe scripts to be run in the page. Shown in a table with a list of other CSP vulnerabilities and suggestions. "CSP" stands for "Content Security Policy".
           *  @example {*} keyword
           */
          plainWildcards: "Avoid using plain wildcards ({keyword}) in this directive. Plain wildcards allow scripts to be sourced from an unsafe domain.",
          /**
           * @description Message shown when a CSP URL scheme allows unsafe scripts to be run in the page. Shown in a table with a list of other CSP vulnerabilities and suggestions. "CSP" stands for "Content Security Policy".
           *  @example {https:} keyword
           */
          plainUrlScheme: "Avoid using plain URL schemes ({keyword}) in this directive. Plain URL schemes allow scripts to be sourced from an unsafe domain."
        };
        str_69 = createIcuMessageFn({ url: "core/lib/csp-evaluator.js" }.url, UIStrings88);
        FINDING_TO_UI_STRING = {
          [import_finding.Type.MISSING_SEMICOLON]: UIStrings88.missingSemicolon,
          [import_finding.Type.UNKNOWN_DIRECTIVE]: str_69(UIStrings88.unknownDirective),
          [import_finding.Type.INVALID_KEYWORD]: UIStrings88.unknownKeyword,
          [import_finding.Type.MISSING_DIRECTIVES]: {
            [import_csp.Directive.BASE_URI]: str_69(UIStrings88.missingBaseUri),
            [import_csp.Directive.SCRIPT_SRC]: str_69(UIStrings88.missingScriptSrc),
            [import_csp.Directive.OBJECT_SRC]: str_69(UIStrings88.missingObjectSrc)
          },
          [import_finding.Type.SCRIPT_UNSAFE_INLINE]: str_69(UIStrings88.unsafeInline),
          [import_finding.Type.PLAIN_WILDCARD]: UIStrings88.plainWildcards,
          [import_finding.Type.PLAIN_URL_SCHEMES]: UIStrings88.plainUrlScheme,
          [import_finding.Type.NONCE_LENGTH]: str_69(UIStrings88.nonceLength),
          [import_finding.Type.NONCE_CHARSET]: str_69(UIStrings88.nonceCharset),
          [import_finding.Type.DEPRECATED_DIRECTIVE]: {
            [import_csp.Directive.REFLECTED_XSS]: str_69(UIStrings88.deprecatedReflectedXSS),
            [import_csp.Directive.REFERRER]: str_69(UIStrings88.deprecatedReferrer),
            [import_csp.Directive.DISOWN_OPENER]: str_69(UIStrings88.deprecatedDisownOpener)
          },
          [import_finding.Type.STRICT_DYNAMIC]: str_69(UIStrings88.strictDynamic),
          [import_finding.Type.UNSAFE_INLINE_FALLBACK]: str_69(UIStrings88.unsafeInlineFallback),
          [import_finding.Type.ALLOWLIST_FALLBACK]: str_69(UIStrings88.allowlistFallback),
          [import_finding.Type.REPORTING_DESTINATION_MISSING]: str_69(UIStrings88.reportingDestinationMissing),
          [import_finding.Type.REPORT_TO_ONLY]: str_69(UIStrings88.reportToOnly)
        };
        __name(getTranslatedDescription, "getTranslatedDescription");
        __name(parseCsp, "parseCsp");
        __name(evaluateRawCspsForXss, "evaluateRawCspsForXss");
      }
    });
    csp_xss_exports = {};
    __export2(csp_xss_exports, {
      UIStrings: () => UIStrings89,
      default: () => csp_xss_default
    });
    init_csp_xss = __esm2({
      "core/audits/csp-xss.js"() {
        "use strict";
        init_process_global();
        init_audit();
        init_main_resource();
        init_i18n();
        init_csp_evaluator();
        UIStrings89 = {
          /** Title of a Lighthouse audit that evaluates the security of a page's CSP. "CSP" stands for "Content Security Policy". "XSS" stands for "Cross Site Scripting". "CSP" and "XSS" do not need to be translated. */
          title: "Ensure CSP is effective against XSS attacks",
          /** Description of a Lighthouse audit that evaluates the security of a page's CSP. This is displayed after a user expands the section to see more. No character length limits. The last sentence starting with 'Learn' becomes link text to additional documentation. "CSP" stands for "Content Security Policy". "XSS" stands for "Cross Site Scripting". "CSP" and "XSS" do not need to be translated. */
          description: "A strong Content Security Policy (CSP) significantly reduces the risk of cross-site scripting (XSS) attacks. [Learn how to use a CSP to prevent XSS](https://developer.chrome.com/docs/lighthouse/best-practices/csp-xss/)",
          /** Summary text for the results of a Lighthouse audit that evaluates the security of a page's CSP. This is displayed if no CSP is being enforced. "CSP" stands for "Content Security Policy". "CSP" does not need to be translated. */
          noCsp: "No CSP found in enforcement mode",
          /** Message shown when one or more CSPs are defined in a <meta> tag. Shown in a table with a list of other CSP bypasses and warnings. "CSP" stands for "Content Security Policy". "CSP" and "HTTP" do not need to be translated. */
          metaTagMessage: "The page contains a CSP defined in a `<meta>` tag. Consider moving the CSP to an HTTP header or defining another strict CSP in an HTTP header.",
          /** Label for a column in a data table; entries will be a directive of a CSP. "CSP" stands for "Content Security Policy". */
          columnDirective: "Directive",
          /** Label for a column in a data table; entries will be the severity of an issue with the CSP. "CSP" stands for "Content Security Policy". */
          columnSeverity: "Severity",
          /** Table item value calling out the presence of a syntax error. */
          itemSeveritySyntax: "Syntax"
        };
        str_70 = createIcuMessageFn({ url: "core/audits/csp-xss.js" }.url, UIStrings89);
        CspXss = class extends Audit {
          static {
            __name(this, "CspXss");
          }
          /**
           * @return {LH.Audit.Meta}
           */
          static get meta() {
            return {
              id: "csp-xss",
              scoreDisplayMode: Audit.SCORING_MODES.INFORMATIVE,
              title: str_70(UIStrings89.title),
              description: str_70(UIStrings89.description),
              requiredArtifacts: ["DevtoolsLog", "MetaElements", "URL"]
            };
          }
          /**
           * @param {LH.Artifacts} artifacts
           * @param {LH.Audit.Context} context
           * @return {Promise<{cspHeaders: string[], cspMetaTags: string[]}>}
           */
          static async getRawCsps(artifacts, context2) {
            const devtoolsLog = artifacts.DevtoolsLog;
            const mainResource = await MainResourceComputed.request({ devtoolsLog, URL: artifacts.URL }, context2);
            const cspMetaTags = artifacts.MetaElements.filter((m) => {
              return m.httpEquiv && m.httpEquiv.toLowerCase() === "content-security-policy";
            }).flatMap((m) => (m.content || "").split(",")).filter((rawCsp) => rawCsp.replace(/\s/g, ""));
            const cspHeaders = mainResource.responseHeaders.filter((h) => {
              return h.name.toLowerCase() === "content-security-policy";
            }).flatMap((h) => h.value.split(",")).filter((rawCsp) => rawCsp.replace(/\s/g, ""));
            return { cspHeaders, cspMetaTags };
          }
          /**
           * @param {Finding} finding
           * @param {LH.IcuMessage=} severity
           * @return {LH.Audit.Details.TableItem}
           */
          static findingToTableItem(finding, severity) {
            return {
              directive: finding.directive,
              description: getTranslatedDescription(finding),
              severity
            };
          }
          /**
           * @param {Finding[][]} syntaxFindings
           * @param {string[]} rawCsps
           * @return {LH.Audit.Details.TableItem[]}
           */
          static constructSyntaxResults(syntaxFindings, rawCsps) {
            const results = [];
            for (let i = 0; i < syntaxFindings.length; ++i) {
              const items2 = syntaxFindings[i].map((f) => this.findingToTableItem(f));
              if (!items2.length)
                continue;
              results.push({
                severity: str_70(UIStrings89.itemSeveritySyntax),
                description: {
                  type: "code",
                  value: rawCsps[i]
                },
                subItems: {
                  type: "subitems",
                  items: items2
                }
              });
            }
            return results;
          }
          /**
           * @param {string[]} cspHeaders
           * @param {string[]} cspMetaTags
           * @return {{score: number, results: LH.Audit.Details.TableItem[]}}
           */
          static constructResults(cspHeaders, cspMetaTags) {
            const rawCsps = [...cspHeaders, ...cspMetaTags];
            if (!rawCsps.length) {
              return {
                score: 0,
                results: [{
                  severity: str_70(UIStrings.itemSeverityHigh),
                  description: str_70(UIStrings89.noCsp),
                  directive: void 0
                }]
              };
            }
            const { bypasses, warnings, syntax } = evaluateRawCspsForXss(rawCsps);
            const results = [
              ...this.constructSyntaxResults(syntax, rawCsps),
              ...bypasses.map((f) => this.findingToTableItem(f, str_70(UIStrings.itemSeverityHigh))),
              ...warnings.map((f) => this.findingToTableItem(f, str_70(UIStrings.itemSeverityMedium)))
            ];
            const headerOnlyBypasses = evaluateRawCspsForXss(cspHeaders).bypasses;
            const headerOnlyIsInsecure = headerOnlyBypasses.length > 0 || cspHeaders.length === 0;
            if (cspMetaTags.length > 0 && headerOnlyIsInsecure) {
              results.push({
                severity: str_70(UIStrings.itemSeverityMedium),
                description: str_70(UIStrings89.metaTagMessage),
                directive: void 0
              });
            }
            return { score: bypasses.length ? 0 : 1, results };
          }
          /**
           * @param {LH.Artifacts} artifacts
           * @param {LH.Audit.Context} context
           * @return {Promise<LH.Audit.Product>}
           */
          static async audit(artifacts, context2) {
            const { cspHeaders, cspMetaTags } = await this.getRawCsps(artifacts, context2);
            const { score, results } = this.constructResults(cspHeaders, cspMetaTags);
            const headings = [
              /* eslint-disable max-len */
              { key: "description", valueType: "text", subItemsHeading: { key: "description" }, label: str_70(UIStrings.columnDescription) },
              { key: "directive", valueType: "code", subItemsHeading: { key: "directive" }, label: str_70(UIStrings89.columnDirective) },
              { key: "severity", valueType: "text", subItemsHeading: { key: "severity" }, label: str_70(UIStrings89.columnSeverity) }
              /* eslint-enable max-len */
            ];
            const details = Audit.makeTableDetails(headings, results);
            return {
              score,
              notApplicable: !results.length,
              details
            };
          }
        };
        csp_xss_default = CspXss;
      }
    });
    init_js_bundles = __esm2({
      "core/computed/js-bundles.js"() {
        "use strict";
        init_process_global();
        init_lighthouse_logger();
        init_computed_artifact();
        import_SDK2 = __toESM(require_SDK(), 1);
        __name(computeGeneratedFileSizes2, "computeGeneratedFileSizes");
        JSBundles = class {
          static {
            __name(this, "JSBundles");
          }
          /**
           * @param {Pick<LH.Artifacts, 'SourceMaps'|'Scripts'>} artifacts
           */
          static async compute_(artifacts) {
            const { SourceMaps: SourceMaps2, Scripts: Scripts2 } = artifacts;
            const bundles = [];
            for (const SourceMap2 of SourceMaps2) {
              if (!SourceMap2.map)
                continue;
              const { scriptId, map: rawMap } = SourceMap2;
              if (!rawMap.mappings)
                continue;
              const script = Scripts2.find((s) => s.scriptId === scriptId);
              if (!script)
                continue;
              const compiledUrl = SourceMap2.scriptUrl || "compiled.js";
              const mapUrl = SourceMap2.sourceMapUrl || "compiled.js.map";
              const map2 = new import_SDK2.default.SourceMap(compiledUrl, mapUrl, rawMap);
              const sizes = computeGeneratedFileSizes2(map2, script.length || 0, script.content || "");
              const bundle = {
                rawMap,
                script,
                map: map2,
                sizes
              };
              bundles.push(bundle);
            }
            return bundles;
          }
        };
        JSBundlesComputed = makeComputedArtifact(JSBundles, ["Scripts", "SourceMaps"]);
      }
    });
    init_deprecations_strings = __esm2({
      "core/lib/deprecations-strings.js"() {
        "use strict";
        init_process_global();
        UIStrings90 = {
          /**
           * @description We show this warning when 1) an 'authorization' header is attached to the request by scripts, 2) there is no 'authorization' in the 'access-control-allow-headers' header in the response, and 3) there is a wildcard symbol ('*') in the 'access-control-allow-header' header in the response. This is allowed now, but we're planning to reject such responses and require responses to have an 'access-control-allow-headers' containing 'authorization'.
           */
          AuthorizationCoveredByWildcard: "Authorization will not be covered by the wildcard symbol (*) in CORS `Access-Control-Allow-Headers` handling.",
          /**
           * @description This warning occurs when a page attempts to request a resource whose URL contained both a newline character (`\n` or `\r`), and a less-than character (`<`). These resources are blocked.
           */
          CanRequestURLHTTPContainingNewline: "Resource requests whose URLs contained both removed whitespace `(n|r|t)` characters and less-than characters (`<`) are blocked. Please remove newlines and encode less-than characters from places like element attribute values in order to load these resources.",
          /**
           * @description This warning occurs when the website attempts to invoke the deprecated `chrome.loadTimes().connectionInfo` API.
           */
          ChromeLoadTimesConnectionInfo: "`chrome.loadTimes()` is deprecated, instead use standardized API: Navigation Timing 2.",
          /**
           * @description This warning occurs when the website attempts to invoke the deprecated `chrome.loadTimes().firstPaintAfterLoadTime` API.
           */
          ChromeLoadTimesFirstPaintAfterLoadTime: "`chrome.loadTimes()` is deprecated, instead use standardized API: Paint Timing.",
          /**
           * @description This warning occurs when the website attempts to invoke the deprecated `chrome.loadTimes().wasAlternateProtocolAvailable` API.
           */
          ChromeLoadTimesWasAlternateProtocolAvailable: "`chrome.loadTimes()` is deprecated, instead use standardized API: `nextHopProtocol` in Navigation Timing 2.",
          /**
           * @description This warning occurs when the browser attempts to store a cookie containing a banned character. Rather than the cookie string being truncated at the banned character, the entire cookie will be rejected now.
           */
          CookieWithTruncatingChar: "Cookies containing a `(0|r|n)` character will be rejected instead of truncated.",
          /**
           * @description This warning occurs when a frame accesses another frame's data after having set `document.domain` without having set the `Origin-Agent-Cluster` http header. This is a companion warning to `documentDomainSettingWithoutOriginAgentClusterHeader`, where that warning occurs when `document.domain` is set, and this warning occurs when an access has been made, based on that previous `document.domain` setting.
           */
          CrossOriginAccessBasedOnDocumentDomain: "Relaxing the same-origin policy by setting `document.domain` is deprecated, and will be disabled by default. This deprecation warning is for a cross-origin access that was enabled by setting `document.domain`.",
          /**
           * @description Issue text shown when the web page uses a deprecated web API. The window.alert is the deprecated web API function.
           */
          CrossOriginWindowAlert: "Triggering window.alert from cross origin iframes has been deprecated and will be removed in the future.",
          /**
           * @description Issue text shown when the web page uses a deprecated web API. The window.confirm is the deprecated web API function.
           */
          CrossOriginWindowConfirm: "Triggering window.confirm from cross origin iframes has been deprecated and will be removed in the future.",
          /**
           * @description Warning displayed to developers when they hide the Cast button on a video element using the deprecated CSS selector instead of using the disableRemotePlayback attribute on the element.
           */
          CSSSelectorInternalMediaControlsOverlayCastButton: "The `disableRemotePlayback` attribute should be used in order to disable the default Cast integration instead of using `-internal-media-controls-overlay-cast-button` selector.",
          /**
           * @description Warning displayed to developers to let them know the CSS appearance property value they used is not standard and will be removed.
           */
          CSSValueAppearanceSliderVertical: "CSS appearance value `slider-vertical` is not standardized and will be removed.",
          /**
           * @description Warning displayed to developers when a data: URL is assigned to SVGUseElement to let them know that the support is deprecated.
           */
          DataUrlInSvgUse: "Support for data: URLs in SVGUseElement is deprecated and it will be removed in the future.",
          /**
           * @description Warning displayed to developers when the Geolocation API is used from an insecure origin (one that isn't localhost or doesn't use HTTPS) to notify them that this use is no longer supported.
           */
          GeolocationInsecureOrigin: "`getCurrentPosition()` and `watchPosition()` no longer work on insecure origins. To use this feature, you should consider switching your application to a secure origin, such as HTTPS. See https://www.chromium.org/Home/chromium-security/deprecating-powerful-features-on-insecure-origins/ for more details.",
          /**
           * @description Warning displayed to developers when the Geolocation API is used from an insecure origin (one that isn't localhost or doesn't use HTTPS) to notify them that this use is deprecated.
           */
          GeolocationInsecureOriginDeprecatedNotRemoved: "`getCurrentPosition()` and `watchPosition()` are deprecated on insecure origins. To use this feature, you should consider switching your application to a secure origin, such as HTTPS. See https://www.chromium.org/Home/chromium-security/deprecating-powerful-features-on-insecure-origins/ for more details.",
          /**
           * @description This warning occurs when the `getUserMedia()` API is invoked on an insecure (e.g., HTTP) site. This is only permitted on secure sites (e.g., HTTPS).
           */
          GetUserMediaInsecureOrigin: "`getUserMedia()` no longer works on insecure origins. To use this feature, you should consider switching your application to a secure origin, such as HTTPS. See https://www.chromium.org/Home/chromium-security/deprecating-powerful-features-on-insecure-origins/ for more details.",
          /**
           * @description A deprecation warning shown to developers in the DevTools Issues tab when code tries to use the deprecated hostCandidate field, guiding developers to use the equivalent information in the .address and .port fields instead.
           */
          HostCandidateAttributeGetter: "`RTCPeerConnectionIceErrorEvent.hostCandidate` is deprecated. Please use `RTCPeerConnectionIceErrorEvent.address` or `RTCPeerConnectionIceErrorEvent.port` instead.",
          /**
           * @description A deprecation warning shown in the DevTools Issues tab, when a service worker reads one of the fields from an event named 'canmakepayment'.
           */
          IdentityInCanMakePaymentEvent: "The merchant origin and arbitrary data from the `canmakepayment` service worker event are deprecated and will be removed: `topOrigin`, `paymentRequestOrigin`, `methodData`, `modifiers`.",
          /**
           * @description This warning occurs when an insecure context (e.g., HTTP) requests a private resource (not on open internet). This is done to mitigate the potential for CSRF and other attacks.
           */
          InsecurePrivateNetworkSubresourceRequest: "The website requested a subresource from a network that it could only access because of its users' privileged network position. These requests expose non-public devices and servers to the internet, increasing the risk of a cross-site request forgery (CSRF) attack, and/or information leakage. To mitigate these risks, Chrome deprecates requests to non-public subresources when initiated from non-secure contexts, and will start blocking them.",
          /**
           * @description This is a deprecated warning to developers that a field in a structure has been renamed.
           */
          InterestGroupDailyUpdateUrl: "The `dailyUpdateUrl` field of `InterestGroups` passed to `joinAdInterestGroup()` has been renamed to `updateUrl`, to more accurately reflect its behavior.",
          /**
           * @description Warning displayed to developers that instead of calling the `Intl.v8BreakIterator` constructor, which is not a standard JavaScript API, use ECMA402 standard API Intl.Segmenter shipped in end of 2020 instead.
           */
          IntlV8BreakIterator: "`Intl.v8BreakIterator` is deprecated. Please use `Intl.Segmenter` instead.",
          /**
           * @description This warning occurs when a stylesheet loaded from a local file directive does not end in the file type `.css`.
           */
          LocalCSSFileExtensionRejected: "CSS cannot be loaded from `file:` URLs unless they end in a `.css` file extension.",
          /**
           * @description This is a deprecation warning to developers that occurs when the script attempts to use the Media Source Extensions API in a way that is no longer supported by the specification for the API. The usage that is problematic is when the script calls the `SourceBuffer.abort()` method at a time when there is still processing happening in response to a previous `SourceBuffer.remove()` call for the same SourceBuffer object. More precisely, we show this warning to developers when script calls the SourceBuffer abort() method while the asynchronous processing of a remove() call on that SourceBuffer is not yet complete. Early versions of the Media Source Extensions specification allowed such aborts, but standardization of the specification resulted in disallowing the aborts. The script should instead wait for the asynchronous remove() operation to complete, which is observable by listening for the associated 'updateend' event from the SourceBuffer. A note is also included in the warning, describing when abort() is meaningful and allowed by the specification for purposes other than interrupting a remove() operation's asynchronous steps. Those supported purposes include using abort() to interrupt processing that may still be happening in response to a previous appendBuffer() call on that SourceBuffer, or using abort() to clear the internal of any unprocessed data remaining from previous appendBuffer() calls. See https://www.w3.org/TR/media-source-2/#dom-sourcebuffer-abort for the currently specified behavior, which would throw an exception once the deprecated removal abort is no longer supported. See https://github.com/w3c/media-source/issues/19 for the discussion that led to the specification change.
           */
          MediaSourceAbortRemove: "Using `SourceBuffer.abort()` to abort `remove()`'s asynchronous range removal is deprecated due to specification change. Support will be removed in the future. You should listen to the `updateend` event instead. `abort()` is intended to only abort an asynchronous media append or reset parser state.",
          /**
           * @description This is a deprecation warning to developers that occurs when the script attempts to use the Media Source Extensions API in a way that is no longer supported by the specification for the API. The usage that is problematic is when the script sets the duration attribute of a MediaSource object too low. The duration attribute of a MediaSource must be longer than the actual duration of any media (audio or video) already in the MediaSource. When set too low, the MediaSource must remove audio and video content that is beyond the time indicated by the new duration. Content removal that is caused by setting the duration attribute too low is no longer allowed by the specification. The message describes the minimum allowable duration value as the 'highest presentation timestamp of any buffered coded frames' as a more precise way of describing the duration of content already in the MediaSource: 'coded frames' are the specification's way of describing compressed audio frames or compressed video frames, and they each have a 'presentation timestamp' that describes precisely when that frame's playback occurs in the overall media presentation. Early versions of the Media Source Extensions specification allowed this to happen, but standardization of the specification resulted in disallowing this behavior. The underlying issue leading to this specification change was that setting the duration attribute should be synchronous, but setting it lower than the timestamp of something currently buffered would cause confusing removal of media between that new duration and the previous, larger, duration. The script should instead explicitly remove that range of media first, before lowering the duration. See https://www.w3.org/TR/media-source-2/#dom-mediasource-duration and https://www.w3.org/TR/media-source-2/#dom-mediasource-duration for the currently specified behavior, which would throw an exception once support is removed for deprecated implicit asynchronous range removal when duration is truncated. See both https://github.com/w3c/media-source/issues/20 and https://github.com/w3c/media-source/issues/26 for the discussion that led to the specification change.
           */
          MediaSourceDurationTruncatingBuffered: "Setting `MediaSource.duration` below the highest presentation timestamp of any buffered coded frames is deprecated due to specification change. Support for implicit removal of truncated buffered media will be removed in the future. You should instead perform explicit `remove(newDuration, oldDuration)` on all `sourceBuffers`, where `newDuration < oldDuration`.",
          /**
           * @description This warning occurs when the browser requests Web MIDI access as sysex (system exclusive messages) can be allowed via prompt even if the browser did not specifically request it.
           */
          NoSysexWebMIDIWithoutPermission: "Web MIDI will ask a permission to use even if the sysex is not specified in the `MIDIOptions`.",
          /**
           * @description Warning displayed to developers when the Notification API is used from an insecure origin (one that isn't localhost or doesn't use HTTPS) to notify them that this use is no longer supported.
           */
          NotificationInsecureOrigin: "The Notification API may no longer be used from insecure origins. You should consider switching your application to a secure origin, such as HTTPS. See https://www.chromium.org/Home/chromium-security/deprecating-powerful-features-on-insecure-origins/ for more details.",
          /**
           * @description Warning displayed to developers when permission to use notifications has been requested by a cross-origin iframe, to notify them that this use is no longer supported.
           */
          NotificationPermissionRequestedIframe: "Permission for the Notification API may no longer be requested from a cross-origin iframe. You should consider requesting permission from a top-level frame or opening a new window instead.",
          /**
           * @description Warning displayed to developers when CreateImageBitmap is used with the newly deprecated option imageOrientation: 'none'.
           */
          ObsoleteCreateImageBitmapImageOrientationNone: "Option `imageOrientation: 'none'` in createImageBitmap is deprecated. Please use createImageBitmap with option '\\{imageOrientation: 'from-image'\\}' instead.",
          /**
           * @description This warning occurs when the WebRTC protocol attempts to negotiate a connection using an obsolete cipher and risks connection security.
           */
          ObsoleteWebRtcCipherSuite: "Your partner is negotiating an obsolete (D)TLS version. Please check with your partner to have this fixed.",
          /**
           * @description Warning displayed to developers that use overflow:visible for replaced elements. This declaration was earlier ignored but will now change the element's painting based on whether the overflow value allows the element to paint outside its bounds.
           */
          OverflowVisibleOnReplacedElement: "Specifying `overflow: visible` on img, video and canvas tags may cause them to produce visual content outside of the element bounds. See https://github.com/WICG/shared-element-transitions/blob/main/debugging_overflow_on_images.md.",
          /**
           * @description Warning displayed to developers when they use a Flash Embed URLS to let them know that the browser will not automatically link to their equivalent HTML5 link.
           */
          OverrideFlashEmbedwithHTML: "Legacy flash video embed has been rewritten to HTML iframe. Flash is long gone, this rewriting hack is deprecated and may be removed in the future.",
          /**
           * @description Warning displayed to developers when they use the PaymentInstruments API to let them know this API is deprecated.
           */
          PaymentInstruments: "`paymentManager.instruments` is deprecated. Please use just-in-time install for payment handlers instead.",
          /**
           * @description Warning displayed to developers when their Web Payment API usage violates their Content-Security-Policy (CSP) connect-src directive to let them know this CSP bypass has been deprecated.
           */
          PaymentRequestCSPViolation: "Your `PaymentRequest` call bypassed Content-Security-Policy (CSP) `connect-src` directive. This bypass is deprecated. Please add the payment method identifier from the `PaymentRequest` API (in `supportedMethods` field) to your CSP `connect-src` directive.",
          /**
           * @description Warning displayed to developers when persistent storage type is used to notify that storage type is deprecated.
           */
          PersistentQuotaType: "`StorageType.persistent` is deprecated. Please use standardized `navigator.storage` instead.",
          /**
           * @description This issue indicates that a `<source>` element with a `<picture>` parent was using an `src` attribute, which is not valid and is ignored by the browser. The `srcset` attribute should be used instead.
           */
          PictureSourceSrc: "`<source src>` with a `<picture>` parent is invalid and therefore ignored. Please use `<source srcset>` instead.",
          /**
           * @description Warning displayed to developers when the vendor-prefixed method (webkitCancelAnimationFrame) is used rather than the equivalent unprefixed method (cancelAnimationFrame).
           */
          PrefixedCancelAnimationFrame: "webkitCancelAnimationFrame is vendor-specific. Please use the standard cancelAnimationFrame instead.",
          /**
           * @description Warning displayed to developers when the vendor-prefixed method (webkitRequestAnimationFrame) is used rather than the equivalent unprefixed method (requestAnimationFrame).
           */
          PrefixedRequestAnimationFrame: "webkitRequestAnimationFrame is vendor-specific. Please use the standard requestAnimationFrame instead.",
          /**
           * @description Standard message when one web API is deprecated in favor of another.
           */
          PrefixedVideoDisplayingFullscreen: "HTMLVideoElement.webkitDisplayingFullscreen is deprecated. Please use Document.fullscreenElement instead.",
          /**
           * @description Standard message when one web API is deprecated in favor of another.
           */
          PrefixedVideoEnterFullScreen: "HTMLVideoElement.webkitEnterFullScreen() is deprecated. Please use Element.requestFullscreen() instead.",
          /**
           * @description Standard message when one web API is deprecated in favor of another.
           */
          PrefixedVideoEnterFullscreen: "HTMLVideoElement.webkitEnterFullscreen() is deprecated. Please use Element.requestFullscreen() instead.",
          /**
           * @description Standard message when one web API is deprecated in favor of another.
           */
          PrefixedVideoExitFullScreen: "HTMLVideoElement.webkitExitFullScreen() is deprecated. Please use Document.exitFullscreen() instead.",
          /**
           * @description Standard message when one web API is deprecated in favor of another.
           */
          PrefixedVideoExitFullscreen: "HTMLVideoElement.webkitExitFullscreen() is deprecated. Please use Document.exitFullscreen() instead.",
          /**
           * @description Standard message when one web API is deprecated in favor of another.
           */
          PrefixedVideoSupportsFullscreen: "HTMLVideoElement.webkitSupportsFullscreen is deprecated. Please use Document.fullscreenEnabled instead.",
          /**
           * @description Warning displayed to developers that the API `chrome.privacy.websites.privacySandboxEnabled` is being deprecated in favour of three new more granular APIs: topicsEnabled, FledgeEnabled and adMeasurementEnabled. The `privacySandboxEnabled` API allowed extensions to control the homologous Chrome Setting. The existing Chrome Setting for Privacy Sandbox is also going away in favor of more granular settings that are matched by the new extensions APIs- topicsEnabled, FledgeEnabled and adMeasurementEnabled.
           */
          PrivacySandboxExtensionsAPI: "We're deprecating the API `chrome.privacy.websites.privacySandboxEnabled`, though it will remain active for backward compatibility until release M113. Instead, please use `chrome.privacy.websites.topicsEnabled`, `chrome.privacy.websites.fledgeEnabled` and `chrome.privacy.websites.adMeasurementEnabled`. See https://developer.chrome.com/docs/extensions/reference/privacy/#property-websites-privacySandboxEnabled.",
          /**
           * @description Standard message when one web API is deprecated in favor of another.
           */
          RangeExpand: "Range.expand() is deprecated. Please use Selection.modify() instead.",
          /**
           * @description This warning occurs when a subresource loaded by a page has a URL with an authority portion. These are disallowed.
           */
          RequestedSubresourceWithEmbeddedCredentials: "Subresource requests whose URLs contain embedded credentials (e.g. `https://user:pass@host/`) are blocked.",
          /**
           * @description A deprecation warning shown in the DevTools Issues tab. It's shown when a video conferencing website attempts to use a non-standard crypto method when performing a handshake to set up a connection with another endpoint.
           */
          RTCConstraintEnableDtlsSrtpFalse: "The constraint `DtlsSrtpKeyAgreement` is removed. You have specified a `false` value for this constraint, which is interpreted as an attempt to use the removed `SDES key negotiation` method. This functionality is removed; use a service that supports `DTLS key negotiation` instead.",
          /**
           * @description A deprecation warning shown in the DevTools Issues tab. It's shown when a video conferencing website uses a non-standard API for controlling the crypto method used, but is not having an effect because the desired behavior is already enabled-by-default.
           */
          RTCConstraintEnableDtlsSrtpTrue: "The constraint `DtlsSrtpKeyAgreement` is removed. You have specified a `true` value for this constraint, which had no effect, but you can remove this constraint for tidiness.",
          /**
           * @description WebRTC is set of JavaScript APIs for sending and receiving data, audio and video. getStats() is a method used to obtain network and quality metrics. There are two versions of this method, one is being deprecated because it is non-standard.
           */
          RTCPeerConnectionGetStatsLegacyNonCompliant: "The callback-based getStats() is deprecated and will be removed. Use the spec-compliant getStats() instead.",
          /**
           * @description A deprecation warning shown in the DevTools Issues tab. It's shown then a video conferencing website attempts to use the `RTCP MUX` policy.
           */
          RtcpMuxPolicyNegotiate: "The `rtcpMuxPolicy` option is deprecated and will be removed.",
          /**
           * @description A deprecation warning shown in the DevTools Issues tab. The placeholder is always the noun 'SharedArrayBuffer' which refers to a JavaScript construct.
           */
          SharedArrayBufferConstructedWithoutIsolation: "`SharedArrayBuffer` will require cross-origin isolation. See https://developer.chrome.com/blog/enabling-shared-array-buffer/ for more details.",
          /**
           * @description A deprecation warning shown in the DevTools Issues tab. It's shown when the speech synthesis API is called before the page receives a user activation.
           */
          TextToSpeech_DisallowedByAutoplay: "`speechSynthesis.speak()` without user activation is deprecated and will be removed.",
          /**
           * @description A deprecation warning shown in the DevTools Issues tab. It's shown when a listener for the `unload` event is added.
           */
          UnloadHandler: "Unload event listeners are deprecated and will be removed.",
          /**
           * @description A deprecation warning shown in the DevTools Issues tab. The placeholder is always the noun 'SharedArrayBuffer' which refers to a JavaScript construct. 'Extensions' refers to Chrome extensions. The warning is shown when Chrome Extensions attempt to use 'SharedArrayBuffer's under insecure circumstances.
           */
          V8SharedArrayBufferConstructedInExtensionWithoutIsolation: "Extensions should opt into cross-origin isolation to continue using `SharedArrayBuffer`. See https://developer.chrome.com/docs/extensions/mv3/cross-origin-isolation/.",
          /**
           * @description Warning displayed to developers that they are using `XMLHttpRequest` API in a way that they expect an unsupported character encoding `UTF-16` could be used in the server reply.
           */
          XHRJSONEncodingDetection: "UTF-16 is not supported by response json in `XMLHttpRequest`",
          /**
           * @description Warning displayed to developers. It is shown when the `XMLHttpRequest` API is used in a way that it slows down the page load of the next page. The `main thread` refers to an operating systems thread used to run most of the processing of HTML documents, so please use a consistent wording.
           */
          XMLHttpRequestSynchronousInNonWorkerOutsideBeforeUnload: "Synchronous `XMLHttpRequest` on the main thread is deprecated because of its detrimental effects to the end user's experience. For more help, check https://xhr.spec.whatwg.org/."
        };
        DEPRECATIONS_METADATA = {
          "AuthorizationCoveredByWildcard": {
            "milestone": 97
          },
          "CSSSelectorInternalMediaControlsOverlayCastButton": {
            "chromeStatusFeature": 5714245488476160
          },
          "CSSValueAppearanceSliderVertical": {
            "chromeStatusFeature": 6001359429566464
          },
          "CanRequestURLHTTPContainingNewline": {
            "chromeStatusFeature": 5735596811091968
          },
          "ChromeLoadTimesConnectionInfo": {
            "chromeStatusFeature": 5637885046816768
          },
          "ChromeLoadTimesFirstPaintAfterLoadTime": {
            "chromeStatusFeature": 5637885046816768
          },
          "ChromeLoadTimesWasAlternateProtocolAvailable": {
            "chromeStatusFeature": 5637885046816768
          },
          "CookieWithTruncatingChar": {
            "milestone": 103
          },
          "CrossOriginAccessBasedOnDocumentDomain": {
            "milestone": 115
          },
          "DataUrlInSvgUse": {
            "chromeStatusFeature": 5128825141198848,
            "milestone": 119
          },
          "IdentityInCanMakePaymentEvent": {
            "chromeStatusFeature": 5190978431352832
          },
          "InsecurePrivateNetworkSubresourceRequest": {
            "chromeStatusFeature": 5436853517811712,
            "milestone": 92
          },
          "LocalCSSFileExtensionRejected": {
            "milestone": 64
          },
          "MediaSourceAbortRemove": {
            "chromeStatusFeature": 6107495151960064
          },
          "MediaSourceDurationTruncatingBuffered": {
            "chromeStatusFeature": 6107495151960064
          },
          "NoSysexWebMIDIWithoutPermission": {
            "chromeStatusFeature": 5138066234671104,
            "milestone": 82
          },
          "NotificationPermissionRequestedIframe": {
            "chromeStatusFeature": 6451284559265792
          },
          "ObsoleteCreateImageBitmapImageOrientationNone": {
            "milestone": 111
          },
          "ObsoleteWebRtcCipherSuite": {
            "milestone": 81
          },
          "OverflowVisibleOnReplacedElement": {
            "chromeStatusFeature": 5137515594383360,
            "milestone": 108
          },
          "OverrideFlashEmbedwithHTML": {
            "milestone": 140
          },
          "PaymentInstruments": {
            "chromeStatusFeature": 5099285054488576
          },
          "PaymentRequestCSPViolation": {
            "chromeStatusFeature": 6286595631087616
          },
          "PersistentQuotaType": {
            "chromeStatusFeature": 5176235376246784,
            "milestone": 106
          },
          "RTCConstraintEnableDtlsSrtpFalse": {
            "milestone": 97
          },
          "RTCConstraintEnableDtlsSrtpTrue": {
            "milestone": 97
          },
          "RTCPeerConnectionGetStatsLegacyNonCompliant": {
            "chromeStatusFeature": 4631626228695040,
            "milestone": 117
          },
          "RequestedSubresourceWithEmbeddedCredentials": {
            "chromeStatusFeature": 5669008342777856
          },
          "RtcpMuxPolicyNegotiate": {
            "chromeStatusFeature": 5654810086866944,
            "milestone": 62
          },
          "SharedArrayBufferConstructedWithoutIsolation": {
            "milestone": 106
          },
          "TextToSpeech_DisallowedByAutoplay": {
            "chromeStatusFeature": 5687444770914304,
            "milestone": 71
          },
          "UnloadHandler": {
            "chromeStatusFeature": 5579556305502208
          },
          "V8SharedArrayBufferConstructedInExtensionWithoutIsolation": {
            "milestone": 96
          },
          "XHRJSONEncodingDetection": {
            "milestone": 93
          }
        };
      }
    });
    init_deprecation_description = __esm2({
      "core/lib/deprecation-description.js"() {
        "use strict";
        init_process_global();
        init_i18n();
        init_deprecations_strings();
        UIStrings91 = {
          // Store strings used across messages in this block.
          /**
           * @description This links to the chrome feature status page when one exists.
           */
          feature: "Check the feature status page for more details.",
          /**
           * @description This links to the chromium dash schedule when a milestone is set.
           * @example {100} milestone
           */
          milestone: "This change will go into effect with milestone {milestone}.",
          /**
           * @description Title of issue raised when a deprecated feature is used
           */
          title: "Deprecated Feature Used"
        };
        str_71 = createIcuMessageFn({ url: "core/lib/deprecation-description.js" }.url, UIStrings91);
        deprecationsStr_ = createIcuMessageFn("node_modules/@paulirish/trace_engine/generated/Deprecation.js", UIStrings90);
        __name(getIssueDetailDescription, "getIssueDetailDescription");
      }
    });
    deprecations_exports = {};
    __export2(deprecations_exports, {
      UIStrings: () => UIStrings92,
      default: () => deprecations_default
    });
    init_deprecations = __esm2({
      "core/audits/deprecations.js"() {
        "use strict";
        init_process_global();
        init_audit();
        init_js_bundles();
        init_i18n();
        init_deprecation_description();
        UIStrings92 = {
          /** Title of a Lighthouse audit that provides detail on the use of deprecated APIs. This descriptive title is shown to users when the page does not use deprecated APIs. */
          title: "Avoids deprecated APIs",
          /** Title of a Lighthouse audit that provides detail on the use of deprecated APIs. This descriptive title is shown to users when the page uses deprecated APIs. */
          failureTitle: "Uses deprecated APIs",
          /** Description of a Lighthouse audit that tells the user why they should not use deprecated APIs on their page. This is displayed after a user expands the section to see more. No character length limits. The last sentence starting with 'Learn' becomes link text to additional documentation. */
          description: "Deprecated APIs will eventually be removed from the browser. [Learn more about deprecated APIs](https://developer.chrome.com/docs/lighthouse/best-practices/deprecations/).",
          /** [ICU Syntax] Label for the audit identifying the number of warnings generated by using deprecated APIs. */
          displayValue: `{itemCount, plural,
    =1 {1 warning found}
    other {# warnings found}
    }`,
          /** Header of the table column which displays the warning message describing use of a deprecated API by code running in the web page. */
          columnDeprecate: "Deprecation / Warning",
          /** Table column header for line of code (eg. 432) that is using a deprecated API. */
          columnLine: "Line"
        };
        str_72 = createIcuMessageFn({ url: "core/audits/deprecations.js" }.url, UIStrings92);
        Deprecations = class extends Audit {
          static {
            __name(this, "Deprecations");
          }
          /**
           * @return {LH.Audit.Meta}
           */
          static get meta() {
            return {
              id: "deprecations",
              title: str_72(UIStrings92.title),
              failureTitle: str_72(UIStrings92.failureTitle),
              description: str_72(UIStrings92.description),
              requiredArtifacts: ["InspectorIssues", "SourceMaps", "Scripts"]
            };
          }
          /**
           * @param {LH.Artifacts} artifacts
           * @param {LH.Audit.Context} context
           * @return {Promise<LH.Audit.Product>}
           */
          static async audit(artifacts, context2) {
            const bundles = await JSBundlesComputed.request(artifacts, context2);
            const deprecations = (artifacts.InspectorIssues.deprecationIssue ?? []).map((deprecation) => {
              const { scriptId, url, lineNumber, columnNumber } = deprecation.sourceCodeLocation;
              const bundle = bundles.find((bundle2) => bundle2.script.scriptId === scriptId);
              const deprecationMeta = getIssueDetailDescription(deprecation);
              let subItems = void 0;
              if (deprecationMeta.links.length) {
                subItems = {
                  type: "subitems",
                  items: deprecationMeta.links.map((link2) => ({
                    type: "link",
                    url: link2.link,
                    text: link2.linkTitle
                  }))
                };
              }
              const legacyMessage = deprecation.message;
              const item = {
                value: deprecationMeta.message || legacyMessage || deprecation.type,
                // Protocol.Audits.SourceCodeLocation.columnNumber is 1-indexed, but we use 0-indexed.
                source: Audit.makeSourceLocation(url, lineNumber, columnNumber - 1, bundle),
                subItems
              };
              return item;
            });
            const headings = [
              { key: "value", valueType: "text", label: str_72(UIStrings92.columnDeprecate) },
              { key: "source", valueType: "source-location", label: str_72(UIStrings.columnSource) }
            ];
            const details = Audit.makeTableDetails(headings, deprecations);
            let displayValue;
            if (deprecations.length > 0) {
              displayValue = str_72(UIStrings92.displayValue, { itemCount: deprecations.length });
            }
            return {
              score: Number(deprecations.length === 0),
              displayValue,
              details
            };
          }
        };
        deprecations_default = Deprecations;
      }
    });
    charset_exports = {};
    __export2(charset_exports, {
      CHARSET_HTML_REGEX: () => CHARSET_HTML_REGEX,
      CHARSET_HTTP_REGEX: () => CHARSET_HTTP_REGEX,
      IANA_REGEX: () => IANA_REGEX,
      UIStrings: () => UIStrings93,
      default: () => charset_default
    });
    init_charset = __esm2({
      "core/audits/dobetterweb/charset.js"() {
        "use strict";
        init_process_global();
        init_audit();
        init_i18n();
        init_main_resource();
        UIStrings93 = {
          /** Title of a Lighthouse audit that provides detail on if the charset is set properly for a page. This title is shown when the charset is defined correctly. Charset defines the character encoding (eg UTF-8) of the page content. */
          title: "Properly defines charset",
          /** Title of a Lighthouse audit that provides detail on if the charset is set properly for a page. This title is shown when the charset meta tag is missing or defined too late in the page. */
          failureTitle: "Charset declaration is missing or occurs too late in the HTML",
          /** Description of a Lighthouse audit that tells the user why the charset needs to be defined early on. */
          description: "A character encoding declaration is required. It can be done with a `<meta>` tag in the first 1024 bytes of the HTML or in the Content-Type HTTP response header. [Learn more about declaring the character encoding](https://developer.chrome.com/docs/lighthouse/best-practices/charset/)."
        };
        str_73 = createIcuMessageFn({ url: "core/audits/dobetterweb/charset.js" }.url, UIStrings93);
        CONTENT_TYPE_HEADER = "content-type";
        IANA_REGEX = /^[a-zA-Z0-9-_:.()]{2,}$/;
        CHARSET_HTML_REGEX = /<meta[^>]+charset[^<]+>/i;
        CHARSET_HTTP_REGEX = /charset\s*=\s*[a-zA-Z0-9-_:.()]{2,}/i;
        CharsetDefined = class extends Audit {
          static {
            __name(this, "CharsetDefined");
          }
          /**
           * @return {LH.Audit.Meta}
           */
          static get meta() {
            return {
              id: "charset",
              title: str_73(UIStrings93.title),
              failureTitle: str_73(UIStrings93.failureTitle),
              description: str_73(UIStrings93.description),
              requiredArtifacts: ["MainDocumentContent", "URL", "DevtoolsLog", "MetaElements"]
            };
          }
          /**
           * @param {LH.Artifacts} artifacts
           * @param {LH.Audit.Context} context
           * @return {Promise<LH.Audit.Product>}
           */
          static async audit(artifacts, context2) {
            const devtoolsLog = artifacts.DevtoolsLog;
            const mainResource = await MainResourceComputed.request({ devtoolsLog, URL: artifacts.URL }, context2);
            let isCharsetSet = false;
            if (mainResource.responseHeaders) {
              const contentTypeHeader = mainResource.responseHeaders.find((header) => header.name.toLowerCase() === CONTENT_TYPE_HEADER);
              if (contentTypeHeader) {
                isCharsetSet = CHARSET_HTTP_REGEX.test(contentTypeHeader.value);
              }
            }
            const BOM_FIRSTCHAR = 65279;
            isCharsetSet = isCharsetSet || artifacts.MainDocumentContent.charCodeAt(0) === BOM_FIRSTCHAR;
            if (CHARSET_HTML_REGEX.test(artifacts.MainDocumentContent.slice(0, 1024))) {
              isCharsetSet = isCharsetSet || artifacts.MetaElements.some((meta) => {
                return meta.charset && IANA_REGEX.test(meta.charset) || meta.httpEquiv === "content-type" && meta.content && CHARSET_HTTP_REGEX.test(meta.content);
              });
            }
            return {
              score: Number(isCharsetSet)
            };
          }
        };
        charset_default = CharsetDefined;
      }
    });
    init_lh_trace_processor = __esm2({
      "core/lib/lh-trace-processor.js"() {
        "use strict";
        init_process_global();
        init_lh_error();
        init_trace_processor();
        LHTraceProcessor = class extends TraceProcessor2 {
          static {
            __name(this, "LHTraceProcessor");
          }
          /**
           * @return {Error}
           */
          static createNoNavstartError() {
            return new LighthouseError(LighthouseError.errors.NO_NAVSTART);
          }
          /**
           * This isn't currently used, but will be when the time origin of trace processing is changed.
           * @see {TraceProcessor.computeTimeOrigin}
           * @see https://github.com/GoogleChrome/lighthouse/pull/11253#discussion_r507985527
           * @return {Error}
           */
          static createNoResourceSendRequestError() {
            return new LighthouseError(LighthouseError.errors.NO_RESOURCE_REQUEST);
          }
          /**
           * @return {Error}
           */
          static createNoTracingStartedError() {
            return new LighthouseError(LighthouseError.errors.NO_TRACING_STARTED);
          }
          /**
           * @return {Error}
           */
          static createNoFirstContentfulPaintError() {
            return new LighthouseError(LighthouseError.errors.NO_FCP);
          }
        };
        lh_trace_processor_default = LHTraceProcessor;
      }
    });
    init_processed_trace = __esm2({
      "core/computed/processed-trace.js"() {
        "use strict";
        init_process_global();
        init_computed_artifact();
        init_lh_trace_processor();
        ProcessedTrace = class {
          static {
            __name(this, "ProcessedTrace");
          }
          /**
            * @param {LH.Trace} trace
            * @return {Promise<LH.Artifacts.ProcessedTrace>}
           */
          static async compute_(trace2) {
            return lh_trace_processor_default.processTrace(trace2);
          }
        };
        ProcessedTraceComputed = makeComputedArtifact(ProcessedTrace, null);
      }
    });
    doctype_exports2 = {};
    __export2(doctype_exports2, {
      UIStrings: () => UIStrings94,
      default: () => doctype_default2
    });
    init_doctype2 = __esm2({
      "core/audits/dobetterweb/doctype.js"() {
        "use strict";
        init_process_global();
        init_audit();
        init_i18n();
        init_processed_trace();
        UIStrings94 = {
          /** Title of a Lighthouse audit that provides detail on the doctype of a page. This descriptive title is shown to users when the pages's doctype is set to HTML. */
          title: "Page has the HTML doctype",
          /** Title of a Lighthouse audit that provides detail on the doctype of a page. This descriptive title is shown to users when the page's doctype is not set to HTML. */
          failureTitle: "Page lacks the HTML doctype, thus triggering quirks-mode",
          /** Description of a Lighthouse audit that tells the user why they should define an HTML doctype. This is displayed after a user expands the section to see more. No character length limits. The last sentence starting with 'Learn' becomes link text to additional documentation. */
          description: "Specifying a doctype prevents the browser from switching to quirks-mode. [Learn more about the doctype declaration](https://developer.chrome.com/docs/lighthouse/best-practices/doctype/).",
          /** Explanatory message stating that the document has no doctype. */
          explanationNoDoctype: "Document must contain a doctype",
          /** Explanatory message stating that the document has wrong doctype that triggers `quirks-mode` */
          explanationWrongDoctype: "Document contains a `doctype` that triggers `quirks-mode`",
          /** Explanatory message stating that the document has wrong doctype that triggers `limited-quirks-mode` */
          explanationLimitedQuirks: "Document contains a `doctype` that triggers `limited-quirks-mode`",
          /** Explanatory message stating that the publicId field is not empty. */
          explanationPublicId: "Expected publicId to be an empty string",
          /** Explanatory message stating that the systemId field is not empty. */
          explanationSystemId: "Expected systemId to be an empty string",
          /** Explanatory message stating that the doctype is set, but is not "html" and is therefore invalid. */
          explanationBadDoctype: "Doctype name must be the string `html`"
        };
        str_74 = createIcuMessageFn({ url: "core/audits/dobetterweb/doctype.js" }.url, UIStrings94);
        Doctype2 = class extends Audit {
          static {
            __name(this, "Doctype");
          }
          /**
           * @return {LH.Audit.Meta}
           */
          static get meta() {
            return {
              id: "doctype",
              title: str_74(UIStrings94.title),
              failureTitle: str_74(UIStrings94.failureTitle),
              description: str_74(UIStrings94.description),
              requiredArtifacts: ["Doctype"],
              __internalOptionalArtifacts: ["InspectorIssues", "Trace"]
            };
          }
          /**
           * @param {LH.Artifacts} artifacts
           * @param {LH.Audit.Context} context
           * @return {Promise<LH.Audit.Product>}
           */
          static async audit(artifacts, context2) {
            if (!artifacts.Doctype) {
              return {
                score: 0,
                explanation: str_74(UIStrings94.explanationNoDoctype)
              };
            }
            const doctypeName = artifacts.Doctype.name;
            const doctypePublicId = artifacts.Doctype.publicId;
            const doctypeSystemId = artifacts.Doctype.systemId;
            const compatMode = artifacts.Doctype.documentCompatMode;
            const trace2 = artifacts.Trace;
            let quirksModeIssues = [];
            if (trace2 && artifacts.InspectorIssues?.quirksModeIssue) {
              const processedTrace = await ProcessedTraceComputed.request(trace2, context2);
              const mainFrameId22 = processedTrace.mainFrameInfo.frameId;
              quirksModeIssues = artifacts.InspectorIssues.quirksModeIssue.filter((issue2) => issue2.frameId === mainFrameId22);
            }
            const isLimitedQuirksMode = quirksModeIssues.some((issue2) => issue2.isLimitedQuirksMode);
            if (compatMode === "CSS1Compat" && !isLimitedQuirksMode) {
              return {
                score: 1
              };
            }
            if (isLimitedQuirksMode) {
              return {
                score: 0,
                explanation: str_74(UIStrings94.explanationLimitedQuirks)
              };
            }
            if (doctypePublicId !== "") {
              return {
                score: 0,
                explanation: str_74(UIStrings94.explanationPublicId)
              };
            }
            if (doctypeSystemId !== "") {
              return {
                score: 0,
                explanation: str_74(UIStrings94.explanationSystemId)
              };
            }
            if (doctypeName !== "html") {
              return {
                score: 0,
                explanation: str_74(UIStrings94.explanationBadDoctype)
              };
            }
            return {
              score: 0,
              explanation: str_74(UIStrings94.explanationWrongDoctype)
            };
          }
        };
        doctype_default2 = Doctype2;
      }
    });
    init_violation_audit = __esm2({
      "core/audits/violation-audit.js"() {
        "use strict";
        init_process_global();
        init_audit();
        init_js_bundles();
        ViolationAudit = class extends Audit {
          static {
            __name(this, "ViolationAudit");
          }
          /**
           * @param {LH.Artifacts} artifacts
           * @param {LH.Audit.Context} context
           * @param {RegExp} pattern
           * @return {Promise<Array<{source: LH.Audit.Details.SourceLocationValue}>>}
           */
          static async getViolationResults(artifacts, context2, pattern2) {
            const bundles = await JSBundlesComputed.request(artifacts, context2);
            function filterUndefined(value) {
              return value !== void 0;
            }
            __name(filterUndefined, "filterUndefined");
            const seen = /* @__PURE__ */ new Set();
            return artifacts.ConsoleMessages.filter((entry) => entry.url && entry.source === "violation" && pattern2.test(entry.text)).map((entry) => {
              const bundle = bundles.find((bundle2) => bundle2.script.scriptId === entry.scriptId);
              return Audit.makeSourceLocationFromConsoleMessage(entry, bundle);
            }).filter(filterUndefined).filter((source2) => {
              const key = `${source2.url}!${source2.line}!${source2.column}`;
              if (seen.has(key))
                return false;
              seen.add(key);
              return true;
            }).map((source2) => ({ source: source2 }));
          }
        };
        violation_audit_default = ViolationAudit;
      }
    });
    geolocation_on_start_exports = {};
    __export2(geolocation_on_start_exports, {
      UIStrings: () => UIStrings95,
      default: () => geolocation_on_start_default
    });
    init_geolocation_on_start = __esm2({
      "core/audits/dobetterweb/geolocation-on-start.js"() {
        "use strict";
        init_process_global();
        init_violation_audit();
        init_i18n();
        UIStrings95 = {
          /** Title of a Lighthouse audit that provides detail on geolocation permission requests while the page is loading. This descriptive title is shown to users when the page does not ask for geolocation permissions on load. */
          title: "Avoids requesting the geolocation permission on page load",
          /** Title of a Lighthouse audit that provides detail on geolocation permissions requests. This descriptive title is shown to users when the page does ask for geolocation permissions on load. */
          failureTitle: "Requests the geolocation permission on page load",
          /** Description of a Lighthouse audit that tells the user why they should not ask for geolocation permissions on load. This is displayed after a user expands the section to see more. No character length limits. The last sentence starting with 'Learn' becomes link text to additional documentation. */
          description: "Users are mistrustful of or confused by sites that request their location without context. Consider tying the request to a user action instead. [Learn more about the geolocation permission](https://developer.chrome.com/docs/lighthouse/best-practices/geolocation-on-start/)."
        };
        str_75 = createIcuMessageFn({ url: "core/audits/dobetterweb/geolocation-on-start.js" }.url, UIStrings95);
        GeolocationOnStart = class extends violation_audit_default {
          static {
            __name(this, "GeolocationOnStart");
          }
          /**
           * @return {LH.Audit.Meta}
           */
          static get meta() {
            return {
              id: "geolocation-on-start",
              title: str_75(UIStrings95.title),
              failureTitle: str_75(UIStrings95.failureTitle),
              description: str_75(UIStrings95.description),
              supportedModes: ["navigation"],
              requiredArtifacts: ["ConsoleMessages", "SourceMaps", "Scripts"]
            };
          }
          /**
           * @param {LH.Artifacts} artifacts
           * @param {LH.Audit.Context} context
           * @return {Promise<LH.Audit.Product>}
           */
          static async audit(artifacts, context2) {
            const results = await violation_audit_default.getViolationResults(artifacts, context2, /geolocation/);
            const headings = [
              { key: "source", valueType: "source-location", label: str_75(UIStrings.columnSource) }
            ];
            const details = violation_audit_default.makeTableDetails(headings, results);
            return {
              score: Number(results.length === 0),
              details
            };
          }
        };
        geolocation_on_start_default = GeolocationOnStart;
      }
    });
    inspector_issues_exports2 = {};
    __export2(inspector_issues_exports2, {
      UIStrings: () => UIStrings96,
      default: () => inspector_issues_default2
    });
    init_inspector_issues2 = __esm2({
      "core/audits/dobetterweb/inspector-issues.js"() {
        "use strict";
        init_process_global();
        init_audit();
        init_i18n();
        UIStrings96 = {
          /** Title of a Lighthouse audit that provides detail on various types of problems with a website, like security or network errors. This descriptive title is shown to users when no issues were logged into the Chrome DevTools Issues panel. */
          title: "No issues in the `Issues` panel in Chrome Devtools",
          /** Title of a Lighthouse audit that provides detail on various types of problems with a website, like security or network errors. This descriptive title is shown to users when issues are detected and logged into the Chrome DevTools Issues panel. */
          failureTitle: "Issues were logged in the `Issues` panel in Chrome Devtools",
          /* eslint-disable max-len */
          /** Description of a Lighthouse audit that tells the user why issues being logged to the Chrome DevTools Issues panel are a cause for concern and so should be fixed. This is displayed after a user expands the section to see more. No character length limits. */
          description: "Issues logged to the `Issues` panel in Chrome Devtools indicate unresolved problems. They can come from network request failures, insufficient security controls, and other browser concerns. Open up the Issues panel in Chrome DevTools for more details on each issue.",
          /* eslint-enable max-len */
          /** Table column header for the types of problems observed in a website, like security or network errors. */
          columnIssueType: "Issue type",
          /** The type of an Issue in Chrome DevTools when a resource is blocked due to the website's cross-origin policy. */
          issueTypeBlockedByResponse: "Blocked by cross-origin policy",
          /** The type of an Issue in Chrome DevTools when a site has large ads that use up a lot of the browser's resources. */
          issueTypeHeavyAds: "Heavy resource usage by ads"
        };
        str_76 = createIcuMessageFn({ url: "core/audits/dobetterweb/inspector-issues.js" }.url, UIStrings96);
        IssuesPanelEntries = class extends Audit {
          static {
            __name(this, "IssuesPanelEntries");
          }
          /**
           * @return {LH.Audit.Meta}
           */
          static get meta() {
            return {
              id: "inspector-issues",
              title: str_76(UIStrings96.title),
              failureTitle: str_76(UIStrings96.failureTitle),
              description: str_76(UIStrings96.description),
              requiredArtifacts: ["InspectorIssues"]
            };
          }
          /**
           * @param {Array<LH.Crdp.Audits.MixedContentIssueDetails>} mixedContentIssues
           * @return {LH.Audit.Details.TableItem}
           */
          static getMixedContentRow(mixedContentIssues) {
            const requestUrls = /* @__PURE__ */ new Set();
            for (const issue2 of mixedContentIssues) {
              const requestUrl = issue2.request?.url || issue2.mainResourceURL;
              requestUrls.add(requestUrl);
            }
            return {
              issueType: "Mixed content",
              subItems: {
                type: "subitems",
                items: Array.from(requestUrls).map((url) => ({ url }))
              }
            };
          }
          /**
           * @param {Array<LH.Crdp.Audits.CookieIssueDetails>} CookieIssues
           * @return {LH.Audit.Details.TableItem}
           */
          static getCookieRow(CookieIssues) {
            const requestUrls = /* @__PURE__ */ new Set();
            for (const issue2 of CookieIssues) {
              const requestUrl = issue2.request?.url || issue2.cookieUrl;
              if (requestUrl) {
                requestUrls.add(requestUrl);
              }
            }
            return {
              issueType: "Cookie",
              subItems: {
                type: "subitems",
                items: Array.from(requestUrls).map((url) => {
                  return {
                    url
                  };
                })
              }
            };
          }
          /**
           * @param {Array<LH.Crdp.Audits.BlockedByResponseIssueDetails>} blockedByResponseIssues
           * @return {LH.Audit.Details.TableItem}
           */
          static getBlockedByResponseRow(blockedByResponseIssues) {
            const requestUrls = /* @__PURE__ */ new Set();
            for (const issue2 of blockedByResponseIssues) {
              const requestUrl = issue2.request?.url;
              if (requestUrl) {
                requestUrls.add(requestUrl);
              }
            }
            return {
              issueType: str_76(UIStrings96.issueTypeBlockedByResponse),
              subItems: {
                type: "subitems",
                items: Array.from(requestUrls).map((url) => {
                  return {
                    url
                  };
                })
              }
            };
          }
          /**
           * @param {Array<LH.Crdp.Audits.ContentSecurityPolicyIssueDetails>} cspIssues
           * @return {LH.Audit.Details.TableItem}
           */
          static getContentSecurityPolicyRow(cspIssues) {
            const requestUrls = /* @__PURE__ */ new Set();
            for (const issue2 of cspIssues) {
              const requestUrl = issue2.blockedURL;
              if (requestUrl) {
                requestUrls.add(requestUrl);
              }
            }
            return {
              issueType: "Content security policy",
              subItems: {
                type: "subitems",
                items: Array.from(requestUrls).map((url) => {
                  return {
                    url
                  };
                })
              }
            };
          }
          /**
           * @param {LH.Artifacts} artifacts
           * @return {LH.Audit.Product}
           */
          static audit(artifacts) {
            const headings = [
              /* eslint-disable max-len */
              { key: "issueType", valueType: "text", subItemsHeading: { key: "url", valueType: "url" }, label: str_76(UIStrings96.columnIssueType) }
              /* eslint-enable max-len */
            ];
            const issues = artifacts.InspectorIssues;
            const items2 = [];
            if (issues.mixedContentIssue?.length) {
              items2.push(this.getMixedContentRow(issues.mixedContentIssue));
            }
            if (issues.cookieIssue?.length) {
              items2.push(this.getCookieRow(issues.cookieIssue));
            }
            if (issues.blockedByResponseIssue?.length) {
              items2.push(this.getBlockedByResponseRow(issues.blockedByResponseIssue));
            }
            if (issues.heavyAdIssue?.length) {
              items2.push({ issueType: str_76(UIStrings96.issueTypeHeavyAds) });
            }
            if (issues.contentSecurityPolicyIssue?.length) {
              items2.push(this.getContentSecurityPolicyRow(issues.contentSecurityPolicyIssue));
            }
            return {
              score: items2.length > 0 ? 0 : 1,
              details: Audit.makeTableDetails(headings, items2)
            };
          }
        };
        inspector_issues_default2 = IssuesPanelEntries;
      }
    });
    js_libraries_exports = {};
    __export2(js_libraries_exports, {
      UIStrings: () => UIStrings97,
      default: () => js_libraries_default
    });
    init_js_libraries = __esm2({
      "core/audits/dobetterweb/js-libraries.js"() {
        "use strict";
        init_process_global();
        init_audit();
        init_i18n();
        UIStrings97 = {
          /** Title of a Lighthouse audit that provides detail on the Javascript libraries that are used on the page. */
          title: "Detected JavaScript libraries",
          /** Description of a Lighthouse audit that tells the user what this audit is detecting. This is displayed after a user expands the section to see more. No character length limits. */
          description: "All front-end JavaScript libraries detected on the page. [Learn more about this JavaScript library detection diagnostic audit](https://developer.chrome.com/docs/lighthouse/best-practices/js-libraries/).",
          /** Label for a column in a data table; entries will be the version numbers of the detected Javascript libraries.  */
          columnVersion: "Version"
        };
        str_77 = createIcuMessageFn({ url: "core/audits/dobetterweb/js-libraries.js" }.url, UIStrings97);
        JsLibrariesAudit = class extends Audit {
          static {
            __name(this, "JsLibrariesAudit");
          }
          /**
           * @return {LH.Audit.Meta}
           */
          static get meta() {
            return {
              id: "js-libraries",
              title: str_77(UIStrings97.title),
              scoreDisplayMode: Audit.SCORING_MODES.INFORMATIVE,
              description: str_77(UIStrings97.description),
              requiredArtifacts: ["Stacks"]
            };
          }
          /**
           * @param {LH.Artifacts} artifacts
           * @return {LH.Audit.Product}
           */
          static audit(artifacts) {
            const libDetails = artifacts.Stacks.filter((stack) => stack.detector === "js").filter((stack) => !stack.id.endsWith("-fast")).map((stack) => ({
              name: stack.name,
              version: stack.version,
              npm: stack.npm
            }));
            const headings = [
              { key: "name", valueType: "text", label: str_77(UIStrings.columnName) },
              { key: "version", valueType: "text", label: str_77(UIStrings97.columnVersion) }
            ];
            const details = Audit.makeTableDetails(headings, libDetails);
            const debugData = {
              type: (
                /** @type {const} */
                "debugdata"
              ),
              stacks: artifacts.Stacks.map((stack) => {
                return {
                  id: stack.id,
                  version: stack.version
                };
              })
            };
            if (!libDetails.length) {
              return { score: null, notApplicable: true };
            }
            return {
              score: 1,
              // Always pass for now.
              details: {
                ...details,
                debugData
              }
            };
          }
        };
        js_libraries_default = JsLibrariesAudit;
      }
    });
    notification_on_start_exports = {};
    __export2(notification_on_start_exports, {
      UIStrings: () => UIStrings98,
      default: () => notification_on_start_default
    });
    init_notification_on_start = __esm2({
      "core/audits/dobetterweb/notification-on-start.js"() {
        "use strict";
        init_process_global();
        init_violation_audit();
        init_i18n();
        UIStrings98 = {
          /** Title of a Lighthouse audit that provides detail on the page's notification permission requests. This descriptive title is shown to users when the page does not ask for notification permission on load. */
          title: "Avoids requesting the notification permission on page load",
          /** Title of a Lighthouse audit that provides detail on the page's notification permission requests. This descriptive title is shown to users when the page does ask for notification permission on load. */
          failureTitle: "Requests the notification permission on page load",
          /** Description of a Lighthouse audit that tells the user why they should not ask for notification permission on load. This is displayed after a user expands the section to see more. No character length limits. The last sentence starting with 'Learn' becomes link text to additional documentation. */
          description: "Users are mistrustful of or confused by sites that request to send notifications without context. Consider tying the request to user gestures instead. [Learn more about responsibly getting permission for notifications](https://developer.chrome.com/docs/lighthouse/best-practices/notification-on-start/)."
        };
        str_78 = createIcuMessageFn({ url: "core/audits/dobetterweb/notification-on-start.js" }.url, UIStrings98);
        NotificationOnStart = class extends violation_audit_default {
          static {
            __name(this, "NotificationOnStart");
          }
          /**
           * @return {LH.Audit.Meta}
           */
          static get meta() {
            return {
              id: "notification-on-start",
              title: str_78(UIStrings98.title),
              failureTitle: str_78(UIStrings98.failureTitle),
              description: str_78(UIStrings98.description),
              supportedModes: ["navigation"],
              requiredArtifacts: ["ConsoleMessages", "SourceMaps", "Scripts"]
            };
          }
          /**
           * @param {LH.Artifacts} artifacts
           * @param {LH.Audit.Context} context
           * @return {Promise<LH.Audit.Product>}
           */
          static async audit(artifacts, context2) {
            const results = await violation_audit_default.getViolationResults(artifacts, context2, /notification permission/);
            const headings = [
              { key: "source", valueType: "source-location", label: str_78(UIStrings.columnSource) }
            ];
            const details = violation_audit_default.makeTableDetails(headings, results);
            return {
              score: Number(results.length === 0),
              details
            };
          }
        };
        notification_on_start_default = NotificationOnStart;
      }
    });
    paste_preventing_inputs_exports = {};
    __export2(paste_preventing_inputs_exports, {
      UIStrings: () => UIStrings99,
      default: () => paste_preventing_inputs_default
    });
    init_paste_preventing_inputs = __esm2({
      "core/audits/dobetterweb/paste-preventing-inputs.js"() {
        "use strict";
        init_process_global();
        init_audit();
        init_i18n();
        UIStrings99 = {
          /** Title of a Lighthouse audit that provides detail on the ability to paste into input fields. This descriptive title is shown to users when the page allows pasting of content into input fields. */
          title: "Allows users to paste into input fields",
          /** Title of a Lighthouse audit that provides detail on the ability to paste into input fields. This descriptive title is shown to users when the page does not allow pasting of content into input fields. */
          failureTitle: "Prevents users from pasting into input fields",
          /** Description of a Lighthouse audit that tells the user why they should allow pasting of content into input fields. This is displayed after a user expands the section to see more. No character length limits. 'Learn More' becomes link text to additional documentation. */
          description: "Preventing input pasting is a bad practice for the UX, and weakens security by blocking password managers.[Learn more about user-friendly input fields](https://developer.chrome.com/docs/lighthouse/best-practices/paste-preventing-inputs/)."
        };
        str_79 = createIcuMessageFn({ url: "core/audits/dobetterweb/paste-preventing-inputs.js" }.url, UIStrings99);
        PastePreventingInputsAudit = class extends Audit {
          static {
            __name(this, "PastePreventingInputsAudit");
          }
          /**
           * @return {LH.Audit.Meta}
           */
          static get meta() {
            return {
              id: "paste-preventing-inputs",
              title: str_79(UIStrings99.title),
              failureTitle: str_79(UIStrings99.failureTitle),
              description: str_79(UIStrings99.description),
              requiredArtifacts: ["Inputs"]
            };
          }
          /**
           * @param {LH.Artifacts} artifacts
           * @return {LH.Audit.Product}
           */
          static audit(artifacts) {
            const inputsWithPreventsPaste = artifacts.Inputs.inputs.filter((input) => input.preventsPaste);
            const items2 = [];
            inputsWithPreventsPaste.forEach((input) => {
              items2.push({
                node: Audit.makeNodeItem(input.node),
                type: input.type
              });
            });
            const headings = [
              { key: "node", valueType: "node", label: str_79(UIStrings.columnFailingElem) }
            ];
            return {
              score: Number(inputsWithPreventsPaste.length === 0),
              details: Audit.makeTableDetails(headings, items2)
            };
          }
        };
        paste_preventing_inputs_default = PastePreventingInputsAudit;
      }
    });
    errors_in_console_exports = {};
    __export2(errors_in_console_exports, {
      UIStrings: () => UIStrings100,
      default: () => errors_in_console_default
    });
    init_errors_in_console = __esm2({
      "core/audits/errors-in-console.js"() {
        "use strict";
        init_process_global();
        init_lighthouse_logger();
        init_audit();
        init_js_bundles();
        init_i18n();
        init_util();
        KB = 1024;
        MAX_CONSOLE_ERRORS = 1e3;
        UIStrings100 = {
          /** Title of a Lighthouse audit that provides detail on browser errors. This descriptive title is shown to users when no browser errors were logged into the devtools console. */
          title: "No browser errors logged to the console",
          /** Title of a Lighthouse audit that provides detail on browser errors. This descriptive title is shown to users when browser errors occurred and were logged into the devtools console. */
          failureTitle: "Browser errors were logged to the console",
          /** Description of a Lighthouse audit that tells the user why errors being logged to the devtools console are a cause for concern and so should be fixed. This is displayed after a user expands the section to see more. No character length limits. */
          description: "Errors logged to the console indicate unresolved problems. They can come from network request failures and other browser concerns. [Learn more about this errors in console diagnostic audit](https://developer.chrome.com/docs/lighthouse/best-practices/errors-in-console/)"
        };
        str_80 = createIcuMessageFn({ url: "core/audits/errors-in-console.js" }.url, UIStrings100);
        ErrorLogs = class _ErrorLogs extends Audit {
          static {
            __name(this, "ErrorLogs");
          }
          /**
           * @return {LH.Audit.Meta}
           */
          static get meta() {
            return {
              id: "errors-in-console",
              title: str_80(UIStrings100.title),
              failureTitle: str_80(UIStrings100.failureTitle),
              description: str_80(UIStrings100.description),
              requiredArtifacts: ["ConsoleMessages", "SourceMaps", "Scripts"]
            };
          }
          /** @return {AuditOptions} */
          static get defaultOptions() {
            return { ignoredPatterns: ["ERR_BLOCKED_BY_CLIENT.Inspector"] };
          }
          /**
           * @template {{description: string | undefined}} T
           * @param {Array<T>} items
           * @param {AuditOptions} options
           * @return {Array<T>}
           */
          static filterAccordingToOptions(items2, options2) {
            const { ignoredPatterns, ...restOfOptions } = options2;
            const otherOptionKeys = Object.keys(restOfOptions);
            if (otherOptionKeys.length)
              lighthouse_logger_default.warn(this.meta.id, "Unrecognized options", otherOptionKeys);
            if (!ignoredPatterns)
              return items2;
            return items2.filter(({ description: description2 }) => {
              if (!description2)
                return true;
              for (const pattern2 of ignoredPatterns) {
                if (pattern2 instanceof RegExp && pattern2.test(description2))
                  return false;
                if (typeof pattern2 === "string" && description2.includes(pattern2))
                  return false;
              }
              return true;
            });
          }
          /**
           * @param {LH.Artifacts} artifacts
           * @param {LH.Audit.Context} context
           * @return {Promise<LH.Audit.Product>}
           */
          static async audit(artifacts, context2) {
            const auditOptions = context2.options;
            const bundles = await JSBundlesComputed.request(artifacts, context2);
            const consoleRows = artifacts.ConsoleMessages.filter((item) => item.level === "error").map((item) => {
              const bundle = bundles.find((bundle2) => bundle2.script.scriptId === item.scriptId);
              return {
                source: item.source,
                description: item.text ? Util.truncate(item.text, 10 * KB) : void 0,
                sourceLocation: Audit.makeSourceLocationFromConsoleMessage(item, bundle)
              };
            }).slice(0, MAX_CONSOLE_ERRORS);
            const tableRows = _ErrorLogs.filterAccordingToOptions(consoleRows, auditOptions).sort((a, b) => (a.description || "").localeCompare(b.description || ""));
            const headings = [
              /* eslint-disable max-len */
              { key: "sourceLocation", valueType: "source-location", label: str_80(UIStrings.columnSource) },
              { key: "description", valueType: "code", label: str_80(UIStrings.columnDescription) }
              /* eslint-enable max-len */
            ];
            const details = Audit.makeTableDetails(headings, tableRows);
            const numErrors = tableRows.length;
            return {
              score: Number(numErrors === 0),
              details
            };
          }
        };
        errors_in_console_default = ErrorLogs;
      }
    });
    has_hsts_exports = {};
    __export2(has_hsts_exports, {
      UIStrings: () => UIStrings101,
      default: () => has_hsts_default
    });
    init_has_hsts = __esm2({
      "core/audits/has-hsts.js"() {
        "use strict";
        init_process_global();
        init_audit();
        init_main_resource();
        init_i18n();
        UIStrings101 = {
          /** Title of a Lighthouse audit that evaluates the security of a page's HSTS header. "HSTS" stands for "HTTP Strict Transport Security". */
          title: "Use a strong HSTS policy",
          /** Description of a Lighthouse audit that evaluates the security of a page's HSTS header. This is displayed after a user expands the section to see more. No character length limits. The last sentence starting with 'Learn' becomes link text to additional documentation. "HSTS" stands for "HTTP Strict Transport Security". */
          description: "Deployment of the HSTS header significantly reduces the risk of downgrading HTTP connections and eavesdropping attacks. A rollout in stages, starting with a low max-age is recommended. [Learn more about using a strong HSTS policy.](https://developer.chrome.com/docs/lighthouse/best-practices/has-hsts)",
          /** Summary text for the results of a Lighthouse audit that evaluates the HSTS header. This is displayed if no HSTS header is deployed. "HSTS" stands for "HTTP Strict Transport Security". */
          noHsts: "No HSTS header found",
          /** Summary text for the results of a Lighthouse audit that evaluates the HSTS header. This is displayed if the preload directive is missing. "HSTS" stands for "HTTP Strict Transport Security". */
          noPreload: "No `preload` directive found",
          /** Summary text for the results of a Lighthouse audit that evaluates the HSTS header. This is displayed if the includeSubDomains directive is missing. "HSTS" stands for "HTTP Strict Transport Security". */
          noSubdomain: "No `includeSubDomains` directive found",
          /** Summary text for the results of a Lighthouse audit that evaluates the HSTS header. This is displayed if the max-age directive is missing. "HSTS" stands for "HTTP Strict Transport Security". */
          noMaxAge: "No `max-age` directive",
          /** Summary text for the results of a Lighthouse audit that evaluates the HSTS header. This is displayed if the provided duration for the max-age directive is too low. "HSTS" stands for "HTTP Strict Transport Security". */
          lowMaxAge: "`max-age` is too low",
          /** Table item value calling out the presence of a syntax error. */
          invalidSyntax: "Invalid syntax",
          /** Label for a column in a data table; entries will be a directive of the HSTS header. "HSTS" stands for "HTTP Strict Transport Security". */
          columnDirective: "Directive",
          /** Label for a column in a data table; entries will be the severity of an issue with the HSTS header. "HSTS" stands for "HTTP Strict Transport Security". */
          columnSeverity: "Severity"
        };
        str_81 = createIcuMessageFn({ url: "core/audits/has-hsts.js" }.url, UIStrings101);
        HasHsts = class extends Audit {
          static {
            __name(this, "HasHsts");
          }
          /**
           * @return {LH.Audit.Meta}
           */
          static get meta() {
            return {
              id: "has-hsts",
              scoreDisplayMode: Audit.SCORING_MODES.INFORMATIVE,
              title: str_81(UIStrings101.title),
              description: str_81(UIStrings101.description),
              requiredArtifacts: ["DevtoolsLog", "URL"],
              supportedModes: ["navigation"]
            };
          }
          /**
           * @param {LH.Artifacts} artifacts
           * @param {LH.Audit.Context} context
           * @return {Promise<string[]>}
           */
          static async getRawHsts(artifacts, context2) {
            const devtoolsLog = artifacts.DevtoolsLog;
            const mainResource = await MainResourceComputed.request({ devtoolsLog, URL: artifacts.URL }, context2);
            let hstsHeaders = mainResource.responseHeaders.filter((h) => {
              return h.name.toLowerCase() === "strict-transport-security";
            }).flatMap((h) => h.value.split(";"));
            hstsHeaders = hstsHeaders.map((v) => v.toLowerCase().replace(/\s/g, ""));
            return hstsHeaders;
          }
          /**
           * @param {string} hstsDirective
           * @param {LH.IcuMessage | string} findingDescription
           * @param {LH.IcuMessage=} severity
           * @return {LH.Audit.Details.TableItem}
           */
          static findingToTableItem(hstsDirective, findingDescription, severity) {
            return {
              directive: hstsDirective,
              description: findingDescription,
              severity
            };
          }
          /**
           * @param {string[]} hstsHeaders
           * @return {{score: number, results: LH.Audit.Details.TableItem[]}}
           */
          static constructResults(hstsHeaders) {
            const rawHsts = [...hstsHeaders];
            const allowedDirectives = ["max-age", "includesubdomains", "preload"];
            const violations = [];
            const warnings = [];
            const syntax = [];
            if (!rawHsts.length) {
              return {
                score: 0,
                results: [{
                  severity: str_81(UIStrings.itemSeverityHigh),
                  description: str_81(UIStrings101.noHsts),
                  directive: void 0
                }]
              };
            }
            if (!hstsHeaders.toString().includes("max-age")) {
              violations.push({
                severity: str_81(UIStrings.itemSeverityHigh),
                description: str_81(UIStrings101.noMaxAge),
                directive: "max-age"
              });
            }
            if (!hstsHeaders.toString().includes("includesubdomains")) {
              warnings.push({
                severity: str_81(UIStrings.itemSeverityMedium),
                description: str_81(UIStrings101.noSubdomain),
                directive: "includeSubDomains"
              });
            }
            if (!hstsHeaders.toString().includes("preload")) {
              warnings.push({
                severity: str_81(UIStrings.itemSeverityMedium),
                description: str_81(UIStrings101.noPreload),
                directive: "preload"
              });
            }
            for (const actualDirective of hstsHeaders) {
              if (actualDirective.includes("max-age") && parseInt(actualDirective.split("=")[1], 10) < 31536e3) {
                violations.push({
                  severity: str_81(UIStrings.itemSeverityHigh),
                  description: str_81(UIStrings101.lowMaxAge),
                  directive: "max-age"
                });
              }
              if (!allowedDirectives.includes(actualDirective) && !actualDirective.includes("max-age")) {
                syntax.push({
                  severity: str_81(UIStrings.itemSeverityLow),
                  description: str_81(UIStrings101.invalidSyntax),
                  directive: actualDirective
                });
              }
            }
            const results = [
              ...violations.map((f) => this.findingToTableItem(f.directive, f.description, str_81(UIStrings.itemSeverityHigh))),
              ...warnings.map((f) => this.findingToTableItem(f.directive, f.description, str_81(UIStrings.itemSeverityMedium))),
              ...syntax.map((f) => this.findingToTableItem(f.directive, f.description, str_81(UIStrings.itemSeverityLow)))
            ];
            return { score: violations.length || syntax.length ? 0 : 1, results };
          }
          /**
           * @param {LH.Artifacts} artifacts
           * @param {LH.Audit.Context} context
           * @return {Promise<LH.Audit.Product>}
           */
          static async audit(artifacts, context2) {
            const hstsHeaders = await this.getRawHsts(artifacts, context2);
            const { score, results } = this.constructResults(hstsHeaders);
            const headings = [
              /* eslint-disable max-len */
              { key: "description", valueType: "text", subItemsHeading: { key: "description" }, label: str_81(UIStrings.columnDescription) },
              { key: "directive", valueType: "code", subItemsHeading: { key: "directive" }, label: str_81(UIStrings101.columnDirective) },
              { key: "severity", valueType: "text", subItemsHeading: { key: "severity" }, label: str_81(UIStrings101.columnSeverity) }
              /* eslint-enable max-len */
            ];
            const details = Audit.makeTableDetails(headings, results);
            return {
              score,
              notApplicable: !results.length,
              details
            };
          }
        };
        has_hsts_default = HasHsts;
      }
    });
    image_aspect_ratio_exports = {};
    __export2(image_aspect_ratio_exports, {
      UIStrings: () => UIStrings102,
      default: () => image_aspect_ratio_default
    });
    init_image_aspect_ratio = __esm2({
      "core/audits/image-aspect-ratio.js"() {
        "use strict";
        init_process_global();
        init_audit();
        init_url_utils();
        init_i18n();
        UIStrings102 = {
          /** Title of a Lighthouse audit that provides detail on the aspect ratios of all images on the page. This descriptive title is shown to users when all images use correct aspect ratios. */
          title: "Displays images with correct aspect ratio",
          /** Title of a Lighthouse audit that provides detail on the aspect ratios of all images on the page. This descriptive title is shown to users when not all images use correct aspect ratios. */
          failureTitle: "Displays images with incorrect aspect ratio",
          /** Description of a Lighthouse audit that tells the user why they should maintain the correct aspect ratios for all images. This is displayed after a user expands the section to see more. No character length limits. The last sentence starting with 'Learn' becomes link text to additional documentation. */
          description: "Image display dimensions should match natural aspect ratio. [Learn more about image aspect ratio](https://developer.chrome.com/docs/lighthouse/best-practices/image-aspect-ratio/).",
          /**  Label for a column in a data table; entries in the column will be the numeric aspect ratio of an image as displayed in a web page. */
          columnDisplayed: "Aspect Ratio (Displayed)",
          /**  Label for a column in a data table; entries in the column will be the numeric aspect ratio of the raw (actual) image. */
          columnActual: "Aspect Ratio (Actual)"
        };
        str_82 = createIcuMessageFn({ url: "core/audits/image-aspect-ratio.js" }.url, UIStrings102);
        THRESHOLD_PX = 2;
        ImageAspectRatio = class _ImageAspectRatio extends Audit {
          static {
            __name(this, "ImageAspectRatio");
          }
          /**
           * @return {LH.Audit.Meta}
           */
          static get meta() {
            return {
              id: "image-aspect-ratio",
              title: str_82(UIStrings102.title),
              failureTitle: str_82(UIStrings102.failureTitle),
              description: str_82(UIStrings102.description),
              requiredArtifacts: ["ImageElements"]
            };
          }
          /**
           * @param {WellDefinedImage} image
           * @return {{url: string, node: LH.Audit.Details.NodeValue, displayedAspectRatio: string, actualAspectRatio: string, doRatiosMatch: boolean}}
           */
          static computeAspectRatios(image) {
            const url = url_utils_default.elideDataURI(image.src);
            const actualAspectRatio = image.naturalDimensions.width / image.naturalDimensions.height;
            const displayedAspectRatio = image.displayedWidth / image.displayedHeight;
            const targetDisplayHeight = image.displayedWidth / actualAspectRatio;
            const targetDisplayWidth = image.displayedHeight * actualAspectRatio;
            const doRatiosMatch = targetDisplayHeight < targetDisplayWidth ? Math.abs(targetDisplayHeight - image.displayedHeight) < THRESHOLD_PX : Math.abs(targetDisplayWidth - image.displayedWidth) < THRESHOLD_PX;
            return {
              url,
              node: Audit.makeNodeItem(image.node),
              displayedAspectRatio: `${image.displayedWidth} x ${image.displayedHeight}
        (${displayedAspectRatio.toFixed(2)})`,
              actualAspectRatio: `${image.naturalDimensions.width} x ${image.naturalDimensions.height}
        (${actualAspectRatio.toFixed(2)})`,
              doRatiosMatch
            };
          }
          /**
           * @param {LH.Artifacts} artifacts
           * @return {LH.Audit.Product}
           */
          static audit(artifacts) {
            const images = artifacts.ImageElements;
            const results = [];
            images.filter((image) => {
              return !image.isCss && url_utils_default.guessMimeType(image.src) !== "image/svg+xml" && image.naturalDimensions && image.naturalDimensions.height > 5 && image.naturalDimensions.width > 5 && image.displayedWidth && image.displayedHeight && image.computedStyles.objectFit === "fill";
            }).forEach((image) => {
              const wellDefinedImage = (
                /** @type {WellDefinedImage} */
                image
              );
              const processed = _ImageAspectRatio.computeAspectRatios(wellDefinedImage);
              if (!processed.doRatiosMatch)
                results.push(processed);
            });
            const headings = [
              { key: "node", valueType: "node", label: "" },
              { key: "url", valueType: "url", label: str_82(UIStrings.columnURL) },
              { key: "displayedAspectRatio", valueType: "text", label: str_82(UIStrings102.columnDisplayed) },
              { key: "actualAspectRatio", valueType: "text", label: str_82(UIStrings102.columnActual) }
            ];
            return {
              score: Number(results.length === 0),
              details: Audit.makeTableDetails(headings, results)
            };
          }
        };
        image_aspect_ratio_default = ImageAspectRatio;
      }
    });
    init_image_records = __esm2({
      "core/computed/image-records.js"() {
        "use strict";
        init_process_global();
        init_url_utils();
        init_computed_artifact();
        ImageRecords = class _ImageRecords {
          static {
            __name(this, "ImageRecords");
          }
          /**
           * @param {LH.Artifacts.NetworkRequest[]} networkRecords
           */
          static indexNetworkRecords(networkRecords) {
            return networkRecords.reduce(
              (map2, record2) => {
                const isImage = /^image/.test(record2.mimeType) || /\.(avif|webp)$/i.test(record2.url);
                if (isImage && record2.finished && record2.statusCode === 200) {
                  map2[record2.url] = record2;
                }
                return map2;
              },
              /** @type {Record<string, LH.Artifacts.NetworkRequest>} */
              {}
            );
          }
          /**
           * @param {{ImageElements: LH.Artifacts['ImageElements'], networkRecords: LH.Artifacts.NetworkRequest[]}} data
           * @return {Promise<LH.Artifacts.ImageElementRecord[]>}
           */
          static async compute_(data312) {
            const indexedNetworkRecords = _ImageRecords.indexNetworkRecords(data312.networkRecords);
            const imageRecords = [];
            for (const element of data312.ImageElements) {
              const networkRecord = indexedNetworkRecords[element.src];
              const mimeType = networkRecord?.mimeType;
              imageRecords.push({
                ...element,
                mimeType: mimeType ? mimeType : url_utils_default.guessMimeType(element.src)
              });
            }
            imageRecords.sort((a, b) => {
              const aRecord = indexedNetworkRecords[a.src] || {};
              const bRecord = indexedNetworkRecords[b.src] || {};
              return bRecord.resourceSize - aRecord.resourceSize;
            });
            return imageRecords;
          }
        };
        ImageRecordsComputed = makeComputedArtifact(ImageRecords, ["ImageElements", "networkRecords"]);
      }
    });
    image_size_responsive_exports = {};
    __export2(image_size_responsive_exports, {
      UIStrings: () => UIStrings103,
      default: () => image_size_responsive_default
    });
    init_image_size_responsive = __esm2({
      "core/audits/image-size-responsive.js"() {
        "use strict";
        init_process_global();
        init_audit();
        init_image_records();
        init_network_records();
        init_url_utils();
        init_i18n();
        UIStrings103 = {
          /** Title of a Lighthouse audit that provides detail on the size of visible images on the page. This descriptive title is shown to users when all images have correct sizes. */
          title: "Serves images with appropriate resolution",
          /** Title of a Lighthouse audit that provides detail on the size of visible images on the page. This descriptive title is shown to users when not all images have correct sizes. */
          failureTitle: "Serves images with low resolution",
          /** Description of a Lighthouse audit that tells the user why they should maintain an appropriate size for all images. This is displayed after a user expands the section to see more. No character length limits. The last sentence starting with 'Learn' becomes link text to additional documentation. */
          description: "Image natural dimensions should be proportional to the display size and the pixel ratio to maximize image clarity. [Learn how to provide responsive images](https://web.dev/articles/serve-responsive-images).",
          /**  Label for a column in a data table; entries in the column will be a string representing the displayed size of the image. */
          columnDisplayed: "Displayed size",
          /**  Label for a column in a data table; entries in the column will be a string representing the actual size of the image. */
          columnActual: "Actual size",
          /**  Label for a column in a data table; entries in the column will be a string representing the expected size of the image. */
          columnExpected: "Expected size"
        };
        str_83 = createIcuMessageFn({ url: "core/audits/image-size-responsive.js" }.url, UIStrings103);
        SMALL_IMAGE_FACTOR = 1;
        LARGE_IMAGE_FACTOR = 0.75;
        SMALL_IMAGE_THRESHOLD = 64;
        __name(isVisible, "isVisible");
        __name(isSmallerThanViewport, "isSmallerThanViewport");
        __name(isCandidate, "isCandidate");
        __name(imageHasNaturalDimensions, "imageHasNaturalDimensions");
        __name(imageHasRightSize, "imageHasRightSize");
        __name(getResult, "getResult");
        __name(allowedImageSize, "allowedImageSize");
        __name(expectedImageSize, "expectedImageSize");
        __name(deduplicateResultsByUrl, "deduplicateResultsByUrl");
        __name(sortResultsBySizeDelta, "sortResultsBySizeDelta");
        ImageSizeResponsive = class extends Audit {
          static {
            __name(this, "ImageSizeResponsive");
          }
          /**
           * @return {LH.Audit.Meta}
           */
          static get meta() {
            return {
              id: "image-size-responsive",
              title: str_83(UIStrings103.title),
              failureTitle: str_83(UIStrings103.failureTitle),
              description: str_83(UIStrings103.description),
              requiredArtifacts: ["ImageElements", "ViewportDimensions"],
              __internalOptionalArtifacts: ["DevtoolsLog"]
            };
          }
          /**
           * @param {LH.Artifacts} artifacts
           * @param {LH.Audit.Context} context
           * @return {Promise<LH.Audit.Product>}
           */
          static async audit(artifacts, context2) {
            const DPR = artifacts.ViewportDimensions.devicePixelRatio;
            const imageRecordsByURL = /* @__PURE__ */ new Map();
            if (artifacts.DevtoolsLog) {
              const networkRecords = await NetworkRecordsComputed.request(artifacts.DevtoolsLog, context2);
              const images = await ImageRecordsComputed.request({
                ImageElements: artifacts.ImageElements,
                networkRecords
              }, context2);
              images.forEach((img) => imageRecordsByURL.set(img.src, img));
            }
            const results = Array.from(artifacts.ImageElements).filter((image) => isCandidate(image, imageRecordsByURL.get(image.src))).filter(imageHasNaturalDimensions).filter((image) => !imageHasRightSize(image, DPR)).filter((image) => isVisible(image.clientRect, artifacts.ViewportDimensions)).filter((image) => isSmallerThanViewport(image.clientRect, artifacts.ViewportDimensions)).map((image) => getResult(image, DPR));
            const headings = [
              { key: "node", valueType: "node", label: "" },
              { key: "url", valueType: "url", label: str_83(UIStrings.columnURL) },
              { key: "displayedSize", valueType: "text", label: str_83(UIStrings103.columnDisplayed) },
              { key: "actualSize", valueType: "text", label: str_83(UIStrings103.columnActual) },
              { key: "expectedSize", valueType: "text", label: str_83(UIStrings103.columnExpected) }
            ];
            const finalResults = sortResultsBySizeDelta(deduplicateResultsByUrl(results));
            return {
              score: Number(results.length === 0),
              details: Audit.makeTableDetails(headings, finalResults)
            };
          }
        };
        __name(quantizeDpr, "quantizeDpr");
        image_size_responsive_default = ImageSizeResponsive;
      }
    });
    is_on_https_exports = {};
    __export2(is_on_https_exports, {
      UIStrings: () => UIStrings104,
      default: () => is_on_https_default
    });
    init_is_on_https = __esm2({
      "core/audits/is-on-https.js"() {
        "use strict";
        init_process_global();
        init_audit();
        init_url_utils();
        init_network_request();
        init_network_records();
        init_i18n();
        UIStrings104 = {
          /** Title of a Lighthouse audit that provides detail on the useage of HTTPS on a page. This descriptive title is shown to users when all requests on a page are fufilled using HTTPS. */
          title: "Uses HTTPS",
          /** Title of a Lighthouse audit that provides detail on the useage of HTTPS on a page. This descriptive title is shown to users when some, or all, requests on the page use HTTP instead of HTTPS. */
          failureTitle: "Does not use HTTPS",
          /** Description of a Lighthouse audit that tells the user *why* HTTPS use *for all resources* is important. This is displayed after a user expands the section to see more. No character length limits. The last sentence starting with 'Learn' becomes link text to additional documentation. */
          description: "All sites should be protected with HTTPS, even ones that don't handle sensitive data. This includes avoiding [mixed content](https://developers.google.com/web/fundamentals/security/prevent-mixed-content/what-is-mixed-content), where some resources are loaded over HTTP despite the initial request being served over HTTPS. HTTPS prevents intruders from tampering with or passively listening in on the communications between your app and your users, and is a prerequisite for HTTP/2 and many new web platform APIs. [Learn more about HTTPS](https://developer.chrome.com/docs/lighthouse/pwa/is-on-https/).",
          /** [ICU Syntax] Label identifying the number of insecure network requests found by an audit of a web page. */
          displayValue: `{itemCount, plural,
    =1 {1 insecure request found}
    other {# insecure requests found}
    }`,
          /** Label for a column in a data table; entries in the column will be the URLs of insecure (non-HTTPS) network requests. */
          columnInsecureURL: "Insecure URL",
          /** Label for a column in a data table; entries in the column will be how the browser handled insecure (non-HTTPS) network requests. */
          columnResolution: "Request Resolution",
          /** Value for the resolution column in a data table; denotes that the insecure URL was allowed by the browser. */
          allowed: "Allowed",
          /** Value for the resolution column in a data table; denotes that the insecure URL was blocked by the browser. */
          blocked: "Blocked",
          /** Value for the resolution column in a data table; denotes that the insecure URL may be blocked by the browser in the future. */
          warning: "Allowed with warning",
          /** Value for the resolution column in a data table; denotes that the insecure URL was upgraded to a secure request by the browser. */
          upgraded: "Automatically upgraded to HTTPS"
        };
        resolutionToString = {
          MixedContentAutomaticallyUpgraded: UIStrings104.upgraded,
          MixedContentBlocked: UIStrings104.blocked,
          MixedContentWarning: UIStrings104.warning
        };
        str_84 = createIcuMessageFn({ url: "core/audits/is-on-https.js" }.url, UIStrings104);
        HTTPS = class extends Audit {
          static {
            __name(this, "HTTPS");
          }
          /**
           * @return {LH.Audit.Meta}
           */
          static get meta() {
            return {
              id: "is-on-https",
              title: str_84(UIStrings104.title),
              failureTitle: str_84(UIStrings104.failureTitle),
              description: str_84(UIStrings104.description),
              requiredArtifacts: ["DevtoolsLog", "InspectorIssues"]
            };
          }
          /**
           * @param {LH.Artifacts} artifacts
           * @param {LH.Audit.Context} context
           * @return {Promise<LH.Audit.Product>}
           */
          static async audit(artifacts, context2) {
            const devtoolsLogs = artifacts.DevtoolsLog;
            const networkRecords = await NetworkRecordsComputed.request(devtoolsLogs, context2);
            const insecureURLs = networkRecords.filter((record2) => !NetworkRequest.isSecureRequest(record2)).map((record2) => url_utils_default.elideDataURI(record2.url));
            const items2 = Array.from(new Set(insecureURLs)).map((url) => ({ url, resolution: void 0 }));
            const headings = [
              { key: "url", valueType: "url", label: str_84(UIStrings104.columnInsecureURL) },
              { key: "resolution", valueType: "text", label: str_84(UIStrings104.columnResolution) }
            ];
            for (const details of artifacts.InspectorIssues.mixedContentIssue ?? []) {
              let item = items2.find((item2) => item2.url === details.insecureURL);
              if (!item) {
                item = { url: details.insecureURL };
                items2.push(item);
              }
              item.resolution = resolutionToString[details.resolutionStatus] ? str_84(resolutionToString[details.resolutionStatus]) : details.resolutionStatus;
            }
            for (const item of items2) {
              if (!item.resolution)
                item.resolution = str_84(UIStrings104.allowed);
            }
            let displayValue;
            if (items2.length > 0) {
              displayValue = str_84(UIStrings104.displayValue, { itemCount: items2.length });
            }
            return {
              score: Number(items2.length === 0),
              displayValue,
              details: Audit.makeTableDetails(headings, items2)
            };
          }
        };
        is_on_https_default = HTTPS;
      }
    });
    origin_isolation_exports = {};
    __export2(origin_isolation_exports, {
      UIStrings: () => UIStrings105,
      default: () => origin_isolation_default
    });
    init_origin_isolation = __esm2({
      "core/audits/origin-isolation.js"() {
        "use strict";
        init_process_global();
        init_audit();
        init_main_resource();
        init_i18n();
        UIStrings105 = {
          /** Title of a Lighthouse audit that evaluates the security of a page's COOP header for origin isolation. "COOP" stands for "Cross-Origin-Opener-Policy" and should not be translated. */
          title: "Ensure proper origin isolation with COOP",
          /** Description of a Lighthouse audit that evaluates the security of a page's COOP header for origin isolation. This is displayed after a user expands the section to see more. No character length limits. The last sentence starting with 'Learn' becomes link text to additional documentation. "COOP" stands for "Cross-Origin-Opener-Policy", neither should be translated. */
          description: "The Cross-Origin-Opener-Policy (COOP) can be used to isolate the top-level window from other documents such as pop-ups. [Learn more about deploying the COOP header.](https://web.dev/articles/why-coop-coep#coop)",
          /** Summary text for the results of a Lighthouse audit that evaluates the COOP header for origin isolation. This is displayed if no COOP header is deployed. "COOP" stands for "Cross-Origin-Opener-Policy" and should not be translated. */
          noCoop: "No COOP header found",
          /** Table item value calling out the presence of a syntax error. */
          invalidSyntax: "Invalid syntax",
          /** Label for a column in a data table; entries will be a directive of the COOP header. "COOP" stands for "Cross-Origin-Opener-Policy". */
          columnDirective: "Directive",
          /** Label for a column in a data table; entries will be the severity of an issue with the COOP header. "COOP" stands for "Cross-Origin-Opener-Policy". */
          columnSeverity: "Severity"
        };
        str_85 = createIcuMessageFn({ url: "core/audits/origin-isolation.js" }.url, UIStrings105);
        OriginIsolation = class extends Audit {
          static {
            __name(this, "OriginIsolation");
          }
          /**
           * @return {LH.Audit.Meta}
           */
          static get meta() {
            return {
              id: "origin-isolation",
              scoreDisplayMode: Audit.SCORING_MODES.INFORMATIVE,
              title: str_85(UIStrings105.title),
              description: str_85(UIStrings105.description),
              requiredArtifacts: ["DevtoolsLog", "URL"],
              supportedModes: ["navigation"]
            };
          }
          /**
           * @param {LH.Artifacts} artifacts
           * @param {LH.Audit.Context} context
           * @return {Promise<string[]>}
           */
          static async getRawCoop(artifacts, context2) {
            const devtoolsLog = artifacts.DevtoolsLog;
            const mainResource = await MainResourceComputed.request({ devtoolsLog, URL: artifacts.URL }, context2);
            let coopHeaders = mainResource.responseHeaders.filter((h) => {
              return h.name.toLowerCase() === "cross-origin-opener-policy";
            }).flatMap((h) => h.value);
            coopHeaders = coopHeaders.map((v) => v.toLowerCase().replace(/\s/g, ""));
            return coopHeaders;
          }
          /**
           * @param {string | undefined} coopDirective
           * @param {LH.IcuMessage | string} findingDescription
           * @param {LH.IcuMessage=} severity
           * @return {LH.Audit.Details.TableItem}
           */
          static findingToTableItem(coopDirective, findingDescription, severity) {
            return {
              directive: coopDirective,
              description: findingDescription,
              severity
            };
          }
          /**
           * @param {string[]} coopHeaders
           * @return {{score: number, results: LH.Audit.Details.TableItem[]}}
           */
          static constructResults(coopHeaders) {
            const rawCoop = [...coopHeaders];
            const allowedDirectives = [
              "unsafe-none",
              "same-origin-allow-popups",
              "same-origin",
              "noopener-allow-popups"
            ];
            const violations = [];
            const syntax = [];
            if (!rawCoop.length) {
              violations.push({
                severity: str_85(UIStrings.itemSeverityHigh),
                description: str_85(UIStrings105.noCoop),
                directive: void 0
              });
            }
            for (const actualDirective of coopHeaders) {
              if (!allowedDirectives.includes(actualDirective)) {
                syntax.push({
                  severity: str_85(UIStrings.itemSeverityLow),
                  description: str_85(UIStrings105.invalidSyntax),
                  directive: actualDirective
                });
              }
            }
            const results = [
              ...violations.map((f) => this.findingToTableItem(f.directive, f.description, str_85(UIStrings.itemSeverityHigh))),
              ...syntax.map((f) => this.findingToTableItem(f.directive, f.description, str_85(UIStrings.itemSeverityLow)))
            ];
            return { score: violations.length || syntax.length ? 0 : 1, results };
          }
          /**
           * @param {LH.Artifacts} artifacts
           * @param {LH.Audit.Context} context
           * @return {Promise<LH.Audit.Product>}
           */
          static async audit(artifacts, context2) {
            const coopHeaders = await this.getRawCoop(artifacts, context2);
            const { score, results } = this.constructResults(coopHeaders);
            const headings = [
              /* eslint-disable max-len */
              { key: "description", valueType: "text", subItemsHeading: { key: "description" }, label: str_85(UIStrings.columnDescription) },
              { key: "directive", valueType: "code", subItemsHeading: { key: "directive" }, label: str_85(UIStrings105.columnDirective) },
              { key: "severity", valueType: "text", subItemsHeading: { key: "severity" }, label: str_85(UIStrings105.columnSeverity) }
              /* eslint-enable max-len */
            ];
            const details = Audit.makeTableDetails(headings, results);
            return {
              score,
              notApplicable: !results.length,
              details
            };
          }
        };
        origin_isolation_default = OriginIsolation;
      }
    });
    redirects_http_exports = {};
    __export2(redirects_http_exports, {
      UIStrings: () => UIStrings106,
      default: () => redirects_http_default
    });
    init_redirects_http = __esm2({
      "core/audits/redirects-http.js"() {
        "use strict";
        init_process_global();
        init_audit();
        init_i18n();
        init_url_utils();
        UIStrings106 = {
          /** Title of a Lighthouse audit that provides detail on HTTP to HTTPS redirects. This descriptive title is shown to users when HTTP traffic is redirected to HTTPS. */
          title: "Redirects HTTP traffic to HTTPS",
          /** Title of a Lighthouse audit that provides detail on HTTP to HTTPS redirects. This descriptive title is shown to users when HTTP traffic is not redirected to HTTPS. */
          failureTitle: "Does not redirect HTTP traffic to HTTPS",
          /** Description of a Lighthouse audit that tells the user why they should direct HTTP traffic to HTTPS. This is displayed after a user expands the section to see more. No character length limits. 'Learn More' becomes link text to additional documentation. */
          description: "Make sure that you redirect all HTTP traffic to HTTPS in order to enable secure web features for all your users. [Learn more](https://developer.chrome.com/docs/lighthouse/pwa/redirects-http/)."
        };
        str_86 = createIcuMessageFn({ url: "core/audits/redirects-http.js" }.url, UIStrings106);
        RedirectsHTTP = class extends Audit {
          static {
            __name(this, "RedirectsHTTP");
          }
          /**
           * @return {LH.Audit.Meta}
           */
          static get meta() {
            return {
              id: "redirects-http",
              title: str_86(UIStrings106.title),
              failureTitle: str_86(UIStrings106.failureTitle),
              description: str_86(UIStrings106.description),
              requiredArtifacts: ["URL"],
              supportedModes: ["navigation"]
            };
          }
          /**
           * @param {LH.Artifacts} artifacts
           * @return {LH.Audit.Product}
           */
          static audit(artifacts) {
            if (!artifacts.URL.requestedUrl) {
              throw new Error("Missing requestedUrl");
            }
            const requestedUrl = new URL(artifacts.URL.requestedUrl);
            const finalDisplayedUrl = new URL(artifacts.URL.finalDisplayedUrl);
            const startedInsecure = requestedUrl.protocol === "http:";
            const isLocalhost = url_utils_default.isLikeLocalhost(finalDisplayedUrl.hostname);
            if (!startedInsecure || isLocalhost) {
              return {
                score: null,
                notApplicable: true
              };
            }
            const endedSecure = finalDisplayedUrl.protocol === "https:";
            return {
              score: Number(endedSecure)
            };
          }
        };
        redirects_http_default = RedirectsHTTP;
      }
    });
    canonical_exports = {};
    __export2(canonical_exports, {
      UIStrings: () => UIStrings107,
      default: () => canonical_default
    });
    init_canonical = __esm2({
      "core/audits/seo/canonical.js"() {
        "use strict";
        init_process_global();
        init_audit();
        init_url_utils();
        init_main_resource();
        init_i18n();
        UIStrings107 = {
          /** Title of a Lighthouse audit that provides detail on a page's rel=canonical link. This descriptive title is shown to users when the rel=canonical link is valid. "rel=canonical" is an HTML attribute and value and so should not be translated. */
          title: "Document has a valid `rel=canonical`",
          /** Title of a Lighthouse audit that provides detail on a page's rel=canonical link. This descriptive title is shown to users when the rel=canonical link is invalid and should be fixed. "rel=canonical" is an HTML attribute and value and so should not be translated. */
          failureTitle: "Document does not have a valid `rel=canonical`",
          /** Description of a Lighthouse audit that tells the user *why* they need to have a valid rel=canonical link. This is displayed after a user expands the section to see more. No character length limits. The last sentence starting with 'Learn' becomes link text to additional documentation. */
          description: "Canonical links suggest which URL to show in search results. [Learn more about canonical links](https://developer.chrome.com/docs/lighthouse/seo/canonical/).",
          /**
           * @description Explanatory message stating that there was a failure in an audit caused by multiple URLs conflicting with each other.
           * @example {https://example.com, https://example2.com} urlList
           * */
          explanationConflict: "Multiple conflicting URLs ({urlList})",
          /**
           * @description Explanatory message stating that there was a failure in an audit caused by a URL being invalid.
           * @example {https://example.com/} url
           * */
          explanationInvalid: "Invalid URL ({url})",
          /**
           * @description Explanatory message stating that there was a failure in an audit caused by a URL being relative instead of absolute.
           * @example {https://example.com/} url
           * */
          explanationRelative: "Is not an absolute URL ({url})",
          /**
           * @description Explanatory message stating that there was a failure in an audit caused by a URL pointing to a different hreflang than the current context.'hreflang' is an HTML attribute and should not be translated.
           * @example {https://example.com/} url
           */
          explanationPointsElsewhere: "Points to another `hreflang` location ({url})",
          /** Explanatory message stating that the page's canonical URL was pointing to the domain's root URL, which is a common mistake. "points" refers to the action of the 'rel=canonical' referencing another link. "root" refers to the starting/home page of the website. "domain" refers to the registered domain name of the website. */
          explanationRoot: "Points to the domain's root URL (the homepage), instead of an equivalent page of content"
        };
        str_87 = createIcuMessageFn({ url: "core/audits/seo/canonical.js" }.url, UIStrings107);
        Canonical = class _Canonical extends Audit {
          static {
            __name(this, "Canonical");
          }
          /**
           * @return {LH.Audit.Meta}
           */
          static get meta() {
            return {
              id: "canonical",
              title: str_87(UIStrings107.title),
              failureTitle: str_87(UIStrings107.failureTitle),
              description: str_87(UIStrings107.description),
              supportedModes: ["navigation"],
              requiredArtifacts: ["LinkElements", "URL", "DevtoolsLog"]
            };
          }
          /**
           * @param {LH.Artifacts.LinkElement[]} linkElements
           * @return {CanonicalURLData}
           */
          static collectCanonicalURLs(linkElements) {
            const uniqueCanonicalURLs = /* @__PURE__ */ new Set();
            const hreflangURLs = /* @__PURE__ */ new Set();
            let invalidCanonicalLink;
            let relativeCanonicallink;
            for (const link2 of linkElements) {
              if (link2.source === "body")
                continue;
              if (link2.rel === "canonical") {
                if (!link2.hrefRaw)
                  continue;
                if (!link2.href)
                  invalidCanonicalLink = link2;
                else if (!url_utils_default.isValid(link2.hrefRaw))
                  relativeCanonicallink = link2;
                else
                  uniqueCanonicalURLs.add(link2.href);
              } else if (link2.rel === "alternate") {
                if (link2.href && link2.hreflang)
                  hreflangURLs.add(link2.href);
              }
            }
            return { uniqueCanonicalURLs, hreflangURLs, invalidCanonicalLink, relativeCanonicallink };
          }
          /**
           * @param {CanonicalURLData} canonicalURLData
           * @return {LH.Audit.Product|undefined}
           */
          static findInvalidCanonicalURLReason(canonicalURLData) {
            const { uniqueCanonicalURLs, invalidCanonicalLink, relativeCanonicallink } = canonicalURLData;
            if (invalidCanonicalLink) {
              return {
                score: 0,
                explanation: str_87(UIStrings107.explanationInvalid, { url: invalidCanonicalLink.hrefRaw })
              };
            }
            if (relativeCanonicallink) {
              return {
                score: 0,
                explanation: str_87(UIStrings107.explanationRelative, { url: relativeCanonicallink.hrefRaw })
              };
            }
            const canonicalURLs = Array.from(uniqueCanonicalURLs);
            if (canonicalURLs.length === 0) {
              return {
                score: 1,
                notApplicable: true
              };
            }
            if (canonicalURLs.length > 1) {
              return {
                score: 0,
                explanation: str_87(UIStrings107.explanationConflict, { urlList: canonicalURLs.join(", ") })
              };
            }
          }
          /**
           * @param {CanonicalURLData} canonicalURLData
           * @param {URL} canonicalURL
           * @param {URL} baseURL
           * @return {LH.Audit.Product|undefined}
           */
          static findCommonCanonicalURLMistakes(canonicalURLData, canonicalURL, baseURL) {
            const { hreflangURLs } = canonicalURLData;
            if (hreflangURLs.has(baseURL.href) && hreflangURLs.has(canonicalURL.href) && baseURL.href !== canonicalURL.href) {
              return {
                score: 0,
                explanation: str_87(UIStrings107.explanationPointsElsewhere, { url: baseURL.href })
              };
            }
            if (canonicalURL.origin === baseURL.origin && canonicalURL.pathname === "/" && baseURL.pathname !== "/") {
              return {
                score: 0,
                explanation: str_87(UIStrings107.explanationRoot)
              };
            }
          }
          /**
           * @param {LH.Artifacts} artifacts
           * @param {LH.Audit.Context} context
           * @return {Promise<LH.Audit.Product>}
           */
          static async audit(artifacts, context2) {
            const devtoolsLog = artifacts.DevtoolsLog;
            const mainResource = await MainResourceComputed.request({ devtoolsLog, URL: artifacts.URL }, context2);
            const baseURL = new URL(mainResource.url);
            const canonicalURLData = _Canonical.collectCanonicalURLs(artifacts.LinkElements);
            const invalidURLAuditProduct = _Canonical.findInvalidCanonicalURLReason(canonicalURLData);
            if (invalidURLAuditProduct)
              return invalidURLAuditProduct;
            const canonicalURL = new URL([...canonicalURLData.uniqueCanonicalURLs][0]);
            const mistakeAuditProduct = _Canonical.findCommonCanonicalURLMistakes(canonicalURLData, canonicalURL, baseURL);
            if (mistakeAuditProduct)
              return mistakeAuditProduct;
            return {
              score: 1
            };
          }
        };
        canonical_default = Canonical;
      }
    });
    crawlable_anchors_exports = {};
    __export2(crawlable_anchors_exports, {
      UIStrings: () => UIStrings108,
      default: () => crawlable_anchors_default
    });
    init_crawlable_anchors = __esm2({
      "core/audits/seo/crawlable-anchors.js"() {
        "use strict";
        init_process_global();
        init_audit();
        init_i18n();
        UIStrings108 = {
          /** Title of a Lighthouse audit that provides detail on whether links have potentially-crawlable href attributes. This descriptive title is shown when all links on the page are potentially-crawlable. */
          title: "Links are crawlable",
          /** Descriptive title of a Lighthouse audit that provides detail on whether links have potentially-crawlable href attributes. This descriptive title is shown when there are href attributes which are not crawlable by search engines. */
          failureTitle: "Links are not crawlable",
          /** Description of a Lighthouse audit that tells the user why href attributes on links should be crawlable. This is displayed after a user expands the section to see more. The last sentence starting with 'Learn' becomes link text to additional documentation. */
          description: "Search engines may use `href` attributes on links to crawl websites. Ensure that the `href` attribute of anchor elements links to an appropriate destination, so more pages of the site can be discovered. [Learn how to make links crawlable](https://support.google.com/webmasters/answer/9112205)",
          /** Label for a column in a data table; entries will be the HTML anchor elements that failed the audit. Anchors are DOM elements that are links. */
          columnFailingLink: "Uncrawlable Link"
        };
        hrefAssociatedAttributes = [
          "target",
          "download",
          "ping",
          "rel",
          "hreflang",
          "type",
          "referrerpolicy"
        ];
        str_88 = createIcuMessageFn({ url: "core/audits/seo/crawlable-anchors.js" }.url, UIStrings108);
        CrawlableAnchors = class extends Audit {
          static {
            __name(this, "CrawlableAnchors");
          }
          /**
           * @return {LH.Audit.Meta}
           */
          static get meta() {
            return {
              id: "crawlable-anchors",
              title: str_88(UIStrings108.title),
              failureTitle: str_88(UIStrings108.failureTitle),
              description: str_88(UIStrings108.description),
              requiredArtifacts: ["AnchorElements", "URL"]
            };
          }
          /**
           * @param {LH.Artifacts} artifacts
           * @return {LH.Audit.Product}
           */
          static audit({ AnchorElements: anchorElements, URL: url }) {
            const failingAnchors = anchorElements.filter(({ rawHref, name = "", role = "", id: id2, href, attributeNames = [], listeners = [] }) => {
              rawHref = rawHref.replace(/\s/g, "");
              name = name.trim();
              role = role.trim();
              if (role.length > 0)
                return;
              if (rawHref.startsWith("mailto:"))
                return;
              if (rawHref === "" && id2)
                return;
              const javaScriptVoidRegExp = /javascript:void(\(|)0(\)|)/;
              if (rawHref.startsWith("file:"))
                return true;
              if (name.length > 0)
                return;
              if (!attributeNames.includes("href") && hrefAssociatedAttributes.every((attribute) => !attributeNames.includes(attribute))) {
                return Boolean(listeners.length);
              }
              if (href === "")
                return true;
              if (javaScriptVoidRegExp.test(rawHref))
                return true;
              try {
                new URL(rawHref, url.finalDisplayedUrl);
              } catch (e) {
                return true;
              }
            });
            const headings = [{
              key: "node",
              valueType: "node",
              label: str_88(UIStrings108.columnFailingLink)
            }];
            const itemsToDisplay = failingAnchors.map((anchor) => {
              return {
                node: Audit.makeNodeItem(anchor.node)
              };
            });
            return {
              score: Number(failingAnchors.length === 0),
              details: Audit.makeTableDetails(headings, itemsToDisplay)
            };
          }
        };
        crawlable_anchors_default = CrawlableAnchors;
      }
    });
    init_valid_langs = __esm2({
      "third-party/axe/valid-langs.js"() {
        "use strict";
        init_process_global();
        langs = [
          ,
          [, [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, , 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [, 1, 1, , 1, 1, 1, , 1, 1, , 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [, 1, 1, , 1, 1, 1, 1, 1, 1, 1, , 1, , 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, , , , , , 1, 1, 1, 1, , , 1, 1, 1, , 1, , 1, , 1, 1], [1, 1, 1, , 1, 1, , 1, 1, 1, , 1, , , 1, 1, 1, , , 1, 1, 1, , , , , 1], [, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [, 1, 1, , , , , 1, 1, 1, , 1, 1, 1, 1, 1, 1, , 1, 1, 1], [, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , , 1, 1, 1], [, 1, , , , , , 1, , 1, , , , , 1, , 1, , , 1, 1, 1, , 1, , , 1], [1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [
            1,
            1,
            1,
            1,
            ,
            1,
            1,
            1,
            ,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1
          ], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , , , 1, 1, 1, 1, , , 1, , 1], [, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [, 1, , 1, 1, , , 1, , , , 1, 1, 1, 1, , 1, , 1, , 1, , , , , , 1], [1, , 1, 1, 1, 1, , , 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [, 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1], [1, , 1, , 1, , , , , 1, , 1, 1, 1, 1, 1, , , , 1, 1, 1, 1], [, 1, 1, 1, 1, 1, , 1, 1, 1, , 1, , 1, 1, 1, , , 1, 1, 1, 1, 1, 1, 1, 1], [, , 1, , , 1, , 1, , , , 1, 1, 1, , , , , , , , , , , 1], [1, 1, 1, 1, 1, 1, , 1, 1, 1, , 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, , , 1, 1, 1], [1, 1, 1, 1, 1, , , 1, , , 1, , , 1, 1, 1, , , , , 1, , , , , , 1]],
          [, [
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            ,
            1,
            ,
            1,
            1,
            1,
            ,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1
          ], [, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1], [, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, , , 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1], [, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1], [
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1
          ], [1, 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, , , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1], [, 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1], [, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1], [, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1], [, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, , 1], [
            ,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            ,
            1,
            1,
            1,
            1,
            1
          ], [, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]],
          [, [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1], [, 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, , 1, 1, , 1, 1, 1, 1, 1, 1, 1, , 1], [, 1, , 1, 1, 1, , 1, 1, , 1, , 1, 1, 1, 1, 1, 1, 1, 1], [, 1, , 1, 1, 1, 1, 1, 1, 1, 1, , , 1, 1, 1, , , 1, 1, , , , , , 1, 1], [1, 1, 1, , , , , 1, , , , 1, 1, , 1, , , , , , 1, , , , , 1], [, 1, , , 1, , , 1, , , , , , 1], [, 1, , 1, , , , 1, , , , 1], [1, , 1, 1, 1, , 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, , , 1, 1, 1, 1], [, 1, 1, 1, 1, 1, , , 1, , , 1, , 1, 1, , 1, , 1, , , , , 1, , 1], [, 1, , , , 1, , , 1, 1, , 1, , 1, 1, 1, 1, , 1, 1, , , 1, , , 1], [, 1, 1, , , , , , 1, , , , 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, , 1, 1, 1], [, 1, , 1, 1, 1, , , 1, 1, 1, 1, 1, 1, , 1, , , , 1, 1, 1, , 1, , 1], [, 1, , 1, , 1, , 1, , 1, , 1, 1, 1, 1, 1, , , 1, 1, 1], [, 1, 1, 1, , , , 1, 1, 1, , 1, 1, , , 1, 1, 1, 1, 1, 1, 1, , 1, 1], [
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            ,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            ,
            ,
            1,
            1,
            1,
            1,
            1,
            1,
            1
          ], [, 1, 1, 1, , 1, 1, 1, , 1, , , , , 1, 1, 1, , , 1, , 1, , , 1, 1], [, , , , 1, , , , , , , , , , , , , , , , , 1], [1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [, 1, , 1, 1, 1, , 1, 1, , , , 1, 1, 1, 1, 1, , , 1, 1, 1, , , , 1, 1], [1, 1, 1, 1, , , , 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, , , , , , , 1, , , , , , , 1], [, 1, 1, , 1, 1, , 1, , , , , , , , , , , , , 1], [, , , , , , , , 1], [1, 1, 1, , , , , , , , , , , , , 1], [, , , , , , , , 1, , , 1, , , 1, 1, , , , , 1]],
          [, [1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1], [, 1, 1, , 1, 1, 1, 1, , 1, 1, , 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, , 1], [, , , 1, , , , , , , , , , , , , , , 1], [, 1, , , 1, 1, , 1, , 1, 1, , , , 1, 1, , , 1, 1, , , , 1], [
            1,
            ,
            ,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            ,
            1,
            1,
            1,
            1,
            ,
            1,
            1,
            1,
            1,
            ,
            ,
            1,
            ,
            ,
            ,
            1
          ], , [, 1, 1, 1, 1, 1, , 1, 1, 1, , 1, 1, , 1, 1, , , 1, 1, 1, 1, , 1, 1, , 1], [, 1, , , 1, , , 1, , 1, , , 1, 1, 1, 1, , , 1, 1, , 1, 1, 1, 1], [, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1], [, 1, 1, 1, 1, 1, 1, , , 1, 1, 1, 1, 1, 1, 1, , , 1, , , 1, , 1], [, 1, , , , , , 1, , , , 1, 1, , , , , , 1, 1, , , , , 1], [, , , , , , , 1, , , , 1, , 1, 1], [, 1, 1, 1, 1, 1, 1, 1, , , , 1, 1, 1, 1, 1, , , 1, 1, , 1, 1, 1, 1, 1], [, 1, , , 1, 1, , 1, , 1, 1, 1, , , 1, 1, , , 1, , 1, 1, 1, 1, , 1], [, 1, 1, 1, , 1, 1, , 1, 1, , 1, 1, , 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1], [, , , , , , , , , , , , , , , , 1], , [, 1, 1, 1, 1, 1, , 1, 1, 1, , , 1, , 1, 1, , 1, 1, 1, 1, 1, , 1, , 1], [, , 1, , , 1, , , 1, 1, , 1, 1, , 1, 1, , 1, , , , , , , , , 1], [, 1, 1, , 1, , , , 1, 1, , 1, , 1, 1, 1, 1, , 1, 1, 1, 1, , , , 1], [, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1], [1, 1], [
            ,
            1,
            ,
            ,
            ,
            ,
            ,
            ,
            ,
            ,
            ,
            1,
            1,
            ,
            ,
            ,
            ,
            ,
            1,
            1,
            ,
            1,
            ,
            1,
            ,
            1,
            1
          ], , [, 1, 1, , 1, , , 1, , 1, , , , 1, 1, 1, , , 1, , , 1, , , , 1], [1, 1, , , 1, 1, , 1, , , , , 1, , 1]],
          [, [, 1], [, , , 1, , , , 1, , , , 1, , , , 1, , , 1, , , 1], [, , , , , , , , , , , , , , , , , , 1, 1, , , , , , 1], , [1, , , , , 1], [, 1, , , , 1, , , , 1], [, 1, , , , , , , , , , , 1, 1, , 1, , , , , , , , , 1, 1], [, , , , , , , , , , , , , , , , , , , 1, , 1], [, , , , , , , , , , , , , , , , 1, , , , 1, , 1], [, 1], [, 1, , 1, , 1, , 1, , 1, , 1, 1, 1, , 1, 1, , 1, , , , , , , 1], [1, , , , , 1, , , 1, 1, , 1, , 1, , 1, 1, , , , , 1, , , 1], [, 1, 1, , , 1, , 1, , 1, , 1, , 1, 1, 1, 1, 1, , 1, , 1, , 1, 1, 1, 1], [1, 1, 1, 1, 1, , 1, , 1, , , , 1, 1, 1, 1, , 1, 1, , , 1, 1, 1, 1], [1, , , , , , , , , , , , , , , , , , , , 1], [, , , , , , , , , 1], , [, 1, , , , , , 1, 1, 1, , 1, , , , 1, , , 1, 1, 1, , , 1], [1, , , , , 1, , 1, 1, 1, , 1, 1, 1, 1, 1, , 1, , 1, , 1, , , 1, 1], [
            1,
            ,
            1,
            1,
            ,
            ,
            ,
            ,
            1,
            ,
            ,
            ,
            ,
            ,
            1,
            1,
            ,
            ,
            1,
            1,
            1,
            1,
            ,
            ,
            1,
            ,
            1
          ], [1, , , , 1, , , , , , , , , , , , , 1], [, , , , , 1, , , 1, , , , , , 1], [, , , , , , , , , , , , , , , 1], [, , , , , , , , , , , , , , , , , , , , 1], [, 1, , , , , , , , , , , , , , 1], [, 1, , , , 1]],
          [, [1, 1, 1, , 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, , 1, , 1, 1, , , 1, 1, 1], [, , , , , , , , , , , , 1], [, , , , , , , , , , , , , , , , , , , 1], , [, , , , , , , , , , , , , , , , , , 1], [1, , , , , , , , , 1, , , , 1], [, , , , , , , , , , , , , , , , , , 1], , [1, 1, , , , 1, 1, , , , , , 1, , , , 1, , 1, , 1, 1, , 1], [1], [, , , , , , , , , , , 1, , , , , , , , , , , 1], [, 1, , , , , , , 1, 1, , , 1, , 1, , , , 1, , , , , , , 1], [, , , , , , , , , , , , , , , , 1, , , , , 1], [, , 1, , , , , 1, , 1], [1, , , , 1, , , , , 1, , , , 1, 1, , , , 1, 1, , , , , 1], [, , , , , 1], [, , , , , , , , , , , , , , , , , , , 1], [1, , , 1, 1, , , , , , , 1, , 1, , 1, 1, 1, 1, 1, 1], [, , , , , 1, , , , , , , 1, , , , , , , 1], , [
            ,
            ,
            1,
            1,
            1,
            1,
            1,
            ,
            1,
            1,
            1,
            ,
            ,
            1,
            1,
            ,
            ,
            1,
            1,
            ,
            1,
            1,
            1,
            ,
            ,
            1
          ], [, , , , , , , , , , , , , , , , , , 1], [, 1, , , , 1], , [1]],
          [, [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1], [, , , 1, 1, 1, 1, , , , , , 1, , 1, , , , 1, , 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, , , 1], [, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, , , , 1, , 1, , , 1, 1, 1, 1, 1], [, , , , , , , , , , , 1, , , , , , , , , 1, , , , 1], [, 1, 1, , 1, 1, , 1, , , , 1, 1, , 1, 1, , , 1, , 1, 1, , 1], [, 1, , 1, , 1, , , 1, , , 1, 1, , 1, 1, , , 1, 1, 1], [, 1, 1, 1, 1, 1, , 1, 1, 1, , , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1], [, , , , , , , , , 1, , 1, , 1, 1, , , , 1, , , 1], [, 1, , , 1, 1, , , , , , , , , 1, 1, 1, , , , , 1], [1, , 1, 1, 1, , , , 1, 1, 1, 1, 1, , , 1, , , 1, , , 1, , 1, , 1], [, 1, 1, , 1, 1, , 1, 1, , , , 1, 1, 1, , , 1, 1, , , 1, 1, 1, 1, 1, 1], [
            1,
            1,
            1,
            1,
            1,
            1,
            ,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            ,
            1,
            1,
            ,
            1,
            1,
            ,
            1,
            ,
            ,
            1
          ], [, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [, 1, , , , 1, , , , , , , , , 1], [, 1, , , , , , , , 1, , , , , 1, , , , 1, , , 1], [, 1, 1, 1, 1, , , 1, 1, 1, 1, 1, , 1, , 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [, , , , , 1, , 1, , , , , 1, 1, 1, 1, 1, , , 1, , , , 1], [, 1, , , , , , , , 1, , , , , , , , , , , , 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1], [1, 1, , 1, , 1, 1, , , , 1, , 1, 1, 1, 1, 1, , 1, 1, , , , , , 1], [, 1, 1, 1, 1, 1, 1, 1, , 1, 1, , , 1, 1, , , , 1, , 1, 1, , 1, 1], [, , , , , , , , , , , , , , , , , , , , , , , , 1], [, 1, 1, , 1, 1, 1, 1, , 1, , , 1, 1, 1, 1, , , 1, , , , , , , 1, 1], [, 1, , , , , , , , 1, , , , , 1]],
          [, [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , , 1, 1, 1, 1, 1], [, 1, 1, , , , , , , , , , , , 1, 1, , , , , , 1], [, 1, , , , , , , 1], [, , , , , , , , , , , , , , 1, , , , , 1, , , , , , 1], [
            1,
            1,
            ,
            ,
            1,
            ,
            ,
            1,
            1,
            1,
            ,
            ,
            ,
            1
          ], , [, , , , , , , , , , , , , 1, , , , , , , , , , 1], [, , , , , , , , , 1, , , , , , , , , 1, , , , , , , 1], [1, 1, 1, , 1, , 1, 1, 1, 1, 1, 1, 1, 1, , 1, , , 1, , 1, , , 1, 1], [, , , , , , , , , 1], [, 1, , , , 1, , , 1, , , 1, , , 1, , , , , 1], [, 1, 1, , 1, 1, , , , , , , , , , , , , , , 1, 1], [, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [, 1, , , 1, 1, , 1, 1, 1, 1, , , 1, 1, 1, , , , 1, , 1], [1, 1, 1, 1, 1, 1, , , 1, 1, 1, 1, 1, 1, , 1, 1, , 1, 1, 1, , 1, 1, , 1, 1], [, , , , , , , , , , , , , , , 1, , , , 1], , [1, 1, , 1, , 1, , , , , , 1, , 1, , 1, 1, , 1, , 1, 1, , 1, 1, , 1], [, , 1, , , , , , 1, , , , 1, , 1, , , , , 1], [1, , , , , , , , , 1, , , , , , 1, , , , 1, , 1, , , 1], [1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [, , , 1, , 1, , , , , , 1, , , 1, , , , , , , , 1], [, 1, , 1, , , , , , , , , , , , 1], , [1, 1, , , , , , , , , , , , , , , , , , , , , , 1, 1], [1]],
          [, [1, , , , , , , , , 1, , , , , 1, , 1, , 1], [, 1, 1, , 1, 1, , 1, 1, 1, , , 1, 1, 1, , , , 1, , , 1, , , , 1], [, 1, , , , , , , 1, , , , 1, , , , , , 1], [1, 1, 1, 1, 1, 1, , , , 1, , , , , , , , , 1, 1, 1, 1], [1], [, 1, 1, , , 1, 1, , , , , 1, , 1, , , , , , , , 1, , , , 1], [1, , 1, , , 1, , 1, , , , , 1, 1, 1, 1, , , , 1, , , , 1], [, , 1, , , , , , , 1, , , , , , , 1, , , , , , , 1], [1, , , , , , , , , , , , , , 1, , , , 1], [, , , 1, , 1, , , , , 1, , , , 1, 1, , , , 1], [1, , , , , 1, , , 1, 1, , 1, 1, , , 1, 1, , 1, 1, 1, , 1, 1, 1, , 1], [, 1, 1, , , , , 1, , 1, , 1, 1, 1, , 1, 1, , , 1, , 1, 1, 1], [, 1, , , , 1, , , , 1, , , 1, , 1, 1, , , 1, 1, 1, , , , , 1], [1, , 1, 1, , 1, , 1, 1, , 1, , 1, 1, 1, 1, 1, , , 1, 1, , , , , , 1], [1, , , , , , , , , , , , , , , , , , 1, , , 1, , 1], [, , , , , , , , , 1, , , , , , 1], [, , , , , , , , , , , , , , , , , , , , , 1, , 1], [, 1, , , , 1, , , 1, 1, , 1, , , 1, 1, , , 1, , , 1, , , 1, 1], [
            1,
            1,
            ,
            1,
            1,
            1,
            ,
            1,
            1,
            1,
            ,
            1,
            ,
            1,
            1,
            1,
            ,
            ,
            1,
            ,
            1,
            1,
            1
          ], [1, , 1, 1, 1, 1, , , , 1, , 1, 1, 1, , 1, , , 1, 1, 1, , 1, 1, 1, 1, 1], [1, , , , , , , , , , , , , 1], [, , 1, , , , , , , , , , , , , , , , , , , , 1], [1, , , , , , , , , , , 1, , 1, , 1, , , , 1], [, , , 1, , , , , , , , , 1], [, 1, , , , , , , , , , , , , , 1, , , , , , , , , 1], [, , , , , , , , 1, 1, , , , 1, , , , , 1, , , , , , , , 1]],
          [, [1, 1, 1, 1, 1, 1, 1, , 1, , 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, , , 1, 1, 1], [, , , , , 1, , , , 1, 1, 1, , 1, 1, 1, , , 1, , 1, 1, , 1], [, , , , , , , , , , , , , , , , , , , 1, 1], [, 1, , , , , , 1, , , , , , , , , , , , , 1], [, , 1, , , 1, , 1, 1, 1, , 1, 1, , 1, , , , 1, , 1, 1], , [, , 1, , , 1, , , , , , 1, , , , 1], [, , , , , , , , , 1, , , , , , , , , , 1], [1, 1, 1, 1, 1, 1, , 1, 1, 1, , , 1, 1, , 1, , 1, , , 1, 1, 1, , , 1], [, , , , , 1, , , , , , , , , , , , , 1], [, 1, , , , , , , , , , , , 1, , 1, 1, , 1, 1, , 1], [, , , , , 1, , , , , , , , , , , , , , 1], [
            ,
            1,
            1,
            1,
            1,
            ,
            ,
            ,
            ,
            1,
            ,
            ,
            1,
            ,
            1,
            ,
            ,
            ,
            1,
            1,
            ,
            ,
            ,
            1,
            1
          ], [, 1, , , 1, , , 1, , 1, 1, , 1, , , , , , , 1], [, , 1, , 1, , , 1, , , , , , , , , , , 1, 1, , , , 1], [, 1, , , , , , , , , , , , , , , , , 1, , , , , , 1], [, , , , , , , , , , , , , , , , , , 1], [, 1, 1, , , , , , , , , , , , , , , , 1, , 1, 1], [, , , , , , , , , , , , 1], , [, 1, 1, 1, 1, , , , 1, 1, , 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, , 1, , 1], [1, , , , 1, , , , , , , , , , 1], [1, , , , , , , , , 1], , [, 1, , , , 1, , , , , , , , , , , , , , , , , , , , 1]],
          [, [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, , 1, 1, 1, 1, , , , 1, 1, 1, 1], [, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1], [, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1
          ], [, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1, , 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , , 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1], [, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1], [
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1
          ], [, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [, 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]],
          [, [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, , 1, , 1, 1, 1, 1], [1, 1, 1, 1, , 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [, , , 1, 1, 1, 1, , 1, , , , 1, 1, , , 1, 1, , 1], [, 1, 1, , 1, , , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [
            ,
            1,
            ,
            ,
            ,
            ,
            ,
            ,
            ,
            ,
            ,
            ,
            ,
            ,
            1
          ], [1, 1, 1, , , , , 1, 1, 1, , 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, , , , , 1], [, 1, , , , , , , 1, 1, , , 1, 1, 1, , 1, , , 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , , 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1], [, 1, , , , 1, , , , 1, , , 1, , , , 1, , , , , , , 1, 1], [, 1, 1, 1, 1, 1, , , 1, 1, 1, , 1, 1, 1, 1, , , 1, 1, 1, 1, , , , 1], [, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, , 1, , , 1], [, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , , 1, 1, 1, 1, 1, 1], [1, 1, 1, , 1, , , 1, 1, 1, 1, , 1, 1, 1, 1, , , , 1, , 1, , 1, , , 1], [1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [, 1, , , , 1, , , , , , , , , 1, 1, , , , , , , , , 1], [, , , , , , , , , , , , , , , , , , 1], [, 1, , 1, , 1, , 1, , 1, , 1, 1, 1, 1, 1, , , 1, , 1, , 1, , , , 1], [, 1, 1, 1, 1, 1, , 1, 1, 1, , , 1, 1, 1, 1, 1, , 1, 1, 1, , 1, 1, , 1], [1, , , 1, , , , 1, 1, 1, , , , , 1, 1, , , , 1, , 1], [
            1,
            1,
            ,
            1,
            1,
            1,
            1,
            ,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            ,
            1,
            1
          ], [1, 1, , , , , , , , 1, , 1, 1, , , , , , , 1, , 1], [, 1, , , , 1, , 1, 1, , , , 1, 1, , 1, , , , 1, 1, 1, , 1], [, , , , , , , , , , , , , 1], [, 1, , , , , , 1, , , , , , , 1], [, , , , , , , , 1, , , , 1, , 1, , , , , , , , , , , , 1]],
          [, [, 1, 1, , 1, 1, 1, 1, , 1, 1, 1, , 1, 1, , 1, 1, , 1, 1, 1, 1, 1, 1, , 1], [, 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1], [, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1], [
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            ,
            1,
            1,
            1,
            1
          ], [, 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, , 1], [, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [, 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [, 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [, 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1], [
            ,
            1,
            1,
            ,
            1,
            1,
            1,
            1,
            1,
            1,
            ,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1
          ], [, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [, 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]],
          [, [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , , 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , , 1, , 1], [1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [, 1, , , 1, , , , , , , , 1, , , , , , 1, , , 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [
            ,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            ,
            1,
            ,
            1,
            1,
            1,
            1,
            1,
            1,
            ,
            1,
            1,
            1,
            1,
            1,
            1,
            1
          ], [, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [, 1, 1, , 1, , , , 1, 1, 1, , 1, 1, 1, 1, , , 1, 1, 1, 1, , , 1, 1, 1], [, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1], [1, 1, , 1, , 1, , 1, , 1, 1, 1, 1, 1, 1, 1, , 1, 1, , , 1, 1, 1, 1, 1, 1], [, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, , 1, 1], [, 1, 1, , , , , 1, 1, 1, , , 1, , 1, 1, , , , 1, , 1, , , 1, 1], [, , , , , , , 1, , , , 1, 1, 1, 1, 1, , 1, , , 1, , , , , 1], [1, 1, 1, 1, , 1, 1, 1, , 1, , 1, 1, 1, 1, , 1, , 1, , 1, 1, , , 1, , 1], [, 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [, , , , 1, 1, , 1, , 1, 1, 1, , 1, , 1, 1, , 1, 1, , 1, , 1, 1, 1, 1], [
            ,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1
          ], [1, , , , , , , , 1, , , , , 1, , 1], [, 1, 1, 1, , 1, , 1, , 1, , , , 1, , 1, , , 1, , , , , 1, 1, 1], [, 1, , , 1, 1, , 1, , 1, , 1, 1, 1, 1, 1, , 1, 1, , , 1, , , 1], [1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [, 1, 1, , 1, , , , , 1, , 1, , 1, , , , , 1, 1, , 1, , , , 1, 1]],
          [, [, 1, , 1, , , , , , , , 1, , , , , , , 1, , , , 1], [, , , , , , , , , 1, , 1, 1, 1, , 1, , , 1, , 1, 1], [1, 1, , , , , , , 1, , , , , 1, , 1, , , , , , 1], [, 1, , , , , , , , , , 1, , , , , , , , , 1, 1], , [, , , , , , , , , , , , , , , 1, , , , 1, , 1], [, , 1, 1, , 1, , 1, , , , , , , , 1, , , , , , 1], [, , , , , , , , , , , , , , , , , , , , 1, 1], [, 1, , , , 1, , , , , , , , , 1], [1, , 1, 1, , , , 1, , , , , , , , , 1, , , 1, , , 1, 1], [, 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, , , 1, 1, , 1, 1, , 1, , 1], [, 1, , , 1, 1, , , , , , 1, , 1, , 1, , , 1, , 1, 1], [1, 1, 1, 1, , 1, , 1, , 1, , 1, 1, , 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1], [
            ,
            1,
            1,
            ,
            ,
            1,
            ,
            1,
            ,
            1,
            1,
            1,
            ,
            ,
            1,
            1,
            1,
            ,
            1,
            1,
            1,
            1,
            ,
            1,
            1
          ], [, , , , 1, , , 1, , , , , , , 1, , , , 1, 1], [, 1, , , , , , , , , , 1, , 1, , 1, , , , , 1, , , , , 1], , [1, 1, , 1, , 1, , 1, 1, , , , , , 1, 1, , , 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, , 1, , , , , , 1, , , , , 1, 1, 1, , , , 1, 1, , , 1], [, 1, 1, , 1, 1, , , , 1, , 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, , 1, 1, 1, 1], [, 1, 1, , , 1, , , , 1, , , , 1, 1], [, , , , 1], [, , , , , , , , , 1, , , 1], , [, , 1, , 1, , , , , , , , , 1, , , , , , , , , , , , 1], [, , , , , , , , , , , , , 1]],
          [, [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [, , 1, 1, , 1, 1, 1, 1, 1, , , 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, , , 1, 1], [, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, , 1, , , , , 1], [, 1, , 1, , , , , , 1, , , , , 1, 1, , , , , 1, 1], [, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, , 1, , , 1, , 1, 1, 1], [, 1, , , , 1, , , , , , , 1], [
            ,
            1,
            ,
            ,
            1,
            ,
            ,
            1,
            ,
            1,
            ,
            1,
            1,
            ,
            1,
            ,
            ,
            ,
            ,
            1,
            ,
            1,
            ,
            ,
            ,
            1,
            1
          ], [, 1, , , 1, , , 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1, , 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1], [, , , , , , , , , , , , , , , , , , , , 1], [, 1, 1, 1, , , , 1, 1, , , , , , 1, 1, 1, , 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1], [, 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, , 1, 1, 1, 1], [, 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [, , , 1, 1, 1, 1, 1, 1, 1, , 1, , 1, 1, 1, 1, 1, , 1, 1, , 1, 1, 1, 1, 1], [, 1, , , , 1, , , , 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [, 1, , , , 1, , , , , , , , 1, , , , , , , , , , 1], [, 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1], [1, 1, , 1, 1, 1, , 1, 1, 1, , , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, , 1], [1, 1, , , , , , , 1, 1, , , , , 1, 1, 1, 1, 1, , 1, 1, 1, 1, , 1], [, 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, , 1, , 1, 1, 1, 1, , 1, 1, , 1, 1, 1, 1], , [
            ,
            1,
            1,
            ,
            ,
            ,
            ,
            1,
            ,
            1,
            ,
            ,
            ,
            1,
            1,
            1,
            ,
            ,
            1,
            ,
            ,
            ,
            ,
            1
          ], [, , , , , , , , , , , , , 1], [, , , , , 1, , , , , , , , 1, 1, , , , , 1, , 1, , , 1, 1], [, , , , , 1, , , 1, , , , , , 1]],
          [, [, 1], , , , , , , , , , , , , , , , , , , , [1, 1, 1, 1, 1, , 1, 1, 1, 1, , 1, 1, 1, 1, , 1, 1, 1, 1, , , 1, 1, 1, 1, 1], [, 1, , 1, , 1, , , 1, 1, 1, , 1, 1, 1, 1, 1, , , 1, , , , 1, , 1, 1], [, 1, , 1, , 1, , , 1, , , , , 1, , , , , , 1, 1], [, 1, , 1, , , , , 1, , , , 1, , 1, 1, 1, 1, 1, 1, 1, 1, , 1], [, 1, , , , , , , , , , , , , , , 1]],
          [
            ,
            [, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],
            [, , 1, , , , , , , , , 1, 1, , , , 1],
            [, , , , , , 1],
            [, , 1],
            [, 1, 1, , , 1, , 1, , 1, 1, , 1, 1, 1, , , , 1, 1, 1, , , , , 1],
            ,
            [, 1, , , , 1, , , , , , 1, , , 1, , , , 1, 1, , 1],
            [, , , , , , , 1, , , , , , , , , 1],
            [, 1, 1, , , 1, 1, , , , , , 1, 1, 1, , , , 1, , 1, 1],
            [, , , , , , , 1, , 1, , , , , , , , , , 1],
            [, 1, 1, , , , , , 1, 1, , , , 1, , , , , , , 1, , , 1],
            ,
            [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],
            [1, 1, 1, , 1, , , 1, , , , , 1, , 1, , 1, , 1, , , , , 1],
            [1, 1, 1, 1, 1, 1, 1, 1, , , , , 1, 1, , 1, 1, , 1, , , 1, , 1],
            [, , , , , , , , , , , , , , 1, , , , , , 1],
            ,
            [, , , , , , , , , 1, , , , 1, , 1, , , , , 1],
            [, , 1, , , , , , , 1, , 1, 1, 1, 1, , , , , , , , , 1],
            [, , , 1, , , , , 1, , , , , 1, , , , , , 1, , , , 1],
            [1, , 1, 1, , 1, 1, 1, 1, 1, , 1, , , , 1, 1, 1, , , 1, 1, , , , 1, 1],
            ,
            [1, 1, , , , , , , , , , 1, 1, 1, , 1, , , 1],
            [, , , , 1, , , , , , , , , , , , , , , , , , , 1],
            [, , , , , , , , , , , , , , 1, , , , , 1, , 1],
            [, , , , , , , , 1]
          ],
          [, [1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, , , 1, 1, 1, 1, 1, , 1, 1, , 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, , 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, , 1], [
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            ,
            1,
            1
          ], [, , 1, , , 1, , , , , , , , 1, , , , , , 1, , , , 1], [1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, , 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [, 1, 1, 1, 1, 1, , 1, , , , 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, , 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, , 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1], [1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, , 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1], [, , 1, 1, 1, 1, , 1, , 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1], [1, 1, , , , , , , 1, , 1, 1, , 1, 1, 1, , 1, 1, 1, 1, 1, , , 1], [
            1,
            1,
            1,
            1,
            ,
            1,
            1,
            1,
            1,
            1,
            ,
            1,
            1,
            1,
            1,
            1,
            ,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1
          ], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1], [1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1], [1, 1, 1, 1, , 1, , 1, , 1, 1, 1, 1, 1, , 1, , 1, 1, 1, 1, , 1, 1, 1, 1, 1], [1, 1, 1, 1, , 1, , , , , , 1, , 1, , , , , 1, 1, , , , , 1], [1, , 1, 1, , , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [, , 1, 1, , 1, , 1, , , , 1, 1, 1, 1, 1, , , 1, 1, , 1, , 1], [, 1, 1, 1, 1, , , , , 1, , 1, 1, 1, 1, 1, , , 1, 1, , , , 1, 1, 1], [, 1, 1, 1, 1, 1, , 1, , , , , 1, , 1, , 1, , , 1, , , 1, 1, , 1]],
          [, [1, 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1], [, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [, 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, , 1, 1, 1, 1], [, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, , 1, 1], [
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            ,
            1,
            ,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1
          ], [, , , , , , , , , 1, , , , , 1, 1, , , 1, , 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , , , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, , , 1, 1, 1, 1, , 1, 1, , 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1], [, 1, , , , , , 1, , 1, 1, , 1, 1, 1, 1, 1, , , 1, , 1, , 1], [1, 1, 1, , 1, 1, 1, 1, , , , 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1], [1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1], [, 1, , 1, , 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1], [, , 1, , , , , , , , , , 1, 1, 1, 1, 1, 1, 1, , 1, 1, , 1], [
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1
          ], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1], [, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1], [, 1, , , 1, 1, , , , 1, , 1, 1, 1, 1, 1, , , , 1, 1, 1, , 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, , , , 1, 1, 1, 1, 1, 1, 1, , 1, 1, , 1, 1, 1], [, 1, 1, 1, , 1, , 1, 1, 1, 1, , , 1, 1, 1, , 1, 1, 1, 1, 1, , , 1, 1], [1, 1, , , , 1, , , 1, 1, 1, , 1, , 1, , 1, , 1, 1, 1, 1, 1, , 1, 1, 1], [, 1, , , , , , , 1, , 1, , 1, 1, 1, 1, , , , , , , , , 1]],
          [
            ,
            [, , , , , , , , , , , , , 1, 1, , , , 1],
            [, 1, , , , , , , , 1, , , 1, , , , , , 1, , , 1, , , , 1],
            ,
            [, 1, , , , 1, , 1, , 1, 1, , 1, 1, , , , , , , , 1],
            [, , , , , , , , , , , , , , , , , , , 1],
            [, , , , , , , , , 1],
            [1, 1, 1, , , 1, , , 1, , , , , , 1, 1, , , , , , , , , , 1],
            [, 1, , , , , , , , , , , , , 1],
            [, , , , , , , , , , , , , , , , , , , 1, , , 1],
            [, , , , , , , , , 1],
            [1, 1, , , , , , 1, 1, 1, , 1, 1, , , , 1, 1, , 1, , 1, 1, 1, , 1],
            [, 1, 1, 1, , 1, 1, , , 1, , 1, 1, 1, 1, , , , , , , 1, , 1, , 1],
            [, 1, 1, 1, 1, , , 1, , 1, , , , 1, 1, 1, 1, , 1, 1, , 1],
            [, 1, , , 1, 1, , 1, , 1, , 1, , 1, 1, , 1, , 1, , , 1, , , 1, , 1],
            [, , , , , , , , , , , 1, , , 1],
            [, , , , , , , , , 1, , , , , , , , , , , , , 1],
            ,
            [1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, , 1, 1, 1, 1, 1, 1, 1],
            [, 1, , , , , , , 1, 1, , 1, , , , , 1, , , 1, , 1],
            [, 1, , , , 1, , , 1, , , , , , , , 1, , 1, , , 1],
            [, , , , , , , , , , , , , 1, 1, , , , 1, , , 1],
            [, , , , , 1, , , 1, , , , 1],
            [, 1],
            ,
            [, 1],
            [1, , , , , , , , , , , , , , 1, , , , , 1]
          ],
          [, [, 1, , , , 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, , 1, 1, , 1, 1, , , 1], [, , 1, , , , , , , , , 1], , , [1, , , 1, 1, , , , , , , , 1, 1, , 1, 1, , 1], , [, , , , , , , , , , , , , , , , , , 1, , 1], , [1, , , 1, 1, , 1, 1, , , , , 1, , 1, , , , , 1, 1, , 1], [, , , , , , , , , , , 1], [
            ,
            1,
            ,
            ,
            ,
            ,
            ,
            ,
            ,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            ,
            ,
            ,
            1,
            1,
            ,
            ,
            ,
            ,
            1
          ], [, , , , , , , , , , , , , , , , 1, , , 1], [, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , , 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1], [, , , , , , , , , , , 1, , 1, , , 1], [1, , , , , , , , , , , , , , , , , , 1, , 1], , , [, 1, , , , , , , , , , , , , , 1, , , , 1, 1], [, , , , , , , , , 1, , , 1, , 1, , , , , , , , 1], [, , , , , , , , , , , , , , , 1], [, , , , , , , , , , , , , 1, 1, , , , , , 1], , [, 1]],
          [, [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [, 1, 1, , , 1, 1, , 1, 1, 1, 1, 1, 1, , , 1, 1, 1, 1, 1, , 1, 1], [, 1, , , , , , , , 1], [, , , , 1, , , 1, , , 1, 1, , , , , , , , , 1, 1, , , , 1], [, 1, , 1, 1, , , 1, 1, 1, , , , 1, 1, 1, 1, , 1, 1, 1, 1, , 1], [, , , , , , , 1], [, 1, 1, , , , , 1, , 1, , , , , , 1, , , , , , 1, , 1, , 1], [, 1, , , , , , 1, , , , 1, , , , , , , , , , 1], [, , 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , , , 1, , 1, 1, 1, 1, , 1], [, 1, , , , , , , , 1], [
            ,
            1,
            1,
            ,
            1,
            ,
            ,
            ,
            ,
            ,
            ,
            ,
            1,
            ,
            ,
            ,
            ,
            ,
            1,
            ,
            ,
            1,
            ,
            1,
            ,
            1
          ], [, 1, , 1, , 1, , 1, 1, 1, , 1, 1, 1, , 1, , , 1, 1, , 1, 1, 1, 1, 1], [, 1, 1, 1, 1, 1, , 1, 1, 1, , , , 1, 1, 1, , , , 1, 1, , , 1, 1], [, , 1, 1, 1, 1, , 1, , 1, , 1, , 1, 1, 1, 1, , , , , 1, , 1, , 1], [1, 1, 1, 1, 1, 1, 1, 1, , 1, , 1, , 1, 1, 1, , , 1, 1, , , , 1, , 1], [, , , 1], , [, 1, 1, , 1, , , 1, 1, 1, , 1, 1, 1, 1, 1, 1, , 1, 1, , 1, 1, 1, 1, 1, 1], [, 1, , , , , , 1, , 1, , 1, , , , , , , 1, 1, , 1, 1], [, , 1, , , , 1, , 1, 1, , 1, , 1, , , , , , , , , , 1], [, 1, 1, , 1, , , , 1, , , , 1, 1, 1, , , , 1, , 1, 1, 1, , 1, 1], , [, 1, 1, , , , , , , , , , , , , 1, , , 1, , , , , 1], [, 1, , , , , , , , , , , , , , , , , , , , , , 1], [, 1, 1, , , , , , , 1, , , , 1, 1, , , , 1, , , , , , , 1]],
          [, [, 1, 1, 1, 1, 1, , 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1], [, 1, 1, 1, 1, 1, , 1, , 1, 1, , , 1, 1, 1, 1, , 1, , , , , 1, 1, 1], [, , 1, 1, , 1, , 1, 1, , , , 1, 1, 1, 1, , , 1, , 1, 1, 1, 1, , 1], [
            ,
            1,
            ,
            1,
            ,
            ,
            ,
            ,
            ,
            ,
            ,
            1,
            ,
            1,
            ,
            1,
            ,
            1,
            ,
            ,
            ,
            ,
            ,
            ,
            ,
            1
          ], [, , 1, , 1, , , 1, , , , , 1, 1, , , 1, , 1, 1, 1, 1], [, 1], [, 1, 1, , 1, , 1, 1, , 1, , , 1, 1, 1, , , , 1, , , 1, , 1], [1, 1, , 1, 1, 1, , , , , , , , 1, , , , , 1, , 1, 1, 1], [, 1, 1, , , , , , , 1, , , 1, , 1, , 1, , 1, 1, , , 1, , , 1], [, , 1, , , , , , , , , , , , , , , , , , 1], [, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [, 1, 1, 1, 1, 1, , 1, , 1, , , , , 1, 1, 1, , , 1, , 1, , , , 1], [, 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [, 1, 1, , 1, , , 1, 1, 1, 1, 1, , 1, 1, 1, , 1, 1, 1, 1, 1, , , , 1, 1], [, , , 1, 1, , , 1, , 1, , 1, , 1, 1, 1, 1, , 1, , , , , 1], [, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [, 1, , , , , , , , , , , , , , , , , , , 1], [, 1, 1, , 1, 1, , 1, , 1, , , , 1, 1, , , 1, 1, , 1, 1, , 1], [, 1, 1, 1, 1, 1, , , 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1, , , 1], [
            ,
            1,
            1,
            1,
            1,
            1,
            ,
            1,
            1,
            1,
            1,
            ,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            ,
            1,
            1
          ], [, 1, 1, , 1, , , 1, , , 1, , 1, 1, 1, 1, 1, , 1, , 1, 1], [, , , , , 1, , , , 1, , , , , 1, 1, , , , 1], [, 1, , 1, 1, 1, , 1, , , 1, 1, 1, , , 1, , , 1, , 1, , , 1], [, , 1, , , , , , , , , 1, , 1, , , , , 1, , 1], [, 1, 1, , , , , , , , 1, 1, 1, , , , , , , , 1, , , , , 1], [, , , , , , , , 1, , , , , 1, , , 1]],
          [, [, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [, 1, 1, , 1, 1, , , 1, 1, 1, 1, 1, 1, 1, 1, , , , , , , , , 1, 1], [, , , , , , , , 1, , , , 1, , 1, , 1, , 1], [, 1, , , 1, 1, , 1, , , , 1, , , , , , , , 1], [, 1, , 1, , 1, , , , 1, 1, , 1, , 1, , , , 1, 1, 1, 1, 1, , , 1], , [, 1, , , , , , , , 1, , , 1, 1, , , 1, , 1, 1, , 1, , 1], [, 1, , , 1, , , , , , , , 1, , , , , , , 1], [1, 1, , , , , 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1], , [, 1, , , , , , 1, 1, 1, , 1, 1, 1, 1, 1, , , 1, , 1, 1, , , , 1], [, 1, 1, , , 1, , 1, , 1, , , 1, 1, 1, 1, , , 1, , , 1, , , , 1], [
            ,
            1,
            1,
            1,
            1,
            1,
            ,
            1,
            1,
            1,
            ,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            ,
            ,
            ,
            1,
            ,
            1
          ], [, 1, 1, , 1, 1, , 1, 1, , , 1, 1, , 1, 1, , 1, , 1, , 1], [1, , 1, , , , , 1, , 1, , 1, 1, 1, 1, , , , , 1, 1, , , , 1, 1], [, 1, 1, , , , , 1, 1, , , 1, , 1, 1, 1, 1, , , , , , , , , , 1], , [, 1, 1, , , 1, , , , 1, , 1, 1, 1, 1, 1, , , , 1, , , , 1, , 1], [, , , 1, 1, , , 1, , , , , 1, 1, 1, 1, 1, , 1, 1, , , , , , 1], [, 1, , , , , , , , , , , 1, , , , 1, , , , , , , 1, , 1], [, 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, , 1, 1, 1, , 1, 1, , 1, 1, 1, 1], [, 1, , , , , , , , , , , , , , , , , , , 1], [, 1, , , , , , 1, , , , , 1, , 1, , , 1, 1, , 1, 1, , 1], [, 1, , , , , , 1, , , , , 1, 1, , , , , , , , 1, , , , 1], [, , , , , , , , , , , , , , , , , , 1, , , 1, , , , , 1], [, , , , , , , 1, , , , 1]],
          [, [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [, 1, , 1, , 1, , , , , , , 1, , , , , , , , 1, 1, , 1], [, 1, , , 1, , , , 1], [, , , , , , , , , , 1], [
            ,
            1,
            ,
            ,
            ,
            ,
            ,
            1,
            1,
            ,
            ,
            ,
            ,
            1,
            1
          ], , [, 1, 1, , , , , , 1, , , , , 1, 1, , , , 1], [1, , 1, , 1, , , , , 1, , , , , 1, , , , , , , , , 1, 1], [, 1, 1, , , , , , , , , 1, 1, 1, 1, , , , 1, , , , , 1, , , 1], , [, 1, 1, , 1, , , 1, 1, , , 1, , , 1, 1, 1, , 1, , 1, 1, 1, , , , 1], [, 1, , , , 1, , , , , 1, , , 1, 1, , , 1, , 1, , 1, , 1], [, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [, 1, , , 1, 1, , 1, , , , 1, , , , , , , , 1], [, , , 1, , , , , 1, , , , , 1, , 1, , 1, 1, 1], [, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [, , , , , 1], [, 1, , , , , , 1, , , , , , , 1, 1, 1, , , 1], [, 1, , , , , , , , , , 1, 1, 1, , , , , 1, , , 1], [, , , , , 1, , 1, , , , , 1, 1, 1, , 1, 1, , 1, 1, 1, , , 1, 1], [1, 1, , , , , , , 1, , , , , 1, 1, , , , , , , , , , , 1], , [, 1], [, , , , , , , , , , , , , , , , , , , , , , , , 1], [, , 1, , , , , 1, , , 1, , , , 1, , 1], [, 1, , , , , , , , , 1]]
        ];
        __name(isValidLang, "isValidLang");
      }
    });
    hreflang_exports = {};
    __export2(hreflang_exports, {
      UIStrings: () => UIStrings109,
      default: () => hreflang_default
    });
    init_hreflang = __esm2({
      "core/audits/seo/hreflang.js"() {
        "use strict";
        init_process_global();
        init_audit();
        init_i18n();
        init_valid_langs();
        NO_LANGUAGE = "x-default";
        UIStrings109 = {
          /** Title of a Lighthouse audit that provides detail on the `hreflang` attribute on a page. This descriptive title is shown when the page's `hreflang` attribute is configured correctly. "hreflang" is an HTML attribute and should not be translated. */
          title: "Document has a valid `hreflang`",
          /** Title of a Lighthouse audit that provides detail on the `hreflang` attribute on a page. This descriptive title is shown when the page's `hreflang` attribute is not valid and needs to be fixed. "hreflang" is an HTML attribute and should not be translated. */
          failureTitle: "Document doesn't have a valid `hreflang`",
          /** Description of a Lighthouse audit that tells the user *why* they need to have an hreflang link on their page. This is displayed after a user expands the section to see more. No character length limits. The last sentence starting with 'Learn' becomes link text to additional documentation. "hreflang" is an HTML attribute and should not be translated. */
          description: "hreflang links tell search engines what version of a page they should list in search results for a given language or region. [Learn more about `hreflang`](https://developer.chrome.com/docs/lighthouse/seo/hreflang/).",
          /** A failure reason for a Lighthouse audit that flags incorrect use of the `hreflang` attribute on `link` elements. This failure reason is shown when the hreflang language code is unexpected. */
          unexpectedLanguage: "Unexpected language code",
          /** A failure reason for a Lighthouse audit that flags incorrect use of the `hreflang` attribute on `link` elements. This failure reason is shown when the `href` attribute value is not fully-qualified. */
          notFullyQualified: "Relative href value"
        };
        str_89 = createIcuMessageFn({ url: "core/audits/seo/hreflang.js" }.url, UIStrings109);
        __name(isFullyQualified, "isFullyQualified");
        __name(isExpectedLanguageCode, "isExpectedLanguageCode");
        Hreflang = class extends Audit {
          static {
            __name(this, "Hreflang");
          }
          /**
           * @return {LH.Audit.Meta}
           */
          static get meta() {
            return {
              id: "hreflang",
              title: str_89(UIStrings109.title),
              failureTitle: str_89(UIStrings109.failureTitle),
              description: str_89(UIStrings109.description),
              supportedModes: ["navigation"],
              requiredArtifacts: ["LinkElements", "URL"]
            };
          }
          /**
           * @param {LH.Artifacts} artifacts
           * @return {LH.Audit.Product}
           */
          static audit({ LinkElements: LinkElements2 }) {
            const invalidHreflangs = [];
            const auditableLinkElements = LinkElements2.filter((linkElement) => {
              const isAlternate = linkElement.rel === "alternate";
              const hasHreflang = linkElement.hreflang;
              const isInBody = linkElement.source === "body";
              return isAlternate && hasHreflang && !isInBody;
            });
            for (const link2 of auditableLinkElements) {
              const reasons = [];
              let source2;
              if (!isExpectedLanguageCode(link2.hreflang)) {
                reasons.push(str_89(UIStrings109.unexpectedLanguage));
              }
              if (!isFullyQualified(link2.hrefRaw.toLowerCase())) {
                reasons.push(str_89(UIStrings109.notFullyQualified));
              }
              if (link2.source === "head") {
                if (link2.node) {
                  source2 = {
                    ...Audit.makeNodeItem(link2.node),
                    snippet: `<link rel="alternate" hreflang="${link2.hreflang}" href="${link2.hrefRaw}" />`
                  };
                } else {
                  source2 = {
                    type: "node",
                    snippet: `<link rel="alternate" hreflang="${link2.hreflang}" href="${link2.hrefRaw}" />`
                  };
                }
              } else if (link2.source === "headers") {
                source2 = `Link: <${link2.hrefRaw}>; rel="alternate"; hreflang="${link2.hreflang}"`;
              }
              if (!source2 || !reasons.length)
                continue;
              invalidHreflangs.push({
                source: source2,
                subItems: {
                  type: "subitems",
                  items: reasons.map((reason) => ({ reason }))
                }
              });
            }
            const headings = [{
              key: "source",
              valueType: "code",
              subItemsHeading: {
                key: "reason",
                valueType: "text"
              },
              label: ""
            }];
            const details = Audit.makeTableDetails(headings, invalidHreflangs);
            return {
              score: Number(invalidHreflangs.length === 0),
              details
            };
          }
        };
        hreflang_default = Hreflang;
      }
    });
    http_status_code_exports = {};
    __export2(http_status_code_exports, {
      UIStrings: () => UIStrings110,
      default: () => http_status_code_default
    });
    init_http_status_code = __esm2({
      "core/audits/seo/http-status-code.js"() {
        "use strict";
        init_process_global();
        init_audit();
        init_i18n();
        init_main_resource();
        HTTP_UNSUCCESSFUL_CODE_LOW = 400;
        HTTP_UNSUCCESSFUL_CODE_HIGH = 599;
        UIStrings110 = {
          /** Title of a Lighthouse audit that provides detail on the HTTP status code a page responds with. This descriptive title is shown when the page has responded with a valid HTTP status code. */
          title: "Page has successful HTTP status code",
          /** Descriptive title of a Lighthouse audit that provides detail on the HTTP status code a page responds with. This descriptive title is shown when the page responds to requests with an HTTP status code that indicates the request was unsuccessful. */
          failureTitle: "Page has unsuccessful HTTP status code",
          /** Description of a Lighthouse audit that tells the user *why* they need to serve pages with a valid HTTP status code. This is displayed after a user expands the section to see more. No character length limits. The last sentence starting with 'Learn' becomes link text to additional documentation. */
          description: "Pages with unsuccessful HTTP status codes may not be indexed properly. [Learn more about HTTP status codes](https://developer.chrome.com/docs/lighthouse/seo/http-status-code/)."
        };
        str_90 = createIcuMessageFn({ url: "core/audits/seo/http-status-code.js" }.url, UIStrings110);
        HTTPStatusCode = class extends Audit {
          static {
            __name(this, "HTTPStatusCode");
          }
          /**
           * @return {LH.Audit.Meta}
           */
          static get meta() {
            return {
              id: "http-status-code",
              title: str_90(UIStrings110.title),
              failureTitle: str_90(UIStrings110.failureTitle),
              description: str_90(UIStrings110.description),
              requiredArtifacts: ["DevtoolsLog", "URL", "GatherContext"],
              supportedModes: ["navigation"]
            };
          }
          /**
           * @param {LH.Artifacts} artifacts
           * @param {LH.Audit.Context} context
           * @return {Promise<LH.Audit.Product>}
           */
          static async audit(artifacts, context2) {
            const devtoolsLog = artifacts.DevtoolsLog;
            const URL3 = artifacts.URL;
            const mainResource = await MainResourceComputed.request({ devtoolsLog, URL: URL3 }, context2);
            const statusCode = mainResource.statusCode;
            if (statusCode >= HTTP_UNSUCCESSFUL_CODE_LOW && statusCode <= HTTP_UNSUCCESSFUL_CODE_HIGH) {
              return {
                score: 0,
                displayValue: `${statusCode}`
              };
            }
            return {
              score: 1
            };
          }
        };
        http_status_code_default = HTTPStatusCode;
      }
    });
    require_Robots = __commonJS({
      "node_modules/robots-parser/Robots.js"(exports2, module2) {
        init_process_global();
        function trimLine(line) {
          if (!line) {
            return null;
          }
          if (Array.isArray(line)) {
            return line.map(trimLine);
          }
          return String(line).trim();
        }
        __name(trimLine, "trimLine");
        function removeComments(line) {
          var commentStartIndex = line.indexOf("#");
          if (commentStartIndex > -1) {
            return line.substr(0, commentStartIndex);
          }
          return line;
        }
        __name(removeComments, "removeComments");
        function splitLine(line) {
          var idx = String(line).indexOf(":");
          if (!line || idx < 0) {
            return null;
          }
          return [line.slice(0, idx), line.slice(idx + 1)];
        }
        __name(splitLine, "splitLine");
        function formatUserAgent(userAgent) {
          var formattedUserAgent = userAgent.toLowerCase();
          var idx = formattedUserAgent.indexOf("/");
          if (idx > -1) {
            formattedUserAgent = formattedUserAgent.substr(0, idx);
          }
          return formattedUserAgent.trim();
        }
        __name(formatUserAgent, "formatUserAgent");
        function normaliseEncoding(path72) {
          try {
            return urlEncodeToUpper(encodeURI(path72).replace(/%25/g, "%"));
          } catch (e) {
            return path72;
          }
        }
        __name(normaliseEncoding, "normaliseEncoding");
        function urlEncodeToUpper(path72) {
          return path72.replace(/%[0-9a-fA-F]{2}/g, function(match) {
            return match.toUpperCase();
          });
        }
        __name(urlEncodeToUpper, "urlEncodeToUpper");
        function matches(pattern2, path72) {
          var matchingLengths = new Array(path72.length + 1);
          var numMatchingLengths = 1;
          matchingLengths[0] = 0;
          for (var p = 0; p < pattern2.length; p++) {
            if (pattern2[p] === "$" && p + 1 === pattern2.length) {
              return matchingLengths[numMatchingLengths - 1] === path72.length;
            }
            if (pattern2[p] == "*") {
              numMatchingLengths = path72.length - matchingLengths[0] + 1;
              for (var i = 1; i < numMatchingLengths; i++) {
                matchingLengths[i] = matchingLengths[i - 1] + 1;
              }
            } else {
              var numMatches = 0;
              for (var i = 0; i < numMatchingLengths; i++) {
                if (matchingLengths[i] < path72.length && path72[matchingLengths[i]] === pattern2[p]) {
                  matchingLengths[numMatches++] = matchingLengths[i] + 1;
                }
              }
              if (numMatches == 0) {
                return false;
              }
              numMatchingLengths = numMatches;
            }
          }
          return true;
        }
        __name(matches, "matches");
        function parseRobots(contents, robots) {
          var newlineRegex = /\r\n|\r|\n/;
          var lines = contents.split(newlineRegex).map(removeComments).map(splitLine).map(trimLine);
          var currentUserAgents = [];
          var isNoneUserAgentState = true;
          for (var i = 0; i < lines.length; i++) {
            var line = lines[i];
            if (!line || !line[0]) {
              continue;
            }
            switch (line[0].toLowerCase()) {
              case "user-agent":
                if (isNoneUserAgentState) {
                  currentUserAgents.length = 0;
                }
                if (line[1]) {
                  currentUserAgents.push(formatUserAgent(line[1]));
                }
                break;
              case "disallow":
                robots.addRule(currentUserAgents, line[1], false, i + 1);
                break;
              case "allow":
                robots.addRule(currentUserAgents, line[1], true, i + 1);
                break;
              case "crawl-delay":
                robots.setCrawlDelay(currentUserAgents, line[1]);
                break;
              case "sitemap":
                if (line[1]) {
                  robots.addSitemap(line[1]);
                }
                break;
              case "host":
                if (line[1]) {
                  robots.setPreferredHost(line[1].toLowerCase());
                }
                break;
            }
            isNoneUserAgentState = line[0].toLowerCase() !== "user-agent";
          }
        }
        __name(parseRobots, "parseRobots");
        function findRule(path72, rules2) {
          var matchedRule = null;
          for (var i = 0; i < rules2.length; i++) {
            var rule = rules2[i];
            if (!matches(rule.pattern, path72)) {
              continue;
            }
            if (!matchedRule || rule.pattern.length > matchedRule.pattern.length) {
              matchedRule = rule;
            } else if (rule.pattern.length == matchedRule.pattern.length && rule.allow && !matchedRule.allow) {
              matchedRule = rule;
            }
          }
          return matchedRule;
        }
        __name(findRule, "findRule");
        function parseUrl(url) {
          try {
            var url = new URL(url, "http://robots-relative.samclarke.com/");
            if (!url.port) {
              url.port = url.protocol === "https:" ? 443 : 80;
            }
            return url;
          } catch (e) {
            return null;
          }
        }
        __name(parseUrl, "parseUrl");
        function Robots(url, contents) {
          this._url = parseUrl(url) || {};
          this._rules = /* @__PURE__ */ Object.create(null);
          this._sitemaps = [];
          this._preferredHost = null;
          parseRobots(contents || "", this);
        }
        __name(Robots, "Robots");
        Robots.prototype.addRule = function(userAgents2, pattern2, allow, lineNumber) {
          var rules2 = this._rules;
          userAgents2.forEach(function(userAgent) {
            rules2[userAgent] = rules2[userAgent] || [];
            if (!pattern2) {
              return;
            }
            rules2[userAgent].push({
              pattern: normaliseEncoding(pattern2),
              allow,
              lineNumber
            });
          });
        };
        Robots.prototype.setCrawlDelay = function(userAgents2, delayStr) {
          var rules2 = this._rules;
          var delay = Number(delayStr);
          userAgents2.forEach(function(userAgent) {
            rules2[userAgent] = rules2[userAgent] || [];
            if (isNaN(delay)) {
              return;
            }
            rules2[userAgent].crawlDelay = delay;
          });
        };
        Robots.prototype.addSitemap = function(url) {
          this._sitemaps.push(url);
        };
        Robots.prototype.setPreferredHost = function(url) {
          this._preferredHost = url;
        };
        Robots.prototype._getRule = function(url, ua) {
          var parsedUrl = parseUrl(url) || {};
          var userAgent = formatUserAgent(ua || "*");
          if (parsedUrl.protocol !== this._url.protocol || parsedUrl.hostname !== this._url.hostname || parsedUrl.port !== this._url.port) {
            return;
          }
          var rules2 = this._rules[userAgent] || this._rules["*"] || [];
          var path72 = urlEncodeToUpper(parsedUrl.pathname + parsedUrl.search);
          var rule = findRule(path72, rules2);
          return rule;
        };
        Robots.prototype.isAllowed = function(url, ua) {
          var rule = this._getRule(url, ua);
          if (typeof rule === "undefined") {
            return;
          }
          return !rule || rule.allow;
        };
        Robots.prototype.getMatchingLineNumber = function(url, ua) {
          var rule = this._getRule(url, ua);
          return rule ? rule.lineNumber : -1;
        };
        Robots.prototype.isDisallowed = function(url, ua) {
          return !this.isAllowed(url, ua);
        };
        Robots.prototype.getCrawlDelay = function(ua) {
          var userAgent = formatUserAgent(ua || "*");
          return (this._rules[userAgent] || this._rules["*"] || {}).crawlDelay;
        };
        Robots.prototype.getPreferredHost = function() {
          return this._preferredHost;
        };
        Robots.prototype.getSitemaps = function() {
          return this._sitemaps.slice(0);
        };
        module2.exports = Robots;
      }
    });
    require_robots_parser = __commonJS({
      "node_modules/robots-parser/index.js"(exports2, module2) {
        init_process_global();
        var Robots = require_Robots();
        module2.exports = function(url, contents) {
          return new Robots(url, contents);
        };
      }
    });
    is_crawlable_exports = {};
    __export2(is_crawlable_exports, {
      UIStrings: () => UIStrings111,
      default: () => is_crawlable_default
    });
    init_is_crawlable = __esm2({
      "core/audits/seo/is-crawlable.js"() {
        "use strict";
        init_process_global();
        import_robots_parser = __toESM(require_robots_parser(), 1);
        init_audit();
        init_main_resource();
        init_i18n();
        BOT_USER_AGENTS = /* @__PURE__ */ new Set([
          void 0,
          "Googlebot",
          "bingbot",
          "DuckDuckBot",
          "archive.org_bot"
        ]);
        BLOCKLIST = /* @__PURE__ */ new Set([
          "noindex",
          "none"
        ]);
        ROBOTS_HEADER = "x-robots-tag";
        UNAVAILABLE_AFTER = "unavailable_after";
        UIStrings111 = {
          /** Title of a Lighthouse audit that provides detail on if search-engine crawlers are blocked from indexing the page. This title is shown when the page is not blocked from indexing and can be crawled. */
          title: "Page isn\u2019t blocked from indexing",
          /** Title of a Lighthouse audit that provides detail on if search-engine crawlers are blocked from indexing the page. This title is shown when the page has been configured to block indexing and therefore cannot be indexed by search engines. */
          failureTitle: "Page is blocked from indexing",
          /** Description of a Lighthouse audit that tells the user *why* allowing search-engine crawling of their page is beneficial. This is displayed after a user expands the section to see more. No character length limits. The last sentence starting with 'Learn' becomes link text to additional documentation. */
          description: "Search engines are unable to include your pages in search results if they don't have permission to crawl them. [Learn more about crawler directives](https://developer.chrome.com/docs/lighthouse/seo/is-crawlable/)."
        };
        str_91 = createIcuMessageFn({ url: "core/audits/seo/is-crawlable.js" }.url, UIStrings111);
        __name(isUnavailable, "isUnavailable");
        __name(hasBlockingDirective, "hasBlockingDirective");
        __name(getUserAgentFromHeaderDirectives, "getUserAgentFromHeaderDirectives");
        IsCrawlable = class _IsCrawlable extends Audit {
          static {
            __name(this, "IsCrawlable");
          }
          /**
           * @return {LH.Audit.Meta}
           */
          static get meta() {
            return {
              id: "is-crawlable",
              title: str_91(UIStrings111.title),
              failureTitle: str_91(UIStrings111.failureTitle),
              description: str_91(UIStrings111.description),
              supportedModes: ["navigation"],
              requiredArtifacts: ["MetaElements", "RobotsTxt", "URL", "DevtoolsLog"]
            };
          }
          /**
           * @param {LH.Artifacts.MetaElement} metaElement
           */
          static handleMetaElement(metaElement) {
            const content = metaElement.content || "";
            if (hasBlockingDirective(content)) {
              return {
                source: {
                  ...Audit.makeNodeItem(metaElement.node),
                  snippet: `<meta name="${metaElement.name}" content="${content}" />`
                }
              };
            }
          }
          /**
           * @param {string|undefined} userAgent
           * @param {LH.Artifacts.NetworkRequest} mainResource
           * @param {LH.Artifacts.MetaElement[]} metaElements
           * @param {import('robots-parser').Robot|undefined} parsedRobotsTxt
           * @param {URL} robotsTxtUrl
           */
          static determineIfCrawlableForUserAgent(userAgent, mainResource, metaElements, parsedRobotsTxt, robotsTxtUrl) {
            const blockingDirectives = [];
            let meta;
            if (userAgent)
              meta = metaElements.find((meta2) => meta2.name === userAgent.toLowerCase());
            if (!meta)
              meta = metaElements.find((meta2) => meta2.name === "robots");
            if (meta) {
              const blockingDirective = _IsCrawlable.handleMetaElement(meta);
              if (blockingDirective)
                blockingDirectives.push(blockingDirective);
            }
            for (const header of mainResource.responseHeaders || []) {
              if (header.name.toLowerCase() !== ROBOTS_HEADER)
                continue;
              const directiveUserAgent = getUserAgentFromHeaderDirectives(header.value);
              if (directiveUserAgent !== userAgent && directiveUserAgent !== void 0)
                continue;
              let directiveWithoutUserAgentPrefix = header.value.trim();
              if (userAgent && header.value.startsWith(`${userAgent}:`)) {
                directiveWithoutUserAgentPrefix = header.value.replace(`${userAgent}:`, "");
              }
              if (!hasBlockingDirective(directiveWithoutUserAgentPrefix))
                continue;
              blockingDirectives.push({ source: `${header.name}: ${header.value}` });
            }
            if (parsedRobotsTxt && !parsedRobotsTxt.isAllowed(mainResource.url, userAgent)) {
              const line = parsedRobotsTxt.getMatchingLineNumber(mainResource.url) || 1;
              blockingDirectives.push({
                source: {
                  type: (
                    /** @type {const} */
                    "source-location"
                  ),
                  url: robotsTxtUrl.href,
                  urlProvider: (
                    /** @type {const} */
                    "network"
                  ),
                  line: line - 1,
                  column: 0
                }
              });
            }
            return blockingDirectives;
          }
          /**
           * @param {LH.Artifacts} artifacts
           * @param {LH.Audit.Context} context
           * @return {Promise<LH.Audit.Product>}
           */
          static async audit(artifacts, context2) {
            const devtoolsLog = artifacts.DevtoolsLog;
            const mainResource = await MainResourceComputed.request({ devtoolsLog, URL: artifacts.URL }, context2);
            const robotsTxtUrl = new URL("/robots.txt", mainResource.url);
            const parsedRobotsTxt = artifacts.RobotsTxt.content ? (0, import_robots_parser.default)(robotsTxtUrl.href, artifacts.RobotsTxt.content) : void 0;
            const blockedUserAgents = [];
            const genericBlockingDirectives = [];
            for (const userAgent of BOT_USER_AGENTS) {
              const blockingDirectives = _IsCrawlable.determineIfCrawlableForUserAgent(userAgent, mainResource, artifacts.MetaElements, parsedRobotsTxt, robotsTxtUrl);
              if (blockingDirectives.length > 0) {
                blockedUserAgents.push(userAgent);
              }
              if (userAgent === void 0) {
                genericBlockingDirectives.push(...blockingDirectives);
              }
            }
            const score = blockedUserAgents.length === BOT_USER_AGENTS.size ? 0 : 1;
            const warnings = [];
            if (score && blockedUserAgents.length > 0) {
              const list2 = blockedUserAgents.filter(Boolean).join(", ");
              warnings.push(`The following bot user agents are blocked from crawling: ${list2}. The audit is otherwise passing, because at least one bot was explicitly allowed.`);
            }
            const headings = [
              { key: "source", valueType: "code", label: "Blocking Directive Source" }
            ];
            const details = Audit.makeTableDetails(headings, score === 0 ? genericBlockingDirectives : []);
            return {
              score,
              details,
              warnings
            };
          }
        };
        is_crawlable_default = IsCrawlable;
      }
    });
    link_text_exports = {};
    __export2(link_text_exports, {
      UIStrings: () => UIStrings112,
      default: () => link_text_default
    });
    init_link_text = __esm2({
      "core/audits/seo/link-text.js"() {
        "use strict";
        init_process_global();
        init_audit();
        init_url_utils();
        init_i18n();
        nonDescriptiveLinkTexts = {
          // English
          "en": /* @__PURE__ */ new Set([
            "click here",
            "click this",
            "go",
            "here",
            "information",
            "learn more",
            "more",
            "more info",
            "more information",
            "right here",
            "read more",
            "see more",
            "start",
            "this"
          ]),
          // Japanese
          "ja": /* @__PURE__ */ new Set([
            "\u3053\u3053\u3092\u30AF\u30EA\u30C3\u30AF",
            "\u3053\u3061\u3089\u3092\u30AF\u30EA\u30C3\u30AF",
            "\u30EA\u30F3\u30AF",
            "\u7D9A\u304D\u3092\u8AAD\u3080",
            "\u7D9A\u304F",
            "\u5168\u6587\u8868\u793A"
          ]),
          // Spanish
          "es": /* @__PURE__ */ new Set([
            "click aqu\xED",
            "click aqui",
            "clicka aqu\xED",
            "clicka aqui",
            "pincha aqu\xED",
            "pincha aqui",
            "aqu\xED",
            "aqui",
            "m\xE1s",
            "mas",
            "m\xE1s informaci\xF3n",
            "m\xE1s informacion",
            "mas informaci\xF3n",
            "mas informacion",
            "este",
            "enlace",
            "este enlace",
            "empezar"
          ]),
          // Portuguese
          "pt": /* @__PURE__ */ new Set([
            "clique aqui",
            "ir",
            "mais informa\xE7\xE3o",
            "mais informa\xE7\xF5es",
            "mais",
            "veja mais"
          ]),
          // Korean
          "ko": /* @__PURE__ */ new Set([
            "\uC5EC\uAE30",
            "\uC5EC\uAE30\uB97C \uD074\uB9AD",
            "\uD074\uB9AD",
            "\uB9C1\uD06C",
            "\uC790\uC138\uD788",
            "\uC790\uC138\uD788 \uBCF4\uAE30",
            "\uACC4\uC18D",
            "\uC774\uB3D9",
            "\uC804\uCCB4 \uBCF4\uAE30"
          ]),
          // Swedish
          "sv": /* @__PURE__ */ new Set([
            "h\xE4r",
            "klicka h\xE4r",
            "l\xE4s mer",
            "mer",
            "mer info",
            "mer information"
          ]),
          // German
          "de": /* @__PURE__ */ new Set([
            "klicke hier",
            "hier klicken",
            "hier",
            "mehr",
            "siehe",
            "dies",
            "das",
            "weiterlesen"
          ]),
          // Tamil
          "ta": /* @__PURE__ */ new Set([
            "\u0B85\u0B9F\u0BC1\u0BA4\u0BCD\u0BA4 \u0BAA\u0B95\u0BCD\u0B95\u0BAE\u0BCD",
            "\u0BAE\u0BB1\u0BC1\u0BAA\u0B95\u0BCD\u0B95\u0BAE\u0BCD",
            "\u0BAE\u0BC1\u0BA8\u0BCD\u0BA4\u0BC8\u0BAF \u0BAA\u0B95\u0BCD\u0B95\u0BAE\u0BCD",
            "\u0BAE\u0BC1\u0BA9\u0BCD\u0BAA\u0B95\u0BCD\u0B95\u0BAE\u0BCD",
            "\u0BAE\u0BC7\u0BB2\u0BC1\u0BAE\u0BCD \u0B85\u0BB1\u0BBF\u0B95",
            "\u0BAE\u0BC7\u0BB2\u0BC1\u0BAE\u0BCD \u0BA4\u0B95\u0BB5\u0BB2\u0BC1\u0B95\u0BCD\u0B95\u0BC1",
            "\u0BAE\u0BC7\u0BB2\u0BC1\u0BAE\u0BCD \u0BA4\u0BB0\u0BB5\u0BC1\u0B95\u0BB3\u0BC1\u0B95\u0BCD\u0B95\u0BC1",
            "\u0BA4\u0BAF\u0BB5\u0BC1\u0B9A\u0BC6\u0BAF\u0BCD\u0BA4\u0BC1 \u0B87\u0B99\u0BCD\u0B95\u0BC7 \u0B85\u0BB4\u0BC1\u0BA4\u0BCD\u0BA4\u0BB5\u0BC1\u0BAE\u0BCD",
            "\u0B87\u0B99\u0BCD\u0B95\u0BC7 \u0B95\u0BBF\u0BB3\u0BBF\u0B95\u0BCD \u0B9A\u0BC6\u0BAF\u0BCD\u0BAF\u0BB5\u0BC1\u0BAE\u0BCD"
          ]),
          // Persian
          "fa": /* @__PURE__ */ new Set([
            "\u0627\u0637\u0644\u0627\u0639\u0627\u062A \u0628\u06CC\u0634\u062A\u0631",
            "\u0627\u0637\u0644\u0627\u0639\u0627\u062A",
            "\u0627\u06CC\u0646",
            "\u0627\u06CC\u0646\u062C\u0627 \u0628\u0632\u0646\u06CC\u062F",
            "\u0627\u06CC\u0646\u062C\u0627 \u06A9\u0644\u06CC\u06A9 \u06A9\u0646\u06CC\u062F",
            "\u0627\u06CC\u0646\u062C\u0627",
            "\u0628\u0631\u0648",
            "\u0628\u06CC\u0634\u062A\u0631 \u0628\u062E\u0648\u0627\u0646\u06CC\u062F",
            "\u0628\u06CC\u0634\u062A\u0631 \u0628\u062F\u0627\u0646\u06CC\u062F",
            "\u0628\u06CC\u0634\u062A\u0631",
            "\u0634\u0631\u0648\u0639"
          ])
        };
        UIStrings112 = {
          /** Title of a Lighthouse audit that tests if each link on a page contains a sufficient description of what a user will find when they click it. Generic, non-descriptive text like "click here" doesn't give an indication of what the link leads to. This descriptive title is shown when all links on the page have sufficient textual descriptions. */
          title: "Links have descriptive text",
          /** Title of a Lighthouse audit that tests if each link on a page contains a sufficient description of what a user will find when they click it. Generic, non-descriptive text like "click here" doesn't give an indication of what the link leads to. This descriptive title is shown when one or more links on the page contain generic, non-descriptive text. */
          failureTitle: "Links do not have descriptive text",
          /** Description of a Lighthouse audit that tells the user *why* they need to have descriptive text on the links in their page. This is displayed after a user expands the section to see more. No character length limits. The last sentence starting with 'Learn' becomes link text to additional documentation. */
          description: "Descriptive link text helps search engines understand your content. [Learn how to make links more accessible](https://developer.chrome.com/docs/lighthouse/seo/link-text/).",
          /** [ICU Syntax] Label for the audit identifying the number of links found. "link" here refers to the links in a web page to other web pages. */
          displayValue: `{itemCount, plural,
    =1 {1 link found}
    other {# links found}
    }`
        };
        str_92 = createIcuMessageFn({ url: "core/audits/seo/link-text.js" }.url, UIStrings112);
        LinkText = class extends Audit {
          static {
            __name(this, "LinkText");
          }
          /**
           * @return {LH.Audit.Meta}
           */
          static get meta() {
            return {
              id: "link-text",
              title: str_92(UIStrings112.title),
              failureTitle: str_92(UIStrings112.failureTitle),
              description: str_92(UIStrings112.description),
              requiredArtifacts: ["URL", "AnchorElements"]
            };
          }
          /**
           * @param {LH.Artifacts} artifacts
           * @return {LH.Audit.Product}
           */
          static audit(artifacts) {
            const failingLinks = artifacts.AnchorElements.filter((link2) => {
              if (!link2.href || link2.rel.includes("nofollow"))
                return false;
              const href = link2.href.toLowerCase();
              if (href.startsWith("javascript:") || href.startsWith("mailto:") || // This line prevents the audit from flagging anchor links.
              // In this case it is better to use `finalDisplayedUrl` than `mainDocumentUrl`.
              url_utils_default.equalWithExcludedFragments(link2.href, artifacts.URL.finalDisplayedUrl)) {
                return false;
              }
              const searchTerm = link2.text.trim().toLowerCase();
              if (searchTerm) {
                if (link2.textLang) {
                  const lang = link2.textLang.split("-")[0];
                  if (nonDescriptiveLinkTexts[lang] && nonDescriptiveLinkTexts[lang].has(searchTerm)) {
                    return true;
                  }
                } else {
                  for (const texts of Object.values(nonDescriptiveLinkTexts)) {
                    if (texts.has(searchTerm)) {
                      return true;
                    }
                  }
                }
              }
              return false;
            }).map((link2) => {
              return {
                href: link2.href,
                text: link2.text.trim(),
                textLang: link2.textLang
              };
            });
            const headings = [
              { key: "href", valueType: "url", label: "Link destination" },
              { key: "text", valueType: "text", label: "Link Text" }
            ];
            const details = Audit.makeTableDetails(headings, failingLinks);
            let displayValue;
            if (failingLinks.length) {
              displayValue = str_92(UIStrings112.displayValue, { itemCount: failingLinks.length });
            }
            return {
              score: Number(failingLinks.length === 0),
              details,
              displayValue
            };
          }
        };
        link_text_default = LinkText;
      }
    });
    structured_data_exports = {};
    __export2(structured_data_exports, {
      UIStrings: () => UIStrings113,
      default: () => structured_data_default
    });
    init_structured_data = __esm2({
      "core/audits/seo/manual/structured-data.js"() {
        "use strict";
        init_process_global();
        init_manual_audit();
        init_i18n();
        UIStrings113 = {
          /** Description of a Lighthouse audit that provides detail on the structured data in a page. "Structured data" is a standardized data format on a page that helps a search engine categorize and understand its contents. This description is displayed after a user expands the section to see more. No character length limits. The last sentence starting with 'Learn' becomes link text to additional documentation. */
          description: "Run the [Structured Data Testing Tool](https://developers.google.com/search/docs/appearance/structured-data/) to validate structured data. [Learn more about Structured Data](https://developer.chrome.com/docs/lighthouse/seo/structured-data/).",
          /** Title of a Lighthouse audit that prompts users to manually check their page for valid structured data. "Structured data" is a standardized data format on a page that helps a search engine categorize and understand its contents. */
          title: "Structured data is valid"
        };
        str_93 = createIcuMessageFn({ url: "core/audits/seo/manual/structured-data.js" }.url, UIStrings113);
        StructuredData = class extends manual_audit_default {
          static {
            __name(this, "StructuredData");
          }
          /**
           * @return {LH.Audit.Meta}
           */
          static get meta() {
            return Object.assign({
              id: "structured-data",
              description: str_93(UIStrings113.description),
              title: str_93(UIStrings113.title)
            }, super.partialMeta);
          }
        };
        structured_data_default = StructuredData;
      }
    });
    meta_description_exports = {};
    __export2(meta_description_exports, {
      UIStrings: () => UIStrings114,
      default: () => meta_description_default
    });
    init_meta_description = __esm2({
      "core/audits/seo/meta-description.js"() {
        "use strict";
        init_process_global();
        init_audit();
        init_i18n();
        UIStrings114 = {
          /** Title of a Lighthouse audit that provides detail on the web page's document meta description. This descriptive title is shown when the document has a meta description. "meta" should be left untranslated because it refers to an HTML element. */
          title: "Document has a meta description",
          /** Title of a Lighthouse audit that provides detail on the web page's document meta description. This descriptive title is shown when the document does not have a meta description. "meta" should be left untranslated because it refers to an HTML element. */
          failureTitle: "Document does not have a meta description",
          /** Description of a Lighthouse audit that tells the user *why* they need to have meta descriptions on their page. This is displayed after a user expands the section to see more. No character length limits. The last sentence starting with 'Learn' becomes link text to additional documentation. */
          description: "Meta descriptions may be included in search results to concisely summarize page content. [Learn more about the meta description](https://developer.chrome.com/docs/lighthouse/seo/meta-description/).",
          /** Explanatory message stating that there was a failure in an audit caused by the page's meta description text being empty. */
          explanation: "Description text is empty."
        };
        str_94 = createIcuMessageFn({ url: "core/audits/seo/meta-description.js" }.url, UIStrings114);
        Description = class extends Audit {
          static {
            __name(this, "Description");
          }
          /**
           * @return {LH.Audit.Meta}
           */
          static get meta() {
            return {
              id: "meta-description",
              title: str_94(UIStrings114.title),
              failureTitle: str_94(UIStrings114.failureTitle),
              description: str_94(UIStrings114.description),
              requiredArtifacts: ["MetaElements"]
            };
          }
          /**
           * @param {LH.Artifacts} artifacts
           * @return {LH.Audit.Product}
           */
          static audit(artifacts) {
            const metaDescription = artifacts.MetaElements.find((meta) => meta.name === "description");
            if (!metaDescription) {
              return {
                score: 0
              };
            }
            const description2 = metaDescription.content || "";
            if (description2.trim().length === 0) {
              return {
                score: 0,
                explanation: str_94(UIStrings114.explanation)
              };
            }
            return {
              score: 1
            };
          }
        };
        meta_description_default = Description;
      }
    });
    robots_txt_exports2 = {};
    __export2(robots_txt_exports2, {
      UIStrings: () => UIStrings115,
      default: () => robots_txt_default2
    });
    init_robots_txt2 = __esm2({
      "core/audits/seo/robots-txt.js"() {
        "use strict";
        init_process_global();
        init_audit();
        init_i18n();
        HTTP_CLIENT_ERROR_CODE_LOW = 400;
        HTTP_SERVER_ERROR_CODE_LOW = 500;
        DIRECTIVE_SITEMAP = "sitemap";
        DIRECTIVE_USER_AGENT = "user-agent";
        DIRECTIVE_ALLOW = "allow";
        DIRECTIVE_DISALLOW = "disallow";
        DIRECTIVES_GROUP_MEMBERS = /* @__PURE__ */ new Set([DIRECTIVE_ALLOW, DIRECTIVE_DISALLOW]);
        DIRECTIVE_SAFELIST = /* @__PURE__ */ new Set([
          DIRECTIVE_USER_AGENT,
          DIRECTIVE_DISALLOW,
          // standard
          DIRECTIVE_ALLOW,
          DIRECTIVE_SITEMAP,
          // universally supported
          "crawl-delay",
          // yahoo, bing, yandex
          "clean-param",
          "host",
          // yandex
          "request-rate",
          "visit-time",
          "noindex",
          "content-signal"
          // not officially supported, but used in the wild
        ]);
        SITEMAP_VALID_PROTOCOLS = /* @__PURE__ */ new Set(["https:", "http:", "ftp:"]);
        UIStrings115 = {
          /** Title of a Lighthouse audit that provides detail on the site's robots.txt file. Note: "robots.txt" is a canonical filename and should not be translated. This descriptive title is shown when the robots.txt file is present and configured correctly. */
          title: "robots.txt is valid",
          /** Title of a Lighthouse audit that provides detail on the site's robots.txt file. Note: "robots.txt" is a canonical filename and should not be translated. This descriptive title is shown when the robots.txt file is misconfigured, which makes the page hard or impossible to scan via web crawler. */
          failureTitle: "robots.txt is not valid",
          /** Description of a Lighthouse audit that tells the user *why* they need to have a valid robots.txt file. Note: "robots.txt" is a canonical filename and should not be translated. This is displayed after a user expands the section to see more. No character length limits. */
          description: "If your robots.txt file is malformed, crawlers may not be able to understand how you want your website to be crawled or indexed. [Learn more about robots.txt](https://developer.chrome.com/docs/lighthouse/seo/invalid-robots-txt/).",
          /**
           * @description Label for the audit identifying that the robots.txt request has returned a specific HTTP status code. Note: "robots.txt" is a canonical filename and should not be translated.
           * @example {500} statusCode
           * */
          displayValueHttpBadCode: "Request for robots.txt returned HTTP status: {statusCode}",
          /** [ICU Syntax] Label for the audit identifying the number of errors that occured while validating the robots.txt file. "itemCount" will be replaced by the integer count of errors encountered. */
          displayValueValidationError: `{itemCount, plural,
    =1 {1 error found}
    other {# errors found}
    }`,
          /** Explanatory message stating that there was a failure in an audit caused by Lighthouse not being able to download the robots.txt file for the site.  Note: "robots.txt" is a canonical filename and should not be translated. */
          explanation: "Lighthouse was unable to download a robots.txt file"
        };
        str_95 = createIcuMessageFn({ url: "core/audits/seo/robots-txt.js" }.url, UIStrings115);
        __name(verifyDirective, "verifyDirective");
        __name(parseLine, "parseLine");
        __name(validateRobots, "validateRobots");
        RobotsTxt2 = class extends Audit {
          static {
            __name(this, "RobotsTxt");
          }
          /**
           * @return {LH.Audit.Meta}
           */
          static get meta() {
            return {
              id: "robots-txt",
              title: str_95(UIStrings115.title),
              failureTitle: str_95(UIStrings115.failureTitle),
              description: str_95(UIStrings115.description),
              requiredArtifacts: ["RobotsTxt"]
            };
          }
          /**
           * @param {LH.Artifacts} artifacts
           * @return {LH.Audit.Product}
           */
          static audit(artifacts) {
            const { status, content } = artifacts.RobotsTxt;
            if (!status) {
              return {
                score: 0,
                explanation: str_95(UIStrings115.explanation)
              };
            }
            if (status >= HTTP_SERVER_ERROR_CODE_LOW) {
              return {
                score: 0,
                displayValue: str_95(UIStrings115.displayValueHttpBadCode, { statusCode: status })
              };
            } else if (status >= HTTP_CLIENT_ERROR_CODE_LOW || content === "") {
              return {
                score: 1,
                notApplicable: true
              };
            }
            if (content === null) {
              throw new Error(`Status ${status} was valid, but content was null`);
            }
            const validationErrors = validateRobots(content);
            const headings = [
              { key: "index", valueType: "text", label: "Line #" },
              { key: "line", valueType: "code", label: "Content" },
              { key: "message", valueType: "code", label: "Error" }
            ];
            const details = Audit.makeTableDetails(headings, validationErrors);
            let displayValue;
            if (validationErrors.length) {
              displayValue = str_95(UIStrings115.displayValueValidationError, { itemCount: validationErrors.length });
            }
            return {
              score: Number(validationErrors.length === 0),
              details,
              displayValue
            };
          }
        };
        robots_txt_default2 = RobotsTxt2;
      }
    });
    third_party_cookies_exports = {};
    __export2(third_party_cookies_exports, {
      UIStrings: () => UIStrings116,
      default: () => third_party_cookies_default
    });
    init_third_party_cookies = __esm2({
      "core/audits/third-party-cookies.js"() {
        "use strict";
        init_process_global();
        init_audit();
        init_i18n();
        UIStrings116 = {
          /** Title of a Lighthouse audit that provides detail on the use of third party cookies. This descriptive title is shown to users when the page does not use third party cookies. */
          title: "Avoids third-party cookies",
          /** Title of a Lighthouse audit that provides detail on the use of third party cookies. This descriptive title is shown to users when the page uses third party cookies. */
          failureTitle: "Uses third-party cookies",
          /** Description of a Lighthouse audit that tells the user why they should not use third party cookies on their page. This is displayed after a user expands the section to see more. No character length limits. The last sentence starting with 'Learn' becomes link text to additional documentation. */
          description: "Third-party cookies may be blocked in some contexts. [Learn more about preparing for third-party cookie restrictions](https://privacysandbox.google.com/cookies/prepare/overview).",
          /** [ICU Syntax] Label for the audit identifying the number of third-party cookies. */
          displayValue: `{itemCount, plural,
    =1 {1 cookie found}
    other {# cookies found}
    }`
        };
        str_96 = createIcuMessageFn({ url: "core/audits/third-party-cookies.js" }.url, UIStrings116);
        ThirdPartyCookies = class extends Audit {
          static {
            __name(this, "ThirdPartyCookies");
          }
          /**
           * @return {LH.Audit.Meta}
           */
          static get meta() {
            return {
              id: "third-party-cookies",
              title: str_96(UIStrings116.title),
              failureTitle: str_96(UIStrings116.failureTitle),
              description: str_96(UIStrings116.description),
              requiredArtifacts: ["InspectorIssues"]
            };
          }
          /**
           * https://source.chromium.org/chromium/chromium/src/+/d2fcd4ba302baeabf4b96d8fa9fdb7a215736c31:third_party/devtools-frontend/src/front_end/models/issues_manager/CookieIssue.ts;l=62-69
           * @param {LH.Crdp.Audits.CookieIssueDetails} cookieIssue
           * @return {string}
           */
          static getCookieId(cookieIssue) {
            if (!cookieIssue.cookie) {
              return cookieIssue.rawCookieLine ?? "no-cookie-info";
            }
            const { domain, path: path72, name } = cookieIssue.cookie;
            const cookieId = `${domain};${path72};${name}`;
            return cookieId;
          }
          /**
           * @param {LH.Artifacts} artifacts
           * @return {Promise<LH.Audit.Product>}
           */
          static async audit(artifacts) {
            const seenCookies = /* @__PURE__ */ new Set();
            const items2 = [];
            for (const issue2 of artifacts.InspectorIssues.cookieIssue ?? []) {
              const isPhaseoutWarn = issue2.cookieWarningReasons.includes("WarnThirdPartyPhaseout");
              const isPhaseoutExclude = issue2.cookieExclusionReasons.includes("ExcludeThirdPartyPhaseout");
              if (!isPhaseoutWarn && !isPhaseoutExclude)
                continue;
              const name = issue2.cookie?.name || issue2.rawCookieLine;
              if (!name)
                continue;
              const cookieId = this.getCookieId(issue2);
              if (seenCookies.has(cookieId))
                continue;
              seenCookies.add(cookieId);
              items2.push({
                name,
                url: issue2.cookieUrl
              });
            }
            const headings = [
              { key: "name", valueType: "text", label: str_96(UIStrings.columnName) },
              { key: "url", valueType: "url", label: str_96(UIStrings.columnURL) }
            ];
            const details = Audit.makeTableDetails(headings, items2);
            let displayValue;
            if (items2.length > 0) {
              displayValue = str_96(UIStrings116.displayValue, { itemCount: items2.length });
            }
            return {
              score: items2.length ? 0 : 1,
              displayValue,
              details
            };
          }
        };
        third_party_cookies_default = ThirdPartyCookies;
      }
    });
    trusted_types_xss_exports = {};
    __export2(trusted_types_xss_exports, {
      UIStrings: () => UIStrings117,
      default: () => trusted_types_xss_default
    });
    init_trusted_types_xss = __esm2({
      "core/audits/trusted-types-xss.js"() {
        "use strict";
        init_process_global();
        import_csp2 = __toESM(require_csp(), 1);
        init_audit();
        init_main_resource();
        init_i18n();
        init_csp_evaluator();
        UIStrings117 = {
          /** Title of a Lighthouse audit that evaluates whether the set CSP header and Trusted Types directive is mitigating DOM-based XSS. "CSP" stands for "Content-Security-Policy" and should not be translated. "XSS" stands for "Cross Site Scripting" and should not be translated. */
          title: "Mitigate DOM-based XSS with Trusted Types",
          /** Description of a Lighthouse audit that evaluates whether the set CSP header and Trusted Types directive is mitigating DOM-based XSS. This is displayed after a user expands the section to see more. "CSP" stands for "Content-Security-Policy" and should not be translated. "XSS" stands for "Cross Site Scripting" and should not be translated. No character length limits. The last sentence starting with 'Learn' becomes link text to additional documentation. */
          description: "The `require-trusted-types-for` directive in the `Content-Security-Policy` (CSP) header instructs user agents to control the data passed to DOM XSS sink functions. [Learn more about mitigating DOM-based XSS with Trusted Types](https://developer.chrome.com/docs/lighthouse/best-practices/trusted-types-xss).",
          /** Summary text for the results of a Lighthouse audit that evaluates whether the set CSP header and Trusted Types directive is mitigating DOM-based XSS. This text is displayed if the page does not respond with a CSP header and a Trusted Types directive. "CSP" stands for "Content-Security-Policy" and should not be translated. "XSS" stands for "Cross Site Scripting" and should not be translated. */
          noTrustedTypesToMitigateXss: "No `Content-Security-Policy` header with Trusted Types directive found",
          /** Label for a column in a data table; entries will be the severity of an issue with the page's CSP and Trusted Types directive. */
          columnSeverity: "Severity"
        };
        str_97 = createIcuMessageFn({ url: "core/audits/trusted-types-xss.js" }.url, UIStrings117);
        TrustedTypesXss = class extends Audit {
          static {
            __name(this, "TrustedTypesXss");
          }
          /**
           * @return {LH.Audit.Meta}
           */
          static get meta() {
            return {
              id: "trusted-types-xss",
              scoreDisplayMode: Audit.SCORING_MODES.INFORMATIVE,
              title: str_97(UIStrings117.title),
              description: str_97(UIStrings117.description),
              requiredArtifacts: ["DevtoolsLog", "MetaElements", "URL"],
              supportedModes: ["navigation"]
            };
          }
          /**
           * @param {LH.Artifacts} artifacts
           * @param {LH.Audit.Context} context
           * @return {Promise<{cspHeaders: string[], cspMetaTags: string[]}>}
           */
          static async getRawCsps(artifacts, context2) {
            const devtoolsLog = artifacts.DevtoolsLog;
            const mainResource = await MainResourceComputed.request({ devtoolsLog, URL: artifacts.URL }, context2);
            const cspMetaTags = artifacts.MetaElements.filter((m) => {
              return m.httpEquiv && m.httpEquiv.toLowerCase() === "content-security-policy";
            }).flatMap((m) => (m.content || "").split(",")).filter((rawCsp) => rawCsp.replace(/\s/g, ""));
            const cspHeaders = mainResource.responseHeaders.filter((h) => {
              return h.name.toLowerCase() === "content-security-policy";
            }).flatMap((h) => h.value.split(",")).filter((rawCsp) => rawCsp.replace(/\s/g, ""));
            return { cspHeaders, cspMetaTags };
          }
          /**
           * @param {LH.IcuMessage | string} findingDescription
           * @param {LH.IcuMessage=} severity
           * @return {LH.Audit.Details.TableItem}
           */
          static findingToTableItem(findingDescription, severity) {
            return {
              description: findingDescription,
              severity
            };
          }
          /**
           * @param {string[]} cspHeaders
           * @param {string[]} cspMetaTags
           * @return {{score: number, results: LH.Audit.Details.TableItem[]}}
           */
          static constructResults(cspHeaders, cspMetaTags) {
            const rawCsps = [...cspHeaders, ...cspMetaTags];
            const parsedCsps = rawCsps.map(parseCsp);
            for (const pc of parsedCsps) {
              const directiveValues = pc.directives[pc.getEffectiveDirective(import_csp2.Directive.REQUIRE_TRUSTED_TYPES_FOR)] || [];
              if (directiveValues.includes("'script'")) {
                return { score: 1, results: [] };
              }
            }
            return {
              score: 0,
              results: [{
                severity: str_97(UIStrings.itemSeverityHigh),
                description: str_97(UIStrings117.noTrustedTypesToMitigateXss)
              }]
            };
          }
          /**
           * @param {LH.Artifacts} artifacts
           * @param {LH.Audit.Context} context
           * @return {Promise<LH.Audit.Product>}
           */
          static async audit(artifacts, context2) {
            const { cspHeaders, cspMetaTags } = await this.getRawCsps(artifacts, context2);
            const { score, results } = this.constructResults(cspHeaders, cspMetaTags);
            const headings = [
              /* eslint-disable max-len */
              { key: "description", valueType: "text", subItemsHeading: { key: "description" }, label: str_97(UIStrings.columnDescription) },
              { key: "severity", valueType: "text", subItemsHeading: { key: "severity" }, label: str_97(UIStrings117.columnSeverity) }
              /* eslint-enable max-len */
            ];
            const details = Audit.makeTableDetails(headings, results);
            return {
              score,
              notApplicable: !results.length,
              details
            };
          }
        };
        trusted_types_xss_default = TrustedTypesXss;
      }
    });
    entity_classification_exports = {};
    __export2(entity_classification_exports, {
      EntityClassification: () => EntityClassification,
      EntityClassificationComputed: () => EntityClassificationComputed
    });
    init_entity_classification = __esm2({
      "replace-modules:/Users/alexrudenko/src/lighthouse/core/computed/entity-classification.js"() {
        init_process_global();
        init_computed_artifact();
        EntityClassification = class {
          static {
            __name(this, "EntityClassification");
          }
          static async compute_() {
            return {
              entityByUrl: /* @__PURE__ */ new Map(),
              urlsByEntity: /* @__PURE__ */ new Map(),
              isFirstParty: /* @__PURE__ */ __name(() => false, "isFirstParty")
            };
          }
        };
        EntityClassificationComputed = makeComputedArtifact(EntityClassification, null);
      }
    });
    valid_source_maps_exports = {};
    __export2(valid_source_maps_exports, {
      UIStrings: () => UIStrings118,
      default: () => valid_source_maps_default
    });
    init_valid_source_maps = __esm2({
      "core/audits/valid-source-maps.js"() {
        "use strict";
        init_process_global();
        init_audit();
        init_entity_classification();
        init_i18n();
        init_util();
        init_url_utils();
        UIStrings118 = {
          /** Title of a Lighthouse audit that provides detail on HTTP to HTTPS redirects. This descriptive title is shown to users when HTTP traffic is redirected to HTTPS. */
          title: "Page has valid source maps",
          /** Title of a Lighthouse audit that provides detail on HTTP to HTTPS redirects. This descriptive title is shown to users when HTTP traffic is not redirected to HTTPS. */
          failureTitle: "Missing source maps for large first-party JavaScript",
          /** Description of a Lighthouse audit that tells the user that their JavaScript source maps are invalid or missing. This is displayed after a user expands the section to see more. No character length limits. The last sentence starting with 'Learn' becomes link text to additional documentation. */
          description: "Source maps translate minified code to the original source code. This helps developers debug in production. In addition, Lighthouse is able to provide further insights. Consider deploying source maps to take advantage of these benefits. [Learn more about source maps](https://developer.chrome.com/docs/devtools/javascript/source-maps/).",
          /** Label for a column in a data table. Entries will be URLs to JavaScript source maps. */
          columnMapURL: "Map URL",
          /** Label for a possible error message indicating that a source map for a large, first-party JavaScript script is missing. */
          missingSourceMapErrorMessage: "Large JavaScript file is missing a source map",
          /** Label for a possible error message indicating that the content of a source map is invalid because it is missing items in the sourcesContent attribute. */
          missingSourceMapItemsWarningMesssage: `{missingItems, plural,
    =1 {Warning: missing 1 item in \`.sourcesContent\`}
    other {Warning: missing # items in \`.sourcesContent\`}
    }`
        };
        str_98 = createIcuMessageFn({ url: "core/audits/valid-source-maps.js" }.url, UIStrings118);
        LARGE_JS_BYTE_THRESHOLD = 500 * 1024;
        ValidSourceMaps = class extends Audit {
          static {
            __name(this, "ValidSourceMaps");
          }
          /**
           * @return {LH.Audit.Meta}
           */
          static get meta() {
            return {
              id: "valid-source-maps",
              title: str_98(UIStrings118.title),
              failureTitle: str_98(UIStrings118.failureTitle),
              description: str_98(UIStrings118.description),
              requiredArtifacts: ["Scripts", "SourceMaps", "URL", "DevtoolsLog"]
            };
          }
          /**
           * Returns true if the size of the script exceeds a static threshold.
           * @param {LH.Artifacts.Script} script
           * @param {LH.Artifacts.EntityClassification} classifiedEntities
           * @return {boolean}
           */
          static isLargeFirstPartyJS(script, classifiedEntities) {
            const url = script.url;
            if (!script.length || !url)
              return false;
            if (!url_utils_default.isValid(url))
              return false;
            if (!Util.createOrReturnURL(url).protocol.startsWith("http"))
              return false;
            const isLargeJS = script.length >= LARGE_JS_BYTE_THRESHOLD;
            return classifiedEntities.isFirstParty(url) && isLargeJS;
          }
          /**
           * @param {LH.Artifacts} artifacts
           * @param {LH.Audit.Context} context
           */
          static async audit(artifacts, context2) {
            const { SourceMaps: SourceMaps2 } = artifacts;
            const devtoolsLog = artifacts.DevtoolsLog;
            const classifiedEntities = await EntityClassification.request({ URL: artifacts.URL, devtoolsLog }, context2);
            const isMissingMapForLargeFirstPartyScriptUrl = /* @__PURE__ */ new Set();
            let missingMapsForLargeFirstPartyFile = false;
            const results = [];
            for (const script of artifacts.Scripts) {
              const sourceMap2 = SourceMaps2.find((m) => m.scriptId === script.scriptId);
              const errors2 = [];
              const isLargeFirstParty = this.isLargeFirstPartyJS(script, classifiedEntities);
              if (isLargeFirstParty && (!sourceMap2 || !sourceMap2.map)) {
                missingMapsForLargeFirstPartyFile = true;
                isMissingMapForLargeFirstPartyScriptUrl.add(script.url);
                errors2.push({ error: str_98(UIStrings118.missingSourceMapErrorMessage) });
              }
              if (sourceMap2 && !sourceMap2.map) {
                errors2.push({ error: sourceMap2.errorMessage });
              }
              if (sourceMap2?.map) {
                const sourcesContent = sourceMap2.map.sourcesContent || [];
                let missingSourcesContentCount = 0;
                for (let i = 0; i < sourceMap2.map.sources.length; i++) {
                  if (sourcesContent.length < i || !sourcesContent[i])
                    missingSourcesContentCount += 1;
                }
                if (missingSourcesContentCount > 0) {
                  errors2.push({ error: str_98(UIStrings118.missingSourceMapItemsWarningMesssage, { missingItems: missingSourcesContentCount }) });
                }
              }
              if (sourceMap2 || errors2.length) {
                results.push({
                  scriptUrl: script.url,
                  sourceMapUrl: sourceMap2?.sourceMapUrl,
                  subItems: {
                    type: (
                      /** @type {const} */
                      "subitems"
                    ),
                    items: errors2
                  }
                });
              }
            }
            const headings = [
              {
                key: "scriptUrl",
                valueType: "url",
                subItemsHeading: { key: "error" },
                label: str_98(UIStrings.columnURL)
              },
              { key: "sourceMapUrl", valueType: "url", label: str_98(UIStrings118.columnMapURL) }
            ];
            results.sort((a, b) => {
              const missingMapA = isMissingMapForLargeFirstPartyScriptUrl.has(a.scriptUrl);
              const missingMapB = isMissingMapForLargeFirstPartyScriptUrl.has(b.scriptUrl);
              if (missingMapA && !missingMapB)
                return -1;
              if (!missingMapA && missingMapB)
                return 1;
              if (a.subItems.items.length && !b.subItems.items.length)
                return -1;
              if (!a.subItems.items.length && b.subItems.items.length)
                return 1;
              return b.scriptUrl.localeCompare(a.scriptUrl);
            });
            return {
              score: missingMapsForLargeFirstPartyFile ? 0 : 1,
              details: Audit.makeTableDetails(headings, results)
            };
          }
        };
        valid_source_maps_default = ValidSourceMaps;
      }
    });
    speedline_exports = {};
    __export2(speedline_exports, {
      Speedline: () => Speedline,
      SpeedlineComputed: () => SpeedlineComputed
    });
    init_speedline = __esm2({
      "replace-modules:/Users/alexrudenko/src/lighthouse/core/computed/speedline.js"() {
        init_process_global();
        init_computed_artifact();
        init_lh_error();
        Speedline = class {
          static {
            __name(this, "Speedline");
          }
          static async compute_() {
            throw new LighthouseError(LighthouseError.errors.NO_SPEEDLINE_FRAMES);
          }
        };
        SpeedlineComputed = makeComputedArtifact(Speedline, null);
      }
    });
    timing_summary_exports = {};
    __export2(timing_summary_exports, {
      TimingSummary: () => TimingSummary,
      TimingSummaryComputed: () => TimingSummaryComputed
    });
    init_timing_summary = __esm2({
      "replace-modules:/Users/alexrudenko/src/lighthouse/core/computed/metrics/timing-summary.js"() {
        init_process_global();
        init_computed_artifact();
        TimingSummary = class {
          static {
            __name(this, "TimingSummary");
          }
          static async compute_() {
            return { metrics: {}, debugInfo: {} };
          }
        };
        TimingSummaryComputed = makeComputedArtifact(TimingSummary, null);
      }
    });
    trace_engine_result_exports = {};
    __export2(trace_engine_result_exports, {
      TraceEngineResult: () => TraceEngineResult,
      TraceEngineResultComputed: () => TraceEngineResultComputed
    });
    init_trace_engine_result = __esm2({
      "replace-modules:/Users/alexrudenko/src/lighthouse/core/computed/trace-engine-result.js"() {
        init_process_global();
        init_computed_artifact();
        TraceEngineResult = class {
          static {
            __name(this, "TraceEngineResult");
          }
          static async compute_() {
            return { data: {}, insights: /* @__PURE__ */ new Map() };
          }
          static localizeFunction(str, fn) {
            return fn;
          }
        };
        TraceEngineResultComputed = makeComputedArtifact(TraceEngineResult, null);
      }
    });
    bf_cache_failures_exports = {};
    __export2(bf_cache_failures_exports, {
      default: () => bf_cache_failures_default
    });
    init_bf_cache_failures = __esm2({
      "lh-gatherer-shim:/Users/alexrudenko/src/lighthouse/core/gather/gatherers/bf-cache-failures.js"() {
        init_process_global();
        init_base_gatherer();
        ShimGatherer2 = class extends base_gatherer_default {
          static {
            __name(this, "ShimGatherer");
          }
          meta = { supportedModes: ["navigation", "timespan", "snapshot"] };
          static getDefaultTraceCategories() {
            return [];
          }
          getArtifact() {
            return void 0;
          }
        };
        bf_cache_failures_default = ShimGatherer2;
      }
    });
    css_usage_exports = {};
    __export2(css_usage_exports, {
      default: () => css_usage_default
    });
    init_css_usage = __esm2({
      "lh-gatherer-shim:/Users/alexrudenko/src/lighthouse/core/gather/gatherers/css-usage.js"() {
        init_process_global();
        init_base_gatherer();
        ShimGatherer3 = class extends base_gatherer_default {
          static {
            __name(this, "ShimGatherer");
          }
          meta = { supportedModes: ["navigation", "timespan", "snapshot"] };
          static getDefaultTraceCategories() {
            return [];
          }
          getArtifact() {
            return void 0;
          }
        };
        css_usage_default = ShimGatherer3;
      }
    });
    full_page_screenshot_exports = {};
    __export2(full_page_screenshot_exports, {
      default: () => full_page_screenshot_default
    });
    init_full_page_screenshot = __esm2({
      "lh-gatherer-shim:/Users/alexrudenko/src/lighthouse/core/gather/gatherers/full-page-screenshot.js"() {
        init_process_global();
        init_base_gatherer();
        ShimGatherer4 = class extends base_gatherer_default {
          static {
            __name(this, "ShimGatherer");
          }
          meta = { supportedModes: ["navigation", "timespan", "snapshot"] };
          static getDefaultTraceCategories() {
            return [];
          }
          getArtifact() {
            return void 0;
          }
        };
        full_page_screenshot_default = ShimGatherer4;
      }
    });
    iframe_elements_exports = {};
    __export2(iframe_elements_exports, {
      default: () => iframe_elements_default
    });
    init_iframe_elements = __esm2({
      "lh-gatherer-shim:/Users/alexrudenko/src/lighthouse/core/gather/gatherers/iframe-elements.js"() {
        init_process_global();
        init_base_gatherer();
        ShimGatherer5 = class extends base_gatherer_default {
          static {
            __name(this, "ShimGatherer");
          }
          meta = { supportedModes: ["navigation", "timespan", "snapshot"] };
          static getDefaultTraceCategories() {
            return [];
          }
          getArtifact() {
            return void 0;
          }
        };
        iframe_elements_default = ShimGatherer5;
      }
    });
    js_usage_exports = {};
    __export2(js_usage_exports, {
      default: () => js_usage_default
    });
    init_js_usage = __esm2({
      "lh-gatherer-shim:/Users/alexrudenko/src/lighthouse/core/gather/gatherers/js-usage.js"() {
        init_process_global();
        init_base_gatherer();
        ShimGatherer6 = class extends base_gatherer_default {
          static {
            __name(this, "ShimGatherer");
          }
          meta = { supportedModes: ["navigation", "timespan", "snapshot"] };
          static getDefaultTraceCategories() {
            return [];
          }
          getArtifact() {
            return void 0;
          }
        };
        js_usage_default = ShimGatherer6;
      }
    });
    network_user_agent_exports = {};
    __export2(network_user_agent_exports, {
      default: () => network_user_agent_default
    });
    init_network_user_agent = __esm2({
      "lh-gatherer-shim:/Users/alexrudenko/src/lighthouse/core/gather/gatherers/network-user-agent.js"() {
        init_process_global();
        init_base_gatherer();
        ShimGatherer7 = class extends base_gatherer_default {
          static {
            __name(this, "ShimGatherer");
          }
          meta = { supportedModes: ["navigation", "timespan", "snapshot"] };
          static getDefaultTraceCategories() {
            return [];
          }
          getArtifact() {
            return void 0;
          }
        };
        network_user_agent_default = ShimGatherer7;
      }
    });
    stylesheets_exports = {};
    __export2(stylesheets_exports, {
      default: () => stylesheets_default
    });
    init_stylesheets = __esm2({
      "lh-gatherer-shim:/Users/alexrudenko/src/lighthouse/core/gather/gatherers/stylesheets.js"() {
        init_process_global();
        init_base_gatherer();
        ShimGatherer8 = class extends base_gatherer_default {
          static {
            __name(this, "ShimGatherer");
          }
          meta = { supportedModes: ["navigation", "timespan", "snapshot"] };
          static getDefaultTraceCategories() {
            return [];
          }
          getArtifact() {
            return void 0;
          }
        };
        stylesheets_default = ShimGatherer8;
      }
    });
    trace_elements_exports = {};
    __export2(trace_elements_exports, {
      default: () => trace_elements_default
    });
    init_trace_elements = __esm2({
      "lh-gatherer-shim:/Users/alexrudenko/src/lighthouse/core/gather/gatherers/trace-elements.js"() {
        init_process_global();
        init_base_gatherer();
        ShimGatherer9 = class extends base_gatherer_default {
          static {
            __name(this, "ShimGatherer");
          }
          meta = { supportedModes: ["navigation", "timespan", "snapshot"] };
          static getDefaultTraceCategories() {
            return [];
          }
          getArtifact() {
            return void 0;
          }
        };
        trace_elements_default = ShimGatherer9;
      }
    });
    autocomplete_exports = {};
    __export2(autocomplete_exports, {
      default: () => autocomplete_default
    });
    init_autocomplete = __esm2({
      "lh-audit-shim:/Users/alexrudenko/src/lighthouse/core/audits/autocomplete.js"() {
        init_process_global();
        init_audit();
        ShimAudit = class extends Audit {
          static {
            __name(this, "ShimAudit");
          }
          static get meta() {
            return {
              id: "autocomplete",
              title: "Shim Audit",
              description: "This audit was filtered out and is not available in this bundle.",
              scoreDisplayMode: Audit.SCORING_MODES.NOT_APPLICABLE,
              requiredArtifacts: []
            };
          }
          static audit() {
            return { score: null, scoreDisplayMode: Audit.SCORING_MODES.NOT_APPLICABLE };
          }
        };
        autocomplete_default = ShimAudit;
      }
    });
    bf_cache_exports = {};
    __export2(bf_cache_exports, {
      default: () => bf_cache_default
    });
    init_bf_cache = __esm2({
      "lh-audit-shim:/Users/alexrudenko/src/lighthouse/core/audits/bf-cache.js"() {
        init_process_global();
        init_audit();
        ShimAudit2 = class extends Audit {
          static {
            __name(this, "ShimAudit");
          }
          static get meta() {
            return {
              id: "bf-cache",
              title: "Shim Audit",
              description: "This audit was filtered out and is not available in this bundle.",
              scoreDisplayMode: Audit.SCORING_MODES.NOT_APPLICABLE,
              requiredArtifacts: []
            };
          }
          static audit() {
            return { score: null, scoreDisplayMode: Audit.SCORING_MODES.NOT_APPLICABLE };
          }
        };
        bf_cache_default = ShimAudit2;
      }
    });
    bootup_time_exports = {};
    __export2(bootup_time_exports, {
      default: () => bootup_time_default
    });
    init_bootup_time = __esm2({
      "lh-audit-shim:/Users/alexrudenko/src/lighthouse/core/audits/bootup-time.js"() {
        init_process_global();
        init_audit();
        ShimAudit3 = class extends Audit {
          static {
            __name(this, "ShimAudit");
          }
          static get meta() {
            return {
              id: "bootup-time",
              title: "Shim Audit",
              description: "This audit was filtered out and is not available in this bundle.",
              scoreDisplayMode: Audit.SCORING_MODES.NOT_APPLICABLE,
              requiredArtifacts: []
            };
          }
          static audit() {
            return { score: null, scoreDisplayMode: Audit.SCORING_MODES.NOT_APPLICABLE };
          }
        };
        bootup_time_default = ShimAudit3;
      }
    });
    total_byte_weight_exports = {};
    __export2(total_byte_weight_exports, {
      default: () => total_byte_weight_default
    });
    init_total_byte_weight = __esm2({
      "lh-audit-shim:/Users/alexrudenko/src/lighthouse/core/audits/byte-efficiency/total-byte-weight.js"() {
        init_process_global();
        init_audit();
        ShimAudit4 = class extends Audit {
          static {
            __name(this, "ShimAudit");
          }
          static get meta() {
            return {
              id: "total-byte-weight",
              title: "Shim Audit",
              description: "This audit was filtered out and is not available in this bundle.",
              scoreDisplayMode: Audit.SCORING_MODES.NOT_APPLICABLE,
              requiredArtifacts: []
            };
          }
          static audit() {
            return { score: null, scoreDisplayMode: Audit.SCORING_MODES.NOT_APPLICABLE };
          }
        };
        total_byte_weight_default = ShimAudit4;
      }
    });
    unminified_css_exports = {};
    __export2(unminified_css_exports, {
      default: () => unminified_css_default
    });
    init_unminified_css = __esm2({
      "lh-audit-shim:/Users/alexrudenko/src/lighthouse/core/audits/byte-efficiency/unminified-css.js"() {
        init_process_global();
        init_audit();
        ShimAudit5 = class extends Audit {
          static {
            __name(this, "ShimAudit");
          }
          static get meta() {
            return {
              id: "unminified-css",
              title: "Shim Audit",
              description: "This audit was filtered out and is not available in this bundle.",
              scoreDisplayMode: Audit.SCORING_MODES.NOT_APPLICABLE,
              requiredArtifacts: []
            };
          }
          static audit() {
            return { score: null, scoreDisplayMode: Audit.SCORING_MODES.NOT_APPLICABLE };
          }
        };
        unminified_css_default = ShimAudit5;
      }
    });
    unminified_javascript_exports = {};
    __export2(unminified_javascript_exports, {
      default: () => unminified_javascript_default
    });
    init_unminified_javascript = __esm2({
      "lh-audit-shim:/Users/alexrudenko/src/lighthouse/core/audits/byte-efficiency/unminified-javascript.js"() {
        init_process_global();
        init_audit();
        ShimAudit6 = class extends Audit {
          static {
            __name(this, "ShimAudit");
          }
          static get meta() {
            return {
              id: "unminified-javascript",
              title: "Shim Audit",
              description: "This audit was filtered out and is not available in this bundle.",
              scoreDisplayMode: Audit.SCORING_MODES.NOT_APPLICABLE,
              requiredArtifacts: []
            };
          }
          static audit() {
            return { score: null, scoreDisplayMode: Audit.SCORING_MODES.NOT_APPLICABLE };
          }
        };
        unminified_javascript_default = ShimAudit6;
      }
    });
    unused_css_rules_exports = {};
    __export2(unused_css_rules_exports, {
      default: () => unused_css_rules_default
    });
    init_unused_css_rules = __esm2({
      "lh-audit-shim:/Users/alexrudenko/src/lighthouse/core/audits/byte-efficiency/unused-css-rules.js"() {
        init_process_global();
        init_audit();
        ShimAudit7 = class extends Audit {
          static {
            __name(this, "ShimAudit");
          }
          static get meta() {
            return {
              id: "unused-css-rules",
              title: "Shim Audit",
              description: "This audit was filtered out and is not available in this bundle.",
              scoreDisplayMode: Audit.SCORING_MODES.NOT_APPLICABLE,
              requiredArtifacts: []
            };
          }
          static audit() {
            return { score: null, scoreDisplayMode: Audit.SCORING_MODES.NOT_APPLICABLE };
          }
        };
        unused_css_rules_default = ShimAudit7;
      }
    });
    unused_javascript_exports = {};
    __export2(unused_javascript_exports, {
      default: () => unused_javascript_default
    });
    init_unused_javascript = __esm2({
      "lh-audit-shim:/Users/alexrudenko/src/lighthouse/core/audits/byte-efficiency/unused-javascript.js"() {
        init_process_global();
        init_audit();
        ShimAudit8 = class extends Audit {
          static {
            __name(this, "ShimAudit");
          }
          static get meta() {
            return {
              id: "unused-javascript",
              title: "Shim Audit",
              description: "This audit was filtered out and is not available in this bundle.",
              scoreDisplayMode: Audit.SCORING_MODES.NOT_APPLICABLE,
              requiredArtifacts: []
            };
          }
          static audit() {
            return { score: null, scoreDisplayMode: Audit.SCORING_MODES.NOT_APPLICABLE };
          }
        };
        unused_javascript_default = ShimAudit8;
      }
    });
    diagnostics_exports = {};
    __export2(diagnostics_exports, {
      default: () => diagnostics_default
    });
    init_diagnostics = __esm2({
      "lh-audit-shim:/Users/alexrudenko/src/lighthouse/core/audits/diagnostics.js"() {
        init_process_global();
        init_audit();
        ShimAudit9 = class extends Audit {
          static {
            __name(this, "ShimAudit");
          }
          static get meta() {
            return {
              id: "diagnostics",
              title: "Shim Audit",
              description: "This audit was filtered out and is not available in this bundle.",
              scoreDisplayMode: Audit.SCORING_MODES.NOT_APPLICABLE,
              requiredArtifacts: []
            };
          }
          static audit() {
            return { score: null, scoreDisplayMode: Audit.SCORING_MODES.NOT_APPLICABLE };
          }
        };
        diagnostics_default = ShimAudit9;
      }
    });
    final_screenshot_exports = {};
    __export2(final_screenshot_exports, {
      default: () => final_screenshot_default
    });
    init_final_screenshot = __esm2({
      "lh-audit-shim:/Users/alexrudenko/src/lighthouse/core/audits/final-screenshot.js"() {
        init_process_global();
        init_audit();
        ShimAudit10 = class extends Audit {
          static {
            __name(this, "ShimAudit");
          }
          static get meta() {
            return {
              id: "final-screenshot",
              title: "Shim Audit",
              description: "This audit was filtered out and is not available in this bundle.",
              scoreDisplayMode: Audit.SCORING_MODES.NOT_APPLICABLE,
              requiredArtifacts: []
            };
          }
          static audit() {
            return { score: null, scoreDisplayMode: Audit.SCORING_MODES.NOT_APPLICABLE };
          }
        };
        final_screenshot_default = ShimAudit10;
      }
    });
    cache_insight_exports = {};
    __export2(cache_insight_exports, {
      default: () => cache_insight_default
    });
    init_cache_insight = __esm2({
      "lh-audit-shim:/Users/alexrudenko/src/lighthouse/core/audits/insights/cache-insight.js"() {
        init_process_global();
        init_audit();
        ShimAudit11 = class extends Audit {
          static {
            __name(this, "ShimAudit");
          }
          static get meta() {
            return {
              id: "cache-insight",
              title: "Shim Audit",
              description: "This audit was filtered out and is not available in this bundle.",
              scoreDisplayMode: Audit.SCORING_MODES.NOT_APPLICABLE,
              requiredArtifacts: []
            };
          }
          static audit() {
            return { score: null, scoreDisplayMode: Audit.SCORING_MODES.NOT_APPLICABLE };
          }
        };
        cache_insight_default = ShimAudit11;
      }
    });
    cls_culprits_insight_exports = {};
    __export2(cls_culprits_insight_exports, {
      default: () => cls_culprits_insight_default
    });
    init_cls_culprits_insight = __esm2({
      "lh-audit-shim:/Users/alexrudenko/src/lighthouse/core/audits/insights/cls-culprits-insight.js"() {
        init_process_global();
        init_audit();
        ShimAudit12 = class extends Audit {
          static {
            __name(this, "ShimAudit");
          }
          static get meta() {
            return {
              id: "cls-culprits-insight",
              title: "Shim Audit",
              description: "This audit was filtered out and is not available in this bundle.",
              scoreDisplayMode: Audit.SCORING_MODES.NOT_APPLICABLE,
              requiredArtifacts: []
            };
          }
          static audit() {
            return { score: null, scoreDisplayMode: Audit.SCORING_MODES.NOT_APPLICABLE };
          }
        };
        cls_culprits_insight_default = ShimAudit12;
      }
    });
    document_latency_insight_exports = {};
    __export2(document_latency_insight_exports, {
      default: () => document_latency_insight_default
    });
    init_document_latency_insight = __esm2({
      "lh-audit-shim:/Users/alexrudenko/src/lighthouse/core/audits/insights/document-latency-insight.js"() {
        init_process_global();
        init_audit();
        ShimAudit13 = class extends Audit {
          static {
            __name(this, "ShimAudit");
          }
          static get meta() {
            return {
              id: "document-latency-insight",
              title: "Shim Audit",
              description: "This audit was filtered out and is not available in this bundle.",
              scoreDisplayMode: Audit.SCORING_MODES.NOT_APPLICABLE,
              requiredArtifacts: []
            };
          }
          static audit() {
            return { score: null, scoreDisplayMode: Audit.SCORING_MODES.NOT_APPLICABLE };
          }
        };
        document_latency_insight_default = ShimAudit13;
      }
    });
    dom_size_insight_exports = {};
    __export2(dom_size_insight_exports, {
      default: () => dom_size_insight_default
    });
    init_dom_size_insight = __esm2({
      "lh-audit-shim:/Users/alexrudenko/src/lighthouse/core/audits/insights/dom-size-insight.js"() {
        init_process_global();
        init_audit();
        ShimAudit14 = class extends Audit {
          static {
            __name(this, "ShimAudit");
          }
          static get meta() {
            return {
              id: "dom-size-insight",
              title: "Shim Audit",
              description: "This audit was filtered out and is not available in this bundle.",
              scoreDisplayMode: Audit.SCORING_MODES.NOT_APPLICABLE,
              requiredArtifacts: []
            };
          }
          static audit() {
            return { score: null, scoreDisplayMode: Audit.SCORING_MODES.NOT_APPLICABLE };
          }
        };
        dom_size_insight_default = ShimAudit14;
      }
    });
    duplicated_javascript_insight_exports = {};
    __export2(duplicated_javascript_insight_exports, {
      default: () => duplicated_javascript_insight_default
    });
    init_duplicated_javascript_insight = __esm2({
      "lh-audit-shim:/Users/alexrudenko/src/lighthouse/core/audits/insights/duplicated-javascript-insight.js"() {
        init_process_global();
        init_audit();
        ShimAudit15 = class extends Audit {
          static {
            __name(this, "ShimAudit");
          }
          static get meta() {
            return {
              id: "duplicated-javascript-insight",
              title: "Shim Audit",
              description: "This audit was filtered out and is not available in this bundle.",
              scoreDisplayMode: Audit.SCORING_MODES.NOT_APPLICABLE,
              requiredArtifacts: []
            };
          }
          static audit() {
            return { score: null, scoreDisplayMode: Audit.SCORING_MODES.NOT_APPLICABLE };
          }
        };
        duplicated_javascript_insight_default = ShimAudit15;
      }
    });
    font_display_insight_exports = {};
    __export2(font_display_insight_exports, {
      default: () => font_display_insight_default
    });
    init_font_display_insight = __esm2({
      "lh-audit-shim:/Users/alexrudenko/src/lighthouse/core/audits/insights/font-display-insight.js"() {
        init_process_global();
        init_audit();
        ShimAudit16 = class extends Audit {
          static {
            __name(this, "ShimAudit");
          }
          static get meta() {
            return {
              id: "font-display-insight",
              title: "Shim Audit",
              description: "This audit was filtered out and is not available in this bundle.",
              scoreDisplayMode: Audit.SCORING_MODES.NOT_APPLICABLE,
              requiredArtifacts: []
            };
          }
          static audit() {
            return { score: null, scoreDisplayMode: Audit.SCORING_MODES.NOT_APPLICABLE };
          }
        };
        font_display_insight_default = ShimAudit16;
      }
    });
    forced_reflow_insight_exports = {};
    __export2(forced_reflow_insight_exports, {
      default: () => forced_reflow_insight_default
    });
    init_forced_reflow_insight = __esm2({
      "lh-audit-shim:/Users/alexrudenko/src/lighthouse/core/audits/insights/forced-reflow-insight.js"() {
        init_process_global();
        init_audit();
        ShimAudit17 = class extends Audit {
          static {
            __name(this, "ShimAudit");
          }
          static get meta() {
            return {
              id: "forced-reflow-insight",
              title: "Shim Audit",
              description: "This audit was filtered out and is not available in this bundle.",
              scoreDisplayMode: Audit.SCORING_MODES.NOT_APPLICABLE,
              requiredArtifacts: []
            };
          }
          static audit() {
            return { score: null, scoreDisplayMode: Audit.SCORING_MODES.NOT_APPLICABLE };
          }
        };
        forced_reflow_insight_default = ShimAudit17;
      }
    });
    image_delivery_insight_exports = {};
    __export2(image_delivery_insight_exports, {
      default: () => image_delivery_insight_default
    });
    init_image_delivery_insight = __esm2({
      "lh-audit-shim:/Users/alexrudenko/src/lighthouse/core/audits/insights/image-delivery-insight.js"() {
        init_process_global();
        init_audit();
        ShimAudit18 = class extends Audit {
          static {
            __name(this, "ShimAudit");
          }
          static get meta() {
            return {
              id: "image-delivery-insight",
              title: "Shim Audit",
              description: "This audit was filtered out and is not available in this bundle.",
              scoreDisplayMode: Audit.SCORING_MODES.NOT_APPLICABLE,
              requiredArtifacts: []
            };
          }
          static audit() {
            return { score: null, scoreDisplayMode: Audit.SCORING_MODES.NOT_APPLICABLE };
          }
        };
        image_delivery_insight_default = ShimAudit18;
      }
    });
    inp_breakdown_insight_exports = {};
    __export2(inp_breakdown_insight_exports, {
      default: () => inp_breakdown_insight_default
    });
    init_inp_breakdown_insight = __esm2({
      "lh-audit-shim:/Users/alexrudenko/src/lighthouse/core/audits/insights/inp-breakdown-insight.js"() {
        init_process_global();
        init_audit();
        ShimAudit19 = class extends Audit {
          static {
            __name(this, "ShimAudit");
          }
          static get meta() {
            return {
              id: "inp-breakdown-insight",
              title: "Shim Audit",
              description: "This audit was filtered out and is not available in this bundle.",
              scoreDisplayMode: Audit.SCORING_MODES.NOT_APPLICABLE,
              requiredArtifacts: []
            };
          }
          static audit() {
            return { score: null, scoreDisplayMode: Audit.SCORING_MODES.NOT_APPLICABLE };
          }
        };
        inp_breakdown_insight_default = ShimAudit19;
      }
    });
    lcp_breakdown_insight_exports = {};
    __export2(lcp_breakdown_insight_exports, {
      default: () => lcp_breakdown_insight_default
    });
    init_lcp_breakdown_insight = __esm2({
      "lh-audit-shim:/Users/alexrudenko/src/lighthouse/core/audits/insights/lcp-breakdown-insight.js"() {
        init_process_global();
        init_audit();
        ShimAudit20 = class extends Audit {
          static {
            __name(this, "ShimAudit");
          }
          static get meta() {
            return {
              id: "lcp-breakdown-insight",
              title: "Shim Audit",
              description: "This audit was filtered out and is not available in this bundle.",
              scoreDisplayMode: Audit.SCORING_MODES.NOT_APPLICABLE,
              requiredArtifacts: []
            };
          }
          static audit() {
            return { score: null, scoreDisplayMode: Audit.SCORING_MODES.NOT_APPLICABLE };
          }
        };
        lcp_breakdown_insight_default = ShimAudit20;
      }
    });
    lcp_discovery_insight_exports = {};
    __export2(lcp_discovery_insight_exports, {
      default: () => lcp_discovery_insight_default
    });
    init_lcp_discovery_insight = __esm2({
      "lh-audit-shim:/Users/alexrudenko/src/lighthouse/core/audits/insights/lcp-discovery-insight.js"() {
        init_process_global();
        init_audit();
        ShimAudit21 = class extends Audit {
          static {
            __name(this, "ShimAudit");
          }
          static get meta() {
            return {
              id: "lcp-discovery-insight",
              title: "Shim Audit",
              description: "This audit was filtered out and is not available in this bundle.",
              scoreDisplayMode: Audit.SCORING_MODES.NOT_APPLICABLE,
              requiredArtifacts: []
            };
          }
          static audit() {
            return { score: null, scoreDisplayMode: Audit.SCORING_MODES.NOT_APPLICABLE };
          }
        };
        lcp_discovery_insight_default = ShimAudit21;
      }
    });
    legacy_javascript_insight_exports = {};
    __export2(legacy_javascript_insight_exports, {
      default: () => legacy_javascript_insight_default
    });
    init_legacy_javascript_insight = __esm2({
      "lh-audit-shim:/Users/alexrudenko/src/lighthouse/core/audits/insights/legacy-javascript-insight.js"() {
        init_process_global();
        init_audit();
        ShimAudit22 = class extends Audit {
          static {
            __name(this, "ShimAudit");
          }
          static get meta() {
            return {
              id: "legacy-javascript-insight",
              title: "Shim Audit",
              description: "This audit was filtered out and is not available in this bundle.",
              scoreDisplayMode: Audit.SCORING_MODES.NOT_APPLICABLE,
              requiredArtifacts: []
            };
          }
          static audit() {
            return { score: null, scoreDisplayMode: Audit.SCORING_MODES.NOT_APPLICABLE };
          }
        };
        legacy_javascript_insight_default = ShimAudit22;
      }
    });
    modern_http_insight_exports = {};
    __export2(modern_http_insight_exports, {
      default: () => modern_http_insight_default
    });
    init_modern_http_insight = __esm2({
      "lh-audit-shim:/Users/alexrudenko/src/lighthouse/core/audits/insights/modern-http-insight.js"() {
        init_process_global();
        init_audit();
        ShimAudit23 = class extends Audit {
          static {
            __name(this, "ShimAudit");
          }
          static get meta() {
            return {
              id: "modern-http-insight",
              title: "Shim Audit",
              description: "This audit was filtered out and is not available in this bundle.",
              scoreDisplayMode: Audit.SCORING_MODES.NOT_APPLICABLE,
              requiredArtifacts: []
            };
          }
          static audit() {
            return { score: null, scoreDisplayMode: Audit.SCORING_MODES.NOT_APPLICABLE };
          }
        };
        modern_http_insight_default = ShimAudit23;
      }
    });
    network_dependency_tree_insight_exports = {};
    __export2(network_dependency_tree_insight_exports, {
      default: () => network_dependency_tree_insight_default
    });
    init_network_dependency_tree_insight = __esm2({
      "lh-audit-shim:/Users/alexrudenko/src/lighthouse/core/audits/insights/network-dependency-tree-insight.js"() {
        init_process_global();
        init_audit();
        ShimAudit24 = class extends Audit {
          static {
            __name(this, "ShimAudit");
          }
          static get meta() {
            return {
              id: "network-dependency-tree-insight",
              title: "Shim Audit",
              description: "This audit was filtered out and is not available in this bundle.",
              scoreDisplayMode: Audit.SCORING_MODES.NOT_APPLICABLE,
              requiredArtifacts: []
            };
          }
          static audit() {
            return { score: null, scoreDisplayMode: Audit.SCORING_MODES.NOT_APPLICABLE };
          }
        };
        network_dependency_tree_insight_default = ShimAudit24;
      }
    });
    render_blocking_insight_exports = {};
    __export2(render_blocking_insight_exports, {
      default: () => render_blocking_insight_default
    });
    init_render_blocking_insight = __esm2({
      "lh-audit-shim:/Users/alexrudenko/src/lighthouse/core/audits/insights/render-blocking-insight.js"() {
        init_process_global();
        init_audit();
        ShimAudit25 = class extends Audit {
          static {
            __name(this, "ShimAudit");
          }
          static get meta() {
            return {
              id: "render-blocking-insight",
              title: "Shim Audit",
              description: "This audit was filtered out and is not available in this bundle.",
              scoreDisplayMode: Audit.SCORING_MODES.NOT_APPLICABLE,
              requiredArtifacts: []
            };
          }
          static audit() {
            return { score: null, scoreDisplayMode: Audit.SCORING_MODES.NOT_APPLICABLE };
          }
        };
        render_blocking_insight_default = ShimAudit25;
      }
    });
    slow_css_selector_insight_exports = {};
    __export2(slow_css_selector_insight_exports, {
      default: () => slow_css_selector_insight_default
    });
    init_slow_css_selector_insight = __esm2({
      "lh-audit-shim:/Users/alexrudenko/src/lighthouse/core/audits/insights/slow-css-selector-insight.js"() {
        init_process_global();
        init_audit();
        ShimAudit26 = class extends Audit {
          static {
            __name(this, "ShimAudit");
          }
          static get meta() {
            return {
              id: "slow-css-selector-insight",
              title: "Shim Audit",
              description: "This audit was filtered out and is not available in this bundle.",
              scoreDisplayMode: Audit.SCORING_MODES.NOT_APPLICABLE,
              requiredArtifacts: []
            };
          }
          static audit() {
            return { score: null, scoreDisplayMode: Audit.SCORING_MODES.NOT_APPLICABLE };
          }
        };
        slow_css_selector_insight_default = ShimAudit26;
      }
    });
    third_parties_insight_exports = {};
    __export2(third_parties_insight_exports, {
      default: () => third_parties_insight_default
    });
    init_third_parties_insight = __esm2({
      "lh-audit-shim:/Users/alexrudenko/src/lighthouse/core/audits/insights/third-parties-insight.js"() {
        init_process_global();
        init_audit();
        ShimAudit27 = class extends Audit {
          static {
            __name(this, "ShimAudit");
          }
          static get meta() {
            return {
              id: "third-parties-insight",
              title: "Shim Audit",
              description: "This audit was filtered out and is not available in this bundle.",
              scoreDisplayMode: Audit.SCORING_MODES.NOT_APPLICABLE,
              requiredArtifacts: []
            };
          }
          static audit() {
            return { score: null, scoreDisplayMode: Audit.SCORING_MODES.NOT_APPLICABLE };
          }
        };
        third_parties_insight_default = ShimAudit27;
      }
    });
    viewport_insight_exports = {};
    __export2(viewport_insight_exports, {
      default: () => viewport_insight_default
    });
    init_viewport_insight = __esm2({
      "lh-audit-shim:/Users/alexrudenko/src/lighthouse/core/audits/insights/viewport-insight.js"() {
        init_process_global();
        init_audit();
        ShimAudit28 = class extends Audit {
          static {
            __name(this, "ShimAudit");
          }
          static get meta() {
            return {
              id: "viewport-insight",
              title: "Shim Audit",
              description: "This audit was filtered out and is not available in this bundle.",
              scoreDisplayMode: Audit.SCORING_MODES.NOT_APPLICABLE,
              requiredArtifacts: []
            };
          }
          static audit() {
            return { score: null, scoreDisplayMode: Audit.SCORING_MODES.NOT_APPLICABLE };
          }
        };
        viewport_insight_default = ShimAudit28;
      }
    });
    layout_shifts_exports = {};
    __export2(layout_shifts_exports, {
      default: () => layout_shifts_default
    });
    init_layout_shifts = __esm2({
      "lh-audit-shim:/Users/alexrudenko/src/lighthouse/core/audits/layout-shifts.js"() {
        init_process_global();
        init_audit();
        ShimAudit29 = class extends Audit {
          static {
            __name(this, "ShimAudit");
          }
          static get meta() {
            return {
              id: "layout-shifts",
              title: "Shim Audit",
              description: "This audit was filtered out and is not available in this bundle.",
              scoreDisplayMode: Audit.SCORING_MODES.NOT_APPLICABLE,
              requiredArtifacts: []
            };
          }
          static audit() {
            return { score: null, scoreDisplayMode: Audit.SCORING_MODES.NOT_APPLICABLE };
          }
        };
        layout_shifts_default = ShimAudit29;
      }
    });
    long_tasks_exports = {};
    __export2(long_tasks_exports, {
      default: () => long_tasks_default
    });
    init_long_tasks = __esm2({
      "lh-audit-shim:/Users/alexrudenko/src/lighthouse/core/audits/long-tasks.js"() {
        init_process_global();
        init_audit();
        ShimAudit30 = class extends Audit {
          static {
            __name(this, "ShimAudit");
          }
          static get meta() {
            return {
              id: "long-tasks",
              title: "Shim Audit",
              description: "This audit was filtered out and is not available in this bundle.",
              scoreDisplayMode: Audit.SCORING_MODES.NOT_APPLICABLE,
              requiredArtifacts: []
            };
          }
          static audit() {
            return { score: null, scoreDisplayMode: Audit.SCORING_MODES.NOT_APPLICABLE };
          }
        };
        long_tasks_default = ShimAudit30;
      }
    });
    main_thread_tasks_exports = {};
    __export2(main_thread_tasks_exports, {
      default: () => main_thread_tasks_default
    });
    init_main_thread_tasks = __esm2({
      "lh-audit-shim:/Users/alexrudenko/src/lighthouse/core/audits/main-thread-tasks.js"() {
        init_process_global();
        init_audit();
        ShimAudit31 = class extends Audit {
          static {
            __name(this, "ShimAudit");
          }
          static get meta() {
            return {
              id: "main-thread-tasks",
              title: "Shim Audit",
              description: "This audit was filtered out and is not available in this bundle.",
              scoreDisplayMode: Audit.SCORING_MODES.NOT_APPLICABLE,
              requiredArtifacts: []
            };
          }
          static audit() {
            return { score: null, scoreDisplayMode: Audit.SCORING_MODES.NOT_APPLICABLE };
          }
        };
        main_thread_tasks_default = ShimAudit31;
      }
    });
    mainthread_work_breakdown_exports = {};
    __export2(mainthread_work_breakdown_exports, {
      default: () => mainthread_work_breakdown_default
    });
    init_mainthread_work_breakdown = __esm2({
      "lh-audit-shim:/Users/alexrudenko/src/lighthouse/core/audits/mainthread-work-breakdown.js"() {
        init_process_global();
        init_audit();
        ShimAudit32 = class extends Audit {
          static {
            __name(this, "ShimAudit");
          }
          static get meta() {
            return {
              id: "mainthread-work-breakdown",
              title: "Shim Audit",
              description: "This audit was filtered out and is not available in this bundle.",
              scoreDisplayMode: Audit.SCORING_MODES.NOT_APPLICABLE,
              requiredArtifacts: []
            };
          }
          static audit() {
            return { score: null, scoreDisplayMode: Audit.SCORING_MODES.NOT_APPLICABLE };
          }
        };
        mainthread_work_breakdown_default = ShimAudit32;
      }
    });
    metrics_exports2 = {};
    __export2(metrics_exports2, {
      default: () => metrics_default
    });
    init_metrics2 = __esm2({
      "lh-audit-shim:/Users/alexrudenko/src/lighthouse/core/audits/metrics.js"() {
        init_process_global();
        init_audit();
        ShimAudit33 = class extends Audit {
          static {
            __name(this, "ShimAudit");
          }
          static get meta() {
            return {
              id: "metrics",
              title: "Shim Audit",
              description: "This audit was filtered out and is not available in this bundle.",
              scoreDisplayMode: Audit.SCORING_MODES.NOT_APPLICABLE,
              requiredArtifacts: []
            };
          }
          static audit() {
            return { score: null, scoreDisplayMode: Audit.SCORING_MODES.NOT_APPLICABLE };
          }
        };
        metrics_default = ShimAudit33;
      }
    });
    cumulative_layout_shift_exports = {};
    __export2(cumulative_layout_shift_exports, {
      default: () => cumulative_layout_shift_default
    });
    init_cumulative_layout_shift = __esm2({
      "lh-audit-shim:/Users/alexrudenko/src/lighthouse/core/audits/metrics/cumulative-layout-shift.js"() {
        init_process_global();
        init_audit();
        ShimAudit34 = class extends Audit {
          static {
            __name(this, "ShimAudit");
          }
          static get meta() {
            return {
              id: "cumulative-layout-shift",
              title: "Shim Audit",
              description: "This audit was filtered out and is not available in this bundle.",
              scoreDisplayMode: Audit.SCORING_MODES.NOT_APPLICABLE,
              requiredArtifacts: []
            };
          }
          static audit() {
            return { score: null, scoreDisplayMode: Audit.SCORING_MODES.NOT_APPLICABLE };
          }
        };
        cumulative_layout_shift_default = ShimAudit34;
      }
    });
    first_contentful_paint_exports = {};
    __export2(first_contentful_paint_exports, {
      default: () => first_contentful_paint_default
    });
    init_first_contentful_paint = __esm2({
      "lh-audit-shim:/Users/alexrudenko/src/lighthouse/core/audits/metrics/first-contentful-paint.js"() {
        init_process_global();
        init_audit();
        ShimAudit35 = class extends Audit {
          static {
            __name(this, "ShimAudit");
          }
          static get meta() {
            return {
              id: "first-contentful-paint",
              title: "Shim Audit",
              description: "This audit was filtered out and is not available in this bundle.",
              scoreDisplayMode: Audit.SCORING_MODES.NOT_APPLICABLE,
              requiredArtifacts: []
            };
          }
          static audit() {
            return { score: null, scoreDisplayMode: Audit.SCORING_MODES.NOT_APPLICABLE };
          }
        };
        first_contentful_paint_default = ShimAudit35;
      }
    });
    interaction_to_next_paint_exports = {};
    __export2(interaction_to_next_paint_exports, {
      default: () => interaction_to_next_paint_default
    });
    init_interaction_to_next_paint = __esm2({
      "lh-audit-shim:/Users/alexrudenko/src/lighthouse/core/audits/metrics/interaction-to-next-paint.js"() {
        init_process_global();
        init_audit();
        ShimAudit36 = class extends Audit {
          static {
            __name(this, "ShimAudit");
          }
          static get meta() {
            return {
              id: "interaction-to-next-paint",
              title: "Shim Audit",
              description: "This audit was filtered out and is not available in this bundle.",
              scoreDisplayMode: Audit.SCORING_MODES.NOT_APPLICABLE,
              requiredArtifacts: []
            };
          }
          static audit() {
            return { score: null, scoreDisplayMode: Audit.SCORING_MODES.NOT_APPLICABLE };
          }
        };
        interaction_to_next_paint_default = ShimAudit36;
      }
    });
    interactive_exports = {};
    __export2(interactive_exports, {
      default: () => interactive_default
    });
    init_interactive = __esm2({
      "lh-audit-shim:/Users/alexrudenko/src/lighthouse/core/audits/metrics/interactive.js"() {
        init_process_global();
        init_audit();
        ShimAudit37 = class extends Audit {
          static {
            __name(this, "ShimAudit");
          }
          static get meta() {
            return {
              id: "interactive",
              title: "Shim Audit",
              description: "This audit was filtered out and is not available in this bundle.",
              scoreDisplayMode: Audit.SCORING_MODES.NOT_APPLICABLE,
              requiredArtifacts: []
            };
          }
          static audit() {
            return { score: null, scoreDisplayMode: Audit.SCORING_MODES.NOT_APPLICABLE };
          }
        };
        interactive_default = ShimAudit37;
      }
    });
    largest_contentful_paint_exports = {};
    __export2(largest_contentful_paint_exports, {
      default: () => largest_contentful_paint_default
    });
    init_largest_contentful_paint = __esm2({
      "lh-audit-shim:/Users/alexrudenko/src/lighthouse/core/audits/metrics/largest-contentful-paint.js"() {
        init_process_global();
        init_audit();
        ShimAudit38 = class extends Audit {
          static {
            __name(this, "ShimAudit");
          }
          static get meta() {
            return {
              id: "largest-contentful-paint",
              title: "Shim Audit",
              description: "This audit was filtered out and is not available in this bundle.",
              scoreDisplayMode: Audit.SCORING_MODES.NOT_APPLICABLE,
              requiredArtifacts: []
            };
          }
          static audit() {
            return { score: null, scoreDisplayMode: Audit.SCORING_MODES.NOT_APPLICABLE };
          }
        };
        largest_contentful_paint_default = ShimAudit38;
      }
    });
    max_potential_fid_exports = {};
    __export2(max_potential_fid_exports, {
      default: () => max_potential_fid_default
    });
    init_max_potential_fid = __esm2({
      "lh-audit-shim:/Users/alexrudenko/src/lighthouse/core/audits/metrics/max-potential-fid.js"() {
        init_process_global();
        init_audit();
        ShimAudit39 = class extends Audit {
          static {
            __name(this, "ShimAudit");
          }
          static get meta() {
            return {
              id: "max-potential-fid",
              title: "Shim Audit",
              description: "This audit was filtered out and is not available in this bundle.",
              scoreDisplayMode: Audit.SCORING_MODES.NOT_APPLICABLE,
              requiredArtifacts: []
            };
          }
          static audit() {
            return { score: null, scoreDisplayMode: Audit.SCORING_MODES.NOT_APPLICABLE };
          }
        };
        max_potential_fid_default = ShimAudit39;
      }
    });
    speed_index_exports = {};
    __export2(speed_index_exports, {
      default: () => speed_index_default
    });
    init_speed_index = __esm2({
      "lh-audit-shim:/Users/alexrudenko/src/lighthouse/core/audits/metrics/speed-index.js"() {
        init_process_global();
        init_audit();
        ShimAudit40 = class extends Audit {
          static {
            __name(this, "ShimAudit");
          }
          static get meta() {
            return {
              id: "speed-index",
              title: "Shim Audit",
              description: "This audit was filtered out and is not available in this bundle.",
              scoreDisplayMode: Audit.SCORING_MODES.NOT_APPLICABLE,
              requiredArtifacts: []
            };
          }
          static audit() {
            return { score: null, scoreDisplayMode: Audit.SCORING_MODES.NOT_APPLICABLE };
          }
        };
        speed_index_default = ShimAudit40;
      }
    });
    total_blocking_time_exports = {};
    __export2(total_blocking_time_exports, {
      default: () => total_blocking_time_default
    });
    init_total_blocking_time = __esm2({
      "lh-audit-shim:/Users/alexrudenko/src/lighthouse/core/audits/metrics/total-blocking-time.js"() {
        init_process_global();
        init_audit();
        ShimAudit41 = class extends Audit {
          static {
            __name(this, "ShimAudit");
          }
          static get meta() {
            return {
              id: "total-blocking-time",
              title: "Shim Audit",
              description: "This audit was filtered out and is not available in this bundle.",
              scoreDisplayMode: Audit.SCORING_MODES.NOT_APPLICABLE,
              requiredArtifacts: []
            };
          }
          static audit() {
            return { score: null, scoreDisplayMode: Audit.SCORING_MODES.NOT_APPLICABLE };
          }
        };
        total_blocking_time_default = ShimAudit41;
      }
    });
    network_requests_exports = {};
    __export2(network_requests_exports, {
      default: () => network_requests_default
    });
    init_network_requests = __esm2({
      "lh-audit-shim:/Users/alexrudenko/src/lighthouse/core/audits/network-requests.js"() {
        init_process_global();
        init_audit();
        ShimAudit42 = class extends Audit {
          static {
            __name(this, "ShimAudit");
          }
          static get meta() {
            return {
              id: "network-requests",
              title: "Shim Audit",
              description: "This audit was filtered out and is not available in this bundle.",
              scoreDisplayMode: Audit.SCORING_MODES.NOT_APPLICABLE,
              requiredArtifacts: []
            };
          }
          static audit() {
            return { score: null, scoreDisplayMode: Audit.SCORING_MODES.NOT_APPLICABLE };
          }
        };
        network_requests_default = ShimAudit42;
      }
    });
    network_rtt_exports = {};
    __export2(network_rtt_exports, {
      default: () => network_rtt_default
    });
    init_network_rtt = __esm2({
      "lh-audit-shim:/Users/alexrudenko/src/lighthouse/core/audits/network-rtt.js"() {
        init_process_global();
        init_audit();
        ShimAudit43 = class extends Audit {
          static {
            __name(this, "ShimAudit");
          }
          static get meta() {
            return {
              id: "network-rtt",
              title: "Shim Audit",
              description: "This audit was filtered out and is not available in this bundle.",
              scoreDisplayMode: Audit.SCORING_MODES.NOT_APPLICABLE,
              requiredArtifacts: []
            };
          }
          static audit() {
            return { score: null, scoreDisplayMode: Audit.SCORING_MODES.NOT_APPLICABLE };
          }
        };
        network_rtt_default = ShimAudit43;
      }
    });
    network_server_latency_exports = {};
    __export2(network_server_latency_exports, {
      default: () => network_server_latency_default
    });
    init_network_server_latency = __esm2({
      "lh-audit-shim:/Users/alexrudenko/src/lighthouse/core/audits/network-server-latency.js"() {
        init_process_global();
        init_audit();
        ShimAudit44 = class extends Audit {
          static {
            __name(this, "ShimAudit");
          }
          static get meta() {
            return {
              id: "network-server-latency",
              title: "Shim Audit",
              description: "This audit was filtered out and is not available in this bundle.",
              scoreDisplayMode: Audit.SCORING_MODES.NOT_APPLICABLE,
              requiredArtifacts: []
            };
          }
          static audit() {
            return { score: null, scoreDisplayMode: Audit.SCORING_MODES.NOT_APPLICABLE };
          }
        };
        network_server_latency_default = ShimAudit44;
      }
    });
    non_composited_animations_exports = {};
    __export2(non_composited_animations_exports, {
      default: () => non_composited_animations_default
    });
    init_non_composited_animations = __esm2({
      "lh-audit-shim:/Users/alexrudenko/src/lighthouse/core/audits/non-composited-animations.js"() {
        init_process_global();
        init_audit();
        ShimAudit45 = class extends Audit {
          static {
            __name(this, "ShimAudit");
          }
          static get meta() {
            return {
              id: "non-composited-animations",
              title: "Shim Audit",
              description: "This audit was filtered out and is not available in this bundle.",
              scoreDisplayMode: Audit.SCORING_MODES.NOT_APPLICABLE,
              requiredArtifacts: []
            };
          }
          static audit() {
            return { score: null, scoreDisplayMode: Audit.SCORING_MODES.NOT_APPLICABLE };
          }
        };
        non_composited_animations_default = ShimAudit45;
      }
    });
    oopif_iframe_test_audit_exports = {};
    __export2(oopif_iframe_test_audit_exports, {
      default: () => oopif_iframe_test_audit_default
    });
    init_oopif_iframe_test_audit = __esm2({
      "lh-audit-shim:/Users/alexrudenko/src/lighthouse/core/audits/oopif-iframe-test-audit.js"() {
        init_process_global();
        init_audit();
        ShimAudit46 = class extends Audit {
          static {
            __name(this, "ShimAudit");
          }
          static get meta() {
            return {
              id: "oopif-iframe-test-audit",
              title: "Shim Audit",
              description: "This audit was filtered out and is not available in this bundle.",
              scoreDisplayMode: Audit.SCORING_MODES.NOT_APPLICABLE,
              requiredArtifacts: []
            };
          }
          static audit() {
            return { score: null, scoreDisplayMode: Audit.SCORING_MODES.NOT_APPLICABLE };
          }
        };
        oopif_iframe_test_audit_default = ShimAudit46;
      }
    });
    predictive_perf_exports = {};
    __export2(predictive_perf_exports, {
      default: () => predictive_perf_default
    });
    init_predictive_perf = __esm2({
      "lh-audit-shim:/Users/alexrudenko/src/lighthouse/core/audits/predictive-perf.js"() {
        init_process_global();
        init_audit();
        ShimAudit47 = class extends Audit {
          static {
            __name(this, "ShimAudit");
          }
          static get meta() {
            return {
              id: "predictive-perf",
              title: "Shim Audit",
              description: "This audit was filtered out and is not available in this bundle.",
              scoreDisplayMode: Audit.SCORING_MODES.NOT_APPLICABLE,
              requiredArtifacts: []
            };
          }
          static audit() {
            return { score: null, scoreDisplayMode: Audit.SCORING_MODES.NOT_APPLICABLE };
          }
        };
        predictive_perf_default = ShimAudit47;
      }
    });
    redirects_exports = {};
    __export2(redirects_exports, {
      default: () => redirects_default
    });
    init_redirects = __esm2({
      "lh-audit-shim:/Users/alexrudenko/src/lighthouse/core/audits/redirects.js"() {
        init_process_global();
        init_audit();
        ShimAudit48 = class extends Audit {
          static {
            __name(this, "ShimAudit");
          }
          static get meta() {
            return {
              id: "redirects",
              title: "Shim Audit",
              description: "This audit was filtered out and is not available in this bundle.",
              scoreDisplayMode: Audit.SCORING_MODES.NOT_APPLICABLE,
              requiredArtifacts: []
            };
          }
          static audit() {
            return { score: null, scoreDisplayMode: Audit.SCORING_MODES.NOT_APPLICABLE };
          }
        };
        redirects_default = ShimAudit48;
      }
    });
    resource_summary_exports = {};
    __export2(resource_summary_exports, {
      default: () => resource_summary_default
    });
    init_resource_summary = __esm2({
      "lh-audit-shim:/Users/alexrudenko/src/lighthouse/core/audits/resource-summary.js"() {
        init_process_global();
        init_audit();
        ShimAudit49 = class extends Audit {
          static {
            __name(this, "ShimAudit");
          }
          static get meta() {
            return {
              id: "resource-summary",
              title: "Shim Audit",
              description: "This audit was filtered out and is not available in this bundle.",
              scoreDisplayMode: Audit.SCORING_MODES.NOT_APPLICABLE,
              requiredArtifacts: []
            };
          }
          static audit() {
            return { score: null, scoreDisplayMode: Audit.SCORING_MODES.NOT_APPLICABLE };
          }
        };
        resource_summary_default = ShimAudit49;
      }
    });
    screenshot_thumbnails_exports = {};
    __export2(screenshot_thumbnails_exports, {
      default: () => screenshot_thumbnails_default
    });
    init_screenshot_thumbnails = __esm2({
      "lh-audit-shim:/Users/alexrudenko/src/lighthouse/core/audits/screenshot-thumbnails.js"() {
        init_process_global();
        init_audit();
        ShimAudit50 = class extends Audit {
          static {
            __name(this, "ShimAudit");
          }
          static get meta() {
            return {
              id: "screenshot-thumbnails",
              title: "Shim Audit",
              description: "This audit was filtered out and is not available in this bundle.",
              scoreDisplayMode: Audit.SCORING_MODES.NOT_APPLICABLE,
              requiredArtifacts: []
            };
          }
          static audit() {
            return { score: null, scoreDisplayMode: Audit.SCORING_MODES.NOT_APPLICABLE };
          }
        };
        screenshot_thumbnails_default = ShimAudit50;
      }
    });
    script_treemap_data_exports = {};
    __export2(script_treemap_data_exports, {
      default: () => script_treemap_data_default
    });
    init_script_treemap_data = __esm2({
      "lh-audit-shim:/Users/alexrudenko/src/lighthouse/core/audits/script-treemap-data.js"() {
        init_process_global();
        init_audit();
        ShimAudit51 = class extends Audit {
          static {
            __name(this, "ShimAudit");
          }
          static get meta() {
            return {
              id: "script-treemap-data",
              title: "Shim Audit",
              description: "This audit was filtered out and is not available in this bundle.",
              scoreDisplayMode: Audit.SCORING_MODES.NOT_APPLICABLE,
              requiredArtifacts: []
            };
          }
          static audit() {
            return { score: null, scoreDisplayMode: Audit.SCORING_MODES.NOT_APPLICABLE };
          }
        };
        script_treemap_data_default = ShimAudit51;
      }
    });
    server_response_time_exports = {};
    __export2(server_response_time_exports, {
      default: () => server_response_time_default
    });
    init_server_response_time = __esm2({
      "lh-audit-shim:/Users/alexrudenko/src/lighthouse/core/audits/server-response-time.js"() {
        init_process_global();
        init_audit();
        ShimAudit52 = class extends Audit {
          static {
            __name(this, "ShimAudit");
          }
          static get meta() {
            return {
              id: "server-response-time",
              title: "Shim Audit",
              description: "This audit was filtered out and is not available in this bundle.",
              scoreDisplayMode: Audit.SCORING_MODES.NOT_APPLICABLE,
              requiredArtifacts: []
            };
          }
          static audit() {
            return { score: null, scoreDisplayMode: Audit.SCORING_MODES.NOT_APPLICABLE };
          }
        };
        server_response_time_default = ShimAudit52;
      }
    });
    unsized_images_exports = {};
    __export2(unsized_images_exports, {
      default: () => unsized_images_default
    });
    init_unsized_images = __esm2({
      "lh-audit-shim:/Users/alexrudenko/src/lighthouse/core/audits/unsized-images.js"() {
        init_process_global();
        init_audit();
        ShimAudit53 = class extends Audit {
          static {
            __name(this, "ShimAudit");
          }
          static get meta() {
            return {
              id: "unsized-images",
              title: "Shim Audit",
              description: "This audit was filtered out and is not available in this bundle.",
              scoreDisplayMode: Audit.SCORING_MODES.NOT_APPLICABLE,
              requiredArtifacts: []
            };
          }
          static audit() {
            return { score: null, scoreDisplayMode: Audit.SCORING_MODES.NOT_APPLICABLE };
          }
        };
        unsized_images_default = ShimAudit53;
      }
    });
    user_timings_exports = {};
    __export2(user_timings_exports, {
      default: () => user_timings_default
    });
    init_user_timings = __esm2({
      "lh-audit-shim:/Users/alexrudenko/src/lighthouse/core/audits/user-timings.js"() {
        init_process_global();
        init_audit();
        ShimAudit54 = class extends Audit {
          static {
            __name(this, "ShimAudit");
          }
          static get meta() {
            return {
              id: "user-timings",
              title: "Shim Audit",
              description: "This audit was filtered out and is not available in this bundle.",
              scoreDisplayMode: Audit.SCORING_MODES.NOT_APPLICABLE,
              requiredArtifacts: []
            };
          }
          static audit() {
            return { score: null, scoreDisplayMode: Audit.SCORING_MODES.NOT_APPLICABLE };
          }
        };
        user_timings_default = ShimAudit54;
      }
    });
    cjs_exports = {};
    __export2(cjs_exports, {
      default: () => cjs_default
    });
    init_cjs = __esm2({
      "replace-modules:/Users/alexrudenko/src/lighthouse/node_modules/@sentry/node/build/cjs/index.js"() {
        init_process_global();
        cjs_default = {};
      }
    });
    init_process_global();
    init_process_global();
    init_trace();
    init_process_global();
    init_lighthouse_logger();
    init_lodash();
    init_process_global();
    init_audit();
    clampTo2Decimals2 = /* @__PURE__ */ __name((val) => Math.round(val * 100) / 100, "clampTo2Decimals");
    ReportScoring = class _ReportScoring {
      static {
        __name(this, "ReportScoring");
      }
      /**
       * Computes the weighted-average of the score of the list of items.
       * @param {Array<{score: number|null, weight: number}>} items
       * @return {number|null}
       */
      static arithmeticMean(items2) {
        items2 = items2.filter((item) => item.weight > 0);
        if (items2.some((item) => item.score === null))
          return null;
        const results = items2.reduce((result, item) => {
          const score = item.score;
          const weight = item.weight;
          return {
            weight: result.weight + weight,
            sum: result.sum + /** @type {number} */
            score * weight
          };
        }, { weight: 0, sum: 0 });
        return clampTo2Decimals2(results.sum / results.weight || 0);
      }
      /**
       * Returns the report JSON object with computed scores.
       * @param {Object<string, LH.Config.Category>} configCategories
       * @param {Object<string, LH.RawIcu<LH.Audit.Result>>} resultsByAuditId
       * @return {Object<string, LH.RawIcu<LH.Result.Category>>}
       */
      static scoreAllCategories(configCategories, resultsByAuditId) {
        const scoredCategories = {};
        for (const [categoryId, configCategory] of Object.entries(configCategories)) {
          const auditRefs = configCategory.auditRefs.map((configMember) => {
            const member = { ...configMember };
            const result = resultsByAuditId[member.id];
            if (result.scoreDisplayMode === Audit.SCORING_MODES.NOT_APPLICABLE || result.scoreDisplayMode === Audit.SCORING_MODES.INFORMATIVE || result.scoreDisplayMode === Audit.SCORING_MODES.MANUAL) {
              member.weight = 0;
            }
            return member;
          });
          const scores = auditRefs.map((auditRef) => ({
            score: resultsByAuditId[auditRef.id].score,
            weight: auditRef.weight
          }));
          const score = _ReportScoring.arithmeticMean(scores);
          scoredCategories[categoryId] = {
            ...configCategory,
            auditRefs,
            id: categoryId,
            score
          };
        }
        return scoredCategories;
      }
    };
    init_audit();
    init_format();
    init_process_global();
    init_lighthouse_logger();
    import_lighthouse_stack_packs = __toESM(require_lighthouse_stack_packs(), 1);
    init_i18n();
    stackPacksToInclude = [
      {
        packId: "gatsby",
        requiredStacks: ["js:gatsby"]
      },
      {
        packId: "wordpress",
        requiredStacks: ["js:wordpress"]
      },
      {
        packId: "wix",
        requiredStacks: ["js:wix"]
      },
      {
        packId: "wp-rocket",
        requiredStacks: ["js:wp-rocket"]
      },
      {
        packId: "ezoic",
        requiredStacks: ["js:ezoic"]
      },
      {
        packId: "drupal",
        requiredStacks: ["js:drupal"]
      },
      {
        packId: "nitropack",
        requiredStacks: ["js:nitropack"]
      },
      {
        packId: "amp",
        requiredStacks: ["js:amp"]
      },
      {
        packId: "magento",
        requiredStacks: ["js:magento"]
      },
      {
        packId: "octobercms",
        requiredStacks: ["js:octobercms"]
      },
      {
        packId: "joomla",
        requiredStacks: ["js:joomla"]
      },
      {
        packId: "next.js",
        requiredStacks: ["js:next"]
      },
      {
        packId: "nuxt",
        requiredStacks: ["js:nuxt"]
      },
      {
        packId: "angular",
        requiredStacks: ["js:angular"]
      },
      {
        packId: "react",
        requiredStacks: ["js:react"]
      }
    ];
    __name(getStackPacks, "getStackPacks");
    init_process_global();
    init_url();
    init_lighthouse_logger();
    init_lantern2();
    init_process_global();
    init_process_global();
    init_lighthouse_logger();
    init_trace_processor();
    init_process_global();
    init_lighthouse_logger();
    init_lantern2();
    init_computed_artifact();
    init_network_records();
    NetworkAnalysis = class {
      static {
        __name(this, "NetworkAnalysis");
      }
      /**
       * @param {LH.DevtoolsLog} devtoolsLog
       * @param {LH.Artifacts.ComputedContext} context
       * @return {Promise<LH.Artifacts.NetworkAnalysis>}
       */
      static async compute_(devtoolsLog, context2) {
        const records = await NetworkRecordsComputed.request(devtoolsLog, context2);
        const analysis = core_exports.NetworkAnalyzer.analyze(records);
        if (!analysis) {
          lighthouse_logger_default.error("NetworkAnalysis", "Network analysis failed due to lack of transfer data");
          return {
            throughput: 0,
            rtt: Number.POSITIVE_INFINITY,
            additionalRttByOrigin: /* @__PURE__ */ new Map(),
            serverResponseTimeByOrigin: /* @__PURE__ */ new Map()
          };
        }
        return analysis;
      }
    };
    NetworkAnalysisComputed = makeComputedArtifact(NetworkAnalysis, null);
    init_process_global();
    init_computed_artifact();
    init_lantern2();
    LoadSimulator = class {
      static {
        __name(this, "LoadSimulator");
      }
      /**
       * @param {{devtoolsLog: LH.DevtoolsLog, settings: LH.Audit.Context['settings']}} data
       * @param {LH.Artifacts.ComputedContext} context
       * @return {Promise<LH.Gatherer.Simulation.Simulator>}
       */
      static async compute_(data312, context2) {
        const networkAnalysis = await NetworkAnalysisComputed.request(data312.devtoolsLog, context2);
        return simulation_exports.Simulator.createSimulator({ ...data312.settings, networkAnalysis });
      }
      /**
       * @param {LH.Artifacts.NetworkAnalysis} networkAnalysis
       * @return {LH.PrecomputedLanternData}
       */
      static convertAnalysisToSaveableLanternData(networkAnalysis) {
        const lanternData = { additionalRttByOrigin: {}, serverResponseTimeByOrigin: {} };
        for (const [origin, value] of networkAnalysis.additionalRttByOrigin.entries()) {
          if (origin.startsWith("http"))
            lanternData.additionalRttByOrigin[origin] = value;
        }
        for (const [origin, value] of networkAnalysis.serverResponseTimeByOrigin.entries()) {
          if (origin.startsWith("http"))
            lanternData.serverResponseTimeByOrigin[origin] = value;
        }
        return lanternData;
      }
    };
    LoadSimulatorComputed = makeComputedArtifact(LoadSimulator, ["devtoolsLog", "settings"]);
    init_lh_error();
    init_root2();
    artifactsFilename = "artifacts.json";
    traceFilename = "trace.json";
    devtoolsFilename = "devtoolslog.json";
    errorPrefix = "pageLoadError.";
    __name(writeJson, "writeJson");
    __name(readJson, "readJson");
    __name(endsWithSuffix, "endsWithSuffix");
    __name(loadArtifacts, "loadArtifacts");
    __name(stringifyReplacer, "stringifyReplacer");
    __name(saveArtifacts, "saveArtifacts");
    __name(saveLhr, "saveLhr");
    __name(arrayOfObjectsJsonGenerator, "arrayOfObjectsJsonGenerator");
    __name(traceJsonGenerator, "traceJsonGenerator");
    __name(saveTrace, "saveTrace");
    __name(saveDevtoolsLog, "saveDevtoolsLog");
    init_process_global();
    init_lighthouse_logger();
    init_process_global();
    init_lighthouse_logger();
    init_process_global();
    init_lh();
    constants_exports = {};
    __export2(constants_exports, {
      defaultSettings: () => defaultSettings,
      nonSimulatedSettingsOverrides: () => nonSimulatedSettingsOverrides,
      screenEmulationMetrics: () => screenEmulationMetrics,
      throttling: () => throttling2,
      userAgents: () => userAgents
    });
    init_process_global();
    init_lantern2();
    throttling2 = simulation_exports.Constants.throttling;
    MOTOGPOWER_EMULATION_METRICS = {
      mobile: true,
      width: 412,
      height: 823,
      // This value has some interesting ramifications for image-size-responsive, see:
      // https://github.com/GoogleChrome/lighthouse/issues/10741#issuecomment-626903508
      deviceScaleFactor: 1.75,
      disabled: false
    };
    DESKTOP_EMULATION_METRICS = {
      mobile: false,
      width: 1350,
      height: 940,
      deviceScaleFactor: 1,
      disabled: false
    };
    screenEmulationMetrics = {
      mobile: MOTOGPOWER_EMULATION_METRICS,
      desktop: DESKTOP_EMULATION_METRICS
    };
    MOTOG4_USERAGENT = "Mozilla/5.0 (Linux; Android 11; moto g power (2022)) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/136.0.0.0 Mobile Safari/537.36";
    DESKTOP_USERAGENT = "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/136.0.0.0 Safari/537.36";
    userAgents = {
      mobile: MOTOG4_USERAGENT,
      desktop: DESKTOP_USERAGENT
    };
    defaultSettings = {
      output: "json",
      maxWaitForFcp: 30 * 1e3,
      maxWaitForLoad: 45 * 1e3,
      pauseAfterFcpMs: 1e3,
      pauseAfterLoadMs: 1e3,
      networkQuietThresholdMs: 1e3,
      cpuQuietThresholdMs: 1e3,
      formFactor: "mobile",
      throttling: throttling2.mobileSlow4G,
      throttlingMethod: "simulate",
      screenEmulation: screenEmulationMetrics.mobile,
      emulatedUserAgent: userAgents.mobile,
      auditMode: false,
      gatherMode: false,
      clearStorageTypes: ["file_systems", "shader_cache", "service_workers", "cache_storage"],
      disableStorageReset: false,
      debugNavigation: false,
      channel: "node",
      usePassiveGathering: false,
      disableFullPageScreenshot: false,
      skipAboutBlank: false,
      blankPage: "about:blank",
      ignoreStatusCode: false,
      // the following settings have no defaults but we still want ensure that `key in settings`
      // in config will work in a typechecked way
      locale: "en-US",
      // actual default determined by Config using lib/i18n
      blockedUrlPatterns: null,
      additionalTraceCategories: null,
      extraHeaders: null,
      precomputedLanternData: null,
      onlyAudits: null,
      onlyCategories: null,
      skipAudits: null
    };
    nonSimulatedSettingsOverrides = {
      pauseAfterFcpMs: 5250,
      pauseAfterLoadMs: 5250,
      networkQuietThresholdMs: 5250,
      cpuQuietThresholdMs: 5250
    };
    init_i18n();
    UIStrings21 = {
      /** Title of the Performance category of audits. Equivalent to 'Web performance', this term is inclusive of all web page speed and loading optimization topics. Also used as a label of a score gauge; try to limit to 20 characters. */
      performanceCategoryTitle: "Performance",
      /** Title of the speed metrics section of the Performance category. Within this section are various speed metrics which quantify the pageload performance into values presented in seconds and milliseconds. */
      metricGroupTitle: "Metrics",
      /** Title of the insights section of the Performance category. Within this section are various insights to give developers tips on how to improve the performance of their page. */
      insightsGroupTitle: "Insights",
      /** Description of the insights section of the Performance category. Within this section are various insights to give developers tips on how to improve the performance of their page. */
      insightsGroupDescription: "These insights are also available in the Chrome DevTools Performance Panel - [record a trace](https://developer.chrome.com/docs/devtools/performance/reference) to view more detailed information.",
      /** Title of an opportunity sub-section of the Performance category. Within this section are audits with imperative titles that suggest actions the user can take to improve the time of the first initial render of the webpage. */
      firstPaintImprovementsGroupTitle: "First Paint Improvements",
      /** Description of an opportunity sub-section of the Performance category. Within this section are audits with imperative titles that suggest actions the user can take to improve the time of the first initial render of the webpage. */
      firstPaintImprovementsGroupDescription: "The most critical aspect of performance is how quickly pixels are rendered onscreen. Key metrics: First Contentful Paint, First Meaningful Paint",
      /** Title of an opportunity sub-section of the Performance category. Within this section are audits with imperative titles that suggest actions the user can take to improve the overall loading performance of their web page. */
      overallImprovementsGroupTitle: "Overall Improvements",
      /** Description of an opportunity sub-section of the Performance category. Within this section are audits with imperative titles that suggest actions the user can take to improve the overall loading performance of their web page. */
      overallImprovementsGroupDescription: "Enhance the overall loading experience, so the page is responsive and ready to use as soon as possible. Key metrics: Time to Interactive, Speed Index",
      /** Title of the diagnostics section of the Performance category. Within this section are audits with non-imperative titles that provide more detail on the page's page load performance characteristics. Whereas the 'Opportunities' suggest an action along with expected time savings, diagnostics do not. Within this section, the user may read the details and deduce additional actions they could take. */
      diagnosticsGroupTitle: "Diagnostics",
      /** Description of the diagnostics section of the Performance category. Within this section are audits with non-imperative titles that provide more detail on a web page's load performance characteristics. Within this section, the user may read the details and deduce additional actions they could take to improve performance. */
      diagnosticsGroupDescription: "More information about the performance of your application. These numbers don't [directly affect](https://developer.chrome.com/docs/lighthouse/performance/performance-scoring/) the Performance score.",
      /** Title of the Accessibility category of audits. This section contains audits focused on making web content accessible to all users. Also used as a label of a score gauge; try to limit to 20 characters. */
      a11yCategoryTitle: "Accessibility",
      /** Description of the Accessibility category. This is displayed at the top of a list of audits focused on making web content accessible to all users. No character length limits. 'improve the accessibility of your web app' and 'manual testing' become link texts to additional documentation. */
      a11yCategoryDescription: "These checks highlight opportunities to [improve the accessibility of your web app](https://developer.chrome.com/docs/lighthouse/accessibility/). Automatic detection can only detect a subset of issues and does not guarantee the accessibility of your web app, so [manual testing](https://web.dev/articles/how-to-review) is also encouraged.",
      /** Description of the Accessibility manual checks category. This description is displayed above a list of accessibility audits that currently have no automated test and so must be verified manually by the user. No character length limits. 'conducting an accessibility review' becomes link text to additional documentation. */
      a11yCategoryManualDescription: "These items address areas which an automated testing tool cannot cover. Learn more in our guide on [conducting an accessibility review](https://web.dev/articles/how-to-review).",
      /** Title of the best practices section of the Accessibility category. Within this section are audits with descriptive titles that highlight common accessibility best practices. */
      a11yBestPracticesGroupTitle: "Best practices",
      /** Description of the best practices section within the Accessibility category. Within this section are audits with descriptive titles that highlight common accessibility best practices. */
      a11yBestPracticesGroupDescription: "These items highlight common accessibility best practices.",
      /** Title of the color contrast section within the Accessibility category. Within this section are audits with descriptive titles that highlight the color and vision aspects of the page's accessibility that are passing or failing. */
      a11yColorContrastGroupTitle: "Contrast",
      /** Description of the color contrast section within the Accessibility category. Within this section are audits with descriptive titles that highlight the color and vision aspects of the page's accessibility that are passing or failing. */
      a11yColorContrastGroupDescription: "These are opportunities to improve the legibility of your content.",
      /** Title of the HTML element naming section within the Accessibility category. Within this section are audits with descriptive titles that highlight if the non-textual HTML elements on the page have names discernible by a screen reader. */
      a11yNamesLabelsGroupTitle: "Names and labels",
      /** Description of the HTML element naming section within the Accessibility category. Within this section are audits with descriptive titles that highlight if the non-textual HTML elements on the page have names discernible by a screen reader. */
      a11yNamesLabelsGroupDescription: "These are opportunities to improve the semantics of the controls in your application. This may enhance the experience for users of assistive technology, like a screen reader.",
      /** Title of the navigation section within the Accessibility category. Within this section are audits with descriptive titles that highlight opportunities to improve keyboard navigation. */
      a11yNavigationGroupTitle: "Navigation",
      /** Description of the navigation section within the Accessibility category. Within this section are audits with descriptive titles that highlight opportunities to improve keyboard navigation. */
      a11yNavigationGroupDescription: "These are opportunities to improve keyboard navigation in your application.",
      /** Title of the ARIA validity section within the Accessibility category. Within this section are audits with descriptive titles that highlight if whether all the aria-* HTML attributes have been used properly. */
      a11yAriaGroupTitle: "ARIA",
      /** Description of the ARIA validity section within the Accessibility category. Within this section are audits with descriptive titles that highlight if whether all the aria-* HTML attributes have been used properly. */
      a11yAriaGroupDescription: "These are opportunities to improve the usage of ARIA in your application which may enhance the experience for users of assistive technology, like a screen reader.",
      /** Title of the language section within the Accessibility category. Within this section are audits with descriptive titles that highlight if the language has been annotated in the correct HTML attributes on the page. */
      a11yLanguageGroupTitle: "Internationalization and localization",
      /** Description of the language section within the Accessibility category. Within this section are audits with descriptive titles that highlight if the language has been annotated in the correct HTML attributes on the page. */
      a11yLanguageGroupDescription: "These are opportunities to improve the interpretation of your content by users in different locales.",
      /** Title of the navigation section within the Accessibility category. Within this section are audits with descriptive titles that highlight opportunities to provide alternative content for audio and video. */
      a11yAudioVideoGroupTitle: "Audio and video",
      /** Description of the navigation section within the Accessibility category. Within this section are audits with descriptive titles that highlight opportunities to provide alternative content for audio and video. */
      a11yAudioVideoGroupDescription: "These are opportunities to provide alternative content for audio and video. This may improve the experience for users with hearing or vision impairments.",
      /** Title of the navigation section within the Accessibility category. Within this section are audits with descriptive titles that highlight opportunities to improve the experience of reading tabular or list data using assistive technology. */
      a11yTablesListsVideoGroupTitle: "Tables and lists",
      /** Description of the navigation section within the Accessibility category. Within this section are audits with descriptive titles that highlight opportunities to improve the experience of reading tabular or list data using assistive technology. */
      a11yTablesListsVideoGroupDescription: "These are opportunities to improve the experience of reading tabular or list data using assistive technology, like a screen reader.",
      /** Title of the Search Engine Optimization (SEO) category of audits. This is displayed at the top of a list of audits focused on topics related to optimizing a website for indexing by search engines. Also used as a label of a score gauge; try to limit to 20 characters. */
      seoCategoryTitle: "SEO",
      /** Description of the Search Engine Optimization (SEO) category. This is displayed at the top of a list of audits focused on optimizing a website for indexing by search engines. No character length limits. The last sentence starting with 'Learn' becomes link text to additional documentation. */
      seoCategoryDescription: "These checks ensure that your page is following basic search engine optimization advice. There are many additional factors Lighthouse does not score here that may affect your search ranking, including performance on [Core Web Vitals](https://web.dev/explore/vitals). [Learn more about Google Search Essentials](https://support.google.com/webmasters/answer/35769).",
      /** Description of the Search Engine Optimization (SEO) manual checks category, the additional validators must be run by hand in order to check all SEO best practices. This is displayed at the top of a list of manually run audits focused on optimizing a website for indexing by search engines. No character length limits. */
      seoCategoryManualDescription: "Run these additional validators on your site to check additional SEO best practices.",
      /** Title of the navigation section within the Search Engine Optimization (SEO) category. Within this section are audits with descriptive titles that highlight opportunities to make a page more usable on mobile devices. */
      seoMobileGroupTitle: "Mobile Friendly",
      /** Description of the navigation section within the Search Engine Optimization (SEO) category. Within this section are audits with descriptive titles that highlight opportunities to make a page more usable on mobile devices. */
      seoMobileGroupDescription: "Make sure your pages are mobile friendly so users don\u2019t have to pinch or zoom in order to read the content pages. [Learn how to make pages mobile-friendly](https://developers.google.com/search/mobile-sites/).",
      /** Title of the navigation section within the Search Engine Optimization (SEO) category. Within this section are audits with descriptive titles that highlight ways to make a website content more easily understood by search engine crawler bots. */
      seoContentGroupTitle: "Content Best Practices",
      /** Description of the navigation section within the Search Engine Optimization (SEO) category. Within this section are audits with descriptive titles that highlight ways to make a website content more easily understood by search engine crawler bots. */
      seoContentGroupDescription: "Format your HTML in a way that enables crawlers to better understand your app\u2019s content.",
      /** Title of the navigation section within the Search Engine Optimization (SEO) category. Within this section are audits with descriptive titles that highlight ways to make a website accessible to search engine crawlers. */
      seoCrawlingGroupTitle: "Crawling and Indexing",
      /** Description of the navigation section within the Search Engine Optimization (SEO) category. Within this section are audits with descriptive titles that highlight ways to make a website accessible to search engine crawlers. */
      seoCrawlingGroupDescription: "To appear in search results, crawlers need access to your app.",
      /** Title of the Best Practices category of audits. This is displayed at the top of a list of audits focused on topics related to following web development best practices and accepted guidelines. Also used as a label of a score gauge; try to limit to 20 characters. */
      bestPracticesCategoryTitle: "Best Practices",
      /** Title of the Trust & Safety group of audits. This is displayed at the top of a list of audits focused on maintaining user trust and protecting security in web development. */
      bestPracticesTrustSafetyGroupTitle: "Trust and Safety",
      /** Title of the User Experience group of the Best Practices category. Within this section are the audits related to the end user's experience of the webpage. */
      bestPracticesUXGroupTitle: "User Experience",
      /** Title of the Browser Compatibility group of the Best Practices category. Within this section are the audits related to whether the page is interpreted consistently by browsers. */
      bestPracticesBrowserCompatGroupTitle: "Browser Compatibility",
      /** Title of the General group of the Best Practices category. Within this section are the audits that don't belong to a specific group but are of general interest. */
      bestPracticesGeneralGroupTitle: "General"
    };
    str_2 = createIcuMessageFn({ url: "core/config/default-config.js" }.url, UIStrings21);
    defaultConfig = {
      settings: defaultSettings,
      artifacts: [
        // Artifacts which can be depended on come first.
        { id: "DevtoolsLog", gatherer: "devtools-log" },
        { id: "Trace", gatherer: "trace" },
        { id: "Accessibility", gatherer: "accessibility" },
        { id: "AnchorElements", gatherer: "anchor-elements" },
        { id: "ConsoleMessages", gatherer: "console-messages" },
        { id: "CSSUsage", gatherer: "css-usage" },
        { id: "Doctype", gatherer: "dobetterweb/doctype" },
        { id: "Inputs", gatherer: "inputs" },
        { id: "IFrameElements", gatherer: "iframe-elements" },
        { id: "ImageElements", gatherer: "image-elements" },
        { id: "InspectorIssues", gatherer: "inspector-issues" },
        { id: "JsUsage", gatherer: "js-usage" },
        { id: "LinkElements", gatherer: "link-elements" },
        { id: "MainDocumentContent", gatherer: "main-document-content" },
        { id: "MetaElements", gatherer: "meta-elements" },
        { id: "NetworkUserAgent", gatherer: "network-user-agent" },
        { id: "RobotsTxt", gatherer: "seo/robots-txt" },
        { id: "Scripts", gatherer: "scripts" },
        { id: "SourceMaps", gatherer: "source-maps" },
        { id: "Stacks", gatherer: "stacks" },
        { id: "Stylesheets", gatherer: "stylesheets" },
        { id: "TraceElements", gatherer: "trace-elements" },
        { id: "ViewportDimensions", gatherer: "viewport-dimensions" },
        // FullPageScreenshot comes at the end so all other node analysis is captured.
        { id: "FullPageScreenshot", gatherer: "full-page-screenshot" },
        // BFCacheFailures comes at the very end because it can perform a page navigation.
        { id: "BFCacheFailures", gatherer: "bf-cache-failures" }
      ],
      audits: [
        "is-on-https",
        "redirects-http",
        "metrics/first-contentful-paint",
        "metrics/largest-contentful-paint",
        "metrics/speed-index",
        "screenshot-thumbnails",
        "final-screenshot",
        "metrics/total-blocking-time",
        "metrics/max-potential-fid",
        "metrics/cumulative-layout-shift",
        "metrics/interaction-to-next-paint",
        "errors-in-console",
        "server-response-time",
        "metrics/interactive",
        "user-timings",
        "redirects",
        "image-aspect-ratio",
        "image-size-responsive",
        "deprecations",
        "third-party-cookies",
        "mainthread-work-breakdown",
        "bootup-time",
        "diagnostics",
        "network-requests",
        "network-rtt",
        "network-server-latency",
        "main-thread-tasks",
        "metrics",
        "resource-summary",
        "layout-shifts",
        "long-tasks",
        "non-composited-animations",
        "unsized-images",
        "valid-source-maps",
        "csp-xss",
        "has-hsts",
        "origin-isolation",
        "clickjacking-mitigation",
        "trusted-types-xss",
        "script-treemap-data",
        "accessibility/accesskeys",
        "accessibility/aria-allowed-attr",
        "accessibility/aria-allowed-role",
        "accessibility/aria-command-name",
        "accessibility/aria-conditional-attr",
        "accessibility/aria-deprecated-role",
        "accessibility/aria-dialog-name",
        "accessibility/aria-hidden-body",
        "accessibility/aria-hidden-focus",
        "accessibility/aria-input-field-name",
        "accessibility/aria-meter-name",
        "accessibility/aria-progressbar-name",
        "accessibility/aria-prohibited-attr",
        "accessibility/aria-required-attr",
        "accessibility/aria-required-children",
        "accessibility/aria-required-parent",
        "accessibility/aria-roles",
        "accessibility/aria-text",
        "accessibility/aria-toggle-field-name",
        "accessibility/aria-tooltip-name",
        "accessibility/aria-treeitem-name",
        "accessibility/aria-valid-attr-value",
        "accessibility/aria-valid-attr",
        "accessibility/button-name",
        "accessibility/bypass",
        "accessibility/color-contrast",
        "accessibility/definition-list",
        "accessibility/dlitem",
        "accessibility/document-title",
        "accessibility/duplicate-id-aria",
        "accessibility/empty-heading",
        "accessibility/form-field-multiple-labels",
        "accessibility/frame-title",
        "accessibility/heading-order",
        "accessibility/html-has-lang",
        "accessibility/html-lang-valid",
        "accessibility/html-xml-lang-mismatch",
        "accessibility/identical-links-same-purpose",
        "accessibility/image-alt",
        "accessibility/image-redundant-alt",
        "accessibility/input-button-name",
        "accessibility/input-image-alt",
        "accessibility/label-content-name-mismatch",
        "accessibility/label",
        "accessibility/landmark-one-main",
        "accessibility/link-name",
        "accessibility/link-in-text-block",
        "accessibility/list",
        "accessibility/listitem",
        "accessibility/meta-refresh",
        "accessibility/meta-viewport",
        "accessibility/object-alt",
        "accessibility/select-name",
        "accessibility/skip-link",
        "accessibility/tabindex",
        "accessibility/table-duplicate-name",
        "accessibility/table-fake-caption",
        "accessibility/target-size",
        "accessibility/td-has-header",
        "accessibility/td-headers-attr",
        "accessibility/th-has-data-cells",
        "accessibility/valid-lang",
        "accessibility/video-caption",
        "accessibility/manual/custom-controls-labels",
        "accessibility/manual/custom-controls-roles",
        "accessibility/manual/focus-traps",
        "accessibility/manual/focusable-controls",
        "accessibility/manual/interactive-element-affordance",
        "accessibility/manual/logical-tab-order",
        "accessibility/manual/managed-focus",
        "accessibility/manual/offscreen-content-hidden",
        "accessibility/manual/use-landmarks",
        "accessibility/manual/visual-order-follows-dom",
        "byte-efficiency/total-byte-weight",
        "byte-efficiency/unminified-css",
        "byte-efficiency/unminified-javascript",
        "byte-efficiency/unused-css-rules",
        "byte-efficiency/unused-javascript",
        "dobetterweb/doctype",
        "dobetterweb/charset",
        "dobetterweb/geolocation-on-start",
        "dobetterweb/inspector-issues",
        "dobetterweb/js-libraries",
        "dobetterweb/notification-on-start",
        "dobetterweb/paste-preventing-inputs",
        "seo/meta-description",
        "seo/http-status-code",
        "seo/link-text",
        "seo/crawlable-anchors",
        "seo/is-crawlable",
        "seo/robots-txt",
        "seo/hreflang",
        "seo/canonical",
        "seo/manual/structured-data",
        "bf-cache",
        "insights/cache-insight",
        "insights/cls-culprits-insight",
        "insights/document-latency-insight",
        "insights/dom-size-insight",
        "insights/duplicated-javascript-insight",
        "insights/font-display-insight",
        "insights/forced-reflow-insight",
        "insights/image-delivery-insight",
        "insights/inp-breakdown-insight",
        "insights/lcp-breakdown-insight",
        "insights/lcp-discovery-insight",
        "insights/legacy-javascript-insight",
        "insights/modern-http-insight",
        "insights/network-dependency-tree-insight",
        "insights/render-blocking-insight",
        "insights/third-parties-insight",
        "insights/viewport-insight"
      ],
      groups: {
        "metrics": {
          title: str_2(UIStrings21.metricGroupTitle)
        },
        "insights": {
          title: str_2(UIStrings21.insightsGroupTitle),
          description: str_2(UIStrings21.insightsGroupDescription)
        },
        "diagnostics": {
          title: str_2(UIStrings21.diagnosticsGroupTitle),
          description: str_2(UIStrings21.diagnosticsGroupDescription)
        },
        "a11y-best-practices": {
          title: str_2(UIStrings21.a11yBestPracticesGroupTitle),
          description: str_2(UIStrings21.a11yBestPracticesGroupDescription)
        },
        "a11y-color-contrast": {
          title: str_2(UIStrings21.a11yColorContrastGroupTitle),
          description: str_2(UIStrings21.a11yColorContrastGroupDescription)
        },
        "a11y-names-labels": {
          title: str_2(UIStrings21.a11yNamesLabelsGroupTitle),
          description: str_2(UIStrings21.a11yNamesLabelsGroupDescription)
        },
        "a11y-navigation": {
          title: str_2(UIStrings21.a11yNavigationGroupTitle),
          description: str_2(UIStrings21.a11yNavigationGroupDescription)
        },
        "a11y-aria": {
          title: str_2(UIStrings21.a11yAriaGroupTitle),
          description: str_2(UIStrings21.a11yAriaGroupDescription)
        },
        "a11y-language": {
          title: str_2(UIStrings21.a11yLanguageGroupTitle),
          description: str_2(UIStrings21.a11yLanguageGroupDescription)
        },
        "a11y-audio-video": {
          title: str_2(UIStrings21.a11yAudioVideoGroupTitle),
          description: str_2(UIStrings21.a11yAudioVideoGroupDescription)
        },
        "a11y-tables-lists": {
          title: str_2(UIStrings21.a11yTablesListsVideoGroupTitle),
          description: str_2(UIStrings21.a11yTablesListsVideoGroupDescription)
        },
        "seo-mobile": {
          title: str_2(UIStrings21.seoMobileGroupTitle),
          description: str_2(UIStrings21.seoMobileGroupDescription)
        },
        "seo-content": {
          title: str_2(UIStrings21.seoContentGroupTitle),
          description: str_2(UIStrings21.seoContentGroupDescription)
        },
        "seo-crawl": {
          title: str_2(UIStrings21.seoCrawlingGroupTitle),
          description: str_2(UIStrings21.seoCrawlingGroupDescription)
        },
        "best-practices-trust-safety": {
          title: str_2(UIStrings21.bestPracticesTrustSafetyGroupTitle)
        },
        "best-practices-ux": {
          title: str_2(UIStrings21.bestPracticesUXGroupTitle)
        },
        "best-practices-browser-compat": {
          title: str_2(UIStrings21.bestPracticesBrowserCompatGroupTitle)
        },
        "best-practices-general": {
          title: str_2(UIStrings21.bestPracticesGeneralGroupTitle)
        },
        // Group for audits that should not be displayed.
        "hidden": { title: "" }
      },
      categories: {
        "performance": {
          title: str_2(UIStrings21.performanceCategoryTitle),
          supportedModes: ["navigation", "timespan", "snapshot"],
          auditRefs: [
            { id: "first-contentful-paint", weight: 10, group: "metrics", acronym: "FCP" },
            { id: "largest-contentful-paint", weight: 25, group: "metrics", acronym: "LCP" },
            { id: "total-blocking-time", weight: 30, group: "metrics", acronym: "TBT" },
            { id: "cumulative-layout-shift", weight: 25, group: "metrics", acronym: "CLS" },
            { id: "speed-index", weight: 10, group: "metrics", acronym: "SI" },
            { id: "interaction-to-next-paint", weight: 0, group: "metrics", acronym: "INP" },
            // Insight audits.
            { id: "cache-insight", weight: 0, group: "insights" },
            { id: "cls-culprits-insight", weight: 0, group: "insights" },
            { id: "document-latency-insight", weight: 0, group: "insights" },
            { id: "dom-size-insight", weight: 0, group: "insights" },
            { id: "duplicated-javascript-insight", weight: 0, group: "insights" },
            { id: "font-display-insight", weight: 0, group: "insights" },
            { id: "forced-reflow-insight", weight: 0, group: "insights" },
            { id: "image-delivery-insight", weight: 0, group: "insights" },
            { id: "inp-breakdown-insight", weight: 0, group: "insights" },
            { id: "lcp-breakdown-insight", weight: 0, group: "insights" },
            { id: "lcp-discovery-insight", weight: 0, group: "insights" },
            { id: "legacy-javascript-insight", weight: 0, group: "insights" },
            { id: "modern-http-insight", weight: 0, group: "insights" },
            { id: "network-dependency-tree-insight", weight: 0, group: "insights" },
            { id: "render-blocking-insight", weight: 0, group: "insights" },
            { id: "third-parties-insight", weight: 0, group: "insights" },
            { id: "viewport-insight", weight: 0, group: "insights" },
            // These are our "invisible" metrics. Not displayed, but still in the LHR.
            { id: "interactive", weight: 0, group: "hidden", acronym: "TTI" },
            { id: "max-potential-fid", weight: 0, group: "hidden" },
            { id: "unminified-css", weight: 0, group: "diagnostics" },
            { id: "unminified-javascript", weight: 0, group: "diagnostics" },
            { id: "unused-css-rules", weight: 0, group: "diagnostics" },
            { id: "unused-javascript", weight: 0, group: "diagnostics" },
            { id: "total-byte-weight", weight: 0, group: "diagnostics" },
            { id: "user-timings", weight: 0, group: "diagnostics" },
            { id: "bootup-time", weight: 0, group: "diagnostics" },
            { id: "mainthread-work-breakdown", weight: 0, group: "diagnostics" },
            { id: "long-tasks", weight: 0, group: "diagnostics" },
            { id: "non-composited-animations", weight: 0, group: "diagnostics" },
            { id: "unsized-images", weight: 0, group: "diagnostics" },
            { id: "bf-cache", weight: 0, group: "diagnostics" },
            // Audits past this point contain useful data but are not displayed with other audits.
            { id: "network-requests", weight: 0, group: "hidden" },
            { id: "network-rtt", weight: 0, group: "hidden" },
            { id: "network-server-latency", weight: 0, group: "hidden" },
            { id: "main-thread-tasks", weight: 0, group: "hidden" },
            { id: "diagnostics", weight: 0, group: "hidden" },
            { id: "metrics", weight: 0, group: "hidden" },
            { id: "screenshot-thumbnails", weight: 0, group: "hidden" },
            { id: "final-screenshot", weight: 0, group: "hidden" },
            { id: "script-treemap-data", weight: 0, group: "hidden" },
            { id: "resource-summary", weight: 0, group: "hidden" },
            { id: "redirects", weight: 0, group: "hidden" },
            { id: "server-response-time", weight: 0, group: "hidden" },
            { id: "layout-shifts", weight: 0, group: "hidden" }
          ]
        },
        "accessibility": {
          title: str_2(UIStrings21.a11yCategoryTitle),
          description: str_2(UIStrings21.a11yCategoryDescription),
          manualDescription: str_2(UIStrings21.a11yCategoryManualDescription),
          supportedModes: ["navigation", "snapshot"],
          // Audit weights weights are derived from the axe-core "Impact",
          // with adjustments based on axe-core "Tags":
          //
          // ┌────────────┬───────────────────────────────────────────────┐
          // │ Impact     │ Weight Based on Tags                          │
          // │            ├──────────────┬─────────────────┬──────────────┤
          // │            │  wcag A+AA   │  best-practice  │ experimental │
          // │            │ (ex: wcag2aa)│ (w/o wcag tag)  │              │
          // ├────────────┼──────────────┼─────────────────┼──────────────┤
          // │ Minor      │       1      │        0        │      0       │
          // │ Moderate   │       3      │        3        │      0       │
          // │ Serious    │       7      │        7        │      0       │
          // │ Critical   │      10      │       10        │      0       │
          // └────────────┴──────────────┴─────────────────┴──────────────┘
          //
          // Notes:
          //  • Experimental rules always have weight 0
          //  • Best practice rules only affect scores when tagged with wcagA+AA
          //    and are moderate, serious, or critical.
          //
          // To find the latest axe-core Impact and Tag values:
          //   1. Browse to https://dequeuniversity.com/rules/axe/html.
          //   2. Click on the latest rule set (ex: https://dequeuniversity.com/rules/axe/html/4.10)
          //   3. Review the tables
          auditRefs: [
            { id: "accesskeys", weight: 7, group: "a11y-navigation" },
            // Serious, best-practice
            { id: "aria-allowed-attr", weight: 10, group: "a11y-aria" },
            // Critical, wcag2a
            { id: "aria-command-name", weight: 7, group: "a11y-aria" },
            // Serious, wcag2a
            { id: "aria-conditional-attr", weight: 7, group: "a11y-aria" },
            // Serious, wcag2a
            { id: "aria-deprecated-role", weight: 1, group: "a11y-aria" },
            // Minor, wcag2a
            { id: "aria-dialog-name", weight: 7, group: "a11y-aria" },
            // Serious, best-practice
            { id: "aria-hidden-body", weight: 10, group: "a11y-aria" },
            // Critical, wcag2a
            { id: "aria-hidden-focus", weight: 7, group: "a11y-aria" },
            // Serious, wcag2a
            { id: "aria-input-field-name", weight: 7, group: "a11y-aria" },
            // Serious, wcag2a
            { id: "aria-meter-name", weight: 7, group: "a11y-aria" },
            // Serious, wcag2a
            { id: "aria-progressbar-name", weight: 7, group: "a11y-aria" },
            // Serious, wcag2a
            { id: "aria-prohibited-attr", weight: 7, group: "a11y-aria" },
            // Serious, wcag2a
            { id: "aria-required-attr", weight: 10, group: "a11y-aria" },
            // Critical, wcag2a
            { id: "aria-required-children", weight: 10, group: "a11y-aria" },
            // Critical, wcag2a
            { id: "aria-required-parent", weight: 10, group: "a11y-aria" },
            // Critical, wcag2a
            { id: "aria-roles", weight: 10, group: "a11y-aria" },
            // Critical, wcag2a
            { id: "aria-text", weight: 7, group: "a11y-aria" },
            // Serious, best-practice
            { id: "aria-toggle-field-name", weight: 7, group: "a11y-aria" },
            // Serious, wcag2a
            { id: "aria-tooltip-name", weight: 7, group: "a11y-aria" },
            // Serious, wcag2a
            { id: "aria-treeitem-name", weight: 7, group: "a11y-aria" },
            // Serious, best-practice
            { id: "aria-valid-attr-value", weight: 10, group: "a11y-aria" },
            // Critical, wcag2a
            { id: "aria-valid-attr", weight: 10, group: "a11y-aria" },
            // Critical, wcag2a
            { id: "button-name", weight: 10, group: "a11y-names-labels" },
            // Critical, wcag2a
            { id: "bypass", weight: 7, group: "a11y-navigation" },
            // Serious, wcag2a
            { id: "color-contrast", weight: 7, group: "a11y-color-contrast" },
            // Serious, wcag2aa
            { id: "definition-list", weight: 7, group: "a11y-tables-lists" },
            // Serious, wcag2a
            { id: "dlitem", weight: 7, group: "a11y-tables-lists" },
            // Serious, wcag2a
            { id: "document-title", weight: 7, group: "a11y-names-labels" },
            // Serious, wcag2a
            { id: "duplicate-id-aria", weight: 10, group: "a11y-aria" },
            // Critical, wcag2a
            { id: "form-field-multiple-labels", weight: 3, group: "a11y-names-labels" },
            // Moderate, wcag2a
            { id: "frame-title", weight: 7, group: "a11y-names-labels" },
            // Serious, wcag2a
            { id: "heading-order", weight: 3, group: "a11y-navigation" },
            // Moderate, best-practice
            { id: "html-has-lang", weight: 7, group: "a11y-language" },
            // Serious, wcag2a
            { id: "html-lang-valid", weight: 7, group: "a11y-language" },
            // Serious, wcag2a
            { id: "html-xml-lang-mismatch", weight: 3, group: "a11y-language" },
            // Moderate, wcag2a
            { id: "image-alt", weight: 10, group: "a11y-names-labels" },
            // Critical, wcag2a
            { id: "input-button-name", weight: 10, group: "a11y-names-labels" },
            // Critical, wcag2a
            { id: "input-image-alt", weight: 10, group: "a11y-names-labels" },
            // Critical, wcag2a
            { id: "label", weight: 10, group: "a11y-names-labels" },
            // Critical, wcag2a
            { id: "link-in-text-block", weight: 7, group: "a11y-color-contrast" },
            // Serious, wcag2a
            { id: "link-name", weight: 7, group: "a11y-names-labels" },
            // Serious, wcag2a
            { id: "list", weight: 7, group: "a11y-tables-lists" },
            // Serious, wcag2a
            { id: "listitem", weight: 7, group: "a11y-tables-lists" },
            // Serious, wcag2a
            { id: "meta-refresh", weight: 10, group: "a11y-best-practices" },
            // Critical, wcag2a
            { id: "meta-viewport", weight: 10, group: "a11y-best-practices" },
            // Critical, wcag2aa
            { id: "object-alt", weight: 7, group: "a11y-names-labels" },
            // Serious, wcag2a
            { id: "select-name", weight: 10, group: "a11y-names-labels" },
            // Critical, wcag2a
            { id: "skip-link", weight: 3, group: "a11y-names-labels" },
            // Moderate, best-practice
            { id: "tabindex", weight: 7, group: "a11y-navigation" },
            // Serious, best-practice
            { id: "target-size", weight: 7, group: "a11y-best-practices" },
            // Serious, wcag22aa
            { id: "td-headers-attr", weight: 7, group: "a11y-tables-lists" },
            // Serious, wcag2a
            { id: "th-has-data-cells", weight: 7, group: "a11y-tables-lists" },
            // Serious, wcag2a
            { id: "valid-lang", weight: 7, group: "a11y-language" },
            // Serious, wcag2aa
            { id: "video-caption", weight: 10, group: "a11y-audio-video" },
            // Critical, wcag2a
            { id: "landmark-one-main", weight: 3, group: "a11y-best-practices" },
            // Moderate, best-practice
            // Manual audits
            { id: "focusable-controls", weight: 0 },
            { id: "interactive-element-affordance", weight: 0 },
            { id: "logical-tab-order", weight: 0 },
            { id: "visual-order-follows-dom", weight: 0 },
            { id: "focus-traps", weight: 0 },
            { id: "managed-focus", weight: 0 },
            { id: "use-landmarks", weight: 0 },
            { id: "offscreen-content-hidden", weight: 0 },
            { id: "custom-controls-labels", weight: 0 },
            { id: "custom-controls-roles", weight: 0 },
            // Low-impact best-practices
            { id: "table-duplicate-name", weight: 0, group: "a11y-best-practices" },
            // Minor, best-practice
            { id: "empty-heading", weight: 0, group: "a11y-best-practices" },
            // Minor, best-practice
            { id: "aria-allowed-role", weight: 0, group: "a11y-best-practices" },
            // Minor, best-practice
            { id: "image-redundant-alt", weight: 0, group: "a11y-names-labels" },
            // Minor, best-practice
            // WCAG AAA
            { id: "identical-links-same-purpose", weight: 0, group: "a11y-best-practices" },
            // Minor, wcag2aaa
            // Hidden audits (ie. experimental)
            { id: "label-content-name-mismatch", weight: 0, group: "hidden" },
            // Serious, experimental
            { id: "table-fake-caption", weight: 0, group: "hidden" },
            // Serious, experimental
            { id: "td-has-header", weight: 0, group: "hidden" }
            // Critical, experimental
          ]
        },
        "best-practices": {
          title: str_2(UIStrings21.bestPracticesCategoryTitle),
          supportedModes: ["navigation", "timespan", "snapshot"],
          auditRefs: [
            // Trust & Safety
            { id: "is-on-https", weight: 5, group: "best-practices-trust-safety" },
            { id: "redirects-http", weight: 1, group: "best-practices-trust-safety" },
            { id: "geolocation-on-start", weight: 1, group: "best-practices-trust-safety" },
            { id: "notification-on-start", weight: 1, group: "best-practices-trust-safety" },
            { id: "csp-xss", weight: 0, group: "best-practices-trust-safety" },
            { id: "has-hsts", weight: 0, group: "best-practices-trust-safety" },
            { id: "origin-isolation", weight: 0, group: "best-practices-trust-safety" },
            { id: "clickjacking-mitigation", weight: 0, group: "best-practices-trust-safety" },
            { id: "trusted-types-xss", weight: 0, group: "best-practices-trust-safety" },
            // User Experience
            { id: "paste-preventing-inputs", weight: 3, group: "best-practices-ux" },
            { id: "image-aspect-ratio", weight: 1, group: "best-practices-ux" },
            { id: "image-size-responsive", weight: 1, group: "best-practices-ux" },
            // Browser Compatibility
            { id: "doctype", weight: 1, group: "best-practices-browser-compat" },
            { id: "charset", weight: 1, group: "best-practices-browser-compat" },
            // General Group
            { id: "js-libraries", weight: 0, group: "best-practices-general" },
            { id: "deprecations", weight: 5, group: "best-practices-general" },
            { id: "third-party-cookies", weight: 5, group: "best-practices-general" },
            { id: "errors-in-console", weight: 1, group: "best-practices-general" },
            { id: "valid-source-maps", weight: 0, group: "best-practices-general" },
            { id: "inspector-issues", weight: 1, group: "best-practices-general" }
          ]
        },
        "seo": {
          title: str_2(UIStrings21.seoCategoryTitle),
          description: str_2(UIStrings21.seoCategoryDescription),
          manualDescription: str_2(UIStrings21.seoCategoryManualDescription),
          supportedModes: ["navigation", "snapshot"],
          auditRefs: [
            // Should be at least 31% of the score, such that this audit failing
            // results in the SEO category failing.
            // Solve for w:
            //    w / (w + T) >= 0.31
            // where T is the sum of all the other weights.
            { id: "is-crawlable", weight: 93 / 23, group: "seo-crawl" },
            { id: "document-title", weight: 1, group: "seo-content" },
            { id: "meta-description", weight: 1, group: "seo-content" },
            { id: "http-status-code", weight: 1, group: "seo-crawl" },
            { id: "link-text", weight: 1, group: "seo-content" },
            { id: "crawlable-anchors", weight: 1, group: "seo-crawl" },
            { id: "robots-txt", weight: 1, group: "seo-crawl" },
            { id: "image-alt", weight: 1, group: "seo-content" },
            { id: "hreflang", weight: 1, group: "seo-content" },
            { id: "canonical", weight: 1, group: "seo-content" },
            // Manual audits
            { id: "structured-data", weight: 0 }
          ]
        }
      }
    };
    Object.defineProperty(defaultConfig, "UIStrings", {
      enumerable: false,
      get: /* @__PURE__ */ __name(() => UIStrings21, "get")
    });
    default_config_default = defaultConfig;
    init_process_global();
    init_audit();
    init_base_gatherer();
    init_i18n();
    __name(isValidArtifactDependency, "isValidArtifactDependency");
    __name(assertValidPluginName, "assertValidPluginName");
    __name(assertValidArtifact, "assertValidArtifact");
    __name(assertValidAudit, "assertValidAudit");
    __name(assertValidCategories, "assertValidCategories");
    __name(assertValidSettings, "assertValidSettings");
    __name(assertValidArtifacts, "assertValidArtifacts");
    __name(assertValidConfig, "assertValidConfig");
    __name(throwInvalidDependencyOrder, "throwInvalidDependencyOrder");
    __name(throwInvalidArtifactDependency, "throwInvalidArtifactDependency");
    init_process_global();
    init_audit();
    baseArtifactKeySource = {
      fetchTime: "",
      LighthouseRunWarnings: "",
      BenchmarkIndex: "",
      HostDPR: "",
      settings: "",
      Timing: "",
      URL: "",
      PageLoadError: "",
      HostFormFactor: "",
      HostUserAgent: "",
      HostProduct: "",
      GatherContext: ""
    };
    baseArtifactKeys = Object.keys(baseArtifactKeySource);
    filterResistantAuditIds = [];
    filterResistantArtifactIds = ["Stacks", "NetworkUserAgent", "FullPageScreenshot"];
    __name(getAuditIdsInCategories, "getAuditIdsInCategories");
    __name(filterArtifactsByAvailableAudits, "filterArtifactsByAvailableAudits");
    __name(filterArtifactsByGatherMode, "filterArtifactsByGatherMode");
    __name(filterAuditsByAvailableArtifacts, "filterAuditsByAvailableArtifacts");
    __name(filterAuditsByGatherMode, "filterAuditsByGatherMode");
    __name(filterCategoriesByGatherMode, "filterCategoriesByGatherMode");
    __name(filterCategoriesByExplicitFilters, "filterCategoriesByExplicitFilters");
    __name(errorOnUnknownOnlyCategories, "errorOnUnknownOnlyCategories");
    __name(filterCategoriesByAvailableAudits, "filterCategoriesByAvailableAudits");
    __name(filterConfigByGatherMode, "filterConfigByGatherMode");
    __name(filterConfigByExplicitFilters, "filterConfigByExplicitFilters");
    init_process_global();
    init_module();
    init_url();
    init_lodash();
    init_process_global();
    init_i18n();
    __name(isArrayOfUnknownObjects, "isArrayOfUnknownObjects");
    __name(isObjectOfUnknownProperties, "isObjectOfUnknownProperties");
    __name(objectIsGatherMode, "objectIsGatherMode");
    __name(isArrayOfGatherModes, "isArrayOfGatherModes");
    __name(assertNoExcessProperties, "assertNoExcessProperties");
    ConfigPlugin = class _ConfigPlugin {
      static {
        __name(this, "ConfigPlugin");
      }
      /**
       * Extract and validate the list of AuditDefns added by the plugin (or undefined
       * if no additional audits are being added by the plugin).
       * @param {unknown} auditsJson
       * @param {string} pluginName
       * @return {Array<{path: string}>|undefined}
       */
      static _parseAuditsList(auditsJson, pluginName) {
        if (auditsJson === void 0) {
          return void 0;
        } else if (!isArrayOfUnknownObjects(auditsJson)) {
          throw new Error(`${pluginName} has an invalid audits array.`);
        }
        return auditsJson.map((auditDefnJson) => {
          const { path: path72, ...invalidRest } = auditDefnJson;
          assertNoExcessProperties(invalidRest, pluginName, "audit");
          if (typeof path72 !== "string") {
            throw new Error(`${pluginName} has a missing audit path.`);
          }
          return {
            path: path72
          };
        });
      }
      /**
       * Extract and validate the list of category AuditRefs added by the plugin.
       * @param {unknown} auditRefsJson
       * @param {string} pluginName
       * @return {Array<LH.Config.AuditRefJson>}
       */
      static _parseAuditRefsList(auditRefsJson, pluginName) {
        if (!isArrayOfUnknownObjects(auditRefsJson)) {
          throw new Error(`${pluginName} has no valid auditsRefs.`);
        }
        return auditRefsJson.map((auditRefJson) => {
          const { id: id2, weight, group, ...invalidRest } = auditRefJson;
          assertNoExcessProperties(invalidRest, pluginName, "auditRef");
          if (typeof id2 !== "string") {
            throw new Error(`${pluginName} has an invalid auditRef id.`);
          }
          if (typeof weight !== "number") {
            throw new Error(`${pluginName} has an invalid auditRef weight.`);
          }
          if (typeof group !== "string" && typeof group !== "undefined") {
            throw new Error(`${pluginName} has an invalid auditRef group.`);
          }
          const prependedGroup = group ? `${pluginName}-${group}` : group;
          return {
            id: id2,
            weight,
            group: prependedGroup
          };
        });
      }
      /**
       * Extract and validate the category added by the plugin.
       * @param {unknown} categoryJson
       * @param {string} pluginName
       * @return {LH.Config.CategoryJson}
       */
      static _parseCategory(categoryJson, pluginName) {
        if (!isObjectOfUnknownProperties(categoryJson)) {
          throw new Error(`${pluginName} has no valid category.`);
        }
        const { title: title2, description: description2, manualDescription, auditRefs: auditRefsJson, supportedModes, ...invalidRest } = categoryJson;
        assertNoExcessProperties(invalidRest, pluginName, "category");
        if (!isStringOrIcuMessage(title2)) {
          throw new Error(`${pluginName} has an invalid category tile.`);
        }
        if (!isStringOrIcuMessage(description2) && description2 !== void 0) {
          throw new Error(`${pluginName} has an invalid category description.`);
        }
        if (!isStringOrIcuMessage(manualDescription) && manualDescription !== void 0) {
          throw new Error(`${pluginName} has an invalid category manualDescription.`);
        }
        if (!isArrayOfGatherModes(supportedModes) && supportedModes !== void 0) {
          throw new Error(`${pluginName} supportedModes must be an array, valid array values are "navigation", "timespan", and "snapshot".`);
        }
        const auditRefs = _ConfigPlugin._parseAuditRefsList(auditRefsJson, pluginName);
        return {
          title: title2,
          auditRefs,
          description: description2,
          manualDescription,
          supportedModes
        };
      }
      /**
       * Extract and validate groups JSON added by the plugin.
       * @param {unknown} groupsJson
       * @param {string} pluginName
       * @return {Record<string, LH.Config.GroupJson>|undefined}
       */
      static _parseGroups(groupsJson, pluginName) {
        if (groupsJson === void 0) {
          return void 0;
        }
        if (!isObjectOfUnknownProperties(groupsJson)) {
          throw new Error(`${pluginName} groups json is not defined as an object.`);
        }
        const groups = Object.entries(groupsJson);
        const parsedGroupsJson = {};
        groups.forEach(([groupId, groupJson]) => {
          if (!isObjectOfUnknownProperties(groupJson)) {
            throw new Error(`${pluginName} has a group not defined as an object.`);
          }
          const { title: title2, description: description2, ...invalidRest } = groupJson;
          assertNoExcessProperties(invalidRest, pluginName, "group");
          if (!isStringOrIcuMessage(title2)) {
            throw new Error(`${pluginName} has an invalid group title.`);
          }
          if (!isStringOrIcuMessage(description2) && description2 !== void 0) {
            throw new Error(`${pluginName} has an invalid group description.`);
          }
          parsedGroupsJson[`${pluginName}-${groupId}`] = {
            title: title2,
            description: description2
          };
        });
        return parsedGroupsJson;
      }
      /**
       * Extracts and validates a config from the provided plugin input, throwing
       * if it deviates from the expected object shape.
       * @param {unknown} pluginJson
       * @param {string} pluginName
       * @return {LH.Config}
       */
      static parsePlugin(pluginJson, pluginName) {
        pluginJson = JSON.parse(JSON.stringify(pluginJson));
        if (!isObjectOfUnknownProperties(pluginJson)) {
          throw new Error(`${pluginName} is not defined as an object.`);
        }
        const { audits: pluginAuditsJson, category: pluginCategoryJson, groups: pluginGroupsJson, ...invalidRest } = pluginJson;
        assertNoExcessProperties(invalidRest, pluginName);
        return {
          audits: _ConfigPlugin._parseAuditsList(pluginAuditsJson, pluginName),
          categories: {
            [pluginName]: _ConfigPlugin._parseCategory(pluginCategoryJson, pluginName)
          },
          groups: _ConfigPlugin._parseGroups(pluginGroupsJson, pluginName)
        };
      }
    };
    config_plugin_default = ConfigPlugin;
    init_i18n();
    init_esm_utils();
    require4 = createRequire({ url: "core/config/config-helpers.js" }.url);
    __name(isBundledEnvironment2, "isBundledEnvironment");
    mergeOptionsOfItems = /* @__PURE__ */ __name(function(items2) {
      const mergedItems = [];
      for (const item of items2) {
        const existingItem = item.path && mergedItems.find((candidate) => candidate.path === item.path);
        if (!existingItem) {
          mergedItems.push(item);
          continue;
        }
        existingItem.options = Object.assign({}, existingItem.options, item.options);
      }
      return mergedItems;
    }, "mergeOptionsOfItems");
    __name(_mergeConfigFragment, "_mergeConfigFragment");
    mergeConfigFragment = _mergeConfigFragment;
    __name(mergeConfigFragmentArrayByKey, "mergeConfigFragmentArrayByKey");
    __name(expandGathererShorthand, "expandGathererShorthand");
    __name(expandAuditShorthand, "expandAuditShorthand");
    bundledModules = /* @__PURE__ */ new Map([
      ["../gather/gatherers/accessibility", Promise.resolve().then(() => (init_accessibility(), accessibility_exports))],
      ["../gather/gatherers/anchor-elements", Promise.resolve().then(() => (init_anchor_elements(), anchor_elements_exports))],
      ["../gather/gatherers/console-messages", Promise.resolve().then(() => (init_console_messages(), console_messages_exports))],
      ["../gather/gatherers/devtools-log", Promise.resolve().then(() => (init_devtools_log(), devtools_log_exports))],
      ["../gather/gatherers/dobetterweb/doctype", Promise.resolve().then(() => (init_doctype(), doctype_exports))],
      ["../gather/gatherers/image-elements", Promise.resolve().then(() => (init_image_elements(), image_elements_exports))],
      ["../gather/gatherers/inputs", Promise.resolve().then(() => (init_inputs(), inputs_exports))],
      ["../gather/gatherers/inspector-issues", Promise.resolve().then(() => (init_inspector_issues(), inspector_issues_exports))],
      ["../gather/gatherers/link-elements", Promise.resolve().then(() => (init_link_elements(), link_elements_exports))],
      ["../gather/gatherers/main-document-content", Promise.resolve().then(() => (init_main_document_content(), main_document_content_exports))],
      ["../gather/gatherers/meta-elements", Promise.resolve().then(() => (init_meta_elements(), meta_elements_exports))],
      ["../gather/gatherers/scripts", Promise.resolve().then(() => (init_scripts(), scripts_exports))],
      ["../gather/gatherers/seo/robots-txt", Promise.resolve().then(() => (init_robots_txt(), robots_txt_exports))],
      ["../gather/gatherers/source-maps", Promise.resolve().then(() => (init_source_maps(), source_maps_exports))],
      ["../gather/gatherers/stacks", Promise.resolve().then(() => (init_stacks(), stacks_exports))],
      ["../gather/gatherers/viewport-dimensions", Promise.resolve().then(() => (init_viewport_dimensions(), viewport_dimensions_exports))],
      ["../audits/accessibility/accesskeys", Promise.resolve().then(() => (init_accesskeys(), accesskeys_exports))],
      ["../audits/accessibility/aria-allowed-attr", Promise.resolve().then(() => (init_aria_allowed_attr(), aria_allowed_attr_exports))],
      ["../audits/accessibility/aria-allowed-role", Promise.resolve().then(() => (init_aria_allowed_role(), aria_allowed_role_exports))],
      ["../audits/accessibility/aria-command-name", Promise.resolve().then(() => (init_aria_command_name(), aria_command_name_exports))],
      ["../audits/accessibility/aria-conditional-attr", Promise.resolve().then(() => (init_aria_conditional_attr(), aria_conditional_attr_exports))],
      ["../audits/accessibility/aria-deprecated-role", Promise.resolve().then(() => (init_aria_deprecated_role(), aria_deprecated_role_exports))],
      ["../audits/accessibility/aria-dialog-name", Promise.resolve().then(() => (init_aria_dialog_name(), aria_dialog_name_exports))],
      ["../audits/accessibility/aria-hidden-body", Promise.resolve().then(() => (init_aria_hidden_body(), aria_hidden_body_exports))],
      ["../audits/accessibility/aria-hidden-focus", Promise.resolve().then(() => (init_aria_hidden_focus(), aria_hidden_focus_exports))],
      ["../audits/accessibility/aria-input-field-name", Promise.resolve().then(() => (init_aria_input_field_name(), aria_input_field_name_exports))],
      ["../audits/accessibility/aria-meter-name", Promise.resolve().then(() => (init_aria_meter_name(), aria_meter_name_exports))],
      ["../audits/accessibility/aria-progressbar-name", Promise.resolve().then(() => (init_aria_progressbar_name(), aria_progressbar_name_exports))],
      ["../audits/accessibility/aria-prohibited-attr", Promise.resolve().then(() => (init_aria_prohibited_attr(), aria_prohibited_attr_exports))],
      ["../audits/accessibility/aria-required-attr", Promise.resolve().then(() => (init_aria_required_attr(), aria_required_attr_exports))],
      ["../audits/accessibility/aria-required-children", Promise.resolve().then(() => (init_aria_required_children(), aria_required_children_exports))],
      ["../audits/accessibility/aria-required-parent", Promise.resolve().then(() => (init_aria_required_parent(), aria_required_parent_exports))],
      ["../audits/accessibility/aria-roles", Promise.resolve().then(() => (init_aria_roles(), aria_roles_exports))],
      ["../audits/accessibility/aria-text", Promise.resolve().then(() => (init_aria_text(), aria_text_exports))],
      ["../audits/accessibility/aria-toggle-field-name", Promise.resolve().then(() => (init_aria_toggle_field_name(), aria_toggle_field_name_exports))],
      ["../audits/accessibility/aria-tooltip-name", Promise.resolve().then(() => (init_aria_tooltip_name(), aria_tooltip_name_exports))],
      ["../audits/accessibility/aria-treeitem-name", Promise.resolve().then(() => (init_aria_treeitem_name(), aria_treeitem_name_exports))],
      ["../audits/accessibility/aria-valid-attr-value", Promise.resolve().then(() => (init_aria_valid_attr_value(), aria_valid_attr_value_exports))],
      ["../audits/accessibility/aria-valid-attr", Promise.resolve().then(() => (init_aria_valid_attr(), aria_valid_attr_exports))],
      ["../audits/accessibility/button-name", Promise.resolve().then(() => (init_button_name(), button_name_exports))],
      ["../audits/accessibility/bypass", Promise.resolve().then(() => (init_bypass(), bypass_exports))],
      ["../audits/accessibility/color-contrast", Promise.resolve().then(() => (init_color_contrast(), color_contrast_exports))],
      ["../audits/accessibility/definition-list", Promise.resolve().then(() => (init_definition_list(), definition_list_exports))],
      ["../audits/accessibility/dlitem", Promise.resolve().then(() => (init_dlitem(), dlitem_exports))],
      ["../audits/accessibility/document-title", Promise.resolve().then(() => (init_document_title(), document_title_exports))],
      ["../audits/accessibility/duplicate-id-aria", Promise.resolve().then(() => (init_duplicate_id_aria(), duplicate_id_aria_exports))],
      ["../audits/accessibility/empty-heading", Promise.resolve().then(() => (init_empty_heading(), empty_heading_exports))],
      ["../audits/accessibility/form-field-multiple-labels", Promise.resolve().then(() => (init_form_field_multiple_labels(), form_field_multiple_labels_exports))],
      ["../audits/accessibility/frame-title", Promise.resolve().then(() => (init_frame_title(), frame_title_exports))],
      ["../audits/accessibility/heading-order", Promise.resolve().then(() => (init_heading_order(), heading_order_exports))],
      ["../audits/accessibility/html-has-lang", Promise.resolve().then(() => (init_html_has_lang(), html_has_lang_exports))],
      ["../audits/accessibility/html-lang-valid", Promise.resolve().then(() => (init_html_lang_valid(), html_lang_valid_exports))],
      ["../audits/accessibility/html-xml-lang-mismatch", Promise.resolve().then(() => (init_html_xml_lang_mismatch(), html_xml_lang_mismatch_exports))],
      ["../audits/accessibility/identical-links-same-purpose", Promise.resolve().then(() => (init_identical_links_same_purpose(), identical_links_same_purpose_exports))],
      ["../audits/accessibility/image-alt", Promise.resolve().then(() => (init_image_alt(), image_alt_exports))],
      ["../audits/accessibility/image-redundant-alt", Promise.resolve().then(() => (init_image_redundant_alt(), image_redundant_alt_exports))],
      ["../audits/accessibility/input-button-name", Promise.resolve().then(() => (init_input_button_name(), input_button_name_exports))],
      ["../audits/accessibility/input-image-alt", Promise.resolve().then(() => (init_input_image_alt(), input_image_alt_exports))],
      ["../audits/accessibility/label-content-name-mismatch", Promise.resolve().then(() => (init_label_content_name_mismatch(), label_content_name_mismatch_exports))],
      ["../audits/accessibility/label", Promise.resolve().then(() => (init_label(), label_exports))],
      ["../audits/accessibility/landmark-one-main", Promise.resolve().then(() => (init_landmark_one_main(), landmark_one_main_exports))],
      ["../audits/accessibility/link-in-text-block", Promise.resolve().then(() => (init_link_in_text_block(), link_in_text_block_exports))],
      ["../audits/accessibility/link-name", Promise.resolve().then(() => (init_link_name(), link_name_exports))],
      ["../audits/accessibility/list", Promise.resolve().then(() => (init_list(), list_exports))],
      ["../audits/accessibility/listitem", Promise.resolve().then(() => (init_listitem(), listitem_exports))],
      ["../audits/accessibility/manual/custom-controls-labels", Promise.resolve().then(() => (init_custom_controls_labels(), custom_controls_labels_exports))],
      ["../audits/accessibility/manual/custom-controls-roles", Promise.resolve().then(() => (init_custom_controls_roles(), custom_controls_roles_exports))],
      ["../audits/accessibility/manual/focus-traps", Promise.resolve().then(() => (init_focus_traps(), focus_traps_exports))],
      ["../audits/accessibility/manual/focusable-controls", Promise.resolve().then(() => (init_focusable_controls(), focusable_controls_exports))],
      ["../audits/accessibility/manual/interactive-element-affordance", Promise.resolve().then(() => (init_interactive_element_affordance(), interactive_element_affordance_exports))],
      ["../audits/accessibility/manual/logical-tab-order", Promise.resolve().then(() => (init_logical_tab_order(), logical_tab_order_exports))],
      ["../audits/accessibility/manual/managed-focus", Promise.resolve().then(() => (init_managed_focus(), managed_focus_exports))],
      ["../audits/accessibility/manual/offscreen-content-hidden", Promise.resolve().then(() => (init_offscreen_content_hidden(), offscreen_content_hidden_exports))],
      ["../audits/accessibility/manual/use-landmarks", Promise.resolve().then(() => (init_use_landmarks(), use_landmarks_exports))],
      ["../audits/accessibility/manual/visual-order-follows-dom", Promise.resolve().then(() => (init_visual_order_follows_dom(), visual_order_follows_dom_exports))],
      ["../audits/accessibility/meta-refresh", Promise.resolve().then(() => (init_meta_refresh(), meta_refresh_exports))],
      ["../audits/accessibility/meta-viewport", Promise.resolve().then(() => (init_meta_viewport(), meta_viewport_exports))],
      ["../audits/accessibility/object-alt", Promise.resolve().then(() => (init_object_alt(), object_alt_exports))],
      ["../audits/accessibility/select-name", Promise.resolve().then(() => (init_select_name(), select_name_exports))],
      ["../audits/accessibility/skip-link", Promise.resolve().then(() => (init_skip_link(), skip_link_exports))],
      ["../audits/accessibility/tabindex", Promise.resolve().then(() => (init_tabindex(), tabindex_exports))],
      ["../audits/accessibility/table-duplicate-name", Promise.resolve().then(() => (init_table_duplicate_name(), table_duplicate_name_exports))],
      ["../audits/accessibility/table-fake-caption", Promise.resolve().then(() => (init_table_fake_caption(), table_fake_caption_exports))],
      ["../audits/accessibility/target-size", Promise.resolve().then(() => (init_target_size(), target_size_exports))],
      ["../audits/accessibility/td-has-header", Promise.resolve().then(() => (init_td_has_header(), td_has_header_exports))],
      ["../audits/accessibility/td-headers-attr", Promise.resolve().then(() => (init_td_headers_attr(), td_headers_attr_exports))],
      ["../audits/accessibility/th-has-data-cells", Promise.resolve().then(() => (init_th_has_data_cells(), th_has_data_cells_exports))],
      ["../audits/accessibility/valid-lang", Promise.resolve().then(() => (init_valid_lang(), valid_lang_exports))],
      ["../audits/accessibility/video-caption", Promise.resolve().then(() => (init_video_caption(), video_caption_exports))],
      ["../audits/clickjacking-mitigation", Promise.resolve().then(() => (init_clickjacking_mitigation(), clickjacking_mitigation_exports))],
      ["../audits/csp-xss", Promise.resolve().then(() => (init_csp_xss(), csp_xss_exports))],
      ["../audits/deprecations", Promise.resolve().then(() => (init_deprecations(), deprecations_exports))],
      ["../audits/dobetterweb/charset", Promise.resolve().then(() => (init_charset(), charset_exports))],
      ["../audits/dobetterweb/doctype", Promise.resolve().then(() => (init_doctype2(), doctype_exports2))],
      ["../audits/dobetterweb/geolocation-on-start", Promise.resolve().then(() => (init_geolocation_on_start(), geolocation_on_start_exports))],
      ["../audits/dobetterweb/inspector-issues", Promise.resolve().then(() => (init_inspector_issues2(), inspector_issues_exports2))],
      ["../audits/dobetterweb/js-libraries", Promise.resolve().then(() => (init_js_libraries(), js_libraries_exports))],
      ["../audits/dobetterweb/notification-on-start", Promise.resolve().then(() => (init_notification_on_start(), notification_on_start_exports))],
      ["../audits/dobetterweb/paste-preventing-inputs", Promise.resolve().then(() => (init_paste_preventing_inputs(), paste_preventing_inputs_exports))],
      ["../audits/errors-in-console", Promise.resolve().then(() => (init_errors_in_console(), errors_in_console_exports))],
      ["../audits/has-hsts", Promise.resolve().then(() => (init_has_hsts(), has_hsts_exports))],
      ["../audits/image-aspect-ratio", Promise.resolve().then(() => (init_image_aspect_ratio(), image_aspect_ratio_exports))],
      ["../audits/image-size-responsive", Promise.resolve().then(() => (init_image_size_responsive(), image_size_responsive_exports))],
      ["../audits/is-on-https", Promise.resolve().then(() => (init_is_on_https(), is_on_https_exports))],
      ["../audits/origin-isolation", Promise.resolve().then(() => (init_origin_isolation(), origin_isolation_exports))],
      ["../audits/redirects-http", Promise.resolve().then(() => (init_redirects_http(), redirects_http_exports))],
      ["../audits/seo/canonical", Promise.resolve().then(() => (init_canonical(), canonical_exports))],
      ["../audits/seo/crawlable-anchors", Promise.resolve().then(() => (init_crawlable_anchors(), crawlable_anchors_exports))],
      ["../audits/seo/hreflang", Promise.resolve().then(() => (init_hreflang(), hreflang_exports))],
      ["../audits/seo/http-status-code", Promise.resolve().then(() => (init_http_status_code(), http_status_code_exports))],
      ["../audits/seo/is-crawlable", Promise.resolve().then(() => (init_is_crawlable(), is_crawlable_exports))],
      ["../audits/seo/link-text", Promise.resolve().then(() => (init_link_text(), link_text_exports))],
      ["../audits/seo/manual/structured-data", Promise.resolve().then(() => (init_structured_data(), structured_data_exports))],
      ["../audits/seo/meta-description", Promise.resolve().then(() => (init_meta_description(), meta_description_exports))],
      ["../audits/seo/robots-txt", Promise.resolve().then(() => (init_robots_txt2(), robots_txt_exports2))],
      ["../audits/third-party-cookies", Promise.resolve().then(() => (init_third_party_cookies(), third_party_cookies_exports))],
      ["../audits/trusted-types-xss", Promise.resolve().then(() => (init_trusted_types_xss(), trusted_types_xss_exports))],
      ["../audits/valid-source-maps", Promise.resolve().then(() => (init_valid_source_maps(), valid_source_maps_exports))],
      ["../computed/speedline", Promise.resolve().then(() => (init_speedline(), speedline_exports))],
      ["../computed/metrics/timing-summary", Promise.resolve().then(() => (init_timing_summary(), timing_summary_exports))],
      ["../computed/entity-classification", Promise.resolve().then(() => (init_entity_classification(), entity_classification_exports))],
      ["../computed/trace-engine-result", Promise.resolve().then(() => (init_trace_engine_result(), trace_engine_result_exports))],
      ["../gather/gatherers/bf-cache-failures", Promise.resolve().then(() => (init_bf_cache_failures(), bf_cache_failures_exports))],
      ["../gather/gatherers/css-usage", Promise.resolve().then(() => (init_css_usage(), css_usage_exports))],
      ["../gather/gatherers/full-page-screenshot", Promise.resolve().then(() => (init_full_page_screenshot(), full_page_screenshot_exports))],
      ["../gather/gatherers/iframe-elements", Promise.resolve().then(() => (init_iframe_elements(), iframe_elements_exports))],
      ["../gather/gatherers/js-usage", Promise.resolve().then(() => (init_js_usage(), js_usage_exports))],
      ["../gather/gatherers/network-user-agent", Promise.resolve().then(() => (init_network_user_agent(), network_user_agent_exports))],
      ["../gather/gatherers/stylesheets", Promise.resolve().then(() => (init_stylesheets(), stylesheets_exports))],
      ["../gather/gatherers/trace-elements", Promise.resolve().then(() => (init_trace_elements(), trace_elements_exports))],
      ["../gather/gatherers/trace", Promise.resolve().then(() => (init_trace(), trace_exports))],
      ["../audits/autocomplete", Promise.resolve().then(() => (init_autocomplete(), autocomplete_exports))],
      ["../audits/bf-cache", Promise.resolve().then(() => (init_bf_cache(), bf_cache_exports))],
      ["../audits/bootup-time", Promise.resolve().then(() => (init_bootup_time(), bootup_time_exports))],
      ["../audits/byte-efficiency/total-byte-weight", Promise.resolve().then(() => (init_total_byte_weight(), total_byte_weight_exports))],
      ["../audits/byte-efficiency/unminified-css", Promise.resolve().then(() => (init_unminified_css(), unminified_css_exports))],
      ["../audits/byte-efficiency/unminified-javascript", Promise.resolve().then(() => (init_unminified_javascript(), unminified_javascript_exports))],
      ["../audits/byte-efficiency/unused-css-rules", Promise.resolve().then(() => (init_unused_css_rules(), unused_css_rules_exports))],
      ["../audits/byte-efficiency/unused-javascript", Promise.resolve().then(() => (init_unused_javascript(), unused_javascript_exports))],
      ["../audits/diagnostics", Promise.resolve().then(() => (init_diagnostics(), diagnostics_exports))],
      ["../audits/final-screenshot", Promise.resolve().then(() => (init_final_screenshot(), final_screenshot_exports))],
      ["../audits/insights/cache-insight", Promise.resolve().then(() => (init_cache_insight(), cache_insight_exports))],
      ["../audits/insights/cls-culprits-insight", Promise.resolve().then(() => (init_cls_culprits_insight(), cls_culprits_insight_exports))],
      ["../audits/insights/document-latency-insight", Promise.resolve().then(() => (init_document_latency_insight(), document_latency_insight_exports))],
      ["../audits/insights/dom-size-insight", Promise.resolve().then(() => (init_dom_size_insight(), dom_size_insight_exports))],
      ["../audits/insights/duplicated-javascript-insight", Promise.resolve().then(() => (init_duplicated_javascript_insight(), duplicated_javascript_insight_exports))],
      ["../audits/insights/font-display-insight", Promise.resolve().then(() => (init_font_display_insight(), font_display_insight_exports))],
      ["../audits/insights/forced-reflow-insight", Promise.resolve().then(() => (init_forced_reflow_insight(), forced_reflow_insight_exports))],
      ["../audits/insights/image-delivery-insight", Promise.resolve().then(() => (init_image_delivery_insight(), image_delivery_insight_exports))],
      ["../audits/insights/inp-breakdown-insight", Promise.resolve().then(() => (init_inp_breakdown_insight(), inp_breakdown_insight_exports))],
      ["../audits/insights/lcp-breakdown-insight", Promise.resolve().then(() => (init_lcp_breakdown_insight(), lcp_breakdown_insight_exports))],
      ["../audits/insights/lcp-discovery-insight", Promise.resolve().then(() => (init_lcp_discovery_insight(), lcp_discovery_insight_exports))],
      ["../audits/insights/legacy-javascript-insight", Promise.resolve().then(() => (init_legacy_javascript_insight(), legacy_javascript_insight_exports))],
      ["../audits/insights/modern-http-insight", Promise.resolve().then(() => (init_modern_http_insight(), modern_http_insight_exports))],
      ["../audits/insights/network-dependency-tree-insight", Promise.resolve().then(() => (init_network_dependency_tree_insight(), network_dependency_tree_insight_exports))],
      ["../audits/insights/render-blocking-insight", Promise.resolve().then(() => (init_render_blocking_insight(), render_blocking_insight_exports))],
      ["../audits/insights/slow-css-selector-insight", Promise.resolve().then(() => (init_slow_css_selector_insight(), slow_css_selector_insight_exports))],
      ["../audits/insights/third-parties-insight", Promise.resolve().then(() => (init_third_parties_insight(), third_parties_insight_exports))],
      ["../audits/insights/viewport-insight", Promise.resolve().then(() => (init_viewport_insight(), viewport_insight_exports))],
      ["../audits/layout-shifts", Promise.resolve().then(() => (init_layout_shifts(), layout_shifts_exports))],
      ["../audits/long-tasks", Promise.resolve().then(() => (init_long_tasks(), long_tasks_exports))],
      ["../audits/main-thread-tasks", Promise.resolve().then(() => (init_main_thread_tasks(), main_thread_tasks_exports))],
      ["../audits/mainthread-work-breakdown", Promise.resolve().then(() => (init_mainthread_work_breakdown(), mainthread_work_breakdown_exports))],
      ["../audits/metrics", Promise.resolve().then(() => (init_metrics2(), metrics_exports2))],
      ["../audits/metrics/cumulative-layout-shift", Promise.resolve().then(() => (init_cumulative_layout_shift(), cumulative_layout_shift_exports))],
      ["../audits/metrics/first-contentful-paint", Promise.resolve().then(() => (init_first_contentful_paint(), first_contentful_paint_exports))],
      ["../audits/metrics/interaction-to-next-paint", Promise.resolve().then(() => (init_interaction_to_next_paint(), interaction_to_next_paint_exports))],
      ["../audits/metrics/interactive", Promise.resolve().then(() => (init_interactive(), interactive_exports))],
      ["../audits/metrics/largest-contentful-paint", Promise.resolve().then(() => (init_largest_contentful_paint(), largest_contentful_paint_exports))],
      ["../audits/metrics/max-potential-fid", Promise.resolve().then(() => (init_max_potential_fid(), max_potential_fid_exports))],
      ["../audits/metrics/speed-index", Promise.resolve().then(() => (init_speed_index(), speed_index_exports))],
      ["../audits/metrics/total-blocking-time", Promise.resolve().then(() => (init_total_blocking_time(), total_blocking_time_exports))],
      ["../audits/network-requests", Promise.resolve().then(() => (init_network_requests(), network_requests_exports))],
      ["../audits/network-rtt", Promise.resolve().then(() => (init_network_rtt(), network_rtt_exports))],
      ["../audits/network-server-latency", Promise.resolve().then(() => (init_network_server_latency(), network_server_latency_exports))],
      ["../audits/non-composited-animations", Promise.resolve().then(() => (init_non_composited_animations(), non_composited_animations_exports))],
      ["../audits/oopif-iframe-test-audit", Promise.resolve().then(() => (init_oopif_iframe_test_audit(), oopif_iframe_test_audit_exports))],
      ["../audits/predictive-perf", Promise.resolve().then(() => (init_predictive_perf(), predictive_perf_exports))],
      ["../audits/redirects", Promise.resolve().then(() => (init_redirects(), redirects_exports))],
      ["../audits/resource-summary", Promise.resolve().then(() => (init_resource_summary(), resource_summary_exports))],
      ["../audits/screenshot-thumbnails", Promise.resolve().then(() => (init_screenshot_thumbnails(), screenshot_thumbnails_exports))],
      ["../audits/script-treemap-data", Promise.resolve().then(() => (init_script_treemap_data(), script_treemap_data_exports))],
      ["../audits/server-response-time", Promise.resolve().then(() => (init_server_response_time(), server_response_time_exports))],
      ["../audits/unsized-images", Promise.resolve().then(() => (init_unsized_images(), unsized_images_exports))],
      ["../audits/user-timings", Promise.resolve().then(() => (init_user_timings(), user_timings_exports))]
    ]);
    __name(requireWrapper, "requireWrapper");
    __name(requireGatherer, "requireGatherer");
    __name(requireAudit, "requireAudit");
    __name(cleanFlagsForSettings, "cleanFlagsForSettings");
    __name(resolveSettings, "resolveSettings");
    __name(mergePlugins, "mergePlugins");
    __name(resolveGathererToDefn, "resolveGathererToDefn");
    __name(resolveAuditsToDefns, "resolveAuditsToDefns");
    __name(resolveModulePath, "resolveModulePath");
    __name(shallowClone, "shallowClone");
    __name(deepClone, "deepClone");
    __name(deepCloneConfigJson, "deepCloneConfigJson");
    init_esm_utils();
    init_format();
    defaultConfigPath = path5.join("", "../../config/default-config.js");
    internalArtifactPriorities = {
      FullPageScreenshot: 1,
      BFCacheFailures: 1
    };
    __name(resolveWorkingCopy, "resolveWorkingCopy");
    __name(resolveExtensions, "resolveExtensions");
    __name(resolveArtifactDependencies, "resolveArtifactDependencies");
    __name(resolveArtifactsToDefns, "resolveArtifactsToDefns");
    __name(overrideSettingsForGatherMode, "overrideSettingsForGatherMode");
    __name(overrideThrottlingWindows, "overrideThrottlingWindows");
    __name(initializeConfig, "initializeConfig");
    SENTRY_URL = "https://a6bb0da87ee048cc9ae2a345fc09ab2e:63a7029f46f74265981b7e005e0f69f8@sentry.io/174697";
    SAMPLE_RATE = 0.01;
    noop = /* @__PURE__ */ __name(() => {
    }, "noop");
    sentryDelegate = {
      init,
      /** @type {(message: string, level?: SeverityLevel) => void} */
      captureMessage: noop,
      /** @type {(breadcrumb: Breadcrumb) => void} */
      captureBreadcrumb: noop,
      /** @type {() => any} */
      getContext: noop,
      /** @type {(error: Error, options: {level?: string, tags?: {[key: string]: any}, extra?: {[key: string]: any}}) => Promise<void>} */
      captureException: /* @__PURE__ */ __name(async () => {
      }, "captureException"),
      _shouldSample() {
        return SAMPLE_RATE >= Math.random();
      }
    };
    __name(init, "init");
    Sentry = sentryDelegate;
    init_process_global();
    init_process_global();
    reportAssets = {
      REPORT_TEMPLATE: `<!--
@license
Copyright 2018 Google LLC
SPDX-License-Identifier: Apache-2.0
-->
<!doctype html>
<html lang="en">
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1">
  <link rel="icon" href='data:image/svg+xml;utf8,<svg fill="none" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 48 48"><path d="m14 7 10-7 10 7v10h5v7h-5l5 24H9l5-24H9v-7h5V7Z" fill="%23F63"/><path d="M31.561 24H14l-1.689 8.105L31.561 24ZM18.983 48H9l1.022-4.907L35.723 32.27l1.663 7.98L18.983 48Z" fill="%23FFA385"/><path fill="%23FF3" d="M20.5 10h7v7h-7z"/></svg>'>
  <title>Lighthouse Report</title>
  <style>body {margin: 0}</style>
</head>
<body>
  <noscript>Lighthouse report requires JavaScript. Please enable.</noscript>

  <div id="lh-log"></div>

  <script>window.__LIGHTHOUSE_JSON__ = %%LIGHTHOUSE_JSON%%;</script>
  <script>%%LIGHTHOUSE_JAVASCRIPT%%
  __initLighthouseReport__();
  //# sourceURL=compiled-reportrenderer.js
  </script>
  <script>console.log('window.__LIGHTHOUSE_JSON__', __LIGHTHOUSE_JSON__);</script>
</body>
</html>
`,
      REPORT_JAVASCRIPT: '"use strict";(()=>{var Re=.8999999999999999,Ne=.5,Ie=.49999999999999994;function He(o){let e=Math.sign(o);o=Math.abs(o);let t=.254829592,n=-.284496736,r=1.421413741,i=-1.453152027,a=1.061405429,s=1/(1+.3275911*o),c=s*(t+s*(n+s*(r+s*(i+s*a))));return e*(1-c*Math.exp(-o*o))}function fe({median:o,p10:e},t){if(o<=0)throw new Error("median must be greater than zero");if(e<=0)throw new Error("p10 must be greater than zero");if(e>=o)throw new Error("p10 must be less than the median");if(t<=0)return 1;let n=.9061938024368232,r=Math.max(Number.MIN_VALUE,t/o),i=Math.log(r),a=Math.max(Number.MIN_VALUE,e/o),l=-Math.log(a),s=i*n/l,c=(1-He(s))/2,d;return t<=e?d=Math.max(.9,Math.min(1,c)):t<=o?d=Math.max(Ne,Math.min(Re,c)):d=Math.max(0,Math.min(Ie,c)),d}var U="\\u2026",Oe="\\xA0",ve=.9,$e={PASS:{label:"pass",minScore:ve},AVERAGE:{label:"average",minScore:.5},FAIL:{label:"fail"},ERROR:{label:"error"}},Ve=["com","co","gov","edu","ac","org","go","gob","or","net","in","ne","nic","gouv","web","spb","blog","jus","kiev","mil","wi","qc","ca","bel","on"],E=class o{static get RATINGS(){return $e}static get PASS_THRESHOLD(){return ve}static get MS_DISPLAY_VALUE(){return`%10d${Oe}ms`}static getFinalDisplayedUrl(e){if(e.finalDisplayedUrl)return e.finalDisplayedUrl;if(e.finalUrl)return e.finalUrl;throw new Error("Could not determine final displayed URL")}static getMainDocumentUrl(e){return e.mainDocumentUrl||e.finalUrl}static getFullPageScreenshot(e){return e.fullPageScreenshot?e.fullPageScreenshot:e.audits["full-page-screenshot"]?.details}static getEntityFromUrl(e,t){return t&&t.find(r=>r.origins.find(i=>e.startsWith(i)))||o.getPseudoRootDomain(e)}static splitMarkdownCodeSpans(e){let t=[],n=e.split(/`(.*?)`/g);for(let r=0;r<n.length;r++){let i=n[r];if(!i)continue;let a=r%2!==0;t.push({isCode:a,text:i})}return t}static splitMarkdownLink(e){let t=[],n=e.split(/\\[([^\\]]+?)\\]\\((https?:\\/\\/.*?)\\)/g);for(;n.length;){let[r,i,a]=n.splice(0,3);r&&t.push({isLink:!1,text:r}),i&&a&&t.push({isLink:!0,text:i,linkHref:a})}return t}static truncate(e,t,n="\\u2026"){if(e.length<=t)return e;let i=new Intl.Segmenter(void 0,{granularity:"grapheme"}).segment(e)[Symbol.iterator](),a=0;for(let l=0;l<=t-n.length;l++){let s=i.next();if(s.done)return e;a=s.value.index}for(let l=0;l<n.length;l++)if(i.next().done)return e;return e.slice(0,a)+n}static getURLDisplayName(e,t){t=t||{numPathParts:void 0,preserveQuery:void 0,preserveHost:void 0};let n=t.numPathParts!==void 0?t.numPathParts:2,r=t.preserveQuery!==void 0?t.preserveQuery:!0,i=t.preserveHost||!1,a;if(e.protocol==="about:"||e.protocol==="data:")a=e.href;else{a=e.pathname;let s=a.split("/").filter(c=>c.length);n&&s.length>n&&(a=U+s.slice(-1*n).join("/")),i&&(a=`${e.host}/${a.replace(/^\\//,"")}`),r&&(a=`${a}${e.search}`)}let l=64;if(e.protocol!=="data:"&&(a=a.slice(0,200),a=a.replace(/([a-f0-9]{7})[a-f0-9]{13}[a-f0-9]*/g,`$1${U}`),a=a.replace(/([a-zA-Z0-9-_]{9})(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])[a-zA-Z0-9-_]{10,}/g,`$1${U}`),a=a.replace(/(\\d{3})\\d{6,}/g,`$1${U}`),a=a.replace(/\\u2026+/g,U),a.length>l&&a.includes("?")&&(a=a.replace(/\\?([^=]*)(=)?.*/,`?$1$2${U}`),a.length>l&&(a=a.replace(/\\?.*/,`?${U}`)))),a.length>l){let s=a.lastIndexOf(".");s>=0?a=a.slice(0,l-1-(a.length-s))+`${U}${a.slice(s)}`:a=a.slice(0,l-1)+U}return a}static getChromeExtensionOrigin(e){let t=new URL(e);return t.protocol+"//"+t.host}static parseURL(e){let t=new URL(e);return{file:o.getURLDisplayName(t),hostname:t.hostname,origin:t.protocol==="chrome-extension:"?o.getChromeExtensionOrigin(e):t.origin}}static createOrReturnURL(e){return e instanceof URL?e:new URL(e)}static getPseudoTld(e){let t=e.split(".").slice(-2);return Ve.includes(t[0])?`.${t.join(".")}`:`.${t[t.length-1]}`}static getPseudoRootDomain(e){let t=o.createOrReturnURL(e).hostname,r=o.getPseudoTld(t).split(".");return t.split(".").slice(-r.length).join(".")}static filterRelevantLines(e,t,n){if(t.length===0)return e.slice(0,n*2+1);let r=3,i=new Set;return t=t.sort((a,l)=>(a.lineNumber||0)-(l.lineNumber||0)),t.forEach(({lineNumber:a})=>{let l=a-n,s=a+n;for(;l<1;)l++,s++;i.has(l-r-1)&&(l-=r);for(let c=l;c<=s;c++){let d=c;i.add(d)}}),e.filter(a=>i.has(a.lineNumber))}static computeLogNormalScore(e,t){let n=fe(e,t);return n>.9&&(n+=.05*(n-.9)),Math.floor(n*100)/100}};function Ge(o){let e=o.createFragment(),t=o.createElement("style");t.append(`\n    .lh-3p-filter {\n      color: var(--color-gray-600);\n      float: right;\n      padding: 6px var(--stackpack-padding-horizontal);\n    }\n    .lh-3p-filter-label, .lh-3p-filter-input {\n      vertical-align: middle;\n      user-select: none;\n    }\n    .lh-3p-filter-input:disabled + .lh-3p-ui-string {\n      text-decoration: line-through;\n    }\n  `),e.append(t);let n=o.createElement("div","lh-3p-filter"),r=o.createElement("label","lh-3p-filter-label"),i=o.createElement("input","lh-3p-filter-input");i.setAttribute("type","checkbox"),i.setAttribute("checked","");let a=o.createElement("span","lh-3p-ui-string");a.append("Show 3rd party resources");let l=o.createElement("span","lh-3p-filter-count");return r.append(" ",i," ",a," (",l,") "),n.append(" ",r," "),e.append(n),e}function Be(o){let e=o.createFragment(),t=o.createElement("div","lh-audit"),n=o.createElement("details","lh-expandable-details"),r=o.createElement("summary"),i=o.createElement("div","lh-audit__header lh-expandable-details__summary"),a=o.createElement("span","lh-audit__score-icon"),l=o.createElement("span","lh-audit__title-and-text"),s=o.createElement("span","lh-audit__title"),c=o.createElement("span","lh-audit__display-text");l.append(" ",s," ",c," ");let d=o.createElement("div","lh-chevron-container");i.append(" ",a," ",l," ",d," "),r.append(" ",i," ");let h=o.createElement("div","lh-audit__description"),p=o.createElement("div","lh-audit__stackpacks");return n.append(" ",r," ",h," ",p," "),t.append(" ",n," "),e.append(t),e}function qe(o){let e=o.createFragment(),t=o.createElement("div","lh-category-header"),n=o.createElement("div","lh-score__gauge");n.setAttribute("role","heading"),n.setAttribute("aria-level","2");let r=o.createElement("div","lh-category-header__description");return t.append(" ",n," ",r," "),e.append(t),e}function je(o){let e=o.createFragment(),t=o.createElementNS("http://www.w3.org/2000/svg","svg","lh-chevron");t.setAttribute("viewBox","0 0 100 100");let n=o.createElementNS("http://www.w3.org/2000/svg","g","lh-chevron__lines"),r=o.createElementNS("http://www.w3.org/2000/svg","path","lh-chevron__line lh-chevron__line-left");r.setAttribute("d","M10 50h40");let i=o.createElementNS("http://www.w3.org/2000/svg","path","lh-chevron__line lh-chevron__line-right");return i.setAttribute("d","M90 50H50"),n.append(" ",r," ",i," "),t.append(" ",n," "),e.append(t),e}function We(o){let e=o.createFragment(),t=o.createElement("div","lh-audit-group"),n=o.createElement("details","lh-clump"),r=o.createElement("summary"),i=o.createElement("div","lh-audit-group__summary"),a=o.createElement("div","lh-audit-group__header"),l=o.createElement("span","lh-audit-group__title"),s=o.createElement("span","lh-audit-group__itemcount");a.append(" ",l," ",s," "," "," ");let c=o.createElement("div","lh-clump-toggle"),d=o.createElement("span","lh-clump-toggletext--show"),h=o.createElement("span","lh-clump-toggletext--hide");return c.append(" ",d," ",h," "),i.append(" ",a," ",c," "),r.append(" ",i," "),n.append(" ",r," "),t.append(" "," ",n," "),e.append(t),e}function Ke(o){let e=o.createFragment(),t=o.createElement("div","lh-crc-container"),n=o.createElement("style");n.append(`\n      .lh-crc .lh-tree-marker {\n        width: 12px;\n        height: 26px;\n        display: block;\n        float: left;\n        background-position: top left;\n      }\n      .lh-crc .lh-horiz-down {\n        background: url(\'data:image/svg+xml;utf8,<svg width="16" height="26" viewBox="0 0 16 26" xmlns="http://www.w3.org/2000/svg"><g fill="%23D8D8D8" fill-rule="evenodd"><path d="M16 12v2H-2v-2z"/><path d="M9 12v14H7V12z"/></g></svg>\');\n      }\n      .lh-crc .lh-right {\n        background: url(\'data:image/svg+xml;utf8,<svg width="16" height="26" viewBox="0 0 16 26" xmlns="http://www.w3.org/2000/svg"><path d="M16 12v2H0v-2z" fill="%23D8D8D8" fill-rule="evenodd"/></svg>\');\n      }\n      .lh-crc .lh-up-right {\n        background: url(\'data:image/svg+xml;utf8,<svg width="16" height="26" viewBox="0 0 16 26" xmlns="http://www.w3.org/2000/svg"><path d="M7 0h2v14H7zm2 12h7v2H9z" fill="%23D8D8D8" fill-rule="evenodd"/></svg>\');\n      }\n      .lh-crc .lh-vert-right {\n        background: url(\'data:image/svg+xml;utf8,<svg width="16" height="26" viewBox="0 0 16 26" xmlns="http://www.w3.org/2000/svg"><path d="M7 0h2v27H7zm2 12h7v2H9z" fill="%23D8D8D8" fill-rule="evenodd"/></svg>\');\n      }\n      .lh-crc .lh-vert {\n        background: url(\'data:image/svg+xml;utf8,<svg width="16" height="26" viewBox="0 0 16 26" xmlns="http://www.w3.org/2000/svg"><path d="M7 0h2v26H7z" fill="%23D8D8D8" fill-rule="evenodd"/></svg>\');\n      }\n      .lh-crc .lh-crc-tree {\n        font-size: 14px;\n        width: 100%;\n        overflow-x: auto;\n      }\n      .lh-crc .lh-crc-node {\n        height: 26px;\n        line-height: 26px;\n        white-space: nowrap;\n      }\n      .lh-crc .lh-crc-node__longest {\n        color: var(--color-average-secondary);\n      }\n      .lh-crc .lh-crc-node__tree-value {\n        margin-left: 10px;\n      }\n      .lh-crc .lh-crc-node__tree-value div {\n        display: inline;\n      }\n      .lh-crc .lh-crc-node__chain-duration {\n        font-weight: 700;\n      }\n      .lh-crc .lh-crc-initial-nav {\n        color: #595959;\n        font-style: italic;\n      }\n      .lh-crc__summary-value {\n        margin-bottom: 10px;\n      }\n    `);let r=o.createElement("div"),i=o.createElement("div","lh-crc__summary-value"),a=o.createElement("span","lh-crc__longest_duration_label"),l=o.createElement("b","lh-crc__longest_duration");i.append(" ",a," ",l," "),r.append(" ",i," ");let s=o.createElement("div","lh-crc"),c=o.createElement("div","lh-crc-initial-nav");return s.append(" ",c," "," "),t.append(" ",n," ",r," ",s," "),e.append(t),e}function Je(o){let e=o.createFragment(),t=o.createElement("div","lh-crc-node"),n=o.createElement("span","lh-crc-node__tree-marker"),r=o.createElement("span","lh-crc-node__tree-value");return t.append(" ",n," ",r," "),e.append(t),e}function Ze(o){let e=o.createFragment(),t=o.createElement("div","lh-element-screenshot"),n=o.createElement("div","lh-element-screenshot__content"),r=o.createElement("div","lh-element-screenshot__image"),i=o.createElement("div","lh-element-screenshot__mask"),a=o.createElementNS("http://www.w3.org/2000/svg","svg");a.setAttribute("height","0"),a.setAttribute("width","0");let l=o.createElementNS("http://www.w3.org/2000/svg","defs"),s=o.createElementNS("http://www.w3.org/2000/svg","clipPath");s.setAttribute("clipPathUnits","objectBoundingBox"),l.append(" ",s," "," "),a.append(" ",l," "),i.append(" ",a," ");let c=o.createElement("div","lh-element-screenshot__element-marker");return r.append(" ",i," ",c," "),n.append(" ",r," "),t.append(" ",n," "),e.append(t),e}function Qe(o){let e=o.createFragment(),t=o.createElement("div","lh-exp-gauge-component"),n=o.createElement("div","lh-exp-gauge__wrapper");n.setAttribute("target","_blank");let r=o.createElement("div","lh-exp-gauge__svg-wrapper"),i=o.createElementNS("http://www.w3.org/2000/svg","svg","lh-exp-gauge"),a=o.createElementNS("http://www.w3.org/2000/svg","g","lh-exp-gauge__inner"),l=o.createElementNS("http://www.w3.org/2000/svg","circle","lh-exp-gauge__bg"),s=o.createElementNS("http://www.w3.org/2000/svg","circle","lh-exp-gauge__base lh-exp-gauge--faded"),c=o.createElementNS("http://www.w3.org/2000/svg","circle","lh-exp-gauge__arc"),d=o.createElementNS("http://www.w3.org/2000/svg","text","lh-exp-gauge__percentage");a.append(" ",l," ",s," ",c," ",d," ");let h=o.createElementNS("http://www.w3.org/2000/svg","g","lh-exp-gauge__outer"),p=o.createElementNS("http://www.w3.org/2000/svg","circle","lh-cover");h.append(" ",p," ");let g=o.createElementNS("http://www.w3.org/2000/svg","text","lh-exp-gauge__label");return g.setAttribute("text-anchor","middle"),g.setAttribute("x","0"),g.setAttribute("y","60"),i.append(" ",a," ",h," ",g," "),r.append(" ",i," "),n.append(" ",r," "),t.append(" ",n," "),e.append(t),e}function Ye(o){let e=o.createFragment(),t=o.createElement("style");t.append(`\n    .lh-footer {\n      padding: var(--footer-padding-vertical) calc(var(--default-padding) * 2);\n      max-width: var(--report-content-max-width);\n      margin: 0 auto;\n    }\n    .lh-footer .lh-generated {\n      text-align: center;\n    }\n  `),e.append(t);let n=o.createElement("footer","lh-footer"),r=o.createElement("ul","lh-meta__items");r.append(" ");let i=o.createElement("div","lh-generated"),a=o.createElement("b");a.append("Lighthouse");let l=o.createElement("span","lh-footer__version"),s=o.createElement("a","lh-footer__version_issue");return s.setAttribute("href","https://github.com/GoogleChrome/Lighthouse/issues"),s.setAttribute("target","_blank"),s.setAttribute("rel","noopener"),s.append("File an issue"),i.append(" "," Generated by ",a," ",l," | ",s," "),n.append(" ",r," ",i," "),e.append(n),e}function Xe(o){let e=o.createFragment(),t=o.createElement("a","lh-fraction__wrapper"),n=o.createElement("div","lh-fraction__content-wrapper"),r=o.createElement("div","lh-fraction__content"),i=o.createElement("div","lh-fraction__background");r.append(" ",i," "),n.append(" ",r," ");let a=o.createElement("div","lh-fraction__label");return t.append(" ",n," ",a," "),e.append(t),e}function et(o){let e=o.createFragment(),t=o.createElement("a","lh-gauge__wrapper"),n=o.createElement("div","lh-gauge__svg-wrapper"),r=o.createElementNS("http://www.w3.org/2000/svg","svg","lh-gauge");r.setAttribute("viewBox","0 0 120 120");let i=o.createElementNS("http://www.w3.org/2000/svg","circle","lh-gauge-base");i.setAttribute("r","56"),i.setAttribute("cx","60"),i.setAttribute("cy","60"),i.setAttribute("stroke-width","8");let a=o.createElementNS("http://www.w3.org/2000/svg","circle","lh-gauge-arc");a.setAttribute("r","56"),a.setAttribute("cx","60"),a.setAttribute("cy","60"),a.setAttribute("stroke-width","8"),r.append(" ",i," ",a," "),n.append(" ",r," ");let l=o.createElement("div","lh-gauge__percentage"),s=o.createElement("div","lh-gauge__label");return t.append(" "," ",n," ",l," "," ",s," "),e.append(t),e}function tt(o){let e=o.createFragment(),t=o.createElement("style");t.append(`\n    /* CSS Fireworks. Originally by Eddie Lin\n       https://codepen.io/paulirish/pen/yEVMbP\n    */\n    .lh-pyro {\n      display: none;\n      z-index: 1;\n      pointer-events: none;\n    }\n    .lh-score100 .lh-pyro {\n      display: block;\n    }\n    .lh-score100 .lh-lighthouse stop:first-child {\n      stop-color: hsla(200, 12%, 95%, 0);\n    }\n    .lh-score100 .lh-lighthouse stop:last-child {\n      stop-color: hsla(65, 81%, 76%, 1);\n    }\n\n    .lh-pyro > .lh-pyro-before, .lh-pyro > .lh-pyro-after {\n      position: absolute;\n      width: 5px;\n      height: 5px;\n      border-radius: 2.5px;\n      box-shadow: 0 0 #fff, 0 0 #fff, 0 0 #fff, 0 0 #fff, 0 0 #fff, 0 0 #fff, 0 0 #fff, 0 0 #fff, 0 0 #fff, 0 0 #fff, 0 0 #fff, 0 0 #fff, 0 0 #fff, 0 0 #fff, 0 0 #fff, 0 0 #fff, 0 0 #fff, 0 0 #fff, 0 0 #fff, 0 0 #fff, 0 0 #fff, 0 0 #fff, 0 0 #fff, 0 0 #fff, 0 0 #fff, 0 0 #fff, 0 0 #fff, 0 0 #fff, 0 0 #fff, 0 0 #fff, 0 0 #fff, 0 0 #fff, 0 0 #fff, 0 0 #fff, 0 0 #fff, 0 0 #fff, 0 0 #fff, 0 0 #fff, 0 0 #fff, 0 0 #fff, 0 0 #fff, 0 0 #fff, 0 0 #fff, 0 0 #fff, 0 0 #fff, 0 0 #fff, 0 0 #fff, 0 0 #fff, 0 0 #fff, 0 0 #fff, 0 0 #fff;\n      animation: 1s bang ease-out infinite backwards,  1s gravity ease-in infinite backwards,  5s position linear infinite backwards;\n      animation-delay: 1s, 1s, 1s;\n    }\n\n    .lh-pyro > .lh-pyro-after {\n      animation-delay: 2.25s, 2.25s, 2.25s;\n      animation-duration: 1.25s, 1.25s, 6.25s;\n    }\n\n    @keyframes bang {\n      to {\n        opacity: 1;\n        box-shadow: -70px -115.67px #47ebbc, -28px -99.67px #eb47a4, 58px -31.67px #7eeb47, 13px -141.67px #eb47c5, -19px 6.33px #7347eb, -2px -74.67px #ebd247, 24px -151.67px #eb47e0, 57px -138.67px #b4eb47, -51px -104.67px #479eeb, 62px 8.33px #ebcf47, -93px 0.33px #d547eb, -16px -118.67px #47bfeb, 53px -84.67px #47eb83, 66px -57.67px #eb47bf, -93px -65.67px #91eb47, 30px -13.67px #86eb47, -2px -59.67px #83eb47, -44px 1.33px #eb47eb, 61px -58.67px #47eb73, 5px -22.67px #47e8eb, -66px -28.67px #ebe247, 42px -123.67px #eb5547, -75px 26.33px #7beb47, 15px -52.67px #a147eb, 36px -51.67px #eb8347, -38px -12.67px #eb5547, -46px -59.67px #47eb81, 78px -114.67px #eb47ba, 15px -156.67px #eb47bf, -36px 1.33px #eb4783, -72px -86.67px #eba147, 31px -46.67px #ebe247, -68px 29.33px #47e2eb, -55px 19.33px #ebe047, -56px 27.33px #4776eb, -13px -91.67px #eb5547, -47px -138.67px #47ebc7, -18px -96.67px #eb47ac, 11px -88.67px #4783eb, -67px -28.67px #47baeb, 53px 10.33px #ba47eb, 11px 19.33px #5247eb, -5px -11.67px #eb4791, -68px -4.67px #47eba7, 95px -37.67px #eb478b, -67px -162.67px #eb5d47, -54px -120.67px #eb6847, 49px -12.67px #ebe047, 88px 8.33px #47ebda, 97px 33.33px #eb8147, 6px -71.67px #ebbc47;\n      }\n    }\n    @keyframes gravity {\n      from {\n        opacity: 1;\n      }\n      to {\n        transform: translateY(80px);\n        opacity: 0;\n      }\n    }\n    @keyframes position {\n      0%, 19.9% {\n        margin-top: 4%;\n        margin-left: 47%;\n      }\n      20%, 39.9% {\n        margin-top: 7%;\n        margin-left: 30%;\n      }\n      40%, 59.9% {\n        margin-top: 6%;\n        margin-left: 70%;\n      }\n      60%, 79.9% {\n        margin-top: 3%;\n        margin-left: 20%;\n      }\n      80%, 99.9% {\n        margin-top: 3%;\n        margin-left: 80%;\n      }\n    }\n  `),e.append(t);let n=o.createElement("div","lh-header-container"),r=o.createElement("div","lh-scores-wrapper-placeholder");return n.append(" ",r," "),e.append(n),e}function nt(o){let e=o.createFragment(),t=o.createElement("div","lh-metric"),n=o.createElement("div","lh-metric__innerwrap"),r=o.createElement("div","lh-metric__icon"),i=o.createElement("span","lh-metric__title"),a=o.createElement("div","lh-metric__value"),l=o.createElement("div","lh-metric__description");return n.append(" ",r," ",i," ",a," ",l," "),t.append(" ",n," "),e.append(t),e}function rt(o){let e=o.createFragment(),t=o.createElement("div","lh-scorescale"),n=o.createElement("span","lh-scorescale-range lh-scorescale-range--fail");n.append("0\\u201349");let r=o.createElement("span","lh-scorescale-range lh-scorescale-range--average");r.append("50\\u201389");let i=o.createElement("span","lh-scorescale-range lh-scorescale-range--pass");return i.append("90\\u2013100"),t.append(" ",n," ",r," ",i," "),e.append(t),e}function ot(o){let e=o.createFragment(),t=o.createElement("style");t.append(`\n    .lh-scores-container {\n      display: flex;\n      flex-direction: column;\n      padding: var(--default-padding) 0;\n      position: relative;\n      width: 100%;\n    }\n\n    .lh-sticky-header {\n      --gauge-circle-size: var(--gauge-circle-size-sm);\n      --plugin-badge-size: 16px;\n      --plugin-icon-size: 75%;\n      --gauge-wrapper-width: 60px;\n      --gauge-percentage-font-size: 13px;\n      position: fixed;\n      left: 0;\n      right: 0;\n      top: var(--topbar-height);\n      font-weight: 500;\n      display: none;\n      justify-content: center;\n      background-color: var(--sticky-header-background-color);\n      border-bottom: 1px solid var(--color-gray-200);\n      padding-top: var(--score-container-padding);\n      padding-bottom: 4px;\n      z-index: 2;\n      pointer-events: none;\n    }\n\n    .lh-devtools .lh-sticky-header {\n      /* The report within DevTools is placed in a container with overflow, which changes the placement of this header unless we change \\`position\\` to \\`sticky.\\` */\n      position: sticky;\n    }\n\n    .lh-sticky-header--visible {\n      display: grid;\n      grid-auto-flow: column;\n      pointer-events: auto;\n    }\n\n    /* Disable the gauge arc animation for the sticky header, so toggling display: none\n       does not play the animation. */\n    .lh-sticky-header .lh-gauge-arc {\n      animation: none;\n    }\n\n    .lh-sticky-header .lh-gauge__label,\n    .lh-sticky-header .lh-fraction__label {\n      display: none;\n    }\n\n    .lh-highlighter {\n      width: var(--gauge-wrapper-width);\n      height: 1px;\n      background-color: var(--highlighter-background-color);\n      /* Position at bottom of first gauge in sticky header. */\n      position: absolute;\n      grid-column: 1;\n      bottom: -1px;\n      left: 0px;\n      right: 0px;\n    }\n  `),e.append(t);let n=o.createElement("div","lh-scores-wrapper"),r=o.createElement("div","lh-scores-container"),i=o.createElement("div","lh-pyro"),a=o.createElement("div","lh-pyro-before"),l=o.createElement("div","lh-pyro-after");return i.append(" ",a," ",l," "),r.append(" ",i," "),n.append(" ",r," "),e.append(n),e}function it(o){let e=o.createFragment(),t=o.createElement("div","lh-snippet"),n=o.createElement("style");return n.append(`\n          :root {\n            --snippet-highlight-light: #fbf1f2;\n            --snippet-highlight-dark: #ffd6d8;\n          }\n\n         .lh-snippet__header {\n          position: relative;\n          overflow: hidden;\n          padding: 10px;\n          border-bottom: none;\n          color: var(--snippet-color);\n          background-color: var(--snippet-background-color);\n          border: 1px solid var(--report-border-color-secondary);\n        }\n        .lh-snippet__title {\n          font-weight: bold;\n          float: left;\n        }\n        .lh-snippet__node {\n          float: left;\n          margin-left: 4px;\n        }\n        .lh-snippet__toggle-expand {\n          padding: 1px 7px;\n          margin-top: -1px;\n          margin-right: -7px;\n          float: right;\n          background: transparent;\n          border: none;\n          cursor: pointer;\n          font-size: 14px;\n          color: #0c50c7;\n        }\n\n        .lh-snippet__snippet {\n          overflow: auto;\n          border: 1px solid var(--report-border-color-secondary);\n        }\n        /* Container needed so that all children grow to the width of the scroll container */\n        .lh-snippet__snippet-inner {\n          display: inline-block;\n          min-width: 100%;\n        }\n\n        .lh-snippet:not(.lh-snippet--expanded) .lh-snippet__show-if-expanded {\n          display: none;\n        }\n        .lh-snippet.lh-snippet--expanded .lh-snippet__show-if-collapsed {\n          display: none;\n        }\n\n        .lh-snippet__line {\n          background: white;\n          white-space: pre;\n          display: flex;\n        }\n        .lh-snippet__line:not(.lh-snippet__line--message):first-child {\n          padding-top: 4px;\n        }\n        .lh-snippet__line:not(.lh-snippet__line--message):last-child {\n          padding-bottom: 4px;\n        }\n        .lh-snippet__line--content-highlighted {\n          background: var(--snippet-highlight-dark);\n        }\n        .lh-snippet__line--message {\n          background: var(--snippet-highlight-light);\n        }\n        .lh-snippet__line--message .lh-snippet__line-number {\n          padding-top: 10px;\n          padding-bottom: 10px;\n        }\n        .lh-snippet__line--message code {\n          padding: 10px;\n          padding-left: 5px;\n          color: var(--color-fail);\n          font-family: var(--report-font-family);\n        }\n        .lh-snippet__line--message code {\n          white-space: normal;\n        }\n        .lh-snippet__line-icon {\n          padding-top: 10px;\n          display: none;\n        }\n        .lh-snippet__line--message .lh-snippet__line-icon {\n          display: block;\n        }\n        .lh-snippet__line-icon:before {\n          content: "";\n          display: inline-block;\n          vertical-align: middle;\n          margin-right: 4px;\n          width: var(--score-icon-size);\n          height: var(--score-icon-size);\n          background-image: var(--fail-icon-url);\n        }\n        .lh-snippet__line-number {\n          flex-shrink: 0;\n          width: 40px;\n          text-align: right;\n          font-family: monospace;\n          padding-right: 5px;\n          margin-right: 5px;\n          color: var(--color-gray-600);\n          user-select: none;\n        }\n    `),t.append(" ",n," "),e.append(t),e}function at(o){let e=o.createFragment(),t=o.createElement("div","lh-snippet__snippet"),n=o.createElement("div","lh-snippet__snippet-inner");return t.append(" ",n," "),e.append(t),e}function lt(o){let e=o.createFragment(),t=o.createElement("div","lh-snippet__header"),n=o.createElement("div","lh-snippet__title"),r=o.createElement("div","lh-snippet__node"),i=o.createElement("button","lh-snippet__toggle-expand"),a=o.createElement("span","lh-snippet__btn-label-collapse lh-snippet__show-if-expanded"),l=o.createElement("span","lh-snippet__btn-label-expand lh-snippet__show-if-collapsed");return i.append(" ",a," ",l," "),t.append(" ",n," ",r," ",i," "),e.append(t),e}function st(o){let e=o.createFragment(),t=o.createElement("div","lh-snippet__line"),n=o.createElement("div","lh-snippet__line-number"),r=o.createElement("div","lh-snippet__line-icon"),i=o.createElement("code");return t.append(" ",n," ",r," ",i," "),e.append(t),e}function ct(o){let e=o.createFragment(),t=o.createElement("style");return t.append(`/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\n/*\n  Naming convention:\n\n  If a variable is used for a specific component: --{component}-{property name}-{modifier}\n\n  Both {component} and {property name} should be kebab-case. If the target is the entire page,\n  use \'report\' for the component. The property name should not be abbreviated. Use the\n  property name the variable is intended for - if it\'s used for multiple, a common descriptor\n  is fine (ex: \'size\' for a variable applied to \'width\' and \'height\'). If a variable is shared\n  across multiple components, either create more variables or just drop the "{component}-"\n  part of the name. Append any modifiers at the end (ex: \'big\', \'dark\').\n\n  For colors: --color-{hue}-{intensity}\n\n  {intensity} is the Material Design tag - 700, A700, etc.\n*/\n.lh-vars {\n  /* Palette using Material Design Colors\n   * https://www.materialui.co/colors */\n  --color-amber-50: #FFF8E1;\n  --color-blue-200: #90CAF9;\n  --color-blue-900: #0D47A1;\n  --color-blue-A700: #2962FF;\n  --color-blue-primary: #06f;\n  --color-cyan-500: #00BCD4;\n  --color-gray-100: #F5F5F5;\n  --color-gray-300: #CFCFCF;\n  --color-gray-200: #E0E0E0;\n  --color-gray-400: #BDBDBD;\n  --color-gray-50: #FAFAFA;\n  --color-gray-500: #9E9E9E;\n  --color-gray-600: #757575;\n  --color-gray-700: #616161;\n  --color-gray-800: #424242;\n  --color-gray-900: #212121;\n  --color-gray: #000000;\n  --color-green-700: #080;\n  --color-green: #0c6;\n  --color-lime-400: #D3E156;\n  --color-orange-50: #FFF3E0;\n  --color-orange-700: #C33300;\n  --color-orange: #fa3;\n  --color-red-700: #c00;\n  --color-red: #f33;\n  --color-teal-600: #00897B;\n  --color-white: #FFFFFF;\n\n  /* Context-specific colors */\n  --color-average-secondary: var(--color-orange-700);\n  --color-average: var(--color-orange);\n  --color-fail-secondary: var(--color-red-700);\n  --color-fail: var(--color-red);\n  --color-hover: var(--color-gray-50);\n  --color-informative: var(--color-blue-900);\n  --color-pass-secondary: var(--color-green-700);\n  --color-pass: var(--color-green);\n  --color-not-applicable: var(--color-gray-600);\n\n  /* Component variables */\n  --audit-description-padding-left: calc(var(--score-icon-size) + var(--score-icon-margin-left) + var(--score-icon-margin-right));\n  --audit-explanation-line-height: 16px;\n  --audit-group-margin-bottom: calc(var(--default-padding) * 6);\n  --audit-group-padding-vertical: 8px;\n  --audit-margin-horizontal: 5px;\n  --audit-padding-vertical: 8px;\n  --category-padding: calc(var(--default-padding) * 6) var(--edge-gap-padding) calc(var(--default-padding) * 4);\n  --chevron-line-stroke: var(--color-gray-600);\n  --chevron-size: 12px;\n  --default-padding: 8px;\n  --edge-gap-padding: calc(var(--default-padding) * 4);\n  --env-item-background-color: var(--color-gray-100);\n  --env-item-font-size: 28px;\n  --env-item-line-height: 36px;\n  --env-item-padding: 10px 0px;\n  --env-name-min-width: 220px;\n  --footer-padding-vertical: 16px;\n  --gauge-circle-size-big: 96px;\n  --gauge-circle-size: 48px;\n  --gauge-circle-size-sm: 32px;\n  --gauge-label-font-size-big: 18px;\n  --gauge-label-font-size: var(--report-font-size-secondary);\n  --gauge-label-line-height-big: 24px;\n  --gauge-label-line-height: var(--report-line-height-secondary);\n  --gauge-percentage-font-size-big: 38px;\n  --gauge-percentage-font-size: var(--report-font-size-secondary);\n  --gauge-wrapper-width: 120px;\n  --header-line-height: 24px;\n  --highlighter-background-color: var(--report-text-color);\n  --icon-square-size: calc(var(--score-icon-size) * 0.88);\n  --image-preview-size: 48px;\n  --link-color: var(--color-blue-primary);\n  --locale-selector-background-color: var(--color-white);\n  --metric-toggle-lines-fill: #7F7F7F;\n  --metric-value-font-size: calc(var(--report-font-size) * 1.8);\n  --metrics-toggle-background-color: var(--color-gray-200);\n  --plugin-badge-background-color: var(--color-white);\n  --plugin-badge-size-big: calc(var(--gauge-circle-size-big) / 2.7);\n  --plugin-badge-size: calc(var(--gauge-circle-size) / 2.7);\n  --plugin-icon-size: 65%;\n  --report-background-color: #fff;\n  --report-border-color-secondary: #ebebeb;\n  --report-font-family-monospace: monospace, \'Roboto Mono\', \'Menlo\', \'dejavu sans mono\', \'Consolas\', \'Lucida Console\';\n  --report-font-family: system-ui, Roboto, Helvetica, Arial, sans-serif;\n  --report-font-size: 14px;\n  --report-font-size-secondary: 12px;\n  --report-icon-size: var(--score-icon-background-size);\n  --report-line-height: 24px;\n  --report-line-height-secondary: 20px;\n  --report-monospace-font-size: calc(var(--report-font-size) * 0.85);\n  --report-text-color-secondary: var(--color-gray-800);\n  --report-text-color: var(--color-gray-900);\n  --report-content-max-width: calc(60 * var(--report-font-size)); /* defaults to 840px */\n  --report-content-min-width: 360px;\n  --report-content-max-width-minus-edge-gap: calc(var(--report-content-max-width) - var(--edge-gap-padding) * 2);\n  --score-container-padding: 8px;\n  --score-icon-background-size: 24px;\n  --score-icon-margin-left: 6px;\n  --score-icon-margin-right: 14px;\n  --score-icon-margin: 0 var(--score-icon-margin-right) 0 var(--score-icon-margin-left);\n  --score-icon-size: 12px;\n  --score-icon-size-big: 16px;\n  --screenshot-overlay-background: rgba(0, 0, 0, 0.3);\n  --section-padding-vertical: calc(var(--default-padding) * 6);\n  --snippet-background-color: var(--color-gray-50);\n  --snippet-color: #0938C2;\n  --stackpack-padding-horizontal: 10px;\n  --sticky-header-background-color: var(--report-background-color);\n  --sticky-header-buffer: var(--topbar-height);\n  --sticky-header-height: calc(var(--gauge-circle-size-sm) + var(--score-container-padding) * 2 + 1em);\n  --table-group-header-background-color: #EEF1F4;\n  --table-group-header-text-color: var(--color-gray-700);\n  --table-higlight-background-color: #F5F7FA;\n  --tools-icon-color: var(--color-gray-600);\n  --topbar-background-color: var(--color-white);\n  --topbar-height: 32px;\n  --topbar-logo-size: 24px;\n  --topbar-padding: 0 8px;\n  --toplevel-warning-background-color: hsla(30, 100%, 75%, 10%);\n  --toplevel-warning-message-text-color: var(--color-average-secondary);\n  --toplevel-warning-padding: 18px;\n  --toplevel-warning-text-color: var(--report-text-color);\n\n  /* SVGs */\n  --plugin-icon-url-dark: url(\'data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="24px" height="24px" viewBox="0 0 24 24" fill="%23FFFFFF"><path d="M0 0h24v24H0z" fill="none"/><path d="M20.5 11H19V7c0-1.1-.9-2-2-2h-4V3.5C13 2.12 11.88 1 10.5 1S8 2.12 8 3.5V5H4c-1.1 0-1.99.9-1.99 2v3.8H3.5c1.49 0 2.7 1.21 2.7 2.7s-1.21 2.7-2.7 2.7H2V20c0 1.1.9 2 2 2h3.8v-1.5c0-1.49 1.21-2.7 2.7-2.7 1.49 0 2.7 1.21 2.7 2.7V22H17c1.1 0 2-.9 2-2v-4h1.5c1.38 0 2.5-1.12 2.5-2.5S21.88 11 20.5 11z"/></svg>\');\n  --plugin-icon-url: url(\'data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="24px" height="24px" viewBox="0 0 24 24" fill="%23757575"><path d="M0 0h24v24H0z" fill="none"/><path d="M20.5 11H19V7c0-1.1-.9-2-2-2h-4V3.5C13 2.12 11.88 1 10.5 1S8 2.12 8 3.5V5H4c-1.1 0-1.99.9-1.99 2v3.8H3.5c1.49 0 2.7 1.21 2.7 2.7s-1.21 2.7-2.7 2.7H2V20c0 1.1.9 2 2 2h3.8v-1.5c0-1.49 1.21-2.7 2.7-2.7 1.49 0 2.7 1.21 2.7 2.7V22H17c1.1 0 2-.9 2-2v-4h1.5c1.38 0 2.5-1.12 2.5-2.5S21.88 11 20.5 11z"/></svg>\');\n\n  --pass-icon-url: url(\'data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 48 48"><title>check</title><path fill="%23178239" d="M24 4C12.95 4 4 12.95 4 24c0 11.04 8.95 20 20 20 11.04 0 20-8.96 20-20 0-11.05-8.96-20-20-20zm-4 30L10 24l2.83-2.83L20 28.34l15.17-15.17L38 16 20 34z"/></svg>\');\n  --average-icon-url: url(\'data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 48 48"><title>info</title><path fill="%23E67700" d="M24 4C12.95 4 4 12.95 4 24s8.95 20 20 20 20-8.95 20-20S35.05 4 24 4zm2 30h-4V22h4v12zm0-16h-4v-4h4v4z"/></svg>\');\n  --fail-icon-url: url(\'data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 48 48"><title>warn</title><path fill="%23C7221F" d="M2 42h44L24 4 2 42zm24-6h-4v-4h4v4zm0-8h-4v-8h4v8z"/></svg>\');\n  --error-icon-url: url(\'data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 3 15"><title>error</title><path d="M0 15H 3V 12H 0V" fill="%23FF4E42"/><path d="M0 9H 3V 0H 0V" fill="%23FF4E42"/></svg>\');\n\n  --swap-locale-icon-url: url(\'data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="%23000000"><path d="M0 0h24v24H0V0z" fill="none"/><path d="M12.87 15.07l-2.54-2.51.03-.03c1.74-1.94 2.98-4.17 3.71-6.53H17V4h-7V2H8v2H1v1.99h11.17C11.5 7.92 10.44 9.75 9 11.35 8.07 10.32 7.3 9.19 6.69 8h-2c.73 1.63 1.73 3.17 2.98 4.56l-5.09 5.02L4 19l5-5 3.11 3.11.76-2.04zM18.5 10h-2L12 22h2l1.12-3h4.75L21 22h2l-4.5-12zm-2.62 7l1.62-4.33L19.12 17h-3.24z"/></svg>\');\n}\n\n@media not print {\n  .lh-dark {\n    /* Pallete */\n    --color-gray-200: var(--color-gray-800);\n    --color-gray-300: #616161;\n    --color-gray-400: var(--color-gray-600);\n    --color-gray-700: var(--color-gray-400);\n    --color-gray-50: #757575;\n    --color-gray-600: var(--color-gray-500);\n    --color-green-700: var(--color-green);\n    --color-orange-700: var(--color-orange);\n    --color-red-700: var(--color-red);\n    --color-teal-600: var(--color-cyan-500);\n\n    /* Context-specific colors */\n    --color-hover: rgba(0, 0, 0, 0.2);\n    --color-informative: var(--color-blue-200);\n\n    /* Component variables */\n    --env-item-background-color: #393535;\n    --link-color: var(--color-blue-200);\n    --locale-selector-background-color: var(--color-gray-200);\n    --plugin-badge-background-color: var(--color-gray-800);\n    --report-background-color: var(--color-gray-900);\n    --report-border-color-secondary: var(--color-gray-200);\n    --report-text-color-secondary: var(--color-gray-400);\n    --report-text-color: var(--color-gray-100);\n    --snippet-color: var(--color-cyan-500);\n    --topbar-background-color: var(--color-gray);\n    --toplevel-warning-background-color: hsl(33deg 14% 18%);\n    --toplevel-warning-message-text-color: var(--color-orange-700);\n    --toplevel-warning-text-color: var(--color-gray-100);\n    --table-group-header-background-color: rgba(186, 196, 206, 0.15);\n    --table-group-header-text-color: var(--color-gray-100);\n    --table-higlight-background-color: rgba(186, 196, 206, 0.09);\n\n    /* SVGs */\n    --plugin-icon-url: var(--plugin-icon-url-dark);\n  }\n}\n\n/**\n* This media query is a temporary fallback for browsers that do not support \\`@container query\\`.\n* TODO: remove this media query when \\`@container query\\` is fully supported by browsers\n* See https://github.com/GoogleChrome/lighthouse/pull/16332\n*/\n@media only screen and (max-width: 480px) {\n  .lh-vars {\n    --audit-group-margin-bottom: 20px;\n    --edge-gap-padding: var(--default-padding);\n    --env-name-min-width: 120px;\n    --gauge-circle-size-big: 96px;\n    --gauge-circle-size: 72px;\n    --gauge-label-font-size-big: 22px;\n    --gauge-label-font-size: 14px;\n    --gauge-label-line-height-big: 26px;\n    --gauge-label-line-height: 20px;\n    --gauge-percentage-font-size-big: 34px;\n    --gauge-percentage-font-size: 26px;\n    --gauge-wrapper-width: 112px;\n    --header-padding: 16px 0 16px 0;\n    --image-preview-size: 24px;\n    --plugin-icon-size: 75%;\n    --report-font-size: 14px;\n    --report-line-height: 20px;\n    --score-icon-margin-left: 2px;\n    --score-icon-size: 10px;\n    --topbar-height: 28px;\n    --topbar-logo-size: 20px;\n  }\n}\n\n@container lh-container (max-width: 480px) {\n  .lh-vars {\n    --audit-group-margin-bottom: 20px;\n    --edge-gap-padding: var(--default-padding);\n    --env-name-min-width: 120px;\n    --gauge-circle-size-big: 96px;\n    --gauge-circle-size: 72px;\n    --gauge-label-font-size-big: 22px;\n    --gauge-label-font-size: 14px;\n    --gauge-label-line-height-big: 26px;\n    --gauge-label-line-height: 20px;\n    --gauge-percentage-font-size-big: 34px;\n    --gauge-percentage-font-size: 26px;\n    --gauge-wrapper-width: 112px;\n    --header-padding: 16px 0 16px 0;\n    --image-preview-size: 24px;\n    --plugin-icon-size: 75%;\n    --report-font-size: 14px;\n    --report-line-height: 20px;\n    --score-icon-margin-left: 2px;\n    --score-icon-size: 10px;\n    --topbar-height: 28px;\n    --topbar-logo-size: 20px;\n  }\n}\n\n.lh-vars.lh-devtools {\n  --audit-explanation-line-height: 14px;\n  --audit-group-margin-bottom: 20px;\n  --audit-group-padding-vertical: 12px;\n  --audit-padding-vertical: 4px;\n  --category-padding: 12px;\n  --default-padding: 12px;\n  --env-name-min-width: 120px;\n  --footer-padding-vertical: 8px;\n  --gauge-circle-size-big: 72px;\n  --gauge-circle-size: 64px;\n  --gauge-label-font-size-big: 22px;\n  --gauge-label-font-size: 14px;\n  --gauge-label-line-height-big: 26px;\n  --gauge-label-line-height: 20px;\n  --gauge-percentage-font-size-big: 34px;\n  --gauge-percentage-font-size: 26px;\n  --gauge-wrapper-width: 97px;\n  --header-line-height: 20px;\n  --header-padding: 16px 0 16px 0;\n  --screenshot-overlay-background: transparent;\n  --plugin-icon-size: 75%;\n  --report-font-size: 12px;\n  --report-line-height: 20px;\n  --score-icon-margin-left: 2px;\n  --score-icon-size: 10px;\n  --section-padding-vertical: 8px;\n}\n\n.lh-devtools :focus-visible {\n  outline: -webkit-focus-ring-color auto 1px;\n}\n\n.lh-container:has(.lh-sticky-header) {\n  --sticky-header-buffer: calc(var(--topbar-height) + var(--sticky-header-height));\n}\n\n.lh-container:not(.lh-topbar + .lh-container) {\n  --topbar-height: 0;\n  --sticky-header-height: 0;\n  --sticky-header-buffer: 0;\n}\n\n.lh-max-viewport {\n  display: flex;\n  flex-direction: column;\n  min-height: 100vh;\n  width: 100%;\n}\n\n.lh-devtools.lh-root {\n  height: 100%;\n}\n.lh-devtools.lh-root img {\n  /* Override devtools default \'min-width: 0\' so svg without size in a flexbox isn\'t collapsed. */\n  min-width: auto;\n}\n.lh-devtools .lh-container {\n  overflow-y: scroll;\n  height: calc(100% - var(--topbar-height));\n  /** The .lh-container is the scroll parent in DevTools so we exclude the topbar from the sticky header buffer. */\n  --sticky-header-buffer: 0;\n}\n.lh-devtools .lh-container:has(.lh-sticky-header) {\n  /** The .lh-container is the scroll parent in DevTools so we exclude the topbar from the sticky header buffer. */\n  --sticky-header-buffer: var(--sticky-header-height);\n}\n@media print {\n  .lh-devtools .lh-container {\n    overflow: unset;\n  }\n}\n.lh-devtools .lh-sticky-header {\n  /* This is normally the height of the topbar, but we want it to stick to the top of our scroll container .lh-container\\` */\n  top: 0;\n}\n.lh-devtools .lh-element-screenshot__overlay {\n  position: absolute;\n}\n\n@keyframes fadeIn {\n  0% { opacity: 0;}\n  100% { opacity: 0.6;}\n}\n\n.lh-root *, .lh-root *::before, .lh-root *::after {\n  box-sizing: border-box;\n}\n\n.lh-root {\n  font-family: var(--report-font-family);\n  font-size: var(--report-font-size);\n  margin: 0;\n  line-height: var(--report-line-height);\n  background: var(--report-background-color);\n  color: var(--report-text-color);\n}\n\n.lh-root [hidden] {\n  display: none !important;\n}\n\n.lh-root pre {\n  margin: 0;\n}\n\n.lh-root pre,\n.lh-root code {\n  font-family: var(--report-font-family-monospace);\n}\n\n.lh-root details > summary {\n  cursor: pointer;\n}\n\n.lh-hidden {\n  display: none !important;\n}\n\n.lh-container {\n  /*\n  Text wrapping in the report is so much FUN!\n  We have a \\`word-break: break-word;\\` globally here to prevent a few common scenarios, namely\n  long non-breakable text (usually URLs) found in:\n    1. The footer\n    2. .lh-node (outerHTML)\n    3. .lh-code\n\n  With that sorted, the next challenge is appropriate column sizing and text wrapping inside our\n  .lh-details tables. Even more fun.\n    * We don\'t want table headers ("Est Savings (ms)") to wrap or their column values, but\n      we\'d be happy for the URL column to wrap if the URLs are particularly long.\n    * We want the narrow columns to remain narrow, providing the most column width for URL\n    * We don\'t want the table to extend past 100% width.\n    * Long URLs in the URL column can wrap. Util.getURLDisplayName maxes them out at 64 characters,\n      but they do not get any overflow:ellipsis treatment.\n  */\n  word-break: break-word;\n\n  container-name: lh-container;\n  container-type: inline-size;\n}\n\n.lh-audit-group a,\n.lh-category-header__description a,\n.lh-audit__description a,\n.lh-warnings a,\n.lh-footer a,\n.lh-table-column--link a {\n  color: var(--link-color);\n}\n\n.lh-audit__description, .lh-audit__stackpack, .lh-list-section__description {\n  --inner-audit-padding-right: var(--stackpack-padding-horizontal);\n  padding-left: var(--audit-description-padding-left);\n  padding-right: var(--inner-audit-padding-right);\n  padding-top: 8px;\n  padding-bottom: 8px;\n}\n\n.lh-details {\n  margin-top: var(--default-padding);\n  margin-bottom: var(--default-padding);\n  margin-left: var(--audit-description-padding-left);\n}\n\n.lh-audit__stackpack {\n  display: flex;\n  align-items: center;\n}\n\n.lh-audit__stackpack__img {\n  max-width: 30px;\n  margin-right: var(--default-padding)\n}\n\n/* Report header */\n\n.lh-report-icon {\n  display: flex;\n  align-items: center;\n  padding: 10px 12px;\n  cursor: pointer;\n}\n.lh-report-icon[disabled] {\n  opacity: 0.3;\n  pointer-events: none;\n}\n\n.lh-report-icon::before {\n  content: "";\n  margin: 4px;\n  background-repeat: no-repeat;\n  width: var(--report-icon-size);\n  height: var(--report-icon-size);\n  opacity: 0.7;\n  display: inline-block;\n  vertical-align: middle;\n}\n.lh-report-icon:hover::before {\n  opacity: 1;\n}\n.lh-dark .lh-report-icon::before {\n  filter: invert(1);\n}\n.lh-report-icon--print::before {\n  background-image: url(\'data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M19 8H5c-1.66 0-3 1.34-3 3v6h4v4h12v-4h4v-6c0-1.66-1.34-3-3-3zm-3 11H8v-5h8v5zm3-7c-.55 0-1-.45-1-1s.45-1 1-1 1 .45 1 1-.45 1-1 1zm-1-9H6v4h12V3z"/><path fill="none" d="M0 0h24v24H0z"/></svg>\');\n}\n.lh-report-icon--copy::before {\n  background-image: url(\'data:image/svg+xml;utf8,<svg height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><path d="M0 0h24v24H0z" fill="none"/><path d="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"/></svg>\');\n}\n.lh-report-icon--open::before {\n  background-image: url(\'data:image/svg+xml;utf8,<svg height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><path d="M0 0h24v24H0z" fill="none"/><path d="M19 4H5c-1.11 0-2 .9-2 2v12c0 1.1.89 2 2 2h4v-2H5V8h14v10h-4v2h4c1.1 0 2-.9 2-2V6c0-1.1-.89-2-2-2zm-7 6l-4 4h3v6h2v-6h3l-4-4z"/></svg>\');\n}\n.lh-report-icon--download::before {\n  background-image: url(\'data:image/svg+xml;utf8,<svg height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><path d="M19 9h-4V3H9v6H5l7 7 7-7zM5 18v2h14v-2H5z"/><path d="M0 0h24v24H0z" fill="none"/></svg>\');\n}\n.lh-report-icon--dark::before {\n  background-image:url(\'data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 100 125"><path d="M50 23.587c-16.27 0-22.799 12.574-22.799 21.417 0 12.917 10.117 22.451 12.436 32.471h20.726c2.32-10.02 12.436-19.554 12.436-32.471 0-8.843-6.528-21.417-22.799-21.417zM39.637 87.161c0 3.001 1.18 4.181 4.181 4.181h.426l.41 1.231C45.278 94.449 46.042 95 48.019 95h3.963c1.978 0 2.74-.551 3.365-2.427l.409-1.231h.427c3.002 0 4.18-1.18 4.18-4.181V80.91H39.637v6.251zM50 18.265c1.26 0 2.072-.814 2.072-2.073v-9.12C52.072 5.813 51.26 5 50 5c-1.259 0-2.072.813-2.072 2.073v9.12c0 1.259.813 2.072 2.072 2.072zM68.313 23.727c.994.774 2.135.634 2.91-.357l5.614-7.187c.776-.992.636-2.135-.356-2.909-.992-.776-2.135-.636-2.91.357l-5.613 7.186c-.778.993-.636 2.135.355 2.91zM91.157 36.373c-.306-1.222-1.291-1.815-2.513-1.51l-8.85 2.207c-1.222.305-1.814 1.29-1.51 2.512.305 1.223 1.291 1.814 2.513 1.51l8.849-2.206c1.223-.305 1.816-1.291 1.511-2.513zM86.757 60.48l-8.331-3.709c-1.15-.512-2.225-.099-2.736 1.052-.512 1.151-.1 2.224 1.051 2.737l8.33 3.707c1.15.514 2.225.101 2.736-1.05.513-1.149.1-2.223-1.05-2.737zM28.779 23.37c.775.992 1.917 1.131 2.909.357.992-.776 1.132-1.917.357-2.91l-5.615-7.186c-.775-.992-1.917-1.132-2.909-.357s-1.131 1.917-.356 2.909l5.614 7.187zM21.715 39.583c.305-1.223-.288-2.208-1.51-2.513l-8.849-2.207c-1.222-.303-2.208.289-2.513 1.511-.303 1.222.288 2.207 1.511 2.512l8.848 2.206c1.222.304 2.208-.287 2.513-1.509zM21.575 56.771l-8.331 3.711c-1.151.511-1.563 1.586-1.05 2.735.511 1.151 1.586 1.563 2.736 1.052l8.331-3.711c1.151-.511 1.563-1.586 1.05-2.735-.512-1.15-1.585-1.562-2.736-1.052z"/></svg>\');\n}\n.lh-report-icon--treemap::before {\n  background-image: url(\'data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="black"><path d="M3 5v14h19V5H3zm2 2h15v4H5V7zm0 10v-4h4v4H5zm6 0v-4h9v4h-9z"/></svg>\');\n}\n\n.lh-report-icon--date::before {\n  background-image: url(\'data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M7 11h2v2H7v-2zm14-5v14a2 2 0 01-2 2H5a2 2 0 01-2-2V6c0-1.1.9-2 2-2h1V2h2v2h8V2h2v2h1a2 2 0 012 2zM5 8h14V6H5v2zm14 12V10H5v10h14zm-4-7h2v-2h-2v2zm-4 0h2v-2h-2v2z"/></svg>\');\n}\n.lh-report-icon--devices::before {\n  background-image: url(\'data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M4 6h18V4H4a2 2 0 00-2 2v11H0v3h14v-3H4V6zm19 2h-6a1 1 0 00-1 1v10c0 .6.5 1 1 1h6c.6 0 1-.5 1-1V9c0-.6-.5-1-1-1zm-1 9h-4v-7h4v7z"/></svg>\');\n}\n.lh-report-icon--world::before {\n  background-image: url(\'data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 2a10 10 0 1 0 0 20 10 10 0 0 0 0-20zm7 6h-3c-.3-1.3-.8-2.5-1.4-3.6A8 8 0 0 1 18.9 8zm-7-4a14 14 0 0 1 2 4h-4a14 14 0 0 1 2-4zM4.3 14a8.2 8.2 0 0 1 0-4h3.3a16.5 16.5 0 0 0 0 4H4.3zm.8 2h3a14 14 0 0 0 1.3 3.6A8 8 0 0 1 5.1 16zm3-8H5a8 8 0 0 1 4.3-3.6L8 8zM12 20a14 14 0 0 1-2-4h4a14 14 0 0 1-2 4zm2.3-6H9.7a14.7 14.7 0 0 1 0-4h4.6a14.6 14.6 0 0 1 0 4zm.3 5.6c.6-1.2 1-2.4 1.4-3.6h3a8 8 0 0 1-4.4 3.6zm1.8-5.6a16.5 16.5 0 0 0 0-4h3.3a8.2 8.2 0 0 1 0 4h-3.3z"/></svg>\');\n}\n.lh-report-icon--stopwatch::before {\n  background-image: url(\'data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M15 1H9v2h6V1zm-4 13h2V8h-2v6zm8.1-6.6L20.5 6l-1.4-1.4L17.7 6A9 9 0 0 0 3 13a9 9 0 1 0 16-5.6zm-7 12.6a7 7 0 1 1 0-14 7 7 0 0 1 0 14z"/></svg>\');\n}\n.lh-report-icon--networkspeed::before {\n  background-image: url(\'data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M15.9 5c-.2 0-.3 0-.4.2v.2L10.1 17a2 2 0 0 0-.2 1 2 2 0 0 0 4 .4l2.4-12.9c0-.3-.2-.5-.5-.5zM1 9l2 2c2.9-2.9 6.8-4 10.5-3.6l1.2-2.7C10 3.8 4.7 5.3 1 9zm20 2 2-2a15.4 15.4 0 0 0-5.6-3.6L17 8.2c1.5.7 2.9 1.6 4.1 2.8zm-4 4 2-2a9.9 9.9 0 0 0-2.7-1.9l-.5 3 1.2.9zM5 13l2 2a7.1 7.1 0 0 1 4-2l1.3-2.9C9.7 10.1 7 11 5 13z"/></svg>\');\n}\n.lh-report-icon--samples-one::before {\n  background-image: url(\'data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><circle cx="7" cy="14" r="3"/><path d="M7 18a4 4 0 1 1 0-8 4 4 0 0 1 0 8zm0-6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm4-2a4 4 0 1 1 0-8 4 4 0 0 1 0 8zm0-6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm5.6 17.6a4 4 0 1 1 0-8 4 4 0 0 1 0 8zm0-6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"/></svg>\');\n}\n.lh-report-icon--samples-many::before {\n  background-image: url(\'data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M7 18a4 4 0 1 1 0-8 4 4 0 0 1 0 8zm0-6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm4-2a4 4 0 1 1 0-8 4 4 0 0 1 0 8zm0-6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm5.6 17.6a4 4 0 1 1 0-8 4 4 0 0 1 0 8zm0-6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"/><circle cx="7" cy="14" r="3"/><circle cx="11" cy="6" r="3"/></svg>\');\n}\n.lh-report-icon--chrome::before {\n  background-image: url(\'data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="-50 -50 562 562"><path d="M256 25.6v25.6a204 204 0 0 1 144.8 60 204 204 0 0 1 60 144.8 204 204 0 0 1-60 144.8 204 204 0 0 1-144.8 60 204 204 0 0 1-144.8-60 204 204 0 0 1-60-144.8 204 204 0 0 1 60-144.8 204 204 0 0 1 144.8-60V0a256 256 0 1 0 0 512 256 256 0 0 0 0-512v25.6z"/><path d="M256 179.2v25.6a51.3 51.3 0 0 1 0 102.4 51.3 51.3 0 0 1 0-102.4v-51.2a102.3 102.3 0 1 0-.1 204.7 102.3 102.3 0 0 0 .1-204.7v25.6z"/><path d="M256 204.8h217.6a25.6 25.6 0 0 0 0-51.2H256a25.6 25.6 0 0 0 0 51.2m44.3 76.8L191.5 470.1a25.6 25.6 0 1 0 44.4 25.6l108.8-188.5a25.6 25.6 0 1 0-44.4-25.6m-88.6 0L102.9 93.2a25.7 25.7 0 0 0-35-9.4 25.7 25.7 0 0 0-9.4 35l108.8 188.5a25.7 25.7 0 0 0 35 9.4 25.9 25.9 0 0 0 9.4-35.1"/></svg>\');\n}\n.lh-report-icon--external::before {\n  background-image: url(\'data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg"><path d="M3.15 11.9a1.01 1.01 0 0 1-.743-.307 1.01 1.01 0 0 1-.306-.743v-7.7c0-.292.102-.54.306-.744a1.01 1.01 0 0 1 .744-.306H7v1.05H3.15v7.7h7.7V7h1.05v3.85c0 .291-.103.54-.307.743a1.01 1.01 0 0 1-.743.307h-7.7Zm2.494-2.8-.743-.744 5.206-5.206H8.401V2.1h3.5v3.5h-1.05V3.893L5.644 9.1Z"/></svg>\');\n}\n.lh-report-icon--experiment::before {\n  background-image: url(\'data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="none"><path d="M4.50002 17C3.86136 17 3.40302 16.7187 3.12502 16.156C2.84702 15.5933 2.90936 15.069 3.31202 14.583L7.50002 9.5V4.5H6.75002C6.54202 4.5 6.36502 4.427 6.21902 4.281C6.07302 4.135 6.00002 3.958 6.00002 3.75C6.00002 3.542 6.07302 3.365 6.21902 3.219C6.36502 3.073 6.54202 3 6.75002 3H13.25C13.458 3 13.635 3.073 13.781 3.219C13.927 3.365 14 3.542 14 3.75C14 3.958 13.927 4.135 13.781 4.281C13.635 4.427 13.458 4.5 13.25 4.5H12.5V9.5L16.688 14.583C17.0767 15.069 17.132 15.5933 16.854 16.156C16.5767 16.7187 16.1254 17 15.5 17H4.50002ZM4.50002 15.5H15.5L11 10V4.5H9.00002V10L4.50002 15.5Z" fill="black"/></svg>\');\n}\n\n/** These are still icons, but w/o the auto-color invert / opacity / etc. that come with .lh-report-icon */\n\n.lh-report-plain-icon {\n  display: flex;\n  align-items: center;\n}\n.lh-report-plain-icon::before {\n  content: "";\n  background-repeat: no-repeat;\n  width: var(--report-icon-size);\n  height: var(--report-icon-size);\n  display: inline-block;\n  margin-right: 5px;\n}\n\n.lh-report-plain-icon--checklist-pass::before {\n  --icon-url: url(\'data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><path d="M8.938 13L13.896 8.062L12.833 7L8.938 10.875L7.167 9.125L6.104 10.188L8.938 13ZM10 18C8.90267 18 7.868 17.7917 6.896 17.375C5.924 16.9583 5.07333 16.3853 4.344 15.656C3.61467 14.9267 3.04167 14.076 2.625 13.104C2.20833 12.132 2 11.0973 2 10C2 8.88867 2.20833 7.85033 2.625 6.885C3.04167 5.92033 3.61467 5.07333 4.344 4.344C5.07333 3.61467 5.924 3.04167 6.896 2.625C7.868 2.20833 8.90267 2 10 2C11.1113 2 12.1497 2.20833 13.115 2.625C14.0797 3.04167 14.9267 3.61467 15.656 4.344C16.3853 5.07333 16.9583 5.92033 17.375 6.885C17.7917 7.85033 18 8.88867 18 10C18 11.0973 17.7917 12.132 17.375 13.104C16.9583 14.076 16.3853 14.9267 15.656 15.656C14.9267 16.3853 14.0797 16.9583 13.115 17.375C12.1497 17.7917 11.1113 18 10 18ZM10 16.5C11.8053 16.5 13.34 15.868 14.604 14.604C15.868 13.34 16.5 11.8053 16.5 10C16.5 8.19467 15.868 6.66 14.604 5.396C13.34 4.132 11.8053 3.5 10 3.5C8.19467 3.5 6.66 4.132 5.396 5.396C4.132 6.66 3.5 8.19467 3.5 10C3.5 11.8053 4.132 13.34 5.396 14.604C6.66 15.868 8.19467 16.5 10 16.5Z" fill="black"/></svg>\');\n  background-color: var(--color-pass);\n  mask: var(--icon-url) center / contain no-repeat;\n}\n.lh-report-plain-icon--checklist-fail::before {\n  --icon-url: url(\'data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><path fill-rule="evenodd" clip-rule="evenodd" d="M17.5 10C17.5 14.1421 14.1421 17.5 10 17.5C5.85786 17.5 2.5 14.1421 2.5 10C2.5 5.85786 5.85786 2.5 10 2.5C14.1421 2.5 17.5 5.85786 17.5 10ZM16 10C16 13.3137 13.3137 16 10 16C8.6135 16 7.33683 15.5297 6.32083 14.7399L14.7399 6.32083C15.5297 7.33683 16 8.6135 16 10ZM5.26016 13.6793L13.6793 5.26016C12.6633 4.47033 11.3866 4 10 4C6.68629 4 4 6.68629 4 10C4 11.3866 4.47033 12.6633 5.26016 13.6793Z" fill="black"/></svg>\');\n  background-color: var(--color-fail);\n  mask: var(--icon-url) center / contain no-repeat;\n}\n\n.lh-buttons {\n  display: flex;\n  flex-wrap: wrap;\n  margin: var(--default-padding) 0;\n}\n.lh-button {\n  height: 32px;\n  border: 1px solid var(--report-border-color-secondary);\n  border-radius: 3px;\n  color: var(--link-color);\n  background-color: var(--report-background-color);\n  margin: 5px;\n}\n\n.lh-button:first-of-type {\n  margin-left: 0;\n}\n\n/* Node */\n.lh-node {\n  display: flow-root;\n}\n\n.lh-node__snippet {\n  font-family: var(--report-font-family-monospace);\n  color: var(--snippet-color);\n  font-size: var(--report-monospace-font-size);\n  line-height: 20px;\n}\n\n.lh-checklist {\n  list-style: none;\n  padding: 0;\n}\n\n.lh-checklist-item {\n  margin: 10px 0 10px 0;\n}\n\n/* Score */\n\n.lh-audit__score-icon {\n  width: var(--score-icon-size);\n  height: var(--score-icon-size);\n  margin: var(--score-icon-margin);\n}\n\n.lh-audit--pass .lh-audit__display-text {\n  color: var(--color-pass-secondary);\n}\n.lh-audit--pass .lh-audit__score-icon,\n.lh-scorescale-range--pass::before {\n  border-radius: 100%;\n  background: var(--color-pass);\n}\n\n.lh-audit--average .lh-audit__display-text {\n  color: var(--color-average-secondary);\n}\n.lh-audit--average .lh-audit__score-icon,\n.lh-scorescale-range--average::before {\n  background: var(--color-average);\n  width: var(--icon-square-size);\n  height: var(--icon-square-size);\n}\n\n.lh-audit--fail .lh-audit__display-text {\n  color: var(--color-fail-secondary);\n}\n.lh-audit--fail .lh-audit__score-icon,\n.lh-audit--error .lh-audit__score-icon,\n.lh-scorescale-range--fail::before {\n  border-left: calc(var(--score-icon-size) / 2) solid transparent;\n  border-right: calc(var(--score-icon-size) / 2) solid transparent;\n  border-bottom: var(--score-icon-size) solid var(--color-fail);\n}\n\n.lh-audit--error .lh-audit__score-icon,\n.lh-metric--error .lh-metric__icon {\n  background-image: var(--error-icon-url);\n  background-repeat: no-repeat;\n  background-position: center;\n  border: none;\n}\n\n.lh-gauge__wrapper--fail .lh-gauge--error {\n  background-image: var(--error-icon-url);\n  background-repeat: no-repeat;\n  background-position: center;\n  transform: scale(0.5);\n  top: var(--score-container-padding);\n}\n\n.lh-audit--manual .lh-audit__display-text,\n.lh-audit--notapplicable .lh-audit__display-text {\n  color: var(--color-gray-600);\n}\n.lh-audit--manual .lh-audit__score-icon,\n.lh-audit--notapplicable .lh-audit__score-icon {\n  border: calc(0.2 * var(--score-icon-size)) solid var(--color-gray-400);\n  border-radius: 100%;\n  background: none;\n}\n\n.lh-audit--informative .lh-audit__display-text {\n  color: var(--color-gray-600);\n}\n\n.lh-audit--informative .lh-audit__score-icon {\n  border: calc(0.2 * var(--score-icon-size)) solid var(--color-gray-400);\n  border-radius: 100%;\n}\n\n.lh-audit__description,\n.lh-audit__stackpack {\n  color: var(--report-text-color-secondary);\n}\n.lh-audit__adorn {\n  border: 1px solid var(--color-gray-500);\n  border-radius: 3px;\n  margin: 0 3px;\n  padding: 0 2px;\n  line-height: 1.1;\n  display: inline-block;\n  font-size: 90%;\n  color: var(--report-text-color-secondary);\n}\n\n.lh-category-header__description  {\n  text-align: center;\n  color: var(--color-gray-700);\n  margin: 0px auto;\n  max-width: 400px;\n}\n\n\n.lh-audit__display-text,\n.lh-chevron-container {\n  margin: 0 var(--audit-margin-horizontal);\n}\n.lh-chevron-container {\n  margin-right: 0;\n}\n\n.lh-audit__title-and-text {\n  flex: 1;\n}\n\n.lh-audit__title-and-text code {\n  color: var(--snippet-color);\n  font-size: var(--report-monospace-font-size);\n}\n\n/* Prepend display text with em dash separator. */\n.lh-audit__display-text:not(:empty):before {\n  content: \'\\u2014\';\n  margin-right: var(--audit-margin-horizontal);\n}\n\n/* Expandable Details (Audit Groups, Audits) */\n.lh-audit__header {\n  display: flex;\n  align-items: center;\n  padding: var(--default-padding);\n}\n\n\n.lh-metricfilter {\n  display: grid;\n  justify-content: end;\n  align-items: center;\n  grid-auto-flow: column;\n  gap: 4px;\n  color: var(--color-gray-700);\n}\n\n.lh-metricfilter__radio {\n  /*\n   * Instead of hiding, position offscreen so it\'s still accessible to screen readers\n   * https://bugs.chromium.org/p/chromium/issues/detail?id=1439785\n   */\n  position: fixed;\n  left: -9999px;\n}\n.lh-metricfilter input[type=\'radio\']:focus-visible + label {\n  outline: -webkit-focus-ring-color auto 1px;\n}\n\n.lh-metricfilter__label {\n  display: inline-flex;\n  padding: 0 4px;\n  height: 16px;\n  text-decoration: underline;\n  align-items: center;\n  cursor: pointer;\n  font-size: 90%;\n}\n\n.lh-metricfilter__label--active {\n  background: var(--color-blue-primary);\n  color: var(--color-white);\n  border-radius: 3px;\n  text-decoration: none;\n}\n/* Give the \'All\' choice a more muted display */\n.lh-metricfilter__label--active[for="metric-All"] {\n  background-color: var(--color-blue-200) !important;\n  color: black !important;\n}\n\n.lh-metricfilter__text {\n  margin-right: 8px;\n}\n\n/* If audits are filtered, hide the itemcount for Passed Audits\\u2026 */\n.lh-category--filtered .lh-audit-group .lh-audit-group__itemcount {\n  display: none;\n}\n\n\n.lh-audit__header:hover {\n  background-color: var(--color-hover);\n}\n\n/* We want to hide the browser\'s default arrow marker on summary elements. Admittedly, it\'s complicated. */\n.lh-root details > summary {\n  /* Blink 89+ and Firefox will hide the arrow when display is changed from (new) default of \\`list-item\\` to block.  https://chromestatus.com/feature/6730096436051968*/\n  display: block;\n}\n/* Safari and Blink <=88 require using the -webkit-details-marker selector */\n.lh-root details > summary::-webkit-details-marker {\n  display: none;\n}\n\n/* Perf Metric */\n\n.lh-metrics-container {\n  display: grid;\n  grid-auto-rows: 1fr;\n  grid-template-columns: 1fr 1fr;\n  grid-column-gap: var(--report-line-height);\n  margin-bottom: var(--default-padding);\n}\n\n.lh-metric {\n  border-top: 1px solid var(--report-border-color-secondary);\n}\n\n.lh-category:not(.lh--hoisted-meta) .lh-metric:nth-last-child(-n+2) {\n  border-bottom: 1px solid var(--report-border-color-secondary);\n}\n\n.lh-metric__innerwrap {\n  display: grid;\n  /**\n   * Icon -- Metric Name\n   *      -- Metric Value\n   */\n  grid-template-columns: calc(var(--score-icon-size) + var(--score-icon-margin-left) + var(--score-icon-margin-right)) 1fr;\n  align-items: center;\n  padding: var(--default-padding);\n}\n\n.lh-metric__details {\n  order: -1;\n}\n\n.lh-metric__title {\n  flex: 1;\n}\n\n.lh-calclink {\n  padding-left: calc(1ex / 3);\n}\n\n.lh-metric__description {\n  display: none;\n  grid-column-start: 2;\n  grid-column-end: 4;\n  color: var(--report-text-color-secondary);\n}\n\n.lh-metric__value {\n  font-size: var(--metric-value-font-size);\n  margin: calc(var(--default-padding) / 2) 0;\n  white-space: nowrap; /* No wrapping between metric value and the icon */\n  grid-column-start: 2;\n}\n\n/**\n* This media query is a temporary fallback for browsers that do not support \\`@container query\\`.\n* TODO: remove this media query when \\`@container query\\` is fully supported by browsers\n* See https://github.com/GoogleChrome/lighthouse/pull/16332\n*/\n@media screen and (max-width: 535px) {\n  .lh-metrics-container {\n    display: block;\n  }\n\n  .lh-metric {\n    border-bottom: none !important;\n  }\n  .lh-category:not(.lh--hoisted-meta) .lh-metric:nth-last-child(1) {\n    border-bottom: 1px solid var(--report-border-color-secondary) !important;\n  }\n\n  /* Change the grid to 3 columns for narrow viewport. */\n  .lh-metric__innerwrap {\n  /**\n   * Icon -- Metric Name -- Metric Value\n   */\n    grid-template-columns: calc(var(--score-icon-size) + var(--score-icon-margin-left) + var(--score-icon-margin-right)) 2fr 1fr;\n  }\n  .lh-metric__value {\n    justify-self: end;\n    grid-column-start: unset;\n  }\n}\n\n@container lh-container (max-width: 535px) {\n  .lh-metrics-container {\n    display: block;\n  }\n\n  .lh-metric {\n    border-bottom: none !important;\n  }\n  .lh-category:not(.lh--hoisted-meta) .lh-metric:nth-last-child(1) {\n    border-bottom: 1px solid var(--report-border-color-secondary) !important;\n  }\n\n  /* Change the grid to 3 columns for narrow viewport. */\n  .lh-metric__innerwrap {\n  /**\n   * Icon -- Metric Name -- Metric Value\n   */\n    grid-template-columns: calc(var(--score-icon-size) + var(--score-icon-margin-left) + var(--score-icon-margin-right)) 2fr 1fr;\n  }\n  .lh-metric__value {\n    justify-self: end;\n    grid-column-start: unset;\n  }\n}\n\n/* No-JS toggle switch */\n/* Keep this selector sync\'d w/ \\`magicSelector\\` in report-ui-features-test.js */\n .lh-metrics-toggle__input:checked ~ .lh-metrics-container .lh-metric__description {\n  display: block;\n}\n\n/* TODO get rid of the SVGS and clean up these some more */\n.lh-metrics-toggle__input {\n  opacity: 0;\n  position: absolute;\n  right: 0;\n  top: 0px;\n}\n\n.lh-metrics-toggle__input + div > label > .lh-metrics-toggle__labeltext--hide,\n.lh-metrics-toggle__input:checked + div > label > .lh-metrics-toggle__labeltext--show {\n  display: none;\n}\n.lh-metrics-toggle__input:checked + div > label > .lh-metrics-toggle__labeltext--hide {\n  display: inline;\n}\n.lh-metrics-toggle__input:focus + div > label {\n  outline: -webkit-focus-ring-color auto 3px;\n}\n\n.lh-metrics-toggle__label {\n  cursor: pointer;\n  font-size: var(--report-font-size-secondary);\n  line-height: var(--report-line-height-secondary);\n  color: var(--color-gray-700);\n}\n\n/* Pushes the metric description toggle button to the right. */\n.lh-audit-group--metrics .lh-audit-group__header {\n  display: flex;\n  justify-content: space-between;\n}\n\n.lh-metric__icon,\n.lh-scorescale-range::before {\n  content: \'\';\n  width: var(--score-icon-size);\n  height: var(--score-icon-size);\n  display: inline-block;\n  margin: var(--score-icon-margin);\n}\n\n.lh-metric--pass .lh-metric__value {\n  color: var(--color-pass-secondary);\n}\n.lh-metric--pass .lh-metric__icon {\n  border-radius: 100%;\n  background: var(--color-pass);\n}\n\n.lh-metric--average .lh-metric__value {\n  color: var(--color-average-secondary);\n}\n.lh-metric--average .lh-metric__icon {\n  background: var(--color-average);\n  width: var(--icon-square-size);\n  height: var(--icon-square-size);\n}\n\n.lh-metric--fail .lh-metric__value {\n  color: var(--color-fail-secondary);\n}\n.lh-metric--fail .lh-metric__icon {\n  border-left: calc(var(--score-icon-size) / 2) solid transparent;\n  border-right: calc(var(--score-icon-size) / 2) solid transparent;\n  border-bottom: var(--score-icon-size) solid var(--color-fail);\n}\n\n.lh-metric--error .lh-metric__value,\n.lh-metric--error .lh-metric__description {\n  color: var(--color-fail-secondary);\n}\n\n/* Filmstrip */\n\n.lh-filmstrip-container {\n  /* smaller gap between metrics and filmstrip */\n  margin: -8px auto 0 auto;\n}\n\n.lh-filmstrip {\n  display: flex;\n  justify-content: space-between;\n  justify-items: center;\n  margin-bottom: var(--default-padding);\n  width: 100%;\n}\n\n.lh-filmstrip__frame {\n  overflow: hidden;\n  line-height: 0;\n}\n\n.lh-filmstrip__thumbnail {\n  border: 1px solid var(--report-border-color-secondary);\n  max-height: 150px;\n  max-width: 120px;\n}\n\n.lh-dark .lh-perf-toggle-text {\n  color: rgba(30, 164, 70, 1);\n}\n\n.lh-perf-toggle-text a {\n  color: var(--link-color);\n}\n\n/* Audit */\n\n.lh-audit {\n  border-bottom: 1px solid var(--report-border-color-secondary);\n}\n\n/* Apply border-top to just the first audit. */\n.lh-audit {\n  border-top: 1px solid var(--report-border-color-secondary);\n}\n.lh-audit ~ .lh-audit {\n  border-top: none;\n}\n\n\n.lh-audit--error .lh-audit__display-text {\n  color: var(--color-fail-secondary);\n}\n\n/* Audit Group */\n\n.lh-audit-group {\n  margin-bottom: var(--audit-group-margin-bottom);\n  position: relative;\n}\n.lh-audit-group--metrics {\n  margin-bottom: calc(var(--audit-group-margin-bottom) / 2);\n}\n\n.lh-audit-group--metrics .lh-audit-group__summary {\n  margin-top: 0;\n  margin-bottom: 0;\n}\n\n.lh-audit-group__summary {\n  display: flex;\n  justify-content: space-between;\n  align-items: center;\n}\n\n.lh-audit-group__header .lh-chevron {\n  margin-top: calc((var(--report-line-height) - 5px) / 2);\n}\n\n.lh-audit-group__header {\n  letter-spacing: 0.8px;\n  padding: var(--default-padding);\n  padding-left: 0;\n}\n\n.lh-audit-group__header, .lh-audit-group__summary {\n  font-size: var(--report-font-size-secondary);\n  line-height: var(--report-line-height-secondary);\n  color: var(--color-gray-700);\n}\n\n.lh-audit-group__title {\n  text-transform: uppercase;\n  font-weight: 500;\n}\n\n.lh-audit-group__itemcount {\n  color: var(--color-gray-600);\n}\n\n.lh-audit-group__footer {\n  color: var(--color-gray-600);\n  display: block;\n  margin-top: var(--default-padding);\n}\n\n.lh-details,\n.lh-category-header__description,\n.lh-audit-group__footer {\n  font-size: var(--report-font-size-secondary);\n  line-height: var(--report-line-height-secondary);\n}\n\n.lh-audit-explanation {\n  margin: var(--audit-padding-vertical) 0 calc(var(--audit-padding-vertical) / 2) var(--audit-margin-horizontal);\n  line-height: var(--audit-explanation-line-height);\n  display: inline-block;\n}\n\n.lh-audit--fail .lh-audit-explanation {\n  color: var(--color-fail-secondary);\n}\n\n/* Report */\n.lh-list {\n  margin-right: calc(var(--default-padding) * 2);\n}\n.lh-list > :not(:last-child) {\n  margin-bottom: calc(var(--default-padding) * 2);\n  border-bottom: 1px solid #A8C7FA;\n}\n.lh-list-section {\n  padding: calc(var(--default-padding) * 2) 0;\n}\n.lh-list-section__title {\n  text-decoration: underline;\n}\n\n.lh-header-container {\n  display: block;\n  margin: 0 auto;\n  position: relative;\n  word-wrap: break-word;\n}\n\n.lh-header-container .lh-scores-wrapper {\n  border-bottom: 1px solid var(--color-gray-200);\n}\n\n\n.lh-report {\n  min-width: var(--report-content-min-width);\n}\n\n.lh-exception {\n  font-size: large;\n}\n\n.lh-code {\n  white-space: normal;\n  margin-top: 0;\n  font-size: var(--report-monospace-font-size);\n}\n\n.lh-warnings {\n  --item-margin: calc(var(--report-line-height) / 6);\n  color: var(--color-average-secondary);\n  margin: var(--audit-padding-vertical) 0;\n  padding: var(--default-padding)\n    var(--default-padding)\n    var(--default-padding)\n    calc(var(--audit-description-padding-left));\n  background-color: var(--toplevel-warning-background-color);\n}\n.lh-warnings span {\n  font-weight: bold;\n}\n\n.lh-warnings--toplevel {\n  --item-margin: calc(var(--header-line-height) / 4);\n  color: var(--toplevel-warning-text-color);\n  margin-left: auto;\n  margin-right: auto;\n  max-width: var(--report-content-max-width-minus-edge-gap);\n  padding: var(--toplevel-warning-padding);\n  border-radius: 8px;\n}\n\n.lh-warnings__msg {\n  color: var(--toplevel-warning-message-text-color);\n  margin: 0;\n}\n\n.lh-warnings ul {\n  margin: 0;\n}\n.lh-warnings li {\n  margin: var(--item-margin) 0;\n}\n.lh-warnings li:last-of-type {\n  margin-bottom: 0;\n}\n\n.lh-scores-header {\n  display: flex;\n  flex-wrap: wrap;\n  justify-content: center;\n}\n.lh-scores-header__solo {\n  padding: 0;\n  border: 0;\n}\n\n/* Gauge */\n\n.lh-gauge__wrapper--pass {\n  color: var(--color-pass-secondary);\n  fill: var(--color-pass);\n  stroke: var(--color-pass);\n}\n\n.lh-gauge__wrapper--average {\n  color: var(--color-average-secondary);\n  fill: var(--color-average);\n  stroke: var(--color-average);\n}\n\n.lh-gauge__wrapper--fail {\n  color: var(--color-fail-secondary);\n  fill: var(--color-fail);\n  stroke: var(--color-fail);\n}\n\n.lh-gauge__wrapper--not-applicable {\n  color: var(--color-not-applicable);\n  fill: var(--color-not-applicable);\n  stroke: var(--color-not-applicable);\n}\n\n.lh-fraction__wrapper .lh-fraction__content::before {\n  content: \'\';\n  height: var(--score-icon-size);\n  width: var(--score-icon-size);\n  margin: var(--score-icon-margin);\n  display: inline-block;\n}\n.lh-fraction__wrapper--pass .lh-fraction__content {\n  color: var(--color-pass-secondary);\n}\n.lh-fraction__wrapper--pass .lh-fraction__background {\n  background-color: var(--color-pass);\n}\n.lh-fraction__wrapper--pass .lh-fraction__content::before {\n  background-color: var(--color-pass);\n  border-radius: 50%;\n}\n.lh-fraction__wrapper--average .lh-fraction__content {\n  color: var(--color-average-secondary);\n}\n.lh-fraction__wrapper--average .lh-fraction__background,\n.lh-fraction__wrapper--average .lh-fraction__content::before {\n  background-color: var(--color-average);\n}\n.lh-fraction__wrapper--fail .lh-fraction__content {\n  color: var(--color-fail);\n}\n.lh-fraction__wrapper--fail .lh-fraction__background {\n  background-color: var(--color-fail);\n}\n.lh-fraction__wrapper--fail .lh-fraction__content::before {\n  border-left: calc(var(--score-icon-size) / 2) solid transparent;\n  border-right: calc(var(--score-icon-size) / 2) solid transparent;\n  border-bottom: var(--score-icon-size) solid var(--color-fail);\n}\n.lh-fraction__wrapper--null .lh-fraction__content {\n  color: var(--color-gray-700);\n}\n.lh-fraction__wrapper--null .lh-fraction__background {\n  background-color: var(--color-gray-700);\n}\n.lh-fraction__wrapper--null .lh-fraction__content::before {\n  border-radius: 50%;\n  border: calc(0.2 * var(--score-icon-size)) solid var(--color-gray-700);\n}\n\n.lh-fraction__background {\n  position: absolute;\n  height: 100%;\n  width: 100%;\n  border-radius: calc(var(--gauge-circle-size) / 2);\n  opacity: 0.1;\n  z-index: -1;\n}\n\n.lh-fraction__content-wrapper {\n  height: var(--gauge-circle-size);\n  display: flex;\n  align-items: center;\n}\n\n.lh-fraction__content {\n  display: flex;\n  position: relative;\n  align-items: center;\n  justify-content: center;\n  font-size: calc(0.3 * var(--gauge-circle-size));\n  line-height: calc(0.4 * var(--gauge-circle-size));\n  width: max-content;\n  min-width: calc(1.5 * var(--gauge-circle-size));\n  padding: calc(0.1 * var(--gauge-circle-size)) calc(0.2 * var(--gauge-circle-size));\n  --score-icon-size: calc(0.21 * var(--gauge-circle-size));\n  --score-icon-margin: 0 calc(0.15 * var(--gauge-circle-size)) 0 0;\n}\n\n.lh-gauge {\n  stroke-linecap: round;\n  width: var(--gauge-circle-size);\n  height: var(--gauge-circle-size);\n}\n\n.lh-category .lh-gauge {\n  --gauge-circle-size: var(--gauge-circle-size-big);\n}\n\n.lh-gauge-base {\n  opacity: 0.1;\n}\n\n.lh-gauge-arc {\n  fill: none;\n  transform-origin: 50% 50%;\n  animation: load-gauge var(--transition-length) ease both;\n  animation-delay: 250ms;\n}\n\n.lh-gauge__svg-wrapper {\n  position: relative;\n  height: var(--gauge-circle-size);\n}\n.lh-category .lh-gauge__svg-wrapper,\n.lh-category .lh-fraction__wrapper {\n  --gauge-circle-size: var(--gauge-circle-size-big);\n}\n\n/* The plugin badge overlay */\n.lh-gauge__wrapper--plugin .lh-gauge__svg-wrapper::before {\n  width: var(--plugin-badge-size);\n  height: var(--plugin-badge-size);\n  background-color: var(--plugin-badge-background-color);\n  background-image: var(--plugin-icon-url);\n  background-repeat: no-repeat;\n  background-size: var(--plugin-icon-size);\n  background-position: 58% 50%;\n  content: "";\n  position: absolute;\n  right: -6px;\n  bottom: 0px;\n  display: block;\n  z-index: 100;\n  box-shadow: 0 0 4px rgba(0,0,0,.2);\n  border-radius: 25%;\n}\n.lh-category .lh-gauge__wrapper--plugin .lh-gauge__svg-wrapper::before {\n  width: var(--plugin-badge-size-big);\n  height: var(--plugin-badge-size-big);\n}\n\n@keyframes load-gauge {\n  from { stroke-dasharray: 0 352; }\n}\n\n.lh-gauge__percentage {\n  width: 100%;\n  height: var(--gauge-circle-size);\n  line-height: var(--gauge-circle-size);\n  position: absolute;\n  font-family: var(--report-font-family-monospace);\n  font-size: calc(var(--gauge-circle-size) * 0.34 + 1.3px);\n  text-align: center;\n  top: var(--score-container-padding);\n}\n\n.lh-category .lh-gauge__percentage {\n  --gauge-circle-size: var(--gauge-circle-size-big);\n  --gauge-percentage-font-size: var(--gauge-percentage-font-size-big);\n}\n\n.lh-gauge__wrapper,\n.lh-fraction__wrapper {\n  position: relative;\n  display: flex;\n  align-items: center;\n  flex-direction: column;\n  text-decoration: none;\n  padding: var(--score-container-padding);\n\n  --transition-length: 1s;\n\n  /* Contain the layout style paint & layers during animation*/\n  contain: content;\n  will-change: opacity; /* Only using for layer promotion */\n}\n\n.lh-gauge__label,\n.lh-fraction__label {\n  font-size: var(--gauge-label-font-size);\n  font-weight: 500;\n  line-height: var(--gauge-label-line-height);\n  margin-top: 10px;\n  text-align: center;\n  color: var(--report-text-color);\n  word-break: keep-all;\n}\n\n/* TODO(#8185) use more BEM (.lh-gauge__label--big) instead of relying on descendant selector */\n.lh-category .lh-gauge__label,\n.lh-category .lh-fraction__label {\n  --gauge-label-font-size: var(--gauge-label-font-size-big);\n  --gauge-label-line-height: var(--gauge-label-line-height-big);\n  margin-top: 14px;\n}\n\n.lh-scores-header .lh-gauge__wrapper,\n.lh-scores-header .lh-fraction__wrapper,\n.lh-sticky-header .lh-gauge__wrapper,\n.lh-sticky-header .lh-fraction__wrapper {\n  width: var(--gauge-wrapper-width);\n}\n\n.lh-scorescale {\n  display: inline-flex;\n\n  gap: calc(var(--default-padding) * 4);\n  margin: 16px auto 0 auto;\n  font-size: var(--report-font-size-secondary);\n  color: var(--color-gray-700);\n\n}\n\n.lh-scorescale-range {\n  display: flex;\n  align-items: center;\n  font-family: var(--report-font-family-monospace);\n  white-space: nowrap;\n}\n\n.lh-category-header__finalscreenshot .lh-scorescale {\n  border: 0;\n  display: flex;\n  justify-content: center;\n}\n\n.lh-category-header__finalscreenshot .lh-scorescale-range {\n  font-family: unset;\n  font-size: 12px;\n}\n\n.lh-scorescale-wrap {\n  display: contents;\n}\n\n/* Hide category score gauages if it\'s a single category report */\n.lh-header--solo-category .lh-scores-wrapper {\n  display: none;\n}\n\n\n.lh-categories {\n  width: 100%;\n}\n\n.lh-category {\n  padding: var(--category-padding);\n  max-width: var(--report-content-max-width);\n  margin: 0 auto;\n\n  scroll-margin-top: calc(var(--sticky-header-buffer) - 1em);\n}\n\n.lh-category-wrapper {\n  border-bottom: 1px solid var(--color-gray-200);\n}\n.lh-category-wrapper:last-of-type {\n  border-bottom: 0;\n}\n\n.lh-category-header {\n  margin-bottom: var(--section-padding-vertical);\n}\n\n.lh-category-header .lh-score__gauge {\n  max-width: 400px;\n  width: auto;\n  margin: 0px auto;\n}\n\n.lh-category-header__finalscreenshot {\n  display: grid;\n  grid-template: none / 1fr 1px 1fr;\n  justify-items: center;\n  align-items: center;\n  gap: var(--report-line-height);\n  min-height: 288px;\n  margin-bottom: var(--default-padding);\n}\n\n.lh-final-ss-image {\n  /* constrain the size of the image to not be too large */\n  max-height: calc(var(--gauge-circle-size-big) * 2.8);\n  max-width: calc(var(--gauge-circle-size-big) * 3.5);\n  border: 1px solid var(--color-gray-200);\n  padding: 4px;\n  border-radius: 3px;\n  display: block;\n}\n\n.lh-category-headercol--separator {\n  background: var(--color-gray-200);\n  width: 1px;\n  height: var(--gauge-circle-size-big);\n}\n\n/**\n* This media query is a temporary fallback for browsers that do not support \\`@container query\\`.\n* TODO: remove this media query when \\`@container query\\` is fully supported by browsers\n* See https://github.com/GoogleChrome/lighthouse/pull/16332\n*/\n@media screen and (max-width: 780px) {\n  .lh-category-header__finalscreenshot {\n    grid-template: 1fr 1fr / none\n  }\n  .lh-category-headercol--separator {\n    display: none;\n  }\n}\n\n@container lh-container (max-width: 780px) {\n  .lh-category-header__finalscreenshot {\n    grid-template: 1fr 1fr / none\n  }\n  .lh-category-headercol--separator {\n    display: none;\n  }\n}\n\n/**\n* This media query is a temporary fallback for browsers that do not support \\`@container query\\`.\n* TODO: remove this media query when \\`@container query\\` is fully supported by browsers\n* See https://github.com/GoogleChrome/lighthouse/pull/16332\n*/\n@media screen and (max-width: 964px) {\n  .lh-report {\n    margin-left: 0;\n    width: 100%;\n  }\n}\n\n/* 964 fits the min-width of the filmstrip */\n@container lh-container (max-width: 964px) {\n  .lh-report {\n    margin-left: 0;\n    width: 100%;\n  }\n}\n\n@media print {\n  body {\n    -webkit-print-color-adjust: exact; /* print background colors */\n  }\n  .lh-container {\n    display: block;\n  }\n  .lh-report {\n    margin-left: 0;\n    padding-top: 0;\n  }\n  .lh-categories {\n    margin-top: 0;\n  }\n  .lh-buttons, .lh-highlighter {\n    /* hide stickyheader marker when printing. crbug.com/41486992 */\n    display: none;\n  }\n}\n\n.lh-table {\n  position: relative;\n  border-collapse: separate;\n  border-spacing: 0;\n  /* Can\'t assign padding to table, so shorten the width instead. */\n  width: calc(100% - var(--audit-description-padding-left) - var(--stackpack-padding-horizontal));\n  border: 1px solid var(--report-border-color-secondary);\n}\n\n.lh-table thead th {\n  position: sticky;\n  top: var(--sticky-header-buffer);\n  z-index: 1;\n  background-color: var(--report-background-color);\n  border-bottom: 1px solid var(--report-border-color-secondary);\n  font-weight: normal;\n  color: var(--color-gray-600);\n  /* See text-wrapping comment on .lh-container. */\n  word-break: normal;\n}\n\n.lh-row--group {\n  background-color: var(--table-group-header-background-color);\n}\n\n.lh-row--group td {\n  font-weight: bold;\n  font-size: 1.05em;\n  color: var(--table-group-header-text-color);\n}\n\n.lh-row--group td:first-child {\n  display: block;\n  min-width: max-content;\n  font-weight: normal;\n}\n\n.lh-row--group .lh-text {\n  color: inherit;\n  text-decoration: none;\n  display: inline-block;\n}\n\n.lh-row--group a.lh-link:hover {\n  text-decoration: underline;\n}\n\n.lh-row--group .lh-audit__adorn {\n  text-transform: capitalize;\n  font-weight: normal;\n  padding: 2px 3px 1px 3px;\n}\n\n.lh-row--group .lh-audit__adorn1p {\n  color: var(--link-color);\n  border-color: var(--link-color);\n}\n\n.lh-row--group .lh-report-icon--external::before {\n  content: "";\n  background-repeat: no-repeat;\n  width: 14px;\n  height: 16px;\n  opacity: 0.7;\n  display: inline-block;\n  vertical-align: middle;\n}\n\n.lh-row--group .lh-report-icon--external {\n  visibility: hidden;\n}\n\n.lh-row--group:hover .lh-report-icon--external {\n  visibility: visible;\n}\n\n.lh-dark .lh-report-icon--external::before {\n  filter: invert(1);\n}\n\n/** Manages indentation of two-level and three-level nested adjacent rows */\n\n.lh-row--group ~ [data-entity]:not(.lh-row--group) td:first-child {\n  padding-left: 20px;\n}\n\n.lh-row--group ~ [data-entity]:not(.lh-row--group) ~ .lh-sub-item-row td:first-child {\n  margin-left: 20px;\n  padding-left: 10px;\n  border-left: 1px solid #A8C7FA;\n  display: block;\n}\n\n.lh-row--even {\n  background-color: var(--table-group-header-background-color);\n}\n.lh-row--hidden {\n  display: none;\n}\n\n.lh-table th,\n.lh-table td {\n  padding: var(--default-padding);\n}\n\n.lh-table tr {\n  vertical-align: middle;\n}\n\n.lh-table tr:hover {\n  background-color: var(--table-higlight-background-color);\n}\n\n/* Looks unnecessary, but mostly for keeping the <th>s left-aligned */\n.lh-table-column--text,\n.lh-table-column--source-location,\n.lh-table-column--url,\n/* .lh-table-column--thumbnail, */\n/* .lh-table-column--empty,*/\n.lh-table-column--code,\n.lh-table-column--node {\n  text-align: left;\n}\n\n.lh-table-column--code {\n  min-width: 100px;\n}\n\n.lh-table-column--bytes,\n.lh-table-column--timespanMs,\n.lh-table-column--ms,\n.lh-table-column--numeric {\n  text-align: right;\n  word-break: normal;\n}\n\n\n\n.lh-table .lh-table-column--thumbnail {\n  width: var(--image-preview-size);\n}\n\n.lh-table-column--url {\n  min-width: 250px;\n}\n\n.lh-table-column--text {\n  min-width: 80px;\n}\n\n/* Keep columns narrow if they follow the URL column */\n/* 12% was determined to be a decent narrow width, but wide enough for column headings */\n.lh-table-column--url + th.lh-table-column--bytes,\n.lh-table-column--url + .lh-table-column--bytes + th.lh-table-column--bytes,\n.lh-table-column--url + .lh-table-column--ms,\n.lh-table-column--url + .lh-table-column--ms + th.lh-table-column--bytes,\n.lh-table-column--url + .lh-table-column--bytes + th.lh-table-column--timespanMs {\n  width: 12%;\n}\n\n/** Tweak styling for tables in insight audits. */\n.lh-audit[id$="-insight"] .lh-table {\n  border: none;\n}\n\n.lh-audit[id$="-insight"] .lh-table thead th {\n  font-weight: bold;\n  color: unset;\n}\n\n.lh-audit[id$="-insight"] .lh-table th,\n.lh-audit[id$="-insight"] .lh-table td {\n  padding: calc(var(--default-padding) / 2);\n}\n\n.lh-audit[id$="-insight"] .lh-table .lh-row--even,\n.lh-audit[id$="-insight"] .lh-table tr:not(.lh-row--group):hover {\n  background-color: unset;\n}\n\n.lh-text__url-host {\n  display: inline;\n}\n\n.lh-text__url-host {\n  margin-left: calc(var(--report-font-size) / 2);\n  opacity: 0.6;\n  font-size: 90%\n}\n\n.lh-thumbnail {\n  object-fit: cover;\n  width: var(--image-preview-size);\n  height: var(--image-preview-size);\n  display: block;\n}\n\n.lh-unknown pre {\n  overflow: scroll;\n  border: solid 1px var(--color-gray-200);\n}\n\n.lh-text__url > a {\n  color: inherit;\n  text-decoration: none;\n}\n\n.lh-text__url > a:hover {\n  text-decoration: underline dotted #999;\n}\n\n.lh-sub-item-row {\n  margin-left: 20px;\n  margin-bottom: 0;\n  color: var(--color-gray-700);\n}\n\n.lh-sub-item-row td {\n  padding-top: 4px;\n  padding-bottom: 4px;\n  padding-left: 20px;\n}\n\n.lh-sub-item-row .lh-element-screenshot {\n  zoom: 0.6;\n}\n\n/* Chevron\n   https://codepen.io/paulirish/pen/LmzEmK\n */\n.lh-chevron {\n  --chevron-angle: 42deg;\n  /* Edge doesn\'t support transform: rotate(calc(...)), so we define it here */\n  --chevron-angle-right: -42deg;\n  width: var(--chevron-size);\n  height: var(--chevron-size);\n  margin-top: calc((var(--report-line-height) - 12px) / 2);\n}\n\n.lh-chevron__lines {\n  transition: transform 0.4s;\n  transform: translateY(var(--report-line-height));\n}\n.lh-chevron__line {\n stroke: var(--chevron-line-stroke);\n stroke-width: var(--chevron-size);\n stroke-linecap: square;\n transform-origin: 50%;\n transform: rotate(var(--chevron-angle));\n transition: transform 300ms, stroke 300ms;\n}\n\n.lh-expandable-details .lh-chevron__line-right,\n.lh-expandable-details[open] .lh-chevron__line-left {\n transform: rotate(var(--chevron-angle-right));\n}\n\n.lh-expandable-details[open] .lh-chevron__line-right {\n  transform: rotate(var(--chevron-angle));\n}\n\n\n.lh-expandable-details[open]  .lh-chevron__lines {\n transform: translateY(calc(var(--chevron-size) * -1));\n}\n\n.lh-expandable-details[open] {\n  animation: 300ms openDetails forwards;\n  padding-bottom: var(--default-padding);\n}\n\n@keyframes openDetails {\n  from {\n    outline: 1px solid var(--report-background-color);\n  }\n  to {\n   outline: 1px solid;\n   box-shadow: 0 2px 4px rgba(0, 0, 0, .24);\n  }\n}\n\n/**\n* This media query is a temporary fallback for browsers that do not support \\`@container query\\`.\n* TODO: remove this media query when \\`@container query\\` is fully supported by browsers\n* See https://github.com/GoogleChrome/lighthouse/pull/16332\n*/\n@media screen and (max-width: 780px) {\n  /* no black outline if we\'re not confident the entire table can be displayed within bounds */\n  .lh-expandable-details[open] {\n    animation: none;\n  }\n}\n\n@container lh-container (max-width: 780px) {\n  /* no black outline if we\'re not confident the entire table can be displayed within bounds */\n  .lh-expandable-details[open] {\n    animation: none;\n  }\n}\n\n.lh-expandable-details[open] summary, details.lh-clump > summary {\n  border-bottom: 1px solid var(--report-border-color-secondary);\n}\ndetails.lh-clump[open] > summary {\n  border-bottom-width: 0;\n}\n\n\n\ndetails .lh-clump-toggletext--hide,\ndetails[open] .lh-clump-toggletext--show { display: none; }\ndetails[open] .lh-clump-toggletext--hide { display: block;}\n\n\n/* Tooltip */\n.lh-tooltip-boundary {\n  position: relative;\n}\n\n.lh-tooltip {\n  position: absolute;\n  display: none; /* Don\'t retain these layers when not needed */\n  opacity: 0;\n  background: #ffffff;\n  white-space: pre-line; /* Render newlines in the text */\n  min-width: 246px;\n  max-width: 275px;\n  padding: 15px;\n  border-radius: 5px;\n  text-align: initial;\n  line-height: 1.4;\n}\n\n/**\n* This media query is a temporary fallback for browsers that do not support \\`@container query\\`.\n* TODO: remove this media query when \\`@container query\\` is fully supported by browsers\n* See https://github.com/GoogleChrome/lighthouse/pull/16332\n*/\n@media screen and (max-width: 535px) {\n  .lh-tooltip {\n    min-width: 45cqi;\n    padding: 3cqi;\n  }\n}\n\n/* shrink tooltips to not be cutoff on left edge of narrow container\n   45vw is chosen to be ~= width of the left column of metrics\n*/\n@container lh-container (max-width: 535px) {\n  .lh-tooltip {\n    min-width: 45cqi;\n    padding: 3cqi;\n  }\n}\n\n.lh-tooltip-boundary:hover .lh-tooltip {\n  display: block;\n  animation: fadeInTooltip 250ms;\n  animation-fill-mode: forwards;\n  animation-delay: 850ms;\n  bottom: 100%;\n  z-index: 1;\n  will-change: opacity;\n  right: 0;\n  pointer-events: none;\n}\n\n.lh-tooltip::before {\n  content: "";\n  border: solid transparent;\n  border-bottom-color: #fff;\n  border-width: 10px;\n  position: absolute;\n  bottom: -20px;\n  right: 6px;\n  transform: rotate(180deg);\n  pointer-events: none;\n}\n\n@keyframes fadeInTooltip {\n  0% { opacity: 0; }\n  75% { opacity: 1; }\n  100% { opacity: 1;  filter: drop-shadow(1px 0px 1px #aaa) drop-shadow(0px 2px 4px hsla(206, 6%, 25%, 0.15)); pointer-events: auto; }\n}\n\n/* Element screenshot */\n.lh-element-screenshot {\n  float: left;\n  margin-right: 20px;\n}\n.lh-element-screenshot__content {\n  overflow: hidden;\n  min-width: 110px;\n  display: flex;\n  justify-content: center;\n  background-color: var(--report-background-color);\n}\n.lh-element-screenshot__image {\n  position: relative;\n  /* Set by ElementScreenshotRenderer.installFullPageScreenshotCssVariable */\n  background-image: var(--element-screenshot-url);\n  outline: 2px solid #777;\n  background-color: white;\n  background-repeat: no-repeat;\n}\n.lh-element-screenshot__mask {\n  position: absolute;\n  background: #555;\n  opacity: 0.8;\n}\n.lh-element-screenshot__element-marker {\n  position: absolute;\n  outline: 2px solid var(--color-lime-400);\n}\n.lh-element-screenshot__overlay {\n  position: fixed;\n  top: 0;\n  left: 0;\n  right: 0;\n  bottom: 0;\n  z-index: 2000; /* .lh-topbar is 1000 */\n  background: var(--screenshot-overlay-background);\n  display: flex;\n  align-items: center;\n  justify-content: center;\n  cursor: zoom-out;\n}\n\n.lh-element-screenshot__overlay .lh-element-screenshot {\n  margin-right: 0; /* clearing margin used in thumbnail case */\n  outline: 1px solid var(--color-gray-700);\n}\n\n.lh-screenshot-overlay--enabled .lh-element-screenshot {\n  cursor: zoom-out;\n}\n.lh-screenshot-overlay--enabled .lh-node .lh-element-screenshot {\n  cursor: zoom-in;\n}\n\n\n.lh-meta__items {\n  --meta-icon-size: calc(var(--report-icon-size) * 0.667);\n  padding: var(--default-padding);\n  display: grid;\n  grid-template-columns: 1fr 1fr 1fr;\n  background-color: var(--env-item-background-color);\n  border-radius: 3px;\n  margin: 0 0 var(--default-padding) 0;\n  font-size: 12px;\n  column-gap: var(--default-padding);\n  color: var(--color-gray-700);\n}\n\n.lh-meta__item {\n  display: block;\n  list-style-type: none;\n  position: relative;\n  padding: 0 0 0 calc(var(--meta-icon-size) + var(--default-padding) * 2);\n  cursor: unset; /* disable pointer cursor from report-icon */\n}\n\n.lh-meta__item.lh-tooltip-boundary {\n  text-decoration: dotted underline var(--color-gray-500);\n  cursor: help;\n}\n\n.lh-meta__item.lh-report-icon::before {\n  position: absolute;\n  left: var(--default-padding);\n  width: var(--meta-icon-size);\n  height: var(--meta-icon-size);\n}\n\n.lh-meta__item.lh-report-icon:hover::before {\n  opacity: 0.7;\n}\n\n.lh-meta__item .lh-tooltip {\n  color: var(--color-gray-800);\n}\n\n.lh-meta__item .lh-tooltip::before {\n  right: auto; /* Set the tooltip arrow to the leftside */\n  left: 6px;\n}\n\n.lh-meta__item:hover .lh-tooltip {\n  right: auto;\n  left: 6px;\n}\n/**\n* This media query is a temporary fallback for browsers that do not support \\`@container query\\`.\n* TODO: remove this media query when \\`@container query\\` is fully supported by browsers\n* See https://github.com/GoogleChrome/lighthouse/pull/16332\n*/\n@media screen and (max-width: 640px) {\n  .lh-meta__items {\n    grid-template-columns: 1fr 1fr;\n  }\n}\n\n/* Change the grid for narrow container */\n@container lh-container (max-width: 640px) {\n  .lh-meta__items {\n    grid-template-columns: 1fr 1fr;\n  }\n}\n\n/**\n* This media query is a temporary fallback for browsers that do not support \\`@container query\\`.\n* TODO: remove this media query when \\`@container query\\` is fully supported by browsers\n* See https://github.com/GoogleChrome/lighthouse/pull/16332\n*/\n@media screen and (max-width: 535px) {\n  .lh-meta__items {\n    display: block;\n  }\n}\n\n@container lh-container (max-width: 535px) {\n  .lh-meta__items {\n    display: block;\n  }\n}\n\n/* Explodey gauge */\n\n.lh-exp-gauge-component {\n  margin-bottom: 10px;\n}\n\n.lh-exp-gauge-component circle {\n  stroke: currentcolor;\n  r: var(--radius);\n}\n\n.lh-exp-gauge-component text {\n  font-size: calc(var(--radius) * 0.2);\n}\n\n.lh-exp-gauge-component .lh-exp-gauge {\n  margin: 0 auto;\n  width: 225px;\n  stroke-width: var(--stroke-width);\n  stroke-linecap: round;\n\n  /* for better rendering perf */\n  contain: strict;\n  height: 225px;\n  will-change: transform;\n}\n.lh-exp-gauge-component .lh-exp-gauge--faded {\n  opacity: 0.1;\n}\n.lh-exp-gauge-component .lh-exp-gauge__wrapper {\n  font-family: var(--report-font-family-monospace);\n  text-align: center;\n  text-decoration: none;\n  transition: .3s;\n}\n.lh-exp-gauge-component .lh-exp-gauge__wrapper--pass {\n  color: var(--color-pass);\n}\n.lh-exp-gauge-component .lh-exp-gauge__wrapper--average {\n  color: var(--color-average);\n}\n.lh-exp-gauge-component .lh-exp-gauge__wrapper--fail {\n  color: var(--color-fail);\n}\n.lh-exp-gauge-component .state--expanded {\n  transition: color .3s;\n}\n.lh-exp-gauge-component .state--highlight {\n  color: var(--color-highlight);\n}\n.lh-exp-gauge-component .lh-exp-gauge__svg-wrapper {\n  display: flex;\n  flex-direction: column-reverse;\n}\n\n.lh-exp-gauge-component .lh-exp-gauge__label {\n  fill: var(--report-text-color);\n  font-family: var(--report-font-family);\n  font-size: 12px;\n}\n\n.lh-exp-gauge-component .lh-exp-gauge__cutout {\n  opacity: .999;\n  transition: opacity .3s;\n}\n.lh-exp-gauge-component .state--highlight .lh-exp-gauge__cutout {\n  opacity: 0;\n}\n\n.lh-exp-gauge-component .lh-exp-gauge__inner {\n  color: inherit;\n}\n.lh-exp-gauge-component .lh-exp-gauge__base {\n  fill: currentcolor;\n}\n\n\n.lh-exp-gauge-component .lh-exp-gauge__arc {\n  fill: none;\n  transition: opacity .3s;\n}\n.lh-exp-gauge-component .lh-exp-gauge__arc--metric {\n  color: var(--metric-color);\n  stroke-dashoffset: var(--metric-offset);\n  opacity: 0.3;\n}\n.lh-exp-gauge-component .lh-exp-gauge-hovertarget {\n  color: currentcolor;\n  opacity: 0.001;\n  stroke-linecap: butt;\n  stroke-width: 24;\n  /* hack. move the hover target out of the center. ideally i tweak the r instead but that rquires considerably more math. */\n  transform: scale(1.15);\n}\n.lh-exp-gauge-component .lh-exp-gauge__arc--metric.lh-exp-gauge--miniarc {\n  opacity: 0;\n  stroke-dasharray: 0 calc(var(--circle-meas) * var(--radius));\n  transition: 0s .005s;\n}\n.lh-exp-gauge-component .state--expanded .lh-exp-gauge__arc--metric.lh-exp-gauge--miniarc {\n  opacity: .999;\n  stroke-dasharray: var(--metric-array);\n  transition: 0.3s; /*  calc(.005s + var(--i)*.05s); entrace animation */\n}\n.lh-exp-gauge-component .state--expanded .lh-exp-gauge__inner .lh-exp-gauge__arc {\n  opacity: 0;\n}\n\n\n.lh-exp-gauge-component .lh-exp-gauge__percentage {\n  text-anchor: middle;\n  dominant-baseline: middle;\n  opacity: .999;\n  font-size: calc(var(--radius) * 0.625);\n  transition: opacity .3s ease-in;\n}\n.lh-exp-gauge-component .state--highlight .lh-exp-gauge__percentage {\n  opacity: 0;\n}\n\n.lh-exp-gauge-component .lh-exp-gauge__wrapper--fail .lh-exp-gauge__percentage {\n  fill: var(--color-fail);\n}\n.lh-exp-gauge-component .lh-exp-gauge__wrapper--average .lh-exp-gauge__percentage {\n  fill: var(--color-average);\n}\n.lh-exp-gauge-component .lh-exp-gauge__wrapper--pass .lh-exp-gauge__percentage {\n  fill: var(--color-pass);\n}\n\n.lh-exp-gauge-component .lh-cover {\n  fill: none;\n  opacity: .001;\n  pointer-events: none;\n}\n.lh-exp-gauge-component .state--expanded .lh-cover {\n  pointer-events: auto;\n}\n\n.lh-exp-gauge-component .metric {\n  transform: scale(var(--scale-initial));\n  opacity: 0;\n  transition: transform .1s .2s ease-out,  opacity .3s ease-out;\n  pointer-events: none;\n}\n.lh-exp-gauge-component .metric text {\n  pointer-events: none;\n}\n.lh-exp-gauge-component .metric__value {\n  fill: currentcolor;\n  opacity: 0;\n  transition: opacity 0.2s;\n}\n.lh-exp-gauge-component .state--expanded .metric {\n  transform: scale(1);\n  opacity: .999;\n  transition: transform .3s ease-out,  opacity .3s ease-in,  stroke-width .1s ease-out;\n  transition-delay: calc(var(--i)*.05s);\n  pointer-events: auto;\n}\n.lh-exp-gauge-component .state--highlight .metric {\n  opacity: .3;\n}\n.lh-exp-gauge-component .state--highlight .metric--highlight {\n  opacity: .999;\n  stroke-width: calc(1.5*var(--stroke-width));\n}\n.lh-exp-gauge-component .state--highlight .metric--highlight .metric__value {\n  opacity: 0.999;\n}\n\n\n/*\n the initial first load peek\n*/\n.lh-exp-gauge-component .lh-exp-gauge__bg {  /* needed for the use zindex stacking w/ transparency */\n  fill: var(--report-background-color);\n  stroke: var(--report-background-color);\n}\n.lh-exp-gauge-component .state--peek .metric {\n  transition-delay: 0ms;\n  animation: peek var(--peek-dur) cubic-bezier(0.46, 0.03, 0.52, 0.96);\n  animation-fill-mode: forwards;\n}\n.lh-exp-gauge-component .state--peek .lh-exp-gauge__inner .lh-exp-gauge__arc {\n  opacity: 1;\n}\n.lh-exp-gauge-component .state--peek .lh-exp-gauge__arc.lh-exp-gauge--faded {\n  opacity: 0.3; /* just a tad stronger cuz its fighting with a big solid arg */\n}\n/* do i need to set expanded and override this? */\n.lh-exp-gauge-component .state--peek .lh-exp-gauge__arc--metric.lh-exp-gauge--miniarc {\n  transition: opacity 0.3s;\n}\n.lh-exp-gauge-component .state--peek {\n  color: unset;\n}\n.lh-exp-gauge-component .state--peek .metric__label {\n  display: none;\n}\n\n.lh-exp-gauge-component .metric__label {\n  fill: var(--report-text-color);\n}\n\n@keyframes peek {\n  /* biggest it should go is 0.92. smallest is 0.8 */\n  0% {\n    transform: scale(0.8);\n    opacity: 0.8;\n  }\n\n  50% {\n    transform: scale(0.92);\n    opacity: 1;\n  }\n\n  100% {\n    transform: scale(0.8);\n    opacity: 0.8;\n  }\n}\n\n.lh-exp-gauge-component .wrapper {\n  width: 620px;\n}\n\n/*# sourceURL=report-styles.css */\n`),e.append(t),e}function dt(o){let e=o.createFragment(),t=o.createElement("style");t.append(`\n    .lh-topbar {\n      position: sticky;\n      top: 0;\n      left: 0;\n      right: 0;\n      z-index: 1000;\n      display: flex;\n      align-items: center;\n      height: var(--topbar-height);\n      padding: var(--topbar-padding);\n      font-size: var(--report-font-size-secondary);\n      background-color: var(--topbar-background-color);\n      border-bottom: 1px solid var(--color-gray-200);\n    }\n\n    .lh-topbar__logo {\n      width: var(--topbar-logo-size);\n      height: var(--topbar-logo-size);\n      user-select: none;\n      flex: none;\n    }\n\n    .lh-topbar__url {\n      margin: var(--topbar-padding);\n      text-decoration: none;\n      color: var(--report-text-color);\n      text-overflow: ellipsis;\n      overflow: hidden;\n      white-space: nowrap;\n    }\n\n    .lh-tools {\n      display: flex;\n      align-items: center;\n      margin-left: auto;\n      will-change: transform;\n      min-width: var(--report-icon-size);\n    }\n    .lh-tools__button {\n      width: var(--report-icon-size);\n      min-width: 24px;\n      height: var(--report-icon-size);\n      cursor: pointer;\n      margin-right: 5px;\n      /* This is actually a button element, but we want to style it like a transparent div. */\n      display: flex;\n      background: none;\n      color: inherit;\n      border: none;\n      padding: 0;\n      font: inherit;\n    }\n    .lh-tools__button svg {\n      fill: var(--tools-icon-color);\n    }\n    .lh-dark .lh-tools__button svg {\n      filter: invert(1);\n    }\n    .lh-tools__button.lh-active + .lh-tools__dropdown {\n      opacity: 1;\n      clip: rect(-1px, 194px, 270px, -3px);\n      visibility: visible;\n    }\n    .lh-tools__dropdown {\n      position: absolute;\n      background-color: var(--report-background-color);\n      border: 1px solid var(--report-border-color);\n      border-radius: 3px;\n      padding: calc(var(--default-padding) / 2) 0;\n      cursor: pointer;\n      top: 36px;\n      right: 0;\n      box-shadow: 1px 1px 3px #ccc;\n      min-width: 125px;\n      clip: rect(0, 164px, 0, 0);\n      visibility: hidden;\n      opacity: 0;\n      transition: all 200ms cubic-bezier(0,0,0.2,1);\n    }\n    .lh-tools__dropdown a {\n      color: currentColor;\n      text-decoration: none;\n      white-space: nowrap;\n      padding: 0 6px;\n      line-height: 2;\n    }\n    .lh-tools__dropdown a:hover,\n    .lh-tools__dropdown a:focus {\n      background-color: var(--color-gray-200);\n      outline: none;\n    }\n    /* save-gist option hidden in report. */\n    .lh-tools__dropdown a[data-action=\'save-gist\'] {\n      display: none;\n    }\n\n    .lh-locale-selector {\n      width: 100%;\n      color: var(--report-text-color);\n      background-color: var(--locale-selector-background-color);\n      padding: 2px;\n    }\n    .lh-tools-locale {\n      display: flex;\n      align-items: center;\n      flex-direction: row-reverse;\n    }\n    .lh-tools-locale__selector-wrapper {\n      transition: opacity 0.15s;\n      opacity: 0;\n      max-width: 200px;\n    }\n    .lh-button.lh-tool-locale__button {\n      height: var(--topbar-height);\n      color: var(--tools-icon-color);\n      padding: calc(var(--default-padding) / 2);\n    }\n    .lh-tool-locale__button.lh-active + .lh-tools-locale__selector-wrapper {\n      opacity: 1;\n      clip: rect(-1px, 255px, 242px, -3px);\n      visibility: visible;\n      margin: 0 4px;\n    }\n\n    /**\n    * This media query is a temporary fallback for browsers that do not support \\`@container query\\`.\n    * TODO: remove this media query when \\`@container query\\` is fully supported by browsers\n    * See https://github.com/GoogleChrome/lighthouse/pull/16332\n    */\n    @media screen and (max-width: 964px) {\n      .lh-tools__dropdown {\n        right: 0;\n        left: initial;\n      }\n    }\n\n    @container lh-container (max-width: 964px) {\n      .lh-tools__dropdown {\n        right: 0;\n        left: initial;\n      }\n    }\n\n    @media print {\n      .lh-topbar {\n        position: static;\n        margin-left: 0;\n      }\n\n      .lh-tools__dropdown {\n        display: none;\n      }\n    }\n  `),e.append(t);let n=o.createElement("div","lh-topbar"),r=o.createElementNS("http://www.w3.org/2000/svg","svg","lh-topbar__logo");r.setAttribute("role","img"),r.setAttribute("title","Lighthouse logo"),r.setAttribute("fill","none"),r.setAttribute("xmlns","http://www.w3.org/2000/svg"),r.setAttribute("viewBox","0 0 48 48");let i=o.createElementNS("http://www.w3.org/2000/svg","path");i.setAttribute("d","m14 7 10-7 10 7v10h5v7h-5l5 24H9l5-24H9v-7h5V7Z"),i.setAttribute("fill","#F63");let a=o.createElementNS("http://www.w3.org/2000/svg","path");a.setAttribute("d","M31.561 24H14l-1.689 8.105L31.561 24ZM18.983 48H9l1.022-4.907L35.723 32.27l1.663 7.98L18.983 48Z"),a.setAttribute("fill","#FFA385");let l=o.createElementNS("http://www.w3.org/2000/svg","path");l.setAttribute("fill","#FF3"),l.setAttribute("d","M20.5 10h7v7h-7z"),r.append(" ",i," ",a," ",l," ");let s=o.createElement("a","lh-topbar__url");s.setAttribute("href",""),s.setAttribute("target","_blank"),s.setAttribute("rel","noopener");let c=o.createElement("div","lh-tools"),d=o.createElement("div","lh-tools-locale lh-hidden"),h=o.createElement("button","lh-button lh-tool-locale__button");h.setAttribute("id","lh-button__swap-locales"),h.setAttribute("title","Show Language Picker"),h.setAttribute("aria-label","Toggle language picker"),h.setAttribute("aria-haspopup","menu"),h.setAttribute("aria-expanded","false"),h.setAttribute("aria-controls","lh-tools-locale__selector-wrapper");let p=o.createElementNS("http://www.w3.org/2000/svg","svg");p.setAttribute("width","20px"),p.setAttribute("height","20px"),p.setAttribute("viewBox","0 0 24 24"),p.setAttribute("fill","currentColor");let g=o.createElementNS("http://www.w3.org/2000/svg","path");g.setAttribute("d","M0 0h24v24H0V0z"),g.setAttribute("fill","none");let b=o.createElementNS("http://www.w3.org/2000/svg","path");b.setAttribute("d","M12.87 15.07l-2.54-2.51.03-.03c1.74-1.94 2.98-4.17 3.71-6.53H17V4h-7V2H8v2H1v1.99h11.17C11.5 7.92 10.44 9.75 9 11.35 8.07 10.32 7.3 9.19 6.69 8h-2c.73 1.63 1.73 3.17 2.98 4.56l-5.09 5.02L4 19l5-5 3.11 3.11.76-2.04zM18.5 10h-2L12 22h2l1.12-3h4.75L21 22h2l-4.5-12zm-2.62 7l1.62-4.33L19.12 17h-3.24z"),p.append(g,b),h.append(" ",p," ");let w=o.createElement("div","lh-tools-locale__selector-wrapper");w.setAttribute("id","lh-tools-locale__selector-wrapper"),w.setAttribute("role","menu"),w.setAttribute("aria-labelledby","lh-button__swap-locales"),w.setAttribute("aria-hidden","true"),w.append(" "," "),d.append(" ",h," ",w," ");let f=o.createElement("button","lh-tools__button");f.setAttribute("id","lh-tools-button"),f.setAttribute("title","Tools menu"),f.setAttribute("aria-label","Toggle report tools menu"),f.setAttribute("aria-haspopup","menu"),f.setAttribute("aria-expanded","false"),f.setAttribute("aria-controls","lh-tools-dropdown");let u=o.createElementNS("http://www.w3.org/2000/svg","svg");u.setAttribute("width","100%"),u.setAttribute("height","100%"),u.setAttribute("viewBox","0 0 24 24");let v=o.createElementNS("http://www.w3.org/2000/svg","path");v.setAttribute("d","M0 0h24v24H0z"),v.setAttribute("fill","none");let _=o.createElementNS("http://www.w3.org/2000/svg","path");_.setAttribute("d","M12 8c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"),u.append(" ",v," ",_," "),f.append(" ",u," ");let x=o.createElement("div","lh-tools__dropdown");x.setAttribute("id","lh-tools-dropdown"),x.setAttribute("role","menu"),x.setAttribute("aria-labelledby","lh-tools-button");let S=o.createElement("a","lh-report-icon lh-report-icon--print");S.setAttribute("role","menuitem"),S.setAttribute("tabindex","-1"),S.setAttribute("href","#"),S.setAttribute("data-i18n","dropdownPrintSummary"),S.setAttribute("data-action","print-summary");let A=o.createElement("a","lh-report-icon lh-report-icon--print");A.setAttribute("role","menuitem"),A.setAttribute("tabindex","-1"),A.setAttribute("href","#"),A.setAttribute("data-i18n","dropdownPrintExpanded"),A.setAttribute("data-action","print-expanded");let z=o.createElement("a","lh-report-icon lh-report-icon--copy");z.setAttribute("role","menuitem"),z.setAttribute("tabindex","-1"),z.setAttribute("href","#"),z.setAttribute("data-i18n","dropdownCopyJSON"),z.setAttribute("data-action","copy");let M=o.createElement("a","lh-report-icon lh-report-icon--download lh-hidden");M.setAttribute("role","menuitem"),M.setAttribute("tabindex","-1"),M.setAttribute("href","#"),M.setAttribute("data-i18n","dropdownSaveHTML"),M.setAttribute("data-action","save-html");let $=o.createElement("a","lh-report-icon lh-report-icon--download");$.setAttribute("role","menuitem"),$.setAttribute("tabindex","-1"),$.setAttribute("href","#"),$.setAttribute("data-i18n","dropdownSaveJSON"),$.setAttribute("data-action","save-json");let R=o.createElement("a","lh-report-icon lh-report-icon--open");R.setAttribute("role","menuitem"),R.setAttribute("tabindex","-1"),R.setAttribute("href","#"),R.setAttribute("data-i18n","dropdownViewer"),R.setAttribute("data-action","open-viewer");let N=o.createElement("a","lh-report-icon lh-report-icon--open");N.setAttribute("role","menuitem"),N.setAttribute("tabindex","-1"),N.setAttribute("href","#"),N.setAttribute("data-i18n","dropdownSaveGist"),N.setAttribute("data-action","save-gist");let D=o.createElement("a","lh-report-icon lh-report-icon--open lh-hidden");D.setAttribute("role","menuitem"),D.setAttribute("tabindex","-1"),D.setAttribute("href","#"),D.setAttribute("data-i18n","dropdownViewUnthrottledTrace"),D.setAttribute("data-action","view-unthrottled-trace");let I=o.createElement("a","lh-report-icon lh-report-icon--dark");return I.setAttribute("role","menuitem"),I.setAttribute("tabindex","-1"),I.setAttribute("href","#"),I.setAttribute("data-i18n","dropdownDarkTheme"),I.setAttribute("data-action","toggle-dark"),x.append(" ",S," ",A," ",z," "," ",M," ",$," ",R," ",N," "," ",D," ",I," "),c.append(" ",d," ",f," ",x," "),n.append(" "," ",r," ",s," ",c," "),e.append(n),e}function ht(o){let e=o.createFragment(),t=o.createElement("div","lh-warnings lh-warnings--toplevel"),n=o.createElement("p","lh-warnings__msg"),r=o.createElement("ul");return t.append(" ",n," ",r," "),e.append(t),e}function be(o,e){switch(e){case"3pFilter":return Ge(o);case"audit":return Be(o);case"categoryHeader":return qe(o);case"chevron":return je(o);case"clump":return We(o);case"crc":return Ke(o);case"crcChain":return Je(o);case"elementScreenshot":return Ze(o);case"explodeyGauge":return Qe(o);case"footer":return Ye(o);case"fraction":return Xe(o);case"gauge":return et(o);case"heading":return tt(o);case"metric":return nt(o);case"scorescale":return rt(o);case"scoresWrapper":return ot(o);case"snippet":return it(o);case"snippetContent":return at(o);case"snippetHeader":return lt(o);case"snippetLine":return st(o);case"styles":return ct(o);case"topbar":return dt(o);case"warningsToplevel":return ht(o)}throw new Error("unexpected component: "+e)}var ee=class{constructor(e,t){this._document=e,this._lighthouseChannel="unknown",this._componentCache=new Map,this.rootEl=t}createElement(e,t){let n=this._document.createElement(e);if(t)for(let r of t.split(/\\s+/))r&&n.classList.add(r);return n}createElementNS(e,t,n){let r=this._document.createElementNS(e,t);if(n)for(let i of n.split(/\\s+/))i&&r.classList.add(i);return r}createSVGElement(e,t){return this._document.createElementNS("http://www.w3.org/2000/svg",e,t)}createFragment(){return this._document.createDocumentFragment()}createTextNode(e){return this._document.createTextNode(e)}createChildOf(e,t,n){let r=this.createElement(t,n);return e.append(r),r}createComponent(e){let t=this._componentCache.get(e);if(t){let r=t.cloneNode(!0);return this.findAll("style",r).forEach(i=>i.remove()),r}return t=be(this,e),this._componentCache.set(e,t),t.cloneNode(!0)}clearComponentCache(){this._componentCache.clear()}convertMarkdownLinkSnippets(e,t={}){let n=this.createElement("span");for(let r of E.splitMarkdownLink(e)){let i=r.text.includes("`")?this.convertMarkdownCodeSnippets(r.text):r.text;if(!r.isLink){n.append(i);continue}let a=new URL(r.linkHref);(["https://developers.google.com","https://web.dev","https://developer.chrome.com"].includes(a.origin)||t.alwaysAppendUtmSource)&&(a.searchParams.set("utm_source","lighthouse"),a.searchParams.set("utm_medium",this._lighthouseChannel));let s=this.createElement("a");s.rel="noopener",s.target="_blank",s.append(i),this.safelySetHref(s,a.href),n.append(s)}return n}safelySetHref(e,t){if(t=t||"",t.startsWith("#")){e.href=t;return}let n=["https:","http:"],r;try{r=new URL(t)}catch{}r&&n.includes(r.protocol)&&(e.href=r.href)}safelySetBlobHref(e,t){if(t.type!=="text/html"&&t.type!=="application/json")throw new Error("Unsupported blob type");let n=URL.createObjectURL(t);e.href=n}convertMarkdownCodeSnippets(e){let t=this.createElement("span");for(let n of E.splitMarkdownCodeSpans(e))if(n.isCode){let r=this.createElement("code");r.textContent=n.text,t.append(r)}else t.append(this._document.createTextNode(n.text));return t}setLighthouseChannel(e){this._lighthouseChannel=e}document(){return this._document}isDevTools(){return!!this._document.querySelector(".lh-devtools")}find(e,t=this.rootEl??this._document){let n=this.maybeFind(e,t);if(n===null)throw new Error(`query ${e} not found`);return n}maybeFind(e,t=this.rootEl??this._document){return t.querySelector(e)}findAll(e,t){return Array.from(t.querySelectorAll(e))}fireEventOn(e,t=this._document,n){let r=new CustomEvent(e,n?{detail:n}:void 0);t.dispatchEvent(r)}saveFile(e,t){let n=this.createElement("a");n.download=t,this.safelySetBlobHref(n,e),this._document.body.append(n),n.click(),this._document.body.removeChild(n),setTimeout(()=>URL.revokeObjectURL(n.href),500)}};var _e=0,m=class o{static i18n=null;static strings={};static reportJson=null;static apply(e){o.strings={...we,...e.providedStrings},o.i18n=e.i18n,o.reportJson=e.reportJson}static getUniqueSuffix(){return _e++}static resetUniqueSuffix(){_e=0}};var ye="data:image/jpeg;base64,";function xe(o){o.configSettings.locale||(o.configSettings.locale="en"),o.configSettings.formFactor||(o.configSettings.formFactor=o.configSettings.emulatedFormFactor),o.finalDisplayedUrl=E.getFinalDisplayedUrl(o),o.mainDocumentUrl=E.getMainDocumentUrl(o);for(let n of Object.values(o.audits))if((n.scoreDisplayMode==="not_applicable"||n.scoreDisplayMode==="not-applicable")&&(n.scoreDisplayMode="notApplicable"),n.scoreDisplayMode==="informative"&&(n.score=1),n.details){if((n.details.type===void 0||n.details.type==="diagnostic")&&(n.details.type="debugdata"),n.details.type==="filmstrip")for(let r of n.details.items)r.data.startsWith(ye)||(r.data=ye+r.data);if(n.details.type==="table")for(let r of n.details.headings){let{itemType:i,text:a}=r;i!==void 0&&(r.valueType=i,delete r.itemType),a!==void 0&&(r.label=a,delete r.text);let l=r.subItemsHeading?.itemType;r.subItemsHeading&&l!==void 0&&(r.subItemsHeading.valueType=l,delete r.subItemsHeading.itemType)}if(n.id==="third-party-summary"&&(n.details.type==="opportunity"||n.details.type==="table")){let{headings:r,items:i}=n.details;if(r[0].valueType==="link"){r[0].valueType="text";for(let a of i)typeof a.entity=="object"&&a.entity.type==="link"&&(a.entity=a.entity.text);n.details.isEntityGrouped=!0}}}let[e]=o.lighthouseVersion.split(".").map(Number),t=o.categories.performance;if(t){if(e<9){o.categoryGroups||(o.categoryGroups={}),o.categoryGroups.hidden={title:""};for(let n of t.auditRefs)n.group?n.group==="load-opportunities"&&(n.group="diagnostics"):n.group="hidden"}else if(e<12)for(let n of t.auditRefs)n.group||(n.group="diagnostics")}if(e<12&&t){let n=new Map;for(let r of t.auditRefs){let i=r.relevantAudits;if(!(!i||!r.acronym))for(let a of i){let l=n.get(a)||[];l.push(r.acronym),n.set(a,l)}}for(let[r,i]of n){if(!i.length)continue;let a=o.audits[r];if(a&&!a.metricSavings){a.metricSavings={};for(let l of i)a.metricSavings[l]=0}}}if(o.environment||(o.environment={benchmarkIndex:0,networkUserAgent:o.userAgent,hostUserAgent:o.userAgent}),o.configSettings.screenEmulation||(o.configSettings.screenEmulation={width:-1,height:-1,deviceScaleFactor:-1,mobile:/mobile/i.test(o.environment.hostUserAgent),disabled:!1}),o.i18n||(o.i18n={}),o.audits["full-page-screenshot"]){let n=o.audits["full-page-screenshot"].details;n?o.fullPageScreenshot={screenshot:n.screenshot,nodes:n.nodes}:o.fullPageScreenshot=null,delete o.audits["full-page-screenshot"]}}var O=E.RATINGS,k=class o{static prepareReportResult(e){let t=JSON.parse(JSON.stringify(e));xe(t);for(let r of Object.values(t.audits))r.details&&(r.details.type==="opportunity"||r.details.type==="table")&&!r.details.isEntityGrouped&&t.entities&&o.classifyEntities(t.entities,r.details);if(typeof t.categories!="object")throw new Error("No categories provided.");let n=new Map;for(let r of Object.values(t.categories))r.auditRefs.forEach(i=>{i.acronym&&n.set(i.acronym,i)}),r.auditRefs.forEach(i=>{let a=t.audits[i.id];i.result=a;let l=Object.keys(i.result.metricSavings||{});if(l.length){i.relevantMetrics=[];for(let s of l){let c=n.get(s);c&&i.relevantMetrics.push(c)}}if(t.stackPacks){let s=[i.id,...i.result.replacesAudits??[]];t.stackPacks.forEach(c=>{let d=s.find(h=>c.descriptions[h]);d&&c.descriptions[d]&&(i.stackPacks=i.stackPacks||[],i.stackPacks.push({title:c.title,iconDataURL:c.iconDataURL,description:c.descriptions[d]}))})}});return t}static getUrlLocatorFn(e){let t=e.find(r=>r.valueType==="url")?.key;if(t&&typeof t=="string")return r=>{let i=r[t];if(typeof i=="string")return i};let n=e.find(r=>r.valueType==="source-location")?.key;if(n)return r=>{let i=r[n];if(typeof i=="object"&&i.type==="source-location")return i.url}}static classifyEntities(e,t){let{items:n,headings:r}=t;if(!n.length||n.some(a=>a.entity))return;let i=o.getUrlLocatorFn(r);if(i)for(let a of n){let l=i(a);if(!l)continue;let s="";try{s=E.parseURL(l).origin}catch{}if(!s)continue;let c=e.find(d=>d.origins.includes(s));c&&(a.entity=c.name)}}static getTableItemSortComparator(e){return(t,n)=>{for(let r of e){let i=t[r],a=n[r];if((typeof i!=typeof a||!["number","string"].includes(typeof i))&&console.warn(`Warning: Attempting to sort unsupported value type: ${r}.`),typeof i=="number"&&typeof a=="number"&&i!==a)return a-i;if(typeof i=="string"&&typeof a=="string"&&i!==a)return i.localeCompare(a)}return 0}}static getEmulationDescriptions(e){let t,n,r,i=e.throttling,a=m.i18n,l=m.strings;switch(e.throttlingMethod){case"provided":r=n=t=l.throttlingProvided;break;case"devtools":{let{cpuSlowdownMultiplier:p,requestLatencyMs:g}=i;t=`${a.formatNumber(p)}x slowdown (DevTools)`,n=`${a.formatMilliseconds(g)} HTTP RTT, ${a.formatKbps(i.downloadThroughputKbps)} down, ${a.formatKbps(i.uploadThroughputKbps)} up (DevTools)`,r=g===150*3.75&&i.downloadThroughputKbps===1.6*1024*.9&&i.uploadThroughputKbps===750*.9?l.runtimeSlow4g:l.runtimeCustom;break}case"simulate":{let{cpuSlowdownMultiplier:p,rttMs:g,throughputKbps:b}=i;t=`${a.formatNumber(p)}x slowdown (Simulated)`,n=`${a.formatMilliseconds(g)} TCP RTT, ${a.formatKbps(b)} throughput (Simulated)`,r=g===150&&b===1.6*1024?l.runtimeSlow4g:l.runtimeCustom;break}default:r=t=n=l.runtimeUnknown}let s=e.channel==="devtools"?!1:e.screenEmulation.disabled,c=e.channel==="devtools"?e.formFactor==="mobile":e.screenEmulation.mobile,d=l.runtimeMobileEmulation;s?d=l.runtimeNoEmulation:c||(d=l.runtimeDesktopEmulation);let h=s?void 0:`${e.screenEmulation.width}x${e.screenEmulation.height}, DPR ${e.screenEmulation.deviceScaleFactor}`;return{deviceEmulation:d,screenEmulation:h,cpuThrottling:t,networkThrottling:n,summary:r}}static showAsPassed(e){switch(e.scoreDisplayMode){case"manual":case"notApplicable":return!0;case"error":case"informative":return!1;case"numeric":case"binary":default:return Number(e.score)>=O.PASS.minScore}}static calculateRating(e,t){if(t==="manual"||t==="notApplicable")return O.PASS.label;if(t==="error")return O.ERROR.label;if(e===null)return O.FAIL.label;let n=O.FAIL.label;return e>=O.PASS.minScore?n=O.PASS.label:e>=O.AVERAGE.minScore&&(n=O.AVERAGE.label),n}static calculateCategoryFraction(e){let t=0,n=0,r=0,i=0;for(let a of e.auditRefs){let l=o.showAsPassed(a.result);if(!(a.group==="hidden"||a.result.scoreDisplayMode==="manual"||a.result.scoreDisplayMode==="notApplicable")){if(a.result.scoreDisplayMode==="informative"){l||++r;continue}++t,i+=a.weight,l&&n++}}return{numPassed:n,numPassableAudits:t,numInformative:r,totalWeight:i}}static isPluginCategory(e){return e.startsWith("lighthouse-plugin-")}static shouldDisplayAsFraction(e){return e==="timespan"||e==="snapshot"}},we={varianceDisclaimer:"Values are estimated and may vary. The [performance score is calculated](https://developer.chrome.com/docs/lighthouse/performance/performance-scoring/) directly from these metrics.",calculatorLink:"See calculator.",showRelevantAudits:"Show audits relevant to:",opportunityResourceColumnLabel:"Opportunity",opportunitySavingsColumnLabel:"Estimated Savings",errorMissingAuditInfo:"Report error: no audit information",errorLabel:"Error!",warningHeader:"Warnings: ",warningAuditsGroupTitle:"Passed audits but with warnings",passedAuditsGroupTitle:"Passed audits",notApplicableAuditsGroupTitle:"Not applicable",manualAuditsGroupTitle:"Additional items to manually check",toplevelWarningsMessage:"There were issues affecting this run of Lighthouse:",crcInitialNavigation:"Initial Navigation",crcLongestDurationLabel:"Maximum critical path latency:",snippetExpandButtonLabel:"Expand snippet",snippetCollapseButtonLabel:"Collapse snippet",lsPerformanceCategoryDescription:"[Lighthouse](https://developers.google.com/web/tools/lighthouse/) analysis of the current page on an emulated mobile network. Values are estimated and may vary.",labDataTitle:"Lab Data",thirdPartyResourcesLabel:"Show 3rd-party resources",viewTreemapLabel:"View Treemap",viewTraceLabel:"View Trace",dropdownPrintSummary:"Print Summary",dropdownPrintExpanded:"Print Expanded",dropdownCopyJSON:"Copy JSON",dropdownSaveHTML:"Save as HTML",dropdownSaveJSON:"Save as JSON",dropdownViewer:"Open in Viewer",dropdownSaveGist:"Save as Gist",dropdownDarkTheme:"Toggle Dark Theme",dropdownViewUnthrottledTrace:"View Unthrottled Trace",runtimeSettingsDevice:"Device",runtimeSettingsNetworkThrottling:"Network throttling",runtimeSettingsCPUThrottling:"CPU throttling",runtimeSettingsUANetwork:"User agent (network)",runtimeSettingsBenchmark:"Unthrottled CPU/Memory Power",runtimeSettingsAxeVersion:"Axe version",runtimeSettingsScreenEmulation:"Screen emulation",footerIssue:"File an issue",runtimeNoEmulation:"No emulation",runtimeMobileEmulation:"Emulated Moto G Power",runtimeDesktopEmulation:"Emulated Desktop",runtimeUnknown:"Unknown",runtimeSingleLoad:"Single page session",runtimeAnalysisWindow:"Initial page load",runtimeAnalysisWindowTimespan:"User interactions timespan",runtimeAnalysisWindowSnapshot:"Point-in-time snapshot",runtimeSingleLoadTooltip:"This data is taken from a single page session, as opposed to field data summarizing many sessions.",throttlingProvided:"Provided by environment",show:"Show",hide:"Hide",expandView:"Expand view",collapseView:"Collapse view",runtimeSlow4g:"Slow 4G throttling",runtimeCustom:"Custom throttling",firstPartyChipLabel:"1st party",openInANewTabTooltip:"Open in a new tab",unattributable:"Unattributable",unscoredLabel:"Unscored",unscoredTitle:"This audit does not contribute to the overall category score."};var G=class{constructor(e,t){this.dom=e,this.detailsRenderer=t}get _clumpTitles(){return{warning:m.strings.warningAuditsGroupTitle,manual:m.strings.manualAuditsGroupTitle,passed:m.strings.passedAuditsGroupTitle,notApplicable:m.strings.notApplicableAuditsGroupTitle}}renderAudit(e){let t=m.strings,n=this.dom.createComponent("audit"),r=this.dom.find("div.lh-audit",n);r.id=e.result.id;let i=e.result.scoreDisplayMode;e.result.displayValue&&(this.dom.find(".lh-audit__display-text",r).textContent=e.result.displayValue);let a=this.dom.find(".lh-audit__title",r);a.append(this.dom.convertMarkdownCodeSnippets(e.result.title));let l=this.dom.find(".lh-audit__description",r);l.append(this.dom.convertMarkdownLinkSnippets(e.result.description));for(let p of e.relevantMetrics||[]){let g=this.dom.createChildOf(l,"span","lh-audit__adorn");g.title=`Relevant to ${p.result.title}`,g.textContent=p.acronym||p.id}if(e.weight===0){let p=this.dom.createChildOf(l,"span","lh-audit__adorn");p.title=m.strings.unscoredTitle,p.textContent=m.strings.unscoredLabel}e.stackPacks&&e.stackPacks.forEach(p=>{let g=this.dom.createElement("img","lh-audit__stackpack__img");g.src=p.iconDataURL,g.alt=p.title;let b=this.dom.convertMarkdownLinkSnippets(p.description,{alwaysAppendUtmSource:!0}),w=this.dom.createElement("div","lh-audit__stackpack");w.append(g,b),this.dom.find(".lh-audit__stackpacks",r).append(w)});let s=this.dom.find("details",r);if(e.result.details){let p=this.detailsRenderer.render(e.result.details);p&&(p.classList.add("lh-details"),s.append(p))}if(this.dom.find(".lh-chevron-container",r).append(this._createChevron()),this._setRatingClass(r,e.result.score,i),e.result.scoreDisplayMode==="error"){r.classList.add("lh-audit--error");let p=this.dom.find(".lh-audit__display-text",r);p.textContent=t.errorLabel,p.classList.add("lh-tooltip-boundary");let g=this.dom.createChildOf(p,"div","lh-tooltip lh-tooltip--error");g.textContent=e.result.errorMessage||t.errorMissingAuditInfo}else if(e.result.explanation){let p=this.dom.createChildOf(a,"div","lh-audit-explanation");p.textContent=e.result.explanation}let c=e.result.warnings;if(!c||c.length===0)return r;let d=this.dom.find("summary",s),h=this.dom.createChildOf(d,"div","lh-warnings");if(this.dom.createChildOf(h,"span").textContent=t.warningHeader,c.length===1)h.append(this.dom.createTextNode(c.join("")));else{let p=this.dom.createChildOf(h,"ul");for(let g of c){let b=this.dom.createChildOf(p,"li");b.textContent=g}}return r}injectFinalScreenshot(e,t,n){let r=t["final-screenshot"];if(!r||r.scoreDisplayMode==="error"||!r.details||r.details.type!=="screenshot")return null;let i=this.dom.createElement("img","lh-final-ss-image"),a=r.details.data;i.src=a,i.alt=r.title;let l=this.dom.find(".lh-category .lh-category-header",e),s=this.dom.createElement("div","lh-category-headercol"),c=this.dom.createElement("div","lh-category-headercol lh-category-headercol--separator"),d=this.dom.createElement("div","lh-category-headercol");s.append(...l.childNodes),s.append(n),d.append(i),l.append(s,c,d),l.classList.add("lh-category-header__finalscreenshot")}_createChevron(){let e=this.dom.createComponent("chevron");return this.dom.find("svg.lh-chevron",e)}_setRatingClass(e,t,n){let r=k.calculateRating(t,n);return e.classList.add(`lh-audit--${n.toLowerCase()}`),n!=="informative"&&e.classList.add(`lh-audit--${r}`),e}renderCategoryHeader(e,t,n){let r=this.dom.createComponent("categoryHeader"),i=this.dom.find(".lh-score__gauge",r),a=this.renderCategoryScore(e,t,n);if(i.append(a),e.description){let l=this.dom.convertMarkdownLinkSnippets(e.description);this.dom.find(".lh-category-header__description",r).append(l)}return r}renderAuditGroup(e){let t=this.dom.createElement("div","lh-audit-group"),n=this.dom.createElement("div","lh-audit-group__header");this.dom.createChildOf(n,"span","lh-audit-group__title").textContent=e.title,t.append(n);let r=null;return e.description&&(r=this.dom.convertMarkdownLinkSnippets(e.description),r.classList.add("lh-audit-group__description","lh-audit-group__footer"),t.append(r)),[t,r]}_renderGroupedAudits(e,t){let n=new Map,r="NotAGroup";n.set(r,[]);for(let a of e){let l=a.group||r,s=n.get(l)||[];s.push(a),n.set(l,s)}let i=[];for(let[a,l]of n){if(a===r){for(let h of l)i.push(this.renderAudit(h));continue}let s=t[a],[c,d]=this.renderAuditGroup(s);for(let h of l)c.insertBefore(this.renderAudit(h),d);c.classList.add(`lh-audit-group--${a}`),i.push(c)}return i}renderUnexpandableClump(e,t){let n=this.dom.createElement("div");return this._renderGroupedAudits(e,t).forEach(i=>n.append(i)),n}renderClump(e,{auditRefsOrEls:t,description:n,openByDefault:r}){let i=this.dom.createComponent("clump"),a=this.dom.find(".lh-clump",i);r&&a.setAttribute("open","");let l=this.dom.find(".lh-audit-group__header",a),s=this._clumpTitles[e];this.dom.find(".lh-audit-group__title",l).textContent=s;let c=this.dom.find(".lh-audit-group__itemcount",a);c.textContent=`(${t.length})`;let d=t.map(p=>p instanceof HTMLElement?p:this.renderAudit(p));a.append(...d);let h=this.dom.find(".lh-audit-group",i);if(n){let p=this.dom.convertMarkdownLinkSnippets(n);p.classList.add("lh-audit-group__description","lh-audit-group__footer"),h.append(p)}return this.dom.find(".lh-clump-toggletext--show",h).textContent=m.strings.show,this.dom.find(".lh-clump-toggletext--hide",h).textContent=m.strings.hide,a.classList.add(`lh-clump--${e.toLowerCase()}`),h}renderCategoryScore(e,t,n){let r;if(n&&k.shouldDisplayAsFraction(n.gatherMode)?r=this.renderCategoryFraction(e):r=this.renderScoreGauge(e,t),n?.omitLabel&&this.dom.find(".lh-gauge__label,.lh-fraction__label",r).remove(),n?.onPageAnchorRendered){let i=this.dom.find("a",r);n.onPageAnchorRendered(i)}return r}renderScoreGauge(e,t){let n=this.dom.createComponent("gauge"),r=this.dom.find("a.lh-gauge__wrapper",n);k.isPluginCategory(e.id)&&r.classList.add("lh-gauge__wrapper--plugin");let i=Number(e.score),a=this.dom.find(".lh-gauge",n),l=this.dom.find("circle.lh-gauge-arc",a);l&&this._setGaugeArc(l,i);let s=Math.round(i*100),c=this.dom.find("div.lh-gauge__percentage",n);return c.textContent=s.toString(),e.score===null&&(c.classList.add("lh-gauge--error"),c.textContent="",c.title=m.strings.errorLabel),e.auditRefs.length===0||this.hasApplicableAudits(e)?r.classList.add(`lh-gauge__wrapper--${k.calculateRating(e.score)}`):(r.classList.add("lh-gauge__wrapper--not-applicable"),c.textContent="-",c.title=m.strings.notApplicableAuditsGroupTitle),this.dom.find(".lh-gauge__label",n).textContent=e.title,n}renderCategoryFraction(e){let t=this.dom.createComponent("fraction"),n=this.dom.find("a.lh-fraction__wrapper",t),{numPassed:r,numPassableAudits:i,totalWeight:a}=k.calculateCategoryFraction(e),l=r/i,s=this.dom.find(".lh-fraction__content",t),c=this.dom.createElement("span");c.textContent=`${r}/${i}`,s.append(c);let d=k.calculateRating(l);return a===0&&(d="null"),n.classList.add(`lh-fraction__wrapper--${d}`),this.dom.find(".lh-fraction__label",t).textContent=e.title,t}hasApplicableAudits(e){return e.auditRefs.some(t=>t.result.scoreDisplayMode!=="notApplicable")}_setGaugeArc(e,t){let n=2*Math.PI*Number(e.getAttribute("r")),r=Number(e.getAttribute("stroke-width")),i=.25*r/n;e.style.transform=`rotate(${-90+i*360}deg)`;let a=t*n-r/2;t===0&&(e.style.opacity="0"),t===1&&(a=n),e.style.strokeDasharray=`${Math.max(a,0)} ${n}`}_auditHasWarning(e){return!!e.result.warnings?.length}_getClumpIdForAuditRef(e){let t=e.result.scoreDisplayMode;return t==="manual"||t==="notApplicable"?t:k.showAsPassed(e.result)?this._auditHasWarning(e)?"warning":"passed":"failed"}render(e,t={},n){let r=this.dom.createElement("div","lh-category");r.id=e.id,r.append(this.renderCategoryHeader(e,t,n));let i=new Map;i.set("failed",[]),i.set("warning",[]),i.set("manual",[]),i.set("passed",[]),i.set("notApplicable",[]);for(let l of e.auditRefs){if(l.group==="hidden")continue;let s=this._getClumpIdForAuditRef(l),c=i.get(s);c.push(l),i.set(s,c)}for(let l of i.values())l.sort((s,c)=>c.weight-s.weight);let a=i.get("failed")?.length;for(let[l,s]of i){if(s.length===0)continue;if(l==="failed"){let p=this.renderUnexpandableClump(s,t);p.classList.add("lh-clump--failed"),r.append(p);continue}let c=l==="manual"?e.manualDescription:void 0,d=l==="warning"||l==="manual"&&a===0,h=this.renderClump(l,{auditRefsOrEls:s,description:c,openByDefault:d});r.append(h)}return r}};var Y=class{static createSegment(e,t,n,r){let i=e[t],a=Object.keys(e),l=a.indexOf(t)===a.length-1,s=!!i.children&&Object.keys(i.children).length>0,c=Array.isArray(n)?n.slice(0):[];return typeof r<"u"&&c.push(!r),{node:i,isLastChild:l,hasChildren:s,treeMarkers:c}}static createChainNode(e,t,n){let r=e.createComponent("crcChain"),i,a,l,s,c;"request"in t.node?(a=t.node.request.transferSize,l=t.node.request.url,i=(t.node.request.endTime-t.node.request.startTime)*1e3,s=!1):(a=t.node.transferSize,l=t.node.url,i=t.node.navStartToEndTime,s=!0,c=t.node.isLongest);let d=e.find(".lh-crc-node",r);d.setAttribute("title",l),c&&d.classList.add("lh-crc-node__longest");let h=e.find(".lh-crc-node__tree-marker",r);t.treeMarkers.forEach(f=>{let u=f?"lh-tree-marker lh-vert":"lh-tree-marker";h.append(e.createElement("span",u),e.createElement("span","lh-tree-marker"))});let p=t.isLastChild?"lh-tree-marker lh-up-right":"lh-tree-marker lh-vert-right",g=t.hasChildren?"lh-tree-marker lh-horiz-down":"lh-tree-marker lh-right";h.append(e.createElement("span",p),e.createElement("span","lh-tree-marker lh-right"),e.createElement("span",g));let b=n.renderTextURL(l),w=e.find(".lh-crc-node__tree-value",r);if(w.append(b),!t.hasChildren||s){let f=e.createElement("span","lh-crc-node__chain-duration");f.textContent=" - "+m.i18n.formatMilliseconds(i)+", ";let u=e.createElement("span","lh-crc-node__chain-size");u.textContent=m.i18n.formatBytesToKiB(a,.01),w.append(f,u)}return r}static buildTree(e,t,n,r){if(n.append(Q.createChainNode(e,t,r)),t.node.children)for(let i of Object.keys(t.node.children)){let a=Q.createSegment(t.node.children,i,t.treeMarkers,t.isLastChild);Q.buildTree(e,a,n,r)}}static render(e,t,n){let r=e.createComponent("crc"),i=e.find(".lh-crc",r);e.find(".lh-crc-initial-nav",r).textContent=m.strings.crcInitialNavigation,e.find(".lh-crc__longest_duration_label",r).textContent=m.strings.crcLongestDurationLabel,e.find(".lh-crc__longest_duration",r).textContent=m.i18n.formatMilliseconds(t.longestChain.duration);let a=t.chains;for(let l of Object.keys(a)){let s=Q.createSegment(a,l);Q.buildTree(e,s,i,n)}return e.find(".lh-crc-container",r)}},Q=Y;function pt(o,e){return e.left<=o.width&&0<=e.right&&e.top<=o.height&&0<=e.bottom}function ke(o,e,t){return o<e?e:o>t?t:o}function ut(o){return{x:o.left+o.width/2,y:o.top+o.height/2}}var V=class o{static getScreenshotPositions(e,t,n){let r=ut(e),i=ke(r.x-t.width/2,0,n.width-t.width),a=ke(r.y-t.height/2,0,n.height-t.height);return{screenshot:{left:i,top:a},clip:{left:e.left-i,top:e.top-a}}}static renderClipPathInScreenshot(e,t,n,r,i){let a=e.find("clipPath",t),l=`clip-${m.getUniqueSuffix()}`;a.id=l,t.style.clipPath=`url(#${l})`;let s=n.top/i.height,c=s+r.height/i.height,d=n.left/i.width,h=d+r.width/i.width,p=[`0,0             1,0            1,${s}          0,${s}`,`0,${c}     1,${c}    1,1               0,1`,`0,${s}        ${d},${s} ${d},${c} 0,${c}`,`${h},${s} 1,${s}       1,${c}       ${h},${c}`];for(let g of p){let b=e.createElementNS("http://www.w3.org/2000/svg","polygon");b.setAttribute("points",g),a.append(b)}}static installFullPageScreenshot(e,t){e.style.setProperty("--element-screenshot-url",`url(\'${t.data}\')`)}static installOverlayFeature(e){let{dom:t,rootEl:n,overlayContainerEl:r,fullPageScreenshot:i}=e,a="lh-screenshot-overlay--enabled";n.classList.contains(a)||(n.classList.add(a),n.addEventListener("click",l=>{let s=l.target;if(!s)return;let c=s.closest(".lh-node > .lh-element-screenshot");if(!c)return;let d=t.createElement("div","lh-element-screenshot__overlay");r.append(d);let h={width:d.clientWidth*.95,height:d.clientHeight*.8},p={width:Number(c.dataset.rectWidth),height:Number(c.dataset.rectHeight),left:Number(c.dataset.rectLeft),right:Number(c.dataset.rectLeft)+Number(c.dataset.rectWidth),top:Number(c.dataset.rectTop),bottom:Number(c.dataset.rectTop)+Number(c.dataset.rectHeight)},g=o.render(t,i.screenshot,p,h);if(!g){d.remove();return}d.append(g),d.addEventListener("click",()=>d.remove())}))}static _computeZoomFactor(e,t){let r={x:t.width/e.width,y:t.height/e.height},i=.75*Math.min(r.x,r.y);return Math.min(1,i)}static render(e,t,n,r){if(!pt(t,n))return null;let i=e.createComponent("elementScreenshot"),a=e.find("div.lh-element-screenshot",i);a.dataset.rectWidth=n.width.toString(),a.dataset.rectHeight=n.height.toString(),a.dataset.rectLeft=n.left.toString(),a.dataset.rectTop=n.top.toString();let l=this._computeZoomFactor(n,r),s={width:r.width/l,height:r.height/l};s.width=Math.min(t.width,s.width),s.height=Math.min(t.height,s.height);let c={width:s.width*l,height:s.height*l},d=o.getScreenshotPositions(n,s,{width:t.width,height:t.height}),h=e.find("div.lh-element-screenshot__image",a);h.style.width=c.width+"px",h.style.height=c.height+"px",h.style.backgroundPositionY=-(d.screenshot.top*l)+"px",h.style.backgroundPositionX=-(d.screenshot.left*l)+"px",h.style.backgroundSize=`${t.width*l}px ${t.height*l}px`;let p=e.find("div.lh-element-screenshot__element-marker",a);p.style.width=n.width*l+"px",p.style.height=n.height*l+"px",p.style.left=d.clip.left*l+"px",p.style.top=d.clip.top*l+"px";let g=e.find("div.lh-element-screenshot__mask",a);return g.style.width=c.width+"px",g.style.height=c.height+"px",o.renderClipPathInScreenshot(e,g,d.clip,n,s),a}};var gt=["http://","https://","data:"],mt=["bytes","numeric","ms","timespanMs"],X=class{constructor(e,t={}){this._dom=e,this._fullPageScreenshot=t.fullPageScreenshot,this._entities=t.entities}render(e){switch(e.type){case"filmstrip":return this._renderFilmstrip(e);case"list":return this._renderList(e);case"checklist":return this._renderChecklist(e);case"table":case"opportunity":return this._renderTable(e);case"network-tree":case"criticalrequestchain":return Y.render(this._dom,e,this);case"screenshot":case"debugdata":case"treemap-data":return null;default:return this._renderUnknown(e.type,e)}}_renderBytes(e){let t=m.i18n.formatBytesToKiB(e.value,e.granularity||.1),n=this._renderText(t);return n.title=m.i18n.formatBytes(e.value),n}_renderMilliseconds(e){let t;return e.displayUnit==="duration"?t=m.i18n.formatDuration(e.value):t=m.i18n.formatMilliseconds(e.value,e.granularity||10),this._renderText(t)}renderTextURL(e){let t=e,n,r,i;try{let l=E.parseURL(t);n=l.file==="/"?l.origin:l.file,r=l.file==="/"||l.hostname===""?"":`(${l.hostname})`,i=t}catch{n=t}let a=this._dom.createElement("div","lh-text__url");if(a.append(this._renderLink({text:n,url:t})),r){let l=this._renderText(r);l.classList.add("lh-text__url-host"),a.append(l)}return i&&(a.title=t,a.dataset.url=t),a}_renderLink(e){let t=this._dom.createElement("a");if(this._dom.safelySetHref(t,e.url),!t.href){let n=this._renderText(e.text);return n.classList.add("lh-link"),n}return t.rel="noopener",t.target="_blank",t.textContent=e.text,t.classList.add("lh-link"),t}_renderText(e){let t=this._dom.createElement("div","lh-text");return t.textContent=e,t}_renderNumeric(e){let t=m.i18n.formatNumber(e.value,e.granularity||.1),n=this._dom.createElement("div","lh-numeric");return n.textContent=t,n}_renderThumbnail(e){let t=this._dom.createElement("img","lh-thumbnail"),n=e;return t.src=n,t.title=n,t.alt="",t}_renderUnknown(e,t){console.error(`Unknown details type: ${e}`,t);let n=this._dom.createElement("details","lh-unknown");return this._dom.createChildOf(n,"summary").textContent=`We don\'t know how to render audit details of type \\`${e}\\`. The Lighthouse version that collected this data is likely newer than the Lighthouse version of the report renderer. Expand for the raw JSON.`,this._dom.createChildOf(n,"pre").textContent=JSON.stringify(t,null,2),n}_renderTableValue(e,t){if(e==null)return null;if(typeof e=="object")switch(e.type){case"code":return this._renderCode(e.value);case"link":return this._renderLink(e);case"node":return this.renderNode(e);case"numeric":return this._renderNumeric(e);case"text":return this._renderText(e.value);case"source-location":return this.renderSourceLocation(e);case"url":return this.renderTextURL(e.value);default:return this._renderUnknown(e.type,e)}switch(t.valueType){case"bytes":{let n=Number(e);return this._renderBytes({value:n,granularity:t.granularity})}case"code":{let n=String(e);return this._renderCode(n)}case"ms":{let n={value:Number(e),granularity:t.granularity,displayUnit:t.displayUnit};return this._renderMilliseconds(n)}case"numeric":{let n=Number(e);return this._renderNumeric({value:n,granularity:t.granularity})}case"text":{let n=String(e);return this._renderText(n)}case"thumbnail":{let n=String(e);return this._renderThumbnail(n)}case"timespanMs":{let n=Number(e);return this._renderMilliseconds({value:n})}case"url":{let n=String(e);return gt.some(r=>n.startsWith(r))?this.renderTextURL(n):this._renderCode(n)}default:return this._renderUnknown(t.valueType,e)}}_getDerivedSubItemsHeading(e){return e.subItemsHeading?{key:e.subItemsHeading.key||"",valueType:e.subItemsHeading.valueType||e.valueType,granularity:e.subItemsHeading.granularity||e.granularity,displayUnit:e.subItemsHeading.displayUnit||e.displayUnit,label:""}:null}_renderTableRow(e,t){let n=this._dom.createElement("tr");for(let r of t){if(!r||!r.key){this._dom.createChildOf(n,"td","lh-table-column--empty");continue}let i=e[r.key],a;if(i!=null&&(a=this._renderTableValue(i,r)),a){let l=`lh-table-column--${r.valueType}`;this._dom.createChildOf(n,"td",l).append(a)}else this._dom.createChildOf(n,"td","lh-table-column--empty")}return n}_renderTableRowsFromItem(e,t){let n=this._dom.createFragment();if(n.append(this._renderTableRow(e,t)),!e.subItems)return n;let r=t.map(this._getDerivedSubItemsHeading);if(!r.some(Boolean))return n;for(let i of e.subItems.items){let a=this._renderTableRow(i,r);a.classList.add("lh-sub-item-row"),n.append(a)}return n}_adornEntityGroupRow(e){let t=e.dataset.entity;if(!t)return;let n=this._entities?.find(i=>i.name===t);if(!n)return;let r=this._dom.find("td",e);if(n.category){let i=this._dom.createElement("span");i.classList.add("lh-audit__adorn"),i.textContent=n.category,r.append(" ",i)}if(n.isFirstParty){let i=this._dom.createElement("span");i.classList.add("lh-audit__adorn","lh-audit__adorn1p"),i.textContent=m.strings.firstPartyChipLabel,r.append(" ",i)}if(n.homepage){let i=this._dom.createElement("a");i.href=n.homepage,i.target="_blank",i.title=m.strings.openInANewTabTooltip,i.classList.add("lh-report-icon--external"),r.append(" ",i)}}_renderEntityGroupRow(e,t){let n={...t[0]};n.valueType="text";let r=[n,...t.slice(1)],i=this._dom.createFragment();return i.append(this._renderTableRow(e,r)),this._dom.find("tr",i).classList.add("lh-row--group"),i}_getEntityGroupItems(e){let{items:t,headings:n,sortedBy:r}=e;if(!t.length||e.isEntityGrouped||!t.some(d=>d.entity))return[];let i=new Set(e.skipSumming||[]),a=[];for(let d of n)!d.key||i.has(d.key)||mt.includes(d.valueType)&&a.push(d.key);let l=n[0].key;if(!l)return[];let s=new Map;for(let d of t){let h=typeof d.entity=="string"?d.entity:void 0,p=s.get(h)||{[l]:h||m.strings.unattributable,entity:h};for(let g of a)p[g]=Number(p[g]||0)+Number(d[g]||0);s.set(h,p)}let c=[...s.values()];return r&&c.sort(k.getTableItemSortComparator(r)),c}_renderTable(e){if(!e.items.length)return this._dom.createElement("span");let t=this._dom.createElement("table","lh-table"),n=this._dom.createChildOf(t,"thead"),r=this._dom.createChildOf(n,"tr");for(let l of e.headings){let c=`lh-table-column--${l.valueType||"text"}`,d=this._dom.createElement("div","lh-text");d.textContent=l.label,this._dom.createChildOf(r,"th",c).append(d)}let i=this._getEntityGroupItems(e),a=this._dom.createChildOf(t,"tbody");if(i.length)for(let l of i){let s=typeof l.entity=="string"?l.entity:void 0,c=this._renderEntityGroupRow(l,e.headings);for(let h of e.items.filter(p=>p.entity===s))c.append(this._renderTableRowsFromItem(h,e.headings));let d=this._dom.findAll("tr",c);s&&d.length&&(d.forEach(h=>h.dataset.entity=s),this._adornEntityGroupRow(d[0])),a.append(c)}else{let l=!0;for(let s of e.items){let c=this._renderTableRowsFromItem(s,e.headings),d=this._dom.findAll("tr",c),h=d[0];if(typeof s.entity=="string"&&(h.dataset.entity=s.entity),e.isEntityGrouped&&s.entity)h.classList.add("lh-row--group"),this._adornEntityGroupRow(h);else for(let p of d)p.classList.add(l?"lh-row--even":"lh-row--odd");l=!l,a.append(c)}}return t}_renderListValue(e){return e.type==="node"?this.renderNode(e):e.type==="text"?this._renderText(e.value):this.render(e)}_renderList(e){let t=this._dom.createElement("div","lh-list");return e.items.forEach(n=>{if(n.type==="list-section"){let i=this._dom.createElement("div","lh-list-section");n.title&&this._dom.createChildOf(i,"div","lh-list-section__title").append(this._dom.convertMarkdownLinkSnippets(n.title)),n.description&&this._dom.createChildOf(i,"div","lh-list-section__description").append(this._dom.convertMarkdownLinkSnippets(n.description));let a=this._renderListValue(n.value);a&&i.append(a),t.append(i);return}let r=this._renderListValue(n);r&&t.append(r)}),t}_renderChecklist(e){let t=this._dom.createElement("ul","lh-checklist");return Object.values(e.items).forEach(n=>{let r=this._dom.createChildOf(t,"li","lh-checklist-item"),i=n.value?"lh-report-plain-icon--checklist-pass":"lh-report-plain-icon--checklist-fail";this._dom.createChildOf(r,"span",`lh-report-plain-icon ${i}`).textContent=n.label}),t}renderNode(e){let t=this._dom.createElement("span","lh-node");if(e.nodeLabel){let a=this._dom.createElement("div");a.textContent=e.nodeLabel,t.append(a)}if(e.snippet){let a=this._dom.createElement("div");a.classList.add("lh-node__snippet"),a.textContent=e.snippet,t.append(a)}if(e.selector&&(t.title=e.selector),e.path&&t.setAttribute("data-path",e.path),e.selector&&t.setAttribute("data-selector",e.selector),e.snippet&&t.setAttribute("data-snippet",e.snippet),!this._fullPageScreenshot)return t;let n=e.lhId&&this._fullPageScreenshot.nodes[e.lhId];if(!n||n.width===0||n.height===0)return t;let r={width:147,height:100},i=V.render(this._dom,this._fullPageScreenshot.screenshot,n,r);return i&&t.prepend(i),t}renderSourceLocation(e){if(!e.url)return null;let t=`${e.url}:${e.line+1}:${e.column}`,n;e.original&&(n=`${e.original.file||"<unmapped>"}:${e.original.line+1}:${e.original.column}`);let r;if(e.urlProvider==="network"&&n)r=this._renderLink({url:e.url,text:n}),r.title=`maps to generated location ${t}`;else if(e.urlProvider==="network"&&!n)r=this.renderTextURL(e.url),this._dom.find(".lh-link",r).textContent+=`:${e.line+1}:${e.column}`;else if(e.urlProvider==="comment"&&n)r=this._renderText(`${n} (from source map)`),r.title=`${t} (from sourceURL)`;else if(e.urlProvider==="comment"&&!n)r=this._renderText(`${t} (from sourceURL)`);else return null;return r.classList.add("lh-source-location"),r.setAttribute("data-source-url",e.url),r.setAttribute("data-source-line",String(e.line)),r.setAttribute("data-source-column",String(e.column)),r}_renderFilmstrip(e){let t=this._dom.createElement("div","lh-filmstrip");for(let n of e.items){let r=this._dom.createChildOf(t,"div","lh-filmstrip__frame"),i=this._dom.createChildOf(r,"img","lh-filmstrip__thumbnail");i.src=n.data,i.alt="Screenshot"}return t}_renderCode(e){let t=this._dom.createElement("pre","lh-code");return t.textContent=e,t}};var te=class{constructor(e){e==="en-XA"&&(e="de"),this._locale=e,this._cachedNumberFormatters=new Map}_formatNumberWithGranularity(e,t,n={}){if(t!==void 0){let a=-Math.log10(t);Number.isInteger(a)||(console.warn(`granularity of ${t} is invalid. Using 1 instead`),t=1),t<1&&(n={...n},n.minimumFractionDigits=n.maximumFractionDigits=Math.ceil(a)),e=Math.round(e/t)*t,Object.is(e,-0)&&(e=0)}else Math.abs(e)<5e-4&&(e=0);let r,i=[n.minimumFractionDigits,n.maximumFractionDigits,n.style,n.unit,n.unitDisplay,this._locale].join("");return r=this._cachedNumberFormatters.get(i),r||(r=new Intl.NumberFormat(this._locale,n),this._cachedNumberFormatters.set(i,r)),r.format(e).replace(" ","\\xA0")}formatNumber(e,t){return this._formatNumberWithGranularity(e,t)}formatInteger(e){return this._formatNumberWithGranularity(e,1)}formatPercent(e){return new Intl.NumberFormat(this._locale,{style:"percent"}).format(e)}formatBytesToKiB(e,t=void 0){return this._formatNumberWithGranularity(e/1024,t)+"\\xA0KiB"}formatBytesToMiB(e,t=void 0){return this._formatNumberWithGranularity(e/1048576,t)+"\\xA0MiB"}formatBytes(e,t=1){return this._formatNumberWithGranularity(e,t,{style:"unit",unit:"byte",unitDisplay:"long"})}formatBytesWithBestUnit(e,t=.1){return e>=1048576?this.formatBytesToMiB(e,t):e>=1024?this.formatBytesToKiB(e,t):this._formatNumberWithGranularity(e,t,{style:"unit",unit:"byte",unitDisplay:"narrow"})}formatKbps(e,t=void 0){return this._formatNumberWithGranularity(e,t,{style:"unit",unit:"kilobit-per-second",unitDisplay:"short"})}formatMilliseconds(e,t=void 0){return this._formatNumberWithGranularity(e,t,{style:"unit",unit:"millisecond",unitDisplay:"short"})}formatSeconds(e,t=void 0){return this._formatNumberWithGranularity(e/1e3,t,{style:"unit",unit:"second",unitDisplay:"narrow"})}formatDateTime(e){let t={month:"short",day:"numeric",year:"numeric",hour:"numeric",minute:"numeric",timeZoneName:"short"},n;try{n=new Intl.DateTimeFormat(this._locale,t)}catch{t.timeZone="UTC",n=new Intl.DateTimeFormat(this._locale,t)}return n.format(new Date(e))}formatDuration(e){let t=e/1e3;if(Math.round(t)===0)return"None";let n=[],r={day:3600*24,hour:3600,minute:60,second:1};return Object.keys(r).forEach(i=>{let a=r[i],l=Math.floor(t/a);if(l>0){t-=l*a;let s=this._formatNumberWithGranularity(l,1,{style:"unit",unit:i,unitDisplay:"narrow"});n.push(s)}}),n.join(" ")}};function Ee(o){let e=o.createComponent("explodeyGauge");return o.find(".lh-exp-gauge-component",e)}function Se(o,e,t){let n=o.find("div.lh-exp-gauge__wrapper",e);n.className="",n.classList.add("lh-exp-gauge__wrapper",`lh-exp-gauge__wrapper--${k.calculateRating(t.score)}`),vt(o,n,t)}function ft(o,e,t){t=t||o/32;let n=o/t,r=.5*t,i=n+r+t,a=2*Math.PI*n,l=Math.acos(1-.5*Math.pow(.5*t/n,2))*n,s=2*Math.PI*i,c=Math.acos(1-.5*Math.pow(.5*t/i,2))*i;return{radiusInner:n,radiusOuter:i,circumferenceInner:a,circumferenceOuter:s,getArcLength:()=>Math.max(0,Number(e*a)),getMetricArcLength:(d,h=!1)=>{let p=h?0:2*c;return Math.max(0,Number(d*s-r-p))},endDiffInner:l,endDiffOuter:c,strokeWidth:t,strokeGap:r}}function vt(o,e,t){let i=Number(t.score),{radiusInner:a,radiusOuter:l,circumferenceInner:s,circumferenceOuter:c,getArcLength:d,getMetricArcLength:h,endDiffInner:p,endDiffOuter:g,strokeWidth:b,strokeGap:w}=ft(128,i),f=o.find("svg.lh-exp-gauge",e);o.find(".lh-exp-gauge__label",f).textContent=t.title,f.setAttribute("viewBox",[-64,-64/2,128,128/2].join(" ")),f.style.setProperty("--stroke-width",`${b}px`),f.style.setProperty("--circle-meas",(2*Math.PI).toFixed(4));let u=o.find("g.lh-exp-gauge__outer",e),v=o.find("g.lh-exp-gauge__inner",e),_=o.find("circle.lh-cover",u),x=o.find("circle.lh-exp-gauge__arc",v),S=o.find("text.lh-exp-gauge__percentage",v);u.style.setProperty("--scale-initial",String(a/l)),u.style.setProperty("--radius",`${l}px`),_.style.setProperty("--radius",`${.5*(a+l)}px`),_.setAttribute("stroke-width",String(w)),f.style.setProperty("--radius",`${a}px`),x.setAttribute("stroke-dasharray",`${d()} ${(s-d()).toFixed(4)}`),x.setAttribute("stroke-dashoffset",String(.25*s-p)),S.textContent=Math.round(i*100).toString();let A=l+b,z=l-b,M=t.auditRefs.filter(y=>y.group==="metrics"&&y.weight),$=M.reduce((y,C)=>y+=C.weight,0),R=.25*c-g-.5*w,N=-.5*Math.PI;u.querySelectorAll(".metric").forEach(y=>{M.map(F=>`metric--${F.id}`).find(F=>y.classList.contains(F))||y.remove()}),M.forEach((y,C)=>{let L=y.acronym??y.id,F=!u.querySelector(`.metric--${L}`),T=o.maybeFind(`g.metric--${L}`,u)||o.createSVGElement("g"),B=o.maybeFind(`.metric--${L} circle.lh-exp-gauge--faded`,u)||o.createSVGElement("circle"),K=o.maybeFind(`.metric--${L} circle.lh-exp-gauge--miniarc`,u)||o.createSVGElement("circle"),q=o.maybeFind(`.metric--${L} circle.lh-exp-gauge-hovertarget`,u)||o.createSVGElement("circle"),P=o.maybeFind(`.metric--${L} text.metric__label`,u)||o.createSVGElement("text"),H=o.maybeFind(`.metric--${L} text.metric__value`,u)||o.createSVGElement("text");T.classList.add("metric",`metric--${L}`),B.classList.add("lh-exp-gauge__arc","lh-exp-gauge__arc--metric","lh-exp-gauge--faded"),K.classList.add("lh-exp-gauge__arc","lh-exp-gauge__arc--metric","lh-exp-gauge--miniarc"),q.classList.add("lh-exp-gauge__arc","lh-exp-gauge__arc--metric","lh-exp-gauge-hovertarget");let j=y.weight/$,de=h(j),he=y.result.score?y.result.score*j:0,pe=h(he),Pe=j*c,ue=h(j,!0),ge=k.calculateRating(y.result.score,y.result.scoreDisplayMode);T.style.setProperty("--metric-rating",ge),T.style.setProperty("--metric-color",`var(--color-${ge})`),T.style.setProperty("--metric-offset",`${R}`),T.style.setProperty("--i",C.toString()),B.setAttribute("stroke-dasharray",`${de} ${c-de}`),K.style.setProperty("--metric-array",`${pe} ${c-pe}`),q.setAttribute("stroke-dasharray",`${ue} ${c-ue-g}`),P.classList.add("metric__label"),H.classList.add("metric__value"),P.textContent=L,H.textContent=`+${Math.round(he*100)}`;let me=N+j*Math.PI,J=Math.cos(me),Z=Math.sin(me);switch(!0){case J>0:H.setAttribute("text-anchor","end");break;case J<0:P.setAttribute("text-anchor","end");break;case J===0:P.setAttribute("text-anchor","middle"),H.setAttribute("text-anchor","middle");break}switch(!0){case Z>0:P.setAttribute("dominant-baseline","hanging");break;case Z<0:H.setAttribute("dominant-baseline","hanging");break;case Z===0:P.setAttribute("dominant-baseline","middle"),H.setAttribute("dominant-baseline","middle");break}P.setAttribute("x",(A*J).toFixed(2)),P.setAttribute("y",(A*Z).toFixed(2)),H.setAttribute("x",(z*J).toFixed(2)),H.setAttribute("y",(z*Z).toFixed(2)),F&&(T.appendChild(B),T.appendChild(K),T.appendChild(q),T.appendChild(P),T.appendChild(H),u.appendChild(T)),R-=Pe,N+=j*2*Math.PI});let D=u.querySelector(".lh-exp-gauge-underhovertarget")||o.createSVGElement("circle");D.classList.add("lh-exp-gauge__arc","lh-exp-gauge__arc--metric","lh-exp-gauge-hovertarget","lh-exp-gauge-underhovertarget");let I=h(1,!0);if(D.setAttribute("stroke-dasharray",`${I} ${c-I-g}`),D.isConnected||u.prepend(D),f.dataset.listenersSetup)return;f.dataset.listenersSetup=!0,De(f),f.addEventListener("pointerover",y=>{if(y.target===f&&f.classList.contains("state--expanded")){f.classList.remove("state--expanded"),f.classList.contains("state--highlight")&&(f.classList.remove("state--highlight"),o.find(".metric--highlight",f).classList.remove("metric--highlight"));return}if(!(y.target instanceof Element))return;let C=y.target.parentNode;if(C instanceof SVGElement){if(C&&C===v){f.classList.contains("state--expanded")?f.classList.contains("state--highlight")&&(f.classList.remove("state--highlight"),o.find(".metric--highlight",f).classList.remove("metric--highlight")):f.classList.add("state--expanded");return}if(C&&C.classList&&C.classList.contains("metric")){let L=C.style.getPropertyValue("--metric-rating");if(e.style.setProperty("--color-highlight",`var(--color-${L}-secondary)`),!f.classList.contains("state--highlight"))f.classList.add("state--highlight"),C.classList.add("metric--highlight");else{let F=o.find(".metric--highlight",f);C!==F&&(F.classList.remove("metric--highlight"),C.classList.add("metric--highlight"))}}}}),f.addEventListener("mouseleave",()=>{f.classList.remove("state--highlight"),f.querySelector(".metric--highlight")?.classList.remove("metric--highlight")});async function De(y){if(await new Promise(P=>setTimeout(P,1e3)),y.classList.contains("state--expanded"))return;let C=o.find(".lh-exp-gauge__inner",y),L=`uniq-${Math.random()}`;C.setAttribute("id",L);let F=o.createSVGElement("use");F.setAttribute("href",`#${L}`),y.appendChild(F);let T=2.5;y.style.setProperty("--peek-dur",`${T}s`),y.classList.add("state--peek","state--expanded");let B=()=>{y.classList.remove("state--peek","state--expanded"),F.remove()},K=setTimeout(()=>{y.removeEventListener("mouseenter",q),B()},T*1e3*1.5);function q(){clearTimeout(K),B()}y.addEventListener("mouseenter",q,{once:!0})}}var ne=class extends G{_renderMetric(e){let t=this.dom.createComponent("metric"),n=this.dom.find(".lh-metric",t);n.id=e.result.id;let r=k.calculateRating(e.result.score,e.result.scoreDisplayMode);n.classList.add(`lh-metric--${r}`);let i=this.dom.find(".lh-metric__title",t);i.textContent=e.result.title;let a=this.dom.find(".lh-metric__value",t);a.textContent=e.result.displayValue||"";let l=this.dom.find(".lh-metric__description",t);if(l.append(this.dom.convertMarkdownLinkSnippets(e.result.description)),e.result.scoreDisplayMode==="error"){l.textContent="",a.textContent="Error!";let s=this.dom.createChildOf(l,"span");s.textContent=e.result.errorMessage||"Report error: no metric information"}else e.result.scoreDisplayMode==="notApplicable"&&(a.textContent="--");return n}_getScoringCalculatorHref(e){let t=e.filter(h=>h.group==="metrics"),n=e.find(h=>h.id==="interactive"),r=e.find(h=>h.id==="first-cpu-idle"),i=e.find(h=>h.id==="first-meaningful-paint");n&&t.push(n),r&&t.push(r),i&&typeof i.result.score=="number"&&t.push(i);let a=h=>Math.round(h*100)/100,s=[...t.map(h=>{let p;return typeof h.result.numericValue=="number"?(p=h.id==="cumulative-layout-shift"?a(h.result.numericValue):Math.round(h.result.numericValue),p=p.toString()):p="null",[h.acronym||h.id,p]})];m.reportJson&&(s.push(["device",m.reportJson.configSettings.formFactor]),s.push(["version",m.reportJson.lighthouseVersion]));let c=new URLSearchParams(s),d=new URL("https://googlechrome.github.io/lighthouse/scorecalc/");return d.hash=c.toString(),d.href}overallImpact(e,t){if(!e.result.metricSavings)return{overallImpact:0,overallLinearImpact:0};let n=0,r=0;for(let[i,a]of Object.entries(e.result.metricSavings)){if(a===void 0)continue;let l=t.find(g=>g.acronym===i);if(!l||l.result.score===null)continue;let s=l.result.numericValue;if(!s)continue;let c=a/s*l.weight;r+=c;let d=l.result.scoringOptions;if(!d)continue;let p=(E.computeLogNormalScore(d,s-a)-l.result.score)*l.weight;n+=p}return{overallImpact:n,overallLinearImpact:r}}render(e,t,n){let r=m.strings,i=this.dom.createElement("div","lh-category");i.id=e.id,i.append(this.renderCategoryHeader(e,t,n));let a=e.auditRefs.filter(p=>p.group==="metrics");if(a.length){let[p,g]=this.renderAuditGroup(t.metrics),b=this.dom.createElement("input","lh-metrics-toggle__input"),w=`lh-metrics-toggle${m.getUniqueSuffix()}`;b.setAttribute("aria-label","Toggle the display of metric descriptions"),b.type="checkbox",b.id=w,p.prepend(b);let f=this.dom.find(".lh-audit-group__header",p),u=this.dom.createChildOf(f,"label","lh-metrics-toggle__label");u.htmlFor=w;let v=this.dom.createChildOf(u,"span","lh-metrics-toggle__labeltext--show"),_=this.dom.createChildOf(u,"span","lh-metrics-toggle__labeltext--hide");v.textContent=m.strings.expandView,_.textContent=m.strings.collapseView;let x=this.dom.createElement("div","lh-metrics-container");if(p.insertBefore(x,g),a.forEach(S=>{x.append(this._renderMetric(S))}),i.querySelector(".lh-gauge__wrapper")){let S=this.dom.find(".lh-category-header__description",i),A=this.dom.createChildOf(S,"div","lh-metrics__disclaimer"),z=this.dom.convertMarkdownLinkSnippets(r.varianceDisclaimer);A.append(z);let M=this.dom.createChildOf(A,"a","lh-calclink");M.target="_blank",M.textContent=r.calculatorLink,this.dom.safelySetHref(M,this._getScoringCalculatorHref(e.auditRefs))}p.classList.add("lh-audit-group--metrics"),i.append(p)}let l=this.dom.createChildOf(i,"div","lh-filmstrip-container"),c=e.auditRefs.find(p=>p.id==="screenshot-thumbnails")?.result;if(c?.details){l.id=c.id;let p=this.detailsRenderer.render(c.details);p&&l.append(p)}let d=this.renderFilterableSection(e,t,["insights","diagnostics"],a);if(d&&(d.classList.add("lh-perf-audits"),i.append(d)),(!n||n?.gatherMode==="navigation")&&e.score!==null){let p=Ee(this.dom);Se(this.dom,p,e),this.dom.find(".lh-score__gauge",i).replaceWith(p)}return i}renderFilterableSection(e,t,n,r){if(n.some(u=>!t[u]))return null;let i=this.dom.createElement("div"),a=u=>u.group??"",s=e.auditRefs.filter(u=>n.includes(a(u))).map(u=>{let{overallImpact:v,overallLinearImpact:_}=this.overallImpact(u,r),x=u.result.guidanceLevel||1,S=this.renderAudit(u);return{auditRef:u,auditEl:S,overallImpact:v,overallLinearImpact:_,guidanceLevel:x}}),c=s.filter(u=>!k.showAsPassed(u.auditRef.result)),d=s.filter(u=>k.showAsPassed(u.auditRef.result)),h={};for(let u of n){let v=this.renderAuditGroup(t[u]);v[0].classList.add(`lh-audit-group--${u}`),h[u]=v}function p(u){for(let v of s)if(u==="All")v.auditEl.hidden=!1;else{let _=v.auditRef.result.metricSavings?.[u]===void 0;v.auditEl.hidden=_}c.sort((v,_)=>{let x=v.auditRef.result.score||0,S=_.auditRef.result.score||0;if(x!==S)return x-S;if(u!=="All"){let A=v.auditRef.result.metricSavings?.[u]??-1,z=_.auditRef.result.metricSavings?.[u]??-1;if(A!==z)return z-A}return v.overallImpact!==_.overallImpact?_.overallImpact*_.guidanceLevel-v.overallImpact*v.guidanceLevel:v.overallImpact===0&&_.overallImpact===0&&v.overallLinearImpact!==_.overallLinearImpact?_.overallLinearImpact*_.guidanceLevel-v.overallLinearImpact*v.guidanceLevel:_.guidanceLevel-v.guidanceLevel});for(let v of c){if(!v.auditRef.group)continue;let _=h[a(v.auditRef)];if(!_)continue;let[x,S]=_;x.insertBefore(v.auditEl,S)}}let g=new Set;for(let u of c){let v=u.auditRef.result.metricSavings||{};for(let[_,x]of Object.entries(v))typeof x=="number"&&g.add(_)}let b=r.filter(u=>u.acronym&&g.has(u.acronym));b.length&&this.renderMetricAuditFilter(b,i,p),p("All");for(let u of n)if(c.some(v=>a(v.auditRef)===u)){let v=h[u];if(!v)continue;i.append(v[0])}if(!d.length)return i;let w={auditRefsOrEls:d.map(u=>u.auditEl),groupDefinitions:t},f=this.renderClump("passed",w);return i.append(f),i}renderMetricAuditFilter(e,t,n){let r=this.dom.createElement("div","lh-metricfilter"),i=this.dom.createChildOf(r,"span","lh-metricfilter__text");i.textContent=m.strings.showRelevantAudits;let a=[{acronym:"All",id:"All"},...e],l=m.getUniqueSuffix();for(let s of a){let c=`metric-${s.acronym}-${l}`,d=this.dom.createChildOf(r,"input","lh-metricfilter__radio");d.type="radio",d.name=`metricsfilter-${l}`,d.id=c;let h=this.dom.createChildOf(r,"label","lh-metricfilter__label");h.htmlFor=c,h.title="result"in s?s.result.title:"",h.textContent=s.acronym||s.id,s.acronym==="All"&&(d.checked=!0,h.classList.add("lh-metricfilter__label--active")),t.append(r),d.addEventListener("input",p=>{for(let b of t.querySelectorAll("label.lh-metricfilter__label"))b.classList.toggle("lh-metricfilter__label--active",b.htmlFor===c);t.classList.toggle("lh-category--filtered",s.acronym!=="All"),n(s.acronym||"All");let g=t.querySelectorAll("div.lh-audit-group, details.lh-audit-group");for(let b of g){b.hidden=!1;let w=Array.from(b.querySelectorAll("div.lh-audit")),f=!!w.length&&w.every(u=>u.hidden);b.hidden=f}})}}};var re=class{constructor(e){this._dom=e,this._opts={}}renderReport(e,t,n){if(!this._dom.rootEl&&t){console.warn("Please adopt the new report API in renderer/api.js.");let i=t.closest(".lh-root");i?this._dom.rootEl=i:(t.classList.add("lh-root","lh-vars"),this._dom.rootEl=t)}else this._dom.rootEl&&t&&(this._dom.rootEl=t);n&&(this._opts=n),this._dom.setLighthouseChannel(e.configSettings.channel||"unknown");let r=k.prepareReportResult(e);return this._dom.rootEl.textContent="",this._dom.rootEl.append(this._renderReport(r)),this._opts.occupyEntireViewport&&this._dom.rootEl.classList.add("lh-max-viewport"),this._dom.rootEl}_renderReportTopbar(e){let t=this._dom.createComponent("topbar"),n=this._dom.find("a.lh-topbar__url",t);return n.textContent=e.finalDisplayedUrl,n.title=e.finalDisplayedUrl,this._dom.safelySetHref(n,e.finalDisplayedUrl),t}_renderReportHeader(){let e=this._dom.createComponent("heading"),t=this._dom.createComponent("scoresWrapper");return this._dom.find(".lh-scores-wrapper-placeholder",e).replaceWith(t),e}_renderReportFooter(e){let t=this._dom.createComponent("footer");return this._renderMetaBlock(e,t),this._dom.find(".lh-footer__version_issue",t).textContent=m.strings.footerIssue,this._dom.find(".lh-footer__version",t).textContent=e.lighthouseVersion,t}_renderMetaBlock(e,t){let n=k.getEmulationDescriptions(e.configSettings||{}),r=e.userAgent.match(/(\\w*Chrome\\/[\\d.]+)/),i=Array.isArray(r)?r[1].replace("/"," ").replace("Chrome","Chromium"):"Chromium",a=e.configSettings.channel,l=e.environment.benchmarkIndex.toFixed(0),s=e.environment.credits?.["axe-core"],c=[`${m.strings.runtimeSettingsBenchmark}: ${l}`,`${m.strings.runtimeSettingsCPUThrottling}: ${n.cpuThrottling}`];n.screenEmulation&&c.push(`${m.strings.runtimeSettingsScreenEmulation}: ${n.screenEmulation}`),s&&c.push(`${m.strings.runtimeSettingsAxeVersion}: ${s}`);let d=m.strings.runtimeAnalysisWindow;e.gatherMode==="timespan"?d=m.strings.runtimeAnalysisWindowTimespan:e.gatherMode==="snapshot"&&(d=m.strings.runtimeAnalysisWindowSnapshot);let h=[["date",`Captured at ${m.i18n.formatDateTime(e.fetchTime)}`],["devices",`${n.deviceEmulation} with Lighthouse ${e.lighthouseVersion}`,c.join(`\n`)],["samples-one",m.strings.runtimeSingleLoad,m.strings.runtimeSingleLoadTooltip],["stopwatch",d],["networkspeed",`${n.summary}`,`${m.strings.runtimeSettingsNetworkThrottling}: ${n.networkThrottling}`],["chrome",`Using ${i}`+(a?` with ${a}`:""),`${m.strings.runtimeSettingsUANetwork}: "${e.environment.networkUserAgent}"`]],p=this._dom.find(".lh-meta__items",t);for(let[g,b,w]of h){let f=this._dom.createChildOf(p,"li","lh-meta__item");if(f.textContent=b,w){f.classList.add("lh-tooltip-boundary");let u=this._dom.createChildOf(f,"div","lh-tooltip");u.textContent=w}f.classList.add("lh-report-icon",`lh-report-icon--${g}`)}}_renderReportWarnings(e){if(!e.runWarnings||e.runWarnings.length===0)return this._dom.createElement("div");let t=this._dom.createComponent("warningsToplevel"),n=this._dom.find(".lh-warnings__msg",t);n.textContent=m.strings.toplevelWarningsMessage;let r=[];for(let i of e.runWarnings){let a=this._dom.createElement("li");a.append(this._dom.convertMarkdownLinkSnippets(i)),r.push(a)}return this._dom.find("ul",t).append(...r),t}_renderScoreGauges(e,t,n){let r=[],i=[];for(let a of Object.values(e.categories)){let s=(n[a.id]||t).renderCategoryScore(a,e.categoryGroups||{},{gatherMode:e.gatherMode}),c=this._dom.find("a.lh-gauge__wrapper, a.lh-fraction__wrapper",s);c&&(this._dom.safelySetHref(c,`#${a.id}`),c.addEventListener("click",d=>{if(!c.matches(\'[href^="#"]\'))return;let h=c.getAttribute("href"),p=this._dom.rootEl;if(!h||!p)return;let g=this._dom.find(h,p);d.preventDefault(),g.scrollIntoView()}),this._opts.onPageAnchorRendered?.(c)),k.isPluginCategory(a.id)?i.push(s):r.push(s)}return[...r,...i]}_renderReport(e){m.apply({providedStrings:e.i18n.rendererFormattedStrings,i18n:new te(e.configSettings.locale),reportJson:e});let t=new X(this._dom,{fullPageScreenshot:e.fullPageScreenshot??void 0,entities:e.entities}),n=new G(this._dom,t),r={performance:new ne(this._dom,t)},i=this._dom.createElement("div");i.append(this._renderReportHeader());let a=this._dom.createElement("div","lh-container"),l=this._dom.createElement("div","lh-report");l.append(this._renderReportWarnings(e));let s;Object.keys(e.categories).length===1?i.classList.add("lh-header--solo-category"):s=this._dom.createElement("div","lh-scores-header");let d=this._dom.createElement("div");if(d.classList.add("lh-scorescale-wrap"),d.append(this._dom.createComponent("scorescale")),s){let b=this._dom.find(".lh-scores-container",i);s.append(...this._renderScoreGauges(e,n,r)),b.append(s,d);let w=this._dom.createElement("div","lh-sticky-header");w.append(...this._renderScoreGauges(e,n,r)),a.append(w)}let h=this._dom.createElement("div","lh-categories");l.append(h);let p={gatherMode:e.gatherMode};for(let b of Object.values(e.categories)){let w=r[b.id]||n;w.dom.createChildOf(h,"div","lh-category-wrapper").append(w.render(b,e.categoryGroups,p))}n.injectFinalScreenshot(h,e.audits,d);let g=this._dom.createFragment();return this._opts.omitGlobalStyles||g.append(this._dom.createComponent("styles")),this._opts.omitTopbar||g.append(this._renderReportTopbar(e)),g.append(a),l.append(this._renderReportFooter(e)),a.append(i,l),e.fullPageScreenshot&&V.installFullPageScreenshot(this._dom.rootEl,e.fullPageScreenshot.screenshot),g}};function W(o,e){let t=o.rootEl;typeof e>"u"?t.classList.toggle("lh-dark"):t.classList.toggle("lh-dark",e)}var bt=typeof btoa<"u"?btoa:o=>Buffer.from(o).toString("base64"),_t=typeof atob<"u"?atob:o=>Buffer.from(o,"base64").toString();async function wt(o,e){let t=new TextEncoder().encode(o);if(e.gzip)if(typeof CompressionStream<"u"){let i=new CompressionStream("gzip"),a=i.writable.getWriter();a.write(t),a.close();let l=await new Response(i.readable).arrayBuffer();t=new Uint8Array(l)}else t=window.pako.gzip(o);let n="",r=5e3;for(let i=0;i<t.length;i+=r)n+=String.fromCharCode(...t.subarray(i,i+r));return bt(n)}function yt(o,e){let t=_t(o),n=Uint8Array.from(t,r=>r.charCodeAt(0));return e.gzip?window.pako.ungzip(n,{to:"string"}):new TextDecoder().decode(n)}var Ce={toBase64:wt,fromBase64:yt};function se(){let o=window.location.host.endsWith(".vercel.app"),e=new URLSearchParams(window.location.search).has("dev");return o?`https://${window.location.host}/gh-pages`:e?"http://localhost:7333":"https://googlechrome.github.io/lighthouse"}function ce(o){let e=o.generatedTime,t=o.fetchTime||e;return`${o.lighthouseVersion}-${o.finalDisplayedUrl}-${t}`}function xt(o,e,t){let n=new URL(e).origin;window.addEventListener("message",function i(a){a.origin===n&&r&&a.data.opened&&(r.postMessage(o,n),window.removeEventListener("message",i))});let r=window.open(e,t)}async function Ae(o,e,t){let n=new URL(e),r=!!window.CompressionStream;n.hash=await Ce.toBase64(JSON.stringify(o),{gzip:r}),r&&n.searchParams.set("gzip","1"),window.open(n.toString(),t)}async function Le(o){let e="viewer-"+ce(o),t=se()+"/viewer/";await Ae({lhr:o},t,e)}async function ze(o){let e="viewer-"+ce(o),t=se()+"/viewer/";xt({lhr:o},t,e)}function Me(o){if(!o.audits["script-treemap-data"].details)throw new Error("no script treemap data found");let t={lhr:{mainDocumentUrl:o.mainDocumentUrl,finalUrl:o.finalUrl,finalDisplayedUrl:o.finalDisplayedUrl,audits:{"script-treemap-data":o.audits["script-treemap-data"]},configSettings:{locale:o.configSettings.locale}}},n=se()+"/treemap/",r="treemap-"+ce(o);Ae(t,n,r)}var oe=class{constructor(e){this._dom=e,this._toggleEl,this._menuEl,this.onDocumentKeyDown=this.onDocumentKeyDown.bind(this),this.onToggleClick=this.onToggleClick.bind(this),this.onToggleKeydown=this.onToggleKeydown.bind(this),this.onMenuFocusOut=this.onMenuFocusOut.bind(this),this.onMenuKeydown=this.onMenuKeydown.bind(this),this._getNextMenuItem=this._getNextMenuItem.bind(this),this._getNextSelectableNode=this._getNextSelectableNode.bind(this),this._getPreviousMenuItem=this._getPreviousMenuItem.bind(this)}setup(e){this._toggleEl=this._dom.find(".lh-topbar button.lh-tools__button",this._dom.rootEl),this._toggleEl.addEventListener("click",this.onToggleClick),this._toggleEl.addEventListener("keydown",this.onToggleKeydown),this._menuEl=this._dom.find(".lh-topbar div.lh-tools__dropdown",this._dom.rootEl),this._menuEl.addEventListener("keydown",this.onMenuKeydown),this._menuEl.addEventListener("click",e)}close(){this._toggleEl.classList.remove("lh-active"),this._toggleEl.setAttribute("aria-expanded","false"),this._menuEl.contains(this._dom.document().activeElement)&&this._toggleEl.focus(),this._menuEl.removeEventListener("focusout",this.onMenuFocusOut),this._dom.document().removeEventListener("keydown",this.onDocumentKeyDown)}open(e){this._toggleEl.classList.contains("lh-active")?e.focus():this._menuEl.addEventListener("transitionend",()=>{e.focus()},{once:!0}),this._toggleEl.classList.add("lh-active"),this._toggleEl.setAttribute("aria-expanded","true"),this._menuEl.addEventListener("focusout",this.onMenuFocusOut),this._dom.document().addEventListener("keydown",this.onDocumentKeyDown)}onToggleClick(e){e.preventDefault(),e.stopImmediatePropagation(),this._toggleEl.classList.contains("lh-active")?this.close():this.open(this._getNextMenuItem())}onToggleKeydown(e){switch(e.code){case"ArrowUp":e.preventDefault(),this.open(this._getPreviousMenuItem());break;case"ArrowDown":case"Enter":case" ":e.preventDefault(),this.open(this._getNextMenuItem());break;default:}}onMenuKeydown(e){let t=e.target;switch(e.code){case"ArrowUp":e.preventDefault(),this._getPreviousMenuItem(t).focus();break;case"ArrowDown":e.preventDefault(),this._getNextMenuItem(t).focus();break;case"Home":e.preventDefault(),this._getNextMenuItem().focus();break;case"End":e.preventDefault(),this._getPreviousMenuItem().focus();break;default:}}onDocumentKeyDown(e){e.keyCode===27&&this.close()}onMenuFocusOut(e){let t=e.relatedTarget;this._menuEl.contains(t)||this.close()}_getNextSelectableNode(e,t){let n=e.filter(i=>i instanceof HTMLElement).filter(i=>!(i.hasAttribute("disabled")||window.getComputedStyle(i).display==="none")),r=t?n.indexOf(t)+1:0;return r>=n.length&&(r=0),n[r]}_getNextMenuItem(e){let t=Array.from(this._menuEl.childNodes);return this._getNextSelectableNode(t,e)}_getPreviousMenuItem(e){let t=Array.from(this._menuEl.childNodes).reverse();return this._getNextSelectableNode(t,e)}};var ie=class{constructor(e,t){this.lhr,this._reportUIFeatures=e,this._dom=t,this._dropDownMenu=new oe(this._dom),this._copyAttempt=!1,this.topbarEl,this.categoriesEl,this.stickyHeaderEl,this.highlightEl,this.onDropDownMenuClick=this.onDropDownMenuClick.bind(this),this.onKeyUp=this.onKeyUp.bind(this),this.onCopy=this.onCopy.bind(this),this.collapseAllDetails=this.collapseAllDetails.bind(this)}enable(e){this.lhr=e,this._dom.rootEl.addEventListener("keyup",this.onKeyUp),this._dom.document().addEventListener("copy",this.onCopy),this._dropDownMenu.setup(this.onDropDownMenuClick),this._setUpCollapseDetailsAfterPrinting(),this._dom.find(".lh-topbar__logo",this._dom.rootEl).addEventListener("click",()=>W(this._dom)),this._setupStickyHeader()}onDropDownMenuClick(e){e.preventDefault();let t=e.target;if(!(!t||!t.hasAttribute("data-action"))){switch(t.getAttribute("data-action")){case"copy":this.onCopyButtonClick();break;case"print-summary":this.collapseAllDetails(),this._print();break;case"print-expanded":this.expandAllDetails(),this._print();break;case"save-json":{let n=JSON.stringify(this.lhr,null,2);this._reportUIFeatures._saveFile(new Blob([n],{type:"application/json"}));break}case"save-html":{let n=this._reportUIFeatures.getReportHtml();try{this._reportUIFeatures._saveFile(new Blob([n],{type:"text/html"}))}catch(r){this._dom.fireEventOn("lh-log",this._dom.document(),{cmd:"error",msg:"Could not export as HTML. "+r.message})}break}case"open-viewer":{this._dom.isDevTools()?Le(this.lhr):ze(this.lhr);break}case"save-gist":{this._reportUIFeatures.saveAsGist();break}case"toggle-dark":{W(this._dom);break}case"view-unthrottled-trace":this._reportUIFeatures._opts.onViewTrace?.()}this._dropDownMenu.close()}}onCopy(e){this._copyAttempt&&e.clipboardData&&(e.preventDefault(),e.clipboardData.setData("text/plain",JSON.stringify(this.lhr,null,2)),this._dom.fireEventOn("lh-log",this._dom.document(),{cmd:"log",msg:"Report JSON copied to clipboard"})),this._copyAttempt=!1}onCopyButtonClick(){this._dom.fireEventOn("lh-analytics",this._dom.document(),{name:"copy"});try{this._dom.document().queryCommandSupported("copy")&&(this._copyAttempt=!0,this._dom.document().execCommand("copy")||(this._copyAttempt=!1,this._dom.fireEventOn("lh-log",this._dom.document(),{cmd:"warn",msg:"Your browser does not support copy to clipboard."})))}catch(e){this._copyAttempt=!1,this._dom.fireEventOn("lh-log",this._dom.document(),{cmd:"log",msg:e.message})}}onKeyUp(e){(e.ctrlKey||e.metaKey)&&e.keyCode===80&&this._dropDownMenu.close()}expandAllDetails(){this._dom.findAll(".lh-categories details",this._dom.rootEl).map(t=>t.open=!0)}collapseAllDetails(){this._dom.findAll(".lh-categories details",this._dom.rootEl).map(t=>t.open=!1)}_print(){this._reportUIFeatures._opts.onPrintOverride?this._reportUIFeatures._opts.onPrintOverride(this._dom.rootEl):self.print()}resetUIState(){this._dropDownMenu.close()}_getScrollParent(e){let{overflowY:t}=window.getComputedStyle(e);return t!=="visible"&&t!=="hidden"?e:e.parentElement?this._getScrollParent(e.parentElement):document}_setUpCollapseDetailsAfterPrinting(){"onbeforeprint"in self?self.addEventListener("afterprint",this.collapseAllDetails):self.matchMedia("print").addListener(t=>{t.matches?this.expandAllDetails():this.collapseAllDetails()})}_setupStickyHeader(){this.topbarEl=this._dom.find("div.lh-topbar",this._dom.rootEl),this.categoriesEl=this._dom.find("div.lh-categories",this._dom.rootEl),requestAnimationFrame(()=>requestAnimationFrame(()=>{try{this.stickyHeaderEl=this._dom.find("div.lh-sticky-header",this._dom.rootEl)}catch{return}this.highlightEl=this._dom.createChildOf(this.stickyHeaderEl,"div","lh-highlighter");let e=this._getScrollParent(this._dom.find(".lh-container",this._dom.rootEl));e.addEventListener("scroll",()=>this._updateStickyHeader());let t=e instanceof window.Document?document.documentElement:e;new window.ResizeObserver(()=>this._updateStickyHeader()).observe(t)}))}_updateStickyHeader(){if(!this.stickyHeaderEl)return;let e=this.topbarEl.getBoundingClientRect().bottom,t=this.categoriesEl.getBoundingClientRect().top,n=e>=t,i=Array.from(this._dom.rootEl.querySelectorAll(".lh-category")).filter(h=>h.getBoundingClientRect().top-window.innerHeight/2<0),a=i.length>0?i.length-1:0,l=this.stickyHeaderEl.querySelectorAll(".lh-gauge__wrapper, .lh-fraction__wrapper"),s=l[a],c=l[0].getBoundingClientRect().left,d=s.getBoundingClientRect().left-c;this.highlightEl.style.transform=`translate(${d}px)`,this.stickyHeaderEl.classList.toggle("lh-sticky-header--visible",n)}};function kt(o,e){let t=e?new Date(e):new Date,n=t.toLocaleTimeString("en-US",{hour12:!1}),r=t.toLocaleDateString("en-US",{year:"numeric",month:"2-digit",day:"2-digit"}).split("/");r.unshift(r.pop());let i=r.join("-");return`${o}_${i}_${n}`.replace(/[/?<>\\\\:*|"]/g,"-")}function Te(o){let e=new URL(o.finalDisplayedUrl).hostname;return kt(e,o.fetchTime)}function Et(o){return Array.from(o.tBodies[0].rows)}var ae=class{constructor(e,t={}){this.json,this._dom=e,this._opts=t,this._topbar=t.omitTopbar?null:new ie(this,e),this.onMediaQueryChange=this.onMediaQueryChange.bind(this)}initFeatures(e){this.json=e,this._fullPageScreenshot=E.getFullPageScreenshot(e),this._topbar&&(this._topbar.enable(e),this._topbar.resetUIState()),this._setupMediaQueryListeners(),this._setupThirdPartyFilter(),this._setupElementScreenshotOverlay(this._dom.rootEl);let t=this._dom.isDevTools()||this._opts.disableDarkMode||this._opts.disableAutoDarkModeAndFireworks;!t&&window.matchMedia("(prefers-color-scheme: dark)").matches&&W(this._dom,!0);let r=["performance","accessibility","best-practices","seo"].every(s=>{let c=e.categories[s];return c&&c.score===1}),i=this._opts.disableFireworks||this._opts.disableAutoDarkModeAndFireworks;if(r&&!i&&(this._enableFireworks(),t||W(this._dom,!0)),e.categories.performance&&e.categories.performance.auditRefs.some(s=>!!(s.group==="metrics"&&e.audits[s.id].errorMessage))){let s=this._dom.find("input.lh-metrics-toggle__input",this._dom.rootEl);s.checked=!0}this.json.audits["script-treemap-data"]&&this.json.audits["script-treemap-data"].details&&this.addButton({text:m.strings.viewTreemapLabel,icon:"treemap",onClick:()=>Me(this.json)}),this._opts.onViewTrace&&(e.configSettings.throttlingMethod==="simulate"?this._dom.find(\'a[data-action="view-unthrottled-trace"]\',this._dom.rootEl).classList.remove("lh-hidden"):this.addButton({text:m.strings.viewTraceLabel,onClick:()=>this._opts.onViewTrace?.()})),this._opts.getStandaloneReportHTML&&this._dom.find(\'a[data-action="save-html"]\',this._dom.rootEl).classList.remove("lh-hidden");for(let s of this._dom.findAll("[data-i18n]",this._dom.rootEl)){let d=s.getAttribute("data-i18n");s.textContent=m.strings[d]}}addButton(e){let t=this._dom.rootEl.querySelector(".lh-audit-group--metrics");if(!t)return;let n=t.querySelector(".lh-buttons");n||(n=this._dom.createChildOf(t,"div","lh-buttons"));let r=["lh-button"];e.icon&&(r.push("lh-report-icon"),r.push(`lh-report-icon--${e.icon}`));let i=this._dom.createChildOf(n,"button",r.join(" "));return i.textContent=e.text,i.addEventListener("click",e.onClick),i}resetUIState(){this._topbar&&this._topbar.resetUIState()}getReportHtml(){if(!this._opts.getStandaloneReportHTML)throw new Error("`getStandaloneReportHTML` is not set");return this.resetUIState(),this._opts.getStandaloneReportHTML()}saveAsGist(){throw new Error("Cannot save as gist from base report")}_enableFireworks(){this._dom.find(".lh-scores-container",this._dom.rootEl).classList.add("lh-score100")}_setupMediaQueryListeners(){let e=self.matchMedia("(max-width: 500px)");e.addListener(this.onMediaQueryChange),this.onMediaQueryChange(e)}_resetUIState(){this._topbar&&this._topbar.resetUIState()}onMediaQueryChange(e){this._dom.rootEl.classList.toggle("lh-narrow",e.matches)}_setupThirdPartyFilter(){let e=["uses-rel-preconnect","third-party-facades","network-dependency-tree-insight"],t=["legacy-javascript","legacy-javascript-insight"];Array.from(this._dom.rootEl.querySelectorAll("table.lh-table")).filter(i=>i.querySelector("td.lh-table-column--url, td.lh-table-column--source-location")).filter(i=>{let a=i.closest(".lh-audit");if(!a)throw new Error(".lh-table not within audit");return!e.includes(a.id)}).forEach(i=>{let a=Et(i),l=a.filter(f=>!f.classList.contains("lh-sub-item-row")),s=this._getThirdPartyRows(l,E.getFinalDisplayedUrl(this.json)),c=a.some(f=>f.classList.contains("lh-row--even")),d=this._dom.createComponent("3pFilter"),h=this._dom.find("input",d);h.addEventListener("change",f=>{let u=f.target instanceof HTMLInputElement&&!f.target.checked,v=!0,_=l[0];for(;_;){let x=u&&s.includes(_);do _.classList.toggle("lh-row--hidden",x),c&&(_.classList.toggle("lh-row--even",!x&&v),_.classList.toggle("lh-row--odd",!x&&!v)),_=_.nextElementSibling;while(_&&_.classList.contains("lh-sub-item-row"));x||(v=!v)}});let p=s.filter(f=>!f.classList.contains("lh-row--group")).length;this._dom.find(".lh-3p-filter-count",d).textContent=`${p}`,this._dom.find(".lh-3p-ui-string",d).textContent=m.strings.thirdPartyResourcesLabel;let g=s.length===l.length,b=!s.length;if((g||b)&&(this._dom.find("div.lh-3p-filter",d).hidden=!0),!i.parentNode)return;i.parentNode.insertBefore(d,i);let w=i.closest(".lh-audit");if(!w)throw new Error(".lh-table not within audit");t.includes(w.id)&&!g&&h.click()})}_setupElementScreenshotOverlay(e){this._fullPageScreenshot&&V.installOverlayFeature({dom:this._dom,rootEl:e,overlayContainerEl:e,fullPageScreenshot:this._fullPageScreenshot})}_getThirdPartyRows(e,t){let n=E.getEntityFromUrl(t,this.json.entities),r=this.json.entities?.find(a=>a.isFirstParty===!0)?.name,i=[];for(let a of e){if(r){if(!a.dataset.entity||a.dataset.entity===r)continue}else{let l=a.querySelector("div.lh-text__url");if(!l)continue;let s=l.dataset.url;if(!s||!(E.getEntityFromUrl(s,this.json.entities)!==n))continue}i.push(a)}return i}_saveFile(e){let t=e.type.match("json")?".json":".html",n=Te({finalDisplayedUrl:E.getFinalDisplayedUrl(this.json),fetchTime:this.json.fetchTime})+t;this._opts.onSaveFileOverride?this._opts.onSaveFileOverride(e,n):this._dom.saveFile(e,n)}};function Fe(o,e={}){let t=document.createElement("article");t.classList.add("lh-root","lh-vars");let n=new ee(t.ownerDocument,t);return new re(n).renderReport(o,t,e),new ae(n,e).initFeatures(o),t}var le=class{constructor(e){this.el=e;let t=document.createElement("style");if(t.textContent=`\n      #lh-log {\n        position: fixed;\n        background-color: #323232;\n        color: #fff;\n        min-height: 48px;\n        min-width: 288px;\n        padding: 16px 24px;\n        box-shadow: 0 2px 5px 0 rgba(0, 0, 0, 0.26);\n        border-radius: 2px;\n        margin: 12px;\n        font-size: 14px;\n        cursor: default;\n        transition: transform 0.3s, opacity 0.3s;\n        transform: translateY(100px);\n        opacity: 0;\n        bottom: 0;\n        left: 0;\n        z-index: 3;\n        display: flex;\n        flex-direction: row;\n        justify-content: center;\n        align-items: center;\n      }\n      \n      #lh-log.lh-show {\n        opacity: 1;\n        transform: translateY(0);\n      }\n    `,!this.el.parentNode)throw new Error("element needs to be in the DOM");this.el.parentNode.insertBefore(t,this.el),this._id=void 0}log(e,t=!0){this._id&&clearTimeout(this._id),this.el.textContent=e,this.el.classList.add("lh-show"),t&&(this._id=setTimeout(()=>{this.el.classList.remove("lh-show")},7e3))}warn(e){this.log("Warning: "+e)}error(e){this.log(e),setTimeout(()=>{throw new Error(e)},0)}hide(){this._id&&clearTimeout(this._id),this.el.classList.remove("lh-show")}};function St(){let o=window.__LIGHTHOUSE_JSON__,e=Fe(o,{occupyEntireViewport:!0,getStandaloneReportHTML(){return document.documentElement.outerHTML}});document.body.append(e),document.addEventListener("lh-analytics",t=>{let n=t;"gtag"in window&&window.gtag("event",n.detail.name,n.detail.data??{})}),document.addEventListener("lh-log",t=>{let n=document.querySelector("div#lh-log");if(!n)return;let r=new le(n),i=t.detail;switch(i.cmd){case"log":r.log(i.msg);break;case"warn":r.warn(i.msg);break;case"error":r.error(i.msg);break;case"hide":r.hide();break}})}window.__initLighthouseReport__=St;})();\n/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n/**\n * @license\n * Copyright 2023 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n/**\n * @license\n * Copyright 2020 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n/**\n * @license Copyright 2023 The Lighthouse Authors. All Rights Reserved.\n * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0\n * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.\n*/\n/**\n * @license\n * Copyright 2018 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n *\n * Dummy text for ensuring report robustness: <\\/script> pre$`post %%LIGHTHOUSE_JSON%%\n * (this is handled by terser)\n */\n/**\n * @license\n * Copyright 2021 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n'
    };
    ReportGenerator = class _ReportGenerator {
      static {
        __name(this, "ReportGenerator");
      }
      /**
       * Replaces all the specified strings in source without serial replacements.
       * @param {string} source
       * @param {!Array<{search: string, replacement: string}>} replacements
       * @return {string}
       */
      static replaceStrings(source2, replacements) {
        if (replacements.length === 0) {
          return source2;
        }
        const firstReplacement = replacements[0];
        const nextReplacements = replacements.slice(1);
        return source2.split(firstReplacement.search).map((part) => _ReportGenerator.replaceStrings(part, nextReplacements)).join(firstReplacement.replacement);
      }
      /**
       * @param {unknown} object
       * @return {string}
       */
      static sanitizeJson(object2) {
        return JSON.stringify(object2).replace(/</g, "\\u003c").replace(/\u2028/g, "\\u2028").replace(/\u2029/g, "\\u2029");
      }
      /**
       * Returns the standalone report HTML as a string with the report JSON and renderer JS inlined.
       * @param {LHResult} lhr
       * @return {string}
       */
      static generateReportHtml(lhr) {
        const sanitizedJson = _ReportGenerator.sanitizeJson(lhr);
        const sanitizedJavascript = reportAssets.REPORT_JAVASCRIPT.replace(/<\//g, "\\u003c/");
        return _ReportGenerator.replaceStrings(reportAssets.REPORT_TEMPLATE, [
          { search: "%%LIGHTHOUSE_JSON%%", replacement: sanitizedJson },
          { search: "%%LIGHTHOUSE_JAVASCRIPT%%", replacement: sanitizedJavascript }
        ]);
      }
      /**
       * Returns the standalone flow report HTML as a string with the report JSON and renderer JS inlined.
       * @param {FlowResult} flow
       * @return {string}
       */
      static generateFlowReportHtml(flow2) {
        const sanitizedJson = _ReportGenerator.sanitizeJson(flow2);
        const sanitizedJavascript = reportAssets.FLOW_REPORT_JAVASCRIPT.replace(/<\//g, "\\u003c/");
        return _ReportGenerator.replaceStrings(reportAssets.FLOW_REPORT_TEMPLATE, [
          { search: "%%LIGHTHOUSE_FLOW_JSON%%", replacement: sanitizedJson },
          { search: "%%LIGHTHOUSE_FLOW_JAVASCRIPT%%", replacement: sanitizedJavascript },
          { search: "/*%%LIGHTHOUSE_FLOW_CSS%%*/", replacement: reportAssets.FLOW_REPORT_CSS }
        ]);
      }
      /**
       * Converts the results to a CSV formatted string
       * Each row describes the result of 1 audit with
       *  - the name of the category the audit belongs to
       *  - the name of the audit
       *  - a description of the audit
       *  - the score type that is used for the audit
       *  - the score value of the audit
       *
       * @param {LHResult} lhr
       * @return {string}
       */
      static generateReportCSV(lhr) {
        const CRLF = "\r\n";
        const separator = ",";
        const escape2 = /* @__PURE__ */ __name((value) => `"${value.replace(/"/g, '""')}"`, "escape");
        const rowFormatter = /* @__PURE__ */ __name((row) => row.map((value) => {
          if (value === null)
            return "null";
          return value.toString();
        }).map(escape2), "rowFormatter");
        const rows = [];
        const topLevelKeys = (
          /** @type {const} */
          ["requestedUrl", "finalDisplayedUrl", "fetchTime", "gatherMode"]
        );
        rows.push(rowFormatter(topLevelKeys));
        rows.push(rowFormatter(topLevelKeys.map((key) => lhr[key] ?? null)));
        rows.push([]);
        rows.push(["category", "score"]);
        for (const category of Object.values(lhr.categories)) {
          rows.push(rowFormatter([
            category.id,
            category.score
          ]));
        }
        rows.push([]);
        rows.push(["category", "audit", "score", "displayValue", "description"]);
        for (const category of Object.values(lhr.categories)) {
          for (const auditRef of category.auditRefs) {
            const audit = lhr.audits[auditRef.id];
            if (!audit)
              continue;
            rows.push(rowFormatter([
              category.id,
              auditRef.id,
              audit.score,
              audit.displayValue || "",
              audit.description
            ]));
          }
        }
        return rows.map((row) => row.join(separator)).join(CRLF);
      }
      /**
       * @param {LHResult|FlowResult} result
       * @return {result is FlowResult}
       */
      static isFlowResult(result) {
        return "steps" in result;
      }
      /**
       * Creates the results output in a format based on the `mode`.
       * @param {LHResult|FlowResult} result
       * @param {LHResult['configSettings']['output']} outputModes
       * @return {string|string[]}
       */
      static generateReport(result, outputModes) {
        const outputAsArray = Array.isArray(outputModes);
        if (typeof outputModes === "string")
          outputModes = [outputModes];
        const output = outputModes.map((outputMode) => {
          if (outputMode === "html") {
            if (_ReportGenerator.isFlowResult(result)) {
              return _ReportGenerator.generateFlowReportHtml(result);
            }
            return _ReportGenerator.generateReportHtml(result);
          }
          if (outputMode === "csv") {
            if (_ReportGenerator.isFlowResult(result)) {
              throw new Error("CSV output is not support for user flows");
            }
            return _ReportGenerator.generateReportCSV(result);
          }
          if (outputMode === "json") {
            return JSON.stringify(result, null, 2);
          }
          throw new Error("Invalid output mode: " + outputMode);
        });
        return outputAsArray ? output : output[0];
      }
    };
    init_lh_error();
    init_root2();
    init_esm_utils();
    init_entity_classification();
    init_url_utils();
    Runner = class _Runner {
      static {
        __name(this, "Runner");
      }
      /**
       * @param {LH.Artifacts} artifacts
       * @param {{resolvedConfig: LH.Config.ResolvedConfig, computedCache: Map<string, ArbitraryEqualityMap>}} options
       * @return {Promise<LH.RunnerResult|undefined>}
       */
      static async audit(artifacts, options2) {
        const { resolvedConfig, computedCache } = options2;
        const settings = resolvedConfig.settings;
        try {
          const runnerStatus = { msg: "Audit phase", id: "lh:runner:audit" };
          lighthouse_logger_default.time(runnerStatus, "verbose");
          const lighthouseRunWarnings = [];
          if (settings.gatherMode && !settings.auditMode)
            return;
          if (!resolvedConfig.audits) {
            throw new Error("No audits to evaluate.");
          }
          const auditResultsById = await _Runner._runAudits(settings, resolvedConfig.audits, artifacts, lighthouseRunWarnings, computedCache);
          const resultsStatus = { msg: "Generating results...", id: "lh:runner:generate" };
          lighthouse_logger_default.time(resultsStatus);
          if (artifacts.LighthouseRunWarnings) {
            lighthouseRunWarnings.push(...artifacts.LighthouseRunWarnings);
          }
          const axeVersion = artifacts.Accessibility?.version;
          const credits = {
            "axe-core": axeVersion
          };
          let categories = {};
          if (resolvedConfig.categories) {
            categories = ReportScoring.scoreAllCategories(resolvedConfig.categories, auditResultsById);
          }
          lighthouse_logger_default.timeEnd(resultsStatus);
          lighthouse_logger_default.timeEnd(runnerStatus);
          let fullPageScreenshot = artifacts.FullPageScreenshot;
          if (resolvedConfig.settings.disableFullPageScreenshot || fullPageScreenshot instanceof Error) {
            fullPageScreenshot = void 0;
          }
          const i18nLhr = {
            lighthouseVersion,
            requestedUrl: artifacts.URL.requestedUrl,
            mainDocumentUrl: artifacts.URL.mainDocumentUrl,
            finalDisplayedUrl: artifacts.URL.finalDisplayedUrl,
            finalUrl: artifacts.URL.mainDocumentUrl,
            fetchTime: artifacts.fetchTime,
            gatherMode: artifacts.GatherContext.gatherMode,
            runtimeError: _Runner.getArtifactRuntimeError(artifacts),
            runWarnings: lighthouseRunWarnings,
            userAgent: artifacts.HostUserAgent,
            environment: {
              networkUserAgent: artifacts.NetworkUserAgent,
              hostUserAgent: artifacts.HostUserAgent,
              benchmarkIndex: artifacts.BenchmarkIndex,
              credits
            },
            audits: auditResultsById,
            configSettings: settings,
            categories,
            categoryGroups: resolvedConfig.groups || void 0,
            stackPacks: getStackPacks(artifacts.Stacks),
            entities: await _Runner.getEntityClassification(artifacts, { computedCache }),
            fullPageScreenshot,
            timing: this._getTiming(artifacts),
            i18n: {
              rendererFormattedStrings: getRendererFormattedStrings(settings.locale),
              icuMessagePaths: {}
            }
          };
          i18nLhr.i18n.icuMessagePaths = replaceIcuMessages(i18nLhr, settings.locale);
          const lhr = (
            /** @type {LH.Result} */
            i18nLhr
          );
          if (settings.auditMode) {
            const path72 = _Runner._getDataSavePath(settings);
            saveLhr(lhr, path72);
          }
          const report = ReportGenerator.generateReport(lhr, settings.output);
          return { lhr, artifacts, report };
        } catch (err) {
          throw _Runner.createRunnerError(err, settings);
        }
      }
      /**
       * @param {LH.Artifacts} artifacts
       * @param {LH.Artifacts.ComputedContext} context
       */
      static async getEntityClassification(artifacts, context2) {
        const devtoolsLog = artifacts.DevtoolsLog;
        if (!devtoolsLog)
          return;
        const classifiedEntities = await EntityClassification.request({ URL: artifacts.URL, devtoolsLog }, context2);
        const entities = [];
        for (const [entity, entityUrls] of classifiedEntities.urlsByEntity) {
          const uniqueOrigins = /* @__PURE__ */ new Set();
          for (const url of entityUrls) {
            const origin = url_utils_default.getOrigin(url);
            if (origin)
              uniqueOrigins.add(origin);
          }
          const shortEntity = {
            name: entity.name,
            homepage: entity.homepage,
            origins: [...uniqueOrigins]
          };
          if (entity === classifiedEntities.firstParty)
            shortEntity.isFirstParty = true;
          if (entity.isUnrecognized)
            shortEntity.isUnrecognized = true;
          if (entity.category)
            shortEntity.category = entity.category;
          entities.push(shortEntity);
        }
        return entities;
      }
      /**
       * User can run -G solo, -A solo, or -GA together
       * -G and -A will run partial lighthouse pipelines,
       * and -GA will run everything plus save artifacts and lhr to disk.
       *
       * @param {(runnerData: {resolvedConfig: LH.Config.ResolvedConfig}) => Promise<LH.Artifacts>} gatherFn
       * @param {{resolvedConfig: LH.Config.ResolvedConfig, computedCache: Map<string, ArbitraryEqualityMap>}} options
       * @return {Promise<LH.Artifacts>}
       */
      static async gather(gatherFn, options2) {
        const settings = options2.resolvedConfig.settings;
        try {
          const sentryContext = Sentry.getContext();
          Sentry.captureBreadcrumb({
            message: "Run started",
            category: "lifecycle",
            data: sentryContext
          });
          if (settings.auditMode && !settings.gatherMode) {
            const path72 = this._getDataSavePath(settings);
            return loadArtifacts(path72);
          }
          const runnerStatus = { msg: "Gather phase", id: "lh:runner:gather" };
          lighthouse_logger_default.time(runnerStatus, "verbose");
          const artifacts = await gatherFn({ resolvedConfig: options2.resolvedConfig });
          lighthouse_logger_default.timeEnd(runnerStatus);
          artifacts.Timing = lighthouse_logger_default.takeTimeEntries();
          if (settings.gatherMode) {
            const path72 = this._getDataSavePath(settings);
            await saveArtifacts(artifacts, path72);
          }
          return artifacts;
        } catch (err) {
          throw _Runner.createRunnerError(err, settings);
        }
      }
      /**
       * @param {any} err
       * @param {LH.Config.Settings} settings
       */
      static createRunnerError(err, settings) {
        if (err.friendlyMessage) {
          err.friendlyMessage = getFormatted(err.friendlyMessage, settings.locale);
        }
        Sentry.captureException(err, { level: "fatal" });
        return err;
      }
      /**
       * This handles both the auditMode case where gatherer entries need to be merged in and
       * the gather/audit case where timingEntriesFromRunner contains all entries from this run,
       * including those also in timingEntriesFromArtifacts.
       * @param {LH.Artifacts} artifacts
       * @return {LH.Result.Timing}
       */
      static _getTiming(artifacts) {
        const timingEntriesFromArtifacts = artifacts.Timing || [];
        const timingEntriesFromRunner = lighthouse_logger_default.takeTimeEntries();
        const timingEntriesKeyValues = [
          ...timingEntriesFromArtifacts,
          ...timingEntriesFromRunner
        ].map((entry) => (
          /** @type {[string, PerformanceEntry]} */
          [
            // As entries can share a name and start time, dedupe based on the name, startTime and duration
            `${entry.startTime}-${entry.name}-${entry.duration}`,
            entry
          ]
        ));
        const timingEntries = Array.from(new Map(timingEntriesKeyValues).values()).map((entry) => {
          return {
            // Don't spread entry because browser PerformanceEntries can't be spread.
            // https://github.com/GoogleChrome/lighthouse/issues/8638
            startTime: parseFloat(entry.startTime.toFixed(2)),
            name: entry.name,
            duration: parseFloat(entry.duration.toFixed(2)),
            entryType: entry.entryType
          };
        }).sort((a, b) => a.startTime - b.startTime);
        const gatherEntry = timingEntries.find((e) => e.name === "lh:runner:gather");
        const auditEntry = timingEntries.find((e) => e.name === "lh:runner:audit");
        const gatherTiming = gatherEntry?.duration || 0;
        const auditTiming = auditEntry?.duration || 0;
        return { entries: timingEntries, total: gatherTiming + auditTiming };
      }
      /**
       * Run all audits with specified settings and artifacts.
       * @param {LH.Config.Settings} settings
       * @param {Array<LH.Config.AuditDefn>} audits
       * @param {LH.Artifacts} artifacts
       * @param {Array<string | LH.IcuMessage>} runWarnings
       * @param {Map<string, ArbitraryEqualityMap>} computedCache
       * @return {Promise<Record<string, LH.RawIcu<LH.Audit.Result>>>}
       */
      static async _runAudits(settings, audits, artifacts, runWarnings, computedCache) {
        const status = { msg: "Analyzing and running audits...", id: "lh:runner:auditing" };
        lighthouse_logger_default.time(status);
        if (artifacts.settings) {
          const overrides = {
            locale: void 0,
            gatherMode: void 0,
            auditMode: void 0,
            output: void 0,
            channel: void 0
          };
          const normalizedGatherSettings = Object.assign({}, artifacts.settings, overrides);
          const normalizedAuditSettings = Object.assign({}, settings, overrides);
          const keys2 = /* @__PURE__ */ new Set([
            ...Object.keys(normalizedGatherSettings),
            ...Object.keys(normalizedAuditSettings)
          ]);
          for (const k of keys2) {
            if (!isEqual_default(normalizedGatherSettings[k], normalizedAuditSettings[k])) {
              throw new Error(`Cannot change settings between gathering and auditing\u2026
Difference found at: \`${k}\`: ${JSON.stringify(normalizedGatherSettings[k], null, 2)}
vs: ${JSON.stringify(normalizedAuditSettings[k], null, 2)}`);
            }
          }
          if (!isEqual_default(normalizedGatherSettings, normalizedAuditSettings)) {
            throw new Error("Cannot change settings between gathering and auditing");
          }
        }
        const sharedAuditContext = {
          settings,
          computedCache
        };
        const auditResultsById = {};
        for (const auditDefn of audits) {
          const auditId = auditDefn.implementation.meta.id;
          const auditResult = await _Runner._runAudit(auditDefn, artifacts, sharedAuditContext, runWarnings);
          auditResultsById[auditId] = auditResult;
        }
        lighthouse_logger_default.timeEnd(status);
        return auditResultsById;
      }
      /**
       * Checks that the audit's required artifacts exist and runs the audit if so.
       * Otherwise returns error audit result.
       * @param {LH.Config.AuditDefn} auditDefn
       * @param {LH.Artifacts} artifacts
       * @param {Pick<LH.Audit.Context, 'settings'|'computedCache'>} sharedAuditContext
       * @param {Array<string | LH.IcuMessage>} runWarnings
       * @return {Promise<LH.RawIcu<LH.Audit.Result>>}
       * @private
       */
      static async _runAudit(auditDefn, artifacts, sharedAuditContext, runWarnings) {
        const audit = auditDefn.implementation;
        const status = {
          msg: `Auditing: ${getFormatted(audit.meta.title, "en-US")}`,
          id: `lh:audit:${audit.meta.id}`
        };
        lighthouse_logger_default.time(status);
        let auditResult;
        try {
          if (artifacts.PageLoadError)
            throw artifacts.PageLoadError;
          for (const artifactName of audit.meta.requiredArtifacts) {
            const noArtifact = artifacts[artifactName] === void 0;
            if (noArtifact) {
              lighthouse_logger_default.warn("Runner", `${artifactName} gatherer, required by audit ${audit.meta.id}, did not run.`);
              throw new LighthouseError(LighthouseError.errors.MISSING_REQUIRED_ARTIFACT, { artifactName });
            }
            if (artifacts[artifactName] instanceof Error) {
              const artifactError = artifacts[artifactName];
              lighthouse_logger_default.warn("Runner", `${artifactName} gatherer, required by audit ${audit.meta.id}, encountered an error: ${artifactError.message}`);
              const error = new LighthouseError(LighthouseError.errors.ERRORED_REQUIRED_ARTIFACT, { artifactName, errorMessage: artifactError.message }, { cause: artifactError });
              error.expected = true;
              throw error;
            }
          }
          const auditOptions = Object.assign({}, audit.defaultOptions, auditDefn.options);
          const auditContext = {
            options: auditOptions,
            ...sharedAuditContext
          };
          const requestedArtifacts = audit.meta.requiredArtifacts.concat(audit.meta.__internalOptionalArtifacts || []);
          const narrowedArtifacts = requestedArtifacts.reduce(
            (narrowedArtifacts2, artifactName) => {
              const requestedArtifact = artifacts[artifactName];
              narrowedArtifacts2[artifactName] = requestedArtifact;
              return narrowedArtifacts2;
            },
            /** @type {LH.Artifacts} */
            {}
          );
          const product = await audit.audit(narrowedArtifacts, auditContext);
          runWarnings.push(...product.runWarnings || []);
          auditResult = Audit.generateAuditResult(audit, product);
        } catch (err) {
          if (err.code !== "MISSING_REQUIRED_ARTIFACT" && err.code !== "ERRORED_REQUIRED_ARTIFACT") {
            lighthouse_logger_default.warn(audit.meta.id, `Caught exception: ${err.message}`);
          }
          Sentry.captureException(err, { tags: { audit: audit.meta.id }, level: "error" });
          const errorMessage = err.friendlyMessage ? err.friendlyMessage : err.message;
          const stack = err.cause?.stack ?? err.stack;
          auditResult = Audit.generateErrorAuditResult(audit, errorMessage, stack);
        }
        lighthouse_logger_default.timeEnd(status);
        return auditResult;
      }
      /**
       * Searches a pass's artifacts for any `lhrRuntimeError` error artifacts.
       * Returns the first one found or `null` if none found.
       * @param {LH.Artifacts} artifacts
       * @return {LH.RawIcu<LH.Result['runtimeError']>|undefined}
       */
      static getArtifactRuntimeError(artifacts) {
        const possibleErrorArtifacts = [
          ["PageLoadError", artifacts.PageLoadError],
          // Preferentially use `PageLoadError`, if it exists.
          ...Object.entries(artifacts)
          // Otherwise check amongst all artifacts.
        ];
        for (const [artifactKey, possibleErrorArtifact] of possibleErrorArtifacts) {
          const isError2 = possibleErrorArtifact instanceof LighthouseError;
          if (isError2 && possibleErrorArtifact.lhrRuntimeError) {
            const errorMessage = possibleErrorArtifact.friendlyMessage || possibleErrorArtifact.message;
            const stack = (
              /** @type {any} */
              possibleErrorArtifact.cause?.stack ?? possibleErrorArtifact.stack
            );
            return {
              code: possibleErrorArtifact.code,
              message: errorMessage,
              errorStack: stack,
              artifactKey
            };
          }
        }
        return void 0;
      }
      /**
       * Returns list of audit names for external querying.
       * @return {Array<string>}
       */
      static getAuditList() {
        const ignoredFiles = [
          "audit.js",
          "violation-audit.js",
          "accessibility/axe-audit.js",
          "multi-check-audit.js",
          "byte-efficiency/byte-efficiency-audit.js",
          "manual/manual-audit.js",
          "insights/insight-audit.js"
        ];
        const fileList = [
          ...["accessibility", "audit.js", "autocomplete.js", "bf-cache.js", "bootup-time.js", "byte-efficiency", "clickjacking-mitigation.js", "csp-xss.js", "deprecations.js", "diagnostics.js", "dobetterweb", "errors-in-console.js", "final-screenshot.js", "has-hsts.js", "image-aspect-ratio.js", "image-size-responsive.js", "insights", "is-on-https.js", "layout-shifts.js", "long-tasks.js", "main-thread-tasks.js", "mainthread-work-breakdown.js", "manual", "metrics", "metrics.js", "network-requests.js", "network-rtt.js", "network-server-latency.js", "non-composited-animations.js", "oopif-iframe-test-audit.js", "origin-isolation.js", "predictive-perf.js", "redirects-http.js", "redirects.js", "resource-summary.js", "screenshot-thumbnails.js", "script-treemap-data.js", "seo", "server-response-time.js", "third-party-cookies.js", "trusted-types-xss.js", "unsized-images.js", "user-timings.js", "valid-source-maps.js", "violation-audit.js"],
          ...["charset.js", "doctype.js", "geolocation-on-start.js", "inspector-issues.js", "js-libraries.js", "notification-on-start.js", "paste-preventing-inputs.js"].map((f) => `dobetterweb/${f}`),
          ...["cumulative-layout-shift.js", "first-contentful-paint.js", "interaction-to-next-paint.js", "interactive.js", "largest-contentful-paint.js", "max-potential-fid.js", "speed-index.js", "total-blocking-time.js"].map((f) => `metrics/${f}`),
          ...["canonical.js", "crawlable-anchors.js", "hreflang.js", "http-status-code.js", "is-crawlable.js", "link-text.js", "manual", "meta-description.js", "robots-txt.js"].map((f) => `seo/${f}`),
          ...["structured-data.js"].map((f) => `seo/manual/${f}`),
          ...["accesskeys.js", "aria-allowed-attr.js", "aria-allowed-role.js", "aria-command-name.js", "aria-conditional-attr.js", "aria-deprecated-role.js", "aria-dialog-name.js", "aria-hidden-body.js", "aria-hidden-focus.js", "aria-input-field-name.js", "aria-meter-name.js", "aria-progressbar-name.js", "aria-prohibited-attr.js", "aria-required-attr.js", "aria-required-children.js", "aria-required-parent.js", "aria-roles.js", "aria-text.js", "aria-toggle-field-name.js", "aria-tooltip-name.js", "aria-treeitem-name.js", "aria-valid-attr-value.js", "aria-valid-attr.js", "axe-audit.js", "button-name.js", "bypass.js", "color-contrast.js", "definition-list.js", "dlitem.js", "document-title.js", "duplicate-id-aria.js", "empty-heading.js", "form-field-multiple-labels.js", "frame-title.js", "heading-order.js", "html-has-lang.js", "html-lang-valid.js", "html-xml-lang-mismatch.js", "identical-links-same-purpose.js", "image-alt.js", "image-redundant-alt.js", "input-button-name.js", "input-image-alt.js", "label-content-name-mismatch.js", "label.js", "landmark-one-main.js", "link-in-text-block.js", "link-name.js", "list.js", "listitem.js", "manual", "meta-refresh.js", "meta-viewport.js", "object-alt.js", "select-name.js", "skip-link.js", "tabindex.js", "table-duplicate-name.js", "table-fake-caption.js", "target-size.js", "td-has-header.js", "td-headers-attr.js", "th-has-data-cells.js", "valid-lang.js", "video-caption.js"].map((f) => `accessibility/${f}`),
          ...["custom-controls-labels.js", "custom-controls-roles.js", "focus-traps.js", "focusable-controls.js", "interactive-element-affordance.js", "logical-tab-order.js", "managed-focus.js", "offscreen-content-hidden.js", "use-landmarks.js", "visual-order-follows-dom.js"].map((f) => `accessibility/manual/${f}`),
          ...["byte-efficiency-audit.js", "total-byte-weight.js", "unminified-css.js", "unminified-javascript.js", "unused-css-rules.js", "unused-javascript.js"].map((f) => `byte-efficiency/${f}`),
          ...["manual-audit.js"].map((f) => `manual/${f}`),
          ...["README.md", "cache-insight.js", "cls-culprits-insight.js", "document-latency-insight.js", "dom-size-insight.js", "duplicated-javascript-insight.js", "font-display-insight.js", "forced-reflow-insight.js", "image-delivery-insight.js", "inp-breakdown-insight.js", "insight-audit.js", "lcp-breakdown-insight.js", "lcp-discovery-insight.js", "legacy-javascript-insight.js", "modern-http-insight.js", "network-dependency-tree-insight.js", "render-blocking-insight.js", "slow-css-selector-insight.js", "third-parties-insight.js", "viewport-insight.js"].map((f) => `insights/${f}`)
        ];
        return fileList.filter((f) => {
          return /\.js$/.test(f) && !ignoredFiles.includes(f);
        }).sort();
      }
      /**
       * Returns list of gatherer names for external querying.
       * @return {Array<string>}
       */
      static getGathererList() {
        const fileList = [
          ...["accessibility.js", "anchor-elements.js", "bf-cache-failures.js", "console-messages.js", "css-usage.js", "devtools-log.js", "dobetterweb", "full-page-screenshot.js", "iframe-elements.js", "image-elements.js", "inputs.js", "inspector-issues.js", "js-usage.js", "link-elements.js", "main-document-content.js", "meta-elements.js", "network-user-agent.js", "scripts.js", "seo", "source-maps.js", "stacks.js", "stylesheets.js", "trace-elements.js", "trace.js", "viewport-dimensions.js"],
          ...["robots-txt.js"].map((f) => `seo/${f}`),
          ...["doctype.js"].map((f) => `dobetterweb/${f}`)
        ];
        return fileList.filter((f) => /\.js$/.test(f) && f !== "gatherer.js").sort();
      }
      /**
       * Get path to use for -G and -A modes. Defaults to $CWD/latest-run
       * @param {LH.Config.Settings} settings
       * @return {string}
       */
      static _getDataSavePath(settings) {
        const { auditMode, gatherMode } = settings;
        if (typeof auditMode === "string")
          return path6.resolve(process.cwd(), auditMode);
        if (typeof gatherMode === "string")
          return path6.resolve(process.cwd(), gatherMode);
        return path6.join(process.cwd(), "latest-run");
      }
    };
    init_process_global();
    init_process_global();
    init_lighthouse_logger();
    init_process_global();
    init_lighthouse_logger();
    init_process_global();
    init_lh();
    init_page_functions();
    ExecutionContext = class _ExecutionContext {
      static {
        __name(this, "ExecutionContext");
      }
      /** @param {LH.Gatherer.ProtocolSession} session */
      constructor(session) {
        this._session = session;
        this._executionContextId = void 0;
        this._executionContextIdentifiersCreated = 0;
        session.on("Page.frameNavigated", () => this.clearContextId());
        session.on("Runtime.executionContextDestroyed", (event) => {
          if (event.executionContextId === this._executionContextId) {
            this.clearContextId();
          }
        });
      }
      /**
       * Returns the isolated context ID currently in use.
       */
      getContextId() {
        return this._executionContextId;
      }
      /**
       * Clears the remembered context ID. Use this method when we have knowledge that the runtime context
       * we were using has been destroyed by the browser and is no longer available.
       */
      clearContextId() {
        this._executionContextId = void 0;
      }
      /**
       * Returns the cached isolated execution context ID or creates a new execution context for the main
       * frame. The cached execution context is cleared on every gotoURL invocation, so a new one will
       * always be created on the first call on a new page.
       * @return {Promise<number>}
       */
      async _getOrCreateIsolatedContextId() {
        if (typeof this._executionContextId === "number")
          return this._executionContextId;
        await this._session.sendCommand("Page.enable");
        await this._session.sendCommand("Runtime.enable");
        const frameTreeResponse = await this._session.sendCommand("Page.getFrameTree");
        const mainFrameId22 = frameTreeResponse.frameTree.frame.id;
        const isolatedWorldResponse = await this._session.sendCommand("Page.createIsolatedWorld", {
          frameId: mainFrameId22,
          worldName: "lighthouse_isolated_context"
        });
        this._executionContextId = isolatedWorldResponse.executionContextId;
        this._executionContextIdentifiersCreated++;
        return isolatedWorldResponse.executionContextId;
      }
      /**
       * Evaluate an expression in the given execution context; an undefined contextId implies the main
       * page without isolation.
       * @param {string} expression
       * @param {number|undefined} contextId
       * @param {number} timeout
       * @return {Promise<*>}
       */
      async _evaluateInContext(expression, contextId, timeout2) {
        const uniqueExecutionContextIdentifier = contextId === void 0 ? void 0 : this._executionContextIdentifiersCreated;
        const evaluationParams = {
          // We need to explicitly wrap the raw expression for several purposes:
          // 1. Ensure that the expression will be a native Promise and not a polyfill/non-Promise.
          // 2. Ensure that errors in the expression are captured by the Promise.
          // 3. Ensure that errors captured in the Promise are converted into plain-old JS Objects
          //    so that they can be serialized properly b/c JSON.stringify(new Error('foo')) === '{}'
          //
          // `__lighthouseExecutionContextUniqueIdentifier` is only used by the FullPageScreenshot gatherer.
          // See `getNodeDetails` in page-functions.
          expression: `(function wrapInNativePromise() {
        ${_ExecutionContext._cachedNativesPreamble};
        globalThis.__lighthouseExecutionContextUniqueIdentifier =
          ${uniqueExecutionContextIdentifier};
        ${pageFunctions.esbuildFunctionWrapperString}
        return new Promise(function (resolve) {
          return Promise.resolve()
            .then(_ => ${expression})
            .catch(${pageFunctions.wrapRuntimeEvalErrorInBrowser})
            .then(resolve);
        });
      }())
      //# sourceURL=_lighthouse-eval.js`,
          includeCommandLineAPI: true,
          awaitPromise: true,
          returnByValue: true,
          timeout: timeout2,
          contextId
        };
        this._session.setNextProtocolTimeout(timeout2);
        const response = await this._session.sendCommand("Runtime.evaluate", evaluationParams);
        const ex = response.exceptionDetails;
        if (ex) {
          const elidedExpression = expression.replace(/\s+/g, " ").substring(0, 100);
          const messageLines = [
            "Runtime.evaluate exception",
            `Expression: ${elidedExpression}
---- (elided)`,
            !ex.stackTrace ? `Parse error at: ${ex.lineNumber + 1}:${ex.columnNumber + 1}` : null,
            ex.exception?.description || ex.text
          ].filter(Boolean);
          const evaluationError = new Error(messageLines.join("\n"));
          return Promise.reject(evaluationError);
        }
        if (response.result === void 0) {
          return Promise.reject(new Error('Runtime.evaluate response did not contain a "result" object'));
        }
        const value = response.result.value;
        if (value?.__failedInBrowser) {
          return Promise.reject(Object.assign(new Error(), value));
        } else {
          return value;
        }
      }
      /**
       * Evaluate an expression in the context of the current page. If useIsolation is true, the expression
       * will be evaluated in a content script that has access to the page's DOM but whose JavaScript state
       * is completely separate.
       * Returns a promise that resolves on the expression's value.
       *
       * @deprecated Use `evaluate` instead! It has a better API, and unlike `evaluateAsync` doesn't sometimes
       * execute invalid code.
       * @param {string} expression
       * @param {{useIsolation?: boolean}=} options
       * @return {Promise<*>}
       */
      async evaluateAsync(expression, options2 = {}) {
        const timeout2 = this._session.hasNextProtocolTimeout() ? this._session.getNextProtocolTimeout() : 6e4;
        const contextId = options2.useIsolation ? await this._getOrCreateIsolatedContextId() : void 0;
        try {
          return await this._evaluateInContext(expression, contextId, timeout2);
        } catch (err) {
          if (contextId && err.message.includes("Cannot find context")) {
            this.clearContextId();
            const freshContextId = await this._getOrCreateIsolatedContextId();
            return this._evaluateInContext(expression, freshContextId, timeout2);
          }
          throw err;
        }
      }
      /**
       * Evaluate a function in the context of the current page.
       * If `useIsolation` is true, the function will be evaluated in a content script that has
       * access to the page's DOM but whose JavaScript state is completely separate.
       * Returns a promise that resolves on a value of `mainFn`'s return type.
       * @template {unknown[]} T, R
       * @param {((...args: T) => R)} mainFn The main function to call.
       * @param {{args: T, useIsolation?: boolean, deps?: Array<Function|string>}} options `args` should
       *   match the args of `mainFn`, and can be any serializable value. `deps` are functions that must be
       *   defined for `mainFn` to work.
       * @return {Promise<Awaited<R>>}
       */
      evaluate(mainFn, options2) {
        const argsSerialized = _ExecutionContext.serializeArguments(options2.args);
        const depsSerialized = _ExecutionContext.serializeDeps(options2.deps);
        const expression = `(() => {
      ${depsSerialized}
      return (${mainFn})(${argsSerialized});
    })()`;
        return this.evaluateAsync(expression, options2);
      }
      /**
       * Evaluate a function on every new frame from now on.
       * @template {unknown[]} T
       * @param {((...args: T) => void)} mainFn The main function to call.
       * @param {{args: T, deps?: Array<Function|string>}} options `args` should
       *   match the args of `mainFn`, and can be any serializable value. `deps` are functions that must be
       *   defined for `mainFn` to work.
       * @return {Promise<void>}
       */
      async evaluateOnNewDocument(mainFn, options2) {
        const argsSerialized = _ExecutionContext.serializeArguments(options2.args);
        const depsSerialized = _ExecutionContext.serializeDeps(options2.deps);
        const expression = `(() => {
      ${_ExecutionContext._cachedNativesPreamble};
      ${depsSerialized};
      (${mainFn})(${argsSerialized});
    })()
    //# sourceURL=_lighthouse-eval.js`;
        await this._session.sendCommand("Page.addScriptToEvaluateOnNewDocument", { source: expression });
      }
      /**
       * Cache native functions/objects inside window so we are sure polyfills do not overwrite the
       * native implementations when the page loads.
       * @return {Promise<void>}
       */
      async cacheNativesOnNewDocument() {
        await this.evaluateOnNewDocument(() => {
          window.__nativePromise = window.Promise;
          window.__nativeURL = window.URL;
          window.__nativePerformance = window.performance;
          window.__nativeFetch = window.fetch;
          window.__ElementMatches = window.Element.prototype.matches;
          window.__HTMLElementBoundingClientRect = window.HTMLElement.prototype.getBoundingClientRect;
        }, { args: [] });
      }
      /**
       * Prefix every script evaluation with a shadowing of common globals that tend to be ponyfilled
       * incorrectly by many sites. This allows functions to still refer to `Promise` instead of
       * Lighthouse-specific backups like `__nativePromise` (injected by `cacheNativesOnNewDocument` above).
       */
      static _cachedNativesPreamble = [
        "const Promise = globalThis.__nativePromise || globalThis.Promise",
        "const URL = globalThis.__nativeURL || globalThis.URL",
        "const performance = globalThis.__nativePerformance || globalThis.performance",
        "const fetch = globalThis.__nativeFetch || globalThis.fetch"
      ].join(";\n");
      /**
       * Serializes an array of arguments for use in an `eval` string across the protocol.
       * @param {unknown[]} args
       * @return {string}
       */
      static serializeArguments(args2) {
        return args2.map((arg) => arg === void 0 ? "undefined" : JSON.stringify(arg)).join(",");
      }
      /**
       * Serializes an array of functions or strings.
       *
       * Also makes sure that an esbuild-bundled version of Lighthouse will
       * continue to create working code to be executed within the browser.
       * @param {Array<Function|string>=} deps
       * @return {string}
       */
      static serializeDeps(deps172) {
        deps172 = [pageFunctions.esbuildFunctionWrapperString, ...deps172 || []];
        return deps172.map((dep) => {
          if (typeof dep === "function") {
            const output = dep.toString();
            const runtimeName = pageFunctions.getRuntimeFunctionName(dep);
            if (runtimeName !== dep.name) {
              return `${output}; const ${dep.name} = ${runtimeName};`;
            } else {
              return output;
            }
          } else {
            return dep;
          }
        }).join("\n");
      }
    };
    init_process_global();
    init_lighthouse_logger();
    init_process_global();
    init_lighthouse_logger();
    init_lh_error();
    DEFAULT_PROTOCOL_TIMEOUT = 3e4;
    PPTR_BUFFER = 50;
    MAX_TIMEOUT = 2147483647 - PPTR_BUFFER;
    CrdpEventEmitter = /** @type {CrdpEventMessageEmitter} */
    EventEmitter3;
    ProtocolSession = class extends CrdpEventEmitter {
      static {
        __name(this, "ProtocolSession");
      }
      /**
       * @param {LH.Puppeteer.CDPSession} cdpSession
       */
      constructor(cdpSession) {
        super();
        this._cdpSession = cdpSession;
        this._targetInfo = void 0;
        this._nextProtocolTimeout = void 0;
        this._handleProtocolEvent = this._handleProtocolEvent.bind(this);
        this._cdpSession.on("*", this._handleProtocolEvent);
        let rej = /* @__PURE__ */ __name((_) => {
        }, "rej");
        this._targetCrashedPromise = /** @type {Promise<never>} */
        new Promise((_, theRej) => rej = theRej);
        this.on("Inspector.targetCrashed", async () => {
          lighthouse_logger_default.error("TargetManager", "Inspector.targetCrashed");
          void this.dispose();
          rej(new LighthouseError(LighthouseError.errors.TARGET_CRASHED));
        });
      }
      id() {
        return this._cdpSession.id();
      }
      /**
       * Re-emit protocol events from the underlying CDPSession.
       * @template {keyof LH.CrdpEvents} E
       * @param {E} method
       * @param {LH.CrdpEvents[E]} params
       */
      _handleProtocolEvent(method, ...params) {
        this.emit(method, ...params);
      }
      /** @param {LH.Crdp.Target.TargetInfo} targetInfo */
      setTargetInfo(targetInfo) {
        this._targetInfo = targetInfo;
      }
      /**
       * @return {boolean}
       */
      hasNextProtocolTimeout() {
        return this._nextProtocolTimeout !== void 0;
      }
      /**
       * @return {number}
       */
      getNextProtocolTimeout() {
        return this._nextProtocolTimeout || DEFAULT_PROTOCOL_TIMEOUT;
      }
      /**
       * @param {number} ms
       */
      setNextProtocolTimeout(ms2) {
        if (ms2 > MAX_TIMEOUT)
          ms2 = MAX_TIMEOUT;
        this._nextProtocolTimeout = ms2;
      }
      /**
       * @template {keyof LH.CrdpCommands} C
       * @param {C} method
       * @param {LH.CrdpCommands[C]['paramsType']} params
       * @return {Promise<LH.CrdpCommands[C]['returnType']>}
       */
      sendCommand(method, ...params) {
        const timeoutMs = this.getNextProtocolTimeout();
        this._nextProtocolTimeout = void 0;
        let timeout2;
        const timeoutPromise = new Promise((resolve2, reject) => {
          timeout2 = setTimeout(reject, timeoutMs, new LighthouseError(LighthouseError.errors.PROTOCOL_TIMEOUT, {
            protocolMethod: method
          }));
        });
        const resultPromise = this._cdpSession.send(method, ...params, {
          // Add 50ms to the Puppeteer timeout to ensure the Lighthouse timeout finishes first.
          timeout: timeoutMs + PPTR_BUFFER
        }).catch((error) => {
          lighthouse_logger_default.formatProtocol("method <= browser ERR", { method }, "error");
          throw LighthouseError.fromProtocolMessage(method, error);
        });
        const resultWithTimeoutPromise = Promise.race([resultPromise, timeoutPromise, this._targetCrashedPromise]);
        return resultWithTimeoutPromise.finally(() => {
          if (timeout2)
            clearTimeout(timeout2);
        });
      }
      /**
       * Send and if there's an error response, do not reject.
       * @template {keyof LH.CrdpCommands} C
       * @param {C} method
       * @param {LH.CrdpCommands[C]['paramsType']} params
       * @return {Promise<void>}
       */
      sendCommandAndIgnore(method, ...params) {
        return this.sendCommand(method, ...params).catch((e) => lighthouse_logger_default.verbose("session", method, e.message)).then((_) => void 0);
      }
      /**
       * Disposes of a session so that it can no longer talk to Chrome.
       * @return {Promise<void>}
       */
      async dispose() {
        this._cdpSession.off("*", this._handleProtocolEvent);
        await this._cdpSession.detach().catch((e) => lighthouse_logger_default.verbose("session", "detach failed", e.message));
      }
      onCrashPromise() {
        return this._targetCrashedPromise;
      }
    };
    ProtocolEventEmitter = /** @type {ProtocolEventMessageEmitter} */
    EventEmitter4;
    TargetManager = class extends ProtocolEventEmitter {
      static {
        __name(this, "TargetManager");
      }
      /** @param {LH.Puppeteer.CDPSession} cdpSession */
      constructor(cdpSession) {
        super();
        this._enabled = false;
        this._rootCdpSession = cdpSession;
        this._mainFrameId = "";
        this._targetIdToTargets = /* @__PURE__ */ new Map();
        this._executionContextIdToDescriptions = /* @__PURE__ */ new Map();
        this._onSessionAttached = this._onSessionAttached.bind(this);
        this._onFrameNavigated = this._onFrameNavigated.bind(this);
        this._onExecutionContextCreated = this._onExecutionContextCreated.bind(this);
        this._onExecutionContextDestroyed = this._onExecutionContextDestroyed.bind(this);
        this._onExecutionContextsCleared = this._onExecutionContextsCleared.bind(this);
      }
      /**
       * @param {LH.Crdp.Page.FrameNavigatedEvent} frameNavigatedEvent
       */
      async _onFrameNavigated(frameNavigatedEvent) {
        if (frameNavigatedEvent.frame.parentId)
          return;
        if (!this._enabled)
          return;
        try {
          await this._rootCdpSession.send("Target.setAutoAttach", {
            autoAttach: true,
            flatten: true,
            waitForDebuggerOnStart: true
          });
        } catch (err) {
          if (this._enabled)
            throw err;
        }
      }
      /**
       * @param {string} sessionId
       * @return {LH.Gatherer.ProtocolSession}
       */
      _findSession(sessionId) {
        for (const { session, cdpSession } of this._targetIdToTargets.values()) {
          if (cdpSession.id() === sessionId)
            return session;
        }
        throw new Error(`session ${sessionId} not found`);
      }
      /**
       * @param {string} targetType
       * @return {targetType is LH.Protocol.TargetType}
       */
      _isAcceptedTargetType(targetType) {
        return targetType === "page" || targetType === "iframe" || targetType === "worker";
      }
      /**
       * Returns the root session.
       * @return {LH.Gatherer.ProtocolSession}
       */
      rootSession() {
        const rootSessionId = this._rootCdpSession.id();
        return this._findSession(rootSessionId);
      }
      mainFrameExecutionContexts() {
        return [...this._executionContextIdToDescriptions.values()].filter((executionContext) => {
          return executionContext.auxData.frameId === this._mainFrameId;
        });
      }
      /**
       * @param {LH.Puppeteer.CDPSession} cdpSession
       */
      async _onSessionAttached(cdpSession) {
        const newSession = new ProtocolSession(cdpSession);
        let targetType;
        try {
          const { targetInfo } = await newSession.sendCommand("Target.getTargetInfo");
          targetType = targetInfo.type;
          if (!this._isAcceptedTargetType(targetType))
            return;
          const targetId = targetInfo.targetId;
          if (this._targetIdToTargets.has(targetId))
            return;
          newSession.setTargetInfo(targetInfo);
          const targetName = targetInfo.url || targetInfo.targetId;
          lighthouse_logger_default.verbose("target-manager", `target ${targetName} attached`);
          const trueProtocolListener = this._getProtocolEventListener(targetType, newSession.id());
          const protocolListener = trueProtocolListener;
          cdpSession.on("*", protocolListener);
          cdpSession.on("sessionattached", this._onSessionAttached);
          const targetWithSession = {
            target: targetInfo,
            cdpSession,
            session: newSession,
            protocolListener
          };
          this._targetIdToTargets.set(targetId, targetWithSession);
          await newSession.sendCommand("Network.enable");
          await newSession.sendCommand("Target.setAutoAttach", {
            autoAttach: true,
            flatten: true,
            waitForDebuggerOnStart: true
          });
        } catch (err) {
          if (/Target closed/.test(err.message))
            return;
          if (/'Target.getTargetInfo' wasn't found/.test(err))
            return;
          if (targetType === "worker") {
            lighthouse_logger_default.warn("target-manager", `Issue attaching to worker target: ${err}`);
            return;
          }
          throw err;
        } finally {
          await newSession.sendCommandAndIgnore("Runtime.runIfWaitingForDebugger");
        }
      }
      /**
       * @param {LH.Crdp.Runtime.ExecutionContextCreatedEvent} event
       */
      _onExecutionContextCreated(event) {
        if (event.context.name.match(/^__puppeteer_utility_world__/))
          return;
        if (event.context.name === "lighthouse_isolated_context")
          return;
        this._executionContextIdToDescriptions.set(event.context.uniqueId, event.context);
      }
      /**
       * @param {LH.Crdp.Runtime.ExecutionContextDestroyedEvent} event
       */
      _onExecutionContextDestroyed(event) {
        this._executionContextIdToDescriptions.delete(event.executionContextUniqueId);
      }
      _onExecutionContextsCleared() {
        this._executionContextIdToDescriptions.clear();
      }
      /**
       * Returns a listener for all protocol events from session, and augments the
       * event with the sessionId.
       * @param {LH.Protocol.TargetType} targetType
       * @param {string} sessionId
       */
      _getProtocolEventListener(targetType, sessionId) {
        const onProtocolEvent = /* @__PURE__ */ __name((method, params) => {
          const payload = (
            /** @type {LH.Protocol.RawEventMessage} */
            { method, params, targetType, sessionId }
          );
          this.emit("protocolevent", payload);
        }, "onProtocolEvent");
        return onProtocolEvent;
      }
      /**
       * @return {Promise<void>}
       */
      async enable() {
        if (this._enabled)
          return;
        this._enabled = true;
        this._targetIdToTargets = /* @__PURE__ */ new Map();
        this._executionContextIdToDescriptions = /* @__PURE__ */ new Map();
        this._rootCdpSession.on("Page.frameNavigated", this._onFrameNavigated);
        this._rootCdpSession.on("Runtime.executionContextCreated", this._onExecutionContextCreated);
        this._rootCdpSession.on("Runtime.executionContextDestroyed", this._onExecutionContextDestroyed);
        this._rootCdpSession.on("Runtime.executionContextsCleared", this._onExecutionContextsCleared);
        await this._rootCdpSession.send("Page.enable");
        await this._rootCdpSession.send("Runtime.enable");
        this._mainFrameId = (await this._rootCdpSession.send("Page.getFrameTree")).frameTree.frame.id;
        await this._onSessionAttached(this._rootCdpSession);
      }
      /**
       * @return {Promise<void>}
       */
      async disable() {
        this._rootCdpSession.off("Page.frameNavigated", this._onFrameNavigated);
        this._rootCdpSession.off("Runtime.executionContextCreated", this._onExecutionContextCreated);
        this._rootCdpSession.off("Runtime.executionContextDestroyed", this._onExecutionContextDestroyed);
        this._rootCdpSession.off("Runtime.executionContextsCleared", this._onExecutionContextsCleared);
        for (const { cdpSession, protocolListener } of this._targetIdToTargets.values()) {
          cdpSession.off("*", protocolListener);
          cdpSession.off("sessionattached", this._onSessionAttached);
        }
        await this._rootCdpSession.send("Page.disable").catch((_) => {
        });
        await this._rootCdpSession.send("Runtime.disable").catch((_) => {
        });
        this._enabled = false;
        this._targetIdToTargets = /* @__PURE__ */ new Map();
        this._executionContextIdToDescriptions = /* @__PURE__ */ new Map();
        this._mainFrameId = "";
      }
    };
    init_process_global();
    init_lh();
    Fetcher = class {
      static {
        __name(this, "Fetcher");
      }
      /**
       * @param {LH.Gatherer.ProtocolSession} session
       */
      constructor(session) {
        this.session = session;
      }
      /**
       * Fetches any resource using the network directly.
       *
       * @param {string} url
       * @param {{timeout: number}=} options timeout is in ms
       * @return {Promise<FetchResponse>}
       */
      async fetchResource(url, options2 = { timeout: 2e3 }) {
        if (global.isLightrider) {
          return this._wrapWithTimeout(this._fetchWithFetchApi(url), options2.timeout);
        }
        return this._fetchResourceOverProtocol(url, options2);
      }
      /**
       * @param {string} url
       * @return {Promise<FetchResponse>}
       */
      async _fetchWithFetchApi(url) {
        const response = await fetch(url);
        let content = null;
        try {
          content = await response.text();
        } catch {
        }
        return {
          content,
          status: response.status
        };
      }
      /**
       * @param {string} handle
       * @param {{timeout: number}=} options,
       * @return {Promise<string>}
       */
      async _readIOStream(handle, options2 = { timeout: 2e3 }) {
        const startTime = Date.now();
        let ioResponse;
        let data312 = "";
        while (!ioResponse || !ioResponse.eof) {
          const elapsedTime = Date.now() - startTime;
          if (elapsedTime > options2.timeout) {
            throw new Error("Waiting for the end of the IO stream exceeded the allotted time.");
          }
          ioResponse = await this.session.sendCommand("IO.read", { handle });
          const responseData = ioResponse.base64Encoded ? Buffer.from(ioResponse.data, "base64").toString("utf-8") : ioResponse.data;
          data312 = data312.concat(responseData);
        }
        return data312;
      }
      /**
       * @param {string} url
       * @return {Promise<{stream: LH.Crdp.IO.StreamHandle|null, status: number|null}>}
       */
      async _loadNetworkResource(url) {
        const frameTreeResponse = await this.session.sendCommand("Page.getFrameTree");
        const networkResponse = await this.session.sendCommand("Network.loadNetworkResource", {
          frameId: frameTreeResponse.frameTree.frame.id,
          url,
          options: {
            disableCache: true,
            includeCredentials: true
          }
        });
        return {
          stream: networkResponse.resource.success ? networkResponse.resource.stream || null : null,
          status: networkResponse.resource.httpStatusCode || null
        };
      }
      /**
       * @param {string} url
       * @param {{timeout: number}} options timeout is in ms
       * @return {Promise<FetchResponse>}
       */
      async _fetchResourceOverProtocol(url, options2) {
        const startTime = Date.now();
        const response = await this._wrapWithTimeout(this._loadNetworkResource(url), options2.timeout);
        const isOk = response.status && response.status >= 200 && response.status <= 299;
        if (!response.stream || !isOk)
          return { status: response.status, content: null };
        const timeout2 = options2.timeout - (Date.now() - startTime);
        const content = await this._readIOStream(response.stream, { timeout: timeout2 });
        return { status: response.status, content };
      }
      /**
       * @template T
       * @param {Promise<T>} promise
       * @param {number} ms
       */
      async _wrapWithTimeout(promise, ms2) {
        let timeoutHandle;
        const timeoutPromise = new Promise((_, reject) => {
          timeoutHandle = setTimeout(reject, ms2, new Error("Timed out fetching resource"));
        });
        const wrappedPromise = await Promise.race([promise, timeoutPromise]).finally(() => clearTimeout(timeoutHandle));
        return wrappedPromise;
      }
    };
    init_process_global();
    init_lighthouse_logger();
    init_lh();
    init_network_recorder();
    init_network_request();
    init_url_utils();
    NetworkMonitorEventEmitter = /** @type {NetworkMonitorEmitter} */
    EventEmitter5;
    NetworkMonitor = class extends NetworkMonitorEventEmitter {
      static {
        __name(this, "NetworkMonitor");
      }
      /** @type {NetworkRecorder|undefined} */
      _networkRecorder = void 0;
      /** @type {Array<LH.Crdp.Page.Frame>} */
      _frameNavigations = [];
      /** @param {LH.Gatherer.Driver['targetManager']} targetManager */
      constructor(targetManager) {
        super();
        this._targetManager = targetManager;
        this._session = targetManager.rootSession();
        this._onFrameNavigated = (event) => this._frameNavigations.push(event.frame);
        this._onProtocolMessage = (event) => {
          if (!this._networkRecorder)
            return;
          this._networkRecorder.dispatch(event);
        };
      }
      /**
       * @return {Promise<void>}
       */
      async enable() {
        if (this._networkRecorder)
          return;
        this._frameNavigations = [];
        this._networkRecorder = new NetworkRecorder();
        const reEmit = /* @__PURE__ */ __name((event) => (r) => {
          this.emit(event, r);
          this._emitNetworkStatus();
        }, "reEmit");
        this._networkRecorder.on("requeststarted", reEmit("requeststarted"));
        this._networkRecorder.on("requestfinished", reEmit("requestfinished"));
        this._session.on("Page.frameNavigated", this._onFrameNavigated);
        this._targetManager.on("protocolevent", this._onProtocolMessage);
      }
      /**
       * @return {Promise<void>}
       */
      async disable() {
        if (!this._networkRecorder)
          return;
        this._session.off("Page.frameNavigated", this._onFrameNavigated);
        this._targetManager.off("protocolevent", this._onProtocolMessage);
        this._frameNavigations = [];
        this._networkRecorder = void 0;
      }
      /** @return {Promise<{requestedUrl?: string, mainDocumentUrl?: string}>} */
      async getNavigationUrls() {
        const frameNavigations = this._frameNavigations;
        if (!frameNavigations.length)
          return {};
        const mainFrameNavigations22 = frameNavigations.filter((frame) => !frame.parentId);
        if (!mainFrameNavigations22.length)
          lighthouse_logger_default.warn("NetworkMonitor", "No detected navigations");
        let requestedUrl = mainFrameNavigations22[0]?.url;
        if (this._networkRecorder) {
          const records = this._networkRecorder.getRawRecords();
          let initialUrlRequest = records.find((record2) => record2.url === requestedUrl);
          while (initialUrlRequest?.redirectSource) {
            initialUrlRequest = initialUrlRequest.redirectSource;
            requestedUrl = initialUrlRequest.url;
          }
        }
        return {
          requestedUrl,
          mainDocumentUrl: mainFrameNavigations22[mainFrameNavigations22.length - 1]?.url
        };
      }
      /**
       * @return {Array<NetworkRequest>}
       */
      getInflightRequests() {
        if (!this._networkRecorder)
          return [];
        return this._networkRecorder.getRawRecords().filter((request3) => !request3.finished);
      }
      /**
       * Returns whether the network is completely idle (i.e. there are 0 inflight network requests).
       */
      isIdle() {
        return this._isIdlePeriod(0);
      }
      /**
       * Returns whether any important resources for the page are in progress.
       * Above-the-fold images and XHRs should be included.
       * Tracking pixels, low priority images, and cross frame requests should be excluded.
       * @return {boolean}
       */
      isCriticalIdle() {
        if (!this._networkRecorder)
          return false;
        const requests = this._networkRecorder.getRawRecords();
        const rootFrameRequest = requests.find((r) => r.resourceType === "Document");
        const rootFrameId = rootFrameRequest?.frameId;
        return this._isIdlePeriod(
          0,
          // Return true if it should be a candidate for critical.
          (request3) => request3.frameId === rootFrameId && // WebSocket and Server-sent Events are typically long-lived and shouldn't be considered critical.
          request3.resourceType !== "WebSocket" && request3.resourceType !== "EventSource" && (request3.priority === "VeryHigh" || request3.priority === "High")
        );
      }
      /**
       * Returns whether the network is semi-idle (i.e. there are 2 or fewer inflight network requests).
       */
      is2Idle() {
        return this._isIdlePeriod(2);
      }
      /**
       * Returns whether the number of currently inflight requests is less than or
       * equal to the number of allowed concurrent requests.
       * @param {number} allowedRequests
       * @param {(request: NetworkRequest) => boolean} [requestFilter]
       * @return {boolean}
       */
      _isIdlePeriod(allowedRequests, requestFilter) {
        if (!this._networkRecorder)
          return false;
        const requests = this._networkRecorder.getRawRecords();
        let inflightRequests = 0;
        for (let i = 0; i < requests.length; i++) {
          const request3 = requests[i];
          if (request3.finished)
            continue;
          if (requestFilter?.(request3) === false)
            continue;
          if (NetworkRequest.isNonNetworkRequest(request3))
            continue;
          inflightRequests++;
        }
        return inflightRequests <= allowedRequests;
      }
      /**
       * Emits the appropriate network status event.
       */
      _emitNetworkStatus() {
        const zeroQuiet = this.isIdle();
        const twoQuiet = this.is2Idle();
        const criticalQuiet = this.isCriticalIdle();
        this.emit(zeroQuiet ? "networkidle" : "networkbusy");
        this.emit(twoQuiet ? "network-2-idle" : "network-2-busy");
        this.emit(criticalQuiet ? "network-critical-idle" : "network-critical-busy");
        if (twoQuiet && zeroQuiet)
          lighthouse_logger_default.verbose("NetworkRecorder", "network fully-quiet");
        else if (twoQuiet && !zeroQuiet)
          lighthouse_logger_default.verbose("NetworkRecorder", "network semi-quiet");
        else
          lighthouse_logger_default.verbose("NetworkRecorder", "network busy");
      }
      /**
       * Finds all time periods where the number of inflight requests is less than or equal to the
       * number of allowed concurrent requests.
       * The time periods returned are in ms.
       * @param {Array<LH.Artifacts.NetworkRequest>} requests
       * @param {number} allowedConcurrentRequests
       * @param {number=} endTime In ms
       * @return {Array<{start: number, end: number}>}
       */
      static findNetworkQuietPeriods(requests, allowedConcurrentRequests, endTime = Infinity) {
        let timeBoundaries = [];
        requests.forEach((request3) => {
          if (url_utils_default.isNonNetworkProtocol(request3.protocol))
            return;
          if (request3.protocol === "ws" || request3.protocol === "wss")
            return;
          timeBoundaries.push({ time: request3.networkRequestTime, isStart: true });
          if (request3.finished) {
            timeBoundaries.push({ time: request3.networkEndTime, isStart: false });
          }
        });
        timeBoundaries = timeBoundaries.filter((boundary) => boundary.time <= endTime).sort((a, b) => a.time - b.time);
        let numInflightRequests = 0;
        let quietPeriodStart = 0;
        const quietPeriods = [];
        timeBoundaries.forEach((boundary) => {
          if (boundary.isStart) {
            if (numInflightRequests === allowedConcurrentRequests) {
              quietPeriods.push({ start: quietPeriodStart, end: boundary.time });
            }
            numInflightRequests++;
          } else {
            numInflightRequests--;
            if (numInflightRequests === allowedConcurrentRequests) {
              quietPeriodStart = boundary.time;
            }
          }
        });
        if (numInflightRequests <= allowedConcurrentRequests) {
          quietPeriods.push({ start: quietPeriodStart, end: endTime });
        }
        return quietPeriods.filter((period) => period.start !== period.end);
      }
    };
    throwNotConnectedFn = /* @__PURE__ */ __name(() => {
      throw new Error("Session not connected");
    }, "throwNotConnectedFn");
    throwingSession = {
      setTargetInfo: throwNotConnectedFn,
      hasNextProtocolTimeout: throwNotConnectedFn,
      getNextProtocolTimeout: throwNotConnectedFn,
      setNextProtocolTimeout: throwNotConnectedFn,
      on: throwNotConnectedFn,
      once: throwNotConnectedFn,
      off: throwNotConnectedFn,
      sendCommand: throwNotConnectedFn,
      sendCommandAndIgnore: throwNotConnectedFn,
      dispose: throwNotConnectedFn,
      onCrashPromise: throwNotConnectedFn
    };
    Driver = class {
      static {
        __name(this, "Driver");
      }
      /**
       * @param {LH.Puppeteer.Page} page
       */
      constructor(page) {
        this._page = page;
        this._targetManager = void 0;
        this._networkMonitor = void 0;
        this._executionContext = void 0;
        this._fetcher = void 0;
        this.defaultSession = throwingSession;
      }
      /** @return {LH.Gatherer.Driver['executionContext']} */
      get executionContext() {
        if (!this._executionContext)
          return throwNotConnectedFn();
        return this._executionContext;
      }
      get fetcher() {
        if (!this._fetcher)
          return throwNotConnectedFn();
        return this._fetcher;
      }
      get targetManager() {
        if (!this._targetManager)
          return throwNotConnectedFn();
        return this._targetManager;
      }
      get networkMonitor() {
        if (!this._networkMonitor)
          return throwNotConnectedFn();
        return this._networkMonitor;
      }
      /** @return {Promise<string>} */
      async url() {
        return this._page.url();
      }
      /** @return {Promise<void>} */
      async connect() {
        if (this.defaultSession !== throwingSession)
          return;
        const status = { msg: "Connecting to browser", id: "lh:driver:connect" };
        lighthouse_logger_default.time(status);
        const cdpSession = await this._page.target().createCDPSession();
        this._targetManager = new TargetManager(cdpSession);
        await this._targetManager.enable();
        this._networkMonitor = new NetworkMonitor(this._targetManager);
        await this._networkMonitor.enable();
        this.defaultSession = this._targetManager.rootSession();
        this._executionContext = new ExecutionContext(this.defaultSession);
        this._fetcher = new Fetcher(this.defaultSession);
        lighthouse_logger_default.timeEnd(status);
      }
      /** @return {Promise<void>} */
      async disconnect() {
        if (this.defaultSession === throwingSession)
          return;
        await this._targetManager?.disable();
        await this._networkMonitor?.disable();
        await this.defaultSession.dispose();
      }
    };
    init_process_global();
    init_lighthouse_logger();
    __name(createDependencyError, "createDependencyError");
    __name(getEmptyArtifactState, "getEmptyArtifactState");
    phaseToPriorPhase = {
      startInstrumentation: void 0,
      startSensitiveInstrumentation: "startInstrumentation",
      stopSensitiveInstrumentation: "startSensitiveInstrumentation",
      stopInstrumentation: "stopSensitiveInstrumentation",
      getArtifact: "stopInstrumentation"
    };
    __name(collectPhaseArtifacts, "collectPhaseArtifacts");
    __name(collectArtifactDependencies, "collectArtifactDependencies");
    __name(awaitArtifacts, "awaitArtifacts");
    init_process_global();
    init_lighthouse_logger();
    init_lodash();
    init_process_global();
    init_lighthouse_logger();
    init_page_functions();
    init_i18n();
    UIStrings119 = {
      /**
       * @description Warning that the host device where Lighthouse is running appears to have a slower
       * CPU than the expected Lighthouse baseline.
       */
      warningSlowHostCpu: "The tested device appears to have a slower CPU than  Lighthouse expects. This can negatively affect your performance score. Learn more about [calibrating an appropriate CPU slowdown multiplier](https://github.com/GoogleChrome/lighthouse/blob/main/docs/throttling.md#cpu-throttling)."
    };
    SLOW_CPU_BENCHMARK_INDEX_THRESHOLD = 1e3;
    str_99 = createIcuMessageFn({ url: "core/gather/driver/environment.js" }.url, UIStrings119);
    __name(getBrowserVersion, "getBrowserVersion");
    __name(getBenchmarkIndex, "getBenchmarkIndex");
    __name(getDevicePixelRatio, "getDevicePixelRatio");
    __name(getSlowHostCpuWarning, "getSlowHostCpuWarning");
    __name(getEnvironmentWarnings, "getEnvironmentWarnings");
    __name(getBaseArtifacts, "getBaseArtifacts");
    __name(deduplicateWarnings, "deduplicateWarnings");
    __name(finalizeArtifacts, "finalizeArtifacts");
    __name(snapshotGather, "snapshotGather");
    init_process_global();
    init_lighthouse_logger();
    init_process_global();
    init_lighthouse_logger();
    init_process_global();
    init_lighthouse_logger();
    init_i18n();
    UIStrings120 = {
      /**
       * @description A warning that previously-saved data may have affected the measured performance and instructions on how to avoid the problem. "locations" will be a list of possible types of data storage locations, e.g. "IndexedDB",  "Local Storage", or "Web SQL".
       * @example {IndexedDB, Local Storage} locations
       */
      warningData: `{locationCount, plural,
    =1 {There may be stored data affecting loading performance in this location: {locations}. Audit this page in an incognito window to prevent those resources from affecting your scores.}
    other {There may be stored data affecting loading performance in these locations: {locations}. Audit this page in an incognito window to prevent those resources from affecting your scores.}
  }`,
      /** A warning that the data in the browser cache may have affected the measured performance because the operation to clear the browser cache timed out. */
      warningCacheTimeout: "Clearing the browser cache timed out. Try auditing this page again and file a bug if the issue persists.",
      /** A warning that the data on the page's origin may have affected the measured performance because the operation to clear the origin data timed out. */
      warningOriginDataTimeout: "Clearing the origin data timed out. Try auditing this page again and file a bug if the issue persists."
    };
    str_100 = createIcuMessageFn({ url: "core/gather/driver/storage.js" }.url, UIStrings120);
    __name(clearDataForOrigin, "clearDataForOrigin");
    __name(getImportantStorageWarning, "getImportantStorageWarning");
    __name(clearBrowserCaches, "clearBrowserCaches");
    init_process_global();
    NO_THROTTLING_METRICS = {
      latency: 0,
      downloadThroughput: 0,
      uploadThroughput: 0,
      offline: false
    };
    NO_CPU_THROTTLE_METRICS = {
      rate: 1
    };
    __name(parseUseragentIntoMetadata, "parseUseragentIntoMetadata");
    __name(matchHostUAVersion, "matchHostUAVersion");
    __name(emulate, "emulate");
    __name(throttle, "throttle");
    __name(clearThrottling, "clearThrottling");
    __name(enableNetworkThrottling, "enableNetworkThrottling");
    __name(clearNetworkThrottling, "clearNetworkThrottling");
    __name(enableCPUThrottling, "enableCPUThrottling");
    __name(clearCPUThrottling, "clearCPUThrottling");
    init_page_functions();
    __name(enableAsyncStacks, "enableAsyncStacks");
    __name(shimRequestIdleCallbackOnNewDocument, "shimRequestIdleCallbackOnNewDocument");
    __name(dismissJavaScriptDialogs, "dismissJavaScriptDialogs");
    __name(resetStorageForUrl, "resetStorageForUrl");
    __name(prepareThrottlingAndNetwork, "prepareThrottlingAndNetwork");
    __name(prepareDeviceEmulation, "prepareDeviceEmulation");
    __name(warmUpIntlSegmenter, "warmUpIntlSegmenter");
    __name(prepareTargetForNavigationMode, "prepareTargetForNavigationMode");
    init_i18n();
    UIStrings121 = {
      /** A warning that indicates page navigations should be audited using navigation mode, as opposed to timespan mode. "navigation mode" refers to a Lighthouse mode that analyzes a page navigation. "timespan mode" refers to a Lighthouse mode that analyzes user interactions over an arbitrary period of time. */
      warningNavigationDetected: "A page navigation was detected during the run. Using timespan mode to audit page navigations is not recommended. Use navigation mode to audit page navigations for better third-party attribution and main thread detection."
    };
    str_101 = createIcuMessageFn({ url: "core/gather/timespan-runner.js" }.url, UIStrings121);
    init_process_global();
    init_process_global();
    puppeteer_core_default = {};
    init_lighthouse_logger();
    init_process_global();
    init_lighthouse_logger();
    init_process_global();
    init_lighthouse_logger();
    init_lh_error();
    __name(waitForNothing, "waitForNothing");
    __name(waitForFrameNavigated, "waitForFrameNavigated");
    __name(waitForFcp, "waitForFcp");
    __name(waitForNetworkIdle, "waitForNetworkIdle");
    __name(waitForCPUIdle, "waitForCPUIdle");
    __name(registerPerformanceObserverInPage, "registerPerformanceObserverInPage");
    __name(checkTimeSinceLastLongTaskInPage, "checkTimeSinceLastLongTaskInPage");
    __name(waitForLoadEvent, "waitForLoadEvent");
    __name(isPageHung, "isPageHung");
    DEFAULT_WAIT_FUNCTIONS = { waitForFcp, waitForLoadEvent, waitForCPUIdle, waitForNetworkIdle };
    __name(waitForFullyLoaded, "waitForFullyLoaded");
    __name(waitForUserToContinue, "waitForUserToContinue");
    init_i18n();
    init_url_utils();
    UIStrings122 = {
      /**
       * @description Warning that the web page redirected during testing and that may have affected the load.
       * @example {https://example.com/requested/page} requested
       * @example {https://example.com/final/resolved/page} final
       */
      warningRedirected: `The page may not be loading as expected because your test URL ({requested}) was redirected to {final}. Try testing the second URL directly.`,
      /**
       * @description Warning that Lighthouse timed out while waiting for the page to load.
       */
      warningTimeout: "The page loaded too slowly to finish within the time limit. Results may be incomplete."
    };
    str_102 = createIcuMessageFn({ url: "core/gather/driver/navigation.js" }.url, UIStrings122);
    DEFAULT_PAUSE_AFTER_FCP = 0;
    DEFAULT_PAUSE_AFTER_LOAD = 0;
    DEFAULT_NETWORK_QUIET_THRESHOLD = 5e3;
    DEFAULT_CPU_QUIET_THRESHOLD = 0;
    __name(resolveWaitForFullyLoadedOptions, "resolveWaitForFullyLoadedOptions");
    __name(gotoURL, "gotoURL");
    __name(getNavigationWarnings, "getNavigationWarnings");
    init_format();
    init_lh_error();
    init_url_utils();
    init_process_global();
    init_lantern2();
    init_lh_error();
    init_network_request();
    init_i18n();
    UIStrings123 = {
      /**
       * Warning shown in report when the page under test is an XHTML document, which Lighthouse does not directly support
       * so we display a warning.
       */
      warningXhtml: "The page MIME type is XHTML: Lighthouse does not explicitly support this document type",
      /**
       * @description Warning shown in report when the page under test returns an error code, which Lighthouse is not able to reliably load so we display a warning.
       * @example {404} errorCode
       */
      warningStatusCode: "Lighthouse was unable to reliably load the page you requested. Make sure you are testing the correct URL and that the server is properly responding to all requests. (Status code: {errorCode})"
    };
    str_103 = createIcuMessageFn({ url: "core/lib/navigation-error.js" }.url, UIStrings123);
    HTML_MIME_TYPE = "text/html";
    XHTML_MIME_TYPE = "application/xhtml+xml";
    __name(getNetworkError, "getNetworkError");
    __name(getInterstitialError, "getInterstitialError");
    __name(getNonHtmlError, "getNonHtmlError");
    __name(getPageLoadError, "getPageLoadError");
    init_trace();
    init_devtools_log();
    init_network_records();
    DEFAULT_HOSTNAME = "127.0.0.1";
    DEFAULT_PORT = 9222;
    __name(_setup, "_setup");
    __name(_cleanupNavigation, "_cleanupNavigation");
    __name(_navigate, "_navigate");
    __name(_collectDebugData, "_collectDebugData");
    __name(_computeNavigationResult, "_computeNavigationResult");
    __name(_navigation, "_navigation");
    __name(_cleanup, "_cleanup");
    __name(navigationGather, "navigationGather");
    init_format();
    init_i18n();
    init_lh();
    UIStrings124 = {
      /**
       * @description Default name for a user flow on the given url. "User flow" refers to the series of page navigations and user interactions being tested on the page. "url" is a trimmed version of a url that only includes the domain name.
       * @example {example.com} url
       */
      defaultFlowName: "User flow ({url})",
      /**
       * @description Default name for a Lighthouse report that analyzes a page navigation. "url" is a trimmed version of a url that only includes the domain name and path.
       * @example {example.com/page} url
       */
      defaultNavigationName: "Navigation report ({url})",
      /**
       * @description Default name for a Lighthouse report that analyzes user interactions over a period of time. "url" is a trimmed version of a url that only includes the domain name and path.
       * @example {example.com/page} url
       */
      defaultTimespanName: "Timespan report ({url})",
      /**
       * @description Default name for a Lighthouse report that analyzes the page state at a point in time. "url" is a trimmed version of a url that only includes the domain name and path.
       * @example {example.com/page} url
       */
      defaultSnapshotName: "Snapshot report ({url})"
    };
    str_104 = createIcuMessageFn({ url: "core/user-flow.js" }.url, UIStrings124);
    init_lh();
    init_audit();
    init_base_gatherer();
    init_network_records();
    init_process_global();
    init_lh();
    config2 = {
      extends: "lighthouse:default",
      settings: {
        formFactor: "desktop",
        throttling: throttling2.desktopDense4G,
        screenEmulation: screenEmulationMetrics.desktop,
        emulatedUserAgent: userAgents.desktop
      }
    };
    init_lh();
    __name(navigation, "navigation");
    __name(snapshot, "snapshot");
    __name(generateReport, "generateReport");
    traceCategories = trace_default.getDefaultTraceCategories();
  }
});

// ../../node_modules/chrome-devtools-mcp/build/src/third_party/index.js
import process$2 from "node:process";
import readline from "node:readline";
import * as WorkerThreads from "node:worker_threads";
import require$$2, { strictEqual, notStrictEqual } from "assert";
import require$$0$4, { resolve as resolve$2, dirname, normalize, join, relative, extname, basename } from "path";
import require$$0$3, { statSync, readdirSync, readFileSync, writeFile } from "fs";
import require$$0$2, { format as format$5, inspect } from "util";
import require$$5, { fileURLToPath as fileURLToPath2 } from "url";
import { createRequire as createRequire2 } from "node:module";
import fs2, { readdirSync as readdirSync$1, readFileSync as readFileSync$1, accessSync, existsSync } from "node:fs";
import require$$1 from "tty";
import require$$0$1 from "os";
import require$$0$5 from "child_process";
import { PassThrough } from "node:stream";
import { mkdtemp, unlink, rename, readFile } from "node:fs/promises";
import os, { tmpdir } from "node:os";
import path$1, { join as join$1, dirname as dirname$1 } from "node:path";
import childProcess, { execSync, spawnSync, spawn as spawn$1 } from "node:child_process";
import { EventEmitter as EventEmitter$1 } from "node:events";
import * as http$1 from "node:http";
import * as https$1 from "node:https";
import { urlToHttpOptions, URL as URL$1 } from "node:url";
import require$$0$6 from "http";
import require$$1$1 from "https";
import require$$0$7 from "net";
import require$$1$2 from "tls";
import require$$0$8 from "events";
import require$$0$9 from "buffer";
import require$$1$3 from "stream";
import require$$3$3 from "dns";
import require$$2$1 from "crypto";
import require$$0$a from "zlib";
function _mergeNamespaces(n, m) {
  m.forEach(function(e) {
    e && typeof e !== "string" && !Array.isArray(e) && Object.keys(e).forEach(function(k) {
      if (k !== "default" && !(k in n)) {
        var d = Object.getOwnPropertyDescriptor(e, k);
        Object.defineProperty(n, k, d.get ? d : {
          enumerable: true,
          get: function() {
            return e[k];
          }
        });
      }
    });
  });
  return Object.freeze(n);
}
function getDefaultExportFromCjs(x) {
  return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, "default") ? x["default"] : x;
}
function getAugmentedNamespace(n) {
  if (Object.prototype.hasOwnProperty.call(n, "__esModule")) return n;
  var f = n.default;
  if (typeof f == "function") {
    var a = function a2() {
      var isInstance = false;
      try {
        isInstance = this instanceof a2;
      } catch {
      }
      if (isInstance) {
        return Reflect.construct(f, arguments, this.constructor);
      }
      return f.apply(this, arguments);
    };
    a.prototype = f.prototype;
  } else a = {};
  Object.defineProperty(a, "__esModule", { value: true });
  Object.keys(n).forEach(function(k) {
    var d = Object.getOwnPropertyDescriptor(n, k);
    Object.defineProperty(a, k, d.get ? d : {
      enumerable: true,
      get: function() {
        return n[k];
      }
    });
  });
  return a;
}
function requireGlobalThis() {
  if (hasRequiredGlobalThis) return globalThis_1;
  hasRequiredGlobalThis = 1;
  var check2 = function(it) {
    return it && it.Math === Math && it;
  };
  globalThis_1 = check2(typeof globalThis == "object" && globalThis) || check2(typeof window == "object" && window) || check2(typeof self == "object" && self) || check2(typeof commonjsGlobal == "object" && commonjsGlobal) || check2(typeof globalThis_1 == "object" && globalThis_1) || /* @__PURE__ */ function() {
    return this;
  }() || Function("return this")();
  return globalThis_1;
}
function requireFails() {
  if (hasRequiredFails) return fails;
  hasRequiredFails = 1;
  fails = function(exec2) {
    try {
      return !!exec2();
    } catch (error) {
      return true;
    }
  };
  return fails;
}
function requireDescriptors() {
  if (hasRequiredDescriptors) return descriptors;
  hasRequiredDescriptors = 1;
  var fails2 = requireFails();
  descriptors = !fails2(function() {
    return Object.defineProperty({}, 1, { get: function() {
      return 7;
    } })[1] !== 7;
  });
  return descriptors;
}
function requireFunctionBindNative() {
  if (hasRequiredFunctionBindNative) return functionBindNative;
  hasRequiredFunctionBindNative = 1;
  var fails2 = requireFails();
  functionBindNative = !fails2(function() {
    var test2 = function() {
    }.bind();
    return typeof test2 != "function" || test2.hasOwnProperty("prototype");
  });
  return functionBindNative;
}
function requireFunctionCall() {
  if (hasRequiredFunctionCall) return functionCall;
  hasRequiredFunctionCall = 1;
  var NATIVE_BIND = requireFunctionBindNative();
  var call = Function.prototype.call;
  functionCall = NATIVE_BIND ? call.bind(call) : function() {
    return call.apply(call, arguments);
  };
  return functionCall;
}
function requireObjectPropertyIsEnumerable() {
  if (hasRequiredObjectPropertyIsEnumerable) return objectPropertyIsEnumerable;
  hasRequiredObjectPropertyIsEnumerable = 1;
  var $propertyIsEnumerable = {}.propertyIsEnumerable;
  var getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
  var NASHORN_BUG = getOwnPropertyDescriptor && !$propertyIsEnumerable.call({ 1: 2 }, 1);
  objectPropertyIsEnumerable.f = NASHORN_BUG ? function propertyIsEnumerable3(V) {
    var descriptor = getOwnPropertyDescriptor(this, V);
    return !!descriptor && descriptor.enumerable;
  } : $propertyIsEnumerable;
  return objectPropertyIsEnumerable;
}
function requireCreatePropertyDescriptor() {
  if (hasRequiredCreatePropertyDescriptor) return createPropertyDescriptor;
  hasRequiredCreatePropertyDescriptor = 1;
  createPropertyDescriptor = function(bitmap, value) {
    return {
      enumerable: !(bitmap & 1),
      configurable: !(bitmap & 2),
      writable: !(bitmap & 4),
      value
    };
  };
  return createPropertyDescriptor;
}
function requireFunctionUncurryThis() {
  if (hasRequiredFunctionUncurryThis) return functionUncurryThis;
  hasRequiredFunctionUncurryThis = 1;
  var NATIVE_BIND = requireFunctionBindNative();
  var FunctionPrototype = Function.prototype;
  var call = FunctionPrototype.call;
  var uncurryThisWithBind = NATIVE_BIND && FunctionPrototype.bind.bind(call, call);
  functionUncurryThis = NATIVE_BIND ? uncurryThisWithBind : function(fn) {
    return function() {
      return call.apply(fn, arguments);
    };
  };
  return functionUncurryThis;
}
function requireClassofRaw() {
  if (hasRequiredClassofRaw) return classofRaw;
  hasRequiredClassofRaw = 1;
  var uncurryThis = requireFunctionUncurryThis();
  var toString = uncurryThis({}.toString);
  var stringSlice = uncurryThis("".slice);
  classofRaw = function(it) {
    return stringSlice(toString(it), 8, -1);
  };
  return classofRaw;
}
function requireIndexedObject() {
  if (hasRequiredIndexedObject) return indexedObject;
  hasRequiredIndexedObject = 1;
  var uncurryThis = requireFunctionUncurryThis();
  var fails2 = requireFails();
  var classof2 = requireClassofRaw();
  var $Object = Object;
  var split = uncurryThis("".split);
  indexedObject = fails2(function() {
    return !$Object("z").propertyIsEnumerable(0);
  }) ? function(it) {
    return classof2(it) === "String" ? split(it, "") : $Object(it);
  } : $Object;
  return indexedObject;
}
function requireIsNullOrUndefined() {
  if (hasRequiredIsNullOrUndefined) return isNullOrUndefined;
  hasRequiredIsNullOrUndefined = 1;
  isNullOrUndefined = function(it) {
    return it === null || it === void 0;
  };
  return isNullOrUndefined;
}
function requireRequireObjectCoercible() {
  if (hasRequiredRequireObjectCoercible) return requireObjectCoercible;
  hasRequiredRequireObjectCoercible = 1;
  var isNullOrUndefined2 = requireIsNullOrUndefined();
  var $TypeError = TypeError;
  requireObjectCoercible = function(it) {
    if (isNullOrUndefined2(it)) throw new $TypeError("Can't call method on " + it);
    return it;
  };
  return requireObjectCoercible;
}
function requireToIndexedObject() {
  if (hasRequiredToIndexedObject) return toIndexedObject;
  hasRequiredToIndexedObject = 1;
  var IndexedObject = requireIndexedObject();
  var requireObjectCoercible2 = requireRequireObjectCoercible();
  toIndexedObject = function(it) {
    return IndexedObject(requireObjectCoercible2(it));
  };
  return toIndexedObject;
}
function requireIsCallable() {
  if (hasRequiredIsCallable) return isCallable;
  hasRequiredIsCallable = 1;
  var documentAll = typeof document == "object" && document.all;
  isCallable = typeof documentAll == "undefined" && documentAll !== void 0 ? function(argument) {
    return typeof argument == "function" || argument === documentAll;
  } : function(argument) {
    return typeof argument == "function";
  };
  return isCallable;
}
function requireIsObject() {
  if (hasRequiredIsObject) return isObject$1;
  hasRequiredIsObject = 1;
  var isCallable2 = requireIsCallable();
  isObject$1 = function(it) {
    return typeof it == "object" ? it !== null : isCallable2(it);
  };
  return isObject$1;
}
function requireGetBuiltIn() {
  if (hasRequiredGetBuiltIn) return getBuiltIn;
  hasRequiredGetBuiltIn = 1;
  var globalThis2 = requireGlobalThis();
  var isCallable2 = requireIsCallable();
  var aFunction = function(argument) {
    return isCallable2(argument) ? argument : void 0;
  };
  getBuiltIn = function(namespace, method) {
    return arguments.length < 2 ? aFunction(globalThis2[namespace]) : globalThis2[namespace] && globalThis2[namespace][method];
  };
  return getBuiltIn;
}
function requireObjectIsPrototypeOf() {
  if (hasRequiredObjectIsPrototypeOf) return objectIsPrototypeOf;
  hasRequiredObjectIsPrototypeOf = 1;
  var uncurryThis = requireFunctionUncurryThis();
  objectIsPrototypeOf = uncurryThis({}.isPrototypeOf);
  return objectIsPrototypeOf;
}
function requireEnvironmentUserAgent() {
  if (hasRequiredEnvironmentUserAgent) return environmentUserAgent;
  hasRequiredEnvironmentUserAgent = 1;
  var globalThis2 = requireGlobalThis();
  var navigator2 = globalThis2.navigator;
  var userAgent = navigator2 && navigator2.userAgent;
  environmentUserAgent = userAgent ? String(userAgent) : "";
  return environmentUserAgent;
}
function requireEnvironmentV8Version() {
  if (hasRequiredEnvironmentV8Version) return environmentV8Version;
  hasRequiredEnvironmentV8Version = 1;
  var globalThis2 = requireGlobalThis();
  var userAgent = requireEnvironmentUserAgent();
  var process8 = globalThis2.process;
  var Deno = globalThis2.Deno;
  var versions = process8 && process8.versions || Deno && Deno.version;
  var v8 = versions && versions.v8;
  var match, version3;
  if (v8) {
    match = v8.split(".");
    version3 = match[0] > 0 && match[0] < 4 ? 1 : +(match[0] + match[1]);
  }
  if (!version3 && userAgent) {
    match = userAgent.match(/Edge\/(\d+)/);
    if (!match || match[1] >= 74) {
      match = userAgent.match(/Chrome\/(\d+)/);
      if (match) version3 = +match[1];
    }
  }
  environmentV8Version = version3;
  return environmentV8Version;
}
function requireSymbolConstructorDetection() {
  if (hasRequiredSymbolConstructorDetection) return symbolConstructorDetection;
  hasRequiredSymbolConstructorDetection = 1;
  var V8_VERSION = requireEnvironmentV8Version();
  var fails2 = requireFails();
  var globalThis2 = requireGlobalThis();
  var $String = globalThis2.String;
  symbolConstructorDetection = !!Object.getOwnPropertySymbols && !fails2(function() {
    var symbol = Symbol("symbol detection");
    return !$String(symbol) || !(Object(symbol) instanceof Symbol) || !Symbol.sham && V8_VERSION && V8_VERSION < 41;
  });
  return symbolConstructorDetection;
}
function requireUseSymbolAsUid() {
  if (hasRequiredUseSymbolAsUid) return useSymbolAsUid;
  hasRequiredUseSymbolAsUid = 1;
  var NATIVE_SYMBOL = requireSymbolConstructorDetection();
  useSymbolAsUid = NATIVE_SYMBOL && !Symbol.sham && typeof Symbol.iterator == "symbol";
  return useSymbolAsUid;
}
function requireIsSymbol() {
  if (hasRequiredIsSymbol) return isSymbol;
  hasRequiredIsSymbol = 1;
  var getBuiltIn2 = requireGetBuiltIn();
  var isCallable2 = requireIsCallable();
  var isPrototypeOf = requireObjectIsPrototypeOf();
  var USE_SYMBOL_AS_UID = requireUseSymbolAsUid();
  var $Object = Object;
  isSymbol = USE_SYMBOL_AS_UID ? function(it) {
    return typeof it == "symbol";
  } : function(it) {
    var $Symbol = getBuiltIn2("Symbol");
    return isCallable2($Symbol) && isPrototypeOf($Symbol.prototype, $Object(it));
  };
  return isSymbol;
}
function requireTryToString() {
  if (hasRequiredTryToString) return tryToString;
  hasRequiredTryToString = 1;
  var $String = String;
  tryToString = function(argument) {
    try {
      return $String(argument);
    } catch (error) {
      return "Object";
    }
  };
  return tryToString;
}
function requireACallable() {
  if (hasRequiredACallable) return aCallable;
  hasRequiredACallable = 1;
  var isCallable2 = requireIsCallable();
  var tryToString2 = requireTryToString();
  var $TypeError = TypeError;
  aCallable = function(argument) {
    if (isCallable2(argument)) return argument;
    throw new $TypeError(tryToString2(argument) + " is not a function");
  };
  return aCallable;
}
function requireGetMethod() {
  if (hasRequiredGetMethod) return getMethod;
  hasRequiredGetMethod = 1;
  var aCallable2 = requireACallable();
  var isNullOrUndefined2 = requireIsNullOrUndefined();
  getMethod = function(V, P) {
    var func = V[P];
    return isNullOrUndefined2(func) ? void 0 : aCallable2(func);
  };
  return getMethod;
}
function requireOrdinaryToPrimitive() {
  if (hasRequiredOrdinaryToPrimitive) return ordinaryToPrimitive;
  hasRequiredOrdinaryToPrimitive = 1;
  var call = requireFunctionCall();
  var isCallable2 = requireIsCallable();
  var isObject3 = requireIsObject();
  var $TypeError = TypeError;
  ordinaryToPrimitive = function(input, pref) {
    var fn, val;
    if (pref === "string" && isCallable2(fn = input.toString) && !isObject3(val = call(fn, input))) return val;
    if (isCallable2(fn = input.valueOf) && !isObject3(val = call(fn, input))) return val;
    if (pref !== "string" && isCallable2(fn = input.toString) && !isObject3(val = call(fn, input))) return val;
    throw new $TypeError("Can't convert object to primitive value");
  };
  return ordinaryToPrimitive;
}
function requireIsPure() {
  if (hasRequiredIsPure) return isPure;
  hasRequiredIsPure = 1;
  isPure = false;
  return isPure;
}
function requireDefineGlobalProperty() {
  if (hasRequiredDefineGlobalProperty) return defineGlobalProperty;
  hasRequiredDefineGlobalProperty = 1;
  var globalThis2 = requireGlobalThis();
  var defineProperty = Object.defineProperty;
  defineGlobalProperty = function(key, value) {
    try {
      defineProperty(globalThis2, key, { value, configurable: true, writable: true });
    } catch (error) {
      globalThis2[key] = value;
    }
    return value;
  };
  return defineGlobalProperty;
}
function requireSharedStore() {
  if (hasRequiredSharedStore) return sharedStore.exports;
  hasRequiredSharedStore = 1;
  var IS_PURE = requireIsPure();
  var globalThis2 = requireGlobalThis();
  var defineGlobalProperty2 = requireDefineGlobalProperty();
  var SHARED = "__core-js_shared__";
  var store = sharedStore.exports = globalThis2[SHARED] || defineGlobalProperty2(SHARED, {});
  (store.versions || (store.versions = [])).push({
    version: "3.48.0",
    mode: IS_PURE ? "pure" : "global",
    copyright: "\xA9 2013\u20132025 Denis Pushkarev (zloirock.ru), 2025\u20132026 CoreJS Company (core-js.io). All rights reserved.",
    license: "https://github.com/zloirock/core-js/blob/v3.48.0/LICENSE",
    source: "https://github.com/zloirock/core-js"
  });
  return sharedStore.exports;
}
function requireShared$1() {
  if (hasRequiredShared$1) return shared$1;
  hasRequiredShared$1 = 1;
  var store = requireSharedStore();
  shared$1 = function(key, value) {
    return store[key] || (store[key] = value || {});
  };
  return shared$1;
}
function requireToObject() {
  if (hasRequiredToObject) return toObject;
  hasRequiredToObject = 1;
  var requireObjectCoercible2 = requireRequireObjectCoercible();
  var $Object = Object;
  toObject = function(argument) {
    return $Object(requireObjectCoercible2(argument));
  };
  return toObject;
}
function requireHasOwnProperty() {
  if (hasRequiredHasOwnProperty) return hasOwnProperty_1;
  hasRequiredHasOwnProperty = 1;
  var uncurryThis = requireFunctionUncurryThis();
  var toObject2 = requireToObject();
  var hasOwnProperty10 = uncurryThis({}.hasOwnProperty);
  hasOwnProperty_1 = Object.hasOwn || function hasOwn(it, key) {
    return hasOwnProperty10(toObject2(it), key);
  };
  return hasOwnProperty_1;
}
function requireUid() {
  if (hasRequiredUid) return uid;
  hasRequiredUid = 1;
  var uncurryThis = requireFunctionUncurryThis();
  var id2 = 0;
  var postfix = Math.random();
  var toString = uncurryThis(1.1.toString);
  uid = function(key) {
    return "Symbol(" + (key === void 0 ? "" : key) + ")_" + toString(++id2 + postfix, 36);
  };
  return uid;
}
function requireWellKnownSymbol() {
  if (hasRequiredWellKnownSymbol) return wellKnownSymbol;
  hasRequiredWellKnownSymbol = 1;
  var globalThis2 = requireGlobalThis();
  var shared2 = requireShared$1();
  var hasOwn = requireHasOwnProperty();
  var uid2 = requireUid();
  var NATIVE_SYMBOL = requireSymbolConstructorDetection();
  var USE_SYMBOL_AS_UID = requireUseSymbolAsUid();
  var Symbol3 = globalThis2.Symbol;
  var WellKnownSymbolsStore = shared2("wks");
  var createWellKnownSymbol = USE_SYMBOL_AS_UID ? Symbol3["for"] || Symbol3 : Symbol3 && Symbol3.withoutSetter || uid2;
  wellKnownSymbol = function(name) {
    if (!hasOwn(WellKnownSymbolsStore, name)) {
      WellKnownSymbolsStore[name] = NATIVE_SYMBOL && hasOwn(Symbol3, name) ? Symbol3[name] : createWellKnownSymbol("Symbol." + name);
    }
    return WellKnownSymbolsStore[name];
  };
  return wellKnownSymbol;
}
function requireToPrimitive() {
  if (hasRequiredToPrimitive) return toPrimitive;
  hasRequiredToPrimitive = 1;
  var call = requireFunctionCall();
  var isObject3 = requireIsObject();
  var isSymbol2 = requireIsSymbol();
  var getMethod2 = requireGetMethod();
  var ordinaryToPrimitive2 = requireOrdinaryToPrimitive();
  var wellKnownSymbol2 = requireWellKnownSymbol();
  var $TypeError = TypeError;
  var TO_PRIMITIVE = wellKnownSymbol2("toPrimitive");
  toPrimitive = function(input, pref) {
    if (!isObject3(input) || isSymbol2(input)) return input;
    var exoticToPrim = getMethod2(input, TO_PRIMITIVE);
    var result;
    if (exoticToPrim) {
      if (pref === void 0) pref = "default";
      result = call(exoticToPrim, input, pref);
      if (!isObject3(result) || isSymbol2(result)) return result;
      throw new $TypeError("Can't convert object to primitive value");
    }
    if (pref === void 0) pref = "number";
    return ordinaryToPrimitive2(input, pref);
  };
  return toPrimitive;
}
function requireToPropertyKey() {
  if (hasRequiredToPropertyKey) return toPropertyKey;
  hasRequiredToPropertyKey = 1;
  var toPrimitive2 = requireToPrimitive();
  var isSymbol2 = requireIsSymbol();
  toPropertyKey = function(argument) {
    var key = toPrimitive2(argument, "string");
    return isSymbol2(key) ? key : key + "";
  };
  return toPropertyKey;
}
function requireDocumentCreateElement() {
  if (hasRequiredDocumentCreateElement) return documentCreateElement;
  hasRequiredDocumentCreateElement = 1;
  var globalThis2 = requireGlobalThis();
  var isObject3 = requireIsObject();
  var document2 = globalThis2.document;
  var EXISTS = isObject3(document2) && isObject3(document2.createElement);
  documentCreateElement = function(it) {
    return EXISTS ? document2.createElement(it) : {};
  };
  return documentCreateElement;
}
function requireIe8DomDefine() {
  if (hasRequiredIe8DomDefine) return ie8DomDefine;
  hasRequiredIe8DomDefine = 1;
  var DESCRIPTORS = requireDescriptors();
  var fails2 = requireFails();
  var createElement = requireDocumentCreateElement();
  ie8DomDefine = !DESCRIPTORS && !fails2(function() {
    return Object.defineProperty(createElement("div"), "a", {
      get: function() {
        return 7;
      }
    }).a !== 7;
  });
  return ie8DomDefine;
}
function requireObjectGetOwnPropertyDescriptor() {
  if (hasRequiredObjectGetOwnPropertyDescriptor) return objectGetOwnPropertyDescriptor;
  hasRequiredObjectGetOwnPropertyDescriptor = 1;
  var DESCRIPTORS = requireDescriptors();
  var call = requireFunctionCall();
  var propertyIsEnumerableModule = requireObjectPropertyIsEnumerable();
  var createPropertyDescriptor2 = requireCreatePropertyDescriptor();
  var toIndexedObject2 = requireToIndexedObject();
  var toPropertyKey2 = requireToPropertyKey();
  var hasOwn = requireHasOwnProperty();
  var IE8_DOM_DEFINE = requireIe8DomDefine();
  var $getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
  objectGetOwnPropertyDescriptor.f = DESCRIPTORS ? $getOwnPropertyDescriptor : function getOwnPropertyDescriptor(O, P) {
    O = toIndexedObject2(O);
    P = toPropertyKey2(P);
    if (IE8_DOM_DEFINE) try {
      return $getOwnPropertyDescriptor(O, P);
    } catch (error) {
    }
    if (hasOwn(O, P)) return createPropertyDescriptor2(!call(propertyIsEnumerableModule.f, O, P), O[P]);
  };
  return objectGetOwnPropertyDescriptor;
}
function requireV8PrototypeDefineBug() {
  if (hasRequiredV8PrototypeDefineBug) return v8PrototypeDefineBug;
  hasRequiredV8PrototypeDefineBug = 1;
  var DESCRIPTORS = requireDescriptors();
  var fails2 = requireFails();
  v8PrototypeDefineBug = DESCRIPTORS && fails2(function() {
    return Object.defineProperty(function() {
    }, "prototype", {
      value: 42,
      writable: false
    }).prototype !== 42;
  });
  return v8PrototypeDefineBug;
}
function requireAnObject() {
  if (hasRequiredAnObject) return anObject;
  hasRequiredAnObject = 1;
  var isObject3 = requireIsObject();
  var $String = String;
  var $TypeError = TypeError;
  anObject = function(argument) {
    if (isObject3(argument)) return argument;
    throw new $TypeError($String(argument) + " is not an object");
  };
  return anObject;
}
function requireObjectDefineProperty() {
  if (hasRequiredObjectDefineProperty) return objectDefineProperty;
  hasRequiredObjectDefineProperty = 1;
  var DESCRIPTORS = requireDescriptors();
  var IE8_DOM_DEFINE = requireIe8DomDefine();
  var V8_PROTOTYPE_DEFINE_BUG = requireV8PrototypeDefineBug();
  var anObject2 = requireAnObject();
  var toPropertyKey2 = requireToPropertyKey();
  var $TypeError = TypeError;
  var $defineProperty = Object.defineProperty;
  var $getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
  var ENUMERABLE = "enumerable";
  var CONFIGURABLE = "configurable";
  var WRITABLE = "writable";
  objectDefineProperty.f = DESCRIPTORS ? V8_PROTOTYPE_DEFINE_BUG ? function defineProperty(O, P, Attributes) {
    anObject2(O);
    P = toPropertyKey2(P);
    anObject2(Attributes);
    if (typeof O === "function" && P === "prototype" && "value" in Attributes && WRITABLE in Attributes && !Attributes[WRITABLE]) {
      var current = $getOwnPropertyDescriptor(O, P);
      if (current && current[WRITABLE]) {
        O[P] = Attributes.value;
        Attributes = {
          configurable: CONFIGURABLE in Attributes ? Attributes[CONFIGURABLE] : current[CONFIGURABLE],
          enumerable: ENUMERABLE in Attributes ? Attributes[ENUMERABLE] : current[ENUMERABLE],
          writable: false
        };
      }
    }
    return $defineProperty(O, P, Attributes);
  } : $defineProperty : function defineProperty(O, P, Attributes) {
    anObject2(O);
    P = toPropertyKey2(P);
    anObject2(Attributes);
    if (IE8_DOM_DEFINE) try {
      return $defineProperty(O, P, Attributes);
    } catch (error) {
    }
    if ("get" in Attributes || "set" in Attributes) throw new $TypeError("Accessors not supported");
    if ("value" in Attributes) O[P] = Attributes.value;
    return O;
  };
  return objectDefineProperty;
}
function requireCreateNonEnumerableProperty() {
  if (hasRequiredCreateNonEnumerableProperty) return createNonEnumerableProperty;
  hasRequiredCreateNonEnumerableProperty = 1;
  var DESCRIPTORS = requireDescriptors();
  var definePropertyModule = requireObjectDefineProperty();
  var createPropertyDescriptor2 = requireCreatePropertyDescriptor();
  createNonEnumerableProperty = DESCRIPTORS ? function(object2, key, value) {
    return definePropertyModule.f(object2, key, createPropertyDescriptor2(1, value));
  } : function(object2, key, value) {
    object2[key] = value;
    return object2;
  };
  return createNonEnumerableProperty;
}
function requireFunctionName() {
  if (hasRequiredFunctionName) return functionName;
  hasRequiredFunctionName = 1;
  var DESCRIPTORS = requireDescriptors();
  var hasOwn = requireHasOwnProperty();
  var FunctionPrototype = Function.prototype;
  var getDescriptor = DESCRIPTORS && Object.getOwnPropertyDescriptor;
  var EXISTS = hasOwn(FunctionPrototype, "name");
  var PROPER = EXISTS && function something() {
  }.name === "something";
  var CONFIGURABLE = EXISTS && (!DESCRIPTORS || DESCRIPTORS && getDescriptor(FunctionPrototype, "name").configurable);
  functionName = {
    EXISTS,
    PROPER,
    CONFIGURABLE
  };
  return functionName;
}
function requireInspectSource() {
  if (hasRequiredInspectSource) return inspectSource;
  hasRequiredInspectSource = 1;
  var uncurryThis = requireFunctionUncurryThis();
  var isCallable2 = requireIsCallable();
  var store = requireSharedStore();
  var functionToString = uncurryThis(Function.toString);
  if (!isCallable2(store.inspectSource)) {
    store.inspectSource = function(it) {
      return functionToString(it);
    };
  }
  inspectSource = store.inspectSource;
  return inspectSource;
}
function requireWeakMapBasicDetection() {
  if (hasRequiredWeakMapBasicDetection) return weakMapBasicDetection;
  hasRequiredWeakMapBasicDetection = 1;
  var globalThis2 = requireGlobalThis();
  var isCallable2 = requireIsCallable();
  var WeakMap3 = globalThis2.WeakMap;
  weakMapBasicDetection = isCallable2(WeakMap3) && /native code/.test(String(WeakMap3));
  return weakMapBasicDetection;
}
function requireSharedKey() {
  if (hasRequiredSharedKey) return sharedKey;
  hasRequiredSharedKey = 1;
  var shared2 = requireShared$1();
  var uid2 = requireUid();
  var keys2 = shared2("keys");
  sharedKey = function(key) {
    return keys2[key] || (keys2[key] = uid2(key));
  };
  return sharedKey;
}
function requireHiddenKeys() {
  if (hasRequiredHiddenKeys) return hiddenKeys;
  hasRequiredHiddenKeys = 1;
  hiddenKeys = {};
  return hiddenKeys;
}
function requireInternalState() {
  if (hasRequiredInternalState) return internalState;
  hasRequiredInternalState = 1;
  var NATIVE_WEAK_MAP = requireWeakMapBasicDetection();
  var globalThis2 = requireGlobalThis();
  var isObject3 = requireIsObject();
  var createNonEnumerableProperty2 = requireCreateNonEnumerableProperty();
  var hasOwn = requireHasOwnProperty();
  var shared2 = requireSharedStore();
  var sharedKey2 = requireSharedKey();
  var hiddenKeys2 = requireHiddenKeys();
  var OBJECT_ALREADY_INITIALIZED = "Object already initialized";
  var TypeError2 = globalThis2.TypeError;
  var WeakMap3 = globalThis2.WeakMap;
  var set, get3, has;
  var enforce = function(it) {
    return has(it) ? get3(it) : set(it, {});
  };
  var getterFor = function(TYPE3) {
    return function(it) {
      var state;
      if (!isObject3(it) || (state = get3(it)).type !== TYPE3) {
        throw new TypeError2("Incompatible receiver, " + TYPE3 + " required");
      }
      return state;
    };
  };
  if (NATIVE_WEAK_MAP || shared2.state) {
    var store = shared2.state || (shared2.state = new WeakMap3());
    store.get = store.get;
    store.has = store.has;
    store.set = store.set;
    set = function(it, metadata2) {
      if (store.has(it)) throw new TypeError2(OBJECT_ALREADY_INITIALIZED);
      metadata2.facade = it;
      store.set(it, metadata2);
      return metadata2;
    };
    get3 = function(it) {
      return store.get(it) || {};
    };
    has = function(it) {
      return store.has(it);
    };
  } else {
    var STATE = sharedKey2("state");
    hiddenKeys2[STATE] = true;
    set = function(it, metadata2) {
      if (hasOwn(it, STATE)) throw new TypeError2(OBJECT_ALREADY_INITIALIZED);
      metadata2.facade = it;
      createNonEnumerableProperty2(it, STATE, metadata2);
      return metadata2;
    };
    get3 = function(it) {
      return hasOwn(it, STATE) ? it[STATE] : {};
    };
    has = function(it) {
      return hasOwn(it, STATE);
    };
  }
  internalState = {
    set,
    get: get3,
    has,
    enforce,
    getterFor
  };
  return internalState;
}
function requireMakeBuiltIn() {
  if (hasRequiredMakeBuiltIn) return makeBuiltIn.exports;
  hasRequiredMakeBuiltIn = 1;
  var uncurryThis = requireFunctionUncurryThis();
  var fails2 = requireFails();
  var isCallable2 = requireIsCallable();
  var hasOwn = requireHasOwnProperty();
  var DESCRIPTORS = requireDescriptors();
  var CONFIGURABLE_FUNCTION_NAME = requireFunctionName().CONFIGURABLE;
  var inspectSource2 = requireInspectSource();
  var InternalStateModule = requireInternalState();
  var enforceInternalState = InternalStateModule.enforce;
  var getInternalState = InternalStateModule.get;
  var $String = String;
  var defineProperty = Object.defineProperty;
  var stringSlice = uncurryThis("".slice);
  var replace = uncurryThis("".replace);
  var join3 = uncurryThis([].join);
  var CONFIGURABLE_LENGTH = DESCRIPTORS && !fails2(function() {
    return defineProperty(function() {
    }, "length", { value: 8 }).length !== 8;
  });
  var TEMPLATE = String(String).split("String");
  var makeBuiltIn$1 = makeBuiltIn.exports = function(value, name, options2) {
    if (stringSlice($String(name), 0, 7) === "Symbol(") {
      name = "[" + replace($String(name), /^Symbol\(([^)]*)\).*$/, "$1") + "]";
    }
    if (options2 && options2.getter) name = "get " + name;
    if (options2 && options2.setter) name = "set " + name;
    if (!hasOwn(value, "name") || CONFIGURABLE_FUNCTION_NAME && value.name !== name) {
      if (DESCRIPTORS) defineProperty(value, "name", { value: name, configurable: true });
      else value.name = name;
    }
    if (CONFIGURABLE_LENGTH && options2 && hasOwn(options2, "arity") && value.length !== options2.arity) {
      defineProperty(value, "length", { value: options2.arity });
    }
    try {
      if (options2 && hasOwn(options2, "constructor") && options2.constructor) {
        if (DESCRIPTORS) defineProperty(value, "prototype", { writable: false });
      } else if (value.prototype) value.prototype = void 0;
    } catch (error) {
    }
    var state = enforceInternalState(value);
    if (!hasOwn(state, "source")) {
      state.source = join3(TEMPLATE, typeof name == "string" ? name : "");
    }
    return value;
  };
  Function.prototype.toString = makeBuiltIn$1(function toString() {
    return isCallable2(this) && getInternalState(this).source || inspectSource2(this);
  }, "toString");
  return makeBuiltIn.exports;
}
function requireDefineBuiltIn() {
  if (hasRequiredDefineBuiltIn) return defineBuiltIn;
  hasRequiredDefineBuiltIn = 1;
  var isCallable2 = requireIsCallable();
  var definePropertyModule = requireObjectDefineProperty();
  var makeBuiltIn2 = requireMakeBuiltIn();
  var defineGlobalProperty2 = requireDefineGlobalProperty();
  defineBuiltIn = function(O, key, value, options2) {
    if (!options2) options2 = {};
    var simple = options2.enumerable;
    var name = options2.name !== void 0 ? options2.name : key;
    if (isCallable2(value)) makeBuiltIn2(value, name, options2);
    if (options2.global) {
      if (simple) O[key] = value;
      else defineGlobalProperty2(key, value);
    } else {
      try {
        if (!options2.unsafe) delete O[key];
        else if (O[key]) simple = true;
      } catch (error) {
      }
      if (simple) O[key] = value;
      else definePropertyModule.f(O, key, {
        value,
        enumerable: false,
        configurable: !options2.nonConfigurable,
        writable: !options2.nonWritable
      });
    }
    return O;
  };
  return defineBuiltIn;
}
function requireMathTrunc() {
  if (hasRequiredMathTrunc) return mathTrunc;
  hasRequiredMathTrunc = 1;
  var ceil = Math.ceil;
  var floor3 = Math.floor;
  mathTrunc = Math.trunc || function trunc(x) {
    var n = +x;
    return (n > 0 ? floor3 : ceil)(n);
  };
  return mathTrunc;
}
function requireToIntegerOrInfinity() {
  if (hasRequiredToIntegerOrInfinity) return toIntegerOrInfinity;
  hasRequiredToIntegerOrInfinity = 1;
  var trunc = requireMathTrunc();
  toIntegerOrInfinity = function(argument) {
    var number2 = +argument;
    return number2 !== number2 || number2 === 0 ? 0 : trunc(number2);
  };
  return toIntegerOrInfinity;
}
function requireToAbsoluteIndex() {
  if (hasRequiredToAbsoluteIndex) return toAbsoluteIndex;
  hasRequiredToAbsoluteIndex = 1;
  var toIntegerOrInfinity2 = requireToIntegerOrInfinity();
  var max = Math.max;
  var min = Math.min;
  toAbsoluteIndex = function(index2, length) {
    var integer2 = toIntegerOrInfinity2(index2);
    return integer2 < 0 ? max(integer2 + length, 0) : min(integer2, length);
  };
  return toAbsoluteIndex;
}
function requireToLength() {
  if (hasRequiredToLength) return toLength;
  hasRequiredToLength = 1;
  var toIntegerOrInfinity2 = requireToIntegerOrInfinity();
  var min = Math.min;
  toLength = function(argument) {
    var len = toIntegerOrInfinity2(argument);
    return len > 0 ? min(len, 9007199254740991) : 0;
  };
  return toLength;
}
function requireLengthOfArrayLike() {
  if (hasRequiredLengthOfArrayLike) return lengthOfArrayLike;
  hasRequiredLengthOfArrayLike = 1;
  var toLength2 = requireToLength();
  lengthOfArrayLike = function(obj) {
    return toLength2(obj.length);
  };
  return lengthOfArrayLike;
}
function requireArrayIncludes() {
  if (hasRequiredArrayIncludes) return arrayIncludes;
  hasRequiredArrayIncludes = 1;
  var toIndexedObject2 = requireToIndexedObject();
  var toAbsoluteIndex2 = requireToAbsoluteIndex();
  var lengthOfArrayLike2 = requireLengthOfArrayLike();
  var createMethod = function(IS_INCLUDES) {
    return function($this, el, fromIndex) {
      var O = toIndexedObject2($this);
      var length = lengthOfArrayLike2(O);
      if (length === 0) return !IS_INCLUDES && -1;
      var index2 = toAbsoluteIndex2(fromIndex, length);
      var value;
      if (IS_INCLUDES && el !== el) while (length > index2) {
        value = O[index2++];
        if (value !== value) return true;
      }
      else for (; length > index2; index2++) {
        if ((IS_INCLUDES || index2 in O) && O[index2] === el) return IS_INCLUDES || index2 || 0;
      }
      return !IS_INCLUDES && -1;
    };
  };
  arrayIncludes = {
    includes: createMethod(true),
    indexOf: createMethod(false)
  };
  return arrayIncludes;
}
function requireObjectKeysInternal() {
  if (hasRequiredObjectKeysInternal) return objectKeysInternal;
  hasRequiredObjectKeysInternal = 1;
  var uncurryThis = requireFunctionUncurryThis();
  var hasOwn = requireHasOwnProperty();
  var toIndexedObject2 = requireToIndexedObject();
  var indexOf = requireArrayIncludes().indexOf;
  var hiddenKeys2 = requireHiddenKeys();
  var push = uncurryThis([].push);
  objectKeysInternal = function(object2, names3) {
    var O = toIndexedObject2(object2);
    var i = 0;
    var result = [];
    var key;
    for (key in O) !hasOwn(hiddenKeys2, key) && hasOwn(O, key) && push(result, key);
    while (names3.length > i) if (hasOwn(O, key = names3[i++])) {
      ~indexOf(result, key) || push(result, key);
    }
    return result;
  };
  return objectKeysInternal;
}
function requireEnumBugKeys() {
  if (hasRequiredEnumBugKeys) return enumBugKeys;
  hasRequiredEnumBugKeys = 1;
  enumBugKeys = [
    "constructor",
    "hasOwnProperty",
    "isPrototypeOf",
    "propertyIsEnumerable",
    "toLocaleString",
    "toString",
    "valueOf"
  ];
  return enumBugKeys;
}
function requireObjectGetOwnPropertyNames() {
  if (hasRequiredObjectGetOwnPropertyNames) return objectGetOwnPropertyNames;
  hasRequiredObjectGetOwnPropertyNames = 1;
  var internalObjectKeys = requireObjectKeysInternal();
  var enumBugKeys2 = requireEnumBugKeys();
  var hiddenKeys2 = enumBugKeys2.concat("length", "prototype");
  objectGetOwnPropertyNames.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {
    return internalObjectKeys(O, hiddenKeys2);
  };
  return objectGetOwnPropertyNames;
}
function requireObjectGetOwnPropertySymbols() {
  if (hasRequiredObjectGetOwnPropertySymbols) return objectGetOwnPropertySymbols;
  hasRequiredObjectGetOwnPropertySymbols = 1;
  objectGetOwnPropertySymbols.f = Object.getOwnPropertySymbols;
  return objectGetOwnPropertySymbols;
}
function requireOwnKeys() {
  if (hasRequiredOwnKeys) return ownKeys$1;
  hasRequiredOwnKeys = 1;
  var getBuiltIn2 = requireGetBuiltIn();
  var uncurryThis = requireFunctionUncurryThis();
  var getOwnPropertyNamesModule = requireObjectGetOwnPropertyNames();
  var getOwnPropertySymbolsModule = requireObjectGetOwnPropertySymbols();
  var anObject2 = requireAnObject();
  var concat2 = uncurryThis([].concat);
  ownKeys$1 = getBuiltIn2("Reflect", "ownKeys") || function ownKeys2(it) {
    var keys2 = getOwnPropertyNamesModule.f(anObject2(it));
    var getOwnPropertySymbols = getOwnPropertySymbolsModule.f;
    return getOwnPropertySymbols ? concat2(keys2, getOwnPropertySymbols(it)) : keys2;
  };
  return ownKeys$1;
}
function requireCopyConstructorProperties() {
  if (hasRequiredCopyConstructorProperties) return copyConstructorProperties;
  hasRequiredCopyConstructorProperties = 1;
  var hasOwn = requireHasOwnProperty();
  var ownKeys2 = requireOwnKeys();
  var getOwnPropertyDescriptorModule = requireObjectGetOwnPropertyDescriptor();
  var definePropertyModule = requireObjectDefineProperty();
  copyConstructorProperties = function(target, source2, exceptions) {
    var keys2 = ownKeys2(source2);
    var defineProperty = definePropertyModule.f;
    var getOwnPropertyDescriptor = getOwnPropertyDescriptorModule.f;
    for (var i = 0; i < keys2.length; i++) {
      var key = keys2[i];
      if (!hasOwn(target, key) && !(exceptions && hasOwn(exceptions, key))) {
        defineProperty(target, key, getOwnPropertyDescriptor(source2, key));
      }
    }
  };
  return copyConstructorProperties;
}
function requireIsForced() {
  if (hasRequiredIsForced) return isForced_1;
  hasRequiredIsForced = 1;
  var fails2 = requireFails();
  var isCallable2 = requireIsCallable();
  var replacement = /#|\.prototype\./;
  var isForced = function(feature, detection) {
    var value = data32[normalize2(feature)];
    return value === POLYFILL ? true : value === NATIVE ? false : isCallable2(detection) ? fails2(detection) : !!detection;
  };
  var normalize2 = isForced.normalize = function(string2) {
    return String(string2).replace(replacement, ".").toLowerCase();
  };
  var data32 = isForced.data = {};
  var NATIVE = isForced.NATIVE = "N";
  var POLYFILL = isForced.POLYFILL = "P";
  isForced_1 = isForced;
  return isForced_1;
}
function require_export() {
  if (hasRequired_export) return _export;
  hasRequired_export = 1;
  var globalThis2 = requireGlobalThis();
  var getOwnPropertyDescriptor = requireObjectGetOwnPropertyDescriptor().f;
  var createNonEnumerableProperty2 = requireCreateNonEnumerableProperty();
  var defineBuiltIn2 = requireDefineBuiltIn();
  var defineGlobalProperty2 = requireDefineGlobalProperty();
  var copyConstructorProperties2 = requireCopyConstructorProperties();
  var isForced = requireIsForced();
  _export = function(options2, source2) {
    var TARGET = options2.target;
    var GLOBAL = options2.global;
    var STATIC = options2.stat;
    var FORCED, target, key, targetProperty, sourceProperty, descriptor;
    if (GLOBAL) {
      target = globalThis2;
    } else if (STATIC) {
      target = globalThis2[TARGET] || defineGlobalProperty2(TARGET, {});
    } else {
      target = globalThis2[TARGET] && globalThis2[TARGET].prototype;
    }
    if (target) for (key in source2) {
      sourceProperty = source2[key];
      if (options2.dontCallGetSet) {
        descriptor = getOwnPropertyDescriptor(target, key);
        targetProperty = descriptor && descriptor.value;
      } else targetProperty = target[key];
      FORCED = isForced(GLOBAL ? key : TARGET + (STATIC ? "." : "#") + key, options2.forced);
      if (!FORCED && targetProperty !== void 0) {
        if (typeof sourceProperty == typeof targetProperty) continue;
        copyConstructorProperties2(sourceProperty, targetProperty);
      }
      if (options2.sham || targetProperty && targetProperty.sham) {
        createNonEnumerableProperty2(sourceProperty, "sham", true);
      }
      defineBuiltIn2(target, key, sourceProperty, options2);
    }
  };
  return _export;
}
function requireNewPromiseCapability() {
  if (hasRequiredNewPromiseCapability) return newPromiseCapability;
  hasRequiredNewPromiseCapability = 1;
  var aCallable2 = requireACallable();
  var $TypeError = TypeError;
  var PromiseCapability = function(C) {
    var resolve2, reject;
    this.promise = new C(function($$resolve, $$reject) {
      if (resolve2 !== void 0 || reject !== void 0) throw new $TypeError("Bad Promise constructor");
      resolve2 = $$resolve;
      reject = $$reject;
    });
    this.resolve = aCallable2(resolve2);
    this.reject = aCallable2(reject);
  };
  newPromiseCapability.f = function(C) {
    return new PromiseCapability(C);
  };
  return newPromiseCapability;
}
function requireEs_promise_withResolvers() {
  if (hasRequiredEs_promise_withResolvers) return es_promise_withResolvers;
  hasRequiredEs_promise_withResolvers = 1;
  var $ = require_export();
  var newPromiseCapabilityModule = requireNewPromiseCapability();
  $({ target: "Promise", stat: true }, {
    withResolvers: function withResolvers() {
      var promiseCapability = newPromiseCapabilityModule.f(this);
      return {
        promise: promiseCapability.promise,
        resolve: promiseCapability.resolve,
        reject: promiseCapability.reject
      };
    }
  });
  return es_promise_withResolvers;
}
function requireSetHelpers() {
  if (hasRequiredSetHelpers) return setHelpers;
  hasRequiredSetHelpers = 1;
  var uncurryThis = requireFunctionUncurryThis();
  var SetPrototype = Set.prototype;
  setHelpers = {
    Set,
    add: uncurryThis(SetPrototype.add),
    has: uncurryThis(SetPrototype.has),
    remove: uncurryThis(SetPrototype["delete"]),
    proto: SetPrototype
  };
  return setHelpers;
}
function requireASet() {
  if (hasRequiredASet) return aSet;
  hasRequiredASet = 1;
  var has = requireSetHelpers().has;
  aSet = function(it) {
    has(it);
    return it;
  };
  return aSet;
}
function requireIterateSimple() {
  if (hasRequiredIterateSimple) return iterateSimple;
  hasRequiredIterateSimple = 1;
  var call = requireFunctionCall();
  iterateSimple = function(record2, fn, ITERATOR_INSTEAD_OF_RECORD) {
    var iterator2 = ITERATOR_INSTEAD_OF_RECORD ? record2 : record2.iterator;
    var next = record2.next;
    var step, result;
    while (!(step = call(next, iterator2)).done) {
      result = fn(step.value);
      if (result !== void 0) return result;
    }
  };
  return iterateSimple;
}
function requireSetIterate() {
  if (hasRequiredSetIterate) return setIterate;
  hasRequiredSetIterate = 1;
  var uncurryThis = requireFunctionUncurryThis();
  var iterateSimple2 = requireIterateSimple();
  var SetHelpers = requireSetHelpers();
  var Set3 = SetHelpers.Set;
  var SetPrototype = SetHelpers.proto;
  var forEach2 = uncurryThis(SetPrototype.forEach);
  var keys2 = uncurryThis(SetPrototype.keys);
  var next = keys2(new Set3()).next;
  setIterate = function(set, fn, interruptible) {
    return interruptible ? iterateSimple2({ iterator: keys2(set), next }, fn) : forEach2(set, fn);
  };
  return setIterate;
}
function requireSetClone() {
  if (hasRequiredSetClone) return setClone;
  hasRequiredSetClone = 1;
  var SetHelpers = requireSetHelpers();
  var iterate2 = requireSetIterate();
  var Set3 = SetHelpers.Set;
  var add = SetHelpers.add;
  setClone = function(set) {
    var result = new Set3();
    iterate2(set, function(it) {
      add(result, it);
    });
    return result;
  };
  return setClone;
}
function requireGetIteratorDirect() {
  if (hasRequiredGetIteratorDirect) return getIteratorDirect;
  hasRequiredGetIteratorDirect = 1;
  getIteratorDirect = function(obj) {
    return {
      iterator: obj,
      next: obj.next,
      done: false
    };
  };
  return getIteratorDirect;
}
function requireGetSetRecord() {
  if (hasRequiredGetSetRecord) return getSetRecord;
  hasRequiredGetSetRecord = 1;
  var aCallable2 = requireACallable();
  var anObject2 = requireAnObject();
  var call = requireFunctionCall();
  var toIntegerOrInfinity2 = requireToIntegerOrInfinity();
  var getIteratorDirect2 = requireGetIteratorDirect();
  var INVALID_SIZE = "Invalid size";
  var $RangeError = RangeError;
  var $TypeError = TypeError;
  var max = Math.max;
  var SetRecord = function(set, intSize) {
    this.set = set;
    this.size = max(intSize, 0);
    this.has = aCallable2(set.has);
    this.keys = aCallable2(set.keys);
  };
  SetRecord.prototype = {
    getIterator: function() {
      return getIteratorDirect2(anObject2(call(this.keys, this.set)));
    },
    includes: function(it) {
      return call(this.has, this.set, it);
    }
  };
  getSetRecord = function(obj) {
    anObject2(obj);
    var numSize = +obj.size;
    if (numSize !== numSize) throw new $TypeError(INVALID_SIZE);
    var intSize = toIntegerOrInfinity2(numSize);
    if (intSize < 0) throw new $RangeError(INVALID_SIZE);
    return new SetRecord(obj, intSize);
  };
  return getSetRecord;
}
function requireSetUnion() {
  if (hasRequiredSetUnion) return setUnion;
  hasRequiredSetUnion = 1;
  var aSet2 = requireASet();
  var add = requireSetHelpers().add;
  var clone2 = requireSetClone();
  var getSetRecord2 = requireGetSetRecord();
  var iterateSimple2 = requireIterateSimple();
  setUnion = function union2(other) {
    var O = aSet2(this);
    var keysIter = getSetRecord2(other).getIterator();
    var result = clone2(O);
    iterateSimple2(keysIter, function(it) {
      add(result, it);
    });
    return result;
  };
  return setUnion;
}
function requireSetMethodGetKeysBeforeCloningDetection() {
  if (hasRequiredSetMethodGetKeysBeforeCloningDetection) return setMethodGetKeysBeforeCloningDetection;
  hasRequiredSetMethodGetKeysBeforeCloningDetection = 1;
  setMethodGetKeysBeforeCloningDetection = function(METHOD_NAME) {
    try {
      var baseSet = /* @__PURE__ */ new Set();
      var setLike = {
        size: 0,
        has: function() {
          return true;
        },
        keys: function() {
          return Object.defineProperty({}, "next", {
            get: function() {
              baseSet.clear();
              baseSet.add(4);
              return function() {
                return { done: true };
              };
            }
          });
        }
      };
      var result = baseSet[METHOD_NAME](setLike);
      return result.size === 1 && result.values().next().value === 4;
    } catch (error) {
      return false;
    }
  };
  return setMethodGetKeysBeforeCloningDetection;
}
function requireSetMethodAcceptSetLike() {
  if (hasRequiredSetMethodAcceptSetLike) return setMethodAcceptSetLike;
  hasRequiredSetMethodAcceptSetLike = 1;
  var getBuiltIn2 = requireGetBuiltIn();
  var createSetLike = function(size) {
    return {
      size,
      has: function() {
        return false;
      },
      keys: function() {
        return {
          next: function() {
            return { done: true };
          }
        };
      }
    };
  };
  var createSetLikeWithInfinitySize = function(size) {
    return {
      size,
      has: function() {
        return true;
      },
      keys: function() {
        throw new Error("e");
      }
    };
  };
  setMethodAcceptSetLike = function(name, callback) {
    var Set3 = getBuiltIn2("Set");
    try {
      new Set3()[name](createSetLike(0));
      try {
        new Set3()[name](createSetLike(-1));
        return false;
      } catch (error2) {
        if (!callback) return true;
        try {
          new Set3()[name](createSetLikeWithInfinitySize(-Infinity));
          return false;
        } catch (error) {
          var set = new Set3([1, 2]);
          return callback(set[name](createSetLikeWithInfinitySize(Infinity)));
        }
      }
    } catch (error) {
      return false;
    }
  };
  return setMethodAcceptSetLike;
}
function requireEs_set_union_v2() {
  if (hasRequiredEs_set_union_v2) return es_set_union_v2;
  hasRequiredEs_set_union_v2 = 1;
  var $ = require_export();
  var union2 = requireSetUnion();
  var setMethodGetKeysBeforeCloning = requireSetMethodGetKeysBeforeCloningDetection();
  var setMethodAcceptSetLike2 = requireSetMethodAcceptSetLike();
  var FORCED = !setMethodAcceptSetLike2("union") || !setMethodGetKeysBeforeCloning("union");
  $({ target: "Set", proto: true, real: true, forced: FORCED }, {
    union: union2
  });
  return es_set_union_v2;
}
function requireAnInstance() {
  if (hasRequiredAnInstance) return anInstance;
  hasRequiredAnInstance = 1;
  var isPrototypeOf = requireObjectIsPrototypeOf();
  var $TypeError = TypeError;
  anInstance = function(it, Prototype) {
    if (isPrototypeOf(Prototype, it)) return it;
    throw new $TypeError("Incorrect invocation");
  };
  return anInstance;
}
function requireCorrectPrototypeGetter() {
  if (hasRequiredCorrectPrototypeGetter) return correctPrototypeGetter;
  hasRequiredCorrectPrototypeGetter = 1;
  var fails2 = requireFails();
  correctPrototypeGetter = !fails2(function() {
    function F() {
    }
    F.prototype.constructor = null;
    return Object.getPrototypeOf(new F()) !== F.prototype;
  });
  return correctPrototypeGetter;
}
function requireObjectGetPrototypeOf() {
  if (hasRequiredObjectGetPrototypeOf) return objectGetPrototypeOf;
  hasRequiredObjectGetPrototypeOf = 1;
  var hasOwn = requireHasOwnProperty();
  var isCallable2 = requireIsCallable();
  var toObject2 = requireToObject();
  var sharedKey2 = requireSharedKey();
  var CORRECT_PROTOTYPE_GETTER = requireCorrectPrototypeGetter();
  var IE_PROTO = sharedKey2("IE_PROTO");
  var $Object = Object;
  var ObjectPrototype = $Object.prototype;
  objectGetPrototypeOf = CORRECT_PROTOTYPE_GETTER ? $Object.getPrototypeOf : function(O) {
    var object2 = toObject2(O);
    if (hasOwn(object2, IE_PROTO)) return object2[IE_PROTO];
    var constructor = object2.constructor;
    if (isCallable2(constructor) && object2 instanceof constructor) {
      return constructor.prototype;
    }
    return object2 instanceof $Object ? ObjectPrototype : null;
  };
  return objectGetPrototypeOf;
}
function requireObjectKeys() {
  if (hasRequiredObjectKeys) return objectKeys$1;
  hasRequiredObjectKeys = 1;
  var internalObjectKeys = requireObjectKeysInternal();
  var enumBugKeys2 = requireEnumBugKeys();
  objectKeys$1 = Object.keys || function keys2(O) {
    return internalObjectKeys(O, enumBugKeys2);
  };
  return objectKeys$1;
}
function requireObjectDefineProperties() {
  if (hasRequiredObjectDefineProperties) return objectDefineProperties;
  hasRequiredObjectDefineProperties = 1;
  var DESCRIPTORS = requireDescriptors();
  var V8_PROTOTYPE_DEFINE_BUG = requireV8PrototypeDefineBug();
  var definePropertyModule = requireObjectDefineProperty();
  var anObject2 = requireAnObject();
  var toIndexedObject2 = requireToIndexedObject();
  var objectKeys2 = requireObjectKeys();
  objectDefineProperties.f = DESCRIPTORS && !V8_PROTOTYPE_DEFINE_BUG ? Object.defineProperties : function defineProperties(O, Properties) {
    anObject2(O);
    var props = toIndexedObject2(Properties);
    var keys2 = objectKeys2(Properties);
    var length = keys2.length;
    var index2 = 0;
    var key;
    while (length > index2) definePropertyModule.f(O, key = keys2[index2++], props[key]);
    return O;
  };
  return objectDefineProperties;
}
function requireHtml() {
  if (hasRequiredHtml) return html$1;
  hasRequiredHtml = 1;
  var getBuiltIn2 = requireGetBuiltIn();
  html$1 = getBuiltIn2("document", "documentElement");
  return html$1;
}
function requireObjectCreate() {
  if (hasRequiredObjectCreate) return objectCreate;
  hasRequiredObjectCreate = 1;
  var anObject2 = requireAnObject();
  var definePropertiesModule = requireObjectDefineProperties();
  var enumBugKeys2 = requireEnumBugKeys();
  var hiddenKeys2 = requireHiddenKeys();
  var html2 = requireHtml();
  var documentCreateElement2 = requireDocumentCreateElement();
  var sharedKey2 = requireSharedKey();
  var GT = ">";
  var LT = "<";
  var PROTOTYPE = "prototype";
  var SCRIPT = "script";
  var IE_PROTO = sharedKey2("IE_PROTO");
  var EmptyConstructor = function() {
  };
  var scriptTag = function(content) {
    return LT + SCRIPT + GT + content + LT + "/" + SCRIPT + GT;
  };
  var NullProtoObjectViaActiveX = function(activeXDocument2) {
    activeXDocument2.write(scriptTag(""));
    activeXDocument2.close();
    var temp = activeXDocument2.parentWindow.Object;
    activeXDocument2 = null;
    return temp;
  };
  var NullProtoObjectViaIFrame = function() {
    var iframe = documentCreateElement2("iframe");
    var JS = "java" + SCRIPT + ":";
    var iframeDocument;
    iframe.style.display = "none";
    html2.appendChild(iframe);
    iframe.src = String(JS);
    iframeDocument = iframe.contentWindow.document;
    iframeDocument.open();
    iframeDocument.write(scriptTag("document.F=Object"));
    iframeDocument.close();
    return iframeDocument.F;
  };
  var activeXDocument;
  var NullProtoObject = function() {
    try {
      activeXDocument = new ActiveXObject("htmlfile");
    } catch (error) {
    }
    NullProtoObject = typeof document != "undefined" ? document.domain && activeXDocument ? NullProtoObjectViaActiveX(activeXDocument) : NullProtoObjectViaIFrame() : NullProtoObjectViaActiveX(activeXDocument);
    var length = enumBugKeys2.length;
    while (length--) delete NullProtoObject[PROTOTYPE][enumBugKeys2[length]];
    return NullProtoObject();
  };
  hiddenKeys2[IE_PROTO] = true;
  objectCreate = Object.create || function create2(O, Properties) {
    var result;
    if (O !== null) {
      EmptyConstructor[PROTOTYPE] = anObject2(O);
      result = new EmptyConstructor();
      EmptyConstructor[PROTOTYPE] = null;
      result[IE_PROTO] = O;
    } else result = NullProtoObject();
    return Properties === void 0 ? result : definePropertiesModule.f(result, Properties);
  };
  return objectCreate;
}
function requireAsyncIteratorPrototype() {
  if (hasRequiredAsyncIteratorPrototype) return asyncIteratorPrototype;
  hasRequiredAsyncIteratorPrototype = 1;
  var globalThis2 = requireGlobalThis();
  var shared2 = requireSharedStore();
  var isCallable2 = requireIsCallable();
  var create2 = requireObjectCreate();
  var getPrototypeOf = requireObjectGetPrototypeOf();
  var defineBuiltIn2 = requireDefineBuiltIn();
  var wellKnownSymbol2 = requireWellKnownSymbol();
  var IS_PURE = requireIsPure();
  var USE_FUNCTION_CONSTRUCTOR = "USE_FUNCTION_CONSTRUCTOR";
  var ASYNC_ITERATOR = wellKnownSymbol2("asyncIterator");
  var AsyncIterator2 = globalThis2.AsyncIterator;
  var PassedAsyncIteratorPrototype = shared2.AsyncIteratorPrototype;
  var AsyncIteratorPrototype, prototype;
  if (PassedAsyncIteratorPrototype) {
    AsyncIteratorPrototype = PassedAsyncIteratorPrototype;
  } else if (isCallable2(AsyncIterator2)) {
    AsyncIteratorPrototype = AsyncIterator2.prototype;
  } else if (shared2[USE_FUNCTION_CONSTRUCTOR] || globalThis2[USE_FUNCTION_CONSTRUCTOR]) {
    try {
      prototype = getPrototypeOf(getPrototypeOf(getPrototypeOf(Function("return async function*(){}()")())));
      if (getPrototypeOf(prototype) === Object.prototype) AsyncIteratorPrototype = prototype;
    } catch (error) {
    }
  }
  if (!AsyncIteratorPrototype) AsyncIteratorPrototype = {};
  else if (IS_PURE) AsyncIteratorPrototype = create2(AsyncIteratorPrototype);
  if (!isCallable2(AsyncIteratorPrototype[ASYNC_ITERATOR])) {
    defineBuiltIn2(AsyncIteratorPrototype, ASYNC_ITERATOR, function() {
      return this;
    });
  }
  asyncIteratorPrototype = AsyncIteratorPrototype;
  return asyncIteratorPrototype;
}
function requireEsnext_asyncIterator_constructor() {
  if (hasRequiredEsnext_asyncIterator_constructor) return esnext_asyncIterator_constructor;
  hasRequiredEsnext_asyncIterator_constructor = 1;
  var $ = require_export();
  var anInstance2 = requireAnInstance();
  var getPrototypeOf = requireObjectGetPrototypeOf();
  var createNonEnumerableProperty2 = requireCreateNonEnumerableProperty();
  var hasOwn = requireHasOwnProperty();
  var wellKnownSymbol2 = requireWellKnownSymbol();
  var AsyncIteratorPrototype = requireAsyncIteratorPrototype();
  var IS_PURE = requireIsPure();
  var TO_STRING_TAG = wellKnownSymbol2("toStringTag");
  var $TypeError = TypeError;
  var AsyncIteratorConstructor = function AsyncIterator2() {
    anInstance2(this, AsyncIteratorPrototype);
    if (getPrototypeOf(this) === AsyncIteratorPrototype) throw new $TypeError("Abstract class AsyncIterator not directly constructable");
  };
  AsyncIteratorConstructor.prototype = AsyncIteratorPrototype;
  if (!hasOwn(AsyncIteratorPrototype, TO_STRING_TAG)) {
    createNonEnumerableProperty2(AsyncIteratorPrototype, TO_STRING_TAG, "AsyncIterator");
  }
  if (IS_PURE || !hasOwn(AsyncIteratorPrototype, "constructor") || AsyncIteratorPrototype.constructor === Object) {
    createNonEnumerableProperty2(AsyncIteratorPrototype, "constructor", AsyncIteratorConstructor);
  }
  $({ global: true, constructor: true, forced: IS_PURE }, {
    AsyncIterator: AsyncIteratorConstructor
  });
  return esnext_asyncIterator_constructor;
}
function requireNotANan() {
  if (hasRequiredNotANan) return notANan;
  hasRequiredNotANan = 1;
  var $RangeError = RangeError;
  notANan = function(it) {
    if (it === it) return it;
    throw new $RangeError("NaN is not allowed");
  };
  return notANan;
}
function requireToPositiveInteger() {
  if (hasRequiredToPositiveInteger) return toPositiveInteger;
  hasRequiredToPositiveInteger = 1;
  var toIntegerOrInfinity2 = requireToIntegerOrInfinity();
  var $RangeError = RangeError;
  toPositiveInteger = function(it) {
    var result = toIntegerOrInfinity2(it);
    if (result < 0) throw new $RangeError("The argument can't be less than 0");
    return result;
  };
  return toPositiveInteger;
}
function requirePerform() {
  if (hasRequiredPerform) return perform;
  hasRequiredPerform = 1;
  perform = function(exec2) {
    try {
      return { error: false, value: exec2() };
    } catch (error) {
      return { error: true, value: error };
    }
  };
  return perform;
}
function requireDefineBuiltIns() {
  if (hasRequiredDefineBuiltIns) return defineBuiltIns;
  hasRequiredDefineBuiltIns = 1;
  var defineBuiltIn2 = requireDefineBuiltIn();
  defineBuiltIns = function(target, src2, options2) {
    for (var key in src2) defineBuiltIn2(target, key, src2[key], options2);
    return target;
  };
  return defineBuiltIns;
}
function requireCreateIterResultObject() {
  if (hasRequiredCreateIterResultObject) return createIterResultObject;
  hasRequiredCreateIterResultObject = 1;
  createIterResultObject = function(value, done) {
    return { value, done };
  };
  return createIterResultObject;
}
function requireIteratorClose() {
  if (hasRequiredIteratorClose) return iteratorClose;
  hasRequiredIteratorClose = 1;
  var call = requireFunctionCall();
  var anObject2 = requireAnObject();
  var getMethod2 = requireGetMethod();
  iteratorClose = function(iterator2, kind, value) {
    var innerResult, innerError;
    anObject2(iterator2);
    try {
      innerResult = getMethod2(iterator2, "return");
      if (!innerResult) {
        if (kind === "throw") throw value;
        return value;
      }
      innerResult = call(innerResult, iterator2);
    } catch (error) {
      innerError = true;
      innerResult = error;
    }
    if (kind === "throw") throw value;
    if (innerError) throw innerResult;
    anObject2(innerResult);
    return value;
  };
  return iteratorClose;
}
function requireAsyncIteratorCreateProxy() {
  if (hasRequiredAsyncIteratorCreateProxy) return asyncIteratorCreateProxy;
  hasRequiredAsyncIteratorCreateProxy = 1;
  var call = requireFunctionCall();
  var perform2 = requirePerform();
  var anObject2 = requireAnObject();
  var create2 = requireObjectCreate();
  var createNonEnumerableProperty2 = requireCreateNonEnumerableProperty();
  var defineBuiltIns2 = requireDefineBuiltIns();
  var wellKnownSymbol2 = requireWellKnownSymbol();
  var InternalStateModule = requireInternalState();
  var getBuiltIn2 = requireGetBuiltIn();
  var getMethod2 = requireGetMethod();
  var AsyncIteratorPrototype = requireAsyncIteratorPrototype();
  var createIterResultObject2 = requireCreateIterResultObject();
  var iteratorClose2 = requireIteratorClose();
  var Promise3 = getBuiltIn2("Promise");
  var TO_STRING_TAG = wellKnownSymbol2("toStringTag");
  var ASYNC_ITERATOR_HELPER = "AsyncIteratorHelper";
  var WRAP_FOR_VALID_ASYNC_ITERATOR = "WrapForValidAsyncIterator";
  var setInternalState = InternalStateModule.set;
  var createAsyncIteratorProxyPrototype = function(IS_ITERATOR) {
    var IS_GENERATOR = !IS_ITERATOR;
    var getInternalState = InternalStateModule.getterFor(IS_ITERATOR ? WRAP_FOR_VALID_ASYNC_ITERATOR : ASYNC_ITERATOR_HELPER);
    var getStateOrEarlyExit = function(that) {
      var stateCompletion = perform2(function() {
        return getInternalState(that);
      });
      var stateError = stateCompletion.error;
      var state = stateCompletion.value;
      if (stateError || IS_GENERATOR && state.done) {
        return { exit: true, value: stateError ? Promise3.reject(state) : Promise3.resolve(createIterResultObject2(void 0, true)) };
      }
      return { exit: false, value: state };
    };
    return defineBuiltIns2(create2(AsyncIteratorPrototype), {
      next: function next() {
        var stateCompletion = getStateOrEarlyExit(this);
        var state = stateCompletion.value;
        if (stateCompletion.exit) return state;
        var handlerCompletion = perform2(function() {
          return anObject2(state.nextHandler(Promise3));
        });
        var handlerError = handlerCompletion.error;
        var value = handlerCompletion.value;
        if (handlerError) state.done = true;
        return handlerError ? Promise3.reject(value) : Promise3.resolve(value);
      },
      "return": function() {
        var stateCompletion = getStateOrEarlyExit(this);
        var state = stateCompletion.value;
        if (stateCompletion.exit) return state;
        state.done = true;
        var iterator2 = state.iterator;
        var returnMethod, result;
        var completion2 = perform2(function() {
          if (state.inner) try {
            iteratorClose2(state.inner.iterator, "normal");
          } catch (error) {
            return iteratorClose2(iterator2, "throw", error);
          }
          return getMethod2(iterator2, "return");
        });
        returnMethod = result = completion2.value;
        if (completion2.error) return Promise3.reject(result);
        if (returnMethod === void 0) return Promise3.resolve(createIterResultObject2(void 0, true));
        completion2 = perform2(function() {
          return call(returnMethod, iterator2);
        });
        result = completion2.value;
        if (completion2.error) return Promise3.reject(result);
        return IS_ITERATOR ? Promise3.resolve(result) : Promise3.resolve(result).then(function(resolved) {
          anObject2(resolved);
          return createIterResultObject2(void 0, true);
        });
      }
    });
  };
  var WrapForValidAsyncIteratorPrototype = createAsyncIteratorProxyPrototype(true);
  var AsyncIteratorHelperPrototype = createAsyncIteratorProxyPrototype(false);
  createNonEnumerableProperty2(AsyncIteratorHelperPrototype, TO_STRING_TAG, "Async Iterator Helper");
  asyncIteratorCreateProxy = function(nextHandler, IS_ITERATOR) {
    var AsyncIteratorProxy = function AsyncIterator2(record2, state) {
      if (state) {
        state.iterator = record2.iterator;
        state.next = record2.next;
      } else state = record2;
      state.type = IS_ITERATOR ? WRAP_FOR_VALID_ASYNC_ITERATOR : ASYNC_ITERATOR_HELPER;
      state.nextHandler = nextHandler;
      state.counter = 0;
      state.done = false;
      setInternalState(this, state);
    };
    AsyncIteratorProxy.prototype = IS_ITERATOR ? WrapForValidAsyncIteratorPrototype : AsyncIteratorHelperPrototype;
    return AsyncIteratorProxy;
  };
  return asyncIteratorCreateProxy;
}
function requireEsnext_asyncIterator_drop() {
  if (hasRequiredEsnext_asyncIterator_drop) return esnext_asyncIterator_drop;
  hasRequiredEsnext_asyncIterator_drop = 1;
  var $ = require_export();
  var call = requireFunctionCall();
  var anObject2 = requireAnObject();
  var getIteratorDirect2 = requireGetIteratorDirect();
  var notANaN = requireNotANan();
  var toPositiveInteger2 = requireToPositiveInteger();
  var createAsyncIteratorProxy = requireAsyncIteratorCreateProxy();
  var createIterResultObject2 = requireCreateIterResultObject();
  var AsyncIteratorProxy = createAsyncIteratorProxy(function(Promise3) {
    var state = this;
    return new Promise3(function(resolve2, reject) {
      var doneAndReject = function(error) {
        state.done = true;
        reject(error);
      };
      var loop = function() {
        try {
          Promise3.resolve(anObject2(call(state.next, state.iterator))).then(function(step) {
            try {
              if (anObject2(step).done) {
                state.done = true;
                resolve2(createIterResultObject2(void 0, true));
              } else if (state.remaining) {
                state.remaining--;
                loop();
              } else resolve2(createIterResultObject2(step.value, false));
            } catch (err) {
              doneAndReject(err);
            }
          }, doneAndReject);
        } catch (error) {
          doneAndReject(error);
        }
      };
      loop();
    });
  });
  $({ target: "AsyncIterator", proto: true, real: true, forced: true }, {
    drop: function drop(limit2) {
      anObject2(this);
      var remaining = toPositiveInteger2(notANaN(+limit2));
      return new AsyncIteratorProxy(getIteratorDirect2(this), {
        remaining
      });
    }
  });
  return esnext_asyncIterator_drop;
}
function requireDoesNotExceedSafeInteger() {
  if (hasRequiredDoesNotExceedSafeInteger) return doesNotExceedSafeInteger;
  hasRequiredDoesNotExceedSafeInteger = 1;
  var $TypeError = TypeError;
  var MAX_SAFE_INTEGER3 = 9007199254740991;
  doesNotExceedSafeInteger = function(it) {
    if (it > MAX_SAFE_INTEGER3) throw $TypeError("Maximum allowed index exceeded");
    return it;
  };
  return doesNotExceedSafeInteger;
}
function requireCreateProperty() {
  if (hasRequiredCreateProperty) return createProperty;
  hasRequiredCreateProperty = 1;
  var DESCRIPTORS = requireDescriptors();
  var definePropertyModule = requireObjectDefineProperty();
  var createPropertyDescriptor2 = requireCreatePropertyDescriptor();
  createProperty = function(object2, key, value) {
    if (DESCRIPTORS) definePropertyModule.f(object2, key, createPropertyDescriptor2(0, value));
    else object2[key] = value;
  };
  return createProperty;
}
function requireIsArray() {
  if (hasRequiredIsArray) return isArray$1;
  hasRequiredIsArray = 1;
  var classof2 = requireClassofRaw();
  isArray$1 = Array.isArray || function isArray4(argument) {
    return classof2(argument) === "Array";
  };
  return isArray$1;
}
function requireArraySetLength() {
  if (hasRequiredArraySetLength) return arraySetLength;
  hasRequiredArraySetLength = 1;
  var DESCRIPTORS = requireDescriptors();
  var isArray4 = requireIsArray();
  var $TypeError = TypeError;
  var getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
  var SILENT_ON_NON_WRITABLE_LENGTH_SET = DESCRIPTORS && !function() {
    if (this !== void 0) return true;
    try {
      Object.defineProperty([], "length", { writable: false }).length = 1;
    } catch (error) {
      return error instanceof TypeError;
    }
  }();
  arraySetLength = SILENT_ON_NON_WRITABLE_LENGTH_SET ? function(O, length) {
    if (isArray4(O) && !getOwnPropertyDescriptor(O, "length").writable) {
      throw new $TypeError("Cannot set read only .length");
    }
    return O.length = length;
  } : function(O, length) {
    return O.length = length;
  };
  return arraySetLength;
}
function requireAsyncIteratorClose() {
  if (hasRequiredAsyncIteratorClose) return asyncIteratorClose;
  hasRequiredAsyncIteratorClose = 1;
  var call = requireFunctionCall();
  var getBuiltIn2 = requireGetBuiltIn();
  var getMethod2 = requireGetMethod();
  asyncIteratorClose = function(iterator2, method, argument, reject) {
    try {
      var returnMethod = getMethod2(iterator2, "return");
      if (returnMethod) {
        return getBuiltIn2("Promise").resolve(call(returnMethod, iterator2)).then(function() {
          method(argument);
        }, function(error) {
          reject(error);
        });
      }
    } catch (error2) {
      return reject(error2);
    }
    method(argument);
  };
  return asyncIteratorClose;
}
function requireAsyncIteratorIteration() {
  if (hasRequiredAsyncIteratorIteration) return asyncIteratorIteration;
  hasRequiredAsyncIteratorIteration = 1;
  var call = requireFunctionCall();
  var aCallable2 = requireACallable();
  var anObject2 = requireAnObject();
  var isObject3 = requireIsObject();
  var doesNotExceedSafeInteger2 = requireDoesNotExceedSafeInteger();
  var getBuiltIn2 = requireGetBuiltIn();
  var createProperty2 = requireCreateProperty();
  var setArrayLength = requireArraySetLength();
  var getIteratorDirect2 = requireGetIteratorDirect();
  var closeAsyncIteration = requireAsyncIteratorClose();
  var createMethod = function(TYPE3) {
    var IS_TO_ARRAY = TYPE3 === 0;
    var IS_FOR_EACH = TYPE3 === 1;
    var IS_EVERY = TYPE3 === 2;
    var IS_SOME = TYPE3 === 3;
    return function(object2, fn, target) {
      anObject2(object2);
      var MAPPING = fn !== void 0;
      if (MAPPING || !IS_TO_ARRAY) aCallable2(fn);
      var record2 = getIteratorDirect2(object2);
      var Promise3 = getBuiltIn2("Promise");
      var iterator2 = record2.iterator;
      var next = record2.next;
      var counter = 0;
      return new Promise3(function(resolve2, reject) {
        var ifAbruptCloseAsyncIterator = function(error) {
          closeAsyncIteration(iterator2, reject, error, reject);
        };
        var loop = function() {
          try {
            if (MAPPING) try {
              doesNotExceedSafeInteger2(counter);
            } catch (error5) {
              ifAbruptCloseAsyncIterator(error5);
            }
            Promise3.resolve(anObject2(call(next, iterator2))).then(function(step) {
              try {
                if (anObject2(step).done) {
                  if (IS_TO_ARRAY) {
                    setArrayLength(target, counter);
                    resolve2(target);
                  } else resolve2(IS_SOME ? false : IS_EVERY || void 0);
                } else {
                  var value = step.value;
                  try {
                    if (MAPPING) {
                      var result = fn(value, counter);
                      var handler = function($result) {
                        if (IS_FOR_EACH) {
                          loop();
                        } else if (IS_EVERY) {
                          $result ? loop() : closeAsyncIteration(iterator2, resolve2, false, reject);
                        } else if (IS_TO_ARRAY) {
                          try {
                            createProperty2(target, counter++, $result);
                            loop();
                          } catch (error4) {
                            ifAbruptCloseAsyncIterator(error4);
                          }
                        } else {
                          $result ? closeAsyncIteration(iterator2, resolve2, IS_SOME || value, reject) : loop();
                        }
                      };
                      if (isObject3(result)) Promise3.resolve(result).then(handler, ifAbruptCloseAsyncIterator);
                      else handler(result);
                    } else {
                      createProperty2(target, counter++, value);
                      loop();
                    }
                  } catch (error3) {
                    ifAbruptCloseAsyncIterator(error3);
                  }
                }
              } catch (error2) {
                reject(error2);
              }
            }, reject);
          } catch (error) {
            reject(error);
          }
        };
        loop();
      });
    };
  };
  asyncIteratorIteration = {
    toArray: createMethod(0),
    forEach: createMethod(1),
    every: createMethod(2),
    some: createMethod(3),
    find: createMethod(4)
  };
  return asyncIteratorIteration;
}
function requireEsnext_asyncIterator_every() {
  if (hasRequiredEsnext_asyncIterator_every) return esnext_asyncIterator_every;
  hasRequiredEsnext_asyncIterator_every = 1;
  var $ = require_export();
  var $every = requireAsyncIteratorIteration().every;
  $({ target: "AsyncIterator", proto: true, real: true, forced: true }, {
    every: function every(predicate) {
      return $every(this, predicate);
    }
  });
  return esnext_asyncIterator_every;
}
function requireEsnext_asyncIterator_filter() {
  if (hasRequiredEsnext_asyncIterator_filter) return esnext_asyncIterator_filter;
  hasRequiredEsnext_asyncIterator_filter = 1;
  var $ = require_export();
  var call = requireFunctionCall();
  var aCallable2 = requireACallable();
  var anObject2 = requireAnObject();
  var isObject3 = requireIsObject();
  var getIteratorDirect2 = requireGetIteratorDirect();
  var createAsyncIteratorProxy = requireAsyncIteratorCreateProxy();
  var createIterResultObject2 = requireCreateIterResultObject();
  var closeAsyncIteration = requireAsyncIteratorClose();
  var AsyncIteratorProxy = createAsyncIteratorProxy(function(Promise3) {
    var state = this;
    var iterator2 = state.iterator;
    var predicate = state.predicate;
    return new Promise3(function(resolve2, reject) {
      var doneAndReject = function(error) {
        state.done = true;
        reject(error);
      };
      var ifAbruptCloseAsyncIterator = function(error) {
        closeAsyncIteration(iterator2, doneAndReject, error, doneAndReject);
      };
      var loop = function() {
        try {
          Promise3.resolve(anObject2(call(state.next, iterator2))).then(function(step) {
            try {
              if (anObject2(step).done) {
                state.done = true;
                resolve2(createIterResultObject2(void 0, true));
              } else {
                var value = step.value;
                try {
                  var result = predicate(value, state.counter++);
                  var handler = function(selected) {
                    selected ? resolve2(createIterResultObject2(value, false)) : loop();
                  };
                  if (isObject3(result)) Promise3.resolve(result).then(handler, ifAbruptCloseAsyncIterator);
                  else handler(result);
                } catch (error3) {
                  ifAbruptCloseAsyncIterator(error3);
                }
              }
            } catch (error2) {
              doneAndReject(error2);
            }
          }, doneAndReject);
        } catch (error) {
          doneAndReject(error);
        }
      };
      loop();
    });
  });
  $({ target: "AsyncIterator", proto: true, real: true, forced: true }, {
    filter: function filter2(predicate) {
      anObject2(this);
      aCallable2(predicate);
      return new AsyncIteratorProxy(getIteratorDirect2(this), {
        predicate
      });
    }
  });
  return esnext_asyncIterator_filter;
}
function requireEsnext_asyncIterator_find() {
  if (hasRequiredEsnext_asyncIterator_find) return esnext_asyncIterator_find;
  hasRequiredEsnext_asyncIterator_find = 1;
  var $ = require_export();
  var $find = requireAsyncIteratorIteration().find;
  $({ target: "AsyncIterator", proto: true, real: true, forced: true }, {
    find: function find(predicate) {
      return $find(this, predicate);
    }
  });
  return esnext_asyncIterator_find;
}
function requireToStringTagSupport() {
  if (hasRequiredToStringTagSupport) return toStringTagSupport;
  hasRequiredToStringTagSupport = 1;
  var wellKnownSymbol2 = requireWellKnownSymbol();
  var TO_STRING_TAG = wellKnownSymbol2("toStringTag");
  var test2 = {};
  test2[TO_STRING_TAG] = "z";
  toStringTagSupport = String(test2) === "[object z]";
  return toStringTagSupport;
}
function requireClassof() {
  if (hasRequiredClassof) return classof;
  hasRequiredClassof = 1;
  var TO_STRING_TAG_SUPPORT = requireToStringTagSupport();
  var isCallable2 = requireIsCallable();
  var classofRaw2 = requireClassofRaw();
  var wellKnownSymbol2 = requireWellKnownSymbol();
  var TO_STRING_TAG = wellKnownSymbol2("toStringTag");
  var $Object = Object;
  var CORRECT_ARGUMENTS = classofRaw2(/* @__PURE__ */ function() {
    return arguments;
  }()) === "Arguments";
  var tryGet = function(it, key) {
    try {
      return it[key];
    } catch (error) {
    }
  };
  classof = TO_STRING_TAG_SUPPORT ? classofRaw2 : function(it) {
    var O, tag2, result;
    return it === void 0 ? "Undefined" : it === null ? "Null" : typeof (tag2 = tryGet(O = $Object(it), TO_STRING_TAG)) == "string" ? tag2 : CORRECT_ARGUMENTS ? classofRaw2(O) : (result = classofRaw2(O)) === "Object" && isCallable2(O.callee) ? "Arguments" : result;
  };
  return classof;
}
function requireIterators() {
  if (hasRequiredIterators) return iterators;
  hasRequiredIterators = 1;
  iterators = {};
  return iterators;
}
function requireGetIteratorMethod() {
  if (hasRequiredGetIteratorMethod) return getIteratorMethod;
  hasRequiredGetIteratorMethod = 1;
  var classof2 = requireClassof();
  var getMethod2 = requireGetMethod();
  var isNullOrUndefined2 = requireIsNullOrUndefined();
  var Iterators = requireIterators();
  var wellKnownSymbol2 = requireWellKnownSymbol();
  var ITERATOR = wellKnownSymbol2("iterator");
  getIteratorMethod = function(it) {
    if (!isNullOrUndefined2(it)) return getMethod2(it, ITERATOR) || getMethod2(it, "@@iterator") || Iterators[classof2(it)];
  };
  return getIteratorMethod;
}
function requireAsyncFromSyncIterator() {
  if (hasRequiredAsyncFromSyncIterator) return asyncFromSyncIterator;
  hasRequiredAsyncFromSyncIterator = 1;
  var call = requireFunctionCall();
  var anObject2 = requireAnObject();
  var create2 = requireObjectCreate();
  var getMethod2 = requireGetMethod();
  var defineBuiltIns2 = requireDefineBuiltIns();
  var InternalStateModule = requireInternalState();
  var iteratorClose2 = requireIteratorClose();
  var getBuiltIn2 = requireGetBuiltIn();
  var AsyncIteratorPrototype = requireAsyncIteratorPrototype();
  var createIterResultObject2 = requireCreateIterResultObject();
  var Promise3 = getBuiltIn2("Promise");
  var ASYNC_FROM_SYNC_ITERATOR = "AsyncFromSyncIterator";
  var setInternalState = InternalStateModule.set;
  var getInternalState = InternalStateModule.getterFor(ASYNC_FROM_SYNC_ITERATOR);
  var asyncFromSyncIteratorContinuation = function(result, resolve2, reject, syncIterator, closeOnRejection) {
    var done = result.done;
    Promise3.resolve(result.value).then(function(value) {
      resolve2(createIterResultObject2(value, done));
    }, function(error) {
      if (!done && closeOnRejection) {
        try {
          iteratorClose2(syncIterator, "throw", error);
        } catch (error2) {
          error = error2;
        }
      }
      reject(error);
    });
  };
  var AsyncFromSyncIterator = function AsyncIterator2(iteratorRecord) {
    iteratorRecord.type = ASYNC_FROM_SYNC_ITERATOR;
    setInternalState(this, iteratorRecord);
  };
  AsyncFromSyncIterator.prototype = defineBuiltIns2(create2(AsyncIteratorPrototype), {
    next: function next() {
      var state = getInternalState(this);
      return new Promise3(function(resolve2, reject) {
        var result = anObject2(call(state.next, state.iterator));
        asyncFromSyncIteratorContinuation(result, resolve2, reject, state.iterator, true);
      });
    },
    "return": function() {
      var iterator2 = getInternalState(this).iterator;
      return new Promise3(function(resolve2, reject) {
        var $return = getMethod2(iterator2, "return");
        if ($return === void 0) return resolve2(createIterResultObject2(void 0, true));
        var result = anObject2(call($return, iterator2));
        asyncFromSyncIteratorContinuation(result, resolve2, reject, iterator2);
      });
    }
  });
  asyncFromSyncIterator = AsyncFromSyncIterator;
  return asyncFromSyncIterator;
}
function requireGetAsyncIteratorFlattenable() {
  if (hasRequiredGetAsyncIteratorFlattenable) return getAsyncIteratorFlattenable;
  hasRequiredGetAsyncIteratorFlattenable = 1;
  var call = requireFunctionCall();
  var isCallable2 = requireIsCallable();
  var anObject2 = requireAnObject();
  var getIteratorDirect2 = requireGetIteratorDirect();
  var getIteratorMethod2 = requireGetIteratorMethod();
  var getMethod2 = requireGetMethod();
  var wellKnownSymbol2 = requireWellKnownSymbol();
  var AsyncFromSyncIterator = requireAsyncFromSyncIterator();
  var ASYNC_ITERATOR = wellKnownSymbol2("asyncIterator");
  getAsyncIteratorFlattenable = function(obj) {
    var object2 = anObject2(obj);
    var alreadyAsync = true;
    var method = getMethod2(object2, ASYNC_ITERATOR);
    var iterator2;
    if (!isCallable2(method)) {
      method = getIteratorMethod2(object2);
      alreadyAsync = false;
    }
    if (method !== void 0) {
      iterator2 = call(method, object2);
    } else {
      iterator2 = object2;
      alreadyAsync = true;
    }
    anObject2(iterator2);
    return getIteratorDirect2(alreadyAsync ? iterator2 : new AsyncFromSyncIterator(getIteratorDirect2(iterator2)));
  };
  return getAsyncIteratorFlattenable;
}
function requireEsnext_asyncIterator_flatMap() {
  if (hasRequiredEsnext_asyncIterator_flatMap) return esnext_asyncIterator_flatMap;
  hasRequiredEsnext_asyncIterator_flatMap = 1;
  var $ = require_export();
  var call = requireFunctionCall();
  var aCallable2 = requireACallable();
  var anObject2 = requireAnObject();
  var isObject3 = requireIsObject();
  var getIteratorDirect2 = requireGetIteratorDirect();
  var createAsyncIteratorProxy = requireAsyncIteratorCreateProxy();
  var createIterResultObject2 = requireCreateIterResultObject();
  var getAsyncIteratorFlattenable2 = requireGetAsyncIteratorFlattenable();
  var closeAsyncIteration = requireAsyncIteratorClose();
  var AsyncIteratorProxy = createAsyncIteratorProxy(function(Promise3) {
    var state = this;
    var iterator2 = state.iterator;
    var mapper = state.mapper;
    return new Promise3(function(resolve2, reject) {
      var doneAndReject = function(error) {
        state.done = true;
        reject(error);
      };
      var ifAbruptCloseAsyncIterator = function(error) {
        closeAsyncIteration(iterator2, doneAndReject, error, doneAndReject);
      };
      var outerLoop = function() {
        try {
          Promise3.resolve(anObject2(call(state.next, iterator2))).then(function(step) {
            try {
              if (anObject2(step).done) {
                state.done = true;
                resolve2(createIterResultObject2(void 0, true));
              } else {
                var value = step.value;
                try {
                  var result = mapper(value, state.counter++);
                  var handler = function(mapped) {
                    try {
                      state.inner = getAsyncIteratorFlattenable2(mapped);
                      innerLoop();
                    } catch (error4) {
                      ifAbruptCloseAsyncIterator(error4);
                    }
                  };
                  if (isObject3(result)) Promise3.resolve(result).then(handler, ifAbruptCloseAsyncIterator);
                  else handler(result);
                } catch (error3) {
                  ifAbruptCloseAsyncIterator(error3);
                }
              }
            } catch (error2) {
              doneAndReject(error2);
            }
          }, doneAndReject);
        } catch (error) {
          doneAndReject(error);
        }
      };
      var innerLoop = function() {
        var inner = state.inner;
        if (inner) {
          try {
            Promise3.resolve(anObject2(call(inner.next, inner.iterator))).then(function(result) {
              try {
                if (anObject2(result).done) {
                  state.inner = null;
                  outerLoop();
                } else resolve2(createIterResultObject2(result.value, false));
              } catch (error1) {
                ifAbruptCloseAsyncIterator(error1);
              }
            }, ifAbruptCloseAsyncIterator);
          } catch (error) {
            ifAbruptCloseAsyncIterator(error);
          }
        } else outerLoop();
      };
      innerLoop();
    });
  });
  $({ target: "AsyncIterator", proto: true, real: true, forced: true }, {
    flatMap: function flatMap(mapper) {
      anObject2(this);
      aCallable2(mapper);
      return new AsyncIteratorProxy(getIteratorDirect2(this), {
        mapper,
        inner: null
      });
    }
  });
  return esnext_asyncIterator_flatMap;
}
function requireEsnext_asyncIterator_forEach() {
  if (hasRequiredEsnext_asyncIterator_forEach) return esnext_asyncIterator_forEach;
  hasRequiredEsnext_asyncIterator_forEach = 1;
  var $ = require_export();
  var $forEach = requireAsyncIteratorIteration().forEach;
  $({ target: "AsyncIterator", proto: true, real: true, forced: true }, {
    forEach: function forEach2(fn) {
      return $forEach(this, fn);
    }
  });
  return esnext_asyncIterator_forEach;
}
function requireAsyncIteratorWrap() {
  if (hasRequiredAsyncIteratorWrap) return asyncIteratorWrap;
  hasRequiredAsyncIteratorWrap = 1;
  var call = requireFunctionCall();
  var createAsyncIteratorProxy = requireAsyncIteratorCreateProxy();
  asyncIteratorWrap = createAsyncIteratorProxy(function() {
    return call(this.next, this.iterator);
  }, true);
  return asyncIteratorWrap;
}
function requireEsnext_asyncIterator_from() {
  if (hasRequiredEsnext_asyncIterator_from) return esnext_asyncIterator_from;
  hasRequiredEsnext_asyncIterator_from = 1;
  var $ = require_export();
  var toObject2 = requireToObject();
  var isPrototypeOf = requireObjectIsPrototypeOf();
  var getAsyncIteratorFlattenable2 = requireGetAsyncIteratorFlattenable();
  var AsyncIteratorPrototype = requireAsyncIteratorPrototype();
  var WrapAsyncIterator = requireAsyncIteratorWrap();
  $({ target: "AsyncIterator", stat: true, forced: true }, {
    from: function from2(O) {
      var iteratorRecord = getAsyncIteratorFlattenable2(typeof O == "string" ? toObject2(O) : O);
      return isPrototypeOf(AsyncIteratorPrototype, iteratorRecord.iterator) ? iteratorRecord.iterator : new WrapAsyncIterator(iteratorRecord);
    }
  });
  return esnext_asyncIterator_from;
}
function requireAsyncIteratorMap() {
  if (hasRequiredAsyncIteratorMap) return asyncIteratorMap;
  hasRequiredAsyncIteratorMap = 1;
  var call = requireFunctionCall();
  var aCallable2 = requireACallable();
  var anObject2 = requireAnObject();
  var isObject3 = requireIsObject();
  var getIteratorDirect2 = requireGetIteratorDirect();
  var createAsyncIteratorProxy = requireAsyncIteratorCreateProxy();
  var createIterResultObject2 = requireCreateIterResultObject();
  var closeAsyncIteration = requireAsyncIteratorClose();
  var AsyncIteratorProxy = createAsyncIteratorProxy(function(Promise3) {
    var state = this;
    var iterator2 = state.iterator;
    var mapper = state.mapper;
    return new Promise3(function(resolve2, reject) {
      var doneAndReject = function(error) {
        state.done = true;
        reject(error);
      };
      var ifAbruptCloseAsyncIterator = function(error) {
        closeAsyncIteration(iterator2, doneAndReject, error, doneAndReject);
      };
      Promise3.resolve(anObject2(call(state.next, iterator2))).then(function(step) {
        try {
          if (anObject2(step).done) {
            state.done = true;
            resolve2(createIterResultObject2(void 0, true));
          } else {
            var value = step.value;
            try {
              var result = mapper(value, state.counter++);
              var handler = function(mapped) {
                resolve2(createIterResultObject2(mapped, false));
              };
              if (isObject3(result)) Promise3.resolve(result).then(handler, ifAbruptCloseAsyncIterator);
              else handler(result);
            } catch (error2) {
              ifAbruptCloseAsyncIterator(error2);
            }
          }
        } catch (error) {
          doneAndReject(error);
        }
      }, doneAndReject);
    });
  });
  asyncIteratorMap = function map2(mapper) {
    anObject2(this);
    aCallable2(mapper);
    return new AsyncIteratorProxy(getIteratorDirect2(this), {
      mapper
    });
  };
  return asyncIteratorMap;
}
function requireEsnext_asyncIterator_map() {
  if (hasRequiredEsnext_asyncIterator_map) return esnext_asyncIterator_map;
  hasRequiredEsnext_asyncIterator_map = 1;
  var $ = require_export();
  var map2 = requireAsyncIteratorMap();
  $({ target: "AsyncIterator", proto: true, real: true, forced: true }, {
    map: map2
  });
  return esnext_asyncIterator_map;
}
function requireEsnext_asyncIterator_reduce() {
  if (hasRequiredEsnext_asyncIterator_reduce) return esnext_asyncIterator_reduce;
  hasRequiredEsnext_asyncIterator_reduce = 1;
  var $ = require_export();
  var call = requireFunctionCall();
  var aCallable2 = requireACallable();
  var anObject2 = requireAnObject();
  var isObject3 = requireIsObject();
  var getBuiltIn2 = requireGetBuiltIn();
  var getIteratorDirect2 = requireGetIteratorDirect();
  var closeAsyncIteration = requireAsyncIteratorClose();
  var Promise3 = getBuiltIn2("Promise");
  var $TypeError = TypeError;
  $({ target: "AsyncIterator", proto: true, real: true, forced: true }, {
    reduce: function reduce(reducer) {
      anObject2(this);
      aCallable2(reducer);
      var record2 = getIteratorDirect2(this);
      var iterator2 = record2.iterator;
      var next = record2.next;
      var noInitial = arguments.length < 2;
      var accumulator = noInitial ? void 0 : arguments[1];
      var counter = 0;
      return new Promise3(function(resolve2, reject) {
        var ifAbruptCloseAsyncIterator = function(error) {
          closeAsyncIteration(iterator2, reject, error, reject);
        };
        var loop = function() {
          try {
            Promise3.resolve(anObject2(call(next, iterator2))).then(function(step) {
              try {
                if (anObject2(step).done) {
                  noInitial ? reject(new $TypeError("Reduce of empty iterator with no initial value")) : resolve2(accumulator);
                } else {
                  var value = step.value;
                  if (noInitial) {
                    noInitial = false;
                    accumulator = value;
                    loop();
                  } else try {
                    var result = reducer(accumulator, value, counter);
                    var handler = function($result) {
                      accumulator = $result;
                      loop();
                    };
                    if (isObject3(result)) Promise3.resolve(result).then(handler, ifAbruptCloseAsyncIterator);
                    else handler(result);
                  } catch (error3) {
                    ifAbruptCloseAsyncIterator(error3);
                  }
                }
                counter++;
              } catch (error2) {
                reject(error2);
              }
            }, reject);
          } catch (error) {
            reject(error);
          }
        };
        loop();
      });
    }
  });
  return esnext_asyncIterator_reduce;
}
function requireEsnext_asyncIterator_some() {
  if (hasRequiredEsnext_asyncIterator_some) return esnext_asyncIterator_some;
  hasRequiredEsnext_asyncIterator_some = 1;
  var $ = require_export();
  var $some = requireAsyncIteratorIteration().some;
  $({ target: "AsyncIterator", proto: true, real: true, forced: true }, {
    some: function some(predicate) {
      return $some(this, predicate);
    }
  });
  return esnext_asyncIterator_some;
}
function requireEsnext_asyncIterator_take() {
  if (hasRequiredEsnext_asyncIterator_take) return esnext_asyncIterator_take;
  hasRequiredEsnext_asyncIterator_take = 1;
  var $ = require_export();
  var call = requireFunctionCall();
  var anObject2 = requireAnObject();
  var getIteratorDirect2 = requireGetIteratorDirect();
  var notANaN = requireNotANan();
  var toPositiveInteger2 = requireToPositiveInteger();
  var createAsyncIteratorProxy = requireAsyncIteratorCreateProxy();
  var createIterResultObject2 = requireCreateIterResultObject();
  var AsyncIteratorProxy = createAsyncIteratorProxy(function(Promise3) {
    var state = this;
    var iterator2 = state.iterator;
    var returnMethod;
    if (!state.remaining--) {
      var resultDone = createIterResultObject2(void 0, true);
      state.done = true;
      returnMethod = iterator2["return"];
      if (returnMethod !== void 0) {
        return Promise3.resolve(call(returnMethod, iterator2, void 0)).then(function() {
          return resultDone;
        });
      }
      return resultDone;
    }
    return Promise3.resolve(call(state.next, iterator2)).then(function(step) {
      if (anObject2(step).done) {
        state.done = true;
        return createIterResultObject2(void 0, true);
      }
      return createIterResultObject2(step.value, false);
    }).then(null, function(error) {
      state.done = true;
      throw error;
    });
  });
  $({ target: "AsyncIterator", proto: true, real: true, forced: true }, {
    take: function take2(limit2) {
      anObject2(this);
      var remaining = toPositiveInteger2(notANaN(+limit2));
      return new AsyncIteratorProxy(getIteratorDirect2(this), {
        remaining
      });
    }
  });
  return esnext_asyncIterator_take;
}
function requireEsnext_asyncIterator_toArray() {
  if (hasRequiredEsnext_asyncIterator_toArray) return esnext_asyncIterator_toArray;
  hasRequiredEsnext_asyncIterator_toArray = 1;
  var $ = require_export();
  var $toArray = requireAsyncIteratorIteration().toArray;
  $({ target: "AsyncIterator", proto: true, real: true, forced: true }, {
    toArray: function toArray() {
      return $toArray(this, void 0, []);
    }
  });
  return esnext_asyncIterator_toArray;
}
function requireDefineBuiltInAccessor() {
  if (hasRequiredDefineBuiltInAccessor) return defineBuiltInAccessor;
  hasRequiredDefineBuiltInAccessor = 1;
  var makeBuiltIn2 = requireMakeBuiltIn();
  var defineProperty = requireObjectDefineProperty();
  defineBuiltInAccessor = function(target, name, descriptor) {
    if (descriptor.get) makeBuiltIn2(descriptor.get, name, { getter: true });
    if (descriptor.set) makeBuiltIn2(descriptor.set, name, { setter: true });
    return defineProperty.f(target, name, descriptor);
  };
  return defineBuiltInAccessor;
}
function requireIteratorsCore() {
  if (hasRequiredIteratorsCore) return iteratorsCore;
  hasRequiredIteratorsCore = 1;
  var fails2 = requireFails();
  var isCallable2 = requireIsCallable();
  var isObject3 = requireIsObject();
  var create2 = requireObjectCreate();
  var getPrototypeOf = requireObjectGetPrototypeOf();
  var defineBuiltIn2 = requireDefineBuiltIn();
  var wellKnownSymbol2 = requireWellKnownSymbol();
  var IS_PURE = requireIsPure();
  var ITERATOR = wellKnownSymbol2("iterator");
  var BUGGY_SAFARI_ITERATORS = false;
  var IteratorPrototype, PrototypeOfArrayIteratorPrototype, arrayIterator;
  if ([].keys) {
    arrayIterator = [].keys();
    if (!("next" in arrayIterator)) BUGGY_SAFARI_ITERATORS = true;
    else {
      PrototypeOfArrayIteratorPrototype = getPrototypeOf(getPrototypeOf(arrayIterator));
      if (PrototypeOfArrayIteratorPrototype !== Object.prototype) IteratorPrototype = PrototypeOfArrayIteratorPrototype;
    }
  }
  var NEW_ITERATOR_PROTOTYPE = !isObject3(IteratorPrototype) || fails2(function() {
    var test2 = {};
    return IteratorPrototype[ITERATOR].call(test2) !== test2;
  });
  if (NEW_ITERATOR_PROTOTYPE) IteratorPrototype = {};
  else if (IS_PURE) IteratorPrototype = create2(IteratorPrototype);
  if (!isCallable2(IteratorPrototype[ITERATOR])) {
    defineBuiltIn2(IteratorPrototype, ITERATOR, function() {
      return this;
    });
  }
  iteratorsCore = {
    IteratorPrototype,
    BUGGY_SAFARI_ITERATORS
  };
  return iteratorsCore;
}
function requireEs_iterator_constructor() {
  if (hasRequiredEs_iterator_constructor) return es_iterator_constructor;
  hasRequiredEs_iterator_constructor = 1;
  var $ = require_export();
  var globalThis2 = requireGlobalThis();
  var anInstance2 = requireAnInstance();
  var anObject2 = requireAnObject();
  var isCallable2 = requireIsCallable();
  var getPrototypeOf = requireObjectGetPrototypeOf();
  var defineBuiltInAccessor2 = requireDefineBuiltInAccessor();
  var createProperty2 = requireCreateProperty();
  var fails2 = requireFails();
  var hasOwn = requireHasOwnProperty();
  var wellKnownSymbol2 = requireWellKnownSymbol();
  var IteratorPrototype = requireIteratorsCore().IteratorPrototype;
  var DESCRIPTORS = requireDescriptors();
  var IS_PURE = requireIsPure();
  var CONSTRUCTOR = "constructor";
  var ITERATOR = "Iterator";
  var TO_STRING_TAG = wellKnownSymbol2("toStringTag");
  var $TypeError = TypeError;
  var NativeIterator = globalThis2[ITERATOR];
  var FORCED = IS_PURE || !isCallable2(NativeIterator) || NativeIterator.prototype !== IteratorPrototype || !fails2(function() {
    NativeIterator({});
  });
  var IteratorConstructor = function Iterator2() {
    anInstance2(this, IteratorPrototype);
    if (getPrototypeOf(this) === IteratorPrototype) throw new $TypeError("Abstract class Iterator not directly constructable");
  };
  var defineIteratorPrototypeAccessor = function(key, value) {
    if (DESCRIPTORS) {
      defineBuiltInAccessor2(IteratorPrototype, key, {
        configurable: true,
        get: function() {
          return value;
        },
        set: function(replacement) {
          anObject2(this);
          if (this === IteratorPrototype) throw new $TypeError("You can't redefine this property");
          if (hasOwn(this, key)) this[key] = replacement;
          else createProperty2(this, key, replacement);
        }
      });
    } else IteratorPrototype[key] = value;
  };
  if (!hasOwn(IteratorPrototype, TO_STRING_TAG)) defineIteratorPrototypeAccessor(TO_STRING_TAG, ITERATOR);
  if (FORCED || !hasOwn(IteratorPrototype, CONSTRUCTOR) || IteratorPrototype[CONSTRUCTOR] === Object) {
    defineIteratorPrototypeAccessor(CONSTRUCTOR, IteratorConstructor);
  }
  IteratorConstructor.prototype = IteratorPrototype;
  $({ global: true, constructor: true, forced: FORCED }, {
    Iterator: IteratorConstructor
  });
  return es_iterator_constructor;
}
function requireEsnext_iterator_constructor() {
  if (hasRequiredEsnext_iterator_constructor) return esnext_iterator_constructor;
  hasRequiredEsnext_iterator_constructor = 1;
  requireEs_iterator_constructor();
  return esnext_iterator_constructor;
}
function requireIteratorCloseAll() {
  if (hasRequiredIteratorCloseAll) return iteratorCloseAll;
  hasRequiredIteratorCloseAll = 1;
  var iteratorClose2 = requireIteratorClose();
  iteratorCloseAll = function(iters, kind, value) {
    for (var i = iters.length - 1; i >= 0; i--) {
      if (iters[i] === void 0) continue;
      try {
        value = iteratorClose2(iters[i].iterator, kind, value);
      } catch (error) {
        kind = "throw";
        value = error;
      }
    }
    if (kind === "throw") throw value;
    return value;
  };
  return iteratorCloseAll;
}
function requireIteratorCreateProxy() {
  if (hasRequiredIteratorCreateProxy) return iteratorCreateProxy;
  hasRequiredIteratorCreateProxy = 1;
  var call = requireFunctionCall();
  var create2 = requireObjectCreate();
  var createNonEnumerableProperty2 = requireCreateNonEnumerableProperty();
  var defineBuiltIns2 = requireDefineBuiltIns();
  var wellKnownSymbol2 = requireWellKnownSymbol();
  var InternalStateModule = requireInternalState();
  var getMethod2 = requireGetMethod();
  var IteratorPrototype = requireIteratorsCore().IteratorPrototype;
  var createIterResultObject2 = requireCreateIterResultObject();
  var iteratorClose2 = requireIteratorClose();
  var iteratorCloseAll2 = requireIteratorCloseAll();
  var TO_STRING_TAG = wellKnownSymbol2("toStringTag");
  var ITERATOR_HELPER = "IteratorHelper";
  var WRAP_FOR_VALID_ITERATOR = "WrapForValidIterator";
  var NORMAL = "normal";
  var THROW = "throw";
  var setInternalState = InternalStateModule.set;
  var createIteratorProxyPrototype = function(IS_ITERATOR) {
    var getInternalState = InternalStateModule.getterFor(IS_ITERATOR ? WRAP_FOR_VALID_ITERATOR : ITERATOR_HELPER);
    return defineBuiltIns2(create2(IteratorPrototype), {
      next: function next() {
        var state = getInternalState(this);
        if (IS_ITERATOR) return state.nextHandler();
        if (state.done) return createIterResultObject2(void 0, true);
        try {
          var result = state.nextHandler();
          return state.returnHandlerResult ? result : createIterResultObject2(result, state.done);
        } catch (error) {
          state.done = true;
          throw error;
        }
      },
      "return": function() {
        var state = getInternalState(this);
        var iterator2 = state.iterator;
        state.done = true;
        if (IS_ITERATOR) {
          var returnMethod = getMethod2(iterator2, "return");
          return returnMethod ? call(returnMethod, iterator2) : createIterResultObject2(void 0, true);
        }
        if (state.inner) try {
          iteratorClose2(state.inner.iterator, NORMAL);
        } catch (error) {
          return iteratorClose2(iterator2, THROW, error);
        }
        if (state.openIters) try {
          iteratorCloseAll2(state.openIters, NORMAL);
        } catch (error) {
          return iteratorClose2(iterator2, THROW, error);
        }
        if (iterator2) iteratorClose2(iterator2, NORMAL);
        return createIterResultObject2(void 0, true);
      }
    });
  };
  var WrapForValidIteratorPrototype = createIteratorProxyPrototype(true);
  var IteratorHelperPrototype = createIteratorProxyPrototype(false);
  createNonEnumerableProperty2(IteratorHelperPrototype, TO_STRING_TAG, "Iterator Helper");
  iteratorCreateProxy = function(nextHandler, IS_ITERATOR, RETURN_HANDLER_RESULT) {
    var IteratorProxy = function Iterator2(record2, state) {
      if (state) {
        state.iterator = record2.iterator;
        state.next = record2.next;
      } else state = record2;
      state.type = IS_ITERATOR ? WRAP_FOR_VALID_ITERATOR : ITERATOR_HELPER;
      state.returnHandlerResult = !!RETURN_HANDLER_RESULT;
      state.nextHandler = nextHandler;
      state.counter = 0;
      state.done = false;
      setInternalState(this, state);
    };
    IteratorProxy.prototype = IS_ITERATOR ? WrapForValidIteratorPrototype : IteratorHelperPrototype;
    return IteratorProxy;
  };
  return iteratorCreateProxy;
}
function requireIteratorHelperThrowsOnInvalidIterator() {
  if (hasRequiredIteratorHelperThrowsOnInvalidIterator) return iteratorHelperThrowsOnInvalidIterator;
  hasRequiredIteratorHelperThrowsOnInvalidIterator = 1;
  iteratorHelperThrowsOnInvalidIterator = function(methodName, argument) {
    var method = typeof Iterator == "function" && Iterator.prototype[methodName];
    if (method) try {
      method.call({ next: null }, argument).next();
    } catch (error) {
      return true;
    }
  };
  return iteratorHelperThrowsOnInvalidIterator;
}
function requireIteratorHelperWithoutClosingOnEarlyError() {
  if (hasRequiredIteratorHelperWithoutClosingOnEarlyError) return iteratorHelperWithoutClosingOnEarlyError;
  hasRequiredIteratorHelperWithoutClosingOnEarlyError = 1;
  var globalThis2 = requireGlobalThis();
  iteratorHelperWithoutClosingOnEarlyError = function(METHOD_NAME, ExpectedError) {
    var Iterator2 = globalThis2.Iterator;
    var IteratorPrototype = Iterator2 && Iterator2.prototype;
    var method = IteratorPrototype && IteratorPrototype[METHOD_NAME];
    var CLOSED = false;
    if (method) try {
      method.call({
        next: function() {
          return { done: true };
        },
        "return": function() {
          CLOSED = true;
        }
      }, -1);
    } catch (error) {
      if (!(error instanceof ExpectedError)) CLOSED = false;
    }
    if (!CLOSED) return method;
  };
  return iteratorHelperWithoutClosingOnEarlyError;
}
function requireEs_iterator_drop() {
  if (hasRequiredEs_iterator_drop) return es_iterator_drop;
  hasRequiredEs_iterator_drop = 1;
  var $ = require_export();
  var call = requireFunctionCall();
  var anObject2 = requireAnObject();
  var getIteratorDirect2 = requireGetIteratorDirect();
  var notANaN = requireNotANan();
  var toPositiveInteger2 = requireToPositiveInteger();
  var iteratorClose2 = requireIteratorClose();
  var createIteratorProxy = requireIteratorCreateProxy();
  var iteratorHelperThrowsOnInvalidIterator2 = requireIteratorHelperThrowsOnInvalidIterator();
  var iteratorHelperWithoutClosingOnEarlyError2 = requireIteratorHelperWithoutClosingOnEarlyError();
  var IS_PURE = requireIsPure();
  var DROP_WITHOUT_THROWING_ON_INVALID_ITERATOR = !IS_PURE && !iteratorHelperThrowsOnInvalidIterator2("drop", 0);
  var dropWithoutClosingOnEarlyError = !IS_PURE && !DROP_WITHOUT_THROWING_ON_INVALID_ITERATOR && iteratorHelperWithoutClosingOnEarlyError2("drop", RangeError);
  var FORCED = IS_PURE || DROP_WITHOUT_THROWING_ON_INVALID_ITERATOR || dropWithoutClosingOnEarlyError;
  var IteratorProxy = createIteratorProxy(function() {
    var iterator2 = this.iterator;
    var next = this.next;
    var result, done;
    while (this.remaining) {
      this.remaining--;
      result = anObject2(call(next, iterator2));
      done = this.done = !!result.done;
      if (done) return;
    }
    result = anObject2(call(next, iterator2));
    done = this.done = !!result.done;
    if (!done) return result.value;
  });
  $({ target: "Iterator", proto: true, real: true, forced: FORCED }, {
    drop: function drop(limit2) {
      anObject2(this);
      var remaining;
      try {
        remaining = toPositiveInteger2(notANaN(+limit2));
      } catch (error) {
        iteratorClose2(this, "throw", error);
      }
      if (dropWithoutClosingOnEarlyError) return call(dropWithoutClosingOnEarlyError, this, remaining);
      return new IteratorProxy(getIteratorDirect2(this), {
        remaining
      });
    }
  });
  return es_iterator_drop;
}
function requireEsnext_iterator_drop() {
  if (hasRequiredEsnext_iterator_drop) return esnext_iterator_drop;
  hasRequiredEsnext_iterator_drop = 1;
  requireEs_iterator_drop();
  return esnext_iterator_drop;
}
function requireFunctionUncurryThisClause() {
  if (hasRequiredFunctionUncurryThisClause) return functionUncurryThisClause;
  hasRequiredFunctionUncurryThisClause = 1;
  var classofRaw2 = requireClassofRaw();
  var uncurryThis = requireFunctionUncurryThis();
  functionUncurryThisClause = function(fn) {
    if (classofRaw2(fn) === "Function") return uncurryThis(fn);
  };
  return functionUncurryThisClause;
}
function requireFunctionBindContext() {
  if (hasRequiredFunctionBindContext) return functionBindContext;
  hasRequiredFunctionBindContext = 1;
  var uncurryThis = requireFunctionUncurryThisClause();
  var aCallable2 = requireACallable();
  var NATIVE_BIND = requireFunctionBindNative();
  var bind = uncurryThis(uncurryThis.bind);
  functionBindContext = function(fn, that) {
    aCallable2(fn);
    return that === void 0 ? fn : NATIVE_BIND ? bind(fn, that) : function() {
      return fn.apply(that, arguments);
    };
  };
  return functionBindContext;
}
function requireIsArrayIteratorMethod() {
  if (hasRequiredIsArrayIteratorMethod) return isArrayIteratorMethod;
  hasRequiredIsArrayIteratorMethod = 1;
  var wellKnownSymbol2 = requireWellKnownSymbol();
  var Iterators = requireIterators();
  var ITERATOR = wellKnownSymbol2("iterator");
  var ArrayPrototype = Array.prototype;
  isArrayIteratorMethod = function(it) {
    return it !== void 0 && (Iterators.Array === it || ArrayPrototype[ITERATOR] === it);
  };
  return isArrayIteratorMethod;
}
function requireGetIterator() {
  if (hasRequiredGetIterator) return getIterator;
  hasRequiredGetIterator = 1;
  var call = requireFunctionCall();
  var aCallable2 = requireACallable();
  var anObject2 = requireAnObject();
  var tryToString2 = requireTryToString();
  var getIteratorMethod2 = requireGetIteratorMethod();
  var $TypeError = TypeError;
  getIterator = function(argument, usingIterator) {
    var iteratorMethod = arguments.length < 2 ? getIteratorMethod2(argument) : usingIterator;
    if (aCallable2(iteratorMethod)) return anObject2(call(iteratorMethod, argument));
    throw new $TypeError(tryToString2(argument) + " is not iterable");
  };
  return getIterator;
}
function requireIterate() {
  if (hasRequiredIterate) return iterate;
  hasRequiredIterate = 1;
  var bind = requireFunctionBindContext();
  var call = requireFunctionCall();
  var anObject2 = requireAnObject();
  var tryToString2 = requireTryToString();
  var isArrayIteratorMethod2 = requireIsArrayIteratorMethod();
  var lengthOfArrayLike2 = requireLengthOfArrayLike();
  var isPrototypeOf = requireObjectIsPrototypeOf();
  var getIterator2 = requireGetIterator();
  var getIteratorMethod2 = requireGetIteratorMethod();
  var iteratorClose2 = requireIteratorClose();
  var $TypeError = TypeError;
  var Result = function(stopped, result) {
    this.stopped = stopped;
    this.result = result;
  };
  var ResultPrototype = Result.prototype;
  iterate = function(iterable, unboundFunction, options2) {
    var that = options2 && options2.that;
    var AS_ENTRIES = !!(options2 && options2.AS_ENTRIES);
    var IS_RECORD = !!(options2 && options2.IS_RECORD);
    var IS_ITERATOR = !!(options2 && options2.IS_ITERATOR);
    var INTERRUPTED = !!(options2 && options2.INTERRUPTED);
    var fn = bind(unboundFunction, that);
    var iterator2, iterFn, index2, length, result, next, step;
    var stop = function(condition) {
      if (iterator2) iteratorClose2(iterator2, "normal");
      return new Result(true, condition);
    };
    var callFn = function(value) {
      if (AS_ENTRIES) {
        anObject2(value);
        return INTERRUPTED ? fn(value[0], value[1], stop) : fn(value[0], value[1]);
      }
      return INTERRUPTED ? fn(value, stop) : fn(value);
    };
    if (IS_RECORD) {
      iterator2 = iterable.iterator;
    } else if (IS_ITERATOR) {
      iterator2 = iterable;
    } else {
      iterFn = getIteratorMethod2(iterable);
      if (!iterFn) throw new $TypeError(tryToString2(iterable) + " is not iterable");
      if (isArrayIteratorMethod2(iterFn)) {
        for (index2 = 0, length = lengthOfArrayLike2(iterable); length > index2; index2++) {
          result = callFn(iterable[index2]);
          if (result && isPrototypeOf(ResultPrototype, result)) return result;
        }
        return new Result(false);
      }
      iterator2 = getIterator2(iterable, iterFn);
    }
    next = IS_RECORD ? iterable.next : iterator2.next;
    while (!(step = call(next, iterator2)).done) {
      try {
        result = callFn(step.value);
      } catch (error) {
        iteratorClose2(iterator2, "throw", error);
      }
      if (typeof result == "object" && result && isPrototypeOf(ResultPrototype, result)) return result;
    }
    return new Result(false);
  };
  return iterate;
}
function requireEs_iterator_every() {
  if (hasRequiredEs_iterator_every) return es_iterator_every;
  hasRequiredEs_iterator_every = 1;
  var $ = require_export();
  var call = requireFunctionCall();
  var iterate2 = requireIterate();
  var aCallable2 = requireACallable();
  var anObject2 = requireAnObject();
  var getIteratorDirect2 = requireGetIteratorDirect();
  var iteratorClose2 = requireIteratorClose();
  var iteratorHelperWithoutClosingOnEarlyError2 = requireIteratorHelperWithoutClosingOnEarlyError();
  var everyWithoutClosingOnEarlyError = iteratorHelperWithoutClosingOnEarlyError2("every", TypeError);
  $({ target: "Iterator", proto: true, real: true, forced: everyWithoutClosingOnEarlyError }, {
    every: function every(predicate) {
      anObject2(this);
      try {
        aCallable2(predicate);
      } catch (error) {
        iteratorClose2(this, "throw", error);
      }
      if (everyWithoutClosingOnEarlyError) return call(everyWithoutClosingOnEarlyError, this, predicate);
      var record2 = getIteratorDirect2(this);
      var counter = 0;
      return !iterate2(record2, function(value, stop) {
        if (!predicate(value, counter++)) return stop();
      }, { IS_RECORD: true, INTERRUPTED: true }).stopped;
    }
  });
  return es_iterator_every;
}
function requireEsnext_iterator_every() {
  if (hasRequiredEsnext_iterator_every) return esnext_iterator_every;
  hasRequiredEsnext_iterator_every = 1;
  requireEs_iterator_every();
  return esnext_iterator_every;
}
function requireCallWithSafeIterationClosing() {
  if (hasRequiredCallWithSafeIterationClosing) return callWithSafeIterationClosing;
  hasRequiredCallWithSafeIterationClosing = 1;
  var anObject2 = requireAnObject();
  var iteratorClose2 = requireIteratorClose();
  callWithSafeIterationClosing = function(iterator2, fn, value, ENTRIES) {
    try {
      return ENTRIES ? fn(anObject2(value)[0], value[1]) : fn(value);
    } catch (error) {
      iteratorClose2(iterator2, "throw", error);
    }
  };
  return callWithSafeIterationClosing;
}
function requireEs_iterator_filter() {
  if (hasRequiredEs_iterator_filter) return es_iterator_filter;
  hasRequiredEs_iterator_filter = 1;
  var $ = require_export();
  var call = requireFunctionCall();
  var aCallable2 = requireACallable();
  var anObject2 = requireAnObject();
  var getIteratorDirect2 = requireGetIteratorDirect();
  var createIteratorProxy = requireIteratorCreateProxy();
  var callWithSafeIterationClosing2 = requireCallWithSafeIterationClosing();
  var IS_PURE = requireIsPure();
  var iteratorClose2 = requireIteratorClose();
  var iteratorHelperThrowsOnInvalidIterator2 = requireIteratorHelperThrowsOnInvalidIterator();
  var iteratorHelperWithoutClosingOnEarlyError2 = requireIteratorHelperWithoutClosingOnEarlyError();
  var FILTER_WITHOUT_THROWING_ON_INVALID_ITERATOR = !IS_PURE && !iteratorHelperThrowsOnInvalidIterator2("filter", function() {
  });
  var filterWithoutClosingOnEarlyError = !IS_PURE && !FILTER_WITHOUT_THROWING_ON_INVALID_ITERATOR && iteratorHelperWithoutClosingOnEarlyError2("filter", TypeError);
  var FORCED = IS_PURE || FILTER_WITHOUT_THROWING_ON_INVALID_ITERATOR || filterWithoutClosingOnEarlyError;
  var IteratorProxy = createIteratorProxy(function() {
    var iterator2 = this.iterator;
    var predicate = this.predicate;
    var next = this.next;
    var result, done, value;
    while (true) {
      result = anObject2(call(next, iterator2));
      done = this.done = !!result.done;
      if (done) return;
      value = result.value;
      if (callWithSafeIterationClosing2(iterator2, predicate, [value, this.counter++], true)) return value;
    }
  });
  $({ target: "Iterator", proto: true, real: true, forced: FORCED }, {
    filter: function filter2(predicate) {
      anObject2(this);
      try {
        aCallable2(predicate);
      } catch (error) {
        iteratorClose2(this, "throw", error);
      }
      if (filterWithoutClosingOnEarlyError) return call(filterWithoutClosingOnEarlyError, this, predicate);
      return new IteratorProxy(getIteratorDirect2(this), {
        predicate
      });
    }
  });
  return es_iterator_filter;
}
function requireEsnext_iterator_filter() {
  if (hasRequiredEsnext_iterator_filter) return esnext_iterator_filter;
  hasRequiredEsnext_iterator_filter = 1;
  requireEs_iterator_filter();
  return esnext_iterator_filter;
}
function requireEs_iterator_find() {
  if (hasRequiredEs_iterator_find) return es_iterator_find;
  hasRequiredEs_iterator_find = 1;
  var $ = require_export();
  var call = requireFunctionCall();
  var iterate2 = requireIterate();
  var aCallable2 = requireACallable();
  var anObject2 = requireAnObject();
  var getIteratorDirect2 = requireGetIteratorDirect();
  var iteratorClose2 = requireIteratorClose();
  var iteratorHelperWithoutClosingOnEarlyError2 = requireIteratorHelperWithoutClosingOnEarlyError();
  var findWithoutClosingOnEarlyError = iteratorHelperWithoutClosingOnEarlyError2("find", TypeError);
  $({ target: "Iterator", proto: true, real: true, forced: findWithoutClosingOnEarlyError }, {
    find: function find(predicate) {
      anObject2(this);
      try {
        aCallable2(predicate);
      } catch (error) {
        iteratorClose2(this, "throw", error);
      }
      if (findWithoutClosingOnEarlyError) return call(findWithoutClosingOnEarlyError, this, predicate);
      var record2 = getIteratorDirect2(this);
      var counter = 0;
      return iterate2(record2, function(value, stop) {
        if (predicate(value, counter++)) return stop(value);
      }, { IS_RECORD: true, INTERRUPTED: true }).result;
    }
  });
  return es_iterator_find;
}
function requireEsnext_iterator_find() {
  if (hasRequiredEsnext_iterator_find) return esnext_iterator_find;
  hasRequiredEsnext_iterator_find = 1;
  requireEs_iterator_find();
  return esnext_iterator_find;
}
function requireGetIteratorFlattenable() {
  if (hasRequiredGetIteratorFlattenable) return getIteratorFlattenable;
  hasRequiredGetIteratorFlattenable = 1;
  var call = requireFunctionCall();
  var anObject2 = requireAnObject();
  var getIteratorDirect2 = requireGetIteratorDirect();
  var getIteratorMethod2 = requireGetIteratorMethod();
  getIteratorFlattenable = function(obj, stringHandling) {
    if (!stringHandling || typeof obj !== "string") anObject2(obj);
    var method = getIteratorMethod2(obj);
    return getIteratorDirect2(anObject2(method !== void 0 ? call(method, obj) : obj));
  };
  return getIteratorFlattenable;
}
function requireEs_iterator_flatMap() {
  if (hasRequiredEs_iterator_flatMap) return es_iterator_flatMap;
  hasRequiredEs_iterator_flatMap = 1;
  var $ = require_export();
  var call = requireFunctionCall();
  var aCallable2 = requireACallable();
  var anObject2 = requireAnObject();
  var getIteratorDirect2 = requireGetIteratorDirect();
  var getIteratorFlattenable2 = requireGetIteratorFlattenable();
  var createIteratorProxy = requireIteratorCreateProxy();
  var iteratorClose2 = requireIteratorClose();
  var IS_PURE = requireIsPure();
  var iteratorHelperThrowsOnInvalidIterator2 = requireIteratorHelperThrowsOnInvalidIterator();
  var iteratorHelperWithoutClosingOnEarlyError2 = requireIteratorHelperWithoutClosingOnEarlyError();
  function throwsOnIteratorWithoutReturn() {
    try {
      var it = Iterator.prototype.flatMap.call((/* @__PURE__ */ new Map([[4, 5]])).entries(), function(v) {
        return v;
      });
      it.next();
      it["return"]();
    } catch (error) {
      return true;
    }
  }
  var FLAT_MAP_WITHOUT_THROWING_ON_INVALID_ITERATOR = !IS_PURE && !iteratorHelperThrowsOnInvalidIterator2("flatMap", function() {
  });
  var flatMapWithoutClosingOnEarlyError = !IS_PURE && !FLAT_MAP_WITHOUT_THROWING_ON_INVALID_ITERATOR && iteratorHelperWithoutClosingOnEarlyError2("flatMap", TypeError);
  var FORCED = IS_PURE || FLAT_MAP_WITHOUT_THROWING_ON_INVALID_ITERATOR || flatMapWithoutClosingOnEarlyError || throwsOnIteratorWithoutReturn();
  var IteratorProxy = createIteratorProxy(function() {
    var iterator2 = this.iterator;
    var mapper = this.mapper;
    var result, inner;
    while (true) {
      if (inner = this.inner) try {
        result = anObject2(call(inner.next, inner.iterator));
        if (!result.done) return result.value;
        this.inner = null;
      } catch (error) {
        iteratorClose2(iterator2, "throw", error);
      }
      result = anObject2(call(this.next, iterator2));
      if (this.done = !!result.done) return;
      try {
        this.inner = getIteratorFlattenable2(mapper(result.value, this.counter++), false);
      } catch (error) {
        iteratorClose2(iterator2, "throw", error);
      }
    }
  });
  $({ target: "Iterator", proto: true, real: true, forced: FORCED }, {
    flatMap: function flatMap(mapper) {
      anObject2(this);
      try {
        aCallable2(mapper);
      } catch (error) {
        iteratorClose2(this, "throw", error);
      }
      if (flatMapWithoutClosingOnEarlyError) return call(flatMapWithoutClosingOnEarlyError, this, mapper);
      return new IteratorProxy(getIteratorDirect2(this), {
        mapper,
        inner: null
      });
    }
  });
  return es_iterator_flatMap;
}
function requireEsnext_iterator_flatMap() {
  if (hasRequiredEsnext_iterator_flatMap) return esnext_iterator_flatMap;
  hasRequiredEsnext_iterator_flatMap = 1;
  requireEs_iterator_flatMap();
  return esnext_iterator_flatMap;
}
function requireEs_iterator_forEach() {
  if (hasRequiredEs_iterator_forEach) return es_iterator_forEach;
  hasRequiredEs_iterator_forEach = 1;
  var $ = require_export();
  var call = requireFunctionCall();
  var iterate2 = requireIterate();
  var aCallable2 = requireACallable();
  var anObject2 = requireAnObject();
  var getIteratorDirect2 = requireGetIteratorDirect();
  var iteratorClose2 = requireIteratorClose();
  var iteratorHelperWithoutClosingOnEarlyError2 = requireIteratorHelperWithoutClosingOnEarlyError();
  var forEachWithoutClosingOnEarlyError = iteratorHelperWithoutClosingOnEarlyError2("forEach", TypeError);
  $({ target: "Iterator", proto: true, real: true, forced: forEachWithoutClosingOnEarlyError }, {
    forEach: function forEach2(fn) {
      anObject2(this);
      try {
        aCallable2(fn);
      } catch (error) {
        iteratorClose2(this, "throw", error);
      }
      if (forEachWithoutClosingOnEarlyError) return call(forEachWithoutClosingOnEarlyError, this, fn);
      var record2 = getIteratorDirect2(this);
      var counter = 0;
      iterate2(record2, function(value) {
        fn(value, counter++);
      }, { IS_RECORD: true });
    }
  });
  return es_iterator_forEach;
}
function requireEsnext_iterator_forEach() {
  if (hasRequiredEsnext_iterator_forEach) return esnext_iterator_forEach;
  hasRequiredEsnext_iterator_forEach = 1;
  requireEs_iterator_forEach();
  return esnext_iterator_forEach;
}
function requireEs_iterator_from() {
  if (hasRequiredEs_iterator_from) return es_iterator_from;
  hasRequiredEs_iterator_from = 1;
  var $ = require_export();
  var call = requireFunctionCall();
  var toObject2 = requireToObject();
  var isPrototypeOf = requireObjectIsPrototypeOf();
  var IteratorPrototype = requireIteratorsCore().IteratorPrototype;
  var createIteratorProxy = requireIteratorCreateProxy();
  var getIteratorFlattenable2 = requireGetIteratorFlattenable();
  var IS_PURE = requireIsPure();
  var FORCED = IS_PURE || function() {
    try {
      Iterator.from({ "return": null })["return"]();
    } catch (error) {
      return true;
    }
  }();
  var IteratorProxy = createIteratorProxy(function() {
    return call(this.next, this.iterator);
  }, true);
  $({ target: "Iterator", stat: true, forced: FORCED }, {
    from: function from2(O) {
      var iteratorRecord = getIteratorFlattenable2(typeof O == "string" ? toObject2(O) : O, true);
      return isPrototypeOf(IteratorPrototype, iteratorRecord.iterator) ? iteratorRecord.iterator : new IteratorProxy(iteratorRecord);
    }
  });
  return es_iterator_from;
}
function requireEsnext_iterator_from() {
  if (hasRequiredEsnext_iterator_from) return esnext_iterator_from;
  hasRequiredEsnext_iterator_from = 1;
  requireEs_iterator_from();
  return esnext_iterator_from;
}
function requireEs_iterator_map() {
  if (hasRequiredEs_iterator_map) return es_iterator_map;
  hasRequiredEs_iterator_map = 1;
  var $ = require_export();
  var call = requireFunctionCall();
  var aCallable2 = requireACallable();
  var anObject2 = requireAnObject();
  var getIteratorDirect2 = requireGetIteratorDirect();
  var createIteratorProxy = requireIteratorCreateProxy();
  var callWithSafeIterationClosing2 = requireCallWithSafeIterationClosing();
  var iteratorClose2 = requireIteratorClose();
  var iteratorHelperThrowsOnInvalidIterator2 = requireIteratorHelperThrowsOnInvalidIterator();
  var iteratorHelperWithoutClosingOnEarlyError2 = requireIteratorHelperWithoutClosingOnEarlyError();
  var IS_PURE = requireIsPure();
  var MAP_WITHOUT_THROWING_ON_INVALID_ITERATOR = !IS_PURE && !iteratorHelperThrowsOnInvalidIterator2("map", function() {
  });
  var mapWithoutClosingOnEarlyError = !IS_PURE && !MAP_WITHOUT_THROWING_ON_INVALID_ITERATOR && iteratorHelperWithoutClosingOnEarlyError2("map", TypeError);
  var FORCED = IS_PURE || MAP_WITHOUT_THROWING_ON_INVALID_ITERATOR || mapWithoutClosingOnEarlyError;
  var IteratorProxy = createIteratorProxy(function() {
    var iterator2 = this.iterator;
    var result = anObject2(call(this.next, iterator2));
    var done = this.done = !!result.done;
    if (!done) return callWithSafeIterationClosing2(iterator2, this.mapper, [result.value, this.counter++], true);
  });
  $({ target: "Iterator", proto: true, real: true, forced: FORCED }, {
    map: function map2(mapper) {
      anObject2(this);
      try {
        aCallable2(mapper);
      } catch (error) {
        iteratorClose2(this, "throw", error);
      }
      if (mapWithoutClosingOnEarlyError) return call(mapWithoutClosingOnEarlyError, this, mapper);
      return new IteratorProxy(getIteratorDirect2(this), {
        mapper
      });
    }
  });
  return es_iterator_map;
}
function requireEsnext_iterator_map() {
  if (hasRequiredEsnext_iterator_map) return esnext_iterator_map;
  hasRequiredEsnext_iterator_map = 1;
  requireEs_iterator_map();
  return esnext_iterator_map;
}
function requireFunctionApply() {
  if (hasRequiredFunctionApply) return functionApply;
  hasRequiredFunctionApply = 1;
  var NATIVE_BIND = requireFunctionBindNative();
  var FunctionPrototype = Function.prototype;
  var apply = FunctionPrototype.apply;
  var call = FunctionPrototype.call;
  functionApply = typeof Reflect == "object" && Reflect.apply || (NATIVE_BIND ? call.bind(apply) : function() {
    return call.apply(apply, arguments);
  });
  return functionApply;
}
function requireEs_iterator_reduce() {
  if (hasRequiredEs_iterator_reduce) return es_iterator_reduce;
  hasRequiredEs_iterator_reduce = 1;
  var $ = require_export();
  var iterate2 = requireIterate();
  var aCallable2 = requireACallable();
  var anObject2 = requireAnObject();
  var getIteratorDirect2 = requireGetIteratorDirect();
  var iteratorClose2 = requireIteratorClose();
  var iteratorHelperWithoutClosingOnEarlyError2 = requireIteratorHelperWithoutClosingOnEarlyError();
  var apply = requireFunctionApply();
  var fails2 = requireFails();
  var $TypeError = TypeError;
  var FAILS_ON_INITIAL_UNDEFINED = fails2(function() {
    [].keys().reduce(function() {
    }, void 0);
  });
  var reduceWithoutClosingOnEarlyError = !FAILS_ON_INITIAL_UNDEFINED && iteratorHelperWithoutClosingOnEarlyError2("reduce", $TypeError);
  $({ target: "Iterator", proto: true, real: true, forced: FAILS_ON_INITIAL_UNDEFINED || reduceWithoutClosingOnEarlyError }, {
    reduce: function reduce(reducer) {
      anObject2(this);
      try {
        aCallable2(reducer);
      } catch (error) {
        iteratorClose2(this, "throw", error);
      }
      var noInitial = arguments.length < 2;
      var accumulator = noInitial ? void 0 : arguments[1];
      if (reduceWithoutClosingOnEarlyError) {
        return apply(reduceWithoutClosingOnEarlyError, this, noInitial ? [reducer] : [reducer, accumulator]);
      }
      var record2 = getIteratorDirect2(this);
      var counter = 0;
      iterate2(record2, function(value) {
        if (noInitial) {
          noInitial = false;
          accumulator = value;
        } else {
          accumulator = reducer(accumulator, value, counter);
        }
        counter++;
      }, { IS_RECORD: true });
      if (noInitial) throw new $TypeError("Reduce of empty iterator with no initial value");
      return accumulator;
    }
  });
  return es_iterator_reduce;
}
function requireEsnext_iterator_reduce() {
  if (hasRequiredEsnext_iterator_reduce) return esnext_iterator_reduce;
  hasRequiredEsnext_iterator_reduce = 1;
  requireEs_iterator_reduce();
  return esnext_iterator_reduce;
}
function requireEs_iterator_some() {
  if (hasRequiredEs_iterator_some) return es_iterator_some;
  hasRequiredEs_iterator_some = 1;
  var $ = require_export();
  var call = requireFunctionCall();
  var iterate2 = requireIterate();
  var aCallable2 = requireACallable();
  var anObject2 = requireAnObject();
  var getIteratorDirect2 = requireGetIteratorDirect();
  var iteratorClose2 = requireIteratorClose();
  var iteratorHelperWithoutClosingOnEarlyError2 = requireIteratorHelperWithoutClosingOnEarlyError();
  var someWithoutClosingOnEarlyError = iteratorHelperWithoutClosingOnEarlyError2("some", TypeError);
  $({ target: "Iterator", proto: true, real: true, forced: someWithoutClosingOnEarlyError }, {
    some: function some(predicate) {
      anObject2(this);
      try {
        aCallable2(predicate);
      } catch (error) {
        iteratorClose2(this, "throw", error);
      }
      if (someWithoutClosingOnEarlyError) return call(someWithoutClosingOnEarlyError, this, predicate);
      var record2 = getIteratorDirect2(this);
      var counter = 0;
      return iterate2(record2, function(value, stop) {
        if (predicate(value, counter++)) return stop();
      }, { IS_RECORD: true, INTERRUPTED: true }).stopped;
    }
  });
  return es_iterator_some;
}
function requireEsnext_iterator_some() {
  if (hasRequiredEsnext_iterator_some) return esnext_iterator_some;
  hasRequiredEsnext_iterator_some = 1;
  requireEs_iterator_some();
  return esnext_iterator_some;
}
function requireEs_iterator_take() {
  if (hasRequiredEs_iterator_take) return es_iterator_take;
  hasRequiredEs_iterator_take = 1;
  var $ = require_export();
  var call = requireFunctionCall();
  var anObject2 = requireAnObject();
  var getIteratorDirect2 = requireGetIteratorDirect();
  var notANaN = requireNotANan();
  var toPositiveInteger2 = requireToPositiveInteger();
  var createIteratorProxy = requireIteratorCreateProxy();
  var iteratorClose2 = requireIteratorClose();
  var iteratorHelperWithoutClosingOnEarlyError2 = requireIteratorHelperWithoutClosingOnEarlyError();
  var IS_PURE = requireIsPure();
  var takeWithoutClosingOnEarlyError = !IS_PURE && iteratorHelperWithoutClosingOnEarlyError2("take", RangeError);
  var IteratorProxy = createIteratorProxy(function() {
    var iterator2 = this.iterator;
    if (!this.remaining--) {
      this.done = true;
      return iteratorClose2(iterator2, "normal", void 0);
    }
    var result = anObject2(call(this.next, iterator2));
    var done = this.done = !!result.done;
    if (!done) return result.value;
  });
  $({ target: "Iterator", proto: true, real: true, forced: IS_PURE || takeWithoutClosingOnEarlyError }, {
    take: function take2(limit2) {
      anObject2(this);
      var remaining;
      try {
        remaining = toPositiveInteger2(notANaN(+limit2));
      } catch (error) {
        iteratorClose2(this, "throw", error);
      }
      if (takeWithoutClosingOnEarlyError) return call(takeWithoutClosingOnEarlyError, this, remaining);
      return new IteratorProxy(getIteratorDirect2(this), {
        remaining
      });
    }
  });
  return es_iterator_take;
}
function requireEsnext_iterator_take() {
  if (hasRequiredEsnext_iterator_take) return esnext_iterator_take;
  hasRequiredEsnext_iterator_take = 1;
  requireEs_iterator_take();
  return esnext_iterator_take;
}
function requireEs_iterator_toArray() {
  if (hasRequiredEs_iterator_toArray) return es_iterator_toArray;
  hasRequiredEs_iterator_toArray = 1;
  var $ = require_export();
  var anObject2 = requireAnObject();
  var createProperty2 = requireCreateProperty();
  var iterate2 = requireIterate();
  var getIteratorDirect2 = requireGetIteratorDirect();
  $({ target: "Iterator", proto: true, real: true }, {
    toArray: function toArray() {
      var result = [];
      var index2 = 0;
      iterate2(getIteratorDirect2(anObject2(this)), function(element) {
        createProperty2(result, index2++, element);
      }, { IS_RECORD: true });
      return result;
    }
  });
  return es_iterator_toArray;
}
function requireEsnext_iterator_toArray() {
  if (hasRequiredEsnext_iterator_toArray) return esnext_iterator_toArray;
  hasRequiredEsnext_iterator_toArray = 1;
  requireEs_iterator_toArray();
  return esnext_iterator_toArray;
}
function requireEsnext_iterator_toAsync() {
  if (hasRequiredEsnext_iterator_toAsync) return esnext_iterator_toAsync;
  hasRequiredEsnext_iterator_toAsync = 1;
  var $ = require_export();
  var anObject2 = requireAnObject();
  var AsyncFromSyncIterator = requireAsyncFromSyncIterator();
  var WrapAsyncIterator = requireAsyncIteratorWrap();
  var getIteratorDirect2 = requireGetIteratorDirect();
  $({ target: "Iterator", proto: true, real: true, forced: true }, {
    toAsync: function toAsync() {
      return new WrapAsyncIterator(getIteratorDirect2(new AsyncFromSyncIterator(getIteratorDirect2(anObject2(this)))));
    }
  });
  return esnext_iterator_toAsync;
}
function requireIteratorHelpersStage3() {
  if (hasRequiredIteratorHelpersStage3) return iteratorHelpersStage3;
  hasRequiredIteratorHelpersStage3 = 1;
  requireEsnext_asyncIterator_constructor();
  requireEsnext_asyncIterator_drop();
  requireEsnext_asyncIterator_every();
  requireEsnext_asyncIterator_filter();
  requireEsnext_asyncIterator_find();
  requireEsnext_asyncIterator_flatMap();
  requireEsnext_asyncIterator_forEach();
  requireEsnext_asyncIterator_from();
  requireEsnext_asyncIterator_map();
  requireEsnext_asyncIterator_reduce();
  requireEsnext_asyncIterator_some();
  requireEsnext_asyncIterator_take();
  requireEsnext_asyncIterator_toArray();
  requireEsnext_iterator_constructor();
  requireEsnext_iterator_drop();
  requireEsnext_iterator_every();
  requireEsnext_iterator_filter();
  requireEsnext_iterator_find();
  requireEsnext_iterator_flatMap();
  requireEsnext_iterator_forEach();
  requireEsnext_iterator_from();
  requireEsnext_iterator_map();
  requireEsnext_iterator_reduce();
  requireEsnext_iterator_some();
  requireEsnext_iterator_take();
  requireEsnext_iterator_toArray();
  requireEsnext_iterator_toAsync();
  return iteratorHelpersStage3;
}
function requireAsyncIteratorIndexed() {
  if (hasRequiredAsyncIteratorIndexed) return asyncIteratorIndexed;
  hasRequiredAsyncIteratorIndexed = 1;
  var call = requireFunctionCall();
  var map2 = requireAsyncIteratorMap();
  var callback = function(value, counter) {
    return [counter, value];
  };
  asyncIteratorIndexed = function indexed() {
    return call(map2, this, callback);
  };
  return asyncIteratorIndexed;
}
function requireEsnext_asyncIterator_asIndexedPairs() {
  if (hasRequiredEsnext_asyncIterator_asIndexedPairs) return esnext_asyncIterator_asIndexedPairs;
  hasRequiredEsnext_asyncIterator_asIndexedPairs = 1;
  var $ = require_export();
  var indexed = requireAsyncIteratorIndexed();
  $({ target: "AsyncIterator", name: "indexed", proto: true, real: true, forced: true }, {
    asIndexedPairs: indexed
  });
  return esnext_asyncIterator_asIndexedPairs;
}
function requireEsnext_asyncIterator_indexed() {
  if (hasRequiredEsnext_asyncIterator_indexed) return esnext_asyncIterator_indexed;
  hasRequiredEsnext_asyncIterator_indexed = 1;
  var $ = require_export();
  var indexed = requireAsyncIteratorIndexed();
  $({ target: "AsyncIterator", proto: true, real: true, forced: true }, {
    indexed
  });
  return esnext_asyncIterator_indexed;
}
function requireIteratorIndexed() {
  if (hasRequiredIteratorIndexed) return iteratorIndexed;
  hasRequiredIteratorIndexed = 1;
  requireEs_iterator_map();
  var call = requireFunctionCall();
  var map2 = requireIteratorsCore().IteratorPrototype.map;
  var callback = function(value, counter) {
    return [counter, value];
  };
  iteratorIndexed = function indexed() {
    return call(map2, this, callback);
  };
  return iteratorIndexed;
}
function requireEsnext_iterator_asIndexedPairs() {
  if (hasRequiredEsnext_iterator_asIndexedPairs) return esnext_iterator_asIndexedPairs;
  hasRequiredEsnext_iterator_asIndexedPairs = 1;
  var $ = require_export();
  var indexed = requireIteratorIndexed();
  $({ target: "Iterator", name: "indexed", proto: true, real: true, forced: true }, {
    asIndexedPairs: indexed
  });
  return esnext_iterator_asIndexedPairs;
}
function requireEsnext_iterator_indexed() {
  if (hasRequiredEsnext_iterator_indexed) return esnext_iterator_indexed;
  hasRequiredEsnext_iterator_indexed = 1;
  var $ = require_export();
  var indexed = requireIteratorIndexed();
  $({ target: "Iterator", proto: true, real: true, forced: true }, {
    indexed
  });
  return esnext_iterator_indexed;
}
function requireIteratorHelpers() {
  if (hasRequiredIteratorHelpers) return iteratorHelpers;
  hasRequiredIteratorHelpers = 1;
  requireIteratorHelpersStage3();
  requireEsnext_asyncIterator_asIndexedPairs();
  requireEsnext_asyncIterator_indexed();
  requireEsnext_iterator_asIndexedPairs();
  requireEsnext_iterator_indexed();
  return iteratorHelpers;
}
function addBorder(col, ts, style) {
  if (col.border) {
    if (/[.']-+[.']/.test(ts)) {
      return "";
    }
    if (ts.trim().length !== 0) {
      return style;
    }
    return "  ";
  }
  return "";
}
function _minWidth(col) {
  const padding = col.padding || [];
  const minWidth = 1 + (padding[left] || 0) + (padding[right] || 0);
  if (col.border) {
    return minWidth + 4;
  }
  return minWidth;
}
function getWindowWidth() {
  if (typeof process === "object" && process.stdout && process.stdout.columns) {
    return process.stdout.columns;
  }
  return 80;
}
function alignRight(str, width) {
  str = str.trim();
  const strWidth = mixin$1.stringWidth(str);
  if (strWidth < width) {
    return " ".repeat(width - strWidth) + str;
  }
  return str;
}
function alignCenter(str, width) {
  str = str.trim();
  const strWidth = mixin$1.stringWidth(str);
  if (strWidth >= width) {
    return str;
  }
  return " ".repeat(width - strWidth >> 1) + str;
}
function cliui(opts, _mixin) {
  mixin$1 = _mixin;
  return new UI({
    width: (opts === null || opts === void 0 ? void 0 : opts.width) || getWindowWidth(),
    wrap: opts === null || opts === void 0 ? void 0 : opts.wrap
  });
}
function ansiRegex({ onlyFirst = false } = {}) {
  const ST = "(?:\\u0007|\\u001B\\u005C|\\u009C)";
  const osc = `(?:\\u001B\\][\\s\\S]*?${ST})`;
  const csi = "[\\u001B\\u009B][[\\]()#;?]*(?:\\d{1,4}(?:[;:]\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]";
  const pattern2 = `${osc}|${csi}`;
  return new RegExp(pattern2, onlyFirst ? void 0 : "g");
}
function stripAnsi(string2) {
  if (typeof string2 !== "string") {
    throw new TypeError(`Expected a \`string\`, got \`${typeof string2}\``);
  }
  return string2.replace(regex, "");
}
function isAmbiguous(x) {
  return x === 161 || x === 164 || x === 167 || x === 168 || x === 170 || x === 173 || x === 174 || x >= 176 && x <= 180 || x >= 182 && x <= 186 || x >= 188 && x <= 191 || x === 198 || x === 208 || x === 215 || x === 216 || x >= 222 && x <= 225 || x === 230 || x >= 232 && x <= 234 || x === 236 || x === 237 || x === 240 || x === 242 || x === 243 || x >= 247 && x <= 250 || x === 252 || x === 254 || x === 257 || x === 273 || x === 275 || x === 283 || x === 294 || x === 295 || x === 299 || x >= 305 && x <= 307 || x === 312 || x >= 319 && x <= 322 || x === 324 || x >= 328 && x <= 331 || x === 333 || x === 338 || x === 339 || x === 358 || x === 359 || x === 363 || x === 462 || x === 464 || x === 466 || x === 468 || x === 470 || x === 472 || x === 474 || x === 476 || x === 593 || x === 609 || x === 708 || x === 711 || x >= 713 && x <= 715 || x === 717 || x === 720 || x >= 728 && x <= 731 || x === 733 || x === 735 || x >= 768 && x <= 879 || x >= 913 && x <= 929 || x >= 931 && x <= 937 || x >= 945 && x <= 961 || x >= 963 && x <= 969 || x === 1025 || x >= 1040 && x <= 1103 || x === 1105 || x === 8208 || x >= 8211 && x <= 8214 || x === 8216 || x === 8217 || x === 8220 || x === 8221 || x >= 8224 && x <= 8226 || x >= 8228 && x <= 8231 || x === 8240 || x === 8242 || x === 8243 || x === 8245 || x === 8251 || x === 8254 || x === 8308 || x === 8319 || x >= 8321 && x <= 8324 || x === 8364 || x === 8451 || x === 8453 || x === 8457 || x === 8467 || x === 8470 || x === 8481 || x === 8482 || x === 8486 || x === 8491 || x === 8531 || x === 8532 || x >= 8539 && x <= 8542 || x >= 8544 && x <= 8555 || x >= 8560 && x <= 8569 || x === 8585 || x >= 8592 && x <= 8601 || x === 8632 || x === 8633 || x === 8658 || x === 8660 || x === 8679 || x === 8704 || x === 8706 || x === 8707 || x === 8711 || x === 8712 || x === 8715 || x === 8719 || x === 8721 || x === 8725 || x === 8730 || x >= 8733 && x <= 8736 || x === 8739 || x === 8741 || x >= 8743 && x <= 8748 || x === 8750 || x >= 8756 && x <= 8759 || x === 8764 || x === 8765 || x === 8776 || x === 8780 || x === 8786 || x === 8800 || x === 8801 || x >= 8804 && x <= 8807 || x === 8810 || x === 8811 || x === 8814 || x === 8815 || x === 8834 || x === 8835 || x === 8838 || x === 8839 || x === 8853 || x === 8857 || x === 8869 || x === 8895 || x === 8978 || x >= 9312 && x <= 9449 || x >= 9451 && x <= 9547 || x >= 9552 && x <= 9587 || x >= 9600 && x <= 9615 || x >= 9618 && x <= 9621 || x === 9632 || x === 9633 || x >= 9635 && x <= 9641 || x === 9650 || x === 9651 || x === 9654 || x === 9655 || x === 9660 || x === 9661 || x === 9664 || x === 9665 || x >= 9670 && x <= 9672 || x === 9675 || x >= 9678 && x <= 9681 || x >= 9698 && x <= 9701 || x === 9711 || x === 9733 || x === 9734 || x === 9737 || x === 9742 || x === 9743 || x === 9756 || x === 9758 || x === 9792 || x === 9794 || x === 9824 || x === 9825 || x >= 9827 && x <= 9829 || x >= 9831 && x <= 9834 || x === 9836 || x === 9837 || x === 9839 || x === 9886 || x === 9887 || x === 9919 || x >= 9926 && x <= 9933 || x >= 9935 && x <= 9939 || x >= 9941 && x <= 9953 || x === 9955 || x === 9960 || x === 9961 || x >= 9963 && x <= 9969 || x === 9972 || x >= 9974 && x <= 9977 || x === 9979 || x === 9980 || x === 9982 || x === 9983 || x === 10045 || x >= 10102 && x <= 10111 || x >= 11094 && x <= 11097 || x >= 12872 && x <= 12879 || x >= 57344 && x <= 63743 || x >= 65024 && x <= 65039 || x === 65533 || x >= 127232 && x <= 127242 || x >= 127248 && x <= 127277 || x >= 127280 && x <= 127337 || x >= 127344 && x <= 127373 || x === 127375 || x === 127376 || x >= 127387 && x <= 127404 || x >= 917760 && x <= 917999 || x >= 983040 && x <= 1048573 || x >= 1048576 && x <= 1114109;
}
function isFullWidth(x) {
  return x === 12288 || x >= 65281 && x <= 65376 || x >= 65504 && x <= 65510;
}
function isWide(x) {
  return x >= 4352 && x <= 4447 || x === 8986 || x === 8987 || x === 9001 || x === 9002 || x >= 9193 && x <= 9196 || x === 9200 || x === 9203 || x === 9725 || x === 9726 || x === 9748 || x === 9749 || x >= 9776 && x <= 9783 || x >= 9800 && x <= 9811 || x === 9855 || x >= 9866 && x <= 9871 || x === 9875 || x === 9889 || x === 9898 || x === 9899 || x === 9917 || x === 9918 || x === 9924 || x === 9925 || x === 9934 || x === 9940 || x === 9962 || x === 9970 || x === 9971 || x === 9973 || x === 9978 || x === 9981 || x === 9989 || x === 9994 || x === 9995 || x === 10024 || x === 10060 || x === 10062 || x >= 10067 && x <= 10069 || x === 10071 || x >= 10133 && x <= 10135 || x === 10160 || x === 10175 || x === 11035 || x === 11036 || x === 11088 || x === 11093 || x >= 11904 && x <= 11929 || x >= 11931 && x <= 12019 || x >= 12032 && x <= 12245 || x >= 12272 && x <= 12287 || x >= 12289 && x <= 12350 || x >= 12353 && x <= 12438 || x >= 12441 && x <= 12543 || x >= 12549 && x <= 12591 || x >= 12593 && x <= 12686 || x >= 12688 && x <= 12773 || x >= 12783 && x <= 12830 || x >= 12832 && x <= 12871 || x >= 12880 && x <= 42124 || x >= 42128 && x <= 42182 || x >= 43360 && x <= 43388 || x >= 44032 && x <= 55203 || x >= 63744 && x <= 64255 || x >= 65040 && x <= 65049 || x >= 65072 && x <= 65106 || x >= 65108 && x <= 65126 || x >= 65128 && x <= 65131 || x >= 94176 && x <= 94180 || x >= 94192 && x <= 94198 || x >= 94208 && x <= 101589 || x >= 101631 && x <= 101662 || x >= 101760 && x <= 101874 || x >= 110576 && x <= 110579 || x >= 110581 && x <= 110587 || x === 110589 || x === 110590 || x >= 110592 && x <= 110882 || x === 110898 || x >= 110928 && x <= 110930 || x === 110933 || x >= 110948 && x <= 110951 || x >= 110960 && x <= 111355 || x >= 119552 && x <= 119638 || x >= 119648 && x <= 119670 || x === 126980 || x === 127183 || x === 127374 || x >= 127377 && x <= 127386 || x >= 127488 && x <= 127490 || x >= 127504 && x <= 127547 || x >= 127552 && x <= 127560 || x === 127568 || x === 127569 || x >= 127584 && x <= 127589 || x >= 127744 && x <= 127776 || x >= 127789 && x <= 127797 || x >= 127799 && x <= 127868 || x >= 127870 && x <= 127891 || x >= 127904 && x <= 127946 || x >= 127951 && x <= 127955 || x >= 127968 && x <= 127984 || x === 127988 || x >= 127992 && x <= 128062 || x === 128064 || x >= 128066 && x <= 128252 || x >= 128255 && x <= 128317 || x >= 128331 && x <= 128334 || x >= 128336 && x <= 128359 || x === 128378 || x === 128405 || x === 128406 || x === 128420 || x >= 128507 && x <= 128591 || x >= 128640 && x <= 128709 || x === 128716 || x >= 128720 && x <= 128722 || x >= 128725 && x <= 128728 || x >= 128732 && x <= 128735 || x === 128747 || x === 128748 || x >= 128756 && x <= 128764 || x >= 128992 && x <= 129003 || x === 129008 || x >= 129292 && x <= 129338 || x >= 129340 && x <= 129349 || x >= 129351 && x <= 129535 || x >= 129648 && x <= 129660 || x >= 129664 && x <= 129674 || x >= 129678 && x <= 129734 || x === 129736 || x >= 129741 && x <= 129756 || x >= 129759 && x <= 129770 || x >= 129775 && x <= 129784 || x >= 131072 && x <= 196605 || x >= 196608 && x <= 262141;
}
function validate$2(codePoint) {
  if (!Number.isSafeInteger(codePoint)) {
    throw new TypeError(`Expected a code point, got \`${typeof codePoint}\`.`);
  }
}
function eastAsianWidth(codePoint, { ambiguousAsWide = false } = {}) {
  validate$2(codePoint);
  if (isFullWidth(codePoint) || isWide(codePoint) || ambiguousAsWide && isAmbiguous(codePoint)) {
    return 2;
  }
  return 1;
}
function stringWidth(string2, options2 = {}) {
  if (typeof string2 !== "string" || string2.length === 0) {
    return 0;
  }
  const {
    ambiguousIsNarrow = true,
    countAnsiEscapeCodes = false
  } = options2;
  if (!countAnsiEscapeCodes) {
    string2 = stripAnsi(string2);
  }
  if (string2.length === 0) {
    return 0;
  }
  let width = 0;
  const eastAsianWidthOptions = { ambiguousAsWide: !ambiguousIsNarrow };
  for (const { segment: character } of segmenter.segment(string2)) {
    const codePoint = character.codePointAt(0);
    if (codePoint <= 31 || codePoint >= 127 && codePoint <= 159) {
      continue;
    }
    if (codePoint >= 8203 && codePoint <= 8207 || codePoint === 65279) {
      continue;
    }
    if (codePoint >= 768 && codePoint <= 879 || codePoint >= 6832 && codePoint <= 6911 || codePoint >= 7616 && codePoint <= 7679 || codePoint >= 8400 && codePoint <= 8447 || codePoint >= 65056 && codePoint <= 65071) {
      continue;
    }
    if (codePoint >= 55296 && codePoint <= 57343) {
      continue;
    }
    if (codePoint >= 65024 && codePoint <= 65039) {
      continue;
    }
    if (defaultIgnorableCodePointRegex.test(character)) {
      continue;
    }
    if (emojiRegex$2().test(character)) {
      width += 2;
      continue;
    }
    width += eastAsianWidth(codePoint, eastAsianWidthOptions);
  }
  return width;
}
function assembleStyles() {
  const codes = /* @__PURE__ */ new Map();
  for (const [groupName, group] of Object.entries(styles)) {
    for (const [styleName, style] of Object.entries(group)) {
      styles[styleName] = {
        open: `\x1B[${style[0]}m`,
        close: `\x1B[${style[1]}m`
      };
      group[styleName] = styles[styleName];
      codes.set(style[0], style[1]);
    }
    Object.defineProperty(styles, groupName, {
      value: group,
      enumerable: false
    });
  }
  Object.defineProperty(styles, "codes", {
    value: codes,
    enumerable: false
  });
  styles.color.close = "\x1B[39m";
  styles.bgColor.close = "\x1B[49m";
  styles.color.ansi = wrapAnsi16();
  styles.color.ansi256 = wrapAnsi256();
  styles.color.ansi16m = wrapAnsi16m();
  styles.bgColor.ansi = wrapAnsi16(ANSI_BACKGROUND_OFFSET);
  styles.bgColor.ansi256 = wrapAnsi256(ANSI_BACKGROUND_OFFSET);
  styles.bgColor.ansi16m = wrapAnsi16m(ANSI_BACKGROUND_OFFSET);
  Object.defineProperties(styles, {
    rgbToAnsi256: {
      value(red, green, blue) {
        if (red === green && green === blue) {
          if (red < 8) {
            return 16;
          }
          if (red > 248) {
            return 231;
          }
          return Math.round((red - 8) / 247 * 24) + 232;
        }
        return 16 + 36 * Math.round(red / 255 * 5) + 6 * Math.round(green / 255 * 5) + Math.round(blue / 255 * 5);
      },
      enumerable: false
    },
    hexToRgb: {
      value(hex) {
        const matches = /[a-f\d]{6}|[a-f\d]{3}/i.exec(hex.toString(16));
        if (!matches) {
          return [0, 0, 0];
        }
        let [colorString] = matches;
        if (colorString.length === 3) {
          colorString = [...colorString].map((character) => character + character).join("");
        }
        const integer2 = Number.parseInt(colorString, 16);
        return [
          integer2 >> 16 & 255,
          integer2 >> 8 & 255,
          integer2 & 255
        ];
      },
      enumerable: false
    },
    hexToAnsi256: {
      value: (hex) => styles.rgbToAnsi256(...styles.hexToRgb(hex)),
      enumerable: false
    },
    ansi256ToAnsi: {
      value(code2) {
        if (code2 < 8) {
          return 30 + code2;
        }
        if (code2 < 16) {
          return 90 + (code2 - 8);
        }
        let red;
        let green;
        let blue;
        if (code2 >= 232) {
          red = ((code2 - 232) * 10 + 8) / 255;
          green = red;
          blue = red;
        } else {
          code2 -= 16;
          const remainder = code2 % 36;
          red = Math.floor(code2 / 36) / 5;
          green = Math.floor(remainder / 6) / 5;
          blue = remainder % 6 / 5;
        }
        const value = Math.max(red, green, blue) * 2;
        if (value === 0) {
          return 30;
        }
        let result = 30 + (Math.round(blue) << 2 | Math.round(green) << 1 | Math.round(red));
        if (value === 2) {
          result += 60;
        }
        return result;
      },
      enumerable: false
    },
    rgbToAnsi: {
      value: (red, green, blue) => styles.ansi256ToAnsi(styles.rgbToAnsi256(red, green, blue)),
      enumerable: false
    },
    hexToAnsi: {
      value: (hex) => styles.ansi256ToAnsi(styles.hexToAnsi256(hex)),
      enumerable: false
    }
  });
  return styles;
}
function wrapAnsi(string2, columns, options2) {
  return String(string2).normalize().replaceAll("\r\n", "\n").split("\n").map((line) => exec(line, columns, options2)).join("\n");
}
function ui(opts) {
  return cliui(opts, {
    stringWidth,
    stripAnsi,
    wrap: wrapAnsi
  });
}
function escalade(start, callback) {
  let dir = resolve$2(".", start);
  let tmp, stats = statSync(dir);
  if (!stats.isDirectory()) {
    dir = dirname(dir);
  }
  while (true) {
    tmp = callback(dir, readdirSync(dir));
    if (tmp) return resolve$2(dir, tmp);
    dir = dirname(tmp = dir);
    if (tmp === dir) break;
  }
}
function camelCase(str) {
  const isCamelCase = str !== str.toLowerCase() && str !== str.toUpperCase();
  if (!isCamelCase) {
    str = str.toLowerCase();
  }
  if (str.indexOf("-") === -1 && str.indexOf("_") === -1) {
    return str;
  } else {
    let camelcase = "";
    let nextChrUpper = false;
    const leadingHyphens = str.match(/^-+/);
    for (let i = leadingHyphens ? leadingHyphens[0].length : 0; i < str.length; i++) {
      let chr = str.charAt(i);
      if (nextChrUpper) {
        nextChrUpper = false;
        chr = chr.toUpperCase();
      }
      if (i !== 0 && (chr === "-" || chr === "_")) {
        nextChrUpper = true;
      } else if (chr !== "-" && chr !== "_") {
        camelcase += chr;
      }
    }
    return camelcase;
  }
}
function decamelize(str, joinString) {
  const lowercase2 = str.toLowerCase();
  joinString = joinString || "-";
  let notCamelcase = "";
  for (let i = 0; i < str.length; i++) {
    const chrLower = lowercase2.charAt(i);
    const chrString = str.charAt(i);
    if (chrLower !== chrString && i > 0) {
      notCamelcase += `${joinString}${lowercase2.charAt(i)}`;
    } else {
      notCamelcase += chrString;
    }
  }
  return notCamelcase;
}
function looksLikeNumber(x) {
  if (x === null || x === void 0)
    return false;
  if (typeof x === "number")
    return true;
  if (/^0x[0-9a-f]+$/i.test(x))
    return true;
  if (/^0[^.]/.test(x))
    return false;
  return /^[-]?(?:\d+(?:\.\d*)?|\.\d+)(e[-+]?\d+)?$/.test(x);
}
function tokenizeArgString(argString) {
  if (Array.isArray(argString)) {
    return argString.map((e) => typeof e !== "string" ? e + "" : e);
  }
  argString = argString.trim();
  let i = 0;
  let prevC = null;
  let c = null;
  let opening = null;
  const args2 = [];
  for (let ii = 0; ii < argString.length; ii++) {
    prevC = c;
    c = argString.charAt(ii);
    if (c === " " && !opening) {
      if (!(prevC === " ")) {
        i++;
      }
      continue;
    }
    if (c === opening) {
      opening = null;
    } else if ((c === "'" || c === '"') && !opening) {
      opening = c;
    }
    if (!args2[i])
      args2[i] = "";
    args2[i] += c;
  }
  return args2;
}
function combineAliases(aliases) {
  const aliasArrays = [];
  const combined = /* @__PURE__ */ Object.create(null);
  let change = true;
  Object.keys(aliases).forEach(function(key) {
    aliasArrays.push([].concat(aliases[key], key));
  });
  while (change) {
    change = false;
    for (let i = 0; i < aliasArrays.length; i++) {
      for (let ii = i + 1; ii < aliasArrays.length; ii++) {
        const intersect = aliasArrays[i].filter(function(v) {
          return aliasArrays[ii].indexOf(v) !== -1;
        });
        if (intersect.length) {
          aliasArrays[i] = aliasArrays[i].concat(aliasArrays[ii]);
          aliasArrays.splice(ii, 1);
          change = true;
          break;
        }
      }
    }
  }
  aliasArrays.forEach(function(aliasArray) {
    aliasArray = aliasArray.filter(function(v, i, self2) {
      return self2.indexOf(v) === i;
    });
    const lastAlias = aliasArray.pop();
    if (lastAlias !== void 0 && typeof lastAlias === "string") {
      combined[lastAlias] = aliasArray;
    }
  });
  return combined;
}
function increment(orig) {
  return orig !== void 0 ? orig + 1 : 1;
}
function sanitizeKey(key) {
  if (key === "__proto__")
    return "___proto___";
  return key;
}
function stripQuotes(val) {
  return typeof val === "string" && (val[0] === "'" || val[0] === '"') && val[val.length - 1] === val[0] ? val.substring(1, val.length - 1) : val;
}
function getProcessArgvBinIndex() {
  if (isBundledElectronApp())
    return 0;
  return 1;
}
function isBundledElectronApp() {
  return isElectronApp() && !process.defaultApp;
}
function isElectronApp() {
  return !!process.versions.electron;
}
function hideBin(argv) {
  return argv.slice(getProcessArgvBinIndex() + 1);
}
function getProcessArgvBin() {
  return process.argv[getProcessArgvBinIndex()];
}
function y18n$1(opts, _shim) {
  shim$2 = _shim;
  const y18n2 = new Y18N(opts);
  return {
    __: y18n2.__.bind(y18n2),
    __n: y18n2.__n.bind(y18n2),
    setLocale: y18n2.setLocale.bind(y18n2),
    getLocale: y18n2.getLocale.bind(y18n2),
    updateLocale: y18n2.updateLocale.bind(y18n2),
    locale: y18n2.locale
  };
}
function requireGetCallerFile() {
  if (hasRequiredGetCallerFile) return getCallerFile$1;
  hasRequiredGetCallerFile = 1;
  getCallerFile$1 = function getCallerFile2(position) {
    if (position === void 0) {
      position = 2;
    }
    if (position >= Error.stackTraceLimit) {
      throw new TypeError("getCallerFile(position) requires position be less then Error.stackTraceLimit but position was: `" + position + "` and Error.stackTraceLimit was: `" + Error.stackTraceLimit + "`");
    }
    var oldPrepareStackTrace = Error.prepareStackTrace;
    Error.prepareStackTrace = function(_, stack2) {
      return stack2;
    };
    var stack = new Error().stack;
    Error.prepareStackTrace = oldPrepareStackTrace;
    if (stack !== null && typeof stack === "object") {
      return stack[position] ? stack[position].getFileName() : void 0;
    }
  };
  return getCallerFile$1;
}
function assertNotStrictEqual(actual, expected, shim2, message) {
  shim2.assert.notStrictEqual(actual, expected, message);
}
function assertSingleKey(actual, shim2) {
  shim2.assert.strictEqual(typeof actual, "string");
}
function objectKeys(object2) {
  return Object.keys(object2);
}
function isPromise$1(maybePromise) {
  return !!maybePromise && !!maybePromise.then && typeof maybePromise.then === "function";
}
function parseCommand(cmd) {
  const extraSpacesStrippedCommand = cmd.replace(/\s{2,}/g, " ");
  const splitCommand = extraSpacesStrippedCommand.split(/\s+(?![^[]*]|[^<]*>)/);
  const bregex = /\.*[\][<>]/g;
  const firstCommand = splitCommand.shift();
  if (!firstCommand)
    throw new Error(`No command found in: ${cmd}`);
  const parsedCommand = {
    cmd: firstCommand.replace(bregex, ""),
    demanded: [],
    optional: []
  };
  splitCommand.forEach((cmd2, i) => {
    let variadic2 = false;
    cmd2 = cmd2.replace(/\s/g, "");
    if (/\.+[\]>]/.test(cmd2) && i === splitCommand.length - 1)
      variadic2 = true;
    if (/^\[/.test(cmd2)) {
      parsedCommand.optional.push({
        cmd: cmd2.replace(bregex, "").split("|"),
        variadic: variadic2
      });
    } else {
      parsedCommand.demanded.push({
        cmd: cmd2.replace(bregex, "").split("|"),
        variadic: variadic2
      });
    }
  });
  return parsedCommand;
}
function argsert(arg1, arg2, arg3) {
  function parseArgs() {
    return typeof arg1 === "object" ? [{ demanded: [], optional: [] }, arg1, arg2] : [
      parseCommand(`cmd ${arg1}`),
      arg2,
      arg3
    ];
  }
  try {
    let position = 0;
    const [parsed, callerArguments, _length2] = parseArgs();
    const args2 = [].slice.call(callerArguments);
    while (args2.length && args2[args2.length - 1] === void 0)
      args2.pop();
    const length = _length2 || args2.length;
    if (length < parsed.demanded.length) {
      throw new YError(`Not enough arguments provided. Expected ${parsed.demanded.length} but received ${args2.length}.`);
    }
    const totalCommands = parsed.demanded.length + parsed.optional.length;
    if (length > totalCommands) {
      throw new YError(`Too many arguments provided. Expected max ${totalCommands} but received ${length}.`);
    }
    parsed.demanded.forEach((demanded) => {
      const arg = args2.shift();
      const observedType = guessType(arg);
      const matchingTypes = demanded.cmd.filter((type2) => type2 === observedType || type2 === "*");
      if (matchingTypes.length === 0)
        argumentTypeError(observedType, demanded.cmd, position);
      position += 1;
    });
    parsed.optional.forEach((optional2) => {
      if (args2.length === 0)
        return;
      const arg = args2.shift();
      const observedType = guessType(arg);
      const matchingTypes = optional2.cmd.filter((type2) => type2 === observedType || type2 === "*");
      if (matchingTypes.length === 0)
        argumentTypeError(observedType, optional2.cmd, position);
      position += 1;
    });
  } catch (err) {
    console.warn(err.stack);
  }
}
function guessType(arg) {
  if (Array.isArray(arg)) {
    return "array";
  } else if (arg === null) {
    return "null";
  }
  return typeof arg;
}
function argumentTypeError(observedType, allowedTypes, position) {
  throw new YError(`Invalid ${positionName[position] || "manyith"} argument. Expected ${allowedTypes.join(" or ")} but received ${observedType}.`);
}
function commandMiddlewareFactory(commandMiddleware) {
  if (!commandMiddleware)
    return [];
  return commandMiddleware.map((middleware) => {
    middleware.applyBeforeValidation = false;
    return middleware;
  });
}
function applyMiddleware(argv, yargs, middlewares, beforeValidation) {
  return middlewares.reduce((acc, middleware) => {
    if (middleware.applyBeforeValidation !== beforeValidation) {
      return acc;
    }
    if (middleware.mutates) {
      if (middleware.applied)
        return acc;
      middleware.applied = true;
    }
    if (isPromise$1(acc)) {
      return acc.then((initialObj) => Promise.all([initialObj, middleware(initialObj, yargs)])).then(([initialObj, middlewareObj]) => Object.assign(initialObj, middlewareObj));
    } else {
      const result = middleware(acc, yargs);
      return isPromise$1(result) ? result.then((middlewareObj) => Object.assign(acc, middlewareObj)) : Object.assign(acc, result);
    }
  }, argv);
}
function maybeAsyncResult(getResult2, resultHandler, errorHandler = (err) => {
  throw err;
}) {
  try {
    const result = isFunction$1(getResult2) ? getResult2() : getResult2;
    return isPromise$1(result) ? result.then((result2) => resultHandler(result2)) : resultHandler(result);
  } catch (err) {
    return errorHandler(err);
  }
}
function isFunction$1(arg) {
  return typeof arg === "function";
}
function command(usage2, validation2, globalMiddleware, shim2) {
  return new CommandInstance(usage2, validation2, globalMiddleware, shim2);
}
function isCommandBuilderDefinition(builder) {
  return typeof builder === "object" && !!builder.builder && typeof builder.handler === "function";
}
function isCommandAndAliases(cmd) {
  return cmd.every((c) => typeof c === "string");
}
function isCommandBuilderCallback(builder) {
  return typeof builder === "function";
}
function isCommandBuilderOptionDefinitions(builder) {
  return typeof builder === "object";
}
function isCommandHandlerDefinition(cmd) {
  return typeof cmd === "object" && !Array.isArray(cmd);
}
function objFilter(original = {}, filter2 = () => true) {
  const obj = {};
  objectKeys(original).forEach((key) => {
    if (filter2(key, original[key])) {
      obj[key] = original[key];
    }
  });
  return obj;
}
function setBlocking(blocking) {
  if (typeof process === "undefined")
    return;
  [process.stdout, process.stderr].forEach((_stream) => {
    const stream3 = _stream;
    if (stream3._handle && stream3.isTTY && typeof stream3._handle.setBlocking === "function") {
      stream3._handle.setBlocking(blocking);
    }
  });
}
function isBoolean(fail) {
  return typeof fail === "boolean";
}
function usage(yargs, shim2) {
  const __ = shim2.y18n.__;
  const self2 = {};
  const fails2 = [];
  self2.failFn = function failFn(f) {
    fails2.push(f);
  };
  let failMessage = null;
  let globalFailMessage = null;
  let showHelpOnFail = true;
  self2.showHelpOnFail = function showHelpOnFailFn(arg1 = true, arg2) {
    const [enabled, message] = typeof arg1 === "string" ? [true, arg1] : [arg1, arg2];
    if (yargs.getInternalMethods().isGlobalContext()) {
      globalFailMessage = message;
    }
    failMessage = message;
    showHelpOnFail = enabled;
    return self2;
  };
  let failureOutput = false;
  self2.fail = function fail(msg, err) {
    const logger2 = yargs.getInternalMethods().getLoggerInstance();
    if (fails2.length) {
      for (let i = fails2.length - 1; i >= 0; --i) {
        const fail2 = fails2[i];
        if (isBoolean(fail2)) {
          if (err)
            throw err;
          else if (msg)
            throw Error(msg);
        } else {
          fail2(msg, err, self2);
        }
      }
    } else {
      if (yargs.getExitProcess())
        setBlocking(true);
      if (!failureOutput) {
        failureOutput = true;
        if (showHelpOnFail) {
          yargs.showHelp("error");
          logger2.error();
        }
        if (msg || err)
          logger2.error(msg || err);
        const globalOrCommandFailMessage = failMessage || globalFailMessage;
        if (globalOrCommandFailMessage) {
          if (msg || err)
            logger2.error("");
          logger2.error(globalOrCommandFailMessage);
        }
      }
      err = err || new YError(msg);
      if (yargs.getExitProcess()) {
        return yargs.exit(1);
      } else if (yargs.getInternalMethods().hasParseCallback()) {
        return yargs.exit(1, err);
      } else {
        throw err;
      }
    }
  };
  let usages = [];
  let usageDisabled = false;
  self2.usage = (msg, description2) => {
    if (msg === null) {
      usageDisabled = true;
      usages = [];
      return self2;
    }
    usageDisabled = false;
    usages.push([msg, description2 || ""]);
    return self2;
  };
  self2.getUsage = () => {
    return usages;
  };
  self2.getUsageDisabled = () => {
    return usageDisabled;
  };
  self2.getPositionalGroupName = () => {
    return __("Positionals:");
  };
  let examples = [];
  self2.example = (cmd, description2) => {
    examples.push([cmd, description2 || ""]);
  };
  let commands = [];
  self2.command = function command2(cmd, description2, isDefault, aliases, deprecated = false) {
    if (isDefault) {
      commands = commands.map((cmdArray) => {
        cmdArray[2] = false;
        return cmdArray;
      });
    }
    commands.push([cmd, description2 || "", isDefault, aliases, deprecated]);
  };
  self2.getCommands = () => commands;
  let descriptions = {};
  self2.describe = function describe(keyOrKeys, desc) {
    if (Array.isArray(keyOrKeys)) {
      keyOrKeys.forEach((k) => {
        self2.describe(k, desc);
      });
    } else if (typeof keyOrKeys === "object") {
      Object.keys(keyOrKeys).forEach((k) => {
        self2.describe(k, keyOrKeys[k]);
      });
    } else {
      descriptions[keyOrKeys] = desc;
    }
  };
  self2.getDescriptions = () => descriptions;
  let epilogs = [];
  self2.epilog = (msg) => {
    epilogs.push(msg);
  };
  let wrapSet = false;
  let wrap;
  self2.wrap = (cols) => {
    wrapSet = true;
    wrap = cols;
  };
  self2.getWrap = () => {
    if (shim2.getEnv("YARGS_DISABLE_WRAP")) {
      return null;
    }
    if (!wrapSet) {
      wrap = windowWidth();
      wrapSet = true;
    }
    return wrap;
  };
  const deferY18nLookupPrefix = "__yargsString__:";
  self2.deferY18nLookup = (str) => deferY18nLookupPrefix + str;
  self2.help = function help() {
    if (cachedHelpMessage)
      return cachedHelpMessage;
    normalizeAliases();
    const base$0 = yargs.customScriptName ? yargs.$0 : shim2.path.basename(yargs.$0);
    const demandedOptions = yargs.getDemandedOptions();
    const demandedCommands = yargs.getDemandedCommands();
    const deprecatedOptions = yargs.getDeprecatedOptions();
    const groups = yargs.getGroups();
    const options2 = yargs.getOptions();
    let keys2 = [];
    keys2 = keys2.concat(Object.keys(descriptions));
    keys2 = keys2.concat(Object.keys(demandedOptions));
    keys2 = keys2.concat(Object.keys(demandedCommands));
    keys2 = keys2.concat(Object.keys(options2.default));
    keys2 = keys2.filter(filterHiddenOptions);
    keys2 = Object.keys(keys2.reduce((acc, key) => {
      if (key !== "_")
        acc[key] = true;
      return acc;
    }, {}));
    const theWrap = self2.getWrap();
    const ui2 = shim2.cliui({
      width: theWrap,
      wrap: !!theWrap
    });
    if (!usageDisabled) {
      if (usages.length) {
        usages.forEach((usage2) => {
          ui2.div({ text: `${usage2[0].replace(/\$0/g, base$0)}` });
          if (usage2[1]) {
            ui2.div({ text: `${usage2[1]}`, padding: [1, 0, 0, 0] });
          }
        });
        ui2.div();
      } else if (commands.length) {
        let u = null;
        if (demandedCommands._) {
          u = `${base$0} <${__("command")}>
`;
        } else {
          u = `${base$0} [${__("command")}]
`;
        }
        ui2.div(`${u}`);
      }
    }
    if (commands.length > 1 || commands.length === 1 && !commands[0][2]) {
      ui2.div(__("Commands:"));
      const context2 = yargs.getInternalMethods().getContext();
      const parentCommands = context2.commands.length ? `${context2.commands.join(" ")} ` : "";
      if (yargs.getInternalMethods().getParserConfiguration()["sort-commands"] === true) {
        commands = commands.sort((a, b) => a[0].localeCompare(b[0]));
      }
      const prefix = base$0 ? `${base$0} ` : "";
      commands.forEach((command2) => {
        const commandString = `${prefix}${parentCommands}${command2[0].replace(/^\$0 ?/, "")}`;
        ui2.span({
          text: commandString,
          padding: [0, 2, 0, 2],
          width: maxWidth(commands, theWrap, `${base$0}${parentCommands}`) + 4
        }, { text: command2[1] });
        const hints = [];
        if (command2[2])
          hints.push(`[${__("default")}]`);
        if (command2[3] && command2[3].length) {
          hints.push(`[${__("aliases:")} ${command2[3].join(", ")}]`);
        }
        if (command2[4]) {
          if (typeof command2[4] === "string") {
            hints.push(`[${__("deprecated: %s", command2[4])}]`);
          } else {
            hints.push(`[${__("deprecated")}]`);
          }
        }
        if (hints.length) {
          ui2.div({
            text: hints.join(" "),
            padding: [0, 0, 0, 2],
            align: "right"
          });
        } else {
          ui2.div();
        }
      });
      ui2.div();
    }
    const aliasKeys = (Object.keys(options2.alias) || []).concat(Object.keys(yargs.parsed.newAliases) || []);
    keys2 = keys2.filter((key) => !yargs.parsed.newAliases[key] && aliasKeys.every((alias) => (options2.alias[alias] || []).indexOf(key) === -1));
    const defaultGroup = __("Options:");
    if (!groups[defaultGroup])
      groups[defaultGroup] = [];
    addUngroupedKeys(keys2, options2.alias, groups, defaultGroup);
    const isLongSwitch = (sw) => /^--/.test(getText$1(sw));
    const displayedGroups = Object.keys(groups).filter((groupName) => groups[groupName].length > 0).map((groupName) => {
      const normalizedKeys = groups[groupName].filter(filterHiddenOptions).map((key) => {
        if (aliasKeys.includes(key))
          return key;
        for (let i = 0, aliasKey; (aliasKey = aliasKeys[i]) !== void 0; i++) {
          if ((options2.alias[aliasKey] || []).includes(key))
            return aliasKey;
        }
        return key;
      });
      return { groupName, normalizedKeys };
    }).filter(({ normalizedKeys }) => normalizedKeys.length > 0).map(({ groupName, normalizedKeys }) => {
      const switches = normalizedKeys.reduce((acc, key) => {
        acc[key] = [key].concat(options2.alias[key] || []).map((sw) => {
          if (groupName === self2.getPositionalGroupName())
            return sw;
          else {
            return (/^[0-9]$/.test(sw) ? options2.boolean.includes(key) ? "-" : "--" : sw.length > 1 ? "--" : "-") + sw;
          }
        }).sort((sw1, sw2) => isLongSwitch(sw1) === isLongSwitch(sw2) ? 0 : isLongSwitch(sw1) ? 1 : -1).join(", ");
        return acc;
      }, {});
      return { groupName, normalizedKeys, switches };
    });
    const shortSwitchesUsed = displayedGroups.filter(({ groupName }) => groupName !== self2.getPositionalGroupName()).some(({ normalizedKeys, switches }) => !normalizedKeys.every((key) => isLongSwitch(switches[key])));
    if (shortSwitchesUsed) {
      displayedGroups.filter(({ groupName }) => groupName !== self2.getPositionalGroupName()).forEach(({ normalizedKeys, switches }) => {
        normalizedKeys.forEach((key) => {
          if (isLongSwitch(switches[key])) {
            switches[key] = addIndentation(switches[key], "-x, ".length);
          }
        });
      });
    }
    displayedGroups.forEach(({ groupName, normalizedKeys, switches }) => {
      ui2.div(groupName);
      normalizedKeys.forEach((key) => {
        const kswitch = switches[key];
        let desc = descriptions[key] || "";
        let type2 = null;
        if (desc.includes(deferY18nLookupPrefix))
          desc = __(desc.substring(deferY18nLookupPrefix.length));
        if (options2.boolean.includes(key))
          type2 = `[${__("boolean")}]`;
        if (options2.count.includes(key))
          type2 = `[${__("count")}]`;
        if (options2.string.includes(key))
          type2 = `[${__("string")}]`;
        if (options2.normalize.includes(key))
          type2 = `[${__("string")}]`;
        if (options2.array.includes(key))
          type2 = `[${__("array")}]`;
        if (options2.number.includes(key))
          type2 = `[${__("number")}]`;
        const deprecatedExtra = (deprecated) => typeof deprecated === "string" ? `[${__("deprecated: %s", deprecated)}]` : `[${__("deprecated")}]`;
        const extra = [
          key in deprecatedOptions ? deprecatedExtra(deprecatedOptions[key]) : null,
          type2,
          key in demandedOptions ? `[${__("required")}]` : null,
          options2.choices && options2.choices[key] ? `[${__("choices:")} ${self2.stringifiedValues(options2.choices[key])}]` : null,
          defaultString(options2.default[key], options2.defaultDescription[key])
        ].filter(Boolean).join(" ");
        ui2.span({
          text: getText$1(kswitch),
          padding: [0, 2, 0, 2 + getIndentation(kswitch)],
          width: maxWidth(switches, theWrap) + 4
        }, desc);
        const shouldHideOptionExtras = yargs.getInternalMethods().getUsageConfiguration()["hide-types"] === true;
        if (extra && !shouldHideOptionExtras)
          ui2.div({ text: extra, padding: [0, 0, 0, 2], align: "right" });
        else
          ui2.div();
      });
      ui2.div();
    });
    if (examples.length) {
      ui2.div(__("Examples:"));
      examples.forEach((example) => {
        example[0] = example[0].replace(/\$0/g, base$0);
      });
      examples.forEach((example) => {
        if (example[1] === "") {
          ui2.div({
            text: example[0],
            padding: [0, 2, 0, 2]
          });
        } else {
          ui2.div({
            text: example[0],
            padding: [0, 2, 0, 2],
            width: maxWidth(examples, theWrap) + 4
          }, {
            text: example[1]
          });
        }
      });
      ui2.div();
    }
    if (epilogs.length > 0) {
      const e = epilogs.map((epilog) => epilog.replace(/\$0/g, base$0)).join("\n");
      ui2.div(`${e}
`);
    }
    return ui2.toString().replace(/\s*$/, "");
  };
  function maxWidth(table, theWrap, modifier) {
    let width = 0;
    if (!Array.isArray(table)) {
      table = Object.values(table).map((v) => [v]);
    }
    table.forEach((v) => {
      width = Math.max(shim2.stringWidth(modifier ? `${modifier} ${getText$1(v[0])}` : getText$1(v[0])) + getIndentation(v[0]), width);
    });
    if (theWrap)
      width = Math.min(width, parseInt((theWrap * 0.5).toString(), 10));
    return width;
  }
  function normalizeAliases() {
    const demandedOptions = yargs.getDemandedOptions();
    const options2 = yargs.getOptions();
    (Object.keys(options2.alias) || []).forEach((key) => {
      options2.alias[key].forEach((alias) => {
        if (descriptions[alias])
          self2.describe(key, descriptions[alias]);
        if (alias in demandedOptions)
          yargs.demandOption(key, demandedOptions[alias]);
        if (options2.boolean.includes(alias))
          yargs.boolean(key);
        if (options2.count.includes(alias))
          yargs.count(key);
        if (options2.string.includes(alias))
          yargs.string(key);
        if (options2.normalize.includes(alias))
          yargs.normalize(key);
        if (options2.array.includes(alias))
          yargs.array(key);
        if (options2.number.includes(alias))
          yargs.number(key);
      });
    });
  }
  let cachedHelpMessage;
  self2.cacheHelpMessage = function() {
    cachedHelpMessage = this.help();
  };
  self2.clearCachedHelpMessage = function() {
    cachedHelpMessage = void 0;
  };
  self2.hasCachedHelpMessage = function() {
    return !!cachedHelpMessage;
  };
  function addUngroupedKeys(keys2, aliases, groups, defaultGroup) {
    let groupedKeys = [];
    let toCheck = null;
    Object.keys(groups).forEach((group) => {
      groupedKeys = groupedKeys.concat(groups[group]);
    });
    keys2.forEach((key) => {
      toCheck = [key].concat(aliases[key]);
      if (!toCheck.some((k) => groupedKeys.indexOf(k) !== -1)) {
        groups[defaultGroup].push(key);
      }
    });
    return groupedKeys;
  }
  function filterHiddenOptions(key) {
    return yargs.getOptions().hiddenOptions.indexOf(key) < 0 || yargs.parsed.argv[yargs.getOptions().showHiddenOpt];
  }
  self2.showHelp = (level) => {
    const logger2 = yargs.getInternalMethods().getLoggerInstance();
    if (!level)
      level = "error";
    const emit = typeof level === "function" ? level : logger2[level];
    emit(self2.help());
  };
  self2.functionDescription = (fn) => {
    const description2 = fn.name ? shim2.Parser.decamelize(fn.name, "-") : __("generated-value");
    return ["(", description2, ")"].join("");
  };
  self2.stringifiedValues = function stringifiedValues(values, separator) {
    let string2 = "";
    const sep = separator || ", ";
    const array2 = [].concat(values);
    if (!values || !array2.length)
      return string2;
    array2.forEach((value) => {
      if (string2.length)
        string2 += sep;
      string2 += JSON.stringify(value);
    });
    return string2;
  };
  function defaultString(value, defaultDescription) {
    let string2 = `[${__("default:")} `;
    if (value === void 0 && !defaultDescription)
      return null;
    if (defaultDescription) {
      string2 += defaultDescription;
    } else {
      switch (typeof value) {
        case "string":
          string2 += `"${value}"`;
          break;
        case "object":
          string2 += JSON.stringify(value);
          break;
        default:
          string2 += value;
      }
    }
    return `${string2}]`;
  }
  function windowWidth() {
    const maxWidth2 = 80;
    if (shim2.process.stdColumns) {
      return Math.min(maxWidth2, shim2.process.stdColumns);
    } else {
      return maxWidth2;
    }
  }
  let version3 = null;
  self2.version = (ver) => {
    version3 = ver;
  };
  self2.showVersion = (level) => {
    const logger2 = yargs.getInternalMethods().getLoggerInstance();
    if (!level)
      level = "error";
    const emit = typeof level === "function" ? level : logger2[level];
    emit(version3);
  };
  self2.reset = function reset32(localLookup) {
    failMessage = null;
    failureOutput = false;
    usages = [];
    usageDisabled = false;
    epilogs = [];
    examples = [];
    commands = [];
    descriptions = objFilter(descriptions, (k) => !localLookup[k]);
    return self2;
  };
  const frozens = [];
  self2.freeze = function freeze() {
    frozens.push({
      failMessage,
      failureOutput,
      usages,
      usageDisabled,
      epilogs,
      examples,
      commands,
      descriptions
    });
  };
  self2.unfreeze = function unfreeze(defaultCommand = false) {
    const frozen = frozens.pop();
    if (!frozen)
      return;
    if (defaultCommand) {
      descriptions = { ...frozen.descriptions, ...descriptions };
      commands = [...frozen.commands, ...commands];
      usages = [...frozen.usages, ...usages];
      examples = [...frozen.examples, ...examples];
      epilogs = [...frozen.epilogs, ...epilogs];
    } else {
      ({
        failMessage,
        failureOutput,
        usages,
        usageDisabled,
        epilogs,
        examples,
        commands,
        descriptions
      } = frozen);
    }
  };
  return self2;
}
function isIndentedText(text) {
  return typeof text === "object";
}
function addIndentation(text, indent) {
  return isIndentedText(text) ? { text: text.text, indentation: text.indentation + indent } : { text, indentation: indent };
}
function getIndentation(text) {
  return isIndentedText(text) ? text.indentation : 0;
}
function getText$1(text) {
  return isIndentedText(text) ? text.text : text;
}
function completion(yargs, usage2, command2, shim2) {
  return new Completion(yargs, usage2, command2, shim2);
}
function isSyncCompletionFunction(completionFunction) {
  return completionFunction.length < 3;
}
function isFallbackCompletionFunction(completionFunction) {
  return completionFunction.length > 3;
}
function levenshtein(a, b) {
  if (a.length === 0)
    return b.length;
  if (b.length === 0)
    return a.length;
  const matrix = [];
  let i;
  for (i = 0; i <= b.length; i++) {
    matrix[i] = [i];
  }
  let j;
  for (j = 0; j <= a.length; j++) {
    matrix[0][j] = j;
  }
  for (i = 1; i <= b.length; i++) {
    for (j = 1; j <= a.length; j++) {
      if (b.charAt(i - 1) === a.charAt(j - 1)) {
        matrix[i][j] = matrix[i - 1][j - 1];
      } else {
        if (i > 1 && j > 1 && b.charAt(i - 2) === a.charAt(j - 1) && b.charAt(i - 1) === a.charAt(j - 2)) {
          matrix[i][j] = matrix[i - 2][j - 2] + 1;
        } else {
          matrix[i][j] = Math.min(matrix[i - 1][j - 1] + 1, Math.min(matrix[i][j - 1] + 1, matrix[i - 1][j] + 1));
        }
      }
    }
  }
  return matrix[b.length][a.length];
}
function validation$3(yargs, usage2, shim2) {
  const __ = shim2.y18n.__;
  const __n = shim2.y18n.__n;
  const self2 = {};
  self2.nonOptionCount = function nonOptionCount(argv) {
    const demandedCommands = yargs.getDemandedCommands();
    const positionalCount = argv._.length + (argv["--"] ? argv["--"].length : 0);
    const _s = positionalCount - yargs.getInternalMethods().getContext().commands.length;
    if (demandedCommands._ && (_s < demandedCommands._.min || _s > demandedCommands._.max)) {
      if (_s < demandedCommands._.min) {
        if (demandedCommands._.minMsg !== void 0) {
          usage2.fail(demandedCommands._.minMsg ? demandedCommands._.minMsg.replace(/\$0/g, _s.toString()).replace(/\$1/, demandedCommands._.min.toString()) : null);
        } else {
          usage2.fail(__n("Not enough non-option arguments: got %s, need at least %s", "Not enough non-option arguments: got %s, need at least %s", _s, _s.toString(), demandedCommands._.min.toString()));
        }
      } else if (_s > demandedCommands._.max) {
        if (demandedCommands._.maxMsg !== void 0) {
          usage2.fail(demandedCommands._.maxMsg ? demandedCommands._.maxMsg.replace(/\$0/g, _s.toString()).replace(/\$1/, demandedCommands._.max.toString()) : null);
        } else {
          usage2.fail(__n("Too many non-option arguments: got %s, maximum of %s", "Too many non-option arguments: got %s, maximum of %s", _s, _s.toString(), demandedCommands._.max.toString()));
        }
      }
    }
  };
  self2.positionalCount = function positionalCount(required2, observed) {
    if (observed < required2) {
      usage2.fail(__n("Not enough non-option arguments: got %s, need at least %s", "Not enough non-option arguments: got %s, need at least %s", observed, observed + "", required2 + ""));
    }
  };
  self2.requiredArguments = function requiredArguments(argv, demandedOptions) {
    let missing = null;
    for (const key of Object.keys(demandedOptions)) {
      if (!Object.prototype.hasOwnProperty.call(argv, key) || typeof argv[key] === "undefined") {
        missing = missing || {};
        missing[key] = demandedOptions[key];
      }
    }
    if (missing) {
      const customMsgs = [];
      for (const key of Object.keys(missing)) {
        const msg = missing[key];
        if (msg && customMsgs.indexOf(msg) < 0) {
          customMsgs.push(msg);
        }
      }
      const customMsg = customMsgs.length ? `
${customMsgs.join("\n")}` : "";
      usage2.fail(__n("Missing required argument: %s", "Missing required arguments: %s", Object.keys(missing).length, Object.keys(missing).join(", ") + customMsg));
    }
  };
  self2.unknownArguments = function unknownArguments(argv, aliases, positionalMap, isDefaultCommand, checkPositionals = true) {
    var _a4;
    const commandKeys = yargs.getInternalMethods().getCommandInstance().getCommands();
    const unknown2 = [];
    const currentContext = yargs.getInternalMethods().getContext();
    Object.keys(argv).forEach((key) => {
      if (!specialKeys.includes(key) && !Object.prototype.hasOwnProperty.call(positionalMap, key) && !Object.prototype.hasOwnProperty.call(yargs.getInternalMethods().getParseContext(), key) && !self2.isValidAndSomeAliasIsNotNew(key, aliases)) {
        unknown2.push(key);
      }
    });
    if (checkPositionals && (currentContext.commands.length > 0 || commandKeys.length > 0 || isDefaultCommand)) {
      argv._.slice(currentContext.commands.length).forEach((key) => {
        if (!commandKeys.includes("" + key)) {
          unknown2.push("" + key);
        }
      });
    }
    if (checkPositionals) {
      const demandedCommands = yargs.getDemandedCommands();
      const maxNonOptDemanded = ((_a4 = demandedCommands._) === null || _a4 === void 0 ? void 0 : _a4.max) || 0;
      const expected = currentContext.commands.length + maxNonOptDemanded;
      if (expected < argv._.length) {
        argv._.slice(expected).forEach((key) => {
          key = String(key);
          if (!currentContext.commands.includes(key) && !unknown2.includes(key)) {
            unknown2.push(key);
          }
        });
      }
    }
    if (unknown2.length) {
      usage2.fail(__n("Unknown argument: %s", "Unknown arguments: %s", unknown2.length, unknown2.map((s) => s.trim() ? s : `"${s}"`).join(", ")));
    }
  };
  self2.unknownCommands = function unknownCommands(argv) {
    const commandKeys = yargs.getInternalMethods().getCommandInstance().getCommands();
    const unknown2 = [];
    const currentContext = yargs.getInternalMethods().getContext();
    if (currentContext.commands.length > 0 || commandKeys.length > 0) {
      argv._.slice(currentContext.commands.length).forEach((key) => {
        if (!commandKeys.includes("" + key)) {
          unknown2.push("" + key);
        }
      });
    }
    if (unknown2.length > 0) {
      usage2.fail(__n("Unknown command: %s", "Unknown commands: %s", unknown2.length, unknown2.join(", ")));
      return true;
    } else {
      return false;
    }
  };
  self2.isValidAndSomeAliasIsNotNew = function isValidAndSomeAliasIsNotNew(key, aliases) {
    if (!Object.prototype.hasOwnProperty.call(aliases, key)) {
      return false;
    }
    const newAliases = yargs.parsed.newAliases;
    return [key, ...aliases[key]].some((a) => !Object.prototype.hasOwnProperty.call(newAliases, a) || !newAliases[key]);
  };
  self2.limitedChoices = function limitedChoices(argv) {
    const options2 = yargs.getOptions();
    const invalid = {};
    if (!Object.keys(options2.choices).length)
      return;
    Object.keys(argv).forEach((key) => {
      if (specialKeys.indexOf(key) === -1 && Object.prototype.hasOwnProperty.call(options2.choices, key)) {
        [].concat(argv[key]).forEach((value) => {
          if (options2.choices[key].indexOf(value) === -1 && value !== void 0) {
            invalid[key] = (invalid[key] || []).concat(value);
          }
        });
      }
    });
    const invalidKeys = Object.keys(invalid);
    if (!invalidKeys.length)
      return;
    let msg = __("Invalid values:");
    invalidKeys.forEach((key) => {
      msg += `
  ${__("Argument: %s, Given: %s, Choices: %s", key, usage2.stringifiedValues(invalid[key]), usage2.stringifiedValues(options2.choices[key]))}`;
    });
    usage2.fail(msg);
  };
  let implied = {};
  self2.implies = function implies(key, value) {
    argsert("<string|object> [array|number|string]", [key, value], arguments.length);
    if (typeof key === "object") {
      Object.keys(key).forEach((k) => {
        self2.implies(k, key[k]);
      });
    } else {
      yargs.global(key);
      if (!implied[key]) {
        implied[key] = [];
      }
      if (Array.isArray(value)) {
        value.forEach((i) => self2.implies(key, i));
      } else {
        assertNotStrictEqual(value, void 0, shim2);
        implied[key].push(value);
      }
    }
  };
  self2.getImplied = function getImplied() {
    return implied;
  };
  function keyExists(argv, val) {
    const num = Number(val);
    val = isNaN(num) ? val : num;
    if (typeof val === "number") {
      val = argv._.length >= val;
    } else if (val.match(/^--no-.+/)) {
      val = val.match(/^--no-(.+)/)[1];
      val = !Object.prototype.hasOwnProperty.call(argv, val);
    } else {
      val = Object.prototype.hasOwnProperty.call(argv, val);
    }
    return val;
  }
  self2.implications = function implications(argv) {
    const implyFail = [];
    Object.keys(implied).forEach((key) => {
      const origKey = key;
      (implied[key] || []).forEach((value) => {
        let key2 = origKey;
        const origValue = value;
        key2 = keyExists(argv, key2);
        value = keyExists(argv, value);
        if (key2 && !value) {
          implyFail.push(` ${origKey} -> ${origValue}`);
        }
      });
    });
    if (implyFail.length) {
      let msg = `${__("Implications failed:")}
`;
      implyFail.forEach((value) => {
        msg += value;
      });
      usage2.fail(msg);
    }
  };
  let conflicting = {};
  self2.conflicts = function conflicts(key, value) {
    argsert("<string|object> [array|string]", [key, value], arguments.length);
    if (typeof key === "object") {
      Object.keys(key).forEach((k) => {
        self2.conflicts(k, key[k]);
      });
    } else {
      yargs.global(key);
      if (!conflicting[key]) {
        conflicting[key] = [];
      }
      if (Array.isArray(value)) {
        value.forEach((i) => self2.conflicts(key, i));
      } else {
        conflicting[key].push(value);
      }
    }
  };
  self2.getConflicting = () => conflicting;
  self2.conflicting = function conflictingFn(argv) {
    Object.keys(argv).forEach((key) => {
      if (conflicting[key]) {
        conflicting[key].forEach((value) => {
          if (value && argv[key] !== void 0 && argv[value] !== void 0) {
            usage2.fail(__("Arguments %s and %s are mutually exclusive", key, value));
          }
        });
      }
    });
    if (yargs.getInternalMethods().getParserConfiguration()["strip-dashed"]) {
      Object.keys(conflicting).forEach((key) => {
        conflicting[key].forEach((value) => {
          if (value && argv[shim2.Parser.camelCase(key)] !== void 0 && argv[shim2.Parser.camelCase(value)] !== void 0) {
            usage2.fail(__("Arguments %s and %s are mutually exclusive", key, value));
          }
        });
      });
    }
  };
  self2.recommendCommands = function recommendCommands(cmd, potentialCommands) {
    const threshold = 3;
    potentialCommands = potentialCommands.sort((a, b) => b.length - a.length);
    let recommended = null;
    let bestDistance = Infinity;
    for (let i = 0, candidate; (candidate = potentialCommands[i]) !== void 0; i++) {
      const d = levenshtein(cmd, candidate);
      if (d <= threshold && d < bestDistance) {
        bestDistance = d;
        recommended = candidate;
      }
    }
    if (recommended)
      usage2.fail(__("Did you mean %s?", recommended));
  };
  self2.reset = function reset32(localLookup) {
    implied = objFilter(implied, (k) => !localLookup[k]);
    conflicting = objFilter(conflicting, (k) => !localLookup[k]);
    return self2;
  };
  const frozens = [];
  self2.freeze = function freeze() {
    frozens.push({
      implied,
      conflicting
    });
  };
  self2.unfreeze = function unfreeze() {
    const frozen = frozens.pop();
    assertNotStrictEqual(frozen, void 0, shim2);
    ({ implied, conflicting } = frozen);
  };
  return self2;
}
function applyExtends(config4, cwd, mergeExtends, _shim) {
  shim = _shim;
  let defaultConfig2 = {};
  if (Object.prototype.hasOwnProperty.call(config4, "extends")) {
    if (typeof config4.extends !== "string")
      return defaultConfig2;
    const isPath = /\.json|\..*rc$/.test(config4.extends);
    let pathToDefault = null;
    if (!isPath) {
      try {
        pathToDefault = import.meta.resolve(config4.extends);
      } catch (_err) {
        return config4;
      }
    } else {
      pathToDefault = getPathToDefaultConfig(cwd, config4.extends);
    }
    checkForCircularExtends(pathToDefault);
    previouslyVisitedConfigs.push(pathToDefault);
    defaultConfig2 = isPath ? JSON.parse(shim.readFileSync(pathToDefault, "utf8")) : _shim.require(config4.extends);
    delete config4.extends;
    defaultConfig2 = applyExtends(defaultConfig2, shim.path.dirname(pathToDefault), mergeExtends, shim);
  }
  previouslyVisitedConfigs = [];
  return mergeExtends ? mergeDeep(defaultConfig2, config4) : Object.assign({}, defaultConfig2, config4);
}
function checkForCircularExtends(cfgPath) {
  if (previouslyVisitedConfigs.indexOf(cfgPath) > -1) {
    throw new YError(`Circular extended configurations: '${cfgPath}'.`);
  }
}
function getPathToDefaultConfig(cwd, pathToExtend) {
  return shim.path.resolve(cwd, pathToExtend);
}
function mergeDeep(config1, config22) {
  const target = {};
  function isObject3(obj) {
    return obj && typeof obj === "object" && !Array.isArray(obj);
  }
  Object.assign(target, config1);
  for (const key of Object.keys(config22)) {
    if (isObject3(config22[key]) && isObject3(target[key])) {
      target[key] = mergeDeep(config1[key], config22[key]);
    } else {
      target[key] = config22[key];
    }
  }
  return target;
}
function YargsFactory(_shim) {
  return (processArgs = [], cwd = _shim.process.cwd(), parentRequire) => {
    const yargs = new YargsInstance(processArgs, cwd, parentRequire, _shim);
    Object.defineProperty(yargs, "argv", {
      get: () => {
        return yargs.parse();
      },
      enumerable: true
    });
    yargs.help();
    yargs.version();
    return yargs;
  };
}
function isYargsInstance(y) {
  return !!y && typeof y.getInternalMethods === "function";
}
function requireMs() {
  if (hasRequiredMs) return ms;
  hasRequiredMs = 1;
  var s = 1e3;
  var m = s * 60;
  var h = m * 60;
  var d = h * 24;
  var w = d * 7;
  var y = d * 365.25;
  ms = function(val, options2) {
    options2 = options2 || {};
    var type2 = typeof val;
    if (type2 === "string" && val.length > 0) {
      return parse2(val);
    } else if (type2 === "number" && isFinite(val)) {
      return options2.long ? fmtLong(val) : fmtShort(val);
    }
    throw new Error(
      "val is not a non-empty string or a valid number. val=" + JSON.stringify(val)
    );
  };
  function parse2(str) {
    str = String(str);
    if (str.length > 100) {
      return;
    }
    var match = /^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(
      str
    );
    if (!match) {
      return;
    }
    var n = parseFloat(match[1]);
    var type2 = (match[2] || "ms").toLowerCase();
    switch (type2) {
      case "years":
      case "year":
      case "yrs":
      case "yr":
      case "y":
        return n * y;
      case "weeks":
      case "week":
      case "w":
        return n * w;
      case "days":
      case "day":
      case "d":
        return n * d;
      case "hours":
      case "hour":
      case "hrs":
      case "hr":
      case "h":
        return n * h;
      case "minutes":
      case "minute":
      case "mins":
      case "min":
      case "m":
        return n * m;
      case "seconds":
      case "second":
      case "secs":
      case "sec":
      case "s":
        return n * s;
      case "milliseconds":
      case "millisecond":
      case "msecs":
      case "msec":
      case "ms":
        return n;
      default:
        return void 0;
    }
  }
  function fmtShort(ms2) {
    var msAbs = Math.abs(ms2);
    if (msAbs >= d) {
      return Math.round(ms2 / d) + "d";
    }
    if (msAbs >= h) {
      return Math.round(ms2 / h) + "h";
    }
    if (msAbs >= m) {
      return Math.round(ms2 / m) + "m";
    }
    if (msAbs >= s) {
      return Math.round(ms2 / s) + "s";
    }
    return ms2 + "ms";
  }
  function fmtLong(ms2) {
    var msAbs = Math.abs(ms2);
    if (msAbs >= d) {
      return plural(ms2, msAbs, d, "day");
    }
    if (msAbs >= h) {
      return plural(ms2, msAbs, h, "hour");
    }
    if (msAbs >= m) {
      return plural(ms2, msAbs, m, "minute");
    }
    if (msAbs >= s) {
      return plural(ms2, msAbs, s, "second");
    }
    return ms2 + " ms";
  }
  function plural(ms2, msAbs, n, name) {
    var isPlural = msAbs >= n * 1.5;
    return Math.round(ms2 / n) + " " + name + (isPlural ? "s" : "");
  }
  return ms;
}
function requireCommon$2() {
  if (hasRequiredCommon$2) return common$3;
  hasRequiredCommon$2 = 1;
  function setup(env2) {
    createDebug.debug = createDebug;
    createDebug.default = createDebug;
    createDebug.coerce = coerce2;
    createDebug.disable = disable;
    createDebug.enable = enable;
    createDebug.enabled = enabled;
    createDebug.humanize = requireMs();
    createDebug.destroy = destroy;
    Object.keys(env2).forEach((key) => {
      createDebug[key] = env2[key];
    });
    createDebug.names = [];
    createDebug.skips = [];
    createDebug.formatters = {};
    function selectColor(namespace) {
      let hash = 0;
      for (let i = 0; i < namespace.length; i++) {
        hash = (hash << 5) - hash + namespace.charCodeAt(i);
        hash |= 0;
      }
      return createDebug.colors[Math.abs(hash) % createDebug.colors.length];
    }
    createDebug.selectColor = selectColor;
    function createDebug(namespace) {
      let prevTime;
      let enableOverride = null;
      let namespacesCache;
      let enabledCache;
      function debug2(...args2) {
        if (!debug2.enabled) {
          return;
        }
        const self2 = debug2;
        const curr = Number(/* @__PURE__ */ new Date());
        const ms2 = curr - (prevTime || curr);
        self2.diff = ms2;
        self2.prev = prevTime;
        self2.curr = curr;
        prevTime = curr;
        args2[0] = createDebug.coerce(args2[0]);
        if (typeof args2[0] !== "string") {
          args2.unshift("%O");
        }
        let index2 = 0;
        args2[0] = args2[0].replace(/%([a-zA-Z%])/g, (match, format2) => {
          if (match === "%%") {
            return "%";
          }
          index2++;
          const formatter2 = createDebug.formatters[format2];
          if (typeof formatter2 === "function") {
            const val = args2[index2];
            match = formatter2.call(self2, val);
            args2.splice(index2, 1);
            index2--;
          }
          return match;
        });
        createDebug.formatArgs.call(self2, args2);
        const logFn = self2.log || createDebug.log;
        logFn.apply(self2, args2);
      }
      debug2.namespace = namespace;
      debug2.useColors = createDebug.useColors();
      debug2.color = createDebug.selectColor(namespace);
      debug2.extend = extend2;
      debug2.destroy = createDebug.destroy;
      Object.defineProperty(debug2, "enabled", {
        enumerable: true,
        configurable: false,
        get: () => {
          if (enableOverride !== null) {
            return enableOverride;
          }
          if (namespacesCache !== createDebug.namespaces) {
            namespacesCache = createDebug.namespaces;
            enabledCache = createDebug.enabled(namespace);
          }
          return enabledCache;
        },
        set: (v) => {
          enableOverride = v;
        }
      });
      if (typeof createDebug.init === "function") {
        createDebug.init(debug2);
      }
      return debug2;
    }
    function extend2(namespace, delimiter) {
      const newDebug = createDebug(this.namespace + (typeof delimiter === "undefined" ? ":" : delimiter) + namespace);
      newDebug.log = this.log;
      return newDebug;
    }
    function enable(namespaces) {
      createDebug.save(namespaces);
      createDebug.namespaces = namespaces;
      createDebug.names = [];
      createDebug.skips = [];
      const split = (typeof namespaces === "string" ? namespaces : "").trim().replace(/\s+/g, ",").split(",").filter(Boolean);
      for (const ns of split) {
        if (ns[0] === "-") {
          createDebug.skips.push(ns.slice(1));
        } else {
          createDebug.names.push(ns);
        }
      }
    }
    function matchesTemplate(search, template) {
      let searchIndex = 0;
      let templateIndex = 0;
      let starIndex = -1;
      let matchIndex = 0;
      while (searchIndex < search.length) {
        if (templateIndex < template.length && (template[templateIndex] === search[searchIndex] || template[templateIndex] === "*")) {
          if (template[templateIndex] === "*") {
            starIndex = templateIndex;
            matchIndex = searchIndex;
            templateIndex++;
          } else {
            searchIndex++;
            templateIndex++;
          }
        } else if (starIndex !== -1) {
          templateIndex = starIndex + 1;
          matchIndex++;
          searchIndex = matchIndex;
        } else {
          return false;
        }
      }
      while (templateIndex < template.length && template[templateIndex] === "*") {
        templateIndex++;
      }
      return templateIndex === template.length;
    }
    function disable() {
      const namespaces = [
        ...createDebug.names,
        ...createDebug.skips.map((namespace) => "-" + namespace)
      ].join(",");
      createDebug.enable("");
      return namespaces;
    }
    function enabled(name) {
      for (const skip of createDebug.skips) {
        if (matchesTemplate(name, skip)) {
          return false;
        }
      }
      for (const ns of createDebug.names) {
        if (matchesTemplate(name, ns)) {
          return true;
        }
      }
      return false;
    }
    function coerce2(val) {
      if (val instanceof Error) {
        return val.stack || val.message;
      }
      return val;
    }
    function destroy() {
      console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");
    }
    createDebug.enable(createDebug.load());
    return createDebug;
  }
  common$3 = setup;
  return common$3;
}
function requireBrowser() {
  if (hasRequiredBrowser) return browser$1.exports;
  hasRequiredBrowser = 1;
  (function(module2, exports$1) {
    exports$1.formatArgs = formatArgs2;
    exports$1.save = save;
    exports$1.load = load2;
    exports$1.useColors = useColors;
    exports$1.storage = localstorage();
    exports$1.destroy = /* @__PURE__ */ (() => {
      let warned = false;
      return () => {
        if (!warned) {
          warned = true;
          console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");
        }
      };
    })();
    exports$1.colors = [
      "#0000CC",
      "#0000FF",
      "#0033CC",
      "#0033FF",
      "#0066CC",
      "#0066FF",
      "#0099CC",
      "#0099FF",
      "#00CC00",
      "#00CC33",
      "#00CC66",
      "#00CC99",
      "#00CCCC",
      "#00CCFF",
      "#3300CC",
      "#3300FF",
      "#3333CC",
      "#3333FF",
      "#3366CC",
      "#3366FF",
      "#3399CC",
      "#3399FF",
      "#33CC00",
      "#33CC33",
      "#33CC66",
      "#33CC99",
      "#33CCCC",
      "#33CCFF",
      "#6600CC",
      "#6600FF",
      "#6633CC",
      "#6633FF",
      "#66CC00",
      "#66CC33",
      "#9900CC",
      "#9900FF",
      "#9933CC",
      "#9933FF",
      "#99CC00",
      "#99CC33",
      "#CC0000",
      "#CC0033",
      "#CC0066",
      "#CC0099",
      "#CC00CC",
      "#CC00FF",
      "#CC3300",
      "#CC3333",
      "#CC3366",
      "#CC3399",
      "#CC33CC",
      "#CC33FF",
      "#CC6600",
      "#CC6633",
      "#CC9900",
      "#CC9933",
      "#CCCC00",
      "#CCCC33",
      "#FF0000",
      "#FF0033",
      "#FF0066",
      "#FF0099",
      "#FF00CC",
      "#FF00FF",
      "#FF3300",
      "#FF3333",
      "#FF3366",
      "#FF3399",
      "#FF33CC",
      "#FF33FF",
      "#FF6600",
      "#FF6633",
      "#FF9900",
      "#FF9933",
      "#FFCC00",
      "#FFCC33"
    ];
    function useColors() {
      if (typeof window !== "undefined" && window.process && (window.process.type === "renderer" || window.process.__nwjs)) {
        return true;
      }
      if (typeof navigator !== "undefined" && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)) {
        return false;
      }
      let m;
      return typeof document !== "undefined" && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance || typeof window !== "undefined" && window.console && (window.console.firebug || window.console.exception && window.console.table) || typeof navigator !== "undefined" && navigator.userAgent && (m = navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)) && parseInt(m[1], 10) >= 31 || typeof navigator !== "undefined" && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/);
    }
    function formatArgs2(args2) {
      args2[0] = (this.useColors ? "%c" : "") + this.namespace + (this.useColors ? " %c" : " ") + args2[0] + (this.useColors ? "%c " : " ") + "+" + module2.exports.humanize(this.diff);
      if (!this.useColors) {
        return;
      }
      const c = "color: " + this.color;
      args2.splice(1, 0, c, "color: inherit");
      let index2 = 0;
      let lastC = 0;
      args2[0].replace(/%[a-zA-Z%]/g, (match) => {
        if (match === "%%") {
          return;
        }
        index2++;
        if (match === "%c") {
          lastC = index2;
        }
      });
      args2.splice(lastC, 0, c);
    }
    exports$1.log = console.debug || console.log || (() => {
    });
    function save(namespaces) {
      try {
        if (namespaces) {
          exports$1.storage.setItem("debug", namespaces);
        } else {
          exports$1.storage.removeItem("debug");
        }
      } catch (error) {
      }
    }
    function load2() {
      let r;
      try {
        r = exports$1.storage.getItem("debug") || exports$1.storage.getItem("DEBUG");
      } catch (error) {
      }
      if (!r && typeof process !== "undefined" && "env" in process) {
        r = process.env.DEBUG;
      }
      return r;
    }
    function localstorage() {
      try {
        return localStorage;
      } catch (error) {
      }
    }
    module2.exports = requireCommon$2()(exports$1);
    const { formatters } = module2.exports;
    formatters.j = function(v) {
      try {
        return JSON.stringify(v);
      } catch (error) {
        return "[UnexpectedJSONParseError]: " + error.message;
      }
    };
  })(browser$1, browser$1.exports);
  return browser$1.exports;
}
function requireHasFlag() {
  if (hasRequiredHasFlag) return hasFlag;
  hasRequiredHasFlag = 1;
  hasFlag = (flag, argv = process.argv) => {
    const prefix = flag.startsWith("-") ? "" : flag.length === 1 ? "-" : "--";
    const position = argv.indexOf(prefix + flag);
    const terminatorPosition = argv.indexOf("--");
    return position !== -1 && (terminatorPosition === -1 || position < terminatorPosition);
  };
  return hasFlag;
}
function requireSupportsColor() {
  if (hasRequiredSupportsColor) return supportsColor_1;
  hasRequiredSupportsColor = 1;
  const os5 = require$$0$1;
  const tty = require$$1;
  const hasFlag2 = requireHasFlag();
  const { env: env2 } = process;
  let forceColor;
  if (hasFlag2("no-color") || hasFlag2("no-colors") || hasFlag2("color=false") || hasFlag2("color=never")) {
    forceColor = 0;
  } else if (hasFlag2("color") || hasFlag2("colors") || hasFlag2("color=true") || hasFlag2("color=always")) {
    forceColor = 1;
  }
  if ("FORCE_COLOR" in env2) {
    if (env2.FORCE_COLOR === "true") {
      forceColor = 1;
    } else if (env2.FORCE_COLOR === "false") {
      forceColor = 0;
    } else {
      forceColor = env2.FORCE_COLOR.length === 0 ? 1 : Math.min(parseInt(env2.FORCE_COLOR, 10), 3);
    }
  }
  function translateLevel(level) {
    if (level === 0) {
      return false;
    }
    return {
      level,
      hasBasic: true,
      has256: level >= 2,
      has16m: level >= 3
    };
  }
  function supportsColor(haveStream, streamIsTTY) {
    if (forceColor === 0) {
      return 0;
    }
    if (hasFlag2("color=16m") || hasFlag2("color=full") || hasFlag2("color=truecolor")) {
      return 3;
    }
    if (hasFlag2("color=256")) {
      return 2;
    }
    if (haveStream && !streamIsTTY && forceColor === void 0) {
      return 0;
    }
    const min = forceColor || 0;
    if (env2.TERM === "dumb") {
      return min;
    }
    if (process.platform === "win32") {
      const osRelease = os5.release().split(".");
      if (Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) {
        return Number(osRelease[2]) >= 14931 ? 3 : 2;
      }
      return 1;
    }
    if ("CI" in env2) {
      if (["TRAVIS", "CIRCLECI", "APPVEYOR", "GITLAB_CI", "GITHUB_ACTIONS", "BUILDKITE"].some((sign) => sign in env2) || env2.CI_NAME === "codeship") {
        return 1;
      }
      return min;
    }
    if ("TEAMCITY_VERSION" in env2) {
      return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env2.TEAMCITY_VERSION) ? 1 : 0;
    }
    if (env2.COLORTERM === "truecolor") {
      return 3;
    }
    if ("TERM_PROGRAM" in env2) {
      const version3 = parseInt((env2.TERM_PROGRAM_VERSION || "").split(".")[0], 10);
      switch (env2.TERM_PROGRAM) {
        case "iTerm.app":
          return version3 >= 3 ? 3 : 2;
        case "Apple_Terminal":
          return 2;
      }
    }
    if (/-256(color)?$/i.test(env2.TERM)) {
      return 2;
    }
    if (/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(env2.TERM)) {
      return 1;
    }
    if ("COLORTERM" in env2) {
      return 1;
    }
    return min;
  }
  function getSupportLevel(stream3) {
    const level = supportsColor(stream3, stream3 && stream3.isTTY);
    return translateLevel(level);
  }
  supportsColor_1 = {
    supportsColor: getSupportLevel,
    stdout: translateLevel(supportsColor(true, tty.isatty(1))),
    stderr: translateLevel(supportsColor(true, tty.isatty(2)))
  };
  return supportsColor_1;
}
function requireNode() {
  if (hasRequiredNode) return node$1.exports;
  hasRequiredNode = 1;
  (function(module2, exports$1) {
    const tty = require$$1;
    const util2 = require$$0$2;
    exports$1.init = init2;
    exports$1.log = log;
    exports$1.formatArgs = formatArgs2;
    exports$1.save = save;
    exports$1.load = load2;
    exports$1.useColors = useColors;
    exports$1.destroy = util2.deprecate(
      () => {
      },
      "Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."
    );
    exports$1.colors = [6, 2, 3, 4, 5, 1];
    try {
      const supportsColor = requireSupportsColor();
      if (supportsColor && (supportsColor.stderr || supportsColor).level >= 2) {
        exports$1.colors = [
          20,
          21,
          26,
          27,
          32,
          33,
          38,
          39,
          40,
          41,
          42,
          43,
          44,
          45,
          56,
          57,
          62,
          63,
          68,
          69,
          74,
          75,
          76,
          77,
          78,
          79,
          80,
          81,
          92,
          93,
          98,
          99,
          112,
          113,
          128,
          129,
          134,
          135,
          148,
          149,
          160,
          161,
          162,
          163,
          164,
          165,
          166,
          167,
          168,
          169,
          170,
          171,
          172,
          173,
          178,
          179,
          184,
          185,
          196,
          197,
          198,
          199,
          200,
          201,
          202,
          203,
          204,
          205,
          206,
          207,
          208,
          209,
          214,
          215,
          220,
          221
        ];
      }
    } catch (error) {
    }
    exports$1.inspectOpts = Object.keys(process.env).filter((key) => {
      return /^debug_/i.test(key);
    }).reduce((obj, key) => {
      const prop = key.substring(6).toLowerCase().replace(/_([a-z])/g, (_, k) => {
        return k.toUpperCase();
      });
      let val = process.env[key];
      if (/^(yes|on|true|enabled)$/i.test(val)) {
        val = true;
      } else if (/^(no|off|false|disabled)$/i.test(val)) {
        val = false;
      } else if (val === "null") {
        val = null;
      } else {
        val = Number(val);
      }
      obj[prop] = val;
      return obj;
    }, {});
    function useColors() {
      return "colors" in exports$1.inspectOpts ? Boolean(exports$1.inspectOpts.colors) : tty.isatty(process.stderr.fd);
    }
    function formatArgs2(args2) {
      const { namespace: name, useColors: useColors2 } = this;
      if (useColors2) {
        const c = this.color;
        const colorCode = "\x1B[3" + (c < 8 ? c : "8;5;" + c);
        const prefix = `  ${colorCode};1m${name} \x1B[0m`;
        args2[0] = prefix + args2[0].split("\n").join("\n" + prefix);
        args2.push(colorCode + "m+" + module2.exports.humanize(this.diff) + "\x1B[0m");
      } else {
        args2[0] = getDate() + name + " " + args2[0];
      }
    }
    function getDate() {
      if (exports$1.inspectOpts.hideDate) {
        return "";
      }
      return (/* @__PURE__ */ new Date()).toISOString() + " ";
    }
    function log(...args2) {
      return process.stderr.write(util2.formatWithOptions(exports$1.inspectOpts, ...args2) + "\n");
    }
    function save(namespaces) {
      if (namespaces) {
        process.env.DEBUG = namespaces;
      } else {
        delete process.env.DEBUG;
      }
    }
    function load2() {
      return process.env.DEBUG;
    }
    function init2(debug2) {
      debug2.inspectOpts = {};
      const keys2 = Object.keys(exports$1.inspectOpts);
      for (let i = 0; i < keys2.length; i++) {
        debug2.inspectOpts[keys2[i]] = exports$1.inspectOpts[keys2[i]];
      }
    }
    module2.exports = requireCommon$2()(exports$1);
    const { formatters } = module2.exports;
    formatters.o = function(v) {
      this.inspectOpts.colors = this.useColors;
      return util2.inspect(v, this.inspectOpts).split("\n").map((str) => str.trim()).join(" ");
    };
    formatters.O = function(v) {
      this.inspectOpts.colors = this.useColors;
      return util2.inspect(v, this.inspectOpts);
    };
  })(node$1, node$1.exports);
  return node$1.exports;
}
function requireSrc() {
  if (hasRequiredSrc) return src.exports;
  hasRequiredSrc = 1;
  if (typeof process === "undefined" || process.type === "renderer" || process.browser === true || process.__nwjs) {
    src.exports = requireBrowser();
  } else {
    src.exports = requireNode();
  }
  return src.exports;
}
function setErrorMap(map2) {
  overrideErrorMap = map2;
}
function getErrorMap() {
  return overrideErrorMap;
}
function addIssueToContext(ctx, issueData) {
  const overrideMap = getErrorMap();
  const issue2 = makeIssue({
    issueData,
    data: ctx.data,
    path: ctx.path,
    errorMaps: [
      ctx.common.contextualErrorMap,
      ctx.schemaErrorMap,
      overrideMap,
      overrideMap === errorMap ? void 0 : errorMap
    ].filter((x) => !!x)
  });
  ctx.common.issues.push(issue2);
}
function processCreateParams(params) {
  if (!params)
    return {};
  const { errorMap: errorMap2, invalid_type_error, required_error, description: description2 } = params;
  if (errorMap2 && (invalid_type_error || required_error)) {
    throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);
  }
  if (errorMap2)
    return { errorMap: errorMap2, description: description2 };
  const customMap = (iss, ctx) => {
    const { message } = params;
    if (iss.code === "invalid_enum_value") {
      return { message: message ?? ctx.defaultError };
    }
    if (typeof ctx.data === "undefined") {
      return { message: message ?? required_error ?? ctx.defaultError };
    }
    if (iss.code !== "invalid_type")
      return { message: ctx.defaultError };
    return { message: message ?? invalid_type_error ?? ctx.defaultError };
  };
  return { errorMap: customMap, description: description2 };
}
function timeRegexSource(args2) {
  let secondsRegexSource = `[0-5]\\d`;
  if (args2.precision) {
    secondsRegexSource = `${secondsRegexSource}\\.\\d{${args2.precision}}`;
  } else if (args2.precision == null) {
    secondsRegexSource = `${secondsRegexSource}(\\.\\d+)?`;
  }
  const secondsQuantifier = args2.precision ? "+" : "?";
  return `([01]\\d|2[0-3]):[0-5]\\d(:${secondsRegexSource})${secondsQuantifier}`;
}
function timeRegex(args2) {
  return new RegExp(`^${timeRegexSource(args2)}$`);
}
function datetimeRegex(args2) {
  let regex2 = `${dateRegexSource}T${timeRegexSource(args2)}`;
  const opts = [];
  opts.push(args2.local ? `Z?` : `Z`);
  if (args2.offset)
    opts.push(`([+-]\\d{2}:?\\d{2})`);
  regex2 = `${regex2}(${opts.join("|")})`;
  return new RegExp(`^${regex2}$`);
}
function isValidIP(ip2, version3) {
  if ((version3 === "v4" || !version3) && ipv4Regex.test(ip2)) {
    return true;
  }
  if ((version3 === "v6" || !version3) && ipv6Regex.test(ip2)) {
    return true;
  }
  return false;
}
function isValidJWT$1(jwt, alg) {
  if (!jwtRegex.test(jwt))
    return false;
  try {
    const [header] = jwt.split(".");
    if (!header)
      return false;
    const base642 = header.replace(/-/g, "+").replace(/_/g, "/").padEnd(header.length + (4 - header.length % 4) % 4, "=");
    const decoded = JSON.parse(atob(base642));
    if (typeof decoded !== "object" || decoded === null)
      return false;
    if ("typ" in decoded && decoded?.typ !== "JWT")
      return false;
    if (!decoded.alg)
      return false;
    if (alg && decoded.alg !== alg)
      return false;
    return true;
  } catch {
    return false;
  }
}
function isValidCidr(ip2, version3) {
  if ((version3 === "v4" || !version3) && ipv4CidrRegex.test(ip2)) {
    return true;
  }
  if ((version3 === "v6" || !version3) && ipv6CidrRegex.test(ip2)) {
    return true;
  }
  return false;
}
function floatSafeRemainder$1(val, step) {
  const valDecCount = (val.toString().split(".")[1] || "").length;
  const stepDecCount = (step.toString().split(".")[1] || "").length;
  const decCount = valDecCount > stepDecCount ? valDecCount : stepDecCount;
  const valInt = Number.parseInt(val.toFixed(decCount).replace(".", ""));
  const stepInt = Number.parseInt(step.toFixed(decCount).replace(".", ""));
  return valInt % stepInt / 10 ** decCount;
}
function deepPartialify(schema) {
  if (schema instanceof ZodObject$1) {
    const newShape = {};
    for (const key in schema.shape) {
      const fieldSchema = schema.shape[key];
      newShape[key] = ZodOptional$1.create(deepPartialify(fieldSchema));
    }
    return new ZodObject$1({
      ...schema._def,
      shape: () => newShape
    });
  } else if (schema instanceof ZodArray$1) {
    return new ZodArray$1({
      ...schema._def,
      type: deepPartialify(schema.element)
    });
  } else if (schema instanceof ZodOptional$1) {
    return ZodOptional$1.create(deepPartialify(schema.unwrap()));
  } else if (schema instanceof ZodNullable$1) {
    return ZodNullable$1.create(deepPartialify(schema.unwrap()));
  } else if (schema instanceof ZodTuple) {
    return ZodTuple.create(schema.items.map((item) => deepPartialify(item)));
  } else {
    return schema;
  }
}
function mergeValues$1(a, b) {
  const aType = getParsedType(a);
  const bType = getParsedType(b);
  if (a === b) {
    return { valid: true, data: a };
  } else if (aType === ZodParsedType.object && bType === ZodParsedType.object) {
    const bKeys = util$5.objectKeys(b);
    const sharedKeys = util$5.objectKeys(a).filter((key) => bKeys.indexOf(key) !== -1);
    const newObj = { ...a, ...b };
    for (const key of sharedKeys) {
      const sharedValue = mergeValues$1(a[key], b[key]);
      if (!sharedValue.valid) {
        return { valid: false };
      }
      newObj[key] = sharedValue.data;
    }
    return { valid: true, data: newObj };
  } else if (aType === ZodParsedType.array && bType === ZodParsedType.array) {
    if (a.length !== b.length) {
      return { valid: false };
    }
    const newArray = [];
    for (let index2 = 0; index2 < a.length; index2++) {
      const itemA = a[index2];
      const itemB = b[index2];
      const sharedValue = mergeValues$1(itemA, itemB);
      if (!sharedValue.valid) {
        return { valid: false };
      }
      newArray.push(sharedValue.data);
    }
    return { valid: true, data: newArray };
  } else if (aType === ZodParsedType.date && bType === ZodParsedType.date && +a === +b) {
    return { valid: true, data: a };
  } else {
    return { valid: false };
  }
}
function createZodEnum(values, params) {
  return new ZodEnum$1({
    values,
    typeName: ZodFirstPartyTypeKind.ZodEnum,
    ...processCreateParams(params)
  });
}
function cleanParams(params, data32) {
  const p = typeof params === "function" ? params(data32) : typeof params === "string" ? { message: params } : params;
  const p2 = typeof p === "string" ? { message: p } : p;
  return p2;
}
function custom$1(check2, _params = {}, fatal) {
  if (check2)
    return ZodAny.create().superRefine((data32, ctx) => {
      const r = check2(data32);
      if (r instanceof Promise) {
        return r.then((r2) => {
          if (!r2) {
            const params = cleanParams(_params, data32);
            const _fatal = params.fatal ?? fatal ?? true;
            ctx.addIssue({ code: "custom", ...params, fatal: _fatal });
          }
        });
      }
      if (!r) {
        const params = cleanParams(_params, data32);
        const _fatal = params.fatal ?? fatal ?? true;
        ctx.addIssue({ code: "custom", ...params, fatal: _fatal });
      }
      return;
    });
  return ZodAny.create();
}
function $constructor(name, initializer2, params) {
  function init2(inst, def2) {
    var _a4;
    Object.defineProperty(inst, "_zod", {
      value: inst._zod ?? {},
      enumerable: false
    });
    (_a4 = inst._zod).traits ?? (_a4.traits = /* @__PURE__ */ new Set());
    inst._zod.traits.add(name);
    initializer2(inst, def2);
    for (const k in _.prototype) {
      if (!(k in inst))
        Object.defineProperty(inst, k, { value: _.prototype[k].bind(inst) });
    }
    inst._zod.constr = _;
    inst._zod.def = def2;
  }
  const Parent = params?.Parent ?? Object;
  class Definition extends Parent {
  }
  Object.defineProperty(Definition, "name", { value: name });
  function _(def2) {
    var _a4;
    const inst = params?.Parent ? new Definition() : this;
    init2(inst, def2);
    (_a4 = inst._zod).deferred ?? (_a4.deferred = []);
    for (const fn of inst._zod.deferred) {
      fn();
    }
    return inst;
  }
  Object.defineProperty(_, "init", { value: init2 });
  Object.defineProperty(_, Symbol.hasInstance, {
    value: (inst) => {
      if (params?.Parent && inst instanceof params.Parent)
        return true;
      return inst?._zod?.traits?.has(name);
    }
  });
  Object.defineProperty(_, "name", { value: name });
  return _;
}
function config$3(newConfig) {
  return globalConfig;
}
function getEnumValues(entries) {
  const numericValues = Object.values(entries).filter((v) => typeof v === "number");
  const values = Object.entries(entries).filter(([k, _]) => numericValues.indexOf(+k) === -1).map(([_, v]) => v);
  return values;
}
function jsonStringifyReplacer(_, value) {
  if (typeof value === "bigint")
    return value.toString();
  return value;
}
function cached(getter) {
  return {
    get value() {
      {
        const value = getter();
        Object.defineProperty(this, "value", { value });
        return value;
      }
    }
  };
}
function nullish(input) {
  return input === null || input === void 0;
}
function cleanRegex(source2) {
  const start = source2.startsWith("^") ? 1 : 0;
  const end = source2.endsWith("$") ? source2.length - 1 : source2.length;
  return source2.slice(start, end);
}
function floatSafeRemainder(val, step) {
  const valDecCount = (val.toString().split(".")[1] || "").length;
  const stepDecCount = (step.toString().split(".")[1] || "").length;
  const decCount = valDecCount > stepDecCount ? valDecCount : stepDecCount;
  const valInt = Number.parseInt(val.toFixed(decCount).replace(".", ""));
  const stepInt = Number.parseInt(step.toFixed(decCount).replace(".", ""));
  return valInt % stepInt / 10 ** decCount;
}
function defineLazy(object2, key, getter) {
  Object.defineProperty(object2, key, {
    get() {
      {
        const value = getter();
        object2[key] = value;
        return value;
      }
    },
    set(v) {
      Object.defineProperty(object2, key, {
        value: v
      });
    },
    configurable: true
  });
}
function assignProp(target, prop, value) {
  Object.defineProperty(target, prop, {
    value,
    writable: true,
    enumerable: true,
    configurable: true
  });
}
function esc(str) {
  return JSON.stringify(str);
}
function isObject2(data32) {
  return typeof data32 === "object" && data32 !== null && !Array.isArray(data32);
}
function isPlainObject$1(o) {
  if (isObject2(o) === false)
    return false;
  const ctor = o.constructor;
  if (ctor === void 0)
    return true;
  const prot = ctor.prototype;
  if (isObject2(prot) === false)
    return false;
  if (Object.prototype.hasOwnProperty.call(prot, "isPrototypeOf") === false) {
    return false;
  }
  return true;
}
function escapeRegex(str) {
  return str.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
}
function clone(inst, def2, params) {
  const cl = new inst._zod.constr(def2 ?? inst._zod.def);
  if (!def2 || params?.parent)
    cl._zod.parent = inst;
  return cl;
}
function normalizeParams(_params) {
  const params = _params;
  if (!params)
    return {};
  if (typeof params === "string")
    return { error: () => params };
  if (params?.message !== void 0) {
    if (params?.error !== void 0)
      throw new Error("Cannot specify both `message` and `error` params");
    params.error = params.message;
  }
  delete params.message;
  if (typeof params.error === "string")
    return { ...params, error: () => params.error };
  return params;
}
function optionalKeys(shape) {
  return Object.keys(shape).filter((k) => {
    return shape[k]._zod.optin === "optional" && shape[k]._zod.optout === "optional";
  });
}
function pick(schema, mask) {
  const newShape = {};
  const currDef = schema._zod.def;
  for (const key in mask) {
    if (!(key in currDef.shape)) {
      throw new Error(`Unrecognized key: "${key}"`);
    }
    if (!mask[key])
      continue;
    newShape[key] = currDef.shape[key];
  }
  return clone(schema, {
    ...schema._zod.def,
    shape: newShape,
    checks: []
  });
}
function omit(schema, mask) {
  const newShape = { ...schema._zod.def.shape };
  const currDef = schema._zod.def;
  for (const key in mask) {
    if (!(key in currDef.shape)) {
      throw new Error(`Unrecognized key: "${key}"`);
    }
    if (!mask[key])
      continue;
    delete newShape[key];
  }
  return clone(schema, {
    ...schema._zod.def,
    shape: newShape,
    checks: []
  });
}
function extend(schema, shape) {
  if (!isPlainObject$1(shape)) {
    throw new Error("Invalid input to extend: expected a plain object");
  }
  const def2 = {
    ...schema._zod.def,
    get shape() {
      const _shape = { ...schema._zod.def.shape, ...shape };
      assignProp(this, "shape", _shape);
      return _shape;
    },
    checks: []
  };
  return clone(schema, def2);
}
function merge$1(a, b) {
  return clone(a, {
    ...a._zod.def,
    get shape() {
      const _shape = { ...a._zod.def.shape, ...b._zod.def.shape };
      assignProp(this, "shape", _shape);
      return _shape;
    },
    catchall: b._zod.def.catchall,
    checks: []
  });
}
function partial(Class, schema, mask) {
  const oldShape = schema._zod.def.shape;
  const shape = { ...oldShape };
  if (mask) {
    for (const key in mask) {
      if (!(key in oldShape)) {
        throw new Error(`Unrecognized key: "${key}"`);
      }
      if (!mask[key])
        continue;
      shape[key] = Class ? new Class({
        type: "optional",
        innerType: oldShape[key]
      }) : oldShape[key];
    }
  } else {
    for (const key in oldShape) {
      shape[key] = Class ? new Class({
        type: "optional",
        innerType: oldShape[key]
      }) : oldShape[key];
    }
  }
  return clone(schema, {
    ...schema._zod.def,
    shape,
    checks: []
  });
}
function required$4(Class, schema, mask) {
  const oldShape = schema._zod.def.shape;
  const shape = { ...oldShape };
  if (mask) {
    for (const key in mask) {
      if (!(key in shape)) {
        throw new Error(`Unrecognized key: "${key}"`);
      }
      if (!mask[key])
        continue;
      shape[key] = new Class({
        type: "nonoptional",
        innerType: oldShape[key]
      });
    }
  } else {
    for (const key in oldShape) {
      shape[key] = new Class({
        type: "nonoptional",
        innerType: oldShape[key]
      });
    }
  }
  return clone(schema, {
    ...schema._zod.def,
    shape,
    checks: []
  });
}
function aborted(x, startIndex = 0) {
  for (let i = startIndex; i < x.issues.length; i++) {
    if (x.issues[i]?.continue !== true)
      return true;
  }
  return false;
}
function prefixIssues(path14, issues) {
  return issues.map((iss) => {
    var _a4;
    (_a4 = iss).path ?? (_a4.path = []);
    iss.path.unshift(path14);
    return iss;
  });
}
function unwrapMessage(message) {
  return typeof message === "string" ? message : message?.message;
}
function finalizeIssue(iss, ctx, config4) {
  const full = { ...iss, path: iss.path ?? [] };
  if (!iss.message) {
    const message = unwrapMessage(iss.inst?._zod.def?.error?.(iss)) ?? unwrapMessage(ctx?.error?.(iss)) ?? unwrapMessage(config4.customError?.(iss)) ?? unwrapMessage(config4.localeError?.(iss)) ?? "Invalid input";
    full.message = message;
  }
  delete full.inst;
  delete full.continue;
  if (!ctx?.reportInput) {
    delete full.input;
  }
  return full;
}
function getSizableOrigin(input) {
  if (input instanceof Set)
    return "set";
  if (input instanceof Map)
    return "map";
  if (input instanceof File)
    return "file";
  return "unknown";
}
function getLengthableOrigin(input) {
  if (Array.isArray(input))
    return "array";
  if (typeof input === "string")
    return "string";
  return "unknown";
}
function issue(...args2) {
  const [iss, input, inst] = args2;
  if (typeof iss === "string") {
    return {
      message: iss,
      code: "custom",
      input,
      inst
    };
  }
  return { ...iss };
}
function flattenError(error, mapper = (issue2) => issue2.message) {
  const fieldErrors = {};
  const formErrors = [];
  for (const sub of error.issues) {
    if (sub.path.length > 0) {
      fieldErrors[sub.path[0]] = fieldErrors[sub.path[0]] || [];
      fieldErrors[sub.path[0]].push(mapper(sub));
    } else {
      formErrors.push(mapper(sub));
    }
  }
  return { formErrors, fieldErrors };
}
function formatError(error, _mapper) {
  const mapper = _mapper || function(issue2) {
    return issue2.message;
  };
  const fieldErrors = { _errors: [] };
  const processError = (error2) => {
    for (const issue2 of error2.issues) {
      if (issue2.code === "invalid_union" && issue2.errors.length) {
        issue2.errors.map((issues) => processError({ issues }));
      } else if (issue2.code === "invalid_key") {
        processError({ issues: issue2.issues });
      } else if (issue2.code === "invalid_element") {
        processError({ issues: issue2.issues });
      } else if (issue2.path.length === 0) {
        fieldErrors._errors.push(mapper(issue2));
      } else {
        let curr = fieldErrors;
        let i = 0;
        while (i < issue2.path.length) {
          const el = issue2.path[i];
          const terminal = i === issue2.path.length - 1;
          if (!terminal) {
            curr[el] = curr[el] || { _errors: [] };
          } else {
            curr[el] = curr[el] || { _errors: [] };
            curr[el]._errors.push(mapper(issue2));
          }
          curr = curr[el];
          i++;
        }
      }
    }
  };
  processError(error);
  return fieldErrors;
}
function emoji() {
  return new RegExp(_emoji$1, "u");
}
function timeSource(args2) {
  const hhmm = `(?:[01]\\d|2[0-3]):[0-5]\\d`;
  const regex2 = typeof args2.precision === "number" ? args2.precision === -1 ? `${hhmm}` : args2.precision === 0 ? `${hhmm}:[0-5]\\d` : `${hhmm}:[0-5]\\d\\.\\d{${args2.precision}}` : `${hhmm}(?::[0-5]\\d(?:\\.\\d+)?)?`;
  return regex2;
}
function time$1(args2) {
  return new RegExp(`^${timeSource(args2)}$`);
}
function datetime$1(args2) {
  const time2 = timeSource({ precision: args2.precision });
  const opts = ["Z"];
  if (args2.local)
    opts.push("");
  if (args2.offset)
    opts.push(`([+-]\\d{2}:\\d{2})`);
  const timeRegex2 = `${time2}(?:${opts.join("|")})`;
  return new RegExp(`^${dateSource}T(?:${timeRegex2})$`);
}
function handleCheckPropertyResult(result, payload, property) {
  if (result.issues.length) {
    payload.issues.push(...prefixIssues(property, result.issues));
  }
}
function isValidBase64(data32) {
  if (data32 === "")
    return true;
  if (data32.length % 4 !== 0)
    return false;
  try {
    atob(data32);
    return true;
  } catch {
    return false;
  }
}
function isValidBase64URL(data32) {
  if (!base64url.test(data32))
    return false;
  const base642 = data32.replace(/[-_]/g, (c) => c === "-" ? "+" : "/");
  const padded = base642.padEnd(Math.ceil(base642.length / 4) * 4, "=");
  return isValidBase64(padded);
}
function isValidJWT(token, algorithm = null) {
  try {
    const tokensParts = token.split(".");
    if (tokensParts.length !== 3)
      return false;
    const [header] = tokensParts;
    if (!header)
      return false;
    const parsedHeader = JSON.parse(atob(header));
    if ("typ" in parsedHeader && parsedHeader?.typ !== "JWT")
      return false;
    if (!parsedHeader.alg)
      return false;
    if (algorithm && (!("alg" in parsedHeader) || parsedHeader.alg !== algorithm))
      return false;
    return true;
  } catch {
    return false;
  }
}
function handleArrayResult(result, final, index2) {
  if (result.issues.length) {
    final.issues.push(...prefixIssues(index2, result.issues));
  }
  final.value[index2] = result.value;
}
function handleObjectResult(result, final, key) {
  if (result.issues.length) {
    final.issues.push(...prefixIssues(key, result.issues));
  }
  final.value[key] = result.value;
}
function handleOptionalObjectResult(result, final, key, input) {
  if (result.issues.length) {
    if (input[key] === void 0) {
      if (key in input) {
        final.value[key] = void 0;
      } else {
        final.value[key] = result.value;
      }
    } else {
      final.issues.push(...prefixIssues(key, result.issues));
    }
  } else if (result.value === void 0) {
    if (key in input)
      final.value[key] = void 0;
  } else {
    final.value[key] = result.value;
  }
}
function handleUnionResults(results, final, inst, ctx) {
  for (const result of results) {
    if (result.issues.length === 0) {
      final.value = result.value;
      return final;
    }
  }
  final.issues.push({
    code: "invalid_union",
    input: final.value,
    inst,
    errors: results.map((result) => result.issues.map((iss) => finalizeIssue(iss, ctx, config$3())))
  });
  return final;
}
function mergeValues(a, b) {
  if (a === b) {
    return { valid: true, data: a };
  }
  if (a instanceof Date && b instanceof Date && +a === +b) {
    return { valid: true, data: a };
  }
  if (isPlainObject$1(a) && isPlainObject$1(b)) {
    const bKeys = Object.keys(b);
    const sharedKeys = Object.keys(a).filter((key) => bKeys.indexOf(key) !== -1);
    const newObj = { ...a, ...b };
    for (const key of sharedKeys) {
      const sharedValue = mergeValues(a[key], b[key]);
      if (!sharedValue.valid) {
        return {
          valid: false,
          mergeErrorPath: [key, ...sharedValue.mergeErrorPath]
        };
      }
      newObj[key] = sharedValue.data;
    }
    return { valid: true, data: newObj };
  }
  if (Array.isArray(a) && Array.isArray(b)) {
    if (a.length !== b.length) {
      return { valid: false, mergeErrorPath: [] };
    }
    const newArray = [];
    for (let index2 = 0; index2 < a.length; index2++) {
      const itemA = a[index2];
      const itemB = b[index2];
      const sharedValue = mergeValues(itemA, itemB);
      if (!sharedValue.valid) {
        return {
          valid: false,
          mergeErrorPath: [index2, ...sharedValue.mergeErrorPath]
        };
      }
      newArray.push(sharedValue.data);
    }
    return { valid: true, data: newArray };
  }
  return { valid: false, mergeErrorPath: [] };
}
function handleIntersectionResults(result, left2, right2) {
  if (left2.issues.length) {
    result.issues.push(...left2.issues);
  }
  if (right2.issues.length) {
    result.issues.push(...right2.issues);
  }
  if (aborted(result))
    return result;
  const merged = mergeValues(left2.value, right2.value);
  if (!merged.valid) {
    throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(merged.mergeErrorPath)}`);
  }
  result.value = merged.data;
  return result;
}
function handleTupleResult(result, final, index2) {
  if (result.issues.length) {
    final.issues.push(...prefixIssues(index2, result.issues));
  }
  final.value[index2] = result.value;
}
function handleMapResult(keyResult, valueResult, final, key, input, inst, ctx) {
  if (keyResult.issues.length) {
    if (propertyKeyTypes.has(typeof key)) {
      final.issues.push(...prefixIssues(key, keyResult.issues));
    } else {
      final.issues.push({
        origin: "map",
        code: "invalid_key",
        input,
        inst,
        issues: keyResult.issues.map((iss) => finalizeIssue(iss, ctx, config$3()))
      });
    }
  }
  if (valueResult.issues.length) {
    if (propertyKeyTypes.has(typeof key)) {
      final.issues.push(...prefixIssues(key, valueResult.issues));
    } else {
      final.issues.push({
        origin: "map",
        code: "invalid_element",
        input,
        inst,
        key,
        issues: valueResult.issues.map((iss) => finalizeIssue(iss, ctx, config$3()))
      });
    }
  }
  final.value.set(keyResult.value, valueResult.value);
}
function handleSetResult(result, final) {
  if (result.issues.length) {
    final.issues.push(...result.issues);
  }
  final.value.add(result.value);
}
function handleDefaultResult(payload, def2) {
  if (payload.value === void 0) {
    payload.value = def2.defaultValue;
  }
  return payload;
}
function handleNonOptionalResult(payload, inst) {
  if (!payload.issues.length && payload.value === void 0) {
    payload.issues.push({
      code: "invalid_type",
      expected: "nonoptional",
      input: payload.value,
      inst
    });
  }
  return payload;
}
function handlePipeResult(left2, def2, ctx) {
  if (aborted(left2)) {
    return left2;
  }
  return def2.out._zod.run({ value: left2.value, issues: left2.issues }, ctx);
}
function handleReadonlyResult(payload) {
  payload.value = Object.freeze(payload.value);
  return payload;
}
function handleRefineResult(result, payload, input, inst) {
  if (!result) {
    const _iss = {
      code: "custom",
      input,
      inst,
      path: [...inst._zod.def.path ?? []],
      continue: !inst._zod.def.abort
    };
    if (inst._zod.def.params)
      _iss.params = inst._zod.def.params;
    payload.issues.push(issue(_iss));
  }
}
function registry() {
  return new $ZodRegistry();
}
function _string(Class, params) {
  return new Class({
    type: "string",
    ...normalizeParams(params)
  });
}
function _email(Class, params) {
  return new Class({
    type: "string",
    format: "email",
    check: "string_format",
    abort: false,
    ...normalizeParams(params)
  });
}
function _guid(Class, params) {
  return new Class({
    type: "string",
    format: "guid",
    check: "string_format",
    abort: false,
    ...normalizeParams(params)
  });
}
function _uuid(Class, params) {
  return new Class({
    type: "string",
    format: "uuid",
    check: "string_format",
    abort: false,
    ...normalizeParams(params)
  });
}
function _uuidv4(Class, params) {
  return new Class({
    type: "string",
    format: "uuid",
    check: "string_format",
    abort: false,
    version: "v4",
    ...normalizeParams(params)
  });
}
function _uuidv6(Class, params) {
  return new Class({
    type: "string",
    format: "uuid",
    check: "string_format",
    abort: false,
    version: "v6",
    ...normalizeParams(params)
  });
}
function _uuidv7(Class, params) {
  return new Class({
    type: "string",
    format: "uuid",
    check: "string_format",
    abort: false,
    version: "v7",
    ...normalizeParams(params)
  });
}
function _url(Class, params) {
  return new Class({
    type: "string",
    format: "url",
    check: "string_format",
    abort: false,
    ...normalizeParams(params)
  });
}
function _emoji(Class, params) {
  return new Class({
    type: "string",
    format: "emoji",
    check: "string_format",
    abort: false,
    ...normalizeParams(params)
  });
}
function _nanoid(Class, params) {
  return new Class({
    type: "string",
    format: "nanoid",
    check: "string_format",
    abort: false,
    ...normalizeParams(params)
  });
}
function _cuid(Class, params) {
  return new Class({
    type: "string",
    format: "cuid",
    check: "string_format",
    abort: false,
    ...normalizeParams(params)
  });
}
function _cuid2(Class, params) {
  return new Class({
    type: "string",
    format: "cuid2",
    check: "string_format",
    abort: false,
    ...normalizeParams(params)
  });
}
function _ulid(Class, params) {
  return new Class({
    type: "string",
    format: "ulid",
    check: "string_format",
    abort: false,
    ...normalizeParams(params)
  });
}
function _xid(Class, params) {
  return new Class({
    type: "string",
    format: "xid",
    check: "string_format",
    abort: false,
    ...normalizeParams(params)
  });
}
function _ksuid(Class, params) {
  return new Class({
    type: "string",
    format: "ksuid",
    check: "string_format",
    abort: false,
    ...normalizeParams(params)
  });
}
function _ipv4(Class, params) {
  return new Class({
    type: "string",
    format: "ipv4",
    check: "string_format",
    abort: false,
    ...normalizeParams(params)
  });
}
function _ipv6(Class, params) {
  return new Class({
    type: "string",
    format: "ipv6",
    check: "string_format",
    abort: false,
    ...normalizeParams(params)
  });
}
function _cidrv4(Class, params) {
  return new Class({
    type: "string",
    format: "cidrv4",
    check: "string_format",
    abort: false,
    ...normalizeParams(params)
  });
}
function _cidrv6(Class, params) {
  return new Class({
    type: "string",
    format: "cidrv6",
    check: "string_format",
    abort: false,
    ...normalizeParams(params)
  });
}
function _base64(Class, params) {
  return new Class({
    type: "string",
    format: "base64",
    check: "string_format",
    abort: false,
    ...normalizeParams(params)
  });
}
function _base64url(Class, params) {
  return new Class({
    type: "string",
    format: "base64url",
    check: "string_format",
    abort: false,
    ...normalizeParams(params)
  });
}
function _e164(Class, params) {
  return new Class({
    type: "string",
    format: "e164",
    check: "string_format",
    abort: false,
    ...normalizeParams(params)
  });
}
function _jwt(Class, params) {
  return new Class({
    type: "string",
    format: "jwt",
    check: "string_format",
    abort: false,
    ...normalizeParams(params)
  });
}
function _isoDateTime(Class, params) {
  return new Class({
    type: "string",
    format: "datetime",
    check: "string_format",
    offset: false,
    local: false,
    precision: null,
    ...normalizeParams(params)
  });
}
function _isoDate(Class, params) {
  return new Class({
    type: "string",
    format: "date",
    check: "string_format",
    ...normalizeParams(params)
  });
}
function _isoTime(Class, params) {
  return new Class({
    type: "string",
    format: "time",
    check: "string_format",
    precision: null,
    ...normalizeParams(params)
  });
}
function _isoDuration(Class, params) {
  return new Class({
    type: "string",
    format: "duration",
    check: "string_format",
    ...normalizeParams(params)
  });
}
function _number(Class, params) {
  return new Class({
    type: "number",
    checks: [],
    ...normalizeParams(params)
  });
}
function _int(Class, params) {
  return new Class({
    type: "number",
    check: "number_format",
    abort: false,
    format: "safeint",
    ...normalizeParams(params)
  });
}
function _boolean(Class, params) {
  return new Class({
    type: "boolean",
    ...normalizeParams(params)
  });
}
function _null$1(Class, params) {
  return new Class({
    type: "null",
    ...normalizeParams(params)
  });
}
function _unknown(Class) {
  return new Class({
    type: "unknown"
  });
}
function _never(Class, params) {
  return new Class({
    type: "never",
    ...normalizeParams(params)
  });
}
function _lt(value, params) {
  return new $ZodCheckLessThan({
    check: "less_than",
    ...normalizeParams(params),
    value,
    inclusive: false
  });
}
function _lte(value, params) {
  return new $ZodCheckLessThan({
    check: "less_than",
    ...normalizeParams(params),
    value,
    inclusive: true
  });
}
function _gt(value, params) {
  return new $ZodCheckGreaterThan({
    check: "greater_than",
    ...normalizeParams(params),
    value,
    inclusive: false
  });
}
function _gte(value, params) {
  return new $ZodCheckGreaterThan({
    check: "greater_than",
    ...normalizeParams(params),
    value,
    inclusive: true
  });
}
function _multipleOf(value, params) {
  return new $ZodCheckMultipleOf({
    check: "multiple_of",
    ...normalizeParams(params),
    value
  });
}
function _maxSize(maximum, params) {
  return new $ZodCheckMaxSize({
    check: "max_size",
    ...normalizeParams(params),
    maximum
  });
}
function _minSize(minimum, params) {
  return new $ZodCheckMinSize({
    check: "min_size",
    ...normalizeParams(params),
    minimum
  });
}
function _size(size, params) {
  return new $ZodCheckSizeEquals({
    check: "size_equals",
    ...normalizeParams(params),
    size
  });
}
function _maxLength(maximum, params) {
  const ch = new $ZodCheckMaxLength({
    check: "max_length",
    ...normalizeParams(params),
    maximum
  });
  return ch;
}
function _minLength(minimum, params) {
  return new $ZodCheckMinLength({
    check: "min_length",
    ...normalizeParams(params),
    minimum
  });
}
function _length(length, params) {
  return new $ZodCheckLengthEquals({
    check: "length_equals",
    ...normalizeParams(params),
    length
  });
}
function _regex(pattern2, params) {
  return new $ZodCheckRegex({
    check: "string_format",
    format: "regex",
    ...normalizeParams(params),
    pattern: pattern2
  });
}
function _lowercase(params) {
  return new $ZodCheckLowerCase({
    check: "string_format",
    format: "lowercase",
    ...normalizeParams(params)
  });
}
function _uppercase(params) {
  return new $ZodCheckUpperCase({
    check: "string_format",
    format: "uppercase",
    ...normalizeParams(params)
  });
}
function _includes(includes, params) {
  return new $ZodCheckIncludes({
    check: "string_format",
    format: "includes",
    ...normalizeParams(params),
    includes
  });
}
function _startsWith(prefix, params) {
  return new $ZodCheckStartsWith({
    check: "string_format",
    format: "starts_with",
    ...normalizeParams(params),
    prefix
  });
}
function _endsWith(suffix, params) {
  return new $ZodCheckEndsWith({
    check: "string_format",
    format: "ends_with",
    ...normalizeParams(params),
    suffix
  });
}
function _mime(types2, params) {
  return new $ZodCheckMimeType({
    check: "mime_type",
    mime: types2,
    ...normalizeParams(params)
  });
}
function _overwrite(tx) {
  return new $ZodCheckOverwrite({
    check: "overwrite",
    tx
  });
}
function _normalize(form) {
  return _overwrite((input) => input.normalize(form));
}
function _trim() {
  return _overwrite((input) => input.trim());
}
function _toLowerCase() {
  return _overwrite((input) => input.toLowerCase());
}
function _toUpperCase() {
  return _overwrite((input) => input.toUpperCase());
}
function _array(Class, element, params) {
  return new Class({
    type: "array",
    element,
    ...normalizeParams(params)
  });
}
function _custom(Class, fn, _params) {
  const norm = normalizeParams(_params);
  norm.abort ?? (norm.abort = true);
  const schema = new Class({
    type: "custom",
    check: "custom",
    fn,
    ...norm
  });
  return schema;
}
function _refine(Class, fn, _params) {
  const schema = new Class({
    type: "custom",
    check: "custom",
    fn,
    ...normalizeParams(_params)
  });
  return schema;
}
function toJSONSchema(input, _params) {
  if (input instanceof $ZodRegistry) {
    const gen2 = new JSONSchemaGenerator(_params);
    const defs = {};
    for (const entry of input._idmap.entries()) {
      const [_, schema] = entry;
      gen2.process(schema);
    }
    const schemas = {};
    const external = {
      registry: input,
      uri: _params?.uri,
      defs
    };
    for (const entry of input._idmap.entries()) {
      const [key, schema] = entry;
      schemas[key] = gen2.emit(schema, {
        ..._params,
        external
      });
    }
    if (Object.keys(defs).length > 0) {
      const defsSegment = gen2.target === "draft-2020-12" ? "$defs" : "definitions";
      schemas.__shared = {
        [defsSegment]: defs
      };
    }
    return { schemas };
  }
  const gen = new JSONSchemaGenerator(_params);
  gen.process(input);
  return gen.emit(input, _params);
}
function isTransforming(_schema, _ctx) {
  const ctx = _ctx ?? { seen: /* @__PURE__ */ new Set() };
  if (ctx.seen.has(_schema))
    return false;
  ctx.seen.add(_schema);
  const schema = _schema;
  const def2 = schema._zod.def;
  switch (def2.type) {
    case "string":
    case "number":
    case "bigint":
    case "boolean":
    case "date":
    case "symbol":
    case "undefined":
    case "null":
    case "any":
    case "unknown":
    case "never":
    case "void":
    case "literal":
    case "enum":
    case "nan":
    case "file":
    case "template_literal":
      return false;
    case "array": {
      return isTransforming(def2.element, ctx);
    }
    case "object": {
      for (const key in def2.shape) {
        if (isTransforming(def2.shape[key], ctx))
          return true;
      }
      return false;
    }
    case "union": {
      for (const option of def2.options) {
        if (isTransforming(option, ctx))
          return true;
      }
      return false;
    }
    case "intersection": {
      return isTransforming(def2.left, ctx) || isTransforming(def2.right, ctx);
    }
    case "tuple": {
      for (const item of def2.items) {
        if (isTransforming(item, ctx))
          return true;
      }
      if (def2.rest && isTransforming(def2.rest, ctx))
        return true;
      return false;
    }
    case "record": {
      return isTransforming(def2.keyType, ctx) || isTransforming(def2.valueType, ctx);
    }
    case "map": {
      return isTransforming(def2.keyType, ctx) || isTransforming(def2.valueType, ctx);
    }
    case "set": {
      return isTransforming(def2.valueType, ctx);
    }
    case "promise":
    case "optional":
    case "nonoptional":
    case "nullable":
    case "readonly":
      return isTransforming(def2.innerType, ctx);
    case "lazy":
      return isTransforming(def2.getter(), ctx);
    case "default": {
      return isTransforming(def2.innerType, ctx);
    }
    case "prefault": {
      return isTransforming(def2.innerType, ctx);
    }
    case "custom": {
      return false;
    }
    case "transform": {
      return true;
    }
    case "pipe": {
      return isTransforming(def2.in, ctx) || isTransforming(def2.out, ctx);
    }
    case "success": {
      return false;
    }
    case "catch": {
      return false;
    }
  }
  throw new Error(`Unknown schema type: ${def2.type}`);
}
function object$1(shape, params) {
  const def2 = {
    type: "object",
    get shape() {
      assignProp(this, "shape", { ...shape });
      return this.shape;
    },
    ...normalizeParams(params)
  };
  return new ZodMiniObject(def2);
}
function isZ4Schema(s) {
  const schema = s;
  return !!schema._zod;
}
function objectFromShape(shape) {
  const values = Object.values(shape);
  if (values.length === 0)
    return object$1({});
  const allV4 = values.every(isZ4Schema);
  const allV3 = values.every((s) => !isZ4Schema(s));
  if (allV4)
    return object$1(shape);
  if (allV3)
    return objectType(shape);
  throw new Error("Mixed Zod versions detected in object shape.");
}
function safeParse$1(schema, data32) {
  if (isZ4Schema(schema)) {
    const result2 = safeParse$2(schema, data32);
    return result2;
  }
  const v3Schema = schema;
  const result = v3Schema.safeParse(data32);
  return result;
}
async function safeParseAsync$1(schema, data32) {
  if (isZ4Schema(schema)) {
    const result2 = await safeParseAsync$2(schema, data32);
    return result2;
  }
  const v3Schema = schema;
  const result = await v3Schema.safeParseAsync(data32);
  return result;
}
function getObjectShape(schema) {
  if (!schema)
    return void 0;
  let rawShape;
  if (isZ4Schema(schema)) {
    const v4Schema = schema;
    rawShape = v4Schema._zod?.def?.shape;
  } else {
    const v3Schema = schema;
    rawShape = v3Schema.shape;
  }
  if (!rawShape)
    return void 0;
  if (typeof rawShape === "function") {
    try {
      return rawShape();
    } catch {
      return void 0;
    }
  }
  return rawShape;
}
function normalizeObjectSchema(schema) {
  if (!schema)
    return void 0;
  if (typeof schema === "object") {
    const asV3 = schema;
    const asV4 = schema;
    if (!asV3._def && !asV4._zod) {
      const values = Object.values(schema);
      if (values.length > 0 && values.every((v) => typeof v === "object" && v !== null && (v._def !== void 0 || v._zod !== void 0 || typeof v.parse === "function"))) {
        return objectFromShape(schema);
      }
    }
  }
  if (isZ4Schema(schema)) {
    const v4Schema = schema;
    const def2 = v4Schema._zod?.def;
    if (def2 && (def2.type === "object" || def2.shape !== void 0)) {
      return schema;
    }
  } else {
    const v3Schema = schema;
    if (v3Schema.shape !== void 0) {
      return schema;
    }
  }
  return void 0;
}
function getParseErrorMessage(error) {
  if (error && typeof error === "object") {
    if ("message" in error && typeof error.message === "string") {
      return error.message;
    }
    if ("issues" in error && Array.isArray(error.issues) && error.issues.length > 0) {
      const firstIssue = error.issues[0];
      if (firstIssue && typeof firstIssue === "object" && "message" in firstIssue) {
        return String(firstIssue.message);
      }
    }
    try {
      return JSON.stringify(error);
    } catch {
      return String(error);
    }
  }
  return String(error);
}
function getSchemaDescription(schema) {
  return schema.description;
}
function isSchemaOptional(schema) {
  if (isZ4Schema(schema)) {
    const v4Schema = schema;
    return v4Schema._zod?.def?.type === "optional";
  }
  const v3Schema = schema;
  if (typeof schema.isOptional === "function") {
    return schema.isOptional();
  }
  return v3Schema._def?.typeName === "ZodOptional";
}
function getLiteralValue(schema) {
  if (isZ4Schema(schema)) {
    const v4Schema = schema;
    const def3 = v4Schema._zod?.def;
    if (def3) {
      if (def3.value !== void 0)
        return def3.value;
      if (Array.isArray(def3.values) && def3.values.length > 0) {
        return def3.values[0];
      }
    }
  }
  const v3Schema = schema;
  const def2 = v3Schema._def;
  if (def2) {
    if (def2.value !== void 0)
      return def2.value;
    if (Array.isArray(def2.values) && def2.values.length > 0) {
      return def2.values[0];
    }
  }
  const directValue = schema.value;
  if (directValue !== void 0)
    return directValue;
  return void 0;
}
function datetime(params) {
  return _isoDateTime(ZodISODateTime, params);
}
function date(params) {
  return _isoDate(ZodISODate, params);
}
function time(params) {
  return _isoTime(ZodISOTime, params);
}
function duration(params) {
  return _isoDuration(ZodISODuration, params);
}
function string(params) {
  return _string(ZodString2, params);
}
function number(params) {
  return _number(ZodNumber2, params);
}
function int(params) {
  return _int(ZodNumberFormat, params);
}
function boolean(params) {
  return _boolean(ZodBoolean2, params);
}
function _null(params) {
  return _null$1(ZodNull2, params);
}
function unknown() {
  return _unknown(ZodUnknown2);
}
function never(params) {
  return _never(ZodNever2, params);
}
function array(element, params) {
  return _array(ZodArray2, element, params);
}
function object(shape, params) {
  const def2 = {
    type: "object",
    get shape() {
      assignProp(this, "shape", { ...shape });
      return this.shape;
    },
    ...normalizeParams(params)
  };
  return new ZodObject2(def2);
}
function looseObject(shape, params) {
  return new ZodObject2({
    type: "object",
    get shape() {
      assignProp(this, "shape", { ...shape });
      return this.shape;
    },
    catchall: unknown(),
    ...normalizeParams(params)
  });
}
function union(options2, params) {
  return new ZodUnion2({
    type: "union",
    options: options2,
    ...normalizeParams(params)
  });
}
function discriminatedUnion(discriminator2, options2, params) {
  return new ZodDiscriminatedUnion2({
    type: "union",
    options: options2,
    discriminator: discriminator2,
    ...normalizeParams(params)
  });
}
function intersection(left2, right2) {
  return new ZodIntersection2({
    type: "intersection",
    left: left2,
    right: right2
  });
}
function record(keyType, valueType, params) {
  return new ZodRecord2({
    type: "record",
    keyType,
    valueType,
    ...normalizeParams(params)
  });
}
function _enum$2(values, params) {
  const entries = Array.isArray(values) ? Object.fromEntries(values.map((v) => [v, v])) : values;
  return new ZodEnum2({
    type: "enum",
    entries,
    ...normalizeParams(params)
  });
}
function literal(value, params) {
  return new ZodLiteral2({
    type: "literal",
    values: Array.isArray(value) ? value : [value],
    ...normalizeParams(params)
  });
}
function transform(fn) {
  return new ZodTransform({
    type: "transform",
    transform: fn
  });
}
function optional(innerType) {
  return new ZodOptional2({
    type: "optional",
    innerType
  });
}
function nullable(innerType) {
  return new ZodNullable2({
    type: "nullable",
    innerType
  });
}
function _default(innerType, defaultValue) {
  return new ZodDefault2({
    type: "default",
    innerType,
    get defaultValue() {
      return typeof defaultValue === "function" ? defaultValue() : defaultValue;
    }
  });
}
function prefault(innerType, defaultValue) {
  return new ZodPrefault({
    type: "prefault",
    innerType,
    get defaultValue() {
      return typeof defaultValue === "function" ? defaultValue() : defaultValue;
    }
  });
}
function nonoptional(innerType, params) {
  return new ZodNonOptional({
    type: "nonoptional",
    innerType,
    ...normalizeParams(params)
  });
}
function _catch(innerType, catchValue) {
  return new ZodCatch2({
    type: "catch",
    innerType,
    catchValue: typeof catchValue === "function" ? catchValue : () => catchValue
  });
}
function pipe$1(in_, out) {
  return new ZodPipe({
    type: "pipe",
    in: in_,
    out
  });
}
function readonly(innerType) {
  return new ZodReadonly2({
    type: "readonly",
    innerType
  });
}
function check(fn) {
  const ch = new $ZodCheck({
    check: "custom"
  });
  ch._zod.check = fn;
  return ch;
}
function custom(fn, _params) {
  return _custom(ZodCustom, fn ?? (() => true), _params);
}
function refine(fn, _params = {}) {
  return _refine(ZodCustom, fn, _params);
}
function superRefine(fn) {
  const ch = check((payload) => {
    payload.addIssue = (issue$1) => {
      if (typeof issue$1 === "string") {
        payload.issues.push(issue(issue$1, payload.value, ch._zod.def));
      } else {
        const _issue = issue$1;
        if (_issue.fatal)
          _issue.continue = false;
        _issue.code ?? (_issue.code = "custom");
        _issue.input ?? (_issue.input = payload.value);
        _issue.inst ?? (_issue.inst = ch);
        _issue.continue ?? (_issue.continue = !ch._zod.def.abort);
        payload.issues.push(issue(_issue));
      }
    };
    return fn(payload.value, payload);
  });
  return ch;
}
function preprocess(fn, schema) {
  return pipe$1(transform(fn), schema);
}
function assertCompleteRequestPrompt(request3) {
  if (request3.params.ref.type !== "ref/prompt") {
    throw new TypeError(`Expected CompleteRequestPrompt, but got ${request3.params.ref.type}`);
  }
}
function assertCompleteRequestResourceTemplate(request3) {
  if (request3.params.ref.type !== "ref/resource") {
    throw new TypeError(`Expected CompleteRequestResourceTemplate, but got ${request3.params.ref.type}`);
  }
}
function isTerminal(status) {
  return status === "completed" || status === "failed" || status === "cancelled";
}
function addErrorMessage(res, key, errorMessage, refs) {
  if (!refs?.errorMessages)
    return;
  if (errorMessage) {
    res.errorMessage = {
      ...res.errorMessage,
      [key]: errorMessage
    };
  }
}
function setResponseValueAndErrors(res, key, value, errorMessage, refs) {
  res[key] = value;
  addErrorMessage(res, key, errorMessage, refs);
}
function parseAnyDef(refs) {
  if (refs.target !== "openAi") {
    return {};
  }
  const anyDefinitionPath = [
    ...refs.basePath,
    refs.definitionPath,
    refs.openAiAnyTypeName
  ];
  refs.flags.hasReferencedOpenAiAnyType = true;
  return {
    $ref: refs.$refStrategy === "relative" ? getRelativePath(anyDefinitionPath, refs.currentPath) : anyDefinitionPath.join("/")
  };
}
function parseArrayDef(def2, refs) {
  const res = {
    type: "array"
  };
  if (def2.type?._def && def2.type?._def?.typeName !== ZodFirstPartyTypeKind.ZodAny) {
    res.items = parseDef(def2.type._def, {
      ...refs,
      currentPath: [...refs.currentPath, "items"]
    });
  }
  if (def2.minLength) {
    setResponseValueAndErrors(res, "minItems", def2.minLength.value, def2.minLength.message, refs);
  }
  if (def2.maxLength) {
    setResponseValueAndErrors(res, "maxItems", def2.maxLength.value, def2.maxLength.message, refs);
  }
  if (def2.exactLength) {
    setResponseValueAndErrors(res, "minItems", def2.exactLength.value, def2.exactLength.message, refs);
    setResponseValueAndErrors(res, "maxItems", def2.exactLength.value, def2.exactLength.message, refs);
  }
  return res;
}
function parseBigintDef(def2, refs) {
  const res = {
    type: "integer",
    format: "int64"
  };
  if (!def2.checks)
    return res;
  for (const check2 of def2.checks) {
    switch (check2.kind) {
      case "min":
        if (refs.target === "jsonSchema7") {
          if (check2.inclusive) {
            setResponseValueAndErrors(res, "minimum", check2.value, check2.message, refs);
          } else {
            setResponseValueAndErrors(res, "exclusiveMinimum", check2.value, check2.message, refs);
          }
        } else {
          if (!check2.inclusive) {
            res.exclusiveMinimum = true;
          }
          setResponseValueAndErrors(res, "minimum", check2.value, check2.message, refs);
        }
        break;
      case "max":
        if (refs.target === "jsonSchema7") {
          if (check2.inclusive) {
            setResponseValueAndErrors(res, "maximum", check2.value, check2.message, refs);
          } else {
            setResponseValueAndErrors(res, "exclusiveMaximum", check2.value, check2.message, refs);
          }
        } else {
          if (!check2.inclusive) {
            res.exclusiveMaximum = true;
          }
          setResponseValueAndErrors(res, "maximum", check2.value, check2.message, refs);
        }
        break;
      case "multipleOf":
        setResponseValueAndErrors(res, "multipleOf", check2.value, check2.message, refs);
        break;
    }
  }
  return res;
}
function parseBooleanDef() {
  return {
    type: "boolean"
  };
}
function parseBrandedDef(_def, refs) {
  return parseDef(_def.type._def, refs);
}
function parseDateDef(def2, refs, overrideDateStrategy) {
  const strategy = overrideDateStrategy ?? refs.dateStrategy;
  if (Array.isArray(strategy)) {
    return {
      anyOf: strategy.map((item, i) => parseDateDef(def2, refs, item))
    };
  }
  switch (strategy) {
    case "string":
    case "format:date-time":
      return {
        type: "string",
        format: "date-time"
      };
    case "format:date":
      return {
        type: "string",
        format: "date"
      };
    case "integer":
      return integerDateParser(def2, refs);
  }
}
function parseDefaultDef(_def, refs) {
  return {
    ...parseDef(_def.innerType._def, refs),
    default: _def.defaultValue()
  };
}
function parseEffectsDef(_def, refs) {
  return refs.effectStrategy === "input" ? parseDef(_def.schema._def, refs) : parseAnyDef(refs);
}
function parseEnumDef(def2) {
  return {
    type: "string",
    enum: Array.from(def2.values)
  };
}
function parseIntersectionDef(def2, refs) {
  const allOf2 = [
    parseDef(def2.left._def, {
      ...refs,
      currentPath: [...refs.currentPath, "allOf", "0"]
    }),
    parseDef(def2.right._def, {
      ...refs,
      currentPath: [...refs.currentPath, "allOf", "1"]
    })
  ].filter((x) => !!x);
  let unevaluatedProperties = refs.target === "jsonSchema2019-09" ? { unevaluatedProperties: false } : void 0;
  const mergedAllOf = [];
  allOf2.forEach((schema) => {
    if (isJsonSchema7AllOfType(schema)) {
      mergedAllOf.push(...schema.allOf);
      if (schema.unevaluatedProperties === void 0) {
        unevaluatedProperties = void 0;
      }
    } else {
      let nestedSchema = schema;
      if ("additionalProperties" in schema && schema.additionalProperties === false) {
        const { additionalProperties: additionalProperties2, ...rest } = schema;
        nestedSchema = rest;
      } else {
        unevaluatedProperties = void 0;
      }
      mergedAllOf.push(nestedSchema);
    }
  });
  return mergedAllOf.length ? {
    allOf: mergedAllOf,
    ...unevaluatedProperties
  } : void 0;
}
function parseLiteralDef(def2, refs) {
  const parsedType = typeof def2.value;
  if (parsedType !== "bigint" && parsedType !== "number" && parsedType !== "boolean" && parsedType !== "string") {
    return {
      type: Array.isArray(def2.value) ? "array" : "object"
    };
  }
  if (refs.target === "openApi3") {
    return {
      type: parsedType === "bigint" ? "integer" : parsedType,
      enum: [def2.value]
    };
  }
  return {
    type: parsedType === "bigint" ? "integer" : parsedType,
    const: def2.value
  };
}
function parseStringDef(def2, refs) {
  const res = {
    type: "string"
  };
  if (def2.checks) {
    for (const check2 of def2.checks) {
      switch (check2.kind) {
        case "min":
          setResponseValueAndErrors(res, "minLength", typeof res.minLength === "number" ? Math.max(res.minLength, check2.value) : check2.value, check2.message, refs);
          break;
        case "max":
          setResponseValueAndErrors(res, "maxLength", typeof res.maxLength === "number" ? Math.min(res.maxLength, check2.value) : check2.value, check2.message, refs);
          break;
        case "email":
          switch (refs.emailStrategy) {
            case "format:email":
              addFormat(res, "email", check2.message, refs);
              break;
            case "format:idn-email":
              addFormat(res, "idn-email", check2.message, refs);
              break;
            case "pattern:zod":
              addPattern(res, zodPatterns.email, check2.message, refs);
              break;
          }
          break;
        case "url":
          addFormat(res, "uri", check2.message, refs);
          break;
        case "uuid":
          addFormat(res, "uuid", check2.message, refs);
          break;
        case "regex":
          addPattern(res, check2.regex, check2.message, refs);
          break;
        case "cuid":
          addPattern(res, zodPatterns.cuid, check2.message, refs);
          break;
        case "cuid2":
          addPattern(res, zodPatterns.cuid2, check2.message, refs);
          break;
        case "startsWith":
          addPattern(res, RegExp(`^${escapeLiteralCheckValue(check2.value, refs)}`), check2.message, refs);
          break;
        case "endsWith":
          addPattern(res, RegExp(`${escapeLiteralCheckValue(check2.value, refs)}$`), check2.message, refs);
          break;
        case "datetime":
          addFormat(res, "date-time", check2.message, refs);
          break;
        case "date":
          addFormat(res, "date", check2.message, refs);
          break;
        case "time":
          addFormat(res, "time", check2.message, refs);
          break;
        case "duration":
          addFormat(res, "duration", check2.message, refs);
          break;
        case "length":
          setResponseValueAndErrors(res, "minLength", typeof res.minLength === "number" ? Math.max(res.minLength, check2.value) : check2.value, check2.message, refs);
          setResponseValueAndErrors(res, "maxLength", typeof res.maxLength === "number" ? Math.min(res.maxLength, check2.value) : check2.value, check2.message, refs);
          break;
        case "includes": {
          addPattern(res, RegExp(escapeLiteralCheckValue(check2.value, refs)), check2.message, refs);
          break;
        }
        case "ip": {
          if (check2.version !== "v6") {
            addFormat(res, "ipv4", check2.message, refs);
          }
          if (check2.version !== "v4") {
            addFormat(res, "ipv6", check2.message, refs);
          }
          break;
        }
        case "base64url":
          addPattern(res, zodPatterns.base64url, check2.message, refs);
          break;
        case "jwt":
          addPattern(res, zodPatterns.jwt, check2.message, refs);
          break;
        case "cidr": {
          if (check2.version !== "v6") {
            addPattern(res, zodPatterns.ipv4Cidr, check2.message, refs);
          }
          if (check2.version !== "v4") {
            addPattern(res, zodPatterns.ipv6Cidr, check2.message, refs);
          }
          break;
        }
        case "emoji":
          addPattern(res, zodPatterns.emoji(), check2.message, refs);
          break;
        case "ulid": {
          addPattern(res, zodPatterns.ulid, check2.message, refs);
          break;
        }
        case "base64": {
          switch (refs.base64Strategy) {
            case "format:binary": {
              addFormat(res, "binary", check2.message, refs);
              break;
            }
            case "contentEncoding:base64": {
              setResponseValueAndErrors(res, "contentEncoding", "base64", check2.message, refs);
              break;
            }
            case "pattern:zod": {
              addPattern(res, zodPatterns.base64, check2.message, refs);
              break;
            }
          }
          break;
        }
        case "nanoid": {
          addPattern(res, zodPatterns.nanoid, check2.message, refs);
        }
      }
    }
  }
  return res;
}
function escapeLiteralCheckValue(literal2, refs) {
  return refs.patternStrategy === "escape" ? escapeNonAlphaNumeric(literal2) : literal2;
}
function escapeNonAlphaNumeric(source2) {
  let result = "";
  for (let i = 0; i < source2.length; i++) {
    if (!ALPHA_NUMERIC.has(source2[i])) {
      result += "\\";
    }
    result += source2[i];
  }
  return result;
}
function addFormat(schema, value, message, refs) {
  if (schema.format || schema.anyOf?.some((x) => x.format)) {
    if (!schema.anyOf) {
      schema.anyOf = [];
    }
    if (schema.format) {
      schema.anyOf.push({
        format: schema.format,
        ...schema.errorMessage && refs.errorMessages && {
          errorMessage: { format: schema.errorMessage.format }
        }
      });
      delete schema.format;
      if (schema.errorMessage) {
        delete schema.errorMessage.format;
        if (Object.keys(schema.errorMessage).length === 0) {
          delete schema.errorMessage;
        }
      }
    }
    schema.anyOf.push({
      format: value,
      ...message && refs.errorMessages && { errorMessage: { format: message } }
    });
  } else {
    setResponseValueAndErrors(schema, "format", value, message, refs);
  }
}
function addPattern(schema, regex2, message, refs) {
  if (schema.pattern || schema.allOf?.some((x) => x.pattern)) {
    if (!schema.allOf) {
      schema.allOf = [];
    }
    if (schema.pattern) {
      schema.allOf.push({
        pattern: schema.pattern,
        ...schema.errorMessage && refs.errorMessages && {
          errorMessage: { pattern: schema.errorMessage.pattern }
        }
      });
      delete schema.pattern;
      if (schema.errorMessage) {
        delete schema.errorMessage.pattern;
        if (Object.keys(schema.errorMessage).length === 0) {
          delete schema.errorMessage;
        }
      }
    }
    schema.allOf.push({
      pattern: stringifyRegExpWithFlags(regex2, refs),
      ...message && refs.errorMessages && { errorMessage: { pattern: message } }
    });
  } else {
    setResponseValueAndErrors(schema, "pattern", stringifyRegExpWithFlags(regex2, refs), message, refs);
  }
}
function stringifyRegExpWithFlags(regex2, refs) {
  if (!refs.applyRegexFlags || !regex2.flags) {
    return regex2.source;
  }
  const flags = {
    i: regex2.flags.includes("i"),
    m: regex2.flags.includes("m"),
    s: regex2.flags.includes("s")
  };
  const source2 = flags.i ? regex2.source.toLowerCase() : regex2.source;
  let pattern2 = "";
  let isEscaped = false;
  let inCharGroup = false;
  let inCharRange = false;
  for (let i = 0; i < source2.length; i++) {
    if (isEscaped) {
      pattern2 += source2[i];
      isEscaped = false;
      continue;
    }
    if (flags.i) {
      if (inCharGroup) {
        if (source2[i].match(/[a-z]/)) {
          if (inCharRange) {
            pattern2 += source2[i];
            pattern2 += `${source2[i - 2]}-${source2[i]}`.toUpperCase();
            inCharRange = false;
          } else if (source2[i + 1] === "-" && source2[i + 2]?.match(/[a-z]/)) {
            pattern2 += source2[i];
            inCharRange = true;
          } else {
            pattern2 += `${source2[i]}${source2[i].toUpperCase()}`;
          }
          continue;
        }
      } else if (source2[i].match(/[a-z]/)) {
        pattern2 += `[${source2[i]}${source2[i].toUpperCase()}]`;
        continue;
      }
    }
    if (flags.m) {
      if (source2[i] === "^") {
        pattern2 += `(^|(?<=[\r
]))`;
        continue;
      } else if (source2[i] === "$") {
        pattern2 += `($|(?=[\r
]))`;
        continue;
      }
    }
    if (flags.s && source2[i] === ".") {
      pattern2 += inCharGroup ? `${source2[i]}\r
` : `[${source2[i]}\r
]`;
      continue;
    }
    pattern2 += source2[i];
    if (source2[i] === "\\") {
      isEscaped = true;
    } else if (inCharGroup && source2[i] === "]") {
      inCharGroup = false;
    } else if (!inCharGroup && source2[i] === "[") {
      inCharGroup = true;
    }
  }
  try {
    new RegExp(pattern2);
  } catch {
    console.warn(`Could not convert regex pattern at ${refs.currentPath.join("/")} to a flag-independent form! Falling back to the flag-ignorant source`);
    return regex2.source;
  }
  return pattern2;
}
function parseRecordDef(def2, refs) {
  if (refs.target === "openAi") {
    console.warn("Warning: OpenAI may not support records in schemas! Try an array of key-value pairs instead.");
  }
  if (refs.target === "openApi3" && def2.keyType?._def.typeName === ZodFirstPartyTypeKind.ZodEnum) {
    return {
      type: "object",
      required: def2.keyType._def.values,
      properties: def2.keyType._def.values.reduce((acc, key) => ({
        ...acc,
        [key]: parseDef(def2.valueType._def, {
          ...refs,
          currentPath: [...refs.currentPath, "properties", key]
        }) ?? parseAnyDef(refs)
      }), {}),
      additionalProperties: refs.rejectedAdditionalProperties
    };
  }
  const schema = {
    type: "object",
    additionalProperties: parseDef(def2.valueType._def, {
      ...refs,
      currentPath: [...refs.currentPath, "additionalProperties"]
    }) ?? refs.allowedAdditionalProperties
  };
  if (refs.target === "openApi3") {
    return schema;
  }
  if (def2.keyType?._def.typeName === ZodFirstPartyTypeKind.ZodString && def2.keyType._def.checks?.length) {
    const { type: type2, ...keyType } = parseStringDef(def2.keyType._def, refs);
    return {
      ...schema,
      propertyNames: keyType
    };
  } else if (def2.keyType?._def.typeName === ZodFirstPartyTypeKind.ZodEnum) {
    return {
      ...schema,
      propertyNames: {
        enum: def2.keyType._def.values
      }
    };
  } else if (def2.keyType?._def.typeName === ZodFirstPartyTypeKind.ZodBranded && def2.keyType._def.type._def.typeName === ZodFirstPartyTypeKind.ZodString && def2.keyType._def.type._def.checks?.length) {
    const { type: type2, ...keyType } = parseBrandedDef(def2.keyType._def, refs);
    return {
      ...schema,
      propertyNames: keyType
    };
  }
  return schema;
}
function parseMapDef(def2, refs) {
  if (refs.mapStrategy === "record") {
    return parseRecordDef(def2, refs);
  }
  const keys2 = parseDef(def2.keyType._def, {
    ...refs,
    currentPath: [...refs.currentPath, "items", "items", "0"]
  }) || parseAnyDef(refs);
  const values = parseDef(def2.valueType._def, {
    ...refs,
    currentPath: [...refs.currentPath, "items", "items", "1"]
  }) || parseAnyDef(refs);
  return {
    type: "array",
    maxItems: 125,
    items: {
      type: "array",
      items: [keys2, values],
      minItems: 2,
      maxItems: 2
    }
  };
}
function parseNativeEnumDef(def2) {
  const object2 = def2.values;
  const actualKeys = Object.keys(def2.values).filter((key) => {
    return typeof object2[object2[key]] !== "number";
  });
  const actualValues = actualKeys.map((key) => object2[key]);
  const parsedTypes = Array.from(new Set(actualValues.map((values) => typeof values)));
  return {
    type: parsedTypes.length === 1 ? parsedTypes[0] === "string" ? "string" : "number" : ["string", "number"],
    enum: actualValues
  };
}
function parseNeverDef(refs) {
  return refs.target === "openAi" ? void 0 : {
    not: parseAnyDef({
      ...refs,
      currentPath: [...refs.currentPath, "not"]
    })
  };
}
function parseNullDef(refs) {
  return refs.target === "openApi3" ? {
    enum: ["null"],
    nullable: true
  } : {
    type: "null"
  };
}
function parseUnionDef(def2, refs) {
  if (refs.target === "openApi3")
    return asAnyOf(def2, refs);
  const options2 = def2.options instanceof Map ? Array.from(def2.options.values()) : def2.options;
  if (options2.every((x) => x._def.typeName in primitiveMappings && (!x._def.checks || !x._def.checks.length))) {
    const types2 = options2.reduce((types3, x) => {
      const type2 = primitiveMappings[x._def.typeName];
      return type2 && !types3.includes(type2) ? [...types3, type2] : types3;
    }, []);
    return {
      type: types2.length > 1 ? types2 : types2[0]
    };
  } else if (options2.every((x) => x._def.typeName === "ZodLiteral" && !x.description)) {
    const types2 = options2.reduce((acc, x) => {
      const type2 = typeof x._def.value;
      switch (type2) {
        case "string":
        case "number":
        case "boolean":
          return [...acc, type2];
        case "bigint":
          return [...acc, "integer"];
        case "object":
          if (x._def.value === null)
            return [...acc, "null"];
        case "symbol":
        case "undefined":
        case "function":
        default:
          return acc;
      }
    }, []);
    if (types2.length === options2.length) {
      const uniqueTypes = types2.filter((x, i, a) => a.indexOf(x) === i);
      return {
        type: uniqueTypes.length > 1 ? uniqueTypes : uniqueTypes[0],
        enum: options2.reduce((acc, x) => {
          return acc.includes(x._def.value) ? acc : [...acc, x._def.value];
        }, [])
      };
    }
  } else if (options2.every((x) => x._def.typeName === "ZodEnum")) {
    return {
      type: "string",
      enum: options2.reduce((acc, x) => [
        ...acc,
        ...x._def.values.filter((x2) => !acc.includes(x2))
      ], [])
    };
  }
  return asAnyOf(def2, refs);
}
function parseNullableDef(def2, refs) {
  if (["ZodString", "ZodNumber", "ZodBigInt", "ZodBoolean", "ZodNull"].includes(def2.innerType._def.typeName) && (!def2.innerType._def.checks || !def2.innerType._def.checks.length)) {
    if (refs.target === "openApi3") {
      return {
        type: primitiveMappings[def2.innerType._def.typeName],
        nullable: true
      };
    }
    return {
      type: [
        primitiveMappings[def2.innerType._def.typeName],
        "null"
      ]
    };
  }
  if (refs.target === "openApi3") {
    const base2 = parseDef(def2.innerType._def, {
      ...refs,
      currentPath: [...refs.currentPath]
    });
    if (base2 && "$ref" in base2)
      return { allOf: [base2], nullable: true };
    return base2 && { ...base2, nullable: true };
  }
  const base = parseDef(def2.innerType._def, {
    ...refs,
    currentPath: [...refs.currentPath, "anyOf", "0"]
  });
  return base && { anyOf: [base, { type: "null" }] };
}
function parseNumberDef(def2, refs) {
  const res = {
    type: "number"
  };
  if (!def2.checks)
    return res;
  for (const check2 of def2.checks) {
    switch (check2.kind) {
      case "int":
        res.type = "integer";
        addErrorMessage(res, "type", check2.message, refs);
        break;
      case "min":
        if (refs.target === "jsonSchema7") {
          if (check2.inclusive) {
            setResponseValueAndErrors(res, "minimum", check2.value, check2.message, refs);
          } else {
            setResponseValueAndErrors(res, "exclusiveMinimum", check2.value, check2.message, refs);
          }
        } else {
          if (!check2.inclusive) {
            res.exclusiveMinimum = true;
          }
          setResponseValueAndErrors(res, "minimum", check2.value, check2.message, refs);
        }
        break;
      case "max":
        if (refs.target === "jsonSchema7") {
          if (check2.inclusive) {
            setResponseValueAndErrors(res, "maximum", check2.value, check2.message, refs);
          } else {
            setResponseValueAndErrors(res, "exclusiveMaximum", check2.value, check2.message, refs);
          }
        } else {
          if (!check2.inclusive) {
            res.exclusiveMaximum = true;
          }
          setResponseValueAndErrors(res, "maximum", check2.value, check2.message, refs);
        }
        break;
      case "multipleOf":
        setResponseValueAndErrors(res, "multipleOf", check2.value, check2.message, refs);
        break;
    }
  }
  return res;
}
function parseObjectDef(def2, refs) {
  const forceOptionalIntoNullable = refs.target === "openAi";
  const result = {
    type: "object",
    properties: {}
  };
  const required2 = [];
  const shape = def2.shape();
  for (const propName in shape) {
    let propDef = shape[propName];
    if (propDef === void 0 || propDef._def === void 0) {
      continue;
    }
    let propOptional = safeIsOptional(propDef);
    if (propOptional && forceOptionalIntoNullable) {
      if (propDef._def.typeName === "ZodOptional") {
        propDef = propDef._def.innerType;
      }
      if (!propDef.isNullable()) {
        propDef = propDef.nullable();
      }
      propOptional = false;
    }
    const parsedDef = parseDef(propDef._def, {
      ...refs,
      currentPath: [...refs.currentPath, "properties", propName],
      propertyPath: [...refs.currentPath, "properties", propName]
    });
    if (parsedDef === void 0) {
      continue;
    }
    result.properties[propName] = parsedDef;
    if (!propOptional) {
      required2.push(propName);
    }
  }
  if (required2.length) {
    result.required = required2;
  }
  const additionalProperties2 = decideAdditionalProperties(def2, refs);
  if (additionalProperties2 !== void 0) {
    result.additionalProperties = additionalProperties2;
  }
  return result;
}
function decideAdditionalProperties(def2, refs) {
  if (def2.catchall._def.typeName !== "ZodNever") {
    return parseDef(def2.catchall._def, {
      ...refs,
      currentPath: [...refs.currentPath, "additionalProperties"]
    });
  }
  switch (def2.unknownKeys) {
    case "passthrough":
      return refs.allowedAdditionalProperties;
    case "strict":
      return refs.rejectedAdditionalProperties;
    case "strip":
      return refs.removeAdditionalStrategy === "strict" ? refs.allowedAdditionalProperties : refs.rejectedAdditionalProperties;
  }
}
function safeIsOptional(schema) {
  try {
    return schema.isOptional();
  } catch {
    return true;
  }
}
function parsePromiseDef(def2, refs) {
  return parseDef(def2.type._def, refs);
}
function parseSetDef(def2, refs) {
  const items2 = parseDef(def2.valueType._def, {
    ...refs,
    currentPath: [...refs.currentPath, "items"]
  });
  const schema = {
    type: "array",
    uniqueItems: true,
    items: items2
  };
  if (def2.minSize) {
    setResponseValueAndErrors(schema, "minItems", def2.minSize.value, def2.minSize.message, refs);
  }
  if (def2.maxSize) {
    setResponseValueAndErrors(schema, "maxItems", def2.maxSize.value, def2.maxSize.message, refs);
  }
  return schema;
}
function parseTupleDef(def2, refs) {
  if (def2.rest) {
    return {
      type: "array",
      minItems: def2.items.length,
      items: def2.items.map((x, i) => parseDef(x._def, {
        ...refs,
        currentPath: [...refs.currentPath, "items", `${i}`]
      })).reduce((acc, x) => x === void 0 ? acc : [...acc, x], []),
      additionalItems: parseDef(def2.rest._def, {
        ...refs,
        currentPath: [...refs.currentPath, "additionalItems"]
      })
    };
  } else {
    return {
      type: "array",
      minItems: def2.items.length,
      maxItems: def2.items.length,
      items: def2.items.map((x, i) => parseDef(x._def, {
        ...refs,
        currentPath: [...refs.currentPath, "items", `${i}`]
      })).reduce((acc, x) => x === void 0 ? acc : [...acc, x], [])
    };
  }
}
function parseUndefinedDef(refs) {
  return {
    not: parseAnyDef(refs)
  };
}
function parseUnknownDef(refs) {
  return parseAnyDef(refs);
}
function parseDef(def2, refs, forceResolution = false) {
  const seenItem = refs.seen.get(def2);
  if (refs.override) {
    const overrideResult = refs.override?.(def2, refs, seenItem, forceResolution);
    if (overrideResult !== ignoreOverride) {
      return overrideResult;
    }
  }
  if (seenItem && !forceResolution) {
    const seenSchema = get$ref(seenItem, refs);
    if (seenSchema !== void 0) {
      return seenSchema;
    }
  }
  const newItem = { def: def2, path: refs.currentPath, jsonSchema: void 0 };
  refs.seen.set(def2, newItem);
  const jsonSchemaOrGetter = selectParser(def2, def2.typeName, refs);
  const jsonSchema = typeof jsonSchemaOrGetter === "function" ? parseDef(jsonSchemaOrGetter(), refs) : jsonSchemaOrGetter;
  if (jsonSchema) {
    addMeta(def2, refs, jsonSchema);
  }
  if (refs.postProcess) {
    const postProcessResult = refs.postProcess(jsonSchema, def2, refs);
    newItem.jsonSchema = jsonSchema;
    return postProcessResult;
  }
  newItem.jsonSchema = jsonSchema;
  return jsonSchema;
}
function mapMiniTarget(t) {
  if (!t)
    return "draft-7";
  if (t === "jsonSchema7" || t === "draft-7")
    return "draft-7";
  if (t === "jsonSchema2019-09" || t === "draft-2020-12")
    return "draft-2020-12";
  return "draft-7";
}
function toJsonSchemaCompat(schema, opts) {
  if (isZ4Schema(schema)) {
    return toJSONSchema(schema, {
      target: mapMiniTarget(opts?.target),
      io: opts?.pipeStrategy ?? "input"
    });
  }
  return zodToJsonSchema(schema, {
    strictUnions: opts?.strictUnions ?? true,
    pipeStrategy: opts?.pipeStrategy ?? "input"
  });
}
function getMethodLiteral(schema) {
  const shape = getObjectShape(schema);
  const methodSchema = shape?.method;
  if (!methodSchema) {
    throw new Error("Schema is missing a method literal");
  }
  const value = getLiteralValue(methodSchema);
  if (typeof value !== "string") {
    throw new Error("Schema method literal must be a string");
  }
  return value;
}
function parseWithCompat(schema, data32) {
  const result = safeParse$1(schema, data32);
  if (!result.success) {
    throw result.error;
  }
  return result.data;
}
function isPlainObject(value) {
  return value !== null && typeof value === "object" && !Array.isArray(value);
}
function mergeCapabilities(base, additional) {
  const result = { ...base };
  for (const key in additional) {
    const k = key;
    const addValue = additional[k];
    if (addValue === void 0)
      continue;
    const baseValue = result[k];
    if (isPlainObject(baseValue) && isPlainObject(addValue)) {
      result[k] = { ...baseValue, ...addValue };
    } else {
      result[k] = addValue;
    }
  }
  return result;
}
function requireCode$4() {
  if (hasRequiredCode$4) return code$4;
  hasRequiredCode$4 = 1;
  (function(exports$1) {
    Object.defineProperty(exports$1, "__esModule", { value: true });
    exports$1.regexpCode = exports$1.getEsmExportName = exports$1.getProperty = exports$1.safeStringify = exports$1.stringify = exports$1.strConcat = exports$1.addCodeArg = exports$1.str = exports$1._ = exports$1.nil = exports$1._Code = exports$1.Name = exports$1.IDENTIFIER = exports$1._CodeOrName = void 0;
    class _CodeOrName {
    }
    exports$1._CodeOrName = _CodeOrName;
    exports$1.IDENTIFIER = /^[a-z$_][a-z$_0-9]*$/i;
    class Name3 extends _CodeOrName {
      constructor(s) {
        super();
        if (!exports$1.IDENTIFIER.test(s))
          throw new Error("CodeGen: name must be a valid identifier");
        this.str = s;
      }
      toString() {
        return this.str;
      }
      emptyStr() {
        return false;
      }
      get names() {
        return { [this.str]: 1 };
      }
    }
    exports$1.Name = Name3;
    class _Code extends _CodeOrName {
      constructor(code2) {
        super();
        this._items = typeof code2 === "string" ? [code2] : code2;
      }
      toString() {
        return this.str;
      }
      emptyStr() {
        if (this._items.length > 1)
          return false;
        const item = this._items[0];
        return item === "" || item === '""';
      }
      get str() {
        var _a4;
        return (_a4 = this._str) !== null && _a4 !== void 0 ? _a4 : this._str = this._items.reduce((s, c) => `${s}${c}`, "");
      }
      get names() {
        var _a4;
        return (_a4 = this._names) !== null && _a4 !== void 0 ? _a4 : this._names = this._items.reduce((names3, c) => {
          if (c instanceof Name3)
            names3[c.str] = (names3[c.str] || 0) + 1;
          return names3;
        }, {});
      }
    }
    exports$1._Code = _Code;
    exports$1.nil = new _Code("");
    function _(strs, ...args2) {
      const code2 = [strs[0]];
      let i = 0;
      while (i < args2.length) {
        addCodeArg(code2, args2[i]);
        code2.push(strs[++i]);
      }
      return new _Code(code2);
    }
    exports$1._ = _;
    const plus = new _Code("+");
    function str(strs, ...args2) {
      const expr = [safeStringify(strs[0])];
      let i = 0;
      while (i < args2.length) {
        expr.push(plus);
        addCodeArg(expr, args2[i]);
        expr.push(plus, safeStringify(strs[++i]));
      }
      optimize(expr);
      return new _Code(expr);
    }
    exports$1.str = str;
    function addCodeArg(code2, arg) {
      if (arg instanceof _Code)
        code2.push(...arg._items);
      else if (arg instanceof Name3)
        code2.push(arg);
      else
        code2.push(interpolate(arg));
    }
    exports$1.addCodeArg = addCodeArg;
    function optimize(expr) {
      let i = 1;
      while (i < expr.length - 1) {
        if (expr[i] === plus) {
          const res = mergeExprItems(expr[i - 1], expr[i + 1]);
          if (res !== void 0) {
            expr.splice(i - 1, 3, res);
            continue;
          }
          expr[i++] = "+";
        }
        i++;
      }
    }
    function mergeExprItems(a, b) {
      if (b === '""')
        return a;
      if (a === '""')
        return b;
      if (typeof a == "string") {
        if (b instanceof Name3 || a[a.length - 1] !== '"')
          return;
        if (typeof b != "string")
          return `${a.slice(0, -1)}${b}"`;
        if (b[0] === '"')
          return a.slice(0, -1) + b.slice(1);
        return;
      }
      if (typeof b == "string" && b[0] === '"' && !(a instanceof Name3))
        return `"${a}${b.slice(1)}`;
      return;
    }
    function strConcat(c1, c2) {
      return c2.emptyStr() ? c1 : c1.emptyStr() ? c2 : str`${c1}${c2}`;
    }
    exports$1.strConcat = strConcat;
    function interpolate(x) {
      return typeof x == "number" || typeof x == "boolean" || x === null ? x : safeStringify(Array.isArray(x) ? x.join(",") : x);
    }
    function stringify2(x) {
      return new _Code(safeStringify(x));
    }
    exports$1.stringify = stringify2;
    function safeStringify(x) {
      return JSON.stringify(x).replace(/\u2028/g, "\\u2028").replace(/\u2029/g, "\\u2029");
    }
    exports$1.safeStringify = safeStringify;
    function getProperty(key) {
      return typeof key == "string" && exports$1.IDENTIFIER.test(key) ? new _Code(`.${key}`) : _`[${key}]`;
    }
    exports$1.getProperty = getProperty;
    function getEsmExportName(key) {
      if (typeof key == "string" && exports$1.IDENTIFIER.test(key)) {
        return new _Code(`${key}`);
      }
      throw new Error(`CodeGen: invalid export name: ${key}, use explicit $id name mapping`);
    }
    exports$1.getEsmExportName = getEsmExportName;
    function regexpCode(rx) {
      return new _Code(rx.toString());
    }
    exports$1.regexpCode = regexpCode;
  })(code$4);
  return code$4;
}
function requireScope$2() {
  if (hasRequiredScope$2) return scope$2;
  hasRequiredScope$2 = 1;
  (function(exports$1) {
    Object.defineProperty(exports$1, "__esModule", { value: true });
    exports$1.ValueScope = exports$1.ValueScopeName = exports$1.Scope = exports$1.varKinds = exports$1.UsedValueState = void 0;
    const code_1 = requireCode$4();
    class ValueError extends Error {
      constructor(name) {
        super(`CodeGen: "code" for ${name} not defined`);
        this.value = name.value;
      }
    }
    var UsedValueState;
    (function(UsedValueState2) {
      UsedValueState2[UsedValueState2["Started"] = 0] = "Started";
      UsedValueState2[UsedValueState2["Completed"] = 1] = "Completed";
    })(UsedValueState || (exports$1.UsedValueState = UsedValueState = {}));
    exports$1.varKinds = {
      const: new code_1.Name("const"),
      let: new code_1.Name("let"),
      var: new code_1.Name("var")
    };
    class Scope3 {
      constructor({ prefixes, parent } = {}) {
        this._names = {};
        this._prefixes = prefixes;
        this._parent = parent;
      }
      toName(nameOrPrefix) {
        return nameOrPrefix instanceof code_1.Name ? nameOrPrefix : this.name(nameOrPrefix);
      }
      name(prefix) {
        return new code_1.Name(this._newName(prefix));
      }
      _newName(prefix) {
        const ng = this._names[prefix] || this._nameGroup(prefix);
        return `${prefix}${ng.index++}`;
      }
      _nameGroup(prefix) {
        var _a4, _b2;
        if (((_b2 = (_a4 = this._parent) === null || _a4 === void 0 ? void 0 : _a4._prefixes) === null || _b2 === void 0 ? void 0 : _b2.has(prefix)) || this._prefixes && !this._prefixes.has(prefix)) {
          throw new Error(`CodeGen: prefix "${prefix}" is not allowed in this scope`);
        }
        return this._names[prefix] = { prefix, index: 0 };
      }
    }
    exports$1.Scope = Scope3;
    class ValueScopeName extends code_1.Name {
      constructor(prefix, nameStr) {
        super(nameStr);
        this.prefix = prefix;
      }
      setValue(value, { property, itemIndex }) {
        this.value = value;
        this.scopePath = (0, code_1._)`.${new code_1.Name(property)}[${itemIndex}]`;
      }
    }
    exports$1.ValueScopeName = ValueScopeName;
    const line = (0, code_1._)`\n`;
    class ValueScope extends Scope3 {
      constructor(opts) {
        super(opts);
        this._values = {};
        this._scope = opts.scope;
        this.opts = { ...opts, _n: opts.lines ? line : code_1.nil };
      }
      get() {
        return this._scope;
      }
      name(prefix) {
        return new ValueScopeName(prefix, this._newName(prefix));
      }
      value(nameOrPrefix, value) {
        var _a4;
        if (value.ref === void 0)
          throw new Error("CodeGen: ref must be passed in value");
        const name = this.toName(nameOrPrefix);
        const { prefix } = name;
        const valueKey = (_a4 = value.key) !== null && _a4 !== void 0 ? _a4 : value.ref;
        let vs = this._values[prefix];
        if (vs) {
          const _name = vs.get(valueKey);
          if (_name)
            return _name;
        } else {
          vs = this._values[prefix] = /* @__PURE__ */ new Map();
        }
        vs.set(valueKey, name);
        const s = this._scope[prefix] || (this._scope[prefix] = []);
        const itemIndex = s.length;
        s[itemIndex] = value.ref;
        name.setValue(value, { property: prefix, itemIndex });
        return name;
      }
      getValue(prefix, keyOrRef) {
        const vs = this._values[prefix];
        if (!vs)
          return;
        return vs.get(keyOrRef);
      }
      scopeRefs(scopeName, values = this._values) {
        return this._reduceValues(values, (name) => {
          if (name.scopePath === void 0)
            throw new Error(`CodeGen: name "${name}" has no value`);
          return (0, code_1._)`${scopeName}${name.scopePath}`;
        });
      }
      scopeCode(values = this._values, usedValues, getCode) {
        return this._reduceValues(values, (name) => {
          if (name.value === void 0)
            throw new Error(`CodeGen: name "${name}" has no value`);
          return name.value.code;
        }, usedValues, getCode);
      }
      _reduceValues(values, valueCode, usedValues = {}, getCode) {
        let code2 = code_1.nil;
        for (const prefix in values) {
          const vs = values[prefix];
          if (!vs)
            continue;
          const nameSet = usedValues[prefix] = usedValues[prefix] || /* @__PURE__ */ new Map();
          vs.forEach((name) => {
            if (nameSet.has(name))
              return;
            nameSet.set(name, UsedValueState.Started);
            let c = valueCode(name);
            if (c) {
              const def2 = this.opts.es5 ? exports$1.varKinds.var : exports$1.varKinds.const;
              code2 = (0, code_1._)`${code2}${def2} ${name} = ${c};${this.opts._n}`;
            } else if (c = getCode === null || getCode === void 0 ? void 0 : getCode(name)) {
              code2 = (0, code_1._)`${code2}${c}${this.opts._n}`;
            } else {
              throw new ValueError(name);
            }
            nameSet.set(name, UsedValueState.Completed);
          });
        }
        return code2;
      }
    }
    exports$1.ValueScope = ValueScope;
  })(scope$2);
  return scope$2;
}
function requireCodegen$1() {
  if (hasRequiredCodegen$1) return codegen$1;
  hasRequiredCodegen$1 = 1;
  (function(exports$1) {
    Object.defineProperty(exports$1, "__esModule", { value: true });
    exports$1.or = exports$1.and = exports$1.not = exports$1.CodeGen = exports$1.operators = exports$1.varKinds = exports$1.ValueScopeName = exports$1.ValueScope = exports$1.Scope = exports$1.Name = exports$1.regexpCode = exports$1.stringify = exports$1.getProperty = exports$1.nil = exports$1.strConcat = exports$1.str = exports$1._ = void 0;
    const code_1 = requireCode$4();
    const scope_1 = requireScope$2();
    var code_2 = requireCode$4();
    Object.defineProperty(exports$1, "_", { enumerable: true, get: function() {
      return code_2._;
    } });
    Object.defineProperty(exports$1, "str", { enumerable: true, get: function() {
      return code_2.str;
    } });
    Object.defineProperty(exports$1, "strConcat", { enumerable: true, get: function() {
      return code_2.strConcat;
    } });
    Object.defineProperty(exports$1, "nil", { enumerable: true, get: function() {
      return code_2.nil;
    } });
    Object.defineProperty(exports$1, "getProperty", { enumerable: true, get: function() {
      return code_2.getProperty;
    } });
    Object.defineProperty(exports$1, "stringify", { enumerable: true, get: function() {
      return code_2.stringify;
    } });
    Object.defineProperty(exports$1, "regexpCode", { enumerable: true, get: function() {
      return code_2.regexpCode;
    } });
    Object.defineProperty(exports$1, "Name", { enumerable: true, get: function() {
      return code_2.Name;
    } });
    var scope_2 = requireScope$2();
    Object.defineProperty(exports$1, "Scope", { enumerable: true, get: function() {
      return scope_2.Scope;
    } });
    Object.defineProperty(exports$1, "ValueScope", { enumerable: true, get: function() {
      return scope_2.ValueScope;
    } });
    Object.defineProperty(exports$1, "ValueScopeName", { enumerable: true, get: function() {
      return scope_2.ValueScopeName;
    } });
    Object.defineProperty(exports$1, "varKinds", { enumerable: true, get: function() {
      return scope_2.varKinds;
    } });
    exports$1.operators = {
      GT: new code_1._Code(">"),
      GTE: new code_1._Code(">="),
      LT: new code_1._Code("<"),
      LTE: new code_1._Code("<="),
      EQ: new code_1._Code("==="),
      NEQ: new code_1._Code("!=="),
      NOT: new code_1._Code("!"),
      OR: new code_1._Code("||"),
      AND: new code_1._Code("&&"),
      ADD: new code_1._Code("+")
    };
    class Node4 {
      optimizeNodes() {
        return this;
      }
      optimizeNames(_names, _constants) {
        return this;
      }
    }
    class Def extends Node4 {
      constructor(varKind, name, rhs) {
        super();
        this.varKind = varKind;
        this.name = name;
        this.rhs = rhs;
      }
      render({ es5, _n }) {
        const varKind = es5 ? scope_1.varKinds.var : this.varKind;
        const rhs = this.rhs === void 0 ? "" : ` = ${this.rhs}`;
        return `${varKind} ${this.name}${rhs};` + _n;
      }
      optimizeNames(names3, constants2) {
        if (!names3[this.name.str])
          return;
        if (this.rhs)
          this.rhs = optimizeExpr(this.rhs, names3, constants2);
        return this;
      }
      get names() {
        return this.rhs instanceof code_1._CodeOrName ? this.rhs.names : {};
      }
    }
    class Assign extends Node4 {
      constructor(lhs, rhs, sideEffects) {
        super();
        this.lhs = lhs;
        this.rhs = rhs;
        this.sideEffects = sideEffects;
      }
      render({ _n }) {
        return `${this.lhs} = ${this.rhs};` + _n;
      }
      optimizeNames(names3, constants2) {
        if (this.lhs instanceof code_1.Name && !names3[this.lhs.str] && !this.sideEffects)
          return;
        this.rhs = optimizeExpr(this.rhs, names3, constants2);
        return this;
      }
      get names() {
        const names3 = this.lhs instanceof code_1.Name ? {} : { ...this.lhs.names };
        return addExprNames(names3, this.rhs);
      }
    }
    class AssignOp extends Assign {
      constructor(lhs, op, rhs, sideEffects) {
        super(lhs, rhs, sideEffects);
        this.op = op;
      }
      render({ _n }) {
        return `${this.lhs} ${this.op}= ${this.rhs};` + _n;
      }
    }
    class Label2 extends Node4 {
      constructor(label) {
        super();
        this.label = label;
        this.names = {};
      }
      render({ _n }) {
        return `${this.label}:` + _n;
      }
    }
    class Break extends Node4 {
      constructor(label) {
        super();
        this.label = label;
        this.names = {};
      }
      render({ _n }) {
        const label = this.label ? ` ${this.label}` : "";
        return `break${label};` + _n;
      }
    }
    class Throw extends Node4 {
      constructor(error) {
        super();
        this.error = error;
      }
      render({ _n }) {
        return `throw ${this.error};` + _n;
      }
      get names() {
        return this.error.names;
      }
    }
    class AnyCode extends Node4 {
      constructor(code2) {
        super();
        this.code = code2;
      }
      render({ _n }) {
        return `${this.code};` + _n;
      }
      optimizeNodes() {
        return `${this.code}` ? this : void 0;
      }
      optimizeNames(names3, constants2) {
        this.code = optimizeExpr(this.code, names3, constants2);
        return this;
      }
      get names() {
        return this.code instanceof code_1._CodeOrName ? this.code.names : {};
      }
    }
    class ParentNode extends Node4 {
      constructor(nodes = []) {
        super();
        this.nodes = nodes;
      }
      render(opts) {
        return this.nodes.reduce((code2, n) => code2 + n.render(opts), "");
      }
      optimizeNodes() {
        const { nodes } = this;
        let i = nodes.length;
        while (i--) {
          const n = nodes[i].optimizeNodes();
          if (Array.isArray(n))
            nodes.splice(i, 1, ...n);
          else if (n)
            nodes[i] = n;
          else
            nodes.splice(i, 1);
        }
        return nodes.length > 0 ? this : void 0;
      }
      optimizeNames(names3, constants2) {
        const { nodes } = this;
        let i = nodes.length;
        while (i--) {
          const n = nodes[i];
          if (n.optimizeNames(names3, constants2))
            continue;
          subtractNames(names3, n.names);
          nodes.splice(i, 1);
        }
        return nodes.length > 0 ? this : void 0;
      }
      get names() {
        return this.nodes.reduce((names3, n) => addNames(names3, n.names), {});
      }
    }
    class BlockNode extends ParentNode {
      render(opts) {
        return "{" + opts._n + super.render(opts) + "}" + opts._n;
      }
    }
    class Root extends ParentNode {
    }
    class Else extends BlockNode {
    }
    Else.kind = "else";
    class If extends BlockNode {
      constructor(condition, nodes) {
        super(nodes);
        this.condition = condition;
      }
      render(opts) {
        let code2 = `if(${this.condition})` + super.render(opts);
        if (this.else)
          code2 += "else " + this.else.render(opts);
        return code2;
      }
      optimizeNodes() {
        super.optimizeNodes();
        const cond = this.condition;
        if (cond === true)
          return this.nodes;
        let e = this.else;
        if (e) {
          const ns = e.optimizeNodes();
          e = this.else = Array.isArray(ns) ? new Else(ns) : ns;
        }
        if (e) {
          if (cond === false)
            return e instanceof If ? e : e.nodes;
          if (this.nodes.length)
            return this;
          return new If(not2(cond), e instanceof If ? [e] : e.nodes);
        }
        if (cond === false || !this.nodes.length)
          return void 0;
        return this;
      }
      optimizeNames(names3, constants2) {
        var _a4;
        this.else = (_a4 = this.else) === null || _a4 === void 0 ? void 0 : _a4.optimizeNames(names3, constants2);
        if (!(super.optimizeNames(names3, constants2) || this.else))
          return;
        this.condition = optimizeExpr(this.condition, names3, constants2);
        return this;
      }
      get names() {
        const names3 = super.names;
        addExprNames(names3, this.condition);
        if (this.else)
          addNames(names3, this.else.names);
        return names3;
      }
    }
    If.kind = "if";
    class For extends BlockNode {
    }
    For.kind = "for";
    class ForLoop extends For {
      constructor(iteration) {
        super();
        this.iteration = iteration;
      }
      render(opts) {
        return `for(${this.iteration})` + super.render(opts);
      }
      optimizeNames(names3, constants2) {
        if (!super.optimizeNames(names3, constants2))
          return;
        this.iteration = optimizeExpr(this.iteration, names3, constants2);
        return this;
      }
      get names() {
        return addNames(super.names, this.iteration.names);
      }
    }
    class ForRange extends For {
      constructor(varKind, name, from2, to) {
        super();
        this.varKind = varKind;
        this.name = name;
        this.from = from2;
        this.to = to;
      }
      render(opts) {
        const varKind = opts.es5 ? scope_1.varKinds.var : this.varKind;
        const { name, from: from2, to } = this;
        return `for(${varKind} ${name}=${from2}; ${name}<${to}; ${name}++)` + super.render(opts);
      }
      get names() {
        const names3 = addExprNames(super.names, this.from);
        return addExprNames(names3, this.to);
      }
    }
    class ForIter extends For {
      constructor(loop, varKind, name, iterable) {
        super();
        this.loop = loop;
        this.varKind = varKind;
        this.name = name;
        this.iterable = iterable;
      }
      render(opts) {
        return `for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})` + super.render(opts);
      }
      optimizeNames(names3, constants2) {
        if (!super.optimizeNames(names3, constants2))
          return;
        this.iterable = optimizeExpr(this.iterable, names3, constants2);
        return this;
      }
      get names() {
        return addNames(super.names, this.iterable.names);
      }
    }
    class Func extends BlockNode {
      constructor(name, args2, async2) {
        super();
        this.name = name;
        this.args = args2;
        this.async = async2;
      }
      render(opts) {
        const _async = this.async ? "async " : "";
        return `${_async}function ${this.name}(${this.args})` + super.render(opts);
      }
    }
    Func.kind = "func";
    class Return extends ParentNode {
      render(opts) {
        return "return " + super.render(opts);
      }
    }
    Return.kind = "return";
    class Try extends BlockNode {
      render(opts) {
        let code2 = "try" + super.render(opts);
        if (this.catch)
          code2 += this.catch.render(opts);
        if (this.finally)
          code2 += this.finally.render(opts);
        return code2;
      }
      optimizeNodes() {
        var _a4, _b2;
        super.optimizeNodes();
        (_a4 = this.catch) === null || _a4 === void 0 ? void 0 : _a4.optimizeNodes();
        (_b2 = this.finally) === null || _b2 === void 0 ? void 0 : _b2.optimizeNodes();
        return this;
      }
      optimizeNames(names3, constants2) {
        var _a4, _b2;
        super.optimizeNames(names3, constants2);
        (_a4 = this.catch) === null || _a4 === void 0 ? void 0 : _a4.optimizeNames(names3, constants2);
        (_b2 = this.finally) === null || _b2 === void 0 ? void 0 : _b2.optimizeNames(names3, constants2);
        return this;
      }
      get names() {
        const names3 = super.names;
        if (this.catch)
          addNames(names3, this.catch.names);
        if (this.finally)
          addNames(names3, this.finally.names);
        return names3;
      }
    }
    class Catch extends BlockNode {
      constructor(error) {
        super();
        this.error = error;
      }
      render(opts) {
        return `catch(${this.error})` + super.render(opts);
      }
    }
    Catch.kind = "catch";
    class Finally extends BlockNode {
      render(opts) {
        return "finally" + super.render(opts);
      }
    }
    Finally.kind = "finally";
    class CodeGen {
      constructor(extScope, opts = {}) {
        this._values = {};
        this._blockStarts = [];
        this._constants = {};
        this.opts = { ...opts, _n: opts.lines ? "\n" : "" };
        this._extScope = extScope;
        this._scope = new scope_1.Scope({ parent: extScope });
        this._nodes = [new Root()];
      }
      toString() {
        return this._root.render(this.opts);
      }
      name(prefix) {
        return this._scope.name(prefix);
      }
      scopeName(prefix) {
        return this._extScope.name(prefix);
      }
      scopeValue(prefixOrName, value) {
        const name = this._extScope.value(prefixOrName, value);
        const vs = this._values[name.prefix] || (this._values[name.prefix] = /* @__PURE__ */ new Set());
        vs.add(name);
        return name;
      }
      getScopeValue(prefix, keyOrRef) {
        return this._extScope.getValue(prefix, keyOrRef);
      }
      scopeRefs(scopeName) {
        return this._extScope.scopeRefs(scopeName, this._values);
      }
      scopeCode() {
        return this._extScope.scopeCode(this._values);
      }
      _def(varKind, nameOrPrefix, rhs, constant) {
        const name = this._scope.toName(nameOrPrefix);
        if (rhs !== void 0 && constant)
          this._constants[name.str] = rhs;
        this._leafNode(new Def(varKind, name, rhs));
        return name;
      }
      const(nameOrPrefix, rhs, _constant) {
        return this._def(scope_1.varKinds.const, nameOrPrefix, rhs, _constant);
      }
      let(nameOrPrefix, rhs, _constant) {
        return this._def(scope_1.varKinds.let, nameOrPrefix, rhs, _constant);
      }
      var(nameOrPrefix, rhs, _constant) {
        return this._def(scope_1.varKinds.var, nameOrPrefix, rhs, _constant);
      }
      assign(lhs, rhs, sideEffects) {
        return this._leafNode(new Assign(lhs, rhs, sideEffects));
      }
      add(lhs, rhs) {
        return this._leafNode(new AssignOp(lhs, exports$1.operators.ADD, rhs));
      }
      code(c) {
        if (typeof c == "function")
          c();
        else if (c !== code_1.nil)
          this._leafNode(new AnyCode(c));
        return this;
      }
      object(...keyValues) {
        const code2 = ["{"];
        for (const [key, value] of keyValues) {
          if (code2.length > 1)
            code2.push(",");
          code2.push(key);
          if (key !== value || this.opts.es5) {
            code2.push(":");
            (0, code_1.addCodeArg)(code2, value);
          }
        }
        code2.push("}");
        return new code_1._Code(code2);
      }
      if(condition, thenBody, elseBody) {
        this._blockNode(new If(condition));
        if (thenBody && elseBody) {
          this.code(thenBody).else().code(elseBody).endIf();
        } else if (thenBody) {
          this.code(thenBody).endIf();
        } else if (elseBody) {
          throw new Error('CodeGen: "else" body without "then" body');
        }
        return this;
      }
      elseIf(condition) {
        return this._elseNode(new If(condition));
      }
      else() {
        return this._elseNode(new Else());
      }
      endIf() {
        return this._endBlockNode(If, Else);
      }
      _for(node2, forBody) {
        this._blockNode(node2);
        if (forBody)
          this.code(forBody).endFor();
        return this;
      }
      for(iteration, forBody) {
        return this._for(new ForLoop(iteration), forBody);
      }
      forRange(nameOrPrefix, from2, to, forBody, varKind = this.opts.es5 ? scope_1.varKinds.var : scope_1.varKinds.let) {
        const name = this._scope.toName(nameOrPrefix);
        return this._for(new ForRange(varKind, name, from2, to), () => forBody(name));
      }
      forOf(nameOrPrefix, iterable, forBody, varKind = scope_1.varKinds.const) {
        const name = this._scope.toName(nameOrPrefix);
        if (this.opts.es5) {
          const arr = iterable instanceof code_1.Name ? iterable : this.var("_arr", iterable);
          return this.forRange("_i", 0, (0, code_1._)`${arr}.length`, (i) => {
            this.var(name, (0, code_1._)`${arr}[${i}]`);
            forBody(name);
          });
        }
        return this._for(new ForIter("of", varKind, name, iterable), () => forBody(name));
      }
      forIn(nameOrPrefix, obj, forBody, varKind = this.opts.es5 ? scope_1.varKinds.var : scope_1.varKinds.const) {
        if (this.opts.ownProperties) {
          return this.forOf(nameOrPrefix, (0, code_1._)`Object.keys(${obj})`, forBody);
        }
        const name = this._scope.toName(nameOrPrefix);
        return this._for(new ForIter("in", varKind, name, obj), () => forBody(name));
      }
      endFor() {
        return this._endBlockNode(For);
      }
      label(label) {
        return this._leafNode(new Label2(label));
      }
      break(label) {
        return this._leafNode(new Break(label));
      }
      return(value) {
        const node2 = new Return();
        this._blockNode(node2);
        this.code(value);
        if (node2.nodes.length !== 1)
          throw new Error('CodeGen: "return" should have one node');
        return this._endBlockNode(Return);
      }
      try(tryBody, catchCode, finallyCode) {
        if (!catchCode && !finallyCode)
          throw new Error('CodeGen: "try" without "catch" and "finally"');
        const node2 = new Try();
        this._blockNode(node2);
        this.code(tryBody);
        if (catchCode) {
          const error = this.name("e");
          this._currNode = node2.catch = new Catch(error);
          catchCode(error);
        }
        if (finallyCode) {
          this._currNode = node2.finally = new Finally();
          this.code(finallyCode);
        }
        return this._endBlockNode(Catch, Finally);
      }
      throw(error) {
        return this._leafNode(new Throw(error));
      }
      block(body, nodeCount) {
        this._blockStarts.push(this._nodes.length);
        if (body)
          this.code(body).endBlock(nodeCount);
        return this;
      }
      endBlock(nodeCount) {
        const len = this._blockStarts.pop();
        if (len === void 0)
          throw new Error("CodeGen: not in self-balancing block");
        const toClose = this._nodes.length - len;
        if (toClose < 0 || nodeCount !== void 0 && toClose !== nodeCount) {
          throw new Error(`CodeGen: wrong number of nodes: ${toClose} vs ${nodeCount} expected`);
        }
        this._nodes.length = len;
        return this;
      }
      func(name, args2 = code_1.nil, async2, funcBody) {
        this._blockNode(new Func(name, args2, async2));
        if (funcBody)
          this.code(funcBody).endFunc();
        return this;
      }
      endFunc() {
        return this._endBlockNode(Func);
      }
      optimize(n = 1) {
        while (n-- > 0) {
          this._root.optimizeNodes();
          this._root.optimizeNames(this._root.names, this._constants);
        }
      }
      _leafNode(node2) {
        this._currNode.nodes.push(node2);
        return this;
      }
      _blockNode(node2) {
        this._currNode.nodes.push(node2);
        this._nodes.push(node2);
      }
      _endBlockNode(N1, N2) {
        const n = this._currNode;
        if (n instanceof N1 || N2 && n instanceof N2) {
          this._nodes.pop();
          return this;
        }
        throw new Error(`CodeGen: not in block "${N2 ? `${N1.kind}/${N2.kind}` : N1.kind}"`);
      }
      _elseNode(node2) {
        const n = this._currNode;
        if (!(n instanceof If)) {
          throw new Error('CodeGen: "else" without "if"');
        }
        this._currNode = n.else = node2;
        return this;
      }
      get _root() {
        return this._nodes[0];
      }
      get _currNode() {
        const ns = this._nodes;
        return ns[ns.length - 1];
      }
      set _currNode(node2) {
        const ns = this._nodes;
        ns[ns.length - 1] = node2;
      }
    }
    exports$1.CodeGen = CodeGen;
    function addNames(names3, from2) {
      for (const n in from2)
        names3[n] = (names3[n] || 0) + (from2[n] || 0);
      return names3;
    }
    function addExprNames(names3, from2) {
      return from2 instanceof code_1._CodeOrName ? addNames(names3, from2.names) : names3;
    }
    function optimizeExpr(expr, names3, constants2) {
      if (expr instanceof code_1.Name)
        return replaceName(expr);
      if (!canOptimize(expr))
        return expr;
      return new code_1._Code(expr._items.reduce((items2, c) => {
        if (c instanceof code_1.Name)
          c = replaceName(c);
        if (c instanceof code_1._Code)
          items2.push(...c._items);
        else
          items2.push(c);
        return items2;
      }, []));
      function replaceName(n) {
        const c = constants2[n.str];
        if (c === void 0 || names3[n.str] !== 1)
          return n;
        delete names3[n.str];
        return c;
      }
      function canOptimize(e) {
        return e instanceof code_1._Code && e._items.some((c) => c instanceof code_1.Name && names3[c.str] === 1 && constants2[c.str] !== void 0);
      }
    }
    function subtractNames(names3, from2) {
      for (const n in from2)
        names3[n] = (names3[n] || 0) - (from2[n] || 0);
    }
    function not2(x) {
      return typeof x == "boolean" || typeof x == "number" || x === null ? !x : (0, code_1._)`!${par(x)}`;
    }
    exports$1.not = not2;
    const andCode = mappend(exports$1.operators.AND);
    function and(...args2) {
      return args2.reduce(andCode);
    }
    exports$1.and = and;
    const orCode = mappend(exports$1.operators.OR);
    function or(...args2) {
      return args2.reduce(orCode);
    }
    exports$1.or = or;
    function mappend(op) {
      return (x, y) => x === code_1.nil ? y : y === code_1.nil ? x : (0, code_1._)`${par(x)} ${op} ${par(y)}`;
    }
    function par(x) {
      return x instanceof code_1.Name ? x : (0, code_1._)`(${x})`;
    }
  })(codegen$1);
  return codegen$1;
}
function requireUtil$4() {
  if (hasRequiredUtil$4) return util$4;
  hasRequiredUtil$4 = 1;
  Object.defineProperty(util$4, "__esModule", { value: true });
  util$4.checkStrictMode = util$4.getErrorPath = util$4.Type = util$4.useFunc = util$4.setEvaluated = util$4.evaluatedPropsToName = util$4.mergeEvaluated = util$4.eachItem = util$4.unescapeJsonPointer = util$4.escapeJsonPointer = util$4.escapeFragment = util$4.unescapeFragment = util$4.schemaRefOrVal = util$4.schemaHasRulesButRef = util$4.schemaHasRules = util$4.checkUnknownRules = util$4.alwaysValidSchema = util$4.toHash = void 0;
  const codegen_1 = requireCodegen$1();
  const code_1 = requireCode$4();
  function toHash(arr) {
    const hash = {};
    for (const item of arr)
      hash[item] = true;
    return hash;
  }
  util$4.toHash = toHash;
  function alwaysValidSchema(it, schema) {
    if (typeof schema == "boolean")
      return schema;
    if (Object.keys(schema).length === 0)
      return true;
    checkUnknownRules(it, schema);
    return !schemaHasRules(schema, it.self.RULES.all);
  }
  util$4.alwaysValidSchema = alwaysValidSchema;
  function checkUnknownRules(it, schema = it.schema) {
    const { opts, self: self2 } = it;
    if (!opts.strictSchema)
      return;
    if (typeof schema === "boolean")
      return;
    const rules2 = self2.RULES.keywords;
    for (const key in schema) {
      if (!rules2[key])
        checkStrictMode(it, `unknown keyword: "${key}"`);
    }
  }
  util$4.checkUnknownRules = checkUnknownRules;
  function schemaHasRules(schema, rules2) {
    if (typeof schema == "boolean")
      return !schema;
    for (const key in schema)
      if (rules2[key])
        return true;
    return false;
  }
  util$4.schemaHasRules = schemaHasRules;
  function schemaHasRulesButRef(schema, RULES) {
    if (typeof schema == "boolean")
      return !schema;
    for (const key in schema)
      if (key !== "$ref" && RULES.all[key])
        return true;
    return false;
  }
  util$4.schemaHasRulesButRef = schemaHasRulesButRef;
  function schemaRefOrVal({ topSchemaRef, schemaPath }, schema, keyword2, $data) {
    if (!$data) {
      if (typeof schema == "number" || typeof schema == "boolean")
        return schema;
      if (typeof schema == "string")
        return (0, codegen_1._)`${schema}`;
    }
    return (0, codegen_1._)`${topSchemaRef}${schemaPath}${(0, codegen_1.getProperty)(keyword2)}`;
  }
  util$4.schemaRefOrVal = schemaRefOrVal;
  function unescapeFragment(str) {
    return unescapeJsonPointer(decodeURIComponent(str));
  }
  util$4.unescapeFragment = unescapeFragment;
  function escapeFragment(str) {
    return encodeURIComponent(escapeJsonPointer(str));
  }
  util$4.escapeFragment = escapeFragment;
  function escapeJsonPointer(str) {
    if (typeof str == "number")
      return `${str}`;
    return str.replace(/~/g, "~0").replace(/\//g, "~1");
  }
  util$4.escapeJsonPointer = escapeJsonPointer;
  function unescapeJsonPointer(str) {
    return str.replace(/~1/g, "/").replace(/~0/g, "~");
  }
  util$4.unescapeJsonPointer = unescapeJsonPointer;
  function eachItem(xs, f) {
    if (Array.isArray(xs)) {
      for (const x of xs)
        f(x);
    } else {
      f(xs);
    }
  }
  util$4.eachItem = eachItem;
  function makeMergeEvaluated({ mergeNames, mergeToName, mergeValues: mergeValues2, resultToName }) {
    return (gen, from2, to, toName) => {
      const res = to === void 0 ? from2 : to instanceof codegen_1.Name ? (from2 instanceof codegen_1.Name ? mergeNames(gen, from2, to) : mergeToName(gen, from2, to), to) : from2 instanceof codegen_1.Name ? (mergeToName(gen, to, from2), from2) : mergeValues2(from2, to);
      return toName === codegen_1.Name && !(res instanceof codegen_1.Name) ? resultToName(gen, res) : res;
    };
  }
  util$4.mergeEvaluated = {
    props: makeMergeEvaluated({
      mergeNames: (gen, from2, to) => gen.if((0, codegen_1._)`${to} !== true && ${from2} !== undefined`, () => {
        gen.if((0, codegen_1._)`${from2} === true`, () => gen.assign(to, true), () => gen.assign(to, (0, codegen_1._)`${to} || {}`).code((0, codegen_1._)`Object.assign(${to}, ${from2})`));
      }),
      mergeToName: (gen, from2, to) => gen.if((0, codegen_1._)`${to} !== true`, () => {
        if (from2 === true) {
          gen.assign(to, true);
        } else {
          gen.assign(to, (0, codegen_1._)`${to} || {}`);
          setEvaluated(gen, to, from2);
        }
      }),
      mergeValues: (from2, to) => from2 === true ? true : { ...from2, ...to },
      resultToName: evaluatedPropsToName
    }),
    items: makeMergeEvaluated({
      mergeNames: (gen, from2, to) => gen.if((0, codegen_1._)`${to} !== true && ${from2} !== undefined`, () => gen.assign(to, (0, codegen_1._)`${from2} === true ? true : ${to} > ${from2} ? ${to} : ${from2}`)),
      mergeToName: (gen, from2, to) => gen.if((0, codegen_1._)`${to} !== true`, () => gen.assign(to, from2 === true ? true : (0, codegen_1._)`${to} > ${from2} ? ${to} : ${from2}`)),
      mergeValues: (from2, to) => from2 === true ? true : Math.max(from2, to),
      resultToName: (gen, items2) => gen.var("items", items2)
    })
  };
  function evaluatedPropsToName(gen, ps) {
    if (ps === true)
      return gen.var("props", true);
    const props = gen.var("props", (0, codegen_1._)`{}`);
    if (ps !== void 0)
      setEvaluated(gen, props, ps);
    return props;
  }
  util$4.evaluatedPropsToName = evaluatedPropsToName;
  function setEvaluated(gen, props, ps) {
    Object.keys(ps).forEach((p) => gen.assign((0, codegen_1._)`${props}${(0, codegen_1.getProperty)(p)}`, true));
  }
  util$4.setEvaluated = setEvaluated;
  const snippets = {};
  function useFunc(gen, f) {
    return gen.scopeValue("func", {
      ref: f,
      code: snippets[f.code] || (snippets[f.code] = new code_1._Code(f.code))
    });
  }
  util$4.useFunc = useFunc;
  var Type2;
  (function(Type3) {
    Type3[Type3["Num"] = 0] = "Num";
    Type3[Type3["Str"] = 1] = "Str";
  })(Type2 || (util$4.Type = Type2 = {}));
  function getErrorPath(dataProp, dataPropType, jsPropertySyntax) {
    if (dataProp instanceof codegen_1.Name) {
      const isNumber2 = dataPropType === Type2.Num;
      return jsPropertySyntax ? isNumber2 ? (0, codegen_1._)`"[" + ${dataProp} + "]"` : (0, codegen_1._)`"['" + ${dataProp} + "']"` : isNumber2 ? (0, codegen_1._)`"/" + ${dataProp}` : (0, codegen_1._)`"/" + ${dataProp}.replace(/~/g, "~0").replace(/\\//g, "~1")`;
    }
    return jsPropertySyntax ? (0, codegen_1.getProperty)(dataProp).toString() : "/" + escapeJsonPointer(dataProp);
  }
  util$4.getErrorPath = getErrorPath;
  function checkStrictMode(it, msg, mode2 = it.opts.strictSchema) {
    if (!mode2)
      return;
    msg = `strict mode: ${msg}`;
    if (mode2 === true)
      throw new Error(msg);
    it.self.logger.warn(msg);
  }
  util$4.checkStrictMode = checkStrictMode;
  return util$4;
}
function requireNames$1() {
  if (hasRequiredNames$1) return names$1;
  hasRequiredNames$1 = 1;
  Object.defineProperty(names$1, "__esModule", { value: true });
  const codegen_1 = requireCodegen$1();
  const names3 = {
    data: new codegen_1.Name("data"),
    valCxt: new codegen_1.Name("valCxt"),
    instancePath: new codegen_1.Name("instancePath"),
    parentData: new codegen_1.Name("parentData"),
    parentDataProperty: new codegen_1.Name("parentDataProperty"),
    rootData: new codegen_1.Name("rootData"),
    dynamicAnchors: new codegen_1.Name("dynamicAnchors"),
    vErrors: new codegen_1.Name("vErrors"),
    errors: new codegen_1.Name("errors"),
    this: new codegen_1.Name("this"),
    self: new codegen_1.Name("self"),
    scope: new codegen_1.Name("scope"),
    json: new codegen_1.Name("json"),
    jsonPos: new codegen_1.Name("jsonPos"),
    jsonLen: new codegen_1.Name("jsonLen"),
    jsonPart: new codegen_1.Name("jsonPart")
  };
  names$1.default = names3;
  return names$1;
}
function requireErrors$2() {
  if (hasRequiredErrors$2) return errors$2;
  hasRequiredErrors$2 = 1;
  (function(exports$1) {
    Object.defineProperty(exports$1, "__esModule", { value: true });
    exports$1.extendErrors = exports$1.resetErrorsCount = exports$1.reportExtraError = exports$1.reportError = exports$1.keyword$DataError = exports$1.keywordError = void 0;
    const codegen_1 = requireCodegen$1();
    const util_1 = requireUtil$4();
    const names_1 = requireNames$1();
    exports$1.keywordError = {
      message: ({ keyword: keyword2 }) => (0, codegen_1.str)`must pass "${keyword2}" keyword validation`
    };
    exports$1.keyword$DataError = {
      message: ({ keyword: keyword2, schemaType }) => schemaType ? (0, codegen_1.str)`"${keyword2}" keyword must be ${schemaType} ($data)` : (0, codegen_1.str)`"${keyword2}" keyword is invalid ($data)`
    };
    function reportError(cxt, error = exports$1.keywordError, errorPaths, overrideAllErrors) {
      const { it } = cxt;
      const { gen, compositeRule, allErrors } = it;
      const errObj = errorObjectCode(cxt, error, errorPaths);
      if (overrideAllErrors !== null && overrideAllErrors !== void 0 ? overrideAllErrors : compositeRule || allErrors) {
        addError(gen, errObj);
      } else {
        returnErrors(it, (0, codegen_1._)`[${errObj}]`);
      }
    }
    exports$1.reportError = reportError;
    function reportExtraError(cxt, error = exports$1.keywordError, errorPaths) {
      const { it } = cxt;
      const { gen, compositeRule, allErrors } = it;
      const errObj = errorObjectCode(cxt, error, errorPaths);
      addError(gen, errObj);
      if (!(compositeRule || allErrors)) {
        returnErrors(it, names_1.default.vErrors);
      }
    }
    exports$1.reportExtraError = reportExtraError;
    function resetErrorsCount(gen, errsCount) {
      gen.assign(names_1.default.errors, errsCount);
      gen.if((0, codegen_1._)`${names_1.default.vErrors} !== null`, () => gen.if(errsCount, () => gen.assign((0, codegen_1._)`${names_1.default.vErrors}.length`, errsCount), () => gen.assign(names_1.default.vErrors, null)));
    }
    exports$1.resetErrorsCount = resetErrorsCount;
    function extendErrors({ gen, keyword: keyword2, schemaValue, data: data32, errsCount, it }) {
      if (errsCount === void 0)
        throw new Error("ajv implementation error");
      const err = gen.name("err");
      gen.forRange("i", errsCount, names_1.default.errors, (i) => {
        gen.const(err, (0, codegen_1._)`${names_1.default.vErrors}[${i}]`);
        gen.if((0, codegen_1._)`${err}.instancePath === undefined`, () => gen.assign((0, codegen_1._)`${err}.instancePath`, (0, codegen_1.strConcat)(names_1.default.instancePath, it.errorPath)));
        gen.assign((0, codegen_1._)`${err}.schemaPath`, (0, codegen_1.str)`${it.errSchemaPath}/${keyword2}`);
        if (it.opts.verbose) {
          gen.assign((0, codegen_1._)`${err}.schema`, schemaValue);
          gen.assign((0, codegen_1._)`${err}.data`, data32);
        }
      });
    }
    exports$1.extendErrors = extendErrors;
    function addError(gen, errObj) {
      const err = gen.const("err", errObj);
      gen.if((0, codegen_1._)`${names_1.default.vErrors} === null`, () => gen.assign(names_1.default.vErrors, (0, codegen_1._)`[${err}]`), (0, codegen_1._)`${names_1.default.vErrors}.push(${err})`);
      gen.code((0, codegen_1._)`${names_1.default.errors}++`);
    }
    function returnErrors(it, errs) {
      const { gen, validateName, schemaEnv } = it;
      if (schemaEnv.$async) {
        gen.throw((0, codegen_1._)`new ${it.ValidationError}(${errs})`);
      } else {
        gen.assign((0, codegen_1._)`${validateName}.errors`, errs);
        gen.return(false);
      }
    }
    const E = {
      keyword: new codegen_1.Name("keyword"),
      schemaPath: new codegen_1.Name("schemaPath"),
      params: new codegen_1.Name("params"),
      propertyName: new codegen_1.Name("propertyName"),
      message: new codegen_1.Name("message"),
      schema: new codegen_1.Name("schema"),
      parentSchema: new codegen_1.Name("parentSchema")
    };
    function errorObjectCode(cxt, error, errorPaths) {
      const { createErrors } = cxt.it;
      if (createErrors === false)
        return (0, codegen_1._)`{}`;
      return errorObject(cxt, error, errorPaths);
    }
    function errorObject(cxt, error, errorPaths = {}) {
      const { gen, it } = cxt;
      const keyValues = [
        errorInstancePath(it, errorPaths),
        errorSchemaPath(cxt, errorPaths)
      ];
      extraErrorProps(cxt, error, keyValues);
      return gen.object(...keyValues);
    }
    function errorInstancePath({ errorPath }, { instancePath }) {
      const instPath = instancePath ? (0, codegen_1.str)`${errorPath}${(0, util_1.getErrorPath)(instancePath, util_1.Type.Str)}` : errorPath;
      return [names_1.default.instancePath, (0, codegen_1.strConcat)(names_1.default.instancePath, instPath)];
    }
    function errorSchemaPath({ keyword: keyword2, it: { errSchemaPath } }, { schemaPath, parentSchema }) {
      let schPath = parentSchema ? errSchemaPath : (0, codegen_1.str)`${errSchemaPath}/${keyword2}`;
      if (schemaPath) {
        schPath = (0, codegen_1.str)`${schPath}${(0, util_1.getErrorPath)(schemaPath, util_1.Type.Str)}`;
      }
      return [E.schemaPath, schPath];
    }
    function extraErrorProps(cxt, { params, message }, keyValues) {
      const { keyword: keyword2, data: data32, schemaValue, it } = cxt;
      const { opts, propertyName, topSchemaRef, schemaPath } = it;
      keyValues.push([E.keyword, keyword2], [E.params, typeof params == "function" ? params(cxt) : params || (0, codegen_1._)`{}`]);
      if (opts.messages) {
        keyValues.push([E.message, typeof message == "function" ? message(cxt) : message]);
      }
      if (opts.verbose) {
        keyValues.push([E.schema, schemaValue], [E.parentSchema, (0, codegen_1._)`${topSchemaRef}${schemaPath}`], [names_1.default.data, data32]);
      }
      if (propertyName)
        keyValues.push([E.propertyName, propertyName]);
    }
  })(errors$2);
  return errors$2;
}
function requireBoolSchema$1() {
  if (hasRequiredBoolSchema$1) return boolSchema$1;
  hasRequiredBoolSchema$1 = 1;
  Object.defineProperty(boolSchema$1, "__esModule", { value: true });
  boolSchema$1.boolOrEmptySchema = boolSchema$1.topBoolOrEmptySchema = void 0;
  const errors_1 = requireErrors$2();
  const codegen_1 = requireCodegen$1();
  const names_1 = requireNames$1();
  const boolError = {
    message: "boolean schema is false"
  };
  function topBoolOrEmptySchema(it) {
    const { gen, schema, validateName } = it;
    if (schema === false) {
      falseSchemaError(it, false);
    } else if (typeof schema == "object" && schema.$async === true) {
      gen.return(names_1.default.data);
    } else {
      gen.assign((0, codegen_1._)`${validateName}.errors`, null);
      gen.return(true);
    }
  }
  boolSchema$1.topBoolOrEmptySchema = topBoolOrEmptySchema;
  function boolOrEmptySchema(it, valid2) {
    const { gen, schema } = it;
    if (schema === false) {
      gen.var(valid2, false);
      falseSchemaError(it);
    } else {
      gen.var(valid2, true);
    }
  }
  boolSchema$1.boolOrEmptySchema = boolOrEmptySchema;
  function falseSchemaError(it, overrideAllErrors) {
    const { gen, data: data32 } = it;
    const cxt = {
      gen,
      keyword: "false schema",
      data: data32,
      schema: false,
      schemaCode: false,
      schemaValue: false,
      params: {},
      it
    };
    (0, errors_1.reportError)(cxt, boolError, void 0, overrideAllErrors);
  }
  return boolSchema$1;
}
function requireRules$1() {
  if (hasRequiredRules$1) return rules$1;
  hasRequiredRules$1 = 1;
  Object.defineProperty(rules$1, "__esModule", { value: true });
  rules$1.getRules = rules$1.isJSONType = void 0;
  const _jsonTypes = ["string", "number", "integer", "boolean", "null", "object", "array"];
  const jsonTypes = new Set(_jsonTypes);
  function isJSONType(x) {
    return typeof x == "string" && jsonTypes.has(x);
  }
  rules$1.isJSONType = isJSONType;
  function getRules() {
    const groups = {
      number: { type: "number", rules: [] },
      string: { type: "string", rules: [] },
      array: { type: "array", rules: [] },
      object: { type: "object", rules: [] }
    };
    return {
      types: { ...groups, integer: true, boolean: true, null: true },
      rules: [{ rules: [] }, groups.number, groups.string, groups.array, groups.object],
      post: { rules: [] },
      all: {},
      keywords: {}
    };
  }
  rules$1.getRules = getRules;
  return rules$1;
}
function requireApplicability$1() {
  if (hasRequiredApplicability$1) return applicability$1;
  hasRequiredApplicability$1 = 1;
  Object.defineProperty(applicability$1, "__esModule", { value: true });
  applicability$1.shouldUseRule = applicability$1.shouldUseGroup = applicability$1.schemaHasRulesForType = void 0;
  function schemaHasRulesForType({ schema, self: self2 }, type2) {
    const group = self2.RULES.types[type2];
    return group && group !== true && shouldUseGroup(schema, group);
  }
  applicability$1.schemaHasRulesForType = schemaHasRulesForType;
  function shouldUseGroup(schema, group) {
    return group.rules.some((rule) => shouldUseRule(schema, rule));
  }
  applicability$1.shouldUseGroup = shouldUseGroup;
  function shouldUseRule(schema, rule) {
    var _a4;
    return schema[rule.keyword] !== void 0 || ((_a4 = rule.definition.implements) === null || _a4 === void 0 ? void 0 : _a4.some((kwd) => schema[kwd] !== void 0));
  }
  applicability$1.shouldUseRule = shouldUseRule;
  return applicability$1;
}
function requireDataType$1() {
  if (hasRequiredDataType$1) return dataType$1;
  hasRequiredDataType$1 = 1;
  Object.defineProperty(dataType$1, "__esModule", { value: true });
  dataType$1.reportTypeError = dataType$1.checkDataTypes = dataType$1.checkDataType = dataType$1.coerceAndCheckDataType = dataType$1.getJSONTypes = dataType$1.getSchemaTypes = dataType$1.DataType = void 0;
  const rules_1 = requireRules$1();
  const applicability_1 = requireApplicability$1();
  const errors_1 = requireErrors$2();
  const codegen_1 = requireCodegen$1();
  const util_1 = requireUtil$4();
  var DataType;
  (function(DataType2) {
    DataType2[DataType2["Correct"] = 0] = "Correct";
    DataType2[DataType2["Wrong"] = 1] = "Wrong";
  })(DataType || (dataType$1.DataType = DataType = {}));
  function getSchemaTypes(schema) {
    const types2 = getJSONTypes(schema.type);
    const hasNull = types2.includes("null");
    if (hasNull) {
      if (schema.nullable === false)
        throw new Error("type: null contradicts nullable: false");
    } else {
      if (!types2.length && schema.nullable !== void 0) {
        throw new Error('"nullable" cannot be used without "type"');
      }
      if (schema.nullable === true)
        types2.push("null");
    }
    return types2;
  }
  dataType$1.getSchemaTypes = getSchemaTypes;
  function getJSONTypes(ts) {
    const types2 = Array.isArray(ts) ? ts : ts ? [ts] : [];
    if (types2.every(rules_1.isJSONType))
      return types2;
    throw new Error("type must be JSONType or JSONType[]: " + types2.join(","));
  }
  dataType$1.getJSONTypes = getJSONTypes;
  function coerceAndCheckDataType(it, types2) {
    const { gen, data: data32, opts } = it;
    const coerceTo = coerceToTypes(types2, opts.coerceTypes);
    const checkTypes = types2.length > 0 && !(coerceTo.length === 0 && types2.length === 1 && (0, applicability_1.schemaHasRulesForType)(it, types2[0]));
    if (checkTypes) {
      const wrongType = checkDataTypes(types2, data32, opts.strictNumbers, DataType.Wrong);
      gen.if(wrongType, () => {
        if (coerceTo.length)
          coerceData(it, types2, coerceTo);
        else
          reportTypeError(it);
      });
    }
    return checkTypes;
  }
  dataType$1.coerceAndCheckDataType = coerceAndCheckDataType;
  const COERCIBLE = /* @__PURE__ */ new Set(["string", "number", "integer", "boolean", "null"]);
  function coerceToTypes(types2, coerceTypes) {
    return coerceTypes ? types2.filter((t) => COERCIBLE.has(t) || coerceTypes === "array" && t === "array") : [];
  }
  function coerceData(it, types2, coerceTo) {
    const { gen, data: data32, opts } = it;
    const dataType2 = gen.let("dataType", (0, codegen_1._)`typeof ${data32}`);
    const coerced = gen.let("coerced", (0, codegen_1._)`undefined`);
    if (opts.coerceTypes === "array") {
      gen.if((0, codegen_1._)`${dataType2} == 'object' && Array.isArray(${data32}) && ${data32}.length == 1`, () => gen.assign(data32, (0, codegen_1._)`${data32}[0]`).assign(dataType2, (0, codegen_1._)`typeof ${data32}`).if(checkDataTypes(types2, data32, opts.strictNumbers), () => gen.assign(coerced, data32)));
    }
    gen.if((0, codegen_1._)`${coerced} !== undefined`);
    for (const t of coerceTo) {
      if (COERCIBLE.has(t) || t === "array" && opts.coerceTypes === "array") {
        coerceSpecificType(t);
      }
    }
    gen.else();
    reportTypeError(it);
    gen.endIf();
    gen.if((0, codegen_1._)`${coerced} !== undefined`, () => {
      gen.assign(data32, coerced);
      assignParentData(it, coerced);
    });
    function coerceSpecificType(t) {
      switch (t) {
        case "string":
          gen.elseIf((0, codegen_1._)`${dataType2} == "number" || ${dataType2} == "boolean"`).assign(coerced, (0, codegen_1._)`"" + ${data32}`).elseIf((0, codegen_1._)`${data32} === null`).assign(coerced, (0, codegen_1._)`""`);
          return;
        case "number":
          gen.elseIf((0, codegen_1._)`${dataType2} == "boolean" || ${data32} === null
              || (${dataType2} == "string" && ${data32} && ${data32} == +${data32})`).assign(coerced, (0, codegen_1._)`+${data32}`);
          return;
        case "integer":
          gen.elseIf((0, codegen_1._)`${dataType2} === "boolean" || ${data32} === null
              || (${dataType2} === "string" && ${data32} && ${data32} == +${data32} && !(${data32} % 1))`).assign(coerced, (0, codegen_1._)`+${data32}`);
          return;
        case "boolean":
          gen.elseIf((0, codegen_1._)`${data32} === "false" || ${data32} === 0 || ${data32} === null`).assign(coerced, false).elseIf((0, codegen_1._)`${data32} === "true" || ${data32} === 1`).assign(coerced, true);
          return;
        case "null":
          gen.elseIf((0, codegen_1._)`${data32} === "" || ${data32} === 0 || ${data32} === false`);
          gen.assign(coerced, null);
          return;
        case "array":
          gen.elseIf((0, codegen_1._)`${dataType2} === "string" || ${dataType2} === "number"
              || ${dataType2} === "boolean" || ${data32} === null`).assign(coerced, (0, codegen_1._)`[${data32}]`);
      }
    }
  }
  function assignParentData({ gen, parentData, parentDataProperty }, expr) {
    gen.if((0, codegen_1._)`${parentData} !== undefined`, () => gen.assign((0, codegen_1._)`${parentData}[${parentDataProperty}]`, expr));
  }
  function checkDataType(dataType2, data32, strictNums, correct = DataType.Correct) {
    const EQ = correct === DataType.Correct ? codegen_1.operators.EQ : codegen_1.operators.NEQ;
    let cond;
    switch (dataType2) {
      case "null":
        return (0, codegen_1._)`${data32} ${EQ} null`;
      case "array":
        cond = (0, codegen_1._)`Array.isArray(${data32})`;
        break;
      case "object":
        cond = (0, codegen_1._)`${data32} && typeof ${data32} == "object" && !Array.isArray(${data32})`;
        break;
      case "integer":
        cond = numCond((0, codegen_1._)`!(${data32} % 1) && !isNaN(${data32})`);
        break;
      case "number":
        cond = numCond();
        break;
      default:
        return (0, codegen_1._)`typeof ${data32} ${EQ} ${dataType2}`;
    }
    return correct === DataType.Correct ? cond : (0, codegen_1.not)(cond);
    function numCond(_cond = codegen_1.nil) {
      return (0, codegen_1.and)((0, codegen_1._)`typeof ${data32} == "number"`, _cond, strictNums ? (0, codegen_1._)`isFinite(${data32})` : codegen_1.nil);
    }
  }
  dataType$1.checkDataType = checkDataType;
  function checkDataTypes(dataTypes, data32, strictNums, correct) {
    if (dataTypes.length === 1) {
      return checkDataType(dataTypes[0], data32, strictNums, correct);
    }
    let cond;
    const types2 = (0, util_1.toHash)(dataTypes);
    if (types2.array && types2.object) {
      const notObj = (0, codegen_1._)`typeof ${data32} != "object"`;
      cond = types2.null ? notObj : (0, codegen_1._)`!${data32} || ${notObj}`;
      delete types2.null;
      delete types2.array;
      delete types2.object;
    } else {
      cond = codegen_1.nil;
    }
    if (types2.number)
      delete types2.integer;
    for (const t in types2)
      cond = (0, codegen_1.and)(cond, checkDataType(t, data32, strictNums, correct));
    return cond;
  }
  dataType$1.checkDataTypes = checkDataTypes;
  const typeError = {
    message: ({ schema }) => `must be ${schema}`,
    params: ({ schema, schemaValue }) => typeof schema == "string" ? (0, codegen_1._)`{type: ${schema}}` : (0, codegen_1._)`{type: ${schemaValue}}`
  };
  function reportTypeError(it) {
    const cxt = getTypeErrorContext(it);
    (0, errors_1.reportError)(cxt, typeError);
  }
  dataType$1.reportTypeError = reportTypeError;
  function getTypeErrorContext(it) {
    const { gen, data: data32, schema } = it;
    const schemaCode = (0, util_1.schemaRefOrVal)(it, schema, "type");
    return {
      gen,
      keyword: "type",
      data: data32,
      schema: schema.type,
      schemaCode,
      schemaValue: schemaCode,
      parentSchema: schema,
      params: {},
      it
    };
  }
  return dataType$1;
}
function requireDefaults$1() {
  if (hasRequiredDefaults$1) return defaults$2;
  hasRequiredDefaults$1 = 1;
  Object.defineProperty(defaults$2, "__esModule", { value: true });
  defaults$2.assignDefaults = void 0;
  const codegen_1 = requireCodegen$1();
  const util_1 = requireUtil$4();
  function assignDefaults(it, ty) {
    const { properties: properties2, items: items2 } = it.schema;
    if (ty === "object" && properties2) {
      for (const key in properties2) {
        assignDefault(it, key, properties2[key].default);
      }
    } else if (ty === "array" && Array.isArray(items2)) {
      items2.forEach((sch, i) => assignDefault(it, i, sch.default));
    }
  }
  defaults$2.assignDefaults = assignDefaults;
  function assignDefault(it, prop, defaultValue) {
    const { gen, compositeRule, data: data32, opts } = it;
    if (defaultValue === void 0)
      return;
    const childData = (0, codegen_1._)`${data32}${(0, codegen_1.getProperty)(prop)}`;
    if (compositeRule) {
      (0, util_1.checkStrictMode)(it, `default is ignored for: ${childData}`);
      return;
    }
    let condition = (0, codegen_1._)`${childData} === undefined`;
    if (opts.useDefaults === "empty") {
      condition = (0, codegen_1._)`${condition} || ${childData} === null || ${childData} === ""`;
    }
    gen.if(condition, (0, codegen_1._)`${childData} = ${(0, codegen_1.stringify)(defaultValue)}`);
  }
  return defaults$2;
}
function requireCode$3() {
  if (hasRequiredCode$3) return code$3;
  hasRequiredCode$3 = 1;
  Object.defineProperty(code$3, "__esModule", { value: true });
  code$3.validateUnion = code$3.validateArray = code$3.usePattern = code$3.callValidateCode = code$3.schemaProperties = code$3.allSchemaProperties = code$3.noPropertyInData = code$3.propertyInData = code$3.isOwnProperty = code$3.hasPropFunc = code$3.reportMissingProp = code$3.checkMissingProp = code$3.checkReportMissingProp = void 0;
  const codegen_1 = requireCodegen$1();
  const util_1 = requireUtil$4();
  const names_1 = requireNames$1();
  const util_2 = requireUtil$4();
  function checkReportMissingProp(cxt, prop) {
    const { gen, data: data32, it } = cxt;
    gen.if(noPropertyInData(gen, data32, prop, it.opts.ownProperties), () => {
      cxt.setParams({ missingProperty: (0, codegen_1._)`${prop}` }, true);
      cxt.error();
    });
  }
  code$3.checkReportMissingProp = checkReportMissingProp;
  function checkMissingProp({ gen, data: data32, it: { opts } }, properties2, missing) {
    return (0, codegen_1.or)(...properties2.map((prop) => (0, codegen_1.and)(noPropertyInData(gen, data32, prop, opts.ownProperties), (0, codegen_1._)`${missing} = ${prop}`)));
  }
  code$3.checkMissingProp = checkMissingProp;
  function reportMissingProp(cxt, missing) {
    cxt.setParams({ missingProperty: missing }, true);
    cxt.error();
  }
  code$3.reportMissingProp = reportMissingProp;
  function hasPropFunc(gen) {
    return gen.scopeValue("func", {
      ref: Object.prototype.hasOwnProperty,
      code: (0, codegen_1._)`Object.prototype.hasOwnProperty`
    });
  }
  code$3.hasPropFunc = hasPropFunc;
  function isOwnProperty(gen, data32, property) {
    return (0, codegen_1._)`${hasPropFunc(gen)}.call(${data32}, ${property})`;
  }
  code$3.isOwnProperty = isOwnProperty;
  function propertyInData(gen, data32, property, ownProperties) {
    const cond = (0, codegen_1._)`${data32}${(0, codegen_1.getProperty)(property)} !== undefined`;
    return ownProperties ? (0, codegen_1._)`${cond} && ${isOwnProperty(gen, data32, property)}` : cond;
  }
  code$3.propertyInData = propertyInData;
  function noPropertyInData(gen, data32, property, ownProperties) {
    const cond = (0, codegen_1._)`${data32}${(0, codegen_1.getProperty)(property)} === undefined`;
    return ownProperties ? (0, codegen_1.or)(cond, (0, codegen_1.not)(isOwnProperty(gen, data32, property))) : cond;
  }
  code$3.noPropertyInData = noPropertyInData;
  function allSchemaProperties(schemaMap) {
    return schemaMap ? Object.keys(schemaMap).filter((p) => p !== "__proto__") : [];
  }
  code$3.allSchemaProperties = allSchemaProperties;
  function schemaProperties(it, schemaMap) {
    return allSchemaProperties(schemaMap).filter((p) => !(0, util_1.alwaysValidSchema)(it, schemaMap[p]));
  }
  code$3.schemaProperties = schemaProperties;
  function callValidateCode({ schemaCode, data: data32, it: { gen, topSchemaRef, schemaPath, errorPath }, it }, func, context2, passSchema) {
    const dataAndSchema = passSchema ? (0, codegen_1._)`${schemaCode}, ${data32}, ${topSchemaRef}${schemaPath}` : data32;
    const valCxt = [
      [names_1.default.instancePath, (0, codegen_1.strConcat)(names_1.default.instancePath, errorPath)],
      [names_1.default.parentData, it.parentData],
      [names_1.default.parentDataProperty, it.parentDataProperty],
      [names_1.default.rootData, names_1.default.rootData]
    ];
    if (it.opts.dynamicRef)
      valCxt.push([names_1.default.dynamicAnchors, names_1.default.dynamicAnchors]);
    const args2 = (0, codegen_1._)`${dataAndSchema}, ${gen.object(...valCxt)}`;
    return context2 !== codegen_1.nil ? (0, codegen_1._)`${func}.call(${context2}, ${args2})` : (0, codegen_1._)`${func}(${args2})`;
  }
  code$3.callValidateCode = callValidateCode;
  const newRegExp = (0, codegen_1._)`new RegExp`;
  function usePattern({ gen, it: { opts } }, pattern2) {
    const u = opts.unicodeRegExp ? "u" : "";
    const { regExp } = opts.code;
    const rx = regExp(pattern2, u);
    return gen.scopeValue("pattern", {
      key: rx.toString(),
      ref: rx,
      code: (0, codegen_1._)`${regExp.code === "new RegExp" ? newRegExp : (0, util_2.useFunc)(gen, regExp)}(${pattern2}, ${u})`
    });
  }
  code$3.usePattern = usePattern;
  function validateArray(cxt) {
    const { gen, data: data32, keyword: keyword2, it } = cxt;
    const valid2 = gen.name("valid");
    if (it.allErrors) {
      const validArr = gen.let("valid", true);
      validateItems(() => gen.assign(validArr, false));
      return validArr;
    }
    gen.var(valid2, true);
    validateItems(() => gen.break());
    return valid2;
    function validateItems(notValid) {
      const len = gen.const("len", (0, codegen_1._)`${data32}.length`);
      gen.forRange("i", 0, len, (i) => {
        cxt.subschema({
          keyword: keyword2,
          dataProp: i,
          dataPropType: util_1.Type.Num
        }, valid2);
        gen.if((0, codegen_1.not)(valid2), notValid);
      });
    }
  }
  code$3.validateArray = validateArray;
  function validateUnion(cxt) {
    const { gen, schema, keyword: keyword2, it } = cxt;
    if (!Array.isArray(schema))
      throw new Error("ajv implementation error");
    const alwaysValid = schema.some((sch) => (0, util_1.alwaysValidSchema)(it, sch));
    if (alwaysValid && !it.opts.unevaluated)
      return;
    const valid2 = gen.let("valid", false);
    const schValid = gen.name("_valid");
    gen.block(() => schema.forEach((_sch, i) => {
      const schCxt = cxt.subschema({
        keyword: keyword2,
        schemaProp: i,
        compositeRule: true
      }, schValid);
      gen.assign(valid2, (0, codegen_1._)`${valid2} || ${schValid}`);
      const merged = cxt.mergeValidEvaluated(schCxt, schValid);
      if (!merged)
        gen.if((0, codegen_1.not)(valid2));
    }));
    cxt.result(valid2, () => cxt.reset(), () => cxt.error(true));
  }
  code$3.validateUnion = validateUnion;
  return code$3;
}
function requireKeyword$2() {
  if (hasRequiredKeyword$2) return keyword$2;
  hasRequiredKeyword$2 = 1;
  Object.defineProperty(keyword$2, "__esModule", { value: true });
  keyword$2.validateKeywordUsage = keyword$2.validSchemaType = keyword$2.funcKeywordCode = keyword$2.macroKeywordCode = void 0;
  const codegen_1 = requireCodegen$1();
  const names_1 = requireNames$1();
  const code_1 = requireCode$3();
  const errors_1 = requireErrors$2();
  function macroKeywordCode(cxt, def2) {
    const { gen, keyword: keyword2, schema, parentSchema, it } = cxt;
    const macroSchema = def2.macro.call(it.self, schema, parentSchema, it);
    const schemaRef = useKeyword(gen, keyword2, macroSchema);
    if (it.opts.validateSchema !== false)
      it.self.validateSchema(macroSchema, true);
    const valid2 = gen.name("valid");
    cxt.subschema({
      schema: macroSchema,
      schemaPath: codegen_1.nil,
      errSchemaPath: `${it.errSchemaPath}/${keyword2}`,
      topSchemaRef: schemaRef,
      compositeRule: true
    }, valid2);
    cxt.pass(valid2, () => cxt.error(true));
  }
  keyword$2.macroKeywordCode = macroKeywordCode;
  function funcKeywordCode(cxt, def2) {
    var _a4;
    const { gen, keyword: keyword2, schema, parentSchema, $data, it } = cxt;
    checkAsyncKeyword(it, def2);
    const validate2 = !$data && def2.compile ? def2.compile.call(it.self, schema, parentSchema, it) : def2.validate;
    const validateRef = useKeyword(gen, keyword2, validate2);
    const valid2 = gen.let("valid");
    cxt.block$data(valid2, validateKeyword);
    cxt.ok((_a4 = def2.valid) !== null && _a4 !== void 0 ? _a4 : valid2);
    function validateKeyword() {
      if (def2.errors === false) {
        assignValid();
        if (def2.modifying)
          modifyData(cxt);
        reportErrs(() => cxt.error());
      } else {
        const ruleErrs = def2.async ? validateAsync() : validateSync();
        if (def2.modifying)
          modifyData(cxt);
        reportErrs(() => addErrs(cxt, ruleErrs));
      }
    }
    function validateAsync() {
      const ruleErrs = gen.let("ruleErrs", null);
      gen.try(() => assignValid((0, codegen_1._)`await `), (e) => gen.assign(valid2, false).if((0, codegen_1._)`${e} instanceof ${it.ValidationError}`, () => gen.assign(ruleErrs, (0, codegen_1._)`${e}.errors`), () => gen.throw(e)));
      return ruleErrs;
    }
    function validateSync() {
      const validateErrs = (0, codegen_1._)`${validateRef}.errors`;
      gen.assign(validateErrs, null);
      assignValid(codegen_1.nil);
      return validateErrs;
    }
    function assignValid(_await = def2.async ? (0, codegen_1._)`await ` : codegen_1.nil) {
      const passCxt = it.opts.passContext ? names_1.default.this : names_1.default.self;
      const passSchema = !("compile" in def2 && !$data || def2.schema === false);
      gen.assign(valid2, (0, codegen_1._)`${_await}${(0, code_1.callValidateCode)(cxt, validateRef, passCxt, passSchema)}`, def2.modifying);
    }
    function reportErrs(errors2) {
      var _a5;
      gen.if((0, codegen_1.not)((_a5 = def2.valid) !== null && _a5 !== void 0 ? _a5 : valid2), errors2);
    }
  }
  keyword$2.funcKeywordCode = funcKeywordCode;
  function modifyData(cxt) {
    const { gen, data: data32, it } = cxt;
    gen.if(it.parentData, () => gen.assign(data32, (0, codegen_1._)`${it.parentData}[${it.parentDataProperty}]`));
  }
  function addErrs(cxt, errs) {
    const { gen } = cxt;
    gen.if((0, codegen_1._)`Array.isArray(${errs})`, () => {
      gen.assign(names_1.default.vErrors, (0, codegen_1._)`${names_1.default.vErrors} === null ? ${errs} : ${names_1.default.vErrors}.concat(${errs})`).assign(names_1.default.errors, (0, codegen_1._)`${names_1.default.vErrors}.length`);
      (0, errors_1.extendErrors)(cxt);
    }, () => cxt.error());
  }
  function checkAsyncKeyword({ schemaEnv }, def2) {
    if (def2.async && !schemaEnv.$async)
      throw new Error("async keyword in sync schema");
  }
  function useKeyword(gen, keyword2, result) {
    if (result === void 0)
      throw new Error(`keyword "${keyword2}" failed to compile`);
    return gen.scopeValue("keyword", typeof result == "function" ? { ref: result } : { ref: result, code: (0, codegen_1.stringify)(result) });
  }
  function validSchemaType(schema, schemaType, allowUndefined = false) {
    return !schemaType.length || schemaType.some((st) => st === "array" ? Array.isArray(schema) : st === "object" ? schema && typeof schema == "object" && !Array.isArray(schema) : typeof schema == st || allowUndefined && typeof schema == "undefined");
  }
  keyword$2.validSchemaType = validSchemaType;
  function validateKeywordUsage({ schema, opts, self: self2, errSchemaPath }, def2, keyword2) {
    if (Array.isArray(def2.keyword) ? !def2.keyword.includes(keyword2) : def2.keyword !== keyword2) {
      throw new Error("ajv implementation error");
    }
    const deps18 = def2.dependencies;
    if (deps18 === null || deps18 === void 0 ? void 0 : deps18.some((kwd) => !Object.prototype.hasOwnProperty.call(schema, kwd))) {
      throw new Error(`parent schema must have dependencies of ${keyword2}: ${deps18.join(",")}`);
    }
    if (def2.validateSchema) {
      const valid2 = def2.validateSchema(schema[keyword2]);
      if (!valid2) {
        const msg = `keyword "${keyword2}" value is invalid at path "${errSchemaPath}": ` + self2.errorsText(def2.validateSchema.errors);
        if (opts.validateSchema === "log")
          self2.logger.error(msg);
        else
          throw new Error(msg);
      }
    }
  }
  keyword$2.validateKeywordUsage = validateKeywordUsage;
  return keyword$2;
}
function requireSubschema$1() {
  if (hasRequiredSubschema$1) return subschema$1;
  hasRequiredSubschema$1 = 1;
  Object.defineProperty(subschema$1, "__esModule", { value: true });
  subschema$1.extendSubschemaMode = subschema$1.extendSubschemaData = subschema$1.getSubschema = void 0;
  const codegen_1 = requireCodegen$1();
  const util_1 = requireUtil$4();
  function getSubschema(it, { keyword: keyword2, schemaProp, schema, schemaPath, errSchemaPath, topSchemaRef }) {
    if (keyword2 !== void 0 && schema !== void 0) {
      throw new Error('both "keyword" and "schema" passed, only one allowed');
    }
    if (keyword2 !== void 0) {
      const sch = it.schema[keyword2];
      return schemaProp === void 0 ? {
        schema: sch,
        schemaPath: (0, codegen_1._)`${it.schemaPath}${(0, codegen_1.getProperty)(keyword2)}`,
        errSchemaPath: `${it.errSchemaPath}/${keyword2}`
      } : {
        schema: sch[schemaProp],
        schemaPath: (0, codegen_1._)`${it.schemaPath}${(0, codegen_1.getProperty)(keyword2)}${(0, codegen_1.getProperty)(schemaProp)}`,
        errSchemaPath: `${it.errSchemaPath}/${keyword2}/${(0, util_1.escapeFragment)(schemaProp)}`
      };
    }
    if (schema !== void 0) {
      if (schemaPath === void 0 || errSchemaPath === void 0 || topSchemaRef === void 0) {
        throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');
      }
      return {
        schema,
        schemaPath,
        topSchemaRef,
        errSchemaPath
      };
    }
    throw new Error('either "keyword" or "schema" must be passed');
  }
  subschema$1.getSubschema = getSubschema;
  function extendSubschemaData(subschema2, it, { dataProp, dataPropType: dpType, data: data32, dataTypes, propertyName }) {
    if (data32 !== void 0 && dataProp !== void 0) {
      throw new Error('both "data" and "dataProp" passed, only one allowed');
    }
    const { gen } = it;
    if (dataProp !== void 0) {
      const { errorPath, dataPathArr, opts } = it;
      const nextData = gen.let("data", (0, codegen_1._)`${it.data}${(0, codegen_1.getProperty)(dataProp)}`, true);
      dataContextProps(nextData);
      subschema2.errorPath = (0, codegen_1.str)`${errorPath}${(0, util_1.getErrorPath)(dataProp, dpType, opts.jsPropertySyntax)}`;
      subschema2.parentDataProperty = (0, codegen_1._)`${dataProp}`;
      subschema2.dataPathArr = [...dataPathArr, subschema2.parentDataProperty];
    }
    if (data32 !== void 0) {
      const nextData = data32 instanceof codegen_1.Name ? data32 : gen.let("data", data32, true);
      dataContextProps(nextData);
      if (propertyName !== void 0)
        subschema2.propertyName = propertyName;
    }
    if (dataTypes)
      subschema2.dataTypes = dataTypes;
    function dataContextProps(_nextData) {
      subschema2.data = _nextData;
      subschema2.dataLevel = it.dataLevel + 1;
      subschema2.dataTypes = [];
      it.definedProperties = /* @__PURE__ */ new Set();
      subschema2.parentData = it.data;
      subschema2.dataNames = [...it.dataNames, _nextData];
    }
  }
  subschema$1.extendSubschemaData = extendSubschemaData;
  function extendSubschemaMode(subschema2, { jtdDiscriminator, jtdMetadata, compositeRule, createErrors, allErrors }) {
    if (compositeRule !== void 0)
      subschema2.compositeRule = compositeRule;
    if (createErrors !== void 0)
      subschema2.createErrors = createErrors;
    if (allErrors !== void 0)
      subschema2.allErrors = allErrors;
    subschema2.jtdDiscriminator = jtdDiscriminator;
    subschema2.jtdMetadata = jtdMetadata;
  }
  subschema$1.extendSubschemaMode = extendSubschemaMode;
  return subschema$1;
}
function requireFastDeepEqual() {
  if (hasRequiredFastDeepEqual) return fastDeepEqual;
  hasRequiredFastDeepEqual = 1;
  fastDeepEqual = function equal2(a, b) {
    if (a === b) return true;
    if (a && b && typeof a == "object" && typeof b == "object") {
      if (a.constructor !== b.constructor) return false;
      var length, i, keys2;
      if (Array.isArray(a)) {
        length = a.length;
        if (length != b.length) return false;
        for (i = length; i-- !== 0; )
          if (!equal2(a[i], b[i])) return false;
        return true;
      }
      if (a.constructor === RegExp) return a.source === b.source && a.flags === b.flags;
      if (a.valueOf !== Object.prototype.valueOf) return a.valueOf() === b.valueOf();
      if (a.toString !== Object.prototype.toString) return a.toString() === b.toString();
      keys2 = Object.keys(a);
      length = keys2.length;
      if (length !== Object.keys(b).length) return false;
      for (i = length; i-- !== 0; )
        if (!Object.prototype.hasOwnProperty.call(b, keys2[i])) return false;
      for (i = length; i-- !== 0; ) {
        var key = keys2[i];
        if (!equal2(a[key], b[key])) return false;
      }
      return true;
    }
    return a !== a && b !== b;
  };
  return fastDeepEqual;
}
function requireJsonSchemaTraverse$1() {
  if (hasRequiredJsonSchemaTraverse$1) return jsonSchemaTraverse$1.exports;
  hasRequiredJsonSchemaTraverse$1 = 1;
  var traverse = jsonSchemaTraverse$1.exports = function(schema, opts, cb) {
    if (typeof opts == "function") {
      cb = opts;
      opts = {};
    }
    cb = opts.cb || cb;
    var pre = typeof cb == "function" ? cb : cb.pre || function() {
    };
    var post = cb.post || function() {
    };
    _traverse(opts, pre, post, schema, "", schema);
  };
  traverse.keywords = {
    additionalItems: true,
    items: true,
    contains: true,
    additionalProperties: true,
    propertyNames: true,
    not: true,
    if: true,
    then: true,
    else: true
  };
  traverse.arrayKeywords = {
    items: true,
    allOf: true,
    anyOf: true,
    oneOf: true
  };
  traverse.propsKeywords = {
    $defs: true,
    definitions: true,
    properties: true,
    patternProperties: true,
    dependencies: true
  };
  traverse.skipKeywords = {
    default: true,
    enum: true,
    const: true,
    required: true,
    maximum: true,
    minimum: true,
    exclusiveMaximum: true,
    exclusiveMinimum: true,
    multipleOf: true,
    maxLength: true,
    minLength: true,
    pattern: true,
    format: true,
    maxItems: true,
    minItems: true,
    uniqueItems: true,
    maxProperties: true,
    minProperties: true
  };
  function _traverse(opts, pre, post, schema, jsonPtr, rootSchema, parentJsonPtr, parentKeyword, parentSchema, keyIndex) {
    if (schema && typeof schema == "object" && !Array.isArray(schema)) {
      pre(schema, jsonPtr, rootSchema, parentJsonPtr, parentKeyword, parentSchema, keyIndex);
      for (var key in schema) {
        var sch = schema[key];
        if (Array.isArray(sch)) {
          if (key in traverse.arrayKeywords) {
            for (var i = 0; i < sch.length; i++)
              _traverse(opts, pre, post, sch[i], jsonPtr + "/" + key + "/" + i, rootSchema, jsonPtr, key, schema, i);
          }
        } else if (key in traverse.propsKeywords) {
          if (sch && typeof sch == "object") {
            for (var prop in sch)
              _traverse(opts, pre, post, sch[prop], jsonPtr + "/" + key + "/" + escapeJsonPtr(prop), rootSchema, jsonPtr, key, schema, prop);
          }
        } else if (key in traverse.keywords || opts.allKeys && !(key in traverse.skipKeywords)) {
          _traverse(opts, pre, post, sch, jsonPtr + "/" + key, rootSchema, jsonPtr, key, schema);
        }
      }
      post(schema, jsonPtr, rootSchema, parentJsonPtr, parentKeyword, parentSchema, keyIndex);
    }
  }
  function escapeJsonPtr(str) {
    return str.replace(/~/g, "~0").replace(/\//g, "~1");
  }
  return jsonSchemaTraverse$1.exports;
}
function requireResolve$1() {
  if (hasRequiredResolve$1) return resolve$1;
  hasRequiredResolve$1 = 1;
  Object.defineProperty(resolve$1, "__esModule", { value: true });
  resolve$1.getSchemaRefs = resolve$1.resolveUrl = resolve$1.normalizeId = resolve$1._getFullPath = resolve$1.getFullPath = resolve$1.inlineRef = void 0;
  const util_1 = requireUtil$4();
  const equal2 = requireFastDeepEqual();
  const traverse = requireJsonSchemaTraverse$1();
  const SIMPLE_INLINED = /* @__PURE__ */ new Set([
    "type",
    "format",
    "pattern",
    "maxLength",
    "minLength",
    "maxProperties",
    "minProperties",
    "maxItems",
    "minItems",
    "maximum",
    "minimum",
    "uniqueItems",
    "multipleOf",
    "required",
    "enum",
    "const"
  ]);
  function inlineRef(schema, limit2 = true) {
    if (typeof schema == "boolean")
      return true;
    if (limit2 === true)
      return !hasRef(schema);
    if (!limit2)
      return false;
    return countKeys(schema) <= limit2;
  }
  resolve$1.inlineRef = inlineRef;
  const REF_KEYWORDS = /* @__PURE__ */ new Set([
    "$ref",
    "$recursiveRef",
    "$recursiveAnchor",
    "$dynamicRef",
    "$dynamicAnchor"
  ]);
  function hasRef(schema) {
    for (const key in schema) {
      if (REF_KEYWORDS.has(key))
        return true;
      const sch = schema[key];
      if (Array.isArray(sch) && sch.some(hasRef))
        return true;
      if (typeof sch == "object" && hasRef(sch))
        return true;
    }
    return false;
  }
  function countKeys(schema) {
    let count = 0;
    for (const key in schema) {
      if (key === "$ref")
        return Infinity;
      count++;
      if (SIMPLE_INLINED.has(key))
        continue;
      if (typeof schema[key] == "object") {
        (0, util_1.eachItem)(schema[key], (sch) => count += countKeys(sch));
      }
      if (count === Infinity)
        return Infinity;
    }
    return count;
  }
  function getFullPath(resolver, id2 = "", normalize2) {
    if (normalize2 !== false)
      id2 = normalizeId(id2);
    const p = resolver.parse(id2);
    return _getFullPath(resolver, p);
  }
  resolve$1.getFullPath = getFullPath;
  function _getFullPath(resolver, p) {
    const serialized = resolver.serialize(p);
    return serialized.split("#")[0] + "#";
  }
  resolve$1._getFullPath = _getFullPath;
  const TRAILING_SLASH_HASH = /#\/?$/;
  function normalizeId(id2) {
    return id2 ? id2.replace(TRAILING_SLASH_HASH, "") : "";
  }
  resolve$1.normalizeId = normalizeId;
  function resolveUrl(resolver, baseId, id2) {
    id2 = normalizeId(id2);
    return resolver.resolve(baseId, id2);
  }
  resolve$1.resolveUrl = resolveUrl;
  const ANCHOR = /^[a-z_][-a-z0-9._]*$/i;
  function getSchemaRefs(schema, baseId) {
    if (typeof schema == "boolean")
      return {};
    const { schemaId, uriResolver } = this.opts;
    const schId = normalizeId(schema[schemaId] || baseId);
    const baseIds = { "": schId };
    const pathPrefix = getFullPath(uriResolver, schId, false);
    const localRefs = {};
    const schemaRefs = /* @__PURE__ */ new Set();
    traverse(schema, { allKeys: true }, (sch, jsonPtr, _, parentJsonPtr) => {
      if (parentJsonPtr === void 0)
        return;
      const fullPath = pathPrefix + jsonPtr;
      let innerBaseId = baseIds[parentJsonPtr];
      if (typeof sch[schemaId] == "string")
        innerBaseId = addRef.call(this, sch[schemaId]);
      addAnchor.call(this, sch.$anchor);
      addAnchor.call(this, sch.$dynamicAnchor);
      baseIds[jsonPtr] = innerBaseId;
      function addRef(ref2) {
        const _resolve = this.opts.uriResolver.resolve;
        ref2 = normalizeId(innerBaseId ? _resolve(innerBaseId, ref2) : ref2);
        if (schemaRefs.has(ref2))
          throw ambiguos(ref2);
        schemaRefs.add(ref2);
        let schOrRef = this.refs[ref2];
        if (typeof schOrRef == "string")
          schOrRef = this.refs[schOrRef];
        if (typeof schOrRef == "object") {
          checkAmbiguosRef(sch, schOrRef.schema, ref2);
        } else if (ref2 !== normalizeId(fullPath)) {
          if (ref2[0] === "#") {
            checkAmbiguosRef(sch, localRefs[ref2], ref2);
            localRefs[ref2] = sch;
          } else {
            this.refs[ref2] = fullPath;
          }
        }
        return ref2;
      }
      function addAnchor(anchor) {
        if (typeof anchor == "string") {
          if (!ANCHOR.test(anchor))
            throw new Error(`invalid anchor "${anchor}"`);
          addRef.call(this, `#${anchor}`);
        }
      }
    });
    return localRefs;
    function checkAmbiguosRef(sch1, sch2, ref2) {
      if (sch2 !== void 0 && !equal2(sch1, sch2))
        throw ambiguos(ref2);
    }
    function ambiguos(ref2) {
      return new Error(`reference "${ref2}" resolves to more than one schema`);
    }
  }
  resolve$1.getSchemaRefs = getSchemaRefs;
  return resolve$1;
}
function requireValidate$1() {
  if (hasRequiredValidate$1) return validate$1;
  hasRequiredValidate$1 = 1;
  Object.defineProperty(validate$1, "__esModule", { value: true });
  validate$1.getData = validate$1.KeywordCxt = validate$1.validateFunctionCode = void 0;
  const boolSchema_1 = requireBoolSchema$1();
  const dataType_1 = requireDataType$1();
  const applicability_1 = requireApplicability$1();
  const dataType_2 = requireDataType$1();
  const defaults_1 = requireDefaults$1();
  const keyword_1 = requireKeyword$2();
  const subschema_1 = requireSubschema$1();
  const codegen_1 = requireCodegen$1();
  const names_1 = requireNames$1();
  const resolve_1 = requireResolve$1();
  const util_1 = requireUtil$4();
  const errors_1 = requireErrors$2();
  function validateFunctionCode(it) {
    if (isSchemaObj(it)) {
      checkKeywords(it);
      if (schemaCxtHasRules(it)) {
        topSchemaObjCode(it);
        return;
      }
    }
    validateFunction(it, () => (0, boolSchema_1.topBoolOrEmptySchema)(it));
  }
  validate$1.validateFunctionCode = validateFunctionCode;
  function validateFunction({ gen, validateName, schema, schemaEnv, opts }, body) {
    if (opts.code.es5) {
      gen.func(validateName, (0, codegen_1._)`${names_1.default.data}, ${names_1.default.valCxt}`, schemaEnv.$async, () => {
        gen.code((0, codegen_1._)`"use strict"; ${funcSourceUrl(schema, opts)}`);
        destructureValCxtES5(gen, opts);
        gen.code(body);
      });
    } else {
      gen.func(validateName, (0, codegen_1._)`${names_1.default.data}, ${destructureValCxt(opts)}`, schemaEnv.$async, () => gen.code(funcSourceUrl(schema, opts)).code(body));
    }
  }
  function destructureValCxt(opts) {
    return (0, codegen_1._)`{${names_1.default.instancePath}="", ${names_1.default.parentData}, ${names_1.default.parentDataProperty}, ${names_1.default.rootData}=${names_1.default.data}${opts.dynamicRef ? (0, codegen_1._)`, ${names_1.default.dynamicAnchors}={}` : codegen_1.nil}}={}`;
  }
  function destructureValCxtES5(gen, opts) {
    gen.if(names_1.default.valCxt, () => {
      gen.var(names_1.default.instancePath, (0, codegen_1._)`${names_1.default.valCxt}.${names_1.default.instancePath}`);
      gen.var(names_1.default.parentData, (0, codegen_1._)`${names_1.default.valCxt}.${names_1.default.parentData}`);
      gen.var(names_1.default.parentDataProperty, (0, codegen_1._)`${names_1.default.valCxt}.${names_1.default.parentDataProperty}`);
      gen.var(names_1.default.rootData, (0, codegen_1._)`${names_1.default.valCxt}.${names_1.default.rootData}`);
      if (opts.dynamicRef)
        gen.var(names_1.default.dynamicAnchors, (0, codegen_1._)`${names_1.default.valCxt}.${names_1.default.dynamicAnchors}`);
    }, () => {
      gen.var(names_1.default.instancePath, (0, codegen_1._)`""`);
      gen.var(names_1.default.parentData, (0, codegen_1._)`undefined`);
      gen.var(names_1.default.parentDataProperty, (0, codegen_1._)`undefined`);
      gen.var(names_1.default.rootData, names_1.default.data);
      if (opts.dynamicRef)
        gen.var(names_1.default.dynamicAnchors, (0, codegen_1._)`{}`);
    });
  }
  function topSchemaObjCode(it) {
    const { schema, opts, gen } = it;
    validateFunction(it, () => {
      if (opts.$comment && schema.$comment)
        commentKeyword(it);
      checkNoDefault(it);
      gen.let(names_1.default.vErrors, null);
      gen.let(names_1.default.errors, 0);
      if (opts.unevaluated)
        resetEvaluated(it);
      typeAndKeywords(it);
      returnResults(it);
    });
    return;
  }
  function resetEvaluated(it) {
    const { gen, validateName } = it;
    it.evaluated = gen.const("evaluated", (0, codegen_1._)`${validateName}.evaluated`);
    gen.if((0, codegen_1._)`${it.evaluated}.dynamicProps`, () => gen.assign((0, codegen_1._)`${it.evaluated}.props`, (0, codegen_1._)`undefined`));
    gen.if((0, codegen_1._)`${it.evaluated}.dynamicItems`, () => gen.assign((0, codegen_1._)`${it.evaluated}.items`, (0, codegen_1._)`undefined`));
  }
  function funcSourceUrl(schema, opts) {
    const schId = typeof schema == "object" && schema[opts.schemaId];
    return schId && (opts.code.source || opts.code.process) ? (0, codegen_1._)`/*# sourceURL=${schId} */` : codegen_1.nil;
  }
  function subschemaCode(it, valid2) {
    if (isSchemaObj(it)) {
      checkKeywords(it);
      if (schemaCxtHasRules(it)) {
        subSchemaObjCode(it, valid2);
        return;
      }
    }
    (0, boolSchema_1.boolOrEmptySchema)(it, valid2);
  }
  function schemaCxtHasRules({ schema, self: self2 }) {
    if (typeof schema == "boolean")
      return !schema;
    for (const key in schema)
      if (self2.RULES.all[key])
        return true;
    return false;
  }
  function isSchemaObj(it) {
    return typeof it.schema != "boolean";
  }
  function subSchemaObjCode(it, valid2) {
    const { schema, gen, opts } = it;
    if (opts.$comment && schema.$comment)
      commentKeyword(it);
    updateContext(it);
    checkAsyncSchema(it);
    const errsCount = gen.const("_errs", names_1.default.errors);
    typeAndKeywords(it, errsCount);
    gen.var(valid2, (0, codegen_1._)`${errsCount} === ${names_1.default.errors}`);
  }
  function checkKeywords(it) {
    (0, util_1.checkUnknownRules)(it);
    checkRefsAndKeywords(it);
  }
  function typeAndKeywords(it, errsCount) {
    if (it.opts.jtd)
      return schemaKeywords(it, [], false, errsCount);
    const types2 = (0, dataType_1.getSchemaTypes)(it.schema);
    const checkedTypes = (0, dataType_1.coerceAndCheckDataType)(it, types2);
    schemaKeywords(it, types2, !checkedTypes, errsCount);
  }
  function checkRefsAndKeywords(it) {
    const { schema, errSchemaPath, opts, self: self2 } = it;
    if (schema.$ref && opts.ignoreKeywordsWithRef && (0, util_1.schemaHasRulesButRef)(schema, self2.RULES)) {
      self2.logger.warn(`$ref: keywords ignored in schema at path "${errSchemaPath}"`);
    }
  }
  function checkNoDefault(it) {
    const { schema, opts } = it;
    if (schema.default !== void 0 && opts.useDefaults && opts.strictSchema) {
      (0, util_1.checkStrictMode)(it, "default is ignored in the schema root");
    }
  }
  function updateContext(it) {
    const schId = it.schema[it.opts.schemaId];
    if (schId)
      it.baseId = (0, resolve_1.resolveUrl)(it.opts.uriResolver, it.baseId, schId);
  }
  function checkAsyncSchema(it) {
    if (it.schema.$async && !it.schemaEnv.$async)
      throw new Error("async schema in sync schema");
  }
  function commentKeyword({ gen, schemaEnv, schema, errSchemaPath, opts }) {
    const msg = schema.$comment;
    if (opts.$comment === true) {
      gen.code((0, codegen_1._)`${names_1.default.self}.logger.log(${msg})`);
    } else if (typeof opts.$comment == "function") {
      const schemaPath = (0, codegen_1.str)`${errSchemaPath}/$comment`;
      const rootName = gen.scopeValue("root", { ref: schemaEnv.root });
      gen.code((0, codegen_1._)`${names_1.default.self}.opts.$comment(${msg}, ${schemaPath}, ${rootName}.schema)`);
    }
  }
  function returnResults(it) {
    const { gen, schemaEnv, validateName, ValidationError, opts } = it;
    if (schemaEnv.$async) {
      gen.if((0, codegen_1._)`${names_1.default.errors} === 0`, () => gen.return(names_1.default.data), () => gen.throw((0, codegen_1._)`new ${ValidationError}(${names_1.default.vErrors})`));
    } else {
      gen.assign((0, codegen_1._)`${validateName}.errors`, names_1.default.vErrors);
      if (opts.unevaluated)
        assignEvaluated(it);
      gen.return((0, codegen_1._)`${names_1.default.errors} === 0`);
    }
  }
  function assignEvaluated({ gen, evaluated, props, items: items2 }) {
    if (props instanceof codegen_1.Name)
      gen.assign((0, codegen_1._)`${evaluated}.props`, props);
    if (items2 instanceof codegen_1.Name)
      gen.assign((0, codegen_1._)`${evaluated}.items`, items2);
  }
  function schemaKeywords(it, types2, typeErrors, errsCount) {
    const { gen, schema, data: data32, allErrors, opts, self: self2 } = it;
    const { RULES } = self2;
    if (schema.$ref && (opts.ignoreKeywordsWithRef || !(0, util_1.schemaHasRulesButRef)(schema, RULES))) {
      gen.block(() => keywordCode(it, "$ref", RULES.all.$ref.definition));
      return;
    }
    if (!opts.jtd)
      checkStrictTypes(it, types2);
    gen.block(() => {
      for (const group of RULES.rules)
        groupKeywords(group);
      groupKeywords(RULES.post);
    });
    function groupKeywords(group) {
      if (!(0, applicability_1.shouldUseGroup)(schema, group))
        return;
      if (group.type) {
        gen.if((0, dataType_2.checkDataType)(group.type, data32, opts.strictNumbers));
        iterateKeywords(it, group);
        if (types2.length === 1 && types2[0] === group.type && typeErrors) {
          gen.else();
          (0, dataType_2.reportTypeError)(it);
        }
        gen.endIf();
      } else {
        iterateKeywords(it, group);
      }
      if (!allErrors)
        gen.if((0, codegen_1._)`${names_1.default.errors} === ${errsCount || 0}`);
    }
  }
  function iterateKeywords(it, group) {
    const { gen, schema, opts: { useDefaults } } = it;
    if (useDefaults)
      (0, defaults_1.assignDefaults)(it, group.type);
    gen.block(() => {
      for (const rule of group.rules) {
        if ((0, applicability_1.shouldUseRule)(schema, rule)) {
          keywordCode(it, rule.keyword, rule.definition, group.type);
        }
      }
    });
  }
  function checkStrictTypes(it, types2) {
    if (it.schemaEnv.meta || !it.opts.strictTypes)
      return;
    checkContextTypes(it, types2);
    if (!it.opts.allowUnionTypes)
      checkMultipleTypes(it, types2);
    checkKeywordTypes(it, it.dataTypes);
  }
  function checkContextTypes(it, types2) {
    if (!types2.length)
      return;
    if (!it.dataTypes.length) {
      it.dataTypes = types2;
      return;
    }
    types2.forEach((t) => {
      if (!includesType(it.dataTypes, t)) {
        strictTypesError(it, `type "${t}" not allowed by context "${it.dataTypes.join(",")}"`);
      }
    });
    narrowSchemaTypes(it, types2);
  }
  function checkMultipleTypes(it, ts) {
    if (ts.length > 1 && !(ts.length === 2 && ts.includes("null"))) {
      strictTypesError(it, "use allowUnionTypes to allow union type keyword");
    }
  }
  function checkKeywordTypes(it, ts) {
    const rules2 = it.self.RULES.all;
    for (const keyword2 in rules2) {
      const rule = rules2[keyword2];
      if (typeof rule == "object" && (0, applicability_1.shouldUseRule)(it.schema, rule)) {
        const { type: type2 } = rule.definition;
        if (type2.length && !type2.some((t) => hasApplicableType(ts, t))) {
          strictTypesError(it, `missing type "${type2.join(",")}" for keyword "${keyword2}"`);
        }
      }
    }
  }
  function hasApplicableType(schTs, kwdT) {
    return schTs.includes(kwdT) || kwdT === "number" && schTs.includes("integer");
  }
  function includesType(ts, t) {
    return ts.includes(t) || t === "integer" && ts.includes("number");
  }
  function narrowSchemaTypes(it, withTypes) {
    const ts = [];
    for (const t of it.dataTypes) {
      if (includesType(withTypes, t))
        ts.push(t);
      else if (withTypes.includes("integer") && t === "number")
        ts.push("integer");
    }
    it.dataTypes = ts;
  }
  function strictTypesError(it, msg) {
    const schemaPath = it.schemaEnv.baseId + it.errSchemaPath;
    msg += ` at "${schemaPath}" (strictTypes)`;
    (0, util_1.checkStrictMode)(it, msg, it.opts.strictTypes);
  }
  class KeywordCxt {
    constructor(it, def2, keyword2) {
      (0, keyword_1.validateKeywordUsage)(it, def2, keyword2);
      this.gen = it.gen;
      this.allErrors = it.allErrors;
      this.keyword = keyword2;
      this.data = it.data;
      this.schema = it.schema[keyword2];
      this.$data = def2.$data && it.opts.$data && this.schema && this.schema.$data;
      this.schemaValue = (0, util_1.schemaRefOrVal)(it, this.schema, keyword2, this.$data);
      this.schemaType = def2.schemaType;
      this.parentSchema = it.schema;
      this.params = {};
      this.it = it;
      this.def = def2;
      if (this.$data) {
        this.schemaCode = it.gen.const("vSchema", getData(this.$data, it));
      } else {
        this.schemaCode = this.schemaValue;
        if (!(0, keyword_1.validSchemaType)(this.schema, def2.schemaType, def2.allowUndefined)) {
          throw new Error(`${keyword2} value must be ${JSON.stringify(def2.schemaType)}`);
        }
      }
      if ("code" in def2 ? def2.trackErrors : def2.errors !== false) {
        this.errsCount = it.gen.const("_errs", names_1.default.errors);
      }
    }
    result(condition, successAction, failAction) {
      this.failResult((0, codegen_1.not)(condition), successAction, failAction);
    }
    failResult(condition, successAction, failAction) {
      this.gen.if(condition);
      if (failAction)
        failAction();
      else
        this.error();
      if (successAction) {
        this.gen.else();
        successAction();
        if (this.allErrors)
          this.gen.endIf();
      } else {
        if (this.allErrors)
          this.gen.endIf();
        else
          this.gen.else();
      }
    }
    pass(condition, failAction) {
      this.failResult((0, codegen_1.not)(condition), void 0, failAction);
    }
    fail(condition) {
      if (condition === void 0) {
        this.error();
        if (!this.allErrors)
          this.gen.if(false);
        return;
      }
      this.gen.if(condition);
      this.error();
      if (this.allErrors)
        this.gen.endIf();
      else
        this.gen.else();
    }
    fail$data(condition) {
      if (!this.$data)
        return this.fail(condition);
      const { schemaCode } = this;
      this.fail((0, codegen_1._)`${schemaCode} !== undefined && (${(0, codegen_1.or)(this.invalid$data(), condition)})`);
    }
    error(append, errorParams, errorPaths) {
      if (errorParams) {
        this.setParams(errorParams);
        this._error(append, errorPaths);
        this.setParams({});
        return;
      }
      this._error(append, errorPaths);
    }
    _error(append, errorPaths) {
      (append ? errors_1.reportExtraError : errors_1.reportError)(this, this.def.error, errorPaths);
    }
    $dataError() {
      (0, errors_1.reportError)(this, this.def.$dataError || errors_1.keyword$DataError);
    }
    reset() {
      if (this.errsCount === void 0)
        throw new Error('add "trackErrors" to keyword definition');
      (0, errors_1.resetErrorsCount)(this.gen, this.errsCount);
    }
    ok(cond) {
      if (!this.allErrors)
        this.gen.if(cond);
    }
    setParams(obj, assign) {
      if (assign)
        Object.assign(this.params, obj);
      else
        this.params = obj;
    }
    block$data(valid2, codeBlock, $dataValid = codegen_1.nil) {
      this.gen.block(() => {
        this.check$data(valid2, $dataValid);
        codeBlock();
      });
    }
    check$data(valid2 = codegen_1.nil, $dataValid = codegen_1.nil) {
      if (!this.$data)
        return;
      const { gen, schemaCode, schemaType, def: def2 } = this;
      gen.if((0, codegen_1.or)((0, codegen_1._)`${schemaCode} === undefined`, $dataValid));
      if (valid2 !== codegen_1.nil)
        gen.assign(valid2, true);
      if (schemaType.length || def2.validateSchema) {
        gen.elseIf(this.invalid$data());
        this.$dataError();
        if (valid2 !== codegen_1.nil)
          gen.assign(valid2, false);
      }
      gen.else();
    }
    invalid$data() {
      const { gen, schemaCode, schemaType, def: def2, it } = this;
      return (0, codegen_1.or)(wrong$DataType(), invalid$DataSchema());
      function wrong$DataType() {
        if (schemaType.length) {
          if (!(schemaCode instanceof codegen_1.Name))
            throw new Error("ajv implementation error");
          const st = Array.isArray(schemaType) ? schemaType : [schemaType];
          return (0, codegen_1._)`${(0, dataType_2.checkDataTypes)(st, schemaCode, it.opts.strictNumbers, dataType_2.DataType.Wrong)}`;
        }
        return codegen_1.nil;
      }
      function invalid$DataSchema() {
        if (def2.validateSchema) {
          const validateSchemaRef = gen.scopeValue("validate$data", { ref: def2.validateSchema });
          return (0, codegen_1._)`!${validateSchemaRef}(${schemaCode})`;
        }
        return codegen_1.nil;
      }
    }
    subschema(appl, valid2) {
      const subschema2 = (0, subschema_1.getSubschema)(this.it, appl);
      (0, subschema_1.extendSubschemaData)(subschema2, this.it, appl);
      (0, subschema_1.extendSubschemaMode)(subschema2, appl);
      const nextContext = { ...this.it, ...subschema2, items: void 0, props: void 0 };
      subschemaCode(nextContext, valid2);
      return nextContext;
    }
    mergeEvaluated(schemaCxt, toName) {
      const { it, gen } = this;
      if (!it.opts.unevaluated)
        return;
      if (it.props !== true && schemaCxt.props !== void 0) {
        it.props = util_1.mergeEvaluated.props(gen, schemaCxt.props, it.props, toName);
      }
      if (it.items !== true && schemaCxt.items !== void 0) {
        it.items = util_1.mergeEvaluated.items(gen, schemaCxt.items, it.items, toName);
      }
    }
    mergeValidEvaluated(schemaCxt, valid2) {
      const { it, gen } = this;
      if (it.opts.unevaluated && (it.props !== true || it.items !== true)) {
        gen.if(valid2, () => this.mergeEvaluated(schemaCxt, codegen_1.Name));
        return true;
      }
    }
  }
  validate$1.KeywordCxt = KeywordCxt;
  function keywordCode(it, keyword2, def2, ruleType) {
    const cxt = new KeywordCxt(it, def2, keyword2);
    if ("code" in def2) {
      def2.code(cxt, ruleType);
    } else if (cxt.$data && def2.validate) {
      (0, keyword_1.funcKeywordCode)(cxt, def2);
    } else if ("macro" in def2) {
      (0, keyword_1.macroKeywordCode)(cxt, def2);
    } else if (def2.compile || def2.validate) {
      (0, keyword_1.funcKeywordCode)(cxt, def2);
    }
  }
  const JSON_POINTER = /^\/(?:[^~]|~0|~1)*$/;
  const RELATIVE_JSON_POINTER = /^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;
  function getData($data, { dataLevel, dataNames, dataPathArr }) {
    let jsonPointer;
    let data32;
    if ($data === "")
      return names_1.default.rootData;
    if ($data[0] === "/") {
      if (!JSON_POINTER.test($data))
        throw new Error(`Invalid JSON-pointer: ${$data}`);
      jsonPointer = $data;
      data32 = names_1.default.rootData;
    } else {
      const matches = RELATIVE_JSON_POINTER.exec($data);
      if (!matches)
        throw new Error(`Invalid JSON-pointer: ${$data}`);
      const up = +matches[1];
      jsonPointer = matches[2];
      if (jsonPointer === "#") {
        if (up >= dataLevel)
          throw new Error(errorMsg("property/index", up));
        return dataPathArr[dataLevel - up];
      }
      if (up > dataLevel)
        throw new Error(errorMsg("data", up));
      data32 = dataNames[dataLevel - up];
      if (!jsonPointer)
        return data32;
    }
    let expr = data32;
    const segments = jsonPointer.split("/");
    for (const segment of segments) {
      if (segment) {
        data32 = (0, codegen_1._)`${data32}${(0, codegen_1.getProperty)((0, util_1.unescapeJsonPointer)(segment))}`;
        expr = (0, codegen_1._)`${expr} && ${data32}`;
      }
    }
    return expr;
    function errorMsg(pointerType, up) {
      return `Cannot access ${pointerType} ${up} levels up, current level is ${dataLevel}`;
    }
  }
  validate$1.getData = getData;
  return validate$1;
}
function requireValidation_error$1() {
  if (hasRequiredValidation_error$1) return validation_error$1;
  hasRequiredValidation_error$1 = 1;
  Object.defineProperty(validation_error$1, "__esModule", { value: true });
  class ValidationError extends Error {
    constructor(errors2) {
      super("validation failed");
      this.errors = errors2;
      this.ajv = this.validation = true;
    }
  }
  validation_error$1.default = ValidationError;
  return validation_error$1;
}
function requireRef_error$1() {
  if (hasRequiredRef_error$1) return ref_error$1;
  hasRequiredRef_error$1 = 1;
  Object.defineProperty(ref_error$1, "__esModule", { value: true });
  const resolve_1 = requireResolve$1();
  class MissingRefError extends Error {
    constructor(resolver, baseId, ref2, msg) {
      super(msg || `can't resolve reference ${ref2} from id ${baseId}`);
      this.missingRef = (0, resolve_1.resolveUrl)(resolver, baseId, ref2);
      this.missingSchema = (0, resolve_1.normalizeId)((0, resolve_1.getFullPath)(resolver, this.missingRef));
    }
  }
  ref_error$1.default = MissingRefError;
  return ref_error$1;
}
function requireCompile$2() {
  if (hasRequiredCompile$2) return compile$2;
  hasRequiredCompile$2 = 1;
  Object.defineProperty(compile$2, "__esModule", { value: true });
  compile$2.resolveSchema = compile$2.getCompilingSchema = compile$2.resolveRef = compile$2.compileSchema = compile$2.SchemaEnv = void 0;
  const codegen_1 = requireCodegen$1();
  const validation_error_1 = requireValidation_error$1();
  const names_1 = requireNames$1();
  const resolve_1 = requireResolve$1();
  const util_1 = requireUtil$4();
  const validate_1 = requireValidate$1();
  class SchemaEnv {
    constructor(env2) {
      var _a4;
      this.refs = {};
      this.dynamicAnchors = {};
      let schema;
      if (typeof env2.schema == "object")
        schema = env2.schema;
      this.schema = env2.schema;
      this.schemaId = env2.schemaId;
      this.root = env2.root || this;
      this.baseId = (_a4 = env2.baseId) !== null && _a4 !== void 0 ? _a4 : (0, resolve_1.normalizeId)(schema === null || schema === void 0 ? void 0 : schema[env2.schemaId || "$id"]);
      this.schemaPath = env2.schemaPath;
      this.localRefs = env2.localRefs;
      this.meta = env2.meta;
      this.$async = schema === null || schema === void 0 ? void 0 : schema.$async;
      this.refs = {};
    }
  }
  compile$2.SchemaEnv = SchemaEnv;
  function compileSchema(sch) {
    const _sch = getCompilingSchema.call(this, sch);
    if (_sch)
      return _sch;
    const rootId = (0, resolve_1.getFullPath)(this.opts.uriResolver, sch.root.baseId);
    const { es5, lines } = this.opts.code;
    const { ownProperties } = this.opts;
    const gen = new codegen_1.CodeGen(this.scope, { es5, lines, ownProperties });
    let _ValidationError;
    if (sch.$async) {
      _ValidationError = gen.scopeValue("Error", {
        ref: validation_error_1.default,
        code: (0, codegen_1._)`require("ajv/dist/runtime/validation_error").default`
      });
    }
    const validateName = gen.scopeName("validate");
    sch.validateName = validateName;
    const schemaCxt = {
      gen,
      allErrors: this.opts.allErrors,
      data: names_1.default.data,
      parentData: names_1.default.parentData,
      parentDataProperty: names_1.default.parentDataProperty,
      dataNames: [names_1.default.data],
      dataPathArr: [codegen_1.nil],
      dataLevel: 0,
      dataTypes: [],
      definedProperties: /* @__PURE__ */ new Set(),
      topSchemaRef: gen.scopeValue("schema", this.opts.code.source === true ? { ref: sch.schema, code: (0, codegen_1.stringify)(sch.schema) } : { ref: sch.schema }),
      validateName,
      ValidationError: _ValidationError,
      schema: sch.schema,
      schemaEnv: sch,
      rootId,
      baseId: sch.baseId || rootId,
      schemaPath: codegen_1.nil,
      errSchemaPath: sch.schemaPath || (this.opts.jtd ? "" : "#"),
      errorPath: (0, codegen_1._)`""`,
      opts: this.opts,
      self: this
    };
    let sourceCode;
    try {
      this._compilations.add(sch);
      (0, validate_1.validateFunctionCode)(schemaCxt);
      gen.optimize(this.opts.code.optimize);
      const validateCode = gen.toString();
      sourceCode = `${gen.scopeRefs(names_1.default.scope)}return ${validateCode}`;
      if (this.opts.code.process)
        sourceCode = this.opts.code.process(sourceCode, sch);
      const makeValidate = new Function(`${names_1.default.self}`, `${names_1.default.scope}`, sourceCode);
      const validate2 = makeValidate(this, this.scope.get());
      this.scope.value(validateName, { ref: validate2 });
      validate2.errors = null;
      validate2.schema = sch.schema;
      validate2.schemaEnv = sch;
      if (sch.$async)
        validate2.$async = true;
      if (this.opts.code.source === true) {
        validate2.source = { validateName, validateCode, scopeValues: gen._values };
      }
      if (this.opts.unevaluated) {
        const { props, items: items2 } = schemaCxt;
        validate2.evaluated = {
          props: props instanceof codegen_1.Name ? void 0 : props,
          items: items2 instanceof codegen_1.Name ? void 0 : items2,
          dynamicProps: props instanceof codegen_1.Name,
          dynamicItems: items2 instanceof codegen_1.Name
        };
        if (validate2.source)
          validate2.source.evaluated = (0, codegen_1.stringify)(validate2.evaluated);
      }
      sch.validate = validate2;
      return sch;
    } catch (e) {
      delete sch.validate;
      delete sch.validateName;
      if (sourceCode)
        this.logger.error("Error compiling schema, function code:", sourceCode);
      throw e;
    } finally {
      this._compilations.delete(sch);
    }
  }
  compile$2.compileSchema = compileSchema;
  function resolveRef(root2, baseId, ref2) {
    var _a4;
    ref2 = (0, resolve_1.resolveUrl)(this.opts.uriResolver, baseId, ref2);
    const schOrFunc = root2.refs[ref2];
    if (schOrFunc)
      return schOrFunc;
    let _sch = resolve2.call(this, root2, ref2);
    if (_sch === void 0) {
      const schema = (_a4 = root2.localRefs) === null || _a4 === void 0 ? void 0 : _a4[ref2];
      const { schemaId } = this.opts;
      if (schema)
        _sch = new SchemaEnv({ schema, schemaId, root: root2, baseId });
    }
    if (_sch === void 0)
      return;
    return root2.refs[ref2] = inlineOrCompile.call(this, _sch);
  }
  compile$2.resolveRef = resolveRef;
  function inlineOrCompile(sch) {
    if ((0, resolve_1.inlineRef)(sch.schema, this.opts.inlineRefs))
      return sch.schema;
    return sch.validate ? sch : compileSchema.call(this, sch);
  }
  function getCompilingSchema(schEnv) {
    for (const sch of this._compilations) {
      if (sameSchemaEnv(sch, schEnv))
        return sch;
    }
  }
  compile$2.getCompilingSchema = getCompilingSchema;
  function sameSchemaEnv(s1, s2) {
    return s1.schema === s2.schema && s1.root === s2.root && s1.baseId === s2.baseId;
  }
  function resolve2(root2, ref2) {
    let sch;
    while (typeof (sch = this.refs[ref2]) == "string")
      ref2 = sch;
    return sch || this.schemas[ref2] || resolveSchema.call(this, root2, ref2);
  }
  function resolveSchema(root2, ref2) {
    const p = this.opts.uriResolver.parse(ref2);
    const refPath = (0, resolve_1._getFullPath)(this.opts.uriResolver, p);
    let baseId = (0, resolve_1.getFullPath)(this.opts.uriResolver, root2.baseId, void 0);
    if (Object.keys(root2.schema).length > 0 && refPath === baseId) {
      return getJsonPointer.call(this, p, root2);
    }
    const id2 = (0, resolve_1.normalizeId)(refPath);
    const schOrRef = this.refs[id2] || this.schemas[id2];
    if (typeof schOrRef == "string") {
      const sch = resolveSchema.call(this, root2, schOrRef);
      if (typeof (sch === null || sch === void 0 ? void 0 : sch.schema) !== "object")
        return;
      return getJsonPointer.call(this, p, sch);
    }
    if (typeof (schOrRef === null || schOrRef === void 0 ? void 0 : schOrRef.schema) !== "object")
      return;
    if (!schOrRef.validate)
      compileSchema.call(this, schOrRef);
    if (id2 === (0, resolve_1.normalizeId)(ref2)) {
      const { schema } = schOrRef;
      const { schemaId } = this.opts;
      const schId = schema[schemaId];
      if (schId)
        baseId = (0, resolve_1.resolveUrl)(this.opts.uriResolver, baseId, schId);
      return new SchemaEnv({ schema, schemaId, root: root2, baseId });
    }
    return getJsonPointer.call(this, p, schOrRef);
  }
  compile$2.resolveSchema = resolveSchema;
  const PREVENT_SCOPE_CHANGE = /* @__PURE__ */ new Set([
    "properties",
    "patternProperties",
    "enum",
    "dependencies",
    "definitions"
  ]);
  function getJsonPointer(parsedRef, { baseId, schema, root: root2 }) {
    var _a4;
    if (((_a4 = parsedRef.fragment) === null || _a4 === void 0 ? void 0 : _a4[0]) !== "/")
      return;
    for (const part of parsedRef.fragment.slice(1).split("/")) {
      if (typeof schema === "boolean")
        return;
      const partSchema = schema[(0, util_1.unescapeFragment)(part)];
      if (partSchema === void 0)
        return;
      schema = partSchema;
      const schId = typeof schema === "object" && schema[this.opts.schemaId];
      if (!PREVENT_SCOPE_CHANGE.has(part) && schId) {
        baseId = (0, resolve_1.resolveUrl)(this.opts.uriResolver, baseId, schId);
      }
    }
    let env2;
    if (typeof schema != "boolean" && schema.$ref && !(0, util_1.schemaHasRulesButRef)(schema, this.RULES)) {
      const $ref = (0, resolve_1.resolveUrl)(this.opts.uriResolver, baseId, schema.$ref);
      env2 = resolveSchema.call(this, root2, $ref);
    }
    const { schemaId } = this.opts;
    env2 = env2 || new SchemaEnv({ schema, schemaId, root: root2, baseId });
    if (env2.schema !== env2.root.schema)
      return env2;
    return void 0;
  }
  return compile$2;
}
function requireUtils$2() {
  if (hasRequiredUtils$2) return utils$2;
  hasRequiredUtils$2 = 1;
  const isUUID = RegExp.prototype.test.bind(/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu);
  const isIPv4 = RegExp.prototype.test.bind(/^(?:(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)$/u);
  function stringArrayToHexStripped(input) {
    let acc = "";
    let code2 = 0;
    let i = 0;
    for (i = 0; i < input.length; i++) {
      code2 = input[i].charCodeAt(0);
      if (code2 === 48) {
        continue;
      }
      if (!(code2 >= 48 && code2 <= 57 || code2 >= 65 && code2 <= 70 || code2 >= 97 && code2 <= 102)) {
        return "";
      }
      acc += input[i];
      break;
    }
    for (i += 1; i < input.length; i++) {
      code2 = input[i].charCodeAt(0);
      if (!(code2 >= 48 && code2 <= 57 || code2 >= 65 && code2 <= 70 || code2 >= 97 && code2 <= 102)) {
        return "";
      }
      acc += input[i];
    }
    return acc;
  }
  const nonSimpleDomain = RegExp.prototype.test.bind(/[^!"$&'()*+,\-.;=_`a-z{}~]/u);
  function consumeIsZone(buffer) {
    buffer.length = 0;
    return true;
  }
  function consumeHextets(buffer, address, output) {
    if (buffer.length) {
      const hex = stringArrayToHexStripped(buffer);
      if (hex !== "") {
        address.push(hex);
      } else {
        output.error = true;
        return false;
      }
      buffer.length = 0;
    }
    return true;
  }
  function getIPV6(input) {
    let tokenCount = 0;
    const output = { error: false, address: "", zone: "" };
    const address = [];
    const buffer = [];
    let endipv6Encountered = false;
    let endIpv6 = false;
    let consume = consumeHextets;
    for (let i = 0; i < input.length; i++) {
      const cursor = input[i];
      if (cursor === "[" || cursor === "]") {
        continue;
      }
      if (cursor === ":") {
        if (endipv6Encountered === true) {
          endIpv6 = true;
        }
        if (!consume(buffer, address, output)) {
          break;
        }
        if (++tokenCount > 7) {
          output.error = true;
          break;
        }
        if (i > 0 && input[i - 1] === ":") {
          endipv6Encountered = true;
        }
        address.push(":");
        continue;
      } else if (cursor === "%") {
        if (!consume(buffer, address, output)) {
          break;
        }
        consume = consumeIsZone;
      } else {
        buffer.push(cursor);
        continue;
      }
    }
    if (buffer.length) {
      if (consume === consumeIsZone) {
        output.zone = buffer.join("");
      } else if (endIpv6) {
        address.push(buffer.join(""));
      } else {
        address.push(stringArrayToHexStripped(buffer));
      }
    }
    output.address = address.join("");
    return output;
  }
  function normalizeIPv6(host) {
    if (findToken(host, ":") < 2) {
      return { host, isIPV6: false };
    }
    const ipv62 = getIPV6(host);
    if (!ipv62.error) {
      let newHost = ipv62.address;
      let escapedHost = ipv62.address;
      if (ipv62.zone) {
        newHost += "%" + ipv62.zone;
        escapedHost += "%25" + ipv62.zone;
      }
      return { host: newHost, isIPV6: true, escapedHost };
    } else {
      return { host, isIPV6: false };
    }
  }
  function findToken(str, token) {
    let ind = 0;
    for (let i = 0; i < str.length; i++) {
      if (str[i] === token) ind++;
    }
    return ind;
  }
  function removeDotSegments(path14) {
    let input = path14;
    const output = [];
    let nextSlash = -1;
    let len = 0;
    while (len = input.length) {
      if (len === 1) {
        if (input === ".") {
          break;
        } else if (input === "/") {
          output.push("/");
          break;
        } else {
          output.push(input);
          break;
        }
      } else if (len === 2) {
        if (input[0] === ".") {
          if (input[1] === ".") {
            break;
          } else if (input[1] === "/") {
            input = input.slice(2);
            continue;
          }
        } else if (input[0] === "/") {
          if (input[1] === "." || input[1] === "/") {
            output.push("/");
            break;
          }
        }
      } else if (len === 3) {
        if (input === "/..") {
          if (output.length !== 0) {
            output.pop();
          }
          output.push("/");
          break;
        }
      }
      if (input[0] === ".") {
        if (input[1] === ".") {
          if (input[2] === "/") {
            input = input.slice(3);
            continue;
          }
        } else if (input[1] === "/") {
          input = input.slice(2);
          continue;
        }
      } else if (input[0] === "/") {
        if (input[1] === ".") {
          if (input[2] === "/") {
            input = input.slice(2);
            continue;
          } else if (input[2] === ".") {
            if (input[3] === "/") {
              input = input.slice(3);
              if (output.length !== 0) {
                output.pop();
              }
              continue;
            }
          }
        }
      }
      if ((nextSlash = input.indexOf("/", 1)) === -1) {
        output.push(input);
        break;
      } else {
        output.push(input.slice(0, nextSlash));
        input = input.slice(nextSlash);
      }
    }
    return output.join("");
  }
  function normalizeComponentEncoding(component, esc2) {
    const func = esc2 !== true ? escape : unescape;
    if (component.scheme !== void 0) {
      component.scheme = func(component.scheme);
    }
    if (component.userinfo !== void 0) {
      component.userinfo = func(component.userinfo);
    }
    if (component.host !== void 0) {
      component.host = func(component.host);
    }
    if (component.path !== void 0) {
      component.path = func(component.path);
    }
    if (component.query !== void 0) {
      component.query = func(component.query);
    }
    if (component.fragment !== void 0) {
      component.fragment = func(component.fragment);
    }
    return component;
  }
  function recomposeAuthority(component) {
    const uriTokens = [];
    if (component.userinfo !== void 0) {
      uriTokens.push(component.userinfo);
      uriTokens.push("@");
    }
    if (component.host !== void 0) {
      let host = unescape(component.host);
      if (!isIPv4(host)) {
        const ipV6res = normalizeIPv6(host);
        if (ipV6res.isIPV6 === true) {
          host = `[${ipV6res.escapedHost}]`;
        } else {
          host = component.host;
        }
      }
      uriTokens.push(host);
    }
    if (typeof component.port === "number" || typeof component.port === "string") {
      uriTokens.push(":");
      uriTokens.push(String(component.port));
    }
    return uriTokens.length ? uriTokens.join("") : void 0;
  }
  utils$2 = {
    nonSimpleDomain,
    recomposeAuthority,
    normalizeComponentEncoding,
    removeDotSegments,
    isIPv4,
    isUUID,
    normalizeIPv6,
    stringArrayToHexStripped
  };
  return utils$2;
}
function requireSchemes() {
  if (hasRequiredSchemes) return schemes;
  hasRequiredSchemes = 1;
  const { isUUID } = requireUtils$2();
  const URN_REG = /([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu;
  const supportedSchemeNames = [
    "http",
    "https",
    "ws",
    "wss",
    "urn",
    "urn:uuid"
  ];
  function isValidSchemeName(name) {
    return supportedSchemeNames.indexOf(name) !== -1;
  }
  function wsIsSecure(wsComponent) {
    if (wsComponent.secure === true) {
      return true;
    } else if (wsComponent.secure === false) {
      return false;
    } else if (wsComponent.scheme) {
      return wsComponent.scheme.length === 3 && (wsComponent.scheme[0] === "w" || wsComponent.scheme[0] === "W") && (wsComponent.scheme[1] === "s" || wsComponent.scheme[1] === "S") && (wsComponent.scheme[2] === "s" || wsComponent.scheme[2] === "S");
    } else {
      return false;
    }
  }
  function httpParse(component) {
    if (!component.host) {
      component.error = component.error || "HTTP URIs must have a host.";
    }
    return component;
  }
  function httpSerialize(component) {
    const secure = String(component.scheme).toLowerCase() === "https";
    if (component.port === (secure ? 443 : 80) || component.port === "") {
      component.port = void 0;
    }
    if (!component.path) {
      component.path = "/";
    }
    return component;
  }
  function wsParse(wsComponent) {
    wsComponent.secure = wsIsSecure(wsComponent);
    wsComponent.resourceName = (wsComponent.path || "/") + (wsComponent.query ? "?" + wsComponent.query : "");
    wsComponent.path = void 0;
    wsComponent.query = void 0;
    return wsComponent;
  }
  function wsSerialize(wsComponent) {
    if (wsComponent.port === (wsIsSecure(wsComponent) ? 443 : 80) || wsComponent.port === "") {
      wsComponent.port = void 0;
    }
    if (typeof wsComponent.secure === "boolean") {
      wsComponent.scheme = wsComponent.secure ? "wss" : "ws";
      wsComponent.secure = void 0;
    }
    if (wsComponent.resourceName) {
      const [path14, query] = wsComponent.resourceName.split("?");
      wsComponent.path = path14 && path14 !== "/" ? path14 : void 0;
      wsComponent.query = query;
      wsComponent.resourceName = void 0;
    }
    wsComponent.fragment = void 0;
    return wsComponent;
  }
  function urnParse(urnComponent, options2) {
    if (!urnComponent.path) {
      urnComponent.error = "URN can not be parsed";
      return urnComponent;
    }
    const matches = urnComponent.path.match(URN_REG);
    if (matches) {
      const scheme = options2.scheme || urnComponent.scheme || "urn";
      urnComponent.nid = matches[1].toLowerCase();
      urnComponent.nss = matches[2];
      const urnScheme = `${scheme}:${options2.nid || urnComponent.nid}`;
      const schemeHandler = getSchemeHandler(urnScheme);
      urnComponent.path = void 0;
      if (schemeHandler) {
        urnComponent = schemeHandler.parse(urnComponent, options2);
      }
    } else {
      urnComponent.error = urnComponent.error || "URN can not be parsed.";
    }
    return urnComponent;
  }
  function urnSerialize(urnComponent, options2) {
    if (urnComponent.nid === void 0) {
      throw new Error("URN without nid cannot be serialized");
    }
    const scheme = options2.scheme || urnComponent.scheme || "urn";
    const nid = urnComponent.nid.toLowerCase();
    const urnScheme = `${scheme}:${options2.nid || nid}`;
    const schemeHandler = getSchemeHandler(urnScheme);
    if (schemeHandler) {
      urnComponent = schemeHandler.serialize(urnComponent, options2);
    }
    const uriComponent = urnComponent;
    const nss = urnComponent.nss;
    uriComponent.path = `${nid || options2.nid}:${nss}`;
    options2.skipEscape = true;
    return uriComponent;
  }
  function urnuuidParse(urnComponent, options2) {
    const uuidComponent = urnComponent;
    uuidComponent.uuid = uuidComponent.nss;
    uuidComponent.nss = void 0;
    if (!options2.tolerant && (!uuidComponent.uuid || !isUUID(uuidComponent.uuid))) {
      uuidComponent.error = uuidComponent.error || "UUID is not valid.";
    }
    return uuidComponent;
  }
  function urnuuidSerialize(uuidComponent) {
    const urnComponent = uuidComponent;
    urnComponent.nss = (uuidComponent.uuid || "").toLowerCase();
    return urnComponent;
  }
  const http2 = {
    scheme: "http",
    domainHost: true,
    parse: httpParse,
    serialize: httpSerialize
  };
  const https2 = {
    scheme: "https",
    domainHost: http2.domainHost,
    parse: httpParse,
    serialize: httpSerialize
  };
  const ws = {
    scheme: "ws",
    domainHost: true,
    parse: wsParse,
    serialize: wsSerialize
  };
  const wss = {
    scheme: "wss",
    domainHost: ws.domainHost,
    parse: ws.parse,
    serialize: ws.serialize
  };
  const urn = {
    scheme: "urn",
    parse: urnParse,
    serialize: urnSerialize,
    skipNormalize: true
  };
  const urnuuid = {
    scheme: "urn:uuid",
    parse: urnuuidParse,
    serialize: urnuuidSerialize,
    skipNormalize: true
  };
  const SCHEMES = {
    http: http2,
    https: https2,
    ws,
    wss,
    urn,
    "urn:uuid": urnuuid
  };
  Object.setPrototypeOf(SCHEMES, null);
  function getSchemeHandler(scheme) {
    return scheme && (SCHEMES[scheme] || SCHEMES[scheme.toLowerCase()]) || void 0;
  }
  schemes = {
    wsIsSecure,
    SCHEMES,
    isValidSchemeName,
    getSchemeHandler
  };
  return schemes;
}
function requireFastUri() {
  if (hasRequiredFastUri) return fastUri.exports;
  hasRequiredFastUri = 1;
  const { normalizeIPv6, removeDotSegments, recomposeAuthority, normalizeComponentEncoding, isIPv4, nonSimpleDomain } = requireUtils$2();
  const { SCHEMES, getSchemeHandler } = requireSchemes();
  function normalize2(uri2, options2) {
    if (typeof uri2 === "string") {
      uri2 = serialize(parse2(uri2, options2), options2);
    } else if (typeof uri2 === "object") {
      uri2 = parse2(serialize(uri2, options2), options2);
    }
    return uri2;
  }
  function resolve2(baseURI, relativeURI, options2) {
    const schemelessOptions = options2 ? Object.assign({ scheme: "null" }, options2) : { scheme: "null" };
    const resolved = resolveComponent(parse2(baseURI, schemelessOptions), parse2(relativeURI, schemelessOptions), schemelessOptions, true);
    schemelessOptions.skipEscape = true;
    return serialize(resolved, schemelessOptions);
  }
  function resolveComponent(base, relative2, options2, skipNormalization) {
    const target = {};
    if (!skipNormalization) {
      base = parse2(serialize(base, options2), options2);
      relative2 = parse2(serialize(relative2, options2), options2);
    }
    options2 = options2 || {};
    if (!options2.tolerant && relative2.scheme) {
      target.scheme = relative2.scheme;
      target.userinfo = relative2.userinfo;
      target.host = relative2.host;
      target.port = relative2.port;
      target.path = removeDotSegments(relative2.path || "");
      target.query = relative2.query;
    } else {
      if (relative2.userinfo !== void 0 || relative2.host !== void 0 || relative2.port !== void 0) {
        target.userinfo = relative2.userinfo;
        target.host = relative2.host;
        target.port = relative2.port;
        target.path = removeDotSegments(relative2.path || "");
        target.query = relative2.query;
      } else {
        if (!relative2.path) {
          target.path = base.path;
          if (relative2.query !== void 0) {
            target.query = relative2.query;
          } else {
            target.query = base.query;
          }
        } else {
          if (relative2.path[0] === "/") {
            target.path = removeDotSegments(relative2.path);
          } else {
            if ((base.userinfo !== void 0 || base.host !== void 0 || base.port !== void 0) && !base.path) {
              target.path = "/" + relative2.path;
            } else if (!base.path) {
              target.path = relative2.path;
            } else {
              target.path = base.path.slice(0, base.path.lastIndexOf("/") + 1) + relative2.path;
            }
            target.path = removeDotSegments(target.path);
          }
          target.query = relative2.query;
        }
        target.userinfo = base.userinfo;
        target.host = base.host;
        target.port = base.port;
      }
      target.scheme = base.scheme;
    }
    target.fragment = relative2.fragment;
    return target;
  }
  function equal2(uriA, uriB, options2) {
    if (typeof uriA === "string") {
      uriA = unescape(uriA);
      uriA = serialize(normalizeComponentEncoding(parse2(uriA, options2), true), { ...options2, skipEscape: true });
    } else if (typeof uriA === "object") {
      uriA = serialize(normalizeComponentEncoding(uriA, true), { ...options2, skipEscape: true });
    }
    if (typeof uriB === "string") {
      uriB = unescape(uriB);
      uriB = serialize(normalizeComponentEncoding(parse2(uriB, options2), true), { ...options2, skipEscape: true });
    } else if (typeof uriB === "object") {
      uriB = serialize(normalizeComponentEncoding(uriB, true), { ...options2, skipEscape: true });
    }
    return uriA.toLowerCase() === uriB.toLowerCase();
  }
  function serialize(cmpts, opts) {
    const component = {
      host: cmpts.host,
      scheme: cmpts.scheme,
      userinfo: cmpts.userinfo,
      port: cmpts.port,
      path: cmpts.path,
      query: cmpts.query,
      nid: cmpts.nid,
      nss: cmpts.nss,
      uuid: cmpts.uuid,
      fragment: cmpts.fragment,
      reference: cmpts.reference,
      resourceName: cmpts.resourceName,
      secure: cmpts.secure,
      error: ""
    };
    const options2 = Object.assign({}, opts);
    const uriTokens = [];
    const schemeHandler = getSchemeHandler(options2.scheme || component.scheme);
    if (schemeHandler && schemeHandler.serialize) schemeHandler.serialize(component, options2);
    if (component.path !== void 0) {
      if (!options2.skipEscape) {
        component.path = escape(component.path);
        if (component.scheme !== void 0) {
          component.path = component.path.split("%3A").join(":");
        }
      } else {
        component.path = unescape(component.path);
      }
    }
    if (options2.reference !== "suffix" && component.scheme) {
      uriTokens.push(component.scheme, ":");
    }
    const authority = recomposeAuthority(component);
    if (authority !== void 0) {
      if (options2.reference !== "suffix") {
        uriTokens.push("//");
      }
      uriTokens.push(authority);
      if (component.path && component.path[0] !== "/") {
        uriTokens.push("/");
      }
    }
    if (component.path !== void 0) {
      let s = component.path;
      if (!options2.absolutePath && (!schemeHandler || !schemeHandler.absolutePath)) {
        s = removeDotSegments(s);
      }
      if (authority === void 0 && s[0] === "/" && s[1] === "/") {
        s = "/%2F" + s.slice(2);
      }
      uriTokens.push(s);
    }
    if (component.query !== void 0) {
      uriTokens.push("?", component.query);
    }
    if (component.fragment !== void 0) {
      uriTokens.push("#", component.fragment);
    }
    return uriTokens.join("");
  }
  const URI_PARSE = /^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u;
  function parse2(uri2, opts) {
    const options2 = Object.assign({}, opts);
    const parsed = {
      scheme: void 0,
      userinfo: void 0,
      host: "",
      port: void 0,
      path: "",
      query: void 0,
      fragment: void 0
    };
    let isIP = false;
    if (options2.reference === "suffix") {
      if (options2.scheme) {
        uri2 = options2.scheme + ":" + uri2;
      } else {
        uri2 = "//" + uri2;
      }
    }
    const matches = uri2.match(URI_PARSE);
    if (matches) {
      parsed.scheme = matches[1];
      parsed.userinfo = matches[3];
      parsed.host = matches[4];
      parsed.port = parseInt(matches[5], 10);
      parsed.path = matches[6] || "";
      parsed.query = matches[7];
      parsed.fragment = matches[8];
      if (isNaN(parsed.port)) {
        parsed.port = matches[5];
      }
      if (parsed.host) {
        const ipv4result = isIPv4(parsed.host);
        if (ipv4result === false) {
          const ipv6result = normalizeIPv6(parsed.host);
          parsed.host = ipv6result.host.toLowerCase();
          isIP = ipv6result.isIPV6;
        } else {
          isIP = true;
        }
      }
      if (parsed.scheme === void 0 && parsed.userinfo === void 0 && parsed.host === void 0 && parsed.port === void 0 && parsed.query === void 0 && !parsed.path) {
        parsed.reference = "same-document";
      } else if (parsed.scheme === void 0) {
        parsed.reference = "relative";
      } else if (parsed.fragment === void 0) {
        parsed.reference = "absolute";
      } else {
        parsed.reference = "uri";
      }
      if (options2.reference && options2.reference !== "suffix" && options2.reference !== parsed.reference) {
        parsed.error = parsed.error || "URI is not a " + options2.reference + " reference.";
      }
      const schemeHandler = getSchemeHandler(options2.scheme || parsed.scheme);
      if (!options2.unicodeSupport && (!schemeHandler || !schemeHandler.unicodeSupport)) {
        if (parsed.host && (options2.domainHost || schemeHandler && schemeHandler.domainHost) && isIP === false && nonSimpleDomain(parsed.host)) {
          try {
            parsed.host = URL.domainToASCII(parsed.host.toLowerCase());
          } catch (e) {
            parsed.error = parsed.error || "Host's domain name can not be converted to ASCII: " + e;
          }
        }
      }
      if (!schemeHandler || schemeHandler && !schemeHandler.skipNormalize) {
        if (uri2.indexOf("%") !== -1) {
          if (parsed.scheme !== void 0) {
            parsed.scheme = unescape(parsed.scheme);
          }
          if (parsed.host !== void 0) {
            parsed.host = unescape(parsed.host);
          }
        }
        if (parsed.path) {
          parsed.path = escape(unescape(parsed.path));
        }
        if (parsed.fragment) {
          parsed.fragment = encodeURI(decodeURIComponent(parsed.fragment));
        }
      }
      if (schemeHandler && schemeHandler.parse) {
        schemeHandler.parse(parsed, options2);
      }
    } else {
      parsed.error = parsed.error || "URI can not be parsed.";
    }
    return parsed;
  }
  const fastUri$1 = {
    SCHEMES,
    normalize: normalize2,
    resolve: resolve2,
    resolveComponent,
    equal: equal2,
    serialize,
    parse: parse2
  };
  fastUri.exports = fastUri$1;
  fastUri.exports.default = fastUri$1;
  fastUri.exports.fastUri = fastUri$1;
  return fastUri.exports;
}
function requireUri$1() {
  if (hasRequiredUri$1) return uri$1;
  hasRequiredUri$1 = 1;
  Object.defineProperty(uri$1, "__esModule", { value: true });
  const uri2 = requireFastUri();
  uri2.code = 'require("ajv/dist/runtime/uri").default';
  uri$1.default = uri2;
  return uri$1;
}
function requireCore$4() {
  if (hasRequiredCore$4) return core$5;
  hasRequiredCore$4 = 1;
  (function(exports$1) {
    Object.defineProperty(exports$1, "__esModule", { value: true });
    exports$1.CodeGen = exports$1.Name = exports$1.nil = exports$1.stringify = exports$1.str = exports$1._ = exports$1.KeywordCxt = void 0;
    var validate_1 = requireValidate$1();
    Object.defineProperty(exports$1, "KeywordCxt", { enumerable: true, get: function() {
      return validate_1.KeywordCxt;
    } });
    var codegen_1 = requireCodegen$1();
    Object.defineProperty(exports$1, "_", { enumerable: true, get: function() {
      return codegen_1._;
    } });
    Object.defineProperty(exports$1, "str", { enumerable: true, get: function() {
      return codegen_1.str;
    } });
    Object.defineProperty(exports$1, "stringify", { enumerable: true, get: function() {
      return codegen_1.stringify;
    } });
    Object.defineProperty(exports$1, "nil", { enumerable: true, get: function() {
      return codegen_1.nil;
    } });
    Object.defineProperty(exports$1, "Name", { enumerable: true, get: function() {
      return codegen_1.Name;
    } });
    Object.defineProperty(exports$1, "CodeGen", { enumerable: true, get: function() {
      return codegen_1.CodeGen;
    } });
    const validation_error_1 = requireValidation_error$1();
    const ref_error_1 = requireRef_error$1();
    const rules_1 = requireRules$1();
    const compile_1 = requireCompile$2();
    const codegen_2 = requireCodegen$1();
    const resolve_1 = requireResolve$1();
    const dataType_1 = requireDataType$1();
    const util_1 = requireUtil$4();
    const $dataRefSchema = require$$9$1;
    const uri_1 = requireUri$1();
    const defaultRegExp = (str, flags) => new RegExp(str, flags);
    defaultRegExp.code = "new RegExp";
    const META_IGNORE_OPTIONS = ["removeAdditional", "useDefaults", "coerceTypes"];
    const EXT_SCOPE_NAMES = /* @__PURE__ */ new Set([
      "validate",
      "serialize",
      "parse",
      "wrapper",
      "root",
      "schema",
      "keyword",
      "pattern",
      "formats",
      "validate$data",
      "func",
      "obj",
      "Error"
    ]);
    const removedOptions = {
      errorDataPath: "",
      format: "`validateFormats: false` can be used instead.",
      nullable: '"nullable" keyword is supported by default.',
      jsonPointers: "Deprecated jsPropertySyntax can be used instead.",
      extendRefs: "Deprecated ignoreKeywordsWithRef can be used instead.",
      missingRefs: "Pass empty schema with $id that should be ignored to ajv.addSchema.",
      processCode: "Use option `code: {process: (code, schemaEnv: object) => string}`",
      sourceCode: "Use option `code: {source: true}`",
      strictDefaults: "It is default now, see option `strict`.",
      strictKeywords: "It is default now, see option `strict`.",
      uniqueItems: '"uniqueItems" keyword is always validated.',
      unknownFormats: "Disable strict mode or pass `true` to `ajv.addFormat` (or `formats` option).",
      cache: "Map is used as cache, schema object as key.",
      serialize: "Map is used as cache, schema object as key.",
      ajvErrors: "It is default now."
    };
    const deprecatedOptions = {
      ignoreKeywordsWithRef: "",
      jsPropertySyntax: "",
      unicode: '"minLength"/"maxLength" account for unicode characters by default.'
    };
    const MAX_EXPRESSION = 200;
    function requiredOptions(o) {
      var _a4, _b2, _c2, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0;
      const s = o.strict;
      const _optz = (_a4 = o.code) === null || _a4 === void 0 ? void 0 : _a4.optimize;
      const optimize = _optz === true || _optz === void 0 ? 1 : _optz || 0;
      const regExp = (_c2 = (_b2 = o.code) === null || _b2 === void 0 ? void 0 : _b2.regExp) !== null && _c2 !== void 0 ? _c2 : defaultRegExp;
      const uriResolver = (_d = o.uriResolver) !== null && _d !== void 0 ? _d : uri_1.default;
      return {
        strictSchema: (_f = (_e = o.strictSchema) !== null && _e !== void 0 ? _e : s) !== null && _f !== void 0 ? _f : true,
        strictNumbers: (_h = (_g = o.strictNumbers) !== null && _g !== void 0 ? _g : s) !== null && _h !== void 0 ? _h : true,
        strictTypes: (_k = (_j = o.strictTypes) !== null && _j !== void 0 ? _j : s) !== null && _k !== void 0 ? _k : "log",
        strictTuples: (_m = (_l = o.strictTuples) !== null && _l !== void 0 ? _l : s) !== null && _m !== void 0 ? _m : "log",
        strictRequired: (_p = (_o = o.strictRequired) !== null && _o !== void 0 ? _o : s) !== null && _p !== void 0 ? _p : false,
        code: o.code ? { ...o.code, optimize, regExp } : { optimize, regExp },
        loopRequired: (_q = o.loopRequired) !== null && _q !== void 0 ? _q : MAX_EXPRESSION,
        loopEnum: (_r = o.loopEnum) !== null && _r !== void 0 ? _r : MAX_EXPRESSION,
        meta: (_s = o.meta) !== null && _s !== void 0 ? _s : true,
        messages: (_t = o.messages) !== null && _t !== void 0 ? _t : true,
        inlineRefs: (_u = o.inlineRefs) !== null && _u !== void 0 ? _u : true,
        schemaId: (_v = o.schemaId) !== null && _v !== void 0 ? _v : "$id",
        addUsedSchema: (_w = o.addUsedSchema) !== null && _w !== void 0 ? _w : true,
        validateSchema: (_x = o.validateSchema) !== null && _x !== void 0 ? _x : true,
        validateFormats: (_y = o.validateFormats) !== null && _y !== void 0 ? _y : true,
        unicodeRegExp: (_z = o.unicodeRegExp) !== null && _z !== void 0 ? _z : true,
        int32range: (_0 = o.int32range) !== null && _0 !== void 0 ? _0 : true,
        uriResolver
      };
    }
    class Ajv2 {
      constructor(opts = {}) {
        this.schemas = {};
        this.refs = {};
        this.formats = {};
        this._compilations = /* @__PURE__ */ new Set();
        this._loading = {};
        this._cache = /* @__PURE__ */ new Map();
        opts = this.opts = { ...opts, ...requiredOptions(opts) };
        const { es5, lines } = this.opts.code;
        this.scope = new codegen_2.ValueScope({ scope: {}, prefixes: EXT_SCOPE_NAMES, es5, lines });
        this.logger = getLogger(opts.logger);
        const formatOpt = opts.validateFormats;
        opts.validateFormats = false;
        this.RULES = (0, rules_1.getRules)();
        checkOptions.call(this, removedOptions, opts, "NOT SUPPORTED");
        checkOptions.call(this, deprecatedOptions, opts, "DEPRECATED", "warn");
        this._metaOpts = getMetaSchemaOptions.call(this);
        if (opts.formats)
          addInitialFormats.call(this);
        this._addVocabularies();
        this._addDefaultMetaSchema();
        if (opts.keywords)
          addInitialKeywords.call(this, opts.keywords);
        if (typeof opts.meta == "object")
          this.addMetaSchema(opts.meta);
        addInitialSchemas.call(this);
        opts.validateFormats = formatOpt;
      }
      _addVocabularies() {
        this.addKeyword("$async");
      }
      _addDefaultMetaSchema() {
        const { $data, meta, schemaId } = this.opts;
        let _dataRefSchema = $dataRefSchema;
        if (schemaId === "id") {
          _dataRefSchema = { ...$dataRefSchema };
          _dataRefSchema.id = _dataRefSchema.$id;
          delete _dataRefSchema.$id;
        }
        if (meta && $data)
          this.addMetaSchema(_dataRefSchema, _dataRefSchema[schemaId], false);
      }
      defaultMeta() {
        const { meta, schemaId } = this.opts;
        return this.opts.defaultMeta = typeof meta == "object" ? meta[schemaId] || meta : void 0;
      }
      validate(schemaKeyRef, data32) {
        let v;
        if (typeof schemaKeyRef == "string") {
          v = this.getSchema(schemaKeyRef);
          if (!v)
            throw new Error(`no schema with key or ref "${schemaKeyRef}"`);
        } else {
          v = this.compile(schemaKeyRef);
        }
        const valid2 = v(data32);
        if (!("$async" in v))
          this.errors = v.errors;
        return valid2;
      }
      compile(schema, _meta) {
        const sch = this._addSchema(schema, _meta);
        return sch.validate || this._compileSchemaEnv(sch);
      }
      compileAsync(schema, meta) {
        if (typeof this.opts.loadSchema != "function") {
          throw new Error("options.loadSchema should be a function");
        }
        const { loadSchema } = this.opts;
        return runCompileAsync.call(this, schema, meta);
        async function runCompileAsync(_schema, _meta) {
          await loadMetaSchema.call(this, _schema.$schema);
          const sch = this._addSchema(_schema, _meta);
          return sch.validate || _compileAsync.call(this, sch);
        }
        async function loadMetaSchema($ref) {
          if ($ref && !this.getSchema($ref)) {
            await runCompileAsync.call(this, { $ref }, true);
          }
        }
        async function _compileAsync(sch) {
          try {
            return this._compileSchemaEnv(sch);
          } catch (e) {
            if (!(e instanceof ref_error_1.default))
              throw e;
            checkLoaded.call(this, e);
            await loadMissingSchema.call(this, e.missingSchema);
            return _compileAsync.call(this, sch);
          }
        }
        function checkLoaded({ missingSchema: ref2, missingRef }) {
          if (this.refs[ref2]) {
            throw new Error(`AnySchema ${ref2} is loaded but ${missingRef} cannot be resolved`);
          }
        }
        async function loadMissingSchema(ref2) {
          const _schema = await _loadSchema.call(this, ref2);
          if (!this.refs[ref2])
            await loadMetaSchema.call(this, _schema.$schema);
          if (!this.refs[ref2])
            this.addSchema(_schema, ref2, meta);
        }
        async function _loadSchema(ref2) {
          const p = this._loading[ref2];
          if (p)
            return p;
          try {
            return await (this._loading[ref2] = loadSchema(ref2));
          } finally {
            delete this._loading[ref2];
          }
        }
      }
      addSchema(schema, key, _meta, _validateSchema = this.opts.validateSchema) {
        if (Array.isArray(schema)) {
          for (const sch of schema)
            this.addSchema(sch, void 0, _meta, _validateSchema);
          return this;
        }
        let id2;
        if (typeof schema === "object") {
          const { schemaId } = this.opts;
          id2 = schema[schemaId];
          if (id2 !== void 0 && typeof id2 != "string") {
            throw new Error(`schema ${schemaId} must be string`);
          }
        }
        key = (0, resolve_1.normalizeId)(key || id2);
        this._checkUnique(key);
        this.schemas[key] = this._addSchema(schema, _meta, key, _validateSchema, true);
        return this;
      }
      addMetaSchema(schema, key, _validateSchema = this.opts.validateSchema) {
        this.addSchema(schema, key, true, _validateSchema);
        return this;
      }
      validateSchema(schema, throwOrLogError) {
        if (typeof schema == "boolean")
          return true;
        let $schema2;
        $schema2 = schema.$schema;
        if ($schema2 !== void 0 && typeof $schema2 != "string") {
          throw new Error("$schema must be a string");
        }
        $schema2 = $schema2 || this.opts.defaultMeta || this.defaultMeta();
        if (!$schema2) {
          this.logger.warn("meta-schema not available");
          this.errors = null;
          return true;
        }
        const valid2 = this.validate($schema2, schema);
        if (!valid2 && throwOrLogError) {
          const message = "schema is invalid: " + this.errorsText();
          if (this.opts.validateSchema === "log")
            this.logger.error(message);
          else
            throw new Error(message);
        }
        return valid2;
      }
      getSchema(keyRef) {
        let sch;
        while (typeof (sch = getSchEnv.call(this, keyRef)) == "string")
          keyRef = sch;
        if (sch === void 0) {
          const { schemaId } = this.opts;
          const root2 = new compile_1.SchemaEnv({ schema: {}, schemaId });
          sch = compile_1.resolveSchema.call(this, root2, keyRef);
          if (!sch)
            return;
          this.refs[keyRef] = sch;
        }
        return sch.validate || this._compileSchemaEnv(sch);
      }
      removeSchema(schemaKeyRef) {
        if (schemaKeyRef instanceof RegExp) {
          this._removeAllSchemas(this.schemas, schemaKeyRef);
          this._removeAllSchemas(this.refs, schemaKeyRef);
          return this;
        }
        switch (typeof schemaKeyRef) {
          case "undefined":
            this._removeAllSchemas(this.schemas);
            this._removeAllSchemas(this.refs);
            this._cache.clear();
            return this;
          case "string": {
            const sch = getSchEnv.call(this, schemaKeyRef);
            if (typeof sch == "object")
              this._cache.delete(sch.schema);
            delete this.schemas[schemaKeyRef];
            delete this.refs[schemaKeyRef];
            return this;
          }
          case "object": {
            const cacheKey = schemaKeyRef;
            this._cache.delete(cacheKey);
            let id2 = schemaKeyRef[this.opts.schemaId];
            if (id2) {
              id2 = (0, resolve_1.normalizeId)(id2);
              delete this.schemas[id2];
              delete this.refs[id2];
            }
            return this;
          }
          default:
            throw new Error("ajv.removeSchema: invalid parameter");
        }
      }
      addVocabulary(definitions2) {
        for (const def2 of definitions2)
          this.addKeyword(def2);
        return this;
      }
      addKeyword(kwdOrDef, def2) {
        let keyword2;
        if (typeof kwdOrDef == "string") {
          keyword2 = kwdOrDef;
          if (typeof def2 == "object") {
            this.logger.warn("these parameters are deprecated, see docs for addKeyword");
            def2.keyword = keyword2;
          }
        } else if (typeof kwdOrDef == "object" && def2 === void 0) {
          def2 = kwdOrDef;
          keyword2 = def2.keyword;
          if (Array.isArray(keyword2) && !keyword2.length) {
            throw new Error("addKeywords: keyword must be string or non-empty array");
          }
        } else {
          throw new Error("invalid addKeywords parameters");
        }
        checkKeyword.call(this, keyword2, def2);
        if (!def2) {
          (0, util_1.eachItem)(keyword2, (kwd) => addRule.call(this, kwd));
          return this;
        }
        keywordMetaschema.call(this, def2);
        const definition = {
          ...def2,
          type: (0, dataType_1.getJSONTypes)(def2.type),
          schemaType: (0, dataType_1.getJSONTypes)(def2.schemaType)
        };
        (0, util_1.eachItem)(keyword2, definition.type.length === 0 ? (k) => addRule.call(this, k, definition) : (k) => definition.type.forEach((t) => addRule.call(this, k, definition, t)));
        return this;
      }
      getKeyword(keyword2) {
        const rule = this.RULES.all[keyword2];
        return typeof rule == "object" ? rule.definition : !!rule;
      }
      removeKeyword(keyword2) {
        const { RULES } = this;
        delete RULES.keywords[keyword2];
        delete RULES.all[keyword2];
        for (const group of RULES.rules) {
          const i = group.rules.findIndex((rule) => rule.keyword === keyword2);
          if (i >= 0)
            group.rules.splice(i, 1);
        }
        return this;
      }
      addFormat(name, format2) {
        if (typeof format2 == "string")
          format2 = new RegExp(format2);
        this.formats[name] = format2;
        return this;
      }
      errorsText(errors2 = this.errors, { separator = ", ", dataVar = "data" } = {}) {
        if (!errors2 || errors2.length === 0)
          return "No errors";
        return errors2.map((e) => `${dataVar}${e.instancePath} ${e.message}`).reduce((text, msg) => text + separator + msg);
      }
      $dataMetaSchema(metaSchema, keywordsJsonPointers) {
        const rules2 = this.RULES.all;
        metaSchema = JSON.parse(JSON.stringify(metaSchema));
        for (const jsonPointer of keywordsJsonPointers) {
          const segments = jsonPointer.split("/").slice(1);
          let keywords = metaSchema;
          for (const seg of segments)
            keywords = keywords[seg];
          for (const key in rules2) {
            const rule = rules2[key];
            if (typeof rule != "object")
              continue;
            const { $data } = rule.definition;
            const schema = keywords[key];
            if ($data && schema)
              keywords[key] = schemaOrData(schema);
          }
        }
        return metaSchema;
      }
      _removeAllSchemas(schemas, regex2) {
        for (const keyRef in schemas) {
          const sch = schemas[keyRef];
          if (!regex2 || regex2.test(keyRef)) {
            if (typeof sch == "string") {
              delete schemas[keyRef];
            } else if (sch && !sch.meta) {
              this._cache.delete(sch.schema);
              delete schemas[keyRef];
            }
          }
        }
      }
      _addSchema(schema, meta, baseId, validateSchema = this.opts.validateSchema, addSchema = this.opts.addUsedSchema) {
        let id2;
        const { schemaId } = this.opts;
        if (typeof schema == "object") {
          id2 = schema[schemaId];
        } else {
          if (this.opts.jtd)
            throw new Error("schema must be object");
          else if (typeof schema != "boolean")
            throw new Error("schema must be object or boolean");
        }
        let sch = this._cache.get(schema);
        if (sch !== void 0)
          return sch;
        baseId = (0, resolve_1.normalizeId)(id2 || baseId);
        const localRefs = resolve_1.getSchemaRefs.call(this, schema, baseId);
        sch = new compile_1.SchemaEnv({ schema, schemaId, meta, baseId, localRefs });
        this._cache.set(sch.schema, sch);
        if (addSchema && !baseId.startsWith("#")) {
          if (baseId)
            this._checkUnique(baseId);
          this.refs[baseId] = sch;
        }
        if (validateSchema)
          this.validateSchema(schema, true);
        return sch;
      }
      _checkUnique(id2) {
        if (this.schemas[id2] || this.refs[id2]) {
          throw new Error(`schema with key or id "${id2}" already exists`);
        }
      }
      _compileSchemaEnv(sch) {
        if (sch.meta)
          this._compileMetaSchema(sch);
        else
          compile_1.compileSchema.call(this, sch);
        if (!sch.validate)
          throw new Error("ajv implementation error");
        return sch.validate;
      }
      _compileMetaSchema(sch) {
        const currentOpts = this.opts;
        this.opts = this._metaOpts;
        try {
          compile_1.compileSchema.call(this, sch);
        } finally {
          this.opts = currentOpts;
        }
      }
    }
    Ajv2.ValidationError = validation_error_1.default;
    Ajv2.MissingRefError = ref_error_1.default;
    exports$1.default = Ajv2;
    function checkOptions(checkOpts, options2, msg, log = "error") {
      for (const key in checkOpts) {
        const opt = key;
        if (opt in options2)
          this.logger[log](`${msg}: option ${key}. ${checkOpts[opt]}`);
      }
    }
    function getSchEnv(keyRef) {
      keyRef = (0, resolve_1.normalizeId)(keyRef);
      return this.schemas[keyRef] || this.refs[keyRef];
    }
    function addInitialSchemas() {
      const optsSchemas = this.opts.schemas;
      if (!optsSchemas)
        return;
      if (Array.isArray(optsSchemas))
        this.addSchema(optsSchemas);
      else
        for (const key in optsSchemas)
          this.addSchema(optsSchemas[key], key);
    }
    function addInitialFormats() {
      for (const name in this.opts.formats) {
        const format2 = this.opts.formats[name];
        if (format2)
          this.addFormat(name, format2);
      }
    }
    function addInitialKeywords(defs) {
      if (Array.isArray(defs)) {
        this.addVocabulary(defs);
        return;
      }
      this.logger.warn("keywords option as map is deprecated, pass array");
      for (const keyword2 in defs) {
        const def2 = defs[keyword2];
        if (!def2.keyword)
          def2.keyword = keyword2;
        this.addKeyword(def2);
      }
    }
    function getMetaSchemaOptions() {
      const metaOpts = { ...this.opts };
      for (const opt of META_IGNORE_OPTIONS)
        delete metaOpts[opt];
      return metaOpts;
    }
    const noLogs = { log() {
    }, warn() {
    }, error() {
    } };
    function getLogger(logger2) {
      if (logger2 === false)
        return noLogs;
      if (logger2 === void 0)
        return console;
      if (logger2.log && logger2.warn && logger2.error)
        return logger2;
      throw new Error("logger must implement log, warn and error methods");
    }
    const KEYWORD_NAME = /^[a-z_$][a-z0-9_$:-]*$/i;
    function checkKeyword(keyword2, def2) {
      const { RULES } = this;
      (0, util_1.eachItem)(keyword2, (kwd) => {
        if (RULES.keywords[kwd])
          throw new Error(`Keyword ${kwd} is already defined`);
        if (!KEYWORD_NAME.test(kwd))
          throw new Error(`Keyword ${kwd} has invalid name`);
      });
      if (!def2)
        return;
      if (def2.$data && !("code" in def2 || "validate" in def2)) {
        throw new Error('$data keyword must have "code" or "validate" function');
      }
    }
    function addRule(keyword2, definition, dataType2) {
      var _a4;
      const post = definition === null || definition === void 0 ? void 0 : definition.post;
      if (dataType2 && post)
        throw new Error('keyword with "post" flag cannot have "type"');
      const { RULES } = this;
      let ruleGroup = post ? RULES.post : RULES.rules.find(({ type: t }) => t === dataType2);
      if (!ruleGroup) {
        ruleGroup = { type: dataType2, rules: [] };
        RULES.rules.push(ruleGroup);
      }
      RULES.keywords[keyword2] = true;
      if (!definition)
        return;
      const rule = {
        keyword: keyword2,
        definition: {
          ...definition,
          type: (0, dataType_1.getJSONTypes)(definition.type),
          schemaType: (0, dataType_1.getJSONTypes)(definition.schemaType)
        }
      };
      if (definition.before)
        addBeforeRule.call(this, ruleGroup, rule, definition.before);
      else
        ruleGroup.rules.push(rule);
      RULES.all[keyword2] = rule;
      (_a4 = definition.implements) === null || _a4 === void 0 ? void 0 : _a4.forEach((kwd) => this.addKeyword(kwd));
    }
    function addBeforeRule(ruleGroup, rule, before) {
      const i = ruleGroup.rules.findIndex((_rule) => _rule.keyword === before);
      if (i >= 0) {
        ruleGroup.rules.splice(i, 0, rule);
      } else {
        ruleGroup.rules.push(rule);
        this.logger.warn(`rule ${before} is not defined`);
      }
    }
    function keywordMetaschema(def2) {
      let { metaSchema } = def2;
      if (metaSchema === void 0)
        return;
      if (def2.$data && this.opts.$data)
        metaSchema = schemaOrData(metaSchema);
      def2.validateSchema = this.compile(metaSchema, true);
    }
    const $dataRef = {
      $ref: "https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"
    };
    function schemaOrData(schema) {
      return { anyOf: [schema, $dataRef] };
    }
  })(core$5);
  return core$5;
}
function requireId$1() {
  if (hasRequiredId$1) return id$1;
  hasRequiredId$1 = 1;
  Object.defineProperty(id$1, "__esModule", { value: true });
  const def2 = {
    keyword: "id",
    code() {
      throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID');
    }
  };
  id$1.default = def2;
  return id$1;
}
function requireRef$1() {
  if (hasRequiredRef$1) return ref$1;
  hasRequiredRef$1 = 1;
  Object.defineProperty(ref$1, "__esModule", { value: true });
  ref$1.callRef = ref$1.getValidate = void 0;
  const ref_error_1 = requireRef_error$1();
  const code_1 = requireCode$3();
  const codegen_1 = requireCodegen$1();
  const names_1 = requireNames$1();
  const compile_1 = requireCompile$2();
  const util_1 = requireUtil$4();
  const def2 = {
    keyword: "$ref",
    schemaType: "string",
    code(cxt) {
      const { gen, schema: $ref, it } = cxt;
      const { baseId, schemaEnv: env2, validateName, opts, self: self2 } = it;
      const { root: root2 } = env2;
      if (($ref === "#" || $ref === "#/") && baseId === root2.baseId)
        return callRootRef();
      const schOrEnv = compile_1.resolveRef.call(self2, root2, baseId, $ref);
      if (schOrEnv === void 0)
        throw new ref_error_1.default(it.opts.uriResolver, baseId, $ref);
      if (schOrEnv instanceof compile_1.SchemaEnv)
        return callValidate(schOrEnv);
      return inlineRefSchema(schOrEnv);
      function callRootRef() {
        if (env2 === root2)
          return callRef(cxt, validateName, env2, env2.$async);
        const rootName = gen.scopeValue("root", { ref: root2 });
        return callRef(cxt, (0, codegen_1._)`${rootName}.validate`, root2, root2.$async);
      }
      function callValidate(sch) {
        const v = getValidate(cxt, sch);
        callRef(cxt, v, sch, sch.$async);
      }
      function inlineRefSchema(sch) {
        const schName = gen.scopeValue("schema", opts.code.source === true ? { ref: sch, code: (0, codegen_1.stringify)(sch) } : { ref: sch });
        const valid2 = gen.name("valid");
        const schCxt = cxt.subschema({
          schema: sch,
          dataTypes: [],
          schemaPath: codegen_1.nil,
          topSchemaRef: schName,
          errSchemaPath: $ref
        }, valid2);
        cxt.mergeEvaluated(schCxt);
        cxt.ok(valid2);
      }
    }
  };
  function getValidate(cxt, sch) {
    const { gen } = cxt;
    return sch.validate ? gen.scopeValue("validate", { ref: sch.validate }) : (0, codegen_1._)`${gen.scopeValue("wrapper", { ref: sch })}.validate`;
  }
  ref$1.getValidate = getValidate;
  function callRef(cxt, v, sch, $async) {
    const { gen, it } = cxt;
    const { allErrors, schemaEnv: env2, opts } = it;
    const passCxt = opts.passContext ? names_1.default.this : codegen_1.nil;
    if ($async)
      callAsyncRef();
    else
      callSyncRef();
    function callAsyncRef() {
      if (!env2.$async)
        throw new Error("async schema referenced by sync schema");
      const valid2 = gen.let("valid");
      gen.try(() => {
        gen.code((0, codegen_1._)`await ${(0, code_1.callValidateCode)(cxt, v, passCxt)}`);
        addEvaluatedFrom(v);
        if (!allErrors)
          gen.assign(valid2, true);
      }, (e) => {
        gen.if((0, codegen_1._)`!(${e} instanceof ${it.ValidationError})`, () => gen.throw(e));
        addErrorsFrom(e);
        if (!allErrors)
          gen.assign(valid2, false);
      });
      cxt.ok(valid2);
    }
    function callSyncRef() {
      cxt.result((0, code_1.callValidateCode)(cxt, v, passCxt), () => addEvaluatedFrom(v), () => addErrorsFrom(v));
    }
    function addErrorsFrom(source2) {
      const errs = (0, codegen_1._)`${source2}.errors`;
      gen.assign(names_1.default.vErrors, (0, codegen_1._)`${names_1.default.vErrors} === null ? ${errs} : ${names_1.default.vErrors}.concat(${errs})`);
      gen.assign(names_1.default.errors, (0, codegen_1._)`${names_1.default.vErrors}.length`);
    }
    function addEvaluatedFrom(source2) {
      var _a4;
      if (!it.opts.unevaluated)
        return;
      const schEvaluated = (_a4 = sch === null || sch === void 0 ? void 0 : sch.validate) === null || _a4 === void 0 ? void 0 : _a4.evaluated;
      if (it.props !== true) {
        if (schEvaluated && !schEvaluated.dynamicProps) {
          if (schEvaluated.props !== void 0) {
            it.props = util_1.mergeEvaluated.props(gen, schEvaluated.props, it.props);
          }
        } else {
          const props = gen.var("props", (0, codegen_1._)`${source2}.evaluated.props`);
          it.props = util_1.mergeEvaluated.props(gen, props, it.props, codegen_1.Name);
        }
      }
      if (it.items !== true) {
        if (schEvaluated && !schEvaluated.dynamicItems) {
          if (schEvaluated.items !== void 0) {
            it.items = util_1.mergeEvaluated.items(gen, schEvaluated.items, it.items);
          }
        } else {
          const items2 = gen.var("items", (0, codegen_1._)`${source2}.evaluated.items`);
          it.items = util_1.mergeEvaluated.items(gen, items2, it.items, codegen_1.Name);
        }
      }
    }
  }
  ref$1.callRef = callRef;
  ref$1.default = def2;
  return ref$1;
}
function requireCore$3() {
  if (hasRequiredCore$3) return core$4;
  hasRequiredCore$3 = 1;
  Object.defineProperty(core$4, "__esModule", { value: true });
  const id_1 = requireId$1();
  const ref_1 = requireRef$1();
  const core2 = [
    "$schema",
    "$id",
    "$defs",
    "$vocabulary",
    { keyword: "$comment" },
    "definitions",
    id_1.default,
    ref_1.default
  ];
  core$4.default = core2;
  return core$4;
}
function requireLimitNumber$1() {
  if (hasRequiredLimitNumber$1) return limitNumber$1;
  hasRequiredLimitNumber$1 = 1;
  Object.defineProperty(limitNumber$1, "__esModule", { value: true });
  const codegen_1 = requireCodegen$1();
  const ops = codegen_1.operators;
  const KWDs = {
    maximum: { okStr: "<=", ok: ops.LTE, fail: ops.GT },
    minimum: { okStr: ">=", ok: ops.GTE, fail: ops.LT },
    exclusiveMaximum: { okStr: "<", ok: ops.LT, fail: ops.GTE },
    exclusiveMinimum: { okStr: ">", ok: ops.GT, fail: ops.LTE }
  };
  const error = {
    message: ({ keyword: keyword2, schemaCode }) => (0, codegen_1.str)`must be ${KWDs[keyword2].okStr} ${schemaCode}`,
    params: ({ keyword: keyword2, schemaCode }) => (0, codegen_1._)`{comparison: ${KWDs[keyword2].okStr}, limit: ${schemaCode}}`
  };
  const def2 = {
    keyword: Object.keys(KWDs),
    type: "number",
    schemaType: "number",
    $data: true,
    error,
    code(cxt) {
      const { keyword: keyword2, data: data32, schemaCode } = cxt;
      cxt.fail$data((0, codegen_1._)`${data32} ${KWDs[keyword2].fail} ${schemaCode} || isNaN(${data32})`);
    }
  };
  limitNumber$1.default = def2;
  return limitNumber$1;
}
function requireMultipleOf$1() {
  if (hasRequiredMultipleOf$1) return multipleOf$1;
  hasRequiredMultipleOf$1 = 1;
  Object.defineProperty(multipleOf$1, "__esModule", { value: true });
  const codegen_1 = requireCodegen$1();
  const error = {
    message: ({ schemaCode }) => (0, codegen_1.str)`must be multiple of ${schemaCode}`,
    params: ({ schemaCode }) => (0, codegen_1._)`{multipleOf: ${schemaCode}}`
  };
  const def2 = {
    keyword: "multipleOf",
    type: "number",
    schemaType: "number",
    $data: true,
    error,
    code(cxt) {
      const { gen, data: data32, schemaCode, it } = cxt;
      const prec = it.opts.multipleOfPrecision;
      const res = gen.let("res");
      const invalid = prec ? (0, codegen_1._)`Math.abs(Math.round(${res}) - ${res}) > 1e-${prec}` : (0, codegen_1._)`${res} !== parseInt(${res})`;
      cxt.fail$data((0, codegen_1._)`(${schemaCode} === 0 || (${res} = ${data32}/${schemaCode}, ${invalid}))`);
    }
  };
  multipleOf$1.default = def2;
  return multipleOf$1;
}
function requireUcs2length$1() {
  if (hasRequiredUcs2length$1) return ucs2length$1;
  hasRequiredUcs2length$1 = 1;
  Object.defineProperty(ucs2length$1, "__esModule", { value: true });
  function ucs2length2(str) {
    const len = str.length;
    let length = 0;
    let pos = 0;
    let value;
    while (pos < len) {
      length++;
      value = str.charCodeAt(pos++);
      if (value >= 55296 && value <= 56319 && pos < len) {
        value = str.charCodeAt(pos);
        if ((value & 64512) === 56320)
          pos++;
      }
    }
    return length;
  }
  ucs2length$1.default = ucs2length2;
  ucs2length2.code = 'require("ajv/dist/runtime/ucs2length").default';
  return ucs2length$1;
}
function requireLimitLength$1() {
  if (hasRequiredLimitLength$1) return limitLength$1;
  hasRequiredLimitLength$1 = 1;
  Object.defineProperty(limitLength$1, "__esModule", { value: true });
  const codegen_1 = requireCodegen$1();
  const util_1 = requireUtil$4();
  const ucs2length_1 = requireUcs2length$1();
  const error = {
    message({ keyword: keyword2, schemaCode }) {
      const comp = keyword2 === "maxLength" ? "more" : "fewer";
      return (0, codegen_1.str)`must NOT have ${comp} than ${schemaCode} characters`;
    },
    params: ({ schemaCode }) => (0, codegen_1._)`{limit: ${schemaCode}}`
  };
  const def2 = {
    keyword: ["maxLength", "minLength"],
    type: "string",
    schemaType: "number",
    $data: true,
    error,
    code(cxt) {
      const { keyword: keyword2, data: data32, schemaCode, it } = cxt;
      const op = keyword2 === "maxLength" ? codegen_1.operators.GT : codegen_1.operators.LT;
      const len = it.opts.unicode === false ? (0, codegen_1._)`${data32}.length` : (0, codegen_1._)`${(0, util_1.useFunc)(cxt.gen, ucs2length_1.default)}(${data32})`;
      cxt.fail$data((0, codegen_1._)`${len} ${op} ${schemaCode}`);
    }
  };
  limitLength$1.default = def2;
  return limitLength$1;
}
function requirePattern$1() {
  if (hasRequiredPattern$1) return pattern$1;
  hasRequiredPattern$1 = 1;
  Object.defineProperty(pattern$1, "__esModule", { value: true });
  const code_1 = requireCode$3();
  const codegen_1 = requireCodegen$1();
  const error = {
    message: ({ schemaCode }) => (0, codegen_1.str)`must match pattern "${schemaCode}"`,
    params: ({ schemaCode }) => (0, codegen_1._)`{pattern: ${schemaCode}}`
  };
  const def2 = {
    keyword: "pattern",
    type: "string",
    schemaType: "string",
    $data: true,
    error,
    code(cxt) {
      const { data: data32, $data, schema, schemaCode, it } = cxt;
      const u = it.opts.unicodeRegExp ? "u" : "";
      const regExp = $data ? (0, codegen_1._)`(new RegExp(${schemaCode}, ${u}))` : (0, code_1.usePattern)(cxt, schema);
      cxt.fail$data((0, codegen_1._)`!${regExp}.test(${data32})`);
    }
  };
  pattern$1.default = def2;
  return pattern$1;
}
function requireLimitProperties$1() {
  if (hasRequiredLimitProperties$1) return limitProperties$1;
  hasRequiredLimitProperties$1 = 1;
  Object.defineProperty(limitProperties$1, "__esModule", { value: true });
  const codegen_1 = requireCodegen$1();
  const error = {
    message({ keyword: keyword2, schemaCode }) {
      const comp = keyword2 === "maxProperties" ? "more" : "fewer";
      return (0, codegen_1.str)`must NOT have ${comp} than ${schemaCode} properties`;
    },
    params: ({ schemaCode }) => (0, codegen_1._)`{limit: ${schemaCode}}`
  };
  const def2 = {
    keyword: ["maxProperties", "minProperties"],
    type: "object",
    schemaType: "number",
    $data: true,
    error,
    code(cxt) {
      const { keyword: keyword2, data: data32, schemaCode } = cxt;
      const op = keyword2 === "maxProperties" ? codegen_1.operators.GT : codegen_1.operators.LT;
      cxt.fail$data((0, codegen_1._)`Object.keys(${data32}).length ${op} ${schemaCode}`);
    }
  };
  limitProperties$1.default = def2;
  return limitProperties$1;
}
function requireRequired$1() {
  if (hasRequiredRequired$1) return required$2;
  hasRequiredRequired$1 = 1;
  Object.defineProperty(required$2, "__esModule", { value: true });
  const code_1 = requireCode$3();
  const codegen_1 = requireCodegen$1();
  const util_1 = requireUtil$4();
  const error = {
    message: ({ params: { missingProperty } }) => (0, codegen_1.str)`must have required property '${missingProperty}'`,
    params: ({ params: { missingProperty } }) => (0, codegen_1._)`{missingProperty: ${missingProperty}}`
  };
  const def2 = {
    keyword: "required",
    type: "object",
    schemaType: "array",
    $data: true,
    error,
    code(cxt) {
      const { gen, schema, schemaCode, data: data32, $data, it } = cxt;
      const { opts } = it;
      if (!$data && schema.length === 0)
        return;
      const useLoop = schema.length >= opts.loopRequired;
      if (it.allErrors)
        allErrorsMode();
      else
        exitOnErrorMode();
      if (opts.strictRequired) {
        const props = cxt.parentSchema.properties;
        const { definedProperties } = cxt.it;
        for (const requiredKey of schema) {
          if ((props === null || props === void 0 ? void 0 : props[requiredKey]) === void 0 && !definedProperties.has(requiredKey)) {
            const schemaPath = it.schemaEnv.baseId + it.errSchemaPath;
            const msg = `required property "${requiredKey}" is not defined at "${schemaPath}" (strictRequired)`;
            (0, util_1.checkStrictMode)(it, msg, it.opts.strictRequired);
          }
        }
      }
      function allErrorsMode() {
        if (useLoop || $data) {
          cxt.block$data(codegen_1.nil, loopAllRequired);
        } else {
          for (const prop of schema) {
            (0, code_1.checkReportMissingProp)(cxt, prop);
          }
        }
      }
      function exitOnErrorMode() {
        const missing = gen.let("missing");
        if (useLoop || $data) {
          const valid2 = gen.let("valid", true);
          cxt.block$data(valid2, () => loopUntilMissing(missing, valid2));
          cxt.ok(valid2);
        } else {
          gen.if((0, code_1.checkMissingProp)(cxt, schema, missing));
          (0, code_1.reportMissingProp)(cxt, missing);
          gen.else();
        }
      }
      function loopAllRequired() {
        gen.forOf("prop", schemaCode, (prop) => {
          cxt.setParams({ missingProperty: prop });
          gen.if((0, code_1.noPropertyInData)(gen, data32, prop, opts.ownProperties), () => cxt.error());
        });
      }
      function loopUntilMissing(missing, valid2) {
        cxt.setParams({ missingProperty: missing });
        gen.forOf(missing, schemaCode, () => {
          gen.assign(valid2, (0, code_1.propertyInData)(gen, data32, missing, opts.ownProperties));
          gen.if((0, codegen_1.not)(valid2), () => {
            cxt.error();
            gen.break();
          });
        }, codegen_1.nil);
      }
    }
  };
  required$2.default = def2;
  return required$2;
}
function requireLimitItems$1() {
  if (hasRequiredLimitItems$1) return limitItems$1;
  hasRequiredLimitItems$1 = 1;
  Object.defineProperty(limitItems$1, "__esModule", { value: true });
  const codegen_1 = requireCodegen$1();
  const error = {
    message({ keyword: keyword2, schemaCode }) {
      const comp = keyword2 === "maxItems" ? "more" : "fewer";
      return (0, codegen_1.str)`must NOT have ${comp} than ${schemaCode} items`;
    },
    params: ({ schemaCode }) => (0, codegen_1._)`{limit: ${schemaCode}}`
  };
  const def2 = {
    keyword: ["maxItems", "minItems"],
    type: "array",
    schemaType: "number",
    $data: true,
    error,
    code(cxt) {
      const { keyword: keyword2, data: data32, schemaCode } = cxt;
      const op = keyword2 === "maxItems" ? codegen_1.operators.GT : codegen_1.operators.LT;
      cxt.fail$data((0, codegen_1._)`${data32}.length ${op} ${schemaCode}`);
    }
  };
  limitItems$1.default = def2;
  return limitItems$1;
}
function requireEqual$1() {
  if (hasRequiredEqual$1) return equal$1;
  hasRequiredEqual$1 = 1;
  Object.defineProperty(equal$1, "__esModule", { value: true });
  const equal2 = requireFastDeepEqual();
  equal2.code = 'require("ajv/dist/runtime/equal").default';
  equal$1.default = equal2;
  return equal$1;
}
function requireUniqueItems$1() {
  if (hasRequiredUniqueItems$1) return uniqueItems$1;
  hasRequiredUniqueItems$1 = 1;
  Object.defineProperty(uniqueItems$1, "__esModule", { value: true });
  const dataType_1 = requireDataType$1();
  const codegen_1 = requireCodegen$1();
  const util_1 = requireUtil$4();
  const equal_1 = requireEqual$1();
  const error = {
    message: ({ params: { i, j } }) => (0, codegen_1.str)`must NOT have duplicate items (items ## ${j} and ${i} are identical)`,
    params: ({ params: { i, j } }) => (0, codegen_1._)`{i: ${i}, j: ${j}}`
  };
  const def2 = {
    keyword: "uniqueItems",
    type: "array",
    schemaType: "boolean",
    $data: true,
    error,
    code(cxt) {
      const { gen, data: data32, $data, schema, parentSchema, schemaCode, it } = cxt;
      if (!$data && !schema)
        return;
      const valid2 = gen.let("valid");
      const itemTypes = parentSchema.items ? (0, dataType_1.getSchemaTypes)(parentSchema.items) : [];
      cxt.block$data(valid2, validateUniqueItems, (0, codegen_1._)`${schemaCode} === false`);
      cxt.ok(valid2);
      function validateUniqueItems() {
        const i = gen.let("i", (0, codegen_1._)`${data32}.length`);
        const j = gen.let("j");
        cxt.setParams({ i, j });
        gen.assign(valid2, true);
        gen.if((0, codegen_1._)`${i} > 1`, () => (canOptimize() ? loopN : loopN2)(i, j));
      }
      function canOptimize() {
        return itemTypes.length > 0 && !itemTypes.some((t) => t === "object" || t === "array");
      }
      function loopN(i, j) {
        const item = gen.name("item");
        const wrongType = (0, dataType_1.checkDataTypes)(itemTypes, item, it.opts.strictNumbers, dataType_1.DataType.Wrong);
        const indices = gen.const("indices", (0, codegen_1._)`{}`);
        gen.for((0, codegen_1._)`;${i}--;`, () => {
          gen.let(item, (0, codegen_1._)`${data32}[${i}]`);
          gen.if(wrongType, (0, codegen_1._)`continue`);
          if (itemTypes.length > 1)
            gen.if((0, codegen_1._)`typeof ${item} == "string"`, (0, codegen_1._)`${item} += "_"`);
          gen.if((0, codegen_1._)`typeof ${indices}[${item}] == "number"`, () => {
            gen.assign(j, (0, codegen_1._)`${indices}[${item}]`);
            cxt.error();
            gen.assign(valid2, false).break();
          }).code((0, codegen_1._)`${indices}[${item}] = ${i}`);
        });
      }
      function loopN2(i, j) {
        const eql = (0, util_1.useFunc)(gen, equal_1.default);
        const outer = gen.name("outer");
        gen.label(outer).for((0, codegen_1._)`;${i}--;`, () => gen.for((0, codegen_1._)`${j} = ${i}; ${j}--;`, () => gen.if((0, codegen_1._)`${eql}(${data32}[${i}], ${data32}[${j}])`, () => {
          cxt.error();
          gen.assign(valid2, false).break(outer);
        })));
      }
    }
  };
  uniqueItems$1.default = def2;
  return uniqueItems$1;
}
function require_const$1() {
  if (hasRequired_const$1) return _const$1;
  hasRequired_const$1 = 1;
  Object.defineProperty(_const$1, "__esModule", { value: true });
  const codegen_1 = requireCodegen$1();
  const util_1 = requireUtil$4();
  const equal_1 = requireEqual$1();
  const error = {
    message: "must be equal to constant",
    params: ({ schemaCode }) => (0, codegen_1._)`{allowedValue: ${schemaCode}}`
  };
  const def2 = {
    keyword: "const",
    $data: true,
    error,
    code(cxt) {
      const { gen, data: data32, $data, schemaCode, schema } = cxt;
      if ($data || schema && typeof schema == "object") {
        cxt.fail$data((0, codegen_1._)`!${(0, util_1.useFunc)(gen, equal_1.default)}(${data32}, ${schemaCode})`);
      } else {
        cxt.fail((0, codegen_1._)`${schema} !== ${data32}`);
      }
    }
  };
  _const$1.default = def2;
  return _const$1;
}
function require_enum$1() {
  if (hasRequired_enum$1) return _enum$1;
  hasRequired_enum$1 = 1;
  Object.defineProperty(_enum$1, "__esModule", { value: true });
  const codegen_1 = requireCodegen$1();
  const util_1 = requireUtil$4();
  const equal_1 = requireEqual$1();
  const error = {
    message: "must be equal to one of the allowed values",
    params: ({ schemaCode }) => (0, codegen_1._)`{allowedValues: ${schemaCode}}`
  };
  const def2 = {
    keyword: "enum",
    schemaType: "array",
    $data: true,
    error,
    code(cxt) {
      const { gen, data: data32, $data, schema, schemaCode, it } = cxt;
      if (!$data && schema.length === 0)
        throw new Error("enum must have non-empty array");
      const useLoop = schema.length >= it.opts.loopEnum;
      let eql;
      const getEql = () => eql !== null && eql !== void 0 ? eql : eql = (0, util_1.useFunc)(gen, equal_1.default);
      let valid2;
      if (useLoop || $data) {
        valid2 = gen.let("valid");
        cxt.block$data(valid2, loopEnum);
      } else {
        if (!Array.isArray(schema))
          throw new Error("ajv implementation error");
        const vSchema = gen.const("vSchema", schemaCode);
        valid2 = (0, codegen_1.or)(...schema.map((_x, i) => equalCode(vSchema, i)));
      }
      cxt.pass(valid2);
      function loopEnum() {
        gen.assign(valid2, false);
        gen.forOf("v", schemaCode, (v) => gen.if((0, codegen_1._)`${getEql()}(${data32}, ${v})`, () => gen.assign(valid2, true).break()));
      }
      function equalCode(vSchema, i) {
        const sch = schema[i];
        return typeof sch === "object" && sch !== null ? (0, codegen_1._)`${getEql()}(${data32}, ${vSchema}[${i}])` : (0, codegen_1._)`${data32} === ${sch}`;
      }
    }
  };
  _enum$1.default = def2;
  return _enum$1;
}
function requireValidation$2() {
  if (hasRequiredValidation$2) return validation$2;
  hasRequiredValidation$2 = 1;
  Object.defineProperty(validation$2, "__esModule", { value: true });
  const limitNumber_1 = requireLimitNumber$1();
  const multipleOf_1 = requireMultipleOf$1();
  const limitLength_1 = requireLimitLength$1();
  const pattern_1 = requirePattern$1();
  const limitProperties_1 = requireLimitProperties$1();
  const required_1 = requireRequired$1();
  const limitItems_1 = requireLimitItems$1();
  const uniqueItems_1 = requireUniqueItems$1();
  const const_1 = require_const$1();
  const enum_1 = require_enum$1();
  const validation2 = [
    limitNumber_1.default,
    multipleOf_1.default,
    limitLength_1.default,
    pattern_1.default,
    limitProperties_1.default,
    required_1.default,
    limitItems_1.default,
    uniqueItems_1.default,
    { keyword: "type", schemaType: ["string", "array"] },
    { keyword: "nullable", schemaType: "boolean" },
    const_1.default,
    enum_1.default
  ];
  validation$2.default = validation2;
  return validation$2;
}
function requireAdditionalItems$1() {
  if (hasRequiredAdditionalItems$1) return additionalItems$1;
  hasRequiredAdditionalItems$1 = 1;
  Object.defineProperty(additionalItems$1, "__esModule", { value: true });
  additionalItems$1.validateAdditionalItems = void 0;
  const codegen_1 = requireCodegen$1();
  const util_1 = requireUtil$4();
  const error = {
    message: ({ params: { len } }) => (0, codegen_1.str)`must NOT have more than ${len} items`,
    params: ({ params: { len } }) => (0, codegen_1._)`{limit: ${len}}`
  };
  const def2 = {
    keyword: "additionalItems",
    type: "array",
    schemaType: ["boolean", "object"],
    before: "uniqueItems",
    error,
    code(cxt) {
      const { parentSchema, it } = cxt;
      const { items: items2 } = parentSchema;
      if (!Array.isArray(items2)) {
        (0, util_1.checkStrictMode)(it, '"additionalItems" is ignored when "items" is not an array of schemas');
        return;
      }
      validateAdditionalItems(cxt, items2);
    }
  };
  function validateAdditionalItems(cxt, items2) {
    const { gen, schema, data: data32, keyword: keyword2, it } = cxt;
    it.items = true;
    const len = gen.const("len", (0, codegen_1._)`${data32}.length`);
    if (schema === false) {
      cxt.setParams({ len: items2.length });
      cxt.pass((0, codegen_1._)`${len} <= ${items2.length}`);
    } else if (typeof schema == "object" && !(0, util_1.alwaysValidSchema)(it, schema)) {
      const valid2 = gen.var("valid", (0, codegen_1._)`${len} <= ${items2.length}`);
      gen.if((0, codegen_1.not)(valid2), () => validateItems(valid2));
      cxt.ok(valid2);
    }
    function validateItems(valid2) {
      gen.forRange("i", items2.length, len, (i) => {
        cxt.subschema({ keyword: keyword2, dataProp: i, dataPropType: util_1.Type.Num }, valid2);
        if (!it.allErrors)
          gen.if((0, codegen_1.not)(valid2), () => gen.break());
      });
    }
  }
  additionalItems$1.validateAdditionalItems = validateAdditionalItems;
  additionalItems$1.default = def2;
  return additionalItems$1;
}
function requireItems$1() {
  if (hasRequiredItems$1) return items$1;
  hasRequiredItems$1 = 1;
  Object.defineProperty(items$1, "__esModule", { value: true });
  items$1.validateTuple = void 0;
  const codegen_1 = requireCodegen$1();
  const util_1 = requireUtil$4();
  const code_1 = requireCode$3();
  const def2 = {
    keyword: "items",
    type: "array",
    schemaType: ["object", "array", "boolean"],
    before: "uniqueItems",
    code(cxt) {
      const { schema, it } = cxt;
      if (Array.isArray(schema))
        return validateTuple(cxt, "additionalItems", schema);
      it.items = true;
      if ((0, util_1.alwaysValidSchema)(it, schema))
        return;
      cxt.ok((0, code_1.validateArray)(cxt));
    }
  };
  function validateTuple(cxt, extraItems, schArr = cxt.schema) {
    const { gen, parentSchema, data: data32, keyword: keyword2, it } = cxt;
    checkStrictTuple(parentSchema);
    if (it.opts.unevaluated && schArr.length && it.items !== true) {
      it.items = util_1.mergeEvaluated.items(gen, schArr.length, it.items);
    }
    const valid2 = gen.name("valid");
    const len = gen.const("len", (0, codegen_1._)`${data32}.length`);
    schArr.forEach((sch, i) => {
      if ((0, util_1.alwaysValidSchema)(it, sch))
        return;
      gen.if((0, codegen_1._)`${len} > ${i}`, () => cxt.subschema({
        keyword: keyword2,
        schemaProp: i,
        dataProp: i
      }, valid2));
      cxt.ok(valid2);
    });
    function checkStrictTuple(sch) {
      const { opts, errSchemaPath } = it;
      const l = schArr.length;
      const fullTuple = l === sch.minItems && (l === sch.maxItems || sch[extraItems] === false);
      if (opts.strictTuples && !fullTuple) {
        const msg = `"${keyword2}" is ${l}-tuple, but minItems or maxItems/${extraItems} are not specified or different at path "${errSchemaPath}"`;
        (0, util_1.checkStrictMode)(it, msg, opts.strictTuples);
      }
    }
  }
  items$1.validateTuple = validateTuple;
  items$1.default = def2;
  return items$1;
}
function requirePrefixItems$1() {
  if (hasRequiredPrefixItems$1) return prefixItems$1;
  hasRequiredPrefixItems$1 = 1;
  Object.defineProperty(prefixItems$1, "__esModule", { value: true });
  const items_1 = requireItems$1();
  const def2 = {
    keyword: "prefixItems",
    type: "array",
    schemaType: ["array"],
    before: "uniqueItems",
    code: (cxt) => (0, items_1.validateTuple)(cxt, "items")
  };
  prefixItems$1.default = def2;
  return prefixItems$1;
}
function requireItems2020$1() {
  if (hasRequiredItems2020$1) return items2020$1;
  hasRequiredItems2020$1 = 1;
  Object.defineProperty(items2020$1, "__esModule", { value: true });
  const codegen_1 = requireCodegen$1();
  const util_1 = requireUtil$4();
  const code_1 = requireCode$3();
  const additionalItems_1 = requireAdditionalItems$1();
  const error = {
    message: ({ params: { len } }) => (0, codegen_1.str)`must NOT have more than ${len} items`,
    params: ({ params: { len } }) => (0, codegen_1._)`{limit: ${len}}`
  };
  const def2 = {
    keyword: "items",
    type: "array",
    schemaType: ["object", "boolean"],
    before: "uniqueItems",
    error,
    code(cxt) {
      const { schema, parentSchema, it } = cxt;
      const { prefixItems: prefixItems2 } = parentSchema;
      it.items = true;
      if ((0, util_1.alwaysValidSchema)(it, schema))
        return;
      if (prefixItems2)
        (0, additionalItems_1.validateAdditionalItems)(cxt, prefixItems2);
      else
        cxt.ok((0, code_1.validateArray)(cxt));
    }
  };
  items2020$1.default = def2;
  return items2020$1;
}
function requireContains$1() {
  if (hasRequiredContains$1) return contains$2;
  hasRequiredContains$1 = 1;
  Object.defineProperty(contains$2, "__esModule", { value: true });
  const codegen_1 = requireCodegen$1();
  const util_1 = requireUtil$4();
  const error = {
    message: ({ params: { min, max } }) => max === void 0 ? (0, codegen_1.str)`must contain at least ${min} valid item(s)` : (0, codegen_1.str)`must contain at least ${min} and no more than ${max} valid item(s)`,
    params: ({ params: { min, max } }) => max === void 0 ? (0, codegen_1._)`{minContains: ${min}}` : (0, codegen_1._)`{minContains: ${min}, maxContains: ${max}}`
  };
  const def2 = {
    keyword: "contains",
    type: "array",
    schemaType: ["object", "boolean"],
    before: "uniqueItems",
    trackErrors: true,
    error,
    code(cxt) {
      const { gen, schema, parentSchema, data: data32, it } = cxt;
      let min;
      let max;
      const { minContains, maxContains } = parentSchema;
      if (it.opts.next) {
        min = minContains === void 0 ? 1 : minContains;
        max = maxContains;
      } else {
        min = 1;
      }
      const len = gen.const("len", (0, codegen_1._)`${data32}.length`);
      cxt.setParams({ min, max });
      if (max === void 0 && min === 0) {
        (0, util_1.checkStrictMode)(it, `"minContains" == 0 without "maxContains": "contains" keyword ignored`);
        return;
      }
      if (max !== void 0 && min > max) {
        (0, util_1.checkStrictMode)(it, `"minContains" > "maxContains" is always invalid`);
        cxt.fail();
        return;
      }
      if ((0, util_1.alwaysValidSchema)(it, schema)) {
        let cond = (0, codegen_1._)`${len} >= ${min}`;
        if (max !== void 0)
          cond = (0, codegen_1._)`${cond} && ${len} <= ${max}`;
        cxt.pass(cond);
        return;
      }
      it.items = true;
      const valid2 = gen.name("valid");
      if (max === void 0 && min === 1) {
        validateItems(valid2, () => gen.if(valid2, () => gen.break()));
      } else if (min === 0) {
        gen.let(valid2, true);
        if (max !== void 0)
          gen.if((0, codegen_1._)`${data32}.length > 0`, validateItemsWithCount);
      } else {
        gen.let(valid2, false);
        validateItemsWithCount();
      }
      cxt.result(valid2, () => cxt.reset());
      function validateItemsWithCount() {
        const schValid = gen.name("_valid");
        const count = gen.let("count", 0);
        validateItems(schValid, () => gen.if(schValid, () => checkLimits(count)));
      }
      function validateItems(_valid, block2) {
        gen.forRange("i", 0, len, (i) => {
          cxt.subschema({
            keyword: "contains",
            dataProp: i,
            dataPropType: util_1.Type.Num,
            compositeRule: true
          }, _valid);
          block2();
        });
      }
      function checkLimits(count) {
        gen.code((0, codegen_1._)`${count}++`);
        if (max === void 0) {
          gen.if((0, codegen_1._)`${count} >= ${min}`, () => gen.assign(valid2, true).break());
        } else {
          gen.if((0, codegen_1._)`${count} > ${max}`, () => gen.assign(valid2, false).break());
          if (min === 1)
            gen.assign(valid2, true);
          else
            gen.if((0, codegen_1._)`${count} >= ${min}`, () => gen.assign(valid2, true));
        }
      }
    }
  };
  contains$2.default = def2;
  return contains$2;
}
function requireDependencies$1() {
  if (hasRequiredDependencies$1) return dependencies$1;
  hasRequiredDependencies$1 = 1;
  (function(exports$1) {
    Object.defineProperty(exports$1, "__esModule", { value: true });
    exports$1.validateSchemaDeps = exports$1.validatePropertyDeps = exports$1.error = void 0;
    const codegen_1 = requireCodegen$1();
    const util_1 = requireUtil$4();
    const code_1 = requireCode$3();
    exports$1.error = {
      message: ({ params: { property, depsCount, deps: deps18 } }) => {
        const property_ies = depsCount === 1 ? "property" : "properties";
        return (0, codegen_1.str)`must have ${property_ies} ${deps18} when property ${property} is present`;
      },
      params: ({ params: { property, depsCount, deps: deps18, missingProperty } }) => (0, codegen_1._)`{property: ${property},
    missingProperty: ${missingProperty},
    depsCount: ${depsCount},
    deps: ${deps18}}`
    };
    const def2 = {
      keyword: "dependencies",
      type: "object",
      schemaType: "object",
      error: exports$1.error,
      code(cxt) {
        const [propDeps, schDeps] = splitDependencies(cxt);
        validatePropertyDeps(cxt, propDeps);
        validateSchemaDeps(cxt, schDeps);
      }
    };
    function splitDependencies({ schema }) {
      const propertyDeps = {};
      const schemaDeps = {};
      for (const key in schema) {
        if (key === "__proto__")
          continue;
        const deps18 = Array.isArray(schema[key]) ? propertyDeps : schemaDeps;
        deps18[key] = schema[key];
      }
      return [propertyDeps, schemaDeps];
    }
    function validatePropertyDeps(cxt, propertyDeps = cxt.schema) {
      const { gen, data: data32, it } = cxt;
      if (Object.keys(propertyDeps).length === 0)
        return;
      const missing = gen.let("missing");
      for (const prop in propertyDeps) {
        const deps18 = propertyDeps[prop];
        if (deps18.length === 0)
          continue;
        const hasProperty = (0, code_1.propertyInData)(gen, data32, prop, it.opts.ownProperties);
        cxt.setParams({
          property: prop,
          depsCount: deps18.length,
          deps: deps18.join(", ")
        });
        if (it.allErrors) {
          gen.if(hasProperty, () => {
            for (const depProp of deps18) {
              (0, code_1.checkReportMissingProp)(cxt, depProp);
            }
          });
        } else {
          gen.if((0, codegen_1._)`${hasProperty} && (${(0, code_1.checkMissingProp)(cxt, deps18, missing)})`);
          (0, code_1.reportMissingProp)(cxt, missing);
          gen.else();
        }
      }
    }
    exports$1.validatePropertyDeps = validatePropertyDeps;
    function validateSchemaDeps(cxt, schemaDeps = cxt.schema) {
      const { gen, data: data32, keyword: keyword2, it } = cxt;
      const valid2 = gen.name("valid");
      for (const prop in schemaDeps) {
        if ((0, util_1.alwaysValidSchema)(it, schemaDeps[prop]))
          continue;
        gen.if(
          (0, code_1.propertyInData)(gen, data32, prop, it.opts.ownProperties),
          () => {
            const schCxt = cxt.subschema({ keyword: keyword2, schemaProp: prop }, valid2);
            cxt.mergeValidEvaluated(schCxt, valid2);
          },
          () => gen.var(valid2, true)
        );
        cxt.ok(valid2);
      }
    }
    exports$1.validateSchemaDeps = validateSchemaDeps;
    exports$1.default = def2;
  })(dependencies$1);
  return dependencies$1;
}
function requirePropertyNames$1() {
  if (hasRequiredPropertyNames$1) return propertyNames$1;
  hasRequiredPropertyNames$1 = 1;
  Object.defineProperty(propertyNames$1, "__esModule", { value: true });
  const codegen_1 = requireCodegen$1();
  const util_1 = requireUtil$4();
  const error = {
    message: "property name must be valid",
    params: ({ params }) => (0, codegen_1._)`{propertyName: ${params.propertyName}}`
  };
  const def2 = {
    keyword: "propertyNames",
    type: "object",
    schemaType: ["object", "boolean"],
    error,
    code(cxt) {
      const { gen, schema, data: data32, it } = cxt;
      if ((0, util_1.alwaysValidSchema)(it, schema))
        return;
      const valid2 = gen.name("valid");
      gen.forIn("key", data32, (key) => {
        cxt.setParams({ propertyName: key });
        cxt.subschema({
          keyword: "propertyNames",
          data: key,
          dataTypes: ["string"],
          propertyName: key,
          compositeRule: true
        }, valid2);
        gen.if((0, codegen_1.not)(valid2), () => {
          cxt.error(true);
          if (!it.allErrors)
            gen.break();
        });
      });
      cxt.ok(valid2);
    }
  };
  propertyNames$1.default = def2;
  return propertyNames$1;
}
function requireAdditionalProperties$1() {
  if (hasRequiredAdditionalProperties$1) return additionalProperties$2;
  hasRequiredAdditionalProperties$1 = 1;
  Object.defineProperty(additionalProperties$2, "__esModule", { value: true });
  const code_1 = requireCode$3();
  const codegen_1 = requireCodegen$1();
  const names_1 = requireNames$1();
  const util_1 = requireUtil$4();
  const error = {
    message: "must NOT have additional properties",
    params: ({ params }) => (0, codegen_1._)`{additionalProperty: ${params.additionalProperty}}`
  };
  const def2 = {
    keyword: "additionalProperties",
    type: ["object"],
    schemaType: ["boolean", "object"],
    allowUndefined: true,
    trackErrors: true,
    error,
    code(cxt) {
      const { gen, schema, parentSchema, data: data32, errsCount, it } = cxt;
      if (!errsCount)
        throw new Error("ajv implementation error");
      const { allErrors, opts } = it;
      it.props = true;
      if (opts.removeAdditional !== "all" && (0, util_1.alwaysValidSchema)(it, schema))
        return;
      const props = (0, code_1.allSchemaProperties)(parentSchema.properties);
      const patProps = (0, code_1.allSchemaProperties)(parentSchema.patternProperties);
      checkAdditionalProperties();
      cxt.ok((0, codegen_1._)`${errsCount} === ${names_1.default.errors}`);
      function checkAdditionalProperties() {
        gen.forIn("key", data32, (key) => {
          if (!props.length && !patProps.length)
            additionalPropertyCode(key);
          else
            gen.if(isAdditional(key), () => additionalPropertyCode(key));
        });
      }
      function isAdditional(key) {
        let definedProp;
        if (props.length > 8) {
          const propsSchema = (0, util_1.schemaRefOrVal)(it, parentSchema.properties, "properties");
          definedProp = (0, code_1.isOwnProperty)(gen, propsSchema, key);
        } else if (props.length) {
          definedProp = (0, codegen_1.or)(...props.map((p) => (0, codegen_1._)`${key} === ${p}`));
        } else {
          definedProp = codegen_1.nil;
        }
        if (patProps.length) {
          definedProp = (0, codegen_1.or)(definedProp, ...patProps.map((p) => (0, codegen_1._)`${(0, code_1.usePattern)(cxt, p)}.test(${key})`));
        }
        return (0, codegen_1.not)(definedProp);
      }
      function deleteAdditional(key) {
        gen.code((0, codegen_1._)`delete ${data32}[${key}]`);
      }
      function additionalPropertyCode(key) {
        if (opts.removeAdditional === "all" || opts.removeAdditional && schema === false) {
          deleteAdditional(key);
          return;
        }
        if (schema === false) {
          cxt.setParams({ additionalProperty: key });
          cxt.error();
          if (!allErrors)
            gen.break();
          return;
        }
        if (typeof schema == "object" && !(0, util_1.alwaysValidSchema)(it, schema)) {
          const valid2 = gen.name("valid");
          if (opts.removeAdditional === "failing") {
            applyAdditionalSchema(key, valid2, false);
            gen.if((0, codegen_1.not)(valid2), () => {
              cxt.reset();
              deleteAdditional(key);
            });
          } else {
            applyAdditionalSchema(key, valid2);
            if (!allErrors)
              gen.if((0, codegen_1.not)(valid2), () => gen.break());
          }
        }
      }
      function applyAdditionalSchema(key, valid2, errors2) {
        const subschema2 = {
          keyword: "additionalProperties",
          dataProp: key,
          dataPropType: util_1.Type.Str
        };
        if (errors2 === false) {
          Object.assign(subschema2, {
            compositeRule: true,
            createErrors: false,
            allErrors: false
          });
        }
        cxt.subschema(subschema2, valid2);
      }
    }
  };
  additionalProperties$2.default = def2;
  return additionalProperties$2;
}
function requireProperties$1() {
  if (hasRequiredProperties$1) return properties$4;
  hasRequiredProperties$1 = 1;
  Object.defineProperty(properties$4, "__esModule", { value: true });
  const validate_1 = requireValidate$1();
  const code_1 = requireCode$3();
  const util_1 = requireUtil$4();
  const additionalProperties_1 = requireAdditionalProperties$1();
  const def2 = {
    keyword: "properties",
    type: "object",
    schemaType: "object",
    code(cxt) {
      const { gen, schema, parentSchema, data: data32, it } = cxt;
      if (it.opts.removeAdditional === "all" && parentSchema.additionalProperties === void 0) {
        additionalProperties_1.default.code(new validate_1.KeywordCxt(it, additionalProperties_1.default, "additionalProperties"));
      }
      const allProps = (0, code_1.allSchemaProperties)(schema);
      for (const prop of allProps) {
        it.definedProperties.add(prop);
      }
      if (it.opts.unevaluated && allProps.length && it.props !== true) {
        it.props = util_1.mergeEvaluated.props(gen, (0, util_1.toHash)(allProps), it.props);
      }
      const properties2 = allProps.filter((p) => !(0, util_1.alwaysValidSchema)(it, schema[p]));
      if (properties2.length === 0)
        return;
      const valid2 = gen.name("valid");
      for (const prop of properties2) {
        if (hasDefault(prop)) {
          applyPropertySchema(prop);
        } else {
          gen.if((0, code_1.propertyInData)(gen, data32, prop, it.opts.ownProperties));
          applyPropertySchema(prop);
          if (!it.allErrors)
            gen.else().var(valid2, true);
          gen.endIf();
        }
        cxt.it.definedProperties.add(prop);
        cxt.ok(valid2);
      }
      function hasDefault(prop) {
        return it.opts.useDefaults && !it.compositeRule && schema[prop].default !== void 0;
      }
      function applyPropertySchema(prop) {
        cxt.subschema({
          keyword: "properties",
          schemaProp: prop,
          dataProp: prop
        }, valid2);
      }
    }
  };
  properties$4.default = def2;
  return properties$4;
}
function requirePatternProperties$1() {
  if (hasRequiredPatternProperties$1) return patternProperties$1;
  hasRequiredPatternProperties$1 = 1;
  Object.defineProperty(patternProperties$1, "__esModule", { value: true });
  const code_1 = requireCode$3();
  const codegen_1 = requireCodegen$1();
  const util_1 = requireUtil$4();
  const util_2 = requireUtil$4();
  const def2 = {
    keyword: "patternProperties",
    type: "object",
    schemaType: "object",
    code(cxt) {
      const { gen, schema, data: data32, parentSchema, it } = cxt;
      const { opts } = it;
      const patterns = (0, code_1.allSchemaProperties)(schema);
      const alwaysValidPatterns = patterns.filter((p) => (0, util_1.alwaysValidSchema)(it, schema[p]));
      if (patterns.length === 0 || alwaysValidPatterns.length === patterns.length && (!it.opts.unevaluated || it.props === true)) {
        return;
      }
      const checkProperties = opts.strictSchema && !opts.allowMatchingProperties && parentSchema.properties;
      const valid2 = gen.name("valid");
      if (it.props !== true && !(it.props instanceof codegen_1.Name)) {
        it.props = (0, util_2.evaluatedPropsToName)(gen, it.props);
      }
      const { props } = it;
      validatePatternProperties();
      function validatePatternProperties() {
        for (const pat of patterns) {
          if (checkProperties)
            checkMatchingProperties(pat);
          if (it.allErrors) {
            validateProperties(pat);
          } else {
            gen.var(valid2, true);
            validateProperties(pat);
            gen.if(valid2);
          }
        }
      }
      function checkMatchingProperties(pat) {
        for (const prop in checkProperties) {
          if (new RegExp(pat).test(prop)) {
            (0, util_1.checkStrictMode)(it, `property ${prop} matches pattern ${pat} (use allowMatchingProperties)`);
          }
        }
      }
      function validateProperties(pat) {
        gen.forIn("key", data32, (key) => {
          gen.if((0, codegen_1._)`${(0, code_1.usePattern)(cxt, pat)}.test(${key})`, () => {
            const alwaysValid = alwaysValidPatterns.includes(pat);
            if (!alwaysValid) {
              cxt.subschema({
                keyword: "patternProperties",
                schemaProp: pat,
                dataProp: key,
                dataPropType: util_2.Type.Str
              }, valid2);
            }
            if (it.opts.unevaluated && props !== true) {
              gen.assign((0, codegen_1._)`${props}[${key}]`, true);
            } else if (!alwaysValid && !it.allErrors) {
              gen.if((0, codegen_1.not)(valid2), () => gen.break());
            }
          });
        });
      }
    }
  };
  patternProperties$1.default = def2;
  return patternProperties$1;
}
function requireNot$1() {
  if (hasRequiredNot$1) return not$1;
  hasRequiredNot$1 = 1;
  Object.defineProperty(not$1, "__esModule", { value: true });
  const util_1 = requireUtil$4();
  const def2 = {
    keyword: "not",
    schemaType: ["object", "boolean"],
    trackErrors: true,
    code(cxt) {
      const { gen, schema, it } = cxt;
      if ((0, util_1.alwaysValidSchema)(it, schema)) {
        cxt.fail();
        return;
      }
      const valid2 = gen.name("valid");
      cxt.subschema({
        keyword: "not",
        compositeRule: true,
        createErrors: false,
        allErrors: false
      }, valid2);
      cxt.failResult(valid2, () => cxt.reset(), () => cxt.error());
    },
    error: { message: "must NOT be valid" }
  };
  not$1.default = def2;
  return not$1;
}
function requireAnyOf$1() {
  if (hasRequiredAnyOf$1) return anyOf$1;
  hasRequiredAnyOf$1 = 1;
  Object.defineProperty(anyOf$1, "__esModule", { value: true });
  const code_1 = requireCode$3();
  const def2 = {
    keyword: "anyOf",
    schemaType: "array",
    trackErrors: true,
    code: code_1.validateUnion,
    error: { message: "must match a schema in anyOf" }
  };
  anyOf$1.default = def2;
  return anyOf$1;
}
function requireOneOf$1() {
  if (hasRequiredOneOf$1) return oneOf$1;
  hasRequiredOneOf$1 = 1;
  Object.defineProperty(oneOf$1, "__esModule", { value: true });
  const codegen_1 = requireCodegen$1();
  const util_1 = requireUtil$4();
  const error = {
    message: "must match exactly one schema in oneOf",
    params: ({ params }) => (0, codegen_1._)`{passingSchemas: ${params.passing}}`
  };
  const def2 = {
    keyword: "oneOf",
    schemaType: "array",
    trackErrors: true,
    error,
    code(cxt) {
      const { gen, schema, parentSchema, it } = cxt;
      if (!Array.isArray(schema))
        throw new Error("ajv implementation error");
      if (it.opts.discriminator && parentSchema.discriminator)
        return;
      const schArr = schema;
      const valid2 = gen.let("valid", false);
      const passing = gen.let("passing", null);
      const schValid = gen.name("_valid");
      cxt.setParams({ passing });
      gen.block(validateOneOf);
      cxt.result(valid2, () => cxt.reset(), () => cxt.error(true));
      function validateOneOf() {
        schArr.forEach((sch, i) => {
          let schCxt;
          if ((0, util_1.alwaysValidSchema)(it, sch)) {
            gen.var(schValid, true);
          } else {
            schCxt = cxt.subschema({
              keyword: "oneOf",
              schemaProp: i,
              compositeRule: true
            }, schValid);
          }
          if (i > 0) {
            gen.if((0, codegen_1._)`${schValid} && ${valid2}`).assign(valid2, false).assign(passing, (0, codegen_1._)`[${passing}, ${i}]`).else();
          }
          gen.if(schValid, () => {
            gen.assign(valid2, true);
            gen.assign(passing, i);
            if (schCxt)
              cxt.mergeEvaluated(schCxt, codegen_1.Name);
          });
        });
      }
    }
  };
  oneOf$1.default = def2;
  return oneOf$1;
}
function requireAllOf$1() {
  if (hasRequiredAllOf$1) return allOf$1;
  hasRequiredAllOf$1 = 1;
  Object.defineProperty(allOf$1, "__esModule", { value: true });
  const util_1 = requireUtil$4();
  const def2 = {
    keyword: "allOf",
    schemaType: "array",
    code(cxt) {
      const { gen, schema, it } = cxt;
      if (!Array.isArray(schema))
        throw new Error("ajv implementation error");
      const valid2 = gen.name("valid");
      schema.forEach((sch, i) => {
        if ((0, util_1.alwaysValidSchema)(it, sch))
          return;
        const schCxt = cxt.subschema({ keyword: "allOf", schemaProp: i }, valid2);
        cxt.ok(valid2);
        cxt.mergeEvaluated(schCxt);
      });
    }
  };
  allOf$1.default = def2;
  return allOf$1;
}
function require_if$1() {
  if (hasRequired_if$1) return _if$1;
  hasRequired_if$1 = 1;
  Object.defineProperty(_if$1, "__esModule", { value: true });
  const codegen_1 = requireCodegen$1();
  const util_1 = requireUtil$4();
  const error = {
    message: ({ params }) => (0, codegen_1.str)`must match "${params.ifClause}" schema`,
    params: ({ params }) => (0, codegen_1._)`{failingKeyword: ${params.ifClause}}`
  };
  const def2 = {
    keyword: "if",
    schemaType: ["object", "boolean"],
    trackErrors: true,
    error,
    code(cxt) {
      const { gen, parentSchema, it } = cxt;
      if (parentSchema.then === void 0 && parentSchema.else === void 0) {
        (0, util_1.checkStrictMode)(it, '"if" without "then" and "else" is ignored');
      }
      const hasThen = hasSchema(it, "then");
      const hasElse = hasSchema(it, "else");
      if (!hasThen && !hasElse)
        return;
      const valid2 = gen.let("valid", true);
      const schValid = gen.name("_valid");
      validateIf();
      cxt.reset();
      if (hasThen && hasElse) {
        const ifClause = gen.let("ifClause");
        cxt.setParams({ ifClause });
        gen.if(schValid, validateClause("then", ifClause), validateClause("else", ifClause));
      } else if (hasThen) {
        gen.if(schValid, validateClause("then"));
      } else {
        gen.if((0, codegen_1.not)(schValid), validateClause("else"));
      }
      cxt.pass(valid2, () => cxt.error(true));
      function validateIf() {
        const schCxt = cxt.subschema({
          keyword: "if",
          compositeRule: true,
          createErrors: false,
          allErrors: false
        }, schValid);
        cxt.mergeEvaluated(schCxt);
      }
      function validateClause(keyword2, ifClause) {
        return () => {
          const schCxt = cxt.subschema({ keyword: keyword2 }, schValid);
          gen.assign(valid2, schValid);
          cxt.mergeValidEvaluated(schCxt, valid2);
          if (ifClause)
            gen.assign(ifClause, (0, codegen_1._)`${keyword2}`);
          else
            cxt.setParams({ ifClause: keyword2 });
        };
      }
    }
  };
  function hasSchema(it, keyword2) {
    const schema = it.schema[keyword2];
    return schema !== void 0 && !(0, util_1.alwaysValidSchema)(it, schema);
  }
  _if$1.default = def2;
  return _if$1;
}
function requireThenElse$1() {
  if (hasRequiredThenElse$1) return thenElse$1;
  hasRequiredThenElse$1 = 1;
  Object.defineProperty(thenElse$1, "__esModule", { value: true });
  const util_1 = requireUtil$4();
  const def2 = {
    keyword: ["then", "else"],
    schemaType: ["object", "boolean"],
    code({ keyword: keyword2, parentSchema, it }) {
      if (parentSchema.if === void 0)
        (0, util_1.checkStrictMode)(it, `"${keyword2}" without "if" is ignored`);
    }
  };
  thenElse$1.default = def2;
  return thenElse$1;
}
function requireApplicator$1() {
  if (hasRequiredApplicator$1) return applicator$1;
  hasRequiredApplicator$1 = 1;
  Object.defineProperty(applicator$1, "__esModule", { value: true });
  const additionalItems_1 = requireAdditionalItems$1();
  const prefixItems_1 = requirePrefixItems$1();
  const items_1 = requireItems$1();
  const items2020_1 = requireItems2020$1();
  const contains_1 = requireContains$1();
  const dependencies_1 = requireDependencies$1();
  const propertyNames_1 = requirePropertyNames$1();
  const additionalProperties_1 = requireAdditionalProperties$1();
  const properties_1 = requireProperties$1();
  const patternProperties_1 = requirePatternProperties$1();
  const not_1 = requireNot$1();
  const anyOf_1 = requireAnyOf$1();
  const oneOf_1 = requireOneOf$1();
  const allOf_1 = requireAllOf$1();
  const if_1 = require_if$1();
  const thenElse_1 = requireThenElse$1();
  function getApplicator(draft2020 = false) {
    const applicator2 = [
      not_1.default,
      anyOf_1.default,
      oneOf_1.default,
      allOf_1.default,
      if_1.default,
      thenElse_1.default,
      propertyNames_1.default,
      additionalProperties_1.default,
      dependencies_1.default,
      properties_1.default,
      patternProperties_1.default
    ];
    if (draft2020)
      applicator2.push(prefixItems_1.default, items2020_1.default);
    else
      applicator2.push(additionalItems_1.default, items_1.default);
    applicator2.push(contains_1.default);
    return applicator2;
  }
  applicator$1.default = getApplicator;
  return applicator$1;
}
function requireFormat$3() {
  if (hasRequiredFormat$3) return format$3;
  hasRequiredFormat$3 = 1;
  Object.defineProperty(format$3, "__esModule", { value: true });
  const codegen_1 = requireCodegen$1();
  const error = {
    message: ({ schemaCode }) => (0, codegen_1.str)`must match format "${schemaCode}"`,
    params: ({ schemaCode }) => (0, codegen_1._)`{format: ${schemaCode}}`
  };
  const def2 = {
    keyword: "format",
    type: ["number", "string"],
    schemaType: "string",
    $data: true,
    error,
    code(cxt, ruleType) {
      const { gen, data: data32, $data, schema, schemaCode, it } = cxt;
      const { opts, errSchemaPath, schemaEnv, self: self2 } = it;
      if (!opts.validateFormats)
        return;
      if ($data)
        validate$DataFormat();
      else
        validateFormat();
      function validate$DataFormat() {
        const fmts = gen.scopeValue("formats", {
          ref: self2.formats,
          code: opts.code.formats
        });
        const fDef = gen.const("fDef", (0, codegen_1._)`${fmts}[${schemaCode}]`);
        const fType = gen.let("fType");
        const format2 = gen.let("format");
        gen.if((0, codegen_1._)`typeof ${fDef} == "object" && !(${fDef} instanceof RegExp)`, () => gen.assign(fType, (0, codegen_1._)`${fDef}.type || "string"`).assign(format2, (0, codegen_1._)`${fDef}.validate`), () => gen.assign(fType, (0, codegen_1._)`"string"`).assign(format2, fDef));
        cxt.fail$data((0, codegen_1.or)(unknownFmt(), invalidFmt()));
        function unknownFmt() {
          if (opts.strictSchema === false)
            return codegen_1.nil;
          return (0, codegen_1._)`${schemaCode} && !${format2}`;
        }
        function invalidFmt() {
          const callFormat = schemaEnv.$async ? (0, codegen_1._)`(${fDef}.async ? await ${format2}(${data32}) : ${format2}(${data32}))` : (0, codegen_1._)`${format2}(${data32})`;
          const validData = (0, codegen_1._)`(typeof ${format2} == "function" ? ${callFormat} : ${format2}.test(${data32}))`;
          return (0, codegen_1._)`${format2} && ${format2} !== true && ${fType} === ${ruleType} && !${validData}`;
        }
      }
      function validateFormat() {
        const formatDef = self2.formats[schema];
        if (!formatDef) {
          unknownFormat();
          return;
        }
        if (formatDef === true)
          return;
        const [fmtType, format2, fmtRef] = getFormat2(formatDef);
        if (fmtType === ruleType)
          cxt.pass(validCondition());
        function unknownFormat() {
          if (opts.strictSchema === false) {
            self2.logger.warn(unknownMsg());
            return;
          }
          throw new Error(unknownMsg());
          function unknownMsg() {
            return `unknown format "${schema}" ignored in schema at path "${errSchemaPath}"`;
          }
        }
        function getFormat2(fmtDef) {
          const code2 = fmtDef instanceof RegExp ? (0, codegen_1.regexpCode)(fmtDef) : opts.code.formats ? (0, codegen_1._)`${opts.code.formats}${(0, codegen_1.getProperty)(schema)}` : void 0;
          const fmt = gen.scopeValue("formats", { key: schema, ref: fmtDef, code: code2 });
          if (typeof fmtDef == "object" && !(fmtDef instanceof RegExp)) {
            return [fmtDef.type || "string", fmtDef.validate, (0, codegen_1._)`${fmt}.validate`];
          }
          return ["string", fmtDef, fmt];
        }
        function validCondition() {
          if (typeof formatDef == "object" && !(formatDef instanceof RegExp) && formatDef.async) {
            if (!schemaEnv.$async)
              throw new Error("async format in sync schema");
            return (0, codegen_1._)`await ${fmtRef}(${data32})`;
          }
          return typeof format2 == "function" ? (0, codegen_1._)`${fmtRef}(${data32})` : (0, codegen_1._)`${fmtRef}.test(${data32})`;
        }
      }
    }
  };
  format$3.default = def2;
  return format$3;
}
function requireFormat$2() {
  if (hasRequiredFormat$2) return format$4;
  hasRequiredFormat$2 = 1;
  Object.defineProperty(format$4, "__esModule", { value: true });
  const format_1 = requireFormat$3();
  const format2 = [format_1.default];
  format$4.default = format2;
  return format$4;
}
function requireMetadata$1() {
  if (hasRequiredMetadata$1) return metadata$1;
  hasRequiredMetadata$1 = 1;
  Object.defineProperty(metadata$1, "__esModule", { value: true });
  metadata$1.contentVocabulary = metadata$1.metadataVocabulary = void 0;
  metadata$1.metadataVocabulary = [
    "title",
    "description",
    "default",
    "deprecated",
    "readOnly",
    "writeOnly",
    "examples"
  ];
  metadata$1.contentVocabulary = [
    "contentMediaType",
    "contentEncoding",
    "contentSchema"
  ];
  return metadata$1;
}
function requireDraft7$1() {
  if (hasRequiredDraft7$1) return draft7$1;
  hasRequiredDraft7$1 = 1;
  Object.defineProperty(draft7$1, "__esModule", { value: true });
  const core_1 = requireCore$3();
  const validation_1 = requireValidation$2();
  const applicator_1 = requireApplicator$1();
  const format_1 = requireFormat$2();
  const metadata_1 = requireMetadata$1();
  const draft7Vocabularies = [
    core_1.default,
    validation_1.default,
    (0, applicator_1.default)(),
    format_1.default,
    metadata_1.metadataVocabulary,
    metadata_1.contentVocabulary
  ];
  draft7$1.default = draft7Vocabularies;
  return draft7$1;
}
function requireTypes$3() {
  if (hasRequiredTypes$3) return types$7;
  hasRequiredTypes$3 = 1;
  Object.defineProperty(types$7, "__esModule", { value: true });
  types$7.DiscrError = void 0;
  var DiscrError;
  (function(DiscrError2) {
    DiscrError2["Tag"] = "tag";
    DiscrError2["Mapping"] = "mapping";
  })(DiscrError || (types$7.DiscrError = DiscrError = {}));
  return types$7;
}
function requireDiscriminator$1() {
  if (hasRequiredDiscriminator$1) return discriminator$1;
  hasRequiredDiscriminator$1 = 1;
  Object.defineProperty(discriminator$1, "__esModule", { value: true });
  const codegen_1 = requireCodegen$1();
  const types_1 = requireTypes$3();
  const compile_1 = requireCompile$2();
  const ref_error_1 = requireRef_error$1();
  const util_1 = requireUtil$4();
  const error = {
    message: ({ params: { discrError, tagName } }) => discrError === types_1.DiscrError.Tag ? `tag "${tagName}" must be string` : `value of tag "${tagName}" must be in oneOf`,
    params: ({ params: { discrError, tag: tag2, tagName } }) => (0, codegen_1._)`{error: ${discrError}, tag: ${tagName}, tagValue: ${tag2}}`
  };
  const def2 = {
    keyword: "discriminator",
    type: "object",
    schemaType: "object",
    error,
    code(cxt) {
      const { gen, data: data32, schema, parentSchema, it } = cxt;
      const { oneOf: oneOf2 } = parentSchema;
      if (!it.opts.discriminator) {
        throw new Error("discriminator: requires discriminator option");
      }
      const tagName = schema.propertyName;
      if (typeof tagName != "string")
        throw new Error("discriminator: requires propertyName");
      if (schema.mapping)
        throw new Error("discriminator: mapping is not supported");
      if (!oneOf2)
        throw new Error("discriminator: requires oneOf keyword");
      const valid2 = gen.let("valid", false);
      const tag2 = gen.const("tag", (0, codegen_1._)`${data32}${(0, codegen_1.getProperty)(tagName)}`);
      gen.if((0, codegen_1._)`typeof ${tag2} == "string"`, () => validateMapping(), () => cxt.error(false, { discrError: types_1.DiscrError.Tag, tag: tag2, tagName }));
      cxt.ok(valid2);
      function validateMapping() {
        const mapping = getMapping();
        gen.if(false);
        for (const tagValue in mapping) {
          gen.elseIf((0, codegen_1._)`${tag2} === ${tagValue}`);
          gen.assign(valid2, applyTagSchema(mapping[tagValue]));
        }
        gen.else();
        cxt.error(false, { discrError: types_1.DiscrError.Mapping, tag: tag2, tagName });
        gen.endIf();
      }
      function applyTagSchema(schemaProp) {
        const _valid = gen.name("valid");
        const schCxt = cxt.subschema({ keyword: "oneOf", schemaProp }, _valid);
        cxt.mergeEvaluated(schCxt, codegen_1.Name);
        return _valid;
      }
      function getMapping() {
        var _a4;
        const oneOfMapping = {};
        const topRequired = hasRequired(parentSchema);
        let tagRequired = true;
        for (let i = 0; i < oneOf2.length; i++) {
          let sch = oneOf2[i];
          if ((sch === null || sch === void 0 ? void 0 : sch.$ref) && !(0, util_1.schemaHasRulesButRef)(sch, it.self.RULES)) {
            const ref2 = sch.$ref;
            sch = compile_1.resolveRef.call(it.self, it.schemaEnv.root, it.baseId, ref2);
            if (sch instanceof compile_1.SchemaEnv)
              sch = sch.schema;
            if (sch === void 0)
              throw new ref_error_1.default(it.opts.uriResolver, it.baseId, ref2);
          }
          const propSch = (_a4 = sch === null || sch === void 0 ? void 0 : sch.properties) === null || _a4 === void 0 ? void 0 : _a4[tagName];
          if (typeof propSch != "object") {
            throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${tagName}"`);
          }
          tagRequired = tagRequired && (topRequired || hasRequired(sch));
          addMappings(propSch, i);
        }
        if (!tagRequired)
          throw new Error(`discriminator: "${tagName}" must be required`);
        return oneOfMapping;
        function hasRequired({ required: required2 }) {
          return Array.isArray(required2) && required2.includes(tagName);
        }
        function addMappings(sch, i) {
          if (sch.const) {
            addMapping(sch.const, i);
          } else if (sch.enum) {
            for (const tagValue of sch.enum) {
              addMapping(tagValue, i);
            }
          } else {
            throw new Error(`discriminator: "properties/${tagName}" must have "const" or "enum"`);
          }
        }
        function addMapping(tagValue, i) {
          if (typeof tagValue != "string" || tagValue in oneOfMapping) {
            throw new Error(`discriminator: "${tagName}" values must be unique strings`);
          }
          oneOfMapping[tagValue] = i;
        }
      }
    }
  };
  discriminator$1.default = def2;
  return discriminator$1;
}
function requireAjv$1() {
  if (hasRequiredAjv$1) return ajv$1.exports;
  hasRequiredAjv$1 = 1;
  (function(module2, exports$1) {
    Object.defineProperty(exports$1, "__esModule", { value: true });
    exports$1.MissingRefError = exports$1.ValidationError = exports$1.CodeGen = exports$1.Name = exports$1.nil = exports$1.stringify = exports$1.str = exports$1._ = exports$1.KeywordCxt = exports$1.Ajv = void 0;
    const core_1 = requireCore$4();
    const draft7_1 = requireDraft7$1();
    const discriminator_1 = requireDiscriminator$1();
    const draft7MetaSchema = require$$3$2;
    const META_SUPPORT_DATA = ["/properties"];
    const META_SCHEMA_ID = "http://json-schema.org/draft-07/schema";
    class Ajv2 extends core_1.default {
      _addVocabularies() {
        super._addVocabularies();
        draft7_1.default.forEach((v) => this.addVocabulary(v));
        if (this.opts.discriminator)
          this.addKeyword(discriminator_1.default);
      }
      _addDefaultMetaSchema() {
        super._addDefaultMetaSchema();
        if (!this.opts.meta)
          return;
        const metaSchema = this.opts.$data ? this.$dataMetaSchema(draft7MetaSchema, META_SUPPORT_DATA) : draft7MetaSchema;
        this.addMetaSchema(metaSchema, META_SCHEMA_ID, false);
        this.refs["http://json-schema.org/schema"] = META_SCHEMA_ID;
      }
      defaultMeta() {
        return this.opts.defaultMeta = super.defaultMeta() || (this.getSchema(META_SCHEMA_ID) ? META_SCHEMA_ID : void 0);
      }
    }
    exports$1.Ajv = Ajv2;
    module2.exports = exports$1 = Ajv2;
    module2.exports.Ajv = Ajv2;
    Object.defineProperty(exports$1, "__esModule", { value: true });
    exports$1.default = Ajv2;
    var validate_1 = requireValidate$1();
    Object.defineProperty(exports$1, "KeywordCxt", { enumerable: true, get: function() {
      return validate_1.KeywordCxt;
    } });
    var codegen_1 = requireCodegen$1();
    Object.defineProperty(exports$1, "_", { enumerable: true, get: function() {
      return codegen_1._;
    } });
    Object.defineProperty(exports$1, "str", { enumerable: true, get: function() {
      return codegen_1.str;
    } });
    Object.defineProperty(exports$1, "stringify", { enumerable: true, get: function() {
      return codegen_1.stringify;
    } });
    Object.defineProperty(exports$1, "nil", { enumerable: true, get: function() {
      return codegen_1.nil;
    } });
    Object.defineProperty(exports$1, "Name", { enumerable: true, get: function() {
      return codegen_1.Name;
    } });
    Object.defineProperty(exports$1, "CodeGen", { enumerable: true, get: function() {
      return codegen_1.CodeGen;
    } });
    var validation_error_1 = requireValidation_error$1();
    Object.defineProperty(exports$1, "ValidationError", { enumerable: true, get: function() {
      return validation_error_1.default;
    } });
    var ref_error_1 = requireRef_error$1();
    Object.defineProperty(exports$1, "MissingRefError", { enumerable: true, get: function() {
      return ref_error_1.default;
    } });
  })(ajv$1, ajv$1.exports);
  return ajv$1.exports;
}
function requireFormats() {
  if (hasRequiredFormats) return formats2;
  hasRequiredFormats = 1;
  (function(exports$1) {
    Object.defineProperty(exports$1, "__esModule", { value: true });
    exports$1.formatNames = exports$1.fastFormats = exports$1.fullFormats = void 0;
    function fmtDef(validate2, compare2) {
      return { validate: validate2, compare: compare2 };
    }
    exports$1.fullFormats = {
      date: fmtDef(date2, compareDate),
      time: fmtDef(getTime(true), compareTime),
      "date-time": fmtDef(getDateTime(true), compareDateTime),
      "iso-time": fmtDef(getTime(), compareIsoTime),
      "iso-date-time": fmtDef(getDateTime(), compareIsoDateTime),
      duration: /^P(?!$)((\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)?|(\d+W)?)$/,
      uri: uri2,
      "uri-reference": /^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'"()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\?(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,
      "uri-template": /^(?:(?:[^\x00-\x20"'<>%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i,
      url: /^(?:https?|ftp):\/\/(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)(?:\.(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)*(?:\.(?:[a-z\u{00a1}-\u{ffff}]{2,})))(?::\d{2,5})?(?:\/[^\s]*)?$/iu,
      email: /^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i,
      hostname: /^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i,
      ipv4: /^(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)$/,
      ipv6: /^((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))$/i,
      regex: regex2,
      uuid: /^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,
      "json-pointer": /^(?:\/(?:[^~/]|~0|~1)*)*$/,
      "json-pointer-uri-fragment": /^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,
      "relative-json-pointer": /^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/,
      byte,
      int32: { type: "number", validate: validateInt32 },
      int64: { type: "number", validate: validateInt64 },
      float: { type: "number", validate: validateNumber },
      double: { type: "number", validate: validateNumber },
      password: true,
      binary: true
    };
    exports$1.fastFormats = {
      ...exports$1.fullFormats,
      date: fmtDef(/^\d\d\d\d-[0-1]\d-[0-3]\d$/, compareDate),
      time: fmtDef(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i, compareTime),
      "date-time": fmtDef(/^\d\d\d\d-[0-1]\d-[0-3]\dt(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i, compareDateTime),
      "iso-time": fmtDef(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i, compareIsoTime),
      "iso-date-time": fmtDef(/^\d\d\d\d-[0-1]\d-[0-3]\d[t\s](?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i, compareIsoDateTime),
      uri: /^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/)?[^\s]*$/i,
      "uri-reference": /^(?:(?:[a-z][a-z0-9+\-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i,
      email: /^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i
    };
    exports$1.formatNames = Object.keys(exports$1.fullFormats);
    function isLeapYear(year) {
      return year % 4 === 0 && (year % 100 !== 0 || year % 400 === 0);
    }
    const DATE = /^(\d\d\d\d)-(\d\d)-(\d\d)$/;
    const DAYS = [0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
    function date2(str) {
      const matches = DATE.exec(str);
      if (!matches)
        return false;
      const year = +matches[1];
      const month = +matches[2];
      const day = +matches[3];
      return month >= 1 && month <= 12 && day >= 1 && day <= (month === 2 && isLeapYear(year) ? 29 : DAYS[month]);
    }
    function compareDate(d1, d2) {
      if (!(d1 && d2))
        return void 0;
      if (d1 > d2)
        return 1;
      if (d1 < d2)
        return -1;
      return 0;
    }
    const TIME = /^(\d\d):(\d\d):(\d\d(?:\.\d+)?)(z|([+-])(\d\d)(?::?(\d\d))?)?$/i;
    function getTime(strictTimeZone) {
      return function time2(str) {
        const matches = TIME.exec(str);
        if (!matches)
          return false;
        const hr2 = +matches[1];
        const min = +matches[2];
        const sec = +matches[3];
        const tz = matches[4];
        const tzSign = matches[5] === "-" ? -1 : 1;
        const tzH = +(matches[6] || 0);
        const tzM = +(matches[7] || 0);
        if (tzH > 23 || tzM > 59 || strictTimeZone && !tz)
          return false;
        if (hr2 <= 23 && min <= 59 && sec < 60)
          return true;
        const utcMin = min - tzM * tzSign;
        const utcHr = hr2 - tzH * tzSign - (utcMin < 0 ? 1 : 0);
        return (utcHr === 23 || utcHr === -1) && (utcMin === 59 || utcMin === -1) && sec < 61;
      };
    }
    function compareTime(s1, s2) {
      if (!(s1 && s2))
        return void 0;
      const t1 = (/* @__PURE__ */ new Date("2020-01-01T" + s1)).valueOf();
      const t2 = (/* @__PURE__ */ new Date("2020-01-01T" + s2)).valueOf();
      if (!(t1 && t2))
        return void 0;
      return t1 - t2;
    }
    function compareIsoTime(t1, t2) {
      if (!(t1 && t2))
        return void 0;
      const a1 = TIME.exec(t1);
      const a2 = TIME.exec(t2);
      if (!(a1 && a2))
        return void 0;
      t1 = a1[1] + a1[2] + a1[3];
      t2 = a2[1] + a2[2] + a2[3];
      if (t1 > t2)
        return 1;
      if (t1 < t2)
        return -1;
      return 0;
    }
    const DATE_TIME_SEPARATOR = /t|\s/i;
    function getDateTime(strictTimeZone) {
      const time2 = getTime(strictTimeZone);
      return function date_time(str) {
        const dateTime = str.split(DATE_TIME_SEPARATOR);
        return dateTime.length === 2 && date2(dateTime[0]) && time2(dateTime[1]);
      };
    }
    function compareDateTime(dt1, dt2) {
      if (!(dt1 && dt2))
        return void 0;
      const d1 = new Date(dt1).valueOf();
      const d2 = new Date(dt2).valueOf();
      if (!(d1 && d2))
        return void 0;
      return d1 - d2;
    }
    function compareIsoDateTime(dt1, dt2) {
      if (!(dt1 && dt2))
        return void 0;
      const [d1, t1] = dt1.split(DATE_TIME_SEPARATOR);
      const [d2, t2] = dt2.split(DATE_TIME_SEPARATOR);
      const res = compareDate(d1, d2);
      if (res === void 0)
        return void 0;
      return res || compareTime(t1, t2);
    }
    const NOT_URI_FRAGMENT = /\/|:/;
    const URI = /^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\?(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i;
    function uri2(str) {
      return NOT_URI_FRAGMENT.test(str) && URI.test(str);
    }
    const BYTE = /^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/gm;
    function byte(str) {
      BYTE.lastIndex = 0;
      return BYTE.test(str);
    }
    const MIN_INT32 = -2147483648;
    const MAX_INT32 = 2 ** 31 - 1;
    function validateInt32(value) {
      return Number.isInteger(value) && value <= MAX_INT32 && value >= MIN_INT32;
    }
    function validateInt64(value) {
      return Number.isInteger(value);
    }
    function validateNumber() {
      return true;
    }
    const Z_ANCHOR = /[^\\]\\Z/;
    function regex2(str) {
      if (Z_ANCHOR.test(str))
        return false;
      try {
        new RegExp(str);
        return true;
      } catch (e) {
        return false;
      }
    }
  })(formats2);
  return formats2;
}
function requireCode$2() {
  if (hasRequiredCode$2) return code$2;
  hasRequiredCode$2 = 1;
  (function(exports$1) {
    Object.defineProperty(exports$1, "__esModule", { value: true });
    exports$1.regexpCode = exports$1.getEsmExportName = exports$1.getProperty = exports$1.safeStringify = exports$1.stringify = exports$1.strConcat = exports$1.addCodeArg = exports$1.str = exports$1._ = exports$1.nil = exports$1._Code = exports$1.Name = exports$1.IDENTIFIER = exports$1._CodeOrName = void 0;
    class _CodeOrName {
    }
    exports$1._CodeOrName = _CodeOrName;
    exports$1.IDENTIFIER = /^[a-z$_][a-z$_0-9]*$/i;
    class Name3 extends _CodeOrName {
      constructor(s) {
        super();
        if (!exports$1.IDENTIFIER.test(s))
          throw new Error("CodeGen: name must be a valid identifier");
        this.str = s;
      }
      toString() {
        return this.str;
      }
      emptyStr() {
        return false;
      }
      get names() {
        return { [this.str]: 1 };
      }
    }
    exports$1.Name = Name3;
    class _Code extends _CodeOrName {
      constructor(code2) {
        super();
        this._items = typeof code2 === "string" ? [code2] : code2;
      }
      toString() {
        return this.str;
      }
      emptyStr() {
        if (this._items.length > 1)
          return false;
        const item = this._items[0];
        return item === "" || item === '""';
      }
      get str() {
        var _a4;
        return (_a4 = this._str) !== null && _a4 !== void 0 ? _a4 : this._str = this._items.reduce((s, c) => `${s}${c}`, "");
      }
      get names() {
        var _a4;
        return (_a4 = this._names) !== null && _a4 !== void 0 ? _a4 : this._names = this._items.reduce((names3, c) => {
          if (c instanceof Name3)
            names3[c.str] = (names3[c.str] || 0) + 1;
          return names3;
        }, {});
      }
    }
    exports$1._Code = _Code;
    exports$1.nil = new _Code("");
    function _(strs, ...args2) {
      const code2 = [strs[0]];
      let i = 0;
      while (i < args2.length) {
        addCodeArg(code2, args2[i]);
        code2.push(strs[++i]);
      }
      return new _Code(code2);
    }
    exports$1._ = _;
    const plus = new _Code("+");
    function str(strs, ...args2) {
      const expr = [safeStringify(strs[0])];
      let i = 0;
      while (i < args2.length) {
        expr.push(plus);
        addCodeArg(expr, args2[i]);
        expr.push(plus, safeStringify(strs[++i]));
      }
      optimize(expr);
      return new _Code(expr);
    }
    exports$1.str = str;
    function addCodeArg(code2, arg) {
      if (arg instanceof _Code)
        code2.push(...arg._items);
      else if (arg instanceof Name3)
        code2.push(arg);
      else
        code2.push(interpolate(arg));
    }
    exports$1.addCodeArg = addCodeArg;
    function optimize(expr) {
      let i = 1;
      while (i < expr.length - 1) {
        if (expr[i] === plus) {
          const res = mergeExprItems(expr[i - 1], expr[i + 1]);
          if (res !== void 0) {
            expr.splice(i - 1, 3, res);
            continue;
          }
          expr[i++] = "+";
        }
        i++;
      }
    }
    function mergeExprItems(a, b) {
      if (b === '""')
        return a;
      if (a === '""')
        return b;
      if (typeof a == "string") {
        if (b instanceof Name3 || a[a.length - 1] !== '"')
          return;
        if (typeof b != "string")
          return `${a.slice(0, -1)}${b}"`;
        if (b[0] === '"')
          return a.slice(0, -1) + b.slice(1);
        return;
      }
      if (typeof b == "string" && b[0] === '"' && !(a instanceof Name3))
        return `"${a}${b.slice(1)}`;
      return;
    }
    function strConcat(c1, c2) {
      return c2.emptyStr() ? c1 : c1.emptyStr() ? c2 : str`${c1}${c2}`;
    }
    exports$1.strConcat = strConcat;
    function interpolate(x) {
      return typeof x == "number" || typeof x == "boolean" || x === null ? x : safeStringify(Array.isArray(x) ? x.join(",") : x);
    }
    function stringify2(x) {
      return new _Code(safeStringify(x));
    }
    exports$1.stringify = stringify2;
    function safeStringify(x) {
      return JSON.stringify(x).replace(/\u2028/g, "\\u2028").replace(/\u2029/g, "\\u2029");
    }
    exports$1.safeStringify = safeStringify;
    function getProperty(key) {
      return typeof key == "string" && exports$1.IDENTIFIER.test(key) ? new _Code(`.${key}`) : _`[${key}]`;
    }
    exports$1.getProperty = getProperty;
    function getEsmExportName(key) {
      if (typeof key == "string" && exports$1.IDENTIFIER.test(key)) {
        return new _Code(`${key}`);
      }
      throw new Error(`CodeGen: invalid export name: ${key}, use explicit $id name mapping`);
    }
    exports$1.getEsmExportName = getEsmExportName;
    function regexpCode(rx) {
      return new _Code(rx.toString());
    }
    exports$1.regexpCode = regexpCode;
  })(code$2);
  return code$2;
}
function requireScope$1() {
  if (hasRequiredScope$1) return scope$1;
  hasRequiredScope$1 = 1;
  (function(exports$1) {
    Object.defineProperty(exports$1, "__esModule", { value: true });
    exports$1.ValueScope = exports$1.ValueScopeName = exports$1.Scope = exports$1.varKinds = exports$1.UsedValueState = void 0;
    const code_1 = requireCode$2();
    class ValueError extends Error {
      constructor(name) {
        super(`CodeGen: "code" for ${name} not defined`);
        this.value = name.value;
      }
    }
    var UsedValueState;
    (function(UsedValueState2) {
      UsedValueState2[UsedValueState2["Started"] = 0] = "Started";
      UsedValueState2[UsedValueState2["Completed"] = 1] = "Completed";
    })(UsedValueState || (exports$1.UsedValueState = UsedValueState = {}));
    exports$1.varKinds = {
      const: new code_1.Name("const"),
      let: new code_1.Name("let"),
      var: new code_1.Name("var")
    };
    class Scope3 {
      constructor({ prefixes, parent } = {}) {
        this._names = {};
        this._prefixes = prefixes;
        this._parent = parent;
      }
      toName(nameOrPrefix) {
        return nameOrPrefix instanceof code_1.Name ? nameOrPrefix : this.name(nameOrPrefix);
      }
      name(prefix) {
        return new code_1.Name(this._newName(prefix));
      }
      _newName(prefix) {
        const ng = this._names[prefix] || this._nameGroup(prefix);
        return `${prefix}${ng.index++}`;
      }
      _nameGroup(prefix) {
        var _a4, _b2;
        if (((_b2 = (_a4 = this._parent) === null || _a4 === void 0 ? void 0 : _a4._prefixes) === null || _b2 === void 0 ? void 0 : _b2.has(prefix)) || this._prefixes && !this._prefixes.has(prefix)) {
          throw new Error(`CodeGen: prefix "${prefix}" is not allowed in this scope`);
        }
        return this._names[prefix] = { prefix, index: 0 };
      }
    }
    exports$1.Scope = Scope3;
    class ValueScopeName extends code_1.Name {
      constructor(prefix, nameStr) {
        super(nameStr);
        this.prefix = prefix;
      }
      setValue(value, { property, itemIndex }) {
        this.value = value;
        this.scopePath = (0, code_1._)`.${new code_1.Name(property)}[${itemIndex}]`;
      }
    }
    exports$1.ValueScopeName = ValueScopeName;
    const line = (0, code_1._)`\n`;
    class ValueScope extends Scope3 {
      constructor(opts) {
        super(opts);
        this._values = {};
        this._scope = opts.scope;
        this.opts = { ...opts, _n: opts.lines ? line : code_1.nil };
      }
      get() {
        return this._scope;
      }
      name(prefix) {
        return new ValueScopeName(prefix, this._newName(prefix));
      }
      value(nameOrPrefix, value) {
        var _a4;
        if (value.ref === void 0)
          throw new Error("CodeGen: ref must be passed in value");
        const name = this.toName(nameOrPrefix);
        const { prefix } = name;
        const valueKey = (_a4 = value.key) !== null && _a4 !== void 0 ? _a4 : value.ref;
        let vs = this._values[prefix];
        if (vs) {
          const _name = vs.get(valueKey);
          if (_name)
            return _name;
        } else {
          vs = this._values[prefix] = /* @__PURE__ */ new Map();
        }
        vs.set(valueKey, name);
        const s = this._scope[prefix] || (this._scope[prefix] = []);
        const itemIndex = s.length;
        s[itemIndex] = value.ref;
        name.setValue(value, { property: prefix, itemIndex });
        return name;
      }
      getValue(prefix, keyOrRef) {
        const vs = this._values[prefix];
        if (!vs)
          return;
        return vs.get(keyOrRef);
      }
      scopeRefs(scopeName, values = this._values) {
        return this._reduceValues(values, (name) => {
          if (name.scopePath === void 0)
            throw new Error(`CodeGen: name "${name}" has no value`);
          return (0, code_1._)`${scopeName}${name.scopePath}`;
        });
      }
      scopeCode(values = this._values, usedValues, getCode) {
        return this._reduceValues(values, (name) => {
          if (name.value === void 0)
            throw new Error(`CodeGen: name "${name}" has no value`);
          return name.value.code;
        }, usedValues, getCode);
      }
      _reduceValues(values, valueCode, usedValues = {}, getCode) {
        let code2 = code_1.nil;
        for (const prefix in values) {
          const vs = values[prefix];
          if (!vs)
            continue;
          const nameSet = usedValues[prefix] = usedValues[prefix] || /* @__PURE__ */ new Map();
          vs.forEach((name) => {
            if (nameSet.has(name))
              return;
            nameSet.set(name, UsedValueState.Started);
            let c = valueCode(name);
            if (c) {
              const def2 = this.opts.es5 ? exports$1.varKinds.var : exports$1.varKinds.const;
              code2 = (0, code_1._)`${code2}${def2} ${name} = ${c};${this.opts._n}`;
            } else if (c = getCode === null || getCode === void 0 ? void 0 : getCode(name)) {
              code2 = (0, code_1._)`${code2}${c}${this.opts._n}`;
            } else {
              throw new ValueError(name);
            }
            nameSet.set(name, UsedValueState.Completed);
          });
        }
        return code2;
      }
    }
    exports$1.ValueScope = ValueScope;
  })(scope$1);
  return scope$1;
}
function requireCodegen() {
  if (hasRequiredCodegen) return codegen;
  hasRequiredCodegen = 1;
  (function(exports$1) {
    Object.defineProperty(exports$1, "__esModule", { value: true });
    exports$1.or = exports$1.and = exports$1.not = exports$1.CodeGen = exports$1.operators = exports$1.varKinds = exports$1.ValueScopeName = exports$1.ValueScope = exports$1.Scope = exports$1.Name = exports$1.regexpCode = exports$1.stringify = exports$1.getProperty = exports$1.nil = exports$1.strConcat = exports$1.str = exports$1._ = void 0;
    const code_1 = requireCode$2();
    const scope_1 = requireScope$1();
    var code_2 = requireCode$2();
    Object.defineProperty(exports$1, "_", { enumerable: true, get: function() {
      return code_2._;
    } });
    Object.defineProperty(exports$1, "str", { enumerable: true, get: function() {
      return code_2.str;
    } });
    Object.defineProperty(exports$1, "strConcat", { enumerable: true, get: function() {
      return code_2.strConcat;
    } });
    Object.defineProperty(exports$1, "nil", { enumerable: true, get: function() {
      return code_2.nil;
    } });
    Object.defineProperty(exports$1, "getProperty", { enumerable: true, get: function() {
      return code_2.getProperty;
    } });
    Object.defineProperty(exports$1, "stringify", { enumerable: true, get: function() {
      return code_2.stringify;
    } });
    Object.defineProperty(exports$1, "regexpCode", { enumerable: true, get: function() {
      return code_2.regexpCode;
    } });
    Object.defineProperty(exports$1, "Name", { enumerable: true, get: function() {
      return code_2.Name;
    } });
    var scope_2 = requireScope$1();
    Object.defineProperty(exports$1, "Scope", { enumerable: true, get: function() {
      return scope_2.Scope;
    } });
    Object.defineProperty(exports$1, "ValueScope", { enumerable: true, get: function() {
      return scope_2.ValueScope;
    } });
    Object.defineProperty(exports$1, "ValueScopeName", { enumerable: true, get: function() {
      return scope_2.ValueScopeName;
    } });
    Object.defineProperty(exports$1, "varKinds", { enumerable: true, get: function() {
      return scope_2.varKinds;
    } });
    exports$1.operators = {
      GT: new code_1._Code(">"),
      GTE: new code_1._Code(">="),
      LT: new code_1._Code("<"),
      LTE: new code_1._Code("<="),
      EQ: new code_1._Code("==="),
      NEQ: new code_1._Code("!=="),
      NOT: new code_1._Code("!"),
      OR: new code_1._Code("||"),
      AND: new code_1._Code("&&"),
      ADD: new code_1._Code("+")
    };
    class Node4 {
      optimizeNodes() {
        return this;
      }
      optimizeNames(_names, _constants) {
        return this;
      }
    }
    class Def extends Node4 {
      constructor(varKind, name, rhs) {
        super();
        this.varKind = varKind;
        this.name = name;
        this.rhs = rhs;
      }
      render({ es5, _n }) {
        const varKind = es5 ? scope_1.varKinds.var : this.varKind;
        const rhs = this.rhs === void 0 ? "" : ` = ${this.rhs}`;
        return `${varKind} ${this.name}${rhs};` + _n;
      }
      optimizeNames(names3, constants2) {
        if (!names3[this.name.str])
          return;
        if (this.rhs)
          this.rhs = optimizeExpr(this.rhs, names3, constants2);
        return this;
      }
      get names() {
        return this.rhs instanceof code_1._CodeOrName ? this.rhs.names : {};
      }
    }
    class Assign extends Node4 {
      constructor(lhs, rhs, sideEffects) {
        super();
        this.lhs = lhs;
        this.rhs = rhs;
        this.sideEffects = sideEffects;
      }
      render({ _n }) {
        return `${this.lhs} = ${this.rhs};` + _n;
      }
      optimizeNames(names3, constants2) {
        if (this.lhs instanceof code_1.Name && !names3[this.lhs.str] && !this.sideEffects)
          return;
        this.rhs = optimizeExpr(this.rhs, names3, constants2);
        return this;
      }
      get names() {
        const names3 = this.lhs instanceof code_1.Name ? {} : { ...this.lhs.names };
        return addExprNames(names3, this.rhs);
      }
    }
    class AssignOp extends Assign {
      constructor(lhs, op, rhs, sideEffects) {
        super(lhs, rhs, sideEffects);
        this.op = op;
      }
      render({ _n }) {
        return `${this.lhs} ${this.op}= ${this.rhs};` + _n;
      }
    }
    class Label2 extends Node4 {
      constructor(label) {
        super();
        this.label = label;
        this.names = {};
      }
      render({ _n }) {
        return `${this.label}:` + _n;
      }
    }
    class Break extends Node4 {
      constructor(label) {
        super();
        this.label = label;
        this.names = {};
      }
      render({ _n }) {
        const label = this.label ? ` ${this.label}` : "";
        return `break${label};` + _n;
      }
    }
    class Throw extends Node4 {
      constructor(error) {
        super();
        this.error = error;
      }
      render({ _n }) {
        return `throw ${this.error};` + _n;
      }
      get names() {
        return this.error.names;
      }
    }
    class AnyCode extends Node4 {
      constructor(code2) {
        super();
        this.code = code2;
      }
      render({ _n }) {
        return `${this.code};` + _n;
      }
      optimizeNodes() {
        return `${this.code}` ? this : void 0;
      }
      optimizeNames(names3, constants2) {
        this.code = optimizeExpr(this.code, names3, constants2);
        return this;
      }
      get names() {
        return this.code instanceof code_1._CodeOrName ? this.code.names : {};
      }
    }
    class ParentNode extends Node4 {
      constructor(nodes = []) {
        super();
        this.nodes = nodes;
      }
      render(opts) {
        return this.nodes.reduce((code2, n) => code2 + n.render(opts), "");
      }
      optimizeNodes() {
        const { nodes } = this;
        let i = nodes.length;
        while (i--) {
          const n = nodes[i].optimizeNodes();
          if (Array.isArray(n))
            nodes.splice(i, 1, ...n);
          else if (n)
            nodes[i] = n;
          else
            nodes.splice(i, 1);
        }
        return nodes.length > 0 ? this : void 0;
      }
      optimizeNames(names3, constants2) {
        const { nodes } = this;
        let i = nodes.length;
        while (i--) {
          const n = nodes[i];
          if (n.optimizeNames(names3, constants2))
            continue;
          subtractNames(names3, n.names);
          nodes.splice(i, 1);
        }
        return nodes.length > 0 ? this : void 0;
      }
      get names() {
        return this.nodes.reduce((names3, n) => addNames(names3, n.names), {});
      }
    }
    class BlockNode extends ParentNode {
      render(opts) {
        return "{" + opts._n + super.render(opts) + "}" + opts._n;
      }
    }
    class Root extends ParentNode {
    }
    class Else extends BlockNode {
    }
    Else.kind = "else";
    class If extends BlockNode {
      constructor(condition, nodes) {
        super(nodes);
        this.condition = condition;
      }
      render(opts) {
        let code2 = `if(${this.condition})` + super.render(opts);
        if (this.else)
          code2 += "else " + this.else.render(opts);
        return code2;
      }
      optimizeNodes() {
        super.optimizeNodes();
        const cond = this.condition;
        if (cond === true)
          return this.nodes;
        let e = this.else;
        if (e) {
          const ns = e.optimizeNodes();
          e = this.else = Array.isArray(ns) ? new Else(ns) : ns;
        }
        if (e) {
          if (cond === false)
            return e instanceof If ? e : e.nodes;
          if (this.nodes.length)
            return this;
          return new If(not2(cond), e instanceof If ? [e] : e.nodes);
        }
        if (cond === false || !this.nodes.length)
          return void 0;
        return this;
      }
      optimizeNames(names3, constants2) {
        var _a4;
        this.else = (_a4 = this.else) === null || _a4 === void 0 ? void 0 : _a4.optimizeNames(names3, constants2);
        if (!(super.optimizeNames(names3, constants2) || this.else))
          return;
        this.condition = optimizeExpr(this.condition, names3, constants2);
        return this;
      }
      get names() {
        const names3 = super.names;
        addExprNames(names3, this.condition);
        if (this.else)
          addNames(names3, this.else.names);
        return names3;
      }
    }
    If.kind = "if";
    class For extends BlockNode {
    }
    For.kind = "for";
    class ForLoop extends For {
      constructor(iteration) {
        super();
        this.iteration = iteration;
      }
      render(opts) {
        return `for(${this.iteration})` + super.render(opts);
      }
      optimizeNames(names3, constants2) {
        if (!super.optimizeNames(names3, constants2))
          return;
        this.iteration = optimizeExpr(this.iteration, names3, constants2);
        return this;
      }
      get names() {
        return addNames(super.names, this.iteration.names);
      }
    }
    class ForRange extends For {
      constructor(varKind, name, from2, to) {
        super();
        this.varKind = varKind;
        this.name = name;
        this.from = from2;
        this.to = to;
      }
      render(opts) {
        const varKind = opts.es5 ? scope_1.varKinds.var : this.varKind;
        const { name, from: from2, to } = this;
        return `for(${varKind} ${name}=${from2}; ${name}<${to}; ${name}++)` + super.render(opts);
      }
      get names() {
        const names3 = addExprNames(super.names, this.from);
        return addExprNames(names3, this.to);
      }
    }
    class ForIter extends For {
      constructor(loop, varKind, name, iterable) {
        super();
        this.loop = loop;
        this.varKind = varKind;
        this.name = name;
        this.iterable = iterable;
      }
      render(opts) {
        return `for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})` + super.render(opts);
      }
      optimizeNames(names3, constants2) {
        if (!super.optimizeNames(names3, constants2))
          return;
        this.iterable = optimizeExpr(this.iterable, names3, constants2);
        return this;
      }
      get names() {
        return addNames(super.names, this.iterable.names);
      }
    }
    class Func extends BlockNode {
      constructor(name, args2, async2) {
        super();
        this.name = name;
        this.args = args2;
        this.async = async2;
      }
      render(opts) {
        const _async = this.async ? "async " : "";
        return `${_async}function ${this.name}(${this.args})` + super.render(opts);
      }
    }
    Func.kind = "func";
    class Return extends ParentNode {
      render(opts) {
        return "return " + super.render(opts);
      }
    }
    Return.kind = "return";
    class Try extends BlockNode {
      render(opts) {
        let code2 = "try" + super.render(opts);
        if (this.catch)
          code2 += this.catch.render(opts);
        if (this.finally)
          code2 += this.finally.render(opts);
        return code2;
      }
      optimizeNodes() {
        var _a4, _b2;
        super.optimizeNodes();
        (_a4 = this.catch) === null || _a4 === void 0 ? void 0 : _a4.optimizeNodes();
        (_b2 = this.finally) === null || _b2 === void 0 ? void 0 : _b2.optimizeNodes();
        return this;
      }
      optimizeNames(names3, constants2) {
        var _a4, _b2;
        super.optimizeNames(names3, constants2);
        (_a4 = this.catch) === null || _a4 === void 0 ? void 0 : _a4.optimizeNames(names3, constants2);
        (_b2 = this.finally) === null || _b2 === void 0 ? void 0 : _b2.optimizeNames(names3, constants2);
        return this;
      }
      get names() {
        const names3 = super.names;
        if (this.catch)
          addNames(names3, this.catch.names);
        if (this.finally)
          addNames(names3, this.finally.names);
        return names3;
      }
    }
    class Catch extends BlockNode {
      constructor(error) {
        super();
        this.error = error;
      }
      render(opts) {
        return `catch(${this.error})` + super.render(opts);
      }
    }
    Catch.kind = "catch";
    class Finally extends BlockNode {
      render(opts) {
        return "finally" + super.render(opts);
      }
    }
    Finally.kind = "finally";
    class CodeGen {
      constructor(extScope, opts = {}) {
        this._values = {};
        this._blockStarts = [];
        this._constants = {};
        this.opts = { ...opts, _n: opts.lines ? "\n" : "" };
        this._extScope = extScope;
        this._scope = new scope_1.Scope({ parent: extScope });
        this._nodes = [new Root()];
      }
      toString() {
        return this._root.render(this.opts);
      }
      name(prefix) {
        return this._scope.name(prefix);
      }
      scopeName(prefix) {
        return this._extScope.name(prefix);
      }
      scopeValue(prefixOrName, value) {
        const name = this._extScope.value(prefixOrName, value);
        const vs = this._values[name.prefix] || (this._values[name.prefix] = /* @__PURE__ */ new Set());
        vs.add(name);
        return name;
      }
      getScopeValue(prefix, keyOrRef) {
        return this._extScope.getValue(prefix, keyOrRef);
      }
      scopeRefs(scopeName) {
        return this._extScope.scopeRefs(scopeName, this._values);
      }
      scopeCode() {
        return this._extScope.scopeCode(this._values);
      }
      _def(varKind, nameOrPrefix, rhs, constant) {
        const name = this._scope.toName(nameOrPrefix);
        if (rhs !== void 0 && constant)
          this._constants[name.str] = rhs;
        this._leafNode(new Def(varKind, name, rhs));
        return name;
      }
      const(nameOrPrefix, rhs, _constant) {
        return this._def(scope_1.varKinds.const, nameOrPrefix, rhs, _constant);
      }
      let(nameOrPrefix, rhs, _constant) {
        return this._def(scope_1.varKinds.let, nameOrPrefix, rhs, _constant);
      }
      var(nameOrPrefix, rhs, _constant) {
        return this._def(scope_1.varKinds.var, nameOrPrefix, rhs, _constant);
      }
      assign(lhs, rhs, sideEffects) {
        return this._leafNode(new Assign(lhs, rhs, sideEffects));
      }
      add(lhs, rhs) {
        return this._leafNode(new AssignOp(lhs, exports$1.operators.ADD, rhs));
      }
      code(c) {
        if (typeof c == "function")
          c();
        else if (c !== code_1.nil)
          this._leafNode(new AnyCode(c));
        return this;
      }
      object(...keyValues) {
        const code2 = ["{"];
        for (const [key, value] of keyValues) {
          if (code2.length > 1)
            code2.push(",");
          code2.push(key);
          if (key !== value || this.opts.es5) {
            code2.push(":");
            (0, code_1.addCodeArg)(code2, value);
          }
        }
        code2.push("}");
        return new code_1._Code(code2);
      }
      if(condition, thenBody, elseBody) {
        this._blockNode(new If(condition));
        if (thenBody && elseBody) {
          this.code(thenBody).else().code(elseBody).endIf();
        } else if (thenBody) {
          this.code(thenBody).endIf();
        } else if (elseBody) {
          throw new Error('CodeGen: "else" body without "then" body');
        }
        return this;
      }
      elseIf(condition) {
        return this._elseNode(new If(condition));
      }
      else() {
        return this._elseNode(new Else());
      }
      endIf() {
        return this._endBlockNode(If, Else);
      }
      _for(node2, forBody) {
        this._blockNode(node2);
        if (forBody)
          this.code(forBody).endFor();
        return this;
      }
      for(iteration, forBody) {
        return this._for(new ForLoop(iteration), forBody);
      }
      forRange(nameOrPrefix, from2, to, forBody, varKind = this.opts.es5 ? scope_1.varKinds.var : scope_1.varKinds.let) {
        const name = this._scope.toName(nameOrPrefix);
        return this._for(new ForRange(varKind, name, from2, to), () => forBody(name));
      }
      forOf(nameOrPrefix, iterable, forBody, varKind = scope_1.varKinds.const) {
        const name = this._scope.toName(nameOrPrefix);
        if (this.opts.es5) {
          const arr = iterable instanceof code_1.Name ? iterable : this.var("_arr", iterable);
          return this.forRange("_i", 0, (0, code_1._)`${arr}.length`, (i) => {
            this.var(name, (0, code_1._)`${arr}[${i}]`);
            forBody(name);
          });
        }
        return this._for(new ForIter("of", varKind, name, iterable), () => forBody(name));
      }
      forIn(nameOrPrefix, obj, forBody, varKind = this.opts.es5 ? scope_1.varKinds.var : scope_1.varKinds.const) {
        if (this.opts.ownProperties) {
          return this.forOf(nameOrPrefix, (0, code_1._)`Object.keys(${obj})`, forBody);
        }
        const name = this._scope.toName(nameOrPrefix);
        return this._for(new ForIter("in", varKind, name, obj), () => forBody(name));
      }
      endFor() {
        return this._endBlockNode(For);
      }
      label(label) {
        return this._leafNode(new Label2(label));
      }
      break(label) {
        return this._leafNode(new Break(label));
      }
      return(value) {
        const node2 = new Return();
        this._blockNode(node2);
        this.code(value);
        if (node2.nodes.length !== 1)
          throw new Error('CodeGen: "return" should have one node');
        return this._endBlockNode(Return);
      }
      try(tryBody, catchCode, finallyCode) {
        if (!catchCode && !finallyCode)
          throw new Error('CodeGen: "try" without "catch" and "finally"');
        const node2 = new Try();
        this._blockNode(node2);
        this.code(tryBody);
        if (catchCode) {
          const error = this.name("e");
          this._currNode = node2.catch = new Catch(error);
          catchCode(error);
        }
        if (finallyCode) {
          this._currNode = node2.finally = new Finally();
          this.code(finallyCode);
        }
        return this._endBlockNode(Catch, Finally);
      }
      throw(error) {
        return this._leafNode(new Throw(error));
      }
      block(body, nodeCount) {
        this._blockStarts.push(this._nodes.length);
        if (body)
          this.code(body).endBlock(nodeCount);
        return this;
      }
      endBlock(nodeCount) {
        const len = this._blockStarts.pop();
        if (len === void 0)
          throw new Error("CodeGen: not in self-balancing block");
        const toClose = this._nodes.length - len;
        if (toClose < 0 || nodeCount !== void 0 && toClose !== nodeCount) {
          throw new Error(`CodeGen: wrong number of nodes: ${toClose} vs ${nodeCount} expected`);
        }
        this._nodes.length = len;
        return this;
      }
      func(name, args2 = code_1.nil, async2, funcBody) {
        this._blockNode(new Func(name, args2, async2));
        if (funcBody)
          this.code(funcBody).endFunc();
        return this;
      }
      endFunc() {
        return this._endBlockNode(Func);
      }
      optimize(n = 1) {
        while (n-- > 0) {
          this._root.optimizeNodes();
          this._root.optimizeNames(this._root.names, this._constants);
        }
      }
      _leafNode(node2) {
        this._currNode.nodes.push(node2);
        return this;
      }
      _blockNode(node2) {
        this._currNode.nodes.push(node2);
        this._nodes.push(node2);
      }
      _endBlockNode(N1, N2) {
        const n = this._currNode;
        if (n instanceof N1 || N2 && n instanceof N2) {
          this._nodes.pop();
          return this;
        }
        throw new Error(`CodeGen: not in block "${N2 ? `${N1.kind}/${N2.kind}` : N1.kind}"`);
      }
      _elseNode(node2) {
        const n = this._currNode;
        if (!(n instanceof If)) {
          throw new Error('CodeGen: "else" without "if"');
        }
        this._currNode = n.else = node2;
        return this;
      }
      get _root() {
        return this._nodes[0];
      }
      get _currNode() {
        const ns = this._nodes;
        return ns[ns.length - 1];
      }
      set _currNode(node2) {
        const ns = this._nodes;
        ns[ns.length - 1] = node2;
      }
    }
    exports$1.CodeGen = CodeGen;
    function addNames(names3, from2) {
      for (const n in from2)
        names3[n] = (names3[n] || 0) + (from2[n] || 0);
      return names3;
    }
    function addExprNames(names3, from2) {
      return from2 instanceof code_1._CodeOrName ? addNames(names3, from2.names) : names3;
    }
    function optimizeExpr(expr, names3, constants2) {
      if (expr instanceof code_1.Name)
        return replaceName(expr);
      if (!canOptimize(expr))
        return expr;
      return new code_1._Code(expr._items.reduce((items2, c) => {
        if (c instanceof code_1.Name)
          c = replaceName(c);
        if (c instanceof code_1._Code)
          items2.push(...c._items);
        else
          items2.push(c);
        return items2;
      }, []));
      function replaceName(n) {
        const c = constants2[n.str];
        if (c === void 0 || names3[n.str] !== 1)
          return n;
        delete names3[n.str];
        return c;
      }
      function canOptimize(e) {
        return e instanceof code_1._Code && e._items.some((c) => c instanceof code_1.Name && names3[c.str] === 1 && constants2[c.str] !== void 0);
      }
    }
    function subtractNames(names3, from2) {
      for (const n in from2)
        names3[n] = (names3[n] || 0) - (from2[n] || 0);
    }
    function not2(x) {
      return typeof x == "boolean" || typeof x == "number" || x === null ? !x : (0, code_1._)`!${par(x)}`;
    }
    exports$1.not = not2;
    const andCode = mappend(exports$1.operators.AND);
    function and(...args2) {
      return args2.reduce(andCode);
    }
    exports$1.and = and;
    const orCode = mappend(exports$1.operators.OR);
    function or(...args2) {
      return args2.reduce(orCode);
    }
    exports$1.or = or;
    function mappend(op) {
      return (x, y) => x === code_1.nil ? y : y === code_1.nil ? x : (0, code_1._)`${par(x)} ${op} ${par(y)}`;
    }
    function par(x) {
      return x instanceof code_1.Name ? x : (0, code_1._)`(${x})`;
    }
  })(codegen);
  return codegen;
}
function requireUtil$3() {
  if (hasRequiredUtil$3) return util$3;
  hasRequiredUtil$3 = 1;
  Object.defineProperty(util$3, "__esModule", { value: true });
  util$3.checkStrictMode = util$3.getErrorPath = util$3.Type = util$3.useFunc = util$3.setEvaluated = util$3.evaluatedPropsToName = util$3.mergeEvaluated = util$3.eachItem = util$3.unescapeJsonPointer = util$3.escapeJsonPointer = util$3.escapeFragment = util$3.unescapeFragment = util$3.schemaRefOrVal = util$3.schemaHasRulesButRef = util$3.schemaHasRules = util$3.checkUnknownRules = util$3.alwaysValidSchema = util$3.toHash = void 0;
  const codegen_1 = requireCodegen();
  const code_1 = requireCode$2();
  function toHash(arr) {
    const hash = {};
    for (const item of arr)
      hash[item] = true;
    return hash;
  }
  util$3.toHash = toHash;
  function alwaysValidSchema(it, schema) {
    if (typeof schema == "boolean")
      return schema;
    if (Object.keys(schema).length === 0)
      return true;
    checkUnknownRules(it, schema);
    return !schemaHasRules(schema, it.self.RULES.all);
  }
  util$3.alwaysValidSchema = alwaysValidSchema;
  function checkUnknownRules(it, schema = it.schema) {
    const { opts, self: self2 } = it;
    if (!opts.strictSchema)
      return;
    if (typeof schema === "boolean")
      return;
    const rules2 = self2.RULES.keywords;
    for (const key in schema) {
      if (!rules2[key])
        checkStrictMode(it, `unknown keyword: "${key}"`);
    }
  }
  util$3.checkUnknownRules = checkUnknownRules;
  function schemaHasRules(schema, rules2) {
    if (typeof schema == "boolean")
      return !schema;
    for (const key in schema)
      if (rules2[key])
        return true;
    return false;
  }
  util$3.schemaHasRules = schemaHasRules;
  function schemaHasRulesButRef(schema, RULES) {
    if (typeof schema == "boolean")
      return !schema;
    for (const key in schema)
      if (key !== "$ref" && RULES.all[key])
        return true;
    return false;
  }
  util$3.schemaHasRulesButRef = schemaHasRulesButRef;
  function schemaRefOrVal({ topSchemaRef, schemaPath }, schema, keyword2, $data) {
    if (!$data) {
      if (typeof schema == "number" || typeof schema == "boolean")
        return schema;
      if (typeof schema == "string")
        return (0, codegen_1._)`${schema}`;
    }
    return (0, codegen_1._)`${topSchemaRef}${schemaPath}${(0, codegen_1.getProperty)(keyword2)}`;
  }
  util$3.schemaRefOrVal = schemaRefOrVal;
  function unescapeFragment(str) {
    return unescapeJsonPointer(decodeURIComponent(str));
  }
  util$3.unescapeFragment = unescapeFragment;
  function escapeFragment(str) {
    return encodeURIComponent(escapeJsonPointer(str));
  }
  util$3.escapeFragment = escapeFragment;
  function escapeJsonPointer(str) {
    if (typeof str == "number")
      return `${str}`;
    return str.replace(/~/g, "~0").replace(/\//g, "~1");
  }
  util$3.escapeJsonPointer = escapeJsonPointer;
  function unescapeJsonPointer(str) {
    return str.replace(/~1/g, "/").replace(/~0/g, "~");
  }
  util$3.unescapeJsonPointer = unescapeJsonPointer;
  function eachItem(xs, f) {
    if (Array.isArray(xs)) {
      for (const x of xs)
        f(x);
    } else {
      f(xs);
    }
  }
  util$3.eachItem = eachItem;
  function makeMergeEvaluated({ mergeNames, mergeToName, mergeValues: mergeValues2, resultToName }) {
    return (gen, from2, to, toName) => {
      const res = to === void 0 ? from2 : to instanceof codegen_1.Name ? (from2 instanceof codegen_1.Name ? mergeNames(gen, from2, to) : mergeToName(gen, from2, to), to) : from2 instanceof codegen_1.Name ? (mergeToName(gen, to, from2), from2) : mergeValues2(from2, to);
      return toName === codegen_1.Name && !(res instanceof codegen_1.Name) ? resultToName(gen, res) : res;
    };
  }
  util$3.mergeEvaluated = {
    props: makeMergeEvaluated({
      mergeNames: (gen, from2, to) => gen.if((0, codegen_1._)`${to} !== true && ${from2} !== undefined`, () => {
        gen.if((0, codegen_1._)`${from2} === true`, () => gen.assign(to, true), () => gen.assign(to, (0, codegen_1._)`${to} || {}`).code((0, codegen_1._)`Object.assign(${to}, ${from2})`));
      }),
      mergeToName: (gen, from2, to) => gen.if((0, codegen_1._)`${to} !== true`, () => {
        if (from2 === true) {
          gen.assign(to, true);
        } else {
          gen.assign(to, (0, codegen_1._)`${to} || {}`);
          setEvaluated(gen, to, from2);
        }
      }),
      mergeValues: (from2, to) => from2 === true ? true : { ...from2, ...to },
      resultToName: evaluatedPropsToName
    }),
    items: makeMergeEvaluated({
      mergeNames: (gen, from2, to) => gen.if((0, codegen_1._)`${to} !== true && ${from2} !== undefined`, () => gen.assign(to, (0, codegen_1._)`${from2} === true ? true : ${to} > ${from2} ? ${to} : ${from2}`)),
      mergeToName: (gen, from2, to) => gen.if((0, codegen_1._)`${to} !== true`, () => gen.assign(to, from2 === true ? true : (0, codegen_1._)`${to} > ${from2} ? ${to} : ${from2}`)),
      mergeValues: (from2, to) => from2 === true ? true : Math.max(from2, to),
      resultToName: (gen, items2) => gen.var("items", items2)
    })
  };
  function evaluatedPropsToName(gen, ps) {
    if (ps === true)
      return gen.var("props", true);
    const props = gen.var("props", (0, codegen_1._)`{}`);
    if (ps !== void 0)
      setEvaluated(gen, props, ps);
    return props;
  }
  util$3.evaluatedPropsToName = evaluatedPropsToName;
  function setEvaluated(gen, props, ps) {
    Object.keys(ps).forEach((p) => gen.assign((0, codegen_1._)`${props}${(0, codegen_1.getProperty)(p)}`, true));
  }
  util$3.setEvaluated = setEvaluated;
  const snippets = {};
  function useFunc(gen, f) {
    return gen.scopeValue("func", {
      ref: f,
      code: snippets[f.code] || (snippets[f.code] = new code_1._Code(f.code))
    });
  }
  util$3.useFunc = useFunc;
  var Type2;
  (function(Type3) {
    Type3[Type3["Num"] = 0] = "Num";
    Type3[Type3["Str"] = 1] = "Str";
  })(Type2 || (util$3.Type = Type2 = {}));
  function getErrorPath(dataProp, dataPropType, jsPropertySyntax) {
    if (dataProp instanceof codegen_1.Name) {
      const isNumber2 = dataPropType === Type2.Num;
      return jsPropertySyntax ? isNumber2 ? (0, codegen_1._)`"[" + ${dataProp} + "]"` : (0, codegen_1._)`"['" + ${dataProp} + "']"` : isNumber2 ? (0, codegen_1._)`"/" + ${dataProp}` : (0, codegen_1._)`"/" + ${dataProp}.replace(/~/g, "~0").replace(/\\//g, "~1")`;
    }
    return jsPropertySyntax ? (0, codegen_1.getProperty)(dataProp).toString() : "/" + escapeJsonPointer(dataProp);
  }
  util$3.getErrorPath = getErrorPath;
  function checkStrictMode(it, msg, mode2 = it.opts.strictSchema) {
    if (!mode2)
      return;
    msg = `strict mode: ${msg}`;
    if (mode2 === true)
      throw new Error(msg);
    it.self.logger.warn(msg);
  }
  util$3.checkStrictMode = checkStrictMode;
  return util$3;
}
function requireNames() {
  if (hasRequiredNames) return names2;
  hasRequiredNames = 1;
  Object.defineProperty(names2, "__esModule", { value: true });
  const codegen_1 = requireCodegen();
  const names$12 = {
    data: new codegen_1.Name("data"),
    valCxt: new codegen_1.Name("valCxt"),
    instancePath: new codegen_1.Name("instancePath"),
    parentData: new codegen_1.Name("parentData"),
    parentDataProperty: new codegen_1.Name("parentDataProperty"),
    rootData: new codegen_1.Name("rootData"),
    dynamicAnchors: new codegen_1.Name("dynamicAnchors"),
    vErrors: new codegen_1.Name("vErrors"),
    errors: new codegen_1.Name("errors"),
    this: new codegen_1.Name("this"),
    self: new codegen_1.Name("self"),
    scope: new codegen_1.Name("scope"),
    json: new codegen_1.Name("json"),
    jsonPos: new codegen_1.Name("jsonPos"),
    jsonLen: new codegen_1.Name("jsonLen"),
    jsonPart: new codegen_1.Name("jsonPart")
  };
  names2.default = names$12;
  return names2;
}
function requireErrors$1() {
  if (hasRequiredErrors$1) return errors$1;
  hasRequiredErrors$1 = 1;
  (function(exports$1) {
    Object.defineProperty(exports$1, "__esModule", { value: true });
    exports$1.extendErrors = exports$1.resetErrorsCount = exports$1.reportExtraError = exports$1.reportError = exports$1.keyword$DataError = exports$1.keywordError = void 0;
    const codegen_1 = requireCodegen();
    const util_1 = requireUtil$3();
    const names_1 = requireNames();
    exports$1.keywordError = {
      message: ({ keyword: keyword2 }) => (0, codegen_1.str)`must pass "${keyword2}" keyword validation`
    };
    exports$1.keyword$DataError = {
      message: ({ keyword: keyword2, schemaType }) => schemaType ? (0, codegen_1.str)`"${keyword2}" keyword must be ${schemaType} ($data)` : (0, codegen_1.str)`"${keyword2}" keyword is invalid ($data)`
    };
    function reportError(cxt, error = exports$1.keywordError, errorPaths, overrideAllErrors) {
      const { it } = cxt;
      const { gen, compositeRule, allErrors } = it;
      const errObj = errorObjectCode(cxt, error, errorPaths);
      if (overrideAllErrors !== null && overrideAllErrors !== void 0 ? overrideAllErrors : compositeRule || allErrors) {
        addError(gen, errObj);
      } else {
        returnErrors(it, (0, codegen_1._)`[${errObj}]`);
      }
    }
    exports$1.reportError = reportError;
    function reportExtraError(cxt, error = exports$1.keywordError, errorPaths) {
      const { it } = cxt;
      const { gen, compositeRule, allErrors } = it;
      const errObj = errorObjectCode(cxt, error, errorPaths);
      addError(gen, errObj);
      if (!(compositeRule || allErrors)) {
        returnErrors(it, names_1.default.vErrors);
      }
    }
    exports$1.reportExtraError = reportExtraError;
    function resetErrorsCount(gen, errsCount) {
      gen.assign(names_1.default.errors, errsCount);
      gen.if((0, codegen_1._)`${names_1.default.vErrors} !== null`, () => gen.if(errsCount, () => gen.assign((0, codegen_1._)`${names_1.default.vErrors}.length`, errsCount), () => gen.assign(names_1.default.vErrors, null)));
    }
    exports$1.resetErrorsCount = resetErrorsCount;
    function extendErrors({ gen, keyword: keyword2, schemaValue, data: data32, errsCount, it }) {
      if (errsCount === void 0)
        throw new Error("ajv implementation error");
      const err = gen.name("err");
      gen.forRange("i", errsCount, names_1.default.errors, (i) => {
        gen.const(err, (0, codegen_1._)`${names_1.default.vErrors}[${i}]`);
        gen.if((0, codegen_1._)`${err}.instancePath === undefined`, () => gen.assign((0, codegen_1._)`${err}.instancePath`, (0, codegen_1.strConcat)(names_1.default.instancePath, it.errorPath)));
        gen.assign((0, codegen_1._)`${err}.schemaPath`, (0, codegen_1.str)`${it.errSchemaPath}/${keyword2}`);
        if (it.opts.verbose) {
          gen.assign((0, codegen_1._)`${err}.schema`, schemaValue);
          gen.assign((0, codegen_1._)`${err}.data`, data32);
        }
      });
    }
    exports$1.extendErrors = extendErrors;
    function addError(gen, errObj) {
      const err = gen.const("err", errObj);
      gen.if((0, codegen_1._)`${names_1.default.vErrors} === null`, () => gen.assign(names_1.default.vErrors, (0, codegen_1._)`[${err}]`), (0, codegen_1._)`${names_1.default.vErrors}.push(${err})`);
      gen.code((0, codegen_1._)`${names_1.default.errors}++`);
    }
    function returnErrors(it, errs) {
      const { gen, validateName, schemaEnv } = it;
      if (schemaEnv.$async) {
        gen.throw((0, codegen_1._)`new ${it.ValidationError}(${errs})`);
      } else {
        gen.assign((0, codegen_1._)`${validateName}.errors`, errs);
        gen.return(false);
      }
    }
    const E = {
      keyword: new codegen_1.Name("keyword"),
      schemaPath: new codegen_1.Name("schemaPath"),
      params: new codegen_1.Name("params"),
      propertyName: new codegen_1.Name("propertyName"),
      message: new codegen_1.Name("message"),
      schema: new codegen_1.Name("schema"),
      parentSchema: new codegen_1.Name("parentSchema")
    };
    function errorObjectCode(cxt, error, errorPaths) {
      const { createErrors } = cxt.it;
      if (createErrors === false)
        return (0, codegen_1._)`{}`;
      return errorObject(cxt, error, errorPaths);
    }
    function errorObject(cxt, error, errorPaths = {}) {
      const { gen, it } = cxt;
      const keyValues = [
        errorInstancePath(it, errorPaths),
        errorSchemaPath(cxt, errorPaths)
      ];
      extraErrorProps(cxt, error, keyValues);
      return gen.object(...keyValues);
    }
    function errorInstancePath({ errorPath }, { instancePath }) {
      const instPath = instancePath ? (0, codegen_1.str)`${errorPath}${(0, util_1.getErrorPath)(instancePath, util_1.Type.Str)}` : errorPath;
      return [names_1.default.instancePath, (0, codegen_1.strConcat)(names_1.default.instancePath, instPath)];
    }
    function errorSchemaPath({ keyword: keyword2, it: { errSchemaPath } }, { schemaPath, parentSchema }) {
      let schPath = parentSchema ? errSchemaPath : (0, codegen_1.str)`${errSchemaPath}/${keyword2}`;
      if (schemaPath) {
        schPath = (0, codegen_1.str)`${schPath}${(0, util_1.getErrorPath)(schemaPath, util_1.Type.Str)}`;
      }
      return [E.schemaPath, schPath];
    }
    function extraErrorProps(cxt, { params, message }, keyValues) {
      const { keyword: keyword2, data: data32, schemaValue, it } = cxt;
      const { opts, propertyName, topSchemaRef, schemaPath } = it;
      keyValues.push([E.keyword, keyword2], [E.params, typeof params == "function" ? params(cxt) : params || (0, codegen_1._)`{}`]);
      if (opts.messages) {
        keyValues.push([E.message, typeof message == "function" ? message(cxt) : message]);
      }
      if (opts.verbose) {
        keyValues.push([E.schema, schemaValue], [E.parentSchema, (0, codegen_1._)`${topSchemaRef}${schemaPath}`], [names_1.default.data, data32]);
      }
      if (propertyName)
        keyValues.push([E.propertyName, propertyName]);
    }
  })(errors$1);
  return errors$1;
}
function requireBoolSchema() {
  if (hasRequiredBoolSchema) return boolSchema;
  hasRequiredBoolSchema = 1;
  Object.defineProperty(boolSchema, "__esModule", { value: true });
  boolSchema.boolOrEmptySchema = boolSchema.topBoolOrEmptySchema = void 0;
  const errors_1 = requireErrors$1();
  const codegen_1 = requireCodegen();
  const names_1 = requireNames();
  const boolError = {
    message: "boolean schema is false"
  };
  function topBoolOrEmptySchema(it) {
    const { gen, schema, validateName } = it;
    if (schema === false) {
      falseSchemaError(it, false);
    } else if (typeof schema == "object" && schema.$async === true) {
      gen.return(names_1.default.data);
    } else {
      gen.assign((0, codegen_1._)`${validateName}.errors`, null);
      gen.return(true);
    }
  }
  boolSchema.topBoolOrEmptySchema = topBoolOrEmptySchema;
  function boolOrEmptySchema(it, valid2) {
    const { gen, schema } = it;
    if (schema === false) {
      gen.var(valid2, false);
      falseSchemaError(it);
    } else {
      gen.var(valid2, true);
    }
  }
  boolSchema.boolOrEmptySchema = boolOrEmptySchema;
  function falseSchemaError(it, overrideAllErrors) {
    const { gen, data: data32 } = it;
    const cxt = {
      gen,
      keyword: "false schema",
      data: data32,
      schema: false,
      schemaCode: false,
      schemaValue: false,
      params: {},
      it
    };
    (0, errors_1.reportError)(cxt, boolError, void 0, overrideAllErrors);
  }
  return boolSchema;
}
function requireRules() {
  if (hasRequiredRules) return rules;
  hasRequiredRules = 1;
  Object.defineProperty(rules, "__esModule", { value: true });
  rules.getRules = rules.isJSONType = void 0;
  const _jsonTypes = ["string", "number", "integer", "boolean", "null", "object", "array"];
  const jsonTypes = new Set(_jsonTypes);
  function isJSONType(x) {
    return typeof x == "string" && jsonTypes.has(x);
  }
  rules.isJSONType = isJSONType;
  function getRules() {
    const groups = {
      number: { type: "number", rules: [] },
      string: { type: "string", rules: [] },
      array: { type: "array", rules: [] },
      object: { type: "object", rules: [] }
    };
    return {
      types: { ...groups, integer: true, boolean: true, null: true },
      rules: [{ rules: [] }, groups.number, groups.string, groups.array, groups.object],
      post: { rules: [] },
      all: {},
      keywords: {}
    };
  }
  rules.getRules = getRules;
  return rules;
}
function requireApplicability() {
  if (hasRequiredApplicability) return applicability;
  hasRequiredApplicability = 1;
  Object.defineProperty(applicability, "__esModule", { value: true });
  applicability.shouldUseRule = applicability.shouldUseGroup = applicability.schemaHasRulesForType = void 0;
  function schemaHasRulesForType({ schema, self: self2 }, type2) {
    const group = self2.RULES.types[type2];
    return group && group !== true && shouldUseGroup(schema, group);
  }
  applicability.schemaHasRulesForType = schemaHasRulesForType;
  function shouldUseGroup(schema, group) {
    return group.rules.some((rule) => shouldUseRule(schema, rule));
  }
  applicability.shouldUseGroup = shouldUseGroup;
  function shouldUseRule(schema, rule) {
    var _a4;
    return schema[rule.keyword] !== void 0 || ((_a4 = rule.definition.implements) === null || _a4 === void 0 ? void 0 : _a4.some((kwd) => schema[kwd] !== void 0));
  }
  applicability.shouldUseRule = shouldUseRule;
  return applicability;
}
function requireDataType() {
  if (hasRequiredDataType) return dataType;
  hasRequiredDataType = 1;
  Object.defineProperty(dataType, "__esModule", { value: true });
  dataType.reportTypeError = dataType.checkDataTypes = dataType.checkDataType = dataType.coerceAndCheckDataType = dataType.getJSONTypes = dataType.getSchemaTypes = dataType.DataType = void 0;
  const rules_1 = requireRules();
  const applicability_1 = requireApplicability();
  const errors_1 = requireErrors$1();
  const codegen_1 = requireCodegen();
  const util_1 = requireUtil$3();
  var DataType;
  (function(DataType2) {
    DataType2[DataType2["Correct"] = 0] = "Correct";
    DataType2[DataType2["Wrong"] = 1] = "Wrong";
  })(DataType || (dataType.DataType = DataType = {}));
  function getSchemaTypes(schema) {
    const types2 = getJSONTypes(schema.type);
    const hasNull = types2.includes("null");
    if (hasNull) {
      if (schema.nullable === false)
        throw new Error("type: null contradicts nullable: false");
    } else {
      if (!types2.length && schema.nullable !== void 0) {
        throw new Error('"nullable" cannot be used without "type"');
      }
      if (schema.nullable === true)
        types2.push("null");
    }
    return types2;
  }
  dataType.getSchemaTypes = getSchemaTypes;
  function getJSONTypes(ts) {
    const types2 = Array.isArray(ts) ? ts : ts ? [ts] : [];
    if (types2.every(rules_1.isJSONType))
      return types2;
    throw new Error("type must be JSONType or JSONType[]: " + types2.join(","));
  }
  dataType.getJSONTypes = getJSONTypes;
  function coerceAndCheckDataType(it, types2) {
    const { gen, data: data32, opts } = it;
    const coerceTo = coerceToTypes(types2, opts.coerceTypes);
    const checkTypes = types2.length > 0 && !(coerceTo.length === 0 && types2.length === 1 && (0, applicability_1.schemaHasRulesForType)(it, types2[0]));
    if (checkTypes) {
      const wrongType = checkDataTypes(types2, data32, opts.strictNumbers, DataType.Wrong);
      gen.if(wrongType, () => {
        if (coerceTo.length)
          coerceData(it, types2, coerceTo);
        else
          reportTypeError(it);
      });
    }
    return checkTypes;
  }
  dataType.coerceAndCheckDataType = coerceAndCheckDataType;
  const COERCIBLE = /* @__PURE__ */ new Set(["string", "number", "integer", "boolean", "null"]);
  function coerceToTypes(types2, coerceTypes) {
    return coerceTypes ? types2.filter((t) => COERCIBLE.has(t) || coerceTypes === "array" && t === "array") : [];
  }
  function coerceData(it, types2, coerceTo) {
    const { gen, data: data32, opts } = it;
    const dataType2 = gen.let("dataType", (0, codegen_1._)`typeof ${data32}`);
    const coerced = gen.let("coerced", (0, codegen_1._)`undefined`);
    if (opts.coerceTypes === "array") {
      gen.if((0, codegen_1._)`${dataType2} == 'object' && Array.isArray(${data32}) && ${data32}.length == 1`, () => gen.assign(data32, (0, codegen_1._)`${data32}[0]`).assign(dataType2, (0, codegen_1._)`typeof ${data32}`).if(checkDataTypes(types2, data32, opts.strictNumbers), () => gen.assign(coerced, data32)));
    }
    gen.if((0, codegen_1._)`${coerced} !== undefined`);
    for (const t of coerceTo) {
      if (COERCIBLE.has(t) || t === "array" && opts.coerceTypes === "array") {
        coerceSpecificType(t);
      }
    }
    gen.else();
    reportTypeError(it);
    gen.endIf();
    gen.if((0, codegen_1._)`${coerced} !== undefined`, () => {
      gen.assign(data32, coerced);
      assignParentData(it, coerced);
    });
    function coerceSpecificType(t) {
      switch (t) {
        case "string":
          gen.elseIf((0, codegen_1._)`${dataType2} == "number" || ${dataType2} == "boolean"`).assign(coerced, (0, codegen_1._)`"" + ${data32}`).elseIf((0, codegen_1._)`${data32} === null`).assign(coerced, (0, codegen_1._)`""`);
          return;
        case "number":
          gen.elseIf((0, codegen_1._)`${dataType2} == "boolean" || ${data32} === null
              || (${dataType2} == "string" && ${data32} && ${data32} == +${data32})`).assign(coerced, (0, codegen_1._)`+${data32}`);
          return;
        case "integer":
          gen.elseIf((0, codegen_1._)`${dataType2} === "boolean" || ${data32} === null
              || (${dataType2} === "string" && ${data32} && ${data32} == +${data32} && !(${data32} % 1))`).assign(coerced, (0, codegen_1._)`+${data32}`);
          return;
        case "boolean":
          gen.elseIf((0, codegen_1._)`${data32} === "false" || ${data32} === 0 || ${data32} === null`).assign(coerced, false).elseIf((0, codegen_1._)`${data32} === "true" || ${data32} === 1`).assign(coerced, true);
          return;
        case "null":
          gen.elseIf((0, codegen_1._)`${data32} === "" || ${data32} === 0 || ${data32} === false`);
          gen.assign(coerced, null);
          return;
        case "array":
          gen.elseIf((0, codegen_1._)`${dataType2} === "string" || ${dataType2} === "number"
              || ${dataType2} === "boolean" || ${data32} === null`).assign(coerced, (0, codegen_1._)`[${data32}]`);
      }
    }
  }
  function assignParentData({ gen, parentData, parentDataProperty }, expr) {
    gen.if((0, codegen_1._)`${parentData} !== undefined`, () => gen.assign((0, codegen_1._)`${parentData}[${parentDataProperty}]`, expr));
  }
  function checkDataType(dataType2, data32, strictNums, correct = DataType.Correct) {
    const EQ = correct === DataType.Correct ? codegen_1.operators.EQ : codegen_1.operators.NEQ;
    let cond;
    switch (dataType2) {
      case "null":
        return (0, codegen_1._)`${data32} ${EQ} null`;
      case "array":
        cond = (0, codegen_1._)`Array.isArray(${data32})`;
        break;
      case "object":
        cond = (0, codegen_1._)`${data32} && typeof ${data32} == "object" && !Array.isArray(${data32})`;
        break;
      case "integer":
        cond = numCond((0, codegen_1._)`!(${data32} % 1) && !isNaN(${data32})`);
        break;
      case "number":
        cond = numCond();
        break;
      default:
        return (0, codegen_1._)`typeof ${data32} ${EQ} ${dataType2}`;
    }
    return correct === DataType.Correct ? cond : (0, codegen_1.not)(cond);
    function numCond(_cond = codegen_1.nil) {
      return (0, codegen_1.and)((0, codegen_1._)`typeof ${data32} == "number"`, _cond, strictNums ? (0, codegen_1._)`isFinite(${data32})` : codegen_1.nil);
    }
  }
  dataType.checkDataType = checkDataType;
  function checkDataTypes(dataTypes, data32, strictNums, correct) {
    if (dataTypes.length === 1) {
      return checkDataType(dataTypes[0], data32, strictNums, correct);
    }
    let cond;
    const types2 = (0, util_1.toHash)(dataTypes);
    if (types2.array && types2.object) {
      const notObj = (0, codegen_1._)`typeof ${data32} != "object"`;
      cond = types2.null ? notObj : (0, codegen_1._)`!${data32} || ${notObj}`;
      delete types2.null;
      delete types2.array;
      delete types2.object;
    } else {
      cond = codegen_1.nil;
    }
    if (types2.number)
      delete types2.integer;
    for (const t in types2)
      cond = (0, codegen_1.and)(cond, checkDataType(t, data32, strictNums, correct));
    return cond;
  }
  dataType.checkDataTypes = checkDataTypes;
  const typeError = {
    message: ({ schema }) => `must be ${schema}`,
    params: ({ schema, schemaValue }) => typeof schema == "string" ? (0, codegen_1._)`{type: ${schema}}` : (0, codegen_1._)`{type: ${schemaValue}}`
  };
  function reportTypeError(it) {
    const cxt = getTypeErrorContext(it);
    (0, errors_1.reportError)(cxt, typeError);
  }
  dataType.reportTypeError = reportTypeError;
  function getTypeErrorContext(it) {
    const { gen, data: data32, schema } = it;
    const schemaCode = (0, util_1.schemaRefOrVal)(it, schema, "type");
    return {
      gen,
      keyword: "type",
      data: data32,
      schema: schema.type,
      schemaCode,
      schemaValue: schemaCode,
      parentSchema: schema,
      params: {},
      it
    };
  }
  return dataType;
}
function requireDefaults() {
  if (hasRequiredDefaults) return defaults$1;
  hasRequiredDefaults = 1;
  Object.defineProperty(defaults$1, "__esModule", { value: true });
  defaults$1.assignDefaults = void 0;
  const codegen_1 = requireCodegen();
  const util_1 = requireUtil$3();
  function assignDefaults(it, ty) {
    const { properties: properties2, items: items2 } = it.schema;
    if (ty === "object" && properties2) {
      for (const key in properties2) {
        assignDefault(it, key, properties2[key].default);
      }
    } else if (ty === "array" && Array.isArray(items2)) {
      items2.forEach((sch, i) => assignDefault(it, i, sch.default));
    }
  }
  defaults$1.assignDefaults = assignDefaults;
  function assignDefault(it, prop, defaultValue) {
    const { gen, compositeRule, data: data32, opts } = it;
    if (defaultValue === void 0)
      return;
    const childData = (0, codegen_1._)`${data32}${(0, codegen_1.getProperty)(prop)}`;
    if (compositeRule) {
      (0, util_1.checkStrictMode)(it, `default is ignored for: ${childData}`);
      return;
    }
    let condition = (0, codegen_1._)`${childData} === undefined`;
    if (opts.useDefaults === "empty") {
      condition = (0, codegen_1._)`${condition} || ${childData} === null || ${childData} === ""`;
    }
    gen.if(condition, (0, codegen_1._)`${childData} = ${(0, codegen_1.stringify)(defaultValue)}`);
  }
  return defaults$1;
}
function requireCode$1() {
  if (hasRequiredCode$1) return code$1;
  hasRequiredCode$1 = 1;
  Object.defineProperty(code$1, "__esModule", { value: true });
  code$1.validateUnion = code$1.validateArray = code$1.usePattern = code$1.callValidateCode = code$1.schemaProperties = code$1.allSchemaProperties = code$1.noPropertyInData = code$1.propertyInData = code$1.isOwnProperty = code$1.hasPropFunc = code$1.reportMissingProp = code$1.checkMissingProp = code$1.checkReportMissingProp = void 0;
  const codegen_1 = requireCodegen();
  const util_1 = requireUtil$3();
  const names_1 = requireNames();
  const util_2 = requireUtil$3();
  function checkReportMissingProp(cxt, prop) {
    const { gen, data: data32, it } = cxt;
    gen.if(noPropertyInData(gen, data32, prop, it.opts.ownProperties), () => {
      cxt.setParams({ missingProperty: (0, codegen_1._)`${prop}` }, true);
      cxt.error();
    });
  }
  code$1.checkReportMissingProp = checkReportMissingProp;
  function checkMissingProp({ gen, data: data32, it: { opts } }, properties2, missing) {
    return (0, codegen_1.or)(...properties2.map((prop) => (0, codegen_1.and)(noPropertyInData(gen, data32, prop, opts.ownProperties), (0, codegen_1._)`${missing} = ${prop}`)));
  }
  code$1.checkMissingProp = checkMissingProp;
  function reportMissingProp(cxt, missing) {
    cxt.setParams({ missingProperty: missing }, true);
    cxt.error();
  }
  code$1.reportMissingProp = reportMissingProp;
  function hasPropFunc(gen) {
    return gen.scopeValue("func", {
      ref: Object.prototype.hasOwnProperty,
      code: (0, codegen_1._)`Object.prototype.hasOwnProperty`
    });
  }
  code$1.hasPropFunc = hasPropFunc;
  function isOwnProperty(gen, data32, property) {
    return (0, codegen_1._)`${hasPropFunc(gen)}.call(${data32}, ${property})`;
  }
  code$1.isOwnProperty = isOwnProperty;
  function propertyInData(gen, data32, property, ownProperties) {
    const cond = (0, codegen_1._)`${data32}${(0, codegen_1.getProperty)(property)} !== undefined`;
    return ownProperties ? (0, codegen_1._)`${cond} && ${isOwnProperty(gen, data32, property)}` : cond;
  }
  code$1.propertyInData = propertyInData;
  function noPropertyInData(gen, data32, property, ownProperties) {
    const cond = (0, codegen_1._)`${data32}${(0, codegen_1.getProperty)(property)} === undefined`;
    return ownProperties ? (0, codegen_1.or)(cond, (0, codegen_1.not)(isOwnProperty(gen, data32, property))) : cond;
  }
  code$1.noPropertyInData = noPropertyInData;
  function allSchemaProperties(schemaMap) {
    return schemaMap ? Object.keys(schemaMap).filter((p) => p !== "__proto__") : [];
  }
  code$1.allSchemaProperties = allSchemaProperties;
  function schemaProperties(it, schemaMap) {
    return allSchemaProperties(schemaMap).filter((p) => !(0, util_1.alwaysValidSchema)(it, schemaMap[p]));
  }
  code$1.schemaProperties = schemaProperties;
  function callValidateCode({ schemaCode, data: data32, it: { gen, topSchemaRef, schemaPath, errorPath }, it }, func, context2, passSchema) {
    const dataAndSchema = passSchema ? (0, codegen_1._)`${schemaCode}, ${data32}, ${topSchemaRef}${schemaPath}` : data32;
    const valCxt = [
      [names_1.default.instancePath, (0, codegen_1.strConcat)(names_1.default.instancePath, errorPath)],
      [names_1.default.parentData, it.parentData],
      [names_1.default.parentDataProperty, it.parentDataProperty],
      [names_1.default.rootData, names_1.default.rootData]
    ];
    if (it.opts.dynamicRef)
      valCxt.push([names_1.default.dynamicAnchors, names_1.default.dynamicAnchors]);
    const args2 = (0, codegen_1._)`${dataAndSchema}, ${gen.object(...valCxt)}`;
    return context2 !== codegen_1.nil ? (0, codegen_1._)`${func}.call(${context2}, ${args2})` : (0, codegen_1._)`${func}(${args2})`;
  }
  code$1.callValidateCode = callValidateCode;
  const newRegExp = (0, codegen_1._)`new RegExp`;
  function usePattern({ gen, it: { opts } }, pattern2) {
    const u = opts.unicodeRegExp ? "u" : "";
    const { regExp } = opts.code;
    const rx = regExp(pattern2, u);
    return gen.scopeValue("pattern", {
      key: rx.toString(),
      ref: rx,
      code: (0, codegen_1._)`${regExp.code === "new RegExp" ? newRegExp : (0, util_2.useFunc)(gen, regExp)}(${pattern2}, ${u})`
    });
  }
  code$1.usePattern = usePattern;
  function validateArray(cxt) {
    const { gen, data: data32, keyword: keyword2, it } = cxt;
    const valid2 = gen.name("valid");
    if (it.allErrors) {
      const validArr = gen.let("valid", true);
      validateItems(() => gen.assign(validArr, false));
      return validArr;
    }
    gen.var(valid2, true);
    validateItems(() => gen.break());
    return valid2;
    function validateItems(notValid) {
      const len = gen.const("len", (0, codegen_1._)`${data32}.length`);
      gen.forRange("i", 0, len, (i) => {
        cxt.subschema({
          keyword: keyword2,
          dataProp: i,
          dataPropType: util_1.Type.Num
        }, valid2);
        gen.if((0, codegen_1.not)(valid2), notValid);
      });
    }
  }
  code$1.validateArray = validateArray;
  function validateUnion(cxt) {
    const { gen, schema, keyword: keyword2, it } = cxt;
    if (!Array.isArray(schema))
      throw new Error("ajv implementation error");
    const alwaysValid = schema.some((sch) => (0, util_1.alwaysValidSchema)(it, sch));
    if (alwaysValid && !it.opts.unevaluated)
      return;
    const valid2 = gen.let("valid", false);
    const schValid = gen.name("_valid");
    gen.block(() => schema.forEach((_sch, i) => {
      const schCxt = cxt.subschema({
        keyword: keyword2,
        schemaProp: i,
        compositeRule: true
      }, schValid);
      gen.assign(valid2, (0, codegen_1._)`${valid2} || ${schValid}`);
      const merged = cxt.mergeValidEvaluated(schCxt, schValid);
      if (!merged)
        gen.if((0, codegen_1.not)(valid2));
    }));
    cxt.result(valid2, () => cxt.reset(), () => cxt.error(true));
  }
  code$1.validateUnion = validateUnion;
  return code$1;
}
function requireKeyword$1() {
  if (hasRequiredKeyword$1) return keyword$1;
  hasRequiredKeyword$1 = 1;
  Object.defineProperty(keyword$1, "__esModule", { value: true });
  keyword$1.validateKeywordUsage = keyword$1.validSchemaType = keyword$1.funcKeywordCode = keyword$1.macroKeywordCode = void 0;
  const codegen_1 = requireCodegen();
  const names_1 = requireNames();
  const code_1 = requireCode$1();
  const errors_1 = requireErrors$1();
  function macroKeywordCode(cxt, def2) {
    const { gen, keyword: keyword2, schema, parentSchema, it } = cxt;
    const macroSchema = def2.macro.call(it.self, schema, parentSchema, it);
    const schemaRef = useKeyword(gen, keyword2, macroSchema);
    if (it.opts.validateSchema !== false)
      it.self.validateSchema(macroSchema, true);
    const valid2 = gen.name("valid");
    cxt.subschema({
      schema: macroSchema,
      schemaPath: codegen_1.nil,
      errSchemaPath: `${it.errSchemaPath}/${keyword2}`,
      topSchemaRef: schemaRef,
      compositeRule: true
    }, valid2);
    cxt.pass(valid2, () => cxt.error(true));
  }
  keyword$1.macroKeywordCode = macroKeywordCode;
  function funcKeywordCode(cxt, def2) {
    var _a4;
    const { gen, keyword: keyword2, schema, parentSchema, $data, it } = cxt;
    checkAsyncKeyword(it, def2);
    const validate2 = !$data && def2.compile ? def2.compile.call(it.self, schema, parentSchema, it) : def2.validate;
    const validateRef = useKeyword(gen, keyword2, validate2);
    const valid2 = gen.let("valid");
    cxt.block$data(valid2, validateKeyword);
    cxt.ok((_a4 = def2.valid) !== null && _a4 !== void 0 ? _a4 : valid2);
    function validateKeyword() {
      if (def2.errors === false) {
        assignValid();
        if (def2.modifying)
          modifyData(cxt);
        reportErrs(() => cxt.error());
      } else {
        const ruleErrs = def2.async ? validateAsync() : validateSync();
        if (def2.modifying)
          modifyData(cxt);
        reportErrs(() => addErrs(cxt, ruleErrs));
      }
    }
    function validateAsync() {
      const ruleErrs = gen.let("ruleErrs", null);
      gen.try(() => assignValid((0, codegen_1._)`await `), (e) => gen.assign(valid2, false).if((0, codegen_1._)`${e} instanceof ${it.ValidationError}`, () => gen.assign(ruleErrs, (0, codegen_1._)`${e}.errors`), () => gen.throw(e)));
      return ruleErrs;
    }
    function validateSync() {
      const validateErrs = (0, codegen_1._)`${validateRef}.errors`;
      gen.assign(validateErrs, null);
      assignValid(codegen_1.nil);
      return validateErrs;
    }
    function assignValid(_await = def2.async ? (0, codegen_1._)`await ` : codegen_1.nil) {
      const passCxt = it.opts.passContext ? names_1.default.this : names_1.default.self;
      const passSchema = !("compile" in def2 && !$data || def2.schema === false);
      gen.assign(valid2, (0, codegen_1._)`${_await}${(0, code_1.callValidateCode)(cxt, validateRef, passCxt, passSchema)}`, def2.modifying);
    }
    function reportErrs(errors2) {
      var _a5;
      gen.if((0, codegen_1.not)((_a5 = def2.valid) !== null && _a5 !== void 0 ? _a5 : valid2), errors2);
    }
  }
  keyword$1.funcKeywordCode = funcKeywordCode;
  function modifyData(cxt) {
    const { gen, data: data32, it } = cxt;
    gen.if(it.parentData, () => gen.assign(data32, (0, codegen_1._)`${it.parentData}[${it.parentDataProperty}]`));
  }
  function addErrs(cxt, errs) {
    const { gen } = cxt;
    gen.if((0, codegen_1._)`Array.isArray(${errs})`, () => {
      gen.assign(names_1.default.vErrors, (0, codegen_1._)`${names_1.default.vErrors} === null ? ${errs} : ${names_1.default.vErrors}.concat(${errs})`).assign(names_1.default.errors, (0, codegen_1._)`${names_1.default.vErrors}.length`);
      (0, errors_1.extendErrors)(cxt);
    }, () => cxt.error());
  }
  function checkAsyncKeyword({ schemaEnv }, def2) {
    if (def2.async && !schemaEnv.$async)
      throw new Error("async keyword in sync schema");
  }
  function useKeyword(gen, keyword2, result) {
    if (result === void 0)
      throw new Error(`keyword "${keyword2}" failed to compile`);
    return gen.scopeValue("keyword", typeof result == "function" ? { ref: result } : { ref: result, code: (0, codegen_1.stringify)(result) });
  }
  function validSchemaType(schema, schemaType, allowUndefined = false) {
    return !schemaType.length || schemaType.some((st) => st === "array" ? Array.isArray(schema) : st === "object" ? schema && typeof schema == "object" && !Array.isArray(schema) : typeof schema == st || allowUndefined && typeof schema == "undefined");
  }
  keyword$1.validSchemaType = validSchemaType;
  function validateKeywordUsage({ schema, opts, self: self2, errSchemaPath }, def2, keyword2) {
    if (Array.isArray(def2.keyword) ? !def2.keyword.includes(keyword2) : def2.keyword !== keyword2) {
      throw new Error("ajv implementation error");
    }
    const deps18 = def2.dependencies;
    if (deps18 === null || deps18 === void 0 ? void 0 : deps18.some((kwd) => !Object.prototype.hasOwnProperty.call(schema, kwd))) {
      throw new Error(`parent schema must have dependencies of ${keyword2}: ${deps18.join(",")}`);
    }
    if (def2.validateSchema) {
      const valid2 = def2.validateSchema(schema[keyword2]);
      if (!valid2) {
        const msg = `keyword "${keyword2}" value is invalid at path "${errSchemaPath}": ` + self2.errorsText(def2.validateSchema.errors);
        if (opts.validateSchema === "log")
          self2.logger.error(msg);
        else
          throw new Error(msg);
      }
    }
  }
  keyword$1.validateKeywordUsage = validateKeywordUsage;
  return keyword$1;
}
function requireSubschema() {
  if (hasRequiredSubschema) return subschema;
  hasRequiredSubschema = 1;
  Object.defineProperty(subschema, "__esModule", { value: true });
  subschema.extendSubschemaMode = subschema.extendSubschemaData = subschema.getSubschema = void 0;
  const codegen_1 = requireCodegen();
  const util_1 = requireUtil$3();
  function getSubschema(it, { keyword: keyword2, schemaProp, schema, schemaPath, errSchemaPath, topSchemaRef }) {
    if (keyword2 !== void 0 && schema !== void 0) {
      throw new Error('both "keyword" and "schema" passed, only one allowed');
    }
    if (keyword2 !== void 0) {
      const sch = it.schema[keyword2];
      return schemaProp === void 0 ? {
        schema: sch,
        schemaPath: (0, codegen_1._)`${it.schemaPath}${(0, codegen_1.getProperty)(keyword2)}`,
        errSchemaPath: `${it.errSchemaPath}/${keyword2}`
      } : {
        schema: sch[schemaProp],
        schemaPath: (0, codegen_1._)`${it.schemaPath}${(0, codegen_1.getProperty)(keyword2)}${(0, codegen_1.getProperty)(schemaProp)}`,
        errSchemaPath: `${it.errSchemaPath}/${keyword2}/${(0, util_1.escapeFragment)(schemaProp)}`
      };
    }
    if (schema !== void 0) {
      if (schemaPath === void 0 || errSchemaPath === void 0 || topSchemaRef === void 0) {
        throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');
      }
      return {
        schema,
        schemaPath,
        topSchemaRef,
        errSchemaPath
      };
    }
    throw new Error('either "keyword" or "schema" must be passed');
  }
  subschema.getSubschema = getSubschema;
  function extendSubschemaData(subschema2, it, { dataProp, dataPropType: dpType, data: data32, dataTypes, propertyName }) {
    if (data32 !== void 0 && dataProp !== void 0) {
      throw new Error('both "data" and "dataProp" passed, only one allowed');
    }
    const { gen } = it;
    if (dataProp !== void 0) {
      const { errorPath, dataPathArr, opts } = it;
      const nextData = gen.let("data", (0, codegen_1._)`${it.data}${(0, codegen_1.getProperty)(dataProp)}`, true);
      dataContextProps(nextData);
      subschema2.errorPath = (0, codegen_1.str)`${errorPath}${(0, util_1.getErrorPath)(dataProp, dpType, opts.jsPropertySyntax)}`;
      subschema2.parentDataProperty = (0, codegen_1._)`${dataProp}`;
      subschema2.dataPathArr = [...dataPathArr, subschema2.parentDataProperty];
    }
    if (data32 !== void 0) {
      const nextData = data32 instanceof codegen_1.Name ? data32 : gen.let("data", data32, true);
      dataContextProps(nextData);
      if (propertyName !== void 0)
        subschema2.propertyName = propertyName;
    }
    if (dataTypes)
      subschema2.dataTypes = dataTypes;
    function dataContextProps(_nextData) {
      subschema2.data = _nextData;
      subschema2.dataLevel = it.dataLevel + 1;
      subschema2.dataTypes = [];
      it.definedProperties = /* @__PURE__ */ new Set();
      subschema2.parentData = it.data;
      subschema2.dataNames = [...it.dataNames, _nextData];
    }
  }
  subschema.extendSubschemaData = extendSubschemaData;
  function extendSubschemaMode(subschema2, { jtdDiscriminator, jtdMetadata, compositeRule, createErrors, allErrors }) {
    if (compositeRule !== void 0)
      subschema2.compositeRule = compositeRule;
    if (createErrors !== void 0)
      subschema2.createErrors = createErrors;
    if (allErrors !== void 0)
      subschema2.allErrors = allErrors;
    subschema2.jtdDiscriminator = jtdDiscriminator;
    subschema2.jtdMetadata = jtdMetadata;
  }
  subschema.extendSubschemaMode = extendSubschemaMode;
  return subschema;
}
function requireJsonSchemaTraverse() {
  if (hasRequiredJsonSchemaTraverse) return jsonSchemaTraverse.exports;
  hasRequiredJsonSchemaTraverse = 1;
  var traverse = jsonSchemaTraverse.exports = function(schema, opts, cb) {
    if (typeof opts == "function") {
      cb = opts;
      opts = {};
    }
    cb = opts.cb || cb;
    var pre = typeof cb == "function" ? cb : cb.pre || function() {
    };
    var post = cb.post || function() {
    };
    _traverse(opts, pre, post, schema, "", schema);
  };
  traverse.keywords = {
    additionalItems: true,
    items: true,
    contains: true,
    additionalProperties: true,
    propertyNames: true,
    not: true,
    if: true,
    then: true,
    else: true
  };
  traverse.arrayKeywords = {
    items: true,
    allOf: true,
    anyOf: true,
    oneOf: true
  };
  traverse.propsKeywords = {
    $defs: true,
    definitions: true,
    properties: true,
    patternProperties: true,
    dependencies: true
  };
  traverse.skipKeywords = {
    default: true,
    enum: true,
    const: true,
    required: true,
    maximum: true,
    minimum: true,
    exclusiveMaximum: true,
    exclusiveMinimum: true,
    multipleOf: true,
    maxLength: true,
    minLength: true,
    pattern: true,
    format: true,
    maxItems: true,
    minItems: true,
    uniqueItems: true,
    maxProperties: true,
    minProperties: true
  };
  function _traverse(opts, pre, post, schema, jsonPtr, rootSchema, parentJsonPtr, parentKeyword, parentSchema, keyIndex) {
    if (schema && typeof schema == "object" && !Array.isArray(schema)) {
      pre(schema, jsonPtr, rootSchema, parentJsonPtr, parentKeyword, parentSchema, keyIndex);
      for (var key in schema) {
        var sch = schema[key];
        if (Array.isArray(sch)) {
          if (key in traverse.arrayKeywords) {
            for (var i = 0; i < sch.length; i++)
              _traverse(opts, pre, post, sch[i], jsonPtr + "/" + key + "/" + i, rootSchema, jsonPtr, key, schema, i);
          }
        } else if (key in traverse.propsKeywords) {
          if (sch && typeof sch == "object") {
            for (var prop in sch)
              _traverse(opts, pre, post, sch[prop], jsonPtr + "/" + key + "/" + escapeJsonPtr(prop), rootSchema, jsonPtr, key, schema, prop);
          }
        } else if (key in traverse.keywords || opts.allKeys && !(key in traverse.skipKeywords)) {
          _traverse(opts, pre, post, sch, jsonPtr + "/" + key, rootSchema, jsonPtr, key, schema);
        }
      }
      post(schema, jsonPtr, rootSchema, parentJsonPtr, parentKeyword, parentSchema, keyIndex);
    }
  }
  function escapeJsonPtr(str) {
    return str.replace(/~/g, "~0").replace(/\//g, "~1");
  }
  return jsonSchemaTraverse.exports;
}
function requireResolve() {
  if (hasRequiredResolve) return resolve;
  hasRequiredResolve = 1;
  Object.defineProperty(resolve, "__esModule", { value: true });
  resolve.getSchemaRefs = resolve.resolveUrl = resolve.normalizeId = resolve._getFullPath = resolve.getFullPath = resolve.inlineRef = void 0;
  const util_1 = requireUtil$3();
  const equal2 = requireFastDeepEqual();
  const traverse = requireJsonSchemaTraverse();
  const SIMPLE_INLINED = /* @__PURE__ */ new Set([
    "type",
    "format",
    "pattern",
    "maxLength",
    "minLength",
    "maxProperties",
    "minProperties",
    "maxItems",
    "minItems",
    "maximum",
    "minimum",
    "uniqueItems",
    "multipleOf",
    "required",
    "enum",
    "const"
  ]);
  function inlineRef(schema, limit2 = true) {
    if (typeof schema == "boolean")
      return true;
    if (limit2 === true)
      return !hasRef(schema);
    if (!limit2)
      return false;
    return countKeys(schema) <= limit2;
  }
  resolve.inlineRef = inlineRef;
  const REF_KEYWORDS = /* @__PURE__ */ new Set([
    "$ref",
    "$recursiveRef",
    "$recursiveAnchor",
    "$dynamicRef",
    "$dynamicAnchor"
  ]);
  function hasRef(schema) {
    for (const key in schema) {
      if (REF_KEYWORDS.has(key))
        return true;
      const sch = schema[key];
      if (Array.isArray(sch) && sch.some(hasRef))
        return true;
      if (typeof sch == "object" && hasRef(sch))
        return true;
    }
    return false;
  }
  function countKeys(schema) {
    let count = 0;
    for (const key in schema) {
      if (key === "$ref")
        return Infinity;
      count++;
      if (SIMPLE_INLINED.has(key))
        continue;
      if (typeof schema[key] == "object") {
        (0, util_1.eachItem)(schema[key], (sch) => count += countKeys(sch));
      }
      if (count === Infinity)
        return Infinity;
    }
    return count;
  }
  function getFullPath(resolver, id2 = "", normalize2) {
    if (normalize2 !== false)
      id2 = normalizeId(id2);
    const p = resolver.parse(id2);
    return _getFullPath(resolver, p);
  }
  resolve.getFullPath = getFullPath;
  function _getFullPath(resolver, p) {
    const serialized = resolver.serialize(p);
    return serialized.split("#")[0] + "#";
  }
  resolve._getFullPath = _getFullPath;
  const TRAILING_SLASH_HASH = /#\/?$/;
  function normalizeId(id2) {
    return id2 ? id2.replace(TRAILING_SLASH_HASH, "") : "";
  }
  resolve.normalizeId = normalizeId;
  function resolveUrl(resolver, baseId, id2) {
    id2 = normalizeId(id2);
    return resolver.resolve(baseId, id2);
  }
  resolve.resolveUrl = resolveUrl;
  const ANCHOR = /^[a-z_][-a-z0-9._]*$/i;
  function getSchemaRefs(schema, baseId) {
    if (typeof schema == "boolean")
      return {};
    const { schemaId, uriResolver } = this.opts;
    const schId = normalizeId(schema[schemaId] || baseId);
    const baseIds = { "": schId };
    const pathPrefix = getFullPath(uriResolver, schId, false);
    const localRefs = {};
    const schemaRefs = /* @__PURE__ */ new Set();
    traverse(schema, { allKeys: true }, (sch, jsonPtr, _, parentJsonPtr) => {
      if (parentJsonPtr === void 0)
        return;
      const fullPath = pathPrefix + jsonPtr;
      let innerBaseId = baseIds[parentJsonPtr];
      if (typeof sch[schemaId] == "string")
        innerBaseId = addRef.call(this, sch[schemaId]);
      addAnchor.call(this, sch.$anchor);
      addAnchor.call(this, sch.$dynamicAnchor);
      baseIds[jsonPtr] = innerBaseId;
      function addRef(ref2) {
        const _resolve = this.opts.uriResolver.resolve;
        ref2 = normalizeId(innerBaseId ? _resolve(innerBaseId, ref2) : ref2);
        if (schemaRefs.has(ref2))
          throw ambiguos(ref2);
        schemaRefs.add(ref2);
        let schOrRef = this.refs[ref2];
        if (typeof schOrRef == "string")
          schOrRef = this.refs[schOrRef];
        if (typeof schOrRef == "object") {
          checkAmbiguosRef(sch, schOrRef.schema, ref2);
        } else if (ref2 !== normalizeId(fullPath)) {
          if (ref2[0] === "#") {
            checkAmbiguosRef(sch, localRefs[ref2], ref2);
            localRefs[ref2] = sch;
          } else {
            this.refs[ref2] = fullPath;
          }
        }
        return ref2;
      }
      function addAnchor(anchor) {
        if (typeof anchor == "string") {
          if (!ANCHOR.test(anchor))
            throw new Error(`invalid anchor "${anchor}"`);
          addRef.call(this, `#${anchor}`);
        }
      }
    });
    return localRefs;
    function checkAmbiguosRef(sch1, sch2, ref2) {
      if (sch2 !== void 0 && !equal2(sch1, sch2))
        throw ambiguos(ref2);
    }
    function ambiguos(ref2) {
      return new Error(`reference "${ref2}" resolves to more than one schema`);
    }
  }
  resolve.getSchemaRefs = getSchemaRefs;
  return resolve;
}
function requireValidate() {
  if (hasRequiredValidate) return validate;
  hasRequiredValidate = 1;
  Object.defineProperty(validate, "__esModule", { value: true });
  validate.getData = validate.KeywordCxt = validate.validateFunctionCode = void 0;
  const boolSchema_1 = requireBoolSchema();
  const dataType_1 = requireDataType();
  const applicability_1 = requireApplicability();
  const dataType_2 = requireDataType();
  const defaults_1 = requireDefaults();
  const keyword_1 = requireKeyword$1();
  const subschema_1 = requireSubschema();
  const codegen_1 = requireCodegen();
  const names_1 = requireNames();
  const resolve_1 = requireResolve();
  const util_1 = requireUtil$3();
  const errors_1 = requireErrors$1();
  function validateFunctionCode(it) {
    if (isSchemaObj(it)) {
      checkKeywords(it);
      if (schemaCxtHasRules(it)) {
        topSchemaObjCode(it);
        return;
      }
    }
    validateFunction(it, () => (0, boolSchema_1.topBoolOrEmptySchema)(it));
  }
  validate.validateFunctionCode = validateFunctionCode;
  function validateFunction({ gen, validateName, schema, schemaEnv, opts }, body) {
    if (opts.code.es5) {
      gen.func(validateName, (0, codegen_1._)`${names_1.default.data}, ${names_1.default.valCxt}`, schemaEnv.$async, () => {
        gen.code((0, codegen_1._)`"use strict"; ${funcSourceUrl(schema, opts)}`);
        destructureValCxtES5(gen, opts);
        gen.code(body);
      });
    } else {
      gen.func(validateName, (0, codegen_1._)`${names_1.default.data}, ${destructureValCxt(opts)}`, schemaEnv.$async, () => gen.code(funcSourceUrl(schema, opts)).code(body));
    }
  }
  function destructureValCxt(opts) {
    return (0, codegen_1._)`{${names_1.default.instancePath}="", ${names_1.default.parentData}, ${names_1.default.parentDataProperty}, ${names_1.default.rootData}=${names_1.default.data}${opts.dynamicRef ? (0, codegen_1._)`, ${names_1.default.dynamicAnchors}={}` : codegen_1.nil}}={}`;
  }
  function destructureValCxtES5(gen, opts) {
    gen.if(names_1.default.valCxt, () => {
      gen.var(names_1.default.instancePath, (0, codegen_1._)`${names_1.default.valCxt}.${names_1.default.instancePath}`);
      gen.var(names_1.default.parentData, (0, codegen_1._)`${names_1.default.valCxt}.${names_1.default.parentData}`);
      gen.var(names_1.default.parentDataProperty, (0, codegen_1._)`${names_1.default.valCxt}.${names_1.default.parentDataProperty}`);
      gen.var(names_1.default.rootData, (0, codegen_1._)`${names_1.default.valCxt}.${names_1.default.rootData}`);
      if (opts.dynamicRef)
        gen.var(names_1.default.dynamicAnchors, (0, codegen_1._)`${names_1.default.valCxt}.${names_1.default.dynamicAnchors}`);
    }, () => {
      gen.var(names_1.default.instancePath, (0, codegen_1._)`""`);
      gen.var(names_1.default.parentData, (0, codegen_1._)`undefined`);
      gen.var(names_1.default.parentDataProperty, (0, codegen_1._)`undefined`);
      gen.var(names_1.default.rootData, names_1.default.data);
      if (opts.dynamicRef)
        gen.var(names_1.default.dynamicAnchors, (0, codegen_1._)`{}`);
    });
  }
  function topSchemaObjCode(it) {
    const { schema, opts, gen } = it;
    validateFunction(it, () => {
      if (opts.$comment && schema.$comment)
        commentKeyword(it);
      checkNoDefault(it);
      gen.let(names_1.default.vErrors, null);
      gen.let(names_1.default.errors, 0);
      if (opts.unevaluated)
        resetEvaluated(it);
      typeAndKeywords(it);
      returnResults(it);
    });
    return;
  }
  function resetEvaluated(it) {
    const { gen, validateName } = it;
    it.evaluated = gen.const("evaluated", (0, codegen_1._)`${validateName}.evaluated`);
    gen.if((0, codegen_1._)`${it.evaluated}.dynamicProps`, () => gen.assign((0, codegen_1._)`${it.evaluated}.props`, (0, codegen_1._)`undefined`));
    gen.if((0, codegen_1._)`${it.evaluated}.dynamicItems`, () => gen.assign((0, codegen_1._)`${it.evaluated}.items`, (0, codegen_1._)`undefined`));
  }
  function funcSourceUrl(schema, opts) {
    const schId = typeof schema == "object" && schema[opts.schemaId];
    return schId && (opts.code.source || opts.code.process) ? (0, codegen_1._)`/*# sourceURL=${schId} */` : codegen_1.nil;
  }
  function subschemaCode(it, valid2) {
    if (isSchemaObj(it)) {
      checkKeywords(it);
      if (schemaCxtHasRules(it)) {
        subSchemaObjCode(it, valid2);
        return;
      }
    }
    (0, boolSchema_1.boolOrEmptySchema)(it, valid2);
  }
  function schemaCxtHasRules({ schema, self: self2 }) {
    if (typeof schema == "boolean")
      return !schema;
    for (const key in schema)
      if (self2.RULES.all[key])
        return true;
    return false;
  }
  function isSchemaObj(it) {
    return typeof it.schema != "boolean";
  }
  function subSchemaObjCode(it, valid2) {
    const { schema, gen, opts } = it;
    if (opts.$comment && schema.$comment)
      commentKeyword(it);
    updateContext(it);
    checkAsyncSchema(it);
    const errsCount = gen.const("_errs", names_1.default.errors);
    typeAndKeywords(it, errsCount);
    gen.var(valid2, (0, codegen_1._)`${errsCount} === ${names_1.default.errors}`);
  }
  function checkKeywords(it) {
    (0, util_1.checkUnknownRules)(it);
    checkRefsAndKeywords(it);
  }
  function typeAndKeywords(it, errsCount) {
    if (it.opts.jtd)
      return schemaKeywords(it, [], false, errsCount);
    const types2 = (0, dataType_1.getSchemaTypes)(it.schema);
    const checkedTypes = (0, dataType_1.coerceAndCheckDataType)(it, types2);
    schemaKeywords(it, types2, !checkedTypes, errsCount);
  }
  function checkRefsAndKeywords(it) {
    const { schema, errSchemaPath, opts, self: self2 } = it;
    if (schema.$ref && opts.ignoreKeywordsWithRef && (0, util_1.schemaHasRulesButRef)(schema, self2.RULES)) {
      self2.logger.warn(`$ref: keywords ignored in schema at path "${errSchemaPath}"`);
    }
  }
  function checkNoDefault(it) {
    const { schema, opts } = it;
    if (schema.default !== void 0 && opts.useDefaults && opts.strictSchema) {
      (0, util_1.checkStrictMode)(it, "default is ignored in the schema root");
    }
  }
  function updateContext(it) {
    const schId = it.schema[it.opts.schemaId];
    if (schId)
      it.baseId = (0, resolve_1.resolveUrl)(it.opts.uriResolver, it.baseId, schId);
  }
  function checkAsyncSchema(it) {
    if (it.schema.$async && !it.schemaEnv.$async)
      throw new Error("async schema in sync schema");
  }
  function commentKeyword({ gen, schemaEnv, schema, errSchemaPath, opts }) {
    const msg = schema.$comment;
    if (opts.$comment === true) {
      gen.code((0, codegen_1._)`${names_1.default.self}.logger.log(${msg})`);
    } else if (typeof opts.$comment == "function") {
      const schemaPath = (0, codegen_1.str)`${errSchemaPath}/$comment`;
      const rootName = gen.scopeValue("root", { ref: schemaEnv.root });
      gen.code((0, codegen_1._)`${names_1.default.self}.opts.$comment(${msg}, ${schemaPath}, ${rootName}.schema)`);
    }
  }
  function returnResults(it) {
    const { gen, schemaEnv, validateName, ValidationError, opts } = it;
    if (schemaEnv.$async) {
      gen.if((0, codegen_1._)`${names_1.default.errors} === 0`, () => gen.return(names_1.default.data), () => gen.throw((0, codegen_1._)`new ${ValidationError}(${names_1.default.vErrors})`));
    } else {
      gen.assign((0, codegen_1._)`${validateName}.errors`, names_1.default.vErrors);
      if (opts.unevaluated)
        assignEvaluated(it);
      gen.return((0, codegen_1._)`${names_1.default.errors} === 0`);
    }
  }
  function assignEvaluated({ gen, evaluated, props, items: items2 }) {
    if (props instanceof codegen_1.Name)
      gen.assign((0, codegen_1._)`${evaluated}.props`, props);
    if (items2 instanceof codegen_1.Name)
      gen.assign((0, codegen_1._)`${evaluated}.items`, items2);
  }
  function schemaKeywords(it, types2, typeErrors, errsCount) {
    const { gen, schema, data: data32, allErrors, opts, self: self2 } = it;
    const { RULES } = self2;
    if (schema.$ref && (opts.ignoreKeywordsWithRef || !(0, util_1.schemaHasRulesButRef)(schema, RULES))) {
      gen.block(() => keywordCode(it, "$ref", RULES.all.$ref.definition));
      return;
    }
    if (!opts.jtd)
      checkStrictTypes(it, types2);
    gen.block(() => {
      for (const group of RULES.rules)
        groupKeywords(group);
      groupKeywords(RULES.post);
    });
    function groupKeywords(group) {
      if (!(0, applicability_1.shouldUseGroup)(schema, group))
        return;
      if (group.type) {
        gen.if((0, dataType_2.checkDataType)(group.type, data32, opts.strictNumbers));
        iterateKeywords(it, group);
        if (types2.length === 1 && types2[0] === group.type && typeErrors) {
          gen.else();
          (0, dataType_2.reportTypeError)(it);
        }
        gen.endIf();
      } else {
        iterateKeywords(it, group);
      }
      if (!allErrors)
        gen.if((0, codegen_1._)`${names_1.default.errors} === ${errsCount || 0}`);
    }
  }
  function iterateKeywords(it, group) {
    const { gen, schema, opts: { useDefaults } } = it;
    if (useDefaults)
      (0, defaults_1.assignDefaults)(it, group.type);
    gen.block(() => {
      for (const rule of group.rules) {
        if ((0, applicability_1.shouldUseRule)(schema, rule)) {
          keywordCode(it, rule.keyword, rule.definition, group.type);
        }
      }
    });
  }
  function checkStrictTypes(it, types2) {
    if (it.schemaEnv.meta || !it.opts.strictTypes)
      return;
    checkContextTypes(it, types2);
    if (!it.opts.allowUnionTypes)
      checkMultipleTypes(it, types2);
    checkKeywordTypes(it, it.dataTypes);
  }
  function checkContextTypes(it, types2) {
    if (!types2.length)
      return;
    if (!it.dataTypes.length) {
      it.dataTypes = types2;
      return;
    }
    types2.forEach((t) => {
      if (!includesType(it.dataTypes, t)) {
        strictTypesError(it, `type "${t}" not allowed by context "${it.dataTypes.join(",")}"`);
      }
    });
    narrowSchemaTypes(it, types2);
  }
  function checkMultipleTypes(it, ts) {
    if (ts.length > 1 && !(ts.length === 2 && ts.includes("null"))) {
      strictTypesError(it, "use allowUnionTypes to allow union type keyword");
    }
  }
  function checkKeywordTypes(it, ts) {
    const rules2 = it.self.RULES.all;
    for (const keyword2 in rules2) {
      const rule = rules2[keyword2];
      if (typeof rule == "object" && (0, applicability_1.shouldUseRule)(it.schema, rule)) {
        const { type: type2 } = rule.definition;
        if (type2.length && !type2.some((t) => hasApplicableType(ts, t))) {
          strictTypesError(it, `missing type "${type2.join(",")}" for keyword "${keyword2}"`);
        }
      }
    }
  }
  function hasApplicableType(schTs, kwdT) {
    return schTs.includes(kwdT) || kwdT === "number" && schTs.includes("integer");
  }
  function includesType(ts, t) {
    return ts.includes(t) || t === "integer" && ts.includes("number");
  }
  function narrowSchemaTypes(it, withTypes) {
    const ts = [];
    for (const t of it.dataTypes) {
      if (includesType(withTypes, t))
        ts.push(t);
      else if (withTypes.includes("integer") && t === "number")
        ts.push("integer");
    }
    it.dataTypes = ts;
  }
  function strictTypesError(it, msg) {
    const schemaPath = it.schemaEnv.baseId + it.errSchemaPath;
    msg += ` at "${schemaPath}" (strictTypes)`;
    (0, util_1.checkStrictMode)(it, msg, it.opts.strictTypes);
  }
  class KeywordCxt {
    constructor(it, def2, keyword2) {
      (0, keyword_1.validateKeywordUsage)(it, def2, keyword2);
      this.gen = it.gen;
      this.allErrors = it.allErrors;
      this.keyword = keyword2;
      this.data = it.data;
      this.schema = it.schema[keyword2];
      this.$data = def2.$data && it.opts.$data && this.schema && this.schema.$data;
      this.schemaValue = (0, util_1.schemaRefOrVal)(it, this.schema, keyword2, this.$data);
      this.schemaType = def2.schemaType;
      this.parentSchema = it.schema;
      this.params = {};
      this.it = it;
      this.def = def2;
      if (this.$data) {
        this.schemaCode = it.gen.const("vSchema", getData(this.$data, it));
      } else {
        this.schemaCode = this.schemaValue;
        if (!(0, keyword_1.validSchemaType)(this.schema, def2.schemaType, def2.allowUndefined)) {
          throw new Error(`${keyword2} value must be ${JSON.stringify(def2.schemaType)}`);
        }
      }
      if ("code" in def2 ? def2.trackErrors : def2.errors !== false) {
        this.errsCount = it.gen.const("_errs", names_1.default.errors);
      }
    }
    result(condition, successAction, failAction) {
      this.failResult((0, codegen_1.not)(condition), successAction, failAction);
    }
    failResult(condition, successAction, failAction) {
      this.gen.if(condition);
      if (failAction)
        failAction();
      else
        this.error();
      if (successAction) {
        this.gen.else();
        successAction();
        if (this.allErrors)
          this.gen.endIf();
      } else {
        if (this.allErrors)
          this.gen.endIf();
        else
          this.gen.else();
      }
    }
    pass(condition, failAction) {
      this.failResult((0, codegen_1.not)(condition), void 0, failAction);
    }
    fail(condition) {
      if (condition === void 0) {
        this.error();
        if (!this.allErrors)
          this.gen.if(false);
        return;
      }
      this.gen.if(condition);
      this.error();
      if (this.allErrors)
        this.gen.endIf();
      else
        this.gen.else();
    }
    fail$data(condition) {
      if (!this.$data)
        return this.fail(condition);
      const { schemaCode } = this;
      this.fail((0, codegen_1._)`${schemaCode} !== undefined && (${(0, codegen_1.or)(this.invalid$data(), condition)})`);
    }
    error(append, errorParams, errorPaths) {
      if (errorParams) {
        this.setParams(errorParams);
        this._error(append, errorPaths);
        this.setParams({});
        return;
      }
      this._error(append, errorPaths);
    }
    _error(append, errorPaths) {
      (append ? errors_1.reportExtraError : errors_1.reportError)(this, this.def.error, errorPaths);
    }
    $dataError() {
      (0, errors_1.reportError)(this, this.def.$dataError || errors_1.keyword$DataError);
    }
    reset() {
      if (this.errsCount === void 0)
        throw new Error('add "trackErrors" to keyword definition');
      (0, errors_1.resetErrorsCount)(this.gen, this.errsCount);
    }
    ok(cond) {
      if (!this.allErrors)
        this.gen.if(cond);
    }
    setParams(obj, assign) {
      if (assign)
        Object.assign(this.params, obj);
      else
        this.params = obj;
    }
    block$data(valid2, codeBlock, $dataValid = codegen_1.nil) {
      this.gen.block(() => {
        this.check$data(valid2, $dataValid);
        codeBlock();
      });
    }
    check$data(valid2 = codegen_1.nil, $dataValid = codegen_1.nil) {
      if (!this.$data)
        return;
      const { gen, schemaCode, schemaType, def: def2 } = this;
      gen.if((0, codegen_1.or)((0, codegen_1._)`${schemaCode} === undefined`, $dataValid));
      if (valid2 !== codegen_1.nil)
        gen.assign(valid2, true);
      if (schemaType.length || def2.validateSchema) {
        gen.elseIf(this.invalid$data());
        this.$dataError();
        if (valid2 !== codegen_1.nil)
          gen.assign(valid2, false);
      }
      gen.else();
    }
    invalid$data() {
      const { gen, schemaCode, schemaType, def: def2, it } = this;
      return (0, codegen_1.or)(wrong$DataType(), invalid$DataSchema());
      function wrong$DataType() {
        if (schemaType.length) {
          if (!(schemaCode instanceof codegen_1.Name))
            throw new Error("ajv implementation error");
          const st = Array.isArray(schemaType) ? schemaType : [schemaType];
          return (0, codegen_1._)`${(0, dataType_2.checkDataTypes)(st, schemaCode, it.opts.strictNumbers, dataType_2.DataType.Wrong)}`;
        }
        return codegen_1.nil;
      }
      function invalid$DataSchema() {
        if (def2.validateSchema) {
          const validateSchemaRef = gen.scopeValue("validate$data", { ref: def2.validateSchema });
          return (0, codegen_1._)`!${validateSchemaRef}(${schemaCode})`;
        }
        return codegen_1.nil;
      }
    }
    subschema(appl, valid2) {
      const subschema2 = (0, subschema_1.getSubschema)(this.it, appl);
      (0, subschema_1.extendSubschemaData)(subschema2, this.it, appl);
      (0, subschema_1.extendSubschemaMode)(subschema2, appl);
      const nextContext = { ...this.it, ...subschema2, items: void 0, props: void 0 };
      subschemaCode(nextContext, valid2);
      return nextContext;
    }
    mergeEvaluated(schemaCxt, toName) {
      const { it, gen } = this;
      if (!it.opts.unevaluated)
        return;
      if (it.props !== true && schemaCxt.props !== void 0) {
        it.props = util_1.mergeEvaluated.props(gen, schemaCxt.props, it.props, toName);
      }
      if (it.items !== true && schemaCxt.items !== void 0) {
        it.items = util_1.mergeEvaluated.items(gen, schemaCxt.items, it.items, toName);
      }
    }
    mergeValidEvaluated(schemaCxt, valid2) {
      const { it, gen } = this;
      if (it.opts.unevaluated && (it.props !== true || it.items !== true)) {
        gen.if(valid2, () => this.mergeEvaluated(schemaCxt, codegen_1.Name));
        return true;
      }
    }
  }
  validate.KeywordCxt = KeywordCxt;
  function keywordCode(it, keyword2, def2, ruleType) {
    const cxt = new KeywordCxt(it, def2, keyword2);
    if ("code" in def2) {
      def2.code(cxt, ruleType);
    } else if (cxt.$data && def2.validate) {
      (0, keyword_1.funcKeywordCode)(cxt, def2);
    } else if ("macro" in def2) {
      (0, keyword_1.macroKeywordCode)(cxt, def2);
    } else if (def2.compile || def2.validate) {
      (0, keyword_1.funcKeywordCode)(cxt, def2);
    }
  }
  const JSON_POINTER = /^\/(?:[^~]|~0|~1)*$/;
  const RELATIVE_JSON_POINTER = /^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;
  function getData($data, { dataLevel, dataNames, dataPathArr }) {
    let jsonPointer;
    let data32;
    if ($data === "")
      return names_1.default.rootData;
    if ($data[0] === "/") {
      if (!JSON_POINTER.test($data))
        throw new Error(`Invalid JSON-pointer: ${$data}`);
      jsonPointer = $data;
      data32 = names_1.default.rootData;
    } else {
      const matches = RELATIVE_JSON_POINTER.exec($data);
      if (!matches)
        throw new Error(`Invalid JSON-pointer: ${$data}`);
      const up = +matches[1];
      jsonPointer = matches[2];
      if (jsonPointer === "#") {
        if (up >= dataLevel)
          throw new Error(errorMsg("property/index", up));
        return dataPathArr[dataLevel - up];
      }
      if (up > dataLevel)
        throw new Error(errorMsg("data", up));
      data32 = dataNames[dataLevel - up];
      if (!jsonPointer)
        return data32;
    }
    let expr = data32;
    const segments = jsonPointer.split("/");
    for (const segment of segments) {
      if (segment) {
        data32 = (0, codegen_1._)`${data32}${(0, codegen_1.getProperty)((0, util_1.unescapeJsonPointer)(segment))}`;
        expr = (0, codegen_1._)`${expr} && ${data32}`;
      }
    }
    return expr;
    function errorMsg(pointerType, up) {
      return `Cannot access ${pointerType} ${up} levels up, current level is ${dataLevel}`;
    }
  }
  validate.getData = getData;
  return validate;
}
function requireValidation_error() {
  if (hasRequiredValidation_error) return validation_error;
  hasRequiredValidation_error = 1;
  Object.defineProperty(validation_error, "__esModule", { value: true });
  class ValidationError extends Error {
    constructor(errors2) {
      super("validation failed");
      this.errors = errors2;
      this.ajv = this.validation = true;
    }
  }
  validation_error.default = ValidationError;
  return validation_error;
}
function requireRef_error() {
  if (hasRequiredRef_error) return ref_error;
  hasRequiredRef_error = 1;
  Object.defineProperty(ref_error, "__esModule", { value: true });
  const resolve_1 = requireResolve();
  class MissingRefError extends Error {
    constructor(resolver, baseId, ref2, msg) {
      super(msg || `can't resolve reference ${ref2} from id ${baseId}`);
      this.missingRef = (0, resolve_1.resolveUrl)(resolver, baseId, ref2);
      this.missingSchema = (0, resolve_1.normalizeId)((0, resolve_1.getFullPath)(resolver, this.missingRef));
    }
  }
  ref_error.default = MissingRefError;
  return ref_error;
}
function requireCompile$1() {
  if (hasRequiredCompile$1) return compile$1;
  hasRequiredCompile$1 = 1;
  Object.defineProperty(compile$1, "__esModule", { value: true });
  compile$1.resolveSchema = compile$1.getCompilingSchema = compile$1.resolveRef = compile$1.compileSchema = compile$1.SchemaEnv = void 0;
  const codegen_1 = requireCodegen();
  const validation_error_1 = requireValidation_error();
  const names_1 = requireNames();
  const resolve_1 = requireResolve();
  const util_1 = requireUtil$3();
  const validate_1 = requireValidate();
  class SchemaEnv {
    constructor(env2) {
      var _a4;
      this.refs = {};
      this.dynamicAnchors = {};
      let schema;
      if (typeof env2.schema == "object")
        schema = env2.schema;
      this.schema = env2.schema;
      this.schemaId = env2.schemaId;
      this.root = env2.root || this;
      this.baseId = (_a4 = env2.baseId) !== null && _a4 !== void 0 ? _a4 : (0, resolve_1.normalizeId)(schema === null || schema === void 0 ? void 0 : schema[env2.schemaId || "$id"]);
      this.schemaPath = env2.schemaPath;
      this.localRefs = env2.localRefs;
      this.meta = env2.meta;
      this.$async = schema === null || schema === void 0 ? void 0 : schema.$async;
      this.refs = {};
    }
  }
  compile$1.SchemaEnv = SchemaEnv;
  function compileSchema(sch) {
    const _sch = getCompilingSchema.call(this, sch);
    if (_sch)
      return _sch;
    const rootId = (0, resolve_1.getFullPath)(this.opts.uriResolver, sch.root.baseId);
    const { es5, lines } = this.opts.code;
    const { ownProperties } = this.opts;
    const gen = new codegen_1.CodeGen(this.scope, { es5, lines, ownProperties });
    let _ValidationError;
    if (sch.$async) {
      _ValidationError = gen.scopeValue("Error", {
        ref: validation_error_1.default,
        code: (0, codegen_1._)`require("ajv/dist/runtime/validation_error").default`
      });
    }
    const validateName = gen.scopeName("validate");
    sch.validateName = validateName;
    const schemaCxt = {
      gen,
      allErrors: this.opts.allErrors,
      data: names_1.default.data,
      parentData: names_1.default.parentData,
      parentDataProperty: names_1.default.parentDataProperty,
      dataNames: [names_1.default.data],
      dataPathArr: [codegen_1.nil],
      dataLevel: 0,
      dataTypes: [],
      definedProperties: /* @__PURE__ */ new Set(),
      topSchemaRef: gen.scopeValue("schema", this.opts.code.source === true ? { ref: sch.schema, code: (0, codegen_1.stringify)(sch.schema) } : { ref: sch.schema }),
      validateName,
      ValidationError: _ValidationError,
      schema: sch.schema,
      schemaEnv: sch,
      rootId,
      baseId: sch.baseId || rootId,
      schemaPath: codegen_1.nil,
      errSchemaPath: sch.schemaPath || (this.opts.jtd ? "" : "#"),
      errorPath: (0, codegen_1._)`""`,
      opts: this.opts,
      self: this
    };
    let sourceCode;
    try {
      this._compilations.add(sch);
      (0, validate_1.validateFunctionCode)(schemaCxt);
      gen.optimize(this.opts.code.optimize);
      const validateCode = gen.toString();
      sourceCode = `${gen.scopeRefs(names_1.default.scope)}return ${validateCode}`;
      if (this.opts.code.process)
        sourceCode = this.opts.code.process(sourceCode, sch);
      const makeValidate = new Function(`${names_1.default.self}`, `${names_1.default.scope}`, sourceCode);
      const validate2 = makeValidate(this, this.scope.get());
      this.scope.value(validateName, { ref: validate2 });
      validate2.errors = null;
      validate2.schema = sch.schema;
      validate2.schemaEnv = sch;
      if (sch.$async)
        validate2.$async = true;
      if (this.opts.code.source === true) {
        validate2.source = { validateName, validateCode, scopeValues: gen._values };
      }
      if (this.opts.unevaluated) {
        const { props, items: items2 } = schemaCxt;
        validate2.evaluated = {
          props: props instanceof codegen_1.Name ? void 0 : props,
          items: items2 instanceof codegen_1.Name ? void 0 : items2,
          dynamicProps: props instanceof codegen_1.Name,
          dynamicItems: items2 instanceof codegen_1.Name
        };
        if (validate2.source)
          validate2.source.evaluated = (0, codegen_1.stringify)(validate2.evaluated);
      }
      sch.validate = validate2;
      return sch;
    } catch (e) {
      delete sch.validate;
      delete sch.validateName;
      if (sourceCode)
        this.logger.error("Error compiling schema, function code:", sourceCode);
      throw e;
    } finally {
      this._compilations.delete(sch);
    }
  }
  compile$1.compileSchema = compileSchema;
  function resolveRef(root2, baseId, ref2) {
    var _a4;
    ref2 = (0, resolve_1.resolveUrl)(this.opts.uriResolver, baseId, ref2);
    const schOrFunc = root2.refs[ref2];
    if (schOrFunc)
      return schOrFunc;
    let _sch = resolve2.call(this, root2, ref2);
    if (_sch === void 0) {
      const schema = (_a4 = root2.localRefs) === null || _a4 === void 0 ? void 0 : _a4[ref2];
      const { schemaId } = this.opts;
      if (schema)
        _sch = new SchemaEnv({ schema, schemaId, root: root2, baseId });
    }
    if (_sch === void 0)
      return;
    return root2.refs[ref2] = inlineOrCompile.call(this, _sch);
  }
  compile$1.resolveRef = resolveRef;
  function inlineOrCompile(sch) {
    if ((0, resolve_1.inlineRef)(sch.schema, this.opts.inlineRefs))
      return sch.schema;
    return sch.validate ? sch : compileSchema.call(this, sch);
  }
  function getCompilingSchema(schEnv) {
    for (const sch of this._compilations) {
      if (sameSchemaEnv(sch, schEnv))
        return sch;
    }
  }
  compile$1.getCompilingSchema = getCompilingSchema;
  function sameSchemaEnv(s1, s2) {
    return s1.schema === s2.schema && s1.root === s2.root && s1.baseId === s2.baseId;
  }
  function resolve2(root2, ref2) {
    let sch;
    while (typeof (sch = this.refs[ref2]) == "string")
      ref2 = sch;
    return sch || this.schemas[ref2] || resolveSchema.call(this, root2, ref2);
  }
  function resolveSchema(root2, ref2) {
    const p = this.opts.uriResolver.parse(ref2);
    const refPath = (0, resolve_1._getFullPath)(this.opts.uriResolver, p);
    let baseId = (0, resolve_1.getFullPath)(this.opts.uriResolver, root2.baseId, void 0);
    if (Object.keys(root2.schema).length > 0 && refPath === baseId) {
      return getJsonPointer.call(this, p, root2);
    }
    const id2 = (0, resolve_1.normalizeId)(refPath);
    const schOrRef = this.refs[id2] || this.schemas[id2];
    if (typeof schOrRef == "string") {
      const sch = resolveSchema.call(this, root2, schOrRef);
      if (typeof (sch === null || sch === void 0 ? void 0 : sch.schema) !== "object")
        return;
      return getJsonPointer.call(this, p, sch);
    }
    if (typeof (schOrRef === null || schOrRef === void 0 ? void 0 : schOrRef.schema) !== "object")
      return;
    if (!schOrRef.validate)
      compileSchema.call(this, schOrRef);
    if (id2 === (0, resolve_1.normalizeId)(ref2)) {
      const { schema } = schOrRef;
      const { schemaId } = this.opts;
      const schId = schema[schemaId];
      if (schId)
        baseId = (0, resolve_1.resolveUrl)(this.opts.uriResolver, baseId, schId);
      return new SchemaEnv({ schema, schemaId, root: root2, baseId });
    }
    return getJsonPointer.call(this, p, schOrRef);
  }
  compile$1.resolveSchema = resolveSchema;
  const PREVENT_SCOPE_CHANGE = /* @__PURE__ */ new Set([
    "properties",
    "patternProperties",
    "enum",
    "dependencies",
    "definitions"
  ]);
  function getJsonPointer(parsedRef, { baseId, schema, root: root2 }) {
    var _a4;
    if (((_a4 = parsedRef.fragment) === null || _a4 === void 0 ? void 0 : _a4[0]) !== "/")
      return;
    for (const part of parsedRef.fragment.slice(1).split("/")) {
      if (typeof schema === "boolean")
        return;
      const partSchema = schema[(0, util_1.unescapeFragment)(part)];
      if (partSchema === void 0)
        return;
      schema = partSchema;
      const schId = typeof schema === "object" && schema[this.opts.schemaId];
      if (!PREVENT_SCOPE_CHANGE.has(part) && schId) {
        baseId = (0, resolve_1.resolveUrl)(this.opts.uriResolver, baseId, schId);
      }
    }
    let env2;
    if (typeof schema != "boolean" && schema.$ref && !(0, util_1.schemaHasRulesButRef)(schema, this.RULES)) {
      const $ref = (0, resolve_1.resolveUrl)(this.opts.uriResolver, baseId, schema.$ref);
      env2 = resolveSchema.call(this, root2, $ref);
    }
    const { schemaId } = this.opts;
    env2 = env2 || new SchemaEnv({ schema, schemaId, root: root2, baseId });
    if (env2.schema !== env2.root.schema)
      return env2;
    return void 0;
  }
  return compile$1;
}
function requireUri() {
  if (hasRequiredUri) return uri;
  hasRequiredUri = 1;
  Object.defineProperty(uri, "__esModule", { value: true });
  const uri$12 = requireFastUri();
  uri$12.code = 'require("ajv/dist/runtime/uri").default';
  uri.default = uri$12;
  return uri;
}
function requireCore$2() {
  if (hasRequiredCore$2) return core$3;
  hasRequiredCore$2 = 1;
  (function(exports$1) {
    Object.defineProperty(exports$1, "__esModule", { value: true });
    exports$1.CodeGen = exports$1.Name = exports$1.nil = exports$1.stringify = exports$1.str = exports$1._ = exports$1.KeywordCxt = void 0;
    var validate_1 = requireValidate();
    Object.defineProperty(exports$1, "KeywordCxt", { enumerable: true, get: function() {
      return validate_1.KeywordCxt;
    } });
    var codegen_1 = requireCodegen();
    Object.defineProperty(exports$1, "_", { enumerable: true, get: function() {
      return codegen_1._;
    } });
    Object.defineProperty(exports$1, "str", { enumerable: true, get: function() {
      return codegen_1.str;
    } });
    Object.defineProperty(exports$1, "stringify", { enumerable: true, get: function() {
      return codegen_1.stringify;
    } });
    Object.defineProperty(exports$1, "nil", { enumerable: true, get: function() {
      return codegen_1.nil;
    } });
    Object.defineProperty(exports$1, "Name", { enumerable: true, get: function() {
      return codegen_1.Name;
    } });
    Object.defineProperty(exports$1, "CodeGen", { enumerable: true, get: function() {
      return codegen_1.CodeGen;
    } });
    const validation_error_1 = requireValidation_error();
    const ref_error_1 = requireRef_error();
    const rules_1 = requireRules();
    const compile_1 = requireCompile$1();
    const codegen_2 = requireCodegen();
    const resolve_1 = requireResolve();
    const dataType_1 = requireDataType();
    const util_1 = requireUtil$3();
    const $dataRefSchema = require$$9;
    const uri_1 = requireUri();
    const defaultRegExp = (str, flags) => new RegExp(str, flags);
    defaultRegExp.code = "new RegExp";
    const META_IGNORE_OPTIONS = ["removeAdditional", "useDefaults", "coerceTypes"];
    const EXT_SCOPE_NAMES = /* @__PURE__ */ new Set([
      "validate",
      "serialize",
      "parse",
      "wrapper",
      "root",
      "schema",
      "keyword",
      "pattern",
      "formats",
      "validate$data",
      "func",
      "obj",
      "Error"
    ]);
    const removedOptions = {
      errorDataPath: "",
      format: "`validateFormats: false` can be used instead.",
      nullable: '"nullable" keyword is supported by default.',
      jsonPointers: "Deprecated jsPropertySyntax can be used instead.",
      extendRefs: "Deprecated ignoreKeywordsWithRef can be used instead.",
      missingRefs: "Pass empty schema with $id that should be ignored to ajv.addSchema.",
      processCode: "Use option `code: {process: (code, schemaEnv: object) => string}`",
      sourceCode: "Use option `code: {source: true}`",
      strictDefaults: "It is default now, see option `strict`.",
      strictKeywords: "It is default now, see option `strict`.",
      uniqueItems: '"uniqueItems" keyword is always validated.',
      unknownFormats: "Disable strict mode or pass `true` to `ajv.addFormat` (or `formats` option).",
      cache: "Map is used as cache, schema object as key.",
      serialize: "Map is used as cache, schema object as key.",
      ajvErrors: "It is default now."
    };
    const deprecatedOptions = {
      ignoreKeywordsWithRef: "",
      jsPropertySyntax: "",
      unicode: '"minLength"/"maxLength" account for unicode characters by default.'
    };
    const MAX_EXPRESSION = 200;
    function requiredOptions(o) {
      var _a4, _b2, _c2, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0;
      const s = o.strict;
      const _optz = (_a4 = o.code) === null || _a4 === void 0 ? void 0 : _a4.optimize;
      const optimize = _optz === true || _optz === void 0 ? 1 : _optz || 0;
      const regExp = (_c2 = (_b2 = o.code) === null || _b2 === void 0 ? void 0 : _b2.regExp) !== null && _c2 !== void 0 ? _c2 : defaultRegExp;
      const uriResolver = (_d = o.uriResolver) !== null && _d !== void 0 ? _d : uri_1.default;
      return {
        strictSchema: (_f = (_e = o.strictSchema) !== null && _e !== void 0 ? _e : s) !== null && _f !== void 0 ? _f : true,
        strictNumbers: (_h = (_g = o.strictNumbers) !== null && _g !== void 0 ? _g : s) !== null && _h !== void 0 ? _h : true,
        strictTypes: (_k = (_j = o.strictTypes) !== null && _j !== void 0 ? _j : s) !== null && _k !== void 0 ? _k : "log",
        strictTuples: (_m = (_l = o.strictTuples) !== null && _l !== void 0 ? _l : s) !== null && _m !== void 0 ? _m : "log",
        strictRequired: (_p = (_o = o.strictRequired) !== null && _o !== void 0 ? _o : s) !== null && _p !== void 0 ? _p : false,
        code: o.code ? { ...o.code, optimize, regExp } : { optimize, regExp },
        loopRequired: (_q = o.loopRequired) !== null && _q !== void 0 ? _q : MAX_EXPRESSION,
        loopEnum: (_r = o.loopEnum) !== null && _r !== void 0 ? _r : MAX_EXPRESSION,
        meta: (_s = o.meta) !== null && _s !== void 0 ? _s : true,
        messages: (_t = o.messages) !== null && _t !== void 0 ? _t : true,
        inlineRefs: (_u = o.inlineRefs) !== null && _u !== void 0 ? _u : true,
        schemaId: (_v = o.schemaId) !== null && _v !== void 0 ? _v : "$id",
        addUsedSchema: (_w = o.addUsedSchema) !== null && _w !== void 0 ? _w : true,
        validateSchema: (_x = o.validateSchema) !== null && _x !== void 0 ? _x : true,
        validateFormats: (_y = o.validateFormats) !== null && _y !== void 0 ? _y : true,
        unicodeRegExp: (_z = o.unicodeRegExp) !== null && _z !== void 0 ? _z : true,
        int32range: (_0 = o.int32range) !== null && _0 !== void 0 ? _0 : true,
        uriResolver
      };
    }
    class Ajv2 {
      constructor(opts = {}) {
        this.schemas = {};
        this.refs = {};
        this.formats = {};
        this._compilations = /* @__PURE__ */ new Set();
        this._loading = {};
        this._cache = /* @__PURE__ */ new Map();
        opts = this.opts = { ...opts, ...requiredOptions(opts) };
        const { es5, lines } = this.opts.code;
        this.scope = new codegen_2.ValueScope({ scope: {}, prefixes: EXT_SCOPE_NAMES, es5, lines });
        this.logger = getLogger(opts.logger);
        const formatOpt = opts.validateFormats;
        opts.validateFormats = false;
        this.RULES = (0, rules_1.getRules)();
        checkOptions.call(this, removedOptions, opts, "NOT SUPPORTED");
        checkOptions.call(this, deprecatedOptions, opts, "DEPRECATED", "warn");
        this._metaOpts = getMetaSchemaOptions.call(this);
        if (opts.formats)
          addInitialFormats.call(this);
        this._addVocabularies();
        this._addDefaultMetaSchema();
        if (opts.keywords)
          addInitialKeywords.call(this, opts.keywords);
        if (typeof opts.meta == "object")
          this.addMetaSchema(opts.meta);
        addInitialSchemas.call(this);
        opts.validateFormats = formatOpt;
      }
      _addVocabularies() {
        this.addKeyword("$async");
      }
      _addDefaultMetaSchema() {
        const { $data, meta, schemaId } = this.opts;
        let _dataRefSchema = $dataRefSchema;
        if (schemaId === "id") {
          _dataRefSchema = { ...$dataRefSchema };
          _dataRefSchema.id = _dataRefSchema.$id;
          delete _dataRefSchema.$id;
        }
        if (meta && $data)
          this.addMetaSchema(_dataRefSchema, _dataRefSchema[schemaId], false);
      }
      defaultMeta() {
        const { meta, schemaId } = this.opts;
        return this.opts.defaultMeta = typeof meta == "object" ? meta[schemaId] || meta : void 0;
      }
      validate(schemaKeyRef, data32) {
        let v;
        if (typeof schemaKeyRef == "string") {
          v = this.getSchema(schemaKeyRef);
          if (!v)
            throw new Error(`no schema with key or ref "${schemaKeyRef}"`);
        } else {
          v = this.compile(schemaKeyRef);
        }
        const valid2 = v(data32);
        if (!("$async" in v))
          this.errors = v.errors;
        return valid2;
      }
      compile(schema, _meta) {
        const sch = this._addSchema(schema, _meta);
        return sch.validate || this._compileSchemaEnv(sch);
      }
      compileAsync(schema, meta) {
        if (typeof this.opts.loadSchema != "function") {
          throw new Error("options.loadSchema should be a function");
        }
        const { loadSchema } = this.opts;
        return runCompileAsync.call(this, schema, meta);
        async function runCompileAsync(_schema, _meta) {
          await loadMetaSchema.call(this, _schema.$schema);
          const sch = this._addSchema(_schema, _meta);
          return sch.validate || _compileAsync.call(this, sch);
        }
        async function loadMetaSchema($ref) {
          if ($ref && !this.getSchema($ref)) {
            await runCompileAsync.call(this, { $ref }, true);
          }
        }
        async function _compileAsync(sch) {
          try {
            return this._compileSchemaEnv(sch);
          } catch (e) {
            if (!(e instanceof ref_error_1.default))
              throw e;
            checkLoaded.call(this, e);
            await loadMissingSchema.call(this, e.missingSchema);
            return _compileAsync.call(this, sch);
          }
        }
        function checkLoaded({ missingSchema: ref2, missingRef }) {
          if (this.refs[ref2]) {
            throw new Error(`AnySchema ${ref2} is loaded but ${missingRef} cannot be resolved`);
          }
        }
        async function loadMissingSchema(ref2) {
          const _schema = await _loadSchema.call(this, ref2);
          if (!this.refs[ref2])
            await loadMetaSchema.call(this, _schema.$schema);
          if (!this.refs[ref2])
            this.addSchema(_schema, ref2, meta);
        }
        async function _loadSchema(ref2) {
          const p = this._loading[ref2];
          if (p)
            return p;
          try {
            return await (this._loading[ref2] = loadSchema(ref2));
          } finally {
            delete this._loading[ref2];
          }
        }
      }
      addSchema(schema, key, _meta, _validateSchema = this.opts.validateSchema) {
        if (Array.isArray(schema)) {
          for (const sch of schema)
            this.addSchema(sch, void 0, _meta, _validateSchema);
          return this;
        }
        let id2;
        if (typeof schema === "object") {
          const { schemaId } = this.opts;
          id2 = schema[schemaId];
          if (id2 !== void 0 && typeof id2 != "string") {
            throw new Error(`schema ${schemaId} must be string`);
          }
        }
        key = (0, resolve_1.normalizeId)(key || id2);
        this._checkUnique(key);
        this.schemas[key] = this._addSchema(schema, _meta, key, _validateSchema, true);
        return this;
      }
      addMetaSchema(schema, key, _validateSchema = this.opts.validateSchema) {
        this.addSchema(schema, key, true, _validateSchema);
        return this;
      }
      validateSchema(schema, throwOrLogError) {
        if (typeof schema == "boolean")
          return true;
        let $schema2;
        $schema2 = schema.$schema;
        if ($schema2 !== void 0 && typeof $schema2 != "string") {
          throw new Error("$schema must be a string");
        }
        $schema2 = $schema2 || this.opts.defaultMeta || this.defaultMeta();
        if (!$schema2) {
          this.logger.warn("meta-schema not available");
          this.errors = null;
          return true;
        }
        const valid2 = this.validate($schema2, schema);
        if (!valid2 && throwOrLogError) {
          const message = "schema is invalid: " + this.errorsText();
          if (this.opts.validateSchema === "log")
            this.logger.error(message);
          else
            throw new Error(message);
        }
        return valid2;
      }
      getSchema(keyRef) {
        let sch;
        while (typeof (sch = getSchEnv.call(this, keyRef)) == "string")
          keyRef = sch;
        if (sch === void 0) {
          const { schemaId } = this.opts;
          const root2 = new compile_1.SchemaEnv({ schema: {}, schemaId });
          sch = compile_1.resolveSchema.call(this, root2, keyRef);
          if (!sch)
            return;
          this.refs[keyRef] = sch;
        }
        return sch.validate || this._compileSchemaEnv(sch);
      }
      removeSchema(schemaKeyRef) {
        if (schemaKeyRef instanceof RegExp) {
          this._removeAllSchemas(this.schemas, schemaKeyRef);
          this._removeAllSchemas(this.refs, schemaKeyRef);
          return this;
        }
        switch (typeof schemaKeyRef) {
          case "undefined":
            this._removeAllSchemas(this.schemas);
            this._removeAllSchemas(this.refs);
            this._cache.clear();
            return this;
          case "string": {
            const sch = getSchEnv.call(this, schemaKeyRef);
            if (typeof sch == "object")
              this._cache.delete(sch.schema);
            delete this.schemas[schemaKeyRef];
            delete this.refs[schemaKeyRef];
            return this;
          }
          case "object": {
            const cacheKey = schemaKeyRef;
            this._cache.delete(cacheKey);
            let id2 = schemaKeyRef[this.opts.schemaId];
            if (id2) {
              id2 = (0, resolve_1.normalizeId)(id2);
              delete this.schemas[id2];
              delete this.refs[id2];
            }
            return this;
          }
          default:
            throw new Error("ajv.removeSchema: invalid parameter");
        }
      }
      addVocabulary(definitions2) {
        for (const def2 of definitions2)
          this.addKeyword(def2);
        return this;
      }
      addKeyword(kwdOrDef, def2) {
        let keyword2;
        if (typeof kwdOrDef == "string") {
          keyword2 = kwdOrDef;
          if (typeof def2 == "object") {
            this.logger.warn("these parameters are deprecated, see docs for addKeyword");
            def2.keyword = keyword2;
          }
        } else if (typeof kwdOrDef == "object" && def2 === void 0) {
          def2 = kwdOrDef;
          keyword2 = def2.keyword;
          if (Array.isArray(keyword2) && !keyword2.length) {
            throw new Error("addKeywords: keyword must be string or non-empty array");
          }
        } else {
          throw new Error("invalid addKeywords parameters");
        }
        checkKeyword.call(this, keyword2, def2);
        if (!def2) {
          (0, util_1.eachItem)(keyword2, (kwd) => addRule.call(this, kwd));
          return this;
        }
        keywordMetaschema.call(this, def2);
        const definition = {
          ...def2,
          type: (0, dataType_1.getJSONTypes)(def2.type),
          schemaType: (0, dataType_1.getJSONTypes)(def2.schemaType)
        };
        (0, util_1.eachItem)(keyword2, definition.type.length === 0 ? (k) => addRule.call(this, k, definition) : (k) => definition.type.forEach((t) => addRule.call(this, k, definition, t)));
        return this;
      }
      getKeyword(keyword2) {
        const rule = this.RULES.all[keyword2];
        return typeof rule == "object" ? rule.definition : !!rule;
      }
      removeKeyword(keyword2) {
        const { RULES } = this;
        delete RULES.keywords[keyword2];
        delete RULES.all[keyword2];
        for (const group of RULES.rules) {
          const i = group.rules.findIndex((rule) => rule.keyword === keyword2);
          if (i >= 0)
            group.rules.splice(i, 1);
        }
        return this;
      }
      addFormat(name, format2) {
        if (typeof format2 == "string")
          format2 = new RegExp(format2);
        this.formats[name] = format2;
        return this;
      }
      errorsText(errors2 = this.errors, { separator = ", ", dataVar = "data" } = {}) {
        if (!errors2 || errors2.length === 0)
          return "No errors";
        return errors2.map((e) => `${dataVar}${e.instancePath} ${e.message}`).reduce((text, msg) => text + separator + msg);
      }
      $dataMetaSchema(metaSchema, keywordsJsonPointers) {
        const rules2 = this.RULES.all;
        metaSchema = JSON.parse(JSON.stringify(metaSchema));
        for (const jsonPointer of keywordsJsonPointers) {
          const segments = jsonPointer.split("/").slice(1);
          let keywords = metaSchema;
          for (const seg of segments)
            keywords = keywords[seg];
          for (const key in rules2) {
            const rule = rules2[key];
            if (typeof rule != "object")
              continue;
            const { $data } = rule.definition;
            const schema = keywords[key];
            if ($data && schema)
              keywords[key] = schemaOrData(schema);
          }
        }
        return metaSchema;
      }
      _removeAllSchemas(schemas, regex2) {
        for (const keyRef in schemas) {
          const sch = schemas[keyRef];
          if (!regex2 || regex2.test(keyRef)) {
            if (typeof sch == "string") {
              delete schemas[keyRef];
            } else if (sch && !sch.meta) {
              this._cache.delete(sch.schema);
              delete schemas[keyRef];
            }
          }
        }
      }
      _addSchema(schema, meta, baseId, validateSchema = this.opts.validateSchema, addSchema = this.opts.addUsedSchema) {
        let id2;
        const { schemaId } = this.opts;
        if (typeof schema == "object") {
          id2 = schema[schemaId];
        } else {
          if (this.opts.jtd)
            throw new Error("schema must be object");
          else if (typeof schema != "boolean")
            throw new Error("schema must be object or boolean");
        }
        let sch = this._cache.get(schema);
        if (sch !== void 0)
          return sch;
        baseId = (0, resolve_1.normalizeId)(id2 || baseId);
        const localRefs = resolve_1.getSchemaRefs.call(this, schema, baseId);
        sch = new compile_1.SchemaEnv({ schema, schemaId, meta, baseId, localRefs });
        this._cache.set(sch.schema, sch);
        if (addSchema && !baseId.startsWith("#")) {
          if (baseId)
            this._checkUnique(baseId);
          this.refs[baseId] = sch;
        }
        if (validateSchema)
          this.validateSchema(schema, true);
        return sch;
      }
      _checkUnique(id2) {
        if (this.schemas[id2] || this.refs[id2]) {
          throw new Error(`schema with key or id "${id2}" already exists`);
        }
      }
      _compileSchemaEnv(sch) {
        if (sch.meta)
          this._compileMetaSchema(sch);
        else
          compile_1.compileSchema.call(this, sch);
        if (!sch.validate)
          throw new Error("ajv implementation error");
        return sch.validate;
      }
      _compileMetaSchema(sch) {
        const currentOpts = this.opts;
        this.opts = this._metaOpts;
        try {
          compile_1.compileSchema.call(this, sch);
        } finally {
          this.opts = currentOpts;
        }
      }
    }
    Ajv2.ValidationError = validation_error_1.default;
    Ajv2.MissingRefError = ref_error_1.default;
    exports$1.default = Ajv2;
    function checkOptions(checkOpts, options2, msg, log = "error") {
      for (const key in checkOpts) {
        const opt = key;
        if (opt in options2)
          this.logger[log](`${msg}: option ${key}. ${checkOpts[opt]}`);
      }
    }
    function getSchEnv(keyRef) {
      keyRef = (0, resolve_1.normalizeId)(keyRef);
      return this.schemas[keyRef] || this.refs[keyRef];
    }
    function addInitialSchemas() {
      const optsSchemas = this.opts.schemas;
      if (!optsSchemas)
        return;
      if (Array.isArray(optsSchemas))
        this.addSchema(optsSchemas);
      else
        for (const key in optsSchemas)
          this.addSchema(optsSchemas[key], key);
    }
    function addInitialFormats() {
      for (const name in this.opts.formats) {
        const format2 = this.opts.formats[name];
        if (format2)
          this.addFormat(name, format2);
      }
    }
    function addInitialKeywords(defs) {
      if (Array.isArray(defs)) {
        this.addVocabulary(defs);
        return;
      }
      this.logger.warn("keywords option as map is deprecated, pass array");
      for (const keyword2 in defs) {
        const def2 = defs[keyword2];
        if (!def2.keyword)
          def2.keyword = keyword2;
        this.addKeyword(def2);
      }
    }
    function getMetaSchemaOptions() {
      const metaOpts = { ...this.opts };
      for (const opt of META_IGNORE_OPTIONS)
        delete metaOpts[opt];
      return metaOpts;
    }
    const noLogs = { log() {
    }, warn() {
    }, error() {
    } };
    function getLogger(logger2) {
      if (logger2 === false)
        return noLogs;
      if (logger2 === void 0)
        return console;
      if (logger2.log && logger2.warn && logger2.error)
        return logger2;
      throw new Error("logger must implement log, warn and error methods");
    }
    const KEYWORD_NAME = /^[a-z_$][a-z0-9_$:-]*$/i;
    function checkKeyword(keyword2, def2) {
      const { RULES } = this;
      (0, util_1.eachItem)(keyword2, (kwd) => {
        if (RULES.keywords[kwd])
          throw new Error(`Keyword ${kwd} is already defined`);
        if (!KEYWORD_NAME.test(kwd))
          throw new Error(`Keyword ${kwd} has invalid name`);
      });
      if (!def2)
        return;
      if (def2.$data && !("code" in def2 || "validate" in def2)) {
        throw new Error('$data keyword must have "code" or "validate" function');
      }
    }
    function addRule(keyword2, definition, dataType2) {
      var _a4;
      const post = definition === null || definition === void 0 ? void 0 : definition.post;
      if (dataType2 && post)
        throw new Error('keyword with "post" flag cannot have "type"');
      const { RULES } = this;
      let ruleGroup = post ? RULES.post : RULES.rules.find(({ type: t }) => t === dataType2);
      if (!ruleGroup) {
        ruleGroup = { type: dataType2, rules: [] };
        RULES.rules.push(ruleGroup);
      }
      RULES.keywords[keyword2] = true;
      if (!definition)
        return;
      const rule = {
        keyword: keyword2,
        definition: {
          ...definition,
          type: (0, dataType_1.getJSONTypes)(definition.type),
          schemaType: (0, dataType_1.getJSONTypes)(definition.schemaType)
        }
      };
      if (definition.before)
        addBeforeRule.call(this, ruleGroup, rule, definition.before);
      else
        ruleGroup.rules.push(rule);
      RULES.all[keyword2] = rule;
      (_a4 = definition.implements) === null || _a4 === void 0 ? void 0 : _a4.forEach((kwd) => this.addKeyword(kwd));
    }
    function addBeforeRule(ruleGroup, rule, before) {
      const i = ruleGroup.rules.findIndex((_rule) => _rule.keyword === before);
      if (i >= 0) {
        ruleGroup.rules.splice(i, 0, rule);
      } else {
        ruleGroup.rules.push(rule);
        this.logger.warn(`rule ${before} is not defined`);
      }
    }
    function keywordMetaschema(def2) {
      let { metaSchema } = def2;
      if (metaSchema === void 0)
        return;
      if (def2.$data && this.opts.$data)
        metaSchema = schemaOrData(metaSchema);
      def2.validateSchema = this.compile(metaSchema, true);
    }
    const $dataRef = {
      $ref: "https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"
    };
    function schemaOrData(schema) {
      return { anyOf: [schema, $dataRef] };
    }
  })(core$3);
  return core$3;
}
function requireId() {
  if (hasRequiredId) return id;
  hasRequiredId = 1;
  Object.defineProperty(id, "__esModule", { value: true });
  const def2 = {
    keyword: "id",
    code() {
      throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID');
    }
  };
  id.default = def2;
  return id;
}
function requireRef() {
  if (hasRequiredRef) return ref;
  hasRequiredRef = 1;
  Object.defineProperty(ref, "__esModule", { value: true });
  ref.callRef = ref.getValidate = void 0;
  const ref_error_1 = requireRef_error();
  const code_1 = requireCode$1();
  const codegen_1 = requireCodegen();
  const names_1 = requireNames();
  const compile_1 = requireCompile$1();
  const util_1 = requireUtil$3();
  const def2 = {
    keyword: "$ref",
    schemaType: "string",
    code(cxt) {
      const { gen, schema: $ref, it } = cxt;
      const { baseId, schemaEnv: env2, validateName, opts, self: self2 } = it;
      const { root: root2 } = env2;
      if (($ref === "#" || $ref === "#/") && baseId === root2.baseId)
        return callRootRef();
      const schOrEnv = compile_1.resolveRef.call(self2, root2, baseId, $ref);
      if (schOrEnv === void 0)
        throw new ref_error_1.default(it.opts.uriResolver, baseId, $ref);
      if (schOrEnv instanceof compile_1.SchemaEnv)
        return callValidate(schOrEnv);
      return inlineRefSchema(schOrEnv);
      function callRootRef() {
        if (env2 === root2)
          return callRef(cxt, validateName, env2, env2.$async);
        const rootName = gen.scopeValue("root", { ref: root2 });
        return callRef(cxt, (0, codegen_1._)`${rootName}.validate`, root2, root2.$async);
      }
      function callValidate(sch) {
        const v = getValidate(cxt, sch);
        callRef(cxt, v, sch, sch.$async);
      }
      function inlineRefSchema(sch) {
        const schName = gen.scopeValue("schema", opts.code.source === true ? { ref: sch, code: (0, codegen_1.stringify)(sch) } : { ref: sch });
        const valid2 = gen.name("valid");
        const schCxt = cxt.subschema({
          schema: sch,
          dataTypes: [],
          schemaPath: codegen_1.nil,
          topSchemaRef: schName,
          errSchemaPath: $ref
        }, valid2);
        cxt.mergeEvaluated(schCxt);
        cxt.ok(valid2);
      }
    }
  };
  function getValidate(cxt, sch) {
    const { gen } = cxt;
    return sch.validate ? gen.scopeValue("validate", { ref: sch.validate }) : (0, codegen_1._)`${gen.scopeValue("wrapper", { ref: sch })}.validate`;
  }
  ref.getValidate = getValidate;
  function callRef(cxt, v, sch, $async) {
    const { gen, it } = cxt;
    const { allErrors, schemaEnv: env2, opts } = it;
    const passCxt = opts.passContext ? names_1.default.this : codegen_1.nil;
    if ($async)
      callAsyncRef();
    else
      callSyncRef();
    function callAsyncRef() {
      if (!env2.$async)
        throw new Error("async schema referenced by sync schema");
      const valid2 = gen.let("valid");
      gen.try(() => {
        gen.code((0, codegen_1._)`await ${(0, code_1.callValidateCode)(cxt, v, passCxt)}`);
        addEvaluatedFrom(v);
        if (!allErrors)
          gen.assign(valid2, true);
      }, (e) => {
        gen.if((0, codegen_1._)`!(${e} instanceof ${it.ValidationError})`, () => gen.throw(e));
        addErrorsFrom(e);
        if (!allErrors)
          gen.assign(valid2, false);
      });
      cxt.ok(valid2);
    }
    function callSyncRef() {
      cxt.result((0, code_1.callValidateCode)(cxt, v, passCxt), () => addEvaluatedFrom(v), () => addErrorsFrom(v));
    }
    function addErrorsFrom(source2) {
      const errs = (0, codegen_1._)`${source2}.errors`;
      gen.assign(names_1.default.vErrors, (0, codegen_1._)`${names_1.default.vErrors} === null ? ${errs} : ${names_1.default.vErrors}.concat(${errs})`);
      gen.assign(names_1.default.errors, (0, codegen_1._)`${names_1.default.vErrors}.length`);
    }
    function addEvaluatedFrom(source2) {
      var _a4;
      if (!it.opts.unevaluated)
        return;
      const schEvaluated = (_a4 = sch === null || sch === void 0 ? void 0 : sch.validate) === null || _a4 === void 0 ? void 0 : _a4.evaluated;
      if (it.props !== true) {
        if (schEvaluated && !schEvaluated.dynamicProps) {
          if (schEvaluated.props !== void 0) {
            it.props = util_1.mergeEvaluated.props(gen, schEvaluated.props, it.props);
          }
        } else {
          const props = gen.var("props", (0, codegen_1._)`${source2}.evaluated.props`);
          it.props = util_1.mergeEvaluated.props(gen, props, it.props, codegen_1.Name);
        }
      }
      if (it.items !== true) {
        if (schEvaluated && !schEvaluated.dynamicItems) {
          if (schEvaluated.items !== void 0) {
            it.items = util_1.mergeEvaluated.items(gen, schEvaluated.items, it.items);
          }
        } else {
          const items2 = gen.var("items", (0, codegen_1._)`${source2}.evaluated.items`);
          it.items = util_1.mergeEvaluated.items(gen, items2, it.items, codegen_1.Name);
        }
      }
    }
  }
  ref.callRef = callRef;
  ref.default = def2;
  return ref;
}
function requireCore$1() {
  if (hasRequiredCore$1) return core$2;
  hasRequiredCore$1 = 1;
  Object.defineProperty(core$2, "__esModule", { value: true });
  const id_1 = requireId();
  const ref_1 = requireRef();
  const core2 = [
    "$schema",
    "$id",
    "$defs",
    "$vocabulary",
    { keyword: "$comment" },
    "definitions",
    id_1.default,
    ref_1.default
  ];
  core$2.default = core2;
  return core$2;
}
function requireLimitNumber() {
  if (hasRequiredLimitNumber) return limitNumber;
  hasRequiredLimitNumber = 1;
  Object.defineProperty(limitNumber, "__esModule", { value: true });
  const codegen_1 = requireCodegen();
  const ops = codegen_1.operators;
  const KWDs = {
    maximum: { okStr: "<=", ok: ops.LTE, fail: ops.GT },
    minimum: { okStr: ">=", ok: ops.GTE, fail: ops.LT },
    exclusiveMaximum: { okStr: "<", ok: ops.LT, fail: ops.GTE },
    exclusiveMinimum: { okStr: ">", ok: ops.GT, fail: ops.LTE }
  };
  const error = {
    message: ({ keyword: keyword2, schemaCode }) => (0, codegen_1.str)`must be ${KWDs[keyword2].okStr} ${schemaCode}`,
    params: ({ keyword: keyword2, schemaCode }) => (0, codegen_1._)`{comparison: ${KWDs[keyword2].okStr}, limit: ${schemaCode}}`
  };
  const def2 = {
    keyword: Object.keys(KWDs),
    type: "number",
    schemaType: "number",
    $data: true,
    error,
    code(cxt) {
      const { keyword: keyword2, data: data32, schemaCode } = cxt;
      cxt.fail$data((0, codegen_1._)`${data32} ${KWDs[keyword2].fail} ${schemaCode} || isNaN(${data32})`);
    }
  };
  limitNumber.default = def2;
  return limitNumber;
}
function requireMultipleOf() {
  if (hasRequiredMultipleOf) return multipleOf;
  hasRequiredMultipleOf = 1;
  Object.defineProperty(multipleOf, "__esModule", { value: true });
  const codegen_1 = requireCodegen();
  const error = {
    message: ({ schemaCode }) => (0, codegen_1.str)`must be multiple of ${schemaCode}`,
    params: ({ schemaCode }) => (0, codegen_1._)`{multipleOf: ${schemaCode}}`
  };
  const def2 = {
    keyword: "multipleOf",
    type: "number",
    schemaType: "number",
    $data: true,
    error,
    code(cxt) {
      const { gen, data: data32, schemaCode, it } = cxt;
      const prec = it.opts.multipleOfPrecision;
      const res = gen.let("res");
      const invalid = prec ? (0, codegen_1._)`Math.abs(Math.round(${res}) - ${res}) > 1e-${prec}` : (0, codegen_1._)`${res} !== parseInt(${res})`;
      cxt.fail$data((0, codegen_1._)`(${schemaCode} === 0 || (${res} = ${data32}/${schemaCode}, ${invalid}))`);
    }
  };
  multipleOf.default = def2;
  return multipleOf;
}
function requireUcs2length() {
  if (hasRequiredUcs2length) return ucs2length;
  hasRequiredUcs2length = 1;
  Object.defineProperty(ucs2length, "__esModule", { value: true });
  function ucs2length$12(str) {
    const len = str.length;
    let length = 0;
    let pos = 0;
    let value;
    while (pos < len) {
      length++;
      value = str.charCodeAt(pos++);
      if (value >= 55296 && value <= 56319 && pos < len) {
        value = str.charCodeAt(pos);
        if ((value & 64512) === 56320)
          pos++;
      }
    }
    return length;
  }
  ucs2length.default = ucs2length$12;
  ucs2length$12.code = 'require("ajv/dist/runtime/ucs2length").default';
  return ucs2length;
}
function requireLimitLength() {
  if (hasRequiredLimitLength) return limitLength;
  hasRequiredLimitLength = 1;
  Object.defineProperty(limitLength, "__esModule", { value: true });
  const codegen_1 = requireCodegen();
  const util_1 = requireUtil$3();
  const ucs2length_1 = requireUcs2length();
  const error = {
    message({ keyword: keyword2, schemaCode }) {
      const comp = keyword2 === "maxLength" ? "more" : "fewer";
      return (0, codegen_1.str)`must NOT have ${comp} than ${schemaCode} characters`;
    },
    params: ({ schemaCode }) => (0, codegen_1._)`{limit: ${schemaCode}}`
  };
  const def2 = {
    keyword: ["maxLength", "minLength"],
    type: "string",
    schemaType: "number",
    $data: true,
    error,
    code(cxt) {
      const { keyword: keyword2, data: data32, schemaCode, it } = cxt;
      const op = keyword2 === "maxLength" ? codegen_1.operators.GT : codegen_1.operators.LT;
      const len = it.opts.unicode === false ? (0, codegen_1._)`${data32}.length` : (0, codegen_1._)`${(0, util_1.useFunc)(cxt.gen, ucs2length_1.default)}(${data32})`;
      cxt.fail$data((0, codegen_1._)`${len} ${op} ${schemaCode}`);
    }
  };
  limitLength.default = def2;
  return limitLength;
}
function requirePattern() {
  if (hasRequiredPattern) return pattern;
  hasRequiredPattern = 1;
  Object.defineProperty(pattern, "__esModule", { value: true });
  const code_1 = requireCode$1();
  const codegen_1 = requireCodegen();
  const error = {
    message: ({ schemaCode }) => (0, codegen_1.str)`must match pattern "${schemaCode}"`,
    params: ({ schemaCode }) => (0, codegen_1._)`{pattern: ${schemaCode}}`
  };
  const def2 = {
    keyword: "pattern",
    type: "string",
    schemaType: "string",
    $data: true,
    error,
    code(cxt) {
      const { data: data32, $data, schema, schemaCode, it } = cxt;
      const u = it.opts.unicodeRegExp ? "u" : "";
      const regExp = $data ? (0, codegen_1._)`(new RegExp(${schemaCode}, ${u}))` : (0, code_1.usePattern)(cxt, schema);
      cxt.fail$data((0, codegen_1._)`!${regExp}.test(${data32})`);
    }
  };
  pattern.default = def2;
  return pattern;
}
function requireLimitProperties() {
  if (hasRequiredLimitProperties) return limitProperties;
  hasRequiredLimitProperties = 1;
  Object.defineProperty(limitProperties, "__esModule", { value: true });
  const codegen_1 = requireCodegen();
  const error = {
    message({ keyword: keyword2, schemaCode }) {
      const comp = keyword2 === "maxProperties" ? "more" : "fewer";
      return (0, codegen_1.str)`must NOT have ${comp} than ${schemaCode} properties`;
    },
    params: ({ schemaCode }) => (0, codegen_1._)`{limit: ${schemaCode}}`
  };
  const def2 = {
    keyword: ["maxProperties", "minProperties"],
    type: "object",
    schemaType: "number",
    $data: true,
    error,
    code(cxt) {
      const { keyword: keyword2, data: data32, schemaCode } = cxt;
      const op = keyword2 === "maxProperties" ? codegen_1.operators.GT : codegen_1.operators.LT;
      cxt.fail$data((0, codegen_1._)`Object.keys(${data32}).length ${op} ${schemaCode}`);
    }
  };
  limitProperties.default = def2;
  return limitProperties;
}
function requireRequired() {
  if (hasRequiredRequired) return required;
  hasRequiredRequired = 1;
  Object.defineProperty(required, "__esModule", { value: true });
  const code_1 = requireCode$1();
  const codegen_1 = requireCodegen();
  const util_1 = requireUtil$3();
  const error = {
    message: ({ params: { missingProperty } }) => (0, codegen_1.str)`must have required property '${missingProperty}'`,
    params: ({ params: { missingProperty } }) => (0, codegen_1._)`{missingProperty: ${missingProperty}}`
  };
  const def2 = {
    keyword: "required",
    type: "object",
    schemaType: "array",
    $data: true,
    error,
    code(cxt) {
      const { gen, schema, schemaCode, data: data32, $data, it } = cxt;
      const { opts } = it;
      if (!$data && schema.length === 0)
        return;
      const useLoop = schema.length >= opts.loopRequired;
      if (it.allErrors)
        allErrorsMode();
      else
        exitOnErrorMode();
      if (opts.strictRequired) {
        const props = cxt.parentSchema.properties;
        const { definedProperties } = cxt.it;
        for (const requiredKey of schema) {
          if ((props === null || props === void 0 ? void 0 : props[requiredKey]) === void 0 && !definedProperties.has(requiredKey)) {
            const schemaPath = it.schemaEnv.baseId + it.errSchemaPath;
            const msg = `required property "${requiredKey}" is not defined at "${schemaPath}" (strictRequired)`;
            (0, util_1.checkStrictMode)(it, msg, it.opts.strictRequired);
          }
        }
      }
      function allErrorsMode() {
        if (useLoop || $data) {
          cxt.block$data(codegen_1.nil, loopAllRequired);
        } else {
          for (const prop of schema) {
            (0, code_1.checkReportMissingProp)(cxt, prop);
          }
        }
      }
      function exitOnErrorMode() {
        const missing = gen.let("missing");
        if (useLoop || $data) {
          const valid2 = gen.let("valid", true);
          cxt.block$data(valid2, () => loopUntilMissing(missing, valid2));
          cxt.ok(valid2);
        } else {
          gen.if((0, code_1.checkMissingProp)(cxt, schema, missing));
          (0, code_1.reportMissingProp)(cxt, missing);
          gen.else();
        }
      }
      function loopAllRequired() {
        gen.forOf("prop", schemaCode, (prop) => {
          cxt.setParams({ missingProperty: prop });
          gen.if((0, code_1.noPropertyInData)(gen, data32, prop, opts.ownProperties), () => cxt.error());
        });
      }
      function loopUntilMissing(missing, valid2) {
        cxt.setParams({ missingProperty: missing });
        gen.forOf(missing, schemaCode, () => {
          gen.assign(valid2, (0, code_1.propertyInData)(gen, data32, missing, opts.ownProperties));
          gen.if((0, codegen_1.not)(valid2), () => {
            cxt.error();
            gen.break();
          });
        }, codegen_1.nil);
      }
    }
  };
  required.default = def2;
  return required;
}
function requireLimitItems() {
  if (hasRequiredLimitItems) return limitItems;
  hasRequiredLimitItems = 1;
  Object.defineProperty(limitItems, "__esModule", { value: true });
  const codegen_1 = requireCodegen();
  const error = {
    message({ keyword: keyword2, schemaCode }) {
      const comp = keyword2 === "maxItems" ? "more" : "fewer";
      return (0, codegen_1.str)`must NOT have ${comp} than ${schemaCode} items`;
    },
    params: ({ schemaCode }) => (0, codegen_1._)`{limit: ${schemaCode}}`
  };
  const def2 = {
    keyword: ["maxItems", "minItems"],
    type: "array",
    schemaType: "number",
    $data: true,
    error,
    code(cxt) {
      const { keyword: keyword2, data: data32, schemaCode } = cxt;
      const op = keyword2 === "maxItems" ? codegen_1.operators.GT : codegen_1.operators.LT;
      cxt.fail$data((0, codegen_1._)`${data32}.length ${op} ${schemaCode}`);
    }
  };
  limitItems.default = def2;
  return limitItems;
}
function requireEqual() {
  if (hasRequiredEqual) return equal;
  hasRequiredEqual = 1;
  Object.defineProperty(equal, "__esModule", { value: true });
  const equal$12 = requireFastDeepEqual();
  equal$12.code = 'require("ajv/dist/runtime/equal").default';
  equal.default = equal$12;
  return equal;
}
function requireUniqueItems() {
  if (hasRequiredUniqueItems) return uniqueItems;
  hasRequiredUniqueItems = 1;
  Object.defineProperty(uniqueItems, "__esModule", { value: true });
  const dataType_1 = requireDataType();
  const codegen_1 = requireCodegen();
  const util_1 = requireUtil$3();
  const equal_1 = requireEqual();
  const error = {
    message: ({ params: { i, j } }) => (0, codegen_1.str)`must NOT have duplicate items (items ## ${j} and ${i} are identical)`,
    params: ({ params: { i, j } }) => (0, codegen_1._)`{i: ${i}, j: ${j}}`
  };
  const def2 = {
    keyword: "uniqueItems",
    type: "array",
    schemaType: "boolean",
    $data: true,
    error,
    code(cxt) {
      const { gen, data: data32, $data, schema, parentSchema, schemaCode, it } = cxt;
      if (!$data && !schema)
        return;
      const valid2 = gen.let("valid");
      const itemTypes = parentSchema.items ? (0, dataType_1.getSchemaTypes)(parentSchema.items) : [];
      cxt.block$data(valid2, validateUniqueItems, (0, codegen_1._)`${schemaCode} === false`);
      cxt.ok(valid2);
      function validateUniqueItems() {
        const i = gen.let("i", (0, codegen_1._)`${data32}.length`);
        const j = gen.let("j");
        cxt.setParams({ i, j });
        gen.assign(valid2, true);
        gen.if((0, codegen_1._)`${i} > 1`, () => (canOptimize() ? loopN : loopN2)(i, j));
      }
      function canOptimize() {
        return itemTypes.length > 0 && !itemTypes.some((t) => t === "object" || t === "array");
      }
      function loopN(i, j) {
        const item = gen.name("item");
        const wrongType = (0, dataType_1.checkDataTypes)(itemTypes, item, it.opts.strictNumbers, dataType_1.DataType.Wrong);
        const indices = gen.const("indices", (0, codegen_1._)`{}`);
        gen.for((0, codegen_1._)`;${i}--;`, () => {
          gen.let(item, (0, codegen_1._)`${data32}[${i}]`);
          gen.if(wrongType, (0, codegen_1._)`continue`);
          if (itemTypes.length > 1)
            gen.if((0, codegen_1._)`typeof ${item} == "string"`, (0, codegen_1._)`${item} += "_"`);
          gen.if((0, codegen_1._)`typeof ${indices}[${item}] == "number"`, () => {
            gen.assign(j, (0, codegen_1._)`${indices}[${item}]`);
            cxt.error();
            gen.assign(valid2, false).break();
          }).code((0, codegen_1._)`${indices}[${item}] = ${i}`);
        });
      }
      function loopN2(i, j) {
        const eql = (0, util_1.useFunc)(gen, equal_1.default);
        const outer = gen.name("outer");
        gen.label(outer).for((0, codegen_1._)`;${i}--;`, () => gen.for((0, codegen_1._)`${j} = ${i}; ${j}--;`, () => gen.if((0, codegen_1._)`${eql}(${data32}[${i}], ${data32}[${j}])`, () => {
          cxt.error();
          gen.assign(valid2, false).break(outer);
        })));
      }
    }
  };
  uniqueItems.default = def2;
  return uniqueItems;
}
function require_const() {
  if (hasRequired_const) return _const;
  hasRequired_const = 1;
  Object.defineProperty(_const, "__esModule", { value: true });
  const codegen_1 = requireCodegen();
  const util_1 = requireUtil$3();
  const equal_1 = requireEqual();
  const error = {
    message: "must be equal to constant",
    params: ({ schemaCode }) => (0, codegen_1._)`{allowedValue: ${schemaCode}}`
  };
  const def2 = {
    keyword: "const",
    $data: true,
    error,
    code(cxt) {
      const { gen, data: data32, $data, schemaCode, schema } = cxt;
      if ($data || schema && typeof schema == "object") {
        cxt.fail$data((0, codegen_1._)`!${(0, util_1.useFunc)(gen, equal_1.default)}(${data32}, ${schemaCode})`);
      } else {
        cxt.fail((0, codegen_1._)`${schema} !== ${data32}`);
      }
    }
  };
  _const.default = def2;
  return _const;
}
function require_enum() {
  if (hasRequired_enum) return _enum;
  hasRequired_enum = 1;
  Object.defineProperty(_enum, "__esModule", { value: true });
  const codegen_1 = requireCodegen();
  const util_1 = requireUtil$3();
  const equal_1 = requireEqual();
  const error = {
    message: "must be equal to one of the allowed values",
    params: ({ schemaCode }) => (0, codegen_1._)`{allowedValues: ${schemaCode}}`
  };
  const def2 = {
    keyword: "enum",
    schemaType: "array",
    $data: true,
    error,
    code(cxt) {
      const { gen, data: data32, $data, schema, schemaCode, it } = cxt;
      if (!$data && schema.length === 0)
        throw new Error("enum must have non-empty array");
      const useLoop = schema.length >= it.opts.loopEnum;
      let eql;
      const getEql = () => eql !== null && eql !== void 0 ? eql : eql = (0, util_1.useFunc)(gen, equal_1.default);
      let valid2;
      if (useLoop || $data) {
        valid2 = gen.let("valid");
        cxt.block$data(valid2, loopEnum);
      } else {
        if (!Array.isArray(schema))
          throw new Error("ajv implementation error");
        const vSchema = gen.const("vSchema", schemaCode);
        valid2 = (0, codegen_1.or)(...schema.map((_x, i) => equalCode(vSchema, i)));
      }
      cxt.pass(valid2);
      function loopEnum() {
        gen.assign(valid2, false);
        gen.forOf("v", schemaCode, (v) => gen.if((0, codegen_1._)`${getEql()}(${data32}, ${v})`, () => gen.assign(valid2, true).break()));
      }
      function equalCode(vSchema, i) {
        const sch = schema[i];
        return typeof sch === "object" && sch !== null ? (0, codegen_1._)`${getEql()}(${data32}, ${vSchema}[${i}])` : (0, codegen_1._)`${data32} === ${sch}`;
      }
    }
  };
  _enum.default = def2;
  return _enum;
}
function requireValidation$1() {
  if (hasRequiredValidation$1) return validation$1;
  hasRequiredValidation$1 = 1;
  Object.defineProperty(validation$1, "__esModule", { value: true });
  const limitNumber_1 = requireLimitNumber();
  const multipleOf_1 = requireMultipleOf();
  const limitLength_1 = requireLimitLength();
  const pattern_1 = requirePattern();
  const limitProperties_1 = requireLimitProperties();
  const required_1 = requireRequired();
  const limitItems_1 = requireLimitItems();
  const uniqueItems_1 = requireUniqueItems();
  const const_1 = require_const();
  const enum_1 = require_enum();
  const validation2 = [
    limitNumber_1.default,
    multipleOf_1.default,
    limitLength_1.default,
    pattern_1.default,
    limitProperties_1.default,
    required_1.default,
    limitItems_1.default,
    uniqueItems_1.default,
    { keyword: "type", schemaType: ["string", "array"] },
    { keyword: "nullable", schemaType: "boolean" },
    const_1.default,
    enum_1.default
  ];
  validation$1.default = validation2;
  return validation$1;
}
function requireAdditionalItems() {
  if (hasRequiredAdditionalItems) return additionalItems;
  hasRequiredAdditionalItems = 1;
  Object.defineProperty(additionalItems, "__esModule", { value: true });
  additionalItems.validateAdditionalItems = void 0;
  const codegen_1 = requireCodegen();
  const util_1 = requireUtil$3();
  const error = {
    message: ({ params: { len } }) => (0, codegen_1.str)`must NOT have more than ${len} items`,
    params: ({ params: { len } }) => (0, codegen_1._)`{limit: ${len}}`
  };
  const def2 = {
    keyword: "additionalItems",
    type: "array",
    schemaType: ["boolean", "object"],
    before: "uniqueItems",
    error,
    code(cxt) {
      const { parentSchema, it } = cxt;
      const { items: items2 } = parentSchema;
      if (!Array.isArray(items2)) {
        (0, util_1.checkStrictMode)(it, '"additionalItems" is ignored when "items" is not an array of schemas');
        return;
      }
      validateAdditionalItems(cxt, items2);
    }
  };
  function validateAdditionalItems(cxt, items2) {
    const { gen, schema, data: data32, keyword: keyword2, it } = cxt;
    it.items = true;
    const len = gen.const("len", (0, codegen_1._)`${data32}.length`);
    if (schema === false) {
      cxt.setParams({ len: items2.length });
      cxt.pass((0, codegen_1._)`${len} <= ${items2.length}`);
    } else if (typeof schema == "object" && !(0, util_1.alwaysValidSchema)(it, schema)) {
      const valid2 = gen.var("valid", (0, codegen_1._)`${len} <= ${items2.length}`);
      gen.if((0, codegen_1.not)(valid2), () => validateItems(valid2));
      cxt.ok(valid2);
    }
    function validateItems(valid2) {
      gen.forRange("i", items2.length, len, (i) => {
        cxt.subschema({ keyword: keyword2, dataProp: i, dataPropType: util_1.Type.Num }, valid2);
        if (!it.allErrors)
          gen.if((0, codegen_1.not)(valid2), () => gen.break());
      });
    }
  }
  additionalItems.validateAdditionalItems = validateAdditionalItems;
  additionalItems.default = def2;
  return additionalItems;
}
function requireItems() {
  if (hasRequiredItems) return items;
  hasRequiredItems = 1;
  Object.defineProperty(items, "__esModule", { value: true });
  items.validateTuple = void 0;
  const codegen_1 = requireCodegen();
  const util_1 = requireUtil$3();
  const code_1 = requireCode$1();
  const def2 = {
    keyword: "items",
    type: "array",
    schemaType: ["object", "array", "boolean"],
    before: "uniqueItems",
    code(cxt) {
      const { schema, it } = cxt;
      if (Array.isArray(schema))
        return validateTuple(cxt, "additionalItems", schema);
      it.items = true;
      if ((0, util_1.alwaysValidSchema)(it, schema))
        return;
      cxt.ok((0, code_1.validateArray)(cxt));
    }
  };
  function validateTuple(cxt, extraItems, schArr = cxt.schema) {
    const { gen, parentSchema, data: data32, keyword: keyword2, it } = cxt;
    checkStrictTuple(parentSchema);
    if (it.opts.unevaluated && schArr.length && it.items !== true) {
      it.items = util_1.mergeEvaluated.items(gen, schArr.length, it.items);
    }
    const valid2 = gen.name("valid");
    const len = gen.const("len", (0, codegen_1._)`${data32}.length`);
    schArr.forEach((sch, i) => {
      if ((0, util_1.alwaysValidSchema)(it, sch))
        return;
      gen.if((0, codegen_1._)`${len} > ${i}`, () => cxt.subschema({
        keyword: keyword2,
        schemaProp: i,
        dataProp: i
      }, valid2));
      cxt.ok(valid2);
    });
    function checkStrictTuple(sch) {
      const { opts, errSchemaPath } = it;
      const l = schArr.length;
      const fullTuple = l === sch.minItems && (l === sch.maxItems || sch[extraItems] === false);
      if (opts.strictTuples && !fullTuple) {
        const msg = `"${keyword2}" is ${l}-tuple, but minItems or maxItems/${extraItems} are not specified or different at path "${errSchemaPath}"`;
        (0, util_1.checkStrictMode)(it, msg, opts.strictTuples);
      }
    }
  }
  items.validateTuple = validateTuple;
  items.default = def2;
  return items;
}
function requirePrefixItems() {
  if (hasRequiredPrefixItems) return prefixItems;
  hasRequiredPrefixItems = 1;
  Object.defineProperty(prefixItems, "__esModule", { value: true });
  const items_1 = requireItems();
  const def2 = {
    keyword: "prefixItems",
    type: "array",
    schemaType: ["array"],
    before: "uniqueItems",
    code: (cxt) => (0, items_1.validateTuple)(cxt, "items")
  };
  prefixItems.default = def2;
  return prefixItems;
}
function requireItems2020() {
  if (hasRequiredItems2020) return items2020;
  hasRequiredItems2020 = 1;
  Object.defineProperty(items2020, "__esModule", { value: true });
  const codegen_1 = requireCodegen();
  const util_1 = requireUtil$3();
  const code_1 = requireCode$1();
  const additionalItems_1 = requireAdditionalItems();
  const error = {
    message: ({ params: { len } }) => (0, codegen_1.str)`must NOT have more than ${len} items`,
    params: ({ params: { len } }) => (0, codegen_1._)`{limit: ${len}}`
  };
  const def2 = {
    keyword: "items",
    type: "array",
    schemaType: ["object", "boolean"],
    before: "uniqueItems",
    error,
    code(cxt) {
      const { schema, parentSchema, it } = cxt;
      const { prefixItems: prefixItems2 } = parentSchema;
      it.items = true;
      if ((0, util_1.alwaysValidSchema)(it, schema))
        return;
      if (prefixItems2)
        (0, additionalItems_1.validateAdditionalItems)(cxt, prefixItems2);
      else
        cxt.ok((0, code_1.validateArray)(cxt));
    }
  };
  items2020.default = def2;
  return items2020;
}
function requireContains() {
  if (hasRequiredContains) return contains$1;
  hasRequiredContains = 1;
  Object.defineProperty(contains$1, "__esModule", { value: true });
  const codegen_1 = requireCodegen();
  const util_1 = requireUtil$3();
  const error = {
    message: ({ params: { min, max } }) => max === void 0 ? (0, codegen_1.str)`must contain at least ${min} valid item(s)` : (0, codegen_1.str)`must contain at least ${min} and no more than ${max} valid item(s)`,
    params: ({ params: { min, max } }) => max === void 0 ? (0, codegen_1._)`{minContains: ${min}}` : (0, codegen_1._)`{minContains: ${min}, maxContains: ${max}}`
  };
  const def2 = {
    keyword: "contains",
    type: "array",
    schemaType: ["object", "boolean"],
    before: "uniqueItems",
    trackErrors: true,
    error,
    code(cxt) {
      const { gen, schema, parentSchema, data: data32, it } = cxt;
      let min;
      let max;
      const { minContains, maxContains } = parentSchema;
      if (it.opts.next) {
        min = minContains === void 0 ? 1 : minContains;
        max = maxContains;
      } else {
        min = 1;
      }
      const len = gen.const("len", (0, codegen_1._)`${data32}.length`);
      cxt.setParams({ min, max });
      if (max === void 0 && min === 0) {
        (0, util_1.checkStrictMode)(it, `"minContains" == 0 without "maxContains": "contains" keyword ignored`);
        return;
      }
      if (max !== void 0 && min > max) {
        (0, util_1.checkStrictMode)(it, `"minContains" > "maxContains" is always invalid`);
        cxt.fail();
        return;
      }
      if ((0, util_1.alwaysValidSchema)(it, schema)) {
        let cond = (0, codegen_1._)`${len} >= ${min}`;
        if (max !== void 0)
          cond = (0, codegen_1._)`${cond} && ${len} <= ${max}`;
        cxt.pass(cond);
        return;
      }
      it.items = true;
      const valid2 = gen.name("valid");
      if (max === void 0 && min === 1) {
        validateItems(valid2, () => gen.if(valid2, () => gen.break()));
      } else if (min === 0) {
        gen.let(valid2, true);
        if (max !== void 0)
          gen.if((0, codegen_1._)`${data32}.length > 0`, validateItemsWithCount);
      } else {
        gen.let(valid2, false);
        validateItemsWithCount();
      }
      cxt.result(valid2, () => cxt.reset());
      function validateItemsWithCount() {
        const schValid = gen.name("_valid");
        const count = gen.let("count", 0);
        validateItems(schValid, () => gen.if(schValid, () => checkLimits(count)));
      }
      function validateItems(_valid, block2) {
        gen.forRange("i", 0, len, (i) => {
          cxt.subschema({
            keyword: "contains",
            dataProp: i,
            dataPropType: util_1.Type.Num,
            compositeRule: true
          }, _valid);
          block2();
        });
      }
      function checkLimits(count) {
        gen.code((0, codegen_1._)`${count}++`);
        if (max === void 0) {
          gen.if((0, codegen_1._)`${count} >= ${min}`, () => gen.assign(valid2, true).break());
        } else {
          gen.if((0, codegen_1._)`${count} > ${max}`, () => gen.assign(valid2, false).break());
          if (min === 1)
            gen.assign(valid2, true);
          else
            gen.if((0, codegen_1._)`${count} >= ${min}`, () => gen.assign(valid2, true));
        }
      }
    }
  };
  contains$1.default = def2;
  return contains$1;
}
function requireDependencies() {
  if (hasRequiredDependencies) return dependencies;
  hasRequiredDependencies = 1;
  (function(exports$1) {
    Object.defineProperty(exports$1, "__esModule", { value: true });
    exports$1.validateSchemaDeps = exports$1.validatePropertyDeps = exports$1.error = void 0;
    const codegen_1 = requireCodegen();
    const util_1 = requireUtil$3();
    const code_1 = requireCode$1();
    exports$1.error = {
      message: ({ params: { property, depsCount, deps: deps18 } }) => {
        const property_ies = depsCount === 1 ? "property" : "properties";
        return (0, codegen_1.str)`must have ${property_ies} ${deps18} when property ${property} is present`;
      },
      params: ({ params: { property, depsCount, deps: deps18, missingProperty } }) => (0, codegen_1._)`{property: ${property},
    missingProperty: ${missingProperty},
    depsCount: ${depsCount},
    deps: ${deps18}}`
    };
    const def2 = {
      keyword: "dependencies",
      type: "object",
      schemaType: "object",
      error: exports$1.error,
      code(cxt) {
        const [propDeps, schDeps] = splitDependencies(cxt);
        validatePropertyDeps(cxt, propDeps);
        validateSchemaDeps(cxt, schDeps);
      }
    };
    function splitDependencies({ schema }) {
      const propertyDeps = {};
      const schemaDeps = {};
      for (const key in schema) {
        if (key === "__proto__")
          continue;
        const deps18 = Array.isArray(schema[key]) ? propertyDeps : schemaDeps;
        deps18[key] = schema[key];
      }
      return [propertyDeps, schemaDeps];
    }
    function validatePropertyDeps(cxt, propertyDeps = cxt.schema) {
      const { gen, data: data32, it } = cxt;
      if (Object.keys(propertyDeps).length === 0)
        return;
      const missing = gen.let("missing");
      for (const prop in propertyDeps) {
        const deps18 = propertyDeps[prop];
        if (deps18.length === 0)
          continue;
        const hasProperty = (0, code_1.propertyInData)(gen, data32, prop, it.opts.ownProperties);
        cxt.setParams({
          property: prop,
          depsCount: deps18.length,
          deps: deps18.join(", ")
        });
        if (it.allErrors) {
          gen.if(hasProperty, () => {
            for (const depProp of deps18) {
              (0, code_1.checkReportMissingProp)(cxt, depProp);
            }
          });
        } else {
          gen.if((0, codegen_1._)`${hasProperty} && (${(0, code_1.checkMissingProp)(cxt, deps18, missing)})`);
          (0, code_1.reportMissingProp)(cxt, missing);
          gen.else();
        }
      }
    }
    exports$1.validatePropertyDeps = validatePropertyDeps;
    function validateSchemaDeps(cxt, schemaDeps = cxt.schema) {
      const { gen, data: data32, keyword: keyword2, it } = cxt;
      const valid2 = gen.name("valid");
      for (const prop in schemaDeps) {
        if ((0, util_1.alwaysValidSchema)(it, schemaDeps[prop]))
          continue;
        gen.if(
          (0, code_1.propertyInData)(gen, data32, prop, it.opts.ownProperties),
          () => {
            const schCxt = cxt.subschema({ keyword: keyword2, schemaProp: prop }, valid2);
            cxt.mergeValidEvaluated(schCxt, valid2);
          },
          () => gen.var(valid2, true)
        );
        cxt.ok(valid2);
      }
    }
    exports$1.validateSchemaDeps = validateSchemaDeps;
    exports$1.default = def2;
  })(dependencies);
  return dependencies;
}
function requirePropertyNames() {
  if (hasRequiredPropertyNames) return propertyNames;
  hasRequiredPropertyNames = 1;
  Object.defineProperty(propertyNames, "__esModule", { value: true });
  const codegen_1 = requireCodegen();
  const util_1 = requireUtil$3();
  const error = {
    message: "property name must be valid",
    params: ({ params }) => (0, codegen_1._)`{propertyName: ${params.propertyName}}`
  };
  const def2 = {
    keyword: "propertyNames",
    type: "object",
    schemaType: ["object", "boolean"],
    error,
    code(cxt) {
      const { gen, schema, data: data32, it } = cxt;
      if ((0, util_1.alwaysValidSchema)(it, schema))
        return;
      const valid2 = gen.name("valid");
      gen.forIn("key", data32, (key) => {
        cxt.setParams({ propertyName: key });
        cxt.subschema({
          keyword: "propertyNames",
          data: key,
          dataTypes: ["string"],
          propertyName: key,
          compositeRule: true
        }, valid2);
        gen.if((0, codegen_1.not)(valid2), () => {
          cxt.error(true);
          if (!it.allErrors)
            gen.break();
        });
      });
      cxt.ok(valid2);
    }
  };
  propertyNames.default = def2;
  return propertyNames;
}
function requireAdditionalProperties() {
  if (hasRequiredAdditionalProperties) return additionalProperties;
  hasRequiredAdditionalProperties = 1;
  Object.defineProperty(additionalProperties, "__esModule", { value: true });
  const code_1 = requireCode$1();
  const codegen_1 = requireCodegen();
  const names_1 = requireNames();
  const util_1 = requireUtil$3();
  const error = {
    message: "must NOT have additional properties",
    params: ({ params }) => (0, codegen_1._)`{additionalProperty: ${params.additionalProperty}}`
  };
  const def2 = {
    keyword: "additionalProperties",
    type: ["object"],
    schemaType: ["boolean", "object"],
    allowUndefined: true,
    trackErrors: true,
    error,
    code(cxt) {
      const { gen, schema, parentSchema, data: data32, errsCount, it } = cxt;
      if (!errsCount)
        throw new Error("ajv implementation error");
      const { allErrors, opts } = it;
      it.props = true;
      if (opts.removeAdditional !== "all" && (0, util_1.alwaysValidSchema)(it, schema))
        return;
      const props = (0, code_1.allSchemaProperties)(parentSchema.properties);
      const patProps = (0, code_1.allSchemaProperties)(parentSchema.patternProperties);
      checkAdditionalProperties();
      cxt.ok((0, codegen_1._)`${errsCount} === ${names_1.default.errors}`);
      function checkAdditionalProperties() {
        gen.forIn("key", data32, (key) => {
          if (!props.length && !patProps.length)
            additionalPropertyCode(key);
          else
            gen.if(isAdditional(key), () => additionalPropertyCode(key));
        });
      }
      function isAdditional(key) {
        let definedProp;
        if (props.length > 8) {
          const propsSchema = (0, util_1.schemaRefOrVal)(it, parentSchema.properties, "properties");
          definedProp = (0, code_1.isOwnProperty)(gen, propsSchema, key);
        } else if (props.length) {
          definedProp = (0, codegen_1.or)(...props.map((p) => (0, codegen_1._)`${key} === ${p}`));
        } else {
          definedProp = codegen_1.nil;
        }
        if (patProps.length) {
          definedProp = (0, codegen_1.or)(definedProp, ...patProps.map((p) => (0, codegen_1._)`${(0, code_1.usePattern)(cxt, p)}.test(${key})`));
        }
        return (0, codegen_1.not)(definedProp);
      }
      function deleteAdditional(key) {
        gen.code((0, codegen_1._)`delete ${data32}[${key}]`);
      }
      function additionalPropertyCode(key) {
        if (opts.removeAdditional === "all" || opts.removeAdditional && schema === false) {
          deleteAdditional(key);
          return;
        }
        if (schema === false) {
          cxt.setParams({ additionalProperty: key });
          cxt.error();
          if (!allErrors)
            gen.break();
          return;
        }
        if (typeof schema == "object" && !(0, util_1.alwaysValidSchema)(it, schema)) {
          const valid2 = gen.name("valid");
          if (opts.removeAdditional === "failing") {
            applyAdditionalSchema(key, valid2, false);
            gen.if((0, codegen_1.not)(valid2), () => {
              cxt.reset();
              deleteAdditional(key);
            });
          } else {
            applyAdditionalSchema(key, valid2);
            if (!allErrors)
              gen.if((0, codegen_1.not)(valid2), () => gen.break());
          }
        }
      }
      function applyAdditionalSchema(key, valid2, errors2) {
        const subschema2 = {
          keyword: "additionalProperties",
          dataProp: key,
          dataPropType: util_1.Type.Str
        };
        if (errors2 === false) {
          Object.assign(subschema2, {
            compositeRule: true,
            createErrors: false,
            allErrors: false
          });
        }
        cxt.subschema(subschema2, valid2);
      }
    }
  };
  additionalProperties.default = def2;
  return additionalProperties;
}
function requireProperties() {
  if (hasRequiredProperties) return properties$1;
  hasRequiredProperties = 1;
  Object.defineProperty(properties$1, "__esModule", { value: true });
  const validate_1 = requireValidate();
  const code_1 = requireCode$1();
  const util_1 = requireUtil$3();
  const additionalProperties_1 = requireAdditionalProperties();
  const def2 = {
    keyword: "properties",
    type: "object",
    schemaType: "object",
    code(cxt) {
      const { gen, schema, parentSchema, data: data32, it } = cxt;
      if (it.opts.removeAdditional === "all" && parentSchema.additionalProperties === void 0) {
        additionalProperties_1.default.code(new validate_1.KeywordCxt(it, additionalProperties_1.default, "additionalProperties"));
      }
      const allProps = (0, code_1.allSchemaProperties)(schema);
      for (const prop of allProps) {
        it.definedProperties.add(prop);
      }
      if (it.opts.unevaluated && allProps.length && it.props !== true) {
        it.props = util_1.mergeEvaluated.props(gen, (0, util_1.toHash)(allProps), it.props);
      }
      const properties2 = allProps.filter((p) => !(0, util_1.alwaysValidSchema)(it, schema[p]));
      if (properties2.length === 0)
        return;
      const valid2 = gen.name("valid");
      for (const prop of properties2) {
        if (hasDefault(prop)) {
          applyPropertySchema(prop);
        } else {
          gen.if((0, code_1.propertyInData)(gen, data32, prop, it.opts.ownProperties));
          applyPropertySchema(prop);
          if (!it.allErrors)
            gen.else().var(valid2, true);
          gen.endIf();
        }
        cxt.it.definedProperties.add(prop);
        cxt.ok(valid2);
      }
      function hasDefault(prop) {
        return it.opts.useDefaults && !it.compositeRule && schema[prop].default !== void 0;
      }
      function applyPropertySchema(prop) {
        cxt.subschema({
          keyword: "properties",
          schemaProp: prop,
          dataProp: prop
        }, valid2);
      }
    }
  };
  properties$1.default = def2;
  return properties$1;
}
function requirePatternProperties() {
  if (hasRequiredPatternProperties) return patternProperties;
  hasRequiredPatternProperties = 1;
  Object.defineProperty(patternProperties, "__esModule", { value: true });
  const code_1 = requireCode$1();
  const codegen_1 = requireCodegen();
  const util_1 = requireUtil$3();
  const util_2 = requireUtil$3();
  const def2 = {
    keyword: "patternProperties",
    type: "object",
    schemaType: "object",
    code(cxt) {
      const { gen, schema, data: data32, parentSchema, it } = cxt;
      const { opts } = it;
      const patterns = (0, code_1.allSchemaProperties)(schema);
      const alwaysValidPatterns = patterns.filter((p) => (0, util_1.alwaysValidSchema)(it, schema[p]));
      if (patterns.length === 0 || alwaysValidPatterns.length === patterns.length && (!it.opts.unevaluated || it.props === true)) {
        return;
      }
      const checkProperties = opts.strictSchema && !opts.allowMatchingProperties && parentSchema.properties;
      const valid2 = gen.name("valid");
      if (it.props !== true && !(it.props instanceof codegen_1.Name)) {
        it.props = (0, util_2.evaluatedPropsToName)(gen, it.props);
      }
      const { props } = it;
      validatePatternProperties();
      function validatePatternProperties() {
        for (const pat of patterns) {
          if (checkProperties)
            checkMatchingProperties(pat);
          if (it.allErrors) {
            validateProperties(pat);
          } else {
            gen.var(valid2, true);
            validateProperties(pat);
            gen.if(valid2);
          }
        }
      }
      function checkMatchingProperties(pat) {
        for (const prop in checkProperties) {
          if (new RegExp(pat).test(prop)) {
            (0, util_1.checkStrictMode)(it, `property ${prop} matches pattern ${pat} (use allowMatchingProperties)`);
          }
        }
      }
      function validateProperties(pat) {
        gen.forIn("key", data32, (key) => {
          gen.if((0, codegen_1._)`${(0, code_1.usePattern)(cxt, pat)}.test(${key})`, () => {
            const alwaysValid = alwaysValidPatterns.includes(pat);
            if (!alwaysValid) {
              cxt.subschema({
                keyword: "patternProperties",
                schemaProp: pat,
                dataProp: key,
                dataPropType: util_2.Type.Str
              }, valid2);
            }
            if (it.opts.unevaluated && props !== true) {
              gen.assign((0, codegen_1._)`${props}[${key}]`, true);
            } else if (!alwaysValid && !it.allErrors) {
              gen.if((0, codegen_1.not)(valid2), () => gen.break());
            }
          });
        });
      }
    }
  };
  patternProperties.default = def2;
  return patternProperties;
}
function requireNot() {
  if (hasRequiredNot) return not;
  hasRequiredNot = 1;
  Object.defineProperty(not, "__esModule", { value: true });
  const util_1 = requireUtil$3();
  const def2 = {
    keyword: "not",
    schemaType: ["object", "boolean"],
    trackErrors: true,
    code(cxt) {
      const { gen, schema, it } = cxt;
      if ((0, util_1.alwaysValidSchema)(it, schema)) {
        cxt.fail();
        return;
      }
      const valid2 = gen.name("valid");
      cxt.subschema({
        keyword: "not",
        compositeRule: true,
        createErrors: false,
        allErrors: false
      }, valid2);
      cxt.failResult(valid2, () => cxt.reset(), () => cxt.error());
    },
    error: { message: "must NOT be valid" }
  };
  not.default = def2;
  return not;
}
function requireAnyOf() {
  if (hasRequiredAnyOf) return anyOf;
  hasRequiredAnyOf = 1;
  Object.defineProperty(anyOf, "__esModule", { value: true });
  const code_1 = requireCode$1();
  const def2 = {
    keyword: "anyOf",
    schemaType: "array",
    trackErrors: true,
    code: code_1.validateUnion,
    error: { message: "must match a schema in anyOf" }
  };
  anyOf.default = def2;
  return anyOf;
}
function requireOneOf() {
  if (hasRequiredOneOf) return oneOf;
  hasRequiredOneOf = 1;
  Object.defineProperty(oneOf, "__esModule", { value: true });
  const codegen_1 = requireCodegen();
  const util_1 = requireUtil$3();
  const error = {
    message: "must match exactly one schema in oneOf",
    params: ({ params }) => (0, codegen_1._)`{passingSchemas: ${params.passing}}`
  };
  const def2 = {
    keyword: "oneOf",
    schemaType: "array",
    trackErrors: true,
    error,
    code(cxt) {
      const { gen, schema, parentSchema, it } = cxt;
      if (!Array.isArray(schema))
        throw new Error("ajv implementation error");
      if (it.opts.discriminator && parentSchema.discriminator)
        return;
      const schArr = schema;
      const valid2 = gen.let("valid", false);
      const passing = gen.let("passing", null);
      const schValid = gen.name("_valid");
      cxt.setParams({ passing });
      gen.block(validateOneOf);
      cxt.result(valid2, () => cxt.reset(), () => cxt.error(true));
      function validateOneOf() {
        schArr.forEach((sch, i) => {
          let schCxt;
          if ((0, util_1.alwaysValidSchema)(it, sch)) {
            gen.var(schValid, true);
          } else {
            schCxt = cxt.subschema({
              keyword: "oneOf",
              schemaProp: i,
              compositeRule: true
            }, schValid);
          }
          if (i > 0) {
            gen.if((0, codegen_1._)`${schValid} && ${valid2}`).assign(valid2, false).assign(passing, (0, codegen_1._)`[${passing}, ${i}]`).else();
          }
          gen.if(schValid, () => {
            gen.assign(valid2, true);
            gen.assign(passing, i);
            if (schCxt)
              cxt.mergeEvaluated(schCxt, codegen_1.Name);
          });
        });
      }
    }
  };
  oneOf.default = def2;
  return oneOf;
}
function requireAllOf() {
  if (hasRequiredAllOf) return allOf;
  hasRequiredAllOf = 1;
  Object.defineProperty(allOf, "__esModule", { value: true });
  const util_1 = requireUtil$3();
  const def2 = {
    keyword: "allOf",
    schemaType: "array",
    code(cxt) {
      const { gen, schema, it } = cxt;
      if (!Array.isArray(schema))
        throw new Error("ajv implementation error");
      const valid2 = gen.name("valid");
      schema.forEach((sch, i) => {
        if ((0, util_1.alwaysValidSchema)(it, sch))
          return;
        const schCxt = cxt.subschema({ keyword: "allOf", schemaProp: i }, valid2);
        cxt.ok(valid2);
        cxt.mergeEvaluated(schCxt);
      });
    }
  };
  allOf.default = def2;
  return allOf;
}
function require_if() {
  if (hasRequired_if) return _if;
  hasRequired_if = 1;
  Object.defineProperty(_if, "__esModule", { value: true });
  const codegen_1 = requireCodegen();
  const util_1 = requireUtil$3();
  const error = {
    message: ({ params }) => (0, codegen_1.str)`must match "${params.ifClause}" schema`,
    params: ({ params }) => (0, codegen_1._)`{failingKeyword: ${params.ifClause}}`
  };
  const def2 = {
    keyword: "if",
    schemaType: ["object", "boolean"],
    trackErrors: true,
    error,
    code(cxt) {
      const { gen, parentSchema, it } = cxt;
      if (parentSchema.then === void 0 && parentSchema.else === void 0) {
        (0, util_1.checkStrictMode)(it, '"if" without "then" and "else" is ignored');
      }
      const hasThen = hasSchema(it, "then");
      const hasElse = hasSchema(it, "else");
      if (!hasThen && !hasElse)
        return;
      const valid2 = gen.let("valid", true);
      const schValid = gen.name("_valid");
      validateIf();
      cxt.reset();
      if (hasThen && hasElse) {
        const ifClause = gen.let("ifClause");
        cxt.setParams({ ifClause });
        gen.if(schValid, validateClause("then", ifClause), validateClause("else", ifClause));
      } else if (hasThen) {
        gen.if(schValid, validateClause("then"));
      } else {
        gen.if((0, codegen_1.not)(schValid), validateClause("else"));
      }
      cxt.pass(valid2, () => cxt.error(true));
      function validateIf() {
        const schCxt = cxt.subschema({
          keyword: "if",
          compositeRule: true,
          createErrors: false,
          allErrors: false
        }, schValid);
        cxt.mergeEvaluated(schCxt);
      }
      function validateClause(keyword2, ifClause) {
        return () => {
          const schCxt = cxt.subschema({ keyword: keyword2 }, schValid);
          gen.assign(valid2, schValid);
          cxt.mergeValidEvaluated(schCxt, valid2);
          if (ifClause)
            gen.assign(ifClause, (0, codegen_1._)`${keyword2}`);
          else
            cxt.setParams({ ifClause: keyword2 });
        };
      }
    }
  };
  function hasSchema(it, keyword2) {
    const schema = it.schema[keyword2];
    return schema !== void 0 && !(0, util_1.alwaysValidSchema)(it, schema);
  }
  _if.default = def2;
  return _if;
}
function requireThenElse() {
  if (hasRequiredThenElse) return thenElse;
  hasRequiredThenElse = 1;
  Object.defineProperty(thenElse, "__esModule", { value: true });
  const util_1 = requireUtil$3();
  const def2 = {
    keyword: ["then", "else"],
    schemaType: ["object", "boolean"],
    code({ keyword: keyword2, parentSchema, it }) {
      if (parentSchema.if === void 0)
        (0, util_1.checkStrictMode)(it, `"${keyword2}" without "if" is ignored`);
    }
  };
  thenElse.default = def2;
  return thenElse;
}
function requireApplicator() {
  if (hasRequiredApplicator) return applicator;
  hasRequiredApplicator = 1;
  Object.defineProperty(applicator, "__esModule", { value: true });
  const additionalItems_1 = requireAdditionalItems();
  const prefixItems_1 = requirePrefixItems();
  const items_1 = requireItems();
  const items2020_1 = requireItems2020();
  const contains_1 = requireContains();
  const dependencies_1 = requireDependencies();
  const propertyNames_1 = requirePropertyNames();
  const additionalProperties_1 = requireAdditionalProperties();
  const properties_1 = requireProperties();
  const patternProperties_1 = requirePatternProperties();
  const not_1 = requireNot();
  const anyOf_1 = requireAnyOf();
  const oneOf_1 = requireOneOf();
  const allOf_1 = requireAllOf();
  const if_1 = require_if();
  const thenElse_1 = requireThenElse();
  function getApplicator(draft2020 = false) {
    const applicator2 = [
      not_1.default,
      anyOf_1.default,
      oneOf_1.default,
      allOf_1.default,
      if_1.default,
      thenElse_1.default,
      propertyNames_1.default,
      additionalProperties_1.default,
      dependencies_1.default,
      properties_1.default,
      patternProperties_1.default
    ];
    if (draft2020)
      applicator2.push(prefixItems_1.default, items2020_1.default);
    else
      applicator2.push(additionalItems_1.default, items_1.default);
    applicator2.push(contains_1.default);
    return applicator2;
  }
  applicator.default = getApplicator;
  return applicator;
}
function requireFormat$1() {
  if (hasRequiredFormat$1) return format$1;
  hasRequiredFormat$1 = 1;
  Object.defineProperty(format$1, "__esModule", { value: true });
  const codegen_1 = requireCodegen();
  const error = {
    message: ({ schemaCode }) => (0, codegen_1.str)`must match format "${schemaCode}"`,
    params: ({ schemaCode }) => (0, codegen_1._)`{format: ${schemaCode}}`
  };
  const def2 = {
    keyword: "format",
    type: ["number", "string"],
    schemaType: "string",
    $data: true,
    error,
    code(cxt, ruleType) {
      const { gen, data: data32, $data, schema, schemaCode, it } = cxt;
      const { opts, errSchemaPath, schemaEnv, self: self2 } = it;
      if (!opts.validateFormats)
        return;
      if ($data)
        validate$DataFormat();
      else
        validateFormat();
      function validate$DataFormat() {
        const fmts = gen.scopeValue("formats", {
          ref: self2.formats,
          code: opts.code.formats
        });
        const fDef = gen.const("fDef", (0, codegen_1._)`${fmts}[${schemaCode}]`);
        const fType = gen.let("fType");
        const format2 = gen.let("format");
        gen.if((0, codegen_1._)`typeof ${fDef} == "object" && !(${fDef} instanceof RegExp)`, () => gen.assign(fType, (0, codegen_1._)`${fDef}.type || "string"`).assign(format2, (0, codegen_1._)`${fDef}.validate`), () => gen.assign(fType, (0, codegen_1._)`"string"`).assign(format2, fDef));
        cxt.fail$data((0, codegen_1.or)(unknownFmt(), invalidFmt()));
        function unknownFmt() {
          if (opts.strictSchema === false)
            return codegen_1.nil;
          return (0, codegen_1._)`${schemaCode} && !${format2}`;
        }
        function invalidFmt() {
          const callFormat = schemaEnv.$async ? (0, codegen_1._)`(${fDef}.async ? await ${format2}(${data32}) : ${format2}(${data32}))` : (0, codegen_1._)`${format2}(${data32})`;
          const validData = (0, codegen_1._)`(typeof ${format2} == "function" ? ${callFormat} : ${format2}.test(${data32}))`;
          return (0, codegen_1._)`${format2} && ${format2} !== true && ${fType} === ${ruleType} && !${validData}`;
        }
      }
      function validateFormat() {
        const formatDef = self2.formats[schema];
        if (!formatDef) {
          unknownFormat();
          return;
        }
        if (formatDef === true)
          return;
        const [fmtType, format2, fmtRef] = getFormat2(formatDef);
        if (fmtType === ruleType)
          cxt.pass(validCondition());
        function unknownFormat() {
          if (opts.strictSchema === false) {
            self2.logger.warn(unknownMsg());
            return;
          }
          throw new Error(unknownMsg());
          function unknownMsg() {
            return `unknown format "${schema}" ignored in schema at path "${errSchemaPath}"`;
          }
        }
        function getFormat2(fmtDef) {
          const code2 = fmtDef instanceof RegExp ? (0, codegen_1.regexpCode)(fmtDef) : opts.code.formats ? (0, codegen_1._)`${opts.code.formats}${(0, codegen_1.getProperty)(schema)}` : void 0;
          const fmt = gen.scopeValue("formats", { key: schema, ref: fmtDef, code: code2 });
          if (typeof fmtDef == "object" && !(fmtDef instanceof RegExp)) {
            return [fmtDef.type || "string", fmtDef.validate, (0, codegen_1._)`${fmt}.validate`];
          }
          return ["string", fmtDef, fmt];
        }
        function validCondition() {
          if (typeof formatDef == "object" && !(formatDef instanceof RegExp) && formatDef.async) {
            if (!schemaEnv.$async)
              throw new Error("async format in sync schema");
            return (0, codegen_1._)`await ${fmtRef}(${data32})`;
          }
          return typeof format2 == "function" ? (0, codegen_1._)`${fmtRef}(${data32})` : (0, codegen_1._)`${fmtRef}.test(${data32})`;
        }
      }
    }
  };
  format$1.default = def2;
  return format$1;
}
function requireFormat() {
  if (hasRequiredFormat) return format$2;
  hasRequiredFormat = 1;
  Object.defineProperty(format$2, "__esModule", { value: true });
  const format_1 = requireFormat$1();
  const format2 = [format_1.default];
  format$2.default = format2;
  return format$2;
}
function requireMetadata() {
  if (hasRequiredMetadata) return metadata;
  hasRequiredMetadata = 1;
  Object.defineProperty(metadata, "__esModule", { value: true });
  metadata.contentVocabulary = metadata.metadataVocabulary = void 0;
  metadata.metadataVocabulary = [
    "title",
    "description",
    "default",
    "deprecated",
    "readOnly",
    "writeOnly",
    "examples"
  ];
  metadata.contentVocabulary = [
    "contentMediaType",
    "contentEncoding",
    "contentSchema"
  ];
  return metadata;
}
function requireDraft7() {
  if (hasRequiredDraft7) return draft7;
  hasRequiredDraft7 = 1;
  Object.defineProperty(draft7, "__esModule", { value: true });
  const core_1 = requireCore$1();
  const validation_1 = requireValidation$1();
  const applicator_1 = requireApplicator();
  const format_1 = requireFormat();
  const metadata_1 = requireMetadata();
  const draft7Vocabularies = [
    core_1.default,
    validation_1.default,
    (0, applicator_1.default)(),
    format_1.default,
    metadata_1.metadataVocabulary,
    metadata_1.contentVocabulary
  ];
  draft7.default = draft7Vocabularies;
  return draft7;
}
function requireTypes$2() {
  if (hasRequiredTypes$2) return types$6;
  hasRequiredTypes$2 = 1;
  Object.defineProperty(types$6, "__esModule", { value: true });
  types$6.DiscrError = void 0;
  var DiscrError;
  (function(DiscrError2) {
    DiscrError2["Tag"] = "tag";
    DiscrError2["Mapping"] = "mapping";
  })(DiscrError || (types$6.DiscrError = DiscrError = {}));
  return types$6;
}
function requireDiscriminator() {
  if (hasRequiredDiscriminator) return discriminator;
  hasRequiredDiscriminator = 1;
  Object.defineProperty(discriminator, "__esModule", { value: true });
  const codegen_1 = requireCodegen();
  const types_1 = requireTypes$2();
  const compile_1 = requireCompile$1();
  const ref_error_1 = requireRef_error();
  const util_1 = requireUtil$3();
  const error = {
    message: ({ params: { discrError, tagName } }) => discrError === types_1.DiscrError.Tag ? `tag "${tagName}" must be string` : `value of tag "${tagName}" must be in oneOf`,
    params: ({ params: { discrError, tag: tag2, tagName } }) => (0, codegen_1._)`{error: ${discrError}, tag: ${tagName}, tagValue: ${tag2}}`
  };
  const def2 = {
    keyword: "discriminator",
    type: "object",
    schemaType: "object",
    error,
    code(cxt) {
      const { gen, data: data32, schema, parentSchema, it } = cxt;
      const { oneOf: oneOf2 } = parentSchema;
      if (!it.opts.discriminator) {
        throw new Error("discriminator: requires discriminator option");
      }
      const tagName = schema.propertyName;
      if (typeof tagName != "string")
        throw new Error("discriminator: requires propertyName");
      if (schema.mapping)
        throw new Error("discriminator: mapping is not supported");
      if (!oneOf2)
        throw new Error("discriminator: requires oneOf keyword");
      const valid2 = gen.let("valid", false);
      const tag2 = gen.const("tag", (0, codegen_1._)`${data32}${(0, codegen_1.getProperty)(tagName)}`);
      gen.if((0, codegen_1._)`typeof ${tag2} == "string"`, () => validateMapping(), () => cxt.error(false, { discrError: types_1.DiscrError.Tag, tag: tag2, tagName }));
      cxt.ok(valid2);
      function validateMapping() {
        const mapping = getMapping();
        gen.if(false);
        for (const tagValue in mapping) {
          gen.elseIf((0, codegen_1._)`${tag2} === ${tagValue}`);
          gen.assign(valid2, applyTagSchema(mapping[tagValue]));
        }
        gen.else();
        cxt.error(false, { discrError: types_1.DiscrError.Mapping, tag: tag2, tagName });
        gen.endIf();
      }
      function applyTagSchema(schemaProp) {
        const _valid = gen.name("valid");
        const schCxt = cxt.subschema({ keyword: "oneOf", schemaProp }, _valid);
        cxt.mergeEvaluated(schCxt, codegen_1.Name);
        return _valid;
      }
      function getMapping() {
        var _a4;
        const oneOfMapping = {};
        const topRequired = hasRequired(parentSchema);
        let tagRequired = true;
        for (let i = 0; i < oneOf2.length; i++) {
          let sch = oneOf2[i];
          if ((sch === null || sch === void 0 ? void 0 : sch.$ref) && !(0, util_1.schemaHasRulesButRef)(sch, it.self.RULES)) {
            const ref2 = sch.$ref;
            sch = compile_1.resolveRef.call(it.self, it.schemaEnv.root, it.baseId, ref2);
            if (sch instanceof compile_1.SchemaEnv)
              sch = sch.schema;
            if (sch === void 0)
              throw new ref_error_1.default(it.opts.uriResolver, it.baseId, ref2);
          }
          const propSch = (_a4 = sch === null || sch === void 0 ? void 0 : sch.properties) === null || _a4 === void 0 ? void 0 : _a4[tagName];
          if (typeof propSch != "object") {
            throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${tagName}"`);
          }
          tagRequired = tagRequired && (topRequired || hasRequired(sch));
          addMappings(propSch, i);
        }
        if (!tagRequired)
          throw new Error(`discriminator: "${tagName}" must be required`);
        return oneOfMapping;
        function hasRequired({ required: required2 }) {
          return Array.isArray(required2) && required2.includes(tagName);
        }
        function addMappings(sch, i) {
          if (sch.const) {
            addMapping(sch.const, i);
          } else if (sch.enum) {
            for (const tagValue of sch.enum) {
              addMapping(tagValue, i);
            }
          } else {
            throw new Error(`discriminator: "properties/${tagName}" must have "const" or "enum"`);
          }
        }
        function addMapping(tagValue, i) {
          if (typeof tagValue != "string" || tagValue in oneOfMapping) {
            throw new Error(`discriminator: "${tagName}" values must be unique strings`);
          }
          oneOfMapping[tagValue] = i;
        }
      }
    }
  };
  discriminator.default = def2;
  return discriminator;
}
function requireAjv() {
  if (hasRequiredAjv) return ajv.exports;
  hasRequiredAjv = 1;
  (function(module2, exports$1) {
    Object.defineProperty(exports$1, "__esModule", { value: true });
    exports$1.MissingRefError = exports$1.ValidationError = exports$1.CodeGen = exports$1.Name = exports$1.nil = exports$1.stringify = exports$1.str = exports$1._ = exports$1.KeywordCxt = exports$1.Ajv = void 0;
    const core_1 = requireCore$2();
    const draft7_1 = requireDraft7();
    const discriminator_1 = requireDiscriminator();
    const draft7MetaSchema = require$$3$1;
    const META_SUPPORT_DATA = ["/properties"];
    const META_SCHEMA_ID = "http://json-schema.org/draft-07/schema";
    class Ajv2 extends core_1.default {
      _addVocabularies() {
        super._addVocabularies();
        draft7_1.default.forEach((v) => this.addVocabulary(v));
        if (this.opts.discriminator)
          this.addKeyword(discriminator_1.default);
      }
      _addDefaultMetaSchema() {
        super._addDefaultMetaSchema();
        if (!this.opts.meta)
          return;
        const metaSchema = this.opts.$data ? this.$dataMetaSchema(draft7MetaSchema, META_SUPPORT_DATA) : draft7MetaSchema;
        this.addMetaSchema(metaSchema, META_SCHEMA_ID, false);
        this.refs["http://json-schema.org/schema"] = META_SCHEMA_ID;
      }
      defaultMeta() {
        return this.opts.defaultMeta = super.defaultMeta() || (this.getSchema(META_SCHEMA_ID) ? META_SCHEMA_ID : void 0);
      }
    }
    exports$1.Ajv = Ajv2;
    module2.exports = exports$1 = Ajv2;
    module2.exports.Ajv = Ajv2;
    Object.defineProperty(exports$1, "__esModule", { value: true });
    exports$1.default = Ajv2;
    var validate_1 = requireValidate();
    Object.defineProperty(exports$1, "KeywordCxt", { enumerable: true, get: function() {
      return validate_1.KeywordCxt;
    } });
    var codegen_1 = requireCodegen();
    Object.defineProperty(exports$1, "_", { enumerable: true, get: function() {
      return codegen_1._;
    } });
    Object.defineProperty(exports$1, "str", { enumerable: true, get: function() {
      return codegen_1.str;
    } });
    Object.defineProperty(exports$1, "stringify", { enumerable: true, get: function() {
      return codegen_1.stringify;
    } });
    Object.defineProperty(exports$1, "nil", { enumerable: true, get: function() {
      return codegen_1.nil;
    } });
    Object.defineProperty(exports$1, "Name", { enumerable: true, get: function() {
      return codegen_1.Name;
    } });
    Object.defineProperty(exports$1, "CodeGen", { enumerable: true, get: function() {
      return codegen_1.CodeGen;
    } });
    var validation_error_1 = requireValidation_error();
    Object.defineProperty(exports$1, "ValidationError", { enumerable: true, get: function() {
      return validation_error_1.default;
    } });
    var ref_error_1 = requireRef_error();
    Object.defineProperty(exports$1, "MissingRefError", { enumerable: true, get: function() {
      return ref_error_1.default;
    } });
  })(ajv, ajv.exports);
  return ajv.exports;
}
function requireLimit() {
  if (hasRequiredLimit) return limit;
  hasRequiredLimit = 1;
  (function(exports$1) {
    Object.defineProperty(exports$1, "__esModule", { value: true });
    exports$1.formatLimitDefinition = void 0;
    const ajv_1 = requireAjv();
    const codegen_1 = requireCodegen();
    const ops = codegen_1.operators;
    const KWDs = {
      formatMaximum: { okStr: "<=", ok: ops.LTE, fail: ops.GT },
      formatMinimum: { okStr: ">=", ok: ops.GTE, fail: ops.LT },
      formatExclusiveMaximum: { okStr: "<", ok: ops.LT, fail: ops.GTE },
      formatExclusiveMinimum: { okStr: ">", ok: ops.GT, fail: ops.LTE }
    };
    const error = {
      message: ({ keyword: keyword2, schemaCode }) => (0, codegen_1.str)`should be ${KWDs[keyword2].okStr} ${schemaCode}`,
      params: ({ keyword: keyword2, schemaCode }) => (0, codegen_1._)`{comparison: ${KWDs[keyword2].okStr}, limit: ${schemaCode}}`
    };
    exports$1.formatLimitDefinition = {
      keyword: Object.keys(KWDs),
      type: "string",
      schemaType: "string",
      $data: true,
      error,
      code(cxt) {
        const { gen, data: data32, schemaCode, keyword: keyword2, it } = cxt;
        const { opts, self: self2 } = it;
        if (!opts.validateFormats)
          return;
        const fCxt = new ajv_1.KeywordCxt(it, self2.RULES.all.format.definition, "format");
        if (fCxt.$data)
          validate$DataFormat();
        else
          validateFormat();
        function validate$DataFormat() {
          const fmts = gen.scopeValue("formats", {
            ref: self2.formats,
            code: opts.code.formats
          });
          const fmt = gen.const("fmt", (0, codegen_1._)`${fmts}[${fCxt.schemaCode}]`);
          cxt.fail$data((0, codegen_1.or)((0, codegen_1._)`typeof ${fmt} != "object"`, (0, codegen_1._)`${fmt} instanceof RegExp`, (0, codegen_1._)`typeof ${fmt}.compare != "function"`, compareCode(fmt)));
        }
        function validateFormat() {
          const format2 = fCxt.schema;
          const fmtDef = self2.formats[format2];
          if (!fmtDef || fmtDef === true)
            return;
          if (typeof fmtDef != "object" || fmtDef instanceof RegExp || typeof fmtDef.compare != "function") {
            throw new Error(`"${keyword2}": format "${format2}" does not define "compare" function`);
          }
          const fmt = gen.scopeValue("formats", {
            key: format2,
            ref: fmtDef,
            code: opts.code.formats ? (0, codegen_1._)`${opts.code.formats}${(0, codegen_1.getProperty)(format2)}` : void 0
          });
          cxt.fail$data(compareCode(fmt));
        }
        function compareCode(fmt) {
          return (0, codegen_1._)`${fmt}.compare(${data32}, ${schemaCode}) ${KWDs[keyword2].fail} 0`;
        }
      },
      dependencies: ["format"]
    };
    const formatLimitPlugin = (ajv2) => {
      ajv2.addKeyword(exports$1.formatLimitDefinition);
      return ajv2;
    };
    exports$1.default = formatLimitPlugin;
  })(limit);
  return limit;
}
function requireDist$c() {
  if (hasRequiredDist$c) return dist$c.exports;
  hasRequiredDist$c = 1;
  (function(module2, exports$1) {
    Object.defineProperty(exports$1, "__esModule", { value: true });
    const formats_1 = requireFormats();
    const limit_1 = requireLimit();
    const codegen_1 = requireCodegen();
    const fullName = new codegen_1.Name("fullFormats");
    const fastName = new codegen_1.Name("fastFormats");
    const formatsPlugin = (ajv2, opts = { keywords: true }) => {
      if (Array.isArray(opts)) {
        addFormats(ajv2, opts, formats_1.fullFormats, fullName);
        return ajv2;
      }
      const [formats3, exportName] = opts.mode === "fast" ? [formats_1.fastFormats, fastName] : [formats_1.fullFormats, fullName];
      const list2 = opts.formats || formats_1.formatNames;
      addFormats(ajv2, list2, formats3, exportName);
      if (opts.keywords)
        (0, limit_1.default)(ajv2);
      return ajv2;
    };
    formatsPlugin.get = (name, mode2 = "full") => {
      const formats3 = mode2 === "fast" ? formats_1.fastFormats : formats_1.fullFormats;
      const f = formats3[name];
      if (!f)
        throw new Error(`Unknown format "${name}"`);
      return f;
    };
    function addFormats(ajv2, list2, fs10, exportName) {
      var _a4;
      var _b2;
      (_a4 = (_b2 = ajv2.opts.code).formats) !== null && _a4 !== void 0 ? _a4 : _b2.formats = (0, codegen_1._)`require("ajv-formats/dist/formats").${exportName}`;
      for (const f of list2)
        ajv2.addFormat(f, fs10[f]);
    }
    module2.exports = exports$1 = formatsPlugin;
    Object.defineProperty(exports$1, "__esModule", { value: true });
    exports$1.default = formatsPlugin;
  })(dist$c, dist$c.exports);
  return dist$c.exports;
}
function createDefaultAjvInstance() {
  const ajv2 = new Ajv({
    strict: false,
    validateFormats: true,
    validateSchema: false,
    allErrors: true
  });
  const addFormats = _addFormats;
  addFormats(ajv2);
  return ajv2;
}
function assertToolsCallTaskCapability(requests, method, entityName) {
  if (!requests) {
    throw new Error(`${entityName} does not support task creation (required for ${method})`);
  }
  switch (method) {
    case "tools/call":
      if (!requests.tools?.call) {
        throw new Error(`${entityName} does not support task creation for tools/call (required for ${method})`);
      }
      break;
  }
}
function assertClientRequestTaskCapability(requests, method, entityName) {
  if (!requests) {
    throw new Error(`${entityName} does not support task creation (required for ${method})`);
  }
  switch (method) {
    case "sampling/createMessage":
      if (!requests.sampling?.createMessage) {
        throw new Error(`${entityName} does not support task creation for sampling/createMessage (required for ${method})`);
      }
      break;
    case "elicitation/create":
      if (!requests.elicitation?.create) {
        throw new Error(`${entityName} does not support task creation for elicitation/create (required for ${method})`);
      }
      break;
  }
}
function isCompletable(schema) {
  return !!schema && typeof schema === "object" && COMPLETABLE_SYMBOL in schema;
}
function getCompleter(schema) {
  const meta = schema[COMPLETABLE_SYMBOL];
  return meta?.complete;
}
function validateToolName(name) {
  const warnings = [];
  if (name.length === 0) {
    return {
      isValid: false,
      warnings: ["Tool name cannot be empty"]
    };
  }
  if (name.length > 128) {
    return {
      isValid: false,
      warnings: [`Tool name exceeds maximum length of 128 characters (current: ${name.length})`]
    };
  }
  if (name.includes(" ")) {
    warnings.push("Tool name contains spaces, which may cause parsing issues");
  }
  if (name.includes(",")) {
    warnings.push("Tool name contains commas, which may cause parsing issues");
  }
  if (name.startsWith("-") || name.endsWith("-")) {
    warnings.push("Tool name starts or ends with a dash, which may cause parsing issues in some contexts");
  }
  if (name.startsWith(".") || name.endsWith(".")) {
    warnings.push("Tool name starts or ends with a dot, which may cause parsing issues in some contexts");
  }
  if (!TOOL_NAME_REGEX.test(name)) {
    const invalidChars = name.split("").filter((char) => !/[A-Za-z0-9._-]/.test(char)).filter((char, index2, arr) => arr.indexOf(char) === index2);
    warnings.push(`Tool name contains invalid characters: ${invalidChars.map((c) => `"${c}"`).join(", ")}`, "Allowed characters are: A-Z, a-z, 0-9, underscore (_), dash (-), and dot (.)");
    return {
      isValid: false,
      warnings
    };
  }
  return {
    isValid: true,
    warnings
  };
}
function issueToolNameWarning(name, warnings) {
  if (warnings.length > 0) {
    console.warn(`Tool name validation warning for "${name}":`);
    for (const warning of warnings) {
      console.warn(`  - ${warning}`);
    }
    console.warn("Tool registration will proceed, but this may cause compatibility issues.");
    console.warn("Consider updating the tool name to conform to the MCP tool naming standard.");
    console.warn("See SEP: Specify Format for Tool Names (https://github.com/modelcontextprotocol/modelcontextprotocol/issues/986) for more details.");
  }
}
function validateAndWarnToolName(name) {
  const result = validateToolName(name);
  issueToolNameWarning(name, result.warnings);
  return result.isValid;
}
function isZodTypeLike(value) {
  return value !== null && typeof value === "object" && "parse" in value && typeof value.parse === "function" && "safeParse" in value && typeof value.safeParse === "function";
}
function isZodSchemaInstance(obj) {
  return "_def" in obj || "_zod" in obj || isZodTypeLike(obj);
}
function isZodRawShapeCompat(obj) {
  if (typeof obj !== "object" || obj === null) {
    return false;
  }
  if (isZodSchemaInstance(obj)) {
    return false;
  }
  if (Object.keys(obj).length === 0) {
    return true;
  }
  return Object.values(obj).some(isZodTypeLike);
}
function getZodSchemaObject(schema) {
  if (!schema) {
    return void 0;
  }
  if (isZodRawShapeCompat(schema)) {
    return objectFromShape(schema);
  }
  return schema;
}
function promptArgumentsFromSchema(schema) {
  const shape = getObjectShape(schema);
  if (!shape)
    return [];
  return Object.entries(shape).map(([name, field]) => {
    const description2 = getSchemaDescription(field);
    const isOptional = isSchemaOptional(field);
    return {
      name,
      description: description2,
      required: !isOptional
    };
  });
}
function getMethodValue(schema) {
  const shape = getObjectShape(schema);
  const methodSchema = shape?.method;
  if (!methodSchema) {
    throw new Error("Schema is missing a method literal");
  }
  const value = getLiteralValue(methodSchema);
  if (typeof value === "string") {
    return value;
  }
  throw new Error("Schema method literal must be a string");
}
function createCompletionResult(suggestions) {
  return {
    completion: {
      values: suggestions.slice(0, 100),
      total: suggestions.length,
      hasMore: suggestions.length > 100
    }
  };
}
function deserializeMessage(line) {
  return JSONRPCMessageSchema.parse(JSON.parse(line));
}
function serializeMessage(message) {
  return JSON.stringify(message) + "\n";
}
function requireWindows() {
  if (hasRequiredWindows) return windows;
  hasRequiredWindows = 1;
  windows = isexe;
  isexe.sync = sync;
  var fs10 = require$$0$3;
  function checkPathExt(path14, options2) {
    var pathext = options2.pathExt !== void 0 ? options2.pathExt : process.env.PATHEXT;
    if (!pathext) {
      return true;
    }
    pathext = pathext.split(";");
    if (pathext.indexOf("") !== -1) {
      return true;
    }
    for (var i = 0; i < pathext.length; i++) {
      var p = pathext[i].toLowerCase();
      if (p && path14.substr(-p.length).toLowerCase() === p) {
        return true;
      }
    }
    return false;
  }
  function checkStat(stat, path14, options2) {
    if (!stat.isSymbolicLink() && !stat.isFile()) {
      return false;
    }
    return checkPathExt(path14, options2);
  }
  function isexe(path14, options2, cb) {
    fs10.stat(path14, function(er, stat) {
      cb(er, er ? false : checkStat(stat, path14, options2));
    });
  }
  function sync(path14, options2) {
    return checkStat(fs10.statSync(path14), path14, options2);
  }
  return windows;
}
function requireMode() {
  if (hasRequiredMode) return mode;
  hasRequiredMode = 1;
  mode = isexe;
  isexe.sync = sync;
  var fs10 = require$$0$3;
  function isexe(path14, options2, cb) {
    fs10.stat(path14, function(er, stat) {
      cb(er, er ? false : checkStat(stat, options2));
    });
  }
  function sync(path14, options2) {
    return checkStat(fs10.statSync(path14), options2);
  }
  function checkStat(stat, options2) {
    return stat.isFile() && checkMode(stat, options2);
  }
  function checkMode(stat, options2) {
    var mod2 = stat.mode;
    var uid2 = stat.uid;
    var gid = stat.gid;
    var myUid = options2.uid !== void 0 ? options2.uid : process.getuid && process.getuid();
    var myGid = options2.gid !== void 0 ? options2.gid : process.getgid && process.getgid();
    var u = parseInt("100", 8);
    var g = parseInt("010", 8);
    var o = parseInt("001", 8);
    var ug = u | g;
    var ret = mod2 & o || mod2 & g && gid === myGid || mod2 & u && uid2 === myUid || mod2 & ug && myUid === 0;
    return ret;
  }
  return mode;
}
function requireIsexe() {
  if (hasRequiredIsexe) return isexe_1;
  hasRequiredIsexe = 1;
  var core2;
  if (process.platform === "win32" || commonjsGlobal.TESTING_WINDOWS) {
    core2 = requireWindows();
  } else {
    core2 = requireMode();
  }
  isexe_1 = isexe;
  isexe.sync = sync;
  function isexe(path14, options2, cb) {
    if (typeof options2 === "function") {
      cb = options2;
      options2 = {};
    }
    if (!cb) {
      if (typeof Promise !== "function") {
        throw new TypeError("callback not provided");
      }
      return new Promise(function(resolve2, reject) {
        isexe(path14, options2 || {}, function(er, is) {
          if (er) {
            reject(er);
          } else {
            resolve2(is);
          }
        });
      });
    }
    core2(path14, options2 || {}, function(er, is) {
      if (er) {
        if (er.code === "EACCES" || options2 && options2.ignoreErrors) {
          er = null;
          is = false;
        }
      }
      cb(er, is);
    });
  }
  function sync(path14, options2) {
    try {
      return core2.sync(path14, options2 || {});
    } catch (er) {
      if (options2 && options2.ignoreErrors || er.code === "EACCES") {
        return false;
      } else {
        throw er;
      }
    }
  }
  return isexe_1;
}
function requireWhich() {
  if (hasRequiredWhich) return which_1;
  hasRequiredWhich = 1;
  const isWindows2 = process.platform === "win32" || process.env.OSTYPE === "cygwin" || process.env.OSTYPE === "msys";
  const path14 = require$$0$4;
  const COLON = isWindows2 ? ";" : ":";
  const isexe = requireIsexe();
  const getNotFoundError = (cmd) => Object.assign(new Error(`not found: ${cmd}`), { code: "ENOENT" });
  const getPathInfo = (cmd, opt) => {
    const colon = opt.colon || COLON;
    const pathEnv = cmd.match(/\//) || isWindows2 && cmd.match(/\\/) ? [""] : [
      ...isWindows2 ? [process.cwd()] : [],
      ...(opt.path || process.env.PATH || "").split(colon)
    ];
    const pathExtExe = isWindows2 ? opt.pathExt || process.env.PATHEXT || ".EXE;.CMD;.BAT;.COM" : "";
    const pathExt = isWindows2 ? pathExtExe.split(colon) : [""];
    if (isWindows2) {
      if (cmd.indexOf(".") !== -1 && pathExt[0] !== "")
        pathExt.unshift("");
    }
    return {
      pathEnv,
      pathExt,
      pathExtExe
    };
  };
  const which = (cmd, opt, cb) => {
    if (typeof opt === "function") {
      cb = opt;
      opt = {};
    }
    if (!opt)
      opt = {};
    const { pathEnv, pathExt, pathExtExe } = getPathInfo(cmd, opt);
    const found = [];
    const step = (i) => new Promise((resolve2, reject) => {
      if (i === pathEnv.length)
        return opt.all && found.length ? resolve2(found) : reject(getNotFoundError(cmd));
      const ppRaw = pathEnv[i];
      const pathPart = /^".*"$/.test(ppRaw) ? ppRaw.slice(1, -1) : ppRaw;
      const pCmd = path14.join(pathPart, cmd);
      const p = !pathPart && /^\.[\\\/]/.test(cmd) ? cmd.slice(0, 2) + pCmd : pCmd;
      resolve2(subStep(p, i, 0));
    });
    const subStep = (p, i, ii) => new Promise((resolve2, reject) => {
      if (ii === pathExt.length)
        return resolve2(step(i + 1));
      const ext = pathExt[ii];
      isexe(p + ext, { pathExt: pathExtExe }, (er, is) => {
        if (!er && is) {
          if (opt.all)
            found.push(p + ext);
          else
            return resolve2(p + ext);
        }
        return resolve2(subStep(p, i, ii + 1));
      });
    });
    return cb ? step(0).then((res) => cb(null, res), cb) : step(0);
  };
  const whichSync = (cmd, opt) => {
    opt = opt || {};
    const { pathEnv, pathExt, pathExtExe } = getPathInfo(cmd, opt);
    const found = [];
    for (let i = 0; i < pathEnv.length; i++) {
      const ppRaw = pathEnv[i];
      const pathPart = /^".*"$/.test(ppRaw) ? ppRaw.slice(1, -1) : ppRaw;
      const pCmd = path14.join(pathPart, cmd);
      const p = !pathPart && /^\.[\\\/]/.test(cmd) ? cmd.slice(0, 2) + pCmd : pCmd;
      for (let j = 0; j < pathExt.length; j++) {
        const cur = p + pathExt[j];
        try {
          const is = isexe.sync(cur, { pathExt: pathExtExe });
          if (is) {
            if (opt.all)
              found.push(cur);
            else
              return cur;
          }
        } catch (ex) {
        }
      }
    }
    if (opt.all && found.length)
      return found;
    if (opt.nothrow)
      return null;
    throw getNotFoundError(cmd);
  };
  which_1 = which;
  which.sync = whichSync;
  return which_1;
}
function requirePathKey() {
  if (hasRequiredPathKey) return pathKey.exports;
  hasRequiredPathKey = 1;
  const pathKey$1 = (options2 = {}) => {
    const environment2 = options2.env || process.env;
    const platform = options2.platform || process.platform;
    if (platform !== "win32") {
      return "PATH";
    }
    return Object.keys(environment2).reverse().find((key) => key.toUpperCase() === "PATH") || "Path";
  };
  pathKey.exports = pathKey$1;
  pathKey.exports.default = pathKey$1;
  return pathKey.exports;
}
function requireResolveCommand() {
  if (hasRequiredResolveCommand) return resolveCommand_1;
  hasRequiredResolveCommand = 1;
  const path14 = require$$0$4;
  const which = requireWhich();
  const getPathKey = requirePathKey();
  function resolveCommandAttempt(parsed, withoutPathExt) {
    const env2 = parsed.options.env || process.env;
    const cwd = process.cwd();
    const hasCustomCwd = parsed.options.cwd != null;
    const shouldSwitchCwd = hasCustomCwd && process.chdir !== void 0 && !process.chdir.disabled;
    if (shouldSwitchCwd) {
      try {
        process.chdir(parsed.options.cwd);
      } catch (err) {
      }
    }
    let resolved;
    try {
      resolved = which.sync(parsed.command, {
        path: env2[getPathKey({ env: env2 })],
        pathExt: withoutPathExt ? path14.delimiter : void 0
      });
    } catch (e) {
    } finally {
      if (shouldSwitchCwd) {
        process.chdir(cwd);
      }
    }
    if (resolved) {
      resolved = path14.resolve(hasCustomCwd ? parsed.options.cwd : "", resolved);
    }
    return resolved;
  }
  function resolveCommand(parsed) {
    return resolveCommandAttempt(parsed) || resolveCommandAttempt(parsed, true);
  }
  resolveCommand_1 = resolveCommand;
  return resolveCommand_1;
}
function require_escape() {
  if (hasRequired_escape) return _escape;
  hasRequired_escape = 1;
  const metaCharsRegExp = /([()\][%!^"`<>&|;, *?])/g;
  function escapeCommand(arg) {
    arg = arg.replace(metaCharsRegExp, "^$1");
    return arg;
  }
  function escapeArgument(arg, doubleEscapeMetaChars) {
    arg = `${arg}`;
    arg = arg.replace(/(?=(\\+?)?)\1"/g, '$1$1\\"');
    arg = arg.replace(/(?=(\\+?)?)\1$/, "$1$1");
    arg = `"${arg}"`;
    arg = arg.replace(metaCharsRegExp, "^$1");
    if (doubleEscapeMetaChars) {
      arg = arg.replace(metaCharsRegExp, "^$1");
    }
    return arg;
  }
  _escape.command = escapeCommand;
  _escape.argument = escapeArgument;
  return _escape;
}
function requireShebangRegex() {
  if (hasRequiredShebangRegex) return shebangRegex;
  hasRequiredShebangRegex = 1;
  shebangRegex = /^#!(.*)/;
  return shebangRegex;
}
function requireShebangCommand() {
  if (hasRequiredShebangCommand) return shebangCommand;
  hasRequiredShebangCommand = 1;
  const shebangRegex2 = requireShebangRegex();
  shebangCommand = (string2 = "") => {
    const match = string2.match(shebangRegex2);
    if (!match) {
      return null;
    }
    const [path14, argument] = match[0].replace(/#! ?/, "").split(" ");
    const binary = path14.split("/").pop();
    if (binary === "env") {
      return argument;
    }
    return argument ? `${binary} ${argument}` : binary;
  };
  return shebangCommand;
}
function requireReadShebang() {
  if (hasRequiredReadShebang) return readShebang_1;
  hasRequiredReadShebang = 1;
  const fs10 = require$$0$3;
  const shebangCommand2 = requireShebangCommand();
  function readShebang(command2) {
    const size = 150;
    const buffer = Buffer.alloc(size);
    let fd;
    try {
      fd = fs10.openSync(command2, "r");
      fs10.readSync(fd, buffer, 0, size, 0);
      fs10.closeSync(fd);
    } catch (e) {
    }
    return shebangCommand2(buffer.toString());
  }
  readShebang_1 = readShebang;
  return readShebang_1;
}
function requireParse$1() {
  if (hasRequiredParse$1) return parse_1$1;
  hasRequiredParse$1 = 1;
  const path14 = require$$0$4;
  const resolveCommand = requireResolveCommand();
  const escape2 = require_escape();
  const readShebang = requireReadShebang();
  const isWin = process.platform === "win32";
  const isExecutableRegExp = /\.(?:com|exe)$/i;
  const isCmdShimRegExp = /node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;
  function detectShebang(parsed) {
    parsed.file = resolveCommand(parsed);
    const shebang = parsed.file && readShebang(parsed.file);
    if (shebang) {
      parsed.args.unshift(parsed.file);
      parsed.command = shebang;
      return resolveCommand(parsed);
    }
    return parsed.file;
  }
  function parseNonShell(parsed) {
    if (!isWin) {
      return parsed;
    }
    const commandFile = detectShebang(parsed);
    const needsShell = !isExecutableRegExp.test(commandFile);
    if (parsed.options.forceShell || needsShell) {
      const needsDoubleEscapeMetaChars = isCmdShimRegExp.test(commandFile);
      parsed.command = path14.normalize(parsed.command);
      parsed.command = escape2.command(parsed.command);
      parsed.args = parsed.args.map((arg) => escape2.argument(arg, needsDoubleEscapeMetaChars));
      const shellCommand = [parsed.command].concat(parsed.args).join(" ");
      parsed.args = ["/d", "/s", "/c", `"${shellCommand}"`];
      parsed.command = process.env.comspec || "cmd.exe";
      parsed.options.windowsVerbatimArguments = true;
    }
    return parsed;
  }
  function parse2(command2, args2, options2) {
    if (args2 && !Array.isArray(args2)) {
      options2 = args2;
      args2 = null;
    }
    args2 = args2 ? args2.slice(0) : [];
    options2 = Object.assign({}, options2);
    const parsed = {
      command: command2,
      args: args2,
      options: options2,
      file: void 0,
      original: {
        command: command2,
        args: args2
      }
    };
    return options2.shell ? parsed : parseNonShell(parsed);
  }
  parse_1$1 = parse2;
  return parse_1$1;
}
function requireEnoent() {
  if (hasRequiredEnoent) return enoent;
  hasRequiredEnoent = 1;
  const isWin = process.platform === "win32";
  function notFoundError(original, syscall) {
    return Object.assign(new Error(`${syscall} ${original.command} ENOENT`), {
      code: "ENOENT",
      errno: "ENOENT",
      syscall: `${syscall} ${original.command}`,
      path: original.command,
      spawnargs: original.args
    });
  }
  function hookChildProcess(cp, parsed) {
    if (!isWin) {
      return;
    }
    const originalEmit = cp.emit;
    cp.emit = function(name, arg1) {
      if (name === "exit") {
        const err = verifyENOENT(arg1, parsed);
        if (err) {
          return originalEmit.call(cp, "error", err);
        }
      }
      return originalEmit.apply(cp, arguments);
    };
  }
  function verifyENOENT(status, parsed) {
    if (isWin && status === 1 && !parsed.file) {
      return notFoundError(parsed.original, "spawn");
    }
    return null;
  }
  function verifyENOENTSync(status, parsed) {
    if (isWin && status === 1 && !parsed.file) {
      return notFoundError(parsed.original, "spawnSync");
    }
    return null;
  }
  enoent = {
    hookChildProcess,
    verifyENOENT,
    verifyENOENTSync,
    notFoundError
  };
  return enoent;
}
function requireCrossSpawn() {
  if (hasRequiredCrossSpawn) return crossSpawn.exports;
  hasRequiredCrossSpawn = 1;
  const cp = require$$0$5;
  const parse2 = requireParse$1();
  const enoent2 = requireEnoent();
  function spawn2(command2, args2, options2) {
    const parsed = parse2(command2, args2, options2);
    const spawned = cp.spawn(parsed.command, parsed.args, parsed.options);
    enoent2.hookChildProcess(spawned, parsed);
    return spawned;
  }
  function spawnSync2(command2, args2, options2) {
    const parsed = parse2(command2, args2, options2);
    const result = cp.spawnSync(parsed.command, parsed.args, parsed.options);
    result.error = result.error || enoent2.verifyENOENTSync(result.status, parsed);
    return result;
  }
  crossSpawn.exports = spawn2;
  crossSpawn.exports.spawn = spawn2;
  crossSpawn.exports.sync = spawnSync2;
  crossSpawn.exports._parse = parse2;
  crossSpawn.exports._enoent = enoent2;
  return crossSpawn.exports;
}
function __extends$1(d, b) {
  if (typeof b !== "function" && b !== null)
    throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
  extendStatics$1(d, b);
  function __() {
    this.constructor = d;
  }
  d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
}
function __awaiter$1(thisArg, _arguments, P, generator) {
  function adopt(value) {
    return value instanceof P ? value : new P(function(resolve2) {
      resolve2(value);
    });
  }
  return new (P || (P = Promise))(function(resolve2, reject) {
    function fulfilled(value) {
      try {
        step(generator.next(value));
      } catch (e) {
        reject(e);
      }
    }
    function rejected(value) {
      try {
        step(generator["throw"](value));
      } catch (e) {
        reject(e);
      }
    }
    function step(result) {
      result.done ? resolve2(result.value) : adopt(result.value).then(fulfilled, rejected);
    }
    step((generator = generator.apply(thisArg, [])).next());
  });
}
function __generator$1(thisArg, body) {
  var _ = { label: 0, sent: function() {
    if (t[0] & 1) throw t[1];
    return t[1];
  }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
  return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() {
    return this;
  }), g;
  function verb(n) {
    return function(v) {
      return step([n, v]);
    };
  }
  function step(op) {
    if (f) throw new TypeError("Generator is already executing.");
    while (g && (g = 0, op[0] && (_ = 0)), _) try {
      if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
      if (y = 0, t) op = [op[0] & 2, t.value];
      switch (op[0]) {
        case 0:
        case 1:
          t = op;
          break;
        case 4:
          _.label++;
          return { value: op[1], done: false };
        case 5:
          _.label++;
          y = op[1];
          op = [0];
          continue;
        case 7:
          op = _.ops.pop();
          _.trys.pop();
          continue;
        default:
          if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
            _ = 0;
            continue;
          }
          if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) {
            _.label = op[1];
            break;
          }
          if (op[0] === 6 && _.label < t[1]) {
            _.label = t[1];
            t = op;
            break;
          }
          if (t && _.label < t[2]) {
            _.label = t[2];
            _.ops.push(op);
            break;
          }
          if (t[2]) _.ops.pop();
          _.trys.pop();
          continue;
      }
      op = body.call(thisArg, _);
    } catch (e) {
      op = [6, e];
      y = 0;
    } finally {
      f = t = 0;
    }
    if (op[0] & 5) throw op[1];
    return { value: op[0] ? op[1] : void 0, done: true };
  }
}
function __values$1(o) {
  var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
  if (m) return m.call(o);
  if (o && typeof o.length === "number") return {
    next: function() {
      if (o && i >= o.length) o = void 0;
      return { value: o && o[i++], done: !o };
    }
  };
  throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
}
function __read$1(o, n) {
  var m = typeof Symbol === "function" && o[Symbol.iterator];
  if (!m) return o;
  var i = m.call(o), r, ar = [], e;
  try {
    while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
  } catch (error) {
    e = { error };
  } finally {
    try {
      if (r && !r.done && (m = i["return"])) m.call(i);
    } finally {
      if (e) throw e.error;
    }
  }
  return ar;
}
function __spreadArray$1(to, from2, pack) {
  if (arguments.length === 2) for (var i = 0, l = from2.length, ar; i < l; i++) {
    if (ar || !(i in from2)) {
      if (!ar) ar = Array.prototype.slice.call(from2, 0, i);
      ar[i] = from2[i];
    }
  }
  return to.concat(ar || Array.prototype.slice.call(from2));
}
function __await$1(v) {
  return this instanceof __await$1 ? (this.v = v, this) : new __await$1(v);
}
function __asyncGenerator$1(thisArg, _arguments, generator) {
  if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
  var g = generator.apply(thisArg, _arguments || []), i, q = [];
  return i = Object.create((typeof AsyncIterator === "function" ? AsyncIterator : Object).prototype), verb("next"), verb("throw"), verb("return", awaitReturn), i[Symbol.asyncIterator] = function() {
    return this;
  }, i;
  function awaitReturn(f) {
    return function(v) {
      return Promise.resolve(v).then(f, reject);
    };
  }
  function verb(n, f) {
    if (g[n]) {
      i[n] = function(v) {
        return new Promise(function(a, b) {
          q.push([n, v, a, b]) > 1 || resume(n, v);
        });
      };
      if (f) i[n] = f(i[n]);
    }
  }
  function resume(n, v) {
    try {
      step(g[n](v));
    } catch (e) {
      settle(q[0][3], e);
    }
  }
  function step(r) {
    r.value instanceof __await$1 ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r);
  }
  function fulfill(value) {
    resume("next", value);
  }
  function reject(value) {
    resume("throw", value);
  }
  function settle(f, v) {
    if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]);
  }
}
function __asyncValues$1(o) {
  if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
  var m = o[Symbol.asyncIterator], i;
  return m ? m.call(o) : (o = typeof __values$1 === "function" ? __values$1(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function() {
    return this;
  }, i);
  function verb(n) {
    i[n] = o[n] && function(v) {
      return new Promise(function(resolve2, reject) {
        v = o[n](v), settle(resolve2, reject, v.done, v.value);
      });
    };
  }
  function settle(resolve2, reject, d, v) {
    Promise.resolve(v).then(function(v2) {
      resolve2({ value: v2, done: d });
    }, reject);
  }
}
function isFunction2(value) {
  return typeof value === "function";
}
function createErrorClass(createImpl) {
  var _super = function(instance2) {
    Error.call(instance2);
    instance2.stack = new Error().stack;
  };
  var ctorFunc = createImpl(_super);
  ctorFunc.prototype = Object.create(Error.prototype);
  ctorFunc.prototype.constructor = ctorFunc;
  return ctorFunc;
}
function arrRemove(arr, item) {
  if (arr) {
    var index2 = arr.indexOf(item);
    0 <= index2 && arr.splice(index2, 1);
  }
}
function isSubscription(value) {
  return value instanceof Subscription || value && "closed" in value && isFunction2(value.remove) && isFunction2(value.add) && isFunction2(value.unsubscribe);
}
function execFinalizer(finalizer) {
  if (isFunction2(finalizer)) {
    finalizer();
  } else {
    finalizer.unsubscribe();
  }
}
function reportUnhandledError(err) {
  timeoutProvider.setTimeout(function() {
    {
      throw err;
    }
  });
}
function noop2() {
}
function errorContext(cb) {
  {
    cb();
  }
}
function handleUnhandledError(error) {
  {
    reportUnhandledError(error);
  }
}
function defaultErrorHandler(err) {
  throw err;
}
function identity(x) {
  return x;
}
function pipe() {
  var fns = [];
  for (var _i = 0; _i < arguments.length; _i++) {
    fns[_i] = arguments[_i];
  }
  return pipeFromArray(fns);
}
function pipeFromArray(fns) {
  if (fns.length === 0) {
    return identity;
  }
  if (fns.length === 1) {
    return fns[0];
  }
  return function piped(input) {
    return fns.reduce(function(prev, fn) {
      return fn(prev);
    }, input);
  };
}
function getPromiseCtor(promiseCtor) {
  var _a4;
  return (_a4 = promiseCtor !== null && promiseCtor !== void 0 ? promiseCtor : config$2.Promise) !== null && _a4 !== void 0 ? _a4 : Promise;
}
function isObserver(value) {
  return value && isFunction2(value.next) && isFunction2(value.error) && isFunction2(value.complete);
}
function isSubscriber(value) {
  return value && value instanceof Subscriber || isObserver(value) && isSubscription(value);
}
function hasLift(source2) {
  return isFunction2(source2 === null || source2 === void 0 ? void 0 : source2.lift);
}
function operate(init2) {
  return function(source2) {
    if (hasLift(source2)) {
      return source2.lift(function(liftedSource) {
        try {
          return init2(liftedSource, this);
        } catch (err) {
          this.error(err);
        }
      });
    }
    throw new TypeError("Unable to lift unknown Observable type");
  };
}
function createOperatorSubscriber(destination, onNext, onComplete, onError, onFinalize) {
  return new OperatorSubscriber(destination, onNext, onComplete, onError, onFinalize);
}
function isScheduler(value) {
  return value && isFunction2(value.schedule);
}
function last(arr) {
  return arr[arr.length - 1];
}
function popScheduler(args2) {
  return isScheduler(last(args2)) ? args2.pop() : void 0;
}
function popNumber(args2, defaultValue) {
  return typeof last(args2) === "number" ? args2.pop() : defaultValue;
}
function isPromise(value) {
  return isFunction2(value === null || value === void 0 ? void 0 : value.then);
}
function isInteropObservable(input) {
  return isFunction2(input[observable]);
}
function isAsyncIterable(obj) {
  return Symbol.asyncIterator && isFunction2(obj === null || obj === void 0 ? void 0 : obj[Symbol.asyncIterator]);
}
function createInvalidObservableTypeError(input) {
  return new TypeError("You provided " + (input !== null && typeof input === "object" ? "an invalid object" : "'" + input + "'") + " where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.");
}
function getSymbolIterator() {
  if (typeof Symbol !== "function" || !Symbol.iterator) {
    return "@@iterator";
  }
  return Symbol.iterator;
}
function isIterable(input) {
  return isFunction2(input === null || input === void 0 ? void 0 : input[iterator]);
}
function readableStreamLikeToAsyncGenerator(readableStream) {
  return __asyncGenerator$1(this, arguments, function readableStreamLikeToAsyncGenerator_1() {
    var reader, _a4, value, done;
    return __generator$1(this, function(_b2) {
      switch (_b2.label) {
        case 0:
          reader = readableStream.getReader();
          _b2.label = 1;
        case 1:
          _b2.trys.push([1, , 9, 10]);
          _b2.label = 2;
        case 2:
          return [4, __await$1(reader.read())];
        case 3:
          _a4 = _b2.sent(), value = _a4.value, done = _a4.done;
          if (!done) return [3, 5];
          return [4, __await$1(void 0)];
        case 4:
          return [2, _b2.sent()];
        case 5:
          return [4, __await$1(value)];
        case 6:
          return [4, _b2.sent()];
        case 7:
          _b2.sent();
          return [3, 2];
        case 8:
          return [3, 10];
        case 9:
          reader.releaseLock();
          return [7];
        case 10:
          return [2];
      }
    });
  });
}
function isReadableStreamLike(obj) {
  return isFunction2(obj === null || obj === void 0 ? void 0 : obj.getReader);
}
function innerFrom(input) {
  if (input instanceof Observable) {
    return input;
  }
  if (input != null) {
    if (isInteropObservable(input)) {
      return fromInteropObservable(input);
    }
    if (isArrayLike2(input)) {
      return fromArrayLike(input);
    }
    if (isPromise(input)) {
      return fromPromise(input);
    }
    if (isAsyncIterable(input)) {
      return fromAsyncIterable(input);
    }
    if (isIterable(input)) {
      return fromIterable(input);
    }
    if (isReadableStreamLike(input)) {
      return fromReadableStreamLike(input);
    }
  }
  throw createInvalidObservableTypeError(input);
}
function fromInteropObservable(obj) {
  return new Observable(function(subscriber) {
    var obs = obj[observable]();
    if (isFunction2(obs.subscribe)) {
      return obs.subscribe(subscriber);
    }
    throw new TypeError("Provided object does not correctly implement Symbol.observable");
  });
}
function fromArrayLike(array2) {
  return new Observable(function(subscriber) {
    for (var i = 0; i < array2.length && !subscriber.closed; i++) {
      subscriber.next(array2[i]);
    }
    subscriber.complete();
  });
}
function fromPromise(promise) {
  return new Observable(function(subscriber) {
    promise.then(function(value) {
      if (!subscriber.closed) {
        subscriber.next(value);
        subscriber.complete();
      }
    }, function(err) {
      return subscriber.error(err);
    }).then(null, reportUnhandledError);
  });
}
function fromIterable(iterable) {
  return new Observable(function(subscriber) {
    var e_1, _a4;
    try {
      for (var iterable_1 = __values$1(iterable), iterable_1_1 = iterable_1.next(); !iterable_1_1.done; iterable_1_1 = iterable_1.next()) {
        var value = iterable_1_1.value;
        subscriber.next(value);
        if (subscriber.closed) {
          return;
        }
      }
    } catch (e_1_1) {
      e_1 = { error: e_1_1 };
    } finally {
      try {
        if (iterable_1_1 && !iterable_1_1.done && (_a4 = iterable_1.return)) _a4.call(iterable_1);
      } finally {
        if (e_1) throw e_1.error;
      }
    }
    subscriber.complete();
  });
}
function fromAsyncIterable(asyncIterable) {
  return new Observable(function(subscriber) {
    process$1(asyncIterable, subscriber).catch(function(err) {
      return subscriber.error(err);
    });
  });
}
function fromReadableStreamLike(readableStream) {
  return fromAsyncIterable(readableStreamLikeToAsyncGenerator(readableStream));
}
function process$1(asyncIterable, subscriber) {
  var asyncIterable_1, asyncIterable_1_1;
  var e_2, _a4;
  return __awaiter$1(this, void 0, void 0, function() {
    var value, e_2_1;
    return __generator$1(this, function(_b2) {
      switch (_b2.label) {
        case 0:
          _b2.trys.push([0, 5, 6, 11]);
          asyncIterable_1 = __asyncValues$1(asyncIterable);
          _b2.label = 1;
        case 1:
          return [4, asyncIterable_1.next()];
        case 2:
          if (!(asyncIterable_1_1 = _b2.sent(), !asyncIterable_1_1.done)) return [3, 4];
          value = asyncIterable_1_1.value;
          subscriber.next(value);
          if (subscriber.closed) {
            return [2];
          }
          _b2.label = 3;
        case 3:
          return [3, 1];
        case 4:
          return [3, 11];
        case 5:
          e_2_1 = _b2.sent();
          e_2 = { error: e_2_1 };
          return [3, 11];
        case 6:
          _b2.trys.push([6, , 9, 10]);
          if (!(asyncIterable_1_1 && !asyncIterable_1_1.done && (_a4 = asyncIterable_1.return))) return [3, 8];
          return [4, _a4.call(asyncIterable_1)];
        case 7:
          _b2.sent();
          _b2.label = 8;
        case 8:
          return [3, 10];
        case 9:
          if (e_2) throw e_2.error;
          return [7];
        case 10:
          return [7];
        case 11:
          subscriber.complete();
          return [2];
      }
    });
  });
}
function executeSchedule(parentSubscription, scheduler, work, delay2, repeat) {
  if (delay2 === void 0) {
    delay2 = 0;
  }
  if (repeat === void 0) {
    repeat = false;
  }
  var scheduleSubscription = scheduler.schedule(function() {
    work();
    if (repeat) {
      parentSubscription.add(this.schedule(null, delay2));
    } else {
      this.unsubscribe();
    }
  }, delay2);
  parentSubscription.add(scheduleSubscription);
  if (!repeat) {
    return scheduleSubscription;
  }
}
function observeOn(scheduler, delay2) {
  if (delay2 === void 0) {
    delay2 = 0;
  }
  return operate(function(source2, subscriber) {
    source2.subscribe(createOperatorSubscriber(subscriber, function(value) {
      return executeSchedule(subscriber, scheduler, function() {
        return subscriber.next(value);
      }, delay2);
    }, function() {
      return executeSchedule(subscriber, scheduler, function() {
        return subscriber.complete();
      }, delay2);
    }, function(err) {
      return executeSchedule(subscriber, scheduler, function() {
        return subscriber.error(err);
      }, delay2);
    }));
  });
}
function subscribeOn(scheduler, delay2) {
  if (delay2 === void 0) {
    delay2 = 0;
  }
  return operate(function(source2, subscriber) {
    subscriber.add(scheduler.schedule(function() {
      return source2.subscribe(subscriber);
    }, delay2));
  });
}
function scheduleObservable(input, scheduler) {
  return innerFrom(input).pipe(subscribeOn(scheduler), observeOn(scheduler));
}
function schedulePromise(input, scheduler) {
  return innerFrom(input).pipe(subscribeOn(scheduler), observeOn(scheduler));
}
function scheduleArray(input, scheduler) {
  return new Observable(function(subscriber) {
    var i = 0;
    return scheduler.schedule(function() {
      if (i === input.length) {
        subscriber.complete();
      } else {
        subscriber.next(input[i++]);
        if (!subscriber.closed) {
          this.schedule();
        }
      }
    });
  });
}
function scheduleIterable(input, scheduler) {
  return new Observable(function(subscriber) {
    var iterator2;
    executeSchedule(subscriber, scheduler, function() {
      iterator2 = input[iterator]();
      executeSchedule(subscriber, scheduler, function() {
        var _a4;
        var value;
        var done;
        try {
          _a4 = iterator2.next(), value = _a4.value, done = _a4.done;
        } catch (err) {
          subscriber.error(err);
          return;
        }
        if (done) {
          subscriber.complete();
        } else {
          subscriber.next(value);
        }
      }, 0, true);
    });
    return function() {
      return isFunction2(iterator2 === null || iterator2 === void 0 ? void 0 : iterator2.return) && iterator2.return();
    };
  });
}
function scheduleAsyncIterable(input, scheduler) {
  if (!input) {
    throw new Error("Iterable cannot be null");
  }
  return new Observable(function(subscriber) {
    executeSchedule(subscriber, scheduler, function() {
      var iterator2 = input[Symbol.asyncIterator]();
      executeSchedule(subscriber, scheduler, function() {
        iterator2.next().then(function(result) {
          if (result.done) {
            subscriber.complete();
          } else {
            subscriber.next(result.value);
          }
        });
      }, 0, true);
    });
  });
}
function scheduleReadableStreamLike(input, scheduler) {
  return scheduleAsyncIterable(readableStreamLikeToAsyncGenerator(input), scheduler);
}
function scheduled(input, scheduler) {
  if (input != null) {
    if (isInteropObservable(input)) {
      return scheduleObservable(input, scheduler);
    }
    if (isArrayLike2(input)) {
      return scheduleArray(input, scheduler);
    }
    if (isPromise(input)) {
      return schedulePromise(input, scheduler);
    }
    if (isAsyncIterable(input)) {
      return scheduleAsyncIterable(input, scheduler);
    }
    if (isIterable(input)) {
      return scheduleIterable(input, scheduler);
    }
    if (isReadableStreamLike(input)) {
      return scheduleReadableStreamLike(input, scheduler);
    }
  }
  throw createInvalidObservableTypeError(input);
}
function from(input, scheduler) {
  return scheduler ? scheduled(input, scheduler) : innerFrom(input);
}
function of() {
  var args2 = [];
  for (var _i = 0; _i < arguments.length; _i++) {
    args2[_i] = arguments[_i];
  }
  var scheduler = popScheduler(args2);
  return from(args2, scheduler);
}
function lastValueFrom(source2, config22) {
  var hasConfig = typeof config22 === "object";
  return new Promise(function(resolve2, reject) {
    var _hasValue = false;
    var _value;
    source2.subscribe({
      next: function(value) {
        _value = value;
        _hasValue = true;
      },
      error: reject,
      complete: function() {
        if (_hasValue) {
          resolve2(_value);
        } else if (hasConfig) {
          resolve2(config22.defaultValue);
        } else {
          reject(new EmptyError());
        }
      }
    });
  });
}
function firstValueFrom(source2, config22) {
  return new Promise(function(resolve2, reject) {
    var subscriber = new SafeSubscriber({
      next: function(value) {
        resolve2(value);
        subscriber.unsubscribe();
      },
      error: reject,
      complete: function() {
        {
          reject(new EmptyError());
        }
      }
    });
    source2.subscribe(subscriber);
  });
}
function isValidDate(value) {
  return value instanceof Date && !isNaN(value);
}
function map(project, thisArg) {
  return operate(function(source2, subscriber) {
    var index2 = 0;
    source2.subscribe(createOperatorSubscriber(subscriber, function(value) {
      subscriber.next(project.call(thisArg, value, index2++));
    }));
  });
}
function callOrApply(fn, args2) {
  return isArray2(args2) ? fn.apply(void 0, __spreadArray$1([], __read$1(args2))) : fn(args2);
}
function mapOneOrManyArgs(fn) {
  return map(function(args2) {
    return callOrApply(fn, args2);
  });
}
function mergeInternals(source2, subscriber, project, concurrent, onBeforeNext, expand, innerSubScheduler, additionalFinalizer) {
  var buffer = [];
  var active = 0;
  var index2 = 0;
  var isComplete3 = false;
  var checkComplete = function() {
    if (isComplete3 && !buffer.length && !active) {
      subscriber.complete();
    }
  };
  var outerNext = function(value) {
    return active < concurrent ? doInnerSub(value) : buffer.push(value);
  };
  var doInnerSub = function(value) {
    expand && subscriber.next(value);
    active++;
    var innerComplete = false;
    innerFrom(project(value, index2++)).subscribe(createOperatorSubscriber(subscriber, function(innerValue) {
      onBeforeNext === null || onBeforeNext === void 0 ? void 0 : onBeforeNext(innerValue);
      if (expand) {
        outerNext(innerValue);
      } else {
        subscriber.next(innerValue);
      }
    }, function() {
      innerComplete = true;
    }, void 0, function() {
      if (innerComplete) {
        try {
          active--;
          var _loop_1 = function() {
            var bufferedValue = buffer.shift();
            if (innerSubScheduler) ;
            else {
              doInnerSub(bufferedValue);
            }
          };
          while (buffer.length && active < concurrent) {
            _loop_1();
          }
          checkComplete();
        } catch (err) {
          subscriber.error(err);
        }
      }
    }));
  };
  source2.subscribe(createOperatorSubscriber(subscriber, outerNext, function() {
    isComplete3 = true;
    checkComplete();
  }));
  return function() {
    additionalFinalizer === null || additionalFinalizer === void 0 ? void 0 : additionalFinalizer();
  };
}
function mergeMap(project, resultSelector, concurrent) {
  if (concurrent === void 0) {
    concurrent = Infinity;
  }
  if (isFunction2(resultSelector)) {
    return mergeMap(function(a, i) {
      return map(function(b, ii) {
        return resultSelector(a, b, i, ii);
      })(innerFrom(project(a, i)));
    }, concurrent);
  } else if (typeof resultSelector === "number") {
    concurrent = resultSelector;
  }
  return operate(function(source2, subscriber) {
    return mergeInternals(source2, subscriber, project, concurrent);
  });
}
function mergeAll(concurrent) {
  if (concurrent === void 0) {
    concurrent = Infinity;
  }
  return mergeMap(identity, concurrent);
}
function concatAll() {
  return mergeAll(1);
}
function concat() {
  var args2 = [];
  for (var _i = 0; _i < arguments.length; _i++) {
    args2[_i] = arguments[_i];
  }
  return concatAll()(from(args2, popScheduler(args2)));
}
function defer(observableFactory) {
  return new Observable(function(subscriber) {
    innerFrom(observableFactory()).subscribe(subscriber);
  });
}
function fromEvent(target, eventName, options2, resultSelector) {
  if (isFunction2(options2)) {
    resultSelector = options2;
    options2 = void 0;
  }
  if (resultSelector) {
    return fromEvent(target, eventName, options2).pipe(mapOneOrManyArgs(resultSelector));
  }
  var _a4 = __read$1(isEventTarget(target) ? eventTargetMethods.map(function(methodName) {
    return function(handler) {
      return target[methodName](eventName, handler, options2);
    };
  }) : isNodeStyleEventEmitter(target) ? nodeEventEmitterMethods.map(toCommonHandlerRegistry(target, eventName)) : isJQueryStyleEventEmitter(target) ? jqueryMethods.map(toCommonHandlerRegistry(target, eventName)) : [], 2), add = _a4[0], remove = _a4[1];
  if (!add) {
    if (isArrayLike2(target)) {
      return mergeMap(function(subTarget) {
        return fromEvent(subTarget, eventName, options2);
      })(innerFrom(target));
    }
  }
  if (!add) {
    throw new TypeError("Invalid event target");
  }
  return new Observable(function(subscriber) {
    var handler = function() {
      var args2 = [];
      for (var _i = 0; _i < arguments.length; _i++) {
        args2[_i] = arguments[_i];
      }
      return subscriber.next(1 < args2.length ? args2 : args2[0]);
    };
    add(handler);
    return function() {
      return remove(handler);
    };
  });
}
function toCommonHandlerRegistry(target, eventName) {
  return function(methodName) {
    return function(handler) {
      return target[methodName](eventName, handler);
    };
  };
}
function isNodeStyleEventEmitter(target) {
  return isFunction2(target.addListener) && isFunction2(target.removeListener);
}
function isJQueryStyleEventEmitter(target) {
  return isFunction2(target.on) && isFunction2(target.off);
}
function isEventTarget(target) {
  return isFunction2(target.addEventListener) && isFunction2(target.removeEventListener);
}
function timer(dueTime, intervalOrScheduler, scheduler) {
  if (dueTime === void 0) {
    dueTime = 0;
  }
  if (scheduler === void 0) {
    scheduler = async;
  }
  return new Observable(function(subscriber) {
    var due = isValidDate(dueTime) ? +dueTime - scheduler.now() : dueTime;
    if (due < 0) {
      due = 0;
    }
    var n = 0;
    return scheduler.schedule(function() {
      if (!subscriber.closed) {
        subscriber.next(n++);
        {
          subscriber.complete();
        }
      }
    }, due);
  });
}
function merge() {
  var args2 = [];
  for (var _i = 0; _i < arguments.length; _i++) {
    args2[_i] = arguments[_i];
  }
  var scheduler = popScheduler(args2);
  var concurrent = popNumber(args2, Infinity);
  var sources = args2;
  return !sources.length ? EMPTY : sources.length === 1 ? innerFrom(sources[0]) : mergeAll(concurrent)(from(sources, scheduler));
}
function argsOrArgArray(args2) {
  return args2.length === 1 && isArray3(args2[0]) ? args2[0] : args2;
}
function filter(predicate, thisArg) {
  return operate(function(source2, subscriber) {
    var index2 = 0;
    source2.subscribe(createOperatorSubscriber(subscriber, function(value) {
      return predicate.call(thisArg, value, index2++) && subscriber.next(value);
    }));
  });
}
function race() {
  var sources = [];
  for (var _i = 0; _i < arguments.length; _i++) {
    sources[_i] = arguments[_i];
  }
  sources = argsOrArgArray(sources);
  return sources.length === 1 ? innerFrom(sources[0]) : new Observable(raceInit(sources));
}
function raceInit(sources) {
  return function(subscriber) {
    var subscriptions = [];
    var _loop_1 = function(i2) {
      subscriptions.push(innerFrom(sources[i2]).subscribe(createOperatorSubscriber(subscriber, function(value) {
        if (subscriptions) {
          for (var s = 0; s < subscriptions.length; s++) {
            s !== i2 && subscriptions[s].unsubscribe();
          }
          subscriptions = null;
        }
        subscriber.next(value);
      })));
    };
    for (var i = 0; subscriptions && !subscriber.closed && i < sources.length; i++) {
      _loop_1(i);
    }
  };
}
function bufferCount(bufferSize, startBufferEvery) {
  if (startBufferEvery === void 0) {
    startBufferEvery = null;
  }
  startBufferEvery = startBufferEvery !== null && startBufferEvery !== void 0 ? startBufferEvery : bufferSize;
  return operate(function(source2, subscriber) {
    var buffers = [];
    var count = 0;
    source2.subscribe(createOperatorSubscriber(subscriber, function(value) {
      var e_1, _a4, e_2, _b2;
      var toEmit = null;
      if (count++ % startBufferEvery === 0) {
        buffers.push([]);
      }
      try {
        for (var buffers_1 = __values$1(buffers), buffers_1_1 = buffers_1.next(); !buffers_1_1.done; buffers_1_1 = buffers_1.next()) {
          var buffer = buffers_1_1.value;
          buffer.push(value);
          if (bufferSize <= buffer.length) {
            toEmit = toEmit !== null && toEmit !== void 0 ? toEmit : [];
            toEmit.push(buffer);
          }
        }
      } catch (e_1_1) {
        e_1 = { error: e_1_1 };
      } finally {
        try {
          if (buffers_1_1 && !buffers_1_1.done && (_a4 = buffers_1.return)) _a4.call(buffers_1);
        } finally {
          if (e_1) throw e_1.error;
        }
      }
      if (toEmit) {
        try {
          for (var toEmit_1 = __values$1(toEmit), toEmit_1_1 = toEmit_1.next(); !toEmit_1_1.done; toEmit_1_1 = toEmit_1.next()) {
            var buffer = toEmit_1_1.value;
            arrRemove(buffers, buffer);
            subscriber.next(buffer);
          }
        } catch (e_2_1) {
          e_2 = { error: e_2_1 };
        } finally {
          try {
            if (toEmit_1_1 && !toEmit_1_1.done && (_b2 = toEmit_1.return)) _b2.call(toEmit_1);
          } finally {
            if (e_2) throw e_2.error;
          }
        }
      }
    }, function() {
      var e_3, _a4;
      try {
        for (var buffers_2 = __values$1(buffers), buffers_2_1 = buffers_2.next(); !buffers_2_1.done; buffers_2_1 = buffers_2.next()) {
          var buffer = buffers_2_1.value;
          subscriber.next(buffer);
        }
      } catch (e_3_1) {
        e_3 = { error: e_3_1 };
      } finally {
        try {
          if (buffers_2_1 && !buffers_2_1.done && (_a4 = buffers_2.return)) _a4.call(buffers_2);
        } finally {
          if (e_3) throw e_3.error;
        }
      }
      subscriber.complete();
    }, void 0, function() {
      buffers = null;
    }));
  });
}
function catchError(selector) {
  return operate(function(source2, subscriber) {
    var innerSub = null;
    var syncUnsub = false;
    var handledResult;
    innerSub = source2.subscribe(createOperatorSubscriber(subscriber, void 0, void 0, function(err) {
      handledResult = innerFrom(selector(err, catchError(selector)(source2)));
      if (innerSub) {
        innerSub.unsubscribe();
        innerSub = null;
        handledResult.subscribe(subscriber);
      } else {
        syncUnsub = true;
      }
    }));
    if (syncUnsub) {
      innerSub.unsubscribe();
      innerSub = null;
      handledResult.subscribe(subscriber);
    }
  });
}
function concatMap(project, resultSelector) {
  return isFunction2(resultSelector) ? mergeMap(project, resultSelector, 1) : mergeMap(project, 1);
}
function defaultIfEmpty(defaultValue) {
  return operate(function(source2, subscriber) {
    var hasValue = false;
    source2.subscribe(createOperatorSubscriber(subscriber, function(value) {
      hasValue = true;
      subscriber.next(value);
    }, function() {
      if (!hasValue) {
        subscriber.next(defaultValue);
      }
      subscriber.complete();
    }));
  });
}
function take(count) {
  return count <= 0 ? function() {
    return EMPTY;
  } : operate(function(source2, subscriber) {
    var seen = 0;
    source2.subscribe(createOperatorSubscriber(subscriber, function(value) {
      if (++seen <= count) {
        subscriber.next(value);
        if (count <= seen) {
          subscriber.complete();
        }
      }
    }));
  });
}
function ignoreElements() {
  return operate(function(source2, subscriber) {
    source2.subscribe(createOperatorSubscriber(subscriber, noop2));
  });
}
function distinctUntilChanged(comparator2, keySelector) {
  if (keySelector === void 0) {
    keySelector = identity;
  }
  comparator2 = comparator2 !== null && comparator2 !== void 0 ? comparator2 : defaultCompare;
  return operate(function(source2, subscriber) {
    var previousKey;
    var first2 = true;
    source2.subscribe(createOperatorSubscriber(subscriber, function(value) {
      var currentKey = keySelector(value);
      if (first2 || !comparator2(previousKey, currentKey)) {
        first2 = false;
        previousKey = currentKey;
        subscriber.next(value);
      }
    }));
  });
}
function defaultCompare(a, b) {
  return a === b;
}
function throwIfEmpty(errorFactory) {
  if (errorFactory === void 0) {
    errorFactory = defaultErrorFactory;
  }
  return operate(function(source2, subscriber) {
    var hasValue = false;
    source2.subscribe(createOperatorSubscriber(subscriber, function(value) {
      hasValue = true;
      subscriber.next(value);
    }, function() {
      return hasValue ? subscriber.complete() : subscriber.error(errorFactory());
    }));
  });
}
function defaultErrorFactory() {
  return new EmptyError();
}
function first(predicate, defaultValue) {
  var hasDefaultValue = arguments.length >= 2;
  return function(source2) {
    return source2.pipe(predicate ? filter(function(v, i) {
      return predicate(v, i, source2);
    }) : identity, take(1), hasDefaultValue ? defaultIfEmpty(defaultValue) : throwIfEmpty(function() {
      return new EmptyError();
    }));
  };
}
function mergeScan(accumulator, seed, concurrent) {
  if (concurrent === void 0) {
    concurrent = Infinity;
  }
  return operate(function(source2, subscriber) {
    var state = seed;
    return mergeInternals(source2, subscriber, function(value, index2) {
      return accumulator(state, value, index2);
    }, concurrent, function(value) {
      state = value;
    }, false, void 0, function() {
      return state = null;
    });
  });
}
function raceWith() {
  var otherSources = [];
  for (var _i = 0; _i < arguments.length; _i++) {
    otherSources[_i] = arguments[_i];
  }
  return !otherSources.length ? identity : operate(function(source2, subscriber) {
    raceInit(__spreadArray$1([source2], __read$1(otherSources)))(subscriber);
  });
}
function retry(configOrCount) {
  if (configOrCount === void 0) {
    configOrCount = Infinity;
  }
  var config22;
  if (configOrCount && typeof configOrCount === "object") {
    config22 = configOrCount;
  } else {
    config22 = {
      count: configOrCount
    };
  }
  var _a4 = config22.count, count = _a4 === void 0 ? Infinity : _a4, delay2 = config22.delay, _b2 = config22.resetOnSuccess, resetOnSuccess = _b2 === void 0 ? false : _b2;
  return count <= 0 ? identity : operate(function(source2, subscriber) {
    var soFar = 0;
    var innerSub;
    var subscribeForRetry = function() {
      var syncUnsub = false;
      innerSub = source2.subscribe(createOperatorSubscriber(subscriber, function(value) {
        if (resetOnSuccess) {
          soFar = 0;
        }
        subscriber.next(value);
      }, void 0, function(err) {
        if (soFar++ < count) {
          var resub_1 = function() {
            if (innerSub) {
              innerSub.unsubscribe();
              innerSub = null;
              subscribeForRetry();
            } else {
              syncUnsub = true;
            }
          };
          if (delay2 != null) {
            var notifier = typeof delay2 === "number" ? timer(delay2) : innerFrom(delay2(err, soFar));
            var notifierSubscriber_1 = createOperatorSubscriber(subscriber, function() {
              notifierSubscriber_1.unsubscribe();
              resub_1();
            }, function() {
              subscriber.complete();
            });
            notifier.subscribe(notifierSubscriber_1);
          } else {
            resub_1();
          }
        } else {
          subscriber.error(err);
        }
      }));
      if (syncUnsub) {
        innerSub.unsubscribe();
        innerSub = null;
        subscribeForRetry();
      }
    };
    subscribeForRetry();
  });
}
function startWith() {
  var values = [];
  for (var _i = 0; _i < arguments.length; _i++) {
    values[_i] = arguments[_i];
  }
  var scheduler = popScheduler(values);
  return operate(function(source2, subscriber) {
    (scheduler ? concat(values, source2, scheduler) : concat(values, source2)).subscribe(subscriber);
  });
}
function switchMap(project, resultSelector) {
  return operate(function(source2, subscriber) {
    var innerSubscriber = null;
    var index2 = 0;
    var isComplete3 = false;
    var checkComplete = function() {
      return isComplete3 && !innerSubscriber && subscriber.complete();
    };
    source2.subscribe(createOperatorSubscriber(subscriber, function(value) {
      innerSubscriber === null || innerSubscriber === void 0 ? void 0 : innerSubscriber.unsubscribe();
      var innerIndex = 0;
      var outerIndex = index2++;
      innerFrom(project(value, outerIndex)).subscribe(innerSubscriber = createOperatorSubscriber(subscriber, function(innerValue) {
        return subscriber.next(resultSelector ? resultSelector(value, innerValue, outerIndex, innerIndex++) : innerValue);
      }, function() {
        innerSubscriber = null;
        checkComplete();
      }));
    }, function() {
      isComplete3 = true;
      checkComplete();
    }));
  });
}
function takeUntil(notifier) {
  return operate(function(source2, subscriber) {
    innerFrom(notifier).subscribe(createOperatorSubscriber(subscriber, function() {
      return subscriber.complete();
    }, noop2));
    !subscriber.closed && source2.subscribe(subscriber);
  });
}
function tap(observerOrNext, error, complete) {
  var tapObserver = isFunction2(observerOrNext) || error || complete ? { next: observerOrNext, error, complete } : observerOrNext;
  return tapObserver ? operate(function(source2, subscriber) {
    var _a4;
    (_a4 = tapObserver.subscribe) === null || _a4 === void 0 ? void 0 : _a4.call(tapObserver);
    var isUnsub = true;
    source2.subscribe(createOperatorSubscriber(subscriber, function(value) {
      var _a22;
      (_a22 = tapObserver.next) === null || _a22 === void 0 ? void 0 : _a22.call(tapObserver, value);
      subscriber.next(value);
    }, function() {
      var _a22;
      isUnsub = false;
      (_a22 = tapObserver.complete) === null || _a22 === void 0 ? void 0 : _a22.call(tapObserver);
      subscriber.complete();
    }, function(err) {
      var _a22;
      isUnsub = false;
      (_a22 = tapObserver.error) === null || _a22 === void 0 ? void 0 : _a22.call(tapObserver, err);
      subscriber.error(err);
    }, function() {
      var _a22, _b2;
      if (isUnsub) {
        (_a22 = tapObserver.unsubscribe) === null || _a22 === void 0 ? void 0 : _a22.call(tapObserver);
      }
      (_b2 = tapObserver.finalize) === null || _b2 === void 0 ? void 0 : _b2.call(tapObserver);
    }));
  }) : identity;
}
function mitt_default(n) {
  return { all: n = n || /* @__PURE__ */ new Map(), on: function(t, e) {
    var i = n.get(t);
    i ? i.push(e) : n.set(t, [e]);
  }, off: function(t, e) {
    var i = n.get(t);
    i && (e ? i.splice(i.indexOf(e) >>> 0, 1) : n.set(t, []));
  }, emit: function(t, e) {
    var i = n.get(t);
    i && i.slice().map(function(n2) {
      n2(e);
    }), (i = n.get("*")) && i.slice().map(function(n2) {
      n2(t, e);
    });
  } };
}
function stringToTypedArray(string2, base64Encoded = false) {
  if (base64Encoded) {
    if ("fromBase64" in Uint8Array) {
      return Uint8Array.fromBase64(string2);
    }
    if (typeof Buffer === "function") {
      return Buffer.from(string2, "base64");
    }
    return Uint8Array.from(atob(string2), (m) => {
      return m.codePointAt(0);
    });
  }
  return new TextEncoder().encode(string2);
}
function stringToBase64(str) {
  return typedArrayToBase64(new TextEncoder().encode(str));
}
function typedArrayToBase64(typedArray) {
  const chunkSize = 65534;
  const chunks = [];
  for (let i = 0; i < typedArray.length; i += chunkSize) {
    const chunk = typedArray.subarray(i, i + chunkSize);
    chunks.push(String.fromCodePoint.apply(null, chunk));
  }
  const binaryString = chunks.join("");
  return btoa(binaryString);
}
function mergeUint8Arrays(items2) {
  let length = 0;
  for (const item of items2) {
    length += item.length;
  }
  const result = new Uint8Array(length);
  let offset = 0;
  for (const item of items2) {
    result.set(item, offset);
    offset += item.length;
  }
  return result;
}
async function importDebug() {
  if (!debugModule) {
    debugModule = (await Promise.resolve().then(function() {
      return index;
    })).default;
  }
  return debugModule;
}
function evaluationString(fun, ...args2) {
  if (isString(fun)) {
    assert(args2.length === 0, "Cannot evaluate a string with arguments");
    return fun;
  }
  function serializeArgument(arg) {
    if (Object.is(arg, void 0)) {
      return "undefined";
    }
    return JSON.stringify(arg);
  }
  return `(${fun})(${args2.map(serializeArgument).join(",")})`;
}
async function getReadableAsTypedArray(readable, path14) {
  const buffers = [];
  const reader = readable.getReader();
  if (path14) {
    const fileHandle = await environment.value.fs.promises.open(path14, "w+");
    try {
      while (true) {
        const { done, value } = await reader.read();
        if (done) {
          break;
        }
        buffers.push(value);
        await fileHandle.writeFile(value);
      }
    } finally {
      await fileHandle.close();
    }
  } else {
    while (true) {
      const { done, value } = await reader.read();
      if (done) {
        break;
      }
      buffers.push(value);
    }
  }
  try {
    const concat2 = mergeUint8Arrays(buffers);
    if (concat2.length === 0) {
      return null;
    }
    return concat2;
  } catch (error) {
    debugError(error);
    return null;
  }
}
async function getReadableFromProtocolStream(client, handle) {
  return new ReadableStream({
    async pull(controller) {
      const { data: data32, base64Encoded, eof } = await client.send("IO.read", {
        handle
      });
      controller.enqueue(stringToTypedArray(data32, base64Encoded ?? false));
      if (eof) {
        await client.send("IO.close", { handle });
        controller.close();
      }
    }
  });
}
function validateDialogType(type2) {
  let dialogType = null;
  if (VALID_DIALOG_TYPES.has(type2)) {
    dialogType = type2;
  }
  assert(dialogType, `Unknown javascript dialog type: ${type2}`);
  return dialogType;
}
function timeout(ms2, cause) {
  return ms2 === 0 ? NEVER : timer(ms2).pipe(map(() => {
    throw new TimeoutError$1(`Timed out after waiting ${ms2}ms`, { cause });
  }));
}
function getSourceUrlComment(url) {
  return `//# sourceURL=${url}`;
}
function parsePDFOptions(options2 = {}, lengthUnit = "in") {
  const defaults3 = {
    scale: 1,
    displayHeaderFooter: false,
    headerTemplate: "",
    footerTemplate: "",
    printBackground: false,
    landscape: false,
    pageRanges: "",
    preferCSSPageSize: false,
    omitBackground: false,
    outline: false,
    tagged: true,
    waitForFonts: true
  };
  let width = 8.5;
  let height = 11;
  if (options2.format) {
    const format2 = paperFormats[options2.format.toLowerCase()][lengthUnit];
    assert(format2, "Unknown paper format: " + options2.format);
    width = format2.width;
    height = format2.height;
  } else {
    width = convertPrintParameterToInches(options2.width, lengthUnit) ?? width;
    height = convertPrintParameterToInches(options2.height, lengthUnit) ?? height;
  }
  const margin = {
    top: convertPrintParameterToInches(options2.margin?.top, lengthUnit) || 0,
    left: convertPrintParameterToInches(options2.margin?.left, lengthUnit) || 0,
    bottom: convertPrintParameterToInches(options2.margin?.bottom, lengthUnit) || 0,
    right: convertPrintParameterToInches(options2.margin?.right, lengthUnit) || 0
  };
  if (options2.outline) {
    options2.tagged = true;
  }
  return {
    ...defaults3,
    ...options2,
    width,
    height,
    margin
  };
}
function convertPrintParameterToInches(parameter, lengthUnit = "in") {
  if (typeof parameter === "undefined") {
    return void 0;
  }
  let pixels;
  if (isNumber(parameter)) {
    pixels = parameter;
  } else if (isString(parameter)) {
    const text = parameter;
    let unit = text.substring(text.length - 2).toLowerCase();
    let valueText = "";
    if (unit in unitToPixels) {
      valueText = text.substring(0, text.length - 2);
    } else {
      unit = "px";
      valueText = text;
    }
    const value = Number(valueText);
    assert(!isNaN(value), "Failed to parse parameter value: " + text);
    pixels = value * unitToPixels[unit];
  } else {
    throw new Error("page.pdf() Cannot handle parameter type: " + typeof parameter);
  }
  return pixels / unitToPixels[lengthUnit];
}
function fromEmitterEvent(emitter, eventName) {
  return new Observable((subscriber) => {
    const listener = (event) => {
      subscriber.next(event);
    };
    emitter.on(eventName, listener);
    return () => {
      emitter.off(eventName, listener);
    };
  });
}
function fromAbortSignal(signal, cause) {
  return signal ? fromEvent(signal, "abort").pipe(map(() => {
    if (signal.reason instanceof Error) {
      signal.reason.cause = cause;
      throw signal.reason;
    }
    throw new Error(signal.reason, { cause });
  })) : NEVER;
}
function filterAsync(predicate) {
  return mergeMap((value) => {
    return from(Promise.resolve(predicate(value))).pipe(filter((isMatch) => {
      return isMatch;
    }), map(() => {
      return value;
    }));
  });
}
function isErrorLike$1(obj) {
  return typeof obj === "object" && obj !== null && "name" in obj && "message" in obj;
}
function rewriteError$1(error, message, originalMessage) {
  error.message = message;
  error.originalMessage = originalMessage ?? error.originalMessage;
  return error;
}
function createProtocolErrorMessage(object2) {
  let message = object2.error.message;
  if (object2.error && typeof object2.error === "object" && "data" in object2.error) {
    message += ` ${object2.error.data}`;
  }
  return message;
}
function stringifyFunction(fn) {
  let value = fn.toString();
  if (value.match(/^(async )*function(\(|\s)/) || value.match(/^(async )*function\s*\*\s*/)) {
    return value;
  }
  const isArrow = value.startsWith("(") || value.match(/^async\s*\(/) || value.match(/^(async)*\s*(?:[$_\p{ID_Start}])(?:[$\u200C\u200D\p{ID_Continue}])*\s*=>/u);
  if (isArrow) {
    return value;
  }
  let prefix = "function ";
  if (value.startsWith("async ")) {
    prefix = `async ${prefix}`;
    value = value.substring("async ".length);
  }
  return `${prefix}${value}`;
}
async function* fastTransposeIteratorHandle(iterator2, size) {
  const env_1 = { stack: [], error: void 0, hasError: false };
  try {
    const array2 = __addDisposableResource$d(env_1, await iterator2.evaluateHandle(async (iterator3, size2) => {
      const results = [];
      while (results.length < size2) {
        const result = await iterator3.next();
        if (result.done) {
          break;
        }
        results.push(result.value);
      }
      return results;
    }, size), false);
    const properties2 = await array2.getProperties();
    const handles = properties2.values();
    const stack = __addDisposableResource$d(env_1, new DisposableStack(), false);
    stack.defer(() => {
      for (const handle_1 of handles) {
        const env_2 = { stack: [], error: void 0, hasError: false };
        try {
          const handle = __addDisposableResource$d(env_2, handle_1, false);
          handle[disposeSymbol]();
        } catch (e_2) {
          env_2.error = e_2;
          env_2.hasError = true;
        } finally {
          __disposeResources$d(env_2);
        }
      }
    });
    yield* handles;
    return properties2.size === 0;
  } catch (e_1) {
    env_1.error = e_1;
    env_1.hasError = true;
  } finally {
    __disposeResources$d(env_1);
  }
}
async function* transposeIteratorHandle(iterator2) {
  let size = DEFAULT_BATCH_SIZE;
  while (!(yield* fastTransposeIteratorHandle(iterator2, size))) {
    size <<= 1;
  }
}
async function* transposeIterableHandle(handle) {
  const env_3 = { stack: [], error: void 0, hasError: false };
  try {
    const generatorHandle = __addDisposableResource$d(env_3, await handle.evaluateHandle((iterable) => {
      return async function* () {
        yield* iterable;
      }();
    }), false);
    yield* transposeIteratorHandle(generatorHandle);
  } catch (e_3) {
    env_3.error = e_3;
    env_3.hasError = true;
  } finally {
    __disposeResources$d(env_3);
  }
}
function gobbleParens(text, offset) {
  let nesting = 0;
  let result = "";
  for (; offset < text.length; offset++) {
    const char = text[offset];
    switch (char) {
      case "(":
        ++nesting;
        break;
      case ")":
        --nesting;
        break;
    }
    result += char;
    if (nesting === 0) {
      return result;
    }
  }
  return result;
}
function tokenizeBy(text, grammar = TOKENS) {
  if (!text) {
    return [];
  }
  const tokens = [text];
  for (const [type2, pattern2] of Object.entries(grammar)) {
    for (let i = 0; i < tokens.length; i++) {
      const token = tokens[i];
      if (typeof token !== "string") {
        continue;
      }
      pattern2.lastIndex = 0;
      const match = pattern2.exec(token);
      if (!match) {
        continue;
      }
      const from2 = match.index - 1;
      const args2 = [];
      const content = match[0];
      const before = token.slice(0, from2 + 1);
      if (before) {
        args2.push(before);
      }
      args2.push({
        ...match.groups,
        type: type2,
        content
      });
      const after = token.slice(from2 + content.length + 1);
      if (after) {
        args2.push(after);
      }
      tokens.splice(i, 1, ...args2);
    }
  }
  let offset = 0;
  for (const token of tokens) {
    switch (typeof token) {
      case "string":
        throw new Error(`Unexpected sequence ${token} found at index ${offset}`);
      case "object":
        offset += token.content.length;
        token.pos = [offset - token.content.length, offset];
        if (TRIM_TOKENS.has(token.type)) {
          token.content = token.content.trim() || " ";
        }
        break;
    }
  }
  return tokens;
}
function tokenize(selector, grammar = TOKENS) {
  selector = selector.trim();
  if (selector === "") {
    return [];
  }
  const replacements = [];
  selector = selector.replace(ESCAPE_PATTERN, (value, offset) => {
    replacements.push({ value, offset });
    return "\uE000".repeat(value.length);
  });
  selector = selector.replace(STRING_PATTERN, (value, quote, content, offset) => {
    replacements.push({ value, offset });
    return `${quote}${"\uE001".repeat(content.length)}${quote}`;
  });
  {
    let pos = 0;
    let offset;
    while ((offset = selector.indexOf("(", pos)) > -1) {
      const value = gobbleParens(selector, offset);
      replacements.push({ value, offset });
      selector = `${selector.substring(0, offset)}(${"\xB6".repeat(value.length - 2)})${selector.substring(offset + value.length)}`;
      pos = offset + value.length;
    }
  }
  const tokens = tokenizeBy(selector, grammar);
  const changedTokens = /* @__PURE__ */ new Set();
  for (const replacement of replacements.reverse()) {
    for (const token of tokens) {
      const { offset, value } = replacement;
      if (!(token.pos[0] <= offset && offset + value.length <= token.pos[1])) {
        continue;
      }
      const { content } = token;
      const tokenOffset = offset - token.pos[0];
      token.content = content.slice(0, tokenOffset) + value + content.slice(tokenOffset + value.length);
      if (token.content !== content) {
        changedTokens.add(token);
      }
    }
  }
  for (const token of changedTokens) {
    const pattern2 = getArgumentPatternByType(token.type);
    if (!pattern2) {
      throw new Error(`Unknown token type: ${token.type}`);
    }
    pattern2.lastIndex = 0;
    const match = pattern2.exec(token.content);
    if (!match) {
      throw new Error(`Unable to parse content for ${token.type}: ${token.content}`);
    }
    Object.assign(token, match.groups);
  }
  return tokens;
}
function stringify(listOrNode) {
  if (Array.isArray(listOrNode)) {
    return listOrNode.map((token) => token.content).join("");
  }
  switch (listOrNode.type) {
    case "list":
      return listOrNode.list.map(stringify).join(",");
    case "relative":
      return listOrNode.combinator + stringify(listOrNode.right);
    case "complex":
      return stringify(listOrNode.left) + listOrNode.combinator + stringify(listOrNode.right);
    case "compound":
      return listOrNode.list.map(stringify).join("");
    default:
      return listOrNode.content;
  }
}
function parsePSelectors(selector) {
  let isPureCSS = true;
  let hasAria = false;
  let hasPseudoClasses = false;
  const tokens = tokenize(selector);
  if (tokens.length === 0) {
    return [[], isPureCSS, hasPseudoClasses, false];
  }
  let compoundSelector = [];
  let complexSelector = [compoundSelector];
  const selectors = [complexSelector];
  const storage = [];
  for (const token of tokens) {
    switch (token.type) {
      case "combinator":
        switch (token.content) {
          case ">>>":
            isPureCSS = false;
            if (storage.length) {
              compoundSelector.push(stringify(storage));
              storage.splice(0);
            }
            compoundSelector = [];
            complexSelector.push(">>>");
            complexSelector.push(compoundSelector);
            continue;
          case ">>>>":
            isPureCSS = false;
            if (storage.length) {
              compoundSelector.push(stringify(storage));
              storage.splice(0);
            }
            compoundSelector = [];
            complexSelector.push(">>>>");
            complexSelector.push(compoundSelector);
            continue;
        }
        break;
      case "pseudo-element":
        if (!token.name.startsWith("-p-")) {
          break;
        }
        isPureCSS = false;
        if (storage.length) {
          compoundSelector.push(stringify(storage));
          storage.splice(0);
        }
        const name = token.name.slice(3);
        if (name === "aria") {
          hasAria = true;
        }
        compoundSelector.push({
          name,
          value: unquote(token.argument ?? "")
        });
        continue;
      case "pseudo-class":
        hasPseudoClasses = true;
        break;
      case "comma":
        if (storage.length) {
          compoundSelector.push(stringify(storage));
          storage.splice(0);
        }
        compoundSelector = [];
        complexSelector = [compoundSelector];
        selectors.push(complexSelector);
        continue;
    }
    storage.push(token);
  }
  if (storage.length) {
    compoundSelector.push(stringify(storage));
  }
  return [selectors, isPureCSS, hasPseudoClasses, hasAria];
}
function getQueryHandlerAndSelector(selector) {
  for (const handlerMap of [
    customQueryHandlers.names().map((name) => {
      return [name, customQueryHandlers.get(name)];
    }),
    Object.entries(BUILTIN_QUERY_HANDLERS)
  ]) {
    for (const [name, QueryHandler2] of handlerMap) {
      for (const separator of QUERY_SEPARATORS) {
        const prefix = `${name}${separator}`;
        if (selector.startsWith(prefix)) {
          selector = selector.slice(prefix.length);
          return {
            updatedSelector: selector,
            polling: name === "aria" ? "raf" : "mutation",
            QueryHandler: QueryHandler2
          };
        }
      }
    }
  }
  try {
    const [pSelector, isPureCSS, hasPseudoClasses, hasAria] = parsePSelectors(selector);
    if (isPureCSS) {
      return {
        updatedSelector: selector,
        polling: hasPseudoClasses ? "raf" : "mutation",
        QueryHandler: CSSQueryHandler
      };
    }
    return {
      updatedSelector: JSON.stringify(pSelector),
      polling: hasAria ? "raf" : "mutation",
      QueryHandler: PQueryHandler
    };
  } catch {
    return {
      updatedSelector: selector,
      polling: "mutation",
      QueryHandler: CSSQueryHandler
    };
  }
}
function moveable(Class, _) {
  let hasDispose = false;
  if (Class.prototype[disposeSymbol]) {
    const dispose = Class.prototype[disposeSymbol];
    Class.prototype[disposeSymbol] = function() {
      if (instances.has(this)) {
        instances.delete(this);
        return;
      }
      return dispose.call(this);
    };
    hasDispose = true;
  }
  if (Class.prototype[asyncDisposeSymbol]) {
    const asyncDispose = Class.prototype[asyncDisposeSymbol];
    Class.prototype[asyncDisposeSymbol] = function() {
      if (instances.has(this)) {
        instances.delete(this);
        return;
      }
      return asyncDispose.call(this);
    };
    hasDispose = true;
  }
  if (hasDispose) {
    Class.prototype.move = function() {
      instances.add(this);
      return this;
    };
  }
  return Class;
}
function throwIfDisposed(message = (value) => {
  return `Attempted to use disposed ${value.constructor.name}.`;
}) {
  return (target, _) => {
    return function(...args2) {
      if (this.disposed) {
        throw new Error(message(this));
      }
      return target.call(this, ...args2);
    };
  };
}
function invokeAtMostOnceForArguments(target, _) {
  const cache = /* @__PURE__ */ new WeakMap();
  let cacheDepth = -1;
  return function(...args2) {
    if (cacheDepth === -1) {
      cacheDepth = args2.length;
    }
    if (cacheDepth !== args2.length) {
      throw new Error("Memoized method was called with the wrong number of arguments");
    }
    let freshArguments = false;
    let cacheIterator = cache;
    for (const arg of args2) {
      if (cacheIterator.has(arg)) {
        cacheIterator = cacheIterator.get(arg);
      } else {
        freshArguments = true;
        cacheIterator.set(arg, /* @__PURE__ */ new WeakMap());
        cacheIterator = cacheIterator.get(arg);
      }
    }
    if (!freshArguments) {
      return;
    }
    return target.call(this, ...args2);
  };
}
function guarded(getKey = function() {
  return this;
}) {
  return (target, _) => {
    const mutexes = /* @__PURE__ */ new WeakMap();
    return async function(...args2) {
      const env_1 = { stack: [], error: void 0, hasError: false };
      try {
        const key = getKey.call(this);
        let mutex = mutexes.get(key);
        if (!mutex) {
          mutex = new Mutex$2();
          mutexes.set(key, mutex);
        }
        const _2 = __addDisposableResource$b(env_1, await mutex.acquire(), true);
        return await target.call(this, ...args2);
      } catch (e_1) {
        env_1.error = e_1;
        env_1.hasError = true;
      } finally {
        const result_1 = __disposeResources$b(env_1);
        if (result_1)
          await result_1;
      }
    };
  };
}
function checkLocatorArray(locators) {
  for (const locator of locators) {
    if (!(locator instanceof Locator)) {
      throw new Error("Unknown locator for race candidate");
    }
  }
  return locators;
}
function bindIsolatedHandle(target, _) {
  return async function(...args2) {
    if (this.realm === this.frame.isolatedRealm()) {
      return await target.call(this, ...args2);
    }
    let adoptedThis;
    if (this["isolatedHandle"]) {
      adoptedThis = this["isolatedHandle"];
    } else {
      this["isolatedHandle"] = adoptedThis = await this.frame.isolatedRealm().adoptHandle(this);
    }
    const result = await target.call(adoptedThis, ...args2);
    if (result === adoptedThis) {
      return this;
    }
    if (result instanceof JSHandle) {
      return await this.realm.transferHandle(result);
    }
    if (Array.isArray(result)) {
      await Promise.all(result.map(async (item, index2, result2) => {
        if (item instanceof JSHandle) {
          result2[index2] = await this.realm.transferHandle(item);
        }
      }));
    }
    if (result instanceof Map) {
      await Promise.all([...result.entries()].map(async ([key, value]) => {
        if (value instanceof JSHandle) {
          result.set(key, await this.realm.transferHandle(value));
        }
      }));
    }
    return result;
  };
}
function intersectBoundingBox(box, width, height) {
  box.width = Math.max(box.x >= 0 ? Math.min(width - box.x, box.width) : Math.min(width, box.width + box.x), 0);
  box.height = Math.max(box.y >= 0 ? Math.min(height - box.y, box.height) : Math.min(height, box.height + box.y), 0);
  box.x = Math.max(box.x, 0);
  box.y = Math.max(box.y, 0);
}
function headersArray(headers) {
  const result = [];
  for (const name in headers) {
    const value = headers[name];
    if (!Object.is(value, void 0)) {
      const values = Array.isArray(value) ? value : [value];
      result.push(...values.map((value2) => {
        return { name, value: value2 + "" };
      }));
    }
  }
  return result;
}
function handleError(error) {
  if (error.originalMessage.includes("Invalid header") || error.originalMessage.includes("Unsafe header") || error.originalMessage.includes('Expected "header"') || error.originalMessage.includes("invalid argument")) {
    throw error;
  }
  debugError(error);
}
function createIncrementalIdGenerator() {
  let id2 = 0;
  return () => {
    if (id2 === Number.MAX_SAFE_INTEGER) {
      id2 = 0;
    }
    return ++id2;
  };
}
function setDefaultScreenshotOptions(options2) {
  options2.optimizeForSpeed ??= false;
  options2.type ??= "png";
  options2.fromSurface ??= true;
  options2.fullPage ??= false;
  options2.omitBackground ??= false;
  options2.encoding ??= "binary";
  options2.captureBeyondViewport ??= true;
}
function normalizeRectangle(clip) {
  return {
    ...clip,
    ...clip.width < 0 ? {
      x: clip.x + clip.width,
      width: -clip.width
    } : {
      x: clip.x,
      width: clip.width
    },
    ...clip.height < 0 ? {
      y: clip.y + clip.height,
      height: -clip.height
    } : {
      y: clip.y,
      height: clip.height
    }
  };
}
function roundRectangle(clip) {
  const x = Math.round(clip.x);
  const y = Math.round(clip.y);
  const width = Math.round(clip.width + clip.x - x);
  const height = Math.round(clip.height + clip.y - y);
  return { ...clip, x, y, width, height };
}
function isTargetClosedError(error) {
  return error instanceof TargetCloseError;
}
function convertToDisjointRanges(nestedRanges) {
  const points = [];
  for (const range2 of nestedRanges) {
    points.push({ offset: range2.startOffset, type: 0, range: range2 });
    points.push({ offset: range2.endOffset, type: 1, range: range2 });
  }
  points.sort((a, b) => {
    if (a.offset !== b.offset) {
      return a.offset - b.offset;
    }
    if (a.type !== b.type) {
      return b.type - a.type;
    }
    const aLength = a.range.endOffset - a.range.startOffset;
    const bLength = b.range.endOffset - b.range.startOffset;
    if (a.type === 0) {
      return bLength - aLength;
    }
    return aLength - bLength;
  });
  const hitCountStack = [];
  const results = [];
  let lastOffset = 0;
  for (const point of points) {
    if (hitCountStack.length && lastOffset < point.offset && hitCountStack[hitCountStack.length - 1] > 0) {
      const lastResult = results[results.length - 1];
      if (lastResult && lastResult.end === lastOffset) {
        lastResult.end = point.offset;
      } else {
        results.push({ start: lastOffset, end: point.offset });
      }
    }
    lastOffset = point.offset;
    if (point.type === 0) {
      hitCountStack.push(point.range.count);
    } else {
      hitCountStack.pop();
    }
  }
  return results.filter((range2) => {
    return range2.end - range2.start > 0;
  });
}
function createEvaluationError(details) {
  let name;
  let message;
  if (!details.exception) {
    name = "Error";
    message = details.text;
  } else if ((details.exception.type !== "object" || details.exception.subtype !== "error") && !details.exception.objectId) {
    return valueFromPrimitiveRemoteObject(details.exception);
  } else {
    const detail = getErrorDetails(details);
    name = detail.name;
    message = detail.message;
  }
  const messageHeight = message.split("\n").length;
  const error = new Error(message);
  error.name = name;
  const stackLines = error.stack.split("\n");
  const messageLines = stackLines.splice(0, messageHeight);
  stackLines.shift();
  if (details.stackTrace && stackLines.length < Error.stackTraceLimit) {
    for (const frame of details.stackTrace.callFrames.reverse()) {
      if (PuppeteerURL.isPuppeteerURL(frame.url) && frame.url !== PuppeteerURL.INTERNAL_URL) {
        const url = PuppeteerURL.parse(frame.url);
        stackLines.unshift(`    at ${frame.functionName || url.functionName} (${url.functionName} at ${url.siteString}, <anonymous>:${frame.lineNumber}:${frame.columnNumber})`);
      } else {
        stackLines.push(`    at ${frame.functionName || "<anonymous>"} (${frame.url}:${frame.lineNumber}:${frame.columnNumber})`);
      }
      if (stackLines.length >= Error.stackTraceLimit) {
        break;
      }
    }
  }
  error.stack = [...messageLines, ...stackLines].join("\n");
  return error;
}
function createClientError(details) {
  let name;
  let message;
  if (!details.exception) {
    name = "Error";
    message = details.text;
  } else if ((details.exception.type !== "object" || details.exception.subtype !== "error") && !details.exception.objectId) {
    return valueFromPrimitiveRemoteObject(details.exception);
  } else {
    const detail = getErrorDetails(details);
    name = detail.name;
    message = detail.message;
  }
  const error = new Error(message);
  error.name = name;
  const messageHeight = error.message.split("\n").length;
  const messageLines = error.stack.split("\n").splice(0, messageHeight);
  const stackLines = [];
  if (details.stackTrace) {
    for (const frame of details.stackTrace.callFrames) {
      stackLines.push(`    at ${frame.functionName || "<anonymous>"} (${frame.url}:${frame.lineNumber + 1}:${frame.columnNumber + 1})`);
      if (stackLines.length >= Error.stackTraceLimit) {
        break;
      }
    }
  }
  error.stack = [...messageLines, ...stackLines].join("\n");
  return error;
}
function valueFromJSHandle(handle) {
  const remoteObject = handle.remoteObject();
  if (remoteObject.objectId) {
    return valueFromRemoteObjectReference(handle);
  } else {
    return valueFromPrimitiveRemoteObject(remoteObject);
  }
}
function valueFromRemoteObjectReference(handle) {
  const remoteObject = handle.remoteObject();
  assert(remoteObject.objectId, "Cannot extract value when no objectId is given");
  const description2 = remoteObject.description ?? "";
  if (remoteObject.subtype === "error" && description2) {
    const newlineIdx = description2.indexOf("\n");
    if (newlineIdx === -1) {
      return description2;
    }
    return description2.slice(0, newlineIdx);
  }
  return `[${remoteObject.subtype || remoteObject.type} ${remoteObject.className}]`;
}
function valueFromPrimitiveRemoteObject(remoteObject) {
  assert(!remoteObject.objectId, "Cannot extract value when objectId is given");
  if (remoteObject.unserializableValue) {
    if (remoteObject.type === "bigint") {
      return BigInt(remoteObject.unserializableValue.replace("n", ""));
    }
    switch (remoteObject.unserializableValue) {
      case "-0":
        return -0;
      case "NaN":
        return NaN;
      case "Infinity":
        return Infinity;
      case "-Infinity":
        return -Infinity;
      default:
        throw new Error("Unsupported unserializable value: " + remoteObject.unserializableValue);
    }
  }
  return remoteObject.value;
}
function addPageBinding(type2, name, prefix) {
  if (globalThis[name]) {
    return;
  }
  Object.assign(globalThis, {
    [name](...args2) {
      const callPuppeteer = globalThis[name];
      callPuppeteer.args ??= /* @__PURE__ */ new Map();
      callPuppeteer.callbacks ??= /* @__PURE__ */ new Map();
      const seq = (callPuppeteer.lastSeq ?? 0) + 1;
      callPuppeteer.lastSeq = seq;
      callPuppeteer.args.set(seq, args2);
      globalThis[prefix + name](JSON.stringify({
        type: type2,
        name,
        seq,
        args: args2,
        isTrivial: !args2.some((value) => {
          return value instanceof Node;
        })
      }));
      return new Promise((resolve2, reject) => {
        callPuppeteer.callbacks.set(seq, {
          resolve(value) {
            callPuppeteer.args.delete(seq);
            resolve2(value);
          },
          reject(value) {
            callPuppeteer.args.delete(seq);
            reject(value);
          }
        });
      });
    }
  });
}
function pageBindingInitString(type2, name) {
  return evaluationString(addPageBinding, type2, name, CDP_BINDING_PREFIX);
}
async function releaseObject(client, remoteObject) {
  if (!remoteObject.objectId) {
    return;
  }
  await client.send("Runtime.releaseObject", { objectId: remoteObject.objectId }).catch((error) => {
    debugError(error);
  });
}
function referrerPolicyToProtocol(referrerPolicy) {
  return referrerPolicy.replaceAll(/-./g, (match) => {
    return match[1].toUpperCase();
  });
}
function convertConsoleMessageLevel(method) {
  switch (method) {
    case "warning":
      return "warn";
    default:
      return method;
  }
}
function convertSameSiteFromPuppeteerToCdp(sameSite) {
  switch (sameSite) {
    case "Strict":
    case "Lax":
    case "None":
      return sameSite;
    default:
      return void 0;
  }
}
function getIntersectionRect(clip, viewport) {
  const x = Math.max(clip.x, viewport.x);
  const y = Math.max(clip.y, viewport.y);
  return {
    x,
    y,
    width: Math.max(Math.min(clip.x + clip.width, viewport.x + viewport.width) - x, 0),
    height: Math.max(Math.min(clip.y + clip.height, viewport.y + viewport.height) - y, 0)
  };
}
function convertCookiesPartitionKeyFromPuppeteerToCdp(partitionKey) {
  if (partitionKey === void 0) {
    return void 0;
  }
  if (typeof partitionKey === "string") {
    return {
      topLevelSite: partitionKey,
      hasCrossSiteAncestor: false
    };
  }
  return {
    topLevelSite: partitionKey.sourceOrigin,
    hasCrossSiteAncestor: partitionKey.hasCrossSiteAncestor ?? false
  };
}
function isPageTargetBecomingPrimary(target, newTargetInfo) {
  return Boolean(target._subtype()) && !newTargetInfo.subtype;
}
function isDevToolsPageTarget(url) {
  return url.startsWith("devtools://devtools/bundled/devtools_app.html");
}
async function _connectToCdpBrowser(connectionTransport, url, options2) {
  const { acceptInsecureCerts = false, networkEnabled = true, defaultViewport = DEFAULT_VIEWPORT, downloadBehavior, targetFilter, _isPageTarget: isPageTarget, slowMo = 0, protocolTimeout, handleDevToolsAsPage, idGenerator = createIncrementalIdGenerator() } = options2;
  const connection = new Connection(
    url,
    connectionTransport,
    slowMo,
    protocolTimeout,
    false,
    idGenerator
  );
  const { browserContextIds } = await connection.send("Target.getBrowserContexts");
  const browser3 = await CdpBrowser._create(connection, browserContextIds, acceptInsecureCerts, defaultViewport, downloadBehavior, void 0, () => {
    return connection.send("Browser.close").catch(debugError);
  }, targetFilter, isPageTarget, void 0, networkEnabled, handleDevToolsAsPage);
  return browser3;
}
async function _connectToBiDiBrowser(connectionTransport, url, options2) {
  const { acceptInsecureCerts = false, networkEnabled = true, defaultViewport = DEFAULT_VIEWPORT } = options2;
  const { bidiConnection, cdpConnection, closeCallback } = await getBiDiConnection(connectionTransport, url, options2);
  const BiDi = await import("../../../node_modules/puppeteer-core/lib/esm/puppeteer/bidi/bidi.js");
  const bidiBrowser = await BiDi.BidiBrowser.create({
    connection: bidiConnection,
    cdpConnection,
    closeCallback,
    process: void 0,
    defaultViewport,
    acceptInsecureCerts,
    networkEnabled,
    capabilities: options2.capabilities
  });
  return bidiBrowser;
}
async function getBiDiConnection(connectionTransport, url, options2) {
  const BiDi = await import("../../../node_modules/puppeteer-core/lib/esm/puppeteer/bidi/bidi.js");
  const { slowMo = 0, protocolTimeout, idGenerator = createIncrementalIdGenerator() } = options2;
  const pureBidiConnection = new BiDi.BidiConnection(url, connectionTransport, idGenerator, slowMo, protocolTimeout);
  try {
    const result = await pureBidiConnection.send("session.status", {});
    if ("type" in result && result.type === "success") {
      return {
        bidiConnection: pureBidiConnection,
        closeCallback: async () => {
          await pureBidiConnection.send("browser.close", {}).catch(debugError);
        }
      };
    }
  } catch (e) {
    if (!(e instanceof ProtocolError)) {
      throw e;
    }
  }
  pureBidiConnection.unbind();
  const cdpConnection = new Connection(
    url,
    connectionTransport,
    slowMo,
    protocolTimeout,
    true,
    idGenerator
  );
  const version3 = await cdpConnection.send("Browser.getVersion");
  if (version3.product.toLowerCase().includes("firefox")) {
    throw new UnsupportedOperation("Firefox is not supported in BiDi over CDP mode.");
  }
  const bidiOverCdpConnection = await BiDi.connectBidiOverCdp(cdpConnection);
  return {
    cdpConnection,
    bidiConnection: bidiOverCdpConnection,
    closeCallback: async () => {
      await cdpConnection.send("Browser.close").catch(debugError);
    }
  };
}
async function _connectToBrowser(options2) {
  const { connectionTransport, endpointUrl } = await getConnectionTransport(options2);
  if (options2.protocol === "webDriverBiDi") {
    const bidiBrowser = await _connectToBiDiBrowser(connectionTransport, endpointUrl, options2);
    return bidiBrowser;
  } else {
    const cdpBrowser = await _connectToCdpBrowser(connectionTransport, endpointUrl, options2);
    return cdpBrowser;
  }
}
async function getConnectionTransport(options2) {
  const { browserWSEndpoint, browserURL, channel, transport: transport2, headers = {} } = options2;
  assert(Number(!!browserWSEndpoint) + Number(!!browserURL) + Number(!!transport2) + Number(!!channel) === 1, "Exactly one of browserWSEndpoint, browserURL, transport or channel must be passed to puppeteer.connect");
  if (transport2) {
    return { connectionTransport: transport2, endpointUrl: "" };
  } else if (browserWSEndpoint) {
    const WebSocketClass = await getWebSocketTransportClass();
    const connectionTransport = await WebSocketClass.create(browserWSEndpoint, headers);
    return {
      connectionTransport,
      endpointUrl: browserWSEndpoint
    };
  } else if (browserURL) {
    const connectionURL = await getWSEndpoint(browserURL);
    const WebSocketClass = await getWebSocketTransportClass();
    const connectionTransport = await WebSocketClass.create(connectionURL);
    return {
      connectionTransport,
      endpointUrl: connectionURL
    };
  } else if (options2.channel && isNode) {
    const { detectBrowserPlatform: detectBrowserPlatform2, resolveDefaultUserDataDir: resolveDefaultUserDataDir2, Browser: Browser3 } = await Promise.resolve().then(function() {
      return main;
    });
    const platform = detectBrowserPlatform2();
    if (!platform) {
      throw new Error("Could not detect required browser platform");
    }
    const { convertPuppeteerChannelToBrowsersChannel: convertPuppeteerChannelToBrowsersChannel2 } = await Promise.resolve().then(function() {
      return LaunchOptions;
    });
    const { join: join3 } = await import("node:path");
    const userDataDir = resolveDefaultUserDataDir2(Browser3.CHROME, platform, convertPuppeteerChannelToBrowsersChannel2(options2.channel));
    const portPath = join3(userDataDir, "DevToolsActivePort");
    try {
      const fileContent = await environment.value.fs.promises.readFile(portPath, "ascii");
      const [rawPort, rawPath] = fileContent.split("\n").map((line) => {
        return line.trim();
      }).filter((line) => {
        return !!line;
      });
      if (!rawPort || !rawPath) {
        throw new Error(`Invalid DevToolsActivePort '${fileContent}' found`);
      }
      const port = parseInt(rawPort, 10);
      if (isNaN(port) || port <= 0 || port > 65535) {
        throw new Error(`Invalid port '${rawPort}' found`);
      }
      const browserWSEndpoint2 = `ws://localhost:${port}${rawPath}`;
      const WebSocketClass = await getWebSocketTransportClass();
      const connectionTransport = await WebSocketClass.create(browserWSEndpoint2, headers);
      return {
        connectionTransport,
        endpointUrl: browserWSEndpoint2
      };
    } catch (error) {
      throw new Error(`Could not find DevToolsActivePort for ${options2.channel} at ${portPath}`, {
        cause: error
      });
    }
  }
  throw new Error("Invalid connection options");
}
async function getWSEndpoint(browserURL) {
  const endpointURL = new URL("/json/version", browserURL);
  try {
    const result = await globalThis.fetch(endpointURL.toString(), {
      method: "GET"
    });
    if (!result.ok) {
      throw new Error(`HTTP ${result.statusText}`);
    }
    const data32 = await result.json();
    return data32.webSocketDebuggerUrl;
  } catch (error) {
    if (isErrorLike$1(error)) {
      error.message = `Failed to fetch browser webSocket URL from ${endpointURL}: ` + error.message;
    }
    throw error;
  }
}
function requireConstants$4() {
  if (hasRequiredConstants$4) return constants$4;
  hasRequiredConstants$4 = 1;
  const SEMVER_SPEC_VERSION = "2.0.0";
  const MAX_LENGTH = 256;
  const MAX_SAFE_INTEGER3 = Number.MAX_SAFE_INTEGER || 9007199254740991;
  const MAX_SAFE_COMPONENT_LENGTH = 16;
  const MAX_SAFE_BUILD_LENGTH = MAX_LENGTH - 6;
  const RELEASE_TYPES = [
    "major",
    "premajor",
    "minor",
    "preminor",
    "patch",
    "prepatch",
    "prerelease"
  ];
  constants$4 = {
    MAX_LENGTH,
    MAX_SAFE_COMPONENT_LENGTH,
    MAX_SAFE_BUILD_LENGTH,
    MAX_SAFE_INTEGER: MAX_SAFE_INTEGER3,
    RELEASE_TYPES,
    SEMVER_SPEC_VERSION,
    FLAG_INCLUDE_PRERELEASE: 1,
    FLAG_LOOSE: 2
  };
  return constants$4;
}
function requireDebug$1() {
  if (hasRequiredDebug$1) return debug_1;
  hasRequiredDebug$1 = 1;
  const debug2 = typeof process === "object" && process.env && process.env.NODE_DEBUG && /\bsemver\b/i.test(process.env.NODE_DEBUG) ? (...args2) => console.error("SEMVER", ...args2) : () => {
  };
  debug_1 = debug2;
  return debug_1;
}
function requireRe() {
  if (hasRequiredRe) return re$1.exports;
  hasRequiredRe = 1;
  (function(module2, exports$1) {
    const {
      MAX_SAFE_COMPONENT_LENGTH,
      MAX_SAFE_BUILD_LENGTH,
      MAX_LENGTH
    } = requireConstants$4();
    const debug2 = requireDebug$1();
    exports$1 = module2.exports = {};
    const re2 = exports$1.re = [];
    const safeRe = exports$1.safeRe = [];
    const src2 = exports$1.src = [];
    const safeSrc = exports$1.safeSrc = [];
    const t = exports$1.t = {};
    let R = 0;
    const LETTERDASHNUMBER = "[a-zA-Z0-9-]";
    const safeRegexReplacements = [
      ["\\s", 1],
      ["\\d", MAX_LENGTH],
      [LETTERDASHNUMBER, MAX_SAFE_BUILD_LENGTH]
    ];
    const makeSafeRegex = (value) => {
      for (const [token, max] of safeRegexReplacements) {
        value = value.split(`${token}*`).join(`${token}{0,${max}}`).split(`${token}+`).join(`${token}{1,${max}}`);
      }
      return value;
    };
    const createToken = (name, value, isGlobal) => {
      const safe = makeSafeRegex(value);
      const index2 = R++;
      debug2(name, index2, value);
      t[name] = index2;
      src2[index2] = value;
      safeSrc[index2] = safe;
      re2[index2] = new RegExp(value, isGlobal ? "g" : void 0);
      safeRe[index2] = new RegExp(safe, isGlobal ? "g" : void 0);
    };
    createToken("NUMERICIDENTIFIER", "0|[1-9]\\d*");
    createToken("NUMERICIDENTIFIERLOOSE", "\\d+");
    createToken("NONNUMERICIDENTIFIER", `\\d*[a-zA-Z-]${LETTERDASHNUMBER}*`);
    createToken("MAINVERSION", `(${src2[t.NUMERICIDENTIFIER]})\\.(${src2[t.NUMERICIDENTIFIER]})\\.(${src2[t.NUMERICIDENTIFIER]})`);
    createToken("MAINVERSIONLOOSE", `(${src2[t.NUMERICIDENTIFIERLOOSE]})\\.(${src2[t.NUMERICIDENTIFIERLOOSE]})\\.(${src2[t.NUMERICIDENTIFIERLOOSE]})`);
    createToken("PRERELEASEIDENTIFIER", `(?:${src2[t.NONNUMERICIDENTIFIER]}|${src2[t.NUMERICIDENTIFIER]})`);
    createToken("PRERELEASEIDENTIFIERLOOSE", `(?:${src2[t.NONNUMERICIDENTIFIER]}|${src2[t.NUMERICIDENTIFIERLOOSE]})`);
    createToken("PRERELEASE", `(?:-(${src2[t.PRERELEASEIDENTIFIER]}(?:\\.${src2[t.PRERELEASEIDENTIFIER]})*))`);
    createToken("PRERELEASELOOSE", `(?:-?(${src2[t.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${src2[t.PRERELEASEIDENTIFIERLOOSE]})*))`);
    createToken("BUILDIDENTIFIER", `${LETTERDASHNUMBER}+`);
    createToken("BUILD", `(?:\\+(${src2[t.BUILDIDENTIFIER]}(?:\\.${src2[t.BUILDIDENTIFIER]})*))`);
    createToken("FULLPLAIN", `v?${src2[t.MAINVERSION]}${src2[t.PRERELEASE]}?${src2[t.BUILD]}?`);
    createToken("FULL", `^${src2[t.FULLPLAIN]}$`);
    createToken("LOOSEPLAIN", `[v=\\s]*${src2[t.MAINVERSIONLOOSE]}${src2[t.PRERELEASELOOSE]}?${src2[t.BUILD]}?`);
    createToken("LOOSE", `^${src2[t.LOOSEPLAIN]}$`);
    createToken("GTLT", "((?:<|>)?=?)");
    createToken("XRANGEIDENTIFIERLOOSE", `${src2[t.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`);
    createToken("XRANGEIDENTIFIER", `${src2[t.NUMERICIDENTIFIER]}|x|X|\\*`);
    createToken("XRANGEPLAIN", `[v=\\s]*(${src2[t.XRANGEIDENTIFIER]})(?:\\.(${src2[t.XRANGEIDENTIFIER]})(?:\\.(${src2[t.XRANGEIDENTIFIER]})(?:${src2[t.PRERELEASE]})?${src2[t.BUILD]}?)?)?`);
    createToken("XRANGEPLAINLOOSE", `[v=\\s]*(${src2[t.XRANGEIDENTIFIERLOOSE]})(?:\\.(${src2[t.XRANGEIDENTIFIERLOOSE]})(?:\\.(${src2[t.XRANGEIDENTIFIERLOOSE]})(?:${src2[t.PRERELEASELOOSE]})?${src2[t.BUILD]}?)?)?`);
    createToken("XRANGE", `^${src2[t.GTLT]}\\s*${src2[t.XRANGEPLAIN]}$`);
    createToken("XRANGELOOSE", `^${src2[t.GTLT]}\\s*${src2[t.XRANGEPLAINLOOSE]}$`);
    createToken("COERCEPLAIN", `${"(^|[^\\d])(\\d{1,"}${MAX_SAFE_COMPONENT_LENGTH}})(?:\\.(\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?(?:\\.(\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?`);
    createToken("COERCE", `${src2[t.COERCEPLAIN]}(?:$|[^\\d])`);
    createToken("COERCEFULL", src2[t.COERCEPLAIN] + `(?:${src2[t.PRERELEASE]})?(?:${src2[t.BUILD]})?(?:$|[^\\d])`);
    createToken("COERCERTL", src2[t.COERCE], true);
    createToken("COERCERTLFULL", src2[t.COERCEFULL], true);
    createToken("LONETILDE", "(?:~>?)");
    createToken("TILDETRIM", `(\\s*)${src2[t.LONETILDE]}\\s+`, true);
    exports$1.tildeTrimReplace = "$1~";
    createToken("TILDE", `^${src2[t.LONETILDE]}${src2[t.XRANGEPLAIN]}$`);
    createToken("TILDELOOSE", `^${src2[t.LONETILDE]}${src2[t.XRANGEPLAINLOOSE]}$`);
    createToken("LONECARET", "(?:\\^)");
    createToken("CARETTRIM", `(\\s*)${src2[t.LONECARET]}\\s+`, true);
    exports$1.caretTrimReplace = "$1^";
    createToken("CARET", `^${src2[t.LONECARET]}${src2[t.XRANGEPLAIN]}$`);
    createToken("CARETLOOSE", `^${src2[t.LONECARET]}${src2[t.XRANGEPLAINLOOSE]}$`);
    createToken("COMPARATORLOOSE", `^${src2[t.GTLT]}\\s*(${src2[t.LOOSEPLAIN]})$|^$`);
    createToken("COMPARATOR", `^${src2[t.GTLT]}\\s*(${src2[t.FULLPLAIN]})$|^$`);
    createToken("COMPARATORTRIM", `(\\s*)${src2[t.GTLT]}\\s*(${src2[t.LOOSEPLAIN]}|${src2[t.XRANGEPLAIN]})`, true);
    exports$1.comparatorTrimReplace = "$1$2$3";
    createToken("HYPHENRANGE", `^\\s*(${src2[t.XRANGEPLAIN]})\\s+-\\s+(${src2[t.XRANGEPLAIN]})\\s*$`);
    createToken("HYPHENRANGELOOSE", `^\\s*(${src2[t.XRANGEPLAINLOOSE]})\\s+-\\s+(${src2[t.XRANGEPLAINLOOSE]})\\s*$`);
    createToken("STAR", "(<|>)?=?\\s*\\*");
    createToken("GTE0", "^\\s*>=\\s*0\\.0\\.0\\s*$");
    createToken("GTE0PRE", "^\\s*>=\\s*0\\.0\\.0-0\\s*$");
  })(re$1, re$1.exports);
  return re$1.exports;
}
function requireParseOptions() {
  if (hasRequiredParseOptions) return parseOptions_1;
  hasRequiredParseOptions = 1;
  const looseOption = Object.freeze({ loose: true });
  const emptyOpts = Object.freeze({});
  const parseOptions = (options2) => {
    if (!options2) {
      return emptyOpts;
    }
    if (typeof options2 !== "object") {
      return looseOption;
    }
    return options2;
  };
  parseOptions_1 = parseOptions;
  return parseOptions_1;
}
function requireIdentifiers() {
  if (hasRequiredIdentifiers) return identifiers;
  hasRequiredIdentifiers = 1;
  const numeric = /^[0-9]+$/;
  const compareIdentifiers = (a, b) => {
    if (typeof a === "number" && typeof b === "number") {
      return a === b ? 0 : a < b ? -1 : 1;
    }
    const anum = numeric.test(a);
    const bnum = numeric.test(b);
    if (anum && bnum) {
      a = +a;
      b = +b;
    }
    return a === b ? 0 : anum && !bnum ? -1 : bnum && !anum ? 1 : a < b ? -1 : 1;
  };
  const rcompareIdentifiers = (a, b) => compareIdentifiers(b, a);
  identifiers = {
    compareIdentifiers,
    rcompareIdentifiers
  };
  return identifiers;
}
function requireSemver$1() {
  if (hasRequiredSemver$1) return semver$2;
  hasRequiredSemver$1 = 1;
  const debug2 = requireDebug$1();
  const { MAX_LENGTH, MAX_SAFE_INTEGER: MAX_SAFE_INTEGER3 } = requireConstants$4();
  const { safeRe: re2, t } = requireRe();
  const parseOptions = requireParseOptions();
  const { compareIdentifiers } = requireIdentifiers();
  class SemVer {
    constructor(version3, options2) {
      options2 = parseOptions(options2);
      if (version3 instanceof SemVer) {
        if (version3.loose === !!options2.loose && version3.includePrerelease === !!options2.includePrerelease) {
          return version3;
        } else {
          version3 = version3.version;
        }
      } else if (typeof version3 !== "string") {
        throw new TypeError(`Invalid version. Must be a string. Got type "${typeof version3}".`);
      }
      if (version3.length > MAX_LENGTH) {
        throw new TypeError(
          `version is longer than ${MAX_LENGTH} characters`
        );
      }
      debug2("SemVer", version3, options2);
      this.options = options2;
      this.loose = !!options2.loose;
      this.includePrerelease = !!options2.includePrerelease;
      const m = version3.trim().match(options2.loose ? re2[t.LOOSE] : re2[t.FULL]);
      if (!m) {
        throw new TypeError(`Invalid Version: ${version3}`);
      }
      this.raw = version3;
      this.major = +m[1];
      this.minor = +m[2];
      this.patch = +m[3];
      if (this.major > MAX_SAFE_INTEGER3 || this.major < 0) {
        throw new TypeError("Invalid major version");
      }
      if (this.minor > MAX_SAFE_INTEGER3 || this.minor < 0) {
        throw new TypeError("Invalid minor version");
      }
      if (this.patch > MAX_SAFE_INTEGER3 || this.patch < 0) {
        throw new TypeError("Invalid patch version");
      }
      if (!m[4]) {
        this.prerelease = [];
      } else {
        this.prerelease = m[4].split(".").map((id2) => {
          if (/^[0-9]+$/.test(id2)) {
            const num = +id2;
            if (num >= 0 && num < MAX_SAFE_INTEGER3) {
              return num;
            }
          }
          return id2;
        });
      }
      this.build = m[5] ? m[5].split(".") : [];
      this.format();
    }
    format() {
      this.version = `${this.major}.${this.minor}.${this.patch}`;
      if (this.prerelease.length) {
        this.version += `-${this.prerelease.join(".")}`;
      }
      return this.version;
    }
    toString() {
      return this.version;
    }
    compare(other) {
      debug2("SemVer.compare", this.version, this.options, other);
      if (!(other instanceof SemVer)) {
        if (typeof other === "string" && other === this.version) {
          return 0;
        }
        other = new SemVer(other, this.options);
      }
      if (other.version === this.version) {
        return 0;
      }
      return this.compareMain(other) || this.comparePre(other);
    }
    compareMain(other) {
      if (!(other instanceof SemVer)) {
        other = new SemVer(other, this.options);
      }
      if (this.major < other.major) {
        return -1;
      }
      if (this.major > other.major) {
        return 1;
      }
      if (this.minor < other.minor) {
        return -1;
      }
      if (this.minor > other.minor) {
        return 1;
      }
      if (this.patch < other.patch) {
        return -1;
      }
      if (this.patch > other.patch) {
        return 1;
      }
      return 0;
    }
    comparePre(other) {
      if (!(other instanceof SemVer)) {
        other = new SemVer(other, this.options);
      }
      if (this.prerelease.length && !other.prerelease.length) {
        return -1;
      } else if (!this.prerelease.length && other.prerelease.length) {
        return 1;
      } else if (!this.prerelease.length && !other.prerelease.length) {
        return 0;
      }
      let i = 0;
      do {
        const a = this.prerelease[i];
        const b = other.prerelease[i];
        debug2("prerelease compare", i, a, b);
        if (a === void 0 && b === void 0) {
          return 0;
        } else if (b === void 0) {
          return 1;
        } else if (a === void 0) {
          return -1;
        } else if (a === b) {
          continue;
        } else {
          return compareIdentifiers(a, b);
        }
      } while (++i);
    }
    compareBuild(other) {
      if (!(other instanceof SemVer)) {
        other = new SemVer(other, this.options);
      }
      let i = 0;
      do {
        const a = this.build[i];
        const b = other.build[i];
        debug2("build compare", i, a, b);
        if (a === void 0 && b === void 0) {
          return 0;
        } else if (b === void 0) {
          return 1;
        } else if (a === void 0) {
          return -1;
        } else if (a === b) {
          continue;
        } else {
          return compareIdentifiers(a, b);
        }
      } while (++i);
    }
    inc(release, identifier, identifierBase) {
      if (release.startsWith("pre")) {
        if (!identifier && identifierBase === false) {
          throw new Error("invalid increment argument: identifier is empty");
        }
        if (identifier) {
          const match = `-${identifier}`.match(this.options.loose ? re2[t.PRERELEASELOOSE] : re2[t.PRERELEASE]);
          if (!match || match[1] !== identifier) {
            throw new Error(`invalid identifier: ${identifier}`);
          }
        }
      }
      switch (release) {
        case "premajor":
          this.prerelease.length = 0;
          this.patch = 0;
          this.minor = 0;
          this.major++;
          this.inc("pre", identifier, identifierBase);
          break;
        case "preminor":
          this.prerelease.length = 0;
          this.patch = 0;
          this.minor++;
          this.inc("pre", identifier, identifierBase);
          break;
        case "prepatch":
          this.prerelease.length = 0;
          this.inc("patch", identifier, identifierBase);
          this.inc("pre", identifier, identifierBase);
          break;
        case "prerelease":
          if (this.prerelease.length === 0) {
            this.inc("patch", identifier, identifierBase);
          }
          this.inc("pre", identifier, identifierBase);
          break;
        case "release":
          if (this.prerelease.length === 0) {
            throw new Error(`version ${this.raw} is not a prerelease`);
          }
          this.prerelease.length = 0;
          break;
        case "major":
          if (this.minor !== 0 || this.patch !== 0 || this.prerelease.length === 0) {
            this.major++;
          }
          this.minor = 0;
          this.patch = 0;
          this.prerelease = [];
          break;
        case "minor":
          if (this.patch !== 0 || this.prerelease.length === 0) {
            this.minor++;
          }
          this.patch = 0;
          this.prerelease = [];
          break;
        case "patch":
          if (this.prerelease.length === 0) {
            this.patch++;
          }
          this.prerelease = [];
          break;
        case "pre": {
          const base = Number(identifierBase) ? 1 : 0;
          if (this.prerelease.length === 0) {
            this.prerelease = [base];
          } else {
            let i = this.prerelease.length;
            while (--i >= 0) {
              if (typeof this.prerelease[i] === "number") {
                this.prerelease[i]++;
                i = -2;
              }
            }
            if (i === -1) {
              if (identifier === this.prerelease.join(".") && identifierBase === false) {
                throw new Error("invalid increment argument: identifier already exists");
              }
              this.prerelease.push(base);
            }
          }
          if (identifier) {
            let prerelease = [identifier, base];
            if (identifierBase === false) {
              prerelease = [identifier];
            }
            if (compareIdentifiers(this.prerelease[0], identifier) === 0) {
              if (isNaN(this.prerelease[1])) {
                this.prerelease = prerelease;
              }
            } else {
              this.prerelease = prerelease;
            }
          }
          break;
        }
        default:
          throw new Error(`invalid increment argument: ${release}`);
      }
      this.raw = this.format();
      if (this.build.length) {
        this.raw += `+${this.build.join(".")}`;
      }
      return this;
    }
  }
  semver$2 = SemVer;
  return semver$2;
}
function requireParse() {
  if (hasRequiredParse) return parse_1;
  hasRequiredParse = 1;
  const SemVer = requireSemver$1();
  const parse2 = (version3, options2, throwErrors = false) => {
    if (version3 instanceof SemVer) {
      return version3;
    }
    try {
      return new SemVer(version3, options2);
    } catch (er) {
      if (!throwErrors) {
        return null;
      }
      throw er;
    }
  };
  parse_1 = parse2;
  return parse_1;
}
function requireValid$1() {
  if (hasRequiredValid$1) return valid_1;
  hasRequiredValid$1 = 1;
  const parse2 = requireParse();
  const valid2 = (version3, options2) => {
    const v = parse2(version3, options2);
    return v ? v.version : null;
  };
  valid_1 = valid2;
  return valid_1;
}
function requireClean() {
  if (hasRequiredClean) return clean_1;
  hasRequiredClean = 1;
  const parse2 = requireParse();
  const clean = (version3, options2) => {
    const s = parse2(version3.trim().replace(/^[=v]+/, ""), options2);
    return s ? s.version : null;
  };
  clean_1 = clean;
  return clean_1;
}
function requireInc() {
  if (hasRequiredInc) return inc_1;
  hasRequiredInc = 1;
  const SemVer = requireSemver$1();
  const inc = (version3, release, options2, identifier, identifierBase) => {
    if (typeof options2 === "string") {
      identifierBase = identifier;
      identifier = options2;
      options2 = void 0;
    }
    try {
      return new SemVer(
        version3 instanceof SemVer ? version3.version : version3,
        options2
      ).inc(release, identifier, identifierBase).version;
    } catch (er) {
      return null;
    }
  };
  inc_1 = inc;
  return inc_1;
}
function requireDiff() {
  if (hasRequiredDiff) return diff_1;
  hasRequiredDiff = 1;
  const parse2 = requireParse();
  const diff = (version1, version22) => {
    const v1 = parse2(version1, null, true);
    const v2 = parse2(version22, null, true);
    const comparison = v1.compare(v2);
    if (comparison === 0) {
      return null;
    }
    const v1Higher = comparison > 0;
    const highVersion = v1Higher ? v1 : v2;
    const lowVersion = v1Higher ? v2 : v1;
    const highHasPre = !!highVersion.prerelease.length;
    const lowHasPre = !!lowVersion.prerelease.length;
    if (lowHasPre && !highHasPre) {
      if (!lowVersion.patch && !lowVersion.minor) {
        return "major";
      }
      if (lowVersion.compareMain(highVersion) === 0) {
        if (lowVersion.minor && !lowVersion.patch) {
          return "minor";
        }
        return "patch";
      }
    }
    const prefix = highHasPre ? "pre" : "";
    if (v1.major !== v2.major) {
      return prefix + "major";
    }
    if (v1.minor !== v2.minor) {
      return prefix + "minor";
    }
    if (v1.patch !== v2.patch) {
      return prefix + "patch";
    }
    return "prerelease";
  };
  diff_1 = diff;
  return diff_1;
}
function requireMajor() {
  if (hasRequiredMajor) return major_1;
  hasRequiredMajor = 1;
  const SemVer = requireSemver$1();
  const major2 = (a, loose) => new SemVer(a, loose).major;
  major_1 = major2;
  return major_1;
}
function requireMinor() {
  if (hasRequiredMinor) return minor_1;
  hasRequiredMinor = 1;
  const SemVer = requireSemver$1();
  const minor2 = (a, loose) => new SemVer(a, loose).minor;
  minor_1 = minor2;
  return minor_1;
}
function requirePatch() {
  if (hasRequiredPatch) return patch_1;
  hasRequiredPatch = 1;
  const SemVer = requireSemver$1();
  const patch = (a, loose) => new SemVer(a, loose).patch;
  patch_1 = patch;
  return patch_1;
}
function requirePrerelease() {
  if (hasRequiredPrerelease) return prerelease_1;
  hasRequiredPrerelease = 1;
  const parse2 = requireParse();
  const prerelease = (version3, options2) => {
    const parsed = parse2(version3, options2);
    return parsed && parsed.prerelease.length ? parsed.prerelease : null;
  };
  prerelease_1 = prerelease;
  return prerelease_1;
}
function requireCompare() {
  if (hasRequiredCompare) return compare_1;
  hasRequiredCompare = 1;
  const SemVer = requireSemver$1();
  const compare2 = (a, b, loose) => new SemVer(a, loose).compare(new SemVer(b, loose));
  compare_1 = compare2;
  return compare_1;
}
function requireRcompare() {
  if (hasRequiredRcompare) return rcompare_1;
  hasRequiredRcompare = 1;
  const compare2 = requireCompare();
  const rcompare = (a, b, loose) => compare2(b, a, loose);
  rcompare_1 = rcompare;
  return rcompare_1;
}
function requireCompareLoose() {
  if (hasRequiredCompareLoose) return compareLoose_1;
  hasRequiredCompareLoose = 1;
  const compare2 = requireCompare();
  const compareLoose = (a, b) => compare2(a, b, true);
  compareLoose_1 = compareLoose;
  return compareLoose_1;
}
function requireCompareBuild() {
  if (hasRequiredCompareBuild) return compareBuild_1;
  hasRequiredCompareBuild = 1;
  const SemVer = requireSemver$1();
  const compareBuild = (a, b, loose) => {
    const versionA = new SemVer(a, loose);
    const versionB = new SemVer(b, loose);
    return versionA.compare(versionB) || versionA.compareBuild(versionB);
  };
  compareBuild_1 = compareBuild;
  return compareBuild_1;
}
function requireSort() {
  if (hasRequiredSort) return sort_1;
  hasRequiredSort = 1;
  const compareBuild = requireCompareBuild();
  const sort = (list2, loose) => list2.sort((a, b) => compareBuild(a, b, loose));
  sort_1 = sort;
  return sort_1;
}
function requireRsort() {
  if (hasRequiredRsort) return rsort_1;
  hasRequiredRsort = 1;
  const compareBuild = requireCompareBuild();
  const rsort = (list2, loose) => list2.sort((a, b) => compareBuild(b, a, loose));
  rsort_1 = rsort;
  return rsort_1;
}
function requireGt() {
  if (hasRequiredGt) return gt_1;
  hasRequiredGt = 1;
  const compare2 = requireCompare();
  const gt = (a, b, loose) => compare2(a, b, loose) > 0;
  gt_1 = gt;
  return gt_1;
}
function requireLt() {
  if (hasRequiredLt) return lt_1;
  hasRequiredLt = 1;
  const compare2 = requireCompare();
  const lt = (a, b, loose) => compare2(a, b, loose) < 0;
  lt_1 = lt;
  return lt_1;
}
function requireEq() {
  if (hasRequiredEq) return eq_1;
  hasRequiredEq = 1;
  const compare2 = requireCompare();
  const eq2 = (a, b, loose) => compare2(a, b, loose) === 0;
  eq_1 = eq2;
  return eq_1;
}
function requireNeq() {
  if (hasRequiredNeq) return neq_1;
  hasRequiredNeq = 1;
  const compare2 = requireCompare();
  const neq = (a, b, loose) => compare2(a, b, loose) !== 0;
  neq_1 = neq;
  return neq_1;
}
function requireGte() {
  if (hasRequiredGte) return gte_1;
  hasRequiredGte = 1;
  const compare2 = requireCompare();
  const gte = (a, b, loose) => compare2(a, b, loose) >= 0;
  gte_1 = gte;
  return gte_1;
}
function requireLte() {
  if (hasRequiredLte) return lte_1;
  hasRequiredLte = 1;
  const compare2 = requireCompare();
  const lte = (a, b, loose) => compare2(a, b, loose) <= 0;
  lte_1 = lte;
  return lte_1;
}
function requireCmp() {
  if (hasRequiredCmp) return cmp_1;
  hasRequiredCmp = 1;
  const eq2 = requireEq();
  const neq = requireNeq();
  const gt = requireGt();
  const gte = requireGte();
  const lt = requireLt();
  const lte = requireLte();
  const cmp = (a, op, b, loose) => {
    switch (op) {
      case "===":
        if (typeof a === "object") {
          a = a.version;
        }
        if (typeof b === "object") {
          b = b.version;
        }
        return a === b;
      case "!==":
        if (typeof a === "object") {
          a = a.version;
        }
        if (typeof b === "object") {
          b = b.version;
        }
        return a !== b;
      case "":
      case "=":
      case "==":
        return eq2(a, b, loose);
      case "!=":
        return neq(a, b, loose);
      case ">":
        return gt(a, b, loose);
      case ">=":
        return gte(a, b, loose);
      case "<":
        return lt(a, b, loose);
      case "<=":
        return lte(a, b, loose);
      default:
        throw new TypeError(`Invalid operator: ${op}`);
    }
  };
  cmp_1 = cmp;
  return cmp_1;
}
function requireCoerce() {
  if (hasRequiredCoerce) return coerce_1;
  hasRequiredCoerce = 1;
  const SemVer = requireSemver$1();
  const parse2 = requireParse();
  const { safeRe: re2, t } = requireRe();
  const coerce2 = (version3, options2) => {
    if (version3 instanceof SemVer) {
      return version3;
    }
    if (typeof version3 === "number") {
      version3 = String(version3);
    }
    if (typeof version3 !== "string") {
      return null;
    }
    options2 = options2 || {};
    let match = null;
    if (!options2.rtl) {
      match = version3.match(options2.includePrerelease ? re2[t.COERCEFULL] : re2[t.COERCE]);
    } else {
      const coerceRtlRegex = options2.includePrerelease ? re2[t.COERCERTLFULL] : re2[t.COERCERTL];
      let next;
      while ((next = coerceRtlRegex.exec(version3)) && (!match || match.index + match[0].length !== version3.length)) {
        if (!match || next.index + next[0].length !== match.index + match[0].length) {
          match = next;
        }
        coerceRtlRegex.lastIndex = next.index + next[1].length + next[2].length;
      }
      coerceRtlRegex.lastIndex = -1;
    }
    if (match === null) {
      return null;
    }
    const major2 = match[2];
    const minor2 = match[3] || "0";
    const patch = match[4] || "0";
    const prerelease = options2.includePrerelease && match[5] ? `-${match[5]}` : "";
    const build2 = options2.includePrerelease && match[6] ? `+${match[6]}` : "";
    return parse2(`${major2}.${minor2}.${patch}${prerelease}${build2}`, options2);
  };
  coerce_1 = coerce2;
  return coerce_1;
}
function requireLrucache() {
  if (hasRequiredLrucache) return lrucache;
  hasRequiredLrucache = 1;
  class LRUCache {
    constructor() {
      this.max = 1e3;
      this.map = /* @__PURE__ */ new Map();
    }
    get(key) {
      const value = this.map.get(key);
      if (value === void 0) {
        return void 0;
      } else {
        this.map.delete(key);
        this.map.set(key, value);
        return value;
      }
    }
    delete(key) {
      return this.map.delete(key);
    }
    set(key, value) {
      const deleted = this.delete(key);
      if (!deleted && value !== void 0) {
        if (this.map.size >= this.max) {
          const firstKey = this.map.keys().next().value;
          this.delete(firstKey);
        }
        this.map.set(key, value);
      }
      return this;
    }
  }
  lrucache = LRUCache;
  return lrucache;
}
function requireRange() {
  if (hasRequiredRange) return range;
  hasRequiredRange = 1;
  const SPACE_CHARACTERS = /\s+/g;
  class Range {
    constructor(range2, options2) {
      options2 = parseOptions(options2);
      if (range2 instanceof Range) {
        if (range2.loose === !!options2.loose && range2.includePrerelease === !!options2.includePrerelease) {
          return range2;
        } else {
          return new Range(range2.raw, options2);
        }
      }
      if (range2 instanceof Comparator) {
        this.raw = range2.value;
        this.set = [[range2]];
        this.formatted = void 0;
        return this;
      }
      this.options = options2;
      this.loose = !!options2.loose;
      this.includePrerelease = !!options2.includePrerelease;
      this.raw = range2.trim().replace(SPACE_CHARACTERS, " ");
      this.set = this.raw.split("||").map((r) => this.parseRange(r.trim())).filter((c) => c.length);
      if (!this.set.length) {
        throw new TypeError(`Invalid SemVer Range: ${this.raw}`);
      }
      if (this.set.length > 1) {
        const first2 = this.set[0];
        this.set = this.set.filter((c) => !isNullSet(c[0]));
        if (this.set.length === 0) {
          this.set = [first2];
        } else if (this.set.length > 1) {
          for (const c of this.set) {
            if (c.length === 1 && isAny(c[0])) {
              this.set = [c];
              break;
            }
          }
        }
      }
      this.formatted = void 0;
    }
    get range() {
      if (this.formatted === void 0) {
        this.formatted = "";
        for (let i = 0; i < this.set.length; i++) {
          if (i > 0) {
            this.formatted += "||";
          }
          const comps = this.set[i];
          for (let k = 0; k < comps.length; k++) {
            if (k > 0) {
              this.formatted += " ";
            }
            this.formatted += comps[k].toString().trim();
          }
        }
      }
      return this.formatted;
    }
    format() {
      return this.range;
    }
    toString() {
      return this.range;
    }
    parseRange(range2) {
      const memoOpts = (this.options.includePrerelease && FLAG_INCLUDE_PRERELEASE) | (this.options.loose && FLAG_LOOSE);
      const memoKey = memoOpts + ":" + range2;
      const cached2 = cache.get(memoKey);
      if (cached2) {
        return cached2;
      }
      const loose = this.options.loose;
      const hr2 = loose ? re2[t.HYPHENRANGELOOSE] : re2[t.HYPHENRANGE];
      range2 = range2.replace(hr2, hyphenReplace(this.options.includePrerelease));
      debug2("hyphen replace", range2);
      range2 = range2.replace(re2[t.COMPARATORTRIM], comparatorTrimReplace);
      debug2("comparator trim", range2);
      range2 = range2.replace(re2[t.TILDETRIM], tildeTrimReplace);
      debug2("tilde trim", range2);
      range2 = range2.replace(re2[t.CARETTRIM], caretTrimReplace);
      debug2("caret trim", range2);
      let rangeList = range2.split(" ").map((comp) => parseComparator(comp, this.options)).join(" ").split(/\s+/).map((comp) => replaceGTE0(comp, this.options));
      if (loose) {
        rangeList = rangeList.filter((comp) => {
          debug2("loose invalid filter", comp, this.options);
          return !!comp.match(re2[t.COMPARATORLOOSE]);
        });
      }
      debug2("range list", rangeList);
      const rangeMap = /* @__PURE__ */ new Map();
      const comparators = rangeList.map((comp) => new Comparator(comp, this.options));
      for (const comp of comparators) {
        if (isNullSet(comp)) {
          return [comp];
        }
        rangeMap.set(comp.value, comp);
      }
      if (rangeMap.size > 1 && rangeMap.has("")) {
        rangeMap.delete("");
      }
      const result = [...rangeMap.values()];
      cache.set(memoKey, result);
      return result;
    }
    intersects(range2, options2) {
      if (!(range2 instanceof Range)) {
        throw new TypeError("a Range is required");
      }
      return this.set.some((thisComparators) => {
        return isSatisfiable(thisComparators, options2) && range2.set.some((rangeComparators) => {
          return isSatisfiable(rangeComparators, options2) && thisComparators.every((thisComparator) => {
            return rangeComparators.every((rangeComparator) => {
              return thisComparator.intersects(rangeComparator, options2);
            });
          });
        });
      });
    }
    test(version3) {
      if (!version3) {
        return false;
      }
      if (typeof version3 === "string") {
        try {
          version3 = new SemVer(version3, this.options);
        } catch (er) {
          return false;
        }
      }
      for (let i = 0; i < this.set.length; i++) {
        if (testSet(this.set[i], version3, this.options)) {
          return true;
        }
      }
      return false;
    }
  }
  range = Range;
  const LRU = requireLrucache();
  const cache = new LRU();
  const parseOptions = requireParseOptions();
  const Comparator = requireComparator();
  const debug2 = requireDebug$1();
  const SemVer = requireSemver$1();
  const {
    safeRe: re2,
    t,
    comparatorTrimReplace,
    tildeTrimReplace,
    caretTrimReplace
  } = requireRe();
  const { FLAG_INCLUDE_PRERELEASE, FLAG_LOOSE } = requireConstants$4();
  const isNullSet = (c) => c.value === "<0.0.0-0";
  const isAny = (c) => c.value === "";
  const isSatisfiable = (comparators, options2) => {
    let result = true;
    const remainingComparators = comparators.slice();
    let testComparator = remainingComparators.pop();
    while (result && remainingComparators.length) {
      result = remainingComparators.every((otherComparator) => {
        return testComparator.intersects(otherComparator, options2);
      });
      testComparator = remainingComparators.pop();
    }
    return result;
  };
  const parseComparator = (comp, options2) => {
    comp = comp.replace(re2[t.BUILD], "");
    debug2("comp", comp, options2);
    comp = replaceCarets(comp, options2);
    debug2("caret", comp);
    comp = replaceTildes(comp, options2);
    debug2("tildes", comp);
    comp = replaceXRanges(comp, options2);
    debug2("xrange", comp);
    comp = replaceStars(comp, options2);
    debug2("stars", comp);
    return comp;
  };
  const isX = (id2) => !id2 || id2.toLowerCase() === "x" || id2 === "*";
  const replaceTildes = (comp, options2) => {
    return comp.trim().split(/\s+/).map((c) => replaceTilde(c, options2)).join(" ");
  };
  const replaceTilde = (comp, options2) => {
    const r = options2.loose ? re2[t.TILDELOOSE] : re2[t.TILDE];
    return comp.replace(r, (_, M, m, p, pr) => {
      debug2("tilde", comp, _, M, m, p, pr);
      let ret;
      if (isX(M)) {
        ret = "";
      } else if (isX(m)) {
        ret = `>=${M}.0.0 <${+M + 1}.0.0-0`;
      } else if (isX(p)) {
        ret = `>=${M}.${m}.0 <${M}.${+m + 1}.0-0`;
      } else if (pr) {
        debug2("replaceTilde pr", pr);
        ret = `>=${M}.${m}.${p}-${pr} <${M}.${+m + 1}.0-0`;
      } else {
        ret = `>=${M}.${m}.${p} <${M}.${+m + 1}.0-0`;
      }
      debug2("tilde return", ret);
      return ret;
    });
  };
  const replaceCarets = (comp, options2) => {
    return comp.trim().split(/\s+/).map((c) => replaceCaret(c, options2)).join(" ");
  };
  const replaceCaret = (comp, options2) => {
    debug2("caret", comp, options2);
    const r = options2.loose ? re2[t.CARETLOOSE] : re2[t.CARET];
    const z2 = options2.includePrerelease ? "-0" : "";
    return comp.replace(r, (_, M, m, p, pr) => {
      debug2("caret", comp, _, M, m, p, pr);
      let ret;
      if (isX(M)) {
        ret = "";
      } else if (isX(m)) {
        ret = `>=${M}.0.0${z2} <${+M + 1}.0.0-0`;
      } else if (isX(p)) {
        if (M === "0") {
          ret = `>=${M}.${m}.0${z2} <${M}.${+m + 1}.0-0`;
        } else {
          ret = `>=${M}.${m}.0${z2} <${+M + 1}.0.0-0`;
        }
      } else if (pr) {
        debug2("replaceCaret pr", pr);
        if (M === "0") {
          if (m === "0") {
            ret = `>=${M}.${m}.${p}-${pr} <${M}.${m}.${+p + 1}-0`;
          } else {
            ret = `>=${M}.${m}.${p}-${pr} <${M}.${+m + 1}.0-0`;
          }
        } else {
          ret = `>=${M}.${m}.${p}-${pr} <${+M + 1}.0.0-0`;
        }
      } else {
        debug2("no pr");
        if (M === "0") {
          if (m === "0") {
            ret = `>=${M}.${m}.${p}${z2} <${M}.${m}.${+p + 1}-0`;
          } else {
            ret = `>=${M}.${m}.${p}${z2} <${M}.${+m + 1}.0-0`;
          }
        } else {
          ret = `>=${M}.${m}.${p} <${+M + 1}.0.0-0`;
        }
      }
      debug2("caret return", ret);
      return ret;
    });
  };
  const replaceXRanges = (comp, options2) => {
    debug2("replaceXRanges", comp, options2);
    return comp.split(/\s+/).map((c) => replaceXRange(c, options2)).join(" ");
  };
  const replaceXRange = (comp, options2) => {
    comp = comp.trim();
    const r = options2.loose ? re2[t.XRANGELOOSE] : re2[t.XRANGE];
    return comp.replace(r, (ret, gtlt, M, m, p, pr) => {
      debug2("xRange", comp, ret, gtlt, M, m, p, pr);
      const xM = isX(M);
      const xm = xM || isX(m);
      const xp = xm || isX(p);
      const anyX = xp;
      if (gtlt === "=" && anyX) {
        gtlt = "";
      }
      pr = options2.includePrerelease ? "-0" : "";
      if (xM) {
        if (gtlt === ">" || gtlt === "<") {
          ret = "<0.0.0-0";
        } else {
          ret = "*";
        }
      } else if (gtlt && anyX) {
        if (xm) {
          m = 0;
        }
        p = 0;
        if (gtlt === ">") {
          gtlt = ">=";
          if (xm) {
            M = +M + 1;
            m = 0;
            p = 0;
          } else {
            m = +m + 1;
            p = 0;
          }
        } else if (gtlt === "<=") {
          gtlt = "<";
          if (xm) {
            M = +M + 1;
          } else {
            m = +m + 1;
          }
        }
        if (gtlt === "<") {
          pr = "-0";
        }
        ret = `${gtlt + M}.${m}.${p}${pr}`;
      } else if (xm) {
        ret = `>=${M}.0.0${pr} <${+M + 1}.0.0-0`;
      } else if (xp) {
        ret = `>=${M}.${m}.0${pr} <${M}.${+m + 1}.0-0`;
      }
      debug2("xRange return", ret);
      return ret;
    });
  };
  const replaceStars = (comp, options2) => {
    debug2("replaceStars", comp, options2);
    return comp.trim().replace(re2[t.STAR], "");
  };
  const replaceGTE0 = (comp, options2) => {
    debug2("replaceGTE0", comp, options2);
    return comp.trim().replace(re2[options2.includePrerelease ? t.GTE0PRE : t.GTE0], "");
  };
  const hyphenReplace = (incPr) => ($0, from2, fM, fm, fp, fpr, fb, to, tM, tm, tp, tpr) => {
    if (isX(fM)) {
      from2 = "";
    } else if (isX(fm)) {
      from2 = `>=${fM}.0.0${incPr ? "-0" : ""}`;
    } else if (isX(fp)) {
      from2 = `>=${fM}.${fm}.0${incPr ? "-0" : ""}`;
    } else if (fpr) {
      from2 = `>=${from2}`;
    } else {
      from2 = `>=${from2}${incPr ? "-0" : ""}`;
    }
    if (isX(tM)) {
      to = "";
    } else if (isX(tm)) {
      to = `<${+tM + 1}.0.0-0`;
    } else if (isX(tp)) {
      to = `<${tM}.${+tm + 1}.0-0`;
    } else if (tpr) {
      to = `<=${tM}.${tm}.${tp}-${tpr}`;
    } else if (incPr) {
      to = `<${tM}.${tm}.${+tp + 1}-0`;
    } else {
      to = `<=${to}`;
    }
    return `${from2} ${to}`.trim();
  };
  const testSet = (set, version3, options2) => {
    for (let i = 0; i < set.length; i++) {
      if (!set[i].test(version3)) {
        return false;
      }
    }
    if (version3.prerelease.length && !options2.includePrerelease) {
      for (let i = 0; i < set.length; i++) {
        debug2(set[i].semver);
        if (set[i].semver === Comparator.ANY) {
          continue;
        }
        if (set[i].semver.prerelease.length > 0) {
          const allowed = set[i].semver;
          if (allowed.major === version3.major && allowed.minor === version3.minor && allowed.patch === version3.patch) {
            return true;
          }
        }
      }
      return false;
    }
    return true;
  };
  return range;
}
function requireComparator() {
  if (hasRequiredComparator) return comparator;
  hasRequiredComparator = 1;
  const ANY = Symbol("SemVer ANY");
  class Comparator {
    static get ANY() {
      return ANY;
    }
    constructor(comp, options2) {
      options2 = parseOptions(options2);
      if (comp instanceof Comparator) {
        if (comp.loose === !!options2.loose) {
          return comp;
        } else {
          comp = comp.value;
        }
      }
      comp = comp.trim().split(/\s+/).join(" ");
      debug2("comparator", comp, options2);
      this.options = options2;
      this.loose = !!options2.loose;
      this.parse(comp);
      if (this.semver === ANY) {
        this.value = "";
      } else {
        this.value = this.operator + this.semver.version;
      }
      debug2("comp", this);
    }
    parse(comp) {
      const r = this.options.loose ? re2[t.COMPARATORLOOSE] : re2[t.COMPARATOR];
      const m = comp.match(r);
      if (!m) {
        throw new TypeError(`Invalid comparator: ${comp}`);
      }
      this.operator = m[1] !== void 0 ? m[1] : "";
      if (this.operator === "=") {
        this.operator = "";
      }
      if (!m[2]) {
        this.semver = ANY;
      } else {
        this.semver = new SemVer(m[2], this.options.loose);
      }
    }
    toString() {
      return this.value;
    }
    test(version3) {
      debug2("Comparator.test", version3, this.options.loose);
      if (this.semver === ANY || version3 === ANY) {
        return true;
      }
      if (typeof version3 === "string") {
        try {
          version3 = new SemVer(version3, this.options);
        } catch (er) {
          return false;
        }
      }
      return cmp(version3, this.operator, this.semver, this.options);
    }
    intersects(comp, options2) {
      if (!(comp instanceof Comparator)) {
        throw new TypeError("a Comparator is required");
      }
      if (this.operator === "") {
        if (this.value === "") {
          return true;
        }
        return new Range(comp.value, options2).test(this.value);
      } else if (comp.operator === "") {
        if (comp.value === "") {
          return true;
        }
        return new Range(this.value, options2).test(comp.semver);
      }
      options2 = parseOptions(options2);
      if (options2.includePrerelease && (this.value === "<0.0.0-0" || comp.value === "<0.0.0-0")) {
        return false;
      }
      if (!options2.includePrerelease && (this.value.startsWith("<0.0.0") || comp.value.startsWith("<0.0.0"))) {
        return false;
      }
      if (this.operator.startsWith(">") && comp.operator.startsWith(">")) {
        return true;
      }
      if (this.operator.startsWith("<") && comp.operator.startsWith("<")) {
        return true;
      }
      if (this.semver.version === comp.semver.version && this.operator.includes("=") && comp.operator.includes("=")) {
        return true;
      }
      if (cmp(this.semver, "<", comp.semver, options2) && this.operator.startsWith(">") && comp.operator.startsWith("<")) {
        return true;
      }
      if (cmp(this.semver, ">", comp.semver, options2) && this.operator.startsWith("<") && comp.operator.startsWith(">")) {
        return true;
      }
      return false;
    }
  }
  comparator = Comparator;
  const parseOptions = requireParseOptions();
  const { safeRe: re2, t } = requireRe();
  const cmp = requireCmp();
  const debug2 = requireDebug$1();
  const SemVer = requireSemver$1();
  const Range = requireRange();
  return comparator;
}
function requireSatisfies() {
  if (hasRequiredSatisfies) return satisfies_1;
  hasRequiredSatisfies = 1;
  const Range = requireRange();
  const satisfies = (version3, range2, options2) => {
    try {
      range2 = new Range(range2, options2);
    } catch (er) {
      return false;
    }
    return range2.test(version3);
  };
  satisfies_1 = satisfies;
  return satisfies_1;
}
function requireToComparators() {
  if (hasRequiredToComparators) return toComparators_1;
  hasRequiredToComparators = 1;
  const Range = requireRange();
  const toComparators = (range2, options2) => new Range(range2, options2).set.map((comp) => comp.map((c) => c.value).join(" ").trim().split(" "));
  toComparators_1 = toComparators;
  return toComparators_1;
}
function requireMaxSatisfying() {
  if (hasRequiredMaxSatisfying) return maxSatisfying_1;
  hasRequiredMaxSatisfying = 1;
  const SemVer = requireSemver$1();
  const Range = requireRange();
  const maxSatisfying = (versions, range2, options2) => {
    let max = null;
    let maxSV = null;
    let rangeObj = null;
    try {
      rangeObj = new Range(range2, options2);
    } catch (er) {
      return null;
    }
    versions.forEach((v) => {
      if (rangeObj.test(v)) {
        if (!max || maxSV.compare(v) === -1) {
          max = v;
          maxSV = new SemVer(max, options2);
        }
      }
    });
    return max;
  };
  maxSatisfying_1 = maxSatisfying;
  return maxSatisfying_1;
}
function requireMinSatisfying() {
  if (hasRequiredMinSatisfying) return minSatisfying_1;
  hasRequiredMinSatisfying = 1;
  const SemVer = requireSemver$1();
  const Range = requireRange();
  const minSatisfying = (versions, range2, options2) => {
    let min = null;
    let minSV = null;
    let rangeObj = null;
    try {
      rangeObj = new Range(range2, options2);
    } catch (er) {
      return null;
    }
    versions.forEach((v) => {
      if (rangeObj.test(v)) {
        if (!min || minSV.compare(v) === 1) {
          min = v;
          minSV = new SemVer(min, options2);
        }
      }
    });
    return min;
  };
  minSatisfying_1 = minSatisfying;
  return minSatisfying_1;
}
function requireMinVersion() {
  if (hasRequiredMinVersion) return minVersion_1;
  hasRequiredMinVersion = 1;
  const SemVer = requireSemver$1();
  const Range = requireRange();
  const gt = requireGt();
  const minVersion = (range2, loose) => {
    range2 = new Range(range2, loose);
    let minver = new SemVer("0.0.0");
    if (range2.test(minver)) {
      return minver;
    }
    minver = new SemVer("0.0.0-0");
    if (range2.test(minver)) {
      return minver;
    }
    minver = null;
    for (let i = 0; i < range2.set.length; ++i) {
      const comparators = range2.set[i];
      let setMin = null;
      comparators.forEach((comparator2) => {
        const compver = new SemVer(comparator2.semver.version);
        switch (comparator2.operator) {
          case ">":
            if (compver.prerelease.length === 0) {
              compver.patch++;
            } else {
              compver.prerelease.push(0);
            }
            compver.raw = compver.format();
          case "":
          case ">=":
            if (!setMin || gt(compver, setMin)) {
              setMin = compver;
            }
            break;
          case "<":
          case "<=":
            break;
          default:
            throw new Error(`Unexpected operation: ${comparator2.operator}`);
        }
      });
      if (setMin && (!minver || gt(minver, setMin))) {
        minver = setMin;
      }
    }
    if (minver && range2.test(minver)) {
      return minver;
    }
    return null;
  };
  minVersion_1 = minVersion;
  return minVersion_1;
}
function requireValid() {
  if (hasRequiredValid) return valid;
  hasRequiredValid = 1;
  const Range = requireRange();
  const validRange = (range2, options2) => {
    try {
      return new Range(range2, options2).range || "*";
    } catch (er) {
      return null;
    }
  };
  valid = validRange;
  return valid;
}
function requireOutside() {
  if (hasRequiredOutside) return outside_1;
  hasRequiredOutside = 1;
  const SemVer = requireSemver$1();
  const Comparator = requireComparator();
  const { ANY } = Comparator;
  const Range = requireRange();
  const satisfies = requireSatisfies();
  const gt = requireGt();
  const lt = requireLt();
  const lte = requireLte();
  const gte = requireGte();
  const outside = (version3, range2, hilo, options2) => {
    version3 = new SemVer(version3, options2);
    range2 = new Range(range2, options2);
    let gtfn, ltefn, ltfn, comp, ecomp;
    switch (hilo) {
      case ">":
        gtfn = gt;
        ltefn = lte;
        ltfn = lt;
        comp = ">";
        ecomp = ">=";
        break;
      case "<":
        gtfn = lt;
        ltefn = gte;
        ltfn = gt;
        comp = "<";
        ecomp = "<=";
        break;
      default:
        throw new TypeError('Must provide a hilo val of "<" or ">"');
    }
    if (satisfies(version3, range2, options2)) {
      return false;
    }
    for (let i = 0; i < range2.set.length; ++i) {
      const comparators = range2.set[i];
      let high = null;
      let low = null;
      comparators.forEach((comparator2) => {
        if (comparator2.semver === ANY) {
          comparator2 = new Comparator(">=0.0.0");
        }
        high = high || comparator2;
        low = low || comparator2;
        if (gtfn(comparator2.semver, high.semver, options2)) {
          high = comparator2;
        } else if (ltfn(comparator2.semver, low.semver, options2)) {
          low = comparator2;
        }
      });
      if (high.operator === comp || high.operator === ecomp) {
        return false;
      }
      if ((!low.operator || low.operator === comp) && ltefn(version3, low.semver)) {
        return false;
      } else if (low.operator === ecomp && ltfn(version3, low.semver)) {
        return false;
      }
    }
    return true;
  };
  outside_1 = outside;
  return outside_1;
}
function requireGtr() {
  if (hasRequiredGtr) return gtr_1;
  hasRequiredGtr = 1;
  const outside = requireOutside();
  const gtr = (version3, range2, options2) => outside(version3, range2, ">", options2);
  gtr_1 = gtr;
  return gtr_1;
}
function requireLtr() {
  if (hasRequiredLtr) return ltr_1;
  hasRequiredLtr = 1;
  const outside = requireOutside();
  const ltr = (version3, range2, options2) => outside(version3, range2, "<", options2);
  ltr_1 = ltr;
  return ltr_1;
}
function requireIntersects() {
  if (hasRequiredIntersects) return intersects_1;
  hasRequiredIntersects = 1;
  const Range = requireRange();
  const intersects = (r1, r2, options2) => {
    r1 = new Range(r1, options2);
    r2 = new Range(r2, options2);
    return r1.intersects(r2, options2);
  };
  intersects_1 = intersects;
  return intersects_1;
}
function requireSimplify() {
  if (hasRequiredSimplify) return simplify;
  hasRequiredSimplify = 1;
  const satisfies = requireSatisfies();
  const compare2 = requireCompare();
  simplify = (versions, range2, options2) => {
    const set = [];
    let first2 = null;
    let prev = null;
    const v = versions.sort((a, b) => compare2(a, b, options2));
    for (const version3 of v) {
      const included = satisfies(version3, range2, options2);
      if (included) {
        prev = version3;
        if (!first2) {
          first2 = version3;
        }
      } else {
        if (prev) {
          set.push([first2, prev]);
        }
        prev = null;
        first2 = null;
      }
    }
    if (first2) {
      set.push([first2, null]);
    }
    const ranges = [];
    for (const [min, max] of set) {
      if (min === max) {
        ranges.push(min);
      } else if (!max && min === v[0]) {
        ranges.push("*");
      } else if (!max) {
        ranges.push(`>=${min}`);
      } else if (min === v[0]) {
        ranges.push(`<=${max}`);
      } else {
        ranges.push(`${min} - ${max}`);
      }
    }
    const simplified = ranges.join(" || ");
    const original = typeof range2.raw === "string" ? range2.raw : String(range2);
    return simplified.length < original.length ? simplified : range2;
  };
  return simplify;
}
function requireSubset() {
  if (hasRequiredSubset) return subset_1;
  hasRequiredSubset = 1;
  const Range = requireRange();
  const Comparator = requireComparator();
  const { ANY } = Comparator;
  const satisfies = requireSatisfies();
  const compare2 = requireCompare();
  const subset = (sub, dom, options2 = {}) => {
    if (sub === dom) {
      return true;
    }
    sub = new Range(sub, options2);
    dom = new Range(dom, options2);
    let sawNonNull = false;
    OUTER: for (const simpleSub of sub.set) {
      for (const simpleDom of dom.set) {
        const isSub = simpleSubset(simpleSub, simpleDom, options2);
        sawNonNull = sawNonNull || isSub !== null;
        if (isSub) {
          continue OUTER;
        }
      }
      if (sawNonNull) {
        return false;
      }
    }
    return true;
  };
  const minimumVersionWithPreRelease = [new Comparator(">=0.0.0-0")];
  const minimumVersion = [new Comparator(">=0.0.0")];
  const simpleSubset = (sub, dom, options2) => {
    if (sub === dom) {
      return true;
    }
    if (sub.length === 1 && sub[0].semver === ANY) {
      if (dom.length === 1 && dom[0].semver === ANY) {
        return true;
      } else if (options2.includePrerelease) {
        sub = minimumVersionWithPreRelease;
      } else {
        sub = minimumVersion;
      }
    }
    if (dom.length === 1 && dom[0].semver === ANY) {
      if (options2.includePrerelease) {
        return true;
      } else {
        dom = minimumVersion;
      }
    }
    const eqSet = /* @__PURE__ */ new Set();
    let gt, lt;
    for (const c of sub) {
      if (c.operator === ">" || c.operator === ">=") {
        gt = higherGT(gt, c, options2);
      } else if (c.operator === "<" || c.operator === "<=") {
        lt = lowerLT(lt, c, options2);
      } else {
        eqSet.add(c.semver);
      }
    }
    if (eqSet.size > 1) {
      return null;
    }
    let gtltComp;
    if (gt && lt) {
      gtltComp = compare2(gt.semver, lt.semver, options2);
      if (gtltComp > 0) {
        return null;
      } else if (gtltComp === 0 && (gt.operator !== ">=" || lt.operator !== "<=")) {
        return null;
      }
    }
    for (const eq2 of eqSet) {
      if (gt && !satisfies(eq2, String(gt), options2)) {
        return null;
      }
      if (lt && !satisfies(eq2, String(lt), options2)) {
        return null;
      }
      for (const c of dom) {
        if (!satisfies(eq2, String(c), options2)) {
          return false;
        }
      }
      return true;
    }
    let higher, lower;
    let hasDomLT, hasDomGT;
    let needDomLTPre = lt && !options2.includePrerelease && lt.semver.prerelease.length ? lt.semver : false;
    let needDomGTPre = gt && !options2.includePrerelease && gt.semver.prerelease.length ? gt.semver : false;
    if (needDomLTPre && needDomLTPre.prerelease.length === 1 && lt.operator === "<" && needDomLTPre.prerelease[0] === 0) {
      needDomLTPre = false;
    }
    for (const c of dom) {
      hasDomGT = hasDomGT || c.operator === ">" || c.operator === ">=";
      hasDomLT = hasDomLT || c.operator === "<" || c.operator === "<=";
      if (gt) {
        if (needDomGTPre) {
          if (c.semver.prerelease && c.semver.prerelease.length && c.semver.major === needDomGTPre.major && c.semver.minor === needDomGTPre.minor && c.semver.patch === needDomGTPre.patch) {
            needDomGTPre = false;
          }
        }
        if (c.operator === ">" || c.operator === ">=") {
          higher = higherGT(gt, c, options2);
          if (higher === c && higher !== gt) {
            return false;
          }
        } else if (gt.operator === ">=" && !satisfies(gt.semver, String(c), options2)) {
          return false;
        }
      }
      if (lt) {
        if (needDomLTPre) {
          if (c.semver.prerelease && c.semver.prerelease.length && c.semver.major === needDomLTPre.major && c.semver.minor === needDomLTPre.minor && c.semver.patch === needDomLTPre.patch) {
            needDomLTPre = false;
          }
        }
        if (c.operator === "<" || c.operator === "<=") {
          lower = lowerLT(lt, c, options2);
          if (lower === c && lower !== lt) {
            return false;
          }
        } else if (lt.operator === "<=" && !satisfies(lt.semver, String(c), options2)) {
          return false;
        }
      }
      if (!c.operator && (lt || gt) && gtltComp !== 0) {
        return false;
      }
    }
    if (gt && hasDomLT && !lt && gtltComp !== 0) {
      return false;
    }
    if (lt && hasDomGT && !gt && gtltComp !== 0) {
      return false;
    }
    if (needDomGTPre || needDomLTPre) {
      return false;
    }
    return true;
  };
  const higherGT = (a, b, options2) => {
    if (!a) {
      return b;
    }
    const comp = compare2(a.semver, b.semver, options2);
    return comp > 0 ? a : comp < 0 ? b : b.operator === ">" && a.operator === ">=" ? b : a;
  };
  const lowerLT = (a, b, options2) => {
    if (!a) {
      return b;
    }
    const comp = compare2(a.semver, b.semver, options2);
    return comp < 0 ? a : comp > 0 ? b : b.operator === "<" && a.operator === "<=" ? b : a;
  };
  subset_1 = subset;
  return subset_1;
}
function requireSemver() {
  if (hasRequiredSemver) return semver$1;
  hasRequiredSemver = 1;
  const internalRe = requireRe();
  const constants2 = requireConstants$4();
  const SemVer = requireSemver$1();
  const identifiers2 = requireIdentifiers();
  const parse2 = requireParse();
  const valid2 = requireValid$1();
  const clean = requireClean();
  const inc = requireInc();
  const diff = requireDiff();
  const major2 = requireMajor();
  const minor2 = requireMinor();
  const patch = requirePatch();
  const prerelease = requirePrerelease();
  const compare2 = requireCompare();
  const rcompare = requireRcompare();
  const compareLoose = requireCompareLoose();
  const compareBuild = requireCompareBuild();
  const sort = requireSort();
  const rsort = requireRsort();
  const gt = requireGt();
  const lt = requireLt();
  const eq2 = requireEq();
  const neq = requireNeq();
  const gte = requireGte();
  const lte = requireLte();
  const cmp = requireCmp();
  const coerce2 = requireCoerce();
  const Comparator = requireComparator();
  const Range = requireRange();
  const satisfies = requireSatisfies();
  const toComparators = requireToComparators();
  const maxSatisfying = requireMaxSatisfying();
  const minSatisfying = requireMinSatisfying();
  const minVersion = requireMinVersion();
  const validRange = requireValid();
  const outside = requireOutside();
  const gtr = requireGtr();
  const ltr = requireLtr();
  const intersects = requireIntersects();
  const simplifyRange = requireSimplify();
  const subset = requireSubset();
  semver$1 = {
    parse: parse2,
    valid: valid2,
    clean,
    inc,
    diff,
    major: major2,
    minor: minor2,
    patch,
    prerelease,
    compare: compare2,
    rcompare,
    compareLoose,
    compareBuild,
    sort,
    rsort,
    gt,
    lt,
    eq: eq2,
    neq,
    gte,
    lte,
    cmp,
    coerce: coerce2,
    Comparator,
    Range,
    satisfies,
    toComparators,
    maxSatisfying,
    minSatisfying,
    minVersion,
    validRange,
    outside,
    gtr,
    ltr,
    intersects,
    simplifyRange,
    subset,
    SemVer,
    re: internalRe.re,
    src: internalRe.src,
    tokens: internalRe.t,
    SEMVER_SPEC_VERSION: constants2.SEMVER_SPEC_VERSION,
    RELEASE_TYPES: constants2.RELEASE_TYPES,
    compareIdentifiers: identifiers2.compareIdentifiers,
    rcompareIdentifiers: identifiers2.rcompareIdentifiers
  };
  return semver$1;
}
function requireLruCache() {
  if (hasRequiredLruCache) return lruCache;
  hasRequiredLruCache = 1;
  const perf = typeof performance === "object" && performance && typeof performance.now === "function" ? performance : Date;
  const hasAbortController = typeof AbortController === "function";
  const AC = hasAbortController ? AbortController : class AbortController {
    constructor() {
      this.signal = new AS();
    }
    abort(reason = new Error("This operation was aborted")) {
      this.signal.reason = this.signal.reason || reason;
      this.signal.aborted = true;
      this.signal.dispatchEvent({
        type: "abort",
        target: this.signal
      });
    }
  };
  const hasAbortSignal = typeof AbortSignal === "function";
  const hasACAbortSignal = typeof AC.AbortSignal === "function";
  const AS = hasAbortSignal ? AbortSignal : hasACAbortSignal ? AC.AbortController : class AbortSignal {
    constructor() {
      this.reason = void 0;
      this.aborted = false;
      this._listeners = [];
    }
    dispatchEvent(e) {
      if (e.type === "abort") {
        this.aborted = true;
        this.onabort(e);
        this._listeners.forEach((f) => f(e), this);
      }
    }
    onabort() {
    }
    addEventListener(ev, fn) {
      if (ev === "abort") {
        this._listeners.push(fn);
      }
    }
    removeEventListener(ev, fn) {
      if (ev === "abort") {
        this._listeners = this._listeners.filter((f) => f !== fn);
      }
    }
  };
  const warned = /* @__PURE__ */ new Set();
  const deprecatedOption = (opt, instead) => {
    const code2 = `LRU_CACHE_OPTION_${opt}`;
    if (shouldWarn(code2)) {
      warn(code2, `${opt} option`, `options.${instead}`, LRUCache);
    }
  };
  const deprecatedMethod = (method, instead) => {
    const code2 = `LRU_CACHE_METHOD_${method}`;
    if (shouldWarn(code2)) {
      const { prototype } = LRUCache;
      const { get: get3 } = Object.getOwnPropertyDescriptor(prototype, method);
      warn(code2, `${method} method`, `cache.${instead}()`, get3);
    }
  };
  const deprecatedProperty = (field, instead) => {
    const code2 = `LRU_CACHE_PROPERTY_${field}`;
    if (shouldWarn(code2)) {
      const { prototype } = LRUCache;
      const { get: get3 } = Object.getOwnPropertyDescriptor(prototype, field);
      warn(code2, `${field} property`, `cache.${instead}`, get3);
    }
  };
  const emitWarning = (...a) => {
    typeof process === "object" && process && typeof process.emitWarning === "function" ? process.emitWarning(...a) : console.error(...a);
  };
  const shouldWarn = (code2) => !warned.has(code2);
  const warn = (code2, what, instead, fn) => {
    warned.add(code2);
    const msg = `The ${what} is deprecated. Please use ${instead} instead.`;
    emitWarning(msg, "DeprecationWarning", code2, fn);
  };
  const isPosInt = (n) => n && n === Math.floor(n) && n > 0 && isFinite(n);
  const getUintArray = (max) => !isPosInt(max) ? null : max <= Math.pow(2, 8) ? Uint8Array : max <= Math.pow(2, 16) ? Uint16Array : max <= Math.pow(2, 32) ? Uint32Array : max <= Number.MAX_SAFE_INTEGER ? ZeroArray : null;
  class ZeroArray extends Array {
    constructor(size) {
      super(size);
      this.fill(0);
    }
  }
  class Stack2 {
    constructor(max) {
      if (max === 0) {
        return [];
      }
      const UintArray = getUintArray(max);
      this.heap = new UintArray(max);
      this.length = 0;
    }
    push(n) {
      this.heap[this.length++] = n;
    }
    pop() {
      return this.heap[--this.length];
    }
  }
  class LRUCache {
    constructor(options2 = {}) {
      const {
        max = 0,
        ttl,
        ttlResolution = 1,
        ttlAutopurge,
        updateAgeOnGet,
        updateAgeOnHas,
        allowStale,
        dispose,
        disposeAfter,
        noDisposeOnSet,
        noUpdateTTL,
        maxSize = 0,
        maxEntrySize = 0,
        sizeCalculation,
        fetchMethod,
        fetchContext,
        noDeleteOnFetchRejection,
        noDeleteOnStaleGet,
        allowStaleOnFetchRejection,
        allowStaleOnFetchAbort,
        ignoreFetchAbort
      } = options2;
      const { length, maxAge, stale } = options2 instanceof LRUCache ? {} : options2;
      if (max !== 0 && !isPosInt(max)) {
        throw new TypeError("max option must be a nonnegative integer");
      }
      const UintArray = max ? getUintArray(max) : Array;
      if (!UintArray) {
        throw new Error("invalid max value: " + max);
      }
      this.max = max;
      this.maxSize = maxSize;
      this.maxEntrySize = maxEntrySize || this.maxSize;
      this.sizeCalculation = sizeCalculation || length;
      if (this.sizeCalculation) {
        if (!this.maxSize && !this.maxEntrySize) {
          throw new TypeError(
            "cannot set sizeCalculation without setting maxSize or maxEntrySize"
          );
        }
        if (typeof this.sizeCalculation !== "function") {
          throw new TypeError("sizeCalculation set to non-function");
        }
      }
      this.fetchMethod = fetchMethod || null;
      if (this.fetchMethod && typeof this.fetchMethod !== "function") {
        throw new TypeError(
          "fetchMethod must be a function if specified"
        );
      }
      this.fetchContext = fetchContext;
      if (!this.fetchMethod && fetchContext !== void 0) {
        throw new TypeError(
          "cannot set fetchContext without fetchMethod"
        );
      }
      this.keyMap = /* @__PURE__ */ new Map();
      this.keyList = new Array(max).fill(null);
      this.valList = new Array(max).fill(null);
      this.next = new UintArray(max);
      this.prev = new UintArray(max);
      this.head = 0;
      this.tail = 0;
      this.free = new Stack2(max);
      this.initialFill = 1;
      this.size = 0;
      if (typeof dispose === "function") {
        this.dispose = dispose;
      }
      if (typeof disposeAfter === "function") {
        this.disposeAfter = disposeAfter;
        this.disposed = [];
      } else {
        this.disposeAfter = null;
        this.disposed = null;
      }
      this.noDisposeOnSet = !!noDisposeOnSet;
      this.noUpdateTTL = !!noUpdateTTL;
      this.noDeleteOnFetchRejection = !!noDeleteOnFetchRejection;
      this.allowStaleOnFetchRejection = !!allowStaleOnFetchRejection;
      this.allowStaleOnFetchAbort = !!allowStaleOnFetchAbort;
      this.ignoreFetchAbort = !!ignoreFetchAbort;
      if (this.maxEntrySize !== 0) {
        if (this.maxSize !== 0) {
          if (!isPosInt(this.maxSize)) {
            throw new TypeError(
              "maxSize must be a positive integer if specified"
            );
          }
        }
        if (!isPosInt(this.maxEntrySize)) {
          throw new TypeError(
            "maxEntrySize must be a positive integer if specified"
          );
        }
        this.initializeSizeTracking();
      }
      this.allowStale = !!allowStale || !!stale;
      this.noDeleteOnStaleGet = !!noDeleteOnStaleGet;
      this.updateAgeOnGet = !!updateAgeOnGet;
      this.updateAgeOnHas = !!updateAgeOnHas;
      this.ttlResolution = isPosInt(ttlResolution) || ttlResolution === 0 ? ttlResolution : 1;
      this.ttlAutopurge = !!ttlAutopurge;
      this.ttl = ttl || maxAge || 0;
      if (this.ttl) {
        if (!isPosInt(this.ttl)) {
          throw new TypeError(
            "ttl must be a positive integer if specified"
          );
        }
        this.initializeTTLTracking();
      }
      if (this.max === 0 && this.ttl === 0 && this.maxSize === 0) {
        throw new TypeError(
          "At least one of max, maxSize, or ttl is required"
        );
      }
      if (!this.ttlAutopurge && !this.max && !this.maxSize) {
        const code2 = "LRU_CACHE_UNBOUNDED";
        if (shouldWarn(code2)) {
          warned.add(code2);
          const msg = "TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.";
          emitWarning(msg, "UnboundedCacheWarning", code2, LRUCache);
        }
      }
      if (stale) {
        deprecatedOption("stale", "allowStale");
      }
      if (maxAge) {
        deprecatedOption("maxAge", "ttl");
      }
      if (length) {
        deprecatedOption("length", "sizeCalculation");
      }
    }
    getRemainingTTL(key) {
      return this.has(key, { updateAgeOnHas: false }) ? Infinity : 0;
    }
    initializeTTLTracking() {
      this.ttls = new ZeroArray(this.max);
      this.starts = new ZeroArray(this.max);
      this.setItemTTL = (index2, ttl, start = perf.now()) => {
        this.starts[index2] = ttl !== 0 ? start : 0;
        this.ttls[index2] = ttl;
        if (ttl !== 0 && this.ttlAutopurge) {
          const t = setTimeout(() => {
            if (this.isStale(index2)) {
              this.delete(this.keyList[index2]);
            }
          }, ttl + 1);
          if (t.unref) {
            t.unref();
          }
        }
      };
      this.updateItemAge = (index2) => {
        this.starts[index2] = this.ttls[index2] !== 0 ? perf.now() : 0;
      };
      this.statusTTL = (status, index2) => {
        if (status) {
          status.ttl = this.ttls[index2];
          status.start = this.starts[index2];
          status.now = cachedNow || getNow();
          status.remainingTTL = status.now + status.ttl - status.start;
        }
      };
      let cachedNow = 0;
      const getNow = () => {
        const n = perf.now();
        if (this.ttlResolution > 0) {
          cachedNow = n;
          const t = setTimeout(
            () => cachedNow = 0,
            this.ttlResolution
          );
          if (t.unref) {
            t.unref();
          }
        }
        return n;
      };
      this.getRemainingTTL = (key) => {
        const index2 = this.keyMap.get(key);
        if (index2 === void 0) {
          return 0;
        }
        return this.ttls[index2] === 0 || this.starts[index2] === 0 ? Infinity : this.starts[index2] + this.ttls[index2] - (cachedNow || getNow());
      };
      this.isStale = (index2) => {
        return this.ttls[index2] !== 0 && this.starts[index2] !== 0 && (cachedNow || getNow()) - this.starts[index2] > this.ttls[index2];
      };
    }
    updateItemAge(_index) {
    }
    statusTTL(_status, _index) {
    }
    setItemTTL(_index, _ttl, _start) {
    }
    isStale(_index) {
      return false;
    }
    initializeSizeTracking() {
      this.calculatedSize = 0;
      this.sizes = new ZeroArray(this.max);
      this.removeItemSize = (index2) => {
        this.calculatedSize -= this.sizes[index2];
        this.sizes[index2] = 0;
      };
      this.requireSize = (k, v, size, sizeCalculation) => {
        if (this.isBackgroundFetch(v)) {
          return 0;
        }
        if (!isPosInt(size)) {
          if (sizeCalculation) {
            if (typeof sizeCalculation !== "function") {
              throw new TypeError("sizeCalculation must be a function");
            }
            size = sizeCalculation(v, k);
            if (!isPosInt(size)) {
              throw new TypeError(
                "sizeCalculation return invalid (expect positive integer)"
              );
            }
          } else {
            throw new TypeError(
              "invalid size value (must be positive integer). When maxSize or maxEntrySize is used, sizeCalculation or size must be set."
            );
          }
        }
        return size;
      };
      this.addItemSize = (index2, size, status) => {
        this.sizes[index2] = size;
        if (this.maxSize) {
          const maxSize = this.maxSize - this.sizes[index2];
          while (this.calculatedSize > maxSize) {
            this.evict(true);
          }
        }
        this.calculatedSize += this.sizes[index2];
        if (status) {
          status.entrySize = size;
          status.totalCalculatedSize = this.calculatedSize;
        }
      };
    }
    removeItemSize(_index) {
    }
    addItemSize(_index, _size2) {
    }
    requireSize(_k, _v, size, sizeCalculation) {
      if (size || sizeCalculation) {
        throw new TypeError(
          "cannot set size without setting maxSize or maxEntrySize on cache"
        );
      }
    }
    *indexes({ allowStale = this.allowStale } = {}) {
      if (this.size) {
        for (let i = this.tail; true; ) {
          if (!this.isValidIndex(i)) {
            break;
          }
          if (allowStale || !this.isStale(i)) {
            yield i;
          }
          if (i === this.head) {
            break;
          } else {
            i = this.prev[i];
          }
        }
      }
    }
    *rindexes({ allowStale = this.allowStale } = {}) {
      if (this.size) {
        for (let i = this.head; true; ) {
          if (!this.isValidIndex(i)) {
            break;
          }
          if (allowStale || !this.isStale(i)) {
            yield i;
          }
          if (i === this.tail) {
            break;
          } else {
            i = this.next[i];
          }
        }
      }
    }
    isValidIndex(index2) {
      return index2 !== void 0 && this.keyMap.get(this.keyList[index2]) === index2;
    }
    *entries() {
      for (const i of this.indexes()) {
        if (this.valList[i] !== void 0 && this.keyList[i] !== void 0 && !this.isBackgroundFetch(this.valList[i])) {
          yield [this.keyList[i], this.valList[i]];
        }
      }
    }
    *rentries() {
      for (const i of this.rindexes()) {
        if (this.valList[i] !== void 0 && this.keyList[i] !== void 0 && !this.isBackgroundFetch(this.valList[i])) {
          yield [this.keyList[i], this.valList[i]];
        }
      }
    }
    *keys() {
      for (const i of this.indexes()) {
        if (this.keyList[i] !== void 0 && !this.isBackgroundFetch(this.valList[i])) {
          yield this.keyList[i];
        }
      }
    }
    *rkeys() {
      for (const i of this.rindexes()) {
        if (this.keyList[i] !== void 0 && !this.isBackgroundFetch(this.valList[i])) {
          yield this.keyList[i];
        }
      }
    }
    *values() {
      for (const i of this.indexes()) {
        if (this.valList[i] !== void 0 && !this.isBackgroundFetch(this.valList[i])) {
          yield this.valList[i];
        }
      }
    }
    *rvalues() {
      for (const i of this.rindexes()) {
        if (this.valList[i] !== void 0 && !this.isBackgroundFetch(this.valList[i])) {
          yield this.valList[i];
        }
      }
    }
    [Symbol.iterator]() {
      return this.entries();
    }
    find(fn, getOptions) {
      for (const i of this.indexes()) {
        const v = this.valList[i];
        const value = this.isBackgroundFetch(v) ? v.__staleWhileFetching : v;
        if (value === void 0) continue;
        if (fn(value, this.keyList[i], this)) {
          return this.get(this.keyList[i], getOptions);
        }
      }
    }
    forEach(fn, thisp = this) {
      for (const i of this.indexes()) {
        const v = this.valList[i];
        const value = this.isBackgroundFetch(v) ? v.__staleWhileFetching : v;
        if (value === void 0) continue;
        fn.call(thisp, value, this.keyList[i], this);
      }
    }
    rforEach(fn, thisp = this) {
      for (const i of this.rindexes()) {
        const v = this.valList[i];
        const value = this.isBackgroundFetch(v) ? v.__staleWhileFetching : v;
        if (value === void 0) continue;
        fn.call(thisp, value, this.keyList[i], this);
      }
    }
    get prune() {
      deprecatedMethod("prune", "purgeStale");
      return this.purgeStale;
    }
    purgeStale() {
      let deleted = false;
      for (const i of this.rindexes({ allowStale: true })) {
        if (this.isStale(i)) {
          this.delete(this.keyList[i]);
          deleted = true;
        }
      }
      return deleted;
    }
    dump() {
      const arr = [];
      for (const i of this.indexes({ allowStale: true })) {
        const key = this.keyList[i];
        const v = this.valList[i];
        const value = this.isBackgroundFetch(v) ? v.__staleWhileFetching : v;
        if (value === void 0) continue;
        const entry = { value };
        if (this.ttls) {
          entry.ttl = this.ttls[i];
          const age = perf.now() - this.starts[i];
          entry.start = Math.floor(Date.now() - age);
        }
        if (this.sizes) {
          entry.size = this.sizes[i];
        }
        arr.unshift([key, entry]);
      }
      return arr;
    }
    load(arr) {
      this.clear();
      for (const [key, entry] of arr) {
        if (entry.start) {
          const age = Date.now() - entry.start;
          entry.start = perf.now() - age;
        }
        this.set(key, entry.value, entry);
      }
    }
    dispose(_v, _k, _reason) {
    }
    set(k, v, {
      ttl = this.ttl,
      start,
      noDisposeOnSet = this.noDisposeOnSet,
      size = 0,
      sizeCalculation = this.sizeCalculation,
      noUpdateTTL = this.noUpdateTTL,
      status
    } = {}) {
      size = this.requireSize(k, v, size, sizeCalculation);
      if (this.maxEntrySize && size > this.maxEntrySize) {
        if (status) {
          status.set = "miss";
          status.maxEntrySizeExceeded = true;
        }
        this.delete(k);
        return this;
      }
      let index2 = this.size === 0 ? void 0 : this.keyMap.get(k);
      if (index2 === void 0) {
        index2 = this.newIndex();
        this.keyList[index2] = k;
        this.valList[index2] = v;
        this.keyMap.set(k, index2);
        this.next[this.tail] = index2;
        this.prev[index2] = this.tail;
        this.tail = index2;
        this.size++;
        this.addItemSize(index2, size, status);
        if (status) {
          status.set = "add";
        }
        noUpdateTTL = false;
      } else {
        this.moveToTail(index2);
        const oldVal = this.valList[index2];
        if (v !== oldVal) {
          if (this.isBackgroundFetch(oldVal)) {
            oldVal.__abortController.abort(new Error("replaced"));
          } else {
            if (!noDisposeOnSet) {
              this.dispose(oldVal, k, "set");
              if (this.disposeAfter) {
                this.disposed.push([oldVal, k, "set"]);
              }
            }
          }
          this.removeItemSize(index2);
          this.valList[index2] = v;
          this.addItemSize(index2, size, status);
          if (status) {
            status.set = "replace";
            const oldValue = oldVal && this.isBackgroundFetch(oldVal) ? oldVal.__staleWhileFetching : oldVal;
            if (oldValue !== void 0) status.oldValue = oldValue;
          }
        } else if (status) {
          status.set = "update";
        }
      }
      if (ttl !== 0 && this.ttl === 0 && !this.ttls) {
        this.initializeTTLTracking();
      }
      if (!noUpdateTTL) {
        this.setItemTTL(index2, ttl, start);
      }
      this.statusTTL(status, index2);
      if (this.disposeAfter) {
        while (this.disposed.length) {
          this.disposeAfter(...this.disposed.shift());
        }
      }
      return this;
    }
    newIndex() {
      if (this.size === 0) {
        return this.tail;
      }
      if (this.size === this.max && this.max !== 0) {
        return this.evict(false);
      }
      if (this.free.length !== 0) {
        return this.free.pop();
      }
      return this.initialFill++;
    }
    pop() {
      if (this.size) {
        const val = this.valList[this.head];
        this.evict(true);
        return val;
      }
    }
    evict(free) {
      const head = this.head;
      const k = this.keyList[head];
      const v = this.valList[head];
      if (this.isBackgroundFetch(v)) {
        v.__abortController.abort(new Error("evicted"));
      } else {
        this.dispose(v, k, "evict");
        if (this.disposeAfter) {
          this.disposed.push([v, k, "evict"]);
        }
      }
      this.removeItemSize(head);
      if (free) {
        this.keyList[head] = null;
        this.valList[head] = null;
        this.free.push(head);
      }
      this.head = this.next[head];
      this.keyMap.delete(k);
      this.size--;
      return head;
    }
    has(k, { updateAgeOnHas = this.updateAgeOnHas, status } = {}) {
      const index2 = this.keyMap.get(k);
      if (index2 !== void 0) {
        if (!this.isStale(index2)) {
          if (updateAgeOnHas) {
            this.updateItemAge(index2);
          }
          if (status) status.has = "hit";
          this.statusTTL(status, index2);
          return true;
        } else if (status) {
          status.has = "stale";
          this.statusTTL(status, index2);
        }
      } else if (status) {
        status.has = "miss";
      }
      return false;
    }
    peek(k, { allowStale = this.allowStale } = {}) {
      const index2 = this.keyMap.get(k);
      if (index2 !== void 0 && (allowStale || !this.isStale(index2))) {
        const v = this.valList[index2];
        return this.isBackgroundFetch(v) ? v.__staleWhileFetching : v;
      }
    }
    backgroundFetch(k, index2, options2, context2) {
      const v = index2 === void 0 ? void 0 : this.valList[index2];
      if (this.isBackgroundFetch(v)) {
        return v;
      }
      const ac = new AC();
      if (options2.signal) {
        options2.signal.addEventListener(
          "abort",
          () => ac.abort(options2.signal.reason)
        );
      }
      const fetchOpts = {
        signal: ac.signal,
        options: options2,
        context: context2
      };
      const cb = (v2, updateCache = false) => {
        const { aborted: aborted2 } = ac.signal;
        const ignoreAbort = options2.ignoreFetchAbort && v2 !== void 0;
        if (options2.status) {
          if (aborted2 && !updateCache) {
            options2.status.fetchAborted = true;
            options2.status.fetchError = ac.signal.reason;
            if (ignoreAbort) options2.status.fetchAbortIgnored = true;
          } else {
            options2.status.fetchResolved = true;
          }
        }
        if (aborted2 && !ignoreAbort && !updateCache) {
          return fetchFail(ac.signal.reason);
        }
        if (this.valList[index2] === p) {
          if (v2 === void 0) {
            if (p.__staleWhileFetching) {
              this.valList[index2] = p.__staleWhileFetching;
            } else {
              this.delete(k);
            }
          } else {
            if (options2.status) options2.status.fetchUpdated = true;
            this.set(k, v2, fetchOpts.options);
          }
        }
        return v2;
      };
      const eb = (er) => {
        if (options2.status) {
          options2.status.fetchRejected = true;
          options2.status.fetchError = er;
        }
        return fetchFail(er);
      };
      const fetchFail = (er) => {
        const { aborted: aborted2 } = ac.signal;
        const allowStaleAborted = aborted2 && options2.allowStaleOnFetchAbort;
        const allowStale = allowStaleAborted || options2.allowStaleOnFetchRejection;
        const noDelete = allowStale || options2.noDeleteOnFetchRejection;
        if (this.valList[index2] === p) {
          const del = !noDelete || p.__staleWhileFetching === void 0;
          if (del) {
            this.delete(k);
          } else if (!allowStaleAborted) {
            this.valList[index2] = p.__staleWhileFetching;
          }
        }
        if (allowStale) {
          if (options2.status && p.__staleWhileFetching !== void 0) {
            options2.status.returnedStale = true;
          }
          return p.__staleWhileFetching;
        } else if (p.__returned === p) {
          throw er;
        }
      };
      const pcall = (res, rej) => {
        this.fetchMethod(k, v, fetchOpts).then((v2) => res(v2), rej);
        ac.signal.addEventListener("abort", () => {
          if (!options2.ignoreFetchAbort || options2.allowStaleOnFetchAbort) {
            res();
            if (options2.allowStaleOnFetchAbort) {
              res = (v2) => cb(v2, true);
            }
          }
        });
      };
      if (options2.status) options2.status.fetchDispatched = true;
      const p = new Promise(pcall).then(cb, eb);
      p.__abortController = ac;
      p.__staleWhileFetching = v;
      p.__returned = null;
      if (index2 === void 0) {
        this.set(k, p, { ...fetchOpts.options, status: void 0 });
        index2 = this.keyMap.get(k);
      } else {
        this.valList[index2] = p;
      }
      return p;
    }
    isBackgroundFetch(p) {
      return p && typeof p === "object" && typeof p.then === "function" && Object.prototype.hasOwnProperty.call(
        p,
        "__staleWhileFetching"
      ) && Object.prototype.hasOwnProperty.call(p, "__returned") && (p.__returned === p || p.__returned === null);
    }
    async fetch(k, {
      allowStale = this.allowStale,
      updateAgeOnGet = this.updateAgeOnGet,
      noDeleteOnStaleGet = this.noDeleteOnStaleGet,
      ttl = this.ttl,
      noDisposeOnSet = this.noDisposeOnSet,
      size = 0,
      sizeCalculation = this.sizeCalculation,
      noUpdateTTL = this.noUpdateTTL,
      noDeleteOnFetchRejection = this.noDeleteOnFetchRejection,
      allowStaleOnFetchRejection = this.allowStaleOnFetchRejection,
      ignoreFetchAbort = this.ignoreFetchAbort,
      allowStaleOnFetchAbort = this.allowStaleOnFetchAbort,
      fetchContext = this.fetchContext,
      forceRefresh = false,
      status,
      signal
    } = {}) {
      if (!this.fetchMethod) {
        if (status) status.fetch = "get";
        return this.get(k, {
          allowStale,
          updateAgeOnGet,
          noDeleteOnStaleGet,
          status
        });
      }
      const options2 = {
        allowStale,
        updateAgeOnGet,
        noDeleteOnStaleGet,
        ttl,
        noDisposeOnSet,
        size,
        sizeCalculation,
        noUpdateTTL,
        noDeleteOnFetchRejection,
        allowStaleOnFetchRejection,
        allowStaleOnFetchAbort,
        ignoreFetchAbort,
        status,
        signal
      };
      let index2 = this.keyMap.get(k);
      if (index2 === void 0) {
        if (status) status.fetch = "miss";
        const p = this.backgroundFetch(k, index2, options2, fetchContext);
        return p.__returned = p;
      } else {
        const v = this.valList[index2];
        if (this.isBackgroundFetch(v)) {
          const stale = allowStale && v.__staleWhileFetching !== void 0;
          if (status) {
            status.fetch = "inflight";
            if (stale) status.returnedStale = true;
          }
          return stale ? v.__staleWhileFetching : v.__returned = v;
        }
        const isStale = this.isStale(index2);
        if (!forceRefresh && !isStale) {
          if (status) status.fetch = "hit";
          this.moveToTail(index2);
          if (updateAgeOnGet) {
            this.updateItemAge(index2);
          }
          this.statusTTL(status, index2);
          return v;
        }
        const p = this.backgroundFetch(k, index2, options2, fetchContext);
        const hasStale = p.__staleWhileFetching !== void 0;
        const staleVal = hasStale && allowStale;
        if (status) {
          status.fetch = hasStale && isStale ? "stale" : "refresh";
          if (staleVal && isStale) status.returnedStale = true;
        }
        return staleVal ? p.__staleWhileFetching : p.__returned = p;
      }
    }
    get(k, {
      allowStale = this.allowStale,
      updateAgeOnGet = this.updateAgeOnGet,
      noDeleteOnStaleGet = this.noDeleteOnStaleGet,
      status
    } = {}) {
      const index2 = this.keyMap.get(k);
      if (index2 !== void 0) {
        const value = this.valList[index2];
        const fetching = this.isBackgroundFetch(value);
        this.statusTTL(status, index2);
        if (this.isStale(index2)) {
          if (status) status.get = "stale";
          if (!fetching) {
            if (!noDeleteOnStaleGet) {
              this.delete(k);
            }
            if (status) status.returnedStale = allowStale;
            return allowStale ? value : void 0;
          } else {
            if (status) {
              status.returnedStale = allowStale && value.__staleWhileFetching !== void 0;
            }
            return allowStale ? value.__staleWhileFetching : void 0;
          }
        } else {
          if (status) status.get = "hit";
          if (fetching) {
            return value.__staleWhileFetching;
          }
          this.moveToTail(index2);
          if (updateAgeOnGet) {
            this.updateItemAge(index2);
          }
          return value;
        }
      } else if (status) {
        status.get = "miss";
      }
    }
    connect(p, n) {
      this.prev[n] = p;
      this.next[p] = n;
    }
    moveToTail(index2) {
      if (index2 !== this.tail) {
        if (index2 === this.head) {
          this.head = this.next[index2];
        } else {
          this.connect(this.prev[index2], this.next[index2]);
        }
        this.connect(this.tail, index2);
        this.tail = index2;
      }
    }
    get del() {
      deprecatedMethod("del", "delete");
      return this.delete;
    }
    delete(k) {
      let deleted = false;
      if (this.size !== 0) {
        const index2 = this.keyMap.get(k);
        if (index2 !== void 0) {
          deleted = true;
          if (this.size === 1) {
            this.clear();
          } else {
            this.removeItemSize(index2);
            const v = this.valList[index2];
            if (this.isBackgroundFetch(v)) {
              v.__abortController.abort(new Error("deleted"));
            } else {
              this.dispose(v, k, "delete");
              if (this.disposeAfter) {
                this.disposed.push([v, k, "delete"]);
              }
            }
            this.keyMap.delete(k);
            this.keyList[index2] = null;
            this.valList[index2] = null;
            if (index2 === this.tail) {
              this.tail = this.prev[index2];
            } else if (index2 === this.head) {
              this.head = this.next[index2];
            } else {
              this.next[this.prev[index2]] = this.next[index2];
              this.prev[this.next[index2]] = this.prev[index2];
            }
            this.size--;
            this.free.push(index2);
          }
        }
      }
      if (this.disposed) {
        while (this.disposed.length) {
          this.disposeAfter(...this.disposed.shift());
        }
      }
      return deleted;
    }
    clear() {
      for (const index2 of this.rindexes({ allowStale: true })) {
        const v = this.valList[index2];
        if (this.isBackgroundFetch(v)) {
          v.__abortController.abort(new Error("deleted"));
        } else {
          const k = this.keyList[index2];
          this.dispose(v, k, "delete");
          if (this.disposeAfter) {
            this.disposed.push([v, k, "delete"]);
          }
        }
      }
      this.keyMap.clear();
      this.valList.fill(null);
      this.keyList.fill(null);
      if (this.ttls) {
        this.ttls.fill(0);
        this.starts.fill(0);
      }
      if (this.sizes) {
        this.sizes.fill(0);
      }
      this.head = 0;
      this.tail = 0;
      this.initialFill = 1;
      this.free.length = 0;
      this.calculatedSize = 0;
      this.size = 0;
      if (this.disposed) {
        while (this.disposed.length) {
          this.disposeAfter(...this.disposed.shift());
        }
      }
    }
    get reset() {
      deprecatedMethod("reset", "clear");
      return this.clear;
    }
    get length() {
      deprecatedProperty("length", "size");
      return this.size;
    }
    static get AbortController() {
      return AC;
    }
    static get AbortSignal() {
      return AS;
    }
  }
  lruCache = LRUCache;
  return lruCache;
}
function requireHelpers$2() {
  if (hasRequiredHelpers$2) return helpers$4;
  hasRequiredHelpers$2 = 1;
  var __createBinding5 = helpers$4 && helpers$4.__createBinding || (Object.create ? function(o, m, k, k2) {
    if (k2 === void 0) k2 = k;
    var desc = Object.getOwnPropertyDescriptor(m, k);
    if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
      desc = { enumerable: true, get: function() {
        return m[k];
      } };
    }
    Object.defineProperty(o, k2, desc);
  } : function(o, m, k, k2) {
    if (k2 === void 0) k2 = k;
    o[k2] = m[k];
  });
  var __setModuleDefault5 = helpers$4 && helpers$4.__setModuleDefault || (Object.create ? function(o, v) {
    Object.defineProperty(o, "default", { enumerable: true, value: v });
  } : function(o, v) {
    o["default"] = v;
  });
  var __importStar5 = helpers$4 && helpers$4.__importStar || function(mod2) {
    if (mod2 && mod2.__esModule) return mod2;
    var result = {};
    if (mod2 != null) {
      for (var k in mod2) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod2, k)) __createBinding5(result, mod2, k);
    }
    __setModuleDefault5(result, mod2);
    return result;
  };
  Object.defineProperty(helpers$4, "__esModule", { value: true });
  helpers$4.req = helpers$4.json = helpers$4.toBuffer = void 0;
  const http2 = __importStar5(require$$0$6);
  const https2 = __importStar5(require$$1$1);
  async function toBuffer(stream3) {
    let length = 0;
    const chunks = [];
    for await (const chunk of stream3) {
      length += chunk.length;
      chunks.push(chunk);
    }
    return Buffer.concat(chunks, length);
  }
  helpers$4.toBuffer = toBuffer;
  async function json(stream3) {
    const buf = await toBuffer(stream3);
    const str = buf.toString("utf8");
    try {
      return JSON.parse(str);
    } catch (_err) {
      const err = _err;
      err.message += ` (input: ${str})`;
      throw err;
    }
  }
  helpers$4.json = json;
  function req(url, opts = {}) {
    const href = typeof url === "string" ? url : url.href;
    const req2 = (href.startsWith("https:") ? https2 : http2).request(url, opts);
    const promise = new Promise((resolve2, reject) => {
      req2.once("response", resolve2).once("error", reject).end();
    });
    req2.then = promise.then.bind(promise);
    return req2;
  }
  helpers$4.req = req;
  return helpers$4;
}
function requireDist$b() {
  if (hasRequiredDist$b) return dist$a;
  hasRequiredDist$b = 1;
  (function(exports$1) {
    var __createBinding5 = dist$a && dist$a.__createBinding || (Object.create ? function(o, m, k, k2) {
      if (k2 === void 0) k2 = k;
      var desc = Object.getOwnPropertyDescriptor(m, k);
      if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
        desc = { enumerable: true, get: function() {
          return m[k];
        } };
      }
      Object.defineProperty(o, k2, desc);
    } : function(o, m, k, k2) {
      if (k2 === void 0) k2 = k;
      o[k2] = m[k];
    });
    var __setModuleDefault5 = dist$a && dist$a.__setModuleDefault || (Object.create ? function(o, v) {
      Object.defineProperty(o, "default", { enumerable: true, value: v });
    } : function(o, v) {
      o["default"] = v;
    });
    var __importStar5 = dist$a && dist$a.__importStar || function(mod2) {
      if (mod2 && mod2.__esModule) return mod2;
      var result = {};
      if (mod2 != null) {
        for (var k in mod2) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod2, k)) __createBinding5(result, mod2, k);
      }
      __setModuleDefault5(result, mod2);
      return result;
    };
    var __exportStar5 = dist$a && dist$a.__exportStar || function(m, exports$12) {
      for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports$12, p)) __createBinding5(exports$12, m, p);
    };
    Object.defineProperty(exports$1, "__esModule", { value: true });
    exports$1.Agent = void 0;
    const net = __importStar5(require$$0$7);
    const http2 = __importStar5(require$$0$6);
    const https_1 = require$$1$1;
    __exportStar5(requireHelpers$2(), exports$1);
    const INTERNAL = Symbol("AgentBaseInternalState");
    class Agent extends http2.Agent {
      constructor(opts) {
        super(opts);
        this[INTERNAL] = {};
      }
      isSecureEndpoint(options2) {
        if (options2) {
          if (typeof options2.secureEndpoint === "boolean") {
            return options2.secureEndpoint;
          }
          if (typeof options2.protocol === "string") {
            return options2.protocol === "https:";
          }
        }
        const { stack } = new Error();
        if (typeof stack !== "string")
          return false;
        return stack.split("\n").some((l) => l.indexOf("(https.js:") !== -1 || l.indexOf("node:https:") !== -1);
      }
      incrementSockets(name) {
        if (this.maxSockets === Infinity && this.maxTotalSockets === Infinity) {
          return null;
        }
        if (!this.sockets[name]) {
          this.sockets[name] = [];
        }
        const fakeSocket = new net.Socket({ writable: false });
        this.sockets[name].push(fakeSocket);
        this.totalSocketCount++;
        return fakeSocket;
      }
      decrementSockets(name, socket) {
        if (!this.sockets[name] || socket === null) {
          return;
        }
        const sockets = this.sockets[name];
        const index2 = sockets.indexOf(socket);
        if (index2 !== -1) {
          sockets.splice(index2, 1);
          this.totalSocketCount--;
          if (sockets.length === 0) {
            delete this.sockets[name];
          }
        }
      }
      getName(options2) {
        const secureEndpoint = this.isSecureEndpoint(options2);
        if (secureEndpoint) {
          return https_1.Agent.prototype.getName.call(this, options2);
        }
        return super.getName(options2);
      }
      createSocket(req, options2, cb) {
        const connectOpts = {
          ...options2,
          secureEndpoint: this.isSecureEndpoint(options2)
        };
        const name = this.getName(connectOpts);
        const fakeSocket = this.incrementSockets(name);
        Promise.resolve().then(() => this.connect(req, connectOpts)).then((socket) => {
          this.decrementSockets(name, fakeSocket);
          if (socket instanceof http2.Agent) {
            try {
              return socket.addRequest(req, connectOpts);
            } catch (err) {
              return cb(err);
            }
          }
          this[INTERNAL].currentSocket = socket;
          super.createSocket(req, options2, cb);
        }, (err) => {
          this.decrementSockets(name, fakeSocket);
          cb(err);
        });
      }
      createConnection() {
        const socket = this[INTERNAL].currentSocket;
        this[INTERNAL].currentSocket = void 0;
        if (!socket) {
          throw new Error("No socket was returned in the `connect()` function");
        }
        return socket;
      }
      get defaultPort() {
        return this[INTERNAL].defaultPort ?? (this.protocol === "https:" ? 443 : 80);
      }
      set defaultPort(v) {
        if (this[INTERNAL]) {
          this[INTERNAL].defaultPort = v;
        }
      }
      get protocol() {
        return this[INTERNAL].protocol ?? (this.isSecureEndpoint() ? "https:" : "http:");
      }
      set protocol(v) {
        if (this[INTERNAL]) {
          this[INTERNAL].protocol = v;
        }
      }
    }
    exports$1.Agent = Agent;
  })(dist$a);
  return dist$a;
}
function requireProxyFromEnv() {
  if (hasRequiredProxyFromEnv) return proxyFromEnv;
  hasRequiredProxyFromEnv = 1;
  var parseUrl = require$$5.parse;
  var DEFAULT_PORTS = {
    ftp: 21,
    gopher: 70,
    http: 80,
    https: 443,
    ws: 80,
    wss: 443
  };
  var stringEndsWith = String.prototype.endsWith || function(s) {
    return s.length <= this.length && this.indexOf(s, this.length - s.length) !== -1;
  };
  function getProxyForUrl(url) {
    var parsedUrl = typeof url === "string" ? parseUrl(url) : url || {};
    var proto = parsedUrl.protocol;
    var hostname2 = parsedUrl.host;
    var port = parsedUrl.port;
    if (typeof hostname2 !== "string" || !hostname2 || typeof proto !== "string") {
      return "";
    }
    proto = proto.split(":", 1)[0];
    hostname2 = hostname2.replace(/:\d*$/, "");
    port = parseInt(port) || DEFAULT_PORTS[proto] || 0;
    if (!shouldProxy(hostname2, port)) {
      return "";
    }
    var proxy = getEnv("npm_config_" + proto + "_proxy") || getEnv(proto + "_proxy") || getEnv("npm_config_proxy") || getEnv("all_proxy");
    if (proxy && proxy.indexOf("://") === -1) {
      proxy = proto + "://" + proxy;
    }
    return proxy;
  }
  function shouldProxy(hostname2, port) {
    var NO_PROXY = (getEnv("npm_config_no_proxy") || getEnv("no_proxy")).toLowerCase();
    if (!NO_PROXY) {
      return true;
    }
    if (NO_PROXY === "*") {
      return false;
    }
    return NO_PROXY.split(/[,\s]/).every(function(proxy) {
      if (!proxy) {
        return true;
      }
      var parsedProxy = proxy.match(/^(.+):(\d+)$/);
      var parsedProxyHostname = parsedProxy ? parsedProxy[1] : proxy;
      var parsedProxyPort = parsedProxy ? parseInt(parsedProxy[2]) : 0;
      if (parsedProxyPort && parsedProxyPort !== port) {
        return true;
      }
      if (!/^[.*]/.test(parsedProxyHostname)) {
        return hostname2 !== parsedProxyHostname;
      }
      if (parsedProxyHostname.charAt(0) === "*") {
        parsedProxyHostname = parsedProxyHostname.slice(1);
      }
      return !stringEndsWith.call(hostname2, parsedProxyHostname);
    });
  }
  function getEnv(key) {
    return process.env[key.toLowerCase()] || process.env[key.toUpperCase()] || "";
  }
  proxyFromEnv.getProxyForUrl = getProxyForUrl;
  return proxyFromEnv;
}
function requireDist$a() {
  if (hasRequiredDist$a) return dist$9;
  hasRequiredDist$a = 1;
  var __createBinding5 = dist$9 && dist$9.__createBinding || (Object.create ? function(o, m, k, k2) {
    if (k2 === void 0) k2 = k;
    var desc = Object.getOwnPropertyDescriptor(m, k);
    if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
      desc = { enumerable: true, get: function() {
        return m[k];
      } };
    }
    Object.defineProperty(o, k2, desc);
  } : function(o, m, k, k2) {
    if (k2 === void 0) k2 = k;
    o[k2] = m[k];
  });
  var __setModuleDefault5 = dist$9 && dist$9.__setModuleDefault || (Object.create ? function(o, v) {
    Object.defineProperty(o, "default", { enumerable: true, value: v });
  } : function(o, v) {
    o["default"] = v;
  });
  var __importStar5 = dist$9 && dist$9.__importStar || function(mod2) {
    if (mod2 && mod2.__esModule) return mod2;
    var result = {};
    if (mod2 != null) {
      for (var k in mod2) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod2, k)) __createBinding5(result, mod2, k);
    }
    __setModuleDefault5(result, mod2);
    return result;
  };
  var __importDefault5 = dist$9 && dist$9.__importDefault || function(mod2) {
    return mod2 && mod2.__esModule ? mod2 : { "default": mod2 };
  };
  Object.defineProperty(dist$9, "__esModule", { value: true });
  dist$9.HttpProxyAgent = void 0;
  const net = __importStar5(require$$0$7);
  const tls = __importStar5(require$$1$2);
  const debug_12 = __importDefault5(requireSrc());
  const events_1 = require$$0$8;
  const agent_base_1 = requireDist$b();
  const url_1 = require$$5;
  const debug2 = (0, debug_12.default)("http-proxy-agent");
  class HttpProxyAgent extends agent_base_1.Agent {
    constructor(proxy, opts) {
      super(opts);
      this.proxy = typeof proxy === "string" ? new url_1.URL(proxy) : proxy;
      this.proxyHeaders = opts?.headers ?? {};
      debug2("Creating new HttpProxyAgent instance: %o", this.proxy.href);
      const host = (this.proxy.hostname || this.proxy.host).replace(/^\[|\]$/g, "");
      const port = this.proxy.port ? parseInt(this.proxy.port, 10) : this.proxy.protocol === "https:" ? 443 : 80;
      this.connectOpts = {
        ...opts ? omit2(opts, "headers") : null,
        host,
        port
      };
    }
    addRequest(req, opts) {
      req._header = null;
      this.setRequestProps(req, opts);
      super.addRequest(req, opts);
    }
    setRequestProps(req, opts) {
      const { proxy } = this;
      const protocol2 = opts.secureEndpoint ? "https:" : "http:";
      const hostname2 = req.getHeader("host") || "localhost";
      const base = `${protocol2}//${hostname2}`;
      const url = new url_1.URL(req.path, base);
      if (opts.port !== 80) {
        url.port = String(opts.port);
      }
      req.path = String(url);
      const headers = typeof this.proxyHeaders === "function" ? this.proxyHeaders() : { ...this.proxyHeaders };
      if (proxy.username || proxy.password) {
        const auth = `${decodeURIComponent(proxy.username)}:${decodeURIComponent(proxy.password)}`;
        headers["Proxy-Authorization"] = `Basic ${Buffer.from(auth).toString("base64")}`;
      }
      if (!headers["Proxy-Connection"]) {
        headers["Proxy-Connection"] = this.keepAlive ? "Keep-Alive" : "close";
      }
      for (const name of Object.keys(headers)) {
        const value = headers[name];
        if (value) {
          req.setHeader(name, value);
        }
      }
    }
    async connect(req, opts) {
      req._header = null;
      if (!req.path.includes("://")) {
        this.setRequestProps(req, opts);
      }
      let first2;
      let endOfHeaders;
      debug2("Regenerating stored HTTP header string for request");
      req._implicitHeader();
      if (req.outputData && req.outputData.length > 0) {
        debug2("Patching connection write() output buffer with updated header");
        first2 = req.outputData[0].data;
        endOfHeaders = first2.indexOf("\r\n\r\n") + 4;
        req.outputData[0].data = req._header + first2.substring(endOfHeaders);
        debug2("Output buffer: %o", req.outputData[0].data);
      }
      let socket;
      if (this.proxy.protocol === "https:") {
        debug2("Creating `tls.Socket`: %o", this.connectOpts);
        socket = tls.connect(this.connectOpts);
      } else {
        debug2("Creating `net.Socket`: %o", this.connectOpts);
        socket = net.connect(this.connectOpts);
      }
      await (0, events_1.once)(socket, "connect");
      return socket;
    }
  }
  HttpProxyAgent.protocols = ["http", "https"];
  dist$9.HttpProxyAgent = HttpProxyAgent;
  function omit2(obj, ...keys2) {
    const ret = {};
    let key;
    for (key in obj) {
      if (!keys2.includes(key)) {
        ret[key] = obj[key];
      }
    }
    return ret;
  }
  return dist$9;
}
function requireParseProxyResponse() {
  if (hasRequiredParseProxyResponse) return parseProxyResponse;
  hasRequiredParseProxyResponse = 1;
  var __importDefault5 = parseProxyResponse && parseProxyResponse.__importDefault || function(mod2) {
    return mod2 && mod2.__esModule ? mod2 : { "default": mod2 };
  };
  Object.defineProperty(parseProxyResponse, "__esModule", { value: true });
  parseProxyResponse.parseProxyResponse = void 0;
  const debug_12 = __importDefault5(requireSrc());
  const debug2 = (0, debug_12.default)("https-proxy-agent:parse-proxy-response");
  function parseProxyResponse$1(socket) {
    return new Promise((resolve2, reject) => {
      let buffersLength = 0;
      const buffers = [];
      function read() {
        const b = socket.read();
        if (b)
          ondata(b);
        else
          socket.once("readable", read);
      }
      function cleanup() {
        socket.removeListener("end", onend);
        socket.removeListener("error", onerror);
        socket.removeListener("readable", read);
      }
      function onend() {
        cleanup();
        debug2("onend");
        reject(new Error("Proxy connection ended before receiving CONNECT response"));
      }
      function onerror(err) {
        cleanup();
        debug2("onerror %o", err);
        reject(err);
      }
      function ondata(b) {
        buffers.push(b);
        buffersLength += b.length;
        const buffered = Buffer.concat(buffers, buffersLength);
        const endOfHeaders = buffered.indexOf("\r\n\r\n");
        if (endOfHeaders === -1) {
          debug2("have not received end of HTTP headers yet...");
          read();
          return;
        }
        const headerParts = buffered.slice(0, endOfHeaders).toString("ascii").split("\r\n");
        const firstLine = headerParts.shift();
        if (!firstLine) {
          socket.destroy();
          return reject(new Error("No header received from proxy CONNECT response"));
        }
        const firstLineParts = firstLine.split(" ");
        const statusCode = +firstLineParts[1];
        const statusText = firstLineParts.slice(2).join(" ");
        const headers = {};
        for (const header of headerParts) {
          if (!header)
            continue;
          const firstColon = header.indexOf(":");
          if (firstColon === -1) {
            socket.destroy();
            return reject(new Error(`Invalid header from proxy CONNECT response: "${header}"`));
          }
          const key = header.slice(0, firstColon).toLowerCase();
          const value = header.slice(firstColon + 1).trimStart();
          const current = headers[key];
          if (typeof current === "string") {
            headers[key] = [current, value];
          } else if (Array.isArray(current)) {
            current.push(value);
          } else {
            headers[key] = value;
          }
        }
        debug2("got proxy server response: %o %o", firstLine, headers);
        cleanup();
        resolve2({
          connect: {
            statusCode,
            statusText,
            headers
          },
          buffered
        });
      }
      socket.on("error", onerror);
      socket.on("end", onend);
      read();
    });
  }
  parseProxyResponse.parseProxyResponse = parseProxyResponse$1;
  return parseProxyResponse;
}
function requireDist$9() {
  if (hasRequiredDist$9) return dist$8;
  hasRequiredDist$9 = 1;
  var __createBinding5 = dist$8 && dist$8.__createBinding || (Object.create ? function(o, m, k, k2) {
    if (k2 === void 0) k2 = k;
    var desc = Object.getOwnPropertyDescriptor(m, k);
    if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
      desc = { enumerable: true, get: function() {
        return m[k];
      } };
    }
    Object.defineProperty(o, k2, desc);
  } : function(o, m, k, k2) {
    if (k2 === void 0) k2 = k;
    o[k2] = m[k];
  });
  var __setModuleDefault5 = dist$8 && dist$8.__setModuleDefault || (Object.create ? function(o, v) {
    Object.defineProperty(o, "default", { enumerable: true, value: v });
  } : function(o, v) {
    o["default"] = v;
  });
  var __importStar5 = dist$8 && dist$8.__importStar || function(mod2) {
    if (mod2 && mod2.__esModule) return mod2;
    var result = {};
    if (mod2 != null) {
      for (var k in mod2) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod2, k)) __createBinding5(result, mod2, k);
    }
    __setModuleDefault5(result, mod2);
    return result;
  };
  var __importDefault5 = dist$8 && dist$8.__importDefault || function(mod2) {
    return mod2 && mod2.__esModule ? mod2 : { "default": mod2 };
  };
  Object.defineProperty(dist$8, "__esModule", { value: true });
  dist$8.HttpsProxyAgent = void 0;
  const net = __importStar5(require$$0$7);
  const tls = __importStar5(require$$1$2);
  const assert_1 = __importDefault5(require$$2);
  const debug_12 = __importDefault5(requireSrc());
  const agent_base_1 = requireDist$b();
  const url_1 = require$$5;
  const parse_proxy_response_1 = requireParseProxyResponse();
  const debug2 = (0, debug_12.default)("https-proxy-agent");
  const setServernameFromNonIpHost = (options2) => {
    if (options2.servername === void 0 && options2.host && !net.isIP(options2.host)) {
      return {
        ...options2,
        servername: options2.host
      };
    }
    return options2;
  };
  class HttpsProxyAgent extends agent_base_1.Agent {
    constructor(proxy, opts) {
      super(opts);
      this.options = { path: void 0 };
      this.proxy = typeof proxy === "string" ? new url_1.URL(proxy) : proxy;
      this.proxyHeaders = opts?.headers ?? {};
      debug2("Creating new HttpsProxyAgent instance: %o", this.proxy.href);
      const host = (this.proxy.hostname || this.proxy.host).replace(/^\[|\]$/g, "");
      const port = this.proxy.port ? parseInt(this.proxy.port, 10) : this.proxy.protocol === "https:" ? 443 : 80;
      this.connectOpts = {
        ALPNProtocols: ["http/1.1"],
        ...opts ? omit2(opts, "headers") : null,
        host,
        port
      };
    }
    async connect(req, opts) {
      const { proxy } = this;
      if (!opts.host) {
        throw new TypeError('No "host" provided');
      }
      let socket;
      if (proxy.protocol === "https:") {
        debug2("Creating `tls.Socket`: %o", this.connectOpts);
        socket = tls.connect(setServernameFromNonIpHost(this.connectOpts));
      } else {
        debug2("Creating `net.Socket`: %o", this.connectOpts);
        socket = net.connect(this.connectOpts);
      }
      const headers = typeof this.proxyHeaders === "function" ? this.proxyHeaders() : { ...this.proxyHeaders };
      const host = net.isIPv6(opts.host) ? `[${opts.host}]` : opts.host;
      let payload = `CONNECT ${host}:${opts.port} HTTP/1.1\r
`;
      if (proxy.username || proxy.password) {
        const auth = `${decodeURIComponent(proxy.username)}:${decodeURIComponent(proxy.password)}`;
        headers["Proxy-Authorization"] = `Basic ${Buffer.from(auth).toString("base64")}`;
      }
      headers.Host = `${host}:${opts.port}`;
      if (!headers["Proxy-Connection"]) {
        headers["Proxy-Connection"] = this.keepAlive ? "Keep-Alive" : "close";
      }
      for (const name of Object.keys(headers)) {
        payload += `${name}: ${headers[name]}\r
`;
      }
      const proxyResponsePromise = (0, parse_proxy_response_1.parseProxyResponse)(socket);
      socket.write(`${payload}\r
`);
      const { connect: connect2, buffered } = await proxyResponsePromise;
      req.emit("proxyConnect", connect2);
      this.emit("proxyConnect", connect2, req);
      if (connect2.statusCode === 200) {
        req.once("socket", resume);
        if (opts.secureEndpoint) {
          debug2("Upgrading socket connection to TLS");
          return tls.connect({
            ...omit2(setServernameFromNonIpHost(opts), "host", "path", "port"),
            socket
          });
        }
        return socket;
      }
      socket.destroy();
      const fakeSocket = new net.Socket({ writable: false });
      fakeSocket.readable = true;
      req.once("socket", (s) => {
        debug2("Replaying proxy buffer for failed request");
        (0, assert_1.default)(s.listenerCount("data") > 0);
        s.push(buffered);
        s.push(null);
      });
      return fakeSocket;
    }
  }
  HttpsProxyAgent.protocols = ["http", "https"];
  dist$8.HttpsProxyAgent = HttpsProxyAgent;
  function resume(socket) {
    socket.resume();
  }
  function omit2(obj, ...keys2) {
    const ret = {};
    let key;
    for (key in obj) {
      if (!keys2.includes(key)) {
        ret[key] = obj[key];
      }
    }
    return ret;
  }
  return dist$8;
}
function requireUtils$1() {
  if (hasRequiredUtils$1) return utils$1;
  hasRequiredUtils$1 = 1;
  Object.defineProperty(utils$1, "__esModule", { value: true });
  const buffer_1 = require$$0$9;
  const ERRORS2 = {
    INVALID_ENCODING: "Invalid encoding provided. Please specify a valid encoding the internal Node.js Buffer supports.",
    INVALID_SMARTBUFFER_SIZE: "Invalid size provided. Size must be a valid integer greater than zero.",
    INVALID_SMARTBUFFER_BUFFER: "Invalid Buffer provided in SmartBufferOptions.",
    INVALID_SMARTBUFFER_OBJECT: "Invalid SmartBufferOptions object supplied to SmartBuffer constructor or factory methods.",
    INVALID_OFFSET: "An invalid offset value was provided.",
    INVALID_OFFSET_NON_NUMBER: "An invalid offset value was provided. A numeric value is required.",
    INVALID_LENGTH: "An invalid length value was provided.",
    INVALID_LENGTH_NON_NUMBER: "An invalid length value was provived. A numeric value is required.",
    INVALID_TARGET_OFFSET: "Target offset is beyond the bounds of the internal SmartBuffer data.",
    INVALID_TARGET_LENGTH: "Specified length value moves cursor beyong the bounds of the internal SmartBuffer data.",
    INVALID_READ_BEYOND_BOUNDS: "Attempted to read beyond the bounds of the managed data.",
    INVALID_WRITE_BEYOND_BOUNDS: "Attempted to write beyond the bounds of the managed data."
  };
  utils$1.ERRORS = ERRORS2;
  function checkEncoding(encoding) {
    if (!buffer_1.Buffer.isEncoding(encoding)) {
      throw new Error(ERRORS2.INVALID_ENCODING);
    }
  }
  utils$1.checkEncoding = checkEncoding;
  function isFiniteInteger(value) {
    return typeof value === "number" && isFinite(value) && isInteger(value);
  }
  utils$1.isFiniteInteger = isFiniteInteger;
  function checkOffsetOrLengthValue(value, offset) {
    if (typeof value === "number") {
      if (!isFiniteInteger(value) || value < 0) {
        throw new Error(offset ? ERRORS2.INVALID_OFFSET : ERRORS2.INVALID_LENGTH);
      }
    } else {
      throw new Error(offset ? ERRORS2.INVALID_OFFSET_NON_NUMBER : ERRORS2.INVALID_LENGTH_NON_NUMBER);
    }
  }
  function checkLengthValue(length) {
    checkOffsetOrLengthValue(length, false);
  }
  utils$1.checkLengthValue = checkLengthValue;
  function checkOffsetValue(offset) {
    checkOffsetOrLengthValue(offset, true);
  }
  utils$1.checkOffsetValue = checkOffsetValue;
  function checkTargetOffset(offset, buff) {
    if (offset < 0 || offset > buff.length) {
      throw new Error(ERRORS2.INVALID_TARGET_OFFSET);
    }
  }
  utils$1.checkTargetOffset = checkTargetOffset;
  function isInteger(value) {
    return typeof value === "number" && isFinite(value) && Math.floor(value) === value;
  }
  function bigIntAndBufferInt64Check(bufferMethod) {
    if (typeof BigInt === "undefined") {
      throw new Error("Platform does not support JS BigInt type.");
    }
    if (typeof buffer_1.Buffer.prototype[bufferMethod] === "undefined") {
      throw new Error(`Platform does not support Buffer.prototype.${bufferMethod}.`);
    }
  }
  utils$1.bigIntAndBufferInt64Check = bigIntAndBufferInt64Check;
  return utils$1;
}
function requireSmartbuffer() {
  if (hasRequiredSmartbuffer) return smartbuffer;
  hasRequiredSmartbuffer = 1;
  Object.defineProperty(smartbuffer, "__esModule", { value: true });
  const utils_1 = requireUtils$1();
  const DEFAULT_SMARTBUFFER_SIZE = 4096;
  const DEFAULT_SMARTBUFFER_ENCODING = "utf8";
  class SmartBuffer {
    constructor(options2) {
      this.length = 0;
      this._encoding = DEFAULT_SMARTBUFFER_ENCODING;
      this._writeOffset = 0;
      this._readOffset = 0;
      if (SmartBuffer.isSmartBufferOptions(options2)) {
        if (options2.encoding) {
          utils_1.checkEncoding(options2.encoding);
          this._encoding = options2.encoding;
        }
        if (options2.size) {
          if (utils_1.isFiniteInteger(options2.size) && options2.size > 0) {
            this._buff = Buffer.allocUnsafe(options2.size);
          } else {
            throw new Error(utils_1.ERRORS.INVALID_SMARTBUFFER_SIZE);
          }
        } else if (options2.buff) {
          if (Buffer.isBuffer(options2.buff)) {
            this._buff = options2.buff;
            this.length = options2.buff.length;
          } else {
            throw new Error(utils_1.ERRORS.INVALID_SMARTBUFFER_BUFFER);
          }
        } else {
          this._buff = Buffer.allocUnsafe(DEFAULT_SMARTBUFFER_SIZE);
        }
      } else {
        if (typeof options2 !== "undefined") {
          throw new Error(utils_1.ERRORS.INVALID_SMARTBUFFER_OBJECT);
        }
        this._buff = Buffer.allocUnsafe(DEFAULT_SMARTBUFFER_SIZE);
      }
    }
    static fromSize(size, encoding) {
      return new this({
        size,
        encoding
      });
    }
    static fromBuffer(buff, encoding) {
      return new this({
        buff,
        encoding
      });
    }
    static fromOptions(options2) {
      return new this(options2);
    }
    static isSmartBufferOptions(options2) {
      const castOptions = options2;
      return castOptions && (castOptions.encoding !== void 0 || castOptions.size !== void 0 || castOptions.buff !== void 0);
    }
    readInt8(offset) {
      return this._readNumberValue(Buffer.prototype.readInt8, 1, offset);
    }
    readInt16BE(offset) {
      return this._readNumberValue(Buffer.prototype.readInt16BE, 2, offset);
    }
    readInt16LE(offset) {
      return this._readNumberValue(Buffer.prototype.readInt16LE, 2, offset);
    }
    readInt32BE(offset) {
      return this._readNumberValue(Buffer.prototype.readInt32BE, 4, offset);
    }
    readInt32LE(offset) {
      return this._readNumberValue(Buffer.prototype.readInt32LE, 4, offset);
    }
    readBigInt64BE(offset) {
      utils_1.bigIntAndBufferInt64Check("readBigInt64BE");
      return this._readNumberValue(Buffer.prototype.readBigInt64BE, 8, offset);
    }
    readBigInt64LE(offset) {
      utils_1.bigIntAndBufferInt64Check("readBigInt64LE");
      return this._readNumberValue(Buffer.prototype.readBigInt64LE, 8, offset);
    }
    writeInt8(value, offset) {
      this._writeNumberValue(Buffer.prototype.writeInt8, 1, value, offset);
      return this;
    }
    insertInt8(value, offset) {
      return this._insertNumberValue(Buffer.prototype.writeInt8, 1, value, offset);
    }
    writeInt16BE(value, offset) {
      return this._writeNumberValue(Buffer.prototype.writeInt16BE, 2, value, offset);
    }
    insertInt16BE(value, offset) {
      return this._insertNumberValue(Buffer.prototype.writeInt16BE, 2, value, offset);
    }
    writeInt16LE(value, offset) {
      return this._writeNumberValue(Buffer.prototype.writeInt16LE, 2, value, offset);
    }
    insertInt16LE(value, offset) {
      return this._insertNumberValue(Buffer.prototype.writeInt16LE, 2, value, offset);
    }
    writeInt32BE(value, offset) {
      return this._writeNumberValue(Buffer.prototype.writeInt32BE, 4, value, offset);
    }
    insertInt32BE(value, offset) {
      return this._insertNumberValue(Buffer.prototype.writeInt32BE, 4, value, offset);
    }
    writeInt32LE(value, offset) {
      return this._writeNumberValue(Buffer.prototype.writeInt32LE, 4, value, offset);
    }
    insertInt32LE(value, offset) {
      return this._insertNumberValue(Buffer.prototype.writeInt32LE, 4, value, offset);
    }
    writeBigInt64BE(value, offset) {
      utils_1.bigIntAndBufferInt64Check("writeBigInt64BE");
      return this._writeNumberValue(Buffer.prototype.writeBigInt64BE, 8, value, offset);
    }
    insertBigInt64BE(value, offset) {
      utils_1.bigIntAndBufferInt64Check("writeBigInt64BE");
      return this._insertNumberValue(Buffer.prototype.writeBigInt64BE, 8, value, offset);
    }
    writeBigInt64LE(value, offset) {
      utils_1.bigIntAndBufferInt64Check("writeBigInt64LE");
      return this._writeNumberValue(Buffer.prototype.writeBigInt64LE, 8, value, offset);
    }
    insertBigInt64LE(value, offset) {
      utils_1.bigIntAndBufferInt64Check("writeBigInt64LE");
      return this._insertNumberValue(Buffer.prototype.writeBigInt64LE, 8, value, offset);
    }
    readUInt8(offset) {
      return this._readNumberValue(Buffer.prototype.readUInt8, 1, offset);
    }
    readUInt16BE(offset) {
      return this._readNumberValue(Buffer.prototype.readUInt16BE, 2, offset);
    }
    readUInt16LE(offset) {
      return this._readNumberValue(Buffer.prototype.readUInt16LE, 2, offset);
    }
    readUInt32BE(offset) {
      return this._readNumberValue(Buffer.prototype.readUInt32BE, 4, offset);
    }
    readUInt32LE(offset) {
      return this._readNumberValue(Buffer.prototype.readUInt32LE, 4, offset);
    }
    readBigUInt64BE(offset) {
      utils_1.bigIntAndBufferInt64Check("readBigUInt64BE");
      return this._readNumberValue(Buffer.prototype.readBigUInt64BE, 8, offset);
    }
    readBigUInt64LE(offset) {
      utils_1.bigIntAndBufferInt64Check("readBigUInt64LE");
      return this._readNumberValue(Buffer.prototype.readBigUInt64LE, 8, offset);
    }
    writeUInt8(value, offset) {
      return this._writeNumberValue(Buffer.prototype.writeUInt8, 1, value, offset);
    }
    insertUInt8(value, offset) {
      return this._insertNumberValue(Buffer.prototype.writeUInt8, 1, value, offset);
    }
    writeUInt16BE(value, offset) {
      return this._writeNumberValue(Buffer.prototype.writeUInt16BE, 2, value, offset);
    }
    insertUInt16BE(value, offset) {
      return this._insertNumberValue(Buffer.prototype.writeUInt16BE, 2, value, offset);
    }
    writeUInt16LE(value, offset) {
      return this._writeNumberValue(Buffer.prototype.writeUInt16LE, 2, value, offset);
    }
    insertUInt16LE(value, offset) {
      return this._insertNumberValue(Buffer.prototype.writeUInt16LE, 2, value, offset);
    }
    writeUInt32BE(value, offset) {
      return this._writeNumberValue(Buffer.prototype.writeUInt32BE, 4, value, offset);
    }
    insertUInt32BE(value, offset) {
      return this._insertNumberValue(Buffer.prototype.writeUInt32BE, 4, value, offset);
    }
    writeUInt32LE(value, offset) {
      return this._writeNumberValue(Buffer.prototype.writeUInt32LE, 4, value, offset);
    }
    insertUInt32LE(value, offset) {
      return this._insertNumberValue(Buffer.prototype.writeUInt32LE, 4, value, offset);
    }
    writeBigUInt64BE(value, offset) {
      utils_1.bigIntAndBufferInt64Check("writeBigUInt64BE");
      return this._writeNumberValue(Buffer.prototype.writeBigUInt64BE, 8, value, offset);
    }
    insertBigUInt64BE(value, offset) {
      utils_1.bigIntAndBufferInt64Check("writeBigUInt64BE");
      return this._insertNumberValue(Buffer.prototype.writeBigUInt64BE, 8, value, offset);
    }
    writeBigUInt64LE(value, offset) {
      utils_1.bigIntAndBufferInt64Check("writeBigUInt64LE");
      return this._writeNumberValue(Buffer.prototype.writeBigUInt64LE, 8, value, offset);
    }
    insertBigUInt64LE(value, offset) {
      utils_1.bigIntAndBufferInt64Check("writeBigUInt64LE");
      return this._insertNumberValue(Buffer.prototype.writeBigUInt64LE, 8, value, offset);
    }
    readFloatBE(offset) {
      return this._readNumberValue(Buffer.prototype.readFloatBE, 4, offset);
    }
    readFloatLE(offset) {
      return this._readNumberValue(Buffer.prototype.readFloatLE, 4, offset);
    }
    writeFloatBE(value, offset) {
      return this._writeNumberValue(Buffer.prototype.writeFloatBE, 4, value, offset);
    }
    insertFloatBE(value, offset) {
      return this._insertNumberValue(Buffer.prototype.writeFloatBE, 4, value, offset);
    }
    writeFloatLE(value, offset) {
      return this._writeNumberValue(Buffer.prototype.writeFloatLE, 4, value, offset);
    }
    insertFloatLE(value, offset) {
      return this._insertNumberValue(Buffer.prototype.writeFloatLE, 4, value, offset);
    }
    readDoubleBE(offset) {
      return this._readNumberValue(Buffer.prototype.readDoubleBE, 8, offset);
    }
    readDoubleLE(offset) {
      return this._readNumberValue(Buffer.prototype.readDoubleLE, 8, offset);
    }
    writeDoubleBE(value, offset) {
      return this._writeNumberValue(Buffer.prototype.writeDoubleBE, 8, value, offset);
    }
    insertDoubleBE(value, offset) {
      return this._insertNumberValue(Buffer.prototype.writeDoubleBE, 8, value, offset);
    }
    writeDoubleLE(value, offset) {
      return this._writeNumberValue(Buffer.prototype.writeDoubleLE, 8, value, offset);
    }
    insertDoubleLE(value, offset) {
      return this._insertNumberValue(Buffer.prototype.writeDoubleLE, 8, value, offset);
    }
    readString(arg1, encoding) {
      let lengthVal;
      if (typeof arg1 === "number") {
        utils_1.checkLengthValue(arg1);
        lengthVal = Math.min(arg1, this.length - this._readOffset);
      } else {
        encoding = arg1;
        lengthVal = this.length - this._readOffset;
      }
      if (typeof encoding !== "undefined") {
        utils_1.checkEncoding(encoding);
      }
      const value = this._buff.slice(this._readOffset, this._readOffset + lengthVal).toString(encoding || this._encoding);
      this._readOffset += lengthVal;
      return value;
    }
    insertString(value, offset, encoding) {
      utils_1.checkOffsetValue(offset);
      return this._handleString(value, true, offset, encoding);
    }
    writeString(value, arg2, encoding) {
      return this._handleString(value, false, arg2, encoding);
    }
    readStringNT(encoding) {
      if (typeof encoding !== "undefined") {
        utils_1.checkEncoding(encoding);
      }
      let nullPos = this.length;
      for (let i = this._readOffset; i < this.length; i++) {
        if (this._buff[i] === 0) {
          nullPos = i;
          break;
        }
      }
      const value = this._buff.slice(this._readOffset, nullPos);
      this._readOffset = nullPos + 1;
      return value.toString(encoding || this._encoding);
    }
    insertStringNT(value, offset, encoding) {
      utils_1.checkOffsetValue(offset);
      this.insertString(value, offset, encoding);
      this.insertUInt8(0, offset + value.length);
      return this;
    }
    writeStringNT(value, arg2, encoding) {
      this.writeString(value, arg2, encoding);
      this.writeUInt8(0, typeof arg2 === "number" ? arg2 + value.length : this.writeOffset);
      return this;
    }
    readBuffer(length) {
      if (typeof length !== "undefined") {
        utils_1.checkLengthValue(length);
      }
      const lengthVal = typeof length === "number" ? length : this.length;
      const endPoint = Math.min(this.length, this._readOffset + lengthVal);
      const value = this._buff.slice(this._readOffset, endPoint);
      this._readOffset = endPoint;
      return value;
    }
    insertBuffer(value, offset) {
      utils_1.checkOffsetValue(offset);
      return this._handleBuffer(value, true, offset);
    }
    writeBuffer(value, offset) {
      return this._handleBuffer(value, false, offset);
    }
    readBufferNT() {
      let nullPos = this.length;
      for (let i = this._readOffset; i < this.length; i++) {
        if (this._buff[i] === 0) {
          nullPos = i;
          break;
        }
      }
      const value = this._buff.slice(this._readOffset, nullPos);
      this._readOffset = nullPos + 1;
      return value;
    }
    insertBufferNT(value, offset) {
      utils_1.checkOffsetValue(offset);
      this.insertBuffer(value, offset);
      this.insertUInt8(0, offset + value.length);
      return this;
    }
    writeBufferNT(value, offset) {
      if (typeof offset !== "undefined") {
        utils_1.checkOffsetValue(offset);
      }
      this.writeBuffer(value, offset);
      this.writeUInt8(0, typeof offset === "number" ? offset + value.length : this._writeOffset);
      return this;
    }
    clear() {
      this._writeOffset = 0;
      this._readOffset = 0;
      this.length = 0;
      return this;
    }
    remaining() {
      return this.length - this._readOffset;
    }
    get readOffset() {
      return this._readOffset;
    }
    set readOffset(offset) {
      utils_1.checkOffsetValue(offset);
      utils_1.checkTargetOffset(offset, this);
      this._readOffset = offset;
    }
    get writeOffset() {
      return this._writeOffset;
    }
    set writeOffset(offset) {
      utils_1.checkOffsetValue(offset);
      utils_1.checkTargetOffset(offset, this);
      this._writeOffset = offset;
    }
    get encoding() {
      return this._encoding;
    }
    set encoding(encoding) {
      utils_1.checkEncoding(encoding);
      this._encoding = encoding;
    }
    get internalBuffer() {
      return this._buff;
    }
    toBuffer() {
      return this._buff.slice(0, this.length);
    }
    toString(encoding) {
      const encodingVal = typeof encoding === "string" ? encoding : this._encoding;
      utils_1.checkEncoding(encodingVal);
      return this._buff.toString(encodingVal, 0, this.length);
    }
    destroy() {
      this.clear();
      return this;
    }
    _handleString(value, isInsert, arg3, encoding) {
      let offsetVal = this._writeOffset;
      let encodingVal = this._encoding;
      if (typeof arg3 === "number") {
        offsetVal = arg3;
      } else if (typeof arg3 === "string") {
        utils_1.checkEncoding(arg3);
        encodingVal = arg3;
      }
      if (typeof encoding === "string") {
        utils_1.checkEncoding(encoding);
        encodingVal = encoding;
      }
      const byteLength = Buffer.byteLength(value, encodingVal);
      if (isInsert) {
        this.ensureInsertable(byteLength, offsetVal);
      } else {
        this._ensureWriteable(byteLength, offsetVal);
      }
      this._buff.write(value, offsetVal, byteLength, encodingVal);
      if (isInsert) {
        this._writeOffset += byteLength;
      } else {
        if (typeof arg3 === "number") {
          this._writeOffset = Math.max(this._writeOffset, offsetVal + byteLength);
        } else {
          this._writeOffset += byteLength;
        }
      }
      return this;
    }
    _handleBuffer(value, isInsert, offset) {
      const offsetVal = typeof offset === "number" ? offset : this._writeOffset;
      if (isInsert) {
        this.ensureInsertable(value.length, offsetVal);
      } else {
        this._ensureWriteable(value.length, offsetVal);
      }
      value.copy(this._buff, offsetVal);
      if (isInsert) {
        this._writeOffset += value.length;
      } else {
        if (typeof offset === "number") {
          this._writeOffset = Math.max(this._writeOffset, offsetVal + value.length);
        } else {
          this._writeOffset += value.length;
        }
      }
      return this;
    }
    ensureReadable(length, offset) {
      let offsetVal = this._readOffset;
      if (typeof offset !== "undefined") {
        utils_1.checkOffsetValue(offset);
        offsetVal = offset;
      }
      if (offsetVal < 0 || offsetVal + length > this.length) {
        throw new Error(utils_1.ERRORS.INVALID_READ_BEYOND_BOUNDS);
      }
    }
    ensureInsertable(dataLength, offset) {
      utils_1.checkOffsetValue(offset);
      this._ensureCapacity(this.length + dataLength);
      if (offset < this.length) {
        this._buff.copy(this._buff, offset + dataLength, offset, this._buff.length);
      }
      if (offset + dataLength > this.length) {
        this.length = offset + dataLength;
      } else {
        this.length += dataLength;
      }
    }
    _ensureWriteable(dataLength, offset) {
      const offsetVal = typeof offset === "number" ? offset : this._writeOffset;
      this._ensureCapacity(offsetVal + dataLength);
      if (offsetVal + dataLength > this.length) {
        this.length = offsetVal + dataLength;
      }
    }
    _ensureCapacity(minLength) {
      const oldLength = this._buff.length;
      if (minLength > oldLength) {
        let data32 = this._buff;
        let newLength = oldLength * 3 / 2 + 1;
        if (newLength < minLength) {
          newLength = minLength;
        }
        this._buff = Buffer.allocUnsafe(newLength);
        data32.copy(this._buff, 0, 0, oldLength);
      }
    }
    _readNumberValue(func, byteSize, offset) {
      this.ensureReadable(byteSize, offset);
      const value = func.call(this._buff, typeof offset === "number" ? offset : this._readOffset);
      if (typeof offset === "undefined") {
        this._readOffset += byteSize;
      }
      return value;
    }
    _insertNumberValue(func, byteSize, value, offset) {
      utils_1.checkOffsetValue(offset);
      this.ensureInsertable(byteSize, offset);
      func.call(this._buff, value, offset);
      this._writeOffset += byteSize;
      return this;
    }
    _writeNumberValue(func, byteSize, value, offset) {
      if (typeof offset === "number") {
        if (offset < 0) {
          throw new Error(utils_1.ERRORS.INVALID_WRITE_BEYOND_BOUNDS);
        }
        utils_1.checkOffsetValue(offset);
      }
      const offsetVal = typeof offset === "number" ? offset : this._writeOffset;
      this._ensureWriteable(byteSize, offsetVal);
      func.call(this._buff, value, offsetVal);
      if (typeof offset === "number") {
        this._writeOffset = Math.max(this._writeOffset, offsetVal + byteSize);
      } else {
        this._writeOffset += byteSize;
      }
      return this;
    }
  }
  smartbuffer.SmartBuffer = SmartBuffer;
  return smartbuffer;
}
function requireConstants$3() {
  if (hasRequiredConstants$3) return constants$3;
  hasRequiredConstants$3 = 1;
  Object.defineProperty(constants$3, "__esModule", { value: true });
  constants$3.SOCKS5_NO_ACCEPTABLE_AUTH = constants$3.SOCKS5_CUSTOM_AUTH_END = constants$3.SOCKS5_CUSTOM_AUTH_START = constants$3.SOCKS_INCOMING_PACKET_SIZES = constants$3.SocksClientState = constants$3.Socks5Response = constants$3.Socks5HostType = constants$3.Socks5Auth = constants$3.Socks4Response = constants$3.SocksCommand = constants$3.ERRORS = constants$3.DEFAULT_TIMEOUT = void 0;
  const DEFAULT_TIMEOUT3 = 3e4;
  constants$3.DEFAULT_TIMEOUT = DEFAULT_TIMEOUT3;
  const ERRORS2 = {
    InvalidSocksCommand: "An invalid SOCKS command was provided. Valid options are connect, bind, and associate.",
    InvalidSocksCommandForOperation: "An invalid SOCKS command was provided. Only a subset of commands are supported for this operation.",
    InvalidSocksCommandChain: "An invalid SOCKS command was provided. Chaining currently only supports the connect command.",
    InvalidSocksClientOptionsDestination: "An invalid destination host was provided.",
    InvalidSocksClientOptionsExistingSocket: "An invalid existing socket was provided. This should be an instance of stream.Duplex.",
    InvalidSocksClientOptionsProxy: "Invalid SOCKS proxy details were provided.",
    InvalidSocksClientOptionsTimeout: "An invalid timeout value was provided. Please enter a value above 0 (in ms).",
    InvalidSocksClientOptionsProxiesLength: "At least two socks proxies must be provided for chaining.",
    InvalidSocksClientOptionsCustomAuthRange: "Custom auth must be a value between 0x80 and 0xFE.",
    InvalidSocksClientOptionsCustomAuthOptions: "When a custom_auth_method is provided, custom_auth_request_handler, custom_auth_response_size, and custom_auth_response_handler must also be provided and valid.",
    NegotiationError: "Negotiation error",
    SocketClosed: "Socket closed",
    ProxyConnectionTimedOut: "Proxy connection timed out",
    InternalError: "SocksClient internal error (this should not happen)",
    InvalidSocks4HandshakeResponse: "Received invalid Socks4 handshake response",
    Socks4ProxyRejectedConnection: "Socks4 Proxy rejected connection",
    InvalidSocks4IncomingConnectionResponse: "Socks4 invalid incoming connection response",
    Socks4ProxyRejectedIncomingBoundConnection: "Socks4 Proxy rejected incoming bound connection",
    InvalidSocks5InitialHandshakeResponse: "Received invalid Socks5 initial handshake response",
    InvalidSocks5IntiailHandshakeSocksVersion: "Received invalid Socks5 initial handshake (invalid socks version)",
    InvalidSocks5InitialHandshakeNoAcceptedAuthType: "Received invalid Socks5 initial handshake (no accepted authentication type)",
    InvalidSocks5InitialHandshakeUnknownAuthType: "Received invalid Socks5 initial handshake (unknown authentication type)",
    Socks5AuthenticationFailed: "Socks5 Authentication failed",
    InvalidSocks5FinalHandshake: "Received invalid Socks5 final handshake response",
    InvalidSocks5FinalHandshakeRejected: "Socks5 proxy rejected connection",
    InvalidSocks5IncomingConnectionResponse: "Received invalid Socks5 incoming connection response",
    Socks5ProxyRejectedIncomingBoundConnection: "Socks5 Proxy rejected incoming bound connection"
  };
  constants$3.ERRORS = ERRORS2;
  const SOCKS_INCOMING_PACKET_SIZES = {
    Socks5InitialHandshakeResponse: 2,
    Socks5UserPassAuthenticationResponse: 2,
    Socks5ResponseHeader: 5,
    Socks5ResponseIPv4: 10,
    Socks5ResponseIPv6: 22,
    Socks5ResponseHostname: (hostNameLength) => hostNameLength + 7,
    Socks4Response: 8
  };
  constants$3.SOCKS_INCOMING_PACKET_SIZES = SOCKS_INCOMING_PACKET_SIZES;
  var SocksCommand;
  (function(SocksCommand2) {
    SocksCommand2[SocksCommand2["connect"] = 1] = "connect";
    SocksCommand2[SocksCommand2["bind"] = 2] = "bind";
    SocksCommand2[SocksCommand2["associate"] = 3] = "associate";
  })(SocksCommand || (constants$3.SocksCommand = SocksCommand = {}));
  var Socks4Response;
  (function(Socks4Response2) {
    Socks4Response2[Socks4Response2["Granted"] = 90] = "Granted";
    Socks4Response2[Socks4Response2["Failed"] = 91] = "Failed";
    Socks4Response2[Socks4Response2["Rejected"] = 92] = "Rejected";
    Socks4Response2[Socks4Response2["RejectedIdent"] = 93] = "RejectedIdent";
  })(Socks4Response || (constants$3.Socks4Response = Socks4Response = {}));
  var Socks5Auth;
  (function(Socks5Auth2) {
    Socks5Auth2[Socks5Auth2["NoAuth"] = 0] = "NoAuth";
    Socks5Auth2[Socks5Auth2["GSSApi"] = 1] = "GSSApi";
    Socks5Auth2[Socks5Auth2["UserPass"] = 2] = "UserPass";
  })(Socks5Auth || (constants$3.Socks5Auth = Socks5Auth = {}));
  const SOCKS5_CUSTOM_AUTH_START = 128;
  constants$3.SOCKS5_CUSTOM_AUTH_START = SOCKS5_CUSTOM_AUTH_START;
  const SOCKS5_CUSTOM_AUTH_END = 254;
  constants$3.SOCKS5_CUSTOM_AUTH_END = SOCKS5_CUSTOM_AUTH_END;
  const SOCKS5_NO_ACCEPTABLE_AUTH = 255;
  constants$3.SOCKS5_NO_ACCEPTABLE_AUTH = SOCKS5_NO_ACCEPTABLE_AUTH;
  var Socks5Response;
  (function(Socks5Response2) {
    Socks5Response2[Socks5Response2["Granted"] = 0] = "Granted";
    Socks5Response2[Socks5Response2["Failure"] = 1] = "Failure";
    Socks5Response2[Socks5Response2["NotAllowed"] = 2] = "NotAllowed";
    Socks5Response2[Socks5Response2["NetworkUnreachable"] = 3] = "NetworkUnreachable";
    Socks5Response2[Socks5Response2["HostUnreachable"] = 4] = "HostUnreachable";
    Socks5Response2[Socks5Response2["ConnectionRefused"] = 5] = "ConnectionRefused";
    Socks5Response2[Socks5Response2["TTLExpired"] = 6] = "TTLExpired";
    Socks5Response2[Socks5Response2["CommandNotSupported"] = 7] = "CommandNotSupported";
    Socks5Response2[Socks5Response2["AddressNotSupported"] = 8] = "AddressNotSupported";
  })(Socks5Response || (constants$3.Socks5Response = Socks5Response = {}));
  var Socks5HostType;
  (function(Socks5HostType2) {
    Socks5HostType2[Socks5HostType2["IPv4"] = 1] = "IPv4";
    Socks5HostType2[Socks5HostType2["Hostname"] = 3] = "Hostname";
    Socks5HostType2[Socks5HostType2["IPv6"] = 4] = "IPv6";
  })(Socks5HostType || (constants$3.Socks5HostType = Socks5HostType = {}));
  var SocksClientState;
  (function(SocksClientState2) {
    SocksClientState2[SocksClientState2["Created"] = 0] = "Created";
    SocksClientState2[SocksClientState2["Connecting"] = 1] = "Connecting";
    SocksClientState2[SocksClientState2["Connected"] = 2] = "Connected";
    SocksClientState2[SocksClientState2["SentInitialHandshake"] = 3] = "SentInitialHandshake";
    SocksClientState2[SocksClientState2["ReceivedInitialHandshakeResponse"] = 4] = "ReceivedInitialHandshakeResponse";
    SocksClientState2[SocksClientState2["SentAuthentication"] = 5] = "SentAuthentication";
    SocksClientState2[SocksClientState2["ReceivedAuthenticationResponse"] = 6] = "ReceivedAuthenticationResponse";
    SocksClientState2[SocksClientState2["SentFinalHandshake"] = 7] = "SentFinalHandshake";
    SocksClientState2[SocksClientState2["ReceivedFinalResponse"] = 8] = "ReceivedFinalResponse";
    SocksClientState2[SocksClientState2["BoundWaitingForConnection"] = 9] = "BoundWaitingForConnection";
    SocksClientState2[SocksClientState2["Established"] = 10] = "Established";
    SocksClientState2[SocksClientState2["Disconnected"] = 11] = "Disconnected";
    SocksClientState2[SocksClientState2["Error"] = 99] = "Error";
  })(SocksClientState || (constants$3.SocksClientState = SocksClientState = {}));
  return constants$3;
}
function requireUtil$2() {
  if (hasRequiredUtil$2) return util$2;
  hasRequiredUtil$2 = 1;
  Object.defineProperty(util$2, "__esModule", { value: true });
  util$2.shuffleArray = util$2.SocksClientError = void 0;
  class SocksClientError extends Error {
    constructor(message, options2) {
      super(message);
      this.options = options2;
    }
  }
  util$2.SocksClientError = SocksClientError;
  function shuffleArray(array2) {
    for (let i = array2.length - 1; i > 0; i--) {
      const j = Math.floor(Math.random() * (i + 1));
      [array2[i], array2[j]] = [array2[j], array2[i]];
    }
  }
  util$2.shuffleArray = shuffleArray;
  return util$2;
}
function requireCommon$1() {
  if (hasRequiredCommon$1) return common$2;
  hasRequiredCommon$1 = 1;
  Object.defineProperty(common$2, "__esModule", { value: true });
  common$2.isInSubnet = isInSubnet;
  common$2.isCorrect = isCorrect;
  common$2.numberToPaddedHex = numberToPaddedHex;
  common$2.stringToPaddedHex = stringToPaddedHex;
  common$2.testBit = testBit;
  function isInSubnet(address) {
    if (this.subnetMask < address.subnetMask) {
      return false;
    }
    if (this.mask(address.subnetMask) === address.mask()) {
      return true;
    }
    return false;
  }
  function isCorrect(defaultBits) {
    return function() {
      if (this.addressMinusSuffix !== this.correctForm()) {
        return false;
      }
      if (this.subnetMask === defaultBits && !this.parsedSubnet) {
        return true;
      }
      return this.parsedSubnet === String(this.subnetMask);
    };
  }
  function numberToPaddedHex(number2) {
    return number2.toString(16).padStart(2, "0");
  }
  function stringToPaddedHex(numberString) {
    return numberToPaddedHex(parseInt(numberString, 10));
  }
  function testBit(binaryValue, position) {
    const { length } = binaryValue;
    if (position > length) {
      return false;
    }
    const positionInString = length - position;
    return binaryValue.substring(positionInString, positionInString + 1) === "1";
  }
  return common$2;
}
function requireConstants$2() {
  if (hasRequiredConstants$2) return constants$2;
  hasRequiredConstants$2 = 1;
  Object.defineProperty(constants$2, "__esModule", { value: true });
  constants$2.RE_SUBNET_STRING = constants$2.RE_ADDRESS = constants$2.GROUPS = constants$2.BITS = void 0;
  constants$2.BITS = 32;
  constants$2.GROUPS = 4;
  constants$2.RE_ADDRESS = /^(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/g;
  constants$2.RE_SUBNET_STRING = /\/\d{1,2}$/;
  return constants$2;
}
function requireAddressError() {
  if (hasRequiredAddressError) return addressError;
  hasRequiredAddressError = 1;
  Object.defineProperty(addressError, "__esModule", { value: true });
  addressError.AddressError = void 0;
  class AddressError extends Error {
    constructor(message, parseMessage) {
      super(message);
      this.name = "AddressError";
      this.parseMessage = parseMessage;
    }
  }
  addressError.AddressError = AddressError;
  return addressError;
}
function requireIpv4() {
  if (hasRequiredIpv4) return ipv4;
  hasRequiredIpv4 = 1;
  var __createBinding5 = ipv4 && ipv4.__createBinding || (Object.create ? function(o, m, k, k2) {
    if (k2 === void 0) k2 = k;
    var desc = Object.getOwnPropertyDescriptor(m, k);
    if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
      desc = { enumerable: true, get: function() {
        return m[k];
      } };
    }
    Object.defineProperty(o, k2, desc);
  } : function(o, m, k, k2) {
    if (k2 === void 0) k2 = k;
    o[k2] = m[k];
  });
  var __setModuleDefault5 = ipv4 && ipv4.__setModuleDefault || (Object.create ? function(o, v) {
    Object.defineProperty(o, "default", { enumerable: true, value: v });
  } : function(o, v) {
    o["default"] = v;
  });
  var __importStar5 = ipv4 && ipv4.__importStar || function(mod2) {
    if (mod2 && mod2.__esModule) return mod2;
    var result = {};
    if (mod2 != null) {
      for (var k in mod2) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod2, k)) __createBinding5(result, mod2, k);
    }
    __setModuleDefault5(result, mod2);
    return result;
  };
  Object.defineProperty(ipv4, "__esModule", { value: true });
  ipv4.Address4 = void 0;
  const common2 = __importStar5(requireCommon$1());
  const constants2 = __importStar5(requireConstants$2());
  const address_error_1 = requireAddressError();
  class Address4 {
    constructor(address) {
      this.groups = constants2.GROUPS;
      this.parsedAddress = [];
      this.parsedSubnet = "";
      this.subnet = "/32";
      this.subnetMask = 32;
      this.v4 = true;
      this.isCorrect = common2.isCorrect(constants2.BITS);
      this.isInSubnet = common2.isInSubnet;
      this.address = address;
      const subnet = constants2.RE_SUBNET_STRING.exec(address);
      if (subnet) {
        this.parsedSubnet = subnet[0].replace("/", "");
        this.subnetMask = parseInt(this.parsedSubnet, 10);
        this.subnet = `/${this.subnetMask}`;
        if (this.subnetMask < 0 || this.subnetMask > constants2.BITS) {
          throw new address_error_1.AddressError("Invalid subnet mask.");
        }
        address = address.replace(constants2.RE_SUBNET_STRING, "");
      }
      this.addressMinusSuffix = address;
      this.parsedAddress = this.parse(address);
    }
    static isValid(address) {
      try {
        new Address4(address);
        return true;
      } catch (e) {
        return false;
      }
    }
    parse(address) {
      const groups = address.split(".");
      if (!address.match(constants2.RE_ADDRESS)) {
        throw new address_error_1.AddressError("Invalid IPv4 address.");
      }
      return groups;
    }
    correctForm() {
      return this.parsedAddress.map((part) => parseInt(part, 10)).join(".");
    }
    static fromHex(hex) {
      const padded = hex.replace(/:/g, "").padStart(8, "0");
      const groups = [];
      let i;
      for (i = 0; i < 8; i += 2) {
        const h = padded.slice(i, i + 2);
        groups.push(parseInt(h, 16));
      }
      return new Address4(groups.join("."));
    }
    static fromInteger(integer2) {
      return Address4.fromHex(integer2.toString(16));
    }
    static fromArpa(arpaFormAddress) {
      const leader = arpaFormAddress.replace(/(\.in-addr\.arpa)?\.$/, "");
      const address = leader.split(".").reverse().join(".");
      return new Address4(address);
    }
    toHex() {
      return this.parsedAddress.map((part) => common2.stringToPaddedHex(part)).join(":");
    }
    toArray() {
      return this.parsedAddress.map((part) => parseInt(part, 10));
    }
    toGroup6() {
      const output = [];
      let i;
      for (i = 0; i < constants2.GROUPS; i += 2) {
        output.push(`${common2.stringToPaddedHex(this.parsedAddress[i])}${common2.stringToPaddedHex(this.parsedAddress[i + 1])}`);
      }
      return output.join(":");
    }
    bigInt() {
      return BigInt(`0x${this.parsedAddress.map((n) => common2.stringToPaddedHex(n)).join("")}`);
    }
    _startAddress() {
      return BigInt(`0b${this.mask() + "0".repeat(constants2.BITS - this.subnetMask)}`);
    }
    startAddress() {
      return Address4.fromBigInt(this._startAddress());
    }
    startAddressExclusive() {
      const adjust = BigInt("1");
      return Address4.fromBigInt(this._startAddress() + adjust);
    }
    _endAddress() {
      return BigInt(`0b${this.mask() + "1".repeat(constants2.BITS - this.subnetMask)}`);
    }
    endAddress() {
      return Address4.fromBigInt(this._endAddress());
    }
    endAddressExclusive() {
      const adjust = BigInt("1");
      return Address4.fromBigInt(this._endAddress() - adjust);
    }
    static fromBigInt(bigInt) {
      return Address4.fromHex(bigInt.toString(16));
    }
    static fromByteArray(bytes2) {
      if (bytes2.length !== 4) {
        throw new address_error_1.AddressError("IPv4 addresses require exactly 4 bytes");
      }
      for (let i = 0; i < bytes2.length; i++) {
        if (!Number.isInteger(bytes2[i]) || bytes2[i] < 0 || bytes2[i] > 255) {
          throw new address_error_1.AddressError("All bytes must be integers between 0 and 255");
        }
      }
      return this.fromUnsignedByteArray(bytes2);
    }
    static fromUnsignedByteArray(bytes2) {
      if (bytes2.length !== 4) {
        throw new address_error_1.AddressError("IPv4 addresses require exactly 4 bytes");
      }
      const address = bytes2.join(".");
      return new Address4(address);
    }
    mask(mask) {
      if (mask === void 0) {
        mask = this.subnetMask;
      }
      return this.getBitsBase2(0, mask);
    }
    getBitsBase2(start, end) {
      return this.binaryZeroPad().slice(start, end);
    }
    reverseForm(options2) {
      if (!options2) {
        options2 = {};
      }
      const reversed = this.correctForm().split(".").reverse().join(".");
      if (options2.omitSuffix) {
        return reversed;
      }
      return `${reversed}.in-addr.arpa.`;
    }
    isMulticast() {
      return this.isInSubnet(new Address4("224.0.0.0/4"));
    }
    binaryZeroPad() {
      return this.bigInt().toString(2).padStart(constants2.BITS, "0");
    }
    groupForV6() {
      const segments = this.parsedAddress;
      return this.address.replace(constants2.RE_ADDRESS, `<span class="hover-group group-v4 group-6">${segments.slice(0, 2).join(".")}</span>.<span class="hover-group group-v4 group-7">${segments.slice(2, 4).join(".")}</span>`);
    }
  }
  ipv4.Address4 = Address4;
  return ipv4;
}
function requireConstants$1() {
  if (hasRequiredConstants$1) return constants$1;
  hasRequiredConstants$1 = 1;
  Object.defineProperty(constants$1, "__esModule", { value: true });
  constants$1.RE_URL_WITH_PORT = constants$1.RE_URL = constants$1.RE_ZONE_STRING = constants$1.RE_SUBNET_STRING = constants$1.RE_BAD_ADDRESS = constants$1.RE_BAD_CHARACTERS = constants$1.TYPES = constants$1.SCOPES = constants$1.GROUPS = constants$1.BITS = void 0;
  constants$1.BITS = 128;
  constants$1.GROUPS = 8;
  constants$1.SCOPES = {
    0: "Reserved",
    1: "Interface local",
    2: "Link local",
    4: "Admin local",
    5: "Site local",
    8: "Organization local",
    14: "Global",
    15: "Reserved"
  };
  constants$1.TYPES = {
    "ff01::1/128": "Multicast (All nodes on this interface)",
    "ff01::2/128": "Multicast (All routers on this interface)",
    "ff02::1/128": "Multicast (All nodes on this link)",
    "ff02::2/128": "Multicast (All routers on this link)",
    "ff05::2/128": "Multicast (All routers in this site)",
    "ff02::5/128": "Multicast (OSPFv3 AllSPF routers)",
    "ff02::6/128": "Multicast (OSPFv3 AllDR routers)",
    "ff02::9/128": "Multicast (RIP routers)",
    "ff02::a/128": "Multicast (EIGRP routers)",
    "ff02::d/128": "Multicast (PIM routers)",
    "ff02::16/128": "Multicast (MLDv2 reports)",
    "ff01::fb/128": "Multicast (mDNSv6)",
    "ff02::fb/128": "Multicast (mDNSv6)",
    "ff05::fb/128": "Multicast (mDNSv6)",
    "ff02::1:2/128": "Multicast (All DHCP servers and relay agents on this link)",
    "ff05::1:2/128": "Multicast (All DHCP servers and relay agents in this site)",
    "ff02::1:3/128": "Multicast (All DHCP servers on this link)",
    "ff05::1:3/128": "Multicast (All DHCP servers in this site)",
    "::/128": "Unspecified",
    "::1/128": "Loopback",
    "ff00::/8": "Multicast",
    "fe80::/10": "Link-local unicast"
  };
  constants$1.RE_BAD_CHARACTERS = /([^0-9a-f:/%])/gi;
  constants$1.RE_BAD_ADDRESS = /([0-9a-f]{5,}|:{3,}|[^:]:$|^:[^:]|\/$)/gi;
  constants$1.RE_SUBNET_STRING = /\/\d{1,3}(?=%|$)/;
  constants$1.RE_ZONE_STRING = /%.*$/;
  constants$1.RE_URL = /^\[{0,1}([0-9a-f:]+)\]{0,1}/;
  constants$1.RE_URL_WITH_PORT = /\[([0-9a-f:]+)\]:([0-9]{1,5})/;
  return constants$1;
}
function requireHelpers$1() {
  if (hasRequiredHelpers$1) return helpers$2;
  hasRequiredHelpers$1 = 1;
  Object.defineProperty(helpers$2, "__esModule", { value: true });
  helpers$2.spanAllZeroes = spanAllZeroes;
  helpers$2.spanAll = spanAll;
  helpers$2.spanLeadingZeroes = spanLeadingZeroes;
  helpers$2.simpleGroup = simpleGroup;
  function spanAllZeroes(s) {
    return s.replace(/(0+)/g, '<span class="zero">$1</span>');
  }
  function spanAll(s, offset = 0) {
    const letters = s.split("");
    return letters.map((n, i) => `<span class="digit value-${n} position-${i + offset}">${spanAllZeroes(n)}</span>`).join("");
  }
  function spanLeadingZeroesSimple(group) {
    return group.replace(/^(0+)/, '<span class="zero">$1</span>');
  }
  function spanLeadingZeroes(address) {
    const groups = address.split(":");
    return groups.map((g) => spanLeadingZeroesSimple(g)).join(":");
  }
  function simpleGroup(addressString, offset = 0) {
    const groups = addressString.split(":");
    return groups.map((g, i) => {
      if (/group-v4/.test(g)) {
        return g;
      }
      return `<span class="hover-group group-${i + offset}">${spanLeadingZeroesSimple(g)}</span>`;
    });
  }
  return helpers$2;
}
function requireRegularExpressions() {
  if (hasRequiredRegularExpressions) return regularExpressions;
  hasRequiredRegularExpressions = 1;
  var __createBinding5 = regularExpressions && regularExpressions.__createBinding || (Object.create ? function(o, m, k, k2) {
    if (k2 === void 0) k2 = k;
    var desc = Object.getOwnPropertyDescriptor(m, k);
    if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
      desc = { enumerable: true, get: function() {
        return m[k];
      } };
    }
    Object.defineProperty(o, k2, desc);
  } : function(o, m, k, k2) {
    if (k2 === void 0) k2 = k;
    o[k2] = m[k];
  });
  var __setModuleDefault5 = regularExpressions && regularExpressions.__setModuleDefault || (Object.create ? function(o, v) {
    Object.defineProperty(o, "default", { enumerable: true, value: v });
  } : function(o, v) {
    o["default"] = v;
  });
  var __importStar5 = regularExpressions && regularExpressions.__importStar || function(mod2) {
    if (mod2 && mod2.__esModule) return mod2;
    var result = {};
    if (mod2 != null) {
      for (var k in mod2) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod2, k)) __createBinding5(result, mod2, k);
    }
    __setModuleDefault5(result, mod2);
    return result;
  };
  Object.defineProperty(regularExpressions, "__esModule", { value: true });
  regularExpressions.ADDRESS_BOUNDARY = void 0;
  regularExpressions.groupPossibilities = groupPossibilities;
  regularExpressions.padGroup = padGroup;
  regularExpressions.simpleRegularExpression = simpleRegularExpression;
  regularExpressions.possibleElisions = possibleElisions;
  const v6 = __importStar5(requireConstants$1());
  function groupPossibilities(possibilities) {
    return `(${possibilities.join("|")})`;
  }
  function padGroup(group) {
    if (group.length < 4) {
      return `0{0,${4 - group.length}}${group}`;
    }
    return group;
  }
  regularExpressions.ADDRESS_BOUNDARY = "[^A-Fa-f0-9:]";
  function simpleRegularExpression(groups) {
    const zeroIndexes = [];
    groups.forEach((group, i) => {
      const groupInteger = parseInt(group, 16);
      if (groupInteger === 0) {
        zeroIndexes.push(i);
      }
    });
    const possibilities = zeroIndexes.map((zeroIndex) => groups.map((group, i) => {
      if (i === zeroIndex) {
        const elision = i === 0 || i === v6.GROUPS - 1 ? ":" : "";
        return groupPossibilities([padGroup(group), elision]);
      }
      return padGroup(group);
    }).join(":"));
    possibilities.push(groups.map(padGroup).join(":"));
    return groupPossibilities(possibilities);
  }
  function possibleElisions(elidedGroups, moreLeft, moreRight) {
    const left2 = moreLeft ? "" : ":";
    const right2 = moreRight ? "" : ":";
    const possibilities = [];
    if (!moreLeft && !moreRight) {
      possibilities.push("::");
    }
    if (moreLeft && moreRight) {
      possibilities.push("");
    }
    if (moreRight && !moreLeft || !moreRight && moreLeft) {
      possibilities.push(":");
    }
    possibilities.push(`${left2}(:0{1,4}){1,${elidedGroups - 1}}`);
    possibilities.push(`(0{1,4}:){1,${elidedGroups - 1}}${right2}`);
    possibilities.push(`(0{1,4}:){${elidedGroups - 1}}0{1,4}`);
    for (let groups = 1; groups < elidedGroups - 1; groups++) {
      for (let position = 1; position < elidedGroups - groups; position++) {
        possibilities.push(`(0{1,4}:){${position}}:(0{1,4}:){${elidedGroups - position - groups - 1}}0{1,4}`);
      }
    }
    return groupPossibilities(possibilities);
  }
  return regularExpressions;
}
function requireIpv6() {
  if (hasRequiredIpv6) return ipv6;
  hasRequiredIpv6 = 1;
  var __createBinding5 = ipv6 && ipv6.__createBinding || (Object.create ? function(o, m, k, k2) {
    if (k2 === void 0) k2 = k;
    var desc = Object.getOwnPropertyDescriptor(m, k);
    if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
      desc = { enumerable: true, get: function() {
        return m[k];
      } };
    }
    Object.defineProperty(o, k2, desc);
  } : function(o, m, k, k2) {
    if (k2 === void 0) k2 = k;
    o[k2] = m[k];
  });
  var __setModuleDefault5 = ipv6 && ipv6.__setModuleDefault || (Object.create ? function(o, v) {
    Object.defineProperty(o, "default", { enumerable: true, value: v });
  } : function(o, v) {
    o["default"] = v;
  });
  var __importStar5 = ipv6 && ipv6.__importStar || function(mod2) {
    if (mod2 && mod2.__esModule) return mod2;
    var result = {};
    if (mod2 != null) {
      for (var k in mod2) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod2, k)) __createBinding5(result, mod2, k);
    }
    __setModuleDefault5(result, mod2);
    return result;
  };
  Object.defineProperty(ipv6, "__esModule", { value: true });
  ipv6.Address6 = void 0;
  const common2 = __importStar5(requireCommon$1());
  const constants4 = __importStar5(requireConstants$2());
  const constants6 = __importStar5(requireConstants$1());
  const helpers2 = __importStar5(requireHelpers$1());
  const ipv4_1 = requireIpv4();
  const regular_expressions_1 = requireRegularExpressions();
  const address_error_1 = requireAddressError();
  const common_1 = requireCommon$1();
  function assert2(condition) {
    if (!condition) {
      throw new Error("Assertion failed.");
    }
  }
  function addCommas(number2) {
    const r = /(\d+)(\d{3})/;
    while (r.test(number2)) {
      number2 = number2.replace(r, "$1,$2");
    }
    return number2;
  }
  function spanLeadingZeroes4(n) {
    n = n.replace(/^(0{1,})([1-9]+)$/, '<span class="parse-error">$1</span>$2');
    n = n.replace(/^(0{1,})(0)$/, '<span class="parse-error">$1</span>$2');
    return n;
  }
  function compact(address, slice) {
    const s1 = [];
    const s2 = [];
    let i;
    for (i = 0; i < address.length; i++) {
      if (i < slice[0]) {
        s1.push(address[i]);
      } else if (i > slice[1]) {
        s2.push(address[i]);
      }
    }
    return s1.concat(["compact"]).concat(s2);
  }
  function paddedHex(octet) {
    return parseInt(octet, 16).toString(16).padStart(4, "0");
  }
  function unsignByte(b) {
    return b & 255;
  }
  class Address6 {
    constructor(address, optionalGroups) {
      this.addressMinusSuffix = "";
      this.parsedSubnet = "";
      this.subnet = "/128";
      this.subnetMask = 128;
      this.v4 = false;
      this.zone = "";
      this.isInSubnet = common2.isInSubnet;
      this.isCorrect = common2.isCorrect(constants6.BITS);
      if (optionalGroups === void 0) {
        this.groups = constants6.GROUPS;
      } else {
        this.groups = optionalGroups;
      }
      this.address = address;
      const subnet = constants6.RE_SUBNET_STRING.exec(address);
      if (subnet) {
        this.parsedSubnet = subnet[0].replace("/", "");
        this.subnetMask = parseInt(this.parsedSubnet, 10);
        this.subnet = `/${this.subnetMask}`;
        if (Number.isNaN(this.subnetMask) || this.subnetMask < 0 || this.subnetMask > constants6.BITS) {
          throw new address_error_1.AddressError("Invalid subnet mask.");
        }
        address = address.replace(constants6.RE_SUBNET_STRING, "");
      } else if (/\//.test(address)) {
        throw new address_error_1.AddressError("Invalid subnet mask.");
      }
      const zone = constants6.RE_ZONE_STRING.exec(address);
      if (zone) {
        this.zone = zone[0];
        address = address.replace(constants6.RE_ZONE_STRING, "");
      }
      this.addressMinusSuffix = address;
      this.parsedAddress = this.parse(this.addressMinusSuffix);
    }
    static isValid(address) {
      try {
        new Address6(address);
        return true;
      } catch (e) {
        return false;
      }
    }
    static fromBigInt(bigInt) {
      const hex = bigInt.toString(16).padStart(32, "0");
      const groups = [];
      let i;
      for (i = 0; i < constants6.GROUPS; i++) {
        groups.push(hex.slice(i * 4, (i + 1) * 4));
      }
      return new Address6(groups.join(":"));
    }
    static fromURL(url) {
      let host;
      let port = null;
      let result;
      if (url.indexOf("[") !== -1 && url.indexOf("]:") !== -1) {
        result = constants6.RE_URL_WITH_PORT.exec(url);
        if (result === null) {
          return {
            error: "failed to parse address with port",
            address: null,
            port: null
          };
        }
        host = result[1];
        port = result[2];
      } else if (url.indexOf("/") !== -1) {
        url = url.replace(/^[a-z0-9]+:\/\//, "");
        result = constants6.RE_URL.exec(url);
        if (result === null) {
          return {
            error: "failed to parse address from URL",
            address: null,
            port: null
          };
        }
        host = result[1];
      } else {
        host = url;
      }
      if (port) {
        port = parseInt(port, 10);
        if (port < 0 || port > 65536) {
          port = null;
        }
      } else {
        port = null;
      }
      return {
        address: new Address6(host),
        port
      };
    }
    static fromAddress4(address) {
      const address4 = new ipv4_1.Address4(address);
      const mask6 = constants6.BITS - (constants4.BITS - address4.subnetMask);
      return new Address6(`::ffff:${address4.correctForm()}/${mask6}`);
    }
    static fromArpa(arpaFormAddress) {
      let address = arpaFormAddress.replace(/(\.ip6\.arpa)?\.$/, "");
      const semicolonAmount = 7;
      if (address.length !== 63) {
        throw new address_error_1.AddressError("Invalid 'ip6.arpa' form.");
      }
      const parts = address.split(".").reverse();
      for (let i = semicolonAmount; i > 0; i--) {
        const insertIndex = i * 4;
        parts.splice(insertIndex, 0, ":");
      }
      address = parts.join("");
      return new Address6(address);
    }
    microsoftTranscription() {
      return `${this.correctForm().replace(/:/g, "-")}.ipv6-literal.net`;
    }
    mask(mask = this.subnetMask) {
      return this.getBitsBase2(0, mask);
    }
    possibleSubnets(subnetSize = 128) {
      const availableBits = constants6.BITS - this.subnetMask;
      const subnetBits = Math.abs(subnetSize - constants6.BITS);
      const subnetPowers = availableBits - subnetBits;
      if (subnetPowers < 0) {
        return "0";
      }
      return addCommas((BigInt("2") ** BigInt(subnetPowers)).toString(10));
    }
    _startAddress() {
      return BigInt(`0b${this.mask() + "0".repeat(constants6.BITS - this.subnetMask)}`);
    }
    startAddress() {
      return Address6.fromBigInt(this._startAddress());
    }
    startAddressExclusive() {
      const adjust = BigInt("1");
      return Address6.fromBigInt(this._startAddress() + adjust);
    }
    _endAddress() {
      return BigInt(`0b${this.mask() + "1".repeat(constants6.BITS - this.subnetMask)}`);
    }
    endAddress() {
      return Address6.fromBigInt(this._endAddress());
    }
    endAddressExclusive() {
      const adjust = BigInt("1");
      return Address6.fromBigInt(this._endAddress() - adjust);
    }
    getScope() {
      let scope2 = constants6.SCOPES[parseInt(this.getBits(12, 16).toString(10), 10)];
      if (this.getType() === "Global unicast" && scope2 !== "Link local") {
        scope2 = "Global";
      }
      return scope2 || "Unknown";
    }
    getType() {
      for (const subnet of Object.keys(constants6.TYPES)) {
        if (this.isInSubnet(new Address6(subnet))) {
          return constants6.TYPES[subnet];
        }
      }
      return "Global unicast";
    }
    getBits(start, end) {
      return BigInt(`0b${this.getBitsBase2(start, end)}`);
    }
    getBitsBase2(start, end) {
      return this.binaryZeroPad().slice(start, end);
    }
    getBitsBase16(start, end) {
      const length = end - start;
      if (length % 4 !== 0) {
        throw new Error("Length of bits to retrieve must be divisible by four");
      }
      return this.getBits(start, end).toString(16).padStart(length / 4, "0");
    }
    getBitsPastSubnet() {
      return this.getBitsBase2(this.subnetMask, constants6.BITS);
    }
    reverseForm(options2) {
      if (!options2) {
        options2 = {};
      }
      const characters = Math.floor(this.subnetMask / 4);
      const reversed = this.canonicalForm().replace(/:/g, "").split("").slice(0, characters).reverse().join(".");
      if (characters > 0) {
        if (options2.omitSuffix) {
          return reversed;
        }
        return `${reversed}.ip6.arpa.`;
      }
      if (options2.omitSuffix) {
        return "";
      }
      return "ip6.arpa.";
    }
    correctForm() {
      let i;
      let groups = [];
      let zeroCounter = 0;
      const zeroes = [];
      for (i = 0; i < this.parsedAddress.length; i++) {
        const value = parseInt(this.parsedAddress[i], 16);
        if (value === 0) {
          zeroCounter++;
        }
        if (value !== 0 && zeroCounter > 0) {
          if (zeroCounter > 1) {
            zeroes.push([i - zeroCounter, i - 1]);
          }
          zeroCounter = 0;
        }
      }
      if (zeroCounter > 1) {
        zeroes.push([this.parsedAddress.length - zeroCounter, this.parsedAddress.length - 1]);
      }
      const zeroLengths = zeroes.map((n) => n[1] - n[0] + 1);
      if (zeroes.length > 0) {
        const index2 = zeroLengths.indexOf(Math.max(...zeroLengths));
        groups = compact(this.parsedAddress, zeroes[index2]);
      } else {
        groups = this.parsedAddress;
      }
      for (i = 0; i < groups.length; i++) {
        if (groups[i] !== "compact") {
          groups[i] = parseInt(groups[i], 16).toString(16);
        }
      }
      let correct = groups.join(":");
      correct = correct.replace(/^compact$/, "::");
      correct = correct.replace(/(^compact)|(compact$)/, ":");
      correct = correct.replace(/compact/, "");
      return correct;
    }
    binaryZeroPad() {
      return this.bigInt().toString(2).padStart(constants6.BITS, "0");
    }
    parse4in6(address) {
      const groups = address.split(":");
      const lastGroup = groups.slice(-1)[0];
      const address4 = lastGroup.match(constants4.RE_ADDRESS);
      if (address4) {
        this.parsedAddress4 = address4[0];
        this.address4 = new ipv4_1.Address4(this.parsedAddress4);
        for (let i = 0; i < this.address4.groups; i++) {
          if (/^0[0-9]+/.test(this.address4.parsedAddress[i])) {
            throw new address_error_1.AddressError("IPv4 addresses can't have leading zeroes.", address.replace(constants4.RE_ADDRESS, this.address4.parsedAddress.map(spanLeadingZeroes4).join(".")));
          }
        }
        this.v4 = true;
        groups[groups.length - 1] = this.address4.toGroup6();
        address = groups.join(":");
      }
      return address;
    }
    parse(address) {
      address = this.parse4in6(address);
      const badCharacters = address.match(constants6.RE_BAD_CHARACTERS);
      if (badCharacters) {
        throw new address_error_1.AddressError(`Bad character${badCharacters.length > 1 ? "s" : ""} detected in address: ${badCharacters.join("")}`, address.replace(constants6.RE_BAD_CHARACTERS, '<span class="parse-error">$1</span>'));
      }
      const badAddress = address.match(constants6.RE_BAD_ADDRESS);
      if (badAddress) {
        throw new address_error_1.AddressError(`Address failed regex: ${badAddress.join("")}`, address.replace(constants6.RE_BAD_ADDRESS, '<span class="parse-error">$1</span>'));
      }
      let groups = [];
      const halves = address.split("::");
      if (halves.length === 2) {
        let first2 = halves[0].split(":");
        let last2 = halves[1].split(":");
        if (first2.length === 1 && first2[0] === "") {
          first2 = [];
        }
        if (last2.length === 1 && last2[0] === "") {
          last2 = [];
        }
        const remaining = this.groups - (first2.length + last2.length);
        if (!remaining) {
          throw new address_error_1.AddressError("Error parsing groups");
        }
        this.elidedGroups = remaining;
        this.elisionBegin = first2.length;
        this.elisionEnd = first2.length + this.elidedGroups;
        groups = groups.concat(first2);
        for (let i = 0; i < remaining; i++) {
          groups.push("0");
        }
        groups = groups.concat(last2);
      } else if (halves.length === 1) {
        groups = address.split(":");
        this.elidedGroups = 0;
      } else {
        throw new address_error_1.AddressError("Too many :: groups found");
      }
      groups = groups.map((group) => parseInt(group, 16).toString(16));
      if (groups.length !== this.groups) {
        throw new address_error_1.AddressError("Incorrect number of groups found");
      }
      return groups;
    }
    canonicalForm() {
      return this.parsedAddress.map(paddedHex).join(":");
    }
    decimal() {
      return this.parsedAddress.map((n) => parseInt(n, 16).toString(10).padStart(5, "0")).join(":");
    }
    bigInt() {
      return BigInt(`0x${this.parsedAddress.map(paddedHex).join("")}`);
    }
    to4() {
      const binary = this.binaryZeroPad().split("");
      return ipv4_1.Address4.fromHex(BigInt(`0b${binary.slice(96, 128).join("")}`).toString(16));
    }
    to4in6() {
      const address4 = this.to4();
      const address6 = new Address6(this.parsedAddress.slice(0, 6).join(":"), 6);
      const correct = address6.correctForm();
      let infix = "";
      if (!/:$/.test(correct)) {
        infix = ":";
      }
      return correct + infix + address4.address;
    }
    inspectTeredo() {
      const prefix = this.getBitsBase16(0, 32);
      const bitsForUdpPort = this.getBits(80, 96);
      const udpPort = (bitsForUdpPort ^ BigInt("0xffff")).toString();
      const server4 = ipv4_1.Address4.fromHex(this.getBitsBase16(32, 64));
      const bitsForClient4 = this.getBits(96, 128);
      const client4 = ipv4_1.Address4.fromHex((bitsForClient4 ^ BigInt("0xffffffff")).toString(16));
      const flagsBase2 = this.getBitsBase2(64, 80);
      const coneNat = (0, common_1.testBit)(flagsBase2, 15);
      const reserved = (0, common_1.testBit)(flagsBase2, 14);
      const groupIndividual = (0, common_1.testBit)(flagsBase2, 8);
      const universalLocal = (0, common_1.testBit)(flagsBase2, 9);
      const nonce = BigInt(`0b${flagsBase2.slice(2, 6) + flagsBase2.slice(8, 16)}`).toString(10);
      return {
        prefix: `${prefix.slice(0, 4)}:${prefix.slice(4, 8)}`,
        server4: server4.address,
        client4: client4.address,
        flags: flagsBase2,
        coneNat,
        microsoft: {
          reserved,
          universalLocal,
          groupIndividual,
          nonce
        },
        udpPort
      };
    }
    inspect6to4() {
      const prefix = this.getBitsBase16(0, 16);
      const gateway = ipv4_1.Address4.fromHex(this.getBitsBase16(16, 48));
      return {
        prefix: prefix.slice(0, 4),
        gateway: gateway.address
      };
    }
    to6to4() {
      if (!this.is4()) {
        return null;
      }
      const addr6to4 = [
        "2002",
        this.getBitsBase16(96, 112),
        this.getBitsBase16(112, 128),
        "",
        "/16"
      ].join(":");
      return new Address6(addr6to4);
    }
    toByteArray() {
      const valueWithoutPadding = this.bigInt().toString(16);
      const leadingPad = "0".repeat(valueWithoutPadding.length % 2);
      const value = `${leadingPad}${valueWithoutPadding}`;
      const bytes2 = [];
      for (let i = 0, length = value.length; i < length; i += 2) {
        bytes2.push(parseInt(value.substring(i, i + 2), 16));
      }
      return bytes2;
    }
    toUnsignedByteArray() {
      return this.toByteArray().map(unsignByte);
    }
    static fromByteArray(bytes2) {
      return this.fromUnsignedByteArray(bytes2.map(unsignByte));
    }
    static fromUnsignedByteArray(bytes2) {
      const BYTE_MAX = BigInt("256");
      let result = BigInt("0");
      let multiplier = BigInt("1");
      for (let i = bytes2.length - 1; i >= 0; i--) {
        result += multiplier * BigInt(bytes2[i].toString(10));
        multiplier *= BYTE_MAX;
      }
      return Address6.fromBigInt(result);
    }
    isCanonical() {
      return this.addressMinusSuffix === this.canonicalForm();
    }
    isLinkLocal() {
      if (this.getBitsBase2(0, 64) === "1111111010000000000000000000000000000000000000000000000000000000") {
        return true;
      }
      return false;
    }
    isMulticast() {
      return this.getType() === "Multicast";
    }
    is4() {
      return this.v4;
    }
    isTeredo() {
      return this.isInSubnet(new Address6("2001::/32"));
    }
    is6to4() {
      return this.isInSubnet(new Address6("2002::/16"));
    }
    isLoopback() {
      return this.getType() === "Loopback";
    }
    href(optionalPort) {
      if (optionalPort === void 0) {
        optionalPort = "";
      } else {
        optionalPort = `:${optionalPort}`;
      }
      return `http://[${this.correctForm()}]${optionalPort}/`;
    }
    link(options2) {
      if (!options2) {
        options2 = {};
      }
      if (options2.className === void 0) {
        options2.className = "";
      }
      if (options2.prefix === void 0) {
        options2.prefix = "/#address=";
      }
      if (options2.v4 === void 0) {
        options2.v4 = false;
      }
      let formFunction = this.correctForm;
      if (options2.v4) {
        formFunction = this.to4in6;
      }
      const form = formFunction.call(this);
      if (options2.className) {
        return `<a href="${options2.prefix}${form}" class="${options2.className}">${form}</a>`;
      }
      return `<a href="${options2.prefix}${form}">${form}</a>`;
    }
    group() {
      if (this.elidedGroups === 0) {
        return helpers2.simpleGroup(this.address).join(":");
      }
      assert2(typeof this.elidedGroups === "number");
      assert2(typeof this.elisionBegin === "number");
      const output = [];
      const [left2, right2] = this.address.split("::");
      if (left2.length) {
        output.push(...helpers2.simpleGroup(left2));
      } else {
        output.push("");
      }
      const classes = ["hover-group"];
      for (let i = this.elisionBegin; i < this.elisionBegin + this.elidedGroups; i++) {
        classes.push(`group-${i}`);
      }
      output.push(`<span class="${classes.join(" ")}"></span>`);
      if (right2.length) {
        output.push(...helpers2.simpleGroup(right2, this.elisionEnd));
      } else {
        output.push("");
      }
      if (this.is4()) {
        assert2(this.address4 instanceof ipv4_1.Address4);
        output.pop();
        output.push(this.address4.groupForV6());
      }
      return output.join(":");
    }
    regularExpressionString(substringSearch = false) {
      let output = [];
      const address6 = new Address6(this.correctForm());
      if (address6.elidedGroups === 0) {
        output.push((0, regular_expressions_1.simpleRegularExpression)(address6.parsedAddress));
      } else if (address6.elidedGroups === constants6.GROUPS) {
        output.push((0, regular_expressions_1.possibleElisions)(constants6.GROUPS));
      } else {
        const halves = address6.address.split("::");
        if (halves[0].length) {
          output.push((0, regular_expressions_1.simpleRegularExpression)(halves[0].split(":")));
        }
        assert2(typeof address6.elidedGroups === "number");
        output.push((0, regular_expressions_1.possibleElisions)(address6.elidedGroups, halves[0].length !== 0, halves[1].length !== 0));
        if (halves[1].length) {
          output.push((0, regular_expressions_1.simpleRegularExpression)(halves[1].split(":")));
        }
        output = [output.join(":")];
      }
      if (!substringSearch) {
        output = [
          "(?=^|",
          regular_expressions_1.ADDRESS_BOUNDARY,
          "|[^\\w\\:])(",
          ...output,
          ")(?=[^\\w\\:]|",
          regular_expressions_1.ADDRESS_BOUNDARY,
          "|$)"
        ];
      }
      return output.join("");
    }
    regularExpression(substringSearch = false) {
      return new RegExp(this.regularExpressionString(substringSearch), "i");
    }
  }
  ipv6.Address6 = Address6;
  return ipv6;
}
function requireIpAddress() {
  if (hasRequiredIpAddress) return ipAddress;
  hasRequiredIpAddress = 1;
  (function(exports$1) {
    var __createBinding5 = ipAddress && ipAddress.__createBinding || (Object.create ? function(o, m, k, k2) {
      if (k2 === void 0) k2 = k;
      var desc = Object.getOwnPropertyDescriptor(m, k);
      if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
        desc = { enumerable: true, get: function() {
          return m[k];
        } };
      }
      Object.defineProperty(o, k2, desc);
    } : function(o, m, k, k2) {
      if (k2 === void 0) k2 = k;
      o[k2] = m[k];
    });
    var __setModuleDefault5 = ipAddress && ipAddress.__setModuleDefault || (Object.create ? function(o, v) {
      Object.defineProperty(o, "default", { enumerable: true, value: v });
    } : function(o, v) {
      o["default"] = v;
    });
    var __importStar5 = ipAddress && ipAddress.__importStar || function(mod2) {
      if (mod2 && mod2.__esModule) return mod2;
      var result = {};
      if (mod2 != null) {
        for (var k in mod2) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod2, k)) __createBinding5(result, mod2, k);
      }
      __setModuleDefault5(result, mod2);
      return result;
    };
    Object.defineProperty(exports$1, "__esModule", { value: true });
    exports$1.v6 = exports$1.AddressError = exports$1.Address6 = exports$1.Address4 = void 0;
    var ipv4_1 = requireIpv4();
    Object.defineProperty(exports$1, "Address4", { enumerable: true, get: function() {
      return ipv4_1.Address4;
    } });
    var ipv6_1 = requireIpv6();
    Object.defineProperty(exports$1, "Address6", { enumerable: true, get: function() {
      return ipv6_1.Address6;
    } });
    var address_error_1 = requireAddressError();
    Object.defineProperty(exports$1, "AddressError", { enumerable: true, get: function() {
      return address_error_1.AddressError;
    } });
    const helpers2 = __importStar5(requireHelpers$1());
    exports$1.v6 = { helpers: helpers2 };
  })(ipAddress);
  return ipAddress;
}
function requireHelpers() {
  if (hasRequiredHelpers) return helpers$3;
  hasRequiredHelpers = 1;
  Object.defineProperty(helpers$3, "__esModule", { value: true });
  helpers$3.ipToBuffer = helpers$3.int32ToIpv4 = helpers$3.ipv4ToInt32 = helpers$3.validateSocksClientChainOptions = helpers$3.validateSocksClientOptions = void 0;
  const util_1 = requireUtil$2();
  const constants_1 = requireConstants$3();
  const stream3 = require$$1$3;
  const ip_address_1 = requireIpAddress();
  const net = require$$0$7;
  function validateSocksClientOptions(options2, acceptedCommands = ["connect", "bind", "associate"]) {
    if (!constants_1.SocksCommand[options2.command]) {
      throw new util_1.SocksClientError(constants_1.ERRORS.InvalidSocksCommand, options2);
    }
    if (acceptedCommands.indexOf(options2.command) === -1) {
      throw new util_1.SocksClientError(constants_1.ERRORS.InvalidSocksCommandForOperation, options2);
    }
    if (!isValidSocksRemoteHost(options2.destination)) {
      throw new util_1.SocksClientError(constants_1.ERRORS.InvalidSocksClientOptionsDestination, options2);
    }
    if (!isValidSocksProxy(options2.proxy)) {
      throw new util_1.SocksClientError(constants_1.ERRORS.InvalidSocksClientOptionsProxy, options2);
    }
    validateCustomProxyAuth(options2.proxy, options2);
    if (options2.timeout && !isValidTimeoutValue(options2.timeout)) {
      throw new util_1.SocksClientError(constants_1.ERRORS.InvalidSocksClientOptionsTimeout, options2);
    }
    if (options2.existing_socket && !(options2.existing_socket instanceof stream3.Duplex)) {
      throw new util_1.SocksClientError(constants_1.ERRORS.InvalidSocksClientOptionsExistingSocket, options2);
    }
  }
  helpers$3.validateSocksClientOptions = validateSocksClientOptions;
  function validateSocksClientChainOptions(options2) {
    if (options2.command !== "connect") {
      throw new util_1.SocksClientError(constants_1.ERRORS.InvalidSocksCommandChain, options2);
    }
    if (!isValidSocksRemoteHost(options2.destination)) {
      throw new util_1.SocksClientError(constants_1.ERRORS.InvalidSocksClientOptionsDestination, options2);
    }
    if (!(options2.proxies && Array.isArray(options2.proxies) && options2.proxies.length >= 2)) {
      throw new util_1.SocksClientError(constants_1.ERRORS.InvalidSocksClientOptionsProxiesLength, options2);
    }
    options2.proxies.forEach((proxy) => {
      if (!isValidSocksProxy(proxy)) {
        throw new util_1.SocksClientError(constants_1.ERRORS.InvalidSocksClientOptionsProxy, options2);
      }
      validateCustomProxyAuth(proxy, options2);
    });
    if (options2.timeout && !isValidTimeoutValue(options2.timeout)) {
      throw new util_1.SocksClientError(constants_1.ERRORS.InvalidSocksClientOptionsTimeout, options2);
    }
  }
  helpers$3.validateSocksClientChainOptions = validateSocksClientChainOptions;
  function validateCustomProxyAuth(proxy, options2) {
    if (proxy.custom_auth_method !== void 0) {
      if (proxy.custom_auth_method < constants_1.SOCKS5_CUSTOM_AUTH_START || proxy.custom_auth_method > constants_1.SOCKS5_CUSTOM_AUTH_END) {
        throw new util_1.SocksClientError(constants_1.ERRORS.InvalidSocksClientOptionsCustomAuthRange, options2);
      }
      if (proxy.custom_auth_request_handler === void 0 || typeof proxy.custom_auth_request_handler !== "function") {
        throw new util_1.SocksClientError(constants_1.ERRORS.InvalidSocksClientOptionsCustomAuthOptions, options2);
      }
      if (proxy.custom_auth_response_size === void 0) {
        throw new util_1.SocksClientError(constants_1.ERRORS.InvalidSocksClientOptionsCustomAuthOptions, options2);
      }
      if (proxy.custom_auth_response_handler === void 0 || typeof proxy.custom_auth_response_handler !== "function") {
        throw new util_1.SocksClientError(constants_1.ERRORS.InvalidSocksClientOptionsCustomAuthOptions, options2);
      }
    }
  }
  function isValidSocksRemoteHost(remoteHost) {
    return remoteHost && typeof remoteHost.host === "string" && Buffer.byteLength(remoteHost.host) < 256 && typeof remoteHost.port === "number" && remoteHost.port >= 0 && remoteHost.port <= 65535;
  }
  function isValidSocksProxy(proxy) {
    return proxy && (typeof proxy.host === "string" || typeof proxy.ipaddress === "string") && typeof proxy.port === "number" && proxy.port >= 0 && proxy.port <= 65535 && (proxy.type === 4 || proxy.type === 5);
  }
  function isValidTimeoutValue(value) {
    return typeof value === "number" && value > 0;
  }
  function ipv4ToInt32(ip2) {
    const address = new ip_address_1.Address4(ip2);
    return address.toArray().reduce((acc, part) => (acc << 8) + part, 0) >>> 0;
  }
  helpers$3.ipv4ToInt32 = ipv4ToInt32;
  function int32ToIpv4(int32) {
    const octet1 = int32 >>> 24 & 255;
    const octet2 = int32 >>> 16 & 255;
    const octet3 = int32 >>> 8 & 255;
    const octet4 = int32 & 255;
    return [octet1, octet2, octet3, octet4].join(".");
  }
  helpers$3.int32ToIpv4 = int32ToIpv4;
  function ipToBuffer(ip2) {
    if (net.isIPv4(ip2)) {
      const address = new ip_address_1.Address4(ip2);
      return Buffer.from(address.toArray());
    } else if (net.isIPv6(ip2)) {
      const address = new ip_address_1.Address6(ip2);
      return Buffer.from(address.canonicalForm().split(":").map((segment) => segment.padStart(4, "0")).join(""), "hex");
    } else {
      throw new Error("Invalid IP address format");
    }
  }
  helpers$3.ipToBuffer = ipToBuffer;
  return helpers$3;
}
function requireReceivebuffer() {
  if (hasRequiredReceivebuffer) return receivebuffer;
  hasRequiredReceivebuffer = 1;
  Object.defineProperty(receivebuffer, "__esModule", { value: true });
  receivebuffer.ReceiveBuffer = void 0;
  class ReceiveBuffer {
    constructor(size = 4096) {
      this.buffer = Buffer.allocUnsafe(size);
      this.offset = 0;
      this.originalSize = size;
    }
    get length() {
      return this.offset;
    }
    append(data32) {
      if (!Buffer.isBuffer(data32)) {
        throw new Error("Attempted to append a non-buffer instance to ReceiveBuffer.");
      }
      if (this.offset + data32.length >= this.buffer.length) {
        const tmp = this.buffer;
        this.buffer = Buffer.allocUnsafe(Math.max(this.buffer.length + this.originalSize, this.buffer.length + data32.length));
        tmp.copy(this.buffer);
      }
      data32.copy(this.buffer, this.offset);
      return this.offset += data32.length;
    }
    peek(length) {
      if (length > this.offset) {
        throw new Error("Attempted to read beyond the bounds of the managed internal data.");
      }
      return this.buffer.slice(0, length);
    }
    get(length) {
      if (length > this.offset) {
        throw new Error("Attempted to read beyond the bounds of the managed internal data.");
      }
      const value = Buffer.allocUnsafe(length);
      this.buffer.slice(0, length).copy(value);
      this.buffer.copyWithin(0, length, length + this.offset - length);
      this.offset -= length;
      return value;
    }
  }
  receivebuffer.ReceiveBuffer = ReceiveBuffer;
  return receivebuffer;
}
function requireSocksclient() {
  if (hasRequiredSocksclient) return socksclient;
  hasRequiredSocksclient = 1;
  (function(exports$1) {
    var __awaiter5 = socksclient && socksclient.__awaiter || function(thisArg, _arguments, P, generator) {
      function adopt(value) {
        return value instanceof P ? value : new P(function(resolve2) {
          resolve2(value);
        });
      }
      return new (P || (P = Promise))(function(resolve2, reject) {
        function fulfilled(value) {
          try {
            step(generator.next(value));
          } catch (e) {
            reject(e);
          }
        }
        function rejected(value) {
          try {
            step(generator["throw"](value));
          } catch (e) {
            reject(e);
          }
        }
        function step(result) {
          result.done ? resolve2(result.value) : adopt(result.value).then(fulfilled, rejected);
        }
        step((generator = generator.apply(thisArg, _arguments || [])).next());
      });
    };
    Object.defineProperty(exports$1, "__esModule", { value: true });
    exports$1.SocksClientError = exports$1.SocksClient = void 0;
    const events_1 = require$$0$8;
    const net = require$$0$7;
    const smart_buffer_1 = requireSmartbuffer();
    const constants_1 = requireConstants$3();
    const helpers_1 = requireHelpers();
    const receivebuffer_1 = requireReceivebuffer();
    const util_1 = requireUtil$2();
    Object.defineProperty(exports$1, "SocksClientError", { enumerable: true, get: function() {
      return util_1.SocksClientError;
    } });
    const ip_address_1 = requireIpAddress();
    class SocksClient extends events_1.EventEmitter {
      constructor(options2) {
        super();
        this.options = Object.assign({}, options2);
        (0, helpers_1.validateSocksClientOptions)(options2);
        this.setState(constants_1.SocksClientState.Created);
      }
      static createConnection(options2, callback) {
        return new Promise((resolve2, reject) => {
          try {
            (0, helpers_1.validateSocksClientOptions)(options2, ["connect"]);
          } catch (err) {
            if (typeof callback === "function") {
              callback(err);
              return resolve2(err);
            } else {
              return reject(err);
            }
          }
          const client = new SocksClient(options2);
          client.connect(options2.existing_socket);
          client.once("established", (info) => {
            client.removeAllListeners();
            if (typeof callback === "function") {
              callback(null, info);
              resolve2(info);
            } else {
              resolve2(info);
            }
          });
          client.once("error", (err) => {
            client.removeAllListeners();
            if (typeof callback === "function") {
              callback(err);
              resolve2(err);
            } else {
              reject(err);
            }
          });
        });
      }
      static createConnectionChain(options2, callback) {
        return new Promise((resolve2, reject) => __awaiter5(this, void 0, void 0, function* () {
          try {
            (0, helpers_1.validateSocksClientChainOptions)(options2);
          } catch (err) {
            if (typeof callback === "function") {
              callback(err);
              return resolve2(err);
            } else {
              return reject(err);
            }
          }
          if (options2.randomizeChain) {
            (0, util_1.shuffleArray)(options2.proxies);
          }
          try {
            let sock;
            for (let i = 0; i < options2.proxies.length; i++) {
              const nextProxy = options2.proxies[i];
              const nextDestination = i === options2.proxies.length - 1 ? options2.destination : {
                host: options2.proxies[i + 1].host || options2.proxies[i + 1].ipaddress,
                port: options2.proxies[i + 1].port
              };
              const result = yield SocksClient.createConnection({
                command: "connect",
                proxy: nextProxy,
                destination: nextDestination,
                existing_socket: sock
              });
              sock = sock || result.socket;
            }
            if (typeof callback === "function") {
              callback(null, { socket: sock });
              resolve2({ socket: sock });
            } else {
              resolve2({ socket: sock });
            }
          } catch (err) {
            if (typeof callback === "function") {
              callback(err);
              resolve2(err);
            } else {
              reject(err);
            }
          }
        }));
      }
      static createUDPFrame(options2) {
        const buff = new smart_buffer_1.SmartBuffer();
        buff.writeUInt16BE(0);
        buff.writeUInt8(options2.frameNumber || 0);
        if (net.isIPv4(options2.remoteHost.host)) {
          buff.writeUInt8(constants_1.Socks5HostType.IPv4);
          buff.writeUInt32BE((0, helpers_1.ipv4ToInt32)(options2.remoteHost.host));
        } else if (net.isIPv6(options2.remoteHost.host)) {
          buff.writeUInt8(constants_1.Socks5HostType.IPv6);
          buff.writeBuffer((0, helpers_1.ipToBuffer)(options2.remoteHost.host));
        } else {
          buff.writeUInt8(constants_1.Socks5HostType.Hostname);
          buff.writeUInt8(Buffer.byteLength(options2.remoteHost.host));
          buff.writeString(options2.remoteHost.host);
        }
        buff.writeUInt16BE(options2.remoteHost.port);
        buff.writeBuffer(options2.data);
        return buff.toBuffer();
      }
      static parseUDPFrame(data32) {
        const buff = smart_buffer_1.SmartBuffer.fromBuffer(data32);
        buff.readOffset = 2;
        const frameNumber = buff.readUInt8();
        const hostType = buff.readUInt8();
        let remoteHost;
        if (hostType === constants_1.Socks5HostType.IPv4) {
          remoteHost = (0, helpers_1.int32ToIpv4)(buff.readUInt32BE());
        } else if (hostType === constants_1.Socks5HostType.IPv6) {
          remoteHost = ip_address_1.Address6.fromByteArray(Array.from(buff.readBuffer(16))).canonicalForm();
        } else {
          remoteHost = buff.readString(buff.readUInt8());
        }
        const remotePort = buff.readUInt16BE();
        return {
          frameNumber,
          remoteHost: {
            host: remoteHost,
            port: remotePort
          },
          data: buff.readBuffer()
        };
      }
      setState(newState) {
        if (this.state !== constants_1.SocksClientState.Error) {
          this.state = newState;
        }
      }
      connect(existingSocket) {
        this.onDataReceived = (data32) => this.onDataReceivedHandler(data32);
        this.onClose = () => this.onCloseHandler();
        this.onError = (err) => this.onErrorHandler(err);
        this.onConnect = () => this.onConnectHandler();
        const timer2 = setTimeout(() => this.onEstablishedTimeout(), this.options.timeout || constants_1.DEFAULT_TIMEOUT);
        if (timer2.unref && typeof timer2.unref === "function") {
          timer2.unref();
        }
        if (existingSocket) {
          this.socket = existingSocket;
        } else {
          this.socket = new net.Socket();
        }
        this.socket.once("close", this.onClose);
        this.socket.once("error", this.onError);
        this.socket.once("connect", this.onConnect);
        this.socket.on("data", this.onDataReceived);
        this.setState(constants_1.SocksClientState.Connecting);
        this.receiveBuffer = new receivebuffer_1.ReceiveBuffer();
        if (existingSocket) {
          this.socket.emit("connect");
        } else {
          this.socket.connect(this.getSocketOptions());
          if (this.options.set_tcp_nodelay !== void 0 && this.options.set_tcp_nodelay !== null) {
            this.socket.setNoDelay(!!this.options.set_tcp_nodelay);
          }
        }
        this.prependOnceListener("established", (info) => {
          setImmediate(() => {
            if (this.receiveBuffer.length > 0) {
              const excessData = this.receiveBuffer.get(this.receiveBuffer.length);
              info.socket.emit("data", excessData);
            }
            info.socket.resume();
          });
        });
      }
      getSocketOptions() {
        return Object.assign(Object.assign({}, this.options.socket_options), { host: this.options.proxy.host || this.options.proxy.ipaddress, port: this.options.proxy.port });
      }
      onEstablishedTimeout() {
        if (this.state !== constants_1.SocksClientState.Established && this.state !== constants_1.SocksClientState.BoundWaitingForConnection) {
          this.closeSocket(constants_1.ERRORS.ProxyConnectionTimedOut);
        }
      }
      onConnectHandler() {
        this.setState(constants_1.SocksClientState.Connected);
        if (this.options.proxy.type === 4) {
          this.sendSocks4InitialHandshake();
        } else {
          this.sendSocks5InitialHandshake();
        }
        this.setState(constants_1.SocksClientState.SentInitialHandshake);
      }
      onDataReceivedHandler(data32) {
        this.receiveBuffer.append(data32);
        this.processData();
      }
      processData() {
        while (this.state !== constants_1.SocksClientState.Established && this.state !== constants_1.SocksClientState.Error && this.receiveBuffer.length >= this.nextRequiredPacketBufferSize) {
          if (this.state === constants_1.SocksClientState.SentInitialHandshake) {
            if (this.options.proxy.type === 4) {
              this.handleSocks4FinalHandshakeResponse();
            } else {
              this.handleInitialSocks5HandshakeResponse();
            }
          } else if (this.state === constants_1.SocksClientState.SentAuthentication) {
            this.handleInitialSocks5AuthenticationHandshakeResponse();
          } else if (this.state === constants_1.SocksClientState.SentFinalHandshake) {
            this.handleSocks5FinalHandshakeResponse();
          } else if (this.state === constants_1.SocksClientState.BoundWaitingForConnection) {
            if (this.options.proxy.type === 4) {
              this.handleSocks4IncomingConnectionResponse();
            } else {
              this.handleSocks5IncomingConnectionResponse();
            }
          } else {
            this.closeSocket(constants_1.ERRORS.InternalError);
            break;
          }
        }
      }
      onCloseHandler() {
        this.closeSocket(constants_1.ERRORS.SocketClosed);
      }
      onErrorHandler(err) {
        this.closeSocket(err.message);
      }
      removeInternalSocketHandlers() {
        this.socket.pause();
        this.socket.removeListener("data", this.onDataReceived);
        this.socket.removeListener("close", this.onClose);
        this.socket.removeListener("error", this.onError);
        this.socket.removeListener("connect", this.onConnect);
      }
      closeSocket(err) {
        if (this.state !== constants_1.SocksClientState.Error) {
          this.setState(constants_1.SocksClientState.Error);
          this.socket.destroy();
          this.removeInternalSocketHandlers();
          this.emit("error", new util_1.SocksClientError(err, this.options));
        }
      }
      sendSocks4InitialHandshake() {
        const userId = this.options.proxy.userId || "";
        const buff = new smart_buffer_1.SmartBuffer();
        buff.writeUInt8(4);
        buff.writeUInt8(constants_1.SocksCommand[this.options.command]);
        buff.writeUInt16BE(this.options.destination.port);
        if (net.isIPv4(this.options.destination.host)) {
          buff.writeBuffer((0, helpers_1.ipToBuffer)(this.options.destination.host));
          buff.writeStringNT(userId);
        } else {
          buff.writeUInt8(0);
          buff.writeUInt8(0);
          buff.writeUInt8(0);
          buff.writeUInt8(1);
          buff.writeStringNT(userId);
          buff.writeStringNT(this.options.destination.host);
        }
        this.nextRequiredPacketBufferSize = constants_1.SOCKS_INCOMING_PACKET_SIZES.Socks4Response;
        this.socket.write(buff.toBuffer());
      }
      handleSocks4FinalHandshakeResponse() {
        const data32 = this.receiveBuffer.get(8);
        if (data32[1] !== constants_1.Socks4Response.Granted) {
          this.closeSocket(`${constants_1.ERRORS.Socks4ProxyRejectedConnection} - (${constants_1.Socks4Response[data32[1]]})`);
        } else {
          if (constants_1.SocksCommand[this.options.command] === constants_1.SocksCommand.bind) {
            const buff = smart_buffer_1.SmartBuffer.fromBuffer(data32);
            buff.readOffset = 2;
            const remoteHost = {
              port: buff.readUInt16BE(),
              host: (0, helpers_1.int32ToIpv4)(buff.readUInt32BE())
            };
            if (remoteHost.host === "0.0.0.0") {
              remoteHost.host = this.options.proxy.ipaddress;
            }
            this.setState(constants_1.SocksClientState.BoundWaitingForConnection);
            this.emit("bound", { remoteHost, socket: this.socket });
          } else {
            this.setState(constants_1.SocksClientState.Established);
            this.removeInternalSocketHandlers();
            this.emit("established", { socket: this.socket });
          }
        }
      }
      handleSocks4IncomingConnectionResponse() {
        const data32 = this.receiveBuffer.get(8);
        if (data32[1] !== constants_1.Socks4Response.Granted) {
          this.closeSocket(`${constants_1.ERRORS.Socks4ProxyRejectedIncomingBoundConnection} - (${constants_1.Socks4Response[data32[1]]})`);
        } else {
          const buff = smart_buffer_1.SmartBuffer.fromBuffer(data32);
          buff.readOffset = 2;
          const remoteHost = {
            port: buff.readUInt16BE(),
            host: (0, helpers_1.int32ToIpv4)(buff.readUInt32BE())
          };
          this.setState(constants_1.SocksClientState.Established);
          this.removeInternalSocketHandlers();
          this.emit("established", { remoteHost, socket: this.socket });
        }
      }
      sendSocks5InitialHandshake() {
        const buff = new smart_buffer_1.SmartBuffer();
        const supportedAuthMethods = [constants_1.Socks5Auth.NoAuth];
        if (this.options.proxy.userId || this.options.proxy.password) {
          supportedAuthMethods.push(constants_1.Socks5Auth.UserPass);
        }
        if (this.options.proxy.custom_auth_method !== void 0) {
          supportedAuthMethods.push(this.options.proxy.custom_auth_method);
        }
        buff.writeUInt8(5);
        buff.writeUInt8(supportedAuthMethods.length);
        for (const authMethod of supportedAuthMethods) {
          buff.writeUInt8(authMethod);
        }
        this.nextRequiredPacketBufferSize = constants_1.SOCKS_INCOMING_PACKET_SIZES.Socks5InitialHandshakeResponse;
        this.socket.write(buff.toBuffer());
        this.setState(constants_1.SocksClientState.SentInitialHandshake);
      }
      handleInitialSocks5HandshakeResponse() {
        const data32 = this.receiveBuffer.get(2);
        if (data32[0] !== 5) {
          this.closeSocket(constants_1.ERRORS.InvalidSocks5IntiailHandshakeSocksVersion);
        } else if (data32[1] === constants_1.SOCKS5_NO_ACCEPTABLE_AUTH) {
          this.closeSocket(constants_1.ERRORS.InvalidSocks5InitialHandshakeNoAcceptedAuthType);
        } else {
          if (data32[1] === constants_1.Socks5Auth.NoAuth) {
            this.socks5ChosenAuthType = constants_1.Socks5Auth.NoAuth;
            this.sendSocks5CommandRequest();
          } else if (data32[1] === constants_1.Socks5Auth.UserPass) {
            this.socks5ChosenAuthType = constants_1.Socks5Auth.UserPass;
            this.sendSocks5UserPassAuthentication();
          } else if (data32[1] === this.options.proxy.custom_auth_method) {
            this.socks5ChosenAuthType = this.options.proxy.custom_auth_method;
            this.sendSocks5CustomAuthentication();
          } else {
            this.closeSocket(constants_1.ERRORS.InvalidSocks5InitialHandshakeUnknownAuthType);
          }
        }
      }
      sendSocks5UserPassAuthentication() {
        const userId = this.options.proxy.userId || "";
        const password = this.options.proxy.password || "";
        const buff = new smart_buffer_1.SmartBuffer();
        buff.writeUInt8(1);
        buff.writeUInt8(Buffer.byteLength(userId));
        buff.writeString(userId);
        buff.writeUInt8(Buffer.byteLength(password));
        buff.writeString(password);
        this.nextRequiredPacketBufferSize = constants_1.SOCKS_INCOMING_PACKET_SIZES.Socks5UserPassAuthenticationResponse;
        this.socket.write(buff.toBuffer());
        this.setState(constants_1.SocksClientState.SentAuthentication);
      }
      sendSocks5CustomAuthentication() {
        return __awaiter5(this, void 0, void 0, function* () {
          this.nextRequiredPacketBufferSize = this.options.proxy.custom_auth_response_size;
          this.socket.write(yield this.options.proxy.custom_auth_request_handler());
          this.setState(constants_1.SocksClientState.SentAuthentication);
        });
      }
      handleSocks5CustomAuthHandshakeResponse(data32) {
        return __awaiter5(this, void 0, void 0, function* () {
          return yield this.options.proxy.custom_auth_response_handler(data32);
        });
      }
      handleSocks5AuthenticationNoAuthHandshakeResponse(data32) {
        return __awaiter5(this, void 0, void 0, function* () {
          return data32[1] === 0;
        });
      }
      handleSocks5AuthenticationUserPassHandshakeResponse(data32) {
        return __awaiter5(this, void 0, void 0, function* () {
          return data32[1] === 0;
        });
      }
      handleInitialSocks5AuthenticationHandshakeResponse() {
        return __awaiter5(this, void 0, void 0, function* () {
          this.setState(constants_1.SocksClientState.ReceivedAuthenticationResponse);
          let authResult = false;
          if (this.socks5ChosenAuthType === constants_1.Socks5Auth.NoAuth) {
            authResult = yield this.handleSocks5AuthenticationNoAuthHandshakeResponse(this.receiveBuffer.get(2));
          } else if (this.socks5ChosenAuthType === constants_1.Socks5Auth.UserPass) {
            authResult = yield this.handleSocks5AuthenticationUserPassHandshakeResponse(this.receiveBuffer.get(2));
          } else if (this.socks5ChosenAuthType === this.options.proxy.custom_auth_method) {
            authResult = yield this.handleSocks5CustomAuthHandshakeResponse(this.receiveBuffer.get(this.options.proxy.custom_auth_response_size));
          }
          if (!authResult) {
            this.closeSocket(constants_1.ERRORS.Socks5AuthenticationFailed);
          } else {
            this.sendSocks5CommandRequest();
          }
        });
      }
      sendSocks5CommandRequest() {
        const buff = new smart_buffer_1.SmartBuffer();
        buff.writeUInt8(5);
        buff.writeUInt8(constants_1.SocksCommand[this.options.command]);
        buff.writeUInt8(0);
        if (net.isIPv4(this.options.destination.host)) {
          buff.writeUInt8(constants_1.Socks5HostType.IPv4);
          buff.writeBuffer((0, helpers_1.ipToBuffer)(this.options.destination.host));
        } else if (net.isIPv6(this.options.destination.host)) {
          buff.writeUInt8(constants_1.Socks5HostType.IPv6);
          buff.writeBuffer((0, helpers_1.ipToBuffer)(this.options.destination.host));
        } else {
          buff.writeUInt8(constants_1.Socks5HostType.Hostname);
          buff.writeUInt8(this.options.destination.host.length);
          buff.writeString(this.options.destination.host);
        }
        buff.writeUInt16BE(this.options.destination.port);
        this.nextRequiredPacketBufferSize = constants_1.SOCKS_INCOMING_PACKET_SIZES.Socks5ResponseHeader;
        this.socket.write(buff.toBuffer());
        this.setState(constants_1.SocksClientState.SentFinalHandshake);
      }
      handleSocks5FinalHandshakeResponse() {
        const header = this.receiveBuffer.peek(5);
        if (header[0] !== 5 || header[1] !== constants_1.Socks5Response.Granted) {
          this.closeSocket(`${constants_1.ERRORS.InvalidSocks5FinalHandshakeRejected} - ${constants_1.Socks5Response[header[1]]}`);
        } else {
          const addressType = header[3];
          let remoteHost;
          let buff;
          if (addressType === constants_1.Socks5HostType.IPv4) {
            const dataNeeded = constants_1.SOCKS_INCOMING_PACKET_SIZES.Socks5ResponseIPv4;
            if (this.receiveBuffer.length < dataNeeded) {
              this.nextRequiredPacketBufferSize = dataNeeded;
              return;
            }
            buff = smart_buffer_1.SmartBuffer.fromBuffer(this.receiveBuffer.get(dataNeeded).slice(4));
            remoteHost = {
              host: (0, helpers_1.int32ToIpv4)(buff.readUInt32BE()),
              port: buff.readUInt16BE()
            };
            if (remoteHost.host === "0.0.0.0") {
              remoteHost.host = this.options.proxy.ipaddress;
            }
          } else if (addressType === constants_1.Socks5HostType.Hostname) {
            const hostLength = header[4];
            const dataNeeded = constants_1.SOCKS_INCOMING_PACKET_SIZES.Socks5ResponseHostname(hostLength);
            if (this.receiveBuffer.length < dataNeeded) {
              this.nextRequiredPacketBufferSize = dataNeeded;
              return;
            }
            buff = smart_buffer_1.SmartBuffer.fromBuffer(this.receiveBuffer.get(dataNeeded).slice(5));
            remoteHost = {
              host: buff.readString(hostLength),
              port: buff.readUInt16BE()
            };
          } else if (addressType === constants_1.Socks5HostType.IPv6) {
            const dataNeeded = constants_1.SOCKS_INCOMING_PACKET_SIZES.Socks5ResponseIPv6;
            if (this.receiveBuffer.length < dataNeeded) {
              this.nextRequiredPacketBufferSize = dataNeeded;
              return;
            }
            buff = smart_buffer_1.SmartBuffer.fromBuffer(this.receiveBuffer.get(dataNeeded).slice(4));
            remoteHost = {
              host: ip_address_1.Address6.fromByteArray(Array.from(buff.readBuffer(16))).canonicalForm(),
              port: buff.readUInt16BE()
            };
          }
          this.setState(constants_1.SocksClientState.ReceivedFinalResponse);
          if (constants_1.SocksCommand[this.options.command] === constants_1.SocksCommand.connect) {
            this.setState(constants_1.SocksClientState.Established);
            this.removeInternalSocketHandlers();
            this.emit("established", { remoteHost, socket: this.socket });
          } else if (constants_1.SocksCommand[this.options.command] === constants_1.SocksCommand.bind) {
            this.setState(constants_1.SocksClientState.BoundWaitingForConnection);
            this.nextRequiredPacketBufferSize = constants_1.SOCKS_INCOMING_PACKET_SIZES.Socks5ResponseHeader;
            this.emit("bound", { remoteHost, socket: this.socket });
          } else if (constants_1.SocksCommand[this.options.command] === constants_1.SocksCommand.associate) {
            this.setState(constants_1.SocksClientState.Established);
            this.removeInternalSocketHandlers();
            this.emit("established", {
              remoteHost,
              socket: this.socket
            });
          }
        }
      }
      handleSocks5IncomingConnectionResponse() {
        const header = this.receiveBuffer.peek(5);
        if (header[0] !== 5 || header[1] !== constants_1.Socks5Response.Granted) {
          this.closeSocket(`${constants_1.ERRORS.Socks5ProxyRejectedIncomingBoundConnection} - ${constants_1.Socks5Response[header[1]]}`);
        } else {
          const addressType = header[3];
          let remoteHost;
          let buff;
          if (addressType === constants_1.Socks5HostType.IPv4) {
            const dataNeeded = constants_1.SOCKS_INCOMING_PACKET_SIZES.Socks5ResponseIPv4;
            if (this.receiveBuffer.length < dataNeeded) {
              this.nextRequiredPacketBufferSize = dataNeeded;
              return;
            }
            buff = smart_buffer_1.SmartBuffer.fromBuffer(this.receiveBuffer.get(dataNeeded).slice(4));
            remoteHost = {
              host: (0, helpers_1.int32ToIpv4)(buff.readUInt32BE()),
              port: buff.readUInt16BE()
            };
            if (remoteHost.host === "0.0.0.0") {
              remoteHost.host = this.options.proxy.ipaddress;
            }
          } else if (addressType === constants_1.Socks5HostType.Hostname) {
            const hostLength = header[4];
            const dataNeeded = constants_1.SOCKS_INCOMING_PACKET_SIZES.Socks5ResponseHostname(hostLength);
            if (this.receiveBuffer.length < dataNeeded) {
              this.nextRequiredPacketBufferSize = dataNeeded;
              return;
            }
            buff = smart_buffer_1.SmartBuffer.fromBuffer(this.receiveBuffer.get(dataNeeded).slice(5));
            remoteHost = {
              host: buff.readString(hostLength),
              port: buff.readUInt16BE()
            };
          } else if (addressType === constants_1.Socks5HostType.IPv6) {
            const dataNeeded = constants_1.SOCKS_INCOMING_PACKET_SIZES.Socks5ResponseIPv6;
            if (this.receiveBuffer.length < dataNeeded) {
              this.nextRequiredPacketBufferSize = dataNeeded;
              return;
            }
            buff = smart_buffer_1.SmartBuffer.fromBuffer(this.receiveBuffer.get(dataNeeded).slice(4));
            remoteHost = {
              host: ip_address_1.Address6.fromByteArray(Array.from(buff.readBuffer(16))).canonicalForm(),
              port: buff.readUInt16BE()
            };
          }
          this.setState(constants_1.SocksClientState.Established);
          this.removeInternalSocketHandlers();
          this.emit("established", { remoteHost, socket: this.socket });
        }
      }
      get socksClientOptions() {
        return Object.assign({}, this.options);
      }
    }
    exports$1.SocksClient = SocksClient;
  })(socksclient);
  return socksclient;
}
function requireBuild() {
  if (hasRequiredBuild) return build;
  hasRequiredBuild = 1;
  (function(exports$1) {
    var __createBinding5 = build && build.__createBinding || (Object.create ? function(o, m, k, k2) {
      if (k2 === void 0) k2 = k;
      var desc = Object.getOwnPropertyDescriptor(m, k);
      if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
        desc = { enumerable: true, get: function() {
          return m[k];
        } };
      }
      Object.defineProperty(o, k2, desc);
    } : function(o, m, k, k2) {
      if (k2 === void 0) k2 = k;
      o[k2] = m[k];
    });
    var __exportStar5 = build && build.__exportStar || function(m, exports$12) {
      for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports$12, p)) __createBinding5(exports$12, m, p);
    };
    Object.defineProperty(exports$1, "__esModule", { value: true });
    __exportStar5(requireSocksclient(), exports$1);
  })(build);
  return build;
}
function requireDist$8() {
  if (hasRequiredDist$8) return dist$7;
  hasRequiredDist$8 = 1;
  var __createBinding5 = dist$7 && dist$7.__createBinding || (Object.create ? function(o, m, k, k2) {
    if (k2 === void 0) k2 = k;
    var desc = Object.getOwnPropertyDescriptor(m, k);
    if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
      desc = { enumerable: true, get: function() {
        return m[k];
      } };
    }
    Object.defineProperty(o, k2, desc);
  } : function(o, m, k, k2) {
    if (k2 === void 0) k2 = k;
    o[k2] = m[k];
  });
  var __setModuleDefault5 = dist$7 && dist$7.__setModuleDefault || (Object.create ? function(o, v) {
    Object.defineProperty(o, "default", { enumerable: true, value: v });
  } : function(o, v) {
    o["default"] = v;
  });
  var __importStar5 = dist$7 && dist$7.__importStar || function(mod2) {
    if (mod2 && mod2.__esModule) return mod2;
    var result = {};
    if (mod2 != null) {
      for (var k in mod2) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod2, k)) __createBinding5(result, mod2, k);
    }
    __setModuleDefault5(result, mod2);
    return result;
  };
  var __importDefault5 = dist$7 && dist$7.__importDefault || function(mod2) {
    return mod2 && mod2.__esModule ? mod2 : { "default": mod2 };
  };
  Object.defineProperty(dist$7, "__esModule", { value: true });
  dist$7.SocksProxyAgent = void 0;
  const socks_1 = requireBuild();
  const agent_base_1 = requireDist$b();
  const debug_12 = __importDefault5(requireSrc());
  const dns = __importStar5(require$$3$3);
  const net = __importStar5(require$$0$7);
  const tls = __importStar5(require$$1$2);
  const url_1 = require$$5;
  const debug2 = (0, debug_12.default)("socks-proxy-agent");
  const setServernameFromNonIpHost = (options2) => {
    if (options2.servername === void 0 && options2.host && !net.isIP(options2.host)) {
      return {
        ...options2,
        servername: options2.host
      };
    }
    return options2;
  };
  function parseSocksURL(url) {
    let lookup = false;
    let type2 = 5;
    const host = url.hostname;
    const port = parseInt(url.port, 10) || 1080;
    switch (url.protocol.replace(":", "")) {
      case "socks4":
        lookup = true;
        type2 = 4;
        break;
      case "socks4a":
        type2 = 4;
        break;
      case "socks5":
        lookup = true;
        type2 = 5;
        break;
      case "socks":
        type2 = 5;
        break;
      case "socks5h":
        type2 = 5;
        break;
      default:
        throw new TypeError(`A "socks" protocol must be specified! Got: ${String(url.protocol)}`);
    }
    const proxy = {
      host,
      port,
      type: type2
    };
    if (url.username) {
      Object.defineProperty(proxy, "userId", {
        value: decodeURIComponent(url.username),
        enumerable: false
      });
    }
    if (url.password != null) {
      Object.defineProperty(proxy, "password", {
        value: decodeURIComponent(url.password),
        enumerable: false
      });
    }
    return { lookup, proxy };
  }
  class SocksProxyAgent extends agent_base_1.Agent {
    constructor(uri2, opts) {
      super(opts);
      const url = typeof uri2 === "string" ? new url_1.URL(uri2) : uri2;
      const { proxy, lookup } = parseSocksURL(url);
      this.shouldLookup = lookup;
      this.proxy = proxy;
      this.timeout = opts?.timeout ?? null;
      this.socketOptions = opts?.socketOptions ?? null;
    }
    async connect(req, opts) {
      const { shouldLookup, proxy, timeout: timeout2 } = this;
      if (!opts.host) {
        throw new Error("No `host` defined!");
      }
      let { host } = opts;
      const { port, lookup: lookupFn = dns.lookup } = opts;
      if (shouldLookup) {
        host = await new Promise((resolve2, reject) => {
          lookupFn(host, {}, (err, res) => {
            if (err) {
              reject(err);
            } else {
              resolve2(res);
            }
          });
        });
      }
      const socksOpts = {
        proxy,
        destination: {
          host,
          port: typeof port === "number" ? port : parseInt(port, 10)
        },
        command: "connect",
        timeout: timeout2 ?? void 0,
        socket_options: this.socketOptions ?? void 0
      };
      const cleanup = (tlsSocket) => {
        req.destroy();
        socket.destroy();
        if (tlsSocket)
          tlsSocket.destroy();
      };
      debug2("Creating socks proxy connection: %o", socksOpts);
      const { socket } = await socks_1.SocksClient.createConnection(socksOpts);
      debug2("Successfully created socks proxy connection");
      if (timeout2 !== null) {
        socket.setTimeout(timeout2);
        socket.on("timeout", () => cleanup());
      }
      if (opts.secureEndpoint) {
        debug2("Upgrading socket connection to TLS");
        const tlsSocket = tls.connect({
          ...omit2(setServernameFromNonIpHost(opts), "host", "path", "port"),
          socket
        });
        tlsSocket.once("error", (error) => {
          debug2("Socket TLS error", error.message);
          cleanup(tlsSocket);
        });
        return tlsSocket;
      }
      return socket;
    }
  }
  SocksProxyAgent.protocols = [
    "socks",
    "socks4",
    "socks4a",
    "socks5",
    "socks5h"
  ];
  dist$7.SocksProxyAgent = SocksProxyAgent;
  function omit2(obj, ...keys2) {
    const ret = {};
    let key;
    for (key in obj) {
      if (!keys2.includes(key)) {
        ret[key] = obj[key];
      }
    }
    return ret;
  }
  return dist$7;
}
function requireCommon() {
  if (hasRequiredCommon) return common$1;
  hasRequiredCommon = 1;
  Object.defineProperty(common$1, "__esModule", { value: true });
  common$1.makeDataUriToBuffer = void 0;
  const makeDataUriToBuffer = (convert) => (uri2) => {
    uri2 = String(uri2);
    if (!/^data:/i.test(uri2)) {
      throw new TypeError('`uri` does not appear to be a Data URI (must begin with "data:")');
    }
    uri2 = uri2.replace(/\r?\n/g, "");
    const firstComma = uri2.indexOf(",");
    if (firstComma === -1 || firstComma <= 4) {
      throw new TypeError("malformed data: URI");
    }
    const meta = uri2.substring(5, firstComma).split(";");
    let charset = "";
    let base642 = false;
    const type2 = meta[0] || "text/plain";
    let typeFull = type2;
    for (let i = 1; i < meta.length; i++) {
      if (meta[i] === "base64") {
        base642 = true;
      } else if (meta[i]) {
        typeFull += `;${meta[i]}`;
        if (meta[i].indexOf("charset=") === 0) {
          charset = meta[i].substring(8);
        }
      }
    }
    if (!meta[0] && !charset.length) {
      typeFull += ";charset=US-ASCII";
      charset = "US-ASCII";
    }
    const data32 = unescape(uri2.substring(firstComma + 1));
    const buffer = base642 ? convert.base64ToArrayBuffer(data32) : convert.stringToBuffer(data32);
    return {
      type: type2,
      typeFull,
      charset,
      buffer
    };
  };
  common$1.makeDataUriToBuffer = makeDataUriToBuffer;
  return common$1;
}
function requireDist$7() {
  if (hasRequiredDist$7) return dist$4;
  hasRequiredDist$7 = 1;
  Object.defineProperty(dist$4, "__esModule", { value: true });
  dist$4.dataUriToBuffer = void 0;
  const common_1 = requireCommon();
  function base64ToArrayBuffer(base642) {
    const chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
    const bytes2 = [];
    for (let i = 0; i < base642.length; i += 4) {
      const idx0 = chars.indexOf(base642.charAt(i));
      const idx1 = chars.indexOf(base642.charAt(i + 1));
      const idx2 = base642.charAt(i + 2) === "=" ? 0 : chars.indexOf(base642.charAt(i + 2));
      const idx3 = base642.charAt(i + 3) === "=" ? 0 : chars.indexOf(base642.charAt(i + 3));
      const bin0 = idx0 << 2 | idx1 >> 4;
      const bin1 = (idx1 & 15) << 4 | idx2 >> 2;
      const bin2 = (idx2 & 3) << 6 | idx3;
      bytes2.push(bin0);
      if (base642.charAt(i + 2) !== "=")
        bytes2.push(bin1);
      if (base642.charAt(i + 3) !== "=")
        bytes2.push(bin2);
    }
    const buffer = new ArrayBuffer(bytes2.length);
    const view = new Uint8Array(buffer);
    view.set(bytes2);
    return buffer;
  }
  function stringToBuffer(str) {
    const buffer = new ArrayBuffer(str.length);
    const view = new Uint8Array(buffer);
    for (let i = 0; i < str.length; i++) {
      view[i] = str.charCodeAt(i);
    }
    return buffer;
  }
  dist$4.dataUriToBuffer = (0, common_1.makeDataUriToBuffer)({ stringToBuffer, base64ToArrayBuffer });
  return dist$4;
}
function requireNotmodified() {
  if (hasRequiredNotmodified) return notmodified;
  hasRequiredNotmodified = 1;
  Object.defineProperty(notmodified, "__esModule", { value: true });
  class NotModifiedError extends Error {
    constructor(message) {
      super(message || 'Source has not been modified since the provied "cache", re-use previous results');
      this.code = "ENOTMODIFIED";
    }
  }
  notmodified.default = NotModifiedError;
  return notmodified;
}
function requireData() {
  if (hasRequiredData) return data$u;
  hasRequiredData = 1;
  var __importDefault5 = data$u && data$u.__importDefault || function(mod2) {
    return mod2 && mod2.__esModule ? mod2 : { "default": mod2 };
  };
  Object.defineProperty(data$u, "__esModule", { value: true });
  data$u.data = void 0;
  const debug_12 = __importDefault5(requireSrc());
  const stream_1 = require$$1$3;
  const crypto_1 = require$$2$1;
  const data_uri_to_buffer_1 = requireDist$7();
  const notmodified_1 = __importDefault5(requireNotmodified());
  const debug2 = (0, debug_12.default)("get-uri:data");
  class DataReadable extends stream_1.Readable {
    constructor(hash, buf) {
      super();
      this.push(buf);
      this.push(null);
      this.hash = hash;
    }
  }
  const data32 = async ({ href: uri2 }, { cache } = {}) => {
    const shasum = (0, crypto_1.createHash)("sha1");
    shasum.update(uri2);
    const hash = shasum.digest("hex");
    debug2('generated SHA1 hash for "data:" URI: %o', hash);
    if (cache?.hash === hash) {
      debug2("got matching cache SHA1 hash: %o", hash);
      throw new notmodified_1.default();
    } else {
      debug2('creating Readable stream from "data:" URI buffer');
      const { buffer } = (0, data_uri_to_buffer_1.dataUriToBuffer)(uri2);
      return new DataReadable(hash, Buffer.from(buffer));
    }
  };
  data$u.data = data32;
  return data$u;
}
function requireNotfound() {
  if (hasRequiredNotfound) return notfound;
  hasRequiredNotfound = 1;
  Object.defineProperty(notfound, "__esModule", { value: true });
  class NotFoundError extends Error {
    constructor(message) {
      super(message || "File does not exist at the specified endpoint");
      this.code = "ENOTFOUND";
    }
  }
  notfound.default = NotFoundError;
  return notfound;
}
function requireFile() {
  if (hasRequiredFile) return file;
  hasRequiredFile = 1;
  var __importDefault5 = file && file.__importDefault || function(mod2) {
    return mod2 && mod2.__esModule ? mod2 : { "default": mod2 };
  };
  Object.defineProperty(file, "__esModule", { value: true });
  file.file = void 0;
  const debug_12 = __importDefault5(requireSrc());
  const fs_1 = require$$0$3;
  const notfound_1 = __importDefault5(requireNotfound());
  const notmodified_1 = __importDefault5(requireNotmodified());
  const url_1 = require$$5;
  const debug2 = (0, debug_12.default)("get-uri:file");
  const file$1 = async ({ href: uri2 }, opts = {}) => {
    const {
      cache,
      flags = "r",
      mode: mode2 = 438
    } = opts;
    try {
      const filepath = (0, url_1.fileURLToPath)(uri2);
      debug2("Normalized pathname: %o", filepath);
      const fdHandle = await fs_1.promises.open(filepath, flags, mode2);
      const fd = fdHandle.fd;
      const stat = await fdHandle.stat();
      if (cache && cache.stat && stat && isNotModified(cache.stat, stat)) {
        await fdHandle.close();
        throw new notmodified_1.default();
      }
      const rs = (0, fs_1.createReadStream)(filepath, {
        autoClose: true,
        ...opts,
        fd
      });
      rs.stat = stat;
      return rs;
    } catch (err) {
      if (err.code === "ENOENT") {
        throw new notfound_1.default();
      }
      throw err;
    }
  };
  file.file = file$1;
  function isNotModified(prev, curr) {
    return +prev.mtime === +curr.mtime;
  }
  return file;
}
function requireParseControlResponse() {
  if (hasRequiredParseControlResponse) return parseControlResponse;
  hasRequiredParseControlResponse = 1;
  Object.defineProperty(parseControlResponse, "__esModule", { value: true });
  parseControlResponse.parseControlResponse = parseControlResponse$1;
  parseControlResponse.isSingleLine = isSingleLine;
  parseControlResponse.isMultiline = isMultiline;
  parseControlResponse.positiveCompletion = positiveCompletion;
  parseControlResponse.positiveIntermediate = positiveIntermediate;
  const LF = "\n";
  function parseControlResponse$1(text) {
    const lines = text.split(/\r?\n/).filter(isNotBlank);
    const messages = [];
    let startAt = 0;
    let tokenRegex;
    for (let i = 0; i < lines.length; i++) {
      const line = lines[i];
      if (!tokenRegex) {
        if (isMultiline(line)) {
          const token = line.substr(0, 3);
          tokenRegex = new RegExp(`^${token}(?:$| )`);
          startAt = i;
        } else if (isSingleLine(line)) {
          messages.push(line);
        }
      } else if (tokenRegex.test(line)) {
        tokenRegex = void 0;
        messages.push(lines.slice(startAt, i + 1).join(LF));
      }
    }
    const rest = tokenRegex ? lines.slice(startAt).join(LF) + LF : "";
    return { messages, rest };
  }
  function isSingleLine(line) {
    return /^\d\d\d(?:$| )/.test(line);
  }
  function isMultiline(line) {
    return /^\d\d\d-/.test(line);
  }
  function positiveCompletion(code2) {
    return code2 >= 200 && code2 < 300;
  }
  function positiveIntermediate(code2) {
    return code2 >= 300 && code2 < 400;
  }
  function isNotBlank(str) {
    return str.trim() !== "";
  }
  return parseControlResponse;
}
function requireFtpContext() {
  if (hasRequiredFtpContext) return FtpContext;
  hasRequiredFtpContext = 1;
  Object.defineProperty(FtpContext, "__esModule", { value: true });
  FtpContext.FTPContext = FtpContext.FTPError = void 0;
  const net_1 = require$$0$7;
  const parseControlResponse_1 = requireParseControlResponse();
  class FTPError extends Error {
    constructor(res) {
      super(res.message);
      this.name = this.constructor.name;
      this.code = res.code;
    }
  }
  FtpContext.FTPError = FTPError;
  function doNothing() {
  }
  class FTPContext {
    constructor(timeout2 = 0, encoding = "utf8") {
      this.timeout = timeout2;
      this.verbose = false;
      this.ipFamily = void 0;
      this.tlsOptions = {};
      this._partialResponse = "";
      this._encoding = encoding;
      this._socket = this.socket = this._newSocket();
      this._dataSocket = void 0;
    }
    close() {
      const message = this._task ? "User closed client during task" : "User closed client";
      const err = new Error(message);
      this.closeWithError(err);
    }
    closeWithError(err) {
      if (this._closingError) {
        return;
      }
      this._closingError = err;
      this._closeControlSocket();
      this._closeSocket(this._dataSocket);
      this._passToHandler(err);
      this._stopTrackingTask();
    }
    get closed() {
      return this.socket.remoteAddress === void 0 || this._closingError !== void 0;
    }
    reset() {
      this.socket = this._newSocket();
    }
    get socket() {
      return this._socket;
    }
    set socket(socket) {
      this.dataSocket = void 0;
      this.tlsOptions = {};
      this._partialResponse = "";
      if (this._socket) {
        const newSocketUpgradesExisting = socket.localPort === this._socket.localPort;
        if (newSocketUpgradesExisting) {
          this._removeSocketListeners(this.socket);
        } else {
          this._closeControlSocket();
        }
      }
      if (socket) {
        this._closingError = void 0;
        socket.setTimeout(0);
        socket.setEncoding(this._encoding);
        socket.setKeepAlive(true);
        socket.on("data", (data32) => this._onControlSocketData(data32));
        socket.on("end", () => this.closeWithError(new Error("Server sent FIN packet unexpectedly, closing connection.")));
        socket.on("close", (hadError) => {
          if (!hadError)
            this.closeWithError(new Error("Server closed connection unexpectedly."));
        });
        this._setupDefaultErrorHandlers(socket, "control socket");
      }
      this._socket = socket;
    }
    get dataSocket() {
      return this._dataSocket;
    }
    set dataSocket(socket) {
      this._closeSocket(this._dataSocket);
      if (socket) {
        socket.setTimeout(0);
        this._setupDefaultErrorHandlers(socket, "data socket");
      }
      this._dataSocket = socket;
    }
    get encoding() {
      return this._encoding;
    }
    set encoding(encoding) {
      this._encoding = encoding;
      if (this.socket) {
        this.socket.setEncoding(encoding);
      }
    }
    send(command2) {
      const containsPassword = command2.startsWith("PASS");
      const message = containsPassword ? "> PASS ###" : `> ${command2}`;
      this.log(message);
      this._socket.write(command2 + "\r\n", this.encoding);
    }
    request(command2) {
      return this.handle(command2, (res, task) => {
        if (res instanceof Error) {
          task.reject(res);
        } else {
          task.resolve(res);
        }
      });
    }
    handle(command2, responseHandler) {
      if (this._task) {
        const err = new Error("User launched a task while another one is still running. Forgot to use 'await' or '.then()'?");
        err.stack += `
Running task launched at: ${this._task.stack}`;
        this.closeWithError(err);
      }
      return new Promise((resolveTask, rejectTask) => {
        this._task = {
          stack: new Error().stack || "Unknown call stack",
          responseHandler,
          resolver: {
            resolve: (arg) => {
              this._stopTrackingTask();
              resolveTask(arg);
            },
            reject: (err) => {
              this._stopTrackingTask();
              rejectTask(err);
            }
          }
        };
        if (this._closingError) {
          const err = new Error(`Client is closed because ${this._closingError.message}`);
          err.stack += `
Closing reason: ${this._closingError.stack}`;
          err.code = this._closingError.code !== void 0 ? this._closingError.code : "0";
          this._passToHandler(err);
          return;
        }
        this.socket.setTimeout(this.timeout);
        if (command2) {
          this.send(command2);
        }
      });
    }
    log(message) {
      if (this.verbose) {
        console.log(message);
      }
    }
    get hasTLS() {
      return "encrypted" in this._socket;
    }
    _stopTrackingTask() {
      this.socket.setTimeout(0);
      this._task = void 0;
    }
    _onControlSocketData(chunk) {
      this.log(`< ${chunk}`);
      const completeResponse = this._partialResponse + chunk;
      const parsed = (0, parseControlResponse_1.parseControlResponse)(completeResponse);
      this._partialResponse = parsed.rest;
      for (const message of parsed.messages) {
        const code2 = parseInt(message.substr(0, 3), 10);
        const response = { code: code2, message };
        const err = code2 >= 400 ? new FTPError(response) : void 0;
        this._passToHandler(err ? err : response);
      }
    }
    _passToHandler(response) {
      if (this._task) {
        this._task.responseHandler(response, this._task.resolver);
      }
    }
    _setupDefaultErrorHandlers(socket, identifier) {
      socket.once("error", (error) => {
        error.message += ` (${identifier})`;
        this.closeWithError(error);
      });
      socket.once("close", (hadError) => {
        if (hadError) {
          this.closeWithError(new Error(`Socket closed due to transmission error (${identifier})`));
        }
      });
      socket.once("timeout", () => {
        socket.destroy();
        this.closeWithError(new Error(`Timeout (${identifier})`));
      });
    }
    _closeControlSocket() {
      this._removeSocketListeners(this._socket);
      this._socket.on("error", doNothing);
      this.send("QUIT");
      this._closeSocket(this._socket);
    }
    _closeSocket(socket) {
      if (socket) {
        this._removeSocketListeners(socket);
        socket.on("error", doNothing);
        socket.destroy();
      }
    }
    _removeSocketListeners(socket) {
      socket.removeAllListeners();
      socket.removeAllListeners("timeout");
      socket.removeAllListeners("data");
      socket.removeAllListeners("end");
      socket.removeAllListeners("error");
      socket.removeAllListeners("close");
      socket.removeAllListeners("connect");
    }
    _newSocket() {
      return new net_1.Socket();
    }
  }
  FtpContext.FTPContext = FTPContext;
  return FtpContext;
}
function requireFileInfo() {
  if (hasRequiredFileInfo) return FileInfo;
  hasRequiredFileInfo = 1;
  Object.defineProperty(FileInfo, "__esModule", { value: true });
  FileInfo.FileInfo = FileInfo.FileType = void 0;
  var FileType;
  (function(FileType2) {
    FileType2[FileType2["Unknown"] = 0] = "Unknown";
    FileType2[FileType2["File"] = 1] = "File";
    FileType2[FileType2["Directory"] = 2] = "Directory";
    FileType2[FileType2["SymbolicLink"] = 3] = "SymbolicLink";
  })(FileType || (FileInfo.FileType = FileType = {}));
  let FileInfo$1 = class FileInfo {
    constructor(name) {
      this.name = name;
      this.type = FileType.Unknown;
      this.size = 0;
      this.rawModifiedAt = "";
      this.modifiedAt = void 0;
      this.permissions = void 0;
      this.hardLinkCount = void 0;
      this.link = void 0;
      this.group = void 0;
      this.user = void 0;
      this.uniqueID = void 0;
      this.name = name;
    }
    get isDirectory() {
      return this.type === FileType.Directory;
    }
    get isSymbolicLink() {
      return this.type === FileType.SymbolicLink;
    }
    get isFile() {
      return this.type === FileType.File;
    }
    get date() {
      return this.rawModifiedAt;
    }
    set date(rawModifiedAt) {
      this.rawModifiedAt = rawModifiedAt;
    }
  };
  FileInfo.FileInfo = FileInfo$1;
  FileInfo$1.UnixPermission = {
    Read: 4,
    Write: 2,
    Execute: 1
  };
  return FileInfo;
}
function requireParseListDOS() {
  if (hasRequiredParseListDOS) return parseListDOS;
  hasRequiredParseListDOS = 1;
  Object.defineProperty(parseListDOS, "__esModule", { value: true });
  parseListDOS.testLine = testLine;
  parseListDOS.parseLine = parseLine2;
  parseListDOS.transformList = transformList;
  const FileInfo_1 = requireFileInfo();
  const RE_LINE = new RegExp(
    "(\\S+)\\s+(\\S+)\\s+(?:(<DIR>)|([0-9]+))\\s+(\\S.*)"
  );
  function testLine(line) {
    return /^\d{2}/.test(line) && RE_LINE.test(line);
  }
  function parseLine2(line) {
    const groups = line.match(RE_LINE);
    if (groups === null) {
      return void 0;
    }
    const name = groups[5];
    if (name === "." || name === "..") {
      return void 0;
    }
    const file2 = new FileInfo_1.FileInfo(name);
    const fileType = groups[3];
    if (fileType === "<DIR>") {
      file2.type = FileInfo_1.FileType.Directory;
      file2.size = 0;
    } else {
      file2.type = FileInfo_1.FileType.File;
      file2.size = parseInt(groups[4], 10);
    }
    file2.rawModifiedAt = groups[1] + " " + groups[2];
    return file2;
  }
  function transformList(files) {
    return files;
  }
  return parseListDOS;
}
function requireParseListUnix() {
  if (hasRequiredParseListUnix) return parseListUnix;
  hasRequiredParseListUnix = 1;
  Object.defineProperty(parseListUnix, "__esModule", { value: true });
  parseListUnix.testLine = testLine;
  parseListUnix.parseLine = parseLine2;
  parseListUnix.transformList = transformList;
  const FileInfo_1 = requireFileInfo();
  const JA_MONTH = "\u6708";
  const JA_DAY = "\u65E5";
  const JA_YEAR = "\u5E74";
  const RE_LINE = new RegExp("([bcdelfmpSs-])(((r|-)(w|-)([xsStTL-]))((r|-)(w|-)([xsStTL-]))((r|-)(w|-)([xsStTL-]?)))\\+?\\s*(\\d+)\\s+(?:(\\S+(?:\\s\\S+)*?)\\s+)?(?:(\\S+(?:\\s\\S+)*)\\s+)?(\\d+(?:,\\s*\\d+)?)\\s+((?:\\d+[-/]\\d+[-/]\\d+)|(?:\\S{3}\\s+\\d{1,2})|(?:\\d{1,2}\\s+\\S{3})|(?:\\d{1,2}" + JA_MONTH + "\\s+\\d{1,2}" + JA_DAY + "))\\s+((?:\\d+(?::\\d+)?)|(?:\\d{4}" + JA_YEAR + "))\\s(.*)");
  function testLine(line) {
    return RE_LINE.test(line);
  }
  function parseLine2(line) {
    const groups = line.match(RE_LINE);
    if (groups === null) {
      return void 0;
    }
    const name = groups[21];
    if (name === "." || name === "..") {
      return void 0;
    }
    const file2 = new FileInfo_1.FileInfo(name);
    file2.size = parseInt(groups[18], 10);
    file2.user = groups[16];
    file2.group = groups[17];
    file2.hardLinkCount = parseInt(groups[15], 10);
    file2.rawModifiedAt = groups[19] + " " + groups[20];
    file2.permissions = {
      user: parseMode(groups[4], groups[5], groups[6]),
      group: parseMode(groups[8], groups[9], groups[10]),
      world: parseMode(groups[12], groups[13], groups[14])
    };
    switch (groups[1].charAt(0)) {
      case "d":
        file2.type = FileInfo_1.FileType.Directory;
        break;
      case "e":
        file2.type = FileInfo_1.FileType.SymbolicLink;
        break;
      case "l":
        file2.type = FileInfo_1.FileType.SymbolicLink;
        break;
      case "b":
      case "c":
        file2.type = FileInfo_1.FileType.File;
        break;
      case "f":
      case "-":
        file2.type = FileInfo_1.FileType.File;
        break;
      default:
        file2.type = FileInfo_1.FileType.Unknown;
    }
    if (file2.isSymbolicLink) {
      const end = name.indexOf(" -> ");
      if (end !== -1) {
        file2.name = name.substring(0, end);
        file2.link = name.substring(end + 4);
      }
    }
    return file2;
  }
  function transformList(files) {
    return files;
  }
  function parseMode(r, w, x) {
    let value = 0;
    if (r !== "-") {
      value += FileInfo_1.FileInfo.UnixPermission.Read;
    }
    if (w !== "-") {
      value += FileInfo_1.FileInfo.UnixPermission.Write;
    }
    const execToken = x.charAt(0);
    if (execToken !== "-" && execToken.toUpperCase() !== execToken) {
      value += FileInfo_1.FileInfo.UnixPermission.Execute;
    }
    return value;
  }
  return parseListUnix;
}
function requireParseListMLSD() {
  if (hasRequiredParseListMLSD) return parseListMLSD;
  hasRequiredParseListMLSD = 1;
  Object.defineProperty(parseListMLSD, "__esModule", { value: true });
  parseListMLSD.testLine = testLine;
  parseListMLSD.parseLine = parseLine2;
  parseListMLSD.transformList = transformList;
  parseListMLSD.parseMLSxDate = parseMLSxDate;
  const FileInfo_1 = requireFileInfo();
  function parseSize(value, info) {
    info.size = parseInt(value, 10);
  }
  const factHandlersByName = {
    "size": parseSize,
    "sizd": parseSize,
    "unique": (value, info) => {
      info.uniqueID = value;
    },
    "modify": (value, info) => {
      info.modifiedAt = parseMLSxDate(value);
      info.rawModifiedAt = info.modifiedAt.toISOString();
    },
    "type": (value, info) => {
      if (value.startsWith("OS.unix=slink")) {
        info.type = FileInfo_1.FileType.SymbolicLink;
        info.link = value.substr(value.indexOf(":") + 1);
        return 1;
      }
      switch (value) {
        case "file":
          info.type = FileInfo_1.FileType.File;
          break;
        case "dir":
          info.type = FileInfo_1.FileType.Directory;
          break;
        case "OS.unix=symlink":
          info.type = FileInfo_1.FileType.SymbolicLink;
          break;
        case "cdir":
        case "pdir":
          return 2;
        default:
          info.type = FileInfo_1.FileType.Unknown;
      }
      return 1;
    },
    "unix.mode": (value, info) => {
      const digits = value.substr(-3);
      info.permissions = {
        user: parseInt(digits[0], 10),
        group: parseInt(digits[1], 10),
        world: parseInt(digits[2], 10)
      };
    },
    "unix.ownername": (value, info) => {
      info.user = value;
    },
    "unix.owner": (value, info) => {
      if (info.user === void 0)
        info.user = value;
    },
    get "unix.uid"() {
      return this["unix.owner"];
    },
    "unix.groupname": (value, info) => {
      info.group = value;
    },
    "unix.group": (value, info) => {
      if (info.group === void 0)
        info.group = value;
    },
    get "unix.gid"() {
      return this["unix.group"];
    }
  };
  function splitStringOnce(str, delimiter) {
    const pos = str.indexOf(delimiter);
    const a = str.substr(0, pos);
    const b = str.substr(pos + delimiter.length);
    return [a, b];
  }
  function testLine(line) {
    return /^\S+=\S+;/.test(line) || line.startsWith(" ");
  }
  function parseLine2(line) {
    const [packedFacts, name] = splitStringOnce(line, " ");
    if (name === "" || name === "." || name === "..") {
      return void 0;
    }
    const info = new FileInfo_1.FileInfo(name);
    const facts = packedFacts.split(";");
    for (const fact of facts) {
      const [factName, factValue] = splitStringOnce(fact, "=");
      if (!factValue) {
        continue;
      }
      const factHandler = factHandlersByName[factName.toLowerCase()];
      if (!factHandler) {
        continue;
      }
      const result = factHandler(factValue, info);
      if (result === 2) {
        return void 0;
      }
    }
    return info;
  }
  function transformList(files) {
    const nonLinksByID = /* @__PURE__ */ new Map();
    for (const file2 of files) {
      if (!file2.isSymbolicLink && file2.uniqueID !== void 0) {
        nonLinksByID.set(file2.uniqueID, file2);
      }
    }
    const resolvedFiles = [];
    for (const file2 of files) {
      if (file2.isSymbolicLink && file2.uniqueID !== void 0 && file2.link === void 0) {
        const target = nonLinksByID.get(file2.uniqueID);
        if (target !== void 0) {
          file2.link = target.name;
        }
      }
      const isPartOfDirectory = !file2.name.includes("/");
      if (isPartOfDirectory) {
        resolvedFiles.push(file2);
      }
    }
    return resolvedFiles;
  }
  function parseMLSxDate(fact) {
    return new Date(Date.UTC(
      +fact.slice(0, 4),
      +fact.slice(4, 6) - 1,
      +fact.slice(6, 8),
      +fact.slice(8, 10),
      +fact.slice(10, 12),
      +fact.slice(12, 14),
      +fact.slice(15, 18)
    ));
  }
  return parseListMLSD;
}
function requireParseList() {
  if (hasRequiredParseList) return parseList;
  hasRequiredParseList = 1;
  var __createBinding5 = parseList && parseList.__createBinding || (Object.create ? function(o, m, k, k2) {
    if (k2 === void 0) k2 = k;
    var desc = Object.getOwnPropertyDescriptor(m, k);
    if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
      desc = { enumerable: true, get: function() {
        return m[k];
      } };
    }
    Object.defineProperty(o, k2, desc);
  } : function(o, m, k, k2) {
    if (k2 === void 0) k2 = k;
    o[k2] = m[k];
  });
  var __setModuleDefault5 = parseList && parseList.__setModuleDefault || (Object.create ? function(o, v) {
    Object.defineProperty(o, "default", { enumerable: true, value: v });
  } : function(o, v) {
    o["default"] = v;
  });
  var __importStar5 = parseList && parseList.__importStar || /* @__PURE__ */ function() {
    var ownKeys2 = function(o) {
      ownKeys2 = Object.getOwnPropertyNames || function(o2) {
        var ar = [];
        for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k;
        return ar;
      };
      return ownKeys2(o);
    };
    return function(mod2) {
      if (mod2 && mod2.__esModule) return mod2;
      var result = {};
      if (mod2 != null) {
        for (var k = ownKeys2(mod2), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding5(result, mod2, k[i]);
      }
      __setModuleDefault5(result, mod2);
      return result;
    };
  }();
  Object.defineProperty(parseList, "__esModule", { value: true });
  parseList.parseList = parseList$1;
  const dosParser = __importStar5(requireParseListDOS());
  const unixParser = __importStar5(requireParseListUnix());
  const mlsdParser = __importStar5(requireParseListMLSD());
  const availableParsers = [
    dosParser,
    unixParser,
    mlsdParser
  ];
  function firstCompatibleParser(line, parsers) {
    return parsers.find((parser2) => parser2.testLine(line) === true);
  }
  function isNotBlank(str) {
    return str.trim() !== "";
  }
  function isNotMeta(str) {
    return !str.startsWith("total");
  }
  const REGEX_NEWLINE = /\r?\n/;
  function parseList$1(rawList) {
    const lines = rawList.split(REGEX_NEWLINE).filter(isNotBlank).filter(isNotMeta);
    if (lines.length === 0) {
      return [];
    }
    const testLine = lines[lines.length - 1];
    const parser2 = firstCompatibleParser(testLine, availableParsers);
    if (!parser2) {
      throw new Error("This library only supports MLSD, Unix- or DOS-style directory listing. Your FTP server seems to be using another format. You can see the transmitted listing when setting `client.ftp.verbose = true`. You can then provide a custom parser to `client.parseList`, see the documentation for details.");
    }
    const files = lines.map(parser2.parseLine).filter((info) => info !== void 0);
    return parser2.transformList(files);
  }
  return parseList;
}
function requireProgressTracker() {
  if (hasRequiredProgressTracker) return ProgressTracker;
  hasRequiredProgressTracker = 1;
  Object.defineProperty(ProgressTracker, "__esModule", { value: true });
  ProgressTracker.ProgressTracker = void 0;
  let ProgressTracker$1 = class ProgressTracker {
    constructor() {
      this.bytesOverall = 0;
      this.intervalMs = 500;
      this.onStop = noop3;
      this.onHandle = noop3;
    }
    reportTo(onHandle = noop3) {
      this.onHandle = onHandle;
    }
    start(socket, name, type2) {
      let lastBytes = 0;
      this.onStop = poll(this.intervalMs, () => {
        const bytes2 = socket.bytesRead + socket.bytesWritten;
        this.bytesOverall += bytes2 - lastBytes;
        lastBytes = bytes2;
        this.onHandle({
          name,
          type: type2,
          bytes: bytes2,
          bytesOverall: this.bytesOverall
        });
      });
    }
    stop() {
      this.onStop(false);
    }
    updateAndStop() {
      this.onStop(true);
    }
  };
  ProgressTracker.ProgressTracker = ProgressTracker$1;
  function poll(intervalMs, updateFunc) {
    const id2 = setInterval(updateFunc, intervalMs);
    const stopFunc = (stopWithUpdate) => {
      clearInterval(id2);
      if (stopWithUpdate) {
        updateFunc();
      }
      updateFunc = noop3;
    };
    updateFunc();
    return stopFunc;
  }
  function noop3() {
  }
  return ProgressTracker;
}
function requireStringWriter() {
  if (hasRequiredStringWriter) return StringWriter;
  hasRequiredStringWriter = 1;
  Object.defineProperty(StringWriter, "__esModule", { value: true });
  StringWriter.StringWriter = void 0;
  const stream_1 = require$$1$3;
  let StringWriter$1 = class StringWriter extends stream_1.Writable {
    constructor() {
      super(...arguments);
      this.buf = Buffer.alloc(0);
    }
    _write(chunk, _, callback) {
      if (chunk instanceof Buffer) {
        this.buf = Buffer.concat([this.buf, chunk]);
        callback(null);
      } else {
        callback(new Error("StringWriter expects chunks of type 'Buffer'."));
      }
    }
    getText(encoding) {
      return this.buf.toString(encoding);
    }
  };
  StringWriter.StringWriter = StringWriter$1;
  return StringWriter;
}
function requireNetUtils() {
  if (hasRequiredNetUtils) return netUtils;
  hasRequiredNetUtils = 1;
  Object.defineProperty(netUtils, "__esModule", { value: true });
  netUtils.describeTLS = describeTLS;
  netUtils.describeAddress = describeAddress;
  netUtils.upgradeSocket = upgradeSocket;
  netUtils.ipIsPrivateV4Address = ipIsPrivateV4Address;
  const tls_1 = require$$1$2;
  function describeTLS(socket) {
    if (socket instanceof tls_1.TLSSocket) {
      const protocol2 = socket.getProtocol();
      return protocol2 ? protocol2 : "Server socket or disconnected client socket";
    }
    return "No encryption";
  }
  function describeAddress(socket) {
    if (socket.remoteFamily === "IPv6") {
      return `[${socket.remoteAddress}]:${socket.remotePort}`;
    }
    return `${socket.remoteAddress}:${socket.remotePort}`;
  }
  function upgradeSocket(socket, options2) {
    return new Promise((resolve2, reject) => {
      const tlsOptions = Object.assign({}, options2, {
        socket
      });
      const tlsSocket = (0, tls_1.connect)(tlsOptions, () => {
        const expectCertificate = tlsOptions.rejectUnauthorized !== false;
        if (expectCertificate && !tlsSocket.authorized) {
          reject(tlsSocket.authorizationError);
        } else {
          tlsSocket.removeAllListeners("error");
          resolve2(tlsSocket);
        }
      }).once("error", (error) => {
        reject(error);
      });
    });
  }
  function ipIsPrivateV4Address(ip2 = "") {
    if (ip2.startsWith("::ffff:")) {
      ip2 = ip2.substr(7);
    }
    const octets = ip2.split(".").map((o) => parseInt(o, 10));
    return octets[0] === 10 || octets[0] === 172 && octets[1] >= 16 && octets[1] <= 31 || octets[0] === 192 && octets[1] === 168 || ip2 === "127.0.0.1";
  }
  return netUtils;
}
function requireTransfer() {
  if (hasRequiredTransfer) return transfer;
  hasRequiredTransfer = 1;
  Object.defineProperty(transfer, "__esModule", { value: true });
  transfer.enterPassiveModeIPv6 = enterPassiveModeIPv6;
  transfer.parseEpsvResponse = parseEpsvResponse;
  transfer.enterPassiveModeIPv4 = enterPassiveModeIPv4;
  transfer.enterPassiveModeIPv4_forceControlHostIP = enterPassiveModeIPv4_forceControlHostIP;
  transfer.parsePasvResponse = parsePasvResponse;
  transfer.connectForPassiveTransfer = connectForPassiveTransfer;
  transfer.uploadFrom = uploadFrom;
  transfer.downloadTo = downloadTo;
  const netUtils_1 = requireNetUtils();
  const stream_1 = require$$1$3;
  const tls_1 = require$$1$2;
  const parseControlResponse_1 = requireParseControlResponse();
  async function enterPassiveModeIPv6(ftp2) {
    const res = await ftp2.request("EPSV");
    const port = parseEpsvResponse(res.message);
    if (!port) {
      throw new Error("Can't parse EPSV response: " + res.message);
    }
    const controlHost = ftp2.socket.remoteAddress;
    if (controlHost === void 0) {
      throw new Error("Control socket is disconnected, can't get remote address.");
    }
    await connectForPassiveTransfer(controlHost, port, ftp2);
    return res;
  }
  function parseEpsvResponse(message) {
    const groups = message.match(/[|!]{3}(.+)[|!]/);
    if (groups === null || groups[1] === void 0) {
      throw new Error(`Can't parse response to 'EPSV': ${message}`);
    }
    const port = parseInt(groups[1], 10);
    if (Number.isNaN(port)) {
      throw new Error(`Can't parse response to 'EPSV', port is not a number: ${message}`);
    }
    return port;
  }
  async function enterPassiveModeIPv4(ftp2) {
    const res = await ftp2.request("PASV");
    const target = parsePasvResponse(res.message);
    if (!target) {
      throw new Error("Can't parse PASV response: " + res.message);
    }
    const controlHost = ftp2.socket.remoteAddress;
    if ((0, netUtils_1.ipIsPrivateV4Address)(target.host) && controlHost && !(0, netUtils_1.ipIsPrivateV4Address)(controlHost)) {
      target.host = controlHost;
    }
    await connectForPassiveTransfer(target.host, target.port, ftp2);
    return res;
  }
  async function enterPassiveModeIPv4_forceControlHostIP(ftp2) {
    const res = await ftp2.request("PASV");
    const target = parsePasvResponse(res.message);
    if (!target) {
      throw new Error("Can't parse PASV response: " + res.message);
    }
    const controlHost = ftp2.socket.remoteAddress;
    if (controlHost === void 0) {
      throw new Error("Control socket is disconnected, can't get remote address.");
    }
    await connectForPassiveTransfer(controlHost, target.port, ftp2);
    return res;
  }
  function parsePasvResponse(message) {
    const groups = message.match(/([-\d]+,[-\d]+,[-\d]+,[-\d]+),([-\d]+),([-\d]+)/);
    if (groups === null || groups.length !== 4) {
      throw new Error(`Can't parse response to 'PASV': ${message}`);
    }
    return {
      host: groups[1].replace(/,/g, "."),
      port: (parseInt(groups[2], 10) & 255) * 256 + (parseInt(groups[3], 10) & 255)
    };
  }
  function connectForPassiveTransfer(host, port, ftp2) {
    return new Promise((resolve2, reject) => {
      let socket = ftp2._newSocket();
      const handleConnErr = function(err) {
        err.message = "Can't open data connection in passive mode: " + err.message;
        reject(err);
      };
      const handleTimeout = function() {
        socket.destroy();
        reject(new Error(`Timeout when trying to open data connection to ${host}:${port}`));
      };
      socket.setTimeout(ftp2.timeout);
      socket.on("error", handleConnErr);
      socket.on("timeout", handleTimeout);
      socket.connect({ port, host, family: ftp2.ipFamily }, () => {
        if (ftp2.socket instanceof tls_1.TLSSocket) {
          socket = (0, tls_1.connect)(Object.assign({}, ftp2.tlsOptions, {
            socket,
            session: ftp2.socket.getSession()
          }));
        }
        socket.removeListener("error", handleConnErr);
        socket.removeListener("timeout", handleTimeout);
        ftp2.dataSocket = socket;
        resolve2();
      });
    });
  }
  class TransferResolver {
    constructor(ftp2, progress2) {
      this.ftp = ftp2;
      this.progress = progress2;
      this.response = void 0;
      this.dataTransferDone = false;
    }
    onDataStart(name, type2) {
      if (this.ftp.dataSocket === void 0) {
        throw new Error("Data transfer should start but there is no data connection.");
      }
      this.ftp.socket.setTimeout(0);
      this.ftp.dataSocket.setTimeout(this.ftp.timeout);
      this.progress.start(this.ftp.dataSocket, name, type2);
    }
    onDataDone(task) {
      this.progress.updateAndStop();
      this.ftp.socket.setTimeout(this.ftp.timeout);
      if (this.ftp.dataSocket) {
        this.ftp.dataSocket.setTimeout(0);
      }
      this.dataTransferDone = true;
      this.tryResolve(task);
    }
    onControlDone(task, response) {
      this.response = response;
      this.tryResolve(task);
    }
    onError(task, err) {
      this.progress.updateAndStop();
      this.ftp.socket.setTimeout(this.ftp.timeout);
      this.ftp.dataSocket = void 0;
      task.reject(err);
    }
    onUnexpectedRequest(response) {
      const err = new Error(`Unexpected FTP response is requesting an answer: ${response.message}`);
      this.ftp.closeWithError(err);
    }
    tryResolve(task) {
      const canResolve = this.dataTransferDone && this.response !== void 0;
      if (canResolve) {
        this.ftp.dataSocket = void 0;
        task.resolve(this.response);
      }
    }
  }
  function uploadFrom(source2, config4) {
    const resolver = new TransferResolver(config4.ftp, config4.tracker);
    const fullCommand = `${config4.command} ${config4.remotePath}`;
    return config4.ftp.handle(fullCommand, (res, task) => {
      if (res instanceof Error) {
        resolver.onError(task, res);
      } else if (res.code === 150 || res.code === 125) {
        const dataSocket = config4.ftp.dataSocket;
        if (!dataSocket) {
          resolver.onError(task, new Error("Upload should begin but no data connection is available."));
          return;
        }
        const canUpload = "getCipher" in dataSocket ? dataSocket.getCipher() !== void 0 : true;
        onConditionOrEvent(canUpload, dataSocket, "secureConnect", () => {
          config4.ftp.log(`Uploading to ${(0, netUtils_1.describeAddress)(dataSocket)} (${(0, netUtils_1.describeTLS)(dataSocket)})`);
          resolver.onDataStart(config4.remotePath, config4.type);
          (0, stream_1.pipeline)(source2, dataSocket, (err) => {
            if (err) {
              resolver.onError(task, err);
            } else {
              resolver.onDataDone(task);
            }
          });
        });
      } else if ((0, parseControlResponse_1.positiveCompletion)(res.code)) {
        resolver.onControlDone(task, res);
      } else if ((0, parseControlResponse_1.positiveIntermediate)(res.code)) {
        resolver.onUnexpectedRequest(res);
      }
    });
  }
  function downloadTo(destination, config4) {
    if (!config4.ftp.dataSocket) {
      throw new Error("Download will be initiated but no data connection is available.");
    }
    const resolver = new TransferResolver(config4.ftp, config4.tracker);
    return config4.ftp.handle(config4.command, (res, task) => {
      if (res instanceof Error) {
        resolver.onError(task, res);
      } else if (res.code === 150 || res.code === 125) {
        const dataSocket = config4.ftp.dataSocket;
        if (!dataSocket) {
          resolver.onError(task, new Error("Download should begin but no data connection is available."));
          return;
        }
        config4.ftp.log(`Downloading from ${(0, netUtils_1.describeAddress)(dataSocket)} (${(0, netUtils_1.describeTLS)(dataSocket)})`);
        resolver.onDataStart(config4.remotePath, config4.type);
        (0, stream_1.pipeline)(dataSocket, destination, (err) => {
          if (err) {
            resolver.onError(task, err);
          } else {
            resolver.onDataDone(task);
          }
        });
      } else if (res.code === 350) {
        config4.ftp.send("RETR " + config4.remotePath);
      } else if ((0, parseControlResponse_1.positiveCompletion)(res.code)) {
        resolver.onControlDone(task, res);
      } else if ((0, parseControlResponse_1.positiveIntermediate)(res.code)) {
        resolver.onUnexpectedRequest(res);
      }
    });
  }
  function onConditionOrEvent(condition, emitter, eventName, action) {
    if (condition === true) {
      action();
    } else {
      emitter.once(eventName, () => action());
    }
  }
  return transfer;
}
function requireClient() {
  if (hasRequiredClient) return Client;
  hasRequiredClient = 1;
  Object.defineProperty(Client, "__esModule", { value: true });
  Client.Client = void 0;
  const fs_1 = require$$0$3;
  const path_1 = require$$0$4;
  const tls_1 = require$$1$2;
  const util_1 = require$$0$2;
  const FtpContext_1 = requireFtpContext();
  const parseList_1 = requireParseList();
  const ProgressTracker_1 = requireProgressTracker();
  const StringWriter_1 = requireStringWriter();
  const parseListMLSD_1 = requireParseListMLSD();
  const netUtils_1 = requireNetUtils();
  const transfer_1 = requireTransfer();
  const parseControlResponse_1 = requireParseControlResponse();
  const fsReadDir = (0, util_1.promisify)(fs_1.readdir);
  const fsMkDir = (0, util_1.promisify)(fs_1.mkdir);
  const fsStat = (0, util_1.promisify)(fs_1.stat);
  const fsOpen = (0, util_1.promisify)(fs_1.open);
  const fsClose = (0, util_1.promisify)(fs_1.close);
  const fsUnlink = (0, util_1.promisify)(fs_1.unlink);
  const defaultClientOptions = {
    allowSeparateTransferHost: true
  };
  const LIST_COMMANDS_DEFAULT = () => ["LIST -a", "LIST"];
  const LIST_COMMANDS_MLSD = () => ["MLSD", "LIST -a", "LIST"];
  let Client$1 = class Client {
    constructor(timeout2 = 3e4, options2 = defaultClientOptions) {
      this.availableListCommands = LIST_COMMANDS_DEFAULT();
      this.ftp = new FtpContext_1.FTPContext(timeout2);
      this.prepareTransfer = this._enterFirstCompatibleMode([
        transfer_1.enterPassiveModeIPv6,
        options2.allowSeparateTransferHost ? transfer_1.enterPassiveModeIPv4 : transfer_1.enterPassiveModeIPv4_forceControlHostIP
      ]);
      this.parseList = parseList_1.parseList;
      this._progressTracker = new ProgressTracker_1.ProgressTracker();
    }
    close() {
      this.ftp.close();
      this._progressTracker.stop();
    }
    get closed() {
      return this.ftp.closed;
    }
    connect(host = "localhost", port = 21) {
      this.ftp.reset();
      this.ftp.socket.connect({
        host,
        port,
        family: this.ftp.ipFamily
      }, () => this.ftp.log(`Connected to ${(0, netUtils_1.describeAddress)(this.ftp.socket)} (${(0, netUtils_1.describeTLS)(this.ftp.socket)})`));
      return this._handleConnectResponse();
    }
    connectImplicitTLS(host = "localhost", port = 21, tlsOptions = {}) {
      this.ftp.reset();
      this.ftp.socket = (0, tls_1.connect)(port, host, tlsOptions, () => this.ftp.log(`Connected to ${(0, netUtils_1.describeAddress)(this.ftp.socket)} (${(0, netUtils_1.describeTLS)(this.ftp.socket)})`));
      this.ftp.tlsOptions = tlsOptions;
      return this._handleConnectResponse();
    }
    _handleConnectResponse() {
      return this.ftp.handle(void 0, (res, task) => {
        if (res instanceof Error) {
          task.reject(res);
        } else if ((0, parseControlResponse_1.positiveCompletion)(res.code)) {
          task.resolve(res);
        } else {
          task.reject(new FtpContext_1.FTPError(res));
        }
      });
    }
    send(command2, ignoreErrorCodesDEPRECATED = false) {
      if (ignoreErrorCodesDEPRECATED) {
        this.ftp.log("Deprecated call using send(command, flag) with boolean flag to ignore errors. Use sendIgnoringError(command).");
        return this.sendIgnoringError(command2);
      }
      return this.ftp.request(command2);
    }
    sendIgnoringError(command2) {
      return this.ftp.handle(command2, (res, task) => {
        if (res instanceof FtpContext_1.FTPError) {
          task.resolve({ code: res.code, message: res.message });
        } else if (res instanceof Error) {
          task.reject(res);
        } else {
          task.resolve(res);
        }
      });
    }
    async useTLS(options2 = {}, command2 = "AUTH TLS") {
      const ret = await this.send(command2);
      this.ftp.socket = await (0, netUtils_1.upgradeSocket)(this.ftp.socket, options2);
      this.ftp.tlsOptions = options2;
      this.ftp.log(`Control socket is using: ${(0, netUtils_1.describeTLS)(this.ftp.socket)}`);
      return ret;
    }
    login(user = "anonymous", password = "guest") {
      this.ftp.log(`Login security: ${(0, netUtils_1.describeTLS)(this.ftp.socket)}`);
      return this.ftp.handle("USER " + user, (res, task) => {
        if (res instanceof Error) {
          task.reject(res);
        } else if ((0, parseControlResponse_1.positiveCompletion)(res.code)) {
          task.resolve(res);
        } else if (res.code === 331) {
          this.ftp.send("PASS " + password);
        } else {
          task.reject(new FtpContext_1.FTPError(res));
        }
      });
    }
    async useDefaultSettings() {
      const features = await this.features();
      const supportsMLSD = features.has("MLST");
      this.availableListCommands = supportsMLSD ? LIST_COMMANDS_MLSD() : LIST_COMMANDS_DEFAULT();
      await this.send("TYPE I");
      await this.sendIgnoringError("STRU F");
      await this.sendIgnoringError("OPTS UTF8 ON");
      if (supportsMLSD) {
        await this.sendIgnoringError("OPTS MLST type;size;modify;unique;unix.mode;unix.owner;unix.group;unix.ownername;unix.groupname;");
      }
      if (this.ftp.hasTLS) {
        await this.sendIgnoringError("PBSZ 0");
        await this.sendIgnoringError("PROT P");
      }
    }
    async access(options2 = {}) {
      var _a4, _b2;
      const useExplicitTLS = options2.secure === true;
      const useImplicitTLS = options2.secure === "implicit";
      let welcome;
      if (useImplicitTLS) {
        welcome = await this.connectImplicitTLS(options2.host, options2.port, options2.secureOptions);
      } else {
        welcome = await this.connect(options2.host, options2.port);
      }
      if (useExplicitTLS) {
        const secureOptions = (_a4 = options2.secureOptions) !== null && _a4 !== void 0 ? _a4 : {};
        secureOptions.host = (_b2 = secureOptions.host) !== null && _b2 !== void 0 ? _b2 : options2.host;
        await this.useTLS(secureOptions);
      }
      await this.sendIgnoringError("OPTS UTF8 ON");
      await this.login(options2.user, options2.password);
      await this.useDefaultSettings();
      return welcome;
    }
    async pwd() {
      const res = await this.send("PWD");
      const parsed = res.message.match(/"(.+)"/);
      if (parsed === null || parsed[1] === void 0) {
        throw new Error(`Can't parse response to command 'PWD': ${res.message}`);
      }
      return parsed[1];
    }
    async features() {
      const res = await this.sendIgnoringError("FEAT");
      const features = /* @__PURE__ */ new Map();
      if (res.code < 400 && (0, parseControlResponse_1.isMultiline)(res.message)) {
        res.message.split("\n").slice(1, -1).forEach((line) => {
          const entry = line.trim().split(" ");
          features.set(entry[0], entry[1] || "");
        });
      }
      return features;
    }
    async cd(path14) {
      const validPath = await this.protectWhitespace(path14);
      return this.send("CWD " + validPath);
    }
    async cdup() {
      return this.send("CDUP");
    }
    async lastMod(path14) {
      const validPath = await this.protectWhitespace(path14);
      const res = await this.send(`MDTM ${validPath}`);
      const date2 = res.message.slice(4);
      return (0, parseListMLSD_1.parseMLSxDate)(date2);
    }
    async size(path14) {
      const validPath = await this.protectWhitespace(path14);
      const command2 = `SIZE ${validPath}`;
      const res = await this.send(command2);
      const size = parseInt(res.message.slice(4), 10);
      if (Number.isNaN(size)) {
        throw new Error(`Can't parse response to command '${command2}' as a numerical value: ${res.message}`);
      }
      return size;
    }
    async rename(srcPath, destPath) {
      const validSrc = await this.protectWhitespace(srcPath);
      const validDest = await this.protectWhitespace(destPath);
      await this.send("RNFR " + validSrc);
      return this.send("RNTO " + validDest);
    }
    async remove(path14, ignoreErrorCodes = false) {
      const validPath = await this.protectWhitespace(path14);
      if (ignoreErrorCodes) {
        return this.sendIgnoringError(`DELE ${validPath}`);
      }
      return this.send(`DELE ${validPath}`);
    }
    trackProgress(handler) {
      this._progressTracker.bytesOverall = 0;
      this._progressTracker.reportTo(handler);
    }
    async uploadFrom(source2, toRemotePath, options2 = {}) {
      return this._uploadWithCommand(source2, toRemotePath, "STOR", options2);
    }
    async appendFrom(source2, toRemotePath, options2 = {}) {
      return this._uploadWithCommand(source2, toRemotePath, "APPE", options2);
    }
    async _uploadWithCommand(source2, remotePath, command2, options2) {
      if (typeof source2 === "string") {
        return this._uploadLocalFile(source2, remotePath, command2, options2);
      }
      return this._uploadFromStream(source2, remotePath, command2);
    }
    async _uploadLocalFile(localPath, remotePath, command2, options2) {
      const fd = await fsOpen(localPath, "r");
      const source2 = (0, fs_1.createReadStream)("", {
        fd,
        start: options2.localStart,
        end: options2.localEndInclusive,
        autoClose: false
      });
      try {
        return await this._uploadFromStream(source2, remotePath, command2);
      } finally {
        await ignoreError(() => fsClose(fd));
      }
    }
    async _uploadFromStream(source2, remotePath, command2) {
      const onError = (err) => this.ftp.closeWithError(err);
      source2.once("error", onError);
      try {
        const validPath = await this.protectWhitespace(remotePath);
        await this.prepareTransfer(this.ftp);
        return await (0, transfer_1.uploadFrom)(source2, {
          ftp: this.ftp,
          tracker: this._progressTracker,
          command: command2,
          remotePath: validPath,
          type: "upload"
        });
      } finally {
        source2.removeListener("error", onError);
      }
    }
    async downloadTo(destination, fromRemotePath, startAt = 0) {
      if (typeof destination === "string") {
        return this._downloadToFile(destination, fromRemotePath, startAt);
      }
      return this._downloadToStream(destination, fromRemotePath, startAt);
    }
    async _downloadToFile(localPath, remotePath, startAt) {
      const appendingToLocalFile = startAt > 0;
      const fileSystemFlags = appendingToLocalFile ? "r+" : "w";
      const fd = await fsOpen(localPath, fileSystemFlags);
      const destination = (0, fs_1.createWriteStream)("", {
        fd,
        start: startAt,
        autoClose: false
      });
      try {
        return await this._downloadToStream(destination, remotePath, startAt);
      } catch (err) {
        const localFileStats = await ignoreError(() => fsStat(localPath));
        const hasDownloadedData = localFileStats && localFileStats.size > 0;
        const shouldRemoveLocalFile = !appendingToLocalFile && !hasDownloadedData;
        if (shouldRemoveLocalFile) {
          await ignoreError(() => fsUnlink(localPath));
        }
        throw err;
      } finally {
        await ignoreError(() => fsClose(fd));
      }
    }
    async _downloadToStream(destination, remotePath, startAt) {
      const onError = (err) => this.ftp.closeWithError(err);
      destination.once("error", onError);
      try {
        const validPath = await this.protectWhitespace(remotePath);
        await this.prepareTransfer(this.ftp);
        return await (0, transfer_1.downloadTo)(destination, {
          ftp: this.ftp,
          tracker: this._progressTracker,
          command: startAt > 0 ? `REST ${startAt}` : `RETR ${validPath}`,
          remotePath: validPath,
          type: "download"
        });
      } finally {
        destination.removeListener("error", onError);
        destination.end();
      }
    }
    async list(path14 = "") {
      const validPath = await this.protectWhitespace(path14);
      let lastError;
      for (const candidate of this.availableListCommands) {
        const command2 = validPath === "" ? candidate : `${candidate} ${validPath}`;
        await this.prepareTransfer(this.ftp);
        try {
          const parsedList = await this._requestListWithCommand(command2);
          this.availableListCommands = [candidate];
          return parsedList;
        } catch (err) {
          const shouldTryNext = err instanceof FtpContext_1.FTPError;
          if (!shouldTryNext) {
            throw err;
          }
          lastError = err;
        }
      }
      throw lastError;
    }
    async _requestListWithCommand(command2) {
      const buffer = new StringWriter_1.StringWriter();
      await (0, transfer_1.downloadTo)(buffer, {
        ftp: this.ftp,
        tracker: this._progressTracker,
        command: command2,
        remotePath: "",
        type: "list"
      });
      const text = buffer.getText(this.ftp.encoding);
      this.ftp.log(text);
      return this.parseList(text);
    }
    async removeDir(remoteDirPath) {
      return this._exitAtCurrentDirectory(async () => {
        await this.cd(remoteDirPath);
        const absoluteDirPath = await this.pwd();
        await this.clearWorkingDir();
        const dirIsRoot = absoluteDirPath === "/";
        if (!dirIsRoot) {
          await this.cdup();
          await this.removeEmptyDir(absoluteDirPath);
        }
      });
    }
    async clearWorkingDir() {
      for (const file2 of await this.list()) {
        if (file2.isDirectory) {
          await this.cd(file2.name);
          await this.clearWorkingDir();
          await this.cdup();
          await this.removeEmptyDir(file2.name);
        } else {
          await this.remove(file2.name);
        }
      }
    }
    async uploadFromDir(localDirPath, remoteDirPath) {
      return this._exitAtCurrentDirectory(async () => {
        if (remoteDirPath) {
          await this.ensureDir(remoteDirPath);
        }
        return await this._uploadToWorkingDir(localDirPath);
      });
    }
    async _uploadToWorkingDir(localDirPath) {
      const files = await fsReadDir(localDirPath);
      for (const file2 of files) {
        const fullPath = (0, path_1.join)(localDirPath, file2);
        const stats = await fsStat(fullPath);
        if (stats.isFile()) {
          await this.uploadFrom(fullPath, file2);
        } else if (stats.isDirectory()) {
          await this._openDir(file2);
          await this._uploadToWorkingDir(fullPath);
          await this.cdup();
        }
      }
    }
    async downloadToDir(localDirPath, remoteDirPath) {
      return this._exitAtCurrentDirectory(async () => {
        if (remoteDirPath) {
          await this.cd(remoteDirPath);
        }
        return await this._downloadFromWorkingDir(localDirPath);
      });
    }
    async _downloadFromWorkingDir(localDirPath) {
      await ensureLocalDirectory(localDirPath);
      for (const file2 of await this.list()) {
        const hasInvalidName = !file2.name || (0, path_1.basename)(file2.name) !== file2.name;
        if (hasInvalidName) {
          const safeName = JSON.stringify(file2.name);
          this.ftp.log(`Invalid filename from server listing, will skip file. (${safeName})`);
          continue;
        }
        const localPath = (0, path_1.join)(localDirPath, file2.name);
        if (file2.isDirectory) {
          await this.cd(file2.name);
          await this._downloadFromWorkingDir(localPath);
          await this.cdup();
        } else if (file2.isFile) {
          await this.downloadTo(localPath, file2.name);
        }
      }
    }
    async ensureDir(remoteDirPath) {
      if (remoteDirPath.startsWith("/")) {
        await this.cd("/");
      }
      const names3 = remoteDirPath.split("/").filter((name) => name !== "");
      for (const name of names3) {
        await this._openDir(name);
      }
    }
    async _openDir(dirName) {
      await this.sendIgnoringError("MKD " + dirName);
      await this.cd(dirName);
    }
    async removeEmptyDir(path14) {
      const validPath = await this.protectWhitespace(path14);
      return this.send(`RMD ${validPath}`);
    }
    async protectWhitespace(path14) {
      if (!path14.startsWith(" ")) {
        return path14;
      }
      const pwd = await this.pwd();
      const absolutePathPrefix = pwd.endsWith("/") ? pwd : pwd + "/";
      return absolutePathPrefix + path14;
    }
    async _exitAtCurrentDirectory(func) {
      const userDir = await this.pwd();
      try {
        return await func();
      } finally {
        if (!this.closed) {
          await ignoreError(() => this.cd(userDir));
        }
      }
    }
    _enterFirstCompatibleMode(strategies2) {
      return async (ftp2) => {
        ftp2.log("Trying to find optimal transfer strategy...");
        let lastError = void 0;
        for (const strategy of strategies2) {
          try {
            const res = await strategy(ftp2);
            ftp2.log("Optimal transfer strategy found.");
            this.prepareTransfer = strategy;
            return res;
          } catch (err) {
            lastError = err;
          }
        }
        throw new Error(`None of the available transfer strategies work. Last error response was '${lastError}'.`);
      };
    }
    async upload(source2, toRemotePath, options2 = {}) {
      this.ftp.log("Warning: upload() has been deprecated, use uploadFrom().");
      return this.uploadFrom(source2, toRemotePath, options2);
    }
    async append(source2, toRemotePath, options2 = {}) {
      this.ftp.log("Warning: append() has been deprecated, use appendFrom().");
      return this.appendFrom(source2, toRemotePath, options2);
    }
    async download(destination, fromRemotePath, startAt = 0) {
      this.ftp.log("Warning: download() has been deprecated, use downloadTo().");
      return this.downloadTo(destination, fromRemotePath, startAt);
    }
    async uploadDir(localDirPath, remoteDirPath) {
      this.ftp.log("Warning: uploadDir() has been deprecated, use uploadFromDir().");
      return this.uploadFromDir(localDirPath, remoteDirPath);
    }
    async downloadDir(localDirPath) {
      this.ftp.log("Warning: downloadDir() has been deprecated, use downloadToDir().");
      return this.downloadToDir(localDirPath);
    }
  };
  Client.Client = Client$1;
  async function ensureLocalDirectory(path14) {
    try {
      await fsStat(path14);
    } catch (_a4) {
      await fsMkDir(path14, { recursive: true });
    }
  }
  async function ignoreError(func) {
    try {
      return await func();
    } catch (_a4) {
      return void 0;
    }
  }
  return Client;
}
function requireStringEncoding() {
  if (hasRequiredStringEncoding) return StringEncoding;
  hasRequiredStringEncoding = 1;
  Object.defineProperty(StringEncoding, "__esModule", { value: true });
  return StringEncoding;
}
function requireDist$6() {
  if (hasRequiredDist$6) return dist$3;
  hasRequiredDist$6 = 1;
  (function(exports$1) {
    var __createBinding5 = dist$3 && dist$3.__createBinding || (Object.create ? function(o, m, k, k2) {
      if (k2 === void 0) k2 = k;
      var desc = Object.getOwnPropertyDescriptor(m, k);
      if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
        desc = { enumerable: true, get: function() {
          return m[k];
        } };
      }
      Object.defineProperty(o, k2, desc);
    } : function(o, m, k, k2) {
      if (k2 === void 0) k2 = k;
      o[k2] = m[k];
    });
    var __exportStar5 = dist$3 && dist$3.__exportStar || function(m, exports$12) {
      for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports$12, p)) __createBinding5(exports$12, m, p);
    };
    Object.defineProperty(exports$1, "__esModule", { value: true });
    exports$1.enterPassiveModeIPv6 = exports$1.enterPassiveModeIPv4 = void 0;
    __exportStar5(requireClient(), exports$1);
    __exportStar5(requireFtpContext(), exports$1);
    __exportStar5(requireFileInfo(), exports$1);
    __exportStar5(requireParseList(), exports$1);
    __exportStar5(requireStringEncoding(), exports$1);
    var transfer_1 = requireTransfer();
    Object.defineProperty(exports$1, "enterPassiveModeIPv4", { enumerable: true, get: function() {
      return transfer_1.enterPassiveModeIPv4;
    } });
    Object.defineProperty(exports$1, "enterPassiveModeIPv6", { enumerable: true, get: function() {
      return transfer_1.enterPassiveModeIPv6;
    } });
  })(dist$3);
  return dist$3;
}
function requireFtp() {
  if (hasRequiredFtp) return ftp;
  hasRequiredFtp = 1;
  var __importDefault5 = ftp && ftp.__importDefault || function(mod2) {
    return mod2 && mod2.__esModule ? mod2 : { "default": mod2 };
  };
  Object.defineProperty(ftp, "__esModule", { value: true });
  ftp.ftp = void 0;
  const basic_ftp_1 = requireDist$6();
  const stream_1 = require$$1$3;
  const path_1 = require$$0$4;
  const debug_12 = __importDefault5(requireSrc());
  const notfound_1 = __importDefault5(requireNotfound());
  const notmodified_1 = __importDefault5(requireNotmodified());
  const debug2 = (0, debug_12.default)("get-uri:ftp");
  const ftp$1 = async (url, opts = {}) => {
    const { cache } = opts;
    const filepath = decodeURIComponent(url.pathname);
    let lastModified;
    if (!filepath) {
      throw new TypeError('No "pathname"!');
    }
    const client = new basic_ftp_1.Client();
    try {
      const host = url.hostname || url.host || "localhost";
      const port = parseInt(url.port || "0", 10) || 21;
      const user = url.username ? decodeURIComponent(url.username) : void 0;
      const password = url.password ? decodeURIComponent(url.password) : void 0;
      await client.access({
        host,
        port,
        user,
        password,
        ...opts
      });
      try {
        lastModified = await client.lastMod(filepath);
      } catch (err) {
        if (err.code === 550) {
          throw new notfound_1.default();
        }
      }
      if (!lastModified) {
        const list2 = await client.list((0, path_1.dirname)(filepath));
        const name = (0, path_1.basename)(filepath);
        const entry = list2.find((e) => e.name === name);
        if (entry) {
          lastModified = entry.modifiedAt;
        }
      }
      if (lastModified) {
        if (isNotModified()) {
          throw new notmodified_1.default();
        }
      } else {
        throw new notfound_1.default();
      }
      const stream3 = new stream_1.PassThrough();
      const rs = stream3;
      client.downloadTo(stream3, filepath).then((result) => {
        debug2(result.message);
        client.close();
      });
      rs.lastModified = lastModified;
      return rs;
    } catch (err) {
      client.close();
      throw err;
    }
    function isNotModified() {
      if (cache?.lastModified && lastModified) {
        return +cache.lastModified === +lastModified;
      }
      return false;
    }
  };
  ftp.ftp = ftp$1;
  return ftp;
}
function requireHttpError() {
  if (hasRequiredHttpError) return httpError;
  hasRequiredHttpError = 1;
  Object.defineProperty(httpError, "__esModule", { value: true });
  const http_1 = require$$0$6;
  class HTTPError extends Error {
    constructor(statusCode, message = http_1.STATUS_CODES[statusCode]) {
      super(message);
      this.statusCode = statusCode;
      this.code = `E${String(message).toUpperCase().replace(/\s+/g, "")}`;
    }
  }
  httpError.default = HTTPError;
  return httpError;
}
function requireHttp() {
  if (hasRequiredHttp) return http;
  hasRequiredHttp = 1;
  (function(exports$1) {
    var __importDefault5 = http && http.__importDefault || function(mod2) {
      return mod2 && mod2.__esModule ? mod2 : { "default": mod2 };
    };
    Object.defineProperty(exports$1, "__esModule", { value: true });
    exports$1.http = void 0;
    const http_1 = __importDefault5(require$$0$6);
    const https_1 = __importDefault5(require$$1$1);
    const events_1 = require$$0$8;
    const debug_12 = __importDefault5(requireSrc());
    const http_error_1 = __importDefault5(requireHttpError());
    const notfound_1 = __importDefault5(requireNotfound());
    const notmodified_1 = __importDefault5(requireNotmodified());
    const debug2 = (0, debug_12.default)("get-uri:http");
    const http$12 = async (url, opts = {}) => {
      debug2("GET %o", url.href);
      const cache = getCache(url, opts.cache);
      if (cache && isFresh(cache) && typeof cache.statusCode === "number") {
        const type3 = cache.statusCode / 100 | 0;
        if (type3 === 3 && cache.headers.location) {
          debug2("cached redirect");
          throw new Error("TODO: implement cached redirects!");
        }
        throw new notmodified_1.default();
      }
      const maxRedirects = typeof opts.maxRedirects === "number" ? opts.maxRedirects : 5;
      debug2("allowing %o max redirects", maxRedirects);
      let mod2;
      if (opts.http) {
        mod2 = opts.http;
        debug2("using secure `https` core module");
      } else {
        mod2 = http_1.default;
        debug2("using `http` core module");
      }
      const options2 = { ...opts };
      if (cache) {
        if (!options2.headers) {
          options2.headers = {};
        }
        const lastModified = cache.headers["last-modified"];
        if (lastModified) {
          options2.headers["If-Modified-Since"] = lastModified;
          debug2('added "If-Modified-Since" request header: %o', lastModified);
        }
        const etag = cache.headers.etag;
        if (etag) {
          options2.headers["If-None-Match"] = etag;
          debug2('added "If-None-Match" request header: %o', etag);
        }
      }
      const req = mod2.get(url, options2);
      const [res] = await (0, events_1.once)(req, "response");
      const code2 = res.statusCode || 0;
      res.date = Date.now();
      res.parsed = url;
      debug2("got %o response status code", code2);
      const type2 = code2 / 100 | 0;
      const location = res.headers.location;
      if (type2 === 3 && location) {
        if (!opts.redirects)
          opts.redirects = [];
        const redirects = opts.redirects;
        if (redirects.length < maxRedirects) {
          debug2('got a "redirect" status code with Location: %o', location);
          res.resume();
          redirects.push(res);
          const newUri = new URL(location, url.href);
          debug2("resolved redirect URL: %o", newUri.href);
          const left2 = maxRedirects - redirects.length;
          debug2("%o more redirects allowed after this one", left2);
          if (newUri.protocol !== url.protocol) {
            opts.http = newUri.protocol === "https:" ? https_1.default : void 0;
          }
          return (0, exports$1.http)(newUri, opts);
        }
      }
      if (type2 !== 2) {
        res.resume();
        if (code2 === 304) {
          throw new notmodified_1.default();
        } else if (code2 === 404) {
          throw new notfound_1.default();
        }
        throw new http_error_1.default(code2);
      }
      if (opts.redirects) {
        res.redirects = opts.redirects;
      }
      return res;
    };
    exports$1.http = http$12;
    function isFresh(cache) {
      let fresh = false;
      let expires = parseInt(cache.headers.expires || "", 10);
      const cacheControl = cache.headers["cache-control"];
      if (cacheControl) {
        debug2("Cache-Control: %o", cacheControl);
        const parts = cacheControl.split(/,\s*?\b/);
        for (let i = 0; i < parts.length; i++) {
          const part = parts[i];
          const subparts = part.split("=");
          const name = subparts[0];
          switch (name) {
            case "max-age":
              expires = (cache.date || 0) + parseInt(subparts[1], 10) * 1e3;
              fresh = Date.now() < expires;
              if (fresh) {
                debug2('cache is "fresh" due to previous %o Cache-Control param', part);
              }
              return fresh;
            case "must-revalidate":
              break;
            case "no-cache":
            case "no-store":
              debug2('cache is "stale" due to explicit %o Cache-Control param', name);
              return false;
          }
        }
      } else if (expires) {
        debug2("Expires: %o", expires);
        fresh = Date.now() < expires;
        if (fresh) {
          debug2('cache is "fresh" due to previous Expires response header');
        }
        return fresh;
      }
      return false;
    }
    function getCache(url, cache) {
      if (cache) {
        if (cache.parsed && cache.parsed.href === url.href) {
          return cache;
        }
        if (cache.redirects) {
          for (let i = 0; i < cache.redirects.length; i++) {
            const c = getCache(url, cache.redirects[i]);
            if (c) {
              return c;
            }
          }
        }
      }
      return null;
    }
  })(http);
  return http;
}
function requireHttps() {
  if (hasRequiredHttps) return https;
  hasRequiredHttps = 1;
  var __importDefault5 = https && https.__importDefault || function(mod2) {
    return mod2 && mod2.__esModule ? mod2 : { "default": mod2 };
  };
  Object.defineProperty(https, "__esModule", { value: true });
  https.https = void 0;
  const https_1 = __importDefault5(require$$1$1);
  const http_1 = requireHttp();
  const https$12 = (url, opts) => {
    return (0, http_1.http)(url, { ...opts, http: https_1.default });
  };
  https.https = https$12;
  return https;
}
function requireDist$5() {
  if (hasRequiredDist$5) return dist$5;
  hasRequiredDist$5 = 1;
  (function(exports$1) {
    var __importDefault5 = dist$5 && dist$5.__importDefault || function(mod2) {
      return mod2 && mod2.__esModule ? mod2 : { "default": mod2 };
    };
    Object.defineProperty(exports$1, "__esModule", { value: true });
    exports$1.getUri = exports$1.isValidProtocol = exports$1.protocols = void 0;
    const debug_12 = __importDefault5(requireSrc());
    const data_1 = requireData();
    const file_1 = requireFile();
    const ftp_1 = requireFtp();
    const http_1 = requireHttp();
    const https_1 = requireHttps();
    const debug2 = (0, debug_12.default)("get-uri");
    exports$1.protocols = {
      data: data_1.data,
      file: file_1.file,
      ftp: ftp_1.ftp,
      http: http_1.http,
      https: https_1.https
    };
    const VALID_PROTOCOLS = new Set(Object.keys(exports$1.protocols));
    function isValidProtocol(p) {
      return VALID_PROTOCOLS.has(p);
    }
    exports$1.isValidProtocol = isValidProtocol;
    async function getUri(uri2, opts) {
      debug2("getUri(%o)", uri2);
      if (!uri2) {
        throw new TypeError('Must pass in a URI to "getUri()"');
      }
      const url = typeof uri2 === "string" ? new URL(uri2) : uri2;
      const protocol2 = url.protocol.replace(/:$/, "");
      if (!isValidProtocol(protocol2)) {
        throw new TypeError(`Unsupported protocol "${protocol2}" specified in URI: "${uri2}"`);
      }
      const getter = exports$1.protocols[protocol2];
      return getter(url, opts);
    }
    exports$1.getUri = getUri;
  })(dist$5);
  return dist$5;
}
function requireEstraverse() {
  if (hasRequiredEstraverse) return estraverse;
  hasRequiredEstraverse = 1;
  (function(exports$1) {
    (function clone2(exports$12) {
      var Syntax, VisitorOption, VisitorKeys, BREAK, SKIP, REMOVE;
      function deepCopy(obj) {
        var ret = {}, key, val;
        for (key in obj) {
          if (obj.hasOwnProperty(key)) {
            val = obj[key];
            if (typeof val === "object" && val !== null) {
              ret[key] = deepCopy(val);
            } else {
              ret[key] = val;
            }
          }
        }
        return ret;
      }
      function upperBound3(array2, func) {
        var diff, len, i, current;
        len = array2.length;
        i = 0;
        while (len) {
          diff = len >>> 1;
          current = i + diff;
          if (func(array2[current])) {
            len = diff;
          } else {
            i = current + 1;
            len -= diff + 1;
          }
        }
        return i;
      }
      Syntax = {
        AssignmentExpression: "AssignmentExpression",
        AssignmentPattern: "AssignmentPattern",
        ArrayExpression: "ArrayExpression",
        ArrayPattern: "ArrayPattern",
        ArrowFunctionExpression: "ArrowFunctionExpression",
        AwaitExpression: "AwaitExpression",
        BlockStatement: "BlockStatement",
        BinaryExpression: "BinaryExpression",
        BreakStatement: "BreakStatement",
        CallExpression: "CallExpression",
        CatchClause: "CatchClause",
        ChainExpression: "ChainExpression",
        ClassBody: "ClassBody",
        ClassDeclaration: "ClassDeclaration",
        ClassExpression: "ClassExpression",
        ComprehensionBlock: "ComprehensionBlock",
        ComprehensionExpression: "ComprehensionExpression",
        ConditionalExpression: "ConditionalExpression",
        ContinueStatement: "ContinueStatement",
        DebuggerStatement: "DebuggerStatement",
        DirectiveStatement: "DirectiveStatement",
        DoWhileStatement: "DoWhileStatement",
        EmptyStatement: "EmptyStatement",
        ExportAllDeclaration: "ExportAllDeclaration",
        ExportDefaultDeclaration: "ExportDefaultDeclaration",
        ExportNamedDeclaration: "ExportNamedDeclaration",
        ExportSpecifier: "ExportSpecifier",
        ExpressionStatement: "ExpressionStatement",
        ForStatement: "ForStatement",
        ForInStatement: "ForInStatement",
        ForOfStatement: "ForOfStatement",
        FunctionDeclaration: "FunctionDeclaration",
        FunctionExpression: "FunctionExpression",
        GeneratorExpression: "GeneratorExpression",
        Identifier: "Identifier",
        IfStatement: "IfStatement",
        ImportExpression: "ImportExpression",
        ImportDeclaration: "ImportDeclaration",
        ImportDefaultSpecifier: "ImportDefaultSpecifier",
        ImportNamespaceSpecifier: "ImportNamespaceSpecifier",
        ImportSpecifier: "ImportSpecifier",
        Literal: "Literal",
        LabeledStatement: "LabeledStatement",
        LogicalExpression: "LogicalExpression",
        MemberExpression: "MemberExpression",
        MetaProperty: "MetaProperty",
        MethodDefinition: "MethodDefinition",
        ModuleSpecifier: "ModuleSpecifier",
        NewExpression: "NewExpression",
        ObjectExpression: "ObjectExpression",
        ObjectPattern: "ObjectPattern",
        PrivateIdentifier: "PrivateIdentifier",
        Program: "Program",
        Property: "Property",
        PropertyDefinition: "PropertyDefinition",
        RestElement: "RestElement",
        ReturnStatement: "ReturnStatement",
        SequenceExpression: "SequenceExpression",
        SpreadElement: "SpreadElement",
        Super: "Super",
        SwitchStatement: "SwitchStatement",
        SwitchCase: "SwitchCase",
        TaggedTemplateExpression: "TaggedTemplateExpression",
        TemplateElement: "TemplateElement",
        TemplateLiteral: "TemplateLiteral",
        ThisExpression: "ThisExpression",
        ThrowStatement: "ThrowStatement",
        TryStatement: "TryStatement",
        UnaryExpression: "UnaryExpression",
        UpdateExpression: "UpdateExpression",
        VariableDeclaration: "VariableDeclaration",
        VariableDeclarator: "VariableDeclarator",
        WhileStatement: "WhileStatement",
        WithStatement: "WithStatement",
        YieldExpression: "YieldExpression"
      };
      VisitorKeys = {
        AssignmentExpression: ["left", "right"],
        AssignmentPattern: ["left", "right"],
        ArrayExpression: ["elements"],
        ArrayPattern: ["elements"],
        ArrowFunctionExpression: ["params", "body"],
        AwaitExpression: ["argument"],
        BlockStatement: ["body"],
        BinaryExpression: ["left", "right"],
        BreakStatement: ["label"],
        CallExpression: ["callee", "arguments"],
        CatchClause: ["param", "body"],
        ChainExpression: ["expression"],
        ClassBody: ["body"],
        ClassDeclaration: ["id", "superClass", "body"],
        ClassExpression: ["id", "superClass", "body"],
        ComprehensionBlock: ["left", "right"],
        ComprehensionExpression: ["blocks", "filter", "body"],
        ConditionalExpression: ["test", "consequent", "alternate"],
        ContinueStatement: ["label"],
        DebuggerStatement: [],
        DirectiveStatement: [],
        DoWhileStatement: ["body", "test"],
        EmptyStatement: [],
        ExportAllDeclaration: ["source"],
        ExportDefaultDeclaration: ["declaration"],
        ExportNamedDeclaration: ["declaration", "specifiers", "source"],
        ExportSpecifier: ["exported", "local"],
        ExpressionStatement: ["expression"],
        ForStatement: ["init", "test", "update", "body"],
        ForInStatement: ["left", "right", "body"],
        ForOfStatement: ["left", "right", "body"],
        FunctionDeclaration: ["id", "params", "body"],
        FunctionExpression: ["id", "params", "body"],
        GeneratorExpression: ["blocks", "filter", "body"],
        Identifier: [],
        IfStatement: ["test", "consequent", "alternate"],
        ImportExpression: ["source"],
        ImportDeclaration: ["specifiers", "source"],
        ImportDefaultSpecifier: ["local"],
        ImportNamespaceSpecifier: ["local"],
        ImportSpecifier: ["imported", "local"],
        Literal: [],
        LabeledStatement: ["label", "body"],
        LogicalExpression: ["left", "right"],
        MemberExpression: ["object", "property"],
        MetaProperty: ["meta", "property"],
        MethodDefinition: ["key", "value"],
        ModuleSpecifier: [],
        NewExpression: ["callee", "arguments"],
        ObjectExpression: ["properties"],
        ObjectPattern: ["properties"],
        PrivateIdentifier: [],
        Program: ["body"],
        Property: ["key", "value"],
        PropertyDefinition: ["key", "value"],
        RestElement: ["argument"],
        ReturnStatement: ["argument"],
        SequenceExpression: ["expressions"],
        SpreadElement: ["argument"],
        Super: [],
        SwitchStatement: ["discriminant", "cases"],
        SwitchCase: ["test", "consequent"],
        TaggedTemplateExpression: ["tag", "quasi"],
        TemplateElement: [],
        TemplateLiteral: ["quasis", "expressions"],
        ThisExpression: [],
        ThrowStatement: ["argument"],
        TryStatement: ["block", "handler", "finalizer"],
        UnaryExpression: ["argument"],
        UpdateExpression: ["argument"],
        VariableDeclaration: ["declarations"],
        VariableDeclarator: ["id", "init"],
        WhileStatement: ["test", "body"],
        WithStatement: ["object", "body"],
        YieldExpression: ["argument"]
      };
      BREAK = {};
      SKIP = {};
      REMOVE = {};
      VisitorOption = {
        Break: BREAK,
        Skip: SKIP,
        Remove: REMOVE
      };
      function Reference(parent, key) {
        this.parent = parent;
        this.key = key;
      }
      Reference.prototype.replace = function replace2(node2) {
        this.parent[this.key] = node2;
      };
      Reference.prototype.remove = function remove() {
        if (Array.isArray(this.parent)) {
          this.parent.splice(this.key, 1);
          return true;
        } else {
          this.replace(null);
          return false;
        }
      };
      function Element2(node2, path14, wrap, ref2) {
        this.node = node2;
        this.path = path14;
        this.wrap = wrap;
        this.ref = ref2;
      }
      function Controller() {
      }
      Controller.prototype.path = function path14() {
        var i, iz, j, jz, result, element;
        function addToPath(result2, path15) {
          if (Array.isArray(path15)) {
            for (j = 0, jz = path15.length; j < jz; ++j) {
              result2.push(path15[j]);
            }
          } else {
            result2.push(path15);
          }
        }
        if (!this.__current.path) {
          return null;
        }
        result = [];
        for (i = 2, iz = this.__leavelist.length; i < iz; ++i) {
          element = this.__leavelist[i];
          addToPath(result, element.path);
        }
        addToPath(result, this.__current.path);
        return result;
      };
      Controller.prototype.type = function() {
        var node2 = this.current();
        return node2.type || this.__current.wrap;
      };
      Controller.prototype.parents = function parents() {
        var i, iz, result;
        result = [];
        for (i = 1, iz = this.__leavelist.length; i < iz; ++i) {
          result.push(this.__leavelist[i].node);
        }
        return result;
      };
      Controller.prototype.current = function current() {
        return this.__current.node;
      };
      Controller.prototype.__execute = function __execute(callback, element) {
        var previous, result;
        result = void 0;
        previous = this.__current;
        this.__current = element;
        this.__state = null;
        if (callback) {
          result = callback.call(this, element.node, this.__leavelist[this.__leavelist.length - 1].node);
        }
        this.__current = previous;
        return result;
      };
      Controller.prototype.notify = function notify(flag) {
        this.__state = flag;
      };
      Controller.prototype.skip = function() {
        this.notify(SKIP);
      };
      Controller.prototype["break"] = function() {
        this.notify(BREAK);
      };
      Controller.prototype.remove = function() {
        this.notify(REMOVE);
      };
      Controller.prototype.__initialize = function(root2, visitor) {
        this.visitor = visitor;
        this.root = root2;
        this.__worklist = [];
        this.__leavelist = [];
        this.__current = null;
        this.__state = null;
        this.__fallback = null;
        if (visitor.fallback === "iteration") {
          this.__fallback = Object.keys;
        } else if (typeof visitor.fallback === "function") {
          this.__fallback = visitor.fallback;
        }
        this.__keys = VisitorKeys;
        if (visitor.keys) {
          this.__keys = Object.assign(Object.create(this.__keys), visitor.keys);
        }
      };
      function isNode2(node2) {
        if (node2 == null) {
          return false;
        }
        return typeof node2 === "object" && typeof node2.type === "string";
      }
      function isProperty(nodeType, key) {
        return (nodeType === Syntax.ObjectExpression || nodeType === Syntax.ObjectPattern) && "properties" === key;
      }
      function candidateExistsInLeaveList(leavelist, candidate) {
        for (var i = leavelist.length - 1; i >= 0; --i) {
          if (leavelist[i].node === candidate) {
            return true;
          }
        }
        return false;
      }
      Controller.prototype.traverse = function traverse2(root2, visitor) {
        var worklist, leavelist, element, node2, nodeType, ret, key, current, current2, candidates, candidate, sentinel;
        this.__initialize(root2, visitor);
        sentinel = {};
        worklist = this.__worklist;
        leavelist = this.__leavelist;
        worklist.push(new Element2(root2, null, null, null));
        leavelist.push(new Element2(null, null, null, null));
        while (worklist.length) {
          element = worklist.pop();
          if (element === sentinel) {
            element = leavelist.pop();
            ret = this.__execute(visitor.leave, element);
            if (this.__state === BREAK || ret === BREAK) {
              return;
            }
            continue;
          }
          if (element.node) {
            ret = this.__execute(visitor.enter, element);
            if (this.__state === BREAK || ret === BREAK) {
              return;
            }
            worklist.push(sentinel);
            leavelist.push(element);
            if (this.__state === SKIP || ret === SKIP) {
              continue;
            }
            node2 = element.node;
            nodeType = node2.type || element.wrap;
            candidates = this.__keys[nodeType];
            if (!candidates) {
              if (this.__fallback) {
                candidates = this.__fallback(node2);
              } else {
                throw new Error("Unknown node type " + nodeType + ".");
              }
            }
            current = candidates.length;
            while ((current -= 1) >= 0) {
              key = candidates[current];
              candidate = node2[key];
              if (!candidate) {
                continue;
              }
              if (Array.isArray(candidate)) {
                current2 = candidate.length;
                while ((current2 -= 1) >= 0) {
                  if (!candidate[current2]) {
                    continue;
                  }
                  if (candidateExistsInLeaveList(leavelist, candidate[current2])) {
                    continue;
                  }
                  if (isProperty(nodeType, candidates[current])) {
                    element = new Element2(candidate[current2], [key, current2], "Property", null);
                  } else if (isNode2(candidate[current2])) {
                    element = new Element2(candidate[current2], [key, current2], null, null);
                  } else {
                    continue;
                  }
                  worklist.push(element);
                }
              } else if (isNode2(candidate)) {
                if (candidateExistsInLeaveList(leavelist, candidate)) {
                  continue;
                }
                worklist.push(new Element2(candidate, key, null, null));
              }
            }
          }
        }
      };
      Controller.prototype.replace = function replace2(root2, visitor) {
        var worklist, leavelist, node2, nodeType, target, element, current, current2, candidates, candidate, sentinel, outer, key;
        function removeElem(element2) {
          var i, key2, nextElem, parent;
          if (element2.ref.remove()) {
            key2 = element2.ref.key;
            parent = element2.ref.parent;
            i = worklist.length;
            while (i--) {
              nextElem = worklist[i];
              if (nextElem.ref && nextElem.ref.parent === parent) {
                if (nextElem.ref.key < key2) {
                  break;
                }
                --nextElem.ref.key;
              }
            }
          }
        }
        this.__initialize(root2, visitor);
        sentinel = {};
        worklist = this.__worklist;
        leavelist = this.__leavelist;
        outer = {
          root: root2
        };
        element = new Element2(root2, null, null, new Reference(outer, "root"));
        worklist.push(element);
        leavelist.push(element);
        while (worklist.length) {
          element = worklist.pop();
          if (element === sentinel) {
            element = leavelist.pop();
            target = this.__execute(visitor.leave, element);
            if (target !== void 0 && target !== BREAK && target !== SKIP && target !== REMOVE) {
              element.ref.replace(target);
            }
            if (this.__state === REMOVE || target === REMOVE) {
              removeElem(element);
            }
            if (this.__state === BREAK || target === BREAK) {
              return outer.root;
            }
            continue;
          }
          target = this.__execute(visitor.enter, element);
          if (target !== void 0 && target !== BREAK && target !== SKIP && target !== REMOVE) {
            element.ref.replace(target);
            element.node = target;
          }
          if (this.__state === REMOVE || target === REMOVE) {
            removeElem(element);
            element.node = null;
          }
          if (this.__state === BREAK || target === BREAK) {
            return outer.root;
          }
          node2 = element.node;
          if (!node2) {
            continue;
          }
          worklist.push(sentinel);
          leavelist.push(element);
          if (this.__state === SKIP || target === SKIP) {
            continue;
          }
          nodeType = node2.type || element.wrap;
          candidates = this.__keys[nodeType];
          if (!candidates) {
            if (this.__fallback) {
              candidates = this.__fallback(node2);
            } else {
              throw new Error("Unknown node type " + nodeType + ".");
            }
          }
          current = candidates.length;
          while ((current -= 1) >= 0) {
            key = candidates[current];
            candidate = node2[key];
            if (!candidate) {
              continue;
            }
            if (Array.isArray(candidate)) {
              current2 = candidate.length;
              while ((current2 -= 1) >= 0) {
                if (!candidate[current2]) {
                  continue;
                }
                if (isProperty(nodeType, candidates[current])) {
                  element = new Element2(candidate[current2], [key, current2], "Property", new Reference(candidate, current2));
                } else if (isNode2(candidate[current2])) {
                  element = new Element2(candidate[current2], [key, current2], null, new Reference(candidate, current2));
                } else {
                  continue;
                }
                worklist.push(element);
              }
            } else if (isNode2(candidate)) {
              worklist.push(new Element2(candidate, key, null, new Reference(node2, key)));
            }
          }
        }
        return outer.root;
      };
      function traverse(root2, visitor) {
        var controller = new Controller();
        return controller.traverse(root2, visitor);
      }
      function replace(root2, visitor) {
        var controller = new Controller();
        return controller.replace(root2, visitor);
      }
      function extendCommentRange(comment, tokens) {
        var target;
        target = upperBound3(tokens, function search(token) {
          return token.range[0] > comment.range[0];
        });
        comment.extendedRange = [comment.range[0], comment.range[1]];
        if (target !== tokens.length) {
          comment.extendedRange[1] = tokens[target].range[0];
        }
        target -= 1;
        if (target >= 0) {
          comment.extendedRange[0] = tokens[target].range[1];
        }
        return comment;
      }
      function attachComments(tree, providedComments, tokens) {
        var comments = [], comment, len, i, cursor;
        if (!tree.range) {
          throw new Error("attachComments needs range information");
        }
        if (!tokens.length) {
          if (providedComments.length) {
            for (i = 0, len = providedComments.length; i < len; i += 1) {
              comment = deepCopy(providedComments[i]);
              comment.extendedRange = [0, tree.range[0]];
              comments.push(comment);
            }
            tree.leadingComments = comments;
          }
          return tree;
        }
        for (i = 0, len = providedComments.length; i < len; i += 1) {
          comments.push(extendCommentRange(deepCopy(providedComments[i]), tokens));
        }
        cursor = 0;
        traverse(tree, {
          enter: function(node2) {
            var comment2;
            while (cursor < comments.length) {
              comment2 = comments[cursor];
              if (comment2.extendedRange[1] > node2.range[0]) {
                break;
              }
              if (comment2.extendedRange[1] === node2.range[0]) {
                if (!node2.leadingComments) {
                  node2.leadingComments = [];
                }
                node2.leadingComments.push(comment2);
                comments.splice(cursor, 1);
              } else {
                cursor += 1;
              }
            }
            if (cursor === comments.length) {
              return VisitorOption.Break;
            }
            if (comments[cursor].extendedRange[0] > node2.range[1]) {
              return VisitorOption.Skip;
            }
          }
        });
        cursor = 0;
        traverse(tree, {
          leave: function(node2) {
            var comment2;
            while (cursor < comments.length) {
              comment2 = comments[cursor];
              if (node2.range[1] < comment2.extendedRange[0]) {
                break;
              }
              if (node2.range[1] === comment2.extendedRange[0]) {
                if (!node2.trailingComments) {
                  node2.trailingComments = [];
                }
                node2.trailingComments.push(comment2);
                comments.splice(cursor, 1);
              } else {
                cursor += 1;
              }
            }
            if (cursor === comments.length) {
              return VisitorOption.Break;
            }
            if (comments[cursor].extendedRange[0] > node2.range[1]) {
              return VisitorOption.Skip;
            }
          }
        });
        return tree;
      }
      exports$12.Syntax = Syntax;
      exports$12.traverse = traverse;
      exports$12.replace = replace;
      exports$12.attachComments = attachComments;
      exports$12.VisitorKeys = VisitorKeys;
      exports$12.VisitorOption = VisitorOption;
      exports$12.Controller = Controller;
      exports$12.cloneEnvironment = function() {
        return clone2({});
      };
      return exports$12;
    })(exports$1);
  })(estraverse);
  return estraverse;
}
function requireAst() {
  if (hasRequiredAst) return ast.exports;
  hasRequiredAst = 1;
  (function() {
    function isExpression(node2) {
      if (node2 == null) {
        return false;
      }
      switch (node2.type) {
        case "ArrayExpression":
        case "AssignmentExpression":
        case "BinaryExpression":
        case "CallExpression":
        case "ConditionalExpression":
        case "FunctionExpression":
        case "Identifier":
        case "Literal":
        case "LogicalExpression":
        case "MemberExpression":
        case "NewExpression":
        case "ObjectExpression":
        case "SequenceExpression":
        case "ThisExpression":
        case "UnaryExpression":
        case "UpdateExpression":
          return true;
      }
      return false;
    }
    function isIterationStatement(node2) {
      if (node2 == null) {
        return false;
      }
      switch (node2.type) {
        case "DoWhileStatement":
        case "ForInStatement":
        case "ForStatement":
        case "WhileStatement":
          return true;
      }
      return false;
    }
    function isStatement(node2) {
      if (node2 == null) {
        return false;
      }
      switch (node2.type) {
        case "BlockStatement":
        case "BreakStatement":
        case "ContinueStatement":
        case "DebuggerStatement":
        case "DoWhileStatement":
        case "EmptyStatement":
        case "ExpressionStatement":
        case "ForInStatement":
        case "ForStatement":
        case "IfStatement":
        case "LabeledStatement":
        case "ReturnStatement":
        case "SwitchStatement":
        case "ThrowStatement":
        case "TryStatement":
        case "VariableDeclaration":
        case "WhileStatement":
        case "WithStatement":
          return true;
      }
      return false;
    }
    function isSourceElement(node2) {
      return isStatement(node2) || node2 != null && node2.type === "FunctionDeclaration";
    }
    function trailingStatement(node2) {
      switch (node2.type) {
        case "IfStatement":
          if (node2.alternate != null) {
            return node2.alternate;
          }
          return node2.consequent;
        case "LabeledStatement":
        case "ForStatement":
        case "ForInStatement":
        case "WhileStatement":
        case "WithStatement":
          return node2.body;
      }
      return null;
    }
    function isProblematicIfStatement(node2) {
      var current;
      if (node2.type !== "IfStatement") {
        return false;
      }
      if (node2.alternate == null) {
        return false;
      }
      current = node2.consequent;
      do {
        if (current.type === "IfStatement") {
          if (current.alternate == null) {
            return true;
          }
        }
        current = trailingStatement(current);
      } while (current);
      return false;
    }
    ast.exports = {
      isExpression,
      isStatement,
      isIterationStatement,
      isSourceElement,
      isProblematicIfStatement,
      trailingStatement
    };
  })();
  return ast.exports;
}
function requireCode() {
  if (hasRequiredCode) return code.exports;
  hasRequiredCode = 1;
  (function() {
    var ES6Regex, ES5Regex, NON_ASCII_WHITESPACES, IDENTIFIER_START, IDENTIFIER_PART, ch;
    ES5Regex = {
      NonAsciiIdentifierStart: /[\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\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0-\u08B4\u08B6-\u08BD\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\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\u0D05-\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\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\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-\u1877\u1880-\u1884\u1887-\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\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\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\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\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-\uAB65\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]/,
      NonAsciiIdentifierPart: /[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u08A0-\u08B4\u08B6-\u08BD\u08D4-\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\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\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\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-\u0C03\u0C05-\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\u0D01-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D54-\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\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\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\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\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-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19D9\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1CD0-\u1CD2\u1CD4-\u1CF6\u1CF8\u1CF9\u1D00-\u1DF5\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\u200C\u200D\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\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\u2E2F\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099\u309A\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\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-\uAB65\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]/
    };
    ES6Regex = {
      NonAsciiIdentifierStart: /[\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\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0-\u08B4\u08B6-\u08BD\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\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\u0D05-\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\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\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-\u1877\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\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\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-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\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-\uAB65\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\uDF30-\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-\uDE33\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\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\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDF00-\uDF19]|\uD806[\uDCA0-\uDCDF\uDCFF\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F\uDFE0]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00\uDC01]|\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]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43]|\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-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1]|\uD87E[\uDC00-\uDE1D]/,
      NonAsciiIdentifierPart: /[\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\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u08A0-\u08B4\u08B6-\u08BD\u08D4-\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\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\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\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-\u0C03\u0C05-\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\u0D01-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D54-\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\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\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\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-\u1877\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\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1CD0-\u1CD2\u1CD4-\u1CF6\u1CF8\u1CF9\u1D00-\u1DF5\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\u200C\u200D\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-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\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-\uAB65\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\uDF30-\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-\uDE33\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]|\uD804[\uDC00-\uDC46\uDC66-\uDC6F\uDC7F-\uDCBA\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDCA-\uDDCC\uDDD0-\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\uDF3C-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF50\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC00-\uDC4A\uDC50-\uDC59\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDDD8-\uDDDD\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB7\uDEC0-\uDEC9\uDF00-\uDF19\uDF1D-\uDF2B\uDF30-\uDF39]|\uD806[\uDCA0-\uDCE9\uDCFF\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC36\uDC38-\uDC40\uDC50-\uDC59\uDC72-\uDC8F\uDC92-\uDCA7\uDCA9-\uDCB6]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872][\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[\uDF00-\uDF44\uDF50-\uDF7E\uDF8F-\uDF9F\uDFE0]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00\uDC01]|\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]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6\uDD00-\uDD4A\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]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]/
    };
    function isDecimalDigit(ch2) {
      return 48 <= ch2 && ch2 <= 57;
    }
    function isHexDigit(ch2) {
      return 48 <= ch2 && ch2 <= 57 || 97 <= ch2 && ch2 <= 102 || 65 <= ch2 && ch2 <= 70;
    }
    function isOctalDigit(ch2) {
      return ch2 >= 48 && ch2 <= 55;
    }
    NON_ASCII_WHITESPACES = [
      5760,
      8192,
      8193,
      8194,
      8195,
      8196,
      8197,
      8198,
      8199,
      8200,
      8201,
      8202,
      8239,
      8287,
      12288,
      65279
    ];
    function isWhiteSpace(ch2) {
      return ch2 === 32 || ch2 === 9 || ch2 === 11 || ch2 === 12 || ch2 === 160 || ch2 >= 5760 && NON_ASCII_WHITESPACES.indexOf(ch2) >= 0;
    }
    function isLineTerminator(ch2) {
      return ch2 === 10 || ch2 === 13 || ch2 === 8232 || ch2 === 8233;
    }
    function fromCodePoint3(cp) {
      if (cp <= 65535) {
        return String.fromCharCode(cp);
      }
      var cu1 = String.fromCharCode(Math.floor((cp - 65536) / 1024) + 55296);
      var cu2 = String.fromCharCode((cp - 65536) % 1024 + 56320);
      return cu1 + cu2;
    }
    IDENTIFIER_START = new Array(128);
    for (ch = 0; ch < 128; ++ch) {
      IDENTIFIER_START[ch] = ch >= 97 && ch <= 122 || ch >= 65 && ch <= 90 || ch === 36 || ch === 95;
    }
    IDENTIFIER_PART = new Array(128);
    for (ch = 0; ch < 128; ++ch) {
      IDENTIFIER_PART[ch] = ch >= 97 && ch <= 122 || ch >= 65 && ch <= 90 || ch >= 48 && ch <= 57 || ch === 36 || ch === 95;
    }
    function isIdentifierStartES5(ch2) {
      return ch2 < 128 ? IDENTIFIER_START[ch2] : ES5Regex.NonAsciiIdentifierStart.test(fromCodePoint3(ch2));
    }
    function isIdentifierPartES5(ch2) {
      return ch2 < 128 ? IDENTIFIER_PART[ch2] : ES5Regex.NonAsciiIdentifierPart.test(fromCodePoint3(ch2));
    }
    function isIdentifierStartES6(ch2) {
      return ch2 < 128 ? IDENTIFIER_START[ch2] : ES6Regex.NonAsciiIdentifierStart.test(fromCodePoint3(ch2));
    }
    function isIdentifierPartES6(ch2) {
      return ch2 < 128 ? IDENTIFIER_PART[ch2] : ES6Regex.NonAsciiIdentifierPart.test(fromCodePoint3(ch2));
    }
    code.exports = {
      isDecimalDigit,
      isHexDigit,
      isOctalDigit,
      isWhiteSpace,
      isLineTerminator,
      isIdentifierStartES5,
      isIdentifierPartES5,
      isIdentifierStartES6,
      isIdentifierPartES6
    };
  })();
  return code.exports;
}
function requireKeyword() {
  if (hasRequiredKeyword) return keyword.exports;
  hasRequiredKeyword = 1;
  (function() {
    var code2 = requireCode();
    function isStrictModeReservedWordES6(id2) {
      switch (id2) {
        case "implements":
        case "interface":
        case "package":
        case "private":
        case "protected":
        case "public":
        case "static":
        case "let":
          return true;
        default:
          return false;
      }
    }
    function isKeywordES5(id2, strict) {
      if (!strict && id2 === "yield") {
        return false;
      }
      return isKeywordES6(id2, strict);
    }
    function isKeywordES6(id2, strict) {
      if (strict && isStrictModeReservedWordES6(id2)) {
        return true;
      }
      switch (id2.length) {
        case 2:
          return id2 === "if" || id2 === "in" || id2 === "do";
        case 3:
          return id2 === "var" || id2 === "for" || id2 === "new" || id2 === "try";
        case 4:
          return id2 === "this" || id2 === "else" || id2 === "case" || id2 === "void" || id2 === "with" || id2 === "enum";
        case 5:
          return id2 === "while" || id2 === "break" || id2 === "catch" || id2 === "throw" || id2 === "const" || id2 === "yield" || id2 === "class" || id2 === "super";
        case 6:
          return id2 === "return" || id2 === "typeof" || id2 === "delete" || id2 === "switch" || id2 === "export" || id2 === "import";
        case 7:
          return id2 === "default" || id2 === "finally" || id2 === "extends";
        case 8:
          return id2 === "function" || id2 === "continue" || id2 === "debugger";
        case 10:
          return id2 === "instanceof";
        default:
          return false;
      }
    }
    function isReservedWordES5(id2, strict) {
      return id2 === "null" || id2 === "true" || id2 === "false" || isKeywordES5(id2, strict);
    }
    function isReservedWordES6(id2, strict) {
      return id2 === "null" || id2 === "true" || id2 === "false" || isKeywordES6(id2, strict);
    }
    function isRestrictedWord(id2) {
      return id2 === "eval" || id2 === "arguments";
    }
    function isIdentifierNameES5(id2) {
      var i, iz, ch;
      if (id2.length === 0) {
        return false;
      }
      ch = id2.charCodeAt(0);
      if (!code2.isIdentifierStartES5(ch)) {
        return false;
      }
      for (i = 1, iz = id2.length; i < iz; ++i) {
        ch = id2.charCodeAt(i);
        if (!code2.isIdentifierPartES5(ch)) {
          return false;
        }
      }
      return true;
    }
    function decodeUtf16(lead, trail) {
      return (lead - 55296) * 1024 + (trail - 56320) + 65536;
    }
    function isIdentifierNameES6(id2) {
      var i, iz, ch, lowCh, check2;
      if (id2.length === 0) {
        return false;
      }
      check2 = code2.isIdentifierStartES6;
      for (i = 0, iz = id2.length; i < iz; ++i) {
        ch = id2.charCodeAt(i);
        if (55296 <= ch && ch <= 56319) {
          ++i;
          if (i >= iz) {
            return false;
          }
          lowCh = id2.charCodeAt(i);
          if (!(56320 <= lowCh && lowCh <= 57343)) {
            return false;
          }
          ch = decodeUtf16(ch, lowCh);
        }
        if (!check2(ch)) {
          return false;
        }
        check2 = code2.isIdentifierPartES6;
      }
      return true;
    }
    function isIdentifierES5(id2, strict) {
      return isIdentifierNameES5(id2) && !isReservedWordES5(id2, strict);
    }
    function isIdentifierES6(id2, strict) {
      return isIdentifierNameES6(id2) && !isReservedWordES6(id2, strict);
    }
    keyword.exports = {
      isKeywordES5,
      isKeywordES6,
      isReservedWordES5,
      isReservedWordES6,
      isRestrictedWord,
      isIdentifierNameES5,
      isIdentifierNameES6,
      isIdentifierES5,
      isIdentifierES6
    };
  })();
  return keyword.exports;
}
function requireUtils() {
  if (hasRequiredUtils) return utils;
  hasRequiredUtils = 1;
  (function() {
    utils.ast = requireAst();
    utils.code = requireCode();
    utils.keyword = requireKeyword();
  })();
  return utils;
}
function requireBase64() {
  if (hasRequiredBase64) return base64;
  hasRequiredBase64 = 1;
  var intToCharMap = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");
  base64.encode = function(number2) {
    if (0 <= number2 && number2 < intToCharMap.length) {
      return intToCharMap[number2];
    }
    throw new TypeError("Must be between 0 and 63: " + number2);
  };
  base64.decode = function(charCode) {
    var bigA = 65;
    var bigZ = 90;
    var littleA = 97;
    var littleZ = 122;
    var zero = 48;
    var nine = 57;
    var plus = 43;
    var slash = 47;
    var littleOffset = 26;
    var numberOffset = 52;
    if (bigA <= charCode && charCode <= bigZ) {
      return charCode - bigA;
    }
    if (littleA <= charCode && charCode <= littleZ) {
      return charCode - littleA + littleOffset;
    }
    if (zero <= charCode && charCode <= nine) {
      return charCode - zero + numberOffset;
    }
    if (charCode == plus) {
      return 62;
    }
    if (charCode == slash) {
      return 63;
    }
    return -1;
  };
  return base64;
}
function requireBase64Vlq() {
  if (hasRequiredBase64Vlq) return base64Vlq;
  hasRequiredBase64Vlq = 1;
  var base642 = requireBase64();
  var VLQ_BASE_SHIFT2 = 5;
  var VLQ_BASE = 1 << VLQ_BASE_SHIFT2;
  var VLQ_BASE_MASK2 = VLQ_BASE - 1;
  var VLQ_CONTINUATION_BIT = VLQ_BASE;
  function toVLQSigned(aValue) {
    return aValue < 0 ? (-aValue << 1) + 1 : (aValue << 1) + 0;
  }
  function fromVLQSigned(aValue) {
    var isNegative = (aValue & 1) === 1;
    var shifted = aValue >> 1;
    return isNegative ? -shifted : shifted;
  }
  base64Vlq.encode = function base64VLQ_encode(aValue) {
    var encoded = "";
    var digit;
    var vlq = toVLQSigned(aValue);
    do {
      digit = vlq & VLQ_BASE_MASK2;
      vlq >>>= VLQ_BASE_SHIFT2;
      if (vlq > 0) {
        digit |= VLQ_CONTINUATION_BIT;
      }
      encoded += base642.encode(digit);
    } while (vlq > 0);
    return encoded;
  };
  base64Vlq.decode = function base64VLQ_decode(aStr, aIndex, aOutParam) {
    var strLen = aStr.length;
    var result = 0;
    var shift = 0;
    var continuation, digit;
    do {
      if (aIndex >= strLen) {
        throw new Error("Expected more digits in base 64 VLQ value.");
      }
      digit = base642.decode(aStr.charCodeAt(aIndex++));
      if (digit === -1) {
        throw new Error("Invalid base64 digit: " + aStr.charAt(aIndex - 1));
      }
      continuation = !!(digit & VLQ_CONTINUATION_BIT);
      digit &= VLQ_BASE_MASK2;
      result = result + (digit << shift);
      shift += VLQ_BASE_SHIFT2;
    } while (continuation);
    aOutParam.value = fromVLQSigned(result);
    aOutParam.rest = aIndex;
  };
  return base64Vlq;
}
function requireUtil$1() {
  if (hasRequiredUtil$1) return util$1;
  hasRequiredUtil$1 = 1;
  (function(exports$1) {
    function getArg(aArgs, aName, aDefaultValue) {
      if (aName in aArgs) {
        return aArgs[aName];
      } else if (arguments.length === 3) {
        return aDefaultValue;
      } else {
        throw new Error('"' + aName + '" is a required argument.');
      }
    }
    exports$1.getArg = getArg;
    var urlRegexp = /^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.-]*)(?::(\d+))?(.*)$/;
    var dataUrlRegexp = /^data:.+\,.+$/;
    function urlParse(aUrl) {
      var match = aUrl.match(urlRegexp);
      if (!match) {
        return null;
      }
      return {
        scheme: match[1],
        auth: match[2],
        host: match[3],
        port: match[4],
        path: match[5]
      };
    }
    exports$1.urlParse = urlParse;
    function urlGenerate(aParsedUrl) {
      var url = "";
      if (aParsedUrl.scheme) {
        url += aParsedUrl.scheme + ":";
      }
      url += "//";
      if (aParsedUrl.auth) {
        url += aParsedUrl.auth + "@";
      }
      if (aParsedUrl.host) {
        url += aParsedUrl.host;
      }
      if (aParsedUrl.port) {
        url += ":" + aParsedUrl.port;
      }
      if (aParsedUrl.path) {
        url += aParsedUrl.path;
      }
      return url;
    }
    exports$1.urlGenerate = urlGenerate;
    function normalize2(aPath) {
      var path14 = aPath;
      var url = urlParse(aPath);
      if (url) {
        if (!url.path) {
          return aPath;
        }
        path14 = url.path;
      }
      var isAbsolute = exports$1.isAbsolute(path14);
      var parts = path14.split(/\/+/);
      for (var part, up = 0, i = parts.length - 1; i >= 0; i--) {
        part = parts[i];
        if (part === ".") {
          parts.splice(i, 1);
        } else if (part === "..") {
          up++;
        } else if (up > 0) {
          if (part === "") {
            parts.splice(i + 1, up);
            up = 0;
          } else {
            parts.splice(i, 2);
            up--;
          }
        }
      }
      path14 = parts.join("/");
      if (path14 === "") {
        path14 = isAbsolute ? "/" : ".";
      }
      if (url) {
        url.path = path14;
        return urlGenerate(url);
      }
      return path14;
    }
    exports$1.normalize = normalize2;
    function join3(aRoot, aPath) {
      if (aRoot === "") {
        aRoot = ".";
      }
      if (aPath === "") {
        aPath = ".";
      }
      var aPathUrl = urlParse(aPath);
      var aRootUrl = urlParse(aRoot);
      if (aRootUrl) {
        aRoot = aRootUrl.path || "/";
      }
      if (aPathUrl && !aPathUrl.scheme) {
        if (aRootUrl) {
          aPathUrl.scheme = aRootUrl.scheme;
        }
        return urlGenerate(aPathUrl);
      }
      if (aPathUrl || aPath.match(dataUrlRegexp)) {
        return aPath;
      }
      if (aRootUrl && !aRootUrl.host && !aRootUrl.path) {
        aRootUrl.host = aPath;
        return urlGenerate(aRootUrl);
      }
      var joined = aPath.charAt(0) === "/" ? aPath : normalize2(aRoot.replace(/\/+$/, "") + "/" + aPath);
      if (aRootUrl) {
        aRootUrl.path = joined;
        return urlGenerate(aRootUrl);
      }
      return joined;
    }
    exports$1.join = join3;
    exports$1.isAbsolute = function(aPath) {
      return aPath.charAt(0) === "/" || urlRegexp.test(aPath);
    };
    function relative2(aRoot, aPath) {
      if (aRoot === "") {
        aRoot = ".";
      }
      aRoot = aRoot.replace(/\/$/, "");
      var level = 0;
      while (aPath.indexOf(aRoot + "/") !== 0) {
        var index2 = aRoot.lastIndexOf("/");
        if (index2 < 0) {
          return aPath;
        }
        aRoot = aRoot.slice(0, index2);
        if (aRoot.match(/^([^\/]+:\/)?\/*$/)) {
          return aPath;
        }
        ++level;
      }
      return Array(level + 1).join("../") + aPath.substr(aRoot.length + 1);
    }
    exports$1.relative = relative2;
    var supportsNullProto = function() {
      var obj = /* @__PURE__ */ Object.create(null);
      return !("__proto__" in obj);
    }();
    function identity2(s) {
      return s;
    }
    function toSetString(aStr) {
      if (isProtoString(aStr)) {
        return "$" + aStr;
      }
      return aStr;
    }
    exports$1.toSetString = supportsNullProto ? identity2 : toSetString;
    function fromSetString(aStr) {
      if (isProtoString(aStr)) {
        return aStr.slice(1);
      }
      return aStr;
    }
    exports$1.fromSetString = supportsNullProto ? identity2 : fromSetString;
    function isProtoString(s) {
      if (!s) {
        return false;
      }
      var length = s.length;
      if (length < 9) {
        return false;
      }
      if (s.charCodeAt(length - 1) !== 95 || s.charCodeAt(length - 2) !== 95 || s.charCodeAt(length - 3) !== 111 || s.charCodeAt(length - 4) !== 116 || s.charCodeAt(length - 5) !== 111 || s.charCodeAt(length - 6) !== 114 || s.charCodeAt(length - 7) !== 112 || s.charCodeAt(length - 8) !== 95 || s.charCodeAt(length - 9) !== 95) {
        return false;
      }
      for (var i = length - 10; i >= 0; i--) {
        if (s.charCodeAt(i) !== 36) {
          return false;
        }
      }
      return true;
    }
    function compareByOriginalPositions(mappingA, mappingB, onlyCompareOriginal) {
      var cmp = strcmp(mappingA.source, mappingB.source);
      if (cmp !== 0) {
        return cmp;
      }
      cmp = mappingA.originalLine - mappingB.originalLine;
      if (cmp !== 0) {
        return cmp;
      }
      cmp = mappingA.originalColumn - mappingB.originalColumn;
      if (cmp !== 0 || onlyCompareOriginal) {
        return cmp;
      }
      cmp = mappingA.generatedColumn - mappingB.generatedColumn;
      if (cmp !== 0) {
        return cmp;
      }
      cmp = mappingA.generatedLine - mappingB.generatedLine;
      if (cmp !== 0) {
        return cmp;
      }
      return strcmp(mappingA.name, mappingB.name);
    }
    exports$1.compareByOriginalPositions = compareByOriginalPositions;
    function compareByGeneratedPositionsDeflated(mappingA, mappingB, onlyCompareGenerated) {
      var cmp = mappingA.generatedLine - mappingB.generatedLine;
      if (cmp !== 0) {
        return cmp;
      }
      cmp = mappingA.generatedColumn - mappingB.generatedColumn;
      if (cmp !== 0 || onlyCompareGenerated) {
        return cmp;
      }
      cmp = strcmp(mappingA.source, mappingB.source);
      if (cmp !== 0) {
        return cmp;
      }
      cmp = mappingA.originalLine - mappingB.originalLine;
      if (cmp !== 0) {
        return cmp;
      }
      cmp = mappingA.originalColumn - mappingB.originalColumn;
      if (cmp !== 0) {
        return cmp;
      }
      return strcmp(mappingA.name, mappingB.name);
    }
    exports$1.compareByGeneratedPositionsDeflated = compareByGeneratedPositionsDeflated;
    function strcmp(aStr1, aStr2) {
      if (aStr1 === aStr2) {
        return 0;
      }
      if (aStr1 === null) {
        return 1;
      }
      if (aStr2 === null) {
        return -1;
      }
      if (aStr1 > aStr2) {
        return 1;
      }
      return -1;
    }
    function compareByGeneratedPositionsInflated(mappingA, mappingB) {
      var cmp = mappingA.generatedLine - mappingB.generatedLine;
      if (cmp !== 0) {
        return cmp;
      }
      cmp = mappingA.generatedColumn - mappingB.generatedColumn;
      if (cmp !== 0) {
        return cmp;
      }
      cmp = strcmp(mappingA.source, mappingB.source);
      if (cmp !== 0) {
        return cmp;
      }
      cmp = mappingA.originalLine - mappingB.originalLine;
      if (cmp !== 0) {
        return cmp;
      }
      cmp = mappingA.originalColumn - mappingB.originalColumn;
      if (cmp !== 0) {
        return cmp;
      }
      return strcmp(mappingA.name, mappingB.name);
    }
    exports$1.compareByGeneratedPositionsInflated = compareByGeneratedPositionsInflated;
    function parseSourceMapInput(str) {
      return JSON.parse(str.replace(/^\)]}'[^\n]*\n/, ""));
    }
    exports$1.parseSourceMapInput = parseSourceMapInput;
    function computeSourceURL(sourceRoot, sourceURL, sourceMapURL) {
      sourceURL = sourceURL || "";
      if (sourceRoot) {
        if (sourceRoot[sourceRoot.length - 1] !== "/" && sourceURL[0] !== "/") {
          sourceRoot += "/";
        }
        sourceURL = sourceRoot + sourceURL;
      }
      if (sourceMapURL) {
        var parsed = urlParse(sourceMapURL);
        if (!parsed) {
          throw new Error("sourceMapURL could not be parsed");
        }
        if (parsed.path) {
          var index2 = parsed.path.lastIndexOf("/");
          if (index2 >= 0) {
            parsed.path = parsed.path.substring(0, index2 + 1);
          }
        }
        sourceURL = join3(urlGenerate(parsed), sourceURL);
      }
      return normalize2(sourceURL);
    }
    exports$1.computeSourceURL = computeSourceURL;
  })(util$1);
  return util$1;
}
function requireArraySet() {
  if (hasRequiredArraySet) return arraySet;
  hasRequiredArraySet = 1;
  var util2 = requireUtil$1();
  var has = Object.prototype.hasOwnProperty;
  var hasNativeMap = typeof Map !== "undefined";
  function ArraySet() {
    this._array = [];
    this._set = hasNativeMap ? /* @__PURE__ */ new Map() : /* @__PURE__ */ Object.create(null);
  }
  ArraySet.fromArray = function ArraySet_fromArray(aArray, aAllowDuplicates) {
    var set = new ArraySet();
    for (var i = 0, len = aArray.length; i < len; i++) {
      set.add(aArray[i], aAllowDuplicates);
    }
    return set;
  };
  ArraySet.prototype.size = function ArraySet_size() {
    return hasNativeMap ? this._set.size : Object.getOwnPropertyNames(this._set).length;
  };
  ArraySet.prototype.add = function ArraySet_add(aStr, aAllowDuplicates) {
    var sStr = hasNativeMap ? aStr : util2.toSetString(aStr);
    var isDuplicate = hasNativeMap ? this.has(aStr) : has.call(this._set, sStr);
    var idx = this._array.length;
    if (!isDuplicate || aAllowDuplicates) {
      this._array.push(aStr);
    }
    if (!isDuplicate) {
      if (hasNativeMap) {
        this._set.set(aStr, idx);
      } else {
        this._set[sStr] = idx;
      }
    }
  };
  ArraySet.prototype.has = function ArraySet_has(aStr) {
    if (hasNativeMap) {
      return this._set.has(aStr);
    } else {
      var sStr = util2.toSetString(aStr);
      return has.call(this._set, sStr);
    }
  };
  ArraySet.prototype.indexOf = function ArraySet_indexOf(aStr) {
    if (hasNativeMap) {
      var idx = this._set.get(aStr);
      if (idx >= 0) {
        return idx;
      }
    } else {
      var sStr = util2.toSetString(aStr);
      if (has.call(this._set, sStr)) {
        return this._set[sStr];
      }
    }
    throw new Error('"' + aStr + '" is not in the set.');
  };
  ArraySet.prototype.at = function ArraySet_at(aIdx) {
    if (aIdx >= 0 && aIdx < this._array.length) {
      return this._array[aIdx];
    }
    throw new Error("No element indexed by " + aIdx);
  };
  ArraySet.prototype.toArray = function ArraySet_toArray() {
    return this._array.slice();
  };
  arraySet.ArraySet = ArraySet;
  return arraySet;
}
function requireMappingList() {
  if (hasRequiredMappingList) return mappingList;
  hasRequiredMappingList = 1;
  var util2 = requireUtil$1();
  function generatedPositionAfter(mappingA, mappingB) {
    var lineA = mappingA.generatedLine;
    var lineB = mappingB.generatedLine;
    var columnA = mappingA.generatedColumn;
    var columnB = mappingB.generatedColumn;
    return lineB > lineA || lineB == lineA && columnB >= columnA || util2.compareByGeneratedPositionsInflated(mappingA, mappingB) <= 0;
  }
  function MappingList() {
    this._array = [];
    this._sorted = true;
    this._last = { generatedLine: -1, generatedColumn: 0 };
  }
  MappingList.prototype.unsortedForEach = function MappingList_forEach(aCallback, aThisArg) {
    this._array.forEach(aCallback, aThisArg);
  };
  MappingList.prototype.add = function MappingList_add(aMapping) {
    if (generatedPositionAfter(this._last, aMapping)) {
      this._last = aMapping;
      this._array.push(aMapping);
    } else {
      this._sorted = false;
      this._array.push(aMapping);
    }
  };
  MappingList.prototype.toArray = function MappingList_toArray() {
    if (!this._sorted) {
      this._array.sort(util2.compareByGeneratedPositionsInflated);
      this._sorted = true;
    }
    return this._array;
  };
  mappingList.MappingList = MappingList;
  return mappingList;
}
function requireSourceMapGenerator() {
  if (hasRequiredSourceMapGenerator) return sourceMapGenerator;
  hasRequiredSourceMapGenerator = 1;
  var base64VLQ = requireBase64Vlq();
  var util2 = requireUtil$1();
  var ArraySet = requireArraySet().ArraySet;
  var MappingList = requireMappingList().MappingList;
  function SourceMapGenerator(aArgs) {
    if (!aArgs) {
      aArgs = {};
    }
    this._file = util2.getArg(aArgs, "file", null);
    this._sourceRoot = util2.getArg(aArgs, "sourceRoot", null);
    this._skipValidation = util2.getArg(aArgs, "skipValidation", false);
    this._sources = new ArraySet();
    this._names = new ArraySet();
    this._mappings = new MappingList();
    this._sourcesContents = null;
  }
  SourceMapGenerator.prototype._version = 3;
  SourceMapGenerator.fromSourceMap = function SourceMapGenerator_fromSourceMap(aSourceMapConsumer) {
    var sourceRoot = aSourceMapConsumer.sourceRoot;
    var generator = new SourceMapGenerator({
      file: aSourceMapConsumer.file,
      sourceRoot
    });
    aSourceMapConsumer.eachMapping(function(mapping) {
      var newMapping = {
        generated: {
          line: mapping.generatedLine,
          column: mapping.generatedColumn
        }
      };
      if (mapping.source != null) {
        newMapping.source = mapping.source;
        if (sourceRoot != null) {
          newMapping.source = util2.relative(sourceRoot, newMapping.source);
        }
        newMapping.original = {
          line: mapping.originalLine,
          column: mapping.originalColumn
        };
        if (mapping.name != null) {
          newMapping.name = mapping.name;
        }
      }
      generator.addMapping(newMapping);
    });
    aSourceMapConsumer.sources.forEach(function(sourceFile) {
      var sourceRelative = sourceFile;
      if (sourceRoot !== null) {
        sourceRelative = util2.relative(sourceRoot, sourceFile);
      }
      if (!generator._sources.has(sourceRelative)) {
        generator._sources.add(sourceRelative);
      }
      var content = aSourceMapConsumer.sourceContentFor(sourceFile);
      if (content != null) {
        generator.setSourceContent(sourceFile, content);
      }
    });
    return generator;
  };
  SourceMapGenerator.prototype.addMapping = function SourceMapGenerator_addMapping(aArgs) {
    var generated = util2.getArg(aArgs, "generated");
    var original = util2.getArg(aArgs, "original", null);
    var source2 = util2.getArg(aArgs, "source", null);
    var name = util2.getArg(aArgs, "name", null);
    if (!this._skipValidation) {
      this._validateMapping(generated, original, source2, name);
    }
    if (source2 != null) {
      source2 = String(source2);
      if (!this._sources.has(source2)) {
        this._sources.add(source2);
      }
    }
    if (name != null) {
      name = String(name);
      if (!this._names.has(name)) {
        this._names.add(name);
      }
    }
    this._mappings.add({
      generatedLine: generated.line,
      generatedColumn: generated.column,
      originalLine: original != null && original.line,
      originalColumn: original != null && original.column,
      source: source2,
      name
    });
  };
  SourceMapGenerator.prototype.setSourceContent = function SourceMapGenerator_setSourceContent(aSourceFile, aSourceContent) {
    var source2 = aSourceFile;
    if (this._sourceRoot != null) {
      source2 = util2.relative(this._sourceRoot, source2);
    }
    if (aSourceContent != null) {
      if (!this._sourcesContents) {
        this._sourcesContents = /* @__PURE__ */ Object.create(null);
      }
      this._sourcesContents[util2.toSetString(source2)] = aSourceContent;
    } else if (this._sourcesContents) {
      delete this._sourcesContents[util2.toSetString(source2)];
      if (Object.keys(this._sourcesContents).length === 0) {
        this._sourcesContents = null;
      }
    }
  };
  SourceMapGenerator.prototype.applySourceMap = function SourceMapGenerator_applySourceMap(aSourceMapConsumer, aSourceFile, aSourceMapPath) {
    var sourceFile = aSourceFile;
    if (aSourceFile == null) {
      if (aSourceMapConsumer.file == null) {
        throw new Error(
          `SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, or the source map's "file" property. Both were omitted.`
        );
      }
      sourceFile = aSourceMapConsumer.file;
    }
    var sourceRoot = this._sourceRoot;
    if (sourceRoot != null) {
      sourceFile = util2.relative(sourceRoot, sourceFile);
    }
    var newSources = new ArraySet();
    var newNames = new ArraySet();
    this._mappings.unsortedForEach(function(mapping) {
      if (mapping.source === sourceFile && mapping.originalLine != null) {
        var original = aSourceMapConsumer.originalPositionFor({
          line: mapping.originalLine,
          column: mapping.originalColumn
        });
        if (original.source != null) {
          mapping.source = original.source;
          if (aSourceMapPath != null) {
            mapping.source = util2.join(aSourceMapPath, mapping.source);
          }
          if (sourceRoot != null) {
            mapping.source = util2.relative(sourceRoot, mapping.source);
          }
          mapping.originalLine = original.line;
          mapping.originalColumn = original.column;
          if (original.name != null) {
            mapping.name = original.name;
          }
        }
      }
      var source2 = mapping.source;
      if (source2 != null && !newSources.has(source2)) {
        newSources.add(source2);
      }
      var name = mapping.name;
      if (name != null && !newNames.has(name)) {
        newNames.add(name);
      }
    }, this);
    this._sources = newSources;
    this._names = newNames;
    aSourceMapConsumer.sources.forEach(function(sourceFile2) {
      var content = aSourceMapConsumer.sourceContentFor(sourceFile2);
      if (content != null) {
        if (aSourceMapPath != null) {
          sourceFile2 = util2.join(aSourceMapPath, sourceFile2);
        }
        if (sourceRoot != null) {
          sourceFile2 = util2.relative(sourceRoot, sourceFile2);
        }
        this.setSourceContent(sourceFile2, content);
      }
    }, this);
  };
  SourceMapGenerator.prototype._validateMapping = function SourceMapGenerator_validateMapping(aGenerated, aOriginal, aSource, aName) {
    if (aOriginal && typeof aOriginal.line !== "number" && typeof aOriginal.column !== "number") {
      throw new Error(
        "original.line and original.column are not numbers -- you probably meant to omit the original mapping entirely and only map the generated position. If so, pass null for the original mapping instead of an object with empty or null values."
      );
    }
    if (aGenerated && "line" in aGenerated && "column" in aGenerated && aGenerated.line > 0 && aGenerated.column >= 0 && !aOriginal && !aSource && !aName) {
      return;
    } else if (aGenerated && "line" in aGenerated && "column" in aGenerated && aOriginal && "line" in aOriginal && "column" in aOriginal && aGenerated.line > 0 && aGenerated.column >= 0 && aOriginal.line > 0 && aOriginal.column >= 0 && aSource) {
      return;
    } else {
      throw new Error("Invalid mapping: " + JSON.stringify({
        generated: aGenerated,
        source: aSource,
        original: aOriginal,
        name: aName
      }));
    }
  };
  SourceMapGenerator.prototype._serializeMappings = function SourceMapGenerator_serializeMappings() {
    var previousGeneratedColumn = 0;
    var previousGeneratedLine = 1;
    var previousOriginalColumn = 0;
    var previousOriginalLine = 0;
    var previousName = 0;
    var previousSource = 0;
    var result = "";
    var next;
    var mapping;
    var nameIdx;
    var sourceIdx;
    var mappings = this._mappings.toArray();
    for (var i = 0, len = mappings.length; i < len; i++) {
      mapping = mappings[i];
      next = "";
      if (mapping.generatedLine !== previousGeneratedLine) {
        previousGeneratedColumn = 0;
        while (mapping.generatedLine !== previousGeneratedLine) {
          next += ";";
          previousGeneratedLine++;
        }
      } else {
        if (i > 0) {
          if (!util2.compareByGeneratedPositionsInflated(mapping, mappings[i - 1])) {
            continue;
          }
          next += ",";
        }
      }
      next += base64VLQ.encode(mapping.generatedColumn - previousGeneratedColumn);
      previousGeneratedColumn = mapping.generatedColumn;
      if (mapping.source != null) {
        sourceIdx = this._sources.indexOf(mapping.source);
        next += base64VLQ.encode(sourceIdx - previousSource);
        previousSource = sourceIdx;
        next += base64VLQ.encode(mapping.originalLine - 1 - previousOriginalLine);
        previousOriginalLine = mapping.originalLine - 1;
        next += base64VLQ.encode(mapping.originalColumn - previousOriginalColumn);
        previousOriginalColumn = mapping.originalColumn;
        if (mapping.name != null) {
          nameIdx = this._names.indexOf(mapping.name);
          next += base64VLQ.encode(nameIdx - previousName);
          previousName = nameIdx;
        }
      }
      result += next;
    }
    return result;
  };
  SourceMapGenerator.prototype._generateSourcesContent = function SourceMapGenerator_generateSourcesContent(aSources, aSourceRoot) {
    return aSources.map(function(source2) {
      if (!this._sourcesContents) {
        return null;
      }
      if (aSourceRoot != null) {
        source2 = util2.relative(aSourceRoot, source2);
      }
      var key = util2.toSetString(source2);
      return Object.prototype.hasOwnProperty.call(this._sourcesContents, key) ? this._sourcesContents[key] : null;
    }, this);
  };
  SourceMapGenerator.prototype.toJSON = function SourceMapGenerator_toJSON() {
    var map2 = {
      version: this._version,
      sources: this._sources.toArray(),
      names: this._names.toArray(),
      mappings: this._serializeMappings()
    };
    if (this._file != null) {
      map2.file = this._file;
    }
    if (this._sourceRoot != null) {
      map2.sourceRoot = this._sourceRoot;
    }
    if (this._sourcesContents) {
      map2.sourcesContent = this._generateSourcesContent(map2.sources, map2.sourceRoot);
    }
    return map2;
  };
  SourceMapGenerator.prototype.toString = function SourceMapGenerator_toString() {
    return JSON.stringify(this.toJSON());
  };
  sourceMapGenerator.SourceMapGenerator = SourceMapGenerator;
  return sourceMapGenerator;
}
function requireBinarySearch() {
  if (hasRequiredBinarySearch) return binarySearch;
  hasRequiredBinarySearch = 1;
  (function(exports$1) {
    exports$1.GREATEST_LOWER_BOUND = 1;
    exports$1.LEAST_UPPER_BOUND = 2;
    function recursiveSearch(aLow, aHigh, aNeedle, aHaystack, aCompare, aBias) {
      var mid = Math.floor((aHigh - aLow) / 2) + aLow;
      var cmp = aCompare(aNeedle, aHaystack[mid], true);
      if (cmp === 0) {
        return mid;
      } else if (cmp > 0) {
        if (aHigh - mid > 1) {
          return recursiveSearch(mid, aHigh, aNeedle, aHaystack, aCompare, aBias);
        }
        if (aBias == exports$1.LEAST_UPPER_BOUND) {
          return aHigh < aHaystack.length ? aHigh : -1;
        } else {
          return mid;
        }
      } else {
        if (mid - aLow > 1) {
          return recursiveSearch(aLow, mid, aNeedle, aHaystack, aCompare, aBias);
        }
        if (aBias == exports$1.LEAST_UPPER_BOUND) {
          return mid;
        } else {
          return aLow < 0 ? -1 : aLow;
        }
      }
    }
    exports$1.search = function search(aNeedle, aHaystack, aCompare, aBias) {
      if (aHaystack.length === 0) {
        return -1;
      }
      var index2 = recursiveSearch(
        -1,
        aHaystack.length,
        aNeedle,
        aHaystack,
        aCompare,
        aBias || exports$1.GREATEST_LOWER_BOUND
      );
      if (index2 < 0) {
        return -1;
      }
      while (index2 - 1 >= 0) {
        if (aCompare(aHaystack[index2], aHaystack[index2 - 1], true) !== 0) {
          break;
        }
        --index2;
      }
      return index2;
    };
  })(binarySearch);
  return binarySearch;
}
function requireQuickSort() {
  if (hasRequiredQuickSort) return quickSort;
  hasRequiredQuickSort = 1;
  function swap3(ary, x, y) {
    var temp = ary[x];
    ary[x] = ary[y];
    ary[y] = temp;
  }
  function randomIntInRange(low, high) {
    return Math.round(low + Math.random() * (high - low));
  }
  function doQuickSort(ary, comparator2, p, r) {
    if (p < r) {
      var pivotIndex = randomIntInRange(p, r);
      var i = p - 1;
      swap3(ary, pivotIndex, r);
      var pivot = ary[r];
      for (var j = p; j < r; j++) {
        if (comparator2(ary[j], pivot) <= 0) {
          i += 1;
          swap3(ary, i, j);
        }
      }
      swap3(ary, i + 1, j);
      var q = i + 1;
      doQuickSort(ary, comparator2, p, q - 1);
      doQuickSort(ary, comparator2, q + 1, r);
    }
  }
  quickSort.quickSort = function(ary, comparator2) {
    doQuickSort(ary, comparator2, 0, ary.length - 1);
  };
  return quickSort;
}
function requireSourceMapConsumer() {
  if (hasRequiredSourceMapConsumer) return sourceMapConsumer;
  hasRequiredSourceMapConsumer = 1;
  var util2 = requireUtil$1();
  var binarySearch2 = requireBinarySearch();
  var ArraySet = requireArraySet().ArraySet;
  var base64VLQ = requireBase64Vlq();
  var quickSort2 = requireQuickSort().quickSort;
  function SourceMapConsumer(aSourceMap, aSourceMapURL) {
    var sourceMap2 = aSourceMap;
    if (typeof aSourceMap === "string") {
      sourceMap2 = util2.parseSourceMapInput(aSourceMap);
    }
    return sourceMap2.sections != null ? new IndexedSourceMapConsumer(sourceMap2, aSourceMapURL) : new BasicSourceMapConsumer(sourceMap2, aSourceMapURL);
  }
  SourceMapConsumer.fromSourceMap = function(aSourceMap, aSourceMapURL) {
    return BasicSourceMapConsumer.fromSourceMap(aSourceMap, aSourceMapURL);
  };
  SourceMapConsumer.prototype._version = 3;
  SourceMapConsumer.prototype.__generatedMappings = null;
  Object.defineProperty(SourceMapConsumer.prototype, "_generatedMappings", {
    configurable: true,
    enumerable: true,
    get: function() {
      if (!this.__generatedMappings) {
        this._parseMappings(this._mappings, this.sourceRoot);
      }
      return this.__generatedMappings;
    }
  });
  SourceMapConsumer.prototype.__originalMappings = null;
  Object.defineProperty(SourceMapConsumer.prototype, "_originalMappings", {
    configurable: true,
    enumerable: true,
    get: function() {
      if (!this.__originalMappings) {
        this._parseMappings(this._mappings, this.sourceRoot);
      }
      return this.__originalMappings;
    }
  });
  SourceMapConsumer.prototype._charIsMappingSeparator = function SourceMapConsumer_charIsMappingSeparator(aStr, index2) {
    var c = aStr.charAt(index2);
    return c === ";" || c === ",";
  };
  SourceMapConsumer.prototype._parseMappings = function SourceMapConsumer_parseMappings(aStr, aSourceRoot) {
    throw new Error("Subclasses must implement _parseMappings");
  };
  SourceMapConsumer.GENERATED_ORDER = 1;
  SourceMapConsumer.ORIGINAL_ORDER = 2;
  SourceMapConsumer.GREATEST_LOWER_BOUND = 1;
  SourceMapConsumer.LEAST_UPPER_BOUND = 2;
  SourceMapConsumer.prototype.eachMapping = function SourceMapConsumer_eachMapping(aCallback, aContext, aOrder) {
    var context2 = aContext || null;
    var order = aOrder || SourceMapConsumer.GENERATED_ORDER;
    var mappings;
    switch (order) {
      case SourceMapConsumer.GENERATED_ORDER:
        mappings = this._generatedMappings;
        break;
      case SourceMapConsumer.ORIGINAL_ORDER:
        mappings = this._originalMappings;
        break;
      default:
        throw new Error("Unknown order of iteration.");
    }
    var sourceRoot = this.sourceRoot;
    mappings.map(function(mapping) {
      var source2 = mapping.source === null ? null : this._sources.at(mapping.source);
      source2 = util2.computeSourceURL(sourceRoot, source2, this._sourceMapURL);
      return {
        source: source2,
        generatedLine: mapping.generatedLine,
        generatedColumn: mapping.generatedColumn,
        originalLine: mapping.originalLine,
        originalColumn: mapping.originalColumn,
        name: mapping.name === null ? null : this._names.at(mapping.name)
      };
    }, this).forEach(aCallback, context2);
  };
  SourceMapConsumer.prototype.allGeneratedPositionsFor = function SourceMapConsumer_allGeneratedPositionsFor(aArgs) {
    var line = util2.getArg(aArgs, "line");
    var needle = {
      source: util2.getArg(aArgs, "source"),
      originalLine: line,
      originalColumn: util2.getArg(aArgs, "column", 0)
    };
    needle.source = this._findSourceIndex(needle.source);
    if (needle.source < 0) {
      return [];
    }
    var mappings = [];
    var index2 = this._findMapping(
      needle,
      this._originalMappings,
      "originalLine",
      "originalColumn",
      util2.compareByOriginalPositions,
      binarySearch2.LEAST_UPPER_BOUND
    );
    if (index2 >= 0) {
      var mapping = this._originalMappings[index2];
      if (aArgs.column === void 0) {
        var originalLine = mapping.originalLine;
        while (mapping && mapping.originalLine === originalLine) {
          mappings.push({
            line: util2.getArg(mapping, "generatedLine", null),
            column: util2.getArg(mapping, "generatedColumn", null),
            lastColumn: util2.getArg(mapping, "lastGeneratedColumn", null)
          });
          mapping = this._originalMappings[++index2];
        }
      } else {
        var originalColumn = mapping.originalColumn;
        while (mapping && mapping.originalLine === line && mapping.originalColumn == originalColumn) {
          mappings.push({
            line: util2.getArg(mapping, "generatedLine", null),
            column: util2.getArg(mapping, "generatedColumn", null),
            lastColumn: util2.getArg(mapping, "lastGeneratedColumn", null)
          });
          mapping = this._originalMappings[++index2];
        }
      }
    }
    return mappings;
  };
  sourceMapConsumer.SourceMapConsumer = SourceMapConsumer;
  function BasicSourceMapConsumer(aSourceMap, aSourceMapURL) {
    var sourceMap2 = aSourceMap;
    if (typeof aSourceMap === "string") {
      sourceMap2 = util2.parseSourceMapInput(aSourceMap);
    }
    var version3 = util2.getArg(sourceMap2, "version");
    var sources = util2.getArg(sourceMap2, "sources");
    var names3 = util2.getArg(sourceMap2, "names", []);
    var sourceRoot = util2.getArg(sourceMap2, "sourceRoot", null);
    var sourcesContent = util2.getArg(sourceMap2, "sourcesContent", null);
    var mappings = util2.getArg(sourceMap2, "mappings");
    var file2 = util2.getArg(sourceMap2, "file", null);
    if (version3 != this._version) {
      throw new Error("Unsupported version: " + version3);
    }
    if (sourceRoot) {
      sourceRoot = util2.normalize(sourceRoot);
    }
    sources = sources.map(String).map(util2.normalize).map(function(source2) {
      return sourceRoot && util2.isAbsolute(sourceRoot) && util2.isAbsolute(source2) ? util2.relative(sourceRoot, source2) : source2;
    });
    this._names = ArraySet.fromArray(names3.map(String), true);
    this._sources = ArraySet.fromArray(sources, true);
    this._absoluteSources = this._sources.toArray().map(function(s) {
      return util2.computeSourceURL(sourceRoot, s, aSourceMapURL);
    });
    this.sourceRoot = sourceRoot;
    this.sourcesContent = sourcesContent;
    this._mappings = mappings;
    this._sourceMapURL = aSourceMapURL;
    this.file = file2;
  }
  BasicSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype);
  BasicSourceMapConsumer.prototype.consumer = SourceMapConsumer;
  BasicSourceMapConsumer.prototype._findSourceIndex = function(aSource) {
    var relativeSource = aSource;
    if (this.sourceRoot != null) {
      relativeSource = util2.relative(this.sourceRoot, relativeSource);
    }
    if (this._sources.has(relativeSource)) {
      return this._sources.indexOf(relativeSource);
    }
    var i;
    for (i = 0; i < this._absoluteSources.length; ++i) {
      if (this._absoluteSources[i] == aSource) {
        return i;
      }
    }
    return -1;
  };
  BasicSourceMapConsumer.fromSourceMap = function SourceMapConsumer_fromSourceMap(aSourceMap, aSourceMapURL) {
    var smc = Object.create(BasicSourceMapConsumer.prototype);
    var names3 = smc._names = ArraySet.fromArray(aSourceMap._names.toArray(), true);
    var sources = smc._sources = ArraySet.fromArray(aSourceMap._sources.toArray(), true);
    smc.sourceRoot = aSourceMap._sourceRoot;
    smc.sourcesContent = aSourceMap._generateSourcesContent(
      smc._sources.toArray(),
      smc.sourceRoot
    );
    smc.file = aSourceMap._file;
    smc._sourceMapURL = aSourceMapURL;
    smc._absoluteSources = smc._sources.toArray().map(function(s) {
      return util2.computeSourceURL(smc.sourceRoot, s, aSourceMapURL);
    });
    var generatedMappings = aSourceMap._mappings.toArray().slice();
    var destGeneratedMappings = smc.__generatedMappings = [];
    var destOriginalMappings = smc.__originalMappings = [];
    for (var i = 0, length = generatedMappings.length; i < length; i++) {
      var srcMapping = generatedMappings[i];
      var destMapping = new Mapping();
      destMapping.generatedLine = srcMapping.generatedLine;
      destMapping.generatedColumn = srcMapping.generatedColumn;
      if (srcMapping.source) {
        destMapping.source = sources.indexOf(srcMapping.source);
        destMapping.originalLine = srcMapping.originalLine;
        destMapping.originalColumn = srcMapping.originalColumn;
        if (srcMapping.name) {
          destMapping.name = names3.indexOf(srcMapping.name);
        }
        destOriginalMappings.push(destMapping);
      }
      destGeneratedMappings.push(destMapping);
    }
    quickSort2(smc.__originalMappings, util2.compareByOriginalPositions);
    return smc;
  };
  BasicSourceMapConsumer.prototype._version = 3;
  Object.defineProperty(BasicSourceMapConsumer.prototype, "sources", {
    get: function() {
      return this._absoluteSources.slice();
    }
  });
  function Mapping() {
    this.generatedLine = 0;
    this.generatedColumn = 0;
    this.source = null;
    this.originalLine = null;
    this.originalColumn = null;
    this.name = null;
  }
  BasicSourceMapConsumer.prototype._parseMappings = function SourceMapConsumer_parseMappings(aStr, aSourceRoot) {
    var generatedLine = 1;
    var previousGeneratedColumn = 0;
    var previousOriginalLine = 0;
    var previousOriginalColumn = 0;
    var previousSource = 0;
    var previousName = 0;
    var length = aStr.length;
    var index2 = 0;
    var cachedSegments = {};
    var temp = {};
    var originalMappings = [];
    var generatedMappings = [];
    var mapping, str, segment, end, value;
    while (index2 < length) {
      if (aStr.charAt(index2) === ";") {
        generatedLine++;
        index2++;
        previousGeneratedColumn = 0;
      } else if (aStr.charAt(index2) === ",") {
        index2++;
      } else {
        mapping = new Mapping();
        mapping.generatedLine = generatedLine;
        for (end = index2; end < length; end++) {
          if (this._charIsMappingSeparator(aStr, end)) {
            break;
          }
        }
        str = aStr.slice(index2, end);
        segment = cachedSegments[str];
        if (segment) {
          index2 += str.length;
        } else {
          segment = [];
          while (index2 < end) {
            base64VLQ.decode(aStr, index2, temp);
            value = temp.value;
            index2 = temp.rest;
            segment.push(value);
          }
          if (segment.length === 2) {
            throw new Error("Found a source, but no line and column");
          }
          if (segment.length === 3) {
            throw new Error("Found a source and line, but no column");
          }
          cachedSegments[str] = segment;
        }
        mapping.generatedColumn = previousGeneratedColumn + segment[0];
        previousGeneratedColumn = mapping.generatedColumn;
        if (segment.length > 1) {
          mapping.source = previousSource + segment[1];
          previousSource += segment[1];
          mapping.originalLine = previousOriginalLine + segment[2];
          previousOriginalLine = mapping.originalLine;
          mapping.originalLine += 1;
          mapping.originalColumn = previousOriginalColumn + segment[3];
          previousOriginalColumn = mapping.originalColumn;
          if (segment.length > 4) {
            mapping.name = previousName + segment[4];
            previousName += segment[4];
          }
        }
        generatedMappings.push(mapping);
        if (typeof mapping.originalLine === "number") {
          originalMappings.push(mapping);
        }
      }
    }
    quickSort2(generatedMappings, util2.compareByGeneratedPositionsDeflated);
    this.__generatedMappings = generatedMappings;
    quickSort2(originalMappings, util2.compareByOriginalPositions);
    this.__originalMappings = originalMappings;
  };
  BasicSourceMapConsumer.prototype._findMapping = function SourceMapConsumer_findMapping(aNeedle, aMappings, aLineName, aColumnName, aComparator, aBias) {
    if (aNeedle[aLineName] <= 0) {
      throw new TypeError("Line must be greater than or equal to 1, got " + aNeedle[aLineName]);
    }
    if (aNeedle[aColumnName] < 0) {
      throw new TypeError("Column must be greater than or equal to 0, got " + aNeedle[aColumnName]);
    }
    return binarySearch2.search(aNeedle, aMappings, aComparator, aBias);
  };
  BasicSourceMapConsumer.prototype.computeColumnSpans = function SourceMapConsumer_computeColumnSpans() {
    for (var index2 = 0; index2 < this._generatedMappings.length; ++index2) {
      var mapping = this._generatedMappings[index2];
      if (index2 + 1 < this._generatedMappings.length) {
        var nextMapping = this._generatedMappings[index2 + 1];
        if (mapping.generatedLine === nextMapping.generatedLine) {
          mapping.lastGeneratedColumn = nextMapping.generatedColumn - 1;
          continue;
        }
      }
      mapping.lastGeneratedColumn = Infinity;
    }
  };
  BasicSourceMapConsumer.prototype.originalPositionFor = function SourceMapConsumer_originalPositionFor(aArgs) {
    var needle = {
      generatedLine: util2.getArg(aArgs, "line"),
      generatedColumn: util2.getArg(aArgs, "column")
    };
    var index2 = this._findMapping(
      needle,
      this._generatedMappings,
      "generatedLine",
      "generatedColumn",
      util2.compareByGeneratedPositionsDeflated,
      util2.getArg(aArgs, "bias", SourceMapConsumer.GREATEST_LOWER_BOUND)
    );
    if (index2 >= 0) {
      var mapping = this._generatedMappings[index2];
      if (mapping.generatedLine === needle.generatedLine) {
        var source2 = util2.getArg(mapping, "source", null);
        if (source2 !== null) {
          source2 = this._sources.at(source2);
          source2 = util2.computeSourceURL(this.sourceRoot, source2, this._sourceMapURL);
        }
        var name = util2.getArg(mapping, "name", null);
        if (name !== null) {
          name = this._names.at(name);
        }
        return {
          source: source2,
          line: util2.getArg(mapping, "originalLine", null),
          column: util2.getArg(mapping, "originalColumn", null),
          name
        };
      }
    }
    return {
      source: null,
      line: null,
      column: null,
      name: null
    };
  };
  BasicSourceMapConsumer.prototype.hasContentsOfAllSources = function BasicSourceMapConsumer_hasContentsOfAllSources() {
    if (!this.sourcesContent) {
      return false;
    }
    return this.sourcesContent.length >= this._sources.size() && !this.sourcesContent.some(function(sc) {
      return sc == null;
    });
  };
  BasicSourceMapConsumer.prototype.sourceContentFor = function SourceMapConsumer_sourceContentFor(aSource, nullOnMissing) {
    if (!this.sourcesContent) {
      return null;
    }
    var index2 = this._findSourceIndex(aSource);
    if (index2 >= 0) {
      return this.sourcesContent[index2];
    }
    var relativeSource = aSource;
    if (this.sourceRoot != null) {
      relativeSource = util2.relative(this.sourceRoot, relativeSource);
    }
    var url;
    if (this.sourceRoot != null && (url = util2.urlParse(this.sourceRoot))) {
      var fileUriAbsPath = relativeSource.replace(/^file:\/\//, "");
      if (url.scheme == "file" && this._sources.has(fileUriAbsPath)) {
        return this.sourcesContent[this._sources.indexOf(fileUriAbsPath)];
      }
      if ((!url.path || url.path == "/") && this._sources.has("/" + relativeSource)) {
        return this.sourcesContent[this._sources.indexOf("/" + relativeSource)];
      }
    }
    if (nullOnMissing) {
      return null;
    } else {
      throw new Error('"' + relativeSource + '" is not in the SourceMap.');
    }
  };
  BasicSourceMapConsumer.prototype.generatedPositionFor = function SourceMapConsumer_generatedPositionFor(aArgs) {
    var source2 = util2.getArg(aArgs, "source");
    source2 = this._findSourceIndex(source2);
    if (source2 < 0) {
      return {
        line: null,
        column: null,
        lastColumn: null
      };
    }
    var needle = {
      source: source2,
      originalLine: util2.getArg(aArgs, "line"),
      originalColumn: util2.getArg(aArgs, "column")
    };
    var index2 = this._findMapping(
      needle,
      this._originalMappings,
      "originalLine",
      "originalColumn",
      util2.compareByOriginalPositions,
      util2.getArg(aArgs, "bias", SourceMapConsumer.GREATEST_LOWER_BOUND)
    );
    if (index2 >= 0) {
      var mapping = this._originalMappings[index2];
      if (mapping.source === needle.source) {
        return {
          line: util2.getArg(mapping, "generatedLine", null),
          column: util2.getArg(mapping, "generatedColumn", null),
          lastColumn: util2.getArg(mapping, "lastGeneratedColumn", null)
        };
      }
    }
    return {
      line: null,
      column: null,
      lastColumn: null
    };
  };
  sourceMapConsumer.BasicSourceMapConsumer = BasicSourceMapConsumer;
  function IndexedSourceMapConsumer(aSourceMap, aSourceMapURL) {
    var sourceMap2 = aSourceMap;
    if (typeof aSourceMap === "string") {
      sourceMap2 = util2.parseSourceMapInput(aSourceMap);
    }
    var version3 = util2.getArg(sourceMap2, "version");
    var sections = util2.getArg(sourceMap2, "sections");
    if (version3 != this._version) {
      throw new Error("Unsupported version: " + version3);
    }
    this._sources = new ArraySet();
    this._names = new ArraySet();
    var lastOffset = {
      line: -1,
      column: 0
    };
    this._sections = sections.map(function(s) {
      if (s.url) {
        throw new Error("Support for url field in sections not implemented.");
      }
      var offset = util2.getArg(s, "offset");
      var offsetLine = util2.getArg(offset, "line");
      var offsetColumn = util2.getArg(offset, "column");
      if (offsetLine < lastOffset.line || offsetLine === lastOffset.line && offsetColumn < lastOffset.column) {
        throw new Error("Section offsets must be ordered and non-overlapping.");
      }
      lastOffset = offset;
      return {
        generatedOffset: {
          generatedLine: offsetLine + 1,
          generatedColumn: offsetColumn + 1
        },
        consumer: new SourceMapConsumer(util2.getArg(s, "map"), aSourceMapURL)
      };
    });
  }
  IndexedSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype);
  IndexedSourceMapConsumer.prototype.constructor = SourceMapConsumer;
  IndexedSourceMapConsumer.prototype._version = 3;
  Object.defineProperty(IndexedSourceMapConsumer.prototype, "sources", {
    get: function() {
      var sources = [];
      for (var i = 0; i < this._sections.length; i++) {
        for (var j = 0; j < this._sections[i].consumer.sources.length; j++) {
          sources.push(this._sections[i].consumer.sources[j]);
        }
      }
      return sources;
    }
  });
  IndexedSourceMapConsumer.prototype.originalPositionFor = function IndexedSourceMapConsumer_originalPositionFor(aArgs) {
    var needle = {
      generatedLine: util2.getArg(aArgs, "line"),
      generatedColumn: util2.getArg(aArgs, "column")
    };
    var sectionIndex = binarySearch2.search(
      needle,
      this._sections,
      function(needle2, section2) {
        var cmp = needle2.generatedLine - section2.generatedOffset.generatedLine;
        if (cmp) {
          return cmp;
        }
        return needle2.generatedColumn - section2.generatedOffset.generatedColumn;
      }
    );
    var section = this._sections[sectionIndex];
    if (!section) {
      return {
        source: null,
        line: null,
        column: null,
        name: null
      };
    }
    return section.consumer.originalPositionFor({
      line: needle.generatedLine - (section.generatedOffset.generatedLine - 1),
      column: needle.generatedColumn - (section.generatedOffset.generatedLine === needle.generatedLine ? section.generatedOffset.generatedColumn - 1 : 0),
      bias: aArgs.bias
    });
  };
  IndexedSourceMapConsumer.prototype.hasContentsOfAllSources = function IndexedSourceMapConsumer_hasContentsOfAllSources() {
    return this._sections.every(function(s) {
      return s.consumer.hasContentsOfAllSources();
    });
  };
  IndexedSourceMapConsumer.prototype.sourceContentFor = function IndexedSourceMapConsumer_sourceContentFor(aSource, nullOnMissing) {
    for (var i = 0; i < this._sections.length; i++) {
      var section = this._sections[i];
      var content = section.consumer.sourceContentFor(aSource, true);
      if (content) {
        return content;
      }
    }
    if (nullOnMissing) {
      return null;
    } else {
      throw new Error('"' + aSource + '" is not in the SourceMap.');
    }
  };
  IndexedSourceMapConsumer.prototype.generatedPositionFor = function IndexedSourceMapConsumer_generatedPositionFor(aArgs) {
    for (var i = 0; i < this._sections.length; i++) {
      var section = this._sections[i];
      if (section.consumer._findSourceIndex(util2.getArg(aArgs, "source")) === -1) {
        continue;
      }
      var generatedPosition = section.consumer.generatedPositionFor(aArgs);
      if (generatedPosition) {
        var ret = {
          line: generatedPosition.line + (section.generatedOffset.generatedLine - 1),
          column: generatedPosition.column + (section.generatedOffset.generatedLine === generatedPosition.line ? section.generatedOffset.generatedColumn - 1 : 0)
        };
        return ret;
      }
    }
    return {
      line: null,
      column: null
    };
  };
  IndexedSourceMapConsumer.prototype._parseMappings = function IndexedSourceMapConsumer_parseMappings(aStr, aSourceRoot) {
    this.__generatedMappings = [];
    this.__originalMappings = [];
    for (var i = 0; i < this._sections.length; i++) {
      var section = this._sections[i];
      var sectionMappings = section.consumer._generatedMappings;
      for (var j = 0; j < sectionMappings.length; j++) {
        var mapping = sectionMappings[j];
        var source2 = section.consumer._sources.at(mapping.source);
        source2 = util2.computeSourceURL(section.consumer.sourceRoot, source2, this._sourceMapURL);
        this._sources.add(source2);
        source2 = this._sources.indexOf(source2);
        var name = null;
        if (mapping.name) {
          name = section.consumer._names.at(mapping.name);
          this._names.add(name);
          name = this._names.indexOf(name);
        }
        var adjustedMapping = {
          source: source2,
          generatedLine: mapping.generatedLine + (section.generatedOffset.generatedLine - 1),
          generatedColumn: mapping.generatedColumn + (section.generatedOffset.generatedLine === mapping.generatedLine ? section.generatedOffset.generatedColumn - 1 : 0),
          originalLine: mapping.originalLine,
          originalColumn: mapping.originalColumn,
          name
        };
        this.__generatedMappings.push(adjustedMapping);
        if (typeof adjustedMapping.originalLine === "number") {
          this.__originalMappings.push(adjustedMapping);
        }
      }
    }
    quickSort2(this.__generatedMappings, util2.compareByGeneratedPositionsDeflated);
    quickSort2(this.__originalMappings, util2.compareByOriginalPositions);
  };
  sourceMapConsumer.IndexedSourceMapConsumer = IndexedSourceMapConsumer;
  return sourceMapConsumer;
}
function requireSourceNode() {
  if (hasRequiredSourceNode) return sourceNode;
  hasRequiredSourceNode = 1;
  var SourceMapGenerator = requireSourceMapGenerator().SourceMapGenerator;
  var util2 = requireUtil$1();
  var REGEX_NEWLINE = /(\r?\n)/;
  var NEWLINE_CODE = 10;
  var isSourceNode = "$$$isSourceNode$$$";
  function SourceNode(aLine, aColumn, aSource, aChunks, aName) {
    this.children = [];
    this.sourceContents = {};
    this.line = aLine == null ? null : aLine;
    this.column = aColumn == null ? null : aColumn;
    this.source = aSource == null ? null : aSource;
    this.name = aName == null ? null : aName;
    this[isSourceNode] = true;
    if (aChunks != null) this.add(aChunks);
  }
  SourceNode.fromStringWithSourceMap = function SourceNode_fromStringWithSourceMap(aGeneratedCode, aSourceMapConsumer, aRelativePath) {
    var node2 = new SourceNode();
    var remainingLines = aGeneratedCode.split(REGEX_NEWLINE);
    var remainingLinesIndex = 0;
    var shiftNextLine = function() {
      var lineContents = getNextLine();
      var newLine = getNextLine() || "";
      return lineContents + newLine;
      function getNextLine() {
        return remainingLinesIndex < remainingLines.length ? remainingLines[remainingLinesIndex++] : void 0;
      }
    };
    var lastGeneratedLine = 1, lastGeneratedColumn = 0;
    var lastMapping = null;
    aSourceMapConsumer.eachMapping(function(mapping) {
      if (lastMapping !== null) {
        if (lastGeneratedLine < mapping.generatedLine) {
          addMappingWithCode(lastMapping, shiftNextLine());
          lastGeneratedLine++;
          lastGeneratedColumn = 0;
        } else {
          var nextLine = remainingLines[remainingLinesIndex] || "";
          var code2 = nextLine.substr(0, mapping.generatedColumn - lastGeneratedColumn);
          remainingLines[remainingLinesIndex] = nextLine.substr(mapping.generatedColumn - lastGeneratedColumn);
          lastGeneratedColumn = mapping.generatedColumn;
          addMappingWithCode(lastMapping, code2);
          lastMapping = mapping;
          return;
        }
      }
      while (lastGeneratedLine < mapping.generatedLine) {
        node2.add(shiftNextLine());
        lastGeneratedLine++;
      }
      if (lastGeneratedColumn < mapping.generatedColumn) {
        var nextLine = remainingLines[remainingLinesIndex] || "";
        node2.add(nextLine.substr(0, mapping.generatedColumn));
        remainingLines[remainingLinesIndex] = nextLine.substr(mapping.generatedColumn);
        lastGeneratedColumn = mapping.generatedColumn;
      }
      lastMapping = mapping;
    }, this);
    if (remainingLinesIndex < remainingLines.length) {
      if (lastMapping) {
        addMappingWithCode(lastMapping, shiftNextLine());
      }
      node2.add(remainingLines.splice(remainingLinesIndex).join(""));
    }
    aSourceMapConsumer.sources.forEach(function(sourceFile) {
      var content = aSourceMapConsumer.sourceContentFor(sourceFile);
      if (content != null) {
        if (aRelativePath != null) {
          sourceFile = util2.join(aRelativePath, sourceFile);
        }
        node2.setSourceContent(sourceFile, content);
      }
    });
    return node2;
    function addMappingWithCode(mapping, code2) {
      if (mapping === null || mapping.source === void 0) {
        node2.add(code2);
      } else {
        var source2 = aRelativePath ? util2.join(aRelativePath, mapping.source) : mapping.source;
        node2.add(new SourceNode(
          mapping.originalLine,
          mapping.originalColumn,
          source2,
          code2,
          mapping.name
        ));
      }
    }
  };
  SourceNode.prototype.add = function SourceNode_add(aChunk) {
    if (Array.isArray(aChunk)) {
      aChunk.forEach(function(chunk) {
        this.add(chunk);
      }, this);
    } else if (aChunk[isSourceNode] || typeof aChunk === "string") {
      if (aChunk) {
        this.children.push(aChunk);
      }
    } else {
      throw new TypeError(
        "Expected a SourceNode, string, or an array of SourceNodes and strings. Got " + aChunk
      );
    }
    return this;
  };
  SourceNode.prototype.prepend = function SourceNode_prepend(aChunk) {
    if (Array.isArray(aChunk)) {
      for (var i = aChunk.length - 1; i >= 0; i--) {
        this.prepend(aChunk[i]);
      }
    } else if (aChunk[isSourceNode] || typeof aChunk === "string") {
      this.children.unshift(aChunk);
    } else {
      throw new TypeError(
        "Expected a SourceNode, string, or an array of SourceNodes and strings. Got " + aChunk
      );
    }
    return this;
  };
  SourceNode.prototype.walk = function SourceNode_walk(aFn) {
    var chunk;
    for (var i = 0, len = this.children.length; i < len; i++) {
      chunk = this.children[i];
      if (chunk[isSourceNode]) {
        chunk.walk(aFn);
      } else {
        if (chunk !== "") {
          aFn(chunk, {
            source: this.source,
            line: this.line,
            column: this.column,
            name: this.name
          });
        }
      }
    }
  };
  SourceNode.prototype.join = function SourceNode_join(aSep) {
    var newChildren;
    var i;
    var len = this.children.length;
    if (len > 0) {
      newChildren = [];
      for (i = 0; i < len - 1; i++) {
        newChildren.push(this.children[i]);
        newChildren.push(aSep);
      }
      newChildren.push(this.children[i]);
      this.children = newChildren;
    }
    return this;
  };
  SourceNode.prototype.replaceRight = function SourceNode_replaceRight(aPattern, aReplacement) {
    var lastChild = this.children[this.children.length - 1];
    if (lastChild[isSourceNode]) {
      lastChild.replaceRight(aPattern, aReplacement);
    } else if (typeof lastChild === "string") {
      this.children[this.children.length - 1] = lastChild.replace(aPattern, aReplacement);
    } else {
      this.children.push("".replace(aPattern, aReplacement));
    }
    return this;
  };
  SourceNode.prototype.setSourceContent = function SourceNode_setSourceContent(aSourceFile, aSourceContent) {
    this.sourceContents[util2.toSetString(aSourceFile)] = aSourceContent;
  };
  SourceNode.prototype.walkSourceContents = function SourceNode_walkSourceContents(aFn) {
    for (var i = 0, len = this.children.length; i < len; i++) {
      if (this.children[i][isSourceNode]) {
        this.children[i].walkSourceContents(aFn);
      }
    }
    var sources = Object.keys(this.sourceContents);
    for (var i = 0, len = sources.length; i < len; i++) {
      aFn(util2.fromSetString(sources[i]), this.sourceContents[sources[i]]);
    }
  };
  SourceNode.prototype.toString = function SourceNode_toString() {
    var str = "";
    this.walk(function(chunk) {
      str += chunk;
    });
    return str;
  };
  SourceNode.prototype.toStringWithSourceMap = function SourceNode_toStringWithSourceMap(aArgs) {
    var generated = {
      code: "",
      line: 1,
      column: 0
    };
    var map2 = new SourceMapGenerator(aArgs);
    var sourceMappingActive = false;
    var lastOriginalSource = null;
    var lastOriginalLine = null;
    var lastOriginalColumn = null;
    var lastOriginalName = null;
    this.walk(function(chunk, original) {
      generated.code += chunk;
      if (original.source !== null && original.line !== null && original.column !== null) {
        if (lastOriginalSource !== original.source || lastOriginalLine !== original.line || lastOriginalColumn !== original.column || lastOriginalName !== original.name) {
          map2.addMapping({
            source: original.source,
            original: {
              line: original.line,
              column: original.column
            },
            generated: {
              line: generated.line,
              column: generated.column
            },
            name: original.name
          });
        }
        lastOriginalSource = original.source;
        lastOriginalLine = original.line;
        lastOriginalColumn = original.column;
        lastOriginalName = original.name;
        sourceMappingActive = true;
      } else if (sourceMappingActive) {
        map2.addMapping({
          generated: {
            line: generated.line,
            column: generated.column
          }
        });
        lastOriginalSource = null;
        sourceMappingActive = false;
      }
      for (var idx = 0, length = chunk.length; idx < length; idx++) {
        if (chunk.charCodeAt(idx) === NEWLINE_CODE) {
          generated.line++;
          generated.column = 0;
          if (idx + 1 === length) {
            lastOriginalSource = null;
            sourceMappingActive = false;
          } else if (sourceMappingActive) {
            map2.addMapping({
              source: original.source,
              original: {
                line: original.line,
                column: original.column
              },
              generated: {
                line: generated.line,
                column: generated.column
              },
              name: original.name
            });
          }
        } else {
          generated.column++;
        }
      }
    });
    this.walkSourceContents(function(sourceFile, sourceContent) {
      map2.setSourceContent(sourceFile, sourceContent);
    });
    return { code: generated.code, map: map2 };
  };
  sourceNode.SourceNode = SourceNode;
  return sourceNode;
}
function requireSourceMap() {
  if (hasRequiredSourceMap) return sourceMap;
  hasRequiredSourceMap = 1;
  sourceMap.SourceMapGenerator = requireSourceMapGenerator().SourceMapGenerator;
  sourceMap.SourceMapConsumer = requireSourceMapConsumer().SourceMapConsumer;
  sourceMap.SourceNode = requireSourceNode().SourceNode;
  return sourceMap;
}
function requireEscodegen() {
  if (hasRequiredEscodegen) return escodegen;
  hasRequiredEscodegen = 1;
  (function(exports$1) {
    (function() {
      var Syntax, Precedence, BinaryPrecedence, SourceNode, estraverse2, esutils, base, indent, json, renumber, hexadecimal, quotes, escapeless, newline2, space, parentheses, semicolons, safeConcatenation, directive, extra, parse2, sourceMap2, sourceCode, preserveBlankLines, FORMAT_MINIFY, FORMAT_DEFAULTS;
      estraverse2 = requireEstraverse();
      esutils = requireUtils();
      Syntax = estraverse2.Syntax;
      function isExpression(node2) {
        return CodeGenerator.Expression.hasOwnProperty(node2.type);
      }
      function isStatement(node2) {
        return CodeGenerator.Statement.hasOwnProperty(node2.type);
      }
      Precedence = {
        Sequence: 0,
        Yield: 1,
        Assignment: 1,
        Conditional: 2,
        ArrowFunction: 2,
        Coalesce: 3,
        LogicalOR: 4,
        LogicalAND: 5,
        BitwiseOR: 6,
        BitwiseXOR: 7,
        BitwiseAND: 8,
        Equality: 9,
        Relational: 10,
        BitwiseSHIFT: 11,
        Additive: 12,
        Multiplicative: 13,
        Exponentiation: 14,
        Await: 15,
        Unary: 15,
        Postfix: 16,
        OptionalChaining: 17,
        Call: 18,
        New: 19,
        TaggedTemplate: 20,
        Member: 21,
        Primary: 22
      };
      BinaryPrecedence = {
        "??": Precedence.Coalesce,
        "||": Precedence.LogicalOR,
        "&&": Precedence.LogicalAND,
        "|": Precedence.BitwiseOR,
        "^": Precedence.BitwiseXOR,
        "&": Precedence.BitwiseAND,
        "==": Precedence.Equality,
        "!=": Precedence.Equality,
        "===": Precedence.Equality,
        "!==": Precedence.Equality,
        "is": Precedence.Equality,
        "isnt": Precedence.Equality,
        "<": Precedence.Relational,
        ">": Precedence.Relational,
        "<=": Precedence.Relational,
        ">=": Precedence.Relational,
        "in": Precedence.Relational,
        "instanceof": Precedence.Relational,
        "<<": Precedence.BitwiseSHIFT,
        ">>": Precedence.BitwiseSHIFT,
        ">>>": Precedence.BitwiseSHIFT,
        "+": Precedence.Additive,
        "-": Precedence.Additive,
        "*": Precedence.Multiplicative,
        "%": Precedence.Multiplicative,
        "/": Precedence.Multiplicative,
        "**": Precedence.Exponentiation
      };
      var F_ALLOW_IN = 1, F_ALLOW_CALL = 1 << 1, F_ALLOW_UNPARATH_NEW = 1 << 2, F_FUNC_BODY = 1 << 3, F_DIRECTIVE_CTX = 1 << 4, F_SEMICOLON_OPT = 1 << 5, F_FOUND_COALESCE = 1 << 6;
      var E_FTT = F_ALLOW_CALL | F_ALLOW_UNPARATH_NEW, E_TTF = F_ALLOW_IN | F_ALLOW_CALL, E_TTT = F_ALLOW_IN | F_ALLOW_CALL | F_ALLOW_UNPARATH_NEW, E_TFF = F_ALLOW_IN, E_FFT = F_ALLOW_UNPARATH_NEW, E_TFT = F_ALLOW_IN | F_ALLOW_UNPARATH_NEW;
      var S_TFFF = F_ALLOW_IN, S_TFFT = F_ALLOW_IN | F_SEMICOLON_OPT, S_FFFF = 0, S_TFTF = F_ALLOW_IN | F_DIRECTIVE_CTX, S_TTFF = F_ALLOW_IN | F_FUNC_BODY;
      function getDefaultOptions2() {
        return {
          indent: null,
          base: null,
          parse: null,
          comment: false,
          format: {
            indent: {
              style: "    ",
              base: 0,
              adjustMultilineComment: false
            },
            newline: "\n",
            space: " ",
            json: false,
            renumber: false,
            hexadecimal: false,
            quotes: "single",
            escapeless: false,
            compact: false,
            parentheses: true,
            semicolons: true,
            safeConcatenation: false,
            preserveBlankLines: false
          },
          moz: {
            comprehensionExpressionStartsWithAssignment: false,
            starlessGenerator: false
          },
          sourceMap: null,
          sourceMapRoot: null,
          sourceMapWithCode: false,
          directive: false,
          raw: true,
          verbatim: null,
          sourceCode: null
        };
      }
      function stringRepeat(str, num) {
        var result = "";
        for (num |= 0; num > 0; num >>>= 1, str += str) {
          if (num & 1) {
            result += str;
          }
        }
        return result;
      }
      function hasLineTerminator(str) {
        return /[\r\n]/g.test(str);
      }
      function endsWithLineTerminator(str) {
        var len = str.length;
        return len && esutils.code.isLineTerminator(str.charCodeAt(len - 1));
      }
      function merge2(target, override) {
        var key;
        for (key in override) {
          if (override.hasOwnProperty(key)) {
            target[key] = override[key];
          }
        }
        return target;
      }
      function updateDeeply(target, override) {
        var key, val;
        function isHashObject(target2) {
          return typeof target2 === "object" && target2 instanceof Object && !(target2 instanceof RegExp);
        }
        for (key in override) {
          if (override.hasOwnProperty(key)) {
            val = override[key];
            if (isHashObject(val)) {
              if (isHashObject(target[key])) {
                updateDeeply(target[key], val);
              } else {
                target[key] = updateDeeply({}, val);
              }
            } else {
              target[key] = val;
            }
          }
        }
        return target;
      }
      function generateNumber(value) {
        var result, point, temp, exponent, pos;
        if (value !== value) {
          throw new Error("Numeric literal whose value is NaN");
        }
        if (value < 0 || value === 0 && 1 / value < 0) {
          throw new Error("Numeric literal whose value is negative");
        }
        if (value === 1 / 0) {
          return json ? "null" : renumber ? "1e400" : "1e+400";
        }
        result = "" + value;
        if (!renumber || result.length < 3) {
          return result;
        }
        point = result.indexOf(".");
        if (!json && result.charCodeAt(0) === 48 && point === 1) {
          point = 0;
          result = result.slice(1);
        }
        temp = result;
        result = result.replace("e+", "e");
        exponent = 0;
        if ((pos = temp.indexOf("e")) > 0) {
          exponent = +temp.slice(pos + 1);
          temp = temp.slice(0, pos);
        }
        if (point >= 0) {
          exponent -= temp.length - point - 1;
          temp = +(temp.slice(0, point) + temp.slice(point + 1)) + "";
        }
        pos = 0;
        while (temp.charCodeAt(temp.length + pos - 1) === 48) {
          --pos;
        }
        if (pos !== 0) {
          exponent -= pos;
          temp = temp.slice(0, pos);
        }
        if (exponent !== 0) {
          temp += "e" + exponent;
        }
        if ((temp.length < result.length || hexadecimal && value > 1e12 && Math.floor(value) === value && (temp = "0x" + value.toString(16)).length < result.length) && +temp === value) {
          result = temp;
        }
        return result;
      }
      function escapeRegExpCharacter(ch, previousIsBackslash) {
        if ((ch & -2) === 8232) {
          return (previousIsBackslash ? "u" : "\\u") + (ch === 8232 ? "2028" : "2029");
        } else if (ch === 10 || ch === 13) {
          return (previousIsBackslash ? "" : "\\") + (ch === 10 ? "n" : "r");
        }
        return String.fromCharCode(ch);
      }
      function generateRegExp(reg) {
        var match, result, flags, i, iz, ch, characterInBrack, previousIsBackslash;
        result = reg.toString();
        if (reg.source) {
          match = result.match(/\/([^/]*)$/);
          if (!match) {
            return result;
          }
          flags = match[1];
          result = "";
          characterInBrack = false;
          previousIsBackslash = false;
          for (i = 0, iz = reg.source.length; i < iz; ++i) {
            ch = reg.source.charCodeAt(i);
            if (!previousIsBackslash) {
              if (characterInBrack) {
                if (ch === 93) {
                  characterInBrack = false;
                }
              } else {
                if (ch === 47) {
                  result += "\\";
                } else if (ch === 91) {
                  characterInBrack = true;
                }
              }
              result += escapeRegExpCharacter(ch, previousIsBackslash);
              previousIsBackslash = ch === 92;
            } else {
              result += escapeRegExpCharacter(ch, previousIsBackslash);
              previousIsBackslash = false;
            }
          }
          return "/" + result + "/" + flags;
        }
        return result;
      }
      function escapeAllowedCharacter(code2, next) {
        var hex;
        if (code2 === 8) {
          return "\\b";
        }
        if (code2 === 12) {
          return "\\f";
        }
        if (code2 === 9) {
          return "\\t";
        }
        hex = code2.toString(16).toUpperCase();
        if (json || code2 > 255) {
          return "\\u" + "0000".slice(hex.length) + hex;
        } else if (code2 === 0 && !esutils.code.isDecimalDigit(next)) {
          return "\\0";
        } else if (code2 === 11) {
          return "\\x0B";
        } else {
          return "\\x" + "00".slice(hex.length) + hex;
        }
      }
      function escapeDisallowedCharacter(code2) {
        if (code2 === 92) {
          return "\\\\";
        }
        if (code2 === 10) {
          return "\\n";
        }
        if (code2 === 13) {
          return "\\r";
        }
        if (code2 === 8232) {
          return "\\u2028";
        }
        if (code2 === 8233) {
          return "\\u2029";
        }
        throw new Error("Incorrectly classified character");
      }
      function escapeDirective(str) {
        var i, iz, code2, quote;
        quote = quotes === "double" ? '"' : "'";
        for (i = 0, iz = str.length; i < iz; ++i) {
          code2 = str.charCodeAt(i);
          if (code2 === 39) {
            quote = '"';
            break;
          } else if (code2 === 34) {
            quote = "'";
            break;
          } else if (code2 === 92) {
            ++i;
          }
        }
        return quote + str + quote;
      }
      function escapeString(str) {
        var result = "", i, len, code2, singleQuotes = 0, doubleQuotes = 0, single, quote;
        for (i = 0, len = str.length; i < len; ++i) {
          code2 = str.charCodeAt(i);
          if (code2 === 39) {
            ++singleQuotes;
          } else if (code2 === 34) {
            ++doubleQuotes;
          } else if (code2 === 47 && json) {
            result += "\\";
          } else if (esutils.code.isLineTerminator(code2) || code2 === 92) {
            result += escapeDisallowedCharacter(code2);
            continue;
          } else if (!esutils.code.isIdentifierPartES5(code2) && (json && code2 < 32 || !json && !escapeless && (code2 < 32 || code2 > 126))) {
            result += escapeAllowedCharacter(code2, str.charCodeAt(i + 1));
            continue;
          }
          result += String.fromCharCode(code2);
        }
        single = !(quotes === "double" || quotes === "auto" && doubleQuotes < singleQuotes);
        quote = single ? "'" : '"';
        if (!(single ? singleQuotes : doubleQuotes)) {
          return quote + result + quote;
        }
        str = result;
        result = quote;
        for (i = 0, len = str.length; i < len; ++i) {
          code2 = str.charCodeAt(i);
          if (code2 === 39 && single || code2 === 34 && !single) {
            result += "\\";
          }
          result += String.fromCharCode(code2);
        }
        return result + quote;
      }
      function flattenToString(arr) {
        var i, iz, elem, result = "";
        for (i = 0, iz = arr.length; i < iz; ++i) {
          elem = arr[i];
          result += Array.isArray(elem) ? flattenToString(elem) : elem;
        }
        return result;
      }
      function toSourceNodeWhenNeeded(generated, node2) {
        if (!sourceMap2) {
          if (Array.isArray(generated)) {
            return flattenToString(generated);
          } else {
            return generated;
          }
        }
        if (node2 == null) {
          if (generated instanceof SourceNode) {
            return generated;
          } else {
            node2 = {};
          }
        }
        if (node2.loc == null) {
          return new SourceNode(null, null, sourceMap2, generated, node2.name || null);
        }
        return new SourceNode(node2.loc.start.line, node2.loc.start.column, sourceMap2 === true ? node2.loc.source || null : sourceMap2, generated, node2.name || null);
      }
      function noEmptySpace() {
        return space ? space : " ";
      }
      function join3(left2, right2) {
        var leftSource, rightSource, leftCharCode, rightCharCode;
        leftSource = toSourceNodeWhenNeeded(left2).toString();
        if (leftSource.length === 0) {
          return [right2];
        }
        rightSource = toSourceNodeWhenNeeded(right2).toString();
        if (rightSource.length === 0) {
          return [left2];
        }
        leftCharCode = leftSource.charCodeAt(leftSource.length - 1);
        rightCharCode = rightSource.charCodeAt(0);
        if ((leftCharCode === 43 || leftCharCode === 45) && leftCharCode === rightCharCode || esutils.code.isIdentifierPartES5(leftCharCode) && esutils.code.isIdentifierPartES5(rightCharCode) || leftCharCode === 47 && rightCharCode === 105) {
          return [left2, noEmptySpace(), right2];
        } else if (esutils.code.isWhiteSpace(leftCharCode) || esutils.code.isLineTerminator(leftCharCode) || esutils.code.isWhiteSpace(rightCharCode) || esutils.code.isLineTerminator(rightCharCode)) {
          return [left2, right2];
        }
        return [left2, space, right2];
      }
      function addIndent(stmt) {
        return [base, stmt];
      }
      function withIndent(fn) {
        var previousBase;
        previousBase = base;
        base += indent;
        fn(base);
        base = previousBase;
      }
      function calculateSpaces(str) {
        var i;
        for (i = str.length - 1; i >= 0; --i) {
          if (esutils.code.isLineTerminator(str.charCodeAt(i))) {
            break;
          }
        }
        return str.length - 1 - i;
      }
      function adjustMultilineComment(value, specialBase) {
        var array2, i, len, line, j, spaces, previousBase, sn;
        array2 = value.split(/\r\n|[\r\n]/);
        spaces = Number.MAX_VALUE;
        for (i = 1, len = array2.length; i < len; ++i) {
          line = array2[i];
          j = 0;
          while (j < line.length && esutils.code.isWhiteSpace(line.charCodeAt(j))) {
            ++j;
          }
          if (spaces > j) {
            spaces = j;
          }
        }
        if (typeof specialBase !== "undefined") {
          previousBase = base;
          if (array2[1][spaces] === "*") {
            specialBase += " ";
          }
          base = specialBase;
        } else {
          if (spaces & 1) {
            --spaces;
          }
          previousBase = base;
        }
        for (i = 1, len = array2.length; i < len; ++i) {
          sn = toSourceNodeWhenNeeded(addIndent(array2[i].slice(spaces)));
          array2[i] = sourceMap2 ? sn.join("") : sn;
        }
        base = previousBase;
        return array2.join("\n");
      }
      function generateComment(comment, specialBase) {
        if (comment.type === "Line") {
          if (endsWithLineTerminator(comment.value)) {
            return "//" + comment.value;
          } else {
            var result = "//" + comment.value;
            if (!preserveBlankLines) {
              result += "\n";
            }
            return result;
          }
        }
        if (extra.format.indent.adjustMultilineComment && /[\n\r]/.test(comment.value)) {
          return adjustMultilineComment("/*" + comment.value + "*/", specialBase);
        }
        return "/*" + comment.value + "*/";
      }
      function addComments(stmt, result) {
        var i, len, comment, save, tailingToStatement, specialBase, fragment, extRange, range2, prevRange, prefix, infix, suffix, count;
        if (stmt.leadingComments && stmt.leadingComments.length > 0) {
          save = result;
          if (preserveBlankLines) {
            comment = stmt.leadingComments[0];
            result = [];
            extRange = comment.extendedRange;
            range2 = comment.range;
            prefix = sourceCode.substring(extRange[0], range2[0]);
            count = (prefix.match(/\n/g) || []).length;
            if (count > 0) {
              result.push(stringRepeat("\n", count));
              result.push(addIndent(generateComment(comment)));
            } else {
              result.push(prefix);
              result.push(generateComment(comment));
            }
            prevRange = range2;
            for (i = 1, len = stmt.leadingComments.length; i < len; i++) {
              comment = stmt.leadingComments[i];
              range2 = comment.range;
              infix = sourceCode.substring(prevRange[1], range2[0]);
              count = (infix.match(/\n/g) || []).length;
              result.push(stringRepeat("\n", count));
              result.push(addIndent(generateComment(comment)));
              prevRange = range2;
            }
            suffix = sourceCode.substring(range2[1], extRange[1]);
            count = (suffix.match(/\n/g) || []).length;
            result.push(stringRepeat("\n", count));
          } else {
            comment = stmt.leadingComments[0];
            result = [];
            if (safeConcatenation && stmt.type === Syntax.Program && stmt.body.length === 0) {
              result.push("\n");
            }
            result.push(generateComment(comment));
            if (!endsWithLineTerminator(toSourceNodeWhenNeeded(result).toString())) {
              result.push("\n");
            }
            for (i = 1, len = stmt.leadingComments.length; i < len; ++i) {
              comment = stmt.leadingComments[i];
              fragment = [generateComment(comment)];
              if (!endsWithLineTerminator(toSourceNodeWhenNeeded(fragment).toString())) {
                fragment.push("\n");
              }
              result.push(addIndent(fragment));
            }
          }
          result.push(addIndent(save));
        }
        if (stmt.trailingComments) {
          if (preserveBlankLines) {
            comment = stmt.trailingComments[0];
            extRange = comment.extendedRange;
            range2 = comment.range;
            prefix = sourceCode.substring(extRange[0], range2[0]);
            count = (prefix.match(/\n/g) || []).length;
            if (count > 0) {
              result.push(stringRepeat("\n", count));
              result.push(addIndent(generateComment(comment)));
            } else {
              result.push(prefix);
              result.push(generateComment(comment));
            }
          } else {
            tailingToStatement = !endsWithLineTerminator(toSourceNodeWhenNeeded(result).toString());
            specialBase = stringRepeat(" ", calculateSpaces(toSourceNodeWhenNeeded([base, result, indent]).toString()));
            for (i = 0, len = stmt.trailingComments.length; i < len; ++i) {
              comment = stmt.trailingComments[i];
              if (tailingToStatement) {
                if (i === 0) {
                  result = [result, indent];
                } else {
                  result = [result, specialBase];
                }
                result.push(generateComment(comment, specialBase));
              } else {
                result = [result, addIndent(generateComment(comment))];
              }
              if (i !== len - 1 && !endsWithLineTerminator(toSourceNodeWhenNeeded(result).toString())) {
                result = [result, "\n"];
              }
            }
          }
        }
        return result;
      }
      function generateBlankLines(start, end, result) {
        var j, newlineCount = 0;
        for (j = start; j < end; j++) {
          if (sourceCode[j] === "\n") {
            newlineCount++;
          }
        }
        for (j = 1; j < newlineCount; j++) {
          result.push(newline2);
        }
      }
      function parenthesize(text, current, should) {
        if (current < should) {
          return ["(", text, ")"];
        }
        return text;
      }
      function generateVerbatimString(string2) {
        var i, iz, result;
        result = string2.split(/\r\n|\n/);
        for (i = 1, iz = result.length; i < iz; i++) {
          result[i] = newline2 + base + result[i];
        }
        return result;
      }
      function generateVerbatim(expr, precedence) {
        var verbatim, result, prec;
        verbatim = expr[extra.verbatim];
        if (typeof verbatim === "string") {
          result = parenthesize(generateVerbatimString(verbatim), Precedence.Sequence, precedence);
        } else {
          result = generateVerbatimString(verbatim.content);
          prec = verbatim.precedence != null ? verbatim.precedence : Precedence.Sequence;
          result = parenthesize(result, prec, precedence);
        }
        return toSourceNodeWhenNeeded(result, expr);
      }
      function CodeGenerator() {
      }
      CodeGenerator.prototype.maybeBlock = function(stmt, flags) {
        var result, noLeadingComment, that = this;
        noLeadingComment = !extra.comment || !stmt.leadingComments;
        if (stmt.type === Syntax.BlockStatement && noLeadingComment) {
          return [space, this.generateStatement(stmt, flags)];
        }
        if (stmt.type === Syntax.EmptyStatement && noLeadingComment) {
          return ";";
        }
        withIndent(function() {
          result = [
            newline2,
            addIndent(that.generateStatement(stmt, flags))
          ];
        });
        return result;
      };
      CodeGenerator.prototype.maybeBlockSuffix = function(stmt, result) {
        var ends = endsWithLineTerminator(toSourceNodeWhenNeeded(result).toString());
        if (stmt.type === Syntax.BlockStatement && (!extra.comment || !stmt.leadingComments) && !ends) {
          return [result, space];
        }
        if (ends) {
          return [result, base];
        }
        return [result, newline2, base];
      };
      function generateIdentifier(node2) {
        return toSourceNodeWhenNeeded(node2.name, node2);
      }
      function generateAsyncPrefix(node2, spaceRequired) {
        return node2.async ? "async" + (spaceRequired ? noEmptySpace() : space) : "";
      }
      function generateStarSuffix(node2) {
        var isGenerator = node2.generator && !extra.moz.starlessGenerator;
        return isGenerator ? "*" + space : "";
      }
      function generateMethodPrefix(prop) {
        var func = prop.value, prefix = "";
        if (func.async) {
          prefix += generateAsyncPrefix(func, !prop.computed);
        }
        if (func.generator) {
          prefix += generateStarSuffix(func) ? "*" : "";
        }
        return prefix;
      }
      CodeGenerator.prototype.generatePattern = function(node2, precedence, flags) {
        if (node2.type === Syntax.Identifier) {
          return generateIdentifier(node2);
        }
        return this.generateExpression(node2, precedence, flags);
      };
      CodeGenerator.prototype.generateFunctionParams = function(node2) {
        var i, iz, result, hasDefault;
        hasDefault = false;
        if (node2.type === Syntax.ArrowFunctionExpression && !node2.rest && (!node2.defaults || node2.defaults.length === 0) && node2.params.length === 1 && node2.params[0].type === Syntax.Identifier) {
          result = [generateAsyncPrefix(node2, true), generateIdentifier(node2.params[0])];
        } else {
          result = node2.type === Syntax.ArrowFunctionExpression ? [generateAsyncPrefix(node2, false)] : [];
          result.push("(");
          if (node2.defaults) {
            hasDefault = true;
          }
          for (i = 0, iz = node2.params.length; i < iz; ++i) {
            if (hasDefault && node2.defaults[i]) {
              result.push(this.generateAssignment(node2.params[i], node2.defaults[i], "=", Precedence.Assignment, E_TTT));
            } else {
              result.push(this.generatePattern(node2.params[i], Precedence.Assignment, E_TTT));
            }
            if (i + 1 < iz) {
              result.push("," + space);
            }
          }
          if (node2.rest) {
            if (node2.params.length) {
              result.push("," + space);
            }
            result.push("...");
            result.push(generateIdentifier(node2.rest));
          }
          result.push(")");
        }
        return result;
      };
      CodeGenerator.prototype.generateFunctionBody = function(node2) {
        var result, expr;
        result = this.generateFunctionParams(node2);
        if (node2.type === Syntax.ArrowFunctionExpression) {
          result.push(space);
          result.push("=>");
        }
        if (node2.expression) {
          result.push(space);
          expr = this.generateExpression(node2.body, Precedence.Assignment, E_TTT);
          if (expr.toString().charAt(0) === "{") {
            expr = ["(", expr, ")"];
          }
          result.push(expr);
        } else {
          result.push(this.maybeBlock(node2.body, S_TTFF));
        }
        return result;
      };
      CodeGenerator.prototype.generateIterationForStatement = function(operator, stmt, flags) {
        var result = ["for" + (stmt.await ? noEmptySpace() + "await" : "") + space + "("], that = this;
        withIndent(function() {
          if (stmt.left.type === Syntax.VariableDeclaration) {
            withIndent(function() {
              result.push(stmt.left.kind + noEmptySpace());
              result.push(that.generateStatement(stmt.left.declarations[0], S_FFFF));
            });
          } else {
            result.push(that.generateExpression(stmt.left, Precedence.Call, E_TTT));
          }
          result = join3(result, operator);
          result = [join3(
            result,
            that.generateExpression(stmt.right, Precedence.Assignment, E_TTT)
          ), ")"];
        });
        result.push(this.maybeBlock(stmt.body, flags));
        return result;
      };
      CodeGenerator.prototype.generatePropertyKey = function(expr, computed) {
        var result = [];
        if (computed) {
          result.push("[");
        }
        result.push(this.generateExpression(expr, Precedence.Assignment, E_TTT));
        if (computed) {
          result.push("]");
        }
        return result;
      };
      CodeGenerator.prototype.generateAssignment = function(left2, right2, operator, precedence, flags) {
        if (Precedence.Assignment < precedence) {
          flags |= F_ALLOW_IN;
        }
        return parenthesize(
          [
            this.generateExpression(left2, Precedence.Call, flags),
            space + operator + space,
            this.generateExpression(right2, Precedence.Assignment, flags)
          ],
          Precedence.Assignment,
          precedence
        );
      };
      CodeGenerator.prototype.semicolon = function(flags) {
        if (!semicolons && flags & F_SEMICOLON_OPT) {
          return "";
        }
        return ";";
      };
      CodeGenerator.Statement = {
        BlockStatement: function(stmt, flags) {
          var range2, content, result = ["{", newline2], that = this;
          withIndent(function() {
            if (stmt.body.length === 0 && preserveBlankLines) {
              range2 = stmt.range;
              if (range2[1] - range2[0] > 2) {
                content = sourceCode.substring(range2[0] + 1, range2[1] - 1);
                if (content[0] === "\n") {
                  result = ["{"];
                }
                result.push(content);
              }
            }
            var i, iz, fragment, bodyFlags;
            bodyFlags = S_TFFF;
            if (flags & F_FUNC_BODY) {
              bodyFlags |= F_DIRECTIVE_CTX;
            }
            for (i = 0, iz = stmt.body.length; i < iz; ++i) {
              if (preserveBlankLines) {
                if (i === 0) {
                  if (stmt.body[0].leadingComments) {
                    range2 = stmt.body[0].leadingComments[0].extendedRange;
                    content = sourceCode.substring(range2[0], range2[1]);
                    if (content[0] === "\n") {
                      result = ["{"];
                    }
                  }
                  if (!stmt.body[0].leadingComments) {
                    generateBlankLines(stmt.range[0], stmt.body[0].range[0], result);
                  }
                }
                if (i > 0) {
                  if (!stmt.body[i - 1].trailingComments && !stmt.body[i].leadingComments) {
                    generateBlankLines(stmt.body[i - 1].range[1], stmt.body[i].range[0], result);
                  }
                }
              }
              if (i === iz - 1) {
                bodyFlags |= F_SEMICOLON_OPT;
              }
              if (stmt.body[i].leadingComments && preserveBlankLines) {
                fragment = that.generateStatement(stmt.body[i], bodyFlags);
              } else {
                fragment = addIndent(that.generateStatement(stmt.body[i], bodyFlags));
              }
              result.push(fragment);
              if (!endsWithLineTerminator(toSourceNodeWhenNeeded(fragment).toString())) {
                if (preserveBlankLines && i < iz - 1) {
                  if (!stmt.body[i + 1].leadingComments) {
                    result.push(newline2);
                  }
                } else {
                  result.push(newline2);
                }
              }
              if (preserveBlankLines) {
                if (i === iz - 1) {
                  if (!stmt.body[i].trailingComments) {
                    generateBlankLines(stmt.body[i].range[1], stmt.range[1], result);
                  }
                }
              }
            }
          });
          result.push(addIndent("}"));
          return result;
        },
        BreakStatement: function(stmt, flags) {
          if (stmt.label) {
            return "break " + stmt.label.name + this.semicolon(flags);
          }
          return "break" + this.semicolon(flags);
        },
        ContinueStatement: function(stmt, flags) {
          if (stmt.label) {
            return "continue " + stmt.label.name + this.semicolon(flags);
          }
          return "continue" + this.semicolon(flags);
        },
        ClassBody: function(stmt, flags) {
          var result = ["{", newline2], that = this;
          withIndent(function(indent2) {
            var i, iz;
            for (i = 0, iz = stmt.body.length; i < iz; ++i) {
              result.push(indent2);
              result.push(that.generateExpression(stmt.body[i], Precedence.Sequence, E_TTT));
              if (i + 1 < iz) {
                result.push(newline2);
              }
            }
          });
          if (!endsWithLineTerminator(toSourceNodeWhenNeeded(result).toString())) {
            result.push(newline2);
          }
          result.push(base);
          result.push("}");
          return result;
        },
        ClassDeclaration: function(stmt, flags) {
          var result, fragment;
          result = ["class"];
          if (stmt.id) {
            result = join3(result, this.generateExpression(stmt.id, Precedence.Sequence, E_TTT));
          }
          if (stmt.superClass) {
            fragment = join3("extends", this.generateExpression(stmt.superClass, Precedence.Unary, E_TTT));
            result = join3(result, fragment);
          }
          result.push(space);
          result.push(this.generateStatement(stmt.body, S_TFFT));
          return result;
        },
        DirectiveStatement: function(stmt, flags) {
          if (extra.raw && stmt.raw) {
            return stmt.raw + this.semicolon(flags);
          }
          return escapeDirective(stmt.directive) + this.semicolon(flags);
        },
        DoWhileStatement: function(stmt, flags) {
          var result = join3("do", this.maybeBlock(stmt.body, S_TFFF));
          result = this.maybeBlockSuffix(stmt.body, result);
          return join3(result, [
            "while" + space + "(",
            this.generateExpression(stmt.test, Precedence.Sequence, E_TTT),
            ")" + this.semicolon(flags)
          ]);
        },
        CatchClause: function(stmt, flags) {
          var result, that = this;
          withIndent(function() {
            var guard;
            if (stmt.param) {
              result = [
                "catch" + space + "(",
                that.generateExpression(stmt.param, Precedence.Sequence, E_TTT),
                ")"
              ];
              if (stmt.guard) {
                guard = that.generateExpression(stmt.guard, Precedence.Sequence, E_TTT);
                result.splice(2, 0, " if ", guard);
              }
            } else {
              result = ["catch"];
            }
          });
          result.push(this.maybeBlock(stmt.body, S_TFFF));
          return result;
        },
        DebuggerStatement: function(stmt, flags) {
          return "debugger" + this.semicolon(flags);
        },
        EmptyStatement: function(stmt, flags) {
          return ";";
        },
        ExportDefaultDeclaration: function(stmt, flags) {
          var result = ["export"], bodyFlags;
          bodyFlags = flags & F_SEMICOLON_OPT ? S_TFFT : S_TFFF;
          result = join3(result, "default");
          if (isStatement(stmt.declaration)) {
            result = join3(result, this.generateStatement(stmt.declaration, bodyFlags));
          } else {
            result = join3(result, this.generateExpression(stmt.declaration, Precedence.Assignment, E_TTT) + this.semicolon(flags));
          }
          return result;
        },
        ExportNamedDeclaration: function(stmt, flags) {
          var result = ["export"], bodyFlags, that = this;
          bodyFlags = flags & F_SEMICOLON_OPT ? S_TFFT : S_TFFF;
          if (stmt.declaration) {
            return join3(result, this.generateStatement(stmt.declaration, bodyFlags));
          }
          if (stmt.specifiers) {
            if (stmt.specifiers.length === 0) {
              result = join3(result, "{" + space + "}");
            } else if (stmt.specifiers[0].type === Syntax.ExportBatchSpecifier) {
              result = join3(result, this.generateExpression(stmt.specifiers[0], Precedence.Sequence, E_TTT));
            } else {
              result = join3(result, "{");
              withIndent(function(indent2) {
                var i, iz;
                result.push(newline2);
                for (i = 0, iz = stmt.specifiers.length; i < iz; ++i) {
                  result.push(indent2);
                  result.push(that.generateExpression(stmt.specifiers[i], Precedence.Sequence, E_TTT));
                  if (i + 1 < iz) {
                    result.push("," + newline2);
                  }
                }
              });
              if (!endsWithLineTerminator(toSourceNodeWhenNeeded(result).toString())) {
                result.push(newline2);
              }
              result.push(base + "}");
            }
            if (stmt.source) {
              result = join3(result, [
                "from" + space,
                this.generateExpression(stmt.source, Precedence.Sequence, E_TTT),
                this.semicolon(flags)
              ]);
            } else {
              result.push(this.semicolon(flags));
            }
          }
          return result;
        },
        ExportAllDeclaration: function(stmt, flags) {
          return [
            "export" + space,
            "*" + space,
            "from" + space,
            this.generateExpression(stmt.source, Precedence.Sequence, E_TTT),
            this.semicolon(flags)
          ];
        },
        ExpressionStatement: function(stmt, flags) {
          var result, fragment;
          function isClassPrefixed(fragment2) {
            var code2;
            if (fragment2.slice(0, 5) !== "class") {
              return false;
            }
            code2 = fragment2.charCodeAt(5);
            return code2 === 123 || esutils.code.isWhiteSpace(code2) || esutils.code.isLineTerminator(code2);
          }
          function isFunctionPrefixed(fragment2) {
            var code2;
            if (fragment2.slice(0, 8) !== "function") {
              return false;
            }
            code2 = fragment2.charCodeAt(8);
            return code2 === 40 || esutils.code.isWhiteSpace(code2) || code2 === 42 || esutils.code.isLineTerminator(code2);
          }
          function isAsyncPrefixed(fragment2) {
            var code2, i, iz;
            if (fragment2.slice(0, 5) !== "async") {
              return false;
            }
            if (!esutils.code.isWhiteSpace(fragment2.charCodeAt(5))) {
              return false;
            }
            for (i = 6, iz = fragment2.length; i < iz; ++i) {
              if (!esutils.code.isWhiteSpace(fragment2.charCodeAt(i))) {
                break;
              }
            }
            if (i === iz) {
              return false;
            }
            if (fragment2.slice(i, i + 8) !== "function") {
              return false;
            }
            code2 = fragment2.charCodeAt(i + 8);
            return code2 === 40 || esutils.code.isWhiteSpace(code2) || code2 === 42 || esutils.code.isLineTerminator(code2);
          }
          result = [this.generateExpression(stmt.expression, Precedence.Sequence, E_TTT)];
          fragment = toSourceNodeWhenNeeded(result).toString();
          if (fragment.charCodeAt(0) === 123 || isClassPrefixed(fragment) || isFunctionPrefixed(fragment) || isAsyncPrefixed(fragment) || directive && flags & F_DIRECTIVE_CTX && stmt.expression.type === Syntax.Literal && typeof stmt.expression.value === "string") {
            result = ["(", result, ")" + this.semicolon(flags)];
          } else {
            result.push(this.semicolon(flags));
          }
          return result;
        },
        ImportDeclaration: function(stmt, flags) {
          var result, cursor, that = this;
          if (stmt.specifiers.length === 0) {
            return [
              "import",
              space,
              this.generateExpression(stmt.source, Precedence.Sequence, E_TTT),
              this.semicolon(flags)
            ];
          }
          result = [
            "import"
          ];
          cursor = 0;
          if (stmt.specifiers[cursor].type === Syntax.ImportDefaultSpecifier) {
            result = join3(result, [
              this.generateExpression(stmt.specifiers[cursor], Precedence.Sequence, E_TTT)
            ]);
            ++cursor;
          }
          if (stmt.specifiers[cursor]) {
            if (cursor !== 0) {
              result.push(",");
            }
            if (stmt.specifiers[cursor].type === Syntax.ImportNamespaceSpecifier) {
              result = join3(result, [
                space,
                this.generateExpression(stmt.specifiers[cursor], Precedence.Sequence, E_TTT)
              ]);
            } else {
              result.push(space + "{");
              if (stmt.specifiers.length - cursor === 1) {
                result.push(space);
                result.push(this.generateExpression(stmt.specifiers[cursor], Precedence.Sequence, E_TTT));
                result.push(space + "}" + space);
              } else {
                withIndent(function(indent2) {
                  var i, iz;
                  result.push(newline2);
                  for (i = cursor, iz = stmt.specifiers.length; i < iz; ++i) {
                    result.push(indent2);
                    result.push(that.generateExpression(stmt.specifiers[i], Precedence.Sequence, E_TTT));
                    if (i + 1 < iz) {
                      result.push("," + newline2);
                    }
                  }
                });
                if (!endsWithLineTerminator(toSourceNodeWhenNeeded(result).toString())) {
                  result.push(newline2);
                }
                result.push(base + "}" + space);
              }
            }
          }
          result = join3(result, [
            "from" + space,
            this.generateExpression(stmt.source, Precedence.Sequence, E_TTT),
            this.semicolon(flags)
          ]);
          return result;
        },
        VariableDeclarator: function(stmt, flags) {
          var itemFlags = flags & F_ALLOW_IN ? E_TTT : E_FTT;
          if (stmt.init) {
            return [
              this.generateExpression(stmt.id, Precedence.Assignment, itemFlags),
              space,
              "=",
              space,
              this.generateExpression(stmt.init, Precedence.Assignment, itemFlags)
            ];
          }
          return this.generatePattern(stmt.id, Precedence.Assignment, itemFlags);
        },
        VariableDeclaration: function(stmt, flags) {
          var result, i, iz, node2, bodyFlags, that = this;
          result = [stmt.kind];
          bodyFlags = flags & F_ALLOW_IN ? S_TFFF : S_FFFF;
          function block2() {
            node2 = stmt.declarations[0];
            if (extra.comment && node2.leadingComments) {
              result.push("\n");
              result.push(addIndent(that.generateStatement(node2, bodyFlags)));
            } else {
              result.push(noEmptySpace());
              result.push(that.generateStatement(node2, bodyFlags));
            }
            for (i = 1, iz = stmt.declarations.length; i < iz; ++i) {
              node2 = stmt.declarations[i];
              if (extra.comment && node2.leadingComments) {
                result.push("," + newline2);
                result.push(addIndent(that.generateStatement(node2, bodyFlags)));
              } else {
                result.push("," + space);
                result.push(that.generateStatement(node2, bodyFlags));
              }
            }
          }
          if (stmt.declarations.length > 1) {
            withIndent(block2);
          } else {
            block2();
          }
          result.push(this.semicolon(flags));
          return result;
        },
        ThrowStatement: function(stmt, flags) {
          return [join3(
            "throw",
            this.generateExpression(stmt.argument, Precedence.Sequence, E_TTT)
          ), this.semicolon(flags)];
        },
        TryStatement: function(stmt, flags) {
          var result, i, iz, guardedHandlers;
          result = ["try", this.maybeBlock(stmt.block, S_TFFF)];
          result = this.maybeBlockSuffix(stmt.block, result);
          if (stmt.handlers) {
            for (i = 0, iz = stmt.handlers.length; i < iz; ++i) {
              result = join3(result, this.generateStatement(stmt.handlers[i], S_TFFF));
              if (stmt.finalizer || i + 1 !== iz) {
                result = this.maybeBlockSuffix(stmt.handlers[i].body, result);
              }
            }
          } else {
            guardedHandlers = stmt.guardedHandlers || [];
            for (i = 0, iz = guardedHandlers.length; i < iz; ++i) {
              result = join3(result, this.generateStatement(guardedHandlers[i], S_TFFF));
              if (stmt.finalizer || i + 1 !== iz) {
                result = this.maybeBlockSuffix(guardedHandlers[i].body, result);
              }
            }
            if (stmt.handler) {
              if (Array.isArray(stmt.handler)) {
                for (i = 0, iz = stmt.handler.length; i < iz; ++i) {
                  result = join3(result, this.generateStatement(stmt.handler[i], S_TFFF));
                  if (stmt.finalizer || i + 1 !== iz) {
                    result = this.maybeBlockSuffix(stmt.handler[i].body, result);
                  }
                }
              } else {
                result = join3(result, this.generateStatement(stmt.handler, S_TFFF));
                if (stmt.finalizer) {
                  result = this.maybeBlockSuffix(stmt.handler.body, result);
                }
              }
            }
          }
          if (stmt.finalizer) {
            result = join3(result, ["finally", this.maybeBlock(stmt.finalizer, S_TFFF)]);
          }
          return result;
        },
        SwitchStatement: function(stmt, flags) {
          var result, fragment, i, iz, bodyFlags, that = this;
          withIndent(function() {
            result = [
              "switch" + space + "(",
              that.generateExpression(stmt.discriminant, Precedence.Sequence, E_TTT),
              ")" + space + "{" + newline2
            ];
          });
          if (stmt.cases) {
            bodyFlags = S_TFFF;
            for (i = 0, iz = stmt.cases.length; i < iz; ++i) {
              if (i === iz - 1) {
                bodyFlags |= F_SEMICOLON_OPT;
              }
              fragment = addIndent(this.generateStatement(stmt.cases[i], bodyFlags));
              result.push(fragment);
              if (!endsWithLineTerminator(toSourceNodeWhenNeeded(fragment).toString())) {
                result.push(newline2);
              }
            }
          }
          result.push(addIndent("}"));
          return result;
        },
        SwitchCase: function(stmt, flags) {
          var result, fragment, i, iz, bodyFlags, that = this;
          withIndent(function() {
            if (stmt.test) {
              result = [
                join3("case", that.generateExpression(stmt.test, Precedence.Sequence, E_TTT)),
                ":"
              ];
            } else {
              result = ["default:"];
            }
            i = 0;
            iz = stmt.consequent.length;
            if (iz && stmt.consequent[0].type === Syntax.BlockStatement) {
              fragment = that.maybeBlock(stmt.consequent[0], S_TFFF);
              result.push(fragment);
              i = 1;
            }
            if (i !== iz && !endsWithLineTerminator(toSourceNodeWhenNeeded(result).toString())) {
              result.push(newline2);
            }
            bodyFlags = S_TFFF;
            for (; i < iz; ++i) {
              if (i === iz - 1 && flags & F_SEMICOLON_OPT) {
                bodyFlags |= F_SEMICOLON_OPT;
              }
              fragment = addIndent(that.generateStatement(stmt.consequent[i], bodyFlags));
              result.push(fragment);
              if (i + 1 !== iz && !endsWithLineTerminator(toSourceNodeWhenNeeded(fragment).toString())) {
                result.push(newline2);
              }
            }
          });
          return result;
        },
        IfStatement: function(stmt, flags) {
          var result, bodyFlags, semicolonOptional, that = this;
          withIndent(function() {
            result = [
              "if" + space + "(",
              that.generateExpression(stmt.test, Precedence.Sequence, E_TTT),
              ")"
            ];
          });
          semicolonOptional = flags & F_SEMICOLON_OPT;
          bodyFlags = S_TFFF;
          if (semicolonOptional) {
            bodyFlags |= F_SEMICOLON_OPT;
          }
          if (stmt.alternate) {
            result.push(this.maybeBlock(stmt.consequent, S_TFFF));
            result = this.maybeBlockSuffix(stmt.consequent, result);
            if (stmt.alternate.type === Syntax.IfStatement) {
              result = join3(result, ["else ", this.generateStatement(stmt.alternate, bodyFlags)]);
            } else {
              result = join3(result, join3("else", this.maybeBlock(stmt.alternate, bodyFlags)));
            }
          } else {
            result.push(this.maybeBlock(stmt.consequent, bodyFlags));
          }
          return result;
        },
        ForStatement: function(stmt, flags) {
          var result, that = this;
          withIndent(function() {
            result = ["for" + space + "("];
            if (stmt.init) {
              if (stmt.init.type === Syntax.VariableDeclaration) {
                result.push(that.generateStatement(stmt.init, S_FFFF));
              } else {
                result.push(that.generateExpression(stmt.init, Precedence.Sequence, E_FTT));
                result.push(";");
              }
            } else {
              result.push(";");
            }
            if (stmt.test) {
              result.push(space);
              result.push(that.generateExpression(stmt.test, Precedence.Sequence, E_TTT));
              result.push(";");
            } else {
              result.push(";");
            }
            if (stmt.update) {
              result.push(space);
              result.push(that.generateExpression(stmt.update, Precedence.Sequence, E_TTT));
              result.push(")");
            } else {
              result.push(")");
            }
          });
          result.push(this.maybeBlock(stmt.body, flags & F_SEMICOLON_OPT ? S_TFFT : S_TFFF));
          return result;
        },
        ForInStatement: function(stmt, flags) {
          return this.generateIterationForStatement("in", stmt, flags & F_SEMICOLON_OPT ? S_TFFT : S_TFFF);
        },
        ForOfStatement: function(stmt, flags) {
          return this.generateIterationForStatement("of", stmt, flags & F_SEMICOLON_OPT ? S_TFFT : S_TFFF);
        },
        LabeledStatement: function(stmt, flags) {
          return [stmt.label.name + ":", this.maybeBlock(stmt.body, flags & F_SEMICOLON_OPT ? S_TFFT : S_TFFF)];
        },
        Program: function(stmt, flags) {
          var result, fragment, i, iz, bodyFlags;
          iz = stmt.body.length;
          result = [safeConcatenation && iz > 0 ? "\n" : ""];
          bodyFlags = S_TFTF;
          for (i = 0; i < iz; ++i) {
            if (!safeConcatenation && i === iz - 1) {
              bodyFlags |= F_SEMICOLON_OPT;
            }
            if (preserveBlankLines) {
              if (i === 0) {
                if (!stmt.body[0].leadingComments) {
                  generateBlankLines(stmt.range[0], stmt.body[i].range[0], result);
                }
              }
              if (i > 0) {
                if (!stmt.body[i - 1].trailingComments && !stmt.body[i].leadingComments) {
                  generateBlankLines(stmt.body[i - 1].range[1], stmt.body[i].range[0], result);
                }
              }
            }
            fragment = addIndent(this.generateStatement(stmt.body[i], bodyFlags));
            result.push(fragment);
            if (i + 1 < iz && !endsWithLineTerminator(toSourceNodeWhenNeeded(fragment).toString())) {
              if (preserveBlankLines) {
                if (!stmt.body[i + 1].leadingComments) {
                  result.push(newline2);
                }
              } else {
                result.push(newline2);
              }
            }
            if (preserveBlankLines) {
              if (i === iz - 1) {
                if (!stmt.body[i].trailingComments) {
                  generateBlankLines(stmt.body[i].range[1], stmt.range[1], result);
                }
              }
            }
          }
          return result;
        },
        FunctionDeclaration: function(stmt, flags) {
          return [
            generateAsyncPrefix(stmt, true),
            "function",
            generateStarSuffix(stmt) || noEmptySpace(),
            stmt.id ? generateIdentifier(stmt.id) : "",
            this.generateFunctionBody(stmt)
          ];
        },
        ReturnStatement: function(stmt, flags) {
          if (stmt.argument) {
            return [join3(
              "return",
              this.generateExpression(stmt.argument, Precedence.Sequence, E_TTT)
            ), this.semicolon(flags)];
          }
          return ["return" + this.semicolon(flags)];
        },
        WhileStatement: function(stmt, flags) {
          var result, that = this;
          withIndent(function() {
            result = [
              "while" + space + "(",
              that.generateExpression(stmt.test, Precedence.Sequence, E_TTT),
              ")"
            ];
          });
          result.push(this.maybeBlock(stmt.body, flags & F_SEMICOLON_OPT ? S_TFFT : S_TFFF));
          return result;
        },
        WithStatement: function(stmt, flags) {
          var result, that = this;
          withIndent(function() {
            result = [
              "with" + space + "(",
              that.generateExpression(stmt.object, Precedence.Sequence, E_TTT),
              ")"
            ];
          });
          result.push(this.maybeBlock(stmt.body, flags & F_SEMICOLON_OPT ? S_TFFT : S_TFFF));
          return result;
        }
      };
      merge2(CodeGenerator.prototype, CodeGenerator.Statement);
      CodeGenerator.Expression = {
        SequenceExpression: function(expr, precedence, flags) {
          var result, i, iz;
          if (Precedence.Sequence < precedence) {
            flags |= F_ALLOW_IN;
          }
          result = [];
          for (i = 0, iz = expr.expressions.length; i < iz; ++i) {
            result.push(this.generateExpression(expr.expressions[i], Precedence.Assignment, flags));
            if (i + 1 < iz) {
              result.push("," + space);
            }
          }
          return parenthesize(result, Precedence.Sequence, precedence);
        },
        AssignmentExpression: function(expr, precedence, flags) {
          return this.generateAssignment(expr.left, expr.right, expr.operator, precedence, flags);
        },
        ArrowFunctionExpression: function(expr, precedence, flags) {
          return parenthesize(this.generateFunctionBody(expr), Precedence.ArrowFunction, precedence);
        },
        ConditionalExpression: function(expr, precedence, flags) {
          if (Precedence.Conditional < precedence) {
            flags |= F_ALLOW_IN;
          }
          return parenthesize(
            [
              this.generateExpression(expr.test, Precedence.Coalesce, flags),
              space + "?" + space,
              this.generateExpression(expr.consequent, Precedence.Assignment, flags),
              space + ":" + space,
              this.generateExpression(expr.alternate, Precedence.Assignment, flags)
            ],
            Precedence.Conditional,
            precedence
          );
        },
        LogicalExpression: function(expr, precedence, flags) {
          if (expr.operator === "??") {
            flags |= F_FOUND_COALESCE;
          }
          return this.BinaryExpression(expr, precedence, flags);
        },
        BinaryExpression: function(expr, precedence, flags) {
          var result, leftPrecedence, rightPrecedence, currentPrecedence, fragment, leftSource;
          currentPrecedence = BinaryPrecedence[expr.operator];
          leftPrecedence = expr.operator === "**" ? Precedence.Postfix : currentPrecedence;
          rightPrecedence = expr.operator === "**" ? currentPrecedence : currentPrecedence + 1;
          if (currentPrecedence < precedence) {
            flags |= F_ALLOW_IN;
          }
          fragment = this.generateExpression(expr.left, leftPrecedence, flags);
          leftSource = fragment.toString();
          if (leftSource.charCodeAt(leftSource.length - 1) === 47 && esutils.code.isIdentifierPartES5(expr.operator.charCodeAt(0))) {
            result = [fragment, noEmptySpace(), expr.operator];
          } else {
            result = join3(fragment, expr.operator);
          }
          fragment = this.generateExpression(expr.right, rightPrecedence, flags);
          if (expr.operator === "/" && fragment.toString().charAt(0) === "/" || expr.operator.slice(-1) === "<" && fragment.toString().slice(0, 3) === "!--") {
            result.push(noEmptySpace());
            result.push(fragment);
          } else {
            result = join3(result, fragment);
          }
          if (expr.operator === "in" && !(flags & F_ALLOW_IN)) {
            return ["(", result, ")"];
          }
          if ((expr.operator === "||" || expr.operator === "&&") && flags & F_FOUND_COALESCE) {
            return ["(", result, ")"];
          }
          return parenthesize(result, currentPrecedence, precedence);
        },
        CallExpression: function(expr, precedence, flags) {
          var result, i, iz;
          result = [this.generateExpression(expr.callee, Precedence.Call, E_TTF)];
          if (expr.optional) {
            result.push("?.");
          }
          result.push("(");
          for (i = 0, iz = expr["arguments"].length; i < iz; ++i) {
            result.push(this.generateExpression(expr["arguments"][i], Precedence.Assignment, E_TTT));
            if (i + 1 < iz) {
              result.push("," + space);
            }
          }
          result.push(")");
          if (!(flags & F_ALLOW_CALL)) {
            return ["(", result, ")"];
          }
          return parenthesize(result, Precedence.Call, precedence);
        },
        ChainExpression: function(expr, precedence, flags) {
          if (Precedence.OptionalChaining < precedence) {
            flags |= F_ALLOW_CALL;
          }
          var result = this.generateExpression(expr.expression, Precedence.OptionalChaining, flags);
          return parenthesize(result, Precedence.OptionalChaining, precedence);
        },
        NewExpression: function(expr, precedence, flags) {
          var result, length, i, iz, itemFlags;
          length = expr["arguments"].length;
          itemFlags = flags & F_ALLOW_UNPARATH_NEW && !parentheses && length === 0 ? E_TFT : E_TFF;
          result = join3(
            "new",
            this.generateExpression(expr.callee, Precedence.New, itemFlags)
          );
          if (!(flags & F_ALLOW_UNPARATH_NEW) || parentheses || length > 0) {
            result.push("(");
            for (i = 0, iz = length; i < iz; ++i) {
              result.push(this.generateExpression(expr["arguments"][i], Precedence.Assignment, E_TTT));
              if (i + 1 < iz) {
                result.push("," + space);
              }
            }
            result.push(")");
          }
          return parenthesize(result, Precedence.New, precedence);
        },
        MemberExpression: function(expr, precedence, flags) {
          var result, fragment;
          result = [this.generateExpression(expr.object, Precedence.Call, flags & F_ALLOW_CALL ? E_TTF : E_TFF)];
          if (expr.computed) {
            if (expr.optional) {
              result.push("?.");
            }
            result.push("[");
            result.push(this.generateExpression(expr.property, Precedence.Sequence, flags & F_ALLOW_CALL ? E_TTT : E_TFT));
            result.push("]");
          } else {
            if (!expr.optional && expr.object.type === Syntax.Literal && typeof expr.object.value === "number") {
              fragment = toSourceNodeWhenNeeded(result).toString();
              if (fragment.indexOf(".") < 0 && !/[eExX]/.test(fragment) && esutils.code.isDecimalDigit(fragment.charCodeAt(fragment.length - 1)) && !(fragment.length >= 2 && fragment.charCodeAt(0) === 48)) {
                result.push(" ");
              }
            }
            result.push(expr.optional ? "?." : ".");
            result.push(generateIdentifier(expr.property));
          }
          return parenthesize(result, Precedence.Member, precedence);
        },
        MetaProperty: function(expr, precedence, flags) {
          var result;
          result = [];
          result.push(typeof expr.meta === "string" ? expr.meta : generateIdentifier(expr.meta));
          result.push(".");
          result.push(typeof expr.property === "string" ? expr.property : generateIdentifier(expr.property));
          return parenthesize(result, Precedence.Member, precedence);
        },
        UnaryExpression: function(expr, precedence, flags) {
          var result, fragment, rightCharCode, leftSource, leftCharCode;
          fragment = this.generateExpression(expr.argument, Precedence.Unary, E_TTT);
          if (space === "") {
            result = join3(expr.operator, fragment);
          } else {
            result = [expr.operator];
            if (expr.operator.length > 2) {
              result = join3(result, fragment);
            } else {
              leftSource = toSourceNodeWhenNeeded(result).toString();
              leftCharCode = leftSource.charCodeAt(leftSource.length - 1);
              rightCharCode = fragment.toString().charCodeAt(0);
              if ((leftCharCode === 43 || leftCharCode === 45) && leftCharCode === rightCharCode || esutils.code.isIdentifierPartES5(leftCharCode) && esutils.code.isIdentifierPartES5(rightCharCode)) {
                result.push(noEmptySpace());
                result.push(fragment);
              } else {
                result.push(fragment);
              }
            }
          }
          return parenthesize(result, Precedence.Unary, precedence);
        },
        YieldExpression: function(expr, precedence, flags) {
          var result;
          if (expr.delegate) {
            result = "yield*";
          } else {
            result = "yield";
          }
          if (expr.argument) {
            result = join3(
              result,
              this.generateExpression(expr.argument, Precedence.Yield, E_TTT)
            );
          }
          return parenthesize(result, Precedence.Yield, precedence);
        },
        AwaitExpression: function(expr, precedence, flags) {
          var result = join3(
            expr.all ? "await*" : "await",
            this.generateExpression(expr.argument, Precedence.Await, E_TTT)
          );
          return parenthesize(result, Precedence.Await, precedence);
        },
        UpdateExpression: function(expr, precedence, flags) {
          if (expr.prefix) {
            return parenthesize(
              [
                expr.operator,
                this.generateExpression(expr.argument, Precedence.Unary, E_TTT)
              ],
              Precedence.Unary,
              precedence
            );
          }
          return parenthesize(
            [
              this.generateExpression(expr.argument, Precedence.Postfix, E_TTT),
              expr.operator
            ],
            Precedence.Postfix,
            precedence
          );
        },
        FunctionExpression: function(expr, precedence, flags) {
          var result = [
            generateAsyncPrefix(expr, true),
            "function"
          ];
          if (expr.id) {
            result.push(generateStarSuffix(expr) || noEmptySpace());
            result.push(generateIdentifier(expr.id));
          } else {
            result.push(generateStarSuffix(expr) || space);
          }
          result.push(this.generateFunctionBody(expr));
          return result;
        },
        ArrayPattern: function(expr, precedence, flags) {
          return this.ArrayExpression(expr, precedence, flags, true);
        },
        ArrayExpression: function(expr, precedence, flags, isPattern) {
          var result, multiline, that = this;
          if (!expr.elements.length) {
            return "[]";
          }
          multiline = isPattern ? false : expr.elements.length > 1;
          result = ["[", multiline ? newline2 : ""];
          withIndent(function(indent2) {
            var i, iz;
            for (i = 0, iz = expr.elements.length; i < iz; ++i) {
              if (!expr.elements[i]) {
                if (multiline) {
                  result.push(indent2);
                }
                if (i + 1 === iz) {
                  result.push(",");
                }
              } else {
                result.push(multiline ? indent2 : "");
                result.push(that.generateExpression(expr.elements[i], Precedence.Assignment, E_TTT));
              }
              if (i + 1 < iz) {
                result.push("," + (multiline ? newline2 : space));
              }
            }
          });
          if (multiline && !endsWithLineTerminator(toSourceNodeWhenNeeded(result).toString())) {
            result.push(newline2);
          }
          result.push(multiline ? base : "");
          result.push("]");
          return result;
        },
        RestElement: function(expr, precedence, flags) {
          return "..." + this.generatePattern(expr.argument);
        },
        ClassExpression: function(expr, precedence, flags) {
          var result, fragment;
          result = ["class"];
          if (expr.id) {
            result = join3(result, this.generateExpression(expr.id, Precedence.Sequence, E_TTT));
          }
          if (expr.superClass) {
            fragment = join3("extends", this.generateExpression(expr.superClass, Precedence.Unary, E_TTT));
            result = join3(result, fragment);
          }
          result.push(space);
          result.push(this.generateStatement(expr.body, S_TFFT));
          return result;
        },
        MethodDefinition: function(expr, precedence, flags) {
          var result, fragment;
          if (expr["static"]) {
            result = ["static" + space];
          } else {
            result = [];
          }
          if (expr.kind === "get" || expr.kind === "set") {
            fragment = [
              join3(expr.kind, this.generatePropertyKey(expr.key, expr.computed)),
              this.generateFunctionBody(expr.value)
            ];
          } else {
            fragment = [
              generateMethodPrefix(expr),
              this.generatePropertyKey(expr.key, expr.computed),
              this.generateFunctionBody(expr.value)
            ];
          }
          return join3(result, fragment);
        },
        Property: function(expr, precedence, flags) {
          if (expr.kind === "get" || expr.kind === "set") {
            return [
              expr.kind,
              noEmptySpace(),
              this.generatePropertyKey(expr.key, expr.computed),
              this.generateFunctionBody(expr.value)
            ];
          }
          if (expr.shorthand) {
            if (expr.value.type === "AssignmentPattern") {
              return this.AssignmentPattern(expr.value, Precedence.Sequence, E_TTT);
            }
            return this.generatePropertyKey(expr.key, expr.computed);
          }
          if (expr.method) {
            return [
              generateMethodPrefix(expr),
              this.generatePropertyKey(expr.key, expr.computed),
              this.generateFunctionBody(expr.value)
            ];
          }
          return [
            this.generatePropertyKey(expr.key, expr.computed),
            ":" + space,
            this.generateExpression(expr.value, Precedence.Assignment, E_TTT)
          ];
        },
        ObjectExpression: function(expr, precedence, flags) {
          var multiline, result, fragment, that = this;
          if (!expr.properties.length) {
            return "{}";
          }
          multiline = expr.properties.length > 1;
          withIndent(function() {
            fragment = that.generateExpression(expr.properties[0], Precedence.Sequence, E_TTT);
          });
          if (!multiline) {
            if (!hasLineTerminator(toSourceNodeWhenNeeded(fragment).toString())) {
              return ["{", space, fragment, space, "}"];
            }
          }
          withIndent(function(indent2) {
            var i, iz;
            result = ["{", newline2, indent2, fragment];
            if (multiline) {
              result.push("," + newline2);
              for (i = 1, iz = expr.properties.length; i < iz; ++i) {
                result.push(indent2);
                result.push(that.generateExpression(expr.properties[i], Precedence.Sequence, E_TTT));
                if (i + 1 < iz) {
                  result.push("," + newline2);
                }
              }
            }
          });
          if (!endsWithLineTerminator(toSourceNodeWhenNeeded(result).toString())) {
            result.push(newline2);
          }
          result.push(base);
          result.push("}");
          return result;
        },
        AssignmentPattern: function(expr, precedence, flags) {
          return this.generateAssignment(expr.left, expr.right, "=", precedence, flags);
        },
        ObjectPattern: function(expr, precedence, flags) {
          var result, i, iz, multiline, property, that = this;
          if (!expr.properties.length) {
            return "{}";
          }
          multiline = false;
          if (expr.properties.length === 1) {
            property = expr.properties[0];
            if (property.type === Syntax.Property && property.value.type !== Syntax.Identifier) {
              multiline = true;
            }
          } else {
            for (i = 0, iz = expr.properties.length; i < iz; ++i) {
              property = expr.properties[i];
              if (property.type === Syntax.Property && !property.shorthand) {
                multiline = true;
                break;
              }
            }
          }
          result = ["{", multiline ? newline2 : ""];
          withIndent(function(indent2) {
            var i2, iz2;
            for (i2 = 0, iz2 = expr.properties.length; i2 < iz2; ++i2) {
              result.push(multiline ? indent2 : "");
              result.push(that.generateExpression(expr.properties[i2], Precedence.Sequence, E_TTT));
              if (i2 + 1 < iz2) {
                result.push("," + (multiline ? newline2 : space));
              }
            }
          });
          if (multiline && !endsWithLineTerminator(toSourceNodeWhenNeeded(result).toString())) {
            result.push(newline2);
          }
          result.push(multiline ? base : "");
          result.push("}");
          return result;
        },
        ThisExpression: function(expr, precedence, flags) {
          return "this";
        },
        Super: function(expr, precedence, flags) {
          return "super";
        },
        Identifier: function(expr, precedence, flags) {
          return generateIdentifier(expr);
        },
        ImportDefaultSpecifier: function(expr, precedence, flags) {
          return generateIdentifier(expr.id || expr.local);
        },
        ImportNamespaceSpecifier: function(expr, precedence, flags) {
          var result = ["*"];
          var id2 = expr.id || expr.local;
          if (id2) {
            result.push(space + "as" + noEmptySpace() + generateIdentifier(id2));
          }
          return result;
        },
        ImportSpecifier: function(expr, precedence, flags) {
          var imported = expr.imported;
          var result = [imported.name];
          var local = expr.local;
          if (local && local.name !== imported.name) {
            result.push(noEmptySpace() + "as" + noEmptySpace() + generateIdentifier(local));
          }
          return result;
        },
        ExportSpecifier: function(expr, precedence, flags) {
          var local = expr.local;
          var result = [local.name];
          var exported = expr.exported;
          if (exported && exported.name !== local.name) {
            result.push(noEmptySpace() + "as" + noEmptySpace() + generateIdentifier(exported));
          }
          return result;
        },
        Literal: function(expr, precedence, flags) {
          var raw;
          if (expr.hasOwnProperty("raw") && parse2 && extra.raw) {
            try {
              raw = parse2(expr.raw).body[0].expression;
              if (raw.type === Syntax.Literal) {
                if (raw.value === expr.value) {
                  return expr.raw;
                }
              }
            } catch (e) {
            }
          }
          if (expr.regex) {
            return "/" + expr.regex.pattern + "/" + expr.regex.flags;
          }
          if (typeof expr.value === "bigint") {
            return expr.value.toString() + "n";
          }
          if (expr.bigint) {
            return expr.bigint + "n";
          }
          if (expr.value === null) {
            return "null";
          }
          if (typeof expr.value === "string") {
            return escapeString(expr.value);
          }
          if (typeof expr.value === "number") {
            return generateNumber(expr.value);
          }
          if (typeof expr.value === "boolean") {
            return expr.value ? "true" : "false";
          }
          return generateRegExp(expr.value);
        },
        GeneratorExpression: function(expr, precedence, flags) {
          return this.ComprehensionExpression(expr, precedence, flags);
        },
        ComprehensionExpression: function(expr, precedence, flags) {
          var result, i, iz, fragment, that = this;
          result = expr.type === Syntax.GeneratorExpression ? ["("] : ["["];
          if (extra.moz.comprehensionExpressionStartsWithAssignment) {
            fragment = this.generateExpression(expr.body, Precedence.Assignment, E_TTT);
            result.push(fragment);
          }
          if (expr.blocks) {
            withIndent(function() {
              for (i = 0, iz = expr.blocks.length; i < iz; ++i) {
                fragment = that.generateExpression(expr.blocks[i], Precedence.Sequence, E_TTT);
                if (i > 0 || extra.moz.comprehensionExpressionStartsWithAssignment) {
                  result = join3(result, fragment);
                } else {
                  result.push(fragment);
                }
              }
            });
          }
          if (expr.filter) {
            result = join3(result, "if" + space);
            fragment = this.generateExpression(expr.filter, Precedence.Sequence, E_TTT);
            result = join3(result, ["(", fragment, ")"]);
          }
          if (!extra.moz.comprehensionExpressionStartsWithAssignment) {
            fragment = this.generateExpression(expr.body, Precedence.Assignment, E_TTT);
            result = join3(result, fragment);
          }
          result.push(expr.type === Syntax.GeneratorExpression ? ")" : "]");
          return result;
        },
        ComprehensionBlock: function(expr, precedence, flags) {
          var fragment;
          if (expr.left.type === Syntax.VariableDeclaration) {
            fragment = [
              expr.left.kind,
              noEmptySpace(),
              this.generateStatement(expr.left.declarations[0], S_FFFF)
            ];
          } else {
            fragment = this.generateExpression(expr.left, Precedence.Call, E_TTT);
          }
          fragment = join3(fragment, expr.of ? "of" : "in");
          fragment = join3(fragment, this.generateExpression(expr.right, Precedence.Sequence, E_TTT));
          return ["for" + space + "(", fragment, ")"];
        },
        SpreadElement: function(expr, precedence, flags) {
          return [
            "...",
            this.generateExpression(expr.argument, Precedence.Assignment, E_TTT)
          ];
        },
        TaggedTemplateExpression: function(expr, precedence, flags) {
          var itemFlags = E_TTF;
          if (!(flags & F_ALLOW_CALL)) {
            itemFlags = E_TFF;
          }
          var result = [
            this.generateExpression(expr.tag, Precedence.Call, itemFlags),
            this.generateExpression(expr.quasi, Precedence.Primary, E_FFT)
          ];
          return parenthesize(result, Precedence.TaggedTemplate, precedence);
        },
        TemplateElement: function(expr, precedence, flags) {
          return expr.value.raw;
        },
        TemplateLiteral: function(expr, precedence, flags) {
          var result, i, iz;
          result = ["`"];
          for (i = 0, iz = expr.quasis.length; i < iz; ++i) {
            result.push(this.generateExpression(expr.quasis[i], Precedence.Primary, E_TTT));
            if (i + 1 < iz) {
              result.push("${" + space);
              result.push(this.generateExpression(expr.expressions[i], Precedence.Sequence, E_TTT));
              result.push(space + "}");
            }
          }
          result.push("`");
          return result;
        },
        ModuleSpecifier: function(expr, precedence, flags) {
          return this.Literal(expr, precedence, flags);
        },
        ImportExpression: function(expr, precedence, flag) {
          return parenthesize([
            "import(",
            this.generateExpression(expr.source, Precedence.Assignment, E_TTT),
            ")"
          ], Precedence.Call, precedence);
        }
      };
      merge2(CodeGenerator.prototype, CodeGenerator.Expression);
      CodeGenerator.prototype.generateExpression = function(expr, precedence, flags) {
        var result, type2;
        type2 = expr.type || Syntax.Property;
        if (extra.verbatim && expr.hasOwnProperty(extra.verbatim)) {
          return generateVerbatim(expr, precedence);
        }
        result = this[type2](expr, precedence, flags);
        if (extra.comment) {
          result = addComments(expr, result);
        }
        return toSourceNodeWhenNeeded(result, expr);
      };
      CodeGenerator.prototype.generateStatement = function(stmt, flags) {
        var result, fragment;
        result = this[stmt.type](stmt, flags);
        if (extra.comment) {
          result = addComments(stmt, result);
        }
        fragment = toSourceNodeWhenNeeded(result).toString();
        if (stmt.type === Syntax.Program && !safeConcatenation && newline2 === "" && fragment.charAt(fragment.length - 1) === "\n") {
          result = sourceMap2 ? toSourceNodeWhenNeeded(result).replaceRight(/\s+$/, "") : fragment.replace(/\s+$/, "");
        }
        return toSourceNodeWhenNeeded(result, stmt);
      };
      function generateInternal(node2) {
        var codegen2;
        codegen2 = new CodeGenerator();
        if (isStatement(node2)) {
          return codegen2.generateStatement(node2, S_TFFF);
        }
        if (isExpression(node2)) {
          return codegen2.generateExpression(node2, Precedence.Sequence, E_TTT);
        }
        throw new Error("Unknown node type: " + node2.type);
      }
      function generate(node2, options2) {
        var defaultOptions2 = getDefaultOptions2(), result, pair;
        if (options2 != null) {
          if (typeof options2.indent === "string") {
            defaultOptions2.format.indent.style = options2.indent;
          }
          if (typeof options2.base === "number") {
            defaultOptions2.format.indent.base = options2.base;
          }
          options2 = updateDeeply(defaultOptions2, options2);
          indent = options2.format.indent.style;
          if (typeof options2.base === "string") {
            base = options2.base;
          } else {
            base = stringRepeat(indent, options2.format.indent.base);
          }
        } else {
          options2 = defaultOptions2;
          indent = options2.format.indent.style;
          base = stringRepeat(indent, options2.format.indent.base);
        }
        json = options2.format.json;
        renumber = options2.format.renumber;
        hexadecimal = json ? false : options2.format.hexadecimal;
        quotes = json ? "double" : options2.format.quotes;
        escapeless = options2.format.escapeless;
        newline2 = options2.format.newline;
        space = options2.format.space;
        if (options2.format.compact) {
          newline2 = space = indent = base = "";
        }
        parentheses = options2.format.parentheses;
        semicolons = options2.format.semicolons;
        safeConcatenation = options2.format.safeConcatenation;
        directive = options2.directive;
        parse2 = json ? null : options2.parse;
        sourceMap2 = options2.sourceMap;
        sourceCode = options2.sourceCode;
        preserveBlankLines = options2.format.preserveBlankLines && sourceCode !== null;
        extra = options2;
        if (sourceMap2) {
          if (!exports$1.browser) {
            SourceNode = requireSourceMap().SourceNode;
          } else {
            SourceNode = commonjsGlobal.sourceMap.SourceNode;
          }
        }
        result = generateInternal(node2);
        if (!sourceMap2) {
          pair = { code: result.toString(), map: null };
          return options2.sourceMapWithCode ? pair : pair.code;
        }
        pair = result.toStringWithSourceMap({
          file: options2.file,
          sourceRoot: options2.sourceMapRoot
        });
        if (options2.sourceContent) {
          pair.map.setSourceContent(
            options2.sourceMap,
            options2.sourceContent
          );
        }
        if (options2.sourceMapWithCode) {
          return pair;
        }
        return pair.map.toString();
      }
      FORMAT_MINIFY = {
        indent: {
          style: "",
          base: 0
        },
        renumber: true,
        hexadecimal: true,
        quotes: "auto",
        escapeless: true,
        compact: true,
        parentheses: false,
        semicolons: false
      };
      FORMAT_DEFAULTS = getDefaultOptions2().format;
      exports$1.version = require$$3.version;
      exports$1.generate = generate;
      exports$1.attachComments = estraverse2.attachComments;
      exports$1.Precedence = updateDeeply({}, Precedence);
      exports$1.browser = false;
      exports$1.FORMAT_MINIFY = FORMAT_MINIFY;
      exports$1.FORMAT_DEFAULTS = FORMAT_DEFAULTS;
    })();
  })(escodegen);
  return escodegen;
}
function requireEsprima$1() {
  if (hasRequiredEsprima$1) return esprima$2.exports;
  hasRequiredEsprima$1 = 1;
  (function(module2, exports$1) {
    (function webpackUniversalModuleDefinition(root2, factory) {
      module2.exports = factory();
    })(esprima$1, function() {
      return function(modules) {
        var installedModules = {};
        function __webpack_require__(moduleId) {
          if (installedModules[moduleId])
            return installedModules[moduleId].exports;
          var module3 = installedModules[moduleId] = {
            exports: {},
            id: moduleId,
            loaded: false
          };
          modules[moduleId].call(module3.exports, module3, module3.exports, __webpack_require__);
          module3.loaded = true;
          return module3.exports;
        }
        __webpack_require__.m = modules;
        __webpack_require__.c = installedModules;
        __webpack_require__.p = "";
        return __webpack_require__(0);
      }([
        function(module3, exports$12, __webpack_require__) {
          Object.defineProperty(exports$12, "__esModule", { value: true });
          var comment_handler_1 = __webpack_require__(1);
          var jsx_parser_1 = __webpack_require__(3);
          var parser_1 = __webpack_require__(8);
          var tokenizer_1 = __webpack_require__(15);
          function parse2(code2, options2, delegate) {
            var commentHandler = null;
            var proxyDelegate = function(node2, metadata2) {
              if (delegate) {
                delegate(node2, metadata2);
              }
              if (commentHandler) {
                commentHandler.visit(node2, metadata2);
              }
            };
            var parserDelegate = typeof delegate === "function" ? proxyDelegate : null;
            var collectComment = false;
            if (options2) {
              collectComment = typeof options2.comment === "boolean" && options2.comment;
              var attachComment = typeof options2.attachComment === "boolean" && options2.attachComment;
              if (collectComment || attachComment) {
                commentHandler = new comment_handler_1.CommentHandler();
                commentHandler.attach = attachComment;
                options2.comment = true;
                parserDelegate = proxyDelegate;
              }
            }
            var isModule = false;
            if (options2 && typeof options2.sourceType === "string") {
              isModule = options2.sourceType === "module";
            }
            var parser2;
            if (options2 && typeof options2.jsx === "boolean" && options2.jsx) {
              parser2 = new jsx_parser_1.JSXParser(code2, options2, parserDelegate);
            } else {
              parser2 = new parser_1.Parser(code2, options2, parserDelegate);
            }
            var program = isModule ? parser2.parseModule() : parser2.parseScript();
            var ast2 = program;
            if (collectComment && commentHandler) {
              ast2.comments = commentHandler.comments;
            }
            if (parser2.config.tokens) {
              ast2.tokens = parser2.tokens;
            }
            if (parser2.config.tolerant) {
              ast2.errors = parser2.errorHandler.errors;
            }
            return ast2;
          }
          exports$12.parse = parse2;
          function parseModule(code2, options2, delegate) {
            var parsingOptions = options2 || {};
            parsingOptions.sourceType = "module";
            return parse2(code2, parsingOptions, delegate);
          }
          exports$12.parseModule = parseModule;
          function parseScript(code2, options2, delegate) {
            var parsingOptions = options2 || {};
            parsingOptions.sourceType = "script";
            return parse2(code2, parsingOptions, delegate);
          }
          exports$12.parseScript = parseScript;
          function tokenize2(code2, options2, delegate) {
            var tokenizer = new tokenizer_1.Tokenizer(code2, options2);
            var tokens;
            tokens = [];
            try {
              while (true) {
                var token = tokenizer.getNextToken();
                if (!token) {
                  break;
                }
                if (delegate) {
                  token = delegate(token);
                }
                tokens.push(token);
              }
            } catch (e) {
              tokenizer.errorHandler.tolerate(e);
            }
            if (tokenizer.errorHandler.tolerant) {
              tokens.errors = tokenizer.errors();
            }
            return tokens;
          }
          exports$12.tokenize = tokenize2;
          var syntax_1 = __webpack_require__(2);
          exports$12.Syntax = syntax_1.Syntax;
          exports$12.version = "4.0.1";
        },
        function(module3, exports$12, __webpack_require__) {
          Object.defineProperty(exports$12, "__esModule", { value: true });
          var syntax_1 = __webpack_require__(2);
          var CommentHandler = function() {
            function CommentHandler2() {
              this.attach = false;
              this.comments = [];
              this.stack = [];
              this.leading = [];
              this.trailing = [];
            }
            CommentHandler2.prototype.insertInnerComments = function(node2, metadata2) {
              if (node2.type === syntax_1.Syntax.BlockStatement && node2.body.length === 0) {
                var innerComments = [];
                for (var i = this.leading.length - 1; i >= 0; --i) {
                  var entry = this.leading[i];
                  if (metadata2.end.offset >= entry.start) {
                    innerComments.unshift(entry.comment);
                    this.leading.splice(i, 1);
                    this.trailing.splice(i, 1);
                  }
                }
                if (innerComments.length) {
                  node2.innerComments = innerComments;
                }
              }
            };
            CommentHandler2.prototype.findTrailingComments = function(metadata2) {
              var trailingComments = [];
              if (this.trailing.length > 0) {
                for (var i = this.trailing.length - 1; i >= 0; --i) {
                  var entry_1 = this.trailing[i];
                  if (entry_1.start >= metadata2.end.offset) {
                    trailingComments.unshift(entry_1.comment);
                  }
                }
                this.trailing.length = 0;
                return trailingComments;
              }
              var entry = this.stack[this.stack.length - 1];
              if (entry && entry.node.trailingComments) {
                var firstComment = entry.node.trailingComments[0];
                if (firstComment && firstComment.range[0] >= metadata2.end.offset) {
                  trailingComments = entry.node.trailingComments;
                  delete entry.node.trailingComments;
                }
              }
              return trailingComments;
            };
            CommentHandler2.prototype.findLeadingComments = function(metadata2) {
              var leadingComments = [];
              var target;
              while (this.stack.length > 0) {
                var entry = this.stack[this.stack.length - 1];
                if (entry && entry.start >= metadata2.start.offset) {
                  target = entry.node;
                  this.stack.pop();
                } else {
                  break;
                }
              }
              if (target) {
                var count = target.leadingComments ? target.leadingComments.length : 0;
                for (var i = count - 1; i >= 0; --i) {
                  var comment = target.leadingComments[i];
                  if (comment.range[1] <= metadata2.start.offset) {
                    leadingComments.unshift(comment);
                    target.leadingComments.splice(i, 1);
                  }
                }
                if (target.leadingComments && target.leadingComments.length === 0) {
                  delete target.leadingComments;
                }
                return leadingComments;
              }
              for (var i = this.leading.length - 1; i >= 0; --i) {
                var entry = this.leading[i];
                if (entry.start <= metadata2.start.offset) {
                  leadingComments.unshift(entry.comment);
                  this.leading.splice(i, 1);
                }
              }
              return leadingComments;
            };
            CommentHandler2.prototype.visitNode = function(node2, metadata2) {
              if (node2.type === syntax_1.Syntax.Program && node2.body.length > 0) {
                return;
              }
              this.insertInnerComments(node2, metadata2);
              var trailingComments = this.findTrailingComments(metadata2);
              var leadingComments = this.findLeadingComments(metadata2);
              if (leadingComments.length > 0) {
                node2.leadingComments = leadingComments;
              }
              if (trailingComments.length > 0) {
                node2.trailingComments = trailingComments;
              }
              this.stack.push({
                node: node2,
                start: metadata2.start.offset
              });
            };
            CommentHandler2.prototype.visitComment = function(node2, metadata2) {
              var type2 = node2.type[0] === "L" ? "Line" : "Block";
              var comment = {
                type: type2,
                value: node2.value
              };
              if (node2.range) {
                comment.range = node2.range;
              }
              if (node2.loc) {
                comment.loc = node2.loc;
              }
              this.comments.push(comment);
              if (this.attach) {
                var entry = {
                  comment: {
                    type: type2,
                    value: node2.value,
                    range: [metadata2.start.offset, metadata2.end.offset]
                  },
                  start: metadata2.start.offset
                };
                if (node2.loc) {
                  entry.comment.loc = node2.loc;
                }
                node2.type = type2;
                this.leading.push(entry);
                this.trailing.push(entry);
              }
            };
            CommentHandler2.prototype.visit = function(node2, metadata2) {
              if (node2.type === "LineComment") {
                this.visitComment(node2, metadata2);
              } else if (node2.type === "BlockComment") {
                this.visitComment(node2, metadata2);
              } else if (this.attach) {
                this.visitNode(node2, metadata2);
              }
            };
            return CommentHandler2;
          }();
          exports$12.CommentHandler = CommentHandler;
        },
        function(module3, exports$12) {
          Object.defineProperty(exports$12, "__esModule", { value: true });
          exports$12.Syntax = {
            AssignmentExpression: "AssignmentExpression",
            AssignmentPattern: "AssignmentPattern",
            ArrayExpression: "ArrayExpression",
            ArrayPattern: "ArrayPattern",
            ArrowFunctionExpression: "ArrowFunctionExpression",
            AwaitExpression: "AwaitExpression",
            BlockStatement: "BlockStatement",
            BinaryExpression: "BinaryExpression",
            BreakStatement: "BreakStatement",
            CallExpression: "CallExpression",
            CatchClause: "CatchClause",
            ClassBody: "ClassBody",
            ClassDeclaration: "ClassDeclaration",
            ClassExpression: "ClassExpression",
            ConditionalExpression: "ConditionalExpression",
            ContinueStatement: "ContinueStatement",
            DoWhileStatement: "DoWhileStatement",
            DebuggerStatement: "DebuggerStatement",
            EmptyStatement: "EmptyStatement",
            ExportAllDeclaration: "ExportAllDeclaration",
            ExportDefaultDeclaration: "ExportDefaultDeclaration",
            ExportNamedDeclaration: "ExportNamedDeclaration",
            ExportSpecifier: "ExportSpecifier",
            ExpressionStatement: "ExpressionStatement",
            ForStatement: "ForStatement",
            ForOfStatement: "ForOfStatement",
            ForInStatement: "ForInStatement",
            FunctionDeclaration: "FunctionDeclaration",
            FunctionExpression: "FunctionExpression",
            Identifier: "Identifier",
            IfStatement: "IfStatement",
            ImportDeclaration: "ImportDeclaration",
            ImportDefaultSpecifier: "ImportDefaultSpecifier",
            ImportNamespaceSpecifier: "ImportNamespaceSpecifier",
            ImportSpecifier: "ImportSpecifier",
            Literal: "Literal",
            LabeledStatement: "LabeledStatement",
            LogicalExpression: "LogicalExpression",
            MemberExpression: "MemberExpression",
            MetaProperty: "MetaProperty",
            MethodDefinition: "MethodDefinition",
            NewExpression: "NewExpression",
            ObjectExpression: "ObjectExpression",
            ObjectPattern: "ObjectPattern",
            Program: "Program",
            Property: "Property",
            RestElement: "RestElement",
            ReturnStatement: "ReturnStatement",
            SequenceExpression: "SequenceExpression",
            SpreadElement: "SpreadElement",
            Super: "Super",
            SwitchCase: "SwitchCase",
            SwitchStatement: "SwitchStatement",
            TaggedTemplateExpression: "TaggedTemplateExpression",
            TemplateElement: "TemplateElement",
            TemplateLiteral: "TemplateLiteral",
            ThisExpression: "ThisExpression",
            ThrowStatement: "ThrowStatement",
            TryStatement: "TryStatement",
            UnaryExpression: "UnaryExpression",
            UpdateExpression: "UpdateExpression",
            VariableDeclaration: "VariableDeclaration",
            VariableDeclarator: "VariableDeclarator",
            WhileStatement: "WhileStatement",
            WithStatement: "WithStatement",
            YieldExpression: "YieldExpression"
          };
        },
        function(module3, exports$12, __webpack_require__) {
          var __extends5 = this && this.__extends || function() {
            var extendStatics5 = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d, b) {
              d.__proto__ = b;
            } || function(d, b) {
              for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
            };
            return function(d, b) {
              extendStatics5(d, b);
              function __() {
                this.constructor = d;
              }
              d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
            };
          }();
          Object.defineProperty(exports$12, "__esModule", { value: true });
          var character_1 = __webpack_require__(4);
          var JSXNode = __webpack_require__(5);
          var jsx_syntax_1 = __webpack_require__(6);
          var Node4 = __webpack_require__(7);
          var parser_1 = __webpack_require__(8);
          var token_1 = __webpack_require__(13);
          var xhtml_entities_1 = __webpack_require__(14);
          token_1.TokenName[100] = "JSXIdentifier";
          token_1.TokenName[101] = "JSXText";
          function getQualifiedElementName(elementName) {
            var qualifiedName;
            switch (elementName.type) {
              case jsx_syntax_1.JSXSyntax.JSXIdentifier:
                var id2 = elementName;
                qualifiedName = id2.name;
                break;
              case jsx_syntax_1.JSXSyntax.JSXNamespacedName:
                var ns = elementName;
                qualifiedName = getQualifiedElementName(ns.namespace) + ":" + getQualifiedElementName(ns.name);
                break;
              case jsx_syntax_1.JSXSyntax.JSXMemberExpression:
                var expr = elementName;
                qualifiedName = getQualifiedElementName(expr.object) + "." + getQualifiedElementName(expr.property);
                break;
            }
            return qualifiedName;
          }
          var JSXParser = function(_super) {
            __extends5(JSXParser2, _super);
            function JSXParser2(code2, options2, delegate) {
              return _super.call(this, code2, options2, delegate) || this;
            }
            JSXParser2.prototype.parsePrimaryExpression = function() {
              return this.match("<") ? this.parseJSXRoot() : _super.prototype.parsePrimaryExpression.call(this);
            };
            JSXParser2.prototype.startJSX = function() {
              this.scanner.index = this.startMarker.index;
              this.scanner.lineNumber = this.startMarker.line;
              this.scanner.lineStart = this.startMarker.index - this.startMarker.column;
            };
            JSXParser2.prototype.finishJSX = function() {
              this.nextToken();
            };
            JSXParser2.prototype.reenterJSX = function() {
              this.startJSX();
              this.expectJSX("}");
              if (this.config.tokens) {
                this.tokens.pop();
              }
            };
            JSXParser2.prototype.createJSXNode = function() {
              this.collectComments();
              return {
                index: this.scanner.index,
                line: this.scanner.lineNumber,
                column: this.scanner.index - this.scanner.lineStart
              };
            };
            JSXParser2.prototype.createJSXChildNode = function() {
              return {
                index: this.scanner.index,
                line: this.scanner.lineNumber,
                column: this.scanner.index - this.scanner.lineStart
              };
            };
            JSXParser2.prototype.scanXHTMLEntity = function(quote) {
              var result = "&";
              var valid2 = true;
              var terminated = false;
              var numeric = false;
              var hex = false;
              while (!this.scanner.eof() && valid2 && !terminated) {
                var ch = this.scanner.source[this.scanner.index];
                if (ch === quote) {
                  break;
                }
                terminated = ch === ";";
                result += ch;
                ++this.scanner.index;
                if (!terminated) {
                  switch (result.length) {
                    case 2:
                      numeric = ch === "#";
                      break;
                    case 3:
                      if (numeric) {
                        hex = ch === "x";
                        valid2 = hex || character_1.Character.isDecimalDigit(ch.charCodeAt(0));
                        numeric = numeric && !hex;
                      }
                      break;
                    default:
                      valid2 = valid2 && !(numeric && !character_1.Character.isDecimalDigit(ch.charCodeAt(0)));
                      valid2 = valid2 && !(hex && !character_1.Character.isHexDigit(ch.charCodeAt(0)));
                      break;
                  }
                }
              }
              if (valid2 && terminated && result.length > 2) {
                var str = result.substr(1, result.length - 2);
                if (numeric && str.length > 1) {
                  result = String.fromCharCode(parseInt(str.substr(1), 10));
                } else if (hex && str.length > 2) {
                  result = String.fromCharCode(parseInt("0" + str.substr(1), 16));
                } else if (!numeric && !hex && xhtml_entities_1.XHTMLEntities[str]) {
                  result = xhtml_entities_1.XHTMLEntities[str];
                }
              }
              return result;
            };
            JSXParser2.prototype.lexJSX = function() {
              var cp = this.scanner.source.charCodeAt(this.scanner.index);
              if (cp === 60 || cp === 62 || cp === 47 || cp === 58 || cp === 61 || cp === 123 || cp === 125) {
                var value = this.scanner.source[this.scanner.index++];
                return {
                  type: 7,
                  value,
                  lineNumber: this.scanner.lineNumber,
                  lineStart: this.scanner.lineStart,
                  start: this.scanner.index - 1,
                  end: this.scanner.index
                };
              }
              if (cp === 34 || cp === 39) {
                var start = this.scanner.index;
                var quote = this.scanner.source[this.scanner.index++];
                var str = "";
                while (!this.scanner.eof()) {
                  var ch = this.scanner.source[this.scanner.index++];
                  if (ch === quote) {
                    break;
                  } else if (ch === "&") {
                    str += this.scanXHTMLEntity(quote);
                  } else {
                    str += ch;
                  }
                }
                return {
                  type: 8,
                  value: str,
                  lineNumber: this.scanner.lineNumber,
                  lineStart: this.scanner.lineStart,
                  start,
                  end: this.scanner.index
                };
              }
              if (cp === 46) {
                var n1 = this.scanner.source.charCodeAt(this.scanner.index + 1);
                var n2 = this.scanner.source.charCodeAt(this.scanner.index + 2);
                var value = n1 === 46 && n2 === 46 ? "..." : ".";
                var start = this.scanner.index;
                this.scanner.index += value.length;
                return {
                  type: 7,
                  value,
                  lineNumber: this.scanner.lineNumber,
                  lineStart: this.scanner.lineStart,
                  start,
                  end: this.scanner.index
                };
              }
              if (cp === 96) {
                return {
                  type: 10,
                  value: "",
                  lineNumber: this.scanner.lineNumber,
                  lineStart: this.scanner.lineStart,
                  start: this.scanner.index,
                  end: this.scanner.index
                };
              }
              if (character_1.Character.isIdentifierStart(cp) && cp !== 92) {
                var start = this.scanner.index;
                ++this.scanner.index;
                while (!this.scanner.eof()) {
                  var ch = this.scanner.source.charCodeAt(this.scanner.index);
                  if (character_1.Character.isIdentifierPart(ch) && ch !== 92) {
                    ++this.scanner.index;
                  } else if (ch === 45) {
                    ++this.scanner.index;
                  } else {
                    break;
                  }
                }
                var id2 = this.scanner.source.slice(start, this.scanner.index);
                return {
                  type: 100,
                  value: id2,
                  lineNumber: this.scanner.lineNumber,
                  lineStart: this.scanner.lineStart,
                  start,
                  end: this.scanner.index
                };
              }
              return this.scanner.lex();
            };
            JSXParser2.prototype.nextJSXToken = function() {
              this.collectComments();
              this.startMarker.index = this.scanner.index;
              this.startMarker.line = this.scanner.lineNumber;
              this.startMarker.column = this.scanner.index - this.scanner.lineStart;
              var token = this.lexJSX();
              this.lastMarker.index = this.scanner.index;
              this.lastMarker.line = this.scanner.lineNumber;
              this.lastMarker.column = this.scanner.index - this.scanner.lineStart;
              if (this.config.tokens) {
                this.tokens.push(this.convertToken(token));
              }
              return token;
            };
            JSXParser2.prototype.nextJSXText = function() {
              this.startMarker.index = this.scanner.index;
              this.startMarker.line = this.scanner.lineNumber;
              this.startMarker.column = this.scanner.index - this.scanner.lineStart;
              var start = this.scanner.index;
              var text = "";
              while (!this.scanner.eof()) {
                var ch = this.scanner.source[this.scanner.index];
                if (ch === "{" || ch === "<") {
                  break;
                }
                ++this.scanner.index;
                text += ch;
                if (character_1.Character.isLineTerminator(ch.charCodeAt(0))) {
                  ++this.scanner.lineNumber;
                  if (ch === "\r" && this.scanner.source[this.scanner.index] === "\n") {
                    ++this.scanner.index;
                  }
                  this.scanner.lineStart = this.scanner.index;
                }
              }
              this.lastMarker.index = this.scanner.index;
              this.lastMarker.line = this.scanner.lineNumber;
              this.lastMarker.column = this.scanner.index - this.scanner.lineStart;
              var token = {
                type: 101,
                value: text,
                lineNumber: this.scanner.lineNumber,
                lineStart: this.scanner.lineStart,
                start,
                end: this.scanner.index
              };
              if (text.length > 0 && this.config.tokens) {
                this.tokens.push(this.convertToken(token));
              }
              return token;
            };
            JSXParser2.prototype.peekJSXToken = function() {
              var state = this.scanner.saveState();
              this.scanner.scanComments();
              var next = this.lexJSX();
              this.scanner.restoreState(state);
              return next;
            };
            JSXParser2.prototype.expectJSX = function(value) {
              var token = this.nextJSXToken();
              if (token.type !== 7 || token.value !== value) {
                this.throwUnexpectedToken(token);
              }
            };
            JSXParser2.prototype.matchJSX = function(value) {
              var next = this.peekJSXToken();
              return next.type === 7 && next.value === value;
            };
            JSXParser2.prototype.parseJSXIdentifier = function() {
              var node2 = this.createJSXNode();
              var token = this.nextJSXToken();
              if (token.type !== 100) {
                this.throwUnexpectedToken(token);
              }
              return this.finalize(node2, new JSXNode.JSXIdentifier(token.value));
            };
            JSXParser2.prototype.parseJSXElementName = function() {
              var node2 = this.createJSXNode();
              var elementName = this.parseJSXIdentifier();
              if (this.matchJSX(":")) {
                var namespace = elementName;
                this.expectJSX(":");
                var name_1 = this.parseJSXIdentifier();
                elementName = this.finalize(node2, new JSXNode.JSXNamespacedName(namespace, name_1));
              } else if (this.matchJSX(".")) {
                while (this.matchJSX(".")) {
                  var object2 = elementName;
                  this.expectJSX(".");
                  var property = this.parseJSXIdentifier();
                  elementName = this.finalize(node2, new JSXNode.JSXMemberExpression(object2, property));
                }
              }
              return elementName;
            };
            JSXParser2.prototype.parseJSXAttributeName = function() {
              var node2 = this.createJSXNode();
              var attributeName;
              var identifier = this.parseJSXIdentifier();
              if (this.matchJSX(":")) {
                var namespace = identifier;
                this.expectJSX(":");
                var name_2 = this.parseJSXIdentifier();
                attributeName = this.finalize(node2, new JSXNode.JSXNamespacedName(namespace, name_2));
              } else {
                attributeName = identifier;
              }
              return attributeName;
            };
            JSXParser2.prototype.parseJSXStringLiteralAttribute = function() {
              var node2 = this.createJSXNode();
              var token = this.nextJSXToken();
              if (token.type !== 8) {
                this.throwUnexpectedToken(token);
              }
              var raw = this.getTokenRaw(token);
              return this.finalize(node2, new Node4.Literal(token.value, raw));
            };
            JSXParser2.prototype.parseJSXExpressionAttribute = function() {
              var node2 = this.createJSXNode();
              this.expectJSX("{");
              this.finishJSX();
              if (this.match("}")) {
                this.tolerateError("JSX attributes must only be assigned a non-empty expression");
              }
              var expression = this.parseAssignmentExpression();
              this.reenterJSX();
              return this.finalize(node2, new JSXNode.JSXExpressionContainer(expression));
            };
            JSXParser2.prototype.parseJSXAttributeValue = function() {
              return this.matchJSX("{") ? this.parseJSXExpressionAttribute() : this.matchJSX("<") ? this.parseJSXElement() : this.parseJSXStringLiteralAttribute();
            };
            JSXParser2.prototype.parseJSXNameValueAttribute = function() {
              var node2 = this.createJSXNode();
              var name = this.parseJSXAttributeName();
              var value = null;
              if (this.matchJSX("=")) {
                this.expectJSX("=");
                value = this.parseJSXAttributeValue();
              }
              return this.finalize(node2, new JSXNode.JSXAttribute(name, value));
            };
            JSXParser2.prototype.parseJSXSpreadAttribute = function() {
              var node2 = this.createJSXNode();
              this.expectJSX("{");
              this.expectJSX("...");
              this.finishJSX();
              var argument = this.parseAssignmentExpression();
              this.reenterJSX();
              return this.finalize(node2, new JSXNode.JSXSpreadAttribute(argument));
            };
            JSXParser2.prototype.parseJSXAttributes = function() {
              var attributes = [];
              while (!this.matchJSX("/") && !this.matchJSX(">")) {
                var attribute = this.matchJSX("{") ? this.parseJSXSpreadAttribute() : this.parseJSXNameValueAttribute();
                attributes.push(attribute);
              }
              return attributes;
            };
            JSXParser2.prototype.parseJSXOpeningElement = function() {
              var node2 = this.createJSXNode();
              this.expectJSX("<");
              var name = this.parseJSXElementName();
              var attributes = this.parseJSXAttributes();
              var selfClosing = this.matchJSX("/");
              if (selfClosing) {
                this.expectJSX("/");
              }
              this.expectJSX(">");
              return this.finalize(node2, new JSXNode.JSXOpeningElement(name, selfClosing, attributes));
            };
            JSXParser2.prototype.parseJSXBoundaryElement = function() {
              var node2 = this.createJSXNode();
              this.expectJSX("<");
              if (this.matchJSX("/")) {
                this.expectJSX("/");
                var name_3 = this.parseJSXElementName();
                this.expectJSX(">");
                return this.finalize(node2, new JSXNode.JSXClosingElement(name_3));
              }
              var name = this.parseJSXElementName();
              var attributes = this.parseJSXAttributes();
              var selfClosing = this.matchJSX("/");
              if (selfClosing) {
                this.expectJSX("/");
              }
              this.expectJSX(">");
              return this.finalize(node2, new JSXNode.JSXOpeningElement(name, selfClosing, attributes));
            };
            JSXParser2.prototype.parseJSXEmptyExpression = function() {
              var node2 = this.createJSXChildNode();
              this.collectComments();
              this.lastMarker.index = this.scanner.index;
              this.lastMarker.line = this.scanner.lineNumber;
              this.lastMarker.column = this.scanner.index - this.scanner.lineStart;
              return this.finalize(node2, new JSXNode.JSXEmptyExpression());
            };
            JSXParser2.prototype.parseJSXExpressionContainer = function() {
              var node2 = this.createJSXNode();
              this.expectJSX("{");
              var expression;
              if (this.matchJSX("}")) {
                expression = this.parseJSXEmptyExpression();
                this.expectJSX("}");
              } else {
                this.finishJSX();
                expression = this.parseAssignmentExpression();
                this.reenterJSX();
              }
              return this.finalize(node2, new JSXNode.JSXExpressionContainer(expression));
            };
            JSXParser2.prototype.parseJSXChildren = function() {
              var children = [];
              while (!this.scanner.eof()) {
                var node2 = this.createJSXChildNode();
                var token = this.nextJSXText();
                if (token.start < token.end) {
                  var raw = this.getTokenRaw(token);
                  var child = this.finalize(node2, new JSXNode.JSXText(token.value, raw));
                  children.push(child);
                }
                if (this.scanner.source[this.scanner.index] === "{") {
                  var container = this.parseJSXExpressionContainer();
                  children.push(container);
                } else {
                  break;
                }
              }
              return children;
            };
            JSXParser2.prototype.parseComplexJSXElement = function(el) {
              var stack = [];
              while (!this.scanner.eof()) {
                el.children = el.children.concat(this.parseJSXChildren());
                var node2 = this.createJSXChildNode();
                var element = this.parseJSXBoundaryElement();
                if (element.type === jsx_syntax_1.JSXSyntax.JSXOpeningElement) {
                  var opening = element;
                  if (opening.selfClosing) {
                    var child = this.finalize(node2, new JSXNode.JSXElement(opening, [], null));
                    el.children.push(child);
                  } else {
                    stack.push(el);
                    el = { node: node2, opening, closing: null, children: [] };
                  }
                }
                if (element.type === jsx_syntax_1.JSXSyntax.JSXClosingElement) {
                  el.closing = element;
                  var open_1 = getQualifiedElementName(el.opening.name);
                  var close_1 = getQualifiedElementName(el.closing.name);
                  if (open_1 !== close_1) {
                    this.tolerateError("Expected corresponding JSX closing tag for %0", open_1);
                  }
                  if (stack.length > 0) {
                    var child = this.finalize(el.node, new JSXNode.JSXElement(el.opening, el.children, el.closing));
                    el = stack[stack.length - 1];
                    el.children.push(child);
                    stack.pop();
                  } else {
                    break;
                  }
                }
              }
              return el;
            };
            JSXParser2.prototype.parseJSXElement = function() {
              var node2 = this.createJSXNode();
              var opening = this.parseJSXOpeningElement();
              var children = [];
              var closing = null;
              if (!opening.selfClosing) {
                var el = this.parseComplexJSXElement({ node: node2, opening, closing, children });
                children = el.children;
                closing = el.closing;
              }
              return this.finalize(node2, new JSXNode.JSXElement(opening, children, closing));
            };
            JSXParser2.prototype.parseJSXRoot = function() {
              if (this.config.tokens) {
                this.tokens.pop();
              }
              this.startJSX();
              var element = this.parseJSXElement();
              this.finishJSX();
              return element;
            };
            JSXParser2.prototype.isStartOfExpression = function() {
              return _super.prototype.isStartOfExpression.call(this) || this.match("<");
            };
            return JSXParser2;
          }(parser_1.Parser);
          exports$12.JSXParser = JSXParser;
        },
        function(module3, exports$12) {
          Object.defineProperty(exports$12, "__esModule", { value: true });
          var Regex2 = {
            NonAsciiIdentifierStart: /[\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\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0-\u08B4\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\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\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\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-\u1877\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\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\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-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AD\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\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-\uAB65\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\uDF30-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\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-\uDE33\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\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[\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDF00-\uDF19]|\uD806[\uDCA0-\uDCDF\uDCFF\uDEC0-\uDEF8]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F]|\uD82C[\uDC00\uDC01]|\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]|\uD83A[\uDC00-\uDCC4]|\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-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1]|\uD87E[\uDC00-\uDE1D]/,
            NonAsciiIdentifierPart: /[\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\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u08A0-\u08B4\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\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\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\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-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C81-\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\u0D01-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\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\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\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-\u1877\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\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1CD0-\u1CD2\u1CD4-\u1CF6\u1CF8\u1CF9\u1D00-\u1DF5\u1DFC-\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\u200C\u200D\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-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AD\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C4\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\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-\uAB65\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\uDF30-\uDF4A\uDF50-\uDF7A\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\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-\uDE33\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]|\uD804[\uDC00-\uDC46\uDC66-\uDC6F\uDC7F-\uDCBA\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDCA-\uDDCC\uDDD0-\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE37\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\uDF3C-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF50\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDDD8-\uDDDD\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB7\uDEC0-\uDEC9\uDF00-\uDF19\uDF1D-\uDF2B\uDF30-\uDF39]|\uD806[\uDCA0-\uDCE9\uDCFF\uDEC0-\uDEF8]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872][\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[\uDF00-\uDF44\uDF50-\uDF7E\uDF8F-\uDF9F]|\uD82C[\uDC00\uDC01]|\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]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6]|\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-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]/
          };
          exports$12.Character = {
            fromCodePoint: function(cp) {
              return cp < 65536 ? String.fromCharCode(cp) : String.fromCharCode(55296 + (cp - 65536 >> 10)) + String.fromCharCode(56320 + (cp - 65536 & 1023));
            },
            isWhiteSpace: function(cp) {
              return cp === 32 || cp === 9 || cp === 11 || cp === 12 || cp === 160 || cp >= 5760 && [5760, 8192, 8193, 8194, 8195, 8196, 8197, 8198, 8199, 8200, 8201, 8202, 8239, 8287, 12288, 65279].indexOf(cp) >= 0;
            },
            isLineTerminator: function(cp) {
              return cp === 10 || cp === 13 || cp === 8232 || cp === 8233;
            },
            isIdentifierStart: function(cp) {
              return cp === 36 || cp === 95 || cp >= 65 && cp <= 90 || cp >= 97 && cp <= 122 || cp === 92 || cp >= 128 && Regex2.NonAsciiIdentifierStart.test(exports$12.Character.fromCodePoint(cp));
            },
            isIdentifierPart: function(cp) {
              return cp === 36 || cp === 95 || cp >= 65 && cp <= 90 || cp >= 97 && cp <= 122 || cp >= 48 && cp <= 57 || cp === 92 || cp >= 128 && Regex2.NonAsciiIdentifierPart.test(exports$12.Character.fromCodePoint(cp));
            },
            isDecimalDigit: function(cp) {
              return cp >= 48 && cp <= 57;
            },
            isHexDigit: function(cp) {
              return cp >= 48 && cp <= 57 || cp >= 65 && cp <= 70 || cp >= 97 && cp <= 102;
            },
            isOctalDigit: function(cp) {
              return cp >= 48 && cp <= 55;
            }
          };
        },
        function(module3, exports$12, __webpack_require__) {
          Object.defineProperty(exports$12, "__esModule", { value: true });
          var jsx_syntax_1 = __webpack_require__(6);
          var JSXClosingElement = /* @__PURE__ */ function() {
            function JSXClosingElement2(name) {
              this.type = jsx_syntax_1.JSXSyntax.JSXClosingElement;
              this.name = name;
            }
            return JSXClosingElement2;
          }();
          exports$12.JSXClosingElement = JSXClosingElement;
          var JSXElement = /* @__PURE__ */ function() {
            function JSXElement2(openingElement, children, closingElement) {
              this.type = jsx_syntax_1.JSXSyntax.JSXElement;
              this.openingElement = openingElement;
              this.children = children;
              this.closingElement = closingElement;
            }
            return JSXElement2;
          }();
          exports$12.JSXElement = JSXElement;
          var JSXEmptyExpression = /* @__PURE__ */ function() {
            function JSXEmptyExpression2() {
              this.type = jsx_syntax_1.JSXSyntax.JSXEmptyExpression;
            }
            return JSXEmptyExpression2;
          }();
          exports$12.JSXEmptyExpression = JSXEmptyExpression;
          var JSXExpressionContainer = /* @__PURE__ */ function() {
            function JSXExpressionContainer2(expression) {
              this.type = jsx_syntax_1.JSXSyntax.JSXExpressionContainer;
              this.expression = expression;
            }
            return JSXExpressionContainer2;
          }();
          exports$12.JSXExpressionContainer = JSXExpressionContainer;
          var JSXIdentifier = /* @__PURE__ */ function() {
            function JSXIdentifier2(name) {
              this.type = jsx_syntax_1.JSXSyntax.JSXIdentifier;
              this.name = name;
            }
            return JSXIdentifier2;
          }();
          exports$12.JSXIdentifier = JSXIdentifier;
          var JSXMemberExpression = /* @__PURE__ */ function() {
            function JSXMemberExpression2(object2, property) {
              this.type = jsx_syntax_1.JSXSyntax.JSXMemberExpression;
              this.object = object2;
              this.property = property;
            }
            return JSXMemberExpression2;
          }();
          exports$12.JSXMemberExpression = JSXMemberExpression;
          var JSXAttribute = /* @__PURE__ */ function() {
            function JSXAttribute2(name, value) {
              this.type = jsx_syntax_1.JSXSyntax.JSXAttribute;
              this.name = name;
              this.value = value;
            }
            return JSXAttribute2;
          }();
          exports$12.JSXAttribute = JSXAttribute;
          var JSXNamespacedName = /* @__PURE__ */ function() {
            function JSXNamespacedName2(namespace, name) {
              this.type = jsx_syntax_1.JSXSyntax.JSXNamespacedName;
              this.namespace = namespace;
              this.name = name;
            }
            return JSXNamespacedName2;
          }();
          exports$12.JSXNamespacedName = JSXNamespacedName;
          var JSXOpeningElement = /* @__PURE__ */ function() {
            function JSXOpeningElement2(name, selfClosing, attributes) {
              this.type = jsx_syntax_1.JSXSyntax.JSXOpeningElement;
              this.name = name;
              this.selfClosing = selfClosing;
              this.attributes = attributes;
            }
            return JSXOpeningElement2;
          }();
          exports$12.JSXOpeningElement = JSXOpeningElement;
          var JSXSpreadAttribute = /* @__PURE__ */ function() {
            function JSXSpreadAttribute2(argument) {
              this.type = jsx_syntax_1.JSXSyntax.JSXSpreadAttribute;
              this.argument = argument;
            }
            return JSXSpreadAttribute2;
          }();
          exports$12.JSXSpreadAttribute = JSXSpreadAttribute;
          var JSXText = /* @__PURE__ */ function() {
            function JSXText2(value, raw) {
              this.type = jsx_syntax_1.JSXSyntax.JSXText;
              this.value = value;
              this.raw = raw;
            }
            return JSXText2;
          }();
          exports$12.JSXText = JSXText;
        },
        function(module3, exports$12) {
          Object.defineProperty(exports$12, "__esModule", { value: true });
          exports$12.JSXSyntax = {
            JSXAttribute: "JSXAttribute",
            JSXClosingElement: "JSXClosingElement",
            JSXElement: "JSXElement",
            JSXEmptyExpression: "JSXEmptyExpression",
            JSXExpressionContainer: "JSXExpressionContainer",
            JSXIdentifier: "JSXIdentifier",
            JSXMemberExpression: "JSXMemberExpression",
            JSXNamespacedName: "JSXNamespacedName",
            JSXOpeningElement: "JSXOpeningElement",
            JSXSpreadAttribute: "JSXSpreadAttribute",
            JSXText: "JSXText"
          };
        },
        function(module3, exports$12, __webpack_require__) {
          Object.defineProperty(exports$12, "__esModule", { value: true });
          var syntax_1 = __webpack_require__(2);
          var ArrayExpression = /* @__PURE__ */ function() {
            function ArrayExpression2(elements) {
              this.type = syntax_1.Syntax.ArrayExpression;
              this.elements = elements;
            }
            return ArrayExpression2;
          }();
          exports$12.ArrayExpression = ArrayExpression;
          var ArrayPattern = /* @__PURE__ */ function() {
            function ArrayPattern2(elements) {
              this.type = syntax_1.Syntax.ArrayPattern;
              this.elements = elements;
            }
            return ArrayPattern2;
          }();
          exports$12.ArrayPattern = ArrayPattern;
          var ArrowFunctionExpression = /* @__PURE__ */ function() {
            function ArrowFunctionExpression2(params, body, expression) {
              this.type = syntax_1.Syntax.ArrowFunctionExpression;
              this.id = null;
              this.params = params;
              this.body = body;
              this.generator = false;
              this.expression = expression;
              this.async = false;
            }
            return ArrowFunctionExpression2;
          }();
          exports$12.ArrowFunctionExpression = ArrowFunctionExpression;
          var AssignmentExpression = /* @__PURE__ */ function() {
            function AssignmentExpression2(operator, left2, right2) {
              this.type = syntax_1.Syntax.AssignmentExpression;
              this.operator = operator;
              this.left = left2;
              this.right = right2;
            }
            return AssignmentExpression2;
          }();
          exports$12.AssignmentExpression = AssignmentExpression;
          var AssignmentPattern = /* @__PURE__ */ function() {
            function AssignmentPattern2(left2, right2) {
              this.type = syntax_1.Syntax.AssignmentPattern;
              this.left = left2;
              this.right = right2;
            }
            return AssignmentPattern2;
          }();
          exports$12.AssignmentPattern = AssignmentPattern;
          var AsyncArrowFunctionExpression = /* @__PURE__ */ function() {
            function AsyncArrowFunctionExpression2(params, body, expression) {
              this.type = syntax_1.Syntax.ArrowFunctionExpression;
              this.id = null;
              this.params = params;
              this.body = body;
              this.generator = false;
              this.expression = expression;
              this.async = true;
            }
            return AsyncArrowFunctionExpression2;
          }();
          exports$12.AsyncArrowFunctionExpression = AsyncArrowFunctionExpression;
          var AsyncFunctionDeclaration = /* @__PURE__ */ function() {
            function AsyncFunctionDeclaration2(id2, params, body) {
              this.type = syntax_1.Syntax.FunctionDeclaration;
              this.id = id2;
              this.params = params;
              this.body = body;
              this.generator = false;
              this.expression = false;
              this.async = true;
            }
            return AsyncFunctionDeclaration2;
          }();
          exports$12.AsyncFunctionDeclaration = AsyncFunctionDeclaration;
          var AsyncFunctionExpression = /* @__PURE__ */ function() {
            function AsyncFunctionExpression2(id2, params, body) {
              this.type = syntax_1.Syntax.FunctionExpression;
              this.id = id2;
              this.params = params;
              this.body = body;
              this.generator = false;
              this.expression = false;
              this.async = true;
            }
            return AsyncFunctionExpression2;
          }();
          exports$12.AsyncFunctionExpression = AsyncFunctionExpression;
          var AwaitExpression = /* @__PURE__ */ function() {
            function AwaitExpression2(argument) {
              this.type = syntax_1.Syntax.AwaitExpression;
              this.argument = argument;
            }
            return AwaitExpression2;
          }();
          exports$12.AwaitExpression = AwaitExpression;
          var BinaryExpression = /* @__PURE__ */ function() {
            function BinaryExpression2(operator, left2, right2) {
              var logical = operator === "||" || operator === "&&";
              this.type = logical ? syntax_1.Syntax.LogicalExpression : syntax_1.Syntax.BinaryExpression;
              this.operator = operator;
              this.left = left2;
              this.right = right2;
            }
            return BinaryExpression2;
          }();
          exports$12.BinaryExpression = BinaryExpression;
          var BlockStatement = /* @__PURE__ */ function() {
            function BlockStatement2(body) {
              this.type = syntax_1.Syntax.BlockStatement;
              this.body = body;
            }
            return BlockStatement2;
          }();
          exports$12.BlockStatement = BlockStatement;
          var BreakStatement = /* @__PURE__ */ function() {
            function BreakStatement2(label) {
              this.type = syntax_1.Syntax.BreakStatement;
              this.label = label;
            }
            return BreakStatement2;
          }();
          exports$12.BreakStatement = BreakStatement;
          var CallExpression = /* @__PURE__ */ function() {
            function CallExpression2(callee, args2) {
              this.type = syntax_1.Syntax.CallExpression;
              this.callee = callee;
              this.arguments = args2;
            }
            return CallExpression2;
          }();
          exports$12.CallExpression = CallExpression;
          var CatchClause = /* @__PURE__ */ function() {
            function CatchClause2(param, body) {
              this.type = syntax_1.Syntax.CatchClause;
              this.param = param;
              this.body = body;
            }
            return CatchClause2;
          }();
          exports$12.CatchClause = CatchClause;
          var ClassBody = /* @__PURE__ */ function() {
            function ClassBody2(body) {
              this.type = syntax_1.Syntax.ClassBody;
              this.body = body;
            }
            return ClassBody2;
          }();
          exports$12.ClassBody = ClassBody;
          var ClassDeclaration = /* @__PURE__ */ function() {
            function ClassDeclaration2(id2, superClass, body) {
              this.type = syntax_1.Syntax.ClassDeclaration;
              this.id = id2;
              this.superClass = superClass;
              this.body = body;
            }
            return ClassDeclaration2;
          }();
          exports$12.ClassDeclaration = ClassDeclaration;
          var ClassExpression = /* @__PURE__ */ function() {
            function ClassExpression2(id2, superClass, body) {
              this.type = syntax_1.Syntax.ClassExpression;
              this.id = id2;
              this.superClass = superClass;
              this.body = body;
            }
            return ClassExpression2;
          }();
          exports$12.ClassExpression = ClassExpression;
          var ComputedMemberExpression = /* @__PURE__ */ function() {
            function ComputedMemberExpression2(object2, property) {
              this.type = syntax_1.Syntax.MemberExpression;
              this.computed = true;
              this.object = object2;
              this.property = property;
            }
            return ComputedMemberExpression2;
          }();
          exports$12.ComputedMemberExpression = ComputedMemberExpression;
          var ConditionalExpression = /* @__PURE__ */ function() {
            function ConditionalExpression2(test2, consequent, alternate) {
              this.type = syntax_1.Syntax.ConditionalExpression;
              this.test = test2;
              this.consequent = consequent;
              this.alternate = alternate;
            }
            return ConditionalExpression2;
          }();
          exports$12.ConditionalExpression = ConditionalExpression;
          var ContinueStatement = /* @__PURE__ */ function() {
            function ContinueStatement2(label) {
              this.type = syntax_1.Syntax.ContinueStatement;
              this.label = label;
            }
            return ContinueStatement2;
          }();
          exports$12.ContinueStatement = ContinueStatement;
          var DebuggerStatement = /* @__PURE__ */ function() {
            function DebuggerStatement2() {
              this.type = syntax_1.Syntax.DebuggerStatement;
            }
            return DebuggerStatement2;
          }();
          exports$12.DebuggerStatement = DebuggerStatement;
          var Directive = /* @__PURE__ */ function() {
            function Directive2(expression, directive) {
              this.type = syntax_1.Syntax.ExpressionStatement;
              this.expression = expression;
              this.directive = directive;
            }
            return Directive2;
          }();
          exports$12.Directive = Directive;
          var DoWhileStatement = /* @__PURE__ */ function() {
            function DoWhileStatement2(body, test2) {
              this.type = syntax_1.Syntax.DoWhileStatement;
              this.body = body;
              this.test = test2;
            }
            return DoWhileStatement2;
          }();
          exports$12.DoWhileStatement = DoWhileStatement;
          var EmptyStatement = /* @__PURE__ */ function() {
            function EmptyStatement2() {
              this.type = syntax_1.Syntax.EmptyStatement;
            }
            return EmptyStatement2;
          }();
          exports$12.EmptyStatement = EmptyStatement;
          var ExportAllDeclaration = /* @__PURE__ */ function() {
            function ExportAllDeclaration2(source2) {
              this.type = syntax_1.Syntax.ExportAllDeclaration;
              this.source = source2;
            }
            return ExportAllDeclaration2;
          }();
          exports$12.ExportAllDeclaration = ExportAllDeclaration;
          var ExportDefaultDeclaration = /* @__PURE__ */ function() {
            function ExportDefaultDeclaration2(declaration2) {
              this.type = syntax_1.Syntax.ExportDefaultDeclaration;
              this.declaration = declaration2;
            }
            return ExportDefaultDeclaration2;
          }();
          exports$12.ExportDefaultDeclaration = ExportDefaultDeclaration;
          var ExportNamedDeclaration = /* @__PURE__ */ function() {
            function ExportNamedDeclaration2(declaration2, specifiers, source2) {
              this.type = syntax_1.Syntax.ExportNamedDeclaration;
              this.declaration = declaration2;
              this.specifiers = specifiers;
              this.source = source2;
            }
            return ExportNamedDeclaration2;
          }();
          exports$12.ExportNamedDeclaration = ExportNamedDeclaration;
          var ExportSpecifier = /* @__PURE__ */ function() {
            function ExportSpecifier2(local, exported) {
              this.type = syntax_1.Syntax.ExportSpecifier;
              this.exported = exported;
              this.local = local;
            }
            return ExportSpecifier2;
          }();
          exports$12.ExportSpecifier = ExportSpecifier;
          var ExpressionStatement = /* @__PURE__ */ function() {
            function ExpressionStatement2(expression) {
              this.type = syntax_1.Syntax.ExpressionStatement;
              this.expression = expression;
            }
            return ExpressionStatement2;
          }();
          exports$12.ExpressionStatement = ExpressionStatement;
          var ForInStatement = /* @__PURE__ */ function() {
            function ForInStatement2(left2, right2, body) {
              this.type = syntax_1.Syntax.ForInStatement;
              this.left = left2;
              this.right = right2;
              this.body = body;
              this.each = false;
            }
            return ForInStatement2;
          }();
          exports$12.ForInStatement = ForInStatement;
          var ForOfStatement = /* @__PURE__ */ function() {
            function ForOfStatement2(left2, right2, body) {
              this.type = syntax_1.Syntax.ForOfStatement;
              this.left = left2;
              this.right = right2;
              this.body = body;
            }
            return ForOfStatement2;
          }();
          exports$12.ForOfStatement = ForOfStatement;
          var ForStatement = /* @__PURE__ */ function() {
            function ForStatement2(init2, test2, update, body) {
              this.type = syntax_1.Syntax.ForStatement;
              this.init = init2;
              this.test = test2;
              this.update = update;
              this.body = body;
            }
            return ForStatement2;
          }();
          exports$12.ForStatement = ForStatement;
          var FunctionDeclaration = /* @__PURE__ */ function() {
            function FunctionDeclaration2(id2, params, body, generator) {
              this.type = syntax_1.Syntax.FunctionDeclaration;
              this.id = id2;
              this.params = params;
              this.body = body;
              this.generator = generator;
              this.expression = false;
              this.async = false;
            }
            return FunctionDeclaration2;
          }();
          exports$12.FunctionDeclaration = FunctionDeclaration;
          var FunctionExpression = /* @__PURE__ */ function() {
            function FunctionExpression2(id2, params, body, generator) {
              this.type = syntax_1.Syntax.FunctionExpression;
              this.id = id2;
              this.params = params;
              this.body = body;
              this.generator = generator;
              this.expression = false;
              this.async = false;
            }
            return FunctionExpression2;
          }();
          exports$12.FunctionExpression = FunctionExpression;
          var Identifier = /* @__PURE__ */ function() {
            function Identifier2(name) {
              this.type = syntax_1.Syntax.Identifier;
              this.name = name;
            }
            return Identifier2;
          }();
          exports$12.Identifier = Identifier;
          var IfStatement = /* @__PURE__ */ function() {
            function IfStatement2(test2, consequent, alternate) {
              this.type = syntax_1.Syntax.IfStatement;
              this.test = test2;
              this.consequent = consequent;
              this.alternate = alternate;
            }
            return IfStatement2;
          }();
          exports$12.IfStatement = IfStatement;
          var ImportDeclaration = /* @__PURE__ */ function() {
            function ImportDeclaration2(specifiers, source2) {
              this.type = syntax_1.Syntax.ImportDeclaration;
              this.specifiers = specifiers;
              this.source = source2;
            }
            return ImportDeclaration2;
          }();
          exports$12.ImportDeclaration = ImportDeclaration;
          var ImportDefaultSpecifier = /* @__PURE__ */ function() {
            function ImportDefaultSpecifier2(local) {
              this.type = syntax_1.Syntax.ImportDefaultSpecifier;
              this.local = local;
            }
            return ImportDefaultSpecifier2;
          }();
          exports$12.ImportDefaultSpecifier = ImportDefaultSpecifier;
          var ImportNamespaceSpecifier = /* @__PURE__ */ function() {
            function ImportNamespaceSpecifier2(local) {
              this.type = syntax_1.Syntax.ImportNamespaceSpecifier;
              this.local = local;
            }
            return ImportNamespaceSpecifier2;
          }();
          exports$12.ImportNamespaceSpecifier = ImportNamespaceSpecifier;
          var ImportSpecifier = /* @__PURE__ */ function() {
            function ImportSpecifier2(local, imported) {
              this.type = syntax_1.Syntax.ImportSpecifier;
              this.local = local;
              this.imported = imported;
            }
            return ImportSpecifier2;
          }();
          exports$12.ImportSpecifier = ImportSpecifier;
          var LabeledStatement = /* @__PURE__ */ function() {
            function LabeledStatement2(label, body) {
              this.type = syntax_1.Syntax.LabeledStatement;
              this.label = label;
              this.body = body;
            }
            return LabeledStatement2;
          }();
          exports$12.LabeledStatement = LabeledStatement;
          var Literal = /* @__PURE__ */ function() {
            function Literal2(value, raw) {
              this.type = syntax_1.Syntax.Literal;
              this.value = value;
              this.raw = raw;
            }
            return Literal2;
          }();
          exports$12.Literal = Literal;
          var MetaProperty = /* @__PURE__ */ function() {
            function MetaProperty2(meta, property) {
              this.type = syntax_1.Syntax.MetaProperty;
              this.meta = meta;
              this.property = property;
            }
            return MetaProperty2;
          }();
          exports$12.MetaProperty = MetaProperty;
          var MethodDefinition = /* @__PURE__ */ function() {
            function MethodDefinition2(key, computed, value, kind, isStatic) {
              this.type = syntax_1.Syntax.MethodDefinition;
              this.key = key;
              this.computed = computed;
              this.value = value;
              this.kind = kind;
              this.static = isStatic;
            }
            return MethodDefinition2;
          }();
          exports$12.MethodDefinition = MethodDefinition;
          var Module = /* @__PURE__ */ function() {
            function Module2(body) {
              this.type = syntax_1.Syntax.Program;
              this.body = body;
              this.sourceType = "module";
            }
            return Module2;
          }();
          exports$12.Module = Module;
          var NewExpression = /* @__PURE__ */ function() {
            function NewExpression2(callee, args2) {
              this.type = syntax_1.Syntax.NewExpression;
              this.callee = callee;
              this.arguments = args2;
            }
            return NewExpression2;
          }();
          exports$12.NewExpression = NewExpression;
          var ObjectExpression = /* @__PURE__ */ function() {
            function ObjectExpression2(properties2) {
              this.type = syntax_1.Syntax.ObjectExpression;
              this.properties = properties2;
            }
            return ObjectExpression2;
          }();
          exports$12.ObjectExpression = ObjectExpression;
          var ObjectPattern = /* @__PURE__ */ function() {
            function ObjectPattern2(properties2) {
              this.type = syntax_1.Syntax.ObjectPattern;
              this.properties = properties2;
            }
            return ObjectPattern2;
          }();
          exports$12.ObjectPattern = ObjectPattern;
          var Property = /* @__PURE__ */ function() {
            function Property2(kind, key, computed, value, method, shorthand) {
              this.type = syntax_1.Syntax.Property;
              this.key = key;
              this.computed = computed;
              this.value = value;
              this.kind = kind;
              this.method = method;
              this.shorthand = shorthand;
            }
            return Property2;
          }();
          exports$12.Property = Property;
          var RegexLiteral = /* @__PURE__ */ function() {
            function RegexLiteral2(value, raw, pattern2, flags) {
              this.type = syntax_1.Syntax.Literal;
              this.value = value;
              this.raw = raw;
              this.regex = { pattern: pattern2, flags };
            }
            return RegexLiteral2;
          }();
          exports$12.RegexLiteral = RegexLiteral;
          var RestElement = /* @__PURE__ */ function() {
            function RestElement2(argument) {
              this.type = syntax_1.Syntax.RestElement;
              this.argument = argument;
            }
            return RestElement2;
          }();
          exports$12.RestElement = RestElement;
          var ReturnStatement = /* @__PURE__ */ function() {
            function ReturnStatement2(argument) {
              this.type = syntax_1.Syntax.ReturnStatement;
              this.argument = argument;
            }
            return ReturnStatement2;
          }();
          exports$12.ReturnStatement = ReturnStatement;
          var Script2 = /* @__PURE__ */ function() {
            function Script3(body) {
              this.type = syntax_1.Syntax.Program;
              this.body = body;
              this.sourceType = "script";
            }
            return Script3;
          }();
          exports$12.Script = Script2;
          var SequenceExpression = /* @__PURE__ */ function() {
            function SequenceExpression2(expressions) {
              this.type = syntax_1.Syntax.SequenceExpression;
              this.expressions = expressions;
            }
            return SequenceExpression2;
          }();
          exports$12.SequenceExpression = SequenceExpression;
          var SpreadElement = /* @__PURE__ */ function() {
            function SpreadElement2(argument) {
              this.type = syntax_1.Syntax.SpreadElement;
              this.argument = argument;
            }
            return SpreadElement2;
          }();
          exports$12.SpreadElement = SpreadElement;
          var StaticMemberExpression = /* @__PURE__ */ function() {
            function StaticMemberExpression2(object2, property) {
              this.type = syntax_1.Syntax.MemberExpression;
              this.computed = false;
              this.object = object2;
              this.property = property;
            }
            return StaticMemberExpression2;
          }();
          exports$12.StaticMemberExpression = StaticMemberExpression;
          var Super = /* @__PURE__ */ function() {
            function Super2() {
              this.type = syntax_1.Syntax.Super;
            }
            return Super2;
          }();
          exports$12.Super = Super;
          var SwitchCase = /* @__PURE__ */ function() {
            function SwitchCase2(test2, consequent) {
              this.type = syntax_1.Syntax.SwitchCase;
              this.test = test2;
              this.consequent = consequent;
            }
            return SwitchCase2;
          }();
          exports$12.SwitchCase = SwitchCase;
          var SwitchStatement = /* @__PURE__ */ function() {
            function SwitchStatement2(discriminant, cases) {
              this.type = syntax_1.Syntax.SwitchStatement;
              this.discriminant = discriminant;
              this.cases = cases;
            }
            return SwitchStatement2;
          }();
          exports$12.SwitchStatement = SwitchStatement;
          var TaggedTemplateExpression = /* @__PURE__ */ function() {
            function TaggedTemplateExpression2(tag2, quasi) {
              this.type = syntax_1.Syntax.TaggedTemplateExpression;
              this.tag = tag2;
              this.quasi = quasi;
            }
            return TaggedTemplateExpression2;
          }();
          exports$12.TaggedTemplateExpression = TaggedTemplateExpression;
          var TemplateElement = /* @__PURE__ */ function() {
            function TemplateElement2(value, tail) {
              this.type = syntax_1.Syntax.TemplateElement;
              this.value = value;
              this.tail = tail;
            }
            return TemplateElement2;
          }();
          exports$12.TemplateElement = TemplateElement;
          var TemplateLiteral = /* @__PURE__ */ function() {
            function TemplateLiteral2(quasis, expressions) {
              this.type = syntax_1.Syntax.TemplateLiteral;
              this.quasis = quasis;
              this.expressions = expressions;
            }
            return TemplateLiteral2;
          }();
          exports$12.TemplateLiteral = TemplateLiteral;
          var ThisExpression = /* @__PURE__ */ function() {
            function ThisExpression2() {
              this.type = syntax_1.Syntax.ThisExpression;
            }
            return ThisExpression2;
          }();
          exports$12.ThisExpression = ThisExpression;
          var ThrowStatement = /* @__PURE__ */ function() {
            function ThrowStatement2(argument) {
              this.type = syntax_1.Syntax.ThrowStatement;
              this.argument = argument;
            }
            return ThrowStatement2;
          }();
          exports$12.ThrowStatement = ThrowStatement;
          var TryStatement = /* @__PURE__ */ function() {
            function TryStatement2(block2, handler, finalizer) {
              this.type = syntax_1.Syntax.TryStatement;
              this.block = block2;
              this.handler = handler;
              this.finalizer = finalizer;
            }
            return TryStatement2;
          }();
          exports$12.TryStatement = TryStatement;
          var UnaryExpression = /* @__PURE__ */ function() {
            function UnaryExpression2(operator, argument) {
              this.type = syntax_1.Syntax.UnaryExpression;
              this.operator = operator;
              this.argument = argument;
              this.prefix = true;
            }
            return UnaryExpression2;
          }();
          exports$12.UnaryExpression = UnaryExpression;
          var UpdateExpression = /* @__PURE__ */ function() {
            function UpdateExpression2(operator, argument, prefix) {
              this.type = syntax_1.Syntax.UpdateExpression;
              this.operator = operator;
              this.argument = argument;
              this.prefix = prefix;
            }
            return UpdateExpression2;
          }();
          exports$12.UpdateExpression = UpdateExpression;
          var VariableDeclaration = /* @__PURE__ */ function() {
            function VariableDeclaration2(declarations, kind) {
              this.type = syntax_1.Syntax.VariableDeclaration;
              this.declarations = declarations;
              this.kind = kind;
            }
            return VariableDeclaration2;
          }();
          exports$12.VariableDeclaration = VariableDeclaration;
          var VariableDeclarator = /* @__PURE__ */ function() {
            function VariableDeclarator2(id2, init2) {
              this.type = syntax_1.Syntax.VariableDeclarator;
              this.id = id2;
              this.init = init2;
            }
            return VariableDeclarator2;
          }();
          exports$12.VariableDeclarator = VariableDeclarator;
          var WhileStatement = /* @__PURE__ */ function() {
            function WhileStatement2(test2, body) {
              this.type = syntax_1.Syntax.WhileStatement;
              this.test = test2;
              this.body = body;
            }
            return WhileStatement2;
          }();
          exports$12.WhileStatement = WhileStatement;
          var WithStatement = /* @__PURE__ */ function() {
            function WithStatement2(object2, body) {
              this.type = syntax_1.Syntax.WithStatement;
              this.object = object2;
              this.body = body;
            }
            return WithStatement2;
          }();
          exports$12.WithStatement = WithStatement;
          var YieldExpression = /* @__PURE__ */ function() {
            function YieldExpression2(argument, delegate) {
              this.type = syntax_1.Syntax.YieldExpression;
              this.argument = argument;
              this.delegate = delegate;
            }
            return YieldExpression2;
          }();
          exports$12.YieldExpression = YieldExpression;
        },
        function(module3, exports$12, __webpack_require__) {
          Object.defineProperty(exports$12, "__esModule", { value: true });
          var assert_1 = __webpack_require__(9);
          var error_handler_1 = __webpack_require__(10);
          var messages_1 = __webpack_require__(11);
          var Node4 = __webpack_require__(7);
          var scanner_1 = __webpack_require__(12);
          var syntax_1 = __webpack_require__(2);
          var token_1 = __webpack_require__(13);
          var ArrowParameterPlaceHolder = "ArrowParameterPlaceHolder";
          var Parser3 = function() {
            function Parser4(code2, options2, delegate) {
              if (options2 === void 0) {
                options2 = {};
              }
              this.config = {
                range: typeof options2.range === "boolean" && options2.range,
                loc: typeof options2.loc === "boolean" && options2.loc,
                source: null,
                tokens: typeof options2.tokens === "boolean" && options2.tokens,
                comment: typeof options2.comment === "boolean" && options2.comment,
                tolerant: typeof options2.tolerant === "boolean" && options2.tolerant
              };
              if (this.config.loc && options2.source && options2.source !== null) {
                this.config.source = String(options2.source);
              }
              this.delegate = delegate;
              this.errorHandler = new error_handler_1.ErrorHandler();
              this.errorHandler.tolerant = this.config.tolerant;
              this.scanner = new scanner_1.Scanner(code2, this.errorHandler);
              this.scanner.trackComment = this.config.comment;
              this.operatorPrecedence = {
                ")": 0,
                ";": 0,
                ",": 0,
                "=": 0,
                "]": 0,
                "||": 1,
                "&&": 2,
                "|": 3,
                "^": 4,
                "&": 5,
                "==": 6,
                "!=": 6,
                "===": 6,
                "!==": 6,
                "<": 7,
                ">": 7,
                "<=": 7,
                ">=": 7,
                "<<": 8,
                ">>": 8,
                ">>>": 8,
                "+": 9,
                "-": 9,
                "*": 11,
                "/": 11,
                "%": 11
              };
              this.lookahead = {
                type: 2,
                value: "",
                lineNumber: this.scanner.lineNumber,
                lineStart: 0,
                start: 0,
                end: 0
              };
              this.hasLineTerminator = false;
              this.context = {
                isModule: false,
                await: false,
                allowIn: true,
                allowStrictDirective: true,
                allowYield: true,
                firstCoverInitializedNameError: null,
                isAssignmentTarget: false,
                isBindingElement: false,
                inFunctionBody: false,
                inIteration: false,
                inSwitch: false,
                labelSet: {},
                strict: false
              };
              this.tokens = [];
              this.startMarker = {
                index: 0,
                line: this.scanner.lineNumber,
                column: 0
              };
              this.lastMarker = {
                index: 0,
                line: this.scanner.lineNumber,
                column: 0
              };
              this.nextToken();
              this.lastMarker = {
                index: this.scanner.index,
                line: this.scanner.lineNumber,
                column: this.scanner.index - this.scanner.lineStart
              };
            }
            Parser4.prototype.throwError = function(messageFormat) {
              var args2 = Array.prototype.slice.call(arguments, 1);
              var msg = messageFormat.replace(/%(\d)/g, function(whole, idx) {
                assert_1.assert(idx < args2.length, "Message reference must be in range");
                return args2[idx];
              });
              var index2 = this.lastMarker.index;
              var line = this.lastMarker.line;
              var column = this.lastMarker.column + 1;
              throw this.errorHandler.createError(index2, line, column, msg);
            };
            Parser4.prototype.tolerateError = function(messageFormat) {
              var args2 = Array.prototype.slice.call(arguments, 1);
              var msg = messageFormat.replace(/%(\d)/g, function(whole, idx) {
                assert_1.assert(idx < args2.length, "Message reference must be in range");
                return args2[idx];
              });
              var index2 = this.lastMarker.index;
              var line = this.scanner.lineNumber;
              var column = this.lastMarker.column + 1;
              this.errorHandler.tolerateError(index2, line, column, msg);
            };
            Parser4.prototype.unexpectedTokenError = function(token, message) {
              var msg = message || messages_1.Messages.UnexpectedToken;
              var value;
              if (token) {
                if (!message) {
                  msg = token.type === 2 ? messages_1.Messages.UnexpectedEOS : token.type === 3 ? messages_1.Messages.UnexpectedIdentifier : token.type === 6 ? messages_1.Messages.UnexpectedNumber : token.type === 8 ? messages_1.Messages.UnexpectedString : token.type === 10 ? messages_1.Messages.UnexpectedTemplate : messages_1.Messages.UnexpectedToken;
                  if (token.type === 4) {
                    if (this.scanner.isFutureReservedWord(token.value)) {
                      msg = messages_1.Messages.UnexpectedReserved;
                    } else if (this.context.strict && this.scanner.isStrictModeReservedWord(token.value)) {
                      msg = messages_1.Messages.StrictReservedWord;
                    }
                  }
                }
                value = token.value;
              } else {
                value = "ILLEGAL";
              }
              msg = msg.replace("%0", value);
              if (token && typeof token.lineNumber === "number") {
                var index2 = token.start;
                var line = token.lineNumber;
                var lastMarkerLineStart = this.lastMarker.index - this.lastMarker.column;
                var column = token.start - lastMarkerLineStart + 1;
                return this.errorHandler.createError(index2, line, column, msg);
              } else {
                var index2 = this.lastMarker.index;
                var line = this.lastMarker.line;
                var column = this.lastMarker.column + 1;
                return this.errorHandler.createError(index2, line, column, msg);
              }
            };
            Parser4.prototype.throwUnexpectedToken = function(token, message) {
              throw this.unexpectedTokenError(token, message);
            };
            Parser4.prototype.tolerateUnexpectedToken = function(token, message) {
              this.errorHandler.tolerate(this.unexpectedTokenError(token, message));
            };
            Parser4.prototype.collectComments = function() {
              if (!this.config.comment) {
                this.scanner.scanComments();
              } else {
                var comments = this.scanner.scanComments();
                if (comments.length > 0 && this.delegate) {
                  for (var i = 0; i < comments.length; ++i) {
                    var e = comments[i];
                    var node2 = void 0;
                    node2 = {
                      type: e.multiLine ? "BlockComment" : "LineComment",
                      value: this.scanner.source.slice(e.slice[0], e.slice[1])
                    };
                    if (this.config.range) {
                      node2.range = e.range;
                    }
                    if (this.config.loc) {
                      node2.loc = e.loc;
                    }
                    var metadata2 = {
                      start: {
                        line: e.loc.start.line,
                        column: e.loc.start.column,
                        offset: e.range[0]
                      },
                      end: {
                        line: e.loc.end.line,
                        column: e.loc.end.column,
                        offset: e.range[1]
                      }
                    };
                    this.delegate(node2, metadata2);
                  }
                }
              }
            };
            Parser4.prototype.getTokenRaw = function(token) {
              return this.scanner.source.slice(token.start, token.end);
            };
            Parser4.prototype.convertToken = function(token) {
              var t = {
                type: token_1.TokenName[token.type],
                value: this.getTokenRaw(token)
              };
              if (this.config.range) {
                t.range = [token.start, token.end];
              }
              if (this.config.loc) {
                t.loc = {
                  start: {
                    line: this.startMarker.line,
                    column: this.startMarker.column
                  },
                  end: {
                    line: this.scanner.lineNumber,
                    column: this.scanner.index - this.scanner.lineStart
                  }
                };
              }
              if (token.type === 9) {
                var pattern2 = token.pattern;
                var flags = token.flags;
                t.regex = { pattern: pattern2, flags };
              }
              return t;
            };
            Parser4.prototype.nextToken = function() {
              var token = this.lookahead;
              this.lastMarker.index = this.scanner.index;
              this.lastMarker.line = this.scanner.lineNumber;
              this.lastMarker.column = this.scanner.index - this.scanner.lineStart;
              this.collectComments();
              if (this.scanner.index !== this.startMarker.index) {
                this.startMarker.index = this.scanner.index;
                this.startMarker.line = this.scanner.lineNumber;
                this.startMarker.column = this.scanner.index - this.scanner.lineStart;
              }
              var next = this.scanner.lex();
              this.hasLineTerminator = token.lineNumber !== next.lineNumber;
              if (next && this.context.strict && next.type === 3) {
                if (this.scanner.isStrictModeReservedWord(next.value)) {
                  next.type = 4;
                }
              }
              this.lookahead = next;
              if (this.config.tokens && next.type !== 2) {
                this.tokens.push(this.convertToken(next));
              }
              return token;
            };
            Parser4.prototype.nextRegexToken = function() {
              this.collectComments();
              var token = this.scanner.scanRegExp();
              if (this.config.tokens) {
                this.tokens.pop();
                this.tokens.push(this.convertToken(token));
              }
              this.lookahead = token;
              this.nextToken();
              return token;
            };
            Parser4.prototype.createNode = function() {
              return {
                index: this.startMarker.index,
                line: this.startMarker.line,
                column: this.startMarker.column
              };
            };
            Parser4.prototype.startNode = function(token, lastLineStart) {
              if (lastLineStart === void 0) {
                lastLineStart = 0;
              }
              var column = token.start - token.lineStart;
              var line = token.lineNumber;
              if (column < 0) {
                column += lastLineStart;
                line--;
              }
              return {
                index: token.start,
                line,
                column
              };
            };
            Parser4.prototype.finalize = function(marker, node2) {
              if (this.config.range) {
                node2.range = [marker.index, this.lastMarker.index];
              }
              if (this.config.loc) {
                node2.loc = {
                  start: {
                    line: marker.line,
                    column: marker.column
                  },
                  end: {
                    line: this.lastMarker.line,
                    column: this.lastMarker.column
                  }
                };
                if (this.config.source) {
                  node2.loc.source = this.config.source;
                }
              }
              if (this.delegate) {
                var metadata2 = {
                  start: {
                    line: marker.line,
                    column: marker.column,
                    offset: marker.index
                  },
                  end: {
                    line: this.lastMarker.line,
                    column: this.lastMarker.column,
                    offset: this.lastMarker.index
                  }
                };
                this.delegate(node2, metadata2);
              }
              return node2;
            };
            Parser4.prototype.expect = function(value) {
              var token = this.nextToken();
              if (token.type !== 7 || token.value !== value) {
                this.throwUnexpectedToken(token);
              }
            };
            Parser4.prototype.expectCommaSeparator = function() {
              if (this.config.tolerant) {
                var token = this.lookahead;
                if (token.type === 7 && token.value === ",") {
                  this.nextToken();
                } else if (token.type === 7 && token.value === ";") {
                  this.nextToken();
                  this.tolerateUnexpectedToken(token);
                } else {
                  this.tolerateUnexpectedToken(token, messages_1.Messages.UnexpectedToken);
                }
              } else {
                this.expect(",");
              }
            };
            Parser4.prototype.expectKeyword = function(keyword2) {
              var token = this.nextToken();
              if (token.type !== 4 || token.value !== keyword2) {
                this.throwUnexpectedToken(token);
              }
            };
            Parser4.prototype.match = function(value) {
              return this.lookahead.type === 7 && this.lookahead.value === value;
            };
            Parser4.prototype.matchKeyword = function(keyword2) {
              return this.lookahead.type === 4 && this.lookahead.value === keyword2;
            };
            Parser4.prototype.matchContextualKeyword = function(keyword2) {
              return this.lookahead.type === 3 && this.lookahead.value === keyword2;
            };
            Parser4.prototype.matchAssign = function() {
              if (this.lookahead.type !== 7) {
                return false;
              }
              var op = this.lookahead.value;
              return op === "=" || op === "*=" || op === "**=" || op === "/=" || op === "%=" || op === "+=" || op === "-=" || op === "<<=" || op === ">>=" || op === ">>>=" || op === "&=" || op === "^=" || op === "|=";
            };
            Parser4.prototype.isolateCoverGrammar = function(parseFunction) {
              var previousIsBindingElement = this.context.isBindingElement;
              var previousIsAssignmentTarget = this.context.isAssignmentTarget;
              var previousFirstCoverInitializedNameError = this.context.firstCoverInitializedNameError;
              this.context.isBindingElement = true;
              this.context.isAssignmentTarget = true;
              this.context.firstCoverInitializedNameError = null;
              var result = parseFunction.call(this);
              if (this.context.firstCoverInitializedNameError !== null) {
                this.throwUnexpectedToken(this.context.firstCoverInitializedNameError);
              }
              this.context.isBindingElement = previousIsBindingElement;
              this.context.isAssignmentTarget = previousIsAssignmentTarget;
              this.context.firstCoverInitializedNameError = previousFirstCoverInitializedNameError;
              return result;
            };
            Parser4.prototype.inheritCoverGrammar = function(parseFunction) {
              var previousIsBindingElement = this.context.isBindingElement;
              var previousIsAssignmentTarget = this.context.isAssignmentTarget;
              var previousFirstCoverInitializedNameError = this.context.firstCoverInitializedNameError;
              this.context.isBindingElement = true;
              this.context.isAssignmentTarget = true;
              this.context.firstCoverInitializedNameError = null;
              var result = parseFunction.call(this);
              this.context.isBindingElement = this.context.isBindingElement && previousIsBindingElement;
              this.context.isAssignmentTarget = this.context.isAssignmentTarget && previousIsAssignmentTarget;
              this.context.firstCoverInitializedNameError = previousFirstCoverInitializedNameError || this.context.firstCoverInitializedNameError;
              return result;
            };
            Parser4.prototype.consumeSemicolon = function() {
              if (this.match(";")) {
                this.nextToken();
              } else if (!this.hasLineTerminator) {
                if (this.lookahead.type !== 2 && !this.match("}")) {
                  this.throwUnexpectedToken(this.lookahead);
                }
                this.lastMarker.index = this.startMarker.index;
                this.lastMarker.line = this.startMarker.line;
                this.lastMarker.column = this.startMarker.column;
              }
            };
            Parser4.prototype.parsePrimaryExpression = function() {
              var node2 = this.createNode();
              var expr;
              var token, raw;
              switch (this.lookahead.type) {
                case 3:
                  if ((this.context.isModule || this.context.await) && this.lookahead.value === "await") {
                    this.tolerateUnexpectedToken(this.lookahead);
                  }
                  expr = this.matchAsyncFunction() ? this.parseFunctionExpression() : this.finalize(node2, new Node4.Identifier(this.nextToken().value));
                  break;
                case 6:
                case 8:
                  if (this.context.strict && this.lookahead.octal) {
                    this.tolerateUnexpectedToken(this.lookahead, messages_1.Messages.StrictOctalLiteral);
                  }
                  this.context.isAssignmentTarget = false;
                  this.context.isBindingElement = false;
                  token = this.nextToken();
                  raw = this.getTokenRaw(token);
                  expr = this.finalize(node2, new Node4.Literal(token.value, raw));
                  break;
                case 1:
                  this.context.isAssignmentTarget = false;
                  this.context.isBindingElement = false;
                  token = this.nextToken();
                  raw = this.getTokenRaw(token);
                  expr = this.finalize(node2, new Node4.Literal(token.value === "true", raw));
                  break;
                case 5:
                  this.context.isAssignmentTarget = false;
                  this.context.isBindingElement = false;
                  token = this.nextToken();
                  raw = this.getTokenRaw(token);
                  expr = this.finalize(node2, new Node4.Literal(null, raw));
                  break;
                case 10:
                  expr = this.parseTemplateLiteral();
                  break;
                case 7:
                  switch (this.lookahead.value) {
                    case "(":
                      this.context.isBindingElement = false;
                      expr = this.inheritCoverGrammar(this.parseGroupExpression);
                      break;
                    case "[":
                      expr = this.inheritCoverGrammar(this.parseArrayInitializer);
                      break;
                    case "{":
                      expr = this.inheritCoverGrammar(this.parseObjectInitializer);
                      break;
                    case "/":
                    case "/=":
                      this.context.isAssignmentTarget = false;
                      this.context.isBindingElement = false;
                      this.scanner.index = this.startMarker.index;
                      token = this.nextRegexToken();
                      raw = this.getTokenRaw(token);
                      expr = this.finalize(node2, new Node4.RegexLiteral(token.regex, raw, token.pattern, token.flags));
                      break;
                    default:
                      expr = this.throwUnexpectedToken(this.nextToken());
                  }
                  break;
                case 4:
                  if (!this.context.strict && this.context.allowYield && this.matchKeyword("yield")) {
                    expr = this.parseIdentifierName();
                  } else if (!this.context.strict && this.matchKeyword("let")) {
                    expr = this.finalize(node2, new Node4.Identifier(this.nextToken().value));
                  } else {
                    this.context.isAssignmentTarget = false;
                    this.context.isBindingElement = false;
                    if (this.matchKeyword("function")) {
                      expr = this.parseFunctionExpression();
                    } else if (this.matchKeyword("this")) {
                      this.nextToken();
                      expr = this.finalize(node2, new Node4.ThisExpression());
                    } else if (this.matchKeyword("class")) {
                      expr = this.parseClassExpression();
                    } else {
                      expr = this.throwUnexpectedToken(this.nextToken());
                    }
                  }
                  break;
                default:
                  expr = this.throwUnexpectedToken(this.nextToken());
              }
              return expr;
            };
            Parser4.prototype.parseSpreadElement = function() {
              var node2 = this.createNode();
              this.expect("...");
              var arg = this.inheritCoverGrammar(this.parseAssignmentExpression);
              return this.finalize(node2, new Node4.SpreadElement(arg));
            };
            Parser4.prototype.parseArrayInitializer = function() {
              var node2 = this.createNode();
              var elements = [];
              this.expect("[");
              while (!this.match("]")) {
                if (this.match(",")) {
                  this.nextToken();
                  elements.push(null);
                } else if (this.match("...")) {
                  var element = this.parseSpreadElement();
                  if (!this.match("]")) {
                    this.context.isAssignmentTarget = false;
                    this.context.isBindingElement = false;
                    this.expect(",");
                  }
                  elements.push(element);
                } else {
                  elements.push(this.inheritCoverGrammar(this.parseAssignmentExpression));
                  if (!this.match("]")) {
                    this.expect(",");
                  }
                }
              }
              this.expect("]");
              return this.finalize(node2, new Node4.ArrayExpression(elements));
            };
            Parser4.prototype.parsePropertyMethod = function(params) {
              this.context.isAssignmentTarget = false;
              this.context.isBindingElement = false;
              var previousStrict = this.context.strict;
              var previousAllowStrictDirective = this.context.allowStrictDirective;
              this.context.allowStrictDirective = params.simple;
              var body = this.isolateCoverGrammar(this.parseFunctionSourceElements);
              if (this.context.strict && params.firstRestricted) {
                this.tolerateUnexpectedToken(params.firstRestricted, params.message);
              }
              if (this.context.strict && params.stricted) {
                this.tolerateUnexpectedToken(params.stricted, params.message);
              }
              this.context.strict = previousStrict;
              this.context.allowStrictDirective = previousAllowStrictDirective;
              return body;
            };
            Parser4.prototype.parsePropertyMethodFunction = function() {
              var isGenerator = false;
              var node2 = this.createNode();
              var previousAllowYield = this.context.allowYield;
              this.context.allowYield = true;
              var params = this.parseFormalParameters();
              var method = this.parsePropertyMethod(params);
              this.context.allowYield = previousAllowYield;
              return this.finalize(node2, new Node4.FunctionExpression(null, params.params, method, isGenerator));
            };
            Parser4.prototype.parsePropertyMethodAsyncFunction = function() {
              var node2 = this.createNode();
              var previousAllowYield = this.context.allowYield;
              var previousAwait = this.context.await;
              this.context.allowYield = false;
              this.context.await = true;
              var params = this.parseFormalParameters();
              var method = this.parsePropertyMethod(params);
              this.context.allowYield = previousAllowYield;
              this.context.await = previousAwait;
              return this.finalize(node2, new Node4.AsyncFunctionExpression(null, params.params, method));
            };
            Parser4.prototype.parseObjectPropertyKey = function() {
              var node2 = this.createNode();
              var token = this.nextToken();
              var key;
              switch (token.type) {
                case 8:
                case 6:
                  if (this.context.strict && token.octal) {
                    this.tolerateUnexpectedToken(token, messages_1.Messages.StrictOctalLiteral);
                  }
                  var raw = this.getTokenRaw(token);
                  key = this.finalize(node2, new Node4.Literal(token.value, raw));
                  break;
                case 3:
                case 1:
                case 5:
                case 4:
                  key = this.finalize(node2, new Node4.Identifier(token.value));
                  break;
                case 7:
                  if (token.value === "[") {
                    key = this.isolateCoverGrammar(this.parseAssignmentExpression);
                    this.expect("]");
                  } else {
                    key = this.throwUnexpectedToken(token);
                  }
                  break;
                default:
                  key = this.throwUnexpectedToken(token);
              }
              return key;
            };
            Parser4.prototype.isPropertyKey = function(key, value) {
              return key.type === syntax_1.Syntax.Identifier && key.name === value || key.type === syntax_1.Syntax.Literal && key.value === value;
            };
            Parser4.prototype.parseObjectProperty = function(hasProto) {
              var node2 = this.createNode();
              var token = this.lookahead;
              var kind;
              var key = null;
              var value = null;
              var computed = false;
              var method = false;
              var shorthand = false;
              var isAsync2 = false;
              if (token.type === 3) {
                var id2 = token.value;
                this.nextToken();
                computed = this.match("[");
                isAsync2 = !this.hasLineTerminator && id2 === "async" && !this.match(":") && !this.match("(") && !this.match("*") && !this.match(",");
                key = isAsync2 ? this.parseObjectPropertyKey() : this.finalize(node2, new Node4.Identifier(id2));
              } else if (this.match("*")) {
                this.nextToken();
              } else {
                computed = this.match("[");
                key = this.parseObjectPropertyKey();
              }
              var lookaheadPropertyKey = this.qualifiedPropertyName(this.lookahead);
              if (token.type === 3 && !isAsync2 && token.value === "get" && lookaheadPropertyKey) {
                kind = "get";
                computed = this.match("[");
                key = this.parseObjectPropertyKey();
                this.context.allowYield = false;
                value = this.parseGetterMethod();
              } else if (token.type === 3 && !isAsync2 && token.value === "set" && lookaheadPropertyKey) {
                kind = "set";
                computed = this.match("[");
                key = this.parseObjectPropertyKey();
                value = this.parseSetterMethod();
              } else if (token.type === 7 && token.value === "*" && lookaheadPropertyKey) {
                kind = "init";
                computed = this.match("[");
                key = this.parseObjectPropertyKey();
                value = this.parseGeneratorMethod();
                method = true;
              } else {
                if (!key) {
                  this.throwUnexpectedToken(this.lookahead);
                }
                kind = "init";
                if (this.match(":") && !isAsync2) {
                  if (!computed && this.isPropertyKey(key, "__proto__")) {
                    if (hasProto.value) {
                      this.tolerateError(messages_1.Messages.DuplicateProtoProperty);
                    }
                    hasProto.value = true;
                  }
                  this.nextToken();
                  value = this.inheritCoverGrammar(this.parseAssignmentExpression);
                } else if (this.match("(")) {
                  value = isAsync2 ? this.parsePropertyMethodAsyncFunction() : this.parsePropertyMethodFunction();
                  method = true;
                } else if (token.type === 3) {
                  var id2 = this.finalize(node2, new Node4.Identifier(token.value));
                  if (this.match("=")) {
                    this.context.firstCoverInitializedNameError = this.lookahead;
                    this.nextToken();
                    shorthand = true;
                    var init2 = this.isolateCoverGrammar(this.parseAssignmentExpression);
                    value = this.finalize(node2, new Node4.AssignmentPattern(id2, init2));
                  } else {
                    shorthand = true;
                    value = id2;
                  }
                } else {
                  this.throwUnexpectedToken(this.nextToken());
                }
              }
              return this.finalize(node2, new Node4.Property(kind, key, computed, value, method, shorthand));
            };
            Parser4.prototype.parseObjectInitializer = function() {
              var node2 = this.createNode();
              this.expect("{");
              var properties2 = [];
              var hasProto = { value: false };
              while (!this.match("}")) {
                properties2.push(this.parseObjectProperty(hasProto));
                if (!this.match("}")) {
                  this.expectCommaSeparator();
                }
              }
              this.expect("}");
              return this.finalize(node2, new Node4.ObjectExpression(properties2));
            };
            Parser4.prototype.parseTemplateHead = function() {
              assert_1.assert(this.lookahead.head, "Template literal must start with a template head");
              var node2 = this.createNode();
              var token = this.nextToken();
              var raw = token.value;
              var cooked = token.cooked;
              return this.finalize(node2, new Node4.TemplateElement({ raw, cooked }, token.tail));
            };
            Parser4.prototype.parseTemplateElement = function() {
              if (this.lookahead.type !== 10) {
                this.throwUnexpectedToken();
              }
              var node2 = this.createNode();
              var token = this.nextToken();
              var raw = token.value;
              var cooked = token.cooked;
              return this.finalize(node2, new Node4.TemplateElement({ raw, cooked }, token.tail));
            };
            Parser4.prototype.parseTemplateLiteral = function() {
              var node2 = this.createNode();
              var expressions = [];
              var quasis = [];
              var quasi = this.parseTemplateHead();
              quasis.push(quasi);
              while (!quasi.tail) {
                expressions.push(this.parseExpression());
                quasi = this.parseTemplateElement();
                quasis.push(quasi);
              }
              return this.finalize(node2, new Node4.TemplateLiteral(quasis, expressions));
            };
            Parser4.prototype.reinterpretExpressionAsPattern = function(expr) {
              switch (expr.type) {
                case syntax_1.Syntax.Identifier:
                case syntax_1.Syntax.MemberExpression:
                case syntax_1.Syntax.RestElement:
                case syntax_1.Syntax.AssignmentPattern:
                  break;
                case syntax_1.Syntax.SpreadElement:
                  expr.type = syntax_1.Syntax.RestElement;
                  this.reinterpretExpressionAsPattern(expr.argument);
                  break;
                case syntax_1.Syntax.ArrayExpression:
                  expr.type = syntax_1.Syntax.ArrayPattern;
                  for (var i = 0; i < expr.elements.length; i++) {
                    if (expr.elements[i] !== null) {
                      this.reinterpretExpressionAsPattern(expr.elements[i]);
                    }
                  }
                  break;
                case syntax_1.Syntax.ObjectExpression:
                  expr.type = syntax_1.Syntax.ObjectPattern;
                  for (var i = 0; i < expr.properties.length; i++) {
                    this.reinterpretExpressionAsPattern(expr.properties[i].value);
                  }
                  break;
                case syntax_1.Syntax.AssignmentExpression:
                  expr.type = syntax_1.Syntax.AssignmentPattern;
                  delete expr.operator;
                  this.reinterpretExpressionAsPattern(expr.left);
                  break;
              }
            };
            Parser4.prototype.parseGroupExpression = function() {
              var expr;
              this.expect("(");
              if (this.match(")")) {
                this.nextToken();
                if (!this.match("=>")) {
                  this.expect("=>");
                }
                expr = {
                  type: ArrowParameterPlaceHolder,
                  params: [],
                  async: false
                };
              } else {
                var startToken = this.lookahead;
                var params = [];
                if (this.match("...")) {
                  expr = this.parseRestElement(params);
                  this.expect(")");
                  if (!this.match("=>")) {
                    this.expect("=>");
                  }
                  expr = {
                    type: ArrowParameterPlaceHolder,
                    params: [expr],
                    async: false
                  };
                } else {
                  var arrow = false;
                  this.context.isBindingElement = true;
                  expr = this.inheritCoverGrammar(this.parseAssignmentExpression);
                  if (this.match(",")) {
                    var expressions = [];
                    this.context.isAssignmentTarget = false;
                    expressions.push(expr);
                    while (this.lookahead.type !== 2) {
                      if (!this.match(",")) {
                        break;
                      }
                      this.nextToken();
                      if (this.match(")")) {
                        this.nextToken();
                        for (var i = 0; i < expressions.length; i++) {
                          this.reinterpretExpressionAsPattern(expressions[i]);
                        }
                        arrow = true;
                        expr = {
                          type: ArrowParameterPlaceHolder,
                          params: expressions,
                          async: false
                        };
                      } else if (this.match("...")) {
                        if (!this.context.isBindingElement) {
                          this.throwUnexpectedToken(this.lookahead);
                        }
                        expressions.push(this.parseRestElement(params));
                        this.expect(")");
                        if (!this.match("=>")) {
                          this.expect("=>");
                        }
                        this.context.isBindingElement = false;
                        for (var i = 0; i < expressions.length; i++) {
                          this.reinterpretExpressionAsPattern(expressions[i]);
                        }
                        arrow = true;
                        expr = {
                          type: ArrowParameterPlaceHolder,
                          params: expressions,
                          async: false
                        };
                      } else {
                        expressions.push(this.inheritCoverGrammar(this.parseAssignmentExpression));
                      }
                      if (arrow) {
                        break;
                      }
                    }
                    if (!arrow) {
                      expr = this.finalize(this.startNode(startToken), new Node4.SequenceExpression(expressions));
                    }
                  }
                  if (!arrow) {
                    this.expect(")");
                    if (this.match("=>")) {
                      if (expr.type === syntax_1.Syntax.Identifier && expr.name === "yield") {
                        arrow = true;
                        expr = {
                          type: ArrowParameterPlaceHolder,
                          params: [expr],
                          async: false
                        };
                      }
                      if (!arrow) {
                        if (!this.context.isBindingElement) {
                          this.throwUnexpectedToken(this.lookahead);
                        }
                        if (expr.type === syntax_1.Syntax.SequenceExpression) {
                          for (var i = 0; i < expr.expressions.length; i++) {
                            this.reinterpretExpressionAsPattern(expr.expressions[i]);
                          }
                        } else {
                          this.reinterpretExpressionAsPattern(expr);
                        }
                        var parameters = expr.type === syntax_1.Syntax.SequenceExpression ? expr.expressions : [expr];
                        expr = {
                          type: ArrowParameterPlaceHolder,
                          params: parameters,
                          async: false
                        };
                      }
                    }
                    this.context.isBindingElement = false;
                  }
                }
              }
              return expr;
            };
            Parser4.prototype.parseArguments = function() {
              this.expect("(");
              var args2 = [];
              if (!this.match(")")) {
                while (true) {
                  var expr = this.match("...") ? this.parseSpreadElement() : this.isolateCoverGrammar(this.parseAssignmentExpression);
                  args2.push(expr);
                  if (this.match(")")) {
                    break;
                  }
                  this.expectCommaSeparator();
                  if (this.match(")")) {
                    break;
                  }
                }
              }
              this.expect(")");
              return args2;
            };
            Parser4.prototype.isIdentifierName = function(token) {
              return token.type === 3 || token.type === 4 || token.type === 1 || token.type === 5;
            };
            Parser4.prototype.parseIdentifierName = function() {
              var node2 = this.createNode();
              var token = this.nextToken();
              if (!this.isIdentifierName(token)) {
                this.throwUnexpectedToken(token);
              }
              return this.finalize(node2, new Node4.Identifier(token.value));
            };
            Parser4.prototype.parseNewExpression = function() {
              var node2 = this.createNode();
              var id2 = this.parseIdentifierName();
              assert_1.assert(id2.name === "new", "New expression must start with `new`");
              var expr;
              if (this.match(".")) {
                this.nextToken();
                if (this.lookahead.type === 3 && this.context.inFunctionBody && this.lookahead.value === "target") {
                  var property = this.parseIdentifierName();
                  expr = new Node4.MetaProperty(id2, property);
                } else {
                  this.throwUnexpectedToken(this.lookahead);
                }
              } else {
                var callee = this.isolateCoverGrammar(this.parseLeftHandSideExpression);
                var args2 = this.match("(") ? this.parseArguments() : [];
                expr = new Node4.NewExpression(callee, args2);
                this.context.isAssignmentTarget = false;
                this.context.isBindingElement = false;
              }
              return this.finalize(node2, expr);
            };
            Parser4.prototype.parseAsyncArgument = function() {
              var arg = this.parseAssignmentExpression();
              this.context.firstCoverInitializedNameError = null;
              return arg;
            };
            Parser4.prototype.parseAsyncArguments = function() {
              this.expect("(");
              var args2 = [];
              if (!this.match(")")) {
                while (true) {
                  var expr = this.match("...") ? this.parseSpreadElement() : this.isolateCoverGrammar(this.parseAsyncArgument);
                  args2.push(expr);
                  if (this.match(")")) {
                    break;
                  }
                  this.expectCommaSeparator();
                  if (this.match(")")) {
                    break;
                  }
                }
              }
              this.expect(")");
              return args2;
            };
            Parser4.prototype.parseLeftHandSideExpressionAllowCall = function() {
              var startToken = this.lookahead;
              var maybeAsync = this.matchContextualKeyword("async");
              var previousAllowIn = this.context.allowIn;
              this.context.allowIn = true;
              var expr;
              if (this.matchKeyword("super") && this.context.inFunctionBody) {
                expr = this.createNode();
                this.nextToken();
                expr = this.finalize(expr, new Node4.Super());
                if (!this.match("(") && !this.match(".") && !this.match("[")) {
                  this.throwUnexpectedToken(this.lookahead);
                }
              } else {
                expr = this.inheritCoverGrammar(this.matchKeyword("new") ? this.parseNewExpression : this.parsePrimaryExpression);
              }
              while (true) {
                if (this.match(".")) {
                  this.context.isBindingElement = false;
                  this.context.isAssignmentTarget = true;
                  this.expect(".");
                  var property = this.parseIdentifierName();
                  expr = this.finalize(this.startNode(startToken), new Node4.StaticMemberExpression(expr, property));
                } else if (this.match("(")) {
                  var asyncArrow = maybeAsync && startToken.lineNumber === this.lookahead.lineNumber;
                  this.context.isBindingElement = false;
                  this.context.isAssignmentTarget = false;
                  var args2 = asyncArrow ? this.parseAsyncArguments() : this.parseArguments();
                  expr = this.finalize(this.startNode(startToken), new Node4.CallExpression(expr, args2));
                  if (asyncArrow && this.match("=>")) {
                    for (var i = 0; i < args2.length; ++i) {
                      this.reinterpretExpressionAsPattern(args2[i]);
                    }
                    expr = {
                      type: ArrowParameterPlaceHolder,
                      params: args2,
                      async: true
                    };
                  }
                } else if (this.match("[")) {
                  this.context.isBindingElement = false;
                  this.context.isAssignmentTarget = true;
                  this.expect("[");
                  var property = this.isolateCoverGrammar(this.parseExpression);
                  this.expect("]");
                  expr = this.finalize(this.startNode(startToken), new Node4.ComputedMemberExpression(expr, property));
                } else if (this.lookahead.type === 10 && this.lookahead.head) {
                  var quasi = this.parseTemplateLiteral();
                  expr = this.finalize(this.startNode(startToken), new Node4.TaggedTemplateExpression(expr, quasi));
                } else {
                  break;
                }
              }
              this.context.allowIn = previousAllowIn;
              return expr;
            };
            Parser4.prototype.parseSuper = function() {
              var node2 = this.createNode();
              this.expectKeyword("super");
              if (!this.match("[") && !this.match(".")) {
                this.throwUnexpectedToken(this.lookahead);
              }
              return this.finalize(node2, new Node4.Super());
            };
            Parser4.prototype.parseLeftHandSideExpression = function() {
              assert_1.assert(this.context.allowIn, "callee of new expression always allow in keyword.");
              var node2 = this.startNode(this.lookahead);
              var expr = this.matchKeyword("super") && this.context.inFunctionBody ? this.parseSuper() : this.inheritCoverGrammar(this.matchKeyword("new") ? this.parseNewExpression : this.parsePrimaryExpression);
              while (true) {
                if (this.match("[")) {
                  this.context.isBindingElement = false;
                  this.context.isAssignmentTarget = true;
                  this.expect("[");
                  var property = this.isolateCoverGrammar(this.parseExpression);
                  this.expect("]");
                  expr = this.finalize(node2, new Node4.ComputedMemberExpression(expr, property));
                } else if (this.match(".")) {
                  this.context.isBindingElement = false;
                  this.context.isAssignmentTarget = true;
                  this.expect(".");
                  var property = this.parseIdentifierName();
                  expr = this.finalize(node2, new Node4.StaticMemberExpression(expr, property));
                } else if (this.lookahead.type === 10 && this.lookahead.head) {
                  var quasi = this.parseTemplateLiteral();
                  expr = this.finalize(node2, new Node4.TaggedTemplateExpression(expr, quasi));
                } else {
                  break;
                }
              }
              return expr;
            };
            Parser4.prototype.parseUpdateExpression = function() {
              var expr;
              var startToken = this.lookahead;
              if (this.match("++") || this.match("--")) {
                var node2 = this.startNode(startToken);
                var token = this.nextToken();
                expr = this.inheritCoverGrammar(this.parseUnaryExpression);
                if (this.context.strict && expr.type === syntax_1.Syntax.Identifier && this.scanner.isRestrictedWord(expr.name)) {
                  this.tolerateError(messages_1.Messages.StrictLHSPrefix);
                }
                if (!this.context.isAssignmentTarget) {
                  this.tolerateError(messages_1.Messages.InvalidLHSInAssignment);
                }
                var prefix = true;
                expr = this.finalize(node2, new Node4.UpdateExpression(token.value, expr, prefix));
                this.context.isAssignmentTarget = false;
                this.context.isBindingElement = false;
              } else {
                expr = this.inheritCoverGrammar(this.parseLeftHandSideExpressionAllowCall);
                if (!this.hasLineTerminator && this.lookahead.type === 7) {
                  if (this.match("++") || this.match("--")) {
                    if (this.context.strict && expr.type === syntax_1.Syntax.Identifier && this.scanner.isRestrictedWord(expr.name)) {
                      this.tolerateError(messages_1.Messages.StrictLHSPostfix);
                    }
                    if (!this.context.isAssignmentTarget) {
                      this.tolerateError(messages_1.Messages.InvalidLHSInAssignment);
                    }
                    this.context.isAssignmentTarget = false;
                    this.context.isBindingElement = false;
                    var operator = this.nextToken().value;
                    var prefix = false;
                    expr = this.finalize(this.startNode(startToken), new Node4.UpdateExpression(operator, expr, prefix));
                  }
                }
              }
              return expr;
            };
            Parser4.prototype.parseAwaitExpression = function() {
              var node2 = this.createNode();
              this.nextToken();
              var argument = this.parseUnaryExpression();
              return this.finalize(node2, new Node4.AwaitExpression(argument));
            };
            Parser4.prototype.parseUnaryExpression = function() {
              var expr;
              if (this.match("+") || this.match("-") || this.match("~") || this.match("!") || this.matchKeyword("delete") || this.matchKeyword("void") || this.matchKeyword("typeof")) {
                var node2 = this.startNode(this.lookahead);
                var token = this.nextToken();
                expr = this.inheritCoverGrammar(this.parseUnaryExpression);
                expr = this.finalize(node2, new Node4.UnaryExpression(token.value, expr));
                if (this.context.strict && expr.operator === "delete" && expr.argument.type === syntax_1.Syntax.Identifier) {
                  this.tolerateError(messages_1.Messages.StrictDelete);
                }
                this.context.isAssignmentTarget = false;
                this.context.isBindingElement = false;
              } else if (this.context.await && this.matchContextualKeyword("await")) {
                expr = this.parseAwaitExpression();
              } else {
                expr = this.parseUpdateExpression();
              }
              return expr;
            };
            Parser4.prototype.parseExponentiationExpression = function() {
              var startToken = this.lookahead;
              var expr = this.inheritCoverGrammar(this.parseUnaryExpression);
              if (expr.type !== syntax_1.Syntax.UnaryExpression && this.match("**")) {
                this.nextToken();
                this.context.isAssignmentTarget = false;
                this.context.isBindingElement = false;
                var left2 = expr;
                var right2 = this.isolateCoverGrammar(this.parseExponentiationExpression);
                expr = this.finalize(this.startNode(startToken), new Node4.BinaryExpression("**", left2, right2));
              }
              return expr;
            };
            Parser4.prototype.binaryPrecedence = function(token) {
              var op = token.value;
              var precedence;
              if (token.type === 7) {
                precedence = this.operatorPrecedence[op] || 0;
              } else if (token.type === 4) {
                precedence = op === "instanceof" || this.context.allowIn && op === "in" ? 7 : 0;
              } else {
                precedence = 0;
              }
              return precedence;
            };
            Parser4.prototype.parseBinaryExpression = function() {
              var startToken = this.lookahead;
              var expr = this.inheritCoverGrammar(this.parseExponentiationExpression);
              var token = this.lookahead;
              var prec = this.binaryPrecedence(token);
              if (prec > 0) {
                this.nextToken();
                this.context.isAssignmentTarget = false;
                this.context.isBindingElement = false;
                var markers = [startToken, this.lookahead];
                var left2 = expr;
                var right2 = this.isolateCoverGrammar(this.parseExponentiationExpression);
                var stack = [left2, token.value, right2];
                var precedences = [prec];
                while (true) {
                  prec = this.binaryPrecedence(this.lookahead);
                  if (prec <= 0) {
                    break;
                  }
                  while (stack.length > 2 && prec <= precedences[precedences.length - 1]) {
                    right2 = stack.pop();
                    var operator = stack.pop();
                    precedences.pop();
                    left2 = stack.pop();
                    markers.pop();
                    var node2 = this.startNode(markers[markers.length - 1]);
                    stack.push(this.finalize(node2, new Node4.BinaryExpression(operator, left2, right2)));
                  }
                  stack.push(this.nextToken().value);
                  precedences.push(prec);
                  markers.push(this.lookahead);
                  stack.push(this.isolateCoverGrammar(this.parseExponentiationExpression));
                }
                var i = stack.length - 1;
                expr = stack[i];
                var lastMarker = markers.pop();
                while (i > 1) {
                  var marker = markers.pop();
                  var lastLineStart = lastMarker && lastMarker.lineStart;
                  var node2 = this.startNode(marker, lastLineStart);
                  var operator = stack[i - 1];
                  expr = this.finalize(node2, new Node4.BinaryExpression(operator, stack[i - 2], expr));
                  i -= 2;
                  lastMarker = marker;
                }
              }
              return expr;
            };
            Parser4.prototype.parseConditionalExpression = function() {
              var startToken = this.lookahead;
              var expr = this.inheritCoverGrammar(this.parseBinaryExpression);
              if (this.match("?")) {
                this.nextToken();
                var previousAllowIn = this.context.allowIn;
                this.context.allowIn = true;
                var consequent = this.isolateCoverGrammar(this.parseAssignmentExpression);
                this.context.allowIn = previousAllowIn;
                this.expect(":");
                var alternate = this.isolateCoverGrammar(this.parseAssignmentExpression);
                expr = this.finalize(this.startNode(startToken), new Node4.ConditionalExpression(expr, consequent, alternate));
                this.context.isAssignmentTarget = false;
                this.context.isBindingElement = false;
              }
              return expr;
            };
            Parser4.prototype.checkPatternParam = function(options2, param) {
              switch (param.type) {
                case syntax_1.Syntax.Identifier:
                  this.validateParam(options2, param, param.name);
                  break;
                case syntax_1.Syntax.RestElement:
                  this.checkPatternParam(options2, param.argument);
                  break;
                case syntax_1.Syntax.AssignmentPattern:
                  this.checkPatternParam(options2, param.left);
                  break;
                case syntax_1.Syntax.ArrayPattern:
                  for (var i = 0; i < param.elements.length; i++) {
                    if (param.elements[i] !== null) {
                      this.checkPatternParam(options2, param.elements[i]);
                    }
                  }
                  break;
                case syntax_1.Syntax.ObjectPattern:
                  for (var i = 0; i < param.properties.length; i++) {
                    this.checkPatternParam(options2, param.properties[i].value);
                  }
                  break;
              }
              options2.simple = options2.simple && param instanceof Node4.Identifier;
            };
            Parser4.prototype.reinterpretAsCoverFormalsList = function(expr) {
              var params = [expr];
              var options2;
              var asyncArrow = false;
              switch (expr.type) {
                case syntax_1.Syntax.Identifier:
                  break;
                case ArrowParameterPlaceHolder:
                  params = expr.params;
                  asyncArrow = expr.async;
                  break;
                default:
                  return null;
              }
              options2 = {
                simple: true,
                paramSet: {}
              };
              for (var i = 0; i < params.length; ++i) {
                var param = params[i];
                if (param.type === syntax_1.Syntax.AssignmentPattern) {
                  if (param.right.type === syntax_1.Syntax.YieldExpression) {
                    if (param.right.argument) {
                      this.throwUnexpectedToken(this.lookahead);
                    }
                    param.right.type = syntax_1.Syntax.Identifier;
                    param.right.name = "yield";
                    delete param.right.argument;
                    delete param.right.delegate;
                  }
                } else if (asyncArrow && param.type === syntax_1.Syntax.Identifier && param.name === "await") {
                  this.throwUnexpectedToken(this.lookahead);
                }
                this.checkPatternParam(options2, param);
                params[i] = param;
              }
              if (this.context.strict || !this.context.allowYield) {
                for (var i = 0; i < params.length; ++i) {
                  var param = params[i];
                  if (param.type === syntax_1.Syntax.YieldExpression) {
                    this.throwUnexpectedToken(this.lookahead);
                  }
                }
              }
              if (options2.message === messages_1.Messages.StrictParamDupe) {
                var token = this.context.strict ? options2.stricted : options2.firstRestricted;
                this.throwUnexpectedToken(token, options2.message);
              }
              return {
                simple: options2.simple,
                params,
                stricted: options2.stricted,
                firstRestricted: options2.firstRestricted,
                message: options2.message
              };
            };
            Parser4.prototype.parseAssignmentExpression = function() {
              var expr;
              if (!this.context.allowYield && this.matchKeyword("yield")) {
                expr = this.parseYieldExpression();
              } else {
                var startToken = this.lookahead;
                var token = startToken;
                expr = this.parseConditionalExpression();
                if (token.type === 3 && token.lineNumber === this.lookahead.lineNumber && token.value === "async") {
                  if (this.lookahead.type === 3 || this.matchKeyword("yield")) {
                    var arg = this.parsePrimaryExpression();
                    this.reinterpretExpressionAsPattern(arg);
                    expr = {
                      type: ArrowParameterPlaceHolder,
                      params: [arg],
                      async: true
                    };
                  }
                }
                if (expr.type === ArrowParameterPlaceHolder || this.match("=>")) {
                  this.context.isAssignmentTarget = false;
                  this.context.isBindingElement = false;
                  var isAsync2 = expr.async;
                  var list2 = this.reinterpretAsCoverFormalsList(expr);
                  if (list2) {
                    if (this.hasLineTerminator) {
                      this.tolerateUnexpectedToken(this.lookahead);
                    }
                    this.context.firstCoverInitializedNameError = null;
                    var previousStrict = this.context.strict;
                    var previousAllowStrictDirective = this.context.allowStrictDirective;
                    this.context.allowStrictDirective = list2.simple;
                    var previousAllowYield = this.context.allowYield;
                    var previousAwait = this.context.await;
                    this.context.allowYield = true;
                    this.context.await = isAsync2;
                    var node2 = this.startNode(startToken);
                    this.expect("=>");
                    var body = void 0;
                    if (this.match("{")) {
                      var previousAllowIn = this.context.allowIn;
                      this.context.allowIn = true;
                      body = this.parseFunctionSourceElements();
                      this.context.allowIn = previousAllowIn;
                    } else {
                      body = this.isolateCoverGrammar(this.parseAssignmentExpression);
                    }
                    var expression = body.type !== syntax_1.Syntax.BlockStatement;
                    if (this.context.strict && list2.firstRestricted) {
                      this.throwUnexpectedToken(list2.firstRestricted, list2.message);
                    }
                    if (this.context.strict && list2.stricted) {
                      this.tolerateUnexpectedToken(list2.stricted, list2.message);
                    }
                    expr = isAsync2 ? this.finalize(node2, new Node4.AsyncArrowFunctionExpression(list2.params, body, expression)) : this.finalize(node2, new Node4.ArrowFunctionExpression(list2.params, body, expression));
                    this.context.strict = previousStrict;
                    this.context.allowStrictDirective = previousAllowStrictDirective;
                    this.context.allowYield = previousAllowYield;
                    this.context.await = previousAwait;
                  }
                } else {
                  if (this.matchAssign()) {
                    if (!this.context.isAssignmentTarget) {
                      this.tolerateError(messages_1.Messages.InvalidLHSInAssignment);
                    }
                    if (this.context.strict && expr.type === syntax_1.Syntax.Identifier) {
                      var id2 = expr;
                      if (this.scanner.isRestrictedWord(id2.name)) {
                        this.tolerateUnexpectedToken(token, messages_1.Messages.StrictLHSAssignment);
                      }
                      if (this.scanner.isStrictModeReservedWord(id2.name)) {
                        this.tolerateUnexpectedToken(token, messages_1.Messages.StrictReservedWord);
                      }
                    }
                    if (!this.match("=")) {
                      this.context.isAssignmentTarget = false;
                      this.context.isBindingElement = false;
                    } else {
                      this.reinterpretExpressionAsPattern(expr);
                    }
                    token = this.nextToken();
                    var operator = token.value;
                    var right2 = this.isolateCoverGrammar(this.parseAssignmentExpression);
                    expr = this.finalize(this.startNode(startToken), new Node4.AssignmentExpression(operator, expr, right2));
                    this.context.firstCoverInitializedNameError = null;
                  }
                }
              }
              return expr;
            };
            Parser4.prototype.parseExpression = function() {
              var startToken = this.lookahead;
              var expr = this.isolateCoverGrammar(this.parseAssignmentExpression);
              if (this.match(",")) {
                var expressions = [];
                expressions.push(expr);
                while (this.lookahead.type !== 2) {
                  if (!this.match(",")) {
                    break;
                  }
                  this.nextToken();
                  expressions.push(this.isolateCoverGrammar(this.parseAssignmentExpression));
                }
                expr = this.finalize(this.startNode(startToken), new Node4.SequenceExpression(expressions));
              }
              return expr;
            };
            Parser4.prototype.parseStatementListItem = function() {
              var statement;
              this.context.isAssignmentTarget = true;
              this.context.isBindingElement = true;
              if (this.lookahead.type === 4) {
                switch (this.lookahead.value) {
                  case "export":
                    if (!this.context.isModule) {
                      this.tolerateUnexpectedToken(this.lookahead, messages_1.Messages.IllegalExportDeclaration);
                    }
                    statement = this.parseExportDeclaration();
                    break;
                  case "import":
                    if (!this.context.isModule) {
                      this.tolerateUnexpectedToken(this.lookahead, messages_1.Messages.IllegalImportDeclaration);
                    }
                    statement = this.parseImportDeclaration();
                    break;
                  case "const":
                    statement = this.parseLexicalDeclaration({ inFor: false });
                    break;
                  case "function":
                    statement = this.parseFunctionDeclaration();
                    break;
                  case "class":
                    statement = this.parseClassDeclaration();
                    break;
                  case "let":
                    statement = this.isLexicalDeclaration() ? this.parseLexicalDeclaration({ inFor: false }) : this.parseStatement();
                    break;
                  default:
                    statement = this.parseStatement();
                    break;
                }
              } else {
                statement = this.parseStatement();
              }
              return statement;
            };
            Parser4.prototype.parseBlock = function() {
              var node2 = this.createNode();
              this.expect("{");
              var block2 = [];
              while (true) {
                if (this.match("}")) {
                  break;
                }
                block2.push(this.parseStatementListItem());
              }
              this.expect("}");
              return this.finalize(node2, new Node4.BlockStatement(block2));
            };
            Parser4.prototype.parseLexicalBinding = function(kind, options2) {
              var node2 = this.createNode();
              var params = [];
              var id2 = this.parsePattern(params, kind);
              if (this.context.strict && id2.type === syntax_1.Syntax.Identifier) {
                if (this.scanner.isRestrictedWord(id2.name)) {
                  this.tolerateError(messages_1.Messages.StrictVarName);
                }
              }
              var init2 = null;
              if (kind === "const") {
                if (!this.matchKeyword("in") && !this.matchContextualKeyword("of")) {
                  if (this.match("=")) {
                    this.nextToken();
                    init2 = this.isolateCoverGrammar(this.parseAssignmentExpression);
                  } else {
                    this.throwError(messages_1.Messages.DeclarationMissingInitializer, "const");
                  }
                }
              } else if (!options2.inFor && id2.type !== syntax_1.Syntax.Identifier || this.match("=")) {
                this.expect("=");
                init2 = this.isolateCoverGrammar(this.parseAssignmentExpression);
              }
              return this.finalize(node2, new Node4.VariableDeclarator(id2, init2));
            };
            Parser4.prototype.parseBindingList = function(kind, options2) {
              var list2 = [this.parseLexicalBinding(kind, options2)];
              while (this.match(",")) {
                this.nextToken();
                list2.push(this.parseLexicalBinding(kind, options2));
              }
              return list2;
            };
            Parser4.prototype.isLexicalDeclaration = function() {
              var state = this.scanner.saveState();
              this.scanner.scanComments();
              var next = this.scanner.lex();
              this.scanner.restoreState(state);
              return next.type === 3 || next.type === 7 && next.value === "[" || next.type === 7 && next.value === "{" || next.type === 4 && next.value === "let" || next.type === 4 && next.value === "yield";
            };
            Parser4.prototype.parseLexicalDeclaration = function(options2) {
              var node2 = this.createNode();
              var kind = this.nextToken().value;
              assert_1.assert(kind === "let" || kind === "const", "Lexical declaration must be either let or const");
              var declarations = this.parseBindingList(kind, options2);
              this.consumeSemicolon();
              return this.finalize(node2, new Node4.VariableDeclaration(declarations, kind));
            };
            Parser4.prototype.parseBindingRestElement = function(params, kind) {
              var node2 = this.createNode();
              this.expect("...");
              var arg = this.parsePattern(params, kind);
              return this.finalize(node2, new Node4.RestElement(arg));
            };
            Parser4.prototype.parseArrayPattern = function(params, kind) {
              var node2 = this.createNode();
              this.expect("[");
              var elements = [];
              while (!this.match("]")) {
                if (this.match(",")) {
                  this.nextToken();
                  elements.push(null);
                } else {
                  if (this.match("...")) {
                    elements.push(this.parseBindingRestElement(params, kind));
                    break;
                  } else {
                    elements.push(this.parsePatternWithDefault(params, kind));
                  }
                  if (!this.match("]")) {
                    this.expect(",");
                  }
                }
              }
              this.expect("]");
              return this.finalize(node2, new Node4.ArrayPattern(elements));
            };
            Parser4.prototype.parsePropertyPattern = function(params, kind) {
              var node2 = this.createNode();
              var computed = false;
              var shorthand = false;
              var method = false;
              var key;
              var value;
              if (this.lookahead.type === 3) {
                var keyToken = this.lookahead;
                key = this.parseVariableIdentifier();
                var init2 = this.finalize(node2, new Node4.Identifier(keyToken.value));
                if (this.match("=")) {
                  params.push(keyToken);
                  shorthand = true;
                  this.nextToken();
                  var expr = this.parseAssignmentExpression();
                  value = this.finalize(this.startNode(keyToken), new Node4.AssignmentPattern(init2, expr));
                } else if (!this.match(":")) {
                  params.push(keyToken);
                  shorthand = true;
                  value = init2;
                } else {
                  this.expect(":");
                  value = this.parsePatternWithDefault(params, kind);
                }
              } else {
                computed = this.match("[");
                key = this.parseObjectPropertyKey();
                this.expect(":");
                value = this.parsePatternWithDefault(params, kind);
              }
              return this.finalize(node2, new Node4.Property("init", key, computed, value, method, shorthand));
            };
            Parser4.prototype.parseObjectPattern = function(params, kind) {
              var node2 = this.createNode();
              var properties2 = [];
              this.expect("{");
              while (!this.match("}")) {
                properties2.push(this.parsePropertyPattern(params, kind));
                if (!this.match("}")) {
                  this.expect(",");
                }
              }
              this.expect("}");
              return this.finalize(node2, new Node4.ObjectPattern(properties2));
            };
            Parser4.prototype.parsePattern = function(params, kind) {
              var pattern2;
              if (this.match("[")) {
                pattern2 = this.parseArrayPattern(params, kind);
              } else if (this.match("{")) {
                pattern2 = this.parseObjectPattern(params, kind);
              } else {
                if (this.matchKeyword("let") && (kind === "const" || kind === "let")) {
                  this.tolerateUnexpectedToken(this.lookahead, messages_1.Messages.LetInLexicalBinding);
                }
                params.push(this.lookahead);
                pattern2 = this.parseVariableIdentifier(kind);
              }
              return pattern2;
            };
            Parser4.prototype.parsePatternWithDefault = function(params, kind) {
              var startToken = this.lookahead;
              var pattern2 = this.parsePattern(params, kind);
              if (this.match("=")) {
                this.nextToken();
                var previousAllowYield = this.context.allowYield;
                this.context.allowYield = true;
                var right2 = this.isolateCoverGrammar(this.parseAssignmentExpression);
                this.context.allowYield = previousAllowYield;
                pattern2 = this.finalize(this.startNode(startToken), new Node4.AssignmentPattern(pattern2, right2));
              }
              return pattern2;
            };
            Parser4.prototype.parseVariableIdentifier = function(kind) {
              var node2 = this.createNode();
              var token = this.nextToken();
              if (token.type === 4 && token.value === "yield") {
                if (this.context.strict) {
                  this.tolerateUnexpectedToken(token, messages_1.Messages.StrictReservedWord);
                } else if (!this.context.allowYield) {
                  this.throwUnexpectedToken(token);
                }
              } else if (token.type !== 3) {
                if (this.context.strict && token.type === 4 && this.scanner.isStrictModeReservedWord(token.value)) {
                  this.tolerateUnexpectedToken(token, messages_1.Messages.StrictReservedWord);
                } else {
                  if (this.context.strict || token.value !== "let" || kind !== "var") {
                    this.throwUnexpectedToken(token);
                  }
                }
              } else if ((this.context.isModule || this.context.await) && token.type === 3 && token.value === "await") {
                this.tolerateUnexpectedToken(token);
              }
              return this.finalize(node2, new Node4.Identifier(token.value));
            };
            Parser4.prototype.parseVariableDeclaration = function(options2) {
              var node2 = this.createNode();
              var params = [];
              var id2 = this.parsePattern(params, "var");
              if (this.context.strict && id2.type === syntax_1.Syntax.Identifier) {
                if (this.scanner.isRestrictedWord(id2.name)) {
                  this.tolerateError(messages_1.Messages.StrictVarName);
                }
              }
              var init2 = null;
              if (this.match("=")) {
                this.nextToken();
                init2 = this.isolateCoverGrammar(this.parseAssignmentExpression);
              } else if (id2.type !== syntax_1.Syntax.Identifier && !options2.inFor) {
                this.expect("=");
              }
              return this.finalize(node2, new Node4.VariableDeclarator(id2, init2));
            };
            Parser4.prototype.parseVariableDeclarationList = function(options2) {
              var opt = { inFor: options2.inFor };
              var list2 = [];
              list2.push(this.parseVariableDeclaration(opt));
              while (this.match(",")) {
                this.nextToken();
                list2.push(this.parseVariableDeclaration(opt));
              }
              return list2;
            };
            Parser4.prototype.parseVariableStatement = function() {
              var node2 = this.createNode();
              this.expectKeyword("var");
              var declarations = this.parseVariableDeclarationList({ inFor: false });
              this.consumeSemicolon();
              return this.finalize(node2, new Node4.VariableDeclaration(declarations, "var"));
            };
            Parser4.prototype.parseEmptyStatement = function() {
              var node2 = this.createNode();
              this.expect(";");
              return this.finalize(node2, new Node4.EmptyStatement());
            };
            Parser4.prototype.parseExpressionStatement = function() {
              var node2 = this.createNode();
              var expr = this.parseExpression();
              this.consumeSemicolon();
              return this.finalize(node2, new Node4.ExpressionStatement(expr));
            };
            Parser4.prototype.parseIfClause = function() {
              if (this.context.strict && this.matchKeyword("function")) {
                this.tolerateError(messages_1.Messages.StrictFunction);
              }
              return this.parseStatement();
            };
            Parser4.prototype.parseIfStatement = function() {
              var node2 = this.createNode();
              var consequent;
              var alternate = null;
              this.expectKeyword("if");
              this.expect("(");
              var test2 = this.parseExpression();
              if (!this.match(")") && this.config.tolerant) {
                this.tolerateUnexpectedToken(this.nextToken());
                consequent = this.finalize(this.createNode(), new Node4.EmptyStatement());
              } else {
                this.expect(")");
                consequent = this.parseIfClause();
                if (this.matchKeyword("else")) {
                  this.nextToken();
                  alternate = this.parseIfClause();
                }
              }
              return this.finalize(node2, new Node4.IfStatement(test2, consequent, alternate));
            };
            Parser4.prototype.parseDoWhileStatement = function() {
              var node2 = this.createNode();
              this.expectKeyword("do");
              var previousInIteration = this.context.inIteration;
              this.context.inIteration = true;
              var body = this.parseStatement();
              this.context.inIteration = previousInIteration;
              this.expectKeyword("while");
              this.expect("(");
              var test2 = this.parseExpression();
              if (!this.match(")") && this.config.tolerant) {
                this.tolerateUnexpectedToken(this.nextToken());
              } else {
                this.expect(")");
                if (this.match(";")) {
                  this.nextToken();
                }
              }
              return this.finalize(node2, new Node4.DoWhileStatement(body, test2));
            };
            Parser4.prototype.parseWhileStatement = function() {
              var node2 = this.createNode();
              var body;
              this.expectKeyword("while");
              this.expect("(");
              var test2 = this.parseExpression();
              if (!this.match(")") && this.config.tolerant) {
                this.tolerateUnexpectedToken(this.nextToken());
                body = this.finalize(this.createNode(), new Node4.EmptyStatement());
              } else {
                this.expect(")");
                var previousInIteration = this.context.inIteration;
                this.context.inIteration = true;
                body = this.parseStatement();
                this.context.inIteration = previousInIteration;
              }
              return this.finalize(node2, new Node4.WhileStatement(test2, body));
            };
            Parser4.prototype.parseForStatement = function() {
              var init2 = null;
              var test2 = null;
              var update = null;
              var forIn = true;
              var left2, right2;
              var node2 = this.createNode();
              this.expectKeyword("for");
              this.expect("(");
              if (this.match(";")) {
                this.nextToken();
              } else {
                if (this.matchKeyword("var")) {
                  init2 = this.createNode();
                  this.nextToken();
                  var previousAllowIn = this.context.allowIn;
                  this.context.allowIn = false;
                  var declarations = this.parseVariableDeclarationList({ inFor: true });
                  this.context.allowIn = previousAllowIn;
                  if (declarations.length === 1 && this.matchKeyword("in")) {
                    var decl = declarations[0];
                    if (decl.init && (decl.id.type === syntax_1.Syntax.ArrayPattern || decl.id.type === syntax_1.Syntax.ObjectPattern || this.context.strict)) {
                      this.tolerateError(messages_1.Messages.ForInOfLoopInitializer, "for-in");
                    }
                    init2 = this.finalize(init2, new Node4.VariableDeclaration(declarations, "var"));
                    this.nextToken();
                    left2 = init2;
                    right2 = this.parseExpression();
                    init2 = null;
                  } else if (declarations.length === 1 && declarations[0].init === null && this.matchContextualKeyword("of")) {
                    init2 = this.finalize(init2, new Node4.VariableDeclaration(declarations, "var"));
                    this.nextToken();
                    left2 = init2;
                    right2 = this.parseAssignmentExpression();
                    init2 = null;
                    forIn = false;
                  } else {
                    init2 = this.finalize(init2, new Node4.VariableDeclaration(declarations, "var"));
                    this.expect(";");
                  }
                } else if (this.matchKeyword("const") || this.matchKeyword("let")) {
                  init2 = this.createNode();
                  var kind = this.nextToken().value;
                  if (!this.context.strict && this.lookahead.value === "in") {
                    init2 = this.finalize(init2, new Node4.Identifier(kind));
                    this.nextToken();
                    left2 = init2;
                    right2 = this.parseExpression();
                    init2 = null;
                  } else {
                    var previousAllowIn = this.context.allowIn;
                    this.context.allowIn = false;
                    var declarations = this.parseBindingList(kind, { inFor: true });
                    this.context.allowIn = previousAllowIn;
                    if (declarations.length === 1 && declarations[0].init === null && this.matchKeyword("in")) {
                      init2 = this.finalize(init2, new Node4.VariableDeclaration(declarations, kind));
                      this.nextToken();
                      left2 = init2;
                      right2 = this.parseExpression();
                      init2 = null;
                    } else if (declarations.length === 1 && declarations[0].init === null && this.matchContextualKeyword("of")) {
                      init2 = this.finalize(init2, new Node4.VariableDeclaration(declarations, kind));
                      this.nextToken();
                      left2 = init2;
                      right2 = this.parseAssignmentExpression();
                      init2 = null;
                      forIn = false;
                    } else {
                      this.consumeSemicolon();
                      init2 = this.finalize(init2, new Node4.VariableDeclaration(declarations, kind));
                    }
                  }
                } else {
                  var initStartToken = this.lookahead;
                  var previousAllowIn = this.context.allowIn;
                  this.context.allowIn = false;
                  init2 = this.inheritCoverGrammar(this.parseAssignmentExpression);
                  this.context.allowIn = previousAllowIn;
                  if (this.matchKeyword("in")) {
                    if (!this.context.isAssignmentTarget || init2.type === syntax_1.Syntax.AssignmentExpression) {
                      this.tolerateError(messages_1.Messages.InvalidLHSInForIn);
                    }
                    this.nextToken();
                    this.reinterpretExpressionAsPattern(init2);
                    left2 = init2;
                    right2 = this.parseExpression();
                    init2 = null;
                  } else if (this.matchContextualKeyword("of")) {
                    if (!this.context.isAssignmentTarget || init2.type === syntax_1.Syntax.AssignmentExpression) {
                      this.tolerateError(messages_1.Messages.InvalidLHSInForLoop);
                    }
                    this.nextToken();
                    this.reinterpretExpressionAsPattern(init2);
                    left2 = init2;
                    right2 = this.parseAssignmentExpression();
                    init2 = null;
                    forIn = false;
                  } else {
                    if (this.match(",")) {
                      var initSeq = [init2];
                      while (this.match(",")) {
                        this.nextToken();
                        initSeq.push(this.isolateCoverGrammar(this.parseAssignmentExpression));
                      }
                      init2 = this.finalize(this.startNode(initStartToken), new Node4.SequenceExpression(initSeq));
                    }
                    this.expect(";");
                  }
                }
              }
              if (typeof left2 === "undefined") {
                if (!this.match(";")) {
                  test2 = this.parseExpression();
                }
                this.expect(";");
                if (!this.match(")")) {
                  update = this.parseExpression();
                }
              }
              var body;
              if (!this.match(")") && this.config.tolerant) {
                this.tolerateUnexpectedToken(this.nextToken());
                body = this.finalize(this.createNode(), new Node4.EmptyStatement());
              } else {
                this.expect(")");
                var previousInIteration = this.context.inIteration;
                this.context.inIteration = true;
                body = this.isolateCoverGrammar(this.parseStatement);
                this.context.inIteration = previousInIteration;
              }
              return typeof left2 === "undefined" ? this.finalize(node2, new Node4.ForStatement(init2, test2, update, body)) : forIn ? this.finalize(node2, new Node4.ForInStatement(left2, right2, body)) : this.finalize(node2, new Node4.ForOfStatement(left2, right2, body));
            };
            Parser4.prototype.parseContinueStatement = function() {
              var node2 = this.createNode();
              this.expectKeyword("continue");
              var label = null;
              if (this.lookahead.type === 3 && !this.hasLineTerminator) {
                var id2 = this.parseVariableIdentifier();
                label = id2;
                var key = "$" + id2.name;
                if (!Object.prototype.hasOwnProperty.call(this.context.labelSet, key)) {
                  this.throwError(messages_1.Messages.UnknownLabel, id2.name);
                }
              }
              this.consumeSemicolon();
              if (label === null && !this.context.inIteration) {
                this.throwError(messages_1.Messages.IllegalContinue);
              }
              return this.finalize(node2, new Node4.ContinueStatement(label));
            };
            Parser4.prototype.parseBreakStatement = function() {
              var node2 = this.createNode();
              this.expectKeyword("break");
              var label = null;
              if (this.lookahead.type === 3 && !this.hasLineTerminator) {
                var id2 = this.parseVariableIdentifier();
                var key = "$" + id2.name;
                if (!Object.prototype.hasOwnProperty.call(this.context.labelSet, key)) {
                  this.throwError(messages_1.Messages.UnknownLabel, id2.name);
                }
                label = id2;
              }
              this.consumeSemicolon();
              if (label === null && !this.context.inIteration && !this.context.inSwitch) {
                this.throwError(messages_1.Messages.IllegalBreak);
              }
              return this.finalize(node2, new Node4.BreakStatement(label));
            };
            Parser4.prototype.parseReturnStatement = function() {
              if (!this.context.inFunctionBody) {
                this.tolerateError(messages_1.Messages.IllegalReturn);
              }
              var node2 = this.createNode();
              this.expectKeyword("return");
              var hasArgument = !this.match(";") && !this.match("}") && !this.hasLineTerminator && this.lookahead.type !== 2 || this.lookahead.type === 8 || this.lookahead.type === 10;
              var argument = hasArgument ? this.parseExpression() : null;
              this.consumeSemicolon();
              return this.finalize(node2, new Node4.ReturnStatement(argument));
            };
            Parser4.prototype.parseWithStatement = function() {
              if (this.context.strict) {
                this.tolerateError(messages_1.Messages.StrictModeWith);
              }
              var node2 = this.createNode();
              var body;
              this.expectKeyword("with");
              this.expect("(");
              var object2 = this.parseExpression();
              if (!this.match(")") && this.config.tolerant) {
                this.tolerateUnexpectedToken(this.nextToken());
                body = this.finalize(this.createNode(), new Node4.EmptyStatement());
              } else {
                this.expect(")");
                body = this.parseStatement();
              }
              return this.finalize(node2, new Node4.WithStatement(object2, body));
            };
            Parser4.prototype.parseSwitchCase = function() {
              var node2 = this.createNode();
              var test2;
              if (this.matchKeyword("default")) {
                this.nextToken();
                test2 = null;
              } else {
                this.expectKeyword("case");
                test2 = this.parseExpression();
              }
              this.expect(":");
              var consequent = [];
              while (true) {
                if (this.match("}") || this.matchKeyword("default") || this.matchKeyword("case")) {
                  break;
                }
                consequent.push(this.parseStatementListItem());
              }
              return this.finalize(node2, new Node4.SwitchCase(test2, consequent));
            };
            Parser4.prototype.parseSwitchStatement = function() {
              var node2 = this.createNode();
              this.expectKeyword("switch");
              this.expect("(");
              var discriminant = this.parseExpression();
              this.expect(")");
              var previousInSwitch = this.context.inSwitch;
              this.context.inSwitch = true;
              var cases = [];
              var defaultFound = false;
              this.expect("{");
              while (true) {
                if (this.match("}")) {
                  break;
                }
                var clause = this.parseSwitchCase();
                if (clause.test === null) {
                  if (defaultFound) {
                    this.throwError(messages_1.Messages.MultipleDefaultsInSwitch);
                  }
                  defaultFound = true;
                }
                cases.push(clause);
              }
              this.expect("}");
              this.context.inSwitch = previousInSwitch;
              return this.finalize(node2, new Node4.SwitchStatement(discriminant, cases));
            };
            Parser4.prototype.parseLabelledStatement = function() {
              var node2 = this.createNode();
              var expr = this.parseExpression();
              var statement;
              if (expr.type === syntax_1.Syntax.Identifier && this.match(":")) {
                this.nextToken();
                var id2 = expr;
                var key = "$" + id2.name;
                if (Object.prototype.hasOwnProperty.call(this.context.labelSet, key)) {
                  this.throwError(messages_1.Messages.Redeclaration, "Label", id2.name);
                }
                this.context.labelSet[key] = true;
                var body = void 0;
                if (this.matchKeyword("class")) {
                  this.tolerateUnexpectedToken(this.lookahead);
                  body = this.parseClassDeclaration();
                } else if (this.matchKeyword("function")) {
                  var token = this.lookahead;
                  var declaration2 = this.parseFunctionDeclaration();
                  if (this.context.strict) {
                    this.tolerateUnexpectedToken(token, messages_1.Messages.StrictFunction);
                  } else if (declaration2.generator) {
                    this.tolerateUnexpectedToken(token, messages_1.Messages.GeneratorInLegacyContext);
                  }
                  body = declaration2;
                } else {
                  body = this.parseStatement();
                }
                delete this.context.labelSet[key];
                statement = new Node4.LabeledStatement(id2, body);
              } else {
                this.consumeSemicolon();
                statement = new Node4.ExpressionStatement(expr);
              }
              return this.finalize(node2, statement);
            };
            Parser4.prototype.parseThrowStatement = function() {
              var node2 = this.createNode();
              this.expectKeyword("throw");
              if (this.hasLineTerminator) {
                this.throwError(messages_1.Messages.NewlineAfterThrow);
              }
              var argument = this.parseExpression();
              this.consumeSemicolon();
              return this.finalize(node2, new Node4.ThrowStatement(argument));
            };
            Parser4.prototype.parseCatchClause = function() {
              var node2 = this.createNode();
              this.expectKeyword("catch");
              this.expect("(");
              if (this.match(")")) {
                this.throwUnexpectedToken(this.lookahead);
              }
              var params = [];
              var param = this.parsePattern(params);
              var paramMap = {};
              for (var i = 0; i < params.length; i++) {
                var key = "$" + params[i].value;
                if (Object.prototype.hasOwnProperty.call(paramMap, key)) {
                  this.tolerateError(messages_1.Messages.DuplicateBinding, params[i].value);
                }
                paramMap[key] = true;
              }
              if (this.context.strict && param.type === syntax_1.Syntax.Identifier) {
                if (this.scanner.isRestrictedWord(param.name)) {
                  this.tolerateError(messages_1.Messages.StrictCatchVariable);
                }
              }
              this.expect(")");
              var body = this.parseBlock();
              return this.finalize(node2, new Node4.CatchClause(param, body));
            };
            Parser4.prototype.parseFinallyClause = function() {
              this.expectKeyword("finally");
              return this.parseBlock();
            };
            Parser4.prototype.parseTryStatement = function() {
              var node2 = this.createNode();
              this.expectKeyword("try");
              var block2 = this.parseBlock();
              var handler = this.matchKeyword("catch") ? this.parseCatchClause() : null;
              var finalizer = this.matchKeyword("finally") ? this.parseFinallyClause() : null;
              if (!handler && !finalizer) {
                this.throwError(messages_1.Messages.NoCatchOrFinally);
              }
              return this.finalize(node2, new Node4.TryStatement(block2, handler, finalizer));
            };
            Parser4.prototype.parseDebuggerStatement = function() {
              var node2 = this.createNode();
              this.expectKeyword("debugger");
              this.consumeSemicolon();
              return this.finalize(node2, new Node4.DebuggerStatement());
            };
            Parser4.prototype.parseStatement = function() {
              var statement;
              switch (this.lookahead.type) {
                case 1:
                case 5:
                case 6:
                case 8:
                case 10:
                case 9:
                  statement = this.parseExpressionStatement();
                  break;
                case 7:
                  var value = this.lookahead.value;
                  if (value === "{") {
                    statement = this.parseBlock();
                  } else if (value === "(") {
                    statement = this.parseExpressionStatement();
                  } else if (value === ";") {
                    statement = this.parseEmptyStatement();
                  } else {
                    statement = this.parseExpressionStatement();
                  }
                  break;
                case 3:
                  statement = this.matchAsyncFunction() ? this.parseFunctionDeclaration() : this.parseLabelledStatement();
                  break;
                case 4:
                  switch (this.lookahead.value) {
                    case "break":
                      statement = this.parseBreakStatement();
                      break;
                    case "continue":
                      statement = this.parseContinueStatement();
                      break;
                    case "debugger":
                      statement = this.parseDebuggerStatement();
                      break;
                    case "do":
                      statement = this.parseDoWhileStatement();
                      break;
                    case "for":
                      statement = this.parseForStatement();
                      break;
                    case "function":
                      statement = this.parseFunctionDeclaration();
                      break;
                    case "if":
                      statement = this.parseIfStatement();
                      break;
                    case "return":
                      statement = this.parseReturnStatement();
                      break;
                    case "switch":
                      statement = this.parseSwitchStatement();
                      break;
                    case "throw":
                      statement = this.parseThrowStatement();
                      break;
                    case "try":
                      statement = this.parseTryStatement();
                      break;
                    case "var":
                      statement = this.parseVariableStatement();
                      break;
                    case "while":
                      statement = this.parseWhileStatement();
                      break;
                    case "with":
                      statement = this.parseWithStatement();
                      break;
                    default:
                      statement = this.parseExpressionStatement();
                      break;
                  }
                  break;
                default:
                  statement = this.throwUnexpectedToken(this.lookahead);
              }
              return statement;
            };
            Parser4.prototype.parseFunctionSourceElements = function() {
              var node2 = this.createNode();
              this.expect("{");
              var body = this.parseDirectivePrologues();
              var previousLabelSet = this.context.labelSet;
              var previousInIteration = this.context.inIteration;
              var previousInSwitch = this.context.inSwitch;
              var previousInFunctionBody = this.context.inFunctionBody;
              this.context.labelSet = {};
              this.context.inIteration = false;
              this.context.inSwitch = false;
              this.context.inFunctionBody = true;
              while (this.lookahead.type !== 2) {
                if (this.match("}")) {
                  break;
                }
                body.push(this.parseStatementListItem());
              }
              this.expect("}");
              this.context.labelSet = previousLabelSet;
              this.context.inIteration = previousInIteration;
              this.context.inSwitch = previousInSwitch;
              this.context.inFunctionBody = previousInFunctionBody;
              return this.finalize(node2, new Node4.BlockStatement(body));
            };
            Parser4.prototype.validateParam = function(options2, param, name) {
              var key = "$" + name;
              if (this.context.strict) {
                if (this.scanner.isRestrictedWord(name)) {
                  options2.stricted = param;
                  options2.message = messages_1.Messages.StrictParamName;
                }
                if (Object.prototype.hasOwnProperty.call(options2.paramSet, key)) {
                  options2.stricted = param;
                  options2.message = messages_1.Messages.StrictParamDupe;
                }
              } else if (!options2.firstRestricted) {
                if (this.scanner.isRestrictedWord(name)) {
                  options2.firstRestricted = param;
                  options2.message = messages_1.Messages.StrictParamName;
                } else if (this.scanner.isStrictModeReservedWord(name)) {
                  options2.firstRestricted = param;
                  options2.message = messages_1.Messages.StrictReservedWord;
                } else if (Object.prototype.hasOwnProperty.call(options2.paramSet, key)) {
                  options2.stricted = param;
                  options2.message = messages_1.Messages.StrictParamDupe;
                }
              }
              if (typeof Object.defineProperty === "function") {
                Object.defineProperty(options2.paramSet, key, { value: true, enumerable: true, writable: true, configurable: true });
              } else {
                options2.paramSet[key] = true;
              }
            };
            Parser4.prototype.parseRestElement = function(params) {
              var node2 = this.createNode();
              this.expect("...");
              var arg = this.parsePattern(params);
              if (this.match("=")) {
                this.throwError(messages_1.Messages.DefaultRestParameter);
              }
              if (!this.match(")")) {
                this.throwError(messages_1.Messages.ParameterAfterRestParameter);
              }
              return this.finalize(node2, new Node4.RestElement(arg));
            };
            Parser4.prototype.parseFormalParameter = function(options2) {
              var params = [];
              var param = this.match("...") ? this.parseRestElement(params) : this.parsePatternWithDefault(params);
              for (var i = 0; i < params.length; i++) {
                this.validateParam(options2, params[i], params[i].value);
              }
              options2.simple = options2.simple && param instanceof Node4.Identifier;
              options2.params.push(param);
            };
            Parser4.prototype.parseFormalParameters = function(firstRestricted) {
              var options2;
              options2 = {
                simple: true,
                params: [],
                firstRestricted
              };
              this.expect("(");
              if (!this.match(")")) {
                options2.paramSet = {};
                while (this.lookahead.type !== 2) {
                  this.parseFormalParameter(options2);
                  if (this.match(")")) {
                    break;
                  }
                  this.expect(",");
                  if (this.match(")")) {
                    break;
                  }
                }
              }
              this.expect(")");
              return {
                simple: options2.simple,
                params: options2.params,
                stricted: options2.stricted,
                firstRestricted: options2.firstRestricted,
                message: options2.message
              };
            };
            Parser4.prototype.matchAsyncFunction = function() {
              var match = this.matchContextualKeyword("async");
              if (match) {
                var state = this.scanner.saveState();
                this.scanner.scanComments();
                var next = this.scanner.lex();
                this.scanner.restoreState(state);
                match = state.lineNumber === next.lineNumber && next.type === 4 && next.value === "function";
              }
              return match;
            };
            Parser4.prototype.parseFunctionDeclaration = function(identifierIsOptional) {
              var node2 = this.createNode();
              var isAsync2 = this.matchContextualKeyword("async");
              if (isAsync2) {
                this.nextToken();
              }
              this.expectKeyword("function");
              var isGenerator = isAsync2 ? false : this.match("*");
              if (isGenerator) {
                this.nextToken();
              }
              var message;
              var id2 = null;
              var firstRestricted = null;
              if (!identifierIsOptional || !this.match("(")) {
                var token = this.lookahead;
                id2 = this.parseVariableIdentifier();
                if (this.context.strict) {
                  if (this.scanner.isRestrictedWord(token.value)) {
                    this.tolerateUnexpectedToken(token, messages_1.Messages.StrictFunctionName);
                  }
                } else {
                  if (this.scanner.isRestrictedWord(token.value)) {
                    firstRestricted = token;
                    message = messages_1.Messages.StrictFunctionName;
                  } else if (this.scanner.isStrictModeReservedWord(token.value)) {
                    firstRestricted = token;
                    message = messages_1.Messages.StrictReservedWord;
                  }
                }
              }
              var previousAllowAwait = this.context.await;
              var previousAllowYield = this.context.allowYield;
              this.context.await = isAsync2;
              this.context.allowYield = !isGenerator;
              var formalParameters = this.parseFormalParameters(firstRestricted);
              var params = formalParameters.params;
              var stricted = formalParameters.stricted;
              firstRestricted = formalParameters.firstRestricted;
              if (formalParameters.message) {
                message = formalParameters.message;
              }
              var previousStrict = this.context.strict;
              var previousAllowStrictDirective = this.context.allowStrictDirective;
              this.context.allowStrictDirective = formalParameters.simple;
              var body = this.parseFunctionSourceElements();
              if (this.context.strict && firstRestricted) {
                this.throwUnexpectedToken(firstRestricted, message);
              }
              if (this.context.strict && stricted) {
                this.tolerateUnexpectedToken(stricted, message);
              }
              this.context.strict = previousStrict;
              this.context.allowStrictDirective = previousAllowStrictDirective;
              this.context.await = previousAllowAwait;
              this.context.allowYield = previousAllowYield;
              return isAsync2 ? this.finalize(node2, new Node4.AsyncFunctionDeclaration(id2, params, body)) : this.finalize(node2, new Node4.FunctionDeclaration(id2, params, body, isGenerator));
            };
            Parser4.prototype.parseFunctionExpression = function() {
              var node2 = this.createNode();
              var isAsync2 = this.matchContextualKeyword("async");
              if (isAsync2) {
                this.nextToken();
              }
              this.expectKeyword("function");
              var isGenerator = isAsync2 ? false : this.match("*");
              if (isGenerator) {
                this.nextToken();
              }
              var message;
              var id2 = null;
              var firstRestricted;
              var previousAllowAwait = this.context.await;
              var previousAllowYield = this.context.allowYield;
              this.context.await = isAsync2;
              this.context.allowYield = !isGenerator;
              if (!this.match("(")) {
                var token = this.lookahead;
                id2 = !this.context.strict && !isGenerator && this.matchKeyword("yield") ? this.parseIdentifierName() : this.parseVariableIdentifier();
                if (this.context.strict) {
                  if (this.scanner.isRestrictedWord(token.value)) {
                    this.tolerateUnexpectedToken(token, messages_1.Messages.StrictFunctionName);
                  }
                } else {
                  if (this.scanner.isRestrictedWord(token.value)) {
                    firstRestricted = token;
                    message = messages_1.Messages.StrictFunctionName;
                  } else if (this.scanner.isStrictModeReservedWord(token.value)) {
                    firstRestricted = token;
                    message = messages_1.Messages.StrictReservedWord;
                  }
                }
              }
              var formalParameters = this.parseFormalParameters(firstRestricted);
              var params = formalParameters.params;
              var stricted = formalParameters.stricted;
              firstRestricted = formalParameters.firstRestricted;
              if (formalParameters.message) {
                message = formalParameters.message;
              }
              var previousStrict = this.context.strict;
              var previousAllowStrictDirective = this.context.allowStrictDirective;
              this.context.allowStrictDirective = formalParameters.simple;
              var body = this.parseFunctionSourceElements();
              if (this.context.strict && firstRestricted) {
                this.throwUnexpectedToken(firstRestricted, message);
              }
              if (this.context.strict && stricted) {
                this.tolerateUnexpectedToken(stricted, message);
              }
              this.context.strict = previousStrict;
              this.context.allowStrictDirective = previousAllowStrictDirective;
              this.context.await = previousAllowAwait;
              this.context.allowYield = previousAllowYield;
              return isAsync2 ? this.finalize(node2, new Node4.AsyncFunctionExpression(id2, params, body)) : this.finalize(node2, new Node4.FunctionExpression(id2, params, body, isGenerator));
            };
            Parser4.prototype.parseDirective = function() {
              var token = this.lookahead;
              var node2 = this.createNode();
              var expr = this.parseExpression();
              var directive = expr.type === syntax_1.Syntax.Literal ? this.getTokenRaw(token).slice(1, -1) : null;
              this.consumeSemicolon();
              return this.finalize(node2, directive ? new Node4.Directive(expr, directive) : new Node4.ExpressionStatement(expr));
            };
            Parser4.prototype.parseDirectivePrologues = function() {
              var firstRestricted = null;
              var body = [];
              while (true) {
                var token = this.lookahead;
                if (token.type !== 8) {
                  break;
                }
                var statement = this.parseDirective();
                body.push(statement);
                var directive = statement.directive;
                if (typeof directive !== "string") {
                  break;
                }
                if (directive === "use strict") {
                  this.context.strict = true;
                  if (firstRestricted) {
                    this.tolerateUnexpectedToken(firstRestricted, messages_1.Messages.StrictOctalLiteral);
                  }
                  if (!this.context.allowStrictDirective) {
                    this.tolerateUnexpectedToken(token, messages_1.Messages.IllegalLanguageModeDirective);
                  }
                } else {
                  if (!firstRestricted && token.octal) {
                    firstRestricted = token;
                  }
                }
              }
              return body;
            };
            Parser4.prototype.qualifiedPropertyName = function(token) {
              switch (token.type) {
                case 3:
                case 8:
                case 1:
                case 5:
                case 6:
                case 4:
                  return true;
                case 7:
                  return token.value === "[";
              }
              return false;
            };
            Parser4.prototype.parseGetterMethod = function() {
              var node2 = this.createNode();
              var isGenerator = false;
              var previousAllowYield = this.context.allowYield;
              this.context.allowYield = !isGenerator;
              var formalParameters = this.parseFormalParameters();
              if (formalParameters.params.length > 0) {
                this.tolerateError(messages_1.Messages.BadGetterArity);
              }
              var method = this.parsePropertyMethod(formalParameters);
              this.context.allowYield = previousAllowYield;
              return this.finalize(node2, new Node4.FunctionExpression(null, formalParameters.params, method, isGenerator));
            };
            Parser4.prototype.parseSetterMethod = function() {
              var node2 = this.createNode();
              var isGenerator = false;
              var previousAllowYield = this.context.allowYield;
              this.context.allowYield = !isGenerator;
              var formalParameters = this.parseFormalParameters();
              if (formalParameters.params.length !== 1) {
                this.tolerateError(messages_1.Messages.BadSetterArity);
              } else if (formalParameters.params[0] instanceof Node4.RestElement) {
                this.tolerateError(messages_1.Messages.BadSetterRestParameter);
              }
              var method = this.parsePropertyMethod(formalParameters);
              this.context.allowYield = previousAllowYield;
              return this.finalize(node2, new Node4.FunctionExpression(null, formalParameters.params, method, isGenerator));
            };
            Parser4.prototype.parseGeneratorMethod = function() {
              var node2 = this.createNode();
              var isGenerator = true;
              var previousAllowYield = this.context.allowYield;
              this.context.allowYield = true;
              var params = this.parseFormalParameters();
              this.context.allowYield = false;
              var method = this.parsePropertyMethod(params);
              this.context.allowYield = previousAllowYield;
              return this.finalize(node2, new Node4.FunctionExpression(null, params.params, method, isGenerator));
            };
            Parser4.prototype.isStartOfExpression = function() {
              var start = true;
              var value = this.lookahead.value;
              switch (this.lookahead.type) {
                case 7:
                  start = value === "[" || value === "(" || value === "{" || value === "+" || value === "-" || value === "!" || value === "~" || value === "++" || value === "--" || value === "/" || value === "/=";
                  break;
                case 4:
                  start = value === "class" || value === "delete" || value === "function" || value === "let" || value === "new" || value === "super" || value === "this" || value === "typeof" || value === "void" || value === "yield";
                  break;
              }
              return start;
            };
            Parser4.prototype.parseYieldExpression = function() {
              var node2 = this.createNode();
              this.expectKeyword("yield");
              var argument = null;
              var delegate = false;
              if (!this.hasLineTerminator) {
                var previousAllowYield = this.context.allowYield;
                this.context.allowYield = false;
                delegate = this.match("*");
                if (delegate) {
                  this.nextToken();
                  argument = this.parseAssignmentExpression();
                } else if (this.isStartOfExpression()) {
                  argument = this.parseAssignmentExpression();
                }
                this.context.allowYield = previousAllowYield;
              }
              return this.finalize(node2, new Node4.YieldExpression(argument, delegate));
            };
            Parser4.prototype.parseClassElement = function(hasConstructor) {
              var token = this.lookahead;
              var node2 = this.createNode();
              var kind = "";
              var key = null;
              var value = null;
              var computed = false;
              var method = false;
              var isStatic = false;
              var isAsync2 = false;
              if (this.match("*")) {
                this.nextToken();
              } else {
                computed = this.match("[");
                key = this.parseObjectPropertyKey();
                var id2 = key;
                if (id2.name === "static" && (this.qualifiedPropertyName(this.lookahead) || this.match("*"))) {
                  token = this.lookahead;
                  isStatic = true;
                  computed = this.match("[");
                  if (this.match("*")) {
                    this.nextToken();
                  } else {
                    key = this.parseObjectPropertyKey();
                  }
                }
                if (token.type === 3 && !this.hasLineTerminator && token.value === "async") {
                  var punctuator = this.lookahead.value;
                  if (punctuator !== ":" && punctuator !== "(" && punctuator !== "*") {
                    isAsync2 = true;
                    token = this.lookahead;
                    key = this.parseObjectPropertyKey();
                    if (token.type === 3 && token.value === "constructor") {
                      this.tolerateUnexpectedToken(token, messages_1.Messages.ConstructorIsAsync);
                    }
                  }
                }
              }
              var lookaheadPropertyKey = this.qualifiedPropertyName(this.lookahead);
              if (token.type === 3) {
                if (token.value === "get" && lookaheadPropertyKey) {
                  kind = "get";
                  computed = this.match("[");
                  key = this.parseObjectPropertyKey();
                  this.context.allowYield = false;
                  value = this.parseGetterMethod();
                } else if (token.value === "set" && lookaheadPropertyKey) {
                  kind = "set";
                  computed = this.match("[");
                  key = this.parseObjectPropertyKey();
                  value = this.parseSetterMethod();
                }
              } else if (token.type === 7 && token.value === "*" && lookaheadPropertyKey) {
                kind = "init";
                computed = this.match("[");
                key = this.parseObjectPropertyKey();
                value = this.parseGeneratorMethod();
                method = true;
              }
              if (!kind && key && this.match("(")) {
                kind = "init";
                value = isAsync2 ? this.parsePropertyMethodAsyncFunction() : this.parsePropertyMethodFunction();
                method = true;
              }
              if (!kind) {
                this.throwUnexpectedToken(this.lookahead);
              }
              if (kind === "init") {
                kind = "method";
              }
              if (!computed) {
                if (isStatic && this.isPropertyKey(key, "prototype")) {
                  this.throwUnexpectedToken(token, messages_1.Messages.StaticPrototype);
                }
                if (!isStatic && this.isPropertyKey(key, "constructor")) {
                  if (kind !== "method" || !method || value && value.generator) {
                    this.throwUnexpectedToken(token, messages_1.Messages.ConstructorSpecialMethod);
                  }
                  if (hasConstructor.value) {
                    this.throwUnexpectedToken(token, messages_1.Messages.DuplicateConstructor);
                  } else {
                    hasConstructor.value = true;
                  }
                  kind = "constructor";
                }
              }
              return this.finalize(node2, new Node4.MethodDefinition(key, computed, value, kind, isStatic));
            };
            Parser4.prototype.parseClassElementList = function() {
              var body = [];
              var hasConstructor = { value: false };
              this.expect("{");
              while (!this.match("}")) {
                if (this.match(";")) {
                  this.nextToken();
                } else {
                  body.push(this.parseClassElement(hasConstructor));
                }
              }
              this.expect("}");
              return body;
            };
            Parser4.prototype.parseClassBody = function() {
              var node2 = this.createNode();
              var elementList = this.parseClassElementList();
              return this.finalize(node2, new Node4.ClassBody(elementList));
            };
            Parser4.prototype.parseClassDeclaration = function(identifierIsOptional) {
              var node2 = this.createNode();
              var previousStrict = this.context.strict;
              this.context.strict = true;
              this.expectKeyword("class");
              var id2 = identifierIsOptional && this.lookahead.type !== 3 ? null : this.parseVariableIdentifier();
              var superClass = null;
              if (this.matchKeyword("extends")) {
                this.nextToken();
                superClass = this.isolateCoverGrammar(this.parseLeftHandSideExpressionAllowCall);
              }
              var classBody = this.parseClassBody();
              this.context.strict = previousStrict;
              return this.finalize(node2, new Node4.ClassDeclaration(id2, superClass, classBody));
            };
            Parser4.prototype.parseClassExpression = function() {
              var node2 = this.createNode();
              var previousStrict = this.context.strict;
              this.context.strict = true;
              this.expectKeyword("class");
              var id2 = this.lookahead.type === 3 ? this.parseVariableIdentifier() : null;
              var superClass = null;
              if (this.matchKeyword("extends")) {
                this.nextToken();
                superClass = this.isolateCoverGrammar(this.parseLeftHandSideExpressionAllowCall);
              }
              var classBody = this.parseClassBody();
              this.context.strict = previousStrict;
              return this.finalize(node2, new Node4.ClassExpression(id2, superClass, classBody));
            };
            Parser4.prototype.parseModule = function() {
              this.context.strict = true;
              this.context.isModule = true;
              this.scanner.isModule = true;
              var node2 = this.createNode();
              var body = this.parseDirectivePrologues();
              while (this.lookahead.type !== 2) {
                body.push(this.parseStatementListItem());
              }
              return this.finalize(node2, new Node4.Module(body));
            };
            Parser4.prototype.parseScript = function() {
              var node2 = this.createNode();
              var body = this.parseDirectivePrologues();
              while (this.lookahead.type !== 2) {
                body.push(this.parseStatementListItem());
              }
              return this.finalize(node2, new Node4.Script(body));
            };
            Parser4.prototype.parseModuleSpecifier = function() {
              var node2 = this.createNode();
              if (this.lookahead.type !== 8) {
                this.throwError(messages_1.Messages.InvalidModuleSpecifier);
              }
              var token = this.nextToken();
              var raw = this.getTokenRaw(token);
              return this.finalize(node2, new Node4.Literal(token.value, raw));
            };
            Parser4.prototype.parseImportSpecifier = function() {
              var node2 = this.createNode();
              var imported;
              var local;
              if (this.lookahead.type === 3) {
                imported = this.parseVariableIdentifier();
                local = imported;
                if (this.matchContextualKeyword("as")) {
                  this.nextToken();
                  local = this.parseVariableIdentifier();
                }
              } else {
                imported = this.parseIdentifierName();
                local = imported;
                if (this.matchContextualKeyword("as")) {
                  this.nextToken();
                  local = this.parseVariableIdentifier();
                } else {
                  this.throwUnexpectedToken(this.nextToken());
                }
              }
              return this.finalize(node2, new Node4.ImportSpecifier(local, imported));
            };
            Parser4.prototype.parseNamedImports = function() {
              this.expect("{");
              var specifiers = [];
              while (!this.match("}")) {
                specifiers.push(this.parseImportSpecifier());
                if (!this.match("}")) {
                  this.expect(",");
                }
              }
              this.expect("}");
              return specifiers;
            };
            Parser4.prototype.parseImportDefaultSpecifier = function() {
              var node2 = this.createNode();
              var local = this.parseIdentifierName();
              return this.finalize(node2, new Node4.ImportDefaultSpecifier(local));
            };
            Parser4.prototype.parseImportNamespaceSpecifier = function() {
              var node2 = this.createNode();
              this.expect("*");
              if (!this.matchContextualKeyword("as")) {
                this.throwError(messages_1.Messages.NoAsAfterImportNamespace);
              }
              this.nextToken();
              var local = this.parseIdentifierName();
              return this.finalize(node2, new Node4.ImportNamespaceSpecifier(local));
            };
            Parser4.prototype.parseImportDeclaration = function() {
              if (this.context.inFunctionBody) {
                this.throwError(messages_1.Messages.IllegalImportDeclaration);
              }
              var node2 = this.createNode();
              this.expectKeyword("import");
              var src2;
              var specifiers = [];
              if (this.lookahead.type === 8) {
                src2 = this.parseModuleSpecifier();
              } else {
                if (this.match("{")) {
                  specifiers = specifiers.concat(this.parseNamedImports());
                } else if (this.match("*")) {
                  specifiers.push(this.parseImportNamespaceSpecifier());
                } else if (this.isIdentifierName(this.lookahead) && !this.matchKeyword("default")) {
                  specifiers.push(this.parseImportDefaultSpecifier());
                  if (this.match(",")) {
                    this.nextToken();
                    if (this.match("*")) {
                      specifiers.push(this.parseImportNamespaceSpecifier());
                    } else if (this.match("{")) {
                      specifiers = specifiers.concat(this.parseNamedImports());
                    } else {
                      this.throwUnexpectedToken(this.lookahead);
                    }
                  }
                } else {
                  this.throwUnexpectedToken(this.nextToken());
                }
                if (!this.matchContextualKeyword("from")) {
                  var message = this.lookahead.value ? messages_1.Messages.UnexpectedToken : messages_1.Messages.MissingFromClause;
                  this.throwError(message, this.lookahead.value);
                }
                this.nextToken();
                src2 = this.parseModuleSpecifier();
              }
              this.consumeSemicolon();
              return this.finalize(node2, new Node4.ImportDeclaration(specifiers, src2));
            };
            Parser4.prototype.parseExportSpecifier = function() {
              var node2 = this.createNode();
              var local = this.parseIdentifierName();
              var exported = local;
              if (this.matchContextualKeyword("as")) {
                this.nextToken();
                exported = this.parseIdentifierName();
              }
              return this.finalize(node2, new Node4.ExportSpecifier(local, exported));
            };
            Parser4.prototype.parseExportDeclaration = function() {
              if (this.context.inFunctionBody) {
                this.throwError(messages_1.Messages.IllegalExportDeclaration);
              }
              var node2 = this.createNode();
              this.expectKeyword("export");
              var exportDeclaration;
              if (this.matchKeyword("default")) {
                this.nextToken();
                if (this.matchKeyword("function")) {
                  var declaration2 = this.parseFunctionDeclaration(true);
                  exportDeclaration = this.finalize(node2, new Node4.ExportDefaultDeclaration(declaration2));
                } else if (this.matchKeyword("class")) {
                  var declaration2 = this.parseClassDeclaration(true);
                  exportDeclaration = this.finalize(node2, new Node4.ExportDefaultDeclaration(declaration2));
                } else if (this.matchContextualKeyword("async")) {
                  var declaration2 = this.matchAsyncFunction() ? this.parseFunctionDeclaration(true) : this.parseAssignmentExpression();
                  exportDeclaration = this.finalize(node2, new Node4.ExportDefaultDeclaration(declaration2));
                } else {
                  if (this.matchContextualKeyword("from")) {
                    this.throwError(messages_1.Messages.UnexpectedToken, this.lookahead.value);
                  }
                  var declaration2 = this.match("{") ? this.parseObjectInitializer() : this.match("[") ? this.parseArrayInitializer() : this.parseAssignmentExpression();
                  this.consumeSemicolon();
                  exportDeclaration = this.finalize(node2, new Node4.ExportDefaultDeclaration(declaration2));
                }
              } else if (this.match("*")) {
                this.nextToken();
                if (!this.matchContextualKeyword("from")) {
                  var message = this.lookahead.value ? messages_1.Messages.UnexpectedToken : messages_1.Messages.MissingFromClause;
                  this.throwError(message, this.lookahead.value);
                }
                this.nextToken();
                var src2 = this.parseModuleSpecifier();
                this.consumeSemicolon();
                exportDeclaration = this.finalize(node2, new Node4.ExportAllDeclaration(src2));
              } else if (this.lookahead.type === 4) {
                var declaration2 = void 0;
                switch (this.lookahead.value) {
                  case "let":
                  case "const":
                    declaration2 = this.parseLexicalDeclaration({ inFor: false });
                    break;
                  case "var":
                  case "class":
                  case "function":
                    declaration2 = this.parseStatementListItem();
                    break;
                  default:
                    this.throwUnexpectedToken(this.lookahead);
                }
                exportDeclaration = this.finalize(node2, new Node4.ExportNamedDeclaration(declaration2, [], null));
              } else if (this.matchAsyncFunction()) {
                var declaration2 = this.parseFunctionDeclaration();
                exportDeclaration = this.finalize(node2, new Node4.ExportNamedDeclaration(declaration2, [], null));
              } else {
                var specifiers = [];
                var source2 = null;
                var isExportFromIdentifier = false;
                this.expect("{");
                while (!this.match("}")) {
                  isExportFromIdentifier = isExportFromIdentifier || this.matchKeyword("default");
                  specifiers.push(this.parseExportSpecifier());
                  if (!this.match("}")) {
                    this.expect(",");
                  }
                }
                this.expect("}");
                if (this.matchContextualKeyword("from")) {
                  this.nextToken();
                  source2 = this.parseModuleSpecifier();
                  this.consumeSemicolon();
                } else if (isExportFromIdentifier) {
                  var message = this.lookahead.value ? messages_1.Messages.UnexpectedToken : messages_1.Messages.MissingFromClause;
                  this.throwError(message, this.lookahead.value);
                } else {
                  this.consumeSemicolon();
                }
                exportDeclaration = this.finalize(node2, new Node4.ExportNamedDeclaration(null, specifiers, source2));
              }
              return exportDeclaration;
            };
            return Parser4;
          }();
          exports$12.Parser = Parser3;
        },
        function(module3, exports$12) {
          Object.defineProperty(exports$12, "__esModule", { value: true });
          function assert2(condition, message) {
            if (!condition) {
              throw new Error("ASSERT: " + message);
            }
          }
          exports$12.assert = assert2;
        },
        function(module3, exports$12) {
          Object.defineProperty(exports$12, "__esModule", { value: true });
          var ErrorHandler = function() {
            function ErrorHandler2() {
              this.errors = [];
              this.tolerant = false;
            }
            ErrorHandler2.prototype.recordError = function(error) {
              this.errors.push(error);
            };
            ErrorHandler2.prototype.tolerate = function(error) {
              if (this.tolerant) {
                this.recordError(error);
              } else {
                throw error;
              }
            };
            ErrorHandler2.prototype.constructError = function(msg, column) {
              var error = new Error(msg);
              try {
                throw error;
              } catch (base) {
                if (Object.create && Object.defineProperty) {
                  error = Object.create(base);
                  Object.defineProperty(error, "column", { value: column });
                }
              }
              return error;
            };
            ErrorHandler2.prototype.createError = function(index2, line, col, description2) {
              var msg = "Line " + line + ": " + description2;
              var error = this.constructError(msg, col);
              error.index = index2;
              error.lineNumber = line;
              error.description = description2;
              return error;
            };
            ErrorHandler2.prototype.throwError = function(index2, line, col, description2) {
              throw this.createError(index2, line, col, description2);
            };
            ErrorHandler2.prototype.tolerateError = function(index2, line, col, description2) {
              var error = this.createError(index2, line, col, description2);
              if (this.tolerant) {
                this.recordError(error);
              } else {
                throw error;
              }
            };
            return ErrorHandler2;
          }();
          exports$12.ErrorHandler = ErrorHandler;
        },
        function(module3, exports$12) {
          Object.defineProperty(exports$12, "__esModule", { value: true });
          exports$12.Messages = {
            BadGetterArity: "Getter must not have any formal parameters",
            BadSetterArity: "Setter must have exactly one formal parameter",
            BadSetterRestParameter: "Setter function argument must not be a rest parameter",
            ConstructorIsAsync: "Class constructor may not be an async method",
            ConstructorSpecialMethod: "Class constructor may not be an accessor",
            DeclarationMissingInitializer: "Missing initializer in %0 declaration",
            DefaultRestParameter: "Unexpected token =",
            DuplicateBinding: "Duplicate binding %0",
            DuplicateConstructor: "A class may only have one constructor",
            DuplicateProtoProperty: "Duplicate __proto__ fields are not allowed in object literals",
            ForInOfLoopInitializer: "%0 loop variable declaration may not have an initializer",
            GeneratorInLegacyContext: "Generator declarations are not allowed in legacy contexts",
            IllegalBreak: "Illegal break statement",
            IllegalContinue: "Illegal continue statement",
            IllegalExportDeclaration: "Unexpected token",
            IllegalImportDeclaration: "Unexpected token",
            IllegalLanguageModeDirective: "Illegal 'use strict' directive in function with non-simple parameter list",
            IllegalReturn: "Illegal return statement",
            InvalidEscapedReservedWord: "Keyword must not contain escaped characters",
            InvalidHexEscapeSequence: "Invalid hexadecimal escape sequence",
            InvalidLHSInAssignment: "Invalid left-hand side in assignment",
            InvalidLHSInForIn: "Invalid left-hand side in for-in",
            InvalidLHSInForLoop: "Invalid left-hand side in for-loop",
            InvalidModuleSpecifier: "Unexpected token",
            InvalidRegExp: "Invalid regular expression",
            LetInLexicalBinding: "let is disallowed as a lexically bound name",
            MissingFromClause: "Unexpected token",
            MultipleDefaultsInSwitch: "More than one default clause in switch statement",
            NewlineAfterThrow: "Illegal newline after throw",
            NoAsAfterImportNamespace: "Unexpected token",
            NoCatchOrFinally: "Missing catch or finally after try",
            ParameterAfterRestParameter: "Rest parameter must be last formal parameter",
            Redeclaration: "%0 '%1' has already been declared",
            StaticPrototype: "Classes may not have static property named prototype",
            StrictCatchVariable: "Catch variable may not be eval or arguments in strict mode",
            StrictDelete: "Delete of an unqualified identifier in strict mode.",
            StrictFunction: "In strict mode code, functions can only be declared at top level or inside a block",
            StrictFunctionName: "Function name may not be eval or arguments in strict mode",
            StrictLHSAssignment: "Assignment to eval or arguments is not allowed in strict mode",
            StrictLHSPostfix: "Postfix increment/decrement may not have eval or arguments operand in strict mode",
            StrictLHSPrefix: "Prefix increment/decrement may not have eval or arguments operand in strict mode",
            StrictModeWith: "Strict mode code may not include a with statement",
            StrictOctalLiteral: "Octal literals are not allowed in strict mode.",
            StrictParamDupe: "Strict mode function may not have duplicate parameter names",
            StrictParamName: "Parameter name eval or arguments is not allowed in strict mode",
            StrictReservedWord: "Use of future reserved word in strict mode",
            StrictVarName: "Variable name may not be eval or arguments in strict mode",
            TemplateOctalLiteral: "Octal literals are not allowed in template strings.",
            UnexpectedEOS: "Unexpected end of input",
            UnexpectedIdentifier: "Unexpected identifier",
            UnexpectedNumber: "Unexpected number",
            UnexpectedReserved: "Unexpected reserved word",
            UnexpectedString: "Unexpected string",
            UnexpectedTemplate: "Unexpected quasi %0",
            UnexpectedToken: "Unexpected token %0",
            UnexpectedTokenIllegal: "Unexpected token ILLEGAL",
            UnknownLabel: "Undefined label '%0'",
            UnterminatedRegExp: "Invalid regular expression: missing /"
          };
        },
        function(module3, exports$12, __webpack_require__) {
          Object.defineProperty(exports$12, "__esModule", { value: true });
          var assert_1 = __webpack_require__(9);
          var character_1 = __webpack_require__(4);
          var messages_1 = __webpack_require__(11);
          function hexValue(ch) {
            return "0123456789abcdef".indexOf(ch.toLowerCase());
          }
          function octalValue(ch) {
            return "01234567".indexOf(ch);
          }
          var Scanner = function() {
            function Scanner2(code2, handler) {
              this.source = code2;
              this.errorHandler = handler;
              this.trackComment = false;
              this.isModule = false;
              this.length = code2.length;
              this.index = 0;
              this.lineNumber = code2.length > 0 ? 1 : 0;
              this.lineStart = 0;
              this.curlyStack = [];
            }
            Scanner2.prototype.saveState = function() {
              return {
                index: this.index,
                lineNumber: this.lineNumber,
                lineStart: this.lineStart
              };
            };
            Scanner2.prototype.restoreState = function(state) {
              this.index = state.index;
              this.lineNumber = state.lineNumber;
              this.lineStart = state.lineStart;
            };
            Scanner2.prototype.eof = function() {
              return this.index >= this.length;
            };
            Scanner2.prototype.throwUnexpectedToken = function(message) {
              if (message === void 0) {
                message = messages_1.Messages.UnexpectedTokenIllegal;
              }
              return this.errorHandler.throwError(this.index, this.lineNumber, this.index - this.lineStart + 1, message);
            };
            Scanner2.prototype.tolerateUnexpectedToken = function(message) {
              if (message === void 0) {
                message = messages_1.Messages.UnexpectedTokenIllegal;
              }
              this.errorHandler.tolerateError(this.index, this.lineNumber, this.index - this.lineStart + 1, message);
            };
            Scanner2.prototype.skipSingleLineComment = function(offset) {
              var comments = [];
              var start, loc;
              if (this.trackComment) {
                comments = [];
                start = this.index - offset;
                loc = {
                  start: {
                    line: this.lineNumber,
                    column: this.index - this.lineStart - offset
                  },
                  end: {}
                };
              }
              while (!this.eof()) {
                var ch = this.source.charCodeAt(this.index);
                ++this.index;
                if (character_1.Character.isLineTerminator(ch)) {
                  if (this.trackComment) {
                    loc.end = {
                      line: this.lineNumber,
                      column: this.index - this.lineStart - 1
                    };
                    var entry = {
                      multiLine: false,
                      slice: [start + offset, this.index - 1],
                      range: [start, this.index - 1],
                      loc
                    };
                    comments.push(entry);
                  }
                  if (ch === 13 && this.source.charCodeAt(this.index) === 10) {
                    ++this.index;
                  }
                  ++this.lineNumber;
                  this.lineStart = this.index;
                  return comments;
                }
              }
              if (this.trackComment) {
                loc.end = {
                  line: this.lineNumber,
                  column: this.index - this.lineStart
                };
                var entry = {
                  multiLine: false,
                  slice: [start + offset, this.index],
                  range: [start, this.index],
                  loc
                };
                comments.push(entry);
              }
              return comments;
            };
            Scanner2.prototype.skipMultiLineComment = function() {
              var comments = [];
              var start, loc;
              if (this.trackComment) {
                comments = [];
                start = this.index - 2;
                loc = {
                  start: {
                    line: this.lineNumber,
                    column: this.index - this.lineStart - 2
                  },
                  end: {}
                };
              }
              while (!this.eof()) {
                var ch = this.source.charCodeAt(this.index);
                if (character_1.Character.isLineTerminator(ch)) {
                  if (ch === 13 && this.source.charCodeAt(this.index + 1) === 10) {
                    ++this.index;
                  }
                  ++this.lineNumber;
                  ++this.index;
                  this.lineStart = this.index;
                } else if (ch === 42) {
                  if (this.source.charCodeAt(this.index + 1) === 47) {
                    this.index += 2;
                    if (this.trackComment) {
                      loc.end = {
                        line: this.lineNumber,
                        column: this.index - this.lineStart
                      };
                      var entry = {
                        multiLine: true,
                        slice: [start + 2, this.index - 2],
                        range: [start, this.index],
                        loc
                      };
                      comments.push(entry);
                    }
                    return comments;
                  }
                  ++this.index;
                } else {
                  ++this.index;
                }
              }
              if (this.trackComment) {
                loc.end = {
                  line: this.lineNumber,
                  column: this.index - this.lineStart
                };
                var entry = {
                  multiLine: true,
                  slice: [start + 2, this.index],
                  range: [start, this.index],
                  loc
                };
                comments.push(entry);
              }
              this.tolerateUnexpectedToken();
              return comments;
            };
            Scanner2.prototype.scanComments = function() {
              var comments;
              if (this.trackComment) {
                comments = [];
              }
              var start = this.index === 0;
              while (!this.eof()) {
                var ch = this.source.charCodeAt(this.index);
                if (character_1.Character.isWhiteSpace(ch)) {
                  ++this.index;
                } else if (character_1.Character.isLineTerminator(ch)) {
                  ++this.index;
                  if (ch === 13 && this.source.charCodeAt(this.index) === 10) {
                    ++this.index;
                  }
                  ++this.lineNumber;
                  this.lineStart = this.index;
                  start = true;
                } else if (ch === 47) {
                  ch = this.source.charCodeAt(this.index + 1);
                  if (ch === 47) {
                    this.index += 2;
                    var comment = this.skipSingleLineComment(2);
                    if (this.trackComment) {
                      comments = comments.concat(comment);
                    }
                    start = true;
                  } else if (ch === 42) {
                    this.index += 2;
                    var comment = this.skipMultiLineComment();
                    if (this.trackComment) {
                      comments = comments.concat(comment);
                    }
                  } else {
                    break;
                  }
                } else if (start && ch === 45) {
                  if (this.source.charCodeAt(this.index + 1) === 45 && this.source.charCodeAt(this.index + 2) === 62) {
                    this.index += 3;
                    var comment = this.skipSingleLineComment(3);
                    if (this.trackComment) {
                      comments = comments.concat(comment);
                    }
                  } else {
                    break;
                  }
                } else if (ch === 60 && !this.isModule) {
                  if (this.source.slice(this.index + 1, this.index + 4) === "!--") {
                    this.index += 4;
                    var comment = this.skipSingleLineComment(4);
                    if (this.trackComment) {
                      comments = comments.concat(comment);
                    }
                  } else {
                    break;
                  }
                } else {
                  break;
                }
              }
              return comments;
            };
            Scanner2.prototype.isFutureReservedWord = function(id2) {
              switch (id2) {
                case "enum":
                case "export":
                case "import":
                case "super":
                  return true;
                default:
                  return false;
              }
            };
            Scanner2.prototype.isStrictModeReservedWord = function(id2) {
              switch (id2) {
                case "implements":
                case "interface":
                case "package":
                case "private":
                case "protected":
                case "public":
                case "static":
                case "yield":
                case "let":
                  return true;
                default:
                  return false;
              }
            };
            Scanner2.prototype.isRestrictedWord = function(id2) {
              return id2 === "eval" || id2 === "arguments";
            };
            Scanner2.prototype.isKeyword = function(id2) {
              switch (id2.length) {
                case 2:
                  return id2 === "if" || id2 === "in" || id2 === "do";
                case 3:
                  return id2 === "var" || id2 === "for" || id2 === "new" || id2 === "try" || id2 === "let";
                case 4:
                  return id2 === "this" || id2 === "else" || id2 === "case" || id2 === "void" || id2 === "with" || id2 === "enum";
                case 5:
                  return id2 === "while" || id2 === "break" || id2 === "catch" || id2 === "throw" || id2 === "const" || id2 === "yield" || id2 === "class" || id2 === "super";
                case 6:
                  return id2 === "return" || id2 === "typeof" || id2 === "delete" || id2 === "switch" || id2 === "export" || id2 === "import";
                case 7:
                  return id2 === "default" || id2 === "finally" || id2 === "extends";
                case 8:
                  return id2 === "function" || id2 === "continue" || id2 === "debugger";
                case 10:
                  return id2 === "instanceof";
                default:
                  return false;
              }
            };
            Scanner2.prototype.codePointAt = function(i) {
              var cp = this.source.charCodeAt(i);
              if (cp >= 55296 && cp <= 56319) {
                var second = this.source.charCodeAt(i + 1);
                if (second >= 56320 && second <= 57343) {
                  var first2 = cp;
                  cp = (first2 - 55296) * 1024 + second - 56320 + 65536;
                }
              }
              return cp;
            };
            Scanner2.prototype.scanHexEscape = function(prefix) {
              var len = prefix === "u" ? 4 : 2;
              var code2 = 0;
              for (var i = 0; i < len; ++i) {
                if (!this.eof() && character_1.Character.isHexDigit(this.source.charCodeAt(this.index))) {
                  code2 = code2 * 16 + hexValue(this.source[this.index++]);
                } else {
                  return null;
                }
              }
              return String.fromCharCode(code2);
            };
            Scanner2.prototype.scanUnicodeCodePointEscape = function() {
              var ch = this.source[this.index];
              var code2 = 0;
              if (ch === "}") {
                this.throwUnexpectedToken();
              }
              while (!this.eof()) {
                ch = this.source[this.index++];
                if (!character_1.Character.isHexDigit(ch.charCodeAt(0))) {
                  break;
                }
                code2 = code2 * 16 + hexValue(ch);
              }
              if (code2 > 1114111 || ch !== "}") {
                this.throwUnexpectedToken();
              }
              return character_1.Character.fromCodePoint(code2);
            };
            Scanner2.prototype.getIdentifier = function() {
              var start = this.index++;
              while (!this.eof()) {
                var ch = this.source.charCodeAt(this.index);
                if (ch === 92) {
                  this.index = start;
                  return this.getComplexIdentifier();
                } else if (ch >= 55296 && ch < 57343) {
                  this.index = start;
                  return this.getComplexIdentifier();
                }
                if (character_1.Character.isIdentifierPart(ch)) {
                  ++this.index;
                } else {
                  break;
                }
              }
              return this.source.slice(start, this.index);
            };
            Scanner2.prototype.getComplexIdentifier = function() {
              var cp = this.codePointAt(this.index);
              var id2 = character_1.Character.fromCodePoint(cp);
              this.index += id2.length;
              var ch;
              if (cp === 92) {
                if (this.source.charCodeAt(this.index) !== 117) {
                  this.throwUnexpectedToken();
                }
                ++this.index;
                if (this.source[this.index] === "{") {
                  ++this.index;
                  ch = this.scanUnicodeCodePointEscape();
                } else {
                  ch = this.scanHexEscape("u");
                  if (ch === null || ch === "\\" || !character_1.Character.isIdentifierStart(ch.charCodeAt(0))) {
                    this.throwUnexpectedToken();
                  }
                }
                id2 = ch;
              }
              while (!this.eof()) {
                cp = this.codePointAt(this.index);
                if (!character_1.Character.isIdentifierPart(cp)) {
                  break;
                }
                ch = character_1.Character.fromCodePoint(cp);
                id2 += ch;
                this.index += ch.length;
                if (cp === 92) {
                  id2 = id2.substr(0, id2.length - 1);
                  if (this.source.charCodeAt(this.index) !== 117) {
                    this.throwUnexpectedToken();
                  }
                  ++this.index;
                  if (this.source[this.index] === "{") {
                    ++this.index;
                    ch = this.scanUnicodeCodePointEscape();
                  } else {
                    ch = this.scanHexEscape("u");
                    if (ch === null || ch === "\\" || !character_1.Character.isIdentifierPart(ch.charCodeAt(0))) {
                      this.throwUnexpectedToken();
                    }
                  }
                  id2 += ch;
                }
              }
              return id2;
            };
            Scanner2.prototype.octalToDecimal = function(ch) {
              var octal = ch !== "0";
              var code2 = octalValue(ch);
              if (!this.eof() && character_1.Character.isOctalDigit(this.source.charCodeAt(this.index))) {
                octal = true;
                code2 = code2 * 8 + octalValue(this.source[this.index++]);
                if ("0123".indexOf(ch) >= 0 && !this.eof() && character_1.Character.isOctalDigit(this.source.charCodeAt(this.index))) {
                  code2 = code2 * 8 + octalValue(this.source[this.index++]);
                }
              }
              return {
                code: code2,
                octal
              };
            };
            Scanner2.prototype.scanIdentifier = function() {
              var type2;
              var start = this.index;
              var id2 = this.source.charCodeAt(start) === 92 ? this.getComplexIdentifier() : this.getIdentifier();
              if (id2.length === 1) {
                type2 = 3;
              } else if (this.isKeyword(id2)) {
                type2 = 4;
              } else if (id2 === "null") {
                type2 = 5;
              } else if (id2 === "true" || id2 === "false") {
                type2 = 1;
              } else {
                type2 = 3;
              }
              if (type2 !== 3 && start + id2.length !== this.index) {
                var restore = this.index;
                this.index = start;
                this.tolerateUnexpectedToken(messages_1.Messages.InvalidEscapedReservedWord);
                this.index = restore;
              }
              return {
                type: type2,
                value: id2,
                lineNumber: this.lineNumber,
                lineStart: this.lineStart,
                start,
                end: this.index
              };
            };
            Scanner2.prototype.scanPunctuator = function() {
              var start = this.index;
              var str = this.source[this.index];
              switch (str) {
                case "(":
                case "{":
                  if (str === "{") {
                    this.curlyStack.push("{");
                  }
                  ++this.index;
                  break;
                case ".":
                  ++this.index;
                  if (this.source[this.index] === "." && this.source[this.index + 1] === ".") {
                    this.index += 2;
                    str = "...";
                  }
                  break;
                case "}":
                  ++this.index;
                  this.curlyStack.pop();
                  break;
                case ")":
                case ";":
                case ",":
                case "[":
                case "]":
                case ":":
                case "?":
                case "~":
                  ++this.index;
                  break;
                default:
                  str = this.source.substr(this.index, 4);
                  if (str === ">>>=") {
                    this.index += 4;
                  } else {
                    str = str.substr(0, 3);
                    if (str === "===" || str === "!==" || str === ">>>" || str === "<<=" || str === ">>=" || str === "**=") {
                      this.index += 3;
                    } else {
                      str = str.substr(0, 2);
                      if (str === "&&" || str === "||" || str === "==" || str === "!=" || str === "+=" || str === "-=" || str === "*=" || str === "/=" || str === "++" || str === "--" || str === "<<" || str === ">>" || str === "&=" || str === "|=" || str === "^=" || str === "%=" || str === "<=" || str === ">=" || str === "=>" || str === "**") {
                        this.index += 2;
                      } else {
                        str = this.source[this.index];
                        if ("<>=!+-*%&|^/".indexOf(str) >= 0) {
                          ++this.index;
                        }
                      }
                    }
                  }
              }
              if (this.index === start) {
                this.throwUnexpectedToken();
              }
              return {
                type: 7,
                value: str,
                lineNumber: this.lineNumber,
                lineStart: this.lineStart,
                start,
                end: this.index
              };
            };
            Scanner2.prototype.scanHexLiteral = function(start) {
              var num = "";
              while (!this.eof()) {
                if (!character_1.Character.isHexDigit(this.source.charCodeAt(this.index))) {
                  break;
                }
                num += this.source[this.index++];
              }
              if (num.length === 0) {
                this.throwUnexpectedToken();
              }
              if (character_1.Character.isIdentifierStart(this.source.charCodeAt(this.index))) {
                this.throwUnexpectedToken();
              }
              return {
                type: 6,
                value: parseInt("0x" + num, 16),
                lineNumber: this.lineNumber,
                lineStart: this.lineStart,
                start,
                end: this.index
              };
            };
            Scanner2.prototype.scanBinaryLiteral = function(start) {
              var num = "";
              var ch;
              while (!this.eof()) {
                ch = this.source[this.index];
                if (ch !== "0" && ch !== "1") {
                  break;
                }
                num += this.source[this.index++];
              }
              if (num.length === 0) {
                this.throwUnexpectedToken();
              }
              if (!this.eof()) {
                ch = this.source.charCodeAt(this.index);
                if (character_1.Character.isIdentifierStart(ch) || character_1.Character.isDecimalDigit(ch)) {
                  this.throwUnexpectedToken();
                }
              }
              return {
                type: 6,
                value: parseInt(num, 2),
                lineNumber: this.lineNumber,
                lineStart: this.lineStart,
                start,
                end: this.index
              };
            };
            Scanner2.prototype.scanOctalLiteral = function(prefix, start) {
              var num = "";
              var octal = false;
              if (character_1.Character.isOctalDigit(prefix.charCodeAt(0))) {
                octal = true;
                num = "0" + this.source[this.index++];
              } else {
                ++this.index;
              }
              while (!this.eof()) {
                if (!character_1.Character.isOctalDigit(this.source.charCodeAt(this.index))) {
                  break;
                }
                num += this.source[this.index++];
              }
              if (!octal && num.length === 0) {
                this.throwUnexpectedToken();
              }
              if (character_1.Character.isIdentifierStart(this.source.charCodeAt(this.index)) || character_1.Character.isDecimalDigit(this.source.charCodeAt(this.index))) {
                this.throwUnexpectedToken();
              }
              return {
                type: 6,
                value: parseInt(num, 8),
                octal,
                lineNumber: this.lineNumber,
                lineStart: this.lineStart,
                start,
                end: this.index
              };
            };
            Scanner2.prototype.isImplicitOctalLiteral = function() {
              for (var i = this.index + 1; i < this.length; ++i) {
                var ch = this.source[i];
                if (ch === "8" || ch === "9") {
                  return false;
                }
                if (!character_1.Character.isOctalDigit(ch.charCodeAt(0))) {
                  return true;
                }
              }
              return true;
            };
            Scanner2.prototype.scanNumericLiteral = function() {
              var start = this.index;
              var ch = this.source[start];
              assert_1.assert(character_1.Character.isDecimalDigit(ch.charCodeAt(0)) || ch === ".", "Numeric literal must start with a decimal digit or a decimal point");
              var num = "";
              if (ch !== ".") {
                num = this.source[this.index++];
                ch = this.source[this.index];
                if (num === "0") {
                  if (ch === "x" || ch === "X") {
                    ++this.index;
                    return this.scanHexLiteral(start);
                  }
                  if (ch === "b" || ch === "B") {
                    ++this.index;
                    return this.scanBinaryLiteral(start);
                  }
                  if (ch === "o" || ch === "O") {
                    return this.scanOctalLiteral(ch, start);
                  }
                  if (ch && character_1.Character.isOctalDigit(ch.charCodeAt(0))) {
                    if (this.isImplicitOctalLiteral()) {
                      return this.scanOctalLiteral(ch, start);
                    }
                  }
                }
                while (character_1.Character.isDecimalDigit(this.source.charCodeAt(this.index))) {
                  num += this.source[this.index++];
                }
                ch = this.source[this.index];
              }
              if (ch === ".") {
                num += this.source[this.index++];
                while (character_1.Character.isDecimalDigit(this.source.charCodeAt(this.index))) {
                  num += this.source[this.index++];
                }
                ch = this.source[this.index];
              }
              if (ch === "e" || ch === "E") {
                num += this.source[this.index++];
                ch = this.source[this.index];
                if (ch === "+" || ch === "-") {
                  num += this.source[this.index++];
                }
                if (character_1.Character.isDecimalDigit(this.source.charCodeAt(this.index))) {
                  while (character_1.Character.isDecimalDigit(this.source.charCodeAt(this.index))) {
                    num += this.source[this.index++];
                  }
                } else {
                  this.throwUnexpectedToken();
                }
              }
              if (character_1.Character.isIdentifierStart(this.source.charCodeAt(this.index))) {
                this.throwUnexpectedToken();
              }
              return {
                type: 6,
                value: parseFloat(num),
                lineNumber: this.lineNumber,
                lineStart: this.lineStart,
                start,
                end: this.index
              };
            };
            Scanner2.prototype.scanStringLiteral = function() {
              var start = this.index;
              var quote = this.source[start];
              assert_1.assert(quote === "'" || quote === '"', "String literal must starts with a quote");
              ++this.index;
              var octal = false;
              var str = "";
              while (!this.eof()) {
                var ch = this.source[this.index++];
                if (ch === quote) {
                  quote = "";
                  break;
                } else if (ch === "\\") {
                  ch = this.source[this.index++];
                  if (!ch || !character_1.Character.isLineTerminator(ch.charCodeAt(0))) {
                    switch (ch) {
                      case "u":
                        if (this.source[this.index] === "{") {
                          ++this.index;
                          str += this.scanUnicodeCodePointEscape();
                        } else {
                          var unescaped_1 = this.scanHexEscape(ch);
                          if (unescaped_1 === null) {
                            this.throwUnexpectedToken();
                          }
                          str += unescaped_1;
                        }
                        break;
                      case "x":
                        var unescaped = this.scanHexEscape(ch);
                        if (unescaped === null) {
                          this.throwUnexpectedToken(messages_1.Messages.InvalidHexEscapeSequence);
                        }
                        str += unescaped;
                        break;
                      case "n":
                        str += "\n";
                        break;
                      case "r":
                        str += "\r";
                        break;
                      case "t":
                        str += "	";
                        break;
                      case "b":
                        str += "\b";
                        break;
                      case "f":
                        str += "\f";
                        break;
                      case "v":
                        str += "\v";
                        break;
                      case "8":
                      case "9":
                        str += ch;
                        this.tolerateUnexpectedToken();
                        break;
                      default:
                        if (ch && character_1.Character.isOctalDigit(ch.charCodeAt(0))) {
                          var octToDec = this.octalToDecimal(ch);
                          octal = octToDec.octal || octal;
                          str += String.fromCharCode(octToDec.code);
                        } else {
                          str += ch;
                        }
                        break;
                    }
                  } else {
                    ++this.lineNumber;
                    if (ch === "\r" && this.source[this.index] === "\n") {
                      ++this.index;
                    }
                    this.lineStart = this.index;
                  }
                } else if (character_1.Character.isLineTerminator(ch.charCodeAt(0))) {
                  break;
                } else {
                  str += ch;
                }
              }
              if (quote !== "") {
                this.index = start;
                this.throwUnexpectedToken();
              }
              return {
                type: 8,
                value: str,
                octal,
                lineNumber: this.lineNumber,
                lineStart: this.lineStart,
                start,
                end: this.index
              };
            };
            Scanner2.prototype.scanTemplate = function() {
              var cooked = "";
              var terminated = false;
              var start = this.index;
              var head = this.source[start] === "`";
              var tail = false;
              var rawOffset = 2;
              ++this.index;
              while (!this.eof()) {
                var ch = this.source[this.index++];
                if (ch === "`") {
                  rawOffset = 1;
                  tail = true;
                  terminated = true;
                  break;
                } else if (ch === "$") {
                  if (this.source[this.index] === "{") {
                    this.curlyStack.push("${");
                    ++this.index;
                    terminated = true;
                    break;
                  }
                  cooked += ch;
                } else if (ch === "\\") {
                  ch = this.source[this.index++];
                  if (!character_1.Character.isLineTerminator(ch.charCodeAt(0))) {
                    switch (ch) {
                      case "n":
                        cooked += "\n";
                        break;
                      case "r":
                        cooked += "\r";
                        break;
                      case "t":
                        cooked += "	";
                        break;
                      case "u":
                        if (this.source[this.index] === "{") {
                          ++this.index;
                          cooked += this.scanUnicodeCodePointEscape();
                        } else {
                          var restore = this.index;
                          var unescaped_2 = this.scanHexEscape(ch);
                          if (unescaped_2 !== null) {
                            cooked += unescaped_2;
                          } else {
                            this.index = restore;
                            cooked += ch;
                          }
                        }
                        break;
                      case "x":
                        var unescaped = this.scanHexEscape(ch);
                        if (unescaped === null) {
                          this.throwUnexpectedToken(messages_1.Messages.InvalidHexEscapeSequence);
                        }
                        cooked += unescaped;
                        break;
                      case "b":
                        cooked += "\b";
                        break;
                      case "f":
                        cooked += "\f";
                        break;
                      case "v":
                        cooked += "\v";
                        break;
                      default:
                        if (ch === "0") {
                          if (character_1.Character.isDecimalDigit(this.source.charCodeAt(this.index))) {
                            this.throwUnexpectedToken(messages_1.Messages.TemplateOctalLiteral);
                          }
                          cooked += "\0";
                        } else if (character_1.Character.isOctalDigit(ch.charCodeAt(0))) {
                          this.throwUnexpectedToken(messages_1.Messages.TemplateOctalLiteral);
                        } else {
                          cooked += ch;
                        }
                        break;
                    }
                  } else {
                    ++this.lineNumber;
                    if (ch === "\r" && this.source[this.index] === "\n") {
                      ++this.index;
                    }
                    this.lineStart = this.index;
                  }
                } else if (character_1.Character.isLineTerminator(ch.charCodeAt(0))) {
                  ++this.lineNumber;
                  if (ch === "\r" && this.source[this.index] === "\n") {
                    ++this.index;
                  }
                  this.lineStart = this.index;
                  cooked += "\n";
                } else {
                  cooked += ch;
                }
              }
              if (!terminated) {
                this.throwUnexpectedToken();
              }
              if (!head) {
                this.curlyStack.pop();
              }
              return {
                type: 10,
                value: this.source.slice(start + 1, this.index - rawOffset),
                cooked,
                head,
                tail,
                lineNumber: this.lineNumber,
                lineStart: this.lineStart,
                start,
                end: this.index
              };
            };
            Scanner2.prototype.testRegExp = function(pattern2, flags) {
              var astralSubstitute = "\uFFFF";
              var tmp = pattern2;
              var self2 = this;
              if (flags.indexOf("u") >= 0) {
                tmp = tmp.replace(/\\u\{([0-9a-fA-F]+)\}|\\u([a-fA-F0-9]{4})/g, function($0, $1, $2) {
                  var codePoint = parseInt($1 || $2, 16);
                  if (codePoint > 1114111) {
                    self2.throwUnexpectedToken(messages_1.Messages.InvalidRegExp);
                  }
                  if (codePoint <= 65535) {
                    return String.fromCharCode(codePoint);
                  }
                  return astralSubstitute;
                }).replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g, astralSubstitute);
              }
              try {
                RegExp(tmp);
              } catch (e) {
                this.throwUnexpectedToken(messages_1.Messages.InvalidRegExp);
              }
              try {
                return new RegExp(pattern2, flags);
              } catch (exception) {
                return null;
              }
            };
            Scanner2.prototype.scanRegExpBody = function() {
              var ch = this.source[this.index];
              assert_1.assert(ch === "/", "Regular expression literal must start with a slash");
              var str = this.source[this.index++];
              var classMarker = false;
              var terminated = false;
              while (!this.eof()) {
                ch = this.source[this.index++];
                str += ch;
                if (ch === "\\") {
                  ch = this.source[this.index++];
                  if (character_1.Character.isLineTerminator(ch.charCodeAt(0))) {
                    this.throwUnexpectedToken(messages_1.Messages.UnterminatedRegExp);
                  }
                  str += ch;
                } else if (character_1.Character.isLineTerminator(ch.charCodeAt(0))) {
                  this.throwUnexpectedToken(messages_1.Messages.UnterminatedRegExp);
                } else if (classMarker) {
                  if (ch === "]") {
                    classMarker = false;
                  }
                } else {
                  if (ch === "/") {
                    terminated = true;
                    break;
                  } else if (ch === "[") {
                    classMarker = true;
                  }
                }
              }
              if (!terminated) {
                this.throwUnexpectedToken(messages_1.Messages.UnterminatedRegExp);
              }
              return str.substr(1, str.length - 2);
            };
            Scanner2.prototype.scanRegExpFlags = function() {
              var str = "";
              var flags = "";
              while (!this.eof()) {
                var ch = this.source[this.index];
                if (!character_1.Character.isIdentifierPart(ch.charCodeAt(0))) {
                  break;
                }
                ++this.index;
                if (ch === "\\" && !this.eof()) {
                  ch = this.source[this.index];
                  if (ch === "u") {
                    ++this.index;
                    var restore = this.index;
                    var char = this.scanHexEscape("u");
                    if (char !== null) {
                      flags += char;
                      for (str += "\\u"; restore < this.index; ++restore) {
                        str += this.source[restore];
                      }
                    } else {
                      this.index = restore;
                      flags += "u";
                      str += "\\u";
                    }
                    this.tolerateUnexpectedToken();
                  } else {
                    str += "\\";
                    this.tolerateUnexpectedToken();
                  }
                } else {
                  flags += ch;
                  str += ch;
                }
              }
              return flags;
            };
            Scanner2.prototype.scanRegExp = function() {
              var start = this.index;
              var pattern2 = this.scanRegExpBody();
              var flags = this.scanRegExpFlags();
              var value = this.testRegExp(pattern2, flags);
              return {
                type: 9,
                value: "",
                pattern: pattern2,
                flags,
                regex: value,
                lineNumber: this.lineNumber,
                lineStart: this.lineStart,
                start,
                end: this.index
              };
            };
            Scanner2.prototype.lex = function() {
              if (this.eof()) {
                return {
                  type: 2,
                  value: "",
                  lineNumber: this.lineNumber,
                  lineStart: this.lineStart,
                  start: this.index,
                  end: this.index
                };
              }
              var cp = this.source.charCodeAt(this.index);
              if (character_1.Character.isIdentifierStart(cp)) {
                return this.scanIdentifier();
              }
              if (cp === 40 || cp === 41 || cp === 59) {
                return this.scanPunctuator();
              }
              if (cp === 39 || cp === 34) {
                return this.scanStringLiteral();
              }
              if (cp === 46) {
                if (character_1.Character.isDecimalDigit(this.source.charCodeAt(this.index + 1))) {
                  return this.scanNumericLiteral();
                }
                return this.scanPunctuator();
              }
              if (character_1.Character.isDecimalDigit(cp)) {
                return this.scanNumericLiteral();
              }
              if (cp === 96 || cp === 125 && this.curlyStack[this.curlyStack.length - 1] === "${") {
                return this.scanTemplate();
              }
              if (cp >= 55296 && cp < 57343) {
                if (character_1.Character.isIdentifierStart(this.codePointAt(this.index))) {
                  return this.scanIdentifier();
                }
              }
              return this.scanPunctuator();
            };
            return Scanner2;
          }();
          exports$12.Scanner = Scanner;
        },
        function(module3, exports$12) {
          Object.defineProperty(exports$12, "__esModule", { value: true });
          exports$12.TokenName = {};
          exports$12.TokenName[1] = "Boolean";
          exports$12.TokenName[2] = "<end>";
          exports$12.TokenName[3] = "Identifier";
          exports$12.TokenName[4] = "Keyword";
          exports$12.TokenName[5] = "Null";
          exports$12.TokenName[6] = "Numeric";
          exports$12.TokenName[7] = "Punctuator";
          exports$12.TokenName[8] = "String";
          exports$12.TokenName[9] = "RegularExpression";
          exports$12.TokenName[10] = "Template";
        },
        function(module3, exports$12) {
          Object.defineProperty(exports$12, "__esModule", { value: true });
          exports$12.XHTMLEntities = {
            quot: '"',
            amp: "&",
            apos: "'",
            gt: ">",
            nbsp: "\xA0",
            iexcl: "\xA1",
            cent: "\xA2",
            pound: "\xA3",
            curren: "\xA4",
            yen: "\xA5",
            brvbar: "\xA6",
            sect: "\xA7",
            uml: "\xA8",
            copy: "\xA9",
            ordf: "\xAA",
            laquo: "\xAB",
            not: "\xAC",
            shy: "\xAD",
            reg: "\xAE",
            macr: "\xAF",
            deg: "\xB0",
            plusmn: "\xB1",
            sup2: "\xB2",
            sup3: "\xB3",
            acute: "\xB4",
            micro: "\xB5",
            para: "\xB6",
            middot: "\xB7",
            cedil: "\xB8",
            sup1: "\xB9",
            ordm: "\xBA",
            raquo: "\xBB",
            frac14: "\xBC",
            frac12: "\xBD",
            frac34: "\xBE",
            iquest: "\xBF",
            Agrave: "\xC0",
            Aacute: "\xC1",
            Acirc: "\xC2",
            Atilde: "\xC3",
            Auml: "\xC4",
            Aring: "\xC5",
            AElig: "\xC6",
            Ccedil: "\xC7",
            Egrave: "\xC8",
            Eacute: "\xC9",
            Ecirc: "\xCA",
            Euml: "\xCB",
            Igrave: "\xCC",
            Iacute: "\xCD",
            Icirc: "\xCE",
            Iuml: "\xCF",
            ETH: "\xD0",
            Ntilde: "\xD1",
            Ograve: "\xD2",
            Oacute: "\xD3",
            Ocirc: "\xD4",
            Otilde: "\xD5",
            Ouml: "\xD6",
            times: "\xD7",
            Oslash: "\xD8",
            Ugrave: "\xD9",
            Uacute: "\xDA",
            Ucirc: "\xDB",
            Uuml: "\xDC",
            Yacute: "\xDD",
            THORN: "\xDE",
            szlig: "\xDF",
            agrave: "\xE0",
            aacute: "\xE1",
            acirc: "\xE2",
            atilde: "\xE3",
            auml: "\xE4",
            aring: "\xE5",
            aelig: "\xE6",
            ccedil: "\xE7",
            egrave: "\xE8",
            eacute: "\xE9",
            ecirc: "\xEA",
            euml: "\xEB",
            igrave: "\xEC",
            iacute: "\xED",
            icirc: "\xEE",
            iuml: "\xEF",
            eth: "\xF0",
            ntilde: "\xF1",
            ograve: "\xF2",
            oacute: "\xF3",
            ocirc: "\xF4",
            otilde: "\xF5",
            ouml: "\xF6",
            divide: "\xF7",
            oslash: "\xF8",
            ugrave: "\xF9",
            uacute: "\xFA",
            ucirc: "\xFB",
            uuml: "\xFC",
            yacute: "\xFD",
            thorn: "\xFE",
            yuml: "\xFF",
            OElig: "\u0152",
            oelig: "\u0153",
            Scaron: "\u0160",
            scaron: "\u0161",
            Yuml: "\u0178",
            fnof: "\u0192",
            circ: "\u02C6",
            tilde: "\u02DC",
            Alpha: "\u0391",
            Beta: "\u0392",
            Gamma: "\u0393",
            Delta: "\u0394",
            Epsilon: "\u0395",
            Zeta: "\u0396",
            Eta: "\u0397",
            Theta: "\u0398",
            Iota: "\u0399",
            Kappa: "\u039A",
            Lambda: "\u039B",
            Mu: "\u039C",
            Nu: "\u039D",
            Xi: "\u039E",
            Omicron: "\u039F",
            Pi: "\u03A0",
            Rho: "\u03A1",
            Sigma: "\u03A3",
            Tau: "\u03A4",
            Upsilon: "\u03A5",
            Phi: "\u03A6",
            Chi: "\u03A7",
            Psi: "\u03A8",
            Omega: "\u03A9",
            alpha: "\u03B1",
            beta: "\u03B2",
            gamma: "\u03B3",
            delta: "\u03B4",
            epsilon: "\u03B5",
            zeta: "\u03B6",
            eta: "\u03B7",
            theta: "\u03B8",
            iota: "\u03B9",
            kappa: "\u03BA",
            lambda: "\u03BB",
            mu: "\u03BC",
            nu: "\u03BD",
            xi: "\u03BE",
            omicron: "\u03BF",
            pi: "\u03C0",
            rho: "\u03C1",
            sigmaf: "\u03C2",
            sigma: "\u03C3",
            tau: "\u03C4",
            upsilon: "\u03C5",
            phi: "\u03C6",
            chi: "\u03C7",
            psi: "\u03C8",
            omega: "\u03C9",
            thetasym: "\u03D1",
            upsih: "\u03D2",
            piv: "\u03D6",
            ensp: "\u2002",
            emsp: "\u2003",
            thinsp: "\u2009",
            zwnj: "\u200C",
            zwj: "\u200D",
            lrm: "\u200E",
            rlm: "\u200F",
            ndash: "\u2013",
            mdash: "\u2014",
            lsquo: "\u2018",
            rsquo: "\u2019",
            sbquo: "\u201A",
            ldquo: "\u201C",
            rdquo: "\u201D",
            bdquo: "\u201E",
            dagger: "\u2020",
            Dagger: "\u2021",
            bull: "\u2022",
            hellip: "\u2026",
            permil: "\u2030",
            prime: "\u2032",
            Prime: "\u2033",
            lsaquo: "\u2039",
            rsaquo: "\u203A",
            oline: "\u203E",
            frasl: "\u2044",
            euro: "\u20AC",
            image: "\u2111",
            weierp: "\u2118",
            real: "\u211C",
            trade: "\u2122",
            alefsym: "\u2135",
            larr: "\u2190",
            uarr: "\u2191",
            rarr: "\u2192",
            darr: "\u2193",
            harr: "\u2194",
            crarr: "\u21B5",
            lArr: "\u21D0",
            uArr: "\u21D1",
            rArr: "\u21D2",
            dArr: "\u21D3",
            hArr: "\u21D4",
            forall: "\u2200",
            part: "\u2202",
            exist: "\u2203",
            empty: "\u2205",
            nabla: "\u2207",
            isin: "\u2208",
            notin: "\u2209",
            ni: "\u220B",
            prod: "\u220F",
            sum: "\u2211",
            minus: "\u2212",
            lowast: "\u2217",
            radic: "\u221A",
            prop: "\u221D",
            infin: "\u221E",
            ang: "\u2220",
            and: "\u2227",
            or: "\u2228",
            cap: "\u2229",
            cup: "\u222A",
            int: "\u222B",
            there4: "\u2234",
            sim: "\u223C",
            cong: "\u2245",
            asymp: "\u2248",
            ne: "\u2260",
            equiv: "\u2261",
            le: "\u2264",
            ge: "\u2265",
            sub: "\u2282",
            sup: "\u2283",
            nsub: "\u2284",
            sube: "\u2286",
            supe: "\u2287",
            oplus: "\u2295",
            otimes: "\u2297",
            perp: "\u22A5",
            sdot: "\u22C5",
            lceil: "\u2308",
            rceil: "\u2309",
            lfloor: "\u230A",
            rfloor: "\u230B",
            loz: "\u25CA",
            spades: "\u2660",
            clubs: "\u2663",
            hearts: "\u2665",
            diams: "\u2666",
            lang: "\u27E8",
            rang: "\u27E9"
          };
        },
        function(module3, exports$12, __webpack_require__) {
          Object.defineProperty(exports$12, "__esModule", { value: true });
          var error_handler_1 = __webpack_require__(10);
          var scanner_1 = __webpack_require__(12);
          var token_1 = __webpack_require__(13);
          var Reader = function() {
            function Reader2() {
              this.values = [];
              this.curly = this.paren = -1;
            }
            Reader2.prototype.beforeFunctionExpression = function(t) {
              return [
                "(",
                "{",
                "[",
                "in",
                "typeof",
                "instanceof",
                "new",
                "return",
                "case",
                "delete",
                "throw",
                "void",
                "=",
                "+=",
                "-=",
                "*=",
                "**=",
                "/=",
                "%=",
                "<<=",
                ">>=",
                ">>>=",
                "&=",
                "|=",
                "^=",
                ",",
                "+",
                "-",
                "*",
                "**",
                "/",
                "%",
                "++",
                "--",
                "<<",
                ">>",
                ">>>",
                "&",
                "|",
                "^",
                "!",
                "~",
                "&&",
                "||",
                "?",
                ":",
                "===",
                "==",
                ">=",
                "<=",
                "<",
                ">",
                "!=",
                "!=="
              ].indexOf(t) >= 0;
            };
            Reader2.prototype.isRegexStart = function() {
              var previous = this.values[this.values.length - 1];
              var regex2 = previous !== null;
              switch (previous) {
                case "this":
                case "]":
                  regex2 = false;
                  break;
                case ")":
                  var keyword2 = this.values[this.paren - 1];
                  regex2 = keyword2 === "if" || keyword2 === "while" || keyword2 === "for" || keyword2 === "with";
                  break;
                case "}":
                  regex2 = false;
                  if (this.values[this.curly - 3] === "function") {
                    var check2 = this.values[this.curly - 4];
                    regex2 = check2 ? !this.beforeFunctionExpression(check2) : false;
                  } else if (this.values[this.curly - 4] === "function") {
                    var check2 = this.values[this.curly - 5];
                    regex2 = check2 ? !this.beforeFunctionExpression(check2) : true;
                  }
                  break;
              }
              return regex2;
            };
            Reader2.prototype.push = function(token) {
              if (token.type === 7 || token.type === 4) {
                if (token.value === "{") {
                  this.curly = this.values.length;
                } else if (token.value === "(") {
                  this.paren = this.values.length;
                }
                this.values.push(token.value);
              } else {
                this.values.push(null);
              }
            };
            return Reader2;
          }();
          var Tokenizer = function() {
            function Tokenizer2(code2, config4) {
              this.errorHandler = new error_handler_1.ErrorHandler();
              this.errorHandler.tolerant = config4 ? typeof config4.tolerant === "boolean" && config4.tolerant : false;
              this.scanner = new scanner_1.Scanner(code2, this.errorHandler);
              this.scanner.trackComment = config4 ? typeof config4.comment === "boolean" && config4.comment : false;
              this.trackRange = config4 ? typeof config4.range === "boolean" && config4.range : false;
              this.trackLoc = config4 ? typeof config4.loc === "boolean" && config4.loc : false;
              this.buffer = [];
              this.reader = new Reader();
            }
            Tokenizer2.prototype.errors = function() {
              return this.errorHandler.errors;
            };
            Tokenizer2.prototype.getNextToken = function() {
              if (this.buffer.length === 0) {
                var comments = this.scanner.scanComments();
                if (this.scanner.trackComment) {
                  for (var i = 0; i < comments.length; ++i) {
                    var e = comments[i];
                    var value = this.scanner.source.slice(e.slice[0], e.slice[1]);
                    var comment = {
                      type: e.multiLine ? "BlockComment" : "LineComment",
                      value
                    };
                    if (this.trackRange) {
                      comment.range = e.range;
                    }
                    if (this.trackLoc) {
                      comment.loc = e.loc;
                    }
                    this.buffer.push(comment);
                  }
                }
                if (!this.scanner.eof()) {
                  var loc = void 0;
                  if (this.trackLoc) {
                    loc = {
                      start: {
                        line: this.scanner.lineNumber,
                        column: this.scanner.index - this.scanner.lineStart
                      },
                      end: {}
                    };
                  }
                  var startRegex = this.scanner.source[this.scanner.index] === "/" && this.reader.isRegexStart();
                  var token = startRegex ? this.scanner.scanRegExp() : this.scanner.lex();
                  this.reader.push(token);
                  var entry = {
                    type: token_1.TokenName[token.type],
                    value: this.scanner.source.slice(token.start, token.end)
                  };
                  if (this.trackRange) {
                    entry.range = [token.start, token.end];
                  }
                  if (this.trackLoc) {
                    loc.end = {
                      line: this.scanner.lineNumber,
                      column: this.scanner.index - this.scanner.lineStart
                    };
                    entry.loc = loc;
                  }
                  if (token.type === 9) {
                    var pattern2 = token.pattern;
                    var flags = token.flags;
                    entry.regex = { pattern: pattern2, flags };
                  }
                  this.buffer.push(entry);
                }
              }
              return this.buffer.shift();
            };
            return Tokenizer2;
          }();
          exports$12.Tokenizer = Tokenizer;
        }
      ]);
    });
  })(esprima$2);
  return esprima$2.exports;
}
function __extends4(d, b) {
  if (typeof b !== "function" && b !== null)
    throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
  extendStatics4(d, b);
  function __() {
    this.constructor = d;
  }
  d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
}
function __rest4(s, e) {
  var t = {};
  for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
    t[p] = s[p];
  if (s != null && typeof Object.getOwnPropertySymbols === "function")
    for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
      if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
        t[p[i]] = s[p[i]];
    }
  return t;
}
function __decorate4(decorators, target, key, desc) {
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
  else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
  return c > 3 && r && Object.defineProperty(target, key, r), r;
}
function __param4(paramIndex, decorator) {
  return function(target, key) {
    decorator(target, key, paramIndex);
  };
}
function __esDecorate$1(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {
  function accept(f) {
    if (f !== void 0 && typeof f !== "function") throw new TypeError("Function expected");
    return f;
  }
  var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value";
  var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null;
  var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});
  var _, done = false;
  for (var i = decorators.length - 1; i >= 0; i--) {
    var context2 = {};
    for (var p in contextIn) context2[p] = p === "access" ? {} : contextIn[p];
    for (var p in contextIn.access) context2.access[p] = contextIn.access[p];
    context2.addInitializer = function(f) {
      if (done) throw new TypeError("Cannot add initializers after decoration has completed");
      extraInitializers.push(accept(f || null));
    };
    var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context2);
    if (kind === "accessor") {
      if (result === void 0) continue;
      if (result === null || typeof result !== "object") throw new TypeError("Object expected");
      if (_ = accept(result.get)) descriptor.get = _;
      if (_ = accept(result.set)) descriptor.set = _;
      if (_ = accept(result.init)) initializers.unshift(_);
    } else if (_ = accept(result)) {
      if (kind === "field") initializers.unshift(_);
      else descriptor[key] = _;
    }
  }
  if (target) Object.defineProperty(target, contextIn.name, descriptor);
  done = true;
}
function __runInitializers$1(thisArg, initializers, value) {
  var useValue = arguments.length > 2;
  for (var i = 0; i < initializers.length; i++) {
    value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);
  }
  return useValue ? value : void 0;
}
function __propKey4(x) {
  return typeof x === "symbol" ? x : "".concat(x);
}
function __setFunctionName$1(f, name, prefix) {
  if (typeof name === "symbol") name = name.description ? "[".concat(name.description, "]") : "";
  return Object.defineProperty(f, "name", { configurable: true, value: prefix ? "".concat(prefix, " ", name) : name });
}
function __metadata4(metadataKey, metadataValue) {
  if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue);
}
function __awaiter4(thisArg, _arguments, P, generator) {
  function adopt(value) {
    return value instanceof P ? value : new P(function(resolve2) {
      resolve2(value);
    });
  }
  return new (P || (P = Promise))(function(resolve2, reject) {
    function fulfilled(value) {
      try {
        step(generator.next(value));
      } catch (e) {
        reject(e);
      }
    }
    function rejected(value) {
      try {
        step(generator["throw"](value));
      } catch (e) {
        reject(e);
      }
    }
    function step(result) {
      result.done ? resolve2(result.value) : adopt(result.value).then(fulfilled, rejected);
    }
    step((generator = generator.apply(thisArg, _arguments || [])).next());
  });
}
function __generator4(thisArg, body) {
  var _ = { label: 0, sent: function() {
    if (t[0] & 1) throw t[1];
    return t[1];
  }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
  return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() {
    return this;
  }), g;
  function verb(n) {
    return function(v) {
      return step([n, v]);
    };
  }
  function step(op) {
    if (f) throw new TypeError("Generator is already executing.");
    while (g && (g = 0, op[0] && (_ = 0)), _) try {
      if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
      if (y = 0, t) op = [op[0] & 2, t.value];
      switch (op[0]) {
        case 0:
        case 1:
          t = op;
          break;
        case 4:
          _.label++;
          return { value: op[1], done: false };
        case 5:
          _.label++;
          y = op[1];
          op = [0];
          continue;
        case 7:
          op = _.ops.pop();
          _.trys.pop();
          continue;
        default:
          if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
            _ = 0;
            continue;
          }
          if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) {
            _.label = op[1];
            break;
          }
          if (op[0] === 6 && _.label < t[1]) {
            _.label = t[1];
            t = op;
            break;
          }
          if (t && _.label < t[2]) {
            _.label = t[2];
            _.ops.push(op);
            break;
          }
          if (t[2]) _.ops.pop();
          _.trys.pop();
          continue;
      }
      op = body.call(thisArg, _);
    } catch (e) {
      op = [6, e];
      y = 0;
    } finally {
      f = t = 0;
    }
    if (op[0] & 5) throw op[1];
    return { value: op[0] ? op[1] : void 0, done: true };
  }
}
function __exportStar4(m, o) {
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding4(o, m, p);
}
function __values4(o) {
  var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
  if (m) return m.call(o);
  if (o && typeof o.length === "number") return {
    next: function() {
      if (o && i >= o.length) o = void 0;
      return { value: o && o[i++], done: !o };
    }
  };
  throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
}
function __read4(o, n) {
  var m = typeof Symbol === "function" && o[Symbol.iterator];
  if (!m) return o;
  var i = m.call(o), r, ar = [], e;
  try {
    while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
  } catch (error) {
    e = { error };
  } finally {
    try {
      if (r && !r.done && (m = i["return"])) m.call(i);
    } finally {
      if (e) throw e.error;
    }
  }
  return ar;
}
function __spread4() {
  for (var ar = [], i = 0; i < arguments.length; i++)
    ar = ar.concat(__read4(arguments[i]));
  return ar;
}
function __spreadArrays4() {
  for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;
  for (var r = Array(s), k = 0, i = 0; i < il; i++)
    for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
      r[k] = a[j];
  return r;
}
function __spreadArray4(to, from2, pack) {
  if (pack || arguments.length === 2) for (var i = 0, l = from2.length, ar; i < l; i++) {
    if (ar || !(i in from2)) {
      if (!ar) ar = Array.prototype.slice.call(from2, 0, i);
      ar[i] = from2[i];
    }
  }
  return to.concat(ar || Array.prototype.slice.call(from2));
}
function __await4(v) {
  return this instanceof __await4 ? (this.v = v, this) : new __await4(v);
}
function __asyncGenerator4(thisArg, _arguments, generator) {
  if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
  var g = generator.apply(thisArg, _arguments || []), i, q = [];
  return i = Object.create((typeof AsyncIterator === "function" ? AsyncIterator : Object).prototype), verb("next"), verb("throw"), verb("return", awaitReturn), i[Symbol.asyncIterator] = function() {
    return this;
  }, i;
  function awaitReturn(f) {
    return function(v) {
      return Promise.resolve(v).then(f, reject);
    };
  }
  function verb(n, f) {
    if (g[n]) {
      i[n] = function(v) {
        return new Promise(function(a, b) {
          q.push([n, v, a, b]) > 1 || resume(n, v);
        });
      };
      if (f) i[n] = f(i[n]);
    }
  }
  function resume(n, v) {
    try {
      step(g[n](v));
    } catch (e) {
      settle(q[0][3], e);
    }
  }
  function step(r) {
    r.value instanceof __await4 ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r);
  }
  function fulfill(value) {
    resume("next", value);
  }
  function reject(value) {
    resume("throw", value);
  }
  function settle(f, v) {
    if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]);
  }
}
function __asyncDelegator4(o) {
  var i, p;
  return i = {}, verb("next"), verb("throw", function(e) {
    throw e;
  }), verb("return"), i[Symbol.iterator] = function() {
    return this;
  }, i;
  function verb(n, f) {
    i[n] = o[n] ? function(v) {
      return (p = !p) ? { value: __await4(o[n](v)), done: false } : f ? f(v) : v;
    } : f;
  }
}
function __asyncValues4(o) {
  if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
  var m = o[Symbol.asyncIterator], i;
  return m ? m.call(o) : (o = typeof __values4 === "function" ? __values4(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function() {
    return this;
  }, i);
  function verb(n) {
    i[n] = o[n] && function(v) {
      return new Promise(function(resolve2, reject) {
        v = o[n](v), settle(resolve2, reject, v.done, v.value);
      });
    };
  }
  function settle(resolve2, reject, d, v) {
    Promise.resolve(v).then(function(v2) {
      resolve2({ value: v2, done: d });
    }, reject);
  }
}
function __makeTemplateObject4(cooked, raw) {
  if (Object.defineProperty) {
    Object.defineProperty(cooked, "raw", { value: raw });
  } else {
    cooked.raw = raw;
  }
  return cooked;
}
function __importStar4(mod2) {
  if (mod2 && mod2.__esModule) return mod2;
  var result = {};
  if (mod2 != null) {
    for (var k = ownKeys(mod2), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding4(result, mod2, k[i]);
  }
  __setModuleDefault4(result, mod2);
  return result;
}
function __importDefault4(mod2) {
  return mod2 && mod2.__esModule ? mod2 : { default: mod2 };
}
function __classPrivateFieldGet4(receiver2, state, kind, f) {
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
  if (typeof state === "function" ? receiver2 !== state || !f : !state.has(receiver2)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
  return kind === "m" ? f : kind === "a" ? f.call(receiver2) : f ? f.value : state.get(receiver2);
}
function __classPrivateFieldSet4(receiver2, state, value, kind, f) {
  if (kind === "m") throw new TypeError("Private method is not writable");
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
  if (typeof state === "function" ? receiver2 !== state || !f : !state.has(receiver2)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
  return kind === "a" ? f.call(receiver2, value) : f ? f.value = value : state.set(receiver2, value), value;
}
function __classPrivateFieldIn4(state, receiver2) {
  if (receiver2 === null || typeof receiver2 !== "object" && typeof receiver2 !== "function") throw new TypeError("Cannot use 'in' operator on non-object");
  return typeof state === "function" ? receiver2 === state : state.has(receiver2);
}
function __addDisposableResource4(env2, value, async2) {
  if (value !== null && value !== void 0) {
    if (typeof value !== "object" && typeof value !== "function") throw new TypeError("Object expected.");
    var dispose, inner;
    if (async2) {
      if (!Symbol.asyncDispose) throw new TypeError("Symbol.asyncDispose is not defined.");
      dispose = value[Symbol.asyncDispose];
    }
    if (dispose === void 0) {
      if (!Symbol.dispose) throw new TypeError("Symbol.dispose is not defined.");
      dispose = value[Symbol.dispose];
      if (async2) inner = dispose;
    }
    if (typeof dispose !== "function") throw new TypeError("Object not disposable.");
    if (inner) dispose = function() {
      try {
        inner.call(this);
      } catch (e) {
        return Promise.reject(e);
      }
    };
    env2.stack.push({ value, dispose, async: async2 });
  } else if (async2) {
    env2.stack.push({ async: true });
  }
  return value;
}
function __disposeResources4(env2) {
  function fail(e) {
    env2.error = env2.hasError ? new _SuppressedError4(e, env2.error, "An error was suppressed during disposal.") : e;
    env2.hasError = true;
  }
  var r, s = 0;
  function next() {
    while (r = env2.stack.pop()) {
      try {
        if (!r.async && s === 1) return s = 0, env2.stack.push(r), Promise.resolve().then(next);
        if (r.dispose) {
          var result = r.dispose.call(r.value);
          if (r.async) return s |= 2, Promise.resolve(result).then(next, function(e) {
            fail(e);
            return next();
          });
        } else s |= 1;
      } catch (e) {
        fail(e);
      }
    }
    if (s === 1) return env2.hasError ? Promise.reject(env2.error) : Promise.resolve();
    if (env2.hasError) throw env2.error;
  }
  return next();
}
function __rewriteRelativeImportExtension(path14, preserveJsx) {
  if (typeof path14 === "string" && /^\.\.?\//.test(path14)) {
    return path14.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i, function(m, tsx, d, ext, cm) {
      return tsx ? preserveJsx ? ".jsx" : ".js" : d && (!ext || !cm) ? m : d + ext + "." + cm.toLowerCase() + "js";
    });
  }
  return path14;
}
function requireTypes$1() {
  if (hasRequiredTypes$1) return types$5;
  hasRequiredTypes$1 = 1;
  Object.defineProperty(types$5, "__esModule", { value: true });
  types$5.Def = void 0;
  var tslib_1 = require$$0;
  var Op = Object.prototype;
  var objToStr = Op.toString;
  var hasOwn = Op.hasOwnProperty;
  var BaseType = function() {
    function BaseType2() {
    }
    BaseType2.prototype.assert = function(value, deep) {
      if (!this.check(value, deep)) {
        var str = shallowStringify(value);
        throw new Error(str + " does not match type " + this);
      }
      return true;
    };
    BaseType2.prototype.arrayOf = function() {
      var elemType = this;
      return new ArrayType(elemType);
    };
    return BaseType2;
  }();
  var ArrayType = function(_super) {
    tslib_1.__extends(ArrayType2, _super);
    function ArrayType2(elemType) {
      var _this = _super.call(this) || this;
      _this.elemType = elemType;
      _this.kind = "ArrayType";
      return _this;
    }
    ArrayType2.prototype.toString = function() {
      return "[" + this.elemType + "]";
    };
    ArrayType2.prototype.check = function(value, deep) {
      var _this = this;
      return Array.isArray(value) && value.every(function(elem) {
        return _this.elemType.check(elem, deep);
      });
    };
    return ArrayType2;
  }(BaseType);
  var IdentityType = function(_super) {
    tslib_1.__extends(IdentityType2, _super);
    function IdentityType2(value) {
      var _this = _super.call(this) || this;
      _this.value = value;
      _this.kind = "IdentityType";
      return _this;
    }
    IdentityType2.prototype.toString = function() {
      return String(this.value);
    };
    IdentityType2.prototype.check = function(value, deep) {
      var result = value === this.value;
      if (!result && typeof deep === "function") {
        deep(this, value);
      }
      return result;
    };
    return IdentityType2;
  }(BaseType);
  var ObjectType = function(_super) {
    tslib_1.__extends(ObjectType2, _super);
    function ObjectType2(fields) {
      var _this = _super.call(this) || this;
      _this.fields = fields;
      _this.kind = "ObjectType";
      return _this;
    }
    ObjectType2.prototype.toString = function() {
      return "{ " + this.fields.join(", ") + " }";
    };
    ObjectType2.prototype.check = function(value, deep) {
      return objToStr.call(value) === objToStr.call({}) && this.fields.every(function(field) {
        return field.type.check(value[field.name], deep);
      });
    };
    return ObjectType2;
  }(BaseType);
  var OrType = function(_super) {
    tslib_1.__extends(OrType2, _super);
    function OrType2(types2) {
      var _this = _super.call(this) || this;
      _this.types = types2;
      _this.kind = "OrType";
      return _this;
    }
    OrType2.prototype.toString = function() {
      return this.types.join(" | ");
    };
    OrType2.prototype.check = function(value, deep) {
      return this.types.some(function(type2) {
        return type2.check(value, deep);
      });
    };
    return OrType2;
  }(BaseType);
  var PredicateType = function(_super) {
    tslib_1.__extends(PredicateType2, _super);
    function PredicateType2(name, predicate) {
      var _this = _super.call(this) || this;
      _this.name = name;
      _this.predicate = predicate;
      _this.kind = "PredicateType";
      return _this;
    }
    PredicateType2.prototype.toString = function() {
      return this.name;
    };
    PredicateType2.prototype.check = function(value, deep) {
      var result = this.predicate(value, deep);
      if (!result && typeof deep === "function") {
        deep(this, value);
      }
      return result;
    };
    return PredicateType2;
  }(BaseType);
  var Def = function() {
    function Def2(type2, typeName) {
      this.type = type2;
      this.typeName = typeName;
      this.baseNames = [];
      this.ownFields = /* @__PURE__ */ Object.create(null);
      this.allSupertypes = /* @__PURE__ */ Object.create(null);
      this.supertypeList = [];
      this.allFields = /* @__PURE__ */ Object.create(null);
      this.fieldNames = [];
      this.finalized = false;
      this.buildable = false;
      this.buildParams = [];
    }
    Def2.prototype.isSupertypeOf = function(that) {
      if (that instanceof Def2) {
        if (this.finalized !== true || that.finalized !== true) {
          throw new Error("");
        }
        return hasOwn.call(that.allSupertypes, this.typeName);
      } else {
        throw new Error(that + " is not a Def");
      }
    };
    Def2.prototype.checkAllFields = function(value, deep) {
      var allFields = this.allFields;
      if (this.finalized !== true) {
        throw new Error("" + this.typeName);
      }
      function checkFieldByName(name) {
        var field = allFields[name];
        var type2 = field.type;
        var child = field.getValue(value);
        return type2.check(child, deep);
      }
      return value !== null && typeof value === "object" && Object.keys(allFields).every(checkFieldByName);
    };
    Def2.prototype.bases = function() {
      var supertypeNames = [];
      for (var _i = 0; _i < arguments.length; _i++) {
        supertypeNames[_i] = arguments[_i];
      }
      var bases = this.baseNames;
      if (this.finalized) {
        if (supertypeNames.length !== bases.length) {
          throw new Error("");
        }
        for (var i = 0; i < supertypeNames.length; i++) {
          if (supertypeNames[i] !== bases[i]) {
            throw new Error("");
          }
        }
        return this;
      }
      supertypeNames.forEach(function(baseName) {
        if (bases.indexOf(baseName) < 0) {
          bases.push(baseName);
        }
      });
      return this;
    };
    return Def2;
  }();
  types$5.Def = Def;
  var Field = function() {
    function Field2(name, type2, defaultFn, hidden) {
      this.name = name;
      this.type = type2;
      this.defaultFn = defaultFn;
      this.hidden = !!hidden;
    }
    Field2.prototype.toString = function() {
      return JSON.stringify(this.name) + ": " + this.type;
    };
    Field2.prototype.getValue = function(obj) {
      var value = obj[this.name];
      if (typeof value !== "undefined") {
        return value;
      }
      if (typeof this.defaultFn === "function") {
        value = this.defaultFn.call(obj);
      }
      return value;
    };
    return Field2;
  }();
  function shallowStringify(value) {
    if (Array.isArray(value)) {
      return "[" + value.map(shallowStringify).join(", ") + "]";
    }
    if (value && typeof value === "object") {
      return "{ " + Object.keys(value).map(function(key) {
        return key + ": " + value[key];
      }).join(", ") + " }";
    }
    return JSON.stringify(value);
  }
  function typesPlugin(_fork) {
    var Type2 = {
      or: function() {
        var types2 = [];
        for (var _i = 0; _i < arguments.length; _i++) {
          types2[_i] = arguments[_i];
        }
        return new OrType(types2.map(function(type2) {
          return Type2.from(type2);
        }));
      },
      from: function(value, name) {
        if (value instanceof ArrayType || value instanceof IdentityType || value instanceof ObjectType || value instanceof OrType || value instanceof PredicateType) {
          return value;
        }
        if (value instanceof Def) {
          return value.type;
        }
        if (isArray4.check(value)) {
          if (value.length !== 1) {
            throw new Error("only one element type is permitted for typed arrays");
          }
          return new ArrayType(Type2.from(value[0]));
        }
        if (isObject3.check(value)) {
          return new ObjectType(Object.keys(value).map(function(name2) {
            return new Field(name2, Type2.from(value[name2], name2));
          }));
        }
        if (typeof value === "function") {
          var bicfIndex = builtInCtorFns.indexOf(value);
          if (bicfIndex >= 0) {
            return builtInCtorTypes[bicfIndex];
          }
          if (typeof name !== "string") {
            throw new Error("missing name");
          }
          return new PredicateType(name, value);
        }
        return new IdentityType(value);
      },
      def: function(typeName) {
        return hasOwn.call(defCache, typeName) ? defCache[typeName] : defCache[typeName] = new DefImpl(typeName);
      },
      hasDef: function(typeName) {
        return hasOwn.call(defCache, typeName);
      }
    };
    var builtInCtorFns = [];
    var builtInCtorTypes = [];
    function defBuiltInType(name, example) {
      var objStr = objToStr.call(example);
      var type2 = new PredicateType(name, function(value) {
        return objToStr.call(value) === objStr;
      });
      if (example && typeof example.constructor === "function") {
        builtInCtorFns.push(example.constructor);
        builtInCtorTypes.push(type2);
      }
      return type2;
    }
    var isString2 = defBuiltInType("string", "truthy");
    var isFunction3 = defBuiltInType("function", function() {
    });
    var isArray4 = defBuiltInType("array", []);
    var isObject3 = defBuiltInType("object", {});
    var isRegExp = defBuiltInType("RegExp", /./);
    var isDate = defBuiltInType("Date", /* @__PURE__ */ new Date());
    var isNumber2 = defBuiltInType("number", 3);
    var isBoolean2 = defBuiltInType("boolean", true);
    var isNull = defBuiltInType("null", null);
    var isUndefined = defBuiltInType("undefined", void 0);
    var builtInTypes = {
      string: isString2,
      function: isFunction3,
      array: isArray4,
      object: isObject3,
      RegExp: isRegExp,
      Date: isDate,
      number: isNumber2,
      boolean: isBoolean2,
      null: isNull,
      undefined: isUndefined
    };
    var defCache = /* @__PURE__ */ Object.create(null);
    function defFromValue(value) {
      if (value && typeof value === "object") {
        var type2 = value.type;
        if (typeof type2 === "string" && hasOwn.call(defCache, type2)) {
          var d = defCache[type2];
          if (d.finalized) {
            return d;
          }
        }
      }
      return null;
    }
    var DefImpl = function(_super) {
      tslib_1.__extends(DefImpl2, _super);
      function DefImpl2(typeName) {
        var _this = _super.call(this, new PredicateType(typeName, function(value, deep) {
          return _this.check(value, deep);
        }), typeName) || this;
        return _this;
      }
      DefImpl2.prototype.check = function(value, deep) {
        if (this.finalized !== true) {
          throw new Error("prematurely checking unfinalized type " + this.typeName);
        }
        if (value === null || typeof value !== "object") {
          return false;
        }
        var vDef = defFromValue(value);
        if (!vDef) {
          if (this.typeName === "SourceLocation" || this.typeName === "Position") {
            return this.checkAllFields(value, deep);
          }
          return false;
        }
        if (deep && vDef === this) {
          return this.checkAllFields(value, deep);
        }
        if (!this.isSupertypeOf(vDef)) {
          return false;
        }
        if (!deep) {
          return true;
        }
        return vDef.checkAllFields(value, deep) && this.checkAllFields(value, false);
      };
      DefImpl2.prototype.build = function() {
        var _this = this;
        var buildParams = [];
        for (var _i = 0; _i < arguments.length; _i++) {
          buildParams[_i] = arguments[_i];
        }
        this.buildParams = buildParams;
        if (this.buildable) {
          return this;
        }
        this.field("type", String, function() {
          return _this.typeName;
        });
        this.buildable = true;
        var addParam = function(built, param, arg, isArgAvailable) {
          if (hasOwn.call(built, param))
            return;
          var all = _this.allFields;
          if (!hasOwn.call(all, param)) {
            throw new Error("" + param);
          }
          var field = all[param];
          var type2 = field.type;
          var value;
          if (isArgAvailable) {
            value = arg;
          } else if (field.defaultFn) {
            value = field.defaultFn.call(built);
          } else {
            var message = "no value or default function given for field " + JSON.stringify(param) + " of " + _this.typeName + "(" + _this.buildParams.map(function(name) {
              return all[name];
            }).join(", ") + ")";
            throw new Error(message);
          }
          if (!type2.check(value)) {
            throw new Error(shallowStringify(value) + " does not match field " + field + " of type " + _this.typeName);
          }
          built[param] = value;
        };
        var builder = function() {
          var args2 = [];
          for (var _i2 = 0; _i2 < arguments.length; _i2++) {
            args2[_i2] = arguments[_i2];
          }
          var argc = args2.length;
          if (!_this.finalized) {
            throw new Error("attempting to instantiate unfinalized type " + _this.typeName);
          }
          var built = Object.create(nodePrototype);
          _this.buildParams.forEach(function(param, i) {
            if (i < argc) {
              addParam(built, param, args2[i], true);
            } else {
              addParam(built, param, null, false);
            }
          });
          Object.keys(_this.allFields).forEach(function(param) {
            addParam(built, param, null, false);
          });
          if (built.type !== _this.typeName) {
            throw new Error("");
          }
          return built;
        };
        builder.from = function(obj) {
          if (!_this.finalized) {
            throw new Error("attempting to instantiate unfinalized type " + _this.typeName);
          }
          var built = Object.create(nodePrototype);
          Object.keys(_this.allFields).forEach(function(param) {
            if (hasOwn.call(obj, param)) {
              addParam(built, param, obj[param], true);
            } else {
              addParam(built, param, null, false);
            }
          });
          if (built.type !== _this.typeName) {
            throw new Error("");
          }
          return built;
        };
        Object.defineProperty(builders, getBuilderName(this.typeName), {
          enumerable: true,
          value: builder
        });
        return this;
      };
      DefImpl2.prototype.field = function(name, type2, defaultFn, hidden) {
        if (this.finalized) {
          console.error("Ignoring attempt to redefine field " + JSON.stringify(name) + " of finalized type " + JSON.stringify(this.typeName));
          return this;
        }
        this.ownFields[name] = new Field(name, Type2.from(type2), defaultFn, hidden);
        return this;
      };
      DefImpl2.prototype.finalize = function() {
        var _this = this;
        if (!this.finalized) {
          var allFields = this.allFields;
          var allSupertypes = this.allSupertypes;
          this.baseNames.forEach(function(name) {
            var def2 = defCache[name];
            if (def2 instanceof Def) {
              def2.finalize();
              extend2(allFields, def2.allFields);
              extend2(allSupertypes, def2.allSupertypes);
            } else {
              var message = "unknown supertype name " + JSON.stringify(name) + " for subtype " + JSON.stringify(_this.typeName);
              throw new Error(message);
            }
          });
          extend2(allFields, this.ownFields);
          allSupertypes[this.typeName] = this;
          this.fieldNames.length = 0;
          for (var fieldName in allFields) {
            if (hasOwn.call(allFields, fieldName) && !allFields[fieldName].hidden) {
              this.fieldNames.push(fieldName);
            }
          }
          Object.defineProperty(namedTypes2, this.typeName, {
            enumerable: true,
            value: this.type
          });
          this.finalized = true;
          populateSupertypeList(this.typeName, this.supertypeList);
          if (this.buildable && this.supertypeList.lastIndexOf("Expression") >= 0) {
            wrapExpressionBuilderWithStatement(this.typeName);
          }
        }
      };
      return DefImpl2;
    }(Def);
    function getSupertypeNames(typeName) {
      if (!hasOwn.call(defCache, typeName)) {
        throw new Error("");
      }
      var d = defCache[typeName];
      if (d.finalized !== true) {
        throw new Error("");
      }
      return d.supertypeList.slice(1);
    }
    function computeSupertypeLookupTable(candidates) {
      var table = {};
      var typeNames = Object.keys(defCache);
      var typeNameCount = typeNames.length;
      for (var i = 0; i < typeNameCount; ++i) {
        var typeName = typeNames[i];
        var d = defCache[typeName];
        if (d.finalized !== true) {
          throw new Error("" + typeName);
        }
        for (var j = 0; j < d.supertypeList.length; ++j) {
          var superTypeName = d.supertypeList[j];
          if (hasOwn.call(candidates, superTypeName)) {
            table[typeName] = superTypeName;
            break;
          }
        }
      }
      return table;
    }
    var builders = /* @__PURE__ */ Object.create(null);
    var nodePrototype = {};
    function defineMethod(name, func) {
      var old = nodePrototype[name];
      if (isUndefined.check(func)) {
        delete nodePrototype[name];
      } else {
        isFunction3.assert(func);
        Object.defineProperty(nodePrototype, name, {
          enumerable: true,
          configurable: true,
          value: func
        });
      }
      return old;
    }
    function getBuilderName(typeName) {
      return typeName.replace(/^[A-Z]+/, function(upperCasePrefix) {
        var len = upperCasePrefix.length;
        switch (len) {
          case 0:
            return "";
          case 1:
            return upperCasePrefix.toLowerCase();
          default:
            return upperCasePrefix.slice(0, len - 1).toLowerCase() + upperCasePrefix.charAt(len - 1);
        }
      });
    }
    function getStatementBuilderName(typeName) {
      typeName = getBuilderName(typeName);
      return typeName.replace(/(Expression)?$/, "Statement");
    }
    var namedTypes2 = {};
    function getFieldNames(object2) {
      var d = defFromValue(object2);
      if (d) {
        return d.fieldNames.slice(0);
      }
      if ("type" in object2) {
        throw new Error("did not recognize object of type " + JSON.stringify(object2.type));
      }
      return Object.keys(object2);
    }
    function getFieldValue(object2, fieldName) {
      var d = defFromValue(object2);
      if (d) {
        var field = d.allFields[fieldName];
        if (field) {
          return field.getValue(object2);
        }
      }
      return object2 && object2[fieldName];
    }
    function eachField(object2, callback, context2) {
      getFieldNames(object2).forEach(function(name) {
        callback.call(this, name, getFieldValue(object2, name));
      }, context2);
    }
    function someField(object2, callback, context2) {
      return getFieldNames(object2).some(function(name) {
        return callback.call(this, name, getFieldValue(object2, name));
      }, context2);
    }
    function wrapExpressionBuilderWithStatement(typeName) {
      var wrapperName = getStatementBuilderName(typeName);
      if (builders[wrapperName])
        return;
      var wrapped = builders[getBuilderName(typeName)];
      if (!wrapped)
        return;
      var builder = function() {
        var args2 = [];
        for (var _i = 0; _i < arguments.length; _i++) {
          args2[_i] = arguments[_i];
        }
        return builders.expressionStatement(wrapped.apply(builders, args2));
      };
      builder.from = function() {
        var args2 = [];
        for (var _i = 0; _i < arguments.length; _i++) {
          args2[_i] = arguments[_i];
        }
        return builders.expressionStatement(wrapped.from.apply(builders, args2));
      };
      builders[wrapperName] = builder;
    }
    function populateSupertypeList(typeName, list2) {
      list2.length = 0;
      list2.push(typeName);
      var lastSeen = /* @__PURE__ */ Object.create(null);
      for (var pos = 0; pos < list2.length; ++pos) {
        typeName = list2[pos];
        var d = defCache[typeName];
        if (d.finalized !== true) {
          throw new Error("");
        }
        if (hasOwn.call(lastSeen, typeName)) {
          delete list2[lastSeen[typeName]];
        }
        lastSeen[typeName] = pos;
        list2.push.apply(list2, d.baseNames);
      }
      for (var to = 0, from2 = to, len = list2.length; from2 < len; ++from2) {
        if (hasOwn.call(list2, from2)) {
          list2[to++] = list2[from2];
        }
      }
      list2.length = to;
    }
    function extend2(into, from2) {
      Object.keys(from2).forEach(function(name) {
        into[name] = from2[name];
      });
      return into;
    }
    function finalize50() {
      Object.keys(defCache).forEach(function(name) {
        defCache[name].finalize();
      });
    }
    return {
      Type: Type2,
      builtInTypes,
      getSupertypeNames,
      computeSupertypeLookupTable,
      builders,
      defineMethod,
      getBuilderName,
      getStatementBuilderName,
      namedTypes: namedTypes2,
      getFieldNames,
      getFieldValue,
      eachField,
      someField,
      finalize: finalize50
    };
  }
  types$5.default = typesPlugin;
  return types$5;
}
function requirePath() {
  if (hasRequiredPath) return path7.exports;
  hasRequiredPath = 1;
  (function(module2, exports$1) {
    Object.defineProperty(exports$1, "__esModule", { value: true });
    var tslib_1 = require$$0;
    var types_1 = tslib_1.__importDefault(requireTypes$1());
    var Op = Object.prototype;
    var hasOwn = Op.hasOwnProperty;
    function pathPlugin(fork2) {
      var types2 = fork2.use(types_1.default);
      var isArray4 = types2.builtInTypes.array;
      var isNumber2 = types2.builtInTypes.number;
      var Path = function Path2(value, parentPath, name) {
        if (!(this instanceof Path2)) {
          throw new Error("Path constructor cannot be invoked without 'new'");
        }
        if (parentPath) {
          if (!(parentPath instanceof Path2)) {
            throw new Error("");
          }
        } else {
          parentPath = null;
          name = null;
        }
        this.value = value;
        this.parentPath = parentPath;
        this.name = name;
        this.__childCache = null;
      };
      var Pp = Path.prototype;
      function getChildCache(path14) {
        return path14.__childCache || (path14.__childCache = /* @__PURE__ */ Object.create(null));
      }
      function getChildPath(path14, name) {
        var cache = getChildCache(path14);
        var actualChildValue = path14.getValueProperty(name);
        var childPath = cache[name];
        if (!hasOwn.call(cache, name) || childPath.value !== actualChildValue) {
          childPath = cache[name] = new path14.constructor(actualChildValue, path14, name);
        }
        return childPath;
      }
      Pp.getValueProperty = function getValueProperty(name) {
        return this.value[name];
      };
      Pp.get = function get3() {
        var names3 = [];
        for (var _i = 0; _i < arguments.length; _i++) {
          names3[_i] = arguments[_i];
        }
        var path14 = this;
        var count = names3.length;
        for (var i = 0; i < count; ++i) {
          path14 = getChildPath(path14, names3[i]);
        }
        return path14;
      };
      Pp.each = function each(callback, context2) {
        var childPaths = [];
        var len = this.value.length;
        var i = 0;
        for (var i = 0; i < len; ++i) {
          if (hasOwn.call(this.value, i)) {
            childPaths[i] = this.get(i);
          }
        }
        context2 = context2 || this;
        for (i = 0; i < len; ++i) {
          if (hasOwn.call(childPaths, i)) {
            callback.call(context2, childPaths[i]);
          }
        }
      };
      Pp.map = function map2(callback, context2) {
        var result = [];
        this.each(function(childPath) {
          result.push(callback.call(this, childPath));
        }, context2);
        return result;
      };
      Pp.filter = function filter2(callback, context2) {
        var result = [];
        this.each(function(childPath) {
          if (callback.call(this, childPath)) {
            result.push(childPath);
          }
        }, context2);
        return result;
      };
      function emptyMoves() {
      }
      function getMoves(path14, offset, start, end) {
        isArray4.assert(path14.value);
        if (offset === 0) {
          return emptyMoves;
        }
        var length = path14.value.length;
        if (length < 1) {
          return emptyMoves;
        }
        var argc = arguments.length;
        if (argc === 2) {
          start = 0;
          end = length;
        } else if (argc === 3) {
          start = Math.max(start, 0);
          end = length;
        } else {
          start = Math.max(start, 0);
          end = Math.min(end, length);
        }
        isNumber2.assert(start);
        isNumber2.assert(end);
        var moves = /* @__PURE__ */ Object.create(null);
        var cache = getChildCache(path14);
        for (var i = start; i < end; ++i) {
          if (hasOwn.call(path14.value, i)) {
            var childPath = path14.get(i);
            if (childPath.name !== i) {
              throw new Error("");
            }
            var newIndex = i + offset;
            childPath.name = newIndex;
            moves[newIndex] = childPath;
            delete cache[i];
          }
        }
        delete cache.length;
        return function() {
          for (var newIndex2 in moves) {
            var childPath2 = moves[newIndex2];
            if (childPath2.name !== +newIndex2) {
              throw new Error("");
            }
            cache[newIndex2] = childPath2;
            path14.value[newIndex2] = childPath2.value;
          }
        };
      }
      Pp.shift = function shift() {
        var move = getMoves(this, -1);
        var result = this.value.shift();
        move();
        return result;
      };
      Pp.unshift = function unshift() {
        var args2 = [];
        for (var _i = 0; _i < arguments.length; _i++) {
          args2[_i] = arguments[_i];
        }
        var move = getMoves(this, args2.length);
        var result = this.value.unshift.apply(this.value, args2);
        move();
        return result;
      };
      Pp.push = function push() {
        var args2 = [];
        for (var _i = 0; _i < arguments.length; _i++) {
          args2[_i] = arguments[_i];
        }
        isArray4.assert(this.value);
        delete getChildCache(this).length;
        return this.value.push.apply(this.value, args2);
      };
      Pp.pop = function pop() {
        isArray4.assert(this.value);
        var cache = getChildCache(this);
        delete cache[this.value.length - 1];
        delete cache.length;
        return this.value.pop();
      };
      Pp.insertAt = function insertAt(index2) {
        var argc = arguments.length;
        var move = getMoves(this, argc - 1, index2);
        if (move === emptyMoves && argc <= 1) {
          return this;
        }
        index2 = Math.max(index2, 0);
        for (var i = 1; i < argc; ++i) {
          this.value[index2 + i - 1] = arguments[i];
        }
        move();
        return this;
      };
      Pp.insertBefore = function insertBefore() {
        var args2 = [];
        for (var _i = 0; _i < arguments.length; _i++) {
          args2[_i] = arguments[_i];
        }
        var pp = this.parentPath;
        var argc = args2.length;
        var insertAtArgs = [this.name];
        for (var i = 0; i < argc; ++i) {
          insertAtArgs.push(args2[i]);
        }
        return pp.insertAt.apply(pp, insertAtArgs);
      };
      Pp.insertAfter = function insertAfter() {
        var args2 = [];
        for (var _i = 0; _i < arguments.length; _i++) {
          args2[_i] = arguments[_i];
        }
        var pp = this.parentPath;
        var argc = args2.length;
        var insertAtArgs = [this.name + 1];
        for (var i = 0; i < argc; ++i) {
          insertAtArgs.push(args2[i]);
        }
        return pp.insertAt.apply(pp, insertAtArgs);
      };
      function repairRelationshipWithParent(path14) {
        if (!(path14 instanceof Path)) {
          throw new Error("");
        }
        var pp = path14.parentPath;
        if (!pp) {
          return path14;
        }
        var parentValue = pp.value;
        var parentCache = getChildCache(pp);
        if (parentValue[path14.name] === path14.value) {
          parentCache[path14.name] = path14;
        } else if (isArray4.check(parentValue)) {
          var i = parentValue.indexOf(path14.value);
          if (i >= 0) {
            parentCache[path14.name = i] = path14;
          }
        } else {
          parentValue[path14.name] = path14.value;
          parentCache[path14.name] = path14;
        }
        if (parentValue[path14.name] !== path14.value) {
          throw new Error("");
        }
        if (path14.parentPath.get(path14.name) !== path14) {
          throw new Error("");
        }
        return path14;
      }
      Pp.replace = function replace(replacement) {
        var results = [];
        var parentValue = this.parentPath.value;
        var parentCache = getChildCache(this.parentPath);
        var count = arguments.length;
        repairRelationshipWithParent(this);
        if (isArray4.check(parentValue)) {
          var originalLength = parentValue.length;
          var move = getMoves(this.parentPath, count - 1, this.name + 1);
          var spliceArgs = [this.name, 1];
          for (var i = 0; i < count; ++i) {
            spliceArgs.push(arguments[i]);
          }
          var splicedOut = parentValue.splice.apply(parentValue, spliceArgs);
          if (splicedOut[0] !== this.value) {
            throw new Error("");
          }
          if (parentValue.length !== originalLength - 1 + count) {
            throw new Error("");
          }
          move();
          if (count === 0) {
            delete this.value;
            delete parentCache[this.name];
            this.__childCache = null;
          } else {
            if (parentValue[this.name] !== replacement) {
              throw new Error("");
            }
            if (this.value !== replacement) {
              this.value = replacement;
              this.__childCache = null;
            }
            for (i = 0; i < count; ++i) {
              results.push(this.parentPath.get(this.name + i));
            }
            if (results[0] !== this) {
              throw new Error("");
            }
          }
        } else if (count === 1) {
          if (this.value !== replacement) {
            this.__childCache = null;
          }
          this.value = parentValue[this.name] = replacement;
          results.push(this);
        } else if (count === 0) {
          delete parentValue[this.name];
          delete this.value;
          this.__childCache = null;
        } else {
          throw new Error("Could not replace path");
        }
        return results;
      };
      return Path;
    }
    exports$1.default = pathPlugin;
    module2.exports = exports$1["default"];
  })(path7, path7.exports);
  return path7.exports;
}
function requireScope() {
  if (hasRequiredScope) return scope.exports;
  hasRequiredScope = 1;
  (function(module2, exports$1) {
    Object.defineProperty(exports$1, "__esModule", { value: true });
    var tslib_1 = require$$0;
    var types_1 = tslib_1.__importDefault(requireTypes$1());
    var hasOwn = Object.prototype.hasOwnProperty;
    function scopePlugin(fork2) {
      var types2 = fork2.use(types_1.default);
      var Type2 = types2.Type;
      var namedTypes2 = types2.namedTypes;
      var Node4 = namedTypes2.Node;
      var Expression = namedTypes2.Expression;
      var isArray4 = types2.builtInTypes.array;
      var b = types2.builders;
      var Scope3 = function Scope4(path14, parentScope) {
        if (!(this instanceof Scope4)) {
          throw new Error("Scope constructor cannot be invoked without 'new'");
        }
        ScopeType.assert(path14.value);
        var depth;
        if (parentScope) {
          if (!(parentScope instanceof Scope4)) {
            throw new Error("");
          }
          depth = parentScope.depth + 1;
        } else {
          parentScope = null;
          depth = 0;
        }
        Object.defineProperties(this, {
          path: { value: path14 },
          node: { value: path14.value },
          isGlobal: { value: !parentScope, enumerable: true },
          depth: { value: depth },
          parent: { value: parentScope },
          bindings: { value: {} },
          types: { value: {} }
        });
      };
      var scopeTypes = [
        namedTypes2.Program,
        namedTypes2.Function,
        namedTypes2.CatchClause
      ];
      var ScopeType = Type2.or.apply(Type2, scopeTypes);
      Scope3.isEstablishedBy = function(node2) {
        return ScopeType.check(node2);
      };
      var Sp = Scope3.prototype;
      Sp.didScan = false;
      Sp.declares = function(name) {
        this.scan();
        return hasOwn.call(this.bindings, name);
      };
      Sp.declaresType = function(name) {
        this.scan();
        return hasOwn.call(this.types, name);
      };
      Sp.declareTemporary = function(prefix) {
        if (prefix) {
          if (!/^[a-z$_]/i.test(prefix)) {
            throw new Error("");
          }
        } else {
          prefix = "t$";
        }
        prefix += this.depth.toString(36) + "$";
        this.scan();
        var index2 = 0;
        while (this.declares(prefix + index2)) {
          ++index2;
        }
        var name = prefix + index2;
        return this.bindings[name] = types2.builders.identifier(name);
      };
      Sp.injectTemporary = function(identifier, init2) {
        identifier || (identifier = this.declareTemporary());
        var bodyPath = this.path.get("body");
        if (namedTypes2.BlockStatement.check(bodyPath.value)) {
          bodyPath = bodyPath.get("body");
        }
        bodyPath.unshift(b.variableDeclaration("var", [b.variableDeclarator(identifier, init2 || null)]));
        return identifier;
      };
      Sp.scan = function(force) {
        if (force || !this.didScan) {
          for (var name in this.bindings) {
            delete this.bindings[name];
          }
          scanScope(this.path, this.bindings, this.types);
          this.didScan = true;
        }
      };
      Sp.getBindings = function() {
        this.scan();
        return this.bindings;
      };
      Sp.getTypes = function() {
        this.scan();
        return this.types;
      };
      function scanScope(path14, bindings, scopeTypes2) {
        var node2 = path14.value;
        ScopeType.assert(node2);
        if (namedTypes2.CatchClause.check(node2)) {
          var param = path14.get("param");
          if (param.value) {
            addPattern2(param, bindings);
          }
        } else {
          recursiveScanScope(path14, bindings, scopeTypes2);
        }
      }
      function recursiveScanScope(path14, bindings, scopeTypes2) {
        var node2 = path14.value;
        if (path14.parent && namedTypes2.FunctionExpression.check(path14.parent.node) && path14.parent.node.id) {
          addPattern2(path14.parent.get("id"), bindings);
        }
        if (!node2) ;
        else if (isArray4.check(node2)) {
          path14.each(function(childPath) {
            recursiveScanChild(childPath, bindings, scopeTypes2);
          });
        } else if (namedTypes2.Function.check(node2)) {
          path14.get("params").each(function(paramPath) {
            addPattern2(paramPath, bindings);
          });
          recursiveScanChild(path14.get("body"), bindings, scopeTypes2);
        } else if (namedTypes2.TypeAlias && namedTypes2.TypeAlias.check(node2) || namedTypes2.InterfaceDeclaration && namedTypes2.InterfaceDeclaration.check(node2) || namedTypes2.TSTypeAliasDeclaration && namedTypes2.TSTypeAliasDeclaration.check(node2) || namedTypes2.TSInterfaceDeclaration && namedTypes2.TSInterfaceDeclaration.check(node2)) {
          addTypePattern(path14.get("id"), scopeTypes2);
        } else if (namedTypes2.VariableDeclarator.check(node2)) {
          addPattern2(path14.get("id"), bindings);
          recursiveScanChild(path14.get("init"), bindings, scopeTypes2);
        } else if (node2.type === "ImportSpecifier" || node2.type === "ImportNamespaceSpecifier" || node2.type === "ImportDefaultSpecifier") {
          addPattern2(
            path14.get(node2.local ? "local" : node2.name ? "name" : "id"),
            bindings
          );
        } else if (Node4.check(node2) && !Expression.check(node2)) {
          types2.eachField(node2, function(name, child) {
            var childPath = path14.get(name);
            if (!pathHasValue(childPath, child)) {
              throw new Error("");
            }
            recursiveScanChild(childPath, bindings, scopeTypes2);
          });
        }
      }
      function pathHasValue(path14, value) {
        if (path14.value === value) {
          return true;
        }
        if (Array.isArray(path14.value) && path14.value.length === 0 && Array.isArray(value) && value.length === 0) {
          return true;
        }
        return false;
      }
      function recursiveScanChild(path14, bindings, scopeTypes2) {
        var node2 = path14.value;
        if (!node2 || Expression.check(node2)) ;
        else if (namedTypes2.FunctionDeclaration.check(node2) && node2.id !== null) {
          addPattern2(path14.get("id"), bindings);
        } else if (namedTypes2.ClassDeclaration && namedTypes2.ClassDeclaration.check(node2)) {
          addPattern2(path14.get("id"), bindings);
        } else if (ScopeType.check(node2)) {
          if (namedTypes2.CatchClause.check(node2) && namedTypes2.Identifier.check(node2.param)) {
            var catchParamName = node2.param.name;
            var hadBinding = hasOwn.call(bindings, catchParamName);
            recursiveScanScope(path14.get("body"), bindings, scopeTypes2);
            if (!hadBinding) {
              delete bindings[catchParamName];
            }
          }
        } else {
          recursiveScanScope(path14, bindings, scopeTypes2);
        }
      }
      function addPattern2(patternPath, bindings) {
        var pattern2 = patternPath.value;
        namedTypes2.Pattern.assert(pattern2);
        if (namedTypes2.Identifier.check(pattern2)) {
          if (hasOwn.call(bindings, pattern2.name)) {
            bindings[pattern2.name].push(patternPath);
          } else {
            bindings[pattern2.name] = [patternPath];
          }
        } else if (namedTypes2.AssignmentPattern && namedTypes2.AssignmentPattern.check(pattern2)) {
          addPattern2(patternPath.get("left"), bindings);
        } else if (namedTypes2.ObjectPattern && namedTypes2.ObjectPattern.check(pattern2)) {
          patternPath.get("properties").each(function(propertyPath) {
            var property = propertyPath.value;
            if (namedTypes2.Pattern.check(property)) {
              addPattern2(propertyPath, bindings);
            } else if (namedTypes2.Property.check(property)) {
              addPattern2(propertyPath.get("value"), bindings);
            } else if (namedTypes2.SpreadProperty && namedTypes2.SpreadProperty.check(property)) {
              addPattern2(propertyPath.get("argument"), bindings);
            }
          });
        } else if (namedTypes2.ArrayPattern && namedTypes2.ArrayPattern.check(pattern2)) {
          patternPath.get("elements").each(function(elementPath) {
            var element = elementPath.value;
            if (namedTypes2.Pattern.check(element)) {
              addPattern2(elementPath, bindings);
            } else if (namedTypes2.SpreadElement && namedTypes2.SpreadElement.check(element)) {
              addPattern2(elementPath.get("argument"), bindings);
            }
          });
        } else if (namedTypes2.PropertyPattern && namedTypes2.PropertyPattern.check(pattern2)) {
          addPattern2(patternPath.get("pattern"), bindings);
        } else if (namedTypes2.SpreadElementPattern && namedTypes2.SpreadElementPattern.check(pattern2) || namedTypes2.SpreadPropertyPattern && namedTypes2.SpreadPropertyPattern.check(pattern2)) {
          addPattern2(patternPath.get("argument"), bindings);
        }
      }
      function addTypePattern(patternPath, types3) {
        var pattern2 = patternPath.value;
        namedTypes2.Pattern.assert(pattern2);
        if (namedTypes2.Identifier.check(pattern2)) {
          if (hasOwn.call(types3, pattern2.name)) {
            types3[pattern2.name].push(patternPath);
          } else {
            types3[pattern2.name] = [patternPath];
          }
        }
      }
      Sp.lookup = function(name) {
        for (var scope2 = this; scope2; scope2 = scope2.parent)
          if (scope2.declares(name))
            break;
        return scope2;
      };
      Sp.lookupType = function(name) {
        for (var scope2 = this; scope2; scope2 = scope2.parent)
          if (scope2.declaresType(name))
            break;
        return scope2;
      };
      Sp.getGlobalScope = function() {
        var scope2 = this;
        while (!scope2.isGlobal)
          scope2 = scope2.parent;
        return scope2;
      };
      return Scope3;
    }
    exports$1.default = scopePlugin;
    module2.exports = exports$1["default"];
  })(scope, scope.exports);
  return scope.exports;
}
function requireNodePath() {
  if (hasRequiredNodePath) return nodePath.exports;
  hasRequiredNodePath = 1;
  (function(module2, exports$1) {
    Object.defineProperty(exports$1, "__esModule", { value: true });
    var tslib_1 = require$$0;
    var types_1 = tslib_1.__importDefault(requireTypes$1());
    var path_1 = tslib_1.__importDefault(requirePath());
    var scope_1 = tslib_1.__importDefault(requireScope());
    function nodePathPlugin(fork2) {
      var types2 = fork2.use(types_1.default);
      var n = types2.namedTypes;
      var b = types2.builders;
      var isNumber2 = types2.builtInTypes.number;
      var isArray4 = types2.builtInTypes.array;
      var Path = fork2.use(path_1.default);
      var Scope3 = fork2.use(scope_1.default);
      var NodePath = function NodePath2(value, parentPath, name) {
        if (!(this instanceof NodePath2)) {
          throw new Error("NodePath constructor cannot be invoked without 'new'");
        }
        Path.call(this, value, parentPath, name);
      };
      var NPp = NodePath.prototype = Object.create(Path.prototype, {
        constructor: {
          value: NodePath,
          enumerable: false,
          writable: true,
          configurable: true
        }
      });
      Object.defineProperties(NPp, {
        node: {
          get: function() {
            Object.defineProperty(this, "node", {
              configurable: true,
              value: this._computeNode()
            });
            return this.node;
          }
        },
        parent: {
          get: function() {
            Object.defineProperty(this, "parent", {
              configurable: true,
              value: this._computeParent()
            });
            return this.parent;
          }
        },
        scope: {
          get: function() {
            Object.defineProperty(this, "scope", {
              configurable: true,
              value: this._computeScope()
            });
            return this.scope;
          }
        }
      });
      NPp.replace = function() {
        delete this.node;
        delete this.parent;
        delete this.scope;
        return Path.prototype.replace.apply(this, arguments);
      };
      NPp.prune = function() {
        var remainingNodePath = this.parent;
        this.replace();
        return cleanUpNodesAfterPrune(remainingNodePath);
      };
      NPp._computeNode = function() {
        var value = this.value;
        if (n.Node.check(value)) {
          return value;
        }
        var pp = this.parentPath;
        return pp && pp.node || null;
      };
      NPp._computeParent = function() {
        var value = this.value;
        var pp = this.parentPath;
        if (!n.Node.check(value)) {
          while (pp && !n.Node.check(pp.value)) {
            pp = pp.parentPath;
          }
          if (pp) {
            pp = pp.parentPath;
          }
        }
        while (pp && !n.Node.check(pp.value)) {
          pp = pp.parentPath;
        }
        return pp || null;
      };
      NPp._computeScope = function() {
        var value = this.value;
        var pp = this.parentPath;
        var scope2 = pp && pp.scope;
        if (n.Node.check(value) && Scope3.isEstablishedBy(value)) {
          scope2 = new Scope3(this, scope2);
        }
        return scope2 || null;
      };
      NPp.getValueProperty = function(name) {
        return types2.getFieldValue(this.value, name);
      };
      NPp.needsParens = function(assumeExpressionContext) {
        var pp = this.parentPath;
        if (!pp) {
          return false;
        }
        var node2 = this.value;
        if (!n.Expression.check(node2)) {
          return false;
        }
        if (node2.type === "Identifier") {
          return false;
        }
        while (!n.Node.check(pp.value)) {
          pp = pp.parentPath;
          if (!pp) {
            return false;
          }
        }
        var parent = pp.value;
        switch (node2.type) {
          case "UnaryExpression":
          case "SpreadElement":
          case "SpreadProperty":
            return parent.type === "MemberExpression" && this.name === "object" && parent.object === node2;
          case "BinaryExpression":
          case "LogicalExpression":
            switch (parent.type) {
              case "CallExpression":
                return this.name === "callee" && parent.callee === node2;
              case "UnaryExpression":
              case "SpreadElement":
              case "SpreadProperty":
                return true;
              case "MemberExpression":
                return this.name === "object" && parent.object === node2;
              case "BinaryExpression":
              case "LogicalExpression": {
                var n_1 = node2;
                var po = parent.operator;
                var pp_1 = PRECEDENCE[po];
                var no = n_1.operator;
                var np = PRECEDENCE[no];
                if (pp_1 > np) {
                  return true;
                }
                if (pp_1 === np && this.name === "right") {
                  if (parent.right !== n_1) {
                    throw new Error("Nodes must be equal");
                  }
                  return true;
                }
              }
              default:
                return false;
            }
          case "SequenceExpression":
            switch (parent.type) {
              case "ForStatement":
                return false;
              case "ExpressionStatement":
                return this.name !== "expression";
              default:
                return true;
            }
          case "YieldExpression":
            switch (parent.type) {
              case "BinaryExpression":
              case "LogicalExpression":
              case "UnaryExpression":
              case "SpreadElement":
              case "SpreadProperty":
              case "CallExpression":
              case "MemberExpression":
              case "NewExpression":
              case "ConditionalExpression":
              case "YieldExpression":
                return true;
              default:
                return false;
            }
          case "Literal":
            return parent.type === "MemberExpression" && isNumber2.check(node2.value) && this.name === "object" && parent.object === node2;
          case "AssignmentExpression":
          case "ConditionalExpression":
            switch (parent.type) {
              case "UnaryExpression":
              case "SpreadElement":
              case "SpreadProperty":
              case "BinaryExpression":
              case "LogicalExpression":
                return true;
              case "CallExpression":
                return this.name === "callee" && parent.callee === node2;
              case "ConditionalExpression":
                return this.name === "test" && parent.test === node2;
              case "MemberExpression":
                return this.name === "object" && parent.object === node2;
              default:
                return false;
            }
          default:
            if (parent.type === "NewExpression" && this.name === "callee" && parent.callee === node2) {
              return containsCallExpression(node2);
            }
        }
        if (assumeExpressionContext !== true && !this.canBeFirstInStatement() && this.firstInStatement())
          return true;
        return false;
      };
      function isBinary(node2) {
        return n.BinaryExpression.check(node2) || n.LogicalExpression.check(node2);
      }
      var PRECEDENCE = {};
      [
        ["||"],
        ["&&"],
        ["|"],
        ["^"],
        ["&"],
        ["==", "===", "!=", "!=="],
        ["<", ">", "<=", ">=", "in", "instanceof"],
        [">>", "<<", ">>>"],
        ["+", "-"],
        ["*", "/", "%"]
      ].forEach(function(tier, i) {
        tier.forEach(function(op) {
          PRECEDENCE[op] = i;
        });
      });
      function containsCallExpression(node2) {
        if (n.CallExpression.check(node2)) {
          return true;
        }
        if (isArray4.check(node2)) {
          return node2.some(containsCallExpression);
        }
        if (n.Node.check(node2)) {
          return types2.someField(node2, function(_name, child) {
            return containsCallExpression(child);
          });
        }
        return false;
      }
      NPp.canBeFirstInStatement = function() {
        var node2 = this.node;
        return !n.FunctionExpression.check(node2) && !n.ObjectExpression.check(node2);
      };
      NPp.firstInStatement = function() {
        return firstInStatement(this);
      };
      function firstInStatement(path14) {
        for (var node2, parent; path14.parent; path14 = path14.parent) {
          node2 = path14.node;
          parent = path14.parent.node;
          if (n.BlockStatement.check(parent) && path14.parent.name === "body" && path14.name === 0) {
            if (parent.body[0] !== node2) {
              throw new Error("Nodes must be equal");
            }
            return true;
          }
          if (n.ExpressionStatement.check(parent) && path14.name === "expression") {
            if (parent.expression !== node2) {
              throw new Error("Nodes must be equal");
            }
            return true;
          }
          if (n.SequenceExpression.check(parent) && path14.parent.name === "expressions" && path14.name === 0) {
            if (parent.expressions[0] !== node2) {
              throw new Error("Nodes must be equal");
            }
            continue;
          }
          if (n.CallExpression.check(parent) && path14.name === "callee") {
            if (parent.callee !== node2) {
              throw new Error("Nodes must be equal");
            }
            continue;
          }
          if (n.MemberExpression.check(parent) && path14.name === "object") {
            if (parent.object !== node2) {
              throw new Error("Nodes must be equal");
            }
            continue;
          }
          if (n.ConditionalExpression.check(parent) && path14.name === "test") {
            if (parent.test !== node2) {
              throw new Error("Nodes must be equal");
            }
            continue;
          }
          if (isBinary(parent) && path14.name === "left") {
            if (parent.left !== node2) {
              throw new Error("Nodes must be equal");
            }
            continue;
          }
          if (n.UnaryExpression.check(parent) && !parent.prefix && path14.name === "argument") {
            if (parent.argument !== node2) {
              throw new Error("Nodes must be equal");
            }
            continue;
          }
          return false;
        }
        return true;
      }
      function cleanUpNodesAfterPrune(remainingNodePath) {
        if (n.VariableDeclaration.check(remainingNodePath.node)) {
          var declarations = remainingNodePath.get("declarations").value;
          if (!declarations || declarations.length === 0) {
            return remainingNodePath.prune();
          }
        } else if (n.ExpressionStatement.check(remainingNodePath.node)) {
          if (!remainingNodePath.get("expression").value) {
            return remainingNodePath.prune();
          }
        } else if (n.IfStatement.check(remainingNodePath.node)) {
          cleanUpIfStatementAfterPrune(remainingNodePath);
        }
        return remainingNodePath;
      }
      function cleanUpIfStatementAfterPrune(ifStatement) {
        var testExpression = ifStatement.get("test").value;
        var alternate = ifStatement.get("alternate").value;
        var consequent = ifStatement.get("consequent").value;
        if (!consequent && !alternate) {
          var testExpressionStatement = b.expressionStatement(testExpression);
          ifStatement.replace(testExpressionStatement);
        } else if (!consequent && alternate) {
          var negatedTestExpression = b.unaryExpression("!", testExpression, true);
          if (n.UnaryExpression.check(testExpression) && testExpression.operator === "!") {
            negatedTestExpression = testExpression.argument;
          }
          ifStatement.get("test").replace(negatedTestExpression);
          ifStatement.get("consequent").replace(alternate);
          ifStatement.get("alternate").replace();
        }
      }
      return NodePath;
    }
    exports$1.default = nodePathPlugin;
    module2.exports = exports$1["default"];
  })(nodePath, nodePath.exports);
  return nodePath.exports;
}
function requirePathVisitor() {
  if (hasRequiredPathVisitor) return pathVisitor.exports;
  hasRequiredPathVisitor = 1;
  (function(module2, exports$1) {
    Object.defineProperty(exports$1, "__esModule", { value: true });
    var tslib_1 = require$$0;
    var types_1 = tslib_1.__importDefault(requireTypes$1());
    var node_path_1 = tslib_1.__importDefault(requireNodePath());
    var hasOwn = Object.prototype.hasOwnProperty;
    function pathVisitorPlugin(fork2) {
      var types2 = fork2.use(types_1.default);
      var NodePath = fork2.use(node_path_1.default);
      var isArray4 = types2.builtInTypes.array;
      var isObject3 = types2.builtInTypes.object;
      var isFunction3 = types2.builtInTypes.function;
      var undefined$1;
      var PathVisitor = function PathVisitor2() {
        if (!(this instanceof PathVisitor2)) {
          throw new Error("PathVisitor constructor cannot be invoked without 'new'");
        }
        this._reusableContextStack = [];
        this._methodNameTable = computeMethodNameTable(this);
        this._shouldVisitComments = hasOwn.call(this._methodNameTable, "Block") || hasOwn.call(this._methodNameTable, "Line");
        this.Context = makeContextConstructor(this);
        this._visiting = false;
        this._changeReported = false;
      };
      function computeMethodNameTable(visitor) {
        var typeNames = /* @__PURE__ */ Object.create(null);
        for (var methodName in visitor) {
          if (/^visit[A-Z]/.test(methodName)) {
            typeNames[methodName.slice("visit".length)] = true;
          }
        }
        var supertypeTable = types2.computeSupertypeLookupTable(typeNames);
        var methodNameTable = /* @__PURE__ */ Object.create(null);
        var typeNameKeys = Object.keys(supertypeTable);
        var typeNameCount = typeNameKeys.length;
        for (var i = 0; i < typeNameCount; ++i) {
          var typeName = typeNameKeys[i];
          methodName = "visit" + supertypeTable[typeName];
          if (isFunction3.check(visitor[methodName])) {
            methodNameTable[typeName] = methodName;
          }
        }
        return methodNameTable;
      }
      PathVisitor.fromMethodsObject = function fromMethodsObject(methods) {
        if (methods instanceof PathVisitor) {
          return methods;
        }
        if (!isObject3.check(methods)) {
          return new PathVisitor();
        }
        var Visitor = function Visitor2() {
          if (!(this instanceof Visitor2)) {
            throw new Error("Visitor constructor cannot be invoked without 'new'");
          }
          PathVisitor.call(this);
        };
        var Vp = Visitor.prototype = Object.create(PVp);
        Vp.constructor = Visitor;
        extend2(Vp, methods);
        extend2(Visitor, PathVisitor);
        isFunction3.assert(Visitor.fromMethodsObject);
        isFunction3.assert(Visitor.visit);
        return new Visitor();
      };
      function extend2(target, source2) {
        for (var property in source2) {
          if (hasOwn.call(source2, property)) {
            target[property] = source2[property];
          }
        }
        return target;
      }
      PathVisitor.visit = function visit(node2, methods) {
        return PathVisitor.fromMethodsObject(methods).visit(node2);
      };
      var PVp = PathVisitor.prototype;
      PVp.visit = function() {
        if (this._visiting) {
          throw new Error("Recursively calling visitor.visit(path) resets visitor state. Try this.visit(path) or this.traverse(path) instead.");
        }
        this._visiting = true;
        this._changeReported = false;
        this._abortRequested = false;
        var argc = arguments.length;
        var args2 = new Array(argc);
        for (var i = 0; i < argc; ++i) {
          args2[i] = arguments[i];
        }
        if (!(args2[0] instanceof NodePath)) {
          args2[0] = new NodePath({ root: args2[0] }).get("root");
        }
        this.reset.apply(this, args2);
        var didNotThrow;
        try {
          var root2 = this.visitWithoutReset(args2[0]);
          didNotThrow = true;
        } finally {
          this._visiting = false;
          if (!didNotThrow && this._abortRequested) {
            return args2[0].value;
          }
        }
        return root2;
      };
      PVp.AbortRequest = function AbortRequest() {
      };
      PVp.abort = function() {
        var visitor = this;
        visitor._abortRequested = true;
        var request3 = new visitor.AbortRequest();
        request3.cancel = function() {
          visitor._abortRequested = false;
        };
        throw request3;
      };
      PVp.reset = function(_path) {
      };
      PVp.visitWithoutReset = function(path14) {
        if (this instanceof this.Context) {
          return this.visitor.visitWithoutReset(path14);
        }
        if (!(path14 instanceof NodePath)) {
          throw new Error("");
        }
        var value = path14.value;
        var methodName = value && typeof value === "object" && typeof value.type === "string" && this._methodNameTable[value.type];
        if (methodName) {
          var context2 = this.acquireContext(path14);
          try {
            return context2.invokeVisitorMethod(methodName);
          } finally {
            this.releaseContext(context2);
          }
        } else {
          return visitChildren(path14, this);
        }
      };
      function visitChildren(path14, visitor) {
        if (!(path14 instanceof NodePath)) {
          throw new Error("");
        }
        if (!(visitor instanceof PathVisitor)) {
          throw new Error("");
        }
        var value = path14.value;
        if (isArray4.check(value)) {
          path14.each(visitor.visitWithoutReset, visitor);
        } else if (!isObject3.check(value)) ;
        else {
          var childNames = types2.getFieldNames(value);
          if (visitor._shouldVisitComments && value.comments && childNames.indexOf("comments") < 0) {
            childNames.push("comments");
          }
          var childCount = childNames.length;
          var childPaths = [];
          for (var i = 0; i < childCount; ++i) {
            var childName = childNames[i];
            if (!hasOwn.call(value, childName)) {
              value[childName] = types2.getFieldValue(value, childName);
            }
            childPaths.push(path14.get(childName));
          }
          for (var i = 0; i < childCount; ++i) {
            visitor.visitWithoutReset(childPaths[i]);
          }
        }
        return path14.value;
      }
      PVp.acquireContext = function(path14) {
        if (this._reusableContextStack.length === 0) {
          return new this.Context(path14);
        }
        return this._reusableContextStack.pop().reset(path14);
      };
      PVp.releaseContext = function(context2) {
        if (!(context2 instanceof this.Context)) {
          throw new Error("");
        }
        this._reusableContextStack.push(context2);
        context2.currentPath = null;
      };
      PVp.reportChanged = function() {
        this._changeReported = true;
      };
      PVp.wasChangeReported = function() {
        return this._changeReported;
      };
      function makeContextConstructor(visitor) {
        function Context(path14) {
          if (!(this instanceof Context)) {
            throw new Error("");
          }
          if (!(this instanceof PathVisitor)) {
            throw new Error("");
          }
          if (!(path14 instanceof NodePath)) {
            throw new Error("");
          }
          Object.defineProperty(this, "visitor", {
            value: visitor,
            writable: false,
            enumerable: true,
            configurable: false
          });
          this.currentPath = path14;
          this.needToCallTraverse = true;
          Object.seal(this);
        }
        if (!(visitor instanceof PathVisitor)) {
          throw new Error("");
        }
        var Cp = Context.prototype = Object.create(visitor);
        Cp.constructor = Context;
        extend2(Cp, sharedContextProtoMethods);
        return Context;
      }
      var sharedContextProtoMethods = /* @__PURE__ */ Object.create(null);
      sharedContextProtoMethods.reset = function reset32(path14) {
        if (!(this instanceof this.Context)) {
          throw new Error("");
        }
        if (!(path14 instanceof NodePath)) {
          throw new Error("");
        }
        this.currentPath = path14;
        this.needToCallTraverse = true;
        return this;
      };
      sharedContextProtoMethods.invokeVisitorMethod = function invokeVisitorMethod(methodName) {
        if (!(this instanceof this.Context)) {
          throw new Error("");
        }
        if (!(this.currentPath instanceof NodePath)) {
          throw new Error("");
        }
        var result = this.visitor[methodName].call(this, this.currentPath);
        if (result === false) {
          this.needToCallTraverse = false;
        } else if (result !== undefined$1) {
          this.currentPath = this.currentPath.replace(result)[0];
          if (this.needToCallTraverse) {
            this.traverse(this.currentPath);
          }
        }
        if (this.needToCallTraverse !== false) {
          throw new Error("Must either call this.traverse or return false in " + methodName);
        }
        var path14 = this.currentPath;
        return path14 && path14.value;
      };
      sharedContextProtoMethods.traverse = function traverse(path14, newVisitor) {
        if (!(this instanceof this.Context)) {
          throw new Error("");
        }
        if (!(path14 instanceof NodePath)) {
          throw new Error("");
        }
        if (!(this.currentPath instanceof NodePath)) {
          throw new Error("");
        }
        this.needToCallTraverse = false;
        return visitChildren(path14, PathVisitor.fromMethodsObject(newVisitor || this.visitor));
      };
      sharedContextProtoMethods.visit = function visit(path14, newVisitor) {
        if (!(this instanceof this.Context)) {
          throw new Error("");
        }
        if (!(path14 instanceof NodePath)) {
          throw new Error("");
        }
        if (!(this.currentPath instanceof NodePath)) {
          throw new Error("");
        }
        this.needToCallTraverse = false;
        return PathVisitor.fromMethodsObject(newVisitor || this.visitor).visitWithoutReset(path14);
      };
      sharedContextProtoMethods.reportChanged = function reportChanged() {
        this.visitor.reportChanged();
      };
      sharedContextProtoMethods.abort = function abort() {
        this.needToCallTraverse = false;
        this.visitor.abort();
      };
      return PathVisitor;
    }
    exports$1.default = pathVisitorPlugin;
    module2.exports = exports$1["default"];
  })(pathVisitor, pathVisitor.exports);
  return pathVisitor.exports;
}
function requireEquiv() {
  if (hasRequiredEquiv) return equiv.exports;
  hasRequiredEquiv = 1;
  (function(module2, exports$1) {
    Object.defineProperty(exports$1, "__esModule", { value: true });
    var tslib_1 = require$$0;
    var types_1 = tslib_1.__importDefault(requireTypes$1());
    function default_1(fork2) {
      var types2 = fork2.use(types_1.default);
      var getFieldNames = types2.getFieldNames;
      var getFieldValue = types2.getFieldValue;
      var isArray4 = types2.builtInTypes.array;
      var isObject3 = types2.builtInTypes.object;
      var isDate = types2.builtInTypes.Date;
      var isRegExp = types2.builtInTypes.RegExp;
      var hasOwn = Object.prototype.hasOwnProperty;
      function astNodesAreEquivalent(a, b, problemPath) {
        if (isArray4.check(problemPath)) {
          problemPath.length = 0;
        } else {
          problemPath = null;
        }
        return areEquivalent(a, b, problemPath);
      }
      astNodesAreEquivalent.assert = function(a, b) {
        var problemPath = [];
        if (!astNodesAreEquivalent(a, b, problemPath)) {
          if (problemPath.length === 0) {
            if (a !== b) {
              throw new Error("Nodes must be equal");
            }
          } else {
            throw new Error("Nodes differ in the following path: " + problemPath.map(subscriptForProperty).join(""));
          }
        }
      };
      function subscriptForProperty(property) {
        if (/[_$a-z][_$a-z0-9]*/i.test(property)) {
          return "." + property;
        }
        return "[" + JSON.stringify(property) + "]";
      }
      function areEquivalent(a, b, problemPath) {
        if (a === b) {
          return true;
        }
        if (isArray4.check(a)) {
          return arraysAreEquivalent(a, b, problemPath);
        }
        if (isObject3.check(a)) {
          return objectsAreEquivalent(a, b, problemPath);
        }
        if (isDate.check(a)) {
          return isDate.check(b) && +a === +b;
        }
        if (isRegExp.check(a)) {
          return isRegExp.check(b) && (a.source === b.source && a.global === b.global && a.multiline === b.multiline && a.ignoreCase === b.ignoreCase);
        }
        return a == b;
      }
      function arraysAreEquivalent(a, b, problemPath) {
        isArray4.assert(a);
        var aLength = a.length;
        if (!isArray4.check(b) || b.length !== aLength) {
          if (problemPath) {
            problemPath.push("length");
          }
          return false;
        }
        for (var i = 0; i < aLength; ++i) {
          if (problemPath) {
            problemPath.push(i);
          }
          if (i in a !== i in b) {
            return false;
          }
          if (!areEquivalent(a[i], b[i], problemPath)) {
            return false;
          }
          if (problemPath) {
            var problemPathTail = problemPath.pop();
            if (problemPathTail !== i) {
              throw new Error("" + problemPathTail);
            }
          }
        }
        return true;
      }
      function objectsAreEquivalent(a, b, problemPath) {
        isObject3.assert(a);
        if (!isObject3.check(b)) {
          return false;
        }
        if (a.type !== b.type) {
          if (problemPath) {
            problemPath.push("type");
          }
          return false;
        }
        var aNames = getFieldNames(a);
        var aNameCount = aNames.length;
        var bNames = getFieldNames(b);
        var bNameCount = bNames.length;
        if (aNameCount === bNameCount) {
          for (var i = 0; i < aNameCount; ++i) {
            var name = aNames[i];
            var aChild = getFieldValue(a, name);
            var bChild = getFieldValue(b, name);
            if (problemPath) {
              problemPath.push(name);
            }
            if (!areEquivalent(aChild, bChild, problemPath)) {
              return false;
            }
            if (problemPath) {
              var problemPathTail = problemPath.pop();
              if (problemPathTail !== name) {
                throw new Error("" + problemPathTail);
              }
            }
          }
          return true;
        }
        if (!problemPath) {
          return false;
        }
        var seenNames = /* @__PURE__ */ Object.create(null);
        for (i = 0; i < aNameCount; ++i) {
          seenNames[aNames[i]] = true;
        }
        for (i = 0; i < bNameCount; ++i) {
          name = bNames[i];
          if (!hasOwn.call(seenNames, name)) {
            problemPath.push(name);
            return false;
          }
          delete seenNames[name];
        }
        for (name in seenNames) {
          problemPath.push(name);
          break;
        }
        return false;
      }
      return astNodesAreEquivalent;
    }
    exports$1.default = default_1;
    module2.exports = exports$1["default"];
  })(equiv, equiv.exports);
  return equiv.exports;
}
function requireFork() {
  if (hasRequiredFork) return fork.exports;
  hasRequiredFork = 1;
  (function(module2, exports$1) {
    Object.defineProperty(exports$1, "__esModule", { value: true });
    var tslib_1 = require$$0;
    var types_1 = tslib_1.__importDefault(requireTypes$1());
    var path_visitor_1 = tslib_1.__importDefault(requirePathVisitor());
    var equiv_1 = tslib_1.__importDefault(requireEquiv());
    var path_1 = tslib_1.__importDefault(requirePath());
    var node_path_1 = tslib_1.__importDefault(requireNodePath());
    function default_1(defs) {
      var fork2 = createFork();
      var types2 = fork2.use(types_1.default);
      defs.forEach(fork2.use);
      types2.finalize();
      var PathVisitor = fork2.use(path_visitor_1.default);
      return {
        Type: types2.Type,
        builtInTypes: types2.builtInTypes,
        namedTypes: types2.namedTypes,
        builders: types2.builders,
        defineMethod: types2.defineMethod,
        getFieldNames: types2.getFieldNames,
        getFieldValue: types2.getFieldValue,
        eachField: types2.eachField,
        someField: types2.someField,
        getSupertypeNames: types2.getSupertypeNames,
        getBuilderName: types2.getBuilderName,
        astNodesAreEquivalent: fork2.use(equiv_1.default),
        finalize: types2.finalize,
        Path: fork2.use(path_1.default),
        NodePath: fork2.use(node_path_1.default),
        PathVisitor,
        use: fork2.use,
        visit: PathVisitor.visit
      };
    }
    exports$1.default = default_1;
    function createFork() {
      var used = [];
      var usedResult = [];
      function use2(plugin) {
        var idx = used.indexOf(plugin);
        if (idx === -1) {
          idx = used.length;
          used.push(plugin);
          usedResult[idx] = plugin(fork2);
        }
        return usedResult[idx];
      }
      var fork2 = { use: use2 };
      return fork2;
    }
    module2.exports = exports$1["default"];
  })(fork, fork.exports);
  return fork.exports;
}
function requireShared() {
  if (hasRequiredShared) return shared.exports;
  hasRequiredShared = 1;
  (function(module2, exports$1) {
    Object.defineProperty(exports$1, "__esModule", { value: true });
    var tslib_1 = require$$0;
    var types_1 = tslib_1.__importDefault(requireTypes$1());
    function default_1(fork2) {
      var types2 = fork2.use(types_1.default);
      var Type2 = types2.Type;
      var builtin = types2.builtInTypes;
      var isNumber2 = builtin.number;
      function geq(than) {
        return Type2.from(function(value) {
          return isNumber2.check(value) && value >= than;
        }, isNumber2 + " >= " + than);
      }
      var defaults3 = {
        "null": function() {
          return null;
        },
        "emptyArray": function() {
          return [];
        },
        "false": function() {
          return false;
        },
        "true": function() {
          return true;
        },
        "undefined": function() {
        },
        "use strict": function() {
          return "use strict";
        }
      };
      var naiveIsPrimitive = Type2.or(builtin.string, builtin.number, builtin.boolean, builtin.null, builtin.undefined);
      var isPrimitive2 = Type2.from(function(value) {
        if (value === null)
          return true;
        var type2 = typeof value;
        if (type2 === "object" || type2 === "function") {
          return false;
        }
        return true;
      }, naiveIsPrimitive.toString());
      return {
        geq,
        defaults: defaults3,
        isPrimitive: isPrimitive2
      };
    }
    exports$1.default = default_1;
    module2.exports = exports$1["default"];
  })(shared, shared.exports);
  return shared.exports;
}
function requireCore() {
  if (hasRequiredCore) return core$1.exports;
  hasRequiredCore = 1;
  (function(module2, exports$1) {
    Object.defineProperty(exports$1, "__esModule", { value: true });
    var tslib_1 = require$$0;
    var types_1 = tslib_1.__importDefault(requireTypes$1());
    var shared_1 = tslib_1.__importDefault(requireShared());
    function default_1(fork2) {
      var types2 = fork2.use(types_1.default);
      var Type2 = types2.Type;
      var def2 = Type2.def;
      var or = Type2.or;
      var shared2 = fork2.use(shared_1.default);
      var defaults3 = shared2.defaults;
      var geq = shared2.geq;
      def2("Printable").field("loc", or(def2("SourceLocation"), null), defaults3["null"], true);
      def2("Node").bases("Printable").field("type", String).field("comments", or([def2("Comment")], null), defaults3["null"], true);
      def2("SourceLocation").field("start", def2("Position")).field("end", def2("Position")).field("source", or(String, null), defaults3["null"]);
      def2("Position").field("line", geq(1)).field("column", geq(0));
      def2("File").bases("Node").build("program", "name").field("program", def2("Program")).field("name", or(String, null), defaults3["null"]);
      def2("Program").bases("Node").build("body").field("body", [def2("Statement")]);
      def2("Function").bases("Node").field("id", or(def2("Identifier"), null), defaults3["null"]).field("params", [def2("Pattern")]).field("body", def2("BlockStatement")).field("generator", Boolean, defaults3["false"]).field("async", Boolean, defaults3["false"]);
      def2("Statement").bases("Node");
      def2("EmptyStatement").bases("Statement").build();
      def2("BlockStatement").bases("Statement").build("body").field("body", [def2("Statement")]);
      def2("ExpressionStatement").bases("Statement").build("expression").field("expression", def2("Expression"));
      def2("IfStatement").bases("Statement").build("test", "consequent", "alternate").field("test", def2("Expression")).field("consequent", def2("Statement")).field("alternate", or(def2("Statement"), null), defaults3["null"]);
      def2("LabeledStatement").bases("Statement").build("label", "body").field("label", def2("Identifier")).field("body", def2("Statement"));
      def2("BreakStatement").bases("Statement").build("label").field("label", or(def2("Identifier"), null), defaults3["null"]);
      def2("ContinueStatement").bases("Statement").build("label").field("label", or(def2("Identifier"), null), defaults3["null"]);
      def2("WithStatement").bases("Statement").build("object", "body").field("object", def2("Expression")).field("body", def2("Statement"));
      def2("SwitchStatement").bases("Statement").build("discriminant", "cases", "lexical").field("discriminant", def2("Expression")).field("cases", [def2("SwitchCase")]).field("lexical", Boolean, defaults3["false"]);
      def2("ReturnStatement").bases("Statement").build("argument").field("argument", or(def2("Expression"), null));
      def2("ThrowStatement").bases("Statement").build("argument").field("argument", def2("Expression"));
      def2("TryStatement").bases("Statement").build("block", "handler", "finalizer").field("block", def2("BlockStatement")).field("handler", or(def2("CatchClause"), null), function() {
        return this.handlers && this.handlers[0] || null;
      }).field("handlers", [def2("CatchClause")], function() {
        return this.handler ? [this.handler] : [];
      }, true).field("guardedHandlers", [def2("CatchClause")], defaults3.emptyArray).field("finalizer", or(def2("BlockStatement"), null), defaults3["null"]);
      def2("CatchClause").bases("Node").build("param", "guard", "body").field("param", or(def2("Pattern"), null), defaults3["null"]).field("guard", or(def2("Expression"), null), defaults3["null"]).field("body", def2("BlockStatement"));
      def2("WhileStatement").bases("Statement").build("test", "body").field("test", def2("Expression")).field("body", def2("Statement"));
      def2("DoWhileStatement").bases("Statement").build("body", "test").field("body", def2("Statement")).field("test", def2("Expression"));
      def2("ForStatement").bases("Statement").build("init", "test", "update", "body").field("init", or(def2("VariableDeclaration"), def2("Expression"), null)).field("test", or(def2("Expression"), null)).field("update", or(def2("Expression"), null)).field("body", def2("Statement"));
      def2("ForInStatement").bases("Statement").build("left", "right", "body").field("left", or(def2("VariableDeclaration"), def2("Expression"))).field("right", def2("Expression")).field("body", def2("Statement"));
      def2("DebuggerStatement").bases("Statement").build();
      def2("Declaration").bases("Statement");
      def2("FunctionDeclaration").bases("Function", "Declaration").build("id", "params", "body").field("id", def2("Identifier"));
      def2("FunctionExpression").bases("Function", "Expression").build("id", "params", "body");
      def2("VariableDeclaration").bases("Declaration").build("kind", "declarations").field("kind", or("var", "let", "const")).field("declarations", [def2("VariableDeclarator")]);
      def2("VariableDeclarator").bases("Node").build("id", "init").field("id", def2("Pattern")).field("init", or(def2("Expression"), null), defaults3["null"]);
      def2("Expression").bases("Node");
      def2("ThisExpression").bases("Expression").build();
      def2("ArrayExpression").bases("Expression").build("elements").field("elements", [or(def2("Expression"), null)]);
      def2("ObjectExpression").bases("Expression").build("properties").field("properties", [def2("Property")]);
      def2("Property").bases("Node").build("kind", "key", "value").field("kind", or("init", "get", "set")).field("key", or(def2("Literal"), def2("Identifier"))).field("value", def2("Expression"));
      def2("SequenceExpression").bases("Expression").build("expressions").field("expressions", [def2("Expression")]);
      var UnaryOperator = or("-", "+", "!", "~", "typeof", "void", "delete");
      def2("UnaryExpression").bases("Expression").build("operator", "argument", "prefix").field("operator", UnaryOperator).field("argument", def2("Expression")).field("prefix", Boolean, defaults3["true"]);
      var BinaryOperator = or(
        "==",
        "!=",
        "===",
        "!==",
        "<",
        "<=",
        ">",
        ">=",
        "<<",
        ">>",
        ">>>",
        "+",
        "-",
        "*",
        "/",
        "%",
        "**",
        "&",
        "|",
        "^",
        "in",
        "instanceof"
      );
      def2("BinaryExpression").bases("Expression").build("operator", "left", "right").field("operator", BinaryOperator).field("left", def2("Expression")).field("right", def2("Expression"));
      var AssignmentOperator = or("=", "+=", "-=", "*=", "/=", "%=", "<<=", ">>=", ">>>=", "|=", "^=", "&=");
      def2("AssignmentExpression").bases("Expression").build("operator", "left", "right").field("operator", AssignmentOperator).field("left", or(def2("Pattern"), def2("MemberExpression"))).field("right", def2("Expression"));
      var UpdateOperator = or("++", "--");
      def2("UpdateExpression").bases("Expression").build("operator", "argument", "prefix").field("operator", UpdateOperator).field("argument", def2("Expression")).field("prefix", Boolean);
      var LogicalOperator = or("||", "&&");
      def2("LogicalExpression").bases("Expression").build("operator", "left", "right").field("operator", LogicalOperator).field("left", def2("Expression")).field("right", def2("Expression"));
      def2("ConditionalExpression").bases("Expression").build("test", "consequent", "alternate").field("test", def2("Expression")).field("consequent", def2("Expression")).field("alternate", def2("Expression"));
      def2("NewExpression").bases("Expression").build("callee", "arguments").field("callee", def2("Expression")).field("arguments", [def2("Expression")]);
      def2("CallExpression").bases("Expression").build("callee", "arguments").field("callee", def2("Expression")).field("arguments", [def2("Expression")]);
      def2("MemberExpression").bases("Expression").build("object", "property", "computed").field("object", def2("Expression")).field("property", or(def2("Identifier"), def2("Expression"))).field("computed", Boolean, function() {
        var type2 = this.property.type;
        if (type2 === "Literal" || type2 === "MemberExpression" || type2 === "BinaryExpression") {
          return true;
        }
        return false;
      });
      def2("Pattern").bases("Node");
      def2("SwitchCase").bases("Node").build("test", "consequent").field("test", or(def2("Expression"), null)).field("consequent", [def2("Statement")]);
      def2("Identifier").bases("Expression", "Pattern").build("name").field("name", String).field("optional", Boolean, defaults3["false"]);
      def2("Literal").bases("Expression").build("value").field("value", or(String, Boolean, null, Number, RegExp)).field("regex", or({
        pattern: String,
        flags: String
      }, null), function() {
        if (this.value instanceof RegExp) {
          var flags = "";
          if (this.value.ignoreCase)
            flags += "i";
          if (this.value.multiline)
            flags += "m";
          if (this.value.global)
            flags += "g";
          return {
            pattern: this.value.source,
            flags
          };
        }
        return null;
      });
      def2("Comment").bases("Printable").field("value", String).field("leading", Boolean, defaults3["true"]).field("trailing", Boolean, defaults3["false"]);
    }
    exports$1.default = default_1;
    module2.exports = exports$1["default"];
  })(core$1, core$1.exports);
  return core$1.exports;
}
function requireEs6() {
  if (hasRequiredEs6) return es6.exports;
  hasRequiredEs6 = 1;
  (function(module2, exports$1) {
    Object.defineProperty(exports$1, "__esModule", { value: true });
    var tslib_1 = require$$0;
    var core_1 = tslib_1.__importDefault(requireCore());
    var types_1 = tslib_1.__importDefault(requireTypes$1());
    var shared_1 = tslib_1.__importDefault(requireShared());
    function default_1(fork2) {
      fork2.use(core_1.default);
      var types2 = fork2.use(types_1.default);
      var def2 = types2.Type.def;
      var or = types2.Type.or;
      var defaults3 = fork2.use(shared_1.default).defaults;
      def2("Function").field("generator", Boolean, defaults3["false"]).field("expression", Boolean, defaults3["false"]).field("defaults", [or(def2("Expression"), null)], defaults3.emptyArray).field("rest", or(def2("Identifier"), null), defaults3["null"]);
      def2("RestElement").bases("Pattern").build("argument").field("argument", def2("Pattern")).field(
        "typeAnnotation",
        or(def2("TypeAnnotation"), def2("TSTypeAnnotation"), null),
        defaults3["null"]
      );
      def2("SpreadElementPattern").bases("Pattern").build("argument").field("argument", def2("Pattern"));
      def2("FunctionDeclaration").build("id", "params", "body", "generator", "expression");
      def2("FunctionExpression").build("id", "params", "body", "generator", "expression");
      def2("ArrowFunctionExpression").bases("Function", "Expression").build("params", "body", "expression").field("id", null, defaults3["null"]).field("body", or(def2("BlockStatement"), def2("Expression"))).field("generator", false, defaults3["false"]);
      def2("ForOfStatement").bases("Statement").build("left", "right", "body").field("left", or(def2("VariableDeclaration"), def2("Pattern"))).field("right", def2("Expression")).field("body", def2("Statement"));
      def2("YieldExpression").bases("Expression").build("argument", "delegate").field("argument", or(def2("Expression"), null)).field("delegate", Boolean, defaults3["false"]);
      def2("GeneratorExpression").bases("Expression").build("body", "blocks", "filter").field("body", def2("Expression")).field("blocks", [def2("ComprehensionBlock")]).field("filter", or(def2("Expression"), null));
      def2("ComprehensionExpression").bases("Expression").build("body", "blocks", "filter").field("body", def2("Expression")).field("blocks", [def2("ComprehensionBlock")]).field("filter", or(def2("Expression"), null));
      def2("ComprehensionBlock").bases("Node").build("left", "right", "each").field("left", def2("Pattern")).field("right", def2("Expression")).field("each", Boolean);
      def2("Property").field("key", or(def2("Literal"), def2("Identifier"), def2("Expression"))).field("value", or(def2("Expression"), def2("Pattern"))).field("method", Boolean, defaults3["false"]).field("shorthand", Boolean, defaults3["false"]).field("computed", Boolean, defaults3["false"]);
      def2("ObjectProperty").field("shorthand", Boolean, defaults3["false"]);
      def2("PropertyPattern").bases("Pattern").build("key", "pattern").field("key", or(def2("Literal"), def2("Identifier"), def2("Expression"))).field("pattern", def2("Pattern")).field("computed", Boolean, defaults3["false"]);
      def2("ObjectPattern").bases("Pattern").build("properties").field("properties", [or(def2("PropertyPattern"), def2("Property"))]);
      def2("ArrayPattern").bases("Pattern").build("elements").field("elements", [or(def2("Pattern"), null)]);
      def2("MethodDefinition").bases("Declaration").build("kind", "key", "value", "static").field("kind", or("constructor", "method", "get", "set")).field("key", def2("Expression")).field("value", def2("Function")).field("computed", Boolean, defaults3["false"]).field("static", Boolean, defaults3["false"]);
      def2("SpreadElement").bases("Node").build("argument").field("argument", def2("Expression"));
      def2("ArrayExpression").field("elements", [or(def2("Expression"), def2("SpreadElement"), def2("RestElement"), null)]);
      def2("NewExpression").field("arguments", [or(def2("Expression"), def2("SpreadElement"))]);
      def2("CallExpression").field("arguments", [or(def2("Expression"), def2("SpreadElement"))]);
      def2("AssignmentPattern").bases("Pattern").build("left", "right").field("left", def2("Pattern")).field("right", def2("Expression"));
      var ClassBodyElement = or(def2("MethodDefinition"), def2("VariableDeclarator"), def2("ClassPropertyDefinition"), def2("ClassProperty"));
      def2("ClassProperty").bases("Declaration").build("key").field("key", or(def2("Literal"), def2("Identifier"), def2("Expression"))).field("computed", Boolean, defaults3["false"]);
      def2("ClassPropertyDefinition").bases("Declaration").build("definition").field("definition", ClassBodyElement);
      def2("ClassBody").bases("Declaration").build("body").field("body", [ClassBodyElement]);
      def2("ClassDeclaration").bases("Declaration").build("id", "body", "superClass").field("id", or(def2("Identifier"), null)).field("body", def2("ClassBody")).field("superClass", or(def2("Expression"), null), defaults3["null"]);
      def2("ClassExpression").bases("Expression").build("id", "body", "superClass").field("id", or(def2("Identifier"), null), defaults3["null"]).field("body", def2("ClassBody")).field("superClass", or(def2("Expression"), null), defaults3["null"]);
      def2("Specifier").bases("Node");
      def2("ModuleSpecifier").bases("Specifier").field("local", or(def2("Identifier"), null), defaults3["null"]).field("id", or(def2("Identifier"), null), defaults3["null"]).field("name", or(def2("Identifier"), null), defaults3["null"]);
      def2("ImportSpecifier").bases("ModuleSpecifier").build("id", "name");
      def2("ImportNamespaceSpecifier").bases("ModuleSpecifier").build("id");
      def2("ImportDefaultSpecifier").bases("ModuleSpecifier").build("id");
      def2("ImportDeclaration").bases("Declaration").build("specifiers", "source", "importKind").field("specifiers", [or(def2("ImportSpecifier"), def2("ImportNamespaceSpecifier"), def2("ImportDefaultSpecifier"))], defaults3.emptyArray).field("source", def2("Literal")).field("importKind", or("value", "type"), function() {
        return "value";
      });
      def2("TaggedTemplateExpression").bases("Expression").build("tag", "quasi").field("tag", def2("Expression")).field("quasi", def2("TemplateLiteral"));
      def2("TemplateLiteral").bases("Expression").build("quasis", "expressions").field("quasis", [def2("TemplateElement")]).field("expressions", [def2("Expression")]);
      def2("TemplateElement").bases("Node").build("value", "tail").field("value", { "cooked": String, "raw": String }).field("tail", Boolean);
    }
    exports$1.default = default_1;
    module2.exports = exports$1["default"];
  })(es6, es6.exports);
  return es6.exports;
}
function requireEs7() {
  if (hasRequiredEs7) return es7.exports;
  hasRequiredEs7 = 1;
  (function(module2, exports$1) {
    Object.defineProperty(exports$1, "__esModule", { value: true });
    var tslib_1 = require$$0;
    var es6_1 = tslib_1.__importDefault(requireEs6());
    var types_1 = tslib_1.__importDefault(requireTypes$1());
    var shared_1 = tslib_1.__importDefault(requireShared());
    function default_1(fork2) {
      fork2.use(es6_1.default);
      var types2 = fork2.use(types_1.default);
      var def2 = types2.Type.def;
      var or = types2.Type.or;
      var defaults3 = fork2.use(shared_1.default).defaults;
      def2("Function").field("async", Boolean, defaults3["false"]);
      def2("SpreadProperty").bases("Node").build("argument").field("argument", def2("Expression"));
      def2("ObjectExpression").field("properties", [or(def2("Property"), def2("SpreadProperty"), def2("SpreadElement"))]);
      def2("SpreadPropertyPattern").bases("Pattern").build("argument").field("argument", def2("Pattern"));
      def2("ObjectPattern").field("properties", [or(def2("Property"), def2("PropertyPattern"), def2("SpreadPropertyPattern"))]);
      def2("AwaitExpression").bases("Expression").build("argument", "all").field("argument", or(def2("Expression"), null)).field("all", Boolean, defaults3["false"]);
    }
    exports$1.default = default_1;
    module2.exports = exports$1["default"];
  })(es7, es7.exports);
  return es7.exports;
}
function requireEs2020() {
  if (hasRequiredEs2020) return es2020.exports;
  hasRequiredEs2020 = 1;
  (function(module2, exports$1) {
    Object.defineProperty(exports$1, "__esModule", { value: true });
    var tslib_1 = require$$0;
    var es7_1 = tslib_1.__importDefault(requireEs7());
    var types_1 = tslib_1.__importDefault(requireTypes$1());
    function default_1(fork2) {
      fork2.use(es7_1.default);
      var types2 = fork2.use(types_1.default);
      var def2 = types2.Type.def;
      def2("ImportExpression").bases("Expression").build("source").field("source", def2("Expression"));
    }
    exports$1.default = default_1;
    module2.exports = exports$1["default"];
  })(es2020, es2020.exports);
  return es2020.exports;
}
function requireJsx() {
  if (hasRequiredJsx) return jsx.exports;
  hasRequiredJsx = 1;
  (function(module2, exports$1) {
    Object.defineProperty(exports$1, "__esModule", { value: true });
    var tslib_1 = require$$0;
    var es7_1 = tslib_1.__importDefault(requireEs7());
    var types_1 = tslib_1.__importDefault(requireTypes$1());
    var shared_1 = tslib_1.__importDefault(requireShared());
    function default_1(fork2) {
      fork2.use(es7_1.default);
      var types2 = fork2.use(types_1.default);
      var def2 = types2.Type.def;
      var or = types2.Type.or;
      var defaults3 = fork2.use(shared_1.default).defaults;
      def2("JSXAttribute").bases("Node").build("name", "value").field("name", or(def2("JSXIdentifier"), def2("JSXNamespacedName"))).field("value", or(
        def2("Literal"),
        def2("JSXExpressionContainer"),
        null
      ), defaults3["null"]);
      def2("JSXIdentifier").bases("Identifier").build("name").field("name", String);
      def2("JSXNamespacedName").bases("Node").build("namespace", "name").field("namespace", def2("JSXIdentifier")).field("name", def2("JSXIdentifier"));
      def2("JSXMemberExpression").bases("MemberExpression").build("object", "property").field("object", or(def2("JSXIdentifier"), def2("JSXMemberExpression"))).field("property", def2("JSXIdentifier")).field("computed", Boolean, defaults3.false);
      var JSXElementName = or(def2("JSXIdentifier"), def2("JSXNamespacedName"), def2("JSXMemberExpression"));
      def2("JSXSpreadAttribute").bases("Node").build("argument").field("argument", def2("Expression"));
      var JSXAttributes = [or(def2("JSXAttribute"), def2("JSXSpreadAttribute"))];
      def2("JSXExpressionContainer").bases("Expression").build("expression").field("expression", def2("Expression"));
      def2("JSXElement").bases("Expression").build("openingElement", "closingElement", "children").field("openingElement", def2("JSXOpeningElement")).field("closingElement", or(def2("JSXClosingElement"), null), defaults3["null"]).field("children", [or(
        def2("JSXElement"),
        def2("JSXExpressionContainer"),
        def2("JSXFragment"),
        def2("JSXText"),
        def2("Literal")
      )], defaults3.emptyArray).field("name", JSXElementName, function() {
        return this.openingElement.name;
      }, true).field("selfClosing", Boolean, function() {
        return this.openingElement.selfClosing;
      }, true).field("attributes", JSXAttributes, function() {
        return this.openingElement.attributes;
      }, true);
      def2("JSXOpeningElement").bases("Node").build("name", "attributes", "selfClosing").field("name", JSXElementName).field("attributes", JSXAttributes, defaults3.emptyArray).field("selfClosing", Boolean, defaults3["false"]);
      def2("JSXClosingElement").bases("Node").build("name").field("name", JSXElementName);
      def2("JSXFragment").bases("Expression").build("openingElement", "closingElement", "children").field("openingElement", def2("JSXOpeningFragment")).field("closingElement", def2("JSXClosingFragment")).field("children", [or(
        def2("JSXElement"),
        def2("JSXExpressionContainer"),
        def2("JSXFragment"),
        def2("JSXText"),
        def2("Literal")
      )], defaults3.emptyArray);
      def2("JSXOpeningFragment").bases("Node").build();
      def2("JSXClosingFragment").bases("Node").build();
      def2("JSXText").bases("Literal").build("value").field("value", String);
      def2("JSXEmptyExpression").bases("Expression").build();
      def2("JSXSpreadChild").bases("Expression").build("expression").field("expression", def2("Expression"));
    }
    exports$1.default = default_1;
    module2.exports = exports$1["default"];
  })(jsx, jsx.exports);
  return jsx.exports;
}
function requireTypeAnnotations() {
  if (hasRequiredTypeAnnotations) return typeAnnotations.exports;
  hasRequiredTypeAnnotations = 1;
  (function(module2, exports$1) {
    Object.defineProperty(exports$1, "__esModule", { value: true });
    var tslib_1 = require$$0;
    var types_1 = tslib_1.__importDefault(requireTypes$1());
    var shared_1 = tslib_1.__importDefault(requireShared());
    function default_1(fork2) {
      var types2 = fork2.use(types_1.default);
      var def2 = types2.Type.def;
      var or = types2.Type.or;
      var defaults3 = fork2.use(shared_1.default).defaults;
      var TypeAnnotation = or(def2("TypeAnnotation"), def2("TSTypeAnnotation"), null);
      var TypeParamDecl = or(def2("TypeParameterDeclaration"), def2("TSTypeParameterDeclaration"), null);
      def2("Identifier").field("typeAnnotation", TypeAnnotation, defaults3["null"]);
      def2("ObjectPattern").field("typeAnnotation", TypeAnnotation, defaults3["null"]);
      def2("Function").field("returnType", TypeAnnotation, defaults3["null"]).field("typeParameters", TypeParamDecl, defaults3["null"]);
      def2("ClassProperty").build("key", "value", "typeAnnotation", "static").field("value", or(def2("Expression"), null)).field("static", Boolean, defaults3["false"]).field("typeAnnotation", TypeAnnotation, defaults3["null"]);
      [
        "ClassDeclaration",
        "ClassExpression"
      ].forEach(function(typeName) {
        def2(typeName).field("typeParameters", TypeParamDecl, defaults3["null"]).field("superTypeParameters", or(def2("TypeParameterInstantiation"), def2("TSTypeParameterInstantiation"), null), defaults3["null"]).field("implements", or([def2("ClassImplements")], [def2("TSExpressionWithTypeArguments")]), defaults3.emptyArray);
      });
    }
    exports$1.default = default_1;
    module2.exports = exports$1["default"];
  })(typeAnnotations, typeAnnotations.exports);
  return typeAnnotations.exports;
}
function requireFlow() {
  if (hasRequiredFlow) return flow.exports;
  hasRequiredFlow = 1;
  (function(module2, exports$1) {
    Object.defineProperty(exports$1, "__esModule", { value: true });
    var tslib_1 = require$$0;
    var es7_1 = tslib_1.__importDefault(requireEs7());
    var type_annotations_1 = tslib_1.__importDefault(requireTypeAnnotations());
    var types_1 = tslib_1.__importDefault(requireTypes$1());
    var shared_1 = tslib_1.__importDefault(requireShared());
    function default_1(fork2) {
      fork2.use(es7_1.default);
      fork2.use(type_annotations_1.default);
      var types2 = fork2.use(types_1.default);
      var def2 = types2.Type.def;
      var or = types2.Type.or;
      var defaults3 = fork2.use(shared_1.default).defaults;
      def2("Flow").bases("Node");
      def2("FlowType").bases("Flow");
      def2("AnyTypeAnnotation").bases("FlowType").build();
      def2("EmptyTypeAnnotation").bases("FlowType").build();
      def2("MixedTypeAnnotation").bases("FlowType").build();
      def2("VoidTypeAnnotation").bases("FlowType").build();
      def2("NumberTypeAnnotation").bases("FlowType").build();
      def2("NumberLiteralTypeAnnotation").bases("FlowType").build("value", "raw").field("value", Number).field("raw", String);
      def2("NumericLiteralTypeAnnotation").bases("FlowType").build("value", "raw").field("value", Number).field("raw", String);
      def2("StringTypeAnnotation").bases("FlowType").build();
      def2("StringLiteralTypeAnnotation").bases("FlowType").build("value", "raw").field("value", String).field("raw", String);
      def2("BooleanTypeAnnotation").bases("FlowType").build();
      def2("BooleanLiteralTypeAnnotation").bases("FlowType").build("value", "raw").field("value", Boolean).field("raw", String);
      def2("TypeAnnotation").bases("Node").build("typeAnnotation").field("typeAnnotation", def2("FlowType"));
      def2("NullableTypeAnnotation").bases("FlowType").build("typeAnnotation").field("typeAnnotation", def2("FlowType"));
      def2("NullLiteralTypeAnnotation").bases("FlowType").build();
      def2("NullTypeAnnotation").bases("FlowType").build();
      def2("ThisTypeAnnotation").bases("FlowType").build();
      def2("ExistsTypeAnnotation").bases("FlowType").build();
      def2("ExistentialTypeParam").bases("FlowType").build();
      def2("FunctionTypeAnnotation").bases("FlowType").build("params", "returnType", "rest", "typeParameters").field("params", [def2("FunctionTypeParam")]).field("returnType", def2("FlowType")).field("rest", or(def2("FunctionTypeParam"), null)).field("typeParameters", or(def2("TypeParameterDeclaration"), null));
      def2("FunctionTypeParam").bases("Node").build("name", "typeAnnotation", "optional").field("name", def2("Identifier")).field("typeAnnotation", def2("FlowType")).field("optional", Boolean);
      def2("ArrayTypeAnnotation").bases("FlowType").build("elementType").field("elementType", def2("FlowType"));
      def2("ObjectTypeAnnotation").bases("FlowType").build("properties", "indexers", "callProperties").field("properties", [
        or(def2("ObjectTypeProperty"), def2("ObjectTypeSpreadProperty"))
      ]).field("indexers", [def2("ObjectTypeIndexer")], defaults3.emptyArray).field("callProperties", [def2("ObjectTypeCallProperty")], defaults3.emptyArray).field("inexact", or(Boolean, void 0), defaults3["undefined"]).field("exact", Boolean, defaults3["false"]).field("internalSlots", [def2("ObjectTypeInternalSlot")], defaults3.emptyArray);
      def2("Variance").bases("Node").build("kind").field("kind", or("plus", "minus"));
      var LegacyVariance = or(def2("Variance"), "plus", "minus", null);
      def2("ObjectTypeProperty").bases("Node").build("key", "value", "optional").field("key", or(def2("Literal"), def2("Identifier"))).field("value", def2("FlowType")).field("optional", Boolean).field("variance", LegacyVariance, defaults3["null"]);
      def2("ObjectTypeIndexer").bases("Node").build("id", "key", "value").field("id", def2("Identifier")).field("key", def2("FlowType")).field("value", def2("FlowType")).field("variance", LegacyVariance, defaults3["null"]);
      def2("ObjectTypeCallProperty").bases("Node").build("value").field("value", def2("FunctionTypeAnnotation")).field("static", Boolean, defaults3["false"]);
      def2("QualifiedTypeIdentifier").bases("Node").build("qualification", "id").field("qualification", or(def2("Identifier"), def2("QualifiedTypeIdentifier"))).field("id", def2("Identifier"));
      def2("GenericTypeAnnotation").bases("FlowType").build("id", "typeParameters").field("id", or(def2("Identifier"), def2("QualifiedTypeIdentifier"))).field("typeParameters", or(def2("TypeParameterInstantiation"), null));
      def2("MemberTypeAnnotation").bases("FlowType").build("object", "property").field("object", def2("Identifier")).field("property", or(def2("MemberTypeAnnotation"), def2("GenericTypeAnnotation")));
      def2("UnionTypeAnnotation").bases("FlowType").build("types").field("types", [def2("FlowType")]);
      def2("IntersectionTypeAnnotation").bases("FlowType").build("types").field("types", [def2("FlowType")]);
      def2("TypeofTypeAnnotation").bases("FlowType").build("argument").field("argument", def2("FlowType"));
      def2("ObjectTypeSpreadProperty").bases("Node").build("argument").field("argument", def2("FlowType"));
      def2("ObjectTypeInternalSlot").bases("Node").build("id", "value", "optional", "static", "method").field("id", def2("Identifier")).field("value", def2("FlowType")).field("optional", Boolean).field("static", Boolean).field("method", Boolean);
      def2("TypeParameterDeclaration").bases("Node").build("params").field("params", [def2("TypeParameter")]);
      def2("TypeParameterInstantiation").bases("Node").build("params").field("params", [def2("FlowType")]);
      def2("TypeParameter").bases("FlowType").build("name", "variance", "bound").field("name", String).field("variance", LegacyVariance, defaults3["null"]).field("bound", or(def2("TypeAnnotation"), null), defaults3["null"]);
      def2("ClassProperty").field("variance", LegacyVariance, defaults3["null"]);
      def2("ClassImplements").bases("Node").build("id").field("id", def2("Identifier")).field("superClass", or(def2("Expression"), null), defaults3["null"]).field("typeParameters", or(def2("TypeParameterInstantiation"), null), defaults3["null"]);
      def2("InterfaceTypeAnnotation").bases("FlowType").build("body", "extends").field("body", def2("ObjectTypeAnnotation")).field("extends", or([def2("InterfaceExtends")], null), defaults3["null"]);
      def2("InterfaceDeclaration").bases("Declaration").build("id", "body", "extends").field("id", def2("Identifier")).field("typeParameters", or(def2("TypeParameterDeclaration"), null), defaults3["null"]).field("body", def2("ObjectTypeAnnotation")).field("extends", [def2("InterfaceExtends")]);
      def2("DeclareInterface").bases("InterfaceDeclaration").build("id", "body", "extends");
      def2("InterfaceExtends").bases("Node").build("id").field("id", def2("Identifier")).field("typeParameters", or(def2("TypeParameterInstantiation"), null), defaults3["null"]);
      def2("TypeAlias").bases("Declaration").build("id", "typeParameters", "right").field("id", def2("Identifier")).field("typeParameters", or(def2("TypeParameterDeclaration"), null)).field("right", def2("FlowType"));
      def2("OpaqueType").bases("Declaration").build("id", "typeParameters", "impltype", "supertype").field("id", def2("Identifier")).field("typeParameters", or(def2("TypeParameterDeclaration"), null)).field("impltype", def2("FlowType")).field("supertype", def2("FlowType"));
      def2("DeclareTypeAlias").bases("TypeAlias").build("id", "typeParameters", "right");
      def2("DeclareOpaqueType").bases("TypeAlias").build("id", "typeParameters", "supertype");
      def2("TypeCastExpression").bases("Expression").build("expression", "typeAnnotation").field("expression", def2("Expression")).field("typeAnnotation", def2("TypeAnnotation"));
      def2("TupleTypeAnnotation").bases("FlowType").build("types").field("types", [def2("FlowType")]);
      def2("DeclareVariable").bases("Statement").build("id").field("id", def2("Identifier"));
      def2("DeclareFunction").bases("Statement").build("id").field("id", def2("Identifier"));
      def2("DeclareClass").bases("InterfaceDeclaration").build("id");
      def2("DeclareModule").bases("Statement").build("id", "body").field("id", or(def2("Identifier"), def2("Literal"))).field("body", def2("BlockStatement"));
      def2("DeclareModuleExports").bases("Statement").build("typeAnnotation").field("typeAnnotation", def2("TypeAnnotation"));
      def2("DeclareExportDeclaration").bases("Declaration").build("default", "declaration", "specifiers", "source").field("default", Boolean).field("declaration", or(
        def2("DeclareVariable"),
        def2("DeclareFunction"),
        def2("DeclareClass"),
        def2("FlowType"),
        null
      )).field("specifiers", [or(def2("ExportSpecifier"), def2("ExportBatchSpecifier"))], defaults3.emptyArray).field("source", or(def2("Literal"), null), defaults3["null"]);
      def2("DeclareExportAllDeclaration").bases("Declaration").build("source").field("source", or(def2("Literal"), null), defaults3["null"]);
      def2("FlowPredicate").bases("Flow");
      def2("InferredPredicate").bases("FlowPredicate").build();
      def2("DeclaredPredicate").bases("FlowPredicate").build("value").field("value", def2("Expression"));
      def2("CallExpression").field("typeArguments", or(null, def2("TypeParameterInstantiation")), defaults3["null"]);
      def2("NewExpression").field("typeArguments", or(null, def2("TypeParameterInstantiation")), defaults3["null"]);
    }
    exports$1.default = default_1;
    module2.exports = exports$1["default"];
  })(flow, flow.exports);
  return flow.exports;
}
function requireEsprima() {
  if (hasRequiredEsprima) return esprima.exports;
  hasRequiredEsprima = 1;
  (function(module2, exports$1) {
    Object.defineProperty(exports$1, "__esModule", { value: true });
    var tslib_1 = require$$0;
    var es7_1 = tslib_1.__importDefault(requireEs7());
    var types_1 = tslib_1.__importDefault(requireTypes$1());
    var shared_1 = tslib_1.__importDefault(requireShared());
    function default_1(fork2) {
      fork2.use(es7_1.default);
      var types2 = fork2.use(types_1.default);
      var defaults3 = fork2.use(shared_1.default).defaults;
      var def2 = types2.Type.def;
      var or = types2.Type.or;
      def2("VariableDeclaration").field("declarations", [or(
        def2("VariableDeclarator"),
        def2("Identifier")
      )]);
      def2("Property").field("value", or(
        def2("Expression"),
        def2("Pattern")
      ));
      def2("ArrayPattern").field("elements", [or(def2("Pattern"), def2("SpreadElement"), null)]);
      def2("ObjectPattern").field("properties", [or(
        def2("Property"),
        def2("PropertyPattern"),
        def2("SpreadPropertyPattern"),
        def2("SpreadProperty")
      )]);
      def2("ExportSpecifier").bases("ModuleSpecifier").build("id", "name");
      def2("ExportBatchSpecifier").bases("Specifier").build();
      def2("ExportDeclaration").bases("Declaration").build("default", "declaration", "specifiers", "source").field("default", Boolean).field("declaration", or(
        def2("Declaration"),
        def2("Expression"),
        null
      )).field("specifiers", [or(def2("ExportSpecifier"), def2("ExportBatchSpecifier"))], defaults3.emptyArray).field("source", or(def2("Literal"), null), defaults3["null"]);
      def2("Block").bases("Comment").build("value", "leading", "trailing");
      def2("Line").bases("Comment").build("value", "leading", "trailing");
    }
    exports$1.default = default_1;
    module2.exports = exports$1["default"];
  })(esprima, esprima.exports);
  return esprima.exports;
}
function requireBabelCore() {
  if (hasRequiredBabelCore) return babelCore.exports;
  hasRequiredBabelCore = 1;
  (function(module2, exports$1) {
    Object.defineProperty(exports$1, "__esModule", { value: true });
    var tslib_1 = require$$0;
    var types_1 = tslib_1.__importDefault(requireTypes$1());
    var shared_1 = tslib_1.__importDefault(requireShared());
    var es7_1 = tslib_1.__importDefault(requireEs7());
    function default_1(fork2) {
      fork2.use(es7_1.default);
      var types2 = fork2.use(types_1.default);
      var defaults3 = fork2.use(shared_1.default).defaults;
      var def2 = types2.Type.def;
      var or = types2.Type.or;
      def2("Noop").bases("Statement").build();
      def2("DoExpression").bases("Expression").build("body").field("body", [def2("Statement")]);
      def2("Super").bases("Expression").build();
      def2("BindExpression").bases("Expression").build("object", "callee").field("object", or(def2("Expression"), null)).field("callee", def2("Expression"));
      def2("Decorator").bases("Node").build("expression").field("expression", def2("Expression"));
      def2("Property").field("decorators", or([def2("Decorator")], null), defaults3["null"]);
      def2("MethodDefinition").field("decorators", or([def2("Decorator")], null), defaults3["null"]);
      def2("MetaProperty").bases("Expression").build("meta", "property").field("meta", def2("Identifier")).field("property", def2("Identifier"));
      def2("ParenthesizedExpression").bases("Expression").build("expression").field("expression", def2("Expression"));
      def2("ImportSpecifier").bases("ModuleSpecifier").build("imported", "local").field("imported", def2("Identifier"));
      def2("ImportDefaultSpecifier").bases("ModuleSpecifier").build("local");
      def2("ImportNamespaceSpecifier").bases("ModuleSpecifier").build("local");
      def2("ExportDefaultDeclaration").bases("Declaration").build("declaration").field("declaration", or(def2("Declaration"), def2("Expression")));
      def2("ExportNamedDeclaration").bases("Declaration").build("declaration", "specifiers", "source").field("declaration", or(def2("Declaration"), null)).field("specifiers", [def2("ExportSpecifier")], defaults3.emptyArray).field("source", or(def2("Literal"), null), defaults3["null"]);
      def2("ExportSpecifier").bases("ModuleSpecifier").build("local", "exported").field("exported", def2("Identifier"));
      def2("ExportNamespaceSpecifier").bases("Specifier").build("exported").field("exported", def2("Identifier"));
      def2("ExportDefaultSpecifier").bases("Specifier").build("exported").field("exported", def2("Identifier"));
      def2("ExportAllDeclaration").bases("Declaration").build("exported", "source").field("exported", or(def2("Identifier"), null)).field("source", def2("Literal"));
      def2("CommentBlock").bases("Comment").build("value", "leading", "trailing");
      def2("CommentLine").bases("Comment").build("value", "leading", "trailing");
      def2("Directive").bases("Node").build("value").field("value", def2("DirectiveLiteral"));
      def2("DirectiveLiteral").bases("Node", "Expression").build("value").field("value", String, defaults3["use strict"]);
      def2("InterpreterDirective").bases("Node").build("value").field("value", String);
      def2("BlockStatement").bases("Statement").build("body").field("body", [def2("Statement")]).field("directives", [def2("Directive")], defaults3.emptyArray);
      def2("Program").bases("Node").build("body").field("body", [def2("Statement")]).field("directives", [def2("Directive")], defaults3.emptyArray).field("interpreter", or(def2("InterpreterDirective"), null), defaults3["null"]);
      def2("StringLiteral").bases("Literal").build("value").field("value", String);
      def2("NumericLiteral").bases("Literal").build("value").field("value", Number).field("raw", or(String, null), defaults3["null"]).field("extra", {
        rawValue: Number,
        raw: String
      }, function getDefault() {
        return {
          rawValue: this.value,
          raw: this.value + ""
        };
      });
      def2("BigIntLiteral").bases("Literal").build("value").field("value", or(String, Number)).field("extra", {
        rawValue: String,
        raw: String
      }, function getDefault() {
        return {
          rawValue: String(this.value),
          raw: this.value + "n"
        };
      });
      def2("NullLiteral").bases("Literal").build().field("value", null, defaults3["null"]);
      def2("BooleanLiteral").bases("Literal").build("value").field("value", Boolean);
      def2("RegExpLiteral").bases("Literal").build("pattern", "flags").field("pattern", String).field("flags", String).field("value", RegExp, function() {
        return new RegExp(this.pattern, this.flags);
      });
      var ObjectExpressionProperty = or(def2("Property"), def2("ObjectMethod"), def2("ObjectProperty"), def2("SpreadProperty"), def2("SpreadElement"));
      def2("ObjectExpression").bases("Expression").build("properties").field("properties", [ObjectExpressionProperty]);
      def2("ObjectMethod").bases("Node", "Function").build("kind", "key", "params", "body", "computed").field("kind", or("method", "get", "set")).field("key", or(def2("Literal"), def2("Identifier"), def2("Expression"))).field("params", [def2("Pattern")]).field("body", def2("BlockStatement")).field("computed", Boolean, defaults3["false"]).field("generator", Boolean, defaults3["false"]).field("async", Boolean, defaults3["false"]).field(
        "accessibility",
        or(def2("Literal"), null),
        defaults3["null"]
      ).field("decorators", or([def2("Decorator")], null), defaults3["null"]);
      def2("ObjectProperty").bases("Node").build("key", "value").field("key", or(def2("Literal"), def2("Identifier"), def2("Expression"))).field("value", or(def2("Expression"), def2("Pattern"))).field(
        "accessibility",
        or(def2("Literal"), null),
        defaults3["null"]
      ).field("computed", Boolean, defaults3["false"]);
      var ClassBodyElement = or(def2("MethodDefinition"), def2("VariableDeclarator"), def2("ClassPropertyDefinition"), def2("ClassProperty"), def2("ClassPrivateProperty"), def2("ClassMethod"), def2("ClassPrivateMethod"));
      def2("ClassBody").bases("Declaration").build("body").field("body", [ClassBodyElement]);
      def2("ClassMethod").bases("Declaration", "Function").build("kind", "key", "params", "body", "computed", "static").field("key", or(def2("Literal"), def2("Identifier"), def2("Expression")));
      def2("ClassPrivateMethod").bases("Declaration", "Function").build("key", "params", "body", "kind", "computed", "static").field("key", def2("PrivateName"));
      [
        "ClassMethod",
        "ClassPrivateMethod"
      ].forEach(function(typeName) {
        def2(typeName).field("kind", or("get", "set", "method", "constructor"), function() {
          return "method";
        }).field("body", def2("BlockStatement")).field("computed", Boolean, defaults3["false"]).field("static", or(Boolean, null), defaults3["null"]).field("abstract", or(Boolean, null), defaults3["null"]).field("access", or("public", "private", "protected", null), defaults3["null"]).field("accessibility", or("public", "private", "protected", null), defaults3["null"]).field("decorators", or([def2("Decorator")], null), defaults3["null"]).field("optional", or(Boolean, null), defaults3["null"]);
      });
      def2("ClassPrivateProperty").bases("ClassProperty").build("key", "value").field("key", def2("PrivateName")).field("value", or(def2("Expression"), null), defaults3["null"]);
      def2("PrivateName").bases("Expression", "Pattern").build("id").field("id", def2("Identifier"));
      var ObjectPatternProperty = or(
        def2("Property"),
        def2("PropertyPattern"),
        def2("SpreadPropertyPattern"),
        def2("SpreadProperty"),
        def2("ObjectProperty"),
        def2("RestProperty")
      );
      def2("ObjectPattern").bases("Pattern").build("properties").field("properties", [ObjectPatternProperty]).field("decorators", or([def2("Decorator")], null), defaults3["null"]);
      def2("SpreadProperty").bases("Node").build("argument").field("argument", def2("Expression"));
      def2("RestProperty").bases("Node").build("argument").field("argument", def2("Expression"));
      def2("ForAwaitStatement").bases("Statement").build("left", "right", "body").field("left", or(def2("VariableDeclaration"), def2("Expression"))).field("right", def2("Expression")).field("body", def2("Statement"));
      def2("Import").bases("Expression").build();
    }
    exports$1.default = default_1;
    module2.exports = exports$1["default"];
  })(babelCore, babelCore.exports);
  return babelCore.exports;
}
function requireBabel() {
  if (hasRequiredBabel) return babel.exports;
  hasRequiredBabel = 1;
  (function(module2, exports$1) {
    Object.defineProperty(exports$1, "__esModule", { value: true });
    var tslib_1 = require$$0;
    var babel_core_1 = tslib_1.__importDefault(requireBabelCore());
    var flow_1 = tslib_1.__importDefault(requireFlow());
    function default_1(fork2) {
      fork2.use(babel_core_1.default);
      fork2.use(flow_1.default);
    }
    exports$1.default = default_1;
    module2.exports = exports$1["default"];
  })(babel, babel.exports);
  return babel.exports;
}
function requireTypescript() {
  if (hasRequiredTypescript) return typescript.exports;
  hasRequiredTypescript = 1;
  (function(module2, exports$1) {
    Object.defineProperty(exports$1, "__esModule", { value: true });
    var tslib_1 = require$$0;
    var babel_core_1 = tslib_1.__importDefault(requireBabelCore());
    var type_annotations_1 = tslib_1.__importDefault(requireTypeAnnotations());
    var types_1 = tslib_1.__importDefault(requireTypes$1());
    var shared_1 = tslib_1.__importDefault(requireShared());
    function default_1(fork2) {
      fork2.use(babel_core_1.default);
      fork2.use(type_annotations_1.default);
      var types2 = fork2.use(types_1.default);
      var n = types2.namedTypes;
      var def2 = types2.Type.def;
      var or = types2.Type.or;
      var defaults3 = fork2.use(shared_1.default).defaults;
      var StringLiteral = types2.Type.from(function(value, deep) {
        if (n.StringLiteral && n.StringLiteral.check(value, deep)) {
          return true;
        }
        if (n.Literal && n.Literal.check(value, deep) && typeof value.value === "string") {
          return true;
        }
        return false;
      }, "StringLiteral");
      def2("TSType").bases("Node");
      var TSEntityName = or(def2("Identifier"), def2("TSQualifiedName"));
      def2("TSTypeReference").bases("TSType", "TSHasOptionalTypeParameterInstantiation").build("typeName", "typeParameters").field("typeName", TSEntityName);
      def2("TSHasOptionalTypeParameterInstantiation").field("typeParameters", or(def2("TSTypeParameterInstantiation"), null), defaults3["null"]);
      def2("TSHasOptionalTypeParameters").field("typeParameters", or(def2("TSTypeParameterDeclaration"), null, void 0), defaults3["null"]);
      def2("TSHasOptionalTypeAnnotation").field("typeAnnotation", or(def2("TSTypeAnnotation"), null), defaults3["null"]);
      def2("TSQualifiedName").bases("Node").build("left", "right").field("left", TSEntityName).field("right", TSEntityName);
      def2("TSAsExpression").bases("Expression", "Pattern").build("expression", "typeAnnotation").field("expression", def2("Expression")).field("typeAnnotation", def2("TSType")).field("extra", or({ parenthesized: Boolean }, null), defaults3["null"]);
      def2("TSNonNullExpression").bases("Expression", "Pattern").build("expression").field("expression", def2("Expression"));
      [
        "TSAnyKeyword",
        "TSBigIntKeyword",
        "TSBooleanKeyword",
        "TSNeverKeyword",
        "TSNullKeyword",
        "TSNumberKeyword",
        "TSObjectKeyword",
        "TSStringKeyword",
        "TSSymbolKeyword",
        "TSUndefinedKeyword",
        "TSUnknownKeyword",
        "TSVoidKeyword",
        "TSThisType"
      ].forEach(function(keywordType) {
        def2(keywordType).bases("TSType").build();
      });
      def2("TSArrayType").bases("TSType").build("elementType").field("elementType", def2("TSType"));
      def2("TSLiteralType").bases("TSType").build("literal").field("literal", or(def2("NumericLiteral"), def2("StringLiteral"), def2("BooleanLiteral"), def2("TemplateLiteral"), def2("UnaryExpression")));
      [
        "TSUnionType",
        "TSIntersectionType"
      ].forEach(function(typeName) {
        def2(typeName).bases("TSType").build("types").field("types", [def2("TSType")]);
      });
      def2("TSConditionalType").bases("TSType").build("checkType", "extendsType", "trueType", "falseType").field("checkType", def2("TSType")).field("extendsType", def2("TSType")).field("trueType", def2("TSType")).field("falseType", def2("TSType"));
      def2("TSInferType").bases("TSType").build("typeParameter").field("typeParameter", def2("TSTypeParameter"));
      def2("TSParenthesizedType").bases("TSType").build("typeAnnotation").field("typeAnnotation", def2("TSType"));
      var ParametersType = [or(def2("Identifier"), def2("RestElement"), def2("ArrayPattern"), def2("ObjectPattern"))];
      [
        "TSFunctionType",
        "TSConstructorType"
      ].forEach(function(typeName) {
        def2(typeName).bases("TSType", "TSHasOptionalTypeParameters", "TSHasOptionalTypeAnnotation").build("parameters").field("parameters", ParametersType);
      });
      def2("TSDeclareFunction").bases("Declaration", "TSHasOptionalTypeParameters").build("id", "params", "returnType").field("declare", Boolean, defaults3["false"]).field("async", Boolean, defaults3["false"]).field("generator", Boolean, defaults3["false"]).field("id", or(def2("Identifier"), null), defaults3["null"]).field("params", [def2("Pattern")]).field("returnType", or(
        def2("TSTypeAnnotation"),
        def2("Noop"),
        null
      ), defaults3["null"]);
      def2("TSDeclareMethod").bases("Declaration", "TSHasOptionalTypeParameters").build("key", "params", "returnType").field("async", Boolean, defaults3["false"]).field("generator", Boolean, defaults3["false"]).field("params", [def2("Pattern")]).field("abstract", Boolean, defaults3["false"]).field("accessibility", or("public", "private", "protected", void 0), defaults3["undefined"]).field("static", Boolean, defaults3["false"]).field("computed", Boolean, defaults3["false"]).field("optional", Boolean, defaults3["false"]).field("key", or(
        def2("Identifier"),
        def2("StringLiteral"),
        def2("NumericLiteral"),
        def2("Expression")
      )).field("kind", or("get", "set", "method", "constructor"), function getDefault() {
        return "method";
      }).field(
        "access",
        or("public", "private", "protected", void 0),
        defaults3["undefined"]
      ).field("decorators", or([def2("Decorator")], null), defaults3["null"]).field("returnType", or(
        def2("TSTypeAnnotation"),
        def2("Noop"),
        null
      ), defaults3["null"]);
      def2("TSMappedType").bases("TSType").build("typeParameter", "typeAnnotation").field("readonly", or(Boolean, "+", "-"), defaults3["false"]).field("typeParameter", def2("TSTypeParameter")).field("optional", or(Boolean, "+", "-"), defaults3["false"]).field("typeAnnotation", or(def2("TSType"), null), defaults3["null"]);
      def2("TSTupleType").bases("TSType").build("elementTypes").field("elementTypes", [or(def2("TSType"), def2("TSNamedTupleMember"))]);
      def2("TSNamedTupleMember").bases("TSType").build("label", "elementType", "optional").field("label", def2("Identifier")).field("optional", Boolean, defaults3["false"]).field("elementType", def2("TSType"));
      def2("TSRestType").bases("TSType").build("typeAnnotation").field("typeAnnotation", def2("TSType"));
      def2("TSOptionalType").bases("TSType").build("typeAnnotation").field("typeAnnotation", def2("TSType"));
      def2("TSIndexedAccessType").bases("TSType").build("objectType", "indexType").field("objectType", def2("TSType")).field("indexType", def2("TSType"));
      def2("TSTypeOperator").bases("TSType").build("operator").field("operator", String).field("typeAnnotation", def2("TSType"));
      def2("TSTypeAnnotation").bases("Node").build("typeAnnotation").field("typeAnnotation", or(def2("TSType"), def2("TSTypeAnnotation")));
      def2("TSIndexSignature").bases("Declaration", "TSHasOptionalTypeAnnotation").build("parameters", "typeAnnotation").field("parameters", [def2("Identifier")]).field("readonly", Boolean, defaults3["false"]);
      def2("TSPropertySignature").bases("Declaration", "TSHasOptionalTypeAnnotation").build("key", "typeAnnotation", "optional").field("key", def2("Expression")).field("computed", Boolean, defaults3["false"]).field("readonly", Boolean, defaults3["false"]).field("optional", Boolean, defaults3["false"]).field("initializer", or(def2("Expression"), null), defaults3["null"]);
      def2("TSMethodSignature").bases("Declaration", "TSHasOptionalTypeParameters", "TSHasOptionalTypeAnnotation").build("key", "parameters", "typeAnnotation").field("key", def2("Expression")).field("computed", Boolean, defaults3["false"]).field("optional", Boolean, defaults3["false"]).field("parameters", ParametersType);
      def2("TSTypePredicate").bases("TSTypeAnnotation", "TSType").build("parameterName", "typeAnnotation", "asserts").field("parameterName", or(def2("Identifier"), def2("TSThisType"))).field("typeAnnotation", or(def2("TSTypeAnnotation"), null), defaults3["null"]).field("asserts", Boolean, defaults3["false"]);
      [
        "TSCallSignatureDeclaration",
        "TSConstructSignatureDeclaration"
      ].forEach(function(typeName) {
        def2(typeName).bases("Declaration", "TSHasOptionalTypeParameters", "TSHasOptionalTypeAnnotation").build("parameters", "typeAnnotation").field("parameters", ParametersType);
      });
      def2("TSEnumMember").bases("Node").build("id", "initializer").field("id", or(def2("Identifier"), StringLiteral)).field("initializer", or(def2("Expression"), null), defaults3["null"]);
      def2("TSTypeQuery").bases("TSType").build("exprName").field("exprName", or(TSEntityName, def2("TSImportType")));
      var TSTypeMember = or(def2("TSCallSignatureDeclaration"), def2("TSConstructSignatureDeclaration"), def2("TSIndexSignature"), def2("TSMethodSignature"), def2("TSPropertySignature"));
      def2("TSTypeLiteral").bases("TSType").build("members").field("members", [TSTypeMember]);
      def2("TSTypeParameter").bases("Identifier").build("name", "constraint", "default").field("name", String).field("constraint", or(def2("TSType"), void 0), defaults3["undefined"]).field("default", or(def2("TSType"), void 0), defaults3["undefined"]);
      def2("TSTypeAssertion").bases("Expression", "Pattern").build("typeAnnotation", "expression").field("typeAnnotation", def2("TSType")).field("expression", def2("Expression")).field("extra", or({ parenthesized: Boolean }, null), defaults3["null"]);
      def2("TSTypeParameterDeclaration").bases("Declaration").build("params").field("params", [def2("TSTypeParameter")]);
      def2("TSTypeParameterInstantiation").bases("Node").build("params").field("params", [def2("TSType")]);
      def2("TSEnumDeclaration").bases("Declaration").build("id", "members").field("id", def2("Identifier")).field("const", Boolean, defaults3["false"]).field("declare", Boolean, defaults3["false"]).field("members", [def2("TSEnumMember")]).field("initializer", or(def2("Expression"), null), defaults3["null"]);
      def2("TSTypeAliasDeclaration").bases("Declaration", "TSHasOptionalTypeParameters").build("id", "typeAnnotation").field("id", def2("Identifier")).field("declare", Boolean, defaults3["false"]).field("typeAnnotation", def2("TSType"));
      def2("TSModuleBlock").bases("Node").build("body").field("body", [def2("Statement")]);
      def2("TSModuleDeclaration").bases("Declaration").build("id", "body").field("id", or(StringLiteral, TSEntityName)).field("declare", Boolean, defaults3["false"]).field("global", Boolean, defaults3["false"]).field("body", or(def2("TSModuleBlock"), def2("TSModuleDeclaration"), null), defaults3["null"]);
      def2("TSImportType").bases("TSType", "TSHasOptionalTypeParameterInstantiation").build("argument", "qualifier", "typeParameters").field("argument", StringLiteral).field("qualifier", or(TSEntityName, void 0), defaults3["undefined"]);
      def2("TSImportEqualsDeclaration").bases("Declaration").build("id", "moduleReference").field("id", def2("Identifier")).field("isExport", Boolean, defaults3["false"]).field("moduleReference", or(TSEntityName, def2("TSExternalModuleReference")));
      def2("TSExternalModuleReference").bases("Declaration").build("expression").field("expression", StringLiteral);
      def2("TSExportAssignment").bases("Statement").build("expression").field("expression", def2("Expression"));
      def2("TSNamespaceExportDeclaration").bases("Declaration").build("id").field("id", def2("Identifier"));
      def2("TSInterfaceBody").bases("Node").build("body").field("body", [TSTypeMember]);
      def2("TSExpressionWithTypeArguments").bases("TSType", "TSHasOptionalTypeParameterInstantiation").build("expression", "typeParameters").field("expression", TSEntityName);
      def2("TSInterfaceDeclaration").bases("Declaration", "TSHasOptionalTypeParameters").build("id", "body").field("id", TSEntityName).field("declare", Boolean, defaults3["false"]).field("extends", or([def2("TSExpressionWithTypeArguments")], null), defaults3["null"]).field("body", def2("TSInterfaceBody"));
      def2("TSParameterProperty").bases("Pattern").build("parameter").field("accessibility", or("public", "private", "protected", void 0), defaults3["undefined"]).field("readonly", Boolean, defaults3["false"]).field("parameter", or(def2("Identifier"), def2("AssignmentPattern")));
      def2("ClassProperty").field(
        "access",
        or("public", "private", "protected", void 0),
        defaults3["undefined"]
      );
      def2("ClassBody").field("body", [or(
        def2("MethodDefinition"),
        def2("VariableDeclarator"),
        def2("ClassPropertyDefinition"),
        def2("ClassProperty"),
        def2("ClassPrivateProperty"),
        def2("ClassMethod"),
        def2("ClassPrivateMethod"),
        def2("TSDeclareMethod"),
        TSTypeMember
      )]);
    }
    exports$1.default = default_1;
    module2.exports = exports$1["default"];
  })(typescript, typescript.exports);
  return typescript.exports;
}
function requireEsProposals() {
  if (hasRequiredEsProposals) return esProposals.exports;
  hasRequiredEsProposals = 1;
  (function(module2, exports$1) {
    Object.defineProperty(exports$1, "__esModule", { value: true });
    var tslib_1 = require$$0;
    var types_1 = tslib_1.__importDefault(requireTypes$1());
    var shared_1 = tslib_1.__importDefault(requireShared());
    var core_1 = tslib_1.__importDefault(requireCore());
    function default_1(fork2) {
      fork2.use(core_1.default);
      var types2 = fork2.use(types_1.default);
      var Type2 = types2.Type;
      var def2 = types2.Type.def;
      var or = Type2.or;
      var shared2 = fork2.use(shared_1.default);
      var defaults3 = shared2.defaults;
      def2("OptionalMemberExpression").bases("MemberExpression").build("object", "property", "computed", "optional").field("optional", Boolean, defaults3["true"]);
      def2("OptionalCallExpression").bases("CallExpression").build("callee", "arguments", "optional").field("optional", Boolean, defaults3["true"]);
      var LogicalOperator = or("||", "&&", "??");
      def2("LogicalExpression").field("operator", LogicalOperator);
    }
    exports$1.default = default_1;
    module2.exports = exports$1["default"];
  })(esProposals, esProposals.exports);
  return esProposals.exports;
}
function requireNamedTypes() {
  if (hasRequiredNamedTypes) return namedTypes;
  hasRequiredNamedTypes = 1;
  (function(exports$1) {
    Object.defineProperty(exports$1, "__esModule", { value: true });
    exports$1.namedTypes = void 0;
    /* @__PURE__ */ (function(namedTypes2) {
    })(exports$1.namedTypes || (exports$1.namedTypes = {}));
  })(namedTypes);
  return namedTypes;
}
function requireMain() {
  if (hasRequiredMain) return main$1;
  hasRequiredMain = 1;
  (function(exports$1) {
    Object.defineProperty(exports$1, "__esModule", { value: true });
    exports$1.visit = exports$1.use = exports$1.Type = exports$1.someField = exports$1.PathVisitor = exports$1.Path = exports$1.NodePath = exports$1.namedTypes = exports$1.getSupertypeNames = exports$1.getFieldValue = exports$1.getFieldNames = exports$1.getBuilderName = exports$1.finalize = exports$1.eachField = exports$1.defineMethod = exports$1.builtInTypes = exports$1.builders = exports$1.astNodesAreEquivalent = void 0;
    var tslib_1 = require$$0;
    var fork_1 = tslib_1.__importDefault(requireFork());
    var core_1 = tslib_1.__importDefault(requireCore());
    var es6_1 = tslib_1.__importDefault(requireEs6());
    var es7_1 = tslib_1.__importDefault(requireEs7());
    var es2020_1 = tslib_1.__importDefault(requireEs2020());
    var jsx_1 = tslib_1.__importDefault(requireJsx());
    var flow_1 = tslib_1.__importDefault(requireFlow());
    var esprima_1 = tslib_1.__importDefault(requireEsprima());
    var babel_1 = tslib_1.__importDefault(requireBabel());
    var typescript_1 = tslib_1.__importDefault(requireTypescript());
    var es_proposals_1 = tslib_1.__importDefault(requireEsProposals());
    var namedTypes_1 = requireNamedTypes();
    Object.defineProperty(exports$1, "namedTypes", { enumerable: true, get: function() {
      return namedTypes_1.namedTypes;
    } });
    var _a4 = fork_1.default([
      core_1.default,
      es6_1.default,
      es7_1.default,
      es2020_1.default,
      jsx_1.default,
      flow_1.default,
      esprima_1.default,
      babel_1.default,
      typescript_1.default,
      es_proposals_1.default
    ]), astNodesAreEquivalent = _a4.astNodesAreEquivalent, builders = _a4.builders, builtInTypes = _a4.builtInTypes, defineMethod = _a4.defineMethod, eachField = _a4.eachField, finalize50 = _a4.finalize, getBuilderName = _a4.getBuilderName, getFieldNames = _a4.getFieldNames, getFieldValue = _a4.getFieldValue, getSupertypeNames = _a4.getSupertypeNames, n = _a4.namedTypes, NodePath = _a4.NodePath, Path = _a4.Path, PathVisitor = _a4.PathVisitor, someField = _a4.someField, Type2 = _a4.Type, use2 = _a4.use, visit = _a4.visit;
    exports$1.astNodesAreEquivalent = astNodesAreEquivalent;
    exports$1.builders = builders;
    exports$1.builtInTypes = builtInTypes;
    exports$1.defineMethod = defineMethod;
    exports$1.eachField = eachField;
    exports$1.finalize = finalize50;
    exports$1.getBuilderName = getBuilderName;
    exports$1.getFieldNames = getFieldNames;
    exports$1.getFieldValue = getFieldValue;
    exports$1.getSupertypeNames = getSupertypeNames;
    exports$1.NodePath = NodePath;
    exports$1.Path = Path;
    exports$1.PathVisitor = PathVisitor;
    exports$1.someField = someField;
    exports$1.Type = Type2;
    exports$1.use = use2;
    exports$1.visit = visit;
    Object.assign(namedTypes_1.namedTypes, n);
  })(main$1);
  return main$1;
}
function requireDegenerator() {
  if (hasRequiredDegenerator) return degenerator;
  hasRequiredDegenerator = 1;
  Object.defineProperty(degenerator, "__esModule", { value: true });
  degenerator.degenerator = void 0;
  const util_1 = require$$0$2;
  const escodegen_1 = requireEscodegen();
  const esprima_1 = requireEsprima$1();
  const ast_types_1 = requireMain();
  function degenerator$1(code2, _names) {
    if (!Array.isArray(_names)) {
      throw new TypeError('an array of async function "names" is required');
    }
    const names3 = _names.slice(0);
    const ast2 = (0, esprima_1.parseScript)(code2);
    let lastNamesLength = 0;
    do {
      lastNamesLength = names3.length;
      (0, ast_types_1.visit)(ast2, {
        visitVariableDeclaration(path14) {
          if (path14.node.declarations) {
            for (let i = 0; i < path14.node.declarations.length; i++) {
              const declaration2 = path14.node.declarations[i];
              if (ast_types_1.namedTypes.VariableDeclarator.check(declaration2) && ast_types_1.namedTypes.Identifier.check(declaration2.init) && ast_types_1.namedTypes.Identifier.check(declaration2.id) && checkName(declaration2.init.name, names3) && !checkName(declaration2.id.name, names3)) {
                names3.push(declaration2.id.name);
              }
            }
          }
          return false;
        },
        visitAssignmentExpression(path14) {
          if (ast_types_1.namedTypes.Identifier.check(path14.node.left) && ast_types_1.namedTypes.Identifier.check(path14.node.right) && checkName(path14.node.right.name, names3) && !checkName(path14.node.left.name, names3)) {
            names3.push(path14.node.left.name);
          }
          return false;
        },
        visitFunction(path14) {
          if (path14.node.id) {
            let shouldDegenerate = false;
            (0, ast_types_1.visit)(path14.node, {
              visitCallExpression(path15) {
                if (checkNames(path15.node, names3)) {
                  shouldDegenerate = true;
                }
                return false;
              }
            });
            if (!shouldDegenerate) {
              return false;
            }
            path14.node.async = true;
            if (!checkName(path14.node.id.name, names3)) {
              names3.push(path14.node.id.name);
            }
          }
          this.traverse(path14);
        }
      });
    } while (lastNamesLength !== names3.length);
    (0, ast_types_1.visit)(ast2, {
      visitCallExpression(path14) {
        if (checkNames(path14.node, names3)) {
          const delegate = false;
          const { name, parent: { node: pNode } } = path14;
          const expr = ast_types_1.builders.awaitExpression(path14.node, delegate);
          if (ast_types_1.namedTypes.CallExpression.check(pNode)) {
            pNode.arguments[name] = expr;
          } else {
            pNode[name] = expr;
          }
        }
        this.traverse(path14);
      }
    });
    return (0, escodegen_1.generate)(ast2);
  }
  degenerator.degenerator = degenerator$1;
  function checkNames({ callee }, names3) {
    let name;
    if (ast_types_1.namedTypes.Identifier.check(callee)) {
      name = callee.name;
    } else if (ast_types_1.namedTypes.MemberExpression.check(callee)) {
      if (ast_types_1.namedTypes.Identifier.check(callee.object) && ast_types_1.namedTypes.Identifier.check(callee.property)) {
        name = `${callee.object.name}.${callee.property.name}`;
      } else {
        return false;
      }
    } else if (ast_types_1.namedTypes.FunctionExpression.check(callee)) {
      if (callee.id) {
        name = callee.id.name;
      } else {
        return false;
      }
    } else {
      throw new Error(`Don't know how to get name for: ${callee.type}`);
    }
    return checkName(name, names3);
  }
  function checkName(name, names3) {
    for (let i = 0; i < names3.length; i++) {
      const n = names3[i];
      if (util_1.types.isRegExp(n)) {
        if (n.test(name)) {
          return true;
        }
      } else if (name === n) {
        return true;
      }
    }
    return false;
  }
  return degenerator;
}
function requireCompile() {
  if (hasRequiredCompile) return compile;
  hasRequiredCompile = 1;
  Object.defineProperty(compile, "__esModule", { value: true });
  compile.compile = void 0;
  const util_1 = require$$0$2;
  const degenerator_1 = requireDegenerator();
  function compile$12(qjs, code2, returnName, options2 = {}) {
    const compiled = (0, degenerator_1.degenerator)(code2, options2.names ?? []);
    const vm = qjs.newContext();
    if (options2.sandbox) {
      for (const [name, value] of Object.entries(options2.sandbox)) {
        if (typeof value !== "function") {
          throw new Error(`Expected a "function" for sandbox property \`${name}\`, but got "${typeof value}"`);
        }
        const fnHandle = vm.newFunction(name, (...args2) => {
          const result = value(...args2.map((arg) => quickJSHandleToHost(vm, arg)));
          vm.runtime.executePendingJobs();
          return hostToQuickJSHandle(vm, result);
        });
        fnHandle.consume((handle) => vm.setProp(vm.global, name, handle));
      }
    }
    const fnResult = vm.evalCode(`${compiled};${returnName}`, options2.filename);
    const fn = vm.unwrapResult(fnResult);
    const t = vm.typeof(fn);
    if (t !== "function") {
      throw new Error(`Expected a "function" named \`${returnName}\` to be defined, but got "${t}"`);
    }
    const r = async function(...args2) {
      let promiseHandle;
      let resolvedHandle;
      try {
        const result = vm.callFunction(fn, vm.undefined, ...args2.map((arg) => hostToQuickJSHandle(vm, arg)));
        promiseHandle = vm.unwrapResult(result);
        const resolvedResultP = vm.resolvePromise(promiseHandle);
        vm.runtime.executePendingJobs();
        const resolvedResult = await resolvedResultP;
        resolvedHandle = vm.unwrapResult(resolvedResult);
        return quickJSHandleToHost(vm, resolvedHandle);
      } catch (err) {
        if (err && typeof err === "object" && "cause" in err && err.cause) {
          if (typeof err.cause === "object" && "stack" in err.cause && "name" in err.cause && "message" in err.cause && typeof err.cause.stack === "string" && typeof err.cause.name === "string" && typeof err.cause.message === "string") {
            err.cause.stack = `${err.cause.name}: ${err.cause.message}
${err.cause.stack}`;
          }
          throw err.cause;
        }
        throw err;
      } finally {
        promiseHandle?.dispose();
        resolvedHandle?.dispose();
      }
    };
    Object.defineProperty(r, "toString", {
      value: () => compiled,
      enumerable: false
    });
    return r;
  }
  compile.compile = compile$12;
  function quickJSHandleToHost(vm, val) {
    return vm.dump(val);
  }
  function hostToQuickJSHandle(vm, val) {
    if (typeof val === "undefined") {
      return vm.undefined;
    } else if (val === null) {
      return vm.null;
    } else if (typeof val === "string") {
      return vm.newString(val);
    } else if (typeof val === "number") {
      return vm.newNumber(val);
    } else if (typeof val === "bigint") {
      return vm.newBigInt(val);
    } else if (typeof val === "boolean") {
      return val ? vm.true : vm.false;
    } else if (util_1.types.isPromise(val)) {
      const promise = vm.newPromise();
      promise.settled.then(vm.runtime.executePendingJobs);
      val.then((r) => {
        promise.resolve(hostToQuickJSHandle(vm, r));
      }, (err) => {
        promise.reject(hostToQuickJSHandle(vm, err));
      });
      return promise.handle;
    } else if (util_1.types.isNativeError(val)) {
      return vm.newError(val);
    }
    throw new Error(`Unsupported value: ${val}`);
  }
  return compile;
}
function requireDist$4() {
  if (hasRequiredDist$4) return dist$1;
  hasRequiredDist$4 = 1;
  (function(exports$1) {
    var __createBinding5 = dist$1 && dist$1.__createBinding || (Object.create ? function(o, m, k, k2) {
      if (k2 === void 0) k2 = k;
      var desc = Object.getOwnPropertyDescriptor(m, k);
      if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
        desc = { enumerable: true, get: function() {
          return m[k];
        } };
      }
      Object.defineProperty(o, k2, desc);
    } : function(o, m, k, k2) {
      if (k2 === void 0) k2 = k;
      o[k2] = m[k];
    });
    var __exportStar5 = dist$1 && dist$1.__exportStar || function(m, exports$12) {
      for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports$12, p)) __createBinding5(exports$12, m, p);
    };
    Object.defineProperty(exports$1, "__esModule", { value: true });
    __exportStar5(requireDegenerator(), exports$1);
    __exportStar5(requireCompile(), exports$1);
  })(dist$1);
  return dist$1;
}
function requireDateRange() {
  if (hasRequiredDateRange) return dateRange;
  hasRequiredDateRange = 1;
  Object.defineProperty(dateRange, "__esModule", { value: true });
  function dateRange$1() {
    return false;
  }
  dateRange.default = dateRange$1;
  return dateRange;
}
function requireDnsDomainIs() {
  if (hasRequiredDnsDomainIs) return dnsDomainIs;
  hasRequiredDnsDomainIs = 1;
  Object.defineProperty(dnsDomainIs, "__esModule", { value: true });
  function dnsDomainIs$1(host, domain) {
    host = String(host);
    domain = String(domain);
    return host.substr(domain.length * -1) === domain;
  }
  dnsDomainIs.default = dnsDomainIs$1;
  return dnsDomainIs;
}
function requireDnsDomainLevels() {
  if (hasRequiredDnsDomainLevels) return dnsDomainLevels;
  hasRequiredDnsDomainLevels = 1;
  Object.defineProperty(dnsDomainLevels, "__esModule", { value: true });
  function dnsDomainLevels$1(host) {
    const match = String(host).match(/\./g);
    let levels = 0;
    if (match) {
      levels = match.length;
    }
    return levels;
  }
  dnsDomainLevels.default = dnsDomainLevels$1;
  return dnsDomainLevels;
}
function requireUtil() {
  if (hasRequiredUtil) return util;
  hasRequiredUtil = 1;
  Object.defineProperty(util, "__esModule", { value: true });
  util.isGMT = util.dnsLookup = void 0;
  const dns_1 = require$$3$3;
  function dnsLookup(host, opts) {
    return new Promise((resolve2, reject) => {
      (0, dns_1.lookup)(host, opts, (err, res) => {
        if (err) {
          reject(err);
        } else {
          resolve2(res);
        }
      });
    });
  }
  util.dnsLookup = dnsLookup;
  function isGMT(v) {
    return v === "GMT";
  }
  util.isGMT = isGMT;
  return util;
}
function requireDnsResolve() {
  if (hasRequiredDnsResolve) return dnsResolve;
  hasRequiredDnsResolve = 1;
  Object.defineProperty(dnsResolve, "__esModule", { value: true });
  const util_1 = requireUtil();
  async function dnsResolve$1(host) {
    const family = 4;
    try {
      const r = await (0, util_1.dnsLookup)(host, { family });
      if (typeof r === "string") {
        return r;
      }
    } catch (err) {
    }
    return null;
  }
  dnsResolve.default = dnsResolve$1;
  return dnsResolve;
}
function requireNetmask() {
  if (hasRequiredNetmask) return netmask;
  hasRequiredNetmask = 1;
  (function() {
    var Netmask, atob2, chr, chr0, chrA, chra, ip2long, long2ip;
    long2ip = function(long) {
      var a, b, c, d;
      a = (long & 255 << 24) >>> 24;
      b = (long & 255 << 16) >>> 16;
      c = (long & 255 << 8) >>> 8;
      d = long & 255;
      return [a, b, c, d].join(".");
    };
    ip2long = function(ip2) {
      var b, c, i, j, n, ref2;
      b = [];
      for (i = j = 0; j <= 3; i = ++j) {
        if (ip2.length === 0) {
          break;
        }
        if (i > 0) {
          if (ip2[0] !== ".") {
            throw new Error("Invalid IP");
          }
          ip2 = ip2.substring(1);
        }
        ref2 = atob2(ip2), n = ref2[0], c = ref2[1];
        ip2 = ip2.substring(c);
        b.push(n);
      }
      if (ip2.length !== 0) {
        throw new Error("Invalid IP");
      }
      switch (b.length) {
        case 1:
          if (b[0] > 4294967295) {
            throw new Error("Invalid IP");
          }
          return b[0] >>> 0;
        case 2:
          if (b[0] > 255 || b[1] > 16777215) {
            throw new Error("Invalid IP");
          }
          return (b[0] << 24 | b[1]) >>> 0;
        case 3:
          if (b[0] > 255 || b[1] > 255 || b[2] > 65535) {
            throw new Error("Invalid IP");
          }
          return (b[0] << 24 | b[1] << 16 | b[2]) >>> 0;
        case 4:
          if (b[0] > 255 || b[1] > 255 || b[2] > 255 || b[3] > 255) {
            throw new Error("Invalid IP");
          }
          return (b[0] << 24 | b[1] << 16 | b[2] << 8 | b[3]) >>> 0;
        default:
          throw new Error("Invalid IP");
      }
    };
    chr = function(b) {
      return b.charCodeAt(0);
    };
    chr0 = chr("0");
    chra = chr("a");
    chrA = chr("A");
    atob2 = function(s) {
      var base, dmax, i, n, start;
      n = 0;
      base = 10;
      dmax = "9";
      i = 0;
      if (s.length > 1 && s[i] === "0") {
        if (s[i + 1] === "x" || s[i + 1] === "X") {
          i += 2;
          base = 16;
        } else if ("0" <= s[i + 1] && s[i + 1] <= "9") {
          i++;
          base = 8;
          dmax = "7";
        }
      }
      start = i;
      while (i < s.length) {
        if ("0" <= s[i] && s[i] <= dmax) {
          n = n * base + (chr(s[i]) - chr0) >>> 0;
        } else if (base === 16) {
          if ("a" <= s[i] && s[i] <= "f") {
            n = n * base + (10 + chr(s[i]) - chra) >>> 0;
          } else if ("A" <= s[i] && s[i] <= "F") {
            n = n * base + (10 + chr(s[i]) - chrA) >>> 0;
          } else {
            break;
          }
        } else {
          break;
        }
        if (n > 4294967295) {
          throw new Error("too large");
        }
        i++;
      }
      if (i === start) {
        throw new Error("empty octet");
      }
      return [n, i];
    };
    Netmask = function() {
      function Netmask2(net, mask) {
        var i, j, ref2;
        if (typeof net !== "string") {
          throw new Error("Missing `net' parameter");
        }
        if (!mask) {
          ref2 = net.split("/", 2), net = ref2[0], mask = ref2[1];
        }
        if (!mask) {
          mask = 32;
        }
        if (typeof mask === "string" && mask.indexOf(".") > -1) {
          try {
            this.maskLong = ip2long(mask);
          } catch (error1) {
            throw new Error("Invalid mask: " + mask);
          }
          for (i = j = 32; j >= 0; i = --j) {
            if (this.maskLong === 4294967295 << 32 - i >>> 0) {
              this.bitmask = i;
              break;
            }
          }
        } else if (mask || mask === 0) {
          this.bitmask = parseInt(mask, 10);
          this.maskLong = 0;
          if (this.bitmask > 0) {
            this.maskLong = 4294967295 << 32 - this.bitmask >>> 0;
          }
        } else {
          throw new Error("Invalid mask: empty");
        }
        try {
          this.netLong = (ip2long(net) & this.maskLong) >>> 0;
        } catch (error1) {
          throw new Error("Invalid net address: " + net);
        }
        if (!(this.bitmask <= 32)) {
          throw new Error("Invalid mask for ip4: " + mask);
        }
        this.size = Math.pow(2, 32 - this.bitmask);
        this.base = long2ip(this.netLong);
        this.mask = long2ip(this.maskLong);
        this.hostmask = long2ip(~this.maskLong);
        this.first = this.bitmask <= 30 ? long2ip(this.netLong + 1) : this.base;
        this.last = this.bitmask <= 30 ? long2ip(this.netLong + this.size - 2) : long2ip(this.netLong + this.size - 1);
        this.broadcast = this.bitmask <= 30 ? long2ip(this.netLong + this.size - 1) : void 0;
      }
      Netmask2.prototype.contains = function(ip2) {
        if (typeof ip2 === "string" && (ip2.indexOf("/") > 0 || ip2.split(".").length !== 4)) {
          ip2 = new Netmask2(ip2);
        }
        if (ip2 instanceof Netmask2) {
          return this.contains(ip2.base) && this.contains(ip2.broadcast || ip2.last);
        } else {
          return (ip2long(ip2) & this.maskLong) >>> 0 === (this.netLong & this.maskLong) >>> 0;
        }
      };
      Netmask2.prototype.next = function(count) {
        if (count == null) {
          count = 1;
        }
        return new Netmask2(long2ip(this.netLong + this.size * count), this.mask);
      };
      Netmask2.prototype.forEach = function(fn) {
        var index2, lastLong, long;
        long = ip2long(this.first);
        lastLong = ip2long(this.last);
        index2 = 0;
        while (long <= lastLong) {
          fn(long2ip(long), long, index2);
          index2++;
          long++;
        }
      };
      Netmask2.prototype.toString = function() {
        return this.base + "/" + this.bitmask;
      };
      return Netmask2;
    }();
    netmask.ip2long = ip2long;
    netmask.long2ip = long2ip;
    netmask.Netmask = Netmask;
  }).call(netmask);
  return netmask;
}
function requireIsInNet() {
  if (hasRequiredIsInNet) return isInNet;
  hasRequiredIsInNet = 1;
  Object.defineProperty(isInNet, "__esModule", { value: true });
  const netmask_1 = requireNetmask();
  const util_1 = requireUtil();
  async function isInNet$1(host, pattern2, mask) {
    const family = 4;
    try {
      const ip2 = await (0, util_1.dnsLookup)(host, { family });
      if (typeof ip2 === "string") {
        const netmask2 = new netmask_1.Netmask(pattern2, mask);
        return netmask2.contains(ip2);
      }
    } catch (err) {
    }
    return false;
  }
  isInNet.default = isInNet$1;
  return isInNet;
}
function requireIsPlainHostName() {
  if (hasRequiredIsPlainHostName) return isPlainHostName;
  hasRequiredIsPlainHostName = 1;
  Object.defineProperty(isPlainHostName, "__esModule", { value: true });
  function isPlainHostName$1(host) {
    return !/\./.test(host);
  }
  isPlainHostName.default = isPlainHostName$1;
  return isPlainHostName;
}
function requireIsResolvable() {
  if (hasRequiredIsResolvable) return isResolvable;
  hasRequiredIsResolvable = 1;
  Object.defineProperty(isResolvable, "__esModule", { value: true });
  const util_1 = requireUtil();
  async function isResolvable$1(host) {
    const family = 4;
    try {
      if (await (0, util_1.dnsLookup)(host, { family })) {
        return true;
      }
    } catch (err) {
    }
    return false;
  }
  isResolvable.default = isResolvable$1;
  return isResolvable;
}
function requireLocalHostOrDomainIs() {
  if (hasRequiredLocalHostOrDomainIs) return localHostOrDomainIs;
  hasRequiredLocalHostOrDomainIs = 1;
  Object.defineProperty(localHostOrDomainIs, "__esModule", { value: true });
  function localHostOrDomainIs$1(host, hostdom) {
    const parts = host.split(".");
    const domparts = hostdom.split(".");
    let matches = true;
    for (let i = 0; i < parts.length; i++) {
      if (parts[i] !== domparts[i]) {
        matches = false;
        break;
      }
    }
    return matches;
  }
  localHostOrDomainIs.default = localHostOrDomainIs$1;
  return localHostOrDomainIs;
}
function requireIp() {
  if (hasRequiredIp) return ip;
  hasRequiredIp = 1;
  (function(exports$1) {
    var __importDefault5 = ip && ip.__importDefault || function(mod2) {
      return mod2 && mod2.__esModule ? mod2 : { "default": mod2 };
    };
    Object.defineProperty(exports$1, "__esModule", { value: true });
    exports$1.ip = void 0;
    const os_1 = __importDefault5(require$$0$1);
    exports$1.ip = {
      address() {
        const interfaces = os_1.default.networkInterfaces();
        const family = normalizeFamily();
        const all = Object.values(interfaces).map((addrs = []) => {
          const addresses = addrs.filter((details) => {
            const detailsFamily = normalizeFamily(details.family);
            if (detailsFamily !== family || exports$1.ip.isLoopback(details.address)) {
              return false;
            }
            return true;
          });
          return addresses.length ? addresses[0].address : void 0;
        }).filter(Boolean);
        return !all.length ? exports$1.ip.loopback(family) : all[0];
      },
      isLoopback(addr) {
        return /^(::f{4}:)?127\.([0-9]{1,3})\.([0-9]{1,3})\.([0-9]{1,3})/.test(addr) || /^fe80::1$/.test(addr) || /^::1$/.test(addr) || /^::$/.test(addr);
      },
      loopback(family) {
        family = normalizeFamily(family);
        if (family !== "ipv4" && family !== "ipv6") {
          throw new Error("family must be ipv4 or ipv6");
        }
        return family === "ipv4" ? "127.0.0.1" : "fe80::1";
      }
    };
    function normalizeFamily(family) {
      if (family === 4) {
        return "ipv4";
      }
      if (family === 6) {
        return "ipv6";
      }
      return family ? family.toLowerCase() : "ipv4";
    }
  })(ip);
  return ip;
}
function requireMyIpAddress() {
  if (hasRequiredMyIpAddress) return myIpAddress;
  hasRequiredMyIpAddress = 1;
  var __importDefault5 = myIpAddress && myIpAddress.__importDefault || function(mod2) {
    return mod2 && mod2.__esModule ? mod2 : { "default": mod2 };
  };
  Object.defineProperty(myIpAddress, "__esModule", { value: true });
  const ip_1 = requireIp();
  const net_1 = __importDefault5(require$$0$7);
  async function myIpAddress$1() {
    return new Promise((resolve2, reject) => {
      const socket = net_1.default.connect({ host: "8.8.8.8", port: 53 });
      const onError = () => {
        resolve2(ip_1.ip.address());
      };
      socket.once("error", onError);
      socket.once("connect", () => {
        socket.removeListener("error", onError);
        const addr = socket.address();
        socket.destroy();
        if (typeof addr === "string") {
          resolve2(addr);
        } else if (addr.address) {
          resolve2(addr.address);
        } else {
          reject(new Error("Expected a `string`"));
        }
      });
    });
  }
  myIpAddress.default = myIpAddress$1;
  return myIpAddress;
}
function requireShExpMatch() {
  if (hasRequiredShExpMatch) return shExpMatch;
  hasRequiredShExpMatch = 1;
  Object.defineProperty(shExpMatch, "__esModule", { value: true });
  function shExpMatch$1(str, shexp) {
    const re2 = toRegExp(shexp);
    return re2.test(str);
  }
  shExpMatch.default = shExpMatch$1;
  function toRegExp(str) {
    str = String(str).replace(/\./g, "\\.").replace(/\?/g, ".").replace(/\*/g, ".*");
    return new RegExp(`^${str}$`);
  }
  return shExpMatch;
}
function requireTimeRange() {
  if (hasRequiredTimeRange) return timeRange;
  hasRequiredTimeRange = 1;
  Object.defineProperty(timeRange, "__esModule", { value: true });
  function timeRange$1() {
    const args2 = Array.prototype.slice.call(arguments);
    const lastArg = args2.pop();
    const useGMTzone = lastArg === "GMT";
    const currentDate = /* @__PURE__ */ new Date();
    if (!useGMTzone) {
      args2.push(lastArg);
    }
    let result = false;
    const noOfArgs = args2.length;
    const numericArgs = args2.map((n) => parseInt(n, 10));
    if (noOfArgs === 1) {
      result = getCurrentHour(useGMTzone, currentDate) === numericArgs[0];
    } else if (noOfArgs === 2) {
      const currentHour = getCurrentHour(useGMTzone, currentDate);
      result = numericArgs[0] <= currentHour && currentHour < numericArgs[1];
    } else if (noOfArgs === 4) {
      result = valueInRange(secondsElapsedToday(numericArgs[0], numericArgs[1], 0), secondsElapsedToday(getCurrentHour(useGMTzone, currentDate), getCurrentMinute(useGMTzone, currentDate), 0), secondsElapsedToday(numericArgs[2], numericArgs[3], 59));
    } else if (noOfArgs === 6) {
      result = valueInRange(secondsElapsedToday(numericArgs[0], numericArgs[1], numericArgs[2]), secondsElapsedToday(getCurrentHour(useGMTzone, currentDate), getCurrentMinute(useGMTzone, currentDate), getCurrentSecond(useGMTzone, currentDate)), secondsElapsedToday(numericArgs[3], numericArgs[4], numericArgs[5]));
    }
    return result;
  }
  timeRange.default = timeRange$1;
  function secondsElapsedToday(hh, mm, ss) {
    return hh * 3600 + mm * 60 + ss;
  }
  function getCurrentHour(gmt, currentDate) {
    return gmt ? currentDate.getUTCHours() : currentDate.getHours();
  }
  function getCurrentMinute(gmt, currentDate) {
    return gmt ? currentDate.getUTCMinutes() : currentDate.getMinutes();
  }
  function getCurrentSecond(gmt, currentDate) {
    return gmt ? currentDate.getUTCSeconds() : currentDate.getSeconds();
  }
  function valueInRange(start, value, finish) {
    return start <= value && value <= finish;
  }
  return timeRange;
}
function requireWeekdayRange() {
  if (hasRequiredWeekdayRange) return weekdayRange;
  hasRequiredWeekdayRange = 1;
  Object.defineProperty(weekdayRange, "__esModule", { value: true });
  const util_1 = requireUtil();
  const weekdays = ["SUN", "MON", "TUE", "WED", "THU", "FRI", "SAT"];
  function weekdayRange$1(wd1, wd2, gmt) {
    let useGMTzone = false;
    let wd1Index = -1;
    let wd2Index = -1;
    let wd2IsGmt = false;
    if ((0, util_1.isGMT)(gmt)) {
      useGMTzone = true;
    } else if ((0, util_1.isGMT)(wd2)) {
      useGMTzone = true;
      wd2IsGmt = true;
    }
    wd1Index = weekdays.indexOf(wd1);
    if (!wd2IsGmt && isWeekday(wd2)) {
      wd2Index = weekdays.indexOf(wd2);
    }
    const todaysDay = getTodaysDay(useGMTzone);
    let result;
    if (wd2Index < 0) {
      result = todaysDay === wd1Index;
    } else if (wd1Index <= wd2Index) {
      result = valueInRange(wd1Index, todaysDay, wd2Index);
    } else {
      result = valueInRange(wd1Index, todaysDay, 6) || valueInRange(0, todaysDay, wd2Index);
    }
    return result;
  }
  weekdayRange.default = weekdayRange$1;
  function getTodaysDay(gmt) {
    return gmt ? (/* @__PURE__ */ new Date()).getUTCDay() : (/* @__PURE__ */ new Date()).getDay();
  }
  function valueInRange(start, value, finish) {
    return start <= value && value <= finish;
  }
  function isWeekday(v) {
    if (!v)
      return false;
    return weekdays.includes(v);
  }
  return weekdayRange;
}
function requireDist$3() {
  if (hasRequiredDist$3) return dist$2;
  hasRequiredDist$3 = 1;
  (function(exports$1) {
    var __importDefault5 = dist$2 && dist$2.__importDefault || function(mod2) {
      return mod2 && mod2.__esModule ? mod2 : { "default": mod2 };
    };
    Object.defineProperty(exports$1, "__esModule", { value: true });
    exports$1.sandbox = exports$1.createPacResolver = void 0;
    const degenerator_1 = requireDist$4();
    const dateRange_1 = __importDefault5(requireDateRange());
    const dnsDomainIs_1 = __importDefault5(requireDnsDomainIs());
    const dnsDomainLevels_1 = __importDefault5(requireDnsDomainLevels());
    const dnsResolve_1 = __importDefault5(requireDnsResolve());
    const isInNet_1 = __importDefault5(requireIsInNet());
    const isPlainHostName_1 = __importDefault5(requireIsPlainHostName());
    const isResolvable_1 = __importDefault5(requireIsResolvable());
    const localHostOrDomainIs_1 = __importDefault5(requireLocalHostOrDomainIs());
    const myIpAddress_1 = __importDefault5(requireMyIpAddress());
    const shExpMatch_1 = __importDefault5(requireShExpMatch());
    const timeRange_1 = __importDefault5(requireTimeRange());
    const weekdayRange_1 = __importDefault5(requireWeekdayRange());
    function createPacResolver(qjs, _str, _opts = {}) {
      const str = Buffer.isBuffer(_str) ? _str.toString("utf8") : _str;
      const context2 = {
        ...exports$1.sandbox,
        ..._opts.sandbox
      };
      const names3 = Object.keys(context2).filter((k) => isAsyncFunction(context2[k]));
      const opts = {
        filename: "proxy.pac",
        names: names3,
        ..._opts,
        sandbox: context2
      };
      const resolver = (0, degenerator_1.compile)(qjs, str, "FindProxyForURL", opts);
      function FindProxyForURL(url, _host) {
        const urlObj = typeof url === "string" ? new URL(url) : url;
        const host = _host || urlObj.hostname;
        if (!host) {
          throw new TypeError("Could not determine `host`");
        }
        return resolver(urlObj.href, host);
      }
      Object.defineProperty(FindProxyForURL, "toString", {
        value: () => resolver.toString(),
        enumerable: false
      });
      return FindProxyForURL;
    }
    exports$1.createPacResolver = createPacResolver;
    exports$1.sandbox = Object.freeze({
      alert: (message = "") => console.log("%s", message),
      dateRange: dateRange_1.default,
      dnsDomainIs: dnsDomainIs_1.default,
      dnsDomainLevels: dnsDomainLevels_1.default,
      dnsResolve: dnsResolve_1.default,
      isInNet: isInNet_1.default,
      isPlainHostName: isPlainHostName_1.default,
      isResolvable: isResolvable_1.default,
      localHostOrDomainIs: localHostOrDomainIs_1.default,
      myIpAddress: myIpAddress_1.default,
      shExpMatch: shExpMatch_1.default,
      timeRange: timeRange_1.default,
      weekdayRange: weekdayRange_1.default
    });
    function isAsyncFunction(v) {
      if (typeof v !== "function")
        return false;
      if (v.constructor.name === "AsyncFunction")
        return true;
      if (String(v).indexOf("__awaiter(") !== -1)
        return true;
      return Boolean(v.async);
    }
  })(dist$2);
  return dist$2;
}
function requireEsmHelpers() {
  if (hasRequiredEsmHelpers) return esmHelpers;
  hasRequiredEsmHelpers = 1;
  Object.defineProperty(esmHelpers, "__esModule", { value: true });
  esmHelpers.unwrapJavascript = esmHelpers.unwrapTypescript = void 0;
  function fakeUnwrapDefault(mod2) {
    return mod2.default;
  }
  function actualUnwrapDefault(mod2) {
    const maybeUnwrap = mod2.default;
    return maybeUnwrap ?? mod2;
  }
  esmHelpers.unwrapTypescript = actualUnwrapDefault;
  esmHelpers.unwrapJavascript = fakeUnwrapDefault;
  return esmHelpers;
}
function requireDebug() {
  if (hasRequiredDebug) return debug;
  hasRequiredDebug = 1;
  (function(exports$1) {
    Object.defineProperty(exports$1, "__esModule", { value: true });
    exports$1.debugLog = exports$1.QTS_DEBUG = void 0;
    exports$1.QTS_DEBUG = Boolean(typeof process === "object" && process.env.QTS_DEBUG);
    exports$1.debugLog = exports$1.QTS_DEBUG ? console.log.bind(console) : () => {
    };
  })(debug);
  return debug;
}
function requireErrors() {
  if (hasRequiredErrors) return errors;
  hasRequiredErrors = 1;
  Object.defineProperty(errors, "__esModule", { value: true });
  errors.QuickJSMemoryLeakDetected = errors.QuickJSAsyncifySuspended = errors.QuickJSAsyncifyError = errors.QuickJSNotImplemented = errors.QuickJSUseAfterFree = errors.QuickJSWrongOwner = errors.QuickJSUnwrapError = void 0;
  class QuickJSUnwrapError extends Error {
    constructor(cause, context2) {
      super(String(cause));
      this.cause = cause;
      this.context = context2;
      this.name = "QuickJSUnwrapError";
    }
  }
  errors.QuickJSUnwrapError = QuickJSUnwrapError;
  class QuickJSWrongOwner extends Error {
    constructor() {
      super(...arguments);
      this.name = "QuickJSWrongOwner";
    }
  }
  errors.QuickJSWrongOwner = QuickJSWrongOwner;
  class QuickJSUseAfterFree extends Error {
    constructor() {
      super(...arguments);
      this.name = "QuickJSUseAfterFree";
    }
  }
  errors.QuickJSUseAfterFree = QuickJSUseAfterFree;
  class QuickJSNotImplemented extends Error {
    constructor() {
      super(...arguments);
      this.name = "QuickJSNotImplemented";
    }
  }
  errors.QuickJSNotImplemented = QuickJSNotImplemented;
  class QuickJSAsyncifyError extends Error {
    constructor() {
      super(...arguments);
      this.name = "QuickJSAsyncifyError";
    }
  }
  errors.QuickJSAsyncifyError = QuickJSAsyncifyError;
  class QuickJSAsyncifySuspended extends Error {
    constructor() {
      super(...arguments);
      this.name = "QuickJSAsyncifySuspended";
    }
  }
  errors.QuickJSAsyncifySuspended = QuickJSAsyncifySuspended;
  class QuickJSMemoryLeakDetected extends Error {
    constructor() {
      super(...arguments);
      this.name = "QuickJSMemoryLeakDetected";
    }
  }
  errors.QuickJSMemoryLeakDetected = QuickJSMemoryLeakDetected;
  return errors;
}
function requireAsyncifyHelpers() {
  if (hasRequiredAsyncifyHelpers) return asyncifyHelpers;
  hasRequiredAsyncifyHelpers = 1;
  Object.defineProperty(asyncifyHelpers, "__esModule", { value: true });
  asyncifyHelpers.awaitEachYieldedPromise = asyncifyHelpers.maybeAsync = asyncifyHelpers.maybeAsyncFn = void 0;
  function* awaitYield(value) {
    return yield value;
  }
  function awaitYieldOf(generator) {
    return awaitYield(awaitEachYieldedPromise(generator));
  }
  const AwaitYield = awaitYield;
  AwaitYield.of = awaitYieldOf;
  function maybeAsyncFn(that, fn) {
    return (...args2) => {
      const generator = fn.call(that, AwaitYield, ...args2);
      return awaitEachYieldedPromise(generator);
    };
  }
  asyncifyHelpers.maybeAsyncFn = maybeAsyncFn;
  function maybeAsync(that, startGenerator) {
    const generator = startGenerator.call(that, AwaitYield);
    return awaitEachYieldedPromise(generator);
  }
  asyncifyHelpers.maybeAsync = maybeAsync;
  function awaitEachYieldedPromise(gen) {
    function handleNextStep(step) {
      if (step.done) {
        return step.value;
      }
      if (step.value instanceof Promise) {
        return step.value.then((value) => handleNextStep(gen.next(value)), (error) => handleNextStep(gen.throw(error)));
      }
      return handleNextStep(gen.next(step.value));
    }
    return handleNextStep(gen.next());
  }
  asyncifyHelpers.awaitEachYieldedPromise = awaitEachYieldedPromise;
  return asyncifyHelpers;
}
function requireLifetime() {
  if (hasRequiredLifetime) return lifetime;
  hasRequiredLifetime = 1;
  Object.defineProperty(lifetime, "__esModule", { value: true });
  lifetime.Scope = lifetime.WeakLifetime = lifetime.StaticLifetime = lifetime.Lifetime = void 0;
  const asyncify_helpers_1 = /* @__PURE__ */ requireAsyncifyHelpers();
  const debug_12 = /* @__PURE__ */ requireDebug();
  const errors_1 = /* @__PURE__ */ requireErrors();
  class Lifetime {
    constructor(_value, copier, disposer, _owner) {
      this._value = _value;
      this.copier = copier;
      this.disposer = disposer;
      this._owner = _owner;
      this._alive = true;
      this._constructorStack = debug_12.QTS_DEBUG ? new Error("Lifetime constructed").stack : void 0;
    }
    get alive() {
      return this._alive;
    }
    get value() {
      this.assertAlive();
      return this._value;
    }
    get owner() {
      return this._owner;
    }
    get dupable() {
      return !!this.copier;
    }
    dup() {
      this.assertAlive();
      if (!this.copier) {
        throw new Error("Non-dupable lifetime");
      }
      return new Lifetime(this.copier(this._value), this.copier, this.disposer, this._owner);
    }
    consume(map2) {
      this.assertAlive();
      const result = map2(this);
      this.dispose();
      return result;
    }
    dispose() {
      this.assertAlive();
      if (this.disposer) {
        this.disposer(this._value);
      }
      this._alive = false;
    }
    assertAlive() {
      if (!this.alive) {
        if (this._constructorStack) {
          throw new errors_1.QuickJSUseAfterFree(`Lifetime not alive
${this._constructorStack}
Lifetime used`);
        }
        throw new errors_1.QuickJSUseAfterFree("Lifetime not alive");
      }
    }
  }
  lifetime.Lifetime = Lifetime;
  class StaticLifetime extends Lifetime {
    constructor(value, owner) {
      super(value, void 0, void 0, owner);
    }
    get dupable() {
      return true;
    }
    dup() {
      return this;
    }
    dispose() {
    }
  }
  lifetime.StaticLifetime = StaticLifetime;
  class WeakLifetime extends Lifetime {
    constructor(value, copier, disposer, owner) {
      super(value, copier, disposer, owner);
    }
    dispose() {
      this._alive = false;
    }
  }
  lifetime.WeakLifetime = WeakLifetime;
  function scopeFinally(scope2, blockError) {
    let disposeError;
    try {
      scope2.dispose();
    } catch (error) {
      disposeError = error;
    }
    if (blockError && disposeError) {
      Object.assign(blockError, {
        message: `${blockError.message}
 Then, failed to dispose scope: ${disposeError.message}`,
        disposeError
      });
      throw blockError;
    }
    if (blockError || disposeError) {
      throw blockError || disposeError;
    }
  }
  class Scope3 {
    constructor() {
      this._disposables = new Lifetime(/* @__PURE__ */ new Set());
    }
    static withScope(block2) {
      const scope2 = new Scope3();
      let blockError;
      try {
        return block2(scope2);
      } catch (error) {
        blockError = error;
        throw error;
      } finally {
        scopeFinally(scope2, blockError);
      }
    }
    static withScopeMaybeAsync(_this, block2) {
      return (0, asyncify_helpers_1.maybeAsync)(void 0, function* (awaited) {
        const scope2 = new Scope3();
        let blockError;
        try {
          return yield* awaited.of(block2.call(_this, awaited, scope2));
        } catch (error) {
          blockError = error;
          throw error;
        } finally {
          scopeFinally(scope2, blockError);
        }
      });
    }
    static async withScopeAsync(block2) {
      const scope2 = new Scope3();
      let blockError;
      try {
        return await block2(scope2);
      } catch (error) {
        blockError = error;
        throw error;
      } finally {
        scopeFinally(scope2, blockError);
      }
    }
    manage(lifetime2) {
      this._disposables.value.add(lifetime2);
      return lifetime2;
    }
    get alive() {
      return this._disposables.alive;
    }
    dispose() {
      const lifetimes = Array.from(this._disposables.value.values()).reverse();
      for (const lifetime2 of lifetimes) {
        if (lifetime2.alive) {
          lifetime2.dispose();
        }
      }
      this._disposables.dispose();
    }
  }
  lifetime.Scope = Scope3;
  return lifetime;
}
function requireDeferredPromise() {
  if (hasRequiredDeferredPromise) return deferredPromise;
  hasRequiredDeferredPromise = 1;
  Object.defineProperty(deferredPromise, "__esModule", { value: true });
  deferredPromise.QuickJSDeferredPromise = void 0;
  class QuickJSDeferredPromise {
    constructor(args2) {
      this.resolve = (value) => {
        if (!this.resolveHandle.alive) {
          return;
        }
        this.context.unwrapResult(this.context.callFunction(this.resolveHandle, this.context.undefined, value || this.context.undefined)).dispose();
        this.disposeResolvers();
        this.onSettled();
      };
      this.reject = (value) => {
        if (!this.rejectHandle.alive) {
          return;
        }
        this.context.unwrapResult(this.context.callFunction(this.rejectHandle, this.context.undefined, value || this.context.undefined)).dispose();
        this.disposeResolvers();
        this.onSettled();
      };
      this.dispose = () => {
        if (this.handle.alive) {
          this.handle.dispose();
        }
        this.disposeResolvers();
      };
      this.context = args2.context;
      this.owner = args2.context.runtime;
      this.handle = args2.promiseHandle;
      this.settled = new Promise((resolve2) => {
        this.onSettled = resolve2;
      });
      this.resolveHandle = args2.resolveHandle;
      this.rejectHandle = args2.rejectHandle;
    }
    get alive() {
      return this.handle.alive || this.resolveHandle.alive || this.rejectHandle.alive;
    }
    disposeResolvers() {
      if (this.resolveHandle.alive) {
        this.resolveHandle.dispose();
      }
      if (this.rejectHandle.alive) {
        this.rejectHandle.dispose();
      }
    }
  }
  deferredPromise.QuickJSDeferredPromise = QuickJSDeferredPromise;
  return deferredPromise;
}
function requireMemory() {
  if (hasRequiredMemory) return memory;
  hasRequiredMemory = 1;
  Object.defineProperty(memory, "__esModule", { value: true });
  memory.ModuleMemory = void 0;
  const lifetime_1 = /* @__PURE__ */ requireLifetime();
  class ModuleMemory {
    constructor(module2) {
      this.module = module2;
    }
    toPointerArray(handleArray) {
      const typedArray = new Int32Array(handleArray.map((handle) => handle.value));
      const numBytes = typedArray.length * typedArray.BYTES_PER_ELEMENT;
      const ptr = this.module._malloc(numBytes);
      var heapBytes = new Uint8Array(this.module.HEAPU8.buffer, ptr, numBytes);
      heapBytes.set(new Uint8Array(typedArray.buffer));
      return new lifetime_1.Lifetime(ptr, void 0, (ptr2) => this.module._free(ptr2));
    }
    newMutablePointerArray(length) {
      const zeros = new Int32Array(new Array(length).fill(0));
      const numBytes = zeros.length * zeros.BYTES_PER_ELEMENT;
      const ptr = this.module._malloc(numBytes);
      const typedArray = new Int32Array(this.module.HEAPU8.buffer, ptr, length);
      typedArray.set(zeros);
      return new lifetime_1.Lifetime({ typedArray, ptr }, void 0, (value) => this.module._free(value.ptr));
    }
    newHeapCharPointer(string2) {
      const numBytes = this.module.lengthBytesUTF8(string2) + 1;
      const ptr = this.module._malloc(numBytes);
      this.module.stringToUTF8(string2, ptr, numBytes);
      return new lifetime_1.Lifetime(ptr, void 0, (value) => this.module._free(value));
    }
    consumeHeapCharPointer(ptr) {
      const str = this.module.UTF8ToString(ptr);
      this.module._free(ptr);
      return str;
    }
  }
  memory.ModuleMemory = ModuleMemory;
  return memory;
}
function requireTypesFfi() {
  if (hasRequiredTypesFfi) return typesFfi;
  hasRequiredTypesFfi = 1;
  Object.defineProperty(typesFfi, "__esModule", { value: true });
  typesFfi.EvalFlags = typesFfi.assertSync = void 0;
  function assertSync(fn) {
    return function mustBeSync(...args2) {
      const result = fn(...args2);
      if (result && typeof result === "object" && result instanceof Promise) {
        throw new Error("Function unexpectedly returned a Promise");
      }
      return result;
    };
  }
  typesFfi.assertSync = assertSync;
  typesFfi.EvalFlags = {
    JS_EVAL_TYPE_GLOBAL: 0 << 0,
    JS_EVAL_TYPE_MODULE: 1 << 0,
    JS_EVAL_TYPE_DIRECT: 2 << 0,
    JS_EVAL_TYPE_INDIRECT: 3 << 0,
    JS_EVAL_TYPE_MASK: 3 << 0,
    JS_EVAL_FLAG_STRICT: 1 << 3,
    JS_EVAL_FLAG_STRIP: 1 << 4,
    JS_EVAL_FLAG_COMPILE_ONLY: 1 << 5,
    JS_EVAL_FLAG_BACKTRACE_BARRIER: 1 << 6
  };
  return typesFfi;
}
function requireTypes() {
  if (hasRequiredTypes) return types$4;
  hasRequiredTypes = 1;
  Object.defineProperty(types$4, "__esModule", { value: true });
  types$4.concat = types$4.evalOptionsToFlags = types$4.DefaultIntrinsics = void 0;
  const types_ffi_1 = /* @__PURE__ */ requireTypesFfi();
  types$4.DefaultIntrinsics = Symbol("DefaultIntrinsics");
  function evalOptionsToFlags(evalOptions) {
    if (typeof evalOptions === "number") {
      return evalOptions;
    }
    if (evalOptions === void 0) {
      return 0;
    }
    const { type: type2, strict, strip, compileOnly, backtraceBarrier } = evalOptions;
    let flags = 0;
    if (type2 === "global")
      flags |= types_ffi_1.EvalFlags.JS_EVAL_TYPE_GLOBAL;
    if (type2 === "module")
      flags |= types_ffi_1.EvalFlags.JS_EVAL_TYPE_MODULE;
    if (strict)
      flags |= types_ffi_1.EvalFlags.JS_EVAL_FLAG_STRICT;
    if (strip)
      flags |= types_ffi_1.EvalFlags.JS_EVAL_FLAG_STRIP;
    if (compileOnly)
      flags |= types_ffi_1.EvalFlags.JS_EVAL_FLAG_COMPILE_ONLY;
    if (backtraceBarrier)
      flags |= types_ffi_1.EvalFlags.JS_EVAL_FLAG_BACKTRACE_BARRIER;
    return flags;
  }
  types$4.evalOptionsToFlags = evalOptionsToFlags;
  function concat2(...values) {
    let result = [];
    for (const value of values) {
      if (value !== void 0) {
        result = result.concat(value);
      }
    }
    return result;
  }
  types$4.concat = concat2;
  return types$4;
}
function requireContext() {
  if (hasRequiredContext) return context;
  hasRequiredContext = 1;
  Object.defineProperty(context, "__esModule", { value: true });
  context.QuickJSContext = void 0;
  const debug_12 = /* @__PURE__ */ requireDebug();
  const deferred_promise_1 = /* @__PURE__ */ requireDeferredPromise();
  const errors_1 = /* @__PURE__ */ requireErrors();
  const lifetime_1 = /* @__PURE__ */ requireLifetime();
  const memory_1 = /* @__PURE__ */ requireMemory();
  const types_1 = /* @__PURE__ */ requireTypes();
  class ContextMemory extends memory_1.ModuleMemory {
    constructor(args2) {
      super(args2.module);
      this.scope = new lifetime_1.Scope();
      this.copyJSValue = (ptr) => {
        return this.ffi.QTS_DupValuePointer(this.ctx.value, ptr);
      };
      this.freeJSValue = (ptr) => {
        this.ffi.QTS_FreeValuePointer(this.ctx.value, ptr);
      };
      args2.ownedLifetimes?.forEach((lifetime2) => this.scope.manage(lifetime2));
      this.owner = args2.owner;
      this.module = args2.module;
      this.ffi = args2.ffi;
      this.rt = args2.rt;
      this.ctx = this.scope.manage(args2.ctx);
    }
    get alive() {
      return this.scope.alive;
    }
    dispose() {
      return this.scope.dispose();
    }
    manage(lifetime2) {
      return this.scope.manage(lifetime2);
    }
    consumeJSCharPointer(ptr) {
      const str = this.module.UTF8ToString(ptr);
      this.ffi.QTS_FreeCString(this.ctx.value, ptr);
      return str;
    }
    heapValueHandle(ptr) {
      return new lifetime_1.Lifetime(ptr, this.copyJSValue, this.freeJSValue, this.owner);
    }
  }
  class QuickJSContext {
    constructor(args2) {
      this._undefined = void 0;
      this._null = void 0;
      this._false = void 0;
      this._true = void 0;
      this._global = void 0;
      this._BigInt = void 0;
      this.fnNextId = -32768;
      this.fnMaps = /* @__PURE__ */ new Map();
      this.cToHostCallbacks = {
        callFunction: (ctx, this_ptr, argc, argv, fn_id) => {
          if (ctx !== this.ctx.value) {
            throw new Error("QuickJSContext instance received C -> JS call with mismatched ctx");
          }
          const fn = this.getFunction(fn_id);
          if (!fn) {
            throw new Error(`QuickJSContext had no callback with id ${fn_id}`);
          }
          return lifetime_1.Scope.withScopeMaybeAsync(this, function* (awaited, scope2) {
            const thisHandle = scope2.manage(new lifetime_1.WeakLifetime(this_ptr, this.memory.copyJSValue, this.memory.freeJSValue, this.runtime));
            const argHandles = new Array(argc);
            for (let i = 0; i < argc; i++) {
              const ptr = this.ffi.QTS_ArgvGetJSValueConstPointer(argv, i);
              argHandles[i] = scope2.manage(new lifetime_1.WeakLifetime(ptr, this.memory.copyJSValue, this.memory.freeJSValue, this.runtime));
            }
            try {
              const result = yield* awaited(fn.apply(thisHandle, argHandles));
              if (result) {
                if ("error" in result && result.error) {
                  (0, debug_12.debugLog)("throw error", result.error);
                  throw result.error;
                }
                const handle = scope2.manage(result instanceof lifetime_1.Lifetime ? result : result.value);
                return this.ffi.QTS_DupValuePointer(this.ctx.value, handle.value);
              }
              return 0;
            } catch (error) {
              return this.errorToHandle(error).consume((errorHandle) => this.ffi.QTS_Throw(this.ctx.value, errorHandle.value));
            }
          });
        }
      };
      this.runtime = args2.runtime;
      this.module = args2.module;
      this.ffi = args2.ffi;
      this.rt = args2.rt;
      this.ctx = args2.ctx;
      this.memory = new ContextMemory({
        ...args2,
        owner: this.runtime
      });
      args2.callbacks.setContextCallbacks(this.ctx.value, this.cToHostCallbacks);
      this.dump = this.dump.bind(this);
      this.getString = this.getString.bind(this);
      this.getNumber = this.getNumber.bind(this);
      this.resolvePromise = this.resolvePromise.bind(this);
    }
    get alive() {
      return this.memory.alive;
    }
    dispose() {
      this.memory.dispose();
    }
    get undefined() {
      if (this._undefined) {
        return this._undefined;
      }
      const ptr = this.ffi.QTS_GetUndefined();
      return this._undefined = new lifetime_1.StaticLifetime(ptr);
    }
    get null() {
      if (this._null) {
        return this._null;
      }
      const ptr = this.ffi.QTS_GetNull();
      return this._null = new lifetime_1.StaticLifetime(ptr);
    }
    get true() {
      if (this._true) {
        return this._true;
      }
      const ptr = this.ffi.QTS_GetTrue();
      return this._true = new lifetime_1.StaticLifetime(ptr);
    }
    get false() {
      if (this._false) {
        return this._false;
      }
      const ptr = this.ffi.QTS_GetFalse();
      return this._false = new lifetime_1.StaticLifetime(ptr);
    }
    get global() {
      if (this._global) {
        return this._global;
      }
      const ptr = this.ffi.QTS_GetGlobalObject(this.ctx.value);
      this.memory.manage(this.memory.heapValueHandle(ptr));
      this._global = new lifetime_1.StaticLifetime(ptr, this.runtime);
      return this._global;
    }
    newNumber(num) {
      return this.memory.heapValueHandle(this.ffi.QTS_NewFloat64(this.ctx.value, num));
    }
    newString(str) {
      const ptr = this.memory.newHeapCharPointer(str).consume((charHandle) => this.ffi.QTS_NewString(this.ctx.value, charHandle.value));
      return this.memory.heapValueHandle(ptr);
    }
    newUniqueSymbol(description2) {
      const key = (typeof description2 === "symbol" ? description2.description : description2) ?? "";
      const ptr = this.memory.newHeapCharPointer(key).consume((charHandle) => this.ffi.QTS_NewSymbol(this.ctx.value, charHandle.value, 0));
      return this.memory.heapValueHandle(ptr);
    }
    newSymbolFor(key) {
      const description2 = (typeof key === "symbol" ? key.description : key) ?? "";
      const ptr = this.memory.newHeapCharPointer(description2).consume((charHandle) => this.ffi.QTS_NewSymbol(this.ctx.value, charHandle.value, 1));
      return this.memory.heapValueHandle(ptr);
    }
    newBigInt(num) {
      if (!this._BigInt) {
        const bigIntHandle2 = this.getProp(this.global, "BigInt");
        this.memory.manage(bigIntHandle2);
        this._BigInt = new lifetime_1.StaticLifetime(bigIntHandle2.value, this.runtime);
      }
      const bigIntHandle = this._BigInt;
      const asString = String(num);
      return this.newString(asString).consume((handle) => this.unwrapResult(this.callFunction(bigIntHandle, this.undefined, handle)));
    }
    newObject(prototype) {
      if (prototype) {
        this.runtime.assertOwned(prototype);
      }
      const ptr = prototype ? this.ffi.QTS_NewObjectProto(this.ctx.value, prototype.value) : this.ffi.QTS_NewObject(this.ctx.value);
      return this.memory.heapValueHandle(ptr);
    }
    newArray() {
      const ptr = this.ffi.QTS_NewArray(this.ctx.value);
      return this.memory.heapValueHandle(ptr);
    }
    newPromise(value) {
      const deferredPromise2 = lifetime_1.Scope.withScope((scope2) => {
        const mutablePointerArray = scope2.manage(this.memory.newMutablePointerArray(2));
        const promisePtr = this.ffi.QTS_NewPromiseCapability(this.ctx.value, mutablePointerArray.value.ptr);
        const promiseHandle = this.memory.heapValueHandle(promisePtr);
        const [resolveHandle, rejectHandle] = Array.from(mutablePointerArray.value.typedArray).map((jsvaluePtr) => this.memory.heapValueHandle(jsvaluePtr));
        return new deferred_promise_1.QuickJSDeferredPromise({
          context: this,
          promiseHandle,
          resolveHandle,
          rejectHandle
        });
      });
      if (value && typeof value === "function") {
        value = new Promise(value);
      }
      if (value) {
        Promise.resolve(value).then(deferredPromise2.resolve, (error) => error instanceof lifetime_1.Lifetime ? deferredPromise2.reject(error) : this.newError(error).consume(deferredPromise2.reject));
      }
      return deferredPromise2;
    }
    newFunction(name, fn) {
      const fnId = ++this.fnNextId;
      this.setFunction(fnId, fn);
      return this.memory.heapValueHandle(this.ffi.QTS_NewFunction(this.ctx.value, fnId, name));
    }
    newError(error) {
      const errorHandle = this.memory.heapValueHandle(this.ffi.QTS_NewError(this.ctx.value));
      if (error && typeof error === "object") {
        if (error.name !== void 0) {
          this.newString(error.name).consume((handle) => this.setProp(errorHandle, "name", handle));
        }
        if (error.message !== void 0) {
          this.newString(error.message).consume((handle) => this.setProp(errorHandle, "message", handle));
        }
      } else if (typeof error === "string") {
        this.newString(error).consume((handle) => this.setProp(errorHandle, "message", handle));
      } else if (error !== void 0) {
        this.newString(String(error)).consume((handle) => this.setProp(errorHandle, "message", handle));
      }
      return errorHandle;
    }
    typeof(handle) {
      this.runtime.assertOwned(handle);
      return this.memory.consumeHeapCharPointer(this.ffi.QTS_Typeof(this.ctx.value, handle.value));
    }
    getNumber(handle) {
      this.runtime.assertOwned(handle);
      return this.ffi.QTS_GetFloat64(this.ctx.value, handle.value);
    }
    getString(handle) {
      this.runtime.assertOwned(handle);
      return this.memory.consumeJSCharPointer(this.ffi.QTS_GetString(this.ctx.value, handle.value));
    }
    getSymbol(handle) {
      this.runtime.assertOwned(handle);
      const key = this.memory.consumeJSCharPointer(this.ffi.QTS_GetSymbolDescriptionOrKey(this.ctx.value, handle.value));
      const isGlobal = this.ffi.QTS_IsGlobalSymbol(this.ctx.value, handle.value);
      return isGlobal ? Symbol.for(key) : Symbol(key);
    }
    getBigInt(handle) {
      this.runtime.assertOwned(handle);
      const asString = this.getString(handle);
      return BigInt(asString);
    }
    resolvePromise(promiseLikeHandle) {
      this.runtime.assertOwned(promiseLikeHandle);
      const vmResolveResult = lifetime_1.Scope.withScope((scope2) => {
        const vmPromise = scope2.manage(this.getProp(this.global, "Promise"));
        const vmPromiseResolve = scope2.manage(this.getProp(vmPromise, "resolve"));
        return this.callFunction(vmPromiseResolve, vmPromise, promiseLikeHandle);
      });
      if (vmResolveResult.error) {
        return Promise.resolve(vmResolveResult);
      }
      return new Promise((resolve2) => {
        lifetime_1.Scope.withScope((scope2) => {
          const resolveHandle = scope2.manage(this.newFunction("resolve", (value) => {
            resolve2({ value: value && value.dup() });
          }));
          const rejectHandle = scope2.manage(this.newFunction("reject", (error) => {
            resolve2({ error: error && error.dup() });
          }));
          const promiseHandle = scope2.manage(vmResolveResult.value);
          const promiseThenHandle = scope2.manage(this.getProp(promiseHandle, "then"));
          this.unwrapResult(this.callFunction(promiseThenHandle, promiseHandle, resolveHandle, rejectHandle)).dispose();
        });
      });
    }
    getProp(handle, key) {
      this.runtime.assertOwned(handle);
      const ptr = this.borrowPropertyKey(key).consume((quickJSKey) => this.ffi.QTS_GetProp(this.ctx.value, handle.value, quickJSKey.value));
      const result = this.memory.heapValueHandle(ptr);
      return result;
    }
    setProp(handle, key, value) {
      this.runtime.assertOwned(handle);
      this.borrowPropertyKey(key).consume((quickJSKey) => this.ffi.QTS_SetProp(this.ctx.value, handle.value, quickJSKey.value, value.value));
    }
    defineProp(handle, key, descriptor) {
      this.runtime.assertOwned(handle);
      lifetime_1.Scope.withScope((scope2) => {
        const quickJSKey = scope2.manage(this.borrowPropertyKey(key));
        const value = descriptor.value || this.undefined;
        const configurable = Boolean(descriptor.configurable);
        const enumerable = Boolean(descriptor.enumerable);
        const hasValue = Boolean(descriptor.value);
        const get3 = descriptor.get ? scope2.manage(this.newFunction(descriptor.get.name, descriptor.get)) : this.undefined;
        const set = descriptor.set ? scope2.manage(this.newFunction(descriptor.set.name, descriptor.set)) : this.undefined;
        this.ffi.QTS_DefineProp(this.ctx.value, handle.value, quickJSKey.value, value.value, get3.value, set.value, configurable, enumerable, hasValue);
      });
    }
    callFunction(func, thisVal, ...args2) {
      this.runtime.assertOwned(func);
      const resultPtr = this.memory.toPointerArray(args2).consume((argsArrayPtr) => this.ffi.QTS_Call(this.ctx.value, func.value, thisVal.value, args2.length, argsArrayPtr.value));
      const errorPtr = this.ffi.QTS_ResolveException(this.ctx.value, resultPtr);
      if (errorPtr) {
        this.ffi.QTS_FreeValuePointer(this.ctx.value, resultPtr);
        return { error: this.memory.heapValueHandle(errorPtr) };
      }
      return { value: this.memory.heapValueHandle(resultPtr) };
    }
    evalCode(code2, filename = "eval.js", options2) {
      const detectModule = options2 === void 0 ? 1 : 0;
      const flags = (0, types_1.evalOptionsToFlags)(options2);
      const resultPtr = this.memory.newHeapCharPointer(code2).consume((charHandle) => this.ffi.QTS_Eval(this.ctx.value, charHandle.value, filename, detectModule, flags));
      const errorPtr = this.ffi.QTS_ResolveException(this.ctx.value, resultPtr);
      if (errorPtr) {
        this.ffi.QTS_FreeValuePointer(this.ctx.value, resultPtr);
        return { error: this.memory.heapValueHandle(errorPtr) };
      }
      return { value: this.memory.heapValueHandle(resultPtr) };
    }
    throw(error) {
      return this.errorToHandle(error).consume((handle) => this.ffi.QTS_Throw(this.ctx.value, handle.value));
    }
    borrowPropertyKey(key) {
      if (typeof key === "number") {
        return this.newNumber(key);
      }
      if (typeof key === "string") {
        return this.newString(key);
      }
      return new lifetime_1.StaticLifetime(key.value, this.runtime);
    }
    getMemory(rt) {
      if (rt === this.rt.value) {
        return this.memory;
      } else {
        throw new Error("Private API. Cannot get memory from a different runtime");
      }
    }
    dump(handle) {
      this.runtime.assertOwned(handle);
      const type2 = this.typeof(handle);
      if (type2 === "string") {
        return this.getString(handle);
      } else if (type2 === "number") {
        return this.getNumber(handle);
      } else if (type2 === "bigint") {
        return this.getBigInt(handle);
      } else if (type2 === "undefined") {
        return void 0;
      } else if (type2 === "symbol") {
        return this.getSymbol(handle);
      }
      const str = this.memory.consumeJSCharPointer(this.ffi.QTS_Dump(this.ctx.value, handle.value));
      try {
        return JSON.parse(str);
      } catch (err) {
        return str;
      }
    }
    unwrapResult(result) {
      if (result.error) {
        const context2 = "context" in result.error ? result.error.context : this;
        const cause = result.error.consume((error) => this.dump(error));
        if (cause && typeof cause === "object" && typeof cause.message === "string") {
          const { message, name, stack } = cause;
          const exception = new errors_1.QuickJSUnwrapError("");
          const hostStack = exception.stack;
          if (typeof name === "string") {
            exception.name = cause.name;
          }
          if (typeof stack === "string") {
            exception.stack = `${name}: ${message}
${cause.stack}Host: ${hostStack}`;
          }
          Object.assign(exception, { cause, context: context2, message });
          throw exception;
        }
        throw new errors_1.QuickJSUnwrapError(cause, context2);
      }
      return result.value;
    }
    getFunction(fn_id) {
      const map_id = fn_id >> 8;
      const fnMap = this.fnMaps.get(map_id);
      if (!fnMap) {
        return void 0;
      }
      return fnMap.get(fn_id);
    }
    setFunction(fn_id, handle) {
      const map_id = fn_id >> 8;
      let fnMap = this.fnMaps.get(map_id);
      if (!fnMap) {
        fnMap = /* @__PURE__ */ new Map();
        this.fnMaps.set(map_id, fnMap);
      }
      return fnMap.set(fn_id, handle);
    }
    errorToHandle(error) {
      if (error instanceof lifetime_1.Lifetime) {
        return error;
      }
      return this.newError(error);
    }
  }
  context.QuickJSContext = QuickJSContext;
  return context;
}
function requireRuntime() {
  if (hasRequiredRuntime) return runtime;
  hasRequiredRuntime = 1;
  Object.defineProperty(runtime, "__esModule", { value: true });
  runtime.QuickJSRuntime = void 0;
  const asyncify_helpers_1 = /* @__PURE__ */ requireAsyncifyHelpers();
  const context_1 = /* @__PURE__ */ requireContext();
  const debug_12 = /* @__PURE__ */ requireDebug();
  const errors_1 = /* @__PURE__ */ requireErrors();
  const lifetime_1 = /* @__PURE__ */ requireLifetime();
  const memory_1 = /* @__PURE__ */ requireMemory();
  const types_1 = /* @__PURE__ */ requireTypes();
  class QuickJSRuntime {
    constructor(args2) {
      this.scope = new lifetime_1.Scope();
      this.contextMap = /* @__PURE__ */ new Map();
      this.cToHostCallbacks = {
        shouldInterrupt: (rt) => {
          if (rt !== this.rt.value) {
            throw new Error("QuickJSContext instance received C -> JS interrupt with mismatched rt");
          }
          const fn = this.interruptHandler;
          if (!fn) {
            throw new Error("QuickJSContext had no interrupt handler");
          }
          return fn(this) ? 1 : 0;
        },
        loadModuleSource: (0, asyncify_helpers_1.maybeAsyncFn)(this, function* (awaited, rt, ctx, moduleName) {
          const moduleLoader = this.moduleLoader;
          if (!moduleLoader) {
            throw new Error("Runtime has no module loader");
          }
          if (rt !== this.rt.value) {
            throw new Error("Runtime pointer mismatch");
          }
          const context2 = this.contextMap.get(ctx) ?? this.newContext({
            contextPointer: ctx
          });
          try {
            const result = yield* awaited(moduleLoader(moduleName, context2));
            if (typeof result === "object" && "error" in result && result.error) {
              (0, debug_12.debugLog)("cToHostLoadModule: loader returned error", result.error);
              throw result.error;
            }
            const moduleSource = typeof result === "string" ? result : "value" in result ? result.value : result;
            return this.memory.newHeapCharPointer(moduleSource).value;
          } catch (error) {
            (0, debug_12.debugLog)("cToHostLoadModule: caught error", error);
            context2.throw(error);
            return 0;
          }
        }),
        normalizeModule: (0, asyncify_helpers_1.maybeAsyncFn)(this, function* (awaited, rt, ctx, baseModuleName, moduleNameRequest) {
          const moduleNormalizer = this.moduleNormalizer;
          if (!moduleNormalizer) {
            throw new Error("Runtime has no module normalizer");
          }
          if (rt !== this.rt.value) {
            throw new Error("Runtime pointer mismatch");
          }
          const context2 = this.contextMap.get(ctx) ?? this.newContext({
            contextPointer: ctx
          });
          try {
            const result = yield* awaited(moduleNormalizer(baseModuleName, moduleNameRequest, context2));
            if (typeof result === "object" && "error" in result && result.error) {
              (0, debug_12.debugLog)("cToHostNormalizeModule: normalizer returned error", result.error);
              throw result.error;
            }
            const name = typeof result === "string" ? result : result.value;
            return context2.getMemory(this.rt.value).newHeapCharPointer(name).value;
          } catch (error) {
            (0, debug_12.debugLog)("normalizeModule: caught error", error);
            context2.throw(error);
            return 0;
          }
        })
      };
      args2.ownedLifetimes?.forEach((lifetime2) => this.scope.manage(lifetime2));
      this.module = args2.module;
      this.memory = new memory_1.ModuleMemory(this.module);
      this.ffi = args2.ffi;
      this.rt = args2.rt;
      this.callbacks = args2.callbacks;
      this.scope.manage(this.rt);
      this.callbacks.setRuntimeCallbacks(this.rt.value, this.cToHostCallbacks);
      this.executePendingJobs = this.executePendingJobs.bind(this);
    }
    get alive() {
      return this.scope.alive;
    }
    dispose() {
      return this.scope.dispose();
    }
    newContext(options2 = {}) {
      if (options2.intrinsics && options2.intrinsics !== types_1.DefaultIntrinsics) {
        throw new Error("TODO: Custom intrinsics are not supported yet");
      }
      const ctx = new lifetime_1.Lifetime(options2.contextPointer || this.ffi.QTS_NewContext(this.rt.value), void 0, (ctx_ptr) => {
        this.contextMap.delete(ctx_ptr);
        this.callbacks.deleteContext(ctx_ptr);
        this.ffi.QTS_FreeContext(ctx_ptr);
      });
      const context2 = new context_1.QuickJSContext({
        module: this.module,
        ctx,
        ffi: this.ffi,
        rt: this.rt,
        ownedLifetimes: options2.ownedLifetimes,
        runtime: this,
        callbacks: this.callbacks
      });
      this.contextMap.set(ctx.value, context2);
      return context2;
    }
    setModuleLoader(moduleLoader, moduleNormalizer) {
      this.moduleLoader = moduleLoader;
      this.moduleNormalizer = moduleNormalizer;
      this.ffi.QTS_RuntimeEnableModuleLoader(this.rt.value, this.moduleNormalizer ? 1 : 0);
    }
    removeModuleLoader() {
      this.moduleLoader = void 0;
      this.ffi.QTS_RuntimeDisableModuleLoader(this.rt.value);
    }
    hasPendingJob() {
      return Boolean(this.ffi.QTS_IsJobPending(this.rt.value));
    }
    setInterruptHandler(cb) {
      const prevInterruptHandler = this.interruptHandler;
      this.interruptHandler = cb;
      if (!prevInterruptHandler) {
        this.ffi.QTS_RuntimeEnableInterruptHandler(this.rt.value);
      }
    }
    removeInterruptHandler() {
      if (this.interruptHandler) {
        this.ffi.QTS_RuntimeDisableInterruptHandler(this.rt.value);
        this.interruptHandler = void 0;
      }
    }
    executePendingJobs(maxJobsToExecute = -1) {
      const ctxPtrOut = this.memory.newMutablePointerArray(1);
      const valuePtr = this.ffi.QTS_ExecutePendingJob(this.rt.value, maxJobsToExecute ?? -1, ctxPtrOut.value.ptr);
      const ctxPtr = ctxPtrOut.value.typedArray[0];
      ctxPtrOut.dispose();
      if (ctxPtr === 0) {
        this.ffi.QTS_FreeValuePointerRuntime(this.rt.value, valuePtr);
        return { value: 0 };
      }
      const context2 = this.contextMap.get(ctxPtr) ?? this.newContext({
        contextPointer: ctxPtr
      });
      const resultValue = context2.getMemory(this.rt.value).heapValueHandle(valuePtr);
      const typeOfRet = context2.typeof(resultValue);
      if (typeOfRet === "number") {
        const executedJobs = context2.getNumber(resultValue);
        resultValue.dispose();
        return { value: executedJobs };
      } else {
        const error = Object.assign(resultValue, { context: context2 });
        return {
          error
        };
      }
    }
    setMemoryLimit(limitBytes) {
      if (limitBytes < 0 && limitBytes !== -1) {
        throw new Error("Cannot set memory limit to negative number. To unset, pass -1");
      }
      this.ffi.QTS_RuntimeSetMemoryLimit(this.rt.value, limitBytes);
    }
    computeMemoryUsage() {
      const serviceContextMemory = this.getSystemContext().getMemory(this.rt.value);
      return serviceContextMemory.heapValueHandle(this.ffi.QTS_RuntimeComputeMemoryUsage(this.rt.value, serviceContextMemory.ctx.value));
    }
    dumpMemoryUsage() {
      return this.memory.consumeHeapCharPointer(this.ffi.QTS_RuntimeDumpMemoryUsage(this.rt.value));
    }
    setMaxStackSize(stackSize) {
      if (stackSize < 0) {
        throw new Error("Cannot set memory limit to negative number. To unset, pass 0.");
      }
      this.ffi.QTS_RuntimeSetMaxStackSize(this.rt.value, stackSize);
    }
    assertOwned(handle) {
      if (handle.owner && handle.owner.rt !== this.rt) {
        throw new errors_1.QuickJSWrongOwner(`Handle is not owned by this runtime: ${handle.owner.rt.value} != ${this.rt.value}`);
      }
    }
    getSystemContext() {
      if (!this.context) {
        this.context = this.scope.manage(this.newContext());
      }
      return this.context;
    }
  }
  runtime.QuickJSRuntime = QuickJSRuntime;
  return runtime;
}
function requireModule() {
  if (hasRequiredModule) return module$1;
  hasRequiredModule = 1;
  Object.defineProperty(module$1, "__esModule", { value: true });
  module$1.QuickJSWASMModule = module$1.applyModuleEvalRuntimeOptions = module$1.applyBaseRuntimeOptions = module$1.QuickJSModuleCallbacks = void 0;
  const debug_12 = /* @__PURE__ */ requireDebug();
  const errors_1 = /* @__PURE__ */ requireErrors();
  const lifetime_1 = /* @__PURE__ */ requireLifetime();
  const runtime_1 = /* @__PURE__ */ requireRuntime();
  const types_1 = /* @__PURE__ */ requireTypes();
  class QuickJSEmscriptenModuleCallbacks {
    constructor(args2) {
      this.callFunction = args2.callFunction;
      this.shouldInterrupt = args2.shouldInterrupt;
      this.loadModuleSource = args2.loadModuleSource;
      this.normalizeModule = args2.normalizeModule;
    }
  }
  class QuickJSModuleCallbacks {
    constructor(module2) {
      this.contextCallbacks = /* @__PURE__ */ new Map();
      this.runtimeCallbacks = /* @__PURE__ */ new Map();
      this.suspendedCount = 0;
      this.cToHostCallbacks = new QuickJSEmscriptenModuleCallbacks({
        callFunction: (asyncify, ctx, this_ptr, argc, argv, fn_id) => this.handleAsyncify(asyncify, () => {
          try {
            const vm = this.contextCallbacks.get(ctx);
            if (!vm) {
              throw new Error(`QuickJSContext(ctx = ${ctx}) not found for C function call "${fn_id}"`);
            }
            return vm.callFunction(ctx, this_ptr, argc, argv, fn_id);
          } catch (error) {
            console.error("[C to host error: returning null]", error);
            return 0;
          }
        }),
        shouldInterrupt: (asyncify, rt) => this.handleAsyncify(asyncify, () => {
          try {
            const vm = this.runtimeCallbacks.get(rt);
            if (!vm) {
              throw new Error(`QuickJSRuntime(rt = ${rt}) not found for C interrupt`);
            }
            return vm.shouldInterrupt(rt);
          } catch (error) {
            console.error("[C to host interrupt: returning error]", error);
            return 1;
          }
        }),
        loadModuleSource: (asyncify, rt, ctx, moduleName) => this.handleAsyncify(asyncify, () => {
          try {
            const runtimeCallbacks = this.runtimeCallbacks.get(rt);
            if (!runtimeCallbacks) {
              throw new Error(`QuickJSRuntime(rt = ${rt}) not found for C module loader`);
            }
            const loadModule = runtimeCallbacks.loadModuleSource;
            if (!loadModule) {
              throw new Error(`QuickJSRuntime(rt = ${rt}) does not support module loading`);
            }
            return loadModule(rt, ctx, moduleName);
          } catch (error) {
            console.error("[C to host module loader error: returning null]", error);
            return 0;
          }
        }),
        normalizeModule: (asyncify, rt, ctx, moduleBaseName, moduleName) => this.handleAsyncify(asyncify, () => {
          try {
            const runtimeCallbacks = this.runtimeCallbacks.get(rt);
            if (!runtimeCallbacks) {
              throw new Error(`QuickJSRuntime(rt = ${rt}) not found for C module loader`);
            }
            const normalizeModule = runtimeCallbacks.normalizeModule;
            if (!normalizeModule) {
              throw new Error(`QuickJSRuntime(rt = ${rt}) does not support module loading`);
            }
            return normalizeModule(rt, ctx, moduleBaseName, moduleName);
          } catch (error) {
            console.error("[C to host module loader error: returning null]", error);
            return 0;
          }
        })
      });
      this.module = module2;
      this.module.callbacks = this.cToHostCallbacks;
    }
    setRuntimeCallbacks(rt, callbacks) {
      this.runtimeCallbacks.set(rt, callbacks);
    }
    deleteRuntime(rt) {
      this.runtimeCallbacks.delete(rt);
    }
    setContextCallbacks(ctx, callbacks) {
      this.contextCallbacks.set(ctx, callbacks);
    }
    deleteContext(ctx) {
      this.contextCallbacks.delete(ctx);
    }
    handleAsyncify(asyncify, fn) {
      if (asyncify) {
        return asyncify.handleSleep((done) => {
          try {
            const result = fn();
            if (!(result instanceof Promise)) {
              (0, debug_12.debugLog)("asyncify.handleSleep: not suspending:", result);
              done(result);
              return;
            }
            if (this.suspended) {
              throw new errors_1.QuickJSAsyncifyError(`Already suspended at: ${this.suspended.stack}
Attempted to suspend at:`);
            } else {
              this.suspended = new errors_1.QuickJSAsyncifySuspended(`(${this.suspendedCount++})`);
              (0, debug_12.debugLog)("asyncify.handleSleep: suspending:", this.suspended);
            }
            result.then((resolvedResult) => {
              this.suspended = void 0;
              (0, debug_12.debugLog)("asyncify.handleSleep: resolved:", resolvedResult);
              done(resolvedResult);
            }, (error) => {
              (0, debug_12.debugLog)("asyncify.handleSleep: rejected:", error);
              console.error("QuickJS: cannot handle error in suspended function", error);
              this.suspended = void 0;
            });
          } catch (error) {
            (0, debug_12.debugLog)("asyncify.handleSleep: error:", error);
            this.suspended = void 0;
            throw error;
          }
        });
      }
      const value = fn();
      if (value instanceof Promise) {
        throw new Error("Promise return value not supported in non-asyncify context.");
      }
      return value;
    }
  }
  module$1.QuickJSModuleCallbacks = QuickJSModuleCallbacks;
  function applyBaseRuntimeOptions(runtime2, options2) {
    if (options2.interruptHandler) {
      runtime2.setInterruptHandler(options2.interruptHandler);
    }
    if (options2.maxStackSizeBytes !== void 0) {
      runtime2.setMaxStackSize(options2.maxStackSizeBytes);
    }
    if (options2.memoryLimitBytes !== void 0) {
      runtime2.setMemoryLimit(options2.memoryLimitBytes);
    }
  }
  module$1.applyBaseRuntimeOptions = applyBaseRuntimeOptions;
  function applyModuleEvalRuntimeOptions(runtime2, options2) {
    if (options2.moduleLoader) {
      runtime2.setModuleLoader(options2.moduleLoader);
    }
    if (options2.shouldInterrupt) {
      runtime2.setInterruptHandler(options2.shouldInterrupt);
    }
    if (options2.memoryLimitBytes !== void 0) {
      runtime2.setMemoryLimit(options2.memoryLimitBytes);
    }
    if (options2.maxStackSizeBytes !== void 0) {
      runtime2.setMaxStackSize(options2.maxStackSizeBytes);
    }
  }
  module$1.applyModuleEvalRuntimeOptions = applyModuleEvalRuntimeOptions;
  class QuickJSWASMModule {
    constructor(module2, ffi) {
      this.module = module2;
      this.ffi = ffi;
      this.callbacks = new QuickJSModuleCallbacks(module2);
    }
    newRuntime(options2 = {}) {
      const rt = new lifetime_1.Lifetime(this.ffi.QTS_NewRuntime(), void 0, (rt_ptr) => {
        this.callbacks.deleteRuntime(rt_ptr);
        this.ffi.QTS_FreeRuntime(rt_ptr);
      });
      const runtime2 = new runtime_1.QuickJSRuntime({
        module: this.module,
        callbacks: this.callbacks,
        ffi: this.ffi,
        rt
      });
      applyBaseRuntimeOptions(runtime2, options2);
      if (options2.moduleLoader) {
        runtime2.setModuleLoader(options2.moduleLoader);
      }
      return runtime2;
    }
    newContext(options2 = {}) {
      const runtime2 = this.newRuntime();
      const context2 = runtime2.newContext({
        ...options2,
        ownedLifetimes: (0, types_1.concat)(runtime2, options2.ownedLifetimes)
      });
      runtime2.context = context2;
      return context2;
    }
    evalCode(code2, options2 = {}) {
      return lifetime_1.Scope.withScope((scope2) => {
        const vm = scope2.manage(this.newContext());
        applyModuleEvalRuntimeOptions(vm.runtime, options2);
        const result = vm.evalCode(code2, "eval.js");
        if (options2.memoryLimitBytes !== void 0) {
          vm.runtime.setMemoryLimit(-1);
        }
        if (result.error) {
          const error = vm.dump(scope2.manage(result.error));
          throw error;
        }
        const value = vm.dump(scope2.manage(result.value));
        return value;
      });
    }
    getFFI() {
      return this.ffi;
    }
  }
  module$1.QuickJSWASMModule = QuickJSWASMModule;
  return module$1;
}
function requireContextAsyncify() {
  if (hasRequiredContextAsyncify) return contextAsyncify;
  hasRequiredContextAsyncify = 1;
  Object.defineProperty(contextAsyncify, "__esModule", { value: true });
  contextAsyncify.QuickJSAsyncContext = void 0;
  const context_1 = /* @__PURE__ */ requireContext();
  const debug_12 = /* @__PURE__ */ requireDebug();
  const types_1 = /* @__PURE__ */ requireTypes();
  class QuickJSAsyncContext extends context_1.QuickJSContext {
    async evalCodeAsync(code2, filename = "eval.js", options2) {
      const detectModule = options2 === void 0 ? 1 : 0;
      const flags = (0, types_1.evalOptionsToFlags)(options2);
      let resultPtr = 0;
      try {
        resultPtr = await this.memory.newHeapCharPointer(code2).consume((charHandle) => this.ffi.QTS_Eval_MaybeAsync(this.ctx.value, charHandle.value, filename, detectModule, flags));
      } catch (error) {
        (0, debug_12.debugLog)("QTS_Eval_MaybeAsync threw", error);
        throw error;
      }
      const errorPtr = this.ffi.QTS_ResolveException(this.ctx.value, resultPtr);
      if (errorPtr) {
        this.ffi.QTS_FreeValuePointer(this.ctx.value, resultPtr);
        return { error: this.memory.heapValueHandle(errorPtr) };
      }
      return { value: this.memory.heapValueHandle(resultPtr) };
    }
    newAsyncifiedFunction(name, fn) {
      return this.newFunction(name, fn);
    }
  }
  contextAsyncify.QuickJSAsyncContext = QuickJSAsyncContext;
  return contextAsyncify;
}
function requireRuntimeAsyncify() {
  if (hasRequiredRuntimeAsyncify) return runtimeAsyncify;
  hasRequiredRuntimeAsyncify = 1;
  Object.defineProperty(runtimeAsyncify, "__esModule", { value: true });
  runtimeAsyncify.QuickJSAsyncRuntime = void 0;
  const _1 = /* @__PURE__ */ requireDist$2();
  const context_asyncify_1 = /* @__PURE__ */ requireContextAsyncify();
  const runtime_1 = /* @__PURE__ */ requireRuntime();
  const types_1 = /* @__PURE__ */ requireTypes();
  class QuickJSAsyncRuntime extends runtime_1.QuickJSRuntime {
    constructor(args2) {
      super(args2);
    }
    newContext(options2 = {}) {
      if (options2.intrinsics && options2.intrinsics !== types_1.DefaultIntrinsics) {
        throw new Error("TODO: Custom intrinsics are not supported yet");
      }
      const ctx = new _1.Lifetime(this.ffi.QTS_NewContext(this.rt.value), void 0, (ctx_ptr) => {
        this.contextMap.delete(ctx_ptr);
        this.callbacks.deleteContext(ctx_ptr);
        this.ffi.QTS_FreeContext(ctx_ptr);
      });
      const context2 = new context_asyncify_1.QuickJSAsyncContext({
        module: this.module,
        ctx,
        ffi: this.ffi,
        rt: this.rt,
        ownedLifetimes: [],
        runtime: this,
        callbacks: this.callbacks
      });
      this.contextMap.set(ctx.value, context2);
      return context2;
    }
    setModuleLoader(moduleLoader, moduleNormalizer) {
      super.setModuleLoader(moduleLoader, moduleNormalizer);
    }
    setMaxStackSize(stackSize) {
      return super.setMaxStackSize(stackSize);
    }
  }
  runtimeAsyncify.QuickJSAsyncRuntime = QuickJSAsyncRuntime;
  return runtimeAsyncify;
}
function requireModuleAsyncify() {
  if (hasRequiredModuleAsyncify) return moduleAsyncify;
  hasRequiredModuleAsyncify = 1;
  Object.defineProperty(moduleAsyncify, "__esModule", { value: true });
  moduleAsyncify.QuickJSAsyncWASMModule = void 0;
  const errors_1 = /* @__PURE__ */ requireErrors();
  const lifetime_1 = /* @__PURE__ */ requireLifetime();
  const module_1 = /* @__PURE__ */ requireModule();
  const runtime_asyncify_1 = /* @__PURE__ */ requireRuntimeAsyncify();
  class QuickJSAsyncWASMModule extends module_1.QuickJSWASMModule {
    constructor(module2, ffi) {
      super(module2, ffi);
      this.ffi = ffi;
      this.module = module2;
    }
    newRuntime(options2 = {}) {
      const rt = new lifetime_1.Lifetime(this.ffi.QTS_NewRuntime(), void 0, (rt_ptr) => {
        this.callbacks.deleteRuntime(rt_ptr);
        this.ffi.QTS_FreeRuntime(rt_ptr);
      });
      const runtime2 = new runtime_asyncify_1.QuickJSAsyncRuntime({
        module: this.module,
        ffi: this.ffi,
        rt,
        callbacks: this.callbacks
      });
      (0, module_1.applyBaseRuntimeOptions)(runtime2, options2);
      if (options2.moduleLoader) {
        runtime2.setModuleLoader(options2.moduleLoader);
      }
      return runtime2;
    }
    newContext(options2 = {}) {
      const runtime2 = this.newRuntime();
      const lifetimes = options2.ownedLifetimes ? options2.ownedLifetimes.concat([runtime2]) : [runtime2];
      const context2 = runtime2.newContext({ ...options2, ownedLifetimes: lifetimes });
      runtime2.context = context2;
      return context2;
    }
    evalCode() {
      throw new errors_1.QuickJSNotImplemented("QuickJSWASMModuleAsyncify.evalCode: use evalCodeAsync instead");
    }
    evalCodeAsync(code2, options2) {
      return lifetime_1.Scope.withScopeAsync(async (scope2) => {
        const vm = scope2.manage(this.newContext());
        (0, module_1.applyModuleEvalRuntimeOptions)(vm.runtime, options2);
        const result = await vm.evalCodeAsync(code2, "eval.js");
        if (options2.memoryLimitBytes !== void 0) {
          vm.runtime.setMemoryLimit(-1);
        }
        if (result.error) {
          const error = vm.dump(scope2.manage(result.error));
          throw error;
        }
        const value = vm.dump(scope2.manage(result.value));
        return value;
      });
    }
  }
  moduleAsyncify.QuickJSAsyncWASMModule = QuickJSAsyncWASMModule;
  return moduleAsyncify;
}
function requireFfi_WASM_RELEASE_SYNC() {
  if (hasRequiredFfi_WASM_RELEASE_SYNC) return ffi_WASM_RELEASE_SYNC;
  hasRequiredFfi_WASM_RELEASE_SYNC = 1;
  Object.defineProperty(ffi_WASM_RELEASE_SYNC, "__esModule", { value: true });
  ffi_WASM_RELEASE_SYNC.QuickJSFFI = void 0;
  class QuickJSFFI {
    constructor(module2) {
      this.module = module2;
      this.DEBUG = false;
      this.QTS_Throw = this.module.cwrap("QTS_Throw", "number", ["number", "number"]);
      this.QTS_NewError = this.module.cwrap("QTS_NewError", "number", ["number"]);
      this.QTS_RuntimeSetMemoryLimit = this.module.cwrap("QTS_RuntimeSetMemoryLimit", null, ["number", "number"]);
      this.QTS_RuntimeComputeMemoryUsage = this.module.cwrap("QTS_RuntimeComputeMemoryUsage", "number", ["number", "number"]);
      this.QTS_RuntimeDumpMemoryUsage = this.module.cwrap("QTS_RuntimeDumpMemoryUsage", "number", ["number"]);
      this.QTS_RecoverableLeakCheck = this.module.cwrap("QTS_RecoverableLeakCheck", "number", []);
      this.QTS_BuildIsSanitizeLeak = this.module.cwrap("QTS_BuildIsSanitizeLeak", "number", []);
      this.QTS_RuntimeSetMaxStackSize = this.module.cwrap("QTS_RuntimeSetMaxStackSize", null, ["number", "number"]);
      this.QTS_GetUndefined = this.module.cwrap("QTS_GetUndefined", "number", []);
      this.QTS_GetNull = this.module.cwrap("QTS_GetNull", "number", []);
      this.QTS_GetFalse = this.module.cwrap("QTS_GetFalse", "number", []);
      this.QTS_GetTrue = this.module.cwrap("QTS_GetTrue", "number", []);
      this.QTS_NewRuntime = this.module.cwrap("QTS_NewRuntime", "number", []);
      this.QTS_FreeRuntime = this.module.cwrap("QTS_FreeRuntime", null, ["number"]);
      this.QTS_NewContext = this.module.cwrap("QTS_NewContext", "number", ["number"]);
      this.QTS_FreeContext = this.module.cwrap("QTS_FreeContext", null, ["number"]);
      this.QTS_FreeValuePointer = this.module.cwrap("QTS_FreeValuePointer", null, ["number", "number"]);
      this.QTS_FreeValuePointerRuntime = this.module.cwrap("QTS_FreeValuePointerRuntime", null, ["number", "number"]);
      this.QTS_FreeVoidPointer = this.module.cwrap("QTS_FreeVoidPointer", null, ["number", "number"]);
      this.QTS_FreeCString = this.module.cwrap("QTS_FreeCString", null, ["number", "number"]);
      this.QTS_DupValuePointer = this.module.cwrap("QTS_DupValuePointer", "number", ["number", "number"]);
      this.QTS_NewObject = this.module.cwrap("QTS_NewObject", "number", ["number"]);
      this.QTS_NewObjectProto = this.module.cwrap("QTS_NewObjectProto", "number", ["number", "number"]);
      this.QTS_NewArray = this.module.cwrap("QTS_NewArray", "number", ["number"]);
      this.QTS_NewFloat64 = this.module.cwrap("QTS_NewFloat64", "number", ["number", "number"]);
      this.QTS_GetFloat64 = this.module.cwrap("QTS_GetFloat64", "number", ["number", "number"]);
      this.QTS_NewString = this.module.cwrap("QTS_NewString", "number", ["number", "number"]);
      this.QTS_GetString = this.module.cwrap("QTS_GetString", "number", ["number", "number"]);
      this.QTS_NewSymbol = this.module.cwrap("QTS_NewSymbol", "number", ["number", "number", "number"]);
      this.QTS_GetSymbolDescriptionOrKey = this.module.cwrap("QTS_GetSymbolDescriptionOrKey", "number", ["number", "number"]);
      this.QTS_IsGlobalSymbol = this.module.cwrap("QTS_IsGlobalSymbol", "number", ["number", "number"]);
      this.QTS_IsJobPending = this.module.cwrap("QTS_IsJobPending", "number", ["number"]);
      this.QTS_ExecutePendingJob = this.module.cwrap("QTS_ExecutePendingJob", "number", ["number", "number", "number"]);
      this.QTS_GetProp = this.module.cwrap("QTS_GetProp", "number", ["number", "number", "number"]);
      this.QTS_SetProp = this.module.cwrap("QTS_SetProp", null, ["number", "number", "number", "number"]);
      this.QTS_DefineProp = this.module.cwrap("QTS_DefineProp", null, ["number", "number", "number", "number", "number", "number", "boolean", "boolean", "boolean"]);
      this.QTS_Call = this.module.cwrap("QTS_Call", "number", ["number", "number", "number", "number", "number"]);
      this.QTS_ResolveException = this.module.cwrap("QTS_ResolveException", "number", ["number", "number"]);
      this.QTS_Dump = this.module.cwrap("QTS_Dump", "number", ["number", "number"]);
      this.QTS_Eval = this.module.cwrap("QTS_Eval", "number", ["number", "number", "string", "number", "number"]);
      this.QTS_Typeof = this.module.cwrap("QTS_Typeof", "number", ["number", "number"]);
      this.QTS_GetGlobalObject = this.module.cwrap("QTS_GetGlobalObject", "number", ["number"]);
      this.QTS_NewPromiseCapability = this.module.cwrap("QTS_NewPromiseCapability", "number", ["number", "number"]);
      this.QTS_TestStringArg = this.module.cwrap("QTS_TestStringArg", null, ["string"]);
      this.QTS_BuildIsDebug = this.module.cwrap("QTS_BuildIsDebug", "number", []);
      this.QTS_BuildIsAsyncify = this.module.cwrap("QTS_BuildIsAsyncify", "number", []);
      this.QTS_NewFunction = this.module.cwrap("QTS_NewFunction", "number", ["number", "number", "string"]);
      this.QTS_ArgvGetJSValueConstPointer = this.module.cwrap("QTS_ArgvGetJSValueConstPointer", "number", ["number", "number"]);
      this.QTS_RuntimeEnableInterruptHandler = this.module.cwrap("QTS_RuntimeEnableInterruptHandler", null, ["number"]);
      this.QTS_RuntimeDisableInterruptHandler = this.module.cwrap("QTS_RuntimeDisableInterruptHandler", null, ["number"]);
      this.QTS_RuntimeEnableModuleLoader = this.module.cwrap("QTS_RuntimeEnableModuleLoader", null, ["number", "number"]);
      this.QTS_RuntimeDisableModuleLoader = this.module.cwrap("QTS_RuntimeDisableModuleLoader", null, ["number"]);
    }
  }
  ffi_WASM_RELEASE_SYNC.QuickJSFFI = QuickJSFFI;
  return ffi_WASM_RELEASE_SYNC;
}
function requireEmscriptenModule_WASM_RELEASE_SYNC() {
  if (hasRequiredEmscriptenModule_WASM_RELEASE_SYNC) return emscriptenModule_WASM_RELEASE_SYNC.exports;
  hasRequiredEmscriptenModule_WASM_RELEASE_SYNC = 1;
  (function(module2, exports$1) {
    var QuickJSRaw = (() => {
      var _scriptDir = typeof document !== "undefined" && document.currentScript ? document.currentScript.src : void 0;
      if (typeof __filename !== "undefined")
        _scriptDir = _scriptDir || __filename;
      return function(QuickJSRaw2 = {}) {
        var a;
        a || (a = typeof QuickJSRaw2 !== "undefined" ? QuickJSRaw2 : {});
        var m, n;
        a.ready = new Promise(function(b, c) {
          m = b;
          n = c;
        });
        var p = Object.assign({}, a), t = "./this.program", u = "object" == typeof window, v = "function" == typeof importScripts, w = "object" == typeof process && "object" == typeof process.versions && "string" == typeof process.versions.node, x = "", y, z2, A;
        if (w) {
          var fs10 = require$$0$3, B = require$$0$4;
          x = v ? B.dirname(x) + "/" : __dirname + "/";
          y = (b, c) => {
            var d = C(b);
            if (d)
              return c ? d : d.toString();
            b = b.startsWith("file://") ? new URL(b) : B.normalize(b);
            return fs10.readFileSync(b, c ? void 0 : "utf8");
          };
          A = (b) => {
            b = y(b, true);
            b.buffer || (b = new Uint8Array(b));
            return b;
          };
          z2 = (b, c, d) => {
            var e = C(b);
            e && c(e);
            b = b.startsWith("file://") ? new URL(b) : B.normalize(b);
            fs10.readFile(b, function(f, g) {
              f ? d(f) : c(g.buffer);
            });
          };
          !a.thisProgram && 1 < process.argv.length && (t = process.argv[1].replace(/\\/g, "/"));
          process.argv.slice(2);
          a.inspect = function() {
            return "[Emscripten Module object]";
          };
        } else if (u || v)
          v ? x = self.location.href : "undefined" != typeof document && document.currentScript && (x = document.currentScript.src), _scriptDir && (x = _scriptDir), 0 !== x.indexOf("blob:") ? x = x.substr(0, x.replace(/[?#].*/, "").lastIndexOf("/") + 1) : x = "", y = (b) => {
            try {
              var c = new XMLHttpRequest();
              c.open("GET", b, false);
              c.send(null);
              return c.responseText;
            } catch (f) {
              if (b = C(b)) {
                c = [];
                for (var d = 0; d < b.length; d++) {
                  var e = b[d];
                  255 < e && (e &= 255);
                  c.push(String.fromCharCode(e));
                }
                return c.join("");
              }
              throw f;
            }
          }, v && (A = (b) => {
            try {
              var c = new XMLHttpRequest();
              c.open("GET", b, false);
              c.responseType = "arraybuffer";
              c.send(null);
              return new Uint8Array(c.response);
            } catch (d) {
              if (b = C(b))
                return b;
              throw d;
            }
          }), z2 = (b, c, d) => {
            var e = new XMLHttpRequest();
            e.open("GET", b, true);
            e.responseType = "arraybuffer";
            e.onload = () => {
              if (200 == e.status || 0 == e.status && e.response)
                c(e.response);
              else {
                var f = C(b);
                f ? c(f.buffer) : d();
              }
            };
            e.onerror = d;
            e.send(null);
          };
        var aa = a.print || console.log.bind(console), D = a.printErr || console.warn.bind(console);
        Object.assign(a, p);
        p = null;
        a.thisProgram && (t = a.thisProgram);
        var E;
        a.wasmBinary && (E = a.wasmBinary);
        a.noExitRuntime || true;
        "object" != typeof WebAssembly && F("no native wasm support detected");
        var G, H = false, I, J, K, L;
        function M() {
          var b = G.buffer;
          a.HEAP8 = I = new Int8Array(b);
          a.HEAP16 = new Int16Array(b);
          a.HEAP32 = K = new Int32Array(b);
          a.HEAPU8 = J = new Uint8Array(b);
          a.HEAPU16 = new Uint16Array(b);
          a.HEAPU32 = L = new Uint32Array(b);
          a.HEAPF32 = new Float32Array(b);
          a.HEAPF64 = new Float64Array(b);
        }
        var ba = [], ca = [], da = [];
        function ea() {
          var b = a.preRun.shift();
          ba.unshift(b);
        }
        var N = 0, P = null;
        function F(b) {
          if (a.onAbort)
            a.onAbort(b);
          b = "Aborted(" + b + ")";
          D(b);
          H = true;
          b = new WebAssembly.RuntimeError(b + ". Build with -sASSERTIONS for more info.");
          n(b);
          throw b;
        }
        var Q = "data:application/octet-stream;base64,", R;
        R = "data:application/octet-stream;base64, ";
        if (!R.startsWith(Q)) {
          var fa = R;
          R = a.locateFile ? a.locateFile(fa, x) : x + fa;
        }
        function ha(b) {
          try {
            if (b == R && E)
              return new Uint8Array(E);
            var c = C(b);
            if (c)
              return c;
            if (A)
              return A(b);
            throw "both async and sync fetching of the wasm failed";
          } catch (d) {
            F(d);
          }
        }
        function ia(b) {
          if (!E && (u || v)) {
            if ("function" == typeof fetch && !b.startsWith("file://"))
              return fetch(b, { credentials: "same-origin" }).then(function(c) {
                if (!c.ok)
                  throw "failed to load wasm binary file at '" + b + "'";
                return c.arrayBuffer();
              }).catch(function() {
                return ha(b);
              });
            if (z2)
              return new Promise(function(c, d) {
                z2(b, function(e) {
                  c(new Uint8Array(e));
                }, d);
              });
          }
          return Promise.resolve().then(function() {
            return ha(b);
          });
        }
        function ja(b, c, d) {
          return ia(b).then(function(e) {
            return WebAssembly.instantiate(e, c);
          }).then(function(e) {
            return e;
          }).then(d, function(e) {
            D("failed to asynchronously prepare wasm: " + e);
            F(e);
          });
        }
        function ka(b, c) {
          var d = R;
          return E || "function" != typeof WebAssembly.instantiateStreaming || d.startsWith(Q) || d.startsWith("file://") || w || "function" != typeof fetch ? ja(d, b, c) : fetch(d, { credentials: "same-origin" }).then(function(e) {
            return WebAssembly.instantiateStreaming(e, b).then(c, function(f) {
              D("wasm streaming compile failed: " + f);
              D("falling back to ArrayBuffer instantiation");
              return ja(d, b, c);
            });
          });
        }
        function S(b) {
          for (; 0 < b.length; )
            b.shift()(a);
        }
        var la = "undefined" != typeof TextDecoder ? new TextDecoder("utf8") : void 0;
        function na(b, c, d) {
          var e = c + d;
          for (d = c; b[d] && !(d >= e); )
            ++d;
          if (16 < d - c && b.buffer && la)
            return la.decode(b.subarray(c, d));
          for (e = ""; c < d; ) {
            var f = b[c++];
            if (f & 128) {
              var g = b[c++] & 63;
              if (192 == (f & 224))
                e += String.fromCharCode((f & 31) << 6 | g);
              else {
                var h = b[c++] & 63;
                f = 224 == (f & 240) ? (f & 15) << 12 | g << 6 | h : (f & 7) << 18 | g << 12 | h << 6 | b[c++] & 63;
                65536 > f ? e += String.fromCharCode(f) : (f -= 65536, e += String.fromCharCode(55296 | f >> 10, 56320 | f & 1023));
              }
            } else
              e += String.fromCharCode(f);
          }
          return e;
        }
        function T(b, c) {
          return b ? na(J, b, c) : "";
        }
        var oa = [0, 31, 60, 91, 121, 152, 182, 213, 244, 274, 305, 335], pa = [0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334];
        function U(b) {
          for (var c = 0, d = 0; d < b.length; ++d) {
            var e = b.charCodeAt(d);
            127 >= e ? c++ : 2047 >= e ? c += 2 : 55296 <= e && 57343 >= e ? (c += 4, ++d) : c += 3;
          }
          return c;
        }
        function V(b, c, d) {
          var e = J;
          if (!(0 < d))
            return 0;
          var f = c;
          d = c + d - 1;
          for (var g = 0; g < b.length; ++g) {
            var h = b.charCodeAt(g);
            if (55296 <= h && 57343 >= h) {
              var k = b.charCodeAt(++g);
              h = 65536 + ((h & 1023) << 10) | k & 1023;
            }
            if (127 >= h) {
              if (c >= d)
                break;
              e[c++] = h;
            } else {
              if (2047 >= h) {
                if (c + 1 >= d)
                  break;
                e[c++] = 192 | h >> 6;
              } else {
                if (65535 >= h) {
                  if (c + 2 >= d)
                    break;
                  e[c++] = 224 | h >> 12;
                } else {
                  if (c + 3 >= d)
                    break;
                  e[c++] = 240 | h >> 18;
                  e[c++] = 128 | h >> 12 & 63;
                }
                e[c++] = 128 | h >> 6 & 63;
              }
              e[c++] = 128 | h & 63;
            }
          }
          e[c] = 0;
          return c - f;
        }
        function qa(b) {
          var c = U(b) + 1, d = ra(c);
          d && V(b, d, c);
          return d;
        }
        var W = {};
        function sa() {
          if (!X) {
            var b = { USER: "web_user", LOGNAME: "web_user", PATH: "/", PWD: "/", HOME: "/home/web_user", LANG: ("object" == typeof navigator && navigator.languages && navigator.languages[0] || "C").replace("-", "_") + ".UTF-8", _: t || "./this.program" }, c;
            for (c in W)
              void 0 === W[c] ? delete b[c] : b[c] = W[c];
            var d = [];
            for (c in b)
              d.push(c + "=" + b[c]);
            X = d;
          }
          return X;
        }
        var X, ta = [null, [], []];
        function ua(b, c, d, e) {
          var f = { string: (l) => {
            var q = 0;
            if (null !== l && void 0 !== l && 0 !== l) {
              q = U(l) + 1;
              var ma = Y(q);
              V(l, ma, q);
              q = ma;
            }
            return q;
          }, array: (l) => {
            var q = Y(l.length);
            I.set(l, q);
            return q;
          } };
          b = a["_" + b];
          var g = [], h = 0;
          if (e)
            for (var k = 0; k < e.length; k++) {
              var r = f[d[k]];
              r ? (0 === h && (h = va()), g[k] = r(e[k])) : g[k] = e[k];
            }
          d = b.apply(null, g);
          return d = function(l) {
            0 !== h && wa(h);
            return "string" === c ? T(l) : "boolean" === c ? !!l : l;
          }(d);
        }
        var xa = "function" == typeof atob ? atob : function(b) {
          var c = "", d = 0;
          b = b.replace(/[^A-Za-z0-9\+\/=]/g, "");
          do {
            var e = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(b.charAt(d++));
            var f = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(b.charAt(d++));
            var g = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(b.charAt(d++));
            var h = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(b.charAt(d++));
            e = e << 2 | f >> 4;
            f = (f & 15) << 4 | g >> 2;
            var k = (g & 3) << 6 | h;
            c += String.fromCharCode(e);
            64 !== g && (c += String.fromCharCode(f));
            64 !== h && (c += String.fromCharCode(k));
          } while (d < b.length);
          return c;
        };
        function C(b) {
          if (b.startsWith(Q)) {
            b = b.slice(Q.length);
            if ("boolean" == typeof w && w) {
              var c = Buffer.from(b, "base64");
              c = new Uint8Array(c.buffer, c.byteOffset, c.byteLength);
            } else
              try {
                var d = xa(b), e = new Uint8Array(d.length);
                for (b = 0; b < d.length; ++b)
                  e[b] = d.charCodeAt(b);
                c = e;
              } catch (f) {
                throw Error("Converting base64 string to bytes failed.");
              }
            return c;
          }
        }
        var ya = {
          a: function(b, c, d, e) {
            F("Assertion failed: " + T(b) + ", at: " + [c ? T(c) : "unknown filename", d, e ? T(e) : "unknown function"]);
          },
          l: function(b, c) {
            b = new Date(1e3 * (L[b >> 2] + 4294967296 * K[b + 4 >> 2]));
            K[c >> 2] = b.getSeconds();
            K[c + 4 >> 2] = b.getMinutes();
            K[c + 8 >> 2] = b.getHours();
            K[c + 12 >> 2] = b.getDate();
            K[c + 16 >> 2] = b.getMonth();
            K[c + 20 >> 2] = b.getFullYear() - 1900;
            K[c + 24 >> 2] = b.getDay();
            var d = b.getFullYear();
            K[c + 28 >> 2] = (0 !== d % 4 || 0 === d % 100 && 0 !== d % 400 ? pa : oa)[b.getMonth()] + b.getDate() - 1 | 0;
            K[c + 36 >> 2] = -(60 * b.getTimezoneOffset());
            d = new Date(b.getFullYear(), 6, 1).getTimezoneOffset();
            var e = new Date(b.getFullYear(), 0, 1).getTimezoneOffset();
            K[c + 32 >> 2] = (d != e && b.getTimezoneOffset() == Math.min(e, d)) | 0;
          },
          k: function(b, c, d) {
            function e(r) {
              return (r = r.toTimeString().match(/\(([A-Za-z ]+)\)$/)) ? r[1] : "GMT";
            }
            var f = (/* @__PURE__ */ new Date()).getFullYear(), g = new Date(f, 0, 1), h = new Date(f, 6, 1);
            f = g.getTimezoneOffset();
            var k = h.getTimezoneOffset();
            L[b >> 2] = 60 * Math.max(f, k);
            K[c >> 2] = Number(f != k);
            b = e(g);
            c = e(h);
            b = qa(b);
            c = qa(c);
            k < f ? (L[d >> 2] = b, L[d + 4 >> 2] = c) : (L[d >> 2] = c, L[d + 4 >> 2] = b);
          },
          b: function() {
            F("");
          },
          m: function() {
            return Date.now();
          },
          j: function(b) {
            var c = J.length;
            b >>>= 0;
            if (2147483648 < b)
              return false;
            for (var d = 1; 4 >= d; d *= 2) {
              var e = c * (1 + 0.2 / d);
              e = Math.min(e, b + 100663296);
              var f = Math, g = f.min;
              e = Math.max(b, e);
              e += (65536 - e % 65536) % 65536;
              a: {
                var h = G.buffer;
                try {
                  G.grow(g.call(f, 2147483648, e) - h.byteLength + 65535 >>> 16);
                  M();
                  var k = 1;
                  break a;
                } catch (r) {
                }
                k = void 0;
              }
              if (k)
                return true;
            }
            return false;
          },
          e: function(b, c) {
            var d = 0;
            sa().forEach(function(e, f) {
              var g = c + d;
              f = L[b + 4 * f >> 2] = g;
              for (g = 0; g < e.length; ++g)
                I[f++ >> 0] = e.charCodeAt(g);
              I[f >> 0] = 0;
              d += e.length + 1;
            });
            return 0;
          },
          f: function(b, c) {
            var d = sa();
            L[b >> 2] = d.length;
            var e = 0;
            d.forEach(function(f) {
              e += f.length + 1;
            });
            L[c >> 2] = e;
            return 0;
          },
          d: function() {
            return 52;
          },
          i: function() {
            return 70;
          },
          c: function(b, c, d, e) {
            for (var f = 0, g = 0; g < d; g++) {
              var h = L[c >> 2], k = L[c + 4 >> 2];
              c += 8;
              for (var r = 0; r < k; r++) {
                var l = J[h + r], q = ta[b];
                0 === l || 10 === l ? ((1 === b ? aa : D)(na(q, 0)), q.length = 0) : q.push(l);
              }
              f += k;
            }
            L[e >> 2] = f;
            return 0;
          },
          o: function(b, c, d, e, f) {
            return a.callbacks.callFunction(void 0, b, c, d, e, f);
          },
          n: function(b) {
            return a.callbacks.shouldInterrupt(void 0, b);
          },
          h: function(b, c, d) {
            d = T(d);
            return a.callbacks.loadModuleSource(void 0, b, c, d);
          },
          g: function(b, c, d, e) {
            d = T(d);
            e = T(e);
            return a.callbacks.normalizeModule(void 0, b, c, d, e);
          }
        };
        (function() {
          function b(d) {
            d = d.exports;
            a.asm = d;
            G = a.asm.p;
            M();
            ca.unshift(a.asm.q);
            N--;
            a.monitorRunDependencies && a.monitorRunDependencies(N);
            if (0 == N && P) {
              var e = P;
              P = null;
              e();
            }
            return d;
          }
          var c = { a: ya };
          N++;
          a.monitorRunDependencies && a.monitorRunDependencies(N);
          if (a.instantiateWasm)
            try {
              return a.instantiateWasm(c, b);
            } catch (d) {
              D("Module.instantiateWasm callback failed with error: " + d), n(d);
            }
          ka(c, function(d) {
            b(d.instance);
          }).catch(n);
          return {};
        })();
        var ra = a._malloc = function() {
          return (ra = a._malloc = a.asm.r).apply(null, arguments);
        };
        a._QTS_Throw = function() {
          return (a._QTS_Throw = a.asm.s).apply(null, arguments);
        };
        a._QTS_NewError = function() {
          return (a._QTS_NewError = a.asm.t).apply(null, arguments);
        };
        a._QTS_RuntimeSetMemoryLimit = function() {
          return (a._QTS_RuntimeSetMemoryLimit = a.asm.u).apply(null, arguments);
        };
        a._QTS_RuntimeComputeMemoryUsage = function() {
          return (a._QTS_RuntimeComputeMemoryUsage = a.asm.v).apply(null, arguments);
        };
        a._QTS_RuntimeDumpMemoryUsage = function() {
          return (a._QTS_RuntimeDumpMemoryUsage = a.asm.w).apply(null, arguments);
        };
        a._QTS_RecoverableLeakCheck = function() {
          return (a._QTS_RecoverableLeakCheck = a.asm.x).apply(null, arguments);
        };
        a._QTS_BuildIsSanitizeLeak = function() {
          return (a._QTS_BuildIsSanitizeLeak = a.asm.y).apply(null, arguments);
        };
        a._QTS_RuntimeSetMaxStackSize = function() {
          return (a._QTS_RuntimeSetMaxStackSize = a.asm.z).apply(null, arguments);
        };
        a._QTS_GetUndefined = function() {
          return (a._QTS_GetUndefined = a.asm.A).apply(null, arguments);
        };
        a._QTS_GetNull = function() {
          return (a._QTS_GetNull = a.asm.B).apply(null, arguments);
        };
        a._QTS_GetFalse = function() {
          return (a._QTS_GetFalse = a.asm.C).apply(null, arguments);
        };
        a._QTS_GetTrue = function() {
          return (a._QTS_GetTrue = a.asm.D).apply(null, arguments);
        };
        a._QTS_NewRuntime = function() {
          return (a._QTS_NewRuntime = a.asm.E).apply(null, arguments);
        };
        a._QTS_FreeRuntime = function() {
          return (a._QTS_FreeRuntime = a.asm.F).apply(null, arguments);
        };
        a._QTS_NewContext = function() {
          return (a._QTS_NewContext = a.asm.G).apply(null, arguments);
        };
        a._QTS_FreeContext = function() {
          return (a._QTS_FreeContext = a.asm.H).apply(null, arguments);
        };
        a._QTS_FreeValuePointer = function() {
          return (a._QTS_FreeValuePointer = a.asm.I).apply(null, arguments);
        };
        a._free = function() {
          return (a._free = a.asm.J).apply(null, arguments);
        };
        a._QTS_FreeValuePointerRuntime = function() {
          return (a._QTS_FreeValuePointerRuntime = a.asm.K).apply(null, arguments);
        };
        a._QTS_FreeVoidPointer = function() {
          return (a._QTS_FreeVoidPointer = a.asm.L).apply(null, arguments);
        };
        a._QTS_FreeCString = function() {
          return (a._QTS_FreeCString = a.asm.M).apply(null, arguments);
        };
        a._QTS_DupValuePointer = function() {
          return (a._QTS_DupValuePointer = a.asm.N).apply(null, arguments);
        };
        a._QTS_NewObject = function() {
          return (a._QTS_NewObject = a.asm.O).apply(null, arguments);
        };
        a._QTS_NewObjectProto = function() {
          return (a._QTS_NewObjectProto = a.asm.P).apply(null, arguments);
        };
        a._QTS_NewArray = function() {
          return (a._QTS_NewArray = a.asm.Q).apply(null, arguments);
        };
        a._QTS_NewFloat64 = function() {
          return (a._QTS_NewFloat64 = a.asm.R).apply(null, arguments);
        };
        a._QTS_GetFloat64 = function() {
          return (a._QTS_GetFloat64 = a.asm.S).apply(null, arguments);
        };
        a._QTS_NewString = function() {
          return (a._QTS_NewString = a.asm.T).apply(null, arguments);
        };
        a._QTS_GetString = function() {
          return (a._QTS_GetString = a.asm.U).apply(null, arguments);
        };
        a._QTS_NewSymbol = function() {
          return (a._QTS_NewSymbol = a.asm.V).apply(null, arguments);
        };
        a._QTS_GetSymbolDescriptionOrKey = function() {
          return (a._QTS_GetSymbolDescriptionOrKey = a.asm.W).apply(null, arguments);
        };
        a._QTS_IsGlobalSymbol = function() {
          return (a._QTS_IsGlobalSymbol = a.asm.X).apply(null, arguments);
        };
        a._QTS_IsJobPending = function() {
          return (a._QTS_IsJobPending = a.asm.Y).apply(null, arguments);
        };
        a._QTS_ExecutePendingJob = function() {
          return (a._QTS_ExecutePendingJob = a.asm.Z).apply(null, arguments);
        };
        a._QTS_GetProp = function() {
          return (a._QTS_GetProp = a.asm._).apply(null, arguments);
        };
        a._QTS_SetProp = function() {
          return (a._QTS_SetProp = a.asm.$).apply(null, arguments);
        };
        a._QTS_DefineProp = function() {
          return (a._QTS_DefineProp = a.asm.aa).apply(null, arguments);
        };
        a._QTS_Call = function() {
          return (a._QTS_Call = a.asm.ba).apply(null, arguments);
        };
        a._QTS_ResolveException = function() {
          return (a._QTS_ResolveException = a.asm.ca).apply(null, arguments);
        };
        a._QTS_Dump = function() {
          return (a._QTS_Dump = a.asm.da).apply(null, arguments);
        };
        a._QTS_Eval = function() {
          return (a._QTS_Eval = a.asm.ea).apply(null, arguments);
        };
        a._QTS_Typeof = function() {
          return (a._QTS_Typeof = a.asm.fa).apply(null, arguments);
        };
        a._QTS_GetGlobalObject = function() {
          return (a._QTS_GetGlobalObject = a.asm.ga).apply(null, arguments);
        };
        a._QTS_NewPromiseCapability = function() {
          return (a._QTS_NewPromiseCapability = a.asm.ha).apply(null, arguments);
        };
        a._QTS_TestStringArg = function() {
          return (a._QTS_TestStringArg = a.asm.ia).apply(null, arguments);
        };
        a._QTS_BuildIsDebug = function() {
          return (a._QTS_BuildIsDebug = a.asm.ja).apply(null, arguments);
        };
        a._QTS_BuildIsAsyncify = function() {
          return (a._QTS_BuildIsAsyncify = a.asm.ka).apply(null, arguments);
        };
        a._QTS_NewFunction = function() {
          return (a._QTS_NewFunction = a.asm.la).apply(null, arguments);
        };
        a._QTS_ArgvGetJSValueConstPointer = function() {
          return (a._QTS_ArgvGetJSValueConstPointer = a.asm.ma).apply(null, arguments);
        };
        a._QTS_RuntimeEnableInterruptHandler = function() {
          return (a._QTS_RuntimeEnableInterruptHandler = a.asm.na).apply(null, arguments);
        };
        a._QTS_RuntimeDisableInterruptHandler = function() {
          return (a._QTS_RuntimeDisableInterruptHandler = a.asm.oa).apply(null, arguments);
        };
        a._QTS_RuntimeEnableModuleLoader = function() {
          return (a._QTS_RuntimeEnableModuleLoader = a.asm.pa).apply(null, arguments);
        };
        a._QTS_RuntimeDisableModuleLoader = function() {
          return (a._QTS_RuntimeDisableModuleLoader = a.asm.qa).apply(null, arguments);
        };
        function va() {
          return (va = a.asm.sa).apply(null, arguments);
        }
        function wa() {
          return (wa = a.asm.ta).apply(null, arguments);
        }
        function Y() {
          return (Y = a.asm.ua).apply(null, arguments);
        }
        a.___start_em_js = 74916;
        a.___stop_em_js = 75818;
        a.cwrap = function(b, c, d, e) {
          var f = !d || d.every((g) => "number" === g || "boolean" === g);
          return "string" !== c && f && !e ? a["_" + b] : function() {
            return ua(b, c, d, arguments);
          };
        };
        a.UTF8ToString = T;
        a.stringToUTF8 = function(b, c, d) {
          return V(b, c, d);
        };
        a.lengthBytesUTF8 = U;
        var Z;
        P = function za() {
          Z || Aa();
          Z || (P = za);
        };
        function Aa() {
          function b() {
            if (!Z && (Z = true, a.calledRun = true, !H)) {
              S(ca);
              m(a);
              if (a.onRuntimeInitialized)
                a.onRuntimeInitialized();
              if (a.postRun)
                for ("function" == typeof a.postRun && (a.postRun = [a.postRun]); a.postRun.length; ) {
                  var c = a.postRun.shift();
                  da.unshift(c);
                }
              S(da);
            }
          }
          if (!(0 < N)) {
            if (a.preRun)
              for ("function" == typeof a.preRun && (a.preRun = [a.preRun]); a.preRun.length; )
                ea();
            S(ba);
            0 < N || (a.setStatus ? (a.setStatus("Running..."), setTimeout(function() {
              setTimeout(function() {
                a.setStatus("");
              }, 1);
              b();
            }, 1)) : b());
          }
        }
        if (a.preInit)
          for ("function" == typeof a.preInit && (a.preInit = [a.preInit]); 0 < a.preInit.length; )
            a.preInit.pop()();
        Aa();
        return QuickJSRaw2.ready;
      };
    })();
    module2.exports = QuickJSRaw;
  })(emscriptenModule_WASM_RELEASE_SYNC);
  return emscriptenModule_WASM_RELEASE_SYNC.exports;
}
function requireVariants() {
  if (hasRequiredVariants) return variants;
  hasRequiredVariants = 1;
  (function(exports$1) {
    var __createBinding5 = variants && variants.__createBinding || (Object.create ? function(o, m, k, k2) {
      if (k2 === void 0) k2 = k;
      var desc = Object.getOwnPropertyDescriptor(m, k);
      if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
        desc = { enumerable: true, get: function() {
          return m[k];
        } };
      }
      Object.defineProperty(o, k2, desc);
    } : function(o, m, k, k2) {
      if (k2 === void 0) k2 = k;
      o[k2] = m[k];
    });
    var __setModuleDefault5 = variants && variants.__setModuleDefault || (Object.create ? function(o, v) {
      Object.defineProperty(o, "default", { enumerable: true, value: v });
    } : function(o, v) {
      o["default"] = v;
    });
    var __importStar5 = variants && variants.__importStar || function(mod2) {
      if (mod2 && mod2.__esModule) return mod2;
      var result = {};
      if (mod2 != null) {
        for (var k in mod2) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod2, k)) __createBinding5(result, mod2, k);
      }
      __setModuleDefault5(result, mod2);
      return result;
    };
    Object.defineProperty(exports$1, "__esModule", { value: true });
    exports$1.RELEASE_ASYNC = exports$1.DEBUG_ASYNC = exports$1.RELEASE_SYNC = exports$1.DEBUG_SYNC = exports$1.memoizePromiseFactory = exports$1.newQuickJSAsyncWASMModule = exports$1.newQuickJSWASMModule = void 0;
    const esmHelpers_1 = /* @__PURE__ */ requireEsmHelpers();
    async function newQuickJSWASMModule(variant = exports$1.RELEASE_SYNC) {
      const [wasmModuleLoader, QuickJSFFI, { QuickJSWASMModule }] = await Promise.all([
        variant.importModuleLoader(),
        variant.importFFI(),
        Promise.resolve().then(() => __importStar5(/* @__PURE__ */ requireModule())).then(esmHelpers_1.unwrapTypescript)
      ]);
      const wasmModule = await wasmModuleLoader();
      wasmModule.type = "sync";
      const ffi = new QuickJSFFI(wasmModule);
      return new QuickJSWASMModule(wasmModule, ffi);
    }
    exports$1.newQuickJSWASMModule = newQuickJSWASMModule;
    async function newQuickJSAsyncWASMModule(variant = exports$1.RELEASE_ASYNC) {
      const [wasmModuleLoader, QuickJSAsyncFFI, { QuickJSAsyncWASMModule }] = await Promise.all([
        variant.importModuleLoader(),
        variant.importFFI(),
        Promise.resolve().then(() => __importStar5(/* @__PURE__ */ requireModuleAsyncify())).then(esmHelpers_1.unwrapTypescript)
      ]);
      const wasmModule = await wasmModuleLoader();
      wasmModule.type = "async";
      const ffi = new QuickJSAsyncFFI(wasmModule);
      return new QuickJSAsyncWASMModule(wasmModule, ffi);
    }
    exports$1.newQuickJSAsyncWASMModule = newQuickJSAsyncWASMModule;
    function memoizePromiseFactory(fn) {
      let promise;
      return () => {
        return promise ?? (promise = fn());
      };
    }
    exports$1.memoizePromiseFactory = memoizePromiseFactory;
    exports$1.DEBUG_SYNC = {
      type: "sync",
      async importFFI() {
        throw new Error("not implemented");
      },
      async importModuleLoader() {
        throw new Error("not implemented");
      }
    };
    exports$1.RELEASE_SYNC = {
      type: "sync",
      async importFFI() {
        const mod2 = await Promise.resolve().then(() => __importStar5(/* @__PURE__ */ requireFfi_WASM_RELEASE_SYNC()));
        return (0, esmHelpers_1.unwrapTypescript)(mod2).QuickJSFFI;
      },
      async importModuleLoader() {
        const mod2 = await Promise.resolve().then(() => __importStar5(/* @__PURE__ */ requireEmscriptenModule_WASM_RELEASE_SYNC()));
        return (0, esmHelpers_1.unwrapJavascript)(mod2);
      }
    };
    exports$1.DEBUG_ASYNC = {
      type: "async",
      async importFFI() {
        throw new Error("not implemented");
      },
      async importModuleLoader() {
        throw new Error("not implemented");
      }
    };
    exports$1.RELEASE_ASYNC = {
      type: "async",
      async importFFI() {
        throw new Error("not implemented");
      },
      async importModuleLoader() {
        throw new Error("not implemented");
      }
    };
  })(variants);
  return variants;
}
function requireVmInterface() {
  if (hasRequiredVmInterface) return vmInterface;
  hasRequiredVmInterface = 1;
  Object.defineProperty(vmInterface, "__esModule", { value: true });
  vmInterface.isFail = vmInterface.isSuccess = void 0;
  function isSuccess(successOrFail) {
    return "error" in successOrFail === false;
  }
  vmInterface.isSuccess = isSuccess;
  function isFail(successOrFail) {
    return "error" in successOrFail === true;
  }
  vmInterface.isFail = isFail;
  return vmInterface;
}
function requireModuleTest() {
  if (hasRequiredModuleTest) return moduleTest;
  hasRequiredModuleTest = 1;
  Object.defineProperty(moduleTest, "__esModule", { value: true });
  moduleTest.TestQuickJSWASMModule = void 0;
  const errors_1 = /* @__PURE__ */ requireErrors();
  const lifetime_1 = /* @__PURE__ */ requireLifetime();
  class TestQuickJSWASMModule {
    constructor(parent) {
      this.parent = parent;
      this.contexts = /* @__PURE__ */ new Set();
      this.runtimes = /* @__PURE__ */ new Set();
    }
    newRuntime(options2) {
      const runtime2 = this.parent.newRuntime({
        ...options2,
        ownedLifetimes: [
          new lifetime_1.Lifetime(void 0, void 0, () => this.runtimes.delete(runtime2)),
          ...options2?.ownedLifetimes ?? []
        ]
      });
      this.runtimes.add(runtime2);
      return runtime2;
    }
    newContext(options2) {
      const context2 = this.parent.newContext({
        ...options2,
        ownedLifetimes: [
          new lifetime_1.Lifetime(void 0, void 0, () => this.contexts.delete(context2)),
          ...options2?.ownedLifetimes ?? []
        ]
      });
      this.contexts.add(context2);
      return context2;
    }
    evalCode(code2, options2) {
      return this.parent.evalCode(code2, options2);
    }
    disposeAll() {
      const allDisposables = [...this.contexts, ...this.runtimes];
      this.runtimes.clear();
      this.contexts.clear();
      allDisposables.forEach((d) => {
        if (d.alive) {
          d.dispose();
        }
      });
    }
    assertNoMemoryAllocated() {
      const leaksDetected = this.getFFI().QTS_RecoverableLeakCheck();
      if (leaksDetected) {
        throw new errors_1.QuickJSMemoryLeakDetected("Leak sanitizer detected un-freed memory");
      }
      if (this.contexts.size > 0) {
        throw new errors_1.QuickJSMemoryLeakDetected(`${this.contexts.size} contexts leaked`);
      }
      if (this.runtimes.size > 0) {
        throw new errors_1.QuickJSMemoryLeakDetected(`${this.runtimes.size} runtimes leaked`);
      }
    }
    getFFI() {
      return this.parent.getFFI();
    }
  }
  moduleTest.TestQuickJSWASMModule = TestQuickJSWASMModule;
  return moduleTest;
}
function requireDist$2() {
  if (hasRequiredDist$2) return dist;
  hasRequiredDist$2 = 1;
  (function(exports$1) {
    var __createBinding5 = dist && dist.__createBinding || (Object.create ? function(o, m, k, k2) {
      if (k2 === void 0) k2 = k;
      var desc = Object.getOwnPropertyDescriptor(m, k);
      if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
        desc = { enumerable: true, get: function() {
          return m[k];
        } };
      }
      Object.defineProperty(o, k2, desc);
    } : function(o, m, k, k2) {
      if (k2 === void 0) k2 = k;
      o[k2] = m[k];
    });
    var __setModuleDefault5 = dist && dist.__setModuleDefault || (Object.create ? function(o, v) {
      Object.defineProperty(o, "default", { enumerable: true, value: v });
    } : function(o, v) {
      o["default"] = v;
    });
    var __exportStar5 = dist && dist.__exportStar || function(m, exports$12) {
      for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports$12, p)) __createBinding5(exports$12, m, p);
    };
    var __importStar5 = dist && dist.__importStar || function(mod2) {
      if (mod2 && mod2.__esModule) return mod2;
      var result = {};
      if (mod2 != null) {
        for (var k in mod2) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod2, k)) __createBinding5(result, mod2, k);
      }
      __setModuleDefault5(result, mod2);
      return result;
    };
    Object.defineProperty(exports$1, "__esModule", { value: true });
    exports$1.shouldInterruptAfterDeadline = exports$1.newAsyncContext = exports$1.newAsyncRuntime = exports$1.getQuickJSSync = exports$1.getQuickJS = exports$1.errors = exports$1.RELEASE_SYNC = exports$1.RELEASE_ASYNC = exports$1.DEBUG_SYNC = exports$1.DEBUG_ASYNC = exports$1.newQuickJSAsyncWASMModule = exports$1.newQuickJSWASMModule = void 0;
    const variants_1 = /* @__PURE__ */ requireVariants();
    Object.defineProperty(exports$1, "newQuickJSWASMModule", { enumerable: true, get: function() {
      return variants_1.newQuickJSWASMModule;
    } });
    Object.defineProperty(exports$1, "newQuickJSAsyncWASMModule", { enumerable: true, get: function() {
      return variants_1.newQuickJSAsyncWASMModule;
    } });
    Object.defineProperty(exports$1, "DEBUG_ASYNC", { enumerable: true, get: function() {
      return variants_1.DEBUG_ASYNC;
    } });
    Object.defineProperty(exports$1, "DEBUG_SYNC", { enumerable: true, get: function() {
      return variants_1.DEBUG_SYNC;
    } });
    Object.defineProperty(exports$1, "RELEASE_ASYNC", { enumerable: true, get: function() {
      return variants_1.RELEASE_ASYNC;
    } });
    Object.defineProperty(exports$1, "RELEASE_SYNC", { enumerable: true, get: function() {
      return variants_1.RELEASE_SYNC;
    } });
    __exportStar5(/* @__PURE__ */ requireVmInterface(), exports$1);
    __exportStar5(/* @__PURE__ */ requireLifetime(), exports$1);
    exports$1.errors = __importStar5(/* @__PURE__ */ requireErrors());
    __exportStar5(/* @__PURE__ */ requireDeferredPromise(), exports$1);
    __exportStar5(/* @__PURE__ */ requireModuleTest(), exports$1);
    let singleton = void 0;
    let singletonPromise = void 0;
    async function getQuickJS() {
      singletonPromise ?? (singletonPromise = (0, variants_1.newQuickJSWASMModule)().then((instance2) => {
        singleton = instance2;
        return instance2;
      }));
      return await singletonPromise;
    }
    exports$1.getQuickJS = getQuickJS;
    function getQuickJSSync() {
      if (!singleton) {
        throw new Error("QuickJS not initialized. Await getQuickJS() at least once.");
      }
      return singleton;
    }
    exports$1.getQuickJSSync = getQuickJSSync;
    async function newAsyncRuntime(options2) {
      const module2 = await (0, variants_1.newQuickJSAsyncWASMModule)();
      return module2.newRuntime(options2);
    }
    exports$1.newAsyncRuntime = newAsyncRuntime;
    async function newAsyncContext(options2) {
      const module2 = await (0, variants_1.newQuickJSAsyncWASMModule)();
      return module2.newContext(options2);
    }
    exports$1.newAsyncContext = newAsyncContext;
    function shouldInterruptAfterDeadline(deadline) {
      const deadlineAsNumber = typeof deadline === "number" ? deadline : deadline.getTime();
      return function() {
        return Date.now() > deadlineAsNumber;
      };
    }
    exports$1.shouldInterruptAfterDeadline = shouldInterruptAfterDeadline;
  })(dist);
  return dist;
}
function requireDist$1() {
  if (hasRequiredDist$1) return dist$6;
  hasRequiredDist$1 = 1;
  var __createBinding5 = dist$6 && dist$6.__createBinding || (Object.create ? function(o, m, k, k2) {
    if (k2 === void 0) k2 = k;
    var desc = Object.getOwnPropertyDescriptor(m, k);
    if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
      desc = { enumerable: true, get: function() {
        return m[k];
      } };
    }
    Object.defineProperty(o, k2, desc);
  } : function(o, m, k, k2) {
    if (k2 === void 0) k2 = k;
    o[k2] = m[k];
  });
  var __setModuleDefault5 = dist$6 && dist$6.__setModuleDefault || (Object.create ? function(o, v) {
    Object.defineProperty(o, "default", { enumerable: true, value: v });
  } : function(o, v) {
    o["default"] = v;
  });
  var __importStar5 = dist$6 && dist$6.__importStar || function(mod2) {
    if (mod2 && mod2.__esModule) return mod2;
    var result = {};
    if (mod2 != null) {
      for (var k in mod2) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod2, k)) __createBinding5(result, mod2, k);
    }
    __setModuleDefault5(result, mod2);
    return result;
  };
  var __importDefault5 = dist$6 && dist$6.__importDefault || function(mod2) {
    return mod2 && mod2.__esModule ? mod2 : { "default": mod2 };
  };
  Object.defineProperty(dist$6, "__esModule", { value: true });
  dist$6.PacProxyAgent = void 0;
  const net = __importStar5(require$$0$7);
  const tls = __importStar5(require$$1$2);
  const crypto = __importStar5(require$$2$1);
  const events_1 = require$$0$8;
  const debug_12 = __importDefault5(requireSrc());
  const url_1 = require$$5;
  const agent_base_1 = requireDist$b();
  const get_uri_1 = requireDist$5();
  const pac_resolver_1 = requireDist$3();
  const quickjs_emscripten_1 = /* @__PURE__ */ requireDist$2();
  const debug2 = (0, debug_12.default)("pac-proxy-agent");
  const setServernameFromNonIpHost = (options2) => {
    if (options2.servername === void 0 && options2.host && !net.isIP(options2.host)) {
      return {
        ...options2,
        servername: options2.host
      };
    }
    return options2;
  };
  class PacProxyAgent extends agent_base_1.Agent {
    constructor(uri2, opts) {
      super(opts);
      this.clearResolverPromise = () => {
        this.resolverPromise = void 0;
      };
      const uriStr = typeof uri2 === "string" ? uri2 : uri2.href;
      this.uri = new url_1.URL(uriStr.replace(/^pac\+/i, ""));
      debug2("Creating PacProxyAgent with URI %o", this.uri.href);
      this.opts = { ...opts };
      this.cache = void 0;
      this.resolver = void 0;
      this.resolverHash = "";
      this.resolverPromise = void 0;
      if (!this.opts.filename) {
        this.opts.filename = this.uri.href;
      }
    }
    getResolver() {
      if (!this.resolverPromise) {
        this.resolverPromise = this.loadResolver();
        this.resolverPromise.then(this.clearResolverPromise, this.clearResolverPromise);
      }
      return this.resolverPromise;
    }
    async loadResolver() {
      try {
        const [qjs, code2] = await Promise.all([
          (0, quickjs_emscripten_1.getQuickJS)(),
          this.loadPacFile()
        ]);
        const hash = crypto.createHash("sha1").update(code2).digest("hex");
        if (this.resolver && this.resolverHash === hash) {
          debug2("Same sha1 hash for code - contents have not changed, reusing previous proxy resolver");
          return this.resolver;
        }
        debug2("Creating new proxy resolver instance");
        this.resolver = (0, pac_resolver_1.createPacResolver)(qjs, code2, this.opts);
        this.resolverHash = hash;
        return this.resolver;
      } catch (err) {
        if (this.resolver && err.code === "ENOTMODIFIED") {
          debug2("Got ENOTMODIFIED response, reusing previous proxy resolver");
          return this.resolver;
        }
        throw err;
      }
    }
    async loadPacFile() {
      debug2("Loading PAC file: %o", this.uri);
      const rs = await (0, get_uri_1.getUri)(this.uri, { ...this.opts, cache: this.cache });
      debug2("Got `Readable` instance for URI");
      this.cache = rs;
      const buf = await (0, agent_base_1.toBuffer)(rs);
      debug2("Read %o byte PAC file from URI", buf.length);
      return buf.toString("utf8");
    }
    async connect(req, opts) {
      const { secureEndpoint } = opts;
      const isWebSocket = req.getHeader("upgrade") === "websocket";
      const resolver = await this.getResolver();
      const protocol2 = secureEndpoint ? "https:" : "http:";
      const host = opts.host && net.isIPv6(opts.host) ? `[${opts.host}]` : opts.host;
      const url = Object.assign(new url_1.URL(req.path, `${protocol2}//${host}`), void 0);
      debug2("url: %s", url);
      let result = await resolver(url);
      if (!result) {
        result = "DIRECT";
      }
      const proxies = String(result).trim().split(/\s*;\s*/g).filter(Boolean);
      if (this.opts.fallbackToDirect && !proxies.includes("DIRECT")) {
        proxies.push("DIRECT");
      }
      for (const proxy of proxies) {
        let agent = null;
        let socket = null;
        const [type2, target] = proxy.split(/\s+/);
        debug2("Attempting to use proxy: %o", proxy);
        if (type2 === "DIRECT") {
          if (secureEndpoint) {
            socket = tls.connect(setServernameFromNonIpHost(opts));
          } else {
            socket = net.connect(opts);
          }
        } else if (type2 === "SOCKS" || type2 === "SOCKS5") {
          const { SocksProxyAgent } = await Promise.resolve().then(() => __importStar5(requireDist$8()));
          agent = new SocksProxyAgent(`socks://${target}`, this.opts);
        } else if (type2 === "SOCKS4") {
          const { SocksProxyAgent } = await Promise.resolve().then(() => __importStar5(requireDist$8()));
          agent = new SocksProxyAgent(`socks4a://${target}`, this.opts);
        } else if (type2 === "PROXY" || type2 === "HTTP" || type2 === "HTTPS") {
          const proxyURL = `${type2 === "HTTPS" ? "https" : "http"}://${target}`;
          if (secureEndpoint || isWebSocket) {
            const { HttpsProxyAgent } = await Promise.resolve().then(() => __importStar5(requireDist$9()));
            agent = new HttpsProxyAgent(proxyURL, this.opts);
          } else {
            const { HttpProxyAgent } = await Promise.resolve().then(() => __importStar5(requireDist$a()));
            agent = new HttpProxyAgent(proxyURL, this.opts);
          }
        }
        try {
          if (socket) {
            await (0, events_1.once)(socket, "connect");
            req.emit("proxy", { proxy, socket });
            return socket;
          }
          if (agent) {
            const s = await agent.connect(req, opts);
            if (!(s instanceof net.Socket)) {
              throw new Error("Expected a `net.Socket` to be returned from agent");
            }
            req.emit("proxy", { proxy, socket: s });
            return s;
          }
          throw new Error(`Could not determine proxy type for: ${proxy}`);
        } catch (err) {
          debug2("Got error for proxy %o: %o", proxy, err);
          req.emit("proxy", { proxy, error: err });
        }
      }
      throw new Error(`Failed to establish a socket connection to proxies: ${JSON.stringify(proxies)}`);
    }
  }
  PacProxyAgent.protocols = [
    "pac+data",
    "pac+file",
    "pac+ftp",
    "pac+http",
    "pac+https"
  ];
  dist$6.PacProxyAgent = PacProxyAgent;
  return dist$6;
}
function requireDist() {
  if (hasRequiredDist) return dist$b;
  hasRequiredDist = 1;
  (function(exports$1) {
    var __createBinding5 = dist$b && dist$b.__createBinding || (Object.create ? function(o, m, k, k2) {
      if (k2 === void 0) k2 = k;
      var desc = Object.getOwnPropertyDescriptor(m, k);
      if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
        desc = { enumerable: true, get: function() {
          return m[k];
        } };
      }
      Object.defineProperty(o, k2, desc);
    } : function(o, m, k, k2) {
      if (k2 === void 0) k2 = k;
      o[k2] = m[k];
    });
    var __setModuleDefault5 = dist$b && dist$b.__setModuleDefault || (Object.create ? function(o, v) {
      Object.defineProperty(o, "default", { enumerable: true, value: v });
    } : function(o, v) {
      o["default"] = v;
    });
    var __importStar5 = dist$b && dist$b.__importStar || function(mod2) {
      if (mod2 && mod2.__esModule) return mod2;
      var result = {};
      if (mod2 != null) {
        for (var k in mod2) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod2, k)) __createBinding5(result, mod2, k);
      }
      __setModuleDefault5(result, mod2);
      return result;
    };
    var __importDefault5 = dist$b && dist$b.__importDefault || function(mod2) {
      return mod2 && mod2.__esModule ? mod2 : { "default": mod2 };
    };
    Object.defineProperty(exports$1, "__esModule", { value: true });
    exports$1.ProxyAgent = exports$1.proxies = void 0;
    const http2 = __importStar5(require$$0$6);
    const https2 = __importStar5(require$$1$1);
    const url_1 = require$$5;
    const lru_cache_1 = __importDefault5(/* @__PURE__ */ requireLruCache());
    const agent_base_1 = requireDist$b();
    const debug_12 = __importDefault5(requireSrc());
    const proxy_from_env_1 = requireProxyFromEnv();
    const debug2 = (0, debug_12.default)("proxy-agent");
    const wellKnownAgents = {
      http: async () => (await Promise.resolve().then(() => __importStar5(requireDist$a()))).HttpProxyAgent,
      https: async () => (await Promise.resolve().then(() => __importStar5(requireDist$9()))).HttpsProxyAgent,
      socks: async () => (await Promise.resolve().then(() => __importStar5(requireDist$8()))).SocksProxyAgent,
      pac: async () => (await Promise.resolve().then(() => __importStar5(requireDist$1()))).PacProxyAgent
    };
    exports$1.proxies = {
      http: [wellKnownAgents.http, wellKnownAgents.https],
      https: [wellKnownAgents.http, wellKnownAgents.https],
      socks: [wellKnownAgents.socks, wellKnownAgents.socks],
      socks4: [wellKnownAgents.socks, wellKnownAgents.socks],
      socks4a: [wellKnownAgents.socks, wellKnownAgents.socks],
      socks5: [wellKnownAgents.socks, wellKnownAgents.socks],
      socks5h: [wellKnownAgents.socks, wellKnownAgents.socks],
      "pac+data": [wellKnownAgents.pac, wellKnownAgents.pac],
      "pac+file": [wellKnownAgents.pac, wellKnownAgents.pac],
      "pac+ftp": [wellKnownAgents.pac, wellKnownAgents.pac],
      "pac+http": [wellKnownAgents.pac, wellKnownAgents.pac],
      "pac+https": [wellKnownAgents.pac, wellKnownAgents.pac]
    };
    function isValidProtocol(v) {
      return Object.keys(exports$1.proxies).includes(v);
    }
    class ProxyAgent extends agent_base_1.Agent {
      constructor(opts) {
        super(opts);
        this.cache = new lru_cache_1.default({
          max: 20,
          dispose: (agent) => agent.destroy()
        });
        debug2("Creating new ProxyAgent instance: %o", opts);
        this.connectOpts = opts;
        this.httpAgent = opts?.httpAgent || new http2.Agent(opts);
        this.httpsAgent = opts?.httpsAgent || new https2.Agent(opts);
        this.getProxyForUrl = opts?.getProxyForUrl || proxy_from_env_1.getProxyForUrl;
      }
      async connect(req, opts) {
        const { secureEndpoint } = opts;
        const isWebSocket = req.getHeader("upgrade") === "websocket";
        const protocol2 = secureEndpoint ? isWebSocket ? "wss:" : "https:" : isWebSocket ? "ws:" : "http:";
        const host = req.getHeader("host");
        const url = new url_1.URL(req.path, `${protocol2}//${host}`).href;
        const proxy = await this.getProxyForUrl(url, req);
        if (!proxy) {
          debug2("Proxy not enabled for URL: %o", url);
          return secureEndpoint ? this.httpsAgent : this.httpAgent;
        }
        debug2("Request URL: %o", url);
        debug2("Proxy URL: %o", proxy);
        const cacheKey = `${protocol2}+${proxy}`;
        let agent = this.cache.get(cacheKey);
        if (!agent) {
          const proxyUrl = new url_1.URL(proxy);
          const proxyProto = proxyUrl.protocol.replace(":", "");
          if (!isValidProtocol(proxyProto)) {
            throw new Error(`Unsupported protocol for proxy URL: ${proxy}`);
          }
          const ctor = await exports$1.proxies[proxyProto][secureEndpoint || isWebSocket ? 1 : 0]();
          agent = new ctor(proxy, this.connectOpts);
          this.cache.set(cacheKey, agent);
        } else {
          debug2("Cache hit for proxy URL: %o", proxy);
        }
        return agent;
      }
      destroy() {
        for (const agent of this.cache.values()) {
          agent.destroy();
        }
        super.destroy();
      }
    }
    exports$1.ProxyAgent = ProxyAgent;
  })(dist$b);
  return dist$b;
}
function httpRequest(url, method, response, keepAlive = true) {
  const options2 = {
    protocol: url.protocol,
    hostname: url.hostname,
    port: url.port,
    path: url.pathname + url.search,
    method,
    headers: keepAlive ? { Connection: "keep-alive" } : void 0,
    auth: urlToHttpOptions(url).auth,
    agent: new distExports.ProxyAgent()
  };
  const requestCallback = (res) => {
    if (res.statusCode && res.statusCode >= 300 && res.statusCode < 400 && res.headers.location) {
      httpRequest(new URL$1(res.headers.location), method, response);
      res.resume();
    } else {
      response(res);
    }
  };
  const request3 = options2.protocol === "https:" ? https$1.request(options2, requestCallback) : http$1.request(options2, requestCallback);
  request3.end();
  return request3;
}
async function getJSON(url) {
  const text = await getText(url);
  try {
    return JSON.parse(text);
  } catch {
    throw new Error("Could not parse JSON from " + url.toString());
  }
}
function getText(url) {
  return new Promise((resolve2, reject) => {
    const request3 = httpRequest(url, "GET", (response) => {
      let data32 = "";
      if (response.statusCode && response.statusCode >= 400) {
        return reject(new Error(`Got status code ${response.statusCode}`));
      }
      response.on("data", (chunk) => {
        data32 += chunk;
      });
      response.on("end", () => {
        try {
          return resolve2(String(data32));
        } catch {
          return reject(new Error(`Failed to read text response from ${url}`));
        }
      });
    }, false);
    request3.on("error", (err) => {
      reject(err);
    });
  });
}
function folder$3(platform) {
  switch (platform) {
    case BrowserPlatform.LINUX_ARM:
    case BrowserPlatform.LINUX:
      return "linux64";
    case BrowserPlatform.MAC_ARM:
      return "mac-arm64";
    case BrowserPlatform.MAC:
      return "mac-x64";
    case BrowserPlatform.WIN32:
      return "win32";
    case BrowserPlatform.WIN64:
      return "win64";
  }
}
function resolveDownloadUrl$4(platform, buildId, baseUrl = "https://storage.googleapis.com/chrome-for-testing-public") {
  return `${baseUrl}/${resolveDownloadPath$4(platform, buildId).join("/")}`;
}
function resolveDownloadPath$4(platform, buildId) {
  return [buildId, folder$3(platform), `chrome-${folder$3(platform)}.zip`];
}
function relativeExecutablePath$4(platform, _buildId) {
  switch (platform) {
    case BrowserPlatform.MAC:
    case BrowserPlatform.MAC_ARM:
      return path$1.join("chrome-" + folder$3(platform), "Google Chrome for Testing.app", "Contents", "MacOS", "Google Chrome for Testing");
    case BrowserPlatform.LINUX_ARM:
    case BrowserPlatform.LINUX:
      return path$1.join("chrome-linux64", "chrome");
    case BrowserPlatform.WIN32:
    case BrowserPlatform.WIN64:
      return path$1.join("chrome-" + folder$3(platform), "chrome.exe");
  }
}
async function getLastKnownGoodReleaseForChannel(channel) {
  const data32 = await getJSON(new URL(`${baseVersionUrl$1}/last-known-good-versions.json`));
  for (const channel2 of Object.keys(data32.channels)) {
    data32.channels[channel2.toLowerCase()] = data32.channels[channel2];
    delete data32.channels[channel2];
  }
  return data32.channels[channel];
}
async function getLastKnownGoodReleaseForMilestone(milestone) {
  const data32 = await getJSON(new URL(`${baseVersionUrl$1}/latest-versions-per-milestone.json`));
  return data32.milestones[milestone];
}
async function getLastKnownGoodReleaseForBuild(buildPrefix) {
  const data32 = await getJSON(new URL(`${baseVersionUrl$1}/latest-patch-versions-per-build.json`));
  return data32.builds[buildPrefix];
}
async function resolveBuildId$3(channel) {
  if (Object.values(ChromeReleaseChannel).includes(channel)) {
    return (await getLastKnownGoodReleaseForChannel(channel)).version;
  }
  if (channel.match(/^\d+$/)) {
    return (await getLastKnownGoodReleaseForMilestone(channel))?.version;
  }
  if (channel.match(/^\d+\.\d+\.\d+$/)) {
    return (await getLastKnownGoodReleaseForBuild(channel))?.version;
  }
  return;
}
function getChromeWindowsLocation(channel, locationsPrefixes) {
  if (locationsPrefixes.size === 0) {
    throw new Error("Non of the common Windows Env variables were set");
  }
  let suffix;
  switch (channel) {
    case ChromeReleaseChannel.STABLE:
      suffix = "Google\\Chrome\\Application\\chrome.exe";
      break;
    case ChromeReleaseChannel.BETA:
      suffix = "Google\\Chrome Beta\\Application\\chrome.exe";
      break;
    case ChromeReleaseChannel.CANARY:
      suffix = "Google\\Chrome SxS\\Application\\chrome.exe";
      break;
    case ChromeReleaseChannel.DEV:
      suffix = "Google\\Chrome Dev\\Application\\chrome.exe";
      break;
  }
  return [...locationsPrefixes.values()].map((l) => {
    return path$1.win32.join(l, suffix);
  });
}
function getWslVariable(variable) {
  try {
    const result = execSync(`cmd.exe /c echo %${variable.toLocaleUpperCase()}%`, {
      stdio: ["ignore", "pipe", "ignore"],
      encoding: "utf-8"
    }).trim();
    if (result) {
      return result;
    }
  } catch {
  }
  return;
}
function getWslLocation(channel) {
  const wslVersion = execSync("wslinfo --version", {
    stdio: ["ignore", "pipe", "ignore"],
    encoding: "utf-8"
  }).trim();
  if (!wslVersion) {
    throw new Error("Not in WSL or unsupported version of WSL.");
  }
  const wslPrefixes = /* @__PURE__ */ new Set();
  for (const name of WINDOWS_ENV_PARAM_NAMES) {
    const wslPrefix = getWslVariable(name);
    if (wslPrefix) {
      wslPrefixes.add(wslPrefix);
    }
  }
  const windowsPath = getChromeWindowsLocation(channel, wslPrefixes);
  return windowsPath.map((path14) => {
    return execSync(`wslpath "${path14}"`).toString().trim();
  });
}
function getChromeLinuxOrWslLocation(channel) {
  const locations = [];
  switch (channel) {
    case ChromeReleaseChannel.STABLE:
      locations.push("/opt/google/chrome/chrome");
      break;
    case ChromeReleaseChannel.BETA:
      locations.push("/opt/google/chrome-beta/chrome");
      break;
    case ChromeReleaseChannel.CANARY:
      locations.push("/opt/google/chrome-canary/chrome");
      break;
    case ChromeReleaseChannel.DEV:
      locations.push("/opt/google/chrome-unstable/chrome");
      break;
  }
  try {
    const wslPath = getWslLocation(channel);
    if (wslPath) {
      locations.push(...wslPath);
    }
  } catch {
  }
  return locations;
}
function resolveSystemExecutablePaths$1(platform, channel) {
  switch (platform) {
    case BrowserPlatform.WIN64:
    case BrowserPlatform.WIN32:
      const prefixLocation = new Set(WINDOWS_ENV_PARAM_NAMES.map((name) => {
        return process.env[name];
      }).filter((l) => {
        return !!l;
      }));
      prefixLocation.add("C:\\Program Files");
      prefixLocation.add("C:\\Program Files (x86)");
      prefixLocation.add("D:\\Program Files");
      prefixLocation.add("D:\\Program Files (x86)");
      return getChromeWindowsLocation(channel, prefixLocation);
    case BrowserPlatform.MAC_ARM:
    case BrowserPlatform.MAC:
      switch (channel) {
        case ChromeReleaseChannel.STABLE:
          return [
            "/Applications/Google Chrome.app/Contents/MacOS/Google Chrome"
          ];
        case ChromeReleaseChannel.BETA:
          return [
            "/Applications/Google Chrome Beta.app/Contents/MacOS/Google Chrome Beta"
          ];
        case ChromeReleaseChannel.CANARY:
          return [
            "/Applications/Google Chrome Canary.app/Contents/MacOS/Google Chrome Canary"
          ];
        case ChromeReleaseChannel.DEV:
          return [
            "/Applications/Google Chrome Dev.app/Contents/MacOS/Google Chrome Dev"
          ];
      }
    case BrowserPlatform.LINUX_ARM:
    case BrowserPlatform.LINUX:
      return getChromeLinuxOrWslLocation(channel);
  }
}
function resolveDefaultUserDataDir$1(platform, channel) {
  switch (platform) {
    case BrowserPlatform.WIN64:
    case BrowserPlatform.WIN32:
      switch (channel) {
        case ChromeReleaseChannel.STABLE:
          return path$1.join(getLocalAppDataWin(), "Google", "Chrome", "User Data");
        case ChromeReleaseChannel.BETA:
          return path$1.join(getLocalAppDataWin(), "Google", "Chrome Beta", "User Data");
        case ChromeReleaseChannel.CANARY:
          return path$1.join(getLocalAppDataWin(), "Google", "Chrome SxS", "User Data");
        case ChromeReleaseChannel.DEV:
          return path$1.join(getLocalAppDataWin(), "Google", "Chrome Dev", "User Data");
      }
    case BrowserPlatform.MAC_ARM:
    case BrowserPlatform.MAC:
      switch (channel) {
        case ChromeReleaseChannel.STABLE:
          return path$1.join(getBaseUserDataDirPathMac(), "Chrome");
        case ChromeReleaseChannel.BETA:
          return path$1.join(getBaseUserDataDirPathMac(), "Chrome Beta");
        case ChromeReleaseChannel.DEV:
          return path$1.join(getBaseUserDataDirPathMac(), "Chrome Dev");
        case ChromeReleaseChannel.CANARY:
          return path$1.join(getBaseUserDataDirPathMac(), "Chrome Canary");
      }
    case BrowserPlatform.LINUX_ARM:
    case BrowserPlatform.LINUX:
      switch (channel) {
        case ChromeReleaseChannel.STABLE:
          return path$1.join(getConfigHomeLinux(), "google-chrome");
        case ChromeReleaseChannel.BETA:
          return path$1.join(getConfigHomeLinux(), "google-chrome-beta");
        case ChromeReleaseChannel.CANARY:
          return path$1.join(getConfigHomeLinux(), "google-chrome-canary");
        case ChromeReleaseChannel.DEV:
          return path$1.join(getConfigHomeLinux(), "google-chrome-unstable");
      }
  }
}
function getLocalAppDataWin() {
  return process.env["LOCALAPPDATA"] || path$1.join(os.homedir(), "AppData", "Local");
}
function getConfigHomeLinux() {
  return process.env["CHROME_CONFIG_HOME"] || process.env["XDG_CONFIG_HOME"] || path$1.join(os.homedir(), ".config");
}
function getBaseUserDataDirPathMac() {
  return path$1.join(os.homedir(), "Library", "Application Support", "Google");
}
function compareVersions$2(a, b) {
  if (!semver.valid(a)) {
    throw new Error(`Version ${a} is not a valid semver version`);
  }
  if (!semver.valid(b)) {
    throw new Error(`Version ${b} is not a valid semver version`);
  }
  if (semver.gt(a, b)) {
    return 1;
  } else if (semver.lt(a, b)) {
    return -1;
  } else {
    return 0;
  }
}
function folder$2(platform) {
  switch (platform) {
    case BrowserPlatform.LINUX_ARM:
    case BrowserPlatform.LINUX:
      return "linux64";
    case BrowserPlatform.MAC_ARM:
      return "mac-arm64";
    case BrowserPlatform.MAC:
      return "mac-x64";
    case BrowserPlatform.WIN32:
      return "win32";
    case BrowserPlatform.WIN64:
      return "win64";
  }
}
function resolveDownloadUrl$3(platform, buildId, baseUrl = "https://storage.googleapis.com/chrome-for-testing-public") {
  return `${baseUrl}/${resolveDownloadPath$3(platform, buildId).join("/")}`;
}
function resolveDownloadPath$3(platform, buildId) {
  return [
    buildId,
    folder$2(platform),
    `chrome-headless-shell-${folder$2(platform)}.zip`
  ];
}
function relativeExecutablePath$3(platform, _buildId) {
  switch (platform) {
    case BrowserPlatform.MAC:
    case BrowserPlatform.MAC_ARM:
      return path$1.join("chrome-headless-shell-" + folder$2(platform), "chrome-headless-shell");
    case BrowserPlatform.LINUX_ARM:
    case BrowserPlatform.LINUX:
      return path$1.join("chrome-headless-shell-linux64", "chrome-headless-shell");
    case BrowserPlatform.WIN32:
    case BrowserPlatform.WIN64:
      return path$1.join("chrome-headless-shell-" + folder$2(platform), "chrome-headless-shell.exe");
  }
}
function folder$1(platform) {
  switch (platform) {
    case BrowserPlatform.LINUX_ARM:
    case BrowserPlatform.LINUX:
      return "linux64";
    case BrowserPlatform.MAC_ARM:
      return "mac-arm64";
    case BrowserPlatform.MAC:
      return "mac-x64";
    case BrowserPlatform.WIN32:
      return "win32";
    case BrowserPlatform.WIN64:
      return "win64";
  }
}
function resolveDownloadUrl$2(platform, buildId, baseUrl = "https://storage.googleapis.com/chrome-for-testing-public") {
  return `${baseUrl}/${resolveDownloadPath$2(platform, buildId).join("/")}`;
}
function resolveDownloadPath$2(platform, buildId) {
  return [buildId, folder$1(platform), `chromedriver-${folder$1(platform)}.zip`];
}
function relativeExecutablePath$2(platform, _buildId) {
  switch (platform) {
    case BrowserPlatform.MAC:
    case BrowserPlatform.MAC_ARM:
      return path$1.join("chromedriver-" + folder$1(platform), "chromedriver");
    case BrowserPlatform.LINUX_ARM:
    case BrowserPlatform.LINUX:
      return path$1.join("chromedriver-linux64", "chromedriver");
    case BrowserPlatform.WIN32:
    case BrowserPlatform.WIN64:
      return path$1.join("chromedriver-" + folder$1(platform), "chromedriver.exe");
  }
}
function archive$1(platform, buildId) {
  switch (platform) {
    case BrowserPlatform.LINUX_ARM:
    case BrowserPlatform.LINUX:
      return "chrome-linux";
    case BrowserPlatform.MAC_ARM:
    case BrowserPlatform.MAC:
      return "chrome-mac";
    case BrowserPlatform.WIN32:
    case BrowserPlatform.WIN64:
      return parseInt(buildId, 10) > 591479 ? "chrome-win" : "chrome-win32";
  }
}
function folder(platform) {
  switch (platform) {
    case BrowserPlatform.LINUX_ARM:
    case BrowserPlatform.LINUX:
      return "Linux_x64";
    case BrowserPlatform.MAC_ARM:
      return "Mac_Arm";
    case BrowserPlatform.MAC:
      return "Mac";
    case BrowserPlatform.WIN32:
      return "Win";
    case BrowserPlatform.WIN64:
      return "Win_x64";
  }
}
function resolveDownloadUrl$1(platform, buildId, baseUrl = "https://storage.googleapis.com/chromium-browser-snapshots") {
  return `${baseUrl}/${resolveDownloadPath$1(platform, buildId).join("/")}`;
}
function resolveDownloadPath$1(platform, buildId) {
  return [folder(platform), buildId, `${archive$1(platform, buildId)}.zip`];
}
function relativeExecutablePath$1(platform, _buildId) {
  switch (platform) {
    case BrowserPlatform.MAC:
    case BrowserPlatform.MAC_ARM:
      return path$1.join("chrome-mac", "Chromium.app", "Contents", "MacOS", "Chromium");
    case BrowserPlatform.LINUX_ARM:
    case BrowserPlatform.LINUX:
      return path$1.join("chrome-linux", "chrome");
    case BrowserPlatform.WIN32:
    case BrowserPlatform.WIN64:
      return path$1.join("chrome-win", "chrome.exe");
  }
}
async function resolveBuildId$2(platform) {
  return await getText(new URL(`https://storage.googleapis.com/chromium-browser-snapshots/${folder(platform)}/LAST_CHANGE`));
}
function compareVersions$1(a, b) {
  return Number(a) - Number(b);
}
function getFormat$1(buildId) {
  const majorVersion = Number(buildId.split(".").shift());
  return majorVersion >= 135 ? "xz" : "bz2";
}
function archiveNightly(platform, buildId) {
  switch (platform) {
    case BrowserPlatform.LINUX:
      return `firefox-${buildId}.en-US.linux-x86_64.tar.${getFormat$1(buildId)}`;
    case BrowserPlatform.LINUX_ARM:
      return `firefox-${buildId}.en-US.linux-aarch64.tar.${getFormat$1(buildId)}`;
    case BrowserPlatform.MAC_ARM:
    case BrowserPlatform.MAC:
      return `firefox-${buildId}.en-US.mac.dmg`;
    case BrowserPlatform.WIN32:
    case BrowserPlatform.WIN64:
      return `firefox-${buildId}.en-US.${platform}.zip`;
  }
}
function archive(platform, buildId) {
  switch (platform) {
    case BrowserPlatform.LINUX_ARM:
    case BrowserPlatform.LINUX:
      return `firefox-${buildId}.tar.${getFormat$1(buildId)}`;
    case BrowserPlatform.MAC_ARM:
    case BrowserPlatform.MAC:
      return `Firefox ${buildId}.dmg`;
    case BrowserPlatform.WIN32:
    case BrowserPlatform.WIN64:
      return `Firefox Setup ${buildId}.exe`;
  }
}
function platformName(platform) {
  switch (platform) {
    case BrowserPlatform.LINUX:
      return `linux-x86_64`;
    case BrowserPlatform.LINUX_ARM:
      return `linux-aarch64`;
    case BrowserPlatform.MAC_ARM:
    case BrowserPlatform.MAC:
      return `mac`;
    case BrowserPlatform.WIN32:
    case BrowserPlatform.WIN64:
      return platform;
  }
}
function parseBuildId(buildId) {
  for (const value of Object.values(FirefoxChannel)) {
    if (buildId.startsWith(value + "_")) {
      buildId = buildId.substring(value.length + 1);
      return [value, buildId];
    }
  }
  return [FirefoxChannel.NIGHTLY, buildId];
}
function resolveDownloadUrl(platform, buildId, baseUrl) {
  const [channel] = parseBuildId(buildId);
  switch (channel) {
    case FirefoxChannel.NIGHTLY:
      baseUrl ??= "https://archive.mozilla.org/pub/firefox/nightly/latest-mozilla-central";
      break;
    case FirefoxChannel.DEVEDITION:
      baseUrl ??= "https://archive.mozilla.org/pub/devedition/releases";
      break;
    case FirefoxChannel.BETA:
    case FirefoxChannel.STABLE:
    case FirefoxChannel.ESR:
      baseUrl ??= "https://archive.mozilla.org/pub/firefox/releases";
      break;
  }
  return `${baseUrl}/${resolveDownloadPath(platform, buildId).join("/")}`;
}
function resolveDownloadPath(platform, buildId) {
  const [channel, resolvedBuildId] = parseBuildId(buildId);
  switch (channel) {
    case FirefoxChannel.NIGHTLY:
      return [archiveNightly(platform, resolvedBuildId)];
    case FirefoxChannel.DEVEDITION:
    case FirefoxChannel.BETA:
    case FirefoxChannel.STABLE:
    case FirefoxChannel.ESR:
      return [
        resolvedBuildId,
        platformName(platform),
        "en-US",
        archive(platform, resolvedBuildId)
      ];
  }
}
function relativeExecutablePath(platform, buildId) {
  const [channel] = parseBuildId(buildId);
  switch (channel) {
    case FirefoxChannel.NIGHTLY:
      switch (platform) {
        case BrowserPlatform.MAC_ARM:
        case BrowserPlatform.MAC:
          return path$1.join("Firefox Nightly.app", "Contents", "MacOS", "firefox");
        case BrowserPlatform.LINUX_ARM:
        case BrowserPlatform.LINUX:
          return path$1.join("firefox", "firefox");
        case BrowserPlatform.WIN32:
        case BrowserPlatform.WIN64:
          return path$1.join("firefox", "firefox.exe");
      }
    case FirefoxChannel.BETA:
    case FirefoxChannel.DEVEDITION:
    case FirefoxChannel.ESR:
    case FirefoxChannel.STABLE:
      switch (platform) {
        case BrowserPlatform.MAC_ARM:
        case BrowserPlatform.MAC:
          return path$1.join("Firefox.app", "Contents", "MacOS", "firefox");
        case BrowserPlatform.LINUX_ARM:
        case BrowserPlatform.LINUX:
          return path$1.join("firefox", "firefox");
        case BrowserPlatform.WIN32:
        case BrowserPlatform.WIN64:
          return path$1.join("core", "firefox.exe");
      }
  }
}
async function resolveBuildId$1(channel = FirefoxChannel.NIGHTLY) {
  const channelToVersionKey = {
    [FirefoxChannel.ESR]: "FIREFOX_ESR",
    [FirefoxChannel.STABLE]: "LATEST_FIREFOX_VERSION",
    [FirefoxChannel.DEVEDITION]: "FIREFOX_DEVEDITION",
    [FirefoxChannel.BETA]: "FIREFOX_DEVEDITION",
    [FirefoxChannel.NIGHTLY]: "FIREFOX_NIGHTLY"
  };
  const versions = await getJSON(new URL(`${baseVersionUrl}/firefox_versions.json`));
  const version3 = versions[channelToVersionKey[channel]];
  if (!version3) {
    throw new Error(`Channel ${channel} is not found.`);
  }
  return channel + "_" + version3;
}
async function createProfile$1(options2) {
  if (!fs2.existsSync(options2.path)) {
    await fs2.promises.mkdir(options2.path, {
      recursive: true
    });
  }
  await syncPreferences({
    preferences: {
      ...defaultProfilePreferences(options2.preferences),
      ...options2.preferences
    },
    path: options2.path
  });
}
function defaultProfilePreferences(extraPrefs) {
  const server2 = "dummy.test";
  const defaultPrefs = {
    "app.normandy.api_url": "",
    "app.update.checkInstallTime": false,
    "app.update.disabledForTesting": true,
    "apz.content_response_timeout": 6e4,
    "browser.contentblocking.features.standard": "-tp,tpPrivate,cookieBehavior0,-cryptoTP,-fp",
    "browser.dom.window.dump.enabled": true,
    "browser.newtabpage.activity-stream.feeds.system.topstories": false,
    "browser.newtabpage.enabled": false,
    "browser.pagethumbnails.capturing_disabled": true,
    "browser.safebrowsing.blockedURIs.enabled": false,
    "browser.safebrowsing.downloads.enabled": false,
    "browser.safebrowsing.malware.enabled": false,
    "browser.safebrowsing.phishing.enabled": false,
    "browser.search.update": false,
    "browser.sessionstore.resume_from_crash": false,
    "browser.shell.checkDefaultBrowser": false,
    "browser.startup.homepage": "about:blank",
    "browser.startup.homepage_override.mstone": "ignore",
    "browser.startup.page": 0,
    "browser.tabs.disableBackgroundZombification": false,
    "browser.tabs.warnOnCloseOtherTabs": false,
    "browser.tabs.warnOnOpen": false,
    "browser.translations.automaticallyPopup": false,
    "browser.uitour.enabled": false,
    "browser.urlbar.suggest.searches": false,
    "browser.usedOnWindows10.introURL": "",
    "browser.warnOnQuit": false,
    "datareporting.healthreport.documentServerURI": `http://${server2}/dummy/healthreport/`,
    "datareporting.healthreport.logging.consoleEnabled": false,
    "datareporting.healthreport.service.enabled": false,
    "datareporting.healthreport.service.firstRun": false,
    "datareporting.healthreport.uploadEnabled": false,
    "datareporting.policy.dataSubmissionEnabled": false,
    "datareporting.policy.dataSubmissionPolicyBypassNotification": true,
    "devtools.jsonview.enabled": false,
    "dom.disable_open_during_load": false,
    "dom.file.createInChild": true,
    "dom.ipc.reportProcessHangs": false,
    "dom.max_chrome_script_run_time": 0,
    "dom.max_script_run_time": 0,
    "extensions.autoDisableScopes": 0,
    "extensions.enabledScopes": 5,
    "extensions.getAddons.cache.enabled": false,
    "extensions.installDistroAddons": false,
    "extensions.update.enabled": false,
    "extensions.update.notifyUser": false,
    "extensions.webservice.discoverURL": `http://${server2}/dummy/discoveryURL`,
    "focusmanager.testmode": true,
    "general.useragent.updates.enabled": false,
    "geo.provider.testing": true,
    "geo.wifi.scan": false,
    "hangmonitor.timeout": 0,
    "javascript.options.showInConsole": true,
    "media.gmp-manager.updateEnabled": false,
    "media.sanity-test.disabled": true,
    "network.cookie.sameSite.laxByDefault": false,
    "network.http.prompt-temp-redirect": false,
    "network.http.speculative-parallel-limit": 0,
    "network.manage-offline-status": false,
    "network.sntp.pools": server2,
    "plugin.state.flash": 0,
    "privacy.trackingprotection.enabled": false,
    "remote.enabled": true,
    "remote.bidi.dismiss_file_pickers.enabled": true,
    "screenshots.browser.component.enabled": false,
    "security.certerrors.mitm.priming.enabled": false,
    "security.fileuri.strict_origin_policy": false,
    "security.notification_enable_delay": 0,
    "services.settings.server": `http://${server2}/dummy/blocklist/`,
    "signon.autofillForms": false,
    "signon.rememberSignons": false,
    "startup.homepage_welcome_url": "about:blank",
    "startup.homepage_welcome_url.additional": "",
    "toolkit.cosmeticAnimations.enabled": false,
    "toolkit.startup.max_resumed_crashes": -1
  };
  return Object.assign(defaultPrefs, extraPrefs);
}
async function backupFile(input) {
  if (!fs2.existsSync(input)) {
    return;
  }
  await fs2.promises.copyFile(input, input + ".puppeteer");
}
async function syncPreferences(options2) {
  const prefsPath = path$1.join(options2.path, "prefs.js");
  const userPath = path$1.join(options2.path, "user.js");
  const lines = Object.entries(options2.preferences).map(([key, value]) => {
    return `user_pref(${JSON.stringify(key)}, ${JSON.stringify(value)});`;
  });
  const result = await Promise.allSettled([
    backupFile(userPath).then(async () => {
      await fs2.promises.writeFile(userPath, lines.join("\n"));
    }),
    backupFile(prefsPath)
  ]);
  for (const command2 of result) {
    if (command2.status === "rejected") {
      throw command2.reason;
    }
  }
}
function compareVersions(a, b) {
  return parseInt(a.replace(".", ""), 16) - parseInt(b.replace(".", ""), 16);
}
async function resolveBuildIdForBrowserTag(browser3, platform, tag2) {
  switch (browser3) {
    case Browser2.FIREFOX:
      switch (tag2) {
        case BrowserTag.LATEST:
          return await resolveBuildId$1(FirefoxChannel.NIGHTLY);
        case BrowserTag.BETA:
          return await resolveBuildId$1(FirefoxChannel.BETA);
        case BrowserTag.NIGHTLY:
          return await resolveBuildId$1(FirefoxChannel.NIGHTLY);
        case BrowserTag.DEVEDITION:
          return await resolveBuildId$1(FirefoxChannel.DEVEDITION);
        case BrowserTag.STABLE:
          return await resolveBuildId$1(FirefoxChannel.STABLE);
        case BrowserTag.ESR:
          return await resolveBuildId$1(FirefoxChannel.ESR);
        case BrowserTag.CANARY:
        case BrowserTag.DEV:
          throw new Error(`${tag2.toUpperCase()} is not available for Firefox`);
      }
    case Browser2.CHROME: {
      switch (tag2) {
        case BrowserTag.LATEST:
          return await resolveBuildId$3(ChromeReleaseChannel.CANARY);
        case BrowserTag.BETA:
          return await resolveBuildId$3(ChromeReleaseChannel.BETA);
        case BrowserTag.CANARY:
          return await resolveBuildId$3(ChromeReleaseChannel.CANARY);
        case BrowserTag.DEV:
          return await resolveBuildId$3(ChromeReleaseChannel.DEV);
        case BrowserTag.STABLE:
          return await resolveBuildId$3(ChromeReleaseChannel.STABLE);
        case BrowserTag.NIGHTLY:
        case BrowserTag.DEVEDITION:
        case BrowserTag.ESR:
          throw new Error(`${tag2.toUpperCase()} is not available for Chrome`);
      }
    }
    case Browser2.CHROMEDRIVER: {
      switch (tag2) {
        case BrowserTag.LATEST:
        case BrowserTag.CANARY:
          return await resolveBuildId$3(ChromeReleaseChannel.CANARY);
        case BrowserTag.BETA:
          return await resolveBuildId$3(ChromeReleaseChannel.BETA);
        case BrowserTag.DEV:
          return await resolveBuildId$3(ChromeReleaseChannel.DEV);
        case BrowserTag.STABLE:
          return await resolveBuildId$3(ChromeReleaseChannel.STABLE);
        case BrowserTag.NIGHTLY:
        case BrowserTag.DEVEDITION:
        case BrowserTag.ESR:
          throw new Error(`${tag2.toUpperCase()} is not available for ChromeDriver`);
      }
    }
    case Browser2.CHROMEHEADLESSSHELL: {
      switch (tag2) {
        case BrowserTag.LATEST:
        case BrowserTag.CANARY:
          return await resolveBuildId$3(ChromeReleaseChannel.CANARY);
        case BrowserTag.BETA:
          return await resolveBuildId$3(ChromeReleaseChannel.BETA);
        case BrowserTag.DEV:
          return await resolveBuildId$3(ChromeReleaseChannel.DEV);
        case BrowserTag.STABLE:
          return await resolveBuildId$3(ChromeReleaseChannel.STABLE);
        case BrowserTag.NIGHTLY:
        case BrowserTag.DEVEDITION:
        case BrowserTag.ESR:
          throw new Error(`${tag2} is not available for chrome-headless-shell`);
      }
    }
    case Browser2.CHROMIUM:
      switch (tag2) {
        case BrowserTag.LATEST:
          return await resolveBuildId$2(platform);
        case BrowserTag.NIGHTLY:
        case BrowserTag.CANARY:
        case BrowserTag.DEV:
        case BrowserTag.DEVEDITION:
        case BrowserTag.BETA:
        case BrowserTag.STABLE:
        case BrowserTag.ESR:
          throw new Error(`${tag2} is not supported for Chromium. Use 'latest' instead.`);
      }
  }
}
async function resolveBuildId(browser3, platform, tag2) {
  const browserTag = tag2;
  if (Object.values(BrowserTag).includes(browserTag)) {
    return await resolveBuildIdForBrowserTag(browser3, platform, browserTag);
  }
  switch (browser3) {
    case Browser2.FIREFOX:
      return tag2;
    case Browser2.CHROME:
      const chromeResult = await resolveBuildId$3(tag2);
      if (chromeResult) {
        return chromeResult;
      }
      return tag2;
    case Browser2.CHROMEDRIVER:
      const chromeDriverResult = await resolveBuildId$3(tag2);
      if (chromeDriverResult) {
        return chromeDriverResult;
      }
      return tag2;
    case Browser2.CHROMEHEADLESSSHELL:
      const chromeHeadlessShellResult = await resolveBuildId$3(tag2);
      if (chromeHeadlessShellResult) {
        return chromeHeadlessShellResult;
      }
      return tag2;
    case Browser2.CHROMIUM:
      return tag2;
  }
}
async function createProfile(browser3, opts) {
  switch (browser3) {
    case Browser2.FIREFOX:
      return await createProfile$1(opts);
    case Browser2.CHROME:
    case Browser2.CHROMIUM:
      throw new Error(`Profile creation is not support for ${browser3} yet`);
  }
}
function resolveDefaultUserDataDir(browser3, platform, channel) {
  switch (browser3) {
    case Browser2.CHROMEDRIVER:
    case Browser2.CHROMEHEADLESSSHELL:
    case Browser2.FIREFOX:
    case Browser2.CHROMIUM:
      throw new Error(`Default user dir detection is not supported for ${browser3} yet.`);
    case Browser2.CHROME:
      return resolveDefaultUserDataDir$1(platform, channel);
  }
}
function resolveSystemExecutablePaths(browser3, platform, channel) {
  switch (browser3) {
    case Browser2.CHROMEDRIVER:
    case Browser2.CHROMEHEADLESSSHELL:
    case Browser2.FIREFOX:
    case Browser2.CHROMIUM:
      throw new Error(`System browser detection is not supported for ${browser3} yet.`);
    case Browser2.CHROME:
      return resolveSystemExecutablePaths$1(platform, channel);
  }
}
function getVersionComparator(browser3) {
  return versionComparators[browser3];
}
function detectBrowserPlatform() {
  const platform = os.platform();
  const arch = os.arch();
  switch (platform) {
    case "darwin":
      return arch === "arm64" ? BrowserPlatform.MAC_ARM : BrowserPlatform.MAC;
    case "linux":
      return arch === "arm64" ? BrowserPlatform.LINUX_ARM : BrowserPlatform.LINUX;
    case "win32":
      return arch === "x64" || arch === "arm64" && isWindows11(os.release()) ? BrowserPlatform.WIN64 : BrowserPlatform.WIN32;
    default:
      return void 0;
  }
}
function isWindows11(version3) {
  const parts = version3.split(".");
  if (parts.length > 2) {
    const major2 = parseInt(parts[0], 10);
    const minor2 = parseInt(parts[1], 10);
    const patch = parseInt(parts[2], 10);
    return major2 > 10 || major2 === 10 && minor2 > 0 || major2 === 10 && minor2 === 0 && patch >= 22e3;
  }
  return false;
}
function parseFolderPath(folderPath) {
  const name = path$1.basename(folderPath);
  const splits = name.split("-");
  if (splits.length !== 2) {
    return;
  }
  const [platform, buildId] = splits;
  if (!buildId || !platform) {
    return;
  }
  return { platform, buildId };
}
function computeExecutablePath(options2) {
  if (options2.cacheDir === null) {
    options2.platform ??= detectBrowserPlatform();
    if (options2.platform === void 0) {
      throw new Error(`No platform specified. Couldn't auto-detect browser platform.`);
    }
    return executablePathByBrowser[options2.browser](options2.platform, options2.buildId);
  }
  return new Cache$2(options2.cacheDir).computeExecutablePath(options2);
}
function computeSystemExecutablePath(options2) {
  options2.platform ??= detectBrowserPlatform();
  if (!options2.platform) {
    throw new Error(`Cannot download a binary for the provided platform: ${os.platform()} (${os.arch()})`);
  }
  const paths = resolveSystemExecutablePaths(options2.browser, options2.platform, options2.channel);
  for (const path14 of paths) {
    try {
      accessSync(path14);
      return path14;
    } catch {
    }
  }
  throw new Error(`Could not find Google Chrome executable for channel '${options2.channel}' at:${paths.map((path14) => {
    return `
 - ${path14}`;
  })}.`);
}
function launch$1(opts) {
  return new Process(opts);
}
function subscribeToProcessEvent(event, handler) {
  const listeners = processListeners.get(event) || [];
  if (listeners.length === 0) {
    process.on(event, dispatchers[event]);
  }
  listeners.push(handler);
  processListeners.set(event, listeners);
}
function unsubscribeFromProcessEvent(event, handler) {
  const listeners = processListeners.get(event) || [];
  const existingListenerIdx = listeners.indexOf(handler);
  if (existingListenerIdx === -1) {
    return;
  }
  listeners.splice(existingListenerIdx, 1);
  processListeners.set(event, listeners);
  if (listeners.length === 0) {
    process.off(event, dispatchers[event]);
  }
}
function pidExists(pid) {
  try {
    return process.kill(pid, 0);
  } catch (error) {
    if (isErrnoException(error)) {
      if (error.code && error.code === "ESRCH") {
        return false;
      }
    }
    throw error;
  }
}
function isErrorLike(obj) {
  return typeof obj === "object" && obj !== null && "name" in obj && "message" in obj;
}
function isErrnoException(obj) {
  return isErrorLike(obj) && ("errno" in obj || "code" in obj || "path" in obj || "syscall" in obj);
}
function requireNodeProgress() {
  if (hasRequiredNodeProgress) return nodeProgress.exports;
  hasRequiredNodeProgress = 1;
  (function(module2, exports$1) {
    module2.exports = ProgressBar;
    function ProgressBar(fmt, options2) {
      this.stream = options2.stream || process.stderr;
      if (typeof options2 == "number") {
        var total = options2;
        options2 = {};
        options2.total = total;
      } else {
        options2 = options2 || {};
        if ("string" != typeof fmt) throw new Error("format required");
        if ("number" != typeof options2.total) throw new Error("total required");
      }
      this.fmt = fmt;
      this.curr = options2.curr || 0;
      this.total = options2.total;
      this.width = options2.width || this.total;
      this.clear = options2.clear;
      this.chars = {
        complete: options2.complete || "=",
        incomplete: options2.incomplete || "-",
        head: options2.head || (options2.complete || "=")
      };
      this.renderThrottle = options2.renderThrottle !== 0 ? options2.renderThrottle || 16 : 0;
      this.lastRender = -Infinity;
      this.callback = options2.callback || function() {
      };
      this.tokens = {};
      this.lastDraw = "";
    }
    ProgressBar.prototype.tick = function(len, tokens) {
      if (len !== 0)
        len = len || 1;
      if ("object" == typeof len) tokens = len, len = 1;
      if (tokens) this.tokens = tokens;
      if (0 == this.curr) this.start = /* @__PURE__ */ new Date();
      this.curr += len;
      this.render();
      if (this.curr >= this.total) {
        this.render(void 0, true);
        this.complete = true;
        this.terminate();
        this.callback(this);
        return;
      }
    };
    ProgressBar.prototype.render = function(tokens, force) {
      force = force !== void 0 ? force : false;
      if (tokens) this.tokens = tokens;
      if (!this.stream.isTTY) return;
      var now = Date.now();
      var delta = now - this.lastRender;
      if (!force && delta < this.renderThrottle) {
        return;
      } else {
        this.lastRender = now;
      }
      var ratio = this.curr / this.total;
      ratio = Math.min(Math.max(ratio, 0), 1);
      var percent = Math.floor(ratio * 100);
      var incomplete, complete, completeLength;
      var elapsed = /* @__PURE__ */ new Date() - this.start;
      var eta = percent == 100 ? 0 : elapsed * (this.total / this.curr - 1);
      var rate = this.curr / (elapsed / 1e3);
      var str = this.fmt.replace(":current", this.curr).replace(":total", this.total).replace(":elapsed", isNaN(elapsed) ? "0.0" : (elapsed / 1e3).toFixed(1)).replace(":eta", isNaN(eta) || !isFinite(eta) ? "0.0" : (eta / 1e3).toFixed(1)).replace(":percent", percent.toFixed(0) + "%").replace(":rate", Math.round(rate));
      var availableSpace = Math.max(0, this.stream.columns - str.replace(":bar", "").length);
      if (availableSpace && process.platform === "win32") {
        availableSpace = availableSpace - 1;
      }
      var width = Math.min(this.width, availableSpace);
      completeLength = Math.round(width * ratio);
      complete = Array(Math.max(0, completeLength + 1)).join(this.chars.complete);
      incomplete = Array(Math.max(0, width - completeLength + 1)).join(this.chars.incomplete);
      if (completeLength > 0)
        complete = complete.slice(0, -1) + this.chars.head;
      str = str.replace(":bar", complete + incomplete);
      if (this.tokens) for (var key in this.tokens) str = str.replace(":" + key, this.tokens[key]);
      if (this.lastDraw !== str) {
        this.stream.cursorTo(0);
        this.stream.write(str);
        this.stream.clearLine(1);
        this.lastDraw = str;
      }
    };
    ProgressBar.prototype.update = function(ratio, tokens) {
      var goal = Math.floor(ratio * this.total);
      var delta = goal - this.curr;
      this.tick(delta, tokens);
    };
    ProgressBar.prototype.interrupt = function(message) {
      this.stream.clearLine();
      this.stream.cursorTo(0);
      this.stream.write(message);
      this.stream.write("\n");
      this.stream.write(this.lastDraw);
    };
    ProgressBar.prototype.terminate = function() {
      if (this.clear) {
        if (this.stream.clearLine) {
          this.stream.clearLine();
          this.stream.cursorTo(0);
        }
      } else {
        this.stream.write("\n");
      }
    };
  })(nodeProgress);
  return nodeProgress.exports;
}
function requireProgress() {
  if (hasRequiredProgress) return progress;
  hasRequiredProgress = 1;
  progress = requireNodeProgress();
  return progress;
}
async function uninstall(options2) {
  options2.platform ??= detectBrowserPlatform();
  if (!options2.platform) {
    throw new Error(`Cannot detect the browser platform for: ${os.platform()} (${os.arch()})`);
  }
  new Cache$2(options2.cacheDir).uninstall(options2.browser, options2.platform, options2.buildId);
}
async function getInstalledBrowsers(options2) {
  return new Cache$2(options2.cacheDir).getInstalledBrowsers();
}
function requireConstants() {
  if (hasRequiredConstants) return constants;
  hasRequiredConstants = 1;
  const BINARY_TYPES = ["nodebuffer", "arraybuffer", "fragments"];
  const hasBlob = typeof Blob !== "undefined";
  if (hasBlob) BINARY_TYPES.push("blob");
  constants = {
    BINARY_TYPES,
    CLOSE_TIMEOUT: 3e4,
    EMPTY_BUFFER: Buffer.alloc(0),
    GUID: "258EAFA5-E914-47DA-95CA-C5AB0DC85B11",
    hasBlob,
    kForOnEventAttribute: Symbol("kIsForOnEventAttribute"),
    kListener: Symbol("kListener"),
    kStatusCode: Symbol("status-code"),
    kWebSocket: Symbol("websocket"),
    NOOP: () => {
    }
  };
  return constants;
}
function requireBufferUtil() {
  if (hasRequiredBufferUtil) return bufferUtil.exports;
  hasRequiredBufferUtil = 1;
  const { EMPTY_BUFFER } = requireConstants();
  const FastBuffer = Buffer[Symbol.species];
  function concat2(list2, totalLength) {
    if (list2.length === 0) return EMPTY_BUFFER;
    if (list2.length === 1) return list2[0];
    const target = Buffer.allocUnsafe(totalLength);
    let offset = 0;
    for (let i = 0; i < list2.length; i++) {
      const buf = list2[i];
      target.set(buf, offset);
      offset += buf.length;
    }
    if (offset < totalLength) {
      return new FastBuffer(target.buffer, target.byteOffset, offset);
    }
    return target;
  }
  function _mask(source2, mask, output, offset, length) {
    for (let i = 0; i < length; i++) {
      output[offset + i] = source2[i] ^ mask[i & 3];
    }
  }
  function _unmask(buffer, mask) {
    for (let i = 0; i < buffer.length; i++) {
      buffer[i] ^= mask[i & 3];
    }
  }
  function toArrayBuffer(buf) {
    if (buf.length === buf.buffer.byteLength) {
      return buf.buffer;
    }
    return buf.buffer.slice(buf.byteOffset, buf.byteOffset + buf.length);
  }
  function toBuffer(data32) {
    toBuffer.readOnly = true;
    if (Buffer.isBuffer(data32)) return data32;
    let buf;
    if (data32 instanceof ArrayBuffer) {
      buf = new FastBuffer(data32);
    } else if (ArrayBuffer.isView(data32)) {
      buf = new FastBuffer(data32.buffer, data32.byteOffset, data32.byteLength);
    } else {
      buf = Buffer.from(data32);
      toBuffer.readOnly = false;
    }
    return buf;
  }
  bufferUtil.exports = {
    concat: concat2,
    mask: _mask,
    toArrayBuffer,
    toBuffer,
    unmask: _unmask
  };
  if (!process.env.WS_NO_BUFFER_UTIL) {
    try {
      const bufferUtil$1 = __require("bufferutil");
      bufferUtil.exports.mask = function(source2, mask, output, offset, length) {
        if (length < 48) _mask(source2, mask, output, offset, length);
        else bufferUtil$1.mask(source2, mask, output, offset, length);
      };
      bufferUtil.exports.unmask = function(buffer, mask) {
        if (buffer.length < 32) _unmask(buffer, mask);
        else bufferUtil$1.unmask(buffer, mask);
      };
    } catch (e) {
    }
  }
  return bufferUtil.exports;
}
function requireLimiter() {
  if (hasRequiredLimiter) return limiter;
  hasRequiredLimiter = 1;
  const kDone = Symbol("kDone");
  const kRun = Symbol("kRun");
  class Limiter {
    constructor(concurrency) {
      this[kDone] = () => {
        this.pending--;
        this[kRun]();
      };
      this.concurrency = concurrency || Infinity;
      this.jobs = [];
      this.pending = 0;
    }
    add(job) {
      this.jobs.push(job);
      this[kRun]();
    }
    [kRun]() {
      if (this.pending === this.concurrency) return;
      if (this.jobs.length) {
        const job = this.jobs.shift();
        this.pending++;
        job(this[kDone]);
      }
    }
  }
  limiter = Limiter;
  return limiter;
}
function requirePermessageDeflate() {
  if (hasRequiredPermessageDeflate) return permessageDeflate;
  hasRequiredPermessageDeflate = 1;
  const zlib = require$$0$a;
  const bufferUtil2 = requireBufferUtil();
  const Limiter = requireLimiter();
  const { kStatusCode } = requireConstants();
  const FastBuffer = Buffer[Symbol.species];
  const TRAILER = Buffer.from([0, 0, 255, 255]);
  const kPerMessageDeflate = Symbol("permessage-deflate");
  const kTotalLength = Symbol("total-length");
  const kCallback = Symbol("callback");
  const kBuffers = Symbol("buffers");
  const kError = Symbol("error");
  let zlibLimiter;
  class PerMessageDeflate {
    constructor(options2, isServer, maxPayload) {
      this._maxPayload = maxPayload | 0;
      this._options = options2 || {};
      this._threshold = this._options.threshold !== void 0 ? this._options.threshold : 1024;
      this._isServer = !!isServer;
      this._deflate = null;
      this._inflate = null;
      this.params = null;
      if (!zlibLimiter) {
        const concurrency = this._options.concurrencyLimit !== void 0 ? this._options.concurrencyLimit : 10;
        zlibLimiter = new Limiter(concurrency);
      }
    }
    static get extensionName() {
      return "permessage-deflate";
    }
    offer() {
      const params = {};
      if (this._options.serverNoContextTakeover) {
        params.server_no_context_takeover = true;
      }
      if (this._options.clientNoContextTakeover) {
        params.client_no_context_takeover = true;
      }
      if (this._options.serverMaxWindowBits) {
        params.server_max_window_bits = this._options.serverMaxWindowBits;
      }
      if (this._options.clientMaxWindowBits) {
        params.client_max_window_bits = this._options.clientMaxWindowBits;
      } else if (this._options.clientMaxWindowBits == null) {
        params.client_max_window_bits = true;
      }
      return params;
    }
    accept(configurations) {
      configurations = this.normalizeParams(configurations);
      this.params = this._isServer ? this.acceptAsServer(configurations) : this.acceptAsClient(configurations);
      return this.params;
    }
    cleanup() {
      if (this._inflate) {
        this._inflate.close();
        this._inflate = null;
      }
      if (this._deflate) {
        const callback = this._deflate[kCallback];
        this._deflate.close();
        this._deflate = null;
        if (callback) {
          callback(
            new Error(
              "The deflate stream was closed while data was being processed"
            )
          );
        }
      }
    }
    acceptAsServer(offers) {
      const opts = this._options;
      const accepted = offers.find((params) => {
        if (opts.serverNoContextTakeover === false && params.server_no_context_takeover || params.server_max_window_bits && (opts.serverMaxWindowBits === false || typeof opts.serverMaxWindowBits === "number" && opts.serverMaxWindowBits > params.server_max_window_bits) || typeof opts.clientMaxWindowBits === "number" && !params.client_max_window_bits) {
          return false;
        }
        return true;
      });
      if (!accepted) {
        throw new Error("None of the extension offers can be accepted");
      }
      if (opts.serverNoContextTakeover) {
        accepted.server_no_context_takeover = true;
      }
      if (opts.clientNoContextTakeover) {
        accepted.client_no_context_takeover = true;
      }
      if (typeof opts.serverMaxWindowBits === "number") {
        accepted.server_max_window_bits = opts.serverMaxWindowBits;
      }
      if (typeof opts.clientMaxWindowBits === "number") {
        accepted.client_max_window_bits = opts.clientMaxWindowBits;
      } else if (accepted.client_max_window_bits === true || opts.clientMaxWindowBits === false) {
        delete accepted.client_max_window_bits;
      }
      return accepted;
    }
    acceptAsClient(response) {
      const params = response[0];
      if (this._options.clientNoContextTakeover === false && params.client_no_context_takeover) {
        throw new Error('Unexpected parameter "client_no_context_takeover"');
      }
      if (!params.client_max_window_bits) {
        if (typeof this._options.clientMaxWindowBits === "number") {
          params.client_max_window_bits = this._options.clientMaxWindowBits;
        }
      } else if (this._options.clientMaxWindowBits === false || typeof this._options.clientMaxWindowBits === "number" && params.client_max_window_bits > this._options.clientMaxWindowBits) {
        throw new Error(
          'Unexpected or invalid parameter "client_max_window_bits"'
        );
      }
      return params;
    }
    normalizeParams(configurations) {
      configurations.forEach((params) => {
        Object.keys(params).forEach((key) => {
          let value = params[key];
          if (value.length > 1) {
            throw new Error(`Parameter "${key}" must have only a single value`);
          }
          value = value[0];
          if (key === "client_max_window_bits") {
            if (value !== true) {
              const num = +value;
              if (!Number.isInteger(num) || num < 8 || num > 15) {
                throw new TypeError(
                  `Invalid value for parameter "${key}": ${value}`
                );
              }
              value = num;
            } else if (!this._isServer) {
              throw new TypeError(
                `Invalid value for parameter "${key}": ${value}`
              );
            }
          } else if (key === "server_max_window_bits") {
            const num = +value;
            if (!Number.isInteger(num) || num < 8 || num > 15) {
              throw new TypeError(
                `Invalid value for parameter "${key}": ${value}`
              );
            }
            value = num;
          } else if (key === "client_no_context_takeover" || key === "server_no_context_takeover") {
            if (value !== true) {
              throw new TypeError(
                `Invalid value for parameter "${key}": ${value}`
              );
            }
          } else {
            throw new Error(`Unknown parameter "${key}"`);
          }
          params[key] = value;
        });
      });
      return configurations;
    }
    decompress(data32, fin, callback) {
      zlibLimiter.add((done) => {
        this._decompress(data32, fin, (err, result) => {
          done();
          callback(err, result);
        });
      });
    }
    compress(data32, fin, callback) {
      zlibLimiter.add((done) => {
        this._compress(data32, fin, (err, result) => {
          done();
          callback(err, result);
        });
      });
    }
    _decompress(data32, fin, callback) {
      const endpoint = this._isServer ? "client" : "server";
      if (!this._inflate) {
        const key = `${endpoint}_max_window_bits`;
        const windowBits = typeof this.params[key] !== "number" ? zlib.Z_DEFAULT_WINDOWBITS : this.params[key];
        this._inflate = zlib.createInflateRaw({
          ...this._options.zlibInflateOptions,
          windowBits
        });
        this._inflate[kPerMessageDeflate] = this;
        this._inflate[kTotalLength] = 0;
        this._inflate[kBuffers] = [];
        this._inflate.on("error", inflateOnError);
        this._inflate.on("data", inflateOnData);
      }
      this._inflate[kCallback] = callback;
      this._inflate.write(data32);
      if (fin) this._inflate.write(TRAILER);
      this._inflate.flush(() => {
        const err = this._inflate[kError];
        if (err) {
          this._inflate.close();
          this._inflate = null;
          callback(err);
          return;
        }
        const data33 = bufferUtil2.concat(
          this._inflate[kBuffers],
          this._inflate[kTotalLength]
        );
        if (this._inflate._readableState.endEmitted) {
          this._inflate.close();
          this._inflate = null;
        } else {
          this._inflate[kTotalLength] = 0;
          this._inflate[kBuffers] = [];
          if (fin && this.params[`${endpoint}_no_context_takeover`]) {
            this._inflate.reset();
          }
        }
        callback(null, data33);
      });
    }
    _compress(data32, fin, callback) {
      const endpoint = this._isServer ? "server" : "client";
      if (!this._deflate) {
        const key = `${endpoint}_max_window_bits`;
        const windowBits = typeof this.params[key] !== "number" ? zlib.Z_DEFAULT_WINDOWBITS : this.params[key];
        this._deflate = zlib.createDeflateRaw({
          ...this._options.zlibDeflateOptions,
          windowBits
        });
        this._deflate[kTotalLength] = 0;
        this._deflate[kBuffers] = [];
        this._deflate.on("data", deflateOnData);
      }
      this._deflate[kCallback] = callback;
      this._deflate.write(data32);
      this._deflate.flush(zlib.Z_SYNC_FLUSH, () => {
        if (!this._deflate) {
          return;
        }
        let data33 = bufferUtil2.concat(
          this._deflate[kBuffers],
          this._deflate[kTotalLength]
        );
        if (fin) {
          data33 = new FastBuffer(data33.buffer, data33.byteOffset, data33.length - 4);
        }
        this._deflate[kCallback] = null;
        this._deflate[kTotalLength] = 0;
        this._deflate[kBuffers] = [];
        if (fin && this.params[`${endpoint}_no_context_takeover`]) {
          this._deflate.reset();
        }
        callback(null, data33);
      });
    }
  }
  permessageDeflate = PerMessageDeflate;
  function deflateOnData(chunk) {
    this[kBuffers].push(chunk);
    this[kTotalLength] += chunk.length;
  }
  function inflateOnData(chunk) {
    this[kTotalLength] += chunk.length;
    if (this[kPerMessageDeflate]._maxPayload < 1 || this[kTotalLength] <= this[kPerMessageDeflate]._maxPayload) {
      this[kBuffers].push(chunk);
      return;
    }
    this[kError] = new RangeError("Max payload size exceeded");
    this[kError].code = "WS_ERR_UNSUPPORTED_MESSAGE_LENGTH";
    this[kError][kStatusCode] = 1009;
    this.removeListener("data", inflateOnData);
    this.reset();
  }
  function inflateOnError(err) {
    this[kPerMessageDeflate]._inflate = null;
    if (this[kError]) {
      this[kCallback](this[kError]);
      return;
    }
    err[kStatusCode] = 1007;
    this[kCallback](err);
  }
  return permessageDeflate;
}
function requireValidation() {
  if (hasRequiredValidation) return validation.exports;
  hasRequiredValidation = 1;
  const { isUtf8: isUtf82 } = require$$0$9;
  const { hasBlob } = requireConstants();
  const tokenChars = [
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    1,
    0,
    1,
    1,
    1,
    1,
    1,
    0,
    0,
    1,
    1,
    0,
    1,
    1,
    0,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    0,
    0,
    0,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    0,
    1,
    0,
    1,
    0
  ];
  function isValidStatusCode(code2) {
    return code2 >= 1e3 && code2 <= 1014 && code2 !== 1004 && code2 !== 1005 && code2 !== 1006 || code2 >= 3e3 && code2 <= 4999;
  }
  function _isValidUTF8(buf) {
    const len = buf.length;
    let i = 0;
    while (i < len) {
      if ((buf[i] & 128) === 0) {
        i++;
      } else if ((buf[i] & 224) === 192) {
        if (i + 1 === len || (buf[i + 1] & 192) !== 128 || (buf[i] & 254) === 192) {
          return false;
        }
        i += 2;
      } else if ((buf[i] & 240) === 224) {
        if (i + 2 >= len || (buf[i + 1] & 192) !== 128 || (buf[i + 2] & 192) !== 128 || buf[i] === 224 && (buf[i + 1] & 224) === 128 || buf[i] === 237 && (buf[i + 1] & 224) === 160) {
          return false;
        }
        i += 3;
      } else if ((buf[i] & 248) === 240) {
        if (i + 3 >= len || (buf[i + 1] & 192) !== 128 || (buf[i + 2] & 192) !== 128 || (buf[i + 3] & 192) !== 128 || buf[i] === 240 && (buf[i + 1] & 240) === 128 || buf[i] === 244 && buf[i + 1] > 143 || buf[i] > 244) {
          return false;
        }
        i += 4;
      } else {
        return false;
      }
    }
    return true;
  }
  function isBlob(value) {
    return hasBlob && typeof value === "object" && typeof value.arrayBuffer === "function" && typeof value.type === "string" && typeof value.stream === "function" && (value[Symbol.toStringTag] === "Blob" || value[Symbol.toStringTag] === "File");
  }
  validation.exports = {
    isBlob,
    isValidStatusCode,
    isValidUTF8: _isValidUTF8,
    tokenChars
  };
  if (isUtf82) {
    validation.exports.isValidUTF8 = function(buf) {
      return buf.length < 24 ? _isValidUTF8(buf) : isUtf82(buf);
    };
  } else if (!process.env.WS_NO_UTF_8_VALIDATE) {
    try {
      const isValidUTF8 = __require("utf-8-validate");
      validation.exports.isValidUTF8 = function(buf) {
        return buf.length < 32 ? _isValidUTF8(buf) : isValidUTF8(buf);
      };
    } catch (e) {
    }
  }
  return validation.exports;
}
function requireReceiver() {
  if (hasRequiredReceiver) return receiver;
  hasRequiredReceiver = 1;
  const { Writable } = require$$1$3;
  const PerMessageDeflate = requirePermessageDeflate();
  const {
    BINARY_TYPES,
    EMPTY_BUFFER,
    kStatusCode,
    kWebSocket
  } = requireConstants();
  const { concat: concat2, toArrayBuffer, unmask } = requireBufferUtil();
  const { isValidStatusCode, isValidUTF8 } = requireValidation();
  const FastBuffer = Buffer[Symbol.species];
  const GET_INFO = 0;
  const GET_PAYLOAD_LENGTH_16 = 1;
  const GET_PAYLOAD_LENGTH_64 = 2;
  const GET_MASK = 3;
  const GET_DATA = 4;
  const INFLATING = 5;
  const DEFER_EVENT = 6;
  class Receiver extends Writable {
    constructor(options2 = {}) {
      super();
      this._allowSynchronousEvents = options2.allowSynchronousEvents !== void 0 ? options2.allowSynchronousEvents : true;
      this._binaryType = options2.binaryType || BINARY_TYPES[0];
      this._extensions = options2.extensions || {};
      this._isServer = !!options2.isServer;
      this._maxPayload = options2.maxPayload | 0;
      this._skipUTF8Validation = !!options2.skipUTF8Validation;
      this[kWebSocket] = void 0;
      this._bufferedBytes = 0;
      this._buffers = [];
      this._compressed = false;
      this._payloadLength = 0;
      this._mask = void 0;
      this._fragmented = 0;
      this._masked = false;
      this._fin = false;
      this._opcode = 0;
      this._totalPayloadLength = 0;
      this._messageLength = 0;
      this._fragments = [];
      this._errored = false;
      this._loop = false;
      this._state = GET_INFO;
    }
    _write(chunk, encoding, cb) {
      if (this._opcode === 8 && this._state == GET_INFO) return cb();
      this._bufferedBytes += chunk.length;
      this._buffers.push(chunk);
      this.startLoop(cb);
    }
    consume(n) {
      this._bufferedBytes -= n;
      if (n === this._buffers[0].length) return this._buffers.shift();
      if (n < this._buffers[0].length) {
        const buf = this._buffers[0];
        this._buffers[0] = new FastBuffer(
          buf.buffer,
          buf.byteOffset + n,
          buf.length - n
        );
        return new FastBuffer(buf.buffer, buf.byteOffset, n);
      }
      const dst = Buffer.allocUnsafe(n);
      do {
        const buf = this._buffers[0];
        const offset = dst.length - n;
        if (n >= buf.length) {
          dst.set(this._buffers.shift(), offset);
        } else {
          dst.set(new Uint8Array(buf.buffer, buf.byteOffset, n), offset);
          this._buffers[0] = new FastBuffer(
            buf.buffer,
            buf.byteOffset + n,
            buf.length - n
          );
        }
        n -= buf.length;
      } while (n > 0);
      return dst;
    }
    startLoop(cb) {
      this._loop = true;
      do {
        switch (this._state) {
          case GET_INFO:
            this.getInfo(cb);
            break;
          case GET_PAYLOAD_LENGTH_16:
            this.getPayloadLength16(cb);
            break;
          case GET_PAYLOAD_LENGTH_64:
            this.getPayloadLength64(cb);
            break;
          case GET_MASK:
            this.getMask();
            break;
          case GET_DATA:
            this.getData(cb);
            break;
          case INFLATING:
          case DEFER_EVENT:
            this._loop = false;
            return;
        }
      } while (this._loop);
      if (!this._errored) cb();
    }
    getInfo(cb) {
      if (this._bufferedBytes < 2) {
        this._loop = false;
        return;
      }
      const buf = this.consume(2);
      if ((buf[0] & 48) !== 0) {
        const error = this.createError(
          RangeError,
          "RSV2 and RSV3 must be clear",
          true,
          1002,
          "WS_ERR_UNEXPECTED_RSV_2_3"
        );
        cb(error);
        return;
      }
      const compressed = (buf[0] & 64) === 64;
      if (compressed && !this._extensions[PerMessageDeflate.extensionName]) {
        const error = this.createError(
          RangeError,
          "RSV1 must be clear",
          true,
          1002,
          "WS_ERR_UNEXPECTED_RSV_1"
        );
        cb(error);
        return;
      }
      this._fin = (buf[0] & 128) === 128;
      this._opcode = buf[0] & 15;
      this._payloadLength = buf[1] & 127;
      if (this._opcode === 0) {
        if (compressed) {
          const error = this.createError(
            RangeError,
            "RSV1 must be clear",
            true,
            1002,
            "WS_ERR_UNEXPECTED_RSV_1"
          );
          cb(error);
          return;
        }
        if (!this._fragmented) {
          const error = this.createError(
            RangeError,
            "invalid opcode 0",
            true,
            1002,
            "WS_ERR_INVALID_OPCODE"
          );
          cb(error);
          return;
        }
        this._opcode = this._fragmented;
      } else if (this._opcode === 1 || this._opcode === 2) {
        if (this._fragmented) {
          const error = this.createError(
            RangeError,
            `invalid opcode ${this._opcode}`,
            true,
            1002,
            "WS_ERR_INVALID_OPCODE"
          );
          cb(error);
          return;
        }
        this._compressed = compressed;
      } else if (this._opcode > 7 && this._opcode < 11) {
        if (!this._fin) {
          const error = this.createError(
            RangeError,
            "FIN must be set",
            true,
            1002,
            "WS_ERR_EXPECTED_FIN"
          );
          cb(error);
          return;
        }
        if (compressed) {
          const error = this.createError(
            RangeError,
            "RSV1 must be clear",
            true,
            1002,
            "WS_ERR_UNEXPECTED_RSV_1"
          );
          cb(error);
          return;
        }
        if (this._payloadLength > 125 || this._opcode === 8 && this._payloadLength === 1) {
          const error = this.createError(
            RangeError,
            `invalid payload length ${this._payloadLength}`,
            true,
            1002,
            "WS_ERR_INVALID_CONTROL_PAYLOAD_LENGTH"
          );
          cb(error);
          return;
        }
      } else {
        const error = this.createError(
          RangeError,
          `invalid opcode ${this._opcode}`,
          true,
          1002,
          "WS_ERR_INVALID_OPCODE"
        );
        cb(error);
        return;
      }
      if (!this._fin && !this._fragmented) this._fragmented = this._opcode;
      this._masked = (buf[1] & 128) === 128;
      if (this._isServer) {
        if (!this._masked) {
          const error = this.createError(
            RangeError,
            "MASK must be set",
            true,
            1002,
            "WS_ERR_EXPECTED_MASK"
          );
          cb(error);
          return;
        }
      } else if (this._masked) {
        const error = this.createError(
          RangeError,
          "MASK must be clear",
          true,
          1002,
          "WS_ERR_UNEXPECTED_MASK"
        );
        cb(error);
        return;
      }
      if (this._payloadLength === 126) this._state = GET_PAYLOAD_LENGTH_16;
      else if (this._payloadLength === 127) this._state = GET_PAYLOAD_LENGTH_64;
      else this.haveLength(cb);
    }
    getPayloadLength16(cb) {
      if (this._bufferedBytes < 2) {
        this._loop = false;
        return;
      }
      this._payloadLength = this.consume(2).readUInt16BE(0);
      this.haveLength(cb);
    }
    getPayloadLength64(cb) {
      if (this._bufferedBytes < 8) {
        this._loop = false;
        return;
      }
      const buf = this.consume(8);
      const num = buf.readUInt32BE(0);
      if (num > Math.pow(2, 53 - 32) - 1) {
        const error = this.createError(
          RangeError,
          "Unsupported WebSocket frame: payload length > 2^53 - 1",
          false,
          1009,
          "WS_ERR_UNSUPPORTED_DATA_PAYLOAD_LENGTH"
        );
        cb(error);
        return;
      }
      this._payloadLength = num * Math.pow(2, 32) + buf.readUInt32BE(4);
      this.haveLength(cb);
    }
    haveLength(cb) {
      if (this._payloadLength && this._opcode < 8) {
        this._totalPayloadLength += this._payloadLength;
        if (this._totalPayloadLength > this._maxPayload && this._maxPayload > 0) {
          const error = this.createError(
            RangeError,
            "Max payload size exceeded",
            false,
            1009,
            "WS_ERR_UNSUPPORTED_MESSAGE_LENGTH"
          );
          cb(error);
          return;
        }
      }
      if (this._masked) this._state = GET_MASK;
      else this._state = GET_DATA;
    }
    getMask() {
      if (this._bufferedBytes < 4) {
        this._loop = false;
        return;
      }
      this._mask = this.consume(4);
      this._state = GET_DATA;
    }
    getData(cb) {
      let data32 = EMPTY_BUFFER;
      if (this._payloadLength) {
        if (this._bufferedBytes < this._payloadLength) {
          this._loop = false;
          return;
        }
        data32 = this.consume(this._payloadLength);
        if (this._masked && (this._mask[0] | this._mask[1] | this._mask[2] | this._mask[3]) !== 0) {
          unmask(data32, this._mask);
        }
      }
      if (this._opcode > 7) {
        this.controlMessage(data32, cb);
        return;
      }
      if (this._compressed) {
        this._state = INFLATING;
        this.decompress(data32, cb);
        return;
      }
      if (data32.length) {
        this._messageLength = this._totalPayloadLength;
        this._fragments.push(data32);
      }
      this.dataMessage(cb);
    }
    decompress(data32, cb) {
      const perMessageDeflate = this._extensions[PerMessageDeflate.extensionName];
      perMessageDeflate.decompress(data32, this._fin, (err, buf) => {
        if (err) return cb(err);
        if (buf.length) {
          this._messageLength += buf.length;
          if (this._messageLength > this._maxPayload && this._maxPayload > 0) {
            const error = this.createError(
              RangeError,
              "Max payload size exceeded",
              false,
              1009,
              "WS_ERR_UNSUPPORTED_MESSAGE_LENGTH"
            );
            cb(error);
            return;
          }
          this._fragments.push(buf);
        }
        this.dataMessage(cb);
        if (this._state === GET_INFO) this.startLoop(cb);
      });
    }
    dataMessage(cb) {
      if (!this._fin) {
        this._state = GET_INFO;
        return;
      }
      const messageLength = this._messageLength;
      const fragments = this._fragments;
      this._totalPayloadLength = 0;
      this._messageLength = 0;
      this._fragmented = 0;
      this._fragments = [];
      if (this._opcode === 2) {
        let data32;
        if (this._binaryType === "nodebuffer") {
          data32 = concat2(fragments, messageLength);
        } else if (this._binaryType === "arraybuffer") {
          data32 = toArrayBuffer(concat2(fragments, messageLength));
        } else if (this._binaryType === "blob") {
          data32 = new Blob(fragments);
        } else {
          data32 = fragments;
        }
        if (this._allowSynchronousEvents) {
          this.emit("message", data32, true);
          this._state = GET_INFO;
        } else {
          this._state = DEFER_EVENT;
          setImmediate(() => {
            this.emit("message", data32, true);
            this._state = GET_INFO;
            this.startLoop(cb);
          });
        }
      } else {
        const buf = concat2(fragments, messageLength);
        if (!this._skipUTF8Validation && !isValidUTF8(buf)) {
          const error = this.createError(
            Error,
            "invalid UTF-8 sequence",
            true,
            1007,
            "WS_ERR_INVALID_UTF8"
          );
          cb(error);
          return;
        }
        if (this._state === INFLATING || this._allowSynchronousEvents) {
          this.emit("message", buf, false);
          this._state = GET_INFO;
        } else {
          this._state = DEFER_EVENT;
          setImmediate(() => {
            this.emit("message", buf, false);
            this._state = GET_INFO;
            this.startLoop(cb);
          });
        }
      }
    }
    controlMessage(data32, cb) {
      if (this._opcode === 8) {
        if (data32.length === 0) {
          this._loop = false;
          this.emit("conclude", 1005, EMPTY_BUFFER);
          this.end();
        } else {
          const code2 = data32.readUInt16BE(0);
          if (!isValidStatusCode(code2)) {
            const error = this.createError(
              RangeError,
              `invalid status code ${code2}`,
              true,
              1002,
              "WS_ERR_INVALID_CLOSE_CODE"
            );
            cb(error);
            return;
          }
          const buf = new FastBuffer(
            data32.buffer,
            data32.byteOffset + 2,
            data32.length - 2
          );
          if (!this._skipUTF8Validation && !isValidUTF8(buf)) {
            const error = this.createError(
              Error,
              "invalid UTF-8 sequence",
              true,
              1007,
              "WS_ERR_INVALID_UTF8"
            );
            cb(error);
            return;
          }
          this._loop = false;
          this.emit("conclude", code2, buf);
          this.end();
        }
        this._state = GET_INFO;
        return;
      }
      if (this._allowSynchronousEvents) {
        this.emit(this._opcode === 9 ? "ping" : "pong", data32);
        this._state = GET_INFO;
      } else {
        this._state = DEFER_EVENT;
        setImmediate(() => {
          this.emit(this._opcode === 9 ? "ping" : "pong", data32);
          this._state = GET_INFO;
          this.startLoop(cb);
        });
      }
    }
    createError(ErrorCtor, message, prefix, statusCode, errorCode) {
      this._loop = false;
      this._errored = true;
      const err = new ErrorCtor(
        prefix ? `Invalid WebSocket frame: ${message}` : message
      );
      Error.captureStackTrace(err, this.createError);
      err.code = errorCode;
      err[kStatusCode] = statusCode;
      return err;
    }
  }
  receiver = Receiver;
  return receiver;
}
function requireSender() {
  if (hasRequiredSender) return sender;
  hasRequiredSender = 1;
  const { Duplex } = require$$1$3;
  const { randomFillSync } = require$$2$1;
  const PerMessageDeflate = requirePermessageDeflate();
  const { EMPTY_BUFFER, kWebSocket, NOOP } = requireConstants();
  const { isBlob, isValidStatusCode } = requireValidation();
  const { mask: applyMask, toBuffer } = requireBufferUtil();
  const kByteLength = Symbol("kByteLength");
  const maskBuffer = Buffer.alloc(4);
  const RANDOM_POOL_SIZE = 8 * 1024;
  let randomPool;
  let randomPoolPointer = RANDOM_POOL_SIZE;
  const DEFAULT = 0;
  const DEFLATING = 1;
  const GET_BLOB_DATA = 2;
  class Sender {
    constructor(socket, extensions, generateMask) {
      this._extensions = extensions || {};
      if (generateMask) {
        this._generateMask = generateMask;
        this._maskBuffer = Buffer.alloc(4);
      }
      this._socket = socket;
      this._firstFragment = true;
      this._compress = false;
      this._bufferedBytes = 0;
      this._queue = [];
      this._state = DEFAULT;
      this.onerror = NOOP;
      this[kWebSocket] = void 0;
    }
    static frame(data32, options2) {
      let mask;
      let merge2 = false;
      let offset = 2;
      let skipMasking = false;
      if (options2.mask) {
        mask = options2.maskBuffer || maskBuffer;
        if (options2.generateMask) {
          options2.generateMask(mask);
        } else {
          if (randomPoolPointer === RANDOM_POOL_SIZE) {
            if (randomPool === void 0) {
              randomPool = Buffer.alloc(RANDOM_POOL_SIZE);
            }
            randomFillSync(randomPool, 0, RANDOM_POOL_SIZE);
            randomPoolPointer = 0;
          }
          mask[0] = randomPool[randomPoolPointer++];
          mask[1] = randomPool[randomPoolPointer++];
          mask[2] = randomPool[randomPoolPointer++];
          mask[3] = randomPool[randomPoolPointer++];
        }
        skipMasking = (mask[0] | mask[1] | mask[2] | mask[3]) === 0;
        offset = 6;
      }
      let dataLength;
      if (typeof data32 === "string") {
        if ((!options2.mask || skipMasking) && options2[kByteLength] !== void 0) {
          dataLength = options2[kByteLength];
        } else {
          data32 = Buffer.from(data32);
          dataLength = data32.length;
        }
      } else {
        dataLength = data32.length;
        merge2 = options2.mask && options2.readOnly && !skipMasking;
      }
      let payloadLength = dataLength;
      if (dataLength >= 65536) {
        offset += 8;
        payloadLength = 127;
      } else if (dataLength > 125) {
        offset += 2;
        payloadLength = 126;
      }
      const target = Buffer.allocUnsafe(merge2 ? dataLength + offset : offset);
      target[0] = options2.fin ? options2.opcode | 128 : options2.opcode;
      if (options2.rsv1) target[0] |= 64;
      target[1] = payloadLength;
      if (payloadLength === 126) {
        target.writeUInt16BE(dataLength, 2);
      } else if (payloadLength === 127) {
        target[2] = target[3] = 0;
        target.writeUIntBE(dataLength, 4, 6);
      }
      if (!options2.mask) return [target, data32];
      target[1] |= 128;
      target[offset - 4] = mask[0];
      target[offset - 3] = mask[1];
      target[offset - 2] = mask[2];
      target[offset - 1] = mask[3];
      if (skipMasking) return [target, data32];
      if (merge2) {
        applyMask(data32, mask, target, offset, dataLength);
        return [target];
      }
      applyMask(data32, mask, data32, 0, dataLength);
      return [target, data32];
    }
    close(code2, data32, mask, cb) {
      let buf;
      if (code2 === void 0) {
        buf = EMPTY_BUFFER;
      } else if (typeof code2 !== "number" || !isValidStatusCode(code2)) {
        throw new TypeError("First argument must be a valid error code number");
      } else if (data32 === void 0 || !data32.length) {
        buf = Buffer.allocUnsafe(2);
        buf.writeUInt16BE(code2, 0);
      } else {
        const length = Buffer.byteLength(data32);
        if (length > 123) {
          throw new RangeError("The message must not be greater than 123 bytes");
        }
        buf = Buffer.allocUnsafe(2 + length);
        buf.writeUInt16BE(code2, 0);
        if (typeof data32 === "string") {
          buf.write(data32, 2);
        } else {
          buf.set(data32, 2);
        }
      }
      const options2 = {
        [kByteLength]: buf.length,
        fin: true,
        generateMask: this._generateMask,
        mask,
        maskBuffer: this._maskBuffer,
        opcode: 8,
        readOnly: false,
        rsv1: false
      };
      if (this._state !== DEFAULT) {
        this.enqueue([this.dispatch, buf, false, options2, cb]);
      } else {
        this.sendFrame(Sender.frame(buf, options2), cb);
      }
    }
    ping(data32, mask, cb) {
      let byteLength;
      let readOnly;
      if (typeof data32 === "string") {
        byteLength = Buffer.byteLength(data32);
        readOnly = false;
      } else if (isBlob(data32)) {
        byteLength = data32.size;
        readOnly = false;
      } else {
        data32 = toBuffer(data32);
        byteLength = data32.length;
        readOnly = toBuffer.readOnly;
      }
      if (byteLength > 125) {
        throw new RangeError("The data size must not be greater than 125 bytes");
      }
      const options2 = {
        [kByteLength]: byteLength,
        fin: true,
        generateMask: this._generateMask,
        mask,
        maskBuffer: this._maskBuffer,
        opcode: 9,
        readOnly,
        rsv1: false
      };
      if (isBlob(data32)) {
        if (this._state !== DEFAULT) {
          this.enqueue([this.getBlobData, data32, false, options2, cb]);
        } else {
          this.getBlobData(data32, false, options2, cb);
        }
      } else if (this._state !== DEFAULT) {
        this.enqueue([this.dispatch, data32, false, options2, cb]);
      } else {
        this.sendFrame(Sender.frame(data32, options2), cb);
      }
    }
    pong(data32, mask, cb) {
      let byteLength;
      let readOnly;
      if (typeof data32 === "string") {
        byteLength = Buffer.byteLength(data32);
        readOnly = false;
      } else if (isBlob(data32)) {
        byteLength = data32.size;
        readOnly = false;
      } else {
        data32 = toBuffer(data32);
        byteLength = data32.length;
        readOnly = toBuffer.readOnly;
      }
      if (byteLength > 125) {
        throw new RangeError("The data size must not be greater than 125 bytes");
      }
      const options2 = {
        [kByteLength]: byteLength,
        fin: true,
        generateMask: this._generateMask,
        mask,
        maskBuffer: this._maskBuffer,
        opcode: 10,
        readOnly,
        rsv1: false
      };
      if (isBlob(data32)) {
        if (this._state !== DEFAULT) {
          this.enqueue([this.getBlobData, data32, false, options2, cb]);
        } else {
          this.getBlobData(data32, false, options2, cb);
        }
      } else if (this._state !== DEFAULT) {
        this.enqueue([this.dispatch, data32, false, options2, cb]);
      } else {
        this.sendFrame(Sender.frame(data32, options2), cb);
      }
    }
    send(data32, options2, cb) {
      const perMessageDeflate = this._extensions[PerMessageDeflate.extensionName];
      let opcode = options2.binary ? 2 : 1;
      let rsv1 = options2.compress;
      let byteLength;
      let readOnly;
      if (typeof data32 === "string") {
        byteLength = Buffer.byteLength(data32);
        readOnly = false;
      } else if (isBlob(data32)) {
        byteLength = data32.size;
        readOnly = false;
      } else {
        data32 = toBuffer(data32);
        byteLength = data32.length;
        readOnly = toBuffer.readOnly;
      }
      if (this._firstFragment) {
        this._firstFragment = false;
        if (rsv1 && perMessageDeflate && perMessageDeflate.params[perMessageDeflate._isServer ? "server_no_context_takeover" : "client_no_context_takeover"]) {
          rsv1 = byteLength >= perMessageDeflate._threshold;
        }
        this._compress = rsv1;
      } else {
        rsv1 = false;
        opcode = 0;
      }
      if (options2.fin) this._firstFragment = true;
      const opts = {
        [kByteLength]: byteLength,
        fin: options2.fin,
        generateMask: this._generateMask,
        mask: options2.mask,
        maskBuffer: this._maskBuffer,
        opcode,
        readOnly,
        rsv1
      };
      if (isBlob(data32)) {
        if (this._state !== DEFAULT) {
          this.enqueue([this.getBlobData, data32, this._compress, opts, cb]);
        } else {
          this.getBlobData(data32, this._compress, opts, cb);
        }
      } else if (this._state !== DEFAULT) {
        this.enqueue([this.dispatch, data32, this._compress, opts, cb]);
      } else {
        this.dispatch(data32, this._compress, opts, cb);
      }
    }
    getBlobData(blob, compress2, options2, cb) {
      this._bufferedBytes += options2[kByteLength];
      this._state = GET_BLOB_DATA;
      blob.arrayBuffer().then((arrayBuffer) => {
        if (this._socket.destroyed) {
          const err = new Error(
            "The socket was closed while the blob was being read"
          );
          process.nextTick(callCallbacks, this, err, cb);
          return;
        }
        this._bufferedBytes -= options2[kByteLength];
        const data32 = toBuffer(arrayBuffer);
        if (!compress2) {
          this._state = DEFAULT;
          this.sendFrame(Sender.frame(data32, options2), cb);
          this.dequeue();
        } else {
          this.dispatch(data32, compress2, options2, cb);
        }
      }).catch((err) => {
        process.nextTick(onError, this, err, cb);
      });
    }
    dispatch(data32, compress2, options2, cb) {
      if (!compress2) {
        this.sendFrame(Sender.frame(data32, options2), cb);
        return;
      }
      const perMessageDeflate = this._extensions[PerMessageDeflate.extensionName];
      this._bufferedBytes += options2[kByteLength];
      this._state = DEFLATING;
      perMessageDeflate.compress(data32, options2.fin, (_, buf) => {
        if (this._socket.destroyed) {
          const err = new Error(
            "The socket was closed while data was being compressed"
          );
          callCallbacks(this, err, cb);
          return;
        }
        this._bufferedBytes -= options2[kByteLength];
        this._state = DEFAULT;
        options2.readOnly = false;
        this.sendFrame(Sender.frame(buf, options2), cb);
        this.dequeue();
      });
    }
    dequeue() {
      while (this._state === DEFAULT && this._queue.length) {
        const params = this._queue.shift();
        this._bufferedBytes -= params[3][kByteLength];
        Reflect.apply(params[0], this, params.slice(1));
      }
    }
    enqueue(params) {
      this._bufferedBytes += params[3][kByteLength];
      this._queue.push(params);
    }
    sendFrame(list2, cb) {
      if (list2.length === 2) {
        this._socket.cork();
        this._socket.write(list2[0]);
        this._socket.write(list2[1], cb);
        this._socket.uncork();
      } else {
        this._socket.write(list2[0], cb);
      }
    }
  }
  sender = Sender;
  function callCallbacks(sender2, err, cb) {
    if (typeof cb === "function") cb(err);
    for (let i = 0; i < sender2._queue.length; i++) {
      const params = sender2._queue[i];
      const callback = params[params.length - 1];
      if (typeof callback === "function") callback(err);
    }
  }
  function onError(sender2, err, cb) {
    callCallbacks(sender2, err, cb);
    sender2.onerror(err);
  }
  return sender;
}
function requireEventTarget() {
  if (hasRequiredEventTarget) return eventTarget;
  hasRequiredEventTarget = 1;
  const { kForOnEventAttribute, kListener } = requireConstants();
  const kCode = Symbol("kCode");
  const kData = Symbol("kData");
  const kError = Symbol("kError");
  const kMessage = Symbol("kMessage");
  const kReason = Symbol("kReason");
  const kTarget = Symbol("kTarget");
  const kType = Symbol("kType");
  const kWasClean = Symbol("kWasClean");
  class Event2 {
    constructor(type2) {
      this[kTarget] = null;
      this[kType] = type2;
    }
    get target() {
      return this[kTarget];
    }
    get type() {
      return this[kType];
    }
  }
  Object.defineProperty(Event2.prototype, "target", { enumerable: true });
  Object.defineProperty(Event2.prototype, "type", { enumerable: true });
  class CloseEvent extends Event2 {
    constructor(type2, options2 = {}) {
      super(type2);
      this[kCode] = options2.code === void 0 ? 0 : options2.code;
      this[kReason] = options2.reason === void 0 ? "" : options2.reason;
      this[kWasClean] = options2.wasClean === void 0 ? false : options2.wasClean;
    }
    get code() {
      return this[kCode];
    }
    get reason() {
      return this[kReason];
    }
    get wasClean() {
      return this[kWasClean];
    }
  }
  Object.defineProperty(CloseEvent.prototype, "code", { enumerable: true });
  Object.defineProperty(CloseEvent.prototype, "reason", { enumerable: true });
  Object.defineProperty(CloseEvent.prototype, "wasClean", { enumerable: true });
  class ErrorEvent extends Event2 {
    constructor(type2, options2 = {}) {
      super(type2);
      this[kError] = options2.error === void 0 ? null : options2.error;
      this[kMessage] = options2.message === void 0 ? "" : options2.message;
    }
    get error() {
      return this[kError];
    }
    get message() {
      return this[kMessage];
    }
  }
  Object.defineProperty(ErrorEvent.prototype, "error", { enumerable: true });
  Object.defineProperty(ErrorEvent.prototype, "message", { enumerable: true });
  class MessageEvent extends Event2 {
    constructor(type2, options2 = {}) {
      super(type2);
      this[kData] = options2.data === void 0 ? null : options2.data;
    }
    get data() {
      return this[kData];
    }
  }
  Object.defineProperty(MessageEvent.prototype, "data", { enumerable: true });
  const EventTarget2 = {
    addEventListener(type2, handler, options2 = {}) {
      for (const listener of this.listeners(type2)) {
        if (!options2[kForOnEventAttribute] && listener[kListener] === handler && !listener[kForOnEventAttribute]) {
          return;
        }
      }
      let wrapper;
      if (type2 === "message") {
        wrapper = function onMessage(data32, isBinary) {
          const event = new MessageEvent("message", {
            data: isBinary ? data32 : data32.toString()
          });
          event[kTarget] = this;
          callListener(handler, this, event);
        };
      } else if (type2 === "close") {
        wrapper = function onClose(code2, message) {
          const event = new CloseEvent("close", {
            code: code2,
            reason: message.toString(),
            wasClean: this._closeFrameReceived && this._closeFrameSent
          });
          event[kTarget] = this;
          callListener(handler, this, event);
        };
      } else if (type2 === "error") {
        wrapper = function onError(error) {
          const event = new ErrorEvent("error", {
            error,
            message: error.message
          });
          event[kTarget] = this;
          callListener(handler, this, event);
        };
      } else if (type2 === "open") {
        wrapper = function onOpen() {
          const event = new Event2("open");
          event[kTarget] = this;
          callListener(handler, this, event);
        };
      } else {
        return;
      }
      wrapper[kForOnEventAttribute] = !!options2[kForOnEventAttribute];
      wrapper[kListener] = handler;
      if (options2.once) {
        this.once(type2, wrapper);
      } else {
        this.on(type2, wrapper);
      }
    },
    removeEventListener(type2, handler) {
      for (const listener of this.listeners(type2)) {
        if (listener[kListener] === handler && !listener[kForOnEventAttribute]) {
          this.removeListener(type2, listener);
          break;
        }
      }
    }
  };
  eventTarget = {
    CloseEvent,
    ErrorEvent,
    Event: Event2,
    EventTarget: EventTarget2,
    MessageEvent
  };
  function callListener(listener, thisArg, event) {
    if (typeof listener === "object" && listener.handleEvent) {
      listener.handleEvent.call(listener, event);
    } else {
      listener.call(thisArg, event);
    }
  }
  return eventTarget;
}
function requireExtension() {
  if (hasRequiredExtension) return extension;
  hasRequiredExtension = 1;
  const { tokenChars } = requireValidation();
  function push(dest, name, elem) {
    if (dest[name] === void 0) dest[name] = [elem];
    else dest[name].push(elem);
  }
  function parse2(header) {
    const offers = /* @__PURE__ */ Object.create(null);
    let params = /* @__PURE__ */ Object.create(null);
    let mustUnescape = false;
    let isEscaping = false;
    let inQuotes = false;
    let extensionName;
    let paramName;
    let start = -1;
    let code2 = -1;
    let end = -1;
    let i = 0;
    for (; i < header.length; i++) {
      code2 = header.charCodeAt(i);
      if (extensionName === void 0) {
        if (end === -1 && tokenChars[code2] === 1) {
          if (start === -1) start = i;
        } else if (i !== 0 && (code2 === 32 || code2 === 9)) {
          if (end === -1 && start !== -1) end = i;
        } else if (code2 === 59 || code2 === 44) {
          if (start === -1) {
            throw new SyntaxError(`Unexpected character at index ${i}`);
          }
          if (end === -1) end = i;
          const name = header.slice(start, end);
          if (code2 === 44) {
            push(offers, name, params);
            params = /* @__PURE__ */ Object.create(null);
          } else {
            extensionName = name;
          }
          start = end = -1;
        } else {
          throw new SyntaxError(`Unexpected character at index ${i}`);
        }
      } else if (paramName === void 0) {
        if (end === -1 && tokenChars[code2] === 1) {
          if (start === -1) start = i;
        } else if (code2 === 32 || code2 === 9) {
          if (end === -1 && start !== -1) end = i;
        } else if (code2 === 59 || code2 === 44) {
          if (start === -1) {
            throw new SyntaxError(`Unexpected character at index ${i}`);
          }
          if (end === -1) end = i;
          push(params, header.slice(start, end), true);
          if (code2 === 44) {
            push(offers, extensionName, params);
            params = /* @__PURE__ */ Object.create(null);
            extensionName = void 0;
          }
          start = end = -1;
        } else if (code2 === 61 && start !== -1 && end === -1) {
          paramName = header.slice(start, i);
          start = end = -1;
        } else {
          throw new SyntaxError(`Unexpected character at index ${i}`);
        }
      } else {
        if (isEscaping) {
          if (tokenChars[code2] !== 1) {
            throw new SyntaxError(`Unexpected character at index ${i}`);
          }
          if (start === -1) start = i;
          else if (!mustUnescape) mustUnescape = true;
          isEscaping = false;
        } else if (inQuotes) {
          if (tokenChars[code2] === 1) {
            if (start === -1) start = i;
          } else if (code2 === 34 && start !== -1) {
            inQuotes = false;
            end = i;
          } else if (code2 === 92) {
            isEscaping = true;
          } else {
            throw new SyntaxError(`Unexpected character at index ${i}`);
          }
        } else if (code2 === 34 && header.charCodeAt(i - 1) === 61) {
          inQuotes = true;
        } else if (end === -1 && tokenChars[code2] === 1) {
          if (start === -1) start = i;
        } else if (start !== -1 && (code2 === 32 || code2 === 9)) {
          if (end === -1) end = i;
        } else if (code2 === 59 || code2 === 44) {
          if (start === -1) {
            throw new SyntaxError(`Unexpected character at index ${i}`);
          }
          if (end === -1) end = i;
          let value = header.slice(start, end);
          if (mustUnescape) {
            value = value.replace(/\\/g, "");
            mustUnescape = false;
          }
          push(params, paramName, value);
          if (code2 === 44) {
            push(offers, extensionName, params);
            params = /* @__PURE__ */ Object.create(null);
            extensionName = void 0;
          }
          paramName = void 0;
          start = end = -1;
        } else {
          throw new SyntaxError(`Unexpected character at index ${i}`);
        }
      }
    }
    if (start === -1 || inQuotes || code2 === 32 || code2 === 9) {
      throw new SyntaxError("Unexpected end of input");
    }
    if (end === -1) end = i;
    const token = header.slice(start, end);
    if (extensionName === void 0) {
      push(offers, token, params);
    } else {
      if (paramName === void 0) {
        push(params, token, true);
      } else if (mustUnescape) {
        push(params, paramName, token.replace(/\\/g, ""));
      } else {
        push(params, paramName, token);
      }
      push(offers, extensionName, params);
    }
    return offers;
  }
  function format2(extensions) {
    return Object.keys(extensions).map((extension2) => {
      let configurations = extensions[extension2];
      if (!Array.isArray(configurations)) configurations = [configurations];
      return configurations.map((params) => {
        return [extension2].concat(
          Object.keys(params).map((k) => {
            let values = params[k];
            if (!Array.isArray(values)) values = [values];
            return values.map((v) => v === true ? k : `${k}=${v}`).join("; ");
          })
        ).join("; ");
      }).join(", ");
    }).join(", ");
  }
  extension = { format: format2, parse: parse2 };
  return extension;
}
function requireWebsocket() {
  if (hasRequiredWebsocket) return websocket;
  hasRequiredWebsocket = 1;
  const EventEmitter7 = require$$0$8;
  const https2 = require$$1$1;
  const http2 = require$$0$6;
  const net = require$$0$7;
  const tls = require$$1$2;
  const { randomBytes, createHash } = require$$2$1;
  const { Duplex, Readable } = require$$1$3;
  const { URL: URL3 } = require$$5;
  const PerMessageDeflate = requirePermessageDeflate();
  const Receiver = requireReceiver();
  const Sender = requireSender();
  const { isBlob } = requireValidation();
  const {
    BINARY_TYPES,
    CLOSE_TIMEOUT,
    EMPTY_BUFFER,
    GUID,
    kForOnEventAttribute,
    kListener,
    kStatusCode,
    kWebSocket,
    NOOP
  } = requireConstants();
  const {
    EventTarget: { addEventListener, removeEventListener }
  } = requireEventTarget();
  const { format: format2, parse: parse2 } = requireExtension();
  const { toBuffer } = requireBufferUtil();
  const kAborted = Symbol("kAborted");
  const protocolVersions = [8, 13];
  const readyStates = ["CONNECTING", "OPEN", "CLOSING", "CLOSED"];
  const subprotocolRegex = /^[!#$%&'*+\-.0-9A-Z^_`|a-z~]+$/;
  class WebSocket2 extends EventEmitter7 {
    constructor(address, protocols, options2) {
      super();
      this._binaryType = BINARY_TYPES[0];
      this._closeCode = 1006;
      this._closeFrameReceived = false;
      this._closeFrameSent = false;
      this._closeMessage = EMPTY_BUFFER;
      this._closeTimer = null;
      this._errorEmitted = false;
      this._extensions = {};
      this._paused = false;
      this._protocol = "";
      this._readyState = WebSocket2.CONNECTING;
      this._receiver = null;
      this._sender = null;
      this._socket = null;
      if (address !== null) {
        this._bufferedAmount = 0;
        this._isServer = false;
        this._redirects = 0;
        if (protocols === void 0) {
          protocols = [];
        } else if (!Array.isArray(protocols)) {
          if (typeof protocols === "object" && protocols !== null) {
            options2 = protocols;
            protocols = [];
          } else {
            protocols = [protocols];
          }
        }
        initAsClient(this, address, protocols, options2);
      } else {
        this._autoPong = options2.autoPong;
        this._closeTimeout = options2.closeTimeout;
        this._isServer = true;
      }
    }
    get binaryType() {
      return this._binaryType;
    }
    set binaryType(type2) {
      if (!BINARY_TYPES.includes(type2)) return;
      this._binaryType = type2;
      if (this._receiver) this._receiver._binaryType = type2;
    }
    get bufferedAmount() {
      if (!this._socket) return this._bufferedAmount;
      return this._socket._writableState.length + this._sender._bufferedBytes;
    }
    get extensions() {
      return Object.keys(this._extensions).join();
    }
    get isPaused() {
      return this._paused;
    }
    get onclose() {
      return null;
    }
    get onerror() {
      return null;
    }
    get onopen() {
      return null;
    }
    get onmessage() {
      return null;
    }
    get protocol() {
      return this._protocol;
    }
    get readyState() {
      return this._readyState;
    }
    get url() {
      return this._url;
    }
    setSocket(socket, head, options2) {
      const receiver2 = new Receiver({
        allowSynchronousEvents: options2.allowSynchronousEvents,
        binaryType: this.binaryType,
        extensions: this._extensions,
        isServer: this._isServer,
        maxPayload: options2.maxPayload,
        skipUTF8Validation: options2.skipUTF8Validation
      });
      const sender2 = new Sender(socket, this._extensions, options2.generateMask);
      this._receiver = receiver2;
      this._sender = sender2;
      this._socket = socket;
      receiver2[kWebSocket] = this;
      sender2[kWebSocket] = this;
      socket[kWebSocket] = this;
      receiver2.on("conclude", receiverOnConclude);
      receiver2.on("drain", receiverOnDrain);
      receiver2.on("error", receiverOnError);
      receiver2.on("message", receiverOnMessage);
      receiver2.on("ping", receiverOnPing);
      receiver2.on("pong", receiverOnPong);
      sender2.onerror = senderOnError;
      if (socket.setTimeout) socket.setTimeout(0);
      if (socket.setNoDelay) socket.setNoDelay();
      if (head.length > 0) socket.unshift(head);
      socket.on("close", socketOnClose);
      socket.on("data", socketOnData);
      socket.on("end", socketOnEnd);
      socket.on("error", socketOnError);
      this._readyState = WebSocket2.OPEN;
      this.emit("open");
    }
    emitClose() {
      if (!this._socket) {
        this._readyState = WebSocket2.CLOSED;
        this.emit("close", this._closeCode, this._closeMessage);
        return;
      }
      if (this._extensions[PerMessageDeflate.extensionName]) {
        this._extensions[PerMessageDeflate.extensionName].cleanup();
      }
      this._receiver.removeAllListeners();
      this._readyState = WebSocket2.CLOSED;
      this.emit("close", this._closeCode, this._closeMessage);
    }
    close(code2, data32) {
      if (this.readyState === WebSocket2.CLOSED) return;
      if (this.readyState === WebSocket2.CONNECTING) {
        const msg = "WebSocket was closed before the connection was established";
        abortHandshake(this, this._req, msg);
        return;
      }
      if (this.readyState === WebSocket2.CLOSING) {
        if (this._closeFrameSent && (this._closeFrameReceived || this._receiver._writableState.errorEmitted)) {
          this._socket.end();
        }
        return;
      }
      this._readyState = WebSocket2.CLOSING;
      this._sender.close(code2, data32, !this._isServer, (err) => {
        if (err) return;
        this._closeFrameSent = true;
        if (this._closeFrameReceived || this._receiver._writableState.errorEmitted) {
          this._socket.end();
        }
      });
      setCloseTimer(this);
    }
    pause() {
      if (this.readyState === WebSocket2.CONNECTING || this.readyState === WebSocket2.CLOSED) {
        return;
      }
      this._paused = true;
      this._socket.pause();
    }
    ping(data32, mask, cb) {
      if (this.readyState === WebSocket2.CONNECTING) {
        throw new Error("WebSocket is not open: readyState 0 (CONNECTING)");
      }
      if (typeof data32 === "function") {
        cb = data32;
        data32 = mask = void 0;
      } else if (typeof mask === "function") {
        cb = mask;
        mask = void 0;
      }
      if (typeof data32 === "number") data32 = data32.toString();
      if (this.readyState !== WebSocket2.OPEN) {
        sendAfterClose(this, data32, cb);
        return;
      }
      if (mask === void 0) mask = !this._isServer;
      this._sender.ping(data32 || EMPTY_BUFFER, mask, cb);
    }
    pong(data32, mask, cb) {
      if (this.readyState === WebSocket2.CONNECTING) {
        throw new Error("WebSocket is not open: readyState 0 (CONNECTING)");
      }
      if (typeof data32 === "function") {
        cb = data32;
        data32 = mask = void 0;
      } else if (typeof mask === "function") {
        cb = mask;
        mask = void 0;
      }
      if (typeof data32 === "number") data32 = data32.toString();
      if (this.readyState !== WebSocket2.OPEN) {
        sendAfterClose(this, data32, cb);
        return;
      }
      if (mask === void 0) mask = !this._isServer;
      this._sender.pong(data32 || EMPTY_BUFFER, mask, cb);
    }
    resume() {
      if (this.readyState === WebSocket2.CONNECTING || this.readyState === WebSocket2.CLOSED) {
        return;
      }
      this._paused = false;
      if (!this._receiver._writableState.needDrain) this._socket.resume();
    }
    send(data32, options2, cb) {
      if (this.readyState === WebSocket2.CONNECTING) {
        throw new Error("WebSocket is not open: readyState 0 (CONNECTING)");
      }
      if (typeof options2 === "function") {
        cb = options2;
        options2 = {};
      }
      if (typeof data32 === "number") data32 = data32.toString();
      if (this.readyState !== WebSocket2.OPEN) {
        sendAfterClose(this, data32, cb);
        return;
      }
      const opts = {
        binary: typeof data32 !== "string",
        mask: !this._isServer,
        compress: true,
        fin: true,
        ...options2
      };
      if (!this._extensions[PerMessageDeflate.extensionName]) {
        opts.compress = false;
      }
      this._sender.send(data32 || EMPTY_BUFFER, opts, cb);
    }
    terminate() {
      if (this.readyState === WebSocket2.CLOSED) return;
      if (this.readyState === WebSocket2.CONNECTING) {
        const msg = "WebSocket was closed before the connection was established";
        abortHandshake(this, this._req, msg);
        return;
      }
      if (this._socket) {
        this._readyState = WebSocket2.CLOSING;
        this._socket.destroy();
      }
    }
  }
  Object.defineProperty(WebSocket2, "CONNECTING", {
    enumerable: true,
    value: readyStates.indexOf("CONNECTING")
  });
  Object.defineProperty(WebSocket2.prototype, "CONNECTING", {
    enumerable: true,
    value: readyStates.indexOf("CONNECTING")
  });
  Object.defineProperty(WebSocket2, "OPEN", {
    enumerable: true,
    value: readyStates.indexOf("OPEN")
  });
  Object.defineProperty(WebSocket2.prototype, "OPEN", {
    enumerable: true,
    value: readyStates.indexOf("OPEN")
  });
  Object.defineProperty(WebSocket2, "CLOSING", {
    enumerable: true,
    value: readyStates.indexOf("CLOSING")
  });
  Object.defineProperty(WebSocket2.prototype, "CLOSING", {
    enumerable: true,
    value: readyStates.indexOf("CLOSING")
  });
  Object.defineProperty(WebSocket2, "CLOSED", {
    enumerable: true,
    value: readyStates.indexOf("CLOSED")
  });
  Object.defineProperty(WebSocket2.prototype, "CLOSED", {
    enumerable: true,
    value: readyStates.indexOf("CLOSED")
  });
  [
    "binaryType",
    "bufferedAmount",
    "extensions",
    "isPaused",
    "protocol",
    "readyState",
    "url"
  ].forEach((property) => {
    Object.defineProperty(WebSocket2.prototype, property, { enumerable: true });
  });
  ["open", "error", "close", "message"].forEach((method) => {
    Object.defineProperty(WebSocket2.prototype, `on${method}`, {
      enumerable: true,
      get() {
        for (const listener of this.listeners(method)) {
          if (listener[kForOnEventAttribute]) return listener[kListener];
        }
        return null;
      },
      set(handler) {
        for (const listener of this.listeners(method)) {
          if (listener[kForOnEventAttribute]) {
            this.removeListener(method, listener);
            break;
          }
        }
        if (typeof handler !== "function") return;
        this.addEventListener(method, handler, {
          [kForOnEventAttribute]: true
        });
      }
    });
  });
  WebSocket2.prototype.addEventListener = addEventListener;
  WebSocket2.prototype.removeEventListener = removeEventListener;
  websocket = WebSocket2;
  function initAsClient(websocket2, address, protocols, options2) {
    const opts = {
      allowSynchronousEvents: true,
      autoPong: true,
      closeTimeout: CLOSE_TIMEOUT,
      protocolVersion: protocolVersions[1],
      maxPayload: 100 * 1024 * 1024,
      skipUTF8Validation: false,
      perMessageDeflate: true,
      followRedirects: false,
      maxRedirects: 10,
      ...options2,
      socketPath: void 0,
      hostname: void 0,
      protocol: void 0,
      timeout: void 0,
      method: "GET",
      host: void 0,
      path: void 0,
      port: void 0
    };
    websocket2._autoPong = opts.autoPong;
    websocket2._closeTimeout = opts.closeTimeout;
    if (!protocolVersions.includes(opts.protocolVersion)) {
      throw new RangeError(
        `Unsupported protocol version: ${opts.protocolVersion} (supported versions: ${protocolVersions.join(", ")})`
      );
    }
    let parsedUrl;
    if (address instanceof URL3) {
      parsedUrl = address;
    } else {
      try {
        parsedUrl = new URL3(address);
      } catch (e) {
        throw new SyntaxError(`Invalid URL: ${address}`);
      }
    }
    if (parsedUrl.protocol === "http:") {
      parsedUrl.protocol = "ws:";
    } else if (parsedUrl.protocol === "https:") {
      parsedUrl.protocol = "wss:";
    }
    websocket2._url = parsedUrl.href;
    const isSecure = parsedUrl.protocol === "wss:";
    const isIpcUrl = parsedUrl.protocol === "ws+unix:";
    let invalidUrlMessage;
    if (parsedUrl.protocol !== "ws:" && !isSecure && !isIpcUrl) {
      invalidUrlMessage = `The URL's protocol must be one of "ws:", "wss:", "http:", "https:", or "ws+unix:"`;
    } else if (isIpcUrl && !parsedUrl.pathname) {
      invalidUrlMessage = "The URL's pathname is empty";
    } else if (parsedUrl.hash) {
      invalidUrlMessage = "The URL contains a fragment identifier";
    }
    if (invalidUrlMessage) {
      const err = new SyntaxError(invalidUrlMessage);
      if (websocket2._redirects === 0) {
        throw err;
      } else {
        emitErrorAndClose(websocket2, err);
        return;
      }
    }
    const defaultPort = isSecure ? 443 : 80;
    const key = randomBytes(16).toString("base64");
    const request3 = isSecure ? https2.request : http2.request;
    const protocolSet = /* @__PURE__ */ new Set();
    let perMessageDeflate;
    opts.createConnection = opts.createConnection || (isSecure ? tlsConnect : netConnect);
    opts.defaultPort = opts.defaultPort || defaultPort;
    opts.port = parsedUrl.port || defaultPort;
    opts.host = parsedUrl.hostname.startsWith("[") ? parsedUrl.hostname.slice(1, -1) : parsedUrl.hostname;
    opts.headers = {
      ...opts.headers,
      "Sec-WebSocket-Version": opts.protocolVersion,
      "Sec-WebSocket-Key": key,
      Connection: "Upgrade",
      Upgrade: "websocket"
    };
    opts.path = parsedUrl.pathname + parsedUrl.search;
    opts.timeout = opts.handshakeTimeout;
    if (opts.perMessageDeflate) {
      perMessageDeflate = new PerMessageDeflate(
        opts.perMessageDeflate !== true ? opts.perMessageDeflate : {},
        false,
        opts.maxPayload
      );
      opts.headers["Sec-WebSocket-Extensions"] = format2({
        [PerMessageDeflate.extensionName]: perMessageDeflate.offer()
      });
    }
    if (protocols.length) {
      for (const protocol2 of protocols) {
        if (typeof protocol2 !== "string" || !subprotocolRegex.test(protocol2) || protocolSet.has(protocol2)) {
          throw new SyntaxError(
            "An invalid or duplicated subprotocol was specified"
          );
        }
        protocolSet.add(protocol2);
      }
      opts.headers["Sec-WebSocket-Protocol"] = protocols.join(",");
    }
    if (opts.origin) {
      if (opts.protocolVersion < 13) {
        opts.headers["Sec-WebSocket-Origin"] = opts.origin;
      } else {
        opts.headers.Origin = opts.origin;
      }
    }
    if (parsedUrl.username || parsedUrl.password) {
      opts.auth = `${parsedUrl.username}:${parsedUrl.password}`;
    }
    if (isIpcUrl) {
      const parts = opts.path.split(":");
      opts.socketPath = parts[0];
      opts.path = parts[1];
    }
    let req;
    if (opts.followRedirects) {
      if (websocket2._redirects === 0) {
        websocket2._originalIpc = isIpcUrl;
        websocket2._originalSecure = isSecure;
        websocket2._originalHostOrSocketPath = isIpcUrl ? opts.socketPath : parsedUrl.host;
        const headers = options2 && options2.headers;
        options2 = { ...options2, headers: {} };
        if (headers) {
          for (const [key2, value] of Object.entries(headers)) {
            options2.headers[key2.toLowerCase()] = value;
          }
        }
      } else if (websocket2.listenerCount("redirect") === 0) {
        const isSameHost = isIpcUrl ? websocket2._originalIpc ? opts.socketPath === websocket2._originalHostOrSocketPath : false : websocket2._originalIpc ? false : parsedUrl.host === websocket2._originalHostOrSocketPath;
        if (!isSameHost || websocket2._originalSecure && !isSecure) {
          delete opts.headers.authorization;
          delete opts.headers.cookie;
          if (!isSameHost) delete opts.headers.host;
          opts.auth = void 0;
        }
      }
      if (opts.auth && !options2.headers.authorization) {
        options2.headers.authorization = "Basic " + Buffer.from(opts.auth).toString("base64");
      }
      req = websocket2._req = request3(opts);
      if (websocket2._redirects) {
        websocket2.emit("redirect", websocket2.url, req);
      }
    } else {
      req = websocket2._req = request3(opts);
    }
    if (opts.timeout) {
      req.on("timeout", () => {
        abortHandshake(websocket2, req, "Opening handshake has timed out");
      });
    }
    req.on("error", (err) => {
      if (req === null || req[kAborted]) return;
      req = websocket2._req = null;
      emitErrorAndClose(websocket2, err);
    });
    req.on("response", (res) => {
      const location = res.headers.location;
      const statusCode = res.statusCode;
      if (location && opts.followRedirects && statusCode >= 300 && statusCode < 400) {
        if (++websocket2._redirects > opts.maxRedirects) {
          abortHandshake(websocket2, req, "Maximum redirects exceeded");
          return;
        }
        req.abort();
        let addr;
        try {
          addr = new URL3(location, address);
        } catch (e) {
          const err = new SyntaxError(`Invalid URL: ${location}`);
          emitErrorAndClose(websocket2, err);
          return;
        }
        initAsClient(websocket2, addr, protocols, options2);
      } else if (!websocket2.emit("unexpected-response", req, res)) {
        abortHandshake(
          websocket2,
          req,
          `Unexpected server response: ${res.statusCode}`
        );
      }
    });
    req.on("upgrade", (res, socket, head) => {
      websocket2.emit("upgrade", res);
      if (websocket2.readyState !== WebSocket2.CONNECTING) return;
      req = websocket2._req = null;
      const upgrade = res.headers.upgrade;
      if (upgrade === void 0 || upgrade.toLowerCase() !== "websocket") {
        abortHandshake(websocket2, socket, "Invalid Upgrade header");
        return;
      }
      const digest = createHash("sha1").update(key + GUID).digest("base64");
      if (res.headers["sec-websocket-accept"] !== digest) {
        abortHandshake(websocket2, socket, "Invalid Sec-WebSocket-Accept header");
        return;
      }
      const serverProt = res.headers["sec-websocket-protocol"];
      let protError;
      if (serverProt !== void 0) {
        if (!protocolSet.size) {
          protError = "Server sent a subprotocol but none was requested";
        } else if (!protocolSet.has(serverProt)) {
          protError = "Server sent an invalid subprotocol";
        }
      } else if (protocolSet.size) {
        protError = "Server sent no subprotocol";
      }
      if (protError) {
        abortHandshake(websocket2, socket, protError);
        return;
      }
      if (serverProt) websocket2._protocol = serverProt;
      const secWebSocketExtensions = res.headers["sec-websocket-extensions"];
      if (secWebSocketExtensions !== void 0) {
        if (!perMessageDeflate) {
          const message = "Server sent a Sec-WebSocket-Extensions header but no extension was requested";
          abortHandshake(websocket2, socket, message);
          return;
        }
        let extensions;
        try {
          extensions = parse2(secWebSocketExtensions);
        } catch (err) {
          const message = "Invalid Sec-WebSocket-Extensions header";
          abortHandshake(websocket2, socket, message);
          return;
        }
        const extensionNames = Object.keys(extensions);
        if (extensionNames.length !== 1 || extensionNames[0] !== PerMessageDeflate.extensionName) {
          const message = "Server indicated an extension that was not requested";
          abortHandshake(websocket2, socket, message);
          return;
        }
        try {
          perMessageDeflate.accept(extensions[PerMessageDeflate.extensionName]);
        } catch (err) {
          const message = "Invalid Sec-WebSocket-Extensions header";
          abortHandshake(websocket2, socket, message);
          return;
        }
        websocket2._extensions[PerMessageDeflate.extensionName] = perMessageDeflate;
      }
      websocket2.setSocket(socket, head, {
        allowSynchronousEvents: opts.allowSynchronousEvents,
        generateMask: opts.generateMask,
        maxPayload: opts.maxPayload,
        skipUTF8Validation: opts.skipUTF8Validation
      });
    });
    if (opts.finishRequest) {
      opts.finishRequest(req, websocket2);
    } else {
      req.end();
    }
  }
  function emitErrorAndClose(websocket2, err) {
    websocket2._readyState = WebSocket2.CLOSING;
    websocket2._errorEmitted = true;
    websocket2.emit("error", err);
    websocket2.emitClose();
  }
  function netConnect(options2) {
    options2.path = options2.socketPath;
    return net.connect(options2);
  }
  function tlsConnect(options2) {
    options2.path = void 0;
    if (!options2.servername && options2.servername !== "") {
      options2.servername = net.isIP(options2.host) ? "" : options2.host;
    }
    return tls.connect(options2);
  }
  function abortHandshake(websocket2, stream3, message) {
    websocket2._readyState = WebSocket2.CLOSING;
    const err = new Error(message);
    Error.captureStackTrace(err, abortHandshake);
    if (stream3.setHeader) {
      stream3[kAborted] = true;
      stream3.abort();
      if (stream3.socket && !stream3.socket.destroyed) {
        stream3.socket.destroy();
      }
      process.nextTick(emitErrorAndClose, websocket2, err);
    } else {
      stream3.destroy(err);
      stream3.once("error", websocket2.emit.bind(websocket2, "error"));
      stream3.once("close", websocket2.emitClose.bind(websocket2));
    }
  }
  function sendAfterClose(websocket2, data32, cb) {
    if (data32) {
      const length = isBlob(data32) ? data32.size : toBuffer(data32).length;
      if (websocket2._socket) websocket2._sender._bufferedBytes += length;
      else websocket2._bufferedAmount += length;
    }
    if (cb) {
      const err = new Error(
        `WebSocket is not open: readyState ${websocket2.readyState} (${readyStates[websocket2.readyState]})`
      );
      process.nextTick(cb, err);
    }
  }
  function receiverOnConclude(code2, reason) {
    const websocket2 = this[kWebSocket];
    websocket2._closeFrameReceived = true;
    websocket2._closeMessage = reason;
    websocket2._closeCode = code2;
    if (websocket2._socket[kWebSocket] === void 0) return;
    websocket2._socket.removeListener("data", socketOnData);
    process.nextTick(resume, websocket2._socket);
    if (code2 === 1005) websocket2.close();
    else websocket2.close(code2, reason);
  }
  function receiverOnDrain() {
    const websocket2 = this[kWebSocket];
    if (!websocket2.isPaused) websocket2._socket.resume();
  }
  function receiverOnError(err) {
    const websocket2 = this[kWebSocket];
    if (websocket2._socket[kWebSocket] !== void 0) {
      websocket2._socket.removeListener("data", socketOnData);
      process.nextTick(resume, websocket2._socket);
      websocket2.close(err[kStatusCode]);
    }
    if (!websocket2._errorEmitted) {
      websocket2._errorEmitted = true;
      websocket2.emit("error", err);
    }
  }
  function receiverOnFinish() {
    this[kWebSocket].emitClose();
  }
  function receiverOnMessage(data32, isBinary) {
    this[kWebSocket].emit("message", data32, isBinary);
  }
  function receiverOnPing(data32) {
    const websocket2 = this[kWebSocket];
    if (websocket2._autoPong) websocket2.pong(data32, !this._isServer, NOOP);
    websocket2.emit("ping", data32);
  }
  function receiverOnPong(data32) {
    this[kWebSocket].emit("pong", data32);
  }
  function resume(stream3) {
    stream3.resume();
  }
  function senderOnError(err) {
    const websocket2 = this[kWebSocket];
    if (websocket2.readyState === WebSocket2.CLOSED) return;
    if (websocket2.readyState === WebSocket2.OPEN) {
      websocket2._readyState = WebSocket2.CLOSING;
      setCloseTimer(websocket2);
    }
    this._socket.end();
    if (!websocket2._errorEmitted) {
      websocket2._errorEmitted = true;
      websocket2.emit("error", err);
    }
  }
  function setCloseTimer(websocket2) {
    websocket2._closeTimer = setTimeout(
      websocket2._socket.destroy.bind(websocket2._socket),
      websocket2._closeTimeout
    );
  }
  function socketOnClose() {
    const websocket2 = this[kWebSocket];
    this.removeListener("close", socketOnClose);
    this.removeListener("data", socketOnData);
    this.removeListener("end", socketOnEnd);
    websocket2._readyState = WebSocket2.CLOSING;
    if (!this._readableState.endEmitted && !websocket2._closeFrameReceived && !websocket2._receiver._writableState.errorEmitted && this._readableState.length !== 0) {
      const chunk = this.read(this._readableState.length);
      websocket2._receiver.write(chunk);
    }
    websocket2._receiver.end();
    this[kWebSocket] = void 0;
    clearTimeout(websocket2._closeTimer);
    if (websocket2._receiver._writableState.finished || websocket2._receiver._writableState.errorEmitted) {
      websocket2.emitClose();
    } else {
      websocket2._receiver.on("error", receiverOnFinish);
      websocket2._receiver.on("finish", receiverOnFinish);
    }
  }
  function socketOnData(chunk) {
    if (!this[kWebSocket]._receiver.write(chunk)) {
      this.pause();
    }
  }
  function socketOnEnd() {
    const websocket2 = this[kWebSocket];
    websocket2._readyState = WebSocket2.CLOSING;
    websocket2._receiver.end();
    this.end();
  }
  function socketOnError() {
    const websocket2 = this[kWebSocket];
    this.removeListener("error", socketOnError);
    this.on("error", NOOP);
    if (websocket2) {
      websocket2._readyState = WebSocket2.CLOSING;
      this.destroy();
    }
  }
  return websocket;
}
function requireStream() {
  if (hasRequiredStream) return stream2;
  hasRequiredStream = 1;
  requireWebsocket();
  const { Duplex } = require$$1$3;
  function emitClose(stream3) {
    stream3.emit("close");
  }
  function duplexOnEnd() {
    if (!this.destroyed && this._writableState.finished) {
      this.destroy();
    }
  }
  function duplexOnError(err) {
    this.removeListener("error", duplexOnError);
    this.destroy();
    if (this.listenerCount("error") === 0) {
      this.emit("error", err);
    }
  }
  function createWebSocketStream(ws, options2) {
    let terminateOnDestroy = true;
    const duplex = new Duplex({
      ...options2,
      autoDestroy: false,
      emitClose: false,
      objectMode: false,
      writableObjectMode: false
    });
    ws.on("message", function message(msg, isBinary) {
      const data32 = !isBinary && duplex._readableState.objectMode ? msg.toString() : msg;
      if (!duplex.push(data32)) ws.pause();
    });
    ws.once("error", function error(err) {
      if (duplex.destroyed) return;
      terminateOnDestroy = false;
      duplex.destroy(err);
    });
    ws.once("close", function close() {
      if (duplex.destroyed) return;
      duplex.push(null);
    });
    duplex._destroy = function(err, callback) {
      if (ws.readyState === ws.CLOSED) {
        callback(err);
        process.nextTick(emitClose, duplex);
        return;
      }
      let called = false;
      ws.once("error", function error(err2) {
        called = true;
        callback(err2);
      });
      ws.once("close", function close() {
        if (!called) callback(err);
        process.nextTick(emitClose, duplex);
      });
      if (terminateOnDestroy) ws.terminate();
    };
    duplex._final = function(callback) {
      if (ws.readyState === ws.CONNECTING) {
        ws.once("open", function open() {
          duplex._final(callback);
        });
        return;
      }
      if (ws._socket === null) return;
      if (ws._socket._writableState.finished) {
        callback();
        if (duplex._readableState.endEmitted) duplex.destroy();
      } else {
        ws._socket.once("finish", function finish() {
          callback();
        });
        ws.close();
      }
    };
    duplex._read = function() {
      if (ws.isPaused) ws.resume();
    };
    duplex._write = function(chunk, encoding, callback) {
      if (ws.readyState === ws.CONNECTING) {
        ws.once("open", function open() {
          duplex._write(chunk, encoding, callback);
        });
        return;
      }
      ws.send(chunk, callback);
    };
    duplex.on("end", duplexOnEnd);
    duplex.on("error", duplexOnError);
    return duplex;
  }
  stream2 = createWebSocketStream;
  return stream2;
}
function requireSubprotocol() {
  if (hasRequiredSubprotocol) return subprotocol;
  hasRequiredSubprotocol = 1;
  const { tokenChars } = requireValidation();
  function parse2(header) {
    const protocols = /* @__PURE__ */ new Set();
    let start = -1;
    let end = -1;
    let i = 0;
    for (i; i < header.length; i++) {
      const code2 = header.charCodeAt(i);
      if (end === -1 && tokenChars[code2] === 1) {
        if (start === -1) start = i;
      } else if (i !== 0 && (code2 === 32 || code2 === 9)) {
        if (end === -1 && start !== -1) end = i;
      } else if (code2 === 44) {
        if (start === -1) {
          throw new SyntaxError(`Unexpected character at index ${i}`);
        }
        if (end === -1) end = i;
        const protocol3 = header.slice(start, end);
        if (protocols.has(protocol3)) {
          throw new SyntaxError(`The "${protocol3}" subprotocol is duplicated`);
        }
        protocols.add(protocol3);
        start = end = -1;
      } else {
        throw new SyntaxError(`Unexpected character at index ${i}`);
      }
    }
    if (start === -1 || end !== -1) {
      throw new SyntaxError("Unexpected end of input");
    }
    const protocol2 = header.slice(start, i);
    if (protocols.has(protocol2)) {
      throw new SyntaxError(`The "${protocol2}" subprotocol is duplicated`);
    }
    protocols.add(protocol2);
    return protocols;
  }
  subprotocol = { parse: parse2 };
  return subprotocol;
}
function requireWebsocketServer() {
  if (hasRequiredWebsocketServer) return websocketServer;
  hasRequiredWebsocketServer = 1;
  const EventEmitter7 = require$$0$8;
  const http2 = require$$0$6;
  const { Duplex } = require$$1$3;
  const { createHash } = require$$2$1;
  const extension2 = requireExtension();
  const PerMessageDeflate = requirePermessageDeflate();
  const subprotocol2 = requireSubprotocol();
  const WebSocket2 = requireWebsocket();
  const { CLOSE_TIMEOUT, GUID, kWebSocket } = requireConstants();
  const keyRegex = /^[+/0-9A-Za-z]{22}==$/;
  const RUNNING = 0;
  const CLOSING = 1;
  const CLOSED = 2;
  class WebSocketServer extends EventEmitter7 {
    constructor(options2, callback) {
      super();
      options2 = {
        allowSynchronousEvents: true,
        autoPong: true,
        maxPayload: 100 * 1024 * 1024,
        skipUTF8Validation: false,
        perMessageDeflate: false,
        handleProtocols: null,
        clientTracking: true,
        closeTimeout: CLOSE_TIMEOUT,
        verifyClient: null,
        noServer: false,
        backlog: null,
        server: null,
        host: null,
        path: null,
        port: null,
        WebSocket: WebSocket2,
        ...options2
      };
      if (options2.port == null && !options2.server && !options2.noServer || options2.port != null && (options2.server || options2.noServer) || options2.server && options2.noServer) {
        throw new TypeError(
          'One and only one of the "port", "server", or "noServer" options must be specified'
        );
      }
      if (options2.port != null) {
        this._server = http2.createServer((req, res) => {
          const body = http2.STATUS_CODES[426];
          res.writeHead(426, {
            "Content-Length": body.length,
            "Content-Type": "text/plain"
          });
          res.end(body);
        });
        this._server.listen(
          options2.port,
          options2.host,
          options2.backlog,
          callback
        );
      } else if (options2.server) {
        this._server = options2.server;
      }
      if (this._server) {
        const emitConnection = this.emit.bind(this, "connection");
        this._removeListeners = addListeners(this._server, {
          listening: this.emit.bind(this, "listening"),
          error: this.emit.bind(this, "error"),
          upgrade: (req, socket, head) => {
            this.handleUpgrade(req, socket, head, emitConnection);
          }
        });
      }
      if (options2.perMessageDeflate === true) options2.perMessageDeflate = {};
      if (options2.clientTracking) {
        this.clients = /* @__PURE__ */ new Set();
        this._shouldEmitClose = false;
      }
      this.options = options2;
      this._state = RUNNING;
    }
    address() {
      if (this.options.noServer) {
        throw new Error('The server is operating in "noServer" mode');
      }
      if (!this._server) return null;
      return this._server.address();
    }
    close(cb) {
      if (this._state === CLOSED) {
        if (cb) {
          this.once("close", () => {
            cb(new Error("The server is not running"));
          });
        }
        process.nextTick(emitClose, this);
        return;
      }
      if (cb) this.once("close", cb);
      if (this._state === CLOSING) return;
      this._state = CLOSING;
      if (this.options.noServer || this.options.server) {
        if (this._server) {
          this._removeListeners();
          this._removeListeners = this._server = null;
        }
        if (this.clients) {
          if (!this.clients.size) {
            process.nextTick(emitClose, this);
          } else {
            this._shouldEmitClose = true;
          }
        } else {
          process.nextTick(emitClose, this);
        }
      } else {
        const server2 = this._server;
        this._removeListeners();
        this._removeListeners = this._server = null;
        server2.close(() => {
          emitClose(this);
        });
      }
    }
    shouldHandle(req) {
      if (this.options.path) {
        const index2 = req.url.indexOf("?");
        const pathname = index2 !== -1 ? req.url.slice(0, index2) : req.url;
        if (pathname !== this.options.path) return false;
      }
      return true;
    }
    handleUpgrade(req, socket, head, cb) {
      socket.on("error", socketOnError);
      const key = req.headers["sec-websocket-key"];
      const upgrade = req.headers.upgrade;
      const version3 = +req.headers["sec-websocket-version"];
      if (req.method !== "GET") {
        const message = "Invalid HTTP method";
        abortHandshakeOrEmitwsClientError(this, req, socket, 405, message);
        return;
      }
      if (upgrade === void 0 || upgrade.toLowerCase() !== "websocket") {
        const message = "Invalid Upgrade header";
        abortHandshakeOrEmitwsClientError(this, req, socket, 400, message);
        return;
      }
      if (key === void 0 || !keyRegex.test(key)) {
        const message = "Missing or invalid Sec-WebSocket-Key header";
        abortHandshakeOrEmitwsClientError(this, req, socket, 400, message);
        return;
      }
      if (version3 !== 13 && version3 !== 8) {
        const message = "Missing or invalid Sec-WebSocket-Version header";
        abortHandshakeOrEmitwsClientError(this, req, socket, 400, message, {
          "Sec-WebSocket-Version": "13, 8"
        });
        return;
      }
      if (!this.shouldHandle(req)) {
        abortHandshake(socket, 400);
        return;
      }
      const secWebSocketProtocol = req.headers["sec-websocket-protocol"];
      let protocols = /* @__PURE__ */ new Set();
      if (secWebSocketProtocol !== void 0) {
        try {
          protocols = subprotocol2.parse(secWebSocketProtocol);
        } catch (err) {
          const message = "Invalid Sec-WebSocket-Protocol header";
          abortHandshakeOrEmitwsClientError(this, req, socket, 400, message);
          return;
        }
      }
      const secWebSocketExtensions = req.headers["sec-websocket-extensions"];
      const extensions = {};
      if (this.options.perMessageDeflate && secWebSocketExtensions !== void 0) {
        const perMessageDeflate = new PerMessageDeflate(
          this.options.perMessageDeflate,
          true,
          this.options.maxPayload
        );
        try {
          const offers = extension2.parse(secWebSocketExtensions);
          if (offers[PerMessageDeflate.extensionName]) {
            perMessageDeflate.accept(offers[PerMessageDeflate.extensionName]);
            extensions[PerMessageDeflate.extensionName] = perMessageDeflate;
          }
        } catch (err) {
          const message = "Invalid or unacceptable Sec-WebSocket-Extensions header";
          abortHandshakeOrEmitwsClientError(this, req, socket, 400, message);
          return;
        }
      }
      if (this.options.verifyClient) {
        const info = {
          origin: req.headers[`${version3 === 8 ? "sec-websocket-origin" : "origin"}`],
          secure: !!(req.socket.authorized || req.socket.encrypted),
          req
        };
        if (this.options.verifyClient.length === 2) {
          this.options.verifyClient(info, (verified, code2, message, headers) => {
            if (!verified) {
              return abortHandshake(socket, code2 || 401, message, headers);
            }
            this.completeUpgrade(
              extensions,
              key,
              protocols,
              req,
              socket,
              head,
              cb
            );
          });
          return;
        }
        if (!this.options.verifyClient(info)) return abortHandshake(socket, 401);
      }
      this.completeUpgrade(extensions, key, protocols, req, socket, head, cb);
    }
    completeUpgrade(extensions, key, protocols, req, socket, head, cb) {
      if (!socket.readable || !socket.writable) return socket.destroy();
      if (socket[kWebSocket]) {
        throw new Error(
          "server.handleUpgrade() was called more than once with the same socket, possibly due to a misconfiguration"
        );
      }
      if (this._state > RUNNING) return abortHandshake(socket, 503);
      const digest = createHash("sha1").update(key + GUID).digest("base64");
      const headers = [
        "HTTP/1.1 101 Switching Protocols",
        "Upgrade: websocket",
        "Connection: Upgrade",
        `Sec-WebSocket-Accept: ${digest}`
      ];
      const ws = new this.options.WebSocket(null, void 0, this.options);
      if (protocols.size) {
        const protocol2 = this.options.handleProtocols ? this.options.handleProtocols(protocols, req) : protocols.values().next().value;
        if (protocol2) {
          headers.push(`Sec-WebSocket-Protocol: ${protocol2}`);
          ws._protocol = protocol2;
        }
      }
      if (extensions[PerMessageDeflate.extensionName]) {
        const params = extensions[PerMessageDeflate.extensionName].params;
        const value = extension2.format({
          [PerMessageDeflate.extensionName]: [params]
        });
        headers.push(`Sec-WebSocket-Extensions: ${value}`);
        ws._extensions = extensions;
      }
      this.emit("headers", headers, req);
      socket.write(headers.concat("\r\n").join("\r\n"));
      socket.removeListener("error", socketOnError);
      ws.setSocket(socket, head, {
        allowSynchronousEvents: this.options.allowSynchronousEvents,
        maxPayload: this.options.maxPayload,
        skipUTF8Validation: this.options.skipUTF8Validation
      });
      if (this.clients) {
        this.clients.add(ws);
        ws.on("close", () => {
          this.clients.delete(ws);
          if (this._shouldEmitClose && !this.clients.size) {
            process.nextTick(emitClose, this);
          }
        });
      }
      cb(ws, req);
    }
  }
  websocketServer = WebSocketServer;
  function addListeners(server2, map2) {
    for (const event of Object.keys(map2)) server2.on(event, map2[event]);
    return function removeListeners() {
      for (const event of Object.keys(map2)) {
        server2.removeListener(event, map2[event]);
      }
    };
  }
  function emitClose(server2) {
    server2._state = CLOSED;
    server2.emit("close");
  }
  function socketOnError() {
    this.destroy();
  }
  function abortHandshake(socket, code2, message, headers) {
    message = message || http2.STATUS_CODES[code2];
    headers = {
      Connection: "close",
      "Content-Type": "text/html",
      "Content-Length": Buffer.byteLength(message),
      ...headers
    };
    socket.once("finish", socket.destroy);
    socket.end(
      `HTTP/1.1 ${code2} ${http2.STATUS_CODES[code2]}\r
` + Object.keys(headers).map((h) => `${h}: ${headers[h]}`).join("\r\n") + "\r\n\r\n" + message
    );
  }
  function abortHandshakeOrEmitwsClientError(server2, req, socket, code2, message, headers) {
    if (server2.listenerCount("wsClientError")) {
      const err = new Error(message);
      Error.captureStackTrace(err, abortHandshakeOrEmitwsClientError);
      server2.emit("wsClientError", err, socket, req);
    } else {
      abortHandshake(socket, code2, message, headers);
    }
  }
  return websocketServer;
}
function convertPuppeteerChannelToBrowsersChannel(channel) {
  switch (channel) {
    case "chrome":
      return ChromeReleaseChannel.STABLE;
    case "chrome-dev":
      return ChromeReleaseChannel.DEV;
    case "chrome-beta":
      return ChromeReleaseChannel.BETA;
    case "chrome-canary":
      return ChromeReleaseChannel.CANARY;
  }
}
async function rm(path14) {
  await fs2.promises.rm(path14, rmOptions);
}
function getFeatures(flag, options2 = []) {
  return options2.filter((s) => {
    return s.startsWith(flag.endsWith("=") ? flag : `${flag}=`);
  }).map((s) => {
    return s.split(new RegExp(`${flag}=\\s*`))[1]?.trim();
  }).filter((s) => {
    return s;
  });
}
function removeMatchingFlags(array2, flag) {
  const regex2 = new RegExp(`^${flag}=.*`);
  let i = 0;
  while (i < array2.length) {
    if (regex2.test(array2[i])) {
      array2.splice(i, 1);
    } else {
      i++;
    }
  }
  return array2;
}
function globalInstance() {
  if (!gInstance) {
    gInstance = new DevToolsContext();
  }
  return gInstance;
}
function getChromeVersion() {
  return "";
}
function registerAppProvider(registration) {
  registeredAppProvider.push(registration);
}
function getRegisteredAppProviders() {
  return registeredAppProvider.filter((provider) => Runtime.isDescriptorEnabled({ condition: provider.condition })).sort((firstProvider, secondProvider) => {
    const order1 = firstProvider.order || 0;
    const order2 = secondProvider.order || 0;
    return order1 - order2;
  });
}
function decode$1(input) {
  let bytesLength = input.length * 3 / 4 >>> 0;
  if (input.charCodeAt(input.length - 2) === 61) {
    bytesLength -= 2;
  } else if (input.charCodeAt(input.length - 1) === 61) {
    bytesLength -= 1;
  }
  const bytes2 = new Uint8Array(bytesLength);
  for (let index2 = 0, offset = 0; index2 < input.length; index2 += 4) {
    const a = BASE64_CODES$1[input.charCodeAt(index2 + 0)];
    const b = BASE64_CODES$1[input.charCodeAt(index2 + 1)];
    const c = BASE64_CODES$1[input.charCodeAt(index2 + 2)];
    const d = BASE64_CODES$1[input.charCodeAt(index2 + 3)];
    bytes2[offset++] = a << 2 | b >> 4;
    bytes2[offset++] = (b & 15) << 4 | c >> 2;
    bytes2[offset++] = (c & 3) << 6 | d & 63;
  }
  return bytes2;
}
function encode(input) {
  return new Promise((resolve2, reject) => {
    const reader = new FileReader();
    reader.onerror = () => reject(new Error("failed to convert to base64: internal error"));
    reader.onload = () => {
      if (reader.result === "") {
        reject(new Error("failed to convert to base64: input too large to encode as base64 string"));
        return;
      }
      const blobAsUrl = reader.result;
      const index2 = blobAsUrl.indexOf(",");
      const base642 = blobAsUrl.slice(index2 + 1);
      resolve2(base642);
    };
    reader.readAsDataURL(new Blob([input]));
  });
}
function swap2(array2, i1, i2) {
  const temp = array2[i1];
  array2[i1] = array2[i2];
  array2[i2] = temp;
}
function mergeOrIntersect2(array1, array2, comparator2, mergeNotIntersect) {
  const result = [];
  let i = 0;
  let j = 0;
  while (i < array1.length && j < array2.length) {
    const compareValue = comparator2(array1[i], array2[j]);
    {
      result.push(compareValue <= 0 ? array1[i] : array2[j]);
    }
    if (compareValue <= 0) {
      i++;
    }
    if (compareValue >= 0) {
      j++;
    }
  }
  {
    while (i < array1.length) {
      result.push(array1[i++]);
    }
    while (j < array2.length) {
      result.push(array2[j++]);
    }
  }
  return result;
}
function lowerBound2(array2, needle, comparator2, left2, right2) {
  let l = 0;
  let r = right2 !== void 0 ? right2 : array2.length;
  while (l < r) {
    const m = l + r >> 1;
    if (comparator2(needle, array2[m]) > 0) {
      l = m + 1;
    } else {
      r = m;
    }
  }
  return r;
}
function upperBound2(array2, needle, comparator2, left2, right2) {
  let l = 0;
  let r = array2.length;
  while (l < r) {
    const m = l + r >> 1;
    if (comparator2(needle, array2[m]) >= 0) {
      l = m + 1;
    } else {
      r = m;
    }
  }
  return r;
}
function nearestIndex2(arr, predicate, searchStart) {
  const searchFromEnd = searchStart === "END";
  if (arr.length === 0) {
    return null;
  }
  let left2 = 0;
  let right2 = arr.length - 1;
  let pivot = 0;
  let matchesPredicate = false;
  let moveToTheRight = false;
  let middle = 0;
  do {
    middle = left2 + (right2 - left2) / 2;
    pivot = searchFromEnd ? Math.ceil(middle) : Math.floor(middle);
    matchesPredicate = predicate(arr[pivot]);
    moveToTheRight = matchesPredicate === searchFromEnd;
    if (moveToTheRight) {
      left2 = Math.min(right2, pivot + (left2 === pivot ? 1 : 0));
    } else {
      right2 = Math.max(left2, pivot + (right2 === pivot ? -1 : 0));
    }
  } while (right2 !== left2);
  if (!predicate(arr[left2])) {
    return null;
  }
  return left2;
}
function nearestIndexFromBeginning2(arr, predicate) {
  return nearestIndex2(arr, predicate, "BEGINNING");
}
function nearestIndexFromEnd2(arr, predicate) {
  return nearestIndex2(arr, predicate, "END");
}
function arrayDoesNotContainNullOrUndefined2(arr) {
  return !arr.includes(null) && !arr.includes(void 0);
}
function getWithDefault2(map2, key, defaultValueFactory) {
  let value = map2.get(key);
  if (value === void 0 || value === null) {
    value = defaultValueFactory(key);
    map2.set(key, value);
  }
  return value;
}
function isTextType(mimeType) {
  return mimeType.startsWith("text/") || mimeType.startsWith("multipart/") || mimeType.includes("json") || mimeType.endsWith("+xml") || ADDITIONAL_TEXT_MIME_TYPES.has(mimeType);
}
function parseContentType(contentType) {
  if (contentType === "*/*") {
    return { mimeType: null, charset: null };
  }
  const { mimeType, params } = parseMimeType(contentType);
  const charset = params.get("charset")?.toLowerCase().trim() ?? null;
  return { mimeType, charset };
}
function parseMimeType(contentType) {
  contentType = contentType.trim();
  let mimeTypeEnd = findFirstIndexOf(contentType, " 	;(");
  if (mimeTypeEnd < 0) {
    mimeTypeEnd = contentType.length;
  }
  const slashPos = contentType.indexOf("/");
  if (slashPos < 0 || slashPos > mimeTypeEnd) {
    return { mimeType: null, params: /* @__PURE__ */ new Map() };
  }
  const mimeType = contentType.substring(0, mimeTypeEnd).toLowerCase();
  const params = /* @__PURE__ */ new Map();
  let offset = contentType.indexOf(";", mimeTypeEnd);
  while (offset >= 0 && offset < contentType.length) {
    ++offset;
    offset = findFirstIndexNotOf(contentType, " 	", offset);
    if (offset < 0) {
      continue;
    }
    const paramNameStart = offset;
    offset = findFirstIndexOf(contentType, ";=", offset);
    if (offset < 0 || contentType[offset] === ";") {
      continue;
    }
    const paramName = contentType.substring(paramNameStart, offset).toLowerCase();
    ++offset;
    offset = findFirstIndexNotOf(contentType, " 	", offset);
    let paramValue = "";
    if (offset < 0 || contentType[offset] === ";") {
      continue;
    } else if (contentType[offset] !== '"') {
      const valueStart = offset;
      offset = contentType.indexOf(";", offset);
      const valueEnd = offset >= 0 ? offset : contentType.length;
      paramValue = contentType.substring(valueStart, valueEnd).trimEnd();
    } else {
      ++offset;
      while (offset < contentType.length && contentType[offset] !== '"') {
        if (contentType[offset] === "\\" && offset + 1 < contentType.length) {
          ++offset;
        }
        paramValue += contentType[offset];
        ++offset;
      }
      offset = contentType.indexOf(";", offset);
    }
    if (!params.has(paramName)) {
      params.set(paramName, paramValue);
    }
  }
  return { mimeType, params };
}
function findFirstIndexOf(searchString, characters, pos = 0) {
  for (let i = pos; i < searchString.length; i++) {
    if (characters.includes(searchString[i])) {
      return i;
    }
  }
  return -1;
}
function findFirstIndexNotOf(searchString, characters, pos = 0) {
  for (let i = pos; i < searchString.length; i++) {
    if (!characters.includes(searchString[i])) {
      return i;
    }
  }
  return -1;
}
function toKebabCaseKeys(settingValue) {
  return Object.fromEntries(Object.entries(settingValue).map(([key, value]) => [toKebabCase(key), value]));
}
function milliSecondsToSeconds(x) {
  return x / 1e3;
}
function microSecondsToMilliSeconds(x) {
  return x / 1e3;
}
function assertNotNullOrUndefined2(val, message) {
  if (val === null || val === void 0) {
    throw new Error(`Expected given value to not be null/undefined but it was: ${val}${""}`);
  }
}
function assertNever2(_type, message) {
  throw new Error(message);
}
function degToRad(deg) {
  return deg * (Math.PI / 180);
}
function radToDeg(rad) {
  return rad * (180 / Math.PI);
}
function applyTransferFns(fn, r, g, b) {
  return [fn.eval(r), fn.eval(g), fn.eval(b)];
}
function blendColors(fgRGBA, bgRGBA) {
  const alpha = fgRGBA[3];
  return [
    (1 - alpha) * bgRGBA[0] + alpha * fgRGBA[0],
    (1 - alpha) * bgRGBA[1] + alpha * fgRGBA[1],
    (1 - alpha) * bgRGBA[2] + alpha * fgRGBA[2],
    alpha + bgRGBA[3] * (1 - alpha)
  ];
}
function rgbToHue([r, g, b]) {
  const max = Math.max(r, g, b);
  const min = Math.min(r, g, b);
  const diff = max - min;
  let h;
  if (min === max) {
    h = 0;
  } else if (r === max) {
    h = (1 / 6 * (g - b) / diff + 1) % 1;
  } else if (g === max) {
    h = 1 / 6 * (b - r) / diff + 1 / 3;
  } else {
    h = 1 / 6 * (r - g) / diff + 2 / 3;
  }
  return h;
}
function rgbToHsl(rgb) {
  const [h, s, l] = rgbaToHsla([...rgb, void 0]);
  return [h, s, l];
}
function rgbaToHsla([r, g, b, a]) {
  const max = Math.max(r, g, b);
  const min = Math.min(r, g, b);
  const diff = max - min;
  const sum = max + min;
  const h = rgbToHue([r, g, b]);
  const l = 0.5 * sum;
  let s;
  if (l === 0) {
    s = 0;
  } else if (l === 1) {
    s = 0;
  } else if (l <= 0.5) {
    s = diff / sum;
  } else {
    s = diff / (2 - sum);
  }
  return [h, s, l, a];
}
function rgbToHwb(rgb) {
  const [h, w, b] = rgbaToHwba([...rgb, void 0]);
  return [h, w, b];
}
function rgbaToHwba([r, g, b, a]) {
  const h = rgbToHue([r, g, b]);
  const max = Math.max(r, g, b);
  const min = Math.min(r, g, b);
  return [h, min, 1 - max, a];
}
function luminance([rSRGB, gSRGB, bSRGB]) {
  const r = rSRGB <= 0.04045 ? rSRGB / 12.92 : Math.pow((rSRGB + 0.055) / 1.055, 2.4);
  const g = gSRGB <= 0.04045 ? gSRGB / 12.92 : Math.pow((gSRGB + 0.055) / 1.055, 2.4);
  const b = bSRGB <= 0.04045 ? bSRGB / 12.92 : Math.pow((bSRGB + 0.055) / 1.055, 2.4);
  return 0.2126 * r + 0.7152 * g + 0.0722 * b;
}
function contrastRatio(fgRGBA, bgRGBA) {
  const blendedFg = blendColors(fgRGBA, bgRGBA);
  const fgLuminance = luminance(blendedFg);
  const bgLuminance = luminance(bgRGBA);
  const contrastRatio2 = (Math.max(fgLuminance, bgLuminance) + 0.05) / (Math.min(fgLuminance, bgLuminance) + 0.05);
  return contrastRatio2;
}
function luminanceAPCA([rSRGB, gSRGB, bSRGB]) {
  const r = Math.pow(rSRGB, mainTRC);
  const g = Math.pow(gSRGB, mainTRC);
  const b = Math.pow(bSRGB, mainTRC);
  return 0.2126729 * r + 0.7151522 * g + 0.072175 * b;
}
function contrastRatioAPCA(fgRGBA, bgRGBA) {
  const blendedFg = blendColors(fgRGBA, bgRGBA);
  return contrastRatioByLuminanceAPCA(luminanceAPCA(blendedFg), luminanceAPCA(bgRGBA));
}
function clampLuminance(value) {
  return value > blkThrs ? value : value + Math.pow(blkThrs - value, blkClmp);
}
function contrastRatioByLuminanceAPCA(fgLuminance, bgLuminance) {
  fgLuminance = clampLuminance(fgLuminance);
  bgLuminance = clampLuminance(bgLuminance);
  if (Math.abs(fgLuminance - bgLuminance) < deltaLuminanceMin) {
    return 0;
  }
  let result = 0;
  if (bgLuminance > fgLuminance) {
    result = (Math.pow(bgLuminance, normBgExp) - Math.pow(fgLuminance, normFgExp)) * scaleBoW;
    result = result < loClip ? 0 : result - loConOffset;
  } else {
    result = (Math.pow(bgLuminance, revBgExp) - Math.pow(fgLuminance, revFgExp)) * scaleWoB;
    result = result > -loClip ? 0 : result + loConOffset;
  }
  return result * 100;
}
function desiredLuminanceAPCA(luminance2, contrast, lighter) {
  luminance2 = clampLuminance(luminance2);
  contrast /= 100;
  function computeLuminance() {
    if (!lighter) {
      return Math.pow(Math.abs(Math.pow(luminance2, normBgExp) - (contrast + loConOffset) / scaleBoW), 1 / normFgExp);
    }
    return Math.pow(Math.abs(Math.pow(luminance2, revBgExp) - (-contrast - loConOffset) / scaleWoB), 1 / revFgExp);
  }
  let desiredLuminance2 = computeLuminance();
  if (desiredLuminance2 < 0 || desiredLuminance2 > 1) {
    lighter = !lighter;
    desiredLuminance2 = computeLuminance();
  }
  return desiredLuminance2;
}
function getAPCAThreshold(fontSize, fontWeight) {
  const size = parseFloat(fontSize.replace("px", ""));
  const weight = parseFloat(fontWeight);
  for (const [rowSize, ...rowWeights] of contrastAPCALookupTable) {
    if (size >= rowSize) {
      for (const [idx, keywordWeight] of [900, 800, 700, 600, 500, 400, 300, 200, 100].entries()) {
        if (weight >= keywordWeight) {
          const threshold = rowWeights[rowWeights.length - 1 - idx];
          return threshold === -1 ? null : threshold;
        }
      }
    }
  }
  return null;
}
function isLargeFont(fontSize, fontWeight) {
  const boldWeights = ["bold", "bolder"];
  const fontSizePx = parseFloat(fontSize.replace("px", ""));
  const isBold = isNaN(Number(fontWeight)) ? boldWeights.includes(fontWeight) : Number(fontWeight) >= 600;
  const fontSizePt = fontSizePx * 72 / 96;
  if (isBold) {
    return fontSizePt >= 14;
  }
  return fontSizePt >= 18;
}
function getContrastThreshold(fontSize, fontWeight) {
  if (isLargeFont(fontSize, fontWeight)) {
    return contrastThresholds.largeFont;
  }
  return contrastThresholds.normalFont;
}
function normalizeHue(hue) {
  return (hue % 360 + 360) % 360;
}
function parseAngle(angleText) {
  const angle = angleText.replace(/(deg|g?rad|turn)$/, "");
  if (isNaN(angle) || angleText.match(/\s+(deg|g?rad|turn)/)) {
    return null;
  }
  const number2 = parseFloat(angle);
  if (angleText.includes("turn")) {
    return number2 * 360;
  }
  if (angleText.includes("grad")) {
    return number2 * 9 / 10;
  }
  if (angleText.includes("rad")) {
    return number2 * 180 / Math.PI;
  }
  return number2;
}
function getFormat(formatText) {
  switch (formatText) {
    case "hex":
      return "hex";
    case "hexa":
      return "hexa";
    case "rgb":
      return "rgb";
    case "rgba":
      return "rgba";
    case "hsl":
      return "hsl";
    case "hsla":
      return "hsla";
    case "hwb":
      return "hwb";
    case "hwba":
      return "hwba";
    case "lch":
      return "lch";
    case "oklch":
      return "oklch";
    case "lab":
      return "lab";
    case "oklab":
      return "oklab";
  }
  return getColorSpace(formatText);
}
function getColorSpace(colorSpaceText) {
  switch (colorSpaceText) {
    case "srgb":
      return "srgb";
    case "srgb-linear":
      return "srgb-linear";
    case "display-p3":
      return "display-p3";
    case "a98-rgb":
      return "a98-rgb";
    case "prophoto-rgb":
      return "prophoto-rgb";
    case "rec2020":
      return "rec2020";
    case "xyz":
      return "xyz";
    case "xyz-d50":
      return "xyz-d50";
    case "xyz-d65":
      return "xyz-d65";
  }
  return null;
}
function mapPercentToRange(percent, range2) {
  const sign = Math.sign(percent);
  const absPercent = Math.abs(percent);
  const [outMin, outMax] = range2;
  return sign * (absPercent * (outMax - outMin) / 100 + outMin);
}
function parse$2(text) {
  if (!text.match(/\s/)) {
    const match2 = text.toLowerCase().match(/^(?:#([0-9a-f]{3,4}|[0-9a-f]{6}|[0-9a-f]{8})|(\w+))$/i);
    if (match2) {
      if (match2[1]) {
        return Legacy.fromHex(match2[1], text);
      }
      if (match2[2]) {
        return Nickname.fromName(match2[2], text);
      }
      return null;
    }
  }
  const match = text.toLowerCase().match(/^\s*(?:(rgba?)|(hsla?)|(hwba?)|(lch)|(oklch)|(lab)|(oklab)|(color))\((.*)\)\s*$/);
  if (match) {
    const isRgbaMatch = Boolean(match[1]);
    const isHslaMatch = Boolean(match[2]);
    const isHwbaMatch = Boolean(match[3]);
    const isLchMatch = Boolean(match[4]);
    const isOklchMatch = Boolean(match[5]);
    const isLabMatch = Boolean(match[6]);
    const isOklabMatch = Boolean(match[7]);
    const isColorMatch = Boolean(match[8]);
    const valuesText = match[9];
    if (isColorMatch) {
      return ColorFunction.fromSpec(text, valuesText);
    }
    const isOldSyntax = isRgbaMatch || isHslaMatch || isHwbaMatch;
    const allowCommas = isRgbaMatch || isHslaMatch;
    const convertNoneToZero = !isOldSyntax;
    const values = splitColorFunctionParameters(valuesText, { allowCommas, convertNoneToZero });
    if (!values) {
      return null;
    }
    const spec = [values[0], values[1], values[2], values[3]];
    if (isRgbaMatch) {
      return Legacy.fromRGBAFunction(values[0], values[1], values[2], values[3], text);
    }
    if (isHslaMatch) {
      return HSL.fromSpec(spec, text);
    }
    if (isHwbaMatch) {
      return HWB.fromSpec(spec, text);
    }
    if (isLchMatch) {
      return LCH.fromSpec(spec, text);
    }
    if (isOklchMatch) {
      return Oklch.fromSpec(spec, text);
    }
    if (isLabMatch) {
      return Lab.fromSpec(spec, text);
    }
    if (isOklabMatch) {
      return Oklab.fromSpec(spec, text);
    }
  }
  return null;
}
function splitColorFunctionParameters(content, { allowCommas, convertNoneToZero }) {
  const components = content.trim();
  let values = [];
  if (allowCommas) {
    values = components.split(/\s*,\s*/);
  }
  if (!allowCommas || values.length === 1) {
    values = components.split(/\s+/);
    if (values[3] === "/") {
      values.splice(3, 1);
      if (values.length !== 4) {
        return null;
      }
    } else if (values.length > 2 && values[2].indexOf("/") !== -1 || values.length > 3 && values[3].indexOf("/") !== -1) {
      const alpha = values.slice(2, 4).join("");
      values = values.slice(0, 2).concat(alpha.split(/\//)).concat(values.slice(4));
    } else if (values.length >= 4) {
      return null;
    }
  }
  if (values.length !== 3 && values.length !== 4 || values.indexOf("") > -1) {
    return null;
  }
  if (convertNoneToZero) {
    return values.map((value) => value === "none" ? "0" : value);
  }
  return values;
}
function clamp2(value, { min, max }) {
  if (value === null) {
    return value;
  }
  {
    value = Math.max(value, min);
  }
  if (max !== void 0) {
    value = Math.min(value, max);
  }
  return value;
}
function parsePercentage(value, range2) {
  if (!value.endsWith("%")) {
    return null;
  }
  const percentage = parseFloat(value.substr(0, value.length - 1));
  return isNaN(percentage) ? null : mapPercentToRange(percentage, range2);
}
function parseNumber(value) {
  const number2 = parseFloat(value);
  return isNaN(number2) ? null : number2;
}
function parseAlpha(value) {
  if (value === void 0) {
    return null;
  }
  return clamp2(parsePercentage(value, [0, 1]) ?? parseNumber(value), { min: 0, max: 1 });
}
function parsePercentOrNumber(value, range2 = [0, 1]) {
  if (isNaN(value.replace("%", ""))) {
    return null;
  }
  const parsed = parseFloat(value);
  if (value.indexOf("%") !== -1) {
    if (value.indexOf("%") !== value.length - 1) {
      return null;
    }
    return mapPercentToRange(parsed, range2);
  }
  return parsed;
}
function parseRgbNumeric(value) {
  const parsed = parsePercentOrNumber(value);
  if (parsed === null) {
    return null;
  }
  if (value.indexOf("%") !== -1) {
    return parsed;
  }
  return parsed / 255;
}
function parseHueNumeric(value) {
  const angle = value.replace(/(deg|g?rad|turn)$/, "");
  if (isNaN(angle) || value.match(/\s+(deg|g?rad|turn)/)) {
    return null;
  }
  const number2 = parseFloat(angle);
  if (value.indexOf("turn") !== -1) {
    return number2 % 1;
  }
  if (value.indexOf("grad") !== -1) {
    return number2 / 400 % 1;
  }
  if (value.indexOf("rad") !== -1) {
    return number2 / (2 * Math.PI) % 1;
  }
  return number2 / 360 % 1;
}
function parseSatLightNumeric(value) {
  if (value.indexOf("%") !== value.length - 1 || isNaN(value.replace("%", ""))) {
    return null;
  }
  const parsed = parseFloat(value);
  return parsed / 100;
}
function parseAlphaNumeric(value) {
  return parsePercentOrNumber(value);
}
function hsva2hsla(hsva) {
  const h = hsva[0];
  let s = hsva[1];
  const v = hsva[2];
  const t = (2 - s) * v;
  if (v === 0 || s === 0) {
    s = 0;
  } else {
    s *= v / (t < 1 ? t : 2 - t);
  }
  return [h, s, t / 2, hsva[3]];
}
function hsl2rgb(hsl) {
  const h = hsl[0];
  let s = hsl[1];
  const l = hsl[2];
  function hue2rgb(p2, q2, h2) {
    if (h2 < 0) {
      h2 += 1;
    } else if (h2 > 1) {
      h2 -= 1;
    }
    if (h2 * 6 < 1) {
      return p2 + (q2 - p2) * h2 * 6;
    }
    if (h2 * 2 < 1) {
      return q2;
    }
    if (h2 * 3 < 2) {
      return p2 + (q2 - p2) * (2 / 3 - h2) * 6;
    }
    return p2;
  }
  if (s < 0) {
    s = 0;
  }
  let q;
  if (l <= 0.5) {
    q = l * (1 + s);
  } else {
    q = l + s - l * s;
  }
  const p = 2 * l - q;
  const tr = h + 1 / 3;
  const tg = h;
  const tb = h - 1 / 3;
  return [hue2rgb(p, q, tr), hue2rgb(p, q, tg), hue2rgb(p, q, tb), hsl[3]];
}
function hwb2rgb(hwb) {
  const h = hwb[0];
  const w = hwb[1];
  const b = hwb[2];
  const whiteRatio = w / (w + b);
  let result = [whiteRatio, whiteRatio, whiteRatio, hwb[3]];
  if (w + b < 1) {
    result = hsl2rgb([h, 1, 0.5, hwb[3]]);
    for (let i = 0; i < 3; ++i) {
      result[i] += w - (w + b) * result[i];
    }
  }
  return result;
}
function hsva2rgba(hsva) {
  return hsl2rgb(hsva2hsla(hsva));
}
function rgb2hsv(rgba) {
  const hsla = rgbToHsl(rgba);
  const h = hsla[0];
  let s = hsla[1];
  const l = hsla[2];
  s *= l < 0.5 ? l : 1 - l;
  return [h, s !== 0 ? 2 * s / (l + s) : 0, l + s];
}
function desiredLuminance(luminance2, contrast, lighter) {
  function computeLuminance() {
    if (lighter) {
      return (luminance2 + 0.05) * contrast - 0.05;
    }
    return (luminance2 + 0.05) / contrast - 0.05;
  }
  let desiredLuminance2 = computeLuminance();
  if (desiredLuminance2 < 0 || desiredLuminance2 > 1) {
    lighter = !lighter;
    desiredLuminance2 = computeLuminance();
  }
  return desiredLuminance2;
}
function approachColorValue(candidateHSVA, index2, desiredLuminance2, candidateLuminance) {
  const epsilon = 2e-4;
  let x = candidateHSVA[index2];
  let multiplier = 1;
  let dLuminance = candidateLuminance(candidateHSVA) - desiredLuminance2;
  let previousSign = Math.sign(dLuminance);
  for (let guard = 100; guard; guard--) {
    if (Math.abs(dLuminance) < epsilon) {
      candidateHSVA[index2] = x;
      return x;
    }
    const sign = Math.sign(dLuminance);
    if (sign !== previousSign) {
      multiplier /= 2;
      previousSign = sign;
    } else if (x < 0 || x > 1) {
      return null;
    }
    x += multiplier * (index2 === 2 ? -dLuminance : dLuminance);
    candidateHSVA[index2] = x;
    dLuminance = candidateLuminance(candidateHSVA) - desiredLuminance2;
  }
  return null;
}
function findFgColorForContrast(fgColor, bgColor, requiredContrast) {
  const candidateHSVA = fgColor.as("hsl").hsva();
  const bgRGBA = bgColor.rgba();
  const candidateLuminance = (candidateHSVA2) => {
    return luminance(blendColors(Legacy.fromHSVA(candidateHSVA2).rgba(), bgRGBA));
  };
  const bgLuminance = luminance(bgColor.rgba());
  const fgLuminance = candidateLuminance(candidateHSVA);
  const fgIsLighter = fgLuminance > bgLuminance;
  const desired = desiredLuminance(bgLuminance, requiredContrast, fgIsLighter);
  const saturationComponentIndex = 1;
  const valueComponentIndex = 2;
  if (approachColorValue(candidateHSVA, valueComponentIndex, desired, candidateLuminance)) {
    return Legacy.fromHSVA(candidateHSVA);
  }
  candidateHSVA[valueComponentIndex] = 1;
  if (approachColorValue(candidateHSVA, saturationComponentIndex, desired, candidateLuminance)) {
    return Legacy.fromHSVA(candidateHSVA);
  }
  return null;
}
function findFgColorForContrastAPCA(fgColor, bgColor, requiredContrast) {
  const candidateHSVA = fgColor.as("hsl").hsva();
  const candidateLuminance = (candidateHSVA2) => {
    return luminanceAPCA(Legacy.fromHSVA(candidateHSVA2).rgba());
  };
  const bgLuminance = luminanceAPCA(bgColor.rgba());
  const fgLuminance = candidateLuminance(candidateHSVA);
  const fgIsLighter = fgLuminance >= bgLuminance;
  const desiredLuminance2 = desiredLuminanceAPCA(bgLuminance, requiredContrast, fgIsLighter);
  const saturationComponentIndex = 1;
  const valueComponentIndex = 2;
  if (approachColorValue(candidateHSVA, valueComponentIndex, desiredLuminance2, candidateLuminance)) {
    const candidate = Legacy.fromHSVA(candidateHSVA);
    if (Math.abs(contrastRatioAPCA(bgColor.rgba(), candidate.rgba())) >= requiredContrast) {
      return candidate;
    }
  }
  candidateHSVA[valueComponentIndex] = 1;
  if (approachColorValue(candidateHSVA, saturationComponentIndex, desiredLuminance2, candidateLuminance)) {
    const candidate = Legacy.fromHSVA(candidateHSVA);
    if (Math.abs(contrastRatioAPCA(bgColor.rgba(), candidate.rgba())) >= requiredContrast) {
      return candidate;
    }
  }
  return null;
}
function equals(a, b, accuracy = EPSILON) {
  if (Array.isArray(a) && Array.isArray(b)) {
    if (a.length !== b.length) {
      return false;
    }
    for (const i in a) {
      if (!equals(a[i], b[i])) {
        return false;
      }
    }
    return true;
  }
  if (Array.isArray(a) || Array.isArray(b)) {
    return false;
  }
  if (a === null || b === null) {
    return a === b;
  }
  return Math.abs(a - b) < accuracy;
}
function lessOrEquals(a, b, accuracy = EPSILON) {
  return a - b <= accuracy;
}
function toRgbValue(value) {
  return Math.round(value * 255);
}
function eventMixin(base) {
  console.assert(base !== HTMLElement);
  return class EventHandling extends base {
    #events = new ObjectWrapper();
    addEventListener(eventType, listener, thisObject) {
      return this.#events.addEventListener(eventType, listener, thisObject);
    }
    once(eventType) {
      return this.#events.once(eventType);
    }
    removeEventListener(eventType, listener, thisObject) {
      this.#events.removeEventListener(eventType, listener, thisObject);
    }
    hasEventListeners(eventType) {
      return this.#events.hasEventListeners(eventType);
    }
    dispatchEventToListeners(eventType, ...eventData) {
      this.#events.dispatchEventToListeners(eventType, ...eventData);
    }
  };
}
function localeLanguagesMatch(localeString1, localeString2) {
  const locale1 = new Intl.Locale(localeString1);
  const locale2 = new Intl.Locale(localeString2);
  return locale1.language === locale2.language;
}
function defineFormatter(options2) {
  let intlNumberFormat;
  return {
    format(value, separator) {
      if (!intlNumberFormat) {
        intlNumberFormat = new Intl.NumberFormat(DevToolsLocale.instance().locale, options2);
      }
      return formatAndEnsureSpace$1(intlNumberFormat, value, separator);
    },
    formatToParts(value) {
      if (!intlNumberFormat) {
        intlNumberFormat = new Intl.NumberFormat(DevToolsLocale.instance().locale, options2);
      }
      return intlNumberFormat.formatToParts(value);
    }
  };
}
function formatAndEnsureSpace$1(formatter2, value, separator = "\xA0") {
  const parts = formatter2.formatToParts(value);
  let hasSpace = false;
  for (const part of parts) {
    if (part.type === "literal") {
      if (part.value === " ") {
        hasSpace = true;
        part.value = separator;
      } else if (part.value === separator) {
        hasSpace = true;
      }
    }
  }
  if (hasSpace) {
    return parts.map((part) => part.value).join("");
  }
  const unitIndex = parts.findIndex((part) => part.type === "unit");
  if (unitIndex === -1) {
    return parts.map((part) => part.value).join("");
  }
  if (unitIndex === 0) {
    return parts[0].value + separator + parts.slice(1).map((part) => part.value).join("");
  }
  return parts.slice(0, unitIndex).map((part) => part.value).join("") + separator + parts.slice(unitIndex).map((part) => part.value).join("");
}
function isLiteralElement(el) {
  return el.type === TYPE2.literal;
}
function isArgumentElement(el) {
  return el.type === TYPE2.argument;
}
function isNumberElement(el) {
  return el.type === TYPE2.number;
}
function isDateElement(el) {
  return el.type === TYPE2.date;
}
function isTimeElement(el) {
  return el.type === TYPE2.time;
}
function isSelectElement(el) {
  return el.type === TYPE2.select;
}
function isPluralElement(el) {
  return el.type === TYPE2.plural;
}
function isPoundElement(el) {
  return el.type === TYPE2.pound;
}
function isTagElement(el) {
  return el.type === TYPE2.tag;
}
function isNumberSkeleton(el) {
  return !!(el && typeof el === "object" && el.type === SKELETON_TYPE.number);
}
function isDateTimeSkeleton(el) {
  return !!(el && typeof el === "object" && el.type === SKELETON_TYPE.dateTime);
}
function parseDateTimeSkeleton(skeleton) {
  var result = {};
  skeleton.replace(DATE_TIME_REGEX, function(match) {
    var len = match.length;
    switch (match[0]) {
      case "G":
        result.era = len === 4 ? "long" : len === 5 ? "narrow" : "short";
        break;
      case "y":
        result.year = len === 2 ? "2-digit" : "numeric";
        break;
      case "Y":
      case "u":
      case "U":
      case "r":
        throw new RangeError("`Y/u/U/r` (year) patterns are not supported, use `y` instead");
      case "q":
      case "Q":
        throw new RangeError("`q/Q` (quarter) patterns are not supported");
      case "M":
      case "L":
        result.month = ["numeric", "2-digit", "short", "long", "narrow"][len - 1];
        break;
      case "w":
      case "W":
        throw new RangeError("`w/W` (week) patterns are not supported");
      case "d":
        result.day = ["numeric", "2-digit"][len - 1];
        break;
      case "D":
      case "F":
      case "g":
        throw new RangeError("`D/F/g` (day) patterns are not supported, use `d` instead");
      case "E":
        result.weekday = len === 4 ? "short" : len === 5 ? "narrow" : "short";
        break;
      case "e":
        if (len < 4) {
          throw new RangeError("`e..eee` (weekday) patterns are not supported");
        }
        result.weekday = ["short", "long", "narrow", "short"][len - 4];
        break;
      case "c":
        if (len < 4) {
          throw new RangeError("`c..ccc` (weekday) patterns are not supported");
        }
        result.weekday = ["short", "long", "narrow", "short"][len - 4];
        break;
      case "a":
        result.hour12 = true;
        break;
      case "b":
      case "B":
        throw new RangeError("`b/B` (period) patterns are not supported, use `a` instead");
      case "h":
        result.hourCycle = "h12";
        result.hour = ["numeric", "2-digit"][len - 1];
        break;
      case "H":
        result.hourCycle = "h23";
        result.hour = ["numeric", "2-digit"][len - 1];
        break;
      case "K":
        result.hourCycle = "h11";
        result.hour = ["numeric", "2-digit"][len - 1];
        break;
      case "k":
        result.hourCycle = "h24";
        result.hour = ["numeric", "2-digit"][len - 1];
        break;
      case "j":
      case "J":
      case "C":
        throw new RangeError("`j/J/C` (hour) patterns are not supported, use `h/H/K/k` instead");
      case "m":
        result.minute = ["numeric", "2-digit"][len - 1];
        break;
      case "s":
        result.second = ["numeric", "2-digit"][len - 1];
        break;
      case "S":
      case "A":
        throw new RangeError("`S/A` (second) patterns are not supported, use `s` instead");
      case "z":
        result.timeZoneName = len < 4 ? "short" : "long";
        break;
      case "Z":
      case "O":
      case "v":
      case "V":
      case "X":
      case "x":
        throw new RangeError("`Z/O/v/V/X/x` (timeZone) patterns are not supported, use `z` instead");
    }
    return "";
  });
  return result;
}
function parseNumberSkeletonFromString(skeleton) {
  if (skeleton.length === 0) {
    throw new Error("Number skeleton cannot be empty");
  }
  var stringTokens = skeleton.split(WHITE_SPACE_REGEX).filter(function(x) {
    return x.length > 0;
  });
  var tokens = [];
  for (var _i = 0, stringTokens_1 = stringTokens; _i < stringTokens_1.length; _i++) {
    var stringToken = stringTokens_1[_i];
    var stemAndOptions = stringToken.split("/");
    if (stemAndOptions.length === 0) {
      throw new Error("Invalid number skeleton");
    }
    var stem = stemAndOptions[0], options2 = stemAndOptions.slice(1);
    for (var _a22 = 0, options_1 = options2; _a22 < options_1.length; _a22++) {
      var option = options_1[_a22];
      if (option.length === 0) {
        throw new Error("Invalid number skeleton");
      }
    }
    tokens.push({ stem, options: options2 });
  }
  return tokens;
}
function icuUnitToEcma(unit) {
  return unit.replace(/^(.*?)-/, "");
}
function parseSignificantPrecision(str) {
  var result = {};
  str.replace(SIGNIFICANT_PRECISION_REGEX, function(_, g1, g2) {
    if (typeof g2 !== "string") {
      result.minimumSignificantDigits = g1.length;
      result.maximumSignificantDigits = g1.length;
    } else if (g2 === "+") {
      result.minimumSignificantDigits = g1.length;
    } else if (g1[0] === "#") {
      result.maximumSignificantDigits = g1.length;
    } else {
      result.minimumSignificantDigits = g1.length;
      result.maximumSignificantDigits = g1.length + (typeof g2 === "string" ? g2.length : 0);
    }
    return "";
  });
  return result;
}
function parseSign(str) {
  switch (str) {
    case "sign-auto":
      return {
        signDisplay: "auto"
      };
    case "sign-accounting":
    case "()":
      return {
        currencySign: "accounting"
      };
    case "sign-always":
    case "+!":
      return {
        signDisplay: "always"
      };
    case "sign-accounting-always":
    case "()!":
      return {
        signDisplay: "always",
        currencySign: "accounting"
      };
    case "sign-except-zero":
    case "+?":
      return {
        signDisplay: "exceptZero"
      };
    case "sign-accounting-except-zero":
    case "()?":
      return {
        signDisplay: "exceptZero",
        currencySign: "accounting"
      };
    case "sign-never":
    case "+_":
      return {
        signDisplay: "never"
      };
  }
}
function parseConciseScientificAndEngineeringStem(stem) {
  var result;
  if (stem[0] === "E" && stem[1] === "E") {
    result = {
      notation: "engineering"
    };
    stem = stem.slice(2);
  } else if (stem[0] === "E") {
    result = {
      notation: "scientific"
    };
    stem = stem.slice(1);
  }
  if (result) {
    var signDisplay = stem.slice(0, 2);
    if (signDisplay === "+!") {
      result.signDisplay = "always";
      stem = stem.slice(2);
    } else if (signDisplay === "+?") {
      result.signDisplay = "exceptZero";
      stem = stem.slice(2);
    }
    if (!CONCISE_INTEGER_WIDTH_REGEX.test(stem)) {
      throw new Error("Malformed concise eng/scientific notation");
    }
    result.minimumIntegerDigits = stem.length;
  }
  return result;
}
function parseNotationOptions(opt) {
  var result = {};
  var signOpts = parseSign(opt);
  if (signOpts) {
    return signOpts;
  }
  return result;
}
function parseNumberSkeleton(tokens) {
  var result = {};
  for (var _i = 0, tokens_1 = tokens; _i < tokens_1.length; _i++) {
    var token = tokens_1[_i];
    switch (token.stem) {
      case "percent":
      case "%":
        result.style = "percent";
        continue;
      case "%x100":
        result.style = "percent";
        result.scale = 100;
        continue;
      case "currency":
        result.style = "currency";
        result.currency = token.options[0];
        continue;
      case "group-off":
      case ",_":
        result.useGrouping = false;
        continue;
      case "precision-integer":
      case ".":
        result.maximumFractionDigits = 0;
        continue;
      case "measure-unit":
      case "unit":
        result.style = "unit";
        result.unit = icuUnitToEcma(token.options[0]);
        continue;
      case "compact-short":
      case "K":
        result.notation = "compact";
        result.compactDisplay = "short";
        continue;
      case "compact-long":
      case "KK":
        result.notation = "compact";
        result.compactDisplay = "long";
        continue;
      case "scientific":
        result = __assign4(__assign4(__assign4({}, result), { notation: "scientific" }), token.options.reduce(function(all, opt) {
          return __assign4(__assign4({}, all), parseNotationOptions(opt));
        }, {}));
        continue;
      case "engineering":
        result = __assign4(__assign4(__assign4({}, result), { notation: "engineering" }), token.options.reduce(function(all, opt) {
          return __assign4(__assign4({}, all), parseNotationOptions(opt));
        }, {}));
        continue;
      case "notation-simple":
        result.notation = "standard";
        continue;
      case "unit-width-narrow":
        result.currencyDisplay = "narrowSymbol";
        result.unitDisplay = "narrow";
        continue;
      case "unit-width-short":
        result.currencyDisplay = "code";
        result.unitDisplay = "short";
        continue;
      case "unit-width-full-name":
        result.currencyDisplay = "name";
        result.unitDisplay = "long";
        continue;
      case "unit-width-iso-code":
        result.currencyDisplay = "symbol";
        continue;
      case "scale":
        result.scale = parseFloat(token.options[0]);
        continue;
      case "integer-width":
        if (token.options.length > 1) {
          throw new RangeError("integer-width stems only accept a single optional option");
        }
        token.options[0].replace(INTEGER_WIDTH_REGEX, function(_, g1, g2, g3, g4, g5) {
          if (g1) {
            result.minimumIntegerDigits = g2.length;
          } else if (g3 && g4) {
            throw new Error("We currently do not support maximum integer digits");
          } else if (g5) {
            throw new Error("We currently do not support exact integer digits");
          }
          return "";
        });
        continue;
    }
    if (CONCISE_INTEGER_WIDTH_REGEX.test(token.stem)) {
      result.minimumIntegerDigits = token.stem.length;
      continue;
    }
    if (FRACTION_PRECISION_REGEX.test(token.stem)) {
      if (token.options.length > 1) {
        throw new RangeError("Fraction-precision stems only accept a single optional option");
      }
      token.stem.replace(FRACTION_PRECISION_REGEX, function(_, g1, g2, g3, g4, g5) {
        if (g2 === "*") {
          result.minimumFractionDigits = g1.length;
        } else if (g3 && g3[0] === "#") {
          result.maximumFractionDigits = g3.length;
        } else if (g4 && g5) {
          result.minimumFractionDigits = g4.length;
          result.maximumFractionDigits = g4.length + g5.length;
        } else {
          result.minimumFractionDigits = g1.length;
          result.maximumFractionDigits = g1.length;
        }
        return "";
      });
      if (token.options.length) {
        result = __assign4(__assign4({}, result), parseSignificantPrecision(token.options[0]));
      }
      continue;
    }
    if (SIGNIFICANT_PRECISION_REGEX.test(token.stem)) {
      result = __assign4(__assign4({}, result), parseSignificantPrecision(token.stem));
      continue;
    }
    var signOpts = parseSign(token.stem);
    if (signOpts) {
      result = __assign4(__assign4({}, result), signOpts);
    }
    var conciseScientificAndEngineeringOpts = parseConciseScientificAndEngineeringStem(token.stem);
    if (conciseScientificAndEngineeringOpts) {
      result = __assign4(__assign4({}, result), conciseScientificAndEngineeringOpts);
    }
  }
  return result;
}
function createLocation(start, end) {
  return { start, end };
}
function RE(s, flag) {
  return new RegExp(s, flag);
}
function _isAlpha(codepoint) {
  return codepoint >= 97 && codepoint <= 122 || codepoint >= 65 && codepoint <= 90;
}
function _isAlphaOrSlash(codepoint) {
  return _isAlpha(codepoint) || codepoint === 47;
}
function _isPotentialElementNameChar(c) {
  return c === 45 || c === 46 || c >= 48 && c <= 57 || c === 95 || c >= 97 && c <= 122 || c >= 65 && c <= 90 || c == 183 || c >= 192 && c <= 214 || c >= 216 && c <= 246 || c >= 248 && c <= 893 || c >= 895 && c <= 8191 || c >= 8204 && c <= 8205 || c >= 8255 && c <= 8256 || c >= 8304 && c <= 8591 || c >= 11264 && c <= 12271 || c >= 12289 && c <= 55295 || c >= 63744 && c <= 64975 || c >= 65008 && c <= 65533 || c >= 65536 && c <= 983039;
}
function _isWhiteSpace(c) {
  return c >= 9 && c <= 13 || c === 32 || c === 133 || c >= 8206 && c <= 8207 || c === 8232 || c === 8233;
}
function _isPatternSyntax(c) {
  return c >= 33 && c <= 35 || c === 36 || c >= 37 && c <= 39 || c === 40 || c === 41 || c === 42 || c === 43 || c === 44 || c === 45 || c >= 46 && c <= 47 || c >= 58 && c <= 59 || c >= 60 && c <= 62 || c >= 63 && c <= 64 || c === 91 || c === 92 || c === 93 || c === 94 || c === 96 || c === 123 || c === 124 || c === 125 || c === 126 || c === 161 || c >= 162 && c <= 165 || c === 166 || c === 167 || c === 169 || c === 171 || c === 172 || c === 174 || c === 176 || c === 177 || c === 182 || c === 187 || c === 191 || c === 215 || c === 247 || c >= 8208 && c <= 8213 || c >= 8214 && c <= 8215 || c === 8216 || c === 8217 || c === 8218 || c >= 8219 && c <= 8220 || c === 8221 || c === 8222 || c === 8223 || c >= 8224 && c <= 8231 || c >= 8240 && c <= 8248 || c === 8249 || c === 8250 || c >= 8251 && c <= 8254 || c >= 8257 && c <= 8259 || c === 8260 || c === 8261 || c === 8262 || c >= 8263 && c <= 8273 || c === 8274 || c === 8275 || c >= 8277 && c <= 8286 || c >= 8592 && c <= 8596 || c >= 8597 && c <= 8601 || c >= 8602 && c <= 8603 || c >= 8604 && c <= 8607 || c === 8608 || c >= 8609 && c <= 8610 || c === 8611 || c >= 8612 && c <= 8613 || c === 8614 || c >= 8615 && c <= 8621 || c === 8622 || c >= 8623 && c <= 8653 || c >= 8654 && c <= 8655 || c >= 8656 && c <= 8657 || c === 8658 || c === 8659 || c === 8660 || c >= 8661 && c <= 8691 || c >= 8692 && c <= 8959 || c >= 8960 && c <= 8967 || c === 8968 || c === 8969 || c === 8970 || c === 8971 || c >= 8972 && c <= 8991 || c >= 8992 && c <= 8993 || c >= 8994 && c <= 9e3 || c === 9001 || c === 9002 || c >= 9003 && c <= 9083 || c === 9084 || c >= 9085 && c <= 9114 || c >= 9115 && c <= 9139 || c >= 9140 && c <= 9179 || c >= 9180 && c <= 9185 || c >= 9186 && c <= 9254 || c >= 9255 && c <= 9279 || c >= 9280 && c <= 9290 || c >= 9291 && c <= 9311 || c >= 9472 && c <= 9654 || c === 9655 || c >= 9656 && c <= 9664 || c === 9665 || c >= 9666 && c <= 9719 || c >= 9720 && c <= 9727 || c >= 9728 && c <= 9838 || c === 9839 || c >= 9840 && c <= 10087 || c === 10088 || c === 10089 || c === 10090 || c === 10091 || c === 10092 || c === 10093 || c === 10094 || c === 10095 || c === 10096 || c === 10097 || c === 10098 || c === 10099 || c === 10100 || c === 10101 || c >= 10132 && c <= 10175 || c >= 10176 && c <= 10180 || c === 10181 || c === 10182 || c >= 10183 && c <= 10213 || c === 10214 || c === 10215 || c === 10216 || c === 10217 || c === 10218 || c === 10219 || c === 10220 || c === 10221 || c === 10222 || c === 10223 || c >= 10224 && c <= 10239 || c >= 10240 && c <= 10495 || c >= 10496 && c <= 10626 || c === 10627 || c === 10628 || c === 10629 || c === 10630 || c === 10631 || c === 10632 || c === 10633 || c === 10634 || c === 10635 || c === 10636 || c === 10637 || c === 10638 || c === 10639 || c === 10640 || c === 10641 || c === 10642 || c === 10643 || c === 10644 || c === 10645 || c === 10646 || c === 10647 || c === 10648 || c >= 10649 && c <= 10711 || c === 10712 || c === 10713 || c === 10714 || c === 10715 || c >= 10716 && c <= 10747 || c === 10748 || c === 10749 || c >= 10750 && c <= 11007 || c >= 11008 && c <= 11055 || c >= 11056 && c <= 11076 || c >= 11077 && c <= 11078 || c >= 11079 && c <= 11084 || c >= 11085 && c <= 11123 || c >= 11124 && c <= 11125 || c >= 11126 && c <= 11157 || c === 11158 || c >= 11159 && c <= 11263 || c >= 11776 && c <= 11777 || c === 11778 || c === 11779 || c === 11780 || c === 11781 || c >= 11782 && c <= 11784 || c === 11785 || c === 11786 || c === 11787 || c === 11788 || c === 11789 || c >= 11790 && c <= 11798 || c === 11799 || c >= 11800 && c <= 11801 || c === 11802 || c === 11803 || c === 11804 || c === 11805 || c >= 11806 && c <= 11807 || c === 11808 || c === 11809 || c === 11810 || c === 11811 || c === 11812 || c === 11813 || c === 11814 || c === 11815 || c === 11816 || c === 11817 || c >= 11818 && c <= 11822 || c === 11823 || c >= 11824 && c <= 11833 || c >= 11834 && c <= 11835 || c >= 11836 && c <= 11839 || c === 11840 || c === 11841 || c === 11842 || c >= 11843 && c <= 11855 || c >= 11856 && c <= 11857 || c === 11858 || c >= 11859 && c <= 11903 || c >= 12289 && c <= 12291 || c === 12296 || c === 12297 || c === 12298 || c === 12299 || c === 12300 || c === 12301 || c === 12302 || c === 12303 || c === 12304 || c === 12305 || c >= 12306 && c <= 12307 || c === 12308 || c === 12309 || c === 12310 || c === 12311 || c === 12312 || c === 12313 || c === 12314 || c === 12315 || c === 12316 || c === 12317 || c >= 12318 && c <= 12319 || c === 12320 || c === 12336 || c === 64830 || c === 64831 || c >= 65093 && c <= 65094;
}
function pruneLocation(els) {
  els.forEach(function(el) {
    delete el.location;
    if (isSelectElement(el) || isPluralElement(el)) {
      for (var k in el.options) {
        delete el.options[k].location;
        pruneLocation(el.options[k].value);
      }
    } else if (isNumberElement(el) && isNumberSkeleton(el.style)) {
      delete el.style.location;
    } else if ((isDateElement(el) || isTimeElement(el)) && isDateTimeSkeleton(el.style)) {
      delete el.style.location;
    } else if (isTagElement(el)) {
      pruneLocation(el.children);
    }
  });
}
function parse$1(message, opts) {
  if (opts === void 0) {
    opts = {};
  }
  opts = __assign4({ shouldParseSkeletons: true, requiresOtherClause: true }, opts);
  var result = new Parser2(message, opts).parse();
  if (result.err) {
    var error = SyntaxError(ErrorKind[result.err.kind]);
    error.location = result.err.location;
    error.originalMessage = result.err.message;
    throw error;
  }
  if (!(opts === null || opts === void 0 ? void 0 : opts.captureLocation)) {
    pruneLocation(result.val);
  }
  return result.val;
}
function memoize(fn, options2) {
  var cache = options2 && options2.cache ? options2.cache : cacheDefault;
  var serializer = options2 && options2.serializer ? options2.serializer : serializerDefault;
  var strategy = options2 && options2.strategy ? options2.strategy : strategyDefault;
  return strategy(fn, {
    cache,
    serializer
  });
}
function isPrimitive(value) {
  return value == null || typeof value === "number" || typeof value === "boolean";
}
function monadic(fn, cache, serializer, arg) {
  var cacheKey = isPrimitive(arg) ? arg : serializer(arg);
  var computedValue = cache.get(cacheKey);
  if (typeof computedValue === "undefined") {
    computedValue = fn.call(this, arg);
    cache.set(cacheKey, computedValue);
  }
  return computedValue;
}
function variadic(fn, cache, serializer) {
  var args2 = Array.prototype.slice.call(arguments, 3);
  var cacheKey = serializer(args2);
  var computedValue = cache.get(cacheKey);
  if (typeof computedValue === "undefined") {
    computedValue = fn.apply(this, args2);
    cache.set(cacheKey, computedValue);
  }
  return computedValue;
}
function assemble(fn, context2, strategy, cache, serialize) {
  return strategy.bind(context2, fn, cache, serialize);
}
function strategyDefault(fn, options2) {
  var strategy = fn.length === 1 ? monadic : variadic;
  return assemble(fn, this, strategy, options2.cache.create(), options2.serializer);
}
function strategyVariadic(fn, options2) {
  return assemble(fn, this, variadic, options2.cache.create(), options2.serializer);
}
function ObjectWithoutPrototypeCache() {
  this.cache = /* @__PURE__ */ Object.create(null);
}
function mergeLiteral(parts) {
  if (parts.length < 2) {
    return parts;
  }
  return parts.reduce((all, part) => {
    const lastPart = all[all.length - 1];
    if (!lastPart || lastPart.type !== PART_TYPE.literal || part.type !== PART_TYPE.literal) {
      all.push(part);
    } else {
      lastPart.value += part.value;
    }
    return all;
  }, []);
}
function isFormatXMLElementFn(el) {
  return typeof el === "function";
}
function formatToParts(els, locales2, formatters, formats3, values, currentPluralValue, originalMessage) {
  if (els.length === 1 && isLiteralElement(els[0])) {
    return [
      {
        type: PART_TYPE.literal,
        value: els[0].value
      }
    ];
  }
  const result = [];
  for (const el of els) {
    if (isLiteralElement(el)) {
      result.push({
        type: PART_TYPE.literal,
        value: el.value
      });
      continue;
    }
    if (isPoundElement(el)) {
      if (typeof currentPluralValue === "number") {
        result.push({
          type: PART_TYPE.literal,
          value: formatters.getNumberFormat(locales2).format(currentPluralValue)
        });
      }
      continue;
    }
    const { value: varName } = el;
    if (!(values && varName in values)) {
      throw new MissingValueError(varName, originalMessage);
    }
    let value = values[varName];
    if (isArgumentElement(el)) {
      if (!value || typeof value === "string" || typeof value === "number") {
        value = typeof value === "string" || typeof value === "number" ? String(value) : "";
      }
      result.push({
        type: typeof value === "string" ? PART_TYPE.literal : PART_TYPE.object,
        value
      });
      continue;
    }
    if (isDateElement(el)) {
      const style = typeof el.style === "string" ? formats3.date[el.style] : isDateTimeSkeleton(el.style) ? el.style.parsedOptions : void 0;
      result.push({
        type: PART_TYPE.literal,
        value: formatters.getDateTimeFormat(locales2, style).format(value)
      });
      continue;
    }
    if (isTimeElement(el)) {
      const style = typeof el.style === "string" ? formats3.time[el.style] : isDateTimeSkeleton(el.style) ? el.style.parsedOptions : void 0;
      result.push({
        type: PART_TYPE.literal,
        value: formatters.getDateTimeFormat(locales2, style).format(value)
      });
      continue;
    }
    if (isNumberElement(el)) {
      const style = typeof el.style === "string" ? formats3.number[el.style] : isNumberSkeleton(el.style) ? el.style.parsedOptions : void 0;
      if (style && style.scale) {
        value = value * (style.scale || 1);
      }
      result.push({
        type: PART_TYPE.literal,
        value: formatters.getNumberFormat(locales2, style).format(value)
      });
      continue;
    }
    if (isTagElement(el)) {
      const { children, value: value2 } = el;
      const formatFn = values[value2];
      if (!isFormatXMLElementFn(formatFn)) {
        throw new InvalidValueTypeError(value2, "function", originalMessage);
      }
      const parts = formatToParts(children, locales2, formatters, formats3, values, currentPluralValue);
      let chunks = formatFn(parts.map((p) => p.value));
      if (!Array.isArray(chunks)) {
        chunks = [chunks];
      }
      result.push(...chunks.map((c) => {
        return {
          type: typeof c === "string" ? PART_TYPE.literal : PART_TYPE.object,
          value: c
        };
      }));
    }
    if (isSelectElement(el)) {
      const opt = el.options[value] || el.options.other;
      if (!opt) {
        throw new InvalidValueError(el.value, value, Object.keys(el.options), originalMessage);
      }
      result.push(...formatToParts(opt.value, locales2, formatters, formats3, values));
      continue;
    }
    if (isPluralElement(el)) {
      let opt = el.options[`=${value}`];
      if (!opt) {
        if (!Intl.PluralRules) {
          throw new FormatError(`Intl.PluralRules is not available in this environment.
Try polyfilling it using "@formatjs/intl-pluralrules"
`, ErrorCode.MISSING_INTL_API, originalMessage);
        }
        const rule = formatters.getPluralRules(locales2, { type: el.pluralType }).select(value - (el.offset || 0));
        opt = el.options[rule] || el.options.other;
      }
      if (!opt) {
        throw new InvalidValueError(el.value, value, Object.keys(el.options), originalMessage);
      }
      result.push(...formatToParts(opt.value, locales2, formatters, formats3, values, value - (el.offset || 0)));
      continue;
    }
  }
  return mergeLiteral(result);
}
function mergeConfig(c1, c2) {
  if (!c2) {
    return c1;
  }
  return {
    ...c1 || {},
    ...c2 || {},
    ...Object.keys(c1).reduce((all, k) => {
      all[k] = {
        ...c1[k],
        ...c2[k] || {}
      };
      return all;
    }, {})
  };
}
function mergeConfigs(defaultConfig2, configs) {
  if (!configs) {
    return defaultConfig2;
  }
  return Object.keys(defaultConfig2).reduce((all, k) => {
    all[k] = mergeConfig(defaultConfig2[k], configs[k]);
    return all;
  }, { ...defaultConfig2 });
}
function createFastMemoizeCache(store) {
  return {
    create() {
      return {
        has(key) {
          return key in store;
        },
        get(key) {
          return store[key];
        },
        set(key, value) {
          store[key] = value;
        }
      };
    }
  };
}
function createDefaultFormatters(cache = {
  number: {},
  dateTime: {},
  pluralRules: {}
}) {
  return {
    getNumberFormat: memoize((...args2) => new Intl.NumberFormat(...args2), {
      cache: createFastMemoizeCache(cache.number),
      strategy: strategies.variadic
    }),
    getDateTimeFormat: memoize((...args2) => new Intl.DateTimeFormat(...args2), {
      cache: createFastMemoizeCache(cache.dateTime),
      strategy: strategies.variadic
    }),
    getPluralRules: memoize((...args2) => new Intl.PluralRules(...args2), {
      cache: createFastMemoizeCache(cache.pluralRules),
      strategy: strategies.variadic
    })
  };
}
function lookupClosestSupportedDevToolsLocale(locale) {
  return i18nInstance.lookupClosestSupportedLocale(locale);
}
function getAllSupportedDevToolsLocales() {
  return [...i18nInstance.supportedLocales];
}
function getLocaleFetchUrl(locale, location) {
  (void 0)(location);
  const path14 = LOCAL_FETCH_PATTERN.replace("@LOCALE@", locale);
  return new URL(path14, import.meta.url).toString();
}
async function fetchAndRegisterLocaleData(locale, location = self.location.toString()) {
  const localeDataTextPromise = fetch(getLocaleFetchUrl(locale, location)).then((result) => result.json());
  const timeoutPromise = new Promise((_, reject) => window.setTimeout(() => reject(new Error("timed out fetching locale")), 5e3));
  const localeData = await Promise.race([timeoutPromise, localeDataTextPromise]);
  i18nInstance.registerLocaleData(locale, localeData);
}
function hasLocaleDataForTest(locale) {
  return i18nInstance.hasLocaleDataForTest(locale);
}
function resetLocaleDataForTest() {
  i18nInstance.resetLocaleDataForTest();
}
function registerLocaleDataForTest(locale, messages) {
  i18nInstance.registerLocaleData(locale, messages);
}
function getLazilyComputedLocalizedString(registeredStrings, id2, values = {}) {
  return () => getLocalizedString(registeredStrings, id2, values);
}
function getLocalizedString(registeredStrings, id2, values = {}) {
  return registeredStrings.getLocalizedStringSetFor(DevToolsLocale.instance().locale).getLocalizedString(id2, values);
}
function registerUIStrings(path14, stringStructure) {
  return i18nInstance.registerFileStrings(path14, stringStructure);
}
function serializeUIString(string2, values = {}) {
  const serializedMessage = { string: string2, values };
  return JSON.stringify(serializedMessage);
}
function deserializeUIString(serializedMessage) {
  if (!serializedMessage) {
    return { string: "", values: {} };
  }
  return JSON.parse(serializedMessage);
}
function lockedString(str) {
  return str;
}
function lockedLazyString(str) {
  return () => str;
}
function getLocalizedLanguageRegion(localeString, devtoolsLocale) {
  const locale = new Intl.Locale(localeString);
  const { language, baseName } = locale;
  const devtoolsLoc = new Intl.Locale(devtoolsLocale.locale);
  const targetLanguage = language === devtoolsLoc.language ? "en" : baseName;
  const languageInCurrentLocale = new Intl.DisplayNames([devtoolsLocale.locale], { type: "language" }).of(language);
  const languageInTargetLocale = new Intl.DisplayNames([targetLanguage], { type: "language" }).of(language);
  let wrappedRegionInCurrentLocale = "";
  let wrappedRegionInTargetLocale = "";
  if (locale.region) {
    const regionInCurrentLocale = new Intl.DisplayNames([devtoolsLocale.locale], { type: "region", style: "short" }).of(locale.region);
    const regionInTargetLocale = new Intl.DisplayNames([targetLanguage], { type: "region", style: "short" }).of(locale.region);
    wrappedRegionInCurrentLocale = ` (${regionInCurrentLocale})`;
    wrappedRegionInTargetLocale = ` (${regionInTargetLocale})`;
  }
  return `${languageInCurrentLocale}${wrappedRegionInCurrentLocale} - ${languageInTargetLocale}${wrappedRegionInTargetLocale}`;
}
function formatMicroSecondsTime(time2) {
  return millisToString(microSecondsToMilliSeconds(time2), true);
}
function formatMicroSecondsAsSeconds(time2) {
  const milliseconds = microSecondsToMilliSeconds(time2);
  const seconds2 = milliSecondsToSeconds(milliseconds);
  return narrowSecondsDecimal.format(seconds2);
}
function formatMicroSecondsAsMillisFixed(time2) {
  const milliseconds = microSecondsToMilliSeconds(time2);
  return narrowMillisecondsInteger.format(milliseconds);
}
function formatMicroSecondsAsMillisFixedExpanded(time2) {
  const milliseconds = microSecondsToMilliSeconds(time2);
  return longMilliseconds.format(milliseconds);
}
function millisToString(ms2, higherResolution) {
  if (!isFinite(ms2)) {
    return "-";
  }
  if (higherResolution && ms2 < 0.1) {
    return narrowMicrosecondsInteger.format(ms2 * 1e3);
  }
  if (higherResolution && ms2 < 1e3) {
    return narrowMillisecondsDecimal.format(ms2);
  }
  if (ms2 < 1e3) {
    return narrowMillisecondsInteger.format(ms2);
  }
  const seconds2 = ms2 / 1e3;
  if (seconds2 < 60) {
    return narrowSecondsDecimal.format(seconds2);
  }
  const minutes = seconds2 / 60;
  if (minutes < 60) {
    return shortMinutesDecimal.format(minutes);
  }
  const hours = minutes / 60;
  if (hours < 24) {
    return shortHoursDecimal.format(hours);
  }
  const days = hours / 24;
  return longDaysDecimal.format(days);
}
function preciseMillisToString(ms2, precision = 0, separator) {
  let formatter2 = preciseMillisToStringFormattersCache.get(precision);
  if (!formatter2) {
    formatter2 = defineFormatter({
      style: "unit",
      unit: "millisecond",
      unitDisplay: "narrow",
      minimumFractionDigits: precision,
      maximumFractionDigits: precision
    });
    preciseMillisToStringFormattersCache.set(precision, formatter2);
  }
  return formatter2.format(ms2, separator);
}
function preciseSecondsToString(ms2, precision = 0) {
  let formatter2 = preciseSecondsToStringFormattersCache.get(precision);
  if (!formatter2) {
    formatter2 = defineFormatter({
      style: "unit",
      unit: "second",
      unitDisplay: "narrow",
      minimumFractionDigits: precision,
      maximumFractionDigits: precision
    });
    preciseSecondsToStringFormattersCache.set(precision, formatter2);
  }
  return formatter2.format(ms2);
}
function secondsToString(seconds2, higherResolution) {
  if (!isFinite(seconds2)) {
    return "-";
  }
  return millisToString(seconds2 * 1e3, higherResolution);
}
function revealDestination(revealable) {
  const revealers = RevealerRegistry.instance().getApplicableRegisteredRevealers(revealable);
  for (const { destination } of revealers) {
    if (destination) {
      return destination();
    }
  }
  return null;
}
function registerRevealer(registration) {
  RevealerRegistry.instance().register(registration);
}
async function reveal(revealable, omitFocus = false) {
  await RevealerRegistry.instance().reveal(revealable, omitFocus);
}
function enableTestOverride() {
  testDebounceOverride = true;
}
function disableTestOverride() {
  testDebounceOverride = false;
}
function removeEventListeners(eventList) {
  for (const eventInfo of eventList) {
    eventInfo.eventTarget.removeEventListener(eventInfo.eventType, eventInfo.listener, eventInfo.thisObject);
  }
  eventList.splice(0);
}
function fireEvent(name, detail = {}, target = window) {
  const evt = new CustomEvent(name, { bubbles: true, cancelable: true, detail });
  target.dispatchEvent(evt);
}
function isGzip(ab) {
  const buf = new Uint8Array(ab);
  if (!buf || buf.length < 3) {
    return false;
  }
  return buf[0] === 31 && buf[1] === 139 && buf[2] === 8;
}
async function arrayBufferToString(ab) {
  if (isGzip(ab)) {
    return await decompress(ab);
  }
  const str = new TextDecoder("utf-8").decode(ab);
  return str;
}
async function fileToString(file2) {
  let stream3 = file2.stream();
  if (file2.type.endsWith("gzip")) {
    stream3 = decompressStream(stream3);
  }
  const arrayBuffer = await new Response(stream3).arrayBuffer();
  const str = new TextDecoder("utf-8").decode(arrayBuffer);
  return str;
}
async function decompress(gzippedBuffer, charset = "utf-8") {
  const buffer = await gzipCodec(gzippedBuffer, new DecompressionStream("gzip"));
  const str = new TextDecoder(charset).decode(buffer);
  return str;
}
async function decompressDeflate(buffer, charset = "utf-8") {
  let decompressedBuffer;
  try {
    decompressedBuffer = await gzipCodec(buffer, new DecompressionStream("deflate"));
  } catch {
    decompressedBuffer = await gzipCodec(buffer, new DecompressionStream("deflate-raw"));
  }
  return new TextDecoder(charset).decode(decompressedBuffer);
}
async function compress(str) {
  const encoded = new TextEncoder().encode(str);
  const buffer = await gzipCodec(encoded, new CompressionStream("gzip"));
  return buffer;
}
async function gzipCodec(buffer, codecStream) {
  const readable = new ReadableStream({
    start(controller) {
      controller.enqueue(buffer instanceof ArrayBuffer ? new Uint8Array(buffer) : buffer);
      controller.close();
    }
  });
  const codecReadable = readable.pipeThrough(codecStream);
  return await new Response(codecReadable).arrayBuffer();
}
function decompressStream(stream3) {
  const ds = new DecompressionStream("gzip");
  return stream3.pipeThrough(ds);
}
function compressStream(stream3) {
  const cs = new CompressionStream("gzip");
  return stream3.pipeThrough(cs);
}
function createMonitoredStream(stream3, onProgress) {
  let bytesRead = 0;
  const progressTransformer = new TransformStream({
    transform(chunk, controller) {
      bytesRead += chunk.byteLength;
      onProgress(bytesRead);
      controller.enqueue(chunk);
    }
  });
  return stream3.pipeThrough(progressTransformer);
}
function lazy(producer) {
  let value = UNINITIALIZED;
  let error = new Error("Initial");
  return () => {
    if (value === ERROR_STATE) {
      throw error;
    } else if (value !== UNINITIALIZED) {
      return value;
    }
    try {
      value = producer();
      return value;
    } catch (err) {
      error = err instanceof Error ? err : new Error(err);
      value = ERROR_STATE;
      throw error;
    }
  };
}
function normalizePath2(path14) {
  if (path14.indexOf("..") === -1 && path14.indexOf(".") === -1) {
    return path14;
  }
  const segments = (path14[0] === "/" ? path14.substring(1) : path14).split("/");
  const normalizedSegments = [];
  for (const segment of segments) {
    if (segment === ".") {
      continue;
    } else if (segment === "..") {
      normalizedSegments.pop();
    } else {
      normalizedSegments.push(segment);
    }
  }
  let normalizedPath = normalizedSegments.join("/");
  if (path14[0] === "/" && normalizedPath) {
    normalizedPath = "/" + normalizedPath;
  }
  if (normalizedPath[normalizedPath.length - 1] !== "/" && (path14[path14.length - 1] === "/" || segments[segments.length - 1] === "." || segments[segments.length - 1] === "..")) {
    normalizedPath = normalizedPath + "/";
  }
  return normalizedPath;
}
function schemeIs2(url, scheme) {
  try {
    return new URL(url).protocol === scheme;
  } catch {
    return false;
  }
}
function registerLateInitializationRunnable(setting) {
  const { id: id2, loadRunnable } = setting;
  if (registeredLateInitializationRunnables.has(id2)) {
    throw new Error(`Duplicate late Initializable runnable id '${id2}'`);
  }
  registeredLateInitializationRunnables.set(id2, loadRunnable);
}
function maybeRemoveLateInitializationRunnable(runnableId) {
  return registeredLateInitializationRunnables.delete(runnableId);
}
function lateInitializationRunnables() {
  return [...registeredLateInitializationRunnables.values()];
}
function registerEarlyInitializationRunnable(runnable) {
  registeredEarlyInitializationRunnables.push(runnable);
}
function earlyInitializationRunnables() {
  return registeredEarlyInitializationRunnables;
}
function registerSettingExtension(registration) {
  const settingName = registration.settingName;
  if (settingNameSet.has(settingName)) {
    throw new Error(`Duplicate setting name '${settingName}'`);
  }
  settingNameSet.add(settingName);
  registeredSettings.push(registration);
}
function getRegisteredSettings() {
  return registeredSettings.filter((setting) => Runtime.isDescriptorEnabled(setting));
}
function registerSettingsForTest(settings, forceReset = false) {
  if (registeredSettings.length === 0 || forceReset) {
    registeredSettings = settings;
    settingNameSet.clear();
    for (const setting of settings) {
      const settingName = setting.settingName;
      if (settingNameSet.has(settingName)) {
        throw new Error(`Duplicate setting name '${settingName}'`);
      }
      settingNameSet.add(settingName);
    }
  }
}
function resetSettings() {
  registeredSettings = [];
  settingNameSet.clear();
}
function maybeRemoveSettingExtension(settingName) {
  const settingIndex = registeredSettings.findIndex((setting) => setting.settingName === settingName);
  if (settingIndex < 0 || !settingNameSet.delete(settingName)) {
    return false;
  }
  registeredSettings.splice(settingIndex, 1);
  return true;
}
function getLocalizedSettingsCategory(category) {
  switch (category) {
    case "ELEMENTS":
      return i18nString$R(UIStrings$19.elements);
    case "AI":
      return i18nString$R(UIStrings$19.ai);
    case "APPEARANCE":
      return i18nString$R(UIStrings$19.appearance);
    case "SOURCES":
      return i18nString$R(UIStrings$19.sources);
    case "NETWORK":
      return i18nString$R(UIStrings$19.network);
    case "PERFORMANCE":
      return i18nString$R(UIStrings$19.performance);
    case "CONSOLE":
      return i18nString$R(UIStrings$19.console);
    case "PERSISTENCE":
      return i18nString$R(UIStrings$19.persistence);
    case "DEBUGGER":
      return i18nString$R(UIStrings$19.debugger);
    case "GLOBAL":
      return i18nString$R(UIStrings$19.global);
    case "RENDERING":
      return i18nString$R(UIStrings$19.rendering);
    case "GRID":
      return i18nString$R(UIStrings$19.grid);
    case "MOBILE":
      return i18nString$R(UIStrings$19.mobile);
    case "EMULATION":
      return i18nString$R(UIStrings$19.console);
    case "MEMORY":
      return i18nString$R(UIStrings$19.memory);
    case "EXTENSIONS":
      return i18nString$R(UIStrings$19.extension);
    case "ADORNER":
      return i18nString$R(UIStrings$19.adorner);
    case "":
      return lockedString("");
    case "ACCOUNT":
      return i18nString$R(UIStrings$19.account);
    case "PRIVACY":
      return i18nString$R(UIStrings$19.privacy);
  }
}
function moduleSetting(settingName) {
  return Settings.instance().moduleSetting(settingName);
}
function settingForTest(settingName) {
  return Settings.instance().settingForTest(settingName);
}
function parseSrcset(value) {
  const result = [];
  let i = 0;
  while (value.length) {
    if (i++ > 0) {
      result.push({ value: " ", type: 0 });
    }
    value = value.trim();
    let url = "";
    let descriptor = "";
    const indexOfSpace = value.search(/\s/);
    if (indexOfSpace === -1) {
      url = value;
    } else if (indexOfSpace > 0 && value[indexOfSpace - 1] === ",") {
      url = value.substring(0, indexOfSpace);
    } else {
      url = value.substring(0, indexOfSpace);
      const indexOfComma = value.indexOf(",", indexOfSpace);
      if (indexOfComma !== -1) {
        descriptor = value.substring(indexOfSpace, indexOfComma + 1);
      } else {
        descriptor = value.substring(indexOfSpace);
      }
    }
    if (url) {
      if (url.endsWith(",")) {
        result.push({ value: url.substring(0, url.length - 1), type: 1 });
        result.push({ type: 0, value: "," });
      } else {
        result.push({ value: url, type: 1 });
      }
    }
    if (descriptor) {
      result.push({ type: 0, value: descriptor });
    }
    value = value.substring(url.length + descriptor.length);
  }
  return result;
}
function getNetErrorCategory(netError) {
  if (netError > -100) {
    return i18nString$Q(UIStrings$17.systemError);
  }
  if (netError > -200) {
    return i18nString$Q(UIStrings$17.connectionError);
  }
  if (netError > -300) {
    return i18nString$Q(UIStrings$17.certificateError);
  }
  if (netError > -400) {
    return i18nString$Q(UIStrings$17.httpError);
  }
  if (netError > -500) {
    return i18nString$Q(UIStrings$17.cacheError);
  }
  if (netError > -600) {
    return i18nString$Q(UIStrings$17.signedExchangeError);
  }
  if (netError > -700) {
    return i18nString$Q(UIStrings$17.ftpError);
  }
  if (netError > -800) {
    return i18nString$Q(UIStrings$17.certificateManagerError);
  }
  if (netError > -900) {
    return i18nString$Q(UIStrings$17.dnsResolverError);
  }
  return i18nString$Q(UIStrings$17.unknownError);
}
function isHTTPError(netError) {
  return netError <= -300 && netError > -400;
}
function netErrorToMessage(netError, httpStatusCode, netErrorName) {
  if (netError === void 0 || netErrorName === void 0) {
    return null;
  }
  if (netError !== 0) {
    if (isHTTPError(netError)) {
      return i18nString$Q(UIStrings$17.httpErrorStatusCodeSS, { PH1: String(httpStatusCode), PH2: netErrorName });
    }
    const errorCategory = getNetErrorCategory(netError);
    return `${errorCategory}: ${netErrorName}`;
  }
  return null;
}
function createErrorMessageFromResponse(response) {
  const { statusCode, netError, netErrorName, urlValid, messageOverride } = response;
  let message = "";
  const success = statusCode >= 200 && statusCode < 300;
  if (typeof messageOverride === "string") {
    message = messageOverride;
  } else if (!success) {
    if (typeof netError === "undefined") {
      if (urlValid === false) {
        message = i18nString$Q(UIStrings$17.invalidUrl);
      } else {
        message = i18nString$Q(UIStrings$17.unknownError);
      }
    } else {
      const maybeMessage = netErrorToMessage(netError, statusCode, netErrorName);
      if (maybeMessage) {
        message = maybeMessage;
      }
    }
  }
  console.assert(success === (message.length === 0));
  return { success, description: { statusCode, netError, netErrorName, urlValid, message } };
}
async function fetchToString(url) {
  try {
    const response = await fetch(url);
    return await response.text();
  } catch (cause) {
    throw new Error(`Failed to fetch ${url}`, { cause });
  }
}
function canBeRemoteFilePath(url) {
  try {
    const urlObject = new URL(new URL(url).toString());
    return urlObject.protocol === "file:" && urlObject.host !== "";
  } catch {
    return false;
  }
}
function installInspectorFrontendHost(instance2) {
  globalThis.InspectorFrontendHost = InspectorFrontendHostInstance = instance2;
  if (!(instance2 instanceof InspectorFrontendHostStub)) {
    const proto = InspectorFrontendHostStub.prototype;
    for (const name of Object.getOwnPropertyNames(proto)) {
      const stub = proto[name];
      if (typeof stub !== "function" || InspectorFrontendHostInstance[name]) {
        continue;
      }
      console.error(`Incompatible embedder: method Host.InspectorFrontendHost.${name} is missing. Using stub instead.`);
      InspectorFrontendHostInstance[name] = stub;
    }
  }
  InspectorFrontendHostInstance.events = new ObjectWrapper();
}
function isUnderTest2(prefs) {
  return Settings.hasInstance() && Settings.instance().createSetting("isUnderTest", false).get();
}
function registerCommands(inspectorBackend2) {
  inspectorBackend2.registerEnum("Accessibility.AXValueType", { Boolean: "boolean", Tristate: "tristate", BooleanOrUndefined: "booleanOrUndefined", Idref: "idref", IdrefList: "idrefList", Integer: "integer", Node: "node", NodeList: "nodeList", Number: "number", String: "string", ComputedString: "computedString", Token: "token", TokenList: "tokenList", DomRelation: "domRelation", Role: "role", InternalRole: "internalRole", ValueUndefined: "valueUndefined" });
  inspectorBackend2.registerEnum("Accessibility.AXValueSourceType", { Attribute: "attribute", Implicit: "implicit", Style: "style", Contents: "contents", Placeholder: "placeholder", RelatedElement: "relatedElement" });
  inspectorBackend2.registerEnum("Accessibility.AXValueNativeSourceType", { Description: "description", Figcaption: "figcaption", Label: "label", Labelfor: "labelfor", Labelwrapped: "labelwrapped", Legend: "legend", Rubyannotation: "rubyannotation", Tablecaption: "tablecaption", Title: "title", Other: "other" });
  inspectorBackend2.registerEnum("Accessibility.AXPropertyName", { Actions: "actions", Busy: "busy", Disabled: "disabled", Editable: "editable", Focusable: "focusable", Focused: "focused", Hidden: "hidden", HiddenRoot: "hiddenRoot", Invalid: "invalid", Keyshortcuts: "keyshortcuts", Settable: "settable", Roledescription: "roledescription", Live: "live", Atomic: "atomic", Relevant: "relevant", Root: "root", Autocomplete: "autocomplete", HasPopup: "hasPopup", Level: "level", Multiselectable: "multiselectable", Orientation: "orientation", Multiline: "multiline", Readonly: "readonly", Required: "required", Valuemin: "valuemin", Valuemax: "valuemax", Valuetext: "valuetext", Checked: "checked", Expanded: "expanded", Modal: "modal", Pressed: "pressed", Selected: "selected", Activedescendant: "activedescendant", Controls: "controls", Describedby: "describedby", Details: "details", Errormessage: "errormessage", Flowto: "flowto", Labelledby: "labelledby", Owns: "owns", Url: "url", ActiveFullscreenElement: "activeFullscreenElement", ActiveModalDialog: "activeModalDialog", ActiveAriaModalDialog: "activeAriaModalDialog", AriaHiddenElement: "ariaHiddenElement", AriaHiddenSubtree: "ariaHiddenSubtree", EmptyAlt: "emptyAlt", EmptyText: "emptyText", InertElement: "inertElement", InertSubtree: "inertSubtree", LabelContainer: "labelContainer", LabelFor: "labelFor", NotRendered: "notRendered", NotVisible: "notVisible", PresentationalRole: "presentationalRole", ProbablyPresentational: "probablyPresentational", InactiveCarouselTabContent: "inactiveCarouselTabContent", Uninteresting: "uninteresting" });
  inspectorBackend2.registerEvent("Accessibility.loadComplete", ["root"]);
  inspectorBackend2.registerEvent("Accessibility.nodesUpdated", ["nodes"]);
  inspectorBackend2.registerCommand("Accessibility.disable", [], [], "Disables the accessibility domain.");
  inspectorBackend2.registerCommand("Accessibility.enable", [], [], "Enables the accessibility domain which causes `AXNodeId`s to remain consistent between method calls. This turns on accessibility for the page, which can impact performance until accessibility is disabled.");
  inspectorBackend2.registerCommand("Accessibility.getPartialAXTree", [{ "name": "nodeId", "type": "number", "optional": true, "description": "Identifier of the node to get the partial accessibility tree for.", "typeRef": "DOM.NodeId" }, { "name": "backendNodeId", "type": "number", "optional": true, "description": "Identifier of the backend node to get the partial accessibility tree for.", "typeRef": "DOM.BackendNodeId" }, { "name": "objectId", "type": "string", "optional": true, "description": "JavaScript object id of the node wrapper to get the partial accessibility tree for.", "typeRef": "Runtime.RemoteObjectId" }, { "name": "fetchRelatives", "type": "boolean", "optional": true, "description": "Whether to fetch this node's ancestors, siblings and children. Defaults to true.", "typeRef": null }], ["nodes"], "Fetches the accessibility node and partial accessibility tree for this DOM node, if it exists.");
  inspectorBackend2.registerCommand("Accessibility.getFullAXTree", [{ "name": "depth", "type": "number", "optional": true, "description": "The maximum depth at which descendants of the root node should be retrieved. If omitted, the full tree is returned.", "typeRef": null }, { "name": "frameId", "type": "string", "optional": true, "description": "The frame for whose document the AX tree should be retrieved. If omitted, the root frame is used.", "typeRef": "Page.FrameId" }], ["nodes"], "Fetches the entire accessibility tree for the root Document");
  inspectorBackend2.registerCommand("Accessibility.getRootAXNode", [{ "name": "frameId", "type": "string", "optional": true, "description": "The frame in whose document the node resides. If omitted, the root frame is used.", "typeRef": "Page.FrameId" }], ["node"], "Fetches the root node. Requires `enable()` to have been called previously.");
  inspectorBackend2.registerCommand("Accessibility.getAXNodeAndAncestors", [{ "name": "nodeId", "type": "number", "optional": true, "description": "Identifier of the node to get.", "typeRef": "DOM.NodeId" }, { "name": "backendNodeId", "type": "number", "optional": true, "description": "Identifier of the backend node to get.", "typeRef": "DOM.BackendNodeId" }, { "name": "objectId", "type": "string", "optional": true, "description": "JavaScript object id of the node wrapper to get.", "typeRef": "Runtime.RemoteObjectId" }], ["nodes"], "Fetches a node and all ancestors up to and including the root. Requires `enable()` to have been called previously.");
  inspectorBackend2.registerCommand("Accessibility.getChildAXNodes", [{ "name": "id", "type": "string", "optional": false, "description": "", "typeRef": "Accessibility.AXNodeId" }, { "name": "frameId", "type": "string", "optional": true, "description": "The frame in whose document the node resides. If omitted, the root frame is used.", "typeRef": "Page.FrameId" }], ["nodes"], "Fetches a particular accessibility node by AXNodeId. Requires `enable()` to have been called previously.");
  inspectorBackend2.registerCommand("Accessibility.queryAXTree", [{ "name": "nodeId", "type": "number", "optional": true, "description": "Identifier of the node for the root to query.", "typeRef": "DOM.NodeId" }, { "name": "backendNodeId", "type": "number", "optional": true, "description": "Identifier of the backend node for the root to query.", "typeRef": "DOM.BackendNodeId" }, { "name": "objectId", "type": "string", "optional": true, "description": "JavaScript object id of the node wrapper for the root to query.", "typeRef": "Runtime.RemoteObjectId" }, { "name": "accessibleName", "type": "string", "optional": true, "description": "Find nodes with this computed name.", "typeRef": null }, { "name": "role", "type": "string", "optional": true, "description": "Find nodes with this computed role.", "typeRef": null }], ["nodes"], "Query a DOM node's accessibility subtree for accessible name and role. This command computes the name and role for all nodes in the subtree, including those that are ignored for accessibility, and returns those that match the specified name and role. If no DOM node is specified, or the DOM node does not exist, the command returns an error. If neither `accessibleName` or `role` is specified, it returns all the accessibility nodes in the subtree.");
  inspectorBackend2.registerType("Accessibility.AXValueSource", [{ "name": "type", "type": "string", "optional": false, "description": "What type of source this is.", "typeRef": "Accessibility.AXValueSourceType" }, { "name": "value", "type": "object", "optional": true, "description": "The value of this property source.", "typeRef": "Accessibility.AXValue" }, { "name": "attribute", "type": "string", "optional": true, "description": "The name of the relevant attribute, if any.", "typeRef": null }, { "name": "attributeValue", "type": "object", "optional": true, "description": "The value of the relevant attribute, if any.", "typeRef": "Accessibility.AXValue" }, { "name": "superseded", "type": "boolean", "optional": true, "description": "Whether this source is superseded by a higher priority source.", "typeRef": null }, { "name": "nativeSource", "type": "string", "optional": true, "description": "The native markup source for this value, e.g. a `<label>` element.", "typeRef": "Accessibility.AXValueNativeSourceType" }, { "name": "nativeSourceValue", "type": "object", "optional": true, "description": "The value, such as a node or node list, of the native source.", "typeRef": "Accessibility.AXValue" }, { "name": "invalid", "type": "boolean", "optional": true, "description": "Whether the value for this property is invalid.", "typeRef": null }, { "name": "invalidReason", "type": "string", "optional": true, "description": "Reason for the value being invalid, if it is.", "typeRef": null }]);
  inspectorBackend2.registerType("Accessibility.AXRelatedNode", [{ "name": "backendDOMNodeId", "type": "number", "optional": false, "description": "The BackendNodeId of the related DOM node.", "typeRef": "DOM.BackendNodeId" }, { "name": "idref", "type": "string", "optional": true, "description": "The IDRef value provided, if any.", "typeRef": null }, { "name": "text", "type": "string", "optional": true, "description": "The text alternative of this node in the current context.", "typeRef": null }]);
  inspectorBackend2.registerType("Accessibility.AXProperty", [{ "name": "name", "type": "string", "optional": false, "description": "The name of this property.", "typeRef": "Accessibility.AXPropertyName" }, { "name": "value", "type": "object", "optional": false, "description": "The value of this property.", "typeRef": "Accessibility.AXValue" }]);
  inspectorBackend2.registerType("Accessibility.AXValue", [{ "name": "type", "type": "string", "optional": false, "description": "The type of this value.", "typeRef": "Accessibility.AXValueType" }, { "name": "value", "type": "any", "optional": true, "description": "The computed value of this property.", "typeRef": null }, { "name": "relatedNodes", "type": "array", "optional": true, "description": "One or more related nodes, if applicable.", "typeRef": "Accessibility.AXRelatedNode" }, { "name": "sources", "type": "array", "optional": true, "description": "The sources which contributed to the computation of this property.", "typeRef": "Accessibility.AXValueSource" }]);
  inspectorBackend2.registerType("Accessibility.AXNode", [{ "name": "nodeId", "type": "string", "optional": false, "description": "Unique identifier for this node.", "typeRef": "Accessibility.AXNodeId" }, { "name": "ignored", "type": "boolean", "optional": false, "description": "Whether this node is ignored for accessibility", "typeRef": null }, { "name": "ignoredReasons", "type": "array", "optional": true, "description": "Collection of reasons why this node is hidden.", "typeRef": "Accessibility.AXProperty" }, { "name": "role", "type": "object", "optional": true, "description": "This `Node`'s role, whether explicit or implicit.", "typeRef": "Accessibility.AXValue" }, { "name": "chromeRole", "type": "object", "optional": true, "description": "This `Node`'s Chrome raw role.", "typeRef": "Accessibility.AXValue" }, { "name": "name", "type": "object", "optional": true, "description": "The accessible name for this `Node`.", "typeRef": "Accessibility.AXValue" }, { "name": "description", "type": "object", "optional": true, "description": "The accessible description for this `Node`.", "typeRef": "Accessibility.AXValue" }, { "name": "value", "type": "object", "optional": true, "description": "The value for this `Node`.", "typeRef": "Accessibility.AXValue" }, { "name": "properties", "type": "array", "optional": true, "description": "All other properties", "typeRef": "Accessibility.AXProperty" }, { "name": "parentId", "type": "string", "optional": true, "description": "ID for this node's parent.", "typeRef": "Accessibility.AXNodeId" }, { "name": "childIds", "type": "array", "optional": true, "description": "IDs for each of this node's child nodes.", "typeRef": "Accessibility.AXNodeId" }, { "name": "backendDOMNodeId", "type": "number", "optional": true, "description": "The backend ID for the associated DOM node, if any.", "typeRef": "DOM.BackendNodeId" }, { "name": "frameId", "type": "string", "optional": true, "description": "The frame ID for the frame associated with this nodes document.", "typeRef": "Page.FrameId" }]);
  inspectorBackend2.registerEnum("Animation.AnimationType", { CSSTransition: "CSSTransition", CSSAnimation: "CSSAnimation", WebAnimation: "WebAnimation" });
  inspectorBackend2.registerEvent("Animation.animationCanceled", ["id"]);
  inspectorBackend2.registerEvent("Animation.animationCreated", ["id"]);
  inspectorBackend2.registerEvent("Animation.animationStarted", ["animation"]);
  inspectorBackend2.registerEvent("Animation.animationUpdated", ["animation"]);
  inspectorBackend2.registerCommand("Animation.disable", [], [], "Disables animation domain notifications.");
  inspectorBackend2.registerCommand("Animation.enable", [], [], "Enables animation domain notifications.");
  inspectorBackend2.registerCommand("Animation.getCurrentTime", [{ "name": "id", "type": "string", "optional": false, "description": "Id of animation.", "typeRef": null }], ["currentTime"], "Returns the current time of the an animation.");
  inspectorBackend2.registerCommand("Animation.getPlaybackRate", [], ["playbackRate"], "Gets the playback rate of the document timeline.");
  inspectorBackend2.registerCommand("Animation.releaseAnimations", [{ "name": "animations", "type": "array", "optional": false, "description": "List of animation ids to seek.", "typeRef": "string" }], [], "Releases a set of animations to no longer be manipulated.");
  inspectorBackend2.registerCommand("Animation.resolveAnimation", [{ "name": "animationId", "type": "string", "optional": false, "description": "Animation id.", "typeRef": null }], ["remoteObject"], "Gets the remote object of the Animation.");
  inspectorBackend2.registerCommand("Animation.seekAnimations", [{ "name": "animations", "type": "array", "optional": false, "description": "List of animation ids to seek.", "typeRef": "string" }, { "name": "currentTime", "type": "number", "optional": false, "description": "Set the current time of each animation.", "typeRef": null }], [], "Seek a set of animations to a particular time within each animation.");
  inspectorBackend2.registerCommand("Animation.setPaused", [{ "name": "animations", "type": "array", "optional": false, "description": "Animations to set the pause state of.", "typeRef": "string" }, { "name": "paused", "type": "boolean", "optional": false, "description": "Paused state to set to.", "typeRef": null }], [], "Sets the paused state of a set of animations.");
  inspectorBackend2.registerCommand("Animation.setPlaybackRate", [{ "name": "playbackRate", "type": "number", "optional": false, "description": "Playback rate for animations on page", "typeRef": null }], [], "Sets the playback rate of the document timeline.");
  inspectorBackend2.registerCommand("Animation.setTiming", [{ "name": "animationId", "type": "string", "optional": false, "description": "Animation id.", "typeRef": null }, { "name": "duration", "type": "number", "optional": false, "description": "Duration of the animation.", "typeRef": null }, { "name": "delay", "type": "number", "optional": false, "description": "Delay of the animation.", "typeRef": null }], [], "Sets the timing of an animation node.");
  inspectorBackend2.registerType("Animation.Animation", [{ "name": "id", "type": "string", "optional": false, "description": "`Animation`'s id.", "typeRef": null }, { "name": "name", "type": "string", "optional": false, "description": "`Animation`'s name.", "typeRef": null }, { "name": "pausedState", "type": "boolean", "optional": false, "description": "`Animation`'s internal paused state.", "typeRef": null }, { "name": "playState", "type": "string", "optional": false, "description": "`Animation`'s play state.", "typeRef": null }, { "name": "playbackRate", "type": "number", "optional": false, "description": "`Animation`'s playback rate.", "typeRef": null }, { "name": "startTime", "type": "number", "optional": false, "description": "`Animation`'s start time. Milliseconds for time based animations and percentage [0 - 100] for scroll driven animations (i.e. when viewOrScrollTimeline exists).", "typeRef": null }, { "name": "currentTime", "type": "number", "optional": false, "description": "`Animation`'s current time.", "typeRef": null }, { "name": "type", "type": "string", "optional": false, "description": "Animation type of `Animation`.", "typeRef": null }, { "name": "source", "type": "object", "optional": true, "description": "`Animation`'s source animation node.", "typeRef": "Animation.AnimationEffect" }, { "name": "cssId", "type": "string", "optional": true, "description": "A unique ID for `Animation` representing the sources that triggered this CSS animation/transition.", "typeRef": null }, { "name": "viewOrScrollTimeline", "type": "object", "optional": true, "description": "View or scroll timeline", "typeRef": "Animation.ViewOrScrollTimeline" }]);
  inspectorBackend2.registerType("Animation.ViewOrScrollTimeline", [{ "name": "sourceNodeId", "type": "number", "optional": true, "description": "Scroll container node", "typeRef": "DOM.BackendNodeId" }, { "name": "startOffset", "type": "number", "optional": true, "description": "Represents the starting scroll position of the timeline as a length offset in pixels from scroll origin.", "typeRef": null }, { "name": "endOffset", "type": "number", "optional": true, "description": "Represents the ending scroll position of the timeline as a length offset in pixels from scroll origin.", "typeRef": null }, { "name": "subjectNodeId", "type": "number", "optional": true, "description": "The element whose principal box's visibility in the scrollport defined the progress of the timeline. Does not exist for animations with ScrollTimeline", "typeRef": "DOM.BackendNodeId" }, { "name": "axis", "type": "string", "optional": false, "description": "Orientation of the scroll", "typeRef": "DOM.ScrollOrientation" }]);
  inspectorBackend2.registerType("Animation.AnimationEffect", [{ "name": "delay", "type": "number", "optional": false, "description": "`AnimationEffect`'s delay.", "typeRef": null }, { "name": "endDelay", "type": "number", "optional": false, "description": "`AnimationEffect`'s end delay.", "typeRef": null }, { "name": "iterationStart", "type": "number", "optional": false, "description": "`AnimationEffect`'s iteration start.", "typeRef": null }, { "name": "iterations", "type": "number", "optional": true, "description": "`AnimationEffect`'s iterations. Omitted if the value is infinite.", "typeRef": null }, { "name": "duration", "type": "number", "optional": false, "description": "`AnimationEffect`'s iteration duration. Milliseconds for time based animations and percentage [0 - 100] for scroll driven animations (i.e. when viewOrScrollTimeline exists).", "typeRef": null }, { "name": "direction", "type": "string", "optional": false, "description": "`AnimationEffect`'s playback direction.", "typeRef": null }, { "name": "fill", "type": "string", "optional": false, "description": "`AnimationEffect`'s fill mode.", "typeRef": null }, { "name": "backendNodeId", "type": "number", "optional": true, "description": "`AnimationEffect`'s target node.", "typeRef": "DOM.BackendNodeId" }, { "name": "keyframesRule", "type": "object", "optional": true, "description": "`AnimationEffect`'s keyframes.", "typeRef": "Animation.KeyframesRule" }, { "name": "easing", "type": "string", "optional": false, "description": "`AnimationEffect`'s timing function.", "typeRef": null }]);
  inspectorBackend2.registerType("Animation.KeyframesRule", [{ "name": "name", "type": "string", "optional": true, "description": "CSS keyframed animation's name.", "typeRef": null }, { "name": "keyframes", "type": "array", "optional": false, "description": "List of animation keyframes.", "typeRef": "Animation.KeyframeStyle" }]);
  inspectorBackend2.registerType("Animation.KeyframeStyle", [{ "name": "offset", "type": "string", "optional": false, "description": "Keyframe's time offset.", "typeRef": null }, { "name": "easing", "type": "string", "optional": false, "description": "`AnimationEffect`'s timing function.", "typeRef": null }]);
  inspectorBackend2.registerEnum("Audits.CookieExclusionReason", { ExcludeSameSiteUnspecifiedTreatedAsLax: "ExcludeSameSiteUnspecifiedTreatedAsLax", ExcludeSameSiteNoneInsecure: "ExcludeSameSiteNoneInsecure", ExcludeSameSiteLax: "ExcludeSameSiteLax", ExcludeSameSiteStrict: "ExcludeSameSiteStrict", ExcludeDomainNonASCII: "ExcludeDomainNonASCII", ExcludeThirdPartyCookieBlockedInFirstPartySet: "ExcludeThirdPartyCookieBlockedInFirstPartySet", ExcludeThirdPartyPhaseout: "ExcludeThirdPartyPhaseout", ExcludePortMismatch: "ExcludePortMismatch", ExcludeSchemeMismatch: "ExcludeSchemeMismatch" });
  inspectorBackend2.registerEnum("Audits.CookieWarningReason", { WarnSameSiteUnspecifiedCrossSiteContext: "WarnSameSiteUnspecifiedCrossSiteContext", WarnSameSiteNoneInsecure: "WarnSameSiteNoneInsecure", WarnSameSiteUnspecifiedLaxAllowUnsafe: "WarnSameSiteUnspecifiedLaxAllowUnsafe", WarnSameSiteStrictLaxDowngradeStrict: "WarnSameSiteStrictLaxDowngradeStrict", WarnSameSiteStrictCrossDowngradeStrict: "WarnSameSiteStrictCrossDowngradeStrict", WarnSameSiteStrictCrossDowngradeLax: "WarnSameSiteStrictCrossDowngradeLax", WarnSameSiteLaxCrossDowngradeStrict: "WarnSameSiteLaxCrossDowngradeStrict", WarnSameSiteLaxCrossDowngradeLax: "WarnSameSiteLaxCrossDowngradeLax", WarnAttributeValueExceedsMaxSize: "WarnAttributeValueExceedsMaxSize", WarnDomainNonASCII: "WarnDomainNonASCII", WarnThirdPartyPhaseout: "WarnThirdPartyPhaseout", WarnCrossSiteRedirectDowngradeChangesInclusion: "WarnCrossSiteRedirectDowngradeChangesInclusion", WarnDeprecationTrialMetadata: "WarnDeprecationTrialMetadata", WarnThirdPartyCookieHeuristic: "WarnThirdPartyCookieHeuristic" });
  inspectorBackend2.registerEnum("Audits.CookieOperation", { SetCookie: "SetCookie", ReadCookie: "ReadCookie" });
  inspectorBackend2.registerEnum("Audits.InsightType", { GitHubResource: "GitHubResource", GracePeriod: "GracePeriod", Heuristics: "Heuristics" });
  inspectorBackend2.registerEnum("Audits.PerformanceIssueType", { DocumentCookie: "DocumentCookie" });
  inspectorBackend2.registerEnum("Audits.MixedContentResolutionStatus", { MixedContentBlocked: "MixedContentBlocked", MixedContentAutomaticallyUpgraded: "MixedContentAutomaticallyUpgraded", MixedContentWarning: "MixedContentWarning" });
  inspectorBackend2.registerEnum("Audits.MixedContentResourceType", { AttributionSrc: "AttributionSrc", Audio: "Audio", Beacon: "Beacon", CSPReport: "CSPReport", Download: "Download", EventSource: "EventSource", Favicon: "Favicon", Font: "Font", Form: "Form", Frame: "Frame", Image: "Image", Import: "Import", JSON: "JSON", Manifest: "Manifest", Ping: "Ping", PluginData: "PluginData", PluginResource: "PluginResource", Prefetch: "Prefetch", Resource: "Resource", Script: "Script", ServiceWorker: "ServiceWorker", SharedWorker: "SharedWorker", SpeculationRules: "SpeculationRules", Stylesheet: "Stylesheet", Track: "Track", Video: "Video", Worker: "Worker", XMLHttpRequest: "XMLHttpRequest", XSLT: "XSLT" });
  inspectorBackend2.registerEnum("Audits.BlockedByResponseReason", { CoepFrameResourceNeedsCoepHeader: "CoepFrameResourceNeedsCoepHeader", CoopSandboxedIFrameCannotNavigateToCoopPage: "CoopSandboxedIFrameCannotNavigateToCoopPage", CorpNotSameOrigin: "CorpNotSameOrigin", CorpNotSameOriginAfterDefaultedToSameOriginByCoep: "CorpNotSameOriginAfterDefaultedToSameOriginByCoep", CorpNotSameOriginAfterDefaultedToSameOriginByDip: "CorpNotSameOriginAfterDefaultedToSameOriginByDip", CorpNotSameOriginAfterDefaultedToSameOriginByCoepAndDip: "CorpNotSameOriginAfterDefaultedToSameOriginByCoepAndDip", CorpNotSameSite: "CorpNotSameSite", SRIMessageSignatureMismatch: "SRIMessageSignatureMismatch" });
  inspectorBackend2.registerEnum("Audits.HeavyAdResolutionStatus", { HeavyAdBlocked: "HeavyAdBlocked", HeavyAdWarning: "HeavyAdWarning" });
  inspectorBackend2.registerEnum("Audits.HeavyAdReason", { NetworkTotalLimit: "NetworkTotalLimit", CpuTotalLimit: "CpuTotalLimit", CpuPeakLimit: "CpuPeakLimit" });
  inspectorBackend2.registerEnum("Audits.ContentSecurityPolicyViolationType", { KInlineViolation: "kInlineViolation", KEvalViolation: "kEvalViolation", KURLViolation: "kURLViolation", KSRIViolation: "kSRIViolation", KTrustedTypesSinkViolation: "kTrustedTypesSinkViolation", KTrustedTypesPolicyViolation: "kTrustedTypesPolicyViolation", KWasmEvalViolation: "kWasmEvalViolation" });
  inspectorBackend2.registerEnum("Audits.SharedArrayBufferIssueType", { TransferIssue: "TransferIssue", CreationIssue: "CreationIssue" });
  inspectorBackend2.registerEnum("Audits.AttributionReportingIssueType", { PermissionPolicyDisabled: "PermissionPolicyDisabled", UntrustworthyReportingOrigin: "UntrustworthyReportingOrigin", InsecureContext: "InsecureContext", InvalidHeader: "InvalidHeader", InvalidRegisterTriggerHeader: "InvalidRegisterTriggerHeader", SourceAndTriggerHeaders: "SourceAndTriggerHeaders", SourceIgnored: "SourceIgnored", TriggerIgnored: "TriggerIgnored", OsSourceIgnored: "OsSourceIgnored", OsTriggerIgnored: "OsTriggerIgnored", InvalidRegisterOsSourceHeader: "InvalidRegisterOsSourceHeader", InvalidRegisterOsTriggerHeader: "InvalidRegisterOsTriggerHeader", WebAndOsHeaders: "WebAndOsHeaders", NoWebOrOsSupport: "NoWebOrOsSupport", NavigationRegistrationWithoutTransientUserActivation: "NavigationRegistrationWithoutTransientUserActivation", InvalidInfoHeader: "InvalidInfoHeader", NoRegisterSourceHeader: "NoRegisterSourceHeader", NoRegisterTriggerHeader: "NoRegisterTriggerHeader", NoRegisterOsSourceHeader: "NoRegisterOsSourceHeader", NoRegisterOsTriggerHeader: "NoRegisterOsTriggerHeader", NavigationRegistrationUniqueScopeAlreadySet: "NavigationRegistrationUniqueScopeAlreadySet" });
  inspectorBackend2.registerEnum("Audits.SharedDictionaryError", { UseErrorCrossOriginNoCorsRequest: "UseErrorCrossOriginNoCorsRequest", UseErrorDictionaryLoadFailure: "UseErrorDictionaryLoadFailure", UseErrorMatchingDictionaryNotUsed: "UseErrorMatchingDictionaryNotUsed", UseErrorUnexpectedContentDictionaryHeader: "UseErrorUnexpectedContentDictionaryHeader", WriteErrorCossOriginNoCorsRequest: "WriteErrorCossOriginNoCorsRequest", WriteErrorDisallowedBySettings: "WriteErrorDisallowedBySettings", WriteErrorExpiredResponse: "WriteErrorExpiredResponse", WriteErrorFeatureDisabled: "WriteErrorFeatureDisabled", WriteErrorInsufficientResources: "WriteErrorInsufficientResources", WriteErrorInvalidMatchField: "WriteErrorInvalidMatchField", WriteErrorInvalidStructuredHeader: "WriteErrorInvalidStructuredHeader", WriteErrorInvalidTTLField: "WriteErrorInvalidTTLField", WriteErrorNavigationRequest: "WriteErrorNavigationRequest", WriteErrorNoMatchField: "WriteErrorNoMatchField", WriteErrorNonIntegerTTLField: "WriteErrorNonIntegerTTLField", WriteErrorNonListMatchDestField: "WriteErrorNonListMatchDestField", WriteErrorNonSecureContext: "WriteErrorNonSecureContext", WriteErrorNonStringIdField: "WriteErrorNonStringIdField", WriteErrorNonStringInMatchDestList: "WriteErrorNonStringInMatchDestList", WriteErrorNonStringMatchField: "WriteErrorNonStringMatchField", WriteErrorNonTokenTypeField: "WriteErrorNonTokenTypeField", WriteErrorRequestAborted: "WriteErrorRequestAborted", WriteErrorShuttingDown: "WriteErrorShuttingDown", WriteErrorTooLongIdField: "WriteErrorTooLongIdField", WriteErrorUnsupportedType: "WriteErrorUnsupportedType" });
  inspectorBackend2.registerEnum("Audits.SRIMessageSignatureError", { MissingSignatureHeader: "MissingSignatureHeader", MissingSignatureInputHeader: "MissingSignatureInputHeader", InvalidSignatureHeader: "InvalidSignatureHeader", InvalidSignatureInputHeader: "InvalidSignatureInputHeader", SignatureHeaderValueIsNotByteSequence: "SignatureHeaderValueIsNotByteSequence", SignatureHeaderValueIsParameterized: "SignatureHeaderValueIsParameterized", SignatureHeaderValueIsIncorrectLength: "SignatureHeaderValueIsIncorrectLength", SignatureInputHeaderMissingLabel: "SignatureInputHeaderMissingLabel", SignatureInputHeaderValueNotInnerList: "SignatureInputHeaderValueNotInnerList", SignatureInputHeaderValueMissingComponents: "SignatureInputHeaderValueMissingComponents", SignatureInputHeaderInvalidComponentType: "SignatureInputHeaderInvalidComponentType", SignatureInputHeaderInvalidComponentName: "SignatureInputHeaderInvalidComponentName", SignatureInputHeaderInvalidHeaderComponentParameter: "SignatureInputHeaderInvalidHeaderComponentParameter", SignatureInputHeaderInvalidDerivedComponentParameter: "SignatureInputHeaderInvalidDerivedComponentParameter", SignatureInputHeaderKeyIdLength: "SignatureInputHeaderKeyIdLength", SignatureInputHeaderInvalidParameter: "SignatureInputHeaderInvalidParameter", SignatureInputHeaderMissingRequiredParameters: "SignatureInputHeaderMissingRequiredParameters", ValidationFailedSignatureExpired: "ValidationFailedSignatureExpired", ValidationFailedInvalidLength: "ValidationFailedInvalidLength", ValidationFailedSignatureMismatch: "ValidationFailedSignatureMismatch", ValidationFailedIntegrityMismatch: "ValidationFailedIntegrityMismatch" });
  inspectorBackend2.registerEnum("Audits.UnencodedDigestError", { MalformedDictionary: "MalformedDictionary", UnknownAlgorithm: "UnknownAlgorithm", IncorrectDigestType: "IncorrectDigestType", IncorrectDigestLength: "IncorrectDigestLength" });
  inspectorBackend2.registerEnum("Audits.ConnectionAllowlistError", { InvalidHeader: "InvalidHeader", MoreThanOneList: "MoreThanOneList", ItemNotInnerList: "ItemNotInnerList", InvalidAllowlistItemType: "InvalidAllowlistItemType", ReportingEndpointNotToken: "ReportingEndpointNotToken", InvalidUrlPattern: "InvalidUrlPattern" });
  inspectorBackend2.registerEnum("Audits.GenericIssueErrorType", { FormLabelForNameError: "FormLabelForNameError", FormDuplicateIdForInputError: "FormDuplicateIdForInputError", FormInputWithNoLabelError: "FormInputWithNoLabelError", FormAutocompleteAttributeEmptyError: "FormAutocompleteAttributeEmptyError", FormEmptyIdAndNameAttributesForInputError: "FormEmptyIdAndNameAttributesForInputError", FormAriaLabelledByToNonExistingIdError: "FormAriaLabelledByToNonExistingIdError", FormInputAssignedAutocompleteValueToIdOrNameAttributeError: "FormInputAssignedAutocompleteValueToIdOrNameAttributeError", FormLabelHasNeitherForNorNestedInputError: "FormLabelHasNeitherForNorNestedInputError", FormLabelForMatchesNonExistingIdError: "FormLabelForMatchesNonExistingIdError", FormInputHasWrongButWellIntendedAutocompleteValueError: "FormInputHasWrongButWellIntendedAutocompleteValueError", ResponseWasBlockedByORB: "ResponseWasBlockedByORB", NavigationEntryMarkedSkippable: "NavigationEntryMarkedSkippable", AutofillAndManualTextPolicyControlledFeaturesInfo: "AutofillAndManualTextPolicyControlledFeaturesInfo", AutofillPolicyControlledFeatureInfo: "AutofillPolicyControlledFeatureInfo", ManualTextPolicyControlledFeatureInfo: "ManualTextPolicyControlledFeatureInfo" });
  inspectorBackend2.registerEnum("Audits.ClientHintIssueReason", { MetaTagAllowListInvalidOrigin: "MetaTagAllowListInvalidOrigin", MetaTagModifiedHTML: "MetaTagModifiedHTML" });
  inspectorBackend2.registerEnum("Audits.FederatedAuthRequestIssueReason", { ShouldEmbargo: "ShouldEmbargo", TooManyRequests: "TooManyRequests", WellKnownHttpNotFound: "WellKnownHttpNotFound", WellKnownNoResponse: "WellKnownNoResponse", WellKnownInvalidResponse: "WellKnownInvalidResponse", WellKnownListEmpty: "WellKnownListEmpty", WellKnownInvalidContentType: "WellKnownInvalidContentType", ConfigNotInWellKnown: "ConfigNotInWellKnown", WellKnownTooBig: "WellKnownTooBig", ConfigHttpNotFound: "ConfigHttpNotFound", ConfigNoResponse: "ConfigNoResponse", ConfigInvalidResponse: "ConfigInvalidResponse", ConfigInvalidContentType: "ConfigInvalidContentType", IdpNotPotentiallyTrustworthy: "IdpNotPotentiallyTrustworthy", DisabledInSettings: "DisabledInSettings", DisabledInFlags: "DisabledInFlags", ErrorFetchingSignin: "ErrorFetchingSignin", InvalidSigninResponse: "InvalidSigninResponse", AccountsHttpNotFound: "AccountsHttpNotFound", AccountsNoResponse: "AccountsNoResponse", AccountsInvalidResponse: "AccountsInvalidResponse", AccountsListEmpty: "AccountsListEmpty", AccountsInvalidContentType: "AccountsInvalidContentType", IdTokenHttpNotFound: "IdTokenHttpNotFound", IdTokenNoResponse: "IdTokenNoResponse", IdTokenInvalidResponse: "IdTokenInvalidResponse", IdTokenIdpErrorResponse: "IdTokenIdpErrorResponse", IdTokenCrossSiteIdpErrorResponse: "IdTokenCrossSiteIdpErrorResponse", IdTokenInvalidRequest: "IdTokenInvalidRequest", IdTokenInvalidContentType: "IdTokenInvalidContentType", ErrorIdToken: "ErrorIdToken", Canceled: "Canceled", RpPageNotVisible: "RpPageNotVisible", SilentMediationFailure: "SilentMediationFailure", NotSignedInWithIdp: "NotSignedInWithIdp", MissingTransientUserActivation: "MissingTransientUserActivation", ReplacedByActiveMode: "ReplacedByActiveMode", RelyingPartyOriginIsOpaque: "RelyingPartyOriginIsOpaque", TypeNotMatching: "TypeNotMatching", UiDismissedNoEmbargo: "UiDismissedNoEmbargo", CorsError: "CorsError", SuppressedBySegmentationPlatform: "SuppressedBySegmentationPlatform" });
  inspectorBackend2.registerEnum("Audits.FederatedAuthUserInfoRequestIssueReason", { NotSameOrigin: "NotSameOrigin", NotIframe: "NotIframe", NotPotentiallyTrustworthy: "NotPotentiallyTrustworthy", NoAPIPermission: "NoApiPermission", NotSignedInWithIdp: "NotSignedInWithIdp", NoAccountSharingPermission: "NoAccountSharingPermission", InvalidConfigOrWellKnown: "InvalidConfigOrWellKnown", InvalidAccountsResponse: "InvalidAccountsResponse", NoReturningUserFromFetchedAccounts: "NoReturningUserFromFetchedAccounts" });
  inspectorBackend2.registerEnum("Audits.PartitioningBlobURLInfo", { BlockedCrossPartitionFetching: "BlockedCrossPartitionFetching", EnforceNoopenerForNavigation: "EnforceNoopenerForNavigation" });
  inspectorBackend2.registerEnum("Audits.ElementAccessibilityIssueReason", { DisallowedSelectChild: "DisallowedSelectChild", DisallowedOptGroupChild: "DisallowedOptGroupChild", NonPhrasingContentOptionChild: "NonPhrasingContentOptionChild", InteractiveContentOptionChild: "InteractiveContentOptionChild", InteractiveContentLegendChild: "InteractiveContentLegendChild", InteractiveContentSummaryDescendant: "InteractiveContentSummaryDescendant" });
  inspectorBackend2.registerEnum("Audits.StyleSheetLoadingIssueReason", { LateImportRule: "LateImportRule", RequestFailed: "RequestFailed" });
  inspectorBackend2.registerEnum("Audits.PropertyRuleIssueReason", { InvalidSyntax: "InvalidSyntax", InvalidInitialValue: "InvalidInitialValue", InvalidInherits: "InvalidInherits", InvalidName: "InvalidName" });
  inspectorBackend2.registerEnum("Audits.UserReidentificationIssueType", { BlockedFrameNavigation: "BlockedFrameNavigation", BlockedSubresource: "BlockedSubresource", NoisedCanvasReadback: "NoisedCanvasReadback" });
  inspectorBackend2.registerEnum("Audits.PermissionElementIssueType", { InvalidType: "InvalidType", FencedFrameDisallowed: "FencedFrameDisallowed", CspFrameAncestorsMissing: "CspFrameAncestorsMissing", PermissionsPolicyBlocked: "PermissionsPolicyBlocked", PaddingRightUnsupported: "PaddingRightUnsupported", PaddingBottomUnsupported: "PaddingBottomUnsupported", InsetBoxShadowUnsupported: "InsetBoxShadowUnsupported", RequestInProgress: "RequestInProgress", UntrustedEvent: "UntrustedEvent", RegistrationFailed: "RegistrationFailed", TypeNotSupported: "TypeNotSupported", InvalidTypeActivation: "InvalidTypeActivation", SecurityChecksFailed: "SecurityChecksFailed", ActivationDisabled: "ActivationDisabled", GeolocationDeprecated: "GeolocationDeprecated", InvalidDisplayStyle: "InvalidDisplayStyle", NonOpaqueColor: "NonOpaqueColor", LowContrast: "LowContrast", FontSizeTooSmall: "FontSizeTooSmall", FontSizeTooLarge: "FontSizeTooLarge", InvalidSizeValue: "InvalidSizeValue" });
  inspectorBackend2.registerEnum("Audits.InspectorIssueCode", { CookieIssue: "CookieIssue", MixedContentIssue: "MixedContentIssue", BlockedByResponseIssue: "BlockedByResponseIssue", HeavyAdIssue: "HeavyAdIssue", ContentSecurityPolicyIssue: "ContentSecurityPolicyIssue", SharedArrayBufferIssue: "SharedArrayBufferIssue", LowTextContrastIssue: "LowTextContrastIssue", CorsIssue: "CorsIssue", AttributionReportingIssue: "AttributionReportingIssue", QuirksModeIssue: "QuirksModeIssue", PartitioningBlobURLIssue: "PartitioningBlobURLIssue", NavigatorUserAgentIssue: "NavigatorUserAgentIssue", GenericIssue: "GenericIssue", DeprecationIssue: "DeprecationIssue", ClientHintIssue: "ClientHintIssue", FederatedAuthRequestIssue: "FederatedAuthRequestIssue", BounceTrackingIssue: "BounceTrackingIssue", CookieDeprecationMetadataIssue: "CookieDeprecationMetadataIssue", StylesheetLoadingIssue: "StylesheetLoadingIssue", FederatedAuthUserInfoRequestIssue: "FederatedAuthUserInfoRequestIssue", PropertyRuleIssue: "PropertyRuleIssue", SharedDictionaryIssue: "SharedDictionaryIssue", ElementAccessibilityIssue: "ElementAccessibilityIssue", SRIMessageSignatureIssue: "SRIMessageSignatureIssue", UnencodedDigestIssue: "UnencodedDigestIssue", ConnectionAllowlistIssue: "ConnectionAllowlistIssue", UserReidentificationIssue: "UserReidentificationIssue", PermissionElementIssue: "PermissionElementIssue", PerformanceIssue: "PerformanceIssue", SelectivePermissionsInterventionIssue: "SelectivePermissionsInterventionIssue" });
  inspectorBackend2.registerEvent("Audits.issueAdded", ["issue"]);
  inspectorBackend2.registerEnum("Audits.GetEncodedResponseRequestEncoding", { Webp: "webp", Jpeg: "jpeg", Png: "png" });
  inspectorBackend2.registerCommand("Audits.getEncodedResponse", [{ "name": "requestId", "type": "string", "optional": false, "description": "Identifier of the network request to get content for.", "typeRef": "Network.RequestId" }, { "name": "encoding", "type": "string", "optional": false, "description": "The encoding to use.", "typeRef": "Audits.GetEncodedResponseRequestEncoding" }, { "name": "quality", "type": "number", "optional": true, "description": "The quality of the encoding (0-1). (defaults to 1)", "typeRef": null }, { "name": "sizeOnly", "type": "boolean", "optional": true, "description": "Whether to only return the size information (defaults to false).", "typeRef": null }], ["body", "originalSize", "encodedSize"], "Returns the response body and size if it were re-encoded with the specified settings. Only applies to images.");
  inspectorBackend2.registerCommand("Audits.disable", [], [], "Disables issues domain, prevents further issues from being reported to the client.");
  inspectorBackend2.registerCommand("Audits.enable", [], [], "Enables issues domain, sends the issues collected so far to the client by means of the `issueAdded` event.");
  inspectorBackend2.registerCommand("Audits.checkContrast", [{ "name": "reportAAA", "type": "boolean", "optional": true, "description": "Whether to report WCAG AAA level issues. Default is false.", "typeRef": null }], [], "Runs the contrast check for the target page. Found issues are reported using Audits.issueAdded event.");
  inspectorBackend2.registerCommand("Audits.checkFormsIssues", [], ["formIssues"], "Runs the form issues check for the target page. Found issues are reported using Audits.issueAdded event.");
  inspectorBackend2.registerType("Audits.AffectedCookie", [{ "name": "name", "type": "string", "optional": false, "description": "The following three properties uniquely identify a cookie", "typeRef": null }, { "name": "path", "type": "string", "optional": false, "description": "", "typeRef": null }, { "name": "domain", "type": "string", "optional": false, "description": "", "typeRef": null }]);
  inspectorBackend2.registerType("Audits.AffectedRequest", [{ "name": "requestId", "type": "string", "optional": true, "description": "The unique request id.", "typeRef": "Network.RequestId" }, { "name": "url", "type": "string", "optional": false, "description": "", "typeRef": null }]);
  inspectorBackend2.registerType("Audits.AffectedFrame", [{ "name": "frameId", "type": "string", "optional": false, "description": "", "typeRef": "Page.FrameId" }]);
  inspectorBackend2.registerType("Audits.CookieIssueInsight", [{ "name": "type", "type": "string", "optional": false, "description": "", "typeRef": "Audits.InsightType" }, { "name": "tableEntryUrl", "type": "string", "optional": true, "description": "Link to table entry in third-party cookie migration readiness list.", "typeRef": null }]);
  inspectorBackend2.registerType("Audits.CookieIssueDetails", [{ "name": "cookie", "type": "object", "optional": true, "description": "If AffectedCookie is not set then rawCookieLine contains the raw Set-Cookie header string. This hints at a problem where the cookie line is syntactically or semantically malformed in a way that no valid cookie could be created.", "typeRef": "Audits.AffectedCookie" }, { "name": "rawCookieLine", "type": "string", "optional": true, "description": "", "typeRef": null }, { "name": "cookieWarningReasons", "type": "array", "optional": false, "description": "", "typeRef": "Audits.CookieWarningReason" }, { "name": "cookieExclusionReasons", "type": "array", "optional": false, "description": "", "typeRef": "Audits.CookieExclusionReason" }, { "name": "operation", "type": "string", "optional": false, "description": "Optionally identifies the site-for-cookies and the cookie url, which may be used by the front-end as additional context.", "typeRef": "Audits.CookieOperation" }, { "name": "siteForCookies", "type": "string", "optional": true, "description": "", "typeRef": null }, { "name": "cookieUrl", "type": "string", "optional": true, "description": "", "typeRef": null }, { "name": "request", "type": "object", "optional": true, "description": "", "typeRef": "Audits.AffectedRequest" }, { "name": "insight", "type": "object", "optional": true, "description": "The recommended solution to the issue.", "typeRef": "Audits.CookieIssueInsight" }]);
  inspectorBackend2.registerType("Audits.PerformanceIssueDetails", [{ "name": "performanceIssueType", "type": "string", "optional": false, "description": "", "typeRef": "Audits.PerformanceIssueType" }, { "name": "sourceCodeLocation", "type": "object", "optional": true, "description": "", "typeRef": "Audits.SourceCodeLocation" }]);
  inspectorBackend2.registerType("Audits.MixedContentIssueDetails", [{ "name": "resourceType", "type": "string", "optional": true, "description": "The type of resource causing the mixed content issue (css, js, iframe, form,...). Marked as optional because it is mapped to from blink::mojom::RequestContextType, which will be replaced by network::mojom::RequestDestination", "typeRef": "Audits.MixedContentResourceType" }, { "name": "resolutionStatus", "type": "string", "optional": false, "description": "The way the mixed content issue is being resolved.", "typeRef": "Audits.MixedContentResolutionStatus" }, { "name": "insecureURL", "type": "string", "optional": false, "description": "The unsafe http url causing the mixed content issue.", "typeRef": null }, { "name": "mainResourceURL", "type": "string", "optional": false, "description": "The url responsible for the call to an unsafe url.", "typeRef": null }, { "name": "request", "type": "object", "optional": true, "description": "The mixed content request. Does not always exist (e.g. for unsafe form submission urls).", "typeRef": "Audits.AffectedRequest" }, { "name": "frame", "type": "object", "optional": true, "description": "Optional because not every mixed content issue is necessarily linked to a frame.", "typeRef": "Audits.AffectedFrame" }]);
  inspectorBackend2.registerType("Audits.BlockedByResponseIssueDetails", [{ "name": "request", "type": "object", "optional": false, "description": "", "typeRef": "Audits.AffectedRequest" }, { "name": "parentFrame", "type": "object", "optional": true, "description": "", "typeRef": "Audits.AffectedFrame" }, { "name": "blockedFrame", "type": "object", "optional": true, "description": "", "typeRef": "Audits.AffectedFrame" }, { "name": "reason", "type": "string", "optional": false, "description": "", "typeRef": "Audits.BlockedByResponseReason" }]);
  inspectorBackend2.registerType("Audits.HeavyAdIssueDetails", [{ "name": "resolution", "type": "string", "optional": false, "description": "The resolution status, either blocking the content or warning.", "typeRef": "Audits.HeavyAdResolutionStatus" }, { "name": "reason", "type": "string", "optional": false, "description": "The reason the ad was blocked, total network or cpu or peak cpu.", "typeRef": "Audits.HeavyAdReason" }, { "name": "frame", "type": "object", "optional": false, "description": "The frame that was blocked.", "typeRef": "Audits.AffectedFrame" }]);
  inspectorBackend2.registerType("Audits.SourceCodeLocation", [{ "name": "scriptId", "type": "string", "optional": true, "description": "", "typeRef": "Runtime.ScriptId" }, { "name": "url", "type": "string", "optional": false, "description": "", "typeRef": null }, { "name": "lineNumber", "type": "number", "optional": false, "description": "", "typeRef": null }, { "name": "columnNumber", "type": "number", "optional": false, "description": "", "typeRef": null }]);
  inspectorBackend2.registerType("Audits.ContentSecurityPolicyIssueDetails", [{ "name": "blockedURL", "type": "string", "optional": true, "description": "The url not included in allowed sources.", "typeRef": null }, { "name": "violatedDirective", "type": "string", "optional": false, "description": "Specific directive that is violated, causing the CSP issue.", "typeRef": null }, { "name": "isReportOnly", "type": "boolean", "optional": false, "description": "", "typeRef": null }, { "name": "contentSecurityPolicyViolationType", "type": "string", "optional": false, "description": "", "typeRef": "Audits.ContentSecurityPolicyViolationType" }, { "name": "frameAncestor", "type": "object", "optional": true, "description": "", "typeRef": "Audits.AffectedFrame" }, { "name": "sourceCodeLocation", "type": "object", "optional": true, "description": "", "typeRef": "Audits.SourceCodeLocation" }, { "name": "violatingNodeId", "type": "number", "optional": true, "description": "", "typeRef": "DOM.BackendNodeId" }]);
  inspectorBackend2.registerType("Audits.SharedArrayBufferIssueDetails", [{ "name": "sourceCodeLocation", "type": "object", "optional": false, "description": "", "typeRef": "Audits.SourceCodeLocation" }, { "name": "isWarning", "type": "boolean", "optional": false, "description": "", "typeRef": null }, { "name": "type", "type": "string", "optional": false, "description": "", "typeRef": "Audits.SharedArrayBufferIssueType" }]);
  inspectorBackend2.registerType("Audits.LowTextContrastIssueDetails", [{ "name": "violatingNodeId", "type": "number", "optional": false, "description": "", "typeRef": "DOM.BackendNodeId" }, { "name": "violatingNodeSelector", "type": "string", "optional": false, "description": "", "typeRef": null }, { "name": "contrastRatio", "type": "number", "optional": false, "description": "", "typeRef": null }, { "name": "thresholdAA", "type": "number", "optional": false, "description": "", "typeRef": null }, { "name": "thresholdAAA", "type": "number", "optional": false, "description": "", "typeRef": null }, { "name": "fontSize", "type": "string", "optional": false, "description": "", "typeRef": null }, { "name": "fontWeight", "type": "string", "optional": false, "description": "", "typeRef": null }]);
  inspectorBackend2.registerType("Audits.CorsIssueDetails", [{ "name": "corsErrorStatus", "type": "object", "optional": false, "description": "", "typeRef": "Network.CorsErrorStatus" }, { "name": "isWarning", "type": "boolean", "optional": false, "description": "", "typeRef": null }, { "name": "request", "type": "object", "optional": false, "description": "", "typeRef": "Audits.AffectedRequest" }, { "name": "location", "type": "object", "optional": true, "description": "", "typeRef": "Audits.SourceCodeLocation" }, { "name": "initiatorOrigin", "type": "string", "optional": true, "description": "", "typeRef": null }, { "name": "resourceIPAddressSpace", "type": "string", "optional": true, "description": "", "typeRef": "Network.IPAddressSpace" }, { "name": "clientSecurityState", "type": "object", "optional": true, "description": "", "typeRef": "Network.ClientSecurityState" }]);
  inspectorBackend2.registerType("Audits.AttributionReportingIssueDetails", [{ "name": "violationType", "type": "string", "optional": false, "description": "", "typeRef": "Audits.AttributionReportingIssueType" }, { "name": "request", "type": "object", "optional": true, "description": "", "typeRef": "Audits.AffectedRequest" }, { "name": "violatingNodeId", "type": "number", "optional": true, "description": "", "typeRef": "DOM.BackendNodeId" }, { "name": "invalidParameter", "type": "string", "optional": true, "description": "", "typeRef": null }]);
  inspectorBackend2.registerType("Audits.QuirksModeIssueDetails", [{ "name": "isLimitedQuirksMode", "type": "boolean", "optional": false, "description": `If false, it means the document's mode is \\"quirks\\" instead of \\"limited-quirks\\".`, "typeRef": null }, { "name": "documentNodeId", "type": "number", "optional": false, "description": "", "typeRef": "DOM.BackendNodeId" }, { "name": "url", "type": "string", "optional": false, "description": "", "typeRef": null }, { "name": "frameId", "type": "string", "optional": false, "description": "", "typeRef": "Page.FrameId" }, { "name": "loaderId", "type": "string", "optional": false, "description": "", "typeRef": "Network.LoaderId" }]);
  inspectorBackend2.registerType("Audits.NavigatorUserAgentIssueDetails", [{ "name": "url", "type": "string", "optional": false, "description": "", "typeRef": null }, { "name": "location", "type": "object", "optional": true, "description": "", "typeRef": "Audits.SourceCodeLocation" }]);
  inspectorBackend2.registerType("Audits.SharedDictionaryIssueDetails", [{ "name": "sharedDictionaryError", "type": "string", "optional": false, "description": "", "typeRef": "Audits.SharedDictionaryError" }, { "name": "request", "type": "object", "optional": false, "description": "", "typeRef": "Audits.AffectedRequest" }]);
  inspectorBackend2.registerType("Audits.SRIMessageSignatureIssueDetails", [{ "name": "error", "type": "string", "optional": false, "description": "", "typeRef": "Audits.SRIMessageSignatureError" }, { "name": "signatureBase", "type": "string", "optional": false, "description": "", "typeRef": null }, { "name": "integrityAssertions", "type": "array", "optional": false, "description": "", "typeRef": "string" }, { "name": "request", "type": "object", "optional": false, "description": "", "typeRef": "Audits.AffectedRequest" }]);
  inspectorBackend2.registerType("Audits.UnencodedDigestIssueDetails", [{ "name": "error", "type": "string", "optional": false, "description": "", "typeRef": "Audits.UnencodedDigestError" }, { "name": "request", "type": "object", "optional": false, "description": "", "typeRef": "Audits.AffectedRequest" }]);
  inspectorBackend2.registerType("Audits.ConnectionAllowlistIssueDetails", [{ "name": "error", "type": "string", "optional": false, "description": "", "typeRef": "Audits.ConnectionAllowlistError" }, { "name": "request", "type": "object", "optional": false, "description": "", "typeRef": "Audits.AffectedRequest" }]);
  inspectorBackend2.registerType("Audits.GenericIssueDetails", [{ "name": "errorType", "type": "string", "optional": false, "description": "Issues with the same errorType are aggregated in the frontend.", "typeRef": "Audits.GenericIssueErrorType" }, { "name": "frameId", "type": "string", "optional": true, "description": "", "typeRef": "Page.FrameId" }, { "name": "violatingNodeId", "type": "number", "optional": true, "description": "", "typeRef": "DOM.BackendNodeId" }, { "name": "violatingNodeAttribute", "type": "string", "optional": true, "description": "", "typeRef": null }, { "name": "request", "type": "object", "optional": true, "description": "", "typeRef": "Audits.AffectedRequest" }]);
  inspectorBackend2.registerType("Audits.DeprecationIssueDetails", [{ "name": "affectedFrame", "type": "object", "optional": true, "description": "", "typeRef": "Audits.AffectedFrame" }, { "name": "sourceCodeLocation", "type": "object", "optional": false, "description": "", "typeRef": "Audits.SourceCodeLocation" }, { "name": "type", "type": "string", "optional": false, "description": "One of the deprecation names from third_party/blink/renderer/core/frame/deprecation/deprecation.json5", "typeRef": null }]);
  inspectorBackend2.registerType("Audits.BounceTrackingIssueDetails", [{ "name": "trackingSites", "type": "array", "optional": false, "description": "", "typeRef": "string" }]);
  inspectorBackend2.registerType("Audits.CookieDeprecationMetadataIssueDetails", [{ "name": "allowedSites", "type": "array", "optional": false, "description": "", "typeRef": "string" }, { "name": "optOutPercentage", "type": "number", "optional": false, "description": "", "typeRef": null }, { "name": "isOptOutTopLevel", "type": "boolean", "optional": false, "description": "", "typeRef": null }, { "name": "operation", "type": "string", "optional": false, "description": "", "typeRef": "Audits.CookieOperation" }]);
  inspectorBackend2.registerType("Audits.FederatedAuthRequestIssueDetails", [{ "name": "federatedAuthRequestIssueReason", "type": "string", "optional": false, "description": "", "typeRef": "Audits.FederatedAuthRequestIssueReason" }]);
  inspectorBackend2.registerType("Audits.FederatedAuthUserInfoRequestIssueDetails", [{ "name": "federatedAuthUserInfoRequestIssueReason", "type": "string", "optional": false, "description": "", "typeRef": "Audits.FederatedAuthUserInfoRequestIssueReason" }]);
  inspectorBackend2.registerType("Audits.ClientHintIssueDetails", [{ "name": "sourceCodeLocation", "type": "object", "optional": false, "description": "", "typeRef": "Audits.SourceCodeLocation" }, { "name": "clientHintIssueReason", "type": "string", "optional": false, "description": "", "typeRef": "Audits.ClientHintIssueReason" }]);
  inspectorBackend2.registerType("Audits.FailedRequestInfo", [{ "name": "url", "type": "string", "optional": false, "description": "The URL that failed to load.", "typeRef": null }, { "name": "failureMessage", "type": "string", "optional": false, "description": "The failure message for the failed request.", "typeRef": null }, { "name": "requestId", "type": "string", "optional": true, "description": "", "typeRef": "Network.RequestId" }]);
  inspectorBackend2.registerType("Audits.PartitioningBlobURLIssueDetails", [{ "name": "url", "type": "string", "optional": false, "description": "The BlobURL that failed to load.", "typeRef": null }, { "name": "partitioningBlobURLInfo", "type": "string", "optional": false, "description": "Additional information about the Partitioning Blob URL issue.", "typeRef": "Audits.PartitioningBlobURLInfo" }]);
  inspectorBackend2.registerType("Audits.ElementAccessibilityIssueDetails", [{ "name": "nodeId", "type": "number", "optional": false, "description": "", "typeRef": "DOM.BackendNodeId" }, { "name": "elementAccessibilityIssueReason", "type": "string", "optional": false, "description": "", "typeRef": "Audits.ElementAccessibilityIssueReason" }, { "name": "hasDisallowedAttributes", "type": "boolean", "optional": false, "description": "", "typeRef": null }]);
  inspectorBackend2.registerType("Audits.StylesheetLoadingIssueDetails", [{ "name": "sourceCodeLocation", "type": "object", "optional": false, "description": "Source code position that referenced the failing stylesheet.", "typeRef": "Audits.SourceCodeLocation" }, { "name": "styleSheetLoadingIssueReason", "type": "string", "optional": false, "description": "Reason why the stylesheet couldn't be loaded.", "typeRef": "Audits.StyleSheetLoadingIssueReason" }, { "name": "failedRequestInfo", "type": "object", "optional": true, "description": "Contains additional info when the failure was due to a request.", "typeRef": "Audits.FailedRequestInfo" }]);
  inspectorBackend2.registerType("Audits.PropertyRuleIssueDetails", [{ "name": "sourceCodeLocation", "type": "object", "optional": false, "description": "Source code position of the property rule.", "typeRef": "Audits.SourceCodeLocation" }, { "name": "propertyRuleIssueReason", "type": "string", "optional": false, "description": "Reason why the property rule was discarded.", "typeRef": "Audits.PropertyRuleIssueReason" }, { "name": "propertyValue", "type": "string", "optional": true, "description": "The value of the property rule property that failed to parse", "typeRef": null }]);
  inspectorBackend2.registerType("Audits.UserReidentificationIssueDetails", [{ "name": "type", "type": "string", "optional": false, "description": "", "typeRef": "Audits.UserReidentificationIssueType" }, { "name": "request", "type": "object", "optional": true, "description": "Applies to BlockedFrameNavigation and BlockedSubresource issue types.", "typeRef": "Audits.AffectedRequest" }, { "name": "sourceCodeLocation", "type": "object", "optional": true, "description": "Applies to NoisedCanvasReadback issue type.", "typeRef": "Audits.SourceCodeLocation" }]);
  inspectorBackend2.registerType("Audits.PermissionElementIssueDetails", [{ "name": "issueType", "type": "string", "optional": false, "description": "", "typeRef": "Audits.PermissionElementIssueType" }, { "name": "type", "type": "string", "optional": true, "description": "The value of the type attribute.", "typeRef": null }, { "name": "nodeId", "type": "number", "optional": true, "description": "The node ID of the <permission> element.", "typeRef": "DOM.BackendNodeId" }, { "name": "isWarning", "type": "boolean", "optional": true, "description": "True if the issue is a warning, false if it is an error.", "typeRef": null }, { "name": "permissionName", "type": "string", "optional": true, "description": "Fields for message construction: Used for messages that reference a specific permission name", "typeRef": null }, { "name": "occluderNodeInfo", "type": "string", "optional": true, "description": "Used for messages about occlusion", "typeRef": null }, { "name": "occluderParentNodeInfo", "type": "string", "optional": true, "description": "Used for messages about occluder's parent", "typeRef": null }, { "name": "disableReason", "type": "string", "optional": true, "description": "Used for messages about activation disabled reason", "typeRef": null }]);
  inspectorBackend2.registerType("Audits.AdScriptIdentifier", [{ "name": "scriptId", "type": "string", "optional": false, "description": "The script's v8 identifier.", "typeRef": "Runtime.ScriptId" }, { "name": "debuggerId", "type": "string", "optional": false, "description": "v8's debugging id for the v8::Context.", "typeRef": "Runtime.UniqueDebuggerId" }, { "name": "name", "type": "string", "optional": false, "description": "The script's url (or generated name based on id if inline script).", "typeRef": null }]);
  inspectorBackend2.registerType("Audits.AdAncestry", [{ "name": "adAncestryChain", "type": "array", "optional": false, "description": "The ad-script in the stack when the offending script was loaded. This is recursive down to the root script that was tagged due to the filterlist rule.", "typeRef": "Audits.AdScriptIdentifier" }, { "name": "rootScriptFilterlistRule", "type": "string", "optional": true, "description": "The filterlist rule that caused the root (last) script in `adAncestry` to be ad-tagged.", "typeRef": null }]);
  inspectorBackend2.registerType("Audits.SelectivePermissionsInterventionIssueDetails", [{ "name": "apiName", "type": "string", "optional": false, "description": "Which API was intervened on.", "typeRef": null }, { "name": "adAncestry", "type": "object", "optional": false, "description": "Why the ad script using the API is considered an ad.", "typeRef": "Audits.AdAncestry" }, { "name": "stackTrace", "type": "object", "optional": true, "description": "The stack trace at the time of the intervention.", "typeRef": "Runtime.StackTrace" }]);
  inspectorBackend2.registerType("Audits.InspectorIssueDetails", [{ "name": "cookieIssueDetails", "type": "object", "optional": true, "description": "", "typeRef": "Audits.CookieIssueDetails" }, { "name": "mixedContentIssueDetails", "type": "object", "optional": true, "description": "", "typeRef": "Audits.MixedContentIssueDetails" }, { "name": "blockedByResponseIssueDetails", "type": "object", "optional": true, "description": "", "typeRef": "Audits.BlockedByResponseIssueDetails" }, { "name": "heavyAdIssueDetails", "type": "object", "optional": true, "description": "", "typeRef": "Audits.HeavyAdIssueDetails" }, { "name": "contentSecurityPolicyIssueDetails", "type": "object", "optional": true, "description": "", "typeRef": "Audits.ContentSecurityPolicyIssueDetails" }, { "name": "sharedArrayBufferIssueDetails", "type": "object", "optional": true, "description": "", "typeRef": "Audits.SharedArrayBufferIssueDetails" }, { "name": "lowTextContrastIssueDetails", "type": "object", "optional": true, "description": "", "typeRef": "Audits.LowTextContrastIssueDetails" }, { "name": "corsIssueDetails", "type": "object", "optional": true, "description": "", "typeRef": "Audits.CorsIssueDetails" }, { "name": "attributionReportingIssueDetails", "type": "object", "optional": true, "description": "", "typeRef": "Audits.AttributionReportingIssueDetails" }, { "name": "quirksModeIssueDetails", "type": "object", "optional": true, "description": "", "typeRef": "Audits.QuirksModeIssueDetails" }, { "name": "partitioningBlobURLIssueDetails", "type": "object", "optional": true, "description": "", "typeRef": "Audits.PartitioningBlobURLIssueDetails" }, { "name": "navigatorUserAgentIssueDetails", "type": "object", "optional": true, "description": "", "typeRef": "Audits.NavigatorUserAgentIssueDetails" }, { "name": "genericIssueDetails", "type": "object", "optional": true, "description": "", "typeRef": "Audits.GenericIssueDetails" }, { "name": "deprecationIssueDetails", "type": "object", "optional": true, "description": "", "typeRef": "Audits.DeprecationIssueDetails" }, { "name": "clientHintIssueDetails", "type": "object", "optional": true, "description": "", "typeRef": "Audits.ClientHintIssueDetails" }, { "name": "federatedAuthRequestIssueDetails", "type": "object", "optional": true, "description": "", "typeRef": "Audits.FederatedAuthRequestIssueDetails" }, { "name": "bounceTrackingIssueDetails", "type": "object", "optional": true, "description": "", "typeRef": "Audits.BounceTrackingIssueDetails" }, { "name": "cookieDeprecationMetadataIssueDetails", "type": "object", "optional": true, "description": "", "typeRef": "Audits.CookieDeprecationMetadataIssueDetails" }, { "name": "stylesheetLoadingIssueDetails", "type": "object", "optional": true, "description": "", "typeRef": "Audits.StylesheetLoadingIssueDetails" }, { "name": "propertyRuleIssueDetails", "type": "object", "optional": true, "description": "", "typeRef": "Audits.PropertyRuleIssueDetails" }, { "name": "federatedAuthUserInfoRequestIssueDetails", "type": "object", "optional": true, "description": "", "typeRef": "Audits.FederatedAuthUserInfoRequestIssueDetails" }, { "name": "sharedDictionaryIssueDetails", "type": "object", "optional": true, "description": "", "typeRef": "Audits.SharedDictionaryIssueDetails" }, { "name": "elementAccessibilityIssueDetails", "type": "object", "optional": true, "description": "", "typeRef": "Audits.ElementAccessibilityIssueDetails" }, { "name": "sriMessageSignatureIssueDetails", "type": "object", "optional": true, "description": "", "typeRef": "Audits.SRIMessageSignatureIssueDetails" }, { "name": "unencodedDigestIssueDetails", "type": "object", "optional": true, "description": "", "typeRef": "Audits.UnencodedDigestIssueDetails" }, { "name": "connectionAllowlistIssueDetails", "type": "object", "optional": true, "description": "", "typeRef": "Audits.ConnectionAllowlistIssueDetails" }, { "name": "userReidentificationIssueDetails", "type": "object", "optional": true, "description": "", "typeRef": "Audits.UserReidentificationIssueDetails" }, { "name": "permissionElementIssueDetails", "type": "object", "optional": true, "description": "", "typeRef": "Audits.PermissionElementIssueDetails" }, { "name": "performanceIssueDetails", "type": "object", "optional": true, "description": "", "typeRef": "Audits.PerformanceIssueDetails" }, { "name": "selectivePermissionsInterventionIssueDetails", "type": "object", "optional": true, "description": "", "typeRef": "Audits.SelectivePermissionsInterventionIssueDetails" }]);
  inspectorBackend2.registerType("Audits.InspectorIssue", [{ "name": "code", "type": "string", "optional": false, "description": "", "typeRef": "Audits.InspectorIssueCode" }, { "name": "details", "type": "object", "optional": false, "description": "", "typeRef": "Audits.InspectorIssueDetails" }, { "name": "issueId", "type": "string", "optional": true, "description": "A unique id for this issue. May be omitted if no other entity (e.g. exception, CDP message, etc.) is referencing this issue.", "typeRef": "Audits.IssueId" }]);
  inspectorBackend2.registerEnum("Autofill.FillingStrategy", { AutocompleteAttribute: "autocompleteAttribute", AutofillInferred: "autofillInferred" });
  inspectorBackend2.registerEvent("Autofill.addressFormFilled", ["filledFields", "addressUi"]);
  inspectorBackend2.registerCommand("Autofill.trigger", [{ "name": "fieldId", "type": "number", "optional": false, "description": "Identifies a field that serves as an anchor for autofill.", "typeRef": "DOM.BackendNodeId" }, { "name": "frameId", "type": "string", "optional": true, "description": "Identifies the frame that field belongs to.", "typeRef": "Page.FrameId" }, { "name": "card", "type": "object", "optional": true, "description": "Credit card information to fill out the form. Credit card data is not saved.  Mutually exclusive with `address`.", "typeRef": "Autofill.CreditCard" }, { "name": "address", "type": "object", "optional": true, "description": "Address to fill out the form. Address data is not saved. Mutually exclusive with `card`.", "typeRef": "Autofill.Address" }], [], "Trigger autofill on a form identified by the fieldId. If the field and related form cannot be autofilled, returns an error.");
  inspectorBackend2.registerCommand("Autofill.setAddresses", [{ "name": "addresses", "type": "array", "optional": false, "description": "", "typeRef": "Autofill.Address" }], [], "Set addresses so that developers can verify their forms implementation.");
  inspectorBackend2.registerCommand("Autofill.disable", [], [], "Disables autofill domain notifications.");
  inspectorBackend2.registerCommand("Autofill.enable", [], [], "Enables autofill domain notifications.");
  inspectorBackend2.registerType("Autofill.CreditCard", [{ "name": "number", "type": "string", "optional": false, "description": "16-digit credit card number.", "typeRef": null }, { "name": "name", "type": "string", "optional": false, "description": "Name of the credit card owner.", "typeRef": null }, { "name": "expiryMonth", "type": "string", "optional": false, "description": "2-digit expiry month.", "typeRef": null }, { "name": "expiryYear", "type": "string", "optional": false, "description": "4-digit expiry year.", "typeRef": null }, { "name": "cvc", "type": "string", "optional": false, "description": "3-digit card verification code.", "typeRef": null }]);
  inspectorBackend2.registerType("Autofill.AddressField", [{ "name": "name", "type": "string", "optional": false, "description": "address field name, for example GIVEN_NAME. The full list of supported field names: https://source.chromium.org/chromium/chromium/src/+/main:components/autofill/core/browser/field_types.cc;l=38", "typeRef": null }, { "name": "value", "type": "string", "optional": false, "description": "address field value, for example Jon Doe.", "typeRef": null }]);
  inspectorBackend2.registerType("Autofill.AddressFields", [{ "name": "fields", "type": "array", "optional": false, "description": "", "typeRef": "Autofill.AddressField" }]);
  inspectorBackend2.registerType("Autofill.Address", [{ "name": "fields", "type": "array", "optional": false, "description": "fields and values defining an address.", "typeRef": "Autofill.AddressField" }]);
  inspectorBackend2.registerType("Autofill.AddressUI", [{ "name": "addressFields", "type": "array", "optional": false, "description": "A two dimension array containing the representation of values from an address profile.", "typeRef": "Autofill.AddressFields" }]);
  inspectorBackend2.registerType("Autofill.FilledField", [{ "name": "htmlType", "type": "string", "optional": false, "description": "The type of the field, e.g text, password etc.", "typeRef": null }, { "name": "id", "type": "string", "optional": false, "description": "the html id", "typeRef": null }, { "name": "name", "type": "string", "optional": false, "description": "the html name", "typeRef": null }, { "name": "value", "type": "string", "optional": false, "description": "the field value", "typeRef": null }, { "name": "autofillType", "type": "string", "optional": false, "description": "The actual field type, e.g FAMILY_NAME", "typeRef": null }, { "name": "fillingStrategy", "type": "string", "optional": false, "description": "The filling strategy", "typeRef": "Autofill.FillingStrategy" }, { "name": "frameId", "type": "string", "optional": false, "description": "The frame the field belongs to", "typeRef": "Page.FrameId" }, { "name": "fieldId", "type": "number", "optional": false, "description": "The form field's DOM node", "typeRef": "DOM.BackendNodeId" }]);
  inspectorBackend2.registerEnum("BackgroundService.ServiceName", { BackgroundFetch: "backgroundFetch", BackgroundSync: "backgroundSync", PushMessaging: "pushMessaging", Notifications: "notifications", PaymentHandler: "paymentHandler", PeriodicBackgroundSync: "periodicBackgroundSync" });
  inspectorBackend2.registerEvent("BackgroundService.recordingStateChanged", ["isRecording", "service"]);
  inspectorBackend2.registerEvent("BackgroundService.backgroundServiceEventReceived", ["backgroundServiceEvent"]);
  inspectorBackend2.registerCommand("BackgroundService.startObserving", [{ "name": "service", "type": "string", "optional": false, "description": "", "typeRef": "BackgroundService.ServiceName" }], [], "Enables event updates for the service.");
  inspectorBackend2.registerCommand("BackgroundService.stopObserving", [{ "name": "service", "type": "string", "optional": false, "description": "", "typeRef": "BackgroundService.ServiceName" }], [], "Disables event updates for the service.");
  inspectorBackend2.registerCommand("BackgroundService.setRecording", [{ "name": "shouldRecord", "type": "boolean", "optional": false, "description": "", "typeRef": null }, { "name": "service", "type": "string", "optional": false, "description": "", "typeRef": "BackgroundService.ServiceName" }], [], "Set the recording state for the service.");
  inspectorBackend2.registerCommand("BackgroundService.clearEvents", [{ "name": "service", "type": "string", "optional": false, "description": "", "typeRef": "BackgroundService.ServiceName" }], [], "Clears all stored data for the service.");
  inspectorBackend2.registerType("BackgroundService.EventMetadata", [{ "name": "key", "type": "string", "optional": false, "description": "", "typeRef": null }, { "name": "value", "type": "string", "optional": false, "description": "", "typeRef": null }]);
  inspectorBackend2.registerType("BackgroundService.BackgroundServiceEvent", [{ "name": "timestamp", "type": "number", "optional": false, "description": "Timestamp of the event (in seconds).", "typeRef": "Network.TimeSinceEpoch" }, { "name": "origin", "type": "string", "optional": false, "description": "The origin this event belongs to.", "typeRef": null }, { "name": "serviceWorkerRegistrationId", "type": "string", "optional": false, "description": "The Service Worker ID that initiated the event.", "typeRef": "ServiceWorker.RegistrationID" }, { "name": "service", "type": "string", "optional": false, "description": "The Background Service this event belongs to.", "typeRef": "BackgroundService.ServiceName" }, { "name": "eventName", "type": "string", "optional": false, "description": "A description of the event.", "typeRef": null }, { "name": "instanceId", "type": "string", "optional": false, "description": "An identifier that groups related events together.", "typeRef": null }, { "name": "eventMetadata", "type": "array", "optional": false, "description": "A list of event-specific information.", "typeRef": "BackgroundService.EventMetadata" }, { "name": "storageKey", "type": "string", "optional": false, "description": "Storage key this event belongs to.", "typeRef": null }]);
  inspectorBackend2.registerEnum("BluetoothEmulation.CentralState", { Absent: "absent", PoweredOff: "powered-off", PoweredOn: "powered-on" });
  inspectorBackend2.registerEnum("BluetoothEmulation.GATTOperationType", { Connection: "connection", Discovery: "discovery" });
  inspectorBackend2.registerEnum("BluetoothEmulation.CharacteristicWriteType", { WriteDefaultDeprecated: "write-default-deprecated", WriteWithResponse: "write-with-response", WriteWithoutResponse: "write-without-response" });
  inspectorBackend2.registerEnum("BluetoothEmulation.CharacteristicOperationType", { Read: "read", Write: "write", SubscribeToNotifications: "subscribe-to-notifications", UnsubscribeFromNotifications: "unsubscribe-from-notifications" });
  inspectorBackend2.registerEnum("BluetoothEmulation.DescriptorOperationType", { Read: "read", Write: "write" });
  inspectorBackend2.registerEvent("BluetoothEmulation.gattOperationReceived", ["address", "type"]);
  inspectorBackend2.registerEvent("BluetoothEmulation.characteristicOperationReceived", ["characteristicId", "type", "data", "writeType"]);
  inspectorBackend2.registerEvent("BluetoothEmulation.descriptorOperationReceived", ["descriptorId", "type", "data"]);
  inspectorBackend2.registerCommand("BluetoothEmulation.enable", [{ "name": "state", "type": "string", "optional": false, "description": "State of the simulated central.", "typeRef": "BluetoothEmulation.CentralState" }, { "name": "leSupported", "type": "boolean", "optional": false, "description": "If the simulated central supports low-energy.", "typeRef": null }], [], "Enable the BluetoothEmulation domain.");
  inspectorBackend2.registerCommand("BluetoothEmulation.setSimulatedCentralState", [{ "name": "state", "type": "string", "optional": false, "description": "State of the simulated central.", "typeRef": "BluetoothEmulation.CentralState" }], [], "Set the state of the simulated central.");
  inspectorBackend2.registerCommand("BluetoothEmulation.disable", [], [], "Disable the BluetoothEmulation domain.");
  inspectorBackend2.registerCommand("BluetoothEmulation.simulatePreconnectedPeripheral", [{ "name": "address", "type": "string", "optional": false, "description": "", "typeRef": null }, { "name": "name", "type": "string", "optional": false, "description": "", "typeRef": null }, { "name": "manufacturerData", "type": "array", "optional": false, "description": "", "typeRef": "BluetoothEmulation.ManufacturerData" }, { "name": "knownServiceUuids", "type": "array", "optional": false, "description": "", "typeRef": "string" }], [], "Simulates a peripheral with |address|, |name| and |knownServiceUuids| that has already been connected to the system.");
  inspectorBackend2.registerCommand("BluetoothEmulation.simulateAdvertisement", [{ "name": "entry", "type": "object", "optional": false, "description": "", "typeRef": "BluetoothEmulation.ScanEntry" }], [], "Simulates an advertisement packet described in |entry| being received by the central.");
  inspectorBackend2.registerCommand("BluetoothEmulation.simulateGATTOperationResponse", [{ "name": "address", "type": "string", "optional": false, "description": "", "typeRef": null }, { "name": "type", "type": "string", "optional": false, "description": "", "typeRef": "BluetoothEmulation.GATTOperationType" }, { "name": "code", "type": "number", "optional": false, "description": "", "typeRef": null }], [], "Simulates the response code from the peripheral with |address| for a GATT operation of |type|. The |code| value follows the HCI Error Codes from Bluetooth Core Specification Vol 2 Part D 1.3 List Of Error Codes.");
  inspectorBackend2.registerCommand("BluetoothEmulation.simulateCharacteristicOperationResponse", [{ "name": "characteristicId", "type": "string", "optional": false, "description": "", "typeRef": null }, { "name": "type", "type": "string", "optional": false, "description": "", "typeRef": "BluetoothEmulation.CharacteristicOperationType" }, { "name": "code", "type": "number", "optional": false, "description": "", "typeRef": null }, { "name": "data", "type": "string", "optional": true, "description": "", "typeRef": null }], [], "Simulates the response from the characteristic with |characteristicId| for a characteristic operation of |type|. The |code| value follows the Error Codes from Bluetooth Core Specification Vol 3 Part F 3.4.1.1 Error Response. The |data| is expected to exist when simulating a successful read operation response.");
  inspectorBackend2.registerCommand("BluetoothEmulation.simulateDescriptorOperationResponse", [{ "name": "descriptorId", "type": "string", "optional": false, "description": "", "typeRef": null }, { "name": "type", "type": "string", "optional": false, "description": "", "typeRef": "BluetoothEmulation.DescriptorOperationType" }, { "name": "code", "type": "number", "optional": false, "description": "", "typeRef": null }, { "name": "data", "type": "string", "optional": true, "description": "", "typeRef": null }], [], "Simulates the response from the descriptor with |descriptorId| for a descriptor operation of |type|. The |code| value follows the Error Codes from Bluetooth Core Specification Vol 3 Part F 3.4.1.1 Error Response. The |data| is expected to exist when simulating a successful read operation response.");
  inspectorBackend2.registerCommand("BluetoothEmulation.addService", [{ "name": "address", "type": "string", "optional": false, "description": "", "typeRef": null }, { "name": "serviceUuid", "type": "string", "optional": false, "description": "", "typeRef": null }], ["serviceId"], "Adds a service with |serviceUuid| to the peripheral with |address|.");
  inspectorBackend2.registerCommand("BluetoothEmulation.removeService", [{ "name": "serviceId", "type": "string", "optional": false, "description": "", "typeRef": null }], [], "Removes the service respresented by |serviceId| from the simulated central.");
  inspectorBackend2.registerCommand("BluetoothEmulation.addCharacteristic", [{ "name": "serviceId", "type": "string", "optional": false, "description": "", "typeRef": null }, { "name": "characteristicUuid", "type": "string", "optional": false, "description": "", "typeRef": null }, { "name": "properties", "type": "object", "optional": false, "description": "", "typeRef": "BluetoothEmulation.CharacteristicProperties" }], ["characteristicId"], "Adds a characteristic with |characteristicUuid| and |properties| to the service represented by |serviceId|.");
  inspectorBackend2.registerCommand("BluetoothEmulation.removeCharacteristic", [{ "name": "characteristicId", "type": "string", "optional": false, "description": "", "typeRef": null }], [], "Removes the characteristic respresented by |characteristicId| from the simulated central.");
  inspectorBackend2.registerCommand("BluetoothEmulation.addDescriptor", [{ "name": "characteristicId", "type": "string", "optional": false, "description": "", "typeRef": null }, { "name": "descriptorUuid", "type": "string", "optional": false, "description": "", "typeRef": null }], ["descriptorId"], "Adds a descriptor with |descriptorUuid| to the characteristic respresented by |characteristicId|.");
  inspectorBackend2.registerCommand("BluetoothEmulation.removeDescriptor", [{ "name": "descriptorId", "type": "string", "optional": false, "description": "", "typeRef": null }], [], "Removes the descriptor with |descriptorId| from the simulated central.");
  inspectorBackend2.registerCommand("BluetoothEmulation.simulateGATTDisconnection", [{ "name": "address", "type": "string", "optional": false, "description": "", "typeRef": null }], [], "Simulates a GATT disconnection from the peripheral with |address|.");
  inspectorBackend2.registerType("BluetoothEmulation.ManufacturerData", [{ "name": "key", "type": "number", "optional": false, "description": "Company identifier https://bitbucket.org/bluetooth-SIG/public/src/main/assigned_numbers/company_identifiers/company_identifiers.yaml https://usb.org/developers", "typeRef": null }, { "name": "data", "type": "string", "optional": false, "description": "Manufacturer-specific data", "typeRef": null }]);
  inspectorBackend2.registerType("BluetoothEmulation.ScanRecord", [{ "name": "name", "type": "string", "optional": true, "description": "", "typeRef": null }, { "name": "uuids", "type": "array", "optional": true, "description": "", "typeRef": "string" }, { "name": "appearance", "type": "number", "optional": true, "description": "Stores the external appearance description of the device.", "typeRef": null }, { "name": "txPower", "type": "number", "optional": true, "description": "Stores the transmission power of a broadcasting device.", "typeRef": null }, { "name": "manufacturerData", "type": "array", "optional": true, "description": "Key is the company identifier and the value is an array of bytes of manufacturer specific data.", "typeRef": "BluetoothEmulation.ManufacturerData" }]);
  inspectorBackend2.registerType("BluetoothEmulation.ScanEntry", [{ "name": "deviceAddress", "type": "string", "optional": false, "description": "", "typeRef": null }, { "name": "rssi", "type": "number", "optional": false, "description": "", "typeRef": null }, { "name": "scanRecord", "type": "object", "optional": false, "description": "", "typeRef": "BluetoothEmulation.ScanRecord" }]);
  inspectorBackend2.registerType("BluetoothEmulation.CharacteristicProperties", [{ "name": "broadcast", "type": "boolean", "optional": true, "description": "", "typeRef": null }, { "name": "read", "type": "boolean", "optional": true, "description": "", "typeRef": null }, { "name": "writeWithoutResponse", "type": "boolean", "optional": true, "description": "", "typeRef": null }, { "name": "write", "type": "boolean", "optional": true, "description": "", "typeRef": null }, { "name": "notify", "type": "boolean", "optional": true, "description": "", "typeRef": null }, { "name": "indicate", "type": "boolean", "optional": true, "description": "", "typeRef": null }, { "name": "authenticatedSignedWrites", "type": "boolean", "optional": true, "description": "", "typeRef": null }, { "name": "extendedProperties", "type": "boolean", "optional": true, "description": "", "typeRef": null }]);
  inspectorBackend2.registerEnum("Browser.WindowState", { Normal: "normal", Minimized: "minimized", Maximized: "maximized", Fullscreen: "fullscreen" });
  inspectorBackend2.registerEnum("Browser.PermissionType", { Ar: "ar", AudioCapture: "audioCapture", AutomaticFullscreen: "automaticFullscreen", BackgroundFetch: "backgroundFetch", BackgroundSync: "backgroundSync", CameraPanTiltZoom: "cameraPanTiltZoom", CapturedSurfaceControl: "capturedSurfaceControl", ClipboardReadWrite: "clipboardReadWrite", ClipboardSanitizedWrite: "clipboardSanitizedWrite", DisplayCapture: "displayCapture", DurableStorage: "durableStorage", Geolocation: "geolocation", HandTracking: "handTracking", IdleDetection: "idleDetection", KeyboardLock: "keyboardLock", LocalFonts: "localFonts", LocalNetwork: "localNetwork", LocalNetworkAccess: "localNetworkAccess", LoopbackNetwork: "loopbackNetwork", Midi: "midi", MidiSysex: "midiSysex", Nfc: "nfc", Notifications: "notifications", PaymentHandler: "paymentHandler", PeriodicBackgroundSync: "periodicBackgroundSync", PointerLock: "pointerLock", ProtectedMediaIdentifier: "protectedMediaIdentifier", Sensors: "sensors", SmartCard: "smartCard", SpeakerSelection: "speakerSelection", StorageAccess: "storageAccess", TopLevelStorageAccess: "topLevelStorageAccess", VideoCapture: "videoCapture", Vr: "vr", WakeLockScreen: "wakeLockScreen", WakeLockSystem: "wakeLockSystem", WebAppInstallation: "webAppInstallation", WebPrinting: "webPrinting", WindowManagement: "windowManagement" });
  inspectorBackend2.registerEnum("Browser.PermissionSetting", { Granted: "granted", Denied: "denied", Prompt: "prompt" });
  inspectorBackend2.registerEnum("Browser.BrowserCommandId", { OpenTabSearch: "openTabSearch", CloseTabSearch: "closeTabSearch", OpenGlic: "openGlic" });
  inspectorBackend2.registerEnum("Browser.PrivacySandboxAPI", { BiddingAndAuctionServices: "BiddingAndAuctionServices", TrustedKeyValue: "TrustedKeyValue" });
  inspectorBackend2.registerEvent("Browser.downloadWillBegin", ["frameId", "guid", "url", "suggestedFilename"]);
  inspectorBackend2.registerEnum("Browser.DownloadProgressEventState", { InProgress: "inProgress", Completed: "completed", Canceled: "canceled" });
  inspectorBackend2.registerEvent("Browser.downloadProgress", ["guid", "totalBytes", "receivedBytes", "state", "filePath"]);
  inspectorBackend2.registerCommand("Browser.setPermission", [{ "name": "permission", "type": "object", "optional": false, "description": "Descriptor of permission to override.", "typeRef": "Browser.PermissionDescriptor" }, { "name": "setting", "type": "string", "optional": false, "description": "Setting of the permission.", "typeRef": "Browser.PermissionSetting" }, { "name": "origin", "type": "string", "optional": true, "description": "Embedding origin the permission applies to, all origins if not specified.", "typeRef": null }, { "name": "embeddedOrigin", "type": "string", "optional": true, "description": "Embedded origin the permission applies to. It is ignored unless the embedding origin is present and valid. If the embedding origin is provided but the embedded origin isn't, the embedding origin is used as the embedded origin.", "typeRef": null }, { "name": "browserContextId", "type": "string", "optional": true, "description": "Context to override. When omitted, default browser context is used.", "typeRef": "Browser.BrowserContextID" }], [], "Set permission settings for given embedding and embedded origins.");
  inspectorBackend2.registerCommand("Browser.grantPermissions", [{ "name": "permissions", "type": "array", "optional": false, "description": "", "typeRef": "Browser.PermissionType" }, { "name": "origin", "type": "string", "optional": true, "description": "Origin the permission applies to, all origins if not specified.", "typeRef": null }, { "name": "browserContextId", "type": "string", "optional": true, "description": "BrowserContext to override permissions. When omitted, default browser context is used.", "typeRef": "Browser.BrowserContextID" }], [], "Grant specific permissions to the given origin and reject all others. Deprecated. Use setPermission instead.");
  inspectorBackend2.registerCommand("Browser.resetPermissions", [{ "name": "browserContextId", "type": "string", "optional": true, "description": "BrowserContext to reset permissions. When omitted, default browser context is used.", "typeRef": "Browser.BrowserContextID" }], [], "Reset all permission management for all origins.");
  inspectorBackend2.registerEnum("Browser.SetDownloadBehaviorRequestBehavior", { Deny: "deny", Allow: "allow", AllowAndName: "allowAndName", Default: "default" });
  inspectorBackend2.registerCommand("Browser.setDownloadBehavior", [{ "name": "behavior", "type": "string", "optional": false, "description": "Whether to allow all or deny all download requests, or use default Chrome behavior if available (otherwise deny). |allowAndName| allows download and names files according to their download guids.", "typeRef": "Browser.SetDownloadBehaviorRequestBehavior" }, { "name": "browserContextId", "type": "string", "optional": true, "description": "BrowserContext to set download behavior. When omitted, default browser context is used.", "typeRef": "Browser.BrowserContextID" }, { "name": "downloadPath", "type": "string", "optional": true, "description": "The default path to save downloaded files to. This is required if behavior is set to 'allow' or 'allowAndName'.", "typeRef": null }, { "name": "eventsEnabled", "type": "boolean", "optional": true, "description": "Whether to emit download events (defaults to false).", "typeRef": null }], [], "Set the behavior when downloading a file.");
  inspectorBackend2.registerCommand("Browser.cancelDownload", [{ "name": "guid", "type": "string", "optional": false, "description": "Global unique identifier of the download.", "typeRef": null }, { "name": "browserContextId", "type": "string", "optional": true, "description": "BrowserContext to perform the action in. When omitted, default browser context is used.", "typeRef": "Browser.BrowserContextID" }], [], "Cancel a download if in progress");
  inspectorBackend2.registerCommand("Browser.close", [], [], "Close browser gracefully.");
  inspectorBackend2.registerCommand("Browser.crash", [], [], "Crashes browser on the main thread.");
  inspectorBackend2.registerCommand("Browser.crashGpuProcess", [], [], "Crashes GPU process.");
  inspectorBackend2.registerCommand("Browser.getVersion", [], ["protocolVersion", "product", "revision", "userAgent", "jsVersion"], "Returns version information.");
  inspectorBackend2.registerCommand("Browser.getBrowserCommandLine", [], ["arguments"], "Returns the command line switches for the browser process if, and only if --enable-automation is on the commandline.");
  inspectorBackend2.registerCommand("Browser.getHistograms", [{ "name": "query", "type": "string", "optional": true, "description": "Requested substring in name. Only histograms which have query as a substring in their name are extracted. An empty or absent query returns all histograms.", "typeRef": null }, { "name": "delta", "type": "boolean", "optional": true, "description": "If true, retrieve delta since last delta call.", "typeRef": null }], ["histograms"], "Get Chrome histograms.");
  inspectorBackend2.registerCommand("Browser.getHistogram", [{ "name": "name", "type": "string", "optional": false, "description": "Requested histogram name.", "typeRef": null }, { "name": "delta", "type": "boolean", "optional": true, "description": "If true, retrieve delta since last delta call.", "typeRef": null }], ["histogram"], "Get a Chrome histogram by name.");
  inspectorBackend2.registerCommand("Browser.getWindowBounds", [{ "name": "windowId", "type": "number", "optional": false, "description": "Browser window id.", "typeRef": "Browser.WindowID" }], ["bounds"], "Get position and size of the browser window.");
  inspectorBackend2.registerCommand("Browser.getWindowForTarget", [{ "name": "targetId", "type": "string", "optional": true, "description": "Devtools agent host id. If called as a part of the session, associated targetId is used.", "typeRef": "Target.TargetID" }], ["windowId", "bounds"], "Get the browser window that contains the devtools target.");
  inspectorBackend2.registerCommand("Browser.setWindowBounds", [{ "name": "windowId", "type": "number", "optional": false, "description": "Browser window id.", "typeRef": "Browser.WindowID" }, { "name": "bounds", "type": "object", "optional": false, "description": "New window bounds. The 'minimized', 'maximized' and 'fullscreen' states cannot be combined with 'left', 'top', 'width' or 'height'. Leaves unspecified fields unchanged.", "typeRef": "Browser.Bounds" }], [], "Set position and/or size of the browser window.");
  inspectorBackend2.registerCommand("Browser.setContentsSize", [{ "name": "windowId", "type": "number", "optional": false, "description": "Browser window id.", "typeRef": "Browser.WindowID" }, { "name": "width", "type": "number", "optional": true, "description": "The window contents width in DIP. Assumes current width if omitted. Must be specified if 'height' is omitted.", "typeRef": null }, { "name": "height", "type": "number", "optional": true, "description": "The window contents height in DIP. Assumes current height if omitted. Must be specified if 'width' is omitted.", "typeRef": null }], [], "Set size of the browser contents resizing browser window as necessary.");
  inspectorBackend2.registerCommand("Browser.setDockTile", [{ "name": "badgeLabel", "type": "string", "optional": true, "description": "", "typeRef": null }, { "name": "image", "type": "string", "optional": true, "description": "Png encoded image.", "typeRef": null }], [], "Set dock tile details, platform-specific.");
  inspectorBackend2.registerCommand("Browser.executeBrowserCommand", [{ "name": "commandId", "type": "string", "optional": false, "description": "", "typeRef": "Browser.BrowserCommandId" }], [], "Invoke custom browser commands used by telemetry.");
  inspectorBackend2.registerCommand("Browser.addPrivacySandboxEnrollmentOverride", [{ "name": "url", "type": "string", "optional": false, "description": "", "typeRef": null }], [], "Allows a site to use privacy sandbox features that require enrollment without the site actually being enrolled. Only supported on page targets.");
  inspectorBackend2.registerCommand("Browser.addPrivacySandboxCoordinatorKeyConfig", [{ "name": "api", "type": "string", "optional": false, "description": "", "typeRef": "Browser.PrivacySandboxAPI" }, { "name": "coordinatorOrigin", "type": "string", "optional": false, "description": "", "typeRef": null }, { "name": "keyConfig", "type": "string", "optional": false, "description": "", "typeRef": null }, { "name": "browserContextId", "type": "string", "optional": true, "description": "BrowserContext to perform the action in. When omitted, default browser context is used.", "typeRef": "Browser.BrowserContextID" }], [], "Configures encryption keys used with a given privacy sandbox API to talk to a trusted coordinator.  Since this is intended for test automation only, coordinatorOrigin must be a .test domain. No existing coordinator configuration for the origin may exist.");
  inspectorBackend2.registerType("Browser.Bounds", [{ "name": "left", "type": "number", "optional": true, "description": "The offset from the left edge of the screen to the window in pixels.", "typeRef": null }, { "name": "top", "type": "number", "optional": true, "description": "The offset from the top edge of the screen to the window in pixels.", "typeRef": null }, { "name": "width", "type": "number", "optional": true, "description": "The window width in pixels.", "typeRef": null }, { "name": "height", "type": "number", "optional": true, "description": "The window height in pixels.", "typeRef": null }, { "name": "windowState", "type": "string", "optional": true, "description": "The window state. Default to normal.", "typeRef": "Browser.WindowState" }]);
  inspectorBackend2.registerType("Browser.PermissionDescriptor", [{ "name": "name", "type": "string", "optional": false, "description": "Name of permission. See https://cs.chromium.org/chromium/src/third_party/blink/renderer/modules/permissions/permission_descriptor.idl for valid permission names.", "typeRef": null }, { "name": "sysex", "type": "boolean", "optional": true, "description": 'For \\"midi\\" permission, may also specify sysex control.', "typeRef": null }, { "name": "userVisibleOnly", "type": "boolean", "optional": true, "description": 'For \\"push\\" permission, may specify userVisibleOnly. Note that userVisibleOnly = true is the only currently supported type.', "typeRef": null }, { "name": "allowWithoutSanitization", "type": "boolean", "optional": true, "description": 'For \\"clipboard\\" permission, may specify allowWithoutSanitization.', "typeRef": null }, { "name": "allowWithoutGesture", "type": "boolean", "optional": true, "description": 'For \\"fullscreen\\" permission, must specify allowWithoutGesture:true.', "typeRef": null }, { "name": "panTiltZoom", "type": "boolean", "optional": true, "description": 'For \\"camera\\" permission, may specify panTiltZoom.', "typeRef": null }]);
  inspectorBackend2.registerType("Browser.Bucket", [{ "name": "low", "type": "number", "optional": false, "description": "Minimum value (inclusive).", "typeRef": null }, { "name": "high", "type": "number", "optional": false, "description": "Maximum value (exclusive).", "typeRef": null }, { "name": "count", "type": "number", "optional": false, "description": "Number of samples.", "typeRef": null }]);
  inspectorBackend2.registerType("Browser.Histogram", [{ "name": "name", "type": "string", "optional": false, "description": "Name.", "typeRef": null }, { "name": "sum", "type": "number", "optional": false, "description": "Sum of sample values.", "typeRef": null }, { "name": "count", "type": "number", "optional": false, "description": "Total number of samples.", "typeRef": null }, { "name": "buckets", "type": "array", "optional": false, "description": "Buckets.", "typeRef": "Browser.Bucket" }]);
  inspectorBackend2.registerEnum("CSS.StyleSheetOrigin", { Injected: "injected", UserAgent: "user-agent", Inspector: "inspector", Regular: "regular" });
  inspectorBackend2.registerEnum("CSS.CSSRuleType", { MediaRule: "MediaRule", SupportsRule: "SupportsRule", ContainerRule: "ContainerRule", LayerRule: "LayerRule", ScopeRule: "ScopeRule", StyleRule: "StyleRule", StartingStyleRule: "StartingStyleRule" });
  inspectorBackend2.registerEnum("CSS.CSSMediaSource", { MediaRule: "mediaRule", ImportRule: "importRule", LinkedSheet: "linkedSheet", InlineSheet: "inlineSheet" });
  inspectorBackend2.registerEnum("CSS.CSSAtRuleType", { FontFace: "font-face", FontFeatureValues: "font-feature-values", FontPaletteValues: "font-palette-values" });
  inspectorBackend2.registerEnum("CSS.CSSAtRuleSubsection", { Swash: "swash", Annotation: "annotation", Ornaments: "ornaments", Stylistic: "stylistic", Styleset: "styleset", CharacterVariant: "character-variant" });
  inspectorBackend2.registerEvent("CSS.fontsUpdated", ["font"]);
  inspectorBackend2.registerEvent("CSS.mediaQueryResultChanged", []);
  inspectorBackend2.registerEvent("CSS.styleSheetAdded", ["header"]);
  inspectorBackend2.registerEvent("CSS.styleSheetChanged", ["styleSheetId"]);
  inspectorBackend2.registerEvent("CSS.styleSheetRemoved", ["styleSheetId"]);
  inspectorBackend2.registerEvent("CSS.computedStyleUpdated", ["nodeId"]);
  inspectorBackend2.registerCommand("CSS.addRule", [{ "name": "styleSheetId", "type": "string", "optional": false, "description": "The css style sheet identifier where a new rule should be inserted.", "typeRef": "DOM.StyleSheetId" }, { "name": "ruleText", "type": "string", "optional": false, "description": "The text of a new rule.", "typeRef": null }, { "name": "location", "type": "object", "optional": false, "description": "Text position of a new rule in the target style sheet.", "typeRef": "CSS.SourceRange" }, { "name": "nodeForPropertySyntaxValidation", "type": "number", "optional": true, "description": "NodeId for the DOM node in whose context custom property declarations for registered properties should be validated. If omitted, declarations in the new rule text can only be validated statically, which may produce incorrect results if the declaration contains a var() for example.", "typeRef": "DOM.NodeId" }], ["rule"], "Inserts a new rule with the given `ruleText` in a stylesheet with given `styleSheetId`, at the position specified by `location`.");
  inspectorBackend2.registerCommand("CSS.collectClassNames", [{ "name": "styleSheetId", "type": "string", "optional": false, "description": "", "typeRef": "DOM.StyleSheetId" }], ["classNames"], "Returns all class names from specified stylesheet.");
  inspectorBackend2.registerCommand("CSS.createStyleSheet", [{ "name": "frameId", "type": "string", "optional": false, "description": 'Identifier of the frame where \\"via-inspector\\" stylesheet should be created.', "typeRef": "Page.FrameId" }, { "name": "force", "type": "boolean", "optional": true, "description": "If true, creates a new stylesheet for every call. If false, returns a stylesheet previously created by a call with force=false for the frame's document if it exists or creates a new stylesheet (default: false).", "typeRef": null }], ["styleSheetId"], 'Creates a new special "via-inspector" stylesheet in the frame with given `frameId`.');
  inspectorBackend2.registerCommand("CSS.disable", [], [], "Disables the CSS agent for the given page.");
  inspectorBackend2.registerCommand("CSS.enable", [], [], "Enables the CSS agent for the given page. Clients should not assume that the CSS agent has been enabled until the result of this command is received.");
  inspectorBackend2.registerCommand("CSS.forcePseudoState", [{ "name": "nodeId", "type": "number", "optional": false, "description": "The element id for which to force the pseudo state.", "typeRef": "DOM.NodeId" }, { "name": "forcedPseudoClasses", "type": "array", "optional": false, "description": "Element pseudo classes to force when computing the element's style.", "typeRef": "string" }], [], "Ensures that the given node will have specified pseudo-classes whenever its style is computed by the browser.");
  inspectorBackend2.registerCommand("CSS.forceStartingStyle", [{ "name": "nodeId", "type": "number", "optional": false, "description": "The element id for which to force the starting-style state.", "typeRef": "DOM.NodeId" }, { "name": "forced", "type": "boolean", "optional": false, "description": "Boolean indicating if this is on or off.", "typeRef": null }], [], "Ensures that the given node is in its starting-style state.");
  inspectorBackend2.registerCommand("CSS.getBackgroundColors", [{ "name": "nodeId", "type": "number", "optional": false, "description": "Id of the node to get background colors for.", "typeRef": "DOM.NodeId" }], ["backgroundColors", "computedFontSize", "computedFontWeight"], "");
  inspectorBackend2.registerCommand("CSS.getComputedStyleForNode", [{ "name": "nodeId", "type": "number", "optional": false, "description": "", "typeRef": "DOM.NodeId" }], ["computedStyle", "extraFields"], "Returns the computed style for a DOM node identified by `nodeId`.");
  inspectorBackend2.registerCommand("CSS.resolveValues", [{ "name": "values", "type": "array", "optional": false, "description": "Cascade-dependent keywords (revert/revert-layer) do not work.", "typeRef": "string" }, { "name": "nodeId", "type": "number", "optional": false, "description": "Id of the node in whose context the expression is evaluated", "typeRef": "DOM.NodeId" }, { "name": "propertyName", "type": "string", "optional": true, "description": "Only longhands and custom property names are accepted.", "typeRef": null }, { "name": "pseudoType", "type": "string", "optional": true, "description": "Pseudo element type, only works for pseudo elements that generate elements in the tree, such as ::before and ::after.", "typeRef": "DOM.PseudoType" }, { "name": "pseudoIdentifier", "type": "string", "optional": true, "description": "Pseudo element custom ident.", "typeRef": null }], ["results"], "Resolve the specified values in the context of the provided element. For example, a value of '1em' is evaluated according to the computed 'font-size' of the element and a value 'calc(1px + 2px)' will be resolved to '3px'. If the `propertyName` was specified the `values` are resolved as if they were property's declaration. If a value cannot be parsed according to the provided property syntax, the value is parsed using combined syntax as if null `propertyName` was provided. If the value cannot be resolved even then, return the provided value without any changes. Note: this function currently does not resolve CSS random() function, it returns unmodified random() function parts.`");
  inspectorBackend2.registerCommand("CSS.getLonghandProperties", [{ "name": "shorthandName", "type": "string", "optional": false, "description": "", "typeRef": null }, { "name": "value", "type": "string", "optional": false, "description": "", "typeRef": null }], ["longhandProperties"], "");
  inspectorBackend2.registerCommand("CSS.getInlineStylesForNode", [{ "name": "nodeId", "type": "number", "optional": false, "description": "", "typeRef": "DOM.NodeId" }], ["inlineStyle", "attributesStyle"], 'Returns the styles defined inline (explicitly in the "style" attribute and implicitly, using DOM attributes) for a DOM node identified by `nodeId`.');
  inspectorBackend2.registerCommand("CSS.getAnimatedStylesForNode", [{ "name": "nodeId", "type": "number", "optional": false, "description": "", "typeRef": "DOM.NodeId" }], ["animationStyles", "transitionsStyle", "inherited"], "Returns the styles coming from animations & transitions including the animation & transition styles coming from inheritance chain.");
  inspectorBackend2.registerCommand("CSS.getMatchedStylesForNode", [{ "name": "nodeId", "type": "number", "optional": false, "description": "", "typeRef": "DOM.NodeId" }], ["inlineStyle", "attributesStyle", "matchedCSSRules", "pseudoElements", "inherited", "inheritedPseudoElements", "cssKeyframesRules", "cssPositionTryRules", "activePositionFallbackIndex", "cssPropertyRules", "cssPropertyRegistrations", "cssAtRules", "parentLayoutNodeId", "cssFunctionRules"], "Returns requested styles for a DOM node identified by `nodeId`.");
  inspectorBackend2.registerCommand("CSS.getEnvironmentVariables", [], ["environmentVariables"], "Returns the values of the default UA-defined environment variables used in env()");
  inspectorBackend2.registerCommand("CSS.getMediaQueries", [], ["medias"], "Returns all media queries parsed by the rendering engine.");
  inspectorBackend2.registerCommand("CSS.getPlatformFontsForNode", [{ "name": "nodeId", "type": "number", "optional": false, "description": "", "typeRef": "DOM.NodeId" }], ["fonts"], "Requests information about platform fonts which we used to render child TextNodes in the given node.");
  inspectorBackend2.registerCommand("CSS.getStyleSheetText", [{ "name": "styleSheetId", "type": "string", "optional": false, "description": "", "typeRef": "DOM.StyleSheetId" }], ["text"], "Returns the current textual content for a stylesheet.");
  inspectorBackend2.registerCommand("CSS.getLayersForNode", [{ "name": "nodeId", "type": "number", "optional": false, "description": "", "typeRef": "DOM.NodeId" }], ["rootLayer"], "Returns all layers parsed by the rendering engine for the tree scope of a node. Given a DOM element identified by nodeId, getLayersForNode returns the root layer for the nearest ancestor document or shadow root. The layer root contains the full layer tree for the tree scope and their ordering.");
  inspectorBackend2.registerCommand("CSS.getLocationForSelector", [{ "name": "styleSheetId", "type": "string", "optional": false, "description": "", "typeRef": "DOM.StyleSheetId" }, { "name": "selectorText", "type": "string", "optional": false, "description": "", "typeRef": null }], ["ranges"], "Given a CSS selector text and a style sheet ID, getLocationForSelector returns an array of locations of the CSS selector in the style sheet.");
  inspectorBackend2.registerCommand("CSS.trackComputedStyleUpdatesForNode", [{ "name": "nodeId", "type": "number", "optional": true, "description": "", "typeRef": "DOM.NodeId" }], [], "Starts tracking the given node for the computed style updates and whenever the computed style is updated for node, it queues a `computedStyleUpdated` event with throttling. There can only be 1 node tracked for computed style updates so passing a new node id removes tracking from the previous node. Pass `undefined` to disable tracking.");
  inspectorBackend2.registerCommand("CSS.trackComputedStyleUpdates", [{ "name": "propertiesToTrack", "type": "array", "optional": false, "description": "", "typeRef": "CSS.CSSComputedStyleProperty" }], [], "Starts tracking the given computed styles for updates. The specified array of properties replaces the one previously specified. Pass empty array to disable tracking. Use takeComputedStyleUpdates to retrieve the list of nodes that had properties modified. The changes to computed style properties are only tracked for nodes pushed to the front-end by the DOM agent. If no changes to the tracked properties occur after the node has been pushed to the front-end, no updates will be issued for the node.");
  inspectorBackend2.registerCommand("CSS.takeComputedStyleUpdates", [], ["nodeIds"], "Polls the next batch of computed style updates.");
  inspectorBackend2.registerCommand("CSS.setEffectivePropertyValueForNode", [{ "name": "nodeId", "type": "number", "optional": false, "description": "The element id for which to set property.", "typeRef": "DOM.NodeId" }, { "name": "propertyName", "type": "string", "optional": false, "description": "", "typeRef": null }, { "name": "value", "type": "string", "optional": false, "description": "", "typeRef": null }], [], "Find a rule with the given active property for the given node and set the new value for this property");
  inspectorBackend2.registerCommand("CSS.setPropertyRulePropertyName", [{ "name": "styleSheetId", "type": "string", "optional": false, "description": "", "typeRef": "DOM.StyleSheetId" }, { "name": "range", "type": "object", "optional": false, "description": "", "typeRef": "CSS.SourceRange" }, { "name": "propertyName", "type": "string", "optional": false, "description": "", "typeRef": null }], ["propertyName"], "Modifies the property rule property name.");
  inspectorBackend2.registerCommand("CSS.setKeyframeKey", [{ "name": "styleSheetId", "type": "string", "optional": false, "description": "", "typeRef": "DOM.StyleSheetId" }, { "name": "range", "type": "object", "optional": false, "description": "", "typeRef": "CSS.SourceRange" }, { "name": "keyText", "type": "string", "optional": false, "description": "", "typeRef": null }], ["keyText"], "Modifies the keyframe rule key text.");
  inspectorBackend2.registerCommand("CSS.setMediaText", [{ "name": "styleSheetId", "type": "string", "optional": false, "description": "", "typeRef": "DOM.StyleSheetId" }, { "name": "range", "type": "object", "optional": false, "description": "", "typeRef": "CSS.SourceRange" }, { "name": "text", "type": "string", "optional": false, "description": "", "typeRef": null }], ["media"], "Modifies the rule selector.");
  inspectorBackend2.registerCommand("CSS.setContainerQueryText", [{ "name": "styleSheetId", "type": "string", "optional": false, "description": "", "typeRef": "DOM.StyleSheetId" }, { "name": "range", "type": "object", "optional": false, "description": "", "typeRef": "CSS.SourceRange" }, { "name": "text", "type": "string", "optional": false, "description": "", "typeRef": null }], ["containerQuery"], "Modifies the expression of a container query.");
  inspectorBackend2.registerCommand("CSS.setSupportsText", [{ "name": "styleSheetId", "type": "string", "optional": false, "description": "", "typeRef": "DOM.StyleSheetId" }, { "name": "range", "type": "object", "optional": false, "description": "", "typeRef": "CSS.SourceRange" }, { "name": "text", "type": "string", "optional": false, "description": "", "typeRef": null }], ["supports"], "Modifies the expression of a supports at-rule.");
  inspectorBackend2.registerCommand("CSS.setScopeText", [{ "name": "styleSheetId", "type": "string", "optional": false, "description": "", "typeRef": "DOM.StyleSheetId" }, { "name": "range", "type": "object", "optional": false, "description": "", "typeRef": "CSS.SourceRange" }, { "name": "text", "type": "string", "optional": false, "description": "", "typeRef": null }], ["scope"], "Modifies the expression of a scope at-rule.");
  inspectorBackend2.registerCommand("CSS.setRuleSelector", [{ "name": "styleSheetId", "type": "string", "optional": false, "description": "", "typeRef": "DOM.StyleSheetId" }, { "name": "range", "type": "object", "optional": false, "description": "", "typeRef": "CSS.SourceRange" }, { "name": "selector", "type": "string", "optional": false, "description": "", "typeRef": null }], ["selectorList"], "Modifies the rule selector.");
  inspectorBackend2.registerCommand("CSS.setStyleSheetText", [{ "name": "styleSheetId", "type": "string", "optional": false, "description": "", "typeRef": "DOM.StyleSheetId" }, { "name": "text", "type": "string", "optional": false, "description": "", "typeRef": null }], ["sourceMapURL"], "Sets the new stylesheet text.");
  inspectorBackend2.registerCommand("CSS.setStyleTexts", [{ "name": "edits", "type": "array", "optional": false, "description": "", "typeRef": "CSS.StyleDeclarationEdit" }, { "name": "nodeForPropertySyntaxValidation", "type": "number", "optional": true, "description": "NodeId for the DOM node in whose context custom property declarations for registered properties should be validated. If omitted, declarations in the new rule text can only be validated statically, which may produce incorrect results if the declaration contains a var() for example.", "typeRef": "DOM.NodeId" }], ["styles"], "Applies specified style edits one after another in the given order.");
  inspectorBackend2.registerCommand("CSS.startRuleUsageTracking", [], [], "Enables the selector recording.");
  inspectorBackend2.registerCommand("CSS.stopRuleUsageTracking", [], ["ruleUsage"], "Stop tracking rule usage and return the list of rules that were used since last call to `takeCoverageDelta` (or since start of coverage instrumentation).");
  inspectorBackend2.registerCommand("CSS.takeCoverageDelta", [], ["coverage", "timestamp"], "Obtain list of rules that became used since last call to this method (or since start of coverage instrumentation).");
  inspectorBackend2.registerCommand("CSS.setLocalFontsEnabled", [{ "name": "enabled", "type": "boolean", "optional": false, "description": "Whether rendering of local fonts is enabled.", "typeRef": null }], [], "Enables/disables rendering of local CSS fonts (enabled by default).");
  inspectorBackend2.registerType("CSS.PseudoElementMatches", [{ "name": "pseudoType", "type": "string", "optional": false, "description": "Pseudo element type.", "typeRef": "DOM.PseudoType" }, { "name": "pseudoIdentifier", "type": "string", "optional": true, "description": "Pseudo element custom ident.", "typeRef": null }, { "name": "matches", "type": "array", "optional": false, "description": "Matches of CSS rules applicable to the pseudo style.", "typeRef": "CSS.RuleMatch" }]);
  inspectorBackend2.registerType("CSS.CSSAnimationStyle", [{ "name": "name", "type": "string", "optional": true, "description": "The name of the animation.", "typeRef": null }, { "name": "style", "type": "object", "optional": false, "description": "The style coming from the animation.", "typeRef": "CSS.CSSStyle" }]);
  inspectorBackend2.registerType("CSS.InheritedStyleEntry", [{ "name": "inlineStyle", "type": "object", "optional": true, "description": "The ancestor node's inline style, if any, in the style inheritance chain.", "typeRef": "CSS.CSSStyle" }, { "name": "matchedCSSRules", "type": "array", "optional": false, "description": "Matches of CSS rules matching the ancestor node in the style inheritance chain.", "typeRef": "CSS.RuleMatch" }]);
  inspectorBackend2.registerType("CSS.InheritedAnimatedStyleEntry", [{ "name": "animationStyles", "type": "array", "optional": true, "description": "Styles coming from the animations of the ancestor, if any, in the style inheritance chain.", "typeRef": "CSS.CSSAnimationStyle" }, { "name": "transitionsStyle", "type": "object", "optional": true, "description": "The style coming from the transitions of the ancestor, if any, in the style inheritance chain.", "typeRef": "CSS.CSSStyle" }]);
  inspectorBackend2.registerType("CSS.InheritedPseudoElementMatches", [{ "name": "pseudoElements", "type": "array", "optional": false, "description": "Matches of pseudo styles from the pseudos of an ancestor node.", "typeRef": "CSS.PseudoElementMatches" }]);
  inspectorBackend2.registerType("CSS.RuleMatch", [{ "name": "rule", "type": "object", "optional": false, "description": "CSS rule in the match.", "typeRef": "CSS.CSSRule" }, { "name": "matchingSelectors", "type": "array", "optional": false, "description": "Matching selector indices in the rule's selectorList selectors (0-based).", "typeRef": "integer" }]);
  inspectorBackend2.registerType("CSS.Value", [{ "name": "text", "type": "string", "optional": false, "description": "Value text.", "typeRef": null }, { "name": "range", "type": "object", "optional": true, "description": "Value range in the underlying resource (if available).", "typeRef": "CSS.SourceRange" }, { "name": "specificity", "type": "object", "optional": true, "description": "Specificity of the selector.", "typeRef": "CSS.Specificity" }]);
  inspectorBackend2.registerType("CSS.Specificity", [{ "name": "a", "type": "number", "optional": false, "description": "The a component, which represents the number of ID selectors.", "typeRef": null }, { "name": "b", "type": "number", "optional": false, "description": "The b component, which represents the number of class selectors, attributes selectors, and pseudo-classes.", "typeRef": null }, { "name": "c", "type": "number", "optional": false, "description": "The c component, which represents the number of type selectors and pseudo-elements.", "typeRef": null }]);
  inspectorBackend2.registerType("CSS.SelectorList", [{ "name": "selectors", "type": "array", "optional": false, "description": "Selectors in the list.", "typeRef": "CSS.Value" }, { "name": "text", "type": "string", "optional": false, "description": "Rule selector text.", "typeRef": null }]);
  inspectorBackend2.registerType("CSS.CSSStyleSheetHeader", [{ "name": "styleSheetId", "type": "string", "optional": false, "description": "The stylesheet identifier.", "typeRef": "DOM.StyleSheetId" }, { "name": "frameId", "type": "string", "optional": false, "description": "Owner frame identifier.", "typeRef": "Page.FrameId" }, { "name": "sourceURL", "type": "string", "optional": false, "description": "Stylesheet resource URL. Empty if this is a constructed stylesheet created using new CSSStyleSheet() (but non-empty if this is a constructed stylesheet imported as a CSS module script).", "typeRef": null }, { "name": "sourceMapURL", "type": "string", "optional": true, "description": "URL of source map associated with the stylesheet (if any).", "typeRef": null }, { "name": "origin", "type": "string", "optional": false, "description": "Stylesheet origin.", "typeRef": "CSS.StyleSheetOrigin" }, { "name": "title", "type": "string", "optional": false, "description": "Stylesheet title.", "typeRef": null }, { "name": "ownerNode", "type": "number", "optional": true, "description": "The backend id for the owner node of the stylesheet.", "typeRef": "DOM.BackendNodeId" }, { "name": "disabled", "type": "boolean", "optional": false, "description": "Denotes whether the stylesheet is disabled.", "typeRef": null }, { "name": "hasSourceURL", "type": "boolean", "optional": true, "description": "Whether the sourceURL field value comes from the sourceURL comment.", "typeRef": null }, { "name": "isInline", "type": "boolean", "optional": false, "description": "Whether this stylesheet is created for STYLE tag by parser. This flag is not set for document.written STYLE tags.", "typeRef": null }, { "name": "isMutable", "type": "boolean", "optional": false, "description": "Whether this stylesheet is mutable. Inline stylesheets become mutable after they have been modified via CSSOM API. `<link>` element's stylesheets become mutable only if DevTools modifies them. Constructed stylesheets (new CSSStyleSheet()) are mutable immediately after creation.", "typeRef": null }, { "name": "isConstructed", "type": "boolean", "optional": false, "description": "True if this stylesheet is created through new CSSStyleSheet() or imported as a CSS module script.", "typeRef": null }, { "name": "startLine", "type": "number", "optional": false, "description": "Line offset of the stylesheet within the resource (zero based).", "typeRef": null }, { "name": "startColumn", "type": "number", "optional": false, "description": "Column offset of the stylesheet within the resource (zero based).", "typeRef": null }, { "name": "length", "type": "number", "optional": false, "description": "Size of the content (in characters).", "typeRef": null }, { "name": "endLine", "type": "number", "optional": false, "description": "Line offset of the end of the stylesheet within the resource (zero based).", "typeRef": null }, { "name": "endColumn", "type": "number", "optional": false, "description": "Column offset of the end of the stylesheet within the resource (zero based).", "typeRef": null }, { "name": "loadingFailed", "type": "boolean", "optional": true, "description": "If the style sheet was loaded from a network resource, this indicates when the resource failed to load", "typeRef": null }]);
  inspectorBackend2.registerType("CSS.CSSRule", [{ "name": "styleSheetId", "type": "string", "optional": true, "description": "The css style sheet identifier (absent for user agent stylesheet and user-specified stylesheet rules) this rule came from.", "typeRef": "DOM.StyleSheetId" }, { "name": "selectorList", "type": "object", "optional": false, "description": "Rule selector data.", "typeRef": "CSS.SelectorList" }, { "name": "nestingSelectors", "type": "array", "optional": true, "description": "Array of selectors from ancestor style rules, sorted by distance from the current rule.", "typeRef": "string" }, { "name": "origin", "type": "string", "optional": false, "description": "Parent stylesheet's origin.", "typeRef": "CSS.StyleSheetOrigin" }, { "name": "style", "type": "object", "optional": false, "description": "Associated style declaration.", "typeRef": "CSS.CSSStyle" }, { "name": "originTreeScopeNodeId", "type": "number", "optional": true, "description": "The BackendNodeId of the DOM node that constitutes the origin tree scope of this rule.", "typeRef": "DOM.BackendNodeId" }, { "name": "media", "type": "array", "optional": true, "description": "Media list array (for rules involving media queries). The array enumerates media queries starting with the innermost one, going outwards.", "typeRef": "CSS.CSSMedia" }, { "name": "containerQueries", "type": "array", "optional": true, "description": "Container query list array (for rules involving container queries). The array enumerates container queries starting with the innermost one, going outwards.", "typeRef": "CSS.CSSContainerQuery" }, { "name": "supports", "type": "array", "optional": true, "description": "@supports CSS at-rule array. The array enumerates @supports at-rules starting with the innermost one, going outwards.", "typeRef": "CSS.CSSSupports" }, { "name": "layers", "type": "array", "optional": true, "description": "Cascade layer array. Contains the layer hierarchy that this rule belongs to starting with the innermost layer and going outwards.", "typeRef": "CSS.CSSLayer" }, { "name": "scopes", "type": "array", "optional": true, "description": "@scope CSS at-rule array. The array enumerates @scope at-rules starting with the innermost one, going outwards.", "typeRef": "CSS.CSSScope" }, { "name": "ruleTypes", "type": "array", "optional": true, "description": "The array keeps the types of ancestor CSSRules from the innermost going outwards.", "typeRef": "CSS.CSSRuleType" }, { "name": "startingStyles", "type": "array", "optional": true, "description": "@starting-style CSS at-rule array. The array enumerates @starting-style at-rules starting with the innermost one, going outwards.", "typeRef": "CSS.CSSStartingStyle" }]);
  inspectorBackend2.registerType("CSS.RuleUsage", [{ "name": "styleSheetId", "type": "string", "optional": false, "description": "The css style sheet identifier (absent for user agent stylesheet and user-specified stylesheet rules) this rule came from.", "typeRef": "DOM.StyleSheetId" }, { "name": "startOffset", "type": "number", "optional": false, "description": "Offset of the start of the rule (including selector) from the beginning of the stylesheet.", "typeRef": null }, { "name": "endOffset", "type": "number", "optional": false, "description": "Offset of the end of the rule body from the beginning of the stylesheet.", "typeRef": null }, { "name": "used", "type": "boolean", "optional": false, "description": "Indicates whether the rule was actually used by some element in the page.", "typeRef": null }]);
  inspectorBackend2.registerType("CSS.SourceRange", [{ "name": "startLine", "type": "number", "optional": false, "description": "Start line of range.", "typeRef": null }, { "name": "startColumn", "type": "number", "optional": false, "description": "Start column of range (inclusive).", "typeRef": null }, { "name": "endLine", "type": "number", "optional": false, "description": "End line of range", "typeRef": null }, { "name": "endColumn", "type": "number", "optional": false, "description": "End column of range (exclusive).", "typeRef": null }]);
  inspectorBackend2.registerType("CSS.ShorthandEntry", [{ "name": "name", "type": "string", "optional": false, "description": "Shorthand name.", "typeRef": null }, { "name": "value", "type": "string", "optional": false, "description": "Shorthand value.", "typeRef": null }, { "name": "important", "type": "boolean", "optional": true, "description": 'Whether the property has \\"!important\\" annotation (implies `false` if absent).', "typeRef": null }]);
  inspectorBackend2.registerType("CSS.CSSComputedStyleProperty", [{ "name": "name", "type": "string", "optional": false, "description": "Computed style property name.", "typeRef": null }, { "name": "value", "type": "string", "optional": false, "description": "Computed style property value.", "typeRef": null }]);
  inspectorBackend2.registerType("CSS.ComputedStyleExtraFields", [{ "name": "isAppearanceBase", "type": "boolean", "optional": false, "description": "Returns whether or not this node is being rendered with base appearance, which happens when it has its appearance property set to base/base-select or it is in the subtree of an element being rendered with base appearance.", "typeRef": null }]);
  inspectorBackend2.registerType("CSS.CSSStyle", [{ "name": "styleSheetId", "type": "string", "optional": true, "description": "The css style sheet identifier (absent for user agent stylesheet and user-specified stylesheet rules) this rule came from.", "typeRef": "DOM.StyleSheetId" }, { "name": "cssProperties", "type": "array", "optional": false, "description": "CSS properties in the style.", "typeRef": "CSS.CSSProperty" }, { "name": "shorthandEntries", "type": "array", "optional": false, "description": "Computed values for all shorthands found in the style.", "typeRef": "CSS.ShorthandEntry" }, { "name": "cssText", "type": "string", "optional": true, "description": "Style declaration text (if available).", "typeRef": null }, { "name": "range", "type": "object", "optional": true, "description": "Style declaration range in the enclosing stylesheet (if available).", "typeRef": "CSS.SourceRange" }]);
  inspectorBackend2.registerType("CSS.CSSProperty", [{ "name": "name", "type": "string", "optional": false, "description": "The property name.", "typeRef": null }, { "name": "value", "type": "string", "optional": false, "description": "The property value.", "typeRef": null }, { "name": "important", "type": "boolean", "optional": true, "description": 'Whether the property has \\"!important\\" annotation (implies `false` if absent).', "typeRef": null }, { "name": "implicit", "type": "boolean", "optional": true, "description": "Whether the property is implicit (implies `false` if absent).", "typeRef": null }, { "name": "text", "type": "string", "optional": true, "description": "The full property text as specified in the style.", "typeRef": null }, { "name": "parsedOk", "type": "boolean", "optional": true, "description": "Whether the property is understood by the browser (implies `true` if absent).", "typeRef": null }, { "name": "disabled", "type": "boolean", "optional": true, "description": "Whether the property is disabled by the user (present for source-based properties only).", "typeRef": null }, { "name": "range", "type": "object", "optional": true, "description": "The entire property range in the enclosing style declaration (if available).", "typeRef": "CSS.SourceRange" }, { "name": "longhandProperties", "type": "array", "optional": true, "description": "Parsed longhand components of this property if it is a shorthand. This field will be empty if the given property is not a shorthand.", "typeRef": "CSS.CSSProperty" }]);
  inspectorBackend2.registerType("CSS.CSSMedia", [{ "name": "text", "type": "string", "optional": false, "description": "Media query text.", "typeRef": null }, { "name": "source", "type": "string", "optional": false, "description": `Source of the media query: \\"mediaRule\\" if specified by a @media rule, \\"importRule\\" if specified by an @import rule, \\"linkedSheet\\" if specified by a \\"media\\" attribute in a linked stylesheet's LINK tag, \\"inlineSheet\\" if specified by a \\"media\\" attribute in an inline stylesheet's STYLE tag.`, "typeRef": null }, { "name": "sourceURL", "type": "string", "optional": true, "description": "URL of the document containing the media query description.", "typeRef": null }, { "name": "range", "type": "object", "optional": true, "description": "The associated rule (@media or @import) header range in the enclosing stylesheet (if available).", "typeRef": "CSS.SourceRange" }, { "name": "styleSheetId", "type": "string", "optional": true, "description": "Identifier of the stylesheet containing this object (if exists).", "typeRef": "DOM.StyleSheetId" }, { "name": "mediaList", "type": "array", "optional": true, "description": "Array of media queries.", "typeRef": "CSS.MediaQuery" }]);
  inspectorBackend2.registerType("CSS.MediaQuery", [{ "name": "expressions", "type": "array", "optional": false, "description": "Array of media query expressions.", "typeRef": "CSS.MediaQueryExpression" }, { "name": "active", "type": "boolean", "optional": false, "description": "Whether the media query condition is satisfied.", "typeRef": null }]);
  inspectorBackend2.registerType("CSS.MediaQueryExpression", [{ "name": "value", "type": "number", "optional": false, "description": "Media query expression value.", "typeRef": null }, { "name": "unit", "type": "string", "optional": false, "description": "Media query expression units.", "typeRef": null }, { "name": "feature", "type": "string", "optional": false, "description": "Media query expression feature.", "typeRef": null }, { "name": "valueRange", "type": "object", "optional": true, "description": "The associated range of the value text in the enclosing stylesheet (if available).", "typeRef": "CSS.SourceRange" }, { "name": "computedLength", "type": "number", "optional": true, "description": "Computed length of media query expression (if applicable).", "typeRef": null }]);
  inspectorBackend2.registerType("CSS.CSSContainerQuery", [{ "name": "text", "type": "string", "optional": false, "description": "Container query text.", "typeRef": null }, { "name": "range", "type": "object", "optional": true, "description": "The associated rule header range in the enclosing stylesheet (if available).", "typeRef": "CSS.SourceRange" }, { "name": "styleSheetId", "type": "string", "optional": true, "description": "Identifier of the stylesheet containing this object (if exists).", "typeRef": "DOM.StyleSheetId" }, { "name": "name", "type": "string", "optional": true, "description": "Optional name for the container.", "typeRef": null }, { "name": "physicalAxes", "type": "string", "optional": true, "description": "Optional physical axes queried for the container.", "typeRef": "DOM.PhysicalAxes" }, { "name": "logicalAxes", "type": "string", "optional": true, "description": "Optional logical axes queried for the container.", "typeRef": "DOM.LogicalAxes" }, { "name": "queriesScrollState", "type": "boolean", "optional": true, "description": "true if the query contains scroll-state() queries.", "typeRef": null }, { "name": "queriesAnchored", "type": "boolean", "optional": true, "description": "true if the query contains anchored() queries.", "typeRef": null }]);
  inspectorBackend2.registerType("CSS.CSSSupports", [{ "name": "text", "type": "string", "optional": false, "description": "Supports rule text.", "typeRef": null }, { "name": "active", "type": "boolean", "optional": false, "description": "Whether the supports condition is satisfied.", "typeRef": null }, { "name": "range", "type": "object", "optional": true, "description": "The associated rule header range in the enclosing stylesheet (if available).", "typeRef": "CSS.SourceRange" }, { "name": "styleSheetId", "type": "string", "optional": true, "description": "Identifier of the stylesheet containing this object (if exists).", "typeRef": "DOM.StyleSheetId" }]);
  inspectorBackend2.registerType("CSS.CSSScope", [{ "name": "text", "type": "string", "optional": false, "description": "Scope rule text.", "typeRef": null }, { "name": "range", "type": "object", "optional": true, "description": "The associated rule header range in the enclosing stylesheet (if available).", "typeRef": "CSS.SourceRange" }, { "name": "styleSheetId", "type": "string", "optional": true, "description": "Identifier of the stylesheet containing this object (if exists).", "typeRef": "DOM.StyleSheetId" }]);
  inspectorBackend2.registerType("CSS.CSSLayer", [{ "name": "text", "type": "string", "optional": false, "description": "Layer name.", "typeRef": null }, { "name": "range", "type": "object", "optional": true, "description": "The associated rule header range in the enclosing stylesheet (if available).", "typeRef": "CSS.SourceRange" }, { "name": "styleSheetId", "type": "string", "optional": true, "description": "Identifier of the stylesheet containing this object (if exists).", "typeRef": "DOM.StyleSheetId" }]);
  inspectorBackend2.registerType("CSS.CSSStartingStyle", [{ "name": "range", "type": "object", "optional": true, "description": "The associated rule header range in the enclosing stylesheet (if available).", "typeRef": "CSS.SourceRange" }, { "name": "styleSheetId", "type": "string", "optional": true, "description": "Identifier of the stylesheet containing this object (if exists).", "typeRef": "DOM.StyleSheetId" }]);
  inspectorBackend2.registerType("CSS.CSSLayerData", [{ "name": "name", "type": "string", "optional": false, "description": "Layer name.", "typeRef": null }, { "name": "subLayers", "type": "array", "optional": true, "description": "Direct sub-layers", "typeRef": "CSS.CSSLayerData" }, { "name": "order", "type": "number", "optional": false, "description": "Layer order. The order determines the order of the layer in the cascade order. A higher number has higher priority in the cascade order.", "typeRef": null }]);
  inspectorBackend2.registerType("CSS.PlatformFontUsage", [{ "name": "familyName", "type": "string", "optional": false, "description": "Font's family name reported by platform.", "typeRef": null }, { "name": "postScriptName", "type": "string", "optional": false, "description": "Font's PostScript name reported by platform.", "typeRef": null }, { "name": "isCustomFont", "type": "boolean", "optional": false, "description": "Indicates if the font was downloaded or resolved locally.", "typeRef": null }, { "name": "glyphCount", "type": "number", "optional": false, "description": "Amount of glyphs that were rendered with this font.", "typeRef": null }]);
  inspectorBackend2.registerType("CSS.FontVariationAxis", [{ "name": "tag", "type": "string", "optional": false, "description": 'The font-variation-setting tag (a.k.a. \\"axis tag\\").', "typeRef": null }, { "name": "name", "type": "string", "optional": false, "description": 'Human-readable variation name in the default language (normally, \\"en\\").', "typeRef": null }, { "name": "minValue", "type": "number", "optional": false, "description": "The minimum value (inclusive) the font supports for this tag.", "typeRef": null }, { "name": "maxValue", "type": "number", "optional": false, "description": "The maximum value (inclusive) the font supports for this tag.", "typeRef": null }, { "name": "defaultValue", "type": "number", "optional": false, "description": "The default value.", "typeRef": null }]);
  inspectorBackend2.registerType("CSS.FontFace", [{ "name": "fontFamily", "type": "string", "optional": false, "description": "The font-family.", "typeRef": null }, { "name": "fontStyle", "type": "string", "optional": false, "description": "The font-style.", "typeRef": null }, { "name": "fontVariant", "type": "string", "optional": false, "description": "The font-variant.", "typeRef": null }, { "name": "fontWeight", "type": "string", "optional": false, "description": "The font-weight.", "typeRef": null }, { "name": "fontStretch", "type": "string", "optional": false, "description": "The font-stretch.", "typeRef": null }, { "name": "fontDisplay", "type": "string", "optional": false, "description": "The font-display.", "typeRef": null }, { "name": "unicodeRange", "type": "string", "optional": false, "description": "The unicode-range.", "typeRef": null }, { "name": "src", "type": "string", "optional": false, "description": "The src.", "typeRef": null }, { "name": "platformFontFamily", "type": "string", "optional": false, "description": "The resolved platform font family", "typeRef": null }, { "name": "fontVariationAxes", "type": "array", "optional": true, "description": 'Available variation settings (a.k.a. \\"axes\\").', "typeRef": "CSS.FontVariationAxis" }]);
  inspectorBackend2.registerType("CSS.CSSTryRule", [{ "name": "styleSheetId", "type": "string", "optional": true, "description": "The css style sheet identifier (absent for user agent stylesheet and user-specified stylesheet rules) this rule came from.", "typeRef": "DOM.StyleSheetId" }, { "name": "origin", "type": "string", "optional": false, "description": "Parent stylesheet's origin.", "typeRef": "CSS.StyleSheetOrigin" }, { "name": "style", "type": "object", "optional": false, "description": "Associated style declaration.", "typeRef": "CSS.CSSStyle" }]);
  inspectorBackend2.registerType("CSS.CSSPositionTryRule", [{ "name": "name", "type": "object", "optional": false, "description": "The prelude dashed-ident name", "typeRef": "CSS.Value" }, { "name": "styleSheetId", "type": "string", "optional": true, "description": "The css style sheet identifier (absent for user agent stylesheet and user-specified stylesheet rules) this rule came from.", "typeRef": "DOM.StyleSheetId" }, { "name": "origin", "type": "string", "optional": false, "description": "Parent stylesheet's origin.", "typeRef": "CSS.StyleSheetOrigin" }, { "name": "style", "type": "object", "optional": false, "description": "Associated style declaration.", "typeRef": "CSS.CSSStyle" }, { "name": "active", "type": "boolean", "optional": false, "description": "", "typeRef": null }]);
  inspectorBackend2.registerType("CSS.CSSKeyframesRule", [{ "name": "animationName", "type": "object", "optional": false, "description": "Animation name.", "typeRef": "CSS.Value" }, { "name": "keyframes", "type": "array", "optional": false, "description": "List of keyframes.", "typeRef": "CSS.CSSKeyframeRule" }]);
  inspectorBackend2.registerType("CSS.CSSPropertyRegistration", [{ "name": "propertyName", "type": "string", "optional": false, "description": "", "typeRef": null }, { "name": "initialValue", "type": "object", "optional": true, "description": "", "typeRef": "CSS.Value" }, { "name": "inherits", "type": "boolean", "optional": false, "description": "", "typeRef": null }, { "name": "syntax", "type": "string", "optional": false, "description": "", "typeRef": null }]);
  inspectorBackend2.registerType("CSS.CSSAtRule", [{ "name": "type", "type": "string", "optional": false, "description": "Type of at-rule.", "typeRef": null }, { "name": "subsection", "type": "string", "optional": true, "description": "Subsection of font-feature-values, if this is a subsection.", "typeRef": null }, { "name": "name", "type": "object", "optional": true, "description": "LINT_SKIP.ThenChange(//third_party/blink/renderer/core/inspector/inspector_style_sheet.cc:FontVariantAlternatesFeatureType,//third_party/blink/renderer/core/inspector/inspector_css_agent.cc:FontVariantAlternatesFeatureType) Associated name, if applicable.", "typeRef": "CSS.Value" }, { "name": "styleSheetId", "type": "string", "optional": true, "description": "The css style sheet identifier (absent for user agent stylesheet and user-specified stylesheet rules) this rule came from.", "typeRef": "DOM.StyleSheetId" }, { "name": "origin", "type": "string", "optional": false, "description": "Parent stylesheet's origin.", "typeRef": "CSS.StyleSheetOrigin" }, { "name": "style", "type": "object", "optional": false, "description": "Associated style declaration.", "typeRef": "CSS.CSSStyle" }]);
  inspectorBackend2.registerType("CSS.CSSPropertyRule", [{ "name": "styleSheetId", "type": "string", "optional": true, "description": "The css style sheet identifier (absent for user agent stylesheet and user-specified stylesheet rules) this rule came from.", "typeRef": "DOM.StyleSheetId" }, { "name": "origin", "type": "string", "optional": false, "description": "Parent stylesheet's origin.", "typeRef": "CSS.StyleSheetOrigin" }, { "name": "propertyName", "type": "object", "optional": false, "description": "Associated property name.", "typeRef": "CSS.Value" }, { "name": "style", "type": "object", "optional": false, "description": "Associated style declaration.", "typeRef": "CSS.CSSStyle" }]);
  inspectorBackend2.registerType("CSS.CSSFunctionParameter", [{ "name": "name", "type": "string", "optional": false, "description": "The parameter name.", "typeRef": null }, { "name": "type", "type": "string", "optional": false, "description": "The parameter type.", "typeRef": null }]);
  inspectorBackend2.registerType("CSS.CSSFunctionConditionNode", [{ "name": "media", "type": "object", "optional": true, "description": "Media query for this conditional block. Only one type of condition should be set.", "typeRef": "CSS.CSSMedia" }, { "name": "containerQueries", "type": "object", "optional": true, "description": "Container query for this conditional block. Only one type of condition should be set.", "typeRef": "CSS.CSSContainerQuery" }, { "name": "supports", "type": "object", "optional": true, "description": "@supports CSS at-rule condition. Only one type of condition should be set.", "typeRef": "CSS.CSSSupports" }, { "name": "children", "type": "array", "optional": false, "description": "Block body.", "typeRef": "CSS.CSSFunctionNode" }, { "name": "conditionText", "type": "string", "optional": false, "description": "The condition text.", "typeRef": null }]);
  inspectorBackend2.registerType("CSS.CSSFunctionNode", [{ "name": "condition", "type": "object", "optional": true, "description": "A conditional block. If set, style should not be set.", "typeRef": "CSS.CSSFunctionConditionNode" }, { "name": "style", "type": "object", "optional": true, "description": "Values set by this node. If set, condition should not be set.", "typeRef": "CSS.CSSStyle" }]);
  inspectorBackend2.registerType("CSS.CSSFunctionRule", [{ "name": "name", "type": "object", "optional": false, "description": "Name of the function.", "typeRef": "CSS.Value" }, { "name": "styleSheetId", "type": "string", "optional": true, "description": "The css style sheet identifier (absent for user agent stylesheet and user-specified stylesheet rules) this rule came from.", "typeRef": "DOM.StyleSheetId" }, { "name": "origin", "type": "string", "optional": false, "description": "Parent stylesheet's origin.", "typeRef": "CSS.StyleSheetOrigin" }, { "name": "parameters", "type": "array", "optional": false, "description": "List of parameters.", "typeRef": "CSS.CSSFunctionParameter" }, { "name": "children", "type": "array", "optional": false, "description": "Function body.", "typeRef": "CSS.CSSFunctionNode" }]);
  inspectorBackend2.registerType("CSS.CSSKeyframeRule", [{ "name": "styleSheetId", "type": "string", "optional": true, "description": "The css style sheet identifier (absent for user agent stylesheet and user-specified stylesheet rules) this rule came from.", "typeRef": "DOM.StyleSheetId" }, { "name": "origin", "type": "string", "optional": false, "description": "Parent stylesheet's origin.", "typeRef": "CSS.StyleSheetOrigin" }, { "name": "keyText", "type": "object", "optional": false, "description": "Associated key text.", "typeRef": "CSS.Value" }, { "name": "style", "type": "object", "optional": false, "description": "Associated style declaration.", "typeRef": "CSS.CSSStyle" }]);
  inspectorBackend2.registerType("CSS.StyleDeclarationEdit", [{ "name": "styleSheetId", "type": "string", "optional": false, "description": "The css style sheet identifier.", "typeRef": "DOM.StyleSheetId" }, { "name": "range", "type": "object", "optional": false, "description": "The range of the style text in the enclosing stylesheet.", "typeRef": "CSS.SourceRange" }, { "name": "text", "type": "string", "optional": false, "description": "New style text.", "typeRef": null }]);
  inspectorBackend2.registerEnum("CacheStorage.CachedResponseType", { Basic: "basic", Cors: "cors", Default: "default", Error: "error", OpaqueResponse: "opaqueResponse", OpaqueRedirect: "opaqueRedirect" });
  inspectorBackend2.registerCommand("CacheStorage.deleteCache", [{ "name": "cacheId", "type": "string", "optional": false, "description": "Id of cache for deletion.", "typeRef": "CacheStorage.CacheId" }], [], "Deletes a cache.");
  inspectorBackend2.registerCommand("CacheStorage.deleteEntry", [{ "name": "cacheId", "type": "string", "optional": false, "description": "Id of cache where the entry will be deleted.", "typeRef": "CacheStorage.CacheId" }, { "name": "request", "type": "string", "optional": false, "description": "URL spec of the request.", "typeRef": null }], [], "Deletes a cache entry.");
  inspectorBackend2.registerCommand("CacheStorage.requestCacheNames", [{ "name": "securityOrigin", "type": "string", "optional": true, "description": "At least and at most one of securityOrigin, storageKey, storageBucket must be specified. Security origin.", "typeRef": null }, { "name": "storageKey", "type": "string", "optional": true, "description": "Storage key.", "typeRef": null }, { "name": "storageBucket", "type": "object", "optional": true, "description": "Storage bucket. If not specified, it uses the default bucket.", "typeRef": "Storage.StorageBucket" }], ["caches"], "Requests cache names.");
  inspectorBackend2.registerCommand("CacheStorage.requestCachedResponse", [{ "name": "cacheId", "type": "string", "optional": false, "description": "Id of cache that contains the entry.", "typeRef": "CacheStorage.CacheId" }, { "name": "requestURL", "type": "string", "optional": false, "description": "URL spec of the request.", "typeRef": null }, { "name": "requestHeaders", "type": "array", "optional": false, "description": "headers of the request.", "typeRef": "CacheStorage.Header" }], ["response"], "Fetches cache entry.");
  inspectorBackend2.registerCommand("CacheStorage.requestEntries", [{ "name": "cacheId", "type": "string", "optional": false, "description": "ID of cache to get entries from.", "typeRef": "CacheStorage.CacheId" }, { "name": "skipCount", "type": "number", "optional": true, "description": "Number of records to skip.", "typeRef": null }, { "name": "pageSize", "type": "number", "optional": true, "description": "Number of records to fetch.", "typeRef": null }, { "name": "pathFilter", "type": "string", "optional": true, "description": "If present, only return the entries containing this substring in the path", "typeRef": null }], ["cacheDataEntries", "returnCount"], "Requests data from cache.");
  inspectorBackend2.registerType("CacheStorage.DataEntry", [{ "name": "requestURL", "type": "string", "optional": false, "description": "Request URL.", "typeRef": null }, { "name": "requestMethod", "type": "string", "optional": false, "description": "Request method.", "typeRef": null }, { "name": "requestHeaders", "type": "array", "optional": false, "description": "Request headers", "typeRef": "CacheStorage.Header" }, { "name": "responseTime", "type": "number", "optional": false, "description": "Number of seconds since epoch.", "typeRef": null }, { "name": "responseStatus", "type": "number", "optional": false, "description": "HTTP response status code.", "typeRef": null }, { "name": "responseStatusText", "type": "string", "optional": false, "description": "HTTP response status text.", "typeRef": null }, { "name": "responseType", "type": "string", "optional": false, "description": "HTTP response type", "typeRef": "CacheStorage.CachedResponseType" }, { "name": "responseHeaders", "type": "array", "optional": false, "description": "Response headers", "typeRef": "CacheStorage.Header" }]);
  inspectorBackend2.registerType("CacheStorage.Cache", [{ "name": "cacheId", "type": "string", "optional": false, "description": "An opaque unique id of the cache.", "typeRef": "CacheStorage.CacheId" }, { "name": "securityOrigin", "type": "string", "optional": false, "description": "Security origin of the cache.", "typeRef": null }, { "name": "storageKey", "type": "string", "optional": false, "description": "Storage key of the cache.", "typeRef": null }, { "name": "storageBucket", "type": "object", "optional": true, "description": "Storage bucket of the cache.", "typeRef": "Storage.StorageBucket" }, { "name": "cacheName", "type": "string", "optional": false, "description": "The name of the cache.", "typeRef": null }]);
  inspectorBackend2.registerType("CacheStorage.Header", [{ "name": "name", "type": "string", "optional": false, "description": "", "typeRef": null }, { "name": "value", "type": "string", "optional": false, "description": "", "typeRef": null }]);
  inspectorBackend2.registerType("CacheStorage.CachedResponse", [{ "name": "body", "type": "string", "optional": false, "description": "Entry content, base64-encoded.", "typeRef": null }]);
  inspectorBackend2.registerEvent("Cast.sinksUpdated", ["sinks"]);
  inspectorBackend2.registerEvent("Cast.issueUpdated", ["issueMessage"]);
  inspectorBackend2.registerCommand("Cast.enable", [{ "name": "presentationUrl", "type": "string", "optional": true, "description": "", "typeRef": null }], [], "Starts observing for sinks that can be used for tab mirroring, and if set, sinks compatible with |presentationUrl| as well. When sinks are found, a |sinksUpdated| event is fired. Also starts observing for issue messages. When an issue is added or removed, an |issueUpdated| event is fired.");
  inspectorBackend2.registerCommand("Cast.disable", [], [], "Stops observing for sinks and issues.");
  inspectorBackend2.registerCommand("Cast.setSinkToUse", [{ "name": "sinkName", "type": "string", "optional": false, "description": "", "typeRef": null }], [], "Sets a sink to be used when the web page requests the browser to choose a sink via Presentation API, Remote Playback API, or Cast SDK.");
  inspectorBackend2.registerCommand("Cast.startDesktopMirroring", [{ "name": "sinkName", "type": "string", "optional": false, "description": "", "typeRef": null }], [], "Starts mirroring the desktop to the sink.");
  inspectorBackend2.registerCommand("Cast.startTabMirroring", [{ "name": "sinkName", "type": "string", "optional": false, "description": "", "typeRef": null }], [], "Starts mirroring the tab to the sink.");
  inspectorBackend2.registerCommand("Cast.stopCasting", [{ "name": "sinkName", "type": "string", "optional": false, "description": "", "typeRef": null }], [], "Stops the active Cast session on the sink.");
  inspectorBackend2.registerType("Cast.Sink", [{ "name": "name", "type": "string", "optional": false, "description": "", "typeRef": null }, { "name": "id", "type": "string", "optional": false, "description": "", "typeRef": null }, { "name": "session", "type": "string", "optional": true, "description": "Text describing the current session. Present only if there is an active session on the sink.", "typeRef": null }]);
  inspectorBackend2.registerEnum("DOM.PseudoType", { FirstLine: "first-line", FirstLetter: "first-letter", Checkmark: "checkmark", Before: "before", After: "after", PickerIcon: "picker-icon", InterestHint: "interest-hint", Marker: "marker", Backdrop: "backdrop", Column: "column", Selection: "selection", SearchText: "search-text", TargetText: "target-text", SpellingError: "spelling-error", GrammarError: "grammar-error", Highlight: "highlight", FirstLineInherited: "first-line-inherited", ScrollMarker: "scroll-marker", ScrollMarkerGroup: "scroll-marker-group", ScrollButton: "scroll-button", Scrollbar: "scrollbar", ScrollbarThumb: "scrollbar-thumb", ScrollbarButton: "scrollbar-button", ScrollbarTrack: "scrollbar-track", ScrollbarTrackPiece: "scrollbar-track-piece", ScrollbarCorner: "scrollbar-corner", Resizer: "resizer", InputListButton: "input-list-button", ViewTransition: "view-transition", ViewTransitionGroup: "view-transition-group", ViewTransitionImagePair: "view-transition-image-pair", ViewTransitionGroupChildren: "view-transition-group-children", ViewTransitionOld: "view-transition-old", ViewTransitionNew: "view-transition-new", Placeholder: "placeholder", FileSelectorButton: "file-selector-button", DetailsContent: "details-content", Picker: "picker", PermissionIcon: "permission-icon", OverscrollAreaParent: "overscroll-area-parent" });
  inspectorBackend2.registerEnum("DOM.ShadowRootType", { UserAgent: "user-agent", Open: "open", Closed: "closed" });
  inspectorBackend2.registerEnum("DOM.CompatibilityMode", { QuirksMode: "QuirksMode", LimitedQuirksMode: "LimitedQuirksMode", NoQuirksMode: "NoQuirksMode" });
  inspectorBackend2.registerEnum("DOM.PhysicalAxes", { Horizontal: "Horizontal", Vertical: "Vertical", Both: "Both" });
  inspectorBackend2.registerEnum("DOM.LogicalAxes", { Inline: "Inline", Block: "Block", Both: "Both" });
  inspectorBackend2.registerEnum("DOM.ScrollOrientation", { Horizontal: "horizontal", Vertical: "vertical" });
  inspectorBackend2.registerEvent("DOM.attributeModified", ["nodeId", "name", "value"]);
  inspectorBackend2.registerEvent("DOM.adoptedStyleSheetsModified", ["nodeId", "adoptedStyleSheets"]);
  inspectorBackend2.registerEvent("DOM.attributeRemoved", ["nodeId", "name"]);
  inspectorBackend2.registerEvent("DOM.characterDataModified", ["nodeId", "characterData"]);
  inspectorBackend2.registerEvent("DOM.childNodeCountUpdated", ["nodeId", "childNodeCount"]);
  inspectorBackend2.registerEvent("DOM.childNodeInserted", ["parentNodeId", "previousNodeId", "node"]);
  inspectorBackend2.registerEvent("DOM.childNodeRemoved", ["parentNodeId", "nodeId"]);
  inspectorBackend2.registerEvent("DOM.distributedNodesUpdated", ["insertionPointId", "distributedNodes"]);
  inspectorBackend2.registerEvent("DOM.documentUpdated", []);
  inspectorBackend2.registerEvent("DOM.inlineStyleInvalidated", ["nodeIds"]);
  inspectorBackend2.registerEvent("DOM.pseudoElementAdded", ["parentId", "pseudoElement"]);
  inspectorBackend2.registerEvent("DOM.topLayerElementsUpdated", []);
  inspectorBackend2.registerEvent("DOM.scrollableFlagUpdated", ["nodeId", "isScrollable"]);
  inspectorBackend2.registerEvent("DOM.adRelatedStateUpdated", ["nodeId", "isAdRelated"]);
  inspectorBackend2.registerEvent("DOM.affectedByStartingStylesFlagUpdated", ["nodeId", "affectedByStartingStyles"]);
  inspectorBackend2.registerEvent("DOM.pseudoElementRemoved", ["parentId", "pseudoElementId"]);
  inspectorBackend2.registerEvent("DOM.setChildNodes", ["parentId", "nodes"]);
  inspectorBackend2.registerEvent("DOM.shadowRootPopped", ["hostId", "rootId"]);
  inspectorBackend2.registerEvent("DOM.shadowRootPushed", ["hostId", "root"]);
  inspectorBackend2.registerCommand("DOM.collectClassNamesFromSubtree", [{ "name": "nodeId", "type": "number", "optional": false, "description": "Id of the node to collect class names.", "typeRef": "DOM.NodeId" }], ["classNames"], "Collects class names for the node with given id and all of it's child nodes.");
  inspectorBackend2.registerCommand("DOM.copyTo", [{ "name": "nodeId", "type": "number", "optional": false, "description": "Id of the node to copy.", "typeRef": "DOM.NodeId" }, { "name": "targetNodeId", "type": "number", "optional": false, "description": "Id of the element to drop the copy into.", "typeRef": "DOM.NodeId" }, { "name": "insertBeforeNodeId", "type": "number", "optional": true, "description": "Drop the copy before this node (if absent, the copy becomes the last child of `targetNodeId`).", "typeRef": "DOM.NodeId" }], ["nodeId"], "Creates a deep copy of the specified node and places it into the target container before the given anchor.");
  inspectorBackend2.registerCommand("DOM.describeNode", [{ "name": "nodeId", "type": "number", "optional": true, "description": "Identifier of the node.", "typeRef": "DOM.NodeId" }, { "name": "backendNodeId", "type": "number", "optional": true, "description": "Identifier of the backend node.", "typeRef": "DOM.BackendNodeId" }, { "name": "objectId", "type": "string", "optional": true, "description": "JavaScript object id of the node wrapper.", "typeRef": "Runtime.RemoteObjectId" }, { "name": "depth", "type": "number", "optional": true, "description": "The maximum depth at which children should be retrieved, defaults to 1. Use -1 for the entire subtree or provide an integer larger than 0.", "typeRef": null }, { "name": "pierce", "type": "boolean", "optional": true, "description": "Whether or not iframes and shadow roots should be traversed when returning the subtree (default is false).", "typeRef": null }], ["node"], "Describes node given its id, does not require domain to be enabled. Does not start tracking any objects, can be used for automation.");
  inspectorBackend2.registerCommand("DOM.scrollIntoViewIfNeeded", [{ "name": "nodeId", "type": "number", "optional": true, "description": "Identifier of the node.", "typeRef": "DOM.NodeId" }, { "name": "backendNodeId", "type": "number", "optional": true, "description": "Identifier of the backend node.", "typeRef": "DOM.BackendNodeId" }, { "name": "objectId", "type": "string", "optional": true, "description": "JavaScript object id of the node wrapper.", "typeRef": "Runtime.RemoteObjectId" }, { "name": "rect", "type": "object", "optional": true, "description": "The rect to be scrolled into view, relative to the node's border box, in CSS pixels. When omitted, center of the node will be used, similar to Element.scrollIntoView.", "typeRef": "DOM.Rect" }], [], "Scrolls the specified rect of the given node into view if not already visible. Note: exactly one between nodeId, backendNodeId and objectId should be passed to identify the node.");
  inspectorBackend2.registerCommand("DOM.disable", [], [], "Disables DOM agent for the given page.");
  inspectorBackend2.registerCommand("DOM.discardSearchResults", [{ "name": "searchId", "type": "string", "optional": false, "description": "Unique search session identifier.", "typeRef": null }], [], "Discards search results from the session with the given id. `getSearchResults` should no longer be called for that search.");
  inspectorBackend2.registerEnum("DOM.EnableRequestIncludeWhitespace", { None: "none", All: "all" });
  inspectorBackend2.registerCommand("DOM.enable", [{ "name": "includeWhitespace", "type": "string", "optional": true, "description": "Whether to include whitespaces in the children array of returned Nodes.", "typeRef": "DOM.EnableRequestIncludeWhitespace" }], [], "Enables DOM agent for the given page.");
  inspectorBackend2.registerCommand("DOM.focus", [{ "name": "nodeId", "type": "number", "optional": true, "description": "Identifier of the node.", "typeRef": "DOM.NodeId" }, { "name": "backendNodeId", "type": "number", "optional": true, "description": "Identifier of the backend node.", "typeRef": "DOM.BackendNodeId" }, { "name": "objectId", "type": "string", "optional": true, "description": "JavaScript object id of the node wrapper.", "typeRef": "Runtime.RemoteObjectId" }], [], "Focuses the given element.");
  inspectorBackend2.registerCommand("DOM.getAttributes", [{ "name": "nodeId", "type": "number", "optional": false, "description": "Id of the node to retrieve attributes for.", "typeRef": "DOM.NodeId" }], ["attributes"], "Returns attributes for the specified node.");
  inspectorBackend2.registerCommand("DOM.getBoxModel", [{ "name": "nodeId", "type": "number", "optional": true, "description": "Identifier of the node.", "typeRef": "DOM.NodeId" }, { "name": "backendNodeId", "type": "number", "optional": true, "description": "Identifier of the backend node.", "typeRef": "DOM.BackendNodeId" }, { "name": "objectId", "type": "string", "optional": true, "description": "JavaScript object id of the node wrapper.", "typeRef": "Runtime.RemoteObjectId" }], ["model"], "Returns boxes for the given node.");
  inspectorBackend2.registerCommand("DOM.getContentQuads", [{ "name": "nodeId", "type": "number", "optional": true, "description": "Identifier of the node.", "typeRef": "DOM.NodeId" }, { "name": "backendNodeId", "type": "number", "optional": true, "description": "Identifier of the backend node.", "typeRef": "DOM.BackendNodeId" }, { "name": "objectId", "type": "string", "optional": true, "description": "JavaScript object id of the node wrapper.", "typeRef": "Runtime.RemoteObjectId" }], ["quads"], "Returns quads that describe node position on the page. This method might return multiple quads for inline nodes.");
  inspectorBackend2.registerCommand("DOM.getDocument", [{ "name": "depth", "type": "number", "optional": true, "description": "The maximum depth at which children should be retrieved, defaults to 1. Use -1 for the entire subtree or provide an integer larger than 0.", "typeRef": null }, { "name": "pierce", "type": "boolean", "optional": true, "description": "Whether or not iframes and shadow roots should be traversed when returning the subtree (default is false).", "typeRef": null }], ["root"], "Returns the root DOM node (and optionally the subtree) to the caller. Implicitly enables the DOM domain events for the current target.");
  inspectorBackend2.registerCommand("DOM.getFlattenedDocument", [{ "name": "depth", "type": "number", "optional": true, "description": "The maximum depth at which children should be retrieved, defaults to 1. Use -1 for the entire subtree or provide an integer larger than 0.", "typeRef": null }, { "name": "pierce", "type": "boolean", "optional": true, "description": "Whether or not iframes and shadow roots should be traversed when returning the subtree (default is false).", "typeRef": null }], ["nodes"], "Returns the root DOM node (and optionally the subtree) to the caller. Deprecated, as it is not designed to work well with the rest of the DOM agent. Use DOMSnapshot.captureSnapshot instead.");
  inspectorBackend2.registerCommand("DOM.getNodesForSubtreeByStyle", [{ "name": "nodeId", "type": "number", "optional": false, "description": "Node ID pointing to the root of a subtree.", "typeRef": "DOM.NodeId" }, { "name": "computedStyles", "type": "array", "optional": false, "description": "The style to filter nodes by (includes nodes if any of properties matches).", "typeRef": "DOM.CSSComputedStyleProperty" }, { "name": "pierce", "type": "boolean", "optional": true, "description": "Whether or not iframes and shadow roots in the same target should be traversed when returning the results (default is false).", "typeRef": null }], ["nodeIds"], "Finds nodes with a given computed style in a subtree.");
  inspectorBackend2.registerCommand("DOM.getNodeForLocation", [{ "name": "x", "type": "number", "optional": false, "description": "X coordinate.", "typeRef": null }, { "name": "y", "type": "number", "optional": false, "description": "Y coordinate.", "typeRef": null }, { "name": "includeUserAgentShadowDOM", "type": "boolean", "optional": true, "description": "False to skip to the nearest non-UA shadow root ancestor (default: false).", "typeRef": null }, { "name": "ignorePointerEventsNone", "type": "boolean", "optional": true, "description": "Whether to ignore pointer-events: none on elements and hit test them.", "typeRef": null }], ["backendNodeId", "frameId", "nodeId"], "Returns node id at given location. Depending on whether DOM domain is enabled, nodeId is either returned or not.");
  inspectorBackend2.registerCommand("DOM.getOuterHTML", [{ "name": "nodeId", "type": "number", "optional": true, "description": "Identifier of the node.", "typeRef": "DOM.NodeId" }, { "name": "backendNodeId", "type": "number", "optional": true, "description": "Identifier of the backend node.", "typeRef": "DOM.BackendNodeId" }, { "name": "objectId", "type": "string", "optional": true, "description": "JavaScript object id of the node wrapper.", "typeRef": "Runtime.RemoteObjectId" }, { "name": "includeShadowDOM", "type": "boolean", "optional": true, "description": "Include all shadow roots. Equals to false if not specified.", "typeRef": null }], ["outerHTML"], "Returns node's HTML markup.");
  inspectorBackend2.registerCommand("DOM.getRelayoutBoundary", [{ "name": "nodeId", "type": "number", "optional": false, "description": "Id of the node.", "typeRef": "DOM.NodeId" }], ["nodeId"], "Returns the id of the nearest ancestor that is a relayout boundary.");
  inspectorBackend2.registerCommand("DOM.getSearchResults", [{ "name": "searchId", "type": "string", "optional": false, "description": "Unique search session identifier.", "typeRef": null }, { "name": "fromIndex", "type": "number", "optional": false, "description": "Start index of the search result to be returned.", "typeRef": null }, { "name": "toIndex", "type": "number", "optional": false, "description": "End index of the search result to be returned.", "typeRef": null }], ["nodeIds"], "Returns search results from given `fromIndex` to given `toIndex` from the search with the given identifier.");
  inspectorBackend2.registerCommand("DOM.hideHighlight", [], [], "Hides any highlight.");
  inspectorBackend2.registerCommand("DOM.highlightNode", [], [], "Highlights DOM node.");
  inspectorBackend2.registerCommand("DOM.highlightRect", [], [], "Highlights given rectangle.");
  inspectorBackend2.registerCommand("DOM.markUndoableState", [], [], "Marks last undoable state.");
  inspectorBackend2.registerCommand("DOM.moveTo", [{ "name": "nodeId", "type": "number", "optional": false, "description": "Id of the node to move.", "typeRef": "DOM.NodeId" }, { "name": "targetNodeId", "type": "number", "optional": false, "description": "Id of the element to drop the moved node into.", "typeRef": "DOM.NodeId" }, { "name": "insertBeforeNodeId", "type": "number", "optional": true, "description": "Drop node before this one (if absent, the moved node becomes the last child of `targetNodeId`).", "typeRef": "DOM.NodeId" }], ["nodeId"], "Moves node into the new container, places it before the given anchor.");
  inspectorBackend2.registerCommand("DOM.performSearch", [{ "name": "query", "type": "string", "optional": false, "description": "Plain text or query selector or XPath search query.", "typeRef": null }, { "name": "includeUserAgentShadowDOM", "type": "boolean", "optional": true, "description": "True to search in user agent shadow DOM.", "typeRef": null }], ["searchId", "resultCount"], "Searches for a given string in the DOM tree. Use `getSearchResults` to access search results or `cancelSearch` to end this search session.");
  inspectorBackend2.registerCommand("DOM.pushNodeByPathToFrontend", [{ "name": "path", "type": "string", "optional": false, "description": "Path to node in the proprietary format.", "typeRef": null }], ["nodeId"], "Requests that the node is sent to the caller given its path. // FIXME, use XPath");
  inspectorBackend2.registerCommand("DOM.pushNodesByBackendIdsToFrontend", [{ "name": "backendNodeIds", "type": "array", "optional": false, "description": "The array of backend node ids.", "typeRef": "DOM.BackendNodeId" }], ["nodeIds"], "Requests that a batch of nodes is sent to the caller given their backend node ids.");
  inspectorBackend2.registerCommand("DOM.querySelector", [{ "name": "nodeId", "type": "number", "optional": false, "description": "Id of the node to query upon.", "typeRef": "DOM.NodeId" }, { "name": "selector", "type": "string", "optional": false, "description": "Selector string.", "typeRef": null }], ["nodeId"], "Executes `querySelector` on a given node.");
  inspectorBackend2.registerCommand("DOM.querySelectorAll", [{ "name": "nodeId", "type": "number", "optional": false, "description": "Id of the node to query upon.", "typeRef": "DOM.NodeId" }, { "name": "selector", "type": "string", "optional": false, "description": "Selector string.", "typeRef": null }], ["nodeIds"], "Executes `querySelectorAll` on a given node.");
  inspectorBackend2.registerCommand("DOM.getTopLayerElements", [], ["nodeIds"], "Returns NodeIds of current top layer elements. Top layer is rendered closest to the user within a viewport, therefore its elements always appear on top of all other content.");
  inspectorBackend2.registerEnum("DOM.GetElementByRelationRequestRelation", { PopoverTarget: "PopoverTarget", InterestTarget: "InterestTarget", CommandFor: "CommandFor" });
  inspectorBackend2.registerCommand("DOM.getElementByRelation", [{ "name": "nodeId", "type": "number", "optional": false, "description": "Id of the node from which to query the relation.", "typeRef": "DOM.NodeId" }, { "name": "relation", "type": "string", "optional": false, "description": "Type of relation to get.", "typeRef": "DOM.GetElementByRelationRequestRelation" }], ["nodeId"], "Returns the NodeId of the matched element according to certain relations.");
  inspectorBackend2.registerCommand("DOM.redo", [], [], "Re-does the last undone action.");
  inspectorBackend2.registerCommand("DOM.removeAttribute", [{ "name": "nodeId", "type": "number", "optional": false, "description": "Id of the element to remove attribute from.", "typeRef": "DOM.NodeId" }, { "name": "name", "type": "string", "optional": false, "description": "Name of the attribute to remove.", "typeRef": null }], [], "Removes attribute with given name from an element with given id.");
  inspectorBackend2.registerCommand("DOM.removeNode", [{ "name": "nodeId", "type": "number", "optional": false, "description": "Id of the node to remove.", "typeRef": "DOM.NodeId" }], [], "Removes node with given id.");
  inspectorBackend2.registerCommand("DOM.requestChildNodes", [{ "name": "nodeId", "type": "number", "optional": false, "description": "Id of the node to get children for.", "typeRef": "DOM.NodeId" }, { "name": "depth", "type": "number", "optional": true, "description": "The maximum depth at which children should be retrieved, defaults to 1. Use -1 for the entire subtree or provide an integer larger than 0.", "typeRef": null }, { "name": "pierce", "type": "boolean", "optional": true, "description": "Whether or not iframes and shadow roots should be traversed when returning the sub-tree (default is false).", "typeRef": null }], [], "Requests that children of the node with given id are returned to the caller in form of `setChildNodes` events where not only immediate children are retrieved, but all children down to the specified depth.");
  inspectorBackend2.registerCommand("DOM.requestNode", [{ "name": "objectId", "type": "string", "optional": false, "description": "JavaScript object id to convert into node.", "typeRef": "Runtime.RemoteObjectId" }], ["nodeId"], "Requests that the node is sent to the caller given the JavaScript node object reference. All nodes that form the path from the node to the root are also sent to the client as a series of `setChildNodes` notifications.");
  inspectorBackend2.registerCommand("DOM.resolveNode", [{ "name": "nodeId", "type": "number", "optional": true, "description": "Id of the node to resolve.", "typeRef": "DOM.NodeId" }, { "name": "backendNodeId", "type": "number", "optional": true, "description": "Backend identifier of the node to resolve.", "typeRef": "DOM.BackendNodeId" }, { "name": "objectGroup", "type": "string", "optional": true, "description": "Symbolic group name that can be used to release multiple objects.", "typeRef": null }, { "name": "executionContextId", "type": "number", "optional": true, "description": "Execution context in which to resolve the node.", "typeRef": "Runtime.ExecutionContextId" }], ["object"], "Resolves the JavaScript node object for a given NodeId or BackendNodeId.");
  inspectorBackend2.registerCommand("DOM.setAttributeValue", [{ "name": "nodeId", "type": "number", "optional": false, "description": "Id of the element to set attribute for.", "typeRef": "DOM.NodeId" }, { "name": "name", "type": "string", "optional": false, "description": "Attribute name.", "typeRef": null }, { "name": "value", "type": "string", "optional": false, "description": "Attribute value.", "typeRef": null }], [], "Sets attribute for an element with given id.");
  inspectorBackend2.registerCommand("DOM.setAttributesAsText", [{ "name": "nodeId", "type": "number", "optional": false, "description": "Id of the element to set attributes for.", "typeRef": "DOM.NodeId" }, { "name": "text", "type": "string", "optional": false, "description": "Text with a number of attributes. Will parse this text using HTML parser.", "typeRef": null }, { "name": "name", "type": "string", "optional": true, "description": "Attribute name to replace with new attributes derived from text in case text parsed successfully.", "typeRef": null }], [], "Sets attributes on element with given id. This method is useful when user edits some existing attribute value and types in several attribute name/value pairs.");
  inspectorBackend2.registerCommand("DOM.setFileInputFiles", [{ "name": "files", "type": "array", "optional": false, "description": "Array of file paths to set.", "typeRef": "string" }, { "name": "nodeId", "type": "number", "optional": true, "description": "Identifier of the node.", "typeRef": "DOM.NodeId" }, { "name": "backendNodeId", "type": "number", "optional": true, "description": "Identifier of the backend node.", "typeRef": "DOM.BackendNodeId" }, { "name": "objectId", "type": "string", "optional": true, "description": "JavaScript object id of the node wrapper.", "typeRef": "Runtime.RemoteObjectId" }], [], "Sets files for the given file input element.");
  inspectorBackend2.registerCommand("DOM.setNodeStackTracesEnabled", [{ "name": "enable", "type": "boolean", "optional": false, "description": "Enable or disable.", "typeRef": null }], [], "Sets if stack traces should be captured for Nodes. See `Node.getNodeStackTraces`. Default is disabled.");
  inspectorBackend2.registerCommand("DOM.getNodeStackTraces", [{ "name": "nodeId", "type": "number", "optional": false, "description": "Id of the node to get stack traces for.", "typeRef": "DOM.NodeId" }], ["creation"], "Gets stack traces associated with a Node. As of now, only provides stack trace for Node creation.");
  inspectorBackend2.registerCommand("DOM.getFileInfo", [{ "name": "objectId", "type": "string", "optional": false, "description": "JavaScript object id of the node wrapper.", "typeRef": "Runtime.RemoteObjectId" }], ["path"], "Returns file information for the given File wrapper.");
  inspectorBackend2.registerCommand("DOM.getDetachedDomNodes", [], ["detachedNodes"], "Returns list of detached nodes");
  inspectorBackend2.registerCommand("DOM.setInspectedNode", [{ "name": "nodeId", "type": "number", "optional": false, "description": "DOM node id to be accessible by means of $x command line API.", "typeRef": "DOM.NodeId" }], [], "Enables console to refer to the node with given id via $x (see Command Line API for more details $x functions).");
  inspectorBackend2.registerCommand("DOM.setNodeName", [{ "name": "nodeId", "type": "number", "optional": false, "description": "Id of the node to set name for.", "typeRef": "DOM.NodeId" }, { "name": "name", "type": "string", "optional": false, "description": "New node's name.", "typeRef": null }], ["nodeId"], "Sets node name for a node with given id.");
  inspectorBackend2.registerCommand("DOM.setNodeValue", [{ "name": "nodeId", "type": "number", "optional": false, "description": "Id of the node to set value for.", "typeRef": "DOM.NodeId" }, { "name": "value", "type": "string", "optional": false, "description": "New node's value.", "typeRef": null }], [], "Sets node value for a node with given id.");
  inspectorBackend2.registerCommand("DOM.setOuterHTML", [{ "name": "nodeId", "type": "number", "optional": false, "description": "Id of the node to set markup for.", "typeRef": "DOM.NodeId" }, { "name": "outerHTML", "type": "string", "optional": false, "description": "Outer HTML markup to set.", "typeRef": null }], [], "Sets node HTML markup, returns new node id.");
  inspectorBackend2.registerCommand("DOM.undo", [], [], "Undoes the last performed action.");
  inspectorBackend2.registerCommand("DOM.getFrameOwner", [{ "name": "frameId", "type": "string", "optional": false, "description": "", "typeRef": "Page.FrameId" }], ["backendNodeId", "nodeId"], "Returns iframe node that owns iframe with the given domain.");
  inspectorBackend2.registerCommand("DOM.getContainerForNode", [{ "name": "nodeId", "type": "number", "optional": false, "description": "", "typeRef": "DOM.NodeId" }, { "name": "containerName", "type": "string", "optional": true, "description": "", "typeRef": null }, { "name": "physicalAxes", "type": "string", "optional": true, "description": "", "typeRef": "DOM.PhysicalAxes" }, { "name": "logicalAxes", "type": "string", "optional": true, "description": "", "typeRef": "DOM.LogicalAxes" }, { "name": "queriesScrollState", "type": "boolean", "optional": true, "description": "", "typeRef": null }, { "name": "queriesAnchored", "type": "boolean", "optional": true, "description": "", "typeRef": null }], ["nodeId"], "Returns the query container of the given node based on container query conditions: containerName, physical and logical axes, and whether it queries scroll-state or anchored elements. If no axes are provided and queriesScrollState is false, the style container is returned, which is the direct parent or the closest element with a matching container-name.");
  inspectorBackend2.registerCommand("DOM.getQueryingDescendantsForContainer", [{ "name": "nodeId", "type": "number", "optional": false, "description": "Id of the container node to find querying descendants from.", "typeRef": "DOM.NodeId" }], ["nodeIds"], "Returns the descendants of a container query container that have container queries against this container.");
  inspectorBackend2.registerCommand("DOM.getAnchorElement", [{ "name": "nodeId", "type": "number", "optional": false, "description": "Id of the positioned element from which to find the anchor.", "typeRef": "DOM.NodeId" }, { "name": "anchorSpecifier", "type": "string", "optional": true, "description": "An optional anchor specifier, as defined in https://www.w3.org/TR/css-anchor-position-1/#anchor-specifier. If not provided, it will return the implicit anchor element for the given positioned element.", "typeRef": null }], ["nodeId"], "Returns the target anchor element of the given anchor query according to https://www.w3.org/TR/css-anchor-position-1/#target.");
  inspectorBackend2.registerCommand("DOM.forceShowPopover", [{ "name": "nodeId", "type": "number", "optional": false, "description": "Id of the popover HTMLElement", "typeRef": "DOM.NodeId" }, { "name": "enable", "type": "boolean", "optional": false, "description": "If true, opens the popover and keeps it open. If false, closes the popover if it was previously force-opened.", "typeRef": null }], ["nodeIds"], "When enabling, this API force-opens the popover identified by nodeId and keeps it open until disabled.");
  inspectorBackend2.registerType("DOM.BackendNode", [{ "name": "nodeType", "type": "number", "optional": false, "description": "`Node`'s nodeType.", "typeRef": null }, { "name": "nodeName", "type": "string", "optional": false, "description": "`Node`'s nodeName.", "typeRef": null }, { "name": "backendNodeId", "type": "number", "optional": false, "description": "", "typeRef": "DOM.BackendNodeId" }]);
  inspectorBackend2.registerType("DOM.Node", [{ "name": "nodeId", "type": "number", "optional": false, "description": "Node identifier that is passed into the rest of the DOM messages as the `nodeId`. Backend will only push node with given `id` once. It is aware of all requested nodes and will only fire DOM events for nodes known to the client.", "typeRef": "DOM.NodeId" }, { "name": "parentId", "type": "number", "optional": true, "description": "The id of the parent node if any.", "typeRef": "DOM.NodeId" }, { "name": "backendNodeId", "type": "number", "optional": false, "description": "The BackendNodeId for this node.", "typeRef": "DOM.BackendNodeId" }, { "name": "nodeType", "type": "number", "optional": false, "description": "`Node`'s nodeType.", "typeRef": null }, { "name": "nodeName", "type": "string", "optional": false, "description": "`Node`'s nodeName.", "typeRef": null }, { "name": "localName", "type": "string", "optional": false, "description": "`Node`'s localName.", "typeRef": null }, { "name": "nodeValue", "type": "string", "optional": false, "description": "`Node`'s nodeValue.", "typeRef": null }, { "name": "childNodeCount", "type": "number", "optional": true, "description": "Child count for `Container` nodes.", "typeRef": null }, { "name": "children", "type": "array", "optional": true, "description": "Child nodes of this node when requested with children.", "typeRef": "DOM.Node" }, { "name": "attributes", "type": "array", "optional": true, "description": "Attributes of the `Element` node in the form of flat array `[name1, value1, name2, value2]`.", "typeRef": "string" }, { "name": "documentURL", "type": "string", "optional": true, "description": "Document URL that `Document` or `FrameOwner` node points to.", "typeRef": null }, { "name": "baseURL", "type": "string", "optional": true, "description": "Base URL that `Document` or `FrameOwner` node uses for URL completion.", "typeRef": null }, { "name": "publicId", "type": "string", "optional": true, "description": "`DocumentType`'s publicId.", "typeRef": null }, { "name": "systemId", "type": "string", "optional": true, "description": "`DocumentType`'s systemId.", "typeRef": null }, { "name": "internalSubset", "type": "string", "optional": true, "description": "`DocumentType`'s internalSubset.", "typeRef": null }, { "name": "xmlVersion", "type": "string", "optional": true, "description": "`Document`'s XML version in case of XML documents.", "typeRef": null }, { "name": "name", "type": "string", "optional": true, "description": "`Attr`'s name.", "typeRef": null }, { "name": "value", "type": "string", "optional": true, "description": "`Attr`'s value.", "typeRef": null }, { "name": "pseudoType", "type": "string", "optional": true, "description": "Pseudo element type for this node.", "typeRef": "DOM.PseudoType" }, { "name": "pseudoIdentifier", "type": "string", "optional": true, "description": "Pseudo element identifier for this node. Only present if there is a valid pseudoType.", "typeRef": null }, { "name": "shadowRootType", "type": "string", "optional": true, "description": "Shadow root type.", "typeRef": "DOM.ShadowRootType" }, { "name": "frameId", "type": "string", "optional": true, "description": "Frame ID for frame owner elements.", "typeRef": "Page.FrameId" }, { "name": "contentDocument", "type": "object", "optional": true, "description": "Content document for frame owner elements.", "typeRef": "DOM.Node" }, { "name": "shadowRoots", "type": "array", "optional": true, "description": "Shadow root list for given element host.", "typeRef": "DOM.Node" }, { "name": "templateContent", "type": "object", "optional": true, "description": "Content document fragment for template elements.", "typeRef": "DOM.Node" }, { "name": "pseudoElements", "type": "array", "optional": true, "description": "Pseudo elements associated with this node.", "typeRef": "DOM.Node" }, { "name": "importedDocument", "type": "object", "optional": true, "description": "Deprecated, as the HTML Imports API has been removed (crbug.com/937746). This property used to return the imported document for the HTMLImport links. The property is always undefined now.", "typeRef": "DOM.Node" }, { "name": "distributedNodes", "type": "array", "optional": true, "description": "Distributed nodes for given insertion point.", "typeRef": "DOM.BackendNode" }, { "name": "isSVG", "type": "boolean", "optional": true, "description": "Whether the node is SVG.", "typeRef": null }, { "name": "compatibilityMode", "type": "string", "optional": true, "description": "", "typeRef": "DOM.CompatibilityMode" }, { "name": "assignedSlot", "type": "object", "optional": true, "description": "", "typeRef": "DOM.BackendNode" }, { "name": "isScrollable", "type": "boolean", "optional": true, "description": "", "typeRef": null }, { "name": "affectedByStartingStyles", "type": "boolean", "optional": true, "description": "", "typeRef": null }, { "name": "adoptedStyleSheets", "type": "array", "optional": true, "description": "", "typeRef": "DOM.StyleSheetId" }, { "name": "isAdRelated", "type": "boolean", "optional": true, "description": "", "typeRef": null }]);
  inspectorBackend2.registerType("DOM.DetachedElementInfo", [{ "name": "treeNode", "type": "object", "optional": false, "description": "", "typeRef": "DOM.Node" }, { "name": "retainedNodeIds", "type": "array", "optional": false, "description": "", "typeRef": "DOM.NodeId" }]);
  inspectorBackend2.registerType("DOM.RGBA", [{ "name": "r", "type": "number", "optional": false, "description": "The red component, in the [0-255] range.", "typeRef": null }, { "name": "g", "type": "number", "optional": false, "description": "The green component, in the [0-255] range.", "typeRef": null }, { "name": "b", "type": "number", "optional": false, "description": "The blue component, in the [0-255] range.", "typeRef": null }, { "name": "a", "type": "number", "optional": true, "description": "The alpha component, in the [0-1] range (default: 1).", "typeRef": null }]);
  inspectorBackend2.registerType("DOM.Quad", [{ "name": "Quad", "type": "array", "optional": false, "description": "An array of quad vertices, x immediately followed by y for each point, points clock-wise.", "typeRef": "number" }]);
  inspectorBackend2.registerType("DOM.BoxModel", [{ "name": "content", "type": "array", "optional": false, "description": "Content box", "typeRef": "DOM.Quad" }, { "name": "padding", "type": "array", "optional": false, "description": "Padding box", "typeRef": "DOM.Quad" }, { "name": "border", "type": "array", "optional": false, "description": "Border box", "typeRef": "DOM.Quad" }, { "name": "margin", "type": "array", "optional": false, "description": "Margin box", "typeRef": "DOM.Quad" }, { "name": "width", "type": "number", "optional": false, "description": "Node width", "typeRef": null }, { "name": "height", "type": "number", "optional": false, "description": "Node height", "typeRef": null }, { "name": "shapeOutside", "type": "object", "optional": true, "description": "Shape outside coordinates", "typeRef": "DOM.ShapeOutsideInfo" }]);
  inspectorBackend2.registerType("DOM.ShapeOutsideInfo", [{ "name": "bounds", "type": "array", "optional": false, "description": "Shape bounds", "typeRef": "DOM.Quad" }, { "name": "shape", "type": "array", "optional": false, "description": "Shape coordinate details", "typeRef": "any" }, { "name": "marginShape", "type": "array", "optional": false, "description": "Margin shape bounds", "typeRef": "any" }]);
  inspectorBackend2.registerType("DOM.Rect", [{ "name": "x", "type": "number", "optional": false, "description": "X coordinate", "typeRef": null }, { "name": "y", "type": "number", "optional": false, "description": "Y coordinate", "typeRef": null }, { "name": "width", "type": "number", "optional": false, "description": "Rectangle width", "typeRef": null }, { "name": "height", "type": "number", "optional": false, "description": "Rectangle height", "typeRef": null }]);
  inspectorBackend2.registerType("DOM.CSSComputedStyleProperty", [{ "name": "name", "type": "string", "optional": false, "description": "Computed style property name.", "typeRef": null }, { "name": "value", "type": "string", "optional": false, "description": "Computed style property value.", "typeRef": null }]);
  inspectorBackend2.registerEnum("DOMDebugger.DOMBreakpointType", { SubtreeModified: "subtree-modified", AttributeModified: "attribute-modified", NodeRemoved: "node-removed" });
  inspectorBackend2.registerEnum("DOMDebugger.CSPViolationType", { TrustedtypeSinkViolation: "trustedtype-sink-violation", TrustedtypePolicyViolation: "trustedtype-policy-violation" });
  inspectorBackend2.registerCommand("DOMDebugger.getEventListeners", [{ "name": "objectId", "type": "string", "optional": false, "description": "Identifier of the object to return listeners for.", "typeRef": "Runtime.RemoteObjectId" }, { "name": "depth", "type": "number", "optional": true, "description": "The maximum depth at which Node children should be retrieved, defaults to 1. Use -1 for the entire subtree or provide an integer larger than 0.", "typeRef": null }, { "name": "pierce", "type": "boolean", "optional": true, "description": "Whether or not iframes and shadow roots should be traversed when returning the subtree (default is false). Reports listeners for all contexts if pierce is enabled.", "typeRef": null }], ["listeners"], "Returns event listeners of the given object.");
  inspectorBackend2.registerCommand("DOMDebugger.removeDOMBreakpoint", [{ "name": "nodeId", "type": "number", "optional": false, "description": "Identifier of the node to remove breakpoint from.", "typeRef": "DOM.NodeId" }, { "name": "type", "type": "string", "optional": false, "description": "Type of the breakpoint to remove.", "typeRef": "DOMDebugger.DOMBreakpointType" }], [], "Removes DOM breakpoint that was set using `setDOMBreakpoint`.");
  inspectorBackend2.registerCommand("DOMDebugger.removeEventListenerBreakpoint", [{ "name": "eventName", "type": "string", "optional": false, "description": "Event name.", "typeRef": null }, { "name": "targetName", "type": "string", "optional": true, "description": "EventTarget interface name.", "typeRef": null }], [], "Removes breakpoint on particular DOM event.");
  inspectorBackend2.registerCommand("DOMDebugger.removeInstrumentationBreakpoint", [{ "name": "eventName", "type": "string", "optional": false, "description": "Instrumentation name to stop on.", "typeRef": null }], [], "Removes breakpoint on particular native event.");
  inspectorBackend2.registerCommand("DOMDebugger.removeXHRBreakpoint", [{ "name": "url", "type": "string", "optional": false, "description": "Resource URL substring.", "typeRef": null }], [], "Removes breakpoint from XMLHttpRequest.");
  inspectorBackend2.registerCommand("DOMDebugger.setBreakOnCSPViolation", [{ "name": "violationTypes", "type": "array", "optional": false, "description": "CSP Violations to stop upon.", "typeRef": "DOMDebugger.CSPViolationType" }], [], "Sets breakpoint on particular CSP violations.");
  inspectorBackend2.registerCommand("DOMDebugger.setDOMBreakpoint", [{ "name": "nodeId", "type": "number", "optional": false, "description": "Identifier of the node to set breakpoint on.", "typeRef": "DOM.NodeId" }, { "name": "type", "type": "string", "optional": false, "description": "Type of the operation to stop upon.", "typeRef": "DOMDebugger.DOMBreakpointType" }], [], "Sets breakpoint on particular operation with DOM.");
  inspectorBackend2.registerCommand("DOMDebugger.setEventListenerBreakpoint", [{ "name": "eventName", "type": "string", "optional": false, "description": "DOM Event name to stop on (any DOM event will do).", "typeRef": null }, { "name": "targetName", "type": "string", "optional": true, "description": 'EventTarget interface name to stop on. If equal to `\\"*\\"` or not provided, will stop on any EventTarget.', "typeRef": null }], [], "Sets breakpoint on particular DOM event.");
  inspectorBackend2.registerCommand("DOMDebugger.setInstrumentationBreakpoint", [{ "name": "eventName", "type": "string", "optional": false, "description": "Instrumentation name to stop on.", "typeRef": null }], [], "Sets breakpoint on particular native event.");
  inspectorBackend2.registerCommand("DOMDebugger.setXHRBreakpoint", [{ "name": "url", "type": "string", "optional": false, "description": "Resource URL substring. All XHRs having this substring in the URL will get stopped upon.", "typeRef": null }], [], "Sets breakpoint on XMLHttpRequest.");
  inspectorBackend2.registerType("DOMDebugger.EventListener", [{ "name": "type", "type": "string", "optional": false, "description": "`EventListener`'s type.", "typeRef": null }, { "name": "useCapture", "type": "boolean", "optional": false, "description": "`EventListener`'s useCapture.", "typeRef": null }, { "name": "passive", "type": "boolean", "optional": false, "description": "`EventListener`'s passive flag.", "typeRef": null }, { "name": "once", "type": "boolean", "optional": false, "description": "`EventListener`'s once flag.", "typeRef": null }, { "name": "scriptId", "type": "string", "optional": false, "description": "Script id of the handler code.", "typeRef": "Runtime.ScriptId" }, { "name": "lineNumber", "type": "number", "optional": false, "description": "Line number in the script (0-based).", "typeRef": null }, { "name": "columnNumber", "type": "number", "optional": false, "description": "Column number in the script (0-based).", "typeRef": null }, { "name": "handler", "type": "object", "optional": true, "description": "Event handler function value.", "typeRef": "Runtime.RemoteObject" }, { "name": "originalHandler", "type": "object", "optional": true, "description": "Event original handler function value.", "typeRef": "Runtime.RemoteObject" }, { "name": "backendNodeId", "type": "number", "optional": true, "description": "Node the listener is added to (if any).", "typeRef": "DOM.BackendNodeId" }]);
  inspectorBackend2.registerCommand("DOMSnapshot.disable", [], [], "Disables DOM snapshot agent for the given page.");
  inspectorBackend2.registerCommand("DOMSnapshot.enable", [], [], "Enables DOM snapshot agent for the given page.");
  inspectorBackend2.registerCommand("DOMSnapshot.getSnapshot", [{ "name": "computedStyleWhitelist", "type": "array", "optional": false, "description": "Whitelist of computed styles to return.", "typeRef": "string" }, { "name": "includeEventListeners", "type": "boolean", "optional": true, "description": "Whether or not to retrieve details of DOM listeners (default false).", "typeRef": null }, { "name": "includePaintOrder", "type": "boolean", "optional": true, "description": "Whether to determine and include the paint order index of LayoutTreeNodes (default false).", "typeRef": null }, { "name": "includeUserAgentShadowTree", "type": "boolean", "optional": true, "description": "Whether to include UA shadow tree in the snapshot (default false).", "typeRef": null }], ["domNodes", "layoutTreeNodes", "computedStyles"], "Returns a document snapshot, including the full DOM tree of the root node (including iframes, template contents, and imported documents) in a flattened array, as well as layout and white-listed computed style information for the nodes. Shadow DOM in the returned DOM tree is flattened.");
  inspectorBackend2.registerCommand("DOMSnapshot.captureSnapshot", [{ "name": "computedStyles", "type": "array", "optional": false, "description": "Whitelist of computed styles to return.", "typeRef": "string" }, { "name": "includePaintOrder", "type": "boolean", "optional": true, "description": "Whether to include layout object paint orders into the snapshot.", "typeRef": null }, { "name": "includeDOMRects", "type": "boolean", "optional": true, "description": "Whether to include DOM rectangles (offsetRects, clientRects, scrollRects) into the snapshot", "typeRef": null }, { "name": "includeBlendedBackgroundColors", "type": "boolean", "optional": true, "description": "Whether to include blended background colors in the snapshot (default: false). Blended background color is achieved by blending background colors of all elements that overlap with the current element.", "typeRef": null }, { "name": "includeTextColorOpacities", "type": "boolean", "optional": true, "description": "Whether to include text color opacity in the snapshot (default: false). An element might have the opacity property set that affects the text color of the element. The final text color opacity is computed based on the opacity of all overlapping elements.", "typeRef": null }], ["documents", "strings"], "Returns a document snapshot, including the full DOM tree of the root node (including iframes, template contents, and imported documents) in a flattened array, as well as layout and white-listed computed style information for the nodes. Shadow DOM in the returned DOM tree is flattened.");
  inspectorBackend2.registerType("DOMSnapshot.DOMNode", [{ "name": "nodeType", "type": "number", "optional": false, "description": "`Node`'s nodeType.", "typeRef": null }, { "name": "nodeName", "type": "string", "optional": false, "description": "`Node`'s nodeName.", "typeRef": null }, { "name": "nodeValue", "type": "string", "optional": false, "description": "`Node`'s nodeValue.", "typeRef": null }, { "name": "textValue", "type": "string", "optional": true, "description": "Only set for textarea elements, contains the text value.", "typeRef": null }, { "name": "inputValue", "type": "string", "optional": true, "description": "Only set for input elements, contains the input's associated text value.", "typeRef": null }, { "name": "inputChecked", "type": "boolean", "optional": true, "description": "Only set for radio and checkbox input elements, indicates if the element has been checked", "typeRef": null }, { "name": "optionSelected", "type": "boolean", "optional": true, "description": "Only set for option elements, indicates if the element has been selected", "typeRef": null }, { "name": "backendNodeId", "type": "number", "optional": false, "description": "`Node`'s id, corresponds to DOM.Node.backendNodeId.", "typeRef": "DOM.BackendNodeId" }, { "name": "childNodeIndexes", "type": "array", "optional": true, "description": "The indexes of the node's child nodes in the `domNodes` array returned by `getSnapshot`, if any.", "typeRef": "integer" }, { "name": "attributes", "type": "array", "optional": true, "description": "Attributes of an `Element` node.", "typeRef": "DOMSnapshot.NameValue" }, { "name": "pseudoElementIndexes", "type": "array", "optional": true, "description": "Indexes of pseudo elements associated with this node in the `domNodes` array returned by `getSnapshot`, if any.", "typeRef": "integer" }, { "name": "layoutNodeIndex", "type": "number", "optional": true, "description": "The index of the node's related layout tree node in the `layoutTreeNodes` array returned by `getSnapshot`, if any.", "typeRef": null }, { "name": "documentURL", "type": "string", "optional": true, "description": "Document URL that `Document` or `FrameOwner` node points to.", "typeRef": null }, { "name": "baseURL", "type": "string", "optional": true, "description": "Base URL that `Document` or `FrameOwner` node uses for URL completion.", "typeRef": null }, { "name": "contentLanguage", "type": "string", "optional": true, "description": "Only set for documents, contains the document's content language.", "typeRef": null }, { "name": "documentEncoding", "type": "string", "optional": true, "description": "Only set for documents, contains the document's character set encoding.", "typeRef": null }, { "name": "publicId", "type": "string", "optional": true, "description": "`DocumentType` node's publicId.", "typeRef": null }, { "name": "systemId", "type": "string", "optional": true, "description": "`DocumentType` node's systemId.", "typeRef": null }, { "name": "frameId", "type": "string", "optional": true, "description": "Frame ID for frame owner elements and also for the document node.", "typeRef": "Page.FrameId" }, { "name": "contentDocumentIndex", "type": "number", "optional": true, "description": "The index of a frame owner element's content document in the `domNodes` array returned by `getSnapshot`, if any.", "typeRef": null }, { "name": "pseudoType", "type": "string", "optional": true, "description": "Type of a pseudo element node.", "typeRef": "DOM.PseudoType" }, { "name": "shadowRootType", "type": "string", "optional": true, "description": "Shadow root type.", "typeRef": "DOM.ShadowRootType" }, { "name": "isClickable", "type": "boolean", "optional": true, "description": "Whether this DOM node responds to mouse clicks. This includes nodes that have had click event listeners attached via JavaScript as well as anchor tags that naturally navigate when clicked.", "typeRef": null }, { "name": "eventListeners", "type": "array", "optional": true, "description": "Details of the node's event listeners, if any.", "typeRef": "DOMDebugger.EventListener" }, { "name": "currentSourceURL", "type": "string", "optional": true, "description": "The selected url for nodes with a srcset attribute.", "typeRef": null }, { "name": "originURL", "type": "string", "optional": true, "description": "The url of the script (if any) that generates this node.", "typeRef": null }, { "name": "scrollOffsetX", "type": "number", "optional": true, "description": "Scroll offsets, set when this node is a Document.", "typeRef": null }, { "name": "scrollOffsetY", "type": "number", "optional": true, "description": "", "typeRef": null }]);
  inspectorBackend2.registerType("DOMSnapshot.InlineTextBox", [{ "name": "boundingBox", "type": "object", "optional": false, "description": "The bounding box in document coordinates. Note that scroll offset of the document is ignored.", "typeRef": "DOM.Rect" }, { "name": "startCharacterIndex", "type": "number", "optional": false, "description": "The starting index in characters, for this post layout textbox substring. Characters that would be represented as a surrogate pair in UTF-16 have length 2.", "typeRef": null }, { "name": "numCharacters", "type": "number", "optional": false, "description": "The number of characters in this post layout textbox substring. Characters that would be represented as a surrogate pair in UTF-16 have length 2.", "typeRef": null }]);
  inspectorBackend2.registerType("DOMSnapshot.LayoutTreeNode", [{ "name": "domNodeIndex", "type": "number", "optional": false, "description": "The index of the related DOM node in the `domNodes` array returned by `getSnapshot`.", "typeRef": null }, { "name": "boundingBox", "type": "object", "optional": false, "description": "The bounding box in document coordinates. Note that scroll offset of the document is ignored.", "typeRef": "DOM.Rect" }, { "name": "layoutText", "type": "string", "optional": true, "description": "Contents of the LayoutText, if any.", "typeRef": null }, { "name": "inlineTextNodes", "type": "array", "optional": true, "description": "The post-layout inline text nodes, if any.", "typeRef": "DOMSnapshot.InlineTextBox" }, { "name": "styleIndex", "type": "number", "optional": true, "description": "Index into the `computedStyles` array returned by `getSnapshot`.", "typeRef": null }, { "name": "paintOrder", "type": "number", "optional": true, "description": "Global paint order index, which is determined by the stacking order of the nodes. Nodes that are painted together will have the same index. Only provided if includePaintOrder in getSnapshot was true.", "typeRef": null }, { "name": "isStackingContext", "type": "boolean", "optional": true, "description": "Set to true to indicate the element begins a new stacking context.", "typeRef": null }]);
  inspectorBackend2.registerType("DOMSnapshot.ComputedStyle", [{ "name": "properties", "type": "array", "optional": false, "description": "Name/value pairs of computed style properties.", "typeRef": "DOMSnapshot.NameValue" }]);
  inspectorBackend2.registerType("DOMSnapshot.NameValue", [{ "name": "name", "type": "string", "optional": false, "description": "Attribute/property name.", "typeRef": null }, { "name": "value", "type": "string", "optional": false, "description": "Attribute/property value.", "typeRef": null }]);
  inspectorBackend2.registerType("DOMSnapshot.ArrayOfStrings", [{ "name": "ArrayOfStrings", "type": "array", "optional": false, "description": "Index of the string in the strings table.", "typeRef": "DOMSnapshot.StringIndex" }]);
  inspectorBackend2.registerType("DOMSnapshot.RareStringData", [{ "name": "index", "type": "array", "optional": false, "description": "", "typeRef": "integer" }, { "name": "value", "type": "array", "optional": false, "description": "", "typeRef": "DOMSnapshot.StringIndex" }]);
  inspectorBackend2.registerType("DOMSnapshot.RareBooleanData", [{ "name": "index", "type": "array", "optional": false, "description": "", "typeRef": "integer" }]);
  inspectorBackend2.registerType("DOMSnapshot.RareIntegerData", [{ "name": "index", "type": "array", "optional": false, "description": "", "typeRef": "integer" }, { "name": "value", "type": "array", "optional": false, "description": "", "typeRef": "integer" }]);
  inspectorBackend2.registerType("DOMSnapshot.Rectangle", [{ "name": "Rectangle", "type": "array", "optional": false, "description": "", "typeRef": "number" }]);
  inspectorBackend2.registerType("DOMSnapshot.DocumentSnapshot", [{ "name": "documentURL", "type": "number", "optional": false, "description": "Document URL that `Document` or `FrameOwner` node points to.", "typeRef": "DOMSnapshot.StringIndex" }, { "name": "title", "type": "number", "optional": false, "description": "Document title.", "typeRef": "DOMSnapshot.StringIndex" }, { "name": "baseURL", "type": "number", "optional": false, "description": "Base URL that `Document` or `FrameOwner` node uses for URL completion.", "typeRef": "DOMSnapshot.StringIndex" }, { "name": "contentLanguage", "type": "number", "optional": false, "description": "Contains the document's content language.", "typeRef": "DOMSnapshot.StringIndex" }, { "name": "encodingName", "type": "number", "optional": false, "description": "Contains the document's character set encoding.", "typeRef": "DOMSnapshot.StringIndex" }, { "name": "publicId", "type": "number", "optional": false, "description": "`DocumentType` node's publicId.", "typeRef": "DOMSnapshot.StringIndex" }, { "name": "systemId", "type": "number", "optional": false, "description": "`DocumentType` node's systemId.", "typeRef": "DOMSnapshot.StringIndex" }, { "name": "frameId", "type": "number", "optional": false, "description": "Frame ID for frame owner elements and also for the document node.", "typeRef": "DOMSnapshot.StringIndex" }, { "name": "nodes", "type": "object", "optional": false, "description": "A table with dom nodes.", "typeRef": "DOMSnapshot.NodeTreeSnapshot" }, { "name": "layout", "type": "object", "optional": false, "description": "The nodes in the layout tree.", "typeRef": "DOMSnapshot.LayoutTreeSnapshot" }, { "name": "textBoxes", "type": "object", "optional": false, "description": "The post-layout inline text nodes.", "typeRef": "DOMSnapshot.TextBoxSnapshot" }, { "name": "scrollOffsetX", "type": "number", "optional": true, "description": "Horizontal scroll offset.", "typeRef": null }, { "name": "scrollOffsetY", "type": "number", "optional": true, "description": "Vertical scroll offset.", "typeRef": null }, { "name": "contentWidth", "type": "number", "optional": true, "description": "Document content width.", "typeRef": null }, { "name": "contentHeight", "type": "number", "optional": true, "description": "Document content height.", "typeRef": null }]);
  inspectorBackend2.registerType("DOMSnapshot.NodeTreeSnapshot", [{ "name": "parentIndex", "type": "array", "optional": true, "description": "Parent node index.", "typeRef": "integer" }, { "name": "nodeType", "type": "array", "optional": true, "description": "`Node`'s nodeType.", "typeRef": "integer" }, { "name": "shadowRootType", "type": "object", "optional": true, "description": "Type of the shadow root the `Node` is in. String values are equal to the `ShadowRootType` enum.", "typeRef": "DOMSnapshot.RareStringData" }, { "name": "nodeName", "type": "array", "optional": true, "description": "`Node`'s nodeName.", "typeRef": "DOMSnapshot.StringIndex" }, { "name": "nodeValue", "type": "array", "optional": true, "description": "`Node`'s nodeValue.", "typeRef": "DOMSnapshot.StringIndex" }, { "name": "backendNodeId", "type": "array", "optional": true, "description": "`Node`'s id, corresponds to DOM.Node.backendNodeId.", "typeRef": "DOM.BackendNodeId" }, { "name": "attributes", "type": "array", "optional": true, "description": "Attributes of an `Element` node. Flatten name, value pairs.", "typeRef": "DOMSnapshot.ArrayOfStrings" }, { "name": "textValue", "type": "object", "optional": true, "description": "Only set for textarea elements, contains the text value.", "typeRef": "DOMSnapshot.RareStringData" }, { "name": "inputValue", "type": "object", "optional": true, "description": "Only set for input elements, contains the input's associated text value.", "typeRef": "DOMSnapshot.RareStringData" }, { "name": "inputChecked", "type": "object", "optional": true, "description": "Only set for radio and checkbox input elements, indicates if the element has been checked", "typeRef": "DOMSnapshot.RareBooleanData" }, { "name": "optionSelected", "type": "object", "optional": true, "description": "Only set for option elements, indicates if the element has been selected", "typeRef": "DOMSnapshot.RareBooleanData" }, { "name": "contentDocumentIndex", "type": "object", "optional": true, "description": "The index of the document in the list of the snapshot documents.", "typeRef": "DOMSnapshot.RareIntegerData" }, { "name": "pseudoType", "type": "object", "optional": true, "description": "Type of a pseudo element node.", "typeRef": "DOMSnapshot.RareStringData" }, { "name": "pseudoIdentifier", "type": "object", "optional": true, "description": "Pseudo element identifier for this node. Only present if there is a valid pseudoType.", "typeRef": "DOMSnapshot.RareStringData" }, { "name": "isClickable", "type": "object", "optional": true, "description": "Whether this DOM node responds to mouse clicks. This includes nodes that have had click event listeners attached via JavaScript as well as anchor tags that naturally navigate when clicked.", "typeRef": "DOMSnapshot.RareBooleanData" }, { "name": "currentSourceURL", "type": "object", "optional": true, "description": "The selected url for nodes with a srcset attribute.", "typeRef": "DOMSnapshot.RareStringData" }, { "name": "originURL", "type": "object", "optional": true, "description": "The url of the script (if any) that generates this node.", "typeRef": "DOMSnapshot.RareStringData" }]);
  inspectorBackend2.registerType("DOMSnapshot.LayoutTreeSnapshot", [{ "name": "nodeIndex", "type": "array", "optional": false, "description": "Index of the corresponding node in the `NodeTreeSnapshot` array returned by `captureSnapshot`.", "typeRef": "integer" }, { "name": "styles", "type": "array", "optional": false, "description": "Array of indexes specifying computed style strings, filtered according to the `computedStyles` parameter passed to `captureSnapshot`.", "typeRef": "DOMSnapshot.ArrayOfStrings" }, { "name": "bounds", "type": "array", "optional": false, "description": "The absolute position bounding box.", "typeRef": "DOMSnapshot.Rectangle" }, { "name": "text", "type": "array", "optional": false, "description": "Contents of the LayoutText, if any.", "typeRef": "DOMSnapshot.StringIndex" }, { "name": "stackingContexts", "type": "object", "optional": false, "description": "Stacking context information.", "typeRef": "DOMSnapshot.RareBooleanData" }, { "name": "paintOrders", "type": "array", "optional": true, "description": "Global paint order index, which is determined by the stacking order of the nodes. Nodes that are painted together will have the same index. Only provided if includePaintOrder in captureSnapshot was true.", "typeRef": "integer" }, { "name": "offsetRects", "type": "array", "optional": true, "description": "The offset rect of nodes. Only available when includeDOMRects is set to true", "typeRef": "DOMSnapshot.Rectangle" }, { "name": "scrollRects", "type": "array", "optional": true, "description": "The scroll rect of nodes. Only available when includeDOMRects is set to true", "typeRef": "DOMSnapshot.Rectangle" }, { "name": "clientRects", "type": "array", "optional": true, "description": "The client rect of nodes. Only available when includeDOMRects is set to true", "typeRef": "DOMSnapshot.Rectangle" }, { "name": "blendedBackgroundColors", "type": "array", "optional": true, "description": "The list of background colors that are blended with colors of overlapping elements.", "typeRef": "DOMSnapshot.StringIndex" }, { "name": "textColorOpacities", "type": "array", "optional": true, "description": "The list of computed text opacities.", "typeRef": "number" }]);
  inspectorBackend2.registerType("DOMSnapshot.TextBoxSnapshot", [{ "name": "layoutIndex", "type": "array", "optional": false, "description": "Index of the layout tree node that owns this box collection.", "typeRef": "integer" }, { "name": "bounds", "type": "array", "optional": false, "description": "The absolute position bounding box.", "typeRef": "DOMSnapshot.Rectangle" }, { "name": "start", "type": "array", "optional": false, "description": "The starting index in characters, for this post layout textbox substring. Characters that would be represented as a surrogate pair in UTF-16 have length 2.", "typeRef": "integer" }, { "name": "length", "type": "array", "optional": false, "description": "The number of characters in this post layout textbox substring. Characters that would be represented as a surrogate pair in UTF-16 have length 2.", "typeRef": "integer" }]);
  inspectorBackend2.registerEvent("DOMStorage.domStorageItemAdded", ["storageId", "key", "newValue"]);
  inspectorBackend2.registerEvent("DOMStorage.domStorageItemRemoved", ["storageId", "key"]);
  inspectorBackend2.registerEvent("DOMStorage.domStorageItemUpdated", ["storageId", "key", "oldValue", "newValue"]);
  inspectorBackend2.registerEvent("DOMStorage.domStorageItemsCleared", ["storageId"]);
  inspectorBackend2.registerCommand("DOMStorage.clear", [{ "name": "storageId", "type": "object", "optional": false, "description": "", "typeRef": "DOMStorage.StorageId" }], [], "");
  inspectorBackend2.registerCommand("DOMStorage.disable", [], [], "Disables storage tracking, prevents storage events from being sent to the client.");
  inspectorBackend2.registerCommand("DOMStorage.enable", [], [], "Enables storage tracking, storage events will now be delivered to the client.");
  inspectorBackend2.registerCommand("DOMStorage.getDOMStorageItems", [{ "name": "storageId", "type": "object", "optional": false, "description": "", "typeRef": "DOMStorage.StorageId" }], ["entries"], "");
  inspectorBackend2.registerCommand("DOMStorage.removeDOMStorageItem", [{ "name": "storageId", "type": "object", "optional": false, "description": "", "typeRef": "DOMStorage.StorageId" }, { "name": "key", "type": "string", "optional": false, "description": "", "typeRef": null }], [], "");
  inspectorBackend2.registerCommand("DOMStorage.setDOMStorageItem", [{ "name": "storageId", "type": "object", "optional": false, "description": "", "typeRef": "DOMStorage.StorageId" }, { "name": "key", "type": "string", "optional": false, "description": "", "typeRef": null }, { "name": "value", "type": "string", "optional": false, "description": "", "typeRef": null }], [], "");
  inspectorBackend2.registerType("DOMStorage.StorageId", [{ "name": "securityOrigin", "type": "string", "optional": true, "description": "Security origin for the storage.", "typeRef": null }, { "name": "storageKey", "type": "string", "optional": true, "description": "Represents a key by which DOM Storage keys its CachedStorageAreas", "typeRef": "DOMStorage.SerializedStorageKey" }, { "name": "isLocalStorage", "type": "boolean", "optional": false, "description": "Whether the storage is local storage (not session storage).", "typeRef": null }]);
  inspectorBackend2.registerType("DOMStorage.Item", [{ "name": "Item", "type": "array", "optional": false, "description": "DOM Storage item.", "typeRef": "string" }]);
  inspectorBackend2.registerEvent("DeviceAccess.deviceRequestPrompted", ["id", "devices"]);
  inspectorBackend2.registerCommand("DeviceAccess.enable", [], [], "Enable events in this domain.");
  inspectorBackend2.registerCommand("DeviceAccess.disable", [], [], "Disable events in this domain.");
  inspectorBackend2.registerCommand("DeviceAccess.selectPrompt", [{ "name": "id", "type": "string", "optional": false, "description": "", "typeRef": "DeviceAccess.RequestId" }, { "name": "deviceId", "type": "string", "optional": false, "description": "", "typeRef": "DeviceAccess.DeviceId" }], [], "Select a device in response to a DeviceAccess.deviceRequestPrompted event.");
  inspectorBackend2.registerCommand("DeviceAccess.cancelPrompt", [{ "name": "id", "type": "string", "optional": false, "description": "", "typeRef": "DeviceAccess.RequestId" }], [], "Cancel a prompt in response to a DeviceAccess.deviceRequestPrompted event.");
  inspectorBackend2.registerType("DeviceAccess.PromptDevice", [{ "name": "id", "type": "string", "optional": false, "description": "", "typeRef": "DeviceAccess.DeviceId" }, { "name": "name", "type": "string", "optional": false, "description": "Display name as it appears in a device request user prompt.", "typeRef": null }]);
  inspectorBackend2.registerCommand("DeviceOrientation.clearDeviceOrientationOverride", [], [], "Clears the overridden Device Orientation.");
  inspectorBackend2.registerCommand("DeviceOrientation.setDeviceOrientationOverride", [{ "name": "alpha", "type": "number", "optional": false, "description": "Mock alpha", "typeRef": null }, { "name": "beta", "type": "number", "optional": false, "description": "Mock beta", "typeRef": null }, { "name": "gamma", "type": "number", "optional": false, "description": "Mock gamma", "typeRef": null }], [], "Overrides the Device Orientation.");
  inspectorBackend2.registerEnum("Emulation.ScreenOrientationType", { PortraitPrimary: "portraitPrimary", PortraitSecondary: "portraitSecondary", LandscapePrimary: "landscapePrimary", LandscapeSecondary: "landscapeSecondary" });
  inspectorBackend2.registerEnum("Emulation.DisplayFeatureOrientation", { Vertical: "vertical", Horizontal: "horizontal" });
  inspectorBackend2.registerEnum("Emulation.DevicePostureType", { Continuous: "continuous", Folded: "folded" });
  inspectorBackend2.registerEnum("Emulation.VirtualTimePolicy", { Advance: "advance", Pause: "pause", PauseIfNetworkFetchesPending: "pauseIfNetworkFetchesPending" });
  inspectorBackend2.registerEnum("Emulation.SensorType", { AbsoluteOrientation: "absolute-orientation", Accelerometer: "accelerometer", AmbientLight: "ambient-light", Gravity: "gravity", Gyroscope: "gyroscope", LinearAcceleration: "linear-acceleration", Magnetometer: "magnetometer", RelativeOrientation: "relative-orientation" });
  inspectorBackend2.registerEnum("Emulation.PressureSource", { Cpu: "cpu" });
  inspectorBackend2.registerEnum("Emulation.PressureState", { Nominal: "nominal", Fair: "fair", Serious: "serious", Critical: "critical" });
  inspectorBackend2.registerEnum("Emulation.DisabledImageType", { Avif: "avif", Jxl: "jxl", Webp: "webp" });
  inspectorBackend2.registerEvent("Emulation.virtualTimeBudgetExpired", []);
  inspectorBackend2.registerEvent("Emulation.screenOrientationLockChanged", ["locked", "orientation"]);
  inspectorBackend2.registerCommand("Emulation.canEmulate", [], ["result"], "Tells whether emulation is supported.");
  inspectorBackend2.registerCommand("Emulation.clearDeviceMetricsOverride", [], [], "Clears the overridden device metrics.");
  inspectorBackend2.registerCommand("Emulation.clearGeolocationOverride", [], [], "Clears the overridden Geolocation Position and Error.");
  inspectorBackend2.registerCommand("Emulation.resetPageScaleFactor", [], [], "Requests that page scale factor is reset to initial values.");
  inspectorBackend2.registerCommand("Emulation.setFocusEmulationEnabled", [{ "name": "enabled", "type": "boolean", "optional": false, "description": "Whether to enable to disable focus emulation.", "typeRef": null }], [], "Enables or disables simulating a focused and active page.");
  inspectorBackend2.registerCommand("Emulation.setAutoDarkModeOverride", [{ "name": "enabled", "type": "boolean", "optional": true, "description": "Whether to enable or disable automatic dark mode. If not specified, any existing override will be cleared.", "typeRef": null }], [], "Automatically render all web contents using a dark theme.");
  inspectorBackend2.registerCommand("Emulation.setCPUThrottlingRate", [{ "name": "rate", "type": "number", "optional": false, "description": "Throttling rate as a slowdown factor (1 is no throttle, 2 is 2x slowdown, etc).", "typeRef": null }], [], "Enables CPU throttling to emulate slow CPUs.");
  inspectorBackend2.registerCommand("Emulation.setDefaultBackgroundColorOverride", [{ "name": "color", "type": "object", "optional": true, "description": "RGBA of the default background color. If not specified, any existing override will be cleared.", "typeRef": "DOM.RGBA" }], [], "Sets or clears an override of the default background color of the frame. This override is used if the content does not specify one.");
  inspectorBackend2.registerCommand("Emulation.setSafeAreaInsetsOverride", [{ "name": "insets", "type": "object", "optional": false, "description": "", "typeRef": "Emulation.SafeAreaInsets" }], [], "Overrides the values for env(safe-area-inset-*) and env(safe-area-max-inset-*). Unset values will cause the respective variables to be undefined, even if previously overridden.");
  inspectorBackend2.registerEnum("Emulation.SetDeviceMetricsOverrideRequestScrollbarType", { Overlay: "overlay", Default: "default" });
  inspectorBackend2.registerCommand("Emulation.setDeviceMetricsOverride", [{ "name": "width", "type": "number", "optional": false, "description": "Overriding width value in pixels (minimum 0, maximum 10000000). 0 disables the override.", "typeRef": null }, { "name": "height", "type": "number", "optional": false, "description": "Overriding height value in pixels (minimum 0, maximum 10000000). 0 disables the override.", "typeRef": null }, { "name": "deviceScaleFactor", "type": "number", "optional": false, "description": "Overriding device scale factor value. 0 disables the override.", "typeRef": null }, { "name": "mobile", "type": "boolean", "optional": false, "description": "Whether to emulate mobile device. This includes viewport meta tag, overlay scrollbars, text autosizing and more.", "typeRef": null }, { "name": "scale", "type": "number", "optional": true, "description": "Scale to apply to resulting view image.", "typeRef": null }, { "name": "screenWidth", "type": "number", "optional": true, "description": "Overriding screen width value in pixels (minimum 0, maximum 10000000).", "typeRef": null }, { "name": "screenHeight", "type": "number", "optional": true, "description": "Overriding screen height value in pixels (minimum 0, maximum 10000000).", "typeRef": null }, { "name": "positionX", "type": "number", "optional": true, "description": "Overriding view X position on screen in pixels (minimum 0, maximum 10000000).", "typeRef": null }, { "name": "positionY", "type": "number", "optional": true, "description": "Overriding view Y position on screen in pixels (minimum 0, maximum 10000000).", "typeRef": null }, { "name": "dontSetVisibleSize", "type": "boolean", "optional": true, "description": "Do not set visible view size, rely upon explicit setVisibleSize call.", "typeRef": null }, { "name": "screenOrientation", "type": "object", "optional": true, "description": "Screen orientation override.", "typeRef": "Emulation.ScreenOrientation" }, { "name": "viewport", "type": "object", "optional": true, "description": "If set, the visible area of the page will be overridden to this viewport. This viewport change is not observed by the page, e.g. viewport-relative elements do not change positions.", "typeRef": "Page.Viewport" }, { "name": "displayFeature", "type": "object", "optional": true, "description": "If set, the display feature of a multi-segment screen. If not set, multi-segment support is turned-off. Deprecated, use Emulation.setDisplayFeaturesOverride.", "typeRef": "Emulation.DisplayFeature" }, { "name": "devicePosture", "type": "object", "optional": true, "description": "If set, the posture of a foldable device. If not set the posture is set to continuous. Deprecated, use Emulation.setDevicePostureOverride.", "typeRef": "Emulation.DevicePosture" }, { "name": "scrollbarType", "type": "string", "optional": true, "description": "Scrollbar type. Default: `default`.", "typeRef": "Emulation.SetDeviceMetricsOverrideRequestScrollbarType" }], [], 'Overrides the values of device screen dimensions (window.screen.width, window.screen.height, window.innerWidth, window.innerHeight, and "device-width"/"device-height"-related CSS media query results).');
  inspectorBackend2.registerCommand("Emulation.setDevicePostureOverride", [{ "name": "posture", "type": "object", "optional": false, "description": "", "typeRef": "Emulation.DevicePosture" }], [], "Start reporting the given posture value to the Device Posture API. This override can also be set in setDeviceMetricsOverride().");
  inspectorBackend2.registerCommand("Emulation.clearDevicePostureOverride", [], [], "Clears a device posture override set with either setDeviceMetricsOverride() or setDevicePostureOverride() and starts using posture information from the platform again. Does nothing if no override is set.");
  inspectorBackend2.registerCommand("Emulation.setDisplayFeaturesOverride", [{ "name": "features", "type": "array", "optional": false, "description": "", "typeRef": "Emulation.DisplayFeature" }], [], "Start using the given display features to pupulate the Viewport Segments API. This override can also be set in setDeviceMetricsOverride().");
  inspectorBackend2.registerCommand("Emulation.clearDisplayFeaturesOverride", [], [], "Clears the display features override set with either setDeviceMetricsOverride() or setDisplayFeaturesOverride() and starts using display features from the platform again. Does nothing if no override is set.");
  inspectorBackend2.registerCommand("Emulation.setScrollbarsHidden", [{ "name": "hidden", "type": "boolean", "optional": false, "description": "Whether scrollbars should be always hidden.", "typeRef": null }], [], "");
  inspectorBackend2.registerCommand("Emulation.setDocumentCookieDisabled", [{ "name": "disabled", "type": "boolean", "optional": false, "description": "Whether document.coookie API should be disabled.", "typeRef": null }], [], "");
  inspectorBackend2.registerEnum("Emulation.SetEmitTouchEventsForMouseRequestConfiguration", { Mobile: "mobile", Desktop: "desktop" });
  inspectorBackend2.registerCommand("Emulation.setEmitTouchEventsForMouse", [{ "name": "enabled", "type": "boolean", "optional": false, "description": "Whether touch emulation based on mouse input should be enabled.", "typeRef": null }, { "name": "configuration", "type": "string", "optional": true, "description": "Touch/gesture events configuration. Default: current platform.", "typeRef": "Emulation.SetEmitTouchEventsForMouseRequestConfiguration" }], [], "");
  inspectorBackend2.registerCommand("Emulation.setEmulatedMedia", [{ "name": "media", "type": "string", "optional": true, "description": "Media type to emulate. Empty string disables the override.", "typeRef": null }, { "name": "features", "type": "array", "optional": true, "description": "Media features to emulate.", "typeRef": "Emulation.MediaFeature" }], [], "Emulates the given media type or media feature for CSS media queries.");
  inspectorBackend2.registerEnum("Emulation.SetEmulatedVisionDeficiencyRequestType", { None: "none", BlurredVision: "blurredVision", ReducedContrast: "reducedContrast", Achromatopsia: "achromatopsia", Deuteranopia: "deuteranopia", Protanopia: "protanopia", Tritanopia: "tritanopia" });
  inspectorBackend2.registerCommand("Emulation.setEmulatedVisionDeficiency", [{ "name": "type", "type": "string", "optional": false, "description": "Vision deficiency to emulate. Order: best-effort emulations come first, followed by any physiologically accurate emulations for medically recognized color vision deficiencies.", "typeRef": "Emulation.SetEmulatedVisionDeficiencyRequestType" }], [], "Emulates the given vision deficiency.");
  inspectorBackend2.registerCommand("Emulation.setEmulatedOSTextScale", [{ "name": "scale", "type": "number", "optional": true, "description": "", "typeRef": null }], [], "Emulates the given OS text scale.");
  inspectorBackend2.registerCommand("Emulation.setGeolocationOverride", [{ "name": "latitude", "type": "number", "optional": true, "description": "Mock latitude", "typeRef": null }, { "name": "longitude", "type": "number", "optional": true, "description": "Mock longitude", "typeRef": null }, { "name": "accuracy", "type": "number", "optional": true, "description": "Mock accuracy", "typeRef": null }, { "name": "altitude", "type": "number", "optional": true, "description": "Mock altitude", "typeRef": null }, { "name": "altitudeAccuracy", "type": "number", "optional": true, "description": "Mock altitudeAccuracy", "typeRef": null }, { "name": "heading", "type": "number", "optional": true, "description": "Mock heading", "typeRef": null }, { "name": "speed", "type": "number", "optional": true, "description": "Mock speed", "typeRef": null }], [], "Overrides the Geolocation Position or Error. Omitting latitude, longitude or accuracy emulates position unavailable.");
  inspectorBackend2.registerCommand("Emulation.getOverriddenSensorInformation", [{ "name": "type", "type": "string", "optional": false, "description": "", "typeRef": "Emulation.SensorType" }], ["requestedSamplingFrequency"], "");
  inspectorBackend2.registerCommand("Emulation.setSensorOverrideEnabled", [{ "name": "enabled", "type": "boolean", "optional": false, "description": "", "typeRef": null }, { "name": "type", "type": "string", "optional": false, "description": "", "typeRef": "Emulation.SensorType" }, { "name": "metadata", "type": "object", "optional": true, "description": "", "typeRef": "Emulation.SensorMetadata" }], [], "Overrides a platform sensor of a given type. If |enabled| is true, calls to Sensor.start() will use a virtual sensor as backend rather than fetching data from a real hardware sensor. Otherwise, existing virtual sensor-backend Sensor objects will fire an error event and new calls to Sensor.start() will attempt to use a real sensor instead.");
  inspectorBackend2.registerCommand("Emulation.setSensorOverrideReadings", [{ "name": "type", "type": "string", "optional": false, "description": "", "typeRef": "Emulation.SensorType" }, { "name": "reading", "type": "object", "optional": false, "description": "", "typeRef": "Emulation.SensorReading" }], [], "Updates the sensor readings reported by a sensor type previously overridden by setSensorOverrideEnabled.");
  inspectorBackend2.registerCommand("Emulation.setPressureSourceOverrideEnabled", [{ "name": "enabled", "type": "boolean", "optional": false, "description": "", "typeRef": null }, { "name": "source", "type": "string", "optional": false, "description": "", "typeRef": "Emulation.PressureSource" }, { "name": "metadata", "type": "object", "optional": true, "description": "", "typeRef": "Emulation.PressureMetadata" }], [], "Overrides a pressure source of a given type, as used by the Compute Pressure API, so that updates to PressureObserver.observe() are provided via setPressureStateOverride instead of being retrieved from platform-provided telemetry data.");
  inspectorBackend2.registerCommand("Emulation.setPressureStateOverride", [{ "name": "source", "type": "string", "optional": false, "description": "", "typeRef": "Emulation.PressureSource" }, { "name": "state", "type": "string", "optional": false, "description": "", "typeRef": "Emulation.PressureState" }], [], "TODO: OBSOLETE: To remove when setPressureDataOverride is merged. Provides a given pressure state that will be processed and eventually be delivered to PressureObserver users. |source| must have been previously overridden by setPressureSourceOverrideEnabled.");
  inspectorBackend2.registerCommand("Emulation.setPressureDataOverride", [{ "name": "source", "type": "string", "optional": false, "description": "", "typeRef": "Emulation.PressureSource" }, { "name": "state", "type": "string", "optional": false, "description": "", "typeRef": "Emulation.PressureState" }, { "name": "ownContributionEstimate", "type": "number", "optional": true, "description": "", "typeRef": null }], [], "Provides a given pressure data set that will be processed and eventually be delivered to PressureObserver users. |source| must have been previously overridden by setPressureSourceOverrideEnabled.");
  inspectorBackend2.registerCommand("Emulation.setIdleOverride", [{ "name": "isUserActive", "type": "boolean", "optional": false, "description": "Mock isUserActive", "typeRef": null }, { "name": "isScreenUnlocked", "type": "boolean", "optional": false, "description": "Mock isScreenUnlocked", "typeRef": null }], [], "Overrides the Idle state.");
  inspectorBackend2.registerCommand("Emulation.clearIdleOverride", [], [], "Clears Idle state overrides.");
  inspectorBackend2.registerCommand("Emulation.setNavigatorOverrides", [{ "name": "platform", "type": "string", "optional": false, "description": "The platform navigator.platform should return.", "typeRef": null }], [], "Overrides value returned by the javascript navigator object.");
  inspectorBackend2.registerCommand("Emulation.setPageScaleFactor", [{ "name": "pageScaleFactor", "type": "number", "optional": false, "description": "Page scale factor.", "typeRef": null }], [], "Sets a specified page scale factor.");
  inspectorBackend2.registerCommand("Emulation.setScriptExecutionDisabled", [{ "name": "value", "type": "boolean", "optional": false, "description": "Whether script execution should be disabled in the page.", "typeRef": null }], [], "Switches script execution in the page.");
  inspectorBackend2.registerCommand("Emulation.setTouchEmulationEnabled", [{ "name": "enabled", "type": "boolean", "optional": false, "description": "Whether the touch event emulation should be enabled.", "typeRef": null }, { "name": "maxTouchPoints", "type": "number", "optional": true, "description": "Maximum touch points supported. Defaults to one.", "typeRef": null }], [], "Enables touch on platforms which do not support them.");
  inspectorBackend2.registerCommand("Emulation.setVirtualTimePolicy", [{ "name": "policy", "type": "string", "optional": false, "description": "", "typeRef": "Emulation.VirtualTimePolicy" }, { "name": "budget", "type": "number", "optional": true, "description": "If set, after this many virtual milliseconds have elapsed virtual time will be paused and a virtualTimeBudgetExpired event is sent.", "typeRef": null }, { "name": "maxVirtualTimeTaskStarvationCount", "type": "number", "optional": true, "description": "If set this specifies the maximum number of tasks that can be run before virtual is forced forwards to prevent deadlock.", "typeRef": null }, { "name": "initialVirtualTime", "type": "number", "optional": true, "description": "If set, base::Time::Now will be overridden to initially return this value.", "typeRef": "Network.TimeSinceEpoch" }], ["virtualTimeTicksBase"], "Turns on virtual time for all frames (replacing real-time with a synthetic time source) and sets the current virtual time policy.  Note this supersedes any previous time budget.");
  inspectorBackend2.registerCommand("Emulation.setLocaleOverride", [{ "name": "locale", "type": "string", "optional": true, "description": 'ICU style C locale (e.g. \\"en_US\\"). If not specified or empty, disables the override and restores default host system locale.', "typeRef": null }], [], "Overrides default host system locale with the specified one.");
  inspectorBackend2.registerCommand("Emulation.setTimezoneOverride", [{ "name": "timezoneId", "type": "string", "optional": false, "description": "The timezone identifier. List of supported timezones: https://source.chromium.org/chromium/chromium/deps/icu.git/+/faee8bc70570192d82d2978a71e2a615788597d1:source/data/misc/metaZones.txt If empty, disables the override and restores default host system timezone.", "typeRef": null }], [], "Overrides default host system timezone with the specified one.");
  inspectorBackend2.registerCommand("Emulation.setVisibleSize", [{ "name": "width", "type": "number", "optional": false, "description": "Frame width (DIP).", "typeRef": null }, { "name": "height", "type": "number", "optional": false, "description": "Frame height (DIP).", "typeRef": null }], [], "Resizes the frame/viewport of the page. Note that this does not affect the frame's container (e.g. browser window). Can be used to produce screenshots of the specified size. Not supported on Android.");
  inspectorBackend2.registerCommand("Emulation.setDisabledImageTypes", [{ "name": "imageTypes", "type": "array", "optional": false, "description": "Image types to disable.", "typeRef": "Emulation.DisabledImageType" }], [], "");
  inspectorBackend2.registerCommand("Emulation.setDataSaverOverride", [{ "name": "dataSaverEnabled", "type": "boolean", "optional": true, "description": "Override value. Omitting the parameter disables the override.", "typeRef": null }], [], "Override the value of navigator.connection.saveData");
  inspectorBackend2.registerCommand("Emulation.setHardwareConcurrencyOverride", [{ "name": "hardwareConcurrency", "type": "number", "optional": false, "description": "Hardware concurrency to report", "typeRef": null }], [], "");
  inspectorBackend2.registerCommand("Emulation.setUserAgentOverride", [{ "name": "userAgent", "type": "string", "optional": false, "description": "User agent to use.", "typeRef": null }, { "name": "acceptLanguage", "type": "string", "optional": true, "description": "Browser language to emulate.", "typeRef": null }, { "name": "platform", "type": "string", "optional": true, "description": "The platform navigator.platform should return.", "typeRef": null }, { "name": "userAgentMetadata", "type": "object", "optional": true, "description": "To be sent in Sec-CH-UA-* headers and returned in navigator.userAgentData", "typeRef": "Emulation.UserAgentMetadata" }], [], "Allows overriding user agent with the given string. `userAgentMetadata` must be set for Client Hint headers to be sent.");
  inspectorBackend2.registerCommand("Emulation.setAutomationOverride", [{ "name": "enabled", "type": "boolean", "optional": false, "description": "Whether the override should be enabled.", "typeRef": null }], [], "Allows overriding the automation flag.");
  inspectorBackend2.registerCommand("Emulation.setSmallViewportHeightDifferenceOverride", [{ "name": "difference", "type": "number", "optional": false, "description": "This will cause an element of size 100svh to be `difference` pixels smaller than an element of size 100lvh.", "typeRef": null }], [], "Allows overriding the difference between the small and large viewport sizes, which determine the value of the `svh` and `lvh` unit, respectively. Only supported for top-level frames.");
  inspectorBackend2.registerCommand("Emulation.getScreenInfos", [], ["screenInfos"], "Returns device's screen configuration. In headful mode, the physical screens configuration is returned, whereas in headless mode, a virtual headless screen configuration is provided instead.");
  inspectorBackend2.registerCommand("Emulation.addScreen", [{ "name": "left", "type": "number", "optional": false, "description": "Offset of the left edge of the screen in pixels.", "typeRef": null }, { "name": "top", "type": "number", "optional": false, "description": "Offset of the top edge of the screen in pixels.", "typeRef": null }, { "name": "width", "type": "number", "optional": false, "description": "The width of the screen in pixels.", "typeRef": null }, { "name": "height", "type": "number", "optional": false, "description": "The height of the screen in pixels.", "typeRef": null }, { "name": "workAreaInsets", "type": "object", "optional": true, "description": "Specifies the screen's work area. Default is entire screen.", "typeRef": "Emulation.WorkAreaInsets" }, { "name": "devicePixelRatio", "type": "number", "optional": true, "description": "Specifies the screen's device pixel ratio. Default is 1.", "typeRef": null }, { "name": "rotation", "type": "number", "optional": true, "description": "Specifies the screen's rotation angle. Available values are 0, 90, 180 and 270. Default is 0.", "typeRef": null }, { "name": "colorDepth", "type": "number", "optional": true, "description": "Specifies the screen's color depth in bits. Default is 24.", "typeRef": null }, { "name": "label", "type": "string", "optional": true, "description": "Specifies the descriptive label for the screen. Default is none.", "typeRef": null }, { "name": "isInternal", "type": "boolean", "optional": true, "description": "Indicates whether the screen is internal to the device or external, attached to the device. Default is false.", "typeRef": null }], ["screenInfo"], "Add a new screen to the device. Only supported in headless mode.");
  inspectorBackend2.registerCommand("Emulation.removeScreen", [{ "name": "screenId", "type": "string", "optional": false, "description": "", "typeRef": "Emulation.ScreenId" }], [], "Remove screen from the device. Only supported in headless mode.");
  inspectorBackend2.registerCommand("Emulation.setPrimaryScreen", [{ "name": "screenId", "type": "string", "optional": false, "description": "", "typeRef": "Emulation.ScreenId" }], [], "Set primary screen. Only supported in headless mode. Note that this changes the coordinate system origin to the top-left of the new primary screen, updating the bounds and work areas of all existing screens accordingly.");
  inspectorBackend2.registerType("Emulation.SafeAreaInsets", [{ "name": "top", "type": "number", "optional": true, "description": "Overrides safe-area-inset-top.", "typeRef": null }, { "name": "topMax", "type": "number", "optional": true, "description": "Overrides safe-area-max-inset-top.", "typeRef": null }, { "name": "left", "type": "number", "optional": true, "description": "Overrides safe-area-inset-left.", "typeRef": null }, { "name": "leftMax", "type": "number", "optional": true, "description": "Overrides safe-area-max-inset-left.", "typeRef": null }, { "name": "bottom", "type": "number", "optional": true, "description": "Overrides safe-area-inset-bottom.", "typeRef": null }, { "name": "bottomMax", "type": "number", "optional": true, "description": "Overrides safe-area-max-inset-bottom.", "typeRef": null }, { "name": "right", "type": "number", "optional": true, "description": "Overrides safe-area-inset-right.", "typeRef": null }, { "name": "rightMax", "type": "number", "optional": true, "description": "Overrides safe-area-max-inset-right.", "typeRef": null }]);
  inspectorBackend2.registerType("Emulation.ScreenOrientation", [{ "name": "type", "type": "string", "optional": false, "description": "Orientation type.", "typeRef": null }, { "name": "angle", "type": "number", "optional": false, "description": "Orientation angle.", "typeRef": null }]);
  inspectorBackend2.registerType("Emulation.DisplayFeature", [{ "name": "orientation", "type": "string", "optional": false, "description": "Orientation of a display feature in relation to screen", "typeRef": null }, { "name": "offset", "type": "number", "optional": false, "description": "The offset from the screen origin in either the x (for vertical orientation) or y (for horizontal orientation) direction.", "typeRef": null }, { "name": "maskLength", "type": "number", "optional": false, "description": "A display feature may mask content such that it is not physically displayed - this length along with the offset describes this area. A display feature that only splits content will have a 0 mask_length.", "typeRef": null }]);
  inspectorBackend2.registerType("Emulation.DevicePosture", [{ "name": "type", "type": "string", "optional": false, "description": "Current posture of the device", "typeRef": null }]);
  inspectorBackend2.registerType("Emulation.MediaFeature", [{ "name": "name", "type": "string", "optional": false, "description": "", "typeRef": null }, { "name": "value", "type": "string", "optional": false, "description": "", "typeRef": null }]);
  inspectorBackend2.registerType("Emulation.UserAgentBrandVersion", [{ "name": "brand", "type": "string", "optional": false, "description": "", "typeRef": null }, { "name": "version", "type": "string", "optional": false, "description": "", "typeRef": null }]);
  inspectorBackend2.registerType("Emulation.UserAgentMetadata", [{ "name": "brands", "type": "array", "optional": true, "description": "Brands appearing in Sec-CH-UA.", "typeRef": "Emulation.UserAgentBrandVersion" }, { "name": "fullVersionList", "type": "array", "optional": true, "description": "Brands appearing in Sec-CH-UA-Full-Version-List.", "typeRef": "Emulation.UserAgentBrandVersion" }, { "name": "fullVersion", "type": "string", "optional": true, "description": "", "typeRef": null }, { "name": "platform", "type": "string", "optional": false, "description": "", "typeRef": null }, { "name": "platformVersion", "type": "string", "optional": false, "description": "", "typeRef": null }, { "name": "architecture", "type": "string", "optional": false, "description": "", "typeRef": null }, { "name": "model", "type": "string", "optional": false, "description": "", "typeRef": null }, { "name": "mobile", "type": "boolean", "optional": false, "description": "", "typeRef": null }, { "name": "bitness", "type": "string", "optional": true, "description": "", "typeRef": null }, { "name": "wow64", "type": "boolean", "optional": true, "description": "", "typeRef": null }, { "name": "formFactors", "type": "array", "optional": true, "description": "Used to specify User Agent form-factor values. See https://wicg.github.io/ua-client-hints/#sec-ch-ua-form-factors", "typeRef": "string" }]);
  inspectorBackend2.registerType("Emulation.SensorMetadata", [{ "name": "available", "type": "boolean", "optional": true, "description": "", "typeRef": null }, { "name": "minimumFrequency", "type": "number", "optional": true, "description": "", "typeRef": null }, { "name": "maximumFrequency", "type": "number", "optional": true, "description": "", "typeRef": null }]);
  inspectorBackend2.registerType("Emulation.SensorReadingSingle", [{ "name": "value", "type": "number", "optional": false, "description": "", "typeRef": null }]);
  inspectorBackend2.registerType("Emulation.SensorReadingXYZ", [{ "name": "x", "type": "number", "optional": false, "description": "", "typeRef": null }, { "name": "y", "type": "number", "optional": false, "description": "", "typeRef": null }, { "name": "z", "type": "number", "optional": false, "description": "", "typeRef": null }]);
  inspectorBackend2.registerType("Emulation.SensorReadingQuaternion", [{ "name": "x", "type": "number", "optional": false, "description": "", "typeRef": null }, { "name": "y", "type": "number", "optional": false, "description": "", "typeRef": null }, { "name": "z", "type": "number", "optional": false, "description": "", "typeRef": null }, { "name": "w", "type": "number", "optional": false, "description": "", "typeRef": null }]);
  inspectorBackend2.registerType("Emulation.SensorReading", [{ "name": "single", "type": "object", "optional": true, "description": "", "typeRef": "Emulation.SensorReadingSingle" }, { "name": "xyz", "type": "object", "optional": true, "description": "", "typeRef": "Emulation.SensorReadingXYZ" }, { "name": "quaternion", "type": "object", "optional": true, "description": "", "typeRef": "Emulation.SensorReadingQuaternion" }]);
  inspectorBackend2.registerType("Emulation.PressureMetadata", [{ "name": "available", "type": "boolean", "optional": true, "description": "", "typeRef": null }]);
  inspectorBackend2.registerType("Emulation.WorkAreaInsets", [{ "name": "top", "type": "number", "optional": true, "description": "Work area top inset in pixels. Default is 0;", "typeRef": null }, { "name": "left", "type": "number", "optional": true, "description": "Work area left inset in pixels. Default is 0;", "typeRef": null }, { "name": "bottom", "type": "number", "optional": true, "description": "Work area bottom inset in pixels. Default is 0;", "typeRef": null }, { "name": "right", "type": "number", "optional": true, "description": "Work area right inset in pixels. Default is 0;", "typeRef": null }]);
  inspectorBackend2.registerType("Emulation.ScreenInfo", [{ "name": "left", "type": "number", "optional": false, "description": "Offset of the left edge of the screen.", "typeRef": null }, { "name": "top", "type": "number", "optional": false, "description": "Offset of the top edge of the screen.", "typeRef": null }, { "name": "width", "type": "number", "optional": false, "description": "Width of the screen.", "typeRef": null }, { "name": "height", "type": "number", "optional": false, "description": "Height of the screen.", "typeRef": null }, { "name": "availLeft", "type": "number", "optional": false, "description": "Offset of the left edge of the available screen area.", "typeRef": null }, { "name": "availTop", "type": "number", "optional": false, "description": "Offset of the top edge of the available screen area.", "typeRef": null }, { "name": "availWidth", "type": "number", "optional": false, "description": "Width of the available screen area.", "typeRef": null }, { "name": "availHeight", "type": "number", "optional": false, "description": "Height of the available screen area.", "typeRef": null }, { "name": "devicePixelRatio", "type": "number", "optional": false, "description": "Specifies the screen's device pixel ratio.", "typeRef": null }, { "name": "orientation", "type": "object", "optional": false, "description": "Specifies the screen's orientation.", "typeRef": "Emulation.ScreenOrientation" }, { "name": "colorDepth", "type": "number", "optional": false, "description": "Specifies the screen's color depth in bits.", "typeRef": null }, { "name": "isExtended", "type": "boolean", "optional": false, "description": "Indicates whether the device has multiple screens.", "typeRef": null }, { "name": "isInternal", "type": "boolean", "optional": false, "description": "Indicates whether the screen is internal to the device or external, attached to the device.", "typeRef": null }, { "name": "isPrimary", "type": "boolean", "optional": false, "description": "Indicates whether the screen is set as the the operating system primary screen.", "typeRef": null }, { "name": "label", "type": "string", "optional": false, "description": "Specifies the descriptive label for the screen.", "typeRef": null }, { "name": "id", "type": "string", "optional": false, "description": "Specifies the unique identifier of the screen.", "typeRef": "Emulation.ScreenId" }]);
  inspectorBackend2.registerCommand("EventBreakpoints.setInstrumentationBreakpoint", [{ "name": "eventName", "type": "string", "optional": false, "description": "Instrumentation name to stop on.", "typeRef": null }], [], "Sets breakpoint on particular native event.");
  inspectorBackend2.registerCommand("EventBreakpoints.removeInstrumentationBreakpoint", [{ "name": "eventName", "type": "string", "optional": false, "description": "Instrumentation name to stop on.", "typeRef": null }], [], "Removes breakpoint on particular native event.");
  inspectorBackend2.registerCommand("EventBreakpoints.disable", [], [], "Removes all breakpoints");
  inspectorBackend2.registerEnum("Extensions.StorageArea", { Session: "session", Local: "local", Sync: "sync", Managed: "managed" });
  inspectorBackend2.registerCommand("Extensions.triggerAction", [{ "name": "id", "type": "string", "optional": false, "description": "Extension id.", "typeRef": null }, { "name": "targetId", "type": "string", "optional": false, "description": "A tab target ID to trigger the default extension action on.", "typeRef": null }], [], "Runs an extension default action. Available if the client is connected using the --remote-debugging-pipe flag and the --enable-unsafe-extension-debugging flag is set.");
  inspectorBackend2.registerCommand("Extensions.loadUnpacked", [{ "name": "path", "type": "string", "optional": false, "description": "Absolute file path.", "typeRef": null }, { "name": "enableInIncognito", "type": "boolean", "optional": true, "description": "Enable the extension in incognito", "typeRef": null }], ["id"], "Installs an unpacked extension from the filesystem similar to --load-extension CLI flags. Returns extension ID once the extension has been installed. Available if the client is connected using the --remote-debugging-pipe flag and the --enable-unsafe-extension-debugging flag is set.");
  inspectorBackend2.registerCommand("Extensions.getExtensions", [], ["extensions"], "Gets a list of all unpacked extensions. Available if the client is connected using the --remote-debugging-pipe flag and the --enable-unsafe-extension-debugging flag is set.");
  inspectorBackend2.registerCommand("Extensions.uninstall", [{ "name": "id", "type": "string", "optional": false, "description": "Extension id.", "typeRef": null }], [], "Uninstalls an unpacked extension (others not supported) from the profile. Available if the client is connected using the --remote-debugging-pipe flag and the --enable-unsafe-extension-debugging.");
  inspectorBackend2.registerCommand("Extensions.getStorageItems", [{ "name": "id", "type": "string", "optional": false, "description": "ID of extension.", "typeRef": null }, { "name": "storageArea", "type": "string", "optional": false, "description": "StorageArea to retrieve data from.", "typeRef": "Extensions.StorageArea" }, { "name": "keys", "type": "array", "optional": true, "description": "Keys to retrieve.", "typeRef": "string" }], ["data"], "Gets data from extension storage in the given `storageArea`. If `keys` is specified, these are used to filter the result.");
  inspectorBackend2.registerCommand("Extensions.removeStorageItems", [{ "name": "id", "type": "string", "optional": false, "description": "ID of extension.", "typeRef": null }, { "name": "storageArea", "type": "string", "optional": false, "description": "StorageArea to remove data from.", "typeRef": "Extensions.StorageArea" }, { "name": "keys", "type": "array", "optional": false, "description": "Keys to remove.", "typeRef": "string" }], [], "Removes `keys` from extension storage in the given `storageArea`.");
  inspectorBackend2.registerCommand("Extensions.clearStorageItems", [{ "name": "id", "type": "string", "optional": false, "description": "ID of extension.", "typeRef": null }, { "name": "storageArea", "type": "string", "optional": false, "description": "StorageArea to remove data from.", "typeRef": "Extensions.StorageArea" }], [], "Clears extension storage in the given `storageArea`.");
  inspectorBackend2.registerCommand("Extensions.setStorageItems", [{ "name": "id", "type": "string", "optional": false, "description": "ID of extension.", "typeRef": null }, { "name": "storageArea", "type": "string", "optional": false, "description": "StorageArea to set data in.", "typeRef": "Extensions.StorageArea" }, { "name": "values", "type": "object", "optional": false, "description": "Values to set.", "typeRef": null }], [], "Sets `values` in extension storage in the given `storageArea`. The provided `values` will be merged with existing values in the storage area.");
  inspectorBackend2.registerType("Extensions.ExtensionInfo", [{ "name": "id", "type": "string", "optional": false, "description": "Extension id.", "typeRef": null }, { "name": "name", "type": "string", "optional": false, "description": "Extension name.", "typeRef": null }, { "name": "version", "type": "string", "optional": false, "description": "Extension version.", "typeRef": null }, { "name": "path", "type": "string", "optional": false, "description": "The path from which the extension was loaded.", "typeRef": null }, { "name": "enabled", "type": "boolean", "optional": false, "description": "Extension enabled status.", "typeRef": null }]);
  inspectorBackend2.registerEnum("FedCm.LoginState", { SignIn: "SignIn", SignUp: "SignUp" });
  inspectorBackend2.registerEnum("FedCm.DialogType", { AccountChooser: "AccountChooser", AutoReauthn: "AutoReauthn", ConfirmIdpLogin: "ConfirmIdpLogin", Error: "Error" });
  inspectorBackend2.registerEnum("FedCm.DialogButton", { ConfirmIdpLoginContinue: "ConfirmIdpLoginContinue", ErrorGotIt: "ErrorGotIt", ErrorMoreDetails: "ErrorMoreDetails" });
  inspectorBackend2.registerEnum("FedCm.AccountUrlType", { TermsOfService: "TermsOfService", PrivacyPolicy: "PrivacyPolicy" });
  inspectorBackend2.registerEvent("FedCm.dialogShown", ["dialogId", "dialogType", "accounts", "title", "subtitle"]);
  inspectorBackend2.registerEvent("FedCm.dialogClosed", ["dialogId"]);
  inspectorBackend2.registerCommand("FedCm.enable", [{ "name": "disableRejectionDelay", "type": "boolean", "optional": true, "description": "Allows callers to disable the promise rejection delay that would normally happen, if this is unimportant to what's being tested. (step 4 of https://fedidcg.github.io/FedCM/#browser-api-rp-sign-in)", "typeRef": null }], [], "");
  inspectorBackend2.registerCommand("FedCm.disable", [], [], "");
  inspectorBackend2.registerCommand("FedCm.selectAccount", [{ "name": "dialogId", "type": "string", "optional": false, "description": "", "typeRef": null }, { "name": "accountIndex", "type": "number", "optional": false, "description": "", "typeRef": null }], [], "");
  inspectorBackend2.registerCommand("FedCm.clickDialogButton", [{ "name": "dialogId", "type": "string", "optional": false, "description": "", "typeRef": null }, { "name": "dialogButton", "type": "string", "optional": false, "description": "", "typeRef": "FedCm.DialogButton" }], [], "");
  inspectorBackend2.registerCommand("FedCm.openUrl", [{ "name": "dialogId", "type": "string", "optional": false, "description": "", "typeRef": null }, { "name": "accountIndex", "type": "number", "optional": false, "description": "", "typeRef": null }, { "name": "accountUrlType", "type": "string", "optional": false, "description": "", "typeRef": "FedCm.AccountUrlType" }], [], "");
  inspectorBackend2.registerCommand("FedCm.dismissDialog", [{ "name": "dialogId", "type": "string", "optional": false, "description": "", "typeRef": null }, { "name": "triggerCooldown", "type": "boolean", "optional": true, "description": "", "typeRef": null }], [], "");
  inspectorBackend2.registerCommand("FedCm.resetCooldown", [], [], "Resets the cooldown time, if any, to allow the next FedCM call to show a dialog even if one was recently dismissed by the user.");
  inspectorBackend2.registerType("FedCm.Account", [{ "name": "accountId", "type": "string", "optional": false, "description": "", "typeRef": null }, { "name": "email", "type": "string", "optional": false, "description": "", "typeRef": null }, { "name": "name", "type": "string", "optional": false, "description": "", "typeRef": null }, { "name": "givenName", "type": "string", "optional": false, "description": "", "typeRef": null }, { "name": "pictureUrl", "type": "string", "optional": false, "description": "", "typeRef": null }, { "name": "idpConfigUrl", "type": "string", "optional": false, "description": "", "typeRef": null }, { "name": "idpLoginUrl", "type": "string", "optional": false, "description": "", "typeRef": null }, { "name": "loginState", "type": "string", "optional": false, "description": "", "typeRef": "FedCm.LoginState" }, { "name": "termsOfServiceUrl", "type": "string", "optional": true, "description": "These two are only set if the loginState is signUp", "typeRef": null }, { "name": "privacyPolicyUrl", "type": "string", "optional": true, "description": "", "typeRef": null }]);
  inspectorBackend2.registerEnum("Fetch.RequestStage", { Request: "Request", Response: "Response" });
  inspectorBackend2.registerEnum("Fetch.AuthChallengeSource", { Server: "Server", Proxy: "Proxy" });
  inspectorBackend2.registerEnum("Fetch.AuthChallengeResponseResponse", { Default: "Default", CancelAuth: "CancelAuth", ProvideCredentials: "ProvideCredentials" });
  inspectorBackend2.registerEvent("Fetch.requestPaused", ["requestId", "request", "frameId", "resourceType", "responseErrorReason", "responseStatusCode", "responseStatusText", "responseHeaders", "networkId", "redirectedRequestId"]);
  inspectorBackend2.registerEvent("Fetch.authRequired", ["requestId", "request", "frameId", "resourceType", "authChallenge"]);
  inspectorBackend2.registerCommand("Fetch.disable", [], [], "Disables the fetch domain.");
  inspectorBackend2.registerCommand("Fetch.enable", [{ "name": "patterns", "type": "array", "optional": true, "description": "If specified, only requests matching any of these patterns will produce fetchRequested event and will be paused until clients response. If not set, all requests will be affected.", "typeRef": "Fetch.RequestPattern" }, { "name": "handleAuthRequests", "type": "boolean", "optional": true, "description": "If true, authRequired events will be issued and requests will be paused expecting a call to continueWithAuth.", "typeRef": null }], [], "Enables issuing of requestPaused events. A request will be paused until client calls one of failRequest, fulfillRequest or continueRequest/continueWithAuth.");
  inspectorBackend2.registerCommand("Fetch.failRequest", [{ "name": "requestId", "type": "string", "optional": false, "description": "An id the client received in requestPaused event.", "typeRef": "Fetch.RequestId" }, { "name": "errorReason", "type": "string", "optional": false, "description": "Causes the request to fail with the given reason.", "typeRef": "Network.ErrorReason" }], [], "Causes the request to fail with specified reason.");
  inspectorBackend2.registerCommand("Fetch.fulfillRequest", [{ "name": "requestId", "type": "string", "optional": false, "description": "An id the client received in requestPaused event.", "typeRef": "Fetch.RequestId" }, { "name": "responseCode", "type": "number", "optional": false, "description": "An HTTP response code.", "typeRef": null }, { "name": "responseHeaders", "type": "array", "optional": true, "description": "Response headers.", "typeRef": "Fetch.HeaderEntry" }, { "name": "binaryResponseHeaders", "type": "string", "optional": true, "description": "Alternative way of specifying response headers as a \\0-separated series of name: value pairs. Prefer the above method unless you need to represent some non-UTF8 values that can't be transmitted over the protocol as text.", "typeRef": null }, { "name": "body", "type": "string", "optional": true, "description": "A response body. If absent, original response body will be used if the request is intercepted at the response stage and empty body will be used if the request is intercepted at the request stage.", "typeRef": null }, { "name": "responsePhrase", "type": "string", "optional": true, "description": "A textual representation of responseCode. If absent, a standard phrase matching responseCode is used.", "typeRef": null }], [], "Provides response to the request.");
  inspectorBackend2.registerCommand("Fetch.continueRequest", [{ "name": "requestId", "type": "string", "optional": false, "description": "An id the client received in requestPaused event.", "typeRef": "Fetch.RequestId" }, { "name": "url", "type": "string", "optional": true, "description": "If set, the request url will be modified in a way that's not observable by page.", "typeRef": null }, { "name": "method", "type": "string", "optional": true, "description": "If set, the request method is overridden.", "typeRef": null }, { "name": "postData", "type": "string", "optional": true, "description": "If set, overrides the post data in the request.", "typeRef": null }, { "name": "headers", "type": "array", "optional": true, "description": "If set, overrides the request headers. Note that the overrides do not extend to subsequent redirect hops, if a redirect happens. Another override may be applied to a different request produced by a redirect.", "typeRef": "Fetch.HeaderEntry" }, { "name": "interceptResponse", "type": "boolean", "optional": true, "description": "If set, overrides response interception behavior for this request.", "typeRef": null }], [], "Continues the request, optionally modifying some of its parameters.");
  inspectorBackend2.registerCommand("Fetch.continueWithAuth", [{ "name": "requestId", "type": "string", "optional": false, "description": "An id the client received in authRequired event.", "typeRef": "Fetch.RequestId" }, { "name": "authChallengeResponse", "type": "object", "optional": false, "description": "Response to  with an authChallenge.", "typeRef": "Fetch.AuthChallengeResponse" }], [], "Continues a request supplying authChallengeResponse following authRequired event.");
  inspectorBackend2.registerCommand("Fetch.continueResponse", [{ "name": "requestId", "type": "string", "optional": false, "description": "An id the client received in requestPaused event.", "typeRef": "Fetch.RequestId" }, { "name": "responseCode", "type": "number", "optional": true, "description": "An HTTP response code. If absent, original response code will be used.", "typeRef": null }, { "name": "responsePhrase", "type": "string", "optional": true, "description": "A textual representation of responseCode. If absent, a standard phrase matching responseCode is used.", "typeRef": null }, { "name": "responseHeaders", "type": "array", "optional": true, "description": "Response headers. If absent, original response headers will be used.", "typeRef": "Fetch.HeaderEntry" }, { "name": "binaryResponseHeaders", "type": "string", "optional": true, "description": "Alternative way of specifying response headers as a \\0-separated series of name: value pairs. Prefer the above method unless you need to represent some non-UTF8 values that can't be transmitted over the protocol as text.", "typeRef": null }], [], "Continues loading of the paused response, optionally modifying the response headers. If either responseCode or headers are modified, all of them must be present.");
  inspectorBackend2.registerCommand("Fetch.getResponseBody", [{ "name": "requestId", "type": "string", "optional": false, "description": "Identifier for the intercepted request to get body for.", "typeRef": "Fetch.RequestId" }], ["body", "base64Encoded"], "Causes the body of the response to be received from the server and returned as a single string. May only be issued for a request that is paused in the Response stage and is mutually exclusive with takeResponseBodyForInterceptionAsStream. Calling other methods that affect the request or disabling fetch domain before body is received results in an undefined behavior. Note that the response body is not available for redirects. Requests paused in the _redirect received_ state may be differentiated by `responseCode` and presence of `location` response header, see comments to `requestPaused` for details.");
  inspectorBackend2.registerCommand("Fetch.takeResponseBodyAsStream", [{ "name": "requestId", "type": "string", "optional": false, "description": "", "typeRef": "Fetch.RequestId" }], ["stream"], "Returns a handle to the stream representing the response body. The request must be paused in the HeadersReceived stage. Note that after this command the request can't be continued as is -- client either needs to cancel it or to provide the response body. The stream only supports sequential read, IO.read will fail if the position is specified. This method is mutually exclusive with getResponseBody. Calling other methods that affect the request or disabling fetch domain before body is received results in an undefined behavior.");
  inspectorBackend2.registerType("Fetch.RequestPattern", [{ "name": "urlPattern", "type": "string", "optional": true, "description": "Wildcards (`'*'` -> zero or more, `'?'` -> exactly one) are allowed. Escape character is backslash. Omitting is equivalent to `\\\"*\\\"`.", "typeRef": null }, { "name": "resourceType", "type": "string", "optional": true, "description": "If set, only requests for matching resource types will be intercepted.", "typeRef": "Network.ResourceType" }, { "name": "requestStage", "type": "string", "optional": true, "description": "Stage at which to begin intercepting requests. Default is Request.", "typeRef": "Fetch.RequestStage" }]);
  inspectorBackend2.registerType("Fetch.HeaderEntry", [{ "name": "name", "type": "string", "optional": false, "description": "", "typeRef": null }, { "name": "value", "type": "string", "optional": false, "description": "", "typeRef": null }]);
  inspectorBackend2.registerType("Fetch.AuthChallenge", [{ "name": "source", "type": "string", "optional": true, "description": "Source of the authentication challenge.", "typeRef": null }, { "name": "origin", "type": "string", "optional": false, "description": "Origin of the challenger.", "typeRef": null }, { "name": "scheme", "type": "string", "optional": false, "description": "The authentication scheme used, such as basic or digest", "typeRef": null }, { "name": "realm", "type": "string", "optional": false, "description": "The realm of the challenge. May be empty.", "typeRef": null }]);
  inspectorBackend2.registerType("Fetch.AuthChallengeResponse", [{ "name": "response", "type": "string", "optional": false, "description": "The decision on what to do in response to the authorization challenge.  Default means deferring to the default behavior of the net stack, which will likely either the Cancel authentication or display a popup dialog box.", "typeRef": null }, { "name": "username", "type": "string", "optional": true, "description": "The username to provide, possibly empty. Should only be set if response is ProvideCredentials.", "typeRef": null }, { "name": "password", "type": "string", "optional": true, "description": "The password to provide, possibly empty. Should only be set if response is ProvideCredentials.", "typeRef": null }]);
  inspectorBackend2.registerCommand("FileSystem.getDirectory", [{ "name": "bucketFileSystemLocator", "type": "object", "optional": false, "description": "", "typeRef": "FileSystem.BucketFileSystemLocator" }], ["directory"], "");
  inspectorBackend2.registerType("FileSystem.File", [{ "name": "name", "type": "string", "optional": false, "description": "", "typeRef": null }, { "name": "lastModified", "type": "number", "optional": false, "description": "Timestamp", "typeRef": "Network.TimeSinceEpoch" }, { "name": "size", "type": "number", "optional": false, "description": "Size in bytes", "typeRef": null }, { "name": "type", "type": "string", "optional": false, "description": "", "typeRef": null }]);
  inspectorBackend2.registerType("FileSystem.Directory", [{ "name": "name", "type": "string", "optional": false, "description": "", "typeRef": null }, { "name": "nestedDirectories", "type": "array", "optional": false, "description": "", "typeRef": "string" }, { "name": "nestedFiles", "type": "array", "optional": false, "description": "Files that are directly nested under this directory.", "typeRef": "FileSystem.File" }]);
  inspectorBackend2.registerType("FileSystem.BucketFileSystemLocator", [{ "name": "storageKey", "type": "string", "optional": false, "description": "Storage key", "typeRef": "Storage.SerializedStorageKey" }, { "name": "bucketName", "type": "string", "optional": true, "description": "Bucket name. Not passing a `bucketName` will retrieve the default Bucket. (https://developer.mozilla.org/en-US/docs/Web/API/Storage_API#storage_buckets)", "typeRef": null }, { "name": "pathComponents", "type": "array", "optional": false, "description": "Path to the directory using each path component as an array item.", "typeRef": "string" }]);
  inspectorBackend2.registerEnum("HeadlessExperimental.ScreenshotParamsFormat", { Jpeg: "jpeg", Png: "png", Webp: "webp" });
  inspectorBackend2.registerCommand("HeadlessExperimental.beginFrame", [{ "name": "frameTimeTicks", "type": "number", "optional": true, "description": "Timestamp of this BeginFrame in Renderer TimeTicks (milliseconds of uptime). If not set, the current time will be used.", "typeRef": null }, { "name": "interval", "type": "number", "optional": true, "description": "The interval between BeginFrames that is reported to the compositor, in milliseconds. Defaults to a 60 frames/second interval, i.e. about 16.666 milliseconds.", "typeRef": null }, { "name": "noDisplayUpdates", "type": "boolean", "optional": true, "description": "Whether updates should not be committed and drawn onto the display. False by default. If true, only side effects of the BeginFrame will be run, such as layout and animations, but any visual updates may not be visible on the display or in screenshots.", "typeRef": null }, { "name": "screenshot", "type": "object", "optional": true, "description": "If set, a screenshot of the frame will be captured and returned in the response. Otherwise, no screenshot will be captured. Note that capturing a screenshot can fail, for example, during renderer initialization. In such a case, no screenshot data will be returned.", "typeRef": "HeadlessExperimental.ScreenshotParams" }], ["hasDamage", "screenshotData"], "Sends a BeginFrame to the target and returns when the frame was completed. Optionally captures a screenshot from the resulting frame. Requires that the target was created with enabled BeginFrameControl. Designed for use with --run-all-compositor-stages-before-draw, see also https://goo.gle/chrome-headless-rendering for more background.");
  inspectorBackend2.registerCommand("HeadlessExperimental.disable", [], [], "Disables headless events for the target.");
  inspectorBackend2.registerCommand("HeadlessExperimental.enable", [], [], "Enables headless events for the target.");
  inspectorBackend2.registerType("HeadlessExperimental.ScreenshotParams", [{ "name": "format", "type": "string", "optional": true, "description": "Image compression format (defaults to png).", "typeRef": null }, { "name": "quality", "type": "number", "optional": true, "description": "Compression quality from range [0..100] (jpeg and webp only).", "typeRef": null }, { "name": "optimizeForSpeed", "type": "boolean", "optional": true, "description": "Optimize image encoding for speed, not for resulting size (defaults to false)", "typeRef": null }]);
  inspectorBackend2.registerCommand("IO.close", [{ "name": "handle", "type": "string", "optional": false, "description": "Handle of the stream to close.", "typeRef": "IO.StreamHandle" }], [], "Close the stream, discard any temporary backing storage.");
  inspectorBackend2.registerCommand("IO.read", [{ "name": "handle", "type": "string", "optional": false, "description": "Handle of the stream to read.", "typeRef": "IO.StreamHandle" }, { "name": "offset", "type": "number", "optional": true, "description": "Seek to the specified offset before reading (if not specified, proceed with offset following the last read). Some types of streams may only support sequential reads.", "typeRef": null }, { "name": "size", "type": "number", "optional": true, "description": "Maximum number of bytes to read (left upon the agent discretion if not specified).", "typeRef": null }], ["base64Encoded", "data", "eof"], "Read a chunk of the stream");
  inspectorBackend2.registerCommand("IO.resolveBlob", [{ "name": "objectId", "type": "string", "optional": false, "description": "Object id of a Blob object wrapper.", "typeRef": "Runtime.RemoteObjectId" }], ["uuid"], "Return UUID of Blob object specified by a remote object id.");
  inspectorBackend2.registerEnum("IndexedDB.KeyType", { Number: "number", String: "string", Date: "date", Array: "array" });
  inspectorBackend2.registerEnum("IndexedDB.KeyPathType", { Null: "null", String: "string", Array: "array" });
  inspectorBackend2.registerCommand("IndexedDB.clearObjectStore", [{ "name": "securityOrigin", "type": "string", "optional": true, "description": "At least and at most one of securityOrigin, storageKey, or storageBucket must be specified. Security origin.", "typeRef": null }, { "name": "storageKey", "type": "string", "optional": true, "description": "Storage key.", "typeRef": null }, { "name": "storageBucket", "type": "object", "optional": true, "description": "Storage bucket. If not specified, it uses the default bucket.", "typeRef": "Storage.StorageBucket" }, { "name": "databaseName", "type": "string", "optional": false, "description": "Database name.", "typeRef": null }, { "name": "objectStoreName", "type": "string", "optional": false, "description": "Object store name.", "typeRef": null }], [], "Clears all entries from an object store.");
  inspectorBackend2.registerCommand("IndexedDB.deleteDatabase", [{ "name": "securityOrigin", "type": "string", "optional": true, "description": "At least and at most one of securityOrigin, storageKey, or storageBucket must be specified. Security origin.", "typeRef": null }, { "name": "storageKey", "type": "string", "optional": true, "description": "Storage key.", "typeRef": null }, { "name": "storageBucket", "type": "object", "optional": true, "description": "Storage bucket. If not specified, it uses the default bucket.", "typeRef": "Storage.StorageBucket" }, { "name": "databaseName", "type": "string", "optional": false, "description": "Database name.", "typeRef": null }], [], "Deletes a database.");
  inspectorBackend2.registerCommand("IndexedDB.deleteObjectStoreEntries", [{ "name": "securityOrigin", "type": "string", "optional": true, "description": "At least and at most one of securityOrigin, storageKey, or storageBucket must be specified. Security origin.", "typeRef": null }, { "name": "storageKey", "type": "string", "optional": true, "description": "Storage key.", "typeRef": null }, { "name": "storageBucket", "type": "object", "optional": true, "description": "Storage bucket. If not specified, it uses the default bucket.", "typeRef": "Storage.StorageBucket" }, { "name": "databaseName", "type": "string", "optional": false, "description": "", "typeRef": null }, { "name": "objectStoreName", "type": "string", "optional": false, "description": "", "typeRef": null }, { "name": "keyRange", "type": "object", "optional": false, "description": "Range of entry keys to delete", "typeRef": "IndexedDB.KeyRange" }], [], "Delete a range of entries from an object store");
  inspectorBackend2.registerCommand("IndexedDB.disable", [], [], "Disables events from backend.");
  inspectorBackend2.registerCommand("IndexedDB.enable", [], [], "Enables events from backend.");
  inspectorBackend2.registerCommand("IndexedDB.requestData", [{ "name": "securityOrigin", "type": "string", "optional": true, "description": "At least and at most one of securityOrigin, storageKey, or storageBucket must be specified. Security origin.", "typeRef": null }, { "name": "storageKey", "type": "string", "optional": true, "description": "Storage key.", "typeRef": null }, { "name": "storageBucket", "type": "object", "optional": true, "description": "Storage bucket. If not specified, it uses the default bucket.", "typeRef": "Storage.StorageBucket" }, { "name": "databaseName", "type": "string", "optional": false, "description": "Database name.", "typeRef": null }, { "name": "objectStoreName", "type": "string", "optional": false, "description": "Object store name.", "typeRef": null }, { "name": "indexName", "type": "string", "optional": true, "description": "Index name. If not specified, it performs an object store data request.", "typeRef": null }, { "name": "skipCount", "type": "number", "optional": false, "description": "Number of records to skip.", "typeRef": null }, { "name": "pageSize", "type": "number", "optional": false, "description": "Number of records to fetch.", "typeRef": null }, { "name": "keyRange", "type": "object", "optional": true, "description": "Key range.", "typeRef": "IndexedDB.KeyRange" }], ["objectStoreDataEntries", "hasMore"], "Requests data from object store or index.");
  inspectorBackend2.registerCommand("IndexedDB.getMetadata", [{ "name": "securityOrigin", "type": "string", "optional": true, "description": "At least and at most one of securityOrigin, storageKey, or storageBucket must be specified. Security origin.", "typeRef": null }, { "name": "storageKey", "type": "string", "optional": true, "description": "Storage key.", "typeRef": null }, { "name": "storageBucket", "type": "object", "optional": true, "description": "Storage bucket. If not specified, it uses the default bucket.", "typeRef": "Storage.StorageBucket" }, { "name": "databaseName", "type": "string", "optional": false, "description": "Database name.", "typeRef": null }, { "name": "objectStoreName", "type": "string", "optional": false, "description": "Object store name.", "typeRef": null }], ["entriesCount", "keyGeneratorValue"], "Gets metadata of an object store.");
  inspectorBackend2.registerCommand("IndexedDB.requestDatabase", [{ "name": "securityOrigin", "type": "string", "optional": true, "description": "At least and at most one of securityOrigin, storageKey, or storageBucket must be specified. Security origin.", "typeRef": null }, { "name": "storageKey", "type": "string", "optional": true, "description": "Storage key.", "typeRef": null }, { "name": "storageBucket", "type": "object", "optional": true, "description": "Storage bucket. If not specified, it uses the default bucket.", "typeRef": "Storage.StorageBucket" }, { "name": "databaseName", "type": "string", "optional": false, "description": "Database name.", "typeRef": null }], ["databaseWithObjectStores"], "Requests database with given name in given frame.");
  inspectorBackend2.registerCommand("IndexedDB.requestDatabaseNames", [{ "name": "securityOrigin", "type": "string", "optional": true, "description": "At least and at most one of securityOrigin, storageKey, or storageBucket must be specified. Security origin.", "typeRef": null }, { "name": "storageKey", "type": "string", "optional": true, "description": "Storage key.", "typeRef": null }, { "name": "storageBucket", "type": "object", "optional": true, "description": "Storage bucket. If not specified, it uses the default bucket.", "typeRef": "Storage.StorageBucket" }], ["databaseNames"], "Requests database names for given security origin.");
  inspectorBackend2.registerType("IndexedDB.DatabaseWithObjectStores", [{ "name": "name", "type": "string", "optional": false, "description": "Database name.", "typeRef": null }, { "name": "version", "type": "number", "optional": false, "description": "Database version (type is not 'integer', as the standard requires the version number to be 'unsigned long long')", "typeRef": null }, { "name": "objectStores", "type": "array", "optional": false, "description": "Object stores in this database.", "typeRef": "IndexedDB.ObjectStore" }]);
  inspectorBackend2.registerType("IndexedDB.ObjectStore", [{ "name": "name", "type": "string", "optional": false, "description": "Object store name.", "typeRef": null }, { "name": "keyPath", "type": "object", "optional": false, "description": "Object store key path.", "typeRef": "IndexedDB.KeyPath" }, { "name": "autoIncrement", "type": "boolean", "optional": false, "description": "If true, object store has auto increment flag set.", "typeRef": null }, { "name": "indexes", "type": "array", "optional": false, "description": "Indexes in this object store.", "typeRef": "IndexedDB.ObjectStoreIndex" }]);
  inspectorBackend2.registerType("IndexedDB.ObjectStoreIndex", [{ "name": "name", "type": "string", "optional": false, "description": "Index name.", "typeRef": null }, { "name": "keyPath", "type": "object", "optional": false, "description": "Index key path.", "typeRef": "IndexedDB.KeyPath" }, { "name": "unique", "type": "boolean", "optional": false, "description": "If true, index is unique.", "typeRef": null }, { "name": "multiEntry", "type": "boolean", "optional": false, "description": "If true, index allows multiple entries for a key.", "typeRef": null }]);
  inspectorBackend2.registerType("IndexedDB.Key", [{ "name": "type", "type": "string", "optional": false, "description": "Key type.", "typeRef": null }, { "name": "number", "type": "number", "optional": true, "description": "Number value.", "typeRef": null }, { "name": "string", "type": "string", "optional": true, "description": "String value.", "typeRef": null }, { "name": "date", "type": "number", "optional": true, "description": "Date value.", "typeRef": null }, { "name": "array", "type": "array", "optional": true, "description": "Array value.", "typeRef": "IndexedDB.Key" }]);
  inspectorBackend2.registerType("IndexedDB.KeyRange", [{ "name": "lower", "type": "object", "optional": true, "description": "Lower bound.", "typeRef": "IndexedDB.Key" }, { "name": "upper", "type": "object", "optional": true, "description": "Upper bound.", "typeRef": "IndexedDB.Key" }, { "name": "lowerOpen", "type": "boolean", "optional": false, "description": "If true lower bound is open.", "typeRef": null }, { "name": "upperOpen", "type": "boolean", "optional": false, "description": "If true upper bound is open.", "typeRef": null }]);
  inspectorBackend2.registerType("IndexedDB.DataEntry", [{ "name": "key", "type": "object", "optional": false, "description": "Key object.", "typeRef": "Runtime.RemoteObject" }, { "name": "primaryKey", "type": "object", "optional": false, "description": "Primary key object.", "typeRef": "Runtime.RemoteObject" }, { "name": "value", "type": "object", "optional": false, "description": "Value object.", "typeRef": "Runtime.RemoteObject" }]);
  inspectorBackend2.registerType("IndexedDB.KeyPath", [{ "name": "type", "type": "string", "optional": false, "description": "Key path type.", "typeRef": null }, { "name": "string", "type": "string", "optional": true, "description": "String value.", "typeRef": null }, { "name": "array", "type": "array", "optional": true, "description": "Array value.", "typeRef": "string" }]);
  inspectorBackend2.registerEnum("Input.GestureSourceType", { Default: "default", Touch: "touch", Mouse: "mouse" });
  inspectorBackend2.registerEnum("Input.MouseButton", { None: "none", Left: "left", Middle: "middle", Right: "right", Back: "back", Forward: "forward" });
  inspectorBackend2.registerEvent("Input.dragIntercepted", ["data"]);
  inspectorBackend2.registerEnum("Input.DispatchDragEventRequestType", { DragEnter: "dragEnter", DragOver: "dragOver", Drop: "drop", DragCancel: "dragCancel" });
  inspectorBackend2.registerCommand("Input.dispatchDragEvent", [{ "name": "type", "type": "string", "optional": false, "description": "Type of the drag event.", "typeRef": "Input.DispatchDragEventRequestType" }, { "name": "x", "type": "number", "optional": false, "description": "X coordinate of the event relative to the main frame's viewport in CSS pixels.", "typeRef": null }, { "name": "y", "type": "number", "optional": false, "description": "Y coordinate of the event relative to the main frame's viewport in CSS pixels. 0 refers to the top of the viewport and Y increases as it proceeds towards the bottom of the viewport.", "typeRef": null }, { "name": "data", "type": "object", "optional": false, "description": "", "typeRef": "Input.DragData" }, { "name": "modifiers", "type": "number", "optional": true, "description": "Bit field representing pressed modifier keys. Alt=1, Ctrl=2, Meta/Command=4, Shift=8 (default: 0).", "typeRef": null }], [], "Dispatches a drag event into the page.");
  inspectorBackend2.registerEnum("Input.DispatchKeyEventRequestType", { KeyDown: "keyDown", KeyUp: "keyUp", RawKeyDown: "rawKeyDown", Char: "char" });
  inspectorBackend2.registerCommand("Input.dispatchKeyEvent", [{ "name": "type", "type": "string", "optional": false, "description": "Type of the key event.", "typeRef": "Input.DispatchKeyEventRequestType" }, { "name": "modifiers", "type": "number", "optional": true, "description": "Bit field representing pressed modifier keys. Alt=1, Ctrl=2, Meta/Command=4, Shift=8 (default: 0).", "typeRef": null }, { "name": "timestamp", "type": "number", "optional": true, "description": "Time at which the event occurred.", "typeRef": "Input.TimeSinceEpoch" }, { "name": "text", "type": "string", "optional": true, "description": 'Text as generated by processing a virtual key code with a keyboard layout. Not needed for for `keyUp` and `rawKeyDown` events (default: \\"\\")', "typeRef": null }, { "name": "unmodifiedText", "type": "string", "optional": true, "description": 'Text that would have been generated by the keyboard if no modifiers were pressed (except for shift). Useful for shortcut (accelerator) key handling (default: \\"\\").', "typeRef": null }, { "name": "keyIdentifier", "type": "string", "optional": true, "description": `Unique key identifier (e.g., 'U+0041') (default: \\"\\").`, "typeRef": null }, { "name": "code", "type": "string", "optional": true, "description": `Unique DOM defined string value for each physical key (e.g., 'KeyA') (default: \\"\\").`, "typeRef": null }, { "name": "key", "type": "string", "optional": true, "description": `Unique DOM defined string value describing the meaning of the key in the context of active modifiers, keyboard layout, etc (e.g., 'AltGr') (default: \\"\\").`, "typeRef": null }, { "name": "windowsVirtualKeyCode", "type": "number", "optional": true, "description": "Windows virtual key code (default: 0).", "typeRef": null }, { "name": "nativeVirtualKeyCode", "type": "number", "optional": true, "description": "Native virtual key code (default: 0).", "typeRef": null }, { "name": "autoRepeat", "type": "boolean", "optional": true, "description": "Whether the event was generated from auto repeat (default: false).", "typeRef": null }, { "name": "isKeypad", "type": "boolean", "optional": true, "description": "Whether the event was generated from the keypad (default: false).", "typeRef": null }, { "name": "isSystemKey", "type": "boolean", "optional": true, "description": "Whether the event was a system key event (default: false).", "typeRef": null }, { "name": "location", "type": "number", "optional": true, "description": "Whether the event was from the left or right side of the keyboard. 1=Left, 2=Right (default: 0).", "typeRef": null }, { "name": "commands", "type": "array", "optional": true, "description": "Editing commands to send with the key event (e.g., 'selectAll') (default: []). These are related to but not equal the command names used in `document.execCommand` and NSStandardKeyBindingResponding. See https://source.chromium.org/chromium/chromium/src/+/main:third_party/blink/renderer/core/editing/commands/editor_command_names.h for valid command names.", "typeRef": "string" }], [], "Dispatches a key event to the page.");
  inspectorBackend2.registerCommand("Input.insertText", [{ "name": "text", "type": "string", "optional": false, "description": "The text to insert.", "typeRef": null }], [], "This method emulates inserting text that doesn't come from a key press, for example an emoji keyboard or an IME.");
  inspectorBackend2.registerCommand("Input.imeSetComposition", [{ "name": "text", "type": "string", "optional": false, "description": "The text to insert", "typeRef": null }, { "name": "selectionStart", "type": "number", "optional": false, "description": "selection start", "typeRef": null }, { "name": "selectionEnd", "type": "number", "optional": false, "description": "selection end", "typeRef": null }, { "name": "replacementStart", "type": "number", "optional": true, "description": "replacement start", "typeRef": null }, { "name": "replacementEnd", "type": "number", "optional": true, "description": "replacement end", "typeRef": null }], [], "This method sets the current candidate text for IME. Use imeCommitComposition to commit the final text. Use imeSetComposition with empty string as text to cancel composition.");
  inspectorBackend2.registerEnum("Input.DispatchMouseEventRequestType", { MousePressed: "mousePressed", MouseReleased: "mouseReleased", MouseMoved: "mouseMoved", MouseWheel: "mouseWheel" });
  inspectorBackend2.registerEnum("Input.DispatchMouseEventRequestPointerType", { Mouse: "mouse", Pen: "pen" });
  inspectorBackend2.registerCommand("Input.dispatchMouseEvent", [{ "name": "type", "type": "string", "optional": false, "description": "Type of the mouse event.", "typeRef": "Input.DispatchMouseEventRequestType" }, { "name": "x", "type": "number", "optional": false, "description": "X coordinate of the event relative to the main frame's viewport in CSS pixels.", "typeRef": null }, { "name": "y", "type": "number", "optional": false, "description": "Y coordinate of the event relative to the main frame's viewport in CSS pixels. 0 refers to the top of the viewport and Y increases as it proceeds towards the bottom of the viewport.", "typeRef": null }, { "name": "modifiers", "type": "number", "optional": true, "description": "Bit field representing pressed modifier keys. Alt=1, Ctrl=2, Meta/Command=4, Shift=8 (default: 0).", "typeRef": null }, { "name": "timestamp", "type": "number", "optional": true, "description": "Time at which the event occurred.", "typeRef": "Input.TimeSinceEpoch" }, { "name": "button", "type": "string", "optional": true, "description": 'Mouse button (default: \\"none\\").', "typeRef": "Input.MouseButton" }, { "name": "buttons", "type": "number", "optional": true, "description": "A number indicating which buttons are pressed on the mouse when a mouse event is triggered. Left=1, Right=2, Middle=4, Back=8, Forward=16, None=0.", "typeRef": null }, { "name": "clickCount", "type": "number", "optional": true, "description": "Number of times the mouse button was clicked (default: 0).", "typeRef": null }, { "name": "force", "type": "number", "optional": true, "description": "The normalized pressure, which has a range of [0,1] (default: 0).", "typeRef": null }, { "name": "tangentialPressure", "type": "number", "optional": true, "description": "The normalized tangential pressure, which has a range of [-1,1] (default: 0).", "typeRef": null }, { "name": "tiltX", "type": "number", "optional": true, "description": "The plane angle between the Y-Z plane and the plane containing both the stylus axis and the Y axis, in degrees of the range [-90,90], a positive tiltX is to the right (default: 0).", "typeRef": null }, { "name": "tiltY", "type": "number", "optional": true, "description": "The plane angle between the X-Z plane and the plane containing both the stylus axis and the X axis, in degrees of the range [-90,90], a positive tiltY is towards the user (default: 0).", "typeRef": null }, { "name": "twist", "type": "number", "optional": true, "description": "The clockwise rotation of a pen stylus around its own major axis, in degrees in the range [0,359] (default: 0).", "typeRef": null }, { "name": "deltaX", "type": "number", "optional": true, "description": "X delta in CSS pixels for mouse wheel event (default: 0).", "typeRef": null }, { "name": "deltaY", "type": "number", "optional": true, "description": "Y delta in CSS pixels for mouse wheel event (default: 0).", "typeRef": null }, { "name": "pointerType", "type": "string", "optional": true, "description": 'Pointer type (default: \\"mouse\\").', "typeRef": "Input.DispatchMouseEventRequestPointerType" }], [], "Dispatches a mouse event to the page.");
  inspectorBackend2.registerEnum("Input.DispatchTouchEventRequestType", { TouchStart: "touchStart", TouchEnd: "touchEnd", TouchMove: "touchMove", TouchCancel: "touchCancel" });
  inspectorBackend2.registerCommand("Input.dispatchTouchEvent", [{ "name": "type", "type": "string", "optional": false, "description": "Type of the touch event. TouchEnd and TouchCancel must not contain any touch points, while TouchStart and TouchMove must contains at least one.", "typeRef": "Input.DispatchTouchEventRequestType" }, { "name": "touchPoints", "type": "array", "optional": false, "description": "Active touch points on the touch device. One event per any changed point (compared to previous touch event in a sequence) is generated, emulating pressing/moving/releasing points one by one.", "typeRef": "Input.TouchPoint" }, { "name": "modifiers", "type": "number", "optional": true, "description": "Bit field representing pressed modifier keys. Alt=1, Ctrl=2, Meta/Command=4, Shift=8 (default: 0).", "typeRef": null }, { "name": "timestamp", "type": "number", "optional": true, "description": "Time at which the event occurred.", "typeRef": "Input.TimeSinceEpoch" }], [], "Dispatches a touch event to the page.");
  inspectorBackend2.registerCommand("Input.cancelDragging", [], [], "Cancels any active dragging in the page.");
  inspectorBackend2.registerEnum("Input.EmulateTouchFromMouseEventRequestType", { MousePressed: "mousePressed", MouseReleased: "mouseReleased", MouseMoved: "mouseMoved", MouseWheel: "mouseWheel" });
  inspectorBackend2.registerCommand("Input.emulateTouchFromMouseEvent", [{ "name": "type", "type": "string", "optional": false, "description": "Type of the mouse event.", "typeRef": "Input.EmulateTouchFromMouseEventRequestType" }, { "name": "x", "type": "number", "optional": false, "description": "X coordinate of the mouse pointer in DIP.", "typeRef": null }, { "name": "y", "type": "number", "optional": false, "description": "Y coordinate of the mouse pointer in DIP.", "typeRef": null }, { "name": "button", "type": "string", "optional": false, "description": 'Mouse button. Only \\"none\\", \\"left\\", \\"right\\" are supported.', "typeRef": "Input.MouseButton" }, { "name": "timestamp", "type": "number", "optional": true, "description": "Time at which the event occurred (default: current time).", "typeRef": "Input.TimeSinceEpoch" }, { "name": "deltaX", "type": "number", "optional": true, "description": "X delta in DIP for mouse wheel event (default: 0).", "typeRef": null }, { "name": "deltaY", "type": "number", "optional": true, "description": "Y delta in DIP for mouse wheel event (default: 0).", "typeRef": null }, { "name": "modifiers", "type": "number", "optional": true, "description": "Bit field representing pressed modifier keys. Alt=1, Ctrl=2, Meta/Command=4, Shift=8 (default: 0).", "typeRef": null }, { "name": "clickCount", "type": "number", "optional": true, "description": "Number of times the mouse button was clicked (default: 0).", "typeRef": null }], [], "Emulates touch event from the mouse event parameters.");
  inspectorBackend2.registerCommand("Input.setIgnoreInputEvents", [{ "name": "ignore", "type": "boolean", "optional": false, "description": "Ignores input events processing when set to true.", "typeRef": null }], [], "Ignores input events (useful while auditing page).");
  inspectorBackend2.registerCommand("Input.setInterceptDrags", [{ "name": "enabled", "type": "boolean", "optional": false, "description": "", "typeRef": null }], [], "Prevents default drag and drop behavior and instead emits `Input.dragIntercepted` events. Drag and drop behavior can be directly controlled via `Input.dispatchDragEvent`.");
  inspectorBackend2.registerCommand("Input.synthesizePinchGesture", [{ "name": "x", "type": "number", "optional": false, "description": "X coordinate of the start of the gesture in CSS pixels.", "typeRef": null }, { "name": "y", "type": "number", "optional": false, "description": "Y coordinate of the start of the gesture in CSS pixels.", "typeRef": null }, { "name": "scaleFactor", "type": "number", "optional": false, "description": "Relative scale factor after zooming (>1.0 zooms in, <1.0 zooms out).", "typeRef": null }, { "name": "relativeSpeed", "type": "number", "optional": true, "description": "Relative pointer speed in pixels per second (default: 800).", "typeRef": null }, { "name": "gestureSourceType", "type": "string", "optional": true, "description": "Which type of input events to be generated (default: 'default', which queries the platform for the preferred input type).", "typeRef": "Input.GestureSourceType" }], [], "Synthesizes a pinch gesture over a time period by issuing appropriate touch events.");
  inspectorBackend2.registerCommand("Input.synthesizeScrollGesture", [{ "name": "x", "type": "number", "optional": false, "description": "X coordinate of the start of the gesture in CSS pixels.", "typeRef": null }, { "name": "y", "type": "number", "optional": false, "description": "Y coordinate of the start of the gesture in CSS pixels.", "typeRef": null }, { "name": "xDistance", "type": "number", "optional": true, "description": "The distance to scroll along the X axis (positive to scroll left).", "typeRef": null }, { "name": "yDistance", "type": "number", "optional": true, "description": "The distance to scroll along the Y axis (positive to scroll up).", "typeRef": null }, { "name": "xOverscroll", "type": "number", "optional": true, "description": "The number of additional pixels to scroll back along the X axis, in addition to the given distance.", "typeRef": null }, { "name": "yOverscroll", "type": "number", "optional": true, "description": "The number of additional pixels to scroll back along the Y axis, in addition to the given distance.", "typeRef": null }, { "name": "preventFling", "type": "boolean", "optional": true, "description": "Prevent fling (default: true).", "typeRef": null }, { "name": "speed", "type": "number", "optional": true, "description": "Swipe speed in pixels per second (default: 800).", "typeRef": null }, { "name": "gestureSourceType", "type": "string", "optional": true, "description": "Which type of input events to be generated (default: 'default', which queries the platform for the preferred input type).", "typeRef": "Input.GestureSourceType" }, { "name": "repeatCount", "type": "number", "optional": true, "description": "The number of times to repeat the gesture (default: 0).", "typeRef": null }, { "name": "repeatDelayMs", "type": "number", "optional": true, "description": "The number of milliseconds delay between each repeat. (default: 250).", "typeRef": null }, { "name": "interactionMarkerName", "type": "string", "optional": true, "description": 'The name of the interaction markers to generate, if not empty (default: \\"\\").', "typeRef": null }], [], "Synthesizes a scroll gesture over a time period by issuing appropriate touch events.");
  inspectorBackend2.registerCommand("Input.synthesizeTapGesture", [{ "name": "x", "type": "number", "optional": false, "description": "X coordinate of the start of the gesture in CSS pixels.", "typeRef": null }, { "name": "y", "type": "number", "optional": false, "description": "Y coordinate of the start of the gesture in CSS pixels.", "typeRef": null }, { "name": "duration", "type": "number", "optional": true, "description": "Duration between touchdown and touchup events in ms (default: 50).", "typeRef": null }, { "name": "tapCount", "type": "number", "optional": true, "description": "Number of times to perform the tap (e.g. 2 for double tap, default: 1).", "typeRef": null }, { "name": "gestureSourceType", "type": "string", "optional": true, "description": "Which type of input events to be generated (default: 'default', which queries the platform for the preferred input type).", "typeRef": "Input.GestureSourceType" }], [], "Synthesizes a tap gesture over a time period by issuing appropriate touch events.");
  inspectorBackend2.registerType("Input.TouchPoint", [{ "name": "x", "type": "number", "optional": false, "description": "X coordinate of the event relative to the main frame's viewport in CSS pixels.", "typeRef": null }, { "name": "y", "type": "number", "optional": false, "description": "Y coordinate of the event relative to the main frame's viewport in CSS pixels. 0 refers to the top of the viewport and Y increases as it proceeds towards the bottom of the viewport.", "typeRef": null }, { "name": "radiusX", "type": "number", "optional": true, "description": "X radius of the touch area (default: 1.0).", "typeRef": null }, { "name": "radiusY", "type": "number", "optional": true, "description": "Y radius of the touch area (default: 1.0).", "typeRef": null }, { "name": "rotationAngle", "type": "number", "optional": true, "description": "Rotation angle (default: 0.0).", "typeRef": null }, { "name": "force", "type": "number", "optional": true, "description": "Force (default: 1.0).", "typeRef": null }, { "name": "tangentialPressure", "type": "number", "optional": true, "description": "The normalized tangential pressure, which has a range of [-1,1] (default: 0).", "typeRef": null }, { "name": "tiltX", "type": "number", "optional": true, "description": "The plane angle between the Y-Z plane and the plane containing both the stylus axis and the Y axis, in degrees of the range [-90,90], a positive tiltX is to the right (default: 0)", "typeRef": null }, { "name": "tiltY", "type": "number", "optional": true, "description": "The plane angle between the X-Z plane and the plane containing both the stylus axis and the X axis, in degrees of the range [-90,90], a positive tiltY is towards the user (default: 0).", "typeRef": null }, { "name": "twist", "type": "number", "optional": true, "description": "The clockwise rotation of a pen stylus around its own major axis, in degrees in the range [0,359] (default: 0).", "typeRef": null }, { "name": "id", "type": "number", "optional": true, "description": "Identifier used to track touch sources between events, must be unique within an event.", "typeRef": null }]);
  inspectorBackend2.registerType("Input.DragDataItem", [{ "name": "mimeType", "type": "string", "optional": false, "description": "Mime type of the dragged data.", "typeRef": null }, { "name": "data", "type": "string", "optional": false, "description": "Depending of the value of `mimeType`, it contains the dragged link, text, HTML markup or any other data.", "typeRef": null }, { "name": "title", "type": "string", "optional": true, "description": 'Title associated with a link. Only valid when `mimeType` == \\"text/uri-list\\".', "typeRef": null }, { "name": "baseURL", "type": "string", "optional": true, "description": 'Stores the base URL for the contained markup. Only valid when `mimeType` == \\"text/html\\".', "typeRef": null }]);
  inspectorBackend2.registerType("Input.DragData", [{ "name": "items", "type": "array", "optional": false, "description": "", "typeRef": "Input.DragDataItem" }, { "name": "files", "type": "array", "optional": true, "description": "List of filenames that should be included when dropping", "typeRef": "string" }, { "name": "dragOperationsMask", "type": "number", "optional": false, "description": "Bit field representing allowed drag operations. Copy = 1, Link = 2, Move = 16", "typeRef": null }]);
  inspectorBackend2.registerEvent("Inspector.detached", ["reason"]);
  inspectorBackend2.registerEvent("Inspector.targetCrashed", []);
  inspectorBackend2.registerEvent("Inspector.targetReloadedAfterCrash", []);
  inspectorBackend2.registerEvent("Inspector.workerScriptLoaded", []);
  inspectorBackend2.registerCommand("Inspector.disable", [], [], "Disables inspector domain notifications.");
  inspectorBackend2.registerCommand("Inspector.enable", [], [], "Enables inspector domain notifications.");
  inspectorBackend2.registerEnum("LayerTree.ScrollRectType", { RepaintsOnScroll: "RepaintsOnScroll", TouchEventHandler: "TouchEventHandler", WheelEventHandler: "WheelEventHandler" });
  inspectorBackend2.registerEvent("LayerTree.layerPainted", ["layerId", "clip"]);
  inspectorBackend2.registerEvent("LayerTree.layerTreeDidChange", ["layers"]);
  inspectorBackend2.registerCommand("LayerTree.compositingReasons", [{ "name": "layerId", "type": "string", "optional": false, "description": "The id of the layer for which we want to get the reasons it was composited.", "typeRef": "LayerTree.LayerId" }], ["compositingReasons", "compositingReasonIds"], "Provides the reasons why the given layer was composited.");
  inspectorBackend2.registerCommand("LayerTree.disable", [], [], "Disables compositing tree inspection.");
  inspectorBackend2.registerCommand("LayerTree.enable", [], [], "Enables compositing tree inspection.");
  inspectorBackend2.registerCommand("LayerTree.loadSnapshot", [{ "name": "tiles", "type": "array", "optional": false, "description": "An array of tiles composing the snapshot.", "typeRef": "LayerTree.PictureTile" }], ["snapshotId"], "Returns the snapshot identifier.");
  inspectorBackend2.registerCommand("LayerTree.makeSnapshot", [{ "name": "layerId", "type": "string", "optional": false, "description": "The id of the layer.", "typeRef": "LayerTree.LayerId" }], ["snapshotId"], "Returns the layer snapshot identifier.");
  inspectorBackend2.registerCommand("LayerTree.profileSnapshot", [{ "name": "snapshotId", "type": "string", "optional": false, "description": "The id of the layer snapshot.", "typeRef": "LayerTree.SnapshotId" }, { "name": "minRepeatCount", "type": "number", "optional": true, "description": "The maximum number of times to replay the snapshot (1, if not specified).", "typeRef": null }, { "name": "minDuration", "type": "number", "optional": true, "description": "The minimum duration (in seconds) to replay the snapshot.", "typeRef": null }, { "name": "clipRect", "type": "object", "optional": true, "description": "The clip rectangle to apply when replaying the snapshot.", "typeRef": "DOM.Rect" }], ["timings"], "");
  inspectorBackend2.registerCommand("LayerTree.releaseSnapshot", [{ "name": "snapshotId", "type": "string", "optional": false, "description": "The id of the layer snapshot.", "typeRef": "LayerTree.SnapshotId" }], [], "Releases layer snapshot captured by the back-end.");
  inspectorBackend2.registerCommand("LayerTree.replaySnapshot", [{ "name": "snapshotId", "type": "string", "optional": false, "description": "The id of the layer snapshot.", "typeRef": "LayerTree.SnapshotId" }, { "name": "fromStep", "type": "number", "optional": true, "description": "The first step to replay from (replay from the very start if not specified).", "typeRef": null }, { "name": "toStep", "type": "number", "optional": true, "description": "The last step to replay to (replay till the end if not specified).", "typeRef": null }, { "name": "scale", "type": "number", "optional": true, "description": "The scale to apply while replaying (defaults to 1).", "typeRef": null }], ["dataURL"], "Replays the layer snapshot and returns the resulting bitmap.");
  inspectorBackend2.registerCommand("LayerTree.snapshotCommandLog", [{ "name": "snapshotId", "type": "string", "optional": false, "description": "The id of the layer snapshot.", "typeRef": "LayerTree.SnapshotId" }], ["commandLog"], "Replays the layer snapshot and returns canvas log.");
  inspectorBackend2.registerType("LayerTree.ScrollRect", [{ "name": "rect", "type": "object", "optional": false, "description": "Rectangle itself.", "typeRef": "DOM.Rect" }, { "name": "type", "type": "string", "optional": false, "description": "Reason for rectangle to force scrolling on the main thread", "typeRef": null }]);
  inspectorBackend2.registerType("LayerTree.StickyPositionConstraint", [{ "name": "stickyBoxRect", "type": "object", "optional": false, "description": "Layout rectangle of the sticky element before being shifted", "typeRef": "DOM.Rect" }, { "name": "containingBlockRect", "type": "object", "optional": false, "description": "Layout rectangle of the containing block of the sticky element", "typeRef": "DOM.Rect" }, { "name": "nearestLayerShiftingStickyBox", "type": "string", "optional": true, "description": "The nearest sticky layer that shifts the sticky box", "typeRef": "LayerTree.LayerId" }, { "name": "nearestLayerShiftingContainingBlock", "type": "string", "optional": true, "description": "The nearest sticky layer that shifts the containing block", "typeRef": "LayerTree.LayerId" }]);
  inspectorBackend2.registerType("LayerTree.PictureTile", [{ "name": "x", "type": "number", "optional": false, "description": "Offset from owning layer left boundary", "typeRef": null }, { "name": "y", "type": "number", "optional": false, "description": "Offset from owning layer top boundary", "typeRef": null }, { "name": "picture", "type": "string", "optional": false, "description": "Base64-encoded snapshot data.", "typeRef": null }]);
  inspectorBackend2.registerType("LayerTree.Layer", [{ "name": "layerId", "type": "string", "optional": false, "description": "The unique id for this layer.", "typeRef": "LayerTree.LayerId" }, { "name": "parentLayerId", "type": "string", "optional": true, "description": "The id of parent (not present for root).", "typeRef": "LayerTree.LayerId" }, { "name": "backendNodeId", "type": "number", "optional": true, "description": "The backend id for the node associated with this layer.", "typeRef": "DOM.BackendNodeId" }, { "name": "offsetX", "type": "number", "optional": false, "description": "Offset from parent layer, X coordinate.", "typeRef": null }, { "name": "offsetY", "type": "number", "optional": false, "description": "Offset from parent layer, Y coordinate.", "typeRef": null }, { "name": "width", "type": "number", "optional": false, "description": "Layer width.", "typeRef": null }, { "name": "height", "type": "number", "optional": false, "description": "Layer height.", "typeRef": null }, { "name": "transform", "type": "array", "optional": true, "description": "Transformation matrix for layer, default is identity matrix", "typeRef": "number" }, { "name": "anchorX", "type": "number", "optional": true, "description": "Transform anchor point X, absent if no transform specified", "typeRef": null }, { "name": "anchorY", "type": "number", "optional": true, "description": "Transform anchor point Y, absent if no transform specified", "typeRef": null }, { "name": "anchorZ", "type": "number", "optional": true, "description": "Transform anchor point Z, absent if no transform specified", "typeRef": null }, { "name": "paintCount", "type": "number", "optional": false, "description": "Indicates how many time this layer has painted.", "typeRef": null }, { "name": "drawsContent", "type": "boolean", "optional": false, "description": "Indicates whether this layer hosts any content, rather than being used for transform/scrolling purposes only.", "typeRef": null }, { "name": "invisible", "type": "boolean", "optional": true, "description": "Set if layer is not visible.", "typeRef": null }, { "name": "scrollRects", "type": "array", "optional": true, "description": "Rectangles scrolling on main thread only.", "typeRef": "LayerTree.ScrollRect" }, { "name": "stickyPositionConstraint", "type": "object", "optional": true, "description": "Sticky position constraint information", "typeRef": "LayerTree.StickyPositionConstraint" }]);
  inspectorBackend2.registerType("LayerTree.PaintProfile", [{ "name": "PaintProfile", "type": "array", "optional": false, "description": "Array of timings, one per paint step.", "typeRef": "number" }]);
  inspectorBackend2.registerEnum("Log.LogEntrySource", { XML: "xml", Javascript: "javascript", Network: "network", Storage: "storage", Appcache: "appcache", Rendering: "rendering", Security: "security", Deprecation: "deprecation", Worker: "worker", Violation: "violation", Intervention: "intervention", Recommendation: "recommendation", Other: "other" });
  inspectorBackend2.registerEnum("Log.LogEntryLevel", { Verbose: "verbose", Info: "info", Warning: "warning", Error: "error" });
  inspectorBackend2.registerEnum("Log.LogEntryCategory", { Cors: "cors" });
  inspectorBackend2.registerEnum("Log.ViolationSettingName", { LongTask: "longTask", LongLayout: "longLayout", BlockedEvent: "blockedEvent", BlockedParser: "blockedParser", DiscouragedAPIUse: "discouragedAPIUse", Handler: "handler", RecurringHandler: "recurringHandler" });
  inspectorBackend2.registerEvent("Log.entryAdded", ["entry"]);
  inspectorBackend2.registerCommand("Log.clear", [], [], "Clears the log.");
  inspectorBackend2.registerCommand("Log.disable", [], [], "Disables log domain, prevents further log entries from being reported to the client.");
  inspectorBackend2.registerCommand("Log.enable", [], [], "Enables log domain, sends the entries collected so far to the client by means of the `entryAdded` notification.");
  inspectorBackend2.registerCommand("Log.startViolationsReport", [{ "name": "config", "type": "array", "optional": false, "description": "Configuration for violations.", "typeRef": "Log.ViolationSetting" }], [], "start violation reporting.");
  inspectorBackend2.registerCommand("Log.stopViolationsReport", [], [], "Stop violation reporting.");
  inspectorBackend2.registerType("Log.LogEntry", [{ "name": "source", "type": "string", "optional": false, "description": "Log entry source.", "typeRef": null }, { "name": "level", "type": "string", "optional": false, "description": "Log entry severity.", "typeRef": null }, { "name": "text", "type": "string", "optional": false, "description": "Logged text.", "typeRef": null }, { "name": "category", "type": "string", "optional": true, "description": "", "typeRef": null }, { "name": "timestamp", "type": "number", "optional": false, "description": "Timestamp when this entry was added.", "typeRef": "Runtime.Timestamp" }, { "name": "url", "type": "string", "optional": true, "description": "URL of the resource if known.", "typeRef": null }, { "name": "lineNumber", "type": "number", "optional": true, "description": "Line number in the resource.", "typeRef": null }, { "name": "stackTrace", "type": "object", "optional": true, "description": "JavaScript stack trace.", "typeRef": "Runtime.StackTrace" }, { "name": "networkRequestId", "type": "string", "optional": true, "description": "Identifier of the network request associated with this entry.", "typeRef": "Network.RequestId" }, { "name": "workerId", "type": "string", "optional": true, "description": "Identifier of the worker associated with this entry.", "typeRef": null }, { "name": "args", "type": "array", "optional": true, "description": "Call arguments.", "typeRef": "Runtime.RemoteObject" }]);
  inspectorBackend2.registerType("Log.ViolationSetting", [{ "name": "name", "type": "string", "optional": false, "description": "Violation type.", "typeRef": null }, { "name": "threshold", "type": "number", "optional": false, "description": "Time threshold to trigger upon.", "typeRef": null }]);
  inspectorBackend2.registerEnum("Media.PlayerMessageLevel", { Error: "error", Warning: "warning", Info: "info", Debug: "debug" });
  inspectorBackend2.registerEvent("Media.playerPropertiesChanged", ["playerId", "properties"]);
  inspectorBackend2.registerEvent("Media.playerEventsAdded", ["playerId", "events"]);
  inspectorBackend2.registerEvent("Media.playerMessagesLogged", ["playerId", "messages"]);
  inspectorBackend2.registerEvent("Media.playerErrorsRaised", ["playerId", "errors"]);
  inspectorBackend2.registerEvent("Media.playerCreated", ["player"]);
  inspectorBackend2.registerCommand("Media.enable", [], [], "Enables the Media domain");
  inspectorBackend2.registerCommand("Media.disable", [], [], "Disables the Media domain.");
  inspectorBackend2.registerType("Media.PlayerMessage", [{ "name": "level", "type": "string", "optional": false, "description": "Keep in sync with MediaLogMessageLevel We are currently keeping the message level 'error' separate from the PlayerError type because right now they represent different things, this one being a DVLOG(ERROR) style log message that gets printed based on what log level is selected in the UI, and the other is a representation of a media::PipelineStatus object. Soon however we're going to be moving away from using PipelineStatus for errors and introducing a new error type which should hopefully let us integrate the error log level into the PlayerError type.", "typeRef": null }, { "name": "message", "type": "string", "optional": false, "description": "", "typeRef": null }]);
  inspectorBackend2.registerType("Media.PlayerProperty", [{ "name": "name", "type": "string", "optional": false, "description": "", "typeRef": null }, { "name": "value", "type": "string", "optional": false, "description": "", "typeRef": null }]);
  inspectorBackend2.registerType("Media.PlayerEvent", [{ "name": "timestamp", "type": "number", "optional": false, "description": "", "typeRef": "Media.Timestamp" }, { "name": "value", "type": "string", "optional": false, "description": "", "typeRef": null }]);
  inspectorBackend2.registerType("Media.PlayerErrorSourceLocation", [{ "name": "file", "type": "string", "optional": false, "description": "", "typeRef": null }, { "name": "line", "type": "number", "optional": false, "description": "", "typeRef": null }]);
  inspectorBackend2.registerType("Media.PlayerError", [{ "name": "errorType", "type": "string", "optional": false, "description": "", "typeRef": null }, { "name": "code", "type": "number", "optional": false, "description": "Code is the numeric enum entry for a specific set of error codes, such as PipelineStatusCodes in media/base/pipeline_status.h", "typeRef": null }, { "name": "stack", "type": "array", "optional": false, "description": "A trace of where this error was caused / where it passed through.", "typeRef": "Media.PlayerErrorSourceLocation" }, { "name": "cause", "type": "array", "optional": false, "description": "Errors potentially have a root cause error, ie, a DecoderError might be caused by an WindowsError", "typeRef": "Media.PlayerError" }, { "name": "data", "type": "object", "optional": false, "description": "Extra data attached to an error, such as an HRESULT, Video Codec, etc.", "typeRef": null }]);
  inspectorBackend2.registerType("Media.Player", [{ "name": "playerId", "type": "string", "optional": false, "description": "", "typeRef": "Media.PlayerId" }, { "name": "domNodeId", "type": "number", "optional": true, "description": "", "typeRef": "DOM.BackendNodeId" }]);
  inspectorBackend2.registerEnum("Memory.PressureLevel", { Moderate: "moderate", Critical: "critical" });
  inspectorBackend2.registerCommand("Memory.getDOMCounters", [], ["documents", "nodes", "jsEventListeners"], "Retruns current DOM object counters.");
  inspectorBackend2.registerCommand("Memory.getDOMCountersForLeakDetection", [], ["counters"], "Retruns DOM object counters after preparing renderer for leak detection.");
  inspectorBackend2.registerCommand("Memory.prepareForLeakDetection", [], [], "Prepares for leak detection by terminating workers, stopping spellcheckers, dropping non-essential internal caches, running garbage collections, etc.");
  inspectorBackend2.registerCommand("Memory.forciblyPurgeJavaScriptMemory", [], [], "Simulate OomIntervention by purging V8 memory.");
  inspectorBackend2.registerCommand("Memory.setPressureNotificationsSuppressed", [{ "name": "suppressed", "type": "boolean", "optional": false, "description": "If true, memory pressure notifications will be suppressed.", "typeRef": null }], [], "Enable/disable suppressing memory pressure notifications in all processes.");
  inspectorBackend2.registerCommand("Memory.simulatePressureNotification", [{ "name": "level", "type": "string", "optional": false, "description": "Memory pressure level of the notification.", "typeRef": "Memory.PressureLevel" }], [], "Simulate a memory pressure notification in all processes.");
  inspectorBackend2.registerCommand("Memory.startSampling", [{ "name": "samplingInterval", "type": "number", "optional": true, "description": "Average number of bytes between samples.", "typeRef": null }, { "name": "suppressRandomness", "type": "boolean", "optional": true, "description": "Do not randomize intervals between samples.", "typeRef": null }], [], "Start collecting native memory profile.");
  inspectorBackend2.registerCommand("Memory.stopSampling", [], [], "Stop collecting native memory profile.");
  inspectorBackend2.registerCommand("Memory.getAllTimeSamplingProfile", [], ["profile"], "Retrieve native memory allocations profile collected since renderer process startup.");
  inspectorBackend2.registerCommand("Memory.getBrowserSamplingProfile", [], ["profile"], "Retrieve native memory allocations profile collected since browser process startup.");
  inspectorBackend2.registerCommand("Memory.getSamplingProfile", [], ["profile"], "Retrieve native memory allocations profile collected since last `startSampling` call.");
  inspectorBackend2.registerType("Memory.SamplingProfileNode", [{ "name": "size", "type": "number", "optional": false, "description": "Size of the sampled allocation.", "typeRef": null }, { "name": "total", "type": "number", "optional": false, "description": "Total bytes attributed to this sample.", "typeRef": null }, { "name": "stack", "type": "array", "optional": false, "description": "Execution stack at the point of allocation.", "typeRef": "string" }]);
  inspectorBackend2.registerType("Memory.SamplingProfile", [{ "name": "samples", "type": "array", "optional": false, "description": "", "typeRef": "Memory.SamplingProfileNode" }, { "name": "modules", "type": "array", "optional": false, "description": "", "typeRef": "Memory.Module" }]);
  inspectorBackend2.registerType("Memory.Module", [{ "name": "name", "type": "string", "optional": false, "description": "Name of the module.", "typeRef": null }, { "name": "uuid", "type": "string", "optional": false, "description": "UUID of the module.", "typeRef": null }, { "name": "baseAddress", "type": "string", "optional": false, "description": "Base address where the module is loaded into memory. Encoded as a decimal or hexadecimal (0x prefixed) string.", "typeRef": null }, { "name": "size", "type": "number", "optional": false, "description": "Size of the module in bytes.", "typeRef": null }]);
  inspectorBackend2.registerType("Memory.DOMCounter", [{ "name": "name", "type": "string", "optional": false, "description": "Object name. Note: object names should be presumed volatile and clients should not expect the returned names to be consistent across runs.", "typeRef": null }, { "name": "count", "type": "number", "optional": false, "description": "Object count.", "typeRef": null }]);
  inspectorBackend2.registerEnum("Network.ResourceType", { Document: "Document", Stylesheet: "Stylesheet", Image: "Image", Media: "Media", Font: "Font", Script: "Script", TextTrack: "TextTrack", XHR: "XHR", Fetch: "Fetch", Prefetch: "Prefetch", EventSource: "EventSource", WebSocket: "WebSocket", Manifest: "Manifest", SignedExchange: "SignedExchange", Ping: "Ping", CSPViolationReport: "CSPViolationReport", Preflight: "Preflight", FedCM: "FedCM", Other: "Other" });
  inspectorBackend2.registerEnum("Network.ErrorReason", { Failed: "Failed", Aborted: "Aborted", TimedOut: "TimedOut", AccessDenied: "AccessDenied", ConnectionClosed: "ConnectionClosed", ConnectionReset: "ConnectionReset", ConnectionRefused: "ConnectionRefused", ConnectionAborted: "ConnectionAborted", ConnectionFailed: "ConnectionFailed", NameNotResolved: "NameNotResolved", InternetDisconnected: "InternetDisconnected", AddressUnreachable: "AddressUnreachable", BlockedByClient: "BlockedByClient", BlockedByResponse: "BlockedByResponse" });
  inspectorBackend2.registerEnum("Network.ConnectionType", { None: "none", Cellular2g: "cellular2g", Cellular3g: "cellular3g", Cellular4g: "cellular4g", Bluetooth: "bluetooth", Ethernet: "ethernet", Wifi: "wifi", Wimax: "wimax", Other: "other" });
  inspectorBackend2.registerEnum("Network.CookieSameSite", { Strict: "Strict", Lax: "Lax", None: "None" });
  inspectorBackend2.registerEnum("Network.CookiePriority", { Low: "Low", Medium: "Medium", High: "High" });
  inspectorBackend2.registerEnum("Network.CookieSourceScheme", { Unset: "Unset", NonSecure: "NonSecure", Secure: "Secure" });
  inspectorBackend2.registerEnum("Network.ResourcePriority", { VeryLow: "VeryLow", Low: "Low", Medium: "Medium", High: "High", VeryHigh: "VeryHigh" });
  inspectorBackend2.registerEnum("Network.RenderBlockingBehavior", { Blocking: "Blocking", InBodyParserBlocking: "InBodyParserBlocking", NonBlocking: "NonBlocking", NonBlockingDynamic: "NonBlockingDynamic", PotentiallyBlocking: "PotentiallyBlocking" });
  inspectorBackend2.registerEnum("Network.RequestReferrerPolicy", { UnsafeUrl: "unsafe-url", NoReferrerWhenDowngrade: "no-referrer-when-downgrade", NoReferrer: "no-referrer", Origin: "origin", OriginWhenCrossOrigin: "origin-when-cross-origin", SameOrigin: "same-origin", StrictOrigin: "strict-origin", StrictOriginWhenCrossOrigin: "strict-origin-when-cross-origin" });
  inspectorBackend2.registerEnum("Network.CertificateTransparencyCompliance", { Unknown: "unknown", NotCompliant: "not-compliant", Compliant: "compliant" });
  inspectorBackend2.registerEnum("Network.BlockedReason", { Other: "other", Csp: "csp", MixedContent: "mixed-content", Origin: "origin", Inspector: "inspector", Integrity: "integrity", SubresourceFilter: "subresource-filter", ContentType: "content-type", CoepFrameResourceNeedsCoepHeader: "coep-frame-resource-needs-coep-header", CoopSandboxedIframeCannotNavigateToCoopPage: "coop-sandboxed-iframe-cannot-navigate-to-coop-page", CorpNotSameOrigin: "corp-not-same-origin", CorpNotSameOriginAfterDefaultedToSameOriginByCoep: "corp-not-same-origin-after-defaulted-to-same-origin-by-coep", CorpNotSameOriginAfterDefaultedToSameOriginByDip: "corp-not-same-origin-after-defaulted-to-same-origin-by-dip", CorpNotSameOriginAfterDefaultedToSameOriginByCoepAndDip: "corp-not-same-origin-after-defaulted-to-same-origin-by-coep-and-dip", CorpNotSameSite: "corp-not-same-site", SriMessageSignatureMismatch: "sri-message-signature-mismatch" });
  inspectorBackend2.registerEnum("Network.CorsError", { DisallowedByMode: "DisallowedByMode", InvalidResponse: "InvalidResponse", WildcardOriginNotAllowed: "WildcardOriginNotAllowed", MissingAllowOriginHeader: "MissingAllowOriginHeader", MultipleAllowOriginValues: "MultipleAllowOriginValues", InvalidAllowOriginValue: "InvalidAllowOriginValue", AllowOriginMismatch: "AllowOriginMismatch", InvalidAllowCredentials: "InvalidAllowCredentials", CorsDisabledScheme: "CorsDisabledScheme", PreflightInvalidStatus: "PreflightInvalidStatus", PreflightDisallowedRedirect: "PreflightDisallowedRedirect", PreflightWildcardOriginNotAllowed: "PreflightWildcardOriginNotAllowed", PreflightMissingAllowOriginHeader: "PreflightMissingAllowOriginHeader", PreflightMultipleAllowOriginValues: "PreflightMultipleAllowOriginValues", PreflightInvalidAllowOriginValue: "PreflightInvalidAllowOriginValue", PreflightAllowOriginMismatch: "PreflightAllowOriginMismatch", PreflightInvalidAllowCredentials: "PreflightInvalidAllowCredentials", PreflightMissingAllowExternal: "PreflightMissingAllowExternal", PreflightInvalidAllowExternal: "PreflightInvalidAllowExternal", InvalidAllowMethodsPreflightResponse: "InvalidAllowMethodsPreflightResponse", InvalidAllowHeadersPreflightResponse: "InvalidAllowHeadersPreflightResponse", MethodDisallowedByPreflightResponse: "MethodDisallowedByPreflightResponse", HeaderDisallowedByPreflightResponse: "HeaderDisallowedByPreflightResponse", RedirectContainsCredentials: "RedirectContainsCredentials", InsecureLocalNetwork: "InsecureLocalNetwork", InvalidLocalNetworkAccess: "InvalidLocalNetworkAccess", NoCorsRedirectModeNotFollow: "NoCorsRedirectModeNotFollow", LocalNetworkAccessPermissionDenied: "LocalNetworkAccessPermissionDenied" });
  inspectorBackend2.registerEnum("Network.ServiceWorkerResponseSource", { CacheStorage: "cache-storage", HttpCache: "http-cache", FallbackCode: "fallback-code", Network: "network" });
  inspectorBackend2.registerEnum("Network.TrustTokenParamsRefreshPolicy", { UseCached: "UseCached", Refresh: "Refresh" });
  inspectorBackend2.registerEnum("Network.TrustTokenOperationType", { Issuance: "Issuance", Redemption: "Redemption", Signing: "Signing" });
  inspectorBackend2.registerEnum("Network.AlternateProtocolUsage", { AlternativeJobWonWithoutRace: "alternativeJobWonWithoutRace", AlternativeJobWonRace: "alternativeJobWonRace", MainJobWonRace: "mainJobWonRace", MappingMissing: "mappingMissing", Broken: "broken", DnsAlpnH3JobWonWithoutRace: "dnsAlpnH3JobWonWithoutRace", DnsAlpnH3JobWonRace: "dnsAlpnH3JobWonRace", UnspecifiedReason: "unspecifiedReason" });
  inspectorBackend2.registerEnum("Network.ServiceWorkerRouterSource", { Network: "network", Cache: "cache", FetchEvent: "fetch-event", RaceNetworkAndFetchHandler: "race-network-and-fetch-handler", RaceNetworkAndCache: "race-network-and-cache" });
  inspectorBackend2.registerEnum("Network.InitiatorType", { Parser: "parser", Script: "script", Preload: "preload", SignedExchange: "SignedExchange", Preflight: "preflight", FedCM: "FedCM", Other: "other" });
  inspectorBackend2.registerEnum("Network.SetCookieBlockedReason", { SecureOnly: "SecureOnly", SameSiteStrict: "SameSiteStrict", SameSiteLax: "SameSiteLax", SameSiteUnspecifiedTreatedAsLax: "SameSiteUnspecifiedTreatedAsLax", SameSiteNoneInsecure: "SameSiteNoneInsecure", UserPreferences: "UserPreferences", ThirdPartyPhaseout: "ThirdPartyPhaseout", ThirdPartyBlockedInFirstPartySet: "ThirdPartyBlockedInFirstPartySet", SyntaxError: "SyntaxError", SchemeNotSupported: "SchemeNotSupported", OverwriteSecure: "OverwriteSecure", InvalidDomain: "InvalidDomain", InvalidPrefix: "InvalidPrefix", UnknownError: "UnknownError", SchemefulSameSiteStrict: "SchemefulSameSiteStrict", SchemefulSameSiteLax: "SchemefulSameSiteLax", SchemefulSameSiteUnspecifiedTreatedAsLax: "SchemefulSameSiteUnspecifiedTreatedAsLax", NameValuePairExceedsMaxSize: "NameValuePairExceedsMaxSize", DisallowedCharacter: "DisallowedCharacter", NoCookieContent: "NoCookieContent" });
  inspectorBackend2.registerEnum("Network.CookieBlockedReason", { SecureOnly: "SecureOnly", NotOnPath: "NotOnPath", DomainMismatch: "DomainMismatch", SameSiteStrict: "SameSiteStrict", SameSiteLax: "SameSiteLax", SameSiteUnspecifiedTreatedAsLax: "SameSiteUnspecifiedTreatedAsLax", SameSiteNoneInsecure: "SameSiteNoneInsecure", UserPreferences: "UserPreferences", ThirdPartyPhaseout: "ThirdPartyPhaseout", ThirdPartyBlockedInFirstPartySet: "ThirdPartyBlockedInFirstPartySet", UnknownError: "UnknownError", SchemefulSameSiteStrict: "SchemefulSameSiteStrict", SchemefulSameSiteLax: "SchemefulSameSiteLax", SchemefulSameSiteUnspecifiedTreatedAsLax: "SchemefulSameSiteUnspecifiedTreatedAsLax", NameValuePairExceedsMaxSize: "NameValuePairExceedsMaxSize", PortMismatch: "PortMismatch", SchemeMismatch: "SchemeMismatch", AnonymousContext: "AnonymousContext" });
  inspectorBackend2.registerEnum("Network.CookieExemptionReason", { None: "None", UserSetting: "UserSetting", TPCDMetadata: "TPCDMetadata", TPCDDeprecationTrial: "TPCDDeprecationTrial", TopLevelTPCDDeprecationTrial: "TopLevelTPCDDeprecationTrial", TPCDHeuristics: "TPCDHeuristics", EnterprisePolicy: "EnterprisePolicy", StorageAccess: "StorageAccess", TopLevelStorageAccess: "TopLevelStorageAccess", Scheme: "Scheme", SameSiteNoneCookiesInSandbox: "SameSiteNoneCookiesInSandbox" });
  inspectorBackend2.registerEnum("Network.AuthChallengeSource", { Server: "Server", Proxy: "Proxy" });
  inspectorBackend2.registerEnum("Network.AuthChallengeResponseResponse", { Default: "Default", CancelAuth: "CancelAuth", ProvideCredentials: "ProvideCredentials" });
  inspectorBackend2.registerEnum("Network.InterceptionStage", { Request: "Request", HeadersReceived: "HeadersReceived" });
  inspectorBackend2.registerEnum("Network.SignedExchangeErrorField", { SignatureSig: "signatureSig", SignatureIntegrity: "signatureIntegrity", SignatureCertUrl: "signatureCertUrl", SignatureCertSha256: "signatureCertSha256", SignatureValidityUrl: "signatureValidityUrl", SignatureTimestamps: "signatureTimestamps" });
  inspectorBackend2.registerEnum("Network.ContentEncoding", { Deflate: "deflate", Gzip: "gzip", Br: "br", Zstd: "zstd" });
  inspectorBackend2.registerEnum("Network.DirectSocketDnsQueryType", { Ipv4: "ipv4", Ipv6: "ipv6" });
  inspectorBackend2.registerEnum("Network.LocalNetworkAccessRequestPolicy", { Allow: "Allow", BlockFromInsecureToMorePrivate: "BlockFromInsecureToMorePrivate", WarnFromInsecureToMorePrivate: "WarnFromInsecureToMorePrivate", PermissionBlock: "PermissionBlock", PermissionWarn: "PermissionWarn" });
  inspectorBackend2.registerEnum("Network.IPAddressSpace", { Loopback: "Loopback", Local: "Local", Public: "Public", Unknown: "Unknown" });
  inspectorBackend2.registerEnum("Network.CrossOriginOpenerPolicyValue", { SameOrigin: "SameOrigin", SameOriginAllowPopups: "SameOriginAllowPopups", RestrictProperties: "RestrictProperties", UnsafeNone: "UnsafeNone", SameOriginPlusCoep: "SameOriginPlusCoep", RestrictPropertiesPlusCoep: "RestrictPropertiesPlusCoep", NoopenerAllowPopups: "NoopenerAllowPopups" });
  inspectorBackend2.registerEnum("Network.CrossOriginEmbedderPolicyValue", { None: "None", Credentialless: "Credentialless", RequireCorp: "RequireCorp" });
  inspectorBackend2.registerEnum("Network.ContentSecurityPolicySource", { HTTP: "HTTP", Meta: "Meta" });
  inspectorBackend2.registerEnum("Network.ReportStatus", { Queued: "Queued", Pending: "Pending", MarkedForRemoval: "MarkedForRemoval", Success: "Success" });
  inspectorBackend2.registerEnum("Network.DeviceBoundSessionWithUsageUsage", { NotInScope: "NotInScope", InScopeRefreshNotYetNeeded: "InScopeRefreshNotYetNeeded", InScopeRefreshNotAllowed: "InScopeRefreshNotAllowed", ProactiveRefreshNotPossible: "ProactiveRefreshNotPossible", ProactiveRefreshAttempted: "ProactiveRefreshAttempted", Deferred: "Deferred" });
  inspectorBackend2.registerEnum("Network.DeviceBoundSessionUrlRuleRuleType", { Exclude: "Exclude", Include: "Include" });
  inspectorBackend2.registerEnum("Network.DeviceBoundSessionFetchResult", { Success: "Success", KeyError: "KeyError", SigningError: "SigningError", ServerRequestedTermination: "ServerRequestedTermination", InvalidSessionId: "InvalidSessionId", InvalidChallenge: "InvalidChallenge", TooManyChallenges: "TooManyChallenges", InvalidFetcherUrl: "InvalidFetcherUrl", InvalidRefreshUrl: "InvalidRefreshUrl", TransientHttpError: "TransientHttpError", ScopeOriginSameSiteMismatch: "ScopeOriginSameSiteMismatch", RefreshUrlSameSiteMismatch: "RefreshUrlSameSiteMismatch", MismatchedSessionId: "MismatchedSessionId", MissingScope: "MissingScope", NoCredentials: "NoCredentials", SubdomainRegistrationWellKnownUnavailable: "SubdomainRegistrationWellKnownUnavailable", SubdomainRegistrationUnauthorized: "SubdomainRegistrationUnauthorized", SubdomainRegistrationWellKnownMalformed: "SubdomainRegistrationWellKnownMalformed", SessionProviderWellKnownUnavailable: "SessionProviderWellKnownUnavailable", RelyingPartyWellKnownUnavailable: "RelyingPartyWellKnownUnavailable", FederatedKeyThumbprintMismatch: "FederatedKeyThumbprintMismatch", InvalidFederatedSessionUrl: "InvalidFederatedSessionUrl", InvalidFederatedKey: "InvalidFederatedKey", TooManyRelyingOriginLabels: "TooManyRelyingOriginLabels", BoundCookieSetForbidden: "BoundCookieSetForbidden", NetError: "NetError", ProxyError: "ProxyError", EmptySessionConfig: "EmptySessionConfig", InvalidCredentialsConfig: "InvalidCredentialsConfig", InvalidCredentialsType: "InvalidCredentialsType", InvalidCredentialsEmptyName: "InvalidCredentialsEmptyName", InvalidCredentialsCookie: "InvalidCredentialsCookie", PersistentHttpError: "PersistentHttpError", RegistrationAttemptedChallenge: "RegistrationAttemptedChallenge", InvalidScopeOrigin: "InvalidScopeOrigin", ScopeOriginContainsPath: "ScopeOriginContainsPath", RefreshInitiatorNotString: "RefreshInitiatorNotString", RefreshInitiatorInvalidHostPattern: "RefreshInitiatorInvalidHostPattern", InvalidScopeSpecification: "InvalidScopeSpecification", MissingScopeSpecificationType: "MissingScopeSpecificationType", EmptyScopeSpecificationDomain: "EmptyScopeSpecificationDomain", EmptyScopeSpecificationPath: "EmptyScopeSpecificationPath", InvalidScopeSpecificationType: "InvalidScopeSpecificationType", InvalidScopeIncludeSite: "InvalidScopeIncludeSite", MissingScopeIncludeSite: "MissingScopeIncludeSite", FederatedNotAuthorizedByProvider: "FederatedNotAuthorizedByProvider", FederatedNotAuthorizedByRelyingParty: "FederatedNotAuthorizedByRelyingParty", SessionProviderWellKnownMalformed: "SessionProviderWellKnownMalformed", SessionProviderWellKnownHasProviderOrigin: "SessionProviderWellKnownHasProviderOrigin", RelyingPartyWellKnownMalformed: "RelyingPartyWellKnownMalformed", RelyingPartyWellKnownHasRelyingOrigins: "RelyingPartyWellKnownHasRelyingOrigins", InvalidFederatedSessionProviderSessionMissing: "InvalidFederatedSessionProviderSessionMissing", InvalidFederatedSessionWrongProviderOrigin: "InvalidFederatedSessionWrongProviderOrigin", InvalidCredentialsCookieCreationTime: "InvalidCredentialsCookieCreationTime", InvalidCredentialsCookieName: "InvalidCredentialsCookieName", InvalidCredentialsCookieParsing: "InvalidCredentialsCookieParsing", InvalidCredentialsCookieUnpermittedAttribute: "InvalidCredentialsCookieUnpermittedAttribute", InvalidCredentialsCookieInvalidDomain: "InvalidCredentialsCookieInvalidDomain", InvalidCredentialsCookiePrefix: "InvalidCredentialsCookiePrefix", InvalidScopeRulePath: "InvalidScopeRulePath", InvalidScopeRuleHostPattern: "InvalidScopeRuleHostPattern", ScopeRuleOriginScopedHostPatternMismatch: "ScopeRuleOriginScopedHostPatternMismatch", ScopeRuleSiteScopedHostPatternMismatch: "ScopeRuleSiteScopedHostPatternMismatch", SigningQuotaExceeded: "SigningQuotaExceeded", InvalidConfigJson: "InvalidConfigJson", InvalidFederatedSessionProviderFailedToRestoreKey: "InvalidFederatedSessionProviderFailedToRestoreKey", FailedToUnwrapKey: "FailedToUnwrapKey", SessionDeletedDuringRefresh: "SessionDeletedDuringRefresh" });
  inspectorBackend2.registerEnum("Network.RefreshEventDetailsRefreshResult", { Refreshed: "Refreshed", InitializedService: "InitializedService", Unreachable: "Unreachable", ServerError: "ServerError", RefreshQuotaExceeded: "RefreshQuotaExceeded", FatalError: "FatalError", SigningQuotaExceeded: "SigningQuotaExceeded" });
  inspectorBackend2.registerEnum("Network.TerminationEventDetailsDeletionReason", { Expired: "Expired", FailedToRestoreKey: "FailedToRestoreKey", FailedToUnwrapKey: "FailedToUnwrapKey", StoragePartitionCleared: "StoragePartitionCleared", ClearBrowsingData: "ClearBrowsingData", ServerRequested: "ServerRequested", InvalidSessionParams: "InvalidSessionParams", RefreshFatalError: "RefreshFatalError" });
  inspectorBackend2.registerEnum("Network.ChallengeEventDetailsChallengeResult", { Success: "Success", NoSessionId: "NoSessionId", NoSessionMatch: "NoSessionMatch", CantSetBoundCookie: "CantSetBoundCookie" });
  inspectorBackend2.registerEvent("Network.dataReceived", ["requestId", "timestamp", "dataLength", "encodedDataLength", "data"]);
  inspectorBackend2.registerEvent("Network.eventSourceMessageReceived", ["requestId", "timestamp", "eventName", "eventId", "data"]);
  inspectorBackend2.registerEvent("Network.loadingFailed", ["requestId", "timestamp", "type", "errorText", "canceled", "blockedReason", "corsErrorStatus"]);
  inspectorBackend2.registerEvent("Network.loadingFinished", ["requestId", "timestamp", "encodedDataLength"]);
  inspectorBackend2.registerEvent("Network.requestIntercepted", ["interceptionId", "request", "frameId", "resourceType", "isNavigationRequest", "isDownload", "redirectUrl", "authChallenge", "responseErrorReason", "responseStatusCode", "responseHeaders", "requestId"]);
  inspectorBackend2.registerEvent("Network.requestServedFromCache", ["requestId"]);
  inspectorBackend2.registerEvent("Network.requestWillBeSent", ["requestId", "loaderId", "documentURL", "request", "timestamp", "wallTime", "initiator", "redirectHasExtraInfo", "redirectResponse", "type", "frameId", "hasUserGesture", "renderBlockingBehavior"]);
  inspectorBackend2.registerEvent("Network.resourceChangedPriority", ["requestId", "newPriority", "timestamp"]);
  inspectorBackend2.registerEvent("Network.signedExchangeReceived", ["requestId", "info"]);
  inspectorBackend2.registerEvent("Network.responseReceived", ["requestId", "loaderId", "timestamp", "type", "response", "hasExtraInfo", "frameId"]);
  inspectorBackend2.registerEvent("Network.webSocketClosed", ["requestId", "timestamp"]);
  inspectorBackend2.registerEvent("Network.webSocketCreated", ["requestId", "url", "initiator"]);
  inspectorBackend2.registerEvent("Network.webSocketFrameError", ["requestId", "timestamp", "errorMessage"]);
  inspectorBackend2.registerEvent("Network.webSocketFrameReceived", ["requestId", "timestamp", "response"]);
  inspectorBackend2.registerEvent("Network.webSocketFrameSent", ["requestId", "timestamp", "response"]);
  inspectorBackend2.registerEvent("Network.webSocketHandshakeResponseReceived", ["requestId", "timestamp", "response"]);
  inspectorBackend2.registerEvent("Network.webSocketWillSendHandshakeRequest", ["requestId", "timestamp", "wallTime", "request"]);
  inspectorBackend2.registerEvent("Network.webTransportCreated", ["transportId", "url", "timestamp", "initiator"]);
  inspectorBackend2.registerEvent("Network.webTransportConnectionEstablished", ["transportId", "timestamp"]);
  inspectorBackend2.registerEvent("Network.webTransportClosed", ["transportId", "timestamp"]);
  inspectorBackend2.registerEvent("Network.directTCPSocketCreated", ["identifier", "remoteAddr", "remotePort", "options", "timestamp", "initiator"]);
  inspectorBackend2.registerEvent("Network.directTCPSocketOpened", ["identifier", "remoteAddr", "remotePort", "timestamp", "localAddr", "localPort"]);
  inspectorBackend2.registerEvent("Network.directTCPSocketAborted", ["identifier", "errorMessage", "timestamp"]);
  inspectorBackend2.registerEvent("Network.directTCPSocketClosed", ["identifier", "timestamp"]);
  inspectorBackend2.registerEvent("Network.directTCPSocketChunkSent", ["identifier", "data", "timestamp"]);
  inspectorBackend2.registerEvent("Network.directTCPSocketChunkReceived", ["identifier", "data", "timestamp"]);
  inspectorBackend2.registerEvent("Network.directUDPSocketJoinedMulticastGroup", ["identifier", "IPAddress"]);
  inspectorBackend2.registerEvent("Network.directUDPSocketLeftMulticastGroup", ["identifier", "IPAddress"]);
  inspectorBackend2.registerEvent("Network.directUDPSocketCreated", ["identifier", "options", "timestamp", "initiator"]);
  inspectorBackend2.registerEvent("Network.directUDPSocketOpened", ["identifier", "localAddr", "localPort", "timestamp", "remoteAddr", "remotePort"]);
  inspectorBackend2.registerEvent("Network.directUDPSocketAborted", ["identifier", "errorMessage", "timestamp"]);
  inspectorBackend2.registerEvent("Network.directUDPSocketClosed", ["identifier", "timestamp"]);
  inspectorBackend2.registerEvent("Network.directUDPSocketChunkSent", ["identifier", "message", "timestamp"]);
  inspectorBackend2.registerEvent("Network.directUDPSocketChunkReceived", ["identifier", "message", "timestamp"]);
  inspectorBackend2.registerEvent("Network.requestWillBeSentExtraInfo", ["requestId", "associatedCookies", "headers", "connectTiming", "deviceBoundSessionUsages", "clientSecurityState", "siteHasCookieInOtherPartition", "appliedNetworkConditionsId"]);
  inspectorBackend2.registerEvent("Network.responseReceivedExtraInfo", ["requestId", "blockedCookies", "headers", "resourceIPAddressSpace", "statusCode", "headersText", "cookiePartitionKey", "cookiePartitionKeyOpaque", "exemptedCookies"]);
  inspectorBackend2.registerEvent("Network.responseReceivedEarlyHints", ["requestId", "headers"]);
  inspectorBackend2.registerEnum("Network.TrustTokenOperationDoneEventStatus", { Ok: "Ok", InvalidArgument: "InvalidArgument", MissingIssuerKeys: "MissingIssuerKeys", FailedPrecondition: "FailedPrecondition", ResourceExhausted: "ResourceExhausted", AlreadyExists: "AlreadyExists", ResourceLimited: "ResourceLimited", Unauthorized: "Unauthorized", BadResponse: "BadResponse", InternalError: "InternalError", UnknownError: "UnknownError", FulfilledLocally: "FulfilledLocally", SiteIssuerLimit: "SiteIssuerLimit" });
  inspectorBackend2.registerEvent("Network.trustTokenOperationDone", ["status", "type", "requestId", "topLevelOrigin", "issuerOrigin", "issuedTokenCount"]);
  inspectorBackend2.registerEvent("Network.policyUpdated", []);
  inspectorBackend2.registerEvent("Network.reportingApiReportAdded", ["report"]);
  inspectorBackend2.registerEvent("Network.reportingApiReportUpdated", ["report"]);
  inspectorBackend2.registerEvent("Network.reportingApiEndpointsChangedForOrigin", ["origin", "endpoints"]);
  inspectorBackend2.registerEvent("Network.deviceBoundSessionsAdded", ["sessions"]);
  inspectorBackend2.registerEvent("Network.deviceBoundSessionEventOccurred", ["eventId", "site", "succeeded", "sessionId", "creationEventDetails", "refreshEventDetails", "terminationEventDetails", "challengeEventDetails"]);
  inspectorBackend2.registerCommand("Network.setAcceptedEncodings", [{ "name": "encodings", "type": "array", "optional": false, "description": "List of accepted content encodings.", "typeRef": "Network.ContentEncoding" }], [], "Sets a list of content encodings that will be accepted. Empty list means no encoding is accepted.");
  inspectorBackend2.registerCommand("Network.clearAcceptedEncodingsOverride", [], [], "Clears accepted encodings set by setAcceptedEncodings");
  inspectorBackend2.registerCommand("Network.canClearBrowserCache", [], ["result"], "Tells whether clearing browser cache is supported.");
  inspectorBackend2.registerCommand("Network.canClearBrowserCookies", [], ["result"], "Tells whether clearing browser cookies is supported.");
  inspectorBackend2.registerCommand("Network.canEmulateNetworkConditions", [], ["result"], "Tells whether emulation of network conditions is supported.");
  inspectorBackend2.registerCommand("Network.clearBrowserCache", [], [], "Clears browser cache.");
  inspectorBackend2.registerCommand("Network.clearBrowserCookies", [], [], "Clears browser cookies.");
  inspectorBackend2.registerCommand("Network.continueInterceptedRequest", [{ "name": "interceptionId", "type": "string", "optional": false, "description": "", "typeRef": "Network.InterceptionId" }, { "name": "errorReason", "type": "string", "optional": true, "description": "If set this causes the request to fail with the given reason. Passing `Aborted` for requests marked with `isNavigationRequest` also cancels the navigation. Must not be set in response to an authChallenge.", "typeRef": "Network.ErrorReason" }, { "name": "rawResponse", "type": "string", "optional": true, "description": "If set the requests completes using with the provided base64 encoded raw response, including HTTP status line and headers etc... Must not be set in response to an authChallenge.", "typeRef": null }, { "name": "url", "type": "string", "optional": true, "description": "If set the request url will be modified in a way that's not observable by page. Must not be set in response to an authChallenge.", "typeRef": null }, { "name": "method", "type": "string", "optional": true, "description": "If set this allows the request method to be overridden. Must not be set in response to an authChallenge.", "typeRef": null }, { "name": "postData", "type": "string", "optional": true, "description": "If set this allows postData to be set. Must not be set in response to an authChallenge.", "typeRef": null }, { "name": "headers", "type": "object", "optional": true, "description": "If set this allows the request headers to be changed. Must not be set in response to an authChallenge.", "typeRef": "Network.Headers" }, { "name": "authChallengeResponse", "type": "object", "optional": true, "description": "Response to a requestIntercepted with an authChallenge. Must not be set otherwise.", "typeRef": "Network.AuthChallengeResponse" }], [], "Response to Network.requestIntercepted which either modifies the request to continue with any modifications, or blocks it, or completes it with the provided response bytes. If a network fetch occurs as a result which encounters a redirect an additional Network.requestIntercepted event will be sent with the same InterceptionId. Deprecated, use Fetch.continueRequest, Fetch.fulfillRequest and Fetch.failRequest instead.");
  inspectorBackend2.registerCommand("Network.deleteCookies", [{ "name": "name", "type": "string", "optional": false, "description": "Name of the cookies to remove.", "typeRef": null }, { "name": "url", "type": "string", "optional": true, "description": "If specified, deletes all the cookies with the given name where domain and path match provided URL.", "typeRef": null }, { "name": "domain", "type": "string", "optional": true, "description": "If specified, deletes only cookies with the exact domain.", "typeRef": null }, { "name": "path", "type": "string", "optional": true, "description": "If specified, deletes only cookies with the exact path.", "typeRef": null }, { "name": "partitionKey", "type": "object", "optional": true, "description": "If specified, deletes only cookies with the the given name and partitionKey where all partition key attributes match the cookie partition key attribute.", "typeRef": "Network.CookiePartitionKey" }], [], "Deletes browser cookies with matching name and url or domain/path/partitionKey pair.");
  inspectorBackend2.registerCommand("Network.disable", [], [], "Disables network tracking, prevents network events from being sent to the client.");
  inspectorBackend2.registerCommand("Network.emulateNetworkConditions", [{ "name": "offline", "type": "boolean", "optional": false, "description": "True to emulate internet disconnection.", "typeRef": null }, { "name": "latency", "type": "number", "optional": false, "description": "Minimum latency from request sent to response headers received (ms).", "typeRef": null }, { "name": "downloadThroughput", "type": "number", "optional": false, "description": "Maximal aggregated download throughput (bytes/sec). -1 disables download throttling.", "typeRef": null }, { "name": "uploadThroughput", "type": "number", "optional": false, "description": "Maximal aggregated upload throughput (bytes/sec).  -1 disables upload throttling.", "typeRef": null }, { "name": "connectionType", "type": "string", "optional": true, "description": "Connection type if known.", "typeRef": "Network.ConnectionType" }, { "name": "packetLoss", "type": "number", "optional": true, "description": "WebRTC packet loss (percent, 0-100). 0 disables packet loss emulation, 100 drops all the packets.", "typeRef": null }, { "name": "packetQueueLength", "type": "number", "optional": true, "description": "WebRTC packet queue length (packet). 0 removes any queue length limitations.", "typeRef": null }, { "name": "packetReordering", "type": "boolean", "optional": true, "description": "WebRTC packetReordering feature.", "typeRef": null }], [], "Activates emulation of network conditions. This command is deprecated in favor of the emulateNetworkConditionsByRule and overrideNetworkState commands, which can be used together to the same effect.");
  inspectorBackend2.registerCommand("Network.emulateNetworkConditionsByRule", [{ "name": "offline", "type": "boolean", "optional": false, "description": "True to emulate internet disconnection.", "typeRef": null }, { "name": "matchedNetworkConditions", "type": "array", "optional": false, "description": "Configure conditions for matching requests. If multiple entries match a request, the first entry wins.  Global conditions can be configured by leaving the urlPattern for the conditions empty. These global conditions are also applied for throttling of p2p connections.", "typeRef": "Network.NetworkConditions" }], ["ruleIds"], "Activates emulation of network conditions for individual requests using URL match patterns. Unlike the deprecated Network.emulateNetworkConditions this method does not affect `navigator` state. Use Network.overrideNetworkState to explicitly modify `navigator` behavior.");
  inspectorBackend2.registerCommand("Network.overrideNetworkState", [{ "name": "offline", "type": "boolean", "optional": false, "description": "True to emulate internet disconnection.", "typeRef": null }, { "name": "latency", "type": "number", "optional": false, "description": "Minimum latency from request sent to response headers received (ms).", "typeRef": null }, { "name": "downloadThroughput", "type": "number", "optional": false, "description": "Maximal aggregated download throughput (bytes/sec). -1 disables download throttling.", "typeRef": null }, { "name": "uploadThroughput", "type": "number", "optional": false, "description": "Maximal aggregated upload throughput (bytes/sec).  -1 disables upload throttling.", "typeRef": null }, { "name": "connectionType", "type": "string", "optional": true, "description": "Connection type if known.", "typeRef": "Network.ConnectionType" }], [], "Override the state of navigator.onLine and navigator.connection.");
  inspectorBackend2.registerCommand("Network.enable", [{ "name": "maxTotalBufferSize", "type": "number", "optional": true, "description": "Buffer size in bytes to use when preserving network payloads (XHRs, etc). This is the maximum number of bytes that will be collected by this DevTools session.", "typeRef": null }, { "name": "maxResourceBufferSize", "type": "number", "optional": true, "description": "Per-resource buffer size in bytes to use when preserving network payloads (XHRs, etc).", "typeRef": null }, { "name": "maxPostDataSize", "type": "number", "optional": true, "description": "Longest post body size (in bytes) that would be included in requestWillBeSent notification", "typeRef": null }, { "name": "reportDirectSocketTraffic", "type": "boolean", "optional": true, "description": "Whether DirectSocket chunk send/receive events should be reported.", "typeRef": null }, { "name": "enableDurableMessages", "type": "boolean", "optional": true, "description": "Enable storing response bodies outside of renderer, so that these survive a cross-process navigation. Requires maxTotalBufferSize to be set. Currently defaults to false. This field is being deprecated in favor of the dedicated configureDurableMessages command, due to the possibility of deadlocks when awaiting Network.enable before issuing Runtime.runIfWaitingForDebugger.", "typeRef": null }], [], "Enables network tracking, network events will now be delivered to the client.");
  inspectorBackend2.registerCommand("Network.configureDurableMessages", [{ "name": "maxTotalBufferSize", "type": "number", "optional": true, "description": "Buffer size in bytes to use when preserving network payloads (XHRs, etc).", "typeRef": null }, { "name": "maxResourceBufferSize", "type": "number", "optional": true, "description": "Per-resource buffer size in bytes to use when preserving network payloads (XHRs, etc).", "typeRef": null }], [], "Configures storing response bodies outside of renderer, so that these survive a cross-process navigation. If maxTotalBufferSize is not set, durable messages are disabled.");
  inspectorBackend2.registerCommand("Network.getAllCookies", [], ["cookies"], "Returns all browser cookies. Depending on the backend support, will return detailed cookie information in the `cookies` field. Deprecated. Use Storage.getCookies instead.");
  inspectorBackend2.registerCommand("Network.getCertificate", [{ "name": "origin", "type": "string", "optional": false, "description": "Origin to get certificate for.", "typeRef": null }], ["tableNames"], "Returns the DER-encoded certificate.");
  inspectorBackend2.registerCommand("Network.getCookies", [{ "name": "urls", "type": "array", "optional": true, "description": "The list of URLs for which applicable cookies will be fetched. If not specified, it's assumed to be set to the list containing the URLs of the page and all of its subframes.", "typeRef": "string" }], ["cookies"], "Returns all browser cookies for the current URL. Depending on the backend support, will return detailed cookie information in the `cookies` field.");
  inspectorBackend2.registerCommand("Network.getResponseBody", [{ "name": "requestId", "type": "string", "optional": false, "description": "Identifier of the network request to get content for.", "typeRef": "Network.RequestId" }], ["body", "base64Encoded"], "Returns content served for the given request.");
  inspectorBackend2.registerCommand("Network.getRequestPostData", [{ "name": "requestId", "type": "string", "optional": false, "description": "Identifier of the network request to get content for.", "typeRef": "Network.RequestId" }], ["postData", "base64Encoded"], "Returns post data sent with the request. Returns an error when no data was sent with the request.");
  inspectorBackend2.registerCommand("Network.getResponseBodyForInterception", [{ "name": "interceptionId", "type": "string", "optional": false, "description": "Identifier for the intercepted request to get body for.", "typeRef": "Network.InterceptionId" }], ["body", "base64Encoded"], "Returns content served for the given currently intercepted request.");
  inspectorBackend2.registerCommand("Network.takeResponseBodyForInterceptionAsStream", [{ "name": "interceptionId", "type": "string", "optional": false, "description": "", "typeRef": "Network.InterceptionId" }], ["stream"], "Returns a handle to the stream representing the response body. Note that after this command, the intercepted request can't be continued as is -- you either need to cancel it or to provide the response body. The stream only supports sequential read, IO.read will fail if the position is specified.");
  inspectorBackend2.registerCommand("Network.replayXHR", [{ "name": "requestId", "type": "string", "optional": false, "description": "Identifier of XHR to replay.", "typeRef": "Network.RequestId" }], [], "This method sends a new XMLHttpRequest which is identical to the original one. The following parameters should be identical: method, url, async, request body, extra headers, withCredentials attribute, user, password.");
  inspectorBackend2.registerCommand("Network.searchInResponseBody", [{ "name": "requestId", "type": "string", "optional": false, "description": "Identifier of the network response to search.", "typeRef": "Network.RequestId" }, { "name": "query", "type": "string", "optional": false, "description": "String to search for.", "typeRef": null }, { "name": "caseSensitive", "type": "boolean", "optional": true, "description": "If true, search is case sensitive.", "typeRef": null }, { "name": "isRegex", "type": "boolean", "optional": true, "description": "If true, treats string parameter as regex.", "typeRef": null }], ["result"], "Searches for given string in response content.");
  inspectorBackend2.registerCommand("Network.setBlockedURLs", [{ "name": "urlPatterns", "type": "array", "optional": true, "description": "Patterns to match in the order in which they are given. These patterns also take precedence over any wildcard patterns defined in `urls`.", "typeRef": "Network.BlockPattern" }, { "name": "urls", "type": "array", "optional": true, "description": "URL patterns to block. Wildcards ('*') are allowed.", "typeRef": "string" }], [], "Blocks URLs from loading.");
  inspectorBackend2.registerCommand("Network.setBypassServiceWorker", [{ "name": "bypass", "type": "boolean", "optional": false, "description": "Bypass service worker and load from network.", "typeRef": null }], [], "Toggles ignoring of service worker for each request.");
  inspectorBackend2.registerCommand("Network.setCacheDisabled", [{ "name": "cacheDisabled", "type": "boolean", "optional": false, "description": "Cache disabled state.", "typeRef": null }], [], "Toggles ignoring cache for each request. If `true`, cache will not be used.");
  inspectorBackend2.registerCommand("Network.setCookie", [{ "name": "name", "type": "string", "optional": false, "description": "Cookie name.", "typeRef": null }, { "name": "value", "type": "string", "optional": false, "description": "Cookie value.", "typeRef": null }, { "name": "url", "type": "string", "optional": true, "description": "The request-URI to associate with the setting of the cookie. This value can affect the default domain, path, source port, and source scheme values of the created cookie.", "typeRef": null }, { "name": "domain", "type": "string", "optional": true, "description": "Cookie domain.", "typeRef": null }, { "name": "path", "type": "string", "optional": true, "description": "Cookie path.", "typeRef": null }, { "name": "secure", "type": "boolean", "optional": true, "description": "True if cookie is secure.", "typeRef": null }, { "name": "httpOnly", "type": "boolean", "optional": true, "description": "True if cookie is http-only.", "typeRef": null }, { "name": "sameSite", "type": "string", "optional": true, "description": "Cookie SameSite type.", "typeRef": "Network.CookieSameSite" }, { "name": "expires", "type": "number", "optional": true, "description": "Cookie expiration date, session cookie if not set", "typeRef": "Network.TimeSinceEpoch" }, { "name": "priority", "type": "string", "optional": true, "description": "Cookie Priority type.", "typeRef": "Network.CookiePriority" }, { "name": "sourceScheme", "type": "string", "optional": true, "description": "Cookie source scheme type.", "typeRef": "Network.CookieSourceScheme" }, { "name": "sourcePort", "type": "number", "optional": true, "description": "Cookie source port. Valid values are {-1, [1, 65535]}, -1 indicates an unspecified port. An unspecified port value allows protocol clients to emulate legacy cookie scope for the port. This is a temporary ability and it will be removed in the future.", "typeRef": null }, { "name": "partitionKey", "type": "object", "optional": true, "description": "Cookie partition key. If not set, the cookie will be set as not partitioned.", "typeRef": "Network.CookiePartitionKey" }], ["success"], "Sets a cookie with the given cookie data; may overwrite equivalent cookies if they exist.");
  inspectorBackend2.registerCommand("Network.setCookies", [{ "name": "cookies", "type": "array", "optional": false, "description": "Cookies to be set.", "typeRef": "Network.CookieParam" }], [], "Sets given cookies.");
  inspectorBackend2.registerCommand("Network.setExtraHTTPHeaders", [{ "name": "headers", "type": "object", "optional": false, "description": "Map with extra HTTP headers.", "typeRef": "Network.Headers" }], [], "Specifies whether to always send extra HTTP headers with the requests from this page.");
  inspectorBackend2.registerCommand("Network.setAttachDebugStack", [{ "name": "enabled", "type": "boolean", "optional": false, "description": "Whether to attach a page script stack for debugging purpose.", "typeRef": null }], [], "Specifies whether to attach a page script stack id in requests");
  inspectorBackend2.registerCommand("Network.setRequestInterception", [{ "name": "patterns", "type": "array", "optional": false, "description": "Requests matching any of these patterns will be forwarded and wait for the corresponding continueInterceptedRequest call.", "typeRef": "Network.RequestPattern" }], [], "Sets the requests to intercept that match the provided patterns and optionally resource types. Deprecated, please use Fetch.enable instead.");
  inspectorBackend2.registerCommand("Network.setUserAgentOverride", [{ "name": "userAgent", "type": "string", "optional": false, "description": "User agent to use.", "typeRef": null }, { "name": "acceptLanguage", "type": "string", "optional": true, "description": "Browser language to emulate.", "typeRef": null }, { "name": "platform", "type": "string", "optional": true, "description": "The platform navigator.platform should return.", "typeRef": null }, { "name": "userAgentMetadata", "type": "object", "optional": true, "description": "To be sent in Sec-CH-UA-* headers and returned in navigator.userAgentData", "typeRef": "Emulation.UserAgentMetadata" }], [], "Allows overriding user agent with the given string.");
  inspectorBackend2.registerCommand("Network.streamResourceContent", [{ "name": "requestId", "type": "string", "optional": false, "description": "Identifier of the request to stream.", "typeRef": "Network.RequestId" }], ["bufferedData"], "Enables streaming of the response for the given requestId. If enabled, the dataReceived event contains the data that was received during streaming.");
  inspectorBackend2.registerCommand("Network.getSecurityIsolationStatus", [{ "name": "frameId", "type": "string", "optional": true, "description": "If no frameId is provided, the status of the target is provided.", "typeRef": "Page.FrameId" }], ["status"], "Returns information about the COEP/COOP isolation status.");
  inspectorBackend2.registerCommand("Network.enableReportingApi", [{ "name": "enable", "type": "boolean", "optional": false, "description": "Whether to enable or disable events for the Reporting API", "typeRef": null }], [], "Enables tracking for the Reporting API, events generated by the Reporting API will now be delivered to the client. Enabling triggers 'reportingApiReportAdded' for all existing reports.");
  inspectorBackend2.registerCommand("Network.enableDeviceBoundSessions", [{ "name": "enable", "type": "boolean", "optional": false, "description": "Whether to enable or disable events.", "typeRef": null }], [], "Sets up tracking device bound sessions and fetching of initial set of sessions.");
  inspectorBackend2.registerCommand("Network.fetchSchemefulSite", [{ "name": "origin", "type": "string", "optional": false, "description": "The URL origin.", "typeRef": null }], ["schemefulSite"], "Fetches the schemeful site for a specific origin.");
  inspectorBackend2.registerCommand("Network.loadNetworkResource", [{ "name": "frameId", "type": "string", "optional": true, "description": "Frame id to get the resource for. Mandatory for frame targets, and should be omitted for worker targets.", "typeRef": "Page.FrameId" }, { "name": "url", "type": "string", "optional": false, "description": "URL of the resource to get content for.", "typeRef": null }, { "name": "options", "type": "object", "optional": false, "description": "Options for the request.", "typeRef": "Network.LoadNetworkResourceOptions" }], ["resource"], "Fetches the resource and returns the content.");
  inspectorBackend2.registerCommand("Network.setCookieControls", [{ "name": "enableThirdPartyCookieRestriction", "type": "boolean", "optional": false, "description": "Whether 3pc restriction is enabled.", "typeRef": null }, { "name": "disableThirdPartyCookieMetadata", "type": "boolean", "optional": false, "description": "Whether 3pc grace period exception should be enabled; false by default.", "typeRef": null }, { "name": "disableThirdPartyCookieHeuristics", "type": "boolean", "optional": false, "description": "Whether 3pc heuristics exceptions should be enabled; false by default.", "typeRef": null }], [], "Sets Controls for third-party cookie access Page reload is required before the new cookie behavior will be observed");
  inspectorBackend2.registerType("Network.ResourceTiming", [{ "name": "requestTime", "type": "number", "optional": false, "description": "Timing's requestTime is a baseline in seconds, while the other numbers are ticks in milliseconds relatively to this requestTime.", "typeRef": null }, { "name": "proxyStart", "type": "number", "optional": false, "description": "Started resolving proxy.", "typeRef": null }, { "name": "proxyEnd", "type": "number", "optional": false, "description": "Finished resolving proxy.", "typeRef": null }, { "name": "dnsStart", "type": "number", "optional": false, "description": "Started DNS address resolve.", "typeRef": null }, { "name": "dnsEnd", "type": "number", "optional": false, "description": "Finished DNS address resolve.", "typeRef": null }, { "name": "connectStart", "type": "number", "optional": false, "description": "Started connecting to the remote host.", "typeRef": null }, { "name": "connectEnd", "type": "number", "optional": false, "description": "Connected to the remote host.", "typeRef": null }, { "name": "sslStart", "type": "number", "optional": false, "description": "Started SSL handshake.", "typeRef": null }, { "name": "sslEnd", "type": "number", "optional": false, "description": "Finished SSL handshake.", "typeRef": null }, { "name": "workerStart", "type": "number", "optional": false, "description": "Started running ServiceWorker.", "typeRef": null }, { "name": "workerReady", "type": "number", "optional": false, "description": "Finished Starting ServiceWorker.", "typeRef": null }, { "name": "workerFetchStart", "type": "number", "optional": false, "description": "Started fetch event.", "typeRef": null }, { "name": "workerRespondWithSettled", "type": "number", "optional": false, "description": "Settled fetch event respondWith promise.", "typeRef": null }, { "name": "workerRouterEvaluationStart", "type": "number", "optional": true, "description": "Started ServiceWorker static routing source evaluation.", "typeRef": null }, { "name": "workerCacheLookupStart", "type": "number", "optional": true, "description": "Started cache lookup when the source was evaluated to `cache`.", "typeRef": null }, { "name": "sendStart", "type": "number", "optional": false, "description": "Started sending request.", "typeRef": null }, { "name": "sendEnd", "type": "number", "optional": false, "description": "Finished sending request.", "typeRef": null }, { "name": "pushStart", "type": "number", "optional": false, "description": "Time the server started pushing request.", "typeRef": null }, { "name": "pushEnd", "type": "number", "optional": false, "description": "Time the server finished pushing request.", "typeRef": null }, { "name": "receiveHeadersStart", "type": "number", "optional": false, "description": "Started receiving response headers.", "typeRef": null }, { "name": "receiveHeadersEnd", "type": "number", "optional": false, "description": "Finished receiving response headers.", "typeRef": null }]);
  inspectorBackend2.registerType("Network.PostDataEntry", [{ "name": "bytes", "type": "string", "optional": true, "description": "", "typeRef": null }]);
  inspectorBackend2.registerType("Network.Request", [{ "name": "url", "type": "string", "optional": false, "description": "Request URL (without fragment).", "typeRef": null }, { "name": "urlFragment", "type": "string", "optional": true, "description": "Fragment of the requested URL starting with hash, if present.", "typeRef": null }, { "name": "method", "type": "string", "optional": false, "description": "HTTP request method.", "typeRef": null }, { "name": "headers", "type": "object", "optional": false, "description": "HTTP request headers.", "typeRef": "Network.Headers" }, { "name": "postData", "type": "string", "optional": true, "description": "HTTP POST request data. Use postDataEntries instead.", "typeRef": null }, { "name": "hasPostData", "type": "boolean", "optional": true, "description": "True when the request has POST data. Note that postData might still be omitted when this flag is true when the data is too long.", "typeRef": null }, { "name": "postDataEntries", "type": "array", "optional": true, "description": "Request body elements (post data broken into individual entries).", "typeRef": "Network.PostDataEntry" }, { "name": "mixedContentType", "type": "string", "optional": true, "description": "The mixed content type of the request.", "typeRef": "Security.MixedContentType" }, { "name": "initialPriority", "type": "string", "optional": false, "description": "Priority of the resource request at the time request is sent.", "typeRef": "Network.ResourcePriority" }, { "name": "referrerPolicy", "type": "string", "optional": false, "description": "The referrer policy of the request, as defined in https://www.w3.org/TR/referrer-policy/", "typeRef": null }, { "name": "isLinkPreload", "type": "boolean", "optional": true, "description": "Whether is loaded via link preload.", "typeRef": null }, { "name": "trustTokenParams", "type": "object", "optional": true, "description": 'Set for requests when the TrustToken API is used. Contains the parameters passed by the developer (e.g. via \\"fetch\\") as understood by the backend.', "typeRef": "Network.TrustTokenParams" }, { "name": "isSameSite", "type": "boolean", "optional": true, "description": "True if this resource request is considered to be the 'same site' as the request corresponding to the main frame.", "typeRef": null }, { "name": "isAdRelated", "type": "boolean", "optional": true, "description": "True when the resource request is ad-related.", "typeRef": null }]);
  inspectorBackend2.registerType("Network.SignedCertificateTimestamp", [{ "name": "status", "type": "string", "optional": false, "description": "Validation status.", "typeRef": null }, { "name": "origin", "type": "string", "optional": false, "description": "Origin.", "typeRef": null }, { "name": "logDescription", "type": "string", "optional": false, "description": "Log name / description.", "typeRef": null }, { "name": "logId", "type": "string", "optional": false, "description": "Log ID.", "typeRef": null }, { "name": "timestamp", "type": "number", "optional": false, "description": "Issuance date. Unlike TimeSinceEpoch, this contains the number of milliseconds since January 1, 1970, UTC, not the number of seconds.", "typeRef": null }, { "name": "hashAlgorithm", "type": "string", "optional": false, "description": "Hash algorithm.", "typeRef": null }, { "name": "signatureAlgorithm", "type": "string", "optional": false, "description": "Signature algorithm.", "typeRef": null }, { "name": "signatureData", "type": "string", "optional": false, "description": "Signature data.", "typeRef": null }]);
  inspectorBackend2.registerType("Network.SecurityDetails", [{ "name": "protocol", "type": "string", "optional": false, "description": 'Protocol name (e.g. \\"TLS 1.2\\" or \\"QUIC\\").', "typeRef": null }, { "name": "keyExchange", "type": "string", "optional": false, "description": "Key Exchange used by the connection, or the empty string if not applicable.", "typeRef": null }, { "name": "keyExchangeGroup", "type": "string", "optional": true, "description": "(EC)DH group used by the connection, if applicable.", "typeRef": null }, { "name": "cipher", "type": "string", "optional": false, "description": "Cipher name.", "typeRef": null }, { "name": "mac", "type": "string", "optional": true, "description": "TLS MAC. Note that AEAD ciphers do not have separate MACs.", "typeRef": null }, { "name": "certificateId", "type": "number", "optional": false, "description": "Certificate ID value.", "typeRef": "Security.CertificateId" }, { "name": "subjectName", "type": "string", "optional": false, "description": "Certificate subject name.", "typeRef": null }, { "name": "sanList", "type": "array", "optional": false, "description": "Subject Alternative Name (SAN) DNS names and IP addresses.", "typeRef": "string" }, { "name": "issuer", "type": "string", "optional": false, "description": "Name of the issuing CA.", "typeRef": null }, { "name": "validFrom", "type": "number", "optional": false, "description": "Certificate valid from date.", "typeRef": "Network.TimeSinceEpoch" }, { "name": "validTo", "type": "number", "optional": false, "description": "Certificate valid to (expiration) date", "typeRef": "Network.TimeSinceEpoch" }, { "name": "signedCertificateTimestampList", "type": "array", "optional": false, "description": "List of signed certificate timestamps (SCTs).", "typeRef": "Network.SignedCertificateTimestamp" }, { "name": "certificateTransparencyCompliance", "type": "string", "optional": false, "description": "Whether the request complied with Certificate Transparency policy", "typeRef": "Network.CertificateTransparencyCompliance" }, { "name": "serverSignatureAlgorithm", "type": "number", "optional": true, "description": "The signature algorithm used by the server in the TLS server signature, represented as a TLS SignatureScheme code point. Omitted if not applicable or not known.", "typeRef": null }, { "name": "encryptedClientHello", "type": "boolean", "optional": false, "description": "Whether the connection used Encrypted ClientHello", "typeRef": null }]);
  inspectorBackend2.registerType("Network.CorsErrorStatus", [{ "name": "corsError", "type": "string", "optional": false, "description": "", "typeRef": "Network.CorsError" }, { "name": "failedParameter", "type": "string", "optional": false, "description": "", "typeRef": null }]);
  inspectorBackend2.registerType("Network.TrustTokenParams", [{ "name": "operation", "type": "string", "optional": false, "description": "", "typeRef": "Network.TrustTokenOperationType" }, { "name": "refreshPolicy", "type": "string", "optional": false, "description": 'Only set for \\"token-redemption\\" operation and determine whether to request a fresh SRR or use a still valid cached SRR.', "typeRef": null }, { "name": "issuers", "type": "array", "optional": true, "description": "Origins of issuers from whom to request tokens or redemption records.", "typeRef": "string" }]);
  inspectorBackend2.registerType("Network.ServiceWorkerRouterInfo", [{ "name": "ruleIdMatched", "type": "number", "optional": true, "description": "ID of the rule matched. If there is a matched rule, this field will be set, otherwiser no value will be set.", "typeRef": null }, { "name": "matchedSourceType", "type": "string", "optional": true, "description": "The router source of the matched rule. If there is a matched rule, this field will be set, otherwise no value will be set.", "typeRef": "Network.ServiceWorkerRouterSource" }, { "name": "actualSourceType", "type": "string", "optional": true, "description": "The actual router source used.", "typeRef": "Network.ServiceWorkerRouterSource" }]);
  inspectorBackend2.registerType("Network.Response", [{ "name": "url", "type": "string", "optional": false, "description": "Response URL. This URL can be different from CachedResource.url in case of redirect.", "typeRef": null }, { "name": "status", "type": "number", "optional": false, "description": "HTTP response status code.", "typeRef": null }, { "name": "statusText", "type": "string", "optional": false, "description": "HTTP response status text.", "typeRef": null }, { "name": "headers", "type": "object", "optional": false, "description": "HTTP response headers.", "typeRef": "Network.Headers" }, { "name": "headersText", "type": "string", "optional": true, "description": "HTTP response headers text. This has been replaced by the headers in Network.responseReceivedExtraInfo.", "typeRef": null }, { "name": "mimeType", "type": "string", "optional": false, "description": "Resource mimeType as determined by the browser.", "typeRef": null }, { "name": "charset", "type": "string", "optional": false, "description": "Resource charset as determined by the browser (if applicable).", "typeRef": null }, { "name": "requestHeaders", "type": "object", "optional": true, "description": "Refined HTTP request headers that were actually transmitted over the network.", "typeRef": "Network.Headers" }, { "name": "requestHeadersText", "type": "string", "optional": true, "description": "HTTP request headers text. This has been replaced by the headers in Network.requestWillBeSentExtraInfo.", "typeRef": null }, { "name": "connectionReused", "type": "boolean", "optional": false, "description": "Specifies whether physical connection was actually reused for this request.", "typeRef": null }, { "name": "connectionId", "type": "number", "optional": false, "description": "Physical connection id that was actually used for this request.", "typeRef": null }, { "name": "remoteIPAddress", "type": "string", "optional": true, "description": "Remote IP address.", "typeRef": null }, { "name": "remotePort", "type": "number", "optional": true, "description": "Remote port.", "typeRef": null }, { "name": "fromDiskCache", "type": "boolean", "optional": true, "description": "Specifies that the request was served from the disk cache.", "typeRef": null }, { "name": "fromServiceWorker", "type": "boolean", "optional": true, "description": "Specifies that the request was served from the ServiceWorker.", "typeRef": null }, { "name": "fromPrefetchCache", "type": "boolean", "optional": true, "description": "Specifies that the request was served from the prefetch cache.", "typeRef": null }, { "name": "fromEarlyHints", "type": "boolean", "optional": true, "description": "Specifies that the request was served from the prefetch cache.", "typeRef": null }, { "name": "serviceWorkerRouterInfo", "type": "object", "optional": true, "description": "Information about how ServiceWorker Static Router API was used. If this field is set with `matchedSourceType` field, a matching rule is found. If this field is set without `matchedSource`, no matching rule is found. Otherwise, the API is not used.", "typeRef": "Network.ServiceWorkerRouterInfo" }, { "name": "encodedDataLength", "type": "number", "optional": false, "description": "Total number of bytes received for this request so far.", "typeRef": null }, { "name": "timing", "type": "object", "optional": true, "description": "Timing information for the given request.", "typeRef": "Network.ResourceTiming" }, { "name": "serviceWorkerResponseSource", "type": "string", "optional": true, "description": "Response source of response from ServiceWorker.", "typeRef": "Network.ServiceWorkerResponseSource" }, { "name": "responseTime", "type": "number", "optional": true, "description": "The time at which the returned response was generated.", "typeRef": "Network.TimeSinceEpoch" }, { "name": "cacheStorageCacheName", "type": "string", "optional": true, "description": "Cache Storage Cache Name.", "typeRef": null }, { "name": "protocol", "type": "string", "optional": true, "description": "Protocol used to fetch this request.", "typeRef": null }, { "name": "alternateProtocolUsage", "type": "string", "optional": true, "description": "The reason why Chrome uses a specific transport protocol for HTTP semantics.", "typeRef": "Network.AlternateProtocolUsage" }, { "name": "securityState", "type": "string", "optional": false, "description": "Security state of the request resource.", "typeRef": "Security.SecurityState" }, { "name": "securityDetails", "type": "object", "optional": true, "description": "Security details for the request.", "typeRef": "Network.SecurityDetails" }]);
  inspectorBackend2.registerType("Network.WebSocketRequest", [{ "name": "headers", "type": "object", "optional": false, "description": "HTTP request headers.", "typeRef": "Network.Headers" }]);
  inspectorBackend2.registerType("Network.WebSocketResponse", [{ "name": "status", "type": "number", "optional": false, "description": "HTTP response status code.", "typeRef": null }, { "name": "statusText", "type": "string", "optional": false, "description": "HTTP response status text.", "typeRef": null }, { "name": "headers", "type": "object", "optional": false, "description": "HTTP response headers.", "typeRef": "Network.Headers" }, { "name": "headersText", "type": "string", "optional": true, "description": "HTTP response headers text.", "typeRef": null }, { "name": "requestHeaders", "type": "object", "optional": true, "description": "HTTP request headers.", "typeRef": "Network.Headers" }, { "name": "requestHeadersText", "type": "string", "optional": true, "description": "HTTP request headers text.", "typeRef": null }]);
  inspectorBackend2.registerType("Network.WebSocketFrame", [{ "name": "opcode", "type": "number", "optional": false, "description": "WebSocket message opcode.", "typeRef": null }, { "name": "mask", "type": "boolean", "optional": false, "description": "WebSocket message mask.", "typeRef": null }, { "name": "payloadData", "type": "string", "optional": false, "description": "WebSocket message payload data. If the opcode is 1, this is a text message and payloadData is a UTF-8 string. If the opcode isn't 1, then payloadData is a base64 encoded string representing binary data.", "typeRef": null }]);
  inspectorBackend2.registerType("Network.CachedResource", [{ "name": "url", "type": "string", "optional": false, "description": "Resource URL. This is the url of the original network request.", "typeRef": null }, { "name": "type", "type": "string", "optional": false, "description": "Type of this resource.", "typeRef": "Network.ResourceType" }, { "name": "response", "type": "object", "optional": true, "description": "Cached response data.", "typeRef": "Network.Response" }, { "name": "bodySize", "type": "number", "optional": false, "description": "Cached response body size.", "typeRef": null }]);
  inspectorBackend2.registerType("Network.Initiator", [{ "name": "type", "type": "string", "optional": false, "description": "Type of this initiator.", "typeRef": null }, { "name": "stack", "type": "object", "optional": true, "description": "Initiator JavaScript stack trace, set for Script only. Requires the Debugger domain to be enabled.", "typeRef": "Runtime.StackTrace" }, { "name": "url", "type": "string", "optional": true, "description": "Initiator URL, set for Parser type or for Script type (when script is importing module) or for SignedExchange type.", "typeRef": null }, { "name": "lineNumber", "type": "number", "optional": true, "description": "Initiator line number, set for Parser type or for Script type (when script is importing module) (0-based).", "typeRef": null }, { "name": "columnNumber", "type": "number", "optional": true, "description": "Initiator column number, set for Parser type or for Script type (when script is importing module) (0-based).", "typeRef": null }, { "name": "requestId", "type": "string", "optional": true, "description": "Set if another request triggered this request (e.g. preflight).", "typeRef": "Network.RequestId" }]);
  inspectorBackend2.registerType("Network.CookiePartitionKey", [{ "name": "topLevelSite", "type": "string", "optional": false, "description": "The site of the top-level URL the browser was visiting at the start of the request to the endpoint that set the cookie.", "typeRef": null }, { "name": "hasCrossSiteAncestor", "type": "boolean", "optional": false, "description": "Indicates if the cookie has any ancestors that are cross-site to the topLevelSite.", "typeRef": null }]);
  inspectorBackend2.registerType("Network.Cookie", [{ "name": "name", "type": "string", "optional": false, "description": "Cookie name.", "typeRef": null }, { "name": "value", "type": "string", "optional": false, "description": "Cookie value.", "typeRef": null }, { "name": "domain", "type": "string", "optional": false, "description": "Cookie domain.", "typeRef": null }, { "name": "path", "type": "string", "optional": false, "description": "Cookie path.", "typeRef": null }, { "name": "expires", "type": "number", "optional": false, "description": "Cookie expiration date as the number of seconds since the UNIX epoch. The value is set to -1 if the expiry date is not set. The value can be null for values that cannot be represented in JSON (\xB1Inf).", "typeRef": null }, { "name": "size", "type": "number", "optional": false, "description": "Cookie size.", "typeRef": null }, { "name": "httpOnly", "type": "boolean", "optional": false, "description": "True if cookie is http-only.", "typeRef": null }, { "name": "secure", "type": "boolean", "optional": false, "description": "True if cookie is secure.", "typeRef": null }, { "name": "session", "type": "boolean", "optional": false, "description": "True in case of session cookie.", "typeRef": null }, { "name": "sameSite", "type": "string", "optional": true, "description": "Cookie SameSite type.", "typeRef": "Network.CookieSameSite" }, { "name": "priority", "type": "string", "optional": false, "description": "Cookie Priority", "typeRef": "Network.CookiePriority" }, { "name": "sourceScheme", "type": "string", "optional": false, "description": "Cookie source scheme type.", "typeRef": "Network.CookieSourceScheme" }, { "name": "sourcePort", "type": "number", "optional": false, "description": "Cookie source port. Valid values are {-1, [1, 65535]}, -1 indicates an unspecified port. An unspecified port value allows protocol clients to emulate legacy cookie scope for the port. This is a temporary ability and it will be removed in the future.", "typeRef": null }, { "name": "partitionKey", "type": "object", "optional": true, "description": "Cookie partition key.", "typeRef": "Network.CookiePartitionKey" }, { "name": "partitionKeyOpaque", "type": "boolean", "optional": true, "description": "True if cookie partition key is opaque.", "typeRef": null }]);
  inspectorBackend2.registerType("Network.BlockedSetCookieWithReason", [{ "name": "blockedReasons", "type": "array", "optional": false, "description": "The reason(s) this cookie was blocked.", "typeRef": "Network.SetCookieBlockedReason" }, { "name": "cookieLine", "type": "string", "optional": false, "description": 'The string representing this individual cookie as it would appear in the header. This is not the entire \\"cookie\\" or \\"set-cookie\\" header which could have multiple cookies.', "typeRef": null }, { "name": "cookie", "type": "object", "optional": true, "description": "The cookie object which represents the cookie which was not stored. It is optional because sometimes complete cookie information is not available, such as in the case of parsing errors.", "typeRef": "Network.Cookie" }]);
  inspectorBackend2.registerType("Network.ExemptedSetCookieWithReason", [{ "name": "exemptionReason", "type": "string", "optional": false, "description": "The reason the cookie was exempted.", "typeRef": "Network.CookieExemptionReason" }, { "name": "cookieLine", "type": "string", "optional": false, "description": "The string representing this individual cookie as it would appear in the header.", "typeRef": null }, { "name": "cookie", "type": "object", "optional": false, "description": "The cookie object representing the cookie.", "typeRef": "Network.Cookie" }]);
  inspectorBackend2.registerType("Network.AssociatedCookie", [{ "name": "cookie", "type": "object", "optional": false, "description": "The cookie object representing the cookie which was not sent.", "typeRef": "Network.Cookie" }, { "name": "blockedReasons", "type": "array", "optional": false, "description": "The reason(s) the cookie was blocked. If empty means the cookie is included.", "typeRef": "Network.CookieBlockedReason" }, { "name": "exemptionReason", "type": "string", "optional": true, "description": "The reason the cookie should have been blocked by 3PCD but is exempted. A cookie could only have at most one exemption reason.", "typeRef": "Network.CookieExemptionReason" }]);
  inspectorBackend2.registerType("Network.CookieParam", [{ "name": "name", "type": "string", "optional": false, "description": "Cookie name.", "typeRef": null }, { "name": "value", "type": "string", "optional": false, "description": "Cookie value.", "typeRef": null }, { "name": "url", "type": "string", "optional": true, "description": "The request-URI to associate with the setting of the cookie. This value can affect the default domain, path, source port, and source scheme values of the created cookie.", "typeRef": null }, { "name": "domain", "type": "string", "optional": true, "description": "Cookie domain.", "typeRef": null }, { "name": "path", "type": "string", "optional": true, "description": "Cookie path.", "typeRef": null }, { "name": "secure", "type": "boolean", "optional": true, "description": "True if cookie is secure.", "typeRef": null }, { "name": "httpOnly", "type": "boolean", "optional": true, "description": "True if cookie is http-only.", "typeRef": null }, { "name": "sameSite", "type": "string", "optional": true, "description": "Cookie SameSite type.", "typeRef": "Network.CookieSameSite" }, { "name": "expires", "type": "number", "optional": true, "description": "Cookie expiration date, session cookie if not set", "typeRef": "Network.TimeSinceEpoch" }, { "name": "priority", "type": "string", "optional": true, "description": "Cookie Priority.", "typeRef": "Network.CookiePriority" }, { "name": "sourceScheme", "type": "string", "optional": true, "description": "Cookie source scheme type.", "typeRef": "Network.CookieSourceScheme" }, { "name": "sourcePort", "type": "number", "optional": true, "description": "Cookie source port. Valid values are {-1, [1, 65535]}, -1 indicates an unspecified port. An unspecified port value allows protocol clients to emulate legacy cookie scope for the port. This is a temporary ability and it will be removed in the future.", "typeRef": null }, { "name": "partitionKey", "type": "object", "optional": true, "description": "Cookie partition key. If not set, the cookie will be set as not partitioned.", "typeRef": "Network.CookiePartitionKey" }]);
  inspectorBackend2.registerType("Network.AuthChallenge", [{ "name": "source", "type": "string", "optional": true, "description": "Source of the authentication challenge.", "typeRef": null }, { "name": "origin", "type": "string", "optional": false, "description": "Origin of the challenger.", "typeRef": null }, { "name": "scheme", "type": "string", "optional": false, "description": "The authentication scheme used, such as basic or digest", "typeRef": null }, { "name": "realm", "type": "string", "optional": false, "description": "The realm of the challenge. May be empty.", "typeRef": null }]);
  inspectorBackend2.registerType("Network.AuthChallengeResponse", [{ "name": "response", "type": "string", "optional": false, "description": "The decision on what to do in response to the authorization challenge.  Default means deferring to the default behavior of the net stack, which will likely either the Cancel authentication or display a popup dialog box.", "typeRef": null }, { "name": "username", "type": "string", "optional": true, "description": "The username to provide, possibly empty. Should only be set if response is ProvideCredentials.", "typeRef": null }, { "name": "password", "type": "string", "optional": true, "description": "The password to provide, possibly empty. Should only be set if response is ProvideCredentials.", "typeRef": null }]);
  inspectorBackend2.registerType("Network.RequestPattern", [{ "name": "urlPattern", "type": "string", "optional": true, "description": "Wildcards (`'*'` -> zero or more, `'?'` -> exactly one) are allowed. Escape character is backslash. Omitting is equivalent to `\\\"*\\\"`.", "typeRef": null }, { "name": "resourceType", "type": "string", "optional": true, "description": "If set, only requests for matching resource types will be intercepted.", "typeRef": "Network.ResourceType" }, { "name": "interceptionStage", "type": "string", "optional": true, "description": "Stage at which to begin intercepting requests. Default is Request.", "typeRef": "Network.InterceptionStage" }]);
  inspectorBackend2.registerType("Network.SignedExchangeSignature", [{ "name": "label", "type": "string", "optional": false, "description": "Signed exchange signature label.", "typeRef": null }, { "name": "signature", "type": "string", "optional": false, "description": "The hex string of signed exchange signature.", "typeRef": null }, { "name": "integrity", "type": "string", "optional": false, "description": "Signed exchange signature integrity.", "typeRef": null }, { "name": "certUrl", "type": "string", "optional": true, "description": "Signed exchange signature cert Url.", "typeRef": null }, { "name": "certSha256", "type": "string", "optional": true, "description": "The hex string of signed exchange signature cert sha256.", "typeRef": null }, { "name": "validityUrl", "type": "string", "optional": false, "description": "Signed exchange signature validity Url.", "typeRef": null }, { "name": "date", "type": "number", "optional": false, "description": "Signed exchange signature date.", "typeRef": null }, { "name": "expires", "type": "number", "optional": false, "description": "Signed exchange signature expires.", "typeRef": null }, { "name": "certificates", "type": "array", "optional": true, "description": "The encoded certificates.", "typeRef": "string" }]);
  inspectorBackend2.registerType("Network.SignedExchangeHeader", [{ "name": "requestUrl", "type": "string", "optional": false, "description": "Signed exchange request URL.", "typeRef": null }, { "name": "responseCode", "type": "number", "optional": false, "description": "Signed exchange response code.", "typeRef": null }, { "name": "responseHeaders", "type": "object", "optional": false, "description": "Signed exchange response headers.", "typeRef": "Network.Headers" }, { "name": "signatures", "type": "array", "optional": false, "description": "Signed exchange response signature.", "typeRef": "Network.SignedExchangeSignature" }, { "name": "headerIntegrity", "type": "string", "optional": false, "description": "Signed exchange header integrity hash in the form of `sha256-<base64-hash-value>`.", "typeRef": null }]);
  inspectorBackend2.registerType("Network.SignedExchangeError", [{ "name": "message", "type": "string", "optional": false, "description": "Error message.", "typeRef": null }, { "name": "signatureIndex", "type": "number", "optional": true, "description": "The index of the signature which caused the error.", "typeRef": null }, { "name": "errorField", "type": "string", "optional": true, "description": "The field which caused the error.", "typeRef": "Network.SignedExchangeErrorField" }]);
  inspectorBackend2.registerType("Network.SignedExchangeInfo", [{ "name": "outerResponse", "type": "object", "optional": false, "description": "The outer response of signed HTTP exchange which was received from network.", "typeRef": "Network.Response" }, { "name": "hasExtraInfo", "type": "boolean", "optional": false, "description": "Whether network response for the signed exchange was accompanied by extra headers.", "typeRef": null }, { "name": "header", "type": "object", "optional": true, "description": "Information about the signed exchange header.", "typeRef": "Network.SignedExchangeHeader" }, { "name": "securityDetails", "type": "object", "optional": true, "description": "Security details for the signed exchange header.", "typeRef": "Network.SecurityDetails" }, { "name": "errors", "type": "array", "optional": true, "description": "Errors occurred while handling the signed exchange.", "typeRef": "Network.SignedExchangeError" }]);
  inspectorBackend2.registerType("Network.NetworkConditions", [{ "name": "urlPattern", "type": "string", "optional": false, "description": "Only matching requests will be affected by these conditions. Patterns use the URLPattern constructor string syntax (https://urlpattern.spec.whatwg.org/) and must be absolute. If the pattern is empty, all requests are matched (including p2p connections).", "typeRef": null }, { "name": "latency", "type": "number", "optional": false, "description": "Minimum latency from request sent to response headers received (ms).", "typeRef": null }, { "name": "downloadThroughput", "type": "number", "optional": false, "description": "Maximal aggregated download throughput (bytes/sec). -1 disables download throttling.", "typeRef": null }, { "name": "uploadThroughput", "type": "number", "optional": false, "description": "Maximal aggregated upload throughput (bytes/sec).  -1 disables upload throttling.", "typeRef": null }, { "name": "connectionType", "type": "string", "optional": true, "description": "Connection type if known.", "typeRef": "Network.ConnectionType" }, { "name": "packetLoss", "type": "number", "optional": true, "description": "WebRTC packet loss (percent, 0-100). 0 disables packet loss emulation, 100 drops all the packets.", "typeRef": null }, { "name": "packetQueueLength", "type": "number", "optional": true, "description": "WebRTC packet queue length (packet). 0 removes any queue length limitations.", "typeRef": null }, { "name": "packetReordering", "type": "boolean", "optional": true, "description": "WebRTC packetReordering feature.", "typeRef": null }]);
  inspectorBackend2.registerType("Network.BlockPattern", [{ "name": "urlPattern", "type": "string", "optional": false, "description": "URL pattern to match. Patterns use the URLPattern constructor string syntax (https://urlpattern.spec.whatwg.org/) and must be absolute. Example: `*://*:*/*.css`.", "typeRef": null }, { "name": "block", "type": "boolean", "optional": false, "description": "Whether or not to block the pattern. If false, a matching request will not be blocked even if it matches a later `BlockPattern`.", "typeRef": null }]);
  inspectorBackend2.registerType("Network.DirectTCPSocketOptions", [{ "name": "noDelay", "type": "boolean", "optional": false, "description": "TCP_NODELAY option", "typeRef": null }, { "name": "keepAliveDelay", "type": "number", "optional": true, "description": "Expected to be unsigned integer.", "typeRef": null }, { "name": "sendBufferSize", "type": "number", "optional": true, "description": "Expected to be unsigned integer.", "typeRef": null }, { "name": "receiveBufferSize", "type": "number", "optional": true, "description": "Expected to be unsigned integer.", "typeRef": null }, { "name": "dnsQueryType", "type": "string", "optional": true, "description": "", "typeRef": "Network.DirectSocketDnsQueryType" }]);
  inspectorBackend2.registerType("Network.DirectUDPSocketOptions", [{ "name": "remoteAddr", "type": "string", "optional": true, "description": "", "typeRef": null }, { "name": "remotePort", "type": "number", "optional": true, "description": "Unsigned int 16.", "typeRef": null }, { "name": "localAddr", "type": "string", "optional": true, "description": "", "typeRef": null }, { "name": "localPort", "type": "number", "optional": true, "description": "Unsigned int 16.", "typeRef": null }, { "name": "dnsQueryType", "type": "string", "optional": true, "description": "", "typeRef": "Network.DirectSocketDnsQueryType" }, { "name": "sendBufferSize", "type": "number", "optional": true, "description": "Expected to be unsigned integer.", "typeRef": null }, { "name": "receiveBufferSize", "type": "number", "optional": true, "description": "Expected to be unsigned integer.", "typeRef": null }, { "name": "multicastLoopback", "type": "boolean", "optional": true, "description": "", "typeRef": null }, { "name": "multicastTimeToLive", "type": "number", "optional": true, "description": "Unsigned int 8.", "typeRef": null }, { "name": "multicastAllowAddressSharing", "type": "boolean", "optional": true, "description": "", "typeRef": null }]);
  inspectorBackend2.registerType("Network.DirectUDPMessage", [{ "name": "data", "type": "string", "optional": false, "description": "", "typeRef": null }, { "name": "remoteAddr", "type": "string", "optional": true, "description": "Null for connected mode.", "typeRef": null }, { "name": "remotePort", "type": "number", "optional": true, "description": "Null for connected mode. Expected to be unsigned integer.", "typeRef": null }]);
  inspectorBackend2.registerType("Network.ConnectTiming", [{ "name": "requestTime", "type": "number", "optional": false, "description": "Timing's requestTime is a baseline in seconds, while the other numbers are ticks in milliseconds relatively to this requestTime. Matches ResourceTiming's requestTime for the same request (but not for redirected requests).", "typeRef": null }]);
  inspectorBackend2.registerType("Network.ClientSecurityState", [{ "name": "initiatorIsSecureContext", "type": "boolean", "optional": false, "description": "", "typeRef": null }, { "name": "initiatorIPAddressSpace", "type": "string", "optional": false, "description": "", "typeRef": "Network.IPAddressSpace" }, { "name": "localNetworkAccessRequestPolicy", "type": "string", "optional": false, "description": "", "typeRef": "Network.LocalNetworkAccessRequestPolicy" }]);
  inspectorBackend2.registerType("Network.CrossOriginOpenerPolicyStatus", [{ "name": "value", "type": "string", "optional": false, "description": "", "typeRef": "Network.CrossOriginOpenerPolicyValue" }, { "name": "reportOnlyValue", "type": "string", "optional": false, "description": "", "typeRef": "Network.CrossOriginOpenerPolicyValue" }, { "name": "reportingEndpoint", "type": "string", "optional": true, "description": "", "typeRef": null }, { "name": "reportOnlyReportingEndpoint", "type": "string", "optional": true, "description": "", "typeRef": null }]);
  inspectorBackend2.registerType("Network.CrossOriginEmbedderPolicyStatus", [{ "name": "value", "type": "string", "optional": false, "description": "", "typeRef": "Network.CrossOriginEmbedderPolicyValue" }, { "name": "reportOnlyValue", "type": "string", "optional": false, "description": "", "typeRef": "Network.CrossOriginEmbedderPolicyValue" }, { "name": "reportingEndpoint", "type": "string", "optional": true, "description": "", "typeRef": null }, { "name": "reportOnlyReportingEndpoint", "type": "string", "optional": true, "description": "", "typeRef": null }]);
  inspectorBackend2.registerType("Network.ContentSecurityPolicyStatus", [{ "name": "effectiveDirectives", "type": "string", "optional": false, "description": "", "typeRef": null }, { "name": "isEnforced", "type": "boolean", "optional": false, "description": "", "typeRef": null }, { "name": "source", "type": "string", "optional": false, "description": "", "typeRef": "Network.ContentSecurityPolicySource" }]);
  inspectorBackend2.registerType("Network.SecurityIsolationStatus", [{ "name": "coop", "type": "object", "optional": true, "description": "", "typeRef": "Network.CrossOriginOpenerPolicyStatus" }, { "name": "coep", "type": "object", "optional": true, "description": "", "typeRef": "Network.CrossOriginEmbedderPolicyStatus" }, { "name": "csp", "type": "array", "optional": true, "description": "", "typeRef": "Network.ContentSecurityPolicyStatus" }]);
  inspectorBackend2.registerType("Network.ReportingApiReport", [{ "name": "id", "type": "string", "optional": false, "description": "", "typeRef": "Network.ReportId" }, { "name": "initiatorUrl", "type": "string", "optional": false, "description": "The URL of the document that triggered the report.", "typeRef": null }, { "name": "destination", "type": "string", "optional": false, "description": "The name of the endpoint group that should be used to deliver the report.", "typeRef": null }, { "name": "type", "type": "string", "optional": false, "description": "The type of the report (specifies the set of data that is contained in the report body).", "typeRef": null }, { "name": "timestamp", "type": "number", "optional": false, "description": "When the report was generated.", "typeRef": "Network.TimeSinceEpoch" }, { "name": "depth", "type": "number", "optional": false, "description": "How many uploads deep the related request was.", "typeRef": null }, { "name": "completedAttempts", "type": "number", "optional": false, "description": "The number of delivery attempts made so far, not including an active attempt.", "typeRef": null }, { "name": "body", "type": "object", "optional": false, "description": "", "typeRef": null }, { "name": "status", "type": "string", "optional": false, "description": "", "typeRef": "Network.ReportStatus" }]);
  inspectorBackend2.registerType("Network.ReportingApiEndpoint", [{ "name": "url", "type": "string", "optional": false, "description": "The URL of the endpoint to which reports may be delivered.", "typeRef": null }, { "name": "groupName", "type": "string", "optional": false, "description": "Name of the endpoint group.", "typeRef": null }]);
  inspectorBackend2.registerType("Network.DeviceBoundSessionKey", [{ "name": "site", "type": "string", "optional": false, "description": "The site the session is set up for.", "typeRef": null }, { "name": "id", "type": "string", "optional": false, "description": "The id of the session.", "typeRef": null }]);
  inspectorBackend2.registerType("Network.DeviceBoundSessionWithUsage", [{ "name": "sessionKey", "type": "object", "optional": false, "description": "The key for the session.", "typeRef": "Network.DeviceBoundSessionKey" }, { "name": "usage", "type": "string", "optional": false, "description": "How the session was used (or not used).", "typeRef": null }]);
  inspectorBackend2.registerType("Network.DeviceBoundSessionCookieCraving", [{ "name": "name", "type": "string", "optional": false, "description": "The name of the craving.", "typeRef": null }, { "name": "domain", "type": "string", "optional": false, "description": "The domain of the craving.", "typeRef": null }, { "name": "path", "type": "string", "optional": false, "description": "The path of the craving.", "typeRef": null }, { "name": "secure", "type": "boolean", "optional": false, "description": "The `Secure` attribute of the craving attributes.", "typeRef": null }, { "name": "httpOnly", "type": "boolean", "optional": false, "description": "The `HttpOnly` attribute of the craving attributes.", "typeRef": null }, { "name": "sameSite", "type": "string", "optional": true, "description": "The `SameSite` attribute of the craving attributes.", "typeRef": "Network.CookieSameSite" }]);
  inspectorBackend2.registerType("Network.DeviceBoundSessionUrlRule", [{ "name": "ruleType", "type": "string", "optional": false, "description": "See comments on `net::device_bound_sessions::SessionInclusionRules::UrlRule::rule_type`.", "typeRef": null }, { "name": "hostPattern", "type": "string", "optional": false, "description": "See comments on `net::device_bound_sessions::SessionInclusionRules::UrlRule::host_pattern`.", "typeRef": null }, { "name": "pathPrefix", "type": "string", "optional": false, "description": "See comments on `net::device_bound_sessions::SessionInclusionRules::UrlRule::path_prefix`.", "typeRef": null }]);
  inspectorBackend2.registerType("Network.DeviceBoundSessionInclusionRules", [{ "name": "origin", "type": "string", "optional": false, "description": "See comments on `net::device_bound_sessions::SessionInclusionRules::origin_`.", "typeRef": null }, { "name": "includeSite", "type": "boolean", "optional": false, "description": "Whether the whole site is included. See comments on `net::device_bound_sessions::SessionInclusionRules::include_site_` for more details; this boolean is true if that value is populated.", "typeRef": null }, { "name": "urlRules", "type": "array", "optional": false, "description": "See comments on `net::device_bound_sessions::SessionInclusionRules::url_rules_`.", "typeRef": "Network.DeviceBoundSessionUrlRule" }]);
  inspectorBackend2.registerType("Network.DeviceBoundSession", [{ "name": "key", "type": "object", "optional": false, "description": "The site and session ID of the session.", "typeRef": "Network.DeviceBoundSessionKey" }, { "name": "refreshUrl", "type": "string", "optional": false, "description": "See comments on `net::device_bound_sessions::Session::refresh_url_`.", "typeRef": null }, { "name": "inclusionRules", "type": "object", "optional": false, "description": "See comments on `net::device_bound_sessions::Session::inclusion_rules_`.", "typeRef": "Network.DeviceBoundSessionInclusionRules" }, { "name": "cookieCravings", "type": "array", "optional": false, "description": "See comments on `net::device_bound_sessions::Session::cookie_cravings_`.", "typeRef": "Network.DeviceBoundSessionCookieCraving" }, { "name": "expiryDate", "type": "number", "optional": false, "description": "See comments on `net::device_bound_sessions::Session::expiry_date_`.", "typeRef": "Network.TimeSinceEpoch" }, { "name": "cachedChallenge", "type": "string", "optional": true, "description": "See comments on `net::device_bound_sessions::Session::cached_challenge__`.", "typeRef": null }, { "name": "allowedRefreshInitiators", "type": "array", "optional": false, "description": "See comments on `net::device_bound_sessions::Session::allowed_refresh_initiators_`.", "typeRef": "string" }]);
  inspectorBackend2.registerType("Network.DeviceBoundSessionFailedRequest", [{ "name": "requestUrl", "type": "string", "optional": false, "description": "The failed request URL.", "typeRef": null }, { "name": "netError", "type": "string", "optional": true, "description": "The net error of the response if it was not OK.", "typeRef": null }, { "name": "responseError", "type": "number", "optional": true, "description": "The response code if the net error was OK and the response code was not 200.", "typeRef": null }, { "name": "responseErrorBody", "type": "string", "optional": true, "description": "The body of the response if the net error was OK, the response code was not 200, and the response body was not empty.", "typeRef": null }]);
  inspectorBackend2.registerType("Network.CreationEventDetails", [{ "name": "fetchResult", "type": "string", "optional": false, "description": "The result of the fetch attempt.", "typeRef": "Network.DeviceBoundSessionFetchResult" }, { "name": "newSession", "type": "object", "optional": true, "description": "The session if there was a newly created session. This is populated for all successful creation events.", "typeRef": "Network.DeviceBoundSession" }, { "name": "failedRequest", "type": "object", "optional": true, "description": "Details about a failed device bound session network request if there was one.", "typeRef": "Network.DeviceBoundSessionFailedRequest" }]);
  inspectorBackend2.registerType("Network.RefreshEventDetails", [{ "name": "refreshResult", "type": "string", "optional": false, "description": "The result of a refresh.", "typeRef": null }, { "name": "fetchResult", "type": "string", "optional": true, "description": "If there was a fetch attempt, the result of that.", "typeRef": "Network.DeviceBoundSessionFetchResult" }, { "name": "newSession", "type": "object", "optional": true, "description": "The session display if there was a newly created session. This is populated for any refresh event that modifies the session config.", "typeRef": "Network.DeviceBoundSession" }, { "name": "wasFullyProactiveRefresh", "type": "boolean", "optional": false, "description": "See comments on `net::device_bound_sessions::RefreshEventResult::was_fully_proactive_refresh`.", "typeRef": null }, { "name": "failedRequest", "type": "object", "optional": true, "description": "Details about a failed device bound session network request if there was one.", "typeRef": "Network.DeviceBoundSessionFailedRequest" }]);
  inspectorBackend2.registerType("Network.TerminationEventDetails", [{ "name": "deletionReason", "type": "string", "optional": false, "description": "The reason for a session being deleted.", "typeRef": null }]);
  inspectorBackend2.registerType("Network.ChallengeEventDetails", [{ "name": "challengeResult", "type": "string", "optional": false, "description": "The result of a challenge.", "typeRef": null }, { "name": "challenge", "type": "string", "optional": false, "description": "The challenge set.", "typeRef": null }]);
  inspectorBackend2.registerType("Network.LoadNetworkResourcePageResult", [{ "name": "success", "type": "boolean", "optional": false, "description": "", "typeRef": null }, { "name": "netError", "type": "number", "optional": true, "description": "Optional values used for error reporting.", "typeRef": null }, { "name": "netErrorName", "type": "string", "optional": true, "description": "", "typeRef": null }, { "name": "httpStatusCode", "type": "number", "optional": true, "description": "", "typeRef": null }, { "name": "stream", "type": "string", "optional": true, "description": "If successful, one of the following two fields holds the result.", "typeRef": "IO.StreamHandle" }, { "name": "headers", "type": "object", "optional": true, "description": "Response headers.", "typeRef": "Network.Headers" }]);
  inspectorBackend2.registerType("Network.LoadNetworkResourceOptions", [{ "name": "disableCache", "type": "boolean", "optional": false, "description": "", "typeRef": null }, { "name": "includeCredentials", "type": "boolean", "optional": false, "description": "", "typeRef": null }]);
  inspectorBackend2.registerEnum("Overlay.LineStylePattern", { Dashed: "dashed", Dotted: "dotted" });
  inspectorBackend2.registerEnum("Overlay.ContrastAlgorithm", { Aa: "aa", Aaa: "aaa", Apca: "apca" });
  inspectorBackend2.registerEnum("Overlay.ColorFormat", { Rgb: "rgb", Hsl: "hsl", Hwb: "hwb", Hex: "hex" });
  inspectorBackend2.registerEnum("Overlay.InspectMode", { SearchForNode: "searchForNode", SearchForUAShadowDOM: "searchForUAShadowDOM", CaptureAreaScreenshot: "captureAreaScreenshot", None: "none" });
  inspectorBackend2.registerEvent("Overlay.inspectNodeRequested", ["backendNodeId"]);
  inspectorBackend2.registerEvent("Overlay.nodeHighlightRequested", ["nodeId"]);
  inspectorBackend2.registerEvent("Overlay.screenshotRequested", ["viewport"]);
  inspectorBackend2.registerEvent("Overlay.inspectPanelShowRequested", ["backendNodeId"]);
  inspectorBackend2.registerEvent("Overlay.inspectedElementWindowRestored", ["backendNodeId"]);
  inspectorBackend2.registerEvent("Overlay.inspectModeCanceled", []);
  inspectorBackend2.registerCommand("Overlay.disable", [], [], "Disables domain notifications.");
  inspectorBackend2.registerCommand("Overlay.enable", [], [], "Enables domain notifications.");
  inspectorBackend2.registerCommand("Overlay.getHighlightObjectForTest", [{ "name": "nodeId", "type": "number", "optional": false, "description": "Id of the node to get highlight object for.", "typeRef": "DOM.NodeId" }, { "name": "includeDistance", "type": "boolean", "optional": true, "description": "Whether to include distance info.", "typeRef": null }, { "name": "includeStyle", "type": "boolean", "optional": true, "description": "Whether to include style info.", "typeRef": null }, { "name": "colorFormat", "type": "string", "optional": true, "description": "The color format to get config with (default: hex).", "typeRef": "Overlay.ColorFormat" }, { "name": "showAccessibilityInfo", "type": "boolean", "optional": true, "description": "Whether to show accessibility info (default: true).", "typeRef": null }], ["highlight"], "For testing.");
  inspectorBackend2.registerCommand("Overlay.getGridHighlightObjectsForTest", [{ "name": "nodeIds", "type": "array", "optional": false, "description": "Ids of the node to get highlight object for.", "typeRef": "DOM.NodeId" }], ["highlights"], "For Persistent Grid testing.");
  inspectorBackend2.registerCommand("Overlay.getSourceOrderHighlightObjectForTest", [{ "name": "nodeId", "type": "number", "optional": false, "description": "Id of the node to highlight.", "typeRef": "DOM.NodeId" }], ["highlight"], "For Source Order Viewer testing.");
  inspectorBackend2.registerCommand("Overlay.hideHighlight", [], [], "Hides any highlight.");
  inspectorBackend2.registerCommand("Overlay.highlightFrame", [{ "name": "frameId", "type": "string", "optional": false, "description": "Identifier of the frame to highlight.", "typeRef": "Page.FrameId" }, { "name": "contentColor", "type": "object", "optional": true, "description": "The content box highlight fill color (default: transparent).", "typeRef": "DOM.RGBA" }, { "name": "contentOutlineColor", "type": "object", "optional": true, "description": "The content box highlight outline color (default: transparent).", "typeRef": "DOM.RGBA" }], [], "Highlights owner element of the frame with given id. Deprecated: Doesn't work reliably and cannot be fixed due to process separation (the owner node might be in a different process). Determine the owner node in the client and use highlightNode.");
  inspectorBackend2.registerCommand("Overlay.highlightNode", [{ "name": "highlightConfig", "type": "object", "optional": false, "description": "A descriptor for the highlight appearance.", "typeRef": "Overlay.HighlightConfig" }, { "name": "nodeId", "type": "number", "optional": true, "description": "Identifier of the node to highlight.", "typeRef": "DOM.NodeId" }, { "name": "backendNodeId", "type": "number", "optional": true, "description": "Identifier of the backend node to highlight.", "typeRef": "DOM.BackendNodeId" }, { "name": "objectId", "type": "string", "optional": true, "description": "JavaScript object id of the node to be highlighted.", "typeRef": "Runtime.RemoteObjectId" }, { "name": "selector", "type": "string", "optional": true, "description": "Selectors to highlight relevant nodes.", "typeRef": null }], [], "Highlights DOM node with given id or with the given JavaScript object wrapper. Either nodeId or objectId must be specified.");
  inspectorBackend2.registerCommand("Overlay.highlightQuad", [{ "name": "quad", "type": "array", "optional": false, "description": "Quad to highlight", "typeRef": "DOM.Quad" }, { "name": "color", "type": "object", "optional": true, "description": "The highlight fill color (default: transparent).", "typeRef": "DOM.RGBA" }, { "name": "outlineColor", "type": "object", "optional": true, "description": "The highlight outline color (default: transparent).", "typeRef": "DOM.RGBA" }], [], "Highlights given quad. Coordinates are absolute with respect to the main frame viewport.");
  inspectorBackend2.registerCommand("Overlay.highlightRect", [{ "name": "x", "type": "number", "optional": false, "description": "X coordinate", "typeRef": null }, { "name": "y", "type": "number", "optional": false, "description": "Y coordinate", "typeRef": null }, { "name": "width", "type": "number", "optional": false, "description": "Rectangle width", "typeRef": null }, { "name": "height", "type": "number", "optional": false, "description": "Rectangle height", "typeRef": null }, { "name": "color", "type": "object", "optional": true, "description": "The highlight fill color (default: transparent).", "typeRef": "DOM.RGBA" }, { "name": "outlineColor", "type": "object", "optional": true, "description": "The highlight outline color (default: transparent).", "typeRef": "DOM.RGBA" }], [], "Highlights given rectangle. Coordinates are absolute with respect to the main frame viewport. Issue: the method does not handle device pixel ratio (DPR) correctly. The coordinates currently have to be adjusted by the client if DPR is not 1 (see crbug.com/437807128).");
  inspectorBackend2.registerCommand("Overlay.highlightSourceOrder", [{ "name": "sourceOrderConfig", "type": "object", "optional": false, "description": "A descriptor for the appearance of the overlay drawing.", "typeRef": "Overlay.SourceOrderConfig" }, { "name": "nodeId", "type": "number", "optional": true, "description": "Identifier of the node to highlight.", "typeRef": "DOM.NodeId" }, { "name": "backendNodeId", "type": "number", "optional": true, "description": "Identifier of the backend node to highlight.", "typeRef": "DOM.BackendNodeId" }, { "name": "objectId", "type": "string", "optional": true, "description": "JavaScript object id of the node to be highlighted.", "typeRef": "Runtime.RemoteObjectId" }], [], "Highlights the source order of the children of the DOM node with given id or with the given JavaScript object wrapper. Either nodeId or objectId must be specified.");
  inspectorBackend2.registerCommand("Overlay.setInspectMode", [{ "name": "mode", "type": "string", "optional": false, "description": "Set an inspection mode.", "typeRef": "Overlay.InspectMode" }, { "name": "highlightConfig", "type": "object", "optional": true, "description": "A descriptor for the highlight appearance of hovered-over nodes. May be omitted if `enabled == false`.", "typeRef": "Overlay.HighlightConfig" }], [], "Enters the 'inspect' mode. In this mode, elements that user is hovering over are highlighted. Backend then generates 'inspectNodeRequested' event upon element selection.");
  inspectorBackend2.registerCommand("Overlay.setShowAdHighlights", [{ "name": "show", "type": "boolean", "optional": false, "description": "True for showing ad highlights", "typeRef": null }], [], "Highlights owner element of all frames detected to be ads.");
  inspectorBackend2.registerCommand("Overlay.setPausedInDebuggerMessage", [{ "name": "message", "type": "string", "optional": true, "description": "The message to display, also triggers resume and step over controls.", "typeRef": null }], [], "");
  inspectorBackend2.registerCommand("Overlay.setShowDebugBorders", [{ "name": "show", "type": "boolean", "optional": false, "description": "True for showing debug borders", "typeRef": null }], [], "Requests that backend shows debug borders on layers");
  inspectorBackend2.registerCommand("Overlay.setShowFPSCounter", [{ "name": "show", "type": "boolean", "optional": false, "description": "True for showing the FPS counter", "typeRef": null }], [], "Requests that backend shows the FPS counter");
  inspectorBackend2.registerCommand("Overlay.setShowGridOverlays", [{ "name": "gridNodeHighlightConfigs", "type": "array", "optional": false, "description": "An array of node identifiers and descriptors for the highlight appearance.", "typeRef": "Overlay.GridNodeHighlightConfig" }], [], "Highlight multiple elements with the CSS Grid overlay.");
  inspectorBackend2.registerCommand("Overlay.setShowFlexOverlays", [{ "name": "flexNodeHighlightConfigs", "type": "array", "optional": false, "description": "An array of node identifiers and descriptors for the highlight appearance.", "typeRef": "Overlay.FlexNodeHighlightConfig" }], [], "");
  inspectorBackend2.registerCommand("Overlay.setShowScrollSnapOverlays", [{ "name": "scrollSnapHighlightConfigs", "type": "array", "optional": false, "description": "An array of node identifiers and descriptors for the highlight appearance.", "typeRef": "Overlay.ScrollSnapHighlightConfig" }], [], "");
  inspectorBackend2.registerCommand("Overlay.setShowContainerQueryOverlays", [{ "name": "containerQueryHighlightConfigs", "type": "array", "optional": false, "description": "An array of node identifiers and descriptors for the highlight appearance.", "typeRef": "Overlay.ContainerQueryHighlightConfig" }], [], "");
  inspectorBackend2.registerCommand("Overlay.setShowInspectedElementAnchor", [{ "name": "inspectedElementAnchorConfig", "type": "object", "optional": false, "description": "Node identifier for which to show an anchor for.", "typeRef": "Overlay.InspectedElementAnchorConfig" }], [], "");
  inspectorBackend2.registerCommand("Overlay.setShowPaintRects", [{ "name": "result", "type": "boolean", "optional": false, "description": "True for showing paint rectangles", "typeRef": null }], [], "Requests that backend shows paint rectangles");
  inspectorBackend2.registerCommand("Overlay.setShowLayoutShiftRegions", [{ "name": "result", "type": "boolean", "optional": false, "description": "True for showing layout shift regions", "typeRef": null }], [], "Requests that backend shows layout shift regions");
  inspectorBackend2.registerCommand("Overlay.setShowScrollBottleneckRects", [{ "name": "show", "type": "boolean", "optional": false, "description": "True for showing scroll bottleneck rects", "typeRef": null }], [], "Requests that backend shows scroll bottleneck rects");
  inspectorBackend2.registerCommand("Overlay.setShowHitTestBorders", [{ "name": "show", "type": "boolean", "optional": false, "description": "True for showing hit-test borders", "typeRef": null }], [], "Deprecated, no longer has any effect.");
  inspectorBackend2.registerCommand("Overlay.setShowWebVitals", [{ "name": "show", "type": "boolean", "optional": false, "description": "", "typeRef": null }], [], "Deprecated, no longer has any effect.");
  inspectorBackend2.registerCommand("Overlay.setShowViewportSizeOnResize", [{ "name": "show", "type": "boolean", "optional": false, "description": "Whether to paint size or not.", "typeRef": null }], [], "Paints viewport size upon main frame resize.");
  inspectorBackend2.registerCommand("Overlay.setShowHinge", [{ "name": "hingeConfig", "type": "object", "optional": true, "description": "hinge data, null means hideHinge", "typeRef": "Overlay.HingeConfig" }], [], "Add a dual screen device hinge");
  inspectorBackend2.registerCommand("Overlay.setShowIsolatedElements", [{ "name": "isolatedElementHighlightConfigs", "type": "array", "optional": false, "description": "An array of node identifiers and descriptors for the highlight appearance.", "typeRef": "Overlay.IsolatedElementHighlightConfig" }], [], "Show elements in isolation mode with overlays.");
  inspectorBackend2.registerCommand("Overlay.setShowWindowControlsOverlay", [{ "name": "windowControlsOverlayConfig", "type": "object", "optional": true, "description": "Window Controls Overlay data, null means hide Window Controls Overlay", "typeRef": "Overlay.WindowControlsOverlayConfig" }], [], "Show Window Controls Overlay for PWA");
  inspectorBackend2.registerType("Overlay.SourceOrderConfig", [{ "name": "parentOutlineColor", "type": "object", "optional": false, "description": "the color to outline the given element in.", "typeRef": "DOM.RGBA" }, { "name": "childOutlineColor", "type": "object", "optional": false, "description": "the color to outline the child elements in.", "typeRef": "DOM.RGBA" }]);
  inspectorBackend2.registerType("Overlay.GridHighlightConfig", [{ "name": "showGridExtensionLines", "type": "boolean", "optional": true, "description": "Whether the extension lines from grid cells to the rulers should be shown (default: false).", "typeRef": null }, { "name": "showPositiveLineNumbers", "type": "boolean", "optional": true, "description": "Show Positive line number labels (default: false).", "typeRef": null }, { "name": "showNegativeLineNumbers", "type": "boolean", "optional": true, "description": "Show Negative line number labels (default: false).", "typeRef": null }, { "name": "showAreaNames", "type": "boolean", "optional": true, "description": "Show area name labels (default: false).", "typeRef": null }, { "name": "showLineNames", "type": "boolean", "optional": true, "description": "Show line name labels (default: false).", "typeRef": null }, { "name": "showTrackSizes", "type": "boolean", "optional": true, "description": "Show track size labels (default: false).", "typeRef": null }, { "name": "gridBorderColor", "type": "object", "optional": true, "description": "The grid container border highlight color (default: transparent).", "typeRef": "DOM.RGBA" }, { "name": "cellBorderColor", "type": "object", "optional": true, "description": "The cell border color (default: transparent). Deprecated, please use rowLineColor and columnLineColor instead.", "typeRef": "DOM.RGBA" }, { "name": "rowLineColor", "type": "object", "optional": true, "description": "The row line color (default: transparent).", "typeRef": "DOM.RGBA" }, { "name": "columnLineColor", "type": "object", "optional": true, "description": "The column line color (default: transparent).", "typeRef": "DOM.RGBA" }, { "name": "gridBorderDash", "type": "boolean", "optional": true, "description": "Whether the grid border is dashed (default: false).", "typeRef": null }, { "name": "cellBorderDash", "type": "boolean", "optional": true, "description": "Whether the cell border is dashed (default: false). Deprecated, please us rowLineDash and columnLineDash instead.", "typeRef": null }, { "name": "rowLineDash", "type": "boolean", "optional": true, "description": "Whether row lines are dashed (default: false).", "typeRef": null }, { "name": "columnLineDash", "type": "boolean", "optional": true, "description": "Whether column lines are dashed (default: false).", "typeRef": null }, { "name": "rowGapColor", "type": "object", "optional": true, "description": "The row gap highlight fill color (default: transparent).", "typeRef": "DOM.RGBA" }, { "name": "rowHatchColor", "type": "object", "optional": true, "description": "The row gap hatching fill color (default: transparent).", "typeRef": "DOM.RGBA" }, { "name": "columnGapColor", "type": "object", "optional": true, "description": "The column gap highlight fill color (default: transparent).", "typeRef": "DOM.RGBA" }, { "name": "columnHatchColor", "type": "object", "optional": true, "description": "The column gap hatching fill color (default: transparent).", "typeRef": "DOM.RGBA" }, { "name": "areaBorderColor", "type": "object", "optional": true, "description": "The named grid areas border color (Default: transparent).", "typeRef": "DOM.RGBA" }, { "name": "gridBackgroundColor", "type": "object", "optional": true, "description": "The grid container background color (Default: transparent).", "typeRef": "DOM.RGBA" }]);
  inspectorBackend2.registerType("Overlay.FlexContainerHighlightConfig", [{ "name": "containerBorder", "type": "object", "optional": true, "description": "The style of the container border", "typeRef": "Overlay.LineStyle" }, { "name": "lineSeparator", "type": "object", "optional": true, "description": "The style of the separator between lines", "typeRef": "Overlay.LineStyle" }, { "name": "itemSeparator", "type": "object", "optional": true, "description": "The style of the separator between items", "typeRef": "Overlay.LineStyle" }, { "name": "mainDistributedSpace", "type": "object", "optional": true, "description": "Style of content-distribution space on the main axis (justify-content).", "typeRef": "Overlay.BoxStyle" }, { "name": "crossDistributedSpace", "type": "object", "optional": true, "description": "Style of content-distribution space on the cross axis (align-content).", "typeRef": "Overlay.BoxStyle" }, { "name": "rowGapSpace", "type": "object", "optional": true, "description": "Style of empty space caused by row gaps (gap/row-gap).", "typeRef": "Overlay.BoxStyle" }, { "name": "columnGapSpace", "type": "object", "optional": true, "description": "Style of empty space caused by columns gaps (gap/column-gap).", "typeRef": "Overlay.BoxStyle" }, { "name": "crossAlignment", "type": "object", "optional": true, "description": "Style of the self-alignment line (align-items).", "typeRef": "Overlay.LineStyle" }]);
  inspectorBackend2.registerType("Overlay.FlexItemHighlightConfig", [{ "name": "baseSizeBox", "type": "object", "optional": true, "description": "Style of the box representing the item's base size", "typeRef": "Overlay.BoxStyle" }, { "name": "baseSizeBorder", "type": "object", "optional": true, "description": "Style of the border around the box representing the item's base size", "typeRef": "Overlay.LineStyle" }, { "name": "flexibilityArrow", "type": "object", "optional": true, "description": "Style of the arrow representing if the item grew or shrank", "typeRef": "Overlay.LineStyle" }]);
  inspectorBackend2.registerType("Overlay.LineStyle", [{ "name": "color", "type": "object", "optional": true, "description": "The color of the line (default: transparent)", "typeRef": "DOM.RGBA" }, { "name": "pattern", "type": "string", "optional": true, "description": "The line pattern (default: solid)", "typeRef": null }]);
  inspectorBackend2.registerType("Overlay.BoxStyle", [{ "name": "fillColor", "type": "object", "optional": true, "description": "The background color for the box (default: transparent)", "typeRef": "DOM.RGBA" }, { "name": "hatchColor", "type": "object", "optional": true, "description": "The hatching color for the box (default: transparent)", "typeRef": "DOM.RGBA" }]);
  inspectorBackend2.registerType("Overlay.HighlightConfig", [{ "name": "showInfo", "type": "boolean", "optional": true, "description": "Whether the node info tooltip should be shown (default: false).", "typeRef": null }, { "name": "showStyles", "type": "boolean", "optional": true, "description": "Whether the node styles in the tooltip (default: false).", "typeRef": null }, { "name": "showRulers", "type": "boolean", "optional": true, "description": "Whether the rulers should be shown (default: false).", "typeRef": null }, { "name": "showAccessibilityInfo", "type": "boolean", "optional": true, "description": "Whether the a11y info should be shown (default: true).", "typeRef": null }, { "name": "showExtensionLines", "type": "boolean", "optional": true, "description": "Whether the extension lines from node to the rulers should be shown (default: false).", "typeRef": null }, { "name": "contentColor", "type": "object", "optional": true, "description": "The content box highlight fill color (default: transparent).", "typeRef": "DOM.RGBA" }, { "name": "paddingColor", "type": "object", "optional": true, "description": "The padding highlight fill color (default: transparent).", "typeRef": "DOM.RGBA" }, { "name": "borderColor", "type": "object", "optional": true, "description": "The border highlight fill color (default: transparent).", "typeRef": "DOM.RGBA" }, { "name": "marginColor", "type": "object", "optional": true, "description": "The margin highlight fill color (default: transparent).", "typeRef": "DOM.RGBA" }, { "name": "eventTargetColor", "type": "object", "optional": true, "description": "The event target element highlight fill color (default: transparent).", "typeRef": "DOM.RGBA" }, { "name": "shapeColor", "type": "object", "optional": true, "description": "The shape outside fill color (default: transparent).", "typeRef": "DOM.RGBA" }, { "name": "shapeMarginColor", "type": "object", "optional": true, "description": "The shape margin fill color (default: transparent).", "typeRef": "DOM.RGBA" }, { "name": "cssGridColor", "type": "object", "optional": true, "description": "The grid layout color (default: transparent).", "typeRef": "DOM.RGBA" }, { "name": "colorFormat", "type": "string", "optional": true, "description": "The color format used to format color styles (default: hex).", "typeRef": "Overlay.ColorFormat" }, { "name": "gridHighlightConfig", "type": "object", "optional": true, "description": "The grid layout highlight configuration (default: all transparent).", "typeRef": "Overlay.GridHighlightConfig" }, { "name": "flexContainerHighlightConfig", "type": "object", "optional": true, "description": "The flex container highlight configuration (default: all transparent).", "typeRef": "Overlay.FlexContainerHighlightConfig" }, { "name": "flexItemHighlightConfig", "type": "object", "optional": true, "description": "The flex item highlight configuration (default: all transparent).", "typeRef": "Overlay.FlexItemHighlightConfig" }, { "name": "contrastAlgorithm", "type": "string", "optional": true, "description": "The contrast algorithm to use for the contrast ratio (default: aa).", "typeRef": "Overlay.ContrastAlgorithm" }, { "name": "containerQueryContainerHighlightConfig", "type": "object", "optional": true, "description": "The container query container highlight configuration (default: all transparent).", "typeRef": "Overlay.ContainerQueryContainerHighlightConfig" }]);
  inspectorBackend2.registerType("Overlay.GridNodeHighlightConfig", [{ "name": "gridHighlightConfig", "type": "object", "optional": false, "description": "A descriptor for the highlight appearance.", "typeRef": "Overlay.GridHighlightConfig" }, { "name": "nodeId", "type": "number", "optional": false, "description": "Identifier of the node to highlight.", "typeRef": "DOM.NodeId" }]);
  inspectorBackend2.registerType("Overlay.FlexNodeHighlightConfig", [{ "name": "flexContainerHighlightConfig", "type": "object", "optional": false, "description": "A descriptor for the highlight appearance of flex containers.", "typeRef": "Overlay.FlexContainerHighlightConfig" }, { "name": "nodeId", "type": "number", "optional": false, "description": "Identifier of the node to highlight.", "typeRef": "DOM.NodeId" }]);
  inspectorBackend2.registerType("Overlay.ScrollSnapContainerHighlightConfig", [{ "name": "snapportBorder", "type": "object", "optional": true, "description": "The style of the snapport border (default: transparent)", "typeRef": "Overlay.LineStyle" }, { "name": "snapAreaBorder", "type": "object", "optional": true, "description": "The style of the snap area border (default: transparent)", "typeRef": "Overlay.LineStyle" }, { "name": "scrollMarginColor", "type": "object", "optional": true, "description": "The margin highlight fill color (default: transparent).", "typeRef": "DOM.RGBA" }, { "name": "scrollPaddingColor", "type": "object", "optional": true, "description": "The padding highlight fill color (default: transparent).", "typeRef": "DOM.RGBA" }]);
  inspectorBackend2.registerType("Overlay.ScrollSnapHighlightConfig", [{ "name": "scrollSnapContainerHighlightConfig", "type": "object", "optional": false, "description": "A descriptor for the highlight appearance of scroll snap containers.", "typeRef": "Overlay.ScrollSnapContainerHighlightConfig" }, { "name": "nodeId", "type": "number", "optional": false, "description": "Identifier of the node to highlight.", "typeRef": "DOM.NodeId" }]);
  inspectorBackend2.registerType("Overlay.HingeConfig", [{ "name": "rect", "type": "object", "optional": false, "description": "A rectangle represent hinge", "typeRef": "DOM.Rect" }, { "name": "contentColor", "type": "object", "optional": true, "description": "The content box highlight fill color (default: a dark color).", "typeRef": "DOM.RGBA" }, { "name": "outlineColor", "type": "object", "optional": true, "description": "The content box highlight outline color (default: transparent).", "typeRef": "DOM.RGBA" }]);
  inspectorBackend2.registerType("Overlay.WindowControlsOverlayConfig", [{ "name": "showCSS", "type": "boolean", "optional": false, "description": "Whether the title bar CSS should be shown when emulating the Window Controls Overlay.", "typeRef": null }, { "name": "selectedPlatform", "type": "string", "optional": false, "description": "Selected platforms to show the overlay.", "typeRef": null }, { "name": "themeColor", "type": "string", "optional": false, "description": "The theme color defined in app manifest.", "typeRef": null }]);
  inspectorBackend2.registerType("Overlay.ContainerQueryHighlightConfig", [{ "name": "containerQueryContainerHighlightConfig", "type": "object", "optional": false, "description": "A descriptor for the highlight appearance of container query containers.", "typeRef": "Overlay.ContainerQueryContainerHighlightConfig" }, { "name": "nodeId", "type": "number", "optional": false, "description": "Identifier of the container node to highlight.", "typeRef": "DOM.NodeId" }]);
  inspectorBackend2.registerType("Overlay.ContainerQueryContainerHighlightConfig", [{ "name": "containerBorder", "type": "object", "optional": true, "description": "The style of the container border.", "typeRef": "Overlay.LineStyle" }, { "name": "descendantBorder", "type": "object", "optional": true, "description": "The style of the descendants' borders.", "typeRef": "Overlay.LineStyle" }]);
  inspectorBackend2.registerType("Overlay.IsolatedElementHighlightConfig", [{ "name": "isolationModeHighlightConfig", "type": "object", "optional": false, "description": "A descriptor for the highlight appearance of an element in isolation mode.", "typeRef": "Overlay.IsolationModeHighlightConfig" }, { "name": "nodeId", "type": "number", "optional": false, "description": "Identifier of the isolated element to highlight.", "typeRef": "DOM.NodeId" }]);
  inspectorBackend2.registerType("Overlay.IsolationModeHighlightConfig", [{ "name": "resizerColor", "type": "object", "optional": true, "description": "The fill color of the resizers (default: transparent).", "typeRef": "DOM.RGBA" }, { "name": "resizerHandleColor", "type": "object", "optional": true, "description": "The fill color for resizer handles (default: transparent).", "typeRef": "DOM.RGBA" }, { "name": "maskColor", "type": "object", "optional": true, "description": "The fill color for the mask covering non-isolated elements (default: transparent).", "typeRef": "DOM.RGBA" }]);
  inspectorBackend2.registerType("Overlay.InspectedElementAnchorConfig", [{ "name": "nodeId", "type": "number", "optional": true, "description": "Identifier of the node to highlight.", "typeRef": "DOM.NodeId" }, { "name": "backendNodeId", "type": "number", "optional": true, "description": "Identifier of the backend node to highlight.", "typeRef": "DOM.BackendNodeId" }]);
  inspectorBackend2.registerEnum("PWA.DisplayMode", { Standalone: "standalone", Browser: "browser" });
  inspectorBackend2.registerCommand("PWA.getOsAppState", [{ "name": "manifestId", "type": "string", "optional": false, "description": "The id from the webapp's manifest file, commonly it's the url of the site installing the webapp. See https://web.dev/learn/pwa/web-app-manifest.", "typeRef": null }], ["badgeCount", "fileHandlers"], "Returns the following OS state for the given manifest id.");
  inspectorBackend2.registerCommand("PWA.install", [{ "name": "manifestId", "type": "string", "optional": false, "description": "", "typeRef": null }, { "name": "installUrlOrBundleUrl", "type": "string", "optional": true, "description": "The location of the app or bundle overriding the one derived from the manifestId.", "typeRef": null }], [], "Installs the given manifest identity, optionally using the given installUrlOrBundleUrl  IWA-specific install description: manifestId corresponds to isolated-app:// + web_package::SignedWebBundleId  File installation mode: The installUrlOrBundleUrl can be either file:// or http(s):// pointing to a signed web bundle (.swbn). In this case SignedWebBundleId must correspond to The .swbn file's signing key.  Dev proxy installation mode: installUrlOrBundleUrl must be http(s):// that serves dev mode IWA. web_package::SignedWebBundleId must be of type dev proxy.  The advantage of dev proxy mode is that all changes to IWA automatically will be reflected in the running app without reinstallation.  To generate bundle id for proxy mode: 1. Generate 32 random bytes. 2. Add a specific suffix at the end following the documentation    https://github.com/WICG/isolated-web-apps/blob/main/Scheme.md#suffix 3. Encode the entire sequence using Base32 without padding.  If Chrome is not in IWA dev mode, the installation will fail, regardless of the state of the allowlist.");
  inspectorBackend2.registerCommand("PWA.uninstall", [{ "name": "manifestId", "type": "string", "optional": false, "description": "", "typeRef": null }], [], "Uninstalls the given manifest_id and closes any opened app windows.");
  inspectorBackend2.registerCommand("PWA.launch", [{ "name": "manifestId", "type": "string", "optional": false, "description": "", "typeRef": null }, { "name": "url", "type": "string", "optional": true, "description": "", "typeRef": null }], ["targetId"], "Launches the installed web app, or an url in the same web app instead of the default start url if it is provided. Returns a page Target.TargetID which can be used to attach to via Target.attachToTarget or similar APIs.");
  inspectorBackend2.registerCommand("PWA.launchFilesInApp", [{ "name": "manifestId", "type": "string", "optional": false, "description": "", "typeRef": null }, { "name": "files", "type": "array", "optional": false, "description": "", "typeRef": "string" }], ["targetIds"], "Opens one or more local files from an installed web app identified by its manifestId. The web app needs to have file handlers registered to process the files. The API returns one or more page Target.TargetIDs which can be used to attach to via Target.attachToTarget or similar APIs. If some files in the parameters cannot be handled by the web app, they will be ignored. If none of the files can be handled, this API returns an error. If no files are provided as the parameter, this API also returns an error.  According to the definition of the file handlers in the manifest file, one Target.TargetID may represent a page handling one or more files. The order of the returned Target.TargetIDs is not guaranteed.  TODO(crbug.com/339454034): Check the existences of the input files.");
  inspectorBackend2.registerCommand("PWA.openCurrentPageInApp", [{ "name": "manifestId", "type": "string", "optional": false, "description": "", "typeRef": null }], [], "Opens the current page in its web app identified by the manifest id, needs to be called on a page target. This function returns immediately without waiting for the app to finish loading.");
  inspectorBackend2.registerCommand("PWA.changeAppUserSettings", [{ "name": "manifestId", "type": "string", "optional": false, "description": "", "typeRef": null }, { "name": "linkCapturing", "type": "boolean", "optional": true, "description": "If user allows the links clicked on by the user in the app's scope, or extended scope if the manifest has scope extensions and the flags `DesktopPWAsLinkCapturingWithScopeExtensions` and `WebAppEnableScopeExtensions` are enabled.  Note, the API does not support resetting the linkCapturing to the initial value, uninstalling and installing the web app again will reset it.  TODO(crbug.com/339453269): Setting this value on ChromeOS is not supported yet.", "typeRef": null }, { "name": "displayMode", "type": "string", "optional": true, "description": "", "typeRef": "PWA.DisplayMode" }], [], "Changes user settings of the web app identified by its manifestId. If the app was not installed, this command returns an error. Unset parameters will be ignored; unrecognized values will cause an error.  Unlike the ones defined in the manifest files of the web apps, these settings are provided by the browser and controlled by the users, they impact the way the browser handling the web apps.  See the comment of each parameter.");
  inspectorBackend2.registerType("PWA.FileHandlerAccept", [{ "name": "mediaType", "type": "string", "optional": false, "description": "New name of the mimetype according to https://www.iana.org/assignments/media-types/media-types.xhtml", "typeRef": null }, { "name": "fileExtensions", "type": "array", "optional": false, "description": "", "typeRef": "string" }]);
  inspectorBackend2.registerType("PWA.FileHandler", [{ "name": "action", "type": "string", "optional": false, "description": "", "typeRef": null }, { "name": "accepts", "type": "array", "optional": false, "description": "", "typeRef": "PWA.FileHandlerAccept" }, { "name": "displayName", "type": "string", "optional": false, "description": "", "typeRef": null }]);
  inspectorBackend2.registerEnum("Page.AdFrameType", { None: "none", Child: "child", Root: "root" });
  inspectorBackend2.registerEnum("Page.AdFrameExplanation", { ParentIsAd: "ParentIsAd", CreatedByAdScript: "CreatedByAdScript", MatchedBlockingRule: "MatchedBlockingRule" });
  inspectorBackend2.registerEnum("Page.SecureContextType", { Secure: "Secure", SecureLocalhost: "SecureLocalhost", InsecureScheme: "InsecureScheme", InsecureAncestor: "InsecureAncestor" });
  inspectorBackend2.registerEnum("Page.CrossOriginIsolatedContextType", { Isolated: "Isolated", NotIsolated: "NotIsolated", NotIsolatedFeatureDisabled: "NotIsolatedFeatureDisabled" });
  inspectorBackend2.registerEnum("Page.GatedAPIFeatures", { SharedArrayBuffers: "SharedArrayBuffers", SharedArrayBuffersTransferAllowed: "SharedArrayBuffersTransferAllowed", PerformanceMeasureMemory: "PerformanceMeasureMemory", PerformanceProfile: "PerformanceProfile" });
  inspectorBackend2.registerEnum("Page.PermissionsPolicyFeature", { Accelerometer: "accelerometer", AllScreensCapture: "all-screens-capture", AmbientLightSensor: "ambient-light-sensor", AriaNotify: "aria-notify", AttributionReporting: "attribution-reporting", Autofill: "autofill", Autoplay: "autoplay", Bluetooth: "bluetooth", BrowsingTopics: "browsing-topics", Camera: "camera", CapturedSurfaceControl: "captured-surface-control", ChDpr: "ch-dpr", ChDeviceMemory: "ch-device-memory", ChDownlink: "ch-downlink", ChEct: "ch-ect", ChPrefersColorScheme: "ch-prefers-color-scheme", ChPrefersReducedMotion: "ch-prefers-reduced-motion", ChPrefersReducedTransparency: "ch-prefers-reduced-transparency", ChRtt: "ch-rtt", ChSaveData: "ch-save-data", ChUa: "ch-ua", ChUaArch: "ch-ua-arch", ChUaBitness: "ch-ua-bitness", ChUaHighEntropyValues: "ch-ua-high-entropy-values", ChUaPlatform: "ch-ua-platform", ChUaModel: "ch-ua-model", ChUaMobile: "ch-ua-mobile", ChUaFormFactors: "ch-ua-form-factors", ChUaFullVersion: "ch-ua-full-version", ChUaFullVersionList: "ch-ua-full-version-list", ChUaPlatformVersion: "ch-ua-platform-version", ChUaWow64: "ch-ua-wow64", ChViewportHeight: "ch-viewport-height", ChViewportWidth: "ch-viewport-width", ChWidth: "ch-width", ClipboardRead: "clipboard-read", ClipboardWrite: "clipboard-write", ComputePressure: "compute-pressure", ControlledFrame: "controlled-frame", CrossOriginIsolated: "cross-origin-isolated", DeferredFetch: "deferred-fetch", DeferredFetchMinimal: "deferred-fetch-minimal", DeviceAttributes: "device-attributes", DigitalCredentialsCreate: "digital-credentials-create", DigitalCredentialsGet: "digital-credentials-get", DirectSockets: "direct-sockets", DirectSocketsMulticast: "direct-sockets-multicast", DirectSocketsPrivate: "direct-sockets-private", DisplayCapture: "display-capture", DocumentDomain: "document-domain", EncryptedMedia: "encrypted-media", ExecutionWhileOutOfViewport: "execution-while-out-of-viewport", ExecutionWhileNotRendered: "execution-while-not-rendered", FencedUnpartitionedStorageRead: "fenced-unpartitioned-storage-read", FocusWithoutUserActivation: "focus-without-user-activation", Fullscreen: "fullscreen", Frobulate: "frobulate", Gamepad: "gamepad", Geolocation: "geolocation", Gyroscope: "gyroscope", Hid: "hid", IdentityCredentialsGet: "identity-credentials-get", IdleDetection: "idle-detection", InterestCohort: "interest-cohort", JoinAdInterestGroup: "join-ad-interest-group", KeyboardMap: "keyboard-map", LanguageDetector: "language-detector", LanguageModel: "language-model", LocalFonts: "local-fonts", LocalNetwork: "local-network", LocalNetworkAccess: "local-network-access", LoopbackNetwork: "loopback-network", Magnetometer: "magnetometer", ManualText: "manual-text", MediaPlaybackWhileNotVisible: "media-playback-while-not-visible", Microphone: "microphone", Midi: "midi", OnDeviceSpeechRecognition: "on-device-speech-recognition", OtpCredentials: "otp-credentials", Payment: "payment", PictureInPicture: "picture-in-picture", PrivateAggregation: "private-aggregation", PrivateStateTokenIssuance: "private-state-token-issuance", PrivateStateTokenRedemption: "private-state-token-redemption", PublickeyCredentialsCreate: "publickey-credentials-create", PublickeyCredentialsGet: "publickey-credentials-get", RecordAdAuctionEvents: "record-ad-auction-events", Rewriter: "rewriter", RunAdAuction: "run-ad-auction", ScreenWakeLock: "screen-wake-lock", Serial: "serial", SharedStorage: "shared-storage", SharedStorageSelectUrl: "shared-storage-select-url", SmartCard: "smart-card", SpeakerSelection: "speaker-selection", StorageAccess: "storage-access", SubApps: "sub-apps", Summarizer: "summarizer", SyncXhr: "sync-xhr", Translator: "translator", Unload: "unload", Usb: "usb", UsbUnrestricted: "usb-unrestricted", VerticalScroll: "vertical-scroll", WebAppInstallation: "web-app-installation", WebPrinting: "web-printing", WebShare: "web-share", WindowManagement: "window-management", Writer: "writer", XrSpatialTracking: "xr-spatial-tracking" });
  inspectorBackend2.registerEnum("Page.PermissionsPolicyBlockReason", { Header: "Header", IframeAttribute: "IframeAttribute", InFencedFrameTree: "InFencedFrameTree", InIsolatedApp: "InIsolatedApp" });
  inspectorBackend2.registerEnum("Page.OriginTrialTokenStatus", { Success: "Success", NotSupported: "NotSupported", Insecure: "Insecure", Expired: "Expired", WrongOrigin: "WrongOrigin", InvalidSignature: "InvalidSignature", Malformed: "Malformed", WrongVersion: "WrongVersion", FeatureDisabled: "FeatureDisabled", TokenDisabled: "TokenDisabled", FeatureDisabledForUser: "FeatureDisabledForUser", UnknownTrial: "UnknownTrial" });
  inspectorBackend2.registerEnum("Page.OriginTrialStatus", { Enabled: "Enabled", ValidTokenNotProvided: "ValidTokenNotProvided", OSNotSupported: "OSNotSupported", TrialNotAllowed: "TrialNotAllowed" });
  inspectorBackend2.registerEnum("Page.OriginTrialUsageRestriction", { None: "None", Subset: "Subset" });
  inspectorBackend2.registerEnum("Page.TransitionType", { Link: "link", Typed: "typed", Address_bar: "address_bar", Auto_bookmark: "auto_bookmark", Auto_subframe: "auto_subframe", Manual_subframe: "manual_subframe", Generated: "generated", Auto_toplevel: "auto_toplevel", Form_submit: "form_submit", Reload: "reload", Keyword: "keyword", Keyword_generated: "keyword_generated", Other: "other" });
  inspectorBackend2.registerEnum("Page.DialogType", { Alert: "alert", Confirm: "confirm", Prompt: "prompt", Beforeunload: "beforeunload" });
  inspectorBackend2.registerEnum("Page.ClientNavigationReason", { AnchorClick: "anchorClick", FormSubmissionGet: "formSubmissionGet", FormSubmissionPost: "formSubmissionPost", HttpHeaderRefresh: "httpHeaderRefresh", InitialFrameNavigation: "initialFrameNavigation", MetaTagRefresh: "metaTagRefresh", Other: "other", PageBlockInterstitial: "pageBlockInterstitial", Reload: "reload", ScriptInitiated: "scriptInitiated" });
  inspectorBackend2.registerEnum("Page.ClientNavigationDisposition", { CurrentTab: "currentTab", NewTab: "newTab", NewWindow: "newWindow", Download: "download" });
  inspectorBackend2.registerEnum("Page.ReferrerPolicy", { NoReferrer: "noReferrer", NoReferrerWhenDowngrade: "noReferrerWhenDowngrade", Origin: "origin", OriginWhenCrossOrigin: "originWhenCrossOrigin", SameOrigin: "sameOrigin", StrictOrigin: "strictOrigin", StrictOriginWhenCrossOrigin: "strictOriginWhenCrossOrigin", UnsafeUrl: "unsafeUrl" });
  inspectorBackend2.registerEnum("Page.NavigationType", { Navigation: "Navigation", BackForwardCacheRestore: "BackForwardCacheRestore" });
  inspectorBackend2.registerEnum("Page.BackForwardCacheNotRestoredReason", { NotPrimaryMainFrame: "NotPrimaryMainFrame", BackForwardCacheDisabled: "BackForwardCacheDisabled", RelatedActiveContentsExist: "RelatedActiveContentsExist", HTTPStatusNotOK: "HTTPStatusNotOK", SchemeNotHTTPOrHTTPS: "SchemeNotHTTPOrHTTPS", Loading: "Loading", WasGrantedMediaAccess: "WasGrantedMediaAccess", DisableForRenderFrameHostCalled: "DisableForRenderFrameHostCalled", DomainNotAllowed: "DomainNotAllowed", HTTPMethodNotGET: "HTTPMethodNotGET", SubframeIsNavigating: "SubframeIsNavigating", Timeout: "Timeout", CacheLimit: "CacheLimit", JavaScriptExecution: "JavaScriptExecution", RendererProcessKilled: "RendererProcessKilled", RendererProcessCrashed: "RendererProcessCrashed", SchedulerTrackedFeatureUsed: "SchedulerTrackedFeatureUsed", ConflictingBrowsingInstance: "ConflictingBrowsingInstance", CacheFlushed: "CacheFlushed", ServiceWorkerVersionActivation: "ServiceWorkerVersionActivation", SessionRestored: "SessionRestored", ServiceWorkerPostMessage: "ServiceWorkerPostMessage", EnteredBackForwardCacheBeforeServiceWorkerHostAdded: "EnteredBackForwardCacheBeforeServiceWorkerHostAdded", RenderFrameHostReused_SameSite: "RenderFrameHostReused_SameSite", RenderFrameHostReused_CrossSite: "RenderFrameHostReused_CrossSite", ServiceWorkerClaim: "ServiceWorkerClaim", IgnoreEventAndEvict: "IgnoreEventAndEvict", HaveInnerContents: "HaveInnerContents", TimeoutPuttingInCache: "TimeoutPuttingInCache", BackForwardCacheDisabledByLowMemory: "BackForwardCacheDisabledByLowMemory", BackForwardCacheDisabledByCommandLine: "BackForwardCacheDisabledByCommandLine", NetworkRequestDatAPIpeDrainedAsBytesConsumer: "NetworkRequestDatapipeDrainedAsBytesConsumer", NetworkRequestRedirected: "NetworkRequestRedirected", NetworkRequestTimeout: "NetworkRequestTimeout", NetworkExceedsBufferLimit: "NetworkExceedsBufferLimit", NavigationCancelledWhileRestoring: "NavigationCancelledWhileRestoring", NotMostRecentNavigationEntry: "NotMostRecentNavigationEntry", BackForwardCacheDisabledForPrerender: "BackForwardCacheDisabledForPrerender", UserAgentOverrideDiffers: "UserAgentOverrideDiffers", ForegroundCacheLimit: "ForegroundCacheLimit", BrowsingInstanceNotSwapped: "BrowsingInstanceNotSwapped", BackForwardCacheDisabledForDelegate: "BackForwardCacheDisabledForDelegate", UnloadHandlerExistsInMainFrame: "UnloadHandlerExistsInMainFrame", UnloadHandlerExistsInSubFrame: "UnloadHandlerExistsInSubFrame", ServiceWorkerUnregistration: "ServiceWorkerUnregistration", CacheControlNoStore: "CacheControlNoStore", CacheControlNoStoreCookieModified: "CacheControlNoStoreCookieModified", CacheControlNoStoreHTTPOnlyCookieModified: "CacheControlNoStoreHTTPOnlyCookieModified", NoResponseHead: "NoResponseHead", Unknown: "Unknown", ActivationNavigationsDisallowedForBug1234857: "ActivationNavigationsDisallowedForBug1234857", ErrorDocument: "ErrorDocument", FencedFramesEmbedder: "FencedFramesEmbedder", CookieDisabled: "CookieDisabled", HTTPAuthRequired: "HTTPAuthRequired", CookieFlushed: "CookieFlushed", BroadcastChannelOnMessage: "BroadcastChannelOnMessage", WebViewSettingsChanged: "WebViewSettingsChanged", WebViewJavaScriptObjectChanged: "WebViewJavaScriptObjectChanged", WebViewMessageListenerInjected: "WebViewMessageListenerInjected", WebViewSafeBrowsingAllowlistChanged: "WebViewSafeBrowsingAllowlistChanged", WebViewDocumentStartJavascriptChanged: "WebViewDocumentStartJavascriptChanged", WebSocket: "WebSocket", WebTransport: "WebTransport", WebRTC: "WebRTC", MainResourceHasCacheControlNoStore: "MainResourceHasCacheControlNoStore", MainResourceHasCacheControlNoCache: "MainResourceHasCacheControlNoCache", SubresourceHasCacheControlNoStore: "SubresourceHasCacheControlNoStore", SubresourceHasCacheControlNoCache: "SubresourceHasCacheControlNoCache", ContainsPlugins: "ContainsPlugins", DocumentLoaded: "DocumentLoaded", OutstandingNetworkRequestOthers: "OutstandingNetworkRequestOthers", RequestedMIDIPermission: "RequestedMIDIPermission", RequestedAudioCapturePermission: "RequestedAudioCapturePermission", RequestedVideoCapturePermission: "RequestedVideoCapturePermission", RequestedBackForwardCacheBlockedSensors: "RequestedBackForwardCacheBlockedSensors", RequestedBackgroundWorkPermission: "RequestedBackgroundWorkPermission", BroadcastChannel: "BroadcastChannel", WebXR: "WebXR", SharedWorker: "SharedWorker", SharedWorkerMessage: "SharedWorkerMessage", SharedWorkerWithNoActiveClient: "SharedWorkerWithNoActiveClient", WebLocks: "WebLocks", WebLocksContention: "WebLocksContention", WebHID: "WebHID", WebBluetooth: "WebBluetooth", WebShare: "WebShare", RequestedStorageAccessGrant: "RequestedStorageAccessGrant", WebNfc: "WebNfc", OutstandingNetworkRequestFetch: "OutstandingNetworkRequestFetch", OutstandingNetworkRequestXHR: "OutstandingNetworkRequestXHR", AppBanner: "AppBanner", Printing: "Printing", WebDatabase: "WebDatabase", PictureInPicture: "PictureInPicture", SpeechRecognizer: "SpeechRecognizer", IdleManager: "IdleManager", PaymentManager: "PaymentManager", SpeechSynthesis: "SpeechSynthesis", KeyboardLock: "KeyboardLock", WebOTPService: "WebOTPService", OutstandingNetworkRequestDirectSocket: "OutstandingNetworkRequestDirectSocket", InjectedJavascript: "InjectedJavascript", InjectedStyleSheet: "InjectedStyleSheet", KeepaliveRequest: "KeepaliveRequest", IndexedDBEvent: "IndexedDBEvent", Dummy: "Dummy", JsNetworkRequestReceivedCacheControlNoStoreResource: "JsNetworkRequestReceivedCacheControlNoStoreResource", WebRTCUsedWithCCNS: "WebRTCUsedWithCCNS", WebTransportUsedWithCCNS: "WebTransportUsedWithCCNS", WebSocketUsedWithCCNS: "WebSocketUsedWithCCNS", SmartCard: "SmartCard", LiveMediaStreamTrack: "LiveMediaStreamTrack", UnloadHandler: "UnloadHandler", ParserAborted: "ParserAborted", ContentSecurityHandler: "ContentSecurityHandler", ContentWebAuthenticationAPI: "ContentWebAuthenticationAPI", ContentFileChooser: "ContentFileChooser", ContentSerial: "ContentSerial", ContentFileSystemAccess: "ContentFileSystemAccess", ContentMediaDevicesDispatcherHost: "ContentMediaDevicesDispatcherHost", ContentWebBluetooth: "ContentWebBluetooth", ContentWebUSB: "ContentWebUSB", ContentMediaSessionService: "ContentMediaSessionService", ContentScreenReader: "ContentScreenReader", ContentDiscarded: "ContentDiscarded", EmbedderPopupBlockerTabHelper: "EmbedderPopupBlockerTabHelper", EmbedderSafeBrowsingTriggeredPopupBlocker: "EmbedderSafeBrowsingTriggeredPopupBlocker", EmbedderSafeBrowsingThreatDetails: "EmbedderSafeBrowsingThreatDetails", EmbedderAppBannerManager: "EmbedderAppBannerManager", EmbedderDomDistillerViewerSource: "EmbedderDomDistillerViewerSource", EmbedderDomDistillerSelfDeletingRequestDelegate: "EmbedderDomDistillerSelfDeletingRequestDelegate", EmbedderOomInterventionTabHelper: "EmbedderOomInterventionTabHelper", EmbedderOfflinePage: "EmbedderOfflinePage", EmbedderChromePasswordManagerClientBindCredentialManager: "EmbedderChromePasswordManagerClientBindCredentialManager", EmbedderPermissionRequestManager: "EmbedderPermissionRequestManager", EmbedderModalDialog: "EmbedderModalDialog", EmbedderExtensions: "EmbedderExtensions", EmbedderExtensionMessaging: "EmbedderExtensionMessaging", EmbedderExtensionMessagingForOpenPort: "EmbedderExtensionMessagingForOpenPort", EmbedderExtensionSentMessageToCachedFrame: "EmbedderExtensionSentMessageToCachedFrame", RequestedByWebViewClient: "RequestedByWebViewClient", PostMessageByWebViewClient: "PostMessageByWebViewClient", CacheControlNoStoreDeviceBoundSessionTerminated: "CacheControlNoStoreDeviceBoundSessionTerminated", CacheLimitPrunedOnModerateMemoryPressure: "CacheLimitPrunedOnModerateMemoryPressure", CacheLimitPrunedOnCriticalMemoryPressure: "CacheLimitPrunedOnCriticalMemoryPressure" });
  inspectorBackend2.registerEnum("Page.BackForwardCacheNotRestoredReasonType", { SupportPending: "SupportPending", PageSupportNeeded: "PageSupportNeeded", Circumstantial: "Circumstantial" });
  inspectorBackend2.registerEvent("Page.domContentEventFired", ["timestamp"]);
  inspectorBackend2.registerEnum("Page.FileChooserOpenedEventMode", { SelectSingle: "selectSingle", SelectMultiple: "selectMultiple" });
  inspectorBackend2.registerEvent("Page.fileChooserOpened", ["frameId", "mode", "backendNodeId"]);
  inspectorBackend2.registerEvent("Page.frameAttached", ["frameId", "parentFrameId", "stack"]);
  inspectorBackend2.registerEvent("Page.frameClearedScheduledNavigation", ["frameId"]);
  inspectorBackend2.registerEnum("Page.FrameDetachedEventReason", { Remove: "remove", Swap: "swap" });
  inspectorBackend2.registerEvent("Page.frameDetached", ["frameId", "reason"]);
  inspectorBackend2.registerEvent("Page.frameSubtreeWillBeDetached", ["frameId"]);
  inspectorBackend2.registerEvent("Page.frameNavigated", ["frame", "type"]);
  inspectorBackend2.registerEvent("Page.documentOpened", ["frame"]);
  inspectorBackend2.registerEvent("Page.frameResized", []);
  inspectorBackend2.registerEnum("Page.FrameStartedNavigatingEventNavigationType", { Reload: "reload", ReloadBypassingCache: "reloadBypassingCache", Restore: "restore", RestoreWithPost: "restoreWithPost", HistorySameDocument: "historySameDocument", HistoryDifferentDocument: "historyDifferentDocument", SameDocument: "sameDocument", DifferentDocument: "differentDocument" });
  inspectorBackend2.registerEvent("Page.frameStartedNavigating", ["frameId", "url", "loaderId", "navigationType"]);
  inspectorBackend2.registerEvent("Page.frameRequestedNavigation", ["frameId", "reason", "url", "disposition"]);
  inspectorBackend2.registerEvent("Page.frameScheduledNavigation", ["frameId", "delay", "reason", "url"]);
  inspectorBackend2.registerEvent("Page.frameStartedLoading", ["frameId"]);
  inspectorBackend2.registerEvent("Page.frameStoppedLoading", ["frameId"]);
  inspectorBackend2.registerEvent("Page.downloadWillBegin", ["frameId", "guid", "url", "suggestedFilename"]);
  inspectorBackend2.registerEnum("Page.DownloadProgressEventState", { InProgress: "inProgress", Completed: "completed", Canceled: "canceled" });
  inspectorBackend2.registerEvent("Page.downloadProgress", ["guid", "totalBytes", "receivedBytes", "state"]);
  inspectorBackend2.registerEvent("Page.interstitialHidden", []);
  inspectorBackend2.registerEvent("Page.interstitialShown", []);
  inspectorBackend2.registerEvent("Page.javascriptDialogClosed", ["frameId", "result", "userInput"]);
  inspectorBackend2.registerEvent("Page.javascriptDialogOpening", ["url", "frameId", "message", "type", "hasBrowserHandler", "defaultPrompt"]);
  inspectorBackend2.registerEvent("Page.lifecycleEvent", ["frameId", "loaderId", "name", "timestamp"]);
  inspectorBackend2.registerEvent("Page.backForwardCacheNotUsed", ["loaderId", "frameId", "notRestoredExplanations", "notRestoredExplanationsTree"]);
  inspectorBackend2.registerEvent("Page.loadEventFired", ["timestamp"]);
  inspectorBackend2.registerEnum("Page.NavigatedWithinDocumentEventNavigationType", { Fragment: "fragment", HistoryAPI: "historyApi", Other: "other" });
  inspectorBackend2.registerEvent("Page.navigatedWithinDocument", ["frameId", "url", "navigationType"]);
  inspectorBackend2.registerEvent("Page.screencastFrame", ["data", "metadata", "sessionId"]);
  inspectorBackend2.registerEvent("Page.screencastVisibilityChanged", ["visible"]);
  inspectorBackend2.registerEvent("Page.windowOpen", ["url", "windowName", "windowFeatures", "userGesture"]);
  inspectorBackend2.registerEvent("Page.compilationCacheProduced", ["url", "data"]);
  inspectorBackend2.registerCommand("Page.addScriptToEvaluateOnLoad", [{ "name": "scriptSource", "type": "string", "optional": false, "description": "", "typeRef": null }], ["identifier"], "Deprecated, please use addScriptToEvaluateOnNewDocument instead.");
  inspectorBackend2.registerCommand("Page.addScriptToEvaluateOnNewDocument", [{ "name": "source", "type": "string", "optional": false, "description": "", "typeRef": null }, { "name": "worldName", "type": "string", "optional": true, "description": "If specified, creates an isolated world with the given name and evaluates given script in it. This world name will be used as the ExecutionContextDescription::name when the corresponding event is emitted.", "typeRef": null }, { "name": "includeCommandLineAPI", "type": "boolean", "optional": true, "description": "Specifies whether command line API should be available to the script, defaults to false.", "typeRef": null }, { "name": "runImmediately", "type": "boolean", "optional": true, "description": "If true, runs the script immediately on existing execution contexts or worlds. Default: false.", "typeRef": null }], ["identifier"], "Evaluates given script in every frame upon creation (before loading frame's scripts).");
  inspectorBackend2.registerCommand("Page.bringToFront", [], [], "Brings page to front (activates tab).");
  inspectorBackend2.registerEnum("Page.CaptureScreenshotRequestFormat", { Jpeg: "jpeg", Png: "png", Webp: "webp" });
  inspectorBackend2.registerCommand("Page.captureScreenshot", [{ "name": "format", "type": "string", "optional": true, "description": "Image compression format (defaults to png).", "typeRef": "Page.CaptureScreenshotRequestFormat" }, { "name": "quality", "type": "number", "optional": true, "description": "Compression quality from range [0..100] (jpeg only).", "typeRef": null }, { "name": "clip", "type": "object", "optional": true, "description": "Capture the screenshot of a given region only.", "typeRef": "Page.Viewport" }, { "name": "fromSurface", "type": "boolean", "optional": true, "description": "Capture the screenshot from the surface, rather than the view. Defaults to true.", "typeRef": null }, { "name": "captureBeyondViewport", "type": "boolean", "optional": true, "description": "Capture the screenshot beyond the viewport. Defaults to false.", "typeRef": null }, { "name": "optimizeForSpeed", "type": "boolean", "optional": true, "description": "Optimize image encoding for speed, not for resulting size (defaults to false)", "typeRef": null }], ["data"], "Capture page screenshot.");
  inspectorBackend2.registerEnum("Page.CaptureSnapshotRequestFormat", { MHTML: "mhtml" });
  inspectorBackend2.registerCommand("Page.captureSnapshot", [{ "name": "format", "type": "string", "optional": true, "description": "Format (defaults to mhtml).", "typeRef": "Page.CaptureSnapshotRequestFormat" }], ["data"], "Returns a snapshot of the page as a string. For MHTML format, the serialization includes iframes, shadow DOM, external resources, and element-inline styles.");
  inspectorBackend2.registerCommand("Page.clearDeviceMetricsOverride", [], [], "Clears the overridden device metrics.");
  inspectorBackend2.registerCommand("Page.clearDeviceOrientationOverride", [], [], "Clears the overridden Device Orientation.");
  inspectorBackend2.registerCommand("Page.clearGeolocationOverride", [], [], "Clears the overridden Geolocation Position and Error.");
  inspectorBackend2.registerCommand("Page.createIsolatedWorld", [{ "name": "frameId", "type": "string", "optional": false, "description": "Id of the frame in which the isolated world should be created.", "typeRef": "Page.FrameId" }, { "name": "worldName", "type": "string", "optional": true, "description": "An optional name which is reported in the Execution Context.", "typeRef": null }, { "name": "grantUniveralAccess", "type": "boolean", "optional": true, "description": "Whether or not universal access should be granted to the isolated world. This is a powerful option, use with caution.", "typeRef": null }], ["executionContextId"], "Creates an isolated world for the given frame.");
  inspectorBackend2.registerCommand("Page.deleteCookie", [{ "name": "cookieName", "type": "string", "optional": false, "description": "Name of the cookie to remove.", "typeRef": null }, { "name": "url", "type": "string", "optional": false, "description": "URL to match cooke domain and path.", "typeRef": null }], [], "Deletes browser cookie with given name, domain and path.");
  inspectorBackend2.registerCommand("Page.disable", [], [], "Disables page domain notifications.");
  inspectorBackend2.registerCommand("Page.enable", [{ "name": "enableFileChooserOpenedEvent", "type": "boolean", "optional": true, "description": "If true, the `Page.fileChooserOpened` event will be emitted regardless of the state set by `Page.setInterceptFileChooserDialog` command (default: false).", "typeRef": null }], [], "Enables page domain notifications.");
  inspectorBackend2.registerCommand("Page.getAppManifest", [{ "name": "manifestId", "type": "string", "optional": true, "description": "", "typeRef": null }], ["url", "errors", "data", "parsed", "manifest"], "Gets the processed manifest for this current document.   This API always waits for the manifest to be loaded.   If manifestId is provided, and it does not match the manifest of the     current document, this API errors out.   If there is not a loaded page, this API errors out immediately.");
  inspectorBackend2.registerCommand("Page.getInstallabilityErrors", [], ["installabilityErrors"], "");
  inspectorBackend2.registerCommand("Page.getManifestIcons", [], ["primaryIcon"], "Deprecated because it's not guaranteed that the returned icon is in fact the one used for PWA installation.");
  inspectorBackend2.registerCommand("Page.getAppId", [], ["appId", "recommendedId"], "Returns the unique (PWA) app id. Only returns values if the feature flag 'WebAppEnableManifestId' is enabled");
  inspectorBackend2.registerCommand("Page.getAdScriptAncestry", [{ "name": "frameId", "type": "string", "optional": false, "description": "", "typeRef": "Page.FrameId" }], ["adScriptAncestry"], "");
  inspectorBackend2.registerCommand("Page.getFrameTree", [], ["frameTree"], "Returns present frame tree structure.");
  inspectorBackend2.registerCommand("Page.getLayoutMetrics", [], ["layoutViewport", "visualViewport", "contentSize", "cssLayoutViewport", "cssVisualViewport", "cssContentSize"], "Returns metrics relating to the layouting of the page, such as viewport bounds/scale.");
  inspectorBackend2.registerCommand("Page.getNavigationHistory", [], ["currentIndex", "entries"], "Returns navigation history for the current page.");
  inspectorBackend2.registerCommand("Page.resetNavigationHistory", [], [], "Resets navigation history for the current page.");
  inspectorBackend2.registerCommand("Page.getResourceContent", [{ "name": "frameId", "type": "string", "optional": false, "description": "Frame id to get resource for.", "typeRef": "Page.FrameId" }, { "name": "url", "type": "string", "optional": false, "description": "URL of the resource to get content for.", "typeRef": null }], ["content", "base64Encoded"], "Returns content of the given resource.");
  inspectorBackend2.registerCommand("Page.getResourceTree", [], ["frameTree"], "Returns present frame / resource tree structure.");
  inspectorBackend2.registerCommand("Page.handleJavaScriptDialog", [{ "name": "accept", "type": "boolean", "optional": false, "description": "Whether to accept or dismiss the dialog.", "typeRef": null }, { "name": "promptText", "type": "string", "optional": true, "description": "The text to enter into the dialog prompt before accepting. Used only if this is a prompt dialog.", "typeRef": null }], [], "Accepts or dismisses a JavaScript initiated dialog (alert, confirm, prompt, or onbeforeunload).");
  inspectorBackend2.registerCommand("Page.navigate", [{ "name": "url", "type": "string", "optional": false, "description": "URL to navigate the page to.", "typeRef": null }, { "name": "referrer", "type": "string", "optional": true, "description": "Referrer URL.", "typeRef": null }, { "name": "transitionType", "type": "string", "optional": true, "description": "Intended transition type.", "typeRef": "Page.TransitionType" }, { "name": "frameId", "type": "string", "optional": true, "description": "Frame id to navigate, if not specified navigates the top frame.", "typeRef": "Page.FrameId" }, { "name": "referrerPolicy", "type": "string", "optional": true, "description": "Referrer-policy used for the navigation.", "typeRef": "Page.ReferrerPolicy" }], ["frameId", "loaderId", "errorText", "isDownload"], "Navigates current page to the given URL.");
  inspectorBackend2.registerCommand("Page.navigateToHistoryEntry", [{ "name": "entryId", "type": "number", "optional": false, "description": "Unique id of the entry to navigate to.", "typeRef": null }], [], "Navigates current page to the given history entry.");
  inspectorBackend2.registerEnum("Page.PrintToPDFRequestTransferMode", { ReturnAsBase64: "ReturnAsBase64", ReturnAsStream: "ReturnAsStream" });
  inspectorBackend2.registerCommand("Page.printToPDF", [{ "name": "landscape", "type": "boolean", "optional": true, "description": "Paper orientation. Defaults to false.", "typeRef": null }, { "name": "displayHeaderFooter", "type": "boolean", "optional": true, "description": "Display header and footer. Defaults to false.", "typeRef": null }, { "name": "printBackground", "type": "boolean", "optional": true, "description": "Print background graphics. Defaults to false.", "typeRef": null }, { "name": "scale", "type": "number", "optional": true, "description": "Scale of the webpage rendering. Defaults to 1.", "typeRef": null }, { "name": "paperWidth", "type": "number", "optional": true, "description": "Paper width in inches. Defaults to 8.5 inches.", "typeRef": null }, { "name": "paperHeight", "type": "number", "optional": true, "description": "Paper height in inches. Defaults to 11 inches.", "typeRef": null }, { "name": "marginTop", "type": "number", "optional": true, "description": "Top margin in inches. Defaults to 1cm (~0.4 inches).", "typeRef": null }, { "name": "marginBottom", "type": "number", "optional": true, "description": "Bottom margin in inches. Defaults to 1cm (~0.4 inches).", "typeRef": null }, { "name": "marginLeft", "type": "number", "optional": true, "description": "Left margin in inches. Defaults to 1cm (~0.4 inches).", "typeRef": null }, { "name": "marginRight", "type": "number", "optional": true, "description": "Right margin in inches. Defaults to 1cm (~0.4 inches).", "typeRef": null }, { "name": "pageRanges", "type": "string", "optional": true, "description": "Paper ranges to print, one based, e.g., '1-5, 8, 11-13'. Pages are printed in the document order, not in the order specified, and no more than once. Defaults to empty string, which implies the entire document is printed. The page numbers are quietly capped to actual page count of the document, and ranges beyond the end of the document are ignored. If this results in no pages to print, an error is reported. It is an error to specify a range with start greater than end.", "typeRef": null }, { "name": "headerTemplate", "type": "string", "optional": true, "description": "HTML template for the print header. Should be valid HTML markup with following classes used to inject printing values into them: - `date`: formatted print date - `title`: document title - `url`: document location - `pageNumber`: current page number - `totalPages`: total pages in the document  For example, `<span class=title></span>` would generate span containing the title.", "typeRef": null }, { "name": "footerTemplate", "type": "string", "optional": true, "description": "HTML template for the print footer. Should use the same format as the `headerTemplate`.", "typeRef": null }, { "name": "preferCSSPageSize", "type": "boolean", "optional": true, "description": "Whether or not to prefer page size as defined by css. Defaults to false, in which case the content will be scaled to fit the paper size.", "typeRef": null }, { "name": "transferMode", "type": "string", "optional": true, "description": "return as stream", "typeRef": "Page.PrintToPDFRequestTransferMode" }, { "name": "generateTaggedPDF", "type": "boolean", "optional": true, "description": "Whether or not to generate tagged (accessible) PDF. Defaults to embedder choice.", "typeRef": null }, { "name": "generateDocumentOutline", "type": "boolean", "optional": true, "description": "Whether or not to embed the document outline into the PDF.", "typeRef": null }], ["data", "stream"], "Print page as PDF.");
  inspectorBackend2.registerCommand("Page.reload", [{ "name": "ignoreCache", "type": "boolean", "optional": true, "description": "If true, browser cache is ignored (as if the user pressed Shift+refresh).", "typeRef": null }, { "name": "scriptToEvaluateOnLoad", "type": "string", "optional": true, "description": "If set, the script will be injected into all frames of the inspected page after reload. Argument will be ignored if reloading dataURL origin.", "typeRef": null }, { "name": "loaderId", "type": "string", "optional": true, "description": "If set, an error will be thrown if the target page's main frame's loader id does not match the provided id. This prevents accidentally reloading an unintended target in case there's a racing navigation.", "typeRef": "Network.LoaderId" }], [], "Reloads given page optionally ignoring the cache.");
  inspectorBackend2.registerCommand("Page.removeScriptToEvaluateOnLoad", [{ "name": "identifier", "type": "string", "optional": false, "description": "", "typeRef": "Page.ScriptIdentifier" }], [], "Deprecated, please use removeScriptToEvaluateOnNewDocument instead.");
  inspectorBackend2.registerCommand("Page.removeScriptToEvaluateOnNewDocument", [{ "name": "identifier", "type": "string", "optional": false, "description": "", "typeRef": "Page.ScriptIdentifier" }], [], "Removes given script from the list.");
  inspectorBackend2.registerCommand("Page.screencastFrameAck", [{ "name": "sessionId", "type": "number", "optional": false, "description": "Frame number.", "typeRef": null }], [], "Acknowledges that a screencast frame has been received by the frontend.");
  inspectorBackend2.registerCommand("Page.searchInResource", [{ "name": "frameId", "type": "string", "optional": false, "description": "Frame id for resource to search in.", "typeRef": "Page.FrameId" }, { "name": "url", "type": "string", "optional": false, "description": "URL of the resource to search in.", "typeRef": null }, { "name": "query", "type": "string", "optional": false, "description": "String to search for.", "typeRef": null }, { "name": "caseSensitive", "type": "boolean", "optional": true, "description": "If true, search is case sensitive.", "typeRef": null }, { "name": "isRegex", "type": "boolean", "optional": true, "description": "If true, treats string parameter as regex.", "typeRef": null }], ["result"], "Searches for given string in resource content.");
  inspectorBackend2.registerCommand("Page.setAdBlockingEnabled", [{ "name": "enabled", "type": "boolean", "optional": false, "description": "Whether to block ads.", "typeRef": null }], [], "Enable Chrome's experimental ad filter on all sites.");
  inspectorBackend2.registerCommand("Page.setBypassCSP", [{ "name": "enabled", "type": "boolean", "optional": false, "description": "Whether to bypass page CSP.", "typeRef": null }], [], "Enable page Content Security Policy by-passing.");
  inspectorBackend2.registerCommand("Page.getPermissionsPolicyState", [{ "name": "frameId", "type": "string", "optional": false, "description": "", "typeRef": "Page.FrameId" }], ["states"], "Get Permissions Policy state on given frame.");
  inspectorBackend2.registerCommand("Page.getOriginTrials", [{ "name": "frameId", "type": "string", "optional": false, "description": "", "typeRef": "Page.FrameId" }], ["originTrials"], "Get Origin Trials on given frame.");
  inspectorBackend2.registerCommand("Page.setDeviceMetricsOverride", [{ "name": "width", "type": "number", "optional": false, "description": "Overriding width value in pixels (minimum 0, maximum 10000000). 0 disables the override.", "typeRef": null }, { "name": "height", "type": "number", "optional": false, "description": "Overriding height value in pixels (minimum 0, maximum 10000000). 0 disables the override.", "typeRef": null }, { "name": "deviceScaleFactor", "type": "number", "optional": false, "description": "Overriding device scale factor value. 0 disables the override.", "typeRef": null }, { "name": "mobile", "type": "boolean", "optional": false, "description": "Whether to emulate mobile device. This includes viewport meta tag, overlay scrollbars, text autosizing and more.", "typeRef": null }, { "name": "scale", "type": "number", "optional": true, "description": "Scale to apply to resulting view image.", "typeRef": null }, { "name": "screenWidth", "type": "number", "optional": true, "description": "Overriding screen width value in pixels (minimum 0, maximum 10000000).", "typeRef": null }, { "name": "screenHeight", "type": "number", "optional": true, "description": "Overriding screen height value in pixels (minimum 0, maximum 10000000).", "typeRef": null }, { "name": "positionX", "type": "number", "optional": true, "description": "Overriding view X position on screen in pixels (minimum 0, maximum 10000000).", "typeRef": null }, { "name": "positionY", "type": "number", "optional": true, "description": "Overriding view Y position on screen in pixels (minimum 0, maximum 10000000).", "typeRef": null }, { "name": "dontSetVisibleSize", "type": "boolean", "optional": true, "description": "Do not set visible view size, rely upon explicit setVisibleSize call.", "typeRef": null }, { "name": "screenOrientation", "type": "object", "optional": true, "description": "Screen orientation override.", "typeRef": "Emulation.ScreenOrientation" }, { "name": "viewport", "type": "object", "optional": true, "description": "The viewport dimensions and scale. If not set, the override is cleared.", "typeRef": "Page.Viewport" }], [], 'Overrides the values of device screen dimensions (window.screen.width, window.screen.height, window.innerWidth, window.innerHeight, and "device-width"/"device-height"-related CSS media query results).');
  inspectorBackend2.registerCommand("Page.setDeviceOrientationOverride", [{ "name": "alpha", "type": "number", "optional": false, "description": "Mock alpha", "typeRef": null }, { "name": "beta", "type": "number", "optional": false, "description": "Mock beta", "typeRef": null }, { "name": "gamma", "type": "number", "optional": false, "description": "Mock gamma", "typeRef": null }], [], "Overrides the Device Orientation.");
  inspectorBackend2.registerCommand("Page.setFontFamilies", [{ "name": "fontFamilies", "type": "object", "optional": false, "description": "Specifies font families to set. If a font family is not specified, it won't be changed.", "typeRef": "Page.FontFamilies" }, { "name": "forScripts", "type": "array", "optional": true, "description": "Specifies font families to set for individual scripts.", "typeRef": "Page.ScriptFontFamilies" }], [], "Set generic font families.");
  inspectorBackend2.registerCommand("Page.setFontSizes", [{ "name": "fontSizes", "type": "object", "optional": false, "description": "Specifies font sizes to set. If a font size is not specified, it won't be changed.", "typeRef": "Page.FontSizes" }], [], "Set default font sizes.");
  inspectorBackend2.registerCommand("Page.setDocumentContent", [{ "name": "frameId", "type": "string", "optional": false, "description": "Frame id to set HTML for.", "typeRef": "Page.FrameId" }, { "name": "html", "type": "string", "optional": false, "description": "HTML content to set.", "typeRef": null }], [], "Sets given markup as the document's HTML.");
  inspectorBackend2.registerEnum("Page.SetDownloadBehaviorRequestBehavior", { Deny: "deny", Allow: "allow", Default: "default" });
  inspectorBackend2.registerCommand("Page.setDownloadBehavior", [{ "name": "behavior", "type": "string", "optional": false, "description": "Whether to allow all or deny all download requests, or use default Chrome behavior if available (otherwise deny).", "typeRef": "Page.SetDownloadBehaviorRequestBehavior" }, { "name": "downloadPath", "type": "string", "optional": true, "description": "The default path to save downloaded files to. This is required if behavior is set to 'allow'", "typeRef": null }], [], "Set the behavior when downloading a file.");
  inspectorBackend2.registerCommand("Page.setGeolocationOverride", [{ "name": "latitude", "type": "number", "optional": true, "description": "Mock latitude", "typeRef": null }, { "name": "longitude", "type": "number", "optional": true, "description": "Mock longitude", "typeRef": null }, { "name": "accuracy", "type": "number", "optional": true, "description": "Mock accuracy", "typeRef": null }], [], "Overrides the Geolocation Position or Error. Omitting any of the parameters emulates position unavailable.");
  inspectorBackend2.registerCommand("Page.setLifecycleEventsEnabled", [{ "name": "enabled", "type": "boolean", "optional": false, "description": "If true, starts emitting lifecycle events.", "typeRef": null }], [], "Controls whether page will emit lifecycle events.");
  inspectorBackend2.registerEnum("Page.SetTouchEmulationEnabledRequestConfiguration", { Mobile: "mobile", Desktop: "desktop" });
  inspectorBackend2.registerCommand("Page.setTouchEmulationEnabled", [{ "name": "enabled", "type": "boolean", "optional": false, "description": "Whether the touch event emulation should be enabled.", "typeRef": null }, { "name": "configuration", "type": "string", "optional": true, "description": "Touch/gesture events configuration. Default: current platform.", "typeRef": "Page.SetTouchEmulationEnabledRequestConfiguration" }], [], "Toggles mouse event-based touch event emulation.");
  inspectorBackend2.registerEnum("Page.StartScreencastRequestFormat", { Jpeg: "jpeg", Png: "png" });
  inspectorBackend2.registerCommand("Page.startScreencast", [{ "name": "format", "type": "string", "optional": true, "description": "Image compression format.", "typeRef": "Page.StartScreencastRequestFormat" }, { "name": "quality", "type": "number", "optional": true, "description": "Compression quality from range [0..100].", "typeRef": null }, { "name": "maxWidth", "type": "number", "optional": true, "description": "Maximum screenshot width.", "typeRef": null }, { "name": "maxHeight", "type": "number", "optional": true, "description": "Maximum screenshot height.", "typeRef": null }, { "name": "everyNthFrame", "type": "number", "optional": true, "description": "Send every n-th frame.", "typeRef": null }], [], "Starts sending each frame using the `screencastFrame` event.");
  inspectorBackend2.registerCommand("Page.stopLoading", [], [], "Force the page stop all navigations and pending resource fetches.");
  inspectorBackend2.registerCommand("Page.crash", [], [], "Crashes renderer on the IO thread, generates minidumps.");
  inspectorBackend2.registerCommand("Page.close", [], [], "Tries to close page, running its beforeunload hooks, if any.");
  inspectorBackend2.registerEnum("Page.SetWebLifecycleStateRequestState", { Frozen: "frozen", Active: "active" });
  inspectorBackend2.registerCommand("Page.setWebLifecycleState", [{ "name": "state", "type": "string", "optional": false, "description": "Target lifecycle state", "typeRef": "Page.SetWebLifecycleStateRequestState" }], [], "Tries to update the web lifecycle state of the page. It will transition the page to the given state according to: https://github.com/WICG/web-lifecycle/");
  inspectorBackend2.registerCommand("Page.stopScreencast", [], [], "Stops sending each frame in the `screencastFrame`.");
  inspectorBackend2.registerCommand("Page.produceCompilationCache", [{ "name": "scripts", "type": "array", "optional": false, "description": "", "typeRef": "Page.CompilationCacheParams" }], [], "Requests backend to produce compilation cache for the specified scripts. `scripts` are appended to the list of scripts for which the cache would be produced. The list may be reset during page navigation. When script with a matching URL is encountered, the cache is optionally produced upon backend discretion, based on internal heuristics. See also: `Page.compilationCacheProduced`.");
  inspectorBackend2.registerCommand("Page.addCompilationCache", [{ "name": "url", "type": "string", "optional": false, "description": "", "typeRef": null }, { "name": "data", "type": "string", "optional": false, "description": "Base64-encoded data", "typeRef": null }], [], "Seeds compilation cache for given url. Compilation cache does not survive cross-process navigation.");
  inspectorBackend2.registerCommand("Page.clearCompilationCache", [], [], "Clears seeded compilation cache.");
  inspectorBackend2.registerEnum("Page.SetSPCTransactionModeRequestMode", { None: "none", AutoAccept: "autoAccept", AutoChooseToAuthAnotherWay: "autoChooseToAuthAnotherWay", AutoReject: "autoReject", AutoOptOut: "autoOptOut" });
  inspectorBackend2.registerCommand("Page.setSPCTransactionMode", [{ "name": "mode", "type": "string", "optional": false, "description": "", "typeRef": "Page.SetSPCTransactionModeRequestMode" }], [], "Sets the Secure Payment Confirmation transaction mode. https://w3c.github.io/secure-payment-confirmation/#sctn-automation-set-spc-transaction-mode");
  inspectorBackend2.registerEnum("Page.SetRPHRegistrationModeRequestMode", { None: "none", AutoAccept: "autoAccept", AutoReject: "autoReject" });
  inspectorBackend2.registerCommand("Page.setRPHRegistrationMode", [{ "name": "mode", "type": "string", "optional": false, "description": "", "typeRef": "Page.SetRPHRegistrationModeRequestMode" }], [], "Extensions for Custom Handlers API: https://html.spec.whatwg.org/multipage/system-state.html#rph-automation");
  inspectorBackend2.registerCommand("Page.generateTestReport", [{ "name": "message", "type": "string", "optional": false, "description": "Message to be displayed in the report.", "typeRef": null }, { "name": "group", "type": "string", "optional": true, "description": "Specifies the endpoint group to deliver the report to.", "typeRef": null }], [], "Generates a report for testing.");
  inspectorBackend2.registerCommand("Page.waitForDebugger", [], [], "Pauses page execution. Can be resumed using generic Runtime.runIfWaitingForDebugger.");
  inspectorBackend2.registerCommand("Page.setInterceptFileChooserDialog", [{ "name": "enabled", "type": "boolean", "optional": false, "description": "", "typeRef": null }, { "name": "cancel", "type": "boolean", "optional": true, "description": "If true, cancels the dialog by emitting relevant events (if any) in addition to not showing it if the interception is enabled (default: false).", "typeRef": null }], [], "Intercept file chooser requests and transfer control to protocol clients. When file chooser interception is enabled, native file chooser dialog is not shown. Instead, a protocol event `Page.fileChooserOpened` is emitted.");
  inspectorBackend2.registerCommand("Page.setPrerenderingAllowed", [{ "name": "isAllowed", "type": "boolean", "optional": false, "description": "", "typeRef": null }], [], "Enable/disable prerendering manually.  This command is a short-term solution for https://crbug.com/1440085. See https://docs.google.com/document/d/12HVmFxYj5Jc-eJr5OmWsa2bqTJsbgGLKI6ZIyx0_wpA for more details.  TODO(https://crbug.com/1440085): Remove this once Puppeteer supports tab targets.");
  inspectorBackend2.registerCommand("Page.getAnnotatedPageContent", [{ "name": "includeActionableInformation", "type": "boolean", "optional": true, "description": "Whether to include actionable information. Defaults to true.", "typeRef": null }], ["content"], "Get the annotated page content for the main frame. This is an experimental command that is subject to change.");
  inspectorBackend2.registerType("Page.AdFrameStatus", [{ "name": "adFrameType", "type": "string", "optional": false, "description": "", "typeRef": "Page.AdFrameType" }, { "name": "explanations", "type": "array", "optional": true, "description": "", "typeRef": "Page.AdFrameExplanation" }]);
  inspectorBackend2.registerType("Page.AdScriptId", [{ "name": "scriptId", "type": "string", "optional": false, "description": "Script Id of the script which caused a script or frame to be labelled as an ad.", "typeRef": "Runtime.ScriptId" }, { "name": "debuggerId", "type": "string", "optional": false, "description": "Id of scriptId's debugger.", "typeRef": "Runtime.UniqueDebuggerId" }]);
  inspectorBackend2.registerType("Page.AdScriptAncestry", [{ "name": "ancestryChain", "type": "array", "optional": false, "description": "A chain of `AdScriptId`s representing the ancestry of an ad script that led to the creation of a frame. The chain is ordered from the script itself (lower level) up to its root ancestor that was flagged by filterlist.", "typeRef": "Page.AdScriptId" }, { "name": "rootScriptFilterlistRule", "type": "string", "optional": true, "description": "The filterlist rule that caused the root (last) script in `ancestryChain` to be ad-tagged. Only populated if the rule is available.", "typeRef": null }]);
  inspectorBackend2.registerType("Page.PermissionsPolicyBlockLocator", [{ "name": "frameId", "type": "string", "optional": false, "description": "", "typeRef": "Page.FrameId" }, { "name": "blockReason", "type": "string", "optional": false, "description": "", "typeRef": "Page.PermissionsPolicyBlockReason" }]);
  inspectorBackend2.registerType("Page.PermissionsPolicyFeatureState", [{ "name": "feature", "type": "string", "optional": false, "description": "", "typeRef": "Page.PermissionsPolicyFeature" }, { "name": "allowed", "type": "boolean", "optional": false, "description": "", "typeRef": null }, { "name": "locator", "type": "object", "optional": true, "description": "", "typeRef": "Page.PermissionsPolicyBlockLocator" }]);
  inspectorBackend2.registerType("Page.OriginTrialToken", [{ "name": "origin", "type": "string", "optional": false, "description": "", "typeRef": null }, { "name": "matchSubDomains", "type": "boolean", "optional": false, "description": "", "typeRef": null }, { "name": "trialName", "type": "string", "optional": false, "description": "", "typeRef": null }, { "name": "expiryTime", "type": "number", "optional": false, "description": "", "typeRef": "Network.TimeSinceEpoch" }, { "name": "isThirdParty", "type": "boolean", "optional": false, "description": "", "typeRef": null }, { "name": "usageRestriction", "type": "string", "optional": false, "description": "", "typeRef": "Page.OriginTrialUsageRestriction" }]);
  inspectorBackend2.registerType("Page.OriginTrialTokenWithStatus", [{ "name": "rawTokenText", "type": "string", "optional": false, "description": "", "typeRef": null }, { "name": "parsedToken", "type": "object", "optional": true, "description": "`parsedToken` is present only when the token is extractable and parsable.", "typeRef": "Page.OriginTrialToken" }, { "name": "status", "type": "string", "optional": false, "description": "", "typeRef": "Page.OriginTrialTokenStatus" }]);
  inspectorBackend2.registerType("Page.OriginTrial", [{ "name": "trialName", "type": "string", "optional": false, "description": "", "typeRef": null }, { "name": "status", "type": "string", "optional": false, "description": "", "typeRef": "Page.OriginTrialStatus" }, { "name": "tokensWithStatus", "type": "array", "optional": false, "description": "", "typeRef": "Page.OriginTrialTokenWithStatus" }]);
  inspectorBackend2.registerType("Page.SecurityOriginDetails", [{ "name": "isLocalhost", "type": "boolean", "optional": false, "description": `Indicates whether the frame document's security origin is one of the local hostnames (e.g. \\"localhost\\") or IP addresses (IPv4 127.0.0.0/8 or IPv6 ::1).`, "typeRef": null }]);
  inspectorBackend2.registerType("Page.Frame", [{ "name": "id", "type": "string", "optional": false, "description": "Frame unique identifier.", "typeRef": "Page.FrameId" }, { "name": "parentId", "type": "string", "optional": true, "description": "Parent frame identifier.", "typeRef": "Page.FrameId" }, { "name": "loaderId", "type": "string", "optional": false, "description": "Identifier of the loader associated with this frame.", "typeRef": "Network.LoaderId" }, { "name": "name", "type": "string", "optional": true, "description": "Frame's name as specified in the tag.", "typeRef": null }, { "name": "url", "type": "string", "optional": false, "description": "Frame document's URL without fragment.", "typeRef": null }, { "name": "urlFragment", "type": "string", "optional": true, "description": "Frame document's URL fragment including the '#'.", "typeRef": null }, { "name": "domainAndRegistry", "type": "string", "optional": false, "description": `Frame document's registered domain, taking the public suffixes list into account. Extracted from the Frame's url. Example URLs: http://www.google.com/file.html -> \\"google.com\\"               http://a.b.co.uk/file.html      -> \\"b.co.uk\\"`, "typeRef": null }, { "name": "securityOrigin", "type": "string", "optional": false, "description": "Frame document's security origin.", "typeRef": null }, { "name": "securityOriginDetails", "type": "object", "optional": true, "description": "Additional details about the frame document's security origin.", "typeRef": "Page.SecurityOriginDetails" }, { "name": "mimeType", "type": "string", "optional": false, "description": "Frame document's mimeType as determined by the browser.", "typeRef": null }, { "name": "unreachableUrl", "type": "string", "optional": true, "description": "If the frame failed to load, this contains the URL that could not be loaded. Note that unlike url above, this URL may contain a fragment.", "typeRef": null }, { "name": "adFrameStatus", "type": "object", "optional": true, "description": "Indicates whether this frame was tagged as an ad and why.", "typeRef": "Page.AdFrameStatus" }, { "name": "secureContextType", "type": "string", "optional": false, "description": "Indicates whether the main document is a secure context and explains why that is the case.", "typeRef": "Page.SecureContextType" }, { "name": "crossOriginIsolatedContextType", "type": "string", "optional": false, "description": "Indicates whether this is a cross origin isolated context.", "typeRef": "Page.CrossOriginIsolatedContextType" }, { "name": "gatedAPIFeatures", "type": "array", "optional": false, "description": "Indicated which gated APIs / features are available.", "typeRef": "Page.GatedAPIFeatures" }]);
  inspectorBackend2.registerType("Page.FrameResource", [{ "name": "url", "type": "string", "optional": false, "description": "Resource URL.", "typeRef": null }, { "name": "type", "type": "string", "optional": false, "description": "Type of this resource.", "typeRef": "Network.ResourceType" }, { "name": "mimeType", "type": "string", "optional": false, "description": "Resource mimeType as determined by the browser.", "typeRef": null }, { "name": "lastModified", "type": "number", "optional": true, "description": "last-modified timestamp as reported by server.", "typeRef": "Network.TimeSinceEpoch" }, { "name": "contentSize", "type": "number", "optional": true, "description": "Resource content size.", "typeRef": null }, { "name": "failed", "type": "boolean", "optional": true, "description": "True if the resource failed to load.", "typeRef": null }, { "name": "canceled", "type": "boolean", "optional": true, "description": "True if the resource was canceled during loading.", "typeRef": null }]);
  inspectorBackend2.registerType("Page.FrameResourceTree", [{ "name": "frame", "type": "object", "optional": false, "description": "Frame information for this tree item.", "typeRef": "Page.Frame" }, { "name": "childFrames", "type": "array", "optional": true, "description": "Child frames.", "typeRef": "Page.FrameResourceTree" }, { "name": "resources", "type": "array", "optional": false, "description": "Information about frame resources.", "typeRef": "Page.FrameResource" }]);
  inspectorBackend2.registerType("Page.FrameTree", [{ "name": "frame", "type": "object", "optional": false, "description": "Frame information for this tree item.", "typeRef": "Page.Frame" }, { "name": "childFrames", "type": "array", "optional": true, "description": "Child frames.", "typeRef": "Page.FrameTree" }]);
  inspectorBackend2.registerType("Page.NavigationEntry", [{ "name": "id", "type": "number", "optional": false, "description": "Unique id of the navigation history entry.", "typeRef": null }, { "name": "url", "type": "string", "optional": false, "description": "URL of the navigation history entry.", "typeRef": null }, { "name": "userTypedURL", "type": "string", "optional": false, "description": "URL that the user typed in the url bar.", "typeRef": null }, { "name": "title", "type": "string", "optional": false, "description": "Title of the navigation history entry.", "typeRef": null }, { "name": "transitionType", "type": "string", "optional": false, "description": "Transition type.", "typeRef": "Page.TransitionType" }]);
  inspectorBackend2.registerType("Page.ScreencastFrameMetadata", [{ "name": "offsetTop", "type": "number", "optional": false, "description": "Top offset in DIP.", "typeRef": null }, { "name": "pageScaleFactor", "type": "number", "optional": false, "description": "Page scale factor.", "typeRef": null }, { "name": "deviceWidth", "type": "number", "optional": false, "description": "Device screen width in DIP.", "typeRef": null }, { "name": "deviceHeight", "type": "number", "optional": false, "description": "Device screen height in DIP.", "typeRef": null }, { "name": "scrollOffsetX", "type": "number", "optional": false, "description": "Position of horizontal scroll in CSS pixels.", "typeRef": null }, { "name": "scrollOffsetY", "type": "number", "optional": false, "description": "Position of vertical scroll in CSS pixels.", "typeRef": null }, { "name": "timestamp", "type": "number", "optional": true, "description": "Frame swap timestamp.", "typeRef": "Network.TimeSinceEpoch" }]);
  inspectorBackend2.registerType("Page.AppManifestError", [{ "name": "message", "type": "string", "optional": false, "description": "Error message.", "typeRef": null }, { "name": "critical", "type": "number", "optional": false, "description": "If critical, this is a non-recoverable parse error.", "typeRef": null }, { "name": "line", "type": "number", "optional": false, "description": "Error line.", "typeRef": null }, { "name": "column", "type": "number", "optional": false, "description": "Error column.", "typeRef": null }]);
  inspectorBackend2.registerType("Page.AppManifestParsedProperties", [{ "name": "scope", "type": "string", "optional": false, "description": "Computed scope value", "typeRef": null }]);
  inspectorBackend2.registerType("Page.LayoutViewport", [{ "name": "pageX", "type": "number", "optional": false, "description": "Horizontal offset relative to the document (CSS pixels).", "typeRef": null }, { "name": "pageY", "type": "number", "optional": false, "description": "Vertical offset relative to the document (CSS pixels).", "typeRef": null }, { "name": "clientWidth", "type": "number", "optional": false, "description": "Width (CSS pixels), excludes scrollbar if present.", "typeRef": null }, { "name": "clientHeight", "type": "number", "optional": false, "description": "Height (CSS pixels), excludes scrollbar if present.", "typeRef": null }]);
  inspectorBackend2.registerType("Page.VisualViewport", [{ "name": "offsetX", "type": "number", "optional": false, "description": "Horizontal offset relative to the layout viewport (CSS pixels).", "typeRef": null }, { "name": "offsetY", "type": "number", "optional": false, "description": "Vertical offset relative to the layout viewport (CSS pixels).", "typeRef": null }, { "name": "pageX", "type": "number", "optional": false, "description": "Horizontal offset relative to the document (CSS pixels).", "typeRef": null }, { "name": "pageY", "type": "number", "optional": false, "description": "Vertical offset relative to the document (CSS pixels).", "typeRef": null }, { "name": "clientWidth", "type": "number", "optional": false, "description": "Width (CSS pixels), excludes scrollbar if present.", "typeRef": null }, { "name": "clientHeight", "type": "number", "optional": false, "description": "Height (CSS pixels), excludes scrollbar if present.", "typeRef": null }, { "name": "scale", "type": "number", "optional": false, "description": "Scale relative to the ideal viewport (size at width=device-width).", "typeRef": null }, { "name": "zoom", "type": "number", "optional": true, "description": "Page zoom factor (CSS to device independent pixels ratio).", "typeRef": null }]);
  inspectorBackend2.registerType("Page.Viewport", [{ "name": "x", "type": "number", "optional": false, "description": "X offset in device independent pixels (dip).", "typeRef": null }, { "name": "y", "type": "number", "optional": false, "description": "Y offset in device independent pixels (dip).", "typeRef": null }, { "name": "width", "type": "number", "optional": false, "description": "Rectangle width in device independent pixels (dip).", "typeRef": null }, { "name": "height", "type": "number", "optional": false, "description": "Rectangle height in device independent pixels (dip).", "typeRef": null }, { "name": "scale", "type": "number", "optional": false, "description": "Page scale factor.", "typeRef": null }]);
  inspectorBackend2.registerType("Page.FontFamilies", [{ "name": "standard", "type": "string", "optional": true, "description": "The standard font-family.", "typeRef": null }, { "name": "fixed", "type": "string", "optional": true, "description": "The fixed font-family.", "typeRef": null }, { "name": "serif", "type": "string", "optional": true, "description": "The serif font-family.", "typeRef": null }, { "name": "sansSerif", "type": "string", "optional": true, "description": "The sansSerif font-family.", "typeRef": null }, { "name": "cursive", "type": "string", "optional": true, "description": "The cursive font-family.", "typeRef": null }, { "name": "fantasy", "type": "string", "optional": true, "description": "The fantasy font-family.", "typeRef": null }, { "name": "math", "type": "string", "optional": true, "description": "The math font-family.", "typeRef": null }]);
  inspectorBackend2.registerType("Page.ScriptFontFamilies", [{ "name": "script", "type": "string", "optional": false, "description": "Name of the script which these font families are defined for.", "typeRef": null }, { "name": "fontFamilies", "type": "object", "optional": false, "description": "Generic font families collection for the script.", "typeRef": "Page.FontFamilies" }]);
  inspectorBackend2.registerType("Page.FontSizes", [{ "name": "standard", "type": "number", "optional": true, "description": "Default standard font size.", "typeRef": null }, { "name": "fixed", "type": "number", "optional": true, "description": "Default fixed font size.", "typeRef": null }]);
  inspectorBackend2.registerType("Page.InstallabilityErrorArgument", [{ "name": "name", "type": "string", "optional": false, "description": "Argument name (e.g. name:'minimum-icon-size-in-pixels').", "typeRef": null }, { "name": "value", "type": "string", "optional": false, "description": "Argument value (e.g. value:'64').", "typeRef": null }]);
  inspectorBackend2.registerType("Page.InstallabilityError", [{ "name": "errorId", "type": "string", "optional": false, "description": "The error id (e.g. 'manifest-missing-suitable-icon').", "typeRef": null }, { "name": "errorArguments", "type": "array", "optional": false, "description": "The list of error arguments (e.g. {name:'minimum-icon-size-in-pixels', value:'64'}).", "typeRef": "Page.InstallabilityErrorArgument" }]);
  inspectorBackend2.registerType("Page.CompilationCacheParams", [{ "name": "url", "type": "string", "optional": false, "description": "The URL of the script to produce a compilation cache entry for.", "typeRef": null }, { "name": "eager", "type": "boolean", "optional": true, "description": "A hint to the backend whether eager compilation is recommended. (the actual compilation mode used is upon backend discretion).", "typeRef": null }]);
  inspectorBackend2.registerType("Page.FileFilter", [{ "name": "name", "type": "string", "optional": true, "description": "", "typeRef": null }, { "name": "accepts", "type": "array", "optional": true, "description": "", "typeRef": "string" }]);
  inspectorBackend2.registerType("Page.FileHandler", [{ "name": "action", "type": "string", "optional": false, "description": "", "typeRef": null }, { "name": "name", "type": "string", "optional": false, "description": "", "typeRef": null }, { "name": "icons", "type": "array", "optional": true, "description": "", "typeRef": "Page.ImageResource" }, { "name": "accepts", "type": "array", "optional": true, "description": "Mimic a map, name is the key, accepts is the value.", "typeRef": "Page.FileFilter" }, { "name": "launchType", "type": "string", "optional": false, "description": "Won't repeat the enums, using string for easy comparison. Same as the other enums below.", "typeRef": null }]);
  inspectorBackend2.registerType("Page.ImageResource", [{ "name": "url", "type": "string", "optional": false, "description": "The src field in the definition, but changing to url in favor of consistency.", "typeRef": null }, { "name": "sizes", "type": "string", "optional": true, "description": "", "typeRef": null }, { "name": "type", "type": "string", "optional": true, "description": "", "typeRef": null }]);
  inspectorBackend2.registerType("Page.LaunchHandler", [{ "name": "clientMode", "type": "string", "optional": false, "description": "", "typeRef": null }]);
  inspectorBackend2.registerType("Page.ProtocolHandler", [{ "name": "protocol", "type": "string", "optional": false, "description": "", "typeRef": null }, { "name": "url", "type": "string", "optional": false, "description": "", "typeRef": null }]);
  inspectorBackend2.registerType("Page.RelatedApplication", [{ "name": "id", "type": "string", "optional": true, "description": "", "typeRef": null }, { "name": "url", "type": "string", "optional": false, "description": "", "typeRef": null }]);
  inspectorBackend2.registerType("Page.ScopeExtension", [{ "name": "origin", "type": "string", "optional": false, "description": "Instead of using tuple, this field always returns the serialized string for easy understanding and comparison.", "typeRef": null }, { "name": "hasOriginWildcard", "type": "boolean", "optional": false, "description": "", "typeRef": null }]);
  inspectorBackend2.registerType("Page.Screenshot", [{ "name": "image", "type": "object", "optional": false, "description": "", "typeRef": "Page.ImageResource" }, { "name": "formFactor", "type": "string", "optional": false, "description": "", "typeRef": null }, { "name": "label", "type": "string", "optional": true, "description": "", "typeRef": null }]);
  inspectorBackend2.registerType("Page.ShareTarget", [{ "name": "action", "type": "string", "optional": false, "description": "", "typeRef": null }, { "name": "method", "type": "string", "optional": false, "description": "", "typeRef": null }, { "name": "enctype", "type": "string", "optional": false, "description": "", "typeRef": null }, { "name": "title", "type": "string", "optional": true, "description": "Embed the ShareTargetParams", "typeRef": null }, { "name": "text", "type": "string", "optional": true, "description": "", "typeRef": null }, { "name": "url", "type": "string", "optional": true, "description": "", "typeRef": null }, { "name": "files", "type": "array", "optional": true, "description": "", "typeRef": "Page.FileFilter" }]);
  inspectorBackend2.registerType("Page.Shortcut", [{ "name": "name", "type": "string", "optional": false, "description": "", "typeRef": null }, { "name": "url", "type": "string", "optional": false, "description": "", "typeRef": null }]);
  inspectorBackend2.registerType("Page.WebAppManifest", [{ "name": "backgroundColor", "type": "string", "optional": true, "description": "", "typeRef": null }, { "name": "description", "type": "string", "optional": true, "description": "The extra description provided by the manifest.", "typeRef": null }, { "name": "dir", "type": "string", "optional": true, "description": "", "typeRef": null }, { "name": "display", "type": "string", "optional": true, "description": "", "typeRef": null }, { "name": "displayOverrides", "type": "array", "optional": true, "description": "The overrided display mode controlled by the user.", "typeRef": "string" }, { "name": "fileHandlers", "type": "array", "optional": true, "description": "The handlers to open files.", "typeRef": "Page.FileHandler" }, { "name": "icons", "type": "array", "optional": true, "description": "", "typeRef": "Page.ImageResource" }, { "name": "id", "type": "string", "optional": true, "description": "", "typeRef": null }, { "name": "lang", "type": "string", "optional": true, "description": "", "typeRef": null }, { "name": "launchHandler", "type": "object", "optional": true, "description": "TODO(crbug.com/1231886): This field is non-standard and part of a Chrome experiment. See: https://github.com/WICG/web-app-launch/blob/main/launch_handler.md", "typeRef": "Page.LaunchHandler" }, { "name": "name", "type": "string", "optional": true, "description": "", "typeRef": null }, { "name": "orientation", "type": "string", "optional": true, "description": "", "typeRef": null }, { "name": "preferRelatedApplications", "type": "boolean", "optional": true, "description": "", "typeRef": null }, { "name": "protocolHandlers", "type": "array", "optional": true, "description": "The handlers to open protocols.", "typeRef": "Page.ProtocolHandler" }, { "name": "relatedApplications", "type": "array", "optional": true, "description": "", "typeRef": "Page.RelatedApplication" }, { "name": "scope", "type": "string", "optional": true, "description": "", "typeRef": null }, { "name": "scopeExtensions", "type": "array", "optional": true, "description": "Non-standard, see https://github.com/WICG/manifest-incubations/blob/gh-pages/scope_extensions-explainer.md", "typeRef": "Page.ScopeExtension" }, { "name": "screenshots", "type": "array", "optional": true, "description": "The screenshots used by chromium.", "typeRef": "Page.Screenshot" }, { "name": "shareTarget", "type": "object", "optional": true, "description": "", "typeRef": "Page.ShareTarget" }, { "name": "shortName", "type": "string", "optional": true, "description": "", "typeRef": null }, { "name": "shortcuts", "type": "array", "optional": true, "description": "", "typeRef": "Page.Shortcut" }, { "name": "startUrl", "type": "string", "optional": true, "description": "", "typeRef": null }, { "name": "themeColor", "type": "string", "optional": true, "description": "", "typeRef": null }]);
  inspectorBackend2.registerType("Page.BackForwardCacheBlockingDetails", [{ "name": "url", "type": "string", "optional": true, "description": "Url of the file where blockage happened. Optional because of tests.", "typeRef": null }, { "name": "function", "type": "string", "optional": true, "description": "Function name where blockage happened. Optional because of anonymous functions and tests.", "typeRef": null }, { "name": "lineNumber", "type": "number", "optional": false, "description": "Line number in the script (0-based).", "typeRef": null }, { "name": "columnNumber", "type": "number", "optional": false, "description": "Column number in the script (0-based).", "typeRef": null }]);
  inspectorBackend2.registerType("Page.BackForwardCacheNotRestoredExplanation", [{ "name": "type", "type": "string", "optional": false, "description": "Type of the reason", "typeRef": "Page.BackForwardCacheNotRestoredReasonType" }, { "name": "reason", "type": "string", "optional": false, "description": "Not restored reason", "typeRef": "Page.BackForwardCacheNotRestoredReason" }, { "name": "context", "type": "string", "optional": true, "description": "Context associated with the reason. The meaning of this context is dependent on the reason: - EmbedderExtensionSentMessageToCachedFrame: the extension ID.", "typeRef": null }, { "name": "details", "type": "array", "optional": true, "description": "", "typeRef": "Page.BackForwardCacheBlockingDetails" }]);
  inspectorBackend2.registerType("Page.BackForwardCacheNotRestoredExplanationTree", [{ "name": "url", "type": "string", "optional": false, "description": "URL of each frame", "typeRef": null }, { "name": "explanations", "type": "array", "optional": false, "description": "Not restored reasons of each frame", "typeRef": "Page.BackForwardCacheNotRestoredExplanation" }, { "name": "children", "type": "array", "optional": false, "description": "Array of children frame", "typeRef": "Page.BackForwardCacheNotRestoredExplanationTree" }]);
  inspectorBackend2.registerEvent("Performance.metrics", ["metrics", "title"]);
  inspectorBackend2.registerCommand("Performance.disable", [], [], "Disable collecting and reporting metrics.");
  inspectorBackend2.registerEnum("Performance.EnableRequestTimeDomain", { TimeTicks: "timeTicks", ThreadTicks: "threadTicks" });
  inspectorBackend2.registerCommand("Performance.enable", [{ "name": "timeDomain", "type": "string", "optional": true, "description": "Time domain to use for collecting and reporting duration metrics.", "typeRef": "Performance.EnableRequestTimeDomain" }], [], "Enable collecting and reporting metrics.");
  inspectorBackend2.registerEnum("Performance.SetTimeDomainRequestTimeDomain", { TimeTicks: "timeTicks", ThreadTicks: "threadTicks" });
  inspectorBackend2.registerCommand("Performance.setTimeDomain", [{ "name": "timeDomain", "type": "string", "optional": false, "description": "Time domain", "typeRef": "Performance.SetTimeDomainRequestTimeDomain" }], [], "Sets time domain to use for collecting and reporting duration metrics. Note that this must be called before enabling metrics collection. Calling this method while metrics collection is enabled returns an error.");
  inspectorBackend2.registerCommand("Performance.getMetrics", [], ["metrics"], "Retrieve current values of run-time metrics.");
  inspectorBackend2.registerType("Performance.Metric", [{ "name": "name", "type": "string", "optional": false, "description": "Metric name.", "typeRef": null }, { "name": "value", "type": "number", "optional": false, "description": "Metric value.", "typeRef": null }]);
  inspectorBackend2.registerEvent("PerformanceTimeline.timelineEventAdded", ["event"]);
  inspectorBackend2.registerCommand("PerformanceTimeline.enable", [{ "name": "eventTypes", "type": "array", "optional": false, "description": "The types of event to report, as specified in https://w3c.github.io/performance-timeline/#dom-performanceentry-entrytype The specified filter overrides any previous filters, passing empty filter disables recording. Note that not all types exposed to the web platform are currently supported.", "typeRef": "string" }], [], "Previously buffered events would be reported before method returns. See also: timelineEventAdded");
  inspectorBackend2.registerType("PerformanceTimeline.LargestContentfulPaint", [{ "name": "renderTime", "type": "number", "optional": false, "description": "", "typeRef": "Network.TimeSinceEpoch" }, { "name": "loadTime", "type": "number", "optional": false, "description": "", "typeRef": "Network.TimeSinceEpoch" }, { "name": "size", "type": "number", "optional": false, "description": "The number of pixels being painted.", "typeRef": null }, { "name": "elementId", "type": "string", "optional": true, "description": "The id attribute of the element, if available.", "typeRef": null }, { "name": "url", "type": "string", "optional": true, "description": "The URL of the image (may be trimmed).", "typeRef": null }, { "name": "nodeId", "type": "number", "optional": true, "description": "", "typeRef": "DOM.BackendNodeId" }]);
  inspectorBackend2.registerType("PerformanceTimeline.LayoutShiftAttribution", [{ "name": "previousRect", "type": "object", "optional": false, "description": "", "typeRef": "DOM.Rect" }, { "name": "currentRect", "type": "object", "optional": false, "description": "", "typeRef": "DOM.Rect" }, { "name": "nodeId", "type": "number", "optional": true, "description": "", "typeRef": "DOM.BackendNodeId" }]);
  inspectorBackend2.registerType("PerformanceTimeline.LayoutShift", [{ "name": "value", "type": "number", "optional": false, "description": "Score increment produced by this event.", "typeRef": null }, { "name": "hadRecentInput", "type": "boolean", "optional": false, "description": "", "typeRef": null }, { "name": "lastInputTime", "type": "number", "optional": false, "description": "", "typeRef": "Network.TimeSinceEpoch" }, { "name": "sources", "type": "array", "optional": false, "description": "", "typeRef": "PerformanceTimeline.LayoutShiftAttribution" }]);
  inspectorBackend2.registerType("PerformanceTimeline.TimelineEvent", [{ "name": "frameId", "type": "string", "optional": false, "description": "Identifies the frame that this event is related to. Empty for non-frame targets.", "typeRef": "Page.FrameId" }, { "name": "type", "type": "string", "optional": false, "description": 'The event type, as specified in https://w3c.github.io/performance-timeline/#dom-performanceentry-entrytype This determines which of the optional \\"details\\" fields is present.', "typeRef": null }, { "name": "name", "type": "string", "optional": false, "description": "Name may be empty depending on the type.", "typeRef": null }, { "name": "time", "type": "number", "optional": false, "description": "Time in seconds since Epoch, monotonically increasing within document lifetime.", "typeRef": "Network.TimeSinceEpoch" }, { "name": "duration", "type": "number", "optional": true, "description": "Event duration, if applicable.", "typeRef": null }, { "name": "lcpDetails", "type": "object", "optional": true, "description": "", "typeRef": "PerformanceTimeline.LargestContentfulPaint" }, { "name": "layoutShiftDetails", "type": "object", "optional": true, "description": "", "typeRef": "PerformanceTimeline.LayoutShift" }]);
  inspectorBackend2.registerEnum("Preload.RuleSetErrorType", { SourceIsNotJsonObject: "SourceIsNotJsonObject", InvalidRulesSkipped: "InvalidRulesSkipped", InvalidRulesetLevelTag: "InvalidRulesetLevelTag" });
  inspectorBackend2.registerEnum("Preload.SpeculationAction", { Prefetch: "Prefetch", Prerender: "Prerender", PrerenderUntilScript: "PrerenderUntilScript" });
  inspectorBackend2.registerEnum("Preload.SpeculationTargetHint", { Blank: "Blank", Self: "Self" });
  inspectorBackend2.registerEnum("Preload.PrerenderFinalStatus", { Activated: "Activated", Destroyed: "Destroyed", LowEndDevice: "LowEndDevice", InvalidSchemeRedirect: "InvalidSchemeRedirect", InvalidSchemeNavigation: "InvalidSchemeNavigation", NavigationRequestBlockedByCsp: "NavigationRequestBlockedByCsp", MojoBinderPolicy: "MojoBinderPolicy", RendererProcessCrashed: "RendererProcessCrashed", RendererProcessKilled: "RendererProcessKilled", Download: "Download", TriggerDestroyed: "TriggerDestroyed", NavigationNotCommitted: "NavigationNotCommitted", NavigationBadHttpStatus: "NavigationBadHttpStatus", ClientCertRequested: "ClientCertRequested", NavigationRequestNetworkError: "NavigationRequestNetworkError", CancelAllHostsForTesting: "CancelAllHostsForTesting", DidFailLoad: "DidFailLoad", Stop: "Stop", SslCertificateError: "SslCertificateError", LoginAuthRequested: "LoginAuthRequested", UaChangeRequiresReload: "UaChangeRequiresReload", BlockedByClient: "BlockedByClient", AudioOutputDeviceRequested: "AudioOutputDeviceRequested", MixedContent: "MixedContent", TriggerBackgrounded: "TriggerBackgrounded", MemoryLimitExceeded: "MemoryLimitExceeded", DataSaverEnabled: "DataSaverEnabled", TriggerUrlHasEffectiveUrl: "TriggerUrlHasEffectiveUrl", ActivatedBeforeStarted: "ActivatedBeforeStarted", InactivePageRestriction: "InactivePageRestriction", StartFailed: "StartFailed", TimeoutBackgrounded: "TimeoutBackgrounded", CrossSiteRedirectInInitialNavigation: "CrossSiteRedirectInInitialNavigation", CrossSiteNavigationInInitialNavigation: "CrossSiteNavigationInInitialNavigation", SameSiteCrossOriginRedirectNotOptInInInitialNavigation: "SameSiteCrossOriginRedirectNotOptInInInitialNavigation", SameSiteCrossOriginNavigationNotOptInInInitialNavigation: "SameSiteCrossOriginNavigationNotOptInInInitialNavigation", ActivationNavigationParameterMismatch: "ActivationNavigationParameterMismatch", ActivatedInBackground: "ActivatedInBackground", EmbedderHostDisallowed: "EmbedderHostDisallowed", ActivationNavigationDestroyedBeforeSuccess: "ActivationNavigationDestroyedBeforeSuccess", TabClosedByUserGesture: "TabClosedByUserGesture", TabClosedWithoutUserGesture: "TabClosedWithoutUserGesture", PrimaryMainFrameRendererProcessCrashed: "PrimaryMainFrameRendererProcessCrashed", PrimaryMainFrameRendererProcessKilled: "PrimaryMainFrameRendererProcessKilled", ActivationFramePolicyNotCompatible: "ActivationFramePolicyNotCompatible", PreloadingDisabled: "PreloadingDisabled", BatterySaverEnabled: "BatterySaverEnabled", ActivatedDuringMainFrameNavigation: "ActivatedDuringMainFrameNavigation", PreloadingUnsupportedByWebContents: "PreloadingUnsupportedByWebContents", CrossSiteRedirectInMainFrameNavigation: "CrossSiteRedirectInMainFrameNavigation", CrossSiteNavigationInMainFrameNavigation: "CrossSiteNavigationInMainFrameNavigation", SameSiteCrossOriginRedirectNotOptInInMainFrameNavigation: "SameSiteCrossOriginRedirectNotOptInInMainFrameNavigation", SameSiteCrossOriginNavigationNotOptInInMainFrameNavigation: "SameSiteCrossOriginNavigationNotOptInInMainFrameNavigation", MemoryPressureOnTrigger: "MemoryPressureOnTrigger", MemoryPressureAfterTriggered: "MemoryPressureAfterTriggered", PrerenderingDisabledByDevTools: "PrerenderingDisabledByDevTools", SpeculationRuleRemoved: "SpeculationRuleRemoved", ActivatedWithAuxiliaryBrowsingContexts: "ActivatedWithAuxiliaryBrowsingContexts", MaxNumOfRunningEagerPrerendersExceeded: "MaxNumOfRunningEagerPrerendersExceeded", MaxNumOfRunningNonEagerPrerendersExceeded: "MaxNumOfRunningNonEagerPrerendersExceeded", MaxNumOfRunningEmbedderPrerendersExceeded: "MaxNumOfRunningEmbedderPrerendersExceeded", PrerenderingUrlHasEffectiveUrl: "PrerenderingUrlHasEffectiveUrl", RedirectedPrerenderingUrlHasEffectiveUrl: "RedirectedPrerenderingUrlHasEffectiveUrl", ActivationUrlHasEffectiveUrl: "ActivationUrlHasEffectiveUrl", JavaScriptInterfaceAdded: "JavaScriptInterfaceAdded", JavaScriptInterfaceRemoved: "JavaScriptInterfaceRemoved", AllPrerenderingCanceled: "AllPrerenderingCanceled", WindowClosed: "WindowClosed", SlowNetwork: "SlowNetwork", OtherPrerenderedPageActivated: "OtherPrerenderedPageActivated", V8OptimizerDisabled: "V8OptimizerDisabled", PrerenderFailedDuringPrefetch: "PrerenderFailedDuringPrefetch", BrowsingDataRemoved: "BrowsingDataRemoved", PrerenderHostReused: "PrerenderHostReused" });
  inspectorBackend2.registerEnum("Preload.PreloadingStatus", { Pending: "Pending", Running: "Running", Ready: "Ready", Success: "Success", Failure: "Failure", NotSupported: "NotSupported" });
  inspectorBackend2.registerEnum("Preload.PrefetchStatus", { PrefetchAllowed: "PrefetchAllowed", PrefetchFailedIneligibleRedirect: "PrefetchFailedIneligibleRedirect", PrefetchFailedInvalidRedirect: "PrefetchFailedInvalidRedirect", PrefetchFailedMIMENotSupported: "PrefetchFailedMIMENotSupported", PrefetchFailedNetError: "PrefetchFailedNetError", PrefetchFailedNon2XX: "PrefetchFailedNon2XX", PrefetchEvictedAfterBrowsingDataRemoved: "PrefetchEvictedAfterBrowsingDataRemoved", PrefetchEvictedAfterCandidateRemoved: "PrefetchEvictedAfterCandidateRemoved", PrefetchEvictedForNewerPrefetch: "PrefetchEvictedForNewerPrefetch", PrefetchHeldback: "PrefetchHeldback", PrefetchIneligibleRetryAfter: "PrefetchIneligibleRetryAfter", PrefetchIsPrivacyDecoy: "PrefetchIsPrivacyDecoy", PrefetchIsStale: "PrefetchIsStale", PrefetchNotEligibleBrowserContextOffTheRecord: "PrefetchNotEligibleBrowserContextOffTheRecord", PrefetchNotEligibleDataSaverEnabled: "PrefetchNotEligibleDataSaverEnabled", PrefetchNotEligibleExistingProxy: "PrefetchNotEligibleExistingProxy", PrefetchNotEligibleHostIsNonUnique: "PrefetchNotEligibleHostIsNonUnique", PrefetchNotEligibleNonDefaultStoragePartition: "PrefetchNotEligibleNonDefaultStoragePartition", PrefetchNotEligibleSameSiteCrossOriginPrefetchRequiredProxy: "PrefetchNotEligibleSameSiteCrossOriginPrefetchRequiredProxy", PrefetchNotEligibleSchemeIsNotHttps: "PrefetchNotEligibleSchemeIsNotHttps", PrefetchNotEligibleUserHasCookies: "PrefetchNotEligibleUserHasCookies", PrefetchNotEligibleUserHasServiceWorker: "PrefetchNotEligibleUserHasServiceWorker", PrefetchNotEligibleUserHasServiceWorkerNoFetchHandler: "PrefetchNotEligibleUserHasServiceWorkerNoFetchHandler", PrefetchNotEligibleRedirectFromServiceWorker: "PrefetchNotEligibleRedirectFromServiceWorker", PrefetchNotEligibleRedirectToServiceWorker: "PrefetchNotEligibleRedirectToServiceWorker", PrefetchNotEligibleBatterySaverEnabled: "PrefetchNotEligibleBatterySaverEnabled", PrefetchNotEligiblePreloadingDisabled: "PrefetchNotEligiblePreloadingDisabled", PrefetchNotFinishedInTime: "PrefetchNotFinishedInTime", PrefetchNotStarted: "PrefetchNotStarted", PrefetchNotUsedCookiesChanged: "PrefetchNotUsedCookiesChanged", PrefetchProxyNotAvailable: "PrefetchProxyNotAvailable", PrefetchResponseUsed: "PrefetchResponseUsed", PrefetchSuccessfulButNotUsed: "PrefetchSuccessfulButNotUsed", PrefetchNotUsedProbeFailed: "PrefetchNotUsedProbeFailed" });
  inspectorBackend2.registerEvent("Preload.ruleSetUpdated", ["ruleSet"]);
  inspectorBackend2.registerEvent("Preload.ruleSetRemoved", ["id"]);
  inspectorBackend2.registerEvent("Preload.preloadEnabledStateUpdated", ["disabledByPreference", "disabledByDataSaver", "disabledByBatterySaver", "disabledByHoldbackPrefetchSpeculationRules", "disabledByHoldbackPrerenderSpeculationRules"]);
  inspectorBackend2.registerEvent("Preload.prefetchStatusUpdated", ["key", "pipelineId", "initiatingFrameId", "prefetchUrl", "status", "prefetchStatus", "requestId"]);
  inspectorBackend2.registerEvent("Preload.prerenderStatusUpdated", ["key", "pipelineId", "status", "prerenderStatus", "disallowedMojoInterface", "mismatchedHeaders"]);
  inspectorBackend2.registerEvent("Preload.preloadingAttemptSourcesUpdated", ["loaderId", "preloadingAttemptSources"]);
  inspectorBackend2.registerCommand("Preload.enable", [], [], "");
  inspectorBackend2.registerCommand("Preload.disable", [], [], "");
  inspectorBackend2.registerType("Preload.RuleSet", [{ "name": "id", "type": "string", "optional": false, "description": "", "typeRef": "Preload.RuleSetId" }, { "name": "loaderId", "type": "string", "optional": false, "description": "Identifies a document which the rule set is associated with.", "typeRef": "Network.LoaderId" }, { "name": "sourceText", "type": "string", "optional": false, "description": "Source text of JSON representing the rule set. If it comes from `<script>` tag, it is the textContent of the node. Note that it is a JSON for valid case.  See also: - https://wicg.github.io/nav-speculation/speculation-rules.html - https://github.com/WICG/nav-speculation/blob/main/triggers.md", "typeRef": null }, { "name": "backendNodeId", "type": "number", "optional": true, "description": "A speculation rule set is either added through an inline `<script>` tag or through an external resource via the 'Speculation-Rules' HTTP header. For the first case, we include the BackendNodeId of the relevant `<script>` tag. For the second case, we include the external URL where the rule set was loaded from, and also RequestId if Network domain is enabled.  See also: - https://wicg.github.io/nav-speculation/speculation-rules.html#speculation-rules-script - https://wicg.github.io/nav-speculation/speculation-rules.html#speculation-rules-header", "typeRef": "DOM.BackendNodeId" }, { "name": "url", "type": "string", "optional": true, "description": "", "typeRef": null }, { "name": "requestId", "type": "string", "optional": true, "description": "", "typeRef": "Network.RequestId" }, { "name": "errorType", "type": "string", "optional": true, "description": "Error information `errorMessage` is null iff `errorType` is null.", "typeRef": "Preload.RuleSetErrorType" }, { "name": "errorMessage", "type": "string", "optional": true, "description": "TODO(https://crbug.com/1425354): Replace this property with structured error.", "typeRef": null }, { "name": "tag", "type": "string", "optional": true, "description": "For more details, see: https://github.com/WICG/nav-speculation/blob/main/speculation-rules-tags.md", "typeRef": null }]);
  inspectorBackend2.registerType("Preload.PreloadingAttemptKey", [{ "name": "loaderId", "type": "string", "optional": false, "description": "", "typeRef": "Network.LoaderId" }, { "name": "action", "type": "string", "optional": false, "description": "", "typeRef": "Preload.SpeculationAction" }, { "name": "url", "type": "string", "optional": false, "description": "", "typeRef": null }, { "name": "targetHint", "type": "string", "optional": true, "description": "", "typeRef": "Preload.SpeculationTargetHint" }]);
  inspectorBackend2.registerType("Preload.PreloadingAttemptSource", [{ "name": "key", "type": "object", "optional": false, "description": "", "typeRef": "Preload.PreloadingAttemptKey" }, { "name": "ruleSetIds", "type": "array", "optional": false, "description": "", "typeRef": "Preload.RuleSetId" }, { "name": "nodeIds", "type": "array", "optional": false, "description": "", "typeRef": "DOM.BackendNodeId" }]);
  inspectorBackend2.registerType("Preload.PrerenderMismatchedHeaders", [{ "name": "headerName", "type": "string", "optional": false, "description": "", "typeRef": null }, { "name": "initialValue", "type": "string", "optional": true, "description": "", "typeRef": null }, { "name": "activationValue", "type": "string", "optional": true, "description": "", "typeRef": null }]);
  inspectorBackend2.registerEnum("Security.MixedContentType", { Blockable: "blockable", OptionallyBlockable: "optionally-blockable", None: "none" });
  inspectorBackend2.registerEnum("Security.SecurityState", { Unknown: "unknown", Neutral: "neutral", Insecure: "insecure", Secure: "secure", Info: "info", InsecureBroken: "insecure-broken" });
  inspectorBackend2.registerEnum("Security.SafetyTipStatus", { BadReputation: "badReputation", Lookalike: "lookalike" });
  inspectorBackend2.registerEnum("Security.CertificateErrorAction", { Continue: "continue", Cancel: "cancel" });
  inspectorBackend2.registerEvent("Security.certificateError", ["eventId", "errorType", "requestURL"]);
  inspectorBackend2.registerEvent("Security.visibleSecurityStateChanged", ["visibleSecurityState"]);
  inspectorBackend2.registerEvent("Security.securityStateChanged", ["securityState", "schemeIsCryptographic", "explanations", "insecureContentStatus", "summary"]);
  inspectorBackend2.registerCommand("Security.disable", [], [], "Disables tracking security state changes.");
  inspectorBackend2.registerCommand("Security.enable", [], [], "Enables tracking security state changes.");
  inspectorBackend2.registerCommand("Security.setIgnoreCertificateErrors", [{ "name": "ignore", "type": "boolean", "optional": false, "description": "If true, all certificate errors will be ignored.", "typeRef": null }], [], "Enable/disable whether all certificate errors should be ignored.");
  inspectorBackend2.registerCommand("Security.handleCertificateError", [{ "name": "eventId", "type": "number", "optional": false, "description": "The ID of the event.", "typeRef": null }, { "name": "action", "type": "string", "optional": false, "description": "The action to take on the certificate error.", "typeRef": "Security.CertificateErrorAction" }], [], "Handles a certificate error that fired a certificateError event.");
  inspectorBackend2.registerCommand("Security.setOverrideCertificateErrors", [{ "name": "override", "type": "boolean", "optional": false, "description": "If true, certificate errors will be overridden.", "typeRef": null }], [], "Enable/disable overriding certificate errors. If enabled, all certificate error events need to be handled by the DevTools client and should be answered with `handleCertificateError` commands.");
  inspectorBackend2.registerType("Security.CertificateSecurityState", [{ "name": "protocol", "type": "string", "optional": false, "description": 'Protocol name (e.g. \\"TLS 1.2\\" or \\"QUIC\\").', "typeRef": null }, { "name": "keyExchange", "type": "string", "optional": false, "description": "Key Exchange used by the connection, or the empty string if not applicable.", "typeRef": null }, { "name": "keyExchangeGroup", "type": "string", "optional": true, "description": "(EC)DH group used by the connection, if applicable.", "typeRef": null }, { "name": "cipher", "type": "string", "optional": false, "description": "Cipher name.", "typeRef": null }, { "name": "mac", "type": "string", "optional": true, "description": "TLS MAC. Note that AEAD ciphers do not have separate MACs.", "typeRef": null }, { "name": "certificate", "type": "array", "optional": false, "description": "Page certificate.", "typeRef": "string" }, { "name": "subjectName", "type": "string", "optional": false, "description": "Certificate subject name.", "typeRef": null }, { "name": "issuer", "type": "string", "optional": false, "description": "Name of the issuing CA.", "typeRef": null }, { "name": "validFrom", "type": "number", "optional": false, "description": "Certificate valid from date.", "typeRef": "Network.TimeSinceEpoch" }, { "name": "validTo", "type": "number", "optional": false, "description": "Certificate valid to (expiration) date", "typeRef": "Network.TimeSinceEpoch" }, { "name": "certificateNetworkError", "type": "string", "optional": true, "description": "The highest priority network error code, if the certificate has an error.", "typeRef": null }, { "name": "certificateHasWeakSignature", "type": "boolean", "optional": false, "description": "True if the certificate uses a weak signature algorithm.", "typeRef": null }, { "name": "certificateHasSha1Signature", "type": "boolean", "optional": false, "description": "True if the certificate has a SHA1 signature in the chain.", "typeRef": null }, { "name": "modernSSL", "type": "boolean", "optional": false, "description": "True if modern SSL", "typeRef": null }, { "name": "obsoleteSslProtocol", "type": "boolean", "optional": false, "description": "True if the connection is using an obsolete SSL protocol.", "typeRef": null }, { "name": "obsoleteSslKeyExchange", "type": "boolean", "optional": false, "description": "True if the connection is using an obsolete SSL key exchange.", "typeRef": null }, { "name": "obsoleteSslCipher", "type": "boolean", "optional": false, "description": "True if the connection is using an obsolete SSL cipher.", "typeRef": null }, { "name": "obsoleteSslSignature", "type": "boolean", "optional": false, "description": "True if the connection is using an obsolete SSL signature.", "typeRef": null }]);
  inspectorBackend2.registerType("Security.SafetyTipInfo", [{ "name": "safetyTipStatus", "type": "string", "optional": false, "description": "Describes whether the page triggers any safety tips or reputation warnings. Default is unknown.", "typeRef": "Security.SafetyTipStatus" }, { "name": "safeUrl", "type": "string", "optional": true, "description": 'The URL the safety tip suggested (\\"Did you mean?\\"). Only filled in for lookalike matches.', "typeRef": null }]);
  inspectorBackend2.registerType("Security.VisibleSecurityState", [{ "name": "securityState", "type": "string", "optional": false, "description": "The security level of the page.", "typeRef": "Security.SecurityState" }, { "name": "certificateSecurityState", "type": "object", "optional": true, "description": "Security state details about the page certificate.", "typeRef": "Security.CertificateSecurityState" }, { "name": "safetyTipInfo", "type": "object", "optional": true, "description": "The type of Safety Tip triggered on the page. Note that this field will be set even if the Safety Tip UI was not actually shown.", "typeRef": "Security.SafetyTipInfo" }, { "name": "securityStateIssueIds", "type": "array", "optional": false, "description": "Array of security state issues ids.", "typeRef": "string" }]);
  inspectorBackend2.registerType("Security.SecurityStateExplanation", [{ "name": "securityState", "type": "string", "optional": false, "description": "Security state representing the severity of the factor being explained.", "typeRef": "Security.SecurityState" }, { "name": "title", "type": "string", "optional": false, "description": "Title describing the type of factor.", "typeRef": null }, { "name": "summary", "type": "string", "optional": false, "description": "Short phrase describing the type of factor.", "typeRef": null }, { "name": "description", "type": "string", "optional": false, "description": "Full text explanation of the factor.", "typeRef": null }, { "name": "mixedContentType", "type": "string", "optional": false, "description": "The type of mixed content described by the explanation.", "typeRef": "Security.MixedContentType" }, { "name": "certificate", "type": "array", "optional": false, "description": "Page certificate.", "typeRef": "string" }, { "name": "recommendations", "type": "array", "optional": true, "description": "Recommendations to fix any issues.", "typeRef": "string" }]);
  inspectorBackend2.registerType("Security.InsecureContentStatus", [{ "name": "ranMixedContent", "type": "boolean", "optional": false, "description": "Always false.", "typeRef": null }, { "name": "displayedMixedContent", "type": "boolean", "optional": false, "description": "Always false.", "typeRef": null }, { "name": "containedMixedForm", "type": "boolean", "optional": false, "description": "Always false.", "typeRef": null }, { "name": "ranContentWithCertErrors", "type": "boolean", "optional": false, "description": "Always false.", "typeRef": null }, { "name": "displayedContentWithCertErrors", "type": "boolean", "optional": false, "description": "Always false.", "typeRef": null }, { "name": "ranInsecureContentStyle", "type": "string", "optional": false, "description": "Always set to unknown.", "typeRef": "Security.SecurityState" }, { "name": "displayedInsecureContentStyle", "type": "string", "optional": false, "description": "Always set to unknown.", "typeRef": "Security.SecurityState" }]);
  inspectorBackend2.registerEnum("ServiceWorker.ServiceWorkerVersionRunningStatus", { Stopped: "stopped", Starting: "starting", Running: "running", Stopping: "stopping" });
  inspectorBackend2.registerEnum("ServiceWorker.ServiceWorkerVersionStatus", { New: "new", Installing: "installing", Installed: "installed", Activating: "activating", Activated: "activated", Redundant: "redundant" });
  inspectorBackend2.registerEvent("ServiceWorker.workerErrorReported", ["errorMessage"]);
  inspectorBackend2.registerEvent("ServiceWorker.workerRegistrationUpdated", ["registrations"]);
  inspectorBackend2.registerEvent("ServiceWorker.workerVersionUpdated", ["versions"]);
  inspectorBackend2.registerCommand("ServiceWorker.deliverPushMessage", [{ "name": "origin", "type": "string", "optional": false, "description": "", "typeRef": null }, { "name": "registrationId", "type": "string", "optional": false, "description": "", "typeRef": "ServiceWorker.RegistrationID" }, { "name": "data", "type": "string", "optional": false, "description": "", "typeRef": null }], [], "");
  inspectorBackend2.registerCommand("ServiceWorker.disable", [], [], "");
  inspectorBackend2.registerCommand("ServiceWorker.dispatchSyncEvent", [{ "name": "origin", "type": "string", "optional": false, "description": "", "typeRef": null }, { "name": "registrationId", "type": "string", "optional": false, "description": "", "typeRef": "ServiceWorker.RegistrationID" }, { "name": "tag", "type": "string", "optional": false, "description": "", "typeRef": null }, { "name": "lastChance", "type": "boolean", "optional": false, "description": "", "typeRef": null }], [], "");
  inspectorBackend2.registerCommand("ServiceWorker.dispatchPeriodicSyncEvent", [{ "name": "origin", "type": "string", "optional": false, "description": "", "typeRef": null }, { "name": "registrationId", "type": "string", "optional": false, "description": "", "typeRef": "ServiceWorker.RegistrationID" }, { "name": "tag", "type": "string", "optional": false, "description": "", "typeRef": null }], [], "");
  inspectorBackend2.registerCommand("ServiceWorker.enable", [], [], "");
  inspectorBackend2.registerCommand("ServiceWorker.setForceUpdateOnPageLoad", [{ "name": "forceUpdateOnPageLoad", "type": "boolean", "optional": false, "description": "", "typeRef": null }], [], "");
  inspectorBackend2.registerCommand("ServiceWorker.skipWaiting", [{ "name": "scopeURL", "type": "string", "optional": false, "description": "", "typeRef": null }], [], "");
  inspectorBackend2.registerCommand("ServiceWorker.startWorker", [{ "name": "scopeURL", "type": "string", "optional": false, "description": "", "typeRef": null }], [], "");
  inspectorBackend2.registerCommand("ServiceWorker.stopAllWorkers", [], [], "");
  inspectorBackend2.registerCommand("ServiceWorker.stopWorker", [{ "name": "versionId", "type": "string", "optional": false, "description": "", "typeRef": null }], [], "");
  inspectorBackend2.registerCommand("ServiceWorker.unregister", [{ "name": "scopeURL", "type": "string", "optional": false, "description": "", "typeRef": null }], [], "");
  inspectorBackend2.registerCommand("ServiceWorker.updateRegistration", [{ "name": "scopeURL", "type": "string", "optional": false, "description": "", "typeRef": null }], [], "");
  inspectorBackend2.registerType("ServiceWorker.ServiceWorkerRegistration", [{ "name": "registrationId", "type": "string", "optional": false, "description": "", "typeRef": "ServiceWorker.RegistrationID" }, { "name": "scopeURL", "type": "string", "optional": false, "description": "", "typeRef": null }, { "name": "isDeleted", "type": "boolean", "optional": false, "description": "", "typeRef": null }]);
  inspectorBackend2.registerType("ServiceWorker.ServiceWorkerVersion", [{ "name": "versionId", "type": "string", "optional": false, "description": "", "typeRef": null }, { "name": "registrationId", "type": "string", "optional": false, "description": "", "typeRef": "ServiceWorker.RegistrationID" }, { "name": "scriptURL", "type": "string", "optional": false, "description": "", "typeRef": null }, { "name": "runningStatus", "type": "string", "optional": false, "description": "", "typeRef": "ServiceWorker.ServiceWorkerVersionRunningStatus" }, { "name": "status", "type": "string", "optional": false, "description": "", "typeRef": "ServiceWorker.ServiceWorkerVersionStatus" }, { "name": "scriptLastModified", "type": "number", "optional": true, "description": "The Last-Modified header value of the main script.", "typeRef": null }, { "name": "scriptResponseTime", "type": "number", "optional": true, "description": "The time at which the response headers of the main script were received from the server. For cached script it is the last time the cache entry was validated.", "typeRef": null }, { "name": "controlledClients", "type": "array", "optional": true, "description": "", "typeRef": "Target.TargetID" }, { "name": "targetId", "type": "string", "optional": true, "description": "", "typeRef": "Target.TargetID" }, { "name": "routerRules", "type": "string", "optional": true, "description": "", "typeRef": null }]);
  inspectorBackend2.registerType("ServiceWorker.ServiceWorkerErrorMessage", [{ "name": "errorMessage", "type": "string", "optional": false, "description": "", "typeRef": null }, { "name": "registrationId", "type": "string", "optional": false, "description": "", "typeRef": "ServiceWorker.RegistrationID" }, { "name": "versionId", "type": "string", "optional": false, "description": "", "typeRef": null }, { "name": "sourceURL", "type": "string", "optional": false, "description": "", "typeRef": null }, { "name": "lineNumber", "type": "number", "optional": false, "description": "", "typeRef": null }, { "name": "columnNumber", "type": "number", "optional": false, "description": "", "typeRef": null }]);
  inspectorBackend2.registerEnum("SmartCardEmulation.ResultCode", { Success: "success", RemovedCard: "removed-card", ResetCard: "reset-card", UnpoweredCard: "unpowered-card", UnresponsiveCard: "unresponsive-card", UnsupportedCard: "unsupported-card", ReaderUnavailable: "reader-unavailable", SharingViolation: "sharing-violation", NotTransacted: "not-transacted", NoSmartcard: "no-smartcard", ProtoMismatch: "proto-mismatch", SystemCancelled: "system-cancelled", NotReady: "not-ready", Cancelled: "cancelled", InsufficientBuffer: "insufficient-buffer", InvalidHandle: "invalid-handle", InvalidParameter: "invalid-parameter", InvalidValue: "invalid-value", NoMemory: "no-memory", Timeout: "timeout", UnknownReader: "unknown-reader", UnsupportedFeature: "unsupported-feature", NoReadersAvailable: "no-readers-available", ServiceStopped: "service-stopped", NoService: "no-service", CommError: "comm-error", InternalError: "internal-error", ServerTooBusy: "server-too-busy", Unexpected: "unexpected", Shutdown: "shutdown", UnknownCard: "unknown-card", Unknown: "unknown" });
  inspectorBackend2.registerEnum("SmartCardEmulation.ShareMode", { Shared: "shared", Exclusive: "exclusive", Direct: "direct" });
  inspectorBackend2.registerEnum("SmartCardEmulation.Disposition", { LeaveCard: "leave-card", ResetCard: "reset-card", UnpowerCard: "unpower-card", EjectCard: "eject-card" });
  inspectorBackend2.registerEnum("SmartCardEmulation.ConnectionState", { Absent: "absent", Present: "present", Swallowed: "swallowed", Powered: "powered", Negotiable: "negotiable", Specific: "specific" });
  inspectorBackend2.registerEnum("SmartCardEmulation.Protocol", { T0: "t0", T1: "t1", Raw: "raw" });
  inspectorBackend2.registerEvent("SmartCardEmulation.establishContextRequested", ["requestId"]);
  inspectorBackend2.registerEvent("SmartCardEmulation.releaseContextRequested", ["requestId", "contextId"]);
  inspectorBackend2.registerEvent("SmartCardEmulation.listReadersRequested", ["requestId", "contextId"]);
  inspectorBackend2.registerEvent("SmartCardEmulation.getStatusChangeRequested", ["requestId", "contextId", "readerStates", "timeout"]);
  inspectorBackend2.registerEvent("SmartCardEmulation.cancelRequested", ["requestId", "contextId"]);
  inspectorBackend2.registerEvent("SmartCardEmulation.connectRequested", ["requestId", "contextId", "reader", "shareMode", "preferredProtocols"]);
  inspectorBackend2.registerEvent("SmartCardEmulation.disconnectRequested", ["requestId", "handle", "disposition"]);
  inspectorBackend2.registerEvent("SmartCardEmulation.transmitRequested", ["requestId", "handle", "data", "protocol"]);
  inspectorBackend2.registerEvent("SmartCardEmulation.controlRequested", ["requestId", "handle", "controlCode", "data"]);
  inspectorBackend2.registerEvent("SmartCardEmulation.getAttribRequested", ["requestId", "handle", "attribId"]);
  inspectorBackend2.registerEvent("SmartCardEmulation.setAttribRequested", ["requestId", "handle", "attribId", "data"]);
  inspectorBackend2.registerEvent("SmartCardEmulation.statusRequested", ["requestId", "handle"]);
  inspectorBackend2.registerEvent("SmartCardEmulation.beginTransactionRequested", ["requestId", "handle"]);
  inspectorBackend2.registerEvent("SmartCardEmulation.endTransactionRequested", ["requestId", "handle", "disposition"]);
  inspectorBackend2.registerCommand("SmartCardEmulation.enable", [], [], "Enables the |SmartCardEmulation| domain.");
  inspectorBackend2.registerCommand("SmartCardEmulation.disable", [], [], "Disables the |SmartCardEmulation| domain.");
  inspectorBackend2.registerCommand("SmartCardEmulation.reportEstablishContextResult", [{ "name": "requestId", "type": "string", "optional": false, "description": "", "typeRef": null }, { "name": "contextId", "type": "number", "optional": false, "description": "", "typeRef": null }], [], "Reports the successful result of a |SCardEstablishContext| call.  This maps to: PC/SC Lite: https://pcsclite.apdu.fr/api/group__API.html#gaa1b8970169fd4883a6dc4a8f43f19b67 Microsoft: https://learn.microsoft.com/en-us/windows/win32/api/winscard/nf-winscard-scardestablishcontext");
  inspectorBackend2.registerCommand("SmartCardEmulation.reportReleaseContextResult", [{ "name": "requestId", "type": "string", "optional": false, "description": "", "typeRef": null }], [], "Reports the successful result of a |SCardReleaseContext| call.  This maps to: PC/SC Lite: https://pcsclite.apdu.fr/api/group__API.html#ga6aabcba7744c5c9419fdd6404f73a934 Microsoft: https://learn.microsoft.com/en-us/windows/win32/api/winscard/nf-winscard-scardreleasecontext");
  inspectorBackend2.registerCommand("SmartCardEmulation.reportListReadersResult", [{ "name": "requestId", "type": "string", "optional": false, "description": "", "typeRef": null }, { "name": "readers", "type": "array", "optional": false, "description": "", "typeRef": "string" }], [], "Reports the successful result of a |SCardListReaders| call.  This maps to: PC/SC Lite: https://pcsclite.apdu.fr/api/group__API.html#ga93b07815789b3cf2629d439ecf20f0d9 Microsoft: https://learn.microsoft.com/en-us/windows/win32/api/winscard/nf-winscard-scardlistreadersa");
  inspectorBackend2.registerCommand("SmartCardEmulation.reportGetStatusChangeResult", [{ "name": "requestId", "type": "string", "optional": false, "description": "", "typeRef": null }, { "name": "readerStates", "type": "array", "optional": false, "description": "", "typeRef": "SmartCardEmulation.ReaderStateOut" }], [], "Reports the successful result of a |SCardGetStatusChange| call.  This maps to: PC/SC Lite: https://pcsclite.apdu.fr/api/group__API.html#ga33247d5d1257d59e55647c3bb717db24 Microsoft: https://learn.microsoft.com/en-us/windows/win32/api/winscard/nf-winscard-scardgetstatuschangea");
  inspectorBackend2.registerCommand("SmartCardEmulation.reportBeginTransactionResult", [{ "name": "requestId", "type": "string", "optional": false, "description": "", "typeRef": null }, { "name": "handle", "type": "number", "optional": false, "description": "", "typeRef": null }], [], "Reports the result of a |SCardBeginTransaction| call. On success, this creates a new transaction object.  This maps to: PC/SC Lite: https://pcsclite.apdu.fr/api/group__API.html#gaddb835dce01a0da1d6ca02d33ee7d861 Microsoft: https://learn.microsoft.com/en-us/windows/win32/api/winscard/nf-winscard-scardbegintransaction");
  inspectorBackend2.registerCommand("SmartCardEmulation.reportPlainResult", [{ "name": "requestId", "type": "string", "optional": false, "description": "", "typeRef": null }], [], "Reports the successful result of a call that returns only a result code. Used for: |SCardCancel|, |SCardDisconnect|, |SCardSetAttrib|, |SCardEndTransaction|.  This maps to: 1. SCardCancel    PC/SC Lite: https://pcsclite.apdu.fr/api/group__API.html#gaacbbc0c6d6c0cbbeb4f4debf6fbeeee6    Microsoft: https://learn.microsoft.com/en-us/windows/win32/api/winscard/nf-winscard-scardcancel  2. SCardDisconnect    PC/SC Lite: https://pcsclite.apdu.fr/api/group__API.html#ga4be198045c73ec0deb79e66c0ca1738a    Microsoft: https://learn.microsoft.com/en-us/windows/win32/api/winscard/nf-winscard-scarddisconnect  3. SCardSetAttrib    PC/SC Lite: https://pcsclite.apdu.fr/api/group__API.html#ga060f0038a4ddfd5dd2b8fadf3c3a2e4f    Microsoft: https://learn.microsoft.com/en-us/windows/win32/api/winscard/nf-winscard-scardsetattrib  4. SCardEndTransaction    PC/SC Lite: https://pcsclite.apdu.fr/api/group__API.html#gae8742473b404363e5c587f570d7e2f3b    Microsoft: https://learn.microsoft.com/en-us/windows/win32/api/winscard/nf-winscard-scardendtransaction");
  inspectorBackend2.registerCommand("SmartCardEmulation.reportConnectResult", [{ "name": "requestId", "type": "string", "optional": false, "description": "", "typeRef": null }, { "name": "handle", "type": "number", "optional": false, "description": "", "typeRef": null }, { "name": "activeProtocol", "type": "string", "optional": true, "description": "", "typeRef": "SmartCardEmulation.Protocol" }], [], "Reports the successful result of a |SCardConnect| call.  This maps to: PC/SC Lite: https://pcsclite.apdu.fr/api/group__API.html#ga4e515829752e0a8dbc4d630696a8d6a5 Microsoft: https://learn.microsoft.com/en-us/windows/win32/api/winscard/nf-winscard-scardconnecta");
  inspectorBackend2.registerCommand("SmartCardEmulation.reportDataResult", [{ "name": "requestId", "type": "string", "optional": false, "description": "", "typeRef": null }, { "name": "data", "type": "string", "optional": false, "description": "", "typeRef": null }], [], "Reports the successful result of a call that sends back data on success. Used for |SCardTransmit|, |SCardControl|, and |SCardGetAttrib|.  This maps to: 1. SCardTransmit    PC/SC Lite: https://pcsclite.apdu.fr/api/group__API.html#ga9a2d77242a271310269065e64633ab99    Microsoft: https://learn.microsoft.com/en-us/windows/win32/api/winscard/nf-winscard-scardtransmit  2. SCardControl    PC/SC Lite: https://pcsclite.apdu.fr/api/group__API.html#gac3454d4657110fd7f753b2d3d8f4e32f    Microsoft: https://learn.microsoft.com/en-us/windows/win32/api/winscard/nf-winscard-scardcontrol  3. SCardGetAttrib    PC/SC Lite: https://pcsclite.apdu.fr/api/group__API.html#gaacfec51917255b7a25b94c5104961602    Microsoft: https://learn.microsoft.com/en-us/windows/win32/api/winscard/nf-winscard-scardgetattrib");
  inspectorBackend2.registerCommand("SmartCardEmulation.reportStatusResult", [{ "name": "requestId", "type": "string", "optional": false, "description": "", "typeRef": null }, { "name": "readerName", "type": "string", "optional": false, "description": "", "typeRef": null }, { "name": "state", "type": "string", "optional": false, "description": "", "typeRef": "SmartCardEmulation.ConnectionState" }, { "name": "atr", "type": "string", "optional": false, "description": "", "typeRef": null }, { "name": "protocol", "type": "string", "optional": true, "description": "", "typeRef": "SmartCardEmulation.Protocol" }], [], "Reports the successful result of a |SCardStatus| call.  This maps to: PC/SC Lite: https://pcsclite.apdu.fr/api/group__API.html#gae49c3c894ad7ac12a5b896bde70d0382 Microsoft: https://learn.microsoft.com/en-us/windows/win32/api/winscard/nf-winscard-scardstatusa");
  inspectorBackend2.registerCommand("SmartCardEmulation.reportError", [{ "name": "requestId", "type": "string", "optional": false, "description": "", "typeRef": null }, { "name": "resultCode", "type": "string", "optional": false, "description": "", "typeRef": "SmartCardEmulation.ResultCode" }], [], "Reports an error result for the given request.");
  inspectorBackend2.registerType("SmartCardEmulation.ReaderStateFlags", [{ "name": "unaware", "type": "boolean", "optional": true, "description": "", "typeRef": null }, { "name": "ignore", "type": "boolean", "optional": true, "description": "", "typeRef": null }, { "name": "changed", "type": "boolean", "optional": true, "description": "", "typeRef": null }, { "name": "unknown", "type": "boolean", "optional": true, "description": "", "typeRef": null }, { "name": "unavailable", "type": "boolean", "optional": true, "description": "", "typeRef": null }, { "name": "empty", "type": "boolean", "optional": true, "description": "", "typeRef": null }, { "name": "present", "type": "boolean", "optional": true, "description": "", "typeRef": null }, { "name": "exclusive", "type": "boolean", "optional": true, "description": "", "typeRef": null }, { "name": "inuse", "type": "boolean", "optional": true, "description": "", "typeRef": null }, { "name": "mute", "type": "boolean", "optional": true, "description": "", "typeRef": null }, { "name": "unpowered", "type": "boolean", "optional": true, "description": "", "typeRef": null }]);
  inspectorBackend2.registerType("SmartCardEmulation.ProtocolSet", [{ "name": "t0", "type": "boolean", "optional": true, "description": "", "typeRef": null }, { "name": "t1", "type": "boolean", "optional": true, "description": "", "typeRef": null }, { "name": "raw", "type": "boolean", "optional": true, "description": "", "typeRef": null }]);
  inspectorBackend2.registerType("SmartCardEmulation.ReaderStateIn", [{ "name": "reader", "type": "string", "optional": false, "description": "", "typeRef": null }, { "name": "currentState", "type": "object", "optional": false, "description": "", "typeRef": "SmartCardEmulation.ReaderStateFlags" }, { "name": "currentInsertionCount", "type": "number", "optional": false, "description": "", "typeRef": null }]);
  inspectorBackend2.registerType("SmartCardEmulation.ReaderStateOut", [{ "name": "reader", "type": "string", "optional": false, "description": "", "typeRef": null }, { "name": "eventState", "type": "object", "optional": false, "description": "", "typeRef": "SmartCardEmulation.ReaderStateFlags" }, { "name": "eventCount", "type": "number", "optional": false, "description": "", "typeRef": null }, { "name": "atr", "type": "string", "optional": false, "description": "", "typeRef": null }]);
  inspectorBackend2.registerEnum("Storage.StorageType", { Cookies: "cookies", File_systems: "file_systems", Indexeddb: "indexeddb", Local_storage: "local_storage", Shader_cache: "shader_cache", Websql: "websql", Service_workers: "service_workers", Cache_storage: "cache_storage", Interest_groups: "interest_groups", Shared_storage: "shared_storage", Storage_buckets: "storage_buckets", All: "all", Other: "other" });
  inspectorBackend2.registerEnum("Storage.InterestGroupAccessType", { Join: "join", Leave: "leave", Update: "update", Loaded: "loaded", Bid: "bid", Win: "win", AdditionalBid: "additionalBid", AdditionalBidWin: "additionalBidWin", TopLevelBid: "topLevelBid", TopLevelAdditionalBid: "topLevelAdditionalBid", Clear: "clear" });
  inspectorBackend2.registerEnum("Storage.InterestGroupAuctionEventType", { Started: "started", ConfigResolved: "configResolved" });
  inspectorBackend2.registerEnum("Storage.InterestGroupAuctionFetchType", { BidderJs: "bidderJs", BidderWasm: "bidderWasm", SellerJs: "sellerJs", BidderTrustedSignals: "bidderTrustedSignals", SellerTrustedSignals: "sellerTrustedSignals" });
  inspectorBackend2.registerEnum("Storage.SharedStorageAccessScope", { Window: "window", SharedStorageWorklet: "sharedStorageWorklet", ProtectedAudienceWorklet: "protectedAudienceWorklet", Header: "header" });
  inspectorBackend2.registerEnum("Storage.SharedStorageAccessMethod", { AddModule: "addModule", CreateWorklet: "createWorklet", SelectURL: "selectURL", Run: "run", BatchUpdate: "batchUpdate", Set: "set", Append: "append", Delete: "delete", Clear: "clear", Get: "get", Keys: "keys", Values: "values", Entries: "entries", Length: "length", RemainingBudget: "remainingBudget" });
  inspectorBackend2.registerEnum("Storage.StorageBucketsDurability", { Relaxed: "relaxed", Strict: "strict" });
  inspectorBackend2.registerEnum("Storage.AttributionReportingSourceType", { Navigation: "navigation", Event: "event" });
  inspectorBackend2.registerEnum("Storage.AttributionReportingTriggerDataMatching", { Exact: "exact", Modulus: "modulus" });
  inspectorBackend2.registerEnum("Storage.AttributionReportingSourceRegistrationResult", { Success: "success", InternalError: "internalError", InsufficientSourceCapacity: "insufficientSourceCapacity", InsufficientUniqueDestinationCapacity: "insufficientUniqueDestinationCapacity", ExcessiveReportingOrigins: "excessiveReportingOrigins", ProhibitedByBrowserPolicy: "prohibitedByBrowserPolicy", SuccessNoised: "successNoised", DestinationReportingLimitReached: "destinationReportingLimitReached", DestinationGlobalLimitReached: "destinationGlobalLimitReached", DestinationBothLimitsReached: "destinationBothLimitsReached", ReportingOriginsPerSiteLimitReached: "reportingOriginsPerSiteLimitReached", ExceedsMaxChannelCapacity: "exceedsMaxChannelCapacity", ExceedsMaxScopesChannelCapacity: "exceedsMaxScopesChannelCapacity", ExceedsMaxTriggerStateCardinality: "exceedsMaxTriggerStateCardinality", ExceedsMaxEventStatesLimit: "exceedsMaxEventStatesLimit", DestinationPerDayReportingLimitReached: "destinationPerDayReportingLimitReached" });
  inspectorBackend2.registerEnum("Storage.AttributionReportingSourceRegistrationTimeConfig", { Include: "include", Exclude: "exclude" });
  inspectorBackend2.registerEnum("Storage.AttributionReportingEventLevelResult", { Success: "success", SuccessDroppedLowerPriority: "successDroppedLowerPriority", InternalError: "internalError", NoCapacityForAttributionDestination: "noCapacityForAttributionDestination", NoMatchingSources: "noMatchingSources", Deduplicated: "deduplicated", ExcessiveAttributions: "excessiveAttributions", PriorityTooLow: "priorityTooLow", NeverAttributedSource: "neverAttributedSource", ExcessiveReportingOrigins: "excessiveReportingOrigins", NoMatchingSourceFilterData: "noMatchingSourceFilterData", ProhibitedByBrowserPolicy: "prohibitedByBrowserPolicy", NoMatchingConfigurations: "noMatchingConfigurations", ExcessiveReports: "excessiveReports", FalselyAttributedSource: "falselyAttributedSource", ReportWindowPassed: "reportWindowPassed", NotRegistered: "notRegistered", ReportWindowNotStarted: "reportWindowNotStarted", NoMatchingTriggerData: "noMatchingTriggerData" });
  inspectorBackend2.registerEnum("Storage.AttributionReportingAggregatableResult", { Success: "success", InternalError: "internalError", NoCapacityForAttributionDestination: "noCapacityForAttributionDestination", NoMatchingSources: "noMatchingSources", ExcessiveAttributions: "excessiveAttributions", ExcessiveReportingOrigins: "excessiveReportingOrigins", NoHistograms: "noHistograms", InsufficientBudget: "insufficientBudget", InsufficientNamedBudget: "insufficientNamedBudget", NoMatchingSourceFilterData: "noMatchingSourceFilterData", NotRegistered: "notRegistered", ProhibitedByBrowserPolicy: "prohibitedByBrowserPolicy", Deduplicated: "deduplicated", ReportWindowPassed: "reportWindowPassed", ExcessiveReports: "excessiveReports" });
  inspectorBackend2.registerEnum("Storage.AttributionReportingReportResult", { Sent: "sent", Prohibited: "prohibited", FailedToAssemble: "failedToAssemble", Expired: "expired" });
  inspectorBackend2.registerEvent("Storage.cacheStorageContentUpdated", ["origin", "storageKey", "bucketId", "cacheName"]);
  inspectorBackend2.registerEvent("Storage.cacheStorageListUpdated", ["origin", "storageKey", "bucketId"]);
  inspectorBackend2.registerEvent("Storage.indexedDBContentUpdated", ["origin", "storageKey", "bucketId", "databaseName", "objectStoreName"]);
  inspectorBackend2.registerEvent("Storage.indexedDBListUpdated", ["origin", "storageKey", "bucketId"]);
  inspectorBackend2.registerEvent("Storage.interestGroupAccessed", ["accessTime", "type", "ownerOrigin", "name", "componentSellerOrigin", "bid", "bidCurrency", "uniqueAuctionId"]);
  inspectorBackend2.registerEvent("Storage.interestGroupAuctionEventOccurred", ["eventTime", "type", "uniqueAuctionId", "parentAuctionId", "auctionConfig"]);
  inspectorBackend2.registerEvent("Storage.interestGroupAuctionNetworkRequestCreated", ["type", "requestId", "auctions"]);
  inspectorBackend2.registerEvent("Storage.sharedStorageAccessed", ["accessTime", "scope", "method", "mainFrameId", "ownerOrigin", "ownerSite", "params"]);
  inspectorBackend2.registerEvent("Storage.sharedStorageWorkletOperationExecutionFinished", ["finishedTime", "executionTime", "method", "operationId", "workletTargetId", "mainFrameId", "ownerOrigin"]);
  inspectorBackend2.registerEvent("Storage.storageBucketCreatedOrUpdated", ["bucketInfo"]);
  inspectorBackend2.registerEvent("Storage.storageBucketDeleted", ["bucketId"]);
  inspectorBackend2.registerEvent("Storage.attributionReportingSourceRegistered", ["registration", "result"]);
  inspectorBackend2.registerEvent("Storage.attributionReportingTriggerRegistered", ["registration", "eventLevel", "aggregatable"]);
  inspectorBackend2.registerEvent("Storage.attributionReportingReportSent", ["url", "body", "result", "netError", "netErrorName", "httpStatusCode"]);
  inspectorBackend2.registerEvent("Storage.attributionReportingVerboseDebugReportSent", ["url", "body", "netError", "netErrorName", "httpStatusCode"]);
  inspectorBackend2.registerCommand("Storage.getStorageKeyForFrame", [{ "name": "frameId", "type": "string", "optional": false, "description": "", "typeRef": "Page.FrameId" }], ["storageKey"], "Returns a storage key given a frame id. Deprecated. Please use Storage.getStorageKey instead.");
  inspectorBackend2.registerCommand("Storage.getStorageKey", [{ "name": "frameId", "type": "string", "optional": true, "description": "", "typeRef": "Page.FrameId" }], ["storageKey"], "Returns storage key for the given frame. If no frame ID is provided, the storage key of the target executing this command is returned.");
  inspectorBackend2.registerCommand("Storage.clearDataForOrigin", [{ "name": "origin", "type": "string", "optional": false, "description": "Security origin.", "typeRef": null }, { "name": "storageTypes", "type": "string", "optional": false, "description": "Comma separated list of StorageType to clear.", "typeRef": null }], [], "Clears storage for origin.");
  inspectorBackend2.registerCommand("Storage.clearDataForStorageKey", [{ "name": "storageKey", "type": "string", "optional": false, "description": "Storage key.", "typeRef": null }, { "name": "storageTypes", "type": "string", "optional": false, "description": "Comma separated list of StorageType to clear.", "typeRef": null }], [], "Clears storage for storage key.");
  inspectorBackend2.registerCommand("Storage.getCookies", [{ "name": "browserContextId", "type": "string", "optional": true, "description": "Browser context to use when called on the browser endpoint.", "typeRef": "Browser.BrowserContextID" }], ["cookies"], "Returns all browser cookies.");
  inspectorBackend2.registerCommand("Storage.setCookies", [{ "name": "cookies", "type": "array", "optional": false, "description": "Cookies to be set.", "typeRef": "Network.CookieParam" }, { "name": "browserContextId", "type": "string", "optional": true, "description": "Browser context to use when called on the browser endpoint.", "typeRef": "Browser.BrowserContextID" }], [], "Sets given cookies.");
  inspectorBackend2.registerCommand("Storage.clearCookies", [{ "name": "browserContextId", "type": "string", "optional": true, "description": "Browser context to use when called on the browser endpoint.", "typeRef": "Browser.BrowserContextID" }], [], "Clears cookies.");
  inspectorBackend2.registerCommand("Storage.getUsageAndQuota", [{ "name": "origin", "type": "string", "optional": false, "description": "Security origin.", "typeRef": null }], ["usage", "quota", "overrideActive", "usageBreakdown"], "Returns usage and quota in bytes.");
  inspectorBackend2.registerCommand("Storage.overrideQuotaForOrigin", [{ "name": "origin", "type": "string", "optional": false, "description": "Security origin.", "typeRef": null }, { "name": "quotaSize", "type": "number", "optional": true, "description": "The quota size (in bytes) to override the original quota with. If this is called multiple times, the overridden quota will be equal to the quotaSize provided in the final call. If this is called without specifying a quotaSize, the quota will be reset to the default value for the specified origin. If this is called multiple times with different origins, the override will be maintained for each origin until it is disabled (called without a quotaSize).", "typeRef": null }], [], "Override quota for the specified origin");
  inspectorBackend2.registerCommand("Storage.trackCacheStorageForOrigin", [{ "name": "origin", "type": "string", "optional": false, "description": "Security origin.", "typeRef": null }], [], "Registers origin to be notified when an update occurs to its cache storage list.");
  inspectorBackend2.registerCommand("Storage.trackCacheStorageForStorageKey", [{ "name": "storageKey", "type": "string", "optional": false, "description": "Storage key.", "typeRef": null }], [], "Registers storage key to be notified when an update occurs to its cache storage list.");
  inspectorBackend2.registerCommand("Storage.trackIndexedDBForOrigin", [{ "name": "origin", "type": "string", "optional": false, "description": "Security origin.", "typeRef": null }], [], "Registers origin to be notified when an update occurs to its IndexedDB.");
  inspectorBackend2.registerCommand("Storage.trackIndexedDBForStorageKey", [{ "name": "storageKey", "type": "string", "optional": false, "description": "Storage key.", "typeRef": null }], [], "Registers storage key to be notified when an update occurs to its IndexedDB.");
  inspectorBackend2.registerCommand("Storage.untrackCacheStorageForOrigin", [{ "name": "origin", "type": "string", "optional": false, "description": "Security origin.", "typeRef": null }], [], "Unregisters origin from receiving notifications for cache storage.");
  inspectorBackend2.registerCommand("Storage.untrackCacheStorageForStorageKey", [{ "name": "storageKey", "type": "string", "optional": false, "description": "Storage key.", "typeRef": null }], [], "Unregisters storage key from receiving notifications for cache storage.");
  inspectorBackend2.registerCommand("Storage.untrackIndexedDBForOrigin", [{ "name": "origin", "type": "string", "optional": false, "description": "Security origin.", "typeRef": null }], [], "Unregisters origin from receiving notifications for IndexedDB.");
  inspectorBackend2.registerCommand("Storage.untrackIndexedDBForStorageKey", [{ "name": "storageKey", "type": "string", "optional": false, "description": "Storage key.", "typeRef": null }], [], "Unregisters storage key from receiving notifications for IndexedDB.");
  inspectorBackend2.registerCommand("Storage.getTrustTokens", [], ["tokens"], "Returns the number of stored Trust Tokens per issuer for the current browsing context.");
  inspectorBackend2.registerCommand("Storage.clearTrustTokens", [{ "name": "issuerOrigin", "type": "string", "optional": false, "description": "", "typeRef": null }], ["didDeleteTokens"], "Removes all Trust Tokens issued by the provided issuerOrigin. Leaves other stored data, including the issuer's Redemption Records, intact.");
  inspectorBackend2.registerCommand("Storage.getInterestGroupDetails", [{ "name": "ownerOrigin", "type": "string", "optional": false, "description": "", "typeRef": null }, { "name": "name", "type": "string", "optional": false, "description": "", "typeRef": null }], ["details"], "Gets details for a named interest group.");
  inspectorBackend2.registerCommand("Storage.setInterestGroupTracking", [{ "name": "enable", "type": "boolean", "optional": false, "description": "", "typeRef": null }], [], "Enables/Disables issuing of interestGroupAccessed events.");
  inspectorBackend2.registerCommand("Storage.setInterestGroupAuctionTracking", [{ "name": "enable", "type": "boolean", "optional": false, "description": "", "typeRef": null }], [], "Enables/Disables issuing of interestGroupAuctionEventOccurred and interestGroupAuctionNetworkRequestCreated.");
  inspectorBackend2.registerCommand("Storage.getSharedStorageMetadata", [{ "name": "ownerOrigin", "type": "string", "optional": false, "description": "", "typeRef": null }], ["metadata"], "Gets metadata for an origin's shared storage.");
  inspectorBackend2.registerCommand("Storage.getSharedStorageEntries", [{ "name": "ownerOrigin", "type": "string", "optional": false, "description": "", "typeRef": null }], ["entries"], "Gets the entries in an given origin's shared storage.");
  inspectorBackend2.registerCommand("Storage.setSharedStorageEntry", [{ "name": "ownerOrigin", "type": "string", "optional": false, "description": "", "typeRef": null }, { "name": "key", "type": "string", "optional": false, "description": "", "typeRef": null }, { "name": "value", "type": "string", "optional": false, "description": "", "typeRef": null }, { "name": "ignoreIfPresent", "type": "boolean", "optional": true, "description": "If `ignoreIfPresent` is included and true, then only sets the entry if `key` doesn't already exist.", "typeRef": null }], [], "Sets entry with `key` and `value` for a given origin's shared storage.");
  inspectorBackend2.registerCommand("Storage.deleteSharedStorageEntry", [{ "name": "ownerOrigin", "type": "string", "optional": false, "description": "", "typeRef": null }, { "name": "key", "type": "string", "optional": false, "description": "", "typeRef": null }], [], "Deletes entry for `key` (if it exists) for a given origin's shared storage.");
  inspectorBackend2.registerCommand("Storage.clearSharedStorageEntries", [{ "name": "ownerOrigin", "type": "string", "optional": false, "description": "", "typeRef": null }], [], "Clears all entries for a given origin's shared storage.");
  inspectorBackend2.registerCommand("Storage.resetSharedStorageBudget", [{ "name": "ownerOrigin", "type": "string", "optional": false, "description": "", "typeRef": null }], [], "Resets the budget for `ownerOrigin` by clearing all budget withdrawals.");
  inspectorBackend2.registerCommand("Storage.setSharedStorageTracking", [{ "name": "enable", "type": "boolean", "optional": false, "description": "", "typeRef": null }], [], "Enables/disables issuing of sharedStorageAccessed events.");
  inspectorBackend2.registerCommand("Storage.setStorageBucketTracking", [{ "name": "storageKey", "type": "string", "optional": false, "description": "", "typeRef": null }, { "name": "enable", "type": "boolean", "optional": false, "description": "", "typeRef": null }], [], "Set tracking for a storage key's buckets.");
  inspectorBackend2.registerCommand("Storage.deleteStorageBucket", [{ "name": "bucket", "type": "object", "optional": false, "description": "", "typeRef": "Storage.StorageBucket" }], [], "Deletes the Storage Bucket with the given storage key and bucket name.");
  inspectorBackend2.registerCommand("Storage.runBounceTrackingMitigations", [], ["deletedSites"], "Deletes state for sites identified as potential bounce trackers, immediately.");
  inspectorBackend2.registerCommand("Storage.setAttributionReportingLocalTestingMode", [{ "name": "enabled", "type": "boolean", "optional": false, "description": "If enabled, noise is suppressed and reports are sent immediately.", "typeRef": null }], [], "https://wicg.github.io/attribution-reporting-api/");
  inspectorBackend2.registerCommand("Storage.setAttributionReportingTracking", [{ "name": "enable", "type": "boolean", "optional": false, "description": "", "typeRef": null }], [], "Enables/disables issuing of Attribution Reporting events.");
  inspectorBackend2.registerCommand("Storage.sendPendingAttributionReports", [], ["numSent"], "Sends all pending Attribution Reports immediately, regardless of their scheduled report time.");
  inspectorBackend2.registerCommand("Storage.getRelatedWebsiteSets", [], ["sets"], "Returns the effective Related Website Sets in use by this profile for the browser session. The effective Related Website Sets will not change during a browser session.");
  inspectorBackend2.registerCommand("Storage.getAffectedUrlsForThirdPartyCookieMetadata", [{ "name": "firstPartyUrl", "type": "string", "optional": false, "description": "The URL of the page currently being visited.", "typeRef": null }, { "name": "thirdPartyUrls", "type": "array", "optional": false, "description": "The list of embedded resource URLs from the page.", "typeRef": "string" }], ["matchedUrls"], "Returns the list of URLs from a page and its embedded resources that match existing grace period URL pattern rules. https://developers.google.com/privacy-sandbox/cookies/temporary-exceptions/grace-period");
  inspectorBackend2.registerCommand("Storage.setProtectedAudienceKAnonymity", [{ "name": "owner", "type": "string", "optional": false, "description": "", "typeRef": null }, { "name": "name", "type": "string", "optional": false, "description": "", "typeRef": null }, { "name": "hashes", "type": "array", "optional": false, "description": "", "typeRef": "binary" }], [], "");
  inspectorBackend2.registerType("Storage.UsageForType", [{ "name": "storageType", "type": "string", "optional": false, "description": "Name of storage type.", "typeRef": "Storage.StorageType" }, { "name": "usage", "type": "number", "optional": false, "description": "Storage usage (bytes).", "typeRef": null }]);
  inspectorBackend2.registerType("Storage.TrustTokens", [{ "name": "issuerOrigin", "type": "string", "optional": false, "description": "", "typeRef": null }, { "name": "count", "type": "number", "optional": false, "description": "", "typeRef": null }]);
  inspectorBackend2.registerType("Storage.SharedStorageEntry", [{ "name": "key", "type": "string", "optional": false, "description": "", "typeRef": null }, { "name": "value", "type": "string", "optional": false, "description": "", "typeRef": null }]);
  inspectorBackend2.registerType("Storage.SharedStorageMetadata", [{ "name": "creationTime", "type": "number", "optional": false, "description": "Time when the origin's shared storage was last created.", "typeRef": "Network.TimeSinceEpoch" }, { "name": "length", "type": "number", "optional": false, "description": "Number of key-value pairs stored in origin's shared storage.", "typeRef": null }, { "name": "remainingBudget", "type": "number", "optional": false, "description": "Current amount of bits of entropy remaining in the navigation budget.", "typeRef": null }, { "name": "bytesUsed", "type": "number", "optional": false, "description": "Total number of bytes stored as key-value pairs in origin's shared storage.", "typeRef": null }]);
  inspectorBackend2.registerType("Storage.SharedStoragePrivateAggregationConfig", [{ "name": "aggregationCoordinatorOrigin", "type": "string", "optional": true, "description": "The chosen aggregation service deployment.", "typeRef": null }, { "name": "contextId", "type": "string", "optional": true, "description": "The context ID provided.", "typeRef": null }, { "name": "filteringIdMaxBytes", "type": "number", "optional": false, "description": "Configures the maximum size allowed for filtering IDs.", "typeRef": null }, { "name": "maxContributions", "type": "number", "optional": true, "description": "The limit on the number of contributions in the final report.", "typeRef": null }]);
  inspectorBackend2.registerType("Storage.SharedStorageReportingMetadata", [{ "name": "eventType", "type": "string", "optional": false, "description": "", "typeRef": null }, { "name": "reportingUrl", "type": "string", "optional": false, "description": "", "typeRef": null }]);
  inspectorBackend2.registerType("Storage.SharedStorageUrlWithMetadata", [{ "name": "url", "type": "string", "optional": false, "description": "Spec of candidate URL.", "typeRef": null }, { "name": "reportingMetadata", "type": "array", "optional": false, "description": "Any associated reporting metadata.", "typeRef": "Storage.SharedStorageReportingMetadata" }]);
  inspectorBackend2.registerType("Storage.SharedStorageAccessParams", [{ "name": "scriptSourceUrl", "type": "string", "optional": true, "description": "Spec of the module script URL. Present only for SharedStorageAccessMethods: addModule and createWorklet.", "typeRef": null }, { "name": "dataOrigin", "type": "string", "optional": true, "description": `String denoting \\"context-origin\\", \\"script-origin\\", or a custom origin to be used as the worklet's data origin. Present only for SharedStorageAccessMethod: createWorklet.`, "typeRef": null }, { "name": "operationName", "type": "string", "optional": true, "description": "Name of the registered operation to be run. Present only for SharedStorageAccessMethods: run and selectURL.", "typeRef": null }, { "name": "operationId", "type": "string", "optional": true, "description": "ID of the operation call. Present only for SharedStorageAccessMethods: run and selectURL.", "typeRef": null }, { "name": "keepAlive", "type": "boolean", "optional": true, "description": "Whether or not to keep the worket alive for future run or selectURL calls. Present only for SharedStorageAccessMethods: run and selectURL.", "typeRef": null }, { "name": "privateAggregationConfig", "type": "object", "optional": true, "description": "Configures the private aggregation options. Present only for SharedStorageAccessMethods: run and selectURL.", "typeRef": "Storage.SharedStoragePrivateAggregationConfig" }, { "name": "serializedData", "type": "string", "optional": true, "description": "The operation's serialized data in bytes (converted to a string). Present only for SharedStorageAccessMethods: run and selectURL. TODO(crbug.com/401011862): Consider updating this parameter to binary.", "typeRef": null }, { "name": "urlsWithMetadata", "type": "array", "optional": true, "description": "Array of candidate URLs' specs, along with any associated metadata. Present only for SharedStorageAccessMethod: selectURL.", "typeRef": "Storage.SharedStorageUrlWithMetadata" }, { "name": "urnUuid", "type": "string", "optional": true, "description": "Spec of the URN:UUID generated for a selectURL call. Present only for SharedStorageAccessMethod: selectURL.", "typeRef": null }, { "name": "key", "type": "string", "optional": true, "description": "Key for a specific entry in an origin's shared storage. Present only for SharedStorageAccessMethods: set, append, delete, and get.", "typeRef": null }, { "name": "value", "type": "string", "optional": true, "description": "Value for a specific entry in an origin's shared storage. Present only for SharedStorageAccessMethods: set and append.", "typeRef": null }, { "name": "ignoreIfPresent", "type": "boolean", "optional": true, "description": "Whether or not to set an entry for a key if that key is already present. Present only for SharedStorageAccessMethod: set.", "typeRef": null }, { "name": "workletOrdinal", "type": "number", "optional": true, "description": "A number denoting the (0-based) order of the worklet's creation relative to all other shared storage worklets created by documents using the current storage partition. Present only for SharedStorageAccessMethods: addModule, createWorklet.", "typeRef": null }, { "name": "workletTargetId", "type": "string", "optional": true, "description": "Hex representation of the DevTools token used as the TargetID for the associated shared storage worklet. Present only for SharedStorageAccessMethods: addModule, createWorklet, run, selectURL, and any other SharedStorageAccessMethod when the SharedStorageAccessScope is sharedStorageWorklet.", "typeRef": "Target.TargetID" }, { "name": "withLock", "type": "string", "optional": true, "description": "Name of the lock to be acquired, if present. Optionally present only for SharedStorageAccessMethods: batchUpdate, set, append, delete, and clear.", "typeRef": null }, { "name": "batchUpdateId", "type": "string", "optional": true, "description": "If the method has been called as part of a batchUpdate, then this number identifies the batch to which it belongs. Optionally present only for SharedStorageAccessMethods: batchUpdate (required), set, append, delete, and clear.", "typeRef": null }, { "name": "batchSize", "type": "number", "optional": true, "description": "Number of modifier methods sent in batch. Present only for SharedStorageAccessMethod: batchUpdate.", "typeRef": null }]);
  inspectorBackend2.registerType("Storage.StorageBucket", [{ "name": "storageKey", "type": "string", "optional": false, "description": "", "typeRef": "Storage.SerializedStorageKey" }, { "name": "name", "type": "string", "optional": true, "description": "If not specified, it is the default bucket of the storageKey.", "typeRef": null }]);
  inspectorBackend2.registerType("Storage.StorageBucketInfo", [{ "name": "bucket", "type": "object", "optional": false, "description": "", "typeRef": "Storage.StorageBucket" }, { "name": "id", "type": "string", "optional": false, "description": "", "typeRef": null }, { "name": "expiration", "type": "number", "optional": false, "description": "", "typeRef": "Network.TimeSinceEpoch" }, { "name": "quota", "type": "number", "optional": false, "description": "Storage quota (bytes).", "typeRef": null }, { "name": "persistent", "type": "boolean", "optional": false, "description": "", "typeRef": null }, { "name": "durability", "type": "string", "optional": false, "description": "", "typeRef": "Storage.StorageBucketsDurability" }]);
  inspectorBackend2.registerType("Storage.AttributionReportingFilterDataEntry", [{ "name": "key", "type": "string", "optional": false, "description": "", "typeRef": null }, { "name": "values", "type": "array", "optional": false, "description": "", "typeRef": "string" }]);
  inspectorBackend2.registerType("Storage.AttributionReportingFilterConfig", [{ "name": "filterValues", "type": "array", "optional": false, "description": "", "typeRef": "Storage.AttributionReportingFilterDataEntry" }, { "name": "lookbackWindow", "type": "number", "optional": true, "description": "duration in seconds", "typeRef": null }]);
  inspectorBackend2.registerType("Storage.AttributionReportingFilterPair", [{ "name": "filters", "type": "array", "optional": false, "description": "", "typeRef": "Storage.AttributionReportingFilterConfig" }, { "name": "notFilters", "type": "array", "optional": false, "description": "", "typeRef": "Storage.AttributionReportingFilterConfig" }]);
  inspectorBackend2.registerType("Storage.AttributionReportingAggregationKeysEntry", [{ "name": "key", "type": "string", "optional": false, "description": "", "typeRef": null }, { "name": "value", "type": "string", "optional": false, "description": "", "typeRef": "Storage.UnsignedInt128AsBase16" }]);
  inspectorBackend2.registerType("Storage.AttributionReportingEventReportWindows", [{ "name": "start", "type": "number", "optional": false, "description": "duration in seconds", "typeRef": null }, { "name": "ends", "type": "array", "optional": false, "description": "duration in seconds", "typeRef": "integer" }]);
  inspectorBackend2.registerType("Storage.AttributionReportingAggregatableDebugReportingData", [{ "name": "keyPiece", "type": "string", "optional": false, "description": "", "typeRef": "Storage.UnsignedInt128AsBase16" }, { "name": "value", "type": "number", "optional": false, "description": "number instead of integer because not all uint32 can be represented by int", "typeRef": null }, { "name": "types", "type": "array", "optional": false, "description": "", "typeRef": "string" }]);
  inspectorBackend2.registerType("Storage.AttributionReportingAggregatableDebugReportingConfig", [{ "name": "budget", "type": "number", "optional": true, "description": "number instead of integer because not all uint32 can be represented by int, only present for source registrations", "typeRef": null }, { "name": "keyPiece", "type": "string", "optional": false, "description": "", "typeRef": "Storage.UnsignedInt128AsBase16" }, { "name": "debugData", "type": "array", "optional": false, "description": "", "typeRef": "Storage.AttributionReportingAggregatableDebugReportingData" }, { "name": "aggregationCoordinatorOrigin", "type": "string", "optional": true, "description": "", "typeRef": null }]);
  inspectorBackend2.registerType("Storage.AttributionScopesData", [{ "name": "values", "type": "array", "optional": false, "description": "", "typeRef": "string" }, { "name": "limit", "type": "number", "optional": false, "description": "number instead of integer because not all uint32 can be represented by int", "typeRef": null }, { "name": "maxEventStates", "type": "number", "optional": false, "description": "", "typeRef": null }]);
  inspectorBackend2.registerType("Storage.AttributionReportingNamedBudgetDef", [{ "name": "name", "type": "string", "optional": false, "description": "", "typeRef": null }, { "name": "budget", "type": "number", "optional": false, "description": "", "typeRef": null }]);
  inspectorBackend2.registerType("Storage.AttributionReportingSourceRegistration", [{ "name": "time", "type": "number", "optional": false, "description": "", "typeRef": "Network.TimeSinceEpoch" }, { "name": "expiry", "type": "number", "optional": false, "description": "duration in seconds", "typeRef": null }, { "name": "triggerData", "type": "array", "optional": false, "description": "number instead of integer because not all uint32 can be represented by int", "typeRef": "number" }, { "name": "eventReportWindows", "type": "object", "optional": false, "description": "", "typeRef": "Storage.AttributionReportingEventReportWindows" }, { "name": "aggregatableReportWindow", "type": "number", "optional": false, "description": "duration in seconds", "typeRef": null }, { "name": "type", "type": "string", "optional": false, "description": "", "typeRef": "Storage.AttributionReportingSourceType" }, { "name": "sourceOrigin", "type": "string", "optional": false, "description": "", "typeRef": null }, { "name": "reportingOrigin", "type": "string", "optional": false, "description": "", "typeRef": null }, { "name": "destinationSites", "type": "array", "optional": false, "description": "", "typeRef": "string" }, { "name": "eventId", "type": "string", "optional": false, "description": "", "typeRef": "Storage.UnsignedInt64AsBase10" }, { "name": "priority", "type": "string", "optional": false, "description": "", "typeRef": "Storage.SignedInt64AsBase10" }, { "name": "filterData", "type": "array", "optional": false, "description": "", "typeRef": "Storage.AttributionReportingFilterDataEntry" }, { "name": "aggregationKeys", "type": "array", "optional": false, "description": "", "typeRef": "Storage.AttributionReportingAggregationKeysEntry" }, { "name": "debugKey", "type": "string", "optional": true, "description": "", "typeRef": "Storage.UnsignedInt64AsBase10" }, { "name": "triggerDataMatching", "type": "string", "optional": false, "description": "", "typeRef": "Storage.AttributionReportingTriggerDataMatching" }, { "name": "destinationLimitPriority", "type": "string", "optional": false, "description": "", "typeRef": "Storage.SignedInt64AsBase10" }, { "name": "aggregatableDebugReportingConfig", "type": "object", "optional": false, "description": "", "typeRef": "Storage.AttributionReportingAggregatableDebugReportingConfig" }, { "name": "scopesData", "type": "object", "optional": true, "description": "", "typeRef": "Storage.AttributionScopesData" }, { "name": "maxEventLevelReports", "type": "number", "optional": false, "description": "", "typeRef": null }, { "name": "namedBudgets", "type": "array", "optional": false, "description": "", "typeRef": "Storage.AttributionReportingNamedBudgetDef" }, { "name": "debugReporting", "type": "boolean", "optional": false, "description": "", "typeRef": null }, { "name": "eventLevelEpsilon", "type": "number", "optional": false, "description": "", "typeRef": null }]);
  inspectorBackend2.registerType("Storage.AttributionReportingAggregatableValueDictEntry", [{ "name": "key", "type": "string", "optional": false, "description": "", "typeRef": null }, { "name": "value", "type": "number", "optional": false, "description": "number instead of integer because not all uint32 can be represented by int", "typeRef": null }, { "name": "filteringId", "type": "string", "optional": false, "description": "", "typeRef": "Storage.UnsignedInt64AsBase10" }]);
  inspectorBackend2.registerType("Storage.AttributionReportingAggregatableValueEntry", [{ "name": "values", "type": "array", "optional": false, "description": "", "typeRef": "Storage.AttributionReportingAggregatableValueDictEntry" }, { "name": "filters", "type": "object", "optional": false, "description": "", "typeRef": "Storage.AttributionReportingFilterPair" }]);
  inspectorBackend2.registerType("Storage.AttributionReportingEventTriggerData", [{ "name": "data", "type": "string", "optional": false, "description": "", "typeRef": "Storage.UnsignedInt64AsBase10" }, { "name": "priority", "type": "string", "optional": false, "description": "", "typeRef": "Storage.SignedInt64AsBase10" }, { "name": "dedupKey", "type": "string", "optional": true, "description": "", "typeRef": "Storage.UnsignedInt64AsBase10" }, { "name": "filters", "type": "object", "optional": false, "description": "", "typeRef": "Storage.AttributionReportingFilterPair" }]);
  inspectorBackend2.registerType("Storage.AttributionReportingAggregatableTriggerData", [{ "name": "keyPiece", "type": "string", "optional": false, "description": "", "typeRef": "Storage.UnsignedInt128AsBase16" }, { "name": "sourceKeys", "type": "array", "optional": false, "description": "", "typeRef": "string" }, { "name": "filters", "type": "object", "optional": false, "description": "", "typeRef": "Storage.AttributionReportingFilterPair" }]);
  inspectorBackend2.registerType("Storage.AttributionReportingAggregatableDedupKey", [{ "name": "dedupKey", "type": "string", "optional": true, "description": "", "typeRef": "Storage.UnsignedInt64AsBase10" }, { "name": "filters", "type": "object", "optional": false, "description": "", "typeRef": "Storage.AttributionReportingFilterPair" }]);
  inspectorBackend2.registerType("Storage.AttributionReportingNamedBudgetCandidate", [{ "name": "name", "type": "string", "optional": true, "description": "", "typeRef": null }, { "name": "filters", "type": "object", "optional": false, "description": "", "typeRef": "Storage.AttributionReportingFilterPair" }]);
  inspectorBackend2.registerType("Storage.AttributionReportingTriggerRegistration", [{ "name": "filters", "type": "object", "optional": false, "description": "", "typeRef": "Storage.AttributionReportingFilterPair" }, { "name": "debugKey", "type": "string", "optional": true, "description": "", "typeRef": "Storage.UnsignedInt64AsBase10" }, { "name": "aggregatableDedupKeys", "type": "array", "optional": false, "description": "", "typeRef": "Storage.AttributionReportingAggregatableDedupKey" }, { "name": "eventTriggerData", "type": "array", "optional": false, "description": "", "typeRef": "Storage.AttributionReportingEventTriggerData" }, { "name": "aggregatableTriggerData", "type": "array", "optional": false, "description": "", "typeRef": "Storage.AttributionReportingAggregatableTriggerData" }, { "name": "aggregatableValues", "type": "array", "optional": false, "description": "", "typeRef": "Storage.AttributionReportingAggregatableValueEntry" }, { "name": "aggregatableFilteringIdMaxBytes", "type": "number", "optional": false, "description": "", "typeRef": null }, { "name": "debugReporting", "type": "boolean", "optional": false, "description": "", "typeRef": null }, { "name": "aggregationCoordinatorOrigin", "type": "string", "optional": true, "description": "", "typeRef": null }, { "name": "sourceRegistrationTimeConfig", "type": "string", "optional": false, "description": "", "typeRef": "Storage.AttributionReportingSourceRegistrationTimeConfig" }, { "name": "triggerContextId", "type": "string", "optional": true, "description": "", "typeRef": null }, { "name": "aggregatableDebugReportingConfig", "type": "object", "optional": false, "description": "", "typeRef": "Storage.AttributionReportingAggregatableDebugReportingConfig" }, { "name": "scopes", "type": "array", "optional": false, "description": "", "typeRef": "string" }, { "name": "namedBudgets", "type": "array", "optional": false, "description": "", "typeRef": "Storage.AttributionReportingNamedBudgetCandidate" }]);
  inspectorBackend2.registerType("Storage.RelatedWebsiteSet", [{ "name": "primarySites", "type": "array", "optional": false, "description": "The primary site of this set, along with the ccTLDs if there is any.", "typeRef": "string" }, { "name": "associatedSites", "type": "array", "optional": false, "description": "The associated sites of this set, along with the ccTLDs if there is any.", "typeRef": "string" }, { "name": "serviceSites", "type": "array", "optional": false, "description": "The service sites of this set, along with the ccTLDs if there is any.", "typeRef": "string" }]);
  inspectorBackend2.registerEnum("SystemInfo.SubsamplingFormat", { Yuv420: "yuv420", Yuv422: "yuv422", Yuv444: "yuv444" });
  inspectorBackend2.registerEnum("SystemInfo.ImageType", { Jpeg: "jpeg", Webp: "webp", Unknown: "unknown" });
  inspectorBackend2.registerCommand("SystemInfo.getInfo", [], ["gpu", "modelName", "modelVersion", "commandLine"], "Returns information about the system.");
  inspectorBackend2.registerCommand("SystemInfo.getFeatureState", [{ "name": "featureState", "type": "string", "optional": false, "description": "", "typeRef": null }], ["featureEnabled"], "Returns information about the feature state.");
  inspectorBackend2.registerCommand("SystemInfo.getProcessInfo", [], ["processInfo"], "Returns information about all running processes.");
  inspectorBackend2.registerType("SystemInfo.GPUDevice", [{ "name": "vendorId", "type": "number", "optional": false, "description": "PCI ID of the GPU vendor, if available; 0 otherwise.", "typeRef": null }, { "name": "deviceId", "type": "number", "optional": false, "description": "PCI ID of the GPU device, if available; 0 otherwise.", "typeRef": null }, { "name": "subSysId", "type": "number", "optional": true, "description": "Sub sys ID of the GPU, only available on Windows.", "typeRef": null }, { "name": "revision", "type": "number", "optional": true, "description": "Revision of the GPU, only available on Windows.", "typeRef": null }, { "name": "vendorString", "type": "string", "optional": false, "description": "String description of the GPU vendor, if the PCI ID is not available.", "typeRef": null }, { "name": "deviceString", "type": "string", "optional": false, "description": "String description of the GPU device, if the PCI ID is not available.", "typeRef": null }, { "name": "driverVendor", "type": "string", "optional": false, "description": "String description of the GPU driver vendor.", "typeRef": null }, { "name": "driverVersion", "type": "string", "optional": false, "description": "String description of the GPU driver version.", "typeRef": null }]);
  inspectorBackend2.registerType("SystemInfo.Size", [{ "name": "width", "type": "number", "optional": false, "description": "Width in pixels.", "typeRef": null }, { "name": "height", "type": "number", "optional": false, "description": "Height in pixels.", "typeRef": null }]);
  inspectorBackend2.registerType("SystemInfo.VideoDecodeAcceleratorCapability", [{ "name": "profile", "type": "string", "optional": false, "description": "Video codec profile that is supported, e.g. VP9 Profile 2.", "typeRef": null }, { "name": "maxResolution", "type": "object", "optional": false, "description": "Maximum video dimensions in pixels supported for this |profile|.", "typeRef": "SystemInfo.Size" }, { "name": "minResolution", "type": "object", "optional": false, "description": "Minimum video dimensions in pixels supported for this |profile|.", "typeRef": "SystemInfo.Size" }]);
  inspectorBackend2.registerType("SystemInfo.VideoEncodeAcceleratorCapability", [{ "name": "profile", "type": "string", "optional": false, "description": "Video codec profile that is supported, e.g H264 Main.", "typeRef": null }, { "name": "maxResolution", "type": "object", "optional": false, "description": "Maximum video dimensions in pixels supported for this |profile|.", "typeRef": "SystemInfo.Size" }, { "name": "maxFramerateNumerator", "type": "number", "optional": false, "description": "Maximum encoding framerate in frames per second supported for this |profile|, as fraction's numerator and denominator, e.g. 24/1 fps, 24000/1001 fps, etc.", "typeRef": null }, { "name": "maxFramerateDenominator", "type": "number", "optional": false, "description": "", "typeRef": null }]);
  inspectorBackend2.registerType("SystemInfo.GPUInfo", [{ "name": "devices", "type": "array", "optional": false, "description": "The graphics devices on the system. Element 0 is the primary GPU.", "typeRef": "SystemInfo.GPUDevice" }, { "name": "auxAttributes", "type": "object", "optional": true, "description": "An optional dictionary of additional GPU related attributes.", "typeRef": null }, { "name": "featureStatus", "type": "object", "optional": true, "description": "An optional dictionary of graphics features and their status.", "typeRef": null }, { "name": "driverBugWorkarounds", "type": "array", "optional": false, "description": "An optional array of GPU driver bug workarounds.", "typeRef": "string" }, { "name": "videoDecoding", "type": "array", "optional": false, "description": "Supported accelerated video decoding capabilities.", "typeRef": "SystemInfo.VideoDecodeAcceleratorCapability" }, { "name": "videoEncoding", "type": "array", "optional": false, "description": "Supported accelerated video encoding capabilities.", "typeRef": "SystemInfo.VideoEncodeAcceleratorCapability" }]);
  inspectorBackend2.registerType("SystemInfo.ProcessInfo", [{ "name": "type", "type": "string", "optional": false, "description": "Specifies process type.", "typeRef": null }, { "name": "id", "type": "number", "optional": false, "description": "Specifies process id.", "typeRef": null }, { "name": "cpuTime", "type": "number", "optional": false, "description": "Specifies cumulative CPU usage in seconds across all threads of the process since the process start.", "typeRef": null }]);
  inspectorBackend2.registerEnum("Target.WindowState", { Normal: "normal", Minimized: "minimized", Maximized: "maximized", Fullscreen: "fullscreen" });
  inspectorBackend2.registerEvent("Target.attachedToTarget", ["sessionId", "targetInfo", "waitingForDebugger"]);
  inspectorBackend2.registerEvent("Target.detachedFromTarget", ["sessionId", "targetId"]);
  inspectorBackend2.registerEvent("Target.receivedMessageFromTarget", ["sessionId", "message", "targetId"]);
  inspectorBackend2.registerEvent("Target.targetCreated", ["targetInfo"]);
  inspectorBackend2.registerEvent("Target.targetDestroyed", ["targetId"]);
  inspectorBackend2.registerEvent("Target.targetCrashed", ["targetId", "status", "errorCode"]);
  inspectorBackend2.registerEvent("Target.targetInfoChanged", ["targetInfo"]);
  inspectorBackend2.registerCommand("Target.activateTarget", [{ "name": "targetId", "type": "string", "optional": false, "description": "", "typeRef": "Target.TargetID" }], [], "Activates (focuses) the target.");
  inspectorBackend2.registerCommand("Target.attachToTarget", [{ "name": "targetId", "type": "string", "optional": false, "description": "", "typeRef": "Target.TargetID" }, { "name": "flatten", "type": "boolean", "optional": true, "description": 'Enables \\"flat\\" access to the session via specifying sessionId attribute in the commands. We plan to make this the default, deprecate non-flattened mode, and eventually retire it. See crbug.com/991325.', "typeRef": null }], ["sessionId"], "Attaches to the target with given id.");
  inspectorBackend2.registerCommand("Target.attachToBrowserTarget", [], ["sessionId"], "Attaches to the browser target, only uses flat sessionId mode.");
  inspectorBackend2.registerCommand("Target.closeTarget", [{ "name": "targetId", "type": "string", "optional": false, "description": "", "typeRef": "Target.TargetID" }], ["success"], "Closes the target. If the target is a page that gets closed too.");
  inspectorBackend2.registerCommand("Target.exposeDevToolsProtocol", [{ "name": "targetId", "type": "string", "optional": false, "description": "", "typeRef": "Target.TargetID" }, { "name": "bindingName", "type": "string", "optional": true, "description": "Binding name, 'cdp' if not specified.", "typeRef": null }, { "name": "inheritPermissions", "type": "boolean", "optional": true, "description": "If true, inherits the current root session's permissions (default: false).", "typeRef": null }], [], "Inject object to the target's main frame that provides a communication channel with browser target.  Injected object will be available as `window[bindingName]`.  The object has the following API: - `binding.send(json)` - a method to send messages over the remote debugging protocol - `binding.onmessage = json => handleMessage(json)` - a callback that will be called for the protocol notifications and command responses.");
  inspectorBackend2.registerCommand("Target.createBrowserContext", [{ "name": "disposeOnDetach", "type": "boolean", "optional": true, "description": "If specified, disposes this context when debugging session disconnects.", "typeRef": null }, { "name": "proxyServer", "type": "string", "optional": true, "description": "Proxy server, similar to the one passed to --proxy-server", "typeRef": null }, { "name": "proxyBypassList", "type": "string", "optional": true, "description": "Proxy bypass list, similar to the one passed to --proxy-bypass-list", "typeRef": null }, { "name": "originsWithUniversalNetworkAccess", "type": "array", "optional": true, "description": "An optional list of origins to grant unlimited cross-origin access to. Parts of the URL other than those constituting origin are ignored.", "typeRef": "string" }], ["browserContextId"], "Creates a new empty BrowserContext. Similar to an incognito profile but you can have more than one.");
  inspectorBackend2.registerCommand("Target.getBrowserContexts", [], ["browserContextIds", "defaultBrowserContextId"], "Returns all browser contexts created with `Target.createBrowserContext` method.");
  inspectorBackend2.registerCommand("Target.createTarget", [{ "name": "url", "type": "string", "optional": false, "description": "The initial URL the page will be navigated to. An empty string indicates about:blank.", "typeRef": null }, { "name": "left", "type": "number", "optional": true, "description": "Frame left origin in DIP (requires newWindow to be true or headless shell).", "typeRef": null }, { "name": "top", "type": "number", "optional": true, "description": "Frame top origin in DIP (requires newWindow to be true or headless shell).", "typeRef": null }, { "name": "width", "type": "number", "optional": true, "description": "Frame width in DIP (requires newWindow to be true or headless shell).", "typeRef": null }, { "name": "height", "type": "number", "optional": true, "description": "Frame height in DIP (requires newWindow to be true or headless shell).", "typeRef": null }, { "name": "windowState", "type": "string", "optional": true, "description": "Frame window state (requires newWindow to be true or headless shell). Default is normal.", "typeRef": "Target.WindowState" }, { "name": "browserContextId", "type": "string", "optional": true, "description": "The browser context to create the page in.", "typeRef": "Browser.BrowserContextID" }, { "name": "enableBeginFrameControl", "type": "boolean", "optional": true, "description": "Whether BeginFrames for this target will be controlled via DevTools (headless shell only, not supported on MacOS yet, false by default).", "typeRef": null }, { "name": "newWindow", "type": "boolean", "optional": true, "description": "Whether to create a new Window or Tab (false by default, not supported by headless shell).", "typeRef": null }, { "name": "background", "type": "boolean", "optional": true, "description": "Whether to create the target in background or foreground (false by default, not supported by headless shell).", "typeRef": null }, { "name": "forTab", "type": "boolean", "optional": true, "description": 'Whether to create the target of type \\"tab\\".', "typeRef": null }, { "name": "hidden", "type": "boolean", "optional": true, "description": "Whether to create a hidden target. The hidden target is observable via protocol, but not present in the tab UI strip. Cannot be created with `forTab: true`, `newWindow: true` or `background: false`. The life-time of the tab is limited to the life-time of the session.", "typeRef": null }, { "name": "focus", "type": "boolean", "optional": true, "description": "If specified, the option is used to determine if the new target should be focused or not. By default, the focus behavior depends on the value of the background field. For example, background=false and focus=false will result in the target tab being opened but the browser window remain unchanged (if it was in the background, it will remain in the background) and background=false with focus=undefined will result in the window being focused. Using background: true and focus: true is not supported and will result in an error.", "typeRef": null }], ["targetId"], "Creates a new page.");
  inspectorBackend2.registerCommand("Target.detachFromTarget", [{ "name": "sessionId", "type": "string", "optional": true, "description": "Session to detach.", "typeRef": "Target.SessionID" }, { "name": "targetId", "type": "string", "optional": true, "description": "Deprecated.", "typeRef": "Target.TargetID" }], [], "Detaches session with given id.");
  inspectorBackend2.registerCommand("Target.disposeBrowserContext", [{ "name": "browserContextId", "type": "string", "optional": false, "description": "", "typeRef": "Browser.BrowserContextID" }], [], "Deletes a BrowserContext. All the belonging pages will be closed without calling their beforeunload hooks.");
  inspectorBackend2.registerCommand("Target.getTargetInfo", [{ "name": "targetId", "type": "string", "optional": true, "description": "", "typeRef": "Target.TargetID" }], ["targetInfo"], "Returns information about a target.");
  inspectorBackend2.registerCommand("Target.getTargets", [{ "name": "filter", "type": "array", "optional": true, "description": "Only targets matching filter will be reported. If filter is not specified and target discovery is currently enabled, a filter used for target discovery is used for consistency.", "typeRef": "Target.TargetFilter" }], ["targetInfos"], "Retrieves a list of available targets.");
  inspectorBackend2.registerCommand("Target.sendMessageToTarget", [{ "name": "message", "type": "string", "optional": false, "description": "", "typeRef": null }, { "name": "sessionId", "type": "string", "optional": true, "description": "Identifier of the session.", "typeRef": "Target.SessionID" }, { "name": "targetId", "type": "string", "optional": true, "description": "Deprecated.", "typeRef": "Target.TargetID" }], [], "Sends protocol message over session with given id. Consider using flat mode instead; see commands attachToTarget, setAutoAttach, and crbug.com/991325.");
  inspectorBackend2.registerCommand("Target.setAutoAttach", [{ "name": "autoAttach", "type": "boolean", "optional": false, "description": "Whether to auto-attach to related targets.", "typeRef": null }, { "name": "waitForDebuggerOnStart", "type": "boolean", "optional": false, "description": "Whether to pause new targets when attaching to them. Use `Runtime.runIfWaitingForDebugger` to run paused targets.", "typeRef": null }, { "name": "flatten", "type": "boolean", "optional": true, "description": 'Enables \\"flat\\" access to the session via specifying sessionId attribute in the commands. We plan to make this the default, deprecate non-flattened mode, and eventually retire it. See crbug.com/991325.', "typeRef": null }, { "name": "filter", "type": "array", "optional": true, "description": "Only targets matching filter will be attached.", "typeRef": "Target.TargetFilter" }], [], "Controls whether to automatically attach to new targets which are considered to be directly related to this one (for example, iframes or workers). When turned on, attaches to all existing related targets as well. When turned off, automatically detaches from all currently attached targets. This also clears all targets added by `autoAttachRelated` from the list of targets to watch for creation of related targets. You might want to call this recursively for auto-attached targets to attach to all available targets.");
  inspectorBackend2.registerCommand("Target.autoAttachRelated", [{ "name": "targetId", "type": "string", "optional": false, "description": "", "typeRef": "Target.TargetID" }, { "name": "waitForDebuggerOnStart", "type": "boolean", "optional": false, "description": "Whether to pause new targets when attaching to them. Use `Runtime.runIfWaitingForDebugger` to run paused targets.", "typeRef": null }, { "name": "filter", "type": "array", "optional": true, "description": "Only targets matching filter will be attached.", "typeRef": "Target.TargetFilter" }], [], "Adds the specified target to the list of targets that will be monitored for any related target creation (such as child frames, child workers and new versions of service worker) and reported through `attachedToTarget`. The specified target is also auto-attached. This cancels the effect of any previous `setAutoAttach` and is also cancelled by subsequent `setAutoAttach`. Only available at the Browser target.");
  inspectorBackend2.registerCommand("Target.setDiscoverTargets", [{ "name": "discover", "type": "boolean", "optional": false, "description": "Whether to discover available targets.", "typeRef": null }, { "name": "filter", "type": "array", "optional": true, "description": "Only targets matching filter will be attached. If `discover` is false, `filter` must be omitted or empty.", "typeRef": "Target.TargetFilter" }], [], "Controls whether to discover available targets and notify via `targetCreated/targetInfoChanged/targetDestroyed` events.");
  inspectorBackend2.registerCommand("Target.setRemoteLocations", [{ "name": "locations", "type": "array", "optional": false, "description": "List of remote locations.", "typeRef": "Target.RemoteLocation" }], [], "Enables target discovery for the specified locations, when `setDiscoverTargets` was set to `true`.");
  inspectorBackend2.registerCommand("Target.getDevToolsTarget", [{ "name": "targetId", "type": "string", "optional": false, "description": "Page or tab target ID.", "typeRef": "Target.TargetID" }], ["targetId"], "Gets the targetId of the DevTools page target opened for the given target (if any).");
  inspectorBackend2.registerCommand("Target.openDevTools", [{ "name": "targetId", "type": "string", "optional": false, "description": "This can be the page or tab target ID.", "typeRef": "Target.TargetID" }, { "name": "panelId", "type": "string", "optional": true, "description": "The id of the panel we want DevTools to open initially. Currently supported panels are elements, console, network, sources, resources and performance.", "typeRef": null }], ["targetId"], "Opens a DevTools window for the target.");
  inspectorBackend2.registerType("Target.TargetInfo", [{ "name": "targetId", "type": "string", "optional": false, "description": "", "typeRef": "Target.TargetID" }, { "name": "type", "type": "string", "optional": false, "description": "List of types: https://source.chromium.org/chromium/chromium/src/+/main:content/browser/devtools/devtools_agent_host_impl.cc?ss=chromium&q=f:devtools%20-f:out%20%22::kTypeTab%5B%5D%22", "typeRef": null }, { "name": "title", "type": "string", "optional": false, "description": "", "typeRef": null }, { "name": "url", "type": "string", "optional": false, "description": "", "typeRef": null }, { "name": "attached", "type": "boolean", "optional": false, "description": "Whether the target has an attached client.", "typeRef": null }, { "name": "openerId", "type": "string", "optional": true, "description": "Opener target Id", "typeRef": "Target.TargetID" }, { "name": "canAccessOpener", "type": "boolean", "optional": false, "description": "Whether the target has access to the originating window.", "typeRef": null }, { "name": "openerFrameId", "type": "string", "optional": true, "description": "Frame id of originating window (is only set if target has an opener).", "typeRef": "Page.FrameId" }, { "name": "parentFrameId", "type": "string", "optional": true, "description": 'Id of the parent frame, only present for the \\"iframe\\" targets.', "typeRef": "Page.FrameId" }, { "name": "browserContextId", "type": "string", "optional": true, "description": "", "typeRef": "Browser.BrowserContextID" }, { "name": "subtype", "type": "string", "optional": true, "description": 'Provides additional details for specific target types. For example, for the type of \\"page\\", this may be set to \\"prerender\\".', "typeRef": null }]);
  inspectorBackend2.registerType("Target.FilterEntry", [{ "name": "exclude", "type": "boolean", "optional": true, "description": "If set, causes exclusion of matching targets from the list.", "typeRef": null }, { "name": "type", "type": "string", "optional": true, "description": "If not present, matches any type.", "typeRef": null }]);
  inspectorBackend2.registerType("Target.TargetFilter", [{ "name": "TargetFilter", "type": "array", "optional": false, "description": 'The entries in TargetFilter are matched sequentially against targets and the first entry that matches determines if the target is included or not, depending on the value of `exclude` field in the entry. If filter is not specified, the one assumed is [{type: \\"browser\\", exclude: true}, {type: \\"tab\\", exclude: true}, {}] (i.e. include everything but `browser` and `tab`).', "typeRef": "Target.FilterEntry" }]);
  inspectorBackend2.registerType("Target.RemoteLocation", [{ "name": "host", "type": "string", "optional": false, "description": "", "typeRef": null }, { "name": "port", "type": "number", "optional": false, "description": "", "typeRef": null }]);
  inspectorBackend2.registerEvent("Tethering.accepted", ["port", "connectionId"]);
  inspectorBackend2.registerCommand("Tethering.bind", [{ "name": "port", "type": "number", "optional": false, "description": "Port number to bind.", "typeRef": null }], [], "Request browser port binding.");
  inspectorBackend2.registerCommand("Tethering.unbind", [{ "name": "port", "type": "number", "optional": false, "description": "Port number to unbind.", "typeRef": null }], [], "Request browser port unbinding.");
  inspectorBackend2.registerEnum("Tracing.TraceConfigRecordMode", { RecordUntilFull: "recordUntilFull", RecordContinuously: "recordContinuously", RecordAsMuchAsPossible: "recordAsMuchAsPossible", EchoToConsole: "echoToConsole" });
  inspectorBackend2.registerEnum("Tracing.StreamFormat", { Json: "json", Proto: "proto" });
  inspectorBackend2.registerEnum("Tracing.StreamCompression", { None: "none", Gzip: "gzip" });
  inspectorBackend2.registerEnum("Tracing.MemoryDumpLevelOfDetail", { Background: "background", Light: "light", Detailed: "detailed" });
  inspectorBackend2.registerEnum("Tracing.TracingBackend", { Auto: "auto", Chrome: "chrome", System: "system" });
  inspectorBackend2.registerEvent("Tracing.bufferUsage", ["percentFull", "eventCount", "value"]);
  inspectorBackend2.registerEvent("Tracing.dataCollected", ["value"]);
  inspectorBackend2.registerEvent("Tracing.tracingComplete", ["dataLossOccurred", "stream", "traceFormat", "streamCompression"]);
  inspectorBackend2.registerCommand("Tracing.end", [], [], "Stop trace events collection.");
  inspectorBackend2.registerCommand("Tracing.getCategories", [], ["categories"], "Gets supported tracing categories.");
  inspectorBackend2.registerCommand("Tracing.getTrackEventDescriptor", [], ["descriptor"], "Return a descriptor for all available tracing categories.");
  inspectorBackend2.registerCommand("Tracing.recordClockSyncMarker", [{ "name": "syncId", "type": "string", "optional": false, "description": "The ID of this clock sync marker", "typeRef": null }], [], "Record a clock sync marker in the trace.");
  inspectorBackend2.registerCommand("Tracing.requestMemoryDump", [{ "name": "deterministic", "type": "boolean", "optional": true, "description": "Enables more deterministic results by forcing garbage collection", "typeRef": null }, { "name": "levelOfDetail", "type": "string", "optional": true, "description": 'Specifies level of details in memory dump. Defaults to \\"detailed\\".', "typeRef": "Tracing.MemoryDumpLevelOfDetail" }], ["dumpGuid", "success"], "Request a global memory dump.");
  inspectorBackend2.registerEnum("Tracing.StartRequestTransferMode", { ReportEvents: "ReportEvents", ReturnAsStream: "ReturnAsStream" });
  inspectorBackend2.registerCommand("Tracing.start", [{ "name": "categories", "type": "string", "optional": true, "description": "Category/tag filter", "typeRef": null }, { "name": "options", "type": "string", "optional": true, "description": "Tracing options", "typeRef": null }, { "name": "bufferUsageReportingInterval", "type": "number", "optional": true, "description": "If set, the agent will issue bufferUsage events at this interval, specified in milliseconds", "typeRef": null }, { "name": "transferMode", "type": "string", "optional": true, "description": "Whether to report trace events as series of dataCollected events or to save trace to a stream (defaults to `ReportEvents`).", "typeRef": "Tracing.StartRequestTransferMode" }, { "name": "streamFormat", "type": "string", "optional": true, "description": "Trace data format to use. This only applies when using `ReturnAsStream` transfer mode (defaults to `json`).", "typeRef": "Tracing.StreamFormat" }, { "name": "streamCompression", "type": "string", "optional": true, "description": "Compression format to use. This only applies when using `ReturnAsStream` transfer mode (defaults to `none`)", "typeRef": "Tracing.StreamCompression" }, { "name": "traceConfig", "type": "object", "optional": true, "description": "", "typeRef": "Tracing.TraceConfig" }, { "name": "perfettoConfig", "type": "string", "optional": true, "description": "Base64-encoded serialized perfetto.protos.TraceConfig protobuf message When specified, the parameters `categories`, `options`, `traceConfig` are ignored.", "typeRef": null }, { "name": "tracingBackend", "type": "string", "optional": true, "description": "Backend type (defaults to `auto`)", "typeRef": "Tracing.TracingBackend" }], [], "Start trace events collection.");
  inspectorBackend2.registerType("Tracing.TraceConfig", [{ "name": "recordMode", "type": "string", "optional": true, "description": "Controls how the trace buffer stores data. The default is `recordUntilFull`.", "typeRef": null }, { "name": "traceBufferSizeInKb", "type": "number", "optional": true, "description": "Size of the trace buffer in kilobytes. If not specified or zero is passed, a default value of 200 MB would be used.", "typeRef": null }, { "name": "enableSampling", "type": "boolean", "optional": true, "description": "Turns on JavaScript stack sampling.", "typeRef": null }, { "name": "enableSystrace", "type": "boolean", "optional": true, "description": "Turns on system tracing.", "typeRef": null }, { "name": "enableArgumentFilter", "type": "boolean", "optional": true, "description": "Turns on argument filter.", "typeRef": null }, { "name": "includedCategories", "type": "array", "optional": true, "description": "Included category filters.", "typeRef": "string" }, { "name": "excludedCategories", "type": "array", "optional": true, "description": "Excluded category filters.", "typeRef": "string" }, { "name": "syntheticDelays", "type": "array", "optional": true, "description": "Configuration to synthesize the delays in tracing.", "typeRef": "string" }, { "name": "memoryDumpConfig", "type": "object", "optional": true, "description": 'Configuration for memory dump triggers. Used only when \\"memory-infra\\" category is enabled.', "typeRef": "Tracing.MemoryDumpConfig" }]);
  inspectorBackend2.registerEnum("WebAudio.ContextType", { Realtime: "realtime", Offline: "offline" });
  inspectorBackend2.registerEnum("WebAudio.ContextState", { Suspended: "suspended", Running: "running", Closed: "closed", Interrupted: "interrupted" });
  inspectorBackend2.registerEnum("WebAudio.ChannelCountMode", { ClampedMax: "clamped-max", Explicit: "explicit", Max: "max" });
  inspectorBackend2.registerEnum("WebAudio.ChannelInterpretation", { Discrete: "discrete", Speakers: "speakers" });
  inspectorBackend2.registerEnum("WebAudio.AutomationRate", { ARate: "a-rate", KRate: "k-rate" });
  inspectorBackend2.registerEvent("WebAudio.contextCreated", ["context"]);
  inspectorBackend2.registerEvent("WebAudio.contextWillBeDestroyed", ["contextId"]);
  inspectorBackend2.registerEvent("WebAudio.contextChanged", ["context"]);
  inspectorBackend2.registerEvent("WebAudio.audioListenerCreated", ["listener"]);
  inspectorBackend2.registerEvent("WebAudio.audioListenerWillBeDestroyed", ["contextId", "listenerId"]);
  inspectorBackend2.registerEvent("WebAudio.audioNodeCreated", ["node"]);
  inspectorBackend2.registerEvent("WebAudio.audioNodeWillBeDestroyed", ["contextId", "nodeId"]);
  inspectorBackend2.registerEvent("WebAudio.audioParamCreated", ["param"]);
  inspectorBackend2.registerEvent("WebAudio.audioParamWillBeDestroyed", ["contextId", "nodeId", "paramId"]);
  inspectorBackend2.registerEvent("WebAudio.nodesConnected", ["contextId", "sourceId", "destinationId", "sourceOutputIndex", "destinationInputIndex"]);
  inspectorBackend2.registerEvent("WebAudio.nodesDisconnected", ["contextId", "sourceId", "destinationId", "sourceOutputIndex", "destinationInputIndex"]);
  inspectorBackend2.registerEvent("WebAudio.nodeParamConnected", ["contextId", "sourceId", "destinationId", "sourceOutputIndex"]);
  inspectorBackend2.registerEvent("WebAudio.nodeParamDisconnected", ["contextId", "sourceId", "destinationId", "sourceOutputIndex"]);
  inspectorBackend2.registerCommand("WebAudio.enable", [], [], "Enables the WebAudio domain and starts sending context lifetime events.");
  inspectorBackend2.registerCommand("WebAudio.disable", [], [], "Disables the WebAudio domain.");
  inspectorBackend2.registerCommand("WebAudio.getRealtimeData", [{ "name": "contextId", "type": "string", "optional": false, "description": "", "typeRef": "WebAudio.GraphObjectId" }], ["realtimeData"], "Fetch the realtime data from the registered contexts.");
  inspectorBackend2.registerType("WebAudio.ContextRealtimeData", [{ "name": "currentTime", "type": "number", "optional": false, "description": "The current context time in second in BaseAudioContext.", "typeRef": null }, { "name": "renderCapacity", "type": "number", "optional": false, "description": "The time spent on rendering graph divided by render quantum duration, and multiplied by 100. 100 means the audio renderer reached the full capacity and glitch may occur.", "typeRef": null }, { "name": "callbackIntervalMean", "type": "number", "optional": false, "description": "A running mean of callback interval.", "typeRef": null }, { "name": "callbackIntervalVariance", "type": "number", "optional": false, "description": "A running variance of callback interval.", "typeRef": null }]);
  inspectorBackend2.registerType("WebAudio.BaseAudioContext", [{ "name": "contextId", "type": "string", "optional": false, "description": "", "typeRef": "WebAudio.GraphObjectId" }, { "name": "contextType", "type": "string", "optional": false, "description": "", "typeRef": "WebAudio.ContextType" }, { "name": "contextState", "type": "string", "optional": false, "description": "", "typeRef": "WebAudio.ContextState" }, { "name": "realtimeData", "type": "object", "optional": true, "description": "", "typeRef": "WebAudio.ContextRealtimeData" }, { "name": "callbackBufferSize", "type": "number", "optional": false, "description": "Platform-dependent callback buffer size.", "typeRef": null }, { "name": "maxOutputChannelCount", "type": "number", "optional": false, "description": "Number of output channels supported by audio hardware in use.", "typeRef": null }, { "name": "sampleRate", "type": "number", "optional": false, "description": "Context sample rate.", "typeRef": null }]);
  inspectorBackend2.registerType("WebAudio.AudioListener", [{ "name": "listenerId", "type": "string", "optional": false, "description": "", "typeRef": "WebAudio.GraphObjectId" }, { "name": "contextId", "type": "string", "optional": false, "description": "", "typeRef": "WebAudio.GraphObjectId" }]);
  inspectorBackend2.registerType("WebAudio.AudioNode", [{ "name": "nodeId", "type": "string", "optional": false, "description": "", "typeRef": "WebAudio.GraphObjectId" }, { "name": "contextId", "type": "string", "optional": false, "description": "", "typeRef": "WebAudio.GraphObjectId" }, { "name": "nodeType", "type": "string", "optional": false, "description": "", "typeRef": "WebAudio.NodeType" }, { "name": "numberOfInputs", "type": "number", "optional": false, "description": "", "typeRef": null }, { "name": "numberOfOutputs", "type": "number", "optional": false, "description": "", "typeRef": null }, { "name": "channelCount", "type": "number", "optional": false, "description": "", "typeRef": null }, { "name": "channelCountMode", "type": "string", "optional": false, "description": "", "typeRef": "WebAudio.ChannelCountMode" }, { "name": "channelInterpretation", "type": "string", "optional": false, "description": "", "typeRef": "WebAudio.ChannelInterpretation" }]);
  inspectorBackend2.registerType("WebAudio.AudioParam", [{ "name": "paramId", "type": "string", "optional": false, "description": "", "typeRef": "WebAudio.GraphObjectId" }, { "name": "nodeId", "type": "string", "optional": false, "description": "", "typeRef": "WebAudio.GraphObjectId" }, { "name": "contextId", "type": "string", "optional": false, "description": "", "typeRef": "WebAudio.GraphObjectId" }, { "name": "paramType", "type": "string", "optional": false, "description": "", "typeRef": "WebAudio.ParamType" }, { "name": "rate", "type": "string", "optional": false, "description": "", "typeRef": "WebAudio.AutomationRate" }, { "name": "defaultValue", "type": "number", "optional": false, "description": "", "typeRef": null }, { "name": "minValue", "type": "number", "optional": false, "description": "", "typeRef": null }, { "name": "maxValue", "type": "number", "optional": false, "description": "", "typeRef": null }]);
  inspectorBackend2.registerEnum("WebAuthn.AuthenticatorProtocol", { U2f: "u2f", Ctap2: "ctap2" });
  inspectorBackend2.registerEnum("WebAuthn.Ctap2Version", { Ctap2_0: "ctap2_0", Ctap2_1: "ctap2_1" });
  inspectorBackend2.registerEnum("WebAuthn.AuthenticatorTransport", { Usb: "usb", Nfc: "nfc", Ble: "ble", Cable: "cable", Internal: "internal" });
  inspectorBackend2.registerEvent("WebAuthn.credentialAdded", ["authenticatorId", "credential"]);
  inspectorBackend2.registerEvent("WebAuthn.credentialDeleted", ["authenticatorId", "credentialId"]);
  inspectorBackend2.registerEvent("WebAuthn.credentialUpdated", ["authenticatorId", "credential"]);
  inspectorBackend2.registerEvent("WebAuthn.credentialAsserted", ["authenticatorId", "credential"]);
  inspectorBackend2.registerCommand("WebAuthn.enable", [{ "name": "enableUI", "type": "boolean", "optional": true, "description": "Whether to enable the WebAuthn user interface. Enabling the UI is recommended for debugging and demo purposes, as it is closer to the real experience. Disabling the UI is recommended for automated testing. Supported at the embedder's discretion if UI is available. Defaults to false.", "typeRef": null }], [], "Enable the WebAuthn domain and start intercepting credential storage and retrieval with a virtual authenticator.");
  inspectorBackend2.registerCommand("WebAuthn.disable", [], [], "Disable the WebAuthn domain.");
  inspectorBackend2.registerCommand("WebAuthn.addVirtualAuthenticator", [{ "name": "options", "type": "object", "optional": false, "description": "", "typeRef": "WebAuthn.VirtualAuthenticatorOptions" }], ["authenticatorId"], "Creates and adds a virtual authenticator.");
  inspectorBackend2.registerCommand("WebAuthn.setResponseOverrideBits", [{ "name": "authenticatorId", "type": "string", "optional": false, "description": "", "typeRef": "WebAuthn.AuthenticatorId" }, { "name": "isBogusSignature", "type": "boolean", "optional": true, "description": "If isBogusSignature is set, overrides the signature in the authenticator response to be zero. Defaults to false.", "typeRef": null }, { "name": "isBadUV", "type": "boolean", "optional": true, "description": "If isBadUV is set, overrides the UV bit in the flags in the authenticator response to be zero. Defaults to false.", "typeRef": null }, { "name": "isBadUP", "type": "boolean", "optional": true, "description": "If isBadUP is set, overrides the UP bit in the flags in the authenticator response to be zero. Defaults to false.", "typeRef": null }], [], "Resets parameters isBogusSignature, isBadUV, isBadUP to false if they are not present.");
  inspectorBackend2.registerCommand("WebAuthn.removeVirtualAuthenticator", [{ "name": "authenticatorId", "type": "string", "optional": false, "description": "", "typeRef": "WebAuthn.AuthenticatorId" }], [], "Removes the given authenticator.");
  inspectorBackend2.registerCommand("WebAuthn.addCredential", [{ "name": "authenticatorId", "type": "string", "optional": false, "description": "", "typeRef": "WebAuthn.AuthenticatorId" }, { "name": "credential", "type": "object", "optional": false, "description": "", "typeRef": "WebAuthn.Credential" }], [], "Adds the credential to the specified authenticator.");
  inspectorBackend2.registerCommand("WebAuthn.getCredential", [{ "name": "authenticatorId", "type": "string", "optional": false, "description": "", "typeRef": "WebAuthn.AuthenticatorId" }, { "name": "credentialId", "type": "string", "optional": false, "description": "", "typeRef": null }], ["credential"], "Returns a single credential stored in the given virtual authenticator that matches the credential ID.");
  inspectorBackend2.registerCommand("WebAuthn.getCredentials", [{ "name": "authenticatorId", "type": "string", "optional": false, "description": "", "typeRef": "WebAuthn.AuthenticatorId" }], ["credentials"], "Returns all the credentials stored in the given virtual authenticator.");
  inspectorBackend2.registerCommand("WebAuthn.removeCredential", [{ "name": "authenticatorId", "type": "string", "optional": false, "description": "", "typeRef": "WebAuthn.AuthenticatorId" }, { "name": "credentialId", "type": "string", "optional": false, "description": "", "typeRef": null }], [], "Removes a credential from the authenticator.");
  inspectorBackend2.registerCommand("WebAuthn.clearCredentials", [{ "name": "authenticatorId", "type": "string", "optional": false, "description": "", "typeRef": "WebAuthn.AuthenticatorId" }], [], "Clears all the credentials from the specified device.");
  inspectorBackend2.registerCommand("WebAuthn.setUserVerified", [{ "name": "authenticatorId", "type": "string", "optional": false, "description": "", "typeRef": "WebAuthn.AuthenticatorId" }, { "name": "isUserVerified", "type": "boolean", "optional": false, "description": "", "typeRef": null }], [], "Sets whether User Verification succeeds or fails for an authenticator. The default is true.");
  inspectorBackend2.registerCommand("WebAuthn.setAutomaticPresenceSimulation", [{ "name": "authenticatorId", "type": "string", "optional": false, "description": "", "typeRef": "WebAuthn.AuthenticatorId" }, { "name": "enabled", "type": "boolean", "optional": false, "description": "", "typeRef": null }], [], "Sets whether tests of user presence will succeed immediately (if true) or fail to resolve (if false) for an authenticator. The default is true.");
  inspectorBackend2.registerCommand("WebAuthn.setCredentialProperties", [{ "name": "authenticatorId", "type": "string", "optional": false, "description": "", "typeRef": "WebAuthn.AuthenticatorId" }, { "name": "credentialId", "type": "string", "optional": false, "description": "", "typeRef": null }, { "name": "backupEligibility", "type": "boolean", "optional": true, "description": "", "typeRef": null }, { "name": "backupState", "type": "boolean", "optional": true, "description": "", "typeRef": null }], [], "Allows setting credential properties. https://w3c.github.io/webauthn/#sctn-automation-set-credential-properties");
  inspectorBackend2.registerType("WebAuthn.VirtualAuthenticatorOptions", [{ "name": "protocol", "type": "string", "optional": false, "description": "", "typeRef": "WebAuthn.AuthenticatorProtocol" }, { "name": "ctap2Version", "type": "string", "optional": true, "description": "Defaults to ctap2_0. Ignored if |protocol| == u2f.", "typeRef": "WebAuthn.Ctap2Version" }, { "name": "transport", "type": "string", "optional": false, "description": "", "typeRef": "WebAuthn.AuthenticatorTransport" }, { "name": "hasResidentKey", "type": "boolean", "optional": true, "description": "Defaults to false.", "typeRef": null }, { "name": "hasUserVerification", "type": "boolean", "optional": true, "description": "Defaults to false.", "typeRef": null }, { "name": "hasLargeBlob", "type": "boolean", "optional": true, "description": "If set to true, the authenticator will support the largeBlob extension. https://w3c.github.io/webauthn#largeBlob Defaults to false.", "typeRef": null }, { "name": "hasCredBlob", "type": "boolean", "optional": true, "description": "If set to true, the authenticator will support the credBlob extension. https://fidoalliance.org/specs/fido-v2.1-rd-20201208/fido-client-to-authenticator-protocol-v2.1-rd-20201208.html#sctn-credBlob-extension Defaults to false.", "typeRef": null }, { "name": "hasMinPinLength", "type": "boolean", "optional": true, "description": "If set to true, the authenticator will support the minPinLength extension. https://fidoalliance.org/specs/fido-v2.1-ps-20210615/fido-client-to-authenticator-protocol-v2.1-ps-20210615.html#sctn-minpinlength-extension Defaults to false.", "typeRef": null }, { "name": "hasPrf", "type": "boolean", "optional": true, "description": "If set to true, the authenticator will support the prf extension. https://w3c.github.io/webauthn/#prf-extension Defaults to false.", "typeRef": null }, { "name": "automaticPresenceSimulation", "type": "boolean", "optional": true, "description": "If set to true, tests of user presence will succeed immediately. Otherwise, they will not be resolved. Defaults to true.", "typeRef": null }, { "name": "isUserVerified", "type": "boolean", "optional": true, "description": "Sets whether User Verification succeeds or fails for an authenticator. Defaults to false.", "typeRef": null }, { "name": "defaultBackupEligibility", "type": "boolean", "optional": true, "description": "Credentials created by this authenticator will have the backup eligibility (BE) flag set to this value. Defaults to false. https://w3c.github.io/webauthn/#sctn-credential-backup", "typeRef": null }, { "name": "defaultBackupState", "type": "boolean", "optional": true, "description": "Credentials created by this authenticator will have the backup state (BS) flag set to this value. Defaults to false. https://w3c.github.io/webauthn/#sctn-credential-backup", "typeRef": null }]);
  inspectorBackend2.registerType("WebAuthn.Credential", [{ "name": "credentialId", "type": "string", "optional": false, "description": "", "typeRef": null }, { "name": "isResidentCredential", "type": "boolean", "optional": false, "description": "", "typeRef": null }, { "name": "rpId", "type": "string", "optional": true, "description": "Relying Party ID the credential is scoped to. Must be set when adding a credential.", "typeRef": null }, { "name": "privateKey", "type": "string", "optional": false, "description": "The ECDSA P-256 private key in PKCS#8 format.", "typeRef": null }, { "name": "userHandle", "type": "string", "optional": true, "description": "An opaque byte sequence with a maximum size of 64 bytes mapping the credential to a specific user.", "typeRef": null }, { "name": "signCount", "type": "number", "optional": false, "description": "Signature counter. This is incremented by one for each successful assertion. See https://w3c.github.io/webauthn/#signature-counter", "typeRef": null }, { "name": "largeBlob", "type": "string", "optional": true, "description": "The large blob associated with the credential. See https://w3c.github.io/webauthn/#sctn-large-blob-extension", "typeRef": null }, { "name": "backupEligibility", "type": "boolean", "optional": true, "description": "Assertions returned by this credential will have the backup eligibility (BE) flag set to this value. Defaults to the authenticator's defaultBackupEligibility value.", "typeRef": null }, { "name": "backupState", "type": "boolean", "optional": true, "description": "Assertions returned by this credential will have the backup state (BS) flag set to this value. Defaults to the authenticator's defaultBackupState value.", "typeRef": null }, { "name": "userName", "type": "string", "optional": true, "description": "The credential's user.name property. Equivalent to empty if not set. https://w3c.github.io/webauthn/#dom-publickeycredentialentity-name", "typeRef": null }, { "name": "userDisplayName", "type": "string", "optional": true, "description": "The credential's user.displayName property. Equivalent to empty if not set. https://w3c.github.io/webauthn/#dom-publickeycredentialuserentity-displayname", "typeRef": null }]);
  inspectorBackend2.registerEnum("Debugger.ScopeType", { Global: "global", Local: "local", With: "with", Closure: "closure", Catch: "catch", Block: "block", Script: "script", Eval: "eval", Module: "module", WasmExpressionStack: "wasm-expression-stack" });
  inspectorBackend2.registerEnum("Debugger.BreakLocationType", { DebuggerStatement: "debuggerStatement", Call: "call", Return: "return" });
  inspectorBackend2.registerEnum("Debugger.ScriptLanguage", { JavaScript: "JavaScript", WebAssembly: "WebAssembly" });
  inspectorBackend2.registerEnum("Debugger.DebugSymbolsType", { SourceMap: "SourceMap", EmbeddedDWARF: "EmbeddedDWARF", ExternalDWARF: "ExternalDWARF" });
  inspectorBackend2.registerEvent("Debugger.breakpointResolved", ["breakpointId", "location"]);
  inspectorBackend2.registerEnum("Debugger.PausedEventReason", { Ambiguous: "ambiguous", Assert: "assert", CSPViolation: "CSPViolation", DebugCommand: "debugCommand", DOM: "DOM", EventListener: "EventListener", Exception: "exception", Instrumentation: "instrumentation", OOM: "OOM", Other: "other", PromiseRejection: "promiseRejection", XHR: "XHR", Step: "step" });
  inspectorBackend2.registerEvent("Debugger.paused", ["callFrames", "reason", "data", "hitBreakpoints", "asyncStackTrace", "asyncStackTraceId", "asyncCallStackTraceId"]);
  inspectorBackend2.registerEvent("Debugger.resumed", []);
  inspectorBackend2.registerEvent("Debugger.scriptFailedToParse", ["scriptId", "url", "startLine", "startColumn", "endLine", "endColumn", "executionContextId", "hash", "buildId", "executionContextAuxData", "sourceMapURL", "hasSourceURL", "isModule", "length", "stackTrace", "codeOffset", "scriptLanguage", "embedderName"]);
  inspectorBackend2.registerEvent("Debugger.scriptParsed", ["scriptId", "url", "startLine", "startColumn", "endLine", "endColumn", "executionContextId", "hash", "buildId", "executionContextAuxData", "isLiveEdit", "sourceMapURL", "hasSourceURL", "isModule", "length", "stackTrace", "codeOffset", "scriptLanguage", "debugSymbols", "embedderName", "resolvedBreakpoints"]);
  inspectorBackend2.registerEnum("Debugger.ContinueToLocationRequestTargetCallFrames", { Any: "any", Current: "current" });
  inspectorBackend2.registerCommand("Debugger.continueToLocation", [{ "name": "location", "type": "object", "optional": false, "description": "Location to continue to.", "typeRef": "Debugger.Location" }, { "name": "targetCallFrames", "type": "string", "optional": true, "description": "", "typeRef": "Debugger.ContinueToLocationRequestTargetCallFrames" }], [], "Continues execution until specific location is reached.");
  inspectorBackend2.registerCommand("Debugger.disable", [], [], "Disables debugger for given page.");
  inspectorBackend2.registerCommand("Debugger.enable", [{ "name": "maxScriptsCacheSize", "type": "number", "optional": true, "description": "The maximum size in bytes of collected scripts (not referenced by other heap objects) the debugger can hold. Puts no limit if parameter is omitted.", "typeRef": null }], ["debuggerId"], "Enables debugger for the given page. Clients should not assume that the debugging has been enabled until the result for this command is received.");
  inspectorBackend2.registerCommand("Debugger.evaluateOnCallFrame", [{ "name": "callFrameId", "type": "string", "optional": false, "description": "Call frame identifier to evaluate on.", "typeRef": "Debugger.CallFrameId" }, { "name": "expression", "type": "string", "optional": false, "description": "Expression to evaluate.", "typeRef": null }, { "name": "objectGroup", "type": "string", "optional": true, "description": "String object group name to put result into (allows rapid releasing resulting object handles using `releaseObjectGroup`).", "typeRef": null }, { "name": "includeCommandLineAPI", "type": "boolean", "optional": true, "description": "Specifies whether command line API should be available to the evaluated expression, defaults to false.", "typeRef": null }, { "name": "silent", "type": "boolean", "optional": true, "description": "In silent mode exceptions thrown during evaluation are not reported and do not pause execution. Overrides `setPauseOnException` state.", "typeRef": null }, { "name": "returnByValue", "type": "boolean", "optional": true, "description": "Whether the result is expected to be a JSON object that should be sent by value.", "typeRef": null }, { "name": "generatePreview", "type": "boolean", "optional": true, "description": "Whether preview should be generated for the result.", "typeRef": null }, { "name": "throwOnSideEffect", "type": "boolean", "optional": true, "description": "Whether to throw an exception if side effect cannot be ruled out during evaluation.", "typeRef": null }, { "name": "timeout", "type": "number", "optional": true, "description": "Terminate execution after timing out (number of milliseconds).", "typeRef": "Runtime.TimeDelta" }], ["result", "exceptionDetails"], "Evaluates expression on a given call frame.");
  inspectorBackend2.registerCommand("Debugger.getPossibleBreakpoints", [{ "name": "start", "type": "object", "optional": false, "description": "Start of range to search possible breakpoint locations in.", "typeRef": "Debugger.Location" }, { "name": "end", "type": "object", "optional": true, "description": "End of range to search possible breakpoint locations in (excluding). When not specified, end of scripts is used as end of range.", "typeRef": "Debugger.Location" }, { "name": "restrictToFunction", "type": "boolean", "optional": true, "description": "Only consider locations which are in the same (non-nested) function as start.", "typeRef": null }], ["locations"], "Returns possible locations for breakpoint. scriptId in start and end range locations should be the same.");
  inspectorBackend2.registerCommand("Debugger.getScriptSource", [{ "name": "scriptId", "type": "string", "optional": false, "description": "Id of the script to get source for.", "typeRef": "Runtime.ScriptId" }], ["scriptSource", "bytecode"], "Returns source for the script with given id.");
  inspectorBackend2.registerCommand("Debugger.disassembleWasmModule", [{ "name": "scriptId", "type": "string", "optional": false, "description": "Id of the script to disassemble", "typeRef": "Runtime.ScriptId" }], ["streamId", "totalNumberOfLines", "functionBodyOffsets", "chunk"], "");
  inspectorBackend2.registerCommand("Debugger.nextWasmDisassemblyChunk", [{ "name": "streamId", "type": "string", "optional": false, "description": "", "typeRef": null }], ["chunk"], "Disassemble the next chunk of lines for the module corresponding to the stream. If disassembly is complete, this API will invalidate the streamId and return an empty chunk. Any subsequent calls for the now invalid stream will return errors.");
  inspectorBackend2.registerCommand("Debugger.getWasmBytecode", [{ "name": "scriptId", "type": "string", "optional": false, "description": "Id of the Wasm script to get source for.", "typeRef": "Runtime.ScriptId" }], ["bytecode"], "This command is deprecated. Use getScriptSource instead.");
  inspectorBackend2.registerCommand("Debugger.getStackTrace", [{ "name": "stackTraceId", "type": "object", "optional": false, "description": "", "typeRef": "Runtime.StackTraceId" }], ["stackTrace"], "Returns stack trace with given `stackTraceId`.");
  inspectorBackend2.registerCommand("Debugger.pause", [], [], "Stops on the next JavaScript statement.");
  inspectorBackend2.registerCommand("Debugger.pauseOnAsyncCall", [{ "name": "parentStackTraceId", "type": "object", "optional": false, "description": "Debugger will pause when async call with given stack trace is started.", "typeRef": "Runtime.StackTraceId" }], [], "");
  inspectorBackend2.registerCommand("Debugger.removeBreakpoint", [{ "name": "breakpointId", "type": "string", "optional": false, "description": "", "typeRef": "Debugger.BreakpointId" }], [], "Removes JavaScript breakpoint.");
  inspectorBackend2.registerEnum("Debugger.RestartFrameRequestMode", { StepInto: "StepInto" });
  inspectorBackend2.registerCommand("Debugger.restartFrame", [{ "name": "callFrameId", "type": "string", "optional": false, "description": "Call frame identifier to evaluate on.", "typeRef": "Debugger.CallFrameId" }, { "name": "mode", "type": "string", "optional": true, "description": "The `mode` parameter must be present and set to 'StepInto', otherwise `restartFrame` will error out.", "typeRef": "Debugger.RestartFrameRequestMode" }], ["callFrames", "asyncStackTrace", "asyncStackTraceId"], "Restarts particular call frame from the beginning. The old, deprecated behavior of `restartFrame` is to stay paused and allow further CDP commands after a restart was scheduled. This can cause problems with restarting, so we now continue execution immediatly after it has been scheduled until we reach the beginning of the restarted frame.  To stay back-wards compatible, `restartFrame` now expects a `mode` parameter to be present. If the `mode` parameter is missing, `restartFrame` errors out.  The various return values are deprecated and `callFrames` is always empty. Use the call frames from the `Debugger#paused` events instead, that fires once V8 pauses at the beginning of the restarted function.");
  inspectorBackend2.registerCommand("Debugger.resume", [{ "name": "terminateOnResume", "type": "boolean", "optional": true, "description": "Set to true to terminate execution upon resuming execution. In contrast to Runtime.terminateExecution, this will allows to execute further JavaScript (i.e. via evaluation) until execution of the paused code is actually resumed, at which point termination is triggered. If execution is currently not paused, this parameter has no effect.", "typeRef": null }], [], "Resumes JavaScript execution.");
  inspectorBackend2.registerCommand("Debugger.searchInContent", [{ "name": "scriptId", "type": "string", "optional": false, "description": "Id of the script to search in.", "typeRef": "Runtime.ScriptId" }, { "name": "query", "type": "string", "optional": false, "description": "String to search for.", "typeRef": null }, { "name": "caseSensitive", "type": "boolean", "optional": true, "description": "If true, search is case sensitive.", "typeRef": null }, { "name": "isRegex", "type": "boolean", "optional": true, "description": "If true, treats string parameter as regex.", "typeRef": null }], ["result"], "Searches for given string in script content.");
  inspectorBackend2.registerCommand("Debugger.setAsyncCallStackDepth", [{ "name": "maxDepth", "type": "number", "optional": false, "description": "Maximum depth of async call stacks. Setting to `0` will effectively disable collecting async call stacks (default).", "typeRef": null }], [], "Enables or disables async call stacks tracking.");
  inspectorBackend2.registerCommand("Debugger.setBlackboxExecutionContexts", [{ "name": "uniqueIds", "type": "array", "optional": false, "description": "Array of execution context unique ids for the debugger to ignore.", "typeRef": "string" }], [], "Replace previous blackbox execution contexts with passed ones. Forces backend to skip stepping/pausing in scripts in these execution contexts. VM will try to leave blackboxed script by performing 'step in' several times, finally resorting to 'step out' if unsuccessful.");
  inspectorBackend2.registerCommand("Debugger.setBlackboxPatterns", [{ "name": "patterns", "type": "array", "optional": false, "description": "Array of regexps that will be used to check script url for blackbox state.", "typeRef": "string" }, { "name": "skipAnonymous", "type": "boolean", "optional": true, "description": "If true, also ignore scripts with no source url.", "typeRef": null }], [], "Replace previous blackbox patterns with passed ones. Forces backend to skip stepping/pausing in scripts with url matching one of the patterns. VM will try to leave blackboxed script by performing 'step in' several times, finally resorting to 'step out' if unsuccessful.");
  inspectorBackend2.registerCommand("Debugger.setBlackboxedRanges", [{ "name": "scriptId", "type": "string", "optional": false, "description": "Id of the script.", "typeRef": "Runtime.ScriptId" }, { "name": "positions", "type": "array", "optional": false, "description": "", "typeRef": "Debugger.ScriptPosition" }], [], "Makes backend skip steps in the script in blackboxed ranges. VM will try leave blacklisted scripts by performing 'step in' several times, finally resorting to 'step out' if unsuccessful. Positions array contains positions where blackbox state is changed. First interval isn't blackboxed. Array should be sorted.");
  inspectorBackend2.registerCommand("Debugger.setBreakpoint", [{ "name": "location", "type": "object", "optional": false, "description": "Location to set breakpoint in.", "typeRef": "Debugger.Location" }, { "name": "condition", "type": "string", "optional": true, "description": "Expression to use as a breakpoint condition. When specified, debugger will only stop on the breakpoint if this expression evaluates to true.", "typeRef": null }], ["breakpointId", "actualLocation"], "Sets JavaScript breakpoint at a given location.");
  inspectorBackend2.registerEnum("Debugger.SetInstrumentationBreakpointRequestInstrumentation", { BeforeScriptExecution: "beforeScriptExecution", BeforeScriptWithSourceMapExecution: "beforeScriptWithSourceMapExecution" });
  inspectorBackend2.registerCommand("Debugger.setInstrumentationBreakpoint", [{ "name": "instrumentation", "type": "string", "optional": false, "description": "Instrumentation name.", "typeRef": "Debugger.SetInstrumentationBreakpointRequestInstrumentation" }], ["breakpointId"], "Sets instrumentation breakpoint.");
  inspectorBackend2.registerCommand("Debugger.setBreakpointByUrl", [{ "name": "lineNumber", "type": "number", "optional": false, "description": "Line number to set breakpoint at.", "typeRef": null }, { "name": "url", "type": "string", "optional": true, "description": "URL of the resources to set breakpoint on.", "typeRef": null }, { "name": "urlRegex", "type": "string", "optional": true, "description": "Regex pattern for the URLs of the resources to set breakpoints on. Either `url` or `urlRegex` must be specified.", "typeRef": null }, { "name": "scriptHash", "type": "string", "optional": true, "description": "Script hash of the resources to set breakpoint on.", "typeRef": null }, { "name": "columnNumber", "type": "number", "optional": true, "description": "Offset in the line to set breakpoint at.", "typeRef": null }, { "name": "condition", "type": "string", "optional": true, "description": "Expression to use as a breakpoint condition. When specified, debugger will only stop on the breakpoint if this expression evaluates to true.", "typeRef": null }], ["breakpointId", "locations"], "Sets JavaScript breakpoint at given location specified either by URL or URL regex. Once this command is issued, all existing parsed scripts will have breakpoints resolved and returned in `locations` property. Further matching script parsing will result in subsequent `breakpointResolved` events issued. This logical breakpoint will survive page reloads.");
  inspectorBackend2.registerCommand("Debugger.setBreakpointOnFunctionCall", [{ "name": "objectId", "type": "string", "optional": false, "description": "Function object id.", "typeRef": "Runtime.RemoteObjectId" }, { "name": "condition", "type": "string", "optional": true, "description": "Expression to use as a breakpoint condition. When specified, debugger will stop on the breakpoint if this expression evaluates to true.", "typeRef": null }], ["breakpointId"], "Sets JavaScript breakpoint before each call to the given function. If another function was created from the same source as a given one, calling it will also trigger the breakpoint.");
  inspectorBackend2.registerCommand("Debugger.setBreakpointsActive", [{ "name": "active", "type": "boolean", "optional": false, "description": "New value for breakpoints active state.", "typeRef": null }], [], "Activates / deactivates all breakpoints on the page.");
  inspectorBackend2.registerEnum("Debugger.SetPauseOnExceptionsRequestState", { None: "none", Caught: "caught", Uncaught: "uncaught", All: "all" });
  inspectorBackend2.registerCommand("Debugger.setPauseOnExceptions", [{ "name": "state", "type": "string", "optional": false, "description": "Pause on exceptions mode.", "typeRef": "Debugger.SetPauseOnExceptionsRequestState" }], [], "Defines pause on exceptions state. Can be set to stop on all exceptions, uncaught exceptions, or caught exceptions, no exceptions. Initial pause on exceptions state is `none`.");
  inspectorBackend2.registerCommand("Debugger.setReturnValue", [{ "name": "newValue", "type": "object", "optional": false, "description": "New return value.", "typeRef": "Runtime.CallArgument" }], [], "Changes return value in top frame. Available only at return break position.");
  inspectorBackend2.registerCommand("Debugger.setScriptSource", [{ "name": "scriptId", "type": "string", "optional": false, "description": "Id of the script to edit.", "typeRef": "Runtime.ScriptId" }, { "name": "scriptSource", "type": "string", "optional": false, "description": "New content of the script.", "typeRef": null }, { "name": "dryRun", "type": "boolean", "optional": true, "description": "If true the change will not actually be applied. Dry run may be used to get result description without actually modifying the code.", "typeRef": null }, { "name": "allowTopFrameEditing", "type": "boolean", "optional": true, "description": "If true, then `scriptSource` is allowed to change the function on top of the stack as long as the top-most stack frame is the only activation of that function.", "typeRef": null }], ["callFrames", "stackChanged", "asyncStackTrace", "asyncStackTraceId", "status", "exceptionDetails"], "Edits JavaScript source live.  In general, functions that are currently on the stack can not be edited with a single exception: If the edited function is the top-most stack frame and that is the only activation of that function on the stack. In this case the live edit will be successful and a `Debugger.restartFrame` for the top-most function is automatically triggered.");
  inspectorBackend2.registerCommand("Debugger.setSkipAllPauses", [{ "name": "skip", "type": "boolean", "optional": false, "description": "New value for skip pauses state.", "typeRef": null }], [], "Makes page not interrupt on any pauses (breakpoint, exception, dom exception etc).");
  inspectorBackend2.registerCommand("Debugger.setVariableValue", [{ "name": "scopeNumber", "type": "number", "optional": false, "description": "0-based number of scope as was listed in scope chain. Only 'local', 'closure' and 'catch' scope types are allowed. Other scopes could be manipulated manually.", "typeRef": null }, { "name": "variableName", "type": "string", "optional": false, "description": "Variable name.", "typeRef": null }, { "name": "newValue", "type": "object", "optional": false, "description": "New variable value.", "typeRef": "Runtime.CallArgument" }, { "name": "callFrameId", "type": "string", "optional": false, "description": "Id of callframe that holds variable.", "typeRef": "Debugger.CallFrameId" }], [], "Changes value of variable in a callframe. Object-based scopes are not supported and must be mutated manually.");
  inspectorBackend2.registerCommand("Debugger.stepInto", [{ "name": "breakOnAsyncCall", "type": "boolean", "optional": true, "description": "Debugger will pause on the execution of the first async task which was scheduled before next pause.", "typeRef": null }, { "name": "skipList", "type": "array", "optional": true, "description": "The skipList specifies location ranges that should be skipped on step into.", "typeRef": "Debugger.LocationRange" }], [], "Steps into the function call.");
  inspectorBackend2.registerCommand("Debugger.stepOut", [], [], "Steps out of the function call.");
  inspectorBackend2.registerCommand("Debugger.stepOver", [{ "name": "skipList", "type": "array", "optional": true, "description": "The skipList specifies location ranges that should be skipped on step over.", "typeRef": "Debugger.LocationRange" }], [], "Steps over the statement.");
  inspectorBackend2.registerType("Debugger.Location", [{ "name": "scriptId", "type": "string", "optional": false, "description": "Script identifier as reported in the `Debugger.scriptParsed`.", "typeRef": "Runtime.ScriptId" }, { "name": "lineNumber", "type": "number", "optional": false, "description": "Line number in the script (0-based).", "typeRef": null }, { "name": "columnNumber", "type": "number", "optional": true, "description": "Column number in the script (0-based).", "typeRef": null }]);
  inspectorBackend2.registerType("Debugger.ScriptPosition", [{ "name": "lineNumber", "type": "number", "optional": false, "description": "", "typeRef": null }, { "name": "columnNumber", "type": "number", "optional": false, "description": "", "typeRef": null }]);
  inspectorBackend2.registerType("Debugger.LocationRange", [{ "name": "scriptId", "type": "string", "optional": false, "description": "", "typeRef": "Runtime.ScriptId" }, { "name": "start", "type": "object", "optional": false, "description": "", "typeRef": "Debugger.ScriptPosition" }, { "name": "end", "type": "object", "optional": false, "description": "", "typeRef": "Debugger.ScriptPosition" }]);
  inspectorBackend2.registerType("Debugger.CallFrame", [{ "name": "callFrameId", "type": "string", "optional": false, "description": "Call frame identifier. This identifier is only valid while the virtual machine is paused.", "typeRef": "Debugger.CallFrameId" }, { "name": "functionName", "type": "string", "optional": false, "description": "Name of the JavaScript function called on this call frame.", "typeRef": null }, { "name": "functionLocation", "type": "object", "optional": true, "description": "Location in the source code.", "typeRef": "Debugger.Location" }, { "name": "location", "type": "object", "optional": false, "description": "Location in the source code.", "typeRef": "Debugger.Location" }, { "name": "url", "type": "string", "optional": false, "description": "JavaScript script name or url. Deprecated in favor of using the `location.scriptId` to resolve the URL via a previously sent `Debugger.scriptParsed` event.", "typeRef": null }, { "name": "scopeChain", "type": "array", "optional": false, "description": "Scope chain for this call frame.", "typeRef": "Debugger.Scope" }, { "name": "this", "type": "object", "optional": false, "description": "`this` object for this call frame.", "typeRef": "Runtime.RemoteObject" }, { "name": "returnValue", "type": "object", "optional": true, "description": "The value being returned, if the function is at return point.", "typeRef": "Runtime.RemoteObject" }, { "name": "canBeRestarted", "type": "boolean", "optional": true, "description": "Valid only while the VM is paused and indicates whether this frame can be restarted or not. Note that a `true` value here does not guarantee that Debugger#restartFrame with this CallFrameId will be successful, but it is very likely.", "typeRef": null }]);
  inspectorBackend2.registerType("Debugger.Scope", [{ "name": "type", "type": "string", "optional": false, "description": "Scope type.", "typeRef": null }, { "name": "object", "type": "object", "optional": false, "description": "Object representing the scope. For `global` and `with` scopes it represents the actual object; for the rest of the scopes, it is artificial transient object enumerating scope variables as its properties.", "typeRef": "Runtime.RemoteObject" }, { "name": "name", "type": "string", "optional": true, "description": "", "typeRef": null }, { "name": "startLocation", "type": "object", "optional": true, "description": "Location in the source code where scope starts", "typeRef": "Debugger.Location" }, { "name": "endLocation", "type": "object", "optional": true, "description": "Location in the source code where scope ends", "typeRef": "Debugger.Location" }]);
  inspectorBackend2.registerType("Debugger.SearchMatch", [{ "name": "lineNumber", "type": "number", "optional": false, "description": "Line number in resource content.", "typeRef": null }, { "name": "lineContent", "type": "string", "optional": false, "description": "Line with match content.", "typeRef": null }]);
  inspectorBackend2.registerType("Debugger.BreakLocation", [{ "name": "scriptId", "type": "string", "optional": false, "description": "Script identifier as reported in the `Debugger.scriptParsed`.", "typeRef": "Runtime.ScriptId" }, { "name": "lineNumber", "type": "number", "optional": false, "description": "Line number in the script (0-based).", "typeRef": null }, { "name": "columnNumber", "type": "number", "optional": true, "description": "Column number in the script (0-based).", "typeRef": null }, { "name": "type", "type": "string", "optional": true, "description": "", "typeRef": null }]);
  inspectorBackend2.registerType("Debugger.WasmDisassemblyChunk", [{ "name": "lines", "type": "array", "optional": false, "description": "The next chunk of disassembled lines.", "typeRef": "string" }, { "name": "bytecodeOffsets", "type": "array", "optional": false, "description": "The bytecode offsets describing the start of each line.", "typeRef": "integer" }]);
  inspectorBackend2.registerType("Debugger.DebugSymbols", [{ "name": "type", "type": "string", "optional": false, "description": "Type of the debug symbols.", "typeRef": null }, { "name": "externalURL", "type": "string", "optional": true, "description": "URL of the external symbol source.", "typeRef": null }]);
  inspectorBackend2.registerType("Debugger.ResolvedBreakpoint", [{ "name": "breakpointId", "type": "string", "optional": false, "description": "Breakpoint unique identifier.", "typeRef": "Debugger.BreakpointId" }, { "name": "location", "type": "object", "optional": false, "description": "Actual breakpoint location.", "typeRef": "Debugger.Location" }]);
  inspectorBackend2.registerEvent("HeapProfiler.addHeapSnapshotChunk", ["chunk"]);
  inspectorBackend2.registerEvent("HeapProfiler.heapStatsUpdate", ["statsUpdate"]);
  inspectorBackend2.registerEvent("HeapProfiler.lastSeenObjectId", ["lastSeenObjectId", "timestamp"]);
  inspectorBackend2.registerEvent("HeapProfiler.reportHeapSnapshotProgress", ["done", "total", "finished"]);
  inspectorBackend2.registerEvent("HeapProfiler.resetProfiles", []);
  inspectorBackend2.registerCommand("HeapProfiler.addInspectedHeapObject", [{ "name": "heapObjectId", "type": "string", "optional": false, "description": "Heap snapshot object id to be accessible by means of $x command line API.", "typeRef": "HeapProfiler.HeapSnapshotObjectId" }], [], "Enables console to refer to the node with given id via $x (see Command Line API for more details $x functions).");
  inspectorBackend2.registerCommand("HeapProfiler.collectGarbage", [], [], "");
  inspectorBackend2.registerCommand("HeapProfiler.disable", [], [], "");
  inspectorBackend2.registerCommand("HeapProfiler.enable", [], [], "");
  inspectorBackend2.registerCommand("HeapProfiler.getHeapObjectId", [{ "name": "objectId", "type": "string", "optional": false, "description": "Identifier of the object to get heap object id for.", "typeRef": "Runtime.RemoteObjectId" }], ["heapSnapshotObjectId"], "");
  inspectorBackend2.registerCommand("HeapProfiler.getObjectByHeapObjectId", [{ "name": "objectId", "type": "string", "optional": false, "description": "", "typeRef": "HeapProfiler.HeapSnapshotObjectId" }, { "name": "objectGroup", "type": "string", "optional": true, "description": "Symbolic group name that can be used to release multiple objects.", "typeRef": null }], ["result"], "");
  inspectorBackend2.registerCommand("HeapProfiler.getSamplingProfile", [], ["profile"], "");
  inspectorBackend2.registerCommand("HeapProfiler.startSampling", [{ "name": "samplingInterval", "type": "number", "optional": true, "description": "Average sample interval in bytes. Poisson distribution is used for the intervals. The default value is 32768 bytes.", "typeRef": null }, { "name": "stackDepth", "type": "number", "optional": true, "description": "Maximum stack depth. The default value is 128.", "typeRef": null }, { "name": "includeObjectsCollectedByMajorGC", "type": "boolean", "optional": true, "description": "By default, the sampling heap profiler reports only objects which are still alive when the profile is returned via getSamplingProfile or stopSampling, which is useful for determining what functions contribute the most to steady-state memory usage. This flag instructs the sampling heap profiler to also include information about objects discarded by major GC, which will show which functions cause large temporary memory usage or long GC pauses.", "typeRef": null }, { "name": "includeObjectsCollectedByMinorGC", "type": "boolean", "optional": true, "description": "By default, the sampling heap profiler reports only objects which are still alive when the profile is returned via getSamplingProfile or stopSampling, which is useful for determining what functions contribute the most to steady-state memory usage. This flag instructs the sampling heap profiler to also include information about objects discarded by minor GC, which is useful when tuning a latency-sensitive application for minimal GC activity.", "typeRef": null }], [], "");
  inspectorBackend2.registerCommand("HeapProfiler.startTrackingHeapObjects", [{ "name": "trackAllocations", "type": "boolean", "optional": true, "description": "", "typeRef": null }], [], "");
  inspectorBackend2.registerCommand("HeapProfiler.stopSampling", [], ["profile"], "");
  inspectorBackend2.registerCommand("HeapProfiler.stopTrackingHeapObjects", [{ "name": "reportProgress", "type": "boolean", "optional": true, "description": "If true 'reportHeapSnapshotProgress' events will be generated while snapshot is being taken when the tracking is stopped.", "typeRef": null }, { "name": "treatGlobalObjectsAsRoots", "type": "boolean", "optional": true, "description": "Deprecated in favor of `exposeInternals`.", "typeRef": null }, { "name": "captureNumericValue", "type": "boolean", "optional": true, "description": "If true, numerical values are included in the snapshot", "typeRef": null }, { "name": "exposeInternals", "type": "boolean", "optional": true, "description": "If true, exposes internals of the snapshot.", "typeRef": null }], [], "");
  inspectorBackend2.registerCommand("HeapProfiler.takeHeapSnapshot", [{ "name": "reportProgress", "type": "boolean", "optional": true, "description": "If true 'reportHeapSnapshotProgress' events will be generated while snapshot is being taken.", "typeRef": null }, { "name": "treatGlobalObjectsAsRoots", "type": "boolean", "optional": true, "description": "If true, a raw snapshot without artificial roots will be generated. Deprecated in favor of `exposeInternals`.", "typeRef": null }, { "name": "captureNumericValue", "type": "boolean", "optional": true, "description": "If true, numerical values are included in the snapshot", "typeRef": null }, { "name": "exposeInternals", "type": "boolean", "optional": true, "description": "If true, exposes internals of the snapshot.", "typeRef": null }], [], "");
  inspectorBackend2.registerType("HeapProfiler.SamplingHeapProfileNode", [{ "name": "callFrame", "type": "object", "optional": false, "description": "Function location.", "typeRef": "Runtime.CallFrame" }, { "name": "selfSize", "type": "number", "optional": false, "description": "Allocations size in bytes for the node excluding children.", "typeRef": null }, { "name": "id", "type": "number", "optional": false, "description": "Node id. Ids are unique across all profiles collected between startSampling and stopSampling.", "typeRef": null }, { "name": "children", "type": "array", "optional": false, "description": "Child nodes.", "typeRef": "HeapProfiler.SamplingHeapProfileNode" }]);
  inspectorBackend2.registerType("HeapProfiler.SamplingHeapProfileSample", [{ "name": "size", "type": "number", "optional": false, "description": "Allocation size in bytes attributed to the sample.", "typeRef": null }, { "name": "nodeId", "type": "number", "optional": false, "description": "Id of the corresponding profile tree node.", "typeRef": null }, { "name": "ordinal", "type": "number", "optional": false, "description": "Time-ordered sample ordinal number. It is unique across all profiles retrieved between startSampling and stopSampling.", "typeRef": null }]);
  inspectorBackend2.registerType("HeapProfiler.SamplingHeapProfile", [{ "name": "head", "type": "object", "optional": false, "description": "", "typeRef": "HeapProfiler.SamplingHeapProfileNode" }, { "name": "samples", "type": "array", "optional": false, "description": "", "typeRef": "HeapProfiler.SamplingHeapProfileSample" }]);
  inspectorBackend2.registerEvent("Profiler.consoleProfileFinished", ["id", "location", "profile", "title"]);
  inspectorBackend2.registerEvent("Profiler.consoleProfileStarted", ["id", "location", "title"]);
  inspectorBackend2.registerEvent("Profiler.preciseCoverageDeltaUpdate", ["timestamp", "occasion", "result"]);
  inspectorBackend2.registerCommand("Profiler.disable", [], [], "");
  inspectorBackend2.registerCommand("Profiler.enable", [], [], "");
  inspectorBackend2.registerCommand("Profiler.getBestEffortCoverage", [], ["result"], "Collect coverage data for the current isolate. The coverage data may be incomplete due to garbage collection.");
  inspectorBackend2.registerCommand("Profiler.setSamplingInterval", [{ "name": "interval", "type": "number", "optional": false, "description": "New sampling interval in microseconds.", "typeRef": null }], [], "Changes CPU profiler sampling interval. Must be called before CPU profiles recording started.");
  inspectorBackend2.registerCommand("Profiler.start", [], [], "");
  inspectorBackend2.registerCommand("Profiler.startPreciseCoverage", [{ "name": "callCount", "type": "boolean", "optional": true, "description": "Collect accurate call counts beyond simple 'covered' or 'not covered'.", "typeRef": null }, { "name": "detailed", "type": "boolean", "optional": true, "description": "Collect block-based coverage.", "typeRef": null }, { "name": "allowTriggeredUpdates", "type": "boolean", "optional": true, "description": "Allow the backend to send updates on its own initiative", "typeRef": null }], ["timestamp"], "Enable precise code coverage. Coverage data for JavaScript executed before enabling precise code coverage may be incomplete. Enabling prevents running optimized code and resets execution counters.");
  inspectorBackend2.registerCommand("Profiler.stop", [], ["profile"], "");
  inspectorBackend2.registerCommand("Profiler.stopPreciseCoverage", [], [], "Disable precise code coverage. Disabling releases unnecessary execution count records and allows executing optimized code.");
  inspectorBackend2.registerCommand("Profiler.takePreciseCoverage", [], ["result", "timestamp"], "Collect coverage data for the current isolate, and resets execution counters. Precise code coverage needs to have started.");
  inspectorBackend2.registerType("Profiler.ProfileNode", [{ "name": "id", "type": "number", "optional": false, "description": "Unique id of the node.", "typeRef": null }, { "name": "callFrame", "type": "object", "optional": false, "description": "Function location.", "typeRef": "Runtime.CallFrame" }, { "name": "hitCount", "type": "number", "optional": true, "description": "Number of samples where this node was on top of the call stack.", "typeRef": null }, { "name": "children", "type": "array", "optional": true, "description": "Child node ids.", "typeRef": "integer" }, { "name": "deoptReason", "type": "string", "optional": true, "description": "The reason of being not optimized. The function may be deoptimized or marked as don't optimize.", "typeRef": null }, { "name": "positionTicks", "type": "array", "optional": true, "description": "An array of source position ticks.", "typeRef": "Profiler.PositionTickInfo" }]);
  inspectorBackend2.registerType("Profiler.Profile", [{ "name": "nodes", "type": "array", "optional": false, "description": "The list of profile nodes. First item is the root node.", "typeRef": "Profiler.ProfileNode" }, { "name": "startTime", "type": "number", "optional": false, "description": "Profiling start timestamp in microseconds.", "typeRef": null }, { "name": "endTime", "type": "number", "optional": false, "description": "Profiling end timestamp in microseconds.", "typeRef": null }, { "name": "samples", "type": "array", "optional": true, "description": "Ids of samples top nodes.", "typeRef": "integer" }, { "name": "timeDeltas", "type": "array", "optional": true, "description": "Time intervals between adjacent samples in microseconds. The first delta is relative to the profile startTime.", "typeRef": "integer" }]);
  inspectorBackend2.registerType("Profiler.PositionTickInfo", [{ "name": "line", "type": "number", "optional": false, "description": "Source line number (1-based).", "typeRef": null }, { "name": "ticks", "type": "number", "optional": false, "description": "Number of samples attributed to the source line.", "typeRef": null }]);
  inspectorBackend2.registerType("Profiler.CoverageRange", [{ "name": "startOffset", "type": "number", "optional": false, "description": "JavaScript script source offset for the range start.", "typeRef": null }, { "name": "endOffset", "type": "number", "optional": false, "description": "JavaScript script source offset for the range end.", "typeRef": null }, { "name": "count", "type": "number", "optional": false, "description": "Collected execution count of the source range.", "typeRef": null }]);
  inspectorBackend2.registerType("Profiler.FunctionCoverage", [{ "name": "functionName", "type": "string", "optional": false, "description": "JavaScript function name.", "typeRef": null }, { "name": "ranges", "type": "array", "optional": false, "description": "Source ranges inside the function with coverage data.", "typeRef": "Profiler.CoverageRange" }, { "name": "isBlockCoverage", "type": "boolean", "optional": false, "description": "Whether coverage data for this function has block granularity.", "typeRef": null }]);
  inspectorBackend2.registerType("Profiler.ScriptCoverage", [{ "name": "scriptId", "type": "string", "optional": false, "description": "JavaScript script id.", "typeRef": "Runtime.ScriptId" }, { "name": "url", "type": "string", "optional": false, "description": "JavaScript script name or url.", "typeRef": null }, { "name": "functions", "type": "array", "optional": false, "description": "Functions contained in the script that has coverage data.", "typeRef": "Profiler.FunctionCoverage" }]);
  inspectorBackend2.registerEnum("Runtime.SerializationOptionsSerialization", { Deep: "deep", Json: "json", IdOnly: "idOnly" });
  inspectorBackend2.registerEnum("Runtime.DeepSerializedValueType", { Undefined: "undefined", Null: "null", String: "string", Number: "number", Boolean: "boolean", Bigint: "bigint", Regexp: "regexp", Date: "date", Symbol: "symbol", Array: "array", Object: "object", Function: "function", Map: "map", Set: "set", Weakmap: "weakmap", Weakset: "weakset", Error: "error", Proxy: "proxy", Promise: "promise", Typedarray: "typedarray", Arraybuffer: "arraybuffer", Node: "node", Window: "window", Generator: "generator" });
  inspectorBackend2.registerEnum("Runtime.RemoteObjectType", { Object: "object", Function: "function", Undefined: "undefined", String: "string", Number: "number", Boolean: "boolean", Symbol: "symbol", Bigint: "bigint" });
  inspectorBackend2.registerEnum("Runtime.RemoteObjectSubtype", { Array: "array", Null: "null", Node: "node", Regexp: "regexp", Date: "date", Map: "map", Set: "set", Weakmap: "weakmap", Weakset: "weakset", Iterator: "iterator", Generator: "generator", Error: "error", Proxy: "proxy", Promise: "promise", Typedarray: "typedarray", Arraybuffer: "arraybuffer", Dataview: "dataview", Webassemblymemory: "webassemblymemory", Wasmvalue: "wasmvalue", Trustedtype: "trustedtype" });
  inspectorBackend2.registerEnum("Runtime.ObjectPreviewType", { Object: "object", Function: "function", Undefined: "undefined", String: "string", Number: "number", Boolean: "boolean", Symbol: "symbol", Bigint: "bigint" });
  inspectorBackend2.registerEnum("Runtime.ObjectPreviewSubtype", { Array: "array", Null: "null", Node: "node", Regexp: "regexp", Date: "date", Map: "map", Set: "set", Weakmap: "weakmap", Weakset: "weakset", Iterator: "iterator", Generator: "generator", Error: "error", Proxy: "proxy", Promise: "promise", Typedarray: "typedarray", Arraybuffer: "arraybuffer", Dataview: "dataview", Webassemblymemory: "webassemblymemory", Wasmvalue: "wasmvalue", Trustedtype: "trustedtype" });
  inspectorBackend2.registerEnum("Runtime.PropertyPreviewType", { Object: "object", Function: "function", Undefined: "undefined", String: "string", Number: "number", Boolean: "boolean", Symbol: "symbol", Accessor: "accessor", Bigint: "bigint" });
  inspectorBackend2.registerEnum("Runtime.PropertyPreviewSubtype", { Array: "array", Null: "null", Node: "node", Regexp: "regexp", Date: "date", Map: "map", Set: "set", Weakmap: "weakmap", Weakset: "weakset", Iterator: "iterator", Generator: "generator", Error: "error", Proxy: "proxy", Promise: "promise", Typedarray: "typedarray", Arraybuffer: "arraybuffer", Dataview: "dataview", Webassemblymemory: "webassemblymemory", Wasmvalue: "wasmvalue", Trustedtype: "trustedtype" });
  inspectorBackend2.registerEvent("Runtime.bindingCalled", ["name", "payload", "executionContextId"]);
  inspectorBackend2.registerEnum("Runtime.ConsoleAPICalledEventType", { Log: "log", Debug: "debug", Info: "info", Error: "error", Warning: "warning", Dir: "dir", DirXML: "dirxml", Table: "table", Trace: "trace", Clear: "clear", StartGroup: "startGroup", StartGroupCollapsed: "startGroupCollapsed", EndGroup: "endGroup", Assert: "assert", Profile: "profile", ProfileEnd: "profileEnd", Count: "count", TimeEnd: "timeEnd" });
  inspectorBackend2.registerEvent("Runtime.consoleAPICalled", ["type", "args", "executionContextId", "timestamp", "stackTrace", "context"]);
  inspectorBackend2.registerEvent("Runtime.exceptionRevoked", ["reason", "exceptionId"]);
  inspectorBackend2.registerEvent("Runtime.exceptionThrown", ["timestamp", "exceptionDetails"]);
  inspectorBackend2.registerEvent("Runtime.executionContextCreated", ["context"]);
  inspectorBackend2.registerEvent("Runtime.executionContextDestroyed", ["executionContextId", "executionContextUniqueId"]);
  inspectorBackend2.registerEvent("Runtime.executionContextsCleared", []);
  inspectorBackend2.registerEvent("Runtime.inspectRequested", ["object", "hints", "executionContextId"]);
  inspectorBackend2.registerCommand("Runtime.awaitPromise", [{ "name": "promiseObjectId", "type": "string", "optional": false, "description": "Identifier of the promise.", "typeRef": "Runtime.RemoteObjectId" }, { "name": "returnByValue", "type": "boolean", "optional": true, "description": "Whether the result is expected to be a JSON object that should be sent by value.", "typeRef": null }, { "name": "generatePreview", "type": "boolean", "optional": true, "description": "Whether preview should be generated for the result.", "typeRef": null }], ["result", "exceptionDetails"], "Add handler to promise with given promise object id.");
  inspectorBackend2.registerCommand("Runtime.callFunctionOn", [{ "name": "functionDeclaration", "type": "string", "optional": false, "description": "Declaration of the function to call.", "typeRef": null }, { "name": "objectId", "type": "string", "optional": true, "description": "Identifier of the object to call function on. Either objectId or executionContextId should be specified.", "typeRef": "Runtime.RemoteObjectId" }, { "name": "arguments", "type": "array", "optional": true, "description": "Call arguments. All call arguments must belong to the same JavaScript world as the target object.", "typeRef": "Runtime.CallArgument" }, { "name": "silent", "type": "boolean", "optional": true, "description": "In silent mode exceptions thrown during evaluation are not reported and do not pause execution. Overrides `setPauseOnException` state.", "typeRef": null }, { "name": "returnByValue", "type": "boolean", "optional": true, "description": "Whether the result is expected to be a JSON object which should be sent by value. Can be overriden by `serializationOptions`.", "typeRef": null }, { "name": "generatePreview", "type": "boolean", "optional": true, "description": "Whether preview should be generated for the result.", "typeRef": null }, { "name": "userGesture", "type": "boolean", "optional": true, "description": "Whether execution should be treated as initiated by user in the UI.", "typeRef": null }, { "name": "awaitPromise", "type": "boolean", "optional": true, "description": "Whether execution should `await` for resulting value and return once awaited promise is resolved.", "typeRef": null }, { "name": "executionContextId", "type": "number", "optional": true, "description": "Specifies execution context which global object will be used to call function on. Either executionContextId or objectId should be specified.", "typeRef": "Runtime.ExecutionContextId" }, { "name": "objectGroup", "type": "string", "optional": true, "description": "Symbolic group name that can be used to release multiple objects. If objectGroup is not specified and objectId is, objectGroup will be inherited from object.", "typeRef": null }, { "name": "throwOnSideEffect", "type": "boolean", "optional": true, "description": "Whether to throw an exception if side effect cannot be ruled out during evaluation.", "typeRef": null }, { "name": "uniqueContextId", "type": "string", "optional": true, "description": "An alternative way to specify the execution context to call function on. Compared to contextId that may be reused across processes, this is guaranteed to be system-unique, so it can be used to prevent accidental function call in context different than intended (e.g. as a result of navigation across process boundaries). This is mutually exclusive with `executionContextId`.", "typeRef": null }, { "name": "serializationOptions", "type": "object", "optional": true, "description": "Specifies the result serialization. If provided, overrides `generatePreview` and `returnByValue`.", "typeRef": "Runtime.SerializationOptions" }], ["result", "exceptionDetails"], "Calls function with given declaration on the given object. Object group of the result is inherited from the target object.");
  inspectorBackend2.registerCommand("Runtime.compileScript", [{ "name": "expression", "type": "string", "optional": false, "description": "Expression to compile.", "typeRef": null }, { "name": "sourceURL", "type": "string", "optional": false, "description": "Source url to be set for the script.", "typeRef": null }, { "name": "persistScript", "type": "boolean", "optional": false, "description": "Specifies whether the compiled script should be persisted.", "typeRef": null }, { "name": "executionContextId", "type": "number", "optional": true, "description": "Specifies in which execution context to perform script run. If the parameter is omitted the evaluation will be performed in the context of the inspected page.", "typeRef": "Runtime.ExecutionContextId" }], ["scriptId", "exceptionDetails"], "Compiles expression.");
  inspectorBackend2.registerCommand("Runtime.disable", [], [], "Disables reporting of execution contexts creation.");
  inspectorBackend2.registerCommand("Runtime.discardConsoleEntries", [], [], "Discards collected exceptions and console API calls.");
  inspectorBackend2.registerCommand("Runtime.enable", [], [], "Enables reporting of execution contexts creation by means of `executionContextCreated` event. When the reporting gets enabled the event will be sent immediately for each existing execution context.");
  inspectorBackend2.registerCommand("Runtime.evaluate", [{ "name": "expression", "type": "string", "optional": false, "description": "Expression to evaluate.", "typeRef": null }, { "name": "objectGroup", "type": "string", "optional": true, "description": "Symbolic group name that can be used to release multiple objects.", "typeRef": null }, { "name": "includeCommandLineAPI", "type": "boolean", "optional": true, "description": "Determines whether Command Line API should be available during the evaluation.", "typeRef": null }, { "name": "silent", "type": "boolean", "optional": true, "description": "In silent mode exceptions thrown during evaluation are not reported and do not pause execution. Overrides `setPauseOnException` state.", "typeRef": null }, { "name": "contextId", "type": "number", "optional": true, "description": "Specifies in which execution context to perform evaluation. If the parameter is omitted the evaluation will be performed in the context of the inspected page. This is mutually exclusive with `uniqueContextId`, which offers an alternative way to identify the execution context that is more reliable in a multi-process environment.", "typeRef": "Runtime.ExecutionContextId" }, { "name": "returnByValue", "type": "boolean", "optional": true, "description": "Whether the result is expected to be a JSON object that should be sent by value.", "typeRef": null }, { "name": "generatePreview", "type": "boolean", "optional": true, "description": "Whether preview should be generated for the result.", "typeRef": null }, { "name": "userGesture", "type": "boolean", "optional": true, "description": "Whether execution should be treated as initiated by user in the UI.", "typeRef": null }, { "name": "awaitPromise", "type": "boolean", "optional": true, "description": "Whether execution should `await` for resulting value and return once awaited promise is resolved.", "typeRef": null }, { "name": "throwOnSideEffect", "type": "boolean", "optional": true, "description": "Whether to throw an exception if side effect cannot be ruled out during evaluation. This implies `disableBreaks` below.", "typeRef": null }, { "name": "timeout", "type": "number", "optional": true, "description": "Terminate execution after timing out (number of milliseconds).", "typeRef": "Runtime.TimeDelta" }, { "name": "disableBreaks", "type": "boolean", "optional": true, "description": "Disable breakpoints during execution.", "typeRef": null }, { "name": "replMode", "type": "boolean", "optional": true, "description": "Setting this flag to true enables `let` re-declaration and top-level `await`. Note that `let` variables can only be re-declared if they originate from `replMode` themselves.", "typeRef": null }, { "name": "allowUnsafeEvalBlockedByCSP", "type": "boolean", "optional": true, "description": "The Content Security Policy (CSP) for the target might block 'unsafe-eval' which includes eval(), Function(), setTimeout() and setInterval() when called with non-callable arguments. This flag bypasses CSP for this evaluation and allows unsafe-eval. Defaults to true.", "typeRef": null }, { "name": "uniqueContextId", "type": "string", "optional": true, "description": "An alternative way to specify the execution context to evaluate in. Compared to contextId that may be reused across processes, this is guaranteed to be system-unique, so it can be used to prevent accidental evaluation of the expression in context different than intended (e.g. as a result of navigation across process boundaries). This is mutually exclusive with `contextId`.", "typeRef": null }, { "name": "serializationOptions", "type": "object", "optional": true, "description": "Specifies the result serialization. If provided, overrides `generatePreview` and `returnByValue`.", "typeRef": "Runtime.SerializationOptions" }], ["result", "exceptionDetails"], "Evaluates expression on global object.");
  inspectorBackend2.registerCommand("Runtime.getIsolateId", [], ["id"], "Returns the isolate id.");
  inspectorBackend2.registerCommand("Runtime.getHeapUsage", [], ["usedSize", "totalSize", "embedderHeapUsedSize", "backingStorageSize"], "Returns the JavaScript heap usage. It is the total usage of the corresponding isolate not scoped to a particular Runtime.");
  inspectorBackend2.registerCommand("Runtime.getProperties", [{ "name": "objectId", "type": "string", "optional": false, "description": "Identifier of the object to return properties for.", "typeRef": "Runtime.RemoteObjectId" }, { "name": "ownProperties", "type": "boolean", "optional": true, "description": "If true, returns properties belonging only to the element itself, not to its prototype chain.", "typeRef": null }, { "name": "accessorPropertiesOnly", "type": "boolean", "optional": true, "description": "If true, returns accessor properties (with getter/setter) only; internal properties are not returned either.", "typeRef": null }, { "name": "generatePreview", "type": "boolean", "optional": true, "description": "Whether preview should be generated for the results.", "typeRef": null }, { "name": "nonIndexedPropertiesOnly", "type": "boolean", "optional": true, "description": "If true, returns non-indexed properties only.", "typeRef": null }], ["result", "internalProperties", "privateProperties", "exceptionDetails"], "Returns properties of a given object. Object group of the result is inherited from the target object.");
  inspectorBackend2.registerCommand("Runtime.globalLexicalScopeNames", [{ "name": "executionContextId", "type": "number", "optional": true, "description": "Specifies in which execution context to lookup global scope variables.", "typeRef": "Runtime.ExecutionContextId" }], ["names"], "Returns all let, const and class variables from global scope.");
  inspectorBackend2.registerCommand("Runtime.queryObjects", [{ "name": "prototypeObjectId", "type": "string", "optional": false, "description": "Identifier of the prototype to return objects for.", "typeRef": "Runtime.RemoteObjectId" }, { "name": "objectGroup", "type": "string", "optional": true, "description": "Symbolic group name that can be used to release the results.", "typeRef": null }], ["objects"], "");
  inspectorBackend2.registerCommand("Runtime.releaseObject", [{ "name": "objectId", "type": "string", "optional": false, "description": "Identifier of the object to release.", "typeRef": "Runtime.RemoteObjectId" }], [], "Releases remote object with given id.");
  inspectorBackend2.registerCommand("Runtime.releaseObjectGroup", [{ "name": "objectGroup", "type": "string", "optional": false, "description": "Symbolic object group name.", "typeRef": null }], [], "Releases all remote objects that belong to a given group.");
  inspectorBackend2.registerCommand("Runtime.runIfWaitingForDebugger", [], [], "Tells inspected instance to run if it was waiting for debugger to attach.");
  inspectorBackend2.registerCommand("Runtime.runScript", [{ "name": "scriptId", "type": "string", "optional": false, "description": "Id of the script to run.", "typeRef": "Runtime.ScriptId" }, { "name": "executionContextId", "type": "number", "optional": true, "description": "Specifies in which execution context to perform script run. If the parameter is omitted the evaluation will be performed in the context of the inspected page.", "typeRef": "Runtime.ExecutionContextId" }, { "name": "objectGroup", "type": "string", "optional": true, "description": "Symbolic group name that can be used to release multiple objects.", "typeRef": null }, { "name": "silent", "type": "boolean", "optional": true, "description": "In silent mode exceptions thrown during evaluation are not reported and do not pause execution. Overrides `setPauseOnException` state.", "typeRef": null }, { "name": "includeCommandLineAPI", "type": "boolean", "optional": true, "description": "Determines whether Command Line API should be available during the evaluation.", "typeRef": null }, { "name": "returnByValue", "type": "boolean", "optional": true, "description": "Whether the result is expected to be a JSON object which should be sent by value.", "typeRef": null }, { "name": "generatePreview", "type": "boolean", "optional": true, "description": "Whether preview should be generated for the result.", "typeRef": null }, { "name": "awaitPromise", "type": "boolean", "optional": true, "description": "Whether execution should `await` for resulting value and return once awaited promise is resolved.", "typeRef": null }], ["result", "exceptionDetails"], "Runs script with given id in a given context.");
  inspectorBackend2.registerCommand("Runtime.setAsyncCallStackDepth", [{ "name": "maxDepth", "type": "number", "optional": false, "description": "Maximum depth of async call stacks. Setting to `0` will effectively disable collecting async call stacks (default).", "typeRef": null }], [], "Enables or disables async call stacks tracking.");
  inspectorBackend2.registerCommand("Runtime.setCustomObjectFormatterEnabled", [{ "name": "enabled", "type": "boolean", "optional": false, "description": "", "typeRef": null }], [], "");
  inspectorBackend2.registerCommand("Runtime.setMaxCallStackSizeToCapture", [{ "name": "size", "type": "number", "optional": false, "description": "", "typeRef": null }], [], "");
  inspectorBackend2.registerCommand("Runtime.terminateExecution", [], [], "Terminate current or next JavaScript execution. Will cancel the termination when the outer-most script execution ends.");
  inspectorBackend2.registerCommand("Runtime.addBinding", [{ "name": "name", "type": "string", "optional": false, "description": "", "typeRef": null }, { "name": "executionContextId", "type": "number", "optional": true, "description": "If specified, the binding would only be exposed to the specified execution context. If omitted and `executionContextName` is not set, the binding is exposed to all execution contexts of the target. This parameter is mutually exclusive with `executionContextName`. Deprecated in favor of `executionContextName` due to an unclear use case and bugs in implementation (crbug.com/1169639). `executionContextId` will be removed in the future.", "typeRef": "Runtime.ExecutionContextId" }, { "name": "executionContextName", "type": "string", "optional": true, "description": "If specified, the binding is exposed to the executionContext with matching name, even for contexts created after the binding is added. See also `ExecutionContext.name` and `worldName` parameter to `Page.addScriptToEvaluateOnNewDocument`. This parameter is mutually exclusive with `executionContextId`.", "typeRef": null }], [], "If executionContextId is empty, adds binding with the given name on the global objects of all inspected contexts, including those created later, bindings survive reloads. Binding function takes exactly one argument, this argument should be string, in case of any other input, function throws an exception. Each binding function call produces Runtime.bindingCalled notification.");
  inspectorBackend2.registerCommand("Runtime.removeBinding", [{ "name": "name", "type": "string", "optional": false, "description": "", "typeRef": null }], [], "This method does not remove binding function from global object but unsubscribes current runtime agent from Runtime.bindingCalled notifications.");
  inspectorBackend2.registerCommand("Runtime.getExceptionDetails", [{ "name": "errorObjectId", "type": "string", "optional": false, "description": "The error object for which to resolve the exception details.", "typeRef": "Runtime.RemoteObjectId" }], ["exceptionDetails"], "This method tries to lookup and populate exception details for a JavaScript Error object. Note that the stackTrace portion of the resulting exceptionDetails will only be populated if the Runtime domain was enabled at the time when the Error was thrown.");
  inspectorBackend2.registerType("Runtime.SerializationOptions", [{ "name": "serialization", "type": "string", "optional": false, "description": "", "typeRef": null }, { "name": "maxDepth", "type": "number", "optional": true, "description": "Deep serialization depth. Default is full depth. Respected only in `deep` serialization mode.", "typeRef": null }, { "name": "additionalParameters", "type": "object", "optional": true, "description": 'Embedder-specific parameters. For example if connected to V8 in Chrome these control DOM serialization via `maxNodeDepth: integer` and `includeShadowTree: \\"none\\" | \\"open\\" | \\"all\\"`. Values can be only of type string or integer.', "typeRef": null }]);
  inspectorBackend2.registerType("Runtime.DeepSerializedValue", [{ "name": "type", "type": "string", "optional": false, "description": "", "typeRef": null }, { "name": "value", "type": "any", "optional": true, "description": "", "typeRef": null }, { "name": "objectId", "type": "string", "optional": true, "description": "", "typeRef": null }, { "name": "weakLocalObjectReference", "type": "number", "optional": true, "description": "Set if value reference met more then once during serialization. In such case, value is provided only to one of the serialized values. Unique per value in the scope of one CDP call.", "typeRef": null }]);
  inspectorBackend2.registerType("Runtime.RemoteObject", [{ "name": "type", "type": "string", "optional": false, "description": "Object type.", "typeRef": null }, { "name": "subtype", "type": "string", "optional": true, "description": "Object subtype hint. Specified for `object` type values only. NOTE: If you change anything here, make sure to also update `subtype` in `ObjectPreview` and `PropertyPreview` below.", "typeRef": null }, { "name": "className", "type": "string", "optional": true, "description": "Object class (constructor) name. Specified for `object` type values only.", "typeRef": null }, { "name": "value", "type": "any", "optional": true, "description": "Remote object value in case of primitive values or JSON values (if it was requested).", "typeRef": null }, { "name": "unserializableValue", "type": "string", "optional": true, "description": "Primitive value which can not be JSON-stringified does not have `value`, but gets this property.", "typeRef": "Runtime.UnserializableValue" }, { "name": "description", "type": "string", "optional": true, "description": "String representation of the object.", "typeRef": null }, { "name": "deepSerializedValue", "type": "object", "optional": true, "description": "Deep serialized value.", "typeRef": "Runtime.DeepSerializedValue" }, { "name": "objectId", "type": "string", "optional": true, "description": "Unique object identifier (for non-primitive values).", "typeRef": "Runtime.RemoteObjectId" }, { "name": "preview", "type": "object", "optional": true, "description": "Preview containing abbreviated property values. Specified for `object` type values only.", "typeRef": "Runtime.ObjectPreview" }, { "name": "customPreview", "type": "object", "optional": true, "description": "", "typeRef": "Runtime.CustomPreview" }]);
  inspectorBackend2.registerType("Runtime.CustomPreview", [{ "name": "header", "type": "string", "optional": false, "description": "The JSON-stringified result of formatter.header(object, config) call. It contains json ML array that represents RemoteObject.", "typeRef": null }, { "name": "bodyGetterId", "type": "string", "optional": true, "description": "If formatter returns true as a result of formatter.hasBody call then bodyGetterId will contain RemoteObjectId for the function that returns result of formatter.body(object, config) call. The result value is json ML array.", "typeRef": "Runtime.RemoteObjectId" }]);
  inspectorBackend2.registerType("Runtime.ObjectPreview", [{ "name": "type", "type": "string", "optional": false, "description": "Object type.", "typeRef": null }, { "name": "subtype", "type": "string", "optional": true, "description": "Object subtype hint. Specified for `object` type values only.", "typeRef": null }, { "name": "description", "type": "string", "optional": true, "description": "String representation of the object.", "typeRef": null }, { "name": "overflow", "type": "boolean", "optional": false, "description": "True iff some of the properties or entries of the original object did not fit.", "typeRef": null }, { "name": "properties", "type": "array", "optional": false, "description": "List of the properties.", "typeRef": "Runtime.PropertyPreview" }, { "name": "entries", "type": "array", "optional": true, "description": "List of the entries. Specified for `map` and `set` subtype values only.", "typeRef": "Runtime.EntryPreview" }]);
  inspectorBackend2.registerType("Runtime.PropertyPreview", [{ "name": "name", "type": "string", "optional": false, "description": "Property name.", "typeRef": null }, { "name": "type", "type": "string", "optional": false, "description": "Object type. Accessor means that the property itself is an accessor property.", "typeRef": null }, { "name": "value", "type": "string", "optional": true, "description": "User-friendly property value string.", "typeRef": null }, { "name": "valuePreview", "type": "object", "optional": true, "description": "Nested value preview.", "typeRef": "Runtime.ObjectPreview" }, { "name": "subtype", "type": "string", "optional": true, "description": "Object subtype hint. Specified for `object` type values only.", "typeRef": null }]);
  inspectorBackend2.registerType("Runtime.EntryPreview", [{ "name": "key", "type": "object", "optional": true, "description": "Preview of the key. Specified for map-like collection entries.", "typeRef": "Runtime.ObjectPreview" }, { "name": "value", "type": "object", "optional": false, "description": "Preview of the value.", "typeRef": "Runtime.ObjectPreview" }]);
  inspectorBackend2.registerType("Runtime.PropertyDescriptor", [{ "name": "name", "type": "string", "optional": false, "description": "Property name or symbol description.", "typeRef": null }, { "name": "value", "type": "object", "optional": true, "description": "The value associated with the property.", "typeRef": "Runtime.RemoteObject" }, { "name": "writable", "type": "boolean", "optional": true, "description": "True if the value associated with the property may be changed (data descriptors only).", "typeRef": null }, { "name": "get", "type": "object", "optional": true, "description": "A function which serves as a getter for the property, or `undefined` if there is no getter (accessor descriptors only).", "typeRef": "Runtime.RemoteObject" }, { "name": "set", "type": "object", "optional": true, "description": "A function which serves as a setter for the property, or `undefined` if there is no setter (accessor descriptors only).", "typeRef": "Runtime.RemoteObject" }, { "name": "configurable", "type": "boolean", "optional": false, "description": "True if the type of this property descriptor may be changed and if the property may be deleted from the corresponding object.", "typeRef": null }, { "name": "enumerable", "type": "boolean", "optional": false, "description": "True if this property shows up during enumeration of the properties on the corresponding object.", "typeRef": null }, { "name": "wasThrown", "type": "boolean", "optional": true, "description": "True if the result was thrown during the evaluation.", "typeRef": null }, { "name": "isOwn", "type": "boolean", "optional": true, "description": "True if the property is owned for the object.", "typeRef": null }, { "name": "symbol", "type": "object", "optional": true, "description": "Property symbol object, if the property is of the `symbol` type.", "typeRef": "Runtime.RemoteObject" }]);
  inspectorBackend2.registerType("Runtime.InternalPropertyDescriptor", [{ "name": "name", "type": "string", "optional": false, "description": "Conventional property name.", "typeRef": null }, { "name": "value", "type": "object", "optional": true, "description": "The value associated with the property.", "typeRef": "Runtime.RemoteObject" }]);
  inspectorBackend2.registerType("Runtime.PrivatePropertyDescriptor", [{ "name": "name", "type": "string", "optional": false, "description": "Private property name.", "typeRef": null }, { "name": "value", "type": "object", "optional": true, "description": "The value associated with the private property.", "typeRef": "Runtime.RemoteObject" }, { "name": "get", "type": "object", "optional": true, "description": "A function which serves as a getter for the private property, or `undefined` if there is no getter (accessor descriptors only).", "typeRef": "Runtime.RemoteObject" }, { "name": "set", "type": "object", "optional": true, "description": "A function which serves as a setter for the private property, or `undefined` if there is no setter (accessor descriptors only).", "typeRef": "Runtime.RemoteObject" }]);
  inspectorBackend2.registerType("Runtime.CallArgument", [{ "name": "value", "type": "any", "optional": true, "description": "Primitive value or serializable javascript object.", "typeRef": null }, { "name": "unserializableValue", "type": "string", "optional": true, "description": "Primitive value which can not be JSON-stringified.", "typeRef": "Runtime.UnserializableValue" }, { "name": "objectId", "type": "string", "optional": true, "description": "Remote object handle.", "typeRef": "Runtime.RemoteObjectId" }]);
  inspectorBackend2.registerType("Runtime.ExecutionContextDescription", [{ "name": "id", "type": "number", "optional": false, "description": "Unique id of the execution context. It can be used to specify in which execution context script evaluation should be performed.", "typeRef": "Runtime.ExecutionContextId" }, { "name": "origin", "type": "string", "optional": false, "description": "Execution context origin.", "typeRef": null }, { "name": "name", "type": "string", "optional": false, "description": "Human readable name describing given context.", "typeRef": null }, { "name": "uniqueId", "type": "string", "optional": false, "description": "A system-unique execution context identifier. Unlike the id, this is unique across multiple processes, so can be reliably used to identify specific context while backend performs a cross-process navigation.", "typeRef": null }, { "name": "auxData", "type": "object", "optional": true, "description": "Embedder-specific auxiliary data likely matching {isDefault: boolean, type: 'default'|'isolated'|'worker', frameId: string}", "typeRef": null }]);
  inspectorBackend2.registerType("Runtime.ExceptionDetails", [{ "name": "exceptionId", "type": "number", "optional": false, "description": "Exception id.", "typeRef": null }, { "name": "text", "type": "string", "optional": false, "description": "Exception text, which should be used together with exception object when available.", "typeRef": null }, { "name": "lineNumber", "type": "number", "optional": false, "description": "Line number of the exception location (0-based).", "typeRef": null }, { "name": "columnNumber", "type": "number", "optional": false, "description": "Column number of the exception location (0-based).", "typeRef": null }, { "name": "scriptId", "type": "string", "optional": true, "description": "Script ID of the exception location.", "typeRef": "Runtime.ScriptId" }, { "name": "url", "type": "string", "optional": true, "description": "URL of the exception location, to be used when the script was not reported.", "typeRef": null }, { "name": "stackTrace", "type": "object", "optional": true, "description": "JavaScript stack trace if available.", "typeRef": "Runtime.StackTrace" }, { "name": "exception", "type": "object", "optional": true, "description": "Exception object if available.", "typeRef": "Runtime.RemoteObject" }, { "name": "executionContextId", "type": "number", "optional": true, "description": "Identifier of the context where exception happened.", "typeRef": "Runtime.ExecutionContextId" }, { "name": "exceptionMetaData", "type": "object", "optional": true, "description": "Dictionary with entries of meta data that the client associated with this exception, such as information about associated network requests, etc.", "typeRef": null }]);
  inspectorBackend2.registerType("Runtime.CallFrame", [{ "name": "functionName", "type": "string", "optional": false, "description": "JavaScript function name.", "typeRef": null }, { "name": "scriptId", "type": "string", "optional": false, "description": "JavaScript script id.", "typeRef": "Runtime.ScriptId" }, { "name": "url", "type": "string", "optional": false, "description": "JavaScript script name or url.", "typeRef": null }, { "name": "lineNumber", "type": "number", "optional": false, "description": "JavaScript script line number (0-based).", "typeRef": null }, { "name": "columnNumber", "type": "number", "optional": false, "description": "JavaScript script column number (0-based).", "typeRef": null }]);
  inspectorBackend2.registerType("Runtime.StackTrace", [{ "name": "description", "type": "string", "optional": true, "description": "String label of this stack trace. For async traces this may be a name of the function that initiated the async call.", "typeRef": null }, { "name": "callFrames", "type": "array", "optional": false, "description": "JavaScript function name.", "typeRef": "Runtime.CallFrame" }, { "name": "parent", "type": "object", "optional": true, "description": "Asynchronous JavaScript stack trace that preceded this stack, if available.", "typeRef": "Runtime.StackTrace" }, { "name": "parentId", "type": "object", "optional": true, "description": "Asynchronous JavaScript stack trace that preceded this stack, if available.", "typeRef": "Runtime.StackTraceId" }]);
  inspectorBackend2.registerType("Runtime.StackTraceId", [{ "name": "id", "type": "string", "optional": false, "description": "", "typeRef": null }, { "name": "debuggerId", "type": "string", "optional": true, "description": "", "typeRef": "Runtime.UniqueDebuggerId" }]);
  inspectorBackend2.registerCommand("Schema.getDomains", [], ["domains"], "Returns supported domains.");
  inspectorBackend2.registerType("Schema.Domain", [{ "name": "name", "type": "string", "optional": false, "description": "Domain name.", "typeRef": null }, { "name": "version", "type": "string", "optional": false, "description": "Domain version.", "typeRef": null }]);
}
function createCssTokenizer() {
  async function tokenize2(line, callback) {
    const streamParser = await (void 0)();
    const stream3 = new (void 0)(line, 4, 2);
    const state = streamParser.startState(2);
    let lastPos = stream3.pos;
    while (!stream3.eol()) {
      stream3.start = lastPos;
      let tokenType = streamParser.token(stream3, state);
      if (tokenType === "error" && state.state === "maybeprop") {
        tokenType = "property";
      }
      const segment = stream3.current();
      callback(segment, tokenType);
      lastPos = stream3.pos;
    }
  }
  return tokenize2;
}
function setDebugDispatchHttpRequestEnabled(enabled) {
  if (enabled) {
    localStorage.setItem("debugDispatchHttpRequestEnabled", "true");
  } else {
    localStorage.removeItem("debugDispatchHttpRequestEnabled");
  }
}
function cssMetadata() {
  if (!cssMetadataInstance) {
    const supportedProperties = generatedProperties;
    cssMetadataInstance = new CSSMetadata(supportedProperties, generatedAliasesFor);
  }
  return cssMetadataInstance;
}
function getCssEvaluationElement() {
  const id2 = "css-evaluation-element";
  if (!cssEvaluationElement) {
    cssEvaluationElement = document.getElementById(id2);
    if (!cssEvaluationElement) {
      cssEvaluationElement = document.createElement("div");
      cssEvaluationElement.setAttribute("id", id2);
      cssEvaluationElement.setAttribute("style", "hidden: true; --evaluation: attr(data-custom-expr type(*))");
      document.body.appendChild(cssEvaluationElement);
    }
  }
  return cssEvaluationElement;
}
function localEvalCSS(value, type2) {
  const element = getCssEvaluationElement();
  element.setAttribute("data-value", value);
  element.setAttribute("data-custom-expr", `attr(data-value ${type2})`);
  return element.computedStyleMap().get("--evaluation")?.toString() ?? null;
}
function isValidCSSType(type2) {
  const element = getCssEvaluationElement();
  element.setAttribute("data-custom-expr", `attr(data-nonexistent ${type2}, "good")`);
  return '"good"' === (element.computedStyleMap().get("--evaluation")?.toString() ?? null);
}
function defaultValueForCSSType(type2) {
  const element = getCssEvaluationElement();
  element.setAttribute("data-custom-expr", `attr(data-nonexistent ${type2 ?? ""})`);
  return element.computedStyleMap().get("--evaluation")?.toString() ?? null;
}
function literalToNumber(node2, ast2) {
  if (node2.type.name !== "NumberLiteral") {
    return null;
  }
  const text = ast2.text(node2);
  return Number(text.substring(0, text.length - ast2.text(node2.getChild("Unit")).length));
}
function isRelativeColorChannelName(channel) {
  const maybeChannel = channel;
  switch (maybeChannel) {
    case "a":
    case "alpha":
    case "b":
    case "c":
    case "g":
    case "h":
    case "l":
    case "r":
    case "s":
    case "w":
    case "x":
    case "y":
    case "z":
      return true;
  }
  return false;
}
function stripComments(value) {
  return value.replaceAll(/(\/\*(?:.|\s)*?\*\/)/g, "");
}
function nodeText(node2, text) {
  return nodeTextRange(node2, node2, text);
}
function nodeTextRange(from2, to, text) {
  return text.substring(from2.from, to.to);
}
function matcherBase(matchT) {
  class MatcherBase {
    matchType = matchT;
    accepts(_propertyName) {
      return true;
    }
    matches(_node, _matching) {
      return null;
    }
  }
  return MatcherBase;
}
function requiresSpace(a, b) {
  const tail = Array.isArray(a) ? a.findLast((node2) => node2.textContent)?.textContent : a;
  const head = Array.isArray(b) ? b.find((node2) => node2.textContent)?.textContent : b;
  const trailingChar = tail ? tail[tail.length - 1] : "";
  const leadingChar = head ? head[0] : "";
  const noSpaceAfter = ["", "(", "{", "}", ";", "["];
  const noSpaceBefore = ["", "(", ")", ",", ":", "*", "{", ";", "]"];
  return !/\s/.test(trailingChar) && !/\s/.test(leadingChar) && !noSpaceAfter.includes(trailingChar) && !noSpaceBefore.includes(leadingChar);
}
function declaration(rule) {
  const cssParser = (void 0).cssLanguage.parser;
  return cssParser.parse(rule).topNode.getChild("RuleSet")?.getChild("Block")?.getChild("Declaration") ?? null;
}
function tokenizeDeclaration(propertyName, propertyValue) {
  const name = tokenizePropertyName(propertyName);
  if (!name) {
    return null;
  }
  const rule = `*{${name}: ${propertyValue};}`;
  const decl = declaration(rule);
  if (!decl || decl.type.isError) {
    return null;
  }
  const childNodes = ASTUtils.children(decl);
  if (childNodes.length < 2) {
    return null;
  }
  const [varName, colon, tree] = childNodes;
  if (!varName || varName.type.isError || !colon || colon.type.isError || tree?.type.isError) {
    return null;
  }
  const trailingNodes = ASTUtils.siblings(decl).slice(1);
  const [semicolon, brace] = trailingNodes.splice(trailingNodes.length - 2, 2);
  if (semicolon?.name !== ";" && brace?.name !== "}") {
    return null;
  }
  const ast2 = new SyntaxTree(propertyValue, rule, decl, name, trailingNodes);
  if (ast2.text(varName) !== name || colon.name !== ":") {
    return null;
  }
  return ast2;
}
function tokenizePropertyName(name) {
  const rule = `*{${name}: inherit;}`;
  const decl = declaration(rule);
  if (!decl || decl.type.isError) {
    return null;
  }
  const propertyName = decl.getChild("PropertyName") ?? decl.getChild("VariableName");
  if (!propertyName) {
    return null;
  }
  return nodeText(propertyName, rule);
}
function matchDeclaration(name, value, matchers) {
  const ast2 = tokenizeDeclaration(name, value);
  const matchedResult = ast2 && BottomUpTreeMatching.walk(ast2, matchers);
  ast2?.trailingNodes.forEach((n) => matchedResult?.matchText(n));
  return matchedResult;
}
function styleSheetHeaderForRule(cssModel, { styleSheetId }) {
  return styleSheetId && cssModel.styleSheetHeaderForId(styleSheetId) || null;
}
function containsStyle(styles2, query) {
  if (!query.styleSheetId || !query.range) {
    return false;
  }
  for (const style of styles2) {
    if (query.styleSheetId === style.styleSheetId && style.range && query.range.equal(style.range)) {
      return true;
    }
  }
  return false;
}
function containsCustomProperties(style) {
  const properties2 = style.allProperties();
  return properties2.some((property) => cssMetadata().isCustomProperty(property.name));
}
function containsInherited(style) {
  const properties2 = style.allProperties();
  for (let i = 0; i < properties2.length; ++i) {
    const property = properties2[i];
    if (property.activeInStyle() && cssMetadata().isPropertyInherited(property.name)) {
      return true;
    }
  }
  return false;
}
function cleanUserAgentPayload(payload) {
  for (const ruleMatch of payload) {
    cleanUserAgentSelectors(ruleMatch);
  }
  const cleanMatchedPayload = [];
  for (const ruleMatch of payload) {
    const lastMatch = cleanMatchedPayload[cleanMatchedPayload.length - 1];
    if (!lastMatch || ruleMatch.rule.origin !== "user-agent" || lastMatch.rule.origin !== "user-agent" || ruleMatch.rule.selectorList.text !== lastMatch.rule.selectorList.text || mediaText(ruleMatch) !== mediaText(lastMatch)) {
      cleanMatchedPayload.push(ruleMatch);
      continue;
    }
    mergeRule(ruleMatch, lastMatch);
  }
  return cleanMatchedPayload;
  function mergeRule(from2, to) {
    const shorthands = /* @__PURE__ */ new Map();
    const properties2 = /* @__PURE__ */ new Map();
    for (const entry of to.rule.style.shorthandEntries) {
      shorthands.set(entry.name, entry.value);
    }
    for (const entry of to.rule.style.cssProperties) {
      properties2.set(entry.name, entry.value);
    }
    for (const entry of from2.rule.style.shorthandEntries) {
      shorthands.set(entry.name, entry.value);
    }
    for (const entry of from2.rule.style.cssProperties) {
      properties2.set(entry.name, entry.value);
    }
    to.rule.style.shorthandEntries = [...shorthands.entries()].map(([name, value]) => ({ name, value }));
    to.rule.style.cssProperties = [...properties2.entries()].map(([name, value]) => ({ name, value }));
  }
  function mediaText(ruleMatch) {
    if (!ruleMatch.rule.media) {
      return null;
    }
    return ruleMatch.rule.media.map((media) => media.text).join(", ");
  }
  function cleanUserAgentSelectors(ruleMatch) {
    const { matchingSelectors, rule } = ruleMatch;
    if (rule.origin !== "user-agent" || !matchingSelectors.length) {
      return;
    }
    rule.selectorList.selectors = rule.selectorList.selectors.filter((_, i) => matchingSelectors.includes(i));
    rule.selectorList.text = rule.selectorList.selectors.map((item) => item.text).join(", ");
    ruleMatch.matchingSelectors = matchingSelectors.map((_, i) => i);
  }
}
function customHighlightNamesToMatchingSelectorIndices(ruleMatch) {
  const highlightNamesToMatchingSelectors = /* @__PURE__ */ new Map();
  for (let i = 0; i < ruleMatch.matchingSelectors.length; i++) {
    const matchingSelectorIndex = ruleMatch.matchingSelectors[i];
    const selectorText = ruleMatch.rule.selectorList.selectors[matchingSelectorIndex].text;
    const highlightNameMatch = selectorText.match(/::highlight\((.*)\)/);
    if (highlightNameMatch) {
      const highlightName = highlightNameMatch[1];
      const selectorsForName = highlightNamesToMatchingSelectors.get(highlightName);
      if (selectorsForName) {
        selectorsForName.push(matchingSelectorIndex);
      } else {
        highlightNamesToMatchingSelectors.set(highlightName, [matchingSelectorIndex]);
      }
    }
  }
  return highlightNamesToMatchingSelectors;
}
function queryMatches(style) {
  if (!style.parentRule) {
    return true;
  }
  const parentRule = style.parentRule;
  const queries = [...parentRule.media, ...parentRule.containerQueries, ...parentRule.supports, ...parentRule.scopes];
  for (const query of queries) {
    if (!query.active()) {
      return false;
    }
  }
  return true;
}
function isRegular(declaration2) {
  return "ownerStyle" in declaration2;
}
function* forEach(array2, startAfter) {
  const startIdx = startAfter !== void 0 ? array2.indexOf(startAfter) + 1 : 0;
  for (let i = startIdx; i < array2.length; ++i) {
    yield array2[i];
  }
}
function getStatusText(statusCode) {
  const statusTextLookup = {
    100: "Continue",
    101: "Switching Protocols",
    102: "Processing",
    103: "Early Hints",
    200: "OK",
    201: "Created",
    202: "Accepted",
    203: "Non-Authoritative Information",
    204: "No Content",
    205: "Reset Content",
    206: "Partial Content",
    207: "Multi-Status",
    208: "Already Reported",
    226: "IM Used",
    300: "Multiple Choices",
    301: "Moved Permanently",
    302: "Found",
    303: "See Other",
    304: "Not Modified",
    305: "Use Proxy",
    307: "Temporary Redirect",
    308: "Permanent Redirect",
    400: "Bad Request",
    401: "Unauthorized",
    402: "Payment Required",
    403: "Forbidden",
    404: "Not Found",
    405: "Method Not Allowed",
    406: "Not Acceptable",
    407: "Proxy Authentication Required",
    408: "Request Timeout",
    409: "Conflict",
    410: "Gone",
    411: "Length Required",
    412: "Precondition Failed",
    413: "Content Too Large",
    414: "URI Too Long",
    415: "Unsupported Media Type",
    416: "Range Not Satisfiable",
    417: "Expectation Failed",
    418: "I'm a teapot",
    421: "Misdirected Request",
    422: "Unprocessable Content",
    423: "Locked",
    424: "Failed Dependency",
    425: "Too Early",
    426: "Upgrade Required",
    428: "Precondition Required",
    429: "Too Many Requests",
    431: "Request Header Fields Too Large",
    451: "Unavailable For Legal Reasons",
    500: "Internal Server Error",
    501: "Not Implemented",
    502: "Bad Gateway",
    503: "Service Unavailable",
    504: "Gateway Timeout",
    505: "HTTP Version Not Supported",
    506: "Variant Also Negotiates",
    507: "Insufficient Storage",
    508: "Loop Detected",
    510: "Not Extended",
    511: "Network Authentication Required"
  };
  return lockedString(statusTextLookup[statusCode] ?? "");
}
function isSDKModelEvent(arg) {
  return "source" in arg && arg.source instanceof SDKModel;
}
function customUserNetworkConditionsSetting() {
  return Settings.instance().moduleSetting("custom-network-conditions");
}
function activeNetworkThrottlingKeySetting() {
  return Settings.instance().createSetting("active-network-condition-key", "NO_THROTTLING");
}
function keyIsPredefined(key) {
  return !key.startsWith("USER_CUSTOM_SETTING_");
}
function getPredefinedCondition(key) {
  if (!keyIsPredefined(key)) {
    return null;
  }
  return THROTTLING_CONDITIONS_LOOKUP.get(key) ?? null;
}
function getPredefinedOrBlockingCondition(key) {
  return key === "BLOCKING" ? BlockingConditions : getPredefinedCondition(key);
}
function isExtensionInitiator(initiator) {
  return "extensionId" in initiator;
}
function decode(sourceMap2, options2 = DEFAULT_DECODE_OPTIONS) {
  const opts = { ...DEFAULT_DECODE_OPTIONS, ...options2 };
  if ("sections" in sourceMap2) {
    return decodeIndexMap(sourceMap2, {
      ...opts,
      generatedOffset: { line: 0, column: 0 }
    });
  }
  return decodeMap(sourceMap2, opts);
}
function decodeMap(sourceMap2, options2) {
  if (!sourceMap2.scopes || !sourceMap2.names) {
    return { scopes: [], ranges: [], hasVariableAndBindingInfo: false };
  }
  return new Decoder(sourceMap2.scopes, sourceMap2.names, options2).decode();
}
function decodeIndexMap(sourceMap2, options2) {
  const scopeInfo = {
    scopes: [],
    ranges: [],
    hasVariableAndBindingInfo: false
  };
  for (const section of sourceMap2.sections) {
    const { scopes, ranges, hasVariableAndBindingInfo } = decode(section.map, {
      ...options2,
      generatedOffset: section.offset
    });
    for (const scope2 of scopes)
      scopeInfo.scopes.push(scope2);
    for (const range2 of ranges)
      scopeInfo.ranges.push(range2);
    scopeInfo.hasVariableAndBindingInfo ||= hasVariableAndBindingInfo;
  }
  return scopeInfo;
}
function formatterWorkerPool() {
  return FormatterWorkerPool.instance();
}
function locationToPosition(lineEndings, lineNumber, columnNumber) {
  const position = lineNumber ? lineEndings[lineNumber - 1] + 1 : 0;
  return position + columnNumber;
}
function positionToLocation(lineEndings, position) {
  const lineNumber = upperBound2(lineEndings, position - 1, DEFAULT_COMPARATOR2);
  let columnNumber;
  if (!lineNumber) {
    columnNumber = position;
  } else {
    columnNumber = position - lineEndings[lineNumber - 1] - 1;
  }
  return [lineNumber, columnNumber];
}
async function format(contentType, mimeType, content, indent = Settings.instance().moduleSetting("text-editor-indent").get()) {
  if (contentType.isDocumentOrScriptOrStyleSheet()) {
    return await formatScriptContent(mimeType, content, indent);
  }
  return { formattedContent: content, formattedMapping: new IdentityFormatterSourceMapping() };
}
async function formatScriptContent(mimeType, content, indent = Settings.instance().moduleSetting("text-editor-indent").get()) {
  const originalContent = content.replace(/\r\n?|[\n\u2028\u2029]/g, "\n").replace(/^\uFEFF/, "");
  const pool = formatterWorkerPool();
  let formatResult = { content: originalContent, mapping: { original: [], formatted: [] } };
  try {
    formatResult = await pool.format(mimeType, originalContent, indent);
  } catch {
  }
  const originalContentLineEndings = findLineEndingIndexes(originalContent);
  const formattedContentLineEndings = findLineEndingIndexes(formatResult.content);
  const sourceMapping = new FormatterSourceMappingImpl(originalContentLineEndings, formattedContentLineEndings, formatResult.mapping);
  return { formattedContent: formatResult.content, formattedMapping: sourceMapping };
}
function scopeTreeForScript(script) {
  if (script.isWasm()) {
    return Promise.resolve(null);
  }
  let promise = scopeTrees.get(script);
  if (promise === void 0) {
    promise = script.requestContentData().then((content) => {
      if (ContentData.isError(content)) {
        return null;
      }
      const sourceType = script.isModule ? "module" : "script";
      return formatterWorkerPool().javaScriptScopeTree(content.text, sourceType).then((scopeTree) => scopeTree ? { scopeTree, text: content.textObj } : null).catch(() => null);
    });
    scopeTrees.set(script, promise);
  }
  return promise;
}
function buildOriginalScopes(ranges) {
  validateStartBeforeEnd(ranges);
  ranges.sort((a, b) => comparePositions(a.start, b.start) || comparePositions(b.end, a.end));
  const root2 = {
    start: { line: 0, column: 0 },
    end: { line: Number.POSITIVE_INFINITY, column: Number.POSITIVE_INFINITY },
    kind: "Global",
    isStackFrame: false,
    children: [],
    variables: []
  };
  const stack = [root2];
  for (const range2 of ranges) {
    let stackTop = stack.at(-1);
    while (true) {
      if (comparePositions(stackTop.end, range2.start) <= 0) {
        stack.pop();
        stackTop = stack.at(-1);
      } else {
        break;
      }
    }
    if (comparePositions(range2.start, stackTop.end) < 0 && comparePositions(stackTop.end, range2.end) < 0) {
      throw new Error(`Range ${JSON.stringify(range2)} and ${JSON.stringify(stackTop)} partially overlap.`);
    }
    const scope2 = createScopeFrom(range2);
    stackTop.children.push(scope2);
    stack.push(scope2);
  }
  const lastChild = root2.children.at(-1);
  if (lastChild) {
    root2.end = lastChild.end;
  }
  return root2;
}
function validateStartBeforeEnd(ranges) {
  for (const range2 of ranges) {
    if (comparePositions(range2.start, range2.end) >= 0) {
      throw new Error(`Invalid range. End before start: ${JSON.stringify(range2)}`);
    }
  }
}
function createScopeFrom(range2) {
  return {
    ...range2,
    kind: "Function",
    isStackFrame: true,
    children: [],
    variables: []
  };
}
function decodePastaRanges(encodedRanges, names3) {
  const result = [];
  let nameIndex = 0;
  let startLineNumber = 0;
  let startColumnNumber = 0;
  let endLineNumber = 0;
  let endColumnNumber = 0;
  const tokenIter = new TokenIterator2(encodedRanges);
  let atStart = true;
  while (tokenIter.hasNext()) {
    if (atStart) {
      atStart = false;
    } else if (tokenIter.peek() === ",") {
      tokenIter.next();
    } else {
      break;
    }
    nameIndex += tokenIter.nextVLQ();
    startLineNumber = endLineNumber + tokenIter.nextVLQ();
    startColumnNumber += tokenIter.nextVLQ();
    endLineNumber = startLineNumber + tokenIter.nextVLQ();
    endColumnNumber += tokenIter.nextVLQ();
    const name = names3[nameIndex];
    if (name === void 0) {
      continue;
    }
    result.push({
      start: { line: startLineNumber, column: startColumnNumber },
      end: { line: endLineNumber, column: endColumnNumber },
      name
    });
  }
  return result;
}
function comparePositions(a, b) {
  return a.line - b.line || a.column - b.column;
}
function contains(range2, line, column) {
  if (range2.start.line > line || range2.start.line === line && range2.start.column > column) {
    return false;
  }
  if (range2.end.line < line || range2.end.line === line && range2.end.column <= column) {
    return false;
  }
  return true;
}
function parseSourceMap(content) {
  if (content.startsWith(")]}")) {
    content = content.substring(content.indexOf("\n"));
  }
  if (content.charCodeAt(0) === 65279) {
    content = content.slice(1);
  }
  return JSON.parse(content);
}
async function loadSourceMap(resourceLoader, url, debugId, initiator) {
  try {
    if (debugId) {
      const cachedSourceMap = await SourceMapCache.instance().get(debugId);
      if (cachedSourceMap) {
        return cachedSourceMap;
      }
    }
    const { content } = await resourceLoader.loadResource(url, initiator);
    const sourceMap2 = parseSourceMap(content);
    if ("debugId" in sourceMap2 && sourceMap2.debugId) {
      await SourceMapCache.instance().set(sourceMap2.debugId, sourceMap2).catch();
    }
    return sourceMap2;
  } catch (cause) {
    throw new Error(`Could not load content for ${url}: ${cause.message}`, { cause });
  }
}
function frameIdForScript(script) {
  const executionContext = script.executionContext();
  if (executionContext) {
    return executionContext.frameId || null;
  }
  const resourceTreeModel = script.debuggerModel.target().model(ResourceTreeModel);
  if (!resourceTreeModel?.mainFrame) {
    return null;
  }
  return resourceTreeModel.mainFrame.id;
}
async function disassembleWasm(content) {
  const worker = HOST_RUNTIME.createWorker(new URL("../../entrypoints/wasmparser_worker/wasmparser_worker-entrypoint.js", import.meta.url).toString());
  const promise = new Promise((resolve2, reject) => {
    worker.onmessage = ({ data: data32 }) => {
      if ("method" in data32) {
        switch (data32.method) {
          case "disassemble":
            if ("error" in data32) {
              reject(data32.error);
            } else if ("result" in data32) {
              const { lines, offsets, functionBodyOffsets } = data32.result;
              resolve2(new WasmDisassembly(lines, offsets, functionBodyOffsets));
            }
            break;
        }
      }
    };
    worker.onerror = reject;
  });
  worker.postMessage({ method: "disassemble", params: { content } });
  try {
    return await promise;
  } finally {
    worker.terminate();
  }
}
function sortAndMergeRanges(locationRanges) {
  function compare2(p1, p2) {
    return p1.lineNumber - p2.lineNumber || p1.columnNumber - p2.columnNumber;
  }
  function overlap(r1, r2) {
    if (r1.scriptId !== r2.scriptId) {
      return false;
    }
    const n = compare2(r1.start, r2.start);
    if (n < 0) {
      return compare2(r1.end, r2.start) >= 0;
    }
    if (n > 0) {
      return compare2(r1.start, r2.end) <= 0;
    }
    return true;
  }
  if (locationRanges.length === 0) {
    return [];
  }
  locationRanges.sort((r1, r2) => {
    if (r1.scriptId < r2.scriptId) {
      return -1;
    }
    if (r1.scriptId > r2.scriptId) {
      return 1;
    }
    return compare2(r1.start, r2.start) || compare2(r1.end, r2.end);
  });
  let prev = locationRanges[0];
  const merged = [];
  for (let i = 1; i < locationRanges.length; ++i) {
    const curr = locationRanges[i];
    if (overlap(prev, curr)) {
      if (compare2(prev.end, curr.end) <= 0) {
        prev = { ...prev, end: curr.end };
      }
    } else {
      merged.push(prev);
      prev = curr;
    }
  }
  merged.push(prev);
  return merged;
}
async function resolveToObjectInWorld(domNode, worldName) {
  const resourceTreeModel = domNode.domModel().target().model(ResourceTreeModel);
  const pageAgent = domNode.domModel().target().pageAgent();
  for (const frame of resourceTreeModel.frames()) {
    const { executionContextId } = await pageAgent.invoke_createIsolatedWorld({ frameId: frame.id, worldName });
    const object2 = await domNode.resolveToObject(void 0, executionContextId);
    if (object2) {
      return object2;
    }
  }
  return null;
}
function shouldGroupAnimations(firstAnimation, anim) {
  const firstAnimationTimeline = firstAnimation.viewOrScrollTimeline();
  const animationTimeline = anim.viewOrScrollTimeline();
  if (firstAnimationTimeline) {
    return Boolean(animationTimeline && firstAnimationTimeline.sourceNodeId === animationTimeline.sourceNodeId && firstAnimationTimeline.axis === animationTimeline.axis);
  }
  return !animationTimeline && firstAnimation.startTime() === anim.startTime();
}
function extractExceptionMetaData(metaData) {
  if (!metaData) {
    return void 0;
  }
  return { requestId: metaData.requestId || void 0, issueId: metaData.issueId || void 0 };
}
function areAffectedResourcesEquivalent(a, b) {
  return a?.requestId === b?.requestId;
}
function areStackTracesEquivalent(stackTrace1, stackTrace2) {
  if (!stackTrace1 !== !stackTrace2) {
    return false;
  }
  if (!stackTrace1 || !stackTrace2) {
    return true;
  }
  const callFrames1 = stackTrace1.callFrames;
  const callFrames2 = stackTrace2.callFrames;
  if (callFrames1.length !== callFrames2.length) {
    return false;
  }
  for (let i = 0, n = callFrames1.length; i < n; ++i) {
    if (callFrames1[i].scriptId !== callFrames2[i].scriptId || callFrames1[i].functionName !== callFrames2[i].functionName || callFrames1[i].lineNumber !== callFrames2[i].lineNumber || callFrames1[i].columnNumber !== callFrames2[i].columnNumber) {
      return false;
    }
  }
  return areStackTracesEquivalent(stackTrace1.parent, stackTrace2.parent);
}
function makeFixedPresetThrottlingOption(rate) {
  return {
    title: rate === 1 ? i18nLazyString$d(UIStrings$S.noThrottling) : i18nLazyString$d(UIStrings$S.dSlowdown, { PH1: rate }),
    rate: () => rate,
    jslogContext: rate === 1 ? "cpu-no-throttling" : `cpu-throttled-${rate}`
  };
}
function convertPreloadingStatus(status) {
  switch (status) {
    case "Pending":
      return "Pending";
    case "Running":
      return "Running";
    case "Ready":
      return "Ready";
    case "Success":
      return "Success";
    case "Failure":
      return "Failure";
    case "NotSupported":
      return "NotSupported";
  }
  throw new Error("unreachable");
}
function makePreloadingAttemptId(key) {
  let action;
  switch (key.action) {
    case "Prefetch":
      action = "Prefetch";
      break;
    case "Prerender":
      action = "Prerender";
      break;
    case "PrerenderUntilScript":
      action = "PrerenderUntilScript";
      break;
  }
  let targetHint;
  switch (key.targetHint) {
    case void 0:
      targetHint = "undefined";
      break;
    case "Blank":
      targetHint = "Blank";
      break;
    case "Self":
      targetHint = "Self";
      break;
  }
  return `${key.loaderId}:${action}:${key.url}:${targetHint}`;
}
function isBuiltinFrame(rawFrame) {
  return rawFrame.lineNumber === -1 && rawFrame.columnNumber === -1 && !Boolean(rawFrame.scriptId) && !Boolean(rawFrame.url);
}
function compareRawFrames(a, b) {
  const scriptIdCompare = (a.scriptId ?? "").localeCompare(b.scriptId ?? "");
  if (scriptIdCompare !== 0) {
    return scriptIdCompare;
  }
  const urlCompare = (a.url ?? "").localeCompare(b.url ?? "");
  if (urlCompare !== 0) {
    return urlCompare;
  }
  const nameCompare = (a.functionName ?? "").localeCompare(b.functionName ?? "");
  if (nameCompare !== 0) {
    return nameCompare;
  }
  if (a.lineNumber !== b.lineNumber) {
    return a.lineNumber - b.lineNumber;
  }
  return a.columnNumber - b.columnNumber;
}
function metadataForURL(target, frameId, url) {
  const resourceTreeModel = target.model(ResourceTreeModel);
  if (!resourceTreeModel) {
    return null;
  }
  const frame = resourceTreeModel.frameForId(frameId);
  if (!frame) {
    return null;
  }
  return resourceMetadata(frame.resourceForURL(url));
}
function resourceMetadata(resource) {
  if (!resource || typeof resource.contentSize() !== "number" && !resource.lastModified()) {
    return null;
  }
  return new UISourceCodeMetadata(resource.lastModified(), resource.contentSize());
}
function rawModuleIdForScript(script) {
  return `${script.sourceURL}@${script.hash}`;
}
function getRawLocation(callFrame) {
  const { script } = callFrame;
  return {
    rawModuleId: rawModuleIdForScript(script),
    codeOffset: callFrame.location().columnNumber - (script.codeOffset() || 0),
    inlineFrameIndex: callFrame.inlineFrameIndex
  };
}
async function getRemoteObject(callFrame, object2) {
  if (!/^(local|global|operand)$/.test(object2.valueClass)) {
    return { type: "undefined" };
  }
  const index2 = Number(object2.index);
  const expression = `${object2.valueClass}s[${index2}]`;
  const response = await callFrame.debuggerModel.agent.invoke_evaluateOnCallFrame({
    callFrameId: callFrame.id,
    expression,
    silent: true,
    generatePreview: true,
    throwOnSideEffect: true
  });
  if (response.getError() || response.exceptionDetails) {
    return { type: "undefined" };
  }
  return response.result;
}
async function wrapRemoteObject(callFrame, object2, plugin) {
  if (object2.type === "reftype") {
    const obj = await getRemoteObject(callFrame, object2);
    return callFrame.debuggerModel.runtimeModel().createRemoteObject(obj);
  }
  return new ExtensionRemoteObject(callFrame, object2, plugin);
}
function computeScriptRange(script) {
  return new TextRange(script.lineOffset, script.columnOffset, script.endLine, script.endColumn);
}
function computeStyleSheetRange(header) {
  return new TextRange(header.startLine, header.startColumn, header.endLine, header.endColumn);
}
function configToCacheKey2(config4) {
  return JSON.stringify(config4);
}
function isExtensionPayloadMarker2(payload) {
  return payload.dataType === "marker";
}
function isExtensionEntryObj2(payload) {
  const hasTrack = "track" in payload && Boolean(payload.track);
  const validEntryType = payload.dataType === "track-entry" || payload.dataType === void 0;
  return validEntryType && hasTrack;
}
function isConsoleTimestampPayloadTrackEntry2(payload) {
  return payload.url !== void 0 && payload.description !== void 0;
}
function isValidExtensionPayload2(payload) {
  return isExtensionPayloadMarker2(payload) || isExtensionEntryObj2(payload) || isConsoleTimestampPayloadTrackEntry2(payload);
}
function isSyntheticExtensionEntry2(entry) {
  return entry.cat === "devtools.extension";
}
function isTimeRangeAnnotation2(annotation) {
  return annotation.type === "TIME_RANGE";
}
function isEntryLabelAnnotation2(annotation) {
  return annotation.type === "ENTRY_LABEL";
}
function isEntriesLinkAnnotation2(annotation) {
  return annotation.type === "ENTRIES_LINK";
}
function traceEventKeyToValues2(key) {
  const parts = key.split("-");
  const type2 = parts[0];
  switch (type2) {
    case "p":
      if (parts.length !== 5 || !parts.every((part, i) => i === 0 || typeof part === "number" || !isNaN(parseInt(part, 10)))) {
        throw new Error(`Invalid ProfileCallKey: ${key}`);
      }
      return {
        type: parts[0],
        processID: parseInt(parts[1], 10),
        threadID: parseInt(parts[2], 10),
        sampleIndex: parseInt(parts[3], 10),
        protocol: parseInt(parts[4], 10)
      };
    case "r":
      if (parts.length !== 2 || !(typeof parts[1] === "number" || !isNaN(parseInt(parts[1], 10)))) {
        throw new Error(`Invalid RawEvent Key: ${key}`);
      }
      return {
        type: parts[0],
        rawIndex: parseInt(parts[1], 10)
      };
    case "s":
      if (parts.length !== 2 || !(typeof parts[1] === "number" || !isNaN(parseInt(parts[1], 10)))) {
        throw new Error(`Invalid SyntheticEvent Key: ${key}`);
      }
      return {
        type: parts[0],
        rawIndex: parseInt(parts[1], 10)
      };
    case "l": {
      if (parts.length !== 2 || Number.isNaN(parseInt(parts[1], 10))) {
        throw new Error(`Invalid LegacyTimelineFrame Key: ${key}`);
      }
      return {
        type: type2,
        rawIndex: parseInt(parts[1], 10)
      };
    }
    default:
      throw new Error(`Unknown trace event key: ${key}`);
  }
}
function Micro2(value) {
  return value;
}
function Milli2(value) {
  return value;
}
function Seconds2(value) {
  return value;
}
function isNestableAsyncPhase2(phase) {
  return phase === "b" || phase === "e" || phase === "n";
}
function isPhaseAsync2(phase) {
  return isNestableAsyncPhase2(phase) || phase === "S" || phase === "T" || phase === "F" || phase === "p";
}
function isFlowPhase2(phase) {
  return phase === "s" || phase === "t" || phase === "f";
}
function objectIsEvent(obj) {
  return "cat" in obj && "name" in obj && "ts" in obj;
}
function objectIsCallFrame2(object2) {
  return "functionName" in object2 && typeof object2.functionName === "string" && ("scriptId" in object2 && (typeof object2.scriptId === "string" || typeof object2.scriptId === "number")) && ("columnNumber" in object2 && typeof object2.columnNumber === "number") && ("lineNumber" in object2 && typeof object2.lineNumber === "number") && ("url" in object2 && typeof object2.url === "string");
}
function isRunTask2(event) {
  return event.name === "RunTask" && event.ph === "X";
}
function isAuctionWorkletRunningInProcess2(event) {
  return event.name === "AuctionWorkletRunningInProcess";
}
function isAuctionWorkletDoneWithProcess2(event) {
  return event.name === "AuctionWorkletDoneWithProcess";
}
function isLegacyScreenshot2(event) {
  return event.name === "Screenshot" && "id" in event;
}
function isLegacySyntheticScreenshot2(event) {
  return event.name === "Screenshot" && "dataUri" in (event.args ?? {});
}
function isScreenshot2(event) {
  return event.name === "Screenshot" && "source_id" in (event.args ?? {});
}
function isSoftNavigationStart(event) {
  return event.name === "SoftNavigationStart";
}
function isMarkerEvent2(event) {
  if (event.ph === "I" || "n") {
    return markerTypeGuards2.some((fn) => fn(event));
  }
}
function eventIsPageLoadEvent2(event) {
  if (event.ph === "I" || "n") {
    return pageLoadEventTypeGuards2.some((fn) => fn(event));
  }
}
function isTracingSessionIdForWorker2(event) {
  return event.name === "TracingSessionIdForWorker";
}
function isScheduleStyleInvalidationTracking2(event) {
  return event.name === "ScheduleStyleInvalidationTracking";
}
function isStyleRecalcInvalidationTracking2(event) {
  return event.name === "StyleRecalcInvalidationTracking";
}
function isStyleInvalidatorInvalidationTracking2(event) {
  return event.name === "StyleInvalidatorInvalidationTracking";
}
function isBeginCommitCompositorFrame2(event) {
  return event.name === "BeginCommitCompositorFrame";
}
function isParseMetaViewport2(event) {
  return event.name === "ParseMetaViewport";
}
function isLinkPreconnect2(event) {
  return event.name === "LinkPreconnect";
}
function isScheduleStyleRecalculation2(event) {
  return event.name === "ScheduleStyleRecalculation";
}
function isRenderFrameImplCreateChildFrame2(event) {
  return event.name === "RenderFrameImpl::createChildFrame";
}
function isLayoutImageUnsized2(event) {
  return event.name === "LayoutImageUnsized";
}
function isPairableAsyncBegin2(e) {
  return e.ph === "b";
}
function isPairableAsyncEnd2(e) {
  return e.ph === "e";
}
function isPairableAsyncInstant2(e) {
  return e.ph === "n";
}
function isAnimationFrameAsyncStart2(data32) {
  return data32.name === "AnimationFrame" && data32.ph === "b";
}
function isAnimationFrameAsyncEnd2(data32) {
  return data32.name === "AnimationFrame" && data32.ph === "e";
}
function isAnimationFramePresentation2(data32) {
  return data32.name === "AnimationFrame::Presentation";
}
function isPipelineReporter2(event) {
  return event.name === "PipelineReporter";
}
function isSyntheticBased2(event) {
  return "rawSourceEvent" in event;
}
function isJSSample(event) {
  return event.name === "JSSample";
}
function isSyntheticInteraction2(event) {
  return Boolean("interactionId" in event && event.args?.data && "beginEvent" in event.args.data && "endEvent" in event.args.data);
}
function isDrawFrame2(event) {
  return event.name === "DrawFrame" && event.ph === "I";
}
function isBeginFrame2(event) {
  return Boolean(event.name === "BeginFrame" && event.args && "frameSeqId" in event.args);
}
function isDroppedFrame2(event) {
  return Boolean(event.name === "DroppedFrame" && event.args && "frameSeqId" in event.args);
}
function isRequestMainThreadFrame2(event) {
  return event.name === "RequestMainThreadFrame";
}
function isBeginMainThreadFrame2(event) {
  return event.name === "BeginMainThreadFrame";
}
function isNeedsBeginFrameChanged2(event) {
  return event.name === "NeedsBeginFrameChanged";
}
function isCommit2(event) {
  return Boolean(event.name === "Commit" && event.args && "frameSeqId" in event.args);
}
function isRasterTask2(event) {
  return event.name === "RasterTask";
}
function isCompositeLayers2(event) {
  return event.name === "CompositeLayers";
}
function isActivateLayerTree2(event) {
  return event.name === "ActivateLayerTree";
}
function isInvalidationTracking2(event) {
  return isScheduleStyleInvalidationTracking2(event) || isStyleRecalcInvalidationTracking2(event) || isStyleInvalidatorInvalidationTracking2(event) || isLayoutInvalidationTracking2(event);
}
function isDrawLazyPixelRef2(event) {
  return event.name === "Draw LazyPixelRef";
}
function isDecodeLazyPixelRef2(event) {
  return event.name === "Decode LazyPixelRef";
}
function isDecodeImage2(event) {
  return event.name === "Decode Image";
}
function isSelectorStats2(event) {
  return event.name === "SelectorStats";
}
function isRecalcStyle2(event) {
  return event.name === "UpdateLayoutTree";
}
function isLayout2(event) {
  return event.name === "Layout" && Boolean(event.args && "beginData" in event.args);
}
function isInvalidateLayout2(event) {
  return event.name === "InvalidateLayout";
}
function isDebuggerAsyncTaskScheduled2(event) {
  return event.name === "v8::Debugger::AsyncTaskScheduled";
}
function isDebuggerAsyncTaskRun2(event) {
  return event.name === "v8::Debugger::AsyncTaskRun";
}
function ProfileID2(value) {
  return value;
}
function CallFrameID2(value) {
  return value;
}
function SampleIndex2(value) {
  return value;
}
function ProcessID2(value) {
  return value;
}
function ThreadID2(value) {
  return value;
}
function WorkerId2(value) {
  return value;
}
function isComplete2(event) {
  return event.ph === "X";
}
function isBegin2(event) {
  return event.ph === "B";
}
function isEnd2(event) {
  return event.ph === "E";
}
function isDispatch2(event) {
  return event.name === "EventDispatch" && event.ph === "X";
}
function isInstant2(event) {
  return event.ph === "I";
}
function isRendererEvent2(event) {
  return isInstant2(event) || isComplete2(event);
}
function isFireIdleCallback2(event) {
  return event.name === "FireIdleCallback" && event.ph === "X";
}
function isSchedulePostMessage2(event) {
  return event.name === "SchedulePostMessage";
}
function isHandlePostMessage2(event) {
  return event.name === "HandlePostMessage" && event.ph === "X";
}
function isUpdateCounters2(event) {
  return event.name === "UpdateCounters";
}
function isDOMStats2(event) {
  return event.name === "DOMStats";
}
function isThreadName2(event) {
  return event.name === "thread_name";
}
function isProcessName2(event) {
  return event.name === "process_name";
}
function isTracingStartedInBrowser2(event) {
  return event.name === "TracingStartedInBrowser";
}
function isFrameCommittedInBrowser2(event) {
  return event.name === "FrameCommittedInBrowser";
}
function isCommitLoad2(event) {
  return event.name === "CommitLoad";
}
function isAnimation2(event) {
  return event.name === "Animation" && event.cat.includes("devtools.timeline");
}
function isSyntheticAnimation2(event) {
  if (event.name !== "Animation" || !event.cat.includes("devtools.timeline")) {
    return false;
  }
  const data32 = event.args?.data;
  if (!data32) {
    return false;
  }
  return "beginEvent" in data32 && "endEvent" in data32;
}
function isLayoutShift2(event) {
  return event.name === "LayoutShift";
}
function isLayoutInvalidationTracking2(event) {
  return event.name === "LayoutInvalidationTracking";
}
function isFirstContentfulPaint2(event) {
  return event.name === "firstContentfulPaint";
}
function isAnyLargestContentfulPaintCandidate(event) {
  return event.name === "largestContentfulPaint::Candidate" || event.name === "largestContentfulPaint::CandidateForSoftNavigation";
}
function isSoftLargestContentfulPaintCandidate(event) {
  return event.name === "largestContentfulPaint::CandidateForSoftNavigation";
}
function isLargestImagePaintCandidate2(event) {
  return event.name === "LargestImagePaint::Candidate";
}
function isLargestTextPaintCandidate2(event) {
  return event.name === "LargestTextPaint::Candidate";
}
function isMarkLoad2(event) {
  return event.name === "MarkLoad";
}
function isFirstPaint2(event) {
  return event.name === "firstPaint";
}
function isMarkDOMContent2(event) {
  return event.name === "MarkDOMContent";
}
function isInteractiveTime2(event) {
  return event.name === "InteractiveTime";
}
function isEventTiming2(event) {
  return event.name === "EventTiming";
}
function isEventTimingEnd2(event) {
  return isEventTiming2(event) && event.ph === "e";
}
function isEventTimingStart2(event) {
  return isEventTiming2(event) && event.ph === "b";
}
function isGPUTask2(event) {
  return event.name === "GPUTask";
}
function isProfile2(event) {
  return event.name === "Profile";
}
function isSyntheticCpuProfile2(event) {
  return event.name === "CpuProfile" && event.ph === "X";
}
function isProfileChunk2(event) {
  return event.name === "ProfileChunk";
}
function isResourceChangePriority2(event) {
  return event.name === "ResourceChangePriority";
}
function isResourceSendRequest2(event) {
  return event.name === "ResourceSendRequest";
}
function isResourceReceiveResponse2(event) {
  return event.name === "ResourceReceiveResponse";
}
function isResourceMarkAsCached2(event) {
  return event.name === "ResourceMarkAsCached";
}
function isResourceFinish2(event) {
  return event.name === "ResourceFinish";
}
function isResourceWillSendRequest2(event) {
  return event.name === "ResourceWillSendRequest";
}
function isResourceReceivedData2(event) {
  return event.name === "ResourceReceivedData";
}
function isReceivedDataEvent2(event) {
  return event.name === "ResourceReceivedData" || event.name === "ResourceFinish" || event.name === "ResourceReceiveResponse";
}
function isSyntheticNetworkRequest2(event) {
  return event.name === "SyntheticNetworkRequest";
}
function isSyntheticWebSocketConnection2(event) {
  return event.name === "SyntheticWebSocketConnection";
}
function isNetworkTrackEntry2(event) {
  return isSyntheticNetworkRequest2(event) || isSyntheticWebSocketConnection2(event) || isWebSocketTraceEvent2(event);
}
function isPrePaint2(event) {
  return event.name === "PrePaint";
}
function isNavigationStart2(event) {
  return event.name === "navigationStart" && event.args?.data?.documentLoaderURL !== "";
}
function isDidCommitSameDocumentNavigation2(event) {
  return event.name === "RenderFrameHostImpl::DidCommitSameDocumentNavigation" && event.ph === "X";
}
function isMainFrameViewport2(event) {
  return event.name === "PaintTimingVisualizer::Viewport";
}
function isSyntheticUserTiming2(event) {
  if (event.cat !== "blink.user_timing") {
    return false;
  }
  const data32 = event.args?.data;
  if (!data32) {
    return false;
  }
  return "beginEvent" in data32 && "endEvent" in data32;
}
function isSyntheticConsoleTiming2(event) {
  if (event.cat !== "blink.console") {
    return false;
  }
  const data32 = event.args?.data;
  if (!data32) {
    return false;
  }
  return "beginEvent" in data32 && "endEvent" in data32;
}
function isUserTiming2(event) {
  return event.cat === "blink.user_timing";
}
function isDomLoading2(event) {
  return event.name === "domLoading";
}
function isBeginRemoteFontLoad2(event) {
  return event.name === "BeginRemoteFontLoad";
}
function isRemoteFontLoaded2(event) {
  return event.name === "RemoteFontLoaded";
}
function isPerformanceMeasure2(event) {
  return isUserTiming2(event) && isPhaseAsync2(event.ph);
}
function isPerformanceMeasureBegin2(event) {
  return isPerformanceMeasure2(event) && event.ph === "b";
}
function isPerformanceMark2(event) {
  return isUserTiming2(event) && (event.ph === "R" || event.ph === "I");
}
function isConsoleTime2(event) {
  return event.cat === "blink.console" && isPhaseAsync2(event.ph);
}
function isConsoleTimeStamp2(event) {
  return event.ph === "I" && event.name === "TimeStamp";
}
function isUserTimingMeasure2(event) {
  return event.name === "UserTiming::Measure";
}
function isParseHTML2(event) {
  return event.name === "ParseHTML";
}
function isSyntheticLayoutShift2(event) {
  return event.name === "SyntheticLayoutShift";
}
function isSyntheticLayoutShiftCluster2(event) {
  return event.name === "SyntheticLayoutShiftCluster";
}
function isProfileCall2(event) {
  return "callFrame" in event;
}
function isPaint2(event) {
  return event.name === "Paint";
}
function isPaintImage2(event) {
  return event.name === "PaintImage" && event.ph === "X";
}
function isScrollLayer2(event) {
  return event.name === "ScrollLayer" && event.ph === "X";
}
function isSetLayerId2(event) {
  return event.name === "SetLayerTreeId";
}
function isUpdateLayer2(event) {
  return event.name === "UpdateLayer";
}
function isDisplayListItemListSnapshot2(event) {
  return event.name === "cc::DisplayItemList";
}
function isLayerTreeHostImplSnapshot2(event) {
  return event.name === "cc::LayerTreeHostImpl";
}
function isFireAnimationFrame2(event) {
  return event.name === "FireAnimationFrame" && event.ph === "X";
}
function isTimerInstall2(event) {
  return event.name === "TimerInstall";
}
function isTimerFire2(event) {
  return event.name === "TimerFire" && event.ph === "X";
}
function isRequestIdleCallback2(event) {
  return event.name === "RequestIdleCallback";
}
function isWebSocketCreate2(event) {
  return event.name === "WebSocketCreate";
}
function isWebSocketInfo2(event) {
  return event.name === "WebSocketSendHandshakeRequest" || event.name === "WebSocketReceiveHandshakeResponse" || event.name === "WebSocketDestroy";
}
function isWebSocketTransfer2(event) {
  return event.name === "WebSocketSend" || event.name === "WebSocketReceive";
}
function isWebSocketSendHandshakeRequest2(event) {
  return event.name === "WebSocketSendHandshakeRequest";
}
function isWebSocketReceiveHandshakeResponse2(event) {
  return event.name === "WebSocketReceiveHandshakeResponse";
}
function isWebSocketDestroy2(event) {
  return event.name === "WebSocketDestroy";
}
function isWebSocketTraceEvent2(event) {
  return isWebSocketCreate2(event) || isWebSocketInfo2(event) || isWebSocketTransfer2(event);
}
function isWebSocketEvent2(event) {
  return isWebSocketTraceEvent2(event) || isSyntheticWebSocketConnection2(event);
}
function isV8Compile2(event) {
  return event.name === "v8.compile" && event.ph === "X";
}
function isFunctionCall2(event) {
  return event.name === "FunctionCall" && event.ph === "X";
}
function isSchedulePostTaskCallback2(event) {
  return event.name === "SchedulePostTaskCallback";
}
function isRunPostTaskCallback2(event) {
  return event.name === "RunPostTaskCallback" && event.ph === "X";
}
function isAbortPostTaskCallback2(event) {
  return event.name === "AbortPostTaskCallback" && event.ph === "X";
}
function isJSInvocationEvent2(event) {
  switch (event.name) {
    case "RunMicrotasks":
    case "FunctionCall":
    case "EvaluateScript":
    case "v8.evaluateModule":
    case "EventDispatch":
    case "V8.Execute":
    case "V8Console::runTask":
      return true;
  }
  if (event.name.startsWith("v8") || event.name.startsWith("V8")) {
    return true;
  }
  if (isConsoleRunTask2(event)) {
    return true;
  }
  return false;
}
function isConsoleRunTask2(event) {
  return event.name === "V8Console::runTask";
}
function isFlowPhaseEvent2(event) {
  return event.ph === "s" || event.ph === "t" || event.ph === "f";
}
function isParseAuthorStyleSheetEvent2(event) {
  return event.name === "ParseAuthorStyleSheet" && event.ph === "X";
}
function isLegacyTimelineFrame2(data32) {
  return "idle" in data32 && typeof data32.idle === "boolean";
}
function isRundownScriptCompiled2(event) {
  return event.cat === "disabled-by-default-devtools.target-rundown";
}
function isRundownScript2(event) {
  return event.cat === "disabled-by-default-devtools.v8-source-rundown" && event.name === "ScriptCatchup";
}
function isRundownScriptSource2(event) {
  return event.cat === "disabled-by-default-devtools.v8-source-rundown-sources" && event.name === "ScriptCatchup";
}
function isRundownScriptSourceLarge2(event) {
  return event.cat === "disabled-by-default-devtools.v8-source-rundown-sources" && event.name === "LargeScriptCatchup";
}
function isAnyScriptSourceEvent2(event) {
  return event.cat === "disabled-by-default-devtools.v8-source-rundown-sources";
}
function isPreloadRenderBlockingStatusChangeEvent(event) {
  return event.name === "PreloadRenderBlockingStatusChange";
}
function getEntityForEvent2(event, entityMappings4) {
  const url = getNonResolvedURL2(event);
  if (!url) {
    return;
  }
  return getEntityForUrl2(url, entityMappings4);
}
function getEntityForUrl2(url, entityMappings4) {
  const cachedByUrl = entityMappings4.entityByUrlCache.get(url);
  if (cachedByUrl) {
    return cachedByUrl;
  }
  const entity = nostatsSubset.getEntity(url) ?? makeUpEntity2(entityMappings4.createdEntityCache, url);
  if (entity) {
    entityMappings4.entityByUrlCache.set(url, entity);
  }
  return entity;
}
function getNonResolvedURL2(entry, handlerData) {
  if (isProfileCall2(entry)) {
    return entry.callFrame.url;
  }
  if (isSyntheticNetworkRequest2(entry)) {
    return entry.args.data.url;
  }
  if (isParseAuthorStyleSheetEvent2(entry) && entry.args) {
    return entry.args.data.stylesheetUrl;
  }
  if (entry.args?.data?.stackTrace && entry.args.data.stackTrace.length > 0) {
    return entry.args.data.stackTrace[0].url;
  }
  if (isParseHTML2(entry)) {
    return entry.args.beginData.url;
  }
  if (handlerData) {
    if (isDecodeImage2(entry)) {
      const paintEvent = handlerData.ImagePainting.paintImageForEvent.get(entry);
      return paintEvent ? getNonResolvedURL2(paintEvent, handlerData) : null;
    }
    if (isDrawLazyPixelRef2(entry) && entry.args?.LazyPixelRef) {
      const paintEvent = handlerData.ImagePainting.paintImageByDrawLazyPixelRef.get(entry.args.LazyPixelRef);
      return paintEvent ? getNonResolvedURL2(paintEvent, handlerData) : null;
    }
  }
  if (entry.args?.data?.url) {
    return entry.args.data.url;
  }
  const requestId = entry.args?.data?.requestId;
  if (handlerData && requestId) {
    const url = handlerData.NetworkRequests.byId.get(requestId)?.args.data.url;
    if (url) {
      return url;
    }
  }
  return null;
}
function makeUpEntity2(entityCache, url) {
  if (url.startsWith("chrome-extension:")) {
    return makeUpChromeExtensionEntity2(entityCache, url);
  }
  if (!url.startsWith("http")) {
    return;
  }
  const rootDomain = nostatsSubset.getRootDomain(url);
  if (!rootDomain) {
    return;
  }
  if (entityCache.has(rootDomain)) {
    return entityCache.get(rootDomain);
  }
  const unrecognizedEntity = {
    name: rootDomain,
    company: rootDomain,
    category: "",
    categories: [],
    domains: [rootDomain],
    averageExecutionTime: 0,
    totalExecutionTime: 0,
    totalOccurrences: 0,
    isUnrecognized: true
  };
  entityCache.set(rootDomain, unrecognizedEntity);
  return unrecognizedEntity;
}
function getChromeExtensionOrigin2(url) {
  return url.protocol + "//" + url.host;
}
function makeUpChromeExtensionEntity2(entityCache, url, extensionName) {
  const parsedUrl = new URL(url);
  const origin = getChromeExtensionOrigin2(parsedUrl);
  const host = new URL(origin).host;
  const name = extensionName || host;
  const cachedEntity = entityCache.get(origin);
  if (cachedEntity) {
    return cachedEntity;
  }
  const chromeExtensionEntity = {
    name,
    company: name,
    category: "Chrome Extension",
    homepage: "https://chromewebstore.google.com/detail/" + host,
    categories: [],
    domains: [origin],
    averageExecutionTime: 0,
    totalExecutionTime: 0,
    totalOccurrences: 0
  };
  entityCache.set(origin, chromeExtensionEntity);
  return chromeExtensionEntity;
}
function addEventToEntityMapping2(event, entityMappings4) {
  if (entityMappings4.entityByEvent.has(event)) {
    return;
  }
  const entity = getEntityForEvent2(event, entityMappings4);
  if (!entity) {
    return;
  }
  const mappedEvents = entityMappings4.eventsByEntity.get(entity);
  if (mappedEvents) {
    mappedEvents.push(event);
  } else {
    entityMappings4.eventsByEntity.set(entity, [event]);
  }
  entityMappings4.entityByEvent.set(event, entity);
}
function addNetworkRequestToEntityMapping2(networkRequest, entityMappings4, requestTraceEvents) {
  const entity = getEntityForEvent2(networkRequest, entityMappings4);
  if (!entity) {
    return;
  }
  const eventsToMap = [networkRequest, ...Object.values(requestTraceEvents).flat()];
  const mappedEvents = entityMappings4.eventsByEntity.get(entity);
  if (mappedEvents) {
    mappedEvents.push(...eventsToMap);
  } else {
    entityMappings4.eventsByEntity.set(entity, eventsToMap);
  }
  for (const evt of eventsToMap) {
    entityMappings4.entityByEvent.set(evt, entity);
  }
}
function timeStampForEventAdjustedByClosestNavigation2(event, traceBounds3, navigationsByNavigationId3, softNavigationsById2, navigationsByFrameId3) {
  let eventTimeStamp = event.ts - traceBounds3.min;
  if (event.name === "largestContentfulPaint::CandidateForSoftNavigation" && event.args?.data?.performanceTimelineNavigationId) {
    const navigationForEvent = softNavigationsById2.get(event.args.data.performanceTimelineNavigationId);
    if (navigationForEvent) {
      eventTimeStamp = event.ts - navigationForEvent.ts;
    }
  } else if (event.args?.data?.navigationId) {
    const navigationForEvent = navigationsByNavigationId3.get(event.args.data.navigationId);
    if (navigationForEvent) {
      eventTimeStamp = event.ts - navigationForEvent.ts;
    }
  } else if (event.args?.data?.frame) {
    const navigationForEvent = getNavigationForTraceEvent2(event, event.args.data.frame, navigationsByFrameId3);
    if (navigationForEvent) {
      eventTimeStamp = event.ts - navigationForEvent.ts;
    }
  }
  return Micro2(eventTimeStamp);
}
function expandWindowByPercentOrToOneMillisecond2(annotationWindow, maxTraceWindow, percentage) {
  let newMin = annotationWindow.min - annotationWindow.range * (percentage / 100) / 2;
  let newMax = annotationWindow.max + annotationWindow.range * (percentage / 100) / 2;
  if (newMax - newMin < 1e3) {
    const rangeMiddle = (annotationWindow.min + annotationWindow.max) / 2;
    newMin = rangeMiddle - 500;
    newMax = rangeMiddle + 500;
  }
  newMin = Math.max(newMin, maxTraceWindow.min);
  newMax = Math.min(newMax, maxTraceWindow.max);
  const expandedWindow = {
    min: Micro2(newMin),
    max: Micro2(newMax),
    range: Micro2(newMax - newMin)
  };
  return expandedWindow;
}
function eventTimingsMicroSeconds2(event) {
  return {
    startTime: event.ts,
    endTime: event.ts + (event.dur ?? 0),
    duration: event.dur || 0
  };
}
function eventTimingsMilliSeconds2(event) {
  return {
    startTime: event.ts / 1e3,
    endTime: (event.ts + (event.dur ?? 0)) / 1e3,
    duration: (event.dur || 0) / 1e3
  };
}
function traceWindowMilliSeconds2(bounds) {
  return {
    min: microToMilli2(bounds.min),
    max: microToMilli2(bounds.max),
    range: microToMilli2(bounds.range)
  };
}
function traceWindowMicroSecondsToMilliSeconds2(bounds) {
  return {
    min: microToMilli2(bounds.min),
    max: microToMilli2(bounds.max),
    range: microToMilli2(bounds.range)
  };
}
function traceWindowFromMilliSeconds2(min, max) {
  const traceWindow = {
    min: milliToMicro2(min),
    max: milliToMicro2(max),
    range: Micro2(milliToMicro2(max) - milliToMicro2(min))
  };
  return traceWindow;
}
function traceWindowFromMicroSeconds2(min, max) {
  const traceWindow = {
    min,
    max,
    range: max - min
  };
  return traceWindow;
}
function traceWindowFromEvent2(event) {
  return {
    min: event.ts,
    max: event.ts + (event.dur ?? 0),
    range: event.dur ?? 0
  };
}
function traceWindowFromOverlay2(overlay) {
  switch (overlay.type) {
    case "ENTRY_LABEL":
    case "ENTRY_OUTLINE":
    case "ENTRY_SELECTED": {
      return traceWindowFromEvent2(overlay.entry);
    }
    case "TIMESPAN_BREAKDOWN": {
      const windows2 = overlay.sections.map((s) => s.bounds);
      if (overlay.entry) {
        windows2.push(traceWindowFromEvent2(overlay.entry));
      }
      return combineTraceWindowsMicro2(windows2);
    }
    case "CANDY_STRIPED_TIME_RANGE":
    case "TIME_RANGE": {
      return structuredClone(overlay.bounds);
    }
    case "ENTRIES_LINK": {
      const from2 = traceWindowFromEvent2(overlay.entryFrom);
      if (!overlay.entryTo) {
        return from2;
      }
      const to = traceWindowFromEvent2(overlay.entryTo);
      return combineTraceWindowsMicro2([from2, to]);
    }
    case "TIMESTAMP_MARKER":
      return traceWindowFromMicroSeconds2(overlay.timestamp, overlay.timestamp);
    case "TIMINGS_MARKER":
      return traceWindowFromMicroSeconds2(overlay.adjustedTimestamp, overlay.adjustedTimestamp);
    case "BOTTOM_INFO_BAR":
      return null;
    default:
      assertNever2(overlay, `Unexpected overlay ${overlay}`);
  }
}
function combineTraceWindowsMicro2(windows2) {
  if (!windows2.length) {
    return null;
  }
  const result = structuredClone(windows2[0]);
  for (const bounds of windows2.slice(1)) {
    result.min = Math.min(result.min, bounds.min);
    result.max = Math.max(result.max, bounds.max);
  }
  result.range = result.max - result.min;
  return result;
}
function boundsIncludeTimeRange2(data32) {
  const { min: visibleMin, max: visibleMax } = data32.bounds;
  const { min: rangeMin, max: rangeMax } = data32.timeRange;
  return visibleMin <= rangeMax && visibleMax >= rangeMin;
}
function eventIsInBounds2(event, bounds) {
  const startTime = event.ts;
  return startTime <= bounds.max && bounds.min < startTime + (event.dur ?? 0);
}
function timestampIsInBounds2(bounds, timestamp) {
  return timestamp >= bounds.min && timestamp <= bounds.max;
}
function windowFitsInsideBounds2(data32) {
  return data32.window.min >= data32.bounds.min && data32.window.max <= data32.bounds.max;
}
function windowsEqual2(w1, w2) {
  return w1.min === w2.min && w1.max === w2.max;
}
function stackTraceInEvent2(event) {
  if (event.args?.data?.stackTrace) {
    return event.args.data.stackTrace;
  }
  if (event.args?.stackTrace) {
    return event.args.stackTrace;
  }
  if (isRecalcStyle2(event)) {
    return event.args.beginData?.stackTrace || null;
  }
  if (isLayout2(event)) {
    return event.args.beginData.stackTrace ?? null;
  }
  if (isFunctionCall2(event)) {
    const data32 = event.args.data;
    if (!data32) {
      return null;
    }
    const { columnNumber, lineNumber, url, scriptId, functionName: functionName2 } = data32;
    if (lineNumber === void 0 || functionName2 === void 0 || columnNumber === void 0 || scriptId === void 0 || url === void 0) {
      return null;
    }
    return [{ columnNumber, lineNumber, url, scriptId, functionName: functionName2 }];
  }
  if (isProfileCall2(event)) {
    const callFrame = event.callFrame;
    if (!callFrame) {
      return null;
    }
    const { columnNumber, lineNumber, url, scriptId, functionName: functionName2 } = callFrame;
    if (lineNumber === void 0 || functionName2 === void 0 || columnNumber === void 0 || scriptId === void 0 || url === void 0) {
      return null;
    }
    return [{ columnNumber, lineNumber, url, scriptId, functionName: functionName2 }];
  }
  return null;
}
function extractOriginFromTrace2(firstNavigationURL) {
  const url = ParsedURL2.fromString(firstNavigationURL);
  if (url) {
    if (url.host.startsWith("www.")) {
      return url.host.slice(4);
    }
    return url.host;
  }
  return null;
}
function addEventToProcessThread2(event, eventsInProcessThread3) {
  const { tid, pid } = event;
  let eventsInThread = eventsInProcessThread3.get(pid);
  if (!eventsInThread) {
    eventsInThread = /* @__PURE__ */ new Map();
  }
  let events = eventsInThread.get(tid);
  if (!events) {
    events = [];
  }
  events.push(event);
  eventsInThread.set(event.tid, events);
  eventsInProcessThread3.set(event.pid, eventsInThread);
}
function compareBeginAndEnd2(aBeginTime, bBeginTime, aEndTime, bEndTime) {
  if (aBeginTime < bBeginTime) {
    return -1;
  }
  if (aBeginTime > bBeginTime) {
    return 1;
  }
  if (aEndTime > bEndTime) {
    return -1;
  }
  if (aEndTime < bEndTime) {
    return 1;
  }
  return 0;
}
function eventTimeComparator2(a, b) {
  const aBeginTime = a.ts;
  const bBeginTime = b.ts;
  const aDuration = a.dur ?? 0;
  const bDuration = b.dur ?? 0;
  const aEndTime = aBeginTime + aDuration;
  const bEndTime = bBeginTime + bDuration;
  const timeDifference = compareBeginAndEnd2(aBeginTime, bBeginTime, aEndTime, bEndTime);
  if (timeDifference) {
    return timeDifference;
  }
  if (isProfileCall2(a) && !isProfileCall2(b)) {
    return -1;
  }
  if (isProfileCall2(b) && !isProfileCall2(a)) {
    return 1;
  }
  return 0;
}
function sortTraceEventsInPlace2(events) {
  events.sort(eventTimeComparator2);
}
function mergeEventsInOrder2(eventsArray1, eventsArray2) {
  const result = [];
  let i = 0;
  let j = 0;
  while (i < eventsArray1.length && j < eventsArray2.length) {
    const event1 = eventsArray1[i];
    const event2 = eventsArray2[j];
    const compareValue = eventTimeComparator2(event1, event2);
    if (compareValue <= 0) {
      result.push(event1);
      i++;
    }
    if (compareValue === 1) {
      result.push(event2);
      j++;
    }
  }
  while (i < eventsArray1.length) {
    result.push(eventsArray1[i++]);
  }
  while (j < eventsArray2.length) {
    result.push(eventsArray2[j++]);
  }
  return result;
}
function parseDevtoolsDetails2(timingDetail, key) {
  try {
    const detailObj = JSON.parse(timingDetail);
    if (!(key in detailObj)) {
      return null;
    }
    if (!isValidExtensionPayload2(detailObj[key])) {
      return null;
    }
    return detailObj[key];
  } catch {
    return null;
  }
}
function getNavigationForTraceEvent2(event, eventFrameId, navigationsByFrameId3) {
  const navigations = navigationsByFrameId3.get(eventFrameId);
  if (!navigations || eventFrameId === "") {
    return null;
  }
  const eventNavigationIndex = nearestIndexFromEnd2(navigations, (navigation2) => navigation2.ts <= event.ts);
  if (eventNavigationIndex === null) {
    return null;
  }
  return navigations[eventNavigationIndex];
}
function extractId2(event) {
  return event.id ?? event.id2?.global ?? event.id2?.local;
}
function activeURLForFrameAtTime2(frameId, time2, rendererProcessesByFrame) {
  const processData = rendererProcessesByFrame.get(frameId);
  if (!processData) {
    return null;
  }
  for (const processes3 of processData.values()) {
    for (const processInfo of processes3) {
      if (processInfo.window.min > time2 || processInfo.window.max < time2) {
        continue;
      }
      return processInfo.frame.url;
    }
  }
  return null;
}
function makeProfileCall2(node2, profileId, sampleIndex, ts, pid, tid) {
  return {
    cat: "",
    name: "ProfileCall",
    nodeId: node2.id,
    args: {},
    ph: "X",
    pid,
    tid,
    ts,
    dur: Micro2(0),
    callFrame: node2.callFrame,
    sampleIndex,
    profileId
  };
}
function matchEvents2(unpairedEvents) {
  sortTraceEventsInPlace2(unpairedEvents);
  const matches = [];
  const beginEventsById = /* @__PURE__ */ new Map();
  const instantEventsById = /* @__PURE__ */ new Map();
  for (const event of unpairedEvents) {
    const id2 = getSyntheticId2(event);
    if (id2 === void 0) {
      continue;
    }
    if (isPairableAsyncBegin2(event)) {
      const existingEvents = beginEventsById.get(id2) ?? [];
      existingEvents.push(event);
      beginEventsById.set(id2, existingEvents);
    } else if (isPairableAsyncInstant2(event)) {
      const existingEvents = instantEventsById.get(id2) ?? [];
      existingEvents.push(event);
      instantEventsById.set(id2, existingEvents);
    } else if (isPairableAsyncEnd2(event)) {
      const beginEventsWithMatchingId = beginEventsById.get(id2) ?? [];
      const beginEvent = beginEventsWithMatchingId.pop();
      if (!beginEvent) {
        continue;
      }
      const instantEventsWithMatchingId = instantEventsById.get(id2) ?? [];
      const instantEventsForThisGroup = [];
      while (instantEventsWithMatchingId.length > 0) {
        if (instantEventsWithMatchingId[0].ts >= beginEvent.ts) {
          const event2 = instantEventsWithMatchingId.pop();
          if (event2) {
            instantEventsForThisGroup.push(event2);
          }
        } else {
          break;
        }
      }
      const matchingGroup = {
        begin: beginEvent,
        end: event,
        instant: instantEventsForThisGroup,
        syntheticId: id2
      };
      matches.push(matchingGroup);
    }
  }
  for (const [id2, beginEvents] of beginEventsById) {
    const beginEvent = beginEvents.pop();
    if (!beginEvent) {
      continue;
    }
    const matchingInstantEvents = instantEventsById.get(id2);
    if (matchingInstantEvents?.length) {
      matches.push({
        syntheticId: id2,
        begin: beginEvent,
        end: null,
        instant: matchingInstantEvents
      });
    }
  }
  return matches;
}
function getSyntheticId2(event) {
  const id2 = extractId2(event);
  return id2 && `${event.cat}:${id2}:${event.name}`;
}
function createSortedSyntheticEvents2(matchedPairs) {
  const syntheticEvents3 = [];
  for (const eventsTriplet of matchedPairs) {
    let eventsArePairable = function(data32) {
      const instantEventsMatch = data32.instantEvents ? data32.instantEvents.some((e) => id2 === getSyntheticId2(e)) : false;
      const endEventMatch = data32.endEvent ? id2 === getSyntheticId2(data32.endEvent) : false;
      return Boolean(id2) && (instantEventsMatch || endEventMatch);
    };
    const id2 = eventsTriplet.syntheticId;
    const beginEvent = eventsTriplet.begin;
    const endEvent = eventsTriplet.end;
    const instantEvents = eventsTriplet.instant;
    if (!beginEvent || !(endEvent || instantEvents)) {
      continue;
    }
    const triplet = { beginEvent, endEvent, instantEvents };
    if (!eventsArePairable(triplet)) {
      continue;
    }
    const targetEvent = endEvent || beginEvent;
    const event = SyntheticEventsManager2.registerSyntheticEvent({
      rawSourceEvent: triplet.beginEvent,
      cat: targetEvent.cat,
      ph: targetEvent.ph,
      pid: targetEvent.pid,
      tid: targetEvent.tid,
      id: id2,
      name: beginEvent.name,
      dur: Micro2(targetEvent.ts - beginEvent.ts),
      ts: beginEvent.ts,
      args: {
        data: triplet
      }
    });
    if (event.dur < 0) {
      continue;
    }
    syntheticEvents3.push(event);
  }
  sortTraceEventsInPlace2(syntheticEvents3);
  return syntheticEvents3;
}
function createMatchedSortedSyntheticEvents2(unpairedAsyncEvents3) {
  const matchedPairs = matchEvents2(unpairedAsyncEvents3);
  const syntheticEvents3 = createSortedSyntheticEvents2(matchedPairs);
  return syntheticEvents3;
}
function getZeroIndexedLineAndColumnForEvent2(event) {
  const numbers = getRawLineAndColumnNumbersForEvent2(event);
  const { lineNumber, columnNumber } = numbers;
  switch (event.name) {
    case "FunctionCall":
    case "EvaluateScript":
    case "v8.compile":
    case "v8.produceCache": {
      return {
        lineNumber: typeof lineNumber === "number" ? lineNumber - 1 : void 0,
        columnNumber: typeof columnNumber === "number" ? columnNumber - 1 : void 0
      };
    }
    case "ProfileCall": {
      const callFrame = event.callFrame;
      return {
        lineNumber: typeof lineNumber === "number" ? callFrame.lineNumber - 1 : void 0,
        columnNumber: typeof columnNumber === "number" ? callFrame.columnNumber - 1 : void 0
      };
    }
    default: {
      return numbers;
    }
  }
}
function getZeroIndexedStackTraceInEventPayload2(event) {
  const stack = stackTraceInEvent2(event);
  if (!stack) {
    return null;
  }
  switch (event.name) {
    case "ScheduleStyleRecalculation":
    case "InvalidateLayout":
    case "FunctionCall":
    case "Layout":
    case "UpdateLayoutTree": {
      return stack.map(makeZeroBasedCallFrame2);
    }
    default: {
      if (isUserTiming2(event) || isSyntheticExtensionEntry2(event)) {
        return stack.map(makeZeroBasedCallFrame2);
      }
      return stack;
    }
  }
}
function getStackTraceTopCallFrameInEventPayload2(event) {
  const stack = stackTraceInEvent2(event);
  if (!stack || stack.length === 0) {
    return null;
  }
  switch (event.name) {
    case "ScheduleStyleRecalculation":
    case "InvalidateLayout":
    case "FunctionCall":
    case "Layout":
    case "UpdateLayoutTree": {
      return makeZeroBasedCallFrame2(stack[0]);
    }
    default: {
      if (isUserTiming2(event) || isSyntheticExtensionEntry2(event)) {
        return makeZeroBasedCallFrame2(stack[0]);
      }
      return stack[0];
    }
  }
}
function rawCallFrameForEntry(entry) {
  if (isProfileCall2(entry)) {
    return entry.callFrame;
  }
  const topCallFrame = getStackTraceTopCallFrameInEventPayload2(entry);
  if (topCallFrame) {
    return topCallFrame;
  }
  return null;
}
function makeZeroBasedCallFrame2(callFrame) {
  const normalizedCallFrame = { ...callFrame };
  normalizedCallFrame.lineNumber = callFrame.lineNumber && callFrame.lineNumber - 1;
  normalizedCallFrame.columnNumber = callFrame.columnNumber && callFrame.columnNumber - 1;
  return normalizedCallFrame;
}
function getRawLineAndColumnNumbersForEvent2(event) {
  if (!event.args?.data) {
    return {};
  }
  let lineNumber = void 0;
  let columnNumber = void 0;
  if ("lineNumber" in event.args.data && typeof event.args.data.lineNumber === "number") {
    lineNumber = event.args.data.lineNumber;
  }
  if ("columnNumber" in event.args.data && typeof event.args.data.columnNumber === "number") {
    columnNumber = event.args.data.columnNumber;
  }
  return { lineNumber, columnNumber };
}
function frameIDForEvent2(event) {
  if (event.args && "beginData" in event.args && typeof event.args.beginData === "object" && event.args.beginData !== null && "frame" in event.args.beginData && typeof event.args.beginData.frame === "string") {
    return event.args.beginData.frame;
  }
  if (event.args?.data?.frame) {
    return event.args.data.frame;
  }
  return null;
}
function isTopLevelEvent2(event) {
  return event.cat.includes(DevToolsTimelineEventCategory2) && event.name === "RunTask";
}
function isExtensionUrl2(url) {
  return url.startsWith("extensions:") || url.startsWith("chrome-extension:");
}
function topLevelEventIndexEndingAfter2(events, time2) {
  let index2 = upperBound2(events, time2, (time3, event) => time3 - event.ts) - 1;
  while (index2 > 0 && !isTopLevelEvent2(events[index2])) {
    index2--;
  }
  return Math.max(index2, 0);
}
function findRecalcStyleEvents2(events, startTime, endTime) {
  const foundEvents = [];
  const startEventIndex = topLevelEventIndexEndingAfter2(events, startTime);
  for (let i = startEventIndex; i < events.length; i++) {
    const event = events[i];
    if (!isRecalcStyle2(event)) {
      continue;
    }
    if (event.ts >= (endTime || Infinity)) {
      continue;
    }
    foundEvents.push(event);
  }
  return foundEvents;
}
function findNextEventAfterTimestamp2(candidates, ts) {
  const index2 = nearestIndexFromBeginning2(candidates, (candidate) => ts < candidate.ts);
  return index2 === null ? null : candidates[index2];
}
function findPreviousEventBeforeTimestamp2(candidates, ts) {
  const index2 = nearestIndexFromEnd2(candidates, (candidate) => candidate.ts < ts);
  return index2 === null ? null : candidates[index2];
}
function forEachEvent2(events, config4) {
  const globalStartTime = config4.startTime ?? Micro2(0);
  const globalEndTime = config4.endTime || Micro2(Infinity);
  const ignoreAsyncEvents = config4.ignoreAsyncEvents === false ? false : true;
  const stack = [];
  const startEventIndex = topLevelEventIndexEndingAfter2(events, globalStartTime);
  for (let i = startEventIndex; i < events.length; i++) {
    const currentEvent = events[i];
    const currentEventTimings = eventTimingsMicroSeconds2(currentEvent);
    if (currentEventTimings.endTime < globalStartTime) {
      continue;
    }
    if (currentEventTimings.startTime > globalEndTime) {
      break;
    }
    const isIgnoredAsyncEvent = ignoreAsyncEvents && isPhaseAsync2(currentEvent.ph);
    if (isIgnoredAsyncEvent || isFlowPhase2(currentEvent.ph)) {
      continue;
    }
    let lastEventOnStack = stack.at(-1);
    let lastEventEndTime = lastEventOnStack ? eventTimingsMicroSeconds2(lastEventOnStack).endTime : null;
    while (lastEventOnStack && lastEventEndTime && lastEventEndTime <= currentEventTimings.startTime) {
      stack.pop();
      config4.onEndEvent(lastEventOnStack);
      lastEventOnStack = stack.at(-1);
      lastEventEndTime = lastEventOnStack ? eventTimingsMicroSeconds2(lastEventOnStack).endTime : null;
    }
    if (config4.eventFilter && !config4.eventFilter(currentEvent)) {
      continue;
    }
    if (currentEventTimings.duration) {
      config4.onStartEvent(currentEvent);
      stack.push(currentEvent);
    } else if (config4.onInstantEvent) {
      config4.onInstantEvent(currentEvent);
    }
  }
  while (stack.length) {
    const last2 = stack.pop();
    if (last2) {
      config4.onEndEvent(last2);
    }
  }
}
function eventHasCategory2(event, category) {
  let parsedCategoriesForEvent = parsedCategories2.get(event.cat);
  if (!parsedCategoriesForEvent) {
    parsedCategoriesForEvent = new Set(event.cat.split(",") || []);
  }
  return parsedCategoriesForEvent.has(category);
}
function isMatchingCallFrame2(eventFrame, nodeFrame) {
  return eventFrame.columnNumber === nodeFrame.columnNumber && eventFrame.lineNumber === nodeFrame.lineNumber && String(eventFrame.scriptId) === nodeFrame.scriptId && eventFrame.url === nodeFrame.url && eventFrame.functionName === nodeFrame.functionName;
}
function eventContainsTimestamp2(event, ts) {
  return event.ts <= ts && event.ts + (event.dur || 0) >= ts;
}
function extractSampleTraceId2(event) {
  if (!event.args) {
    return null;
  }
  if ("beginData" in event.args) {
    const beginData = event.args["beginData"];
    return beginData.sampleTraceId ?? null;
  }
  return event.args?.sampleTraceId ?? event.args?.data?.sampleTraceId ?? null;
}
function treify2(entries, options2) {
  const entryToNode5 = /* @__PURE__ */ new Map();
  const stack = [];
  nodeIdCount2 = -1;
  const tree = makeEmptyTraceEntryTree2();
  for (let i = 0; i < entries.length; i++) {
    const event = entries[i];
    if (options2 && !options2.filter.has(event.name)) {
      continue;
    }
    const duration2 = event.dur || 0;
    const nodeId = makeTraceEntryNodeId2();
    const node2 = makeEmptyTraceEntryNode2(event, nodeId);
    if (stack.length === 0) {
      tree.roots.add(node2);
      node2.selfTime = Micro2(duration2);
      stack.push(node2);
      tree.maxDepth = Math.max(tree.maxDepth, stack.length);
      entryToNode5.set(event, node2);
      continue;
    }
    const parentNode = stack.at(-1);
    if (parentNode === void 0) {
      throw new Error("Impossible: no parent node found in the stack");
    }
    const parentEvent = parentNode.entry;
    const begin = event.ts;
    const parentBegin = parentEvent.ts;
    const parentDuration = parentEvent.dur || 0;
    const end = begin + duration2;
    const parentEnd = parentBegin + parentDuration;
    const startsBeforeParent = begin < parentBegin;
    if (startsBeforeParent) {
      throw new Error("Impossible: current event starts before the parent event");
    }
    const startsAfterParent = begin >= parentEnd;
    if (startsAfterParent) {
      stack.pop();
      i--;
      nodeIdCount2--;
      continue;
    }
    const endsAfterParent = end > parentEnd;
    if (endsAfterParent) {
      continue;
    }
    node2.depth = stack.length;
    node2.parent = parentNode;
    parentNode.children.push(node2);
    node2.selfTime = Micro2(duration2);
    if (parentNode.selfTime !== void 0) {
      parentNode.selfTime = Micro2(parentNode.selfTime - (event.dur || 0));
    }
    stack.push(node2);
    tree.maxDepth = Math.max(tree.maxDepth, stack.length);
    entryToNode5.set(event, node2);
  }
  return { tree, entryToNode: entryToNode5 };
}
function walkTreeFromEntry2(entryToNode5, rootEntry, onEntryStart, onEntryEnd) {
  const startNode = entryToNode5.get(rootEntry);
  if (!startNode) {
    return;
  }
  walkTreeByNode2(entryToNode5, startNode, onEntryStart, onEntryEnd);
}
function walkEntireTree2(entryToNode5, tree, onEntryStart, onEntryEnd, traceWindowToInclude, minDuration) {
  for (const rootNode of tree.roots) {
    walkTreeByNode2(entryToNode5, rootNode, onEntryStart, onEntryEnd, traceWindowToInclude, minDuration);
  }
}
function walkTreeByNode2(entryToNode5, rootNode, onEntryStart, onEntryEnd, traceWindowToInclude, minDuration) {
  if (traceWindowToInclude && !treeNodeIsInWindow2(rootNode, traceWindowToInclude)) {
    return;
  }
  if (typeof minDuration !== "undefined") {
    const duration2 = Micro2(rootNode.entry.ts + Micro2(rootNode.entry.dur ?? 0));
    if (duration2 < minDuration) {
      return;
    }
  }
  onEntryStart(rootNode.entry);
  for (const child of rootNode.children) {
    walkTreeByNode2(entryToNode5, child, onEntryStart, onEntryEnd, traceWindowToInclude, minDuration);
  }
  onEntryEnd(rootNode.entry);
}
function treeNodeIsInWindow2(node2, traceWindow) {
  return eventIsInBounds2(node2.entry, traceWindow);
}
function canBuildTreesFromEvents2(events) {
  const stack = [];
  for (const event of events) {
    const startTime = event.ts;
    const endTime = event.ts + (event.dur ?? 0);
    let parent = stack.at(-1);
    if (parent === void 0) {
      stack.push(event);
      continue;
    }
    let parentEndTime = parent.ts + (parent.dur ?? 0);
    while (stack.length && startTime >= parentEndTime) {
      stack.pop();
      parent = stack.at(-1);
      if (parent === void 0) {
        break;
      }
      parentEndTime = parent.ts + (parent.dur ?? 0);
    }
    if (stack.length && endTime > parentEndTime) {
      return false;
    }
    stack.push(event);
  }
  return true;
}
function buildTrackDataFromExtensionEntries2(extensionEntries, extensionTrackData3, entryToNode5) {
  const dataByTrack = /* @__PURE__ */ new Map();
  for (const entry of extensionEntries) {
    const key = entry.devtoolsObj.trackGroup || `track-name-${entry.devtoolsObj.track}`;
    const batchedData = getWithDefault2(dataByTrack, key, () => ({
      name: entry.devtoolsObj.trackGroup || entry.devtoolsObj.track,
      isTrackGroup: Boolean(entry.devtoolsObj.trackGroup),
      entriesByTrack: { [entry.devtoolsObj.track]: [] }
    }));
    if (!batchedData.entriesByTrack[entry.devtoolsObj.track]) {
      batchedData.entriesByTrack[entry.devtoolsObj.track] = [];
    }
    const entriesInTrack = batchedData.entriesByTrack[entry.devtoolsObj.track];
    entriesInTrack.push(entry);
  }
  for (const trackData of dataByTrack.values()) {
    for (const entries of Object.values(trackData.entriesByTrack)) {
      sortTraceEventsInPlace2(entries);
      if (canBuildTreesFromEvents2(entries)) {
        for (const [entry, node2] of treify2(entries).entryToNode) {
          entryToNode5.set(entry, node2);
        }
      }
    }
    extensionTrackData3.push(trackData);
  }
  return { extensionTrackData: extensionTrackData3, entryToNode: entryToNode5 };
}
function isSyntheticNetworkRequestEventRenderBlocking2(event) {
  return !NON_RENDER_BLOCKING_VALUES2.has(event.args.data.renderBlocking);
}
function isSyntheticNetworkRequestHighPriority2(event) {
  return HIGH_NETWORK_PRIORITIES2.has(event.args.data.priority);
}
function parseCacheControl2(header) {
  if (!header) {
    return null;
  }
  const directives = header.split(",").map((directive) => directive.trim());
  const cacheControlOptions = {};
  for (const directive of directives) {
    const [key, value] = directive.split("=").map((part) => part.trim());
    switch (key) {
      case "max-age": {
        const maxAge = parseInt(value, 10);
        if (!isNaN(maxAge)) {
          cacheControlOptions["max-age"] = maxAge;
        }
        break;
      }
      case "no-cache":
        cacheControlOptions["no-cache"] = true;
        break;
      case "no-store":
        cacheControlOptions["no-store"] = true;
        break;
      case "must-revalidate":
        cacheControlOptions["must-revalidate"] = true;
        break;
      case "private":
        cacheControlOptions["private"] = true;
        break;
    }
  }
  return cacheControlOptions;
}
function isSyntheticNetworkRequestLocalhost2(event) {
  try {
    const hostname2 = new URL(event.args.data.url).hostname;
    return SECURE_LOCALHOST_DOMAINS3.includes(hostname2) || hostname2.endsWith(".localhost");
  } catch {
    return false;
  }
}
function threadKey2(data32) {
  return `${data32.pid}-${data32.tid}`;
}
function reset$t() {
  animationFrameStarts2 = /* @__PURE__ */ new Map();
  animationFrameEnds2 = /* @__PURE__ */ new Map();
  animationFrames2 = [];
  presentationForFrame2 = /* @__PURE__ */ new Map();
  animationFramePresentations2 = /* @__PURE__ */ new Map();
  isEnabled2 = false;
}
function handleUserConfig$2(config4) {
  isEnabled2 = config4.enableAnimationsFrameHandler;
}
function handleEvent$t(event) {
  if (!isEnabled2) {
    return;
  }
  if (isAnimationFrameAsyncStart2(event)) {
    const key = threadKey2(event);
    const existing = animationFrameStarts2.get(key) ?? [];
    existing.push(event);
    animationFrameStarts2.set(key, existing);
  } else if (isAnimationFrameAsyncEnd2(event)) {
    const key = threadKey2(event);
    const existing = animationFrameEnds2.get(key) ?? [];
    existing.push(event);
    animationFrameEnds2.set(key, existing);
  } else if (isAnimationFramePresentation2(event) && event.args?.id) {
    animationFramePresentations2.set(event.args.id, event);
  }
}
async function finalize$L() {
  for (const [key, startEvents] of animationFrameStarts2.entries()) {
    const endEvents = animationFrameEnds2.get(key);
    if (!endEvents) {
      continue;
    }
    sortTraceEventsInPlace2(startEvents);
    sortTraceEventsInPlace2(endEvents);
    for (let i = 0; i < startEvents.length; i++) {
      const endEvent = endEvents.at(i);
      if (!endEvent) {
        break;
      }
      const startEvent = startEvents[i];
      const syntheticEvent = SyntheticEventsManager2.registerSyntheticEvent({
        rawSourceEvent: startEvent,
        ...startEvent,
        dur: Micro2(endEvent.ts - startEvent.ts),
        args: {
          data: {
            beginEvent: startEvent,
            endEvent
          }
        }
      });
      animationFrames2.push(syntheticEvent);
      const id2 = startEvent.args?.id;
      if (id2) {
        const presentationEvent = animationFramePresentations2.get(id2);
        if (presentationEvent) {
          presentationForFrame2.set(syntheticEvent, presentationEvent);
        }
      }
    }
  }
}
function data$t() {
  return {
    animationFrames: animationFrames2,
    presentationForFrame: presentationForFrame2
  };
}
function deps$f() {
  return ["Meta"];
}
function reset$s() {
  animations2 = [];
  animationsSyntheticEvents2 = [];
}
function handleEvent$s(event) {
  if (isAnimation2(event)) {
    animations2.push(event);
    return;
  }
}
async function finalize$K() {
  const syntheticEvents3 = createMatchedSortedSyntheticEvents2(animations2);
  animationsSyntheticEvents2.push(...syntheticEvents3);
}
function data$s() {
  return {
    animations: animationsSyntheticEvents2
  };
}
function reset$r() {
  flows2 = [];
  flowEvents2 = [];
  nonFlowEvents2 = [];
  flowDataByGroupToken2 = /* @__PURE__ */ new Map();
  boundFlowData2 = /* @__PURE__ */ new Map();
  flowsById2 = /* @__PURE__ */ new Map();
}
function handleEvent$r(event) {
  if (isFlowPhaseEvent2(event)) {
    flowEvents2.push(event);
    return;
  }
  nonFlowEvents2.push(event);
}
function processNonFlowEvent2(event) {
  const flowDataForEvent = boundFlowData2.get(event.ts)?.get(event.pid)?.get(event.tid)?.get(event.cat);
  if (!flowDataForEvent) {
    return;
  }
  const { flows: flows3, bindingParsed } = flowDataForEvent;
  if (bindingParsed) {
    return;
  }
  for (const flowId of flows3) {
    const flow2 = getWithDefault2(flowsById2, flowId, () => /* @__PURE__ */ new Map());
    flow2.set(event.ts, event);
  }
  flowDataForEvent.bindingParsed = true;
}
function processFlowEvent2(flowPhaseEvent) {
  const flowGroup = flowGroupTokenForFlowPhaseEvent2(flowPhaseEvent);
  switch (flowPhaseEvent.ph) {
    case "s": {
      const flowMetadata = { flowId: flowPhaseEvent.id, times: /* @__PURE__ */ new Map([[flowPhaseEvent.ts, void 0]]) };
      flowDataByGroupToken2.set(flowGroup, flowPhaseEvent.id);
      addFlowIdToEventBinding2(flowPhaseEvent, flowMetadata.flowId);
      return;
    }
    case "t": {
      const flowId = flowDataByGroupToken2.get(flowGroup);
      if (flowId === void 0) {
        return;
      }
      addFlowIdToEventBinding2(flowPhaseEvent, flowId);
      return;
    }
    case "f": {
      const flowId = flowDataByGroupToken2.get(flowGroup);
      if (flowId === void 0) {
        return;
      }
      addFlowIdToEventBinding2(flowPhaseEvent, flowId);
      flowDataByGroupToken2.delete(flowGroup);
    }
  }
}
function addFlowIdToEventBinding2(event, flowId) {
  const flowsByPid = getWithDefault2(boundFlowData2, event.ts, () => /* @__PURE__ */ new Map());
  const flowsByTid = getWithDefault2(flowsByPid, event.pid, () => /* @__PURE__ */ new Map());
  const flowsByCat = getWithDefault2(flowsByTid, event.tid, () => /* @__PURE__ */ new Map());
  const flowData = getWithDefault2(flowsByCat, event.cat, () => ({ flows: /* @__PURE__ */ new Set(), bindingParsed: false }));
  flowData.flows.add(flowId);
}
function flowGroupTokenForFlowPhaseEvent2(event) {
  return `${event.cat}${ID_COMPONENT_SEPARATOR2}${event.name}${ID_COMPONENT_SEPARATOR2}${event.id}`;
}
async function finalize$J() {
  flowEvents2.forEach(processFlowEvent2);
  nonFlowEvents2.forEach(processNonFlowEvent2);
  flows2 = [...flowsById2.values()].map((flowMapping) => [...flowMapping.values()]).map((flow2) => flow2.filter((event) => event !== void 0)).filter((flow2) => flow2.length > 1);
}
function data$r() {
  return {
    flows: flows2
  };
}
function reset$q() {
  runningInProcessEvents2 = /* @__PURE__ */ new Map();
  doneWithProcessEvents2 = /* @__PURE__ */ new Map();
  createdSyntheticEvents2 = /* @__PURE__ */ new Map();
  utilityThreads2 = /* @__PURE__ */ new Map();
  v8HelperThreads2 = /* @__PURE__ */ new Map();
}
function handleEvent$q(event) {
  if (isAuctionWorkletRunningInProcess2(event)) {
    runningInProcessEvents2.set(event.args.data.pid, event);
    return;
  }
  if (isAuctionWorkletDoneWithProcess2(event)) {
    doneWithProcessEvents2.set(event.args.data.pid, event);
    return;
  }
  if (isThreadName2(event)) {
    if (event.args.name === "auction_worklet.CrUtilityMain") {
      utilityThreads2.set(event.pid, event);
      return;
    }
    if (event.args.name === "AuctionV8HelperThread") {
      v8HelperThreads2.set(event.pid, event);
    }
  }
}
function workletType2(input) {
  switch (input) {
    case "seller":
      return "seller";
    case "bidder":
      return "bidder";
    default:
      return "unknown";
  }
}
function makeSyntheticEventBase2(event) {
  return SyntheticEventsManager2.registerSyntheticEvent({
    rawSourceEvent: event,
    name: "SyntheticAuctionWorklet",
    s: "t",
    cat: event.cat,
    tid: event.tid,
    ts: event.ts,
    ph: "I",
    pid: event.args.data.pid,
    host: event.args.data.host,
    target: event.args.data.target,
    type: workletType2(event.args.data.type)
  });
}
async function finalize$I() {
  for (const [pid, utilityThreadNameEvent] of utilityThreads2) {
    const v8HelperEvent = v8HelperThreads2.get(pid);
    if (!v8HelperEvent) {
      continue;
    }
    const runningEvent = runningInProcessEvents2.get(pid);
    const doneWithEvent = doneWithProcessEvents2.get(pid);
    let syntheticEvent = null;
    if (runningEvent) {
      syntheticEvent = {
        ...makeSyntheticEventBase2(runningEvent),
        args: {
          data: {
            runningInProcessEvent: runningEvent,
            utilityThread: utilityThreadNameEvent,
            v8HelperThread: v8HelperEvent
          }
        }
      };
      if (doneWithEvent) {
        syntheticEvent.args.data.doneWithProcessEvent = doneWithEvent;
      }
    } else if (doneWithEvent) {
      syntheticEvent = {
        ...makeSyntheticEventBase2(doneWithEvent),
        args: {
          data: {
            doneWithProcessEvent: doneWithEvent,
            utilityThread: utilityThreadNameEvent,
            v8HelperThread: v8HelperEvent
          }
        }
      };
      if (runningEvent) {
        syntheticEvent.args.data.runningInProcessEvent = runningEvent;
      }
    }
    if (syntheticEvent === null) {
      continue;
    }
    createdSyntheticEvents2.set(pid, syntheticEvent);
  }
}
function data$q() {
  return {
    worklets: createdSyntheticEvents2
  };
}
function makeNewTraceBounds2() {
  return {
    min: Micro2(Number.POSITIVE_INFINITY),
    max: Micro2(Number.NEGATIVE_INFINITY),
    range: Micro2(Number.POSITIVE_INFINITY)
  };
}
function reset$p() {
  navigationsByFrameId2 = /* @__PURE__ */ new Map();
  navigationsByNavigationId2 = /* @__PURE__ */ new Map();
  softNavigationsById = /* @__PURE__ */ new Map();
  finalDisplayUrlByNavigationId2 = /* @__PURE__ */ new Map();
  processNames2 = /* @__PURE__ */ new Map();
  mainFrameNavigations2 = [];
  browserProcessId2 = ProcessID2(-1);
  browserThreadId2 = ThreadID2(-1);
  gpuProcessId2 = ProcessID2(-1);
  gpuThreadId2 = ThreadID2(-1);
  viewportRect2 = null;
  topLevelRendererIds2 = /* @__PURE__ */ new Set();
  threadsInProcess2 = /* @__PURE__ */ new Map();
  rendererProcessesByFrameId2 = /* @__PURE__ */ new Map();
  framesByProcessId2 = /* @__PURE__ */ new Map();
  traceBounds2 = makeNewTraceBounds2();
  traceStartedTimeFromTracingStartedEvent2 = Micro2(-1);
  traceIsGeneric2 = true;
}
function updateRendererProcessByFrame2(event, frame) {
  const framesInProcessById = getWithDefault2(framesByProcessId2, frame.processId, () => /* @__PURE__ */ new Map());
  framesInProcessById.set(frame.frame, frame);
  const rendererProcessInFrame = getWithDefault2(rendererProcessesByFrameId2, frame.frame, () => /* @__PURE__ */ new Map());
  const rendererProcessInfo = getWithDefault2(rendererProcessInFrame, frame.processId, () => {
    return [];
  });
  const lastProcessData = rendererProcessInfo.at(-1);
  if (lastProcessData && lastProcessData.frame.url === frame.url) {
    return;
  }
  rendererProcessInfo.push({
    frame,
    window: {
      min: event.ts,
      max: Micro2(0),
      range: Micro2(0)
    }
  });
}
function handleEvent$p(event) {
  if (traceIsGeneric2 && CHROME_WEB_TRACE_EVENTS2.has(event.name)) {
    traceIsGeneric2 = false;
  }
  if (isProcessName2(event)) {
    processNames2.set(event.pid, event);
  }
  if (event.ts !== 0 && !event.name.endsWith("::UMA") && eventPhasesOfInterestForTraceBounds2.has(event.ph)) {
    traceBounds2.min = Micro2(Math.min(event.ts, traceBounds2.min));
    const eventDuration = event.dur ?? Micro2(0);
    traceBounds2.max = Micro2(Math.max(event.ts + eventDuration, traceBounds2.max));
  }
  if (isProcessName2(event) && (event.args.name === "Browser" || event.args.name === "HeadlessBrowser")) {
    browserProcessId2 = event.pid;
    return;
  }
  if (isProcessName2(event) && (event.args.name === "Gpu" || event.args.name === "GPU Process")) {
    gpuProcessId2 = event.pid;
    return;
  }
  if (isThreadName2(event) && event.args.name === "CrGpuMain") {
    gpuThreadId2 = event.tid;
    return;
  }
  if (isThreadName2(event) && event.args.name === "CrBrowserMain") {
    browserThreadId2 = event.tid;
  }
  if (isMainFrameViewport2(event) && viewportRect2 === null) {
    const rectAsArray = event.args.data.viewport_rect;
    const viewportX = rectAsArray[0];
    const viewportY = rectAsArray[1];
    const viewportWidth = rectAsArray[2];
    const viewportHeight = rectAsArray[5];
    viewportRect2 = { x: viewportX, y: viewportY, width: viewportWidth, height: viewportHeight };
    devicePixelRatio3 = event.args.data.dpr;
  }
  if (isTracingStartedInBrowser2(event)) {
    traceStartedTimeFromTracingStartedEvent2 = event.ts;
    if (!event.args.data) {
      throw new Error("No frames found in trace data");
    }
    for (const frame of event.args.data.frames ?? []) {
      updateRendererProcessByFrame2(event, frame);
      if (!frame.parent) {
        topLevelRendererIds2.add(frame.processId);
      }
      const traceHasPrimaryMainFrameFlag = "isInPrimaryMainFrame" in frame;
      const traceHasOutermostMainFrameFlag = "isOutermostMainFrame" in frame;
      if (traceHasPrimaryMainFrameFlag && traceHasOutermostMainFrameFlag) {
        if (frame.isInPrimaryMainFrame && frame.isOutermostMainFrame) {
          mainFrameId2 = frame.frame;
          mainFrameURL2 = frame.url;
        }
      } else if (traceHasOutermostMainFrameFlag) {
        if (frame.isOutermostMainFrame) {
          mainFrameId2 = frame.frame;
          mainFrameURL2 = frame.url;
        }
      } else if (!frame.parent && frame.url) {
        mainFrameId2 = frame.frame;
        mainFrameURL2 = frame.url;
      }
    }
    return;
  }
  if (isFrameCommittedInBrowser2(event)) {
    const frame = event.args.data;
    if (!frame) {
      return;
    }
    updateRendererProcessByFrame2(event, frame);
    if (frame.parent) {
      return;
    }
    topLevelRendererIds2.add(frame.processId);
    return;
  }
  if (isCommitLoad2(event)) {
    const frameData = event.args.data;
    if (!frameData) {
      return;
    }
    const { frame, name, url } = frameData;
    updateRendererProcessByFrame2(event, { processId: event.pid, frame, name, url });
    return;
  }
  if (isThreadName2(event)) {
    const threads = getWithDefault2(threadsInProcess2, event.pid, () => /* @__PURE__ */ new Map());
    threads.set(event.tid, event);
    return;
  }
  if (isNavigationStart2(event) && event.args.data) {
    const navigationId = event.args.data.navigationId;
    if (navigationsByNavigationId2.has(navigationId)) {
      return;
    }
    navigationsByNavigationId2.set(navigationId, event);
    finalDisplayUrlByNavigationId2.set(navigationId, event.args.data.documentLoaderURL);
    const frameId = event.args.frame;
    const existingFrameNavigations = navigationsByFrameId2.get(frameId) || [];
    existingFrameNavigations.push(event);
    navigationsByFrameId2.set(frameId, existingFrameNavigations);
    if (frameId === mainFrameId2) {
      mainFrameNavigations2.push(event);
    }
    return;
  }
  if (isSoftNavigationStart(event)) {
    softNavigationsById.set(event.args.context.performanceTimelineNavigationId, event);
  }
  if (isResourceSendRequest2(event)) {
    if (event.args.data.resourceType !== "Document") {
      return;
    }
    const maybeNavigationId = event.args.data.requestId;
    const navigation2 = navigationsByNavigationId2.get(maybeNavigationId);
    if (!navigation2) {
      return;
    }
    finalDisplayUrlByNavigationId2.set(maybeNavigationId, event.args.data.url);
    return;
  }
  if (isDidCommitSameDocumentNavigation2(event)) {
    if (event.args.render_frame_host.frame_type !== "PRIMARY_MAIN_FRAME") {
      return;
    }
    const navigation2 = mainFrameNavigations2.at(-1);
    const key = navigation2?.args.data?.navigationId ?? "";
    finalDisplayUrlByNavigationId2.set(key, event.args.url);
    return;
  }
}
async function finalize$H(options2) {
  config$1 = { showAllEvents: Boolean(options2?.showAllEvents) };
  if (traceStartedTimeFromTracingStartedEvent2 >= 0) {
    traceBounds2.min = traceStartedTimeFromTracingStartedEvent2;
  }
  traceBounds2.range = Micro2(traceBounds2.max - traceBounds2.min);
  for (const [, processWindows] of rendererProcessesByFrameId2) {
    const processWindowValues = [...processWindows.values()].flat().sort((a, b) => {
      return a.window.min - b.window.min;
    });
    for (let i = 0; i < processWindowValues.length; i++) {
      const currentWindow = processWindowValues[i];
      const nextWindow = processWindowValues[i + 1];
      if (!nextWindow) {
        currentWindow.window.max = Micro2(traceBounds2.max);
        currentWindow.window.range = Micro2(traceBounds2.max - currentWindow.window.min);
      } else {
        currentWindow.window.max = Micro2(nextWindow.window.min - 1);
        currentWindow.window.range = Micro2(currentWindow.window.max - currentWindow.window.min);
      }
    }
  }
  for (const [frameId, navigations] of navigationsByFrameId2) {
    if (rendererProcessesByFrameId2.has(frameId)) {
      continue;
    }
    navigationsByFrameId2.delete(frameId);
    for (const navigation2 of navigations) {
      if (!navigation2.args.data) {
        continue;
      }
      navigationsByNavigationId2.delete(navigation2.args.data.navigationId);
    }
  }
  const firstMainFrameNav = mainFrameNavigations2.at(0);
  const firstNavTimeThreshold = secondsToMicro2(Seconds2(0.5));
  if (firstMainFrameNav) {
    const navigationIsWithinThreshold = firstMainFrameNav.ts - traceBounds2.min < firstNavTimeThreshold;
    if (firstMainFrameNav.args.data?.isOutermostMainFrame && firstMainFrameNav.args.data?.documentLoaderURL && navigationIsWithinThreshold) {
      mainFrameURL2 = firstMainFrameNav.args.data.documentLoaderURL;
    }
  }
}
function data$p() {
  return {
    config: config$1,
    traceBounds: traceBounds2,
    browserProcessId: browserProcessId2,
    browserThreadId: browserThreadId2,
    processNames: processNames2,
    gpuProcessId: gpuProcessId2,
    gpuThreadId: gpuThreadId2 === ThreadID2(-1) ? void 0 : gpuThreadId2,
    viewportRect: viewportRect2 || void 0,
    devicePixelRatio: devicePixelRatio3 ?? void 0,
    mainFrameId: mainFrameId2,
    mainFrameURL: mainFrameURL2,
    navigationsByFrameId: navigationsByFrameId2,
    navigationsByNavigationId: navigationsByNavigationId2,
    softNavigationsById,
    finalDisplayUrlByNavigationId: finalDisplayUrlByNavigationId2,
    threadsInProcess: threadsInProcess2,
    rendererProcessesByFrame: rendererProcessesByFrameId2,
    topLevelRendererIds: topLevelRendererIds2,
    frameByProcessId: framesByProcessId2,
    mainFrameNavigations: mainFrameNavigations2,
    traceIsGeneric: traceIsGeneric2
  };
}
function storeTraceEventWithRequestId2(requestId, key, value) {
  if (!requestMap2.has(requestId)) {
    requestMap2.set(requestId, {});
  }
  const traceEvents = requestMap2.get(requestId);
  if (!traceEvents) {
    throw new Error(`Unable to locate trace events for request ID ${requestId}`);
  }
  if (Array.isArray(traceEvents[key])) {
    const target = traceEvents[key];
    const values = value;
    target.push(...values);
  } else {
    traceEvents[key] = value;
  }
}
function firstPositiveValueInList2(entries) {
  for (const entry of entries) {
    if (entry && entry > 0) {
      return entry;
    }
  }
  return 0;
}
function reset$o() {
  requestsById2 = /* @__PURE__ */ new Map();
  requestMap2 = /* @__PURE__ */ new Map();
  requestsByTime2 = [];
  networkRequestEventByInitiatorUrl2 = /* @__PURE__ */ new Map();
  eventToInitiatorMap$1 = /* @__PURE__ */ new Map();
  webSocketData2 = /* @__PURE__ */ new Map();
  requestIdsByURL = /* @__PURE__ */ new Map();
  entityMappings$1 = {
    eventsByEntity: /* @__PURE__ */ new Map(),
    entityByEvent: /* @__PURE__ */ new Map(),
    createdEntityCache: /* @__PURE__ */ new Map(),
    entityByUrlCache: /* @__PURE__ */ new Map()
  };
  linkPreconnectEvents2 = [];
}
function handleEvent$o(event) {
  if (isResourceChangePriority2(event)) {
    storeTraceEventWithRequestId2(event.args.data.requestId, "changePriority", event);
    return;
  }
  if (isResourceWillSendRequest2(event)) {
    storeTraceEventWithRequestId2(event.args.data.requestId, "willSendRequests", [event]);
    return;
  }
  if (isResourceSendRequest2(event)) {
    storeTraceEventWithRequestId2(event.args.data.requestId, "sendRequests", [event]);
    return;
  }
  if (isResourceReceiveResponse2(event)) {
    storeTraceEventWithRequestId2(event.args.data.requestId, "receiveResponse", event);
    return;
  }
  if (isResourceReceivedData2(event)) {
    storeTraceEventWithRequestId2(event.args.data.requestId, "receivedData", [event]);
    return;
  }
  if (isResourceFinish2(event)) {
    storeTraceEventWithRequestId2(event.args.data.requestId, "resourceFinish", event);
    return;
  }
  if (isResourceMarkAsCached2(event)) {
    storeTraceEventWithRequestId2(event.args.data.requestId, "resourceMarkAsCached", event);
    return;
  }
  if (isPreloadRenderBlockingStatusChangeEvent(event)) {
    storeTraceEventWithRequestId2(event.args.data.requestId, "preloadRenderBlockingStatusChange", [event]);
  }
  if (isWebSocketCreate2(event) || isWebSocketInfo2(event) || isWebSocketTransfer2(event)) {
    const identifier = event.args.data.identifier;
    if (!webSocketData2.has(identifier)) {
      if (event.args.data.frame) {
        webSocketData2.set(identifier, {
          frame: event.args.data.frame,
          webSocketIdentifier: identifier,
          events: [],
          syntheticConnection: null
        });
      } else if (event.args.data.workerId) {
        webSocketData2.set(identifier, {
          workerId: event.args.data.workerId,
          webSocketIdentifier: identifier,
          events: [],
          syntheticConnection: null
        });
      }
    }
    webSocketData2.get(identifier)?.events.push(event);
  }
  if (isLinkPreconnect2(event)) {
    linkPreconnectEvents2.push(event);
    return;
  }
}
async function finalize$G() {
  const { rendererProcessesByFrame } = data$p();
  for (const [requestId, request3] of requestMap2.entries()) {
    if (!request3.sendRequests) {
      continue;
    }
    const redirects = [];
    for (let i = 0; i < request3.sendRequests.length - 1; i++) {
      const sendRequest = request3.sendRequests[i];
      const nextSendRequest = request3.sendRequests[i + 1];
      let ts = sendRequest.ts;
      let dur = Micro2(nextSendRequest.ts - sendRequest.ts);
      if (request3.willSendRequests?.[i] && request3.willSendRequests[i + 1]) {
        const willSendRequest = request3.willSendRequests[i];
        const nextWillSendRequest = request3.willSendRequests[i + 1];
        ts = willSendRequest.ts;
        dur = Micro2(nextWillSendRequest.ts - willSendRequest.ts);
      }
      redirects.push({
        url: sendRequest.args.data.url,
        priority: sendRequest.args.data.priority,
        requestMethod: sendRequest.args.data.requestMethod,
        ts,
        dur
      });
    }
    const firstSendRequest = request3.sendRequests[0];
    const finalSendRequest = request3.sendRequests[request3.sendRequests.length - 1];
    if (finalSendRequest.args.data.url.startsWith("data:")) {
      continue;
    }
    const isLightrider = globalThis.isLightrider;
    if (isLightrider && request3.resourceFinish && request3.receiveResponse?.args.data.headers) {
      const lrSizeHeader = request3.receiveResponse.args.data.headers.find((h) => h.name === "X-TotalFetchedSize");
      if (lrSizeHeader) {
        const size = parseFloat(lrSizeHeader.value);
        if (!isNaN(size)) {
          request3.resourceFinish.args.data.encodedDataLength = size;
        }
      }
    }
    const isPushedResource = request3.resourceFinish?.args.data.encodedDataLength !== 0;
    const isDiskCached = !!request3.receiveResponse && request3.receiveResponse.args.data.fromCache && !request3.receiveResponse.args.data.fromServiceWorker && !isPushedResource;
    const isMemoryCached = request3.resourceMarkAsCached !== void 0;
    let timing = isMemoryCached ? void 0 : request3.receiveResponse?.args.data.timing;
    let lrServerResponseTime;
    if (isLightrider && request3.receiveResponse?.args.data.headers) {
      timing = {
        requestTime: microToSeconds2(request3.sendRequests.at(0)?.ts ?? 0),
        connectEnd: 0,
        connectStart: 0,
        dnsEnd: 0,
        dnsStart: 0,
        proxyEnd: 0,
        proxyStart: 0,
        pushEnd: 0,
        pushStart: 0,
        receiveHeadersEnd: 0,
        receiveHeadersStart: 0,
        sendEnd: 0,
        sendStart: 0,
        sslEnd: 0,
        sslStart: 0,
        workerReady: 0,
        workerStart: 0,
        ...timing
      };
      const TCPMsHeader = request3.receiveResponse.args.data.headers.find((h) => h.name === "X-TCPMs");
      const TCPMs = TCPMsHeader ? Math.max(0, parseInt(TCPMsHeader.value, 10)) : 0;
      if (request3.receiveResponse.args.data.protocol.startsWith("h3")) {
        timing.connectStart = 0;
        timing.connectEnd = TCPMs;
      } else {
        timing.connectStart = 0;
        timing.sslStart = TCPMs / 2;
        timing.connectEnd = TCPMs;
        timing.sslEnd = TCPMs;
      }
      const ResponseMsHeader = request3.receiveResponse.args.data.headers.find((h) => h.name === "X-ResponseMs");
      if (ResponseMsHeader) {
        lrServerResponseTime = Math.max(0, parseInt(ResponseMsHeader.value, 10));
      }
    }
    const allowedProtocols2 = [
      "blob:",
      "file:",
      "filesystem:",
      "http:",
      "https:"
    ];
    if (!allowedProtocols2.some((p) => firstSendRequest.args.data.url.startsWith(p))) {
      continue;
    }
    const initialPriority = finalSendRequest.args.data.priority;
    let finalPriority = initialPriority;
    if (request3.changePriority) {
      finalPriority = request3.changePriority.args.data.priority;
    }
    const startTime = request3.willSendRequests?.length ? Micro2(request3.willSendRequests[0].ts) : Micro2(firstSendRequest.ts);
    const endRedirectTime = request3.willSendRequests?.length ? Micro2(request3.willSendRequests[request3.willSendRequests.length - 1].ts) : Micro2(finalSendRequest.ts);
    const endTime = request3.resourceFinish ? request3.resourceFinish.ts : endRedirectTime;
    const finishTime = request3.resourceFinish?.args.data.finishTime ? Micro2(request3.resourceFinish.args.data.finishTime * SECONDS_TO_MICROSECONDS2) : Micro2(endTime);
    const networkDuration = Micro2(timing ? (finishTime || endRedirectTime) - endRedirectTime : 0);
    const processingDuration = Micro2(endTime - (finishTime || endTime));
    const redirectionDuration = Micro2(endRedirectTime - startTime);
    const queueingFromTraceData = timing ? timing.requestTime * SECONDS_TO_MICROSECONDS2 - endRedirectTime : 0;
    const queueing = Micro2(clamp$1(queueingFromTraceData, 0, Number.MAX_VALUE));
    const stalled = timing ? Micro2(firstPositiveValueInList2([
      timing.dnsStart * MILLISECONDS_TO_MICROSECONDS2,
      timing.connectStart * MILLISECONDS_TO_MICROSECONDS2,
      timing.sendStart * MILLISECONDS_TO_MICROSECONDS2,
      request3.receiveResponse ? request3.receiveResponse.ts - endRedirectTime : null
    ])) : request3.receiveResponse ? Micro2(request3.receiveResponse.ts - startTime) : Micro2(0);
    const sendStartTime = timing ? Micro2(timing.requestTime * SECONDS_TO_MICROSECONDS2 + timing.sendStart * MILLISECONDS_TO_MICROSECONDS2) : startTime;
    const waiting = timing ? Micro2((timing.receiveHeadersEnd - timing.sendEnd) * MILLISECONDS_TO_MICROSECONDS2) : Micro2(0);
    const serverResponseTime = timing ? Micro2(((timing.receiveHeadersStart ?? timing.receiveHeadersEnd) - timing.sendEnd) * MILLISECONDS_TO_MICROSECONDS2) : Micro2(0);
    const downloadStart = timing ? Micro2(timing.requestTime * SECONDS_TO_MICROSECONDS2 + timing.receiveHeadersEnd * MILLISECONDS_TO_MICROSECONDS2) : startTime;
    const download = timing ? Micro2((finishTime || downloadStart) - downloadStart) : request3.receiveResponse ? Micro2(endTime - request3.receiveResponse.ts) : Micro2(0);
    const totalTime = Micro2(networkDuration + processingDuration);
    const dnsLookup = timing ? Micro2((timing.dnsEnd - timing.dnsStart) * MILLISECONDS_TO_MICROSECONDS2) : Micro2(0);
    const ssl = timing ? Micro2((timing.sslEnd - timing.sslStart) * MILLISECONDS_TO_MICROSECONDS2) : Micro2(0);
    const proxyNegotiation = timing ? Micro2((timing.proxyEnd - timing.proxyStart) * MILLISECONDS_TO_MICROSECONDS2) : Micro2(0);
    const requestSent = timing ? Micro2((timing.sendEnd - timing.sendStart) * MILLISECONDS_TO_MICROSECONDS2) : Micro2(0);
    const initialConnection = timing ? Micro2((timing.connectEnd - timing.connectStart) * MILLISECONDS_TO_MICROSECONDS2) : Micro2(0);
    const { frame, url, renderBlocking: sendRequestIsRenderBlocking } = finalSendRequest.args.data;
    const { encodedDataLength, decodedBodyLength } = request3.resourceFinish ? request3.resourceFinish.args.data : { encodedDataLength: 0, decodedBodyLength: 0 };
    const parsedUrl = new URL(url);
    const isHttps = parsedUrl.protocol === "https:";
    const requestingFrameUrl = activeURLForFrameAtTime2(frame, finalSendRequest.ts, rendererProcessesByFrame) || "";
    const preloadRenderBlockingStatusChange = request3.preloadRenderBlockingStatusChange?.at(-1)?.args.data.renderBlocking;
    const isRenderBlocking = preloadRenderBlockingStatusChange ?? sendRequestIsRenderBlocking ?? "non_blocking";
    const networkEvent = SyntheticEventsManager2.registerSyntheticEvent({
      rawSourceEvent: finalSendRequest,
      args: {
        data: {
          syntheticData: {
            dnsLookup,
            download,
            downloadStart,
            finishTime,
            initialConnection,
            isDiskCached,
            isHttps,
            isMemoryCached,
            isPushedResource,
            networkDuration,
            processingDuration,
            proxyNegotiation,
            queueing,
            redirectionDuration,
            requestSent,
            sendStartTime,
            ssl,
            stalled,
            totalTime,
            waiting,
            serverResponseTime
          },
          decodedBodyLength,
          encodedDataLength,
          frame,
          fromServiceWorker: request3.receiveResponse?.args.data.fromServiceWorker,
          isLinkPreload: finalSendRequest.args.data.isLinkPreload || false,
          mimeType: request3.receiveResponse?.args.data.mimeType ?? "",
          priority: finalPriority,
          initialPriority,
          protocol: request3.receiveResponse?.args.data.protocol ?? "unknown",
          redirects,
          renderBlocking: isRenderBlocking,
          requestId,
          requestingFrameUrl,
          requestMethod: finalSendRequest.args.data.requestMethod,
          resourceType: finalSendRequest.args.data.resourceType ?? "Other",
          statusCode: request3.receiveResponse?.args.data.statusCode ?? 0,
          responseHeaders: request3.receiveResponse?.args.data.headers ?? null,
          fetchPriorityHint: finalSendRequest.args.data.fetchPriorityHint ?? "auto",
          initiator: finalSendRequest.args.data.initiator,
          stackTrace: finalSendRequest.args.data.stackTrace,
          timing,
          lrServerResponseTime,
          url,
          failed: request3.resourceFinish?.args.data.didFail ?? false,
          finished: Boolean(request3.resourceFinish),
          hasResponse: Boolean(request3.receiveResponse),
          connectionId: request3.receiveResponse?.args.data.connectionId,
          connectionReused: request3.receiveResponse?.args.data.connectionReused
        }
      },
      cat: "loading",
      name: "SyntheticNetworkRequest",
      ph: "X",
      dur: Micro2(endTime - startTime),
      tdur: Micro2(endTime - startTime),
      ts: Micro2(startTime),
      tts: Micro2(startTime),
      pid: finalSendRequest.pid,
      tid: finalSendRequest.tid
    });
    requestsByTime2.push(networkEvent);
    requestsById2.set(networkEvent.args.data.requestId, networkEvent);
    const requestsForUrl = requestIdsByURL.get(networkEvent.args.data.url) ?? [];
    requestsForUrl.push(networkEvent.args.data.requestId);
    requestIdsByURL.set(networkEvent.args.data.url, requestsForUrl);
    addNetworkRequestToEntityMapping2(networkEvent, entityMappings$1, request3);
    const initiatorUrl = networkEvent.args.data.initiator?.url || getStackTraceTopCallFrameInEventPayload2(networkEvent)?.url;
    if (initiatorUrl) {
      const events = networkRequestEventByInitiatorUrl2.get(initiatorUrl) ?? [];
      events.push(networkEvent);
      networkRequestEventByInitiatorUrl2.set(initiatorUrl, events);
    }
  }
  for (const request3 of requestsByTime2) {
    const initiatedEvents = networkRequestEventByInitiatorUrl2.get(request3.args.data.url);
    if (initiatedEvents) {
      for (const initiatedEvent of initiatedEvents) {
        eventToInitiatorMap$1.set(initiatedEvent, request3);
      }
    }
  }
  finalizeWebSocketData2();
}
function data$o() {
  return {
    byId: requestsById2,
    byTime: requestsByTime2,
    requestIdsByURL,
    incompleteInitiator: eventToInitiatorMap$1,
    webSocket: [...webSocketData2.values()],
    entityMappings: {
      entityByEvent: entityMappings$1.entityByEvent,
      eventsByEntity: entityMappings$1.eventsByEntity,
      createdEntityCache: entityMappings$1.createdEntityCache,
      entityByUrlCache: entityMappings$1.entityByUrlCache
    },
    linkPreconnectEvents: linkPreconnectEvents2
  };
}
function deps$e() {
  return ["Meta"];
}
function finalizeWebSocketData2() {
  webSocketData2.forEach((data32) => {
    let startEvent = null;
    let endEvent = null;
    for (const event of data32.events) {
      if (isWebSocketCreate2(event)) {
        startEvent = event;
      }
      if (isWebSocketDestroy2(event)) {
        endEvent = event;
      }
    }
    data32.syntheticConnection = createSyntheticWebSocketConnection2(startEvent, endEvent, data32.events[0]);
  });
}
function createSyntheticWebSocketConnection2(startEvent, endEvent, firstRecordedEvent) {
  const { traceBounds: traceBounds3 } = data$p();
  const startTs = startEvent ? startEvent.ts : traceBounds3.min;
  const endTs = endEvent ? endEvent.ts : traceBounds3.max;
  const duration2 = endTs - startTs;
  const mainEvent = startEvent || endEvent || firstRecordedEvent;
  return {
    name: "SyntheticWebSocketConnection",
    cat: mainEvent.cat,
    ph: "X",
    ts: startTs,
    dur: duration2,
    pid: mainEvent.pid,
    tid: mainEvent.tid,
    s: mainEvent.s,
    rawSourceEvent: mainEvent,
    _tag: "SyntheticEntryTag",
    args: {
      data: {
        identifier: mainEvent.args.data.identifier,
        priority: "Low",
        url: mainEvent.args.data.url || ""
      }
    }
  };
}
function parseCPUProfileData2(parseOptions) {
  const priorityList = parseOptions.isCPUProfile ? PROFILE_SOURCES_BY_PRIORITY.cpuProfile : PROFILE_SOURCES_BY_PRIORITY.performanceTrace;
  for (const [processId, profiles] of preprocessedData2) {
    const profilesByThread = /* @__PURE__ */ new Map();
    for (const [profileId, preProcessedData] of profiles) {
      const threadId = preProcessedData.threadId;
      if (threadId === void 0) {
        continue;
      }
      const listForThread = getWithDefault2(profilesByThread, threadId, () => []);
      listForThread.push({ id: profileId, data: preProcessedData });
    }
    for (const [threadId, candidates] of profilesByThread) {
      let buildProfileCallsForCPUProfile = function() {
        profileModel.forEachFrame(openFrameCallback, closeFrameCallback);
        function openFrameCallback(depth, node2, sampleIndex, timeStampMilliseconds) {
          if (threadId === void 0) {
            return;
          }
          const ts = milliToMicro2(Milli2(timeStampMilliseconds));
          const nodeId = node2.id;
          const profileCall = makeProfileCall2(node2, selectedProfileId, sampleIndex, ts, processId, threadId);
          finalizedData.profileCalls.push(profileCall);
          indexStack.push(finalizedData.profileCalls.length - 1);
          const traceEntryNode = makeEmptyTraceEntryNode2(profileCall, nodeId);
          entryToNode$2.set(profileCall, traceEntryNode);
          traceEntryNode.depth = depth;
          if (indexStack.length === 1) {
            finalizedData.profileTree?.roots.add(traceEntryNode);
          }
        }
        function closeFrameCallback(_depth, _node, _sampleIndex, _timeStampMillis, durMs, selfTimeMs) {
          const profileCallIndex = indexStack.pop();
          const profileCall = profileCallIndex !== void 0 && finalizedData.profileCalls[profileCallIndex];
          if (!profileCall) {
            return;
          }
          const { callFrame, ts, pid, tid } = profileCall;
          const traceEntryNode = entryToNode$2.get(profileCall);
          if (callFrame === void 0 || ts === void 0 || pid === void 0 || selectedProfileId === void 0 || tid === void 0 || traceEntryNode === void 0) {
            return;
          }
          const dur = milliToMicro2(Milli2(durMs));
          const selfTime = milliToMicro2(Milli2(selfTimeMs));
          profileCall.dur = dur;
          traceEntryNode.selfTime = selfTime;
          const parentIndex = indexStack.at(-1);
          const parent = parentIndex !== void 0 && finalizedData.profileCalls.at(parentIndex);
          const parentNode = parent && entryToNode$2.get(parent);
          if (!parentNode) {
            return;
          }
          traceEntryNode.parent = parentNode;
          parentNode.children.push(traceEntryNode);
        }
      };
      if (!candidates.length) {
        continue;
      }
      let chosen = candidates[0];
      for (const source2 of priorityList) {
        const match = candidates.find((p) => p.data.source === source2);
        if (match) {
          chosen = match;
          break;
        }
      }
      const chosenData = chosen.data;
      if (!chosenData.rawProfile.nodes.length) {
        continue;
      }
      const indexStack = [];
      const profileModel = new CPUProfileDataModel2(chosenData.rawProfile);
      const profileTree = makeEmptyTraceEntryTree2();
      profileTree.maxDepth = profileModel.maxDepth;
      const selectedProfileId = chosen.id;
      const finalizedData = {
        rawProfile: chosenData.rawProfile,
        parsedProfile: profileModel,
        profileCalls: [],
        profileTree,
        profileId: selectedProfileId
      };
      const dataByThread = getWithDefault2(profilesInProcess2, processId, () => /* @__PURE__ */ new Map());
      dataByThread.set(threadId, finalizedData);
      if (parseOptions.isCPUProfile) {
        buildProfileCallsForCPUProfile();
      }
    }
  }
}
function reset$n() {
  preprocessedData2 = /* @__PURE__ */ new Map();
  profilesInProcess2 = /* @__PURE__ */ new Map();
  entryToNode$2 = /* @__PURE__ */ new Map();
}
function handleEvent$n(event) {
  if (isSyntheticCpuProfile2(event)) {
    const profileData = getOrCreatePreProcessedData2(event.pid, event.id);
    profileData.rawProfile = event.args.data.cpuProfile;
    profileData.threadId = event.tid;
    return;
  }
  if (isProfile2(event)) {
    const profileData = getOrCreatePreProcessedData2(event.pid, event.id);
    profileData.rawProfile.startTime = event.ts;
    profileData.threadId = event.tid;
    assignProfileSourceIfKnown(profileData, event.args?.data?.source);
    return;
  }
  if (isProfileChunk2(event)) {
    const profileData = getOrCreatePreProcessedData2(event.pid, event.id);
    const cdpProfile = profileData.rawProfile;
    const nodesAndSamples = event.args?.data?.cpuProfile || { samples: [] };
    const samples = nodesAndSamples?.samples || [];
    const traceIds = event.args?.data?.cpuProfile?.trace_ids;
    for (const n of nodesAndSamples?.nodes || []) {
      const lineNumber = typeof n.callFrame.lineNumber === "undefined" ? -1 : n.callFrame.lineNumber;
      const columnNumber = typeof n.callFrame.columnNumber === "undefined" ? -1 : n.callFrame.columnNumber;
      const scriptId = String(n.callFrame.scriptId);
      const url = n.callFrame.url || "";
      const node2 = {
        ...n,
        callFrame: {
          ...n.callFrame,
          url,
          lineNumber,
          columnNumber,
          scriptId
        }
      };
      cdpProfile.nodes.push(node2);
    }
    const timeDeltas = event.args.data?.timeDeltas || [];
    const lines = event.args.data?.lines || Array(samples.length).fill(0);
    const columns = event.args.data?.columns || Array(samples.length).fill(0);
    cdpProfile.samples?.push(...samples);
    cdpProfile.timeDeltas?.push(...timeDeltas);
    cdpProfile.lines?.push(...lines);
    cdpProfile.columns?.push(...columns);
    if (traceIds) {
      cdpProfile.traceIds ??= {};
      for (const key in traceIds) {
        cdpProfile.traceIds[key] = traceIds[key];
      }
    }
    if (cdpProfile.samples && cdpProfile.timeDeltas && cdpProfile.samples.length !== cdpProfile.timeDeltas.length) {
      console.error("Failed to parse CPU profile.");
      return;
    }
    if (!cdpProfile.endTime && cdpProfile.timeDeltas) {
      const timeDeltas2 = cdpProfile.timeDeltas;
      cdpProfile.endTime = timeDeltas2.reduce((x, y) => x + y, cdpProfile.startTime);
    }
    assignProfileSourceIfKnown(profileData, event.args?.data?.source);
    return;
  }
}
async function finalize$F(parseOptions = {}) {
  parseCPUProfileData2(parseOptions);
}
function assignProfileSourceIfKnown(profileData, source2) {
  if (VALID_PROFILE_SOURCES.includes(source2)) {
    profileData.source = source2;
  }
}
function data$n() {
  return {
    profilesInProcess: profilesInProcess2,
    entryToNode: entryToNode$2
  };
}
function getOrCreatePreProcessedData2(processId, profileId) {
  const profileById = getWithDefault2(preprocessedData2, processId, () => /* @__PURE__ */ new Map());
  return getWithDefault2(profileById, profileId, () => ({
    rawProfile: {
      startTime: 0,
      endTime: 0,
      nodes: [],
      samples: [],
      timeDeltas: [],
      lines: [],
      columns: []
    },
    profileId
  }));
}
function getProfileCallFunctionName2(data32, entry) {
  const profile = data32.profilesInProcess.get(entry.pid)?.get(entry.tid);
  const node2 = profile?.parsedProfile.nodeById(entry.nodeId);
  if (node2?.functionName) {
    return node2.functionName;
  }
  return entry.callFrame.functionName;
}
function handleUserConfig$1(userConfig) {
  config3 = userConfig;
}
function reset$m() {
  processes2 = /* @__PURE__ */ new Map();
  entryToNode$1 = /* @__PURE__ */ new Map();
  entityMappings3 = {
    eventsByEntity: /* @__PURE__ */ new Map(),
    entityByEvent: /* @__PURE__ */ new Map(),
    createdEntityCache: /* @__PURE__ */ new Map(),
    entityByUrlCache: /* @__PURE__ */ new Map()
  };
  completeEventStack2 = [];
  compositorTileWorkers2 = [];
}
function handleEvent$m(event) {
  if (isThreadName2(event) && event.args.name?.startsWith("CompositorTileWorker")) {
    compositorTileWorkers2.push({
      pid: event.pid,
      tid: event.tid
    });
  }
  if (isBegin2(event) || isEnd2(event)) {
    const process8 = getOrCreateRendererProcess2(processes2, event.pid);
    const thread = getOrCreateRendererThread2(process8, event.tid);
    const completeEvent = makeCompleteEvent2(event);
    if (!completeEvent) {
      return;
    }
    thread.entries.push(completeEvent);
    return;
  }
  if (isInstant2(event) || isComplete2(event)) {
    const process8 = getOrCreateRendererProcess2(processes2, event.pid);
    const thread = getOrCreateRendererThread2(process8, event.tid);
    thread.entries.push(event);
  }
  if (isLayout2(event)) {
    const process8 = getOrCreateRendererProcess2(processes2, event.pid);
    const thread = getOrCreateRendererThread2(process8, event.tid);
    thread.layoutEvents.push(event);
  }
  if (isRecalcStyle2(event)) {
    const process8 = getOrCreateRendererProcess2(processes2, event.pid);
    const thread = getOrCreateRendererThread2(process8, event.tid);
    thread.recalcStyleEvents.push(event);
  }
}
async function finalize$E() {
  const { mainFrameId: mainFrameId3, rendererProcessesByFrame, threadsInProcess: threadsInProcess3 } = data$p();
  entityMappings3 = data$o().entityMappings;
  assignMeta2(processes2, mainFrameId3, rendererProcessesByFrame, threadsInProcess3);
  sanitizeProcesses2(processes2);
  buildHierarchy2(processes2);
  sanitizeThreads2(processes2);
}
function data$m() {
  return {
    processes: processes2,
    compositorTileWorkers: gatherCompositorThreads2(),
    entryToNode: entryToNode$1,
    entityMappings: {
      entityByEvent: entityMappings3.entityByEvent,
      eventsByEntity: entityMappings3.eventsByEntity,
      createdEntityCache: entityMappings3.createdEntityCache,
      entityByUrlCache: entityMappings3.entityByUrlCache
    }
  };
}
function gatherCompositorThreads2() {
  const threadsByProcess = /* @__PURE__ */ new Map();
  for (const worker of compositorTileWorkers2) {
    const byProcess = threadsByProcess.get(worker.pid) || [];
    byProcess.push(worker.tid);
    threadsByProcess.set(worker.pid, byProcess);
  }
  return threadsByProcess;
}
function assignMeta2(processes3, mainFrameId3, rendererProcessesByFrame, threadsInProcess3) {
  assignOrigin2(processes3, rendererProcessesByFrame);
  assignIsMainFrame2(processes3, mainFrameId3, rendererProcessesByFrame);
  assignThreadName2(processes3, threadsInProcess3);
}
function assignOrigin2(processes3, rendererProcessesByFrame) {
  for (const renderProcessesByPid of rendererProcessesByFrame.values()) {
    for (const [pid, processWindows] of renderProcessesByPid) {
      for (const processInfo of processWindows.flat()) {
        const process8 = getOrCreateRendererProcess2(processes3, pid);
        if (process8.url === null || process8.url === "about:blank") {
          try {
            new URL(processInfo.frame.url);
            process8.url = processInfo.frame.url;
          } catch {
            process8.url = null;
          }
        }
      }
    }
  }
}
function assignIsMainFrame2(processes3, mainFrameId3, rendererProcessesByFrame) {
  for (const [frameId, renderProcessesByPid] of rendererProcessesByFrame) {
    for (const [pid] of renderProcessesByPid) {
      const process8 = getOrCreateRendererProcess2(processes3, pid);
      if (frameId === mainFrameId3) {
        process8.isOnMainFrame = true;
      }
    }
  }
}
function assignThreadName2(processes3, threadsInProcess3) {
  for (const [pid, process8] of processes3) {
    for (const [tid, threadInfo] of threadsInProcess3.get(pid) ?? []) {
      const thread = getOrCreateRendererThread2(process8, tid);
      thread.name = threadInfo?.args.name ?? `${tid}`;
    }
  }
}
function sanitizeProcesses2(processes3) {
  const auctionWorklets = data$q().worklets;
  const metaData = data$p();
  if (metaData.traceIsGeneric) {
    return;
  }
  for (const [pid, process8] of processes3) {
    if (process8.url === null) {
      const maybeWorklet = auctionWorklets.get(pid);
      if (maybeWorklet) {
        process8.url = maybeWorklet.host;
      } else {
        processes3.delete(pid);
      }
      continue;
    }
  }
}
function sanitizeThreads2(processes3) {
  for (const [, process8] of processes3) {
    for (const [tid, thread] of process8.threads) {
      if (!thread.tree?.roots.size) {
        process8.threads.delete(tid);
      }
    }
  }
}
function buildHierarchy2(processes3, options2) {
  const samplesData = data$n();
  for (const [pid, process8] of processes3) {
    for (const [tid, thread] of process8.threads) {
      if (!thread.entries.length) {
        thread.tree = makeEmptyTraceEntryTree2();
        continue;
      }
      sortTraceEventsInPlace2(thread.entries);
      const samplesDataForThread = samplesData.profilesInProcess.get(pid)?.get(tid);
      if (samplesDataForThread) {
        const cpuProfile = samplesDataForThread.parsedProfile;
        const samplesIntegrator = cpuProfile && new SamplesIntegrator2(cpuProfile, samplesDataForThread.profileId, pid, tid, config3);
        const profileCalls = samplesIntegrator?.buildProfileCalls(thread.entries);
        if (samplesIntegrator && profileCalls) {
          thread.entries = mergeEventsInOrder2(thread.entries, profileCalls);
          thread.profileCalls = profileCalls;
          const jsSamples = samplesIntegrator.jsSampleEvents;
          if (jsSamples.length) {
            thread.entries = mergeEventsInOrder2(thread.entries, jsSamples);
          }
        }
      }
      const treeData = treify2(thread.entries, options2);
      thread.tree = treeData.tree;
      for (const [entry, node2] of treeData.entryToNode) {
        entryToNode$1.set(entry, node2);
        addEventToEntityMapping2(entry, entityMappings3);
      }
    }
  }
}
function makeCompleteEvent2(event) {
  if (isEnd2(event)) {
    const beginEvent = completeEventStack2.pop();
    if (!beginEvent) {
      return null;
    }
    if (beginEvent.name !== event.name || beginEvent.cat !== event.cat) {
      console.error("Begin/End events mismatch at " + beginEvent.ts + " (" + beginEvent.name + ") vs. " + event.ts + " (" + event.name + ")");
      return null;
    }
    beginEvent.dur = Micro2(event.ts - beginEvent.ts);
    return null;
  }
  const syntheticComplete = {
    ...event,
    ph: "X",
    dur: Micro2(0)
  };
  completeEventStack2.push(syntheticComplete);
  return syntheticComplete;
}
function deps$d() {
  return ["Meta", "Samples", "AuctionWorklets", "NetworkRequests"];
}
function reset$l() {
  schedulerToRunEntryPoints2 = /* @__PURE__ */ new Map();
  asyncCallToScheduler2 = /* @__PURE__ */ new Map();
  taskScheduleForTaskRunEvent2 = /* @__PURE__ */ new Map();
  runEntryPointToScheduler2 = /* @__PURE__ */ new Map();
}
function handleEvent$l(_) {
}
async function finalize$D() {
  const { flows: flows3 } = data$r();
  const { entryToNode: entryToNode5 } = data$m();
  for (const flow2 of flows3) {
    let maybeAsyncTaskScheduled = flow2.at(0);
    if (!maybeAsyncTaskScheduled) {
      continue;
    }
    if (isDebuggerAsyncTaskRun2(maybeAsyncTaskScheduled)) {
      maybeAsyncTaskScheduled = taskScheduleForTaskRunEvent2.get(maybeAsyncTaskScheduled);
    }
    if (!maybeAsyncTaskScheduled || !isDebuggerAsyncTaskScheduled2(maybeAsyncTaskScheduled)) {
      continue;
    }
    const taskName = maybeAsyncTaskScheduled.args.taskName;
    const asyncTaskRun = flow2.at(1);
    if (!asyncTaskRun || !isDebuggerAsyncTaskRun2(asyncTaskRun)) {
      continue;
    }
    taskScheduleForTaskRunEvent2.set(asyncTaskRun, maybeAsyncTaskScheduled);
    const asyncCaller = findNearestJSAncestor2(maybeAsyncTaskScheduled, entryToNode5);
    const asyncEntryPoint = findFirstJsInvocationForAsyncTaskRun2(asyncTaskRun, entryToNode5);
    runEntryPointToScheduler2.set(asyncEntryPoint || asyncTaskRun, { taskName, scheduler: asyncCaller || maybeAsyncTaskScheduled });
    if (!asyncCaller || !asyncEntryPoint) {
      continue;
    }
    const entryPoints = getWithDefault2(schedulerToRunEntryPoints2, asyncCaller, () => []);
    entryPoints.push(asyncEntryPoint);
    const scheduledProfileCalls = findFirstJSCallsForAsyncTaskRun2(asyncTaskRun, entryToNode5);
    for (const call of scheduledProfileCalls) {
      asyncCallToScheduler2.set(call, { taskName, scheduler: asyncCaller });
    }
  }
}
function findNearestJSAncestor2(asyncTaskScheduled, entryToNode5) {
  let node2 = entryToNode5.get(asyncTaskScheduled)?.parent;
  while (node2) {
    if (isProfileCall2(node2.entry) || acceptJSInvocationsPredicate2(node2.entry)) {
      return node2.entry;
    }
    node2 = node2.parent;
  }
  return null;
}
function acceptJSInvocationsPredicate2(event) {
  const eventIsConsoleRunTask = isConsoleRunTask2(event);
  const eventIsV8EntryPoint = event.name.startsWith("v8") || event.name.startsWith("V8");
  return isJSInvocationEvent2(event) && (eventIsConsoleRunTask || !eventIsV8EntryPoint);
}
function findFirstJsInvocationForAsyncTaskRun2(asyncTaskRun, entryToNode5) {
  return findFirstDescendantsOfType2(asyncTaskRun, entryToNode5, acceptJSInvocationsPredicate2, isDebuggerAsyncTaskRun2).at(0);
}
function findFirstJSCallsForAsyncTaskRun2(asyncTaskRun, entryToNode5) {
  return findFirstDescendantsOfType2(asyncTaskRun, entryToNode5, isProfileCall2, isDebuggerAsyncTaskRun2);
}
function findFirstDescendantsOfType2(root2, entryToNode5, predicateAccept, predicateIgnore) {
  const node2 = entryToNode5.get(root2);
  if (!node2) {
    return [];
  }
  const childrenGroups = [[...node2.children]];
  const firstDescendants = [];
  for (let i = 0; i < childrenGroups.length; i++) {
    const siblings = childrenGroups[i];
    for (let j = 0; j < siblings.length; j++) {
      const node3 = siblings[j];
      if (predicateAccept(node3.entry)) {
        firstDescendants.push(node3.entry);
      } else if (!predicateIgnore(node3.entry)) {
        childrenGroups.push([...node3.children]);
      }
    }
  }
  return firstDescendants;
}
function data$l() {
  return {
    schedulerToRunEntryPoints: schedulerToRunEntryPoints2,
    asyncCallToScheduler: asyncCallToScheduler2,
    runEntryPointToScheduler: runEntryPointToScheduler2
  };
}
function deps$c() {
  return ["Renderer", "Flows"];
}
function reset$k() {
  domStatsByFrameId2 = /* @__PURE__ */ new Map();
}
function handleEvent$k(event) {
  if (!isDOMStats2(event)) {
    return;
  }
  const domStatEvents = getWithDefault2(domStatsByFrameId2, event.args.data.frame, () => []);
  domStatEvents.push(event);
}
async function finalize$C() {
}
function data$k() {
  return { domStatsByFrameId: domStatsByFrameId2 };
}
function reset$j() {
  syntheticEvents2 = [];
  performanceMeasureEvents2 = [];
  performanceMarkEvents2 = [];
  consoleTimings2 = [];
  timestampEvents2 = [];
  measureTraceByTraceId2 = /* @__PURE__ */ new Map();
}
function getEventTimings2(event) {
  if ("dur" in event) {
    return { start: event.ts, end: Micro2(event.ts + (event.dur ?? 0)) };
  }
  if (isConsoleTimeStamp2(event)) {
    const { start, end } = event.args.data || {};
    if (typeof start === "number" && typeof end === "number") {
      return { start: Micro2(start), end: Micro2(end) };
    }
  }
  return { start: event.ts, end: event.ts };
}
function getEventTrack2(event) {
  if (event.cat === "blink.user_timing") {
    const detailString = event.args.data.beginEvent.args?.detail;
    if (detailString) {
      const details = parseDevtoolsDetails2(detailString, "devtools");
      if (details && "track" in details) {
        return details.track;
      }
    }
  } else if (isConsoleTimeStamp2(event)) {
    const track = event.args.data?.track;
    return typeof track === "string" ? track : void 0;
  }
  return void 0;
}
function userTimingComparator2(a, b, originalArray) {
  const { start: aStart, end: aEnd } = getEventTimings2(a);
  const { start: bStart, end: bEnd } = getEventTimings2(b);
  const timeDifference = compareBeginAndEnd2(aStart, bStart, aEnd, bEnd);
  if (timeDifference) {
    return timeDifference;
  }
  const aTrack = getEventTrack2(a);
  const bTrack = getEventTrack2(b);
  if (aTrack !== bTrack) {
    return 0;
  }
  const aIndex = originalArray.indexOf(a);
  const bIndex = originalArray.indexOf(b);
  return bIndex - aIndex;
}
function handleEvent$j(event) {
  if (ignoredNames2.includes(event.name)) {
    return;
  }
  if (isUserTimingMeasure2(event)) {
    measureTraceByTraceId2.set(event.args.traceId, event);
  }
  if (isPerformanceMeasure2(event)) {
    performanceMeasureEvents2.push(event);
    return;
  }
  if (isPerformanceMark2(event)) {
    performanceMarkEvents2.push(event);
  }
  if (isConsoleTime2(event)) {
    consoleTimings2.push(event);
  }
  if (isConsoleTimeStamp2(event)) {
    timestampEvents2.push(event);
  }
}
async function finalize$B() {
  const asyncEvents = [...performanceMeasureEvents2, ...consoleTimings2];
  syntheticEvents2 = createMatchedSortedSyntheticEvents2(asyncEvents);
  syntheticEvents2 = syntheticEvents2.sort((a, b) => userTimingComparator2(a, b, [...syntheticEvents2]));
  timestampEvents2 = timestampEvents2.sort((a, b) => userTimingComparator2(a, b, [...timestampEvents2]));
}
function data$j() {
  return {
    consoleTimings: syntheticEvents2.filter((e) => e.cat === "blink.console"),
    performanceMeasures: syntheticEvents2.filter((e) => e.cat === "blink.user_timing"),
    performanceMarks: performanceMarkEvents2,
    timestampEvents: timestampEvents2,
    measureTraceByTraceId: measureTraceByTraceId2
  };
}
function handleEvent$i(_event) {
}
function reset$i() {
  extensionTrackEntries2 = [];
  syntheticConsoleEntriesForTimingsTrack2 = [];
  extensionTrackData2 = [];
  extensionMarkers2 = [];
  entryToNode4 = /* @__PURE__ */ new Map();
  timeStampByName2 = /* @__PURE__ */ new Map();
}
async function finalize$A() {
  createExtensionFlameChartEntries2();
}
function createExtensionFlameChartEntries2() {
  const pairedMeasures = data$j().performanceMeasures;
  const marks = data$j().performanceMarks;
  const mergedRawExtensionEvents = mergeEventsInOrder2(pairedMeasures, marks);
  extractPerformanceAPIExtensionEntries2(mergedRawExtensionEvents);
  extractConsoleAPIExtensionEntries2();
  sortTraceEventsInPlace2(extensionTrackEntries2);
  buildTrackDataFromExtensionEntries2(extensionTrackEntries2, extensionTrackData2, entryToNode4);
}
function extractConsoleAPIExtensionEntries2() {
  const consoleTimeStamps = data$j().timestampEvents;
  for (const currentTimeStamp of consoleTimeStamps) {
    if (!currentTimeStamp.args.data) {
      continue;
    }
    const timeStampName = String(currentTimeStamp.args.data.name ?? currentTimeStamp.args.data.message);
    timeStampByName2.set(timeStampName, currentTimeStamp);
    const { devtoolsObj: extensionData, userDetail } = extensionDataInConsoleTimeStamp2(currentTimeStamp);
    const start = currentTimeStamp.args.data.start;
    const end = currentTimeStamp.args.data.end;
    if (!extensionData && !start && !end) {
      continue;
    }
    const startTimeStamp = typeof start === "number" ? Micro2(start) : timeStampByName2.get(String(start))?.ts;
    const endTimeStamp = typeof end === "number" ? Micro2(end) : timeStampByName2.get(String(end))?.ts;
    if (endTimeStamp !== void 0 && startTimeStamp === void 0) {
      continue;
    }
    const entryStartTime = startTimeStamp ?? currentTimeStamp.ts;
    const entryEndTime = endTimeStamp ?? currentTimeStamp.ts;
    if (extensionData) {
      const unregisteredExtensionEntry = {
        ...currentTimeStamp,
        name: timeStampName,
        cat: "devtools.extension",
        devtoolsObj: extensionData,
        userDetail,
        rawSourceEvent: currentTimeStamp,
        dur: Micro2(entryEndTime - entryStartTime),
        ts: entryStartTime,
        ph: "X"
      };
      const extensionEntry = SyntheticEventsManager2.registerSyntheticEvent(unregisteredExtensionEntry);
      extensionTrackEntries2.push(extensionEntry);
      continue;
    }
    const unregisteredSyntheticTimeStamp = {
      ...currentTimeStamp,
      name: timeStampName,
      cat: "disabled-by-default-v8.inspector",
      ph: "X",
      ts: entryStartTime,
      dur: Micro2(entryEndTime - entryStartTime),
      rawSourceEvent: currentTimeStamp
    };
    const syntheticTimeStamp = SyntheticEventsManager2.registerSyntheticEvent(unregisteredSyntheticTimeStamp);
    syntheticConsoleEntriesForTimingsTrack2.push(syntheticTimeStamp);
  }
}
function extractPerformanceAPIExtensionEntries2(timings) {
  for (const timing of timings) {
    const { devtoolsObj, userDetail } = extensionDataInPerformanceTiming2(timing);
    if (!devtoolsObj) {
      continue;
    }
    const extensionSyntheticEntry = {
      name: timing.name,
      ph: isExtensionPayloadMarker2(devtoolsObj) ? "I" : "X",
      pid: timing.pid,
      tid: timing.tid,
      ts: timing.ts,
      dur: timing.dur,
      cat: "devtools.extension",
      devtoolsObj,
      userDetail,
      rawSourceEvent: isSyntheticUserTiming2(timing) ? timing.rawSourceEvent : timing
    };
    if (isExtensionPayloadMarker2(devtoolsObj)) {
      const extensionMarker = SyntheticEventsManager2.registerSyntheticEvent(extensionSyntheticEntry);
      extensionMarkers2.push(extensionMarker);
      continue;
    }
    if (isExtensionEntryObj2(extensionSyntheticEntry.devtoolsObj)) {
      const extensionTrackEntry = SyntheticEventsManager2.registerSyntheticEvent(extensionSyntheticEntry);
      extensionTrackEntries2.push(extensionTrackEntry);
      continue;
    }
  }
}
function extensionDataInPerformanceTiming2(timing) {
  const timingDetail = isPerformanceMark2(timing) ? timing.args.data?.detail : timing.args.data.beginEvent.args.detail;
  if (!timingDetail) {
    return { devtoolsObj: null, userDetail: null };
  }
  const devtoolsObj = parseDevtoolsDetails2(timingDetail, "devtools");
  let userDetail = null;
  try {
    userDetail = JSON.parse(timingDetail);
    delete userDetail.devtools;
  } catch {
  }
  return { devtoolsObj, userDetail };
}
function extensionDataInConsoleTimeStamp2(timeStamp) {
  if (!timeStamp.args.data || !timeStamp.args.data.track) {
    return { devtoolsObj: null, userDetail: null };
  }
  let userDetail = null;
  try {
    userDetail = JSON.parse(timeStamp.args.data?.devtools || '""');
  } catch {
  }
  const devtoolsObj = {
    color: String(timeStamp.args.data.color),
    track: String(timeStamp.args.data.track),
    dataType: "track-entry",
    trackGroup: timeStamp.args.data.trackGroup !== void 0 ? String(timeStamp.args.data.trackGroup) : void 0
  };
  return { devtoolsObj, userDetail };
}
function data$i() {
  return {
    entryToNode: entryToNode4,
    extensionTrackData: extensionTrackData2,
    extensionMarkers: extensionMarkers2,
    syntheticConsoleEntriesForTimingsTrack: syntheticConsoleEntriesForTimingsTrack2
  };
}
function deps$b() {
  return ["UserTimings"];
}
function reset$h() {
  paintEvents2 = [];
  snapshotEvents2 = [];
  paintToSnapshotMap2 = /* @__PURE__ */ new Map();
  lastPaintForLayerId2 = {};
  currentMainFrameLayerTreeId2 = null;
  updateLayerEvents2 = [];
  relevantEvents2 = [];
}
function handleEvent$h(event) {
  if (isPaint2(event) || isDisplayListItemListSnapshot2(event) || isUpdateLayer2(event) || isSetLayerId2(event)) {
    relevantEvents2.push(event);
  }
}
async function finalize$z() {
  const metaData = data$p();
  sortTraceEventsInPlace2(relevantEvents2);
  for (const event of relevantEvents2) {
    if (isSetLayerId2(event)) {
      if (metaData.mainFrameId !== event.args.data.frame) {
        continue;
      }
      currentMainFrameLayerTreeId2 = event.args.data.layerTreeId;
    } else if (isUpdateLayer2(event)) {
      updateLayerEvents2.push(event);
    } else if (isPaint2(event)) {
      if (!event.args.data.layerId) {
        continue;
      }
      paintEvents2.push(event);
      lastPaintForLayerId2[event.args.data.layerId] = event;
      continue;
    } else if (isDisplayListItemListSnapshot2(event)) {
      let lastUpdateLayerEventForThread = null;
      for (let i = updateLayerEvents2.length - 1; i > -1; i--) {
        const updateEvent = updateLayerEvents2[i];
        if (updateEvent.pid === event.pid && updateEvent.tid === event.tid) {
          lastUpdateLayerEventForThread = updateEvent;
          break;
        }
      }
      if (!lastUpdateLayerEventForThread) {
        continue;
      }
      if (lastUpdateLayerEventForThread.args.layerTreeId !== currentMainFrameLayerTreeId2) {
        continue;
      }
      const paintEvent = lastPaintForLayerId2[lastUpdateLayerEventForThread.args.layerId];
      if (!paintEvent) {
        continue;
      }
      snapshotEvents2.push(event);
      paintToSnapshotMap2.set(paintEvent, event);
    }
  }
}
function data$h() {
  return {
    paints: paintEvents2,
    snapshots: snapshotEvents2,
    paintsToSnapshots: paintToSnapshotMap2
  };
}
function deps$a() {
  return ["Meta"];
}
function getThreadTypeForRendererThread2(pid, thread, auctionWorkletsData) {
  let threadType = "OTHER";
  if (thread.name === "CrRendererMain") {
    threadType = "MAIN_THREAD";
  } else if (thread.name === "DedicatedWorker thread") {
    threadType = "WORKER";
  } else if (thread.name?.startsWith("CompositorTileWorker")) {
    threadType = "RASTERIZER";
  } else if (auctionWorkletsData.worklets.has(pid)) {
    threadType = "AUCTION_WORKLET";
  } else if (thread.name?.startsWith("ThreadPool")) {
    threadType = "THREAD_POOL";
  }
  return threadType;
}
function threadsInRenderer2(rendererData, auctionWorkletsData) {
  const foundThreads = [];
  if (rendererData.processes.size) {
    for (const [pid, process8] of rendererData.processes) {
      for (const [tid, thread] of process8.threads) {
        if (!thread.tree) {
          continue;
        }
        const threadType = getThreadTypeForRendererThread2(pid, thread, auctionWorkletsData);
        foundThreads.push({
          name: thread.name,
          pid,
          tid,
          processIsOnMainFrame: process8.isOnMainFrame,
          entries: thread.entries,
          tree: thread.tree,
          type: threadType,
          entryToNode: rendererData.entryToNode
        });
      }
    }
  }
  return foundThreads;
}
function threadsInTrace2(handlerData) {
  const cached2 = threadsInHandlerDataCache2.get(handlerData);
  if (cached2) {
    return cached2;
  }
  const threadsFromRenderer = threadsInRenderer2(handlerData.Renderer, handlerData.AuctionWorklets);
  if (threadsFromRenderer.length) {
    threadsInHandlerDataCache2.set(handlerData, threadsFromRenderer);
    return threadsFromRenderer;
  }
  const foundThreads = [];
  if (handlerData.Samples.profilesInProcess.size) {
    for (const [pid, process8] of handlerData.Samples.profilesInProcess) {
      for (const [tid, thread] of process8) {
        if (!thread.profileTree) {
          continue;
        }
        foundThreads.push({
          pid,
          tid,
          name: null,
          entries: thread.profileCalls,
          processIsOnMainFrame: false,
          tree: thread.profileTree,
          type: "CPU_PROFILE",
          entryToNode: handlerData.Samples.entryToNode
        });
      }
    }
  }
  threadsInHandlerDataCache2.set(handlerData, foundThreads);
  return foundThreads;
}
function isFrameEvent2(event) {
  return isSetLayerId2(event) || isBeginFrame2(event) || isDroppedFrame2(event) || isRequestMainThreadFrame2(event) || isBeginMainThreadFrame2(event) || isNeedsBeginFrameChanged2(event) || isCommit2(event) || isCompositeLayers2(event) || isActivateLayerTree2(event) || isDrawFrame2(event);
}
function entryIsTopLevel2(entry) {
  const devtoolsTimelineCategory = "disabled-by-default-devtools.timeline";
  return entry.name === "RunTask" && entry.cat.includes(devtoolsTimelineCategory);
}
function reset$g() {
  model2 = null;
  relevantFrameEvents2 = [];
}
function handleEvent$g(event) {
  if (isFrameEvent2(event) || isLayerTreeHostImplSnapshot2(event) || entryIsTopLevel2(event) || MAIN_FRAME_MARKERS2.has(event.name) || isPaint2(event)) {
    relevantFrameEvents2.push(event);
  }
}
async function finalize$y() {
  sortTraceEventsInPlace2(relevantFrameEvents2);
  const modelForTrace = new TimelineFrameModel2(relevantFrameEvents2, data$m(), data$q(), data$p(), data$h());
  model2 = modelForTrace;
}
function data$g() {
  return {
    frames: model2?.frames() ?? [],
    framesById: model2?.framesById() ?? {}
  };
}
function deps$9() {
  return ["Meta", "Renderer", "AuctionWorklets", "LayerTree"];
}
function framesWithinWindow2(frames3, startTime, endTime) {
  const firstFrame = lowerBound2(frames3, startTime || 0, (time2, frame) => time2 - frame.endTime);
  const lastFrame = lowerBound2(frames3, endTime || Infinity, (time2, frame) => time2 - frame.startTime);
  return frames3.slice(firstFrame, lastFrame);
}
function reset$f() {
  eventsInProcessThread2 = /* @__PURE__ */ new Map();
  mainGPUThreadTasks2 = [];
}
function handleEvent$f(event) {
  if (!isGPUTask2(event)) {
    return;
  }
  addEventToProcessThread2(event, eventsInProcessThread2);
}
async function finalize$x() {
  const { gpuProcessId: gpuProcessId3, gpuThreadId: gpuThreadId3 } = data$p();
  const gpuThreadsForProcess = eventsInProcessThread2.get(gpuProcessId3);
  if (gpuThreadsForProcess && gpuThreadId3) {
    mainGPUThreadTasks2 = gpuThreadsForProcess.get(gpuThreadId3) || [];
  }
}
function data$f() {
  return {
    mainGPUThreadTasks: mainGPUThreadTasks2
  };
}
function deps$8() {
  return ["Meta"];
}
function reset$e() {
  paintImageEvents$1 = /* @__PURE__ */ new Map();
  decodeLazyPixelRefEvents2 = /* @__PURE__ */ new Map();
  paintImageByLazyPixelRef2 = /* @__PURE__ */ new Map();
  eventToPaintImage2 = /* @__PURE__ */ new Map();
  urlToPaintImage2 = /* @__PURE__ */ new Map();
  paintEventToCorrectedDisplaySize2 = /* @__PURE__ */ new Map();
  didCorrectForHostDpr2 = false;
}
function handleEvent$e(event) {
  if (isPaintImage2(event)) {
    const forProcess = paintImageEvents$1.get(event.pid) || /* @__PURE__ */ new Map();
    const forThread = forProcess.get(event.tid) || [];
    forThread.push(event);
    forProcess.set(event.tid, forThread);
    paintImageEvents$1.set(event.pid, forProcess);
    if (event.args.data.url) {
      const paintsForUrl = getWithDefault2(urlToPaintImage2, event.args.data.url, () => []);
      paintsForUrl.push(event);
    }
    return;
  }
  if (isDecodeLazyPixelRef2(event) && typeof event.args?.LazyPixelRef !== "undefined") {
    const forProcess = decodeLazyPixelRefEvents2.get(event.pid) || /* @__PURE__ */ new Map();
    const forThread = forProcess.get(event.tid) || [];
    forThread.push(event);
    forProcess.set(event.tid, forThread);
    decodeLazyPixelRefEvents2.set(event.pid, forProcess);
  }
  if (isDrawLazyPixelRef2(event) && typeof event.args?.LazyPixelRef !== "undefined") {
    const lastPaintEvent = paintImageEvents$1.get(event.pid)?.get(event.tid)?.at(-1);
    if (!lastPaintEvent) {
      return;
    }
    paintImageByLazyPixelRef2.set(event.args.LazyPixelRef, lastPaintEvent);
    return;
  }
  if (isDecodeImage2(event)) {
    const lastPaintImageEventOnThread = paintImageEvents$1.get(event.pid)?.get(event.tid)?.at(-1);
    if (lastPaintImageEventOnThread) {
      eventToPaintImage2.set(event, lastPaintImageEventOnThread);
      return;
    }
    const lastDecodeLazyPixelRef = decodeLazyPixelRefEvents2.get(event.pid)?.get(event.tid)?.at(-1);
    if (typeof lastDecodeLazyPixelRef?.args?.LazyPixelRef === "undefined") {
      return;
    }
    const paintEvent = paintImageByLazyPixelRef2.get(lastDecodeLazyPixelRef.args.LazyPixelRef);
    if (!paintEvent) {
      return;
    }
    eventToPaintImage2.set(event, paintEvent);
  }
}
async function finalize$w(options2) {
  if (!options2.metadata?.hostDPR) {
    return;
  }
  const { devicePixelRatio: emulatedDpr } = data$p();
  if (!emulatedDpr) {
    return;
  }
  for (const byThread of paintImageEvents$1.values()) {
    for (const paintEvents3 of byThread.values()) {
      for (const paintEvent of paintEvents3) {
        const cssPixelsWidth = paintEvent.args.data.width / options2.metadata.hostDPR;
        const cssPixelsHeight = paintEvent.args.data.height / options2.metadata.hostDPR;
        const width = cssPixelsWidth * emulatedDpr;
        const height = cssPixelsHeight * emulatedDpr;
        paintEventToCorrectedDisplaySize2.set(paintEvent, { width, height });
      }
    }
  }
  didCorrectForHostDpr2 = true;
}
function data$e() {
  return {
    paintImageByDrawLazyPixelRef: paintImageByLazyPixelRef2,
    paintImageForEvent: eventToPaintImage2,
    paintImageEventForUrl: urlToPaintImage2,
    paintEventToCorrectedDisplaySize: paintEventToCorrectedDisplaySize2,
    didCorrectForHostDpr: didCorrectForHostDpr2
  };
}
function reset$d() {
  lastScheduleStyleRecalcByFrame2 = /* @__PURE__ */ new Map();
  lastInvalidationEventForFrame2 = /* @__PURE__ */ new Map();
  lastRecalcByFrame2 = /* @__PURE__ */ new Map();
  timerInstallEventsById2 = /* @__PURE__ */ new Map();
  eventToInitiatorMap3 = /* @__PURE__ */ new Map();
  initiatorToEventsMap2 = /* @__PURE__ */ new Map();
  requestIdleCallbackEventsById2 = /* @__PURE__ */ new Map();
  webSocketCreateEventsById2 = /* @__PURE__ */ new Map();
  schedulePostTaskCallbackEventsById2 = /* @__PURE__ */ new Map();
}
function storeInitiator2(data32) {
  eventToInitiatorMap3.set(data32.event, data32.initiator);
  const eventsForInitiator = initiatorToEventsMap2.get(data32.initiator) || [];
  eventsForInitiator.push(data32.event);
  initiatorToEventsMap2.set(data32.initiator, eventsForInitiator);
}
function handleEvent$d(event) {
  if (isScheduleStyleRecalculation2(event)) {
    lastScheduleStyleRecalcByFrame2.set(event.args.data.frame, event);
  } else if (isRecalcStyle2(event)) {
    if (event.args.beginData) {
      lastRecalcByFrame2.set(event.args.beginData.frame, event);
      const scheduledStyleForFrame = lastScheduleStyleRecalcByFrame2.get(event.args.beginData.frame);
      if (scheduledStyleForFrame) {
        storeInitiator2({
          event,
          initiator: scheduledStyleForFrame
        });
      }
    }
  } else if (isInvalidateLayout2(event)) {
    let invalidationInitiator = event;
    if (!lastInvalidationEventForFrame2.has(event.args.data.frame)) {
      const lastRecalcStyleForFrame = lastRecalcByFrame2.get(event.args.data.frame);
      if (lastRecalcStyleForFrame) {
        const { endTime } = eventTimingsMicroSeconds2(lastRecalcStyleForFrame);
        const initiatorOfRecalcStyle = eventToInitiatorMap3.get(lastRecalcStyleForFrame);
        if (initiatorOfRecalcStyle && endTime && endTime > event.ts) {
          invalidationInitiator = initiatorOfRecalcStyle;
        }
      }
    }
    lastInvalidationEventForFrame2.set(event.args.data.frame, invalidationInitiator);
  } else if (isLayout2(event)) {
    const lastInvalidation = lastInvalidationEventForFrame2.get(event.args.beginData.frame);
    if (lastInvalidation) {
      storeInitiator2({
        event,
        initiator: lastInvalidation
      });
    }
    lastInvalidationEventForFrame2.delete(event.args.beginData.frame);
  } else if (isTimerInstall2(event)) {
    timerInstallEventsById2.set(event.args.data.timerId, event);
  } else if (isTimerFire2(event)) {
    const matchingInstall = timerInstallEventsById2.get(event.args.data.timerId);
    if (matchingInstall) {
      storeInitiator2({ event, initiator: matchingInstall });
    }
  } else if (isRequestIdleCallback2(event)) {
    requestIdleCallbackEventsById2.set(event.args.data.id, event);
  } else if (isFireIdleCallback2(event)) {
    const matchingRequestEvent = requestIdleCallbackEventsById2.get(event.args.data.id);
    if (matchingRequestEvent) {
      storeInitiator2({
        event,
        initiator: matchingRequestEvent
      });
    }
  } else if (isWebSocketCreate2(event)) {
    webSocketCreateEventsById2.set(event.args.data.identifier, event);
  } else if (isWebSocketInfo2(event) || isWebSocketTransfer2(event)) {
    const matchingCreateEvent = webSocketCreateEventsById2.get(event.args.data.identifier);
    if (matchingCreateEvent) {
      storeInitiator2({
        event,
        initiator: matchingCreateEvent
      });
    }
  } else if (isSchedulePostTaskCallback2(event)) {
    schedulePostTaskCallbackEventsById2.set(event.args.data.taskId, event);
  } else if (isRunPostTaskCallback2(event) || isAbortPostTaskCallback2(event)) {
    const matchingSchedule = schedulePostTaskCallbackEventsById2.get(event.args.data.taskId);
    if (matchingSchedule) {
      storeInitiator2({ event, initiator: matchingSchedule });
    }
  }
}
function createRelationshipsFromFlows2() {
  const flows3 = data$r().flows;
  for (let i = 0; i < flows3.length; i++) {
    const flow2 = flows3[i];
    for (let j = 0; j < flow2.length - 1; j++) {
      storeInitiator2({ event: flow2[j + 1], initiator: flow2[j] });
    }
  }
}
function createRelationshipsFromAsyncJSCalls2() {
  const asyncCallEntries = data$l().schedulerToRunEntryPoints.entries();
  for (const [asyncCaller, asyncCallees] of asyncCallEntries) {
    for (const asyncCallee of asyncCallees) {
      storeInitiator2({ event: asyncCallee, initiator: asyncCaller });
    }
  }
}
async function finalize$v() {
  createRelationshipsFromFlows2();
  createRelationshipsFromAsyncJSCalls2();
}
function data$d() {
  return {
    eventToInitiator: eventToInitiatorMap3,
    initiatorToEvents: initiatorToEventsMap2
  };
}
function deps$7() {
  return ["Flows", "AsyncJSCalls"];
}
function reset$c() {
  frameStateByFrame2.clear();
  maxInvalidationsPerEvent2 = null;
}
function handleUserConfig4(userConfig) {
  maxInvalidationsPerEvent2 = userConfig.maxInvalidationEventsPerEvent;
}
function getState2(frameId) {
  let frameState = frameStateByFrame2.get(frameId);
  if (!frameState) {
    frameState = {
      invalidationsForEvent: /* @__PURE__ */ new Map(),
      invalidationCountForEvent: /* @__PURE__ */ new Map(),
      lastRecalcStyleEvent: null,
      pendingInvalidations: [],
      hasPainted: false
    };
    frameStateByFrame2.set(frameId, frameState);
  }
  return frameState;
}
function getFrameId2(event) {
  if (isRecalcStyle2(event) || isLayout2(event)) {
    return event.args.beginData?.frame ?? null;
  }
  return event.args?.data?.frame ?? null;
}
function addInvalidationToEvent2(frameState, event, invalidation) {
  const existingInvalidations = frameState.invalidationsForEvent.get(event) || [];
  existingInvalidations.push(invalidation);
  if (maxInvalidationsPerEvent2 !== null && existingInvalidations.length > maxInvalidationsPerEvent2) {
    existingInvalidations.shift();
  }
  frameState.invalidationsForEvent.set(event, existingInvalidations);
  const count = frameState.invalidationCountForEvent.get(event) ?? 0;
  frameState.invalidationCountForEvent.set(event, count + 1);
}
function handleEvent$c(event) {
  if (maxInvalidationsPerEvent2 === 0) {
    return;
  }
  const frameId = getFrameId2(event);
  if (!frameId) {
    return;
  }
  const thisFrame = getState2(frameId);
  if (isRecalcStyle2(event)) {
    thisFrame.lastRecalcStyleEvent = event;
    for (const invalidation of thisFrame.pendingInvalidations) {
      if (isLayoutInvalidationTracking2(invalidation)) {
        continue;
      }
      addInvalidationToEvent2(thisFrame, event, invalidation);
    }
    return;
  }
  if (isInvalidationTracking2(event)) {
    if (thisFrame.hasPainted) {
      thisFrame.pendingInvalidations.length = 0;
      thisFrame.lastRecalcStyleEvent = null;
      thisFrame.hasPainted = false;
    }
    if (thisFrame.lastRecalcStyleEvent && (isScheduleStyleInvalidationTracking2(event) || isStyleRecalcInvalidationTracking2(event) || isStyleInvalidatorInvalidationTracking2(event))) {
      const recalcLastRecalc = thisFrame.lastRecalcStyleEvent;
      const recalcEndTime = recalcLastRecalc.ts + (recalcLastRecalc.dur || 0);
      if (event.ts >= recalcLastRecalc.ts && event.ts <= recalcEndTime) {
        addInvalidationToEvent2(thisFrame, recalcLastRecalc, event);
      }
    }
    thisFrame.pendingInvalidations.push(event);
    return;
  }
  if (isPaint2(event)) {
    thisFrame.hasPainted = true;
    return;
  }
  if (isLayout2(event)) {
    for (const invalidation of thisFrame.pendingInvalidations) {
      if (!isLayoutInvalidationTracking2(invalidation)) {
        continue;
      }
      addInvalidationToEvent2(thisFrame, event, invalidation);
    }
  }
}
async function finalize$u() {
}
function data$c() {
  const invalidationsForEvent = /* @__PURE__ */ new Map();
  const invalidationCountForEvent = /* @__PURE__ */ new Map();
  for (const frame of frameStateByFrame2.values()) {
    for (const [event, invalidations] of frame.invalidationsForEvent.entries()) {
      invalidationsForEvent.set(event, invalidations);
    }
    for (const [event, count] of frame.invalidationCountForEvent.entries()) {
      invalidationCountForEvent.set(event, count);
    }
  }
  return {
    invalidationsForEvent,
    invalidationCountForEvent
  };
}
function reset$b() {
  metricScoresByFrameId2 = /* @__PURE__ */ new Map();
  pageLoadEventsArray2 = [];
  allMarkerEvents2 = [];
  selectedLCPCandidateEvents2 = /* @__PURE__ */ new Set();
}
function handleEvent$b(event) {
  if (!eventIsPageLoadEvent2(event)) {
    return;
  }
  pageLoadEventsArray2.push(event);
}
function storePageLoadMetricAgainstNavigationId2(navigation2, event) {
  const frameId = getFrameIdForPageLoadEvent2(event);
  const { rendererProcessesByFrame } = data$p();
  const rendererProcessesInFrame = rendererProcessesByFrame.get(frameId);
  if (!rendererProcessesInFrame) {
    return;
  }
  const processData = rendererProcessesInFrame.get(event.pid);
  if (!processData) {
    return;
  }
  if (isNavigationStart2(event)) {
    return;
  }
  if (isFirstContentfulPaint2(event)) {
    const fcpTime = Micro2(event.ts - navigation2.ts);
    const classification = scoreClassificationForFirstContentfulPaint2(fcpTime);
    const metricScore = { event, metricName: "FCP", classification, navigation: navigation2, timing: fcpTime };
    storeMetricScore2(frameId, navigation2, metricScore);
    return;
  }
  if (isFirstPaint2(event)) {
    const paintTime = Micro2(event.ts - navigation2.ts);
    const classification = "unclassified";
    const metricScore = { event, metricName: "FP", classification, navigation: navigation2, timing: paintTime };
    storeMetricScore2(frameId, navigation2, metricScore);
    return;
  }
  if (isMarkDOMContent2(event)) {
    const dclTime = Micro2(event.ts - navigation2.ts);
    const metricScore = {
      event,
      metricName: "DCL",
      classification: scoreClassificationForDOMContentLoaded2(),
      navigation: navigation2,
      timing: dclTime
    };
    storeMetricScore2(frameId, navigation2, metricScore);
    return;
  }
  if (isInteractiveTime2(event)) {
    const ttiValue = Micro2(event.ts - navigation2.ts);
    const tti = {
      event,
      metricName: "TTI",
      classification: scoreClassificationForTimeToInteractive2(ttiValue),
      navigation: navigation2,
      timing: ttiValue
    };
    storeMetricScore2(frameId, navigation2, tti);
    const tbtValue = milliToMicro2(Milli2(event.args.args.total_blocking_time_ms));
    const tbt = {
      event,
      metricName: "TBT",
      classification: scoreClassificationForTotalBlockingTime2(tbtValue),
      navigation: navigation2,
      timing: tbtValue
    };
    storeMetricScore2(frameId, navigation2, tbt);
    return;
  }
  if (isMarkLoad2(event)) {
    const loadTime = Micro2(event.ts - navigation2.ts);
    const metricScore = {
      event,
      metricName: "L",
      classification: "unclassified",
      navigation: navigation2,
      timing: loadTime
    };
    storeMetricScore2(frameId, navigation2, metricScore);
    return;
  }
  if (isAnyLargestContentfulPaintCandidate(event)) {
    const candidateIndex = event.args.data?.candidateIndex;
    if (!candidateIndex) {
      throw new Error("Largest Contentful Paint unexpectedly had no candidateIndex.");
    }
    const lcpTime = Micro2(event.ts - navigation2.ts);
    const lcp = {
      event,
      metricName: "LCP",
      classification: scoreClassificationForLargestContentfulPaint2(lcpTime),
      navigation: navigation2,
      timing: lcpTime
    };
    const metricsByNavigation = getWithDefault2(metricScoresByFrameId2, frameId, () => /* @__PURE__ */ new Map());
    const metrics2 = getWithDefault2(metricsByNavigation, navigation2, () => /* @__PURE__ */ new Map());
    const lastLCPCandidate = metrics2.get("LCP");
    if (lastLCPCandidate === void 0) {
      selectedLCPCandidateEvents2.add(lcp.event);
      storeMetricScore2(frameId, navigation2, lcp);
      return;
    }
    const lastLCPCandidateEvent = lastLCPCandidate.event;
    if (!isAnyLargestContentfulPaintCandidate(lastLCPCandidateEvent)) {
      return;
    }
    const lastCandidateIndex = lastLCPCandidateEvent.args.data?.candidateIndex;
    if (!lastCandidateIndex) {
      return;
    }
    if (lastCandidateIndex < candidateIndex) {
      selectedLCPCandidateEvents2.delete(lastLCPCandidateEvent);
      selectedLCPCandidateEvents2.add(lcp.event);
      storeMetricScore2(frameId, navigation2, lcp);
    }
    return;
  }
  if (isLayoutShift2(event)) {
    return;
  }
  if (isSoftNavigationStart(event)) {
    return;
  }
  return assertNever2(event, `Unexpected event type: ${event}`);
}
function storeMetricScore2(frameId, navigation2, metricScore) {
  const metricsByNavigation = getWithDefault2(metricScoresByFrameId2, frameId, () => /* @__PURE__ */ new Map());
  const metrics2 = getWithDefault2(metricsByNavigation, navigation2, () => /* @__PURE__ */ new Map());
  metrics2.delete(metricScore.metricName);
  metrics2.set(metricScore.metricName, metricScore);
}
function getFrameIdForPageLoadEvent2(event) {
  if (isFirstContentfulPaint2(event) || isInteractiveTime2(event) || isAnyLargestContentfulPaintCandidate(event) || isNavigationStart2(event) || isSoftNavigationStart(event) || isLayoutShift2(event) || isFirstPaint2(event)) {
    return event.args.frame;
  }
  if (isMarkDOMContent2(event) || isMarkLoad2(event)) {
    const frameId = event.args.data?.frame;
    if (!frameId) {
      throw new Error("MarkDOMContent unexpectedly had no frame ID.");
    }
    return frameId;
  }
  assertNever2(event, `Unexpected event type: ${event}`);
}
function getNavigationForPageLoadEvent2(event) {
  if (isFirstContentfulPaint2(event) || isAnyLargestContentfulPaintCandidate(event) || isFirstPaint2(event)) {
    const { navigationsByNavigationId: navigationsByNavigationId3, softNavigationsById: softNavigationsById2 } = data$p();
    let navigation2;
    if (event.name === "largestContentfulPaint::CandidateForSoftNavigation" && event.args.data?.performanceTimelineNavigationId) {
      navigation2 = softNavigationsById2.get(event.args.data.performanceTimelineNavigationId);
      if (!navigation2) {
        return null;
      }
    } else {
      const navigationId = event.args.data?.navigationId;
      if (!navigationId) {
        throw new Error(`Trace event unexpectedly had no navigation ID: ${JSON.stringify(event, null, 2)}`);
      }
      navigation2 = navigationsByNavigationId3.get(navigationId);
    }
    if (!navigation2) {
      return null;
    }
    return navigation2;
  }
  if (isSoftNavigationStart(event)) {
    const { softNavigationsById: softNavigationsById2 } = data$p();
    return softNavigationsById2.get(event.args.context.performanceTimelineNavigationId) ?? null;
  }
  if (isMarkDOMContent2(event) || isInteractiveTime2(event) || isLayoutShift2(event) || isMarkLoad2(event)) {
    const frameId = getFrameIdForPageLoadEvent2(event);
    const { navigationsByFrameId: navigationsByFrameId3 } = data$p();
    return getNavigationForTraceEvent2(event, frameId, navigationsByFrameId3);
  }
  if (isNavigationStart2(event)) {
    return null;
  }
  return assertNever2(event, `Unexpected event type: ${event}`);
}
function scoreClassificationForFirstContentfulPaint2(fcpScoreInMicroseconds) {
  const FCP_GOOD_TIMING = secondsToMicro2(Seconds2(1.8));
  const FCP_MEDIUM_TIMING = secondsToMicro2(Seconds2(3));
  let scoreClassification = "bad";
  if (fcpScoreInMicroseconds <= FCP_MEDIUM_TIMING) {
    scoreClassification = "ok";
  }
  if (fcpScoreInMicroseconds <= FCP_GOOD_TIMING) {
    scoreClassification = "good";
  }
  return scoreClassification;
}
function scoreClassificationForTimeToInteractive2(ttiTimeInMicroseconds) {
  const TTI_GOOD_TIMING = secondsToMicro2(Seconds2(3.8));
  const TTI_MEDIUM_TIMING = secondsToMicro2(Seconds2(7.3));
  let scoreClassification = "bad";
  if (ttiTimeInMicroseconds <= TTI_MEDIUM_TIMING) {
    scoreClassification = "ok";
  }
  if (ttiTimeInMicroseconds <= TTI_GOOD_TIMING) {
    scoreClassification = "good";
  }
  return scoreClassification;
}
function scoreClassificationForLargestContentfulPaint2(lcpTimeInMicroseconds) {
  const LCP_GOOD_TIMING = secondsToMicro2(Seconds2(2.5));
  const LCP_MEDIUM_TIMING = secondsToMicro2(Seconds2(4));
  let scoreClassification = "bad";
  if (lcpTimeInMicroseconds <= LCP_MEDIUM_TIMING) {
    scoreClassification = "ok";
  }
  if (lcpTimeInMicroseconds <= LCP_GOOD_TIMING) {
    scoreClassification = "good";
  }
  return scoreClassification;
}
function scoreClassificationForDOMContentLoaded2(_dclTimeInMicroseconds) {
  return "unclassified";
}
function scoreClassificationForTotalBlockingTime2(tbtTimeInMicroseconds) {
  const TBT_GOOD_TIMING = milliToMicro2(Milli2(200));
  const TBT_MEDIUM_TIMING = milliToMicro2(Milli2(600));
  let scoreClassification = "bad";
  if (tbtTimeInMicroseconds <= TBT_MEDIUM_TIMING) {
    scoreClassification = "ok";
  }
  if (tbtTimeInMicroseconds <= TBT_GOOD_TIMING) {
    scoreClassification = "good";
  }
  return scoreClassification;
}
function gatherFinalLCPEvents2() {
  const allFinalLCPEvents = [];
  const dataForAllFrames = [...metricScoresByFrameId2.values()];
  const dataForAllNavigations = dataForAllFrames.flatMap((frameData) => [...frameData.values()]);
  for (let i = 0; i < dataForAllNavigations.length; i++) {
    const navigationData = dataForAllNavigations[i];
    const lcpInNavigation = navigationData.get("LCP");
    if (!lcpInNavigation?.event) {
      continue;
    }
    allFinalLCPEvents.push(lcpInNavigation.event);
  }
  return allFinalLCPEvents;
}
async function finalize$t() {
  pageLoadEventsArray2.sort((a, b) => a.ts - b.ts);
  for (const pageLoadEvent of pageLoadEventsArray2) {
    const navigation2 = getNavigationForPageLoadEvent2(pageLoadEvent);
    if (navigation2) {
      storePageLoadMetricAgainstNavigationId2(navigation2, pageLoadEvent);
    }
  }
  const allFinalLCPEvents = gatherFinalLCPEvents2();
  const mainFrame = data$p().mainFrameId;
  const allEventsButLCP = pageLoadEventsArray2.filter((event) => !isAnyLargestContentfulPaintCandidate(event));
  const markerEvents = [...allFinalLCPEvents, ...allEventsButLCP].filter(isMarkerEvent2);
  allMarkerEvents2 = markerEvents.filter((event) => getFrameIdForPageLoadEvent2(event) === mainFrame).sort((a, b) => a.ts - b.ts);
}
function data$b() {
  return {
    metricScoresByFrameId: metricScoresByFrameId2,
    allMarkerEvents: allMarkerEvents2
  };
}
function deps$6() {
  return ["Meta"];
}
function metricIsLCP2(metric) {
  return metric.metricName === "LCP";
}
function reset$a() {
  imagePaintsByNodeIdAndProcess2 = /* @__PURE__ */ new Map();
  lcpRequestByNavigationId2 = /* @__PURE__ */ new Map();
}
function handleEvent$a(event) {
  if (!isLargestImagePaintCandidate2(event) || !event.args.data) {
    return;
  }
  const imagePaintsByNodeId = getWithDefault2(imagePaintsByNodeIdAndProcess2, event.pid, () => /* @__PURE__ */ new Map());
  imagePaintsByNodeId.set(event.args.data.DOMNodeId, event);
}
async function finalize$s() {
  const requests = data$o().byTime;
  const { traceBounds: traceBounds3, navigationsByNavigationId: navigationsByNavigationId3 } = data$p();
  const metricScoresByFrameId3 = data$b().metricScoresByFrameId;
  for (const [navigationId, navigation2] of navigationsByNavigationId3) {
    const lcpMetric = metricScoresByFrameId3.get(navigation2.args.frame)?.get(navigation2)?.get("LCP");
    const lcpEvent = lcpMetric?.event;
    if (!lcpEvent || !isAnyLargestContentfulPaintCandidate(lcpEvent)) {
      continue;
    }
    const nodeId = lcpEvent.args.data?.nodeId;
    if (!nodeId) {
      continue;
    }
    const lcpImagePaintEvent = imagePaintsByNodeIdAndProcess2.get(lcpEvent.pid)?.get(nodeId);
    const lcpUrl = lcpImagePaintEvent?.args.data?.imageUrl;
    if (!lcpUrl) {
      continue;
    }
    const startTime = navigation2?.ts ?? traceBounds3.min;
    const endTime = lcpImagePaintEvent.ts;
    let lcpRequest;
    for (const request3 of requests) {
      if (request3.ts < startTime) {
        continue;
      }
      if (request3.ts >= endTime) {
        break;
      }
      if (request3.args.data.url === lcpUrl || request3.args.data.redirects.some((r) => r.url === lcpUrl)) {
        lcpRequest = request3;
        break;
      }
    }
    if (lcpRequest) {
      lcpRequestByNavigationId2.set(navigationId, lcpRequest);
    }
  }
}
function data$a() {
  return { lcpRequestByNavigationId: lcpRequestByNavigationId2 };
}
function deps$5() {
  return ["Meta", "NetworkRequests", "PageLoadMetrics"];
}
function reset$9() {
  textPaintByDOMNodeId2 = /* @__PURE__ */ new Map();
}
function handleEvent$9(event) {
  if (!isLargestTextPaintCandidate2(event)) {
    return;
  }
  if (!event.args.data) {
    return;
  }
  textPaintByDOMNodeId2.set(event.args.data.DOMNodeId, event);
}
async function finalize$r() {
}
function data$9() {
  return textPaintByDOMNodeId2;
}
function reset$8() {
  unpairedAsyncEvents2 = [];
  legacyScreenshotEvents2 = [];
  syntheticScreenshots2 = [];
  modernScreenshotEvents2 = [];
}
function handleEvent$8(event) {
  if (isLegacyScreenshot2(event)) {
    legacyScreenshotEvents2.push(event);
  } else if (isScreenshot2(event)) {
    modernScreenshotEvents2.push(event);
  } else if (isPipelineReporter2(event)) {
    unpairedAsyncEvents2.push(event);
  }
}
async function finalize$q() {
  const pipelineReporterEvents = createMatchedSortedSyntheticEvents2(unpairedAsyncEvents2);
  Object.fromEntries(pipelineReporterEvents.map((evt) => {
    const args2 = evt.args.data.beginEvent.args;
    const frameReporter = "frame_reporter" in args2 ? args2.frame_reporter : args2.chrome_frame_reporter;
    const frameSequenceId = frameReporter.frame_sequence;
    const presentationTs = Micro2(evt.ts + evt.dur);
    return [frameSequenceId, presentationTs];
  }));
  for (const snapshotEvent of legacyScreenshotEvents2) {
    const { cat, name, ph, pid, tid } = snapshotEvent;
    const syntheticEvent = SyntheticEventsManager2.registerSyntheticEvent({
      rawSourceEvent: snapshotEvent,
      cat,
      name,
      ph,
      pid,
      tid,
      ts: snapshotEvent.ts,
      args: {
        dataUri: `data:image/jpg;base64,${snapshotEvent.args.snapshot}`
      }
    });
    syntheticScreenshots2.push(syntheticEvent);
  }
}
function screenshotImageDataUri2(event) {
  if (isLegacySyntheticScreenshot2(event)) {
    return event.args.dataUri;
  }
  return `data:image/jpg;base64,${event.args.snapshot}`;
}
function data$8() {
  return {
    legacySyntheticScreenshots: syntheticScreenshots2.length ? syntheticScreenshots2 : null,
    screenshots: modernScreenshotEvents2.length ? modernScreenshotEvents2 : null
  };
}
function deps$4() {
  return ["Meta"];
}
function reset$7() {
  layoutShiftEvents2 = [];
  layoutInvalidationEvents2 = [];
  scheduleStyleInvalidationEvents2 = [];
  styleRecalcInvalidationEvents2 = [];
  prePaintEvents2 = [];
  paintImageEvents3 = [];
  renderFrameImplCreateChildFrameEvents2 = [];
  layoutImageUnsizedEvents2 = [];
  domLoadingEvents2 = [];
  remoteFonts2 = [];
  backendNodeIds2 = /* @__PURE__ */ new Set();
  clusters2 = [];
  sessionMaxScore2 = 0;
  scoreRecords2 = [];
  clsWindowID2 = -1;
  clustersByNavigationId2 = /* @__PURE__ */ new Map();
}
function handleEvent$7(event) {
  if (isLayoutShift2(event) && !event.args.data?.had_recent_input) {
    layoutShiftEvents2.push(event);
    return;
  }
  if (isLayoutInvalidationTracking2(event)) {
    layoutInvalidationEvents2.push(event);
    return;
  }
  if (isScheduleStyleInvalidationTracking2(event)) {
    scheduleStyleInvalidationEvents2.push(event);
  }
  if (isStyleRecalcInvalidationTracking2(event)) {
    styleRecalcInvalidationEvents2.push(event);
  }
  if (isPrePaint2(event)) {
    prePaintEvents2.push(event);
    return;
  }
  if (isRenderFrameImplCreateChildFrame2(event)) {
    renderFrameImplCreateChildFrameEvents2.push(event);
  }
  if (isDomLoading2(event)) {
    domLoadingEvents2.push(event);
  }
  if (isLayoutImageUnsized2(event)) {
    layoutImageUnsizedEvents2.push(event);
  }
  if (isBeginRemoteFontLoad2(event)) {
    remoteFonts2.push({
      display: event.args.display,
      url: event.args.url,
      beginRemoteFontLoadEvent: event
    });
  }
  if (isRemoteFontLoaded2(event)) {
    for (const remoteFont of remoteFonts2) {
      if (remoteFont.url === event.args.url) {
        remoteFont.name = event.args.name;
      }
    }
  }
  if (isPaintImage2(event)) {
    paintImageEvents3.push(event);
  }
}
function traceWindowFromTime2(time2) {
  return {
    min: time2,
    max: time2,
    range: Micro2(0)
  };
}
function updateTraceWindowMax2(traceWindow, newMax) {
  traceWindow.max = newMax;
  traceWindow.range = Micro2(traceWindow.max - traceWindow.min);
}
function findScreenshots2(timestamp) {
  const data32 = data$8();
  if (data32.screenshots) {
    const before = findPreviousEventBeforeTimestamp2(data32.screenshots, timestamp);
    const after = before ? data32.screenshots[data32.screenshots.indexOf(before) + 1] : null;
    return { before, after };
  }
  if (data32.legacySyntheticScreenshots) {
    const before = findPreviousEventBeforeTimestamp2(data32.legacySyntheticScreenshots, timestamp);
    const after = before ? data32.legacySyntheticScreenshots[data32.legacySyntheticScreenshots.indexOf(before) + 1] : null;
    return { before, after };
  }
  return { before: null, after: null };
}
function buildScoreRecords2() {
  const { traceBounds: traceBounds3 } = data$p();
  scoreRecords2.push({ ts: traceBounds3.min, score: 0 });
  for (const cluster of clusters2) {
    let clusterScore = 0;
    if (cluster.events[0].args.data) {
      scoreRecords2.push({ ts: cluster.clusterWindow.min, score: cluster.events[0].args.data.weighted_score_delta });
    }
    for (let i = 0; i < cluster.events.length; i++) {
      const event = cluster.events[i];
      if (!event.args.data) {
        continue;
      }
      clusterScore += event.args.data.weighted_score_delta;
      scoreRecords2.push({ ts: event.ts, score: clusterScore });
    }
    scoreRecords2.push({ ts: cluster.clusterWindow.max, score: 0 });
  }
}
function collectNodes2() {
  backendNodeIds2.clear();
  for (const layoutShift of layoutShiftEvents2) {
    if (!layoutShift.args.data?.impacted_nodes) {
      continue;
    }
    for (const node2 of layoutShift.args.data.impacted_nodes) {
      backendNodeIds2.add(node2.node_id);
    }
  }
  for (const layoutInvalidation of layoutInvalidationEvents2) {
    if (!layoutInvalidation.args.data?.nodeId) {
      continue;
    }
    backendNodeIds2.add(layoutInvalidation.args.data.nodeId);
  }
  for (const scheduleStyleInvalidation of scheduleStyleInvalidationEvents2) {
    if (!scheduleStyleInvalidation.args.data?.nodeId) {
      continue;
    }
    backendNodeIds2.add(scheduleStyleInvalidation.args.data.nodeId);
  }
}
async function finalize$p() {
  layoutShiftEvents2.sort((a, b) => a.ts - b.ts);
  prePaintEvents2.sort((a, b) => a.ts - b.ts);
  layoutInvalidationEvents2.sort((a, b) => a.ts - b.ts);
  renderFrameImplCreateChildFrameEvents2.sort((a, b) => a.ts - b.ts);
  domLoadingEvents2.sort((a, b) => a.ts - b.ts);
  layoutImageUnsizedEvents2.sort((a, b) => a.ts - b.ts);
  remoteFonts2.sort((a, b) => a.beginRemoteFontLoadEvent.ts - b.beginRemoteFontLoadEvent.ts);
  paintImageEvents3.sort((a, b) => a.ts - b.ts);
  await buildLayoutShiftsClusters2();
  buildScoreRecords2();
  collectNodes2();
}
async function buildLayoutShiftsClusters2() {
  const { navigationsByFrameId: navigationsByFrameId3, mainFrameId: mainFrameId3, traceBounds: traceBounds3 } = data$p();
  const navigations = navigationsByFrameId3.get(mainFrameId3) || [];
  if (layoutShiftEvents2.length === 0) {
    return;
  }
  let firstShiftTime = layoutShiftEvents2[0].ts;
  let lastShiftTime = layoutShiftEvents2[0].ts;
  let lastShiftNavigation = null;
  for (const event of layoutShiftEvents2) {
    const clusterDurationExceeded = event.ts - firstShiftTime > MAX_CLUSTER_DURATION2;
    const maxTimeDeltaSinceLastShiftExceeded = event.ts - lastShiftTime > MAX_SHIFT_TIME_DELTA2;
    const currentShiftNavigation = nearestIndexFromEnd2(navigations, (nav) => nav.ts < event.ts);
    const hasNavigated = lastShiftNavigation !== currentShiftNavigation && currentShiftNavigation !== null;
    if (clusterDurationExceeded || maxTimeDeltaSinceLastShiftExceeded || hasNavigated || !clusters2.length) {
      const clusterStartTime = event.ts;
      const endTimeByMaxSessionDuration = clusterDurationExceeded ? firstShiftTime + MAX_CLUSTER_DURATION2 : Infinity;
      const endTimeByMaxShiftGap = maxTimeDeltaSinceLastShiftExceeded ? lastShiftTime + MAX_SHIFT_TIME_DELTA2 : Infinity;
      const endTimeByNavigation = hasNavigated ? navigations[currentShiftNavigation].ts : Infinity;
      const previousClusterEndTime = Math.min(endTimeByMaxSessionDuration, endTimeByMaxShiftGap, endTimeByNavigation);
      if (clusters2.length > 0) {
        const currentCluster2 = clusters2[clusters2.length - 1];
        updateTraceWindowMax2(currentCluster2.clusterWindow, Micro2(previousClusterEndTime));
      }
      const navigationId = currentShiftNavigation === null ? NO_NAVIGATION2 : navigations[currentShiftNavigation].args.data?.navigationId;
      clusters2.push(SyntheticEventsManager2.registerSyntheticEvent({
        name: "SyntheticLayoutShiftCluster",
        rawSourceEvent: event,
        events: [],
        clusterWindow: traceWindowFromTime2(clusterStartTime),
        clusterCumulativeScore: 0,
        scoreWindows: {
          good: traceWindowFromTime2(clusterStartTime)
        },
        navigationId,
        ts: event.ts,
        pid: event.pid,
        tid: event.tid,
        ph: "X",
        cat: "",
        dur: Micro2(-1)
      }));
      firstShiftTime = clusterStartTime;
    }
    const currentCluster = clusters2[clusters2.length - 1];
    const timeFromNavigation = currentShiftNavigation !== null ? Micro2(event.ts - navigations[currentShiftNavigation].ts) : void 0;
    currentCluster.clusterCumulativeScore += event.args.data ? event.args.data.weighted_score_delta : 0;
    if (!event.args.data) {
      continue;
    }
    const shift = SyntheticEventsManager2.registerSyntheticEvent({
      rawSourceEvent: event,
      ...event,
      name: "SyntheticLayoutShift",
      args: {
        frame: event.args.frame,
        data: {
          ...event.args.data,
          rawEvent: event,
          navigationId: currentCluster.navigationId ?? void 0
        }
      },
      parsedData: {
        timeFromNavigation,
        screenshots: findScreenshots2(event.ts),
        cumulativeWeightedScoreInWindow: currentCluster.clusterCumulativeScore,
        sessionWindowData: { cumulativeWindowScore: 0, id: clusters2.length }
      }
    });
    currentCluster.events.push(shift);
    updateTraceWindowMax2(currentCluster.clusterWindow, event.ts);
    lastShiftTime = event.ts;
    lastShiftNavigation = currentShiftNavigation;
  }
  for (const cluster of clusters2) {
    let weightedScore = 0;
    let windowID = -1;
    if (cluster === clusters2[clusters2.length - 1]) {
      const clusterEndByMaxDuration = MAX_CLUSTER_DURATION2 + cluster.clusterWindow.min;
      const clusterEndByMaxGap = cluster.clusterWindow.max + MAX_SHIFT_TIME_DELTA2;
      const nextNavigationIndex = nearestIndexFromBeginning2(navigations, (nav) => nav.ts > cluster.clusterWindow.max);
      const nextNavigationTime = nextNavigationIndex ? navigations[nextNavigationIndex].ts : Infinity;
      const clusterEnd = Math.min(clusterEndByMaxDuration, clusterEndByMaxGap, traceBounds3.max, nextNavigationTime);
      updateTraceWindowMax2(cluster.clusterWindow, Micro2(clusterEnd));
    }
    let largestScore = 0;
    let worstShiftEvent = null;
    for (const shift of cluster.events) {
      weightedScore += shift.args.data ? shift.args.data.weighted_score_delta : 0;
      windowID = shift.parsedData.sessionWindowData.id;
      const ts = shift.ts;
      shift.parsedData.sessionWindowData.cumulativeWindowScore = cluster.clusterCumulativeScore;
      if (weightedScore < 0.1) {
        updateTraceWindowMax2(cluster.scoreWindows.good, ts);
      } else if (weightedScore >= 0.1 && weightedScore < 0.25) {
        if (!cluster.scoreWindows.needsImprovement) {
          updateTraceWindowMax2(cluster.scoreWindows.good, Micro2(ts - 1));
          cluster.scoreWindows.needsImprovement = traceWindowFromTime2(ts);
        }
        updateTraceWindowMax2(cluster.scoreWindows.needsImprovement, ts);
      } else if (weightedScore >= 0.25) {
        if (!cluster.scoreWindows.bad) {
          if (cluster.scoreWindows.needsImprovement) {
            updateTraceWindowMax2(cluster.scoreWindows.needsImprovement, Micro2(ts - 1));
          } else {
            updateTraceWindowMax2(cluster.scoreWindows.good, Micro2(ts - 1));
          }
          cluster.scoreWindows.bad = traceWindowFromTime2(shift.ts);
        }
        updateTraceWindowMax2(cluster.scoreWindows.bad, ts);
      }
      if (cluster.scoreWindows.bad) {
        updateTraceWindowMax2(cluster.scoreWindows.bad, cluster.clusterWindow.max);
      } else if (cluster.scoreWindows.needsImprovement) {
        updateTraceWindowMax2(cluster.scoreWindows.needsImprovement, cluster.clusterWindow.max);
      } else {
        updateTraceWindowMax2(cluster.scoreWindows.good, cluster.clusterWindow.max);
      }
      const score = shift.args.data?.weighted_score_delta;
      if (score !== void 0 && score > largestScore) {
        largestScore = score;
        worstShiftEvent = shift;
      }
    }
    if (worstShiftEvent) {
      cluster.worstShiftEvent = worstShiftEvent;
      cluster.rawSourceEvent = worstShiftEvent.rawSourceEvent;
    }
    cluster.ts = cluster.events[0].ts;
    const lastShiftTimings = eventTimingsMicroSeconds2(cluster.events[cluster.events.length - 1]);
    cluster.dur = Micro2(lastShiftTimings.endTime - cluster.events[0].ts + MAX_SHIFT_TIME_DELTA2);
    if (weightedScore > sessionMaxScore2) {
      clsWindowID2 = windowID;
      sessionMaxScore2 = weightedScore;
    }
    if (cluster.navigationId) {
      const clustersForId = getWithDefault2(clustersByNavigationId2, cluster.navigationId, () => {
        return [];
      });
      clustersForId.push(cluster);
    }
  }
}
function data$7() {
  return {
    clusters: clusters2,
    sessionMaxScore: sessionMaxScore2,
    clsWindowID: clsWindowID2,
    prePaintEvents: prePaintEvents2,
    layoutInvalidationEvents: layoutInvalidationEvents2,
    scheduleStyleInvalidationEvents: scheduleStyleInvalidationEvents2,
    styleRecalcInvalidationEvents: styleRecalcInvalidationEvents2,
    renderFrameImplCreateChildFrameEvents: renderFrameImplCreateChildFrameEvents2,
    domLoadingEvents: domLoadingEvents2,
    layoutImageUnsizedEvents: layoutImageUnsizedEvents2,
    remoteFonts: remoteFonts2,
    scoreRecords: scoreRecords2,
    backendNodeIds: backendNodeIds2,
    clustersByNavigationId: clustersByNavigationId2,
    paintImageEvents: paintImageEvents3
  };
}
function deps$3() {
  return ["Screenshots", "Meta"];
}
function scoreClassificationForLayoutShift2(score) {
  let state = "good";
  if (score >= 0.1) {
    state = "ok";
  }
  if (score >= 0.25) {
    state = "bad";
  }
  return state;
}
function reset$6() {
  updateCountersByProcess2 = /* @__PURE__ */ new Map();
}
function handleEvent$6(event) {
  if (isUpdateCounters2(event)) {
    const countersForProcess = getWithDefault2(updateCountersByProcess2, event.pid, () => []);
    countersForProcess.push(event);
    updateCountersByProcess2.set(event.pid, countersForProcess);
  }
}
async function finalize$o() {
}
function data$6() {
  return { updateCountersByProcess: updateCountersByProcess2 };
}
function reset$5() {
  frames2 = /* @__PURE__ */ new Map();
}
function handleEvent$5(event) {
  if (isTracingStartedInBrowser2(event)) {
    for (const frame of event.args.data?.frames ?? []) {
      frames2.set(frame.frame, frame);
    }
    return;
  }
  if (isCommitLoad2(event)) {
    const frameData = event.args.data;
    if (!frameData) {
      return;
    }
    const frame = frames2.get(frameData.frame);
    if (!frame) {
      return;
    }
    frames2.set(frameData.frame, {
      ...frame,
      url: frameData.url || frame.url,
      name: frameData.name || frameData.name
    });
  }
}
async function finalize$n() {
}
function data$5() {
  return {
    frames: frames2
  };
}
function deps$2() {
  return ["Meta", "NetworkRequests"];
}
function reset$4() {
  scriptById2 = /* @__PURE__ */ new Map();
  frameIdByIsolate = /* @__PURE__ */ new Map();
}
function handleEvent$4(event) {
  const getOrMakeScript = (isolate, scriptIdAsNumber) => {
    const scriptId = String(scriptIdAsNumber);
    const key = `${isolate}.${scriptId}`;
    return getWithDefault2(scriptById2, key, () => ({ isolate, scriptId, frame: "", ts: event.ts }));
  };
  if (isRundownScriptCompiled2(event) && event.args.data) {
    const { isolate, scriptId, frame } = event.args.data;
    const script = getOrMakeScript(isolate, scriptId);
    script.frame = frame;
    script.ts = event.ts;
    return;
  }
  if (isRundownScript2(event)) {
    const { isolate, scriptId, url, sourceUrl, sourceMapUrl, sourceMapUrlElided } = event.args.data;
    const script = getOrMakeScript(isolate, scriptId);
    if (!script.frame) {
      script.frame = frameIdByIsolate.get(String(isolate)) ?? "";
    }
    script.url = url;
    script.ts = event.ts;
    if (sourceUrl) {
      script.sourceUrl = sourceUrl;
    }
    if (sourceMapUrlElided) {
      script.sourceMapUrlElided = true;
    } else if (sourceMapUrl) {
      script.sourceMapUrl = sourceMapUrl;
    }
    return;
  }
  if (isRundownScriptSource2(event)) {
    const { isolate, scriptId, sourceText } = event.args.data;
    const script = getOrMakeScript(isolate, scriptId);
    script.content = sourceText;
    return;
  }
  if (isRundownScriptSourceLarge2(event)) {
    const { isolate, scriptId, sourceText } = event.args.data;
    const script = getOrMakeScript(isolate, scriptId);
    script.content = (script.content ?? "") + sourceText;
    return;
  }
  if (isFunctionCall2(event) && event.args.data?.isolate && event.args.data.frame) {
    const { isolate, frame } = event.args.data;
    const existingValue = frameIdByIsolate.get(isolate);
    if (existingValue !== frame) {
      frameIdByIsolate.set(isolate, frame);
      for (const script of scriptById2.values()) {
        if (!script.frame && script.isolate === isolate) {
          script.frame = frame;
        }
      }
    }
  }
}
function findFrame2(meta, frameId) {
  for (const frames3 of meta.frameByProcessId?.values()) {
    const frame = frames3.get(frameId);
    if (frame) {
      return frame;
    }
  }
  return null;
}
function findNetworkRequest2(networkRequests, script) {
  if (!script.url) {
    return null;
  }
  return networkRequests.find((request3) => request3.args.data.url === script.url) ?? null;
}
function computeMappingEndColumns2(map2) {
  const result = /* @__PURE__ */ new Map();
  const mappings = map2.mappings();
  for (let i = 0; i < mappings.length - 1; i++) {
    const mapping = mappings[i];
    const nextMapping = mappings[i + 1];
    if (mapping.lineNumber === nextMapping.lineNumber) {
      result.set(mapping, nextMapping.columnNumber);
    }
  }
  return result;
}
function computeGeneratedFileSizes3(script) {
  if (!script.sourceMap) {
    throw new Error("expected source map");
  }
  const map2 = script.sourceMap;
  const content = script.content ?? "";
  const contentLength = content.length;
  const lines = content.split("\n");
  const files = {};
  const totalBytes = contentLength;
  let unmappedBytes = totalBytes;
  const mappingEndCols = computeMappingEndColumns2(script.sourceMap);
  for (const mapping of map2.mappings()) {
    const source2 = mapping.sourceURL;
    const lineNum = mapping.lineNumber;
    const colNum = mapping.columnNumber;
    const lastColNum = mappingEndCols.get(mapping);
    if (!source2) {
      continue;
    }
    const line = lines[lineNum];
    if (line === null || line === void 0) {
      const errorMessage = `${map2.url()} mapping for line out of bounds: ${lineNum + 1}`;
      return { errorMessage };
    }
    if (colNum > line.length) {
      const errorMessage = `${map2.url()} mapping for column out of bounds: ${lineNum + 1}:${colNum}`;
      return { errorMessage };
    }
    let mappingLength = 0;
    if (lastColNum !== void 0) {
      if (lastColNum > line.length) {
        const errorMessage = `${map2.url()} mapping for last column out of bounds: ${lineNum + 1}:${lastColNum}`;
        return { errorMessage };
      }
      mappingLength = lastColNum - colNum;
    } else {
      mappingLength = line.length - colNum + 1;
    }
    files[source2] = (files[source2] || 0) + mappingLength;
    unmappedBytes -= mappingLength;
  }
  return {
    files,
    unmappedBytes,
    totalBytes
  };
}
function getScriptGeneratedSizes2(script) {
  if (script.sourceMap && !script.sizes) {
    script.sizes = computeGeneratedFileSizes3(script);
  }
  return script.sizes ?? null;
}
function findCachedRawSourceMap2(script, options2) {
  if (options2.isFreshRecording || !options2.metadata?.sourceMaps) {
    return;
  }
  if (script.sourceMapUrlElided) {
    if (!script.url) {
      return;
    }
    const cachedSourceMap = options2.metadata.sourceMaps.find((m) => m.url === script.url);
    if (cachedSourceMap) {
      return cachedSourceMap.sourceMap;
    }
    return;
  }
  if (!script.sourceMapUrl) {
    return;
  }
  const isDataUrl = script.sourceMapUrl.startsWith("data:");
  if (!isDataUrl) {
    const cachedSourceMap = options2.metadata.sourceMaps.find((m) => m.sourceMapUrl === script.sourceMapUrl);
    if (cachedSourceMap) {
      return cachedSourceMap.sourceMap;
    }
  }
  return;
}
async function finalize$m(options2) {
  const meta = data$p();
  const networkRequests = [...data$o().byId.values()];
  const documentUrls = /* @__PURE__ */ new Set();
  for (const frames3 of meta.frameByProcessId.values()) {
    for (const frame of frames3.values()) {
      documentUrls.add(frame.url);
    }
  }
  for (const script of scriptById2.values()) {
    script.request = findNetworkRequest2(networkRequests, script) ?? void 0;
    script.inline = !!script.url && documentUrls.has(script.url);
  }
  if (!options2.resolveSourceMap) {
    return;
  }
  const promises2 = [];
  for (const script of scriptById2.values()) {
    if (!script.frame || !script.url || !script.sourceMapUrl && !script.sourceMapUrlElided) {
      continue;
    }
    const frameUrl = findFrame2(meta, script.frame)?.url;
    if (!frameUrl) {
      continue;
    }
    let sourceUrl = script.url;
    if (script.sourceUrl) {
      sourceUrl = ParsedURL2.completeURL(frameUrl, script.sourceUrl) ?? script.sourceUrl;
    }
    let sourceMapUrl;
    if (script.sourceMapUrl) {
      sourceMapUrl = ParsedURL2.completeURL(sourceUrl, script.sourceMapUrl);
      if (!sourceMapUrl) {
        continue;
      }
      script.sourceMapUrl = sourceMapUrl;
    }
    const params = {
      scriptId: script.scriptId,
      scriptUrl: script.url,
      sourceUrl,
      sourceMapUrl: sourceMapUrl ?? "",
      frame: script.frame,
      cachedRawSourceMap: findCachedRawSourceMap2(script, options2)
    };
    const promise = options2.resolveSourceMap(params).then((sourceMap2) => {
      if (sourceMap2) {
        script.sourceMap = sourceMap2;
      }
    });
    promises2.push(promise.catch((e) => {
      console.error("Uncaught error when resolving source map", params, e);
    }));
  }
  await Promise.all(promises2);
}
function data$4() {
  return {
    scripts: [...scriptById2.values()]
  };
}
function reset$3() {
  lastRecalcStyleEvent2 = null;
  lastInvalidatedNode2 = null;
  selectorDataForRecalcStyle2 = /* @__PURE__ */ new Map();
  invalidatedNodeList2 = [];
}
function handleEvent$3(event) {
  if (isStyleRecalcInvalidationTracking2(event)) {
    if (event.args.data.subtree && event.args.data.reason === "Related style rule" && lastInvalidatedNode2 && event.args.data.nodeId === lastInvalidatedNode2.backendNodeId) {
      lastInvalidatedNode2.subtree = true;
      return;
    }
  }
  if (isSelectorStats2(event) && lastRecalcStyleEvent2 && event.args.selector_stats) {
    selectorDataForRecalcStyle2.set(lastRecalcStyleEvent2, {
      timings: event.args.selector_stats.selector_timings
    });
    return;
  }
  if (isStyleInvalidatorInvalidationTracking2(event)) {
    const selectorList = new Array();
    event.args.data.selectors?.forEach((selector) => {
      selectorList.push({
        selector: selector.selector,
        styleSheetId: selector.style_sheet_id
      });
    });
    if (selectorList.length > 0) {
      lastInvalidatedNode2 = {
        frame: event.args.data.frame,
        backendNodeId: event.args.data.nodeId,
        type: "StyleInvalidatorInvalidationTracking",
        selectorList,
        ts: event.ts,
        tts: event.tts,
        subtree: false,
        lastRecalcStyleEventTs: lastRecalcStyleEvent2 ? lastRecalcStyleEvent2.ts : Micro2(0)
      };
      invalidatedNodeList2.push(lastInvalidatedNode2);
    }
  }
  if (isRecalcStyle2(event)) {
    lastRecalcStyleEvent2 = event;
    return;
  }
}
async function finalize$l() {
}
function data$3() {
  return {
    dataForRecalcStyleEvent: selectorDataForRecalcStyle2,
    invalidatedNodeList: invalidatedNodeList2
  };
}
function reset$2() {
  beginCommitCompositorFrameEvents2 = [];
  parseMetaViewportEvents2 = [];
  interactionEvents2 = [];
  eventTimingStartEventsForInteractions2 = [];
  eventTimingEndEventsForInteractions2 = [];
  interactionEventsWithNoNesting2 = [];
  longestInteractionEvent2 = null;
}
function handleEvent$2(event) {
  if (isBeginCommitCompositorFrame2(event)) {
    beginCommitCompositorFrameEvents2.push(event);
    return;
  }
  if (isParseMetaViewport2(event)) {
    parseMetaViewportEvents2.push(event);
    return;
  }
  if (!isEventTiming2(event)) {
    return;
  }
  if (isEventTimingEnd2(event)) {
    eventTimingEndEventsForInteractions2.push(event);
  }
  if (!event.args.data || !isEventTimingStart2(event)) {
    return;
  }
  const { duration: duration2, interactionId } = event.args.data;
  if (duration2 < 1 || interactionId === void 0 || interactionId === 0) {
    return;
  }
  eventTimingStartEventsForInteractions2.push(event);
}
function categoryOfInteraction2(interaction) {
  if (pointerEventTypes2.has(interaction.type)) {
    return "POINTER";
  }
  if (keyboardEventTypes2.has(interaction.type)) {
    return "KEYBOARD";
  }
  return "OTHER";
}
function removeNestedInteractionsAndSetProcessingTime2(interactions) {
  const earliestEventForEndTimePerCategory = {
    POINTER: /* @__PURE__ */ new Map(),
    KEYBOARD: /* @__PURE__ */ new Map(),
    OTHER: /* @__PURE__ */ new Map()
  };
  function storeEventIfEarliestForCategoryAndEndTime(interaction) {
    const category = categoryOfInteraction2(interaction);
    const earliestEventForEndTime = earliestEventForEndTimePerCategory[category];
    const endTime = Micro2(interaction.ts + interaction.dur);
    const earliestCurrentEvent = earliestEventForEndTime.get(endTime);
    if (!earliestCurrentEvent) {
      earliestEventForEndTime.set(endTime, interaction);
      return;
    }
    if (interaction.ts < earliestCurrentEvent.ts) {
      earliestEventForEndTime.set(endTime, interaction);
    } else if (interaction.ts === earliestCurrentEvent.ts && interaction.interactionId === earliestCurrentEvent.interactionId) {
      const currentProcessingDuration = earliestCurrentEvent.processingEnd - earliestCurrentEvent.processingStart;
      const newProcessingDuration = interaction.processingEnd - interaction.processingStart;
      if (newProcessingDuration > currentProcessingDuration) {
        earliestEventForEndTime.set(endTime, interaction);
      }
    }
    if (interaction.processingStart < earliestCurrentEvent.processingStart) {
      earliestCurrentEvent.processingStart = interaction.processingStart;
      writeSyntheticTimespans2(earliestCurrentEvent);
    }
    if (interaction.processingEnd > earliestCurrentEvent.processingEnd) {
      earliestCurrentEvent.processingEnd = interaction.processingEnd;
      writeSyntheticTimespans2(earliestCurrentEvent);
    }
  }
  for (const interaction of interactions) {
    storeEventIfEarliestForCategoryAndEndTime(interaction);
  }
  const keptEvents = Object.values(earliestEventForEndTimePerCategory).flatMap((eventsByEndTime) => Array.from(eventsByEndTime.values()));
  keptEvents.sort((eventA, eventB) => {
    return eventA.ts - eventB.ts;
  });
  return keptEvents;
}
function writeSyntheticTimespans2(event) {
  const startEvent = event.args.data.beginEvent;
  const endEvent = event.args.data.endEvent;
  event.inputDelay = Micro2(event.processingStart - startEvent.ts);
  event.mainThreadHandling = Micro2(event.processingEnd - event.processingStart);
  event.presentationDelay = Micro2(endEvent.ts - event.processingEnd);
}
async function finalize$k() {
  const { navigationsByFrameId: navigationsByFrameId3 } = data$p();
  const beginAndEndEvents = mergeOrdered2(eventTimingStartEventsForInteractions2, eventTimingEndEventsForInteractions2, eventTimeComparator2);
  const beginEventById = /* @__PURE__ */ new Map();
  for (const event of beginAndEndEvents) {
    if (isEventTimingStart2(event)) {
      const forId = beginEventById.get(event.id) ?? [];
      forId.push(event);
      beginEventById.set(event.id, forId);
    } else if (isEventTimingEnd2(event)) {
      const beginEvents = beginEventById.get(event.id) ?? [];
      const beginEvent = beginEvents.pop();
      if (!beginEvent) {
        continue;
      }
      const { type: type2, interactionId, timeStamp, processingStart, processingEnd } = beginEvent.args.data;
      if (!type2 || !interactionId || !timeStamp || !processingStart || !processingEnd) {
        continue;
      }
      const processingStartRelativeToTraceTime = Micro2(milliToMicro2(processingStart) - milliToMicro2(timeStamp) + beginEvent.ts);
      const processingEndRelativeToTraceTime = Micro2(milliToMicro2(processingEnd) - milliToMicro2(timeStamp) + beginEvent.ts);
      const frameId = beginEvent.args.frame ?? beginEvent.args.data.frame ?? "";
      const navigation2 = getNavigationForTraceEvent2(beginEvent, frameId, navigationsByFrameId3);
      const navigationId = navigation2?.args.data?.navigationId;
      const interactionEvent = SyntheticEventsManager2.registerSyntheticEvent({
        rawSourceEvent: beginEvent,
        cat: beginEvent.cat,
        name: beginEvent.name,
        pid: beginEvent.pid,
        tid: beginEvent.tid,
        ph: beginEvent.ph,
        processingStart: processingStartRelativeToTraceTime,
        processingEnd: processingEndRelativeToTraceTime,
        inputDelay: Micro2(-1),
        mainThreadHandling: Micro2(-1),
        presentationDelay: Micro2(-1),
        args: {
          data: {
            beginEvent,
            endEvent: event,
            frame: frameId,
            navigationId
          }
        },
        ts: beginEvent.ts,
        dur: Micro2(event.ts - beginEvent.ts),
        type: beginEvent.args.data.type,
        interactionId: beginEvent.args.data.interactionId
      });
      writeSyntheticTimespans2(interactionEvent);
      interactionEvents2.push(interactionEvent);
    }
  }
  sortTraceEventsInPlace2(interactionEvents2);
  interactionEventsWithNoNesting2.push(...removeNestedInteractionsAndSetProcessingTime2(interactionEvents2));
  for (const interactionEvent of interactionEventsWithNoNesting2) {
    if (!longestInteractionEvent2 || longestInteractionEvent2.dur < interactionEvent.dur) {
      longestInteractionEvent2 = interactionEvent;
    }
  }
}
function data$2() {
  return {
    beginCommitCompositorFrameEvents: beginCommitCompositorFrameEvents2,
    parseMetaViewportEvents: parseMetaViewportEvents2,
    interactionEvents: interactionEvents2,
    interactionEventsWithNoNesting: interactionEventsWithNoNesting2,
    longestInteractionEvent: longestInteractionEvent2,
    interactionsOverThreshold: new Set(interactionEvents2.filter((event) => {
      return event.dur > LONG_INTERACTION_THRESHOLD2;
    }))
  };
}
function deps$1() {
  return ["Meta"];
}
function scoreClassificationForInteractionToNextPaint2(timing) {
  if (timing <= INP_GOOD_TIMING2) {
    return "good";
  }
  if (timing <= INP_MEDIUM_TIMING2) {
    return "ok";
  }
  return "bad";
}
function reset$1() {
  sessionIdEvents2 = [];
  workerIdByThread2 = /* @__PURE__ */ new Map();
  workerURLById2 = /* @__PURE__ */ new Map();
}
function handleEvent$1(event) {
  if (isTracingSessionIdForWorker2(event)) {
    sessionIdEvents2.push(event);
  }
}
async function finalize$j() {
  for (const sessionIdEvent of sessionIdEvents2) {
    if (!sessionIdEvent.args.data) {
      continue;
    }
    workerIdByThread2.set(sessionIdEvent.args.data.workerThreadId, sessionIdEvent.args.data.workerId);
    workerURLById2.set(sessionIdEvent.args.data.workerId, sessionIdEvent.args.data.url);
  }
}
function data$1() {
  return {
    workerSessionIdEvents: sessionIdEvents2,
    workerIdByThread: workerIdByThread2,
    workerURLById: workerURLById2
  };
}
function reset31() {
  warningsPerEvent2 = /* @__PURE__ */ new Map();
  eventsPerWarning2 = /* @__PURE__ */ new Map();
  allEventsStack2 = [];
  jsInvokeStack2 = [];
  taskReflowEvents2 = [];
  longTaskEvents2 = [];
}
function storeWarning2(event, warning) {
  const existingWarnings = getWithDefault2(warningsPerEvent2, event, () => []);
  existingWarnings.push(warning);
  warningsPerEvent2.set(event, existingWarnings);
  const existingEvents = getWithDefault2(eventsPerWarning2, warning, () => []);
  existingEvents.push(event);
  eventsPerWarning2.set(warning, existingEvents);
}
function handleEvent31(event) {
  processForcedReflowWarning2(event);
  if (event.name === "RunTask") {
    const { duration: duration2 } = eventTimingsMicroSeconds2(event);
    if (duration2 > LONG_MAIN_THREAD_TASK_THRESHOLD2) {
      longTaskEvents2.push(event);
    }
    return;
  }
  if (isFireIdleCallback2(event)) {
    const { duration: duration2 } = eventTimingsMilliSeconds2(event);
    if (duration2 > event.args.data.allottedMilliseconds) {
      storeWarning2(event, "IDLE_CALLBACK_OVER_TIME");
    }
    return;
  }
}
function processForcedReflowWarning2(event) {
  accomodateEventInStack2(event, allEventsStack2);
  accomodateEventInStack2(event, jsInvokeStack2, isJSInvocationEvent2(event));
  if (jsInvokeStack2.length) {
    if (event.name === "Layout" || event.name === "UpdateLayoutTree") {
      taskReflowEvents2.push(event);
      return;
    }
  }
  if (allEventsStack2.length === 1) {
    const totalTime = taskReflowEvents2.reduce((time2, event2) => time2 + (event2.dur || 0), 0);
    if (totalTime >= FORCED_REFLOW_THRESHOLD2) {
      taskReflowEvents2.forEach((reflowEvent) => storeWarning2(reflowEvent, "FORCED_REFLOW"));
    }
    taskReflowEvents2.length = 0;
  }
}
function accomodateEventInStack2(event, stack, pushEventToStack = true) {
  let nextItem = stack.at(-1);
  while (nextItem && event.ts > nextItem.ts + (nextItem.dur || 0)) {
    stack.pop();
    nextItem = stack.at(-1);
  }
  if (!pushEventToStack) {
    return;
  }
  stack.push(event);
}
function deps17() {
  return ["UserInteractions", "Workers"];
}
async function finalize$i() {
  const longInteractions = data$2().interactionsOverThreshold;
  for (const interaction of longInteractions) {
    storeWarning2(interaction, "LONG_INTERACTION");
  }
  for (const event of longTaskEvents2) {
    if (!(event.tid, data$1().workerIdByThread.has(event.tid))) {
      storeWarning2(event, "LONG_TASK");
    }
  }
  longTaskEvents2.length = 0;
}
function data31() {
  return {
    perEvent: warningsPerEvent2,
    perWarning: eventsPerWarning2
  };
}
function fromHandlerData(data32, customZeroTime) {
  const frames3 = [];
  const zeroTime = typeof customZeroTime !== "undefined" ? customZeroTime : data32.Meta.traceBounds.min;
  const spanTime = data32.Meta.traceBounds.range;
  const fromCache = filmStripCache.get(data32)?.get(zeroTime);
  if (fromCache) {
    return fromCache;
  }
  const screenshots = data32.Screenshots.screenshots ?? data32.Screenshots.legacySyntheticScreenshots ?? [];
  for (const screenshotEvent of screenshots) {
    if (screenshotEvent.ts < zeroTime) {
      continue;
    }
    const frame = {
      index: frames3.length,
      screenshotEvent
    };
    frames3.push(frame);
  }
  const result = {
    zeroTime,
    spanTime,
    frames: Array.from(frames3)
  };
  const cachedForData = getWithDefault2(filmStripCache, data32, () => /* @__PURE__ */ new Map());
  cachedForData.set(zeroTime, result);
  return result;
}
function frameClosestToTimestamp(filmStrip, searchTimestamp) {
  const closestFrameIndexBeforeTimestamp = nearestIndexFromEnd2(filmStrip.frames, (frame) => frame.screenshotEvent.ts < searchTimestamp);
  if (closestFrameIndexBeforeTimestamp === null) {
    return null;
  }
  return filmStrip.frames[closestFrameIndexBeforeTimestamp];
}
function clearCacheForTrace2(data32) {
  stackTraceForEventInTrace2.delete(data32);
}
function get2(event, data32) {
  let cacheForTrace = stackTraceForEventInTrace2.get(data32);
  if (!cacheForTrace) {
    cacheForTrace = /* @__PURE__ */ new Map();
    stackTraceForEventInTrace2.set(data32, cacheForTrace);
  }
  const resultFromCache = cacheForTrace.get(event);
  if (resultFromCache) {
    return resultFromCache;
  }
  let result = null;
  if (isSyntheticExtensionEntry2(event)) {
    result = getForExtensionEntry2(event, data32);
  } else if (isPerformanceMeasureBegin2(event)) {
    result = getForPerformanceMeasure2(event, data32);
  } else {
    result = getForEvent2(event, data32);
    const payloadCallFrames = getTraceEventPayloadStackAsProtocolCallFrame2(event).filter((callFrame) => !isNativeJSFunction2(callFrame));
    if (!result.callFrames.length) {
      result.callFrames = payloadCallFrames;
    } else {
      for (let i = 0; i < payloadCallFrames.length && i < result.callFrames.length; i++) {
        result.callFrames[i] = payloadCallFrames[i];
      }
    }
  }
  if (result) {
    cacheForTrace.set(event, result);
  }
  return result;
}
function getForEvent2(event, data32) {
  const entryToNode5 = data32.Renderer.entryToNode.size > 0 ? data32.Renderer.entryToNode : data32.Samples.entryToNode;
  const topStackTrace = { callFrames: [] };
  let stackTrace = topStackTrace;
  let currentEntry;
  let node2 = entryToNode5.get(event);
  const traceCache = stackTraceForEventInTrace2.get(data32) || /* @__PURE__ */ new Map();
  stackTraceForEventInTrace2.set(data32, traceCache);
  while (node2) {
    if (!isProfileCall2(node2.entry)) {
      const maybeAsyncParent = data32.AsyncJSCalls.runEntryPointToScheduler.get(node2.entry);
      if (!maybeAsyncParent) {
        node2 = node2.parent;
        continue;
      }
      const maybeAsyncParentNode2 = maybeAsyncParent && entryToNode5.get(maybeAsyncParent.scheduler);
      if (maybeAsyncParentNode2) {
        stackTrace = addAsyncParentToStack2(stackTrace, maybeAsyncParent.taskName);
        node2 = maybeAsyncParentNode2;
      }
      continue;
    }
    currentEntry = node2.entry;
    const stackTraceFromCache = traceCache.get(node2.entry);
    if (stackTraceFromCache) {
      stackTrace.callFrames.push(...stackTraceFromCache.callFrames.filter((callFrame) => !isNativeJSFunction2(callFrame)));
      stackTrace.parent = stackTraceFromCache.parent;
      stackTrace.description = stackTrace.description || stackTraceFromCache.description;
      break;
    }
    if (!isNativeJSFunction2(currentEntry.callFrame)) {
      stackTrace.callFrames.push(currentEntry.callFrame);
    }
    const maybeAsyncParentEvent = data32.AsyncJSCalls.asyncCallToScheduler.get(currentEntry);
    const maybeAsyncParentNode = maybeAsyncParentEvent && entryToNode5.get(maybeAsyncParentEvent.scheduler);
    if (maybeAsyncParentNode) {
      stackTrace = addAsyncParentToStack2(stackTrace, maybeAsyncParentEvent.taskName);
      node2 = maybeAsyncParentNode;
      continue;
    }
    node2 = node2.parent;
  }
  return topStackTrace;
}
function addAsyncParentToStack2(stackTrace, taskName) {
  const parent = { callFrames: [] };
  stackTrace.parent = parent;
  parent.description = taskName;
  return parent;
}
function getForExtensionEntry2(event, data32) {
  const rawEvent = event.rawSourceEvent;
  if (isPerformanceMeasureBegin2(rawEvent)) {
    return getForPerformanceMeasure2(rawEvent, data32);
  }
  if (!rawEvent) {
    return null;
  }
  return get2(rawEvent, data32);
}
function getForPerformanceMeasure2(event, data32) {
  let rawEvent = event;
  if (event.args.traceId === void 0) {
    return null;
  }
  rawEvent = data32.UserTimings.measureTraceByTraceId.get(event.args.traceId);
  if (!rawEvent) {
    return null;
  }
  return get2(rawEvent, data32);
}
function isNativeJSFunction2({ columnNumber, lineNumber, url, scriptId }) {
  return lineNumber === -1 && columnNumber === -1 && url === "" && scriptId === "0";
}
function getTraceEventPayloadStackAsProtocolCallFrame2(event) {
  const payloadCallStack = getZeroIndexedStackTraceInEventPayload2(event) || [];
  const callFrames = [];
  for (const frame of payloadCallStack) {
    callFrames.push({ ...frame, scriptId: String(frame.scriptId) });
  }
  return callFrames;
}
function getNetworkInitiator(data32, event) {
  const networkHandlerInitiator = data32.NetworkRequests.incompleteInitiator.get(event);
  if (networkHandlerInitiator?.args.data.mimeType === "text/css") {
    return networkHandlerInitiator;
  }
  const stack = get2(event.rawSourceEvent, data32);
  const initiatorCallFrame = stack?.parent?.callFrames.at(0);
  if (!initiatorCallFrame) {
    return networkHandlerInitiator;
  }
  const matchingRequestIds = data32.NetworkRequests.requestIdsByURL.get(initiatorCallFrame.url) ?? [];
  const matchingRequests = matchingRequestIds.map((id2) => data32.NetworkRequests.byId.get(id2)).filter((req) => req !== void 0).filter((req) => req.ts < event.ts);
  return matchingRequests.at(-1);
}
function calculateWindow(traceBounds3, mainThreadEntries) {
  if (!mainThreadEntries.length) {
    return traceBounds3;
  }
  const entriesWithIdleRemoved = mainThreadEntries.filter((entry) => {
    if (isProfileCall2(entry) && (IDLE_FUNCTION_CALL_NAMES.has(entry.callFrame.functionName) || !entry.callFrame.functionName)) {
      return false;
    }
    return true;
  });
  if (entriesWithIdleRemoved.length === 0) {
    return traceBounds3;
  }
  function findLowUtilizationRegion(startIndex, stopIndex) {
    const threshold = 0.1;
    let cutIndex = startIndex;
    const entryAtCut = entriesWithIdleRemoved[cutIndex];
    const timings = eventTimingsMicroSeconds2(entryAtCut);
    let cutTime = (timings.startTime + timings.endTime) / 2;
    let usedTime = 0;
    const step = Math.sign(stopIndex - startIndex);
    for (let i = startIndex; i !== stopIndex; i += step) {
      const task = entriesWithIdleRemoved[i];
      const taskTimings = eventTimingsMicroSeconds2(task);
      const taskTime = (taskTimings.startTime + taskTimings.endTime) / 2;
      const interval = Math.abs(cutTime - taskTime);
      if (usedTime < threshold * interval) {
        cutIndex = i;
        cutTime = taskTime;
        usedTime = 0;
      }
      usedTime += taskTimings.duration;
    }
    return cutIndex;
  }
  const rightIndex = findLowUtilizationRegion(entriesWithIdleRemoved.length - 1, 0);
  const leftIndex = findLowUtilizationRegion(0, rightIndex);
  const leftTimings = eventTimingsMicroSeconds2(entriesWithIdleRemoved[leftIndex]);
  const rightTimings = eventTimingsMicroSeconds2(entriesWithIdleRemoved[rightIndex]);
  let leftTime = leftTimings.startTime;
  let rightTime = rightTimings.endTime;
  const zoomedInSpan = rightTime - leftTime;
  if (zoomedInSpan < traceBounds3.range * 0.1) {
    return traceBounds3;
  }
  leftTime = Micro2(Math.max(leftTime - 0.05 * zoomedInSpan, traceBounds3.min));
  rightTime = Micro2(Math.min(rightTime + 0.05 * zoomedInSpan, traceBounds3.max));
  return {
    min: leftTime,
    max: rightTime,
    range: Micro2(rightTime - leftTime)
  };
}
function normalizeSource2(source2) {
  source2 = source2.replace(/\?$/, "");
  const lastNodeModulesIndex = source2.lastIndexOf("node_modules");
  if (lastNodeModulesIndex !== -1) {
    source2 = source2.substring(lastNodeModulesIndex);
  }
  return source2;
}
function shouldIgnoreSource2(source2) {
  if (source2.includes("webpack/bootstrap")) {
    return true;
  }
  if (source2.includes("(webpack)/buildin")) {
    return true;
  }
  if (source2.includes("external ")) {
    return true;
  }
  return false;
}
function normalizeDuplication2(duplication) {
  for (const [key, data32] of duplication) {
    data32.duplicates.sort((a, b) => b.attributedSize - a.attributedSize);
    if (data32.duplicates.length > 1) {
      const largestResourceSize = data32.duplicates[0].attributedSize;
      data32.duplicates = data32.duplicates.filter((duplicate) => {
        const percentSize = duplicate.attributedSize / largestResourceSize;
        return percentSize >= RELATIVE_SIZE_THRESHOLD2;
      });
    }
    data32.duplicates = data32.duplicates.filter((duplicate) => duplicate.attributedSize >= ABSOLUTE_SIZE_THRESHOLD_BYTES2);
    if (data32.duplicates.length <= 1) {
      duplication.delete(key);
      continue;
    }
    data32.estimatedDuplicateBytes = data32.duplicates.slice(1).reduce((acc, cur) => acc + cur.attributedSize, 0);
  }
}
function indexOfOrLength2(haystack, needle, startPosition = 0) {
  const index2 = haystack.indexOf(needle, startPosition);
  return index2 === -1 ? haystack.length : index2;
}
function getNodeModuleName2(source2) {
  const sourceSplit = source2.split("node_modules/");
  source2 = sourceSplit[sourceSplit.length - 1];
  const indexFirstSlash = indexOfOrLength2(source2, "/");
  if (source2[0] === "@") {
    return source2.slice(0, indexOfOrLength2(source2, "/", indexFirstSlash + 1));
  }
  return source2.slice(0, indexFirstSlash);
}
function groupByNodeModules2(duplication) {
  const groupedDuplication = /* @__PURE__ */ new Map();
  for (const [source2, data32] of duplication) {
    if (!source2.includes("node_modules")) {
      groupedDuplication.set(source2, data32);
      continue;
    }
    const nodeModuleKey = "node_modules/" + getNodeModuleName2(source2);
    const aggregatedData = groupedDuplication.get(nodeModuleKey) ?? {
      duplicates: [],
      estimatedDuplicateBytes: 0
    };
    groupedDuplication.set(nodeModuleKey, aggregatedData);
    for (const { script, attributedSize } of data32.duplicates) {
      let duplicate = aggregatedData.duplicates.find((d) => d.script === script);
      if (!duplicate) {
        duplicate = { script, attributedSize: 0 };
        aggregatedData.duplicates.push(duplicate);
      }
      duplicate.attributedSize += attributedSize;
    }
  }
  return groupedDuplication;
}
function sorted2(duplication) {
  return new Map([...duplication].sort((a, b) => b[1].estimatedDuplicateBytes - a[1].estimatedDuplicateBytes));
}
function computeScriptDuplication2(scriptsData, compressionRatios) {
  const sourceDatasMap = /* @__PURE__ */ new Map();
  for (const script of scriptsData.scripts) {
    if (!script.content || !script.sourceMap) {
      continue;
    }
    const sizes = getScriptGeneratedSizes2(script);
    if (!sizes) {
      continue;
    }
    if ("errorMessage" in sizes) {
      console.error(sizes.errorMessage);
      continue;
    }
    const sourceDataArray = [];
    sourceDatasMap.set(script, sourceDataArray);
    const sources = script.sourceMap.sourceURLs();
    for (let i = 0; i < sources.length; i++) {
      if (shouldIgnoreSource2(sources[i])) {
        continue;
      }
      const sourceSize = sizes.files[sources[i]];
      sourceDataArray.push({
        source: normalizeSource2(sources[i]),
        resourceSize: sourceSize
      });
    }
  }
  const duplication = /* @__PURE__ */ new Map();
  for (const [script, sourceDataArray] of sourceDatasMap) {
    for (const sourceData of sourceDataArray) {
      let data32 = duplication.get(sourceData.source);
      if (!data32) {
        data32 = { estimatedDuplicateBytes: 0, duplicates: [] };
        duplication.set(sourceData.source, data32);
      }
      const compressionRatio = script.request ? compressionRatios.get(script.request?.args.data.requestId) ?? 1 : 1;
      const transferSize = Math.round(sourceData.resourceSize * compressionRatio);
      data32.duplicates.push({
        script,
        attributedSize: transferSize
      });
    }
  }
  const duplicationGroupedByNodeModules = groupByNodeModules2(duplication);
  normalizeDuplication2(duplication);
  normalizeDuplication2(duplicationGroupedByNodeModules);
  return {
    duplication: sorted2(duplication),
    duplicationGroupedByNodeModules: sorted2(duplicationGroupedByNodeModules)
  };
}
function eventStackFrame(event) {
  if (isProfileCall2(event)) {
    return event.callFrame;
  }
  const topFrame = event.args?.data?.stackTrace?.[0];
  if (!topFrame) {
    return null;
  }
  return { ...topFrame, scriptId: String(topFrame.scriptId) };
}
function generateEventID2(event) {
  if (isProfileCall2(event)) {
    const name = SamplesIntegrator2.isNativeRuntimeFrame(event.callFrame) ? SamplesIntegrator2.nativeGroup(event.callFrame.functionName) : event.callFrame.functionName;
    const location = event.callFrame.scriptId || event.callFrame.url || "";
    return `f:${name}@${location}:${event.callFrame.lineNumber}:${event.callFrame.columnNumber}`;
  }
  if (isConsoleTimeStamp2(event) && event.args.data) {
    return `${event.name}:${event.args.data.name}`;
  }
  if (isSyntheticNetworkRequest2(event) || isReceivedDataEvent2(event)) {
    return `req:${event.args.data.requestId}`;
  }
  return event.name;
}
function collectMainThreadActivity2(data32) {
  const mainFrameMainThread = data32.Renderer.processes.values().find((p) => {
    const url = p.url ?? "";
    return p.isOnMainFrame && !url.startsWith("about:") && !url.startsWith("chrome:");
  })?.threads.values().find((t) => t.name === "CrRendererMain");
  if (!mainFrameMainThread) {
    return [];
  }
  return mainFrameMainThread.entries;
}
function summarizeByThirdParty2(data32, traceBounds3) {
  const mainThreadEvents = collectMainThreadActivity2(data32).sort(eventTimeComparator2);
  const groupingFunction = (event) => {
    const entity = data32.Renderer.entityMappings.entityByEvent.get(event);
    return entity?.name ?? "";
  };
  const node2 = getBottomUpTree2(mainThreadEvents, traceBounds3, groupingFunction);
  const summaries = summarizeBottomUpByEntity2(node2, data32);
  return summaries;
}
function summarizeByURL2(data32, traceBounds3) {
  const mainThreadEvents = collectMainThreadActivity2(data32).sort(eventTimeComparator2);
  const groupingFunction = (event) => {
    return getNonResolvedURL2(event, data32) ?? "";
  };
  const node2 = getBottomUpTree2(mainThreadEvents, traceBounds3, groupingFunction);
  const summaries = summarizeBottomUpByURL2(node2, data32);
  return summaries;
}
function summarizeBottomUpByEntity2(root2, data32) {
  const summaries = [];
  const topNodes = [...root2.children().values()].flat();
  for (const node2 of topNodes) {
    if (node2.id === "") {
      continue;
    }
    const entity = data32.Renderer.entityMappings.entityByEvent.get(node2.event);
    if (!entity) {
      continue;
    }
    const summary = {
      transferSize: node2.transferSize,
      mainThreadTime: Milli2(node2.selfTime),
      entity,
      relatedEvents: data32.Renderer.entityMappings.eventsByEntity.get(entity) ?? []
    };
    summaries.push(summary);
  }
  return summaries;
}
function summarizeBottomUpByURL2(root2, data32) {
  const summaries = [];
  const allRequests = data32.NetworkRequests.byTime;
  const topNodes = [...root2.children().values()].flat();
  for (const node2 of topNodes) {
    if (node2.id === "" || typeof node2.id !== "string") {
      continue;
    }
    const entity = data32.Renderer.entityMappings.entityByEvent.get(node2.event);
    if (!entity) {
      continue;
    }
    const url = node2.id;
    const request3 = allRequests.find((r) => r.args.data.url === url);
    const summary = {
      request: request3,
      url,
      entity,
      transferSize: node2.transferSize,
      mainThreadTime: Milli2(node2.selfTime)
    };
    summaries.push(summary);
  }
  return summaries;
}
function getBottomUpTree2(mainThreadEvents, tracebounds, groupingFunction) {
  const visibleEvents = VISIBLE_TRACE_EVENT_TYPES2.values().toArray();
  const filter2 = new VisibleEventsFilter2(visibleEvents.concat(["SyntheticNetworkRequest"]));
  const startTime = microToMilli2(tracebounds.min);
  const endTime = microToMilli2(tracebounds.max);
  return new BottomUpRootNode2(mainThreadEvents, {
    textFilter: new ExclusiveNameFilter2([]),
    filters: [filter2],
    startTime,
    endTime,
    eventGroupIdCallback: groupingFunction,
    calculateTransferSize: true,
    forceGroupIdCallback: true
  });
}
function erf3(x) {
  const sign = Math.sign(x);
  x = Math.abs(x);
  const a1 = 0.254829592;
  const a2 = -0.284496736;
  const a3 = 1.421413741;
  const a4 = -1.453152027;
  const a5 = 1.061405429;
  const p = 0.3275911;
  const t = 1 / (1 + p * x);
  const y = t * (a1 + t * (a2 + t * (a3 + t * (a4 + t * a5))));
  return sign * (1 - y * Math.exp(-x * x));
}
function getLogNormalScore3({ median, p10 }, value) {
  if (median <= 0) {
    throw new Error("median must be greater than zero");
  }
  if (p10 <= 0) {
    throw new Error("p10 must be greater than zero");
  }
  if (p10 >= median) {
    throw new Error("p10 must be less than the median");
  }
  if (value <= 0) {
    return 1;
  }
  const INVERSE_ERFC_ONE_FIFTH = 0.9061938024368232;
  const xRatio = Math.max(Number.MIN_VALUE, value / median);
  const xLogRatio = Math.log(xRatio);
  const p10Ratio = Math.max(Number.MIN_VALUE, p10 / median);
  const p10LogRatio = -Math.log(p10Ratio);
  const standardizedX = xLogRatio * INVERSE_ERFC_ONE_FIFTH / p10LogRatio;
  const complementaryPercentile = (1 - erf3(standardizedX)) / 2;
  let score;
  if (value <= p10) {
    score = Math.max(MIN_PASSING_SCORE3, Math.min(1, complementaryPercentile));
  } else if (value <= median) {
    score = Math.max(MIN_AVERAGE_SCORE3, Math.min(MAX_AVERAGE_SCORE3, complementaryPercentile));
  } else {
    score = Math.max(0, Math.min(MAX_FAILING_SCORE3, complementaryPercentile));
  }
  return score;
}
function linearInterpolation2(x0, y0, x1, y1, x) {
  const slope = (y1 - y0) / (x1 - x0);
  return y0 + (x - x0) * slope;
}
function getInsight2(insightName, insightSet) {
  return insightSet.model[insightName];
}
function getLCP2(insightSet) {
  const insight = getInsight2("LCPBreakdown", insightSet);
  if (!insight || !insight.lcpMs || !insight.lcpEvent) {
    return null;
  }
  const value = milliToMicro2(insight.lcpMs);
  return { value, event: insight.lcpEvent };
}
function getINP2(insightSet) {
  const insight = getInsight2("INPBreakdown", insightSet);
  if (!insight?.longestInteractionEvent?.dur) {
    return null;
  }
  const value = insight.longestInteractionEvent.dur;
  return { value, event: insight.longestInteractionEvent };
}
function getCLS2(insightSet) {
  const insight = getInsight2("CLSCulprits", insightSet);
  if (!insight) {
    return { value: 0, worstClusterEvent: null };
  }
  let maxScore = 0;
  let worstCluster;
  for (const cluster of insight.clusters) {
    if (cluster.clusterCumulativeScore > maxScore) {
      maxScore = cluster.clusterCumulativeScore;
      worstCluster = cluster;
    }
  }
  return { value: maxScore, worstClusterEvent: worstCluster ?? null };
}
function evaluateLCPMetricScore2(value) {
  return getLogNormalScore3({ p10: 2500, median: 4e3 }, value);
}
function evaluateINPMetricScore2(value) {
  return getLogNormalScore3({ p10: 200, median: 500 }, value);
}
function evaluateCLSMetricScore2(value) {
  return getLogNormalScore3({ p10: 0.1, median: 0.25 }, value);
}
function getPageResult2(cruxFieldData, url, origin, scope2 = null) {
  return cruxFieldData.find((result) => {
    const key = scope2 ? result[`${scope2.pageScope}-${scope2.deviceScope}`]?.record.key : (result["url-ALL"] || result["origin-ALL"])?.record.key;
    return key?.url && key.url === url || key?.origin && key.origin === origin;
  });
}
function getMetricResult2(pageResult, name, scope2 = null) {
  const scopes = [];
  if (scope2) {
    scopes.push(scope2);
  } else {
    scopes.push({ pageScope: "url", deviceScope: "ALL" });
    scopes.push({ pageScope: "origin", deviceScope: "ALL" });
  }
  for (const scope3 of scopes) {
    const key = `${scope3.pageScope}-${scope3.deviceScope}`;
    let value = pageResult[key]?.record.metrics[name]?.percentiles?.p75;
    if (typeof value === "string") {
      value = Number(value);
    }
    if (typeof value === "number" && Number.isFinite(value)) {
      return { value, pageScope: scope3.pageScope };
    }
  }
  return null;
}
function getMetricTimingResult2(pageResult, name, scope2 = null) {
  const result = getMetricResult2(pageResult, name, scope2);
  if (result) {
    const valueMs = result.value;
    return { value: milliToMicro2(valueMs), pageScope: result.pageScope };
  }
  return null;
}
function getFieldMetricsForInsightSet2(insightSet, metadata2, scope2 = null) {
  const cruxFieldData = metadata2?.cruxFieldData;
  if (!cruxFieldData) {
    return null;
  }
  const pageResult = getPageResult2(cruxFieldData, insightSet.url.href, insightSet.url.origin, scope2);
  if (!pageResult) {
    return null;
  }
  return {
    fcp: getMetricTimingResult2(pageResult, "first_contentful_paint", scope2),
    lcp: getMetricTimingResult2(pageResult, "largest_contentful_paint", scope2),
    inp: getMetricTimingResult2(pageResult, "interaction_to_next_paint", scope2),
    cls: getMetricResult2(pageResult, "cumulative_layout_shift", scope2),
    lcpBreakdown: {
      ttfb: getMetricTimingResult2(pageResult, "largest_contentful_paint_image_time_to_first_byte", scope2),
      loadDelay: getMetricTimingResult2(pageResult, "largest_contentful_paint_image_resource_load_delay", scope2),
      loadDuration: getMetricTimingResult2(pageResult, "largest_contentful_paint_image_resource_load_duration", scope2),
      renderDelay: getMetricTimingResult2(pageResult, "largest_contentful_paint_image_element_render_delay", scope2)
    }
  };
}
function calculateMetricWeightsForSorting2(insightSet, metadata2) {
  const weights = {
    lcp: 1 / 3,
    inp: 1 / 3,
    cls: 1 / 3
  };
  const cruxFieldData = metadata2?.cruxFieldData;
  if (!cruxFieldData) {
    return weights;
  }
  const fieldMetrics = getFieldMetricsForInsightSet2(insightSet, metadata2);
  if (!fieldMetrics) {
    return weights;
  }
  const fieldLcp = fieldMetrics.lcp?.value ?? null;
  const fieldInp = fieldMetrics.inp?.value ?? null;
  const fieldCls = fieldMetrics.cls?.value ?? null;
  const fieldLcpScore = fieldLcp !== null ? evaluateLCPMetricScore2(microToMilli2(fieldLcp)) : 0;
  const fieldInpScore = fieldInp !== null ? evaluateINPMetricScore2(microToMilli2(fieldInp)) : 0;
  const fieldClsScore = fieldCls !== null ? evaluateCLSMetricScore2(fieldCls) : 0;
  const fieldLcpScoreInverted = 1 - fieldLcpScore;
  const fieldInpScoreInverted = 1 - fieldInpScore;
  const fieldClsScoreInverted = 1 - fieldClsScore;
  const invertedSum = fieldLcpScoreInverted + fieldInpScoreInverted + fieldClsScoreInverted;
  if (!invertedSum) {
    return weights;
  }
  weights.lcp = fieldLcpScoreInverted / invertedSum;
  weights.inp = fieldInpScoreInverted / invertedSum;
  weights.cls = fieldClsScoreInverted / invertedSum;
  return weights;
}
function estimateSavingsWithGraphs$1(wastedBytesByRequestId, simulator, graph3) {
  const simulationBeforeChanges = simulator.simulate(graph3);
  const originalTransferSizes = /* @__PURE__ */ new Map();
  graph3.traverse((node2) => {
    if (node2.type !== "network") {
      return;
    }
    const wastedBytes = wastedBytesByRequestId.get(node2.request.requestId);
    if (!wastedBytes) {
      return;
    }
    const original = node2.request.transferSize;
    originalTransferSizes.set(node2.request.requestId, original);
    node2.request.transferSize = Math.max(original - wastedBytes, 0);
  });
  const simulationAfterChanges = simulator.simulate(graph3);
  graph3.traverse((node2) => {
    if (node2.type !== "network") {
      return;
    }
    const originalTransferSize = originalTransferSizes.get(node2.request.requestId);
    if (originalTransferSize === void 0) {
      return;
    }
    node2.request.transferSize = originalTransferSize;
  });
  let savings = simulationBeforeChanges.timeInMs - simulationAfterChanges.timeInMs;
  savings = Math.round(savings / GRAPH_SAVINGS_PRECISION2) * GRAPH_SAVINGS_PRECISION2;
  return Milli2(savings);
}
function metricSavingsForWastedBytes2(wastedBytesByRequestId, context2) {
  if (!context2.navigation || !context2.lantern) {
    return;
  }
  if (!wastedBytesByRequestId.size) {
    return { FCP: Milli2(0), LCP: Milli2(0) };
  }
  const simulator = context2.lantern.simulator;
  const fcpGraph = context2.lantern.metrics.firstContentfulPaint.optimisticGraph;
  const lcpGraph = context2.lantern.metrics.largestContentfulPaint.optimisticGraph;
  return {
    FCP: estimateSavingsWithGraphs$1(wastedBytesByRequestId, simulator, fcpGraph),
    LCP: estimateSavingsWithGraphs$1(wastedBytesByRequestId, simulator, lcpGraph)
  };
}
function isRequestCompressed2(request3) {
  if (!request3.args.data.responseHeaders) {
    return false;
  }
  const patterns = [
    /^content-encoding$/i,
    /^x-content-encoding-over-network$/i,
    /^x-original-content-encoding$/i
  ];
  const compressionTypes = ["gzip", "br", "deflate", "zstd"];
  return request3.args.data.responseHeaders.some((header) => patterns.some((p) => header.name.match(p)) && compressionTypes.includes(header.value));
}
function isRequestServedFromBrowserCache2(request3) {
  if (!request3.args.data.responseHeaders || request3.args.data.failed) {
    return false;
  }
  if (request3.args.data.statusCode === 304) {
    return true;
  }
  const { transferSize, resourceSize } = getRequestSizes2(request3);
  const ratio = resourceSize ? transferSize / resourceSize : 0;
  if (ratio < 0.01) {
    return true;
  }
  return false;
}
function getRequestSizes2(request3) {
  const resourceSize = request3.args.data.decodedBodyLength;
  const transferSize = request3.args.data.encodedDataLength;
  return { resourceSize, transferSize };
}
function estimateCompressedContentSize2(request3, totalBytes, resourceType) {
  if (!request3 || isRequestServedFromBrowserCache2(request3)) {
    switch (resourceType) {
      case "Stylesheet":
        return Math.round(totalBytes * 0.2);
      case "Script":
      case "Document":
        return Math.round(totalBytes * 0.33);
      default:
        return Math.round(totalBytes * 0.5);
    }
  }
  const { transferSize, resourceSize } = getRequestSizes2(request3);
  let contentTransferSize = transferSize;
  if (!isRequestCompressed2(request3)) {
    contentTransferSize = resourceSize;
  }
  if (request3.args.data.resourceType === resourceType) {
    return contentTransferSize;
  }
  const compressionRatio = Number.isFinite(resourceSize) && resourceSize > 0 ? contentTransferSize / resourceSize : 1;
  return Math.round(totalBytes * compressionRatio);
}
function estimateCompressionRatioForScript2(script) {
  if (!script.request) {
    return 1;
  }
  const request3 = script.request;
  const contentLength = request3.args.data.decodedBodyLength ?? script.content?.length ?? 0;
  const compressedSize = estimateCompressedContentSize2(request3, contentLength, "Script");
  if (contentLength === 0 || compressedSize === 0) {
    return 1;
  }
  const compressionRatio = compressedSize / contentLength;
  return compressionRatio;
}
function calculateDocFirstByteTs2(docRequest) {
  if (docRequest.args.data.protocol === "file") {
    return docRequest.ts;
  }
  const timing = docRequest.args.data.timing;
  if (!timing) {
    return null;
  }
  return Micro2(secondsToMicro2(timing.requestTime) + milliToMicro2(timing.receiveHeadersStart ?? timing.receiveHeadersEnd));
}
function insightBounds2(insight, insightSetBounds) {
  const overlays = insight.createOverlays?.() ?? [];
  const windows2 = overlays.map(traceWindowFromOverlay2).filter((bounds) => !!bounds);
  const overlaysBounds = combineTraceWindowsMicro2(windows2);
  if (overlaysBounds) {
    return overlaysBounds;
  }
  return insightSetBounds;
}
function finalize$h(partialModel) {
  return {
    insightKey: "Cache",
    strings: UIStrings$K,
    title: i18nString$v(UIStrings$K.title),
    description: i18nString$v(UIStrings$K.description),
    docs: "https://developer.chrome.com/docs/performance/insights/cache",
    category: InsightCategory2.ALL,
    state: partialModel.requests.length > 0 ? "fail" : "pass",
    ...partialModel
  };
}
function isCacheable2(request3) {
  if (NON_NETWORK_SCHEMES$1.includes(request3.args.data.protocol)) {
    return false;
  }
  return Boolean(CACHEABLE_STATUS_CODES2.has(request3.args.data.statusCode) && STATIC_RESOURCE_TYPES2.has(request3.args.data.resourceType || "Other"));
}
function computeCacheLifetimeInSeconds2(headers, cacheControl) {
  if (cacheControl?.["max-age"] !== void 0) {
    return cacheControl["max-age"];
  }
  const expiresHeaders = headers.find((h) => h.name === "expires")?.value ?? null;
  if (expiresHeaders) {
    const expires = new Date(expiresHeaders).getTime();
    if (!expires) {
      return 0;
    }
    return Math.ceil((expires - Date.now()) / 1e3);
  }
  return null;
}
function getCacheHitProbability2(maxAgeInSeconds) {
  const RESOURCE_AGE_IN_HOURS_DECILES = [0, 0.2, 1, 3, 8, 12, 24, 48, 72, 168, 8760, Infinity];
  const maxAgeInHours = maxAgeInSeconds / 3600;
  const upperDecileIndex = RESOURCE_AGE_IN_HOURS_DECILES.findIndex((decile) => decile >= maxAgeInHours);
  if (upperDecileIndex === RESOURCE_AGE_IN_HOURS_DECILES.length - 1) {
    return 1;
  }
  if (upperDecileIndex === 0) {
    return 0;
  }
  const upperDecileValue = RESOURCE_AGE_IN_HOURS_DECILES[upperDecileIndex];
  const lowerDecileValue = RESOURCE_AGE_IN_HOURS_DECILES[upperDecileIndex - 1];
  const upperDecile = upperDecileIndex / 10;
  const lowerDecile = (upperDecileIndex - 1) / 10;
  return linearInterpolation2(lowerDecileValue, lowerDecile, upperDecileValue, upperDecile, maxAgeInHours);
}
function getCombinedHeaders2(responseHeaders) {
  const headers = /* @__PURE__ */ new Map();
  for (const header of responseHeaders) {
    const name = header.name.toLowerCase();
    if (headers.get(name)) {
      headers.set(name, `${headers.get(name)}, ${header.value}`);
    } else {
      headers.set(name, header.value);
    }
  }
  return headers;
}
function cachingDisabled2(headers, parsedCacheControl) {
  const cacheControl = headers?.get("cache-control") ?? null;
  const pragma = headers?.get("pragma") ?? null;
  if (!cacheControl && pragma?.includes("no-cache")) {
    return true;
  }
  if (parsedCacheControl && (parsedCacheControl["must-revalidate"] || parsedCacheControl["no-cache"] || parsedCacheControl["no-store"] || parsedCacheControl["private"])) {
    return true;
  }
  return false;
}
function isCacheInsight2(model3) {
  return model3.insightKey === "Cache";
}
function generateInsight$h(data32, context2) {
  const isWithinContext = (event) => eventIsInBounds2(event, context2.bounds);
  const contextRequests = data32.NetworkRequests.byTime.filter(isWithinContext);
  const results = [];
  let totalWastedBytes = 0;
  const wastedBytesByRequestId = /* @__PURE__ */ new Map();
  for (const req of contextRequests) {
    if (!req.args.data.responseHeaders || !isCacheable2(req)) {
      continue;
    }
    const headers = getCombinedHeaders2(req.args.data.responseHeaders);
    const cacheControl = headers.get("cache-control") ?? null;
    const parsedDirectives = parseCacheControl2(cacheControl);
    if (cachingDisabled2(headers, parsedDirectives)) {
      continue;
    }
    let ttl = computeCacheLifetimeInSeconds2(req.args.data.responseHeaders, parsedDirectives);
    if (ttl !== null && (!Number.isFinite(ttl) || ttl <= 0)) {
      continue;
    }
    ttl = ttl || 0;
    const ttlDays = ttl / 86400;
    if (ttlDays >= 30) {
      continue;
    }
    const cacheHitProbability = getCacheHitProbability2(ttl);
    if (cacheHitProbability > IGNORE_THRESHOLD_IN_PERCENT2) {
      continue;
    }
    const transferSize = req.args.data.encodedDataLength || 0;
    const wastedBytes = (1 - cacheHitProbability) * transferSize;
    wastedBytesByRequestId.set(req.args.data.requestId, wastedBytes);
    totalWastedBytes += wastedBytes;
    results.push({ request: req, ttl, wastedBytes });
  }
  results.sort((a, b) => {
    return b.request.args.data.decodedBodyLength - a.request.args.data.decodedBodyLength || a.ttl - b.ttl;
  });
  return finalize$h({
    relatedEvents: results.map((r) => r.request),
    requests: results,
    metricSavings: metricSavingsForWastedBytes2(wastedBytesByRequestId, context2),
    wastedBytes: totalWastedBytes
  });
}
function createOverlayForRequest$3(request3) {
  return {
    type: "ENTRY_OUTLINE",
    entry: request3,
    outlineReason: "ERROR"
  };
}
function createOverlays$h(model3) {
  return model3.requests.map((req) => createOverlayForRequest$3(req.request));
}
function isInRootCauseWindow2(event, targetEvent) {
  const eventEnd = event.dur ? event.ts + event.dur : event.ts;
  return eventEnd < targetEvent.ts && eventEnd >= targetEvent.ts - ROOT_CAUSE_WINDOW2;
}
function getNonCompositedFailure2(animationEvent) {
  const failures = [];
  const beginEvent = animationEvent.args.data.beginEvent;
  const instantEvents = animationEvent.args.data.instantEvents || [];
  for (const event of instantEvents) {
    const failureMask = event.args.data.compositeFailed;
    const unsupportedProperties = event.args.data.unsupportedProperties;
    if (!failureMask) {
      continue;
    }
    const failureReasons = ACTIONABLE_FAILURE_REASONS2.filter((reason) => failureMask & reason.flag).map((reason) => reason.failure);
    const failure = {
      name: beginEvent.args.data.displayName,
      failureReasons,
      unsupportedProperties,
      animation: animationEvent
    };
    failures.push(failure);
  }
  return failures;
}
function getNonCompositedFailureRootCauses2(animationEvents, prePaintEvents3, shiftsByPrePaint, rootCausesByShift) {
  const allAnimationFailures = [];
  for (const animation of animationEvents) {
    const failures = getNonCompositedFailure2(animation);
    if (!failures) {
      continue;
    }
    allAnimationFailures.push(...failures);
    const nextPrePaint = getNextEvent2(prePaintEvents3, animation);
    if (!nextPrePaint) {
      continue;
    }
    if (!isInRootCauseWindow2(animation, nextPrePaint)) {
      continue;
    }
    const shifts = shiftsByPrePaint.get(nextPrePaint);
    if (!shifts) {
      continue;
    }
    for (const shift of shifts) {
      const rootCausesForShift = rootCausesByShift.get(shift);
      if (!rootCausesForShift) {
        throw new Error("Unaccounted shift");
      }
      rootCausesForShift.nonCompositedAnimations.push(...failures);
    }
  }
  return allAnimationFailures;
}
function getShiftsByPrePaintEvents2(layoutShifts, prePaintEvents3) {
  const shiftsByPrePaint = /* @__PURE__ */ new Map();
  for (const prePaintEvent of prePaintEvents3) {
    const firstShiftIndex = nearestIndexFromBeginning2(layoutShifts, (shift) => shift.ts >= prePaintEvent.ts);
    if (firstShiftIndex === null) {
      continue;
    }
    for (let i = firstShiftIndex; i < layoutShifts.length; i++) {
      const shift = layoutShifts[i];
      if (shift.ts >= prePaintEvent.ts && shift.ts <= prePaintEvent.ts + prePaintEvent.dur) {
        const shiftsInPrePaint = getWithDefault2(shiftsByPrePaint, prePaintEvent, () => []);
        shiftsInPrePaint.push(shift);
      }
      if (shift.ts > prePaintEvent.ts + prePaintEvent.dur) {
        break;
      }
    }
  }
  return shiftsByPrePaint;
}
function getNextEvent2(sourceEvents, targetEvent) {
  const index2 = nearestIndexFromBeginning2(sourceEvents, (source2) => source2.ts > targetEvent.ts + (targetEvent.dur || 0));
  if (index2 === null) {
    return void 0;
  }
  return sourceEvents[index2];
}
function getIframeRootCauses2(data32, iframeCreatedEvents, prePaintEvents3, shiftsByPrePaint, rootCausesByShift, domLoadingEvents3) {
  for (const iframeEvent of iframeCreatedEvents) {
    const nextPrePaint = getNextEvent2(prePaintEvents3, iframeEvent);
    if (!nextPrePaint) {
      continue;
    }
    const shifts = shiftsByPrePaint.get(nextPrePaint);
    if (!shifts) {
      continue;
    }
    for (const shift of shifts) {
      const rootCausesForShift = rootCausesByShift.get(shift);
      if (!rootCausesForShift) {
        throw new Error("Unaccounted shift");
      }
      const domEvent = domLoadingEvents3.find((e) => {
        const maxIframe = Micro2(iframeEvent.ts + (iframeEvent.dur ?? 0));
        return e.ts >= iframeEvent.ts && e.ts <= maxIframe;
      });
      if (domEvent?.args.frame) {
        const frame = domEvent.args.frame;
        let url;
        const processes3 = data32.Meta.rendererProcessesByFrame.get(frame);
        if (processes3 && processes3.size > 0) {
          url = [...processes3.values()][0]?.[0].frame.url;
        }
        rootCausesForShift.iframes.push({ frame, url });
      }
    }
  }
  return rootCausesByShift;
}
function getUnsizedImageRootCauses2(unsizedImageEvents, paintImageEvents4, shiftsByPrePaint, rootCausesByShift) {
  shiftsByPrePaint.forEach((shifts, prePaint) => {
    const paintImage = getNextEvent2(paintImageEvents4, prePaint);
    if (!paintImage) {
      return;
    }
    const matchingNode = unsizedImageEvents.find((unsizedImage) => unsizedImage.args.data.nodeId === paintImage.args.data.nodeId);
    if (!matchingNode) {
      return;
    }
    for (const shift of shifts) {
      const rootCausesForShift = rootCausesByShift.get(shift);
      if (!rootCausesForShift) {
        throw new Error("Unaccounted shift");
      }
      rootCausesForShift.unsizedImages.push({
        backendNodeId: matchingNode.args.data.nodeId,
        paintImageEvent: paintImage
      });
    }
  });
  return rootCausesByShift;
}
function isCLSCulpritsInsight2(insight) {
  return insight.insightKey === "CLSCulprits";
}
function getFontRootCauses2(networkRequests, prePaintEvents3, shiftsByPrePaint, rootCausesByShift) {
  const fontRequests = networkRequests.filter((req) => req.args.data.resourceType === "Font" && req.args.data.mimeType.startsWith("font"));
  for (const req of fontRequests) {
    const nextPrePaint = getNextEvent2(prePaintEvents3, req);
    if (!nextPrePaint) {
      continue;
    }
    if (!isInRootCauseWindow2(req, nextPrePaint)) {
      continue;
    }
    const shifts = shiftsByPrePaint.get(nextPrePaint);
    if (!shifts) {
      continue;
    }
    for (const shift of shifts) {
      const rootCausesForShift = rootCausesByShift.get(shift);
      if (!rootCausesForShift) {
        throw new Error("Unaccounted shift");
      }
      rootCausesForShift.webFonts.push(req);
    }
  }
  return rootCausesByShift;
}
function getTopCulprits2(cluster, culpritsByShift) {
  const MAX_TOP_CULPRITS = 3;
  const causes = [];
  const shifts = cluster.events;
  for (const shift of shifts) {
    const culprits = culpritsByShift.get(shift);
    if (!culprits) {
      continue;
    }
    const fontReq = culprits.webFonts;
    const iframes = culprits.iframes;
    const animations3 = culprits.nonCompositedAnimations;
    const unsizedImages = culprits.unsizedImages;
    for (let i = 0; i < fontReq.length && causes.length < MAX_TOP_CULPRITS; i++) {
      causes.push({ type: 0, description: i18nString$u(UIStrings$J.webFont) });
    }
    for (let i = 0; i < iframes.length && causes.length < MAX_TOP_CULPRITS; i++) {
      causes.push({ type: 1, description: i18nString$u(UIStrings$J.injectedIframe) });
    }
    for (let i = 0; i < animations3.length && causes.length < MAX_TOP_CULPRITS; i++) {
      causes.push({ type: 2, description: i18nString$u(UIStrings$J.animation) });
    }
    for (let i = 0; i < unsizedImages.length && causes.length < MAX_TOP_CULPRITS; i++) {
      causes.push({
        type: 3,
        description: i18nString$u(UIStrings$J.unsizedImage),
        url: unsizedImages[i].paintImageEvent.args.data.url || "",
        backendNodeId: unsizedImages[i].backendNodeId,
        frame: unsizedImages[i].paintImageEvent.args.data.frame || ""
      });
    }
    if (causes.length >= MAX_TOP_CULPRITS) {
      break;
    }
  }
  return causes.slice(0, MAX_TOP_CULPRITS);
}
function finalize$g(partialModel) {
  let state = "pass";
  if (partialModel.worstCluster) {
    const classification = scoreClassificationForLayoutShift2(partialModel.worstCluster.clusterCumulativeScore);
    if (classification === "good") {
      state = "informative";
    } else {
      state = "fail";
    }
  }
  return {
    insightKey: "CLSCulprits",
    strings: UIStrings$J,
    title: i18nString$u(UIStrings$J.title),
    description: i18nString$u(UIStrings$J.description),
    docs: "https://developer.chrome.com/docs/performance/insights/cls-culprit",
    category: InsightCategory2.CLS,
    state,
    ...partialModel
  };
}
function generateInsight$g(data32, context2) {
  const isWithinContext = (event) => eventIsInBounds2(event, context2.bounds);
  const compositeAnimationEvents = data32.Animations.animations.filter(isWithinContext);
  const iframeEvents = data32.LayoutShifts.renderFrameImplCreateChildFrameEvents.filter(isWithinContext);
  const networkRequests = data32.NetworkRequests.byTime.filter(isWithinContext);
  const domLoadingEvents3 = data32.LayoutShifts.domLoadingEvents.filter(isWithinContext);
  const unsizedImageEvents = data32.LayoutShifts.layoutImageUnsizedEvents.filter(isWithinContext);
  const clusterKey = context2.navigation ? context2.navigationId : NO_NAVIGATION2;
  const clusters3 = data32.LayoutShifts.clustersByNavigationId.get(clusterKey) ?? [];
  const clustersByScore = clusters3.toSorted((a, b) => b.clusterCumulativeScore - a.clusterCumulativeScore);
  const worstCluster = clustersByScore.at(0);
  const layoutShifts = clusters3.flatMap((cluster) => cluster.events);
  const prePaintEvents3 = data32.LayoutShifts.prePaintEvents.filter(isWithinContext);
  const paintImageEvents4 = data32.LayoutShifts.paintImageEvents.filter(isWithinContext);
  const rootCausesByShift = /* @__PURE__ */ new Map();
  const shiftsByPrePaint = getShiftsByPrePaintEvents2(layoutShifts, prePaintEvents3);
  for (const shift of layoutShifts) {
    rootCausesByShift.set(shift, { iframes: [], webFonts: [], nonCompositedAnimations: [], unsizedImages: [] });
  }
  getIframeRootCauses2(data32, iframeEvents, prePaintEvents3, shiftsByPrePaint, rootCausesByShift, domLoadingEvents3);
  getFontRootCauses2(networkRequests, prePaintEvents3, shiftsByPrePaint, rootCausesByShift);
  getUnsizedImageRootCauses2(unsizedImageEvents, paintImageEvents4, shiftsByPrePaint, rootCausesByShift);
  const animationFailures = getNonCompositedFailureRootCauses2(compositeAnimationEvents, prePaintEvents3, shiftsByPrePaint, rootCausesByShift);
  const relatedEvents = [...layoutShifts];
  if (worstCluster) {
    relatedEvents.push(worstCluster);
  }
  const topCulpritsByCluster = /* @__PURE__ */ new Map();
  for (const cluster of clusters3) {
    topCulpritsByCluster.set(cluster, getTopCulprits2(cluster, rootCausesByShift));
  }
  return finalize$g({
    relatedEvents,
    animationFailures,
    shifts: rootCausesByShift,
    clusters: clusters3,
    worstCluster,
    topCulpritsByCluster
  });
}
function createOverlays$g(model3) {
  const clustersByScore = model3.clusters.toSorted((a, b) => b.clusterCumulativeScore - a.clusterCumulativeScore) ?? [];
  const worstCluster = clustersByScore[0];
  if (!worstCluster) {
    return [];
  }
  const range2 = Micro2(worstCluster.dur ?? 0);
  const max = Micro2(worstCluster.ts + range2);
  return [{
    type: "TIMESPAN_BREAKDOWN",
    sections: [
      {
        bounds: { min: worstCluster.ts, range: range2, max },
        label: i18nString$u(UIStrings$J.worstLayoutShiftCluster),
        showDuration: false
      }
    ],
    entry: worstCluster.events[0],
    renderLocation: "ABOVE_EVENT"
  }];
}
function isDocumentLatencyInsight2(x) {
  return x.insightKey === "DocumentLatency";
}
function getServerResponseTime2(request3) {
  const isLightrider = globalThis.isLightrider;
  if (isLightrider) {
    return request3.args.data.lrServerResponseTime ?? null;
  }
  const timing = request3.args.data.timing;
  if (!timing) {
    return null;
  }
  const ms2 = microToMilli2(request3.args.data.syntheticData.serverResponseTime);
  return Math.round(ms2);
}
function getCompressionSavings2(request3) {
  const isCompressed = isRequestCompressed2(request3);
  if (isCompressed) {
    return 0;
  }
  const originalSize = request3.args.data.decodedBodyLength;
  let estimatedSavings = 0;
  switch (request3.args.data.mimeType) {
    case "text/css":
      estimatedSavings = Math.round(originalSize * 0.8);
      break;
    case "text/html":
    case "text/javascript":
      estimatedSavings = Math.round(originalSize * 0.67);
      break;
    case "text/plain":
    case "text/xml":
    case "text/x-component":
    case "application/javascript":
    case "application/json":
    case "application/manifest+json":
    case "application/vnd.api+json":
    case "application/xml":
    case "application/xhtml+xml":
    case "application/rss+xml":
    case "application/atom+xml":
    case "application/vnd.ms-fontobject":
    case "application/x-font-ttf":
    case "application/x-font-opentype":
    case "application/x-font-truetype":
    case "image/svg+xml":
    case "image/x-icon":
    case "image/vnd.microsoft.icon":
    case "font/ttf":
    case "font/eot":
    case "font/otf":
    case "font/opentype":
      estimatedSavings = Math.round(originalSize * 0.5);
      break;
  }
  return estimatedSavings < IGNORE_THRESHOLD_IN_BYTES2 ? 0 : estimatedSavings;
}
function finalize$f(partialModel) {
  let hasFailure = false;
  if (partialModel.data) {
    hasFailure = !partialModel.data.checklist.usesCompression.value || !partialModel.data.checklist.serverResponseIsFast.value || !partialModel.data.checklist.noRedirects.value;
  }
  return {
    insightKey: "DocumentLatency",
    strings: UIStrings$I,
    title: i18nString$t(UIStrings$I.title),
    description: i18nString$t(UIStrings$I.description),
    docs: "https://developer.chrome.com/docs/performance/insights/document-latency",
    category: InsightCategory2.ALL,
    state: hasFailure ? "fail" : "pass",
    ...partialModel
  };
}
function generateInsight$f(data32, context2) {
  if (!context2.navigation) {
    return finalize$f({});
  }
  const millisToString$1 = context2.options.insightTimeFormatters?.milli ?? millisToString;
  const documentRequest = data32.NetworkRequests.byId.get(context2.navigationId);
  if (!documentRequest) {
    return finalize$f({ warnings: [InsightWarning2.NO_DOCUMENT_REQUEST] });
  }
  const serverResponseTime = getServerResponseTime2(documentRequest);
  if (serverResponseTime === null) {
    throw new Error("missing document request timing");
  }
  const serverResponseTooSlow = serverResponseTime > TOO_SLOW_THRESHOLD_MS2;
  let overallSavingsMs = 0;
  if (serverResponseTime > TOO_SLOW_THRESHOLD_MS2) {
    overallSavingsMs = Math.max(serverResponseTime - TARGET_MS2, 0);
  }
  const redirectDuration = Math.round(documentRequest.args.data.syntheticData.redirectionDuration / 1e3);
  overallSavingsMs += redirectDuration;
  const metricSavings = {
    FCP: overallSavingsMs,
    LCP: overallSavingsMs
  };
  const uncompressedResponseBytes = getCompressionSavings2(documentRequest);
  const noRedirects = redirectDuration === 0;
  const serverResponseIsFast = !serverResponseTooSlow;
  const usesCompression = uncompressedResponseBytes === 0;
  return finalize$f({
    relatedEvents: [documentRequest],
    data: {
      serverResponseTime,
      redirectDuration: Milli2(redirectDuration),
      uncompressedResponseBytes,
      documentRequest,
      checklist: {
        noRedirects: {
          label: noRedirects ? i18nString$t(UIStrings$I.passingRedirects) : i18nString$t(UIStrings$I.failedRedirects, {
            PH1: documentRequest.args.data.redirects.length,
            PH2: millisToString$1(redirectDuration)
          }),
          value: noRedirects
        },
        serverResponseIsFast: {
          label: serverResponseIsFast ? i18nString$t(UIStrings$I.passingServerResponseTime, { PH1: millisToString$1(serverResponseTime) }) : i18nString$t(UIStrings$I.failedServerResponseTime, { PH1: millisToString$1(serverResponseTime) }),
          value: serverResponseIsFast
        },
        usesCompression: {
          label: usesCompression ? i18nString$t(UIStrings$I.passingTextCompression) : i18nString$t(UIStrings$I.failedTextCompression),
          value: usesCompression
        }
      }
    },
    metricSavings,
    wastedBytes: uncompressedResponseBytes
  });
}
function createOverlays$f(model3) {
  if (!model3.data?.documentRequest) {
    return [];
  }
  const overlays = [];
  const event = model3.data.documentRequest;
  const redirectDurationMicro = milliToMicro2(model3.data.redirectDuration);
  const sections = [];
  if (model3.data.redirectDuration) {
    const bounds = traceWindowFromMicroSeconds2(event.ts, event.ts + redirectDurationMicro);
    sections.push({ bounds, label: i18nString$t(UIStrings$I.redirectsLabel), showDuration: true });
    overlays.push({ type: "CANDY_STRIPED_TIME_RANGE", bounds, entry: event });
  }
  if (!model3.data.checklist.serverResponseIsFast.value) {
    const serverResponseTimeMicro = milliToMicro2(model3.data.serverResponseTime);
    const sendEnd = event.args.data.timing?.sendEnd ?? Milli2(0);
    const sendEndMicro = milliToMicro2(sendEnd);
    const bounds = traceWindowFromMicroSeconds2(sendEndMicro, sendEndMicro + serverResponseTimeMicro);
    sections.push({ bounds, label: i18nString$t(UIStrings$I.serverResponseTimeLabel), showDuration: true });
  }
  if (model3.data.uncompressedResponseBytes) {
    const bounds = traceWindowFromMicroSeconds2(event.args.data.syntheticData.downloadStart, event.args.data.syntheticData.downloadStart + event.args.data.syntheticData.download);
    sections.push({ bounds, label: i18nString$t(UIStrings$I.uncompressedDownload), showDuration: true });
    overlays.push({ type: "CANDY_STRIPED_TIME_RANGE", bounds, entry: event });
  }
  if (sections.length) {
    overlays.push({
      type: "TIMESPAN_BREAKDOWN",
      sections,
      entry: model3.data.documentRequest,
      renderLocation: "BELOW_EVENT"
    });
  }
  overlays.push({
    type: "ENTRY_SELECTED",
    entry: model3.data.documentRequest
  });
  return overlays;
}
function finalize$e(partialModel) {
  const relatedEvents = [...partialModel.largeLayoutUpdates, ...partialModel.largeStyleRecalcs];
  return {
    insightKey: "DOMSize",
    strings: UIStrings$H,
    title: i18nString$s(UIStrings$H.title),
    description: i18nString$s(UIStrings$H.description),
    docs: "https://developer.chrome.com/docs/performance/insights/dom-size",
    category: InsightCategory2.INP,
    state: relatedEvents.length > 0 ? "informative" : "pass",
    ...partialModel,
    relatedEvents
  };
}
function isDomSizeInsight2(model3) {
  return model3.insightKey === "DOMSize";
}
function generateInsight$e(data32, context2) {
  const isWithinContext = (event) => eventIsInBounds2(event, context2.bounds);
  const mainTid = context2.navigation?.tid;
  const largeLayoutUpdates = [];
  const largeStyleRecalcs = [];
  const threads = threadsInRenderer2(data32.Renderer, data32.AuctionWorklets);
  for (const thread of threads) {
    if (thread.type !== "MAIN_THREAD") {
      continue;
    }
    if (mainTid === void 0) {
      if (!thread.processIsOnMainFrame) {
        continue;
      }
    } else if (thread.tid !== mainTid) {
      continue;
    }
    const rendererThread = data32.Renderer.processes.get(thread.pid)?.threads.get(thread.tid);
    if (!rendererThread) {
      continue;
    }
    const { entries, layoutEvents, recalcStyleEvents } = rendererThread;
    if (!entries.length) {
      continue;
    }
    const first2 = entries[0];
    const last2 = entries[entries.length - 1];
    const timeRange2 = traceWindowFromMicroSeconds2(first2.ts, Micro2(last2.ts + (last2.dur ?? 0)));
    if (!boundsIncludeTimeRange2({ timeRange: timeRange2, bounds: context2.bounds })) {
      continue;
    }
    for (const event of layoutEvents) {
      if (event.dur < DOM_SIZE_DURATION_THRESHOLD2 || !isWithinContext(event)) {
        continue;
      }
      const { dirtyObjects } = event.args.beginData;
      if (dirtyObjects > LAYOUT_OBJECTS_THRESHOLD2) {
        largeLayoutUpdates.push(event);
      }
    }
    for (const event of recalcStyleEvents) {
      if (event.dur < DOM_SIZE_DURATION_THRESHOLD2 || !isWithinContext(event)) {
        continue;
      }
      const { elementCount } = event.args;
      if (elementCount > STYLE_RECALC_ELEMENTS_THRESHOLD2) {
        largeStyleRecalcs.push(event);
      }
    }
  }
  const largeUpdates = [
    ...largeLayoutUpdates.map((event) => {
      const duration2 = event.dur / 1e3;
      const size = event.args.beginData.dirtyObjects;
      const label = i18nString$s(UIStrings$H.largeLayout, { PH1: size });
      return { label, duration: duration2, size, event };
    }),
    ...largeStyleRecalcs.map((event) => {
      const duration2 = event.dur / 1e3;
      const size = event.args.elementCount;
      const label = i18nString$s(UIStrings$H.largeStyleRecalc, { PH1: size });
      return { label, duration: duration2, size, event };
    })
  ].sort((a, b) => b.duration - a.duration).slice(0, 5);
  const domStatsEvents = data32.DOMStats.domStatsByFrameId.get(context2.frameId)?.filter(isWithinContext) ?? [];
  let maxDOMStats;
  for (const domStats of domStatsEvents) {
    const navigationPid = context2.navigation?.pid;
    if (navigationPid && domStats.pid !== navigationPid) {
      continue;
    }
    if (!maxDOMStats || domStats.args.data.totalElements > maxDOMStats.args.data.totalElements) {
      maxDOMStats = domStats;
    }
  }
  return finalize$e({
    largeLayoutUpdates,
    largeStyleRecalcs,
    largeUpdates,
    maxDOMStats
  });
}
function createOverlays$e(model3) {
  const entries = [...model3.largeStyleRecalcs, ...model3.largeLayoutUpdates];
  return entries.map((entry) => ({
    type: "ENTRY_OUTLINE",
    entry,
    outlineReason: "ERROR"
  }));
}
function finalize$d(partialModel) {
  const requests = partialModel.scriptsWithDuplication.map((script) => script.request).filter((e) => !!e);
  return {
    insightKey: "DuplicatedJavaScript",
    strings: UIStrings$G,
    title: i18nString$r(UIStrings$G.title),
    description: i18nString$r(UIStrings$G.description),
    docs: "https://developer.chrome.com/docs/performance/insights/duplicated-javascript",
    category: InsightCategory2.LCP,
    state: Boolean(partialModel.duplication.values().next().value) ? "fail" : "pass",
    relatedEvents: [...new Set(requests)],
    ...partialModel
  };
}
function isDuplicatedJavaScriptInsight2(model3) {
  return model3.insightKey === "DuplicatedJavaScript";
}
function generateInsight$d(data32, context2) {
  const scripts = data32.Scripts.scripts.filter((script) => {
    if (script.frame !== context2.frameId) {
      return false;
    }
    if (script.url?.startsWith("chrome-extension://")) {
      return false;
    }
    return timestampIsInBounds2(context2.bounds, script.ts);
  });
  const compressionRatios = /* @__PURE__ */ new Map();
  for (const script of scripts) {
    if (script.request) {
      compressionRatios.set(script.request.args.data.requestId, estimateCompressionRatioForScript2(script));
    }
  }
  const { duplication, duplicationGroupedByNodeModules } = computeScriptDuplication2({ scripts }, compressionRatios);
  const scriptsWithDuplication = [...duplication.values().flatMap((data33) => data33.duplicates.map((d) => d.script))];
  const wastedBytesByRequestId = /* @__PURE__ */ new Map();
  for (const { duplicates } of duplication.values()) {
    for (let i = 1; i < duplicates.length; i++) {
      const sourceData = duplicates[i];
      if (!sourceData.script.request) {
        continue;
      }
      const transferSize = sourceData.attributedSize;
      const requestId = sourceData.script.request.args.data.requestId;
      wastedBytesByRequestId.set(requestId, (wastedBytesByRequestId.get(requestId) || 0) + transferSize);
    }
  }
  return finalize$d({
    duplication,
    duplicationGroupedByNodeModules,
    scriptsWithDuplication: [...new Set(scriptsWithDuplication)],
    scripts,
    mainDocumentUrl: context2.navigation?.args.data?.url ?? data32.Meta.mainFrameURL,
    metricSavings: metricSavingsForWastedBytes2(wastedBytesByRequestId, context2),
    wastedBytes: wastedBytesByRequestId.values().reduce((acc, cur) => acc + cur, 0)
  });
}
function createOverlays$d(model3) {
  return model3.scriptsWithDuplication.map((script) => script.request).filter((e) => !!e).map((request3) => {
    return {
      type: "ENTRY_OUTLINE",
      entry: request3,
      outlineReason: "ERROR"
    };
  });
}
function finalize$c(partialModel) {
  return {
    insightKey: "FontDisplay",
    strings: UIStrings$F,
    title: i18nString$q(UIStrings$F.title),
    description: i18nString$q(UIStrings$F.description),
    docs: "https://developer.chrome.com/docs/performance/insights/font-display",
    category: InsightCategory2.INP,
    state: partialModel.fonts.find((font) => font.wastedTime > 0) ? "fail" : "pass",
    ...partialModel
  };
}
function isFontDisplayInsight2(model3) {
  return model3.insightKey === "FontDisplay";
}
function generateInsight$c(data32, context2) {
  const fonts = [];
  for (const remoteFont of data32.LayoutShifts.remoteFonts) {
    const event = remoteFont.beginRemoteFontLoadEvent;
    if (!eventIsInBounds2(event, context2.bounds)) {
      continue;
    }
    const requestId = `${event.pid}.${event.args.id}`;
    const request3 = data32.NetworkRequests.byId.get(requestId);
    if (!request3) {
      continue;
    }
    if (!/^(block|fallback|auto)$/.test(remoteFont.display)) {
      continue;
    }
    const wastedTimeMicro = Micro2(request3.args.data.syntheticData.finishTime - request3.args.data.syntheticData.sendStartTime);
    let wastedTime = floor2(microToMilli2(wastedTimeMicro), 1 / 5);
    if (wastedTime === 0) {
      continue;
    }
    wastedTime = Math.min(wastedTime, 3e3);
    fonts.push({
      name: remoteFont.name,
      request: request3,
      display: remoteFont.display,
      wastedTime
    });
  }
  fonts.sort((a, b) => b.wastedTime - a.wastedTime);
  const savings = Math.max(...fonts.map((f) => f.wastedTime));
  return finalize$c({
    relatedEvents: fonts.map((f) => f.request),
    fonts,
    metricSavings: { FCP: savings }
  });
}
function createOverlays$c(model3) {
  return model3.fonts.map((font) => ({
    type: "ENTRY_OUTLINE",
    entry: font.request,
    outlineReason: font.wastedTime ? "ERROR" : "INFO"
  }));
}
function getCallFrameId2(callFrame) {
  return callFrame.scriptId + ":" + callFrame.lineNumber + ":" + callFrame.columnNumber;
}
function getLargestTopLevelFunctionData2(forcedReflowEvents, traceParsedData) {
  const entryToNodeMap = traceParsedData.Renderer.entryToNode;
  const dataByTopLevelFunction = /* @__PURE__ */ new Map();
  if (forcedReflowEvents.length === 0) {
    return;
  }
  for (const event of forcedReflowEvents) {
    const traceNode = entryToNodeMap.get(event);
    if (!traceNode) {
      continue;
    }
    let node2 = traceNode.parent;
    let topLevelFunctionCall;
    let topLevelFunctionCallEvent;
    while (node2) {
      const eventData = node2.entry;
      if (isProfileCall2(eventData)) {
        topLevelFunctionCall = eventData.callFrame;
        topLevelFunctionCallEvent = eventData;
      } else {
        if (isFunctionCall2(eventData) && eventData.args.data && objectIsCallFrame2(eventData.args.data)) {
          topLevelFunctionCall = eventData.args.data;
          topLevelFunctionCallEvent = eventData;
        }
        break;
      }
      node2 = node2.parent;
    }
    if (!topLevelFunctionCall || !topLevelFunctionCallEvent) {
      continue;
    }
    const aggregatedDataId = getCallFrameId2(topLevelFunctionCall);
    const aggregatedData = getWithDefault2(dataByTopLevelFunction, aggregatedDataId, () => ({
      topLevelFunctionCall,
      totalReflowTime: 0,
      topLevelFunctionCallEvents: []
    }));
    aggregatedData.totalReflowTime += event.dur ?? 0;
    aggregatedData.topLevelFunctionCallEvents.push(topLevelFunctionCallEvent);
  }
  let topTimeConsumingData = void 0;
  dataByTopLevelFunction.forEach((data32) => {
    if (!topTimeConsumingData || data32.totalReflowTime > topTimeConsumingData.totalReflowTime) {
      topTimeConsumingData = data32;
    }
  });
  return topTimeConsumingData;
}
function finalize$b(partialModel) {
  return {
    insightKey: "ForcedReflow",
    strings: UIStrings$E,
    title: i18nString$p(UIStrings$E.title),
    description: i18nString$p(UIStrings$E.description),
    docs: "https://developer.chrome.com/docs/performance/insights/forced-reflow",
    category: InsightCategory2.ALL,
    state: partialModel.aggregatedBottomUpData.length !== 0 ? "fail" : "pass",
    ...partialModel
  };
}
function getBottomCallFrameForEvent2(event, traceParsedData) {
  const profileStackTrace = get2(event, traceParsedData);
  const eventTopCallFrame = getStackTraceTopCallFrameInEventPayload2(event);
  return profileStackTrace?.callFrames[0] ?? eventTopCallFrame ?? null;
}
function isForcedReflowInsight2(model3) {
  return model3.insightKey === "ForcedReflow";
}
function generateInsight$b(traceParsedData, context2) {
  const isWithinContext = (event) => {
    const frameId = frameIDForEvent2(event);
    if (frameId !== context2.frameId) {
      return false;
    }
    return eventIsInBounds2(event, context2.bounds);
  };
  const bottomUpDataMap = /* @__PURE__ */ new Map();
  const events = traceParsedData.Warnings.perWarning.get("FORCED_REFLOW")?.filter(isWithinContext) ?? [];
  for (const event of events) {
    const bottomCallFrame = getBottomCallFrameForEvent2(event, traceParsedData);
    const bottomCallId = bottomCallFrame ? getCallFrameId2(bottomCallFrame) : "UNATTRIBUTED";
    const bottomUpData = getWithDefault2(bottomUpDataMap, bottomCallId, () => ({
      bottomUpData: bottomCallFrame,
      totalTime: 0,
      relatedEvents: []
    }));
    bottomUpData.totalTime += event.dur ?? 0;
    bottomUpData.relatedEvents.push(event);
  }
  const topLevelFunctionCallData = getLargestTopLevelFunctionData2(events, traceParsedData);
  return finalize$b({
    relatedEvents: events,
    topLevelFunctionCallData,
    aggregatedBottomUpData: [...bottomUpDataMap.values()]
  });
}
function createOverlays$b(model3) {
  if (!model3.topLevelFunctionCallData) {
    return [];
  }
  const allBottomUpEvents = [...model3.aggregatedBottomUpData.values().flatMap((data32) => data32.relatedEvents)];
  return [
    ...createOverlayForEvents2(model3.topLevelFunctionCallData.topLevelFunctionCallEvents, "INFO"),
    ...createOverlayForEvents2(allBottomUpEvents)
  ];
}
function createOverlayForEvents2(events, outlineReason = "ERROR") {
  return events.map((e) => ({
    type: "ENTRY_OUTLINE",
    entry: e,
    outlineReason
  }));
}
function isImageDeliveryInsight2(model3) {
  return model3.insightKey === "ImageDelivery";
}
function getOptimizationMessage2(optimization) {
  switch (optimization.type) {
    case ImageOptimizationType2.ADJUST_COMPRESSION:
      return i18nString$o(UIStrings$D.useCompression);
    case ImageOptimizationType2.MODERN_FORMAT_OR_COMPRESSION:
      return i18nString$o(UIStrings$D.useModernFormat);
    case ImageOptimizationType2.VIDEO_FORMAT:
      return i18nString$o(UIStrings$D.useVideoFormat);
    case ImageOptimizationType2.RESPONSIVE_SIZE:
      return i18nString$o(UIStrings$D.useResponsiveSize, {
        PH1: `${optimization.fileDimensions.width}x${optimization.fileDimensions.height}`,
        PH2: `${optimization.displayDimensions.width}x${optimization.displayDimensions.height}`
      });
  }
}
function getOptimizationMessageWithBytes2(optimization) {
  const byteSavingsText = bytesToString(optimization.byteSavings);
  const optimizationMessage = getOptimizationMessage2(optimization);
  return i18nString$o(UIStrings$D.estimatedSavings, { PH1: optimizationMessage, PH2: byteSavingsText });
}
function finalize$a(partialModel) {
  return {
    insightKey: "ImageDelivery",
    strings: UIStrings$D,
    title: i18nString$o(UIStrings$D.title),
    description: i18nString$o(UIStrings$D.description),
    docs: "https://developer.chrome.com/docs/performance/insights/image-delivery",
    category: InsightCategory2.LCP,
    state: partialModel.optimizableImages.length > 0 ? "fail" : "pass",
    ...partialModel,
    relatedEvents: new Map(partialModel.optimizableImages.map((image) => [image.request, image.optimizations.map(getOptimizationMessageWithBytes2)]))
  };
}
function estimateGIFPercentSavings2(request3) {
  return Math.round(29.1 * Math.log10(request3.args.data.decodedBodyLength) - 100.7) / 100;
}
function getDisplayedSize2(data32, paintImage) {
  return data32.ImagePainting.paintEventToCorrectedDisplaySize.get(paintImage) ?? {
    width: paintImage.args.data.width,
    height: paintImage.args.data.height
  };
}
function getPixelCounts2(data32, paintImage) {
  const { width, height } = getDisplayedSize2(data32, paintImage);
  return {
    filePixels: paintImage.args.data.srcWidth * paintImage.args.data.srcHeight,
    displayedPixels: width * height
  };
}
function generateInsight$a(data32, context2) {
  const isWithinContext = (event) => eventIsInBounds2(event, context2.bounds);
  const contextRequests = data32.NetworkRequests.byTime.filter(isWithinContext);
  const optimizableImages = [];
  for (const request3 of contextRequests) {
    if (request3.args.data.resourceType !== "Image") {
      continue;
    }
    if (request3.args.data.mimeType === "image/svg+xml") {
      continue;
    }
    const url = request3.args.data.redirects[0]?.url ?? request3.args.data.url;
    const imagePaints = data32.ImagePainting.paintImageEventForUrl.get(url)?.filter(isWithinContext);
    if (!imagePaints?.length) {
      continue;
    }
    const largestImagePaint = imagePaints.reduce((prev, curr) => {
      const prevPixels = getPixelCounts2(data32, prev).displayedPixels;
      const currPixels = getPixelCounts2(data32, curr).displayedPixels;
      return prevPixels > currPixels ? prev : curr;
    });
    const { filePixels: imageFilePixels, displayedPixels: largestImageDisplayPixels } = getPixelCounts2(data32, largestImagePaint);
    const imageBytes = Math.min(request3.args.data.decodedBodyLength, request3.args.data.encodedDataLength);
    const bytesPerPixel = imageBytes / imageFilePixels;
    let optimizations = [];
    if (request3.args.data.mimeType === "image/gif") {
      if (imageBytes > GIF_SIZE_THRESHOLD2) {
        const percentSavings = estimateGIFPercentSavings2(request3);
        const byteSavings = Math.round(imageBytes * percentSavings);
        optimizations.push({ type: ImageOptimizationType2.VIDEO_FORMAT, byteSavings });
      }
    } else if (bytesPerPixel > TARGET_BYTES_PER_PIXEL_AVIF2) {
      const idealAvifImageSize = Math.round(TARGET_BYTES_PER_PIXEL_AVIF2 * imageFilePixels);
      const byteSavings = imageBytes - idealAvifImageSize;
      if (request3.args.data.mimeType !== "image/webp" && request3.args.data.mimeType !== "image/avif") {
        optimizations.push({ type: ImageOptimizationType2.MODERN_FORMAT_OR_COMPRESSION, byteSavings });
      } else {
        optimizations.push({ type: ImageOptimizationType2.ADJUST_COMPRESSION, byteSavings });
      }
    }
    const imageByteSavingsFromFormat = Math.max(0, ...optimizations.map((o) => o.byteSavings));
    let imageByteSavings = imageByteSavingsFromFormat;
    const wastedPixelRatio = 1 - largestImageDisplayPixels / imageFilePixels;
    if (wastedPixelRatio > 0 && !largestImagePaint.args.data.isCSS) {
      const byteSavings = Math.round(wastedPixelRatio * imageBytes);
      const hadBreakpoints = largestImagePaint.args.data.isPicture || largestImagePaint.args.data.srcsetAttribute;
      if (!hadBreakpoints || byteSavings > BYTE_SAVINGS_THRESHOLD_RESPONSIVE_BREAKPOINTS2) {
        imageByteSavings += Math.round(wastedPixelRatio * (imageBytes - imageByteSavingsFromFormat));
        const { width, height } = getDisplayedSize2(data32, largestImagePaint);
        optimizations.push({
          type: ImageOptimizationType2.RESPONSIVE_SIZE,
          byteSavings,
          fileDimensions: {
            width: Math.round(largestImagePaint.args.data.srcWidth),
            height: Math.round(largestImagePaint.args.data.srcHeight)
          },
          displayDimensions: {
            width: Math.round(width),
            height: Math.round(height)
          }
        });
      }
    }
    optimizations = optimizations.filter((optimization) => optimization.byteSavings > BYTE_SAVINGS_THRESHOLD2);
    if (optimizations.length > 0) {
      optimizableImages.push({
        request: request3,
        largestImagePaint,
        optimizations,
        byteSavings: imageByteSavings
      });
    }
  }
  const wastedBytesByRequestId = /* @__PURE__ */ new Map();
  for (const image of optimizableImages) {
    wastedBytesByRequestId.set(image.request.args.data.requestId, image.byteSavings);
  }
  optimizableImages.sort((a, b) => {
    if (b.byteSavings !== a.byteSavings) {
      return b.byteSavings - a.byteSavings;
    }
    return b.request.args.data.decodedBodyLength - a.request.args.data.decodedBodyLength;
  });
  return finalize$a({
    optimizableImages,
    metricSavings: metricSavingsForWastedBytes2(wastedBytesByRequestId, context2),
    wastedBytes: optimizableImages.reduce((total, img) => total + img.byteSavings, 0)
  });
}
function createOverlayForRequest$2(request3) {
  return {
    type: "ENTRY_OUTLINE",
    entry: request3,
    outlineReason: "ERROR"
  };
}
function createOverlays$a(model3) {
  return model3.optimizableImages.map((image) => createOverlayForRequest$2(image.request));
}
function isINPBreakdownInsight2(insight) {
  return insight.insightKey === "INPBreakdown";
}
function finalize$9(partialModel) {
  let state = "pass";
  if (partialModel.longestInteractionEvent) {
    const classification = scoreClassificationForInteractionToNextPaint2(partialModel.longestInteractionEvent.dur);
    if (classification === "good") {
      state = "informative";
    } else {
      state = "fail";
    }
  }
  return {
    insightKey: "INPBreakdown",
    strings: UIStrings$C,
    title: i18nString$n(UIStrings$C.title),
    description: i18nString$n(UIStrings$C.description),
    docs: "https://developer.chrome.com/docs/performance/insights/inp-breakdown",
    category: InsightCategory2.INP,
    state,
    ...partialModel
  };
}
function generateInsight$9(data32, context2) {
  const interactionEvents3 = data32.UserInteractions.interactionEventsWithNoNesting.filter((event) => {
    return eventIsInBounds2(event, context2.bounds);
  });
  if (!interactionEvents3.length) {
    return finalize$9({});
  }
  const longestByInteractionId = /* @__PURE__ */ new Map();
  for (const event of interactionEvents3) {
    const key = event.interactionId;
    const longest = longestByInteractionId.get(key);
    if (!longest || event.dur > longest.dur) {
      longestByInteractionId.set(key, event);
    }
  }
  const normalizedInteractionEvents = [...longestByInteractionId.values()];
  normalizedInteractionEvents.sort((a, b) => b.dur - a.dur);
  const highPercentileIndex = Math.min(9, Math.floor(normalizedInteractionEvents.length / 50));
  return finalize$9({
    relatedEvents: [normalizedInteractionEvents[0]],
    longestInteractionEvent: normalizedInteractionEvents[0],
    highPercentileInteractionEvent: normalizedInteractionEvents[highPercentileIndex]
  });
}
function createOverlaysForSubpart2(event, subpartIndex = -1) {
  const p1 = traceWindowFromMicroSeconds2(event.ts, event.ts + event.inputDelay);
  const p2 = traceWindowFromMicroSeconds2(p1.max, p1.max + event.mainThreadHandling);
  const p3 = traceWindowFromMicroSeconds2(p2.max, p2.max + event.presentationDelay);
  let sections = [
    { bounds: p1, label: i18nString$n(UIStrings$C.inputDelay), showDuration: true },
    { bounds: p2, label: i18nString$n(UIStrings$C.processingDuration), showDuration: true },
    { bounds: p3, label: i18nString$n(UIStrings$C.presentationDelay), showDuration: true }
  ];
  if (subpartIndex !== -1) {
    sections = [sections[subpartIndex]];
  }
  return [
    {
      type: "TIMESPAN_BREAKDOWN",
      sections,
      renderLocation: "BELOW_EVENT",
      entry: event
    }
  ];
}
function createOverlays$9(model3) {
  const event = model3.longestInteractionEvent;
  if (!event) {
    return [];
  }
  return createOverlaysForSubpart2(event);
}
function isLCPBreakdownInsight2(model3) {
  return model3.insightKey === "LCPBreakdown";
}
function anyValuesNaN2(...values) {
  return values.some((v) => Number.isNaN(v));
}
function determineSubparts2(nav, docRequest, lcpEvent, lcpRequest) {
  const firstDocByteTs = calculateDocFirstByteTs2(docRequest);
  if (firstDocByteTs === null) {
    return null;
  }
  const ttfb = traceWindowFromMicroSeconds2(nav.ts, firstDocByteTs);
  ttfb.label = i18nString$m(UIStrings$B.timeToFirstByte);
  let renderDelay = traceWindowFromMicroSeconds2(ttfb.max, lcpEvent.ts);
  renderDelay.label = i18nString$m(UIStrings$B.elementRenderDelay);
  if (!lcpRequest) {
    if (anyValuesNaN2(ttfb.range, renderDelay.range)) {
      return null;
    }
    return { ttfb, renderDelay };
  }
  const lcpStartTs = lcpRequest.ts;
  const lcpReqEndTs = lcpRequest.args.data.syntheticData.finishTime;
  const loadDelay = traceWindowFromMicroSeconds2(ttfb.max, lcpStartTs);
  const loadDuration = traceWindowFromMicroSeconds2(lcpStartTs, lcpReqEndTs);
  renderDelay = traceWindowFromMicroSeconds2(lcpReqEndTs, lcpEvent.ts);
  loadDelay.label = i18nString$m(UIStrings$B.resourceLoadDelay);
  loadDuration.label = i18nString$m(UIStrings$B.resourceLoadDuration);
  renderDelay.label = i18nString$m(UIStrings$B.elementRenderDelay);
  if (anyValuesNaN2(ttfb.range, loadDelay.range, loadDuration.range, renderDelay.range)) {
    return null;
  }
  return {
    ttfb,
    loadDelay,
    loadDuration,
    renderDelay
  };
}
function finalize$8(partialModel) {
  const relatedEvents = [];
  if (partialModel.lcpEvent) {
    relatedEvents.push(partialModel.lcpEvent);
  }
  if (partialModel.lcpRequest) {
    relatedEvents.push(partialModel.lcpRequest);
  }
  let state = "pass";
  if (partialModel.lcpMs !== void 0) {
    const classification = scoreClassificationForLargestContentfulPaint2(milliToMicro2(partialModel.lcpMs));
    if (classification === "good") {
      state = "informative";
    } else {
      state = "fail";
    }
  }
  return {
    insightKey: "LCPBreakdown",
    strings: UIStrings$B,
    title: i18nString$m(UIStrings$B.title),
    description: i18nString$m(UIStrings$B.description),
    docs: "https://developer.chrome.com/docs/performance/insights/lcp-breakdown",
    category: InsightCategory2.LCP,
    state,
    ...partialModel,
    relatedEvents
  };
}
function generateInsight$8(data32, context2) {
  if (!context2.navigation) {
    return finalize$8({});
  }
  const networkRequests = data32.NetworkRequests;
  const frameMetrics = data32.PageLoadMetrics.metricScoresByFrameId.get(context2.frameId);
  if (!frameMetrics) {
    throw new Error("no frame metrics");
  }
  const navMetrics = frameMetrics.get(context2.navigation);
  if (!navMetrics) {
    throw new Error("no navigation metrics");
  }
  const metricScore = navMetrics.get("LCP");
  const lcpEvent = metricScore?.event;
  if (!lcpEvent || !isAnyLargestContentfulPaintCandidate(lcpEvent)) {
    return finalize$8({ warnings: [InsightWarning2.NO_LCP] });
  }
  const lcpMs = microToMilli2(metricScore.timing);
  const lcpTs = metricScore.event?.ts ? microToMilli2(metricScore.event?.ts) : void 0;
  const lcpRequest = data32.LargestImagePaint.lcpRequestByNavigationId.get(context2.navigationId);
  const docRequest = networkRequests.byId.get(context2.navigationId);
  if (!docRequest) {
    return finalize$8({ lcpMs, lcpTs, lcpEvent, lcpRequest, warnings: [InsightWarning2.NO_DOCUMENT_REQUEST] });
  }
  return finalize$8({
    lcpMs,
    lcpTs,
    lcpEvent,
    lcpRequest,
    subparts: determineSubparts2(context2.navigation, docRequest, lcpEvent, lcpRequest) ?? void 0
  });
}
function createOverlays$8(model3) {
  if (!model3.subparts || !model3.lcpTs) {
    return [];
  }
  const overlays = [
    {
      type: "TIMESPAN_BREAKDOWN",
      sections: Object.values(model3.subparts).map((subpart) => ({ bounds: subpart, label: subpart.label, showDuration: true }))
    }
  ];
  if (model3.lcpRequest) {
    overlays.push({ type: "ENTRY_OUTLINE", entry: model3.lcpRequest, outlineReason: "INFO" });
  }
  return overlays;
}
function isLCPDiscoveryInsight2(model3) {
  return model3.insightKey === "LCPDiscovery";
}
function finalize$7(partialModel) {
  const relatedEvents = partialModel.lcpEvent && partialModel.lcpRequest ? [partialModel.lcpEvent, partialModel.lcpRequest] : [];
  return {
    insightKey: "LCPDiscovery",
    strings: UIStrings$A,
    title: i18nString$l(UIStrings$A.title),
    description: i18nString$l(UIStrings$A.description),
    docs: "https://developer.chrome.com/docs/performance/insights/lcp-discovery",
    category: InsightCategory2.LCP,
    state: partialModel.lcpRequest && partialModel.checklist && (!partialModel.checklist.eagerlyLoaded.value || !partialModel.checklist.requestDiscoverable.value || !partialModel.checklist.priorityHinted.value) ? "fail" : "pass",
    ...partialModel,
    relatedEvents
  };
}
function generateInsight$7(data32, context2) {
  if (!context2.navigation) {
    return finalize$7({});
  }
  const networkRequests = data32.NetworkRequests;
  const frameMetrics = data32.PageLoadMetrics.metricScoresByFrameId.get(context2.frameId);
  if (!frameMetrics) {
    throw new Error("no frame metrics");
  }
  const navMetrics = frameMetrics.get(context2.navigation);
  if (!navMetrics) {
    throw new Error("no navigation metrics");
  }
  const metricScore = navMetrics.get("LCP");
  const lcpEvent = metricScore?.event;
  if (!lcpEvent || !isAnyLargestContentfulPaintCandidate(lcpEvent)) {
    return finalize$7({ warnings: [InsightWarning2.NO_LCP] });
  }
  const docRequest = networkRequests.byId.get(context2.navigationId);
  if (!docRequest) {
    return finalize$7({ warnings: [InsightWarning2.NO_DOCUMENT_REQUEST] });
  }
  const lcpRequest = data32.LargestImagePaint.lcpRequestByNavigationId.get(context2.navigationId);
  if (!lcpRequest) {
    return finalize$7({ lcpEvent });
  }
  const initiatorUrl = lcpRequest.args.data.initiator?.url;
  const initiatedByMainDoc = lcpRequest?.args.data.initiator?.type === "parser" && docRequest.args.data.url === initiatorUrl;
  const imgPreloadedOrFoundInHTML = lcpRequest?.args.data.isLinkPreload || initiatedByMainDoc;
  const imageLoadingAttr = lcpEvent.args.data?.loadingAttr;
  const imageFetchPriorityHint = lcpRequest?.args.data.fetchPriorityHint;
  const earliestDiscoveryTime = calculateDocFirstByteTs2(docRequest);
  const priorityHintFound = imageFetchPriorityHint === "high";
  return finalize$7({
    lcpEvent,
    lcpRequest,
    earliestDiscoveryTimeTs: earliestDiscoveryTime ? Micro2(earliestDiscoveryTime) : void 0,
    checklist: {
      priorityHinted: {
        label: priorityHintFound ? i18nString$l(UIStrings$A.fetchPriorityApplied) : i18nString$l(UIStrings$A.fetchPriorityShouldBeApplied),
        value: priorityHintFound
      },
      requestDiscoverable: { label: i18nString$l(UIStrings$A.requestDiscoverable), value: imgPreloadedOrFoundInHTML },
      eagerlyLoaded: { label: i18nString$l(UIStrings$A.lazyLoadNotApplied), value: imageLoadingAttr !== "lazy" }
    }
  });
}
function getImageData2(model3) {
  if (!model3.lcpRequest || !model3.checklist) {
    return null;
  }
  const shouldIncreasePriorityHint = !model3.checklist.priorityHinted.value;
  const shouldPreloadImage = !model3.checklist.requestDiscoverable.value;
  const shouldRemoveLazyLoading = !model3.checklist.eagerlyLoaded.value;
  const imageLCP = shouldIncreasePriorityHint !== void 0 && shouldPreloadImage !== void 0 && shouldRemoveLazyLoading !== void 0;
  if (!imageLCP) {
    return null;
  }
  const data32 = {
    checklist: model3.checklist,
    request: model3.lcpRequest,
    discoveryDelay: null,
    estimatedSavings: model3.metricSavings?.LCP ?? null
  };
  if (model3.earliestDiscoveryTimeTs && model3.lcpRequest) {
    const discoveryDelay = model3.lcpRequest.ts - model3.earliestDiscoveryTimeTs;
    data32.discoveryDelay = Micro2(discoveryDelay);
  }
  return data32;
}
function createOverlays$7(model3) {
  const imageResults = getImageData2(model3);
  if (!imageResults?.discoveryDelay) {
    return [];
  }
  const delay = traceWindowFromMicroSeconds2(Micro2(imageResults.request.ts - imageResults.discoveryDelay), imageResults.request.ts);
  return [
    {
      type: "ENTRY_OUTLINE",
      entry: imageResults.request,
      outlineReason: "ERROR"
    },
    {
      type: "CANDY_STRIPED_TIME_RANGE",
      bounds: delay,
      entry: imageResults.request
    },
    {
      type: "TIMESPAN_BREAKDOWN",
      sections: [{
        bounds: delay,
        label: `${imageResults.discoveryDelay} microseconds`,
        showDuration: false
      }],
      entry: imageResults.request,
      renderLocation: "ABOVE_EVENT"
    }
  ];
}
function buildPolyfillExpression2(object2, property, coreJs3Module) {
  const qt = (token) => `['"]${token}['"]`;
  let expression = "";
  if (object2) {
    expression += `${object2}\\.${property}\\s?=[^=]`;
  } else {
    expression += `(?:window\\.|[\\s;]+)${property}\\s?=[^=]`;
  }
  if (object2) {
    expression += `|${object2}\\[${qt(property)}\\]\\s?=[^=]`;
  }
  expression += `|defineProperty\\(${object2 || "window"},\\s?${qt(property)}`;
  if (object2) {
    expression += `|\\(${object2},\\s*{${property}:.*},\\s*{${property}`;
  }
  if (object2) {
    const objectWithoutPrototype = object2.replace(".prototype", "");
    expression += `|{target:${qt(objectWithoutPrototype)}[^;]*},{${property}:`;
  }
  expression += `|${coreJs3Module.replaceAll(".", "\\.")}(?:\\.js)?"`;
  return expression;
}
function getCoreJsPolyfillData2() {
  return polyfillModuleData2.filter((d) => d.corejs).map((d) => {
    return {
      name: d.name,
      coreJs3Module: d.modules[0]
    };
  });
}
function getPolyfillPatterns2() {
  const patterns = [];
  for (const { name, coreJs3Module } of getCoreJsPolyfillData2()) {
    const parts = name.split(".");
    const object2 = parts.length > 1 ? parts.slice(0, parts.length - 1).join(".") : null;
    const property = parts[parts.length - 1];
    patterns.push({
      name,
      expression: buildPolyfillExpression2(object2, property, coreJs3Module)
    });
  }
  return patterns;
}
function getTransformPatterns2() {
  const count = (content, pattern2) => {
    if (typeof pattern2 === "string") {
      return content.split(pattern2).length - 1;
    }
    return (content.match(pattern2) ?? []).length;
  };
  return [
    {
      name: "@babel/plugin-transform-classes",
      expression: "Cannot call a class as a function",
      estimateBytes: (content) => {
        return 1e3 + (count(content, "_classCallCheck") - 1) * "_classCallCheck()".length;
      }
    },
    {
      name: "@babel/plugin-transform-regenerator",
      expression: "Generator is already running|regeneratorRuntime",
      estimateBytes: (content) => {
        return count(content, /regeneratorRuntime\(?\)?\.a?wrap/g) * 80;
      }
    },
    {
      name: "@babel/plugin-transform-spread",
      expression: "Invalid attempt to spread non-iterable instance",
      estimateBytes: (content) => {
        const per = "_toConsumableArray()".length;
        return 1169 + count(content, /\.apply\(void 0,\s?_toConsumableArray/g) * per;
      }
    }
  ];
}
function estimateWastedBytes2(content, matches) {
  const polyfillResults = matches.filter((m) => !m.name.startsWith("@"));
  const transformResults = matches.filter((m) => m.name.startsWith("@"));
  let estimatedWastedBytesFromPolyfills = 0;
  const modulesSeen = /* @__PURE__ */ new Set();
  for (const result of polyfillResults) {
    const modules = graph$1.dependencies[result.name];
    if (!modules)
      continue;
    for (const module2 of modules) {
      modulesSeen.add(module2);
    }
  }
  estimatedWastedBytesFromPolyfills += [...modulesSeen].reduce((acc, moduleIndex) => {
    return acc + graph$1.moduleSizes[moduleIndex];
  }, 0);
  estimatedWastedBytesFromPolyfills = Math.min(estimatedWastedBytesFromPolyfills, graph$1.maxSize);
  let estimatedWastedBytesFromTransforms = 0;
  for (const result of transformResults) {
    const pattern2 = getTransformPatterns2().find((p) => p.name === result.name);
    if (!pattern2 || !pattern2.estimateBytes || !content)
      continue;
    estimatedWastedBytesFromTransforms += pattern2.estimateBytes(content);
  }
  const estimatedWastedBytes = estimatedWastedBytesFromPolyfills + estimatedWastedBytesFromTransforms;
  return estimatedWastedBytes;
}
function detectLegacyJavaScript$1(content, map2) {
  if (!content)
    return { matches: [], estimatedByteSavings: 0 };
  let matches = matcher2.match(content);
  if (map2) {
    for (const { name, modules } of polyfillModuleData2) {
      if (matches.some((m) => m.name === name))
        continue;
      const source2 = map2.sourceURLs().find((source22) => modules.some((module2) => {
        return source22.endsWith(`/${module2}.js`) || source22.includes(`node_modules/${module2}/`);
      }));
      if (!source2)
        continue;
      const mapping = map2.mappings().find((m) => m.sourceURL === source2);
      if (mapping) {
        matches.push({ name, line: mapping.lineNumber, column: mapping.columnNumber });
      } else {
        matches.push({ name, line: 0, column: 0 });
      }
    }
  }
  matches = matches.sort((a, b) => a.name > b.name ? 1 : a.name === b.name ? 0 : -1);
  return {
    matches,
    estimatedByteSavings: estimateWastedBytes2(content, matches)
  };
}
function finalize$6(partialModel) {
  const requests = [...partialModel.legacyJavaScriptResults.keys()].map((script) => script.request).filter((e) => !!e);
  return {
    insightKey: "LegacyJavaScript",
    strings: UIStrings$z,
    title: i18nString$k(UIStrings$z.title),
    description: i18nString$k(UIStrings$z.description),
    docs: "https://developer.chrome.com/docs/performance/insights/legacy-javascript",
    category: InsightCategory2.ALL,
    state: requests.length ? "fail" : "pass",
    relatedEvents: [...new Set(requests)],
    ...partialModel
  };
}
function isLegacyJavaScript2(model3) {
  return model3.insightKey === "LegacyJavaScript";
}
function generateInsight$6(data32, context2) {
  const scripts = data32.Scripts.scripts.filter((script) => {
    if (script.frame !== context2.frameId) {
      return false;
    }
    if (script.url?.startsWith("chrome-extension://")) {
      return false;
    }
    return timestampIsInBounds2(context2.bounds, script.ts) || script.request && eventIsInBounds2(script.request, context2.bounds);
  });
  const legacyJavaScriptResults = /* @__PURE__ */ new Map();
  const wastedBytesByRequestId = /* @__PURE__ */ new Map();
  for (const script of scripts) {
    if (!script.content || script.content.length < BYTE_THRESHOLD2) {
      continue;
    }
    const result = detectLegacyJavaScript3(script.content, script.sourceMap);
    if (result.estimatedByteSavings < BYTE_THRESHOLD2) {
      continue;
    }
    const compressionRatio = estimateCompressionRatioForScript2(script);
    const transferSize = Math.round(result.estimatedByteSavings * compressionRatio);
    result.estimatedByteSavings = transferSize;
    legacyJavaScriptResults.set(script, result);
    if (script.request) {
      const requestId = script.request.args.data.requestId;
      wastedBytesByRequestId.set(requestId, transferSize);
    }
  }
  const sorted3 = new Map([...legacyJavaScriptResults].sort((a, b) => b[1].estimatedByteSavings - a[1].estimatedByteSavings));
  return finalize$6({
    legacyJavaScriptResults: sorted3,
    metricSavings: metricSavingsForWastedBytes2(wastedBytesByRequestId, context2),
    wastedBytes: wastedBytesByRequestId.values().reduce((acc, cur) => acc + cur, 0)
  });
}
function createOverlays$6(model3) {
  return [...model3.legacyJavaScriptResults.keys()].map((script) => script.request).filter((e) => !!e).map((request3) => {
    return {
      type: "ENTRY_OUTLINE",
      entry: request3,
      outlineReason: "ERROR"
    };
  });
}
function isModernHTTPInsight2(model3) {
  return model3.insightKey === "ModernHTTP";
}
function isMultiplexableStaticAsset2(request3, entityMappings4, firstPartyEntity) {
  if (!STATIC_RESOURCE_TYPES2.has(request3.args.data.resourceType)) {
    return false;
  }
  if (request3.args.data.decodedBodyLength < 100) {
    const entity = entityMappings4.entityByEvent.get(request3);
    if (entity) {
      if (firstPartyEntity?.name === entity.name) {
        return true;
      }
      if (!entity.isUnrecognized) {
        return false;
      }
    }
  }
  return true;
}
function determineHttp1Requests2(requests, entityMappings4, firstPartyEntity) {
  const http1Requests = [];
  const groupedByOrigin = /* @__PURE__ */ new Map();
  for (const record2 of requests) {
    const url = new URL(record2.args.data.url);
    if (!isMultiplexableStaticAsset2(record2, entityMappings4, firstPartyEntity)) {
      continue;
    }
    if (isSyntheticNetworkRequestLocalhost2(record2)) {
      continue;
    }
    const originRequests = getWithDefault2(groupedByOrigin, url.origin, () => []);
    originRequests.push(record2);
  }
  const seenURLs = /* @__PURE__ */ new Set();
  for (const request3 of requests) {
    if (seenURLs.has(request3.args.data.url)) {
      continue;
    }
    if (request3.args.data.fromServiceWorker) {
      continue;
    }
    const isOldHttp = /HTTP\/[01][.\d]?/i.test(request3.args.data.protocol);
    if (!isOldHttp) {
      continue;
    }
    const url = new URL(request3.args.data.url);
    const group = groupedByOrigin.get(url.origin) || [];
    if (group.length < 6) {
      continue;
    }
    seenURLs.add(request3.args.data.url);
    http1Requests.push(request3);
  }
  return http1Requests;
}
function computeWasteWithGraph2(urlsToChange, graph3, simulator) {
  const simulationBefore = simulator.simulate(graph3);
  const originalProtocols = /* @__PURE__ */ new Map();
  graph3.traverse((node2) => {
    if (node2.type !== "network") {
      return;
    }
    if (!urlsToChange.has(node2.request.url)) {
      return;
    }
    originalProtocols.set(node2.request.requestId, node2.request.protocol);
    node2.request.protocol = "h2";
  });
  const simulationAfter = simulator.simulate(graph3);
  graph3.traverse((node2) => {
    if (node2.type !== "network") {
      return;
    }
    const originalProtocol = originalProtocols.get(node2.request.requestId);
    if (originalProtocol === void 0) {
      return;
    }
    node2.request.protocol = originalProtocol;
  });
  const savings = simulationBefore.timeInMs - simulationAfter.timeInMs;
  return floor2(savings, 1 / 10);
}
function computeMetricSavings2(http1Requests, context2) {
  if (!context2.navigation || !context2.lantern) {
    return;
  }
  const urlsToChange = new Set(http1Requests.map((r) => r.args.data.url));
  const fcpGraph = context2.lantern.metrics.firstContentfulPaint.optimisticGraph;
  const lcpGraph = context2.lantern.metrics.largestContentfulPaint.optimisticGraph;
  return {
    FCP: computeWasteWithGraph2(urlsToChange, fcpGraph, context2.lantern.simulator),
    LCP: computeWasteWithGraph2(urlsToChange, lcpGraph, context2.lantern.simulator)
  };
}
function finalize$5(partialModel) {
  return {
    insightKey: "ModernHTTP",
    strings: UIStrings$y,
    title: i18nString$j(UIStrings$y.title),
    description: i18nString$j(UIStrings$y.description),
    docs: "https://developer.chrome.com/docs/performance/insights/modern-http",
    category: InsightCategory2.LCP,
    state: partialModel.http1Requests.length > 0 ? "fail" : "pass",
    ...partialModel,
    relatedEvents: partialModel.http1Requests
  };
}
function generateInsight$5(data32, context2) {
  const isWithinContext = (event) => eventIsInBounds2(event, context2.bounds);
  const contextRequests = data32.NetworkRequests.byTime.filter(isWithinContext);
  const entityMappings4 = data32.NetworkRequests.entityMappings;
  const firstPartyUrl = context2.navigation?.args.data?.documentLoaderURL ?? data32.Meta.mainFrameURL;
  const firstPartyEntity = getEntityForUrl2(firstPartyUrl, entityMappings4);
  const http1Requests = determineHttp1Requests2(contextRequests, entityMappings4, firstPartyEntity ?? null);
  return finalize$5({
    http1Requests,
    metricSavings: computeMetricSavings2(http1Requests, context2)
  });
}
function createOverlayForRequest$1(request3) {
  return {
    type: "ENTRY_OUTLINE",
    entry: request3,
    outlineReason: "ERROR"
  };
}
function createOverlays$5(model3) {
  return model3.http1Requests.map((req) => createOverlayForRequest$1(req)) ?? [];
}
function finalize$4(partialModel) {
  return {
    insightKey: "NetworkDependencyTree",
    strings: UIStrings$x,
    title: i18nString$i(UIStrings$x.title),
    description: i18nString$i(UIStrings$x.description),
    docs: "https://developer.chrome.com/docs/performance/insights/network-dependency-tree",
    category: InsightCategory2.LCP,
    state: partialModel.fail ? "fail" : "pass",
    ...partialModel
  };
}
function isCritical2(request3, context2) {
  if (request3.args.data.requestId === context2.navigationId) {
    return true;
  }
  if (request3.args.data.isLinkPreload) {
    return false;
  }
  const isIframe = request3.args.data.resourceType === "Document" && request3.args.data.frame !== context2.frameId;
  if (nonCriticalResourceTypes2.has(request3.args.data.resourceType) || isIframe || request3.args.data.mimeType.startsWith("image/")) {
    return false;
  }
  const initiatorUrl = request3.args.data.initiator?.url || getStackTraceTopCallFrameInEventPayload2(request3)?.url;
  if (!initiatorUrl) {
    return false;
  }
  const isBlocking = isSyntheticNetworkRequestEventRenderBlocking2(request3);
  const isHighPriority = isSyntheticNetworkRequestHighPriority2(request3);
  return isHighPriority || isBlocking;
}
function findMaxLeafNode2(node2) {
  if (node2.children.length === 0) {
    return node2;
  }
  let maxLeaf = node2.children[0];
  for (const child of node2.children) {
    const leaf = findMaxLeafNode2(child);
    if (leaf.timeFromInitialRequest > maxLeaf.timeFromInitialRequest) {
      maxLeaf = leaf;
    }
  }
  return maxLeaf;
}
function sortRecursively2(nodes) {
  for (const node2 of nodes) {
    if (node2.children.length > 0) {
      node2.children.sort((nodeA, nodeB) => {
        const leafA = findMaxLeafNode2(nodeA);
        const leafB = findMaxLeafNode2(nodeB);
        return leafB.timeFromInitialRequest - leafA.timeFromInitialRequest;
      });
      sortRecursively2(node2.children);
    }
  }
}
function generateNetworkDependencyTree2(context2) {
  const rootNodes = [];
  const relatedEvents = /* @__PURE__ */ new Map();
  let maxTime = Micro2(0);
  let fail = false;
  let longestChain = [];
  function addChain(path14) {
    if (path14.length === 0) {
      return;
    }
    if (path14.length >= 2) {
      fail = true;
    }
    const initialRequest = path14[0];
    const lastRequest = path14[path14.length - 1];
    const totalChainTime = Micro2(lastRequest.ts + lastRequest.dur - initialRequest.ts);
    if (totalChainTime > maxTime) {
      maxTime = totalChainTime;
      longestChain = path14;
    }
    let currentNodes = rootNodes;
    for (let depth = 0; depth < path14.length; ++depth) {
      const request3 = path14[depth];
      let found = currentNodes.find((node2) => node2.request === request3);
      if (!found) {
        const timeFromInitialRequest = Micro2(request3.ts + request3.dur - initialRequest.ts);
        found = {
          request: request3,
          timeFromInitialRequest,
          children: [],
          relatedRequests: /* @__PURE__ */ new Set()
        };
        currentNodes.push(found);
      }
      path14.forEach((request4) => found?.relatedRequests.add(request4));
      relatedEvents.set(request3, depth < 2 ? [] : [i18nString$i(UIStrings$x.warningDescription)]);
      currentNodes = found.children;
    }
  }
  const seenNodes = /* @__PURE__ */ new Set();
  function getNextNodes(node2) {
    return node2.getDependents().filter((n) => n.getDependencies().every((d) => seenNodes.has(d)));
  }
  context2.lantern?.graph.traverse((node2, traversalPath) => {
    seenNodes.add(node2);
    if (node2.type !== "network") {
      return;
    }
    const networkNode = node2;
    if (!isCritical2(networkNode.rawRequest, context2)) {
      return;
    }
    const networkPath = traversalPath.filter((node3) => node3.type === "network").reverse().map((node3) => node3.rawRequest);
    if (networkPath.some((request3) => !isCritical2(request3, context2))) {
      return;
    }
    if (node2.isNonNetworkProtocol) {
      return;
    }
    addChain(networkPath);
  }, getNextNodes);
  if (longestChain.length > 0) {
    let currentNodes = rootNodes;
    for (const request3 of longestChain) {
      const found = currentNodes.find((node2) => node2.request === request3);
      if (found) {
        found.isLongest = true;
        currentNodes = found.children;
      } else {
        console.error("Some request in the longest chain is not found");
      }
    }
  }
  sortRecursively2(rootNodes);
  return {
    rootNodes,
    maxTime,
    fail,
    relatedEvents
  };
}
function getSecurityOrigin2(url) {
  const parsedURL = new ParsedURL2(url);
  return parsedURL.securityOrigin();
}
function handleLinkResponseHeaderPart2(trimmedPart) {
  if (!trimmedPart) {
    return null;
  }
  const urlStart = trimmedPart.indexOf("<");
  const urlEnd = trimmedPart.indexOf(">");
  if (urlStart !== 0 || urlEnd === -1 || urlEnd <= urlStart) {
    return null;
  }
  const url = trimmedPart.substring(urlStart + 1, urlEnd).trim();
  if (!url) {
    return null;
  }
  const paramsString = trimmedPart.substring(urlEnd + 1).trim();
  if (paramsString) {
    const params = paramsString.split(";");
    for (const param of params) {
      const trimmedParam = param.trim();
      if (!trimmedParam) {
        continue;
      }
      const eqIndex = trimmedParam.indexOf("=");
      if (eqIndex === -1) {
        continue;
      }
      const paramName = trimmedParam.substring(0, eqIndex).trim().toLowerCase();
      let paramValue = trimmedParam.substring(eqIndex + 1).trim();
      if (paramValue.startsWith('"') && paramValue.endsWith('"')) {
        paramValue = paramValue.substring(1, paramValue.length - 1);
      }
      if (paramName === "rel" && paramValue === "preconnect") {
        return { url, headerText: trimmedPart };
      }
    }
  }
  return null;
}
function handleLinkResponseHeader2(linkHeaderValue) {
  if (!linkHeaderValue) {
    return [];
  }
  const preconnectedOrigins = [];
  for (let i = 0; i < linkHeaderValue.length; ) {
    const firstUrlEnd = linkHeaderValue.indexOf(">", i);
    if (firstUrlEnd === -1) {
      break;
    }
    const commaIndex = linkHeaderValue.indexOf(",", firstUrlEnd);
    const partEnd = commaIndex !== -1 ? commaIndex : linkHeaderValue.length;
    const part = linkHeaderValue.substring(i, partEnd);
    if (partEnd + 1 <= i) {
      console.warn("unexpected infinite loop, bailing");
      break;
    }
    i = partEnd + 1;
    const preconnectedOrigin = handleLinkResponseHeaderPart2(part.trim());
    if (preconnectedOrigin) {
      preconnectedOrigins.push(preconnectedOrigin);
    }
  }
  return preconnectedOrigins;
}
function generatePreconnectedOrigins2(data32, context2, contextRequests, preconnectCandidates) {
  const preconnectedOrigins = [];
  for (const event of data32.NetworkRequests.linkPreconnectEvents) {
    preconnectedOrigins.push({
      node_id: event.args.data.node_id,
      frame: event.args.data.frame,
      url: event.args.data.url,
      unused: !contextRequests.some((request3) => getSecurityOrigin2(event.args.data.url) === getSecurityOrigin2(request3.args.data.url)),
      crossorigin: preconnectCandidates.some((candidate) => candidate.origin === getSecurityOrigin2(event.args.data.url)),
      source: "DOM"
    });
  }
  const documentRequest = data32.NetworkRequests.byId.get(context2.navigationId);
  documentRequest?.args.data.responseHeaders?.forEach((header) => {
    if (header.name.toLowerCase() === "link") {
      const preconnectedOriginsFromResponseHeader = handleLinkResponseHeader2(header.value);
      preconnectedOriginsFromResponseHeader?.forEach((origin) => preconnectedOrigins.push({
        url: origin.url,
        headerText: origin.headerText,
        request: documentRequest,
        unused: !contextRequests.some((request3) => getSecurityOrigin2(origin.url) === getSecurityOrigin2(request3.args.data.url)),
        crossorigin: preconnectCandidates.some((candidate) => candidate.origin === getSecurityOrigin2(origin.url)),
        source: "ResponseHeader"
      }));
    }
  });
  return preconnectedOrigins;
}
function hasValidTiming2(request3) {
  return !!request3.args.data.timing && request3.args.data.timing.connectEnd >= 0 && request3.args.data.timing.connectStart >= 0;
}
function hasAlreadyConnectedToOrigin2(request3) {
  const { timing } = request3.args.data;
  if (!timing) {
    return false;
  }
  if (timing.dnsStart === -1 && timing.dnsEnd === -1 && timing.connectStart === -1 && timing.connectEnd === -1) {
    return true;
  }
  if (timing.dnsEnd - timing.dnsStart === 0 && timing.connectEnd - timing.connectStart === 0) {
    return true;
  }
  return false;
}
function socketStartTimeIsBelowThreshold2(request3, mainResource) {
  const timeSinceMainEnd = Math.max(0, request3.args.data.syntheticData.sendStartTime - mainResource.args.data.syntheticData.finishTime);
  return microToMilli2(timeSinceMainEnd) < PRECONNECT_SOCKET_MAX_IDLE_IN_MS2;
}
function candidateRequestsByOrigin2(data32, mainResource, contextRequests, lcpGraphURLs) {
  const origins = /* @__PURE__ */ new Map();
  contextRequests.forEach((request3) => {
    if (!hasValidTiming2(request3)) {
      return;
    }
    const initiator = getNetworkInitiator(data32, request3);
    if (initiator === mainResource) {
      return;
    }
    const url = new URL(request3.args.data.url);
    if (url.origin === "null") {
      return;
    }
    const mainOrigin = new URL(mainResource.args.data.url).origin;
    if (url.origin === mainOrigin) {
      return;
    }
    if (!lcpGraphURLs.has(request3.args.data.url)) {
      return;
    }
    if (hasAlreadyConnectedToOrigin2(request3)) {
      return;
    }
    if (!socketStartTimeIsBelowThreshold2(request3, mainResource)) {
      return;
    }
    const originRequests = getWithDefault2(origins, url.origin, () => []);
    originRequests.push(request3);
  });
  return origins;
}
function generatePreconnectCandidates2(data32, context2, contextRequests) {
  if (!context2.lantern) {
    return [];
  }
  const documentRequest = data32.NetworkRequests.byId.get(context2.navigationId);
  if (!documentRequest) {
    return [];
  }
  const { rtt, additionalRttByOrigin } = context2.lantern.simulator.getOptions();
  const lcpGraph = context2.lantern.metrics.largestContentfulPaint.pessimisticGraph;
  const fcpGraph = context2.lantern.metrics.firstContentfulPaint.pessimisticGraph;
  const lcpGraphURLs = /* @__PURE__ */ new Set();
  lcpGraph.traverse((node2) => {
    if (node2.type === "network") {
      lcpGraphURLs.add(node2.request.url);
    }
  });
  const fcpGraphURLs = /* @__PURE__ */ new Set();
  fcpGraph.traverse((node2) => {
    if (node2.type === "network") {
      fcpGraphURLs.add(node2.request.url);
    }
  });
  const groupedOrigins = candidateRequestsByOrigin2(data32, documentRequest, contextRequests, lcpGraphURLs);
  let preconnectCandidates = [];
  groupedOrigins.forEach((requests) => {
    const firstRequestOfOrigin = requests[0];
    if (!firstRequestOfOrigin.args.data.timing) {
      return;
    }
    const firstRequestOfOriginParsedURL = new ParsedURL2(firstRequestOfOrigin.args.data.url);
    const origin = firstRequestOfOriginParsedURL.securityOrigin();
    const additionalRtt = additionalRttByOrigin.get(origin) ?? 0;
    let connectionTime = Milli2(rtt + additionalRtt);
    if (firstRequestOfOriginParsedURL.scheme === "https") {
      connectionTime = Milli2(connectionTime * 2);
    }
    const timeBetweenMainResourceAndDnsStart = Micro2(firstRequestOfOrigin.args.data.syntheticData.sendStartTime - documentRequest.args.data.syntheticData.finishTime + milliToMicro2(firstRequestOfOrigin.args.data.timing.dnsStart));
    const wastedMs = Math.min(connectionTime, microToMilli2(timeBetweenMainResourceAndDnsStart));
    if (wastedMs < IGNORE_THRESHOLD_IN_MILLISECONDS2) {
      return;
    }
    if (fcpGraphURLs.has(firstRequestOfOrigin.args.data.url)) ;
    preconnectCandidates.push({
      origin,
      wastedMs
    });
  });
  preconnectCandidates = preconnectCandidates.sort((a, b) => b.wastedMs - a.wastedMs);
  return preconnectCandidates.slice(0, TOO_MANY_PRECONNECTS_THRESHOLD2);
}
function isNetworkDependencyTreeInsight2(model3) {
  return model3.insightKey === "NetworkDependencyTree";
}
function generateInsight$4(data32, context2) {
  if (!context2.navigation) {
    return finalize$4({
      rootNodes: [],
      maxTime: 0,
      fail: false,
      preconnectedOrigins: [],
      preconnectCandidates: []
    });
  }
  const { rootNodes, maxTime, fail, relatedEvents } = generateNetworkDependencyTree2(context2);
  const isWithinContext = (event) => eventIsInBounds2(event, context2.bounds);
  const contextRequests = data32.NetworkRequests.byTime.filter(isWithinContext);
  const preconnectCandidates = generatePreconnectCandidates2(data32, context2, contextRequests);
  const preconnectedOrigins = generatePreconnectedOrigins2(data32, context2, contextRequests, preconnectCandidates);
  return finalize$4({
    rootNodes,
    maxTime,
    fail,
    relatedEvents,
    preconnectedOrigins,
    preconnectCandidates
  });
}
function createOverlays$4(model3) {
  function walk(nodes, overlays2) {
    nodes.forEach((node2) => {
      overlays2.push({
        type: "ENTRY_OUTLINE",
        entry: node2.request,
        outlineReason: "ERROR"
      });
      walk(node2.children, overlays2);
    });
  }
  const overlays = [];
  walk(model3.rootNodes, overlays);
  return overlays;
}
function isRenderBlockingInsight2(insight) {
  return insight.insightKey === "RenderBlocking";
}
function getNodesAndTimingByRequestId2(nodeTimings) {
  const requestIdToNode = /* @__PURE__ */ new Map();
  for (const [node2, nodeTiming] of nodeTimings) {
    if (node2.type !== "network") {
      continue;
    }
    requestIdToNode.set(node2.request.requestId, { node: node2, nodeTiming });
  }
  return requestIdToNode;
}
function estimateSavingsWithGraphs3(deferredIds, lanternContext) {
  const simulator = lanternContext.simulator;
  const fcpGraph = lanternContext.metrics.firstContentfulPaint.optimisticGraph;
  const { nodeTimings } = lanternContext.simulator.simulate(fcpGraph);
  const adjustedNodeTimings = new Map(nodeTimings);
  const totalChildNetworkBytes = 0;
  const minimalFCPGraph = fcpGraph.cloneWithRelationships((node2) => {
    const canDeferRequest = deferredIds.has(node2.id);
    return !canDeferRequest;
  });
  if (minimalFCPGraph.type !== "network") {
    throw new Error("minimalFCPGraph not a NetworkNode");
  }
  const estimateBeforeInline = Math.max(...Array.from(Array.from(adjustedNodeTimings).map((timing) => timing[1].endTime)));
  const originalTransferSize = minimalFCPGraph.request.transferSize;
  const safeTransferSize = originalTransferSize || 0;
  minimalFCPGraph.request.transferSize = safeTransferSize + totalChildNetworkBytes;
  const estimateAfterInline = simulator.simulate(minimalFCPGraph).timeInMs;
  minimalFCPGraph.request.transferSize = originalTransferSize;
  return Math.round(Math.max(estimateBeforeInline - estimateAfterInline, 0));
}
function hasImageLCP2(data32, context2) {
  return data32.LargestImagePaint.lcpRequestByNavigationId.has(context2.navigationId);
}
function computeSavings2(data32, context2, renderBlockingRequests) {
  if (!context2.lantern) {
    return;
  }
  const nodesAndTimingsByRequestId = getNodesAndTimingByRequestId2(context2.lantern.metrics.firstContentfulPaint.optimisticEstimate.nodeTimings);
  const metricSavings = { FCP: 0, LCP: 0 };
  const requestIdToWastedMs = /* @__PURE__ */ new Map();
  const deferredNodeIds = /* @__PURE__ */ new Set();
  for (const request3 of renderBlockingRequests) {
    const nodeAndTiming = nodesAndTimingsByRequestId.get(request3.args.data.requestId);
    if (!nodeAndTiming) {
      continue;
    }
    const { node: node2, nodeTiming } = nodeAndTiming;
    node2.traverse((node3) => deferredNodeIds.add(node3.id));
    const wastedMs = Math.round(nodeTiming.duration);
    if (wastedMs < MINIMUM_WASTED_MS2) {
      continue;
    }
    requestIdToWastedMs.set(node2.id, wastedMs);
  }
  if (requestIdToWastedMs.size) {
    metricSavings.FCP = estimateSavingsWithGraphs3(deferredNodeIds, context2.lantern);
    if (!hasImageLCP2(data32, context2)) {
      metricSavings.LCP = metricSavings.FCP;
    }
  }
  return { metricSavings, requestIdToWastedMs };
}
function finalize$3(partialModel) {
  return {
    insightKey: "RenderBlocking",
    strings: UIStrings$w,
    title: i18nString$h(UIStrings$w.title),
    description: i18nString$h(UIStrings$w.description),
    docs: "https://developer.chrome.com/docs/performance/insights/render-blocking",
    category: InsightCategory2.LCP,
    state: partialModel.renderBlockingRequests.length > 0 ? "fail" : "pass",
    ...partialModel
  };
}
function generateInsight$3(data32, context2) {
  if (!context2.navigation) {
    return finalize$3({
      renderBlockingRequests: []
    });
  }
  const firstPaintTs = data32.PageLoadMetrics.metricScoresByFrameId.get(context2.frameId)?.get(context2.navigation)?.get("FP")?.event?.ts;
  if (!firstPaintTs) {
    return finalize$3({
      renderBlockingRequests: [],
      warnings: [InsightWarning2.NO_FP]
    });
  }
  let renderBlockingRequests = [];
  for (const req of data32.NetworkRequests.byTime) {
    if (req.args.data.frame !== context2.frameId) {
      continue;
    }
    if (!isSyntheticNetworkRequestEventRenderBlocking2(req)) {
      continue;
    }
    if (req.args.data.syntheticData.finishTime > firstPaintTs) {
      continue;
    }
    if (req.args.data.renderBlocking === "in_body_parser_blocking") {
      const priority = req.args.data.priority;
      const isScript = req.args.data.resourceType === "Script";
      const isBlockingScript = isScript && priority === "High";
      if (priority !== "VeryHigh" && !isBlockingScript) {
        continue;
      }
    }
    const navigation2 = getNavigationForTraceEvent2(req, context2.frameId, data32.Meta.navigationsByFrameId);
    if (navigation2 === context2.navigation) {
      renderBlockingRequests.push(req);
    }
  }
  const savings = computeSavings2(data32, context2, renderBlockingRequests);
  renderBlockingRequests = renderBlockingRequests.sort((a, b) => {
    return b.dur - a.dur;
  });
  return finalize$3({
    relatedEvents: renderBlockingRequests,
    renderBlockingRequests,
    ...savings
  });
}
function createOverlayForRequest5(request3) {
  return {
    type: "ENTRY_OUTLINE",
    entry: request3,
    outlineReason: "ERROR"
  };
}
function createOverlays$3(model3) {
  return model3.renderBlockingRequests.map((request3) => createOverlayForRequest5(request3));
}
function aggregateSelectorStats2(data32, context2) {
  const selectorMap = /* @__PURE__ */ new Map();
  for (const [event, value] of data32.dataForRecalcStyleEvent) {
    if (event.args.beginData?.frame !== context2.frameId) {
      continue;
    }
    if (!eventIsInBounds2(event, context2.bounds)) {
      continue;
    }
    for (const timing of value.timings) {
      const key = timing[SelectorTimingsKey2.Selector] + "_" + timing[SelectorTimingsKey2.StyleSheetId];
      const findTiming = selectorMap.get(key);
      if (findTiming !== void 0) {
        findTiming[SelectorTimingsKey2.Elapsed] += timing[SelectorTimingsKey2.Elapsed];
        findTiming[SelectorTimingsKey2.FastRejectCount] += timing[SelectorTimingsKey2.FastRejectCount];
        findTiming[SelectorTimingsKey2.MatchAttempts] += timing[SelectorTimingsKey2.MatchAttempts];
        findTiming[SelectorTimingsKey2.MatchCount] += timing[SelectorTimingsKey2.MatchCount];
      } else {
        selectorMap.set(key, { ...timing });
      }
    }
  }
  return [...selectorMap.values()];
}
function finalize$2(partialModel) {
  return {
    insightKey: "SlowCSSSelector",
    strings: UIStrings$v,
    title: i18nString$g(UIStrings$v.title),
    description: i18nString$g(UIStrings$v.description),
    docs: "https://developer.chrome.com/docs/performance/insights/slow-css-selector",
    category: InsightCategory2.ALL,
    state: partialModel.topSelectorElapsedMs && partialModel.topSelectorMatchAttempts ? "informative" : "pass",
    ...partialModel
  };
}
function isSlowCSSSelectorInsight2(model3) {
  return model3.insightKey === "SlowCSSSelector";
}
function generateInsight$2(data32, context2) {
  const selectorStatsData = data32.SelectorStats;
  if (!selectorStatsData) {
    throw new Error("no selector stats data");
  }
  const selectorTimings = aggregateSelectorStats2(selectorStatsData, context2);
  let totalElapsedUs = 0;
  let totalMatchAttempts = 0;
  let totalMatchCount = 0;
  selectorTimings.map((timing) => {
    totalElapsedUs += timing[SelectorTimingsKey2.Elapsed];
    totalMatchAttempts += timing[SelectorTimingsKey2.MatchAttempts];
    totalMatchCount += timing[SelectorTimingsKey2.MatchCount];
  });
  let topSelectorElapsedMs = null;
  let topSelectorMatchAttempts = null;
  if (selectorTimings.length > 0) {
    topSelectorElapsedMs = selectorTimings.reduce((a, b) => {
      return a[SelectorTimingsKey2.Elapsed] > b[SelectorTimingsKey2.Elapsed] ? a : b;
    });
    if (topSelectorElapsedMs && topSelectorElapsedMs[SelectorTimingsKey2.Elapsed] < slowCSSSelectorThreshold2) {
      topSelectorElapsedMs = null;
    }
    topSelectorMatchAttempts = selectorTimings.reduce((a, b) => {
      return a[SelectorTimingsKey2.MatchAttempts] > b[SelectorTimingsKey2.MatchAttempts] ? a : b;
    });
  }
  return finalize$2({
    relatedEvents: [],
    totalElapsedMs: Milli2(totalElapsedUs / 1e3),
    totalMatchAttempts,
    totalMatchCount,
    topSelectorElapsedMs,
    topSelectorMatchAttempts
  });
}
function createOverlays$2(_) {
  return [];
}
function getRelatedEvents2(summaries, firstPartyEntity) {
  const relatedEvents = [];
  for (const summary of summaries) {
    if (summary.entity !== firstPartyEntity) {
      relatedEvents.push(...summary.relatedEvents);
    }
  }
  return relatedEvents;
}
function finalize$1(partialModel) {
  return {
    insightKey: "ThirdParties",
    strings: UIStrings$u,
    title: i18nString$f(UIStrings$u.title),
    description: i18nString$f(UIStrings$u.description),
    docs: "https://developer.chrome.com/docs/performance/insights/third-parties",
    category: InsightCategory2.ALL,
    state: partialModel.entitySummaries.find((summary) => summary.entity !== partialModel.firstPartyEntity) ? "informative" : "pass",
    ...partialModel
  };
}
function isThirdPartyInsight2(model3) {
  return model3.insightKey === "ThirdParties";
}
function generateInsight$1(data32, context2) {
  const entitySummaries = summarizeByThirdParty2(data32, context2.bounds);
  const firstPartyUrl = context2.navigation?.args.data?.documentLoaderURL ?? data32.Meta.mainFrameURL;
  const firstPartyEntity = nostatsSubset.getEntity(firstPartyUrl) || makeUpEntity2(data32.Renderer.entityMappings.createdEntityCache, firstPartyUrl);
  return finalize$1({
    relatedEvents: getRelatedEvents2(entitySummaries, firstPartyEntity),
    firstPartyEntity,
    entitySummaries
  });
}
function createOverlaysForSummary2(summary) {
  const overlays = [];
  for (const event of summary.relatedEvents) {
    if (event.dur === void 0 || event.dur < 1e3) {
      continue;
    }
    const overlay = {
      type: "ENTRY_OUTLINE",
      entry: event,
      outlineReason: "INFO"
    };
    overlays.push(overlay);
  }
  return overlays;
}
function createOverlays$1(model3) {
  const overlays = [];
  const summaries = model3.entitySummaries ?? [];
  for (const summary of summaries) {
    if (summary.entity === model3.firstPartyEntity) {
      continue;
    }
    const summaryOverlays = createOverlaysForSummary2(summary);
    overlays.push(...summaryOverlays);
  }
  return overlays;
}
function finalize49(partialModel) {
  return {
    insightKey: "Viewport",
    strings: UIStrings$t,
    title: i18nString$e(UIStrings$t.title),
    description: i18nString$e(UIStrings$t.description),
    docs: "https://developer.chrome.com/docs/performance/insights/viewport",
    category: InsightCategory2.INP,
    state: partialModel.mobileOptimized === false ? "fail" : "pass",
    ...partialModel
  };
}
function isViewportInsight2(model3) {
  return model3.insightKey === "Viewport";
}
function generateInsight19(data32, context2) {
  const viewportEvent = data32.UserInteractions.parseMetaViewportEvents.find((event) => {
    if (event.args.data.frame !== context2.frameId) {
      return false;
    }
    return eventIsInBounds2(event, context2.bounds);
  });
  const compositorEvents = data32.UserInteractions.beginCommitCompositorFrameEvents.filter((event) => {
    if (event.args.frame !== context2.frameId) {
      return false;
    }
    if (viewportEvent && event.ts < viewportEvent.ts) {
      return false;
    }
    return eventIsInBounds2(event, context2.bounds);
  });
  if (!compositorEvents.length) {
    return finalize49({
      mobileOptimized: null,
      warnings: [InsightWarning2.NO_LAYOUT]
    });
  }
  for (const event of compositorEvents) {
    if (!event.args.is_mobile_optimized) {
      const longPointerInteractions = [...data32.UserInteractions.interactionsOverThreshold.values()].filter((interaction) => categoryOfInteraction2(interaction) === "POINTER" && interaction.inputDelay >= 5e4);
      const inputDelay = Math.max(0, ...longPointerInteractions.map((interaction) => interaction.inputDelay)) / 1e3;
      const inpMetricSavings = clamp$1(inputDelay, 0, 300);
      return finalize49({
        mobileOptimized: false,
        viewportEvent,
        longPointerInteractions,
        metricSavings: { INP: inpMetricSavings }
      });
    }
  }
  return finalize49({
    mobileOptimized: true,
    viewportEvent
  });
}
function createOverlays19(model3) {
  if (!model3.longPointerInteractions) {
    return [];
  }
  return model3.longPointerInteractions.map((interaction) => {
    const delay = Math.min(interaction.inputDelay, 300 * 1e3);
    const bounds = traceWindowFromMicroSeconds2(Micro2(interaction.ts), Micro2(interaction.ts + delay));
    return {
      type: "TIMESPAN_BREAKDOWN",
      entry: interaction,
      sections: [{ bounds, label: i18nString$e(UIStrings$t.mobileTapDelayLabel), showDuration: true }],
      renderLocation: "ABOVE_EVENT"
    };
  });
}
function isNonNetworkProtocol2(protocol2) {
  const urlScheme = protocol2.includes(":") ? protocol2.slice(0, protocol2.indexOf(":")) : protocol2;
  return NON_NETWORK_SCHEMES4.includes(urlScheme);
}
function calculateTbtImpactForEvent2(event, startTimeMs, endTimeMs, topLevelEvent) {
  let threshold = BLOCKING_TIME_THRESHOLD2;
  if (topLevelEvent) {
    threshold *= event.duration / topLevelEvent.duration;
  }
  if (event.duration < threshold) {
    return 0;
  }
  if (event.end < startTimeMs) {
    return 0;
  }
  if (event.start > endTimeMs) {
    return 0;
  }
  const clippedStart = Math.max(event.start, startTimeMs);
  const clippedEnd = Math.min(event.end, endTimeMs);
  const clippedDuration = clippedEnd - clippedStart;
  if (clippedDuration < threshold) {
    return 0;
  }
  return clippedDuration - threshold;
}
function calculateSumOfBlockingTime2(topLevelEvents, startTimeMs, endTimeMs) {
  if (endTimeMs <= startTimeMs) {
    return 0;
  }
  let sumBlockingTime = 0;
  for (const event of topLevelEvents) {
    sumBlockingTime += calculateTbtImpactForEvent2(event, startTimeMs, endTimeMs);
  }
  return sumBlockingTime;
}
function createProcessedNavigation2(data32, frameId, navigation2) {
  const scoresByNav = data32.PageLoadMetrics.metricScoresByFrameId.get(frameId);
  if (!scoresByNav) {
    throw new LanternError2("missing metric scores for frame");
  }
  const scores = scoresByNav.get(navigation2);
  if (!scores) {
    throw new LanternError2("missing metric scores for specified navigation");
  }
  const getTimestampOrUndefined = (metric) => {
    const metricScore = scores.get(metric);
    if (!metricScore?.event) {
      return;
    }
    return metricScore.event.ts;
  };
  const getTimestamp = (metric) => {
    const metricScore = scores.get(metric);
    if (!metricScore?.event) {
      throw new LanternError2(`missing metric: ${metric}`);
    }
    return metricScore.event.ts;
  };
  return {
    timestamps: {
      firstContentfulPaint: getTimestamp("FCP"),
      largestContentfulPaint: getTimestampOrUndefined("LCP")
    }
  };
}
function createParsedUrl2(url) {
  if (typeof url === "string") {
    url = new URL(url);
  }
  return {
    scheme: url.protocol.split(":")[0],
    host: url.hostname,
    securityOrigin: url.origin
  };
}
function findWorkerThreads2(trace2) {
  const workerThreads = /* @__PURE__ */ new Map();
  const workerCreationEvents = ["ServiceWorker thread", "DedicatedWorker thread"];
  for (const event of trace2.traceEvents) {
    if (event.name !== "thread_name" || !event.args.name) {
      continue;
    }
    if (!workerCreationEvents.includes(event.args.name)) {
      continue;
    }
    const tids = workerThreads.get(event.pid);
    if (tids) {
      tids.push(event.tid);
    } else {
      workerThreads.set(event.pid, [event.tid]);
    }
  }
  return workerThreads;
}
function createLanternRequest2(parsedTrace, workerThreads, request3) {
  if (request3.args.data.hasResponse && request3.args.data.connectionId === void 0) {
    throw new LanternError2("Trace is too old");
  }
  let url;
  try {
    url = new URL(request3.args.data.url);
  } catch {
    return;
  }
  const timing = request3.args.data.timing ? {
    workerFetchStart: -1,
    workerRespondWithSettled: -1,
    receiveHeadersStart: -1,
    ...request3.args.data.timing
  } : void 0;
  const networkRequestTime = timing ? timing.requestTime * 1e3 : request3.args.data.syntheticData.downloadStart / 1e3;
  let fromWorker = false;
  const tids = workerThreads.get(request3.pid);
  if (tids?.includes(request3.tid)) {
    fromWorker = true;
  }
  if (parsedTrace.Workers.workerIdByThread.has(request3.tid)) {
    fromWorker = true;
  }
  const initiator = request3.args.data.initiator ?? { type: "other" };
  if (request3.args.data.stackTrace) {
    const callFrames = request3.args.data.stackTrace.map((f) => {
      return {
        scriptId: String(f.scriptId),
        url: f.url,
        lineNumber: f.lineNumber - 1,
        columnNumber: f.columnNumber - 1,
        functionName: f.functionName
      };
    });
    initiator.stack = { callFrames };
  }
  let resourceType = request3.args.data.resourceType;
  if (request3.args.data.initiator?.fetchType === "xmlhttprequest") {
    resourceType = "XHR";
  } else if (request3.args.data.initiator?.fetchType === "fetch") {
    resourceType = "Fetch";
  }
  let resourceSize = request3.args.data.decodedBodyLength ?? 0;
  if (url.protocol === "data:" && resourceSize === 0) {
    const commaIndex = url.pathname.indexOf(",");
    if (url.pathname.substring(0, commaIndex).includes(";base64")) {
      resourceSize = atob(url.pathname.substring(commaIndex + 1)).length;
    } else {
      resourceSize = url.pathname.length - commaIndex - 1;
    }
  }
  return {
    rawRequest: request3,
    requestId: request3.args.data.requestId,
    connectionId: request3.args.data.connectionId ?? 0,
    connectionReused: request3.args.data.connectionReused ?? false,
    url: request3.args.data.url,
    protocol: request3.args.data.protocol,
    parsedURL: createParsedUrl2(url),
    documentURL: request3.args.data.requestingFrameUrl,
    rendererStartTime: request3.ts / 1e3,
    networkRequestTime,
    responseHeadersEndTime: request3.args.data.syntheticData.downloadStart / 1e3,
    networkEndTime: request3.args.data.syntheticData.finishTime / 1e3,
    transferSize: request3.args.data.encodedDataLength,
    resourceSize,
    fromDiskCache: request3.args.data.syntheticData.isDiskCached,
    fromMemoryCache: request3.args.data.syntheticData.isMemoryCached,
    isLinkPreload: request3.args.data.isLinkPreload,
    finished: request3.args.data.finished,
    failed: request3.args.data.failed,
    statusCode: request3.args.data.statusCode,
    initiator,
    timing,
    resourceType,
    mimeType: request3.args.data.mimeType,
    priority: request3.args.data.priority,
    frameId: request3.args.data.frame,
    fromWorker,
    serverResponseTime: request3.args.data.lrServerResponseTime
  };
}
function chooseInitiatorRequest2(request3, requestsByURL) {
  if (request3.redirectSource) {
    return request3.redirectSource;
  }
  const initiatorURL = PageDependencyGraph2.getNetworkInitiators(request3)[0];
  let candidates = requestsByURL.get(initiatorURL) || [];
  candidates = candidates.filter((c) => {
    return c.responseHeadersEndTime <= request3.rendererStartTime && c.finished && !c.failed;
  });
  if (candidates.length > 1) {
    const nonPrefetchCandidates = candidates.filter((cand) => cand.resourceType !== NetworkRequestTypes2.Other);
    if (nonPrefetchCandidates.length) {
      candidates = nonPrefetchCandidates;
    }
  }
  if (candidates.length > 1) {
    const sameFrameCandidates = candidates.filter((cand) => cand.frameId === request3.frameId);
    if (sameFrameCandidates.length) {
      candidates = sameFrameCandidates;
    }
  }
  if (candidates.length > 1 && request3.initiator.type === "parser") {
    const documentCandidates = candidates.filter((cand) => cand.resourceType === NetworkRequestTypes2.Document);
    if (documentCandidates.length) {
      candidates = documentCandidates;
    }
  }
  if (candidates.length > 1) {
    const linkPreloadCandidates = candidates.filter((c) => c.isLinkPreload);
    if (linkPreloadCandidates.length) {
      const nonPreloadCandidates = candidates.filter((c) => !c.isLinkPreload);
      const allPreloaded = nonPreloadCandidates.every((c) => c.fromDiskCache || c.fromMemoryCache);
      if (nonPreloadCandidates.length && allPreloaded) {
        candidates = linkPreloadCandidates;
      }
    }
  }
  return candidates.length === 1 ? candidates[0] : null;
}
function linkInitiators2(lanternRequests) {
  const requestsByURL = /* @__PURE__ */ new Map();
  for (const request3 of lanternRequests) {
    const requests = requestsByURL.get(request3.url) || [];
    requests.push(request3);
    requestsByURL.set(request3.url, requests);
  }
  for (const request3 of lanternRequests) {
    const initiatorRequest = chooseInitiatorRequest2(request3, requestsByURL);
    if (initiatorRequest) {
      request3.initiatorRequest = initiatorRequest;
    }
  }
}
function createNetworkRequests2(trace2, data32, startTime = 0, endTime = Number.POSITIVE_INFINITY) {
  const workerThreads = findWorkerThreads2(trace2);
  const lanternRequestsNoRedirects = [];
  for (const request3 of data32.NetworkRequests.byTime) {
    if (request3.ts >= startTime && request3.ts < endTime) {
      const lanternRequest = createLanternRequest2(data32, workerThreads, request3);
      if (lanternRequest) {
        lanternRequestsNoRedirects.push(lanternRequest);
      }
    }
  }
  const lanternRequests = [];
  for (const request3 of [...lanternRequestsNoRedirects]) {
    if (!request3.rawRequest) {
      continue;
    }
    const redirects = request3.rawRequest.args.data.redirects;
    if (!redirects.length) {
      lanternRequests.push(request3);
      continue;
    }
    const requestChain = [];
    for (const redirect of redirects) {
      const redirectedRequest = structuredClone(request3);
      redirectedRequest.networkRequestTime = redirect.ts / 1e3;
      redirectedRequest.rendererStartTime = redirectedRequest.networkRequestTime;
      redirectedRequest.networkEndTime = (redirect.ts + redirect.dur) / 1e3;
      redirectedRequest.responseHeadersEndTime = redirectedRequest.networkEndTime;
      redirectedRequest.timing = {
        requestTime: redirectedRequest.networkRequestTime / 1e3,
        receiveHeadersStart: redirectedRequest.responseHeadersEndTime,
        receiveHeadersEnd: redirectedRequest.responseHeadersEndTime,
        proxyStart: -1,
        proxyEnd: -1,
        dnsStart: -1,
        dnsEnd: -1,
        connectStart: -1,
        connectEnd: -1,
        sslStart: -1,
        sslEnd: -1,
        sendStart: -1,
        sendEnd: -1,
        workerStart: -1,
        workerReady: -1,
        workerFetchStart: -1,
        workerRespondWithSettled: -1,
        pushStart: -1,
        pushEnd: -1
      };
      redirectedRequest.url = redirect.url;
      redirectedRequest.parsedURL = createParsedUrl2(redirect.url);
      redirectedRequest.statusCode = 302;
      redirectedRequest.resourceType = void 0;
      redirectedRequest.transferSize = 400;
      requestChain.push(redirectedRequest);
      lanternRequests.push(redirectedRequest);
    }
    requestChain.push(request3);
    lanternRequests.push(request3);
    for (let i = 0; i < requestChain.length; i++) {
      const request4 = requestChain[i];
      if (i > 0) {
        request4.redirectSource = requestChain[i - 1];
        request4.redirects = requestChain.slice(0, i);
      }
      if (i !== requestChain.length - 1) {
        request4.redirectDestination = requestChain[i + 1];
      }
    }
    for (let i = 1; i < requestChain.length; i++) {
      requestChain[i].requestId = `${requestChain[i - 1].requestId}:redirect`;
    }
  }
  linkInitiators2(lanternRequests);
  return lanternRequests;
}
function collectMainThreadEvents2(trace2, data32) {
  const Meta = data32.Meta;
  const mainFramePids = Meta.mainFrameNavigations.length ? new Set(Meta.mainFrameNavigations.map((nav) => nav.pid)) : Meta.topLevelRendererIds;
  const rendererPidToTid = /* @__PURE__ */ new Map();
  for (const pid of mainFramePids) {
    const threads = Meta.threadsInProcess.get(pid) ?? [];
    let found = false;
    for (const [tid, thread] of threads) {
      if (thread.args.name === "CrRendererMain") {
        rendererPidToTid.set(pid, tid);
        found = true;
        break;
      }
    }
    if (found) {
      continue;
    }
    for (const [tid, thread] of threads) {
      if (thread.args.name === "CrBrowserMain") {
        rendererPidToTid.set(pid, tid);
        found = true;
        break;
      }
    }
  }
  return trace2.traceEvents.filter((e) => rendererPidToTid.get(e.pid) === e.tid);
}
function createGraph2(requests, trace2, data32, url) {
  const mainThreadEvents = collectMainThreadEvents2(trace2, data32);
  if (!url) {
    url = {
      requestedUrl: requests[0].url,
      mainDocumentUrl: ""
    };
    let request3 = requests[0];
    while (request3.redirectDestination) {
      request3 = request3.redirectDestination;
    }
    url.mainDocumentUrl = request3.url;
  }
  return PageDependencyGraph2.createGraph(mainThreadEvents, requests, url);
}
function calculateProgress2(value, phase) {
  if (phase === 0.8) {
    return value * (0.8 - 0.2) + 0.2;
  }
  return value * phase;
}
function sortHandlers2(traceHandlers) {
  const sortedMap = /* @__PURE__ */ new Map();
  const visited = /* @__PURE__ */ new Set();
  const visitHandler = (handlerName) => {
    if (sortedMap.has(handlerName)) {
      return;
    }
    if (visited.has(handlerName)) {
      let stackPath = "";
      for (const handler2 of visited) {
        if (stackPath || handler2 === handlerName) {
          stackPath += `${handler2}->`;
        }
      }
      stackPath += handlerName;
      throw new Error(`Found dependency cycle in trace event handlers: ${stackPath}`);
    }
    visited.add(handlerName);
    const handler = traceHandlers[handlerName];
    if (!handler) {
      return;
    }
    const deps18 = handler.deps?.();
    if (deps18) {
      deps18.forEach(visitHandler);
    }
    sortedMap.set(handlerName, handler);
  };
  for (const handlerName of Object.keys(traceHandlers)) {
    visitHandler(handlerName);
  }
  return sortedMap;
}
function isModelUpdateDataComplete(eventData) {
  return eventData.type === "COMPLETE";
}
function getEventStyle(eventName) {
  return maybeInitSylesMap()[eventName];
}
function stringIsEventCategory(it) {
  return Object.values(EventCategory2).includes(it);
}
function getCategoryStyles() {
  if (categoryStyles) {
    return categoryStyles;
  }
  categoryStyles = {
    loading: new TimelineCategory(EventCategory2.LOADING, i18nString$d(UIStrings$s.loading), true, "--app-color-loading"),
    experience: new TimelineCategory(EventCategory2.EXPERIENCE, i18nString$d(UIStrings$s.experience), false, "--app-color-rendering"),
    messaging: new TimelineCategory(EventCategory2.MESSAGING, i18nString$d(UIStrings$s.messaging), true, "--app-color-messaging"),
    scripting: new TimelineCategory(EventCategory2.SCRIPTING, i18nString$d(UIStrings$s.scripting), true, "--app-color-scripting"),
    rendering: new TimelineCategory(EventCategory2.RENDERING, i18nString$d(UIStrings$s.rendering), true, "--app-color-rendering"),
    painting: new TimelineCategory(EventCategory2.PAINTING, i18nString$d(UIStrings$s.painting), true, "--app-color-painting"),
    gpu: new TimelineCategory(EventCategory2.GPU, i18nString$d(UIStrings$s.gpu), false, "--app-color-painting"),
    async: new TimelineCategory(EventCategory2.ASYNC, i18nString$d(UIStrings$s.async), false, "--app-color-async"),
    other: new TimelineCategory(EventCategory2.OTHER, i18nString$d(UIStrings$s.system), false, "--app-color-system"),
    idle: new TimelineCategory(EventCategory2.IDLE, i18nString$d(UIStrings$s.idle), false, "--app-color-idle"),
    layout: new TimelineCategory(EventCategory2.LAYOUT, i18nString$d(UIStrings$s.layout), false, "--app-color-loading"),
    rasterizing: new TimelineCategory(EventCategory2.RASTERIZING, i18nString$d(UIStrings$s.rasterizing), false, "--app-color-scripting"),
    drawing: new TimelineCategory(EventCategory2.DRAWING, i18nString$d(UIStrings$s.drawing), false, "--app-color-rendering")
  };
  return categoryStyles;
}
function maybeInitSylesMap() {
  if (eventStylesMap) {
    return eventStylesMap;
  }
  const defaultCategoryStyles = getCategoryStyles();
  eventStylesMap = {
    ["RunTask"]: new TimelineRecordStyle(i18nString$d(UIStrings$s.task), defaultCategoryStyles.other),
    ["ProfileCall"]: new TimelineRecordStyle(i18nString$d(UIStrings$s.jsFrame), defaultCategoryStyles.scripting),
    ["JSSample"]: new TimelineRecordStyle("JSSample", defaultCategoryStyles.scripting),
    ["Program"]: new TimelineRecordStyle(i18nString$d(UIStrings$s.other), defaultCategoryStyles.other),
    ["CpuProfiler::StartProfiling"]: new TimelineRecordStyle(i18nString$d(UIStrings$s.profilingOverhead), defaultCategoryStyles.other),
    ["Animation"]: new TimelineRecordStyle(i18nString$d(UIStrings$s.animation), defaultCategoryStyles.rendering),
    ["EventDispatch"]: new TimelineRecordStyle(i18nString$d(UIStrings$s.event), defaultCategoryStyles.scripting),
    ["RequestMainThreadFrame"]: new TimelineRecordStyle(i18nString$d(UIStrings$s.requestMainThreadFrame), defaultCategoryStyles.rendering, true),
    ["BeginFrame"]: new TimelineRecordStyle(i18nString$d(UIStrings$s.frameStart), defaultCategoryStyles.rendering, true),
    ["BeginMainThreadFrame"]: new TimelineRecordStyle(i18nString$d(UIStrings$s.frameStartMainThread), defaultCategoryStyles.rendering, true),
    ["DrawFrame"]: new TimelineRecordStyle(i18nString$d(UIStrings$s.drawFrame), defaultCategoryStyles.rendering, true),
    ["HitTest"]: new TimelineRecordStyle(i18nString$d(UIStrings$s.hitTest), defaultCategoryStyles.rendering),
    ["ScheduleStyleRecalculation"]: new TimelineRecordStyle(i18nString$d(UIStrings$s.scheduleStyleRecalculation), defaultCategoryStyles.rendering),
    ["UpdateLayoutTree"]: new TimelineRecordStyle(i18nString$d(UIStrings$s.recalculateStyle), defaultCategoryStyles.rendering),
    ["InvalidateLayout"]: new TimelineRecordStyle(i18nString$d(UIStrings$s.invalidateLayout), defaultCategoryStyles.rendering, true),
    ["Layerize"]: new TimelineRecordStyle(i18nString$d(UIStrings$s.layerize), defaultCategoryStyles.rendering),
    ["Layout"]: new TimelineRecordStyle(i18nString$d(UIStrings$s.layout), defaultCategoryStyles.rendering),
    ["PaintSetup"]: new TimelineRecordStyle(i18nString$d(UIStrings$s.paintSetup), defaultCategoryStyles.painting),
    ["PaintImage"]: new TimelineRecordStyle(i18nString$d(UIStrings$s.paintImage), defaultCategoryStyles.painting, true),
    ["UpdateLayer"]: new TimelineRecordStyle(i18nString$d(UIStrings$s.updateLayer), defaultCategoryStyles.painting, true),
    ["UpdateLayerTree"]: new TimelineRecordStyle(i18nString$d(UIStrings$s.updateLayerTree), defaultCategoryStyles.rendering),
    ["Paint"]: new TimelineRecordStyle(i18nString$d(UIStrings$s.paint), defaultCategoryStyles.painting),
    ["PrePaint"]: new TimelineRecordStyle(i18nString$d(UIStrings$s.prePaint), defaultCategoryStyles.rendering),
    ["RasterTask"]: new TimelineRecordStyle(i18nString$d(UIStrings$s.rasterizePaint), defaultCategoryStyles.painting),
    ["ScrollLayer"]: new TimelineRecordStyle(i18nString$d(UIStrings$s.scroll), defaultCategoryStyles.rendering),
    ["Commit"]: new TimelineRecordStyle(i18nString$d(UIStrings$s.commit), defaultCategoryStyles.painting),
    ["CompositeLayers"]: new TimelineRecordStyle(i18nString$d(UIStrings$s.compositeLayers), defaultCategoryStyles.painting),
    ["ComputeIntersections"]: new TimelineRecordStyle(i18nString$d(UIStrings$s.computeIntersections), defaultCategoryStyles.rendering),
    ["ParseHTML"]: new TimelineRecordStyle(i18nString$d(UIStrings$s.parseHtml), defaultCategoryStyles.loading),
    ["ParseAuthorStyleSheet"]: new TimelineRecordStyle(i18nString$d(UIStrings$s.parseStylesheet), defaultCategoryStyles.loading),
    ["TimerInstall"]: new TimelineRecordStyle(i18nString$d(UIStrings$s.installTimer), defaultCategoryStyles.scripting),
    ["TimerRemove"]: new TimelineRecordStyle(i18nString$d(UIStrings$s.removeTimer), defaultCategoryStyles.scripting),
    ["TimerFire"]: new TimelineRecordStyle(i18nString$d(UIStrings$s.timerFired), defaultCategoryStyles.scripting),
    ["XHRReadyStateChange"]: new TimelineRecordStyle(i18nString$d(UIStrings$s.xhrReadyStateChange), defaultCategoryStyles.scripting),
    ["XHRLoad"]: new TimelineRecordStyle(i18nString$d(UIStrings$s.xhrLoad), defaultCategoryStyles.scripting),
    ["v8.compile"]: new TimelineRecordStyle(i18nString$d(UIStrings$s.compileScript), defaultCategoryStyles.scripting),
    ["v8.produceCache"]: new TimelineRecordStyle(i18nString$d(UIStrings$s.cacheScript), defaultCategoryStyles.scripting),
    ["V8.CompileCode"]: new TimelineRecordStyle(i18nString$d(UIStrings$s.compileCode), defaultCategoryStyles.scripting),
    ["V8.OptimizeCode"]: new TimelineRecordStyle(i18nString$d(UIStrings$s.optimizeCode), defaultCategoryStyles.scripting),
    ["EvaluateScript"]: new TimelineRecordStyle(i18nString$d(UIStrings$s.evaluateScript), defaultCategoryStyles.scripting),
    ["V8.CompileModule"]: new TimelineRecordStyle(i18nString$d(UIStrings$s.compileModule), defaultCategoryStyles.scripting),
    ["v8.produceModuleCache"]: new TimelineRecordStyle(i18nString$d(UIStrings$s.cacheModule), defaultCategoryStyles.scripting),
    ["v8.evaluateModule"]: new TimelineRecordStyle(i18nString$d(UIStrings$s.evaluateModule), defaultCategoryStyles.scripting),
    ["v8.parseOnBackground"]: new TimelineRecordStyle(i18nString$d(UIStrings$s.streamingCompileTask), defaultCategoryStyles.other),
    ["v8.parseOnBackgroundWaiting"]: new TimelineRecordStyle(i18nString$d(UIStrings$s.waitingForNetwork), defaultCategoryStyles.idle),
    ["v8.parseOnBackgroundParsing"]: new TimelineRecordStyle(i18nString$d(UIStrings$s.parseAndCompile), defaultCategoryStyles.scripting),
    ["v8.deserializeOnBackground"]: new TimelineRecordStyle(i18nString$d(UIStrings$s.deserializeCodeCache), defaultCategoryStyles.scripting),
    ["V8.FinalizeDeserialization"]: new TimelineRecordStyle(i18nString$d(UIStrings$s.profilingOverhead), defaultCategoryStyles.other),
    ["v8.wasm.streamFromResponseCallback"]: new TimelineRecordStyle(i18nString$d(UIStrings$s.streamingWasmResponse), defaultCategoryStyles.scripting),
    ["v8.wasm.compiledModule"]: new TimelineRecordStyle(i18nString$d(UIStrings$s.compiledWasmModule), defaultCategoryStyles.scripting),
    ["v8.wasm.cachedModule"]: new TimelineRecordStyle(i18nString$d(UIStrings$s.cachedWasmModule), defaultCategoryStyles.scripting),
    ["v8.wasm.moduleCacheHit"]: new TimelineRecordStyle(i18nString$d(UIStrings$s.wasmModuleCacheHit), defaultCategoryStyles.scripting),
    ["v8.wasm.moduleCacheInvalid"]: new TimelineRecordStyle(i18nString$d(UIStrings$s.wasmModuleCacheInvalid), defaultCategoryStyles.scripting),
    ["FrameStartedLoading"]: new TimelineRecordStyle(i18nString$d(UIStrings$s.frameStartedLoading), defaultCategoryStyles.loading, true),
    ["MarkLoad"]: new TimelineRecordStyle(i18nString$d(UIStrings$s.onloadEvent), defaultCategoryStyles.scripting, true),
    ["MarkDOMContent"]: new TimelineRecordStyle(i18nString$d(UIStrings$s.domcontentloadedEvent), defaultCategoryStyles.scripting, true),
    ["firstPaint"]: new TimelineRecordStyle(i18nString$d(UIStrings$s.firstPaint), defaultCategoryStyles.painting, true),
    ["firstContentfulPaint"]: new TimelineRecordStyle(i18nString$d(UIStrings$s.firstContentfulPaint), defaultCategoryStyles.rendering, true),
    ["largestContentfulPaint::Candidate"]: new TimelineRecordStyle(i18nString$d(UIStrings$s.largestContentfulPaint), defaultCategoryStyles.rendering, true),
    ["largestContentfulPaint::CandidateForSoftNavigation"]: new TimelineRecordStyle(i18nString$d(UIStrings$s.softLargestContentfulPaint), defaultCategoryStyles.rendering, true),
    ["TimeStamp"]: new TimelineRecordStyle(i18nString$d(UIStrings$s.timestamp), defaultCategoryStyles.scripting),
    ["ConsoleTime"]: new TimelineRecordStyle(i18nString$d(UIStrings$s.consoleTime), defaultCategoryStyles.scripting),
    ["UserTiming"]: new TimelineRecordStyle(i18nString$d(UIStrings$s.userTiming), defaultCategoryStyles.scripting),
    ["ResourceWillSendRequest"]: new TimelineRecordStyle(i18nString$d(UIStrings$s.willSendRequest), defaultCategoryStyles.loading),
    ["ResourceSendRequest"]: new TimelineRecordStyle(i18nString$d(UIStrings$s.sendRequest), defaultCategoryStyles.loading),
    ["ResourceReceiveResponse"]: new TimelineRecordStyle(i18nString$d(UIStrings$s.receiveResponse), defaultCategoryStyles.loading),
    ["ResourceFinish"]: new TimelineRecordStyle(i18nString$d(UIStrings$s.finishLoading), defaultCategoryStyles.loading),
    ["ResourceReceivedData"]: new TimelineRecordStyle(i18nString$d(UIStrings$s.receiveData), defaultCategoryStyles.loading),
    ["RunMicrotasks"]: new TimelineRecordStyle(i18nString$d(UIStrings$s.runMicrotasks), defaultCategoryStyles.scripting),
    ["FunctionCall"]: new TimelineRecordStyle(i18nString$d(UIStrings$s.functionCall), defaultCategoryStyles.scripting),
    ["GCEvent"]: new TimelineRecordStyle(i18nString$d(UIStrings$s.gcEvent), defaultCategoryStyles.scripting),
    ["MajorGC"]: new TimelineRecordStyle(i18nString$d(UIStrings$s.majorGc), defaultCategoryStyles.scripting),
    ["MinorGC"]: new TimelineRecordStyle(i18nString$d(UIStrings$s.minorGc), defaultCategoryStyles.scripting),
    ["CppGC.IncrementalSweep"]: new TimelineRecordStyle(i18nString$d(UIStrings$s.cppGc), defaultCategoryStyles.scripting),
    ["RequestAnimationFrame"]: new TimelineRecordStyle(i18nString$d(UIStrings$s.requestAnimationFrame), defaultCategoryStyles.scripting),
    ["CancelAnimationFrame"]: new TimelineRecordStyle(i18nString$d(UIStrings$s.cancelAnimationFrame), defaultCategoryStyles.scripting),
    ["FireAnimationFrame"]: new TimelineRecordStyle(i18nString$d(UIStrings$s.animationFrameFired), defaultCategoryStyles.scripting),
    ["RequestIdleCallback"]: new TimelineRecordStyle(i18nString$d(UIStrings$s.requestIdleCallback), defaultCategoryStyles.scripting),
    ["CancelIdleCallback"]: new TimelineRecordStyle(i18nString$d(UIStrings$s.cancelIdleCallback), defaultCategoryStyles.scripting),
    ["FireIdleCallback"]: new TimelineRecordStyle(i18nString$d(UIStrings$s.fireIdleCallback), defaultCategoryStyles.scripting),
    ["WebSocketCreate"]: new TimelineRecordStyle(i18nString$d(UIStrings$s.createWebsocket), defaultCategoryStyles.scripting),
    ["WebSocketSendHandshakeRequest"]: new TimelineRecordStyle(i18nString$d(UIStrings$s.sendWebsocketHandshake), defaultCategoryStyles.scripting),
    ["WebSocketReceiveHandshakeResponse"]: new TimelineRecordStyle(i18nString$d(UIStrings$s.receiveWebsocketHandshake), defaultCategoryStyles.scripting),
    ["WebSocketDestroy"]: new TimelineRecordStyle(i18nString$d(UIStrings$s.destroyWebsocket), defaultCategoryStyles.scripting),
    ["WebSocketSend"]: new TimelineRecordStyle(i18nString$d(UIStrings$s.wsMessageSent), defaultCategoryStyles.scripting),
    ["WebSocketReceive"]: new TimelineRecordStyle(i18nString$d(UIStrings$s.wsMessageReceived), defaultCategoryStyles.scripting),
    ["EmbedderCallback"]: new TimelineRecordStyle(i18nString$d(UIStrings$s.embedderCallback), defaultCategoryStyles.scripting),
    ["Decode Image"]: new TimelineRecordStyle(i18nString$d(UIStrings$s.imageDecode), defaultCategoryStyles.painting),
    ["GPUTask"]: new TimelineRecordStyle(i18nString$d(UIStrings$s.gpu), defaultCategoryStyles.gpu),
    ["BlinkGC.AtomicPhase"]: new TimelineRecordStyle(i18nString$d(UIStrings$s.domGc), defaultCategoryStyles.scripting),
    ["DoEncrypt"]: new TimelineRecordStyle(i18nString$d(UIStrings$s.encrypt), defaultCategoryStyles.scripting),
    ["DoEncryptReply"]: new TimelineRecordStyle(i18nString$d(UIStrings$s.encryptReply), defaultCategoryStyles.scripting),
    ["DoDecrypt"]: new TimelineRecordStyle(i18nString$d(UIStrings$s.decrypt), defaultCategoryStyles.scripting),
    ["DoDecryptReply"]: new TimelineRecordStyle(i18nString$d(UIStrings$s.decryptReply), defaultCategoryStyles.scripting),
    ["DoDigest"]: new TimelineRecordStyle(i18nString$d(UIStrings$s.digest), defaultCategoryStyles.scripting),
    ["DoDigestReply"]: new TimelineRecordStyle(i18nString$d(UIStrings$s.digestReply), defaultCategoryStyles.scripting),
    ["DoSign"]: new TimelineRecordStyle(i18nString$d(UIStrings$s.sign), defaultCategoryStyles.scripting),
    ["DoSignReply"]: new TimelineRecordStyle(i18nString$d(UIStrings$s.signReply), defaultCategoryStyles.scripting),
    ["DoVerify"]: new TimelineRecordStyle(i18nString$d(UIStrings$s.verify), defaultCategoryStyles.scripting),
    ["DoVerifyReply"]: new TimelineRecordStyle(i18nString$d(UIStrings$s.verifyReply), defaultCategoryStyles.scripting),
    ["AsyncTask"]: new TimelineRecordStyle(i18nString$d(UIStrings$s.asyncTask), defaultCategoryStyles.async),
    ["LayoutShift"]: new TimelineRecordStyle(
      i18nString$d(UIStrings$s.layoutShift),
      defaultCategoryStyles.experience,
      true
    ),
    ["SyntheticLayoutShift"]: new TimelineRecordStyle(i18nString$d(UIStrings$s.layoutShift), defaultCategoryStyles.experience),
    ["SyntheticLayoutShiftCluster"]: new TimelineRecordStyle(i18nString$d(UIStrings$s.layoutShiftCluster), defaultCategoryStyles.experience),
    ["EventTiming"]: new TimelineRecordStyle(i18nString$d(UIStrings$s.eventTiming), defaultCategoryStyles.experience),
    ["HandlePostMessage"]: new TimelineRecordStyle(i18nString$d(UIStrings$s.onMessage), defaultCategoryStyles.messaging),
    ["SchedulePostMessage"]: new TimelineRecordStyle(i18nString$d(UIStrings$s.schedulePostMessage), defaultCategoryStyles.messaging),
    ["SchedulePostTaskCallback"]: new TimelineRecordStyle(i18nString$d(UIStrings$s.schedulePostTaskCallback), defaultCategoryStyles.scripting),
    ["RunPostTaskCallback"]: new TimelineRecordStyle(i18nString$d(UIStrings$s.runPostTaskCallback), defaultCategoryStyles.scripting),
    ["AbortPostTaskCallback"]: new TimelineRecordStyle(i18nString$d(UIStrings$s.abortPostTaskCallback), defaultCategoryStyles.scripting),
    ["V8Console::runTask"]: new TimelineRecordStyle(i18nString$d(UIStrings$s.consoleTaskRun), defaultCategoryStyles.scripting)
  };
  const visibleEventStyles = Object.entries(eventStylesMap).filter(([, style]) => style.hidden === false).map(([key]) => key);
  const visibleTraceEventsComplete = visibleEventStyles.every((eventType) => {
    return VISIBLE_TRACE_EVENT_TYPES2.has(eventType);
  });
  const eventStylesMapKeys = Object.keys(eventStylesMap);
  const eventStylesComplete = Array.from(VISIBLE_TRACE_EVENT_TYPES2).every((eventType) => {
    return eventStylesMapKeys.includes(eventType);
  });
  if (!visibleTraceEventsComplete || !eventStylesComplete) {
    throw new Error("eventStylesMap and VISIBLE_TRACE_EVENT_TYPES are out of sync!");
  }
  return eventStylesMap;
}
function setEventStylesMap(eventStyles) {
  eventStylesMap = eventStyles;
}
function setCategories(cats) {
  categoryStyles = cats;
}
function visibleTypes() {
  const eventStyles = maybeInitSylesMap();
  const result = [];
  for (const name in eventStyles) {
    const nameAsKey = name;
    if (!eventStyles[nameAsKey]?.hidden) {
      result.push(name);
    }
  }
  return result;
}
function getTimelineMainEventCategories() {
  if (mainEventCategories) {
    return mainEventCategories;
  }
  mainEventCategories = [
    EventCategory2.IDLE,
    EventCategory2.LOADING,
    EventCategory2.PAINTING,
    EventCategory2.RENDERING,
    EventCategory2.SCRIPTING,
    EventCategory2.OTHER
  ];
  return mainEventCategories;
}
function setTimelineMainEventCategories(categories) {
  mainEventCategories = categories;
}
function markerDetailsForEvent(event) {
  let title2 = "";
  let color = "var(--color-text-primary)";
  if (isFirstContentfulPaint2(event)) {
    color = "var(--sys-color-green-bright)";
    title2 = "FCP";
  }
  if (isAnyLargestContentfulPaintCandidate(event)) {
    color = "var(--sys-color-green)";
    title2 = isSoftLargestContentfulPaintCandidate(event) ? "LCP*" : "LCP";
  }
  if (isNavigationStart2(event) || isSoftNavigationStart(event)) {
    color = "var(--color-text-primary)";
    title2 = isSoftNavigationStart(event) ? "Nav*" : "Nav";
  }
  if (isMarkDOMContent2(event)) {
    color = "var(--color-text-disabled)";
    title2 = "DCL";
  }
  if (isMarkLoad2(event)) {
    color = "var(--color-text-disabled)";
    title2 = "L";
  }
  return { color, title: title2 };
}
function forEntry(entry, parsedTrace) {
  if (isProfileCall2(entry)) {
    if (parsedTrace) {
      const potentialCallName = getProfileCallFunctionName2(parsedTrace.data.Samples, entry);
      if (potentialCallName) {
        return potentialCallName;
      }
    }
    return entry.callFrame.functionName || i18nString$c(UIStrings$r.anonymous);
  }
  if (isLegacyTimelineFrame2(entry)) {
    return lockedString(UIStrings$r.frame);
  }
  if (isDispatch2(entry)) {
    return i18nString$c(UIStrings$r.eventDispatchS, { PH1: entry.args.data.type });
  }
  if (isSyntheticNetworkRequest2(entry)) {
    const parsedURL = new ParsedURL2(entry.args.data.url);
    const text = parsedURL.isValid ? `${parsedURL.displayName} (${parsedURL.host})` : entry.args.data.url || "Network request";
    return text;
  }
  if (isWebSocketCreate2(entry)) {
    if (entry.args.data.url) {
      return i18nString$c(UIStrings$r.wsConnectionOpenedWithUrl, { PH1: entry.args.data.url });
    }
    return i18nString$c(UIStrings$r.wsConnectionOpened);
  }
  if (isWebSocketDestroy2(entry)) {
    return i18nString$c(UIStrings$r.wsConnectionClosed);
  }
  if (isSyntheticInteraction2(entry)) {
    return nameForInteractionEvent(entry);
  }
  if (isSyntheticLayoutShift2(entry)) {
    return i18nString$c(UIStrings$r.layoutShift);
  }
  if (isSyntheticAnimation2(entry) && entry.args.data.beginEvent.args.data.displayName) {
    return entry.args.data.beginEvent.args.data.displayName;
  }
  const eventStyleCustomName = getEventStyle(entry.name)?.title;
  return eventStyleCustomName || entry.name;
}
function nameForInteractionEvent(event) {
  const category = categoryOfInteraction2(event);
  if (category === "OTHER") {
    return "Other";
  }
  if (category === "KEYBOARD") {
    return "Keyboard";
  }
  if (category === "POINTER") {
    return "Pointer";
  }
  return event.type;
}
async function getTextFor(contentProvider) {
  const contentData = await contentProvider.requestContentData();
  if (ContentData.isError(contentData) || !contentData.isTextContent) {
    return null;
  }
  return contentData.textObj;
}
async function getFunctionNameFromScopeStart(script, lineNumber, columnNumber) {
  const sourceMap2 = script.sourceMap();
  if (!sourceMap2) {
    return null;
  }
  const scopeName = sourceMap2.findOriginalFunctionName({ line: lineNumber, column: columnNumber });
  if (scopeName !== null) {
    return scopeName;
  }
  const mappingEntry = sourceMap2.findEntry(lineNumber, columnNumber);
  if (!mappingEntry?.sourceURL) {
    return null;
  }
  const name = mappingEntry.name;
  if (!name) {
    return null;
  }
  const text = await getTextFor(script);
  if (!text) {
    return null;
  }
  const openRange = new TextRange(lineNumber, columnNumber, lineNumber, columnNumber + 1);
  if (text.extract(openRange) !== "(") {
    return null;
  }
  return name;
}
async function resolveProfileFrameFunctionName({ scriptId, lineNumber, columnNumber }, target) {
  if (!target || lineNumber === void 0 || columnNumber === void 0 || scriptId === void 0) {
    return null;
  }
  const debuggerModel = target.model(DebuggerModel);
  const script = debuggerModel?.scriptForId(String(scriptId));
  if (!debuggerModel || !script) {
    return null;
  }
  const debuggerWorkspaceBinding = DebuggerWorkspaceBinding.instance();
  const location = new Location$1(debuggerModel, scriptId, lineNumber, columnNumber);
  const functionInfoFromPlugin = await debuggerWorkspaceBinding.pluginManager.getFunctionInfo(script, location);
  if (functionInfoFromPlugin && "frames" in functionInfoFromPlugin) {
    const last2 = functionInfoFromPlugin.frames.at(-1);
    if (last2?.name) {
      return last2.name;
    }
  }
  return await getFunctionNameFromScopeStart(script, lineNumber, columnNumber);
}
function depthFirstWalk(nodes, callback) {
  for (const node2 of nodes) {
    if (callback?.(node2)) {
      break;
    }
    depthFirstWalk(node2.children().values(), callback);
  }
}
function calculateRequestTimeRanges(request3, navigationStart) {
  const result = [];
  function addRange(name, start, end) {
    if (start < Number.MAX_VALUE && start <= end) {
      result.push({ name, start, end });
    }
  }
  function firstPositive(numbers) {
    for (let i = 0; i < numbers.length; ++i) {
      if (numbers[i] > 0) {
        return numbers[i];
      }
    }
    return void 0;
  }
  function addOffsetRange(name, start, end) {
    if (start >= 0 && end >= 0) {
      addRange(name, startTime + start / 1e3, startTime + end / 1e3);
    }
  }
  function addMaybeNegativeOffsetRange(name, start, end) {
    addRange(name, startTime + start / 1e3, startTime + end / 1e3);
  }
  const timing = request3.timing;
  if (!timing) {
    const start = request3.issueTime() !== -1 ? request3.issueTime() : request3.startTime !== -1 ? request3.startTime : 0;
    const hasDifferentIssueAndStartTime = request3.issueTime() !== -1 && request3.startTime !== -1 && request3.issueTime() !== request3.startTime;
    const middle = request3.responseReceivedTime === -1 ? hasDifferentIssueAndStartTime ? request3.startTime : Number.MAX_VALUE : request3.responseReceivedTime;
    const end = request3.endTime === -1 ? Number.MAX_VALUE : request3.endTime;
    addRange("total", start, end);
    addRange("blocking", start, middle);
    const state = request3.responseReceivedTime === -1 ? "connecting" : "receiving";
    addRange(state, middle, end);
    return result;
  }
  const issueTime = request3.issueTime();
  const startTime = timing.requestTime;
  const endTime = firstPositive([request3.endTime, request3.responseReceivedTime]) || startTime;
  addRange("total", issueTime < startTime ? issueTime : startTime, endTime);
  if (timing.pushStart) {
    const pushEnd = timing.pushEnd || endTime;
    if (pushEnd > navigationStart) {
      addRange("push", Math.max(timing.pushStart, navigationStart), pushEnd);
    }
  }
  if (issueTime < startTime) {
    addRange("queueing", issueTime, startTime);
  }
  const responseReceived = (request3.responseReceivedTime - startTime) * 1e3;
  if (request3.fetchedViaServiceWorker) {
    addOffsetRange("blocking", 0, timing.workerStart);
    addOffsetRange("serviceworker-preparation", timing.workerStart, timing.workerReady);
    addOffsetRange("serviceworker-respondwith", timing.workerFetchStart, timing.workerRespondWithSettled);
    addOffsetRange("serviceworker", timing.workerReady, timing.sendEnd);
    addOffsetRange("waiting", timing.sendEnd, responseReceived);
  } else if (!timing.pushStart) {
    const blockingEnd = firstPositive([timing.dnsStart, timing.connectStart, timing.sendStart, responseReceived]) || 0;
    addOffsetRange("blocking", 0, blockingEnd);
    addOffsetRange("proxy", timing.proxyStart, timing.proxyEnd);
    addOffsetRange("dns", timing.dnsStart, timing.dnsEnd);
    addOffsetRange("connecting", timing.connectStart, timing.connectEnd);
    addOffsetRange("ssl", timing.sslStart, timing.sslEnd);
    addOffsetRange("sending", timing.sendStart, timing.sendEnd);
    addOffsetRange("waiting", Math.max(timing.sendEnd, timing.connectEnd, timing.dnsEnd, timing.proxyEnd, blockingEnd), responseReceived);
  }
  const { serviceWorkerRouterInfo } = request3;
  if (serviceWorkerRouterInfo) {
    if (timing.workerRouterEvaluationStart) {
      let routerEvaluationEnd = timing.sendStart;
      if (serviceWorkerRouterInfo?.matchedSourceType === "cache" && timing.workerCacheLookupStart) {
        routerEvaluationEnd = timing.workerCacheLookupStart;
      } else if (serviceWorkerRouterInfo?.actualSourceType === "fetch-event") {
        routerEvaluationEnd = timing.workerStart;
      }
      addMaybeNegativeOffsetRange("serviceworker-routerevaluation", timing.workerRouterEvaluationStart, routerEvaluationEnd);
    }
    if (timing.workerCacheLookupStart) {
      let cacheLookupEnd = timing.sendStart;
      if (serviceWorkerRouterInfo?.actualSourceType === "cache") {
        cacheLookupEnd = timing.receiveHeadersStart;
      }
      addMaybeNegativeOffsetRange("serviceworker-cachelookup", timing.workerCacheLookupStart, cacheLookupEnd);
    }
  }
  if (request3.endTime !== -1) {
    addRange(timing.pushStart ? "receiving-push" : "receiving", request3.responseReceivedTime, endTime);
  }
  return result;
}
function numberIsTooLarge(x) {
  return !Number.isFinite(x) || x === Number.MAX_VALUE;
}
function seconds(x) {
  if (numberIsTooLarge(x)) {
    return "-";
  }
  if (x === 0) {
    return formatAndEnsureSpace(timeFormatters.second, x);
  }
  const asMilli = x * 1e3;
  if (asMilli < 1) {
    return micros(x * 1e6);
  }
  if (asMilli < 1e3) {
    return millis(asMilli);
  }
  return formatAndEnsureSpace(timeFormatters.second, x);
}
function millis(x) {
  if (numberIsTooLarge(x)) {
    return "-";
  }
  if (x < 1) {
    return formatAndEnsureSpace(timeFormatters.milliWithPrecision, x);
  }
  return formatAndEnsureSpace(timeFormatters.milli, x);
}
function micros(x) {
  if (numberIsTooLarge(x)) {
    return "-";
  }
  if (x < 100) {
    return formatAndEnsureSpace(timeFormatters.micro, x);
  }
  const asMilli = x / 1e3;
  return millis(asMilli);
}
function bytes(x) {
  if (x < 1e3) {
    return formatAndEnsureSpace(byteFormatters.bytes, x);
  }
  const kilobytes = x / 1e3;
  if (kilobytes < 1e3) {
    return formatAndEnsureSpace(byteFormatters.kilobytes, kilobytes);
  }
  const megabytes = kilobytes / 1e3;
  return formatAndEnsureSpace(byteFormatters.megabytes, megabytes);
}
function formatAndEnsureSpace(formatter2, value, separator = "\xA0") {
  const parts = formatter2.formatToParts(value);
  let hasSpace = false;
  for (const part of parts) {
    if (part.type === "literal") {
      if (part.value === " ") {
        hasSpace = true;
        part.value = separator;
      } else if (part.value === separator) {
        hasSpace = true;
      }
    }
  }
  if (hasSpace) {
    return parts.map((part) => part.value).join("");
  }
  const unitIndex = parts.findIndex((part) => part.type === "unit");
  if (unitIndex === -1) {
    return parts.map((part) => part.value).join("");
  }
  if (unitIndex === 0) {
    return parts[0].value + separator + parts.slice(1).map((part) => part.value).join("");
  }
  return parts.slice(0, unitIndex).map((part) => part.value).join("") + separator + parts.slice(unitIndex).map((part) => part.value).join("");
}
function sanitizeHeaders(headers) {
  return headers.map((header) => {
    if (NetworkRequestFormatter.allowHeader(header.name)) {
      return header;
    }
    return { name: header.name, value: "<redacted>" };
  });
}
function formatLines(title2, lines, maxLength) {
  let result = "";
  for (const line of lines) {
    if (result.length + line.length > maxLength) {
      break;
    }
    result += line;
  }
  result = result.trim();
  return result && title2 ? title2 + "\n" + result : result;
}
function getLCPData(parsedTrace, frameId, navigation2) {
  const navMetrics = parsedTrace.data.PageLoadMetrics.metricScoresByFrameId.get(frameId)?.get(navigation2);
  if (!navMetrics) {
    return null;
  }
  const metric = navMetrics.get("LCP");
  if (!metric || !metricIsLCP2(metric)) {
    return null;
  }
  const lcpEvent = metric?.event;
  if (!lcpEvent || !isAnyLargestContentfulPaintCandidate(lcpEvent)) {
    return null;
  }
  const navigationId = navigation2.args.data?.navigationId;
  return {
    lcpEvent,
    lcpRequest: navigationId ? parsedTrace.data.LargestImagePaint.lcpRequestByNavigationId.get(navigationId) : void 0,
    metricScore: metric
  };
}
function getPrimaryInsightSet(insights2) {
  const insightSets = Array.from(insights2.values());
  if (insightSets.length === 0) {
    return null;
  }
  if (insightSets.length === 1) {
    return insightSets[0];
  }
  return insightSets.filter((set) => set.navigation).at(0) ?? insightSets.at(0) ?? null;
}
function unionIssueKind(a, b) {
  if (a === "PageError" || b === "PageError") {
    return "PageError";
  }
  if (a === "BreakingChange" || b === "BreakingChange") {
    return "BreakingChange";
  }
  return "Improvement";
}
function toZeroBasedLocation(location) {
  if (!location) {
    return void 0;
  }
  return {
    url: location.url,
    scriptId: location.scriptId,
    lineNumber: location.lineNumber,
    columnNumber: location.columnNumber === 0 ? void 0 : location.columnNumber - 1
  };
}
function getIssueCode$2(details) {
  switch (details.violationType) {
    case "PermissionPolicyDisabled":
      return "AttributionReportingIssue::PermissionPolicyDisabled";
    case "UntrustworthyReportingOrigin":
      return "AttributionReportingIssue::UntrustworthyReportingOrigin";
    case "InsecureContext":
      return "AttributionReportingIssue::InsecureContext";
    case "InvalidHeader":
      return "AttributionReportingIssue::InvalidRegisterSourceHeader";
    case "InvalidRegisterTriggerHeader":
      return "AttributionReportingIssue::InvalidRegisterTriggerHeader";
    case "SourceAndTriggerHeaders":
      return "AttributionReportingIssue::SourceAndTriggerHeaders";
    case "SourceIgnored":
      return "AttributionReportingIssue::SourceIgnored";
    case "TriggerIgnored":
      return "AttributionReportingIssue::TriggerIgnored";
    case "OsSourceIgnored":
      return "AttributionReportingIssue::OsSourceIgnored";
    case "OsTriggerIgnored":
      return "AttributionReportingIssue::OsTriggerIgnored";
    case "InvalidRegisterOsSourceHeader":
      return "AttributionReportingIssue::InvalidRegisterOsSourceHeader";
    case "InvalidRegisterOsTriggerHeader":
      return "AttributionReportingIssue::InvalidRegisterOsTriggerHeader";
    case "WebAndOsHeaders":
      return "AttributionReportingIssue::WebAndOsHeaders";
    case "NoWebOrOsSupport":
      return "AttributionReportingIssue::NoWebOrOsSupport";
    case "NavigationRegistrationWithoutTransientUserActivation":
      return "AttributionReportingIssue::NavigationRegistrationWithoutTransientUserActivation";
    case "InvalidInfoHeader":
      return "AttributionReportingIssue::InvalidInfoHeader";
    case "NoRegisterSourceHeader":
      return "AttributionReportingIssue::NoRegisterSourceHeader";
    case "NoRegisterTriggerHeader":
      return "AttributionReportingIssue::NoRegisterTriggerHeader";
    case "NoRegisterOsSourceHeader":
      return "AttributionReportingIssue::NoRegisterOsSourceHeader";
    case "NoRegisterOsTriggerHeader":
      return "AttributionReportingIssue::NoRegisterOsTriggerHeader";
    case "NavigationRegistrationUniqueScopeAlreadySet":
      return "AttributionReportingIssue::NavigationRegistrationUniqueScopeAlreadySet";
    default:
      return "AttributionReportingIssue::Unknown";
  }
}
function _getDefaults() {
  return {
    async: false,
    breaks: false,
    extensions: null,
    gfm: true,
    hooks: null,
    pedantic: false,
    renderer: null,
    silent: false,
    tokenizer: null,
    walkTokens: null
  };
}
function changeDefaults(newDefaults) {
  _defaults = newDefaults;
}
function escape$1(html2, encode2) {
  if (encode2) {
    if (escapeTest.test(html2)) {
      return html2.replace(escapeReplace, getEscapeReplacement);
    }
  } else {
    if (escapeTestNoEncode.test(html2)) {
      return html2.replace(escapeReplaceNoEncode, getEscapeReplacement);
    }
  }
  return html2;
}
function unescape$1(html2) {
  return html2.replace(unescapeTest, (_, n) => {
    n = n.toLowerCase();
    if (n === "colon")
      return ":";
    if (n.charAt(0) === "#") {
      return n.charAt(1) === "x" ? String.fromCharCode(parseInt(n.substring(2), 16)) : String.fromCharCode(+n.substring(1));
    }
    return "";
  });
}
function edit(regex2, opt) {
  let source2 = typeof regex2 === "string" ? regex2 : regex2.source;
  opt = opt || "";
  const obj = {
    replace: (name, val) => {
      let valSource = typeof val === "string" ? val : val.source;
      valSource = valSource.replace(caret, "$1");
      source2 = source2.replace(name, valSource);
      return obj;
    },
    getRegex: () => {
      return new RegExp(source2, opt);
    }
  };
  return obj;
}
function cleanUrl(href) {
  try {
    href = encodeURI(href).replace(/%25/g, "%");
  } catch (e) {
    return null;
  }
  return href;
}
function splitCells(tableRow, count) {
  const row = tableRow.replace(/\|/g, (match, offset, str) => {
    let escaped = false;
    let curr = offset;
    while (--curr >= 0 && str[curr] === "\\")
      escaped = !escaped;
    if (escaped) {
      return "|";
    } else {
      return " |";
    }
  }), cells = row.split(/ \|/);
  let i = 0;
  if (!cells[0].trim()) {
    cells.shift();
  }
  if (cells.length > 0 && !cells[cells.length - 1].trim()) {
    cells.pop();
  }
  if (count) {
    if (cells.length > count) {
      cells.splice(count);
    } else {
      while (cells.length < count)
        cells.push("");
    }
  }
  for (; i < cells.length; i++) {
    cells[i] = cells[i].trim().replace(/\\\|/g, "|");
  }
  return cells;
}
function rtrim(str, c, invert) {
  const l = str.length;
  if (l === 0) {
    return "";
  }
  let suffLen = 0;
  while (suffLen < l) {
    const currChar = str.charAt(l - suffLen - 1);
    if (currChar === c && true) {
      suffLen++;
    } else {
      break;
    }
  }
  return str.slice(0, l - suffLen);
}
function findClosingBracket(str, b) {
  if (str.indexOf(b[1]) === -1) {
    return -1;
  }
  let level = 0;
  for (let i = 0; i < str.length; i++) {
    if (str[i] === "\\") {
      i++;
    } else if (str[i] === b[0]) {
      level++;
    } else if (str[i] === b[1]) {
      level--;
      if (level < 0) {
        return i;
      }
    }
  }
  return -1;
}
function outputLink(cap, link2, raw, lexer2) {
  const href = link2.href;
  const title2 = link2.title ? escape$1(link2.title) : null;
  const text = cap[1].replace(/\\([\[\]])/g, "$1");
  if (cap[0].charAt(0) !== "!") {
    lexer2.state.inLink = true;
    const token = {
      type: "link",
      raw,
      href,
      title: title2,
      text,
      tokens: lexer2.inlineTokens(text)
    };
    lexer2.state.inLink = false;
    return token;
  }
  return {
    type: "image",
    raw,
    href,
    title: title2,
    text: escape$1(text)
  };
}
function indentCodeCompensation(raw, text) {
  const matchIndentToCode = raw.match(/^(\s+)(?:```)/);
  if (matchIndentToCode === null) {
    return text;
  }
  const indentToCode = matchIndentToCode[1];
  return text.split("\n").map((node2) => {
    const matchIndentInNode = node2.match(/^\s+/);
    if (matchIndentInNode === null) {
      return node2;
    }
    const [indentInNode] = matchIndentInNode;
    if (indentInNode.length >= indentToCode.length) {
      return node2.slice(indentToCode.length);
    }
    return node2;
  }).join("\n");
}
function marked$1(src2, opt) {
  return markedInstance.parse(src2, opt);
}
function resolveLazyDescription(lazyDescription) {
  function linksMap(currentLink) {
    return { link: currentLink.link, linkTitle: currentLink.linkTitle() };
  }
  const substitutionMap = /* @__PURE__ */ new Map();
  lazyDescription.substitutions?.forEach((value, key) => {
    substitutionMap.set(key, value());
  });
  const description2 = {
    file: lazyDescription.file,
    links: lazyDescription.links.map(linksMap),
    substitutions: substitutionMap
  };
  return description2;
}
async function getFileContent(url) {
  try {
    const response = await fetch(url.toString());
    return await response.text();
  } catch {
    throw new Error(`Markdown file ${url.toString()} not found. Make sure it is correctly listed in the relevant BUILD.gn files.`);
  }
}
async function getMarkdownFileContent(filename) {
  return await getFileContent(new URL(`descriptions/${filename}`, import.meta.url));
}
async function createIssueDescriptionFromMarkdown(description2) {
  const rawMarkdown = await getMarkdownFileContent(description2.file);
  const rawMarkdownWithPlaceholdersReplaced = substitutePlaceholders(rawMarkdown, description2.substitutions);
  return createIssueDescriptionFromRawMarkdown(rawMarkdownWithPlaceholdersReplaced, description2);
}
function createIssueDescriptionFromRawMarkdown(markdown, description2) {
  const markdownAst = lexer(markdown);
  const title2 = findTitleFromMarkdownAst(markdownAst);
  if (!title2) {
    throw new Error("Markdown issue descriptions must start with a heading");
  }
  return {
    title: title2,
    markdown: markdownAst.slice(1),
    links: description2.links
  };
}
function substitutePlaceholders(markdown, substitutions) {
  const unusedPlaceholders = new Set(substitutions ? substitutions.keys() : []);
  validatePlaceholders(unusedPlaceholders);
  const result = markdown.replace(validPlaceholderMatchPattern, (_, placeholder) => {
    const replacement = substitutions ? substitutions.get(placeholder) : void 0;
    if (replacement === void 0) {
      throw new Error(`No replacement provided for placeholder '${placeholder}'.`);
    }
    unusedPlaceholders.delete(placeholder);
    return replacement;
  });
  if (unusedPlaceholders.size > 0) {
    throw new Error(`Unused replacements provided: ${[...unusedPlaceholders]}`);
  }
  return result;
}
function validatePlaceholders(placeholders) {
  const invalidPlaceholders = [...placeholders].filter((placeholder) => !validPlaceholderNamePattern.test(placeholder));
  if (invalidPlaceholders.length > 0) {
    throw new Error(`Invalid placeholders provided in the substitutions map: ${invalidPlaceholders}`);
  }
}
function findTitleFromMarkdownAst(markdownAst) {
  if (markdownAst.length === 0 || markdownAst[0].type !== "heading" || markdownAst[0].depth !== 1) {
    return null;
  }
  return markdownAst[0].text;
}
async function getIssueTitleFromMarkdownDescription(description2) {
  const rawMarkdown = await getMarkdownFileContent(description2.file);
  const markdownAst = lexer(rawMarkdown);
  return findTitleFromMarkdownAst(markdownAst);
}
function isCausedByThirdParty(outermostFrame, cookieUrl, siteForCookies) {
  if (!outermostFrame) {
    return true;
  }
  if (!siteForCookies) {
    return true;
  }
  if (!cookieUrl || outermostFrame.domainAndRegistry() === "") {
    return false;
  }
  const parsedCookieUrl = ParsedURL2.fromString(cookieUrl);
  if (!parsedCookieUrl) {
    return false;
  }
  return !isSubdomainOf(parsedCookieUrl.domain(), outermostFrame.domainAndRegistry());
}
function isSubdomainOf(subdomain, superdomain) {
  if (subdomain.length <= superdomain.length) {
    return subdomain === superdomain;
  }
  if (!subdomain.endsWith(superdomain)) {
    return false;
  }
  const subdomainWithoutSuperdomian = subdomain.substr(0, subdomain.length - superdomain.length);
  return subdomainWithoutSuperdomian.endsWith(".");
}
function schemefulSameSiteSubstitutions({ isDestinationSecure, isOriginSecure }) {
  return /* @__PURE__ */ new Map([
    ["PLACEHOLDER_destination", () => isDestinationSecure ? "a secure" : "an insecure"],
    ["PLACEHOLDER_origin", () => isOriginSecure ? "a secure" : "an insecure"]
  ]);
}
function sameSiteWarnStrictLaxDowngradeStrict(isSecure) {
  return {
    file: "SameSiteWarnStrictLaxDowngradeStrict.md",
    substitutions: schemefulSameSiteSubstitutions({ isDestinationSecure: isSecure, isOriginSecure: !isSecure }),
    links: schemefulSameSiteArticles
  };
}
function sameSiteExcludeNavigationContextDowngrade(isSecure) {
  return {
    file: "SameSiteExcludeNavigationContextDowngrade.md",
    substitutions: schemefulSameSiteSubstitutions({ isDestinationSecure: isSecure, isOriginSecure: !isSecure }),
    links: schemefulSameSiteArticles
  };
}
function sameSiteWarnCrossDowngradeRead(isSecure) {
  return {
    file: "SameSiteWarnCrossDowngradeRead.md",
    substitutions: schemefulSameSiteSubstitutions({ isDestinationSecure: isSecure, isOriginSecure: !isSecure }),
    links: schemefulSameSiteArticles
  };
}
function sameSiteExcludeContextDowngradeRead(isSecure) {
  return {
    file: "SameSiteExcludeContextDowngradeRead.md",
    substitutions: schemefulSameSiteSubstitutions({ isDestinationSecure: isSecure, isOriginSecure: !isSecure }),
    links: schemefulSameSiteArticles
  };
}
function sameSiteWarnCrossDowngradeSet(isSecure) {
  return {
    file: "SameSiteWarnCrossDowngradeSet.md",
    substitutions: schemefulSameSiteSubstitutions({ isDestinationSecure: !isSecure, isOriginSecure: isSecure }),
    links: schemefulSameSiteArticles
  };
}
function sameSiteExcludeContextDowngradeSet(isSecure) {
  return {
    file: "SameSiteExcludeContextDowngradeSet.md",
    substitutions: schemefulSameSiteSubstitutions({ isDestinationSecure: isSecure, isOriginSecure: !isSecure }),
    links: schemefulSameSiteArticles
  };
}
function getIssueCode$1(details) {
  switch (details.corsErrorStatus.corsError) {
    case "InvalidAllowMethodsPreflightResponse":
    case "InvalidAllowHeadersPreflightResponse":
    case "PreflightMissingAllowOriginHeader":
    case "PreflightMultipleAllowOriginValues":
    case "PreflightInvalidAllowOriginValue":
    case "MissingAllowOriginHeader":
    case "MultipleAllowOriginValues":
    case "InvalidAllowOriginValue":
      return "CorsIssue::InvalidHeaders";
    case "PreflightWildcardOriginNotAllowed":
    case "WildcardOriginNotAllowed":
      return "CorsIssue::WildcardOriginWithCredentials";
    case "PreflightInvalidStatus":
    case "PreflightDisallowedRedirect":
    case "InvalidResponse":
      return "CorsIssue::PreflightResponseInvalid";
    case "AllowOriginMismatch":
    case "PreflightAllowOriginMismatch":
      return "CorsIssue::OriginMismatch";
    case "InvalidAllowCredentials":
    case "PreflightInvalidAllowCredentials":
      return "CorsIssue::AllowCredentialsRequired";
    case "MethodDisallowedByPreflightResponse":
      return "CorsIssue::MethodDisallowedByPreflightResponse";
    case "HeaderDisallowedByPreflightResponse":
      return "CorsIssue::HeaderDisallowedByPreflightResponse";
    case "RedirectContainsCredentials":
      return "CorsIssue::RedirectContainsCredentials";
    case "DisallowedByMode":
      return "CorsIssue::DisallowedByMode";
    case "CorsDisabledScheme":
      return "CorsIssue::CorsDisabledScheme";
    case "PreflightMissingAllowExternal":
      return "CorsIssue::PreflightMissingAllowExternal";
    case "PreflightInvalidAllowExternal":
      return "CorsIssue::PreflightInvalidAllowExternal";
    case "InsecureLocalNetwork":
      return "CorsIssue::InsecureLocalNetwork";
    case "NoCorsRedirectModeNotFollow":
      return "CorsIssue::NoCorsRedirectModeNotFollow";
    case "InvalidLocalNetworkAccess":
      return "CorsIssue::InvalidLocalNetworkAccess";
    case "LocalNetworkAccessPermissionDenied":
      return "CorsIssue::LocalNetworkAccessPermissionDenied";
  }
}
function isCrossOriginEmbedderPolicyIssue(reason) {
  switch (reason) {
    case "CoepFrameResourceNeedsCoepHeader":
      return true;
    case "CoopSandboxedIFrameCannotNavigateToCoopPage":
      return true;
    case "CorpNotSameOrigin":
      return true;
    case "CorpNotSameOriginAfterDefaultedToSameOriginByCoep":
      return true;
    case "CorpNotSameSite":
      return true;
  }
  return false;
}
function getIssueCode(details) {
  switch (details.sharedDictionaryError) {
    case "UseErrorCrossOriginNoCorsRequest":
      return "SharedDictionaryIssue::UseErrorCrossOriginNoCorsRequest";
    case "UseErrorDictionaryLoadFailure":
      return "SharedDictionaryIssue::UseErrorDictionaryLoadFailure";
    case "UseErrorMatchingDictionaryNotUsed":
      return "SharedDictionaryIssue::UseErrorMatchingDictionaryNotUsed";
    case "UseErrorUnexpectedContentDictionaryHeader":
      return "SharedDictionaryIssue::UseErrorUnexpectedContentDictionaryHeader";
    case "WriteErrorCossOriginNoCorsRequest":
      return "SharedDictionaryIssue::WriteErrorCossOriginNoCorsRequest";
    case "WriteErrorDisallowedBySettings":
      return "SharedDictionaryIssue::WriteErrorDisallowedBySettings";
    case "WriteErrorExpiredResponse":
      return "SharedDictionaryIssue::WriteErrorExpiredResponse";
    case "WriteErrorFeatureDisabled":
      return "SharedDictionaryIssue::WriteErrorFeatureDisabled";
    case "WriteErrorInsufficientResources":
      return "SharedDictionaryIssue::WriteErrorInsufficientResources";
    case "WriteErrorInvalidMatchField":
      return "SharedDictionaryIssue::WriteErrorInvalidMatchField";
    case "WriteErrorInvalidStructuredHeader":
      return "SharedDictionaryIssue::WriteErrorInvalidStructuredHeader";
    case "WriteErrorInvalidTTLField":
      return "SharedDictionaryIssue::WriteErrorInvalidTTLField";
    case "WriteErrorNavigationRequest":
      return "SharedDictionaryIssue::WriteErrorNavigationRequest";
    case "WriteErrorNoMatchField":
      return "SharedDictionaryIssue::WriteErrorNoMatchField";
    case "WriteErrorNonIntegerTTLField":
      return "SharedDictionaryIssue::WriteErrorNonIntegerTTLField";
    case "WriteErrorNonListMatchDestField":
      return "SharedDictionaryIssue::WriteErrorNonListMatchDestField";
    case "WriteErrorNonSecureContext":
      return "SharedDictionaryIssue::WriteErrorNonSecureContext";
    case "WriteErrorNonStringIdField":
      return "SharedDictionaryIssue::WriteErrorNonStringIdField";
    case "WriteErrorNonStringInMatchDestList":
      return "SharedDictionaryIssue::WriteErrorNonStringInMatchDestList";
    case "WriteErrorNonStringMatchField":
      return "SharedDictionaryIssue::WriteErrorNonStringMatchField";
    case "WriteErrorNonTokenTypeField":
      return "SharedDictionaryIssue::WriteErrorNonTokenTypeField";
    case "WriteErrorRequestAborted":
      return "SharedDictionaryIssue::WriteErrorRequestAborted";
    case "WriteErrorShuttingDown":
      return "SharedDictionaryIssue::WriteErrorShuttingDown";
    case "WriteErrorTooLongIdField":
      return "SharedDictionaryIssue::WriteErrorTooLongIdField";
    case "WriteErrorUnsupportedType":
      return "SharedDictionaryIssue::WriteErrorUnsupportedType";
    default:
      return "SharedDictionaryIssue::WriteErrorUnknown";
  }
}
function generateGroupingIssueCode(details) {
  const issueCode = `${"SRIMessageSignatureIssue"}::${details.error}`;
  if (details.error === "ValidationFailedSignatureMismatch") {
    return issueCode + details.signatureBase;
  }
  if (details.error === "ValidationFailedIntegrityMismatch") {
    return issueCode + details.integrityAssertions.join();
  }
  return issueCode;
}
function createIssuesForBlockedByResponseIssue(issuesModel, inspectorIssue) {
  const blockedByResponseIssueDetails = inspectorIssue.details.blockedByResponseIssueDetails;
  if (!blockedByResponseIssueDetails) {
    console.warn("BlockedByResponse issue without details received.");
    return [];
  }
  if (isCrossOriginEmbedderPolicyIssue(blockedByResponseIssueDetails.reason)) {
    return [new CrossOriginEmbedderPolicyIssue(blockedByResponseIssueDetails, issuesModel)];
  }
  return [];
}
function createIssuesFromProtocolIssue(issuesModel, inspectorIssue) {
  const handler = issueCodeHandlers.get(inspectorIssue.code);
  if (handler) {
    return handler(issuesModel, inspectorIssue);
  }
  console.warn(`No handler registered for issue code ${inspectorIssue.code}`);
  return [];
}
function defaultHideIssueByCodeSetting() {
  const setting = {};
  return setting;
}
var commonjsGlobal, es_promise_withResolvers, globalThis_1, hasRequiredGlobalThis, objectGetOwnPropertyDescriptor, fails, hasRequiredFails, descriptors, hasRequiredDescriptors, functionBindNative, hasRequiredFunctionBindNative, functionCall, hasRequiredFunctionCall, objectPropertyIsEnumerable, hasRequiredObjectPropertyIsEnumerable, createPropertyDescriptor, hasRequiredCreatePropertyDescriptor, functionUncurryThis, hasRequiredFunctionUncurryThis, classofRaw, hasRequiredClassofRaw, indexedObject, hasRequiredIndexedObject, isNullOrUndefined, hasRequiredIsNullOrUndefined, requireObjectCoercible, hasRequiredRequireObjectCoercible, toIndexedObject, hasRequiredToIndexedObject, isCallable, hasRequiredIsCallable, isObject$1, hasRequiredIsObject, getBuiltIn, hasRequiredGetBuiltIn, objectIsPrototypeOf, hasRequiredObjectIsPrototypeOf, environmentUserAgent, hasRequiredEnvironmentUserAgent, environmentV8Version, hasRequiredEnvironmentV8Version, symbolConstructorDetection, hasRequiredSymbolConstructorDetection, useSymbolAsUid, hasRequiredUseSymbolAsUid, isSymbol, hasRequiredIsSymbol, tryToString, hasRequiredTryToString, aCallable, hasRequiredACallable, getMethod, hasRequiredGetMethod, ordinaryToPrimitive, hasRequiredOrdinaryToPrimitive, sharedStore, isPure, hasRequiredIsPure, defineGlobalProperty, hasRequiredDefineGlobalProperty, hasRequiredSharedStore, shared$1, hasRequiredShared$1, toObject, hasRequiredToObject, hasOwnProperty_1, hasRequiredHasOwnProperty, uid, hasRequiredUid, wellKnownSymbol, hasRequiredWellKnownSymbol, toPrimitive, hasRequiredToPrimitive, toPropertyKey, hasRequiredToPropertyKey, documentCreateElement, hasRequiredDocumentCreateElement, ie8DomDefine, hasRequiredIe8DomDefine, hasRequiredObjectGetOwnPropertyDescriptor, objectDefineProperty, v8PrototypeDefineBug, hasRequiredV8PrototypeDefineBug, anObject, hasRequiredAnObject, hasRequiredObjectDefineProperty, createNonEnumerableProperty, hasRequiredCreateNonEnumerableProperty, makeBuiltIn, functionName, hasRequiredFunctionName, inspectSource, hasRequiredInspectSource, weakMapBasicDetection, hasRequiredWeakMapBasicDetection, sharedKey, hasRequiredSharedKey, hiddenKeys, hasRequiredHiddenKeys, internalState, hasRequiredInternalState, hasRequiredMakeBuiltIn, defineBuiltIn, hasRequiredDefineBuiltIn, objectGetOwnPropertyNames, mathTrunc, hasRequiredMathTrunc, toIntegerOrInfinity, hasRequiredToIntegerOrInfinity, toAbsoluteIndex, hasRequiredToAbsoluteIndex, toLength, hasRequiredToLength, lengthOfArrayLike, hasRequiredLengthOfArrayLike, arrayIncludes, hasRequiredArrayIncludes, objectKeysInternal, hasRequiredObjectKeysInternal, enumBugKeys, hasRequiredEnumBugKeys, hasRequiredObjectGetOwnPropertyNames, objectGetOwnPropertySymbols, hasRequiredObjectGetOwnPropertySymbols, ownKeys$1, hasRequiredOwnKeys, copyConstructorProperties, hasRequiredCopyConstructorProperties, isForced_1, hasRequiredIsForced, _export, hasRequired_export, newPromiseCapability, hasRequiredNewPromiseCapability, hasRequiredEs_promise_withResolvers, es_set_union_v2, setHelpers, hasRequiredSetHelpers, aSet, hasRequiredASet, iterateSimple, hasRequiredIterateSimple, setIterate, hasRequiredSetIterate, setClone, hasRequiredSetClone, getIteratorDirect, hasRequiredGetIteratorDirect, getSetRecord, hasRequiredGetSetRecord, setUnion, hasRequiredSetUnion, setMethodGetKeysBeforeCloningDetection, hasRequiredSetMethodGetKeysBeforeCloningDetection, setMethodAcceptSetLike, hasRequiredSetMethodAcceptSetLike, hasRequiredEs_set_union_v2, iteratorHelpers, iteratorHelpersStage3, esnext_asyncIterator_constructor, anInstance, hasRequiredAnInstance, correctPrototypeGetter, hasRequiredCorrectPrototypeGetter, objectGetPrototypeOf, hasRequiredObjectGetPrototypeOf, objectDefineProperties, objectKeys$1, hasRequiredObjectKeys, hasRequiredObjectDefineProperties, html$1, hasRequiredHtml, objectCreate, hasRequiredObjectCreate, asyncIteratorPrototype, hasRequiredAsyncIteratorPrototype, hasRequiredEsnext_asyncIterator_constructor, esnext_asyncIterator_drop, notANan, hasRequiredNotANan, toPositiveInteger, hasRequiredToPositiveInteger, perform, hasRequiredPerform, defineBuiltIns, hasRequiredDefineBuiltIns, createIterResultObject, hasRequiredCreateIterResultObject, iteratorClose, hasRequiredIteratorClose, asyncIteratorCreateProxy, hasRequiredAsyncIteratorCreateProxy, hasRequiredEsnext_asyncIterator_drop, esnext_asyncIterator_every, doesNotExceedSafeInteger, hasRequiredDoesNotExceedSafeInteger, createProperty, hasRequiredCreateProperty, isArray$1, hasRequiredIsArray, arraySetLength, hasRequiredArraySetLength, asyncIteratorClose, hasRequiredAsyncIteratorClose, asyncIteratorIteration, hasRequiredAsyncIteratorIteration, hasRequiredEsnext_asyncIterator_every, esnext_asyncIterator_filter, hasRequiredEsnext_asyncIterator_filter, esnext_asyncIterator_find, hasRequiredEsnext_asyncIterator_find, esnext_asyncIterator_flatMap, toStringTagSupport, hasRequiredToStringTagSupport, classof, hasRequiredClassof, iterators, hasRequiredIterators, getIteratorMethod, hasRequiredGetIteratorMethod, asyncFromSyncIterator, hasRequiredAsyncFromSyncIterator, getAsyncIteratorFlattenable, hasRequiredGetAsyncIteratorFlattenable, hasRequiredEsnext_asyncIterator_flatMap, esnext_asyncIterator_forEach, hasRequiredEsnext_asyncIterator_forEach, esnext_asyncIterator_from, asyncIteratorWrap, hasRequiredAsyncIteratorWrap, hasRequiredEsnext_asyncIterator_from, esnext_asyncIterator_map, asyncIteratorMap, hasRequiredAsyncIteratorMap, hasRequiredEsnext_asyncIterator_map, esnext_asyncIterator_reduce, hasRequiredEsnext_asyncIterator_reduce, esnext_asyncIterator_some, hasRequiredEsnext_asyncIterator_some, esnext_asyncIterator_take, hasRequiredEsnext_asyncIterator_take, esnext_asyncIterator_toArray, hasRequiredEsnext_asyncIterator_toArray, esnext_iterator_constructor, es_iterator_constructor, defineBuiltInAccessor, hasRequiredDefineBuiltInAccessor, iteratorsCore, hasRequiredIteratorsCore, hasRequiredEs_iterator_constructor, hasRequiredEsnext_iterator_constructor, esnext_iterator_drop, es_iterator_drop, iteratorCloseAll, hasRequiredIteratorCloseAll, iteratorCreateProxy, hasRequiredIteratorCreateProxy, iteratorHelperThrowsOnInvalidIterator, hasRequiredIteratorHelperThrowsOnInvalidIterator, iteratorHelperWithoutClosingOnEarlyError, hasRequiredIteratorHelperWithoutClosingOnEarlyError, hasRequiredEs_iterator_drop, hasRequiredEsnext_iterator_drop, esnext_iterator_every, es_iterator_every, functionUncurryThisClause, hasRequiredFunctionUncurryThisClause, functionBindContext, hasRequiredFunctionBindContext, isArrayIteratorMethod, hasRequiredIsArrayIteratorMethod, getIterator, hasRequiredGetIterator, iterate, hasRequiredIterate, hasRequiredEs_iterator_every, hasRequiredEsnext_iterator_every, esnext_iterator_filter, es_iterator_filter, callWithSafeIterationClosing, hasRequiredCallWithSafeIterationClosing, hasRequiredEs_iterator_filter, hasRequiredEsnext_iterator_filter, esnext_iterator_find, es_iterator_find, hasRequiredEs_iterator_find, hasRequiredEsnext_iterator_find, esnext_iterator_flatMap, es_iterator_flatMap, getIteratorFlattenable, hasRequiredGetIteratorFlattenable, hasRequiredEs_iterator_flatMap, hasRequiredEsnext_iterator_flatMap, esnext_iterator_forEach, es_iterator_forEach, hasRequiredEs_iterator_forEach, hasRequiredEsnext_iterator_forEach, esnext_iterator_from, es_iterator_from, hasRequiredEs_iterator_from, hasRequiredEsnext_iterator_from, esnext_iterator_map, es_iterator_map, hasRequiredEs_iterator_map, hasRequiredEsnext_iterator_map, esnext_iterator_reduce, es_iterator_reduce, functionApply, hasRequiredFunctionApply, hasRequiredEs_iterator_reduce, hasRequiredEsnext_iterator_reduce, esnext_iterator_some, es_iterator_some, hasRequiredEs_iterator_some, hasRequiredEsnext_iterator_some, esnext_iterator_take, es_iterator_take, hasRequiredEs_iterator_take, hasRequiredEsnext_iterator_take, esnext_iterator_toArray, es_iterator_toArray, hasRequiredEs_iterator_toArray, hasRequiredEsnext_iterator_toArray, esnext_iterator_toAsync, hasRequiredEsnext_iterator_toAsync, hasRequiredIteratorHelpersStage3, esnext_asyncIterator_asIndexedPairs, asyncIteratorIndexed, hasRequiredAsyncIteratorIndexed, hasRequiredEsnext_asyncIterator_asIndexedPairs, esnext_asyncIterator_indexed, hasRequiredEsnext_asyncIterator_indexed, esnext_iterator_asIndexedPairs, iteratorIndexed, hasRequiredIteratorIndexed, hasRequiredEsnext_iterator_asIndexedPairs, esnext_iterator_indexed, hasRequiredEsnext_iterator_indexed, hasRequiredIteratorHelpers, align, top, right, bottom, left, UI, mixin$1, regex, emojiRegex$2, segmenter, defaultIgnorableCodePointRegex, ANSI_BACKGROUND_OFFSET, wrapAnsi16, wrapAnsi256, wrapAnsi16m, styles, foregroundColorNames, backgroundColorNames, ansiStyles, ESCAPES, END_CODE, ANSI_ESCAPE_BELL, ANSI_CSI, ANSI_OSC, ANSI_SGR_TERMINATOR, ANSI_ESCAPE_LINK, wrapAnsiCode, wrapAnsiHyperlink, wordLengths, wrapWord, stringVisibleTrimSpacesRight, exec, DefaultValuesForTypeKey, mixin, YargsParser, _a$7, _b, _c, minNodeVersion, nodeVersion, env, require$2, parser$1, yargsParser, shim$3, shim$2, Y18N, y18n, getCallerFile$1, hasRequiredGetCallerFile, getCallerFileExports, getCallerFile, __dirname$1, mainFilename, require$1, shim$1, YError, positionName, GlobalMiddleware, DEFAULT_MARKER, CommandInstance, completionShTemplate, completionZshTemplate, Completion, specialKeys, previouslyVisitedConfigs, shim, __classPrivateFieldSet$1, __classPrivateFieldGet$1, _YargsInstance_command, _YargsInstance_cwd, _YargsInstance_context, _YargsInstance_completion, _YargsInstance_completionCommand, _YargsInstance_defaultShowHiddenOpt, _YargsInstance_exitError, _YargsInstance_detectLocale, _YargsInstance_emittedWarnings, _YargsInstance_exitProcess, _YargsInstance_frozens, _YargsInstance_globalMiddleware, _YargsInstance_groups, _YargsInstance_hasOutput, _YargsInstance_helpOpt, _YargsInstance_isGlobalContext, _YargsInstance_logger, _YargsInstance_output, _YargsInstance_options, _YargsInstance_parentRequire, _YargsInstance_parserConfig, _YargsInstance_parseFn, _YargsInstance_parseContext, _YargsInstance_pkgs, _YargsInstance_preservedGroups, _YargsInstance_processArgs, _YargsInstance_recommendCommands, _YargsInstance_shim, _YargsInstance_strict, _YargsInstance_strictCommands, _YargsInstance_strictOptions, _YargsInstance_usage, _YargsInstance_usageConfig, _YargsInstance_versionOpt, _YargsInstance_validation, kCopyDoubleDash, kCreateLogger, kDeleteFromParserHintObject, kEmitWarning, kFreeze, kGetDollarZero, kGetParserConfiguration, kGetUsageConfiguration, kGuessLocale, kGuessVersion, kParsePositionalNumbers, kPkgUp, kPopulateParserHintArray, kPopulateParserHintSingleValueDictionary, kPopulateParserHintArrayDictionary, kPopulateParserHintDictionary, kSanitizeKey, kSetKey, kUnfreeze, kValidateAsync, kGetCommandInstance, kGetContext, kGetHasOutput, kGetLoggerInstance, kGetParseContext, kGetUsageInstance, kGetValidationInstance, kHasParseCallback, kIsGlobalContext, kPostProcess, kRebase, kReset, kRunYargsParserAndExecuteCommands, kRunValidation, kSetHasOutput, kTrackManuallySetKeys, DEFAULT_LOCALE$1, YargsInstance, Yargs, src, browser$1, ms, hasRequiredMs, common$3, hasRequiredCommon$2, hasRequiredBrowser, node$1, hasFlag, hasRequiredHasFlag, supportsColor_1, hasRequiredSupportsColor, hasRequiredNode, hasRequiredSrc, srcExports, debug$2, index, util$5, objectUtil, ZodParsedType, getParsedType, ZodIssueCode, quotelessJson, ZodError, errorMap, overrideErrorMap, makeIssue, EMPTY_PATH, ParseStatus, INVALID, DIRTY, OK, isAborted, isDirty, isValid$1, isAsync, errorUtil, ParseInputLazyPath, handleResult, ZodType$1, cuidRegex, cuid2Regex, ulidRegex, uuidRegex, nanoidRegex, jwtRegex, durationRegex, emailRegex, _emojiRegex, emojiRegex$1, ipv4Regex, ipv4CidrRegex, ipv6Regex, ipv6CidrRegex, base64Regex, base64urlRegex, dateRegexSource, dateRegex, ZodString$1, ZodNumber$1, ZodBigInt$1, ZodBoolean$1, ZodDate, ZodSymbol, ZodUndefined, ZodNull$1, ZodAny, ZodUnknown$1, ZodNever$1, ZodVoid, ZodArray$1, ZodObject$1, ZodUnion$1, getDiscriminator, ZodDiscriminatedUnion$1, ZodIntersection$1, ZodTuple, ZodRecord$1, ZodMap, ZodSet, ZodFunction, ZodLazy, ZodLiteral$1, ZodEnum$1, ZodNativeEnum, ZodPromise, ZodEffects, ZodOptional$1, ZodNullable$1, ZodDefault$1, ZodCatch$1, ZodNaN, BRAND, ZodBranded, ZodPipeline, ZodReadonly$1, late, ZodFirstPartyTypeKind, instanceOfType, stringType, numberType, nanType, bigIntType, booleanType, dateType, symbolType, undefinedType, nullType, anyType, unknownType, neverType, voidType, arrayType, objectType, strictObjectType, unionType, discriminatedUnionType, intersectionType, tupleType, recordType, mapType, setType, functionType, lazyType, literalType, enumType, nativeEnumType, promiseType, effectsType, optionalType, nullableType, preprocessType, pipelineType, ostring, onumber, oboolean, coerce, NEVER$1, z, $ZodAsyncError, globalConfig, captureStackTrace, allowsEval, propertyKeyTypes, primitiveTypes, NUMBER_FORMAT_RANGES, BIGINT_FORMAT_RANGES, initializer$1, $ZodError, $ZodRealError, _parse, parse$4, _parseAsync, parseAsync$1, _safeParse, safeParse$2, _safeParseAsync, safeParseAsync$2, cuid, cuid2, ulid, xid, ksuid, nanoid, duration$1, guid, uuid, email, _emoji$1, ipv4$1, ipv6$1, cidrv4, cidrv6, base64$1, base64url, hostname, e164, dateSource, date$1, string$1, bigint, integer, number$1, boolean$1, _null$2, _undefined, lowercase, uppercase, $ZodCheck, numericOriginMap, $ZodCheckLessThan, $ZodCheckGreaterThan, $ZodCheckMultipleOf, $ZodCheckNumberFormat, $ZodCheckBigIntFormat, $ZodCheckMaxSize, $ZodCheckMinSize, $ZodCheckSizeEquals, $ZodCheckMaxLength, $ZodCheckMinLength, $ZodCheckLengthEquals, $ZodCheckStringFormat, $ZodCheckRegex, $ZodCheckLowerCase, $ZodCheckUpperCase, $ZodCheckIncludes, $ZodCheckStartsWith, $ZodCheckEndsWith, $ZodCheckMimeType, $ZodCheckOverwrite, Doc, version$1, $ZodType, $ZodString, $ZodStringFormat, $ZodGUID, $ZodUUID, $ZodEmail, $ZodURL, $ZodEmoji, $ZodNanoID, $ZodCUID, $ZodCUID2, $ZodULID, $ZodXID, $ZodKSUID, $ZodISODateTime, $ZodISODate, $ZodISOTime, $ZodISODuration, $ZodIPv4, $ZodIPv6, $ZodCIDRv4, $ZodCIDRv6, $ZodBase64, $ZodBase64URL, $ZodE164, $ZodJWT, $ZodCustomStringFormat, $ZodNumber, $ZodNumberFormat, $ZodBoolean, $ZodBigInt, $ZodBigIntFormat, $ZodSymbol, $ZodUndefined, $ZodNull, $ZodAny, $ZodUnknown, $ZodNever, $ZodVoid, $ZodDate, $ZodArray, $ZodObject, $ZodUnion, $ZodDiscriminatedUnion, $ZodIntersection, $ZodTuple, $ZodRecord, $ZodMap, $ZodSet, $ZodEnum, $ZodLiteral, $ZodFile, $ZodTransform, $ZodOptional, $ZodNullable, $ZodDefault, $ZodPrefault, $ZodNonOptional, $ZodSuccess, $ZodCatch, $ZodNaN, $ZodPipe, $ZodReadonly, $ZodTemplateLiteral, $ZodPromise, $ZodLazy, $ZodCustom, $ZodRegistry, globalRegistry, JSONSchemaGenerator, ZodMiniType, ZodMiniString, ZodMiniStringFormat, ZodMiniNumber, ZodMiniBigInt, ZodMiniObject, ZodISODateTime, ZodISODate, ZodISOTime, ZodISODuration, initializer, ZodRealError, parse$3, parseAsync, safeParse, safeParseAsync, ZodType2, _ZodString, ZodString2, ZodStringFormat, ZodEmail, ZodGUID, ZodUUID, ZodURL, ZodEmoji, ZodNanoID, ZodCUID, ZodCUID2, ZodULID, ZodXID, ZodKSUID, ZodIPv4, ZodIPv6, ZodCIDRv4, ZodCIDRv6, ZodBase64, ZodBase64URL, ZodE164, ZodJWT, ZodNumber2, ZodNumberFormat, ZodBoolean2, ZodBigInt2, ZodNull2, ZodUnknown2, ZodNever2, ZodArray2, ZodObject2, ZodUnion2, ZodDiscriminatedUnion2, ZodIntersection2, ZodRecord2, ZodEnum2, ZodLiteral2, ZodTransform, ZodOptional2, ZodNullable2, ZodDefault2, ZodPrefault, ZodNonOptional, ZodCatch2, ZodPipe, ZodReadonly2, ZodCustom, LATEST_PROTOCOL_VERSION, SUPPORTED_PROTOCOL_VERSIONS, RELATED_TASK_META_KEY, JSONRPC_VERSION, AssertObjectSchema, ProgressTokenSchema, CursorSchema, TaskMetadataSchema, RelatedTaskMetadataSchema, RequestMetaSchema, BaseRequestParamsSchema, TaskAugmentedRequestParamsSchema, isTaskAugmentedRequestParams, RequestSchema, NotificationsParamsSchema, NotificationSchema, ResultSchema, RequestIdSchema, JSONRPCRequestSchema, isJSONRPCRequest, JSONRPCNotificationSchema, isJSONRPCNotification, JSONRPCResultResponseSchema, isJSONRPCResultResponse, ErrorCode$1, JSONRPCErrorResponseSchema, isJSONRPCErrorResponse, JSONRPCMessageSchema, EmptyResultSchema, CancelledNotificationParamsSchema, CancelledNotificationSchema, IconSchema, IconsSchema, BaseMetadataSchema, ImplementationSchema, FormElicitationCapabilitySchema, ElicitationCapabilitySchema, ClientTasksCapabilitySchema, ServerTasksCapabilitySchema, ClientCapabilitiesSchema, InitializeRequestParamsSchema, InitializeRequestSchema, ServerCapabilitiesSchema, InitializeResultSchema, InitializedNotificationSchema, PingRequestSchema, ProgressSchema, ProgressNotificationParamsSchema, ProgressNotificationSchema, PaginatedRequestParamsSchema, PaginatedRequestSchema, PaginatedResultSchema, TaskStatusSchema, TaskSchema, CreateTaskResultSchema, TaskStatusNotificationParamsSchema, TaskStatusNotificationSchema, GetTaskRequestSchema, GetTaskResultSchema, GetTaskPayloadRequestSchema, ListTasksRequestSchema, ListTasksResultSchema, CancelTaskRequestSchema, CancelTaskResultSchema, ResourceContentsSchema, TextResourceContentsSchema, Base64Schema, BlobResourceContentsSchema, RoleSchema, AnnotationsSchema, ResourceSchema, ResourceTemplateSchema, ListResourcesRequestSchema, ListResourcesResultSchema, ListResourceTemplatesRequestSchema, ListResourceTemplatesResultSchema, ResourceRequestParamsSchema, ReadResourceRequestParamsSchema, ReadResourceRequestSchema, ReadResourceResultSchema, ResourceListChangedNotificationSchema, SubscribeRequestParamsSchema, SubscribeRequestSchema, UnsubscribeRequestParamsSchema, UnsubscribeRequestSchema, ResourceUpdatedNotificationParamsSchema, ResourceUpdatedNotificationSchema, PromptArgumentSchema, PromptSchema, ListPromptsRequestSchema, ListPromptsResultSchema, GetPromptRequestParamsSchema, GetPromptRequestSchema, TextContentSchema, ImageContentSchema, AudioContentSchema, ToolUseContentSchema, EmbeddedResourceSchema, ResourceLinkSchema, ContentBlockSchema, PromptMessageSchema, GetPromptResultSchema, PromptListChangedNotificationSchema, ToolAnnotationsSchema, ToolExecutionSchema, ToolSchema, ListToolsRequestSchema, ListToolsResultSchema, CallToolResultSchema, CallToolRequestParamsSchema, CallToolRequestSchema, ToolListChangedNotificationSchema, ListChangedOptionsBaseSchema, LoggingLevelSchema, SetLevelRequestParamsSchema, SetLevelRequestSchema, LoggingMessageNotificationParamsSchema, LoggingMessageNotificationSchema, ModelHintSchema, ModelPreferencesSchema, ToolChoiceSchema, ToolResultContentSchema, SamplingContentSchema, SamplingMessageContentBlockSchema, SamplingMessageSchema, CreateMessageRequestParamsSchema, CreateMessageRequestSchema, CreateMessageResultSchema, CreateMessageResultWithToolsSchema, BooleanSchemaSchema, StringSchemaSchema, NumberSchemaSchema, UntitledSingleSelectEnumSchemaSchema, TitledSingleSelectEnumSchemaSchema, LegacyTitledEnumSchemaSchema, SingleSelectEnumSchemaSchema, UntitledMultiSelectEnumSchemaSchema, TitledMultiSelectEnumSchemaSchema, MultiSelectEnumSchemaSchema, EnumSchemaSchema, PrimitiveSchemaDefinitionSchema, ElicitRequestFormParamsSchema, ElicitRequestURLParamsSchema, ElicitRequestParamsSchema, ElicitRequestSchema, ElicitationCompleteNotificationParamsSchema, ElicitationCompleteNotificationSchema, ElicitResultSchema, ResourceTemplateReferenceSchema, PromptReferenceSchema, CompleteRequestParamsSchema, CompleteRequestSchema, CompleteResultSchema, RootSchema, ListRootsRequestSchema, ListRootsResultSchema, RootsListChangedNotificationSchema, McpError, UrlElicitationRequiredError, ignoreOverride, defaultOptions, getDefaultOptions, getRefs, getRelativePath, parseCatchDef, integerDateParser, isJsonSchema7AllOfType, emojiRegex, zodPatterns, ALPHA_NUMERIC, primitiveMappings, asAnyOf, parseOptionalDef, parsePipelineDef, parseReadonlyDef, selectParser, get$ref, addMeta, zodToJsonSchema, DEFAULT_REQUEST_TIMEOUT_MSEC, Protocol, ajv$1, core$5, validate$1, boolSchema$1, errors$2, codegen$1, code$4, hasRequiredCode$4, scope$2, hasRequiredScope$2, hasRequiredCodegen$1, util$4, hasRequiredUtil$4, names$1, hasRequiredNames$1, hasRequiredErrors$2, hasRequiredBoolSchema$1, dataType$1, rules$1, hasRequiredRules$1, applicability$1, hasRequiredApplicability$1, hasRequiredDataType$1, defaults$2, hasRequiredDefaults$1, keyword$2, code$3, hasRequiredCode$3, hasRequiredKeyword$2, subschema$1, hasRequiredSubschema$1, resolve$1, fastDeepEqual, hasRequiredFastDeepEqual, jsonSchemaTraverse$1, hasRequiredJsonSchemaTraverse$1, hasRequiredResolve$1, hasRequiredValidate$1, validation_error$1, hasRequiredValidation_error$1, ref_error$1, hasRequiredRef_error$1, compile$2, hasRequiredCompile$2, $id$3, description$1, type$3, required$3, properties$5, additionalProperties$3, require$$9$1, uri$1, fastUri, utils$2, hasRequiredUtils$2, schemes, hasRequiredSchemes, hasRequiredFastUri, hasRequiredUri$1, hasRequiredCore$4, draft7$1, core$4, id$1, hasRequiredId$1, ref$1, hasRequiredRef$1, hasRequiredCore$3, validation$2, limitNumber$1, hasRequiredLimitNumber$1, multipleOf$1, hasRequiredMultipleOf$1, limitLength$1, ucs2length$1, hasRequiredUcs2length$1, hasRequiredLimitLength$1, pattern$1, hasRequiredPattern$1, limitProperties$1, hasRequiredLimitProperties$1, required$2, hasRequiredRequired$1, limitItems$1, hasRequiredLimitItems$1, uniqueItems$1, equal$1, hasRequiredEqual$1, hasRequiredUniqueItems$1, _const$1, hasRequired_const$1, _enum$1, hasRequired_enum$1, hasRequiredValidation$2, applicator$1, additionalItems$1, hasRequiredAdditionalItems$1, prefixItems$1, items$1, hasRequiredItems$1, hasRequiredPrefixItems$1, items2020$1, hasRequiredItems2020$1, contains$2, hasRequiredContains$1, dependencies$1, hasRequiredDependencies$1, propertyNames$1, hasRequiredPropertyNames$1, additionalProperties$2, hasRequiredAdditionalProperties$1, properties$4, hasRequiredProperties$1, patternProperties$1, hasRequiredPatternProperties$1, not$1, hasRequiredNot$1, anyOf$1, hasRequiredAnyOf$1, oneOf$1, hasRequiredOneOf$1, allOf$1, hasRequiredAllOf$1, _if$1, hasRequired_if$1, thenElse$1, hasRequiredThenElse$1, hasRequiredApplicator$1, format$4, format$3, hasRequiredFormat$3, hasRequiredFormat$2, metadata$1, hasRequiredMetadata$1, hasRequiredDraft7$1, discriminator$1, types$7, hasRequiredTypes$3, hasRequiredDiscriminator$1, $schema$1, $id$2, title$1, definitions$1, type$2, properties$3, require$$3$2, hasRequiredAjv$1, ajvExports, Ajv, dist$c, formats2, hasRequiredFormats, limit, ajv, core$3, validate, boolSchema, errors$1, codegen, code$2, hasRequiredCode$2, scope$1, hasRequiredScope$1, hasRequiredCodegen, util$3, hasRequiredUtil$3, names2, hasRequiredNames, hasRequiredErrors$1, hasRequiredBoolSchema, dataType, rules, hasRequiredRules, applicability, hasRequiredApplicability, hasRequiredDataType, defaults$1, hasRequiredDefaults, keyword$1, code$1, hasRequiredCode$1, hasRequiredKeyword$1, subschema, hasRequiredSubschema, resolve, jsonSchemaTraverse, hasRequiredJsonSchemaTraverse, hasRequiredResolve, hasRequiredValidate, validation_error, hasRequiredValidation_error, ref_error, hasRequiredRef_error, compile$1, hasRequiredCompile$1, $id$1, description, type$1, required$1, properties$2, additionalProperties$1, require$$9, uri, hasRequiredUri, hasRequiredCore$2, draft7, core$2, id, hasRequiredId, ref, hasRequiredRef, hasRequiredCore$1, validation$1, limitNumber, hasRequiredLimitNumber, multipleOf, hasRequiredMultipleOf, limitLength, ucs2length, hasRequiredUcs2length, hasRequiredLimitLength, pattern, hasRequiredPattern, limitProperties, hasRequiredLimitProperties, required, hasRequiredRequired, limitItems, hasRequiredLimitItems, uniqueItems, equal, hasRequiredEqual, hasRequiredUniqueItems, _const, hasRequired_const, _enum, hasRequired_enum, hasRequiredValidation$1, applicator, additionalItems, hasRequiredAdditionalItems, prefixItems, items, hasRequiredItems, hasRequiredPrefixItems, items2020, hasRequiredItems2020, contains$1, hasRequiredContains, dependencies, hasRequiredDependencies, propertyNames, hasRequiredPropertyNames, additionalProperties, hasRequiredAdditionalProperties, properties$1, hasRequiredProperties, patternProperties, hasRequiredPatternProperties, not, hasRequiredNot, anyOf, hasRequiredAnyOf, oneOf, hasRequiredOneOf, allOf, hasRequiredAllOf, _if, hasRequired_if, thenElse, hasRequiredThenElse, hasRequiredApplicator, format$2, format$1, hasRequiredFormat$1, hasRequiredFormat, metadata, hasRequiredMetadata, hasRequiredDraft7, discriminator, types$6, hasRequiredTypes$2, hasRequiredDiscriminator, $schema, $id, title, definitions, type, properties, require$$3$1, hasRequiredAjv, hasRequiredLimit, hasRequiredDist$c, distExports$1, _addFormats, AjvJsonSchemaValidator, ExperimentalServerTasks, Server, COMPLETABLE_SYMBOL, McpZodTypeKind, TOOL_NAME_REGEX, ExperimentalMcpServerTasks, McpServer, EMPTY_OBJECT_JSON_SCHEMA, EMPTY_COMPLETION_RESULT, ReadBuffer, StdioServerTransport, crossSpawn, windows, hasRequiredWindows, mode, hasRequiredMode, isexe_1, hasRequiredIsexe, which_1, hasRequiredWhich, pathKey, hasRequiredPathKey, resolveCommand_1, hasRequiredResolveCommand, _escape, hasRequired_escape, shebangRegex, hasRequiredShebangRegex, shebangCommand, hasRequiredShebangCommand, readShebang_1, hasRequiredReadShebang, parse_1$1, hasRequiredParse$1, enoent, hasRequiredEnoent, hasRequiredCrossSpawn, crossSpawnExports, DEFAULT_INHERITED_ENV_VARS, extendStatics$1, UnsubscriptionError, Subscription, EMPTY_SUBSCRIPTION, config$2, timeoutProvider, Subscriber, ConsumerObserver, SafeSubscriber, EMPTY_OBSERVER, observable, Observable, OperatorSubscriber, ObjectUnsubscribedError, Subject, AnonymousSubject, dateTimestampProvider, ReplaySubject, Action$1, intervalProvider, AsyncAction, Scheduler, AsyncScheduler, asyncScheduler, async, EMPTY, isArrayLike2, iterator, EmptyError, isArray2, nodeEventEmitterMethods, eventTargetMethods, jqueryMethods, NEVER, isArray3, disposeSymbol, asyncDisposeSymbol, DisposableStackPolyfill, DisposableStack, AsyncDisposableStackPolyfill, AsyncDisposableStack, SuppressedErrorPolyfill, EventEmitter6, isNode, environment, assert, packageVersion, debugModule, debug$1, PuppeteerError, TimeoutError$1, TouchError, ProtocolError, UnsupportedOperation, TargetCloseError, ConnectionClosedError, paperFormats, debugError, DEFAULT_VIEWPORT, SOURCE_URL, PuppeteerURL, withSourcePuppeteerURLIfNone, getSourcePuppeteerURLIfAvailable, isString, isNumber, VALID_DIALOG_TYPES, UTILITY_WORLD_NAME, SOURCE_URL_REGEX, NETWORK_IDLE_TIME, unitToPixels, WEB_PERMISSION_TO_PROTOCOL_PERMISSION, Browser$1, Deferred, Mutex$2, BrowserContext, CDPSessionEvent, CDPSession, DeviceRequestPrompt, Dialog, AsyncIterableUtil, _isElementHandle, createdFunctions, createFunction, interpolateFunction, __addDisposableResource$d, __disposeResources$d, DEFAULT_BATCH_SIZE, LazyArg, __addDisposableResource$c, __disposeResources$c, QueryHandler, isKnownAttribute, ATTRIBUTE_REGEXP, parseARIASelector, ARIAQueryHandler, CSSQueryHandler, source, ScriptInjector, scriptInjector, CustomQueryHandlerRegistry, customQueryHandlers, PierceQueryHandler, PQueryHandler, TOKENS, TRIM_TOKENS, getArgumentPatternByType, STRING_PATTERN, ESCAPE_PATTERN, ESCAPE_REGEXP, unquote, TextQueryHandler, XPathQueryHandler, BUILTIN_QUERY_HANDLERS, QUERY_SEPARATORS, __addDisposableResource$b, __disposeResources$b, instances, __runInitializers$8, __esDecorate$8, __addDisposableResource$a, __disposeResources$a, JSHandle, __addDisposableResource$9, __disposeResources$9, LocatorEvent, Locator, FunctionLocator, DelegatedLocator, FilteredLocator, MappedLocator, NodeLocator, RaceLocator, RETRY_DELAY, __runInitializers$7, __esDecorate$7, __addDisposableResource$8, __disposeResources$8, __setFunctionName$3, ElementHandle, __runInitializers$6, __esDecorate$6, __addDisposableResource$7, __disposeResources$7, FrameEvent, throwIfDetached, Frame, HTTPRequest, InterceptResolutionAction, STATUS_TEXTS, errorReasons, HTTPResponse, Keyboard, MouseButton, Mouse, Touchscreen, DEFAULT_TIMEOUT, TimeoutSettings, __runInitializers$5, __esDecorate$5, __addDisposableResource$6, __disposeResources$6, Page, WaitTask, TaskManager, Realm, TargetType, Target$1, WebWorker$1, __addDisposableResource$5, __disposeResources$5, Accessibility2, AXNode, __addDisposableResource$4, __disposeResources$4, Binding$2, CdpBluetoothEmulation, ConsoleMessage$1, FileChooser, NetworkManagerEvent, CallbackRegistry, Callback, CdpCDPSession, debugProtocolSend, debugProtocolReceive, Connection, Coverage, JSCoverage, CSSCoverage, CdpDialog, __runInitializers$4, __esDecorate$4, __setFunctionName$2, EmulatedState, EmulationManager, CdpPreloadScript, CdpDeviceRequestPrompt, CdpDeviceRequestPromptManager, getErrorDetails, CDP_BINDING_PREFIX, CdpJSHandle, __runInitializers$3, __esDecorate$3, NON_ELEMENT_NODE_ROLES, CdpElementHandle, __addDisposableResource$3, __disposeResources$3, ariaQuerySelectorBinding, ariaQuerySelectorAllBinding, ExecutionContext$1, rewriteError, FrameManagerEvent, IsolatedWorld, MAIN_WORLD, PUPPETEER_WORLD, puppeteerToProtocolLifecycle, LifecycleWatcher, __runInitializers$2, __esDecorate$2, CdpFrame, FrameTree, CdpHTTPRequest, SecurityDetails, CdpHTTPResponse, NetworkEventManager, NetworkManager$1, TIME_FOR_WAITING_FOR_SWAP, FrameManager$1, _keyDefinitions, CdpKeyboard, getFlag, getButtonFromPressedButtons, CdpMouse, CdpTouchHandle, CdpTouchscreen, Tracing, CdpWebWorker, __addDisposableResource$2, __disposeResources$2, CdpPage, supportedMetrics, __addDisposableResource$1, __disposeResources$1, CdpBrowserContext, InitializationStatus, CdpTarget, PageTarget, DevToolsTarget, WorkerTarget, OtherTarget, TargetManager$1, CdpBrowser, PredefinedNetworkConditions, BrowserWebSocketTransport, BrowserWebSocketTransport$1, knownDevices, knownDevicesByName, KnownDevices, getWebSocketTransportClass, Puppeteer, PUPPETEER_REVISIONS, Browser2, BrowserPlatform, BrowserTag, ChromeReleaseChannel, re$1, constants$4, hasRequiredConstants$4, debug_1, hasRequiredDebug$1, hasRequiredRe, parseOptions_1, hasRequiredParseOptions, identifiers, hasRequiredIdentifiers, semver$2, hasRequiredSemver$1, parse_1, hasRequiredParse, valid_1, hasRequiredValid$1, clean_1, hasRequiredClean, inc_1, hasRequiredInc, diff_1, hasRequiredDiff, major_1, hasRequiredMajor, minor_1, hasRequiredMinor, patch_1, hasRequiredPatch, prerelease_1, hasRequiredPrerelease, compare_1, hasRequiredCompare, rcompare_1, hasRequiredRcompare, compareLoose_1, hasRequiredCompareLoose, compareBuild_1, hasRequiredCompareBuild, sort_1, hasRequiredSort, rsort_1, hasRequiredRsort, gt_1, hasRequiredGt, lt_1, hasRequiredLt, eq_1, hasRequiredEq, neq_1, hasRequiredNeq, gte_1, hasRequiredGte, lte_1, hasRequiredLte, cmp_1, hasRequiredCmp, coerce_1, hasRequiredCoerce, lrucache, hasRequiredLrucache, range, hasRequiredRange, comparator, hasRequiredComparator, satisfies_1, hasRequiredSatisfies, toComparators_1, hasRequiredToComparators, maxSatisfying_1, hasRequiredMaxSatisfying, minSatisfying_1, hasRequiredMinSatisfying, minVersion_1, hasRequiredMinVersion, valid, hasRequiredValid, outside_1, hasRequiredOutside, gtr_1, hasRequiredGtr, ltr_1, hasRequiredLtr, intersects_1, hasRequiredIntersects, simplify, hasRequiredSimplify, subset_1, hasRequiredSubset, semver$1, hasRequiredSemver, semverExports, semver, dist$b, lruCache, hasRequiredLruCache, dist$a, helpers$4, hasRequiredHelpers$2, hasRequiredDist$b, proxyFromEnv, hasRequiredProxyFromEnv, dist$9, hasRequiredDist$a, dist$8, parseProxyResponse, hasRequiredParseProxyResponse, hasRequiredDist$9, dist$7, build, socksclient, smartbuffer, utils$1, hasRequiredUtils$1, hasRequiredSmartbuffer, constants$3, hasRequiredConstants$3, helpers$3, util$2, hasRequiredUtil$2, ipAddress, ipv4, common$2, hasRequiredCommon$1, constants$2, hasRequiredConstants$2, addressError, hasRequiredAddressError, hasRequiredIpv4, ipv6, constants$1, hasRequiredConstants$1, helpers$2, hasRequiredHelpers$1, regularExpressions, hasRequiredRegularExpressions, hasRequiredIpv6, hasRequiredIpAddress, hasRequiredHelpers, receivebuffer, hasRequiredReceivebuffer, hasRequiredSocksclient, hasRequiredBuild, hasRequiredDist$8, dist$6, dist$5, data$u, dist$4, common$1, hasRequiredCommon, hasRequiredDist$7, notmodified, hasRequiredNotmodified, hasRequiredData, file, notfound, hasRequiredNotfound, hasRequiredFile, ftp, dist$3, Client, FtpContext, parseControlResponse, hasRequiredParseControlResponse, hasRequiredFtpContext, parseList, parseListDOS, FileInfo, hasRequiredFileInfo, hasRequiredParseListDOS, parseListUnix, hasRequiredParseListUnix, parseListMLSD, hasRequiredParseListMLSD, hasRequiredParseList, ProgressTracker, hasRequiredProgressTracker, StringWriter, hasRequiredStringWriter, netUtils, hasRequiredNetUtils, transfer, hasRequiredTransfer, hasRequiredClient, StringEncoding, hasRequiredStringEncoding, hasRequiredDist$6, hasRequiredFtp, http, httpError, hasRequiredHttpError, hasRequiredHttp, https, hasRequiredHttps, hasRequiredDist$5, dist$2, dist$1, degenerator, escodegen, estraverse, hasRequiredEstraverse, utils, ast, hasRequiredAst, code, hasRequiredCode, keyword, hasRequiredKeyword, hasRequiredUtils, sourceMap, sourceMapGenerator, base64Vlq, base64, hasRequiredBase64, hasRequiredBase64Vlq, util$1, hasRequiredUtil$1, arraySet, hasRequiredArraySet, mappingList, hasRequiredMappingList, hasRequiredSourceMapGenerator, sourceMapConsumer, binarySearch, hasRequiredBinarySearch, quickSort, hasRequiredQuickSort, hasRequiredSourceMapConsumer, sourceNode, hasRequiredSourceNode, hasRequiredSourceMap, version, require$$3, hasRequiredEscodegen, esprima$2, esprima$1, hasRequiredEsprima$1, main$1, extendStatics4, __assign$1, __createBinding4, __setModuleDefault4, ownKeys, _SuppressedError4, tslib_es6, tslib_es6$1, require$$0, fork, types$5, hasRequiredTypes$1, pathVisitor, nodePath, path7, hasRequiredPath, scope, hasRequiredScope, hasRequiredNodePath, hasRequiredPathVisitor, equiv, hasRequiredEquiv, hasRequiredFork, core$1, shared, hasRequiredShared, hasRequiredCore, es6, hasRequiredEs6, es7, hasRequiredEs7, es2020, hasRequiredEs2020, jsx, hasRequiredJsx, flow, typeAnnotations, hasRequiredTypeAnnotations, hasRequiredFlow, esprima, hasRequiredEsprima, babel, babelCore, hasRequiredBabelCore, hasRequiredBabel, typescript, hasRequiredTypescript, esProposals, hasRequiredEsProposals, namedTypes, hasRequiredNamedTypes, hasRequiredMain, hasRequiredDegenerator, compile, hasRequiredCompile, hasRequiredDist$4, dateRange, hasRequiredDateRange, dnsDomainIs, hasRequiredDnsDomainIs, dnsDomainLevels, hasRequiredDnsDomainLevels, dnsResolve, util, hasRequiredUtil, hasRequiredDnsResolve, isInNet, netmask, hasRequiredNetmask, hasRequiredIsInNet, isPlainHostName, hasRequiredIsPlainHostName, isResolvable, hasRequiredIsResolvable, localHostOrDomainIs, hasRequiredLocalHostOrDomainIs, myIpAddress, ip, hasRequiredIp, hasRequiredMyIpAddress, shExpMatch, hasRequiredShExpMatch, timeRange, hasRequiredTimeRange, weekdayRange, hasRequiredWeekdayRange, hasRequiredDist$3, dist, variants, esmHelpers, hasRequiredEsmHelpers, module$1, debug, hasRequiredDebug, errors, hasRequiredErrors, lifetime, asyncifyHelpers, hasRequiredAsyncifyHelpers, hasRequiredLifetime, runtime, context, deferredPromise, hasRequiredDeferredPromise, memory, hasRequiredMemory, types$4, typesFfi, hasRequiredTypesFfi, hasRequiredTypes, hasRequiredContext, hasRequiredRuntime, hasRequiredModule, moduleAsyncify, runtimeAsyncify, contextAsyncify, hasRequiredContextAsyncify, hasRequiredRuntimeAsyncify, hasRequiredModuleAsyncify, ffi_WASM_RELEASE_SYNC, hasRequiredFfi_WASM_RELEASE_SYNC, emscriptenModule_WASM_RELEASE_SYNC, hasRequiredEmscriptenModule_WASM_RELEASE_SYNC, hasRequiredVariants, vmInterface, hasRequiredVmInterface, moduleTest, hasRequiredModuleTest, hasRequiredDist$2, hasRequiredDist$1, hasRequiredDist, distExports, baseVersionUrl$1, WINDOWS_ENV_PARAM_NAMES, FirefoxChannel, baseVersionUrl, executablePathByBrowser, versionComparators, debugCache, InstalledBrowser, Cache$2, debugLaunch, CDP_WEBSOCKET_ENDPOINT_REGEX, WEBDRIVER_BIDI_WEBSOCKET_ENDPOINT_REGEX, processListeners, dispatchers, Process, PROCESS_ERROR_EXPLANATION, TimeoutError2, nodeProgress, hasRequiredNodeProgress, progress, hasRequiredProgress, main, bufferUtil, constants, hasRequiredConstants, hasRequiredBufferUtil, limiter, hasRequiredLimiter, permessageDeflate, hasRequiredPermessageDeflate, validation, hasRequiredValidation, receiver, hasRequiredReceiver, sender, hasRequiredSender, eventTarget, hasRequiredEventTarget, extension, hasRequiredExtension, websocket, hasRequiredWebsocket, stream2, hasRequiredStream, websocketExports, WebSocket$1, subprotocol, hasRequiredSubprotocol, websocketServer, hasRequiredWebsocketServer, NodeWebSocketTransport, NodeWebSocketTransport$1, PipeTransport, BrowserLauncher, LaunchOptions, rmOptions, ChromeLauncher, FirefoxLauncher, PuppeteerNode, __runInitializers4, __esDecorate4, __setFunctionName4, CRF_VALUE, DEFAULT_FPS, debugFfmpeg, ScreenRecorder, puppeteer, connect, defaultArgs, executablePath, launch, App, DevToolsContext, gInstance, ExperimentName, hostConfig, Runtime, experiments, registeredAppProvider, AppProvider, BASE64_CHARS$1, BASE64_CODES$1, Base64, CharacterIdMap, CharacterIdMap$1, removeElement2, mergeOrdered2, DEFAULT_COMPARATOR2, isValid, EmptyUrlString, NodeWorkerScope, NodeWorker, HOST_RUNTIME$2, HostRuntime$1, node, WebWorkerScope, WebWorker2, HOST_RUNTIME$1, HostRuntime, browser, IS_NODE, IS_BROWSER, HOST_RUNTIME, Multimap2, ADDITIONAL_TEXT_MIME_TYPES, clamp$1, floor2, escapeCharacters, sprintf, findIndexesOfSubString, findLineEndingIndexes, trimURL, removeURLFragment, SPECIAL_REGEX_CHARACTERS, regexSpecialCharacters, createSearchRegex, hashCode, compare, trimEndWithMaxLength, escapeForRegExp, createPlainTextSearchRegex, WORD, toKebabCase, stringifyWithPrecision, concatBase64, LocalizedEmptyString, UIString, D50_X, D50_Y, D50_Z, Vector3, Matrix3x3, TransferFunction, NAMED_TRANSFER_FN, NAMED_GAMUTS, OKLAB_TO_LMS_MATRIX, LMS_TO_OKLAB_MATRIX, XYZ_TO_LMS_MATRIX, LMS_TO_XYZ_MATRIX, PRO_PHOTO_TO_XYZD50_MATRIX, XYZD50_TO_PRO_PHOTO_MATRIX, XYZD65_TO_XYZD50_MATRIX, XYZD50_TO_XYZD65_MATRIX, ColorConverter, ColorConverter$1, mainTRC, normBgExp, normFgExp, revBgExp, revFgExp, blkThrs, blkClmp, scaleBoW, scaleWoB, loConOffset, loClip, deltaLuminanceMin, contrastAPCALookupTable, contrastThresholds, ColorUtils, EPSILON, WIDE_RANGE_EPSILON, Lab, LCH, Oklab, Oklch, ColorFunction, HSL, HWB, ShortFormatColorBase, ShortHex, Nickname, Legacy, Regex, ColorMixRegex, COLOR_TO_RGBA_ENTRIES, Nicknames, RGBAToNickname, LAYOUT_LINES_HIGHLIGHT_COLOR, PageHighlight, SourceOrderHighlight, IsolationModeHighlight, Generator, Color, ObjectWrapper, Object$1, devToolsLocaleInstance, DevToolsLocale, DevToolsLocale$1, NumberFormatter, narrowBytes, narrowKilobytesDecimal, narrowKilobytesInteger, narrowMegabytesDecimal, narrowMegabytesInteger, bytesToString, formatBytesToKb, ByteUtilities, __assign4, ErrorKind, TYPE2, SKELETON_TYPE, SPACE_SEPARATOR_REGEX, DATE_TIME_REGEX, WHITE_SPACE_REGEX, FRACTION_PRECISION_REGEX, SIGNIFICANT_PRECISION_REGEX, INTEGER_WIDTH_REGEX, CONCISE_INTEGER_WIDTH_REGEX, _a$6, SPACE_SEPARATOR_START_REGEX, SPACE_SEPARATOR_END_REGEX, hasNativeStartsWith, hasNativeFromCodePoint, hasNativeFromEntries, hasNativeCodePointAt, hasTrimStart, hasTrimEnd, hasNativeIsSafeInteger, isSafeInteger, REGEX_SUPPORTS_U_AND_Y, re, startsWith, fromCodePoint, fromEntries, codePointAt, trimStart, trimEnd, matchIdentifierAtIndex, IDENTIFIER_PREFIX_RE_1, Parser2, serializerDefault, cacheDefault, strategies, ErrorCode, FormatError, InvalidValueError, InvalidValueTypeError, MissingValueError, PART_TYPE, IntlMessageFormat, lib_esnext_default, EMPTY_VALUES_OBJECT, RegisteredFileStrings, LocalizedStringSet, I18n, LOCALES, DEFAULT_LOCALE2, LOCAL_FETCH_PATTERN, i18nInstance, i18nImpl, narrowMillisecondsInteger, longMilliseconds, narrowMicrosecondsInteger, narrowMillisecondsDecimal, narrowSecondsDecimal, shortMinutesDecimal, shortHoursDecimal, longDaysDecimal, preciseMillisToStringFormattersCache, preciseSecondsToStringFormattersCache, timeUtilities, i18n, UIStrings$1b, str_$1a, i18nLazyString$h, revealerRegistry, RevealerRegistry, RevealerDestination, Revealer, consoleInstance, Console, FrontendMessageSource, Message$1, Console$1, debounce, testDebounceOverride, Debouncer, EventTarget$1, Gzip, JavaScriptMetaData, UNINITIALIZED, ERROR_STATE, Lazy, MapWithDefault, MapWithDefault$1, Mutex2, Mutex$1, ParsedURL2, ParsedURL$1, Progress, CompositeProgress, SubProgress, ProgressProxy, Progress$1, ResolverBase, ResolverBase$1, UIStrings$1a, str_$19, i18nLazyString$g, ResourceType, ResourceCategory, resourceCategories, resourceTypes, mimeTypeByName, resourceTypeByExtension, mimeTypeByExtension, ResourceType$1, ReturnToPanelFlavor, ReturnToPanel, registeredLateInitializationRunnables, registeredEarlyInitializationRunnables, Runnable, Segment, SegmentedRange, SegmentedRange$1, UIStrings$19, str_$18, i18nString$R, registeredSettings, settingNameSet, SettingRegistration, settingsInstance, Settings, InMemoryStorage, SettingsStorage, Deprecation, Setting, RegExpSetting, VersionController, Settings$1, SimpleHistoryManager, SimpleHistoryManager$1, Srcset, StringOutputStream, StringOutputStream$1, Trie$1, Trie$2, TextDictionary, TextDictionary$1, Throttler, Throttler$1, common, UIStrings$18, str_$17, i18nLazyString$f, Events$e, EventDescriptors, UIStrings$17, str_$16, i18nString$Q, _lastStreamId, _boundStreams, bindOutputStream, discardOutputStream, streamWrite, load, loadAsStream, UIStrings$16, str_$15, i18nString$P, MAX_RECORDED_HISTOGRAMS_SIZE, OVERRIDES_FILE_SYSTEM_PATH, InspectorFrontendHostStub, InspectorFrontendHostInstance, InspectorFrontendAPIImpl, McpHostBindings, connectionFactory, ConnectionTransport, ConnectionTransport$1, CDPErrorStatus, CDPConnection, splitQualifiedName, qualifyName, InspectorBackend, test, SessionRouter, TargetBase, IGNORED_ERRORS, AgentPrototype, DispatcherManager, inspectorBackend, InspectorBackend$1, LongPollingMethods, DevToolsCDPConnection, DevToolsCDPConnection$1, protocol_client, RemoteObject$1, RemoteObjectImpl, ScopeRemoteObject, ScopeRef, RemoteObjectProperty, LocalJSONObject, RemoteFunction, descriptionLengthParenRegex, descriptionLengthSquareRegex, SearchMatch, contentAsDataURL, TextCursor, MAX_SAFE_INT32, TextRange, SourceRange, Text, ContentData, EMPTY_TEXT_CONTENT_DATA, SPACE_CHAR_REGEXP, Utils, performSearchInContentData, performSearchInContent, performSearchInSearchMatches, StaticContentProvider, StreamingContentData, isError, WasmDisassembly, ErrorType, Role, FunctionalityType, ClientFeature, UserTier, EditType, Reason, UseCase, RecitationAction, CitationSourceType, SubscriptionStatus, SubscriptionTier, EligibilityStatus, EmailPreference, UserMetrics, Action, PanelCodes, MediaTypes, KeybindSetSettings, KeyboardShortcutAction, DevtoolsExperiments, IssueExpanded, IssueResourceOpened, IssueCreated, Language, ManifestSectionCodes, userMetrics, CSSFontFace, generatedProperties, generatedPropertyValues, generatedAliasesFor, CSSMetadata, CubicBezierKeywordValues, CSSWideKeywords, PositionTryOrderKeywords, GridAreaRowRegex, cssMetadataInstance, imageValuePresetMap, filterValuePresetMap, cornerShapeValuePresetMap, valuePresets, distanceProperties, bezierAwareProperties, fontAwareProperties, colorAwareProperties, angleAwareProperties, textEmphasisPosition, textEmphasisStyle, extraPropertyValues, Weight, CommonKeywords, BaseVariableMatch, BaseVariableMatcher, VariableMatch, VariableMatcher, AttributeMatch, cssEvaluationElement, RAW_STRING_TYPE, AttributeMatcher, BinOpMatch, BinOpMatcher, TextMatch, TextMatcher, AngleMatch, AngleMatcher, ColorMixMatch, ColorMixMatcher, URLMatch, URLMatcher, LinearGradientMatch, LinearGradientMatcher, ColorMatch, ColorMatcher, RelativeColorChannelMatch, RelativeColorChannelMatcher, LightDarkColorMatch, LightDarkColorMatcher, AutoBaseMatch, AutoBaseMatcher, LinkableNameMatch, LinkableNameMatcher, BezierMatch, BezierMatcher, StringMatch, StringMatcher, ShadowMatch, ShadowMatcher, FontMatch, FontMatcher, LengthMatch, LengthMatcher, BaseFunctionMatch, MathFunctionMatch, MathFunctionMatcher, CustomFunctionMatch, CustomFunctionMatcher, FlexGridGridLanesMatch, FlexGridGridLanesMatcher, GridTemplateMatch, GridTemplateMatcher, AnchorFunctionMatch, AnchorFunctionMatcher, PositionAnchorMatch, PositionAnchorMatcher, CSSWideKeywordMatch, CSSWideKeywordMatcher, PositionTryMatch, PositionTryMatcher, EnvFunctionMatch, EnvFunctionMatcher, SyntaxTree, TreeWalker, BottomUpTreeMatching, ComputedTextChunk, ComputedText, ASTUtils, CSSProperty, CSSQuery, CSSContainerQuery, CSSContainerQueryContainer, getQueryAxisFromContainerType, getPhysicalAxisFromQueryAxis, CSSLayer, CSSMediaQuery, CSSMediaQueryExpression, CSSMedia, CSSScope, CSSStartingStyle, CSSStyleDeclaration, Type$3, CSSSupports, CSSRule, CSSValue, CSSStyleRule, CSSPropertyRule, CSSAtRule, CSSKeyframesRule, CSSKeyframeRule, CSSPositionTryRule, CSSFunctionRule, CSSRegisteredProperty, CSSMatchedStyles, NodeCascade, CSSValueSource, SCCRecordEntry, SCCRecord, DOMInheritanceCascade, UIStrings$15, str_$14, i18nString$O, CSSStyleSheetHeader, registeredModels, SDKModel, IOModel, OPAQUE_PARTITION_KEY, Cookie, CookieModel, CookieParser, KeyValue, ServerSentEventsParser, Base64TextDecoder, ServerSentEvents, UIStrings$14, str_$13, i18nString$N, cloudflarePrefix, cloudinaryPrefix, ServerTiming, Target2, Type$2, UIStrings$13, str_$12, i18nString$M, NetworkRequest2, Events$d, WebSocketFrameType, setCookieBlockedReasonToUiString, setCookieBlockedReasonToAttribute, DirectSocketType, DirectSocketStatus, DirectSocketChunkType, TargetManager3, UIStrings$12, str_$11, i18nString$L, i18nLazyString$e, requestToManagerMap, CONNECTION_TYPES, NetworkManager2, Events$c, BlockingConditions, NoThrottlingConditions, OfflineConditions, slow3GTargetLatency, Slow3GConditions, slow4GTargetLatency, Slow4GConditions, fast4GTargetLatency, Fast4GConditions, MAX_EAGER_POST_REQUEST_BODY_LENGTH, MAX_RESPONSE_BODY_TOTAL_BUFFER_LENGTH, FetchDispatcher, NetworkDispatcher, RequestURLPattern, RequestCondition, RequestConditions, AppliedNetworkConditions, MultitargetNetworkManager, InterceptedRequest, ExtraInfoBuilder, THROTTLING_CONDITIONS_LOOKUP, UIStrings$11, str_$10, i18nString$K, PageResourceLoader, BASE64_CHARS, BASE64_CODES, VLQ_BASE_SHIFT$1, VLQ_BASE_MASK$1, VLQ_CONTINUATION_MASK$1, TokenIterator$1, DEFAULT_DECODE_OPTIONS, DEFAULT_SCOPE_STATE, DEFAULT_RANGE_STATE, Decoder, formatterWorkerPoolInstance, FormatterWorkerPool, Task, FormatterWorkerPool$1, IdentityFormatterSourceMapping, FormatterSourceMappingImpl, ScriptFormatter, formatter, scopeTrees, UIStrings$10, str_$$, i18nString$J, SourceMapScopeChainEntry, SourceMapScopeRemoteObject, SourceMapScopesInfo, _a$5, SourceMapEntry, SourceMap, VLQ_BASE_SHIFT, VLQ_BASE_MASK, VLQ_CONTINUATION_MASK, TokenIterator2, SourceMapCache, IN_MEMORY_INSTANCE, SourceMapManager, Events$b, CSSModel, Events$a, PseudoStateMarker, Edit, CSSLocation, CSSDispatcher, ComputedStyleLoader, InlineStyleResult, CSSPropertyTracker, StylePollingInterval, frameManagerInstance, FrameManager2, OverlayColorGenerator, OverlayPersistentHighlighter, UIStrings$$, str_$_, i18nString$I, platformOverlayDimensions, OverlayModel, WindowControls, DefaultHighlighter, SourceOrderHighlighter, HeapProfilerModel, HeapProfilerDispatcher, RuntimeModel, Events$9, RuntimeDispatcher, ExecutionContext3, DOMNodeEvents, DOMNode, DeferredDOMNode, DOMNodeShortcut, DOMDocument, AdoptedStyleSheet, DOMModel, Events$8, DOMDispatcher, domModelUndoStackInstance, DOMModelUndoStack, Resource, SecurityOriginManager, Events$7, StorageKeyManager, ResourceTreeModel, Events$6, ResourceTreeFrame, PageDispatcher, UIStrings$_, str_$Z, i18nString$H, scriptCacheInstance, Script, frameIdSymbol, sourceURLRegex, UIStrings$Z, str_$Y, i18nString$G, WASM_SYMBOLS_PRIORITY, DebuggerModel, debuggerIdToModel, PauseOnExceptionsState, Events$5, DebuggerDispatcher, Location$1, BreakLocation, CallFrame, Scope2, DebuggerPausedDetails, LOGPOINT_SOURCE_URL, COND_BREAKPOINT_SOURCE_URL, AccessibilityNode, AccessibilityModel, DEVTOOLS_ANIMATIONS_WORLD_NAME, REPORT_SCROLL_POSITION_BINDING_NAME, getScrollListenerNameInPage, AnimationDOMNode, AnimationModel, Events$4, AnimationImpl, AnimationEffect, KeyframesRule, KeyframeStyle, AnimationGroup, AnimationDispatcher, AutofillModel, UIStrings$Y, str_$X, UIStrings$X, str_$W, i18nString$F, CompilerSourceMappingContentProvider, UIStrings$W, str_$V, UIStrings$V, str_$U, FrontendMessageType, UIStrings$U, str_$T, i18nString$E, CPUProfilerModel, LogModel, UIStrings$T, str_$S, i18nString$D, ConsoleModel, Events$3, ConsoleMessage2, EmulationModel, UIStrings$S, str_$R, i18nLazyString$d, CPUThrottlingRates, CalibrationError, DOMDebuggerModel, Marker, DOMBreakpoint, EventListener, EventBreakpointsModel, IssuesModel, PageLoad, pageLoadForRequest, PaintProfilerModel, PaintProfilerSnapshot, PaintProfilerLogItem, PerformanceMetricsModel, PreloadingModel, PreloadDispatcher, DocumentPreloadingData, RuleSetRegistry, PreloadPipeline, PreloadingAttemptRegistry, SourceRegistry, ScreenCaptureModel, StorageBucketsModel, UIStrings$R, str_$Q, i18nString$C, ServiceWorkerCacheModel, Cache$1, UIStrings$Q, str_$P, i18nString$B, i18nLazyString$c, ServiceWorkerManager, ServiceWorkerDispatcher, ServiceWorkerVersionState, ServiceWorkerRouterRule, ServiceWorkerVersion, ServiceWorkerRegistration, ServiceWorkerContextNamer, WebAuthnModel, WebAuthnDispatcher, StackTraceImpl, FragmentImpl, AsyncFragmentImpl, FrameImpl, DebuggableFragmentImpl, DebuggableFrameImpl, DebuggableFrameFlavor, StackTrace, stack_trace, FrameNode, Trie2, _a$4, StackTraceModel, UIStrings$P, str_$O, i18nString$A, UISourceCode, Events$2, UILocation, UIFunctionBounds, Message2, UISourceCodeMetadata, projectTypes, ProjectStore, WorkspaceImpl, Events$1, UIStrings$O, str_$N, i18nString$z, IgnoreListManager, scriptToRange, UIStrings$N, str_$M, i18nString$y, ContentProviderBasedProject, uiSourceCodeToAttributionMap, projectToTargetMap, networkProjectManagerInstance, NetworkProjectManager, NetworkProject, CompilerScriptMapping, LiveLocationWithPool, LiveLocationPool, SASSSourceMapping, uiSourceCodeToBinding, Binding$1, uiSourceCodeToStyleMap, StylesSourceMapping, StyleFile, CSSWorkspaceBinding, ModelInfo$1, LiveLocation, UIStrings$M, str_$L, i18nString$x, FormattingError, NamespaceObject, SourceScopeRemoteObject, SourceScope, ExtensionRemoteObject, DebuggerLanguagePluginManager, ModelData$1, DefaultScriptMapping, defaultScriptMappings, UIStrings$L, str_$K, i18nString$w, ResourceScriptMapping, ResourceScriptFile, DebuggerWorkspaceBinding, ModelData2, Location2, StackTraceTopFrameLocation, PresentationSourceFrameMessageManager, PresentationSourceFrameMessageHelper, FrozenLiveLocation, PresentationSourceFrameMessage, styleSheetRangeMap, scriptRangeMap, boundUISourceCodes, ResourceMapping, ModelInfo2, Binding3, Universe, Universe$1, foundation, protocol, __getOwnPropNames3, __commonJS2, require_create_entity_finder_api2, require_entities_nostats, require_nostats, require_nostats_subset, nostatsSubset, defaults2, Configuration, extensionPalette2, Extensions$1, File$1, Overlays, Timing$1, VALID_PROFILE_SOURCES, markerTypeGuards2, MarkerName2, pageLoadEventTypeGuards2, NO_NAVIGATION2, SelectorTimingsKey2, Categories2, TraceEvents, types$3, helpers$1, activeManager2, SyntheticEventsManager2, SyntheticEvents, milliToMicro2, secondsToMilli2, secondsToMicro2, microToMilli2, microToSeconds2, Timing, DevToolsTimelineEventCategory2, parsedCategories2, VISIBLE_TRACE_EVENT_TYPES2, Trace, nodeIdCount2, makeTraceEntryNodeId2, makeEmptyTraceEntryTree2, makeEmptyTraceEntryNode2, TreeHelpers, Extensions, NON_RENDER_BLOCKING_VALUES2, HIGH_NETWORK_PRIORITIES2, CACHEABLE_STATUS_CODES2, STATIC_RESOURCE_TYPES2, NON_NETWORK_SCHEMES$1, SECURE_LOCALHOST_DOMAINS3, Network, _a$3, SamplesIntegrator2, SamplesIntegrator$1, helpers, animationFrameStarts2, animationFrameEnds2, animationFramePresentations2, animationFrames2, presentationForFrame2, isEnabled2, AnimationFramesHandler, animations2, animationsSyntheticEvents2, AnimationHandler, flowDataByGroupToken2, boundFlowData2, flowsById2, flowEvents2, nonFlowEvents2, flows2, ID_COMPONENT_SEPARATOR2, FlowsHandler, runningInProcessEvents2, doneWithProcessEvents2, createdSyntheticEvents2, utilityThreads2, v8HelperThreads2, AuctionWorkletsHandler, config$1, rendererProcessesByFrameId2, mainFrameId2, mainFrameURL2, framesByProcessId2, browserProcessId2, browserThreadId2, gpuProcessId2, gpuThreadId2, viewportRect2, devicePixelRatio3, processNames2, topLevelRendererIds2, traceBounds2, navigationsByFrameId2, navigationsByNavigationId2, softNavigationsById, finalDisplayUrlByNavigationId2, mainFrameNavigations2, threadsInProcess2, traceStartedTimeFromTracingStartedEvent2, eventPhasesOfInterestForTraceBounds2, traceIsGeneric2, CHROME_WEB_TRACE_EVENTS2, MetaHandler, MILLISECONDS_TO_MICROSECONDS2, SECONDS_TO_MICROSECONDS2, webSocketData2, linkPreconnectEvents2, requestMap2, requestsById2, requestsByTime2, requestIdsByURL, networkRequestEventByInitiatorUrl2, eventToInitiatorMap$1, entityMappings$1, NetworkRequestsHandler, ProfileNode2, ProfileTreeModel2, CPUProfileNode2, CPUProfileDataModel2, profilesInProcess2, entryToNode$2, preprocessedData2, PROFILE_SOURCES_BY_PRIORITY, SamplesHandler, processes2, entityMappings3, compositorTileWorkers2, entryToNode$1, completeEventStack2, config3, makeRendererProcess2, makeRendererThread2, getOrCreateRendererProcess2, getOrCreateRendererThread2, RendererHandler, schedulerToRunEntryPoints2, taskScheduleForTaskRunEvent2, asyncCallToScheduler2, runEntryPointToScheduler2, AsyncJSCallsHandler, domStatsByFrameId2, DOMStatsHandler, syntheticEvents2, measureTraceByTraceId2, performanceMeasureEvents2, performanceMarkEvents2, consoleTimings2, timestampEvents2, resourceTimingNames2, navTimingNames2, ignoredNames2, UserTimingsHandler, extensionTrackEntries2, extensionTrackData2, extensionMarkers2, entryToNode4, timeStampByName2, syntheticConsoleEntriesForTimingsTrack2, ExtensionTraceDataHandler, paintEvents2, snapshotEvents2, paintToSnapshotMap2, lastPaintForLayerId2, currentMainFrameLayerTreeId2, updateLayerEvents2, relevantEvents2, LayerTreeHandler, threadsInHandlerDataCache2, Threads, model2, relevantFrameEvents2, MAIN_FRAME_MARKERS2, TimelineFrameModel2, TimelineFrame2, LayerPaintEvent2, PendingFrame2, BeginFrameInfo2, TimelineFrameBeginFrameQueue2, FramesHandler, eventsInProcessThread2, mainGPUThreadTasks2, GPUHandler, paintImageEvents$1, decodeLazyPixelRefEvents2, paintImageByLazyPixelRef2, eventToPaintImage2, urlToPaintImage2, paintEventToCorrectedDisplaySize2, didCorrectForHostDpr2, ImagePaintingHandler, lastScheduleStyleRecalcByFrame2, lastInvalidationEventForFrame2, lastRecalcByFrame2, eventToInitiatorMap3, initiatorToEventsMap2, timerInstallEventsById2, requestIdleCallbackEventsById2, webSocketCreateEventsById2, schedulePostTaskCallbackEventsById2, InitiatorsHandler, frameStateByFrame2, maxInvalidationsPerEvent2, InvalidationsHandler, metricScoresByFrameId2, allMarkerEvents2, pageLoadEventsArray2, selectedLCPCandidateEvents2, PageLoadMetricsHandler, imagePaintsByNodeIdAndProcess2, lcpRequestByNavigationId2, LargestImagePaintHandler, textPaintByDOMNodeId2, LargestTextPaintHandler, unpairedAsyncEvents2, legacyScreenshotEvents2, modernScreenshotEvents2, syntheticScreenshots2, ScreenshotsHandler, MAX_CLUSTER_DURATION2, MAX_SHIFT_TIME_DELTA2, layoutShiftEvents2, layoutInvalidationEvents2, scheduleStyleInvalidationEvents2, styleRecalcInvalidationEvents2, renderFrameImplCreateChildFrameEvents2, domLoadingEvents2, layoutImageUnsizedEvents2, remoteFonts2, backendNodeIds2, prePaintEvents2, paintImageEvents3, sessionMaxScore2, clsWindowID2, clusters2, clustersByNavigationId2, scoreRecords2, LayoutShiftsHandler, updateCountersByProcess2, MemoryHandler, frames2, PageFramesHandler, scriptById2, frameIdByIsolate, ScriptsHandler, lastRecalcStyleEvent2, lastInvalidatedNode2, selectorDataForRecalcStyle2, invalidatedNodeList2, SelectorStatsHandler, beginCommitCompositorFrameEvents2, parseMetaViewportEvents2, LONG_INTERACTION_THRESHOLD2, INP_GOOD_TIMING2, INP_MEDIUM_TIMING2, longestInteractionEvent2, interactionEvents2, interactionEventsWithNoNesting2, eventTimingStartEventsForInteractions2, eventTimingEndEventsForInteractions2, pointerEventTypes2, keyboardEventTypes2, UserInteractionsHandler, sessionIdEvents2, workerIdByThread2, workerURLById2, WorkersHandler, warningsPerEvent2, eventsPerWarning2, allEventsStack2, jsInvokeStack2, taskReflowEvents2, longTaskEvents2, FORCED_REFLOW_THRESHOLD2, LONG_MAIN_THREAD_TASK_THRESHOLD2, WarningsHandler, ModelHandlers, types$2, handlers, EntityMapper, EntityMapper$1, EventsSerializer, EventsSerializer$1, filmStripCache, FilmStrip, stackTraceForEventInTrace2, StackTraceForEvent, Initiators, IDLE_FUNCTION_CALL_NAMES, MainThreadActivity, ABSOLUTE_SIZE_THRESHOLD_BYTES2, RELATIVE_SIZE_THRESHOLD2, ScriptDuplication, TraceFilter2, VisibleEventsFilter2, InvisibleEventsFilter, ExclusiveNameFilter2, TraceFilter$1, Node$1, TopDownNode, TopDownRootNode, BottomUpRootNode2, GroupNode2, BottomUpNode2, TraceTree, ThirdParties$1, extras, MIN_PASSING_SCORE3, MAX_AVERAGE_SCORE3, MIN_AVERAGE_SCORE3, MAX_FAILING_SCORE3, Statistics, GRAPH_SAVINGS_PRECISION2, Common, InsightWarning2, InsightCategory2, types$1, UIStrings$K, str_$J, i18nString$v, IGNORE_THRESHOLD_IN_PERCENT2, Cache3, UIStrings$J, str_$I, i18nString$u, ACTIONABLE_FAILURE_REASONS2, ROOT_CAUSE_WINDOW2, CLSCulprits, UIStrings$I, str_$H, i18nString$t, TOO_SLOW_THRESHOLD_MS2, TARGET_MS2, IGNORE_THRESHOLD_IN_BYTES2, DocumentLatency, UIStrings$H, str_$G, i18nString$s, DOM_SIZE_DURATION_THRESHOLD2, LAYOUT_OBJECTS_THRESHOLD2, STYLE_RECALC_ELEMENTS_THRESHOLD2, DOMSize, UIStrings$G, str_$F, i18nString$r, DuplicatedJavaScript, UIStrings$F, str_$E, i18nString$q, FontDisplay, UIStrings$E, str_$D, i18nString$p, ForcedReflow, UIStrings$D, str_$C, i18nString$o, TARGET_BYTES_PER_PIXEL_AVIF2, GIF_SIZE_THRESHOLD2, BYTE_SAVINGS_THRESHOLD2, BYTE_SAVINGS_THRESHOLD_RESPONSIVE_BREAKPOINTS2, ImageOptimizationType2, ImageDelivery, UIStrings$C, str_$B, i18nString$n, INPBreakdown, UIStrings$B, str_$A, i18nString$m, LCPBreakdown, UIStrings$A, str_$z, i18nString$l, LCPDiscovery, polyfill_module_data_default2, polyfill_graph_data_default2, polyfillModuleData2, graph$1, CodePatternMatcher2, matcher2, legacyJavascript, detectLegacyJavaScript3, UIStrings$z, str_$y, i18nString$k, BYTE_THRESHOLD2, LegacyJavaScript, UIStrings$y, str_$x, i18nString$j, ModernHTTP, UIStrings$x, str_$w, i18nString$i, nonCriticalResourceTypes2, PRECONNECT_SOCKET_MAX_IDLE_IN_MS2, IGNORE_THRESHOLD_IN_MILLISECONDS2, TOO_MANY_PRECONNECTS_THRESHOLD2, NetworkDependencyTree, UIStrings$w, str_$v, i18nString$h, MINIMUM_WASTED_MS2, RenderBlocking, UIStrings$v, str_$u, i18nString$g, slowCSSSelectorThreshold2, SlowCSSSelector, UIStrings$u, str_$t, i18nString$f, ThirdParties, UIStrings$t, str_$s, i18nString$e, Viewport, Models, insights, LanternError2, UrlUtils3, INITIAL_CWD2, DEFAULT_SERVER_RESPONSE_PERCENTAGE2, SERVER_RESPONSE_PERCENTAGE_OF_TTFB2, NetworkAnalyzer2, core, BaseNode2, CPUNode2, NON_NETWORK_SCHEMES4, NetworkNode2, SCHEDULABLE_TASK_TITLE_LH3, SCHEDULABLE_TASK_TITLE_ALT13, SCHEDULABLE_TASK_TITLE_ALT23, SCHEDULABLE_TASK_TITLE_ALT33, SIGNIFICANT_DUR_THRESHOLD_MS2, IGNORED_MIME_TYPES_REGEX2, PageDependencyGraph2, graph2, Metric2, FirstContentfulPaint2, CRITICAL_LONG_TASK_THRESHOLD2, Interactive2, LargestContentfulPaint2, MaxPotentialFID2, mobileSlow4GRtt2, SpeedIndex2, BLOCKING_TIME_THRESHOLD2, TBTUtils, TotalBlockingTime2, metrics$1, INITIAL_CONGESTION_WINDOW2, TCP_SEGMENT_SIZE2, TCPConnection2, DEFAULT_SERVER_RESPONSE_TIME2, TLS_SCHEMES2, CONNECTIONS_PER_ORIGIN2, ConnectionPool2, DEVTOOLS_RTT_ADJUSTMENT_FACTOR2, DEVTOOLS_THROUGHPUT_ADJUSTMENT_FACTOR2, throttling3, Constants2, DNS_RESOLUTION_RTT_MULTIPLIER2, DNSCache2, SimulatorTimingMap2, defaultThrottling2, DEFAULT_MAXIMUM_CONCURRENT_REQUESTS2, DEFAULT_LAYOUT_TASK_MULTIPLIER2, DEFAULT_MAXIMUM_CPU_TASK_DURATION2, NodeState2, PriorityStartTimePenalty2, ALL_SIMULATION_NODE_TIMINGS2, Simulator2, simulation, NetworkRequestTypes2, types, lantern, LanternComputationData, _a$2, TraceParseProgressEvent2, TraceProcessor3, Processor, Model, ModelUpdateEvent, ModelImpl, UIStrings$s, EventCategory2, mainEventCategories, str_$r, i18nString$d, TimelineRecordStyle, TimelineCategory, categoryStyles, eventStylesMap, Styles, UIStrings$r, str_$q, i18nString$c, Name2, trace, instance, Prototypes, AnnotationType, AnnotationRepository, Size, UIStrings$q, str_$p, i18nLazyString$b, Horizontal, Vertical, HorizontalSpanned, VerticalSpanned, Type$1, Show, UIStrings$p, str_$o, i18nString$b, deviceModeModelInstance, DeviceModeModel, Insets, Rect, Type, MinDeviceSize, MaxDeviceSize, MinDeviceScaleFactor, MaxDeviceScaleFactor, mobileUserAgent, defaultMobileUserAgent, defaultMobileUserAgentMetadata, defaultMobileScaleFactor, UIStrings$o, str_$n, i18nString$a, CRUX_API_KEY, DEFAULT_ENDPOINT, cruxManagerInstance, DEVICE_SCOPE_LIST, pageScopeList, metrics, CrUXManager, _a$1, SourceMappingsUpdated, resolvedCodeLocationDataNames, SourceMapsResolver, AICallTree, ExcludeCompileCodeFilter, SelectedEventDurationFilter, MinDurationFilter, AIQueries, UIStrings$n, str_$m, i18nString$9, networkLogInstance, NetworkLog, consoleMessageToRequest, Events, UIStrings$m, str_$l, defaultTimeFormatterOptions, defaultByteFormatterOptions, timeFormatters, byteFormatters, _a3, MAX_HEADERS_SIZE, MAX_BODY_SIZE, NetworkRequestFormatter, allowedHeaders, PerformanceTraceFormatter, PerformanceInsightFormatter, AgentFocus, UIStrings$l, str_$k, Issue, structuredHeaderLink, AttributionReportingIssue, _defaults, escapeTest, escapeReplace, escapeTestNoEncode, escapeReplaceNoEncode, escapeReplacements, getEscapeReplacement, unescapeTest, caret, noopTest, _Tokenizer, newline, blockCode, fences, hr, heading, bullet, lheading, _paragraph, blockText, _blockLabel, def, list, _tag, _comment, html, paragraph, blockquote, blockNormal, gfmTable, blockGfm, blockPedantic, escape$2, inlineCode, br, inlineText, _punctuation, punctuation, blockSkip, emStrongLDelim, emStrongRDelimAst, emStrongRDelimUnd, anyPunctuation, autolink, _inlineComment, tag, _inlineLabel, link, reflink, nolink, reflinkSearch, inlineNormal, inlinePedantic, inlineGfm, inlineBreaks, block, inline, _Lexer, _Renderer, _TextRenderer, _Parser, _Hooks, Marked, markedInstance, options, setOptions, use, walkTokens, parseInline, parse, parser, lexer, marked_esm, marked, validPlaceholderMatchPattern, validPlaceholderNamePattern, MarkdownIssueDescription, UIStrings$k, str_$j, i18nLazyString$a, ContentSecurityPolicyIssue, cspURLViolation, cspInlineViolation, cspEvalViolation, cspTrustedTypesSinkViolation, cspTrustedTypesPolicyViolation, trustedTypesSinkViolationCode, trustedTypesPolicyViolationCode, issueDescriptions$7, UIStrings$j, str_$i, i18nString$8, CookieDeprecationMetadataIssue, UIStrings$i, str_$h, i18nLazyString$9, CookieIssue, sameSiteUnspecifiedWarnRead, sameSiteUnspecifiedWarnSet, sameSiteNoneInsecureErrorRead, sameSiteNoneInsecureErrorSet, sameSiteNoneInsecureWarnRead, sameSiteNoneInsecureWarnSet, schemefulSameSiteArticles, attributeValueExceedsMaxSize, warnDomainNonAscii, excludeDomainNonAscii, excludeBlockedWithinRelatedWebsiteSet, cookieCrossSiteRedirectDowngrade, ExcludePortMismatch, ExcludeSchemeMismatch, placeholderDescriptionForInvisibleIssues, issueDescriptions$6, UIStrings$h, str_$g, i18nString$7, CorsIssue, UIStrings$g, DEPRECATIONS_METADATA2, UIStrings$f, str_$f, i18nLazyString$8, strDeprecation, i18nLazyDeprecationString, DeprecationIssue, ElementAccessibilityIssue, issueDescriptions$5, UIStrings$e, str_$e, i18nLazyString$7, GenericIssue, genericFormLabelForNameError, genericFormInputWithNoLabelError, genericFormAutocompleteAttributeEmptyError, genericFormDuplicateIdForInputError, genericFormAriaLabelledByToNonExistingIdError, genericFormEmptyIdAndNameAttributesForInputError, genericFormInputAssignedAutocompleteValueToIdOrNameAttributeError, genericFormInputHasWrongButWellIntendedAutocompleteValue, genericFormLabelForMatchesNonExistingIdError, genericFormLabelHasNeitherForNorNestedInputError, genericResponseWasBlockedbyORB, genericNavigationEntryMarkedSkippable, issueDescriptions$4, issueTypes, UIStrings$d, str_$d, i18nString$6, HeavyAdIssue, UIStrings$c, str_$c, i18nString$5, LowTextContrastIssue, UIStrings$b, str_$b, i18nString$4, MixedContentIssue, UIStrings$a, str_$a, i18nString$3, PartitioningBlobURLIssue, PermissionElementIssue, UIStrings$9, str_$9, i18nString$2, QuirksModeIssue, UIStrings$8, str_$8, i18nString$1, SharedArrayBufferIssue, AggregatedIssue, IssueAggregator, UIStrings$7, str_$7, i18nString19, BounceTrackingIssue, UIStrings$6, str_$6, i18nLazyString$6, ClientHintIssue, issueDescriptions$3, UIStrings$5, str_$5, i18nLazyString$5, ConnectionAllowlistIssue, UIStrings$4, str_$4, i18nLazyString$4, CrossOriginEmbedderPolicyIssue, issueDescriptions$2, UIStrings$3, str_$3, i18nLazyString$3, FederatedAuthRequestIssue, issueDescriptions$1, PropertyRuleIssue, UIStrings$2, str_$2, i18nLazyString$2, SharedDictionaryIssue, specLinks, issueDescriptions, lateImportStylesheetLoadingCode, StylesheetLoadingIssue, SourceFrameIssuesManager, IssueMessage, UIStrings$1, str_$1, i18nLazyString$1, SRIMessageSignatureIssue, UIStrings125, str_105, i18nLazyString, UnencodedDigestIssue, issuesManagerInstance, issueCodeHandlers, IssuesManager, mcp;
var init_third_party = __esm({
  async "../../node_modules/chrome-devtools-mcp/build/src/third_party/index.js"() {
    init_lighthouse_devtools_mcp_bundle();
    commonjsGlobal = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {};
    es_promise_withResolvers = {};
    objectGetOwnPropertyDescriptor = {};
    objectPropertyIsEnumerable = {};
    sharedStore = { exports: {} };
    objectDefineProperty = {};
    makeBuiltIn = { exports: {} };
    objectGetOwnPropertyNames = {};
    objectGetOwnPropertySymbols = {};
    newPromiseCapability = {};
    requireEs_promise_withResolvers();
    es_set_union_v2 = {};
    requireEs_set_union_v2();
    iteratorHelpers = {};
    iteratorHelpersStage3 = {};
    esnext_asyncIterator_constructor = {};
    objectDefineProperties = {};
    esnext_asyncIterator_drop = {};
    esnext_asyncIterator_every = {};
    esnext_asyncIterator_filter = {};
    esnext_asyncIterator_find = {};
    esnext_asyncIterator_flatMap = {};
    esnext_asyncIterator_forEach = {};
    esnext_asyncIterator_from = {};
    esnext_asyncIterator_map = {};
    esnext_asyncIterator_reduce = {};
    esnext_asyncIterator_some = {};
    esnext_asyncIterator_take = {};
    esnext_asyncIterator_toArray = {};
    esnext_iterator_constructor = {};
    es_iterator_constructor = {};
    esnext_iterator_drop = {};
    es_iterator_drop = {};
    esnext_iterator_every = {};
    es_iterator_every = {};
    esnext_iterator_filter = {};
    es_iterator_filter = {};
    esnext_iterator_find = {};
    es_iterator_find = {};
    esnext_iterator_flatMap = {};
    es_iterator_flatMap = {};
    esnext_iterator_forEach = {};
    es_iterator_forEach = {};
    esnext_iterator_from = {};
    es_iterator_from = {};
    esnext_iterator_map = {};
    es_iterator_map = {};
    esnext_iterator_reduce = {};
    es_iterator_reduce = {};
    esnext_iterator_some = {};
    es_iterator_some = {};
    esnext_iterator_take = {};
    es_iterator_take = {};
    esnext_iterator_toArray = {};
    es_iterator_toArray = {};
    esnext_iterator_toAsync = {};
    esnext_asyncIterator_asIndexedPairs = {};
    esnext_asyncIterator_indexed = {};
    esnext_iterator_asIndexedPairs = {};
    esnext_iterator_indexed = {};
    requireIteratorHelpers();
    align = {
      right: alignRight,
      center: alignCenter
    };
    top = 0;
    right = 1;
    bottom = 2;
    left = 3;
    UI = class {
      constructor(opts) {
        var _a4;
        this.width = opts.width;
        this.wrap = (_a4 = opts.wrap) !== null && _a4 !== void 0 ? _a4 : true;
        this.rows = [];
      }
      span(...args2) {
        const cols = this.div(...args2);
        cols.span = true;
      }
      resetOutput() {
        this.rows = [];
      }
      div(...args2) {
        if (args2.length === 0) {
          this.div("");
        }
        if (this.wrap && this.shouldApplyLayoutDSL(...args2) && typeof args2[0] === "string") {
          return this.applyLayoutDSL(args2[0]);
        }
        const cols = args2.map((arg) => {
          if (typeof arg === "string") {
            return this.colFromString(arg);
          }
          return arg;
        });
        this.rows.push(cols);
        return cols;
      }
      shouldApplyLayoutDSL(...args2) {
        return args2.length === 1 && typeof args2[0] === "string" && /[\t\n]/.test(args2[0]);
      }
      applyLayoutDSL(str) {
        const rows = str.split("\n").map((row) => row.split("	"));
        let leftColumnWidth = 0;
        rows.forEach((columns) => {
          if (columns.length > 1 && mixin$1.stringWidth(columns[0]) > leftColumnWidth) {
            leftColumnWidth = Math.min(Math.floor(this.width * 0.5), mixin$1.stringWidth(columns[0]));
          }
        });
        rows.forEach((columns) => {
          this.div(...columns.map((r, i) => {
            return {
              text: r.trim(),
              padding: this.measurePadding(r),
              width: i === 0 && columns.length > 1 ? leftColumnWidth : void 0
            };
          }));
        });
        return this.rows[this.rows.length - 1];
      }
      colFromString(text) {
        return {
          text,
          padding: this.measurePadding(text)
        };
      }
      measurePadding(str) {
        const noAnsi = mixin$1.stripAnsi(str);
        return [0, noAnsi.match(/\s*$/)[0].length, 0, noAnsi.match(/^\s*/)[0].length];
      }
      toString() {
        const lines = [];
        this.rows.forEach((row) => {
          this.rowToString(row, lines);
        });
        return lines.filter((line) => !line.hidden).map((line) => line.text).join("\n");
      }
      rowToString(row, lines) {
        this.rasterize(row).forEach((rrow, r) => {
          let str = "";
          rrow.forEach((col, c) => {
            const { width } = row[c];
            const wrapWidth = this.negatePadding(row[c]);
            let ts = col;
            if (wrapWidth > mixin$1.stringWidth(col)) {
              ts += " ".repeat(wrapWidth - mixin$1.stringWidth(col));
            }
            if (row[c].align && row[c].align !== "left" && this.wrap) {
              const fn = align[row[c].align];
              ts = fn(ts, wrapWidth);
              if (mixin$1.stringWidth(ts) < wrapWidth) {
                ts += " ".repeat((width || 0) - mixin$1.stringWidth(ts) - 1);
              }
            }
            const padding = row[c].padding || [0, 0, 0, 0];
            if (padding[left]) {
              str += " ".repeat(padding[left]);
            }
            str += addBorder(row[c], ts, "| ");
            str += ts;
            str += addBorder(row[c], ts, " |");
            if (padding[right]) {
              str += " ".repeat(padding[right]);
            }
            if (r === 0 && lines.length > 0) {
              str = this.renderInline(str, lines[lines.length - 1]);
            }
          });
          lines.push({
            text: str.replace(/ +$/, ""),
            span: row.span
          });
        });
        return lines;
      }
      renderInline(source2, previousLine) {
        const match = source2.match(/^ */);
        const leadingWhitespace = match ? match[0].length : 0;
        const target = previousLine.text;
        const targetTextWidth = mixin$1.stringWidth(target.trimRight());
        if (!previousLine.span) {
          return source2;
        }
        if (!this.wrap) {
          previousLine.hidden = true;
          return target + source2;
        }
        if (leadingWhitespace < targetTextWidth) {
          return source2;
        }
        previousLine.hidden = true;
        return target.trimRight() + " ".repeat(leadingWhitespace - targetTextWidth) + source2.trimLeft();
      }
      rasterize(row) {
        const rrows = [];
        const widths = this.columnWidths(row);
        let wrapped;
        row.forEach((col, c) => {
          col.width = widths[c];
          if (this.wrap) {
            wrapped = mixin$1.wrap(col.text, this.negatePadding(col), { hard: true }).split("\n");
          } else {
            wrapped = col.text.split("\n");
          }
          if (col.border) {
            wrapped.unshift("." + "-".repeat(this.negatePadding(col) + 2) + ".");
            wrapped.push("'" + "-".repeat(this.negatePadding(col) + 2) + "'");
          }
          if (col.padding) {
            wrapped.unshift(...new Array(col.padding[top] || 0).fill(""));
            wrapped.push(...new Array(col.padding[bottom] || 0).fill(""));
          }
          wrapped.forEach((str, r) => {
            if (!rrows[r]) {
              rrows.push([]);
            }
            const rrow = rrows[r];
            for (let i = 0; i < c; i++) {
              if (rrow[i] === void 0) {
                rrow.push("");
              }
            }
            rrow.push(str);
          });
        });
        return rrows;
      }
      negatePadding(col) {
        let wrapWidth = col.width || 0;
        if (col.padding) {
          wrapWidth -= (col.padding[left] || 0) + (col.padding[right] || 0);
        }
        if (col.border) {
          wrapWidth -= 4;
        }
        return wrapWidth;
      }
      columnWidths(row) {
        if (!this.wrap) {
          return row.map((col) => {
            return col.width || mixin$1.stringWidth(col.text);
          });
        }
        let unset = row.length;
        let remainingWidth = this.width;
        const widths = row.map((col) => {
          if (col.width) {
            unset--;
            remainingWidth -= col.width;
            return col.width;
          }
          return void 0;
        });
        const unsetWidth = unset ? Math.floor(remainingWidth / unset) : 0;
        return widths.map((w, i) => {
          if (w === void 0) {
            return Math.max(unsetWidth, _minWidth(row[i]));
          }
          return w;
        });
      }
    };
    regex = ansiRegex();
    emojiRegex$2 = () => {
      return /[#*0-9]\uFE0F?\u20E3|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26AA\u26B0\u26B1\u26BD\u26BE\u26C4\u26C8\u26CF\u26D1\u26E9\u26F0-\u26F5\u26F7\u26F8\u26FA\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2757\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B55\u3030\u303D\u3297\u3299]\uFE0F?|[\u261D\u270C\u270D](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\u270A\u270B](?:\uD83C[\uDFFB-\uDFFF])?|[\u23E9-\u23EC\u23F0\u23F3\u25FD\u2693\u26A1\u26AB\u26C5\u26CE\u26D4\u26EA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2795-\u2797\u27B0\u27BF\u2B50]|\u26D3\uFE0F?(?:\u200D\uD83D\uDCA5)?|\u26F9(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\u2764\uFE0F?(?:\u200D(?:\uD83D\uDD25|\uD83E\uDE79))?|\uD83C(?:[\uDC04\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]\uFE0F?|[\uDF85\uDFC2\uDFC7](?:\uD83C[\uDFFB-\uDFFF])?|[\uDFC4\uDFCA](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDFCB\uDFCC](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF43\uDF45-\uDF4A\uDF4C-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uDDE6\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF]|\uDDE7\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF]|\uDDE8\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF7\uDDFA-\uDDFF]|\uDDE9\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF]|\uDDEA\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA]|\uDDEB\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7]|\uDDEC\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE]|\uDDED\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA]|\uDDEE\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9]|\uDDEF\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5]|\uDDF0\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF]|\uDDF1\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE]|\uDDF2\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF]|\uDDF3\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF]|\uDDF4\uD83C\uDDF2|\uDDF5\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE]|\uDDF6\uD83C\uDDE6|\uDDF7\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC]|\uDDF8\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF]|\uDDF9\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF]|\uDDFA\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF]|\uDDFB\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA]|\uDDFC\uD83C[\uDDEB\uDDF8]|\uDDFD\uD83C\uDDF0|\uDDFE\uD83C[\uDDEA\uDDF9]|\uDDFF\uD83C[\uDDE6\uDDF2\uDDFC]|\uDF44(?:\u200D\uD83D\uDFEB)?|\uDF4B(?:\u200D\uD83D\uDFE9)?|\uDFC3(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDFF3\uFE0F?(?:\u200D(?:\u26A7\uFE0F?|\uD83C\uDF08))?|\uDFF4(?:\u200D\u2620\uFE0F?|\uDB40\uDC67\uDB40\uDC62\uDB40(?:\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDC73\uDB40\uDC63\uDB40\uDC74|\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F)?)|\uD83D(?:[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3]\uFE0F?|[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC](?:\uD83C[\uDFFB-\uDFFF])?|[\uDC6E-\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4\uDEB5](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD74\uDD90](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC25\uDC27-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE41\uDE43\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED8\uDEDC-\uDEDF\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB\uDFF0]|\uDC08(?:\u200D\u2B1B)?|\uDC15(?:\u200D\uD83E\uDDBA)?|\uDC26(?:\u200D(?:\u2B1B|\uD83D\uDD25))?|\uDC3B(?:\u200D\u2744\uFE0F?)?|\uDC41\uFE0F?(?:\u200D\uD83D\uDDE8\uFE0F?)?|\uDC68(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDC68\uDC69]\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?))?|\uDC69(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?[\uDC68\uDC69]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?|\uDC69\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?))|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFC-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFC-\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFD-\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFD\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFE])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFE]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFE])))?))?|\uDD75(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDE2E(?:\u200D\uD83D\uDCA8)?|\uDE35(?:\u200D\uD83D\uDCAB)?|\uDE36(?:\u200D\uD83C\uDF2B\uFE0F?)?|\uDE42(?:\u200D[\u2194\u2195]\uFE0F?)?|\uDEB6(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?)|\uD83E(?:[\uDD0C\uDD0F\uDD18-\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5\uDEC3-\uDEC5\uDEF0\uDEF2-\uDEF8](?:\uD83C[\uDFFB-\uDFFF])?|[\uDD26\uDD35\uDD37-\uDD39\uDD3C-\uDD3E\uDDB8\uDDB9\uDDCD\uDDCF\uDDD4\uDDD6-\uDDDD](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDDDE\uDDDF](?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD0D\uDD0E\uDD10-\uDD17\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCC\uDDD0\uDDE0-\uDDFF\uDE70-\uDE7C\uDE80-\uDE8A\uDE8E-\uDEC2\uDEC6\uDEC8\uDECD-\uDEDC\uDEDF-\uDEEA\uDEEF]|\uDDCE(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDDD1(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1|\uDDD1\u200D\uD83E\uDDD2(?:\u200D\uD83E\uDDD2)?|\uDDD2(?:\u200D\uD83E\uDDD2)?))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE])))?))?|\uDEF1(?:\uD83C(?:\uDFFB(?:\u200D\uD83E\uDEF2\uD83C[\uDFFC-\uDFFF])?|\uDFFC(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFD-\uDFFF])?|\uDFFD(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])?|\uDFFE(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFD\uDFFF])?|\uDFFF(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFE])?))?)/g;
    };
    segmenter = new Intl.Segmenter();
    defaultIgnorableCodePointRegex = /^\p{Default_Ignorable_Code_Point}$/u;
    ANSI_BACKGROUND_OFFSET = 10;
    wrapAnsi16 = (offset = 0) => (code2) => `\x1B[${code2 + offset}m`;
    wrapAnsi256 = (offset = 0) => (code2) => `\x1B[${38 + offset};5;${code2}m`;
    wrapAnsi16m = (offset = 0) => (red, green, blue) => `\x1B[${38 + offset};2;${red};${green};${blue}m`;
    styles = {
      modifier: {
        reset: [0, 0],
        bold: [1, 22],
        dim: [2, 22],
        italic: [3, 23],
        underline: [4, 24],
        overline: [53, 55],
        inverse: [7, 27],
        hidden: [8, 28],
        strikethrough: [9, 29]
      },
      color: {
        black: [30, 39],
        red: [31, 39],
        green: [32, 39],
        yellow: [33, 39],
        blue: [34, 39],
        magenta: [35, 39],
        cyan: [36, 39],
        white: [37, 39],
        blackBright: [90, 39],
        gray: [90, 39],
        grey: [90, 39],
        redBright: [91, 39],
        greenBright: [92, 39],
        yellowBright: [93, 39],
        blueBright: [94, 39],
        magentaBright: [95, 39],
        cyanBright: [96, 39],
        whiteBright: [97, 39]
      },
      bgColor: {
        bgBlack: [40, 49],
        bgRed: [41, 49],
        bgGreen: [42, 49],
        bgYellow: [43, 49],
        bgBlue: [44, 49],
        bgMagenta: [45, 49],
        bgCyan: [46, 49],
        bgWhite: [47, 49],
        bgBlackBright: [100, 49],
        bgGray: [100, 49],
        bgGrey: [100, 49],
        bgRedBright: [101, 49],
        bgGreenBright: [102, 49],
        bgYellowBright: [103, 49],
        bgBlueBright: [104, 49],
        bgMagentaBright: [105, 49],
        bgCyanBright: [106, 49],
        bgWhiteBright: [107, 49]
      }
    };
    Object.keys(styles.modifier);
    foregroundColorNames = Object.keys(styles.color);
    backgroundColorNames = Object.keys(styles.bgColor);
    [...foregroundColorNames, ...backgroundColorNames];
    ansiStyles = assembleStyles();
    ESCAPES = /* @__PURE__ */ new Set([
      "\x1B",
      "\x9B"
    ]);
    END_CODE = 39;
    ANSI_ESCAPE_BELL = "\x07";
    ANSI_CSI = "[";
    ANSI_OSC = "]";
    ANSI_SGR_TERMINATOR = "m";
    ANSI_ESCAPE_LINK = `${ANSI_OSC}8;;`;
    wrapAnsiCode = (code2) => `${ESCAPES.values().next().value}${ANSI_CSI}${code2}${ANSI_SGR_TERMINATOR}`;
    wrapAnsiHyperlink = (url) => `${ESCAPES.values().next().value}${ANSI_ESCAPE_LINK}${url}${ANSI_ESCAPE_BELL}`;
    wordLengths = (string2) => string2.split(" ").map((character) => stringWidth(character));
    wrapWord = (rows, word, columns) => {
      const characters = [...word];
      let isInsideEscape = false;
      let isInsideLinkEscape = false;
      let visible = stringWidth(stripAnsi(rows.at(-1)));
      for (const [index2, character] of characters.entries()) {
        const characterLength = stringWidth(character);
        if (visible + characterLength <= columns) {
          rows[rows.length - 1] += character;
        } else {
          rows.push(character);
          visible = 0;
        }
        if (ESCAPES.has(character)) {
          isInsideEscape = true;
          const ansiEscapeLinkCandidate = characters.slice(index2 + 1, index2 + 1 + ANSI_ESCAPE_LINK.length).join("");
          isInsideLinkEscape = ansiEscapeLinkCandidate === ANSI_ESCAPE_LINK;
        }
        if (isInsideEscape) {
          if (isInsideLinkEscape) {
            if (character === ANSI_ESCAPE_BELL) {
              isInsideEscape = false;
              isInsideLinkEscape = false;
            }
          } else if (character === ANSI_SGR_TERMINATOR) {
            isInsideEscape = false;
          }
          continue;
        }
        visible += characterLength;
        if (visible === columns && index2 < characters.length - 1) {
          rows.push("");
          visible = 0;
        }
      }
      if (!visible && rows.at(-1).length > 0 && rows.length > 1) {
        rows[rows.length - 2] += rows.pop();
      }
    };
    stringVisibleTrimSpacesRight = (string2) => {
      const words = string2.split(" ");
      let last2 = words.length;
      while (last2 > 0) {
        if (stringWidth(words[last2 - 1]) > 0) {
          break;
        }
        last2--;
      }
      if (last2 === words.length) {
        return string2;
      }
      return words.slice(0, last2).join(" ") + words.slice(last2).join("");
    };
    exec = (string2, columns, options2 = {}) => {
      if (options2.trim !== false && string2.trim() === "") {
        return "";
      }
      let returnValue = "";
      let escapeCode;
      let escapeUrl;
      const lengths = wordLengths(string2);
      let rows = [""];
      for (const [index2, word] of string2.split(" ").entries()) {
        if (options2.trim !== false) {
          rows[rows.length - 1] = rows.at(-1).trimStart();
        }
        let rowLength = stringWidth(rows.at(-1));
        if (index2 !== 0) {
          if (rowLength >= columns && (options2.wordWrap === false || options2.trim === false)) {
            rows.push("");
            rowLength = 0;
          }
          if (rowLength > 0 || options2.trim === false) {
            rows[rows.length - 1] += " ";
            rowLength++;
          }
        }
        if (options2.hard && lengths[index2] > columns) {
          const remainingColumns = columns - rowLength;
          const breaksStartingThisLine = 1 + Math.floor((lengths[index2] - remainingColumns - 1) / columns);
          const breaksStartingNextLine = Math.floor((lengths[index2] - 1) / columns);
          if (breaksStartingNextLine < breaksStartingThisLine) {
            rows.push("");
          }
          wrapWord(rows, word, columns);
          continue;
        }
        if (rowLength + lengths[index2] > columns && rowLength > 0 && lengths[index2] > 0) {
          if (options2.wordWrap === false && rowLength < columns) {
            wrapWord(rows, word, columns);
            continue;
          }
          rows.push("");
        }
        if (rowLength + lengths[index2] > columns && options2.wordWrap === false) {
          wrapWord(rows, word, columns);
          continue;
        }
        rows[rows.length - 1] += word;
      }
      if (options2.trim !== false) {
        rows = rows.map((row) => stringVisibleTrimSpacesRight(row));
      }
      const preString = rows.join("\n");
      const pre = [...preString];
      let preStringIndex = 0;
      for (const [index2, character] of pre.entries()) {
        returnValue += character;
        if (ESCAPES.has(character)) {
          const { groups } = new RegExp(`(?:\\${ANSI_CSI}(?<code>\\d+)m|\\${ANSI_ESCAPE_LINK}(?<uri>.*)${ANSI_ESCAPE_BELL})`).exec(preString.slice(preStringIndex)) || { groups: {} };
          if (groups.code !== void 0) {
            const code3 = Number.parseFloat(groups.code);
            escapeCode = code3 === END_CODE ? void 0 : code3;
          } else if (groups.uri !== void 0) {
            escapeUrl = groups.uri.length === 0 ? void 0 : groups.uri;
          }
        }
        const code2 = ansiStyles.codes.get(Number(escapeCode));
        if (pre[index2 + 1] === "\n") {
          if (escapeUrl) {
            returnValue += wrapAnsiHyperlink("");
          }
          if (escapeCode && code2) {
            returnValue += wrapAnsiCode(code2);
          }
        } else if (character === "\n") {
          if (escapeCode && code2) {
            returnValue += wrapAnsiCode(escapeCode);
          }
          if (escapeUrl) {
            returnValue += wrapAnsiHyperlink(escapeUrl);
          }
        }
        preStringIndex += character.length;
      }
      return returnValue;
    };
    (function(DefaultValuesForTypeKey2) {
      DefaultValuesForTypeKey2["BOOLEAN"] = "boolean";
      DefaultValuesForTypeKey2["STRING"] = "string";
      DefaultValuesForTypeKey2["NUMBER"] = "number";
      DefaultValuesForTypeKey2["ARRAY"] = "array";
    })(DefaultValuesForTypeKey || (DefaultValuesForTypeKey = {}));
    YargsParser = class {
      constructor(_mixin) {
        mixin = _mixin;
      }
      parse(argsInput, options2) {
        const opts = Object.assign({
          alias: void 0,
          array: void 0,
          boolean: void 0,
          config: void 0,
          configObjects: void 0,
          configuration: void 0,
          coerce: void 0,
          count: void 0,
          default: void 0,
          envPrefix: void 0,
          narg: void 0,
          normalize: void 0,
          string: void 0,
          number: void 0,
          __: void 0,
          key: void 0
        }, options2);
        const args2 = tokenizeArgString(argsInput);
        const inputIsString = typeof argsInput === "string";
        const aliases = combineAliases(Object.assign(/* @__PURE__ */ Object.create(null), opts.alias));
        const configuration = Object.assign({
          "boolean-negation": true,
          "camel-case-expansion": true,
          "combine-arrays": false,
          "dot-notation": true,
          "duplicate-arguments-array": true,
          "flatten-duplicate-arrays": true,
          "greedy-arrays": true,
          "halt-at-non-option": false,
          "nargs-eats-options": false,
          "negation-prefix": "no-",
          "parse-numbers": true,
          "parse-positional-numbers": true,
          "populate--": false,
          "set-placeholder-key": false,
          "short-option-groups": true,
          "strip-aliased": false,
          "strip-dashed": false,
          "unknown-options-as-args": false
        }, opts.configuration);
        const defaults3 = Object.assign(/* @__PURE__ */ Object.create(null), opts.default);
        const configObjects = opts.configObjects || [];
        const envPrefix = opts.envPrefix;
        const notFlagsOption = configuration["populate--"];
        const notFlagsArgv = notFlagsOption ? "--" : "_";
        const newAliases = /* @__PURE__ */ Object.create(null);
        const defaulted = /* @__PURE__ */ Object.create(null);
        const __ = opts.__ || mixin.format;
        const flags = {
          aliases: /* @__PURE__ */ Object.create(null),
          arrays: /* @__PURE__ */ Object.create(null),
          bools: /* @__PURE__ */ Object.create(null),
          strings: /* @__PURE__ */ Object.create(null),
          numbers: /* @__PURE__ */ Object.create(null),
          counts: /* @__PURE__ */ Object.create(null),
          normalize: /* @__PURE__ */ Object.create(null),
          configs: /* @__PURE__ */ Object.create(null),
          nargs: /* @__PURE__ */ Object.create(null),
          coercions: /* @__PURE__ */ Object.create(null),
          keys: []
        };
        const negative = /^-([0-9]+(\.[0-9]+)?|\.[0-9]+)$/;
        const negatedBoolean = new RegExp("^--" + configuration["negation-prefix"] + "(.+)");
        [].concat(opts.array || []).filter(Boolean).forEach(function(opt) {
          const key = typeof opt === "object" ? opt.key : opt;
          const assignment = Object.keys(opt).map(function(key2) {
            const arrayFlagKeys = {
              boolean: "bools",
              string: "strings",
              number: "numbers"
            };
            return arrayFlagKeys[key2];
          }).filter(Boolean).pop();
          if (assignment) {
            flags[assignment][key] = true;
          }
          flags.arrays[key] = true;
          flags.keys.push(key);
        });
        [].concat(opts.boolean || []).filter(Boolean).forEach(function(key) {
          flags.bools[key] = true;
          flags.keys.push(key);
        });
        [].concat(opts.string || []).filter(Boolean).forEach(function(key) {
          flags.strings[key] = true;
          flags.keys.push(key);
        });
        [].concat(opts.number || []).filter(Boolean).forEach(function(key) {
          flags.numbers[key] = true;
          flags.keys.push(key);
        });
        [].concat(opts.count || []).filter(Boolean).forEach(function(key) {
          flags.counts[key] = true;
          flags.keys.push(key);
        });
        [].concat(opts.normalize || []).filter(Boolean).forEach(function(key) {
          flags.normalize[key] = true;
          flags.keys.push(key);
        });
        if (typeof opts.narg === "object") {
          Object.entries(opts.narg).forEach(([key, value]) => {
            if (typeof value === "number") {
              flags.nargs[key] = value;
              flags.keys.push(key);
            }
          });
        }
        if (typeof opts.coerce === "object") {
          Object.entries(opts.coerce).forEach(([key, value]) => {
            if (typeof value === "function") {
              flags.coercions[key] = value;
              flags.keys.push(key);
            }
          });
        }
        if (typeof opts.config !== "undefined") {
          if (Array.isArray(opts.config) || typeof opts.config === "string") {
            [].concat(opts.config).filter(Boolean).forEach(function(key) {
              flags.configs[key] = true;
            });
          } else if (typeof opts.config === "object") {
            Object.entries(opts.config).forEach(([key, value]) => {
              if (typeof value === "boolean" || typeof value === "function") {
                flags.configs[key] = value;
              }
            });
          }
        }
        extendAliases(opts.key, aliases, opts.default, flags.arrays);
        Object.keys(defaults3).forEach(function(key) {
          (flags.aliases[key] || []).forEach(function(alias) {
            defaults3[alias] = defaults3[key];
          });
        });
        let error = null;
        checkConfiguration();
        let notFlags = [];
        const argv = Object.assign(/* @__PURE__ */ Object.create(null), { _: [] });
        const argvReturn = {};
        for (let i = 0; i < args2.length; i++) {
          const arg = args2[i];
          const truncatedArg = arg.replace(/^-{3,}/, "---");
          let broken;
          let key;
          let letters;
          let m;
          let next;
          let value;
          if (arg !== "--" && /^-/.test(arg) && isUnknownOptionAsArg(arg)) {
            pushPositional(arg);
          } else if (truncatedArg.match(/^---+(=|$)/)) {
            pushPositional(arg);
            continue;
          } else if (arg.match(/^--.+=/) || !configuration["short-option-groups"] && arg.match(/^-.+=/)) {
            m = arg.match(/^--?([^=]+)=([\s\S]*)$/);
            if (m !== null && Array.isArray(m) && m.length >= 3) {
              if (checkAllAliases(m[1], flags.arrays)) {
                i = eatArray(i, m[1], args2, m[2]);
              } else if (checkAllAliases(m[1], flags.nargs) !== false) {
                i = eatNargs(i, m[1], args2, m[2]);
              } else {
                setArg(m[1], m[2], true);
              }
            }
          } else if (arg.match(negatedBoolean) && configuration["boolean-negation"]) {
            m = arg.match(negatedBoolean);
            if (m !== null && Array.isArray(m) && m.length >= 2) {
              key = m[1];
              setArg(key, checkAllAliases(key, flags.arrays) ? [false] : false);
            }
          } else if (arg.match(/^--.+/) || !configuration["short-option-groups"] && arg.match(/^-[^-]+/)) {
            m = arg.match(/^--?(.+)/);
            if (m !== null && Array.isArray(m) && m.length >= 2) {
              key = m[1];
              if (checkAllAliases(key, flags.arrays)) {
                i = eatArray(i, key, args2);
              } else if (checkAllAliases(key, flags.nargs) !== false) {
                i = eatNargs(i, key, args2);
              } else {
                next = args2[i + 1];
                if (next !== void 0 && (!next.match(/^-/) || next.match(negative)) && !checkAllAliases(key, flags.bools) && !checkAllAliases(key, flags.counts)) {
                  setArg(key, next);
                  i++;
                } else if (/^(true|false)$/.test(next)) {
                  setArg(key, next);
                  i++;
                } else {
                  setArg(key, defaultValue(key));
                }
              }
            }
          } else if (arg.match(/^-.\..+=/)) {
            m = arg.match(/^-([^=]+)=([\s\S]*)$/);
            if (m !== null && Array.isArray(m) && m.length >= 3) {
              setArg(m[1], m[2]);
            }
          } else if (arg.match(/^-.\..+/) && !arg.match(negative)) {
            next = args2[i + 1];
            m = arg.match(/^-(.\..+)/);
            if (m !== null && Array.isArray(m) && m.length >= 2) {
              key = m[1];
              if (next !== void 0 && !next.match(/^-/) && !checkAllAliases(key, flags.bools) && !checkAllAliases(key, flags.counts)) {
                setArg(key, next);
                i++;
              } else {
                setArg(key, defaultValue(key));
              }
            }
          } else if (arg.match(/^-[^-]+/) && !arg.match(negative)) {
            letters = arg.slice(1, -1).split("");
            broken = false;
            for (let j = 0; j < letters.length; j++) {
              next = arg.slice(j + 2);
              if (letters[j + 1] && letters[j + 1] === "=") {
                value = arg.slice(j + 3);
                key = letters[j];
                if (checkAllAliases(key, flags.arrays)) {
                  i = eatArray(i, key, args2, value);
                } else if (checkAllAliases(key, flags.nargs) !== false) {
                  i = eatNargs(i, key, args2, value);
                } else {
                  setArg(key, value);
                }
                broken = true;
                break;
              }
              if (next === "-") {
                setArg(letters[j], next);
                continue;
              }
              if (/[A-Za-z]/.test(letters[j]) && /^-?\d+(\.\d*)?(e-?\d+)?$/.test(next) && checkAllAliases(next, flags.bools) === false) {
                setArg(letters[j], next);
                broken = true;
                break;
              }
              if (letters[j + 1] && letters[j + 1].match(/\W/)) {
                setArg(letters[j], next);
                broken = true;
                break;
              } else {
                setArg(letters[j], defaultValue(letters[j]));
              }
            }
            key = arg.slice(-1)[0];
            if (!broken && key !== "-") {
              if (checkAllAliases(key, flags.arrays)) {
                i = eatArray(i, key, args2);
              } else if (checkAllAliases(key, flags.nargs) !== false) {
                i = eatNargs(i, key, args2);
              } else {
                next = args2[i + 1];
                if (next !== void 0 && (!/^(-|--)[^-]/.test(next) || next.match(negative)) && !checkAllAliases(key, flags.bools) && !checkAllAliases(key, flags.counts)) {
                  setArg(key, next);
                  i++;
                } else if (/^(true|false)$/.test(next)) {
                  setArg(key, next);
                  i++;
                } else {
                  setArg(key, defaultValue(key));
                }
              }
            }
          } else if (arg.match(/^-[0-9]$/) && arg.match(negative) && checkAllAliases(arg.slice(1), flags.bools)) {
            key = arg.slice(1);
            setArg(key, defaultValue(key));
          } else if (arg === "--") {
            notFlags = args2.slice(i + 1);
            break;
          } else if (configuration["halt-at-non-option"]) {
            notFlags = args2.slice(i);
            break;
          } else {
            pushPositional(arg);
          }
        }
        applyEnvVars(argv, true);
        applyEnvVars(argv, false);
        setConfig(argv);
        setConfigObjects();
        applyDefaultsAndAliases(argv, flags.aliases, defaults3, true);
        applyCoercions(argv);
        if (configuration["set-placeholder-key"])
          setPlaceholderKeys(argv);
        Object.keys(flags.counts).forEach(function(key) {
          if (!hasKey(argv, key.split(".")))
            setArg(key, 0);
        });
        if (notFlagsOption && notFlags.length)
          argv[notFlagsArgv] = [];
        notFlags.forEach(function(key) {
          argv[notFlagsArgv].push(key);
        });
        if (configuration["camel-case-expansion"] && configuration["strip-dashed"]) {
          Object.keys(argv).filter((key) => key !== "--" && key.includes("-")).forEach((key) => {
            delete argv[key];
          });
        }
        if (configuration["strip-aliased"]) {
          [].concat(...Object.keys(aliases).map((k) => aliases[k])).forEach((alias) => {
            if (configuration["camel-case-expansion"] && alias.includes("-")) {
              delete argv[alias.split(".").map((prop) => camelCase(prop)).join(".")];
            }
            delete argv[alias];
          });
        }
        function pushPositional(arg) {
          const maybeCoercedNumber = maybeCoerceNumber("_", arg);
          if (typeof maybeCoercedNumber === "string" || typeof maybeCoercedNumber === "number") {
            argv._.push(maybeCoercedNumber);
          }
        }
        function eatNargs(i, key, args3, argAfterEqualSign) {
          let ii;
          let toEat = checkAllAliases(key, flags.nargs);
          toEat = typeof toEat !== "number" || isNaN(toEat) ? 1 : toEat;
          if (toEat === 0) {
            if (!isUndefined(argAfterEqualSign)) {
              error = Error(__("Argument unexpected for: %s", key));
            }
            setArg(key, defaultValue(key));
            return i;
          }
          let available = isUndefined(argAfterEqualSign) ? 0 : 1;
          if (configuration["nargs-eats-options"]) {
            if (args3.length - (i + 1) + available < toEat) {
              error = Error(__("Not enough arguments following: %s", key));
            }
            available = toEat;
          } else {
            for (ii = i + 1; ii < args3.length; ii++) {
              if (!args3[ii].match(/^-[^0-9]/) || args3[ii].match(negative) || isUnknownOptionAsArg(args3[ii]))
                available++;
              else
                break;
            }
            if (available < toEat)
              error = Error(__("Not enough arguments following: %s", key));
          }
          let consumed = Math.min(available, toEat);
          if (!isUndefined(argAfterEqualSign) && consumed > 0) {
            setArg(key, argAfterEqualSign);
            consumed--;
          }
          for (ii = i + 1; ii < consumed + i + 1; ii++) {
            setArg(key, args3[ii]);
          }
          return i + consumed;
        }
        function eatArray(i, key, args3, argAfterEqualSign) {
          let argsToSet = [];
          let next = argAfterEqualSign || args3[i + 1];
          const nargsCount = checkAllAliases(key, flags.nargs);
          if (checkAllAliases(key, flags.bools) && !/^(true|false)$/.test(next)) {
            argsToSet.push(true);
          } else if (isUndefined(next) || isUndefined(argAfterEqualSign) && /^-/.test(next) && !negative.test(next) && !isUnknownOptionAsArg(next)) {
            if (defaults3[key] !== void 0) {
              const defVal = defaults3[key];
              argsToSet = Array.isArray(defVal) ? defVal : [defVal];
            }
          } else {
            if (!isUndefined(argAfterEqualSign)) {
              argsToSet.push(processValue(key, argAfterEqualSign, true));
            }
            for (let ii = i + 1; ii < args3.length; ii++) {
              if (!configuration["greedy-arrays"] && argsToSet.length > 0 || nargsCount && typeof nargsCount === "number" && argsToSet.length >= nargsCount)
                break;
              next = args3[ii];
              if (/^-/.test(next) && !negative.test(next) && !isUnknownOptionAsArg(next))
                break;
              i = ii;
              argsToSet.push(processValue(key, next, inputIsString));
            }
          }
          if (typeof nargsCount === "number" && (nargsCount && argsToSet.length < nargsCount || isNaN(nargsCount) && argsToSet.length === 0)) {
            error = Error(__("Not enough arguments following: %s", key));
          }
          setArg(key, argsToSet);
          return i;
        }
        function setArg(key, val, shouldStripQuotes = inputIsString) {
          if (/-/.test(key) && configuration["camel-case-expansion"]) {
            const alias = key.split(".").map(function(prop) {
              return camelCase(prop);
            }).join(".");
            addNewAlias(key, alias);
          }
          const value = processValue(key, val, shouldStripQuotes);
          const splitKey = key.split(".");
          setKey(argv, splitKey, value);
          if (flags.aliases[key]) {
            flags.aliases[key].forEach(function(x) {
              const keyProperties = x.split(".");
              setKey(argv, keyProperties, value);
            });
          }
          if (splitKey.length > 1 && configuration["dot-notation"]) {
            (flags.aliases[splitKey[0]] || []).forEach(function(x) {
              let keyProperties = x.split(".");
              const a = [].concat(splitKey);
              a.shift();
              keyProperties = keyProperties.concat(a);
              if (!(flags.aliases[key] || []).includes(keyProperties.join("."))) {
                setKey(argv, keyProperties, value);
              }
            });
          }
          if (checkAllAliases(key, flags.normalize) && !checkAllAliases(key, flags.arrays)) {
            const keys2 = [key].concat(flags.aliases[key] || []);
            keys2.forEach(function(key2) {
              Object.defineProperty(argvReturn, key2, {
                enumerable: true,
                get() {
                  return val;
                },
                set(value2) {
                  val = typeof value2 === "string" ? mixin.normalize(value2) : value2;
                }
              });
            });
          }
        }
        function addNewAlias(key, alias) {
          if (!(flags.aliases[key] && flags.aliases[key].length)) {
            flags.aliases[key] = [alias];
            newAliases[alias] = true;
          }
          if (!(flags.aliases[alias] && flags.aliases[alias].length)) {
            addNewAlias(alias, key);
          }
        }
        function processValue(key, val, shouldStripQuotes) {
          if (shouldStripQuotes) {
            val = stripQuotes(val);
          }
          if (checkAllAliases(key, flags.bools) || checkAllAliases(key, flags.counts)) {
            if (typeof val === "string")
              val = val === "true";
          }
          let value = Array.isArray(val) ? val.map(function(v) {
            return maybeCoerceNumber(key, v);
          }) : maybeCoerceNumber(key, val);
          if (checkAllAliases(key, flags.counts) && (isUndefined(value) || typeof value === "boolean")) {
            value = increment();
          }
          if (checkAllAliases(key, flags.normalize) && checkAllAliases(key, flags.arrays)) {
            if (Array.isArray(val))
              value = val.map((val2) => {
                return mixin.normalize(val2);
              });
            else
              value = mixin.normalize(val);
          }
          return value;
        }
        function maybeCoerceNumber(key, value) {
          if (!configuration["parse-positional-numbers"] && key === "_")
            return value;
          if (!checkAllAliases(key, flags.strings) && !checkAllAliases(key, flags.bools) && !Array.isArray(value)) {
            const shouldCoerceNumber = looksLikeNumber(value) && configuration["parse-numbers"] && Number.isSafeInteger(Math.floor(parseFloat(`${value}`)));
            if (shouldCoerceNumber || !isUndefined(value) && checkAllAliases(key, flags.numbers)) {
              value = Number(value);
            }
          }
          return value;
        }
        function setConfig(argv2) {
          const configLookup = /* @__PURE__ */ Object.create(null);
          applyDefaultsAndAliases(configLookup, flags.aliases, defaults3);
          Object.keys(flags.configs).forEach(function(configKey) {
            const configPath = argv2[configKey] || configLookup[configKey];
            if (configPath) {
              try {
                let config4 = null;
                const resolvedConfigPath = mixin.resolve(mixin.cwd(), configPath);
                const resolveConfig = flags.configs[configKey];
                if (typeof resolveConfig === "function") {
                  try {
                    config4 = resolveConfig(resolvedConfigPath);
                  } catch (e) {
                    config4 = e;
                  }
                  if (config4 instanceof Error) {
                    error = config4;
                    return;
                  }
                } else {
                  config4 = mixin.require(resolvedConfigPath);
                }
                setConfigObject(config4);
              } catch (ex) {
                if (ex.name === "PermissionDenied")
                  error = ex;
                else if (argv2[configKey])
                  error = Error(__("Invalid JSON config file: %s", configPath));
              }
            }
          });
        }
        function setConfigObject(config4, prev) {
          Object.keys(config4).forEach(function(key) {
            const value = config4[key];
            const fullKey = prev ? prev + "." + key : key;
            if (typeof value === "object" && value !== null && !Array.isArray(value) && configuration["dot-notation"]) {
              setConfigObject(value, fullKey);
            } else {
              if (!hasKey(argv, fullKey.split(".")) || checkAllAliases(fullKey, flags.arrays) && configuration["combine-arrays"]) {
                setArg(fullKey, value);
              }
            }
          });
        }
        function setConfigObjects() {
          if (typeof configObjects !== "undefined") {
            configObjects.forEach(function(configObject) {
              setConfigObject(configObject);
            });
          }
        }
        function applyEnvVars(argv2, configOnly) {
          if (typeof envPrefix === "undefined")
            return;
          const prefix = typeof envPrefix === "string" ? envPrefix : "";
          const env2 = mixin.env();
          Object.keys(env2).forEach(function(envVar) {
            if (prefix === "" || envVar.lastIndexOf(prefix, 0) === 0) {
              const keys2 = envVar.split("__").map(function(key, i) {
                if (i === 0) {
                  key = key.substring(prefix.length);
                }
                return camelCase(key);
              });
              if ((configOnly && flags.configs[keys2.join(".")] || !configOnly) && !hasKey(argv2, keys2)) {
                setArg(keys2.join("."), env2[envVar]);
              }
            }
          });
        }
        function applyCoercions(argv2) {
          let coerce2;
          const applied = /* @__PURE__ */ new Set();
          Object.keys(argv2).forEach(function(key) {
            if (!applied.has(key)) {
              coerce2 = checkAllAliases(key, flags.coercions);
              if (typeof coerce2 === "function") {
                try {
                  const value = maybeCoerceNumber(key, coerce2(argv2[key]));
                  [].concat(flags.aliases[key] || [], key).forEach((ali) => {
                    applied.add(ali);
                    argv2[ali] = value;
                  });
                } catch (err) {
                  error = err;
                }
              }
            }
          });
        }
        function setPlaceholderKeys(argv2) {
          flags.keys.forEach((key) => {
            if (~key.indexOf("."))
              return;
            if (typeof argv2[key] === "undefined")
              argv2[key] = void 0;
          });
          return argv2;
        }
        function applyDefaultsAndAliases(obj, aliases2, defaults4, canLog = false) {
          Object.keys(defaults4).forEach(function(key) {
            if (!hasKey(obj, key.split("."))) {
              setKey(obj, key.split("."), defaults4[key]);
              if (canLog)
                defaulted[key] = true;
              (aliases2[key] || []).forEach(function(x) {
                if (hasKey(obj, x.split(".")))
                  return;
                setKey(obj, x.split("."), defaults4[key]);
              });
            }
          });
        }
        function hasKey(obj, keys2) {
          let o = obj;
          if (!configuration["dot-notation"])
            keys2 = [keys2.join(".")];
          keys2.slice(0, -1).forEach(function(key2) {
            o = o[key2] || {};
          });
          const key = keys2[keys2.length - 1];
          if (typeof o !== "object")
            return false;
          else
            return key in o;
        }
        function setKey(obj, keys2, value) {
          let o = obj;
          if (!configuration["dot-notation"])
            keys2 = [keys2.join(".")];
          keys2.slice(0, -1).forEach(function(key2) {
            key2 = sanitizeKey(key2);
            if (typeof o === "object" && o[key2] === void 0) {
              o[key2] = {};
            }
            if (typeof o[key2] !== "object" || Array.isArray(o[key2])) {
              if (Array.isArray(o[key2])) {
                o[key2].push({});
              } else {
                o[key2] = [o[key2], {}];
              }
              o = o[key2][o[key2].length - 1];
            } else {
              o = o[key2];
            }
          });
          const key = sanitizeKey(keys2[keys2.length - 1]);
          const isTypeArray = checkAllAliases(keys2.join("."), flags.arrays);
          const isValueArray = Array.isArray(value);
          let duplicate = configuration["duplicate-arguments-array"];
          if (!duplicate && checkAllAliases(key, flags.nargs)) {
            duplicate = true;
            if (!isUndefined(o[key]) && flags.nargs[key] === 1 || Array.isArray(o[key]) && o[key].length === flags.nargs[key]) {
              o[key] = void 0;
            }
          }
          if (value === increment()) {
            o[key] = increment(o[key]);
          } else if (Array.isArray(o[key])) {
            if (duplicate && isTypeArray && isValueArray) {
              o[key] = configuration["flatten-duplicate-arrays"] ? o[key].concat(value) : (Array.isArray(o[key][0]) ? o[key] : [o[key]]).concat([value]);
            } else if (!duplicate && Boolean(isTypeArray) === Boolean(isValueArray)) {
              o[key] = value;
            } else {
              o[key] = o[key].concat([value]);
            }
          } else if (o[key] === void 0 && isTypeArray) {
            o[key] = isValueArray ? value : [value];
          } else if (duplicate && !(o[key] === void 0 || checkAllAliases(key, flags.counts) || checkAllAliases(key, flags.bools))) {
            o[key] = [o[key], value];
          } else {
            o[key] = value;
          }
        }
        function extendAliases(...args3) {
          args3.forEach(function(obj) {
            Object.keys(obj || {}).forEach(function(key) {
              if (flags.aliases[key])
                return;
              flags.aliases[key] = [].concat(aliases[key] || []);
              flags.aliases[key].concat(key).forEach(function(x) {
                if (/-/.test(x) && configuration["camel-case-expansion"]) {
                  const c = camelCase(x);
                  if (c !== key && flags.aliases[key].indexOf(c) === -1) {
                    flags.aliases[key].push(c);
                    newAliases[c] = true;
                  }
                }
              });
              flags.aliases[key].concat(key).forEach(function(x) {
                if (x.length > 1 && /[A-Z]/.test(x) && configuration["camel-case-expansion"]) {
                  const c = decamelize(x, "-");
                  if (c !== key && flags.aliases[key].indexOf(c) === -1) {
                    flags.aliases[key].push(c);
                    newAliases[c] = true;
                  }
                }
              });
              flags.aliases[key].forEach(function(x) {
                flags.aliases[x] = [key].concat(flags.aliases[key].filter(function(y) {
                  return x !== y;
                }));
              });
            });
          });
        }
        function checkAllAliases(key, flag) {
          const toCheck = [].concat(flags.aliases[key] || [], key);
          const keys2 = Object.keys(flag);
          const setAlias = toCheck.find((key2) => keys2.includes(key2));
          return setAlias ? flag[setAlias] : false;
        }
        function hasAnyFlag(key) {
          const flagsKeys = Object.keys(flags);
          const toCheck = [].concat(flagsKeys.map((k) => flags[k]));
          return toCheck.some(function(flag) {
            return Array.isArray(flag) ? flag.includes(key) : flag[key];
          });
        }
        function hasFlagsMatching(arg, ...patterns) {
          const toCheck = [].concat(...patterns);
          return toCheck.some(function(pattern2) {
            const match = arg.match(pattern2);
            return match && hasAnyFlag(match[1]);
          });
        }
        function hasAllShortFlags(arg) {
          if (arg.match(negative) || !arg.match(/^-[^-]+/)) {
            return false;
          }
          let hasAllFlags = true;
          let next;
          const letters = arg.slice(1).split("");
          for (let j = 0; j < letters.length; j++) {
            next = arg.slice(j + 2);
            if (!hasAnyFlag(letters[j])) {
              hasAllFlags = false;
              break;
            }
            if (letters[j + 1] && letters[j + 1] === "=" || next === "-" || /[A-Za-z]/.test(letters[j]) && /^-?\d+(\.\d*)?(e-?\d+)?$/.test(next) || letters[j + 1] && letters[j + 1].match(/\W/)) {
              break;
            }
          }
          return hasAllFlags;
        }
        function isUnknownOptionAsArg(arg) {
          return configuration["unknown-options-as-args"] && isUnknownOption(arg);
        }
        function isUnknownOption(arg) {
          arg = arg.replace(/^-{3,}/, "--");
          if (arg.match(negative)) {
            return false;
          }
          if (hasAllShortFlags(arg)) {
            return false;
          }
          const flagWithEquals = /^-+([^=]+?)=[\s\S]*$/;
          const normalFlag = /^-+([^=]+?)$/;
          const flagEndingInHyphen = /^-+([^=]+?)-$/;
          const flagEndingInDigits = /^-+([^=]+?\d+)$/;
          const flagEndingInNonWordCharacters = /^-+([^=]+?)\W+.*$/;
          return !hasFlagsMatching(arg, flagWithEquals, negatedBoolean, normalFlag, flagEndingInHyphen, flagEndingInDigits, flagEndingInNonWordCharacters);
        }
        function defaultValue(key) {
          if (!checkAllAliases(key, flags.bools) && !checkAllAliases(key, flags.counts) && `${key}` in defaults3) {
            return defaults3[key];
          } else {
            return defaultForType(guessType2(key));
          }
        }
        function defaultForType(type2) {
          const def2 = {
            [DefaultValuesForTypeKey.BOOLEAN]: true,
            [DefaultValuesForTypeKey.STRING]: "",
            [DefaultValuesForTypeKey.NUMBER]: void 0,
            [DefaultValuesForTypeKey.ARRAY]: []
          };
          return def2[type2];
        }
        function guessType2(key) {
          let type2 = DefaultValuesForTypeKey.BOOLEAN;
          if (checkAllAliases(key, flags.strings))
            type2 = DefaultValuesForTypeKey.STRING;
          else if (checkAllAliases(key, flags.numbers))
            type2 = DefaultValuesForTypeKey.NUMBER;
          else if (checkAllAliases(key, flags.bools))
            type2 = DefaultValuesForTypeKey.BOOLEAN;
          else if (checkAllAliases(key, flags.arrays))
            type2 = DefaultValuesForTypeKey.ARRAY;
          return type2;
        }
        function isUndefined(num) {
          return num === void 0;
        }
        function checkConfiguration() {
          Object.keys(flags.counts).find((key) => {
            if (checkAllAliases(key, flags.arrays)) {
              error = Error(__("Invalid configuration: %s, opts.count excludes opts.array.", key));
              return true;
            } else if (checkAllAliases(key, flags.nargs)) {
              error = Error(__("Invalid configuration: %s, opts.count excludes opts.narg.", key));
              return true;
            }
            return false;
          });
        }
        return {
          aliases: Object.assign({}, flags.aliases),
          argv: Object.assign(argvReturn, argv),
          configuration,
          defaulted: Object.assign({}, defaulted),
          error,
          newAliases: Object.assign({}, newAliases)
        };
      }
    };
    minNodeVersion = process && process.env && process.env.YARGS_MIN_NODE_VERSION ? Number(process.env.YARGS_MIN_NODE_VERSION) : 20;
    nodeVersion = (_b = (_a$7 = process === null || process === void 0 ? void 0 : process.versions) === null || _a$7 === void 0 ? void 0 : _a$7.node) !== null && _b !== void 0 ? _b : (_c = process === null || process === void 0 ? void 0 : process.version) === null || _c === void 0 ? void 0 : _c.slice(1);
    if (nodeVersion) {
      const major2 = Number(nodeVersion.match(/^([^.]+)/)[1]);
      if (major2 < minNodeVersion) {
        throw Error(`yargs parser supports a minimum Node.js version of ${minNodeVersion}. Read our version support policy: https://github.com/yargs/yargs-parser#supported-nodejs-versions`);
      }
    }
    env = process ? process.env : {};
    require$2 = createRequire2 ? createRequire2(import.meta.url) : void 0;
    parser$1 = new YargsParser({
      cwd: process.cwd,
      env: () => {
        return env;
      },
      format: format$5,
      normalize,
      resolve: resolve$2,
      require: (path14) => {
        if (typeof require$2 !== "undefined") {
          return require$2(path14);
        } else if (path14.match(/\.json$/)) {
          return JSON.parse(readFileSync(path14, "utf8"));
        } else {
          throw Error("only .json config files are supported in ESM");
        }
      }
    });
    yargsParser = function Parser(args2, opts) {
      const result = parser$1.parse(args2.slice(), opts);
      return result.argv;
    };
    yargsParser.detailed = function(args2, opts) {
      return parser$1.parse(args2.slice(), opts);
    };
    yargsParser.camelCase = camelCase;
    yargsParser.decamelize = decamelize;
    yargsParser.looksLikeNumber = looksLikeNumber;
    shim$3 = {
      fs: {
        readFileSync,
        writeFile
      },
      format: format$5,
      resolve: resolve$2,
      exists: (file2) => {
        try {
          return statSync(file2).isFile();
        } catch (err) {
          return false;
        }
      }
    };
    Y18N = class {
      constructor(opts) {
        opts = opts || {};
        this.directory = opts.directory || "./locales";
        this.updateFiles = typeof opts.updateFiles === "boolean" ? opts.updateFiles : true;
        this.locale = opts.locale || "en";
        this.fallbackToLanguage = typeof opts.fallbackToLanguage === "boolean" ? opts.fallbackToLanguage : true;
        this.cache = /* @__PURE__ */ Object.create(null);
        this.writeQueue = [];
      }
      __(...args2) {
        if (typeof arguments[0] !== "string") {
          return this._taggedLiteral(arguments[0], ...arguments);
        }
        const str = args2.shift();
        let cb = function() {
        };
        if (typeof args2[args2.length - 1] === "function")
          cb = args2.pop();
        cb = cb || function() {
        };
        if (!this.cache[this.locale])
          this._readLocaleFile();
        if (!this.cache[this.locale][str] && this.updateFiles) {
          this.cache[this.locale][str] = str;
          this._enqueueWrite({
            directory: this.directory,
            locale: this.locale,
            cb
          });
        } else {
          cb();
        }
        return shim$2.format.apply(shim$2.format, [this.cache[this.locale][str] || str].concat(args2));
      }
      __n() {
        const args2 = Array.prototype.slice.call(arguments);
        const singular = args2.shift();
        const plural = args2.shift();
        const quantity = args2.shift();
        let cb = function() {
        };
        if (typeof args2[args2.length - 1] === "function")
          cb = args2.pop();
        if (!this.cache[this.locale])
          this._readLocaleFile();
        let str = quantity === 1 ? singular : plural;
        if (this.cache[this.locale][singular]) {
          const entry = this.cache[this.locale][singular];
          str = entry[quantity === 1 ? "one" : "other"];
        }
        if (!this.cache[this.locale][singular] && this.updateFiles) {
          this.cache[this.locale][singular] = {
            one: singular,
            other: plural
          };
          this._enqueueWrite({
            directory: this.directory,
            locale: this.locale,
            cb
          });
        } else {
          cb();
        }
        const values = [str];
        if (~str.indexOf("%d"))
          values.push(quantity);
        return shim$2.format.apply(shim$2.format, values.concat(args2));
      }
      setLocale(locale) {
        this.locale = locale;
      }
      getLocale() {
        return this.locale;
      }
      updateLocale(obj) {
        if (!this.cache[this.locale])
          this._readLocaleFile();
        for (const key in obj) {
          if (Object.prototype.hasOwnProperty.call(obj, key)) {
            this.cache[this.locale][key] = obj[key];
          }
        }
      }
      _taggedLiteral(parts, ...args2) {
        let str = "";
        parts.forEach(function(part, i) {
          const arg = args2[i + 1];
          str += part;
          if (typeof arg !== "undefined") {
            str += "%s";
          }
        });
        return this.__.apply(this, [str].concat([].slice.call(args2, 1)));
      }
      _enqueueWrite(work) {
        this.writeQueue.push(work);
        if (this.writeQueue.length === 1)
          this._processWriteQueue();
      }
      _processWriteQueue() {
        const _this = this;
        const work = this.writeQueue[0];
        const directory = work.directory;
        const locale = work.locale;
        const cb = work.cb;
        const languageFile = this._resolveLocaleFile(directory, locale);
        const serializedLocale = JSON.stringify(this.cache[locale], null, 2);
        shim$2.fs.writeFile(languageFile, serializedLocale, "utf-8", function(err) {
          _this.writeQueue.shift();
          if (_this.writeQueue.length > 0)
            _this._processWriteQueue();
          cb(err);
        });
      }
      _readLocaleFile() {
        let localeLookup = {};
        const languageFile = this._resolveLocaleFile(this.directory, this.locale);
        try {
          if (shim$2.fs.readFileSync) {
            localeLookup = JSON.parse(shim$2.fs.readFileSync(languageFile, "utf-8"));
          }
        } catch (err) {
          if (err instanceof SyntaxError) {
            err.message = "syntax error in " + languageFile;
          }
          if (err.code === "ENOENT")
            localeLookup = {};
          else
            throw err;
        }
        this.cache[this.locale] = localeLookup;
      }
      _resolveLocaleFile(directory, locale) {
        let file2 = shim$2.resolve(directory, "./", locale + ".json");
        if (this.fallbackToLanguage && !this._fileExistsSync(file2) && ~locale.lastIndexOf("_")) {
          const languageFile = shim$2.resolve(directory, "./", locale.split("_")[0] + ".json");
          if (this._fileExistsSync(languageFile))
            file2 = languageFile;
        }
        return file2;
      }
      _fileExistsSync(file2) {
        return shim$2.exists(file2);
      }
    };
    y18n = (opts) => {
      return y18n$1(opts, shim$3);
    };
    getCallerFileExports = requireGetCallerFile();
    getCallerFile = /* @__PURE__ */ getDefaultExportFromCjs(getCallerFileExports);
    __dirname$1 = fileURLToPath2(import.meta.url);
    mainFilename = __dirname$1.substring(0, __dirname$1.lastIndexOf("node_modules"));
    require$1 = createRequire2(import.meta.url);
    shim$1 = {
      assert: {
        notStrictEqual,
        strictEqual
      },
      cliui: ui,
      findUp: escalade,
      getEnv: (key) => {
        return process.env[key];
      },
      inspect,
      getProcessArgvBin,
      mainFilename: mainFilename || process.cwd(),
      Parser: yargsParser,
      path: {
        basename,
        dirname,
        extname,
        relative,
        resolve: resolve$2,
        join
      },
      process: {
        argv: () => process.argv,
        cwd: process.cwd,
        emitWarning: (warning, type2) => process.emitWarning(warning, type2),
        execPath: () => process.execPath,
        exit: (code2) => {
          process.exit(code2);
        },
        nextTick: process.nextTick,
        stdColumns: typeof process.stdout.columns !== "undefined" ? process.stdout.columns : null
      },
      readFileSync: readFileSync$1,
      readdirSync: readdirSync$1,
      require: require$1,
      getCallerFile: () => {
        const callerFile = getCallerFile(3);
        return callerFile.match(/^file:\/\//) ? fileURLToPath2(callerFile) : callerFile;
      },
      stringWidth,
      y18n: y18n({
        directory: resolve$2(__dirname$1, "../../../locales"),
        updateFiles: false
      })
    };
    YError = class _YError extends Error {
      constructor(msg) {
        super(msg || "yargs error");
        this.name = "YError";
        if (Error.captureStackTrace) {
          Error.captureStackTrace(this, _YError);
        }
      }
    };
    positionName = ["first", "second", "third", "fourth", "fifth", "sixth"];
    GlobalMiddleware = class {
      constructor(yargs) {
        this.globalMiddleware = [];
        this.frozens = [];
        this.yargs = yargs;
      }
      addMiddleware(callback, applyBeforeValidation, global2 = true, mutates = false) {
        argsert("<array|function> [boolean] [boolean] [boolean]", [callback, applyBeforeValidation, global2], arguments.length);
        if (Array.isArray(callback)) {
          for (let i = 0; i < callback.length; i++) {
            if (typeof callback[i] !== "function") {
              throw Error("middleware must be a function");
            }
            const m = callback[i];
            m.applyBeforeValidation = applyBeforeValidation;
            m.global = global2;
          }
          Array.prototype.push.apply(this.globalMiddleware, callback);
        } else if (typeof callback === "function") {
          const m = callback;
          m.applyBeforeValidation = applyBeforeValidation;
          m.global = global2;
          m.mutates = mutates;
          this.globalMiddleware.push(callback);
        }
        return this.yargs;
      }
      addCoerceMiddleware(callback, option) {
        const aliases = this.yargs.getAliases();
        this.globalMiddleware = this.globalMiddleware.filter((m) => {
          const toCheck = [...aliases[option] || [], option];
          if (!m.option)
            return true;
          else
            return !toCheck.includes(m.option);
        });
        callback.option = option;
        return this.addMiddleware(callback, true, true, true);
      }
      getMiddleware() {
        return this.globalMiddleware;
      }
      freeze() {
        this.frozens.push([...this.globalMiddleware]);
      }
      unfreeze() {
        const frozen = this.frozens.pop();
        if (frozen !== void 0)
          this.globalMiddleware = frozen;
      }
      reset() {
        this.globalMiddleware = this.globalMiddleware.filter((m) => m.global);
      }
    };
    DEFAULT_MARKER = /(^\*)|(^\$0)/;
    CommandInstance = class {
      constructor(usage2, validation2, globalMiddleware, shim2) {
        this.requireCache = /* @__PURE__ */ new Set();
        this.handlers = {};
        this.aliasMap = {};
        this.frozens = [];
        this.shim = shim2;
        this.usage = usage2;
        this.globalMiddleware = globalMiddleware;
        this.validation = validation2;
      }
      addDirectory(dir, req, callerFile, opts) {
        opts = opts || {};
        this.requireCache.add(callerFile);
        const fullDirPath = this.shim.path.resolve(this.shim.path.dirname(callerFile), dir);
        const files = this.shim.readdirSync(fullDirPath, {
          recursive: opts.recurse ? true : false
        });
        if (!Array.isArray(opts.extensions))
          opts.extensions = ["js"];
        const visit = typeof opts.visit === "function" ? opts.visit : (o) => o;
        for (const fileb of files) {
          const file2 = fileb.toString();
          if (opts.exclude) {
            let exclude = false;
            if (typeof opts.exclude === "function") {
              exclude = opts.exclude(file2);
            } else {
              exclude = opts.exclude.test(file2);
            }
            if (exclude)
              continue;
          }
          if (opts.include) {
            let include = false;
            if (typeof opts.include === "function") {
              include = opts.include(file2);
            } else {
              include = opts.include.test(file2);
            }
            if (!include)
              continue;
          }
          let supportedExtension = false;
          for (const ext of opts.extensions) {
            if (file2.endsWith(ext))
              supportedExtension = true;
          }
          if (supportedExtension) {
            const joined = this.shim.path.join(fullDirPath, file2);
            const module2 = req(joined);
            const extendableModule = Object.create(null, Object.getOwnPropertyDescriptors({ ...module2 }));
            const visited = visit(extendableModule, joined, file2);
            if (visited) {
              if (this.requireCache.has(joined))
                continue;
              else
                this.requireCache.add(joined);
              if (!extendableModule.command) {
                extendableModule.command = this.shim.path.basename(joined, this.shim.path.extname(joined));
              }
              this.addHandler(extendableModule);
            }
          }
        }
      }
      addHandler(cmd, description2, builder, handler, commandMiddleware, deprecated) {
        let aliases = [];
        const middlewares = commandMiddlewareFactory(commandMiddleware);
        handler = handler || (() => {
        });
        if (Array.isArray(cmd)) {
          if (isCommandAndAliases(cmd)) {
            [cmd, ...aliases] = cmd;
          } else {
            for (const command2 of cmd) {
              this.addHandler(command2);
            }
          }
        } else if (isCommandHandlerDefinition(cmd)) {
          let command2 = Array.isArray(cmd.command) || typeof cmd.command === "string" ? cmd.command : null;
          if (command2 === null) {
            throw new Error(`No command name given for module: ${this.shim.inspect(cmd)}`);
          }
          if (cmd.aliases)
            command2 = [].concat(command2).concat(cmd.aliases);
          this.addHandler(command2, this.extractDesc(cmd), cmd.builder, cmd.handler, cmd.middlewares, cmd.deprecated);
          return;
        } else if (isCommandBuilderDefinition(builder)) {
          this.addHandler([cmd].concat(aliases), description2, builder.builder, builder.handler, builder.middlewares, builder.deprecated);
          return;
        }
        if (typeof cmd === "string") {
          const parsedCommand = parseCommand(cmd);
          aliases = aliases.map((alias) => parseCommand(alias).cmd);
          let isDefault = false;
          const parsedAliases = [parsedCommand.cmd].concat(aliases).filter((c) => {
            if (DEFAULT_MARKER.test(c)) {
              isDefault = true;
              return false;
            }
            return true;
          });
          if (parsedAliases.length === 0 && isDefault)
            parsedAliases.push("$0");
          if (isDefault) {
            parsedCommand.cmd = parsedAliases[0];
            aliases = parsedAliases.slice(1);
            cmd = cmd.replace(DEFAULT_MARKER, parsedCommand.cmd);
          }
          aliases.forEach((alias) => {
            this.aliasMap[alias] = parsedCommand.cmd;
          });
          if (description2 !== false) {
            this.usage.command(cmd, description2, isDefault, aliases, deprecated);
          }
          this.handlers[parsedCommand.cmd] = {
            original: cmd,
            description: description2,
            handler,
            builder: builder || {},
            middlewares,
            deprecated,
            demanded: parsedCommand.demanded,
            optional: parsedCommand.optional
          };
          if (isDefault)
            this.defaultCommand = this.handlers[parsedCommand.cmd];
        }
      }
      getCommandHandlers() {
        return this.handlers;
      }
      getCommands() {
        return Object.keys(this.handlers).concat(Object.keys(this.aliasMap));
      }
      hasDefaultCommand() {
        return !!this.defaultCommand;
      }
      runCommand(command2, yargs, parsed, commandIndex, helpOnly, helpOrVersionSet) {
        const commandHandler = this.handlers[command2] || this.handlers[this.aliasMap[command2]] || this.defaultCommand;
        const currentContext = yargs.getInternalMethods().getContext();
        const parentCommands = currentContext.commands.slice();
        const isDefaultCommand = !command2;
        if (command2) {
          currentContext.commands.push(command2);
          currentContext.fullCommands.push(commandHandler.original);
        }
        const builderResult = this.applyBuilderUpdateUsageAndParse(isDefaultCommand, commandHandler, yargs, parsed.aliases, parentCommands, commandIndex, helpOnly, helpOrVersionSet);
        return isPromise$1(builderResult) ? builderResult.then((result) => this.applyMiddlewareAndGetResult(isDefaultCommand, commandHandler, result.innerArgv, currentContext, helpOnly, result.aliases, yargs)) : this.applyMiddlewareAndGetResult(isDefaultCommand, commandHandler, builderResult.innerArgv, currentContext, helpOnly, builderResult.aliases, yargs);
      }
      applyBuilderUpdateUsageAndParse(isDefaultCommand, commandHandler, yargs, aliases, parentCommands, commandIndex, helpOnly, helpOrVersionSet) {
        const builder = commandHandler.builder;
        let innerYargs = yargs;
        if (isCommandBuilderCallback(builder)) {
          yargs.getInternalMethods().getUsageInstance().freeze();
          const builderOutput = builder(yargs.getInternalMethods().reset(aliases), helpOrVersionSet);
          if (isPromise$1(builderOutput)) {
            return builderOutput.then((output) => {
              innerYargs = isYargsInstance(output) ? output : yargs;
              return this.parseAndUpdateUsage(isDefaultCommand, commandHandler, innerYargs, parentCommands, commandIndex, helpOnly);
            });
          }
        } else if (isCommandBuilderOptionDefinitions(builder)) {
          yargs.getInternalMethods().getUsageInstance().freeze();
          innerYargs = yargs.getInternalMethods().reset(aliases);
          Object.keys(commandHandler.builder).forEach((key) => {
            innerYargs.option(key, builder[key]);
          });
        }
        return this.parseAndUpdateUsage(isDefaultCommand, commandHandler, innerYargs, parentCommands, commandIndex, helpOnly);
      }
      parseAndUpdateUsage(isDefaultCommand, commandHandler, innerYargs, parentCommands, commandIndex, helpOnly) {
        if (isDefaultCommand)
          innerYargs.getInternalMethods().getUsageInstance().unfreeze(true);
        if (this.shouldUpdateUsage(innerYargs)) {
          innerYargs.getInternalMethods().getUsageInstance().usage(this.usageFromParentCommandsCommandHandler(parentCommands, commandHandler), commandHandler.description);
        }
        const innerArgv = innerYargs.getInternalMethods().runYargsParserAndExecuteCommands(null, void 0, true, commandIndex, helpOnly);
        return isPromise$1(innerArgv) ? innerArgv.then((argv) => ({
          aliases: innerYargs.parsed.aliases,
          innerArgv: argv
        })) : {
          aliases: innerYargs.parsed.aliases,
          innerArgv
        };
      }
      shouldUpdateUsage(yargs) {
        return !yargs.getInternalMethods().getUsageInstance().getUsageDisabled() && yargs.getInternalMethods().getUsageInstance().getUsage().length === 0;
      }
      usageFromParentCommandsCommandHandler(parentCommands, commandHandler) {
        const c = DEFAULT_MARKER.test(commandHandler.original) ? commandHandler.original.replace(DEFAULT_MARKER, "").trim() : commandHandler.original;
        const pc = parentCommands.filter((c2) => {
          return !DEFAULT_MARKER.test(c2);
        });
        pc.push(c);
        return `$0 ${pc.join(" ")}`;
      }
      handleValidationAndGetResult(isDefaultCommand, commandHandler, innerArgv, currentContext, aliases, yargs, middlewares, positionalMap) {
        if (!yargs.getInternalMethods().getHasOutput()) {
          const validation2 = yargs.getInternalMethods().runValidation(aliases, positionalMap, yargs.parsed.error, isDefaultCommand);
          innerArgv = maybeAsyncResult(innerArgv, (result) => {
            validation2(result);
            return result;
          });
        }
        if (commandHandler.handler && !yargs.getInternalMethods().getHasOutput()) {
          yargs.getInternalMethods().setHasOutput();
          const populateDoubleDash = !!yargs.getOptions().configuration["populate--"];
          yargs.getInternalMethods().postProcess(innerArgv, populateDoubleDash, false, false);
          innerArgv = applyMiddleware(innerArgv, yargs, middlewares, false);
          innerArgv = maybeAsyncResult(innerArgv, (result) => {
            const handlerResult = commandHandler.handler(result);
            return isPromise$1(handlerResult) ? handlerResult.then(() => result) : result;
          });
          if (!isDefaultCommand) {
            yargs.getInternalMethods().getUsageInstance().cacheHelpMessage();
          }
          if (isPromise$1(innerArgv) && !yargs.getInternalMethods().hasParseCallback()) {
            innerArgv.catch((error) => {
              try {
                yargs.getInternalMethods().getUsageInstance().fail(null, error);
              } catch (_err) {
              }
            });
          }
        }
        if (!isDefaultCommand) {
          currentContext.commands.pop();
          currentContext.fullCommands.pop();
        }
        return innerArgv;
      }
      applyMiddlewareAndGetResult(isDefaultCommand, commandHandler, innerArgv, currentContext, helpOnly, aliases, yargs) {
        let positionalMap = {};
        if (helpOnly)
          return innerArgv;
        if (!yargs.getInternalMethods().getHasOutput()) {
          positionalMap = this.populatePositionals(commandHandler, innerArgv, currentContext, yargs);
        }
        const middlewares = this.globalMiddleware.getMiddleware().slice(0).concat(commandHandler.middlewares);
        const maybePromiseArgv = applyMiddleware(innerArgv, yargs, middlewares, true);
        return isPromise$1(maybePromiseArgv) ? maybePromiseArgv.then((resolvedInnerArgv) => this.handleValidationAndGetResult(isDefaultCommand, commandHandler, resolvedInnerArgv, currentContext, aliases, yargs, middlewares, positionalMap)) : this.handleValidationAndGetResult(isDefaultCommand, commandHandler, maybePromiseArgv, currentContext, aliases, yargs, middlewares, positionalMap);
      }
      populatePositionals(commandHandler, argv, context2, yargs) {
        argv._ = argv._.slice(context2.commands.length);
        const demanded = commandHandler.demanded.slice(0);
        const optional2 = commandHandler.optional.slice(0);
        const positionalMap = {};
        this.validation.positionalCount(demanded.length, argv._.length);
        while (demanded.length) {
          const demand = demanded.shift();
          this.populatePositional(demand, argv, positionalMap);
        }
        while (optional2.length) {
          const maybe = optional2.shift();
          this.populatePositional(maybe, argv, positionalMap);
        }
        argv._ = context2.commands.concat(argv._.map((a) => "" + a));
        this.postProcessPositionals(argv, positionalMap, this.cmdToParseOptions(commandHandler.original), yargs);
        return positionalMap;
      }
      populatePositional(positional, argv, positionalMap) {
        const cmd = positional.cmd[0];
        if (positional.variadic) {
          positionalMap[cmd] = argv._.splice(0).map(String);
        } else {
          if (argv._.length)
            positionalMap[cmd] = [String(argv._.shift())];
        }
      }
      cmdToParseOptions(cmdString) {
        const parseOptions = {
          array: [],
          default: {},
          alias: {},
          demand: {}
        };
        const parsed = parseCommand(cmdString);
        parsed.demanded.forEach((d) => {
          const [cmd, ...aliases] = d.cmd;
          if (d.variadic) {
            parseOptions.array.push(cmd);
            parseOptions.default[cmd] = [];
          }
          parseOptions.alias[cmd] = aliases;
          parseOptions.demand[cmd] = true;
        });
        parsed.optional.forEach((o) => {
          const [cmd, ...aliases] = o.cmd;
          if (o.variadic) {
            parseOptions.array.push(cmd);
            parseOptions.default[cmd] = [];
          }
          parseOptions.alias[cmd] = aliases;
        });
        return parseOptions;
      }
      postProcessPositionals(argv, positionalMap, parseOptions, yargs) {
        const options2 = Object.assign({}, yargs.getOptions());
        options2.default = Object.assign(parseOptions.default, options2.default);
        for (const key of Object.keys(parseOptions.alias)) {
          options2.alias[key] = (options2.alias[key] || []).concat(parseOptions.alias[key]);
        }
        options2.array = options2.array.concat(parseOptions.array);
        options2.config = {};
        const unparsed = [];
        Object.keys(positionalMap).forEach((key) => {
          positionalMap[key].map((value) => {
            if (options2.configuration["unknown-options-as-args"])
              options2.key[key] = true;
            unparsed.push(`--${key}`);
            unparsed.push(value);
          });
        });
        if (!unparsed.length)
          return;
        const config4 = Object.assign({}, options2.configuration, {
          "populate--": false
        });
        const parsed = this.shim.Parser.detailed(unparsed, Object.assign({}, options2, {
          configuration: config4
        }));
        if (parsed.error) {
          yargs.getInternalMethods().getUsageInstance().fail(parsed.error.message, parsed.error);
        } else {
          const positionalKeys = Object.keys(positionalMap);
          Object.keys(positionalMap).forEach((key) => {
            positionalKeys.push(...parsed.aliases[key]);
          });
          Object.keys(parsed.argv).forEach((key) => {
            if (positionalKeys.includes(key)) {
              if (!positionalMap[key])
                positionalMap[key] = parsed.argv[key];
              if (!this.isInConfigs(yargs, key) && !this.isDefaulted(yargs, key) && Object.prototype.hasOwnProperty.call(argv, key) && Object.prototype.hasOwnProperty.call(parsed.argv, key) && (Array.isArray(argv[key]) || Array.isArray(parsed.argv[key]))) {
                argv[key] = [].concat(argv[key], parsed.argv[key]);
              } else {
                argv[key] = parsed.argv[key];
              }
            }
          });
        }
      }
      isDefaulted(yargs, key) {
        const { default: defaults3 } = yargs.getOptions();
        return Object.prototype.hasOwnProperty.call(defaults3, key) || Object.prototype.hasOwnProperty.call(defaults3, this.shim.Parser.camelCase(key));
      }
      isInConfigs(yargs, key) {
        const { configObjects } = yargs.getOptions();
        return configObjects.some((c) => Object.prototype.hasOwnProperty.call(c, key)) || configObjects.some((c) => Object.prototype.hasOwnProperty.call(c, this.shim.Parser.camelCase(key)));
      }
      runDefaultBuilderOn(yargs) {
        if (!this.defaultCommand)
          return;
        if (this.shouldUpdateUsage(yargs)) {
          const commandString = DEFAULT_MARKER.test(this.defaultCommand.original) ? this.defaultCommand.original : this.defaultCommand.original.replace(/^[^[\]<>]*/, "$0 ");
          yargs.getInternalMethods().getUsageInstance().usage(commandString, this.defaultCommand.description);
        }
        const builder = this.defaultCommand.builder;
        if (isCommandBuilderCallback(builder)) {
          return builder(yargs, true);
        } else if (!isCommandBuilderDefinition(builder)) {
          Object.keys(builder).forEach((key) => {
            yargs.option(key, builder[key]);
          });
        }
        return void 0;
      }
      extractDesc({ describe, description: description2, desc }) {
        for (const test2 of [describe, description2, desc]) {
          if (typeof test2 === "string" || test2 === false)
            return test2;
          assertNotStrictEqual(test2, true, this.shim);
        }
        return false;
      }
      freeze() {
        this.frozens.push({
          handlers: this.handlers,
          aliasMap: this.aliasMap,
          defaultCommand: this.defaultCommand
        });
      }
      unfreeze() {
        const frozen = this.frozens.pop();
        assertNotStrictEqual(frozen, void 0, this.shim);
        ({
          handlers: this.handlers,
          aliasMap: this.aliasMap,
          defaultCommand: this.defaultCommand
        } = frozen);
      }
      reset() {
        this.handlers = {};
        this.aliasMap = {};
        this.defaultCommand = void 0;
        this.requireCache = /* @__PURE__ */ new Set();
        return this;
      }
    };
    completionShTemplate = `###-begin-{{app_name}}-completions-###
#
# yargs command completion script
#
# Installation: {{app_path}} {{completion_command}} >> ~/.bashrc
#    or {{app_path}} {{completion_command}} >> ~/.bash_profile on OSX.
#
_{{app_name}}_yargs_completions()
{
    local cur_word args type_list

    cur_word="\${COMP_WORDS[COMP_CWORD]}"
    args=("\${COMP_WORDS[@]}")

    # ask yargs to generate completions.
    # see https://stackoverflow.com/a/40944195/7080036 for the spaces-handling awk
    mapfile -t type_list < <({{app_path}} --get-yargs-completions "\${args[@]}")
    mapfile -t COMPREPLY < <(compgen -W "$( printf '%q ' "\${type_list[@]}" )" -- "\${cur_word}" |
        awk '/ / { print "\\""$0"\\"" } /^[^ ]+$/ { print $0 }')

    # if no match was found, fall back to filename completion
    if [ \${#COMPREPLY[@]} -eq 0 ]; then
      COMPREPLY=()
    fi

    return 0
}
complete -o bashdefault -o default -F _{{app_name}}_yargs_completions {{app_name}}
###-end-{{app_name}}-completions-###
`;
    completionZshTemplate = `#compdef {{app_name}}
###-begin-{{app_name}}-completions-###
#
# yargs command completion script
#
# Installation: {{app_path}} {{completion_command}} >> ~/.zshrc
#    or {{app_path}} {{completion_command}} >> ~/.zprofile on OSX.
#
_{{app_name}}_yargs_completions()
{
  local reply
  local si=$IFS
  IFS=$'
' reply=($(COMP_CWORD="$((CURRENT-1))" COMP_LINE="$BUFFER" COMP_POINT="$CURSOR" {{app_path}} --get-yargs-completions "\${words[@]}"))
  IFS=$si
  if [[ \${#reply} -gt 0 ]]; then
    _describe 'values' reply
  else
    _default
  fi
}
if [[ "'\${zsh_eval_context[-1]}" == "loadautofunc" ]]; then
  _{{app_name}}_yargs_completions "$@"
else
  compdef _{{app_name}}_yargs_completions {{app_name}}
fi
###-end-{{app_name}}-completions-###
`;
    Completion = class {
      constructor(yargs, usage2, command2, shim2) {
        var _a4, _b2, _c2;
        this.yargs = yargs;
        this.usage = usage2;
        this.command = command2;
        this.shim = shim2;
        this.completionKey = "get-yargs-completions";
        this.aliases = null;
        this.customCompletionFunction = null;
        this.indexAfterLastReset = 0;
        this.zshShell = (_c2 = ((_a4 = this.shim.getEnv("SHELL")) === null || _a4 === void 0 ? void 0 : _a4.includes("zsh")) || ((_b2 = this.shim.getEnv("ZSH_NAME")) === null || _b2 === void 0 ? void 0 : _b2.includes("zsh"))) !== null && _c2 !== void 0 ? _c2 : false;
      }
      defaultCompletion(args2, argv, current, done) {
        const handlers2 = this.command.getCommandHandlers();
        for (let i = 0, ii = args2.length; i < ii; ++i) {
          if (handlers2[args2[i]] && handlers2[args2[i]].builder) {
            const builder = handlers2[args2[i]].builder;
            if (isCommandBuilderCallback(builder)) {
              this.indexAfterLastReset = i + 1;
              const y = this.yargs.getInternalMethods().reset();
              builder(y, true);
              return y.argv;
            }
          }
        }
        const completions = [];
        this.commandCompletions(completions, args2, current);
        this.optionCompletions(completions, args2, argv, current);
        this.choicesFromOptionsCompletions(completions, args2, argv, current);
        this.choicesFromPositionalsCompletions(completions, args2, argv, current);
        done(null, completions);
      }
      commandCompletions(completions, args2, current) {
        const parentCommands = this.yargs.getInternalMethods().getContext().commands;
        if (!current.match(/^-/) && parentCommands[parentCommands.length - 1] !== current && !this.previousArgHasChoices(args2)) {
          this.usage.getCommands().forEach((usageCommand) => {
            const commandName = parseCommand(usageCommand[0]).cmd;
            if (args2.indexOf(commandName) === -1) {
              if (!this.zshShell) {
                completions.push(commandName);
              } else {
                const desc = usageCommand[1] || "";
                completions.push(commandName.replace(/:/g, "\\:") + ":" + desc);
              }
            }
          });
        }
      }
      optionCompletions(completions, args2, argv, current) {
        if ((current.match(/^-/) || current === "" && completions.length === 0) && !this.previousArgHasChoices(args2)) {
          const options2 = this.yargs.getOptions();
          const positionalKeys = this.yargs.getGroups()[this.usage.getPositionalGroupName()] || [];
          Object.keys(options2.key).forEach((key) => {
            const negable = !!options2.configuration["boolean-negation"] && options2.boolean.includes(key);
            const isPositionalKey = positionalKeys.includes(key);
            if (!isPositionalKey && !options2.hiddenOptions.includes(key) && !this.argsContainKey(args2, key, negable)) {
              this.completeOptionKey(key, completions, current, negable && !!options2.default[key]);
            }
          });
        }
      }
      choicesFromOptionsCompletions(completions, args2, argv, current) {
        if (this.previousArgHasChoices(args2)) {
          const choices = this.getPreviousArgChoices(args2);
          if (choices && choices.length > 0) {
            completions.push(...choices.map((c) => c.replace(/:/g, "\\:")));
          }
        }
      }
      choicesFromPositionalsCompletions(completions, args2, argv, current) {
        if (current === "" && completions.length > 0 && this.previousArgHasChoices(args2)) {
          return;
        }
        const positionalKeys = this.yargs.getGroups()[this.usage.getPositionalGroupName()] || [];
        const offset = Math.max(this.indexAfterLastReset, this.yargs.getInternalMethods().getContext().commands.length + 1);
        const positionalKey = positionalKeys[argv._.length - offset - 1];
        if (!positionalKey) {
          return;
        }
        const choices = this.yargs.getOptions().choices[positionalKey] || [];
        for (const choice of choices) {
          if (choice.startsWith(current)) {
            completions.push(choice.replace(/:/g, "\\:"));
          }
        }
      }
      getPreviousArgChoices(args2) {
        if (args2.length < 1)
          return;
        let previousArg = args2[args2.length - 1];
        let filter2 = "";
        if (!previousArg.startsWith("-") && args2.length > 1) {
          filter2 = previousArg;
          previousArg = args2[args2.length - 2];
        }
        if (!previousArg.startsWith("-"))
          return;
        const previousArgKey = previousArg.replace(/^-+/, "");
        const options2 = this.yargs.getOptions();
        const possibleAliases = [
          previousArgKey,
          ...this.yargs.getAliases()[previousArgKey] || []
        ];
        let choices;
        for (const possibleAlias of possibleAliases) {
          if (Object.prototype.hasOwnProperty.call(options2.key, possibleAlias) && Array.isArray(options2.choices[possibleAlias])) {
            choices = options2.choices[possibleAlias];
            break;
          }
        }
        if (choices) {
          return choices.filter((choice) => !filter2 || choice.startsWith(filter2));
        }
      }
      previousArgHasChoices(args2) {
        const choices = this.getPreviousArgChoices(args2);
        return choices !== void 0 && choices.length > 0;
      }
      argsContainKey(args2, key, negable) {
        const argsContains = (s) => args2.indexOf((/^[^0-9]$/.test(s) ? "-" : "--") + s) !== -1;
        if (argsContains(key))
          return true;
        if (negable && argsContains(`no-${key}`))
          return true;
        if (this.aliases) {
          for (const alias of this.aliases[key]) {
            if (argsContains(alias))
              return true;
          }
        }
        return false;
      }
      completeOptionKey(key, completions, current, negable) {
        var _a4, _b2, _c2, _d;
        let keyWithDesc = key;
        if (this.zshShell) {
          const descs = this.usage.getDescriptions();
          const aliasKey = (_b2 = (_a4 = this === null || this === void 0 ? void 0 : this.aliases) === null || _a4 === void 0 ? void 0 : _a4[key]) === null || _b2 === void 0 ? void 0 : _b2.find((alias) => {
            const desc2 = descs[alias];
            return typeof desc2 === "string" && desc2.length > 0;
          });
          const descFromAlias = aliasKey ? descs[aliasKey] : void 0;
          const desc = (_d = (_c2 = descs[key]) !== null && _c2 !== void 0 ? _c2 : descFromAlias) !== null && _d !== void 0 ? _d : "";
          keyWithDesc = `${key.replace(/:/g, "\\:")}:${desc.replace("__yargsString__:", "").replace(/(\r\n|\n|\r)/gm, " ")}`;
        }
        const startsByTwoDashes = (s) => /^--/.test(s);
        const isShortOption = (s) => /^[^0-9]$/.test(s);
        const dashes = !startsByTwoDashes(current) && isShortOption(key) ? "-" : "--";
        completions.push(dashes + keyWithDesc);
        if (negable) {
          completions.push(dashes + "no-" + keyWithDesc);
        }
      }
      customCompletion(args2, argv, current, done) {
        assertNotStrictEqual(this.customCompletionFunction, null, this.shim);
        if (isSyncCompletionFunction(this.customCompletionFunction)) {
          const result = this.customCompletionFunction(current, argv);
          if (isPromise$1(result)) {
            return result.then((list2) => {
              this.shim.process.nextTick(() => {
                done(null, list2);
              });
            }).catch((err) => {
              this.shim.process.nextTick(() => {
                done(err, void 0);
              });
            });
          }
          return done(null, result);
        } else if (isFallbackCompletionFunction(this.customCompletionFunction)) {
          return this.customCompletionFunction(current, argv, (onCompleted = done) => this.defaultCompletion(args2, argv, current, onCompleted), (completions) => {
            done(null, completions);
          });
        } else {
          return this.customCompletionFunction(current, argv, (completions) => {
            done(null, completions);
          });
        }
      }
      getCompletion(args2, done) {
        const current = args2.length ? args2[args2.length - 1] : "";
        const argv = this.yargs.parse(args2, true);
        const completionFunction = this.customCompletionFunction ? (argv2) => this.customCompletion(args2, argv2, current, done) : (argv2) => this.defaultCompletion(args2, argv2, current, done);
        return isPromise$1(argv) ? argv.then(completionFunction) : completionFunction(argv);
      }
      generateCompletionScript($0, cmd) {
        let script = this.zshShell ? completionZshTemplate : completionShTemplate;
        const name = this.shim.path.basename($0);
        if ($0.match(/\.js$/))
          $0 = `./${$0}`;
        script = script.replace(/{{app_name}}/g, name);
        script = script.replace(/{{completion_command}}/g, cmd);
        return script.replace(/{{app_path}}/g, $0);
      }
      registerFunction(fn) {
        this.customCompletionFunction = fn;
      }
      setParsed(parsed) {
        this.aliases = parsed.aliases;
      }
    };
    specialKeys = ["$0", "--", "_"];
    previouslyVisitedConfigs = [];
    __classPrivateFieldSet$1 = function(receiver2, state, value, kind, f) {
      if (kind === "m") throw new TypeError("Private method is not writable");
      if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
      if (typeof state === "function" ? receiver2 !== state || !f : !state.has(receiver2)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
      return kind === "a" ? f.call(receiver2, value) : f ? f.value = value : state.set(receiver2, value), value;
    };
    __classPrivateFieldGet$1 = function(receiver2, state, kind, f) {
      if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
      if (typeof state === "function" ? receiver2 !== state || !f : !state.has(receiver2)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
      return kind === "m" ? f : kind === "a" ? f.call(receiver2) : f ? f.value : state.get(receiver2);
    };
    kCopyDoubleDash = Symbol("copyDoubleDash");
    kCreateLogger = Symbol("copyDoubleDash");
    kDeleteFromParserHintObject = Symbol("deleteFromParserHintObject");
    kEmitWarning = Symbol("emitWarning");
    kFreeze = Symbol("freeze");
    kGetDollarZero = Symbol("getDollarZero");
    kGetParserConfiguration = Symbol("getParserConfiguration");
    kGetUsageConfiguration = Symbol("getUsageConfiguration");
    kGuessLocale = Symbol("guessLocale");
    kGuessVersion = Symbol("guessVersion");
    kParsePositionalNumbers = Symbol("parsePositionalNumbers");
    kPkgUp = Symbol("pkgUp");
    kPopulateParserHintArray = Symbol("populateParserHintArray");
    kPopulateParserHintSingleValueDictionary = Symbol("populateParserHintSingleValueDictionary");
    kPopulateParserHintArrayDictionary = Symbol("populateParserHintArrayDictionary");
    kPopulateParserHintDictionary = Symbol("populateParserHintDictionary");
    kSanitizeKey = Symbol("sanitizeKey");
    kSetKey = Symbol("setKey");
    kUnfreeze = Symbol("unfreeze");
    kValidateAsync = Symbol("validateAsync");
    kGetCommandInstance = Symbol("getCommandInstance");
    kGetContext = Symbol("getContext");
    kGetHasOutput = Symbol("getHasOutput");
    kGetLoggerInstance = Symbol("getLoggerInstance");
    kGetParseContext = Symbol("getParseContext");
    kGetUsageInstance = Symbol("getUsageInstance");
    kGetValidationInstance = Symbol("getValidationInstance");
    kHasParseCallback = Symbol("hasParseCallback");
    kIsGlobalContext = Symbol("isGlobalContext");
    kPostProcess = Symbol("postProcess");
    kRebase = Symbol("rebase");
    kReset = Symbol("reset");
    kRunYargsParserAndExecuteCommands = Symbol("runYargsParserAndExecuteCommands");
    kRunValidation = Symbol("runValidation");
    kSetHasOutput = Symbol("setHasOutput");
    kTrackManuallySetKeys = Symbol("kTrackManuallySetKeys");
    DEFAULT_LOCALE$1 = "en_US";
    YargsInstance = class {
      constructor(processArgs = [], cwd, parentRequire, shim2) {
        this.customScriptName = false;
        this.parsed = false;
        _YargsInstance_command.set(this, void 0);
        _YargsInstance_cwd.set(this, void 0);
        _YargsInstance_context.set(this, { commands: [], fullCommands: [] });
        _YargsInstance_completion.set(this, null);
        _YargsInstance_completionCommand.set(this, null);
        _YargsInstance_defaultShowHiddenOpt.set(this, "show-hidden");
        _YargsInstance_exitError.set(this, null);
        _YargsInstance_detectLocale.set(this, true);
        _YargsInstance_emittedWarnings.set(this, {});
        _YargsInstance_exitProcess.set(this, true);
        _YargsInstance_frozens.set(this, []);
        _YargsInstance_globalMiddleware.set(this, void 0);
        _YargsInstance_groups.set(this, {});
        _YargsInstance_hasOutput.set(this, false);
        _YargsInstance_helpOpt.set(this, null);
        _YargsInstance_isGlobalContext.set(this, true);
        _YargsInstance_logger.set(this, void 0);
        _YargsInstance_output.set(this, "");
        _YargsInstance_options.set(this, void 0);
        _YargsInstance_parentRequire.set(this, void 0);
        _YargsInstance_parserConfig.set(this, {});
        _YargsInstance_parseFn.set(this, null);
        _YargsInstance_parseContext.set(this, null);
        _YargsInstance_pkgs.set(this, {});
        _YargsInstance_preservedGroups.set(this, {});
        _YargsInstance_processArgs.set(this, void 0);
        _YargsInstance_recommendCommands.set(this, false);
        _YargsInstance_shim.set(this, void 0);
        _YargsInstance_strict.set(this, false);
        _YargsInstance_strictCommands.set(this, false);
        _YargsInstance_strictOptions.set(this, false);
        _YargsInstance_usage.set(this, void 0);
        _YargsInstance_usageConfig.set(this, {});
        _YargsInstance_versionOpt.set(this, null);
        _YargsInstance_validation.set(this, void 0);
        __classPrivateFieldSet$1(this, _YargsInstance_shim, shim2, "f");
        __classPrivateFieldSet$1(this, _YargsInstance_processArgs, processArgs, "f");
        __classPrivateFieldSet$1(this, _YargsInstance_cwd, cwd, "f");
        __classPrivateFieldSet$1(this, _YargsInstance_parentRequire, parentRequire, "f");
        __classPrivateFieldSet$1(this, _YargsInstance_globalMiddleware, new GlobalMiddleware(this), "f");
        this.$0 = this[kGetDollarZero]();
        this[kReset]();
        __classPrivateFieldSet$1(this, _YargsInstance_command, __classPrivateFieldGet$1(this, _YargsInstance_command, "f"), "f");
        __classPrivateFieldSet$1(this, _YargsInstance_usage, __classPrivateFieldGet$1(this, _YargsInstance_usage, "f"), "f");
        __classPrivateFieldSet$1(this, _YargsInstance_validation, __classPrivateFieldGet$1(this, _YargsInstance_validation, "f"), "f");
        __classPrivateFieldSet$1(this, _YargsInstance_options, __classPrivateFieldGet$1(this, _YargsInstance_options, "f"), "f");
        __classPrivateFieldGet$1(this, _YargsInstance_options, "f").showHiddenOpt = __classPrivateFieldGet$1(this, _YargsInstance_defaultShowHiddenOpt, "f");
        __classPrivateFieldSet$1(this, _YargsInstance_logger, this[kCreateLogger](), "f");
        __classPrivateFieldGet$1(this, _YargsInstance_shim, "f").y18n.setLocale(DEFAULT_LOCALE$1);
      }
      addHelpOpt(opt, msg) {
        const defaultHelpOpt = "help";
        argsert("[string|boolean] [string]", [opt, msg], arguments.length);
        if (__classPrivateFieldGet$1(this, _YargsInstance_helpOpt, "f")) {
          this[kDeleteFromParserHintObject](__classPrivateFieldGet$1(this, _YargsInstance_helpOpt, "f"));
          __classPrivateFieldSet$1(this, _YargsInstance_helpOpt, null, "f");
        }
        if (opt === false && msg === void 0)
          return this;
        __classPrivateFieldSet$1(this, _YargsInstance_helpOpt, typeof opt === "string" ? opt : defaultHelpOpt, "f");
        this.boolean(__classPrivateFieldGet$1(this, _YargsInstance_helpOpt, "f"));
        this.describe(__classPrivateFieldGet$1(this, _YargsInstance_helpOpt, "f"), msg || __classPrivateFieldGet$1(this, _YargsInstance_usage, "f").deferY18nLookup("Show help"));
        return this;
      }
      help(opt, msg) {
        return this.addHelpOpt(opt, msg);
      }
      addShowHiddenOpt(opt, msg) {
        argsert("[string|boolean] [string]", [opt, msg], arguments.length);
        if (opt === false && msg === void 0)
          return this;
        const showHiddenOpt = typeof opt === "string" ? opt : __classPrivateFieldGet$1(this, _YargsInstance_defaultShowHiddenOpt, "f");
        this.boolean(showHiddenOpt);
        this.describe(showHiddenOpt, msg || __classPrivateFieldGet$1(this, _YargsInstance_usage, "f").deferY18nLookup("Show hidden options"));
        __classPrivateFieldGet$1(this, _YargsInstance_options, "f").showHiddenOpt = showHiddenOpt;
        return this;
      }
      showHidden(opt, msg) {
        return this.addShowHiddenOpt(opt, msg);
      }
      alias(key, value) {
        argsert("<object|string|array> [string|array]", [key, value], arguments.length);
        this[kPopulateParserHintArrayDictionary](this.alias.bind(this), "alias", key, value);
        return this;
      }
      array(keys2) {
        argsert("<array|string>", [keys2], arguments.length);
        this[kPopulateParserHintArray]("array", keys2);
        this[kTrackManuallySetKeys](keys2);
        return this;
      }
      boolean(keys2) {
        argsert("<array|string>", [keys2], arguments.length);
        this[kPopulateParserHintArray]("boolean", keys2);
        this[kTrackManuallySetKeys](keys2);
        return this;
      }
      check(f, global2) {
        argsert("<function> [boolean]", [f, global2], arguments.length);
        this.middleware((argv, _yargs) => {
          return maybeAsyncResult(() => {
            return f(argv, _yargs.getOptions());
          }, (result) => {
            if (!result) {
              __classPrivateFieldGet$1(this, _YargsInstance_usage, "f").fail(__classPrivateFieldGet$1(this, _YargsInstance_shim, "f").y18n.__("Argument check failed: %s", f.toString()));
            } else if (typeof result === "string" || result instanceof Error) {
              __classPrivateFieldGet$1(this, _YargsInstance_usage, "f").fail(result.toString(), result);
            }
            return argv;
          }, (err) => {
            __classPrivateFieldGet$1(this, _YargsInstance_usage, "f").fail(err.message ? err.message : err.toString(), err);
            return argv;
          });
        }, false, global2);
        return this;
      }
      choices(key, value) {
        argsert("<object|string|array> [string|array]", [key, value], arguments.length);
        this[kPopulateParserHintArrayDictionary](this.choices.bind(this), "choices", key, value);
        return this;
      }
      coerce(keys2, value) {
        argsert("<object|string|array> [function]", [keys2, value], arguments.length);
        if (Array.isArray(keys2)) {
          if (!value) {
            throw new YError("coerce callback must be provided");
          }
          for (const key of keys2) {
            this.coerce(key, value);
          }
          return this;
        } else if (typeof keys2 === "object") {
          for (const key of Object.keys(keys2)) {
            this.coerce(key, keys2[key]);
          }
          return this;
        }
        if (!value) {
          throw new YError("coerce callback must be provided");
        }
        const coerceKey = keys2;
        __classPrivateFieldGet$1(this, _YargsInstance_options, "f").key[coerceKey] = true;
        __classPrivateFieldGet$1(this, _YargsInstance_globalMiddleware, "f").addCoerceMiddleware((argv, yargs) => {
          var _a4;
          const coerceKeyAliases = (_a4 = yargs.getAliases()[coerceKey]) !== null && _a4 !== void 0 ? _a4 : [];
          const argvKeys = [coerceKey, ...coerceKeyAliases].filter((key) => Object.prototype.hasOwnProperty.call(argv, key));
          if (argvKeys.length === 0) {
            return argv;
          }
          return maybeAsyncResult(() => {
            return value(argv[argvKeys[0]]);
          }, (result) => {
            argvKeys.forEach((key) => {
              argv[key] = result;
            });
            return argv;
          }, (err) => {
            throw new YError(err.message);
          });
        }, coerceKey);
        return this;
      }
      conflicts(key1, key2) {
        argsert("<string|object> [string|array]", [key1, key2], arguments.length);
        __classPrivateFieldGet$1(this, _YargsInstance_validation, "f").conflicts(key1, key2);
        return this;
      }
      config(key = "config", msg, parseFn) {
        argsert("[object|string] [string|function] [function]", [key, msg, parseFn], arguments.length);
        if (typeof key === "object" && !Array.isArray(key)) {
          key = applyExtends(key, __classPrivateFieldGet$1(this, _YargsInstance_cwd, "f"), this[kGetParserConfiguration]()["deep-merge-config"] || false, __classPrivateFieldGet$1(this, _YargsInstance_shim, "f"));
          __classPrivateFieldGet$1(this, _YargsInstance_options, "f").configObjects = (__classPrivateFieldGet$1(this, _YargsInstance_options, "f").configObjects || []).concat(key);
          return this;
        }
        if (typeof msg === "function") {
          parseFn = msg;
          msg = void 0;
        }
        this.describe(key, msg || __classPrivateFieldGet$1(this, _YargsInstance_usage, "f").deferY18nLookup("Path to JSON config file"));
        (Array.isArray(key) ? key : [key]).forEach((k) => {
          __classPrivateFieldGet$1(this, _YargsInstance_options, "f").config[k] = parseFn || true;
        });
        return this;
      }
      completion(cmd, desc, fn) {
        argsert("[string] [string|boolean|function] [function]", [cmd, desc, fn], arguments.length);
        if (typeof desc === "function") {
          fn = desc;
          desc = void 0;
        }
        __classPrivateFieldSet$1(this, _YargsInstance_completionCommand, cmd || __classPrivateFieldGet$1(this, _YargsInstance_completionCommand, "f") || "completion", "f");
        if (!desc && desc !== false) {
          desc = "generate completion script";
        }
        this.command(__classPrivateFieldGet$1(this, _YargsInstance_completionCommand, "f"), desc);
        if (fn)
          __classPrivateFieldGet$1(this, _YargsInstance_completion, "f").registerFunction(fn);
        return this;
      }
      command(cmd, description2, builder, handler, middlewares, deprecated) {
        argsert("<string|array|object> [string|boolean] [function|object] [function] [array] [boolean|string]", [cmd, description2, builder, handler, middlewares, deprecated], arguments.length);
        __classPrivateFieldGet$1(this, _YargsInstance_command, "f").addHandler(cmd, description2, builder, handler, middlewares, deprecated);
        return this;
      }
      commands(cmd, description2, builder, handler, middlewares, deprecated) {
        return this.command(cmd, description2, builder, handler, middlewares, deprecated);
      }
      commandDir(dir, opts) {
        argsert("<string> [object]", [dir, opts], arguments.length);
        const req = __classPrivateFieldGet$1(this, _YargsInstance_parentRequire, "f") || __classPrivateFieldGet$1(this, _YargsInstance_shim, "f").require;
        __classPrivateFieldGet$1(this, _YargsInstance_command, "f").addDirectory(dir, req, __classPrivateFieldGet$1(this, _YargsInstance_shim, "f").getCallerFile(), opts);
        return this;
      }
      count(keys2) {
        argsert("<array|string>", [keys2], arguments.length);
        this[kPopulateParserHintArray]("count", keys2);
        this[kTrackManuallySetKeys](keys2);
        return this;
      }
      default(key, value, defaultDescription) {
        argsert("<object|string|array> [*] [string]", [key, value, defaultDescription], arguments.length);
        if (defaultDescription) {
          assertSingleKey(key, __classPrivateFieldGet$1(this, _YargsInstance_shim, "f"));
          __classPrivateFieldGet$1(this, _YargsInstance_options, "f").defaultDescription[key] = defaultDescription;
        }
        if (typeof value === "function") {
          assertSingleKey(key, __classPrivateFieldGet$1(this, _YargsInstance_shim, "f"));
          if (!__classPrivateFieldGet$1(this, _YargsInstance_options, "f").defaultDescription[key])
            __classPrivateFieldGet$1(this, _YargsInstance_options, "f").defaultDescription[key] = __classPrivateFieldGet$1(this, _YargsInstance_usage, "f").functionDescription(value);
          value = value.call();
        }
        this[kPopulateParserHintSingleValueDictionary](this.default.bind(this), "default", key, value);
        return this;
      }
      defaults(key, value, defaultDescription) {
        return this.default(key, value, defaultDescription);
      }
      demandCommand(min = 1, max, minMsg, maxMsg) {
        argsert("[number] [number|string] [string|null|undefined] [string|null|undefined]", [min, max, minMsg, maxMsg], arguments.length);
        if (typeof max !== "number") {
          minMsg = max;
          max = Infinity;
        }
        this.global("_", false);
        __classPrivateFieldGet$1(this, _YargsInstance_options, "f").demandedCommands._ = {
          min,
          max,
          minMsg,
          maxMsg
        };
        return this;
      }
      demand(keys2, max, msg) {
        if (Array.isArray(max)) {
          max.forEach((key) => {
            assertNotStrictEqual(msg, true, __classPrivateFieldGet$1(this, _YargsInstance_shim, "f"));
            this.demandOption(key, msg);
          });
          max = Infinity;
        } else if (typeof max !== "number") {
          msg = max;
          max = Infinity;
        }
        if (typeof keys2 === "number") {
          assertNotStrictEqual(msg, true, __classPrivateFieldGet$1(this, _YargsInstance_shim, "f"));
          this.demandCommand(keys2, max, msg, msg);
        } else if (Array.isArray(keys2)) {
          keys2.forEach((key) => {
            assertNotStrictEqual(msg, true, __classPrivateFieldGet$1(this, _YargsInstance_shim, "f"));
            this.demandOption(key, msg);
          });
        } else {
          if (typeof msg === "string") {
            this.demandOption(keys2, msg);
          } else if (msg === true || typeof msg === "undefined") {
            this.demandOption(keys2);
          }
        }
        return this;
      }
      demandOption(keys2, msg) {
        argsert("<object|string|array> [string]", [keys2, msg], arguments.length);
        this[kPopulateParserHintSingleValueDictionary](this.demandOption.bind(this), "demandedOptions", keys2, msg);
        return this;
      }
      deprecateOption(option, message) {
        argsert("<string> [string|boolean]", [option, message], arguments.length);
        __classPrivateFieldGet$1(this, _YargsInstance_options, "f").deprecatedOptions[option] = message;
        return this;
      }
      describe(keys2, description2) {
        argsert("<object|string|array> [string]", [keys2, description2], arguments.length);
        this[kSetKey](keys2, true);
        __classPrivateFieldGet$1(this, _YargsInstance_usage, "f").describe(keys2, description2);
        return this;
      }
      detectLocale(detect) {
        argsert("<boolean>", [detect], arguments.length);
        __classPrivateFieldSet$1(this, _YargsInstance_detectLocale, detect, "f");
        return this;
      }
      env(prefix) {
        argsert("[string|boolean]", [prefix], arguments.length);
        if (prefix === false)
          delete __classPrivateFieldGet$1(this, _YargsInstance_options, "f").envPrefix;
        else
          __classPrivateFieldGet$1(this, _YargsInstance_options, "f").envPrefix = prefix || "";
        return this;
      }
      epilogue(msg) {
        argsert("<string>", [msg], arguments.length);
        __classPrivateFieldGet$1(this, _YargsInstance_usage, "f").epilog(msg);
        return this;
      }
      epilog(msg) {
        return this.epilogue(msg);
      }
      example(cmd, description2) {
        argsert("<string|array> [string]", [cmd, description2], arguments.length);
        if (Array.isArray(cmd)) {
          cmd.forEach((exampleParams) => this.example(...exampleParams));
        } else {
          __classPrivateFieldGet$1(this, _YargsInstance_usage, "f").example(cmd, description2);
        }
        return this;
      }
      exit(code2, err) {
        __classPrivateFieldSet$1(this, _YargsInstance_hasOutput, true, "f");
        __classPrivateFieldSet$1(this, _YargsInstance_exitError, err, "f");
        if (__classPrivateFieldGet$1(this, _YargsInstance_exitProcess, "f"))
          __classPrivateFieldGet$1(this, _YargsInstance_shim, "f").process.exit(code2);
      }
      exitProcess(enabled = true) {
        argsert("[boolean]", [enabled], arguments.length);
        __classPrivateFieldSet$1(this, _YargsInstance_exitProcess, enabled, "f");
        return this;
      }
      fail(f) {
        argsert("<function|boolean>", [f], arguments.length);
        if (typeof f === "boolean" && f !== false) {
          throw new YError("Invalid first argument. Expected function or boolean 'false'");
        }
        __classPrivateFieldGet$1(this, _YargsInstance_usage, "f").failFn(f);
        return this;
      }
      getAliases() {
        return this.parsed ? this.parsed.aliases : {};
      }
      async getCompletion(args2, done) {
        argsert("<array> [function]", [args2, done], arguments.length);
        if (!done) {
          return new Promise((resolve2, reject) => {
            __classPrivateFieldGet$1(this, _YargsInstance_completion, "f").getCompletion(args2, (err, completions) => {
              if (err)
                reject(err);
              else
                resolve2(completions);
            });
          });
        } else {
          return __classPrivateFieldGet$1(this, _YargsInstance_completion, "f").getCompletion(args2, done);
        }
      }
      getDemandedOptions() {
        argsert([], 0);
        return __classPrivateFieldGet$1(this, _YargsInstance_options, "f").demandedOptions;
      }
      getDemandedCommands() {
        argsert([], 0);
        return __classPrivateFieldGet$1(this, _YargsInstance_options, "f").demandedCommands;
      }
      getDeprecatedOptions() {
        argsert([], 0);
        return __classPrivateFieldGet$1(this, _YargsInstance_options, "f").deprecatedOptions;
      }
      getDetectLocale() {
        return __classPrivateFieldGet$1(this, _YargsInstance_detectLocale, "f");
      }
      getExitProcess() {
        return __classPrivateFieldGet$1(this, _YargsInstance_exitProcess, "f");
      }
      getGroups() {
        return Object.assign({}, __classPrivateFieldGet$1(this, _YargsInstance_groups, "f"), __classPrivateFieldGet$1(this, _YargsInstance_preservedGroups, "f"));
      }
      getHelp() {
        __classPrivateFieldSet$1(this, _YargsInstance_hasOutput, true, "f");
        if (!__classPrivateFieldGet$1(this, _YargsInstance_usage, "f").hasCachedHelpMessage()) {
          if (!this.parsed) {
            const parse2 = this[kRunYargsParserAndExecuteCommands](__classPrivateFieldGet$1(this, _YargsInstance_processArgs, "f"), void 0, void 0, 0, true);
            if (isPromise$1(parse2)) {
              return parse2.then(() => {
                return __classPrivateFieldGet$1(this, _YargsInstance_usage, "f").help();
              });
            }
          }
          const builderResponse = __classPrivateFieldGet$1(this, _YargsInstance_command, "f").runDefaultBuilderOn(this);
          if (isPromise$1(builderResponse)) {
            return builderResponse.then(() => {
              return __classPrivateFieldGet$1(this, _YargsInstance_usage, "f").help();
            });
          }
        }
        return Promise.resolve(__classPrivateFieldGet$1(this, _YargsInstance_usage, "f").help());
      }
      getOptions() {
        return __classPrivateFieldGet$1(this, _YargsInstance_options, "f");
      }
      getStrict() {
        return __classPrivateFieldGet$1(this, _YargsInstance_strict, "f");
      }
      getStrictCommands() {
        return __classPrivateFieldGet$1(this, _YargsInstance_strictCommands, "f");
      }
      getStrictOptions() {
        return __classPrivateFieldGet$1(this, _YargsInstance_strictOptions, "f");
      }
      global(globals, global2) {
        argsert("<string|array> [boolean]", [globals, global2], arguments.length);
        globals = [].concat(globals);
        if (global2 !== false) {
          __classPrivateFieldGet$1(this, _YargsInstance_options, "f").local = __classPrivateFieldGet$1(this, _YargsInstance_options, "f").local.filter((l) => globals.indexOf(l) === -1);
        } else {
          globals.forEach((g) => {
            if (!__classPrivateFieldGet$1(this, _YargsInstance_options, "f").local.includes(g))
              __classPrivateFieldGet$1(this, _YargsInstance_options, "f").local.push(g);
          });
        }
        return this;
      }
      group(opts, groupName) {
        argsert("<string|array> <string>", [opts, groupName], arguments.length);
        const existing = __classPrivateFieldGet$1(this, _YargsInstance_preservedGroups, "f")[groupName] || __classPrivateFieldGet$1(this, _YargsInstance_groups, "f")[groupName];
        if (__classPrivateFieldGet$1(this, _YargsInstance_preservedGroups, "f")[groupName]) {
          delete __classPrivateFieldGet$1(this, _YargsInstance_preservedGroups, "f")[groupName];
        }
        const seen = {};
        __classPrivateFieldGet$1(this, _YargsInstance_groups, "f")[groupName] = (existing || []).concat(opts).filter((key) => {
          if (seen[key])
            return false;
          return seen[key] = true;
        });
        return this;
      }
      hide(key) {
        argsert("<string>", [key], arguments.length);
        __classPrivateFieldGet$1(this, _YargsInstance_options, "f").hiddenOptions.push(key);
        return this;
      }
      implies(key, value) {
        argsert("<string|object> [number|string|array]", [key, value], arguments.length);
        __classPrivateFieldGet$1(this, _YargsInstance_validation, "f").implies(key, value);
        return this;
      }
      locale(locale) {
        argsert("[string]", [locale], arguments.length);
        if (locale === void 0) {
          this[kGuessLocale]();
          return __classPrivateFieldGet$1(this, _YargsInstance_shim, "f").y18n.getLocale();
        }
        __classPrivateFieldSet$1(this, _YargsInstance_detectLocale, false, "f");
        __classPrivateFieldGet$1(this, _YargsInstance_shim, "f").y18n.setLocale(locale);
        return this;
      }
      middleware(callback, applyBeforeValidation, global2) {
        return __classPrivateFieldGet$1(this, _YargsInstance_globalMiddleware, "f").addMiddleware(callback, !!applyBeforeValidation, global2);
      }
      nargs(key, value) {
        argsert("<string|object|array> [number]", [key, value], arguments.length);
        this[kPopulateParserHintSingleValueDictionary](this.nargs.bind(this), "narg", key, value);
        return this;
      }
      normalize(keys2) {
        argsert("<array|string>", [keys2], arguments.length);
        this[kPopulateParserHintArray]("normalize", keys2);
        return this;
      }
      number(keys2) {
        argsert("<array|string>", [keys2], arguments.length);
        this[kPopulateParserHintArray]("number", keys2);
        this[kTrackManuallySetKeys](keys2);
        return this;
      }
      option(key, opt) {
        argsert("<string|object> [object]", [key, opt], arguments.length);
        if (typeof key === "object") {
          Object.keys(key).forEach((k) => {
            this.options(k, key[k]);
          });
        } else {
          if (typeof opt !== "object") {
            opt = {};
          }
          this[kTrackManuallySetKeys](key);
          if (__classPrivateFieldGet$1(this, _YargsInstance_versionOpt, "f") && (key === "version" || (opt === null || opt === void 0 ? void 0 : opt.alias) === "version")) {
            this[kEmitWarning]([
              '"version" is a reserved word.',
              "Please do one of the following:",
              '- Disable version with `yargs.version(false)` if using "version" as an option',
              "- Use the built-in `yargs.version` method instead (if applicable)",
              "- Use a different option key",
              "https://yargs.js.org/docs/#api-reference-version"
            ].join("\n"), void 0, "versionWarning");
          }
          __classPrivateFieldGet$1(this, _YargsInstance_options, "f").key[key] = true;
          if (opt.alias)
            this.alias(key, opt.alias);
          const deprecate = opt.deprecate || opt.deprecated;
          if (deprecate) {
            this.deprecateOption(key, deprecate);
          }
          const demand = opt.demand || opt.required || opt.require;
          if (demand) {
            this.demand(key, demand);
          }
          if (opt.demandOption) {
            this.demandOption(key, typeof opt.demandOption === "string" ? opt.demandOption : void 0);
          }
          if (opt.conflicts) {
            this.conflicts(key, opt.conflicts);
          }
          if ("default" in opt) {
            this.default(key, opt.default);
          }
          if (opt.implies !== void 0) {
            this.implies(key, opt.implies);
          }
          if (opt.nargs !== void 0) {
            this.nargs(key, opt.nargs);
          }
          if (opt.config) {
            this.config(key, opt.configParser);
          }
          if (opt.normalize) {
            this.normalize(key);
          }
          if (opt.choices) {
            this.choices(key, opt.choices);
          }
          if (opt.coerce) {
            this.coerce(key, opt.coerce);
          }
          if (opt.group) {
            this.group(key, opt.group);
          }
          if (opt.boolean || opt.type === "boolean") {
            this.boolean(key);
            if (opt.alias)
              this.boolean(opt.alias);
          }
          if (opt.array || opt.type === "array") {
            this.array(key);
            if (opt.alias)
              this.array(opt.alias);
          }
          if (opt.number || opt.type === "number") {
            this.number(key);
            if (opt.alias)
              this.number(opt.alias);
          }
          if (opt.string || opt.type === "string") {
            this.string(key);
            if (opt.alias)
              this.string(opt.alias);
          }
          if (opt.count || opt.type === "count") {
            this.count(key);
          }
          if (typeof opt.global === "boolean") {
            this.global(key, opt.global);
          }
          if (opt.defaultDescription) {
            __classPrivateFieldGet$1(this, _YargsInstance_options, "f").defaultDescription[key] = opt.defaultDescription;
          }
          if (opt.skipValidation) {
            this.skipValidation(key);
          }
          const desc = opt.describe || opt.description || opt.desc;
          const descriptions = __classPrivateFieldGet$1(this, _YargsInstance_usage, "f").getDescriptions();
          if (!Object.prototype.hasOwnProperty.call(descriptions, key) || typeof desc === "string") {
            this.describe(key, desc);
          }
          if (opt.hidden) {
            this.hide(key);
          }
          if (opt.requiresArg) {
            this.requiresArg(key);
          }
        }
        return this;
      }
      options(key, opt) {
        return this.option(key, opt);
      }
      parse(args2, shortCircuit, _parseFn) {
        argsert("[string|array] [function|boolean|object] [function]", [args2, shortCircuit, _parseFn], arguments.length);
        this[kFreeze]();
        if (typeof args2 === "undefined") {
          args2 = __classPrivateFieldGet$1(this, _YargsInstance_processArgs, "f");
        }
        if (typeof shortCircuit === "object") {
          __classPrivateFieldSet$1(this, _YargsInstance_parseContext, shortCircuit, "f");
          shortCircuit = _parseFn;
        }
        if (typeof shortCircuit === "function") {
          __classPrivateFieldSet$1(this, _YargsInstance_parseFn, shortCircuit, "f");
          shortCircuit = false;
        }
        if (!shortCircuit)
          __classPrivateFieldSet$1(this, _YargsInstance_processArgs, args2, "f");
        if (__classPrivateFieldGet$1(this, _YargsInstance_parseFn, "f"))
          __classPrivateFieldSet$1(this, _YargsInstance_exitProcess, false, "f");
        const parsed = this[kRunYargsParserAndExecuteCommands](args2, !!shortCircuit);
        const tmpParsed = this.parsed;
        __classPrivateFieldGet$1(this, _YargsInstance_completion, "f").setParsed(this.parsed);
        if (isPromise$1(parsed)) {
          return parsed.then((argv) => {
            if (__classPrivateFieldGet$1(this, _YargsInstance_parseFn, "f"))
              __classPrivateFieldGet$1(this, _YargsInstance_parseFn, "f").call(this, __classPrivateFieldGet$1(this, _YargsInstance_exitError, "f"), argv, __classPrivateFieldGet$1(this, _YargsInstance_output, "f"));
            return argv;
          }).catch((err) => {
            if (__classPrivateFieldGet$1(this, _YargsInstance_parseFn, "f")) {
              __classPrivateFieldGet$1(this, _YargsInstance_parseFn, "f")(err, this.parsed.argv, __classPrivateFieldGet$1(this, _YargsInstance_output, "f"));
            }
            throw err;
          }).finally(() => {
            this[kUnfreeze]();
            this.parsed = tmpParsed;
          });
        } else {
          if (__classPrivateFieldGet$1(this, _YargsInstance_parseFn, "f"))
            __classPrivateFieldGet$1(this, _YargsInstance_parseFn, "f").call(this, __classPrivateFieldGet$1(this, _YargsInstance_exitError, "f"), parsed, __classPrivateFieldGet$1(this, _YargsInstance_output, "f"));
          this[kUnfreeze]();
          this.parsed = tmpParsed;
        }
        return parsed;
      }
      parseAsync(args2, shortCircuit, _parseFn) {
        const maybePromise = this.parse(args2, shortCircuit, _parseFn);
        return !isPromise$1(maybePromise) ? Promise.resolve(maybePromise) : maybePromise;
      }
      parseSync(args2, shortCircuit, _parseFn) {
        const maybePromise = this.parse(args2, shortCircuit, _parseFn);
        if (isPromise$1(maybePromise)) {
          throw new YError(".parseSync() must not be used with asynchronous builders, handlers, or middleware");
        }
        return maybePromise;
      }
      parserConfiguration(config4) {
        argsert("<object>", [config4], arguments.length);
        __classPrivateFieldSet$1(this, _YargsInstance_parserConfig, config4, "f");
        return this;
      }
      pkgConf(key, rootPath) {
        argsert("<string> [string]", [key, rootPath], arguments.length);
        let conf = null;
        const obj = this[kPkgUp](rootPath || __classPrivateFieldGet$1(this, _YargsInstance_cwd, "f"));
        if (obj[key] && typeof obj[key] === "object") {
          conf = applyExtends(obj[key], rootPath || __classPrivateFieldGet$1(this, _YargsInstance_cwd, "f"), this[kGetParserConfiguration]()["deep-merge-config"] || false, __classPrivateFieldGet$1(this, _YargsInstance_shim, "f"));
          __classPrivateFieldGet$1(this, _YargsInstance_options, "f").configObjects = (__classPrivateFieldGet$1(this, _YargsInstance_options, "f").configObjects || []).concat(conf);
        }
        return this;
      }
      positional(key, opts) {
        argsert("<string> <object>", [key, opts], arguments.length);
        const supportedOpts = [
          "default",
          "defaultDescription",
          "implies",
          "normalize",
          "choices",
          "conflicts",
          "coerce",
          "type",
          "describe",
          "desc",
          "description",
          "alias"
        ];
        opts = objFilter(opts, (k, v) => {
          if (k === "type" && !["string", "number", "boolean"].includes(v))
            return false;
          return supportedOpts.includes(k);
        });
        const fullCommand = __classPrivateFieldGet$1(this, _YargsInstance_context, "f").fullCommands[__classPrivateFieldGet$1(this, _YargsInstance_context, "f").fullCommands.length - 1];
        const parseOptions = fullCommand ? __classPrivateFieldGet$1(this, _YargsInstance_command, "f").cmdToParseOptions(fullCommand) : {
          array: [],
          alias: {},
          default: {},
          demand: {}
        };
        objectKeys(parseOptions).forEach((pk) => {
          const parseOption = parseOptions[pk];
          if (Array.isArray(parseOption)) {
            if (parseOption.indexOf(key) !== -1)
              opts[pk] = true;
          } else {
            if (parseOption[key] && !(pk in opts))
              opts[pk] = parseOption[key];
          }
        });
        this.group(key, __classPrivateFieldGet$1(this, _YargsInstance_usage, "f").getPositionalGroupName());
        return this.option(key, opts);
      }
      recommendCommands(recommend = true) {
        argsert("[boolean]", [recommend], arguments.length);
        __classPrivateFieldSet$1(this, _YargsInstance_recommendCommands, recommend, "f");
        return this;
      }
      required(keys2, max, msg) {
        return this.demand(keys2, max, msg);
      }
      require(keys2, max, msg) {
        return this.demand(keys2, max, msg);
      }
      requiresArg(keys2) {
        argsert("<array|string|object> [number]", [keys2], arguments.length);
        if (typeof keys2 === "string" && __classPrivateFieldGet$1(this, _YargsInstance_options, "f").narg[keys2]) {
          return this;
        } else {
          this[kPopulateParserHintSingleValueDictionary](this.requiresArg.bind(this), "narg", keys2, NaN);
        }
        return this;
      }
      showCompletionScript($0, cmd) {
        argsert("[string] [string]", [$0, cmd], arguments.length);
        $0 = $0 || this.$0;
        __classPrivateFieldGet$1(this, _YargsInstance_logger, "f").log(__classPrivateFieldGet$1(this, _YargsInstance_completion, "f").generateCompletionScript($0, cmd || __classPrivateFieldGet$1(this, _YargsInstance_completionCommand, "f") || "completion"));
        return this;
      }
      showHelp(level) {
        argsert("[string|function]", [level], arguments.length);
        __classPrivateFieldSet$1(this, _YargsInstance_hasOutput, true, "f");
        if (!__classPrivateFieldGet$1(this, _YargsInstance_usage, "f").hasCachedHelpMessage()) {
          if (!this.parsed) {
            const parse2 = this[kRunYargsParserAndExecuteCommands](__classPrivateFieldGet$1(this, _YargsInstance_processArgs, "f"), void 0, void 0, 0, true);
            if (isPromise$1(parse2)) {
              parse2.then(() => {
                __classPrivateFieldGet$1(this, _YargsInstance_usage, "f").showHelp(level);
              });
              return this;
            }
          }
          const builderResponse = __classPrivateFieldGet$1(this, _YargsInstance_command, "f").runDefaultBuilderOn(this);
          if (isPromise$1(builderResponse)) {
            builderResponse.then(() => {
              __classPrivateFieldGet$1(this, _YargsInstance_usage, "f").showHelp(level);
            });
            return this;
          }
        }
        __classPrivateFieldGet$1(this, _YargsInstance_usage, "f").showHelp(level);
        return this;
      }
      scriptName(scriptName) {
        this.customScriptName = true;
        this.$0 = scriptName;
        return this;
      }
      showHelpOnFail(enabled, message) {
        argsert("[boolean|string] [string]", [enabled, message], arguments.length);
        __classPrivateFieldGet$1(this, _YargsInstance_usage, "f").showHelpOnFail(enabled, message);
        return this;
      }
      showVersion(level) {
        argsert("[string|function]", [level], arguments.length);
        __classPrivateFieldGet$1(this, _YargsInstance_usage, "f").showVersion(level);
        return this;
      }
      skipValidation(keys2) {
        argsert("<array|string>", [keys2], arguments.length);
        this[kPopulateParserHintArray]("skipValidation", keys2);
        return this;
      }
      strict(enabled) {
        argsert("[boolean]", [enabled], arguments.length);
        __classPrivateFieldSet$1(this, _YargsInstance_strict, enabled !== false, "f");
        return this;
      }
      strictCommands(enabled) {
        argsert("[boolean]", [enabled], arguments.length);
        __classPrivateFieldSet$1(this, _YargsInstance_strictCommands, enabled !== false, "f");
        return this;
      }
      strictOptions(enabled) {
        argsert("[boolean]", [enabled], arguments.length);
        __classPrivateFieldSet$1(this, _YargsInstance_strictOptions, enabled !== false, "f");
        return this;
      }
      string(keys2) {
        argsert("<array|string>", [keys2], arguments.length);
        this[kPopulateParserHintArray]("string", keys2);
        this[kTrackManuallySetKeys](keys2);
        return this;
      }
      terminalWidth() {
        argsert([], 0);
        return __classPrivateFieldGet$1(this, _YargsInstance_shim, "f").process.stdColumns;
      }
      updateLocale(obj) {
        return this.updateStrings(obj);
      }
      updateStrings(obj) {
        argsert("<object>", [obj], arguments.length);
        __classPrivateFieldSet$1(this, _YargsInstance_detectLocale, false, "f");
        __classPrivateFieldGet$1(this, _YargsInstance_shim, "f").y18n.updateLocale(obj);
        return this;
      }
      usage(msg, description2, builder, handler) {
        argsert("<string|null|undefined> [string|boolean] [function|object] [function]", [msg, description2, builder, handler], arguments.length);
        if (description2 !== void 0) {
          assertNotStrictEqual(msg, null, __classPrivateFieldGet$1(this, _YargsInstance_shim, "f"));
          if ((msg || "").match(/^\$0( |$)/)) {
            return this.command(msg, description2, builder, handler);
          } else {
            throw new YError(".usage() description must start with $0 if being used as alias for .command()");
          }
        } else {
          __classPrivateFieldGet$1(this, _YargsInstance_usage, "f").usage(msg);
          return this;
        }
      }
      usageConfiguration(config4) {
        argsert("<object>", [config4], arguments.length);
        __classPrivateFieldSet$1(this, _YargsInstance_usageConfig, config4, "f");
        return this;
      }
      version(opt, msg, ver) {
        const defaultVersionOpt = "version";
        argsert("[boolean|string] [string] [string]", [opt, msg, ver], arguments.length);
        if (__classPrivateFieldGet$1(this, _YargsInstance_versionOpt, "f")) {
          this[kDeleteFromParserHintObject](__classPrivateFieldGet$1(this, _YargsInstance_versionOpt, "f"));
          __classPrivateFieldGet$1(this, _YargsInstance_usage, "f").version(void 0);
          __classPrivateFieldSet$1(this, _YargsInstance_versionOpt, null, "f");
        }
        if (arguments.length === 0) {
          ver = this[kGuessVersion]();
          opt = defaultVersionOpt;
        } else if (arguments.length === 1) {
          if (opt === false) {
            return this;
          }
          ver = opt;
          opt = defaultVersionOpt;
        } else if (arguments.length === 2) {
          ver = msg;
          msg = void 0;
        }
        __classPrivateFieldSet$1(this, _YargsInstance_versionOpt, typeof opt === "string" ? opt : defaultVersionOpt, "f");
        msg = msg || __classPrivateFieldGet$1(this, _YargsInstance_usage, "f").deferY18nLookup("Show version number");
        __classPrivateFieldGet$1(this, _YargsInstance_usage, "f").version(ver || void 0);
        this.boolean(__classPrivateFieldGet$1(this, _YargsInstance_versionOpt, "f"));
        this.describe(__classPrivateFieldGet$1(this, _YargsInstance_versionOpt, "f"), msg);
        return this;
      }
      wrap(cols) {
        argsert("<number|null|undefined>", [cols], arguments.length);
        __classPrivateFieldGet$1(this, _YargsInstance_usage, "f").wrap(cols);
        return this;
      }
      [(_YargsInstance_command = /* @__PURE__ */ new WeakMap(), _YargsInstance_cwd = /* @__PURE__ */ new WeakMap(), _YargsInstance_context = /* @__PURE__ */ new WeakMap(), _YargsInstance_completion = /* @__PURE__ */ new WeakMap(), _YargsInstance_completionCommand = /* @__PURE__ */ new WeakMap(), _YargsInstance_defaultShowHiddenOpt = /* @__PURE__ */ new WeakMap(), _YargsInstance_exitError = /* @__PURE__ */ new WeakMap(), _YargsInstance_detectLocale = /* @__PURE__ */ new WeakMap(), _YargsInstance_emittedWarnings = /* @__PURE__ */ new WeakMap(), _YargsInstance_exitProcess = /* @__PURE__ */ new WeakMap(), _YargsInstance_frozens = /* @__PURE__ */ new WeakMap(), _YargsInstance_globalMiddleware = /* @__PURE__ */ new WeakMap(), _YargsInstance_groups = /* @__PURE__ */ new WeakMap(), _YargsInstance_hasOutput = /* @__PURE__ */ new WeakMap(), _YargsInstance_helpOpt = /* @__PURE__ */ new WeakMap(), _YargsInstance_isGlobalContext = /* @__PURE__ */ new WeakMap(), _YargsInstance_logger = /* @__PURE__ */ new WeakMap(), _YargsInstance_output = /* @__PURE__ */ new WeakMap(), _YargsInstance_options = /* @__PURE__ */ new WeakMap(), _YargsInstance_parentRequire = /* @__PURE__ */ new WeakMap(), _YargsInstance_parserConfig = /* @__PURE__ */ new WeakMap(), _YargsInstance_parseFn = /* @__PURE__ */ new WeakMap(), _YargsInstance_parseContext = /* @__PURE__ */ new WeakMap(), _YargsInstance_pkgs = /* @__PURE__ */ new WeakMap(), _YargsInstance_preservedGroups = /* @__PURE__ */ new WeakMap(), _YargsInstance_processArgs = /* @__PURE__ */ new WeakMap(), _YargsInstance_recommendCommands = /* @__PURE__ */ new WeakMap(), _YargsInstance_shim = /* @__PURE__ */ new WeakMap(), _YargsInstance_strict = /* @__PURE__ */ new WeakMap(), _YargsInstance_strictCommands = /* @__PURE__ */ new WeakMap(), _YargsInstance_strictOptions = /* @__PURE__ */ new WeakMap(), _YargsInstance_usage = /* @__PURE__ */ new WeakMap(), _YargsInstance_usageConfig = /* @__PURE__ */ new WeakMap(), _YargsInstance_versionOpt = /* @__PURE__ */ new WeakMap(), _YargsInstance_validation = /* @__PURE__ */ new WeakMap(), kCopyDoubleDash)](argv) {
        if (!argv._ || !argv["--"])
          return argv;
        argv._.push.apply(argv._, argv["--"]);
        try {
          delete argv["--"];
        } catch (_err) {
        }
        return argv;
      }
      [kCreateLogger]() {
        return {
          log: (...args2) => {
            if (!this[kHasParseCallback]())
              console.log(...args2);
            __classPrivateFieldSet$1(this, _YargsInstance_hasOutput, true, "f");
            if (__classPrivateFieldGet$1(this, _YargsInstance_output, "f").length)
              __classPrivateFieldSet$1(this, _YargsInstance_output, __classPrivateFieldGet$1(this, _YargsInstance_output, "f") + "\n", "f");
            __classPrivateFieldSet$1(this, _YargsInstance_output, __classPrivateFieldGet$1(this, _YargsInstance_output, "f") + args2.join(" "), "f");
          },
          error: (...args2) => {
            if (!this[kHasParseCallback]())
              console.error(...args2);
            __classPrivateFieldSet$1(this, _YargsInstance_hasOutput, true, "f");
            if (__classPrivateFieldGet$1(this, _YargsInstance_output, "f").length)
              __classPrivateFieldSet$1(this, _YargsInstance_output, __classPrivateFieldGet$1(this, _YargsInstance_output, "f") + "\n", "f");
            __classPrivateFieldSet$1(this, _YargsInstance_output, __classPrivateFieldGet$1(this, _YargsInstance_output, "f") + args2.join(" "), "f");
          }
        };
      }
      [kDeleteFromParserHintObject](optionKey) {
        objectKeys(__classPrivateFieldGet$1(this, _YargsInstance_options, "f")).forEach((hintKey) => {
          if (/* @__PURE__ */ ((key) => key === "configObjects")(hintKey))
            return;
          const hint = __classPrivateFieldGet$1(this, _YargsInstance_options, "f")[hintKey];
          if (Array.isArray(hint)) {
            if (hint.includes(optionKey))
              hint.splice(hint.indexOf(optionKey), 1);
          } else if (typeof hint === "object") {
            delete hint[optionKey];
          }
        });
        delete __classPrivateFieldGet$1(this, _YargsInstance_usage, "f").getDescriptions()[optionKey];
      }
      [kEmitWarning](warning, type2, deduplicationId) {
        if (!__classPrivateFieldGet$1(this, _YargsInstance_emittedWarnings, "f")[deduplicationId]) {
          __classPrivateFieldGet$1(this, _YargsInstance_shim, "f").process.emitWarning(warning, type2);
          __classPrivateFieldGet$1(this, _YargsInstance_emittedWarnings, "f")[deduplicationId] = true;
        }
      }
      [kFreeze]() {
        __classPrivateFieldGet$1(this, _YargsInstance_frozens, "f").push({
          options: __classPrivateFieldGet$1(this, _YargsInstance_options, "f"),
          configObjects: __classPrivateFieldGet$1(this, _YargsInstance_options, "f").configObjects.slice(0),
          exitProcess: __classPrivateFieldGet$1(this, _YargsInstance_exitProcess, "f"),
          groups: __classPrivateFieldGet$1(this, _YargsInstance_groups, "f"),
          strict: __classPrivateFieldGet$1(this, _YargsInstance_strict, "f"),
          strictCommands: __classPrivateFieldGet$1(this, _YargsInstance_strictCommands, "f"),
          strictOptions: __classPrivateFieldGet$1(this, _YargsInstance_strictOptions, "f"),
          completionCommand: __classPrivateFieldGet$1(this, _YargsInstance_completionCommand, "f"),
          output: __classPrivateFieldGet$1(this, _YargsInstance_output, "f"),
          exitError: __classPrivateFieldGet$1(this, _YargsInstance_exitError, "f"),
          hasOutput: __classPrivateFieldGet$1(this, _YargsInstance_hasOutput, "f"),
          parsed: this.parsed,
          parseFn: __classPrivateFieldGet$1(this, _YargsInstance_parseFn, "f"),
          parseContext: __classPrivateFieldGet$1(this, _YargsInstance_parseContext, "f")
        });
        __classPrivateFieldGet$1(this, _YargsInstance_usage, "f").freeze();
        __classPrivateFieldGet$1(this, _YargsInstance_validation, "f").freeze();
        __classPrivateFieldGet$1(this, _YargsInstance_command, "f").freeze();
        __classPrivateFieldGet$1(this, _YargsInstance_globalMiddleware, "f").freeze();
      }
      [kGetDollarZero]() {
        let $0 = "";
        let default$0;
        if (/\b(node|iojs|electron)(\.exe)?$/.test(__classPrivateFieldGet$1(this, _YargsInstance_shim, "f").process.argv()[0])) {
          default$0 = __classPrivateFieldGet$1(this, _YargsInstance_shim, "f").process.argv().slice(1, 2);
        } else {
          default$0 = __classPrivateFieldGet$1(this, _YargsInstance_shim, "f").process.argv().slice(0, 1);
        }
        $0 = default$0.map((x) => {
          const b = this[kRebase](__classPrivateFieldGet$1(this, _YargsInstance_cwd, "f"), x);
          return x.match(/^(\/|([a-zA-Z]:)?\\)/) && b.length < x.length ? b : x;
        }).join(" ").trim();
        if (__classPrivateFieldGet$1(this, _YargsInstance_shim, "f").getEnv("_") && __classPrivateFieldGet$1(this, _YargsInstance_shim, "f").getProcessArgvBin() === __classPrivateFieldGet$1(this, _YargsInstance_shim, "f").getEnv("_")) {
          $0 = __classPrivateFieldGet$1(this, _YargsInstance_shim, "f").getEnv("_").replace(`${__classPrivateFieldGet$1(this, _YargsInstance_shim, "f").path.dirname(__classPrivateFieldGet$1(this, _YargsInstance_shim, "f").process.execPath())}/`, "");
        }
        return $0;
      }
      [kGetParserConfiguration]() {
        return __classPrivateFieldGet$1(this, _YargsInstance_parserConfig, "f");
      }
      [kGetUsageConfiguration]() {
        return __classPrivateFieldGet$1(this, _YargsInstance_usageConfig, "f");
      }
      [kGuessLocale]() {
        if (!__classPrivateFieldGet$1(this, _YargsInstance_detectLocale, "f"))
          return;
        const locale = __classPrivateFieldGet$1(this, _YargsInstance_shim, "f").getEnv("LC_ALL") || __classPrivateFieldGet$1(this, _YargsInstance_shim, "f").getEnv("LC_MESSAGES") || __classPrivateFieldGet$1(this, _YargsInstance_shim, "f").getEnv("LANG") || __classPrivateFieldGet$1(this, _YargsInstance_shim, "f").getEnv("LANGUAGE") || "en_US";
        this.locale(locale.replace(/[.:].*/, ""));
      }
      [kGuessVersion]() {
        const obj = this[kPkgUp]();
        return obj.version || "unknown";
      }
      [kParsePositionalNumbers](argv) {
        const args2 = argv["--"] ? argv["--"] : argv._;
        for (let i = 0, arg; (arg = args2[i]) !== void 0; i++) {
          if (__classPrivateFieldGet$1(this, _YargsInstance_shim, "f").Parser.looksLikeNumber(arg) && Number.isSafeInteger(Math.floor(parseFloat(`${arg}`)))) {
            args2[i] = Number(arg);
          }
        }
        return argv;
      }
      [kPkgUp](rootPath) {
        const npath = rootPath || "*";
        if (__classPrivateFieldGet$1(this, _YargsInstance_pkgs, "f")[npath])
          return __classPrivateFieldGet$1(this, _YargsInstance_pkgs, "f")[npath];
        let obj = {};
        try {
          let startDir = rootPath || __classPrivateFieldGet$1(this, _YargsInstance_shim, "f").mainFilename;
          if (__classPrivateFieldGet$1(this, _YargsInstance_shim, "f").path.extname(startDir)) {
            startDir = __classPrivateFieldGet$1(this, _YargsInstance_shim, "f").path.dirname(startDir);
          }
          const pkgJsonPath = __classPrivateFieldGet$1(this, _YargsInstance_shim, "f").findUp(startDir, (dir, names3) => {
            if (names3.includes("package.json")) {
              return "package.json";
            } else {
              return void 0;
            }
          });
          assertNotStrictEqual(pkgJsonPath, void 0, __classPrivateFieldGet$1(this, _YargsInstance_shim, "f"));
          obj = JSON.parse(__classPrivateFieldGet$1(this, _YargsInstance_shim, "f").readFileSync(pkgJsonPath, "utf8"));
        } catch (_noop) {
        }
        __classPrivateFieldGet$1(this, _YargsInstance_pkgs, "f")[npath] = obj || {};
        return __classPrivateFieldGet$1(this, _YargsInstance_pkgs, "f")[npath];
      }
      [kPopulateParserHintArray](type2, keys2) {
        keys2 = [].concat(keys2);
        keys2.forEach((key) => {
          key = this[kSanitizeKey](key);
          __classPrivateFieldGet$1(this, _YargsInstance_options, "f")[type2].push(key);
        });
      }
      [kPopulateParserHintSingleValueDictionary](builder, type2, key, value) {
        this[kPopulateParserHintDictionary](builder, type2, key, value, (type3, key2, value2) => {
          __classPrivateFieldGet$1(this, _YargsInstance_options, "f")[type3][key2] = value2;
        });
      }
      [kPopulateParserHintArrayDictionary](builder, type2, key, value) {
        this[kPopulateParserHintDictionary](builder, type2, key, value, (type3, key2, value2) => {
          __classPrivateFieldGet$1(this, _YargsInstance_options, "f")[type3][key2] = (__classPrivateFieldGet$1(this, _YargsInstance_options, "f")[type3][key2] || []).concat(value2);
        });
      }
      [kPopulateParserHintDictionary](builder, type2, key, value, singleKeyHandler) {
        if (Array.isArray(key)) {
          key.forEach((k) => {
            builder(k, value);
          });
        } else if (/* @__PURE__ */ ((key2) => typeof key2 === "object")(key)) {
          for (const k of objectKeys(key)) {
            builder(k, key[k]);
          }
        } else {
          singleKeyHandler(type2, this[kSanitizeKey](key), value);
        }
      }
      [kSanitizeKey](key) {
        if (key === "__proto__")
          return "___proto___";
        return key;
      }
      [kSetKey](key, set) {
        this[kPopulateParserHintSingleValueDictionary](this[kSetKey].bind(this), "key", key, set);
        return this;
      }
      [kUnfreeze]() {
        var _a4, _b2, _c2, _d, _e, _f, _g, _h, _j, _k, _l, _m;
        const frozen = __classPrivateFieldGet$1(this, _YargsInstance_frozens, "f").pop();
        assertNotStrictEqual(frozen, void 0, __classPrivateFieldGet$1(this, _YargsInstance_shim, "f"));
        let configObjects;
        _a4 = this, _b2 = this, _c2 = this, _d = this, _e = this, _f = this, _g = this, _h = this, _j = this, _k = this, _l = this, _m = this, {
          options: { set value(_o) {
            __classPrivateFieldSet$1(_a4, _YargsInstance_options, _o, "f");
          } }.value,
          configObjects,
          exitProcess: { set value(_o) {
            __classPrivateFieldSet$1(_b2, _YargsInstance_exitProcess, _o, "f");
          } }.value,
          groups: { set value(_o) {
            __classPrivateFieldSet$1(_c2, _YargsInstance_groups, _o, "f");
          } }.value,
          output: { set value(_o) {
            __classPrivateFieldSet$1(_d, _YargsInstance_output, _o, "f");
          } }.value,
          exitError: { set value(_o) {
            __classPrivateFieldSet$1(_e, _YargsInstance_exitError, _o, "f");
          } }.value,
          hasOutput: { set value(_o) {
            __classPrivateFieldSet$1(_f, _YargsInstance_hasOutput, _o, "f");
          } }.value,
          parsed: this.parsed,
          strict: { set value(_o) {
            __classPrivateFieldSet$1(_g, _YargsInstance_strict, _o, "f");
          } }.value,
          strictCommands: { set value(_o) {
            __classPrivateFieldSet$1(_h, _YargsInstance_strictCommands, _o, "f");
          } }.value,
          strictOptions: { set value(_o) {
            __classPrivateFieldSet$1(_j, _YargsInstance_strictOptions, _o, "f");
          } }.value,
          completionCommand: { set value(_o) {
            __classPrivateFieldSet$1(_k, _YargsInstance_completionCommand, _o, "f");
          } }.value,
          parseFn: { set value(_o) {
            __classPrivateFieldSet$1(_l, _YargsInstance_parseFn, _o, "f");
          } }.value,
          parseContext: { set value(_o) {
            __classPrivateFieldSet$1(_m, _YargsInstance_parseContext, _o, "f");
          } }.value
        } = frozen;
        __classPrivateFieldGet$1(this, _YargsInstance_options, "f").configObjects = configObjects;
        __classPrivateFieldGet$1(this, _YargsInstance_usage, "f").unfreeze();
        __classPrivateFieldGet$1(this, _YargsInstance_validation, "f").unfreeze();
        __classPrivateFieldGet$1(this, _YargsInstance_command, "f").unfreeze();
        __classPrivateFieldGet$1(this, _YargsInstance_globalMiddleware, "f").unfreeze();
      }
      [kValidateAsync](validation2, argv) {
        return maybeAsyncResult(argv, (result) => {
          validation2(result);
          return result;
        });
      }
      getInternalMethods() {
        return {
          getCommandInstance: this[kGetCommandInstance].bind(this),
          getContext: this[kGetContext].bind(this),
          getHasOutput: this[kGetHasOutput].bind(this),
          getLoggerInstance: this[kGetLoggerInstance].bind(this),
          getParseContext: this[kGetParseContext].bind(this),
          getParserConfiguration: this[kGetParserConfiguration].bind(this),
          getUsageConfiguration: this[kGetUsageConfiguration].bind(this),
          getUsageInstance: this[kGetUsageInstance].bind(this),
          getValidationInstance: this[kGetValidationInstance].bind(this),
          hasParseCallback: this[kHasParseCallback].bind(this),
          isGlobalContext: this[kIsGlobalContext].bind(this),
          postProcess: this[kPostProcess].bind(this),
          reset: this[kReset].bind(this),
          runValidation: this[kRunValidation].bind(this),
          runYargsParserAndExecuteCommands: this[kRunYargsParserAndExecuteCommands].bind(this),
          setHasOutput: this[kSetHasOutput].bind(this)
        };
      }
      [kGetCommandInstance]() {
        return __classPrivateFieldGet$1(this, _YargsInstance_command, "f");
      }
      [kGetContext]() {
        return __classPrivateFieldGet$1(this, _YargsInstance_context, "f");
      }
      [kGetHasOutput]() {
        return __classPrivateFieldGet$1(this, _YargsInstance_hasOutput, "f");
      }
      [kGetLoggerInstance]() {
        return __classPrivateFieldGet$1(this, _YargsInstance_logger, "f");
      }
      [kGetParseContext]() {
        return __classPrivateFieldGet$1(this, _YargsInstance_parseContext, "f") || {};
      }
      [kGetUsageInstance]() {
        return __classPrivateFieldGet$1(this, _YargsInstance_usage, "f");
      }
      [kGetValidationInstance]() {
        return __classPrivateFieldGet$1(this, _YargsInstance_validation, "f");
      }
      [kHasParseCallback]() {
        return !!__classPrivateFieldGet$1(this, _YargsInstance_parseFn, "f");
      }
      [kIsGlobalContext]() {
        return __classPrivateFieldGet$1(this, _YargsInstance_isGlobalContext, "f");
      }
      [kPostProcess](argv, populateDoubleDash, calledFromCommand, runGlobalMiddleware) {
        if (calledFromCommand)
          return argv;
        if (isPromise$1(argv))
          return argv;
        if (!populateDoubleDash) {
          argv = this[kCopyDoubleDash](argv);
        }
        const parsePositionalNumbers = this[kGetParserConfiguration]()["parse-positional-numbers"] || this[kGetParserConfiguration]()["parse-positional-numbers"] === void 0;
        if (parsePositionalNumbers) {
          argv = this[kParsePositionalNumbers](argv);
        }
        if (runGlobalMiddleware) {
          argv = applyMiddleware(argv, this, __classPrivateFieldGet$1(this, _YargsInstance_globalMiddleware, "f").getMiddleware(), false);
        }
        return argv;
      }
      [kReset](aliases = {}) {
        __classPrivateFieldSet$1(this, _YargsInstance_options, __classPrivateFieldGet$1(this, _YargsInstance_options, "f") || {}, "f");
        const tmpOptions = {};
        tmpOptions.local = __classPrivateFieldGet$1(this, _YargsInstance_options, "f").local || [];
        tmpOptions.configObjects = __classPrivateFieldGet$1(this, _YargsInstance_options, "f").configObjects || [];
        const localLookup = {};
        tmpOptions.local.forEach((l) => {
          localLookup[l] = true;
          (aliases[l] || []).forEach((a) => {
            localLookup[a] = true;
          });
        });
        Object.assign(__classPrivateFieldGet$1(this, _YargsInstance_preservedGroups, "f"), Object.keys(__classPrivateFieldGet$1(this, _YargsInstance_groups, "f")).reduce((acc, groupName) => {
          const keys2 = __classPrivateFieldGet$1(this, _YargsInstance_groups, "f")[groupName].filter((key) => !(key in localLookup));
          if (keys2.length > 0) {
            acc[groupName] = keys2;
          }
          return acc;
        }, {}));
        __classPrivateFieldSet$1(this, _YargsInstance_groups, {}, "f");
        const arrayOptions = [
          "array",
          "boolean",
          "string",
          "skipValidation",
          "count",
          "normalize",
          "number",
          "hiddenOptions"
        ];
        const objectOptions = [
          "narg",
          "key",
          "alias",
          "default",
          "defaultDescription",
          "config",
          "choices",
          "demandedOptions",
          "demandedCommands",
          "deprecatedOptions"
        ];
        arrayOptions.forEach((k) => {
          tmpOptions[k] = (__classPrivateFieldGet$1(this, _YargsInstance_options, "f")[k] || []).filter((k2) => !localLookup[k2]);
        });
        objectOptions.forEach((k) => {
          tmpOptions[k] = objFilter(__classPrivateFieldGet$1(this, _YargsInstance_options, "f")[k], (k2) => !localLookup[k2]);
        });
        tmpOptions.envPrefix = __classPrivateFieldGet$1(this, _YargsInstance_options, "f").envPrefix;
        __classPrivateFieldSet$1(this, _YargsInstance_options, tmpOptions, "f");
        __classPrivateFieldSet$1(this, _YargsInstance_usage, __classPrivateFieldGet$1(this, _YargsInstance_usage, "f") ? __classPrivateFieldGet$1(this, _YargsInstance_usage, "f").reset(localLookup) : usage(this, __classPrivateFieldGet$1(this, _YargsInstance_shim, "f")), "f");
        __classPrivateFieldSet$1(this, _YargsInstance_validation, __classPrivateFieldGet$1(this, _YargsInstance_validation, "f") ? __classPrivateFieldGet$1(this, _YargsInstance_validation, "f").reset(localLookup) : validation$3(this, __classPrivateFieldGet$1(this, _YargsInstance_usage, "f"), __classPrivateFieldGet$1(this, _YargsInstance_shim, "f")), "f");
        __classPrivateFieldSet$1(this, _YargsInstance_command, __classPrivateFieldGet$1(this, _YargsInstance_command, "f") ? __classPrivateFieldGet$1(this, _YargsInstance_command, "f").reset() : command(__classPrivateFieldGet$1(this, _YargsInstance_usage, "f"), __classPrivateFieldGet$1(this, _YargsInstance_validation, "f"), __classPrivateFieldGet$1(this, _YargsInstance_globalMiddleware, "f"), __classPrivateFieldGet$1(this, _YargsInstance_shim, "f")), "f");
        if (!__classPrivateFieldGet$1(this, _YargsInstance_completion, "f"))
          __classPrivateFieldSet$1(this, _YargsInstance_completion, completion(this, __classPrivateFieldGet$1(this, _YargsInstance_usage, "f"), __classPrivateFieldGet$1(this, _YargsInstance_command, "f"), __classPrivateFieldGet$1(this, _YargsInstance_shim, "f")), "f");
        __classPrivateFieldGet$1(this, _YargsInstance_globalMiddleware, "f").reset();
        __classPrivateFieldSet$1(this, _YargsInstance_completionCommand, null, "f");
        __classPrivateFieldSet$1(this, _YargsInstance_output, "", "f");
        __classPrivateFieldSet$1(this, _YargsInstance_exitError, null, "f");
        __classPrivateFieldSet$1(this, _YargsInstance_hasOutput, false, "f");
        this.parsed = false;
        return this;
      }
      [kRebase](base, dir) {
        return __classPrivateFieldGet$1(this, _YargsInstance_shim, "f").path.relative(base, dir);
      }
      [kRunYargsParserAndExecuteCommands](args2, shortCircuit, calledFromCommand, commandIndex = 0, helpOnly = false) {
        var _a4, _b2, _c2, _d;
        let skipValidation = !!calledFromCommand || helpOnly;
        args2 = args2 || __classPrivateFieldGet$1(this, _YargsInstance_processArgs, "f");
        __classPrivateFieldGet$1(this, _YargsInstance_options, "f").__ = __classPrivateFieldGet$1(this, _YargsInstance_shim, "f").y18n.__;
        __classPrivateFieldGet$1(this, _YargsInstance_options, "f").configuration = this[kGetParserConfiguration]();
        const populateDoubleDash = !!__classPrivateFieldGet$1(this, _YargsInstance_options, "f").configuration["populate--"];
        const config4 = Object.assign({}, __classPrivateFieldGet$1(this, _YargsInstance_options, "f").configuration, {
          "populate--": true
        });
        const parsed = __classPrivateFieldGet$1(this, _YargsInstance_shim, "f").Parser.detailed(args2, Object.assign({}, __classPrivateFieldGet$1(this, _YargsInstance_options, "f"), {
          configuration: { "parse-positional-numbers": false, ...config4 }
        }));
        const argv = Object.assign(parsed.argv, __classPrivateFieldGet$1(this, _YargsInstance_parseContext, "f"));
        let argvPromise = void 0;
        const aliases = parsed.aliases;
        let helpOptSet = false;
        let versionOptSet = false;
        Object.keys(argv).forEach((key) => {
          if (key === __classPrivateFieldGet$1(this, _YargsInstance_helpOpt, "f") && argv[key]) {
            helpOptSet = true;
          } else if (key === __classPrivateFieldGet$1(this, _YargsInstance_versionOpt, "f") && argv[key]) {
            versionOptSet = true;
          }
        });
        argv.$0 = this.$0;
        this.parsed = parsed;
        if (commandIndex === 0) {
          __classPrivateFieldGet$1(this, _YargsInstance_usage, "f").clearCachedHelpMessage();
        }
        try {
          this[kGuessLocale]();
          if (shortCircuit) {
            return this[kPostProcess](argv, populateDoubleDash, !!calledFromCommand, false);
          }
          if (__classPrivateFieldGet$1(this, _YargsInstance_helpOpt, "f")) {
            const helpCmds = [__classPrivateFieldGet$1(this, _YargsInstance_helpOpt, "f")].concat(aliases[__classPrivateFieldGet$1(this, _YargsInstance_helpOpt, "f")] || []).filter((k) => k.length > 1);
            if (helpCmds.includes("" + argv._[argv._.length - 1])) {
              argv._.pop();
              helpOptSet = true;
            }
          }
          __classPrivateFieldSet$1(this, _YargsInstance_isGlobalContext, false, "f");
          const handlerKeys = __classPrivateFieldGet$1(this, _YargsInstance_command, "f").getCommands();
          const requestCompletions = ((_a4 = __classPrivateFieldGet$1(this, _YargsInstance_completion, "f")) === null || _a4 === void 0 ? void 0 : _a4.completionKey) ? [
            (_b2 = __classPrivateFieldGet$1(this, _YargsInstance_completion, "f")) === null || _b2 === void 0 ? void 0 : _b2.completionKey,
            ...(_d = this.getAliases()[(_c2 = __classPrivateFieldGet$1(this, _YargsInstance_completion, "f")) === null || _c2 === void 0 ? void 0 : _c2.completionKey]) !== null && _d !== void 0 ? _d : []
          ].some((key) => Object.prototype.hasOwnProperty.call(argv, key)) : false;
          const skipRecommendation = helpOptSet || requestCompletions || helpOnly;
          if (argv._.length) {
            if (handlerKeys.length) {
              let firstUnknownCommand;
              for (let i = commandIndex || 0, cmd; argv._[i] !== void 0; i++) {
                cmd = String(argv._[i]);
                if (handlerKeys.includes(cmd) && cmd !== __classPrivateFieldGet$1(this, _YargsInstance_completionCommand, "f")) {
                  const innerArgv = __classPrivateFieldGet$1(this, _YargsInstance_command, "f").runCommand(cmd, this, parsed, i + 1, helpOnly, helpOptSet || versionOptSet || helpOnly);
                  return this[kPostProcess](innerArgv, populateDoubleDash, !!calledFromCommand, false);
                } else if (!firstUnknownCommand && cmd !== __classPrivateFieldGet$1(this, _YargsInstance_completionCommand, "f")) {
                  firstUnknownCommand = cmd;
                  break;
                }
              }
              if (!__classPrivateFieldGet$1(this, _YargsInstance_command, "f").hasDefaultCommand() && __classPrivateFieldGet$1(this, _YargsInstance_recommendCommands, "f") && firstUnknownCommand && !skipRecommendation) {
                __classPrivateFieldGet$1(this, _YargsInstance_validation, "f").recommendCommands(firstUnknownCommand, handlerKeys);
              }
            }
            if (__classPrivateFieldGet$1(this, _YargsInstance_completionCommand, "f") && argv._.includes(__classPrivateFieldGet$1(this, _YargsInstance_completionCommand, "f")) && !requestCompletions) {
              if (__classPrivateFieldGet$1(this, _YargsInstance_exitProcess, "f"))
                setBlocking(true);
              this.showCompletionScript();
              this.exit(0);
            }
          }
          if (__classPrivateFieldGet$1(this, _YargsInstance_command, "f").hasDefaultCommand() && !skipRecommendation) {
            const innerArgv = __classPrivateFieldGet$1(this, _YargsInstance_command, "f").runCommand(null, this, parsed, 0, helpOnly, helpOptSet || versionOptSet || helpOnly);
            return this[kPostProcess](innerArgv, populateDoubleDash, !!calledFromCommand, false);
          }
          if (requestCompletions) {
            if (__classPrivateFieldGet$1(this, _YargsInstance_exitProcess, "f"))
              setBlocking(true);
            args2 = [].concat(args2);
            const completionArgs = args2.slice(args2.indexOf(`--${__classPrivateFieldGet$1(this, _YargsInstance_completion, "f").completionKey}`) + 1);
            __classPrivateFieldGet$1(this, _YargsInstance_completion, "f").getCompletion(completionArgs, (err, completions) => {
              if (err)
                throw new YError(err.message);
              (completions || []).forEach((completion2) => {
                __classPrivateFieldGet$1(this, _YargsInstance_logger, "f").log(completion2);
              });
              this.exit(0);
            });
            return this[kPostProcess](argv, !populateDoubleDash, !!calledFromCommand, false);
          }
          if (!__classPrivateFieldGet$1(this, _YargsInstance_hasOutput, "f")) {
            if (helpOptSet) {
              if (__classPrivateFieldGet$1(this, _YargsInstance_exitProcess, "f"))
                setBlocking(true);
              skipValidation = true;
              this.showHelp((message) => {
                __classPrivateFieldGet$1(this, _YargsInstance_logger, "f").log(message);
                this.exit(0);
              });
            } else if (versionOptSet) {
              if (__classPrivateFieldGet$1(this, _YargsInstance_exitProcess, "f"))
                setBlocking(true);
              skipValidation = true;
              __classPrivateFieldGet$1(this, _YargsInstance_usage, "f").showVersion("log");
              this.exit(0);
            }
          }
          if (!skipValidation && __classPrivateFieldGet$1(this, _YargsInstance_options, "f").skipValidation.length > 0) {
            skipValidation = Object.keys(argv).some((key) => __classPrivateFieldGet$1(this, _YargsInstance_options, "f").skipValidation.indexOf(key) >= 0 && argv[key] === true);
          }
          if (!skipValidation) {
            if (parsed.error)
              throw new YError(parsed.error.message);
            if (!requestCompletions) {
              const validation2 = this[kRunValidation](aliases, {}, parsed.error);
              if (!calledFromCommand) {
                argvPromise = applyMiddleware(argv, this, __classPrivateFieldGet$1(this, _YargsInstance_globalMiddleware, "f").getMiddleware(), true);
              }
              argvPromise = this[kValidateAsync](validation2, argvPromise !== null && argvPromise !== void 0 ? argvPromise : argv);
              if (isPromise$1(argvPromise) && !calledFromCommand) {
                argvPromise = argvPromise.then(() => {
                  return applyMiddleware(argv, this, __classPrivateFieldGet$1(this, _YargsInstance_globalMiddleware, "f").getMiddleware(), false);
                });
              }
            }
          }
        } catch (err) {
          if (err instanceof YError)
            __classPrivateFieldGet$1(this, _YargsInstance_usage, "f").fail(err.message, err);
          else
            throw err;
        }
        return this[kPostProcess](argvPromise !== null && argvPromise !== void 0 ? argvPromise : argv, populateDoubleDash, !!calledFromCommand, true);
      }
      [kRunValidation](aliases, positionalMap, parseErrors, isDefaultCommand) {
        const demandedOptions = { ...this.getDemandedOptions() };
        return (argv) => {
          if (parseErrors)
            throw new YError(parseErrors.message);
          __classPrivateFieldGet$1(this, _YargsInstance_validation, "f").nonOptionCount(argv);
          __classPrivateFieldGet$1(this, _YargsInstance_validation, "f").requiredArguments(argv, demandedOptions);
          let failedStrictCommands = false;
          if (__classPrivateFieldGet$1(this, _YargsInstance_strictCommands, "f")) {
            failedStrictCommands = __classPrivateFieldGet$1(this, _YargsInstance_validation, "f").unknownCommands(argv);
          }
          if (__classPrivateFieldGet$1(this, _YargsInstance_strict, "f") && !failedStrictCommands) {
            __classPrivateFieldGet$1(this, _YargsInstance_validation, "f").unknownArguments(argv, aliases, positionalMap, !!isDefaultCommand);
          } else if (__classPrivateFieldGet$1(this, _YargsInstance_strictOptions, "f")) {
            __classPrivateFieldGet$1(this, _YargsInstance_validation, "f").unknownArguments(argv, aliases, {}, false, false);
          }
          __classPrivateFieldGet$1(this, _YargsInstance_validation, "f").limitedChoices(argv);
          __classPrivateFieldGet$1(this, _YargsInstance_validation, "f").implications(argv);
          __classPrivateFieldGet$1(this, _YargsInstance_validation, "f").conflicting(argv);
        };
      }
      [kSetHasOutput]() {
        __classPrivateFieldSet$1(this, _YargsInstance_hasOutput, true, "f");
      }
      [kTrackManuallySetKeys](keys2) {
        if (typeof keys2 === "string") {
          __classPrivateFieldGet$1(this, _YargsInstance_options, "f").key[keys2] = true;
        } else {
          for (const k of keys2) {
            __classPrivateFieldGet$1(this, _YargsInstance_options, "f").key[k] = true;
          }
        }
      }
    };
    Yargs = YargsFactory(shim$1);
    src = { exports: {} };
    browser$1 = { exports: {} };
    node$1 = { exports: {} };
    srcExports = requireSrc();
    debug$2 = /* @__PURE__ */ getDefaultExportFromCjs(srcExports);
    index = /* @__PURE__ */ _mergeNamespaces({
      __proto__: null,
      default: debug$2
    }, [srcExports]);
    (function(util2) {
      util2.assertEqual = (_) => {
      };
      function assertIs(_arg) {
      }
      util2.assertIs = assertIs;
      function assertNever3(_x) {
        throw new Error();
      }
      util2.assertNever = assertNever3;
      util2.arrayToEnum = (items2) => {
        const obj = {};
        for (const item of items2) {
          obj[item] = item;
        }
        return obj;
      };
      util2.getValidEnumValues = (obj) => {
        const validKeys2 = util2.objectKeys(obj).filter((k) => typeof obj[obj[k]] !== "number");
        const filtered = {};
        for (const k of validKeys2) {
          filtered[k] = obj[k];
        }
        return util2.objectValues(filtered);
      };
      util2.objectValues = (obj) => {
        return util2.objectKeys(obj).map(function(e) {
          return obj[e];
        });
      };
      util2.objectKeys = typeof Object.keys === "function" ? (obj) => Object.keys(obj) : (object2) => {
        const keys2 = [];
        for (const key in object2) {
          if (Object.prototype.hasOwnProperty.call(object2, key)) {
            keys2.push(key);
          }
        }
        return keys2;
      };
      util2.find = (arr, checker) => {
        for (const item of arr) {
          if (checker(item))
            return item;
        }
        return void 0;
      };
      util2.isInteger = typeof Number.isInteger === "function" ? (val) => Number.isInteger(val) : (val) => typeof val === "number" && Number.isFinite(val) && Math.floor(val) === val;
      function joinValues(array2, separator = " | ") {
        return array2.map((val) => typeof val === "string" ? `'${val}'` : val).join(separator);
      }
      util2.joinValues = joinValues;
      util2.jsonStringifyReplacer = (_, value) => {
        if (typeof value === "bigint") {
          return value.toString();
        }
        return value;
      };
    })(util$5 || (util$5 = {}));
    (function(objectUtil2) {
      objectUtil2.mergeShapes = (first2, second) => {
        return {
          ...first2,
          ...second
        };
      };
    })(objectUtil || (objectUtil = {}));
    ZodParsedType = util$5.arrayToEnum([
      "string",
      "nan",
      "number",
      "integer",
      "float",
      "boolean",
      "date",
      "bigint",
      "symbol",
      "function",
      "undefined",
      "null",
      "array",
      "object",
      "unknown",
      "promise",
      "void",
      "never",
      "map",
      "set"
    ]);
    getParsedType = (data32) => {
      const t = typeof data32;
      switch (t) {
        case "undefined":
          return ZodParsedType.undefined;
        case "string":
          return ZodParsedType.string;
        case "number":
          return Number.isNaN(data32) ? ZodParsedType.nan : ZodParsedType.number;
        case "boolean":
          return ZodParsedType.boolean;
        case "function":
          return ZodParsedType.function;
        case "bigint":
          return ZodParsedType.bigint;
        case "symbol":
          return ZodParsedType.symbol;
        case "object":
          if (Array.isArray(data32)) {
            return ZodParsedType.array;
          }
          if (data32 === null) {
            return ZodParsedType.null;
          }
          if (data32.then && typeof data32.then === "function" && data32.catch && typeof data32.catch === "function") {
            return ZodParsedType.promise;
          }
          if (typeof Map !== "undefined" && data32 instanceof Map) {
            return ZodParsedType.map;
          }
          if (typeof Set !== "undefined" && data32 instanceof Set) {
            return ZodParsedType.set;
          }
          if (typeof Date !== "undefined" && data32 instanceof Date) {
            return ZodParsedType.date;
          }
          return ZodParsedType.object;
        default:
          return ZodParsedType.unknown;
      }
    };
    ZodIssueCode = util$5.arrayToEnum([
      "invalid_type",
      "invalid_literal",
      "custom",
      "invalid_union",
      "invalid_union_discriminator",
      "invalid_enum_value",
      "unrecognized_keys",
      "invalid_arguments",
      "invalid_return_type",
      "invalid_date",
      "invalid_string",
      "too_small",
      "too_big",
      "invalid_intersection_types",
      "not_multiple_of",
      "not_finite"
    ]);
    quotelessJson = (obj) => {
      const json = JSON.stringify(obj, null, 2);
      return json.replace(/"([^"]+)":/g, "$1:");
    };
    ZodError = class _ZodError extends Error {
      get errors() {
        return this.issues;
      }
      constructor(issues) {
        super();
        this.issues = [];
        this.addIssue = (sub) => {
          this.issues = [...this.issues, sub];
        };
        this.addIssues = (subs = []) => {
          this.issues = [...this.issues, ...subs];
        };
        const actualProto = new.target.prototype;
        if (Object.setPrototypeOf) {
          Object.setPrototypeOf(this, actualProto);
        } else {
          this.__proto__ = actualProto;
        }
        this.name = "ZodError";
        this.issues = issues;
      }
      format(_mapper) {
        const mapper = _mapper || function(issue2) {
          return issue2.message;
        };
        const fieldErrors = { _errors: [] };
        const processError = (error) => {
          for (const issue2 of error.issues) {
            if (issue2.code === "invalid_union") {
              issue2.unionErrors.map(processError);
            } else if (issue2.code === "invalid_return_type") {
              processError(issue2.returnTypeError);
            } else if (issue2.code === "invalid_arguments") {
              processError(issue2.argumentsError);
            } else if (issue2.path.length === 0) {
              fieldErrors._errors.push(mapper(issue2));
            } else {
              let curr = fieldErrors;
              let i = 0;
              while (i < issue2.path.length) {
                const el = issue2.path[i];
                const terminal = i === issue2.path.length - 1;
                if (!terminal) {
                  curr[el] = curr[el] || { _errors: [] };
                } else {
                  curr[el] = curr[el] || { _errors: [] };
                  curr[el]._errors.push(mapper(issue2));
                }
                curr = curr[el];
                i++;
              }
            }
          }
        };
        processError(this);
        return fieldErrors;
      }
      static assert(value) {
        if (!(value instanceof _ZodError)) {
          throw new Error(`Not a ZodError: ${value}`);
        }
      }
      toString() {
        return this.message;
      }
      get message() {
        return JSON.stringify(this.issues, util$5.jsonStringifyReplacer, 2);
      }
      get isEmpty() {
        return this.issues.length === 0;
      }
      flatten(mapper = (issue2) => issue2.message) {
        const fieldErrors = {};
        const formErrors = [];
        for (const sub of this.issues) {
          if (sub.path.length > 0) {
            const firstEl = sub.path[0];
            fieldErrors[firstEl] = fieldErrors[firstEl] || [];
            fieldErrors[firstEl].push(mapper(sub));
          } else {
            formErrors.push(mapper(sub));
          }
        }
        return { formErrors, fieldErrors };
      }
      get formErrors() {
        return this.flatten();
      }
    };
    ZodError.create = (issues) => {
      const error = new ZodError(issues);
      return error;
    };
    errorMap = (issue2, _ctx) => {
      let message;
      switch (issue2.code) {
        case ZodIssueCode.invalid_type:
          if (issue2.received === ZodParsedType.undefined) {
            message = "Required";
          } else {
            message = `Expected ${issue2.expected}, received ${issue2.received}`;
          }
          break;
        case ZodIssueCode.invalid_literal:
          message = `Invalid literal value, expected ${JSON.stringify(issue2.expected, util$5.jsonStringifyReplacer)}`;
          break;
        case ZodIssueCode.unrecognized_keys:
          message = `Unrecognized key(s) in object: ${util$5.joinValues(issue2.keys, ", ")}`;
          break;
        case ZodIssueCode.invalid_union:
          message = `Invalid input`;
          break;
        case ZodIssueCode.invalid_union_discriminator:
          message = `Invalid discriminator value. Expected ${util$5.joinValues(issue2.options)}`;
          break;
        case ZodIssueCode.invalid_enum_value:
          message = `Invalid enum value. Expected ${util$5.joinValues(issue2.options)}, received '${issue2.received}'`;
          break;
        case ZodIssueCode.invalid_arguments:
          message = `Invalid function arguments`;
          break;
        case ZodIssueCode.invalid_return_type:
          message = `Invalid function return type`;
          break;
        case ZodIssueCode.invalid_date:
          message = `Invalid date`;
          break;
        case ZodIssueCode.invalid_string:
          if (typeof issue2.validation === "object") {
            if ("includes" in issue2.validation) {
              message = `Invalid input: must include "${issue2.validation.includes}"`;
              if (typeof issue2.validation.position === "number") {
                message = `${message} at one or more positions greater than or equal to ${issue2.validation.position}`;
              }
            } else if ("startsWith" in issue2.validation) {
              message = `Invalid input: must start with "${issue2.validation.startsWith}"`;
            } else if ("endsWith" in issue2.validation) {
              message = `Invalid input: must end with "${issue2.validation.endsWith}"`;
            } else {
              util$5.assertNever(issue2.validation);
            }
          } else if (issue2.validation !== "regex") {
            message = `Invalid ${issue2.validation}`;
          } else {
            message = "Invalid";
          }
          break;
        case ZodIssueCode.too_small:
          if (issue2.type === "array")
            message = `Array must contain ${issue2.exact ? "exactly" : issue2.inclusive ? `at least` : `more than`} ${issue2.minimum} element(s)`;
          else if (issue2.type === "string")
            message = `String must contain ${issue2.exact ? "exactly" : issue2.inclusive ? `at least` : `over`} ${issue2.minimum} character(s)`;
          else if (issue2.type === "number")
            message = `Number must be ${issue2.exact ? `exactly equal to ` : issue2.inclusive ? `greater than or equal to ` : `greater than `}${issue2.minimum}`;
          else if (issue2.type === "bigint")
            message = `Number must be ${issue2.exact ? `exactly equal to ` : issue2.inclusive ? `greater than or equal to ` : `greater than `}${issue2.minimum}`;
          else if (issue2.type === "date")
            message = `Date must be ${issue2.exact ? `exactly equal to ` : issue2.inclusive ? `greater than or equal to ` : `greater than `}${new Date(Number(issue2.minimum))}`;
          else
            message = "Invalid input";
          break;
        case ZodIssueCode.too_big:
          if (issue2.type === "array")
            message = `Array must contain ${issue2.exact ? `exactly` : issue2.inclusive ? `at most` : `less than`} ${issue2.maximum} element(s)`;
          else if (issue2.type === "string")
            message = `String must contain ${issue2.exact ? `exactly` : issue2.inclusive ? `at most` : `under`} ${issue2.maximum} character(s)`;
          else if (issue2.type === "number")
            message = `Number must be ${issue2.exact ? `exactly` : issue2.inclusive ? `less than or equal to` : `less than`} ${issue2.maximum}`;
          else if (issue2.type === "bigint")
            message = `BigInt must be ${issue2.exact ? `exactly` : issue2.inclusive ? `less than or equal to` : `less than`} ${issue2.maximum}`;
          else if (issue2.type === "date")
            message = `Date must be ${issue2.exact ? `exactly` : issue2.inclusive ? `smaller than or equal to` : `smaller than`} ${new Date(Number(issue2.maximum))}`;
          else
            message = "Invalid input";
          break;
        case ZodIssueCode.custom:
          message = `Invalid input`;
          break;
        case ZodIssueCode.invalid_intersection_types:
          message = `Intersection results could not be merged`;
          break;
        case ZodIssueCode.not_multiple_of:
          message = `Number must be a multiple of ${issue2.multipleOf}`;
          break;
        case ZodIssueCode.not_finite:
          message = "Number must be finite";
          break;
        default:
          message = _ctx.defaultError;
          util$5.assertNever(issue2);
      }
      return { message };
    };
    overrideErrorMap = errorMap;
    makeIssue = (params) => {
      const { data: data32, path: path14, errorMaps, issueData } = params;
      const fullPath = [...path14, ...issueData.path || []];
      const fullIssue = {
        ...issueData,
        path: fullPath
      };
      if (issueData.message !== void 0) {
        return {
          ...issueData,
          path: fullPath,
          message: issueData.message
        };
      }
      let errorMessage = "";
      const maps = errorMaps.filter((m) => !!m).slice().reverse();
      for (const map2 of maps) {
        errorMessage = map2(fullIssue, { data: data32, defaultError: errorMessage }).message;
      }
      return {
        ...issueData,
        path: fullPath,
        message: errorMessage
      };
    };
    EMPTY_PATH = [];
    ParseStatus = class _ParseStatus {
      constructor() {
        this.value = "valid";
      }
      dirty() {
        if (this.value === "valid")
          this.value = "dirty";
      }
      abort() {
        if (this.value !== "aborted")
          this.value = "aborted";
      }
      static mergeArray(status, results) {
        const arrayValue = [];
        for (const s of results) {
          if (s.status === "aborted")
            return INVALID;
          if (s.status === "dirty")
            status.dirty();
          arrayValue.push(s.value);
        }
        return { status: status.value, value: arrayValue };
      }
      static async mergeObjectAsync(status, pairs) {
        const syncPairs = [];
        for (const pair of pairs) {
          const key = await pair.key;
          const value = await pair.value;
          syncPairs.push({
            key,
            value
          });
        }
        return _ParseStatus.mergeObjectSync(status, syncPairs);
      }
      static mergeObjectSync(status, pairs) {
        const finalObject = {};
        for (const pair of pairs) {
          const { key, value } = pair;
          if (key.status === "aborted")
            return INVALID;
          if (value.status === "aborted")
            return INVALID;
          if (key.status === "dirty")
            status.dirty();
          if (value.status === "dirty")
            status.dirty();
          if (key.value !== "__proto__" && (typeof value.value !== "undefined" || pair.alwaysSet)) {
            finalObject[key.value] = value.value;
          }
        }
        return { status: status.value, value: finalObject };
      }
    };
    INVALID = Object.freeze({
      status: "aborted"
    });
    DIRTY = (value) => ({ status: "dirty", value });
    OK = (value) => ({ status: "valid", value });
    isAborted = (x) => x.status === "aborted";
    isDirty = (x) => x.status === "dirty";
    isValid$1 = (x) => x.status === "valid";
    isAsync = (x) => typeof Promise !== "undefined" && x instanceof Promise;
    (function(errorUtil2) {
      errorUtil2.errToObj = (message) => typeof message === "string" ? { message } : message || {};
      errorUtil2.toString = (message) => typeof message === "string" ? message : message?.message;
    })(errorUtil || (errorUtil = {}));
    ParseInputLazyPath = class {
      constructor(parent, value, path14, key) {
        this._cachedPath = [];
        this.parent = parent;
        this.data = value;
        this._path = path14;
        this._key = key;
      }
      get path() {
        if (!this._cachedPath.length) {
          if (Array.isArray(this._key)) {
            this._cachedPath.push(...this._path, ...this._key);
          } else {
            this._cachedPath.push(...this._path, this._key);
          }
        }
        return this._cachedPath;
      }
    };
    handleResult = (ctx, result) => {
      if (isValid$1(result)) {
        return { success: true, data: result.value };
      } else {
        if (!ctx.common.issues.length) {
          throw new Error("Validation failed but no issues detected.");
        }
        return {
          success: false,
          get error() {
            if (this._error)
              return this._error;
            const error = new ZodError(ctx.common.issues);
            this._error = error;
            return this._error;
          }
        };
      }
    };
    ZodType$1 = class ZodType {
      get description() {
        return this._def.description;
      }
      _getType(input) {
        return getParsedType(input.data);
      }
      _getOrReturnCtx(input, ctx) {
        return ctx || {
          common: input.parent.common,
          data: input.data,
          parsedType: getParsedType(input.data),
          schemaErrorMap: this._def.errorMap,
          path: input.path,
          parent: input.parent
        };
      }
      _processInputParams(input) {
        return {
          status: new ParseStatus(),
          ctx: {
            common: input.parent.common,
            data: input.data,
            parsedType: getParsedType(input.data),
            schemaErrorMap: this._def.errorMap,
            path: input.path,
            parent: input.parent
          }
        };
      }
      _parseSync(input) {
        const result = this._parse(input);
        if (isAsync(result)) {
          throw new Error("Synchronous parse encountered promise.");
        }
        return result;
      }
      _parseAsync(input) {
        const result = this._parse(input);
        return Promise.resolve(result);
      }
      parse(data32, params) {
        const result = this.safeParse(data32, params);
        if (result.success)
          return result.data;
        throw result.error;
      }
      safeParse(data32, params) {
        const ctx = {
          common: {
            issues: [],
            async: params?.async ?? false,
            contextualErrorMap: params?.errorMap
          },
          path: params?.path || [],
          schemaErrorMap: this._def.errorMap,
          parent: null,
          data: data32,
          parsedType: getParsedType(data32)
        };
        const result = this._parseSync({ data: data32, path: ctx.path, parent: ctx });
        return handleResult(ctx, result);
      }
      "~validate"(data32) {
        const ctx = {
          common: {
            issues: [],
            async: !!this["~standard"].async
          },
          path: [],
          schemaErrorMap: this._def.errorMap,
          parent: null,
          data: data32,
          parsedType: getParsedType(data32)
        };
        if (!this["~standard"].async) {
          try {
            const result = this._parseSync({ data: data32, path: [], parent: ctx });
            return isValid$1(result) ? {
              value: result.value
            } : {
              issues: ctx.common.issues
            };
          } catch (err) {
            if (err?.message?.toLowerCase()?.includes("encountered")) {
              this["~standard"].async = true;
            }
            ctx.common = {
              issues: [],
              async: true
            };
          }
        }
        return this._parseAsync({ data: data32, path: [], parent: ctx }).then((result) => isValid$1(result) ? {
          value: result.value
        } : {
          issues: ctx.common.issues
        });
      }
      async parseAsync(data32, params) {
        const result = await this.safeParseAsync(data32, params);
        if (result.success)
          return result.data;
        throw result.error;
      }
      async safeParseAsync(data32, params) {
        const ctx = {
          common: {
            issues: [],
            contextualErrorMap: params?.errorMap,
            async: true
          },
          path: params?.path || [],
          schemaErrorMap: this._def.errorMap,
          parent: null,
          data: data32,
          parsedType: getParsedType(data32)
        };
        const maybeAsyncResult2 = this._parse({ data: data32, path: ctx.path, parent: ctx });
        const result = await (isAsync(maybeAsyncResult2) ? maybeAsyncResult2 : Promise.resolve(maybeAsyncResult2));
        return handleResult(ctx, result);
      }
      refine(check2, message) {
        const getIssueProperties = (val) => {
          if (typeof message === "string" || typeof message === "undefined") {
            return { message };
          } else if (typeof message === "function") {
            return message(val);
          } else {
            return message;
          }
        };
        return this._refinement((val, ctx) => {
          const result = check2(val);
          const setError = () => ctx.addIssue({
            code: ZodIssueCode.custom,
            ...getIssueProperties(val)
          });
          if (typeof Promise !== "undefined" && result instanceof Promise) {
            return result.then((data32) => {
              if (!data32) {
                setError();
                return false;
              } else {
                return true;
              }
            });
          }
          if (!result) {
            setError();
            return false;
          } else {
            return true;
          }
        });
      }
      refinement(check2, refinementData) {
        return this._refinement((val, ctx) => {
          if (!check2(val)) {
            ctx.addIssue(typeof refinementData === "function" ? refinementData(val, ctx) : refinementData);
            return false;
          } else {
            return true;
          }
        });
      }
      _refinement(refinement) {
        return new ZodEffects({
          schema: this,
          typeName: ZodFirstPartyTypeKind.ZodEffects,
          effect: { type: "refinement", refinement }
        });
      }
      superRefine(refinement) {
        return this._refinement(refinement);
      }
      constructor(def2) {
        this.spa = this.safeParseAsync;
        this._def = def2;
        this.parse = this.parse.bind(this);
        this.safeParse = this.safeParse.bind(this);
        this.parseAsync = this.parseAsync.bind(this);
        this.safeParseAsync = this.safeParseAsync.bind(this);
        this.spa = this.spa.bind(this);
        this.refine = this.refine.bind(this);
        this.refinement = this.refinement.bind(this);
        this.superRefine = this.superRefine.bind(this);
        this.optional = this.optional.bind(this);
        this.nullable = this.nullable.bind(this);
        this.nullish = this.nullish.bind(this);
        this.array = this.array.bind(this);
        this.promise = this.promise.bind(this);
        this.or = this.or.bind(this);
        this.and = this.and.bind(this);
        this.transform = this.transform.bind(this);
        this.brand = this.brand.bind(this);
        this.default = this.default.bind(this);
        this.catch = this.catch.bind(this);
        this.describe = this.describe.bind(this);
        this.pipe = this.pipe.bind(this);
        this.readonly = this.readonly.bind(this);
        this.isNullable = this.isNullable.bind(this);
        this.isOptional = this.isOptional.bind(this);
        this["~standard"] = {
          version: 1,
          vendor: "zod",
          validate: (data32) => this["~validate"](data32)
        };
      }
      optional() {
        return ZodOptional$1.create(this, this._def);
      }
      nullable() {
        return ZodNullable$1.create(this, this._def);
      }
      nullish() {
        return this.nullable().optional();
      }
      array() {
        return ZodArray$1.create(this);
      }
      promise() {
        return ZodPromise.create(this, this._def);
      }
      or(option) {
        return ZodUnion$1.create([this, option], this._def);
      }
      and(incoming) {
        return ZodIntersection$1.create(this, incoming, this._def);
      }
      transform(transform2) {
        return new ZodEffects({
          ...processCreateParams(this._def),
          schema: this,
          typeName: ZodFirstPartyTypeKind.ZodEffects,
          effect: { type: "transform", transform: transform2 }
        });
      }
      default(def2) {
        const defaultValueFunc = typeof def2 === "function" ? def2 : () => def2;
        return new ZodDefault$1({
          ...processCreateParams(this._def),
          innerType: this,
          defaultValue: defaultValueFunc,
          typeName: ZodFirstPartyTypeKind.ZodDefault
        });
      }
      brand() {
        return new ZodBranded({
          typeName: ZodFirstPartyTypeKind.ZodBranded,
          type: this,
          ...processCreateParams(this._def)
        });
      }
      catch(def2) {
        const catchValueFunc = typeof def2 === "function" ? def2 : () => def2;
        return new ZodCatch$1({
          ...processCreateParams(this._def),
          innerType: this,
          catchValue: catchValueFunc,
          typeName: ZodFirstPartyTypeKind.ZodCatch
        });
      }
      describe(description2) {
        const This = this.constructor;
        return new This({
          ...this._def,
          description: description2
        });
      }
      pipe(target) {
        return ZodPipeline.create(this, target);
      }
      readonly() {
        return ZodReadonly$1.create(this);
      }
      isOptional() {
        return this.safeParse(void 0).success;
      }
      isNullable() {
        return this.safeParse(null).success;
      }
    };
    cuidRegex = /^c[^\s-]{8,}$/i;
    cuid2Regex = /^[0-9a-z]+$/;
    ulidRegex = /^[0-9A-HJKMNP-TV-Z]{26}$/i;
    uuidRegex = /^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i;
    nanoidRegex = /^[a-z0-9_-]{21}$/i;
    jwtRegex = /^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/;
    durationRegex = /^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/;
    emailRegex = /^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i;
    _emojiRegex = `^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$`;
    ipv4Regex = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/;
    ipv4CidrRegex = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/;
    ipv6Regex = /^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/;
    ipv6CidrRegex = /^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/;
    base64Regex = /^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/;
    base64urlRegex = /^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/;
    dateRegexSource = `((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))`;
    dateRegex = new RegExp(`^${dateRegexSource}$`);
    ZodString$1 = class ZodString extends ZodType$1 {
      _parse(input) {
        if (this._def.coerce) {
          input.data = String(input.data);
        }
        const parsedType = this._getType(input);
        if (parsedType !== ZodParsedType.string) {
          const ctx2 = this._getOrReturnCtx(input);
          addIssueToContext(ctx2, {
            code: ZodIssueCode.invalid_type,
            expected: ZodParsedType.string,
            received: ctx2.parsedType
          });
          return INVALID;
        }
        const status = new ParseStatus();
        let ctx = void 0;
        for (const check2 of this._def.checks) {
          if (check2.kind === "min") {
            if (input.data.length < check2.value) {
              ctx = this._getOrReturnCtx(input, ctx);
              addIssueToContext(ctx, {
                code: ZodIssueCode.too_small,
                minimum: check2.value,
                type: "string",
                inclusive: true,
                exact: false,
                message: check2.message
              });
              status.dirty();
            }
          } else if (check2.kind === "max") {
            if (input.data.length > check2.value) {
              ctx = this._getOrReturnCtx(input, ctx);
              addIssueToContext(ctx, {
                code: ZodIssueCode.too_big,
                maximum: check2.value,
                type: "string",
                inclusive: true,
                exact: false,
                message: check2.message
              });
              status.dirty();
            }
          } else if (check2.kind === "length") {
            const tooBig = input.data.length > check2.value;
            const tooSmall = input.data.length < check2.value;
            if (tooBig || tooSmall) {
              ctx = this._getOrReturnCtx(input, ctx);
              if (tooBig) {
                addIssueToContext(ctx, {
                  code: ZodIssueCode.too_big,
                  maximum: check2.value,
                  type: "string",
                  inclusive: true,
                  exact: true,
                  message: check2.message
                });
              } else if (tooSmall) {
                addIssueToContext(ctx, {
                  code: ZodIssueCode.too_small,
                  minimum: check2.value,
                  type: "string",
                  inclusive: true,
                  exact: true,
                  message: check2.message
                });
              }
              status.dirty();
            }
          } else if (check2.kind === "email") {
            if (!emailRegex.test(input.data)) {
              ctx = this._getOrReturnCtx(input, ctx);
              addIssueToContext(ctx, {
                validation: "email",
                code: ZodIssueCode.invalid_string,
                message: check2.message
              });
              status.dirty();
            }
          } else if (check2.kind === "emoji") {
            if (!emojiRegex$1) {
              emojiRegex$1 = new RegExp(_emojiRegex, "u");
            }
            if (!emojiRegex$1.test(input.data)) {
              ctx = this._getOrReturnCtx(input, ctx);
              addIssueToContext(ctx, {
                validation: "emoji",
                code: ZodIssueCode.invalid_string,
                message: check2.message
              });
              status.dirty();
            }
          } else if (check2.kind === "uuid") {
            if (!uuidRegex.test(input.data)) {
              ctx = this._getOrReturnCtx(input, ctx);
              addIssueToContext(ctx, {
                validation: "uuid",
                code: ZodIssueCode.invalid_string,
                message: check2.message
              });
              status.dirty();
            }
          } else if (check2.kind === "nanoid") {
            if (!nanoidRegex.test(input.data)) {
              ctx = this._getOrReturnCtx(input, ctx);
              addIssueToContext(ctx, {
                validation: "nanoid",
                code: ZodIssueCode.invalid_string,
                message: check2.message
              });
              status.dirty();
            }
          } else if (check2.kind === "cuid") {
            if (!cuidRegex.test(input.data)) {
              ctx = this._getOrReturnCtx(input, ctx);
              addIssueToContext(ctx, {
                validation: "cuid",
                code: ZodIssueCode.invalid_string,
                message: check2.message
              });
              status.dirty();
            }
          } else if (check2.kind === "cuid2") {
            if (!cuid2Regex.test(input.data)) {
              ctx = this._getOrReturnCtx(input, ctx);
              addIssueToContext(ctx, {
                validation: "cuid2",
                code: ZodIssueCode.invalid_string,
                message: check2.message
              });
              status.dirty();
            }
          } else if (check2.kind === "ulid") {
            if (!ulidRegex.test(input.data)) {
              ctx = this._getOrReturnCtx(input, ctx);
              addIssueToContext(ctx, {
                validation: "ulid",
                code: ZodIssueCode.invalid_string,
                message: check2.message
              });
              status.dirty();
            }
          } else if (check2.kind === "url") {
            try {
              new URL(input.data);
            } catch {
              ctx = this._getOrReturnCtx(input, ctx);
              addIssueToContext(ctx, {
                validation: "url",
                code: ZodIssueCode.invalid_string,
                message: check2.message
              });
              status.dirty();
            }
          } else if (check2.kind === "regex") {
            check2.regex.lastIndex = 0;
            const testResult = check2.regex.test(input.data);
            if (!testResult) {
              ctx = this._getOrReturnCtx(input, ctx);
              addIssueToContext(ctx, {
                validation: "regex",
                code: ZodIssueCode.invalid_string,
                message: check2.message
              });
              status.dirty();
            }
          } else if (check2.kind === "trim") {
            input.data = input.data.trim();
          } else if (check2.kind === "includes") {
            if (!input.data.includes(check2.value, check2.position)) {
              ctx = this._getOrReturnCtx(input, ctx);
              addIssueToContext(ctx, {
                code: ZodIssueCode.invalid_string,
                validation: { includes: check2.value, position: check2.position },
                message: check2.message
              });
              status.dirty();
            }
          } else if (check2.kind === "toLowerCase") {
            input.data = input.data.toLowerCase();
          } else if (check2.kind === "toUpperCase") {
            input.data = input.data.toUpperCase();
          } else if (check2.kind === "startsWith") {
            if (!input.data.startsWith(check2.value)) {
              ctx = this._getOrReturnCtx(input, ctx);
              addIssueToContext(ctx, {
                code: ZodIssueCode.invalid_string,
                validation: { startsWith: check2.value },
                message: check2.message
              });
              status.dirty();
            }
          } else if (check2.kind === "endsWith") {
            if (!input.data.endsWith(check2.value)) {
              ctx = this._getOrReturnCtx(input, ctx);
              addIssueToContext(ctx, {
                code: ZodIssueCode.invalid_string,
                validation: { endsWith: check2.value },
                message: check2.message
              });
              status.dirty();
            }
          } else if (check2.kind === "datetime") {
            const regex2 = datetimeRegex(check2);
            if (!regex2.test(input.data)) {
              ctx = this._getOrReturnCtx(input, ctx);
              addIssueToContext(ctx, {
                code: ZodIssueCode.invalid_string,
                validation: "datetime",
                message: check2.message
              });
              status.dirty();
            }
          } else if (check2.kind === "date") {
            const regex2 = dateRegex;
            if (!regex2.test(input.data)) {
              ctx = this._getOrReturnCtx(input, ctx);
              addIssueToContext(ctx, {
                code: ZodIssueCode.invalid_string,
                validation: "date",
                message: check2.message
              });
              status.dirty();
            }
          } else if (check2.kind === "time") {
            const regex2 = timeRegex(check2);
            if (!regex2.test(input.data)) {
              ctx = this._getOrReturnCtx(input, ctx);
              addIssueToContext(ctx, {
                code: ZodIssueCode.invalid_string,
                validation: "time",
                message: check2.message
              });
              status.dirty();
            }
          } else if (check2.kind === "duration") {
            if (!durationRegex.test(input.data)) {
              ctx = this._getOrReturnCtx(input, ctx);
              addIssueToContext(ctx, {
                validation: "duration",
                code: ZodIssueCode.invalid_string,
                message: check2.message
              });
              status.dirty();
            }
          } else if (check2.kind === "ip") {
            if (!isValidIP(input.data, check2.version)) {
              ctx = this._getOrReturnCtx(input, ctx);
              addIssueToContext(ctx, {
                validation: "ip",
                code: ZodIssueCode.invalid_string,
                message: check2.message
              });
              status.dirty();
            }
          } else if (check2.kind === "jwt") {
            if (!isValidJWT$1(input.data, check2.alg)) {
              ctx = this._getOrReturnCtx(input, ctx);
              addIssueToContext(ctx, {
                validation: "jwt",
                code: ZodIssueCode.invalid_string,
                message: check2.message
              });
              status.dirty();
            }
          } else if (check2.kind === "cidr") {
            if (!isValidCidr(input.data, check2.version)) {
              ctx = this._getOrReturnCtx(input, ctx);
              addIssueToContext(ctx, {
                validation: "cidr",
                code: ZodIssueCode.invalid_string,
                message: check2.message
              });
              status.dirty();
            }
          } else if (check2.kind === "base64") {
            if (!base64Regex.test(input.data)) {
              ctx = this._getOrReturnCtx(input, ctx);
              addIssueToContext(ctx, {
                validation: "base64",
                code: ZodIssueCode.invalid_string,
                message: check2.message
              });
              status.dirty();
            }
          } else if (check2.kind === "base64url") {
            if (!base64urlRegex.test(input.data)) {
              ctx = this._getOrReturnCtx(input, ctx);
              addIssueToContext(ctx, {
                validation: "base64url",
                code: ZodIssueCode.invalid_string,
                message: check2.message
              });
              status.dirty();
            }
          } else {
            util$5.assertNever(check2);
          }
        }
        return { status: status.value, value: input.data };
      }
      _regex(regex2, validation2, message) {
        return this.refinement((data32) => regex2.test(data32), {
          validation: validation2,
          code: ZodIssueCode.invalid_string,
          ...errorUtil.errToObj(message)
        });
      }
      _addCheck(check2) {
        return new ZodString({
          ...this._def,
          checks: [...this._def.checks, check2]
        });
      }
      email(message) {
        return this._addCheck({ kind: "email", ...errorUtil.errToObj(message) });
      }
      url(message) {
        return this._addCheck({ kind: "url", ...errorUtil.errToObj(message) });
      }
      emoji(message) {
        return this._addCheck({ kind: "emoji", ...errorUtil.errToObj(message) });
      }
      uuid(message) {
        return this._addCheck({ kind: "uuid", ...errorUtil.errToObj(message) });
      }
      nanoid(message) {
        return this._addCheck({ kind: "nanoid", ...errorUtil.errToObj(message) });
      }
      cuid(message) {
        return this._addCheck({ kind: "cuid", ...errorUtil.errToObj(message) });
      }
      cuid2(message) {
        return this._addCheck({ kind: "cuid2", ...errorUtil.errToObj(message) });
      }
      ulid(message) {
        return this._addCheck({ kind: "ulid", ...errorUtil.errToObj(message) });
      }
      base64(message) {
        return this._addCheck({ kind: "base64", ...errorUtil.errToObj(message) });
      }
      base64url(message) {
        return this._addCheck({
          kind: "base64url",
          ...errorUtil.errToObj(message)
        });
      }
      jwt(options2) {
        return this._addCheck({ kind: "jwt", ...errorUtil.errToObj(options2) });
      }
      ip(options2) {
        return this._addCheck({ kind: "ip", ...errorUtil.errToObj(options2) });
      }
      cidr(options2) {
        return this._addCheck({ kind: "cidr", ...errorUtil.errToObj(options2) });
      }
      datetime(options2) {
        if (typeof options2 === "string") {
          return this._addCheck({
            kind: "datetime",
            precision: null,
            offset: false,
            local: false,
            message: options2
          });
        }
        return this._addCheck({
          kind: "datetime",
          precision: typeof options2?.precision === "undefined" ? null : options2?.precision,
          offset: options2?.offset ?? false,
          local: options2?.local ?? false,
          ...errorUtil.errToObj(options2?.message)
        });
      }
      date(message) {
        return this._addCheck({ kind: "date", message });
      }
      time(options2) {
        if (typeof options2 === "string") {
          return this._addCheck({
            kind: "time",
            precision: null,
            message: options2
          });
        }
        return this._addCheck({
          kind: "time",
          precision: typeof options2?.precision === "undefined" ? null : options2?.precision,
          ...errorUtil.errToObj(options2?.message)
        });
      }
      duration(message) {
        return this._addCheck({ kind: "duration", ...errorUtil.errToObj(message) });
      }
      regex(regex2, message) {
        return this._addCheck({
          kind: "regex",
          regex: regex2,
          ...errorUtil.errToObj(message)
        });
      }
      includes(value, options2) {
        return this._addCheck({
          kind: "includes",
          value,
          position: options2?.position,
          ...errorUtil.errToObj(options2?.message)
        });
      }
      startsWith(value, message) {
        return this._addCheck({
          kind: "startsWith",
          value,
          ...errorUtil.errToObj(message)
        });
      }
      endsWith(value, message) {
        return this._addCheck({
          kind: "endsWith",
          value,
          ...errorUtil.errToObj(message)
        });
      }
      min(minLength, message) {
        return this._addCheck({
          kind: "min",
          value: minLength,
          ...errorUtil.errToObj(message)
        });
      }
      max(maxLength, message) {
        return this._addCheck({
          kind: "max",
          value: maxLength,
          ...errorUtil.errToObj(message)
        });
      }
      length(len, message) {
        return this._addCheck({
          kind: "length",
          value: len,
          ...errorUtil.errToObj(message)
        });
      }
      nonempty(message) {
        return this.min(1, errorUtil.errToObj(message));
      }
      trim() {
        return new ZodString({
          ...this._def,
          checks: [...this._def.checks, { kind: "trim" }]
        });
      }
      toLowerCase() {
        return new ZodString({
          ...this._def,
          checks: [...this._def.checks, { kind: "toLowerCase" }]
        });
      }
      toUpperCase() {
        return new ZodString({
          ...this._def,
          checks: [...this._def.checks, { kind: "toUpperCase" }]
        });
      }
      get isDatetime() {
        return !!this._def.checks.find((ch) => ch.kind === "datetime");
      }
      get isDate() {
        return !!this._def.checks.find((ch) => ch.kind === "date");
      }
      get isTime() {
        return !!this._def.checks.find((ch) => ch.kind === "time");
      }
      get isDuration() {
        return !!this._def.checks.find((ch) => ch.kind === "duration");
      }
      get isEmail() {
        return !!this._def.checks.find((ch) => ch.kind === "email");
      }
      get isURL() {
        return !!this._def.checks.find((ch) => ch.kind === "url");
      }
      get isEmoji() {
        return !!this._def.checks.find((ch) => ch.kind === "emoji");
      }
      get isUUID() {
        return !!this._def.checks.find((ch) => ch.kind === "uuid");
      }
      get isNANOID() {
        return !!this._def.checks.find((ch) => ch.kind === "nanoid");
      }
      get isCUID() {
        return !!this._def.checks.find((ch) => ch.kind === "cuid");
      }
      get isCUID2() {
        return !!this._def.checks.find((ch) => ch.kind === "cuid2");
      }
      get isULID() {
        return !!this._def.checks.find((ch) => ch.kind === "ulid");
      }
      get isIP() {
        return !!this._def.checks.find((ch) => ch.kind === "ip");
      }
      get isCIDR() {
        return !!this._def.checks.find((ch) => ch.kind === "cidr");
      }
      get isBase64() {
        return !!this._def.checks.find((ch) => ch.kind === "base64");
      }
      get isBase64url() {
        return !!this._def.checks.find((ch) => ch.kind === "base64url");
      }
      get minLength() {
        let min = null;
        for (const ch of this._def.checks) {
          if (ch.kind === "min") {
            if (min === null || ch.value > min)
              min = ch.value;
          }
        }
        return min;
      }
      get maxLength() {
        let max = null;
        for (const ch of this._def.checks) {
          if (ch.kind === "max") {
            if (max === null || ch.value < max)
              max = ch.value;
          }
        }
        return max;
      }
    };
    ZodString$1.create = (params) => {
      return new ZodString$1({
        checks: [],
        typeName: ZodFirstPartyTypeKind.ZodString,
        coerce: params?.coerce ?? false,
        ...processCreateParams(params)
      });
    };
    ZodNumber$1 = class ZodNumber extends ZodType$1 {
      constructor() {
        super(...arguments);
        this.min = this.gte;
        this.max = this.lte;
        this.step = this.multipleOf;
      }
      _parse(input) {
        if (this._def.coerce) {
          input.data = Number(input.data);
        }
        const parsedType = this._getType(input);
        if (parsedType !== ZodParsedType.number) {
          const ctx2 = this._getOrReturnCtx(input);
          addIssueToContext(ctx2, {
            code: ZodIssueCode.invalid_type,
            expected: ZodParsedType.number,
            received: ctx2.parsedType
          });
          return INVALID;
        }
        let ctx = void 0;
        const status = new ParseStatus();
        for (const check2 of this._def.checks) {
          if (check2.kind === "int") {
            if (!util$5.isInteger(input.data)) {
              ctx = this._getOrReturnCtx(input, ctx);
              addIssueToContext(ctx, {
                code: ZodIssueCode.invalid_type,
                expected: "integer",
                received: "float",
                message: check2.message
              });
              status.dirty();
            }
          } else if (check2.kind === "min") {
            const tooSmall = check2.inclusive ? input.data < check2.value : input.data <= check2.value;
            if (tooSmall) {
              ctx = this._getOrReturnCtx(input, ctx);
              addIssueToContext(ctx, {
                code: ZodIssueCode.too_small,
                minimum: check2.value,
                type: "number",
                inclusive: check2.inclusive,
                exact: false,
                message: check2.message
              });
              status.dirty();
            }
          } else if (check2.kind === "max") {
            const tooBig = check2.inclusive ? input.data > check2.value : input.data >= check2.value;
            if (tooBig) {
              ctx = this._getOrReturnCtx(input, ctx);
              addIssueToContext(ctx, {
                code: ZodIssueCode.too_big,
                maximum: check2.value,
                type: "number",
                inclusive: check2.inclusive,
                exact: false,
                message: check2.message
              });
              status.dirty();
            }
          } else if (check2.kind === "multipleOf") {
            if (floatSafeRemainder$1(input.data, check2.value) !== 0) {
              ctx = this._getOrReturnCtx(input, ctx);
              addIssueToContext(ctx, {
                code: ZodIssueCode.not_multiple_of,
                multipleOf: check2.value,
                message: check2.message
              });
              status.dirty();
            }
          } else if (check2.kind === "finite") {
            if (!Number.isFinite(input.data)) {
              ctx = this._getOrReturnCtx(input, ctx);
              addIssueToContext(ctx, {
                code: ZodIssueCode.not_finite,
                message: check2.message
              });
              status.dirty();
            }
          } else {
            util$5.assertNever(check2);
          }
        }
        return { status: status.value, value: input.data };
      }
      gte(value, message) {
        return this.setLimit("min", value, true, errorUtil.toString(message));
      }
      gt(value, message) {
        return this.setLimit("min", value, false, errorUtil.toString(message));
      }
      lte(value, message) {
        return this.setLimit("max", value, true, errorUtil.toString(message));
      }
      lt(value, message) {
        return this.setLimit("max", value, false, errorUtil.toString(message));
      }
      setLimit(kind, value, inclusive, message) {
        return new ZodNumber({
          ...this._def,
          checks: [
            ...this._def.checks,
            {
              kind,
              value,
              inclusive,
              message: errorUtil.toString(message)
            }
          ]
        });
      }
      _addCheck(check2) {
        return new ZodNumber({
          ...this._def,
          checks: [...this._def.checks, check2]
        });
      }
      int(message) {
        return this._addCheck({
          kind: "int",
          message: errorUtil.toString(message)
        });
      }
      positive(message) {
        return this._addCheck({
          kind: "min",
          value: 0,
          inclusive: false,
          message: errorUtil.toString(message)
        });
      }
      negative(message) {
        return this._addCheck({
          kind: "max",
          value: 0,
          inclusive: false,
          message: errorUtil.toString(message)
        });
      }
      nonpositive(message) {
        return this._addCheck({
          kind: "max",
          value: 0,
          inclusive: true,
          message: errorUtil.toString(message)
        });
      }
      nonnegative(message) {
        return this._addCheck({
          kind: "min",
          value: 0,
          inclusive: true,
          message: errorUtil.toString(message)
        });
      }
      multipleOf(value, message) {
        return this._addCheck({
          kind: "multipleOf",
          value,
          message: errorUtil.toString(message)
        });
      }
      finite(message) {
        return this._addCheck({
          kind: "finite",
          message: errorUtil.toString(message)
        });
      }
      safe(message) {
        return this._addCheck({
          kind: "min",
          inclusive: true,
          value: Number.MIN_SAFE_INTEGER,
          message: errorUtil.toString(message)
        })._addCheck({
          kind: "max",
          inclusive: true,
          value: Number.MAX_SAFE_INTEGER,
          message: errorUtil.toString(message)
        });
      }
      get minValue() {
        let min = null;
        for (const ch of this._def.checks) {
          if (ch.kind === "min") {
            if (min === null || ch.value > min)
              min = ch.value;
          }
        }
        return min;
      }
      get maxValue() {
        let max = null;
        for (const ch of this._def.checks) {
          if (ch.kind === "max") {
            if (max === null || ch.value < max)
              max = ch.value;
          }
        }
        return max;
      }
      get isInt() {
        return !!this._def.checks.find((ch) => ch.kind === "int" || ch.kind === "multipleOf" && util$5.isInteger(ch.value));
      }
      get isFinite() {
        let max = null;
        let min = null;
        for (const ch of this._def.checks) {
          if (ch.kind === "finite" || ch.kind === "int" || ch.kind === "multipleOf") {
            return true;
          } else if (ch.kind === "min") {
            if (min === null || ch.value > min)
              min = ch.value;
          } else if (ch.kind === "max") {
            if (max === null || ch.value < max)
              max = ch.value;
          }
        }
        return Number.isFinite(min) && Number.isFinite(max);
      }
    };
    ZodNumber$1.create = (params) => {
      return new ZodNumber$1({
        checks: [],
        typeName: ZodFirstPartyTypeKind.ZodNumber,
        coerce: params?.coerce || false,
        ...processCreateParams(params)
      });
    };
    ZodBigInt$1 = class ZodBigInt extends ZodType$1 {
      constructor() {
        super(...arguments);
        this.min = this.gte;
        this.max = this.lte;
      }
      _parse(input) {
        if (this._def.coerce) {
          try {
            input.data = BigInt(input.data);
          } catch {
            return this._getInvalidInput(input);
          }
        }
        const parsedType = this._getType(input);
        if (parsedType !== ZodParsedType.bigint) {
          return this._getInvalidInput(input);
        }
        let ctx = void 0;
        const status = new ParseStatus();
        for (const check2 of this._def.checks) {
          if (check2.kind === "min") {
            const tooSmall = check2.inclusive ? input.data < check2.value : input.data <= check2.value;
            if (tooSmall) {
              ctx = this._getOrReturnCtx(input, ctx);
              addIssueToContext(ctx, {
                code: ZodIssueCode.too_small,
                type: "bigint",
                minimum: check2.value,
                inclusive: check2.inclusive,
                message: check2.message
              });
              status.dirty();
            }
          } else if (check2.kind === "max") {
            const tooBig = check2.inclusive ? input.data > check2.value : input.data >= check2.value;
            if (tooBig) {
              ctx = this._getOrReturnCtx(input, ctx);
              addIssueToContext(ctx, {
                code: ZodIssueCode.too_big,
                type: "bigint",
                maximum: check2.value,
                inclusive: check2.inclusive,
                message: check2.message
              });
              status.dirty();
            }
          } else if (check2.kind === "multipleOf") {
            if (input.data % check2.value !== BigInt(0)) {
              ctx = this._getOrReturnCtx(input, ctx);
              addIssueToContext(ctx, {
                code: ZodIssueCode.not_multiple_of,
                multipleOf: check2.value,
                message: check2.message
              });
              status.dirty();
            }
          } else {
            util$5.assertNever(check2);
          }
        }
        return { status: status.value, value: input.data };
      }
      _getInvalidInput(input) {
        const ctx = this._getOrReturnCtx(input);
        addIssueToContext(ctx, {
          code: ZodIssueCode.invalid_type,
          expected: ZodParsedType.bigint,
          received: ctx.parsedType
        });
        return INVALID;
      }
      gte(value, message) {
        return this.setLimit("min", value, true, errorUtil.toString(message));
      }
      gt(value, message) {
        return this.setLimit("min", value, false, errorUtil.toString(message));
      }
      lte(value, message) {
        return this.setLimit("max", value, true, errorUtil.toString(message));
      }
      lt(value, message) {
        return this.setLimit("max", value, false, errorUtil.toString(message));
      }
      setLimit(kind, value, inclusive, message) {
        return new ZodBigInt({
          ...this._def,
          checks: [
            ...this._def.checks,
            {
              kind,
              value,
              inclusive,
              message: errorUtil.toString(message)
            }
          ]
        });
      }
      _addCheck(check2) {
        return new ZodBigInt({
          ...this._def,
          checks: [...this._def.checks, check2]
        });
      }
      positive(message) {
        return this._addCheck({
          kind: "min",
          value: BigInt(0),
          inclusive: false,
          message: errorUtil.toString(message)
        });
      }
      negative(message) {
        return this._addCheck({
          kind: "max",
          value: BigInt(0),
          inclusive: false,
          message: errorUtil.toString(message)
        });
      }
      nonpositive(message) {
        return this._addCheck({
          kind: "max",
          value: BigInt(0),
          inclusive: true,
          message: errorUtil.toString(message)
        });
      }
      nonnegative(message) {
        return this._addCheck({
          kind: "min",
          value: BigInt(0),
          inclusive: true,
          message: errorUtil.toString(message)
        });
      }
      multipleOf(value, message) {
        return this._addCheck({
          kind: "multipleOf",
          value,
          message: errorUtil.toString(message)
        });
      }
      get minValue() {
        let min = null;
        for (const ch of this._def.checks) {
          if (ch.kind === "min") {
            if (min === null || ch.value > min)
              min = ch.value;
          }
        }
        return min;
      }
      get maxValue() {
        let max = null;
        for (const ch of this._def.checks) {
          if (ch.kind === "max") {
            if (max === null || ch.value < max)
              max = ch.value;
          }
        }
        return max;
      }
    };
    ZodBigInt$1.create = (params) => {
      return new ZodBigInt$1({
        checks: [],
        typeName: ZodFirstPartyTypeKind.ZodBigInt,
        coerce: params?.coerce ?? false,
        ...processCreateParams(params)
      });
    };
    ZodBoolean$1 = class ZodBoolean extends ZodType$1 {
      _parse(input) {
        if (this._def.coerce) {
          input.data = Boolean(input.data);
        }
        const parsedType = this._getType(input);
        if (parsedType !== ZodParsedType.boolean) {
          const ctx = this._getOrReturnCtx(input);
          addIssueToContext(ctx, {
            code: ZodIssueCode.invalid_type,
            expected: ZodParsedType.boolean,
            received: ctx.parsedType
          });
          return INVALID;
        }
        return OK(input.data);
      }
    };
    ZodBoolean$1.create = (params) => {
      return new ZodBoolean$1({
        typeName: ZodFirstPartyTypeKind.ZodBoolean,
        coerce: params?.coerce || false,
        ...processCreateParams(params)
      });
    };
    ZodDate = class _ZodDate extends ZodType$1 {
      _parse(input) {
        if (this._def.coerce) {
          input.data = new Date(input.data);
        }
        const parsedType = this._getType(input);
        if (parsedType !== ZodParsedType.date) {
          const ctx2 = this._getOrReturnCtx(input);
          addIssueToContext(ctx2, {
            code: ZodIssueCode.invalid_type,
            expected: ZodParsedType.date,
            received: ctx2.parsedType
          });
          return INVALID;
        }
        if (Number.isNaN(input.data.getTime())) {
          const ctx2 = this._getOrReturnCtx(input);
          addIssueToContext(ctx2, {
            code: ZodIssueCode.invalid_date
          });
          return INVALID;
        }
        const status = new ParseStatus();
        let ctx = void 0;
        for (const check2 of this._def.checks) {
          if (check2.kind === "min") {
            if (input.data.getTime() < check2.value) {
              ctx = this._getOrReturnCtx(input, ctx);
              addIssueToContext(ctx, {
                code: ZodIssueCode.too_small,
                message: check2.message,
                inclusive: true,
                exact: false,
                minimum: check2.value,
                type: "date"
              });
              status.dirty();
            }
          } else if (check2.kind === "max") {
            if (input.data.getTime() > check2.value) {
              ctx = this._getOrReturnCtx(input, ctx);
              addIssueToContext(ctx, {
                code: ZodIssueCode.too_big,
                message: check2.message,
                inclusive: true,
                exact: false,
                maximum: check2.value,
                type: "date"
              });
              status.dirty();
            }
          } else {
            util$5.assertNever(check2);
          }
        }
        return {
          status: status.value,
          value: new Date(input.data.getTime())
        };
      }
      _addCheck(check2) {
        return new _ZodDate({
          ...this._def,
          checks: [...this._def.checks, check2]
        });
      }
      min(minDate, message) {
        return this._addCheck({
          kind: "min",
          value: minDate.getTime(),
          message: errorUtil.toString(message)
        });
      }
      max(maxDate, message) {
        return this._addCheck({
          kind: "max",
          value: maxDate.getTime(),
          message: errorUtil.toString(message)
        });
      }
      get minDate() {
        let min = null;
        for (const ch of this._def.checks) {
          if (ch.kind === "min") {
            if (min === null || ch.value > min)
              min = ch.value;
          }
        }
        return min != null ? new Date(min) : null;
      }
      get maxDate() {
        let max = null;
        for (const ch of this._def.checks) {
          if (ch.kind === "max") {
            if (max === null || ch.value < max)
              max = ch.value;
          }
        }
        return max != null ? new Date(max) : null;
      }
    };
    ZodDate.create = (params) => {
      return new ZodDate({
        checks: [],
        coerce: params?.coerce || false,
        typeName: ZodFirstPartyTypeKind.ZodDate,
        ...processCreateParams(params)
      });
    };
    ZodSymbol = class extends ZodType$1 {
      _parse(input) {
        const parsedType = this._getType(input);
        if (parsedType !== ZodParsedType.symbol) {
          const ctx = this._getOrReturnCtx(input);
          addIssueToContext(ctx, {
            code: ZodIssueCode.invalid_type,
            expected: ZodParsedType.symbol,
            received: ctx.parsedType
          });
          return INVALID;
        }
        return OK(input.data);
      }
    };
    ZodSymbol.create = (params) => {
      return new ZodSymbol({
        typeName: ZodFirstPartyTypeKind.ZodSymbol,
        ...processCreateParams(params)
      });
    };
    ZodUndefined = class extends ZodType$1 {
      _parse(input) {
        const parsedType = this._getType(input);
        if (parsedType !== ZodParsedType.undefined) {
          const ctx = this._getOrReturnCtx(input);
          addIssueToContext(ctx, {
            code: ZodIssueCode.invalid_type,
            expected: ZodParsedType.undefined,
            received: ctx.parsedType
          });
          return INVALID;
        }
        return OK(input.data);
      }
    };
    ZodUndefined.create = (params) => {
      return new ZodUndefined({
        typeName: ZodFirstPartyTypeKind.ZodUndefined,
        ...processCreateParams(params)
      });
    };
    ZodNull$1 = class ZodNull extends ZodType$1 {
      _parse(input) {
        const parsedType = this._getType(input);
        if (parsedType !== ZodParsedType.null) {
          const ctx = this._getOrReturnCtx(input);
          addIssueToContext(ctx, {
            code: ZodIssueCode.invalid_type,
            expected: ZodParsedType.null,
            received: ctx.parsedType
          });
          return INVALID;
        }
        return OK(input.data);
      }
    };
    ZodNull$1.create = (params) => {
      return new ZodNull$1({
        typeName: ZodFirstPartyTypeKind.ZodNull,
        ...processCreateParams(params)
      });
    };
    ZodAny = class extends ZodType$1 {
      constructor() {
        super(...arguments);
        this._any = true;
      }
      _parse(input) {
        return OK(input.data);
      }
    };
    ZodAny.create = (params) => {
      return new ZodAny({
        typeName: ZodFirstPartyTypeKind.ZodAny,
        ...processCreateParams(params)
      });
    };
    ZodUnknown$1 = class ZodUnknown extends ZodType$1 {
      constructor() {
        super(...arguments);
        this._unknown = true;
      }
      _parse(input) {
        return OK(input.data);
      }
    };
    ZodUnknown$1.create = (params) => {
      return new ZodUnknown$1({
        typeName: ZodFirstPartyTypeKind.ZodUnknown,
        ...processCreateParams(params)
      });
    };
    ZodNever$1 = class ZodNever extends ZodType$1 {
      _parse(input) {
        const ctx = this._getOrReturnCtx(input);
        addIssueToContext(ctx, {
          code: ZodIssueCode.invalid_type,
          expected: ZodParsedType.never,
          received: ctx.parsedType
        });
        return INVALID;
      }
    };
    ZodNever$1.create = (params) => {
      return new ZodNever$1({
        typeName: ZodFirstPartyTypeKind.ZodNever,
        ...processCreateParams(params)
      });
    };
    ZodVoid = class extends ZodType$1 {
      _parse(input) {
        const parsedType = this._getType(input);
        if (parsedType !== ZodParsedType.undefined) {
          const ctx = this._getOrReturnCtx(input);
          addIssueToContext(ctx, {
            code: ZodIssueCode.invalid_type,
            expected: ZodParsedType.void,
            received: ctx.parsedType
          });
          return INVALID;
        }
        return OK(input.data);
      }
    };
    ZodVoid.create = (params) => {
      return new ZodVoid({
        typeName: ZodFirstPartyTypeKind.ZodVoid,
        ...processCreateParams(params)
      });
    };
    ZodArray$1 = class ZodArray extends ZodType$1 {
      _parse(input) {
        const { ctx, status } = this._processInputParams(input);
        const def2 = this._def;
        if (ctx.parsedType !== ZodParsedType.array) {
          addIssueToContext(ctx, {
            code: ZodIssueCode.invalid_type,
            expected: ZodParsedType.array,
            received: ctx.parsedType
          });
          return INVALID;
        }
        if (def2.exactLength !== null) {
          const tooBig = ctx.data.length > def2.exactLength.value;
          const tooSmall = ctx.data.length < def2.exactLength.value;
          if (tooBig || tooSmall) {
            addIssueToContext(ctx, {
              code: tooBig ? ZodIssueCode.too_big : ZodIssueCode.too_small,
              minimum: tooSmall ? def2.exactLength.value : void 0,
              maximum: tooBig ? def2.exactLength.value : void 0,
              type: "array",
              inclusive: true,
              exact: true,
              message: def2.exactLength.message
            });
            status.dirty();
          }
        }
        if (def2.minLength !== null) {
          if (ctx.data.length < def2.minLength.value) {
            addIssueToContext(ctx, {
              code: ZodIssueCode.too_small,
              minimum: def2.minLength.value,
              type: "array",
              inclusive: true,
              exact: false,
              message: def2.minLength.message
            });
            status.dirty();
          }
        }
        if (def2.maxLength !== null) {
          if (ctx.data.length > def2.maxLength.value) {
            addIssueToContext(ctx, {
              code: ZodIssueCode.too_big,
              maximum: def2.maxLength.value,
              type: "array",
              inclusive: true,
              exact: false,
              message: def2.maxLength.message
            });
            status.dirty();
          }
        }
        if (ctx.common.async) {
          return Promise.all([...ctx.data].map((item, i) => {
            return def2.type._parseAsync(new ParseInputLazyPath(ctx, item, ctx.path, i));
          })).then((result2) => {
            return ParseStatus.mergeArray(status, result2);
          });
        }
        const result = [...ctx.data].map((item, i) => {
          return def2.type._parseSync(new ParseInputLazyPath(ctx, item, ctx.path, i));
        });
        return ParseStatus.mergeArray(status, result);
      }
      get element() {
        return this._def.type;
      }
      min(minLength, message) {
        return new ZodArray({
          ...this._def,
          minLength: { value: minLength, message: errorUtil.toString(message) }
        });
      }
      max(maxLength, message) {
        return new ZodArray({
          ...this._def,
          maxLength: { value: maxLength, message: errorUtil.toString(message) }
        });
      }
      length(len, message) {
        return new ZodArray({
          ...this._def,
          exactLength: { value: len, message: errorUtil.toString(message) }
        });
      }
      nonempty(message) {
        return this.min(1, message);
      }
    };
    ZodArray$1.create = (schema, params) => {
      return new ZodArray$1({
        type: schema,
        minLength: null,
        maxLength: null,
        exactLength: null,
        typeName: ZodFirstPartyTypeKind.ZodArray,
        ...processCreateParams(params)
      });
    };
    ZodObject$1 = class ZodObject extends ZodType$1 {
      constructor() {
        super(...arguments);
        this._cached = null;
        this.nonstrict = this.passthrough;
        this.augment = this.extend;
      }
      _getCached() {
        if (this._cached !== null)
          return this._cached;
        const shape = this._def.shape();
        const keys2 = util$5.objectKeys(shape);
        this._cached = { shape, keys: keys2 };
        return this._cached;
      }
      _parse(input) {
        const parsedType = this._getType(input);
        if (parsedType !== ZodParsedType.object) {
          const ctx2 = this._getOrReturnCtx(input);
          addIssueToContext(ctx2, {
            code: ZodIssueCode.invalid_type,
            expected: ZodParsedType.object,
            received: ctx2.parsedType
          });
          return INVALID;
        }
        const { status, ctx } = this._processInputParams(input);
        const { shape, keys: shapeKeys } = this._getCached();
        const extraKeys = [];
        if (!(this._def.catchall instanceof ZodNever$1 && this._def.unknownKeys === "strip")) {
          for (const key in ctx.data) {
            if (!shapeKeys.includes(key)) {
              extraKeys.push(key);
            }
          }
        }
        const pairs = [];
        for (const key of shapeKeys) {
          const keyValidator = shape[key];
          const value = ctx.data[key];
          pairs.push({
            key: { status: "valid", value: key },
            value: keyValidator._parse(new ParseInputLazyPath(ctx, value, ctx.path, key)),
            alwaysSet: key in ctx.data
          });
        }
        if (this._def.catchall instanceof ZodNever$1) {
          const unknownKeys = this._def.unknownKeys;
          if (unknownKeys === "passthrough") {
            for (const key of extraKeys) {
              pairs.push({
                key: { status: "valid", value: key },
                value: { status: "valid", value: ctx.data[key] }
              });
            }
          } else if (unknownKeys === "strict") {
            if (extraKeys.length > 0) {
              addIssueToContext(ctx, {
                code: ZodIssueCode.unrecognized_keys,
                keys: extraKeys
              });
              status.dirty();
            }
          } else if (unknownKeys === "strip") ;
          else {
            throw new Error(`Internal ZodObject error: invalid unknownKeys value.`);
          }
        } else {
          const catchall = this._def.catchall;
          for (const key of extraKeys) {
            const value = ctx.data[key];
            pairs.push({
              key: { status: "valid", value: key },
              value: catchall._parse(
                new ParseInputLazyPath(ctx, value, ctx.path, key)
              ),
              alwaysSet: key in ctx.data
            });
          }
        }
        if (ctx.common.async) {
          return Promise.resolve().then(async () => {
            const syncPairs = [];
            for (const pair of pairs) {
              const key = await pair.key;
              const value = await pair.value;
              syncPairs.push({
                key,
                value,
                alwaysSet: pair.alwaysSet
              });
            }
            return syncPairs;
          }).then((syncPairs) => {
            return ParseStatus.mergeObjectSync(status, syncPairs);
          });
        } else {
          return ParseStatus.mergeObjectSync(status, pairs);
        }
      }
      get shape() {
        return this._def.shape();
      }
      strict(message) {
        errorUtil.errToObj;
        return new ZodObject({
          ...this._def,
          unknownKeys: "strict",
          ...message !== void 0 ? {
            errorMap: (issue2, ctx) => {
              const defaultError = this._def.errorMap?.(issue2, ctx).message ?? ctx.defaultError;
              if (issue2.code === "unrecognized_keys")
                return {
                  message: errorUtil.errToObj(message).message ?? defaultError
                };
              return {
                message: defaultError
              };
            }
          } : {}
        });
      }
      strip() {
        return new ZodObject({
          ...this._def,
          unknownKeys: "strip"
        });
      }
      passthrough() {
        return new ZodObject({
          ...this._def,
          unknownKeys: "passthrough"
        });
      }
      extend(augmentation) {
        return new ZodObject({
          ...this._def,
          shape: () => ({
            ...this._def.shape(),
            ...augmentation
          })
        });
      }
      merge(merging) {
        const merged = new ZodObject({
          unknownKeys: merging._def.unknownKeys,
          catchall: merging._def.catchall,
          shape: () => ({
            ...this._def.shape(),
            ...merging._def.shape()
          }),
          typeName: ZodFirstPartyTypeKind.ZodObject
        });
        return merged;
      }
      setKey(key, schema) {
        return this.augment({ [key]: schema });
      }
      catchall(index2) {
        return new ZodObject({
          ...this._def,
          catchall: index2
        });
      }
      pick(mask) {
        const shape = {};
        for (const key of util$5.objectKeys(mask)) {
          if (mask[key] && this.shape[key]) {
            shape[key] = this.shape[key];
          }
        }
        return new ZodObject({
          ...this._def,
          shape: () => shape
        });
      }
      omit(mask) {
        const shape = {};
        for (const key of util$5.objectKeys(this.shape)) {
          if (!mask[key]) {
            shape[key] = this.shape[key];
          }
        }
        return new ZodObject({
          ...this._def,
          shape: () => shape
        });
      }
      deepPartial() {
        return deepPartialify(this);
      }
      partial(mask) {
        const newShape = {};
        for (const key of util$5.objectKeys(this.shape)) {
          const fieldSchema = this.shape[key];
          if (mask && !mask[key]) {
            newShape[key] = fieldSchema;
          } else {
            newShape[key] = fieldSchema.optional();
          }
        }
        return new ZodObject({
          ...this._def,
          shape: () => newShape
        });
      }
      required(mask) {
        const newShape = {};
        for (const key of util$5.objectKeys(this.shape)) {
          if (mask && !mask[key]) {
            newShape[key] = this.shape[key];
          } else {
            const fieldSchema = this.shape[key];
            let newField = fieldSchema;
            while (newField instanceof ZodOptional$1) {
              newField = newField._def.innerType;
            }
            newShape[key] = newField;
          }
        }
        return new ZodObject({
          ...this._def,
          shape: () => newShape
        });
      }
      keyof() {
        return createZodEnum(util$5.objectKeys(this.shape));
      }
    };
    ZodObject$1.create = (shape, params) => {
      return new ZodObject$1({
        shape: () => shape,
        unknownKeys: "strip",
        catchall: ZodNever$1.create(),
        typeName: ZodFirstPartyTypeKind.ZodObject,
        ...processCreateParams(params)
      });
    };
    ZodObject$1.strictCreate = (shape, params) => {
      return new ZodObject$1({
        shape: () => shape,
        unknownKeys: "strict",
        catchall: ZodNever$1.create(),
        typeName: ZodFirstPartyTypeKind.ZodObject,
        ...processCreateParams(params)
      });
    };
    ZodObject$1.lazycreate = (shape, params) => {
      return new ZodObject$1({
        shape,
        unknownKeys: "strip",
        catchall: ZodNever$1.create(),
        typeName: ZodFirstPartyTypeKind.ZodObject,
        ...processCreateParams(params)
      });
    };
    ZodUnion$1 = class ZodUnion extends ZodType$1 {
      _parse(input) {
        const { ctx } = this._processInputParams(input);
        const options2 = this._def.options;
        function handleResults(results) {
          for (const result of results) {
            if (result.result.status === "valid") {
              return result.result;
            }
          }
          for (const result of results) {
            if (result.result.status === "dirty") {
              ctx.common.issues.push(...result.ctx.common.issues);
              return result.result;
            }
          }
          const unionErrors = results.map((result) => new ZodError(result.ctx.common.issues));
          addIssueToContext(ctx, {
            code: ZodIssueCode.invalid_union,
            unionErrors
          });
          return INVALID;
        }
        if (ctx.common.async) {
          return Promise.all(options2.map(async (option) => {
            const childCtx = {
              ...ctx,
              common: {
                ...ctx.common,
                issues: []
              },
              parent: null
            };
            return {
              result: await option._parseAsync({
                data: ctx.data,
                path: ctx.path,
                parent: childCtx
              }),
              ctx: childCtx
            };
          })).then(handleResults);
        } else {
          let dirty = void 0;
          const issues = [];
          for (const option of options2) {
            const childCtx = {
              ...ctx,
              common: {
                ...ctx.common,
                issues: []
              },
              parent: null
            };
            const result = option._parseSync({
              data: ctx.data,
              path: ctx.path,
              parent: childCtx
            });
            if (result.status === "valid") {
              return result;
            } else if (result.status === "dirty" && !dirty) {
              dirty = { result, ctx: childCtx };
            }
            if (childCtx.common.issues.length) {
              issues.push(childCtx.common.issues);
            }
          }
          if (dirty) {
            ctx.common.issues.push(...dirty.ctx.common.issues);
            return dirty.result;
          }
          const unionErrors = issues.map((issues2) => new ZodError(issues2));
          addIssueToContext(ctx, {
            code: ZodIssueCode.invalid_union,
            unionErrors
          });
          return INVALID;
        }
      }
      get options() {
        return this._def.options;
      }
    };
    ZodUnion$1.create = (types2, params) => {
      return new ZodUnion$1({
        options: types2,
        typeName: ZodFirstPartyTypeKind.ZodUnion,
        ...processCreateParams(params)
      });
    };
    getDiscriminator = (type2) => {
      if (type2 instanceof ZodLazy) {
        return getDiscriminator(type2.schema);
      } else if (type2 instanceof ZodEffects) {
        return getDiscriminator(type2.innerType());
      } else if (type2 instanceof ZodLiteral$1) {
        return [type2.value];
      } else if (type2 instanceof ZodEnum$1) {
        return type2.options;
      } else if (type2 instanceof ZodNativeEnum) {
        return util$5.objectValues(type2.enum);
      } else if (type2 instanceof ZodDefault$1) {
        return getDiscriminator(type2._def.innerType);
      } else if (type2 instanceof ZodUndefined) {
        return [void 0];
      } else if (type2 instanceof ZodNull$1) {
        return [null];
      } else if (type2 instanceof ZodOptional$1) {
        return [void 0, ...getDiscriminator(type2.unwrap())];
      } else if (type2 instanceof ZodNullable$1) {
        return [null, ...getDiscriminator(type2.unwrap())];
      } else if (type2 instanceof ZodBranded) {
        return getDiscriminator(type2.unwrap());
      } else if (type2 instanceof ZodReadonly$1) {
        return getDiscriminator(type2.unwrap());
      } else if (type2 instanceof ZodCatch$1) {
        return getDiscriminator(type2._def.innerType);
      } else {
        return [];
      }
    };
    ZodDiscriminatedUnion$1 = class ZodDiscriminatedUnion extends ZodType$1 {
      _parse(input) {
        const { ctx } = this._processInputParams(input);
        if (ctx.parsedType !== ZodParsedType.object) {
          addIssueToContext(ctx, {
            code: ZodIssueCode.invalid_type,
            expected: ZodParsedType.object,
            received: ctx.parsedType
          });
          return INVALID;
        }
        const discriminator2 = this.discriminator;
        const discriminatorValue = ctx.data[discriminator2];
        const option = this.optionsMap.get(discriminatorValue);
        if (!option) {
          addIssueToContext(ctx, {
            code: ZodIssueCode.invalid_union_discriminator,
            options: Array.from(this.optionsMap.keys()),
            path: [discriminator2]
          });
          return INVALID;
        }
        if (ctx.common.async) {
          return option._parseAsync({
            data: ctx.data,
            path: ctx.path,
            parent: ctx
          });
        } else {
          return option._parseSync({
            data: ctx.data,
            path: ctx.path,
            parent: ctx
          });
        }
      }
      get discriminator() {
        return this._def.discriminator;
      }
      get options() {
        return this._def.options;
      }
      get optionsMap() {
        return this._def.optionsMap;
      }
      static create(discriminator2, options2, params) {
        const optionsMap = /* @__PURE__ */ new Map();
        for (const type2 of options2) {
          const discriminatorValues = getDiscriminator(type2.shape[discriminator2]);
          if (!discriminatorValues.length) {
            throw new Error(`A discriminator value for key \`${discriminator2}\` could not be extracted from all schema options`);
          }
          for (const value of discriminatorValues) {
            if (optionsMap.has(value)) {
              throw new Error(`Discriminator property ${String(discriminator2)} has duplicate value ${String(value)}`);
            }
            optionsMap.set(value, type2);
          }
        }
        return new ZodDiscriminatedUnion({
          typeName: ZodFirstPartyTypeKind.ZodDiscriminatedUnion,
          discriminator: discriminator2,
          options: options2,
          optionsMap,
          ...processCreateParams(params)
        });
      }
    };
    ZodIntersection$1 = class ZodIntersection extends ZodType$1 {
      _parse(input) {
        const { status, ctx } = this._processInputParams(input);
        const handleParsed = (parsedLeft, parsedRight) => {
          if (isAborted(parsedLeft) || isAborted(parsedRight)) {
            return INVALID;
          }
          const merged = mergeValues$1(parsedLeft.value, parsedRight.value);
          if (!merged.valid) {
            addIssueToContext(ctx, {
              code: ZodIssueCode.invalid_intersection_types
            });
            return INVALID;
          }
          if (isDirty(parsedLeft) || isDirty(parsedRight)) {
            status.dirty();
          }
          return { status: status.value, value: merged.data };
        };
        if (ctx.common.async) {
          return Promise.all([
            this._def.left._parseAsync({
              data: ctx.data,
              path: ctx.path,
              parent: ctx
            }),
            this._def.right._parseAsync({
              data: ctx.data,
              path: ctx.path,
              parent: ctx
            })
          ]).then(([left2, right2]) => handleParsed(left2, right2));
        } else {
          return handleParsed(this._def.left._parseSync({
            data: ctx.data,
            path: ctx.path,
            parent: ctx
          }), this._def.right._parseSync({
            data: ctx.data,
            path: ctx.path,
            parent: ctx
          }));
        }
      }
    };
    ZodIntersection$1.create = (left2, right2, params) => {
      return new ZodIntersection$1({
        left: left2,
        right: right2,
        typeName: ZodFirstPartyTypeKind.ZodIntersection,
        ...processCreateParams(params)
      });
    };
    ZodTuple = class _ZodTuple extends ZodType$1 {
      _parse(input) {
        const { status, ctx } = this._processInputParams(input);
        if (ctx.parsedType !== ZodParsedType.array) {
          addIssueToContext(ctx, {
            code: ZodIssueCode.invalid_type,
            expected: ZodParsedType.array,
            received: ctx.parsedType
          });
          return INVALID;
        }
        if (ctx.data.length < this._def.items.length) {
          addIssueToContext(ctx, {
            code: ZodIssueCode.too_small,
            minimum: this._def.items.length,
            inclusive: true,
            exact: false,
            type: "array"
          });
          return INVALID;
        }
        const rest = this._def.rest;
        if (!rest && ctx.data.length > this._def.items.length) {
          addIssueToContext(ctx, {
            code: ZodIssueCode.too_big,
            maximum: this._def.items.length,
            inclusive: true,
            exact: false,
            type: "array"
          });
          status.dirty();
        }
        const items2 = [...ctx.data].map((item, itemIndex) => {
          const schema = this._def.items[itemIndex] || this._def.rest;
          if (!schema)
            return null;
          return schema._parse(new ParseInputLazyPath(ctx, item, ctx.path, itemIndex));
        }).filter((x) => !!x);
        if (ctx.common.async) {
          return Promise.all(items2).then((results) => {
            return ParseStatus.mergeArray(status, results);
          });
        } else {
          return ParseStatus.mergeArray(status, items2);
        }
      }
      get items() {
        return this._def.items;
      }
      rest(rest) {
        return new _ZodTuple({
          ...this._def,
          rest
        });
      }
    };
    ZodTuple.create = (schemas, params) => {
      if (!Array.isArray(schemas)) {
        throw new Error("You must pass an array of schemas to z.tuple([ ... ])");
      }
      return new ZodTuple({
        items: schemas,
        typeName: ZodFirstPartyTypeKind.ZodTuple,
        rest: null,
        ...processCreateParams(params)
      });
    };
    ZodRecord$1 = class ZodRecord extends ZodType$1 {
      get keySchema() {
        return this._def.keyType;
      }
      get valueSchema() {
        return this._def.valueType;
      }
      _parse(input) {
        const { status, ctx } = this._processInputParams(input);
        if (ctx.parsedType !== ZodParsedType.object) {
          addIssueToContext(ctx, {
            code: ZodIssueCode.invalid_type,
            expected: ZodParsedType.object,
            received: ctx.parsedType
          });
          return INVALID;
        }
        const pairs = [];
        const keyType = this._def.keyType;
        const valueType = this._def.valueType;
        for (const key in ctx.data) {
          pairs.push({
            key: keyType._parse(new ParseInputLazyPath(ctx, key, ctx.path, key)),
            value: valueType._parse(new ParseInputLazyPath(ctx, ctx.data[key], ctx.path, key)),
            alwaysSet: key in ctx.data
          });
        }
        if (ctx.common.async) {
          return ParseStatus.mergeObjectAsync(status, pairs);
        } else {
          return ParseStatus.mergeObjectSync(status, pairs);
        }
      }
      get element() {
        return this._def.valueType;
      }
      static create(first2, second, third) {
        if (second instanceof ZodType$1) {
          return new ZodRecord({
            keyType: first2,
            valueType: second,
            typeName: ZodFirstPartyTypeKind.ZodRecord,
            ...processCreateParams(third)
          });
        }
        return new ZodRecord({
          keyType: ZodString$1.create(),
          valueType: first2,
          typeName: ZodFirstPartyTypeKind.ZodRecord,
          ...processCreateParams(second)
        });
      }
    };
    ZodMap = class extends ZodType$1 {
      get keySchema() {
        return this._def.keyType;
      }
      get valueSchema() {
        return this._def.valueType;
      }
      _parse(input) {
        const { status, ctx } = this._processInputParams(input);
        if (ctx.parsedType !== ZodParsedType.map) {
          addIssueToContext(ctx, {
            code: ZodIssueCode.invalid_type,
            expected: ZodParsedType.map,
            received: ctx.parsedType
          });
          return INVALID;
        }
        const keyType = this._def.keyType;
        const valueType = this._def.valueType;
        const pairs = [...ctx.data.entries()].map(([key, value], index2) => {
          return {
            key: keyType._parse(new ParseInputLazyPath(ctx, key, ctx.path, [index2, "key"])),
            value: valueType._parse(new ParseInputLazyPath(ctx, value, ctx.path, [index2, "value"]))
          };
        });
        if (ctx.common.async) {
          const finalMap = /* @__PURE__ */ new Map();
          return Promise.resolve().then(async () => {
            for (const pair of pairs) {
              const key = await pair.key;
              const value = await pair.value;
              if (key.status === "aborted" || value.status === "aborted") {
                return INVALID;
              }
              if (key.status === "dirty" || value.status === "dirty") {
                status.dirty();
              }
              finalMap.set(key.value, value.value);
            }
            return { status: status.value, value: finalMap };
          });
        } else {
          const finalMap = /* @__PURE__ */ new Map();
          for (const pair of pairs) {
            const key = pair.key;
            const value = pair.value;
            if (key.status === "aborted" || value.status === "aborted") {
              return INVALID;
            }
            if (key.status === "dirty" || value.status === "dirty") {
              status.dirty();
            }
            finalMap.set(key.value, value.value);
          }
          return { status: status.value, value: finalMap };
        }
      }
    };
    ZodMap.create = (keyType, valueType, params) => {
      return new ZodMap({
        valueType,
        keyType,
        typeName: ZodFirstPartyTypeKind.ZodMap,
        ...processCreateParams(params)
      });
    };
    ZodSet = class _ZodSet extends ZodType$1 {
      _parse(input) {
        const { status, ctx } = this._processInputParams(input);
        if (ctx.parsedType !== ZodParsedType.set) {
          addIssueToContext(ctx, {
            code: ZodIssueCode.invalid_type,
            expected: ZodParsedType.set,
            received: ctx.parsedType
          });
          return INVALID;
        }
        const def2 = this._def;
        if (def2.minSize !== null) {
          if (ctx.data.size < def2.minSize.value) {
            addIssueToContext(ctx, {
              code: ZodIssueCode.too_small,
              minimum: def2.minSize.value,
              type: "set",
              inclusive: true,
              exact: false,
              message: def2.minSize.message
            });
            status.dirty();
          }
        }
        if (def2.maxSize !== null) {
          if (ctx.data.size > def2.maxSize.value) {
            addIssueToContext(ctx, {
              code: ZodIssueCode.too_big,
              maximum: def2.maxSize.value,
              type: "set",
              inclusive: true,
              exact: false,
              message: def2.maxSize.message
            });
            status.dirty();
          }
        }
        const valueType = this._def.valueType;
        function finalizeSet(elements2) {
          const parsedSet = /* @__PURE__ */ new Set();
          for (const element of elements2) {
            if (element.status === "aborted")
              return INVALID;
            if (element.status === "dirty")
              status.dirty();
            parsedSet.add(element.value);
          }
          return { status: status.value, value: parsedSet };
        }
        const elements = [...ctx.data.values()].map((item, i) => valueType._parse(new ParseInputLazyPath(ctx, item, ctx.path, i)));
        if (ctx.common.async) {
          return Promise.all(elements).then((elements2) => finalizeSet(elements2));
        } else {
          return finalizeSet(elements);
        }
      }
      min(minSize, message) {
        return new _ZodSet({
          ...this._def,
          minSize: { value: minSize, message: errorUtil.toString(message) }
        });
      }
      max(maxSize, message) {
        return new _ZodSet({
          ...this._def,
          maxSize: { value: maxSize, message: errorUtil.toString(message) }
        });
      }
      size(size, message) {
        return this.min(size, message).max(size, message);
      }
      nonempty(message) {
        return this.min(1, message);
      }
    };
    ZodSet.create = (valueType, params) => {
      return new ZodSet({
        valueType,
        minSize: null,
        maxSize: null,
        typeName: ZodFirstPartyTypeKind.ZodSet,
        ...processCreateParams(params)
      });
    };
    ZodFunction = class _ZodFunction extends ZodType$1 {
      constructor() {
        super(...arguments);
        this.validate = this.implement;
      }
      _parse(input) {
        const { ctx } = this._processInputParams(input);
        if (ctx.parsedType !== ZodParsedType.function) {
          addIssueToContext(ctx, {
            code: ZodIssueCode.invalid_type,
            expected: ZodParsedType.function,
            received: ctx.parsedType
          });
          return INVALID;
        }
        function makeArgsIssue(args2, error) {
          return makeIssue({
            data: args2,
            path: ctx.path,
            errorMaps: [ctx.common.contextualErrorMap, ctx.schemaErrorMap, getErrorMap(), errorMap].filter((x) => !!x),
            issueData: {
              code: ZodIssueCode.invalid_arguments,
              argumentsError: error
            }
          });
        }
        function makeReturnsIssue(returns, error) {
          return makeIssue({
            data: returns,
            path: ctx.path,
            errorMaps: [ctx.common.contextualErrorMap, ctx.schemaErrorMap, getErrorMap(), errorMap].filter((x) => !!x),
            issueData: {
              code: ZodIssueCode.invalid_return_type,
              returnTypeError: error
            }
          });
        }
        const params = { errorMap: ctx.common.contextualErrorMap };
        const fn = ctx.data;
        if (this._def.returns instanceof ZodPromise) {
          const me = this;
          return OK(async function(...args2) {
            const error = new ZodError([]);
            const parsedArgs = await me._def.args.parseAsync(args2, params).catch((e) => {
              error.addIssue(makeArgsIssue(args2, e));
              throw error;
            });
            const result = await Reflect.apply(fn, this, parsedArgs);
            const parsedReturns = await me._def.returns._def.type.parseAsync(result, params).catch((e) => {
              error.addIssue(makeReturnsIssue(result, e));
              throw error;
            });
            return parsedReturns;
          });
        } else {
          const me = this;
          return OK(function(...args2) {
            const parsedArgs = me._def.args.safeParse(args2, params);
            if (!parsedArgs.success) {
              throw new ZodError([makeArgsIssue(args2, parsedArgs.error)]);
            }
            const result = Reflect.apply(fn, this, parsedArgs.data);
            const parsedReturns = me._def.returns.safeParse(result, params);
            if (!parsedReturns.success) {
              throw new ZodError([makeReturnsIssue(result, parsedReturns.error)]);
            }
            return parsedReturns.data;
          });
        }
      }
      parameters() {
        return this._def.args;
      }
      returnType() {
        return this._def.returns;
      }
      args(...items2) {
        return new _ZodFunction({
          ...this._def,
          args: ZodTuple.create(items2).rest(ZodUnknown$1.create())
        });
      }
      returns(returnType) {
        return new _ZodFunction({
          ...this._def,
          returns: returnType
        });
      }
      implement(func) {
        const validatedFunc = this.parse(func);
        return validatedFunc;
      }
      strictImplement(func) {
        const validatedFunc = this.parse(func);
        return validatedFunc;
      }
      static create(args2, returns, params) {
        return new _ZodFunction({
          args: args2 ? args2 : ZodTuple.create([]).rest(ZodUnknown$1.create()),
          returns: returns || ZodUnknown$1.create(),
          typeName: ZodFirstPartyTypeKind.ZodFunction,
          ...processCreateParams(params)
        });
      }
    };
    ZodLazy = class extends ZodType$1 {
      get schema() {
        return this._def.getter();
      }
      _parse(input) {
        const { ctx } = this._processInputParams(input);
        const lazySchema = this._def.getter();
        return lazySchema._parse({ data: ctx.data, path: ctx.path, parent: ctx });
      }
    };
    ZodLazy.create = (getter, params) => {
      return new ZodLazy({
        getter,
        typeName: ZodFirstPartyTypeKind.ZodLazy,
        ...processCreateParams(params)
      });
    };
    ZodLiteral$1 = class ZodLiteral extends ZodType$1 {
      _parse(input) {
        if (input.data !== this._def.value) {
          const ctx = this._getOrReturnCtx(input);
          addIssueToContext(ctx, {
            received: ctx.data,
            code: ZodIssueCode.invalid_literal,
            expected: this._def.value
          });
          return INVALID;
        }
        return { status: "valid", value: input.data };
      }
      get value() {
        return this._def.value;
      }
    };
    ZodLiteral$1.create = (value, params) => {
      return new ZodLiteral$1({
        value,
        typeName: ZodFirstPartyTypeKind.ZodLiteral,
        ...processCreateParams(params)
      });
    };
    ZodEnum$1 = class ZodEnum extends ZodType$1 {
      _parse(input) {
        if (typeof input.data !== "string") {
          const ctx = this._getOrReturnCtx(input);
          const expectedValues = this._def.values;
          addIssueToContext(ctx, {
            expected: util$5.joinValues(expectedValues),
            received: ctx.parsedType,
            code: ZodIssueCode.invalid_type
          });
          return INVALID;
        }
        if (!this._cache) {
          this._cache = new Set(this._def.values);
        }
        if (!this._cache.has(input.data)) {
          const ctx = this._getOrReturnCtx(input);
          const expectedValues = this._def.values;
          addIssueToContext(ctx, {
            received: ctx.data,
            code: ZodIssueCode.invalid_enum_value,
            options: expectedValues
          });
          return INVALID;
        }
        return OK(input.data);
      }
      get options() {
        return this._def.values;
      }
      get enum() {
        const enumValues = {};
        for (const val of this._def.values) {
          enumValues[val] = val;
        }
        return enumValues;
      }
      get Values() {
        const enumValues = {};
        for (const val of this._def.values) {
          enumValues[val] = val;
        }
        return enumValues;
      }
      get Enum() {
        const enumValues = {};
        for (const val of this._def.values) {
          enumValues[val] = val;
        }
        return enumValues;
      }
      extract(values, newDef = this._def) {
        return ZodEnum.create(values, {
          ...this._def,
          ...newDef
        });
      }
      exclude(values, newDef = this._def) {
        return ZodEnum.create(this.options.filter((opt) => !values.includes(opt)), {
          ...this._def,
          ...newDef
        });
      }
    };
    ZodEnum$1.create = createZodEnum;
    ZodNativeEnum = class extends ZodType$1 {
      _parse(input) {
        const nativeEnumValues = util$5.getValidEnumValues(this._def.values);
        const ctx = this._getOrReturnCtx(input);
        if (ctx.parsedType !== ZodParsedType.string && ctx.parsedType !== ZodParsedType.number) {
          const expectedValues = util$5.objectValues(nativeEnumValues);
          addIssueToContext(ctx, {
            expected: util$5.joinValues(expectedValues),
            received: ctx.parsedType,
            code: ZodIssueCode.invalid_type
          });
          return INVALID;
        }
        if (!this._cache) {
          this._cache = new Set(util$5.getValidEnumValues(this._def.values));
        }
        if (!this._cache.has(input.data)) {
          const expectedValues = util$5.objectValues(nativeEnumValues);
          addIssueToContext(ctx, {
            received: ctx.data,
            code: ZodIssueCode.invalid_enum_value,
            options: expectedValues
          });
          return INVALID;
        }
        return OK(input.data);
      }
      get enum() {
        return this._def.values;
      }
    };
    ZodNativeEnum.create = (values, params) => {
      return new ZodNativeEnum({
        values,
        typeName: ZodFirstPartyTypeKind.ZodNativeEnum,
        ...processCreateParams(params)
      });
    };
    ZodPromise = class extends ZodType$1 {
      unwrap() {
        return this._def.type;
      }
      _parse(input) {
        const { ctx } = this._processInputParams(input);
        if (ctx.parsedType !== ZodParsedType.promise && ctx.common.async === false) {
          addIssueToContext(ctx, {
            code: ZodIssueCode.invalid_type,
            expected: ZodParsedType.promise,
            received: ctx.parsedType
          });
          return INVALID;
        }
        const promisified = ctx.parsedType === ZodParsedType.promise ? ctx.data : Promise.resolve(ctx.data);
        return OK(promisified.then((data32) => {
          return this._def.type.parseAsync(data32, {
            path: ctx.path,
            errorMap: ctx.common.contextualErrorMap
          });
        }));
      }
    };
    ZodPromise.create = (schema, params) => {
      return new ZodPromise({
        type: schema,
        typeName: ZodFirstPartyTypeKind.ZodPromise,
        ...processCreateParams(params)
      });
    };
    ZodEffects = class extends ZodType$1 {
      innerType() {
        return this._def.schema;
      }
      sourceType() {
        return this._def.schema._def.typeName === ZodFirstPartyTypeKind.ZodEffects ? this._def.schema.sourceType() : this._def.schema;
      }
      _parse(input) {
        const { status, ctx } = this._processInputParams(input);
        const effect = this._def.effect || null;
        const checkCtx = {
          addIssue: (arg) => {
            addIssueToContext(ctx, arg);
            if (arg.fatal) {
              status.abort();
            } else {
              status.dirty();
            }
          },
          get path() {
            return ctx.path;
          }
        };
        checkCtx.addIssue = checkCtx.addIssue.bind(checkCtx);
        if (effect.type === "preprocess") {
          const processed = effect.transform(ctx.data, checkCtx);
          if (ctx.common.async) {
            return Promise.resolve(processed).then(async (processed2) => {
              if (status.value === "aborted")
                return INVALID;
              const result = await this._def.schema._parseAsync({
                data: processed2,
                path: ctx.path,
                parent: ctx
              });
              if (result.status === "aborted")
                return INVALID;
              if (result.status === "dirty")
                return DIRTY(result.value);
              if (status.value === "dirty")
                return DIRTY(result.value);
              return result;
            });
          } else {
            if (status.value === "aborted")
              return INVALID;
            const result = this._def.schema._parseSync({
              data: processed,
              path: ctx.path,
              parent: ctx
            });
            if (result.status === "aborted")
              return INVALID;
            if (result.status === "dirty")
              return DIRTY(result.value);
            if (status.value === "dirty")
              return DIRTY(result.value);
            return result;
          }
        }
        if (effect.type === "refinement") {
          const executeRefinement = (acc) => {
            const result = effect.refinement(acc, checkCtx);
            if (ctx.common.async) {
              return Promise.resolve(result);
            }
            if (result instanceof Promise) {
              throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");
            }
            return acc;
          };
          if (ctx.common.async === false) {
            const inner = this._def.schema._parseSync({
              data: ctx.data,
              path: ctx.path,
              parent: ctx
            });
            if (inner.status === "aborted")
              return INVALID;
            if (inner.status === "dirty")
              status.dirty();
            executeRefinement(inner.value);
            return { status: status.value, value: inner.value };
          } else {
            return this._def.schema._parseAsync({ data: ctx.data, path: ctx.path, parent: ctx }).then((inner) => {
              if (inner.status === "aborted")
                return INVALID;
              if (inner.status === "dirty")
                status.dirty();
              return executeRefinement(inner.value).then(() => {
                return { status: status.value, value: inner.value };
              });
            });
          }
        }
        if (effect.type === "transform") {
          if (ctx.common.async === false) {
            const base = this._def.schema._parseSync({
              data: ctx.data,
              path: ctx.path,
              parent: ctx
            });
            if (!isValid$1(base))
              return INVALID;
            const result = effect.transform(base.value, checkCtx);
            if (result instanceof Promise) {
              throw new Error(`Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.`);
            }
            return { status: status.value, value: result };
          } else {
            return this._def.schema._parseAsync({ data: ctx.data, path: ctx.path, parent: ctx }).then((base) => {
              if (!isValid$1(base))
                return INVALID;
              return Promise.resolve(effect.transform(base.value, checkCtx)).then((result) => ({
                status: status.value,
                value: result
              }));
            });
          }
        }
        util$5.assertNever(effect);
      }
    };
    ZodEffects.create = (schema, effect, params) => {
      return new ZodEffects({
        schema,
        typeName: ZodFirstPartyTypeKind.ZodEffects,
        effect,
        ...processCreateParams(params)
      });
    };
    ZodEffects.createWithPreprocess = (preprocess2, schema, params) => {
      return new ZodEffects({
        schema,
        effect: { type: "preprocess", transform: preprocess2 },
        typeName: ZodFirstPartyTypeKind.ZodEffects,
        ...processCreateParams(params)
      });
    };
    ZodOptional$1 = class ZodOptional extends ZodType$1 {
      _parse(input) {
        const parsedType = this._getType(input);
        if (parsedType === ZodParsedType.undefined) {
          return OK(void 0);
        }
        return this._def.innerType._parse(input);
      }
      unwrap() {
        return this._def.innerType;
      }
    };
    ZodOptional$1.create = (type2, params) => {
      return new ZodOptional$1({
        innerType: type2,
        typeName: ZodFirstPartyTypeKind.ZodOptional,
        ...processCreateParams(params)
      });
    };
    ZodNullable$1 = class ZodNullable extends ZodType$1 {
      _parse(input) {
        const parsedType = this._getType(input);
        if (parsedType === ZodParsedType.null) {
          return OK(null);
        }
        return this._def.innerType._parse(input);
      }
      unwrap() {
        return this._def.innerType;
      }
    };
    ZodNullable$1.create = (type2, params) => {
      return new ZodNullable$1({
        innerType: type2,
        typeName: ZodFirstPartyTypeKind.ZodNullable,
        ...processCreateParams(params)
      });
    };
    ZodDefault$1 = class ZodDefault extends ZodType$1 {
      _parse(input) {
        const { ctx } = this._processInputParams(input);
        let data32 = ctx.data;
        if (ctx.parsedType === ZodParsedType.undefined) {
          data32 = this._def.defaultValue();
        }
        return this._def.innerType._parse({
          data: data32,
          path: ctx.path,
          parent: ctx
        });
      }
      removeDefault() {
        return this._def.innerType;
      }
    };
    ZodDefault$1.create = (type2, params) => {
      return new ZodDefault$1({
        innerType: type2,
        typeName: ZodFirstPartyTypeKind.ZodDefault,
        defaultValue: typeof params.default === "function" ? params.default : () => params.default,
        ...processCreateParams(params)
      });
    };
    ZodCatch$1 = class ZodCatch extends ZodType$1 {
      _parse(input) {
        const { ctx } = this._processInputParams(input);
        const newCtx = {
          ...ctx,
          common: {
            ...ctx.common,
            issues: []
          }
        };
        const result = this._def.innerType._parse({
          data: newCtx.data,
          path: newCtx.path,
          parent: {
            ...newCtx
          }
        });
        if (isAsync(result)) {
          return result.then((result2) => {
            return {
              status: "valid",
              value: result2.status === "valid" ? result2.value : this._def.catchValue({
                get error() {
                  return new ZodError(newCtx.common.issues);
                },
                input: newCtx.data
              })
            };
          });
        } else {
          return {
            status: "valid",
            value: result.status === "valid" ? result.value : this._def.catchValue({
              get error() {
                return new ZodError(newCtx.common.issues);
              },
              input: newCtx.data
            })
          };
        }
      }
      removeCatch() {
        return this._def.innerType;
      }
    };
    ZodCatch$1.create = (type2, params) => {
      return new ZodCatch$1({
        innerType: type2,
        typeName: ZodFirstPartyTypeKind.ZodCatch,
        catchValue: typeof params.catch === "function" ? params.catch : () => params.catch,
        ...processCreateParams(params)
      });
    };
    ZodNaN = class extends ZodType$1 {
      _parse(input) {
        const parsedType = this._getType(input);
        if (parsedType !== ZodParsedType.nan) {
          const ctx = this._getOrReturnCtx(input);
          addIssueToContext(ctx, {
            code: ZodIssueCode.invalid_type,
            expected: ZodParsedType.nan,
            received: ctx.parsedType
          });
          return INVALID;
        }
        return { status: "valid", value: input.data };
      }
    };
    ZodNaN.create = (params) => {
      return new ZodNaN({
        typeName: ZodFirstPartyTypeKind.ZodNaN,
        ...processCreateParams(params)
      });
    };
    BRAND = Symbol("zod_brand");
    ZodBranded = class extends ZodType$1 {
      _parse(input) {
        const { ctx } = this._processInputParams(input);
        const data32 = ctx.data;
        return this._def.type._parse({
          data: data32,
          path: ctx.path,
          parent: ctx
        });
      }
      unwrap() {
        return this._def.type;
      }
    };
    ZodPipeline = class _ZodPipeline extends ZodType$1 {
      _parse(input) {
        const { status, ctx } = this._processInputParams(input);
        if (ctx.common.async) {
          const handleAsync = async () => {
            const inResult = await this._def.in._parseAsync({
              data: ctx.data,
              path: ctx.path,
              parent: ctx
            });
            if (inResult.status === "aborted")
              return INVALID;
            if (inResult.status === "dirty") {
              status.dirty();
              return DIRTY(inResult.value);
            } else {
              return this._def.out._parseAsync({
                data: inResult.value,
                path: ctx.path,
                parent: ctx
              });
            }
          };
          return handleAsync();
        } else {
          const inResult = this._def.in._parseSync({
            data: ctx.data,
            path: ctx.path,
            parent: ctx
          });
          if (inResult.status === "aborted")
            return INVALID;
          if (inResult.status === "dirty") {
            status.dirty();
            return {
              status: "dirty",
              value: inResult.value
            };
          } else {
            return this._def.out._parseSync({
              data: inResult.value,
              path: ctx.path,
              parent: ctx
            });
          }
        }
      }
      static create(a, b) {
        return new _ZodPipeline({
          in: a,
          out: b,
          typeName: ZodFirstPartyTypeKind.ZodPipeline
        });
      }
    };
    ZodReadonly$1 = class ZodReadonly extends ZodType$1 {
      _parse(input) {
        const result = this._def.innerType._parse(input);
        const freeze = (data32) => {
          if (isValid$1(data32)) {
            data32.value = Object.freeze(data32.value);
          }
          return data32;
        };
        return isAsync(result) ? result.then((data32) => freeze(data32)) : freeze(result);
      }
      unwrap() {
        return this._def.innerType;
      }
    };
    ZodReadonly$1.create = (type2, params) => {
      return new ZodReadonly$1({
        innerType: type2,
        typeName: ZodFirstPartyTypeKind.ZodReadonly,
        ...processCreateParams(params)
      });
    };
    late = {
      object: ZodObject$1.lazycreate
    };
    (function(ZodFirstPartyTypeKind2) {
      ZodFirstPartyTypeKind2["ZodString"] = "ZodString";
      ZodFirstPartyTypeKind2["ZodNumber"] = "ZodNumber";
      ZodFirstPartyTypeKind2["ZodNaN"] = "ZodNaN";
      ZodFirstPartyTypeKind2["ZodBigInt"] = "ZodBigInt";
      ZodFirstPartyTypeKind2["ZodBoolean"] = "ZodBoolean";
      ZodFirstPartyTypeKind2["ZodDate"] = "ZodDate";
      ZodFirstPartyTypeKind2["ZodSymbol"] = "ZodSymbol";
      ZodFirstPartyTypeKind2["ZodUndefined"] = "ZodUndefined";
      ZodFirstPartyTypeKind2["ZodNull"] = "ZodNull";
      ZodFirstPartyTypeKind2["ZodAny"] = "ZodAny";
      ZodFirstPartyTypeKind2["ZodUnknown"] = "ZodUnknown";
      ZodFirstPartyTypeKind2["ZodNever"] = "ZodNever";
      ZodFirstPartyTypeKind2["ZodVoid"] = "ZodVoid";
      ZodFirstPartyTypeKind2["ZodArray"] = "ZodArray";
      ZodFirstPartyTypeKind2["ZodObject"] = "ZodObject";
      ZodFirstPartyTypeKind2["ZodUnion"] = "ZodUnion";
      ZodFirstPartyTypeKind2["ZodDiscriminatedUnion"] = "ZodDiscriminatedUnion";
      ZodFirstPartyTypeKind2["ZodIntersection"] = "ZodIntersection";
      ZodFirstPartyTypeKind2["ZodTuple"] = "ZodTuple";
      ZodFirstPartyTypeKind2["ZodRecord"] = "ZodRecord";
      ZodFirstPartyTypeKind2["ZodMap"] = "ZodMap";
      ZodFirstPartyTypeKind2["ZodSet"] = "ZodSet";
      ZodFirstPartyTypeKind2["ZodFunction"] = "ZodFunction";
      ZodFirstPartyTypeKind2["ZodLazy"] = "ZodLazy";
      ZodFirstPartyTypeKind2["ZodLiteral"] = "ZodLiteral";
      ZodFirstPartyTypeKind2["ZodEnum"] = "ZodEnum";
      ZodFirstPartyTypeKind2["ZodEffects"] = "ZodEffects";
      ZodFirstPartyTypeKind2["ZodNativeEnum"] = "ZodNativeEnum";
      ZodFirstPartyTypeKind2["ZodOptional"] = "ZodOptional";
      ZodFirstPartyTypeKind2["ZodNullable"] = "ZodNullable";
      ZodFirstPartyTypeKind2["ZodDefault"] = "ZodDefault";
      ZodFirstPartyTypeKind2["ZodCatch"] = "ZodCatch";
      ZodFirstPartyTypeKind2["ZodPromise"] = "ZodPromise";
      ZodFirstPartyTypeKind2["ZodBranded"] = "ZodBranded";
      ZodFirstPartyTypeKind2["ZodPipeline"] = "ZodPipeline";
      ZodFirstPartyTypeKind2["ZodReadonly"] = "ZodReadonly";
    })(ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {}));
    instanceOfType = (cls, params = {
      message: `Input not instance of ${cls.name}`
    }) => custom$1((data32) => data32 instanceof cls, params);
    stringType = ZodString$1.create;
    numberType = ZodNumber$1.create;
    nanType = ZodNaN.create;
    bigIntType = ZodBigInt$1.create;
    booleanType = ZodBoolean$1.create;
    dateType = ZodDate.create;
    symbolType = ZodSymbol.create;
    undefinedType = ZodUndefined.create;
    nullType = ZodNull$1.create;
    anyType = ZodAny.create;
    unknownType = ZodUnknown$1.create;
    neverType = ZodNever$1.create;
    voidType = ZodVoid.create;
    arrayType = ZodArray$1.create;
    objectType = ZodObject$1.create;
    strictObjectType = ZodObject$1.strictCreate;
    unionType = ZodUnion$1.create;
    discriminatedUnionType = ZodDiscriminatedUnion$1.create;
    intersectionType = ZodIntersection$1.create;
    tupleType = ZodTuple.create;
    recordType = ZodRecord$1.create;
    mapType = ZodMap.create;
    setType = ZodSet.create;
    functionType = ZodFunction.create;
    lazyType = ZodLazy.create;
    literalType = ZodLiteral$1.create;
    enumType = ZodEnum$1.create;
    nativeEnumType = ZodNativeEnum.create;
    promiseType = ZodPromise.create;
    effectsType = ZodEffects.create;
    optionalType = ZodOptional$1.create;
    nullableType = ZodNullable$1.create;
    preprocessType = ZodEffects.createWithPreprocess;
    pipelineType = ZodPipeline.create;
    ostring = () => stringType().optional();
    onumber = () => numberType().optional();
    oboolean = () => booleanType().optional();
    coerce = {
      string: (arg) => ZodString$1.create({ ...arg, coerce: true }),
      number: (arg) => ZodNumber$1.create({ ...arg, coerce: true }),
      boolean: (arg) => ZodBoolean$1.create({
        ...arg,
        coerce: true
      }),
      bigint: (arg) => ZodBigInt$1.create({ ...arg, coerce: true }),
      date: (arg) => ZodDate.create({ ...arg, coerce: true })
    };
    NEVER$1 = INVALID;
    z = /* @__PURE__ */ Object.freeze({
      __proto__: null,
      BRAND,
      DIRTY,
      EMPTY_PATH,
      INVALID,
      NEVER: NEVER$1,
      OK,
      ParseStatus,
      Schema: ZodType$1,
      ZodAny,
      ZodArray: ZodArray$1,
      ZodBigInt: ZodBigInt$1,
      ZodBoolean: ZodBoolean$1,
      ZodBranded,
      ZodCatch: ZodCatch$1,
      ZodDate,
      ZodDefault: ZodDefault$1,
      ZodDiscriminatedUnion: ZodDiscriminatedUnion$1,
      ZodEffects,
      ZodEnum: ZodEnum$1,
      ZodError,
      get ZodFirstPartyTypeKind() {
        return ZodFirstPartyTypeKind;
      },
      ZodFunction,
      ZodIntersection: ZodIntersection$1,
      ZodIssueCode,
      ZodLazy,
      ZodLiteral: ZodLiteral$1,
      ZodMap,
      ZodNaN,
      ZodNativeEnum,
      ZodNever: ZodNever$1,
      ZodNull: ZodNull$1,
      ZodNullable: ZodNullable$1,
      ZodNumber: ZodNumber$1,
      ZodObject: ZodObject$1,
      ZodOptional: ZodOptional$1,
      ZodParsedType,
      ZodPipeline,
      ZodPromise,
      ZodReadonly: ZodReadonly$1,
      ZodRecord: ZodRecord$1,
      ZodSchema: ZodType$1,
      ZodSet,
      ZodString: ZodString$1,
      ZodSymbol,
      ZodTransformer: ZodEffects,
      ZodTuple,
      ZodType: ZodType$1,
      ZodUndefined,
      ZodUnion: ZodUnion$1,
      ZodUnknown: ZodUnknown$1,
      ZodVoid,
      addIssueToContext,
      any: anyType,
      array: arrayType,
      bigint: bigIntType,
      boolean: booleanType,
      coerce,
      custom: custom$1,
      date: dateType,
      datetimeRegex,
      defaultErrorMap: errorMap,
      discriminatedUnion: discriminatedUnionType,
      effect: effectsType,
      enum: enumType,
      function: functionType,
      getErrorMap,
      getParsedType,
      instanceof: instanceOfType,
      intersection: intersectionType,
      isAborted,
      isAsync,
      isDirty,
      isValid: isValid$1,
      late,
      lazy: lazyType,
      literal: literalType,
      makeIssue,
      map: mapType,
      nan: nanType,
      nativeEnum: nativeEnumType,
      never: neverType,
      null: nullType,
      nullable: nullableType,
      number: numberType,
      object: objectType,
      get objectUtil() {
        return objectUtil;
      },
      oboolean,
      onumber,
      optional: optionalType,
      ostring,
      pipeline: pipelineType,
      preprocess: preprocessType,
      promise: promiseType,
      quotelessJson,
      record: recordType,
      set: setType,
      setErrorMap,
      strictObject: strictObjectType,
      string: stringType,
      symbol: symbolType,
      transformer: effectsType,
      tuple: tupleType,
      undefined: undefinedType,
      union: unionType,
      unknown: unknownType,
      get util() {
        return util$5;
      },
      void: voidType
    });
    $ZodAsyncError = class extends Error {
      constructor() {
        super(`Encountered Promise during synchronous parse. Use .parseAsync() instead.`);
      }
    };
    globalConfig = {};
    captureStackTrace = Error.captureStackTrace ? Error.captureStackTrace : (..._args) => {
    };
    allowsEval = cached(() => {
      if (typeof navigator !== "undefined" && navigator?.userAgent?.includes("Cloudflare")) {
        return false;
      }
      try {
        const F = Function;
        new F("");
        return true;
      } catch (_) {
        return false;
      }
    });
    propertyKeyTypes = /* @__PURE__ */ new Set(["string", "number", "symbol"]);
    primitiveTypes = /* @__PURE__ */ new Set(["string", "number", "bigint", "boolean", "symbol", "undefined"]);
    NUMBER_FORMAT_RANGES = {
      safeint: [Number.MIN_SAFE_INTEGER, Number.MAX_SAFE_INTEGER],
      int32: [-2147483648, 2147483647],
      uint32: [0, 4294967295],
      float32: [-34028234663852886e22, 34028234663852886e22],
      float64: [-Number.MAX_VALUE, Number.MAX_VALUE]
    };
    BIGINT_FORMAT_RANGES = {
      int64: [BigInt("-9223372036854775808"), BigInt("9223372036854775807")],
      uint64: [BigInt(0), BigInt("18446744073709551615")]
    };
    initializer$1 = (inst, def2) => {
      inst.name = "$ZodError";
      Object.defineProperty(inst, "_zod", {
        value: inst._zod,
        enumerable: false
      });
      Object.defineProperty(inst, "issues", {
        value: def2,
        enumerable: false
      });
      Object.defineProperty(inst, "message", {
        get() {
          return JSON.stringify(def2, jsonStringifyReplacer, 2);
        },
        enumerable: true
      });
      Object.defineProperty(inst, "toString", {
        value: () => inst.message,
        enumerable: false
      });
    };
    $ZodError = $constructor("$ZodError", initializer$1);
    $ZodRealError = $constructor("$ZodError", initializer$1, { Parent: Error });
    _parse = (_Err) => (schema, value, _ctx, _params) => {
      const ctx = _ctx ? Object.assign(_ctx, { async: false }) : { async: false };
      const result = schema._zod.run({ value, issues: [] }, ctx);
      if (result instanceof Promise) {
        throw new $ZodAsyncError();
      }
      if (result.issues.length) {
        const e = new (_params?.Err ?? _Err)(result.issues.map((iss) => finalizeIssue(iss, ctx, config$3())));
        captureStackTrace(e, _params?.callee);
        throw e;
      }
      return result.value;
    };
    parse$4 = _parse($ZodRealError);
    _parseAsync = (_Err) => async (schema, value, _ctx, params) => {
      const ctx = _ctx ? Object.assign(_ctx, { async: true }) : { async: true };
      let result = schema._zod.run({ value, issues: [] }, ctx);
      if (result instanceof Promise)
        result = await result;
      if (result.issues.length) {
        const e = new (params?.Err ?? _Err)(result.issues.map((iss) => finalizeIssue(iss, ctx, config$3())));
        captureStackTrace(e, params?.callee);
        throw e;
      }
      return result.value;
    };
    parseAsync$1 = _parseAsync($ZodRealError);
    _safeParse = (_Err) => (schema, value, _ctx) => {
      const ctx = _ctx ? { ..._ctx, async: false } : { async: false };
      const result = schema._zod.run({ value, issues: [] }, ctx);
      if (result instanceof Promise) {
        throw new $ZodAsyncError();
      }
      return result.issues.length ? {
        success: false,
        error: new (_Err ?? $ZodError)(result.issues.map((iss) => finalizeIssue(iss, ctx, config$3())))
      } : { success: true, data: result.value };
    };
    safeParse$2 = _safeParse($ZodRealError);
    _safeParseAsync = (_Err) => async (schema, value, _ctx) => {
      const ctx = _ctx ? Object.assign(_ctx, { async: true }) : { async: true };
      let result = schema._zod.run({ value, issues: [] }, ctx);
      if (result instanceof Promise)
        result = await result;
      return result.issues.length ? {
        success: false,
        error: new _Err(result.issues.map((iss) => finalizeIssue(iss, ctx, config$3())))
      } : { success: true, data: result.value };
    };
    safeParseAsync$2 = _safeParseAsync($ZodRealError);
    cuid = /^[cC][^\s-]{8,}$/;
    cuid2 = /^[0-9a-z]+$/;
    ulid = /^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/;
    xid = /^[0-9a-vA-V]{20}$/;
    ksuid = /^[A-Za-z0-9]{27}$/;
    nanoid = /^[a-zA-Z0-9_-]{21}$/;
    duration$1 = /^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/;
    guid = /^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/;
    uuid = (version3) => {
      if (!version3)
        return /^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$/;
      return new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${version3}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`);
    };
    email = /^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/;
    _emoji$1 = `^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$`;
    ipv4$1 = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/;
    ipv6$1 = /^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})$/;
    cidrv4 = /^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/;
    cidrv6 = /^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/;
    base64$1 = /^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/;
    base64url = /^[A-Za-z0-9_-]*$/;
    hostname = /^([a-zA-Z0-9-]+\.)*[a-zA-Z0-9-]+$/;
    e164 = /^\+(?:[0-9]){6,14}[0-9]$/;
    dateSource = `(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))`;
    date$1 = new RegExp(`^${dateSource}$`);
    string$1 = (params) => {
      const regex2 = params ? `[\\s\\S]{${params?.minimum ?? 0},${params?.maximum ?? ""}}` : `[\\s\\S]*`;
      return new RegExp(`^${regex2}$`);
    };
    bigint = /^\d+n?$/;
    integer = /^\d+$/;
    number$1 = /^-?\d+(?:\.\d+)?/i;
    boolean$1 = /true|false/i;
    _null$2 = /null/i;
    _undefined = /undefined/i;
    lowercase = /^[^A-Z]*$/;
    uppercase = /^[^a-z]*$/;
    $ZodCheck = $constructor("$ZodCheck", (inst, def2) => {
      var _a4;
      inst._zod ?? (inst._zod = {});
      inst._zod.def = def2;
      (_a4 = inst._zod).onattach ?? (_a4.onattach = []);
    });
    numericOriginMap = {
      number: "number",
      bigint: "bigint",
      object: "date"
    };
    $ZodCheckLessThan = $constructor("$ZodCheckLessThan", (inst, def2) => {
      $ZodCheck.init(inst, def2);
      const origin = numericOriginMap[typeof def2.value];
      inst._zod.onattach.push((inst2) => {
        const bag = inst2._zod.bag;
        const curr = (def2.inclusive ? bag.maximum : bag.exclusiveMaximum) ?? Number.POSITIVE_INFINITY;
        if (def2.value < curr) {
          if (def2.inclusive)
            bag.maximum = def2.value;
          else
            bag.exclusiveMaximum = def2.value;
        }
      });
      inst._zod.check = (payload) => {
        if (def2.inclusive ? payload.value <= def2.value : payload.value < def2.value) {
          return;
        }
        payload.issues.push({
          origin,
          code: "too_big",
          maximum: def2.value,
          input: payload.value,
          inclusive: def2.inclusive,
          inst,
          continue: !def2.abort
        });
      };
    });
    $ZodCheckGreaterThan = $constructor("$ZodCheckGreaterThan", (inst, def2) => {
      $ZodCheck.init(inst, def2);
      const origin = numericOriginMap[typeof def2.value];
      inst._zod.onattach.push((inst2) => {
        const bag = inst2._zod.bag;
        const curr = (def2.inclusive ? bag.minimum : bag.exclusiveMinimum) ?? Number.NEGATIVE_INFINITY;
        if (def2.value > curr) {
          if (def2.inclusive)
            bag.minimum = def2.value;
          else
            bag.exclusiveMinimum = def2.value;
        }
      });
      inst._zod.check = (payload) => {
        if (def2.inclusive ? payload.value >= def2.value : payload.value > def2.value) {
          return;
        }
        payload.issues.push({
          origin,
          code: "too_small",
          minimum: def2.value,
          input: payload.value,
          inclusive: def2.inclusive,
          inst,
          continue: !def2.abort
        });
      };
    });
    $ZodCheckMultipleOf = $constructor("$ZodCheckMultipleOf", (inst, def2) => {
      $ZodCheck.init(inst, def2);
      inst._zod.onattach.push((inst2) => {
        var _a4;
        (_a4 = inst2._zod.bag).multipleOf ?? (_a4.multipleOf = def2.value);
      });
      inst._zod.check = (payload) => {
        if (typeof payload.value !== typeof def2.value)
          throw new Error("Cannot mix number and bigint in multiple_of check.");
        const isMultiple = typeof payload.value === "bigint" ? payload.value % def2.value === BigInt(0) : floatSafeRemainder(payload.value, def2.value) === 0;
        if (isMultiple)
          return;
        payload.issues.push({
          origin: typeof payload.value,
          code: "not_multiple_of",
          divisor: def2.value,
          input: payload.value,
          inst,
          continue: !def2.abort
        });
      };
    });
    $ZodCheckNumberFormat = $constructor("$ZodCheckNumberFormat", (inst, def2) => {
      $ZodCheck.init(inst, def2);
      def2.format = def2.format || "float64";
      const isInt = def2.format?.includes("int");
      const origin = isInt ? "int" : "number";
      const [minimum, maximum] = NUMBER_FORMAT_RANGES[def2.format];
      inst._zod.onattach.push((inst2) => {
        const bag = inst2._zod.bag;
        bag.format = def2.format;
        bag.minimum = minimum;
        bag.maximum = maximum;
        if (isInt)
          bag.pattern = integer;
      });
      inst._zod.check = (payload) => {
        const input = payload.value;
        if (isInt) {
          if (!Number.isInteger(input)) {
            payload.issues.push({
              expected: origin,
              format: def2.format,
              code: "invalid_type",
              input,
              inst
            });
            return;
          }
          if (!Number.isSafeInteger(input)) {
            if (input > 0) {
              payload.issues.push({
                input,
                code: "too_big",
                maximum: Number.MAX_SAFE_INTEGER,
                note: "Integers must be within the safe integer range.",
                inst,
                origin,
                continue: !def2.abort
              });
            } else {
              payload.issues.push({
                input,
                code: "too_small",
                minimum: Number.MIN_SAFE_INTEGER,
                note: "Integers must be within the safe integer range.",
                inst,
                origin,
                continue: !def2.abort
              });
            }
            return;
          }
        }
        if (input < minimum) {
          payload.issues.push({
            origin: "number",
            input,
            code: "too_small",
            minimum,
            inclusive: true,
            inst,
            continue: !def2.abort
          });
        }
        if (input > maximum) {
          payload.issues.push({
            origin: "number",
            input,
            code: "too_big",
            maximum,
            inst
          });
        }
      };
    });
    $ZodCheckBigIntFormat = $constructor("$ZodCheckBigIntFormat", (inst, def2) => {
      $ZodCheck.init(inst, def2);
      const [minimum, maximum] = BIGINT_FORMAT_RANGES[def2.format];
      inst._zod.onattach.push((inst2) => {
        const bag = inst2._zod.bag;
        bag.format = def2.format;
        bag.minimum = minimum;
        bag.maximum = maximum;
      });
      inst._zod.check = (payload) => {
        const input = payload.value;
        if (input < minimum) {
          payload.issues.push({
            origin: "bigint",
            input,
            code: "too_small",
            minimum,
            inclusive: true,
            inst,
            continue: !def2.abort
          });
        }
        if (input > maximum) {
          payload.issues.push({
            origin: "bigint",
            input,
            code: "too_big",
            maximum,
            inst
          });
        }
      };
    });
    $ZodCheckMaxSize = $constructor("$ZodCheckMaxSize", (inst, def2) => {
      var _a4;
      $ZodCheck.init(inst, def2);
      (_a4 = inst._zod.def).when ?? (_a4.when = (payload) => {
        const val = payload.value;
        return !nullish(val) && val.size !== void 0;
      });
      inst._zod.onattach.push((inst2) => {
        const curr = inst2._zod.bag.maximum ?? Number.POSITIVE_INFINITY;
        if (def2.maximum < curr)
          inst2._zod.bag.maximum = def2.maximum;
      });
      inst._zod.check = (payload) => {
        const input = payload.value;
        const size = input.size;
        if (size <= def2.maximum)
          return;
        payload.issues.push({
          origin: getSizableOrigin(input),
          code: "too_big",
          maximum: def2.maximum,
          input,
          inst,
          continue: !def2.abort
        });
      };
    });
    $ZodCheckMinSize = $constructor("$ZodCheckMinSize", (inst, def2) => {
      var _a4;
      $ZodCheck.init(inst, def2);
      (_a4 = inst._zod.def).when ?? (_a4.when = (payload) => {
        const val = payload.value;
        return !nullish(val) && val.size !== void 0;
      });
      inst._zod.onattach.push((inst2) => {
        const curr = inst2._zod.bag.minimum ?? Number.NEGATIVE_INFINITY;
        if (def2.minimum > curr)
          inst2._zod.bag.minimum = def2.minimum;
      });
      inst._zod.check = (payload) => {
        const input = payload.value;
        const size = input.size;
        if (size >= def2.minimum)
          return;
        payload.issues.push({
          origin: getSizableOrigin(input),
          code: "too_small",
          minimum: def2.minimum,
          input,
          inst,
          continue: !def2.abort
        });
      };
    });
    $ZodCheckSizeEquals = $constructor("$ZodCheckSizeEquals", (inst, def2) => {
      var _a4;
      $ZodCheck.init(inst, def2);
      (_a4 = inst._zod.def).when ?? (_a4.when = (payload) => {
        const val = payload.value;
        return !nullish(val) && val.size !== void 0;
      });
      inst._zod.onattach.push((inst2) => {
        const bag = inst2._zod.bag;
        bag.minimum = def2.size;
        bag.maximum = def2.size;
        bag.size = def2.size;
      });
      inst._zod.check = (payload) => {
        const input = payload.value;
        const size = input.size;
        if (size === def2.size)
          return;
        const tooBig = size > def2.size;
        payload.issues.push({
          origin: getSizableOrigin(input),
          ...tooBig ? { code: "too_big", maximum: def2.size } : { code: "too_small", minimum: def2.size },
          inclusive: true,
          exact: true,
          input: payload.value,
          inst,
          continue: !def2.abort
        });
      };
    });
    $ZodCheckMaxLength = $constructor("$ZodCheckMaxLength", (inst, def2) => {
      var _a4;
      $ZodCheck.init(inst, def2);
      (_a4 = inst._zod.def).when ?? (_a4.when = (payload) => {
        const val = payload.value;
        return !nullish(val) && val.length !== void 0;
      });
      inst._zod.onattach.push((inst2) => {
        const curr = inst2._zod.bag.maximum ?? Number.POSITIVE_INFINITY;
        if (def2.maximum < curr)
          inst2._zod.bag.maximum = def2.maximum;
      });
      inst._zod.check = (payload) => {
        const input = payload.value;
        const length = input.length;
        if (length <= def2.maximum)
          return;
        const origin = getLengthableOrigin(input);
        payload.issues.push({
          origin,
          code: "too_big",
          maximum: def2.maximum,
          inclusive: true,
          input,
          inst,
          continue: !def2.abort
        });
      };
    });
    $ZodCheckMinLength = $constructor("$ZodCheckMinLength", (inst, def2) => {
      var _a4;
      $ZodCheck.init(inst, def2);
      (_a4 = inst._zod.def).when ?? (_a4.when = (payload) => {
        const val = payload.value;
        return !nullish(val) && val.length !== void 0;
      });
      inst._zod.onattach.push((inst2) => {
        const curr = inst2._zod.bag.minimum ?? Number.NEGATIVE_INFINITY;
        if (def2.minimum > curr)
          inst2._zod.bag.minimum = def2.minimum;
      });
      inst._zod.check = (payload) => {
        const input = payload.value;
        const length = input.length;
        if (length >= def2.minimum)
          return;
        const origin = getLengthableOrigin(input);
        payload.issues.push({
          origin,
          code: "too_small",
          minimum: def2.minimum,
          inclusive: true,
          input,
          inst,
          continue: !def2.abort
        });
      };
    });
    $ZodCheckLengthEquals = $constructor("$ZodCheckLengthEquals", (inst, def2) => {
      var _a4;
      $ZodCheck.init(inst, def2);
      (_a4 = inst._zod.def).when ?? (_a4.when = (payload) => {
        const val = payload.value;
        return !nullish(val) && val.length !== void 0;
      });
      inst._zod.onattach.push((inst2) => {
        const bag = inst2._zod.bag;
        bag.minimum = def2.length;
        bag.maximum = def2.length;
        bag.length = def2.length;
      });
      inst._zod.check = (payload) => {
        const input = payload.value;
        const length = input.length;
        if (length === def2.length)
          return;
        const origin = getLengthableOrigin(input);
        const tooBig = length > def2.length;
        payload.issues.push({
          origin,
          ...tooBig ? { code: "too_big", maximum: def2.length } : { code: "too_small", minimum: def2.length },
          inclusive: true,
          exact: true,
          input: payload.value,
          inst,
          continue: !def2.abort
        });
      };
    });
    $ZodCheckStringFormat = $constructor("$ZodCheckStringFormat", (inst, def2) => {
      var _a4, _b2;
      $ZodCheck.init(inst, def2);
      inst._zod.onattach.push((inst2) => {
        const bag = inst2._zod.bag;
        bag.format = def2.format;
        if (def2.pattern) {
          bag.patterns ?? (bag.patterns = /* @__PURE__ */ new Set());
          bag.patterns.add(def2.pattern);
        }
      });
      if (def2.pattern)
        (_a4 = inst._zod).check ?? (_a4.check = (payload) => {
          def2.pattern.lastIndex = 0;
          if (def2.pattern.test(payload.value))
            return;
          payload.issues.push({
            origin: "string",
            code: "invalid_format",
            format: def2.format,
            input: payload.value,
            ...def2.pattern ? { pattern: def2.pattern.toString() } : {},
            inst,
            continue: !def2.abort
          });
        });
      else
        (_b2 = inst._zod).check ?? (_b2.check = () => {
        });
    });
    $ZodCheckRegex = $constructor("$ZodCheckRegex", (inst, def2) => {
      $ZodCheckStringFormat.init(inst, def2);
      inst._zod.check = (payload) => {
        def2.pattern.lastIndex = 0;
        if (def2.pattern.test(payload.value))
          return;
        payload.issues.push({
          origin: "string",
          code: "invalid_format",
          format: "regex",
          input: payload.value,
          pattern: def2.pattern.toString(),
          inst,
          continue: !def2.abort
        });
      };
    });
    $ZodCheckLowerCase = $constructor("$ZodCheckLowerCase", (inst, def2) => {
      def2.pattern ?? (def2.pattern = lowercase);
      $ZodCheckStringFormat.init(inst, def2);
    });
    $ZodCheckUpperCase = $constructor("$ZodCheckUpperCase", (inst, def2) => {
      def2.pattern ?? (def2.pattern = uppercase);
      $ZodCheckStringFormat.init(inst, def2);
    });
    $ZodCheckIncludes = $constructor("$ZodCheckIncludes", (inst, def2) => {
      $ZodCheck.init(inst, def2);
      const escapedRegex = escapeRegex(def2.includes);
      const pattern2 = new RegExp(typeof def2.position === "number" ? `^.{${def2.position}}${escapedRegex}` : escapedRegex);
      def2.pattern = pattern2;
      inst._zod.onattach.push((inst2) => {
        const bag = inst2._zod.bag;
        bag.patterns ?? (bag.patterns = /* @__PURE__ */ new Set());
        bag.patterns.add(pattern2);
      });
      inst._zod.check = (payload) => {
        if (payload.value.includes(def2.includes, def2.position))
          return;
        payload.issues.push({
          origin: "string",
          code: "invalid_format",
          format: "includes",
          includes: def2.includes,
          input: payload.value,
          inst,
          continue: !def2.abort
        });
      };
    });
    $ZodCheckStartsWith = $constructor("$ZodCheckStartsWith", (inst, def2) => {
      $ZodCheck.init(inst, def2);
      const pattern2 = new RegExp(`^${escapeRegex(def2.prefix)}.*`);
      def2.pattern ?? (def2.pattern = pattern2);
      inst._zod.onattach.push((inst2) => {
        const bag = inst2._zod.bag;
        bag.patterns ?? (bag.patterns = /* @__PURE__ */ new Set());
        bag.patterns.add(pattern2);
      });
      inst._zod.check = (payload) => {
        if (payload.value.startsWith(def2.prefix))
          return;
        payload.issues.push({
          origin: "string",
          code: "invalid_format",
          format: "starts_with",
          prefix: def2.prefix,
          input: payload.value,
          inst,
          continue: !def2.abort
        });
      };
    });
    $ZodCheckEndsWith = $constructor("$ZodCheckEndsWith", (inst, def2) => {
      $ZodCheck.init(inst, def2);
      const pattern2 = new RegExp(`.*${escapeRegex(def2.suffix)}$`);
      def2.pattern ?? (def2.pattern = pattern2);
      inst._zod.onattach.push((inst2) => {
        const bag = inst2._zod.bag;
        bag.patterns ?? (bag.patterns = /* @__PURE__ */ new Set());
        bag.patterns.add(pattern2);
      });
      inst._zod.check = (payload) => {
        if (payload.value.endsWith(def2.suffix))
          return;
        payload.issues.push({
          origin: "string",
          code: "invalid_format",
          format: "ends_with",
          suffix: def2.suffix,
          input: payload.value,
          inst,
          continue: !def2.abort
        });
      };
    });
    $constructor("$ZodCheckProperty", (inst, def2) => {
      $ZodCheck.init(inst, def2);
      inst._zod.check = (payload) => {
        const result = def2.schema._zod.run({
          value: payload.value[def2.property],
          issues: []
        }, {});
        if (result instanceof Promise) {
          return result.then((result2) => handleCheckPropertyResult(result2, payload, def2.property));
        }
        handleCheckPropertyResult(result, payload, def2.property);
        return;
      };
    });
    $ZodCheckMimeType = $constructor("$ZodCheckMimeType", (inst, def2) => {
      $ZodCheck.init(inst, def2);
      const mimeSet = new Set(def2.mime);
      inst._zod.onattach.push((inst2) => {
        inst2._zod.bag.mime = def2.mime;
      });
      inst._zod.check = (payload) => {
        if (mimeSet.has(payload.value.type))
          return;
        payload.issues.push({
          code: "invalid_value",
          values: def2.mime,
          input: payload.value.type,
          inst
        });
      };
    });
    $ZodCheckOverwrite = $constructor("$ZodCheckOverwrite", (inst, def2) => {
      $ZodCheck.init(inst, def2);
      inst._zod.check = (payload) => {
        payload.value = def2.tx(payload.value);
      };
    });
    Doc = class {
      constructor(args2 = []) {
        this.content = [];
        this.indent = 0;
        if (this)
          this.args = args2;
      }
      indented(fn) {
        this.indent += 1;
        fn(this);
        this.indent -= 1;
      }
      write(arg) {
        if (typeof arg === "function") {
          arg(this, { execution: "sync" });
          arg(this, { execution: "async" });
          return;
        }
        const content = arg;
        const lines = content.split("\n").filter((x) => x);
        const minIndent = Math.min(...lines.map((x) => x.length - x.trimStart().length));
        const dedented = lines.map((x) => x.slice(minIndent)).map((x) => " ".repeat(this.indent * 2) + x);
        for (const line of dedented) {
          this.content.push(line);
        }
      }
      compile() {
        const F = Function;
        const args2 = this?.args;
        const content = this?.content ?? [``];
        const lines = [...content.map((x) => `  ${x}`)];
        return new F(...args2, lines.join("\n"));
      }
    };
    version$1 = {
      major: 4,
      minor: 0,
      patch: 0
    };
    $ZodType = $constructor("$ZodType", (inst, def2) => {
      var _a4;
      inst ?? (inst = {});
      inst._zod.def = def2;
      inst._zod.bag = inst._zod.bag || {};
      inst._zod.version = version$1;
      const checks = [...inst._zod.def.checks ?? []];
      if (inst._zod.traits.has("$ZodCheck")) {
        checks.unshift(inst);
      }
      for (const ch of checks) {
        for (const fn of ch._zod.onattach) {
          fn(inst);
        }
      }
      if (checks.length === 0) {
        (_a4 = inst._zod).deferred ?? (_a4.deferred = []);
        inst._zod.deferred?.push(() => {
          inst._zod.run = inst._zod.parse;
        });
      } else {
        const runChecks = (payload, checks2, ctx) => {
          let isAborted2 = aborted(payload);
          let asyncResult;
          for (const ch of checks2) {
            if (ch._zod.def.when) {
              const shouldRun = ch._zod.def.when(payload);
              if (!shouldRun)
                continue;
            } else if (isAborted2) {
              continue;
            }
            const currLen = payload.issues.length;
            const _ = ch._zod.check(payload);
            if (_ instanceof Promise && ctx?.async === false) {
              throw new $ZodAsyncError();
            }
            if (asyncResult || _ instanceof Promise) {
              asyncResult = (asyncResult ?? Promise.resolve()).then(async () => {
                await _;
                const nextLen = payload.issues.length;
                if (nextLen === currLen)
                  return;
                if (!isAborted2)
                  isAborted2 = aborted(payload, currLen);
              });
            } else {
              const nextLen = payload.issues.length;
              if (nextLen === currLen)
                continue;
              if (!isAborted2)
                isAborted2 = aborted(payload, currLen);
            }
          }
          if (asyncResult) {
            return asyncResult.then(() => {
              return payload;
            });
          }
          return payload;
        };
        inst._zod.run = (payload, ctx) => {
          const result = inst._zod.parse(payload, ctx);
          if (result instanceof Promise) {
            if (ctx.async === false)
              throw new $ZodAsyncError();
            return result.then((result2) => runChecks(result2, checks, ctx));
          }
          return runChecks(result, checks, ctx);
        };
      }
      inst["~standard"] = {
        validate: (value) => {
          try {
            const r = safeParse$2(inst, value);
            return r.success ? { value: r.data } : { issues: r.error?.issues };
          } catch (_) {
            return safeParseAsync$2(inst, value).then((r) => r.success ? { value: r.data } : { issues: r.error?.issues });
          }
        },
        vendor: "zod",
        version: 1
      };
    });
    $ZodString = $constructor("$ZodString", (inst, def2) => {
      $ZodType.init(inst, def2);
      inst._zod.pattern = [...inst?._zod.bag?.patterns ?? []].pop() ?? string$1(inst._zod.bag);
      inst._zod.parse = (payload, _) => {
        if (def2.coerce)
          try {
            payload.value = String(payload.value);
          } catch (_2) {
          }
        if (typeof payload.value === "string")
          return payload;
        payload.issues.push({
          expected: "string",
          code: "invalid_type",
          input: payload.value,
          inst
        });
        return payload;
      };
    });
    $ZodStringFormat = $constructor("$ZodStringFormat", (inst, def2) => {
      $ZodCheckStringFormat.init(inst, def2);
      $ZodString.init(inst, def2);
    });
    $ZodGUID = $constructor("$ZodGUID", (inst, def2) => {
      def2.pattern ?? (def2.pattern = guid);
      $ZodStringFormat.init(inst, def2);
    });
    $ZodUUID = $constructor("$ZodUUID", (inst, def2) => {
      if (def2.version) {
        const versionMap = {
          v1: 1,
          v2: 2,
          v3: 3,
          v4: 4,
          v5: 5,
          v6: 6,
          v7: 7,
          v8: 8
        };
        const v = versionMap[def2.version];
        if (v === void 0)
          throw new Error(`Invalid UUID version: "${def2.version}"`);
        def2.pattern ?? (def2.pattern = uuid(v));
      } else
        def2.pattern ?? (def2.pattern = uuid());
      $ZodStringFormat.init(inst, def2);
    });
    $ZodEmail = $constructor("$ZodEmail", (inst, def2) => {
      def2.pattern ?? (def2.pattern = email);
      $ZodStringFormat.init(inst, def2);
    });
    $ZodURL = $constructor("$ZodURL", (inst, def2) => {
      $ZodStringFormat.init(inst, def2);
      inst._zod.check = (payload) => {
        try {
          const orig = payload.value;
          const url = new URL(orig);
          const href = url.href;
          if (def2.hostname) {
            def2.hostname.lastIndex = 0;
            if (!def2.hostname.test(url.hostname)) {
              payload.issues.push({
                code: "invalid_format",
                format: "url",
                note: "Invalid hostname",
                pattern: hostname.source,
                input: payload.value,
                inst,
                continue: !def2.abort
              });
            }
          }
          if (def2.protocol) {
            def2.protocol.lastIndex = 0;
            if (!def2.protocol.test(url.protocol.endsWith(":") ? url.protocol.slice(0, -1) : url.protocol)) {
              payload.issues.push({
                code: "invalid_format",
                format: "url",
                note: "Invalid protocol",
                pattern: def2.protocol.source,
                input: payload.value,
                inst,
                continue: !def2.abort
              });
            }
          }
          if (!orig.endsWith("/") && href.endsWith("/")) {
            payload.value = href.slice(0, -1);
          } else {
            payload.value = href;
          }
          return;
        } catch (_) {
          payload.issues.push({
            code: "invalid_format",
            format: "url",
            input: payload.value,
            inst,
            continue: !def2.abort
          });
        }
      };
    });
    $ZodEmoji = $constructor("$ZodEmoji", (inst, def2) => {
      def2.pattern ?? (def2.pattern = emoji());
      $ZodStringFormat.init(inst, def2);
    });
    $ZodNanoID = $constructor("$ZodNanoID", (inst, def2) => {
      def2.pattern ?? (def2.pattern = nanoid);
      $ZodStringFormat.init(inst, def2);
    });
    $ZodCUID = $constructor("$ZodCUID", (inst, def2) => {
      def2.pattern ?? (def2.pattern = cuid);
      $ZodStringFormat.init(inst, def2);
    });
    $ZodCUID2 = $constructor("$ZodCUID2", (inst, def2) => {
      def2.pattern ?? (def2.pattern = cuid2);
      $ZodStringFormat.init(inst, def2);
    });
    $ZodULID = $constructor("$ZodULID", (inst, def2) => {
      def2.pattern ?? (def2.pattern = ulid);
      $ZodStringFormat.init(inst, def2);
    });
    $ZodXID = $constructor("$ZodXID", (inst, def2) => {
      def2.pattern ?? (def2.pattern = xid);
      $ZodStringFormat.init(inst, def2);
    });
    $ZodKSUID = $constructor("$ZodKSUID", (inst, def2) => {
      def2.pattern ?? (def2.pattern = ksuid);
      $ZodStringFormat.init(inst, def2);
    });
    $ZodISODateTime = $constructor("$ZodISODateTime", (inst, def2) => {
      def2.pattern ?? (def2.pattern = datetime$1(def2));
      $ZodStringFormat.init(inst, def2);
    });
    $ZodISODate = $constructor("$ZodISODate", (inst, def2) => {
      def2.pattern ?? (def2.pattern = date$1);
      $ZodStringFormat.init(inst, def2);
    });
    $ZodISOTime = $constructor("$ZodISOTime", (inst, def2) => {
      def2.pattern ?? (def2.pattern = time$1(def2));
      $ZodStringFormat.init(inst, def2);
    });
    $ZodISODuration = $constructor("$ZodISODuration", (inst, def2) => {
      def2.pattern ?? (def2.pattern = duration$1);
      $ZodStringFormat.init(inst, def2);
    });
    $ZodIPv4 = $constructor("$ZodIPv4", (inst, def2) => {
      def2.pattern ?? (def2.pattern = ipv4$1);
      $ZodStringFormat.init(inst, def2);
      inst._zod.onattach.push((inst2) => {
        const bag = inst2._zod.bag;
        bag.format = `ipv4`;
      });
    });
    $ZodIPv6 = $constructor("$ZodIPv6", (inst, def2) => {
      def2.pattern ?? (def2.pattern = ipv6$1);
      $ZodStringFormat.init(inst, def2);
      inst._zod.onattach.push((inst2) => {
        const bag = inst2._zod.bag;
        bag.format = `ipv6`;
      });
      inst._zod.check = (payload) => {
        try {
          new URL(`http://[${payload.value}]`);
        } catch {
          payload.issues.push({
            code: "invalid_format",
            format: "ipv6",
            input: payload.value,
            inst,
            continue: !def2.abort
          });
        }
      };
    });
    $ZodCIDRv4 = $constructor("$ZodCIDRv4", (inst, def2) => {
      def2.pattern ?? (def2.pattern = cidrv4);
      $ZodStringFormat.init(inst, def2);
    });
    $ZodCIDRv6 = $constructor("$ZodCIDRv6", (inst, def2) => {
      def2.pattern ?? (def2.pattern = cidrv6);
      $ZodStringFormat.init(inst, def2);
      inst._zod.check = (payload) => {
        const [address, prefix] = payload.value.split("/");
        try {
          if (!prefix)
            throw new Error();
          const prefixNum = Number(prefix);
          if (`${prefixNum}` !== prefix)
            throw new Error();
          if (prefixNum < 0 || prefixNum > 128)
            throw new Error();
          new URL(`http://[${address}]`);
        } catch {
          payload.issues.push({
            code: "invalid_format",
            format: "cidrv6",
            input: payload.value,
            inst,
            continue: !def2.abort
          });
        }
      };
    });
    $ZodBase64 = $constructor("$ZodBase64", (inst, def2) => {
      def2.pattern ?? (def2.pattern = base64$1);
      $ZodStringFormat.init(inst, def2);
      inst._zod.onattach.push((inst2) => {
        inst2._zod.bag.contentEncoding = "base64";
      });
      inst._zod.check = (payload) => {
        if (isValidBase64(payload.value))
          return;
        payload.issues.push({
          code: "invalid_format",
          format: "base64",
          input: payload.value,
          inst,
          continue: !def2.abort
        });
      };
    });
    $ZodBase64URL = $constructor("$ZodBase64URL", (inst, def2) => {
      def2.pattern ?? (def2.pattern = base64url);
      $ZodStringFormat.init(inst, def2);
      inst._zod.onattach.push((inst2) => {
        inst2._zod.bag.contentEncoding = "base64url";
      });
      inst._zod.check = (payload) => {
        if (isValidBase64URL(payload.value))
          return;
        payload.issues.push({
          code: "invalid_format",
          format: "base64url",
          input: payload.value,
          inst,
          continue: !def2.abort
        });
      };
    });
    $ZodE164 = $constructor("$ZodE164", (inst, def2) => {
      def2.pattern ?? (def2.pattern = e164);
      $ZodStringFormat.init(inst, def2);
    });
    $ZodJWT = $constructor("$ZodJWT", (inst, def2) => {
      $ZodStringFormat.init(inst, def2);
      inst._zod.check = (payload) => {
        if (isValidJWT(payload.value, def2.alg))
          return;
        payload.issues.push({
          code: "invalid_format",
          format: "jwt",
          input: payload.value,
          inst,
          continue: !def2.abort
        });
      };
    });
    $ZodCustomStringFormat = $constructor("$ZodCustomStringFormat", (inst, def2) => {
      $ZodStringFormat.init(inst, def2);
      inst._zod.check = (payload) => {
        if (def2.fn(payload.value))
          return;
        payload.issues.push({
          code: "invalid_format",
          format: def2.format,
          input: payload.value,
          inst,
          continue: !def2.abort
        });
      };
    });
    $ZodNumber = $constructor("$ZodNumber", (inst, def2) => {
      $ZodType.init(inst, def2);
      inst._zod.pattern = inst._zod.bag.pattern ?? number$1;
      inst._zod.parse = (payload, _ctx) => {
        if (def2.coerce)
          try {
            payload.value = Number(payload.value);
          } catch (_) {
          }
        const input = payload.value;
        if (typeof input === "number" && !Number.isNaN(input) && Number.isFinite(input)) {
          return payload;
        }
        const received = typeof input === "number" ? Number.isNaN(input) ? "NaN" : !Number.isFinite(input) ? "Infinity" : void 0 : void 0;
        payload.issues.push({
          expected: "number",
          code: "invalid_type",
          input,
          inst,
          ...received ? { received } : {}
        });
        return payload;
      };
    });
    $ZodNumberFormat = $constructor("$ZodNumber", (inst, def2) => {
      $ZodCheckNumberFormat.init(inst, def2);
      $ZodNumber.init(inst, def2);
    });
    $ZodBoolean = $constructor("$ZodBoolean", (inst, def2) => {
      $ZodType.init(inst, def2);
      inst._zod.pattern = boolean$1;
      inst._zod.parse = (payload, _ctx) => {
        if (def2.coerce)
          try {
            payload.value = Boolean(payload.value);
          } catch (_) {
          }
        const input = payload.value;
        if (typeof input === "boolean")
          return payload;
        payload.issues.push({
          expected: "boolean",
          code: "invalid_type",
          input,
          inst
        });
        return payload;
      };
    });
    $ZodBigInt = $constructor("$ZodBigInt", (inst, def2) => {
      $ZodType.init(inst, def2);
      inst._zod.pattern = bigint;
      inst._zod.parse = (payload, _ctx) => {
        if (def2.coerce)
          try {
            payload.value = BigInt(payload.value);
          } catch (_) {
          }
        if (typeof payload.value === "bigint")
          return payload;
        payload.issues.push({
          expected: "bigint",
          code: "invalid_type",
          input: payload.value,
          inst
        });
        return payload;
      };
    });
    $ZodBigIntFormat = $constructor("$ZodBigInt", (inst, def2) => {
      $ZodCheckBigIntFormat.init(inst, def2);
      $ZodBigInt.init(inst, def2);
    });
    $ZodSymbol = $constructor("$ZodSymbol", (inst, def2) => {
      $ZodType.init(inst, def2);
      inst._zod.parse = (payload, _ctx) => {
        const input = payload.value;
        if (typeof input === "symbol")
          return payload;
        payload.issues.push({
          expected: "symbol",
          code: "invalid_type",
          input,
          inst
        });
        return payload;
      };
    });
    $ZodUndefined = $constructor("$ZodUndefined", (inst, def2) => {
      $ZodType.init(inst, def2);
      inst._zod.pattern = _undefined;
      inst._zod.values = /* @__PURE__ */ new Set([void 0]);
      inst._zod.optin = "optional";
      inst._zod.optout = "optional";
      inst._zod.parse = (payload, _ctx) => {
        const input = payload.value;
        if (typeof input === "undefined")
          return payload;
        payload.issues.push({
          expected: "undefined",
          code: "invalid_type",
          input,
          inst
        });
        return payload;
      };
    });
    $ZodNull = $constructor("$ZodNull", (inst, def2) => {
      $ZodType.init(inst, def2);
      inst._zod.pattern = _null$2;
      inst._zod.values = /* @__PURE__ */ new Set([null]);
      inst._zod.parse = (payload, _ctx) => {
        const input = payload.value;
        if (input === null)
          return payload;
        payload.issues.push({
          expected: "null",
          code: "invalid_type",
          input,
          inst
        });
        return payload;
      };
    });
    $ZodAny = $constructor("$ZodAny", (inst, def2) => {
      $ZodType.init(inst, def2);
      inst._zod.parse = (payload) => payload;
    });
    $ZodUnknown = $constructor("$ZodUnknown", (inst, def2) => {
      $ZodType.init(inst, def2);
      inst._zod.parse = (payload) => payload;
    });
    $ZodNever = $constructor("$ZodNever", (inst, def2) => {
      $ZodType.init(inst, def2);
      inst._zod.parse = (payload, _ctx) => {
        payload.issues.push({
          expected: "never",
          code: "invalid_type",
          input: payload.value,
          inst
        });
        return payload;
      };
    });
    $ZodVoid = $constructor("$ZodVoid", (inst, def2) => {
      $ZodType.init(inst, def2);
      inst._zod.parse = (payload, _ctx) => {
        const input = payload.value;
        if (typeof input === "undefined")
          return payload;
        payload.issues.push({
          expected: "void",
          code: "invalid_type",
          input,
          inst
        });
        return payload;
      };
    });
    $ZodDate = $constructor("$ZodDate", (inst, def2) => {
      $ZodType.init(inst, def2);
      inst._zod.parse = (payload, _ctx) => {
        if (def2.coerce) {
          try {
            payload.value = new Date(payload.value);
          } catch (_err) {
          }
        }
        const input = payload.value;
        const isDate = input instanceof Date;
        const isValidDate2 = isDate && !Number.isNaN(input.getTime());
        if (isValidDate2)
          return payload;
        payload.issues.push({
          expected: "date",
          code: "invalid_type",
          input,
          ...isDate ? { received: "Invalid Date" } : {},
          inst
        });
        return payload;
      };
    });
    $ZodArray = $constructor("$ZodArray", (inst, def2) => {
      $ZodType.init(inst, def2);
      inst._zod.parse = (payload, ctx) => {
        const input = payload.value;
        if (!Array.isArray(input)) {
          payload.issues.push({
            expected: "array",
            code: "invalid_type",
            input,
            inst
          });
          return payload;
        }
        payload.value = Array(input.length);
        const proms = [];
        for (let i = 0; i < input.length; i++) {
          const item = input[i];
          const result = def2.element._zod.run({
            value: item,
            issues: []
          }, ctx);
          if (result instanceof Promise) {
            proms.push(result.then((result2) => handleArrayResult(result2, payload, i)));
          } else {
            handleArrayResult(result, payload, i);
          }
        }
        if (proms.length) {
          return Promise.all(proms).then(() => payload);
        }
        return payload;
      };
    });
    $ZodObject = $constructor("$ZodObject", (inst, def2) => {
      $ZodType.init(inst, def2);
      const _normalized = cached(() => {
        const keys2 = Object.keys(def2.shape);
        for (const k of keys2) {
          if (!(def2.shape[k] instanceof $ZodType)) {
            throw new Error(`Invalid element at key "${k}": expected a Zod schema`);
          }
        }
        const okeys = optionalKeys(def2.shape);
        return {
          shape: def2.shape,
          keys: keys2,
          keySet: new Set(keys2),
          numKeys: keys2.length,
          optionalKeys: new Set(okeys)
        };
      });
      defineLazy(inst._zod, "propValues", () => {
        const shape = def2.shape;
        const propValues = {};
        for (const key in shape) {
          const field = shape[key]._zod;
          if (field.values) {
            propValues[key] ?? (propValues[key] = /* @__PURE__ */ new Set());
            for (const v of field.values)
              propValues[key].add(v);
          }
        }
        return propValues;
      });
      const generateFastpass = (shape) => {
        const doc = new Doc(["shape", "payload", "ctx"]);
        const normalized = _normalized.value;
        const parseStr = (key) => {
          const k = esc(key);
          return `shape[${k}]._zod.run({ value: input[${k}], issues: [] }, ctx)`;
        };
        doc.write(`const input = payload.value;`);
        const ids = /* @__PURE__ */ Object.create(null);
        let counter = 0;
        for (const key of normalized.keys) {
          ids[key] = `key_${counter++}`;
        }
        doc.write(`const newResult = {}`);
        for (const key of normalized.keys) {
          if (normalized.optionalKeys.has(key)) {
            const id2 = ids[key];
            doc.write(`const ${id2} = ${parseStr(key)};`);
            const k = esc(key);
            doc.write(`
        if (${id2}.issues.length) {
          if (input[${k}] === undefined) {
            if (${k} in input) {
              newResult[${k}] = undefined;
            }
          } else {
            payload.issues = payload.issues.concat(
              ${id2}.issues.map((iss) => ({
                ...iss,
                path: iss.path ? [${k}, ...iss.path] : [${k}],
              }))
            );
          }
        } else if (${id2}.value === undefined) {
          if (${k} in input) newResult[${k}] = undefined;
        } else {
          newResult[${k}] = ${id2}.value;
        }
        `);
          } else {
            const id2 = ids[key];
            doc.write(`const ${id2} = ${parseStr(key)};`);
            doc.write(`
          if (${id2}.issues.length) payload.issues = payload.issues.concat(${id2}.issues.map(iss => ({
            ...iss,
            path: iss.path ? [${esc(key)}, ...iss.path] : [${esc(key)}]
          })));`);
            doc.write(`newResult[${esc(key)}] = ${id2}.value`);
          }
        }
        doc.write(`payload.value = newResult;`);
        doc.write(`return payload;`);
        const fn = doc.compile();
        return (payload, ctx) => fn(shape, payload, ctx);
      };
      let fastpass;
      const isObject$12 = isObject2;
      const jit = !globalConfig.jitless;
      const allowsEval$1 = allowsEval;
      const fastEnabled = jit && allowsEval$1.value;
      const catchall = def2.catchall;
      let value;
      inst._zod.parse = (payload, ctx) => {
        value ?? (value = _normalized.value);
        const input = payload.value;
        if (!isObject$12(input)) {
          payload.issues.push({
            expected: "object",
            code: "invalid_type",
            input,
            inst
          });
          return payload;
        }
        const proms = [];
        if (jit && fastEnabled && ctx?.async === false && ctx.jitless !== true) {
          if (!fastpass)
            fastpass = generateFastpass(def2.shape);
          payload = fastpass(payload, ctx);
        } else {
          payload.value = {};
          const shape = value.shape;
          for (const key of value.keys) {
            const el = shape[key];
            const r = el._zod.run({ value: input[key], issues: [] }, ctx);
            const isOptional = el._zod.optin === "optional" && el._zod.optout === "optional";
            if (r instanceof Promise) {
              proms.push(r.then((r2) => isOptional ? handleOptionalObjectResult(r2, payload, key, input) : handleObjectResult(r2, payload, key)));
            } else if (isOptional) {
              handleOptionalObjectResult(r, payload, key, input);
            } else {
              handleObjectResult(r, payload, key);
            }
          }
        }
        if (!catchall) {
          return proms.length ? Promise.all(proms).then(() => payload) : payload;
        }
        const unrecognized = [];
        const keySet = value.keySet;
        const _catchall = catchall._zod;
        const t = _catchall.def.type;
        for (const key of Object.keys(input)) {
          if (keySet.has(key))
            continue;
          if (t === "never") {
            unrecognized.push(key);
            continue;
          }
          const r = _catchall.run({ value: input[key], issues: [] }, ctx);
          if (r instanceof Promise) {
            proms.push(r.then((r2) => handleObjectResult(r2, payload, key)));
          } else {
            handleObjectResult(r, payload, key);
          }
        }
        if (unrecognized.length) {
          payload.issues.push({
            code: "unrecognized_keys",
            keys: unrecognized,
            input,
            inst
          });
        }
        if (!proms.length)
          return payload;
        return Promise.all(proms).then(() => {
          return payload;
        });
      };
    });
    $ZodUnion = $constructor("$ZodUnion", (inst, def2) => {
      $ZodType.init(inst, def2);
      defineLazy(inst._zod, "optin", () => def2.options.some((o) => o._zod.optin === "optional") ? "optional" : void 0);
      defineLazy(inst._zod, "optout", () => def2.options.some((o) => o._zod.optout === "optional") ? "optional" : void 0);
      defineLazy(inst._zod, "values", () => {
        if (def2.options.every((o) => o._zod.values)) {
          return new Set(def2.options.flatMap((option) => Array.from(option._zod.values)));
        }
        return void 0;
      });
      defineLazy(inst._zod, "pattern", () => {
        if (def2.options.every((o) => o._zod.pattern)) {
          const patterns = def2.options.map((o) => o._zod.pattern);
          return new RegExp(`^(${patterns.map((p) => cleanRegex(p.source)).join("|")})$`);
        }
        return void 0;
      });
      inst._zod.parse = (payload, ctx) => {
        let async2 = false;
        const results = [];
        for (const option of def2.options) {
          const result = option._zod.run({
            value: payload.value,
            issues: []
          }, ctx);
          if (result instanceof Promise) {
            results.push(result);
            async2 = true;
          } else {
            if (result.issues.length === 0)
              return result;
            results.push(result);
          }
        }
        if (!async2)
          return handleUnionResults(results, payload, inst, ctx);
        return Promise.all(results).then((results2) => {
          return handleUnionResults(results2, payload, inst, ctx);
        });
      };
    });
    $ZodDiscriminatedUnion = $constructor("$ZodDiscriminatedUnion", (inst, def2) => {
      $ZodUnion.init(inst, def2);
      const _super = inst._zod.parse;
      defineLazy(inst._zod, "propValues", () => {
        const propValues = {};
        for (const option of def2.options) {
          const pv = option._zod.propValues;
          if (!pv || Object.keys(pv).length === 0)
            throw new Error(`Invalid discriminated union option at index "${def2.options.indexOf(option)}"`);
          for (const [k, v] of Object.entries(pv)) {
            if (!propValues[k])
              propValues[k] = /* @__PURE__ */ new Set();
            for (const val of v) {
              propValues[k].add(val);
            }
          }
        }
        return propValues;
      });
      const disc = cached(() => {
        const opts = def2.options;
        const map2 = /* @__PURE__ */ new Map();
        for (const o of opts) {
          const values = o._zod.propValues[def2.discriminator];
          if (!values || values.size === 0)
            throw new Error(`Invalid discriminated union option at index "${def2.options.indexOf(o)}"`);
          for (const v of values) {
            if (map2.has(v)) {
              throw new Error(`Duplicate discriminator value "${String(v)}"`);
            }
            map2.set(v, o);
          }
        }
        return map2;
      });
      inst._zod.parse = (payload, ctx) => {
        const input = payload.value;
        if (!isObject2(input)) {
          payload.issues.push({
            code: "invalid_type",
            expected: "object",
            input,
            inst
          });
          return payload;
        }
        const opt = disc.value.get(input?.[def2.discriminator]);
        if (opt) {
          return opt._zod.run(payload, ctx);
        }
        if (def2.unionFallback) {
          return _super(payload, ctx);
        }
        payload.issues.push({
          code: "invalid_union",
          errors: [],
          note: "No matching discriminator",
          input,
          path: [def2.discriminator],
          inst
        });
        return payload;
      };
    });
    $ZodIntersection = $constructor("$ZodIntersection", (inst, def2) => {
      $ZodType.init(inst, def2);
      inst._zod.parse = (payload, ctx) => {
        const input = payload.value;
        const left2 = def2.left._zod.run({ value: input, issues: [] }, ctx);
        const right2 = def2.right._zod.run({ value: input, issues: [] }, ctx);
        const async2 = left2 instanceof Promise || right2 instanceof Promise;
        if (async2) {
          return Promise.all([left2, right2]).then(([left3, right3]) => {
            return handleIntersectionResults(payload, left3, right3);
          });
        }
        return handleIntersectionResults(payload, left2, right2);
      };
    });
    $ZodTuple = $constructor("$ZodTuple", (inst, def2) => {
      $ZodType.init(inst, def2);
      const items2 = def2.items;
      const optStart = items2.length - [...items2].reverse().findIndex((item) => item._zod.optin !== "optional");
      inst._zod.parse = (payload, ctx) => {
        const input = payload.value;
        if (!Array.isArray(input)) {
          payload.issues.push({
            input,
            inst,
            expected: "tuple",
            code: "invalid_type"
          });
          return payload;
        }
        payload.value = [];
        const proms = [];
        if (!def2.rest) {
          const tooBig = input.length > items2.length;
          const tooSmall = input.length < optStart - 1;
          if (tooBig || tooSmall) {
            payload.issues.push({
              input,
              inst,
              origin: "array",
              ...tooBig ? { code: "too_big", maximum: items2.length } : { code: "too_small", minimum: items2.length }
            });
            return payload;
          }
        }
        let i = -1;
        for (const item of items2) {
          i++;
          if (i >= input.length) {
            if (i >= optStart)
              continue;
          }
          const result = item._zod.run({
            value: input[i],
            issues: []
          }, ctx);
          if (result instanceof Promise) {
            proms.push(result.then((result2) => handleTupleResult(result2, payload, i)));
          } else {
            handleTupleResult(result, payload, i);
          }
        }
        if (def2.rest) {
          const rest = input.slice(items2.length);
          for (const el of rest) {
            i++;
            const result = def2.rest._zod.run({
              value: el,
              issues: []
            }, ctx);
            if (result instanceof Promise) {
              proms.push(result.then((result2) => handleTupleResult(result2, payload, i)));
            } else {
              handleTupleResult(result, payload, i);
            }
          }
        }
        if (proms.length)
          return Promise.all(proms).then(() => payload);
        return payload;
      };
    });
    $ZodRecord = $constructor("$ZodRecord", (inst, def2) => {
      $ZodType.init(inst, def2);
      inst._zod.parse = (payload, ctx) => {
        const input = payload.value;
        if (!isPlainObject$1(input)) {
          payload.issues.push({
            expected: "record",
            code: "invalid_type",
            input,
            inst
          });
          return payload;
        }
        const proms = [];
        if (def2.keyType._zod.values) {
          const values = def2.keyType._zod.values;
          payload.value = {};
          for (const key of values) {
            if (typeof key === "string" || typeof key === "number" || typeof key === "symbol") {
              const result = def2.valueType._zod.run({ value: input[key], issues: [] }, ctx);
              if (result instanceof Promise) {
                proms.push(result.then((result2) => {
                  if (result2.issues.length) {
                    payload.issues.push(...prefixIssues(key, result2.issues));
                  }
                  payload.value[key] = result2.value;
                }));
              } else {
                if (result.issues.length) {
                  payload.issues.push(...prefixIssues(key, result.issues));
                }
                payload.value[key] = result.value;
              }
            }
          }
          let unrecognized;
          for (const key in input) {
            if (!values.has(key)) {
              unrecognized = unrecognized ?? [];
              unrecognized.push(key);
            }
          }
          if (unrecognized && unrecognized.length > 0) {
            payload.issues.push({
              code: "unrecognized_keys",
              input,
              inst,
              keys: unrecognized
            });
          }
        } else {
          payload.value = {};
          for (const key of Reflect.ownKeys(input)) {
            if (key === "__proto__")
              continue;
            const keyResult = def2.keyType._zod.run({ value: key, issues: [] }, ctx);
            if (keyResult instanceof Promise) {
              throw new Error("Async schemas not supported in object keys currently");
            }
            if (keyResult.issues.length) {
              payload.issues.push({
                origin: "record",
                code: "invalid_key",
                issues: keyResult.issues.map((iss) => finalizeIssue(iss, ctx, config$3())),
                input: key,
                path: [key],
                inst
              });
              payload.value[keyResult.value] = keyResult.value;
              continue;
            }
            const result = def2.valueType._zod.run({ value: input[key], issues: [] }, ctx);
            if (result instanceof Promise) {
              proms.push(result.then((result2) => {
                if (result2.issues.length) {
                  payload.issues.push(...prefixIssues(key, result2.issues));
                }
                payload.value[keyResult.value] = result2.value;
              }));
            } else {
              if (result.issues.length) {
                payload.issues.push(...prefixIssues(key, result.issues));
              }
              payload.value[keyResult.value] = result.value;
            }
          }
        }
        if (proms.length) {
          return Promise.all(proms).then(() => payload);
        }
        return payload;
      };
    });
    $ZodMap = $constructor("$ZodMap", (inst, def2) => {
      $ZodType.init(inst, def2);
      inst._zod.parse = (payload, ctx) => {
        const input = payload.value;
        if (!(input instanceof Map)) {
          payload.issues.push({
            expected: "map",
            code: "invalid_type",
            input,
            inst
          });
          return payload;
        }
        const proms = [];
        payload.value = /* @__PURE__ */ new Map();
        for (const [key, value] of input) {
          const keyResult = def2.keyType._zod.run({ value: key, issues: [] }, ctx);
          const valueResult = def2.valueType._zod.run({ value, issues: [] }, ctx);
          if (keyResult instanceof Promise || valueResult instanceof Promise) {
            proms.push(Promise.all([keyResult, valueResult]).then(([keyResult2, valueResult2]) => {
              handleMapResult(keyResult2, valueResult2, payload, key, input, inst, ctx);
            }));
          } else {
            handleMapResult(keyResult, valueResult, payload, key, input, inst, ctx);
          }
        }
        if (proms.length)
          return Promise.all(proms).then(() => payload);
        return payload;
      };
    });
    $ZodSet = $constructor("$ZodSet", (inst, def2) => {
      $ZodType.init(inst, def2);
      inst._zod.parse = (payload, ctx) => {
        const input = payload.value;
        if (!(input instanceof Set)) {
          payload.issues.push({
            input,
            inst,
            expected: "set",
            code: "invalid_type"
          });
          return payload;
        }
        const proms = [];
        payload.value = /* @__PURE__ */ new Set();
        for (const item of input) {
          const result = def2.valueType._zod.run({ value: item, issues: [] }, ctx);
          if (result instanceof Promise) {
            proms.push(result.then((result2) => handleSetResult(result2, payload)));
          } else
            handleSetResult(result, payload);
        }
        if (proms.length)
          return Promise.all(proms).then(() => payload);
        return payload;
      };
    });
    $ZodEnum = $constructor("$ZodEnum", (inst, def2) => {
      $ZodType.init(inst, def2);
      const values = getEnumValues(def2.entries);
      inst._zod.values = new Set(values);
      inst._zod.pattern = new RegExp(`^(${values.filter((k) => propertyKeyTypes.has(typeof k)).map((o) => typeof o === "string" ? escapeRegex(o) : o.toString()).join("|")})$`);
      inst._zod.parse = (payload, _ctx) => {
        const input = payload.value;
        if (inst._zod.values.has(input)) {
          return payload;
        }
        payload.issues.push({
          code: "invalid_value",
          values,
          input,
          inst
        });
        return payload;
      };
    });
    $ZodLiteral = $constructor("$ZodLiteral", (inst, def2) => {
      $ZodType.init(inst, def2);
      inst._zod.values = new Set(def2.values);
      inst._zod.pattern = new RegExp(`^(${def2.values.map((o) => typeof o === "string" ? escapeRegex(o) : o ? o.toString() : String(o)).join("|")})$`);
      inst._zod.parse = (payload, _ctx) => {
        const input = payload.value;
        if (inst._zod.values.has(input)) {
          return payload;
        }
        payload.issues.push({
          code: "invalid_value",
          values: def2.values,
          input,
          inst
        });
        return payload;
      };
    });
    $ZodFile = $constructor("$ZodFile", (inst, def2) => {
      $ZodType.init(inst, def2);
      inst._zod.parse = (payload, _ctx) => {
        const input = payload.value;
        if (input instanceof File)
          return payload;
        payload.issues.push({
          expected: "file",
          code: "invalid_type",
          input,
          inst
        });
        return payload;
      };
    });
    $ZodTransform = $constructor("$ZodTransform", (inst, def2) => {
      $ZodType.init(inst, def2);
      inst._zod.parse = (payload, _ctx) => {
        const _out = def2.transform(payload.value, payload);
        if (_ctx.async) {
          const output = _out instanceof Promise ? _out : Promise.resolve(_out);
          return output.then((output2) => {
            payload.value = output2;
            return payload;
          });
        }
        if (_out instanceof Promise) {
          throw new $ZodAsyncError();
        }
        payload.value = _out;
        return payload;
      };
    });
    $ZodOptional = $constructor("$ZodOptional", (inst, def2) => {
      $ZodType.init(inst, def2);
      inst._zod.optin = "optional";
      inst._zod.optout = "optional";
      defineLazy(inst._zod, "values", () => {
        return def2.innerType._zod.values ? /* @__PURE__ */ new Set([...def2.innerType._zod.values, void 0]) : void 0;
      });
      defineLazy(inst._zod, "pattern", () => {
        const pattern2 = def2.innerType._zod.pattern;
        return pattern2 ? new RegExp(`^(${cleanRegex(pattern2.source)})?$`) : void 0;
      });
      inst._zod.parse = (payload, ctx) => {
        if (def2.innerType._zod.optin === "optional") {
          return def2.innerType._zod.run(payload, ctx);
        }
        if (payload.value === void 0) {
          return payload;
        }
        return def2.innerType._zod.run(payload, ctx);
      };
    });
    $ZodNullable = $constructor("$ZodNullable", (inst, def2) => {
      $ZodType.init(inst, def2);
      defineLazy(inst._zod, "optin", () => def2.innerType._zod.optin);
      defineLazy(inst._zod, "optout", () => def2.innerType._zod.optout);
      defineLazy(inst._zod, "pattern", () => {
        const pattern2 = def2.innerType._zod.pattern;
        return pattern2 ? new RegExp(`^(${cleanRegex(pattern2.source)}|null)$`) : void 0;
      });
      defineLazy(inst._zod, "values", () => {
        return def2.innerType._zod.values ? /* @__PURE__ */ new Set([...def2.innerType._zod.values, null]) : void 0;
      });
      inst._zod.parse = (payload, ctx) => {
        if (payload.value === null)
          return payload;
        return def2.innerType._zod.run(payload, ctx);
      };
    });
    $ZodDefault = $constructor("$ZodDefault", (inst, def2) => {
      $ZodType.init(inst, def2);
      inst._zod.optin = "optional";
      defineLazy(inst._zod, "values", () => def2.innerType._zod.values);
      inst._zod.parse = (payload, ctx) => {
        if (payload.value === void 0) {
          payload.value = def2.defaultValue;
          return payload;
        }
        const result = def2.innerType._zod.run(payload, ctx);
        if (result instanceof Promise) {
          return result.then((result2) => handleDefaultResult(result2, def2));
        }
        return handleDefaultResult(result, def2);
      };
    });
    $ZodPrefault = $constructor("$ZodPrefault", (inst, def2) => {
      $ZodType.init(inst, def2);
      inst._zod.optin = "optional";
      defineLazy(inst._zod, "values", () => def2.innerType._zod.values);
      inst._zod.parse = (payload, ctx) => {
        if (payload.value === void 0) {
          payload.value = def2.defaultValue;
        }
        return def2.innerType._zod.run(payload, ctx);
      };
    });
    $ZodNonOptional = $constructor("$ZodNonOptional", (inst, def2) => {
      $ZodType.init(inst, def2);
      defineLazy(inst._zod, "values", () => {
        const v = def2.innerType._zod.values;
        return v ? new Set([...v].filter((x) => x !== void 0)) : void 0;
      });
      inst._zod.parse = (payload, ctx) => {
        const result = def2.innerType._zod.run(payload, ctx);
        if (result instanceof Promise) {
          return result.then((result2) => handleNonOptionalResult(result2, inst));
        }
        return handleNonOptionalResult(result, inst);
      };
    });
    $ZodSuccess = $constructor("$ZodSuccess", (inst, def2) => {
      $ZodType.init(inst, def2);
      inst._zod.parse = (payload, ctx) => {
        const result = def2.innerType._zod.run(payload, ctx);
        if (result instanceof Promise) {
          return result.then((result2) => {
            payload.value = result2.issues.length === 0;
            return payload;
          });
        }
        payload.value = result.issues.length === 0;
        return payload;
      };
    });
    $ZodCatch = $constructor("$ZodCatch", (inst, def2) => {
      $ZodType.init(inst, def2);
      inst._zod.optin = "optional";
      defineLazy(inst._zod, "optout", () => def2.innerType._zod.optout);
      defineLazy(inst._zod, "values", () => def2.innerType._zod.values);
      inst._zod.parse = (payload, ctx) => {
        const result = def2.innerType._zod.run(payload, ctx);
        if (result instanceof Promise) {
          return result.then((result2) => {
            payload.value = result2.value;
            if (result2.issues.length) {
              payload.value = def2.catchValue({
                ...payload,
                error: {
                  issues: result2.issues.map((iss) => finalizeIssue(iss, ctx, config$3()))
                },
                input: payload.value
              });
              payload.issues = [];
            }
            return payload;
          });
        }
        payload.value = result.value;
        if (result.issues.length) {
          payload.value = def2.catchValue({
            ...payload,
            error: {
              issues: result.issues.map((iss) => finalizeIssue(iss, ctx, config$3()))
            },
            input: payload.value
          });
          payload.issues = [];
        }
        return payload;
      };
    });
    $ZodNaN = $constructor("$ZodNaN", (inst, def2) => {
      $ZodType.init(inst, def2);
      inst._zod.parse = (payload, _ctx) => {
        if (typeof payload.value !== "number" || !Number.isNaN(payload.value)) {
          payload.issues.push({
            input: payload.value,
            inst,
            expected: "nan",
            code: "invalid_type"
          });
          return payload;
        }
        return payload;
      };
    });
    $ZodPipe = $constructor("$ZodPipe", (inst, def2) => {
      $ZodType.init(inst, def2);
      defineLazy(inst._zod, "values", () => def2.in._zod.values);
      defineLazy(inst._zod, "optin", () => def2.in._zod.optin);
      defineLazy(inst._zod, "optout", () => def2.out._zod.optout);
      inst._zod.parse = (payload, ctx) => {
        const left2 = def2.in._zod.run(payload, ctx);
        if (left2 instanceof Promise) {
          return left2.then((left3) => handlePipeResult(left3, def2, ctx));
        }
        return handlePipeResult(left2, def2, ctx);
      };
    });
    $ZodReadonly = $constructor("$ZodReadonly", (inst, def2) => {
      $ZodType.init(inst, def2);
      defineLazy(inst._zod, "propValues", () => def2.innerType._zod.propValues);
      defineLazy(inst._zod, "values", () => def2.innerType._zod.values);
      defineLazy(inst._zod, "optin", () => def2.innerType._zod.optin);
      defineLazy(inst._zod, "optout", () => def2.innerType._zod.optout);
      inst._zod.parse = (payload, ctx) => {
        const result = def2.innerType._zod.run(payload, ctx);
        if (result instanceof Promise) {
          return result.then(handleReadonlyResult);
        }
        return handleReadonlyResult(result);
      };
    });
    $ZodTemplateLiteral = $constructor("$ZodTemplateLiteral", (inst, def2) => {
      $ZodType.init(inst, def2);
      const regexParts = [];
      for (const part of def2.parts) {
        if (part instanceof $ZodType) {
          if (!part._zod.pattern) {
            throw new Error(`Invalid template literal part, no pattern found: ${[...part._zod.traits].shift()}`);
          }
          const source2 = part._zod.pattern instanceof RegExp ? part._zod.pattern.source : part._zod.pattern;
          if (!source2)
            throw new Error(`Invalid template literal part: ${part._zod.traits}`);
          const start = source2.startsWith("^") ? 1 : 0;
          const end = source2.endsWith("$") ? source2.length - 1 : source2.length;
          regexParts.push(source2.slice(start, end));
        } else if (part === null || primitiveTypes.has(typeof part)) {
          regexParts.push(escapeRegex(`${part}`));
        } else {
          throw new Error(`Invalid template literal part: ${part}`);
        }
      }
      inst._zod.pattern = new RegExp(`^${regexParts.join("")}$`);
      inst._zod.parse = (payload, _ctx) => {
        if (typeof payload.value !== "string") {
          payload.issues.push({
            input: payload.value,
            inst,
            expected: "template_literal",
            code: "invalid_type"
          });
          return payload;
        }
        inst._zod.pattern.lastIndex = 0;
        if (!inst._zod.pattern.test(payload.value)) {
          payload.issues.push({
            input: payload.value,
            inst,
            code: "invalid_format",
            format: "template_literal",
            pattern: inst._zod.pattern.source
          });
          return payload;
        }
        return payload;
      };
    });
    $ZodPromise = $constructor("$ZodPromise", (inst, def2) => {
      $ZodType.init(inst, def2);
      inst._zod.parse = (payload, ctx) => {
        return Promise.resolve(payload.value).then((inner) => def2.innerType._zod.run({ value: inner, issues: [] }, ctx));
      };
    });
    $ZodLazy = $constructor("$ZodLazy", (inst, def2) => {
      $ZodType.init(inst, def2);
      defineLazy(inst._zod, "innerType", () => def2.getter());
      defineLazy(inst._zod, "pattern", () => inst._zod.innerType._zod.pattern);
      defineLazy(inst._zod, "propValues", () => inst._zod.innerType._zod.propValues);
      defineLazy(inst._zod, "optin", () => inst._zod.innerType._zod.optin);
      defineLazy(inst._zod, "optout", () => inst._zod.innerType._zod.optout);
      inst._zod.parse = (payload, ctx) => {
        const inner = inst._zod.innerType;
        return inner._zod.run(payload, ctx);
      };
    });
    $ZodCustom = $constructor("$ZodCustom", (inst, def2) => {
      $ZodCheck.init(inst, def2);
      $ZodType.init(inst, def2);
      inst._zod.parse = (payload, _) => {
        return payload;
      };
      inst._zod.check = (payload) => {
        const input = payload.value;
        const r = def2.fn(input);
        if (r instanceof Promise) {
          return r.then((r2) => handleRefineResult(r2, payload, input, inst));
        }
        handleRefineResult(r, payload, input, inst);
        return;
      };
    });
    $ZodRegistry = class {
      constructor() {
        this._map = /* @__PURE__ */ new Map();
        this._idmap = /* @__PURE__ */ new Map();
      }
      add(schema, ..._meta) {
        const meta = _meta[0];
        this._map.set(schema, meta);
        if (meta && typeof meta === "object" && "id" in meta) {
          if (this._idmap.has(meta.id)) {
            throw new Error(`ID ${meta.id} already exists in the registry`);
          }
          this._idmap.set(meta.id, schema);
        }
        return this;
      }
      clear() {
        this._map = /* @__PURE__ */ new Map();
        this._idmap = /* @__PURE__ */ new Map();
        return this;
      }
      remove(schema) {
        const meta = this._map.get(schema);
        if (meta && typeof meta === "object" && "id" in meta) {
          this._idmap.delete(meta.id);
        }
        this._map.delete(schema);
        return this;
      }
      get(schema) {
        const p = schema._zod.parent;
        if (p) {
          const pm = { ...this.get(p) ?? {} };
          delete pm.id;
          return { ...pm, ...this._map.get(schema) };
        }
        return this._map.get(schema);
      }
      has(schema) {
        return this._map.has(schema);
      }
    };
    globalRegistry = registry();
    JSONSchemaGenerator = class {
      constructor(params) {
        this.counter = 0;
        this.metadataRegistry = params?.metadata ?? globalRegistry;
        this.target = params?.target ?? "draft-2020-12";
        this.unrepresentable = params?.unrepresentable ?? "throw";
        this.override = params?.override ?? (() => {
        });
        this.io = params?.io ?? "output";
        this.seen = /* @__PURE__ */ new Map();
      }
      process(schema, _params = { path: [], schemaPath: [] }) {
        var _a4;
        const def2 = schema._zod.def;
        const formatMap = {
          guid: "uuid",
          url: "uri",
          datetime: "date-time",
          json_string: "json-string",
          regex: ""
        };
        const seen = this.seen.get(schema);
        if (seen) {
          seen.count++;
          const isCycle = _params.schemaPath.includes(schema);
          if (isCycle) {
            seen.cycle = _params.path;
          }
          return seen.schema;
        }
        const result = { schema: {}, count: 1, cycle: void 0, path: _params.path };
        this.seen.set(schema, result);
        const overrideSchema = schema._zod.toJSONSchema?.();
        if (overrideSchema) {
          result.schema = overrideSchema;
        } else {
          const params = {
            ..._params,
            schemaPath: [..._params.schemaPath, schema],
            path: _params.path
          };
          const parent = schema._zod.parent;
          if (parent) {
            result.ref = parent;
            this.process(parent, params);
            this.seen.get(parent).isParent = true;
          } else {
            const _json = result.schema;
            switch (def2.type) {
              case "string": {
                const json = _json;
                json.type = "string";
                const { minimum, maximum, format: format2, patterns, contentEncoding } = schema._zod.bag;
                if (typeof minimum === "number")
                  json.minLength = minimum;
                if (typeof maximum === "number")
                  json.maxLength = maximum;
                if (format2) {
                  json.format = formatMap[format2] ?? format2;
                  if (json.format === "")
                    delete json.format;
                }
                if (contentEncoding)
                  json.contentEncoding = contentEncoding;
                if (patterns && patterns.size > 0) {
                  const regexes = [...patterns];
                  if (regexes.length === 1)
                    json.pattern = regexes[0].source;
                  else if (regexes.length > 1) {
                    result.schema.allOf = [
                      ...regexes.map((regex2) => ({
                        ...this.target === "draft-7" ? { type: "string" } : {},
                        pattern: regex2.source
                      }))
                    ];
                  }
                }
                break;
              }
              case "number": {
                const json = _json;
                const { minimum, maximum, format: format2, multipleOf: multipleOf2, exclusiveMaximum, exclusiveMinimum } = schema._zod.bag;
                if (typeof format2 === "string" && format2.includes("int"))
                  json.type = "integer";
                else
                  json.type = "number";
                if (typeof exclusiveMinimum === "number")
                  json.exclusiveMinimum = exclusiveMinimum;
                if (typeof minimum === "number") {
                  json.minimum = minimum;
                  if (typeof exclusiveMinimum === "number") {
                    if (exclusiveMinimum >= minimum)
                      delete json.minimum;
                    else
                      delete json.exclusiveMinimum;
                  }
                }
                if (typeof exclusiveMaximum === "number")
                  json.exclusiveMaximum = exclusiveMaximum;
                if (typeof maximum === "number") {
                  json.maximum = maximum;
                  if (typeof exclusiveMaximum === "number") {
                    if (exclusiveMaximum <= maximum)
                      delete json.maximum;
                    else
                      delete json.exclusiveMaximum;
                  }
                }
                if (typeof multipleOf2 === "number")
                  json.multipleOf = multipleOf2;
                break;
              }
              case "boolean": {
                const json = _json;
                json.type = "boolean";
                break;
              }
              case "bigint": {
                if (this.unrepresentable === "throw") {
                  throw new Error("BigInt cannot be represented in JSON Schema");
                }
                break;
              }
              case "symbol": {
                if (this.unrepresentable === "throw") {
                  throw new Error("Symbols cannot be represented in JSON Schema");
                }
                break;
              }
              case "null": {
                _json.type = "null";
                break;
              }
              case "any": {
                break;
              }
              case "unknown": {
                break;
              }
              case "undefined": {
                if (this.unrepresentable === "throw") {
                  throw new Error("Undefined cannot be represented in JSON Schema");
                }
                break;
              }
              case "void": {
                if (this.unrepresentable === "throw") {
                  throw new Error("Void cannot be represented in JSON Schema");
                }
                break;
              }
              case "never": {
                _json.not = {};
                break;
              }
              case "date": {
                if (this.unrepresentable === "throw") {
                  throw new Error("Date cannot be represented in JSON Schema");
                }
                break;
              }
              case "array": {
                const json = _json;
                const { minimum, maximum } = schema._zod.bag;
                if (typeof minimum === "number")
                  json.minItems = minimum;
                if (typeof maximum === "number")
                  json.maxItems = maximum;
                json.type = "array";
                json.items = this.process(def2.element, { ...params, path: [...params.path, "items"] });
                break;
              }
              case "object": {
                const json = _json;
                json.type = "object";
                json.properties = {};
                const shape = def2.shape;
                for (const key in shape) {
                  json.properties[key] = this.process(shape[key], {
                    ...params,
                    path: [...params.path, "properties", key]
                  });
                }
                const allKeys = new Set(Object.keys(shape));
                const requiredKeys = new Set([...allKeys].filter((key) => {
                  const v = def2.shape[key]._zod;
                  if (this.io === "input") {
                    return v.optin === void 0;
                  } else {
                    return v.optout === void 0;
                  }
                }));
                if (requiredKeys.size > 0) {
                  json.required = Array.from(requiredKeys);
                }
                if (def2.catchall?._zod.def.type === "never") {
                  json.additionalProperties = false;
                } else if (!def2.catchall) {
                  if (this.io === "output")
                    json.additionalProperties = false;
                } else if (def2.catchall) {
                  json.additionalProperties = this.process(def2.catchall, {
                    ...params,
                    path: [...params.path, "additionalProperties"]
                  });
                }
                break;
              }
              case "union": {
                const json = _json;
                json.anyOf = def2.options.map((x, i) => this.process(x, {
                  ...params,
                  path: [...params.path, "anyOf", i]
                }));
                break;
              }
              case "intersection": {
                const json = _json;
                const a = this.process(def2.left, {
                  ...params,
                  path: [...params.path, "allOf", 0]
                });
                const b = this.process(def2.right, {
                  ...params,
                  path: [...params.path, "allOf", 1]
                });
                const isSimpleIntersection = (val) => "allOf" in val && Object.keys(val).length === 1;
                const allOf2 = [
                  ...isSimpleIntersection(a) ? a.allOf : [a],
                  ...isSimpleIntersection(b) ? b.allOf : [b]
                ];
                json.allOf = allOf2;
                break;
              }
              case "tuple": {
                const json = _json;
                json.type = "array";
                const prefixItems2 = def2.items.map((x, i) => this.process(x, { ...params, path: [...params.path, "prefixItems", i] }));
                if (this.target === "draft-2020-12") {
                  json.prefixItems = prefixItems2;
                } else {
                  json.items = prefixItems2;
                }
                if (def2.rest) {
                  const rest = this.process(def2.rest, {
                    ...params,
                    path: [...params.path, "items"]
                  });
                  if (this.target === "draft-2020-12") {
                    json.items = rest;
                  } else {
                    json.additionalItems = rest;
                  }
                }
                if (def2.rest) {
                  json.items = this.process(def2.rest, {
                    ...params,
                    path: [...params.path, "items"]
                  });
                }
                const { minimum, maximum } = schema._zod.bag;
                if (typeof minimum === "number")
                  json.minItems = minimum;
                if (typeof maximum === "number")
                  json.maxItems = maximum;
                break;
              }
              case "record": {
                const json = _json;
                json.type = "object";
                json.propertyNames = this.process(def2.keyType, { ...params, path: [...params.path, "propertyNames"] });
                json.additionalProperties = this.process(def2.valueType, {
                  ...params,
                  path: [...params.path, "additionalProperties"]
                });
                break;
              }
              case "map": {
                if (this.unrepresentable === "throw") {
                  throw new Error("Map cannot be represented in JSON Schema");
                }
                break;
              }
              case "set": {
                if (this.unrepresentable === "throw") {
                  throw new Error("Set cannot be represented in JSON Schema");
                }
                break;
              }
              case "enum": {
                const json = _json;
                const values = getEnumValues(def2.entries);
                if (values.every((v) => typeof v === "number"))
                  json.type = "number";
                if (values.every((v) => typeof v === "string"))
                  json.type = "string";
                json.enum = values;
                break;
              }
              case "literal": {
                const json = _json;
                const vals = [];
                for (const val of def2.values) {
                  if (val === void 0) {
                    if (this.unrepresentable === "throw") {
                      throw new Error("Literal `undefined` cannot be represented in JSON Schema");
                    }
                  } else if (typeof val === "bigint") {
                    if (this.unrepresentable === "throw") {
                      throw new Error("BigInt literals cannot be represented in JSON Schema");
                    } else {
                      vals.push(Number(val));
                    }
                  } else {
                    vals.push(val);
                  }
                }
                if (vals.length === 0) ;
                else if (vals.length === 1) {
                  const val = vals[0];
                  json.type = val === null ? "null" : typeof val;
                  json.const = val;
                } else {
                  if (vals.every((v) => typeof v === "number"))
                    json.type = "number";
                  if (vals.every((v) => typeof v === "string"))
                    json.type = "string";
                  if (vals.every((v) => typeof v === "boolean"))
                    json.type = "string";
                  if (vals.every((v) => v === null))
                    json.type = "null";
                  json.enum = vals;
                }
                break;
              }
              case "file": {
                const json = _json;
                const file2 = {
                  type: "string",
                  format: "binary",
                  contentEncoding: "binary"
                };
                const { minimum, maximum, mime } = schema._zod.bag;
                if (minimum !== void 0)
                  file2.minLength = minimum;
                if (maximum !== void 0)
                  file2.maxLength = maximum;
                if (mime) {
                  if (mime.length === 1) {
                    file2.contentMediaType = mime[0];
                    Object.assign(json, file2);
                  } else {
                    json.anyOf = mime.map((m) => {
                      const mFile = { ...file2, contentMediaType: m };
                      return mFile;
                    });
                  }
                } else {
                  Object.assign(json, file2);
                }
                break;
              }
              case "transform": {
                if (this.unrepresentable === "throw") {
                  throw new Error("Transforms cannot be represented in JSON Schema");
                }
                break;
              }
              case "nullable": {
                const inner = this.process(def2.innerType, params);
                _json.anyOf = [inner, { type: "null" }];
                break;
              }
              case "nonoptional": {
                this.process(def2.innerType, params);
                result.ref = def2.innerType;
                break;
              }
              case "success": {
                const json = _json;
                json.type = "boolean";
                break;
              }
              case "default": {
                this.process(def2.innerType, params);
                result.ref = def2.innerType;
                _json.default = JSON.parse(JSON.stringify(def2.defaultValue));
                break;
              }
              case "prefault": {
                this.process(def2.innerType, params);
                result.ref = def2.innerType;
                if (this.io === "input")
                  _json._prefault = JSON.parse(JSON.stringify(def2.defaultValue));
                break;
              }
              case "catch": {
                this.process(def2.innerType, params);
                result.ref = def2.innerType;
                let catchValue;
                try {
                  catchValue = def2.catchValue(void 0);
                } catch {
                  throw new Error("Dynamic catch values are not supported in JSON Schema");
                }
                _json.default = catchValue;
                break;
              }
              case "nan": {
                if (this.unrepresentable === "throw") {
                  throw new Error("NaN cannot be represented in JSON Schema");
                }
                break;
              }
              case "template_literal": {
                const json = _json;
                const pattern2 = schema._zod.pattern;
                if (!pattern2)
                  throw new Error("Pattern not found in template literal");
                json.type = "string";
                json.pattern = pattern2.source;
                break;
              }
              case "pipe": {
                const innerType = this.io === "input" ? def2.in._zod.def.type === "transform" ? def2.out : def2.in : def2.out;
                this.process(innerType, params);
                result.ref = innerType;
                break;
              }
              case "readonly": {
                this.process(def2.innerType, params);
                result.ref = def2.innerType;
                _json.readOnly = true;
                break;
              }
              case "promise": {
                this.process(def2.innerType, params);
                result.ref = def2.innerType;
                break;
              }
              case "optional": {
                this.process(def2.innerType, params);
                result.ref = def2.innerType;
                break;
              }
              case "lazy": {
                const innerType = schema._zod.innerType;
                this.process(innerType, params);
                result.ref = innerType;
                break;
              }
              case "custom": {
                if (this.unrepresentable === "throw") {
                  throw new Error("Custom types cannot be represented in JSON Schema");
                }
                break;
              }
            }
          }
        }
        const meta = this.metadataRegistry.get(schema);
        if (meta)
          Object.assign(result.schema, meta);
        if (this.io === "input" && isTransforming(schema)) {
          delete result.schema.examples;
          delete result.schema.default;
        }
        if (this.io === "input" && result.schema._prefault)
          (_a4 = result.schema).default ?? (_a4.default = result.schema._prefault);
        delete result.schema._prefault;
        const _result = this.seen.get(schema);
        return _result.schema;
      }
      emit(schema, _params) {
        const params = {
          cycles: _params?.cycles ?? "ref",
          reused: _params?.reused ?? "inline",
          external: _params?.external ?? void 0
        };
        const root2 = this.seen.get(schema);
        if (!root2)
          throw new Error("Unprocessed schema. This is a bug in Zod.");
        const makeURI = (entry) => {
          const defsSegment = this.target === "draft-2020-12" ? "$defs" : "definitions";
          if (params.external) {
            const externalId = params.external.registry.get(entry[0])?.id;
            const uriGenerator = params.external.uri ?? ((id3) => id3);
            if (externalId) {
              return { ref: uriGenerator(externalId) };
            }
            const id2 = entry[1].defId ?? entry[1].schema.id ?? `schema${this.counter++}`;
            entry[1].defId = id2;
            return { defId: id2, ref: `${uriGenerator("__shared")}#/${defsSegment}/${id2}` };
          }
          if (entry[1] === root2) {
            return { ref: "#" };
          }
          const uriPrefix = `#`;
          const defUriPrefix = `${uriPrefix}/${defsSegment}/`;
          const defId = entry[1].schema.id ?? `__schema${this.counter++}`;
          return { defId, ref: defUriPrefix + defId };
        };
        const extractToDef = (entry) => {
          if (entry[1].schema.$ref) {
            return;
          }
          const seen = entry[1];
          const { ref: ref2, defId } = makeURI(entry);
          seen.def = { ...seen.schema };
          if (defId)
            seen.defId = defId;
          const schema2 = seen.schema;
          for (const key in schema2) {
            delete schema2[key];
          }
          schema2.$ref = ref2;
        };
        if (params.cycles === "throw") {
          for (const entry of this.seen.entries()) {
            const seen = entry[1];
            if (seen.cycle) {
              throw new Error(`Cycle detected: #/${seen.cycle?.join("/")}/<root>

Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`);
            }
          }
        }
        for (const entry of this.seen.entries()) {
          const seen = entry[1];
          if (schema === entry[0]) {
            extractToDef(entry);
            continue;
          }
          if (params.external) {
            const ext = params.external.registry.get(entry[0])?.id;
            if (schema !== entry[0] && ext) {
              extractToDef(entry);
              continue;
            }
          }
          const id2 = this.metadataRegistry.get(entry[0])?.id;
          if (id2) {
            extractToDef(entry);
            continue;
          }
          if (seen.cycle) {
            extractToDef(entry);
            continue;
          }
          if (seen.count > 1) {
            if (params.reused === "ref") {
              extractToDef(entry);
              continue;
            }
          }
        }
        const flattenRef = (zodSchema, params2) => {
          const seen = this.seen.get(zodSchema);
          const schema2 = seen.def ?? seen.schema;
          const _cached = { ...schema2 };
          if (seen.ref === null) {
            return;
          }
          const ref2 = seen.ref;
          seen.ref = null;
          if (ref2) {
            flattenRef(ref2, params2);
            const refSchema = this.seen.get(ref2).schema;
            if (refSchema.$ref && params2.target === "draft-7") {
              schema2.allOf = schema2.allOf ?? [];
              schema2.allOf.push(refSchema);
            } else {
              Object.assign(schema2, refSchema);
              Object.assign(schema2, _cached);
            }
          }
          if (!seen.isParent)
            this.override({
              zodSchema,
              jsonSchema: schema2,
              path: seen.path ?? []
            });
        };
        for (const entry of [...this.seen.entries()].reverse()) {
          flattenRef(entry[0], { target: this.target });
        }
        const result = {};
        if (this.target === "draft-2020-12") {
          result.$schema = "https://json-schema.org/draft/2020-12/schema";
        } else if (this.target === "draft-7") {
          result.$schema = "http://json-schema.org/draft-07/schema#";
        } else {
          console.warn(`Invalid target: ${this.target}`);
        }
        if (params.external?.uri) {
          const id2 = params.external.registry.get(schema)?.id;
          if (!id2)
            throw new Error("Schema is missing an `id` property");
          result.$id = params.external.uri(id2);
        }
        Object.assign(result, root2.def);
        const defs = params.external?.defs ?? {};
        for (const entry of this.seen.entries()) {
          const seen = entry[1];
          if (seen.def && seen.defId) {
            defs[seen.defId] = seen.def;
          }
        }
        if (params.external) ;
        else {
          if (Object.keys(defs).length > 0) {
            if (this.target === "draft-2020-12") {
              result.$defs = defs;
            } else {
              result.definitions = defs;
            }
          }
        }
        try {
          return JSON.parse(JSON.stringify(result));
        } catch (_err) {
          throw new Error("Error converting schema to JSON.");
        }
      }
    };
    ZodMiniType = $constructor("ZodMiniType", (inst, def2) => {
      if (!inst._zod)
        throw new Error("Uninitialized schema in ZodMiniType.");
      $ZodType.init(inst, def2);
      inst.def = def2;
      inst.parse = (data32, params) => parse$4(inst, data32, params, { callee: inst.parse });
      inst.safeParse = (data32, params) => safeParse$2(inst, data32, params);
      inst.parseAsync = async (data32, params) => parseAsync$1(inst, data32, params, { callee: inst.parseAsync });
      inst.safeParseAsync = async (data32, params) => safeParseAsync$2(inst, data32, params);
      inst.check = (...checks) => {
        return inst.clone(
          {
            ...def2,
            checks: [
              ...def2.checks ?? [],
              ...checks.map((ch) => typeof ch === "function" ? { _zod: { check: ch, def: { check: "custom" }, onattach: [] } } : ch)
            ]
          }
        );
      };
      inst.clone = (_def, params) => clone(inst, _def, params);
      inst.brand = () => inst;
      inst.register = (reg, meta) => {
        reg.add(inst, meta);
        return inst;
      };
    });
    ZodMiniString = $constructor("ZodMiniString", (inst, def2) => {
      $ZodString.init(inst, def2);
      ZodMiniType.init(inst, def2);
    });
    ZodMiniStringFormat = $constructor("ZodMiniStringFormat", (inst, def2) => {
      $ZodStringFormat.init(inst, def2);
      ZodMiniString.init(inst, def2);
    });
    $constructor("ZodMiniEmail", (inst, def2) => {
      $ZodEmail.init(inst, def2);
      ZodMiniStringFormat.init(inst, def2);
    });
    $constructor("ZodMiniGUID", (inst, def2) => {
      $ZodGUID.init(inst, def2);
      ZodMiniStringFormat.init(inst, def2);
    });
    $constructor("ZodMiniUUID", (inst, def2) => {
      $ZodUUID.init(inst, def2);
      ZodMiniStringFormat.init(inst, def2);
    });
    $constructor("ZodMiniURL", (inst, def2) => {
      $ZodURL.init(inst, def2);
      ZodMiniStringFormat.init(inst, def2);
    });
    $constructor("ZodMiniEmoji", (inst, def2) => {
      $ZodEmoji.init(inst, def2);
      ZodMiniStringFormat.init(inst, def2);
    });
    $constructor("ZodMiniNanoID", (inst, def2) => {
      $ZodNanoID.init(inst, def2);
      ZodMiniStringFormat.init(inst, def2);
    });
    $constructor("ZodMiniCUID", (inst, def2) => {
      $ZodCUID.init(inst, def2);
      ZodMiniStringFormat.init(inst, def2);
    });
    $constructor("ZodMiniCUID2", (inst, def2) => {
      $ZodCUID2.init(inst, def2);
      ZodMiniStringFormat.init(inst, def2);
    });
    $constructor("ZodMiniULID", (inst, def2) => {
      $ZodULID.init(inst, def2);
      ZodMiniStringFormat.init(inst, def2);
    });
    $constructor("ZodMiniXID", (inst, def2) => {
      $ZodXID.init(inst, def2);
      ZodMiniStringFormat.init(inst, def2);
    });
    $constructor("ZodMiniKSUID", (inst, def2) => {
      $ZodKSUID.init(inst, def2);
      ZodMiniStringFormat.init(inst, def2);
    });
    $constructor("ZodMiniIPv4", (inst, def2) => {
      $ZodIPv4.init(inst, def2);
      ZodMiniStringFormat.init(inst, def2);
    });
    $constructor("ZodMiniIPv6", (inst, def2) => {
      $ZodIPv6.init(inst, def2);
      ZodMiniStringFormat.init(inst, def2);
    });
    $constructor("ZodMiniCIDRv4", (inst, def2) => {
      $ZodCIDRv4.init(inst, def2);
      ZodMiniStringFormat.init(inst, def2);
    });
    $constructor("ZodMiniCIDRv6", (inst, def2) => {
      $ZodCIDRv6.init(inst, def2);
      ZodMiniStringFormat.init(inst, def2);
    });
    $constructor("ZodMiniBase64", (inst, def2) => {
      $ZodBase64.init(inst, def2);
      ZodMiniStringFormat.init(inst, def2);
    });
    $constructor("ZodMiniBase64URL", (inst, def2) => {
      $ZodBase64URL.init(inst, def2);
      ZodMiniStringFormat.init(inst, def2);
    });
    $constructor("ZodMiniE164", (inst, def2) => {
      $ZodE164.init(inst, def2);
      ZodMiniStringFormat.init(inst, def2);
    });
    $constructor("ZodMiniJWT", (inst, def2) => {
      $ZodJWT.init(inst, def2);
      ZodMiniStringFormat.init(inst, def2);
    });
    $constructor("ZodMiniCustomStringFormat", (inst, def2) => {
      $ZodCustomStringFormat.init(inst, def2);
      ZodMiniStringFormat.init(inst, def2);
    });
    ZodMiniNumber = $constructor("ZodMiniNumber", (inst, def2) => {
      $ZodNumber.init(inst, def2);
      ZodMiniType.init(inst, def2);
    });
    $constructor("ZodMiniNumberFormat", (inst, def2) => {
      $ZodNumberFormat.init(inst, def2);
      ZodMiniNumber.init(inst, def2);
    });
    $constructor("ZodMiniBoolean", (inst, def2) => {
      $ZodBoolean.init(inst, def2);
      ZodMiniType.init(inst, def2);
    });
    ZodMiniBigInt = $constructor("ZodMiniBigInt", (inst, def2) => {
      $ZodBigInt.init(inst, def2);
      ZodMiniType.init(inst, def2);
    });
    $constructor("ZodMiniBigIntFormat", (inst, def2) => {
      $ZodBigIntFormat.init(inst, def2);
      ZodMiniBigInt.init(inst, def2);
    });
    $constructor("ZodMiniSymbol", (inst, def2) => {
      $ZodSymbol.init(inst, def2);
      ZodMiniType.init(inst, def2);
    });
    $constructor("ZodMiniUndefined", (inst, def2) => {
      $ZodUndefined.init(inst, def2);
      ZodMiniType.init(inst, def2);
    });
    $constructor("ZodMiniNull", (inst, def2) => {
      $ZodNull.init(inst, def2);
      ZodMiniType.init(inst, def2);
    });
    $constructor("ZodMiniAny", (inst, def2) => {
      $ZodAny.init(inst, def2);
      ZodMiniType.init(inst, def2);
    });
    $constructor("ZodMiniUnknown", (inst, def2) => {
      $ZodUnknown.init(inst, def2);
      ZodMiniType.init(inst, def2);
    });
    $constructor("ZodMiniNever", (inst, def2) => {
      $ZodNever.init(inst, def2);
      ZodMiniType.init(inst, def2);
    });
    $constructor("ZodMiniVoid", (inst, def2) => {
      $ZodVoid.init(inst, def2);
      ZodMiniType.init(inst, def2);
    });
    $constructor("ZodMiniDate", (inst, def2) => {
      $ZodDate.init(inst, def2);
      ZodMiniType.init(inst, def2);
    });
    $constructor("ZodMiniArray", (inst, def2) => {
      $ZodArray.init(inst, def2);
      ZodMiniType.init(inst, def2);
    });
    ZodMiniObject = $constructor("ZodMiniObject", (inst, def2) => {
      $ZodObject.init(inst, def2);
      ZodMiniType.init(inst, def2);
      defineLazy(inst, "shape", () => def2.shape);
    });
    $constructor("ZodMiniUnion", (inst, def2) => {
      $ZodUnion.init(inst, def2);
      ZodMiniType.init(inst, def2);
    });
    $constructor("ZodMiniDiscriminatedUnion", (inst, def2) => {
      $ZodDiscriminatedUnion.init(inst, def2);
      ZodMiniType.init(inst, def2);
    });
    $constructor("ZodMiniIntersection", (inst, def2) => {
      $ZodIntersection.init(inst, def2);
      ZodMiniType.init(inst, def2);
    });
    $constructor("ZodMiniTuple", (inst, def2) => {
      $ZodTuple.init(inst, def2);
      ZodMiniType.init(inst, def2);
    });
    $constructor("ZodMiniRecord", (inst, def2) => {
      $ZodRecord.init(inst, def2);
      ZodMiniType.init(inst, def2);
    });
    $constructor("ZodMiniMap", (inst, def2) => {
      $ZodMap.init(inst, def2);
      ZodMiniType.init(inst, def2);
    });
    $constructor("ZodMiniSet", (inst, def2) => {
      $ZodSet.init(inst, def2);
      ZodMiniType.init(inst, def2);
    });
    $constructor("ZodMiniEnum", (inst, def2) => {
      $ZodEnum.init(inst, def2);
      ZodMiniType.init(inst, def2);
    });
    $constructor("ZodMiniLiteral", (inst, def2) => {
      $ZodLiteral.init(inst, def2);
      ZodMiniType.init(inst, def2);
    });
    $constructor("ZodMiniFile", (inst, def2) => {
      $ZodFile.init(inst, def2);
      ZodMiniType.init(inst, def2);
    });
    $constructor("ZodMiniTransform", (inst, def2) => {
      $ZodTransform.init(inst, def2);
      ZodMiniType.init(inst, def2);
    });
    $constructor("ZodMiniOptional", (inst, def2) => {
      $ZodOptional.init(inst, def2);
      ZodMiniType.init(inst, def2);
    });
    $constructor("ZodMiniNullable", (inst, def2) => {
      $ZodNullable.init(inst, def2);
      ZodMiniType.init(inst, def2);
    });
    $constructor("ZodMiniDefault", (inst, def2) => {
      $ZodDefault.init(inst, def2);
      ZodMiniType.init(inst, def2);
    });
    $constructor("ZodMiniPrefault", (inst, def2) => {
      $ZodPrefault.init(inst, def2);
      ZodMiniType.init(inst, def2);
    });
    $constructor("ZodMiniNonOptional", (inst, def2) => {
      $ZodNonOptional.init(inst, def2);
      ZodMiniType.init(inst, def2);
    });
    $constructor("ZodMiniSuccess", (inst, def2) => {
      $ZodSuccess.init(inst, def2);
      ZodMiniType.init(inst, def2);
    });
    $constructor("ZodMiniCatch", (inst, def2) => {
      $ZodCatch.init(inst, def2);
      ZodMiniType.init(inst, def2);
    });
    $constructor("ZodMiniNaN", (inst, def2) => {
      $ZodNaN.init(inst, def2);
      ZodMiniType.init(inst, def2);
    });
    $constructor("ZodMiniPipe", (inst, def2) => {
      $ZodPipe.init(inst, def2);
      ZodMiniType.init(inst, def2);
    });
    $constructor("ZodMiniReadonly", (inst, def2) => {
      $ZodReadonly.init(inst, def2);
      ZodMiniType.init(inst, def2);
    });
    $constructor("ZodMiniTemplateLiteral", (inst, def2) => {
      $ZodTemplateLiteral.init(inst, def2);
      ZodMiniType.init(inst, def2);
    });
    $constructor("ZodMiniLazy", (inst, def2) => {
      $ZodLazy.init(inst, def2);
      ZodMiniType.init(inst, def2);
    });
    $constructor("ZodMiniPromise", (inst, def2) => {
      $ZodPromise.init(inst, def2);
      ZodMiniType.init(inst, def2);
    });
    $constructor("ZodMiniCustom", (inst, def2) => {
      $ZodCustom.init(inst, def2);
      ZodMiniType.init(inst, def2);
    });
    ZodISODateTime = $constructor("ZodISODateTime", (inst, def2) => {
      $ZodISODateTime.init(inst, def2);
      ZodStringFormat.init(inst, def2);
    });
    ZodISODate = $constructor("ZodISODate", (inst, def2) => {
      $ZodISODate.init(inst, def2);
      ZodStringFormat.init(inst, def2);
    });
    ZodISOTime = $constructor("ZodISOTime", (inst, def2) => {
      $ZodISOTime.init(inst, def2);
      ZodStringFormat.init(inst, def2);
    });
    ZodISODuration = $constructor("ZodISODuration", (inst, def2) => {
      $ZodISODuration.init(inst, def2);
      ZodStringFormat.init(inst, def2);
    });
    initializer = (inst, issues) => {
      $ZodError.init(inst, issues);
      inst.name = "ZodError";
      Object.defineProperties(inst, {
        format: {
          value: (mapper) => formatError(inst, mapper)
        },
        flatten: {
          value: (mapper) => flattenError(inst, mapper)
        },
        addIssue: {
          value: (issue2) => inst.issues.push(issue2)
        },
        addIssues: {
          value: (issues2) => inst.issues.push(...issues2)
        },
        isEmpty: {
          get() {
            return inst.issues.length === 0;
          }
        }
      });
    };
    $constructor("ZodError", initializer);
    ZodRealError = $constructor("ZodError", initializer, {
      Parent: Error
    });
    parse$3 = _parse(ZodRealError);
    parseAsync = _parseAsync(ZodRealError);
    safeParse = _safeParse(ZodRealError);
    safeParseAsync = _safeParseAsync(ZodRealError);
    ZodType2 = $constructor("ZodType", (inst, def2) => {
      $ZodType.init(inst, def2);
      inst.def = def2;
      Object.defineProperty(inst, "_def", { value: def2 });
      inst.check = (...checks) => {
        return inst.clone(
          {
            ...def2,
            checks: [
              ...def2.checks ?? [],
              ...checks.map((ch) => typeof ch === "function" ? { _zod: { check: ch, def: { check: "custom" }, onattach: [] } } : ch)
            ]
          }
        );
      };
      inst.clone = (def3, params) => clone(inst, def3, params);
      inst.brand = () => inst;
      inst.register = (reg, meta) => {
        reg.add(inst, meta);
        return inst;
      };
      inst.parse = (data32, params) => parse$3(inst, data32, params, { callee: inst.parse });
      inst.safeParse = (data32, params) => safeParse(inst, data32, params);
      inst.parseAsync = async (data32, params) => parseAsync(inst, data32, params, { callee: inst.parseAsync });
      inst.safeParseAsync = async (data32, params) => safeParseAsync(inst, data32, params);
      inst.spa = inst.safeParseAsync;
      inst.refine = (check2, params) => inst.check(refine(check2, params));
      inst.superRefine = (refinement) => inst.check(superRefine(refinement));
      inst.overwrite = (fn) => inst.check(_overwrite(fn));
      inst.optional = () => optional(inst);
      inst.nullable = () => nullable(inst);
      inst.nullish = () => optional(nullable(inst));
      inst.nonoptional = (params) => nonoptional(inst, params);
      inst.array = () => array(inst);
      inst.or = (arg) => union([inst, arg]);
      inst.and = (arg) => intersection(inst, arg);
      inst.transform = (tx) => pipe$1(inst, transform(tx));
      inst.default = (def3) => _default(inst, def3);
      inst.prefault = (def3) => prefault(inst, def3);
      inst.catch = (params) => _catch(inst, params);
      inst.pipe = (target) => pipe$1(inst, target);
      inst.readonly = () => readonly(inst);
      inst.describe = (description2) => {
        const cl = inst.clone();
        globalRegistry.add(cl, { description: description2 });
        return cl;
      };
      Object.defineProperty(inst, "description", {
        get() {
          return globalRegistry.get(inst)?.description;
        },
        configurable: true
      });
      inst.meta = (...args2) => {
        if (args2.length === 0) {
          return globalRegistry.get(inst);
        }
        const cl = inst.clone();
        globalRegistry.add(cl, args2[0]);
        return cl;
      };
      inst.isOptional = () => inst.safeParse(void 0).success;
      inst.isNullable = () => inst.safeParse(null).success;
      return inst;
    });
    _ZodString = $constructor("_ZodString", (inst, def2) => {
      $ZodString.init(inst, def2);
      ZodType2.init(inst, def2);
      const bag = inst._zod.bag;
      inst.format = bag.format ?? null;
      inst.minLength = bag.minimum ?? null;
      inst.maxLength = bag.maximum ?? null;
      inst.regex = (...args2) => inst.check(_regex(...args2));
      inst.includes = (...args2) => inst.check(_includes(...args2));
      inst.startsWith = (...args2) => inst.check(_startsWith(...args2));
      inst.endsWith = (...args2) => inst.check(_endsWith(...args2));
      inst.min = (...args2) => inst.check(_minLength(...args2));
      inst.max = (...args2) => inst.check(_maxLength(...args2));
      inst.length = (...args2) => inst.check(_length(...args2));
      inst.nonempty = (...args2) => inst.check(_minLength(1, ...args2));
      inst.lowercase = (params) => inst.check(_lowercase(params));
      inst.uppercase = (params) => inst.check(_uppercase(params));
      inst.trim = () => inst.check(_trim());
      inst.normalize = (...args2) => inst.check(_normalize(...args2));
      inst.toLowerCase = () => inst.check(_toLowerCase());
      inst.toUpperCase = () => inst.check(_toUpperCase());
    });
    ZodString2 = $constructor("ZodString", (inst, def2) => {
      $ZodString.init(inst, def2);
      _ZodString.init(inst, def2);
      inst.email = (params) => inst.check(_email(ZodEmail, params));
      inst.url = (params) => inst.check(_url(ZodURL, params));
      inst.jwt = (params) => inst.check(_jwt(ZodJWT, params));
      inst.emoji = (params) => inst.check(_emoji(ZodEmoji, params));
      inst.guid = (params) => inst.check(_guid(ZodGUID, params));
      inst.uuid = (params) => inst.check(_uuid(ZodUUID, params));
      inst.uuidv4 = (params) => inst.check(_uuidv4(ZodUUID, params));
      inst.uuidv6 = (params) => inst.check(_uuidv6(ZodUUID, params));
      inst.uuidv7 = (params) => inst.check(_uuidv7(ZodUUID, params));
      inst.nanoid = (params) => inst.check(_nanoid(ZodNanoID, params));
      inst.guid = (params) => inst.check(_guid(ZodGUID, params));
      inst.cuid = (params) => inst.check(_cuid(ZodCUID, params));
      inst.cuid2 = (params) => inst.check(_cuid2(ZodCUID2, params));
      inst.ulid = (params) => inst.check(_ulid(ZodULID, params));
      inst.base64 = (params) => inst.check(_base64(ZodBase64, params));
      inst.base64url = (params) => inst.check(_base64url(ZodBase64URL, params));
      inst.xid = (params) => inst.check(_xid(ZodXID, params));
      inst.ksuid = (params) => inst.check(_ksuid(ZodKSUID, params));
      inst.ipv4 = (params) => inst.check(_ipv4(ZodIPv4, params));
      inst.ipv6 = (params) => inst.check(_ipv6(ZodIPv6, params));
      inst.cidrv4 = (params) => inst.check(_cidrv4(ZodCIDRv4, params));
      inst.cidrv6 = (params) => inst.check(_cidrv6(ZodCIDRv6, params));
      inst.e164 = (params) => inst.check(_e164(ZodE164, params));
      inst.datetime = (params) => inst.check(datetime(params));
      inst.date = (params) => inst.check(date(params));
      inst.time = (params) => inst.check(time(params));
      inst.duration = (params) => inst.check(duration(params));
    });
    ZodStringFormat = $constructor("ZodStringFormat", (inst, def2) => {
      $ZodStringFormat.init(inst, def2);
      _ZodString.init(inst, def2);
    });
    ZodEmail = $constructor("ZodEmail", (inst, def2) => {
      $ZodEmail.init(inst, def2);
      ZodStringFormat.init(inst, def2);
    });
    ZodGUID = $constructor("ZodGUID", (inst, def2) => {
      $ZodGUID.init(inst, def2);
      ZodStringFormat.init(inst, def2);
    });
    ZodUUID = $constructor("ZodUUID", (inst, def2) => {
      $ZodUUID.init(inst, def2);
      ZodStringFormat.init(inst, def2);
    });
    ZodURL = $constructor("ZodURL", (inst, def2) => {
      $ZodURL.init(inst, def2);
      ZodStringFormat.init(inst, def2);
    });
    ZodEmoji = $constructor("ZodEmoji", (inst, def2) => {
      $ZodEmoji.init(inst, def2);
      ZodStringFormat.init(inst, def2);
    });
    ZodNanoID = $constructor("ZodNanoID", (inst, def2) => {
      $ZodNanoID.init(inst, def2);
      ZodStringFormat.init(inst, def2);
    });
    ZodCUID = $constructor("ZodCUID", (inst, def2) => {
      $ZodCUID.init(inst, def2);
      ZodStringFormat.init(inst, def2);
    });
    ZodCUID2 = $constructor("ZodCUID2", (inst, def2) => {
      $ZodCUID2.init(inst, def2);
      ZodStringFormat.init(inst, def2);
    });
    ZodULID = $constructor("ZodULID", (inst, def2) => {
      $ZodULID.init(inst, def2);
      ZodStringFormat.init(inst, def2);
    });
    ZodXID = $constructor("ZodXID", (inst, def2) => {
      $ZodXID.init(inst, def2);
      ZodStringFormat.init(inst, def2);
    });
    ZodKSUID = $constructor("ZodKSUID", (inst, def2) => {
      $ZodKSUID.init(inst, def2);
      ZodStringFormat.init(inst, def2);
    });
    ZodIPv4 = $constructor("ZodIPv4", (inst, def2) => {
      $ZodIPv4.init(inst, def2);
      ZodStringFormat.init(inst, def2);
    });
    ZodIPv6 = $constructor("ZodIPv6", (inst, def2) => {
      $ZodIPv6.init(inst, def2);
      ZodStringFormat.init(inst, def2);
    });
    ZodCIDRv4 = $constructor("ZodCIDRv4", (inst, def2) => {
      $ZodCIDRv4.init(inst, def2);
      ZodStringFormat.init(inst, def2);
    });
    ZodCIDRv6 = $constructor("ZodCIDRv6", (inst, def2) => {
      $ZodCIDRv6.init(inst, def2);
      ZodStringFormat.init(inst, def2);
    });
    ZodBase64 = $constructor("ZodBase64", (inst, def2) => {
      $ZodBase64.init(inst, def2);
      ZodStringFormat.init(inst, def2);
    });
    ZodBase64URL = $constructor("ZodBase64URL", (inst, def2) => {
      $ZodBase64URL.init(inst, def2);
      ZodStringFormat.init(inst, def2);
    });
    ZodE164 = $constructor("ZodE164", (inst, def2) => {
      $ZodE164.init(inst, def2);
      ZodStringFormat.init(inst, def2);
    });
    ZodJWT = $constructor("ZodJWT", (inst, def2) => {
      $ZodJWT.init(inst, def2);
      ZodStringFormat.init(inst, def2);
    });
    $constructor("ZodCustomStringFormat", (inst, def2) => {
      $ZodCustomStringFormat.init(inst, def2);
      ZodStringFormat.init(inst, def2);
    });
    ZodNumber2 = $constructor("ZodNumber", (inst, def2) => {
      $ZodNumber.init(inst, def2);
      ZodType2.init(inst, def2);
      inst.gt = (value, params) => inst.check(_gt(value, params));
      inst.gte = (value, params) => inst.check(_gte(value, params));
      inst.min = (value, params) => inst.check(_gte(value, params));
      inst.lt = (value, params) => inst.check(_lt(value, params));
      inst.lte = (value, params) => inst.check(_lte(value, params));
      inst.max = (value, params) => inst.check(_lte(value, params));
      inst.int = (params) => inst.check(int(params));
      inst.safe = (params) => inst.check(int(params));
      inst.positive = (params) => inst.check(_gt(0, params));
      inst.nonnegative = (params) => inst.check(_gte(0, params));
      inst.negative = (params) => inst.check(_lt(0, params));
      inst.nonpositive = (params) => inst.check(_lte(0, params));
      inst.multipleOf = (value, params) => inst.check(_multipleOf(value, params));
      inst.step = (value, params) => inst.check(_multipleOf(value, params));
      inst.finite = () => inst;
      const bag = inst._zod.bag;
      inst.minValue = Math.max(bag.minimum ?? Number.NEGATIVE_INFINITY, bag.exclusiveMinimum ?? Number.NEGATIVE_INFINITY) ?? null;
      inst.maxValue = Math.min(bag.maximum ?? Number.POSITIVE_INFINITY, bag.exclusiveMaximum ?? Number.POSITIVE_INFINITY) ?? null;
      inst.isInt = (bag.format ?? "").includes("int") || Number.isSafeInteger(bag.multipleOf ?? 0.5);
      inst.isFinite = true;
      inst.format = bag.format ?? null;
    });
    ZodNumberFormat = $constructor("ZodNumberFormat", (inst, def2) => {
      $ZodNumberFormat.init(inst, def2);
      ZodNumber2.init(inst, def2);
    });
    ZodBoolean2 = $constructor("ZodBoolean", (inst, def2) => {
      $ZodBoolean.init(inst, def2);
      ZodType2.init(inst, def2);
    });
    ZodBigInt2 = $constructor("ZodBigInt", (inst, def2) => {
      $ZodBigInt.init(inst, def2);
      ZodType2.init(inst, def2);
      inst.gte = (value, params) => inst.check(_gte(value, params));
      inst.min = (value, params) => inst.check(_gte(value, params));
      inst.gt = (value, params) => inst.check(_gt(value, params));
      inst.gte = (value, params) => inst.check(_gte(value, params));
      inst.min = (value, params) => inst.check(_gte(value, params));
      inst.lt = (value, params) => inst.check(_lt(value, params));
      inst.lte = (value, params) => inst.check(_lte(value, params));
      inst.max = (value, params) => inst.check(_lte(value, params));
      inst.positive = (params) => inst.check(_gt(BigInt(0), params));
      inst.negative = (params) => inst.check(_lt(BigInt(0), params));
      inst.nonpositive = (params) => inst.check(_lte(BigInt(0), params));
      inst.nonnegative = (params) => inst.check(_gte(BigInt(0), params));
      inst.multipleOf = (value, params) => inst.check(_multipleOf(value, params));
      const bag = inst._zod.bag;
      inst.minValue = bag.minimum ?? null;
      inst.maxValue = bag.maximum ?? null;
      inst.format = bag.format ?? null;
    });
    $constructor("ZodBigIntFormat", (inst, def2) => {
      $ZodBigIntFormat.init(inst, def2);
      ZodBigInt2.init(inst, def2);
    });
    $constructor("ZodSymbol", (inst, def2) => {
      $ZodSymbol.init(inst, def2);
      ZodType2.init(inst, def2);
    });
    $constructor("ZodUndefined", (inst, def2) => {
      $ZodUndefined.init(inst, def2);
      ZodType2.init(inst, def2);
    });
    ZodNull2 = $constructor("ZodNull", (inst, def2) => {
      $ZodNull.init(inst, def2);
      ZodType2.init(inst, def2);
    });
    $constructor("ZodAny", (inst, def2) => {
      $ZodAny.init(inst, def2);
      ZodType2.init(inst, def2);
    });
    ZodUnknown2 = $constructor("ZodUnknown", (inst, def2) => {
      $ZodUnknown.init(inst, def2);
      ZodType2.init(inst, def2);
    });
    ZodNever2 = $constructor("ZodNever", (inst, def2) => {
      $ZodNever.init(inst, def2);
      ZodType2.init(inst, def2);
    });
    $constructor("ZodVoid", (inst, def2) => {
      $ZodVoid.init(inst, def2);
      ZodType2.init(inst, def2);
    });
    $constructor("ZodDate", (inst, def2) => {
      $ZodDate.init(inst, def2);
      ZodType2.init(inst, def2);
      inst.min = (value, params) => inst.check(_gte(value, params));
      inst.max = (value, params) => inst.check(_lte(value, params));
      const c = inst._zod.bag;
      inst.minDate = c.minimum ? new Date(c.minimum) : null;
      inst.maxDate = c.maximum ? new Date(c.maximum) : null;
    });
    ZodArray2 = $constructor("ZodArray", (inst, def2) => {
      $ZodArray.init(inst, def2);
      ZodType2.init(inst, def2);
      inst.element = def2.element;
      inst.min = (minLength, params) => inst.check(_minLength(minLength, params));
      inst.nonempty = (params) => inst.check(_minLength(1, params));
      inst.max = (maxLength, params) => inst.check(_maxLength(maxLength, params));
      inst.length = (len, params) => inst.check(_length(len, params));
      inst.unwrap = () => inst.element;
    });
    ZodObject2 = $constructor("ZodObject", (inst, def2) => {
      $ZodObject.init(inst, def2);
      ZodType2.init(inst, def2);
      defineLazy(inst, "shape", () => def2.shape);
      inst.keyof = () => _enum$2(Object.keys(inst._zod.def.shape));
      inst.catchall = (catchall) => inst.clone({ ...inst._zod.def, catchall });
      inst.passthrough = () => inst.clone({ ...inst._zod.def, catchall: unknown() });
      inst.loose = () => inst.clone({ ...inst._zod.def, catchall: unknown() });
      inst.strict = () => inst.clone({ ...inst._zod.def, catchall: never() });
      inst.strip = () => inst.clone({ ...inst._zod.def, catchall: void 0 });
      inst.extend = (incoming) => {
        return extend(inst, incoming);
      };
      inst.merge = (other) => merge$1(inst, other);
      inst.pick = (mask) => pick(inst, mask);
      inst.omit = (mask) => omit(inst, mask);
      inst.partial = (...args2) => partial(ZodOptional2, inst, args2[0]);
      inst.required = (...args2) => required$4(ZodNonOptional, inst, args2[0]);
    });
    ZodUnion2 = $constructor("ZodUnion", (inst, def2) => {
      $ZodUnion.init(inst, def2);
      ZodType2.init(inst, def2);
      inst.options = def2.options;
    });
    ZodDiscriminatedUnion2 = $constructor("ZodDiscriminatedUnion", (inst, def2) => {
      ZodUnion2.init(inst, def2);
      $ZodDiscriminatedUnion.init(inst, def2);
    });
    ZodIntersection2 = $constructor("ZodIntersection", (inst, def2) => {
      $ZodIntersection.init(inst, def2);
      ZodType2.init(inst, def2);
    });
    $constructor("ZodTuple", (inst, def2) => {
      $ZodTuple.init(inst, def2);
      ZodType2.init(inst, def2);
      inst.rest = (rest) => inst.clone({
        ...inst._zod.def,
        rest
      });
    });
    ZodRecord2 = $constructor("ZodRecord", (inst, def2) => {
      $ZodRecord.init(inst, def2);
      ZodType2.init(inst, def2);
      inst.keyType = def2.keyType;
      inst.valueType = def2.valueType;
    });
    $constructor("ZodMap", (inst, def2) => {
      $ZodMap.init(inst, def2);
      ZodType2.init(inst, def2);
      inst.keyType = def2.keyType;
      inst.valueType = def2.valueType;
    });
    $constructor("ZodSet", (inst, def2) => {
      $ZodSet.init(inst, def2);
      ZodType2.init(inst, def2);
      inst.min = (...args2) => inst.check(_minSize(...args2));
      inst.nonempty = (params) => inst.check(_minSize(1, params));
      inst.max = (...args2) => inst.check(_maxSize(...args2));
      inst.size = (...args2) => inst.check(_size(...args2));
    });
    ZodEnum2 = $constructor("ZodEnum", (inst, def2) => {
      $ZodEnum.init(inst, def2);
      ZodType2.init(inst, def2);
      inst.enum = def2.entries;
      inst.options = Object.values(def2.entries);
      const keys2 = new Set(Object.keys(def2.entries));
      inst.extract = (values, params) => {
        const newEntries = {};
        for (const value of values) {
          if (keys2.has(value)) {
            newEntries[value] = def2.entries[value];
          } else
            throw new Error(`Key ${value} not found in enum`);
        }
        return new ZodEnum2({
          ...def2,
          checks: [],
          ...normalizeParams(params),
          entries: newEntries
        });
      };
      inst.exclude = (values, params) => {
        const newEntries = { ...def2.entries };
        for (const value of values) {
          if (keys2.has(value)) {
            delete newEntries[value];
          } else
            throw new Error(`Key ${value} not found in enum`);
        }
        return new ZodEnum2({
          ...def2,
          checks: [],
          ...normalizeParams(params),
          entries: newEntries
        });
      };
    });
    ZodLiteral2 = $constructor("ZodLiteral", (inst, def2) => {
      $ZodLiteral.init(inst, def2);
      ZodType2.init(inst, def2);
      inst.values = new Set(def2.values);
      Object.defineProperty(inst, "value", {
        get() {
          if (def2.values.length > 1) {
            throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");
          }
          return def2.values[0];
        }
      });
    });
    $constructor("ZodFile", (inst, def2) => {
      $ZodFile.init(inst, def2);
      ZodType2.init(inst, def2);
      inst.min = (size, params) => inst.check(_minSize(size, params));
      inst.max = (size, params) => inst.check(_maxSize(size, params));
      inst.mime = (types2, params) => inst.check(_mime(Array.isArray(types2) ? types2 : [types2], params));
    });
    ZodTransform = $constructor("ZodTransform", (inst, def2) => {
      $ZodTransform.init(inst, def2);
      ZodType2.init(inst, def2);
      inst._zod.parse = (payload, _ctx) => {
        payload.addIssue = (issue$1) => {
          if (typeof issue$1 === "string") {
            payload.issues.push(issue(issue$1, payload.value, def2));
          } else {
            const _issue = issue$1;
            if (_issue.fatal)
              _issue.continue = false;
            _issue.code ?? (_issue.code = "custom");
            _issue.input ?? (_issue.input = payload.value);
            _issue.inst ?? (_issue.inst = inst);
            _issue.continue ?? (_issue.continue = true);
            payload.issues.push(issue(_issue));
          }
        };
        const output = def2.transform(payload.value, payload);
        if (output instanceof Promise) {
          return output.then((output2) => {
            payload.value = output2;
            return payload;
          });
        }
        payload.value = output;
        return payload;
      };
    });
    ZodOptional2 = $constructor("ZodOptional", (inst, def2) => {
      $ZodOptional.init(inst, def2);
      ZodType2.init(inst, def2);
      inst.unwrap = () => inst._zod.def.innerType;
    });
    ZodNullable2 = $constructor("ZodNullable", (inst, def2) => {
      $ZodNullable.init(inst, def2);
      ZodType2.init(inst, def2);
      inst.unwrap = () => inst._zod.def.innerType;
    });
    ZodDefault2 = $constructor("ZodDefault", (inst, def2) => {
      $ZodDefault.init(inst, def2);
      ZodType2.init(inst, def2);
      inst.unwrap = () => inst._zod.def.innerType;
      inst.removeDefault = inst.unwrap;
    });
    ZodPrefault = $constructor("ZodPrefault", (inst, def2) => {
      $ZodPrefault.init(inst, def2);
      ZodType2.init(inst, def2);
      inst.unwrap = () => inst._zod.def.innerType;
    });
    ZodNonOptional = $constructor("ZodNonOptional", (inst, def2) => {
      $ZodNonOptional.init(inst, def2);
      ZodType2.init(inst, def2);
      inst.unwrap = () => inst._zod.def.innerType;
    });
    $constructor("ZodSuccess", (inst, def2) => {
      $ZodSuccess.init(inst, def2);
      ZodType2.init(inst, def2);
      inst.unwrap = () => inst._zod.def.innerType;
    });
    ZodCatch2 = $constructor("ZodCatch", (inst, def2) => {
      $ZodCatch.init(inst, def2);
      ZodType2.init(inst, def2);
      inst.unwrap = () => inst._zod.def.innerType;
      inst.removeCatch = inst.unwrap;
    });
    $constructor("ZodNaN", (inst, def2) => {
      $ZodNaN.init(inst, def2);
      ZodType2.init(inst, def2);
    });
    ZodPipe = $constructor("ZodPipe", (inst, def2) => {
      $ZodPipe.init(inst, def2);
      ZodType2.init(inst, def2);
      inst.in = def2.in;
      inst.out = def2.out;
    });
    ZodReadonly2 = $constructor("ZodReadonly", (inst, def2) => {
      $ZodReadonly.init(inst, def2);
      ZodType2.init(inst, def2);
    });
    $constructor("ZodTemplateLiteral", (inst, def2) => {
      $ZodTemplateLiteral.init(inst, def2);
      ZodType2.init(inst, def2);
    });
    $constructor("ZodLazy", (inst, def2) => {
      $ZodLazy.init(inst, def2);
      ZodType2.init(inst, def2);
      inst.unwrap = () => inst._zod.def.getter();
    });
    $constructor("ZodPromise", (inst, def2) => {
      $ZodPromise.init(inst, def2);
      ZodType2.init(inst, def2);
      inst.unwrap = () => inst._zod.def.innerType;
    });
    ZodCustom = $constructor("ZodCustom", (inst, def2) => {
      $ZodCustom.init(inst, def2);
      ZodType2.init(inst, def2);
    });
    LATEST_PROTOCOL_VERSION = "2025-11-25";
    SUPPORTED_PROTOCOL_VERSIONS = [LATEST_PROTOCOL_VERSION, "2025-06-18", "2025-03-26", "2024-11-05", "2024-10-07"];
    RELATED_TASK_META_KEY = "io.modelcontextprotocol/related-task";
    JSONRPC_VERSION = "2.0";
    AssertObjectSchema = custom((v) => v !== null && (typeof v === "object" || typeof v === "function"));
    ProgressTokenSchema = union([string(), number().int()]);
    CursorSchema = string();
    looseObject({
      ttl: union([number(), _null()]).optional(),
      pollInterval: number().optional()
    });
    TaskMetadataSchema = object({
      ttl: number().optional()
    });
    RelatedTaskMetadataSchema = object({
      taskId: string()
    });
    RequestMetaSchema = looseObject({
      progressToken: ProgressTokenSchema.optional(),
      [RELATED_TASK_META_KEY]: RelatedTaskMetadataSchema.optional()
    });
    BaseRequestParamsSchema = object({
      _meta: RequestMetaSchema.optional()
    });
    TaskAugmentedRequestParamsSchema = BaseRequestParamsSchema.extend({
      task: TaskMetadataSchema.optional()
    });
    isTaskAugmentedRequestParams = (value) => TaskAugmentedRequestParamsSchema.safeParse(value).success;
    RequestSchema = object({
      method: string(),
      params: BaseRequestParamsSchema.loose().optional()
    });
    NotificationsParamsSchema = object({
      _meta: RequestMetaSchema.optional()
    });
    NotificationSchema = object({
      method: string(),
      params: NotificationsParamsSchema.loose().optional()
    });
    ResultSchema = looseObject({
      _meta: RequestMetaSchema.optional()
    });
    RequestIdSchema = union([string(), number().int()]);
    JSONRPCRequestSchema = object({
      jsonrpc: literal(JSONRPC_VERSION),
      id: RequestIdSchema,
      ...RequestSchema.shape
    }).strict();
    isJSONRPCRequest = (value) => JSONRPCRequestSchema.safeParse(value).success;
    JSONRPCNotificationSchema = object({
      jsonrpc: literal(JSONRPC_VERSION),
      ...NotificationSchema.shape
    }).strict();
    isJSONRPCNotification = (value) => JSONRPCNotificationSchema.safeParse(value).success;
    JSONRPCResultResponseSchema = object({
      jsonrpc: literal(JSONRPC_VERSION),
      id: RequestIdSchema,
      result: ResultSchema
    }).strict();
    isJSONRPCResultResponse = (value) => JSONRPCResultResponseSchema.safeParse(value).success;
    (function(ErrorCode2) {
      ErrorCode2[ErrorCode2["ConnectionClosed"] = -32e3] = "ConnectionClosed";
      ErrorCode2[ErrorCode2["RequestTimeout"] = -32001] = "RequestTimeout";
      ErrorCode2[ErrorCode2["ParseError"] = -32700] = "ParseError";
      ErrorCode2[ErrorCode2["InvalidRequest"] = -32600] = "InvalidRequest";
      ErrorCode2[ErrorCode2["MethodNotFound"] = -32601] = "MethodNotFound";
      ErrorCode2[ErrorCode2["InvalidParams"] = -32602] = "InvalidParams";
      ErrorCode2[ErrorCode2["InternalError"] = -32603] = "InternalError";
      ErrorCode2[ErrorCode2["UrlElicitationRequired"] = -32042] = "UrlElicitationRequired";
    })(ErrorCode$1 || (ErrorCode$1 = {}));
    JSONRPCErrorResponseSchema = object({
      jsonrpc: literal(JSONRPC_VERSION),
      id: RequestIdSchema.optional(),
      error: object({
        code: number().int(),
        message: string(),
        data: unknown().optional()
      })
    }).strict();
    isJSONRPCErrorResponse = (value) => JSONRPCErrorResponseSchema.safeParse(value).success;
    JSONRPCMessageSchema = union([
      JSONRPCRequestSchema,
      JSONRPCNotificationSchema,
      JSONRPCResultResponseSchema,
      JSONRPCErrorResponseSchema
    ]);
    union([JSONRPCResultResponseSchema, JSONRPCErrorResponseSchema]);
    EmptyResultSchema = ResultSchema.strict();
    CancelledNotificationParamsSchema = NotificationsParamsSchema.extend({
      requestId: RequestIdSchema.optional(),
      reason: string().optional()
    });
    CancelledNotificationSchema = NotificationSchema.extend({
      method: literal("notifications/cancelled"),
      params: CancelledNotificationParamsSchema
    });
    IconSchema = object({
      src: string(),
      mimeType: string().optional(),
      sizes: array(string()).optional(),
      theme: _enum$2(["light", "dark"]).optional()
    });
    IconsSchema = object({
      icons: array(IconSchema).optional()
    });
    BaseMetadataSchema = object({
      name: string(),
      title: string().optional()
    });
    ImplementationSchema = BaseMetadataSchema.extend({
      ...BaseMetadataSchema.shape,
      ...IconsSchema.shape,
      version: string(),
      websiteUrl: string().optional(),
      description: string().optional()
    });
    FormElicitationCapabilitySchema = intersection(object({
      applyDefaults: boolean().optional()
    }), record(string(), unknown()));
    ElicitationCapabilitySchema = preprocess((value) => {
      if (value && typeof value === "object" && !Array.isArray(value)) {
        if (Object.keys(value).length === 0) {
          return { form: {} };
        }
      }
      return value;
    }, intersection(object({
      form: FormElicitationCapabilitySchema.optional(),
      url: AssertObjectSchema.optional()
    }), record(string(), unknown()).optional()));
    ClientTasksCapabilitySchema = looseObject({
      list: AssertObjectSchema.optional(),
      cancel: AssertObjectSchema.optional(),
      requests: looseObject({
        sampling: looseObject({
          createMessage: AssertObjectSchema.optional()
        }).optional(),
        elicitation: looseObject({
          create: AssertObjectSchema.optional()
        }).optional()
      }).optional()
    });
    ServerTasksCapabilitySchema = looseObject({
      list: AssertObjectSchema.optional(),
      cancel: AssertObjectSchema.optional(),
      requests: looseObject({
        tools: looseObject({
          call: AssertObjectSchema.optional()
        }).optional()
      }).optional()
    });
    ClientCapabilitiesSchema = object({
      experimental: record(string(), AssertObjectSchema).optional(),
      sampling: object({
        context: AssertObjectSchema.optional(),
        tools: AssertObjectSchema.optional()
      }).optional(),
      elicitation: ElicitationCapabilitySchema.optional(),
      roots: object({
        listChanged: boolean().optional()
      }).optional(),
      tasks: ClientTasksCapabilitySchema.optional()
    });
    InitializeRequestParamsSchema = BaseRequestParamsSchema.extend({
      protocolVersion: string(),
      capabilities: ClientCapabilitiesSchema,
      clientInfo: ImplementationSchema
    });
    InitializeRequestSchema = RequestSchema.extend({
      method: literal("initialize"),
      params: InitializeRequestParamsSchema
    });
    ServerCapabilitiesSchema = object({
      experimental: record(string(), AssertObjectSchema).optional(),
      logging: AssertObjectSchema.optional(),
      completions: AssertObjectSchema.optional(),
      prompts: object({
        listChanged: boolean().optional()
      }).optional(),
      resources: object({
        subscribe: boolean().optional(),
        listChanged: boolean().optional()
      }).optional(),
      tools: object({
        listChanged: boolean().optional()
      }).optional(),
      tasks: ServerTasksCapabilitySchema.optional()
    });
    InitializeResultSchema = ResultSchema.extend({
      protocolVersion: string(),
      capabilities: ServerCapabilitiesSchema,
      serverInfo: ImplementationSchema,
      instructions: string().optional()
    });
    InitializedNotificationSchema = NotificationSchema.extend({
      method: literal("notifications/initialized"),
      params: NotificationsParamsSchema.optional()
    });
    PingRequestSchema = RequestSchema.extend({
      method: literal("ping"),
      params: BaseRequestParamsSchema.optional()
    });
    ProgressSchema = object({
      progress: number(),
      total: optional(number()),
      message: optional(string())
    });
    ProgressNotificationParamsSchema = object({
      ...NotificationsParamsSchema.shape,
      ...ProgressSchema.shape,
      progressToken: ProgressTokenSchema
    });
    ProgressNotificationSchema = NotificationSchema.extend({
      method: literal("notifications/progress"),
      params: ProgressNotificationParamsSchema
    });
    PaginatedRequestParamsSchema = BaseRequestParamsSchema.extend({
      cursor: CursorSchema.optional()
    });
    PaginatedRequestSchema = RequestSchema.extend({
      params: PaginatedRequestParamsSchema.optional()
    });
    PaginatedResultSchema = ResultSchema.extend({
      nextCursor: CursorSchema.optional()
    });
    TaskStatusSchema = _enum$2(["working", "input_required", "completed", "failed", "cancelled"]);
    TaskSchema = object({
      taskId: string(),
      status: TaskStatusSchema,
      ttl: union([number(), _null()]),
      createdAt: string(),
      lastUpdatedAt: string(),
      pollInterval: optional(number()),
      statusMessage: optional(string())
    });
    CreateTaskResultSchema = ResultSchema.extend({
      task: TaskSchema
    });
    TaskStatusNotificationParamsSchema = NotificationsParamsSchema.merge(TaskSchema);
    TaskStatusNotificationSchema = NotificationSchema.extend({
      method: literal("notifications/tasks/status"),
      params: TaskStatusNotificationParamsSchema
    });
    GetTaskRequestSchema = RequestSchema.extend({
      method: literal("tasks/get"),
      params: BaseRequestParamsSchema.extend({
        taskId: string()
      })
    });
    GetTaskResultSchema = ResultSchema.merge(TaskSchema);
    GetTaskPayloadRequestSchema = RequestSchema.extend({
      method: literal("tasks/result"),
      params: BaseRequestParamsSchema.extend({
        taskId: string()
      })
    });
    ResultSchema.loose();
    ListTasksRequestSchema = PaginatedRequestSchema.extend({
      method: literal("tasks/list")
    });
    ListTasksResultSchema = PaginatedResultSchema.extend({
      tasks: array(TaskSchema)
    });
    CancelTaskRequestSchema = RequestSchema.extend({
      method: literal("tasks/cancel"),
      params: BaseRequestParamsSchema.extend({
        taskId: string()
      })
    });
    CancelTaskResultSchema = ResultSchema.merge(TaskSchema);
    ResourceContentsSchema = object({
      uri: string(),
      mimeType: optional(string()),
      _meta: record(string(), unknown()).optional()
    });
    TextResourceContentsSchema = ResourceContentsSchema.extend({
      text: string()
    });
    Base64Schema = string().refine((val) => {
      try {
        atob(val);
        return true;
      } catch {
        return false;
      }
    }, { message: "Invalid Base64 string" });
    BlobResourceContentsSchema = ResourceContentsSchema.extend({
      blob: Base64Schema
    });
    RoleSchema = _enum$2(["user", "assistant"]);
    AnnotationsSchema = object({
      audience: array(RoleSchema).optional(),
      priority: number().min(0).max(1).optional(),
      lastModified: datetime({ offset: true }).optional()
    });
    ResourceSchema = object({
      ...BaseMetadataSchema.shape,
      ...IconsSchema.shape,
      uri: string(),
      description: optional(string()),
      mimeType: optional(string()),
      annotations: AnnotationsSchema.optional(),
      _meta: optional(looseObject({}))
    });
    ResourceTemplateSchema = object({
      ...BaseMetadataSchema.shape,
      ...IconsSchema.shape,
      uriTemplate: string(),
      description: optional(string()),
      mimeType: optional(string()),
      annotations: AnnotationsSchema.optional(),
      _meta: optional(looseObject({}))
    });
    ListResourcesRequestSchema = PaginatedRequestSchema.extend({
      method: literal("resources/list")
    });
    ListResourcesResultSchema = PaginatedResultSchema.extend({
      resources: array(ResourceSchema)
    });
    ListResourceTemplatesRequestSchema = PaginatedRequestSchema.extend({
      method: literal("resources/templates/list")
    });
    ListResourceTemplatesResultSchema = PaginatedResultSchema.extend({
      resourceTemplates: array(ResourceTemplateSchema)
    });
    ResourceRequestParamsSchema = BaseRequestParamsSchema.extend({
      uri: string()
    });
    ReadResourceRequestParamsSchema = ResourceRequestParamsSchema;
    ReadResourceRequestSchema = RequestSchema.extend({
      method: literal("resources/read"),
      params: ReadResourceRequestParamsSchema
    });
    ReadResourceResultSchema = ResultSchema.extend({
      contents: array(union([TextResourceContentsSchema, BlobResourceContentsSchema]))
    });
    ResourceListChangedNotificationSchema = NotificationSchema.extend({
      method: literal("notifications/resources/list_changed"),
      params: NotificationsParamsSchema.optional()
    });
    SubscribeRequestParamsSchema = ResourceRequestParamsSchema;
    SubscribeRequestSchema = RequestSchema.extend({
      method: literal("resources/subscribe"),
      params: SubscribeRequestParamsSchema
    });
    UnsubscribeRequestParamsSchema = ResourceRequestParamsSchema;
    UnsubscribeRequestSchema = RequestSchema.extend({
      method: literal("resources/unsubscribe"),
      params: UnsubscribeRequestParamsSchema
    });
    ResourceUpdatedNotificationParamsSchema = NotificationsParamsSchema.extend({
      uri: string()
    });
    ResourceUpdatedNotificationSchema = NotificationSchema.extend({
      method: literal("notifications/resources/updated"),
      params: ResourceUpdatedNotificationParamsSchema
    });
    PromptArgumentSchema = object({
      name: string(),
      description: optional(string()),
      required: optional(boolean())
    });
    PromptSchema = object({
      ...BaseMetadataSchema.shape,
      ...IconsSchema.shape,
      description: optional(string()),
      arguments: optional(array(PromptArgumentSchema)),
      _meta: optional(looseObject({}))
    });
    ListPromptsRequestSchema = PaginatedRequestSchema.extend({
      method: literal("prompts/list")
    });
    ListPromptsResultSchema = PaginatedResultSchema.extend({
      prompts: array(PromptSchema)
    });
    GetPromptRequestParamsSchema = BaseRequestParamsSchema.extend({
      name: string(),
      arguments: record(string(), string()).optional()
    });
    GetPromptRequestSchema = RequestSchema.extend({
      method: literal("prompts/get"),
      params: GetPromptRequestParamsSchema
    });
    TextContentSchema = object({
      type: literal("text"),
      text: string(),
      annotations: AnnotationsSchema.optional(),
      _meta: record(string(), unknown()).optional()
    });
    ImageContentSchema = object({
      type: literal("image"),
      data: Base64Schema,
      mimeType: string(),
      annotations: AnnotationsSchema.optional(),
      _meta: record(string(), unknown()).optional()
    });
    AudioContentSchema = object({
      type: literal("audio"),
      data: Base64Schema,
      mimeType: string(),
      annotations: AnnotationsSchema.optional(),
      _meta: record(string(), unknown()).optional()
    });
    ToolUseContentSchema = object({
      type: literal("tool_use"),
      name: string(),
      id: string(),
      input: record(string(), unknown()),
      _meta: record(string(), unknown()).optional()
    });
    EmbeddedResourceSchema = object({
      type: literal("resource"),
      resource: union([TextResourceContentsSchema, BlobResourceContentsSchema]),
      annotations: AnnotationsSchema.optional(),
      _meta: record(string(), unknown()).optional()
    });
    ResourceLinkSchema = ResourceSchema.extend({
      type: literal("resource_link")
    });
    ContentBlockSchema = union([
      TextContentSchema,
      ImageContentSchema,
      AudioContentSchema,
      ResourceLinkSchema,
      EmbeddedResourceSchema
    ]);
    PromptMessageSchema = object({
      role: RoleSchema,
      content: ContentBlockSchema
    });
    GetPromptResultSchema = ResultSchema.extend({
      description: string().optional(),
      messages: array(PromptMessageSchema)
    });
    PromptListChangedNotificationSchema = NotificationSchema.extend({
      method: literal("notifications/prompts/list_changed"),
      params: NotificationsParamsSchema.optional()
    });
    ToolAnnotationsSchema = object({
      title: string().optional(),
      readOnlyHint: boolean().optional(),
      destructiveHint: boolean().optional(),
      idempotentHint: boolean().optional(),
      openWorldHint: boolean().optional()
    });
    ToolExecutionSchema = object({
      taskSupport: _enum$2(["required", "optional", "forbidden"]).optional()
    });
    ToolSchema = object({
      ...BaseMetadataSchema.shape,
      ...IconsSchema.shape,
      description: string().optional(),
      inputSchema: object({
        type: literal("object"),
        properties: record(string(), AssertObjectSchema).optional(),
        required: array(string()).optional()
      }).catchall(unknown()),
      outputSchema: object({
        type: literal("object"),
        properties: record(string(), AssertObjectSchema).optional(),
        required: array(string()).optional()
      }).catchall(unknown()).optional(),
      annotations: ToolAnnotationsSchema.optional(),
      execution: ToolExecutionSchema.optional(),
      _meta: record(string(), unknown()).optional()
    });
    ListToolsRequestSchema = PaginatedRequestSchema.extend({
      method: literal("tools/list")
    });
    ListToolsResultSchema = PaginatedResultSchema.extend({
      tools: array(ToolSchema)
    });
    CallToolResultSchema = ResultSchema.extend({
      content: array(ContentBlockSchema).default([]),
      structuredContent: record(string(), unknown()).optional(),
      isError: boolean().optional()
    });
    CallToolResultSchema.or(ResultSchema.extend({
      toolResult: unknown()
    }));
    CallToolRequestParamsSchema = TaskAugmentedRequestParamsSchema.extend({
      name: string(),
      arguments: record(string(), unknown()).optional()
    });
    CallToolRequestSchema = RequestSchema.extend({
      method: literal("tools/call"),
      params: CallToolRequestParamsSchema
    });
    ToolListChangedNotificationSchema = NotificationSchema.extend({
      method: literal("notifications/tools/list_changed"),
      params: NotificationsParamsSchema.optional()
    });
    ListChangedOptionsBaseSchema = object({
      autoRefresh: boolean().default(true),
      debounceMs: number().int().nonnegative().default(300)
    });
    LoggingLevelSchema = _enum$2(["debug", "info", "notice", "warning", "error", "critical", "alert", "emergency"]);
    SetLevelRequestParamsSchema = BaseRequestParamsSchema.extend({
      level: LoggingLevelSchema
    });
    SetLevelRequestSchema = RequestSchema.extend({
      method: literal("logging/setLevel"),
      params: SetLevelRequestParamsSchema
    });
    LoggingMessageNotificationParamsSchema = NotificationsParamsSchema.extend({
      level: LoggingLevelSchema,
      logger: string().optional(),
      data: unknown()
    });
    LoggingMessageNotificationSchema = NotificationSchema.extend({
      method: literal("notifications/message"),
      params: LoggingMessageNotificationParamsSchema
    });
    ModelHintSchema = object({
      name: string().optional()
    });
    ModelPreferencesSchema = object({
      hints: array(ModelHintSchema).optional(),
      costPriority: number().min(0).max(1).optional(),
      speedPriority: number().min(0).max(1).optional(),
      intelligencePriority: number().min(0).max(1).optional()
    });
    ToolChoiceSchema = object({
      mode: _enum$2(["auto", "required", "none"]).optional()
    });
    ToolResultContentSchema = object({
      type: literal("tool_result"),
      toolUseId: string().describe("The unique identifier for the corresponding tool call."),
      content: array(ContentBlockSchema).default([]),
      structuredContent: object({}).loose().optional(),
      isError: boolean().optional(),
      _meta: record(string(), unknown()).optional()
    });
    SamplingContentSchema = discriminatedUnion("type", [TextContentSchema, ImageContentSchema, AudioContentSchema]);
    SamplingMessageContentBlockSchema = discriminatedUnion("type", [
      TextContentSchema,
      ImageContentSchema,
      AudioContentSchema,
      ToolUseContentSchema,
      ToolResultContentSchema
    ]);
    SamplingMessageSchema = object({
      role: RoleSchema,
      content: union([SamplingMessageContentBlockSchema, array(SamplingMessageContentBlockSchema)]),
      _meta: record(string(), unknown()).optional()
    });
    CreateMessageRequestParamsSchema = TaskAugmentedRequestParamsSchema.extend({
      messages: array(SamplingMessageSchema),
      modelPreferences: ModelPreferencesSchema.optional(),
      systemPrompt: string().optional(),
      includeContext: _enum$2(["none", "thisServer", "allServers"]).optional(),
      temperature: number().optional(),
      maxTokens: number().int(),
      stopSequences: array(string()).optional(),
      metadata: AssertObjectSchema.optional(),
      tools: array(ToolSchema).optional(),
      toolChoice: ToolChoiceSchema.optional()
    });
    CreateMessageRequestSchema = RequestSchema.extend({
      method: literal("sampling/createMessage"),
      params: CreateMessageRequestParamsSchema
    });
    CreateMessageResultSchema = ResultSchema.extend({
      model: string(),
      stopReason: optional(_enum$2(["endTurn", "stopSequence", "maxTokens"]).or(string())),
      role: RoleSchema,
      content: SamplingContentSchema
    });
    CreateMessageResultWithToolsSchema = ResultSchema.extend({
      model: string(),
      stopReason: optional(_enum$2(["endTurn", "stopSequence", "maxTokens", "toolUse"]).or(string())),
      role: RoleSchema,
      content: union([SamplingMessageContentBlockSchema, array(SamplingMessageContentBlockSchema)])
    });
    BooleanSchemaSchema = object({
      type: literal("boolean"),
      title: string().optional(),
      description: string().optional(),
      default: boolean().optional()
    });
    StringSchemaSchema = object({
      type: literal("string"),
      title: string().optional(),
      description: string().optional(),
      minLength: number().optional(),
      maxLength: number().optional(),
      format: _enum$2(["email", "uri", "date", "date-time"]).optional(),
      default: string().optional()
    });
    NumberSchemaSchema = object({
      type: _enum$2(["number", "integer"]),
      title: string().optional(),
      description: string().optional(),
      minimum: number().optional(),
      maximum: number().optional(),
      default: number().optional()
    });
    UntitledSingleSelectEnumSchemaSchema = object({
      type: literal("string"),
      title: string().optional(),
      description: string().optional(),
      enum: array(string()),
      default: string().optional()
    });
    TitledSingleSelectEnumSchemaSchema = object({
      type: literal("string"),
      title: string().optional(),
      description: string().optional(),
      oneOf: array(object({
        const: string(),
        title: string()
      })),
      default: string().optional()
    });
    LegacyTitledEnumSchemaSchema = object({
      type: literal("string"),
      title: string().optional(),
      description: string().optional(),
      enum: array(string()),
      enumNames: array(string()).optional(),
      default: string().optional()
    });
    SingleSelectEnumSchemaSchema = union([UntitledSingleSelectEnumSchemaSchema, TitledSingleSelectEnumSchemaSchema]);
    UntitledMultiSelectEnumSchemaSchema = object({
      type: literal("array"),
      title: string().optional(),
      description: string().optional(),
      minItems: number().optional(),
      maxItems: number().optional(),
      items: object({
        type: literal("string"),
        enum: array(string())
      }),
      default: array(string()).optional()
    });
    TitledMultiSelectEnumSchemaSchema = object({
      type: literal("array"),
      title: string().optional(),
      description: string().optional(),
      minItems: number().optional(),
      maxItems: number().optional(),
      items: object({
        anyOf: array(object({
          const: string(),
          title: string()
        }))
      }),
      default: array(string()).optional()
    });
    MultiSelectEnumSchemaSchema = union([UntitledMultiSelectEnumSchemaSchema, TitledMultiSelectEnumSchemaSchema]);
    EnumSchemaSchema = union([LegacyTitledEnumSchemaSchema, SingleSelectEnumSchemaSchema, MultiSelectEnumSchemaSchema]);
    PrimitiveSchemaDefinitionSchema = union([EnumSchemaSchema, BooleanSchemaSchema, StringSchemaSchema, NumberSchemaSchema]);
    ElicitRequestFormParamsSchema = TaskAugmentedRequestParamsSchema.extend({
      mode: literal("form").optional(),
      message: string(),
      requestedSchema: object({
        type: literal("object"),
        properties: record(string(), PrimitiveSchemaDefinitionSchema),
        required: array(string()).optional()
      })
    });
    ElicitRequestURLParamsSchema = TaskAugmentedRequestParamsSchema.extend({
      mode: literal("url"),
      message: string(),
      elicitationId: string(),
      url: string().url()
    });
    ElicitRequestParamsSchema = union([ElicitRequestFormParamsSchema, ElicitRequestURLParamsSchema]);
    ElicitRequestSchema = RequestSchema.extend({
      method: literal("elicitation/create"),
      params: ElicitRequestParamsSchema
    });
    ElicitationCompleteNotificationParamsSchema = NotificationsParamsSchema.extend({
      elicitationId: string()
    });
    ElicitationCompleteNotificationSchema = NotificationSchema.extend({
      method: literal("notifications/elicitation/complete"),
      params: ElicitationCompleteNotificationParamsSchema
    });
    ElicitResultSchema = ResultSchema.extend({
      action: _enum$2(["accept", "decline", "cancel"]),
      content: preprocess((val) => val === null ? void 0 : val, record(string(), union([string(), number(), boolean(), array(string())])).optional())
    });
    ResourceTemplateReferenceSchema = object({
      type: literal("ref/resource"),
      uri: string()
    });
    PromptReferenceSchema = object({
      type: literal("ref/prompt"),
      name: string()
    });
    CompleteRequestParamsSchema = BaseRequestParamsSchema.extend({
      ref: union([PromptReferenceSchema, ResourceTemplateReferenceSchema]),
      argument: object({
        name: string(),
        value: string()
      }),
      context: object({
        arguments: record(string(), string()).optional()
      }).optional()
    });
    CompleteRequestSchema = RequestSchema.extend({
      method: literal("completion/complete"),
      params: CompleteRequestParamsSchema
    });
    CompleteResultSchema = ResultSchema.extend({
      completion: looseObject({
        values: array(string()).max(100),
        total: optional(number().int()),
        hasMore: optional(boolean())
      })
    });
    RootSchema = object({
      uri: string().startsWith("file://"),
      name: string().optional(),
      _meta: record(string(), unknown()).optional()
    });
    ListRootsRequestSchema = RequestSchema.extend({
      method: literal("roots/list"),
      params: BaseRequestParamsSchema.optional()
    });
    ListRootsResultSchema = ResultSchema.extend({
      roots: array(RootSchema)
    });
    RootsListChangedNotificationSchema = NotificationSchema.extend({
      method: literal("notifications/roots/list_changed"),
      params: NotificationsParamsSchema.optional()
    });
    union([
      PingRequestSchema,
      InitializeRequestSchema,
      CompleteRequestSchema,
      SetLevelRequestSchema,
      GetPromptRequestSchema,
      ListPromptsRequestSchema,
      ListResourcesRequestSchema,
      ListResourceTemplatesRequestSchema,
      ReadResourceRequestSchema,
      SubscribeRequestSchema,
      UnsubscribeRequestSchema,
      CallToolRequestSchema,
      ListToolsRequestSchema,
      GetTaskRequestSchema,
      GetTaskPayloadRequestSchema,
      ListTasksRequestSchema,
      CancelTaskRequestSchema
    ]);
    union([
      CancelledNotificationSchema,
      ProgressNotificationSchema,
      InitializedNotificationSchema,
      RootsListChangedNotificationSchema,
      TaskStatusNotificationSchema
    ]);
    union([
      EmptyResultSchema,
      CreateMessageResultSchema,
      CreateMessageResultWithToolsSchema,
      ElicitResultSchema,
      ListRootsResultSchema,
      GetTaskResultSchema,
      ListTasksResultSchema,
      CreateTaskResultSchema
    ]);
    union([
      PingRequestSchema,
      CreateMessageRequestSchema,
      ElicitRequestSchema,
      ListRootsRequestSchema,
      GetTaskRequestSchema,
      GetTaskPayloadRequestSchema,
      ListTasksRequestSchema,
      CancelTaskRequestSchema
    ]);
    union([
      CancelledNotificationSchema,
      ProgressNotificationSchema,
      LoggingMessageNotificationSchema,
      ResourceUpdatedNotificationSchema,
      ResourceListChangedNotificationSchema,
      ToolListChangedNotificationSchema,
      PromptListChangedNotificationSchema,
      TaskStatusNotificationSchema,
      ElicitationCompleteNotificationSchema
    ]);
    union([
      EmptyResultSchema,
      InitializeResultSchema,
      CompleteResultSchema,
      GetPromptResultSchema,
      ListPromptsResultSchema,
      ListResourcesResultSchema,
      ListResourceTemplatesResultSchema,
      ReadResourceResultSchema,
      CallToolResultSchema,
      ListToolsResultSchema,
      GetTaskResultSchema,
      ListTasksResultSchema,
      CreateTaskResultSchema
    ]);
    McpError = class _McpError extends Error {
      constructor(code2, message, data32) {
        super(`MCP error ${code2}: ${message}`);
        this.code = code2;
        this.data = data32;
        this.name = "McpError";
      }
      static fromError(code2, message, data32) {
        if (code2 === ErrorCode$1.UrlElicitationRequired && data32) {
          const errorData = data32;
          if (errorData.elicitations) {
            return new UrlElicitationRequiredError(errorData.elicitations, message);
          }
        }
        return new _McpError(code2, message, data32);
      }
    };
    UrlElicitationRequiredError = class extends McpError {
      constructor(elicitations, message = `URL elicitation${elicitations.length > 1 ? "s" : ""} required`) {
        super(ErrorCode$1.UrlElicitationRequired, message, {
          elicitations
        });
      }
      get elicitations() {
        return this.data?.elicitations ?? [];
      }
    };
    ignoreOverride = Symbol("Let zodToJsonSchema decide on which parser to use");
    defaultOptions = {
      name: void 0,
      $refStrategy: "root",
      basePath: ["#"],
      effectStrategy: "input",
      pipeStrategy: "all",
      dateStrategy: "format:date-time",
      mapStrategy: "entries",
      removeAdditionalStrategy: "passthrough",
      allowedAdditionalProperties: true,
      rejectedAdditionalProperties: false,
      definitionPath: "definitions",
      target: "jsonSchema7",
      strictUnions: false,
      definitions: {},
      errorMessages: false,
      markdownDescription: false,
      patternStrategy: "escape",
      applyRegexFlags: false,
      emailStrategy: "format:email",
      base64Strategy: "contentEncoding:base64",
      nameStrategy: "ref",
      openAiAnyTypeName: "OpenAiAnyType"
    };
    getDefaultOptions = (options2) => typeof options2 === "string" ? {
      ...defaultOptions,
      name: options2
    } : {
      ...defaultOptions,
      ...options2
    };
    getRefs = (options2) => {
      const _options = getDefaultOptions(options2);
      const currentPath = _options.name !== void 0 ? [..._options.basePath, _options.definitionPath, _options.name] : _options.basePath;
      return {
        ..._options,
        flags: { hasReferencedOpenAiAnyType: false },
        currentPath,
        propertyPath: void 0,
        seen: new Map(Object.entries(_options.definitions).map(([name, def2]) => [
          def2._def,
          {
            def: def2._def,
            path: [..._options.basePath, _options.definitionPath, name],
            jsonSchema: void 0
          }
        ]))
      };
    };
    getRelativePath = (pathA, pathB) => {
      let i = 0;
      for (; i < pathA.length && i < pathB.length; i++) {
        if (pathA[i] !== pathB[i])
          break;
      }
      return [(pathA.length - i).toString(), ...pathB.slice(i)].join("/");
    };
    parseCatchDef = (def2, refs) => {
      return parseDef(def2.innerType._def, refs);
    };
    integerDateParser = (def2, refs) => {
      const res = {
        type: "integer",
        format: "unix-time"
      };
      if (refs.target === "openApi3") {
        return res;
      }
      for (const check2 of def2.checks) {
        switch (check2.kind) {
          case "min":
            setResponseValueAndErrors(
              res,
              "minimum",
              check2.value,
              check2.message,
              refs
            );
            break;
          case "max":
            setResponseValueAndErrors(
              res,
              "maximum",
              check2.value,
              check2.message,
              refs
            );
            break;
        }
      }
      return res;
    };
    isJsonSchema7AllOfType = (type2) => {
      if ("type" in type2 && type2.type === "string")
        return false;
      return "allOf" in type2;
    };
    emojiRegex = void 0;
    zodPatterns = {
      cuid: /^[cC][^\s-]{8,}$/,
      cuid2: /^[0-9a-z]+$/,
      ulid: /^[0-9A-HJKMNP-TV-Z]{26}$/,
      email: /^(?!\.)(?!.*\.\.)([a-zA-Z0-9_'+\-\.]*)[a-zA-Z0-9_+-]@([a-zA-Z0-9][a-zA-Z0-9\-]*\.)+[a-zA-Z]{2,}$/,
      emoji: () => {
        if (emojiRegex === void 0) {
          emojiRegex = RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$", "u");
        }
        return emojiRegex;
      },
      uuid: /^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/,
      ipv4: /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,
      ipv4Cidr: /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,
      ipv6: /^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/,
      ipv6Cidr: /^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,
      base64: /^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,
      base64url: /^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,
      nanoid: /^[a-zA-Z0-9_-]{21}$/,
      jwt: /^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/
    };
    ALPHA_NUMERIC = new Set("ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvxyz0123456789");
    primitiveMappings = {
      ZodString: "string",
      ZodNumber: "number",
      ZodBigInt: "integer",
      ZodBoolean: "boolean",
      ZodNull: "null"
    };
    asAnyOf = (def2, refs) => {
      const anyOf2 = (def2.options instanceof Map ? Array.from(def2.options.values()) : def2.options).map((x, i) => parseDef(x._def, {
        ...refs,
        currentPath: [...refs.currentPath, "anyOf", `${i}`]
      })).filter((x) => !!x && (!refs.strictUnions || typeof x === "object" && Object.keys(x).length > 0));
      return anyOf2.length ? { anyOf: anyOf2 } : void 0;
    };
    parseOptionalDef = (def2, refs) => {
      if (refs.currentPath.toString() === refs.propertyPath?.toString()) {
        return parseDef(def2.innerType._def, refs);
      }
      const innerSchema = parseDef(def2.innerType._def, {
        ...refs,
        currentPath: [...refs.currentPath, "anyOf", "1"]
      });
      return innerSchema ? {
        anyOf: [
          {
            not: parseAnyDef(refs)
          },
          innerSchema
        ]
      } : parseAnyDef(refs);
    };
    parsePipelineDef = (def2, refs) => {
      if (refs.pipeStrategy === "input") {
        return parseDef(def2.in._def, refs);
      } else if (refs.pipeStrategy === "output") {
        return parseDef(def2.out._def, refs);
      }
      const a = parseDef(def2.in._def, {
        ...refs,
        currentPath: [...refs.currentPath, "allOf", "0"]
      });
      const b = parseDef(def2.out._def, {
        ...refs,
        currentPath: [...refs.currentPath, "allOf", a ? "1" : "0"]
      });
      return {
        allOf: [a, b].filter((x) => x !== void 0)
      };
    };
    parseReadonlyDef = (def2, refs) => {
      return parseDef(def2.innerType._def, refs);
    };
    selectParser = (def2, typeName, refs) => {
      switch (typeName) {
        case ZodFirstPartyTypeKind.ZodString:
          return parseStringDef(def2, refs);
        case ZodFirstPartyTypeKind.ZodNumber:
          return parseNumberDef(def2, refs);
        case ZodFirstPartyTypeKind.ZodObject:
          return parseObjectDef(def2, refs);
        case ZodFirstPartyTypeKind.ZodBigInt:
          return parseBigintDef(def2, refs);
        case ZodFirstPartyTypeKind.ZodBoolean:
          return parseBooleanDef();
        case ZodFirstPartyTypeKind.ZodDate:
          return parseDateDef(def2, refs);
        case ZodFirstPartyTypeKind.ZodUndefined:
          return parseUndefinedDef(refs);
        case ZodFirstPartyTypeKind.ZodNull:
          return parseNullDef(refs);
        case ZodFirstPartyTypeKind.ZodArray:
          return parseArrayDef(def2, refs);
        case ZodFirstPartyTypeKind.ZodUnion:
        case ZodFirstPartyTypeKind.ZodDiscriminatedUnion:
          return parseUnionDef(def2, refs);
        case ZodFirstPartyTypeKind.ZodIntersection:
          return parseIntersectionDef(def2, refs);
        case ZodFirstPartyTypeKind.ZodTuple:
          return parseTupleDef(def2, refs);
        case ZodFirstPartyTypeKind.ZodRecord:
          return parseRecordDef(def2, refs);
        case ZodFirstPartyTypeKind.ZodLiteral:
          return parseLiteralDef(def2, refs);
        case ZodFirstPartyTypeKind.ZodEnum:
          return parseEnumDef(def2);
        case ZodFirstPartyTypeKind.ZodNativeEnum:
          return parseNativeEnumDef(def2);
        case ZodFirstPartyTypeKind.ZodNullable:
          return parseNullableDef(def2, refs);
        case ZodFirstPartyTypeKind.ZodOptional:
          return parseOptionalDef(def2, refs);
        case ZodFirstPartyTypeKind.ZodMap:
          return parseMapDef(def2, refs);
        case ZodFirstPartyTypeKind.ZodSet:
          return parseSetDef(def2, refs);
        case ZodFirstPartyTypeKind.ZodLazy:
          return () => def2.getter()._def;
        case ZodFirstPartyTypeKind.ZodPromise:
          return parsePromiseDef(def2, refs);
        case ZodFirstPartyTypeKind.ZodNaN:
        case ZodFirstPartyTypeKind.ZodNever:
          return parseNeverDef(refs);
        case ZodFirstPartyTypeKind.ZodEffects:
          return parseEffectsDef(def2, refs);
        case ZodFirstPartyTypeKind.ZodAny:
          return parseAnyDef(refs);
        case ZodFirstPartyTypeKind.ZodUnknown:
          return parseUnknownDef(refs);
        case ZodFirstPartyTypeKind.ZodDefault:
          return parseDefaultDef(def2, refs);
        case ZodFirstPartyTypeKind.ZodBranded:
          return parseBrandedDef(def2, refs);
        case ZodFirstPartyTypeKind.ZodReadonly:
          return parseReadonlyDef(def2, refs);
        case ZodFirstPartyTypeKind.ZodCatch:
          return parseCatchDef(def2, refs);
        case ZodFirstPartyTypeKind.ZodPipeline:
          return parsePipelineDef(def2, refs);
        case ZodFirstPartyTypeKind.ZodFunction:
        case ZodFirstPartyTypeKind.ZodVoid:
        case ZodFirstPartyTypeKind.ZodSymbol:
          return void 0;
        default:
          return /* @__PURE__ */ ((_) => void 0)();
      }
    };
    get$ref = (item, refs) => {
      switch (refs.$refStrategy) {
        case "root":
          return { $ref: item.path.join("/") };
        case "relative":
          return { $ref: getRelativePath(refs.currentPath, item.path) };
        case "none":
        case "seen": {
          if (item.path.length < refs.currentPath.length && item.path.every((value, index2) => refs.currentPath[index2] === value)) {
            console.warn(`Recursive reference detected at ${refs.currentPath.join("/")}! Defaulting to any`);
            return parseAnyDef(refs);
          }
          return refs.$refStrategy === "seen" ? parseAnyDef(refs) : void 0;
        }
      }
    };
    addMeta = (def2, refs, jsonSchema) => {
      if (def2.description) {
        jsonSchema.description = def2.description;
        if (refs.markdownDescription) {
          jsonSchema.markdownDescription = def2.description;
        }
      }
      return jsonSchema;
    };
    zodToJsonSchema = (schema, options2) => {
      const refs = getRefs(options2);
      let definitions2 = typeof options2 === "object" && options2.definitions ? Object.entries(options2.definitions).reduce((acc, [name2, schema2]) => ({
        ...acc,
        [name2]: parseDef(schema2._def, {
          ...refs,
          currentPath: [...refs.basePath, refs.definitionPath, name2]
        }, true) ?? parseAnyDef(refs)
      }), {}) : void 0;
      const name = typeof options2 === "string" ? options2 : options2?.nameStrategy === "title" ? void 0 : options2?.name;
      const main2 = parseDef(schema._def, name === void 0 ? refs : {
        ...refs,
        currentPath: [...refs.basePath, refs.definitionPath, name]
      }, false) ?? parseAnyDef(refs);
      const title2 = typeof options2 === "object" && options2.name !== void 0 && options2.nameStrategy === "title" ? options2.name : void 0;
      if (title2 !== void 0) {
        main2.title = title2;
      }
      if (refs.flags.hasReferencedOpenAiAnyType) {
        if (!definitions2) {
          definitions2 = {};
        }
        if (!definitions2[refs.openAiAnyTypeName]) {
          definitions2[refs.openAiAnyTypeName] = {
            type: ["string", "number", "integer", "boolean", "array", "null"],
            items: {
              $ref: refs.$refStrategy === "relative" ? "1" : [
                ...refs.basePath,
                refs.definitionPath,
                refs.openAiAnyTypeName
              ].join("/")
            }
          };
        }
      }
      const combined = name === void 0 ? definitions2 ? {
        ...main2,
        [refs.definitionPath]: definitions2
      } : main2 : {
        $ref: [
          ...refs.$refStrategy === "relative" ? [] : refs.basePath,
          refs.definitionPath,
          name
        ].join("/"),
        [refs.definitionPath]: {
          ...definitions2,
          [name]: main2
        }
      };
      if (refs.target === "jsonSchema7") {
        combined.$schema = "http://json-schema.org/draft-07/schema#";
      } else if (refs.target === "jsonSchema2019-09" || refs.target === "openAi") {
        combined.$schema = "https://json-schema.org/draft/2019-09/schema#";
      }
      if (refs.target === "openAi" && ("anyOf" in combined || "oneOf" in combined || "allOf" in combined || "type" in combined && Array.isArray(combined.type))) {
        console.warn("Warning: OpenAI may not support schemas with unions as roots! Try wrapping it in an object property.");
      }
      return combined;
    };
    DEFAULT_REQUEST_TIMEOUT_MSEC = 6e4;
    Protocol = class {
      constructor(_options) {
        this._options = _options;
        this._requestMessageId = 0;
        this._requestHandlers = /* @__PURE__ */ new Map();
        this._requestHandlerAbortControllers = /* @__PURE__ */ new Map();
        this._notificationHandlers = /* @__PURE__ */ new Map();
        this._responseHandlers = /* @__PURE__ */ new Map();
        this._progressHandlers = /* @__PURE__ */ new Map();
        this._timeoutInfo = /* @__PURE__ */ new Map();
        this._pendingDebouncedNotifications = /* @__PURE__ */ new Set();
        this._taskProgressTokens = /* @__PURE__ */ new Map();
        this._requestResolvers = /* @__PURE__ */ new Map();
        this.setNotificationHandler(CancelledNotificationSchema, (notification) => {
          this._oncancel(notification);
        });
        this.setNotificationHandler(ProgressNotificationSchema, (notification) => {
          this._onprogress(notification);
        });
        this.setRequestHandler(
          PingRequestSchema,
          (_request) => ({})
        );
        this._taskStore = _options?.taskStore;
        this._taskMessageQueue = _options?.taskMessageQueue;
        if (this._taskStore) {
          this.setRequestHandler(GetTaskRequestSchema, async (request3, extra) => {
            const task = await this._taskStore.getTask(request3.params.taskId, extra.sessionId);
            if (!task) {
              throw new McpError(ErrorCode$1.InvalidParams, "Failed to retrieve task: Task not found");
            }
            return {
              ...task
            };
          });
          this.setRequestHandler(GetTaskPayloadRequestSchema, async (request3, extra) => {
            const handleTaskResult = async () => {
              const taskId = request3.params.taskId;
              if (this._taskMessageQueue) {
                let queuedMessage;
                while (queuedMessage = await this._taskMessageQueue.dequeue(taskId, extra.sessionId)) {
                  if (queuedMessage.type === "response" || queuedMessage.type === "error") {
                    const message = queuedMessage.message;
                    const requestId = message.id;
                    const resolver = this._requestResolvers.get(requestId);
                    if (resolver) {
                      this._requestResolvers.delete(requestId);
                      if (queuedMessage.type === "response") {
                        resolver(message);
                      } else {
                        const errorMessage = message;
                        const error = new McpError(errorMessage.error.code, errorMessage.error.message, errorMessage.error.data);
                        resolver(error);
                      }
                    } else {
                      const messageType = queuedMessage.type === "response" ? "Response" : "Error";
                      this._onerror(new Error(`${messageType} handler missing for request ${requestId}`));
                    }
                    continue;
                  }
                  await this._transport?.send(queuedMessage.message, { relatedRequestId: extra.requestId });
                }
              }
              const task = await this._taskStore.getTask(taskId, extra.sessionId);
              if (!task) {
                throw new McpError(ErrorCode$1.InvalidParams, `Task not found: ${taskId}`);
              }
              if (!isTerminal(task.status)) {
                await this._waitForTaskUpdate(taskId, extra.signal);
                return await handleTaskResult();
              }
              if (isTerminal(task.status)) {
                const result = await this._taskStore.getTaskResult(taskId, extra.sessionId);
                this._clearTaskQueue(taskId);
                return {
                  ...result,
                  _meta: {
                    ...result._meta,
                    [RELATED_TASK_META_KEY]: {
                      taskId
                    }
                  }
                };
              }
              return await handleTaskResult();
            };
            return await handleTaskResult();
          });
          this.setRequestHandler(ListTasksRequestSchema, async (request3, extra) => {
            try {
              const { tasks, nextCursor } = await this._taskStore.listTasks(request3.params?.cursor, extra.sessionId);
              return {
                tasks,
                nextCursor,
                _meta: {}
              };
            } catch (error) {
              throw new McpError(ErrorCode$1.InvalidParams, `Failed to list tasks: ${error instanceof Error ? error.message : String(error)}`);
            }
          });
          this.setRequestHandler(CancelTaskRequestSchema, async (request3, extra) => {
            try {
              const task = await this._taskStore.getTask(request3.params.taskId, extra.sessionId);
              if (!task) {
                throw new McpError(ErrorCode$1.InvalidParams, `Task not found: ${request3.params.taskId}`);
              }
              if (isTerminal(task.status)) {
                throw new McpError(ErrorCode$1.InvalidParams, `Cannot cancel task in terminal status: ${task.status}`);
              }
              await this._taskStore.updateTaskStatus(request3.params.taskId, "cancelled", "Client cancelled task execution.", extra.sessionId);
              this._clearTaskQueue(request3.params.taskId);
              const cancelledTask = await this._taskStore.getTask(request3.params.taskId, extra.sessionId);
              if (!cancelledTask) {
                throw new McpError(ErrorCode$1.InvalidParams, `Task not found after cancellation: ${request3.params.taskId}`);
              }
              return {
                _meta: {},
                ...cancelledTask
              };
            } catch (error) {
              if (error instanceof McpError) {
                throw error;
              }
              throw new McpError(ErrorCode$1.InvalidRequest, `Failed to cancel task: ${error instanceof Error ? error.message : String(error)}`);
            }
          });
        }
      }
      async _oncancel(notification) {
        if (!notification.params.requestId) {
          return;
        }
        const controller = this._requestHandlerAbortControllers.get(notification.params.requestId);
        controller?.abort(notification.params.reason);
      }
      _setupTimeout(messageId, timeout2, maxTotalTimeout, onTimeout, resetTimeoutOnProgress = false) {
        this._timeoutInfo.set(messageId, {
          timeoutId: setTimeout(onTimeout, timeout2),
          startTime: Date.now(),
          timeout: timeout2,
          maxTotalTimeout,
          resetTimeoutOnProgress,
          onTimeout
        });
      }
      _resetTimeout(messageId) {
        const info = this._timeoutInfo.get(messageId);
        if (!info)
          return false;
        const totalElapsed = Date.now() - info.startTime;
        if (info.maxTotalTimeout && totalElapsed >= info.maxTotalTimeout) {
          this._timeoutInfo.delete(messageId);
          throw McpError.fromError(ErrorCode$1.RequestTimeout, "Maximum total timeout exceeded", {
            maxTotalTimeout: info.maxTotalTimeout,
            totalElapsed
          });
        }
        clearTimeout(info.timeoutId);
        info.timeoutId = setTimeout(info.onTimeout, info.timeout);
        return true;
      }
      _cleanupTimeout(messageId) {
        const info = this._timeoutInfo.get(messageId);
        if (info) {
          clearTimeout(info.timeoutId);
          this._timeoutInfo.delete(messageId);
        }
      }
      async connect(transport2) {
        if (this._transport) {
          throw new Error("Already connected to a transport. Call close() before connecting to a new transport, or use a separate Protocol instance per connection.");
        }
        this._transport = transport2;
        const _onclose = this.transport?.onclose;
        this._transport.onclose = () => {
          _onclose?.();
          this._onclose();
        };
        const _onerror = this.transport?.onerror;
        this._transport.onerror = (error) => {
          _onerror?.(error);
          this._onerror(error);
        };
        const _onmessage = this._transport?.onmessage;
        this._transport.onmessage = (message, extra) => {
          _onmessage?.(message, extra);
          if (isJSONRPCResultResponse(message) || isJSONRPCErrorResponse(message)) {
            this._onresponse(message);
          } else if (isJSONRPCRequest(message)) {
            this._onrequest(message, extra);
          } else if (isJSONRPCNotification(message)) {
            this._onnotification(message);
          } else {
            this._onerror(new Error(`Unknown message type: ${JSON.stringify(message)}`));
          }
        };
        await this._transport.start();
      }
      _onclose() {
        const responseHandlers = this._responseHandlers;
        this._responseHandlers = /* @__PURE__ */ new Map();
        this._progressHandlers.clear();
        this._taskProgressTokens.clear();
        this._pendingDebouncedNotifications.clear();
        for (const controller of this._requestHandlerAbortControllers.values()) {
          controller.abort();
        }
        this._requestHandlerAbortControllers.clear();
        const error = McpError.fromError(ErrorCode$1.ConnectionClosed, "Connection closed");
        this._transport = void 0;
        this.onclose?.();
        for (const handler of responseHandlers.values()) {
          handler(error);
        }
      }
      _onerror(error) {
        this.onerror?.(error);
      }
      _onnotification(notification) {
        const handler = this._notificationHandlers.get(notification.method) ?? this.fallbackNotificationHandler;
        if (handler === void 0) {
          return;
        }
        Promise.resolve().then(() => handler(notification)).catch((error) => this._onerror(new Error(`Uncaught error in notification handler: ${error}`)));
      }
      _onrequest(request3, extra) {
        const handler = this._requestHandlers.get(request3.method) ?? this.fallbackRequestHandler;
        const capturedTransport = this._transport;
        const relatedTaskId = request3.params?._meta?.[RELATED_TASK_META_KEY]?.taskId;
        if (handler === void 0) {
          const errorResponse = {
            jsonrpc: "2.0",
            id: request3.id,
            error: {
              code: ErrorCode$1.MethodNotFound,
              message: "Method not found"
            }
          };
          if (relatedTaskId && this._taskMessageQueue) {
            this._enqueueTaskMessage(relatedTaskId, {
              type: "error",
              message: errorResponse,
              timestamp: Date.now()
            }, capturedTransport?.sessionId).catch((error) => this._onerror(new Error(`Failed to enqueue error response: ${error}`)));
          } else {
            capturedTransport?.send(errorResponse).catch((error) => this._onerror(new Error(`Failed to send an error response: ${error}`)));
          }
          return;
        }
        const abortController = new AbortController();
        this._requestHandlerAbortControllers.set(request3.id, abortController);
        const taskCreationParams = isTaskAugmentedRequestParams(request3.params) ? request3.params.task : void 0;
        const taskStore = this._taskStore ? this.requestTaskStore(request3, capturedTransport?.sessionId) : void 0;
        const fullExtra = {
          signal: abortController.signal,
          sessionId: capturedTransport?.sessionId,
          _meta: request3.params?._meta,
          sendNotification: async (notification) => {
            if (abortController.signal.aborted)
              return;
            const notificationOptions = { relatedRequestId: request3.id };
            if (relatedTaskId) {
              notificationOptions.relatedTask = { taskId: relatedTaskId };
            }
            await this.notification(notification, notificationOptions);
          },
          sendRequest: async (r, resultSchema, options2) => {
            if (abortController.signal.aborted) {
              throw new McpError(ErrorCode$1.ConnectionClosed, "Request was cancelled");
            }
            const requestOptions = { ...options2, relatedRequestId: request3.id };
            if (relatedTaskId && !requestOptions.relatedTask) {
              requestOptions.relatedTask = { taskId: relatedTaskId };
            }
            const effectiveTaskId = requestOptions.relatedTask?.taskId ?? relatedTaskId;
            if (effectiveTaskId && taskStore) {
              await taskStore.updateTaskStatus(effectiveTaskId, "input_required");
            }
            return await this.request(r, resultSchema, requestOptions);
          },
          authInfo: extra?.authInfo,
          requestId: request3.id,
          requestInfo: extra?.requestInfo,
          taskId: relatedTaskId,
          taskStore,
          taskRequestedTtl: taskCreationParams?.ttl,
          closeSSEStream: extra?.closeSSEStream,
          closeStandaloneSSEStream: extra?.closeStandaloneSSEStream
        };
        Promise.resolve().then(() => {
          if (taskCreationParams) {
            this.assertTaskHandlerCapability(request3.method);
          }
        }).then(() => handler(request3, fullExtra)).then(async (result) => {
          if (abortController.signal.aborted) {
            return;
          }
          const response = {
            result,
            jsonrpc: "2.0",
            id: request3.id
          };
          if (relatedTaskId && this._taskMessageQueue) {
            await this._enqueueTaskMessage(relatedTaskId, {
              type: "response",
              message: response,
              timestamp: Date.now()
            }, capturedTransport?.sessionId);
          } else {
            await capturedTransport?.send(response);
          }
        }, async (error) => {
          if (abortController.signal.aborted) {
            return;
          }
          const errorResponse = {
            jsonrpc: "2.0",
            id: request3.id,
            error: {
              code: Number.isSafeInteger(error["code"]) ? error["code"] : ErrorCode$1.InternalError,
              message: error.message ?? "Internal error",
              ...error["data"] !== void 0 && { data: error["data"] }
            }
          };
          if (relatedTaskId && this._taskMessageQueue) {
            await this._enqueueTaskMessage(relatedTaskId, {
              type: "error",
              message: errorResponse,
              timestamp: Date.now()
            }, capturedTransport?.sessionId);
          } else {
            await capturedTransport?.send(errorResponse);
          }
        }).catch((error) => this._onerror(new Error(`Failed to send response: ${error}`))).finally(() => {
          this._requestHandlerAbortControllers.delete(request3.id);
        });
      }
      _onprogress(notification) {
        const { progressToken, ...params } = notification.params;
        const messageId = Number(progressToken);
        const handler = this._progressHandlers.get(messageId);
        if (!handler) {
          this._onerror(new Error(`Received a progress notification for an unknown token: ${JSON.stringify(notification)}`));
          return;
        }
        const responseHandler = this._responseHandlers.get(messageId);
        const timeoutInfo = this._timeoutInfo.get(messageId);
        if (timeoutInfo && responseHandler && timeoutInfo.resetTimeoutOnProgress) {
          try {
            this._resetTimeout(messageId);
          } catch (error) {
            this._responseHandlers.delete(messageId);
            this._progressHandlers.delete(messageId);
            this._cleanupTimeout(messageId);
            responseHandler(error);
            return;
          }
        }
        handler(params);
      }
      _onresponse(response) {
        const messageId = Number(response.id);
        const resolver = this._requestResolvers.get(messageId);
        if (resolver) {
          this._requestResolvers.delete(messageId);
          if (isJSONRPCResultResponse(response)) {
            resolver(response);
          } else {
            const error = new McpError(response.error.code, response.error.message, response.error.data);
            resolver(error);
          }
          return;
        }
        const handler = this._responseHandlers.get(messageId);
        if (handler === void 0) {
          this._onerror(new Error(`Received a response for an unknown message ID: ${JSON.stringify(response)}`));
          return;
        }
        this._responseHandlers.delete(messageId);
        this._cleanupTimeout(messageId);
        let isTaskResponse = false;
        if (isJSONRPCResultResponse(response) && response.result && typeof response.result === "object") {
          const result = response.result;
          if (result.task && typeof result.task === "object") {
            const task = result.task;
            if (typeof task.taskId === "string") {
              isTaskResponse = true;
              this._taskProgressTokens.set(task.taskId, messageId);
            }
          }
        }
        if (!isTaskResponse) {
          this._progressHandlers.delete(messageId);
        }
        if (isJSONRPCResultResponse(response)) {
          handler(response);
        } else {
          const error = McpError.fromError(response.error.code, response.error.message, response.error.data);
          handler(error);
        }
      }
      get transport() {
        return this._transport;
      }
      async close() {
        await this._transport?.close();
      }
      async *requestStream(request3, resultSchema, options2) {
        const { task } = options2 ?? {};
        if (!task) {
          try {
            const result = await this.request(request3, resultSchema, options2);
            yield { type: "result", result };
          } catch (error) {
            yield {
              type: "error",
              error: error instanceof McpError ? error : new McpError(ErrorCode$1.InternalError, String(error))
            };
          }
          return;
        }
        let taskId;
        try {
          const createResult = await this.request(request3, CreateTaskResultSchema, options2);
          if (createResult.task) {
            taskId = createResult.task.taskId;
            yield { type: "taskCreated", task: createResult.task };
          } else {
            throw new McpError(ErrorCode$1.InternalError, "Task creation did not return a task");
          }
          while (true) {
            const task2 = await this.getTask({ taskId }, options2);
            yield { type: "taskStatus", task: task2 };
            if (isTerminal(task2.status)) {
              if (task2.status === "completed") {
                const result = await this.getTaskResult({ taskId }, resultSchema, options2);
                yield { type: "result", result };
              } else if (task2.status === "failed") {
                yield {
                  type: "error",
                  error: new McpError(ErrorCode$1.InternalError, `Task ${taskId} failed`)
                };
              } else if (task2.status === "cancelled") {
                yield {
                  type: "error",
                  error: new McpError(ErrorCode$1.InternalError, `Task ${taskId} was cancelled`)
                };
              }
              return;
            }
            if (task2.status === "input_required") {
              const result = await this.getTaskResult({ taskId }, resultSchema, options2);
              yield { type: "result", result };
              return;
            }
            const pollInterval = task2.pollInterval ?? this._options?.defaultTaskPollInterval ?? 1e3;
            await new Promise((resolve2) => setTimeout(resolve2, pollInterval));
            options2?.signal?.throwIfAborted();
          }
        } catch (error) {
          yield {
            type: "error",
            error: error instanceof McpError ? error : new McpError(ErrorCode$1.InternalError, String(error))
          };
        }
      }
      request(request3, resultSchema, options2) {
        const { relatedRequestId, resumptionToken, onresumptiontoken, task, relatedTask } = options2 ?? {};
        return new Promise((resolve2, reject) => {
          const earlyReject = (error) => {
            reject(error);
          };
          if (!this._transport) {
            earlyReject(new Error("Not connected"));
            return;
          }
          if (this._options?.enforceStrictCapabilities === true) {
            try {
              this.assertCapabilityForMethod(request3.method);
              if (task) {
                this.assertTaskCapability(request3.method);
              }
            } catch (e) {
              earlyReject(e);
              return;
            }
          }
          options2?.signal?.throwIfAborted();
          const messageId = this._requestMessageId++;
          const jsonrpcRequest = {
            ...request3,
            jsonrpc: "2.0",
            id: messageId
          };
          if (options2?.onprogress) {
            this._progressHandlers.set(messageId, options2.onprogress);
            jsonrpcRequest.params = {
              ...request3.params,
              _meta: {
                ...request3.params?._meta || {},
                progressToken: messageId
              }
            };
          }
          if (task) {
            jsonrpcRequest.params = {
              ...jsonrpcRequest.params,
              task
            };
          }
          if (relatedTask) {
            jsonrpcRequest.params = {
              ...jsonrpcRequest.params,
              _meta: {
                ...jsonrpcRequest.params?._meta || {},
                [RELATED_TASK_META_KEY]: relatedTask
              }
            };
          }
          const cancel = (reason) => {
            this._responseHandlers.delete(messageId);
            this._progressHandlers.delete(messageId);
            this._cleanupTimeout(messageId);
            this._transport?.send({
              jsonrpc: "2.0",
              method: "notifications/cancelled",
              params: {
                requestId: messageId,
                reason: String(reason)
              }
            }, { relatedRequestId, resumptionToken, onresumptiontoken }).catch((error2) => this._onerror(new Error(`Failed to send cancellation: ${error2}`)));
            const error = reason instanceof McpError ? reason : new McpError(ErrorCode$1.RequestTimeout, String(reason));
            reject(error);
          };
          this._responseHandlers.set(messageId, (response) => {
            if (options2?.signal?.aborted) {
              return;
            }
            if (response instanceof Error) {
              return reject(response);
            }
            try {
              const parseResult = safeParse$1(resultSchema, response.result);
              if (!parseResult.success) {
                reject(parseResult.error);
              } else {
                resolve2(parseResult.data);
              }
            } catch (error) {
              reject(error);
            }
          });
          options2?.signal?.addEventListener("abort", () => {
            cancel(options2?.signal?.reason);
          });
          const timeout2 = options2?.timeout ?? DEFAULT_REQUEST_TIMEOUT_MSEC;
          const timeoutHandler = () => cancel(McpError.fromError(ErrorCode$1.RequestTimeout, "Request timed out", { timeout: timeout2 }));
          this._setupTimeout(messageId, timeout2, options2?.maxTotalTimeout, timeoutHandler, options2?.resetTimeoutOnProgress ?? false);
          const relatedTaskId = relatedTask?.taskId;
          if (relatedTaskId) {
            const responseResolver = (response) => {
              const handler = this._responseHandlers.get(messageId);
              if (handler) {
                handler(response);
              } else {
                this._onerror(new Error(`Response handler missing for side-channeled request ${messageId}`));
              }
            };
            this._requestResolvers.set(messageId, responseResolver);
            this._enqueueTaskMessage(relatedTaskId, {
              type: "request",
              message: jsonrpcRequest,
              timestamp: Date.now()
            }).catch((error) => {
              this._cleanupTimeout(messageId);
              reject(error);
            });
          } else {
            this._transport.send(jsonrpcRequest, { relatedRequestId, resumptionToken, onresumptiontoken }).catch((error) => {
              this._cleanupTimeout(messageId);
              reject(error);
            });
          }
        });
      }
      async getTask(params, options2) {
        return this.request({ method: "tasks/get", params }, GetTaskResultSchema, options2);
      }
      async getTaskResult(params, resultSchema, options2) {
        return this.request({ method: "tasks/result", params }, resultSchema, options2);
      }
      async listTasks(params, options2) {
        return this.request({ method: "tasks/list", params }, ListTasksResultSchema, options2);
      }
      async cancelTask(params, options2) {
        return this.request({ method: "tasks/cancel", params }, CancelTaskResultSchema, options2);
      }
      async notification(notification, options2) {
        if (!this._transport) {
          throw new Error("Not connected");
        }
        this.assertNotificationCapability(notification.method);
        const relatedTaskId = options2?.relatedTask?.taskId;
        if (relatedTaskId) {
          const jsonrpcNotification2 = {
            ...notification,
            jsonrpc: "2.0",
            params: {
              ...notification.params,
              _meta: {
                ...notification.params?._meta || {},
                [RELATED_TASK_META_KEY]: options2.relatedTask
              }
            }
          };
          await this._enqueueTaskMessage(relatedTaskId, {
            type: "notification",
            message: jsonrpcNotification2,
            timestamp: Date.now()
          });
          return;
        }
        const debouncedMethods = this._options?.debouncedNotificationMethods ?? [];
        const canDebounce = debouncedMethods.includes(notification.method) && !notification.params && !options2?.relatedRequestId && !options2?.relatedTask;
        if (canDebounce) {
          if (this._pendingDebouncedNotifications.has(notification.method)) {
            return;
          }
          this._pendingDebouncedNotifications.add(notification.method);
          Promise.resolve().then(() => {
            this._pendingDebouncedNotifications.delete(notification.method);
            if (!this._transport) {
              return;
            }
            let jsonrpcNotification2 = {
              ...notification,
              jsonrpc: "2.0"
            };
            if (options2?.relatedTask) {
              jsonrpcNotification2 = {
                ...jsonrpcNotification2,
                params: {
                  ...jsonrpcNotification2.params,
                  _meta: {
                    ...jsonrpcNotification2.params?._meta || {},
                    [RELATED_TASK_META_KEY]: options2.relatedTask
                  }
                }
              };
            }
            this._transport?.send(jsonrpcNotification2, options2).catch((error) => this._onerror(error));
          });
          return;
        }
        let jsonrpcNotification = {
          ...notification,
          jsonrpc: "2.0"
        };
        if (options2?.relatedTask) {
          jsonrpcNotification = {
            ...jsonrpcNotification,
            params: {
              ...jsonrpcNotification.params,
              _meta: {
                ...jsonrpcNotification.params?._meta || {},
                [RELATED_TASK_META_KEY]: options2.relatedTask
              }
            }
          };
        }
        await this._transport.send(jsonrpcNotification, options2);
      }
      setRequestHandler(requestSchema, handler) {
        const method = getMethodLiteral(requestSchema);
        this.assertRequestHandlerCapability(method);
        this._requestHandlers.set(method, (request3, extra) => {
          const parsed = parseWithCompat(requestSchema, request3);
          return Promise.resolve(handler(parsed, extra));
        });
      }
      removeRequestHandler(method) {
        this._requestHandlers.delete(method);
      }
      assertCanSetRequestHandler(method) {
        if (this._requestHandlers.has(method)) {
          throw new Error(`A request handler for ${method} already exists, which would be overridden`);
        }
      }
      setNotificationHandler(notificationSchema, handler) {
        const method = getMethodLiteral(notificationSchema);
        this._notificationHandlers.set(method, (notification) => {
          const parsed = parseWithCompat(notificationSchema, notification);
          return Promise.resolve(handler(parsed));
        });
      }
      removeNotificationHandler(method) {
        this._notificationHandlers.delete(method);
      }
      _cleanupTaskProgressHandler(taskId) {
        const progressToken = this._taskProgressTokens.get(taskId);
        if (progressToken !== void 0) {
          this._progressHandlers.delete(progressToken);
          this._taskProgressTokens.delete(taskId);
        }
      }
      async _enqueueTaskMessage(taskId, message, sessionId) {
        if (!this._taskStore || !this._taskMessageQueue) {
          throw new Error("Cannot enqueue task message: taskStore and taskMessageQueue are not configured");
        }
        const maxQueueSize = this._options?.maxTaskQueueSize;
        await this._taskMessageQueue.enqueue(taskId, message, sessionId, maxQueueSize);
      }
      async _clearTaskQueue(taskId, sessionId) {
        if (this._taskMessageQueue) {
          const messages = await this._taskMessageQueue.dequeueAll(taskId, sessionId);
          for (const message of messages) {
            if (message.type === "request" && isJSONRPCRequest(message.message)) {
              const requestId = message.message.id;
              const resolver = this._requestResolvers.get(requestId);
              if (resolver) {
                resolver(new McpError(ErrorCode$1.InternalError, "Task cancelled or completed"));
                this._requestResolvers.delete(requestId);
              } else {
                this._onerror(new Error(`Resolver missing for request ${requestId} during task ${taskId} cleanup`));
              }
            }
          }
        }
      }
      async _waitForTaskUpdate(taskId, signal) {
        let interval = this._options?.defaultTaskPollInterval ?? 1e3;
        try {
          const task = await this._taskStore?.getTask(taskId);
          if (task?.pollInterval) {
            interval = task.pollInterval;
          }
        } catch {
        }
        return new Promise((resolve2, reject) => {
          if (signal.aborted) {
            reject(new McpError(ErrorCode$1.InvalidRequest, "Request cancelled"));
            return;
          }
          const timeoutId = setTimeout(resolve2, interval);
          signal.addEventListener("abort", () => {
            clearTimeout(timeoutId);
            reject(new McpError(ErrorCode$1.InvalidRequest, "Request cancelled"));
          }, { once: true });
        });
      }
      requestTaskStore(request3, sessionId) {
        const taskStore = this._taskStore;
        if (!taskStore) {
          throw new Error("No task store configured");
        }
        return {
          createTask: async (taskParams) => {
            if (!request3) {
              throw new Error("No request provided");
            }
            return await taskStore.createTask(taskParams, request3.id, {
              method: request3.method,
              params: request3.params
            }, sessionId);
          },
          getTask: async (taskId) => {
            const task = await taskStore.getTask(taskId, sessionId);
            if (!task) {
              throw new McpError(ErrorCode$1.InvalidParams, "Failed to retrieve task: Task not found");
            }
            return task;
          },
          storeTaskResult: async (taskId, status, result) => {
            await taskStore.storeTaskResult(taskId, status, result, sessionId);
            const task = await taskStore.getTask(taskId, sessionId);
            if (task) {
              const notification = TaskStatusNotificationSchema.parse({
                method: "notifications/tasks/status",
                params: task
              });
              await this.notification(notification);
              if (isTerminal(task.status)) {
                this._cleanupTaskProgressHandler(taskId);
              }
            }
          },
          getTaskResult: (taskId) => {
            return taskStore.getTaskResult(taskId, sessionId);
          },
          updateTaskStatus: async (taskId, status, statusMessage) => {
            const task = await taskStore.getTask(taskId, sessionId);
            if (!task) {
              throw new McpError(ErrorCode$1.InvalidParams, `Task "${taskId}" not found - it may have been cleaned up`);
            }
            if (isTerminal(task.status)) {
              throw new McpError(ErrorCode$1.InvalidParams, `Cannot update task "${taskId}" from terminal status "${task.status}" to "${status}". Terminal states (completed, failed, cancelled) cannot transition to other states.`);
            }
            await taskStore.updateTaskStatus(taskId, status, statusMessage, sessionId);
            const updatedTask = await taskStore.getTask(taskId, sessionId);
            if (updatedTask) {
              const notification = TaskStatusNotificationSchema.parse({
                method: "notifications/tasks/status",
                params: updatedTask
              });
              await this.notification(notification);
              if (isTerminal(updatedTask.status)) {
                this._cleanupTaskProgressHandler(taskId);
              }
            }
          },
          listTasks: (cursor) => {
            return taskStore.listTasks(cursor, sessionId);
          }
        };
      }
    };
    ajv$1 = { exports: {} };
    core$5 = {};
    validate$1 = {};
    boolSchema$1 = {};
    errors$2 = {};
    codegen$1 = {};
    code$4 = {};
    scope$2 = {};
    util$4 = {};
    names$1 = {};
    dataType$1 = {};
    rules$1 = {};
    applicability$1 = {};
    defaults$2 = {};
    keyword$2 = {};
    code$3 = {};
    subschema$1 = {};
    resolve$1 = {};
    jsonSchemaTraverse$1 = { exports: {} };
    validation_error$1 = {};
    ref_error$1 = {};
    compile$2 = {};
    $id$3 = "https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#";
    description$1 = "Meta-schema for $data reference (JSON AnySchema extension proposal)";
    type$3 = "object";
    required$3 = [
      "$data"
    ];
    properties$5 = {
      $data: {
        type: "string",
        anyOf: [
          {
            format: "relative-json-pointer"
          },
          {
            format: "json-pointer"
          }
        ]
      }
    };
    additionalProperties$3 = false;
    require$$9$1 = {
      $id: $id$3,
      description: description$1,
      type: type$3,
      required: required$3,
      properties: properties$5,
      additionalProperties: additionalProperties$3
    };
    uri$1 = {};
    fastUri = { exports: {} };
    draft7$1 = {};
    core$4 = {};
    id$1 = {};
    ref$1 = {};
    validation$2 = {};
    limitNumber$1 = {};
    multipleOf$1 = {};
    limitLength$1 = {};
    ucs2length$1 = {};
    pattern$1 = {};
    limitProperties$1 = {};
    required$2 = {};
    limitItems$1 = {};
    uniqueItems$1 = {};
    equal$1 = {};
    _const$1 = {};
    _enum$1 = {};
    applicator$1 = {};
    additionalItems$1 = {};
    prefixItems$1 = {};
    items$1 = {};
    items2020$1 = {};
    contains$2 = {};
    dependencies$1 = {};
    propertyNames$1 = {};
    additionalProperties$2 = {};
    properties$4 = {};
    patternProperties$1 = {};
    not$1 = {};
    anyOf$1 = {};
    oneOf$1 = {};
    allOf$1 = {};
    _if$1 = {};
    thenElse$1 = {};
    format$4 = {};
    format$3 = {};
    metadata$1 = {};
    discriminator$1 = {};
    types$7 = {};
    $schema$1 = "http://json-schema.org/draft-07/schema#";
    $id$2 = "http://json-schema.org/draft-07/schema#";
    title$1 = "Core schema meta-schema";
    definitions$1 = {
      schemaArray: {
        type: "array",
        minItems: 1,
        items: {
          $ref: "#"
        }
      },
      nonNegativeInteger: {
        type: "integer",
        minimum: 0
      },
      nonNegativeIntegerDefault0: {
        allOf: [
          {
            $ref: "#/definitions/nonNegativeInteger"
          },
          {
            "default": 0
          }
        ]
      },
      simpleTypes: {
        "enum": [
          "array",
          "boolean",
          "integer",
          "null",
          "number",
          "object",
          "string"
        ]
      },
      stringArray: {
        type: "array",
        items: {
          type: "string"
        },
        uniqueItems: true,
        "default": []
      }
    };
    type$2 = [
      "object",
      "boolean"
    ];
    properties$3 = {
      $id: {
        type: "string",
        format: "uri-reference"
      },
      $schema: {
        type: "string",
        format: "uri"
      },
      $ref: {
        type: "string",
        format: "uri-reference"
      },
      $comment: {
        type: "string"
      },
      title: {
        type: "string"
      },
      description: {
        type: "string"
      },
      "default": true,
      readOnly: {
        type: "boolean",
        "default": false
      },
      examples: {
        type: "array",
        items: true
      },
      multipleOf: {
        type: "number",
        exclusiveMinimum: 0
      },
      maximum: {
        type: "number"
      },
      exclusiveMaximum: {
        type: "number"
      },
      minimum: {
        type: "number"
      },
      exclusiveMinimum: {
        type: "number"
      },
      maxLength: {
        $ref: "#/definitions/nonNegativeInteger"
      },
      minLength: {
        $ref: "#/definitions/nonNegativeIntegerDefault0"
      },
      pattern: {
        type: "string",
        format: "regex"
      },
      additionalItems: {
        $ref: "#"
      },
      items: {
        anyOf: [
          {
            $ref: "#"
          },
          {
            $ref: "#/definitions/schemaArray"
          }
        ],
        "default": true
      },
      maxItems: {
        $ref: "#/definitions/nonNegativeInteger"
      },
      minItems: {
        $ref: "#/definitions/nonNegativeIntegerDefault0"
      },
      uniqueItems: {
        type: "boolean",
        "default": false
      },
      contains: {
        $ref: "#"
      },
      maxProperties: {
        $ref: "#/definitions/nonNegativeInteger"
      },
      minProperties: {
        $ref: "#/definitions/nonNegativeIntegerDefault0"
      },
      required: {
        $ref: "#/definitions/stringArray"
      },
      additionalProperties: {
        $ref: "#"
      },
      definitions: {
        type: "object",
        additionalProperties: {
          $ref: "#"
        },
        "default": {}
      },
      properties: {
        type: "object",
        additionalProperties: {
          $ref: "#"
        },
        "default": {}
      },
      patternProperties: {
        type: "object",
        additionalProperties: {
          $ref: "#"
        },
        propertyNames: {
          format: "regex"
        },
        "default": {}
      },
      dependencies: {
        type: "object",
        additionalProperties: {
          anyOf: [
            {
              $ref: "#"
            },
            {
              $ref: "#/definitions/stringArray"
            }
          ]
        }
      },
      propertyNames: {
        $ref: "#"
      },
      "const": true,
      "enum": {
        type: "array",
        items: true,
        minItems: 1,
        uniqueItems: true
      },
      type: {
        anyOf: [
          {
            $ref: "#/definitions/simpleTypes"
          },
          {
            type: "array",
            items: {
              $ref: "#/definitions/simpleTypes"
            },
            minItems: 1,
            uniqueItems: true
          }
        ]
      },
      format: {
        type: "string"
      },
      contentMediaType: {
        type: "string"
      },
      contentEncoding: {
        type: "string"
      },
      "if": {
        $ref: "#"
      },
      then: {
        $ref: "#"
      },
      "else": {
        $ref: "#"
      },
      allOf: {
        $ref: "#/definitions/schemaArray"
      },
      anyOf: {
        $ref: "#/definitions/schemaArray"
      },
      oneOf: {
        $ref: "#/definitions/schemaArray"
      },
      not: {
        $ref: "#"
      }
    };
    require$$3$2 = {
      $schema: $schema$1,
      $id: $id$2,
      title: title$1,
      definitions: definitions$1,
      type: type$2,
      properties: properties$3,
      "default": true
    };
    ajvExports = requireAjv$1();
    Ajv = /* @__PURE__ */ getDefaultExportFromCjs(ajvExports);
    dist$c = { exports: {} };
    formats2 = {};
    limit = {};
    ajv = { exports: {} };
    core$3 = {};
    validate = {};
    boolSchema = {};
    errors$1 = {};
    codegen = {};
    code$2 = {};
    scope$1 = {};
    util$3 = {};
    names2 = {};
    dataType = {};
    rules = {};
    applicability = {};
    defaults$1 = {};
    keyword$1 = {};
    code$1 = {};
    subschema = {};
    resolve = {};
    jsonSchemaTraverse = { exports: {} };
    validation_error = {};
    ref_error = {};
    compile$1 = {};
    $id$1 = "https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#";
    description = "Meta-schema for $data reference (JSON AnySchema extension proposal)";
    type$1 = "object";
    required$1 = [
      "$data"
    ];
    properties$2 = {
      $data: {
        type: "string",
        anyOf: [
          {
            format: "relative-json-pointer"
          },
          {
            format: "json-pointer"
          }
        ]
      }
    };
    additionalProperties$1 = false;
    require$$9 = {
      $id: $id$1,
      description,
      type: type$1,
      required: required$1,
      properties: properties$2,
      additionalProperties: additionalProperties$1
    };
    uri = {};
    draft7 = {};
    core$2 = {};
    id = {};
    ref = {};
    validation$1 = {};
    limitNumber = {};
    multipleOf = {};
    limitLength = {};
    ucs2length = {};
    pattern = {};
    limitProperties = {};
    required = {};
    limitItems = {};
    uniqueItems = {};
    equal = {};
    _const = {};
    _enum = {};
    applicator = {};
    additionalItems = {};
    prefixItems = {};
    items = {};
    items2020 = {};
    contains$1 = {};
    dependencies = {};
    propertyNames = {};
    additionalProperties = {};
    properties$1 = {};
    patternProperties = {};
    not = {};
    anyOf = {};
    oneOf = {};
    allOf = {};
    _if = {};
    thenElse = {};
    format$2 = {};
    format$1 = {};
    metadata = {};
    discriminator = {};
    types$6 = {};
    $schema = "http://json-schema.org/draft-07/schema#";
    $id = "http://json-schema.org/draft-07/schema#";
    title = "Core schema meta-schema";
    definitions = {
      schemaArray: {
        type: "array",
        minItems: 1,
        items: {
          $ref: "#"
        }
      },
      nonNegativeInteger: {
        type: "integer",
        minimum: 0
      },
      nonNegativeIntegerDefault0: {
        allOf: [
          {
            $ref: "#/definitions/nonNegativeInteger"
          },
          {
            "default": 0
          }
        ]
      },
      simpleTypes: {
        "enum": [
          "array",
          "boolean",
          "integer",
          "null",
          "number",
          "object",
          "string"
        ]
      },
      stringArray: {
        type: "array",
        items: {
          type: "string"
        },
        uniqueItems: true,
        "default": []
      }
    };
    type = [
      "object",
      "boolean"
    ];
    properties = {
      $id: {
        type: "string",
        format: "uri-reference"
      },
      $schema: {
        type: "string",
        format: "uri"
      },
      $ref: {
        type: "string",
        format: "uri-reference"
      },
      $comment: {
        type: "string"
      },
      title: {
        type: "string"
      },
      description: {
        type: "string"
      },
      "default": true,
      readOnly: {
        type: "boolean",
        "default": false
      },
      examples: {
        type: "array",
        items: true
      },
      multipleOf: {
        type: "number",
        exclusiveMinimum: 0
      },
      maximum: {
        type: "number"
      },
      exclusiveMaximum: {
        type: "number"
      },
      minimum: {
        type: "number"
      },
      exclusiveMinimum: {
        type: "number"
      },
      maxLength: {
        $ref: "#/definitions/nonNegativeInteger"
      },
      minLength: {
        $ref: "#/definitions/nonNegativeIntegerDefault0"
      },
      pattern: {
        type: "string",
        format: "regex"
      },
      additionalItems: {
        $ref: "#"
      },
      items: {
        anyOf: [
          {
            $ref: "#"
          },
          {
            $ref: "#/definitions/schemaArray"
          }
        ],
        "default": true
      },
      maxItems: {
        $ref: "#/definitions/nonNegativeInteger"
      },
      minItems: {
        $ref: "#/definitions/nonNegativeIntegerDefault0"
      },
      uniqueItems: {
        type: "boolean",
        "default": false
      },
      contains: {
        $ref: "#"
      },
      maxProperties: {
        $ref: "#/definitions/nonNegativeInteger"
      },
      minProperties: {
        $ref: "#/definitions/nonNegativeIntegerDefault0"
      },
      required: {
        $ref: "#/definitions/stringArray"
      },
      additionalProperties: {
        $ref: "#"
      },
      definitions: {
        type: "object",
        additionalProperties: {
          $ref: "#"
        },
        "default": {}
      },
      properties: {
        type: "object",
        additionalProperties: {
          $ref: "#"
        },
        "default": {}
      },
      patternProperties: {
        type: "object",
        additionalProperties: {
          $ref: "#"
        },
        propertyNames: {
          format: "regex"
        },
        "default": {}
      },
      dependencies: {
        type: "object",
        additionalProperties: {
          anyOf: [
            {
              $ref: "#"
            },
            {
              $ref: "#/definitions/stringArray"
            }
          ]
        }
      },
      propertyNames: {
        $ref: "#"
      },
      "const": true,
      "enum": {
        type: "array",
        items: true,
        minItems: 1,
        uniqueItems: true
      },
      type: {
        anyOf: [
          {
            $ref: "#/definitions/simpleTypes"
          },
          {
            type: "array",
            items: {
              $ref: "#/definitions/simpleTypes"
            },
            minItems: 1,
            uniqueItems: true
          }
        ]
      },
      format: {
        type: "string"
      },
      contentMediaType: {
        type: "string"
      },
      contentEncoding: {
        type: "string"
      },
      "if": {
        $ref: "#"
      },
      then: {
        $ref: "#"
      },
      "else": {
        $ref: "#"
      },
      allOf: {
        $ref: "#/definitions/schemaArray"
      },
      anyOf: {
        $ref: "#/definitions/schemaArray"
      },
      oneOf: {
        $ref: "#/definitions/schemaArray"
      },
      not: {
        $ref: "#"
      }
    };
    require$$3$1 = {
      $schema,
      $id,
      title,
      definitions,
      type,
      properties,
      "default": true
    };
    distExports$1 = requireDist$c();
    _addFormats = /* @__PURE__ */ getDefaultExportFromCjs(distExports$1);
    AjvJsonSchemaValidator = class {
      constructor(ajv2) {
        this._ajv = ajv2 ?? createDefaultAjvInstance();
      }
      getValidator(schema) {
        const ajvValidator = "$id" in schema && typeof schema.$id === "string" ? this._ajv.getSchema(schema.$id) ?? this._ajv.compile(schema) : this._ajv.compile(schema);
        return (input) => {
          const valid2 = ajvValidator(input);
          if (valid2) {
            return {
              valid: true,
              data: input,
              errorMessage: void 0
            };
          } else {
            return {
              valid: false,
              data: void 0,
              errorMessage: this._ajv.errorsText(ajvValidator.errors)
            };
          }
        };
      }
    };
    ExperimentalServerTasks = class {
      constructor(_server) {
        this._server = _server;
      }
      requestStream(request3, resultSchema, options2) {
        return this._server.requestStream(request3, resultSchema, options2);
      }
      createMessageStream(params, options2) {
        const clientCapabilities = this._server.getClientCapabilities();
        if ((params.tools || params.toolChoice) && !clientCapabilities?.sampling?.tools) {
          throw new Error("Client does not support sampling tools capability.");
        }
        if (params.messages.length > 0) {
          const lastMessage = params.messages[params.messages.length - 1];
          const lastContent = Array.isArray(lastMessage.content) ? lastMessage.content : [lastMessage.content];
          const hasToolResults = lastContent.some((c) => c.type === "tool_result");
          const previousMessage = params.messages.length > 1 ? params.messages[params.messages.length - 2] : void 0;
          const previousContent = previousMessage ? Array.isArray(previousMessage.content) ? previousMessage.content : [previousMessage.content] : [];
          const hasPreviousToolUse = previousContent.some((c) => c.type === "tool_use");
          if (hasToolResults) {
            if (lastContent.some((c) => c.type !== "tool_result")) {
              throw new Error("The last message must contain only tool_result content if any is present");
            }
            if (!hasPreviousToolUse) {
              throw new Error("tool_result blocks are not matching any tool_use from the previous message");
            }
          }
          if (hasPreviousToolUse) {
            const toolUseIds = new Set(previousContent.filter((c) => c.type === "tool_use").map((c) => c.id));
            const toolResultIds = new Set(lastContent.filter((c) => c.type === "tool_result").map((c) => c.toolUseId));
            if (toolUseIds.size !== toolResultIds.size || ![...toolUseIds].every((id2) => toolResultIds.has(id2))) {
              throw new Error("ids of tool_result blocks and tool_use blocks from previous message do not match");
            }
          }
        }
        return this.requestStream({
          method: "sampling/createMessage",
          params
        }, CreateMessageResultSchema, options2);
      }
      elicitInputStream(params, options2) {
        const clientCapabilities = this._server.getClientCapabilities();
        const mode2 = params.mode ?? "form";
        switch (mode2) {
          case "url": {
            if (!clientCapabilities?.elicitation?.url) {
              throw new Error("Client does not support url elicitation.");
            }
            break;
          }
          case "form": {
            if (!clientCapabilities?.elicitation?.form) {
              throw new Error("Client does not support form elicitation.");
            }
            break;
          }
        }
        const normalizedParams = mode2 === "form" && params.mode === void 0 ? { ...params, mode: "form" } : params;
        return this.requestStream({
          method: "elicitation/create",
          params: normalizedParams
        }, ElicitResultSchema, options2);
      }
      async getTask(taskId, options2) {
        return this._server.getTask({ taskId }, options2);
      }
      async getTaskResult(taskId, resultSchema, options2) {
        return this._server.getTaskResult({ taskId }, resultSchema, options2);
      }
      async listTasks(cursor, options2) {
        return this._server.listTasks(cursor ? { cursor } : void 0, options2);
      }
      async cancelTask(taskId, options2) {
        return this._server.cancelTask({ taskId }, options2);
      }
    };
    Server = class extends Protocol {
      constructor(_serverInfo, options2) {
        super(options2);
        this._serverInfo = _serverInfo;
        this._loggingLevels = /* @__PURE__ */ new Map();
        this.LOG_LEVEL_SEVERITY = new Map(LoggingLevelSchema.options.map((level, index2) => [level, index2]));
        this.isMessageIgnored = (level, sessionId) => {
          const currentLevel = this._loggingLevels.get(sessionId);
          return currentLevel ? this.LOG_LEVEL_SEVERITY.get(level) < this.LOG_LEVEL_SEVERITY.get(currentLevel) : false;
        };
        this._capabilities = options2?.capabilities ?? {};
        this._instructions = options2?.instructions;
        this._jsonSchemaValidator = options2?.jsonSchemaValidator ?? new AjvJsonSchemaValidator();
        this.setRequestHandler(InitializeRequestSchema, (request3) => this._oninitialize(request3));
        this.setNotificationHandler(InitializedNotificationSchema, () => this.oninitialized?.());
        if (this._capabilities.logging) {
          this.setRequestHandler(SetLevelRequestSchema, async (request3, extra) => {
            const transportSessionId = extra.sessionId || extra.requestInfo?.headers["mcp-session-id"] || void 0;
            const { level } = request3.params;
            const parseResult = LoggingLevelSchema.safeParse(level);
            if (parseResult.success) {
              this._loggingLevels.set(transportSessionId, parseResult.data);
            }
            return {};
          });
        }
      }
      get experimental() {
        if (!this._experimental) {
          this._experimental = {
            tasks: new ExperimentalServerTasks(this)
          };
        }
        return this._experimental;
      }
      registerCapabilities(capabilities) {
        if (this.transport) {
          throw new Error("Cannot register capabilities after connecting to transport");
        }
        this._capabilities = mergeCapabilities(this._capabilities, capabilities);
      }
      setRequestHandler(requestSchema, handler) {
        const shape = getObjectShape(requestSchema);
        const methodSchema = shape?.method;
        if (!methodSchema) {
          throw new Error("Schema is missing a method literal");
        }
        let methodValue;
        if (isZ4Schema(methodSchema)) {
          const v4Schema = methodSchema;
          const v4Def = v4Schema._zod?.def;
          methodValue = v4Def?.value ?? v4Schema.value;
        } else {
          const v3Schema = methodSchema;
          const legacyDef = v3Schema._def;
          methodValue = legacyDef?.value ?? v3Schema.value;
        }
        if (typeof methodValue !== "string") {
          throw new Error("Schema method literal must be a string");
        }
        const method = methodValue;
        if (method === "tools/call") {
          const wrappedHandler = async (request3, extra) => {
            const validatedRequest = safeParse$1(CallToolRequestSchema, request3);
            if (!validatedRequest.success) {
              const errorMessage = validatedRequest.error instanceof Error ? validatedRequest.error.message : String(validatedRequest.error);
              throw new McpError(ErrorCode$1.InvalidParams, `Invalid tools/call request: ${errorMessage}`);
            }
            const { params } = validatedRequest.data;
            const result = await Promise.resolve(handler(request3, extra));
            if (params.task) {
              const taskValidationResult = safeParse$1(CreateTaskResultSchema, result);
              if (!taskValidationResult.success) {
                const errorMessage = taskValidationResult.error instanceof Error ? taskValidationResult.error.message : String(taskValidationResult.error);
                throw new McpError(ErrorCode$1.InvalidParams, `Invalid task creation result: ${errorMessage}`);
              }
              return taskValidationResult.data;
            }
            const validationResult = safeParse$1(CallToolResultSchema, result);
            if (!validationResult.success) {
              const errorMessage = validationResult.error instanceof Error ? validationResult.error.message : String(validationResult.error);
              throw new McpError(ErrorCode$1.InvalidParams, `Invalid tools/call result: ${errorMessage}`);
            }
            return validationResult.data;
          };
          return super.setRequestHandler(requestSchema, wrappedHandler);
        }
        return super.setRequestHandler(requestSchema, handler);
      }
      assertCapabilityForMethod(method) {
        switch (method) {
          case "sampling/createMessage":
            if (!this._clientCapabilities?.sampling) {
              throw new Error(`Client does not support sampling (required for ${method})`);
            }
            break;
          case "elicitation/create":
            if (!this._clientCapabilities?.elicitation) {
              throw new Error(`Client does not support elicitation (required for ${method})`);
            }
            break;
          case "roots/list":
            if (!this._clientCapabilities?.roots) {
              throw new Error(`Client does not support listing roots (required for ${method})`);
            }
            break;
        }
      }
      assertNotificationCapability(method) {
        switch (method) {
          case "notifications/message":
            if (!this._capabilities.logging) {
              throw new Error(`Server does not support logging (required for ${method})`);
            }
            break;
          case "notifications/resources/updated":
          case "notifications/resources/list_changed":
            if (!this._capabilities.resources) {
              throw new Error(`Server does not support notifying about resources (required for ${method})`);
            }
            break;
          case "notifications/tools/list_changed":
            if (!this._capabilities.tools) {
              throw new Error(`Server does not support notifying of tool list changes (required for ${method})`);
            }
            break;
          case "notifications/prompts/list_changed":
            if (!this._capabilities.prompts) {
              throw new Error(`Server does not support notifying of prompt list changes (required for ${method})`);
            }
            break;
          case "notifications/elicitation/complete":
            if (!this._clientCapabilities?.elicitation?.url) {
              throw new Error(`Client does not support URL elicitation (required for ${method})`);
            }
            break;
        }
      }
      assertRequestHandlerCapability(method) {
        if (!this._capabilities) {
          return;
        }
        switch (method) {
          case "completion/complete":
            if (!this._capabilities.completions) {
              throw new Error(`Server does not support completions (required for ${method})`);
            }
            break;
          case "logging/setLevel":
            if (!this._capabilities.logging) {
              throw new Error(`Server does not support logging (required for ${method})`);
            }
            break;
          case "prompts/get":
          case "prompts/list":
            if (!this._capabilities.prompts) {
              throw new Error(`Server does not support prompts (required for ${method})`);
            }
            break;
          case "resources/list":
          case "resources/templates/list":
          case "resources/read":
            if (!this._capabilities.resources) {
              throw new Error(`Server does not support resources (required for ${method})`);
            }
            break;
          case "tools/call":
          case "tools/list":
            if (!this._capabilities.tools) {
              throw new Error(`Server does not support tools (required for ${method})`);
            }
            break;
          case "tasks/get":
          case "tasks/list":
          case "tasks/result":
          case "tasks/cancel":
            if (!this._capabilities.tasks) {
              throw new Error(`Server does not support tasks capability (required for ${method})`);
            }
            break;
        }
      }
      assertTaskCapability(method) {
        assertClientRequestTaskCapability(this._clientCapabilities?.tasks?.requests, method, "Client");
      }
      assertTaskHandlerCapability(method) {
        if (!this._capabilities) {
          return;
        }
        assertToolsCallTaskCapability(this._capabilities.tasks?.requests, method, "Server");
      }
      async _oninitialize(request3) {
        const requestedVersion = request3.params.protocolVersion;
        this._clientCapabilities = request3.params.capabilities;
        this._clientVersion = request3.params.clientInfo;
        const protocolVersion = SUPPORTED_PROTOCOL_VERSIONS.includes(requestedVersion) ? requestedVersion : LATEST_PROTOCOL_VERSION;
        return {
          protocolVersion,
          capabilities: this.getCapabilities(),
          serverInfo: this._serverInfo,
          ...this._instructions && { instructions: this._instructions }
        };
      }
      getClientCapabilities() {
        return this._clientCapabilities;
      }
      getClientVersion() {
        return this._clientVersion;
      }
      getCapabilities() {
        return this._capabilities;
      }
      async ping() {
        return this.request({ method: "ping" }, EmptyResultSchema);
      }
      async createMessage(params, options2) {
        if (params.tools || params.toolChoice) {
          if (!this._clientCapabilities?.sampling?.tools) {
            throw new Error("Client does not support sampling tools capability.");
          }
        }
        if (params.messages.length > 0) {
          const lastMessage = params.messages[params.messages.length - 1];
          const lastContent = Array.isArray(lastMessage.content) ? lastMessage.content : [lastMessage.content];
          const hasToolResults = lastContent.some((c) => c.type === "tool_result");
          const previousMessage = params.messages.length > 1 ? params.messages[params.messages.length - 2] : void 0;
          const previousContent = previousMessage ? Array.isArray(previousMessage.content) ? previousMessage.content : [previousMessage.content] : [];
          const hasPreviousToolUse = previousContent.some((c) => c.type === "tool_use");
          if (hasToolResults) {
            if (lastContent.some((c) => c.type !== "tool_result")) {
              throw new Error("The last message must contain only tool_result content if any is present");
            }
            if (!hasPreviousToolUse) {
              throw new Error("tool_result blocks are not matching any tool_use from the previous message");
            }
          }
          if (hasPreviousToolUse) {
            const toolUseIds = new Set(previousContent.filter((c) => c.type === "tool_use").map((c) => c.id));
            const toolResultIds = new Set(lastContent.filter((c) => c.type === "tool_result").map((c) => c.toolUseId));
            if (toolUseIds.size !== toolResultIds.size || ![...toolUseIds].every((id2) => toolResultIds.has(id2))) {
              throw new Error("ids of tool_result blocks and tool_use blocks from previous message do not match");
            }
          }
        }
        if (params.tools) {
          return this.request({ method: "sampling/createMessage", params }, CreateMessageResultWithToolsSchema, options2);
        }
        return this.request({ method: "sampling/createMessage", params }, CreateMessageResultSchema, options2);
      }
      async elicitInput(params, options2) {
        const mode2 = params.mode ?? "form";
        switch (mode2) {
          case "url": {
            if (!this._clientCapabilities?.elicitation?.url) {
              throw new Error("Client does not support url elicitation.");
            }
            const urlParams = params;
            return this.request({ method: "elicitation/create", params: urlParams }, ElicitResultSchema, options2);
          }
          case "form": {
            if (!this._clientCapabilities?.elicitation?.form) {
              throw new Error("Client does not support form elicitation.");
            }
            const formParams = params.mode === "form" ? params : { ...params, mode: "form" };
            const result = await this.request({ method: "elicitation/create", params: formParams }, ElicitResultSchema, options2);
            if (result.action === "accept" && result.content && formParams.requestedSchema) {
              try {
                const validator = this._jsonSchemaValidator.getValidator(formParams.requestedSchema);
                const validationResult = validator(result.content);
                if (!validationResult.valid) {
                  throw new McpError(ErrorCode$1.InvalidParams, `Elicitation response content does not match requested schema: ${validationResult.errorMessage}`);
                }
              } catch (error) {
                if (error instanceof McpError) {
                  throw error;
                }
                throw new McpError(ErrorCode$1.InternalError, `Error validating elicitation response: ${error instanceof Error ? error.message : String(error)}`);
              }
            }
            return result;
          }
        }
      }
      createElicitationCompletionNotifier(elicitationId, options2) {
        if (!this._clientCapabilities?.elicitation?.url) {
          throw new Error("Client does not support URL elicitation (required for notifications/elicitation/complete)");
        }
        return () => this.notification({
          method: "notifications/elicitation/complete",
          params: {
            elicitationId
          }
        }, options2);
      }
      async listRoots(params, options2) {
        return this.request({ method: "roots/list", params }, ListRootsResultSchema, options2);
      }
      async sendLoggingMessage(params, sessionId) {
        if (this._capabilities.logging) {
          if (!this.isMessageIgnored(params.level, sessionId)) {
            return this.notification({ method: "notifications/message", params });
          }
        }
      }
      async sendResourceUpdated(params) {
        return this.notification({
          method: "notifications/resources/updated",
          params
        });
      }
      async sendResourceListChanged() {
        return this.notification({
          method: "notifications/resources/list_changed"
        });
      }
      async sendToolListChanged() {
        return this.notification({ method: "notifications/tools/list_changed" });
      }
      async sendPromptListChanged() {
        return this.notification({ method: "notifications/prompts/list_changed" });
      }
    };
    COMPLETABLE_SYMBOL = Symbol.for("mcp.completable");
    (function(McpZodTypeKind2) {
      McpZodTypeKind2["Completable"] = "McpCompletable";
    })(McpZodTypeKind || (McpZodTypeKind = {}));
    TOOL_NAME_REGEX = /^[A-Za-z0-9._-]{1,128}$/;
    ExperimentalMcpServerTasks = class {
      constructor(_mcpServer) {
        this._mcpServer = _mcpServer;
      }
      registerToolTask(name, config4, handler) {
        const execution = { taskSupport: "required", ...config4.execution };
        if (execution.taskSupport === "forbidden") {
          throw new Error(`Cannot register task-based tool '${name}' with taskSupport 'forbidden'. Use registerTool() instead.`);
        }
        const mcpServerInternal = this._mcpServer;
        return mcpServerInternal._createRegisteredTool(name, config4.title, config4.description, config4.inputSchema, config4.outputSchema, config4.annotations, execution, config4._meta, handler);
      }
    };
    McpServer = class {
      constructor(serverInfo, options2) {
        this._registeredResources = {};
        this._registeredResourceTemplates = {};
        this._registeredTools = {};
        this._registeredPrompts = {};
        this._toolHandlersInitialized = false;
        this._completionHandlerInitialized = false;
        this._resourceHandlersInitialized = false;
        this._promptHandlersInitialized = false;
        this.server = new Server(serverInfo, options2);
      }
      get experimental() {
        if (!this._experimental) {
          this._experimental = {
            tasks: new ExperimentalMcpServerTasks(this)
          };
        }
        return this._experimental;
      }
      async connect(transport2) {
        return await this.server.connect(transport2);
      }
      async close() {
        await this.server.close();
      }
      setToolRequestHandlers() {
        if (this._toolHandlersInitialized) {
          return;
        }
        this.server.assertCanSetRequestHandler(getMethodValue(ListToolsRequestSchema));
        this.server.assertCanSetRequestHandler(getMethodValue(CallToolRequestSchema));
        this.server.registerCapabilities({
          tools: {
            listChanged: true
          }
        });
        this.server.setRequestHandler(ListToolsRequestSchema, () => ({
          tools: Object.entries(this._registeredTools).filter(([, tool]) => tool.enabled).map(([name, tool]) => {
            const toolDefinition = {
              name,
              title: tool.title,
              description: tool.description,
              inputSchema: (() => {
                const obj = normalizeObjectSchema(tool.inputSchema);
                return obj ? toJsonSchemaCompat(obj, {
                  strictUnions: true,
                  pipeStrategy: "input"
                }) : EMPTY_OBJECT_JSON_SCHEMA;
              })(),
              annotations: tool.annotations,
              execution: tool.execution,
              _meta: tool._meta
            };
            if (tool.outputSchema) {
              const obj = normalizeObjectSchema(tool.outputSchema);
              if (obj) {
                toolDefinition.outputSchema = toJsonSchemaCompat(obj, {
                  strictUnions: true,
                  pipeStrategy: "output"
                });
              }
            }
            return toolDefinition;
          })
        }));
        this.server.setRequestHandler(CallToolRequestSchema, async (request3, extra) => {
          try {
            const tool = this._registeredTools[request3.params.name];
            if (!tool) {
              throw new McpError(ErrorCode$1.InvalidParams, `Tool ${request3.params.name} not found`);
            }
            if (!tool.enabled) {
              throw new McpError(ErrorCode$1.InvalidParams, `Tool ${request3.params.name} disabled`);
            }
            const isTaskRequest = !!request3.params.task;
            const taskSupport = tool.execution?.taskSupport;
            const isTaskHandler = "createTask" in tool.handler;
            if ((taskSupport === "required" || taskSupport === "optional") && !isTaskHandler) {
              throw new McpError(ErrorCode$1.InternalError, `Tool ${request3.params.name} has taskSupport '${taskSupport}' but was not registered with registerToolTask`);
            }
            if (taskSupport === "required" && !isTaskRequest) {
              throw new McpError(ErrorCode$1.MethodNotFound, `Tool ${request3.params.name} requires task augmentation (taskSupport: 'required')`);
            }
            if (taskSupport === "optional" && !isTaskRequest && isTaskHandler) {
              return await this.handleAutomaticTaskPolling(tool, request3, extra);
            }
            const args2 = await this.validateToolInput(tool, request3.params.arguments, request3.params.name);
            const result = await this.executeToolHandler(tool, args2, extra);
            if (isTaskRequest) {
              return result;
            }
            await this.validateToolOutput(tool, result, request3.params.name);
            return result;
          } catch (error) {
            if (error instanceof McpError) {
              if (error.code === ErrorCode$1.UrlElicitationRequired) {
                throw error;
              }
            }
            return this.createToolError(error instanceof Error ? error.message : String(error));
          }
        });
        this._toolHandlersInitialized = true;
      }
      createToolError(errorMessage) {
        return {
          content: [
            {
              type: "text",
              text: errorMessage
            }
          ],
          isError: true
        };
      }
      async validateToolInput(tool, args2, toolName) {
        if (!tool.inputSchema) {
          return void 0;
        }
        const inputObj = normalizeObjectSchema(tool.inputSchema);
        const schemaToParse = inputObj ?? tool.inputSchema;
        const parseResult = await safeParseAsync$1(schemaToParse, args2);
        if (!parseResult.success) {
          const error = "error" in parseResult ? parseResult.error : "Unknown error";
          const errorMessage = getParseErrorMessage(error);
          throw new McpError(ErrorCode$1.InvalidParams, `Input validation error: Invalid arguments for tool ${toolName}: ${errorMessage}`);
        }
        return parseResult.data;
      }
      async validateToolOutput(tool, result, toolName) {
        if (!tool.outputSchema) {
          return;
        }
        if (!("content" in result)) {
          return;
        }
        if (result.isError) {
          return;
        }
        if (!result.structuredContent) {
          throw new McpError(ErrorCode$1.InvalidParams, `Output validation error: Tool ${toolName} has an output schema but no structured content was provided`);
        }
        const outputObj = normalizeObjectSchema(tool.outputSchema);
        const parseResult = await safeParseAsync$1(outputObj, result.structuredContent);
        if (!parseResult.success) {
          const error = "error" in parseResult ? parseResult.error : "Unknown error";
          const errorMessage = getParseErrorMessage(error);
          throw new McpError(ErrorCode$1.InvalidParams, `Output validation error: Invalid structured content for tool ${toolName}: ${errorMessage}`);
        }
      }
      async executeToolHandler(tool, args2, extra) {
        const handler = tool.handler;
        const isTaskHandler = "createTask" in handler;
        if (isTaskHandler) {
          if (!extra.taskStore) {
            throw new Error("No task store provided.");
          }
          const taskExtra = { ...extra, taskStore: extra.taskStore };
          if (tool.inputSchema) {
            const typedHandler = handler;
            return await Promise.resolve(typedHandler.createTask(args2, taskExtra));
          } else {
            const typedHandler = handler;
            return await Promise.resolve(typedHandler.createTask(taskExtra));
          }
        }
        if (tool.inputSchema) {
          const typedHandler = handler;
          return await Promise.resolve(typedHandler(args2, extra));
        } else {
          const typedHandler = handler;
          return await Promise.resolve(typedHandler(extra));
        }
      }
      async handleAutomaticTaskPolling(tool, request3, extra) {
        if (!extra.taskStore) {
          throw new Error("No task store provided for task-capable tool.");
        }
        const args2 = await this.validateToolInput(tool, request3.params.arguments, request3.params.name);
        const handler = tool.handler;
        const taskExtra = { ...extra, taskStore: extra.taskStore };
        const createTaskResult = args2 ? await Promise.resolve(handler.createTask(args2, taskExtra)) : await Promise.resolve(handler.createTask(taskExtra));
        const taskId = createTaskResult.task.taskId;
        let task = createTaskResult.task;
        const pollInterval = task.pollInterval ?? 5e3;
        while (task.status !== "completed" && task.status !== "failed" && task.status !== "cancelled") {
          await new Promise((resolve2) => setTimeout(resolve2, pollInterval));
          const updatedTask = await extra.taskStore.getTask(taskId);
          if (!updatedTask) {
            throw new McpError(ErrorCode$1.InternalError, `Task ${taskId} not found during polling`);
          }
          task = updatedTask;
        }
        return await extra.taskStore.getTaskResult(taskId);
      }
      setCompletionRequestHandler() {
        if (this._completionHandlerInitialized) {
          return;
        }
        this.server.assertCanSetRequestHandler(getMethodValue(CompleteRequestSchema));
        this.server.registerCapabilities({
          completions: {}
        });
        this.server.setRequestHandler(CompleteRequestSchema, async (request3) => {
          switch (request3.params.ref.type) {
            case "ref/prompt":
              assertCompleteRequestPrompt(request3);
              return this.handlePromptCompletion(request3, request3.params.ref);
            case "ref/resource":
              assertCompleteRequestResourceTemplate(request3);
              return this.handleResourceCompletion(request3, request3.params.ref);
            default:
              throw new McpError(ErrorCode$1.InvalidParams, `Invalid completion reference: ${request3.params.ref}`);
          }
        });
        this._completionHandlerInitialized = true;
      }
      async handlePromptCompletion(request3, ref2) {
        const prompt = this._registeredPrompts[ref2.name];
        if (!prompt) {
          throw new McpError(ErrorCode$1.InvalidParams, `Prompt ${ref2.name} not found`);
        }
        if (!prompt.enabled) {
          throw new McpError(ErrorCode$1.InvalidParams, `Prompt ${ref2.name} disabled`);
        }
        if (!prompt.argsSchema) {
          return EMPTY_COMPLETION_RESULT;
        }
        const promptShape = getObjectShape(prompt.argsSchema);
        const field = promptShape?.[request3.params.argument.name];
        if (!isCompletable(field)) {
          return EMPTY_COMPLETION_RESULT;
        }
        const completer = getCompleter(field);
        if (!completer) {
          return EMPTY_COMPLETION_RESULT;
        }
        const suggestions = await completer(request3.params.argument.value, request3.params.context);
        return createCompletionResult(suggestions);
      }
      async handleResourceCompletion(request3, ref2) {
        const template = Object.values(this._registeredResourceTemplates).find((t) => t.resourceTemplate.uriTemplate.toString() === ref2.uri);
        if (!template) {
          if (this._registeredResources[ref2.uri]) {
            return EMPTY_COMPLETION_RESULT;
          }
          throw new McpError(ErrorCode$1.InvalidParams, `Resource template ${request3.params.ref.uri} not found`);
        }
        const completer = template.resourceTemplate.completeCallback(request3.params.argument.name);
        if (!completer) {
          return EMPTY_COMPLETION_RESULT;
        }
        const suggestions = await completer(request3.params.argument.value, request3.params.context);
        return createCompletionResult(suggestions);
      }
      setResourceRequestHandlers() {
        if (this._resourceHandlersInitialized) {
          return;
        }
        this.server.assertCanSetRequestHandler(getMethodValue(ListResourcesRequestSchema));
        this.server.assertCanSetRequestHandler(getMethodValue(ListResourceTemplatesRequestSchema));
        this.server.assertCanSetRequestHandler(getMethodValue(ReadResourceRequestSchema));
        this.server.registerCapabilities({
          resources: {
            listChanged: true
          }
        });
        this.server.setRequestHandler(ListResourcesRequestSchema, async (request3, extra) => {
          const resources = Object.entries(this._registeredResources).filter(([_, resource]) => resource.enabled).map(([uri2, resource]) => ({
            uri: uri2,
            name: resource.name,
            ...resource.metadata
          }));
          const templateResources = [];
          for (const template of Object.values(this._registeredResourceTemplates)) {
            if (!template.resourceTemplate.listCallback) {
              continue;
            }
            const result = await template.resourceTemplate.listCallback(extra);
            for (const resource of result.resources) {
              templateResources.push({
                ...template.metadata,
                ...resource
              });
            }
          }
          return { resources: [...resources, ...templateResources] };
        });
        this.server.setRequestHandler(ListResourceTemplatesRequestSchema, async () => {
          const resourceTemplates = Object.entries(this._registeredResourceTemplates).map(([name, template]) => ({
            name,
            uriTemplate: template.resourceTemplate.uriTemplate.toString(),
            ...template.metadata
          }));
          return { resourceTemplates };
        });
        this.server.setRequestHandler(ReadResourceRequestSchema, async (request3, extra) => {
          const uri2 = new URL(request3.params.uri);
          const resource = this._registeredResources[uri2.toString()];
          if (resource) {
            if (!resource.enabled) {
              throw new McpError(ErrorCode$1.InvalidParams, `Resource ${uri2} disabled`);
            }
            return resource.readCallback(uri2, extra);
          }
          for (const template of Object.values(this._registeredResourceTemplates)) {
            const variables = template.resourceTemplate.uriTemplate.match(uri2.toString());
            if (variables) {
              return template.readCallback(uri2, variables, extra);
            }
          }
          throw new McpError(ErrorCode$1.InvalidParams, `Resource ${uri2} not found`);
        });
        this._resourceHandlersInitialized = true;
      }
      setPromptRequestHandlers() {
        if (this._promptHandlersInitialized) {
          return;
        }
        this.server.assertCanSetRequestHandler(getMethodValue(ListPromptsRequestSchema));
        this.server.assertCanSetRequestHandler(getMethodValue(GetPromptRequestSchema));
        this.server.registerCapabilities({
          prompts: {
            listChanged: true
          }
        });
        this.server.setRequestHandler(ListPromptsRequestSchema, () => ({
          prompts: Object.entries(this._registeredPrompts).filter(([, prompt]) => prompt.enabled).map(([name, prompt]) => {
            return {
              name,
              title: prompt.title,
              description: prompt.description,
              arguments: prompt.argsSchema ? promptArgumentsFromSchema(prompt.argsSchema) : void 0
            };
          })
        }));
        this.server.setRequestHandler(GetPromptRequestSchema, async (request3, extra) => {
          const prompt = this._registeredPrompts[request3.params.name];
          if (!prompt) {
            throw new McpError(ErrorCode$1.InvalidParams, `Prompt ${request3.params.name} not found`);
          }
          if (!prompt.enabled) {
            throw new McpError(ErrorCode$1.InvalidParams, `Prompt ${request3.params.name} disabled`);
          }
          if (prompt.argsSchema) {
            const argsObj = normalizeObjectSchema(prompt.argsSchema);
            const parseResult = await safeParseAsync$1(argsObj, request3.params.arguments);
            if (!parseResult.success) {
              const error = "error" in parseResult ? parseResult.error : "Unknown error";
              const errorMessage = getParseErrorMessage(error);
              throw new McpError(ErrorCode$1.InvalidParams, `Invalid arguments for prompt ${request3.params.name}: ${errorMessage}`);
            }
            const args2 = parseResult.data;
            const cb = prompt.callback;
            return await Promise.resolve(cb(args2, extra));
          } else {
            const cb = prompt.callback;
            return await Promise.resolve(cb(extra));
          }
        });
        this._promptHandlersInitialized = true;
      }
      resource(name, uriOrTemplate, ...rest) {
        let metadata2;
        if (typeof rest[0] === "object") {
          metadata2 = rest.shift();
        }
        const readCallback = rest[0];
        if (typeof uriOrTemplate === "string") {
          if (this._registeredResources[uriOrTemplate]) {
            throw new Error(`Resource ${uriOrTemplate} is already registered`);
          }
          const registeredResource = this._createRegisteredResource(name, void 0, uriOrTemplate, metadata2, readCallback);
          this.setResourceRequestHandlers();
          this.sendResourceListChanged();
          return registeredResource;
        } else {
          if (this._registeredResourceTemplates[name]) {
            throw new Error(`Resource template ${name} is already registered`);
          }
          const registeredResourceTemplate = this._createRegisteredResourceTemplate(name, void 0, uriOrTemplate, metadata2, readCallback);
          this.setResourceRequestHandlers();
          this.sendResourceListChanged();
          return registeredResourceTemplate;
        }
      }
      registerResource(name, uriOrTemplate, config4, readCallback) {
        if (typeof uriOrTemplate === "string") {
          if (this._registeredResources[uriOrTemplate]) {
            throw new Error(`Resource ${uriOrTemplate} is already registered`);
          }
          const registeredResource = this._createRegisteredResource(name, config4.title, uriOrTemplate, config4, readCallback);
          this.setResourceRequestHandlers();
          this.sendResourceListChanged();
          return registeredResource;
        } else {
          if (this._registeredResourceTemplates[name]) {
            throw new Error(`Resource template ${name} is already registered`);
          }
          const registeredResourceTemplate = this._createRegisteredResourceTemplate(name, config4.title, uriOrTemplate, config4, readCallback);
          this.setResourceRequestHandlers();
          this.sendResourceListChanged();
          return registeredResourceTemplate;
        }
      }
      _createRegisteredResource(name, title2, uri2, metadata2, readCallback) {
        const registeredResource = {
          name,
          title: title2,
          metadata: metadata2,
          readCallback,
          enabled: true,
          disable: () => registeredResource.update({ enabled: false }),
          enable: () => registeredResource.update({ enabled: true }),
          remove: () => registeredResource.update({ uri: null }),
          update: (updates) => {
            if (typeof updates.uri !== "undefined" && updates.uri !== uri2) {
              delete this._registeredResources[uri2];
              if (updates.uri)
                this._registeredResources[updates.uri] = registeredResource;
            }
            if (typeof updates.name !== "undefined")
              registeredResource.name = updates.name;
            if (typeof updates.title !== "undefined")
              registeredResource.title = updates.title;
            if (typeof updates.metadata !== "undefined")
              registeredResource.metadata = updates.metadata;
            if (typeof updates.callback !== "undefined")
              registeredResource.readCallback = updates.callback;
            if (typeof updates.enabled !== "undefined")
              registeredResource.enabled = updates.enabled;
            this.sendResourceListChanged();
          }
        };
        this._registeredResources[uri2] = registeredResource;
        return registeredResource;
      }
      _createRegisteredResourceTemplate(name, title2, template, metadata2, readCallback) {
        const registeredResourceTemplate = {
          resourceTemplate: template,
          title: title2,
          metadata: metadata2,
          readCallback,
          enabled: true,
          disable: () => registeredResourceTemplate.update({ enabled: false }),
          enable: () => registeredResourceTemplate.update({ enabled: true }),
          remove: () => registeredResourceTemplate.update({ name: null }),
          update: (updates) => {
            if (typeof updates.name !== "undefined" && updates.name !== name) {
              delete this._registeredResourceTemplates[name];
              if (updates.name)
                this._registeredResourceTemplates[updates.name] = registeredResourceTemplate;
            }
            if (typeof updates.title !== "undefined")
              registeredResourceTemplate.title = updates.title;
            if (typeof updates.template !== "undefined")
              registeredResourceTemplate.resourceTemplate = updates.template;
            if (typeof updates.metadata !== "undefined")
              registeredResourceTemplate.metadata = updates.metadata;
            if (typeof updates.callback !== "undefined")
              registeredResourceTemplate.readCallback = updates.callback;
            if (typeof updates.enabled !== "undefined")
              registeredResourceTemplate.enabled = updates.enabled;
            this.sendResourceListChanged();
          }
        };
        this._registeredResourceTemplates[name] = registeredResourceTemplate;
        const variableNames = template.uriTemplate.variableNames;
        const hasCompleter = Array.isArray(variableNames) && variableNames.some((v) => !!template.completeCallback(v));
        if (hasCompleter) {
          this.setCompletionRequestHandler();
        }
        return registeredResourceTemplate;
      }
      _createRegisteredPrompt(name, title2, description2, argsSchema, callback) {
        const registeredPrompt = {
          title: title2,
          description: description2,
          argsSchema: argsSchema === void 0 ? void 0 : objectFromShape(argsSchema),
          callback,
          enabled: true,
          disable: () => registeredPrompt.update({ enabled: false }),
          enable: () => registeredPrompt.update({ enabled: true }),
          remove: () => registeredPrompt.update({ name: null }),
          update: (updates) => {
            if (typeof updates.name !== "undefined" && updates.name !== name) {
              delete this._registeredPrompts[name];
              if (updates.name)
                this._registeredPrompts[updates.name] = registeredPrompt;
            }
            if (typeof updates.title !== "undefined")
              registeredPrompt.title = updates.title;
            if (typeof updates.description !== "undefined")
              registeredPrompt.description = updates.description;
            if (typeof updates.argsSchema !== "undefined")
              registeredPrompt.argsSchema = objectFromShape(updates.argsSchema);
            if (typeof updates.callback !== "undefined")
              registeredPrompt.callback = updates.callback;
            if (typeof updates.enabled !== "undefined")
              registeredPrompt.enabled = updates.enabled;
            this.sendPromptListChanged();
          }
        };
        this._registeredPrompts[name] = registeredPrompt;
        if (argsSchema) {
          const hasCompletable = Object.values(argsSchema).some((field) => {
            const inner = field instanceof ZodOptional$1 ? field._def?.innerType : field;
            return isCompletable(inner);
          });
          if (hasCompletable) {
            this.setCompletionRequestHandler();
          }
        }
        return registeredPrompt;
      }
      _createRegisteredTool(name, title2, description2, inputSchema, outputSchema, annotations, execution, _meta, handler) {
        validateAndWarnToolName(name);
        const registeredTool = {
          title: title2,
          description: description2,
          inputSchema: getZodSchemaObject(inputSchema),
          outputSchema: getZodSchemaObject(outputSchema),
          annotations,
          execution,
          _meta,
          handler,
          enabled: true,
          disable: () => registeredTool.update({ enabled: false }),
          enable: () => registeredTool.update({ enabled: true }),
          remove: () => registeredTool.update({ name: null }),
          update: (updates) => {
            if (typeof updates.name !== "undefined" && updates.name !== name) {
              if (typeof updates.name === "string") {
                validateAndWarnToolName(updates.name);
              }
              delete this._registeredTools[name];
              if (updates.name)
                this._registeredTools[updates.name] = registeredTool;
            }
            if (typeof updates.title !== "undefined")
              registeredTool.title = updates.title;
            if (typeof updates.description !== "undefined")
              registeredTool.description = updates.description;
            if (typeof updates.paramsSchema !== "undefined")
              registeredTool.inputSchema = objectFromShape(updates.paramsSchema);
            if (typeof updates.outputSchema !== "undefined")
              registeredTool.outputSchema = objectFromShape(updates.outputSchema);
            if (typeof updates.callback !== "undefined")
              registeredTool.handler = updates.callback;
            if (typeof updates.annotations !== "undefined")
              registeredTool.annotations = updates.annotations;
            if (typeof updates._meta !== "undefined")
              registeredTool._meta = updates._meta;
            if (typeof updates.enabled !== "undefined")
              registeredTool.enabled = updates.enabled;
            this.sendToolListChanged();
          }
        };
        this._registeredTools[name] = registeredTool;
        this.setToolRequestHandlers();
        this.sendToolListChanged();
        return registeredTool;
      }
      tool(name, ...rest) {
        if (this._registeredTools[name]) {
          throw new Error(`Tool ${name} is already registered`);
        }
        let description2;
        let inputSchema;
        let outputSchema;
        let annotations;
        if (typeof rest[0] === "string") {
          description2 = rest.shift();
        }
        if (rest.length > 1) {
          const firstArg = rest[0];
          if (isZodRawShapeCompat(firstArg)) {
            inputSchema = rest.shift();
            if (rest.length > 1 && typeof rest[0] === "object" && rest[0] !== null && !isZodRawShapeCompat(rest[0])) {
              annotations = rest.shift();
            }
          } else if (typeof firstArg === "object" && firstArg !== null) {
            annotations = rest.shift();
          }
        }
        const callback = rest[0];
        return this._createRegisteredTool(name, void 0, description2, inputSchema, outputSchema, annotations, { taskSupport: "forbidden" }, void 0, callback);
      }
      registerTool(name, config4, cb) {
        if (this._registeredTools[name]) {
          throw new Error(`Tool ${name} is already registered`);
        }
        const { title: title2, description: description2, inputSchema, outputSchema, annotations, _meta } = config4;
        return this._createRegisteredTool(name, title2, description2, inputSchema, outputSchema, annotations, { taskSupport: "forbidden" }, _meta, cb);
      }
      prompt(name, ...rest) {
        if (this._registeredPrompts[name]) {
          throw new Error(`Prompt ${name} is already registered`);
        }
        let description2;
        if (typeof rest[0] === "string") {
          description2 = rest.shift();
        }
        let argsSchema;
        if (rest.length > 1) {
          argsSchema = rest.shift();
        }
        const cb = rest[0];
        const registeredPrompt = this._createRegisteredPrompt(name, void 0, description2, argsSchema, cb);
        this.setPromptRequestHandlers();
        this.sendPromptListChanged();
        return registeredPrompt;
      }
      registerPrompt(name, config4, cb) {
        if (this._registeredPrompts[name]) {
          throw new Error(`Prompt ${name} is already registered`);
        }
        const { title: title2, description: description2, argsSchema } = config4;
        const registeredPrompt = this._createRegisteredPrompt(name, title2, description2, argsSchema, cb);
        this.setPromptRequestHandlers();
        this.sendPromptListChanged();
        return registeredPrompt;
      }
      isConnected() {
        return this.server.transport !== void 0;
      }
      async sendLoggingMessage(params, sessionId) {
        return this.server.sendLoggingMessage(params, sessionId);
      }
      sendResourceListChanged() {
        if (this.isConnected()) {
          this.server.sendResourceListChanged();
        }
      }
      sendToolListChanged() {
        if (this.isConnected()) {
          this.server.sendToolListChanged();
        }
      }
      sendPromptListChanged() {
        if (this.isConnected()) {
          this.server.sendPromptListChanged();
        }
      }
    };
    EMPTY_OBJECT_JSON_SCHEMA = {
      type: "object",
      properties: {}
    };
    EMPTY_COMPLETION_RESULT = {
      completion: {
        values: [],
        hasMore: false
      }
    };
    ReadBuffer = class {
      append(chunk) {
        this._buffer = this._buffer ? Buffer.concat([this._buffer, chunk]) : chunk;
      }
      readMessage() {
        if (!this._buffer) {
          return null;
        }
        const index2 = this._buffer.indexOf("\n");
        if (index2 === -1) {
          return null;
        }
        const line = this._buffer.toString("utf8", 0, index2).replace(/\r$/, "");
        this._buffer = this._buffer.subarray(index2 + 1);
        return deserializeMessage(line);
      }
      clear() {
        this._buffer = void 0;
      }
    };
    StdioServerTransport = class {
      constructor(_stdin = process$2.stdin, _stdout = process$2.stdout) {
        this._stdin = _stdin;
        this._stdout = _stdout;
        this._readBuffer = new ReadBuffer();
        this._started = false;
        this._ondata = (chunk) => {
          this._readBuffer.append(chunk);
          this.processReadBuffer();
        };
        this._onerror = (error) => {
          this.onerror?.(error);
        };
      }
      async start() {
        if (this._started) {
          throw new Error("StdioServerTransport already started! If using Server class, note that connect() calls start() automatically.");
        }
        this._started = true;
        this._stdin.on("data", this._ondata);
        this._stdin.on("error", this._onerror);
      }
      processReadBuffer() {
        while (true) {
          try {
            const message = this._readBuffer.readMessage();
            if (message === null) {
              break;
            }
            this.onmessage?.(message);
          } catch (error) {
            this.onerror?.(error);
          }
        }
      }
      async close() {
        this._stdin.off("data", this._ondata);
        this._stdin.off("error", this._onerror);
        const remainingDataListeners = this._stdin.listenerCount("data");
        if (remainingDataListeners === 0) {
          this._stdin.pause();
        }
        this._readBuffer.clear();
        this.onclose?.();
      }
      send(message) {
        return new Promise((resolve2) => {
          const json = serializeMessage(message);
          if (this._stdout.write(json)) {
            resolve2();
          } else {
            this._stdout.once("drain", resolve2);
          }
        });
      }
    };
    crossSpawn = { exports: {} };
    pathKey = { exports: {} };
    _escape = {};
    crossSpawnExports = requireCrossSpawn();
    DEFAULT_INHERITED_ENV_VARS = process$2.platform === "win32" ? [
      "APPDATA",
      "HOMEDRIVE",
      "HOMEPATH",
      "LOCALAPPDATA",
      "PATH",
      "PROCESSOR_ARCHITECTURE",
      "SYSTEMDRIVE",
      "SYSTEMROOT",
      "TEMP",
      "USERNAME",
      "USERPROFILE",
      "PROGRAMFILES"
    ] : ["HOME", "LOGNAME", "PATH", "SHELL", "TERM", "USER"];
    extendStatics$1 = function(d, b) {
      extendStatics$1 = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d2, b2) {
        d2.__proto__ = b2;
      } || function(d2, b2) {
        for (var p in b2) if (Object.prototype.hasOwnProperty.call(b2, p)) d2[p] = b2[p];
      };
      return extendStatics$1(d, b);
    };
    UnsubscriptionError = createErrorClass(function(_super) {
      return function UnsubscriptionErrorImpl(errors2) {
        _super(this);
        this.message = errors2 ? errors2.length + " errors occurred during unsubscription:\n" + errors2.map(function(err, i) {
          return i + 1 + ") " + err.toString();
        }).join("\n  ") : "";
        this.name = "UnsubscriptionError";
        this.errors = errors2;
      };
    });
    Subscription = function() {
      function Subscription2(initialTeardown) {
        this.initialTeardown = initialTeardown;
        this.closed = false;
        this._parentage = null;
        this._finalizers = null;
      }
      Subscription2.prototype.unsubscribe = function() {
        var e_1, _a4, e_2, _b2;
        var errors2;
        if (!this.closed) {
          this.closed = true;
          var _parentage = this._parentage;
          if (_parentage) {
            this._parentage = null;
            if (Array.isArray(_parentage)) {
              try {
                for (var _parentage_1 = __values$1(_parentage), _parentage_1_1 = _parentage_1.next(); !_parentage_1_1.done; _parentage_1_1 = _parentage_1.next()) {
                  var parent_1 = _parentage_1_1.value;
                  parent_1.remove(this);
                }
              } catch (e_1_1) {
                e_1 = { error: e_1_1 };
              } finally {
                try {
                  if (_parentage_1_1 && !_parentage_1_1.done && (_a4 = _parentage_1.return)) _a4.call(_parentage_1);
                } finally {
                  if (e_1) throw e_1.error;
                }
              }
            } else {
              _parentage.remove(this);
            }
          }
          var initialFinalizer = this.initialTeardown;
          if (isFunction2(initialFinalizer)) {
            try {
              initialFinalizer();
            } catch (e) {
              errors2 = e instanceof UnsubscriptionError ? e.errors : [e];
            }
          }
          var _finalizers = this._finalizers;
          if (_finalizers) {
            this._finalizers = null;
            try {
              for (var _finalizers_1 = __values$1(_finalizers), _finalizers_1_1 = _finalizers_1.next(); !_finalizers_1_1.done; _finalizers_1_1 = _finalizers_1.next()) {
                var finalizer = _finalizers_1_1.value;
                try {
                  execFinalizer(finalizer);
                } catch (err) {
                  errors2 = errors2 !== null && errors2 !== void 0 ? errors2 : [];
                  if (err instanceof UnsubscriptionError) {
                    errors2 = __spreadArray$1(__spreadArray$1([], __read$1(errors2)), __read$1(err.errors));
                  } else {
                    errors2.push(err);
                  }
                }
              }
            } catch (e_2_1) {
              e_2 = { error: e_2_1 };
            } finally {
              try {
                if (_finalizers_1_1 && !_finalizers_1_1.done && (_b2 = _finalizers_1.return)) _b2.call(_finalizers_1);
              } finally {
                if (e_2) throw e_2.error;
              }
            }
          }
          if (errors2) {
            throw new UnsubscriptionError(errors2);
          }
        }
      };
      Subscription2.prototype.add = function(teardown) {
        var _a4;
        if (teardown && teardown !== this) {
          if (this.closed) {
            execFinalizer(teardown);
          } else {
            if (teardown instanceof Subscription2) {
              if (teardown.closed || teardown._hasParent(this)) {
                return;
              }
              teardown._addParent(this);
            }
            (this._finalizers = (_a4 = this._finalizers) !== null && _a4 !== void 0 ? _a4 : []).push(teardown);
          }
        }
      };
      Subscription2.prototype._hasParent = function(parent) {
        var _parentage = this._parentage;
        return _parentage === parent || Array.isArray(_parentage) && _parentage.includes(parent);
      };
      Subscription2.prototype._addParent = function(parent) {
        var _parentage = this._parentage;
        this._parentage = Array.isArray(_parentage) ? (_parentage.push(parent), _parentage) : _parentage ? [_parentage, parent] : parent;
      };
      Subscription2.prototype._removeParent = function(parent) {
        var _parentage = this._parentage;
        if (_parentage === parent) {
          this._parentage = null;
        } else if (Array.isArray(_parentage)) {
          arrRemove(_parentage, parent);
        }
      };
      Subscription2.prototype.remove = function(teardown) {
        var _finalizers = this._finalizers;
        _finalizers && arrRemove(_finalizers, teardown);
        if (teardown instanceof Subscription2) {
          teardown._removeParent(this);
        }
      };
      Subscription2.EMPTY = function() {
        var empty = new Subscription2();
        empty.closed = true;
        return empty;
      }();
      return Subscription2;
    }();
    EMPTY_SUBSCRIPTION = Subscription.EMPTY;
    config$2 = {
      Promise: void 0
    };
    timeoutProvider = {
      setTimeout: function(handler, timeout2) {
        var args2 = [];
        for (var _i = 2; _i < arguments.length; _i++) {
          args2[_i - 2] = arguments[_i];
        }
        return setTimeout.apply(void 0, __spreadArray$1([handler, timeout2], __read$1(args2)));
      },
      clearTimeout: function(handle) {
        return clearTimeout(handle);
      },
      delegate: void 0
    };
    Subscriber = function(_super) {
      __extends$1(Subscriber2, _super);
      function Subscriber2(destination) {
        var _this = _super.call(this) || this;
        _this.isStopped = false;
        if (destination) {
          _this.destination = destination;
          if (isSubscription(destination)) {
            destination.add(_this);
          }
        } else {
          _this.destination = EMPTY_OBSERVER;
        }
        return _this;
      }
      Subscriber2.create = function(next, error, complete) {
        return new SafeSubscriber(next, error, complete);
      };
      Subscriber2.prototype.next = function(value) {
        if (this.isStopped) ;
        else {
          this._next(value);
        }
      };
      Subscriber2.prototype.error = function(err) {
        if (this.isStopped) ;
        else {
          this.isStopped = true;
          this._error(err);
        }
      };
      Subscriber2.prototype.complete = function() {
        if (this.isStopped) ;
        else {
          this.isStopped = true;
          this._complete();
        }
      };
      Subscriber2.prototype.unsubscribe = function() {
        if (!this.closed) {
          this.isStopped = true;
          _super.prototype.unsubscribe.call(this);
          this.destination = null;
        }
      };
      Subscriber2.prototype._next = function(value) {
        this.destination.next(value);
      };
      Subscriber2.prototype._error = function(err) {
        try {
          this.destination.error(err);
        } finally {
          this.unsubscribe();
        }
      };
      Subscriber2.prototype._complete = function() {
        try {
          this.destination.complete();
        } finally {
          this.unsubscribe();
        }
      };
      return Subscriber2;
    }(Subscription);
    ConsumerObserver = function() {
      function ConsumerObserver2(partialObserver) {
        this.partialObserver = partialObserver;
      }
      ConsumerObserver2.prototype.next = function(value) {
        var partialObserver = this.partialObserver;
        if (partialObserver.next) {
          try {
            partialObserver.next(value);
          } catch (error) {
            handleUnhandledError(error);
          }
        }
      };
      ConsumerObserver2.prototype.error = function(err) {
        var partialObserver = this.partialObserver;
        if (partialObserver.error) {
          try {
            partialObserver.error(err);
          } catch (error) {
            handleUnhandledError(error);
          }
        } else {
          handleUnhandledError(err);
        }
      };
      ConsumerObserver2.prototype.complete = function() {
        var partialObserver = this.partialObserver;
        if (partialObserver.complete) {
          try {
            partialObserver.complete();
          } catch (error) {
            handleUnhandledError(error);
          }
        }
      };
      return ConsumerObserver2;
    }();
    SafeSubscriber = function(_super) {
      __extends$1(SafeSubscriber2, _super);
      function SafeSubscriber2(observerOrNext, error, complete) {
        var _this = _super.call(this) || this;
        var partialObserver;
        if (isFunction2(observerOrNext) || !observerOrNext) {
          partialObserver = {
            next: observerOrNext !== null && observerOrNext !== void 0 ? observerOrNext : void 0,
            error: error !== null && error !== void 0 ? error : void 0,
            complete: complete !== null && complete !== void 0 ? complete : void 0
          };
        } else {
          {
            partialObserver = observerOrNext;
          }
        }
        _this.destination = new ConsumerObserver(partialObserver);
        return _this;
      }
      return SafeSubscriber2;
    }(Subscriber);
    EMPTY_OBSERVER = {
      closed: true,
      next: noop2,
      error: defaultErrorHandler,
      complete: noop2
    };
    observable = function() {
      return typeof Symbol === "function" && Symbol.observable || "@@observable";
    }();
    Observable = function() {
      function Observable2(subscribe) {
        if (subscribe) {
          this._subscribe = subscribe;
        }
      }
      Observable2.prototype.lift = function(operator) {
        var observable2 = new Observable2();
        observable2.source = this;
        observable2.operator = operator;
        return observable2;
      };
      Observable2.prototype.subscribe = function(observerOrNext, error, complete) {
        var _this = this;
        var subscriber = isSubscriber(observerOrNext) ? observerOrNext : new SafeSubscriber(observerOrNext, error, complete);
        errorContext(function() {
          var _a4 = _this, operator = _a4.operator, source2 = _a4.source;
          subscriber.add(operator ? operator.call(subscriber, source2) : source2 ? _this._subscribe(subscriber) : _this._trySubscribe(subscriber));
        });
        return subscriber;
      };
      Observable2.prototype._trySubscribe = function(sink) {
        try {
          return this._subscribe(sink);
        } catch (err) {
          sink.error(err);
        }
      };
      Observable2.prototype.forEach = function(next, promiseCtor) {
        var _this = this;
        promiseCtor = getPromiseCtor(promiseCtor);
        return new promiseCtor(function(resolve2, reject) {
          var subscriber = new SafeSubscriber({
            next: function(value) {
              try {
                next(value);
              } catch (err) {
                reject(err);
                subscriber.unsubscribe();
              }
            },
            error: reject,
            complete: resolve2
          });
          _this.subscribe(subscriber);
        });
      };
      Observable2.prototype._subscribe = function(subscriber) {
        var _a4;
        return (_a4 = this.source) === null || _a4 === void 0 ? void 0 : _a4.subscribe(subscriber);
      };
      Observable2.prototype[observable] = function() {
        return this;
      };
      Observable2.prototype.pipe = function() {
        var operations = [];
        for (var _i = 0; _i < arguments.length; _i++) {
          operations[_i] = arguments[_i];
        }
        return pipeFromArray(operations)(this);
      };
      Observable2.prototype.toPromise = function(promiseCtor) {
        var _this = this;
        promiseCtor = getPromiseCtor(promiseCtor);
        return new promiseCtor(function(resolve2, reject) {
          var value;
          _this.subscribe(function(x) {
            return value = x;
          }, function(err) {
            return reject(err);
          }, function() {
            return resolve2(value);
          });
        });
      };
      Observable2.create = function(subscribe) {
        return new Observable2(subscribe);
      };
      return Observable2;
    }();
    OperatorSubscriber = function(_super) {
      __extends$1(OperatorSubscriber2, _super);
      function OperatorSubscriber2(destination, onNext, onComplete, onError, onFinalize, shouldUnsubscribe) {
        var _this = _super.call(this, destination) || this;
        _this.onFinalize = onFinalize;
        _this.shouldUnsubscribe = shouldUnsubscribe;
        _this._next = onNext ? function(value) {
          try {
            onNext(value);
          } catch (err) {
            destination.error(err);
          }
        } : _super.prototype._next;
        _this._error = onError ? function(err) {
          try {
            onError(err);
          } catch (err2) {
            destination.error(err2);
          } finally {
            this.unsubscribe();
          }
        } : _super.prototype._error;
        _this._complete = onComplete ? function() {
          try {
            onComplete();
          } catch (err) {
            destination.error(err);
          } finally {
            this.unsubscribe();
          }
        } : _super.prototype._complete;
        return _this;
      }
      OperatorSubscriber2.prototype.unsubscribe = function() {
        var _a4;
        if (!this.shouldUnsubscribe || this.shouldUnsubscribe()) {
          var closed_1 = this.closed;
          _super.prototype.unsubscribe.call(this);
          !closed_1 && ((_a4 = this.onFinalize) === null || _a4 === void 0 ? void 0 : _a4.call(this));
        }
      };
      return OperatorSubscriber2;
    }(Subscriber);
    ObjectUnsubscribedError = createErrorClass(function(_super) {
      return function ObjectUnsubscribedErrorImpl() {
        _super(this);
        this.name = "ObjectUnsubscribedError";
        this.message = "object unsubscribed";
      };
    });
    Subject = function(_super) {
      __extends$1(Subject2, _super);
      function Subject2() {
        var _this = _super.call(this) || this;
        _this.closed = false;
        _this.currentObservers = null;
        _this.observers = [];
        _this.isStopped = false;
        _this.hasError = false;
        _this.thrownError = null;
        return _this;
      }
      Subject2.prototype.lift = function(operator) {
        var subject = new AnonymousSubject(this, this);
        subject.operator = operator;
        return subject;
      };
      Subject2.prototype._throwIfClosed = function() {
        if (this.closed) {
          throw new ObjectUnsubscribedError();
        }
      };
      Subject2.prototype.next = function(value) {
        var _this = this;
        errorContext(function() {
          var e_1, _a4;
          _this._throwIfClosed();
          if (!_this.isStopped) {
            if (!_this.currentObservers) {
              _this.currentObservers = Array.from(_this.observers);
            }
            try {
              for (var _b2 = __values$1(_this.currentObservers), _c2 = _b2.next(); !_c2.done; _c2 = _b2.next()) {
                var observer = _c2.value;
                observer.next(value);
              }
            } catch (e_1_1) {
              e_1 = { error: e_1_1 };
            } finally {
              try {
                if (_c2 && !_c2.done && (_a4 = _b2.return)) _a4.call(_b2);
              } finally {
                if (e_1) throw e_1.error;
              }
            }
          }
        });
      };
      Subject2.prototype.error = function(err) {
        var _this = this;
        errorContext(function() {
          _this._throwIfClosed();
          if (!_this.isStopped) {
            _this.hasError = _this.isStopped = true;
            _this.thrownError = err;
            var observers = _this.observers;
            while (observers.length) {
              observers.shift().error(err);
            }
          }
        });
      };
      Subject2.prototype.complete = function() {
        var _this = this;
        errorContext(function() {
          _this._throwIfClosed();
          if (!_this.isStopped) {
            _this.isStopped = true;
            var observers = _this.observers;
            while (observers.length) {
              observers.shift().complete();
            }
          }
        });
      };
      Subject2.prototype.unsubscribe = function() {
        this.isStopped = this.closed = true;
        this.observers = this.currentObservers = null;
      };
      Object.defineProperty(Subject2.prototype, "observed", {
        get: function() {
          var _a4;
          return ((_a4 = this.observers) === null || _a4 === void 0 ? void 0 : _a4.length) > 0;
        },
        enumerable: false,
        configurable: true
      });
      Subject2.prototype._trySubscribe = function(subscriber) {
        this._throwIfClosed();
        return _super.prototype._trySubscribe.call(this, subscriber);
      };
      Subject2.prototype._subscribe = function(subscriber) {
        this._throwIfClosed();
        this._checkFinalizedStatuses(subscriber);
        return this._innerSubscribe(subscriber);
      };
      Subject2.prototype._innerSubscribe = function(subscriber) {
        var _this = this;
        var _a4 = this, hasError = _a4.hasError, isStopped = _a4.isStopped, observers = _a4.observers;
        if (hasError || isStopped) {
          return EMPTY_SUBSCRIPTION;
        }
        this.currentObservers = null;
        observers.push(subscriber);
        return new Subscription(function() {
          _this.currentObservers = null;
          arrRemove(observers, subscriber);
        });
      };
      Subject2.prototype._checkFinalizedStatuses = function(subscriber) {
        var _a4 = this, hasError = _a4.hasError, thrownError = _a4.thrownError, isStopped = _a4.isStopped;
        if (hasError) {
          subscriber.error(thrownError);
        } else if (isStopped) {
          subscriber.complete();
        }
      };
      Subject2.prototype.asObservable = function() {
        var observable2 = new Observable();
        observable2.source = this;
        return observable2;
      };
      Subject2.create = function(destination, source2) {
        return new AnonymousSubject(destination, source2);
      };
      return Subject2;
    }(Observable);
    AnonymousSubject = function(_super) {
      __extends$1(AnonymousSubject2, _super);
      function AnonymousSubject2(destination, source2) {
        var _this = _super.call(this) || this;
        _this.destination = destination;
        _this.source = source2;
        return _this;
      }
      AnonymousSubject2.prototype.next = function(value) {
        var _a4, _b2;
        (_b2 = (_a4 = this.destination) === null || _a4 === void 0 ? void 0 : _a4.next) === null || _b2 === void 0 ? void 0 : _b2.call(_a4, value);
      };
      AnonymousSubject2.prototype.error = function(err) {
        var _a4, _b2;
        (_b2 = (_a4 = this.destination) === null || _a4 === void 0 ? void 0 : _a4.error) === null || _b2 === void 0 ? void 0 : _b2.call(_a4, err);
      };
      AnonymousSubject2.prototype.complete = function() {
        var _a4, _b2;
        (_b2 = (_a4 = this.destination) === null || _a4 === void 0 ? void 0 : _a4.complete) === null || _b2 === void 0 ? void 0 : _b2.call(_a4);
      };
      AnonymousSubject2.prototype._subscribe = function(subscriber) {
        var _a4, _b2;
        return (_b2 = (_a4 = this.source) === null || _a4 === void 0 ? void 0 : _a4.subscribe(subscriber)) !== null && _b2 !== void 0 ? _b2 : EMPTY_SUBSCRIPTION;
      };
      return AnonymousSubject2;
    }(Subject);
    dateTimestampProvider = {
      now: function() {
        return (dateTimestampProvider.delegate || Date).now();
      },
      delegate: void 0
    };
    ReplaySubject = function(_super) {
      __extends$1(ReplaySubject2, _super);
      function ReplaySubject2(_bufferSize, _windowTime, _timestampProvider) {
        if (_bufferSize === void 0) {
          _bufferSize = Infinity;
        }
        if (_windowTime === void 0) {
          _windowTime = Infinity;
        }
        if (_timestampProvider === void 0) {
          _timestampProvider = dateTimestampProvider;
        }
        var _this = _super.call(this) || this;
        _this._bufferSize = _bufferSize;
        _this._windowTime = _windowTime;
        _this._timestampProvider = _timestampProvider;
        _this._buffer = [];
        _this._infiniteTimeWindow = true;
        _this._infiniteTimeWindow = _windowTime === Infinity;
        _this._bufferSize = Math.max(1, _bufferSize);
        _this._windowTime = Math.max(1, _windowTime);
        return _this;
      }
      ReplaySubject2.prototype.next = function(value) {
        var _a4 = this, isStopped = _a4.isStopped, _buffer = _a4._buffer, _infiniteTimeWindow = _a4._infiniteTimeWindow, _timestampProvider = _a4._timestampProvider, _windowTime = _a4._windowTime;
        if (!isStopped) {
          _buffer.push(value);
          !_infiniteTimeWindow && _buffer.push(_timestampProvider.now() + _windowTime);
        }
        this._trimBuffer();
        _super.prototype.next.call(this, value);
      };
      ReplaySubject2.prototype._subscribe = function(subscriber) {
        this._throwIfClosed();
        this._trimBuffer();
        var subscription = this._innerSubscribe(subscriber);
        var _a4 = this, _infiniteTimeWindow = _a4._infiniteTimeWindow, _buffer = _a4._buffer;
        var copy = _buffer.slice();
        for (var i = 0; i < copy.length && !subscriber.closed; i += _infiniteTimeWindow ? 1 : 2) {
          subscriber.next(copy[i]);
        }
        this._checkFinalizedStatuses(subscriber);
        return subscription;
      };
      ReplaySubject2.prototype._trimBuffer = function() {
        var _a4 = this, _bufferSize = _a4._bufferSize, _timestampProvider = _a4._timestampProvider, _buffer = _a4._buffer, _infiniteTimeWindow = _a4._infiniteTimeWindow;
        var adjustedBufferSize = (_infiniteTimeWindow ? 1 : 2) * _bufferSize;
        _bufferSize < Infinity && adjustedBufferSize < _buffer.length && _buffer.splice(0, _buffer.length - adjustedBufferSize);
        if (!_infiniteTimeWindow) {
          var now = _timestampProvider.now();
          var last2 = 0;
          for (var i = 1; i < _buffer.length && _buffer[i] <= now; i += 2) {
            last2 = i;
          }
          last2 && _buffer.splice(0, last2 + 1);
        }
      };
      return ReplaySubject2;
    }(Subject);
    Action$1 = function(_super) {
      __extends$1(Action2, _super);
      function Action2(scheduler, work) {
        return _super.call(this) || this;
      }
      Action2.prototype.schedule = function(state, delay2) {
        return this;
      };
      return Action2;
    }(Subscription);
    intervalProvider = {
      setInterval: function(handler, timeout2) {
        var args2 = [];
        for (var _i = 2; _i < arguments.length; _i++) {
          args2[_i - 2] = arguments[_i];
        }
        return setInterval.apply(void 0, __spreadArray$1([handler, timeout2], __read$1(args2)));
      },
      clearInterval: function(handle) {
        return clearInterval(handle);
      },
      delegate: void 0
    };
    AsyncAction = function(_super) {
      __extends$1(AsyncAction2, _super);
      function AsyncAction2(scheduler, work) {
        var _this = _super.call(this, scheduler, work) || this;
        _this.scheduler = scheduler;
        _this.work = work;
        _this.pending = false;
        return _this;
      }
      AsyncAction2.prototype.schedule = function(state, delay2) {
        var _a4;
        if (delay2 === void 0) {
          delay2 = 0;
        }
        if (this.closed) {
          return this;
        }
        this.state = state;
        var id2 = this.id;
        var scheduler = this.scheduler;
        if (id2 != null) {
          this.id = this.recycleAsyncId(scheduler, id2, delay2);
        }
        this.pending = true;
        this.delay = delay2;
        this.id = (_a4 = this.id) !== null && _a4 !== void 0 ? _a4 : this.requestAsyncId(scheduler, this.id, delay2);
        return this;
      };
      AsyncAction2.prototype.requestAsyncId = function(scheduler, _id, delay2) {
        if (delay2 === void 0) {
          delay2 = 0;
        }
        return intervalProvider.setInterval(scheduler.flush.bind(scheduler, this), delay2);
      };
      AsyncAction2.prototype.recycleAsyncId = function(_scheduler, id2, delay2) {
        if (delay2 === void 0) {
          delay2 = 0;
        }
        if (delay2 != null && this.delay === delay2 && this.pending === false) {
          return id2;
        }
        if (id2 != null) {
          intervalProvider.clearInterval(id2);
        }
        return void 0;
      };
      AsyncAction2.prototype.execute = function(state, delay2) {
        if (this.closed) {
          return new Error("executing a cancelled action");
        }
        this.pending = false;
        var error = this._execute(state, delay2);
        if (error) {
          return error;
        } else if (this.pending === false && this.id != null) {
          this.id = this.recycleAsyncId(this.scheduler, this.id, null);
        }
      };
      AsyncAction2.prototype._execute = function(state, _delay) {
        var errored = false;
        var errorValue;
        try {
          this.work(state);
        } catch (e) {
          errored = true;
          errorValue = e ? e : new Error("Scheduled action threw falsy error");
        }
        if (errored) {
          this.unsubscribe();
          return errorValue;
        }
      };
      AsyncAction2.prototype.unsubscribe = function() {
        if (!this.closed) {
          var _a4 = this, id2 = _a4.id, scheduler = _a4.scheduler;
          var actions = scheduler.actions;
          this.work = this.state = this.scheduler = null;
          this.pending = false;
          arrRemove(actions, this);
          if (id2 != null) {
            this.id = this.recycleAsyncId(scheduler, id2, null);
          }
          this.delay = null;
          _super.prototype.unsubscribe.call(this);
        }
      };
      return AsyncAction2;
    }(Action$1);
    Scheduler = function() {
      function Scheduler2(schedulerActionCtor, now) {
        if (now === void 0) {
          now = Scheduler2.now;
        }
        this.schedulerActionCtor = schedulerActionCtor;
        this.now = now;
      }
      Scheduler2.prototype.schedule = function(work, delay2, state) {
        if (delay2 === void 0) {
          delay2 = 0;
        }
        return new this.schedulerActionCtor(this, work).schedule(state, delay2);
      };
      Scheduler2.now = dateTimestampProvider.now;
      return Scheduler2;
    }();
    AsyncScheduler = function(_super) {
      __extends$1(AsyncScheduler2, _super);
      function AsyncScheduler2(SchedulerAction, now) {
        if (now === void 0) {
          now = Scheduler.now;
        }
        var _this = _super.call(this, SchedulerAction, now) || this;
        _this.actions = [];
        _this._active = false;
        return _this;
      }
      AsyncScheduler2.prototype.flush = function(action) {
        var actions = this.actions;
        if (this._active) {
          actions.push(action);
          return;
        }
        var error;
        this._active = true;
        do {
          if (error = action.execute(action.state, action.delay)) {
            break;
          }
        } while (action = actions.shift());
        this._active = false;
        if (error) {
          while (action = actions.shift()) {
            action.unsubscribe();
          }
          throw error;
        }
      };
      return AsyncScheduler2;
    }(Scheduler);
    asyncScheduler = new AsyncScheduler(AsyncAction);
    async = asyncScheduler;
    EMPTY = new Observable(function(subscriber) {
      return subscriber.complete();
    });
    isArrayLike2 = function(x) {
      return x && typeof x.length === "number" && typeof x !== "function";
    };
    iterator = getSymbolIterator();
    EmptyError = createErrorClass(function(_super) {
      return function EmptyErrorImpl() {
        _super(this);
        this.name = "EmptyError";
        this.message = "no elements in sequence";
      };
    });
    isArray2 = Array.isArray;
    nodeEventEmitterMethods = ["addListener", "removeListener"];
    eventTargetMethods = ["addEventListener", "removeEventListener"];
    jqueryMethods = ["on", "off"];
    NEVER = new Observable(noop2);
    isArray3 = Array.isArray;
    Symbol.dispose ??= Symbol("dispose");
    Symbol.asyncDispose ??= Symbol("asyncDispose");
    disposeSymbol = Symbol.dispose;
    asyncDisposeSymbol = Symbol.asyncDispose;
    DisposableStackPolyfill = class _DisposableStackPolyfill {
      #disposed = false;
      #stack = [];
      get disposed() {
        return this.#disposed;
      }
      dispose() {
        this[disposeSymbol]();
      }
      use(value) {
        if (value && typeof value[disposeSymbol] === "function") {
          this.#stack.push(value);
        }
        return value;
      }
      adopt(value, onDispose) {
        this.#stack.push({
          [disposeSymbol]() {
            onDispose(value);
          }
        });
        return value;
      }
      defer(onDispose) {
        this.#stack.push({
          [disposeSymbol]() {
            onDispose();
          }
        });
      }
      move() {
        if (this.#disposed) {
          throw new ReferenceError("A disposed stack can not use anything new");
        }
        const stack = new _DisposableStackPolyfill();
        stack.#stack = this.#stack;
        this.#stack = [];
        this.#disposed = true;
        return stack;
      }
      [disposeSymbol]() {
        if (this.#disposed) {
          return;
        }
        this.#disposed = true;
        const errors2 = [];
        for (const resource of this.#stack.reverse()) {
          try {
            resource[disposeSymbol]();
          } catch (e) {
            errors2.push(e);
          }
        }
        if (errors2.length === 1) {
          throw errors2[0];
        } else if (errors2.length > 1) {
          let suppressed = null;
          for (const error of errors2) {
            if (suppressed === null) {
              suppressed = error;
            } else {
              suppressed = new SuppressedErrorPolyfill(error, suppressed);
            }
          }
          throw suppressed;
        }
      }
      [Symbol.toStringTag] = "DisposableStack";
    };
    DisposableStack = globalThis.DisposableStack ?? DisposableStackPolyfill;
    AsyncDisposableStackPolyfill = class _AsyncDisposableStackPolyfill {
      #disposed = false;
      #stack = [];
      get disposed() {
        return this.#disposed;
      }
      async disposeAsync() {
        await this[asyncDisposeSymbol]();
      }
      use(value) {
        if (value) {
          const asyncDispose = value[asyncDisposeSymbol];
          const dispose = value[disposeSymbol];
          if (typeof asyncDispose === "function") {
            this.#stack.push(value);
          } else if (typeof dispose === "function") {
            this.#stack.push({
              [asyncDisposeSymbol]: async () => {
                value[disposeSymbol]();
              }
            });
          }
        }
        return value;
      }
      adopt(value, onDispose) {
        this.#stack.push({
          [asyncDisposeSymbol]() {
            return onDispose(value);
          }
        });
        return value;
      }
      defer(onDispose) {
        this.#stack.push({
          [asyncDisposeSymbol]() {
            return onDispose();
          }
        });
      }
      move() {
        if (this.#disposed) {
          throw new ReferenceError("A disposed stack can not use anything new");
        }
        const stack = new _AsyncDisposableStackPolyfill();
        stack.#stack = this.#stack;
        this.#stack = [];
        this.#disposed = true;
        return stack;
      }
      async [asyncDisposeSymbol]() {
        if (this.#disposed) {
          return;
        }
        this.#disposed = true;
        const errors2 = [];
        for (const resource of this.#stack.reverse()) {
          try {
            await resource[asyncDisposeSymbol]();
          } catch (e) {
            errors2.push(e);
          }
        }
        if (errors2.length === 1) {
          throw errors2[0];
        } else if (errors2.length > 1) {
          let suppressed = null;
          for (const error of errors2) {
            if (suppressed === null) {
              suppressed = error;
            } else {
              suppressed = new SuppressedErrorPolyfill(error, suppressed);
            }
          }
          throw suppressed;
        }
      }
      [Symbol.toStringTag] = "AsyncDisposableStack";
    };
    AsyncDisposableStack = globalThis.AsyncDisposableStack ?? AsyncDisposableStackPolyfill;
    SuppressedErrorPolyfill = class extends Error {
      #error;
      #suppressed;
      constructor(error, suppressed, message = "An error was suppressed during disposal") {
        super(message);
        this.name = "SuppressedError";
        this.#error = error;
        this.#suppressed = suppressed;
      }
      get error() {
        return this.#error;
      }
      get suppressed() {
        return this.#suppressed;
      }
    };
    EventEmitter6 = class {
      #emitter;
      #handlers = /* @__PURE__ */ new Map();
      constructor(emitter = mitt_default(/* @__PURE__ */ new Map())) {
        this.#emitter = emitter;
      }
      on(type2, handler) {
        const handlers2 = this.#handlers.get(type2);
        if (handlers2 === void 0) {
          this.#handlers.set(type2, [handler]);
        } else {
          handlers2.push(handler);
        }
        this.#emitter.on(type2, handler);
        return this;
      }
      off(type2, handler) {
        const handlers2 = this.#handlers.get(type2) ?? [];
        if (handler === void 0) {
          for (const handler2 of handlers2) {
            this.#emitter.off(type2, handler2);
          }
          this.#handlers.delete(type2);
          return this;
        }
        const index2 = handlers2.lastIndexOf(handler);
        if (index2 > -1) {
          this.#emitter.off(type2, ...handlers2.splice(index2, 1));
        }
        return this;
      }
      emit(type2, event) {
        this.#emitter.emit(type2, event);
        return this.listenerCount(type2) > 0;
      }
      once(type2, handler) {
        const onceHandler = (eventData) => {
          handler(eventData);
          this.off(type2, onceHandler);
        };
        return this.on(type2, onceHandler);
      }
      listenerCount(type2) {
        return this.#handlers.get(type2)?.length || 0;
      }
      removeAllListeners(type2) {
        if (type2 !== void 0) {
          return this.off(type2);
        }
        this[disposeSymbol]();
        return this;
      }
      [disposeSymbol]() {
        for (const [type2, handlers2] of this.#handlers) {
          for (const handler of handlers2) {
            this.#emitter.off(type2, handler);
          }
        }
        this.#handlers.clear();
      }
    };
    isNode = !!(typeof process !== "undefined" && process.version);
    environment = {
      value: {
        get fs() {
          throw new Error("fs is not available in this environment");
        },
        get ScreenRecorder() {
          throw new Error("ScreenRecorder is not available in this environment");
        }
      }
    };
    assert = (value, message) => {
      if (!value) {
        throw new Error(message);
      }
    };
    packageVersion = "24.38.0";
    debugModule = null;
    debug$1 = (prefix) => {
      if (isNode) {
        return async (...logArgs) => {
          (await importDebug())(prefix)(logArgs);
        };
      }
      return (...logArgs) => {
        const debugLevel = globalThis.__PUPPETEER_DEBUG;
        if (!debugLevel) {
          return;
        }
        const everythingShouldBeLogged = debugLevel === "*";
        const prefixMatchesDebugLevel = everythingShouldBeLogged || (debugLevel.endsWith("*") ? prefix.startsWith(debugLevel) : prefix === debugLevel);
        if (!prefixMatchesDebugLevel) {
          return;
        }
        console.log(`${prefix}:`, ...logArgs);
      };
    };
    PuppeteerError = class extends Error {
      constructor(message, options2) {
        super(message, options2);
        this.name = this.constructor.name;
      }
      get [Symbol.toStringTag]() {
        return this.constructor.name;
      }
    };
    TimeoutError$1 = class TimeoutError extends PuppeteerError {
    };
    TouchError = class extends PuppeteerError {
    };
    ProtocolError = class extends PuppeteerError {
      #code;
      #originalMessage = "";
      set code(code2) {
        this.#code = code2;
      }
      get code() {
        return this.#code;
      }
      set originalMessage(originalMessage) {
        this.#originalMessage = originalMessage;
      }
      get originalMessage() {
        return this.#originalMessage;
      }
    };
    UnsupportedOperation = class extends PuppeteerError {
    };
    TargetCloseError = class extends ProtocolError {
    };
    ConnectionClosedError = class extends ProtocolError {
    };
    paperFormats = {
      letter: {
        cm: { width: 21.59, height: 27.94 },
        in: { width: 8.5, height: 11 }
      },
      legal: {
        cm: { width: 21.59, height: 35.56 },
        in: { width: 8.5, height: 14 }
      },
      tabloid: {
        cm: { width: 27.94, height: 43.18 },
        in: { width: 11, height: 17 }
      },
      ledger: {
        cm: { width: 43.18, height: 27.94 },
        in: { width: 17, height: 11 }
      },
      a0: {
        cm: { width: 84.1, height: 118.9 },
        in: { width: 33.1102, height: 46.811 }
      },
      a1: {
        cm: { width: 59.4, height: 84.1 },
        in: { width: 23.3858, height: 33.1102 }
      },
      a2: {
        cm: { width: 42, height: 59.4 },
        in: { width: 16.5354, height: 23.3858 }
      },
      a3: {
        cm: { width: 29.7, height: 42 },
        in: { width: 11.6929, height: 16.5354 }
      },
      a4: {
        cm: { width: 21, height: 29.7 },
        in: { width: 8.2677, height: 11.6929 }
      },
      a5: {
        cm: { width: 14.8, height: 21 },
        in: { width: 5.8268, height: 8.2677 }
      },
      a6: {
        cm: { width: 10.5, height: 14.8 },
        in: { width: 4.1339, height: 5.8268 }
      }
    };
    debugError = debug$1("puppeteer:error");
    DEFAULT_VIEWPORT = Object.freeze({ width: 800, height: 600 });
    SOURCE_URL = Symbol("Source URL for Puppeteer evaluation scripts");
    PuppeteerURL = class _PuppeteerURL {
      static INTERNAL_URL = "pptr:internal";
      static fromCallSite(functionName2, site) {
        const url = new _PuppeteerURL();
        url.#functionName = functionName2;
        url.#siteString = site.toString();
        return url;
      }
      static parse = (url) => {
        url = url.slice("pptr:".length);
        const [functionName2 = "", siteString = ""] = url.split(";");
        const puppeteerUrl = new _PuppeteerURL();
        puppeteerUrl.#functionName = functionName2;
        puppeteerUrl.#siteString = decodeURIComponent(siteString);
        return puppeteerUrl;
      };
      static isPuppeteerURL = (url) => {
        return url.startsWith("pptr:");
      };
      #functionName;
      #siteString;
      get functionName() {
        return this.#functionName;
      }
      get siteString() {
        return this.#siteString;
      }
      toString() {
        return `pptr:${[
          this.#functionName,
          encodeURIComponent(this.#siteString)
        ].join(";")}`;
      }
    };
    withSourcePuppeteerURLIfNone = (functionName2, object2) => {
      if (Object.prototype.hasOwnProperty.call(object2, SOURCE_URL)) {
        return object2;
      }
      const original = Error.prepareStackTrace;
      Error.prepareStackTrace = (_, stack) => {
        return stack[2];
      };
      const site = new Error().stack;
      Error.prepareStackTrace = original;
      return Object.assign(object2, {
        [SOURCE_URL]: PuppeteerURL.fromCallSite(functionName2, site)
      });
    };
    getSourcePuppeteerURLIfAvailable = (object2) => {
      if (Object.prototype.hasOwnProperty.call(object2, SOURCE_URL)) {
        return object2[SOURCE_URL];
      }
      return void 0;
    };
    isString = (obj) => {
      return typeof obj === "string" || obj instanceof String;
    };
    isNumber = (obj) => {
      return typeof obj === "number" || obj instanceof Number;
    };
    VALID_DIALOG_TYPES = /* @__PURE__ */ new Set([
      "alert",
      "confirm",
      "prompt",
      "beforeunload"
    ]);
    UTILITY_WORLD_NAME = "__puppeteer_utility_world__" + packageVersion;
    SOURCE_URL_REGEX = /^[\x20\t]*\/\/[@#] sourceURL=\s{0,10}(\S*?)\s{0,10}$/m;
    NETWORK_IDLE_TIME = 500;
    unitToPixels = {
      px: 1,
      in: 96,
      cm: 37.8,
      mm: 3.78
    };
    WEB_PERMISSION_TO_PROTOCOL_PERMISSION = /* @__PURE__ */ new Map([
      ["accelerometer", "sensors"],
      ["ambient-light-sensor", "sensors"],
      ["background-sync", "backgroundSync"],
      ["camera", "videoCapture"],
      ["clipboard-read", "clipboardReadWrite"],
      ["clipboard-sanitized-write", "clipboardSanitizedWrite"],
      ["clipboard-write", "clipboardReadWrite"],
      ["geolocation", "geolocation"],
      ["gyroscope", "sensors"],
      ["idle-detection", "idleDetection"],
      ["keyboard-lock", "keyboardLock"],
      ["magnetometer", "sensors"],
      ["microphone", "audioCapture"],
      ["midi", "midi"],
      ["notifications", "notifications"],
      ["payment-handler", "paymentHandler"],
      ["persistent-storage", "durableStorage"],
      ["pointer-lock", "pointerLock"],
      ["midi-sysex", "midiSysex"]
    ]);
    Browser$1 = class Browser extends EventEmitter6 {
      constructor() {
        super();
      }
      async waitForTarget(predicate, options2 = {}) {
        const { timeout: ms2 = 3e4, signal } = options2;
        return await firstValueFrom(merge(fromEmitterEvent(this, "targetcreated"), fromEmitterEvent(this, "targetchanged"), from(this.targets())).pipe(filterAsync(predicate), raceWith(fromAbortSignal(signal), timeout(ms2))));
      }
      async pages(includeAll = false) {
        const contextPages = await Promise.all(this.browserContexts().map((context2) => {
          return context2.pages(includeAll);
        }));
        return contextPages.reduce((acc, x) => {
          return acc.concat(x);
        }, []);
      }
      async cookies() {
        return await this.defaultBrowserContext().cookies();
      }
      async setCookie(...cookies) {
        return await this.defaultBrowserContext().setCookie(...cookies);
      }
      async deleteCookie(...cookies) {
        return await this.defaultBrowserContext().deleteCookie(...cookies);
      }
      async deleteMatchingCookies(...filters) {
        return await this.defaultBrowserContext().deleteMatchingCookies(...filters);
      }
      async setPermission(origin, ...permissions) {
        return await this.defaultBrowserContext().setPermission(origin, ...permissions);
      }
      isConnected() {
        return this.connected;
      }
      [disposeSymbol]() {
        if (this.process()) {
          return void this.close().catch(debugError);
        }
        return void this.disconnect().catch(debugError);
      }
      [asyncDisposeSymbol]() {
        if (this.process()) {
          return this.close();
        }
        return this.disconnect();
      }
    };
    Deferred = class _Deferred {
      static create(opts) {
        return new _Deferred(opts);
      }
      static async race(awaitables) {
        const deferredWithTimeout = /* @__PURE__ */ new Set();
        try {
          const promises2 = awaitables.map((value) => {
            if (value instanceof _Deferred) {
              if (value.#timeoutId) {
                deferredWithTimeout.add(value);
              }
              return value.valueOrThrow();
            }
            return value;
          });
          return await Promise.race(promises2);
        } finally {
          for (const deferred of deferredWithTimeout) {
            deferred.reject(new Error("Timeout cleared"));
          }
        }
      }
      #isResolved = false;
      #isRejected = false;
      #value;
      #resolve;
      #taskPromise = new Promise((resolve2) => {
        this.#resolve = resolve2;
      });
      #timeoutId;
      #timeoutError;
      constructor(opts) {
        if (opts && opts.timeout > 0) {
          this.#timeoutError = new TimeoutError$1(opts.message);
          this.#timeoutId = setTimeout(() => {
            this.reject(this.#timeoutError);
          }, opts.timeout);
        }
      }
      #finish(value) {
        clearTimeout(this.#timeoutId);
        this.#value = value;
        this.#resolve();
      }
      resolve(value) {
        if (this.#isRejected || this.#isResolved) {
          return;
        }
        this.#isResolved = true;
        this.#finish(value);
      }
      reject(error) {
        if (this.#isRejected || this.#isResolved) {
          return;
        }
        this.#isRejected = true;
        this.#finish(error);
      }
      resolved() {
        return this.#isResolved;
      }
      finished() {
        return this.#isResolved || this.#isRejected;
      }
      value() {
        return this.#value;
      }
      #promise;
      valueOrThrow() {
        if (!this.#promise) {
          this.#promise = (async () => {
            await this.#taskPromise;
            if (this.#isRejected) {
              throw this.#value;
            }
            return this.#value;
          })();
        }
        return this.#promise;
      }
    };
    Mutex$2 = class Mutex {
      static Guard = class Guard {
        #mutex;
        #onRelease;
        constructor(mutex, onRelease) {
          this.#mutex = mutex;
          this.#onRelease = onRelease;
        }
        [disposeSymbol]() {
          this.#onRelease?.();
          return this.#mutex.release();
        }
      };
      #locked = false;
      #acquirers = [];
      async acquire(onRelease) {
        if (!this.#locked) {
          this.#locked = true;
          return new Mutex.Guard(this);
        }
        const deferred = Deferred.create();
        this.#acquirers.push(deferred.resolve.bind(deferred));
        await deferred.valueOrThrow();
        return new Mutex.Guard(this, onRelease);
      }
      release() {
        const resolve2 = this.#acquirers.shift();
        if (!resolve2) {
          this.#locked = false;
          return;
        }
        resolve2();
      }
    };
    BrowserContext = class extends EventEmitter6 {
      constructor() {
        super();
      }
      #pageScreenshotMutex;
      #screenshotOperationsCount = 0;
      startScreenshot() {
        const mutex = this.#pageScreenshotMutex || new Mutex$2();
        this.#pageScreenshotMutex = mutex;
        this.#screenshotOperationsCount++;
        return mutex.acquire(() => {
          this.#screenshotOperationsCount--;
          if (this.#screenshotOperationsCount === 0) {
            this.#pageScreenshotMutex = void 0;
          }
        });
      }
      waitForScreenshotOperations() {
        return this.#pageScreenshotMutex?.acquire();
      }
      async waitForTarget(predicate, options2 = {}) {
        const { timeout: ms2 = 3e4 } = options2;
        return await firstValueFrom(merge(fromEmitterEvent(this, "targetcreated"), fromEmitterEvent(this, "targetchanged"), from(this.targets())).pipe(filterAsync(predicate), raceWith(timeout(ms2))));
      }
      async deleteCookie(...cookies) {
        return await this.setCookie(...cookies.map((cookie) => {
          return {
            ...cookie,
            expires: 1
          };
        }));
      }
      async deleteMatchingCookies(...filters) {
        const cookies = await this.cookies();
        const cookiesToDelete = cookies.filter((cookie) => {
          return filters.some((filter2) => {
            if (filter2.name === cookie.name) {
              if (filter2.domain !== void 0 && filter2.domain === cookie.domain) {
                return true;
              }
              if (filter2.path !== void 0 && filter2.path === cookie.path) {
                return true;
              }
              if (filter2.partitionKey !== void 0 && cookie.partitionKey !== void 0) {
                if (typeof cookie.partitionKey !== "object") {
                  throw new Error("Unexpected string partition key");
                }
                if (typeof filter2.partitionKey === "string") {
                  if (filter2.partitionKey === cookie.partitionKey?.sourceOrigin) {
                    return true;
                  }
                } else {
                  if (filter2.partitionKey.sourceOrigin === cookie.partitionKey?.sourceOrigin) {
                    return true;
                  }
                }
              }
              if (filter2.url !== void 0) {
                const url = new URL(filter2.url);
                if (url.hostname === cookie.domain && url.pathname === cookie.path) {
                  return true;
                }
              }
              return true;
            }
            return false;
          });
        });
        await this.deleteCookie(...cookiesToDelete);
      }
      get closed() {
        return !this.browser().browserContexts().includes(this);
      }
      get id() {
        return void 0;
      }
      [disposeSymbol]() {
        return void this.close().catch(debugError);
      }
      [asyncDisposeSymbol]() {
        return this.close();
      }
    };
    (function(CDPSessionEvent2) {
      CDPSessionEvent2.Disconnected = Symbol("CDPSession.Disconnected");
      CDPSessionEvent2.Swapped = Symbol("CDPSession.Swapped");
      CDPSessionEvent2.Ready = Symbol("CDPSession.Ready");
      CDPSessionEvent2.SessionAttached = "sessionattached";
      CDPSessionEvent2.SessionDetached = "sessiondetached";
    })(CDPSessionEvent || (CDPSessionEvent = {}));
    CDPSession = class extends EventEmitter6 {
      constructor() {
        super();
      }
      parentSession() {
        return void 0;
      }
    };
    DeviceRequestPrompt = class {
      devices = [];
    };
    Dialog = class {
      #type;
      #message;
      #defaultValue;
      handled = false;
      constructor(type2, message, defaultValue = "") {
        this.#type = type2;
        this.#message = message;
        this.#defaultValue = defaultValue;
      }
      type() {
        return this.#type;
      }
      message() {
        return this.#message;
      }
      defaultValue() {
        return this.#defaultValue;
      }
      async accept(promptText) {
        assert(!this.handled, "Cannot accept dialog which is already handled!");
        this.handled = true;
        await this.handle({
          accept: true,
          text: promptText
        });
      }
      async dismiss() {
        assert(!this.handled, "Cannot dismiss dialog which is already handled!");
        this.handled = true;
        await this.handle({
          accept: false
        });
      }
    };
    AsyncIterableUtil = class {
      static async *map(iterable, map2) {
        for await (const value of iterable) {
          yield await map2(value);
        }
      }
      static async *flatMap(iterable, map2) {
        for await (const value of iterable) {
          yield* map2(value);
        }
      }
      static async collect(iterable) {
        const result = [];
        for await (const value of iterable) {
          result.push(value);
        }
        return result;
      }
      static async first(iterable) {
        for await (const value of iterable) {
          return value;
        }
        return;
      }
    };
    _isElementHandle = Symbol("_isElementHandle");
    createdFunctions = /* @__PURE__ */ new Map();
    createFunction = (functionValue) => {
      let fn = createdFunctions.get(functionValue);
      if (fn) {
        return fn;
      }
      fn = new Function(`return ${functionValue}`)();
      createdFunctions.set(functionValue, fn);
      return fn;
    };
    interpolateFunction = (fn, replacements) => {
      let value = stringifyFunction(fn);
      for (const [name, jsValue] of Object.entries(replacements)) {
        value = value.replace(
          new RegExp(`PLACEHOLDER\\(\\s*(?:'${name}'|"${name}")\\s*\\)`, "g"),
          `(${jsValue})`
        );
      }
      return createFunction(value);
    };
    __addDisposableResource$d = function(env2, value, async2) {
      if (value !== null && value !== void 0) {
        if (typeof value !== "object" && typeof value !== "function") throw new TypeError("Object expected.");
        var dispose, inner;
        if (async2) {
          if (!Symbol.asyncDispose) throw new TypeError("Symbol.asyncDispose is not defined.");
          dispose = value[Symbol.asyncDispose];
        }
        if (dispose === void 0) {
          if (!Symbol.dispose) throw new TypeError("Symbol.dispose is not defined.");
          dispose = value[Symbol.dispose];
          if (async2) inner = dispose;
        }
        if (typeof dispose !== "function") throw new TypeError("Object not disposable.");
        if (inner) dispose = function() {
          try {
            inner.call(this);
          } catch (e) {
            return Promise.reject(e);
          }
        };
        env2.stack.push({ value, dispose, async: async2 });
      } else if (async2) {
        env2.stack.push({ async: true });
      }
      return value;
    };
    __disposeResources$d = /* @__PURE__ */ function(SuppressedError2) {
      return function(env2) {
        function fail(e) {
          env2.error = env2.hasError ? new SuppressedError2(e, env2.error, "An error was suppressed during disposal.") : e;
          env2.hasError = true;
        }
        var r, s = 0;
        function next() {
          while (r = env2.stack.pop()) {
            try {
              if (!r.async && s === 1) return s = 0, env2.stack.push(r), Promise.resolve().then(next);
              if (r.dispose) {
                var result = r.dispose.call(r.value);
                if (r.async) return s |= 2, Promise.resolve(result).then(next, function(e) {
                  fail(e);
                  return next();
                });
              } else s |= 1;
            } catch (e) {
              fail(e);
            }
          }
          if (s === 1) return env2.hasError ? Promise.reject(env2.error) : Promise.resolve();
          if (env2.hasError) throw env2.error;
        }
        return next();
      };
    }(typeof SuppressedError === "function" ? SuppressedError : function(error, suppressed, message) {
      var e = new Error(message);
      return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
    });
    DEFAULT_BATCH_SIZE = 20;
    LazyArg = class _LazyArg {
      static create = (get3) => {
        return new _LazyArg(get3);
      };
      #get;
      constructor(get3) {
        this.#get = get3;
      }
      async get(context2) {
        return await this.#get(context2);
      }
    };
    __addDisposableResource$c = function(env2, value, async2) {
      if (value !== null && value !== void 0) {
        if (typeof value !== "object" && typeof value !== "function") throw new TypeError("Object expected.");
        var dispose, inner;
        if (async2) {
          if (!Symbol.asyncDispose) throw new TypeError("Symbol.asyncDispose is not defined.");
          dispose = value[Symbol.asyncDispose];
        }
        if (dispose === void 0) {
          if (!Symbol.dispose) throw new TypeError("Symbol.dispose is not defined.");
          dispose = value[Symbol.dispose];
          if (async2) inner = dispose;
        }
        if (typeof dispose !== "function") throw new TypeError("Object not disposable.");
        if (inner) dispose = function() {
          try {
            inner.call(this);
          } catch (e) {
            return Promise.reject(e);
          }
        };
        env2.stack.push({ value, dispose, async: async2 });
      } else if (async2) {
        env2.stack.push({ async: true });
      }
      return value;
    };
    __disposeResources$c = /* @__PURE__ */ function(SuppressedError2) {
      return function(env2) {
        function fail(e) {
          env2.error = env2.hasError ? new SuppressedError2(e, env2.error, "An error was suppressed during disposal.") : e;
          env2.hasError = true;
        }
        var r, s = 0;
        function next() {
          while (r = env2.stack.pop()) {
            try {
              if (!r.async && s === 1) return s = 0, env2.stack.push(r), Promise.resolve().then(next);
              if (r.dispose) {
                var result = r.dispose.call(r.value);
                if (r.async) return s |= 2, Promise.resolve(result).then(next, function(e) {
                  fail(e);
                  return next();
                });
              } else s |= 1;
            } catch (e) {
              fail(e);
            }
          }
          if (s === 1) return env2.hasError ? Promise.reject(env2.error) : Promise.resolve();
          if (env2.hasError) throw env2.error;
        }
        return next();
      };
    }(typeof SuppressedError === "function" ? SuppressedError : function(error, suppressed, message) {
      var e = new Error(message);
      return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
    });
    QueryHandler = class {
      static querySelectorAll;
      static querySelector;
      static get _querySelector() {
        if (this.querySelector) {
          return this.querySelector;
        }
        if (!this.querySelectorAll) {
          throw new Error("Cannot create default `querySelector`.");
        }
        return this.querySelector = interpolateFunction(async (node2, selector, PuppeteerUtil) => {
          const querySelectorAll = PLACEHOLDER("querySelectorAll");
          const results = querySelectorAll(node2, selector, PuppeteerUtil);
          for await (const result of results) {
            return result;
          }
          return null;
        }, {
          querySelectorAll: stringifyFunction(this.querySelectorAll)
        });
      }
      static get _querySelectorAll() {
        if (this.querySelectorAll) {
          return this.querySelectorAll;
        }
        if (!this.querySelector) {
          throw new Error("Cannot create default `querySelectorAll`.");
        }
        return this.querySelectorAll = interpolateFunction(async function* (node2, selector, PuppeteerUtil) {
          const querySelector = PLACEHOLDER("querySelector");
          const result = await querySelector(node2, selector, PuppeteerUtil);
          if (result) {
            yield result;
          }
        }, {
          querySelector: stringifyFunction(this.querySelector)
        });
      }
      static async *queryAll(element, selector) {
        const env_1 = { stack: [], error: void 0, hasError: false };
        try {
          const handle = __addDisposableResource$c(env_1, await element.evaluateHandle(this._querySelectorAll, selector, LazyArg.create((context2) => {
            return context2.puppeteerUtil;
          })), false);
          yield* transposeIterableHandle(handle);
        } catch (e_1) {
          env_1.error = e_1;
          env_1.hasError = true;
        } finally {
          __disposeResources$c(env_1);
        }
      }
      static async queryOne(element, selector) {
        const env_2 = { stack: [], error: void 0, hasError: false };
        try {
          const result = __addDisposableResource$c(env_2, await element.evaluateHandle(this._querySelector, selector, LazyArg.create((context2) => {
            return context2.puppeteerUtil;
          })), false);
          if (!(_isElementHandle in result)) {
            return null;
          }
          return result.move();
        } catch (e_2) {
          env_2.error = e_2;
          env_2.hasError = true;
        } finally {
          __disposeResources$c(env_2);
        }
      }
      static async waitFor(elementOrFrame, selector, options2) {
        const env_3 = { stack: [], error: void 0, hasError: false };
        try {
          let frame;
          const element = __addDisposableResource$c(env_3, await (async () => {
            if (!(_isElementHandle in elementOrFrame)) {
              frame = elementOrFrame;
              return;
            }
            frame = elementOrFrame.frame;
            return await frame.isolatedRealm().adoptHandle(elementOrFrame);
          })(), false);
          const { visible = false, hidden = false, timeout: timeout2, signal } = options2;
          const polling = visible || hidden ? "raf" : options2.polling;
          try {
            const env_4 = { stack: [], error: void 0, hasError: false };
            try {
              signal?.throwIfAborted();
              const handle = __addDisposableResource$c(env_4, await frame.isolatedRealm().waitForFunction(async (PuppeteerUtil, query, selector2, root2, visible2) => {
                const querySelector = PuppeteerUtil.createFunction(query);
                const node2 = await querySelector(root2 ?? document, selector2, PuppeteerUtil);
                return PuppeteerUtil.checkVisibility(node2, visible2);
              }, {
                polling,
                root: element,
                timeout: timeout2,
                signal
              }, LazyArg.create((context2) => {
                return context2.puppeteerUtil;
              }), stringifyFunction(this._querySelector), selector, element, visible ? true : hidden ? false : void 0), false);
              if (signal?.aborted) {
                throw signal.reason;
              }
              if (!(_isElementHandle in handle)) {
                return null;
              }
              return await frame.mainRealm().transferHandle(handle);
            } catch (e_3) {
              env_4.error = e_3;
              env_4.hasError = true;
            } finally {
              __disposeResources$c(env_4);
            }
          } catch (error) {
            if (!isErrorLike$1(error)) {
              throw error;
            }
            if (error.name === "AbortError") {
              throw error;
            }
            const waitForSelectorError = new (error instanceof TimeoutError$1 ? TimeoutError$1 : Error)(`Waiting for selector \`${selector}\` failed`);
            waitForSelectorError.cause = error;
            throw waitForSelectorError;
          }
        } catch (e_4) {
          env_3.error = e_4;
          env_3.hasError = true;
        } finally {
          __disposeResources$c(env_3);
        }
      }
    };
    isKnownAttribute = (attribute) => {
      return ["name", "role"].includes(attribute);
    };
    ATTRIBUTE_REGEXP = /\[\s*(?<attribute>\w+)\s*=\s*(?<quote>"|')(?<value>\\.|.*?(?=\k<quote>))\k<quote>\s*\]/g;
    parseARIASelector = (selector) => {
      if (selector.length > 1e4) {
        throw new Error(`Selector ${selector} is too long`);
      }
      const queryOptions = {};
      const defaultName = selector.replace(ATTRIBUTE_REGEXP, (_, attribute, __, value) => {
        assert(isKnownAttribute(attribute), `Unknown aria attribute "${attribute}" in selector`);
        queryOptions[attribute] = value;
        return "";
      });
      if (defaultName && !queryOptions.name) {
        queryOptions.name = defaultName;
      }
      return queryOptions;
    };
    ARIAQueryHandler = class extends QueryHandler {
      static querySelector = async (node2, selector, { ariaQuerySelector }) => {
        return await ariaQuerySelector(node2, selector);
      };
      static async *queryAll(element, selector) {
        const { name, role } = parseARIASelector(selector);
        yield* element.queryAXTree(name, role);
      }
      static queryOne = async (element, selector) => {
        return await AsyncIterableUtil.first(this.queryAll(element, selector)) ?? null;
      };
    };
    CSSQueryHandler = class extends QueryHandler {
      static querySelector = (element, selector, { cssQuerySelector }) => {
        return cssQuerySelector(element, selector);
      };
      static querySelectorAll = (element, selector, { cssQuerySelectorAll }) => {
        return cssQuerySelectorAll(element, selector);
      };
    };
    source = '"use strict";var g=Object.defineProperty;var X=Object.getOwnPropertyDescriptor;var B=Object.getOwnPropertyNames;var Y=Object.prototype.hasOwnProperty;var l=(t,e)=>{for(var r in e)g(t,r,{get:e[r],enumerable:!0})},G=(t,e,r,o)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of B(e))!Y.call(t,s)&&s!==r&&g(t,s,{get:()=>e[s],enumerable:!(o=X(e,s))||o.enumerable});return t};var J=t=>G(g({},"__esModule",{value:!0}),t);var pe={};l(pe,{default:()=>he});module.exports=J(pe);var N=class extends Error{constructor(e,r){super(e,r),this.name=this.constructor.name}get[Symbol.toStringTag](){return this.constructor.name}},p=class extends N{};var c=class t{static create(e){return new t(e)}static async race(e){let r=new Set;try{let o=e.map(s=>s instanceof t?(s.#s&&r.add(s),s.valueOrThrow()):s);return await Promise.race(o)}finally{for(let o of r)o.reject(new Error("Timeout cleared"))}}#e=!1;#r=!1;#o;#t;#a=new Promise(e=>{this.#t=e});#s;#i;constructor(e){e&&e.timeout>0&&(this.#i=new p(e.message),this.#s=setTimeout(()=>{this.reject(this.#i)},e.timeout))}#l(e){clearTimeout(this.#s),this.#o=e,this.#t()}resolve(e){this.#r||this.#e||(this.#e=!0,this.#l(e))}reject(e){this.#r||this.#e||(this.#r=!0,this.#l(e))}resolved(){return this.#e}finished(){return this.#e||this.#r}value(){return this.#o}#n;valueOrThrow(){return this.#n||(this.#n=(async()=>{if(await this.#a,this.#r)throw this.#o;return this.#o})()),this.#n}};var L=new Map,W=t=>{let e=L.get(t);return e||(e=new Function(`return ${t}`)(),L.set(t,e),e)};var b={};l(b,{ariaQuerySelector:()=>z,ariaQuerySelectorAll:()=>x});var z=(t,e)=>globalThis.__ariaQuerySelector(t,e),x=async function*(t,e){yield*await globalThis.__ariaQuerySelectorAll(t,e)};var E={};l(E,{cssQuerySelector:()=>K,cssQuerySelectorAll:()=>Z});var K=(t,e)=>t.querySelector(e),Z=function(t,e){return t.querySelectorAll(e)};var A={};l(A,{customQuerySelectors:()=>P});var v=class{#e=new Map;register(e,r){if(!r.queryOne&&r.queryAll){let o=r.queryAll;r.queryOne=(s,i)=>{for(let n of o(s,i))return n;return null}}else if(r.queryOne&&!r.queryAll){let o=r.queryOne;r.queryAll=(s,i)=>{let n=o(s,i);return n?[n]:[]}}else if(!r.queryOne||!r.queryAll)throw new Error("At least one query method must be defined.");this.#e.set(e,{querySelector:r.queryOne,querySelectorAll:r.queryAll})}unregister(e){this.#e.delete(e)}get(e){return this.#e.get(e)}clear(){this.#e.clear()}},P=new v;var R={};l(R,{pierceQuerySelector:()=>ee,pierceQuerySelectorAll:()=>te});var ee=(t,e)=>{let r=null,o=s=>{let i=document.createTreeWalker(s,NodeFilter.SHOW_ELEMENT);do{let n=i.currentNode;n.shadowRoot&&o(n.shadowRoot),!(n instanceof ShadowRoot)&&n!==s&&!r&&n.matches(e)&&(r=n)}while(!r&&i.nextNode())};return t instanceof Document&&(t=t.documentElement),o(t),r},te=(t,e)=>{let r=[],o=s=>{let i=document.createTreeWalker(s,NodeFilter.SHOW_ELEMENT);do{let n=i.currentNode;n.shadowRoot&&o(n.shadowRoot),!(n instanceof ShadowRoot)&&n!==s&&n.matches(e)&&r.push(n)}while(i.nextNode())};return t instanceof Document&&(t=t.documentElement),o(t),r};var u=(t,e)=>{if(!t)throw new Error(e)};var y=class{#e;#r;#o;#t;constructor(e,r){this.#e=e,this.#r=r}async start(){let e=this.#t=c.create(),r=await this.#e();if(r){e.resolve(r);return}this.#o=new MutationObserver(async()=>{let o=await this.#e();o&&(e.resolve(o),await this.stop())}),this.#o.observe(this.#r,{childList:!0,subtree:!0,attributes:!0})}async stop(){u(this.#t,"Polling never started."),this.#t.finished()||this.#t.reject(new Error("Polling stopped")),this.#o&&(this.#o.disconnect(),this.#o=void 0)}result(){return u(this.#t,"Polling never started."),this.#t.valueOrThrow()}},w=class{#e;#r;constructor(e){this.#e=e}async start(){let e=this.#r=c.create(),r=await this.#e();if(r){e.resolve(r);return}let o=async()=>{if(e.finished())return;let s=await this.#e();if(!s){window.requestAnimationFrame(o);return}e.resolve(s),await this.stop()};window.requestAnimationFrame(o)}async stop(){u(this.#r,"Polling never started."),this.#r.finished()||this.#r.reject(new Error("Polling stopped"))}result(){return u(this.#r,"Polling never started."),this.#r.valueOrThrow()}},T=class{#e;#r;#o;#t;constructor(e,r){this.#e=e,this.#r=r}async start(){let e=this.#t=c.create(),r=await this.#e();if(r){e.resolve(r);return}this.#o=setInterval(async()=>{let o=await this.#e();o&&(e.resolve(o),await this.stop())},this.#r)}async stop(){u(this.#t,"Polling never started."),this.#t.finished()||this.#t.reject(new Error("Polling stopped")),this.#o&&(clearInterval(this.#o),this.#o=void 0)}result(){return u(this.#t,"Polling never started."),this.#t.valueOrThrow()}};var _={};l(_,{PCombinator:()=>H,pQuerySelector:()=>fe,pQuerySelectorAll:()=>$});var a=class{static async*map(e,r){for await(let o of e)yield await r(o)}static async*flatMap(e,r){for await(let o of e)yield*r(o)}static async collect(e){let r=[];for await(let o of e)r.push(o);return r}static async first(e){for await(let r of e)return r}};var C={};l(C,{textQuerySelectorAll:()=>m});var re=new Set(["checkbox","image","radio"]),oe=t=>t instanceof HTMLSelectElement||t instanceof HTMLTextAreaElement||t instanceof HTMLInputElement&&!re.has(t.type),se=new Set(["SCRIPT","STYLE"]),f=t=>!se.has(t.nodeName)&&!document.head?.contains(t),I=new WeakMap,F=t=>{for(;t;)I.delete(t),t instanceof ShadowRoot?t=t.host:t=t.parentNode},j=new WeakSet,ne=new MutationObserver(t=>{for(let e of t)F(e.target)}),d=t=>{let e=I.get(t);if(e||(e={full:"",immediate:[]},!f(t)))return e;let r="";if(oe(t))e.full=t.value,e.immediate.push(t.value),t.addEventListener("input",o=>{F(o.target)},{once:!0,capture:!0});else{for(let o=t.firstChild;o;o=o.nextSibling){if(o.nodeType===Node.TEXT_NODE){e.full+=o.nodeValue??"",r+=o.nodeValue??"";continue}r&&e.immediate.push(r),r="",o.nodeType===Node.ELEMENT_NODE&&(e.full+=d(o).full)}r&&e.immediate.push(r),t instanceof Element&&t.shadowRoot&&(e.full+=d(t.shadowRoot).full),j.has(t)||(ne.observe(t,{childList:!0,characterData:!0,subtree:!0}),j.add(t))}return I.set(t,e),e};var m=function*(t,e){let r=!1;for(let o of t.childNodes)if(o instanceof Element&&f(o)){let s;o.shadowRoot?s=m(o.shadowRoot,e):s=m(o,e);for(let i of s)yield i,r=!0}r||t instanceof Element&&f(t)&&d(t).full.includes(e)&&(yield t)};var k={};l(k,{checkVisibility:()=>le,pierce:()=>S,pierceAll:()=>O});var ie=["hidden","collapse"],le=(t,e)=>{if(!t)return e===!1;if(e===void 0)return t;let r=t.nodeType===Node.TEXT_NODE?t.parentElement:t,o=window.getComputedStyle(r),s=o&&!ie.includes(o.visibility)&&!ae(r);return e===s?t:!1};function ae(t){let e=t.getBoundingClientRect();return e.width===0||e.height===0}var ce=t=>"shadowRoot"in t&&t.shadowRoot instanceof ShadowRoot;function*S(t){ce(t)?yield t.shadowRoot:yield t}function*O(t){t=S(t).next().value,yield t;let e=[document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT)];for(let r of e){let o;for(;o=r.nextNode();)o.shadowRoot&&(yield o.shadowRoot,e.push(document.createTreeWalker(o.shadowRoot,NodeFilter.SHOW_ELEMENT)))}}var D={};l(D,{xpathQuerySelectorAll:()=>q});var q=function*(t,e,r=-1){let s=(t.ownerDocument||document).evaluate(e,t,null,XPathResult.ORDERED_NODE_ITERATOR_TYPE),i=[],n;for(;(n=s.iterateNext())&&(i.push(n),!(r&&i.length===r)););for(let h=0;h<i.length;h++)n=i[h],yield n,i[h]=null};var ue=/[-\\w\\P{ASCII}*]/u,H=(r=>(r.Descendent=">>>",r.Child=">>>>",r))(H||{}),V=t=>"querySelectorAll"in t,Q=class{#e;#r=[];#o=void 0;elements;constructor(e,r){this.elements=[e],this.#e=r,this.#t()}async run(){for(typeof this.#o=="string"&&this.#o.trimStart()===":scope"&&this.#t();this.#o!==void 0;this.#t()){let e=this.#o;typeof e=="string"?e[0]&&ue.test(e[0])?this.elements=a.flatMap(this.elements,async function*(r){V(r)&&(yield*r.querySelectorAll(e))}):this.elements=a.flatMap(this.elements,async function*(r){if(!r.parentElement){if(!V(r))return;yield*r.querySelectorAll(e);return}let o=0;for(let s of r.parentElement.children)if(++o,s===r)break;yield*r.parentElement.querySelectorAll(`:scope>:nth-child(${o})${e}`)}):this.elements=a.flatMap(this.elements,async function*(r){switch(e.name){case"text":yield*m(r,e.value);break;case"xpath":yield*q(r,e.value);break;case"aria":yield*x(r,e.value);break;default:let o=P.get(e.name);if(!o)throw new Error(`Unknown selector type: ${e.name}`);yield*o.querySelectorAll(r,e.value)}})}}#t(){if(this.#r.length!==0){this.#o=this.#r.shift();return}if(this.#e.length===0){this.#o=void 0;return}let e=this.#e.shift();switch(e){case">>>>":{this.elements=a.flatMap(this.elements,S),this.#t();break}case">>>":{this.elements=a.flatMap(this.elements,O),this.#t();break}default:this.#r=e,this.#t();break}}},M=class{#e=new WeakMap;calculate(e,r=[]){if(e===null)return r;e instanceof ShadowRoot&&(e=e.host);let o=this.#e.get(e);if(o)return[...o,...r];let s=0;for(let n=e.previousSibling;n;n=n.previousSibling)++s;let i=this.calculate(e.parentNode,[s]);return this.#e.set(e,i),[...i,...r]}},U=(t,e)=>{if(t.length+e.length===0)return 0;let[r=-1,...o]=t,[s=-1,...i]=e;return r===s?U(o,i):r<s?-1:1},de=async function*(t){let e=new Set;for await(let o of t)e.add(o);let r=new M;yield*[...e.values()].map(o=>[o,r.calculate(o)]).sort(([,o],[,s])=>U(o,s)).map(([o])=>o)},$=function(t,e){let r=JSON.parse(e);if(r.some(o=>{let s=0;return o.some(i=>(typeof i=="string"?++s:s=0,s>1))}))throw new Error("Multiple deep combinators found in sequence.");return de(a.flatMap(r,o=>{let s=new Q(t,o);return s.run(),s.elements}))},fe=async function(t,e){for await(let r of $(t,e))return r;return null};var me=Object.freeze({...b,...A,...R,..._,...C,...k,...D,...E,Deferred:c,createFunction:W,createTextContent:d,IntervalPoller:T,isSuitableNodeForTextMatching:f,MutationPoller:y,RAFPoller:w}),he=me;\n';
    ScriptInjector = class {
      #updated = false;
      #amendments = /* @__PURE__ */ new Set();
      append(statement) {
        this.#update(() => {
          this.#amendments.add(statement);
        });
      }
      pop(statement) {
        this.#update(() => {
          this.#amendments.delete(statement);
        });
      }
      inject(inject, force = false) {
        if (this.#updated || force) {
          inject(this.#get());
        }
        this.#updated = false;
      }
      #update(callback) {
        callback();
        this.#updated = true;
      }
      #get() {
        return `(() => {
      const module = {};
      ${source}
      ${[...this.#amendments].map((statement) => {
          return `(${statement})(module.exports.default);`;
        }).join("")}
      return module.exports.default;
    })()`;
      }
    };
    scriptInjector = new ScriptInjector();
    CustomQueryHandlerRegistry = class {
      #handlers = /* @__PURE__ */ new Map();
      get(name) {
        const handler = this.#handlers.get(name);
        return handler ? handler[1] : void 0;
      }
      register(name, handler) {
        assert(!this.#handlers.has(name), `Cannot register over existing handler: ${name}`);
        assert(/^[a-zA-Z]+$/.test(name), `Custom query handler names may only contain [a-zA-Z]`);
        assert(handler.queryAll || handler.queryOne, `At least one query method must be implemented.`);
        const Handler = class extends QueryHandler {
          static querySelectorAll = interpolateFunction((node2, selector, PuppeteerUtil) => {
            return PuppeteerUtil.customQuerySelectors.get(PLACEHOLDER("name")).querySelectorAll(node2, selector);
          }, { name: JSON.stringify(name) });
          static querySelector = interpolateFunction((node2, selector, PuppeteerUtil) => {
            return PuppeteerUtil.customQuerySelectors.get(PLACEHOLDER("name")).querySelector(node2, selector);
          }, { name: JSON.stringify(name) });
        };
        const registerScript = interpolateFunction((PuppeteerUtil) => {
          PuppeteerUtil.customQuerySelectors.register(PLACEHOLDER("name"), {
            queryAll: PLACEHOLDER("queryAll"),
            queryOne: PLACEHOLDER("queryOne")
          });
        }, {
          name: JSON.stringify(name),
          queryAll: handler.queryAll ? stringifyFunction(handler.queryAll) : String(void 0),
          queryOne: handler.queryOne ? stringifyFunction(handler.queryOne) : String(void 0)
        }).toString();
        this.#handlers.set(name, [registerScript, Handler]);
        scriptInjector.append(registerScript);
      }
      unregister(name) {
        const handler = this.#handlers.get(name);
        if (!handler) {
          throw new Error(`Cannot unregister unknown handler: ${name}`);
        }
        scriptInjector.pop(handler[0]);
        this.#handlers.delete(name);
      }
      names() {
        return [...this.#handlers.keys()];
      }
      clear() {
        for (const [registerScript] of this.#handlers) {
          scriptInjector.pop(registerScript);
        }
        this.#handlers.clear();
      }
    };
    customQueryHandlers = new CustomQueryHandlerRegistry();
    PierceQueryHandler = class extends QueryHandler {
      static querySelector = (element, selector, { pierceQuerySelector }) => {
        return pierceQuerySelector(element, selector);
      };
      static querySelectorAll = (element, selector, { pierceQuerySelectorAll }) => {
        return pierceQuerySelectorAll(element, selector);
      };
    };
    PQueryHandler = class extends QueryHandler {
      static querySelectorAll = (element, selector, { pQuerySelectorAll }) => {
        return pQuerySelectorAll(element, selector);
      };
      static querySelector = (element, selector, { pQuerySelector }) => {
        return pQuerySelector(element, selector);
      };
    };
    TOKENS = {
      attribute: /\[\s*(?:(?<namespace>\*|[-\w\P{ASCII}]*)\|)?(?<name>[-\w\P{ASCII}]+)\s*(?:(?<operator>\W?=)\s*(?<value>.+?)\s*(\s(?<caseSensitive>[iIsS]))?\s*)?\]/gu,
      id: /#(?<name>[-\w\P{ASCII}]+)/gu,
      class: /\.(?<name>[-\w\P{ASCII}]+)/gu,
      comma: /\s*,\s*/g,
      combinator: /\s*[\s>+~]\s*/g,
      "pseudo-element": /::(?<name>[-\w\P{ASCII}]+)(?:\((?<argument>¶*)\))?/gu,
      "pseudo-class": /:(?<name>[-\w\P{ASCII}]+)(?:\((?<argument>¶*)\))?/gu,
      universal: /(?:(?<namespace>\*|[-\w\P{ASCII}]*)\|)?\*/gu,
      type: /(?:(?<namespace>\*|[-\w\P{ASCII}]*)\|)?(?<name>[-\w\P{ASCII}]+)/gu
    };
    TRIM_TOKENS = /* @__PURE__ */ new Set(["combinator", "comma"]);
    getArgumentPatternByType = (type2) => {
      switch (type2) {
        case "pseudo-element":
        case "pseudo-class":
          return new RegExp(TOKENS[type2].source.replace("(?<argument>\xB6*)", "(?<argument>.*)"), "gu");
        default:
          return TOKENS[type2];
      }
    };
    STRING_PATTERN = /(['"])([^\\\n]*?)\1/g;
    ESCAPE_PATTERN = /\\./g;
    TOKENS["nesting"] = /&/g;
    TOKENS["combinator"] = /\s*(>>>>?|[\s>+~])\s*/g;
    ESCAPE_REGEXP = /\\[\s\S]/g;
    unquote = (text) => {
      if (text.length <= 1) {
        return text;
      }
      if ((text[0] === '"' || text[0] === "'") && text.endsWith(text[0])) {
        text = text.slice(1, -1);
      }
      return text.replace(ESCAPE_REGEXP, (match) => {
        return match[1];
      });
    };
    TextQueryHandler = class extends QueryHandler {
      static querySelectorAll = (element, selector, { textQuerySelectorAll }) => {
        return textQuerySelectorAll(element, selector);
      };
    };
    XPathQueryHandler = class extends QueryHandler {
      static querySelectorAll = (element, selector, { xpathQuerySelectorAll }) => {
        return xpathQuerySelectorAll(element, selector);
      };
      static querySelector = (element, selector, { xpathQuerySelectorAll }) => {
        for (const result of xpathQuerySelectorAll(element, selector, 1)) {
          return result;
        }
        return null;
      };
    };
    BUILTIN_QUERY_HANDLERS = {
      aria: ARIAQueryHandler,
      pierce: PierceQueryHandler,
      xpath: XPathQueryHandler,
      text: TextQueryHandler
    };
    QUERY_SEPARATORS = ["=", "/"];
    __addDisposableResource$b = function(env2, value, async2) {
      if (value !== null && value !== void 0) {
        if (typeof value !== "object" && typeof value !== "function") throw new TypeError("Object expected.");
        var dispose, inner;
        if (async2) {
          if (!Symbol.asyncDispose) throw new TypeError("Symbol.asyncDispose is not defined.");
          dispose = value[Symbol.asyncDispose];
        }
        if (dispose === void 0) {
          if (!Symbol.dispose) throw new TypeError("Symbol.dispose is not defined.");
          dispose = value[Symbol.dispose];
          if (async2) inner = dispose;
        }
        if (typeof dispose !== "function") throw new TypeError("Object not disposable.");
        if (inner) dispose = function() {
          try {
            inner.call(this);
          } catch (e) {
            return Promise.reject(e);
          }
        };
        env2.stack.push({ value, dispose, async: async2 });
      } else if (async2) {
        env2.stack.push({ async: true });
      }
      return value;
    };
    __disposeResources$b = /* @__PURE__ */ function(SuppressedError2) {
      return function(env2) {
        function fail(e) {
          env2.error = env2.hasError ? new SuppressedError2(e, env2.error, "An error was suppressed during disposal.") : e;
          env2.hasError = true;
        }
        var r, s = 0;
        function next() {
          while (r = env2.stack.pop()) {
            try {
              if (!r.async && s === 1) return s = 0, env2.stack.push(r), Promise.resolve().then(next);
              if (r.dispose) {
                var result = r.dispose.call(r.value);
                if (r.async) return s |= 2, Promise.resolve(result).then(next, function(e) {
                  fail(e);
                  return next();
                });
              } else s |= 1;
            } catch (e) {
              fail(e);
            }
          }
          if (s === 1) return env2.hasError ? Promise.reject(env2.error) : Promise.resolve();
          if (env2.hasError) throw env2.error;
        }
        return next();
      };
    }(typeof SuppressedError === "function" ? SuppressedError : function(error, suppressed, message) {
      var e = new Error(message);
      return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
    });
    instances = /* @__PURE__ */ new WeakSet();
    __runInitializers$8 = function(thisArg, initializers, value) {
      var useValue = arguments.length > 2;
      for (var i = 0; i < initializers.length; i++) {
        value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);
      }
      return useValue ? value : void 0;
    };
    __esDecorate$8 = function(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {
      function accept(f) {
        if (f !== void 0 && typeof f !== "function") throw new TypeError("Function expected");
        return f;
      }
      var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value";
      var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null;
      var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});
      var _, done = false;
      for (var i = decorators.length - 1; i >= 0; i--) {
        var context2 = {};
        for (var p in contextIn) context2[p] = p === "access" ? {} : contextIn[p];
        for (var p in contextIn.access) context2.access[p] = contextIn.access[p];
        context2.addInitializer = function(f) {
          if (done) throw new TypeError("Cannot add initializers after decoration has completed");
          extraInitializers.push(accept(f || null));
        };
        var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context2);
        if (kind === "accessor") {
          if (result === void 0) continue;
          if (result === null || typeof result !== "object") throw new TypeError("Object expected");
          if (_ = accept(result.get)) descriptor.get = _;
          if (_ = accept(result.set)) descriptor.set = _;
          if (_ = accept(result.init)) initializers.unshift(_);
        } else if (_ = accept(result)) {
          if (kind === "field") initializers.unshift(_);
          else descriptor[key] = _;
        }
      }
      if (target) Object.defineProperty(target, contextIn.name, descriptor);
      done = true;
    };
    __addDisposableResource$a = function(env2, value, async2) {
      if (value !== null && value !== void 0) {
        if (typeof value !== "object" && typeof value !== "function") throw new TypeError("Object expected.");
        var dispose, inner;
        if (async2) {
          if (!Symbol.asyncDispose) throw new TypeError("Symbol.asyncDispose is not defined.");
          dispose = value[Symbol.asyncDispose];
        }
        if (dispose === void 0) {
          if (!Symbol.dispose) throw new TypeError("Symbol.dispose is not defined.");
          dispose = value[Symbol.dispose];
          if (async2) inner = dispose;
        }
        if (typeof dispose !== "function") throw new TypeError("Object not disposable.");
        if (inner) dispose = function() {
          try {
            inner.call(this);
          } catch (e) {
            return Promise.reject(e);
          }
        };
        env2.stack.push({ value, dispose, async: async2 });
      } else if (async2) {
        env2.stack.push({ async: true });
      }
      return value;
    };
    __disposeResources$a = /* @__PURE__ */ function(SuppressedError2) {
      return function(env2) {
        function fail(e) {
          env2.error = env2.hasError ? new SuppressedError2(e, env2.error, "An error was suppressed during disposal.") : e;
          env2.hasError = true;
        }
        var r, s = 0;
        function next() {
          while (r = env2.stack.pop()) {
            try {
              if (!r.async && s === 1) return s = 0, env2.stack.push(r), Promise.resolve().then(next);
              if (r.dispose) {
                var result = r.dispose.call(r.value);
                if (r.async) return s |= 2, Promise.resolve(result).then(next, function(e) {
                  fail(e);
                  return next();
                });
              } else s |= 1;
            } catch (e) {
              fail(e);
            }
          }
          if (s === 1) return env2.hasError ? Promise.reject(env2.error) : Promise.resolve();
          if (env2.hasError) throw env2.error;
        }
        return next();
      };
    }(typeof SuppressedError === "function" ? SuppressedError : function(error, suppressed, message) {
      var e = new Error(message);
      return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
    });
    JSHandle = (() => {
      let _classDecorators = [moveable];
      let _classDescriptor;
      let _classExtraInitializers = [];
      let _classThis;
      let _instanceExtraInitializers = [];
      let _getProperty_decorators;
      let _getProperties_decorators;
      (class {
        static {
          _classThis = this;
        }
        static {
          const _metadata = typeof Symbol === "function" && Symbol.metadata ? /* @__PURE__ */ Object.create(null) : void 0;
          __esDecorate$8(this, null, _getProperty_decorators, { kind: "method", name: "getProperty", static: false, private: false, access: { has: (obj) => "getProperty" in obj, get: (obj) => obj.getProperty }, metadata: _metadata }, null, _instanceExtraInitializers);
          __esDecorate$8(this, null, _getProperties_decorators, { kind: "method", name: "getProperties", static: false, private: false, access: { has: (obj) => "getProperties" in obj, get: (obj) => obj.getProperties }, metadata: _metadata }, null, _instanceExtraInitializers);
          __esDecorate$8(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
          _classThis = _classDescriptor.value;
          if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
          __runInitializers$8(_classThis, _classExtraInitializers);
        }
        constructor() {
          __runInitializers$8(this, _instanceExtraInitializers);
        }
        async evaluate(pageFunction, ...args2) {
          pageFunction = withSourcePuppeteerURLIfNone(this.evaluate.name, pageFunction);
          return await this.realm.evaluate(pageFunction, this, ...args2);
        }
        async evaluateHandle(pageFunction, ...args2) {
          pageFunction = withSourcePuppeteerURLIfNone(this.evaluateHandle.name, pageFunction);
          return await this.realm.evaluateHandle(pageFunction, this, ...args2);
        }
        async getProperty(propertyName) {
          return await this.evaluateHandle((object2, propertyName2) => {
            return object2[propertyName2];
          }, propertyName);
        }
        async getProperties() {
          const propertyNames2 = await this.evaluate((object2) => {
            const enumerableProperties = [];
            const descriptors2 = Object.getOwnPropertyDescriptors(object2);
            for (const propertyName in descriptors2) {
              if (descriptors2[propertyName]?.enumerable) {
                enumerableProperties.push(propertyName);
              }
            }
            return enumerableProperties;
          });
          const map2 = /* @__PURE__ */ new Map();
          const results = await Promise.all(propertyNames2.map((key) => {
            return this.getProperty(key);
          }));
          for (const [key, value] of Object.entries(propertyNames2)) {
            const env_1 = { stack: [], error: void 0, hasError: false };
            try {
              const handle = __addDisposableResource$a(env_1, results[key], false);
              if (handle) {
                map2.set(value, handle.move());
              }
            } catch (e_1) {
              env_1.error = e_1;
              env_1.hasError = true;
            } finally {
              __disposeResources$a(env_1);
            }
          }
          return map2;
        }
        [(_getProperty_decorators = [throwIfDisposed()], _getProperties_decorators = [throwIfDisposed()], disposeSymbol)]() {
          return void this.dispose().catch(debugError);
        }
        [asyncDisposeSymbol]() {
          return this.dispose();
        }
      });
      return _classThis;
    })();
    __addDisposableResource$9 = function(env2, value, async2) {
      if (value !== null && value !== void 0) {
        if (typeof value !== "object" && typeof value !== "function") throw new TypeError("Object expected.");
        var dispose, inner;
        if (async2) {
          if (!Symbol.asyncDispose) throw new TypeError("Symbol.asyncDispose is not defined.");
          dispose = value[Symbol.asyncDispose];
        }
        if (dispose === void 0) {
          if (!Symbol.dispose) throw new TypeError("Symbol.dispose is not defined.");
          dispose = value[Symbol.dispose];
          if (async2) inner = dispose;
        }
        if (typeof dispose !== "function") throw new TypeError("Object not disposable.");
        if (inner) dispose = function() {
          try {
            inner.call(this);
          } catch (e) {
            return Promise.reject(e);
          }
        };
        env2.stack.push({ value, dispose, async: async2 });
      } else if (async2) {
        env2.stack.push({ async: true });
      }
      return value;
    };
    __disposeResources$9 = /* @__PURE__ */ function(SuppressedError2) {
      return function(env2) {
        function fail(e) {
          env2.error = env2.hasError ? new SuppressedError2(e, env2.error, "An error was suppressed during disposal.") : e;
          env2.hasError = true;
        }
        var r, s = 0;
        function next() {
          while (r = env2.stack.pop()) {
            try {
              if (!r.async && s === 1) return s = 0, env2.stack.push(r), Promise.resolve().then(next);
              if (r.dispose) {
                var result = r.dispose.call(r.value);
                if (r.async) return s |= 2, Promise.resolve(result).then(next, function(e) {
                  fail(e);
                  return next();
                });
              } else s |= 1;
            } catch (e) {
              fail(e);
            }
          }
          if (s === 1) return env2.hasError ? Promise.reject(env2.error) : Promise.resolve();
          if (env2.hasError) throw env2.error;
        }
        return next();
      };
    }(typeof SuppressedError === "function" ? SuppressedError : function(error, suppressed, message) {
      var e = new Error(message);
      return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
    });
    (function(LocatorEvent2) {
      LocatorEvent2["Action"] = "action";
    })(LocatorEvent || (LocatorEvent = {}));
    Locator = class extends EventEmitter6 {
      static race(locators) {
        return RaceLocator.create(locators);
      }
      visibility = null;
      _timeout = 3e4;
      #ensureElementIsInTheViewport = true;
      #waitForEnabled = true;
      #waitForStableBoundingBox = true;
      operators = {
        conditions: (conditions, signal) => {
          return mergeMap((handle) => {
            return merge(...conditions.map((condition) => {
              return condition(handle, signal);
            })).pipe(defaultIfEmpty(handle));
          });
        },
        retryAndRaceWithSignalAndTimer: (signal, cause) => {
          const candidates = [];
          if (signal) {
            candidates.push(fromAbortSignal(signal, cause));
          }
          candidates.push(timeout(this._timeout, cause));
          return pipe(retry({ delay: RETRY_DELAY }), raceWith(...candidates));
        }
      };
      get timeout() {
        return this._timeout;
      }
      setTimeout(timeout2) {
        const locator = this._clone();
        locator._timeout = timeout2;
        return locator;
      }
      setVisibility(visibility) {
        const locator = this._clone();
        locator.visibility = visibility;
        return locator;
      }
      setWaitForEnabled(value) {
        const locator = this._clone();
        locator.#waitForEnabled = value;
        return locator;
      }
      setEnsureElementIsInTheViewport(value) {
        const locator = this._clone();
        locator.#ensureElementIsInTheViewport = value;
        return locator;
      }
      setWaitForStableBoundingBox(value) {
        const locator = this._clone();
        locator.#waitForStableBoundingBox = value;
        return locator;
      }
      copyOptions(locator) {
        this._timeout = locator._timeout;
        this.visibility = locator.visibility;
        this.#waitForEnabled = locator.#waitForEnabled;
        this.#ensureElementIsInTheViewport = locator.#ensureElementIsInTheViewport;
        this.#waitForStableBoundingBox = locator.#waitForStableBoundingBox;
        return this;
      }
      #waitForEnabledIfNeeded = (handle, signal) => {
        if (!this.#waitForEnabled) {
          return EMPTY;
        }
        return from(handle.frame.waitForFunction((element) => {
          if (!(element instanceof HTMLElement)) {
            return true;
          }
          const isNativeFormControl = [
            "BUTTON",
            "INPUT",
            "SELECT",
            "TEXTAREA",
            "OPTION",
            "OPTGROUP"
          ].includes(element.nodeName);
          return !isNativeFormControl || !element.hasAttribute("disabled");
        }, {
          timeout: this._timeout,
          signal
        }, handle)).pipe(ignoreElements());
      };
      #waitForStableBoundingBoxIfNeeded = (handle) => {
        if (!this.#waitForStableBoundingBox) {
          return EMPTY;
        }
        return defer(() => {
          return from(handle.evaluate((element) => {
            return new Promise((resolve2) => {
              window.requestAnimationFrame(() => {
                const rect1 = element.getBoundingClientRect();
                window.requestAnimationFrame(() => {
                  const rect2 = element.getBoundingClientRect();
                  resolve2([
                    {
                      x: rect1.x,
                      y: rect1.y,
                      width: rect1.width,
                      height: rect1.height
                    },
                    {
                      x: rect2.x,
                      y: rect2.y,
                      width: rect2.width,
                      height: rect2.height
                    }
                  ]);
                });
              });
            });
          }));
        }).pipe(first(([rect1, rect2]) => {
          return rect1.x === rect2.x && rect1.y === rect2.y && rect1.width === rect2.width && rect1.height === rect2.height;
        }), retry({ delay: RETRY_DELAY }), ignoreElements());
      };
      #ensureElementIsInTheViewportIfNeeded = (handle) => {
        if (!this.#ensureElementIsInTheViewport) {
          return EMPTY;
        }
        return from(handle.isIntersectingViewport({ threshold: 0 })).pipe(filter((isIntersectingViewport) => {
          return !isIntersectingViewport;
        }), mergeMap(() => {
          return from(handle.scrollIntoView());
        }), mergeMap(() => {
          return defer(() => {
            return from(handle.isIntersectingViewport({ threshold: 0 }));
          }).pipe(first(identity), retry({ delay: RETRY_DELAY }), ignoreElements());
        }));
      };
      #click(options2) {
        const signal = options2?.signal;
        const cause = new Error("Locator.click");
        return this._wait(options2).pipe(this.operators.conditions([
          this.#ensureElementIsInTheViewportIfNeeded,
          this.#waitForStableBoundingBoxIfNeeded,
          this.#waitForEnabledIfNeeded
        ], signal), tap(() => {
          return this.emit(LocatorEvent.Action, void 0);
        }), mergeMap((handle) => {
          return from(handle.click(options2)).pipe(catchError((err) => {
            void handle.dispose().catch(debugError);
            throw err;
          }));
        }), this.operators.retryAndRaceWithSignalAndTimer(signal, cause));
      }
      #fill(value, options2) {
        const signal = options2?.signal;
        const typingThreshold = options2?.typingThreshold ?? 100;
        const cause = new Error("Locator.fill");
        return this._wait(options2).pipe(this.operators.conditions([
          this.#ensureElementIsInTheViewportIfNeeded,
          this.#waitForStableBoundingBoxIfNeeded,
          this.#waitForEnabledIfNeeded
        ], signal), tap(() => {
          return this.emit(LocatorEvent.Action, void 0);
        }), mergeMap((handle) => {
          return from(handle.evaluate((el) => {
            if (el instanceof HTMLSelectElement) {
              return "select";
            }
            if (el instanceof HTMLTextAreaElement) {
              return "typeable-input";
            }
            if (el instanceof HTMLInputElement) {
              if ((/* @__PURE__ */ new Set([
                "textarea",
                "text",
                "url",
                "tel",
                "search",
                "password",
                "number",
                "email"
              ])).has(el.type)) {
                return "typeable-input";
              } else {
                return "other-input";
              }
            }
            if (el.isContentEditable) {
              return "contenteditable";
            }
            return "unknown";
          })).pipe(mergeMap((inputType) => {
            const fillDirectly = () => {
              return from(handle.focus()).pipe(mergeMap(() => {
                return from(handle.evaluate((input, newValue) => {
                  const element = input;
                  const currentValue = element.isContentEditable ? element.innerText : element.value;
                  if (currentValue === newValue) {
                    return;
                  }
                  if (element.isContentEditable) {
                    element.innerText = newValue;
                  } else {
                    element.value = newValue;
                  }
                  element.dispatchEvent(new Event("input", { bubbles: true }));
                  element.dispatchEvent(new Event("change", { bubbles: true }));
                }, value));
              }));
            };
            switch (inputType) {
              case "select":
                return from(handle.select(value).then(noop2));
              case "contenteditable":
              case "typeable-input":
                if (value.length < typingThreshold) {
                  return from(handle.evaluate((input, newValue) => {
                    const element = input;
                    const currentValue = element.isContentEditable ? element.innerText : input.value;
                    if (newValue.length <= currentValue.length || !newValue.startsWith(currentValue)) {
                      if (element.isContentEditable) {
                        element.innerText = "";
                      } else {
                        input.value = "";
                      }
                      return newValue;
                    }
                    if (element.isContentEditable) {
                      element.innerText = "";
                      element.innerText = currentValue;
                    } else {
                      input.value = "";
                      input.value = currentValue;
                    }
                    return newValue.substring(currentValue.length);
                  }, value)).pipe(mergeMap((textToType) => {
                    if (!textToType) {
                      return of(void 0);
                    }
                    return from(handle.type(textToType));
                  }));
                }
                return fillDirectly();
              case "other-input":
                return fillDirectly();
              case "unknown":
                throw new Error(`Element cannot be filled out.`);
            }
          })).pipe(catchError((err) => {
            void handle.dispose().catch(debugError);
            throw err;
          }));
        }), this.operators.retryAndRaceWithSignalAndTimer(signal, cause));
      }
      #hover(options2) {
        const signal = options2?.signal;
        const cause = new Error("Locator.hover");
        return this._wait(options2).pipe(this.operators.conditions([
          this.#ensureElementIsInTheViewportIfNeeded,
          this.#waitForStableBoundingBoxIfNeeded
        ], signal), tap(() => {
          return this.emit(LocatorEvent.Action, void 0);
        }), mergeMap((handle) => {
          return from(handle.hover()).pipe(catchError((err) => {
            void handle.dispose().catch(debugError);
            throw err;
          }));
        }), this.operators.retryAndRaceWithSignalAndTimer(signal, cause));
      }
      #scroll(options2) {
        const signal = options2?.signal;
        const cause = new Error("Locator.scroll");
        return this._wait(options2).pipe(this.operators.conditions([
          this.#ensureElementIsInTheViewportIfNeeded,
          this.#waitForStableBoundingBoxIfNeeded
        ], signal), tap(() => {
          return this.emit(LocatorEvent.Action, void 0);
        }), mergeMap((handle) => {
          return from(handle.evaluate((el, scrollTop, scrollLeft) => {
            if (scrollTop !== void 0) {
              el.scrollTop = scrollTop;
            }
            if (scrollLeft !== void 0) {
              el.scrollLeft = scrollLeft;
            }
          }, options2?.scrollTop, options2?.scrollLeft)).pipe(catchError((err) => {
            void handle.dispose().catch(debugError);
            throw err;
          }));
        }), this.operators.retryAndRaceWithSignalAndTimer(signal, cause));
      }
      clone() {
        return this._clone();
      }
      async waitHandle(options2) {
        const cause = new Error("Locator.waitHandle");
        return await firstValueFrom(this._wait(options2).pipe(this.operators.retryAndRaceWithSignalAndTimer(options2?.signal, cause)));
      }
      async wait(options2) {
        const env_1 = { stack: [], error: void 0, hasError: false };
        try {
          const handle = __addDisposableResource$9(env_1, await this.waitHandle(options2), false);
          return await handle.jsonValue();
        } catch (e_1) {
          env_1.error = e_1;
          env_1.hasError = true;
        } finally {
          __disposeResources$9(env_1);
        }
      }
      map(mapper) {
        return new MappedLocator(this._clone(), (handle) => {
          return handle.evaluateHandle(mapper);
        });
      }
      filter(predicate) {
        return new FilteredLocator(this._clone(), async (handle, signal) => {
          await handle.frame.waitForFunction(predicate, { signal, timeout: this._timeout }, handle);
          return true;
        });
      }
      filterHandle(predicate) {
        return new FilteredLocator(this._clone(), predicate);
      }
      mapHandle(mapper) {
        return new MappedLocator(this._clone(), mapper);
      }
      click(options2) {
        return firstValueFrom(this.#click(options2));
      }
      fill(value, options2) {
        return firstValueFrom(this.#fill(value, options2));
      }
      hover(options2) {
        return firstValueFrom(this.#hover(options2));
      }
      scroll(options2) {
        return firstValueFrom(this.#scroll(options2));
      }
    };
    FunctionLocator = class _FunctionLocator extends Locator {
      static create(pageOrFrame, func) {
        return new _FunctionLocator(pageOrFrame, func).setTimeout("getDefaultTimeout" in pageOrFrame ? pageOrFrame.getDefaultTimeout() : pageOrFrame.page().getDefaultTimeout());
      }
      #pageOrFrame;
      #func;
      constructor(pageOrFrame, func) {
        super();
        this.#pageOrFrame = pageOrFrame;
        this.#func = func;
      }
      _clone() {
        return new _FunctionLocator(this.#pageOrFrame, this.#func);
      }
      _wait(options2) {
        const signal = options2?.signal;
        return defer(() => {
          return from(this.#pageOrFrame.waitForFunction(this.#func, {
            timeout: this.timeout,
            signal
          }));
        }).pipe(throwIfEmpty());
      }
    };
    DelegatedLocator = class extends Locator {
      #delegate;
      constructor(delegate) {
        super();
        this.#delegate = delegate;
        this.copyOptions(this.#delegate);
      }
      get delegate() {
        return this.#delegate;
      }
      setTimeout(timeout2) {
        const locator = super.setTimeout(timeout2);
        locator.#delegate = this.#delegate.setTimeout(timeout2);
        return locator;
      }
      setVisibility(visibility) {
        const locator = super.setVisibility(visibility);
        locator.#delegate = locator.#delegate.setVisibility(visibility);
        return locator;
      }
      setWaitForEnabled(value) {
        const locator = super.setWaitForEnabled(value);
        locator.#delegate = this.#delegate.setWaitForEnabled(value);
        return locator;
      }
      setEnsureElementIsInTheViewport(value) {
        const locator = super.setEnsureElementIsInTheViewport(value);
        locator.#delegate = this.#delegate.setEnsureElementIsInTheViewport(value);
        return locator;
      }
      setWaitForStableBoundingBox(value) {
        const locator = super.setWaitForStableBoundingBox(value);
        locator.#delegate = this.#delegate.setWaitForStableBoundingBox(value);
        return locator;
      }
    };
    FilteredLocator = class _FilteredLocator extends DelegatedLocator {
      #predicate;
      constructor(base, predicate) {
        super(base);
        this.#predicate = predicate;
      }
      _clone() {
        return new _FilteredLocator(this.delegate.clone(), this.#predicate).copyOptions(this);
      }
      _wait(options2) {
        return this.delegate._wait(options2).pipe(mergeMap((handle) => {
          return from(Promise.resolve(this.#predicate(handle, options2?.signal))).pipe(filter((value) => {
            return value;
          }), map(() => {
            return handle;
          }));
        }), throwIfEmpty());
      }
    };
    MappedLocator = class _MappedLocator extends DelegatedLocator {
      #mapper;
      constructor(base, mapper) {
        super(base);
        this.#mapper = mapper;
      }
      _clone() {
        return new _MappedLocator(this.delegate.clone(), this.#mapper).copyOptions(this);
      }
      _wait(options2) {
        return this.delegate._wait(options2).pipe(mergeMap((handle) => {
          return from(Promise.resolve(this.#mapper(handle, options2?.signal)));
        }));
      }
    };
    NodeLocator = class _NodeLocator extends Locator {
      static create(pageOrFrame, selector) {
        return new _NodeLocator(pageOrFrame, selector).setTimeout("getDefaultTimeout" in pageOrFrame ? pageOrFrame.getDefaultTimeout() : pageOrFrame.page().getDefaultTimeout());
      }
      static createFromHandle(pageOrFrame, handle) {
        return new _NodeLocator(pageOrFrame, handle).setTimeout("getDefaultTimeout" in pageOrFrame ? pageOrFrame.getDefaultTimeout() : pageOrFrame.page().getDefaultTimeout());
      }
      #pageOrFrame;
      #selectorOrHandle;
      constructor(pageOrFrame, selectorOrHandle) {
        super();
        this.#pageOrFrame = pageOrFrame;
        this.#selectorOrHandle = selectorOrHandle;
      }
      #waitForVisibilityIfNeeded = (handle) => {
        if (!this.visibility) {
          return EMPTY;
        }
        return (() => {
          switch (this.visibility) {
            case "hidden":
              return defer(() => {
                return from(handle.isHidden());
              });
            case "visible":
              return defer(() => {
                return from(handle.isVisible());
              });
          }
        })().pipe(first(identity), retry({ delay: RETRY_DELAY }), ignoreElements());
      };
      _clone() {
        return new _NodeLocator(
          this.#pageOrFrame,
          this.#selectorOrHandle
        ).copyOptions(this);
      }
      _wait(options2) {
        const signal = options2?.signal;
        return defer(() => {
          if (typeof this.#selectorOrHandle === "string") {
            return from(this.#pageOrFrame.waitForSelector(this.#selectorOrHandle, {
              visible: false,
              timeout: this._timeout,
              signal
            }));
          } else {
            return of(this.#selectorOrHandle);
          }
        }).pipe(filter((value) => {
          return value !== null;
        }), throwIfEmpty(), this.operators.conditions([this.#waitForVisibilityIfNeeded], signal));
      }
    };
    RaceLocator = class _RaceLocator extends Locator {
      static create(locators) {
        const array2 = checkLocatorArray(locators);
        return new _RaceLocator(array2);
      }
      #locators;
      constructor(locators) {
        super();
        this.#locators = locators;
      }
      _clone() {
        return new _RaceLocator(this.#locators.map((locator) => {
          return locator.clone();
        })).copyOptions(this);
      }
      _wait(options2) {
        return race(...this.#locators.map((locator) => {
          return locator._wait(options2);
        }));
      }
    };
    RETRY_DELAY = 100;
    __runInitializers$7 = function(thisArg, initializers, value) {
      var useValue = arguments.length > 2;
      for (var i = 0; i < initializers.length; i++) {
        value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);
      }
      return useValue ? value : void 0;
    };
    __esDecorate$7 = function(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {
      function accept(f) {
        if (f !== void 0 && typeof f !== "function") throw new TypeError("Function expected");
        return f;
      }
      var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value";
      var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null;
      var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});
      var _, done = false;
      for (var i = decorators.length - 1; i >= 0; i--) {
        var context2 = {};
        for (var p in contextIn) context2[p] = p === "access" ? {} : contextIn[p];
        for (var p in contextIn.access) context2.access[p] = contextIn.access[p];
        context2.addInitializer = function(f) {
          if (done) throw new TypeError("Cannot add initializers after decoration has completed");
          extraInitializers.push(accept(f || null));
        };
        var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context2);
        if (kind === "accessor") {
          if (result === void 0) continue;
          if (result === null || typeof result !== "object") throw new TypeError("Object expected");
          if (_ = accept(result.get)) descriptor.get = _;
          if (_ = accept(result.set)) descriptor.set = _;
          if (_ = accept(result.init)) initializers.unshift(_);
        } else if (_ = accept(result)) {
          if (kind === "field") initializers.unshift(_);
          else descriptor[key] = _;
        }
      }
      if (target) Object.defineProperty(target, contextIn.name, descriptor);
      done = true;
    };
    __addDisposableResource$8 = function(env2, value, async2) {
      if (value !== null && value !== void 0) {
        if (typeof value !== "object" && typeof value !== "function") throw new TypeError("Object expected.");
        var dispose, inner;
        if (async2) {
          if (!Symbol.asyncDispose) throw new TypeError("Symbol.asyncDispose is not defined.");
          dispose = value[Symbol.asyncDispose];
        }
        if (dispose === void 0) {
          if (!Symbol.dispose) throw new TypeError("Symbol.dispose is not defined.");
          dispose = value[Symbol.dispose];
          if (async2) inner = dispose;
        }
        if (typeof dispose !== "function") throw new TypeError("Object not disposable.");
        if (inner) dispose = function() {
          try {
            inner.call(this);
          } catch (e) {
            return Promise.reject(e);
          }
        };
        env2.stack.push({ value, dispose, async: async2 });
      } else if (async2) {
        env2.stack.push({ async: true });
      }
      return value;
    };
    __disposeResources$8 = /* @__PURE__ */ function(SuppressedError2) {
      return function(env2) {
        function fail(e) {
          env2.error = env2.hasError ? new SuppressedError2(e, env2.error, "An error was suppressed during disposal.") : e;
          env2.hasError = true;
        }
        var r, s = 0;
        function next() {
          while (r = env2.stack.pop()) {
            try {
              if (!r.async && s === 1) return s = 0, env2.stack.push(r), Promise.resolve().then(next);
              if (r.dispose) {
                var result = r.dispose.call(r.value);
                if (r.async) return s |= 2, Promise.resolve(result).then(next, function(e) {
                  fail(e);
                  return next();
                });
              } else s |= 1;
            } catch (e) {
              fail(e);
            }
          }
          if (s === 1) return env2.hasError ? Promise.reject(env2.error) : Promise.resolve();
          if (env2.hasError) throw env2.error;
        }
        return next();
      };
    }(typeof SuppressedError === "function" ? SuppressedError : function(error, suppressed, message) {
      var e = new Error(message);
      return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
    });
    __setFunctionName$3 = function(f, name, prefix) {
      if (typeof name === "symbol") name = name.description ? "[".concat(name.description, "]") : "";
      return Object.defineProperty(f, "name", { configurable: true, value: prefix ? "".concat(prefix, " ", name) : name });
    };
    ElementHandle = (() => {
      let _classSuper = JSHandle;
      let _instanceExtraInitializers = [];
      let _getProperty_decorators;
      let _getProperties_decorators;
      let _jsonValue_decorators;
      let _$_decorators;
      let _$$_decorators;
      let _private_$$_decorators;
      let _private_$$_descriptor;
      let _waitForSelector_decorators;
      let _isVisible_decorators;
      let _isHidden_decorators;
      let _toElement_decorators;
      let _clickablePoint_decorators;
      let _hover_decorators;
      let _click_decorators;
      let _drag_decorators;
      let _dragEnter_decorators;
      let _dragOver_decorators;
      let _drop_decorators;
      let _dragAndDrop_decorators;
      let _select_decorators;
      let _tap_decorators;
      let _touchStart_decorators;
      let _touchMove_decorators;
      let _touchEnd_decorators;
      let _focus_decorators;
      let _type_decorators;
      let _press_decorators;
      let _boundingBox_decorators;
      let _boxModel_decorators;
      let _screenshot_decorators;
      let _isIntersectingViewport_decorators;
      let _scrollIntoView_decorators;
      let _asLocator_decorators;
      return class ElementHandle2 extends _classSuper {
        static {
          const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
          _getProperty_decorators = [throwIfDisposed(), bindIsolatedHandle];
          _getProperties_decorators = [throwIfDisposed(), bindIsolatedHandle];
          _jsonValue_decorators = [throwIfDisposed(), bindIsolatedHandle];
          _$_decorators = [throwIfDisposed(), bindIsolatedHandle];
          _$$_decorators = [throwIfDisposed()];
          _private_$$_decorators = [bindIsolatedHandle];
          _waitForSelector_decorators = [throwIfDisposed(), bindIsolatedHandle];
          _isVisible_decorators = [throwIfDisposed(), bindIsolatedHandle];
          _isHidden_decorators = [throwIfDisposed(), bindIsolatedHandle];
          _toElement_decorators = [throwIfDisposed(), bindIsolatedHandle];
          _clickablePoint_decorators = [throwIfDisposed(), bindIsolatedHandle];
          _hover_decorators = [throwIfDisposed(), bindIsolatedHandle];
          _click_decorators = [throwIfDisposed(), bindIsolatedHandle];
          _drag_decorators = [throwIfDisposed(), bindIsolatedHandle];
          _dragEnter_decorators = [throwIfDisposed(), bindIsolatedHandle];
          _dragOver_decorators = [throwIfDisposed(), bindIsolatedHandle];
          _drop_decorators = [throwIfDisposed(), bindIsolatedHandle];
          _dragAndDrop_decorators = [throwIfDisposed(), bindIsolatedHandle];
          _select_decorators = [throwIfDisposed(), bindIsolatedHandle];
          _tap_decorators = [throwIfDisposed(), bindIsolatedHandle];
          _touchStart_decorators = [throwIfDisposed(), bindIsolatedHandle];
          _touchMove_decorators = [throwIfDisposed(), bindIsolatedHandle];
          _touchEnd_decorators = [throwIfDisposed(), bindIsolatedHandle];
          _focus_decorators = [throwIfDisposed(), bindIsolatedHandle];
          _type_decorators = [throwIfDisposed(), bindIsolatedHandle];
          _press_decorators = [throwIfDisposed(), bindIsolatedHandle];
          _boundingBox_decorators = [throwIfDisposed(), bindIsolatedHandle];
          _boxModel_decorators = [throwIfDisposed(), bindIsolatedHandle];
          _screenshot_decorators = [throwIfDisposed(), bindIsolatedHandle];
          _isIntersectingViewport_decorators = [throwIfDisposed(), bindIsolatedHandle];
          _scrollIntoView_decorators = [throwIfDisposed(), bindIsolatedHandle];
          _asLocator_decorators = [throwIfDisposed()];
          __esDecorate$7(this, null, _getProperty_decorators, { kind: "method", name: "getProperty", static: false, private: false, access: { has: (obj) => "getProperty" in obj, get: (obj) => obj.getProperty }, metadata: _metadata }, null, _instanceExtraInitializers);
          __esDecorate$7(this, null, _getProperties_decorators, { kind: "method", name: "getProperties", static: false, private: false, access: { has: (obj) => "getProperties" in obj, get: (obj) => obj.getProperties }, metadata: _metadata }, null, _instanceExtraInitializers);
          __esDecorate$7(this, null, _jsonValue_decorators, { kind: "method", name: "jsonValue", static: false, private: false, access: { has: (obj) => "jsonValue" in obj, get: (obj) => obj.jsonValue }, metadata: _metadata }, null, _instanceExtraInitializers);
          __esDecorate$7(this, null, _$_decorators, { kind: "method", name: "$", static: false, private: false, access: { has: (obj) => "$" in obj, get: (obj) => obj.$ }, metadata: _metadata }, null, _instanceExtraInitializers);
          __esDecorate$7(this, null, _$$_decorators, { kind: "method", name: "$$", static: false, private: false, access: { has: (obj) => "$$" in obj, get: (obj) => obj.$$ }, metadata: _metadata }, null, _instanceExtraInitializers);
          __esDecorate$7(this, _private_$$_descriptor = { value: __setFunctionName$3(async function(selector) {
            return await this.#$$impl(selector);
          }, "#$$") }, _private_$$_decorators, { kind: "method", name: "#$$", static: false, private: true, access: { has: (obj) => #$$ in obj, get: (obj) => obj.#$$ }, metadata: _metadata }, null, _instanceExtraInitializers);
          __esDecorate$7(this, null, _waitForSelector_decorators, { kind: "method", name: "waitForSelector", static: false, private: false, access: { has: (obj) => "waitForSelector" in obj, get: (obj) => obj.waitForSelector }, metadata: _metadata }, null, _instanceExtraInitializers);
          __esDecorate$7(this, null, _isVisible_decorators, { kind: "method", name: "isVisible", static: false, private: false, access: { has: (obj) => "isVisible" in obj, get: (obj) => obj.isVisible }, metadata: _metadata }, null, _instanceExtraInitializers);
          __esDecorate$7(this, null, _isHidden_decorators, { kind: "method", name: "isHidden", static: false, private: false, access: { has: (obj) => "isHidden" in obj, get: (obj) => obj.isHidden }, metadata: _metadata }, null, _instanceExtraInitializers);
          __esDecorate$7(this, null, _toElement_decorators, { kind: "method", name: "toElement", static: false, private: false, access: { has: (obj) => "toElement" in obj, get: (obj) => obj.toElement }, metadata: _metadata }, null, _instanceExtraInitializers);
          __esDecorate$7(this, null, _clickablePoint_decorators, { kind: "method", name: "clickablePoint", static: false, private: false, access: { has: (obj) => "clickablePoint" in obj, get: (obj) => obj.clickablePoint }, metadata: _metadata }, null, _instanceExtraInitializers);
          __esDecorate$7(this, null, _hover_decorators, { kind: "method", name: "hover", static: false, private: false, access: { has: (obj) => "hover" in obj, get: (obj) => obj.hover }, metadata: _metadata }, null, _instanceExtraInitializers);
          __esDecorate$7(this, null, _click_decorators, { kind: "method", name: "click", static: false, private: false, access: { has: (obj) => "click" in obj, get: (obj) => obj.click }, metadata: _metadata }, null, _instanceExtraInitializers);
          __esDecorate$7(this, null, _drag_decorators, { kind: "method", name: "drag", static: false, private: false, access: { has: (obj) => "drag" in obj, get: (obj) => obj.drag }, metadata: _metadata }, null, _instanceExtraInitializers);
          __esDecorate$7(this, null, _dragEnter_decorators, { kind: "method", name: "dragEnter", static: false, private: false, access: { has: (obj) => "dragEnter" in obj, get: (obj) => obj.dragEnter }, metadata: _metadata }, null, _instanceExtraInitializers);
          __esDecorate$7(this, null, _dragOver_decorators, { kind: "method", name: "dragOver", static: false, private: false, access: { has: (obj) => "dragOver" in obj, get: (obj) => obj.dragOver }, metadata: _metadata }, null, _instanceExtraInitializers);
          __esDecorate$7(this, null, _drop_decorators, { kind: "method", name: "drop", static: false, private: false, access: { has: (obj) => "drop" in obj, get: (obj) => obj.drop }, metadata: _metadata }, null, _instanceExtraInitializers);
          __esDecorate$7(this, null, _dragAndDrop_decorators, { kind: "method", name: "dragAndDrop", static: false, private: false, access: { has: (obj) => "dragAndDrop" in obj, get: (obj) => obj.dragAndDrop }, metadata: _metadata }, null, _instanceExtraInitializers);
          __esDecorate$7(this, null, _select_decorators, { kind: "method", name: "select", static: false, private: false, access: { has: (obj) => "select" in obj, get: (obj) => obj.select }, metadata: _metadata }, null, _instanceExtraInitializers);
          __esDecorate$7(this, null, _tap_decorators, { kind: "method", name: "tap", static: false, private: false, access: { has: (obj) => "tap" in obj, get: (obj) => obj.tap }, metadata: _metadata }, null, _instanceExtraInitializers);
          __esDecorate$7(this, null, _touchStart_decorators, { kind: "method", name: "touchStart", static: false, private: false, access: { has: (obj) => "touchStart" in obj, get: (obj) => obj.touchStart }, metadata: _metadata }, null, _instanceExtraInitializers);
          __esDecorate$7(this, null, _touchMove_decorators, { kind: "method", name: "touchMove", static: false, private: false, access: { has: (obj) => "touchMove" in obj, get: (obj) => obj.touchMove }, metadata: _metadata }, null, _instanceExtraInitializers);
          __esDecorate$7(this, null, _touchEnd_decorators, { kind: "method", name: "touchEnd", static: false, private: false, access: { has: (obj) => "touchEnd" in obj, get: (obj) => obj.touchEnd }, metadata: _metadata }, null, _instanceExtraInitializers);
          __esDecorate$7(this, null, _focus_decorators, { kind: "method", name: "focus", static: false, private: false, access: { has: (obj) => "focus" in obj, get: (obj) => obj.focus }, metadata: _metadata }, null, _instanceExtraInitializers);
          __esDecorate$7(this, null, _type_decorators, { kind: "method", name: "type", static: false, private: false, access: { has: (obj) => "type" in obj, get: (obj) => obj.type }, metadata: _metadata }, null, _instanceExtraInitializers);
          __esDecorate$7(this, null, _press_decorators, { kind: "method", name: "press", static: false, private: false, access: { has: (obj) => "press" in obj, get: (obj) => obj.press }, metadata: _metadata }, null, _instanceExtraInitializers);
          __esDecorate$7(this, null, _boundingBox_decorators, { kind: "method", name: "boundingBox", static: false, private: false, access: { has: (obj) => "boundingBox" in obj, get: (obj) => obj.boundingBox }, metadata: _metadata }, null, _instanceExtraInitializers);
          __esDecorate$7(this, null, _boxModel_decorators, { kind: "method", name: "boxModel", static: false, private: false, access: { has: (obj) => "boxModel" in obj, get: (obj) => obj.boxModel }, metadata: _metadata }, null, _instanceExtraInitializers);
          __esDecorate$7(this, null, _screenshot_decorators, { kind: "method", name: "screenshot", static: false, private: false, access: { has: (obj) => "screenshot" in obj, get: (obj) => obj.screenshot }, metadata: _metadata }, null, _instanceExtraInitializers);
          __esDecorate$7(this, null, _isIntersectingViewport_decorators, { kind: "method", name: "isIntersectingViewport", static: false, private: false, access: { has: (obj) => "isIntersectingViewport" in obj, get: (obj) => obj.isIntersectingViewport }, metadata: _metadata }, null, _instanceExtraInitializers);
          __esDecorate$7(this, null, _scrollIntoView_decorators, { kind: "method", name: "scrollIntoView", static: false, private: false, access: { has: (obj) => "scrollIntoView" in obj, get: (obj) => obj.scrollIntoView }, metadata: _metadata }, null, _instanceExtraInitializers);
          __esDecorate$7(this, null, _asLocator_decorators, { kind: "method", name: "asLocator", static: false, private: false, access: { has: (obj) => "asLocator" in obj, get: (obj) => obj.asLocator }, metadata: _metadata }, null, _instanceExtraInitializers);
          if (_metadata) Object.defineProperty(this, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
        }
        isolatedHandle = __runInitializers$7(this, _instanceExtraInitializers);
        handle;
        constructor(handle) {
          super();
          this.handle = handle;
          this[_isElementHandle] = true;
        }
        get id() {
          return this.handle.id;
        }
        get disposed() {
          return this.handle.disposed;
        }
        async getProperty(propertyName) {
          return await this.handle.getProperty(propertyName);
        }
        async getProperties() {
          return await this.handle.getProperties();
        }
        async evaluate(pageFunction, ...args2) {
          pageFunction = withSourcePuppeteerURLIfNone(this.evaluate.name, pageFunction);
          return await this.handle.evaluate(pageFunction, ...args2);
        }
        async evaluateHandle(pageFunction, ...args2) {
          pageFunction = withSourcePuppeteerURLIfNone(this.evaluateHandle.name, pageFunction);
          return await this.handle.evaluateHandle(pageFunction, ...args2);
        }
        async jsonValue() {
          return await this.handle.jsonValue();
        }
        toString() {
          return this.handle.toString();
        }
        remoteObject() {
          return this.handle.remoteObject();
        }
        async dispose() {
          await Promise.all([this.handle.dispose(), this.isolatedHandle?.dispose()]);
        }
        asElement() {
          return this;
        }
        async $(selector) {
          const { updatedSelector, QueryHandler: QueryHandler2 } = getQueryHandlerAndSelector(selector);
          return await QueryHandler2.queryOne(this, updatedSelector);
        }
        async $$(selector, options2) {
          if (options2?.isolate === false) {
            return await this.#$$impl(selector);
          }
          return await this.#$$(selector);
        }
        get #$$() {
          return _private_$$_descriptor.value;
        }
        async #$$impl(selector) {
          const { updatedSelector, QueryHandler: QueryHandler2 } = getQueryHandlerAndSelector(selector);
          return await AsyncIterableUtil.collect(QueryHandler2.queryAll(this, updatedSelector));
        }
        async $eval(selector, pageFunction, ...args2) {
          const env_1 = { stack: [], error: void 0, hasError: false };
          try {
            pageFunction = withSourcePuppeteerURLIfNone(this.$eval.name, pageFunction);
            const elementHandle = __addDisposableResource$8(env_1, await this.$(selector), false);
            if (!elementHandle) {
              throw new Error(`Error: failed to find element matching selector "${selector}"`);
            }
            return await elementHandle.evaluate(pageFunction, ...args2);
          } catch (e_1) {
            env_1.error = e_1;
            env_1.hasError = true;
          } finally {
            __disposeResources$8(env_1);
          }
        }
        async $$eval(selector, pageFunction, ...args2) {
          const env_2 = { stack: [], error: void 0, hasError: false };
          try {
            pageFunction = withSourcePuppeteerURLIfNone(this.$$eval.name, pageFunction);
            const results = await this.$$(selector);
            const elements = __addDisposableResource$8(env_2, await this.evaluateHandle((_, ...elements2) => {
              return elements2;
            }, ...results), false);
            const [result] = await Promise.all([
              elements.evaluate(pageFunction, ...args2),
              ...results.map((results2) => {
                return results2.dispose();
              })
            ]);
            return result;
          } catch (e_2) {
            env_2.error = e_2;
            env_2.hasError = true;
          } finally {
            __disposeResources$8(env_2);
          }
        }
        async waitForSelector(selector, options2 = {}) {
          const { updatedSelector, QueryHandler: QueryHandler2, polling } = getQueryHandlerAndSelector(selector);
          return await QueryHandler2.waitFor(this, updatedSelector, {
            polling,
            ...options2
          });
        }
        async #checkVisibility(visibility) {
          return await this.evaluate(async (element, PuppeteerUtil, visibility2) => {
            return Boolean(PuppeteerUtil.checkVisibility(element, visibility2));
          }, LazyArg.create((context2) => {
            return context2.puppeteerUtil;
          }), visibility);
        }
        async isVisible() {
          return await this.#checkVisibility(true);
        }
        async isHidden() {
          return await this.#checkVisibility(false);
        }
        async toElement(tagName) {
          const isMatchingTagName = await this.evaluate((node2, tagName2) => {
            return node2.nodeName === tagName2.toUpperCase();
          }, tagName);
          if (!isMatchingTagName) {
            throw new Error(`Element is not a(n) \`${tagName}\` element`);
          }
          return this;
        }
        async clickablePoint(offset) {
          const box = await this.#clickableBox();
          if (!box) {
            throw new Error("Node is either not clickable or not an Element");
          }
          if (offset !== void 0) {
            return {
              x: box.x + offset.x,
              y: box.y + offset.y
            };
          }
          return {
            x: box.x + box.width / 2,
            y: box.y + box.height / 2
          };
        }
        async hover() {
          await this.scrollIntoViewIfNeeded();
          const { x, y } = await this.clickablePoint();
          await this.frame.page().mouse.move(x, y);
        }
        async click(options2 = {}) {
          await this.scrollIntoViewIfNeeded();
          const { x, y } = await this.clickablePoint(options2.offset);
          try {
            await this.frame.page().mouse.click(x, y, options2);
          } finally {
            if (options2.debugHighlight) {
              await this.frame.page().evaluate((x2, y2) => {
                const highlight = document.createElement("div");
                highlight.innerHTML = `<style>
        @scope {
          :scope {
              position: fixed;
              left: ${x2}px;
              top: ${y2}px;
              width: 10px;
              height: 10px;
              border-radius: 50%;
              animation: colorChange 10s 1 normal;
              animation-fill-mode: forwards;
          }

          @keyframes colorChange {
              from {
                  background-color: red;
              }
              to {
                  background-color: #FADADD00;
              }
          }
        }
      </style>`;
                highlight.addEventListener("animationend", () => {
                  highlight.remove();
                }, { once: true });
                document.body.append(highlight);
              }, x, y);
            }
          }
        }
        async drag(target) {
          await this.scrollIntoViewIfNeeded();
          const page = this.frame.page();
          if (page.isDragInterceptionEnabled()) {
            const source2 = await this.clickablePoint();
            if (target instanceof ElementHandle2) {
              target = await target.clickablePoint();
            }
            return await page.mouse.drag(source2, target);
          }
          try {
            if (!page._isDragging) {
              page._isDragging = true;
              await this.hover();
              await page.mouse.down();
            }
            if (target instanceof ElementHandle2) {
              await target.hover();
            } else {
              await page.mouse.move(target.x, target.y);
            }
          } catch (error) {
            page._isDragging = false;
            throw error;
          }
        }
        async dragEnter(data32 = { items: [], dragOperationsMask: 1 }) {
          const page = this.frame.page();
          await this.scrollIntoViewIfNeeded();
          const target = await this.clickablePoint();
          await page.mouse.dragEnter(target, data32);
        }
        async dragOver(data32 = { items: [], dragOperationsMask: 1 }) {
          const page = this.frame.page();
          await this.scrollIntoViewIfNeeded();
          const target = await this.clickablePoint();
          await page.mouse.dragOver(target, data32);
        }
        async drop(dataOrElement = {
          items: [],
          dragOperationsMask: 1
        }) {
          const page = this.frame.page();
          if ("items" in dataOrElement) {
            await this.scrollIntoViewIfNeeded();
            const destination = await this.clickablePoint();
            await page.mouse.drop(destination, dataOrElement);
          } else {
            await dataOrElement.drag(this);
            page._isDragging = false;
            await page.mouse.up();
          }
        }
        async dragAndDrop(target, options2) {
          const page = this.frame.page();
          assert(page.isDragInterceptionEnabled(), "Drag Interception is not enabled!");
          await this.scrollIntoViewIfNeeded();
          const startPoint = await this.clickablePoint();
          const targetPoint = await target.clickablePoint();
          await page.mouse.dragAndDrop(startPoint, targetPoint, options2);
        }
        async select(...values) {
          for (const value of values) {
            assert(isString(value), 'Values must be strings. Found value "' + value + '" of type "' + typeof value + '"');
          }
          return await this.evaluate((element, vals) => {
            const values2 = new Set(vals);
            if (!(element instanceof HTMLSelectElement)) {
              throw new Error("Element is not a <select> element.");
            }
            const selectedValues = /* @__PURE__ */ new Set();
            if (!element.multiple) {
              for (const option of element.options) {
                option.selected = false;
              }
              for (const option of element.options) {
                if (values2.has(option.value)) {
                  option.selected = true;
                  selectedValues.add(option.value);
                  break;
                }
              }
            } else {
              for (const option of element.options) {
                option.selected = values2.has(option.value);
                if (option.selected) {
                  selectedValues.add(option.value);
                }
              }
            }
            element.dispatchEvent(new Event("input", { bubbles: true }));
            element.dispatchEvent(new Event("change", { bubbles: true }));
            return [...selectedValues.values()];
          }, values);
        }
        async tap() {
          await this.scrollIntoViewIfNeeded();
          const { x, y } = await this.clickablePoint();
          await this.frame.page().touchscreen.tap(x, y);
        }
        async touchStart() {
          await this.scrollIntoViewIfNeeded();
          const { x, y } = await this.clickablePoint();
          return await this.frame.page().touchscreen.touchStart(x, y);
        }
        async touchMove(touch) {
          await this.scrollIntoViewIfNeeded();
          const { x, y } = await this.clickablePoint();
          if (touch) {
            return await touch.move(x, y);
          }
          await this.frame.page().touchscreen.touchMove(x, y);
        }
        async touchEnd() {
          await this.scrollIntoViewIfNeeded();
          await this.frame.page().touchscreen.touchEnd();
        }
        async focus() {
          await this.evaluate((element) => {
            if (!(element instanceof HTMLElement)) {
              throw new Error("Cannot focus non-HTMLElement");
            }
            return element.focus();
          });
        }
        async type(text, options2) {
          await this.focus();
          await this.frame.page().keyboard.type(text, options2);
        }
        async press(key, options2) {
          await this.focus();
          await this.frame.page().keyboard.press(key, options2);
        }
        async #clickableBox() {
          const boxes = await this.evaluate((element) => {
            if (!(element instanceof Element)) {
              return null;
            }
            return [...element.getClientRects()].map((rect) => {
              return { x: rect.x, y: rect.y, width: rect.width, height: rect.height };
            });
          });
          if (!boxes?.length) {
            return null;
          }
          await this.#intersectBoundingBoxesWithFrame(boxes);
          let frame = this.frame;
          let parentFrame;
          while (parentFrame = frame?.parentFrame()) {
            const env_3 = { stack: [], error: void 0, hasError: false };
            try {
              const handle = __addDisposableResource$8(env_3, await frame.frameElement(), false);
              if (!handle) {
                throw new Error("Unsupported frame type");
              }
              const parentBox = await handle.evaluate((element) => {
                if (element.getClientRects().length === 0) {
                  return null;
                }
                const rect = element.getBoundingClientRect();
                const style = window.getComputedStyle(element);
                return {
                  left: rect.left + parseInt(style.paddingLeft, 10) + parseInt(style.borderLeftWidth, 10),
                  top: rect.top + parseInt(style.paddingTop, 10) + parseInt(style.borderTopWidth, 10)
                };
              });
              if (!parentBox) {
                return null;
              }
              for (const box2 of boxes) {
                box2.x += parentBox.left;
                box2.y += parentBox.top;
              }
              await handle.#intersectBoundingBoxesWithFrame(boxes);
              frame = parentFrame;
            } catch (e_3) {
              env_3.error = e_3;
              env_3.hasError = true;
            } finally {
              __disposeResources$8(env_3);
            }
          }
          const box = boxes.find((box2) => {
            return box2.width >= 1 && box2.height >= 1;
          });
          if (!box) {
            return null;
          }
          return {
            x: box.x,
            y: box.y,
            height: box.height,
            width: box.width
          };
        }
        async #intersectBoundingBoxesWithFrame(boxes) {
          const { documentWidth, documentHeight } = await this.frame.isolatedRealm().evaluate(() => {
            return {
              documentWidth: document.documentElement.clientWidth,
              documentHeight: document.documentElement.clientHeight
            };
          });
          for (const box of boxes) {
            intersectBoundingBox(box, documentWidth, documentHeight);
          }
        }
        async boundingBox() {
          const box = await this.evaluate((element) => {
            if (!(element instanceof Element)) {
              return null;
            }
            if (element.getClientRects().length === 0) {
              return null;
            }
            const rect = element.getBoundingClientRect();
            return { x: rect.x, y: rect.y, width: rect.width, height: rect.height };
          });
          if (!box) {
            return null;
          }
          const offset = await this.#getTopLeftCornerOfFrame();
          if (!offset) {
            return null;
          }
          return {
            x: box.x + offset.x,
            y: box.y + offset.y,
            height: box.height,
            width: box.width
          };
        }
        async boxModel() {
          const model3 = await this.evaluate((element) => {
            if (!(element instanceof Element)) {
              return null;
            }
            if (element.getClientRects().length === 0) {
              return null;
            }
            const rect = element.getBoundingClientRect();
            const style = window.getComputedStyle(element);
            const offsets = {
              padding: {
                left: parseInt(style.paddingLeft, 10),
                top: parseInt(style.paddingTop, 10),
                right: parseInt(style.paddingRight, 10),
                bottom: parseInt(style.paddingBottom, 10)
              },
              margin: {
                left: -parseInt(style.marginLeft, 10),
                top: -parseInt(style.marginTop, 10),
                right: -parseInt(style.marginRight, 10),
                bottom: -parseInt(style.marginBottom, 10)
              },
              border: {
                left: parseInt(style.borderLeft, 10),
                top: parseInt(style.borderTop, 10),
                right: parseInt(style.borderRight, 10),
                bottom: parseInt(style.borderBottom, 10)
              }
            };
            const border = [
              { x: rect.left, y: rect.top },
              { x: rect.left + rect.width, y: rect.top },
              { x: rect.left + rect.width, y: rect.top + rect.height },
              { x: rect.left, y: rect.top + rect.height }
            ];
            const padding = transformQuadWithOffsets(border, offsets.border);
            const content = transformQuadWithOffsets(padding, offsets.padding);
            const margin = transformQuadWithOffsets(border, offsets.margin);
            return {
              content,
              padding,
              border,
              margin,
              width: rect.width,
              height: rect.height
            };
            function transformQuadWithOffsets(quad, offsets2) {
              return [
                {
                  x: quad[0].x + offsets2.left,
                  y: quad[0].y + offsets2.top
                },
                {
                  x: quad[1].x - offsets2.right,
                  y: quad[1].y + offsets2.top
                },
                {
                  x: quad[2].x - offsets2.right,
                  y: quad[2].y - offsets2.bottom
                },
                {
                  x: quad[3].x + offsets2.left,
                  y: quad[3].y - offsets2.bottom
                }
              ];
            }
          });
          if (!model3) {
            return null;
          }
          const offset = await this.#getTopLeftCornerOfFrame();
          if (!offset) {
            return null;
          }
          for (const attribute of [
            "content",
            "padding",
            "border",
            "margin"
          ]) {
            for (const point of model3[attribute]) {
              point.x += offset.x;
              point.y += offset.y;
            }
          }
          return model3;
        }
        async #getTopLeftCornerOfFrame() {
          const point = { x: 0, y: 0 };
          let frame = this.frame;
          let parentFrame;
          while (parentFrame = frame?.parentFrame()) {
            const env_4 = { stack: [], error: void 0, hasError: false };
            try {
              const handle = __addDisposableResource$8(env_4, await frame.frameElement(), false);
              if (!handle) {
                throw new Error("Unsupported frame type");
              }
              const parentBox = await handle.evaluate((element) => {
                if (element.getClientRects().length === 0) {
                  return null;
                }
                const rect = element.getBoundingClientRect();
                const style = window.getComputedStyle(element);
                return {
                  left: rect.left + parseInt(style.paddingLeft, 10) + parseInt(style.borderLeftWidth, 10),
                  top: rect.top + parseInt(style.paddingTop, 10) + parseInt(style.borderTopWidth, 10)
                };
              });
              if (!parentBox) {
                return null;
              }
              point.x += parentBox.left;
              point.y += parentBox.top;
              frame = parentFrame;
            } catch (e_4) {
              env_4.error = e_4;
              env_4.hasError = true;
            } finally {
              __disposeResources$8(env_4);
            }
          }
          return point;
        }
        async screenshot(options2 = {}) {
          const { scrollIntoView = true, clip } = options2;
          const page = this.frame.page();
          if (scrollIntoView) {
            await this.scrollIntoViewIfNeeded();
          }
          const elementClip = await this.#nonEmptyVisibleBoundingBox();
          const [pageLeft, pageTop] = await this.evaluate(() => {
            if (!window.visualViewport) {
              throw new Error("window.visualViewport is not supported.");
            }
            return [
              window.visualViewport.pageLeft,
              window.visualViewport.pageTop
            ];
          });
          elementClip.x += pageLeft;
          elementClip.y += pageTop;
          if (clip) {
            elementClip.x += clip.x;
            elementClip.y += clip.y;
            elementClip.height = clip.height;
            elementClip.width = clip.width;
          }
          return await page.screenshot({ ...options2, clip: elementClip });
        }
        async #nonEmptyVisibleBoundingBox() {
          const box = await this.boundingBox();
          assert(box, "Node is either not visible or not an HTMLElement");
          assert(box.width !== 0, "Node has 0 width.");
          assert(box.height !== 0, "Node has 0 height.");
          return box;
        }
        async assertConnectedElement() {
          const error = await this.evaluate(async (element) => {
            if (!element.isConnected) {
              return "Node is detached from document";
            }
            if (element.nodeType !== Node.ELEMENT_NODE) {
              return "Node is not of type HTMLElement";
            }
            return;
          });
          if (error) {
            throw new Error(error);
          }
        }
        async scrollIntoViewIfNeeded() {
          if (await this.isIntersectingViewport({
            threshold: 1
          })) {
            return;
          }
          await this.scrollIntoView();
        }
        async isIntersectingViewport(options2 = {}) {
          const env_5 = { stack: [], error: void 0, hasError: false };
          try {
            await this.assertConnectedElement();
            const handle = await this.#asSVGElementHandle();
            const target = __addDisposableResource$8(env_5, handle && await handle.#getOwnerSVGElement(), false);
            return await (target ?? this).evaluate(async (element, threshold) => {
              const visibleRatio = await new Promise((resolve2) => {
                const observer = new IntersectionObserver((entries) => {
                  resolve2(entries[0].intersectionRatio);
                  observer.disconnect();
                });
                observer.observe(element);
              });
              return threshold === 1 ? visibleRatio === 1 : visibleRatio > threshold;
            }, options2.threshold ?? 0);
          } catch (e_5) {
            env_5.error = e_5;
            env_5.hasError = true;
          } finally {
            __disposeResources$8(env_5);
          }
        }
        async scrollIntoView() {
          await this.assertConnectedElement();
          await this.evaluate(async (element) => {
            element.scrollIntoView({
              block: "center",
              inline: "center",
              behavior: "instant"
            });
          });
        }
        asLocator() {
          return NodeLocator.createFromHandle(this.frame, this);
        }
        async #asSVGElementHandle() {
          if (await this.evaluate((element) => {
            return element instanceof SVGElement;
          })) {
            return this;
          } else {
            return null;
          }
        }
        async #getOwnerSVGElement() {
          return await this.evaluateHandle((element) => {
            if (element instanceof SVGSVGElement) {
              return element;
            }
            return element.ownerSVGElement;
          });
        }
      };
    })();
    __runInitializers$6 = function(thisArg, initializers, value) {
      var useValue = arguments.length > 2;
      for (var i = 0; i < initializers.length; i++) {
        value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);
      }
      return useValue ? value : void 0;
    };
    __esDecorate$6 = function(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {
      function accept(f) {
        if (f !== void 0 && typeof f !== "function") throw new TypeError("Function expected");
        return f;
      }
      var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value";
      var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null;
      var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});
      var _, done = false;
      for (var i = decorators.length - 1; i >= 0; i--) {
        var context2 = {};
        for (var p in contextIn) context2[p] = p === "access" ? {} : contextIn[p];
        for (var p in contextIn.access) context2.access[p] = contextIn.access[p];
        context2.addInitializer = function(f) {
          if (done) throw new TypeError("Cannot add initializers after decoration has completed");
          extraInitializers.push(accept(f || null));
        };
        var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context2);
        if (kind === "accessor") {
          if (result === void 0) continue;
          if (result === null || typeof result !== "object") throw new TypeError("Object expected");
          if (_ = accept(result.get)) descriptor.get = _;
          if (_ = accept(result.set)) descriptor.set = _;
          if (_ = accept(result.init)) initializers.unshift(_);
        } else if (_ = accept(result)) {
          if (kind === "field") initializers.unshift(_);
          else descriptor[key] = _;
        }
      }
      if (target) Object.defineProperty(target, contextIn.name, descriptor);
      done = true;
    };
    __addDisposableResource$7 = function(env2, value, async2) {
      if (value !== null && value !== void 0) {
        if (typeof value !== "object" && typeof value !== "function") throw new TypeError("Object expected.");
        var dispose, inner;
        if (async2) {
          if (!Symbol.asyncDispose) throw new TypeError("Symbol.asyncDispose is not defined.");
          dispose = value[Symbol.asyncDispose];
        }
        if (dispose === void 0) {
          if (!Symbol.dispose) throw new TypeError("Symbol.dispose is not defined.");
          dispose = value[Symbol.dispose];
          if (async2) inner = dispose;
        }
        if (typeof dispose !== "function") throw new TypeError("Object not disposable.");
        if (inner) dispose = function() {
          try {
            inner.call(this);
          } catch (e) {
            return Promise.reject(e);
          }
        };
        env2.stack.push({ value, dispose, async: async2 });
      } else if (async2) {
        env2.stack.push({ async: true });
      }
      return value;
    };
    __disposeResources$7 = /* @__PURE__ */ function(SuppressedError2) {
      return function(env2) {
        function fail(e) {
          env2.error = env2.hasError ? new SuppressedError2(e, env2.error, "An error was suppressed during disposal.") : e;
          env2.hasError = true;
        }
        var r, s = 0;
        function next() {
          while (r = env2.stack.pop()) {
            try {
              if (!r.async && s === 1) return s = 0, env2.stack.push(r), Promise.resolve().then(next);
              if (r.dispose) {
                var result = r.dispose.call(r.value);
                if (r.async) return s |= 2, Promise.resolve(result).then(next, function(e) {
                  fail(e);
                  return next();
                });
              } else s |= 1;
            } catch (e) {
              fail(e);
            }
          }
          if (s === 1) return env2.hasError ? Promise.reject(env2.error) : Promise.resolve();
          if (env2.hasError) throw env2.error;
        }
        return next();
      };
    }(typeof SuppressedError === "function" ? SuppressedError : function(error, suppressed, message) {
      var e = new Error(message);
      return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
    });
    (function(FrameEvent2) {
      FrameEvent2.FrameNavigated = Symbol("Frame.FrameNavigated");
      FrameEvent2.FrameSwapped = Symbol("Frame.FrameSwapped");
      FrameEvent2.LifecycleEvent = Symbol("Frame.LifecycleEvent");
      FrameEvent2.FrameNavigatedWithinDocument = Symbol("Frame.FrameNavigatedWithinDocument");
      FrameEvent2.FrameDetached = Symbol("Frame.FrameDetached");
      FrameEvent2.FrameSwappedByActivation = Symbol("Frame.FrameSwappedByActivation");
    })(FrameEvent || (FrameEvent = {}));
    throwIfDetached = throwIfDisposed((frame) => {
      return `Attempted to use detached Frame '${frame._id}'.`;
    });
    Frame = (() => {
      let _classSuper = EventEmitter6;
      let _instanceExtraInitializers = [];
      let _frameElement_decorators;
      let _evaluateHandle_decorators;
      let _evaluate_decorators;
      let _locator_decorators;
      let _$_decorators;
      let _$$_decorators;
      let _$eval_decorators;
      let _$$eval_decorators;
      let _waitForSelector_decorators;
      let _waitForFunction_decorators;
      let _content_decorators;
      let _addScriptTag_decorators;
      let _addStyleTag_decorators;
      let _click_decorators;
      let _focus_decorators;
      let _hover_decorators;
      let _select_decorators;
      let _tap_decorators;
      let _type_decorators;
      let _title_decorators;
      return class Frame extends _classSuper {
        static {
          const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
          _frameElement_decorators = [throwIfDetached];
          _evaluateHandle_decorators = [throwIfDetached];
          _evaluate_decorators = [throwIfDetached];
          _locator_decorators = [throwIfDetached];
          _$_decorators = [throwIfDetached];
          _$$_decorators = [throwIfDetached];
          _$eval_decorators = [throwIfDetached];
          _$$eval_decorators = [throwIfDetached];
          _waitForSelector_decorators = [throwIfDetached];
          _waitForFunction_decorators = [throwIfDetached];
          _content_decorators = [throwIfDetached];
          _addScriptTag_decorators = [throwIfDetached];
          _addStyleTag_decorators = [throwIfDetached];
          _click_decorators = [throwIfDetached];
          _focus_decorators = [throwIfDetached];
          _hover_decorators = [throwIfDetached];
          _select_decorators = [throwIfDetached];
          _tap_decorators = [throwIfDetached];
          _type_decorators = [throwIfDetached];
          _title_decorators = [throwIfDetached];
          __esDecorate$6(this, null, _frameElement_decorators, { kind: "method", name: "frameElement", static: false, private: false, access: { has: (obj) => "frameElement" in obj, get: (obj) => obj.frameElement }, metadata: _metadata }, null, _instanceExtraInitializers);
          __esDecorate$6(this, null, _evaluateHandle_decorators, { kind: "method", name: "evaluateHandle", static: false, private: false, access: { has: (obj) => "evaluateHandle" in obj, get: (obj) => obj.evaluateHandle }, metadata: _metadata }, null, _instanceExtraInitializers);
          __esDecorate$6(this, null, _evaluate_decorators, { kind: "method", name: "evaluate", static: false, private: false, access: { has: (obj) => "evaluate" in obj, get: (obj) => obj.evaluate }, metadata: _metadata }, null, _instanceExtraInitializers);
          __esDecorate$6(this, null, _locator_decorators, { kind: "method", name: "locator", static: false, private: false, access: { has: (obj) => "locator" in obj, get: (obj) => obj.locator }, metadata: _metadata }, null, _instanceExtraInitializers);
          __esDecorate$6(this, null, _$_decorators, { kind: "method", name: "$", static: false, private: false, access: { has: (obj) => "$" in obj, get: (obj) => obj.$ }, metadata: _metadata }, null, _instanceExtraInitializers);
          __esDecorate$6(this, null, _$$_decorators, { kind: "method", name: "$$", static: false, private: false, access: { has: (obj) => "$$" in obj, get: (obj) => obj.$$ }, metadata: _metadata }, null, _instanceExtraInitializers);
          __esDecorate$6(this, null, _$eval_decorators, { kind: "method", name: "$eval", static: false, private: false, access: { has: (obj) => "$eval" in obj, get: (obj) => obj.$eval }, metadata: _metadata }, null, _instanceExtraInitializers);
          __esDecorate$6(this, null, _$$eval_decorators, { kind: "method", name: "$$eval", static: false, private: false, access: { has: (obj) => "$$eval" in obj, get: (obj) => obj.$$eval }, metadata: _metadata }, null, _instanceExtraInitializers);
          __esDecorate$6(this, null, _waitForSelector_decorators, { kind: "method", name: "waitForSelector", static: false, private: false, access: { has: (obj) => "waitForSelector" in obj, get: (obj) => obj.waitForSelector }, metadata: _metadata }, null, _instanceExtraInitializers);
          __esDecorate$6(this, null, _waitForFunction_decorators, { kind: "method", name: "waitForFunction", static: false, private: false, access: { has: (obj) => "waitForFunction" in obj, get: (obj) => obj.waitForFunction }, metadata: _metadata }, null, _instanceExtraInitializers);
          __esDecorate$6(this, null, _content_decorators, { kind: "method", name: "content", static: false, private: false, access: { has: (obj) => "content" in obj, get: (obj) => obj.content }, metadata: _metadata }, null, _instanceExtraInitializers);
          __esDecorate$6(this, null, _addScriptTag_decorators, { kind: "method", name: "addScriptTag", static: false, private: false, access: { has: (obj) => "addScriptTag" in obj, get: (obj) => obj.addScriptTag }, metadata: _metadata }, null, _instanceExtraInitializers);
          __esDecorate$6(this, null, _addStyleTag_decorators, { kind: "method", name: "addStyleTag", static: false, private: false, access: { has: (obj) => "addStyleTag" in obj, get: (obj) => obj.addStyleTag }, metadata: _metadata }, null, _instanceExtraInitializers);
          __esDecorate$6(this, null, _click_decorators, { kind: "method", name: "click", static: false, private: false, access: { has: (obj) => "click" in obj, get: (obj) => obj.click }, metadata: _metadata }, null, _instanceExtraInitializers);
          __esDecorate$6(this, null, _focus_decorators, { kind: "method", name: "focus", static: false, private: false, access: { has: (obj) => "focus" in obj, get: (obj) => obj.focus }, metadata: _metadata }, null, _instanceExtraInitializers);
          __esDecorate$6(this, null, _hover_decorators, { kind: "method", name: "hover", static: false, private: false, access: { has: (obj) => "hover" in obj, get: (obj) => obj.hover }, metadata: _metadata }, null, _instanceExtraInitializers);
          __esDecorate$6(this, null, _select_decorators, { kind: "method", name: "select", static: false, private: false, access: { has: (obj) => "select" in obj, get: (obj) => obj.select }, metadata: _metadata }, null, _instanceExtraInitializers);
          __esDecorate$6(this, null, _tap_decorators, { kind: "method", name: "tap", static: false, private: false, access: { has: (obj) => "tap" in obj, get: (obj) => obj.tap }, metadata: _metadata }, null, _instanceExtraInitializers);
          __esDecorate$6(this, null, _type_decorators, { kind: "method", name: "type", static: false, private: false, access: { has: (obj) => "type" in obj, get: (obj) => obj.type }, metadata: _metadata }, null, _instanceExtraInitializers);
          __esDecorate$6(this, null, _title_decorators, { kind: "method", name: "title", static: false, private: false, access: { has: (obj) => "title" in obj, get: (obj) => obj.title }, metadata: _metadata }, null, _instanceExtraInitializers);
          if (_metadata) Object.defineProperty(this, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
        }
        _id = __runInitializers$6(this, _instanceExtraInitializers);
        _parentId;
        _name;
        _hasStartedLoading = false;
        constructor() {
          super();
        }
        #_document;
        #document() {
          if (!this.#_document) {
            this.#_document = this.mainRealm().evaluateHandle(() => {
              return document;
            });
          }
          return this.#_document;
        }
        clearDocumentHandle() {
          this.#_document = void 0;
        }
        async frameElement() {
          const env_1 = { stack: [], error: void 0, hasError: false };
          try {
            const parentFrame = this.parentFrame();
            if (!parentFrame) {
              return null;
            }
            const list2 = __addDisposableResource$7(env_1, await parentFrame.isolatedRealm().evaluateHandle(() => {
              return document.querySelectorAll("iframe,frame");
            }), false);
            for await (const iframe_1 of transposeIterableHandle(list2)) {
              const env_2 = { stack: [], error: void 0, hasError: false };
              try {
                const iframe = __addDisposableResource$7(env_2, iframe_1, false);
                const frame = await iframe.contentFrame();
                if (frame?._id === this._id) {
                  return await parentFrame.mainRealm().adoptHandle(iframe);
                }
              } catch (e_1) {
                env_2.error = e_1;
                env_2.hasError = true;
              } finally {
                __disposeResources$7(env_2);
              }
            }
            return null;
          } catch (e_2) {
            env_1.error = e_2;
            env_1.hasError = true;
          } finally {
            __disposeResources$7(env_1);
          }
        }
        async evaluateHandle(pageFunction, ...args2) {
          pageFunction = withSourcePuppeteerURLIfNone(this.evaluateHandle.name, pageFunction);
          return await this.mainRealm().evaluateHandle(pageFunction, ...args2);
        }
        async evaluate(pageFunction, ...args2) {
          pageFunction = withSourcePuppeteerURLIfNone(this.evaluate.name, pageFunction);
          return await this.mainRealm().evaluate(pageFunction, ...args2);
        }
        locator(input) {
          if (typeof input === "string") {
            return NodeLocator.create(this, input);
          } else {
            return FunctionLocator.create(this, input);
          }
        }
        async $(selector) {
          const document2 = await this.#document();
          return await document2.$(selector);
        }
        async $$(selector, options2) {
          const document2 = await this.#document();
          return await document2.$$(selector, options2);
        }
        async $eval(selector, pageFunction, ...args2) {
          pageFunction = withSourcePuppeteerURLIfNone(this.$eval.name, pageFunction);
          const document2 = await this.#document();
          return await document2.$eval(selector, pageFunction, ...args2);
        }
        async $$eval(selector, pageFunction, ...args2) {
          pageFunction = withSourcePuppeteerURLIfNone(this.$$eval.name, pageFunction);
          const document2 = await this.#document();
          return await document2.$$eval(selector, pageFunction, ...args2);
        }
        async waitForSelector(selector, options2 = {}) {
          const { updatedSelector, QueryHandler: QueryHandler2, polling } = getQueryHandlerAndSelector(selector);
          return await QueryHandler2.waitFor(this, updatedSelector, {
            polling,
            ...options2
          });
        }
        async waitForFunction(pageFunction, options2 = {}, ...args2) {
          return await this.mainRealm().waitForFunction(pageFunction, options2, ...args2);
        }
        async content() {
          return await this.evaluate(() => {
            let content = "";
            for (const node2 of document.childNodes) {
              switch (node2) {
                case document.documentElement:
                  content += document.documentElement.outerHTML;
                  break;
                default:
                  content += new XMLSerializer().serializeToString(node2);
                  break;
              }
            }
            return content;
          });
        }
        async setFrameContent(content) {
          return await this.evaluate((html2) => {
            document.open();
            document.write(html2);
            document.close();
          }, content);
        }
        name() {
          return this._name || "";
        }
        isDetached() {
          return this.detached;
        }
        get disposed() {
          return this.detached;
        }
        async addScriptTag(options2) {
          let { content = "", type: type2 } = options2;
          const { path: path14 } = options2;
          if (+!!options2.url + +!!path14 + +!!content !== 1) {
            throw new Error("Exactly one of `url`, `path`, or `content` must be specified.");
          }
          if (path14) {
            content = await environment.value.fs.promises.readFile(path14, "utf8");
            content += `//# sourceURL=${path14.replace(/\n/g, "")}`;
          }
          type2 = type2 ?? "text/javascript";
          return await this.mainRealm().transferHandle(await this.isolatedRealm().evaluateHandle(async ({ url, id: id2, type: type3, content: content2 }) => {
            return await new Promise((resolve2, reject) => {
              const script = document.createElement("script");
              script.type = type3;
              script.text = content2;
              script.addEventListener("error", (event) => {
                reject(new Error(event.message ?? "Could not load script"));
              }, { once: true });
              if (id2) {
                script.id = id2;
              }
              if (url) {
                script.src = url;
                script.addEventListener("load", () => {
                  resolve2(script);
                }, { once: true });
                document.head.appendChild(script);
              } else {
                document.head.appendChild(script);
                resolve2(script);
              }
            });
          }, { ...options2, type: type2, content }));
        }
        async addStyleTag(options2) {
          let { content = "" } = options2;
          const { path: path14 } = options2;
          if (+!!options2.url + +!!path14 + +!!content !== 1) {
            throw new Error("Exactly one of `url`, `path`, or `content` must be specified.");
          }
          if (path14) {
            content = await environment.value.fs.promises.readFile(path14, "utf8");
            content += "/*# sourceURL=" + path14.replace(/\n/g, "") + "*/";
            options2.content = content;
          }
          return await this.mainRealm().transferHandle(await this.isolatedRealm().evaluateHandle(async ({ url, content: content2 }) => {
            return await new Promise((resolve2, reject) => {
              let element;
              if (!url) {
                element = document.createElement("style");
                element.appendChild(document.createTextNode(content2));
              } else {
                const link2 = document.createElement("link");
                link2.rel = "stylesheet";
                link2.href = url;
                element = link2;
              }
              element.addEventListener("load", () => {
                resolve2(element);
              }, { once: true });
              element.addEventListener("error", (event) => {
                reject(new Error(event.message ?? "Could not load style"));
              }, { once: true });
              document.head.appendChild(element);
              return element;
            });
          }, options2));
        }
        async click(selector, options2 = {}) {
          const env_3 = { stack: [], error: void 0, hasError: false };
          try {
            const handle = __addDisposableResource$7(env_3, await this.$(selector), false);
            assert(handle, `No element found for selector: ${selector}`);
            await handle.click(options2);
            await handle.dispose();
          } catch (e_3) {
            env_3.error = e_3;
            env_3.hasError = true;
          } finally {
            __disposeResources$7(env_3);
          }
        }
        async focus(selector) {
          const env_4 = { stack: [], error: void 0, hasError: false };
          try {
            const handle = __addDisposableResource$7(env_4, await this.$(selector), false);
            assert(handle, `No element found for selector: ${selector}`);
            await handle.focus();
          } catch (e_4) {
            env_4.error = e_4;
            env_4.hasError = true;
          } finally {
            __disposeResources$7(env_4);
          }
        }
        async hover(selector) {
          const env_5 = { stack: [], error: void 0, hasError: false };
          try {
            const handle = __addDisposableResource$7(env_5, await this.$(selector), false);
            assert(handle, `No element found for selector: ${selector}`);
            await handle.hover();
          } catch (e_5) {
            env_5.error = e_5;
            env_5.hasError = true;
          } finally {
            __disposeResources$7(env_5);
          }
        }
        async select(selector, ...values) {
          const env_6 = { stack: [], error: void 0, hasError: false };
          try {
            const handle = __addDisposableResource$7(env_6, await this.$(selector), false);
            assert(handle, `No element found for selector: ${selector}`);
            return await handle.select(...values);
          } catch (e_6) {
            env_6.error = e_6;
            env_6.hasError = true;
          } finally {
            __disposeResources$7(env_6);
          }
        }
        async tap(selector) {
          const env_7 = { stack: [], error: void 0, hasError: false };
          try {
            const handle = __addDisposableResource$7(env_7, await this.$(selector), false);
            assert(handle, `No element found for selector: ${selector}`);
            await handle.tap();
          } catch (e_7) {
            env_7.error = e_7;
            env_7.hasError = true;
          } finally {
            __disposeResources$7(env_7);
          }
        }
        async type(selector, text, options2) {
          const env_8 = { stack: [], error: void 0, hasError: false };
          try {
            const handle = __addDisposableResource$7(env_8, await this.$(selector), false);
            assert(handle, `No element found for selector: ${selector}`);
            await handle.type(text, options2);
          } catch (e_8) {
            env_8.error = e_8;
            env_8.hasError = true;
          } finally {
            __disposeResources$7(env_8);
          }
        }
        async title() {
          return await this.isolatedRealm().evaluate(() => {
            return document.title;
          });
        }
      };
    })();
    HTTPRequest = class {
      _interceptionId;
      _failureText = null;
      _response = null;
      _fromMemoryCache = false;
      _redirectChain = [];
      interception = {
        enabled: false,
        handled: false,
        handlers: [],
        resolutionState: {
          action: InterceptResolutionAction.None
        },
        requestOverrides: {},
        response: null,
        abortReason: null
      };
      constructor() {
      }
      continueRequestOverrides() {
        return this.interception.requestOverrides;
      }
      responseForRequest() {
        return this.interception.response;
      }
      abortErrorReason() {
        return this.interception.abortReason;
      }
      interceptResolutionState() {
        if (!this.interception.enabled) {
          return { action: InterceptResolutionAction.Disabled };
        }
        if (this.interception.handled) {
          return { action: InterceptResolutionAction.AlreadyHandled };
        }
        return { ...this.interception.resolutionState };
      }
      isInterceptResolutionHandled() {
        return this.interception.handled;
      }
      enqueueInterceptAction(pendingHandler) {
        this.interception.handlers.push(pendingHandler);
      }
      async finalizeInterceptions() {
        await this.interception.handlers.reduce((promiseChain, interceptAction) => {
          return promiseChain.then(interceptAction);
        }, Promise.resolve());
        this.interception.handlers = [];
        const { action } = this.interceptResolutionState();
        switch (action) {
          case "abort":
            return await this._abort(this.interception.abortReason);
          case "respond":
            if (this.interception.response === null) {
              throw new Error("Response is missing for the interception");
            }
            return await this._respond(this.interception.response);
          case "continue":
            return await this._continue(this.interception.requestOverrides);
        }
      }
      verifyInterception() {
        assert(this.interception.enabled, "Request Interception is not enabled!");
        assert(!this.interception.handled, "Request is already handled!");
      }
      async continue(overrides = {}, priority) {
        this.verifyInterception();
        if (!this.canBeIntercepted()) {
          return;
        }
        if (priority === void 0) {
          return await this._continue(overrides);
        }
        this.interception.requestOverrides = overrides;
        if (this.interception.resolutionState.priority === void 0 || priority > this.interception.resolutionState.priority) {
          this.interception.resolutionState = {
            action: InterceptResolutionAction.Continue,
            priority
          };
          return;
        }
        if (priority === this.interception.resolutionState.priority) {
          if (this.interception.resolutionState.action === "abort" || this.interception.resolutionState.action === "respond") {
            return;
          }
          this.interception.resolutionState.action = InterceptResolutionAction.Continue;
        }
        return;
      }
      async respond(response, priority) {
        this.verifyInterception();
        if (!this.canBeIntercepted()) {
          return;
        }
        if (priority === void 0) {
          return await this._respond(response);
        }
        this.interception.response = response;
        if (this.interception.resolutionState.priority === void 0 || priority > this.interception.resolutionState.priority) {
          this.interception.resolutionState = {
            action: InterceptResolutionAction.Respond,
            priority
          };
          return;
        }
        if (priority === this.interception.resolutionState.priority) {
          if (this.interception.resolutionState.action === "abort") {
            return;
          }
          this.interception.resolutionState.action = InterceptResolutionAction.Respond;
        }
      }
      async abort(errorCode = "failed", priority) {
        this.verifyInterception();
        if (!this.canBeIntercepted()) {
          return;
        }
        const errorReason = errorReasons[errorCode];
        assert(errorReason, "Unknown error code: " + errorCode);
        if (priority === void 0) {
          return await this._abort(errorReason);
        }
        this.interception.abortReason = errorReason;
        if (this.interception.resolutionState.priority === void 0 || priority >= this.interception.resolutionState.priority) {
          this.interception.resolutionState = {
            action: InterceptResolutionAction.Abort,
            priority
          };
          return;
        }
      }
      static getResponse(body) {
        const byteBody = isString(body) ? new TextEncoder().encode(body) : body;
        return {
          contentLength: byteBody.byteLength,
          base64: typedArrayToBase64(byteBody)
        };
      }
    };
    (function(InterceptResolutionAction2) {
      InterceptResolutionAction2["Abort"] = "abort";
      InterceptResolutionAction2["Respond"] = "respond";
      InterceptResolutionAction2["Continue"] = "continue";
      InterceptResolutionAction2["Disabled"] = "disabled";
      InterceptResolutionAction2["None"] = "none";
      InterceptResolutionAction2["AlreadyHandled"] = "already-handled";
    })(InterceptResolutionAction || (InterceptResolutionAction = {}));
    STATUS_TEXTS = {
      "100": "Continue",
      "101": "Switching Protocols",
      "102": "Processing",
      "103": "Early Hints",
      "200": "OK",
      "201": "Created",
      "202": "Accepted",
      "203": "Non-Authoritative Information",
      "204": "No Content",
      "205": "Reset Content",
      "206": "Partial Content",
      "207": "Multi-Status",
      "208": "Already Reported",
      "226": "IM Used",
      "300": "Multiple Choices",
      "301": "Moved Permanently",
      "302": "Found",
      "303": "See Other",
      "304": "Not Modified",
      "305": "Use Proxy",
      "306": "Switch Proxy",
      "307": "Temporary Redirect",
      "308": "Permanent Redirect",
      "400": "Bad Request",
      "401": "Unauthorized",
      "402": "Payment Required",
      "403": "Forbidden",
      "404": "Not Found",
      "405": "Method Not Allowed",
      "406": "Not Acceptable",
      "407": "Proxy Authentication Required",
      "408": "Request Timeout",
      "409": "Conflict",
      "410": "Gone",
      "411": "Length Required",
      "412": "Precondition Failed",
      "413": "Payload Too Large",
      "414": "URI Too Long",
      "415": "Unsupported Media Type",
      "416": "Range Not Satisfiable",
      "417": "Expectation Failed",
      "418": "I'm a teapot",
      "421": "Misdirected Request",
      "422": "Unprocessable Entity",
      "423": "Locked",
      "424": "Failed Dependency",
      "425": "Too Early",
      "426": "Upgrade Required",
      "428": "Precondition Required",
      "429": "Too Many Requests",
      "431": "Request Header Fields Too Large",
      "451": "Unavailable For Legal Reasons",
      "500": "Internal Server Error",
      "501": "Not Implemented",
      "502": "Bad Gateway",
      "503": "Service Unavailable",
      "504": "Gateway Timeout",
      "505": "HTTP Version Not Supported",
      "506": "Variant Also Negotiates",
      "507": "Insufficient Storage",
      "508": "Loop Detected",
      "510": "Not Extended",
      "511": "Network Authentication Required"
    };
    errorReasons = {
      aborted: "Aborted",
      accessdenied: "AccessDenied",
      addressunreachable: "AddressUnreachable",
      blockedbyclient: "BlockedByClient",
      blockedbyresponse: "BlockedByResponse",
      connectionaborted: "ConnectionAborted",
      connectionclosed: "ConnectionClosed",
      connectionfailed: "ConnectionFailed",
      connectionrefused: "ConnectionRefused",
      connectionreset: "ConnectionReset",
      internetdisconnected: "InternetDisconnected",
      namenotresolved: "NameNotResolved",
      timedout: "TimedOut",
      failed: "Failed"
    };
    HTTPResponse = class {
      constructor() {
      }
      ok() {
        const status = this.status();
        return status === 0 || status >= 200 && status <= 299;
      }
      async buffer() {
        const content = await this.content();
        return Buffer.from(content);
      }
      async text() {
        const content = await this.content();
        return new TextDecoder("utf-8", { fatal: true }).decode(content);
      }
      async json() {
        const content = await this.text();
        return JSON.parse(content);
      }
    };
    Keyboard = class {
      constructor() {
      }
    };
    MouseButton = Object.freeze({
      Left: "left",
      Right: "right",
      Middle: "middle",
      Back: "back",
      Forward: "forward"
    });
    Mouse = class {
      constructor() {
      }
    };
    Touchscreen = class {
      idGenerator = createIncrementalIdGenerator();
      touches = [];
      constructor() {
      }
      removeHandle(handle) {
        const index2 = this.touches.indexOf(handle);
        if (index2 === -1) {
          return;
        }
        this.touches.splice(index2, 1);
      }
      async tap(x, y) {
        const touch = await this.touchStart(x, y);
        await touch.end();
      }
      async touchMove(x, y) {
        const touch = this.touches[0];
        if (!touch) {
          throw new TouchError("Must start a new Touch first");
        }
        return await touch.move(x, y);
      }
      async touchEnd() {
        const touch = this.touches.shift();
        if (!touch) {
          throw new TouchError("Must start a new Touch first");
        }
        await touch.end();
      }
    };
    DEFAULT_TIMEOUT = 3e4;
    TimeoutSettings = class {
      #defaultTimeout;
      #defaultNavigationTimeout;
      constructor() {
        this.#defaultTimeout = null;
        this.#defaultNavigationTimeout = null;
      }
      setDefaultTimeout(timeout2) {
        this.#defaultTimeout = timeout2;
      }
      setDefaultNavigationTimeout(timeout2) {
        this.#defaultNavigationTimeout = timeout2;
      }
      navigationTimeout() {
        if (this.#defaultNavigationTimeout !== null) {
          return this.#defaultNavigationTimeout;
        }
        if (this.#defaultTimeout !== null) {
          return this.#defaultTimeout;
        }
        return DEFAULT_TIMEOUT;
      }
      timeout() {
        if (this.#defaultTimeout !== null) {
          return this.#defaultTimeout;
        }
        return DEFAULT_TIMEOUT;
      }
    };
    __runInitializers$5 = function(thisArg, initializers, value) {
      var useValue = arguments.length > 2;
      for (var i = 0; i < initializers.length; i++) {
        value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);
      }
      return useValue ? value : void 0;
    };
    __esDecorate$5 = function(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {
      function accept(f) {
        if (f !== void 0 && typeof f !== "function") throw new TypeError("Function expected");
        return f;
      }
      var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value";
      var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null;
      var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});
      var _, done = false;
      for (var i = decorators.length - 1; i >= 0; i--) {
        var context2 = {};
        for (var p in contextIn) context2[p] = p === "access" ? {} : contextIn[p];
        for (var p in contextIn.access) context2.access[p] = contextIn.access[p];
        context2.addInitializer = function(f) {
          if (done) throw new TypeError("Cannot add initializers after decoration has completed");
          extraInitializers.push(accept(f || null));
        };
        var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context2);
        if (kind === "accessor") {
          if (result === void 0) continue;
          if (result === null || typeof result !== "object") throw new TypeError("Object expected");
          if (_ = accept(result.get)) descriptor.get = _;
          if (_ = accept(result.set)) descriptor.set = _;
          if (_ = accept(result.init)) initializers.unshift(_);
        } else if (_ = accept(result)) {
          if (kind === "field") initializers.unshift(_);
          else descriptor[key] = _;
        }
      }
      if (target) Object.defineProperty(target, contextIn.name, descriptor);
      done = true;
    };
    __addDisposableResource$6 = function(env2, value, async2) {
      if (value !== null && value !== void 0) {
        if (typeof value !== "object" && typeof value !== "function") throw new TypeError("Object expected.");
        var dispose, inner;
        if (async2) {
          if (!Symbol.asyncDispose) throw new TypeError("Symbol.asyncDispose is not defined.");
          dispose = value[Symbol.asyncDispose];
        }
        if (dispose === void 0) {
          if (!Symbol.dispose) throw new TypeError("Symbol.dispose is not defined.");
          dispose = value[Symbol.dispose];
          if (async2) inner = dispose;
        }
        if (typeof dispose !== "function") throw new TypeError("Object not disposable.");
        if (inner) dispose = function() {
          try {
            inner.call(this);
          } catch (e) {
            return Promise.reject(e);
          }
        };
        env2.stack.push({ value, dispose, async: async2 });
      } else if (async2) {
        env2.stack.push({ async: true });
      }
      return value;
    };
    __disposeResources$6 = /* @__PURE__ */ function(SuppressedError2) {
      return function(env2) {
        function fail(e) {
          env2.error = env2.hasError ? new SuppressedError2(e, env2.error, "An error was suppressed during disposal.") : e;
          env2.hasError = true;
        }
        var r, s = 0;
        function next() {
          while (r = env2.stack.pop()) {
            try {
              if (!r.async && s === 1) return s = 0, env2.stack.push(r), Promise.resolve().then(next);
              if (r.dispose) {
                var result = r.dispose.call(r.value);
                if (r.async) return s |= 2, Promise.resolve(result).then(next, function(e) {
                  fail(e);
                  return next();
                });
              } else s |= 1;
            } catch (e) {
              fail(e);
            }
          }
          if (s === 1) return env2.hasError ? Promise.reject(env2.error) : Promise.resolve();
          if (env2.hasError) throw env2.error;
        }
        return next();
      };
    }(typeof SuppressedError === "function" ? SuppressedError : function(error, suppressed, message) {
      var e = new Error(message);
      return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
    });
    Page = (() => {
      let _classSuper = EventEmitter6;
      let _instanceExtraInitializers = [];
      let _screenshot_decorators;
      return class Page extends _classSuper {
        static {
          const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
          __esDecorate$5(this, null, _screenshot_decorators, { kind: "method", name: "screenshot", static: false, private: false, access: { has: (obj) => "screenshot" in obj, get: (obj) => obj.screenshot }, metadata: _metadata }, null, _instanceExtraInitializers);
          if (_metadata) Object.defineProperty(this, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
        }
        _isDragging = (__runInitializers$5(this, _instanceExtraInitializers), false);
        _timeoutSettings = new TimeoutSettings();
        _tabId = "";
        #requestHandlers = /* @__PURE__ */ new WeakMap();
        #inflight$ = new ReplaySubject(1);
        constructor() {
          super();
          fromEmitterEvent(this, "request").pipe(mergeMap((originalRequest) => {
            return concat(of(1), merge(fromEmitterEvent(this, "requestfailed"), fromEmitterEvent(this, "requestfinished"), fromEmitterEvent(this, "response").pipe(map((response) => {
              return response.request();
            }))).pipe(filter((request3) => {
              return request3.id === originalRequest.id;
            }), take(1), map(() => {
              return -1;
            })));
          }), mergeScan((acc, addend) => {
            return of(acc + addend);
          }, 0), takeUntil(fromEmitterEvent(this, "close")), startWith(0)).subscribe(this.#inflight$);
        }
        on(type2, handler) {
          if (type2 !== "request") {
            return super.on(type2, handler);
          }
          let wrapper = this.#requestHandlers.get(handler);
          if (wrapper === void 0) {
            wrapper = (event) => {
              event.enqueueInterceptAction(() => {
                return handler(event);
              });
            };
            this.#requestHandlers.set(handler, wrapper);
          }
          return super.on(type2, wrapper);
        }
        off(type2, handler) {
          if (type2 === "request") {
            handler = this.#requestHandlers.get(handler) || handler;
          }
          return super.off(type2, handler);
        }
        get accessibility() {
          return this.mainFrame().accessibility;
        }
        locator(input) {
          if (typeof input === "string") {
            return NodeLocator.create(this, input);
          } else {
            return FunctionLocator.create(this, input);
          }
        }
        locatorRace(locators) {
          return Locator.race(locators);
        }
        async $(selector) {
          return await this.mainFrame().$(selector);
        }
        async $$(selector, options2) {
          return await this.mainFrame().$$(selector, options2);
        }
        async evaluateHandle(pageFunction, ...args2) {
          pageFunction = withSourcePuppeteerURLIfNone(this.evaluateHandle.name, pageFunction);
          return await this.mainFrame().evaluateHandle(pageFunction, ...args2);
        }
        async $eval(selector, pageFunction, ...args2) {
          pageFunction = withSourcePuppeteerURLIfNone(this.$eval.name, pageFunction);
          return await this.mainFrame().$eval(selector, pageFunction, ...args2);
        }
        async $$eval(selector, pageFunction, ...args2) {
          pageFunction = withSourcePuppeteerURLIfNone(this.$$eval.name, pageFunction);
          return await this.mainFrame().$$eval(selector, pageFunction, ...args2);
        }
        async addScriptTag(options2) {
          return await this.mainFrame().addScriptTag(options2);
        }
        async addStyleTag(options2) {
          return await this.mainFrame().addStyleTag(options2);
        }
        url() {
          return this.mainFrame().url();
        }
        async content() {
          return await this.mainFrame().content();
        }
        async setContent(html2, options2) {
          await this.mainFrame().setContent(html2, options2);
        }
        async goto(url, options2) {
          return await this.mainFrame().goto(url, options2);
        }
        async waitForNavigation(options2 = {}) {
          return await this.mainFrame().waitForNavigation(options2);
        }
        waitForRequest(urlOrPredicate, options2 = {}) {
          const { timeout: ms2 = this._timeoutSettings.timeout(), signal } = options2;
          if (typeof urlOrPredicate === "string") {
            const url = urlOrPredicate;
            urlOrPredicate = (request3) => {
              return request3.url() === url;
            };
          }
          const observable$ = fromEmitterEvent(this, "request").pipe(filterAsync(urlOrPredicate), raceWith(timeout(ms2), fromAbortSignal(signal), fromEmitterEvent(this, "close").pipe(map(() => {
            throw new TargetCloseError("Page closed!");
          }))));
          return firstValueFrom(observable$);
        }
        waitForResponse(urlOrPredicate, options2 = {}) {
          const { timeout: ms2 = this._timeoutSettings.timeout(), signal } = options2;
          if (typeof urlOrPredicate === "string") {
            const url = urlOrPredicate;
            urlOrPredicate = (response) => {
              return response.url() === url;
            };
          }
          const observable$ = fromEmitterEvent(this, "response").pipe(filterAsync(urlOrPredicate), raceWith(timeout(ms2), fromAbortSignal(signal), fromEmitterEvent(this, "close").pipe(map(() => {
            throw new TargetCloseError("Page closed!");
          }))));
          return firstValueFrom(observable$);
        }
        waitForNetworkIdle(options2 = {}) {
          return firstValueFrom(this.waitForNetworkIdle$(options2));
        }
        waitForNetworkIdle$(options2 = {}) {
          const { timeout: ms2 = this._timeoutSettings.timeout(), idleTime = NETWORK_IDLE_TIME, concurrency = 0, signal } = options2;
          return this.#inflight$.pipe(map((inflight) => {
            return inflight > concurrency;
          }), distinctUntilChanged(), switchMap((isInflightOverConcurrency) => {
            if (isInflightOverConcurrency) {
              return EMPTY;
            }
            return timer(idleTime);
          }), map(() => {
          }), raceWith(timeout(ms2), fromAbortSignal(signal), fromEmitterEvent(this, "close").pipe(map(() => {
            throw new TargetCloseError("Page closed!");
          }))));
        }
        async waitForFrame(urlOrPredicate, options2 = {}) {
          const { timeout: ms2 = this.getDefaultTimeout(), signal } = options2;
          const predicate = isString(urlOrPredicate) ? (frame) => {
            return urlOrPredicate === frame.url();
          } : urlOrPredicate;
          return await firstValueFrom(merge(fromEmitterEvent(this, "frameattached"), fromEmitterEvent(this, "framenavigated"), from(this.frames())).pipe(filterAsync(predicate), first(), raceWith(timeout(ms2), fromAbortSignal(signal), fromEmitterEvent(this, "close").pipe(map(() => {
            throw new TargetCloseError("Page closed.");
          })))));
        }
        async emulate(device) {
          await Promise.all([
            this.setUserAgent({ userAgent: device.userAgent }),
            this.setViewport(device.viewport)
          ]);
        }
        async evaluate(pageFunction, ...args2) {
          pageFunction = withSourcePuppeteerURLIfNone(this.evaluate.name, pageFunction);
          return await this.mainFrame().evaluate(pageFunction, ...args2);
        }
        async _maybeWriteTypedArrayToFile(path14, typedArray) {
          if (!path14) {
            return;
          }
          await environment.value.fs.promises.writeFile(path14, typedArray);
        }
        async screencast(options2 = {}) {
          const ScreenRecorder2 = environment.value.ScreenRecorder;
          const [width, height, devicePixelRatio4] = await this.#getNativePixelDimensions();
          let crop;
          if (options2.crop) {
            const { x, y, width: cropWidth, height: cropHeight } = roundRectangle(normalizeRectangle(options2.crop));
            if (x < 0 || y < 0) {
              throw new Error(`\`crop.x\` and \`crop.y\` must be greater than or equal to 0.`);
            }
            if (cropWidth <= 0 || cropHeight <= 0) {
              throw new Error(`\`crop.height\` and \`crop.width\` must be greater than or equal to 0.`);
            }
            const viewportWidth = width / devicePixelRatio4;
            const viewportHeight = height / devicePixelRatio4;
            if (x + cropWidth > viewportWidth) {
              throw new Error(`\`crop.width\` cannot be larger than the viewport width (${viewportWidth}).`);
            }
            if (y + cropHeight > viewportHeight) {
              throw new Error(`\`crop.height\` cannot be larger than the viewport height (${viewportHeight}).`);
            }
            crop = {
              x: x * devicePixelRatio4,
              y: y * devicePixelRatio4,
              width: cropWidth * devicePixelRatio4,
              height: cropHeight * devicePixelRatio4
            };
          }
          if (options2.speed !== void 0 && options2.speed <= 0) {
            throw new Error(`\`speed\` must be greater than 0.`);
          }
          if (options2.scale !== void 0 && options2.scale <= 0) {
            throw new Error(`\`scale\` must be greater than 0.`);
          }
          const recorder = new ScreenRecorder2(this, width, height, {
            ...options2,
            crop
          });
          try {
            await this._startScreencast();
          } catch (error) {
            void recorder.stop();
            throw error;
          }
          if (options2.path) {
            const { createWriteStream } = environment.value.fs;
            const stream3 = createWriteStream(options2.path, "binary");
            recorder.pipe(stream3);
          }
          return recorder;
        }
        #screencastSessionCount = 0;
        #startScreencastPromise;
        async _startScreencast() {
          ++this.#screencastSessionCount;
          if (!this.#startScreencastPromise) {
            this.#startScreencastPromise = this.mainFrame().client.send("Page.startScreencast", { format: "png" }).then(() => {
              return new Promise((resolve2) => {
                return this.mainFrame().client.once("Page.screencastFrame", () => {
                  return resolve2();
                });
              });
            });
          }
          await this.#startScreencastPromise;
        }
        async _stopScreencast() {
          --this.#screencastSessionCount;
          if (!this.#startScreencastPromise) {
            return;
          }
          this.#startScreencastPromise = void 0;
          if (this.#screencastSessionCount === 0) {
            await this.mainFrame().client.send("Page.stopScreencast");
          }
        }
        async #getNativePixelDimensions() {
          const env_1 = { stack: [], error: void 0, hasError: false };
          try {
            const viewport = this.viewport();
            const stack = __addDisposableResource$6(env_1, new DisposableStack(), false);
            if (viewport && viewport.deviceScaleFactor !== 0) {
              await this.setViewport({ ...viewport, deviceScaleFactor: 0 });
              stack.defer(() => {
                void this.setViewport(viewport).catch(debugError);
              });
            }
            return await this.mainFrame().isolatedRealm().evaluate(() => {
              return [
                window.visualViewport.width * window.devicePixelRatio,
                window.visualViewport.height * window.devicePixelRatio,
                window.devicePixelRatio
              ];
            });
          } catch (e_1) {
            env_1.error = e_1;
            env_1.hasError = true;
          } finally {
            __disposeResources$6(env_1);
          }
        }
        async screenshot(userOptions = {}) {
          const env_2 = { stack: [], error: void 0, hasError: false };
          try {
            const _guard = __addDisposableResource$6(env_2, await this.browserContext().startScreenshot(), false);
            const options2 = {
              ...userOptions,
              clip: userOptions.clip ? {
                ...userOptions.clip
              } : void 0
            };
            if (options2.type === void 0 && options2.path !== void 0) {
              const filePath = options2.path;
              const extension2 = filePath.slice(filePath.lastIndexOf(".") + 1).toLowerCase();
              switch (extension2) {
                case "png":
                  options2.type = "png";
                  break;
                case "jpeg":
                case "jpg":
                  options2.type = "jpeg";
                  break;
                case "webp":
                  options2.type = "webp";
                  break;
              }
            }
            if (options2.quality !== void 0) {
              if (options2.quality < 0 || options2.quality > 100) {
                throw new Error(`Expected 'quality' (${options2.quality}) to be between 0 and 100, inclusive.`);
              }
              if (options2.type === void 0 || !["jpeg", "webp"].includes(options2.type)) {
                throw new Error(`${options2.type ?? "png"} screenshots do not support 'quality'.`);
              }
            }
            if (options2.clip) {
              if (options2.clip.width <= 0) {
                throw new Error("'width' in 'clip' must be positive.");
              }
              if (options2.clip.height <= 0) {
                throw new Error("'height' in 'clip' must be positive.");
              }
            }
            setDefaultScreenshotOptions(options2);
            const stack = __addDisposableResource$6(env_2, new AsyncDisposableStack(), true);
            if (options2.clip) {
              if (options2.fullPage) {
                throw new Error("'clip' and 'fullPage' are mutually exclusive");
              }
              options2.clip = roundRectangle(normalizeRectangle(options2.clip));
            } else {
              if (options2.fullPage) {
                if (!options2.captureBeyondViewport) {
                  const scrollDimensions = await this.mainFrame().isolatedRealm().evaluate(() => {
                    const element = document.documentElement;
                    return {
                      width: element.scrollWidth,
                      height: element.scrollHeight
                    };
                  });
                  const viewport = this.viewport();
                  await this.setViewport({
                    ...viewport,
                    ...scrollDimensions
                  });
                  stack.defer(async () => {
                    await this.setViewport(viewport).catch(debugError);
                  });
                }
              } else {
                options2.captureBeyondViewport = false;
              }
            }
            const data32 = await this._screenshot(options2);
            if (options2.encoding === "base64") {
              return data32;
            }
            const typedArray = stringToTypedArray(data32, true);
            await this._maybeWriteTypedArrayToFile(options2.path, typedArray);
            return typedArray;
          } catch (e_2) {
            env_2.error = e_2;
            env_2.hasError = true;
          } finally {
            const result_1 = __disposeResources$6(env_2);
            if (result_1)
              await result_1;
          }
        }
        async title() {
          return await this.mainFrame().title();
        }
        click(selector, options2) {
          return this.mainFrame().click(selector, options2);
        }
        focus(selector) {
          return this.mainFrame().focus(selector);
        }
        hover(selector) {
          return this.mainFrame().hover(selector);
        }
        select(selector, ...values) {
          return this.mainFrame().select(selector, ...values);
        }
        tap(selector) {
          return this.mainFrame().tap(selector);
        }
        type(selector, text, options2) {
          return this.mainFrame().type(selector, text, options2);
        }
        async waitForSelector(selector, options2 = {}) {
          return await this.mainFrame().waitForSelector(selector, options2);
        }
        waitForFunction(pageFunction, options2, ...args2) {
          return this.mainFrame().waitForFunction(pageFunction, options2, ...args2);
        }
        [(_screenshot_decorators = [guarded(function() {
          return this.browser();
        })], disposeSymbol)]() {
          return void this.close().catch(debugError);
        }
        [asyncDisposeSymbol]() {
          return this.close();
        }
      };
    })();
    WaitTask = class {
      #world;
      #polling;
      #root;
      #fn;
      #args;
      #timeout;
      #genericError = new Error("Waiting failed");
      #timeoutError;
      #result = Deferred.create();
      #poller;
      #signal;
      #reruns = [];
      constructor(world, options2, fn, ...args2) {
        this.#world = world;
        this.#polling = options2.polling;
        this.#root = options2.root;
        this.#signal = options2.signal;
        this.#signal?.addEventListener("abort", this.#onAbortSignal, {
          once: true
        });
        switch (typeof fn) {
          case "string":
            this.#fn = `() => {return (${fn});}`;
            break;
          default:
            this.#fn = stringifyFunction(fn);
            break;
        }
        this.#args = args2;
        this.#world.taskManager.add(this);
        if (options2.timeout) {
          this.#timeoutError = new TimeoutError$1(`Waiting failed: ${options2.timeout}ms exceeded`);
          this.#timeout = setTimeout(() => {
            void this.terminate(this.#timeoutError);
          }, options2.timeout);
        }
        void this.rerun();
      }
      get result() {
        return this.#result.valueOrThrow();
      }
      async rerun() {
        for (const prev of this.#reruns) {
          prev.abort();
        }
        this.#reruns.length = 0;
        const controller = new AbortController();
        this.#reruns.push(controller);
        try {
          switch (this.#polling) {
            case "raf":
              this.#poller = await this.#world.evaluateHandle(({ RAFPoller, createFunction: createFunction2 }, fn, ...args2) => {
                const fun = createFunction2(fn);
                return new RAFPoller(() => {
                  return fun(...args2);
                });
              }, LazyArg.create((context2) => {
                return context2.puppeteerUtil;
              }), this.#fn, ...this.#args);
              break;
            case "mutation":
              this.#poller = await this.#world.evaluateHandle(({ MutationPoller, createFunction: createFunction2 }, root2, fn, ...args2) => {
                const fun = createFunction2(fn);
                return new MutationPoller(() => {
                  return fun(...args2);
                }, root2 || document);
              }, LazyArg.create((context2) => {
                return context2.puppeteerUtil;
              }), this.#root, this.#fn, ...this.#args);
              break;
            default:
              this.#poller = await this.#world.evaluateHandle(({ IntervalPoller, createFunction: createFunction2 }, ms2, fn, ...args2) => {
                const fun = createFunction2(fn);
                return new IntervalPoller(() => {
                  return fun(...args2);
                }, ms2);
              }, LazyArg.create((context2) => {
                return context2.puppeteerUtil;
              }), this.#polling, this.#fn, ...this.#args);
              break;
          }
          await this.#poller.evaluate((poller) => {
            void poller.start();
          });
          const result = await this.#poller.evaluateHandle((poller) => {
            return poller.result();
          });
          this.#result.resolve(result);
          await this.terminate();
        } catch (error) {
          if (controller.signal.aborted) {
            return;
          }
          const badError = this.getBadError(error);
          if (badError) {
            this.#genericError.cause = badError;
            await this.terminate(this.#genericError);
          }
        }
      }
      async terminate(error) {
        this.#world.taskManager.delete(this);
        this.#signal?.removeEventListener("abort", this.#onAbortSignal);
        clearTimeout(this.#timeout);
        if (error && !this.#result.finished()) {
          this.#result.reject(error);
        }
        if (this.#poller) {
          try {
            await this.#poller.evaluate(async (poller) => {
              await poller.stop();
            });
            if (this.#poller) {
              await this.#poller.dispose();
              this.#poller = void 0;
            }
          } catch {
          }
        }
      }
      getBadError(error) {
        if (isErrorLike$1(error)) {
          if (error.message.includes("Execution context is not available in detached frame")) {
            return new Error("Waiting failed: Frame detached");
          }
          if (error.message.includes("Execution context was destroyed")) {
            return;
          }
          if (error.message.includes("Cannot find context with specified id")) {
            return;
          }
          if (error.message.includes("DiscardedBrowsingContextError")) {
            return;
          }
          return error;
        }
        return new Error("WaitTask failed with an error", {
          cause: error
        });
      }
      #onAbortSignal = () => {
        void this.terminate(this.#signal?.reason);
      };
    };
    TaskManager = class {
      #tasks = /* @__PURE__ */ new Set();
      add(task) {
        this.#tasks.add(task);
      }
      delete(task) {
        this.#tasks.delete(task);
      }
      terminateAll(error) {
        for (const task of this.#tasks) {
          void task.terminate(error);
        }
        this.#tasks.clear();
      }
      async rerunAll() {
        await Promise.all([...this.#tasks].map((task) => {
          return task.rerun();
        }));
      }
    };
    Realm = class {
      timeoutSettings;
      taskManager = new TaskManager();
      constructor(timeoutSettings) {
        this.timeoutSettings = timeoutSettings;
      }
      async waitForFunction(pageFunction, options2 = {}, ...args2) {
        const { polling = "raf", timeout: timeout2 = this.timeoutSettings.timeout(), root: root2, signal } = options2;
        if (typeof polling === "number" && polling < 0) {
          throw new Error("Cannot poll with non-positive interval");
        }
        const waitTask = new WaitTask(this, {
          polling,
          root: root2,
          timeout: timeout2,
          signal
        }, pageFunction, ...args2);
        return await waitTask.result;
      }
      get disposed() {
        return this.#disposed;
      }
      #disposed = false;
      dispose() {
        this.#disposed = true;
        this.taskManager.terminateAll(new Error("waitForFunction failed: frame got detached."));
      }
      [disposeSymbol]() {
        this.dispose();
      }
    };
    (function(TargetType2) {
      TargetType2["PAGE"] = "page";
      TargetType2["BACKGROUND_PAGE"] = "background_page";
      TargetType2["SERVICE_WORKER"] = "service_worker";
      TargetType2["SHARED_WORKER"] = "shared_worker";
      TargetType2["BROWSER"] = "browser";
      TargetType2["WEBVIEW"] = "webview";
      TargetType2["OTHER"] = "other";
      TargetType2["TAB"] = "tab";
    })(TargetType || (TargetType = {}));
    Target$1 = class Target {
      constructor() {
      }
      async worker() {
        return null;
      }
      async page() {
        return null;
      }
    };
    WebWorker$1 = class WebWorker extends EventEmitter6 {
      timeoutSettings = new TimeoutSettings();
      #url;
      constructor(url) {
        super();
        this.#url = url;
      }
      url() {
        return this.#url;
      }
      async evaluate(func, ...args2) {
        func = withSourcePuppeteerURLIfNone(this.evaluate.name, func);
        return await this.mainRealm().evaluate(func, ...args2);
      }
      async evaluateHandle(func, ...args2) {
        func = withSourcePuppeteerURLIfNone(this.evaluateHandle.name, func);
        return await this.mainRealm().evaluateHandle(func, ...args2);
      }
      async close() {
        throw new UnsupportedOperation("WebWorker.close() is not supported");
      }
    };
    __addDisposableResource$5 = function(env2, value, async2) {
      if (value !== null && value !== void 0) {
        if (typeof value !== "object" && typeof value !== "function") throw new TypeError("Object expected.");
        var dispose, inner;
        if (async2) {
          if (!Symbol.asyncDispose) throw new TypeError("Symbol.asyncDispose is not defined.");
          dispose = value[Symbol.asyncDispose];
        }
        if (dispose === void 0) {
          if (!Symbol.dispose) throw new TypeError("Symbol.dispose is not defined.");
          dispose = value[Symbol.dispose];
          if (async2) inner = dispose;
        }
        if (typeof dispose !== "function") throw new TypeError("Object not disposable.");
        if (inner) dispose = function() {
          try {
            inner.call(this);
          } catch (e) {
            return Promise.reject(e);
          }
        };
        env2.stack.push({ value, dispose, async: async2 });
      } else if (async2) {
        env2.stack.push({ async: true });
      }
      return value;
    };
    __disposeResources$5 = /* @__PURE__ */ function(SuppressedError2) {
      return function(env2) {
        function fail(e) {
          env2.error = env2.hasError ? new SuppressedError2(e, env2.error, "An error was suppressed during disposal.") : e;
          env2.hasError = true;
        }
        var r, s = 0;
        function next() {
          while (r = env2.stack.pop()) {
            try {
              if (!r.async && s === 1) return s = 0, env2.stack.push(r), Promise.resolve().then(next);
              if (r.dispose) {
                var result = r.dispose.call(r.value);
                if (r.async) return s |= 2, Promise.resolve(result).then(next, function(e) {
                  fail(e);
                  return next();
                });
              } else s |= 1;
            } catch (e) {
              fail(e);
            }
          }
          if (s === 1) return env2.hasError ? Promise.reject(env2.error) : Promise.resolve();
          if (env2.hasError) throw env2.error;
        }
        return next();
      };
    }(typeof SuppressedError === "function" ? SuppressedError : function(error, suppressed, message) {
      var e = new Error(message);
      return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
    });
    Accessibility2 = class {
      #realm;
      #frameId;
      constructor(realm, frameId = "") {
        this.#realm = realm;
        this.#frameId = frameId;
      }
      async snapshot(options2 = {}) {
        const { interestingOnly = true, root: root2 = null, includeIframes = false } = options2;
        const { nodes } = await this.#realm.environment.client.send("Accessibility.getFullAXTree", {
          frameId: this.#frameId
        });
        let backendNodeId;
        if (root2) {
          const { node: node2 } = await this.#realm.environment.client.send("DOM.describeNode", {
            objectId: root2.id
          });
          backendNodeId = node2.backendNodeId;
        }
        const defaultRoot = AXNode.createTree(this.#realm, nodes);
        const populateIframes = async (root3) => {
          if (root3.payload.role?.value === "Iframe") {
            const env_1 = { stack: [], error: void 0, hasError: false };
            try {
              if (!root3.payload.backendDOMNodeId) {
                return;
              }
              const handle = __addDisposableResource$5(env_1, await this.#realm.adoptBackendNode(root3.payload.backendDOMNodeId), false);
              if (!handle || !("contentFrame" in handle)) {
                return;
              }
              const frame = await handle.contentFrame();
              if (!frame) {
                return;
              }
              try {
                const iframeSnapshot = await frame.accessibility.snapshot(options2);
                root3.iframeSnapshot = iframeSnapshot ?? void 0;
              } catch (error) {
                debugError(error);
              }
            } catch (e_1) {
              env_1.error = e_1;
              env_1.hasError = true;
            } finally {
              __disposeResources$5(env_1);
            }
          }
          for (const child of root3.children) {
            await populateIframes(child);
          }
        };
        let needle = defaultRoot;
        if (!defaultRoot) {
          return null;
        }
        if (includeIframes) {
          await populateIframes(defaultRoot);
        }
        if (backendNodeId) {
          needle = defaultRoot.find((node2) => {
            return node2.payload.backendDOMNodeId === backendNodeId;
          });
        }
        if (!needle) {
          return null;
        }
        if (!interestingOnly) {
          return this.serializeTree(needle)[0] ?? null;
        }
        const interestingNodes = /* @__PURE__ */ new Set();
        this.collectInterestingNodes(interestingNodes, defaultRoot, false);
        return this.serializeTree(needle, interestingNodes)[0] ?? null;
      }
      serializeTree(node2, interestingNodes) {
        const children = [];
        for (const child of node2.children) {
          children.push(...this.serializeTree(child, interestingNodes));
        }
        if (interestingNodes && !interestingNodes.has(node2)) {
          return children;
        }
        const serializedNode = node2.serialize();
        if (children.length) {
          serializedNode.children = children;
        }
        if (node2.iframeSnapshot) {
          if (!serializedNode.children) {
            serializedNode.children = [];
          }
          serializedNode.children.push(node2.iframeSnapshot);
        }
        return [serializedNode];
      }
      collectInterestingNodes(collection, node2, insideControl) {
        if (node2.isInteresting(insideControl) || node2.iframeSnapshot) {
          collection.add(node2);
        }
        if (node2.isLeafNode()) {
          return;
        }
        insideControl = insideControl || node2.isControl();
        for (const child of node2.children) {
          this.collectInterestingNodes(collection, child, insideControl);
        }
      }
    };
    AXNode = class _AXNode {
      payload;
      children = [];
      iframeSnapshot;
      #richlyEditable = false;
      #editable = false;
      #focusable = false;
      #hidden = false;
      #busy = false;
      #modal = false;
      #hasErrormessage = false;
      #hasDetails = false;
      #name;
      #role;
      #description;
      #roledescription;
      #live;
      #ignored;
      #cachedHasFocusableChild;
      #realm;
      constructor(realm, payload) {
        this.payload = payload;
        this.#role = this.payload.role ? this.payload.role.value : "Unknown";
        this.#ignored = this.payload.ignored;
        this.#name = this.payload.name ? this.payload.name.value : "";
        this.#description = this.payload.description ? this.payload.description.value : void 0;
        this.#realm = realm;
        for (const property of this.payload.properties || []) {
          if (property.name === "editable") {
            this.#richlyEditable = property.value.value === "richtext";
            this.#editable = true;
          }
          if (property.name === "focusable") {
            this.#focusable = property.value.value;
          }
          if (property.name === "hidden") {
            this.#hidden = property.value.value;
          }
          if (property.name === "busy") {
            this.#busy = property.value.value;
          }
          if (property.name === "live") {
            this.#live = property.value.value;
          }
          if (property.name === "modal") {
            this.#modal = property.value.value;
          }
          if (property.name === "roledescription") {
            this.#roledescription = property.value.value;
          }
          if (property.name === "errormessage") {
            this.#hasErrormessage = true;
          }
          if (property.name === "details") {
            this.#hasDetails = true;
          }
        }
      }
      #isPlainTextField() {
        if (this.#richlyEditable) {
          return false;
        }
        if (this.#editable) {
          return true;
        }
        return this.#role === "textbox" || this.#role === "searchbox";
      }
      #isTextOnlyObject() {
        const role = this.#role;
        return role === "LineBreak" || role === "text" || role === "InlineTextBox" || role === "StaticText";
      }
      #hasFocusableChild() {
        if (this.#cachedHasFocusableChild === void 0) {
          this.#cachedHasFocusableChild = false;
          for (const child of this.children) {
            if (child.#focusable || child.#hasFocusableChild()) {
              this.#cachedHasFocusableChild = true;
              break;
            }
          }
        }
        return this.#cachedHasFocusableChild;
      }
      find(predicate) {
        if (predicate(this)) {
          return this;
        }
        for (const child of this.children) {
          const result = child.find(predicate);
          if (result) {
            return result;
          }
        }
        return null;
      }
      isLeafNode() {
        if (!this.children.length) {
          return true;
        }
        if (this.#isPlainTextField() || this.#isTextOnlyObject()) {
          return true;
        }
        switch (this.#role) {
          case "doc-cover":
          case "graphics-symbol":
          case "img":
          case "image":
          case "Meter":
          case "scrollbar":
          case "slider":
          case "separator":
          case "progressbar":
            return true;
        }
        if (this.#hasFocusableChild()) {
          return false;
        }
        if (this.#role === "heading" && this.#name) {
          return true;
        }
        return false;
      }
      isControl() {
        switch (this.#role) {
          case "button":
          case "checkbox":
          case "ColorWell":
          case "combobox":
          case "DisclosureTriangle":
          case "listbox":
          case "menu":
          case "menubar":
          case "menuitem":
          case "menuitemcheckbox":
          case "menuitemradio":
          case "radio":
          case "scrollbar":
          case "searchbox":
          case "slider":
          case "spinbutton":
          case "switch":
          case "tab":
          case "textbox":
          case "tree":
          case "treeitem":
            return true;
          default:
            return false;
        }
      }
      isLandmark() {
        switch (this.#role) {
          case "banner":
          case "complementary":
          case "contentinfo":
          case "form":
          case "main":
          case "navigation":
          case "region":
          case "search":
            return true;
          default:
            return false;
        }
      }
      isInteresting(insideControl) {
        const role = this.#role;
        if (role === "Ignored" || this.#hidden || this.#ignored) {
          return false;
        }
        if (this.isLandmark()) {
          return true;
        }
        if (this.#focusable || this.#richlyEditable || this.#busy || this.#live && this.#live !== "off" || this.#modal || this.#hasErrormessage || this.#hasDetails || this.#roledescription) {
          return true;
        }
        if (this.isControl()) {
          return true;
        }
        if (insideControl) {
          return false;
        }
        return this.isLeafNode() && (!!this.#name || !!this.#description);
      }
      serialize() {
        const properties2 = /* @__PURE__ */ new Map();
        for (const property of this.payload.properties || []) {
          properties2.set(property.name.toLowerCase(), property.value.value);
        }
        if (this.payload.name) {
          properties2.set("name", this.payload.name.value);
        }
        if (this.payload.value) {
          properties2.set("value", this.payload.value.value);
        }
        if (this.payload.description) {
          properties2.set("description", this.payload.description.value);
        }
        const node2 = {
          role: this.#role,
          elementHandle: async () => {
            const env_2 = { stack: [], error: void 0, hasError: false };
            try {
              if (!this.payload.backendDOMNodeId) {
                return null;
              }
              const handle = __addDisposableResource$5(env_2, await this.#realm.adoptBackendNode(this.payload.backendDOMNodeId), false);
              return await handle.evaluateHandle((node3) => {
                return node3.nodeType === Node.TEXT_NODE ? node3.parentElement : node3;
              });
            } catch (e_2) {
              env_2.error = e_2;
              env_2.hasError = true;
            } finally {
              __disposeResources$5(env_2);
            }
          },
          backendNodeId: this.payload.backendDOMNodeId,
          loaderId: this.#realm.environment._loaderId
        };
        const userStringProperties = [
          "name",
          "value",
          "description",
          "keyshortcuts",
          "roledescription",
          "valuetext",
          "url"
        ];
        const getUserStringPropertyValue = (key) => {
          return properties2.get(key);
        };
        for (const userStringProperty of userStringProperties) {
          if (!properties2.has(userStringProperty)) {
            continue;
          }
          node2[userStringProperty] = getUserStringPropertyValue(userStringProperty);
        }
        const booleanProperties = [
          "disabled",
          "expanded",
          "focused",
          "modal",
          "multiline",
          "multiselectable",
          "readonly",
          "required",
          "selected",
          "busy",
          "atomic"
        ];
        const getBooleanPropertyValue = (key) => {
          return !!properties2.get(key);
        };
        for (const booleanProperty of booleanProperties) {
          if (booleanProperty === "focused" && this.#role === "RootWebArea") {
            continue;
          }
          if (!properties2.has(booleanProperty)) {
            continue;
          }
          node2[booleanProperty] = getBooleanPropertyValue(booleanProperty);
        }
        const tristateProperties = ["checked", "pressed"];
        for (const tristateProperty of tristateProperties) {
          if (!properties2.has(tristateProperty)) {
            continue;
          }
          const value = properties2.get(tristateProperty);
          node2[tristateProperty] = value === "mixed" ? "mixed" : value === "true" ? true : false;
        }
        const numericalProperties = [
          "level",
          "valuemax",
          "valuemin"
        ];
        const getNumericalPropertyValue = (key) => {
          return properties2.get(key);
        };
        for (const numericalProperty of numericalProperties) {
          if (!properties2.has(numericalProperty)) {
            continue;
          }
          node2[numericalProperty] = getNumericalPropertyValue(numericalProperty);
        }
        const tokenProperties = [
          "autocomplete",
          "haspopup",
          "invalid",
          "orientation",
          "live",
          "relevant",
          "errormessage",
          "details"
        ];
        const getTokenPropertyValue = (key) => {
          return properties2.get(key);
        };
        for (const tokenProperty of tokenProperties) {
          const value = getTokenPropertyValue(tokenProperty);
          if (!value || value === "false") {
            continue;
          }
          node2[tokenProperty] = getTokenPropertyValue(tokenProperty);
        }
        return node2;
      }
      static createTree(realm, payloads) {
        const nodeById = /* @__PURE__ */ new Map();
        for (const payload of payloads) {
          nodeById.set(payload.nodeId, new _AXNode(realm, payload));
        }
        for (const node2 of nodeById.values()) {
          for (const childId of node2.payload.childIds || []) {
            const child = nodeById.get(childId);
            if (child) {
              node2.children.push(child);
            }
          }
        }
        return nodeById.values().next().value ?? null;
      }
    };
    __addDisposableResource$4 = function(env2, value, async2) {
      if (value !== null && value !== void 0) {
        if (typeof value !== "object" && typeof value !== "function") throw new TypeError("Object expected.");
        var dispose, inner;
        if (async2) {
          if (!Symbol.asyncDispose) throw new TypeError("Symbol.asyncDispose is not defined.");
          dispose = value[Symbol.asyncDispose];
        }
        if (dispose === void 0) {
          if (!Symbol.dispose) throw new TypeError("Symbol.dispose is not defined.");
          dispose = value[Symbol.dispose];
          if (async2) inner = dispose;
        }
        if (typeof dispose !== "function") throw new TypeError("Object not disposable.");
        if (inner) dispose = function() {
          try {
            inner.call(this);
          } catch (e) {
            return Promise.reject(e);
          }
        };
        env2.stack.push({ value, dispose, async: async2 });
      } else if (async2) {
        env2.stack.push({ async: true });
      }
      return value;
    };
    __disposeResources$4 = /* @__PURE__ */ function(SuppressedError2) {
      return function(env2) {
        function fail(e) {
          env2.error = env2.hasError ? new SuppressedError2(e, env2.error, "An error was suppressed during disposal.") : e;
          env2.hasError = true;
        }
        var r, s = 0;
        function next() {
          while (r = env2.stack.pop()) {
            try {
              if (!r.async && s === 1) return s = 0, env2.stack.push(r), Promise.resolve().then(next);
              if (r.dispose) {
                var result = r.dispose.call(r.value);
                if (r.async) return s |= 2, Promise.resolve(result).then(next, function(e) {
                  fail(e);
                  return next();
                });
              } else s |= 1;
            } catch (e) {
              fail(e);
            }
          }
          if (s === 1) return env2.hasError ? Promise.reject(env2.error) : Promise.resolve();
          if (env2.hasError) throw env2.error;
        }
        return next();
      };
    }(typeof SuppressedError === "function" ? SuppressedError : function(error, suppressed, message) {
      var e = new Error(message);
      return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
    });
    Binding$2 = class Binding {
      #name;
      #fn;
      #initSource;
      constructor(name, fn, initSource) {
        this.#name = name;
        this.#fn = fn;
        this.#initSource = initSource;
      }
      get name() {
        return this.#name;
      }
      get initSource() {
        return this.#initSource;
      }
      async run(context2, id2, args2, isTrivial) {
        const stack = new DisposableStack();
        try {
          if (!isTrivial) {
            const env_1 = { stack: [], error: void 0, hasError: false };
            try {
              const handles = __addDisposableResource$4(env_1, await context2.evaluateHandle((name, seq) => {
                return globalThis[name].args.get(seq);
              }, this.#name, id2), false);
              const properties2 = await handles.getProperties();
              for (const [index2, handle] of properties2) {
                if (index2 in args2) {
                  switch (handle.remoteObject().subtype) {
                    case "node":
                      args2[+index2] = handle;
                      break;
                    default:
                      stack.use(handle);
                  }
                } else {
                  stack.use(handle);
                }
              }
            } catch (e_1) {
              env_1.error = e_1;
              env_1.hasError = true;
            } finally {
              __disposeResources$4(env_1);
            }
          }
          await context2.evaluate((name, seq, result) => {
            const callbacks = globalThis[name].callbacks;
            callbacks.get(seq).resolve(result);
            callbacks.delete(seq);
          }, this.#name, id2, await this.#fn(...args2));
          for (const arg of args2) {
            if (arg instanceof JSHandle) {
              stack.use(arg);
            }
          }
        } catch (error) {
          if (isErrorLike$1(error)) {
            await context2.evaluate((name, seq, message, stack2) => {
              const error2 = new Error(message);
              error2.stack = stack2;
              const callbacks = globalThis[name].callbacks;
              callbacks.get(seq).reject(error2);
              callbacks.delete(seq);
            }, this.#name, id2, error.message, error.stack).catch(debugError);
          } else {
            await context2.evaluate((name, seq, error2) => {
              const callbacks = globalThis[name].callbacks;
              callbacks.get(seq).reject(error2);
              callbacks.delete(seq);
            }, this.#name, id2, error).catch(debugError);
          }
        }
      }
    };
    CdpBluetoothEmulation = class {
      #connection;
      constructor(connection) {
        this.#connection = connection;
      }
      async emulateAdapter(state, leSupported = true) {
        await this.#connection.send("BluetoothEmulation.disable");
        await this.#connection.send("BluetoothEmulation.enable", {
          state,
          leSupported
        });
      }
      async disableEmulation() {
        await this.#connection.send("BluetoothEmulation.disable");
      }
      async simulatePreconnectedPeripheral(preconnectedPeripheral) {
        await this.#connection.send("BluetoothEmulation.simulatePreconnectedPeripheral", preconnectedPeripheral);
      }
    };
    ConsoleMessage$1 = class ConsoleMessage {
      #type;
      #text;
      #args;
      #stackTraceLocations;
      #frame;
      #rawStackTrace;
      #targetId;
      constructor(type2, text, args2, stackTraceLocations, frame, rawStackTrace, targetId) {
        this.#type = type2;
        this.#text = text;
        this.#args = args2;
        this.#stackTraceLocations = stackTraceLocations;
        this.#frame = frame;
        this.#rawStackTrace = rawStackTrace;
        this.#targetId = targetId;
      }
      type() {
        return this.#type;
      }
      text() {
        return this.#text;
      }
      args() {
        return this.#args;
      }
      location() {
        return this.#stackTraceLocations[0] ?? (this.#frame ? { url: this.#frame.url() } : {});
      }
      stackTrace() {
        return this.#stackTraceLocations;
      }
      _rawStackTrace() {
        return this.#rawStackTrace;
      }
      _targetId() {
        return this.#targetId;
      }
    };
    FileChooser = class {
      #element;
      #multiple;
      #handled = false;
      constructor(element, multiple) {
        this.#element = element;
        this.#multiple = multiple;
      }
      isMultiple() {
        return this.#multiple;
      }
      async accept(paths) {
        assert(!this.#handled, "Cannot accept FileChooser which is already handled!");
        this.#handled = true;
        await this.#element.uploadFile(...paths);
      }
      async cancel() {
        assert(!this.#handled, "Cannot cancel FileChooser which is already handled!");
        this.#handled = true;
        await this.#element.evaluate((element) => {
          element.dispatchEvent(new Event("cancel", { bubbles: true }));
        });
      }
    };
    (function(NetworkManagerEvent2) {
      NetworkManagerEvent2.Request = Symbol("NetworkManager.Request");
      NetworkManagerEvent2.RequestServedFromCache = Symbol("NetworkManager.RequestServedFromCache");
      NetworkManagerEvent2.Response = Symbol("NetworkManager.Response");
      NetworkManagerEvent2.RequestFailed = Symbol("NetworkManager.RequestFailed");
      NetworkManagerEvent2.RequestFinished = Symbol("NetworkManager.RequestFinished");
    })(NetworkManagerEvent || (NetworkManagerEvent = {}));
    CallbackRegistry = class {
      #callbacks = /* @__PURE__ */ new Map();
      #idGenerator;
      constructor(idGenerator) {
        this.#idGenerator = idGenerator;
      }
      create(label, timeout2, request3) {
        const callback = new Callback(this.#idGenerator(), label, timeout2);
        this.#callbacks.set(callback.id, callback);
        try {
          request3(callback.id);
        } catch (error) {
          callback.promise.catch(debugError).finally(() => {
            this.#callbacks.delete(callback.id);
          });
          callback.reject(error);
          throw error;
        }
        return callback.promise.finally(() => {
          this.#callbacks.delete(callback.id);
        });
      }
      reject(id2, message, originalMessage) {
        const callback = this.#callbacks.get(id2);
        if (!callback) {
          return;
        }
        this._reject(callback, message, originalMessage);
      }
      rejectRaw(id2, error) {
        const callback = this.#callbacks.get(id2);
        if (!callback) {
          return;
        }
        callback.reject(error);
      }
      _reject(callback, errorMessage, originalMessage) {
        let error;
        let message;
        if (errorMessage instanceof ProtocolError) {
          error = errorMessage;
          error.cause = callback.error;
          message = errorMessage.message;
        } else {
          error = callback.error;
          message = errorMessage;
        }
        callback.reject(rewriteError$1(error, `Protocol error (${callback.label}): ${message}`, originalMessage));
      }
      resolve(id2, value) {
        const callback = this.#callbacks.get(id2);
        if (!callback) {
          return;
        }
        callback.resolve(value);
      }
      clear() {
        for (const callback of this.#callbacks.values()) {
          this._reject(callback, new TargetCloseError("Target closed"));
        }
        this.#callbacks.clear();
      }
      getPendingProtocolErrors() {
        const result = [];
        for (const callback of this.#callbacks.values()) {
          result.push(new Error(`${callback.label} timed out. Trace: ${callback.error.stack}`));
        }
        return result;
      }
    };
    Callback = class {
      #id;
      #error = new ProtocolError();
      #deferred = Deferred.create();
      #timer;
      #label;
      constructor(id2, label, timeout2) {
        this.#id = id2;
        this.#label = label;
        if (timeout2) {
          this.#timer = setTimeout(() => {
            this.#deferred.reject(rewriteError$1(this.#error, `${label} timed out. Increase the 'protocolTimeout' setting in launch/connect calls for a higher timeout if needed.`));
          }, timeout2);
        }
      }
      resolve(value) {
        clearTimeout(this.#timer);
        this.#deferred.resolve(value);
      }
      reject(error) {
        clearTimeout(this.#timer);
        this.#deferred.reject(error);
      }
      get id() {
        return this.#id;
      }
      get promise() {
        return this.#deferred.valueOrThrow();
      }
      get error() {
        return this.#error;
      }
      get label() {
        return this.#label;
      }
    };
    CdpCDPSession = class extends CDPSession {
      #sessionId;
      #targetType;
      #callbacks;
      #connection;
      #parentSessionId;
      #target;
      #rawErrors = false;
      #detached = false;
      constructor(connection, targetType, sessionId, parentSessionId, rawErrors) {
        super();
        this.#connection = connection;
        this.#targetType = targetType;
        this.#callbacks = new CallbackRegistry(connection._idGenerator);
        this.#sessionId = sessionId;
        this.#parentSessionId = parentSessionId;
        this.#rawErrors = rawErrors;
      }
      setTarget(target) {
        this.#target = target;
      }
      target() {
        assert(this.#target, "Target must exist");
        return this.#target;
      }
      connection() {
        return this.#connection;
      }
      get detached() {
        return this.#connection._closed || this.#detached;
      }
      parentSession() {
        if (!this.#parentSessionId) {
          return this;
        }
        const parent = this.#connection?.session(this.#parentSessionId);
        return parent ?? void 0;
      }
      send(method, params, options2) {
        if (this.detached) {
          return Promise.reject(new TargetCloseError(`Protocol error (${method}): Session closed. Most likely the ${this.#targetType} has been closed.`));
        }
        return this.#connection._rawSend(this.#callbacks, method, params, this.#sessionId, options2);
      }
      onMessage(object2) {
        if (object2.id) {
          if (object2.error) {
            if (this.#rawErrors) {
              this.#callbacks.rejectRaw(object2.id, object2.error);
            } else {
              this.#callbacks.reject(object2.id, createProtocolErrorMessage(object2), object2.error.message);
            }
          } else {
            this.#callbacks.resolve(object2.id, object2.result);
          }
        } else {
          assert(!object2.id);
          this.emit(object2.method, object2.params);
        }
      }
      async detach() {
        if (this.detached) {
          throw new Error(`Session already detached. Most likely the ${this.#targetType} has been closed.`);
        }
        await this.#connection.send("Target.detachFromTarget", {
          sessionId: this.#sessionId
        });
        this.#detached = true;
      }
      onClosed() {
        this.#callbacks.clear();
        this.#detached = true;
        this.emit(CDPSessionEvent.Disconnected, void 0);
      }
      id() {
        return this.#sessionId;
      }
      getPendingProtocolErrors() {
        return this.#callbacks.getPendingProtocolErrors();
      }
    };
    debugProtocolSend = debug$1("puppeteer:protocol:SEND \u25BA");
    debugProtocolReceive = debug$1("puppeteer:protocol:RECV \u25C0");
    Connection = class extends EventEmitter6 {
      #url;
      #transport;
      #delay;
      #timeout;
      #sessions = /* @__PURE__ */ new Map();
      #closed = false;
      #manuallyAttached = /* @__PURE__ */ new Set();
      #callbacks;
      #rawErrors = false;
      #idGenerator;
      constructor(url, transport2, delay = 0, timeout2, rawErrors = false, idGenerator = createIncrementalIdGenerator()) {
        super();
        this.#rawErrors = rawErrors;
        this.#idGenerator = idGenerator;
        this.#callbacks = new CallbackRegistry(idGenerator);
        this.#url = url;
        this.#delay = delay;
        this.#timeout = timeout2 ?? 18e4;
        this.#transport = transport2;
        this.#transport.onmessage = this.onMessage.bind(this);
        this.#transport.onclose = this.#onClose.bind(this);
      }
      static fromSession(session) {
        return session.connection();
      }
      get delay() {
        return this.#delay;
      }
      get timeout() {
        return this.#timeout;
      }
      get _closed() {
        return this.#closed;
      }
      get _idGenerator() {
        return this.#idGenerator;
      }
      get _sessions() {
        return this.#sessions;
      }
      _session(sessionId) {
        return this.#sessions.get(sessionId) || null;
      }
      session(sessionId) {
        return this._session(sessionId);
      }
      url() {
        return this.#url;
      }
      send(method, params, options2) {
        return this._rawSend(this.#callbacks, method, params, void 0, options2);
      }
      _rawSend(callbacks, method, params, sessionId, options2) {
        if (this.#closed) {
          return Promise.reject(new ConnectionClosedError("Connection closed."));
        }
        return callbacks.create(method, options2?.timeout ?? this.#timeout, (id2) => {
          const stringifiedMessage = JSON.stringify({
            method,
            params,
            id: id2,
            sessionId
          });
          debugProtocolSend(stringifiedMessage);
          this.#transport.send(stringifiedMessage);
        });
      }
      async closeBrowser() {
        await this.send("Browser.close");
      }
      async onMessage(message) {
        if (this.#delay) {
          await new Promise((r) => {
            return setTimeout(r, this.#delay);
          });
        }
        debugProtocolReceive(message);
        const object2 = JSON.parse(message);
        if (object2.method === "Target.attachedToTarget") {
          const sessionId = object2.params.sessionId;
          const session = new CdpCDPSession(this, object2.params.targetInfo.type, sessionId, object2.sessionId, this.#rawErrors);
          this.#sessions.set(sessionId, session);
          this.emit(CDPSessionEvent.SessionAttached, session);
          const parentSession = this.#sessions.get(object2.sessionId);
          if (parentSession) {
            parentSession.emit(CDPSessionEvent.SessionAttached, session);
          }
        } else if (object2.method === "Target.detachedFromTarget") {
          const session = this.#sessions.get(object2.params.sessionId);
          if (session) {
            session.onClosed();
            this.#sessions.delete(object2.params.sessionId);
            this.emit(CDPSessionEvent.SessionDetached, session);
            const parentSession = this.#sessions.get(object2.sessionId);
            if (parentSession) {
              parentSession.emit(CDPSessionEvent.SessionDetached, session);
            }
          }
        }
        if (object2.sessionId) {
          const session = this.#sessions.get(object2.sessionId);
          if (session) {
            session.onMessage(object2);
          }
        } else if (object2.id) {
          if (object2.error) {
            if (this.#rawErrors) {
              this.#callbacks.rejectRaw(object2.id, object2.error);
            } else {
              this.#callbacks.reject(object2.id, createProtocolErrorMessage(object2), object2.error.message);
            }
          } else {
            this.#callbacks.resolve(object2.id, object2.result);
          }
        } else {
          this.emit(object2.method, object2.params);
        }
      }
      #onClose() {
        if (this.#closed) {
          return;
        }
        this.#closed = true;
        this.#transport.onmessage = void 0;
        this.#transport.onclose = void 0;
        this.#callbacks.clear();
        for (const session of this.#sessions.values()) {
          session.onClosed();
        }
        this.#sessions.clear();
        this.emit(CDPSessionEvent.Disconnected, void 0);
      }
      dispose() {
        this.#onClose();
        this.#transport.close();
      }
      isAutoAttached(targetId) {
        return !this.#manuallyAttached.has(targetId);
      }
      async _createSession(targetInfo, isAutoAttachEmulated = true) {
        if (!isAutoAttachEmulated) {
          this.#manuallyAttached.add(targetInfo.targetId);
        }
        const { sessionId } = await this.send("Target.attachToTarget", {
          targetId: targetInfo.targetId,
          flatten: true
        });
        this.#manuallyAttached.delete(targetInfo.targetId);
        const session = this.#sessions.get(sessionId);
        if (!session) {
          throw new Error("CDPSession creation failed.");
        }
        return session;
      }
      async createSession(targetInfo) {
        return await this._createSession(targetInfo, false);
      }
      getPendingProtocolErrors() {
        const result = [];
        result.push(...this.#callbacks.getPendingProtocolErrors());
        for (const session of this.#sessions.values()) {
          result.push(...session.getPendingProtocolErrors());
        }
        return result;
      }
    };
    Coverage = class {
      #jsCoverage;
      #cssCoverage;
      constructor(client) {
        this.#jsCoverage = new JSCoverage(client);
        this.#cssCoverage = new CSSCoverage(client);
      }
      updateClient(client) {
        this.#jsCoverage.updateClient(client);
        this.#cssCoverage.updateClient(client);
      }
      async startJSCoverage(options2 = {}) {
        return await this.#jsCoverage.start(options2);
      }
      async stopJSCoverage() {
        return await this.#jsCoverage.stop();
      }
      async startCSSCoverage(options2 = {}) {
        return await this.#cssCoverage.start(options2);
      }
      async stopCSSCoverage() {
        return await this.#cssCoverage.stop();
      }
    };
    JSCoverage = class {
      #client;
      #enabled = false;
      #scriptURLs = /* @__PURE__ */ new Map();
      #scriptSources = /* @__PURE__ */ new Map();
      #subscriptions;
      #resetOnNavigation = false;
      #reportAnonymousScripts = false;
      #includeRawScriptCoverage = false;
      constructor(client) {
        this.#client = client;
      }
      updateClient(client) {
        this.#client = client;
      }
      async start(options2 = {}) {
        assert(!this.#enabled, "JSCoverage is already enabled");
        const { resetOnNavigation = true, reportAnonymousScripts = false, includeRawScriptCoverage = false, useBlockCoverage = true } = options2;
        this.#resetOnNavigation = resetOnNavigation;
        this.#reportAnonymousScripts = reportAnonymousScripts;
        this.#includeRawScriptCoverage = includeRawScriptCoverage;
        this.#enabled = true;
        this.#scriptURLs.clear();
        this.#scriptSources.clear();
        this.#subscriptions = new DisposableStack();
        const clientEmitter = this.#subscriptions.use(new EventEmitter6(this.#client));
        clientEmitter.on("Debugger.scriptParsed", this.#onScriptParsed.bind(this));
        clientEmitter.on("Runtime.executionContextsCleared", this.#onExecutionContextsCleared.bind(this));
        await Promise.all([
          this.#client.send("Profiler.enable"),
          this.#client.send("Profiler.startPreciseCoverage", {
            callCount: this.#includeRawScriptCoverage,
            detailed: useBlockCoverage
          }),
          this.#client.send("Debugger.enable"),
          this.#client.send("Debugger.setSkipAllPauses", { skip: true })
        ]);
      }
      #onExecutionContextsCleared() {
        if (!this.#resetOnNavigation) {
          return;
        }
        this.#scriptURLs.clear();
        this.#scriptSources.clear();
      }
      async #onScriptParsed(event) {
        if (PuppeteerURL.isPuppeteerURL(event.url)) {
          return;
        }
        if (!event.url && !this.#reportAnonymousScripts) {
          return;
        }
        try {
          const response = await this.#client.send("Debugger.getScriptSource", {
            scriptId: event.scriptId
          });
          this.#scriptURLs.set(event.scriptId, event.url);
          this.#scriptSources.set(event.scriptId, response.scriptSource);
        } catch (error) {
          debugError(error);
        }
      }
      async stop() {
        assert(this.#enabled, "JSCoverage is not enabled");
        this.#enabled = false;
        const result = await Promise.all([
          this.#client.send("Profiler.takePreciseCoverage"),
          this.#client.send("Profiler.stopPreciseCoverage"),
          this.#client.send("Profiler.disable"),
          this.#client.send("Debugger.disable")
        ]);
        this.#subscriptions?.dispose();
        const coverage = [];
        const profileResponse = result[0];
        for (const entry of profileResponse.result) {
          let url = this.#scriptURLs.get(entry.scriptId);
          if (!url && this.#reportAnonymousScripts) {
            url = "debugger://VM" + entry.scriptId;
          }
          const text = this.#scriptSources.get(entry.scriptId);
          if (text === void 0 || url === void 0) {
            continue;
          }
          const flattenRanges = [];
          for (const func of entry.functions) {
            flattenRanges.push(...func.ranges);
          }
          const ranges = convertToDisjointRanges(flattenRanges);
          if (!this.#includeRawScriptCoverage) {
            coverage.push({ url, ranges, text });
          } else {
            coverage.push({ url, ranges, text, rawScriptCoverage: entry });
          }
        }
        return coverage;
      }
    };
    CSSCoverage = class {
      #client;
      #enabled = false;
      #stylesheetURLs = /* @__PURE__ */ new Map();
      #stylesheetSources = /* @__PURE__ */ new Map();
      #eventListeners;
      #resetOnNavigation = false;
      constructor(client) {
        this.#client = client;
      }
      updateClient(client) {
        this.#client = client;
      }
      async start(options2 = {}) {
        assert(!this.#enabled, "CSSCoverage is already enabled");
        const { resetOnNavigation = true } = options2;
        this.#resetOnNavigation = resetOnNavigation;
        this.#enabled = true;
        this.#stylesheetURLs.clear();
        this.#stylesheetSources.clear();
        this.#eventListeners = new DisposableStack();
        const clientEmitter = this.#eventListeners.use(new EventEmitter6(this.#client));
        clientEmitter.on("CSS.styleSheetAdded", this.#onStyleSheet.bind(this));
        clientEmitter.on("Runtime.executionContextsCleared", this.#onExecutionContextsCleared.bind(this));
        await Promise.all([
          this.#client.send("DOM.enable"),
          this.#client.send("CSS.enable"),
          this.#client.send("CSS.startRuleUsageTracking")
        ]);
      }
      #onExecutionContextsCleared() {
        if (!this.#resetOnNavigation) {
          return;
        }
        this.#stylesheetURLs.clear();
        this.#stylesheetSources.clear();
      }
      async #onStyleSheet(event) {
        const header = event.header;
        if (!header.sourceURL) {
          return;
        }
        try {
          const response = await this.#client.send("CSS.getStyleSheetText", {
            styleSheetId: header.styleSheetId
          });
          this.#stylesheetURLs.set(header.styleSheetId, header.sourceURL);
          this.#stylesheetSources.set(header.styleSheetId, response.text);
        } catch (error) {
          debugError(error);
        }
      }
      async stop() {
        assert(this.#enabled, "CSSCoverage is not enabled");
        this.#enabled = false;
        const ruleTrackingResponse = await this.#client.send("CSS.stopRuleUsageTracking");
        await Promise.all([
          this.#client.send("CSS.disable"),
          this.#client.send("DOM.disable")
        ]);
        this.#eventListeners?.dispose();
        const styleSheetIdToCoverage = /* @__PURE__ */ new Map();
        for (const entry of ruleTrackingResponse.ruleUsage) {
          let ranges = styleSheetIdToCoverage.get(entry.styleSheetId);
          if (!ranges) {
            ranges = [];
            styleSheetIdToCoverage.set(entry.styleSheetId, ranges);
          }
          ranges.push({
            startOffset: entry.startOffset,
            endOffset: entry.endOffset,
            count: entry.used ? 1 : 0
          });
        }
        const coverage = [];
        for (const styleSheetId of this.#stylesheetURLs.keys()) {
          const url = this.#stylesheetURLs.get(styleSheetId);
          assert(typeof url !== "undefined", `Stylesheet URL is undefined (styleSheetId=${styleSheetId})`);
          const text = this.#stylesheetSources.get(styleSheetId);
          assert(typeof text !== "undefined", `Stylesheet text is undefined (styleSheetId=${styleSheetId})`);
          const ranges = convertToDisjointRanges(styleSheetIdToCoverage.get(styleSheetId) || []);
          coverage.push({ url, ranges, text });
        }
        return coverage;
      }
    };
    CdpDialog = class extends Dialog {
      #client;
      constructor(client, type2, message, defaultValue = "") {
        super(type2, message, defaultValue);
        this.#client = client;
      }
      async handle(options2) {
        await this.#client.send("Page.handleJavaScriptDialog", {
          accept: options2.accept,
          promptText: options2.text
        });
      }
    };
    __runInitializers$4 = function(thisArg, initializers, value) {
      var useValue = arguments.length > 2;
      for (var i = 0; i < initializers.length; i++) {
        value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);
      }
      return useValue ? value : void 0;
    };
    __esDecorate$4 = function(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {
      function accept(f) {
        if (f !== void 0 && typeof f !== "function") throw new TypeError("Function expected");
        return f;
      }
      var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value";
      var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null;
      var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});
      var _, done = false;
      for (var i = decorators.length - 1; i >= 0; i--) {
        var context2 = {};
        for (var p in contextIn) context2[p] = p === "access" ? {} : contextIn[p];
        for (var p in contextIn.access) context2.access[p] = contextIn.access[p];
        context2.addInitializer = function(f) {
          if (done) throw new TypeError("Cannot add initializers after decoration has completed");
          extraInitializers.push(accept(f || null));
        };
        var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context2);
        if (kind === "accessor") {
          if (result === void 0) continue;
          if (result === null || typeof result !== "object") throw new TypeError("Object expected");
          if (_ = accept(result.get)) descriptor.get = _;
          if (_ = accept(result.set)) descriptor.set = _;
          if (_ = accept(result.init)) initializers.unshift(_);
        } else if (_ = accept(result)) {
          if (kind === "field") initializers.unshift(_);
          else descriptor[key] = _;
        }
      }
      if (target) Object.defineProperty(target, contextIn.name, descriptor);
      done = true;
    };
    __setFunctionName$2 = function(f, name, prefix) {
      if (typeof name === "symbol") name = name.description ? "[".concat(name.description, "]") : "";
      return Object.defineProperty(f, "name", { configurable: true, value: prefix ? "".concat(prefix, " ", name) : name });
    };
    EmulatedState = class {
      #state;
      #clientProvider;
      #updater;
      constructor(initialState, clientProvider, updater) {
        this.#state = initialState;
        this.#clientProvider = clientProvider;
        this.#updater = updater;
        this.#clientProvider.registerState(this);
      }
      async setState(state) {
        this.#state = state;
        await this.sync();
      }
      get state() {
        return this.#state;
      }
      async sync() {
        await Promise.all(this.#clientProvider.clients().map((client) => {
          return this.#updater(client, this.#state);
        }));
      }
    };
    EmulationManager = (() => {
      let _instanceExtraInitializers = [];
      let _private_applyViewport_decorators;
      let _private_applyViewport_descriptor;
      let _private_emulateIdleState_decorators;
      let _private_emulateIdleState_descriptor;
      let _private_emulateTimezone_decorators;
      let _private_emulateTimezone_descriptor;
      let _private_emulateVisionDeficiency_decorators;
      let _private_emulateVisionDeficiency_descriptor;
      let _private_emulateCpuThrottling_decorators;
      let _private_emulateCpuThrottling_descriptor;
      let _private_emulateMediaFeatures_decorators;
      let _private_emulateMediaFeatures_descriptor;
      let _private_emulateMediaType_decorators;
      let _private_emulateMediaType_descriptor;
      let _private_setGeolocation_decorators;
      let _private_setGeolocation_descriptor;
      let _private_setDefaultBackgroundColor_decorators;
      let _private_setDefaultBackgroundColor_descriptor;
      let _private_setJavaScriptEnabled_decorators;
      let _private_setJavaScriptEnabled_descriptor;
      let _private_emulateFocus_decorators;
      let _private_emulateFocus_descriptor;
      return class EmulationManager {
        static {
          const _metadata = typeof Symbol === "function" && Symbol.metadata ? /* @__PURE__ */ Object.create(null) : void 0;
          _private_applyViewport_decorators = [invokeAtMostOnceForArguments];
          _private_emulateIdleState_decorators = [invokeAtMostOnceForArguments];
          _private_emulateTimezone_decorators = [invokeAtMostOnceForArguments];
          _private_emulateVisionDeficiency_decorators = [invokeAtMostOnceForArguments];
          _private_emulateCpuThrottling_decorators = [invokeAtMostOnceForArguments];
          _private_emulateMediaFeatures_decorators = [invokeAtMostOnceForArguments];
          _private_emulateMediaType_decorators = [invokeAtMostOnceForArguments];
          _private_setGeolocation_decorators = [invokeAtMostOnceForArguments];
          _private_setDefaultBackgroundColor_decorators = [invokeAtMostOnceForArguments];
          _private_setJavaScriptEnabled_decorators = [invokeAtMostOnceForArguments];
          _private_emulateFocus_decorators = [invokeAtMostOnceForArguments];
          __esDecorate$4(this, _private_applyViewport_descriptor = { value: __setFunctionName$2(async function(client, viewportState) {
            if (!viewportState.viewport) {
              await Promise.all([
                client.send("Emulation.clearDeviceMetricsOverride"),
                client.send("Emulation.setTouchEmulationEnabled", {
                  enabled: false
                })
              ]).catch(debugError);
              return;
            }
            const { viewport } = viewportState;
            const mobile = viewport.isMobile || false;
            const width = viewport.width;
            const height = viewport.height;
            const deviceScaleFactor = viewport.deviceScaleFactor ?? 1;
            const screenOrientation = viewport.isLandscape ? { angle: 90, type: "landscapePrimary" } : { angle: 0, type: "portraitPrimary" };
            const hasTouch = viewport.hasTouch || false;
            await Promise.all([
              client.send("Emulation.setDeviceMetricsOverride", {
                mobile,
                width,
                height,
                deviceScaleFactor,
                screenOrientation
              }).catch((err) => {
                if (err.message.includes("Target does not support metrics override")) {
                  debugError(err);
                  return;
                }
                throw err;
              }),
              client.send("Emulation.setTouchEmulationEnabled", {
                enabled: hasTouch
              })
            ]);
          }, "#applyViewport") }, _private_applyViewport_decorators, { kind: "method", name: "#applyViewport", static: false, private: true, access: { has: (obj) => #applyViewport in obj, get: (obj) => obj.#applyViewport }, metadata: _metadata }, null, _instanceExtraInitializers);
          __esDecorate$4(this, _private_emulateIdleState_descriptor = { value: __setFunctionName$2(async function(client, idleStateState) {
            if (!idleStateState.active) {
              return;
            }
            if (idleStateState.overrides) {
              await client.send("Emulation.setIdleOverride", {
                isUserActive: idleStateState.overrides.isUserActive,
                isScreenUnlocked: idleStateState.overrides.isScreenUnlocked
              });
            } else {
              await client.send("Emulation.clearIdleOverride");
            }
          }, "#emulateIdleState") }, _private_emulateIdleState_decorators, { kind: "method", name: "#emulateIdleState", static: false, private: true, access: { has: (obj) => #emulateIdleState in obj, get: (obj) => obj.#emulateIdleState }, metadata: _metadata }, null, _instanceExtraInitializers);
          __esDecorate$4(this, _private_emulateTimezone_descriptor = { value: __setFunctionName$2(async function(client, timezoneState) {
            if (!timezoneState.active) {
              return;
            }
            try {
              await client.send("Emulation.setTimezoneOverride", {
                timezoneId: timezoneState.timezoneId || ""
              });
            } catch (error) {
              if (isErrorLike$1(error) && error.message.includes("Invalid timezone")) {
                throw new Error(`Invalid timezone ID: ${timezoneState.timezoneId}`);
              }
              throw error;
            }
          }, "#emulateTimezone") }, _private_emulateTimezone_decorators, { kind: "method", name: "#emulateTimezone", static: false, private: true, access: { has: (obj) => #emulateTimezone in obj, get: (obj) => obj.#emulateTimezone }, metadata: _metadata }, null, _instanceExtraInitializers);
          __esDecorate$4(this, _private_emulateVisionDeficiency_descriptor = { value: __setFunctionName$2(async function(client, visionDeficiency) {
            if (!visionDeficiency.active) {
              return;
            }
            await client.send("Emulation.setEmulatedVisionDeficiency", {
              type: visionDeficiency.visionDeficiency || "none"
            });
          }, "#emulateVisionDeficiency") }, _private_emulateVisionDeficiency_decorators, { kind: "method", name: "#emulateVisionDeficiency", static: false, private: true, access: { has: (obj) => #emulateVisionDeficiency in obj, get: (obj) => obj.#emulateVisionDeficiency }, metadata: _metadata }, null, _instanceExtraInitializers);
          __esDecorate$4(this, _private_emulateCpuThrottling_descriptor = { value: __setFunctionName$2(async function(client, state) {
            if (!state.active) {
              return;
            }
            await client.send("Emulation.setCPUThrottlingRate", {
              rate: state.factor ?? 1
            });
          }, "#emulateCpuThrottling") }, _private_emulateCpuThrottling_decorators, { kind: "method", name: "#emulateCpuThrottling", static: false, private: true, access: { has: (obj) => #emulateCpuThrottling in obj, get: (obj) => obj.#emulateCpuThrottling }, metadata: _metadata }, null, _instanceExtraInitializers);
          __esDecorate$4(this, _private_emulateMediaFeatures_descriptor = { value: __setFunctionName$2(async function(client, state) {
            if (!state.active) {
              return;
            }
            await client.send("Emulation.setEmulatedMedia", {
              features: state.mediaFeatures
            });
          }, "#emulateMediaFeatures") }, _private_emulateMediaFeatures_decorators, { kind: "method", name: "#emulateMediaFeatures", static: false, private: true, access: { has: (obj) => #emulateMediaFeatures in obj, get: (obj) => obj.#emulateMediaFeatures }, metadata: _metadata }, null, _instanceExtraInitializers);
          __esDecorate$4(this, _private_emulateMediaType_descriptor = { value: __setFunctionName$2(async function(client, state) {
            if (!state.active) {
              return;
            }
            await client.send("Emulation.setEmulatedMedia", {
              media: state.type || ""
            });
          }, "#emulateMediaType") }, _private_emulateMediaType_decorators, { kind: "method", name: "#emulateMediaType", static: false, private: true, access: { has: (obj) => #emulateMediaType in obj, get: (obj) => obj.#emulateMediaType }, metadata: _metadata }, null, _instanceExtraInitializers);
          __esDecorate$4(this, _private_setGeolocation_descriptor = { value: __setFunctionName$2(async function(client, state) {
            if (!state.active) {
              return;
            }
            await client.send("Emulation.setGeolocationOverride", state.geoLocation ? {
              longitude: state.geoLocation.longitude,
              latitude: state.geoLocation.latitude,
              accuracy: state.geoLocation.accuracy
            } : void 0);
          }, "#setGeolocation") }, _private_setGeolocation_decorators, { kind: "method", name: "#setGeolocation", static: false, private: true, access: { has: (obj) => #setGeolocation in obj, get: (obj) => obj.#setGeolocation }, metadata: _metadata }, null, _instanceExtraInitializers);
          __esDecorate$4(this, _private_setDefaultBackgroundColor_descriptor = { value: __setFunctionName$2(async function(client, state) {
            if (!state.active) {
              return;
            }
            await client.send("Emulation.setDefaultBackgroundColorOverride", {
              color: state.color
            });
          }, "#setDefaultBackgroundColor") }, _private_setDefaultBackgroundColor_decorators, { kind: "method", name: "#setDefaultBackgroundColor", static: false, private: true, access: { has: (obj) => #setDefaultBackgroundColor in obj, get: (obj) => obj.#setDefaultBackgroundColor }, metadata: _metadata }, null, _instanceExtraInitializers);
          __esDecorate$4(this, _private_setJavaScriptEnabled_descriptor = { value: __setFunctionName$2(async function(client, state) {
            if (!state.active) {
              return;
            }
            await client.send("Emulation.setScriptExecutionDisabled", {
              value: !state.javaScriptEnabled
            });
          }, "#setJavaScriptEnabled") }, _private_setJavaScriptEnabled_decorators, { kind: "method", name: "#setJavaScriptEnabled", static: false, private: true, access: { has: (obj) => #setJavaScriptEnabled in obj, get: (obj) => obj.#setJavaScriptEnabled }, metadata: _metadata }, null, _instanceExtraInitializers);
          __esDecorate$4(this, _private_emulateFocus_descriptor = { value: __setFunctionName$2(async function(client, state) {
            if (!state.active) {
              return;
            }
            await client.send("Emulation.setFocusEmulationEnabled", {
              enabled: state.enabled
            });
          }, "#emulateFocus") }, _private_emulateFocus_decorators, { kind: "method", name: "#emulateFocus", static: false, private: true, access: { has: (obj) => #emulateFocus in obj, get: (obj) => obj.#emulateFocus }, metadata: _metadata }, null, _instanceExtraInitializers);
          if (_metadata) Object.defineProperty(this, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
        }
        #client = __runInitializers$4(this, _instanceExtraInitializers);
        #emulatingMobile = false;
        #hasTouch = false;
        #states = [];
        #viewportState = new EmulatedState({
          active: false
        }, this, this.#applyViewport);
        #idleOverridesState = new EmulatedState({
          active: false
        }, this, this.#emulateIdleState);
        #timezoneState = new EmulatedState({
          active: false
        }, this, this.#emulateTimezone);
        #visionDeficiencyState = new EmulatedState({
          active: false
        }, this, this.#emulateVisionDeficiency);
        #cpuThrottlingState = new EmulatedState({
          active: false
        }, this, this.#emulateCpuThrottling);
        #mediaFeaturesState = new EmulatedState({
          active: false
        }, this, this.#emulateMediaFeatures);
        #mediaTypeState = new EmulatedState({
          active: false
        }, this, this.#emulateMediaType);
        #geoLocationState = new EmulatedState({
          active: false
        }, this, this.#setGeolocation);
        #defaultBackgroundColorState = new EmulatedState({
          active: false
        }, this, this.#setDefaultBackgroundColor);
        #javascriptEnabledState = new EmulatedState({
          javaScriptEnabled: true,
          active: false
        }, this, this.#setJavaScriptEnabled);
        #focusState = new EmulatedState({
          enabled: true,
          active: false
        }, this, this.#emulateFocus);
        #secondaryClients = /* @__PURE__ */ new Set();
        constructor(client) {
          this.#client = client;
        }
        updateClient(client) {
          this.#client = client;
          this.#secondaryClients.delete(client);
        }
        registerState(state) {
          this.#states.push(state);
        }
        clients() {
          return [this.#client, ...Array.from(this.#secondaryClients)];
        }
        async registerSpeculativeSession(client) {
          this.#secondaryClients.add(client);
          client.once(CDPSessionEvent.Disconnected, () => {
            this.#secondaryClients.delete(client);
          });
          void Promise.all(this.#states.map((s) => {
            return s.sync().catch(debugError);
          }));
        }
        get javascriptEnabled() {
          return this.#javascriptEnabledState.state.javaScriptEnabled;
        }
        async emulateViewport(viewport) {
          const currentState = this.#viewportState.state;
          if (!viewport && !currentState.active) {
            return false;
          }
          await this.#viewportState.setState(viewport ? {
            viewport,
            active: true
          } : {
            active: false
          });
          const mobile = viewport?.isMobile || false;
          const hasTouch = viewport?.hasTouch || false;
          const reloadNeeded = this.#emulatingMobile !== mobile || this.#hasTouch !== hasTouch;
          this.#emulatingMobile = mobile;
          this.#hasTouch = hasTouch;
          return reloadNeeded;
        }
        get #applyViewport() {
          return _private_applyViewport_descriptor.value;
        }
        async emulateIdleState(overrides) {
          await this.#idleOverridesState.setState({
            active: true,
            overrides
          });
        }
        get #emulateIdleState() {
          return _private_emulateIdleState_descriptor.value;
        }
        get #emulateTimezone() {
          return _private_emulateTimezone_descriptor.value;
        }
        async emulateTimezone(timezoneId) {
          await this.#timezoneState.setState({
            timezoneId,
            active: true
          });
        }
        get #emulateVisionDeficiency() {
          return _private_emulateVisionDeficiency_descriptor.value;
        }
        async emulateVisionDeficiency(type2) {
          const visionDeficiencies = /* @__PURE__ */ new Set([
            "none",
            "achromatopsia",
            "blurredVision",
            "deuteranopia",
            "protanopia",
            "reducedContrast",
            "tritanopia"
          ]);
          assert(!type2 || visionDeficiencies.has(type2), `Unsupported vision deficiency: ${type2}`);
          await this.#visionDeficiencyState.setState({
            active: true,
            visionDeficiency: type2
          });
        }
        get #emulateCpuThrottling() {
          return _private_emulateCpuThrottling_descriptor.value;
        }
        async emulateCPUThrottling(factor) {
          assert(factor === null || factor >= 1, "Throttling rate should be greater or equal to 1");
          await this.#cpuThrottlingState.setState({
            active: true,
            factor: factor ?? void 0
          });
        }
        get #emulateMediaFeatures() {
          return _private_emulateMediaFeatures_descriptor.value;
        }
        async emulateMediaFeatures(features) {
          if (Array.isArray(features)) {
            for (const mediaFeature of features) {
              const name = mediaFeature.name;
              assert(/^(?:prefers-(?:color-scheme|reduced-motion)|color-gamut)$/.test(name), "Unsupported media feature: " + name);
            }
          }
          await this.#mediaFeaturesState.setState({
            active: true,
            mediaFeatures: features
          });
        }
        get #emulateMediaType() {
          return _private_emulateMediaType_descriptor.value;
        }
        async emulateMediaType(type2) {
          assert(type2 === "screen" || type2 === "print" || (type2 ?? void 0) === void 0, "Unsupported media type: " + type2);
          await this.#mediaTypeState.setState({
            type: type2,
            active: true
          });
        }
        get #setGeolocation() {
          return _private_setGeolocation_descriptor.value;
        }
        async setGeolocation(options2) {
          const { longitude, latitude, accuracy = 0 } = options2;
          if (longitude < -180 || longitude > 180) {
            throw new Error(`Invalid longitude "${longitude}": precondition -180 <= LONGITUDE <= 180 failed.`);
          }
          if (latitude < -90 || latitude > 90) {
            throw new Error(`Invalid latitude "${latitude}": precondition -90 <= LATITUDE <= 90 failed.`);
          }
          if (accuracy < 0) {
            throw new Error(`Invalid accuracy "${accuracy}": precondition 0 <= ACCURACY failed.`);
          }
          await this.#geoLocationState.setState({
            active: true,
            geoLocation: {
              longitude,
              latitude,
              accuracy
            }
          });
        }
        get #setDefaultBackgroundColor() {
          return _private_setDefaultBackgroundColor_descriptor.value;
        }
        async resetDefaultBackgroundColor() {
          await this.#defaultBackgroundColorState.setState({
            active: true,
            color: void 0
          });
        }
        async setTransparentBackgroundColor() {
          await this.#defaultBackgroundColorState.setState({
            active: true,
            color: { r: 0, g: 0, b: 0, a: 0 }
          });
        }
        get #setJavaScriptEnabled() {
          return _private_setJavaScriptEnabled_descriptor.value;
        }
        async setJavaScriptEnabled(enabled) {
          await this.#javascriptEnabledState.setState({
            active: true,
            javaScriptEnabled: enabled
          });
        }
        get #emulateFocus() {
          return _private_emulateFocus_descriptor.value;
        }
        async emulateFocus(enabled) {
          await this.#focusState.setState({
            active: true,
            enabled
          });
        }
      };
    })();
    CdpPreloadScript = class {
      #id;
      #source;
      #frameToId = /* @__PURE__ */ new WeakMap();
      constructor(mainFrame, id2, source2) {
        this.#id = id2;
        this.#source = source2;
        this.#frameToId.set(mainFrame, id2);
      }
      get id() {
        return this.#id;
      }
      get source() {
        return this.#source;
      }
      getIdForFrame(frame) {
        return this.#frameToId.get(frame);
      }
      setIdForFrame(frame, identifier) {
        this.#frameToId.set(frame, identifier);
      }
    };
    CdpDeviceRequestPrompt = class extends DeviceRequestPrompt {
      #client;
      #timeoutSettings;
      #id;
      #handled = false;
      #updateDevicesHandle = this.#updateDevices.bind(this);
      #waitForDevicePromises = /* @__PURE__ */ new Set();
      constructor(client, timeoutSettings, firstEvent) {
        super();
        this.#client = client;
        this.#timeoutSettings = timeoutSettings;
        this.#id = firstEvent.id;
        this.#client.on("DeviceAccess.deviceRequestPrompted", this.#updateDevicesHandle);
        this.#client.on("Target.detachedFromTarget", () => {
          this.#client = null;
        });
        this.#updateDevices(firstEvent);
      }
      #updateDevices(event) {
        if (event.id !== this.#id) {
          return;
        }
        for (const rawDevice of event.devices) {
          if (this.devices.some((device) => {
            return device.id === rawDevice.id;
          })) {
            continue;
          }
          const newDevice = { id: rawDevice.id, name: rawDevice.name };
          this.devices.push(newDevice);
          for (const waitForDevicePromise of this.#waitForDevicePromises) {
            if (waitForDevicePromise.filter(newDevice)) {
              waitForDevicePromise.promise.resolve(newDevice);
            }
          }
        }
      }
      async waitForDevice(filter2, options2 = {}) {
        for (const device of this.devices) {
          if (filter2(device)) {
            return device;
          }
        }
        const { timeout: timeout2 = this.#timeoutSettings.timeout() } = options2;
        const deferred = Deferred.create({
          message: `Waiting for \`DeviceRequestPromptDevice\` failed: ${timeout2}ms exceeded`,
          timeout: timeout2
        });
        if (options2.signal) {
          options2.signal.addEventListener("abort", () => {
            deferred.reject(options2.signal?.reason);
          }, { once: true });
        }
        const handle = { filter: filter2, promise: deferred };
        this.#waitForDevicePromises.add(handle);
        try {
          return await deferred.valueOrThrow();
        } finally {
          this.#waitForDevicePromises.delete(handle);
        }
      }
      async select(device) {
        assert(this.#client !== null, "Cannot select device through detached session!");
        assert(this.devices.includes(device), "Cannot select unknown device!");
        assert(!this.#handled, "Cannot select DeviceRequestPrompt which is already handled!");
        this.#client.off("DeviceAccess.deviceRequestPrompted", this.#updateDevicesHandle);
        this.#handled = true;
        return await this.#client.send("DeviceAccess.selectPrompt", {
          id: this.#id,
          deviceId: device.id
        });
      }
      async cancel() {
        assert(this.#client !== null, "Cannot cancel prompt through detached session!");
        assert(!this.#handled, "Cannot cancel DeviceRequestPrompt which is already handled!");
        this.#client.off("DeviceAccess.deviceRequestPrompted", this.#updateDevicesHandle);
        this.#handled = true;
        return await this.#client.send("DeviceAccess.cancelPrompt", { id: this.#id });
      }
    };
    CdpDeviceRequestPromptManager = class {
      #client;
      #timeoutSettings;
      #deviceRequestPromptDeferreds = /* @__PURE__ */ new Set();
      constructor(client, timeoutSettings) {
        this.#client = client;
        this.#timeoutSettings = timeoutSettings;
        this.#client.on("DeviceAccess.deviceRequestPrompted", (event) => {
          this.#onDeviceRequestPrompted(event);
        });
        this.#client.on("Target.detachedFromTarget", () => {
          this.#client = null;
        });
      }
      async waitForDevicePrompt(options2 = {}) {
        assert(this.#client !== null, "Cannot wait for device prompt through detached session!");
        const needsEnable = this.#deviceRequestPromptDeferreds.size === 0;
        let enablePromise;
        if (needsEnable) {
          enablePromise = this.#client.send("DeviceAccess.enable");
        }
        const { timeout: timeout2 = this.#timeoutSettings.timeout() } = options2;
        const deferred = Deferred.create({
          message: `Waiting for \`DeviceRequestPrompt\` failed: ${timeout2}ms exceeded`,
          timeout: timeout2
        });
        if (options2.signal) {
          options2.signal.addEventListener("abort", () => {
            deferred.reject(options2.signal?.reason);
          }, { once: true });
        }
        this.#deviceRequestPromptDeferreds.add(deferred);
        try {
          const [result] = await Promise.all([
            deferred.valueOrThrow(),
            enablePromise
          ]);
          return result;
        } finally {
          this.#deviceRequestPromptDeferreds.delete(deferred);
        }
      }
      #onDeviceRequestPrompted(event) {
        if (!this.#deviceRequestPromptDeferreds.size) {
          return;
        }
        assert(this.#client !== null);
        const devicePrompt = new CdpDeviceRequestPrompt(this.#client, this.#timeoutSettings, event);
        for (const promise of this.#deviceRequestPromptDeferreds) {
          promise.resolve(devicePrompt);
        }
        this.#deviceRequestPromptDeferreds.clear();
      }
    };
    getErrorDetails = (details) => {
      let name = "";
      let message;
      const lines = details.exception?.description?.split("\n    at ") ?? [];
      const size = Math.min(details.stackTrace?.callFrames.length ?? 0, lines.length - 1);
      lines.splice(-size, size);
      if (details.exception?.className) {
        name = details.exception.className;
      }
      message = lines.join("\n");
      if (name && message.startsWith(`${name}: `)) {
        message = message.slice(name.length + 2);
      }
      return { message, name };
    };
    CDP_BINDING_PREFIX = "puppeteer_";
    CdpJSHandle = class extends JSHandle {
      #disposed = false;
      #remoteObject;
      #world;
      constructor(world, remoteObject) {
        super();
        this.#world = world;
        this.#remoteObject = remoteObject;
      }
      get disposed() {
        return this.#disposed;
      }
      get realm() {
        return this.#world;
      }
      get client() {
        return this.realm.environment.client;
      }
      async jsonValue() {
        if (!this.#remoteObject.objectId) {
          return valueFromPrimitiveRemoteObject(this.#remoteObject);
        }
        const value = await this.evaluate((object2) => {
          return object2;
        });
        if (value === void 0) {
          throw new Error("Could not serialize referenced object");
        }
        return value;
      }
      asElement() {
        return null;
      }
      async dispose() {
        if (this.#disposed) {
          return;
        }
        this.#disposed = true;
        await releaseObject(this.client, this.#remoteObject);
      }
      toString() {
        if (!this.#remoteObject.objectId) {
          return "JSHandle:" + valueFromPrimitiveRemoteObject(this.#remoteObject);
        }
        const type2 = this.#remoteObject.subtype || this.#remoteObject.type;
        return "JSHandle@" + type2;
      }
      get id() {
        return this.#remoteObject.objectId;
      }
      remoteObject() {
        return this.#remoteObject;
      }
      async getProperties() {
        const response = await this.client.send("Runtime.getProperties", {
          objectId: this.#remoteObject.objectId,
          ownProperties: true
        });
        const result = /* @__PURE__ */ new Map();
        for (const property of response.result) {
          if (!property.enumerable || !property.value) {
            continue;
          }
          result.set(property.name, this.#world.createCdpHandle(property.value));
        }
        return result;
      }
    };
    __runInitializers$3 = function(thisArg, initializers, value) {
      var useValue = arguments.length > 2;
      for (var i = 0; i < initializers.length; i++) {
        value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);
      }
      return useValue ? value : void 0;
    };
    __esDecorate$3 = function(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {
      function accept(f) {
        if (f !== void 0 && typeof f !== "function") throw new TypeError("Function expected");
        return f;
      }
      var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value";
      var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null;
      var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});
      var _, done = false;
      for (var i = decorators.length - 1; i >= 0; i--) {
        var context2 = {};
        for (var p in contextIn) context2[p] = p === "access" ? {} : contextIn[p];
        for (var p in contextIn.access) context2.access[p] = contextIn.access[p];
        context2.addInitializer = function(f) {
          if (done) throw new TypeError("Cannot add initializers after decoration has completed");
          extraInitializers.push(accept(f || null));
        };
        var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context2);
        if (kind === "accessor") {
          if (result === void 0) continue;
          if (result === null || typeof result !== "object") throw new TypeError("Object expected");
          if (_ = accept(result.get)) descriptor.get = _;
          if (_ = accept(result.set)) descriptor.set = _;
          if (_ = accept(result.init)) initializers.unshift(_);
        } else if (_ = accept(result)) {
          if (kind === "field") initializers.unshift(_);
          else descriptor[key] = _;
        }
      }
      if (target) Object.defineProperty(target, contextIn.name, descriptor);
      done = true;
    };
    NON_ELEMENT_NODE_ROLES = /* @__PURE__ */ new Set(["StaticText", "InlineTextBox"]);
    CdpElementHandle = (() => {
      let _classSuper = ElementHandle;
      let _instanceExtraInitializers = [];
      let _contentFrame_decorators;
      let _scrollIntoView_decorators;
      let _uploadFile_decorators;
      let _autofill_decorators;
      return class CdpElementHandle extends _classSuper {
        static {
          const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
          _contentFrame_decorators = [throwIfDisposed()];
          _scrollIntoView_decorators = [throwIfDisposed(), bindIsolatedHandle];
          _uploadFile_decorators = [throwIfDisposed(), bindIsolatedHandle];
          _autofill_decorators = [throwIfDisposed()];
          __esDecorate$3(this, null, _contentFrame_decorators, { kind: "method", name: "contentFrame", static: false, private: false, access: { has: (obj) => "contentFrame" in obj, get: (obj) => obj.contentFrame }, metadata: _metadata }, null, _instanceExtraInitializers);
          __esDecorate$3(this, null, _scrollIntoView_decorators, { kind: "method", name: "scrollIntoView", static: false, private: false, access: { has: (obj) => "scrollIntoView" in obj, get: (obj) => obj.scrollIntoView }, metadata: _metadata }, null, _instanceExtraInitializers);
          __esDecorate$3(this, null, _uploadFile_decorators, { kind: "method", name: "uploadFile", static: false, private: false, access: { has: (obj) => "uploadFile" in obj, get: (obj) => obj.uploadFile }, metadata: _metadata }, null, _instanceExtraInitializers);
          __esDecorate$3(this, null, _autofill_decorators, { kind: "method", name: "autofill", static: false, private: false, access: { has: (obj) => "autofill" in obj, get: (obj) => obj.autofill }, metadata: _metadata }, null, _instanceExtraInitializers);
          if (_metadata) Object.defineProperty(this, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
        }
        #backendNodeId = __runInitializers$3(this, _instanceExtraInitializers);
        constructor(world, remoteObject) {
          super(new CdpJSHandle(world, remoteObject));
        }
        get realm() {
          return this.handle.realm;
        }
        get client() {
          return this.handle.client;
        }
        remoteObject() {
          return this.handle.remoteObject();
        }
        get #frameManager() {
          return this.frame._frameManager;
        }
        get frame() {
          return this.realm.environment;
        }
        async contentFrame() {
          const nodeInfo = await this.client.send("DOM.describeNode", {
            objectId: this.id
          });
          if (typeof nodeInfo.node.frameId !== "string") {
            return null;
          }
          return this.#frameManager.frame(nodeInfo.node.frameId);
        }
        async scrollIntoView() {
          await this.assertConnectedElement();
          try {
            await this.client.send("DOM.scrollIntoViewIfNeeded", {
              objectId: this.id
            });
          } catch (error) {
            debugError(error);
            await super.scrollIntoView();
          }
        }
        async uploadFile(...files) {
          const isMultiple = await this.evaluate((element) => {
            return element.multiple;
          });
          assert(files.length <= 1 || isMultiple, "Multiple file uploads only work with <input type=file multiple>");
          const path14 = environment.value.path;
          if (path14) {
            files = files.map((filePath) => {
              if (path14.win32.isAbsolute(filePath) || path14.posix.isAbsolute(filePath)) {
                return filePath;
              } else {
                return path14.resolve(filePath);
              }
            });
          }
          if (files.length === 0) {
            await this.evaluate((element) => {
              element.files = new DataTransfer().files;
              element.dispatchEvent(new Event("input", { bubbles: true, composed: true }));
              element.dispatchEvent(new Event("change", { bubbles: true }));
            });
            return;
          }
          const { node: { backendNodeId } } = await this.client.send("DOM.describeNode", {
            objectId: this.id
          });
          await this.client.send("DOM.setFileInputFiles", {
            objectId: this.id,
            files,
            backendNodeId
          });
        }
        async autofill(data32) {
          const nodeInfo = await this.client.send("DOM.describeNode", {
            objectId: this.handle.id
          });
          const fieldId = nodeInfo.node.backendNodeId;
          const frameId = this.frame._id;
          await this.client.send("Autofill.trigger", {
            fieldId,
            frameId,
            card: data32.creditCard
          });
        }
        async *queryAXTree(name, role) {
          const { nodes } = await this.client.send("Accessibility.queryAXTree", {
            objectId: this.id,
            accessibleName: name,
            role
          });
          const results = nodes.filter((node2) => {
            if (node2.ignored) {
              return false;
            }
            if (!node2.role) {
              return false;
            }
            if (NON_ELEMENT_NODE_ROLES.has(node2.role.value)) {
              return false;
            }
            return true;
          });
          return yield* AsyncIterableUtil.map(results, (node2) => {
            return this.realm.adoptBackendNode(node2.backendDOMNodeId);
          });
        }
        async backendNodeId() {
          if (this.#backendNodeId) {
            return this.#backendNodeId;
          }
          const { node: node2 } = await this.client.send("DOM.describeNode", {
            objectId: this.handle.id
          });
          this.#backendNodeId = node2.backendNodeId;
          return this.#backendNodeId;
        }
      };
    })();
    __addDisposableResource$3 = function(env2, value, async2) {
      if (value !== null && value !== void 0) {
        if (typeof value !== "object" && typeof value !== "function") throw new TypeError("Object expected.");
        var dispose, inner;
        if (async2) {
          if (!Symbol.asyncDispose) throw new TypeError("Symbol.asyncDispose is not defined.");
          dispose = value[Symbol.asyncDispose];
        }
        if (dispose === void 0) {
          if (!Symbol.dispose) throw new TypeError("Symbol.dispose is not defined.");
          dispose = value[Symbol.dispose];
          if (async2) inner = dispose;
        }
        if (typeof dispose !== "function") throw new TypeError("Object not disposable.");
        if (inner) dispose = function() {
          try {
            inner.call(this);
          } catch (e) {
            return Promise.reject(e);
          }
        };
        env2.stack.push({ value, dispose, async: async2 });
      } else if (async2) {
        env2.stack.push({ async: true });
      }
      return value;
    };
    __disposeResources$3 = /* @__PURE__ */ function(SuppressedError2) {
      return function(env2) {
        function fail(e) {
          env2.error = env2.hasError ? new SuppressedError2(e, env2.error, "An error was suppressed during disposal.") : e;
          env2.hasError = true;
        }
        var r, s = 0;
        function next() {
          while (r = env2.stack.pop()) {
            try {
              if (!r.async && s === 1) return s = 0, env2.stack.push(r), Promise.resolve().then(next);
              if (r.dispose) {
                var result = r.dispose.call(r.value);
                if (r.async) return s |= 2, Promise.resolve(result).then(next, function(e) {
                  fail(e);
                  return next();
                });
              } else s |= 1;
            } catch (e) {
              fail(e);
            }
          }
          if (s === 1) return env2.hasError ? Promise.reject(env2.error) : Promise.resolve();
          if (env2.hasError) throw env2.error;
        }
        return next();
      };
    }(typeof SuppressedError === "function" ? SuppressedError : function(error, suppressed, message) {
      var e = new Error(message);
      return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
    });
    ariaQuerySelectorBinding = new Binding$2("__ariaQuerySelector", ARIAQueryHandler.queryOne, "");
    ariaQuerySelectorAllBinding = new Binding$2("__ariaQuerySelectorAll", async (element, selector) => {
      const results = ARIAQueryHandler.queryAll(element, selector);
      return await element.realm.evaluateHandle((...elements) => {
        return elements;
      }, ...await AsyncIterableUtil.collect(results));
    }, "");
    ExecutionContext$1 = class ExecutionContext2 extends EventEmitter6 {
      #client;
      #world;
      #id;
      #name;
      #disposables = new DisposableStack();
      constructor(client, contextPayload, world) {
        super();
        this.#client = client;
        this.#world = world;
        this.#id = contextPayload.id;
        if (contextPayload.name) {
          this.#name = contextPayload.name;
        }
        const clientEmitter = this.#disposables.use(new EventEmitter6(this.#client));
        clientEmitter.on("Runtime.bindingCalled", this.#onBindingCalled.bind(this));
        clientEmitter.on("Runtime.executionContextDestroyed", async (event) => {
          if (event.executionContextId === this.#id) {
            this[disposeSymbol]();
          }
        });
        clientEmitter.on("Runtime.executionContextsCleared", async () => {
          this[disposeSymbol]();
        });
        clientEmitter.on("Runtime.consoleAPICalled", this.#onConsoleAPI.bind(this));
        clientEmitter.on(CDPSessionEvent.Disconnected, () => {
          this[disposeSymbol]();
        });
      }
      #bindings = /* @__PURE__ */ new Map();
      #mutex = new Mutex$2();
      async #addBinding(binding) {
        const env_1 = { stack: [], error: void 0, hasError: false };
        try {
          if (this.#bindings.has(binding.name)) {
            return;
          }
          const _ = __addDisposableResource$3(env_1, await this.#mutex.acquire(), false);
          try {
            await this.#client.send("Runtime.addBinding", this.#name ? {
              name: CDP_BINDING_PREFIX + binding.name,
              executionContextName: this.#name
            } : {
              name: CDP_BINDING_PREFIX + binding.name,
              executionContextId: this.#id
            });
            await this.evaluate(addPageBinding, "internal", binding.name, CDP_BINDING_PREFIX);
            this.#bindings.set(binding.name, binding);
          } catch (error) {
            if (error instanceof Error) {
              if (error.message.includes("Execution context was destroyed")) {
                return;
              }
              if (error.message.includes("Cannot find context with specified id")) {
                return;
              }
            }
            debugError(error);
          }
        } catch (e_1) {
          env_1.error = e_1;
          env_1.hasError = true;
        } finally {
          __disposeResources$3(env_1);
        }
      }
      async #onBindingCalled(event) {
        if (event.executionContextId !== this.#id) {
          return;
        }
        let payload;
        try {
          payload = JSON.parse(event.payload);
        } catch {
          return;
        }
        const { type: type2, name, seq, args: args2, isTrivial } = payload;
        if (type2 !== "internal") {
          this.emit("bindingcalled", event);
          return;
        }
        if (!this.#bindings.has(name)) {
          this.emit("bindingcalled", event);
          return;
        }
        try {
          const binding = this.#bindings.get(name);
          await binding?.run(this, seq, args2, isTrivial);
        } catch (err) {
          debugError(err);
        }
      }
      get id() {
        return this.#id;
      }
      #onConsoleAPI(event) {
        if (event.executionContextId !== this.#id) {
          return;
        }
        this.emit("consoleapicalled", event);
      }
      #bindingsInstalled = false;
      #puppeteerUtil;
      get puppeteerUtil() {
        let promise = Promise.resolve();
        if (!this.#bindingsInstalled) {
          promise = Promise.all([
            this.#addBindingWithoutThrowing(ariaQuerySelectorBinding),
            this.#addBindingWithoutThrowing(ariaQuerySelectorAllBinding)
          ]);
          this.#bindingsInstalled = true;
        }
        scriptInjector.inject((script) => {
          if (this.#puppeteerUtil) {
            void this.#puppeteerUtil.then((handle) => {
              void handle.dispose();
            });
          }
          this.#puppeteerUtil = promise.then(() => {
            return this.evaluateHandle(script);
          });
        }, !this.#puppeteerUtil);
        return this.#puppeteerUtil;
      }
      async #addBindingWithoutThrowing(binding) {
        try {
          await this.#addBinding(binding);
        } catch (err) {
          debugError(err);
        }
      }
      async evaluate(pageFunction, ...args2) {
        return await this.#evaluate(true, pageFunction, ...args2);
      }
      async evaluateHandle(pageFunction, ...args2) {
        return await this.#evaluate(false, pageFunction, ...args2);
      }
      async #evaluate(returnByValue, pageFunction, ...args2) {
        const sourceUrlComment = getSourceUrlComment(getSourcePuppeteerURLIfAvailable(pageFunction)?.toString() ?? PuppeteerURL.INTERNAL_URL);
        if (isString(pageFunction)) {
          const contextId = this.#id;
          const expression = pageFunction;
          const expressionWithSourceUrl = SOURCE_URL_REGEX.test(expression) ? expression : `${expression}
${sourceUrlComment}
`;
          const { exceptionDetails: exceptionDetails2, result: remoteObject2 } = await this.#client.send("Runtime.evaluate", {
            expression: expressionWithSourceUrl,
            contextId,
            returnByValue,
            awaitPromise: true,
            userGesture: true
          }).catch(rewriteError);
          if (exceptionDetails2) {
            throw createEvaluationError(exceptionDetails2);
          }
          if (returnByValue) {
            return valueFromPrimitiveRemoteObject(remoteObject2);
          }
          return this.#world.createCdpHandle(remoteObject2);
        }
        const functionDeclaration = stringifyFunction(pageFunction);
        const functionDeclarationWithSourceUrl = SOURCE_URL_REGEX.test(functionDeclaration) ? functionDeclaration : `${functionDeclaration}
${sourceUrlComment}
`;
        let callFunctionOnPromise;
        try {
          callFunctionOnPromise = this.#client.send("Runtime.callFunctionOn", {
            functionDeclaration: functionDeclarationWithSourceUrl,
            executionContextId: this.#id,
            arguments: args2.some((arg) => {
              return arg instanceof LazyArg;
            }) ? await Promise.all(args2.map((arg) => {
              return convertArgumentAsync(this, arg);
            })) : args2.map((arg) => {
              return convertArgument(this, arg);
            }),
            returnByValue,
            awaitPromise: true,
            userGesture: true
          });
        } catch (error) {
          if (error instanceof TypeError && error.message.startsWith("Converting circular structure to JSON")) {
            error.message += " Recursive objects are not allowed.";
          }
          throw error;
        }
        const { exceptionDetails, result: remoteObject } = await callFunctionOnPromise.catch(rewriteError);
        if (exceptionDetails) {
          throw createEvaluationError(exceptionDetails);
        }
        if (returnByValue) {
          return valueFromPrimitiveRemoteObject(remoteObject);
        }
        return this.#world.createCdpHandle(remoteObject);
        async function convertArgumentAsync(context2, arg) {
          if (arg instanceof LazyArg) {
            arg = await arg.get(context2);
          }
          return convertArgument(context2, arg);
        }
        function convertArgument(context2, arg) {
          if (typeof arg === "bigint") {
            return { unserializableValue: `${arg.toString()}n` };
          }
          if (Object.is(arg, -0)) {
            return { unserializableValue: "-0" };
          }
          if (Object.is(arg, Infinity)) {
            return { unserializableValue: "Infinity" };
          }
          if (Object.is(arg, -Infinity)) {
            return { unserializableValue: "-Infinity" };
          }
          if (Object.is(arg, NaN)) {
            return { unserializableValue: "NaN" };
          }
          const objectHandle = arg && (arg instanceof CdpJSHandle || arg instanceof CdpElementHandle) ? arg : null;
          if (objectHandle) {
            if (objectHandle.realm !== context2.#world) {
              throw new Error("JSHandles can be evaluated only in the context they were created!");
            }
            if (objectHandle.disposed) {
              throw new Error("JSHandle is disposed!");
            }
            if (objectHandle.remoteObject().unserializableValue) {
              return {
                unserializableValue: objectHandle.remoteObject().unserializableValue
              };
            }
            if (!objectHandle.remoteObject().objectId) {
              return { value: objectHandle.remoteObject().value };
            }
            return { objectId: objectHandle.remoteObject().objectId };
          }
          return { value: arg };
        }
      }
      [disposeSymbol]() {
        this.#disposables.dispose();
        this.emit("disposed", void 0);
      }
    };
    rewriteError = (error) => {
      if (error.message.includes("Object reference chain is too long")) {
        return { result: { type: "undefined" } };
      }
      if (error.message.includes("Object couldn't be returned by value")) {
        return { result: { type: "undefined" } };
      }
      if (error.message.endsWith("Cannot find context with specified id") || error.message.endsWith("Inspected target navigated or closed")) {
        throw new Error("Execution context was destroyed, most likely because of a navigation.");
      }
      throw error;
    };
    (function(FrameManagerEvent2) {
      FrameManagerEvent2.FrameAttached = Symbol("FrameManager.FrameAttached");
      FrameManagerEvent2.FrameNavigated = Symbol("FrameManager.FrameNavigated");
      FrameManagerEvent2.FrameDetached = Symbol("FrameManager.FrameDetached");
      FrameManagerEvent2.FrameSwapped = Symbol("FrameManager.FrameSwapped");
      FrameManagerEvent2.LifecycleEvent = Symbol("FrameManager.LifecycleEvent");
      FrameManagerEvent2.FrameNavigatedWithinDocument = Symbol("FrameManager.FrameNavigatedWithinDocument");
      FrameManagerEvent2.ConsoleApiCalled = Symbol("FrameManager.ConsoleApiCalled");
      FrameManagerEvent2.BindingCalled = Symbol("FrameManager.BindingCalled");
    })(FrameManagerEvent || (FrameManagerEvent = {}));
    IsolatedWorld = class extends Realm {
      #context;
      #emitter = new EventEmitter6();
      #frameOrWorker;
      constructor(frameOrWorker, timeoutSettings) {
        super(timeoutSettings);
        this.#frameOrWorker = frameOrWorker;
      }
      get environment() {
        return this.#frameOrWorker;
      }
      get client() {
        return this.#frameOrWorker.client;
      }
      get emitter() {
        return this.#emitter;
      }
      setContext(context2) {
        this.#context?.[disposeSymbol]();
        context2.once("disposed", this.#onContextDisposed.bind(this));
        context2.on("consoleapicalled", this.#onContextConsoleApiCalled.bind(this));
        context2.on("bindingcalled", this.#onContextBindingCalled.bind(this));
        this.#context = context2;
        this.#emitter.emit("context", context2);
        void this.taskManager.rerunAll();
      }
      #onContextDisposed() {
        this.#context = void 0;
        if ("clearDocumentHandle" in this.#frameOrWorker) {
          this.#frameOrWorker.clearDocumentHandle();
        }
      }
      #onContextConsoleApiCalled(event) {
        this.#emitter.emit("consoleapicalled", event);
      }
      #onContextBindingCalled(event) {
        this.#emitter.emit("bindingcalled", event);
      }
      hasContext() {
        return !!this.#context;
      }
      get context() {
        return this.#context;
      }
      #executionContext() {
        if (this.disposed) {
          throw new Error(`Execution context is not available in detached frame or worker "${this.environment.url()}" (are you trying to evaluate?)`);
        }
        return this.#context;
      }
      async #waitForExecutionContext() {
        const error = new Error("Execution context was destroyed");
        const result = await firstValueFrom(fromEmitterEvent(this.#emitter, "context").pipe(raceWith(fromEmitterEvent(this.#emitter, "disposed").pipe(map(() => {
          throw error;
        })), timeout(this.timeoutSettings.timeout()))));
        return result;
      }
      async evaluateHandle(pageFunction, ...args2) {
        pageFunction = withSourcePuppeteerURLIfNone(this.evaluateHandle.name, pageFunction);
        let context2 = this.#executionContext();
        if (!context2) {
          context2 = await this.#waitForExecutionContext();
        }
        return await context2.evaluateHandle(pageFunction, ...args2);
      }
      async evaluate(pageFunction, ...args2) {
        pageFunction = withSourcePuppeteerURLIfNone(this.evaluate.name, pageFunction);
        let context2 = this.#executionContext();
        if (!context2) {
          context2 = await this.#waitForExecutionContext();
        }
        return await context2.evaluate(pageFunction, ...args2);
      }
      async adoptBackendNode(backendNodeId) {
        let context2 = this.#executionContext();
        if (!context2) {
          context2 = await this.#waitForExecutionContext();
        }
        const { object: object2 } = await this.client.send("DOM.resolveNode", {
          backendNodeId,
          executionContextId: context2.id
        });
        return this.createCdpHandle(object2);
      }
      async adoptHandle(handle) {
        if (handle.realm === this) {
          return await handle.evaluateHandle((value) => {
            return value;
          });
        }
        const nodeInfo = await this.client.send("DOM.describeNode", {
          objectId: handle.id
        });
        return await this.adoptBackendNode(nodeInfo.node.backendNodeId);
      }
      async transferHandle(handle) {
        if (handle.realm === this) {
          return handle;
        }
        if (handle.remoteObject().objectId === void 0) {
          return handle;
        }
        const info = await this.client.send("DOM.describeNode", {
          objectId: handle.remoteObject().objectId
        });
        const newHandle = await this.adoptBackendNode(info.node.backendNodeId);
        await handle.dispose();
        return newHandle;
      }
      createCdpHandle(remoteObject) {
        if (remoteObject.subtype === "node") {
          return new CdpElementHandle(this, remoteObject);
        }
        return new CdpJSHandle(this, remoteObject);
      }
      [disposeSymbol]() {
        this.#context?.[disposeSymbol]();
        this.#emitter.emit("disposed", void 0);
        super[disposeSymbol]();
        this.#emitter.removeAllListeners();
      }
    };
    MAIN_WORLD = Symbol("mainWorld");
    PUPPETEER_WORLD = Symbol("puppeteerWorld");
    puppeteerToProtocolLifecycle = /* @__PURE__ */ new Map([
      ["load", "load"],
      ["domcontentloaded", "DOMContentLoaded"],
      ["networkidle0", "networkIdle"],
      ["networkidle2", "networkAlmostIdle"]
    ]);
    LifecycleWatcher = class {
      #expectedLifecycle;
      #frame;
      #timeout;
      #navigationRequest = null;
      #subscriptions = new DisposableStack();
      #initialLoaderId;
      #terminationDeferred;
      #sameDocumentNavigationDeferred = Deferred.create();
      #lifecycleDeferred = Deferred.create();
      #newDocumentNavigationDeferred = Deferred.create();
      #error = new Error("LifecycleWatcher terminated");
      #hasSameDocumentNavigation;
      #swapped;
      #navigationResponseReceived;
      constructor(networkManager, frame, waitUntil, timeout2, signal) {
        if (Array.isArray(waitUntil)) {
          waitUntil = waitUntil.slice();
        } else if (typeof waitUntil === "string") {
          waitUntil = [waitUntil];
        }
        this.#initialLoaderId = frame._loaderId;
        this.#expectedLifecycle = waitUntil.map((value) => {
          const protocolEvent = puppeteerToProtocolLifecycle.get(value);
          assert(protocolEvent, "Unknown value for options.waitUntil: " + value);
          return protocolEvent;
        });
        signal?.addEventListener("abort", () => {
          if (signal.reason instanceof Error) {
            signal.reason.cause = this.#error;
          }
          this.#terminationDeferred.reject(signal.reason);
        });
        this.#frame = frame;
        this.#timeout = timeout2;
        const frameManagerEmitter = this.#subscriptions.use(new EventEmitter6(frame._frameManager));
        frameManagerEmitter.on(FrameManagerEvent.LifecycleEvent, this.#checkLifecycleComplete.bind(this));
        const frameEmitter = this.#subscriptions.use(new EventEmitter6(frame));
        frameEmitter.on(FrameEvent.FrameNavigatedWithinDocument, this.#navigatedWithinDocument.bind(this));
        frameEmitter.on(FrameEvent.FrameNavigated, this.#navigated.bind(this));
        frameEmitter.on(FrameEvent.FrameSwapped, this.#frameSwapped.bind(this));
        frameEmitter.on(FrameEvent.FrameSwappedByActivation, this.#frameSwapped.bind(this));
        frameEmitter.on(FrameEvent.FrameDetached, this.#onFrameDetached.bind(this));
        const networkManagerEmitter = this.#subscriptions.use(new EventEmitter6(networkManager));
        networkManagerEmitter.on(NetworkManagerEvent.Request, this.#onRequest.bind(this));
        networkManagerEmitter.on(NetworkManagerEvent.Response, this.#onResponse.bind(this));
        networkManagerEmitter.on(NetworkManagerEvent.RequestFailed, this.#onRequestFailed.bind(this));
        this.#terminationDeferred = Deferred.create({
          timeout: this.#timeout,
          message: `Navigation timeout of ${this.#timeout} ms exceeded`
        });
        this.#checkLifecycleComplete();
      }
      #onRequest(request3) {
        if (request3.frame() !== this.#frame || !request3.isNavigationRequest()) {
          return;
        }
        this.#navigationRequest = request3;
        this.#navigationResponseReceived?.resolve();
        this.#navigationResponseReceived = Deferred.create();
        if (request3.response() !== null) {
          this.#navigationResponseReceived?.resolve();
        }
      }
      #onRequestFailed(request3) {
        if (this.#navigationRequest?.id !== request3.id) {
          return;
        }
        this.#navigationResponseReceived?.resolve();
      }
      #onResponse(response) {
        if (this.#navigationRequest?.id !== response.request().id) {
          return;
        }
        this.#navigationResponseReceived?.resolve();
      }
      #onFrameDetached(frame) {
        if (this.#frame === frame) {
          this.#error.message = "Navigating frame was detached";
          this.#terminationDeferred.resolve(this.#error);
          return;
        }
        this.#checkLifecycleComplete();
      }
      async navigationResponse() {
        await this.#navigationResponseReceived?.valueOrThrow();
        return this.#navigationRequest ? this.#navigationRequest.response() : null;
      }
      sameDocumentNavigationPromise() {
        return this.#sameDocumentNavigationDeferred.valueOrThrow();
      }
      newDocumentNavigationPromise() {
        return this.#newDocumentNavigationDeferred.valueOrThrow();
      }
      lifecyclePromise() {
        return this.#lifecycleDeferred.valueOrThrow();
      }
      terminationPromise() {
        return this.#terminationDeferred.valueOrThrow();
      }
      #navigatedWithinDocument() {
        this.#hasSameDocumentNavigation = true;
        this.#checkLifecycleComplete();
      }
      #navigated(navigationType) {
        if (navigationType === "BackForwardCacheRestore") {
          return this.#frameSwapped();
        }
        this.#checkLifecycleComplete();
      }
      #frameSwapped() {
        this.#swapped = true;
        this.#checkLifecycleComplete();
      }
      #checkLifecycleComplete() {
        if (!checkLifecycle(this.#frame, this.#expectedLifecycle)) {
          return;
        }
        this.#lifecycleDeferred.resolve();
        if (this.#hasSameDocumentNavigation) {
          this.#sameDocumentNavigationDeferred.resolve(void 0);
        }
        if (this.#swapped || this.#frame._loaderId !== this.#initialLoaderId) {
          this.#newDocumentNavigationDeferred.resolve(void 0);
        }
        function checkLifecycle(frame, expectedLifecycle) {
          for (const event of expectedLifecycle) {
            if (!frame._lifecycleEvents.has(event)) {
              return false;
            }
          }
          for (const child of frame.childFrames()) {
            if (child._hasStartedLoading && !checkLifecycle(child, expectedLifecycle)) {
              return false;
            }
          }
          return true;
        }
      }
      dispose() {
        this.#subscriptions.dispose();
        this.#error.cause = new Error("LifecycleWatcher disposed");
        this.#terminationDeferred.resolve(this.#error);
      }
    };
    __runInitializers$2 = function(thisArg, initializers, value) {
      var useValue = arguments.length > 2;
      for (var i = 0; i < initializers.length; i++) {
        value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);
      }
      return useValue ? value : void 0;
    };
    __esDecorate$2 = function(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {
      function accept(f) {
        if (f !== void 0 && typeof f !== "function") throw new TypeError("Function expected");
        return f;
      }
      var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value";
      var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null;
      var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});
      var _, done = false;
      for (var i = decorators.length - 1; i >= 0; i--) {
        var context2 = {};
        for (var p in contextIn) context2[p] = p === "access" ? {} : contextIn[p];
        for (var p in contextIn.access) context2.access[p] = contextIn.access[p];
        context2.addInitializer = function(f) {
          if (done) throw new TypeError("Cannot add initializers after decoration has completed");
          extraInitializers.push(accept(f || null));
        };
        var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context2);
        if (kind === "accessor") {
          if (result === void 0) continue;
          if (result === null || typeof result !== "object") throw new TypeError("Object expected");
          if (_ = accept(result.get)) descriptor.get = _;
          if (_ = accept(result.set)) descriptor.set = _;
          if (_ = accept(result.init)) initializers.unshift(_);
        } else if (_ = accept(result)) {
          if (kind === "field") initializers.unshift(_);
          else descriptor[key] = _;
        }
      }
      if (target) Object.defineProperty(target, contextIn.name, descriptor);
      done = true;
    };
    CdpFrame = (() => {
      let _classSuper = Frame;
      let _instanceExtraInitializers = [];
      let _goto_decorators;
      let _waitForNavigation_decorators;
      let _setContent_decorators;
      let _addPreloadScript_decorators;
      let _addExposedFunctionBinding_decorators;
      let _removeExposedFunctionBinding_decorators;
      let _waitForDevicePrompt_decorators;
      return class CdpFrame extends _classSuper {
        static {
          const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
          __esDecorate$2(this, null, _goto_decorators, { kind: "method", name: "goto", static: false, private: false, access: { has: (obj) => "goto" in obj, get: (obj) => obj.goto }, metadata: _metadata }, null, _instanceExtraInitializers);
          __esDecorate$2(this, null, _waitForNavigation_decorators, { kind: "method", name: "waitForNavigation", static: false, private: false, access: { has: (obj) => "waitForNavigation" in obj, get: (obj) => obj.waitForNavigation }, metadata: _metadata }, null, _instanceExtraInitializers);
          __esDecorate$2(this, null, _setContent_decorators, { kind: "method", name: "setContent", static: false, private: false, access: { has: (obj) => "setContent" in obj, get: (obj) => obj.setContent }, metadata: _metadata }, null, _instanceExtraInitializers);
          __esDecorate$2(this, null, _addPreloadScript_decorators, { kind: "method", name: "addPreloadScript", static: false, private: false, access: { has: (obj) => "addPreloadScript" in obj, get: (obj) => obj.addPreloadScript }, metadata: _metadata }, null, _instanceExtraInitializers);
          __esDecorate$2(this, null, _addExposedFunctionBinding_decorators, { kind: "method", name: "addExposedFunctionBinding", static: false, private: false, access: { has: (obj) => "addExposedFunctionBinding" in obj, get: (obj) => obj.addExposedFunctionBinding }, metadata: _metadata }, null, _instanceExtraInitializers);
          __esDecorate$2(this, null, _removeExposedFunctionBinding_decorators, { kind: "method", name: "removeExposedFunctionBinding", static: false, private: false, access: { has: (obj) => "removeExposedFunctionBinding" in obj, get: (obj) => obj.removeExposedFunctionBinding }, metadata: _metadata }, null, _instanceExtraInitializers);
          __esDecorate$2(this, null, _waitForDevicePrompt_decorators, { kind: "method", name: "waitForDevicePrompt", static: false, private: false, access: { has: (obj) => "waitForDevicePrompt" in obj, get: (obj) => obj.waitForDevicePrompt }, metadata: _metadata }, null, _instanceExtraInitializers);
          if (_metadata) Object.defineProperty(this, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
        }
        #url = (__runInitializers$2(this, _instanceExtraInitializers), "");
        #detached = false;
        #client;
        _frameManager;
        _loaderId = "";
        _lifecycleEvents = /* @__PURE__ */ new Set();
        _id;
        _parentId;
        accessibility;
        worlds;
        constructor(frameManager, frameId, parentFrameId, client) {
          super();
          this._frameManager = frameManager;
          this.#url = "";
          this._id = frameId;
          this._parentId = parentFrameId;
          this.#detached = false;
          this.#client = client;
          this._loaderId = "";
          this.worlds = {
            [MAIN_WORLD]: new IsolatedWorld(this, this._frameManager.timeoutSettings),
            [PUPPETEER_WORLD]: new IsolatedWorld(this, this._frameManager.timeoutSettings)
          };
          this.accessibility = new Accessibility2(this.worlds[MAIN_WORLD], frameId);
          this.on(FrameEvent.FrameSwappedByActivation, () => {
            this._onLoadingStarted();
            this._onLoadingStopped();
          });
          this.worlds[MAIN_WORLD].emitter.on("consoleapicalled", this.#onMainWorldConsoleApiCalled.bind(this));
          this.worlds[MAIN_WORLD].emitter.on("bindingcalled", this.#onMainWorldBindingCalled.bind(this));
        }
        #onMainWorldConsoleApiCalled(event) {
          this._frameManager.emit(FrameManagerEvent.ConsoleApiCalled, [
            this.worlds[MAIN_WORLD],
            event
          ]);
        }
        #onMainWorldBindingCalled(event) {
          this._frameManager.emit(FrameManagerEvent.BindingCalled, [
            this.worlds[MAIN_WORLD],
            event
          ]);
        }
        _client() {
          return this.#client;
        }
        updateId(id2) {
          this._id = id2;
        }
        updateClient(client) {
          this.#client = client;
        }
        page() {
          return this._frameManager.page();
        }
        async goto(url, options2 = {}) {
          const { referer = this._frameManager.networkManager.extraHTTPHeaders()["referer"], referrerPolicy = this._frameManager.networkManager.extraHTTPHeaders()["referer-policy"], waitUntil = ["load"], timeout: timeout2 = this._frameManager.timeoutSettings.navigationTimeout() } = options2;
          let ensureNewDocumentNavigation = false;
          const watcher = new LifecycleWatcher(this._frameManager.networkManager, this, waitUntil, timeout2);
          let error = await Deferred.race([
            navigate2(this.#client, url, referer, referrerPolicy ? referrerPolicyToProtocol(referrerPolicy) : void 0, this._id),
            watcher.terminationPromise()
          ]);
          if (!error) {
            error = await Deferred.race([
              watcher.terminationPromise(),
              ensureNewDocumentNavigation ? watcher.newDocumentNavigationPromise() : watcher.sameDocumentNavigationPromise()
            ]);
          }
          try {
            if (error) {
              throw error;
            }
            return await watcher.navigationResponse();
          } finally {
            watcher.dispose();
          }
          async function navigate2(client, url2, referrer, referrerPolicy2, frameId) {
            try {
              const response = await client.send("Page.navigate", {
                url: url2,
                referrer,
                frameId,
                referrerPolicy: referrerPolicy2
              });
              ensureNewDocumentNavigation = !!response.loaderId;
              if (response.errorText === "net::ERR_HTTP_RESPONSE_CODE_FAILURE") {
                return null;
              }
              return response.errorText ? new Error(`${response.errorText} at ${url2}`) : null;
            } catch (error2) {
              if (isErrorLike$1(error2)) {
                return error2;
              }
              throw error2;
            }
          }
        }
        async waitForNavigation(options2 = {}) {
          const { waitUntil = ["load"], timeout: timeout2 = this._frameManager.timeoutSettings.navigationTimeout(), signal } = options2;
          const watcher = new LifecycleWatcher(this._frameManager.networkManager, this, waitUntil, timeout2, signal);
          const error = await Deferred.race([
            watcher.terminationPromise(),
            ...options2.ignoreSameDocumentNavigation ? [] : [watcher.sameDocumentNavigationPromise()],
            watcher.newDocumentNavigationPromise()
          ]);
          try {
            if (error) {
              throw error;
            }
            const result = await Deferred.race([watcher.terminationPromise(), watcher.navigationResponse()]);
            if (result instanceof Error) {
              throw error;
            }
            return result || null;
          } finally {
            watcher.dispose();
          }
        }
        get client() {
          return this.#client;
        }
        mainRealm() {
          return this.worlds[MAIN_WORLD];
        }
        isolatedRealm() {
          return this.worlds[PUPPETEER_WORLD];
        }
        async setContent(html2, options2 = {}) {
          const { waitUntil = ["load"], timeout: timeout2 = this._frameManager.timeoutSettings.navigationTimeout() } = options2;
          await this.setFrameContent(html2);
          const watcher = new LifecycleWatcher(this._frameManager.networkManager, this, waitUntil, timeout2);
          const error = await Deferred.race([
            watcher.terminationPromise(),
            watcher.lifecyclePromise()
          ]);
          watcher.dispose();
          if (error) {
            throw error;
          }
        }
        url() {
          return this.#url;
        }
        parentFrame() {
          return this._frameManager._frameTree.parentFrame(this._id) || null;
        }
        childFrames() {
          return this._frameManager._frameTree.childFrames(this._id);
        }
        #deviceRequestPromptManager() {
          return this._frameManager._deviceRequestPromptManager(this.#client);
        }
        async addPreloadScript(preloadScript) {
          const parentFrame = this.parentFrame();
          if (parentFrame && this.#client === parentFrame.client) {
            return;
          }
          if (preloadScript.getIdForFrame(this)) {
            return;
          }
          const { identifier } = await this.#client.send("Page.addScriptToEvaluateOnNewDocument", {
            source: preloadScript.source
          });
          preloadScript.setIdForFrame(this, identifier);
        }
        async addExposedFunctionBinding(binding) {
          if (this !== this._frameManager.mainFrame() && !this._hasStartedLoading) {
            return;
          }
          await Promise.all([
            this.#client.send("Runtime.addBinding", {
              name: CDP_BINDING_PREFIX + binding.name
            }),
            this.evaluate(binding.initSource).catch(debugError)
          ]);
        }
        async removeExposedFunctionBinding(binding) {
          if (this !== this._frameManager.mainFrame() && !this._hasStartedLoading) {
            return;
          }
          await Promise.all([
            this.#client.send("Runtime.removeBinding", {
              name: CDP_BINDING_PREFIX + binding.name
            }),
            this.evaluate((name) => {
              globalThis[name] = void 0;
            }, binding.name).catch(debugError)
          ]);
        }
        async waitForDevicePrompt(options2 = {}) {
          return await this.#deviceRequestPromptManager().waitForDevicePrompt(options2);
        }
        _navigated(framePayload) {
          this._name = framePayload.name;
          this.#url = `${framePayload.url}${framePayload.urlFragment || ""}`;
        }
        _navigatedWithinDocument(url) {
          this.#url = url;
        }
        _onLifecycleEvent(loaderId, name) {
          if (name === "init") {
            this._loaderId = loaderId;
            this._lifecycleEvents.clear();
          }
          this._lifecycleEvents.add(name);
        }
        _onLoadingStopped() {
          this._lifecycleEvents.add("DOMContentLoaded");
          this._lifecycleEvents.add("load");
        }
        _onLoadingStarted() {
          this._hasStartedLoading = true;
        }
        get detached() {
          return this.#detached;
        }
        [(_goto_decorators = [throwIfDetached], _waitForNavigation_decorators = [throwIfDetached], _setContent_decorators = [throwIfDetached], _addPreloadScript_decorators = [throwIfDetached], _addExposedFunctionBinding_decorators = [throwIfDetached], _removeExposedFunctionBinding_decorators = [throwIfDetached], _waitForDevicePrompt_decorators = [throwIfDetached], disposeSymbol)]() {
          if (this.#detached) {
            return;
          }
          this.#detached = true;
          this.worlds[MAIN_WORLD][disposeSymbol]();
          this.worlds[PUPPETEER_WORLD][disposeSymbol]();
        }
        exposeFunction() {
          throw new UnsupportedOperation();
        }
        async frameElement() {
          const parent = this.parentFrame();
          if (!parent) {
            return null;
          }
          const { backendNodeId } = await parent.client.send("DOM.getFrameOwner", {
            frameId: this._id
          });
          return await parent.mainRealm().adoptBackendNode(backendNodeId);
        }
      };
    })();
    FrameTree = class {
      #frames = /* @__PURE__ */ new Map();
      #parentIds = /* @__PURE__ */ new Map();
      #childIds = /* @__PURE__ */ new Map();
      #mainFrame;
      #isMainFrameStale = false;
      #waitRequests = /* @__PURE__ */ new Map();
      getMainFrame() {
        return this.#mainFrame;
      }
      getById(frameId) {
        return this.#frames.get(frameId);
      }
      waitForFrame(frameId) {
        const frame = this.getById(frameId);
        if (frame) {
          return Promise.resolve(frame);
        }
        const deferred = Deferred.create();
        const callbacks = this.#waitRequests.get(frameId) || /* @__PURE__ */ new Set();
        callbacks.add(deferred);
        return deferred.valueOrThrow();
      }
      frames() {
        return Array.from(this.#frames.values());
      }
      addFrame(frame) {
        this.#frames.set(frame._id, frame);
        if (frame._parentId) {
          this.#parentIds.set(frame._id, frame._parentId);
          if (!this.#childIds.has(frame._parentId)) {
            this.#childIds.set(frame._parentId, /* @__PURE__ */ new Set());
          }
          this.#childIds.get(frame._parentId).add(frame._id);
        } else if (!this.#mainFrame || this.#isMainFrameStale) {
          this.#mainFrame = frame;
          this.#isMainFrameStale = false;
        }
        this.#waitRequests.get(frame._id)?.forEach((request3) => {
          return request3.resolve(frame);
        });
      }
      removeFrame(frame) {
        this.#frames.delete(frame._id);
        this.#parentIds.delete(frame._id);
        if (frame._parentId) {
          this.#childIds.get(frame._parentId)?.delete(frame._id);
        } else {
          this.#isMainFrameStale = true;
        }
      }
      childFrames(frameId) {
        const childIds = this.#childIds.get(frameId);
        if (!childIds) {
          return [];
        }
        return Array.from(childIds).map((id2) => {
          return this.getById(id2);
        }).filter((frame) => {
          return frame !== void 0;
        });
      }
      parentFrame(frameId) {
        const parentId = this.#parentIds.get(frameId);
        return parentId ? this.getById(parentId) : void 0;
      }
    };
    CdpHTTPRequest = class extends HTTPRequest {
      id;
      #client;
      #isNavigationRequest;
      #url;
      #resourceType;
      #method;
      #hasPostData = false;
      #postData;
      #headers = {};
      #frame;
      #initiator;
      get client() {
        return this.#client;
      }
      set client(newClient) {
        this.#client = newClient;
      }
      constructor(client, frame, interceptionId, allowInterception, data32, redirectChain) {
        super();
        this.#client = client;
        this.id = data32.requestId;
        this.#isNavigationRequest = data32.requestId === data32.loaderId && data32.type === "Document";
        this._interceptionId = interceptionId;
        this.#url = data32.request.url + (data32.request.urlFragment ?? "");
        this.#resourceType = (data32.type || "other").toLowerCase();
        this.#method = data32.request.method;
        if (data32.request.postDataEntries && data32.request.postDataEntries.length > 0) {
          this.#postData = new TextDecoder().decode(mergeUint8Arrays(data32.request.postDataEntries.map((entry) => {
            return entry.bytes ? stringToTypedArray(entry.bytes, true) : null;
          }).filter((entry) => {
            return entry !== null;
          })));
        } else {
          this.#postData = data32.request.postData;
        }
        this.#hasPostData = data32.request.hasPostData ?? false;
        this.#frame = frame;
        this._redirectChain = redirectChain;
        this.#initiator = data32.initiator;
        this.interception.enabled = allowInterception;
        this.updateHeaders(data32.request.headers);
      }
      updateHeaders(headers) {
        for (const [key, value] of Object.entries(headers)) {
          this.#headers[key.toLowerCase()] = value;
        }
      }
      url() {
        return this.#url;
      }
      resourceType() {
        return this.#resourceType;
      }
      method() {
        return this.#method;
      }
      postData() {
        return this.#postData;
      }
      hasPostData() {
        return this.#hasPostData;
      }
      async fetchPostData() {
        try {
          const result = await this.#client.send("Network.getRequestPostData", {
            requestId: this.id
          });
          return result.postData;
        } catch (err) {
          debugError(err);
          return;
        }
      }
      headers() {
        return structuredClone(this.#headers);
      }
      response() {
        return this._response;
      }
      frame() {
        return this.#frame;
      }
      isNavigationRequest() {
        return this.#isNavigationRequest;
      }
      initiator() {
        return this.#initiator;
      }
      redirectChain() {
        return this._redirectChain.slice();
      }
      failure() {
        if (!this._failureText) {
          return null;
        }
        return {
          errorText: this._failureText
        };
      }
      canBeIntercepted() {
        return !this.url().startsWith("data:") && !this._fromMemoryCache;
      }
      async _continue(overrides = {}) {
        const { url, method, postData, headers } = overrides;
        this.interception.handled = true;
        const postDataBinaryBase64 = postData ? stringToBase64(postData) : void 0;
        if (this._interceptionId === void 0) {
          throw new Error("HTTPRequest is missing _interceptionId needed for Fetch.continueRequest");
        }
        await this.#client.send("Fetch.continueRequest", {
          requestId: this._interceptionId,
          url,
          method,
          postData: postDataBinaryBase64,
          headers: headers ? headersArray(headers) : void 0
        }).catch((error) => {
          this.interception.handled = false;
          return handleError(error);
        });
      }
      async _respond(response) {
        this.interception.handled = true;
        let parsedBody;
        if (response.body) {
          parsedBody = HTTPRequest.getResponse(response.body);
        }
        const responseHeaders = {};
        if (response.headers) {
          for (const header of Object.keys(response.headers)) {
            const value = response.headers[header];
            responseHeaders[header.toLowerCase()] = Array.isArray(value) ? value.map((item) => {
              return String(item);
            }) : String(value);
          }
        }
        if (response.contentType) {
          responseHeaders["content-type"] = response.contentType;
        }
        if (parsedBody?.contentLength && !("content-length" in responseHeaders)) {
          responseHeaders["content-length"] = String(parsedBody.contentLength);
        }
        const status = response.status || 200;
        if (this._interceptionId === void 0) {
          throw new Error("HTTPRequest is missing _interceptionId needed for Fetch.fulfillRequest");
        }
        await this.#client.send("Fetch.fulfillRequest", {
          requestId: this._interceptionId,
          responseCode: status,
          responsePhrase: STATUS_TEXTS[status],
          responseHeaders: headersArray(responseHeaders),
          body: parsedBody?.base64
        }).catch((error) => {
          this.interception.handled = false;
          return handleError(error);
        });
      }
      async _abort(errorReason) {
        this.interception.handled = true;
        if (this._interceptionId === void 0) {
          throw new Error("HTTPRequest is missing _interceptionId needed for Fetch.failRequest");
        }
        await this.#client.send("Fetch.failRequest", {
          requestId: this._interceptionId,
          errorReason: errorReason || "Failed"
        }).catch(handleError);
      }
    };
    SecurityDetails = class {
      #subjectName;
      #issuer;
      #validFrom;
      #validTo;
      #protocol;
      #sanList;
      constructor(securityPayload) {
        this.#subjectName = securityPayload.subjectName;
        this.#issuer = securityPayload.issuer;
        this.#validFrom = securityPayload.validFrom;
        this.#validTo = securityPayload.validTo;
        this.#protocol = securityPayload.protocol;
        this.#sanList = securityPayload.sanList;
      }
      issuer() {
        return this.#issuer;
      }
      validFrom() {
        return this.#validFrom;
      }
      validTo() {
        return this.#validTo;
      }
      protocol() {
        return this.#protocol;
      }
      subjectName() {
        return this.#subjectName;
      }
      subjectAlternativeNames() {
        return this.#sanList;
      }
    };
    CdpHTTPResponse = class extends HTTPResponse {
      #request;
      #contentPromise = null;
      #bodyLoadedDeferred = Deferred.create();
      #remoteAddress;
      #status;
      #statusText;
      #fromDiskCache;
      #fromServiceWorker;
      #headers = {};
      #securityDetails;
      #timing;
      constructor(request3, responsePayload, extraInfo) {
        super();
        this.#request = request3;
        this.#remoteAddress = {
          ip: responsePayload.remoteIPAddress,
          port: responsePayload.remotePort
        };
        this.#statusText = this.#parseStatusTextFromExtraInfo(extraInfo) || responsePayload.statusText;
        this.#fromDiskCache = !!responsePayload.fromDiskCache;
        this.#fromServiceWorker = !!responsePayload.fromServiceWorker;
        this.#status = extraInfo ? extraInfo.statusCode : responsePayload.status;
        const headers = extraInfo ? extraInfo.headers : responsePayload.headers;
        for (const [key, value] of Object.entries(headers)) {
          this.#headers[key.toLowerCase()] = value;
        }
        this.#securityDetails = responsePayload.securityDetails ? new SecurityDetails(responsePayload.securityDetails) : null;
        this.#timing = responsePayload.timing || null;
      }
      #parseStatusTextFromExtraInfo(extraInfo) {
        if (!extraInfo || !extraInfo.headersText) {
          return;
        }
        const firstLine = extraInfo.headersText.split("\r", 1)[0];
        if (!firstLine || firstLine.length > 1e3) {
          return;
        }
        const match = firstLine.match(/[^ ]* [^ ]* (.*)/);
        if (!match) {
          return;
        }
        const statusText = match[1];
        if (!statusText) {
          return;
        }
        return statusText;
      }
      _resolveBody(err) {
        if (err) {
          return this.#bodyLoadedDeferred.reject(err);
        }
        return this.#bodyLoadedDeferred.resolve();
      }
      remoteAddress() {
        return this.#remoteAddress;
      }
      url() {
        return this.#request.url();
      }
      status() {
        return this.#status;
      }
      statusText() {
        return this.#statusText;
      }
      headers() {
        return this.#headers;
      }
      securityDetails() {
        return this.#securityDetails;
      }
      timing() {
        return this.#timing;
      }
      content() {
        if (!this.#contentPromise) {
          this.#contentPromise = this.#bodyLoadedDeferred.valueOrThrow().then(async () => {
            try {
              const response = await this.#request.client.send("Network.getResponseBody", {
                requestId: this.#request.id
              });
              return stringToTypedArray(response.body, response.base64Encoded);
            } catch (error) {
              if (error instanceof ProtocolError && error.originalMessage === "No resource with given identifier found") {
                throw new ProtocolError("Could not load response body for this request. This might happen if the request is a preflight request.");
              }
              throw error;
            }
          });
        }
        return this.#contentPromise;
      }
      request() {
        return this.#request;
      }
      fromCache() {
        return this.#fromDiskCache || this.#request._fromMemoryCache;
      }
      fromServiceWorker() {
        return this.#fromServiceWorker;
      }
      frame() {
        return this.#request.frame();
      }
    };
    NetworkEventManager = class {
      #requestWillBeSentMap = /* @__PURE__ */ new Map();
      #requestPausedMap = /* @__PURE__ */ new Map();
      #httpRequestsMap = /* @__PURE__ */ new Map();
      #requestWillBeSentExtraInfoMap = /* @__PURE__ */ new Map();
      #responseReceivedExtraInfoMap = /* @__PURE__ */ new Map();
      #queuedRedirectInfoMap = /* @__PURE__ */ new Map();
      #queuedEventGroupMap = /* @__PURE__ */ new Map();
      forget(networkRequestId) {
        this.#requestWillBeSentMap.delete(networkRequestId);
        this.#requestPausedMap.delete(networkRequestId);
        this.#requestWillBeSentExtraInfoMap.delete(networkRequestId);
        this.#queuedEventGroupMap.delete(networkRequestId);
        this.#queuedRedirectInfoMap.delete(networkRequestId);
        this.#responseReceivedExtraInfoMap.delete(networkRequestId);
      }
      requestExtraInfo(networkRequestId) {
        if (!this.#requestWillBeSentExtraInfoMap.has(networkRequestId)) {
          this.#requestWillBeSentExtraInfoMap.set(networkRequestId, []);
        }
        return this.#requestWillBeSentExtraInfoMap.get(networkRequestId);
      }
      responseExtraInfo(networkRequestId) {
        if (!this.#responseReceivedExtraInfoMap.has(networkRequestId)) {
          this.#responseReceivedExtraInfoMap.set(networkRequestId, []);
        }
        return this.#responseReceivedExtraInfoMap.get(networkRequestId);
      }
      queuedRedirectInfo(fetchRequestId) {
        if (!this.#queuedRedirectInfoMap.has(fetchRequestId)) {
          this.#queuedRedirectInfoMap.set(fetchRequestId, []);
        }
        return this.#queuedRedirectInfoMap.get(fetchRequestId);
      }
      queueRedirectInfo(fetchRequestId, redirectInfo) {
        this.queuedRedirectInfo(fetchRequestId).push(redirectInfo);
      }
      takeQueuedRedirectInfo(fetchRequestId) {
        return this.queuedRedirectInfo(fetchRequestId).shift();
      }
      inFlightRequestsCount() {
        let inFlightRequestCounter = 0;
        for (const request3 of this.#httpRequestsMap.values()) {
          if (!request3.response()) {
            inFlightRequestCounter++;
          }
        }
        return inFlightRequestCounter;
      }
      storeRequestWillBeSent(networkRequestId, event) {
        this.#requestWillBeSentMap.set(networkRequestId, event);
      }
      getRequestWillBeSent(networkRequestId) {
        return this.#requestWillBeSentMap.get(networkRequestId);
      }
      forgetRequestWillBeSent(networkRequestId) {
        this.#requestWillBeSentMap.delete(networkRequestId);
      }
      getRequestPaused(networkRequestId) {
        return this.#requestPausedMap.get(networkRequestId);
      }
      forgetRequestPaused(networkRequestId) {
        this.#requestPausedMap.delete(networkRequestId);
      }
      storeRequestPaused(networkRequestId, event) {
        this.#requestPausedMap.set(networkRequestId, event);
      }
      getRequest(networkRequestId) {
        return this.#httpRequestsMap.get(networkRequestId);
      }
      storeRequest(networkRequestId, request3) {
        this.#httpRequestsMap.set(networkRequestId, request3);
      }
      forgetRequest(networkRequestId) {
        this.#httpRequestsMap.delete(networkRequestId);
      }
      getQueuedEventGroup(networkRequestId) {
        return this.#queuedEventGroupMap.get(networkRequestId);
      }
      queueEventGroup(networkRequestId, event) {
        this.#queuedEventGroupMap.set(networkRequestId, event);
      }
      forgetQueuedEventGroup(networkRequestId) {
        this.#queuedEventGroupMap.delete(networkRequestId);
      }
      printState() {
        function replacer(_key, value) {
          if (value instanceof Map) {
            return {
              dataType: "Map",
              value: Array.from(value.entries())
            };
          } else if (value instanceof CdpHTTPRequest) {
            return {
              dataType: "CdpHTTPRequest",
              value: `${value.id}: ${value.url()}`
            };
          }
          {
            return value;
          }
        }
        console.log("httpRequestsMap", JSON.stringify(this.#httpRequestsMap, replacer, 2));
        console.log("requestWillBeSentMap", JSON.stringify(this.#requestWillBeSentMap, replacer, 2));
        console.log("requestWillBeSentMap", JSON.stringify(this.#responseReceivedExtraInfoMap, replacer, 2));
        console.log("requestWillBeSentMap", JSON.stringify(this.#requestPausedMap, replacer, 2));
      }
    };
    NetworkManager$1 = class NetworkManager extends EventEmitter6 {
      #frameManager;
      #networkEventManager = new NetworkEventManager();
      #extraHTTPHeaders;
      #credentials = null;
      #attemptedAuthentications = /* @__PURE__ */ new Set();
      #userRequestInterceptionEnabled = false;
      #protocolRequestInterceptionEnabled;
      #userCacheDisabled;
      #emulatedNetworkConditions;
      #userAgent;
      #userAgentMetadata;
      #platform;
      #handlers = [
        ["Fetch.requestPaused", this.#onRequestPaused],
        ["Fetch.authRequired", this.#onAuthRequired],
        ["Network.requestWillBeSent", this.#onRequestWillBeSent],
        ["Network.requestWillBeSentExtraInfo", this.#onRequestWillBeSentExtraInfo],
        ["Network.requestServedFromCache", this.#onRequestServedFromCache],
        ["Network.responseReceived", this.#onResponseReceived],
        ["Network.loadingFinished", this.#onLoadingFinished],
        ["Network.loadingFailed", this.#onLoadingFailed],
        ["Network.responseReceivedExtraInfo", this.#onResponseReceivedExtraInfo],
        [CDPSessionEvent.Disconnected, this.#removeClient]
      ];
      #clients = /* @__PURE__ */ new Map();
      #networkEnabled = true;
      constructor(frameManager, networkEnabled) {
        super();
        this.#frameManager = frameManager;
        this.#networkEnabled = networkEnabled ?? true;
      }
      #canIgnoreError(error) {
        return isErrorLike$1(error) && (isTargetClosedError(error) || error.message.includes("Not supported") || error.message.includes("wasn't found"));
      }
      async addClient(client) {
        if (!this.#networkEnabled || this.#clients.has(client)) {
          return;
        }
        const subscriptions = new DisposableStack();
        this.#clients.set(client, subscriptions);
        const clientEmitter = subscriptions.use(new EventEmitter6(client));
        for (const [event, handler] of this.#handlers) {
          clientEmitter.on(event, (arg) => {
            return handler.bind(this)(client, arg);
          });
        }
        try {
          await Promise.all([
            client.send("Network.enable"),
            this.#applyExtraHTTPHeaders(client),
            this.#applyNetworkConditions(client),
            this.#applyProtocolCacheDisabled(client),
            this.#applyProtocolRequestInterception(client),
            this.#applyUserAgent(client)
          ]);
        } catch (error) {
          if (this.#canIgnoreError(error)) {
            return;
          }
          throw error;
        }
      }
      async #removeClient(client) {
        this.#clients.get(client)?.dispose();
        this.#clients.delete(client);
      }
      async authenticate(credentials) {
        this.#credentials = credentials;
        const enabled = this.#userRequestInterceptionEnabled || !!this.#credentials;
        if (enabled === this.#protocolRequestInterceptionEnabled) {
          return;
        }
        this.#protocolRequestInterceptionEnabled = enabled;
        await this.#applyToAllClients(this.#applyProtocolRequestInterception.bind(this));
      }
      async setExtraHTTPHeaders(headers) {
        const extraHTTPHeaders = {};
        for (const [key, value] of Object.entries(headers)) {
          assert(isString(value), `Expected value of header "${key}" to be String, but "${typeof value}" is found.`);
          extraHTTPHeaders[key.toLowerCase()] = value;
        }
        this.#extraHTTPHeaders = extraHTTPHeaders;
        await this.#applyToAllClients(this.#applyExtraHTTPHeaders.bind(this));
      }
      async #applyExtraHTTPHeaders(client) {
        if (this.#extraHTTPHeaders === void 0) {
          return;
        }
        try {
          await client.send("Network.setExtraHTTPHeaders", {
            headers: this.#extraHTTPHeaders
          });
        } catch (error) {
          if (this.#canIgnoreError(error)) {
            return;
          }
          throw error;
        }
      }
      extraHTTPHeaders() {
        return Object.assign({}, this.#extraHTTPHeaders);
      }
      inFlightRequestsCount() {
        return this.#networkEventManager.inFlightRequestsCount();
      }
      async setOfflineMode(value) {
        if (!this.#emulatedNetworkConditions) {
          this.#emulatedNetworkConditions = {
            offline: false,
            upload: -1,
            download: -1,
            latency: 0
          };
        }
        this.#emulatedNetworkConditions.offline = value;
        await this.#applyToAllClients(this.#applyNetworkConditions.bind(this));
      }
      async emulateNetworkConditions(networkConditions) {
        if (!this.#emulatedNetworkConditions) {
          this.#emulatedNetworkConditions = {
            offline: networkConditions?.offline ?? false,
            upload: -1,
            download: -1,
            latency: 0
          };
        }
        this.#emulatedNetworkConditions.upload = networkConditions ? networkConditions.upload : -1;
        this.#emulatedNetworkConditions.download = networkConditions ? networkConditions.download : -1;
        this.#emulatedNetworkConditions.latency = networkConditions ? networkConditions.latency : 0;
        this.#emulatedNetworkConditions.offline = networkConditions?.offline ?? false;
        await this.#applyToAllClients(this.#applyNetworkConditions.bind(this));
      }
      async #applyToAllClients(fn) {
        await Promise.all(Array.from(this.#clients.keys()).map((client) => {
          return fn(client);
        }));
      }
      async #applyNetworkConditions(client) {
        if (this.#emulatedNetworkConditions === void 0) {
          return;
        }
        try {
          await client.send("Network.emulateNetworkConditions", {
            offline: this.#emulatedNetworkConditions.offline,
            latency: this.#emulatedNetworkConditions.latency,
            uploadThroughput: this.#emulatedNetworkConditions.upload,
            downloadThroughput: this.#emulatedNetworkConditions.download
          });
        } catch (error) {
          if (this.#canIgnoreError(error)) {
            return;
          }
          throw error;
        }
      }
      async setUserAgent(userAgent, userAgentMetadata, platform) {
        this.#userAgent = userAgent;
        this.#userAgentMetadata = userAgentMetadata;
        this.#platform = platform;
        await this.#applyToAllClients(this.#applyUserAgent.bind(this));
      }
      async #applyUserAgent(client) {
        if (this.#userAgent === void 0) {
          return;
        }
        try {
          await client.send("Network.setUserAgentOverride", {
            userAgent: this.#userAgent,
            userAgentMetadata: this.#userAgentMetadata,
            platform: this.#platform
          });
        } catch (error) {
          if (this.#canIgnoreError(error)) {
            return;
          }
          throw error;
        }
      }
      async setCacheEnabled(enabled) {
        this.#userCacheDisabled = !enabled;
        await this.#applyToAllClients(this.#applyProtocolCacheDisabled.bind(this));
      }
      async setRequestInterception(value) {
        this.#userRequestInterceptionEnabled = value;
        const enabled = this.#userRequestInterceptionEnabled || !!this.#credentials;
        if (enabled === this.#protocolRequestInterceptionEnabled) {
          return;
        }
        this.#protocolRequestInterceptionEnabled = enabled;
        await this.#applyToAllClients(this.#applyProtocolRequestInterception.bind(this));
      }
      async #applyProtocolRequestInterception(client) {
        if (this.#protocolRequestInterceptionEnabled === void 0) {
          return;
        }
        if (this.#userCacheDisabled === void 0) {
          this.#userCacheDisabled = false;
        }
        try {
          if (this.#protocolRequestInterceptionEnabled) {
            await Promise.all([
              this.#applyProtocolCacheDisabled(client),
              client.send("Fetch.enable", {
                handleAuthRequests: true,
                patterns: [{ urlPattern: "*" }]
              })
            ]);
          } else {
            await Promise.all([
              this.#applyProtocolCacheDisabled(client),
              client.send("Fetch.disable")
            ]);
          }
        } catch (error) {
          if (this.#canIgnoreError(error)) {
            return;
          }
          throw error;
        }
      }
      async #applyProtocolCacheDisabled(client) {
        if (this.#userCacheDisabled === void 0) {
          return;
        }
        try {
          await client.send("Network.setCacheDisabled", {
            cacheDisabled: this.#userCacheDisabled
          });
        } catch (error) {
          if (this.#canIgnoreError(error)) {
            return;
          }
          throw error;
        }
      }
      #onRequestWillBeSent(client, event) {
        if (this.#userRequestInterceptionEnabled && !event.request.url.startsWith("data:")) {
          const { requestId: networkRequestId } = event;
          this.#networkEventManager.storeRequestWillBeSent(networkRequestId, event);
          const requestPausedEvent = this.#networkEventManager.getRequestPaused(networkRequestId);
          if (requestPausedEvent) {
            const { requestId: fetchRequestId } = requestPausedEvent;
            this.#patchRequestEventHeaders(event, requestPausedEvent);
            this.#onRequest(client, event, fetchRequestId);
            this.#networkEventManager.forgetRequestPaused(networkRequestId);
          }
          return;
        }
        this.#onRequest(client, event, void 0);
      }
      #onAuthRequired(client, event) {
        let response = "Default";
        if (this.#attemptedAuthentications.has(event.requestId)) {
          response = "CancelAuth";
        } else if (this.#credentials) {
          response = "ProvideCredentials";
          this.#attemptedAuthentications.add(event.requestId);
        }
        const { username, password } = this.#credentials || {
          username: void 0,
          password: void 0
        };
        client.send("Fetch.continueWithAuth", {
          requestId: event.requestId,
          authChallengeResponse: { response, username, password }
        }).catch(debugError);
      }
      #onRequestPaused(client, event) {
        if (!this.#userRequestInterceptionEnabled && this.#protocolRequestInterceptionEnabled) {
          client.send("Fetch.continueRequest", {
            requestId: event.requestId
          }).catch(debugError);
        }
        const { networkId: networkRequestId, requestId: fetchRequestId } = event;
        if (!networkRequestId) {
          this.#onRequestWithoutNetworkInstrumentation(client, event);
          return;
        }
        const requestWillBeSentEvent = (() => {
          const requestWillBeSentEvent2 = this.#networkEventManager.getRequestWillBeSent(networkRequestId);
          if (requestWillBeSentEvent2 && (requestWillBeSentEvent2.request.url !== event.request.url || requestWillBeSentEvent2.request.method !== event.request.method)) {
            this.#networkEventManager.forgetRequestWillBeSent(networkRequestId);
            return;
          }
          return requestWillBeSentEvent2;
        })();
        if (requestWillBeSentEvent) {
          this.#patchRequestEventHeaders(requestWillBeSentEvent, event);
          this.#onRequest(client, requestWillBeSentEvent, fetchRequestId);
        } else {
          this.#networkEventManager.storeRequestPaused(networkRequestId, event);
        }
      }
      #patchRequestEventHeaders(requestWillBeSentEvent, requestPausedEvent) {
        requestWillBeSentEvent.request.headers = {
          ...requestWillBeSentEvent.request.headers,
          ...requestPausedEvent.request.headers
        };
      }
      #onRequestWithoutNetworkInstrumentation(client, event) {
        const frame = event.frameId ? this.#frameManager.frame(event.frameId) : null;
        const request3 = new CdpHTTPRequest(client, frame, event.requestId, this.#userRequestInterceptionEnabled, event, []);
        this.emit(NetworkManagerEvent.Request, request3);
        void request3.finalizeInterceptions();
      }
      #onRequest(client, event, fetchRequestId, fromMemoryCache = false) {
        let redirectChain = [];
        if (event.redirectResponse) {
          let redirectResponseExtraInfo = null;
          if (event.redirectHasExtraInfo) {
            redirectResponseExtraInfo = this.#networkEventManager.responseExtraInfo(event.requestId).shift();
            if (!redirectResponseExtraInfo) {
              this.#networkEventManager.queueRedirectInfo(event.requestId, {
                event,
                fetchRequestId
              });
              return;
            }
          }
          const request4 = this.#networkEventManager.getRequest(event.requestId);
          if (request4) {
            this.#handleRequestRedirect(client, request4, event.redirectResponse, redirectResponseExtraInfo);
            redirectChain = request4._redirectChain;
            const extraInfo2 = this.#networkEventManager.requestExtraInfo(event.requestId).shift();
            if (extraInfo2) {
              request4.updateHeaders(extraInfo2.headers);
            }
          }
        }
        const frame = event.frameId ? this.#frameManager.frame(event.frameId) : null;
        const request3 = new CdpHTTPRequest(client, frame, fetchRequestId, this.#userRequestInterceptionEnabled, event, redirectChain);
        const extraInfo = this.#networkEventManager.requestExtraInfo(event.requestId).shift();
        if (extraInfo) {
          request3.updateHeaders(extraInfo.headers);
        }
        request3._fromMemoryCache = fromMemoryCache;
        this.#networkEventManager.storeRequest(event.requestId, request3);
        this.emit(NetworkManagerEvent.Request, request3);
        void request3.finalizeInterceptions();
      }
      #onRequestWillBeSentExtraInfo(_client, event) {
        const request3 = this.#networkEventManager.getRequest(event.requestId);
        if (request3) {
          request3.updateHeaders(event.headers);
        } else {
          this.#networkEventManager.requestExtraInfo(event.requestId).push(event);
        }
      }
      #onRequestServedFromCache(client, event) {
        const requestWillBeSentEvent = this.#networkEventManager.getRequestWillBeSent(event.requestId);
        let request3 = this.#networkEventManager.getRequest(event.requestId);
        if (request3) {
          request3._fromMemoryCache = true;
        }
        if (!request3 && requestWillBeSentEvent) {
          this.#onRequest(client, requestWillBeSentEvent, void 0, true);
          request3 = this.#networkEventManager.getRequest(event.requestId);
        }
        if (!request3) {
          debugError(new Error(`Request ${event.requestId} was served from cache but we could not find the corresponding request object`));
          return;
        }
        this.emit(NetworkManagerEvent.RequestServedFromCache, request3);
      }
      #handleRequestRedirect(_client, request3, responsePayload, extraInfo) {
        const response = new CdpHTTPResponse(request3, responsePayload, extraInfo);
        request3._response = response;
        request3._redirectChain.push(request3);
        response._resolveBody(new Error("Response body is unavailable for redirect responses"));
        this.#forgetRequest(request3, false);
        this.emit(NetworkManagerEvent.Response, response);
        this.emit(NetworkManagerEvent.RequestFinished, request3);
      }
      #emitResponseEvent(_client, responseReceived, extraInfo) {
        const request3 = this.#networkEventManager.getRequest(responseReceived.requestId);
        if (!request3) {
          return;
        }
        const extraInfos = this.#networkEventManager.responseExtraInfo(responseReceived.requestId);
        if (extraInfos.length) {
          debugError(new Error("Unexpected extraInfo events for request " + responseReceived.requestId));
        }
        if (responseReceived.response.fromDiskCache) {
          extraInfo = null;
        }
        const response = new CdpHTTPResponse(request3, responseReceived.response, extraInfo);
        request3._response = response;
        this.emit(NetworkManagerEvent.Response, response);
      }
      #onResponseReceived(client, event) {
        const request3 = this.#networkEventManager.getRequest(event.requestId);
        let extraInfo = null;
        if (request3 && !request3._fromMemoryCache && event.hasExtraInfo) {
          extraInfo = this.#networkEventManager.responseExtraInfo(event.requestId).shift();
          if (!extraInfo) {
            this.#networkEventManager.queueEventGroup(event.requestId, {
              responseReceivedEvent: event
            });
            return;
          }
        }
        this.#emitResponseEvent(client, event, extraInfo);
      }
      #onResponseReceivedExtraInfo(client, event) {
        const redirectInfo = this.#networkEventManager.takeQueuedRedirectInfo(event.requestId);
        if (redirectInfo) {
          this.#networkEventManager.responseExtraInfo(event.requestId).push(event);
          this.#onRequest(client, redirectInfo.event, redirectInfo.fetchRequestId);
          return;
        }
        const queuedEvents = this.#networkEventManager.getQueuedEventGroup(event.requestId);
        if (queuedEvents) {
          this.#networkEventManager.forgetQueuedEventGroup(event.requestId);
          this.#emitResponseEvent(client, queuedEvents.responseReceivedEvent, event);
          if (queuedEvents.loadingFinishedEvent) {
            this.#emitLoadingFinished(client, queuedEvents.loadingFinishedEvent);
          }
          if (queuedEvents.loadingFailedEvent) {
            this.#emitLoadingFailed(client, queuedEvents.loadingFailedEvent);
          }
          return;
        }
        this.#networkEventManager.responseExtraInfo(event.requestId).push(event);
      }
      #forgetRequest(request3, events) {
        const requestId = request3.id;
        const interceptionId = request3._interceptionId;
        this.#networkEventManager.forgetRequest(requestId);
        if (interceptionId !== void 0) {
          this.#attemptedAuthentications.delete(interceptionId);
        }
        if (events) {
          this.#networkEventManager.forget(requestId);
        }
      }
      #onLoadingFinished(client, event) {
        const queuedEvents = this.#networkEventManager.getQueuedEventGroup(event.requestId);
        if (queuedEvents) {
          queuedEvents.loadingFinishedEvent = event;
        } else {
          this.#emitLoadingFinished(client, event);
        }
      }
      #emitLoadingFinished(client, event) {
        const request3 = this.#networkEventManager.getRequest(event.requestId);
        if (!request3) {
          return;
        }
        this.#adoptCdpSessionIfNeeded(client, request3);
        if (request3.response()) {
          request3.response()?._resolveBody();
        }
        this.#forgetRequest(request3, true);
        this.emit(NetworkManagerEvent.RequestFinished, request3);
      }
      #onLoadingFailed(client, event) {
        const queuedEvents = this.#networkEventManager.getQueuedEventGroup(event.requestId);
        if (queuedEvents) {
          queuedEvents.loadingFailedEvent = event;
        } else {
          this.#emitLoadingFailed(client, event);
        }
      }
      #emitLoadingFailed(client, event) {
        const request3 = this.#networkEventManager.getRequest(event.requestId);
        if (!request3) {
          return;
        }
        this.#adoptCdpSessionIfNeeded(client, request3);
        request3._failureText = event.errorText;
        const response = request3.response();
        if (response) {
          response._resolveBody();
        }
        this.#forgetRequest(request3, true);
        this.emit(NetworkManagerEvent.RequestFailed, request3);
      }
      #adoptCdpSessionIfNeeded(client, request3) {
        if (client !== request3.client) {
          request3.client = client;
        }
      }
    };
    TIME_FOR_WAITING_FOR_SWAP = 100;
    FrameManager$1 = class FrameManager extends EventEmitter6 {
      #page;
      #networkManager;
      #timeoutSettings;
      #isolatedWorlds = /* @__PURE__ */ new Set();
      #client;
      #scriptsToEvaluateOnNewDocument = /* @__PURE__ */ new Map();
      #bindings = /* @__PURE__ */ new Set();
      _frameTree = new FrameTree();
      #frameNavigatedReceived = /* @__PURE__ */ new Set();
      #deviceRequestPromptManagerMap = /* @__PURE__ */ new WeakMap();
      #frameTreeHandled;
      get timeoutSettings() {
        return this.#timeoutSettings;
      }
      get networkManager() {
        return this.#networkManager;
      }
      get client() {
        return this.#client;
      }
      constructor(client, page, timeoutSettings) {
        super();
        this.#client = client;
        this.#page = page;
        this.#networkManager = new NetworkManager$1(this, page.browser().isNetworkEnabled());
        this.#timeoutSettings = timeoutSettings;
        this.setupEventListeners(this.#client);
        client.once(CDPSessionEvent.Disconnected, () => {
          this.#onClientDisconnect().catch(debugError);
        });
      }
      async #onClientDisconnect() {
        const mainFrame = this._frameTree.getMainFrame();
        if (!mainFrame) {
          return;
        }
        if (!this.#page.browser().connected) {
          this.#removeFramesRecursively(mainFrame);
          return;
        }
        for (const child of mainFrame.childFrames()) {
          this.#removeFramesRecursively(child);
        }
        const swapped = Deferred.create({
          timeout: TIME_FOR_WAITING_FOR_SWAP,
          message: "Frame was not swapped"
        });
        mainFrame.once(FrameEvent.FrameSwappedByActivation, () => {
          swapped.resolve();
        });
        try {
          await swapped.valueOrThrow();
        } catch {
          this.#removeFramesRecursively(mainFrame);
        }
      }
      async swapFrameTree(client) {
        this.#client = client;
        const frame = this._frameTree.getMainFrame();
        if (frame) {
          this.#frameNavigatedReceived.add(this.#client.target()._targetId);
          this._frameTree.removeFrame(frame);
          frame.updateId(this.#client.target()._targetId);
          this._frameTree.addFrame(frame);
          frame.updateClient(client);
        }
        this.setupEventListeners(client);
        client.once(CDPSessionEvent.Disconnected, () => {
          this.#onClientDisconnect().catch(debugError);
        });
        await this.initialize(client, frame);
        await this.#networkManager.addClient(client);
        if (frame) {
          frame.emit(FrameEvent.FrameSwappedByActivation, void 0);
        }
      }
      async registerSpeculativeSession(client) {
        await this.#networkManager.addClient(client);
      }
      setupEventListeners(session) {
        session.on("Page.frameAttached", async (event) => {
          await this.#frameTreeHandled?.valueOrThrow();
          this.#onFrameAttached(session, event.frameId, event.parentFrameId);
        });
        session.on("Page.frameNavigated", async (event) => {
          this.#frameNavigatedReceived.add(event.frame.id);
          await this.#frameTreeHandled?.valueOrThrow();
          void this.#onFrameNavigated(event.frame, event.type);
        });
        session.on("Page.navigatedWithinDocument", async (event) => {
          await this.#frameTreeHandled?.valueOrThrow();
          this.#onFrameNavigatedWithinDocument(event.frameId, event.url);
        });
        session.on("Page.frameDetached", async (event) => {
          await this.#frameTreeHandled?.valueOrThrow();
          this.#onFrameDetached(event.frameId, event.reason);
        });
        session.on("Page.frameStartedLoading", async (event) => {
          await this.#frameTreeHandled?.valueOrThrow();
          this.#onFrameStartedLoading(event.frameId);
        });
        session.on("Page.frameStoppedLoading", async (event) => {
          await this.#frameTreeHandled?.valueOrThrow();
          this.#onFrameStoppedLoading(event.frameId);
        });
        session.on("Runtime.executionContextCreated", async (event) => {
          await this.#frameTreeHandled?.valueOrThrow();
          this.#onExecutionContextCreated(event.context, session);
        });
        session.on("Page.lifecycleEvent", async (event) => {
          await this.#frameTreeHandled?.valueOrThrow();
          this.#onLifecycleEvent(event);
        });
      }
      async initialize(client, frame) {
        try {
          this.#frameTreeHandled?.resolve();
          this.#frameTreeHandled = Deferred.create();
          await Promise.all([
            this.#networkManager.addClient(client),
            client.send("Page.enable"),
            client.send("Page.getFrameTree").then(({ frameTree }) => {
              this.#handleFrameTree(client, frameTree);
              this.#frameTreeHandled?.resolve();
            }),
            client.send("Page.setLifecycleEventsEnabled", { enabled: true }),
            client.send("Runtime.enable").then(() => {
              return this.#createIsolatedWorld(client, UTILITY_WORLD_NAME);
            }),
            ...(frame ? Array.from(this.#scriptsToEvaluateOnNewDocument.values()) : []).map((script) => {
              return frame?.addPreloadScript(script);
            }),
            ...(frame ? Array.from(this.#bindings.values()) : []).map((binding) => {
              return frame?.addExposedFunctionBinding(binding);
            })
          ]);
        } catch (error) {
          this.#frameTreeHandled?.resolve();
          if (isErrorLike$1(error) && isTargetClosedError(error)) {
            return;
          }
          throw error;
        }
      }
      page() {
        return this.#page;
      }
      mainFrame() {
        const mainFrame = this._frameTree.getMainFrame();
        assert(mainFrame, "Requesting main frame too early!");
        return mainFrame;
      }
      frames() {
        return Array.from(this._frameTree.frames());
      }
      frame(frameId) {
        return this._frameTree.getById(frameId) || null;
      }
      async addExposedFunctionBinding(binding) {
        this.#bindings.add(binding);
        await Promise.all(this.frames().map(async (frame) => {
          return await frame.addExposedFunctionBinding(binding);
        }));
      }
      async removeExposedFunctionBinding(binding) {
        this.#bindings.delete(binding);
        await Promise.all(this.frames().map(async (frame) => {
          return await frame.removeExposedFunctionBinding(binding);
        }));
      }
      async evaluateOnNewDocument(source2) {
        const { identifier } = await this.mainFrame()._client().send("Page.addScriptToEvaluateOnNewDocument", {
          source: source2
        });
        const preloadScript = new CdpPreloadScript(this.mainFrame(), identifier, source2);
        this.#scriptsToEvaluateOnNewDocument.set(identifier, preloadScript);
        await Promise.all(this.frames().map(async (frame) => {
          return await frame.addPreloadScript(preloadScript);
        }));
        return { identifier };
      }
      async removeScriptToEvaluateOnNewDocument(identifier) {
        const preloadScript = this.#scriptsToEvaluateOnNewDocument.get(identifier);
        if (!preloadScript) {
          throw new Error(`Script to evaluate on new document with id ${identifier} not found`);
        }
        this.#scriptsToEvaluateOnNewDocument.delete(identifier);
        await Promise.all(this.frames().map((frame) => {
          const identifier2 = preloadScript.getIdForFrame(frame);
          if (!identifier2) {
            return;
          }
          return frame._client().send("Page.removeScriptToEvaluateOnNewDocument", {
            identifier: identifier2
          }).catch(debugError);
        }));
      }
      onAttachedToTarget(target) {
        if (target._getTargetInfo().type !== "iframe") {
          return;
        }
        const frame = this.frame(target._getTargetInfo().targetId);
        if (frame) {
          frame.updateClient(target._session());
        }
        this.setupEventListeners(target._session());
        void this.initialize(target._session(), frame).catch(debugError);
      }
      _deviceRequestPromptManager(client) {
        let manager = this.#deviceRequestPromptManagerMap.get(client);
        if (manager === void 0) {
          manager = new CdpDeviceRequestPromptManager(client, this.#timeoutSettings);
          this.#deviceRequestPromptManagerMap.set(client, manager);
        }
        return manager;
      }
      #onLifecycleEvent(event) {
        const frame = this.frame(event.frameId);
        if (!frame) {
          return;
        }
        frame._onLifecycleEvent(event.loaderId, event.name);
        this.emit(FrameManagerEvent.LifecycleEvent, frame);
        frame.emit(FrameEvent.LifecycleEvent, void 0);
      }
      #onFrameStartedLoading(frameId) {
        const frame = this.frame(frameId);
        if (!frame) {
          return;
        }
        frame._onLoadingStarted();
      }
      #onFrameStoppedLoading(frameId) {
        const frame = this.frame(frameId);
        if (!frame) {
          return;
        }
        frame._onLoadingStopped();
        this.emit(FrameManagerEvent.LifecycleEvent, frame);
        frame.emit(FrameEvent.LifecycleEvent, void 0);
      }
      #handleFrameTree(session, frameTree) {
        if (frameTree.frame.parentId) {
          this.#onFrameAttached(session, frameTree.frame.id, frameTree.frame.parentId);
        }
        if (!this.#frameNavigatedReceived.has(frameTree.frame.id)) {
          void this.#onFrameNavigated(frameTree.frame, "Navigation");
        } else {
          this.#frameNavigatedReceived.delete(frameTree.frame.id);
        }
        if (!frameTree.childFrames) {
          return;
        }
        for (const child of frameTree.childFrames) {
          this.#handleFrameTree(session, child);
        }
      }
      #onFrameAttached(session, frameId, parentFrameId) {
        let frame = this.frame(frameId);
        if (frame) {
          const parentFrame = this.frame(parentFrameId);
          if (session && parentFrame && frame.client !== parentFrame?.client) {
            frame.updateClient(session);
          }
          return;
        }
        frame = new CdpFrame(this, frameId, parentFrameId, session);
        this._frameTree.addFrame(frame);
        this.emit(FrameManagerEvent.FrameAttached, frame);
      }
      async #onFrameNavigated(framePayload, navigationType) {
        const frameId = framePayload.id;
        const isMainFrame = !framePayload.parentId;
        let frame = this._frameTree.getById(frameId);
        if (frame) {
          for (const child of frame.childFrames()) {
            this.#removeFramesRecursively(child);
          }
        }
        if (isMainFrame) {
          if (frame) {
            this._frameTree.removeFrame(frame);
            frame._id = frameId;
          } else {
            frame = new CdpFrame(this, frameId, void 0, this.#client);
          }
          this._frameTree.addFrame(frame);
        }
        frame = await this._frameTree.waitForFrame(frameId);
        frame._navigated(framePayload);
        this.emit(FrameManagerEvent.FrameNavigated, frame);
        frame.emit(FrameEvent.FrameNavigated, navigationType);
      }
      async #createIsolatedWorld(session, name) {
        const key = `${session.id()}:${name}`;
        if (this.#isolatedWorlds.has(key)) {
          return;
        }
        await session.send("Page.addScriptToEvaluateOnNewDocument", {
          source: `//# sourceURL=${PuppeteerURL.INTERNAL_URL}`,
          worldName: name
        });
        await Promise.all(this.frames().filter((frame) => {
          return frame.client === session;
        }).map((frame) => {
          return session.send("Page.createIsolatedWorld", {
            frameId: frame._id,
            worldName: name,
            grantUniveralAccess: true
          }).catch(debugError);
        }));
        this.#isolatedWorlds.add(key);
      }
      #onFrameNavigatedWithinDocument(frameId, url) {
        const frame = this.frame(frameId);
        if (!frame) {
          return;
        }
        frame._navigatedWithinDocument(url);
        this.emit(FrameManagerEvent.FrameNavigatedWithinDocument, frame);
        frame.emit(FrameEvent.FrameNavigatedWithinDocument, void 0);
        this.emit(FrameManagerEvent.FrameNavigated, frame);
        frame.emit(FrameEvent.FrameNavigated, "Navigation");
      }
      #onFrameDetached(frameId, reason) {
        const frame = this.frame(frameId);
        if (!frame) {
          return;
        }
        switch (reason) {
          case "remove":
            this.#removeFramesRecursively(frame);
            break;
          case "swap":
            this.emit(FrameManagerEvent.FrameSwapped, frame);
            frame.emit(FrameEvent.FrameSwapped, void 0);
            break;
        }
      }
      #onExecutionContextCreated(contextPayload, session) {
        const auxData = contextPayload.auxData;
        const frameId = auxData && auxData.frameId;
        const frame = typeof frameId === "string" ? this.frame(frameId) : void 0;
        let world;
        if (frame) {
          if (frame.client !== session) {
            return;
          }
          if (contextPayload.auxData && contextPayload.auxData["isDefault"]) {
            world = frame.worlds[MAIN_WORLD];
          } else if (contextPayload.name === UTILITY_WORLD_NAME) {
            world = frame.worlds[PUPPETEER_WORLD];
          }
        }
        if (!world) {
          return;
        }
        const context2 = new ExecutionContext$1(frame?.client || this.#client, contextPayload, world);
        world.setContext(context2);
      }
      #removeFramesRecursively(frame) {
        for (const child of frame.childFrames()) {
          this.#removeFramesRecursively(child);
        }
        frame[disposeSymbol]();
        this._frameTree.removeFrame(frame);
        this.emit(FrameManagerEvent.FrameDetached, frame);
        frame.emit(FrameEvent.FrameDetached, frame);
      }
    };
    _keyDefinitions = {
      "0": { keyCode: 48, key: "0", code: "Digit0" },
      "1": { keyCode: 49, key: "1", code: "Digit1" },
      "2": { keyCode: 50, key: "2", code: "Digit2" },
      "3": { keyCode: 51, key: "3", code: "Digit3" },
      "4": { keyCode: 52, key: "4", code: "Digit4" },
      "5": { keyCode: 53, key: "5", code: "Digit5" },
      "6": { keyCode: 54, key: "6", code: "Digit6" },
      "7": { keyCode: 55, key: "7", code: "Digit7" },
      "8": { keyCode: 56, key: "8", code: "Digit8" },
      "9": { keyCode: 57, key: "9", code: "Digit9" },
      Power: { key: "Power", code: "Power" },
      Eject: { key: "Eject", code: "Eject" },
      Abort: { keyCode: 3, code: "Abort", key: "Cancel" },
      Help: { keyCode: 6, code: "Help", key: "Help" },
      Backspace: { keyCode: 8, code: "Backspace", key: "Backspace" },
      Tab: { keyCode: 9, code: "Tab", key: "Tab" },
      Numpad5: {
        keyCode: 12,
        shiftKeyCode: 101,
        key: "Clear",
        code: "Numpad5",
        shiftKey: "5",
        location: 3
      },
      NumpadEnter: {
        keyCode: 13,
        code: "NumpadEnter",
        key: "Enter",
        text: "\r",
        location: 3
      },
      Enter: { keyCode: 13, code: "Enter", key: "Enter", text: "\r" },
      "\r": { keyCode: 13, code: "Enter", key: "Enter", text: "\r" },
      "\n": { keyCode: 13, code: "Enter", key: "Enter", text: "\r" },
      ShiftLeft: { keyCode: 16, code: "ShiftLeft", key: "Shift", location: 1 },
      ShiftRight: { keyCode: 16, code: "ShiftRight", key: "Shift", location: 2 },
      ControlLeft: {
        keyCode: 17,
        code: "ControlLeft",
        key: "Control",
        location: 1
      },
      ControlRight: {
        keyCode: 17,
        code: "ControlRight",
        key: "Control",
        location: 2
      },
      AltLeft: { keyCode: 18, code: "AltLeft", key: "Alt", location: 1 },
      AltRight: { keyCode: 18, code: "AltRight", key: "Alt", location: 2 },
      Pause: { keyCode: 19, code: "Pause", key: "Pause" },
      CapsLock: { keyCode: 20, code: "CapsLock", key: "CapsLock" },
      Escape: { keyCode: 27, code: "Escape", key: "Escape" },
      Convert: { keyCode: 28, code: "Convert", key: "Convert" },
      NonConvert: { keyCode: 29, code: "NonConvert", key: "NonConvert" },
      Space: { keyCode: 32, code: "Space", key: " " },
      Numpad9: {
        keyCode: 33,
        shiftKeyCode: 105,
        key: "PageUp",
        code: "Numpad9",
        shiftKey: "9",
        location: 3
      },
      PageUp: { keyCode: 33, code: "PageUp", key: "PageUp" },
      Numpad3: {
        keyCode: 34,
        shiftKeyCode: 99,
        key: "PageDown",
        code: "Numpad3",
        shiftKey: "3",
        location: 3
      },
      PageDown: { keyCode: 34, code: "PageDown", key: "PageDown" },
      End: { keyCode: 35, code: "End", key: "End" },
      Numpad1: {
        keyCode: 35,
        shiftKeyCode: 97,
        key: "End",
        code: "Numpad1",
        shiftKey: "1",
        location: 3
      },
      Home: { keyCode: 36, code: "Home", key: "Home" },
      Numpad7: {
        keyCode: 36,
        shiftKeyCode: 103,
        key: "Home",
        code: "Numpad7",
        shiftKey: "7",
        location: 3
      },
      ArrowLeft: { keyCode: 37, code: "ArrowLeft", key: "ArrowLeft" },
      Numpad4: {
        keyCode: 37,
        shiftKeyCode: 100,
        key: "ArrowLeft",
        code: "Numpad4",
        shiftKey: "4",
        location: 3
      },
      Numpad8: {
        keyCode: 38,
        shiftKeyCode: 104,
        key: "ArrowUp",
        code: "Numpad8",
        shiftKey: "8",
        location: 3
      },
      ArrowUp: { keyCode: 38, code: "ArrowUp", key: "ArrowUp" },
      ArrowRight: { keyCode: 39, code: "ArrowRight", key: "ArrowRight" },
      Numpad6: {
        keyCode: 39,
        shiftKeyCode: 102,
        key: "ArrowRight",
        code: "Numpad6",
        shiftKey: "6",
        location: 3
      },
      Numpad2: {
        keyCode: 40,
        shiftKeyCode: 98,
        key: "ArrowDown",
        code: "Numpad2",
        shiftKey: "2",
        location: 3
      },
      ArrowDown: { keyCode: 40, code: "ArrowDown", key: "ArrowDown" },
      Select: { keyCode: 41, code: "Select", key: "Select" },
      Open: { keyCode: 43, code: "Open", key: "Execute" },
      PrintScreen: { keyCode: 44, code: "PrintScreen", key: "PrintScreen" },
      Insert: { keyCode: 45, code: "Insert", key: "Insert" },
      Numpad0: {
        keyCode: 45,
        shiftKeyCode: 96,
        key: "Insert",
        code: "Numpad0",
        shiftKey: "0",
        location: 3
      },
      Delete: { keyCode: 46, code: "Delete", key: "Delete" },
      NumpadDecimal: {
        keyCode: 46,
        shiftKeyCode: 110,
        code: "NumpadDecimal",
        key: "\0",
        shiftKey: ".",
        location: 3
      },
      Digit0: { keyCode: 48, code: "Digit0", shiftKey: ")", key: "0" },
      Digit1: { keyCode: 49, code: "Digit1", shiftKey: "!", key: "1" },
      Digit2: { keyCode: 50, code: "Digit2", shiftKey: "@", key: "2" },
      Digit3: { keyCode: 51, code: "Digit3", shiftKey: "#", key: "3" },
      Digit4: { keyCode: 52, code: "Digit4", shiftKey: "$", key: "4" },
      Digit5: { keyCode: 53, code: "Digit5", shiftKey: "%", key: "5" },
      Digit6: { keyCode: 54, code: "Digit6", shiftKey: "^", key: "6" },
      Digit7: { keyCode: 55, code: "Digit7", shiftKey: "&", key: "7" },
      Digit8: { keyCode: 56, code: "Digit8", shiftKey: "*", key: "8" },
      Digit9: { keyCode: 57, code: "Digit9", shiftKey: "(", key: "9" },
      KeyA: { keyCode: 65, code: "KeyA", shiftKey: "A", key: "a" },
      KeyB: { keyCode: 66, code: "KeyB", shiftKey: "B", key: "b" },
      KeyC: { keyCode: 67, code: "KeyC", shiftKey: "C", key: "c" },
      KeyD: { keyCode: 68, code: "KeyD", shiftKey: "D", key: "d" },
      KeyE: { keyCode: 69, code: "KeyE", shiftKey: "E", key: "e" },
      KeyF: { keyCode: 70, code: "KeyF", shiftKey: "F", key: "f" },
      KeyG: { keyCode: 71, code: "KeyG", shiftKey: "G", key: "g" },
      KeyH: { keyCode: 72, code: "KeyH", shiftKey: "H", key: "h" },
      KeyI: { keyCode: 73, code: "KeyI", shiftKey: "I", key: "i" },
      KeyJ: { keyCode: 74, code: "KeyJ", shiftKey: "J", key: "j" },
      KeyK: { keyCode: 75, code: "KeyK", shiftKey: "K", key: "k" },
      KeyL: { keyCode: 76, code: "KeyL", shiftKey: "L", key: "l" },
      KeyM: { keyCode: 77, code: "KeyM", shiftKey: "M", key: "m" },
      KeyN: { keyCode: 78, code: "KeyN", shiftKey: "N", key: "n" },
      KeyO: { keyCode: 79, code: "KeyO", shiftKey: "O", key: "o" },
      KeyP: { keyCode: 80, code: "KeyP", shiftKey: "P", key: "p" },
      KeyQ: { keyCode: 81, code: "KeyQ", shiftKey: "Q", key: "q" },
      KeyR: { keyCode: 82, code: "KeyR", shiftKey: "R", key: "r" },
      KeyS: { keyCode: 83, code: "KeyS", shiftKey: "S", key: "s" },
      KeyT: { keyCode: 84, code: "KeyT", shiftKey: "T", key: "t" },
      KeyU: { keyCode: 85, code: "KeyU", shiftKey: "U", key: "u" },
      KeyV: { keyCode: 86, code: "KeyV", shiftKey: "V", key: "v" },
      KeyW: { keyCode: 87, code: "KeyW", shiftKey: "W", key: "w" },
      KeyX: { keyCode: 88, code: "KeyX", shiftKey: "X", key: "x" },
      KeyY: { keyCode: 89, code: "KeyY", shiftKey: "Y", key: "y" },
      KeyZ: { keyCode: 90, code: "KeyZ", shiftKey: "Z", key: "z" },
      MetaLeft: { keyCode: 91, code: "MetaLeft", key: "Meta", location: 1 },
      MetaRight: { keyCode: 92, code: "MetaRight", key: "Meta", location: 2 },
      ContextMenu: { keyCode: 93, code: "ContextMenu", key: "ContextMenu" },
      NumpadMultiply: {
        keyCode: 106,
        code: "NumpadMultiply",
        key: "*",
        location: 3
      },
      NumpadAdd: { keyCode: 107, code: "NumpadAdd", key: "+", location: 3 },
      NumpadSubtract: {
        keyCode: 109,
        code: "NumpadSubtract",
        key: "-",
        location: 3
      },
      NumpadDivide: { keyCode: 111, code: "NumpadDivide", key: "/", location: 3 },
      F1: { keyCode: 112, code: "F1", key: "F1" },
      F2: { keyCode: 113, code: "F2", key: "F2" },
      F3: { keyCode: 114, code: "F3", key: "F3" },
      F4: { keyCode: 115, code: "F4", key: "F4" },
      F5: { keyCode: 116, code: "F5", key: "F5" },
      F6: { keyCode: 117, code: "F6", key: "F6" },
      F7: { keyCode: 118, code: "F7", key: "F7" },
      F8: { keyCode: 119, code: "F8", key: "F8" },
      F9: { keyCode: 120, code: "F9", key: "F9" },
      F10: { keyCode: 121, code: "F10", key: "F10" },
      F11: { keyCode: 122, code: "F11", key: "F11" },
      F12: { keyCode: 123, code: "F12", key: "F12" },
      F13: { keyCode: 124, code: "F13", key: "F13" },
      F14: { keyCode: 125, code: "F14", key: "F14" },
      F15: { keyCode: 126, code: "F15", key: "F15" },
      F16: { keyCode: 127, code: "F16", key: "F16" },
      F17: { keyCode: 128, code: "F17", key: "F17" },
      F18: { keyCode: 129, code: "F18", key: "F18" },
      F19: { keyCode: 130, code: "F19", key: "F19" },
      F20: { keyCode: 131, code: "F20", key: "F20" },
      F21: { keyCode: 132, code: "F21", key: "F21" },
      F22: { keyCode: 133, code: "F22", key: "F22" },
      F23: { keyCode: 134, code: "F23", key: "F23" },
      F24: { keyCode: 135, code: "F24", key: "F24" },
      NumLock: { keyCode: 144, code: "NumLock", key: "NumLock" },
      ScrollLock: { keyCode: 145, code: "ScrollLock", key: "ScrollLock" },
      AudioVolumeMute: {
        keyCode: 173,
        code: "AudioVolumeMute",
        key: "AudioVolumeMute"
      },
      AudioVolumeDown: {
        keyCode: 174,
        code: "AudioVolumeDown",
        key: "AudioVolumeDown"
      },
      AudioVolumeUp: { keyCode: 175, code: "AudioVolumeUp", key: "AudioVolumeUp" },
      MediaTrackNext: {
        keyCode: 176,
        code: "MediaTrackNext",
        key: "MediaTrackNext"
      },
      MediaTrackPrevious: {
        keyCode: 177,
        code: "MediaTrackPrevious",
        key: "MediaTrackPrevious"
      },
      MediaStop: { keyCode: 178, code: "MediaStop", key: "MediaStop" },
      MediaPlayPause: {
        keyCode: 179,
        code: "MediaPlayPause",
        key: "MediaPlayPause"
      },
      Semicolon: { keyCode: 186, code: "Semicolon", shiftKey: ":", key: ";" },
      Equal: { keyCode: 187, code: "Equal", shiftKey: "+", key: "=" },
      NumpadEqual: { keyCode: 187, code: "NumpadEqual", key: "=", location: 3 },
      Comma: { keyCode: 188, code: "Comma", shiftKey: "<", key: "," },
      Minus: { keyCode: 189, code: "Minus", shiftKey: "_", key: "-" },
      Period: { keyCode: 190, code: "Period", shiftKey: ">", key: "." },
      Slash: { keyCode: 191, code: "Slash", shiftKey: "?", key: "/" },
      Backquote: { keyCode: 192, code: "Backquote", shiftKey: "~", key: "`" },
      BracketLeft: { keyCode: 219, code: "BracketLeft", shiftKey: "{", key: "[" },
      Backslash: { keyCode: 220, code: "Backslash", shiftKey: "|", key: "\\" },
      BracketRight: { keyCode: 221, code: "BracketRight", shiftKey: "}", key: "]" },
      Quote: { keyCode: 222, code: "Quote", shiftKey: '"', key: "'" },
      AltGraph: { keyCode: 225, code: "AltGraph", key: "AltGraph" },
      Props: { keyCode: 247, code: "Props", key: "CrSel" },
      Cancel: { keyCode: 3, key: "Cancel", code: "Abort" },
      Clear: { keyCode: 12, key: "Clear", code: "Numpad5", location: 3 },
      Shift: { keyCode: 16, key: "Shift", code: "ShiftLeft", location: 1 },
      Control: { keyCode: 17, key: "Control", code: "ControlLeft", location: 1 },
      Alt: { keyCode: 18, key: "Alt", code: "AltLeft", location: 1 },
      Accept: { keyCode: 30, key: "Accept" },
      ModeChange: { keyCode: 31, key: "ModeChange" },
      " ": { keyCode: 32, key: " ", code: "Space" },
      Print: { keyCode: 42, key: "Print" },
      Execute: { keyCode: 43, key: "Execute", code: "Open" },
      "\0": { keyCode: 46, key: "\0", code: "NumpadDecimal", location: 3 },
      a: { keyCode: 65, key: "a", code: "KeyA" },
      b: { keyCode: 66, key: "b", code: "KeyB" },
      c: { keyCode: 67, key: "c", code: "KeyC" },
      d: { keyCode: 68, key: "d", code: "KeyD" },
      e: { keyCode: 69, key: "e", code: "KeyE" },
      f: { keyCode: 70, key: "f", code: "KeyF" },
      g: { keyCode: 71, key: "g", code: "KeyG" },
      h: { keyCode: 72, key: "h", code: "KeyH" },
      i: { keyCode: 73, key: "i", code: "KeyI" },
      j: { keyCode: 74, key: "j", code: "KeyJ" },
      k: { keyCode: 75, key: "k", code: "KeyK" },
      l: { keyCode: 76, key: "l", code: "KeyL" },
      m: { keyCode: 77, key: "m", code: "KeyM" },
      n: { keyCode: 78, key: "n", code: "KeyN" },
      o: { keyCode: 79, key: "o", code: "KeyO" },
      p: { keyCode: 80, key: "p", code: "KeyP" },
      q: { keyCode: 81, key: "q", code: "KeyQ" },
      r: { keyCode: 82, key: "r", code: "KeyR" },
      s: { keyCode: 83, key: "s", code: "KeyS" },
      t: { keyCode: 84, key: "t", code: "KeyT" },
      u: { keyCode: 85, key: "u", code: "KeyU" },
      v: { keyCode: 86, key: "v", code: "KeyV" },
      w: { keyCode: 87, key: "w", code: "KeyW" },
      x: { keyCode: 88, key: "x", code: "KeyX" },
      y: { keyCode: 89, key: "y", code: "KeyY" },
      z: { keyCode: 90, key: "z", code: "KeyZ" },
      Meta: { keyCode: 91, key: "Meta", code: "MetaLeft", location: 1 },
      "*": { keyCode: 106, key: "*", code: "NumpadMultiply", location: 3 },
      "+": { keyCode: 107, key: "+", code: "NumpadAdd", location: 3 },
      "-": { keyCode: 109, key: "-", code: "NumpadSubtract", location: 3 },
      "/": { keyCode: 111, key: "/", code: "NumpadDivide", location: 3 },
      ";": { keyCode: 186, key: ";", code: "Semicolon" },
      "=": { keyCode: 187, key: "=", code: "Equal" },
      ",": { keyCode: 188, key: ",", code: "Comma" },
      ".": { keyCode: 190, key: ".", code: "Period" },
      "`": { keyCode: 192, key: "`", code: "Backquote" },
      "[": { keyCode: 219, key: "[", code: "BracketLeft" },
      "\\": { keyCode: 220, key: "\\", code: "Backslash" },
      "]": { keyCode: 221, key: "]", code: "BracketRight" },
      "'": { keyCode: 222, key: "'", code: "Quote" },
      Attn: { keyCode: 246, key: "Attn" },
      CrSel: { keyCode: 247, key: "CrSel", code: "Props" },
      ExSel: { keyCode: 248, key: "ExSel" },
      EraseEof: { keyCode: 249, key: "EraseEof" },
      Play: { keyCode: 250, key: "Play" },
      ZoomOut: { keyCode: 251, key: "ZoomOut" },
      ")": { keyCode: 48, key: ")", code: "Digit0" },
      "!": { keyCode: 49, key: "!", code: "Digit1" },
      "@": { keyCode: 50, key: "@", code: "Digit2" },
      "#": { keyCode: 51, key: "#", code: "Digit3" },
      $: { keyCode: 52, key: "$", code: "Digit4" },
      "%": { keyCode: 53, key: "%", code: "Digit5" },
      "^": { keyCode: 54, key: "^", code: "Digit6" },
      "&": { keyCode: 55, key: "&", code: "Digit7" },
      "(": { keyCode: 57, key: "(", code: "Digit9" },
      A: { keyCode: 65, key: "A", code: "KeyA" },
      B: { keyCode: 66, key: "B", code: "KeyB" },
      C: { keyCode: 67, key: "C", code: "KeyC" },
      D: { keyCode: 68, key: "D", code: "KeyD" },
      E: { keyCode: 69, key: "E", code: "KeyE" },
      F: { keyCode: 70, key: "F", code: "KeyF" },
      G: { keyCode: 71, key: "G", code: "KeyG" },
      H: { keyCode: 72, key: "H", code: "KeyH" },
      I: { keyCode: 73, key: "I", code: "KeyI" },
      J: { keyCode: 74, key: "J", code: "KeyJ" },
      K: { keyCode: 75, key: "K", code: "KeyK" },
      L: { keyCode: 76, key: "L", code: "KeyL" },
      M: { keyCode: 77, key: "M", code: "KeyM" },
      N: { keyCode: 78, key: "N", code: "KeyN" },
      O: { keyCode: 79, key: "O", code: "KeyO" },
      P: { keyCode: 80, key: "P", code: "KeyP" },
      Q: { keyCode: 81, key: "Q", code: "KeyQ" },
      R: { keyCode: 82, key: "R", code: "KeyR" },
      S: { keyCode: 83, key: "S", code: "KeyS" },
      T: { keyCode: 84, key: "T", code: "KeyT" },
      U: { keyCode: 85, key: "U", code: "KeyU" },
      V: { keyCode: 86, key: "V", code: "KeyV" },
      W: { keyCode: 87, key: "W", code: "KeyW" },
      X: { keyCode: 88, key: "X", code: "KeyX" },
      Y: { keyCode: 89, key: "Y", code: "KeyY" },
      Z: { keyCode: 90, key: "Z", code: "KeyZ" },
      ":": { keyCode: 186, key: ":", code: "Semicolon" },
      "<": { keyCode: 188, key: "<", code: "Comma" },
      _: { keyCode: 189, key: "_", code: "Minus" },
      ">": { keyCode: 190, key: ">", code: "Period" },
      "?": { keyCode: 191, key: "?", code: "Slash" },
      "~": { keyCode: 192, key: "~", code: "Backquote" },
      "{": { keyCode: 219, key: "{", code: "BracketLeft" },
      "|": { keyCode: 220, key: "|", code: "Backslash" },
      "}": { keyCode: 221, key: "}", code: "BracketRight" },
      '"': { keyCode: 222, key: '"', code: "Quote" },
      SoftLeft: { key: "SoftLeft", code: "SoftLeft", location: 4 },
      SoftRight: { key: "SoftRight", code: "SoftRight", location: 4 },
      Camera: { keyCode: 44, key: "Camera", code: "Camera", location: 4 },
      Call: { key: "Call", code: "Call", location: 4 },
      EndCall: { keyCode: 95, key: "EndCall", code: "EndCall", location: 4 },
      VolumeDown: {
        keyCode: 182,
        key: "VolumeDown",
        code: "VolumeDown",
        location: 4
      },
      VolumeUp: { keyCode: 183, key: "VolumeUp", code: "VolumeUp", location: 4 }
    };
    CdpKeyboard = class extends Keyboard {
      #client;
      #pressedKeys = /* @__PURE__ */ new Set();
      _modifiers = 0;
      constructor(client) {
        super();
        this.#client = client;
      }
      updateClient(client) {
        this.#client = client;
      }
      async down(key, options2 = {
        text: void 0,
        commands: []
      }) {
        const description2 = this.#keyDescriptionForString(key);
        const autoRepeat = this.#pressedKeys.has(description2.code);
        this.#pressedKeys.add(description2.code);
        this._modifiers |= this.#modifierBit(description2.key);
        const text = options2.text === void 0 ? description2.text : options2.text;
        await this.#client.send("Input.dispatchKeyEvent", {
          type: text ? "keyDown" : "rawKeyDown",
          modifiers: this._modifiers,
          windowsVirtualKeyCode: description2.keyCode,
          code: description2.code,
          key: description2.key,
          text,
          unmodifiedText: text,
          autoRepeat,
          location: description2.location,
          isKeypad: description2.location === 3,
          commands: options2.commands
        });
      }
      #modifierBit(key) {
        if (key === "Alt") {
          return 1;
        }
        if (key === "Control") {
          return 2;
        }
        if (key === "Meta") {
          return 4;
        }
        if (key === "Shift") {
          return 8;
        }
        return 0;
      }
      #keyDescriptionForString(keyString) {
        const shift = this._modifiers & 8;
        const description2 = {
          key: "",
          keyCode: 0,
          code: "",
          text: "",
          location: 0
        };
        const definition = _keyDefinitions[keyString];
        assert(definition, `Unknown key: "${keyString}"`);
        if (definition.key) {
          description2.key = definition.key;
        }
        if (shift && definition.shiftKey) {
          description2.key = definition.shiftKey;
        }
        if (definition.keyCode) {
          description2.keyCode = definition.keyCode;
        }
        if (shift && definition.shiftKeyCode) {
          description2.keyCode = definition.shiftKeyCode;
        }
        if (definition.code) {
          description2.code = definition.code;
        }
        if (definition.location) {
          description2.location = definition.location;
        }
        if (description2.key.length === 1) {
          description2.text = description2.key;
        }
        if (definition.text) {
          description2.text = definition.text;
        }
        if (shift && definition.shiftText) {
          description2.text = definition.shiftText;
        }
        if (this._modifiers & -9) {
          description2.text = "";
        }
        return description2;
      }
      async up(key) {
        const description2 = this.#keyDescriptionForString(key);
        this._modifiers &= ~this.#modifierBit(description2.key);
        this.#pressedKeys.delete(description2.code);
        await this.#client.send("Input.dispatchKeyEvent", {
          type: "keyUp",
          modifiers: this._modifiers,
          key: description2.key,
          windowsVirtualKeyCode: description2.keyCode,
          code: description2.code,
          location: description2.location
        });
      }
      async sendCharacter(char) {
        await this.#client.send("Input.insertText", { text: char });
      }
      charIsKey(char) {
        return !!_keyDefinitions[char];
      }
      async type(text, options2 = {}) {
        const delay = options2.delay || void 0;
        for (const char of text) {
          if (this.charIsKey(char)) {
            await this.press(char, { delay });
          } else {
            if (delay) {
              await new Promise((f) => {
                return setTimeout(f, delay);
              });
            }
            await this.sendCharacter(char);
          }
        }
      }
      async press(key, options2 = {}) {
        const { delay = null } = options2;
        await this.down(key, options2);
        if (delay) {
          await new Promise((f) => {
            return setTimeout(f, options2.delay);
          });
        }
        await this.up(key);
      }
    };
    getFlag = (button) => {
      switch (button) {
        case MouseButton.Left:
          return 1;
        case MouseButton.Right:
          return 2;
        case MouseButton.Middle:
          return 4;
        case MouseButton.Back:
          return 8;
        case MouseButton.Forward:
          return 16;
      }
    };
    getButtonFromPressedButtons = (buttons) => {
      if (buttons & 1) {
        return MouseButton.Left;
      } else if (buttons & 2) {
        return MouseButton.Right;
      } else if (buttons & 4) {
        return MouseButton.Middle;
      } else if (buttons & 8) {
        return MouseButton.Back;
      } else if (buttons & 16) {
        return MouseButton.Forward;
      }
      return "none";
    };
    CdpMouse = class extends Mouse {
      #client;
      #keyboard;
      constructor(client, keyboard) {
        super();
        this.#client = client;
        this.#keyboard = keyboard;
      }
      updateClient(client) {
        this.#client = client;
      }
      #_state = {
        position: { x: 0, y: 0 },
        buttons: 0
      };
      get #state() {
        return Object.assign({ ...this.#_state }, ...this.#transactions);
      }
      #transactions = [];
      #createTransaction() {
        const transaction = {};
        this.#transactions.push(transaction);
        const popTransaction = () => {
          this.#transactions.splice(this.#transactions.indexOf(transaction), 1);
        };
        return {
          update: (updates) => {
            Object.assign(transaction, updates);
          },
          commit: () => {
            this.#_state = { ...this.#_state, ...transaction };
            popTransaction();
          },
          rollback: popTransaction
        };
      }
      async #withTransaction(action) {
        const { update, commit, rollback } = this.#createTransaction();
        try {
          await action(update);
          commit();
        } catch (error) {
          rollback();
          throw error;
        }
      }
      async reset() {
        const actions = [];
        for (const [flag, button] of [
          [1, MouseButton.Left],
          [4, MouseButton.Middle],
          [2, MouseButton.Right],
          [16, MouseButton.Forward],
          [8, MouseButton.Back]
        ]) {
          if (this.#state.buttons & flag) {
            actions.push(this.up({ button }));
          }
        }
        if (this.#state.position.x !== 0 || this.#state.position.y !== 0) {
          actions.push(this.move(0, 0));
        }
        await Promise.all(actions);
      }
      async move(x, y, options2 = {}) {
        const { steps = 1 } = options2;
        const from2 = this.#state.position;
        const to = { x, y };
        for (let i = 1; i <= steps; i++) {
          await this.#withTransaction((updateState) => {
            updateState({
              position: {
                x: from2.x + (to.x - from2.x) * (i / steps),
                y: from2.y + (to.y - from2.y) * (i / steps)
              }
            });
            const { buttons, position } = this.#state;
            return this.#client.send("Input.dispatchMouseEvent", {
              type: "mouseMoved",
              modifiers: this.#keyboard._modifiers,
              buttons,
              button: getButtonFromPressedButtons(buttons),
              ...position
            });
          });
        }
      }
      async down(options2 = {}) {
        const { button = MouseButton.Left, clickCount = 1 } = options2;
        const flag = getFlag(button);
        if (!flag) {
          throw new Error(`Unsupported mouse button: ${button}`);
        }
        if (this.#state.buttons & flag) {
          throw new Error(`'${button}' is already pressed.`);
        }
        await this.#withTransaction((updateState) => {
          updateState({
            buttons: this.#state.buttons | flag
          });
          const { buttons, position } = this.#state;
          return this.#client.send("Input.dispatchMouseEvent", {
            type: "mousePressed",
            modifiers: this.#keyboard._modifiers,
            clickCount,
            buttons,
            button,
            ...position
          });
        });
      }
      async up(options2 = {}) {
        const { button = MouseButton.Left, clickCount = 1 } = options2;
        const flag = getFlag(button);
        if (!flag) {
          throw new Error(`Unsupported mouse button: ${button}`);
        }
        if (!(this.#state.buttons & flag)) {
          throw new Error(`'${button}' is not pressed.`);
        }
        await this.#withTransaction((updateState) => {
          updateState({
            buttons: this.#state.buttons & ~flag
          });
          const { buttons, position } = this.#state;
          return this.#client.send("Input.dispatchMouseEvent", {
            type: "mouseReleased",
            modifiers: this.#keyboard._modifiers,
            clickCount,
            buttons,
            button,
            ...position
          });
        });
      }
      async click(x, y, options2 = {}) {
        const { delay, count = 1, clickCount = count } = options2;
        if (count < 1) {
          throw new Error("Click must occur a positive number of times.");
        }
        const actions = [this.move(x, y)];
        if (clickCount === count) {
          for (let i = 1; i < count; ++i) {
            actions.push(this.down({ ...options2, clickCount: i }), this.up({ ...options2, clickCount: i }));
          }
        }
        actions.push(this.down({ ...options2, clickCount }));
        if (typeof delay === "number") {
          await Promise.all(actions);
          actions.length = 0;
          await new Promise((resolve2) => {
            setTimeout(resolve2, delay);
          });
        }
        actions.push(this.up({ ...options2, clickCount }));
        await Promise.all(actions);
      }
      async wheel(options2 = {}) {
        const { deltaX = 0, deltaY = 0 } = options2;
        const { position, buttons } = this.#state;
        await this.#client.send("Input.dispatchMouseEvent", {
          type: "mouseWheel",
          pointerType: "mouse",
          modifiers: this.#keyboard._modifiers,
          deltaY,
          deltaX,
          buttons,
          ...position
        });
      }
      async drag(start, target) {
        const promise = new Promise((resolve2) => {
          this.#client.once("Input.dragIntercepted", (event) => {
            return resolve2(event.data);
          });
        });
        await this.move(start.x, start.y);
        await this.down();
        await this.move(target.x, target.y);
        return await promise;
      }
      async dragEnter(target, data32) {
        await this.#client.send("Input.dispatchDragEvent", {
          type: "dragEnter",
          x: target.x,
          y: target.y,
          modifiers: this.#keyboard._modifiers,
          data: data32
        });
      }
      async dragOver(target, data32) {
        await this.#client.send("Input.dispatchDragEvent", {
          type: "dragOver",
          x: target.x,
          y: target.y,
          modifiers: this.#keyboard._modifiers,
          data: data32
        });
      }
      async drop(target, data32) {
        await this.#client.send("Input.dispatchDragEvent", {
          type: "drop",
          x: target.x,
          y: target.y,
          modifiers: this.#keyboard._modifiers,
          data: data32
        });
      }
      async dragAndDrop(start, target, options2 = {}) {
        const { delay = null } = options2;
        const data32 = await this.drag(start, target);
        await this.dragEnter(target, data32);
        await this.dragOver(target, data32);
        if (delay) {
          await new Promise((resolve2) => {
            return setTimeout(resolve2, delay);
          });
        }
        await this.drop(target, data32);
        await this.up();
      }
    };
    CdpTouchHandle = class {
      #started = false;
      #touchScreen;
      #touchPoint;
      #client;
      #keyboard;
      constructor(client, touchScreen, keyboard, touchPoint) {
        this.#client = client;
        this.#touchScreen = touchScreen;
        this.#keyboard = keyboard;
        this.#touchPoint = touchPoint;
      }
      updateClient(client) {
        this.#client = client;
      }
      async start() {
        if (this.#started) {
          throw new TouchError("Touch has already started");
        }
        await this.#client.send("Input.dispatchTouchEvent", {
          type: "touchStart",
          touchPoints: [this.#touchPoint],
          modifiers: this.#keyboard._modifiers
        });
        this.#started = true;
      }
      move(x, y) {
        this.#touchPoint.x = Math.round(x);
        this.#touchPoint.y = Math.round(y);
        return this.#client.send("Input.dispatchTouchEvent", {
          type: "touchMove",
          touchPoints: [this.#touchPoint],
          modifiers: this.#keyboard._modifiers
        });
      }
      async end() {
        await this.#client.send("Input.dispatchTouchEvent", {
          type: "touchEnd",
          touchPoints: [this.#touchPoint],
          modifiers: this.#keyboard._modifiers
        });
        this.#touchScreen.removeHandle(this);
      }
    };
    CdpTouchscreen = class extends Touchscreen {
      #client;
      #keyboard;
      constructor(client, keyboard) {
        super();
        this.#client = client;
        this.#keyboard = keyboard;
      }
      updateClient(client) {
        this.#client = client;
        this.touches.forEach((t) => {
          t.updateClient(client);
        });
      }
      async touchStart(x, y) {
        const id2 = this.idGenerator();
        const touchPoint = {
          x: Math.round(x),
          y: Math.round(y),
          radiusX: 0.5,
          radiusY: 0.5,
          force: 0.5,
          id: id2
        };
        const touch = new CdpTouchHandle(this.#client, this, this.#keyboard, touchPoint);
        await touch.start();
        this.touches.push(touch);
        return touch;
      }
    };
    Tracing = class {
      #client;
      #recording = false;
      #path;
      constructor(client) {
        this.#client = client;
      }
      updateClient(client) {
        this.#client = client;
      }
      async start(options2 = {}) {
        assert(!this.#recording, "Cannot start recording trace while already recording trace.");
        const defaultCategories = [
          "-*",
          "devtools.timeline",
          "v8.execute",
          "disabled-by-default-devtools.timeline",
          "disabled-by-default-devtools.timeline.frame",
          "toplevel",
          "blink.console",
          "blink.user_timing",
          "latencyInfo",
          "disabled-by-default-devtools.timeline.stack",
          "disabled-by-default-v8.cpu_profiler"
        ];
        const { path: path14, screenshots = false, categories = defaultCategories } = options2;
        if (screenshots) {
          categories.push("disabled-by-default-devtools.screenshot");
        }
        const excludedCategories = categories.filter((cat) => {
          return cat.startsWith("-");
        }).map((cat) => {
          return cat.slice(1);
        });
        const includedCategories = categories.filter((cat) => {
          return !cat.startsWith("-");
        });
        this.#path = path14;
        this.#recording = true;
        await this.#client.send("Tracing.start", {
          transferMode: "ReturnAsStream",
          traceConfig: {
            excludedCategories,
            includedCategories
          }
        });
      }
      async stop() {
        const contentDeferred = Deferred.create();
        this.#client.once("Tracing.tracingComplete", async (event) => {
          try {
            assert(event.stream, 'Missing "stream"');
            const readable = await getReadableFromProtocolStream(this.#client, event.stream);
            const typedArray = await getReadableAsTypedArray(readable, this.#path);
            contentDeferred.resolve(typedArray ?? void 0);
          } catch (error) {
            if (isErrorLike$1(error)) {
              contentDeferred.reject(error);
            } else {
              contentDeferred.reject(new Error(`Unknown error: ${error}`));
            }
          }
        });
        await this.#client.send("Tracing.end");
        this.#recording = false;
        return await contentDeferred.valueOrThrow();
      }
    };
    CdpWebWorker = class extends WebWorker$1 {
      #world;
      #client;
      #id;
      #targetType;
      constructor(client, url, targetId, targetType, consoleAPICalled, exceptionThrown, networkManager) {
        super(url);
        this.#id = targetId;
        this.#client = client;
        this.#targetType = targetType;
        this.#world = new IsolatedWorld(this, new TimeoutSettings());
        this.#client.once("Runtime.executionContextCreated", async (event) => {
          this.#world.setContext(new ExecutionContext$1(client, event.context, this.#world));
        });
        this.#world.emitter.on("consoleapicalled", async (event) => {
          try {
            return consoleAPICalled(this.#world, event);
          } catch (err) {
            debugError(err);
          }
        });
        this.#client.on("Runtime.exceptionThrown", exceptionThrown);
        this.#client.once(CDPSessionEvent.Disconnected, () => {
          this.#world.dispose();
        });
        networkManager?.addClient(this.#client).catch(debugError);
        this.#client.send("Runtime.enable").catch(debugError);
      }
      mainRealm() {
        return this.#world;
      }
      get client() {
        return this.#client;
      }
      async close() {
        switch (this.#targetType) {
          case TargetType.SERVICE_WORKER: {
            await this.client.connection()?.send("Target.closeTarget", {
              targetId: this.#id
            });
            await this.client.connection()?.send("Target.detachFromTarget", {
              sessionId: this.client.id()
            });
            break;
          }
          case TargetType.SHARED_WORKER: {
            await this.client.connection()?.send("Target.closeTarget", {
              targetId: this.#id
            });
            break;
          }
          default:
            await this.evaluate(() => {
              self.close();
            });
        }
      }
    };
    __addDisposableResource$2 = function(env2, value, async2) {
      if (value !== null && value !== void 0) {
        if (typeof value !== "object" && typeof value !== "function") throw new TypeError("Object expected.");
        var dispose, inner;
        if (async2) {
          if (!Symbol.asyncDispose) throw new TypeError("Symbol.asyncDispose is not defined.");
          dispose = value[Symbol.asyncDispose];
        }
        if (dispose === void 0) {
          if (!Symbol.dispose) throw new TypeError("Symbol.dispose is not defined.");
          dispose = value[Symbol.dispose];
          if (async2) inner = dispose;
        }
        if (typeof dispose !== "function") throw new TypeError("Object not disposable.");
        if (inner) dispose = function() {
          try {
            inner.call(this);
          } catch (e) {
            return Promise.reject(e);
          }
        };
        env2.stack.push({ value, dispose, async: async2 });
      } else if (async2) {
        env2.stack.push({ async: true });
      }
      return value;
    };
    __disposeResources$2 = /* @__PURE__ */ function(SuppressedError2) {
      return function(env2) {
        function fail(e) {
          env2.error = env2.hasError ? new SuppressedError2(e, env2.error, "An error was suppressed during disposal.") : e;
          env2.hasError = true;
        }
        var r, s = 0;
        function next() {
          while (r = env2.stack.pop()) {
            try {
              if (!r.async && s === 1) return s = 0, env2.stack.push(r), Promise.resolve().then(next);
              if (r.dispose) {
                var result = r.dispose.call(r.value);
                if (r.async) return s |= 2, Promise.resolve(result).then(next, function(e) {
                  fail(e);
                  return next();
                });
              } else s |= 1;
            } catch (e) {
              fail(e);
            }
          }
          if (s === 1) return env2.hasError ? Promise.reject(env2.error) : Promise.resolve();
          if (env2.hasError) throw env2.error;
        }
        return next();
      };
    }(typeof SuppressedError === "function" ? SuppressedError : function(error, suppressed, message) {
      var e = new Error(message);
      return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
    });
    CdpPage = class _CdpPage extends Page {
      static async _create(client, target, defaultViewport) {
        const page = new _CdpPage(client, target);
        await page.#initialize();
        if (defaultViewport) {
          try {
            await page.setViewport(defaultViewport);
          } catch (err) {
            if (isErrorLike$1(err) && isTargetClosedError(err)) {
              debugError(err);
            } else {
              throw err;
            }
          }
        }
        return page;
      }
      #closed = false;
      #targetManager;
      #cdpBluetoothEmulation;
      #primaryTargetClient;
      #primaryTarget;
      #tabTargetClient;
      #tabTarget;
      #keyboard;
      #mouse;
      #touchscreen;
      #frameManager;
      #emulationManager;
      #tracing;
      #bindings = /* @__PURE__ */ new Map();
      #exposedFunctions = /* @__PURE__ */ new Map();
      #coverage;
      #viewport;
      #workers = /* @__PURE__ */ new Map();
      #fileChooserDeferreds = /* @__PURE__ */ new Set();
      #sessionCloseDeferred = Deferred.create();
      #serviceWorkerBypassed = false;
      #userDragInterceptionEnabled = false;
      constructor(client, target) {
        super();
        this.#primaryTargetClient = client;
        this.#tabTargetClient = client.parentSession();
        assert(this.#tabTargetClient, "Tab target session is not defined.");
        this.#tabTarget = this.#tabTargetClient.target();
        assert(this.#tabTarget, "Tab target is not defined.");
        this._tabId = this.#tabTarget._getTargetInfo().targetId;
        this.#primaryTarget = target;
        this.#targetManager = target._targetManager();
        this.#keyboard = new CdpKeyboard(client);
        this.#mouse = new CdpMouse(client, this.#keyboard);
        this.#touchscreen = new CdpTouchscreen(client, this.#keyboard);
        this.#frameManager = new FrameManager$1(client, this, this._timeoutSettings);
        this.#emulationManager = new EmulationManager(client);
        this.#tracing = new Tracing(client);
        this.#coverage = new Coverage(client);
        this.#viewport = null;
        this.#cdpBluetoothEmulation = new CdpBluetoothEmulation(this.#primaryTargetClient.connection());
        const frameManagerEmitter = new EventEmitter6(this.#frameManager);
        frameManagerEmitter.on(FrameManagerEvent.FrameAttached, (frame) => {
          this.emit("frameattached", frame);
        });
        frameManagerEmitter.on(FrameManagerEvent.FrameDetached, (frame) => {
          this.emit("framedetached", frame);
        });
        frameManagerEmitter.on(FrameManagerEvent.FrameNavigated, (frame) => {
          this.emit("framenavigated", frame);
        });
        frameManagerEmitter.on(FrameManagerEvent.ConsoleApiCalled, ([world, event]) => {
          this.#onConsoleAPI(world, event);
        });
        frameManagerEmitter.on(FrameManagerEvent.BindingCalled, ([world, event]) => {
          void this.#onBindingCalled(world, event);
        });
        const networkManagerEmitter = new EventEmitter6(this.#frameManager.networkManager);
        networkManagerEmitter.on(NetworkManagerEvent.Request, (request3) => {
          this.emit("request", request3);
        });
        networkManagerEmitter.on(NetworkManagerEvent.RequestServedFromCache, (request3) => {
          this.emit("requestservedfromcache", request3);
        });
        networkManagerEmitter.on(NetworkManagerEvent.Response, (response) => {
          this.emit("response", response);
        });
        networkManagerEmitter.on(NetworkManagerEvent.RequestFailed, (request3) => {
          this.emit("requestfailed", request3);
        });
        networkManagerEmitter.on(NetworkManagerEvent.RequestFinished, (request3) => {
          this.emit("requestfinished", request3);
        });
        this.#tabTargetClient.on(CDPSessionEvent.Swapped, this.#onActivation.bind(this));
        this.#tabTargetClient.on(CDPSessionEvent.Ready, this.#onSecondaryTarget.bind(this));
        this.#targetManager.on("targetGone", this.#onDetachedFromTarget);
        this.#tabTarget._isClosedDeferred.valueOrThrow().then(() => {
          this.#targetManager.off("targetGone", this.#onDetachedFromTarget);
          this.emit("close", void 0);
          this.#closed = true;
        }).catch(debugError);
        this.#setupPrimaryTargetListeners();
        this.#attachExistingTargets();
      }
      #attachExistingTargets() {
        const queue = [];
        for (const childTarget of this.#targetManager.getChildTargets(this.#primaryTarget)) {
          queue.push(childTarget);
        }
        let idx = 0;
        while (idx < queue.length) {
          const next = queue[idx];
          idx++;
          const session = next._session();
          if (session) {
            this.#onAttachedToTarget(session);
          }
          for (const childTarget of this.#targetManager.getChildTargets(next)) {
            queue.push(childTarget);
          }
        }
      }
      async #onActivation(newSession) {
        assert(newSession instanceof CdpCDPSession, "CDPSession is not instance of CdpCDPSession");
        this.#primaryTargetClient = newSession;
        this.#primaryTarget = newSession.target();
        assert(this.#primaryTarget, "Missing target on swap");
        this.#keyboard.updateClient(newSession);
        this.#mouse.updateClient(newSession);
        this.#touchscreen.updateClient(newSession);
        this.#emulationManager.updateClient(newSession);
        this.#tracing.updateClient(newSession);
        this.#coverage.updateClient(newSession);
        await this.#frameManager.swapFrameTree(newSession);
        this.#setupPrimaryTargetListeners();
      }
      async #onSecondaryTarget(session) {
        assert(session instanceof CdpCDPSession);
        if (session.target()._subtype() !== "prerender") {
          return;
        }
        this.#frameManager.registerSpeculativeSession(session).catch(debugError);
        this.#emulationManager.registerSpeculativeSession(session).catch(debugError);
      }
      #setupPrimaryTargetListeners() {
        const clientEmitter = new EventEmitter6(this.#primaryTargetClient);
        clientEmitter.on(CDPSessionEvent.Ready, this.#onAttachedToTarget);
        clientEmitter.on(CDPSessionEvent.Disconnected, () => {
          this.#sessionCloseDeferred.reject(new TargetCloseError("Target closed"));
        });
        clientEmitter.on("Page.domContentEventFired", () => {
          this.emit("domcontentloaded", void 0);
        });
        clientEmitter.on("Page.loadEventFired", () => {
          this.emit("load", void 0);
        });
        clientEmitter.on("Page.javascriptDialogOpening", this.#onDialog.bind(this));
        clientEmitter.on("Runtime.exceptionThrown", this.#handleException.bind(this));
        clientEmitter.on("Inspector.targetCrashed", this.#onTargetCrashed.bind(this));
        clientEmitter.on("Performance.metrics", this.#emitMetrics.bind(this));
        clientEmitter.on("Log.entryAdded", this.#onLogEntryAdded.bind(this));
        clientEmitter.on("Page.fileChooserOpened", this.#onFileChooser.bind(this));
      }
      #onDetachedFromTarget = (target) => {
        const sessionId = target._session()?.id();
        const worker = this.#workers.get(sessionId);
        if (!worker) {
          return;
        }
        this.#workers.delete(sessionId);
        this.emit("workerdestroyed", worker);
      };
      #onAttachedToTarget = (session) => {
        assert(session instanceof CdpCDPSession);
        this.#frameManager.onAttachedToTarget(session.target());
        if (session.target()._getTargetInfo().type === "worker") {
          const worker = new CdpWebWorker(session, session.target().url(), session.target()._targetId, session.target().type(), this.#onConsoleAPI.bind(this), this.#handleException.bind(this), this.#frameManager.networkManager);
          this.#workers.set(session.id(), worker);
          this.emit("workercreated", worker);
        }
        session.on(CDPSessionEvent.Ready, this.#onAttachedToTarget);
      };
      async #initialize() {
        try {
          await Promise.all([
            this.#frameManager.initialize(this.#primaryTargetClient),
            this.#primaryTargetClient.send("Performance.enable"),
            this.#primaryTargetClient.send("Log.enable")
          ]);
        } catch (err) {
          if (isErrorLike$1(err) && isTargetClosedError(err)) {
            debugError(err);
          } else {
            throw err;
          }
        }
      }
      async resize(params) {
        const windowId = await this.windowId();
        await this.#primaryTargetClient.send("Browser.setContentsSize", {
          windowId: Number(windowId),
          width: params.contentWidth,
          height: params.contentHeight
        });
      }
      async windowId() {
        const { windowId } = await this.#primaryTargetClient.send("Browser.getWindowForTarget");
        return windowId.toString();
      }
      async #onFileChooser(event) {
        const env_1 = { stack: [], error: void 0, hasError: false };
        try {
          if (!this.#fileChooserDeferreds.size) {
            return;
          }
          const frame = this.#frameManager.frame(event.frameId);
          assert(frame, "This should never happen.");
          const handle = __addDisposableResource$2(env_1, await frame.worlds[MAIN_WORLD].adoptBackendNode(event.backendNodeId), false);
          const fileChooser = new FileChooser(handle.move(), event.mode !== "selectSingle");
          for (const promise of this.#fileChooserDeferreds) {
            promise.resolve(fileChooser);
          }
          this.#fileChooserDeferreds.clear();
        } catch (e_1) {
          env_1.error = e_1;
          env_1.hasError = true;
        } finally {
          __disposeResources$2(env_1);
        }
      }
      _client() {
        return this.#primaryTargetClient;
      }
      isServiceWorkerBypassed() {
        return this.#serviceWorkerBypassed;
      }
      isDragInterceptionEnabled() {
        return this.#userDragInterceptionEnabled;
      }
      isJavaScriptEnabled() {
        return this.#emulationManager.javascriptEnabled;
      }
      async openDevTools() {
        const pageTargetId = this.target()._targetId;
        const browser3 = this.browser();
        const devtoolsPage = await browser3._createDevToolsPage(pageTargetId);
        return devtoolsPage;
      }
      async waitForFileChooser(options2 = {}) {
        const needsEnable = this.#fileChooserDeferreds.size === 0;
        const { timeout: timeout2 = this._timeoutSettings.timeout() } = options2;
        const deferred = Deferred.create({
          message: `Waiting for \`FileChooser\` failed: ${timeout2}ms exceeded`,
          timeout: timeout2
        });
        if (options2.signal) {
          options2.signal.addEventListener("abort", () => {
            deferred.reject(options2.signal?.reason);
          }, { once: true });
        }
        this.#fileChooserDeferreds.add(deferred);
        let enablePromise;
        if (needsEnable) {
          enablePromise = this.#primaryTargetClient.send("Page.setInterceptFileChooserDialog", {
            enabled: true
          });
        }
        try {
          const [result] = await Promise.all([
            deferred.valueOrThrow(),
            enablePromise
          ]);
          return result;
        } catch (error) {
          this.#fileChooserDeferreds.delete(deferred);
          throw error;
        }
      }
      async setGeolocation(options2) {
        return await this.#emulationManager.setGeolocation(options2);
      }
      target() {
        return this.#primaryTarget;
      }
      browser() {
        return this.#primaryTarget.browser();
      }
      browserContext() {
        return this.#primaryTarget.browserContext();
      }
      #onTargetCrashed() {
        this.emit("error", new Error("Page crashed!"));
      }
      #onLogEntryAdded(event) {
        const { level, text, args: args2, source: source2, url, lineNumber, stackTrace } = event.entry;
        if (args2) {
          args2.map((arg) => {
            void releaseObject(this.#primaryTargetClient, arg);
          });
        }
        if (source2 !== "worker") {
          this.emit("console", new ConsoleMessage$1(convertConsoleMessageLevel(level), text, [], [{ url, lineNumber }], void 0, stackTrace, this.#primaryTarget._targetId));
        }
      }
      mainFrame() {
        return this.#frameManager.mainFrame();
      }
      get keyboard() {
        return this.#keyboard;
      }
      get touchscreen() {
        return this.#touchscreen;
      }
      get coverage() {
        return this.#coverage;
      }
      get tracing() {
        return this.#tracing;
      }
      frames() {
        return this.#frameManager.frames();
      }
      workers() {
        return Array.from(this.#workers.values());
      }
      async setRequestInterception(value) {
        return await this.#frameManager.networkManager.setRequestInterception(value);
      }
      async setBypassServiceWorker(bypass) {
        this.#serviceWorkerBypassed = bypass;
        return await this.#primaryTargetClient.send("Network.setBypassServiceWorker", { bypass });
      }
      async setDragInterception(enabled) {
        this.#userDragInterceptionEnabled = enabled;
        return await this.#primaryTargetClient.send("Input.setInterceptDrags", {
          enabled
        });
      }
      async setOfflineMode(enabled) {
        return await this.#frameManager.networkManager.setOfflineMode(enabled);
      }
      async emulateNetworkConditions(networkConditions) {
        return await this.#frameManager.networkManager.emulateNetworkConditions(networkConditions);
      }
      async emulateFocusedPage(enabled) {
        return await this.#emulationManager.emulateFocus(enabled);
      }
      setDefaultNavigationTimeout(timeout2) {
        this._timeoutSettings.setDefaultNavigationTimeout(timeout2);
      }
      setDefaultTimeout(timeout2) {
        this._timeoutSettings.setDefaultTimeout(timeout2);
      }
      getDefaultTimeout() {
        return this._timeoutSettings.timeout();
      }
      getDefaultNavigationTimeout() {
        return this._timeoutSettings.navigationTimeout();
      }
      async queryObjects(prototypeHandle) {
        assert(!prototypeHandle.disposed, "Prototype JSHandle is disposed!");
        assert(prototypeHandle.id, "Prototype JSHandle must not be referencing primitive value");
        const response = await this.mainFrame().client.send("Runtime.queryObjects", {
          prototypeObjectId: prototypeHandle.id
        });
        return this.mainFrame().mainRealm().createCdpHandle(response.objects);
      }
      async cookies(...urls) {
        const originalCookies = (await this.#primaryTargetClient.send("Network.getCookies", {
          urls: urls.length ? urls : [this.url()]
        })).cookies;
        const unsupportedCookieAttributes = ["sourcePort"];
        const filterUnsupportedAttributes = (cookie) => {
          for (const attr of unsupportedCookieAttributes) {
            delete cookie[attr];
          }
          return cookie;
        };
        return originalCookies.map(filterUnsupportedAttributes).map((cookie) => {
          return {
            ...cookie,
            partitionKey: cookie.partitionKey ? cookie.partitionKey.topLevelSite : void 0,
            sameParty: false
          };
        });
      }
      async deleteCookie(...cookies) {
        const pageURL = this.url();
        for (const cookie of cookies) {
          const item = {
            ...cookie,
            partitionKey: convertCookiesPartitionKeyFromPuppeteerToCdp(cookie.partitionKey)
          };
          if (!cookie.url && pageURL.startsWith("http")) {
            item.url = pageURL;
          }
          await this.#primaryTargetClient.send("Network.deleteCookies", item);
          if (pageURL.startsWith("http") && !item.partitionKey) {
            const url = new URL(pageURL);
            await this.#primaryTargetClient.send("Network.deleteCookies", {
              ...item,
              partitionKey: {
                topLevelSite: url.origin.replace(`:${url.port}`, ""),
                hasCrossSiteAncestor: false
              }
            });
          }
        }
      }
      async setCookie(...cookies) {
        const pageURL = this.url();
        const startsWithHTTP = pageURL.startsWith("http");
        const items2 = cookies.map((cookie) => {
          const item = Object.assign({}, cookie);
          if (!item.url && startsWithHTTP) {
            item.url = pageURL;
          }
          assert(item.url !== "about:blank", `Blank page can not have cookie "${item.name}"`);
          assert(!String.prototype.startsWith.call(item.url || "", "data:"), `Data URL page can not have cookie "${item.name}"`);
          return item;
        });
        await this.deleteCookie(...items2);
        if (items2.length) {
          await this.#primaryTargetClient.send("Network.setCookies", {
            cookies: items2.map((cookieParam) => {
              return {
                ...cookieParam,
                partitionKey: convertCookiesPartitionKeyFromPuppeteerToCdp(cookieParam.partitionKey),
                sameSite: convertSameSiteFromPuppeteerToCdp(cookieParam.sameSite)
              };
            })
          });
        }
      }
      async exposeFunction(name, pptrFunction) {
        if (this.#bindings.has(name)) {
          throw new Error(`Failed to add page binding with name ${name}: window['${name}'] already exists!`);
        }
        const source2 = pageBindingInitString("exposedFun", name);
        let binding;
        switch (typeof pptrFunction) {
          case "function":
            binding = new Binding$2(name, pptrFunction, source2);
            break;
          default:
            binding = new Binding$2(name, pptrFunction.default, source2);
            break;
        }
        this.#bindings.set(name, binding);
        const [{ identifier }] = await Promise.all([
          this.#frameManager.evaluateOnNewDocument(source2),
          this.#frameManager.addExposedFunctionBinding(binding)
        ]);
        this.#exposedFunctions.set(name, identifier);
      }
      async removeExposedFunction(name) {
        const exposedFunctionId = this.#exposedFunctions.get(name);
        if (!exposedFunctionId) {
          throw new Error(`Function with name "${name}" does not exist`);
        }
        const binding = this.#bindings.get(name);
        this.#exposedFunctions.delete(name);
        this.#bindings.delete(name);
        await Promise.all([
          this.#frameManager.removeScriptToEvaluateOnNewDocument(exposedFunctionId),
          this.#frameManager.removeExposedFunctionBinding(binding)
        ]);
      }
      async authenticate(credentials) {
        return await this.#frameManager.networkManager.authenticate(credentials);
      }
      async setExtraHTTPHeaders(headers) {
        return await this.#frameManager.networkManager.setExtraHTTPHeaders(headers);
      }
      async setUserAgent(userAgentOrOptions, userAgentMetadata) {
        if (typeof userAgentOrOptions === "string") {
          return await this.#frameManager.networkManager.setUserAgent(userAgentOrOptions, userAgentMetadata);
        } else {
          const userAgent = userAgentOrOptions.userAgent ?? await this.browser().userAgent();
          return await this.#frameManager.networkManager.setUserAgent(userAgent, userAgentOrOptions.userAgentMetadata, userAgentOrOptions.platform);
        }
      }
      async metrics() {
        const response = await this.#primaryTargetClient.send("Performance.getMetrics");
        return this.#buildMetricsObject(response.metrics);
      }
      async captureHeapSnapshot(options2) {
        const { createWriteStream } = environment.value.fs;
        const stream3 = createWriteStream(options2.path);
        const streamPromise = new Promise((resolve2, reject) => {
          stream3.on("error", reject);
          stream3.on("finish", resolve2);
        });
        const client = this.#primaryTargetClient;
        await client.send("HeapProfiler.enable");
        await client.send("HeapProfiler.collectGarbage");
        const handler = (event) => {
          stream3.write(event.chunk);
        };
        client.on("HeapProfiler.addHeapSnapshotChunk", handler);
        try {
          await client.send("HeapProfiler.takeHeapSnapshot", {
            reportProgress: false
          });
        } finally {
          client.off("HeapProfiler.addHeapSnapshotChunk", handler);
          await client.send("HeapProfiler.disable");
        }
        stream3.end();
        await streamPromise;
      }
      #emitMetrics(event) {
        this.emit("metrics", {
          title: event.title,
          metrics: this.#buildMetricsObject(event.metrics)
        });
      }
      #buildMetricsObject(metrics2) {
        const result = {};
        for (const metric of metrics2 || []) {
          if (supportedMetrics.has(metric.name)) {
            result[metric.name] = metric.value;
          }
        }
        return result;
      }
      #handleException(exception) {
        this.emit("pageerror", createClientError(exception.exceptionDetails));
      }
      #onConsoleAPI(world, event) {
        const values = event.args.map((arg) => {
          return world.createCdpHandle(arg);
        });
        if (!this.listenerCount("console")) {
          values.forEach((arg) => {
            return arg.dispose();
          });
          return;
        }
        const textTokens = [];
        for (const arg of values) {
          textTokens.push(valueFromJSHandle(arg));
        }
        const stackTraceLocations = [];
        if (event.stackTrace) {
          for (const callFrame of event.stackTrace.callFrames) {
            stackTraceLocations.push({
              url: callFrame.url,
              lineNumber: callFrame.lineNumber,
              columnNumber: callFrame.columnNumber
            });
          }
        }
        let targetId;
        if (world.environment.client instanceof CdpCDPSession) {
          targetId = world.environment.client.target()._targetId;
        }
        const message = new ConsoleMessage$1(convertConsoleMessageLevel(event.type), textTokens.join(" "), values, stackTraceLocations, void 0, event.stackTrace, targetId);
        this.emit("console", message);
      }
      async #onBindingCalled(world, event) {
        let payload;
        try {
          payload = JSON.parse(event.payload);
        } catch {
          return;
        }
        const { type: type2, name, seq, args: args2, isTrivial } = payload;
        if (type2 !== "exposedFun") {
          return;
        }
        const context2 = world.context;
        if (!context2) {
          return;
        }
        const binding = this.#bindings.get(name);
        await binding?.run(context2, seq, args2, isTrivial);
      }
      #onDialog(event) {
        const type2 = validateDialogType(event.type);
        const dialog = new CdpDialog(this.#primaryTargetClient, type2, event.message, event.defaultPrompt);
        this.emit("dialog", dialog);
      }
      async reload(options2) {
        const [result] = await Promise.all([
          this.waitForNavigation({
            ...options2,
            ignoreSameDocumentNavigation: true
          }),
          this.#primaryTargetClient.send("Page.reload", {
            ignoreCache: options2?.ignoreCache ?? false
          })
        ]);
        return result;
      }
      async createCDPSession() {
        return await this.target().createCDPSession();
      }
      async goBack(options2 = {}) {
        return await this.#go(-1, options2);
      }
      async goForward(options2 = {}) {
        return await this.#go(1, options2);
      }
      async #go(delta, options2) {
        const history = await this.#primaryTargetClient.send("Page.getNavigationHistory");
        const entry = history.entries[history.currentIndex + delta];
        if (!entry) {
          throw new Error("History entry to navigate to not found.");
        }
        const result = await Promise.all([
          this.waitForNavigation(options2),
          this.#primaryTargetClient.send("Page.navigateToHistoryEntry", {
            entryId: entry.id
          })
        ]);
        return result[0];
      }
      async bringToFront() {
        await this.#primaryTargetClient.send("Page.bringToFront");
      }
      async setJavaScriptEnabled(enabled) {
        return await this.#emulationManager.setJavaScriptEnabled(enabled);
      }
      async setBypassCSP(enabled) {
        await this.#primaryTargetClient.send("Page.setBypassCSP", { enabled });
      }
      async emulateMediaType(type2) {
        return await this.#emulationManager.emulateMediaType(type2);
      }
      async emulateCPUThrottling(factor) {
        return await this.#emulationManager.emulateCPUThrottling(factor);
      }
      async emulateMediaFeatures(features) {
        return await this.#emulationManager.emulateMediaFeatures(features);
      }
      async emulateTimezone(timezoneId) {
        return await this.#emulationManager.emulateTimezone(timezoneId);
      }
      async emulateIdleState(overrides) {
        return await this.#emulationManager.emulateIdleState(overrides);
      }
      async emulateVisionDeficiency(type2) {
        return await this.#emulationManager.emulateVisionDeficiency(type2);
      }
      async setViewport(viewport) {
        const needsReload = await this.#emulationManager.emulateViewport(viewport);
        this.#viewport = viewport;
        if (needsReload) {
          await this.reload();
        }
      }
      viewport() {
        return this.#viewport;
      }
      async evaluateOnNewDocument(pageFunction, ...args2) {
        const source2 = evaluationString(pageFunction, ...args2);
        return await this.#frameManager.evaluateOnNewDocument(source2);
      }
      async removeScriptToEvaluateOnNewDocument(identifier) {
        return await this.#frameManager.removeScriptToEvaluateOnNewDocument(identifier);
      }
      async setCacheEnabled(enabled = true) {
        await this.#frameManager.networkManager.setCacheEnabled(enabled);
      }
      async _screenshot(options2) {
        const env_2 = { stack: [], error: void 0, hasError: false };
        try {
          const { fromSurface, omitBackground, optimizeForSpeed, quality, clip: userClip, type: type2, captureBeyondViewport } = options2;
          const stack = __addDisposableResource$2(env_2, new AsyncDisposableStack(), true);
          if (omitBackground && (type2 === "png" || type2 === "webp")) {
            await this.#emulationManager.setTransparentBackgroundColor();
            stack.defer(async () => {
              await this.#emulationManager.resetDefaultBackgroundColor().catch(debugError);
            });
          }
          let clip = userClip;
          if (clip && !captureBeyondViewport) {
            const viewport = await this.mainFrame().isolatedRealm().evaluate(() => {
              const { height, pageLeft: x, pageTop: y, width } = window.visualViewport;
              return { x, y, height, width };
            });
            clip = getIntersectionRect(clip, viewport);
          }
          const { data: data32 } = await this.#primaryTargetClient.send("Page.captureScreenshot", {
            format: type2,
            optimizeForSpeed,
            fromSurface,
            ...quality !== void 0 ? { quality: Math.round(quality) } : {},
            ...clip ? { clip: { ...clip, scale: clip.scale ?? 1 } } : {},
            captureBeyondViewport
          });
          return data32;
        } catch (e_2) {
          env_2.error = e_2;
          env_2.hasError = true;
        } finally {
          const result_1 = __disposeResources$2(env_2);
          if (result_1)
            await result_1;
        }
      }
      async createPDFStream(options2 = {}) {
        const { timeout: ms2 = this._timeoutSettings.timeout() } = options2;
        const { landscape, displayHeaderFooter, headerTemplate, footerTemplate, printBackground, scale, width: paperWidth, height: paperHeight, margin, pageRanges, preferCSSPageSize, omitBackground, tagged: generateTaggedPDF, outline: generateDocumentOutline, waitForFonts } = parsePDFOptions(options2);
        if (omitBackground) {
          await this.#emulationManager.setTransparentBackgroundColor();
        }
        if (waitForFonts) {
          await firstValueFrom(from(this.mainFrame().isolatedRealm().evaluate(() => {
            return document.fonts.ready;
          })).pipe(raceWith(timeout(ms2))));
        }
        const printCommandPromise = this.#primaryTargetClient.send("Page.printToPDF", {
          transferMode: "ReturnAsStream",
          landscape,
          displayHeaderFooter,
          headerTemplate,
          footerTemplate,
          printBackground,
          scale,
          paperWidth,
          paperHeight,
          marginTop: margin.top,
          marginBottom: margin.bottom,
          marginLeft: margin.left,
          marginRight: margin.right,
          pageRanges,
          preferCSSPageSize,
          generateTaggedPDF,
          generateDocumentOutline
        });
        const result = await firstValueFrom(from(printCommandPromise).pipe(raceWith(timeout(ms2))));
        if (omitBackground) {
          await this.#emulationManager.resetDefaultBackgroundColor();
        }
        assert(result.stream, "`stream` is missing from `Page.printToPDF");
        return await getReadableFromProtocolStream(this.#primaryTargetClient, result.stream);
      }
      async pdf(options2 = {}) {
        const { path: path14 = void 0 } = options2;
        const readable = await this.createPDFStream(options2);
        const typedArray = await getReadableAsTypedArray(readable, path14);
        assert(typedArray, "Could not create typed array");
        return typedArray;
      }
      async close(options2 = { runBeforeUnload: void 0 }) {
        const env_3 = { stack: [], error: void 0, hasError: false };
        try {
          const _guard = __addDisposableResource$2(env_3, await this.browserContext().waitForScreenshotOperations(), false);
          const connection = this.#primaryTargetClient.connection();
          assert(connection, "Connection closed. Most likely the page has been closed.");
          const runBeforeUnload = !!options2.runBeforeUnload;
          if (runBeforeUnload) {
            await this.#primaryTargetClient.send("Page.close");
          } else {
            await connection.send("Target.closeTarget", {
              targetId: this.#primaryTarget._targetId
            });
            await this.#tabTarget._isClosedDeferred.valueOrThrow();
          }
        } catch (e_3) {
          env_3.error = e_3;
          env_3.hasError = true;
        } finally {
          __disposeResources$2(env_3);
        }
      }
      isClosed() {
        return this.#closed;
      }
      get mouse() {
        return this.#mouse;
      }
      async waitForDevicePrompt(options2 = {}) {
        return await this.mainFrame().waitForDevicePrompt(options2);
      }
      get bluetooth() {
        return this.#cdpBluetoothEmulation;
      }
    };
    supportedMetrics = /* @__PURE__ */ new Set([
      "Timestamp",
      "Documents",
      "Frames",
      "JSEventListeners",
      "Nodes",
      "LayoutCount",
      "RecalcStyleCount",
      "LayoutDuration",
      "RecalcStyleDuration",
      "ScriptDuration",
      "TaskDuration",
      "JSHeapUsedSize",
      "JSHeapTotalSize"
    ]);
    __addDisposableResource$1 = function(env2, value, async2) {
      if (value !== null && value !== void 0) {
        if (typeof value !== "object" && typeof value !== "function") throw new TypeError("Object expected.");
        var dispose, inner;
        if (async2) {
          if (!Symbol.asyncDispose) throw new TypeError("Symbol.asyncDispose is not defined.");
          dispose = value[Symbol.asyncDispose];
        }
        if (dispose === void 0) {
          if (!Symbol.dispose) throw new TypeError("Symbol.dispose is not defined.");
          dispose = value[Symbol.dispose];
          if (async2) inner = dispose;
        }
        if (typeof dispose !== "function") throw new TypeError("Object not disposable.");
        if (inner) dispose = function() {
          try {
            inner.call(this);
          } catch (e) {
            return Promise.reject(e);
          }
        };
        env2.stack.push({ value, dispose, async: async2 });
      } else if (async2) {
        env2.stack.push({ async: true });
      }
      return value;
    };
    __disposeResources$1 = /* @__PURE__ */ function(SuppressedError2) {
      return function(env2) {
        function fail(e) {
          env2.error = env2.hasError ? new SuppressedError2(e, env2.error, "An error was suppressed during disposal.") : e;
          env2.hasError = true;
        }
        var r, s = 0;
        function next() {
          while (r = env2.stack.pop()) {
            try {
              if (!r.async && s === 1) return s = 0, env2.stack.push(r), Promise.resolve().then(next);
              if (r.dispose) {
                var result = r.dispose.call(r.value);
                if (r.async) return s |= 2, Promise.resolve(result).then(next, function(e) {
                  fail(e);
                  return next();
                });
              } else s |= 1;
            } catch (e) {
              fail(e);
            }
          }
          if (s === 1) return env2.hasError ? Promise.reject(env2.error) : Promise.resolve();
          if (env2.hasError) throw env2.error;
        }
        return next();
      };
    }(typeof SuppressedError === "function" ? SuppressedError : function(error, suppressed, message) {
      var e = new Error(message);
      return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
    });
    CdpBrowserContext = class extends BrowserContext {
      #connection;
      #browser;
      #id;
      constructor(connection, browser3, contextId) {
        super();
        this.#connection = connection;
        this.#browser = browser3;
        this.#id = contextId;
      }
      get id() {
        return this.#id;
      }
      targets() {
        return this.#browser.targets().filter((target) => {
          return target.browserContext() === this;
        });
      }
      async pages(includeAll = false) {
        const pages = await Promise.all(this.targets().filter((target) => {
          return target.type() === "page" || (target.type() === "other" || includeAll) && this.#browser._getIsPageTargetCallback()?.(target);
        }).map((target) => {
          return target.page();
        }));
        return pages.filter((page) => {
          return !!page;
        });
      }
      async overridePermissions(origin, permissions) {
        const protocolPermissions = permissions.map((permission) => {
          const protocolPermission = WEB_PERMISSION_TO_PROTOCOL_PERMISSION.get(permission);
          if (!protocolPermission) {
            throw new Error("Unknown permission: " + permission);
          }
          return protocolPermission;
        });
        await this.#connection.send("Browser.grantPermissions", {
          origin,
          browserContextId: this.#id || void 0,
          permissions: protocolPermissions
        });
      }
      async setPermission(origin, ...permissions) {
        await Promise.all(permissions.map(async (permission) => {
          const protocolPermission = {
            name: permission.permission.name,
            userVisibleOnly: permission.permission.userVisibleOnly,
            sysex: permission.permission.sysex,
            allowWithoutSanitization: permission.permission.allowWithoutSanitization,
            panTiltZoom: permission.permission.panTiltZoom
          };
          await this.#connection.send("Browser.setPermission", {
            origin: origin === "*" ? void 0 : origin,
            browserContextId: this.#id || void 0,
            permission: protocolPermission,
            setting: permission.state
          });
        }));
      }
      async clearPermissionOverrides() {
        await this.#connection.send("Browser.resetPermissions", {
          browserContextId: this.#id || void 0
        });
      }
      async newPage(options2) {
        const env_1 = { stack: [], error: void 0, hasError: false };
        try {
          const _guard = __addDisposableResource$1(env_1, await this.waitForScreenshotOperations(), false);
          return await this.#browser._createPageInContext(this.#id, options2);
        } catch (e_1) {
          env_1.error = e_1;
          env_1.hasError = true;
        } finally {
          __disposeResources$1(env_1);
        }
      }
      browser() {
        return this.#browser;
      }
      async close() {
        assert(this.#id, "Default BrowserContext cannot be closed!");
        await this.#browser._disposeContext(this.#id);
      }
      async cookies() {
        const { cookies } = await this.#connection.send("Storage.getCookies", {
          browserContextId: this.#id
        });
        return cookies.map((cookie) => {
          return {
            ...cookie,
            partitionKey: cookie.partitionKey ? {
              sourceOrigin: cookie.partitionKey.topLevelSite,
              hasCrossSiteAncestor: cookie.partitionKey.hasCrossSiteAncestor
            } : void 0,
            sameParty: false
          };
        });
      }
      async setCookie(...cookies) {
        return await this.#connection.send("Storage.setCookies", {
          browserContextId: this.#id,
          cookies: cookies.map((cookie) => {
            return {
              ...cookie,
              partitionKey: convertCookiesPartitionKeyFromPuppeteerToCdp(cookie.partitionKey),
              sameSite: convertSameSiteFromPuppeteerToCdp(cookie.sameSite)
            };
          })
        });
      }
      async setDownloadBehavior(downloadBehavior) {
        await this.#connection.send("Browser.setDownloadBehavior", {
          behavior: downloadBehavior.policy,
          downloadPath: downloadBehavior.downloadPath,
          browserContextId: this.#id
        });
      }
    };
    (function(InitializationStatus2) {
      InitializationStatus2["SUCCESS"] = "success";
      InitializationStatus2["ABORTED"] = "aborted";
    })(InitializationStatus || (InitializationStatus = {}));
    CdpTarget = class extends Target$1 {
      #browserContext;
      #session;
      #targetInfo;
      #targetManager;
      #sessionFactory;
      #childTargets = /* @__PURE__ */ new Set();
      _initializedDeferred = Deferred.create();
      _isClosedDeferred = Deferred.create();
      _targetId;
      constructor(targetInfo, session, browserContext, targetManager, sessionFactory) {
        super();
        this.#session = session;
        this.#targetManager = targetManager;
        this.#targetInfo = targetInfo;
        this.#browserContext = browserContext;
        this._targetId = targetInfo.targetId;
        this.#sessionFactory = sessionFactory;
        if (this.#session) {
          this.#session.setTarget(this);
        }
      }
      async asPage() {
        const session = this._session();
        if (!session) {
          return await this.createCDPSession().then((client) => {
            return CdpPage._create(client, this, null);
          });
        }
        return await CdpPage._create(session, this, null);
      }
      _subtype() {
        return this.#targetInfo.subtype;
      }
      _session() {
        return this.#session;
      }
      _addChildTarget(target) {
        this.#childTargets.add(target);
      }
      _removeChildTarget(target) {
        this.#childTargets.delete(target);
      }
      _childTargets() {
        return this.#childTargets;
      }
      _sessionFactory() {
        if (!this.#sessionFactory) {
          throw new Error("sessionFactory is not initialized");
        }
        return this.#sessionFactory;
      }
      createCDPSession() {
        if (!this.#sessionFactory) {
          throw new Error("sessionFactory is not initialized");
        }
        return this.#sessionFactory(false).then((session) => {
          session.setTarget(this);
          return session;
        });
      }
      url() {
        return this.#targetInfo.url;
      }
      type() {
        const type2 = this.#targetInfo.type;
        switch (type2) {
          case "page":
            return TargetType.PAGE;
          case "background_page":
            return TargetType.BACKGROUND_PAGE;
          case "service_worker":
            return TargetType.SERVICE_WORKER;
          case "shared_worker":
            return TargetType.SHARED_WORKER;
          case "browser":
            return TargetType.BROWSER;
          case "webview":
            return TargetType.WEBVIEW;
          case "tab":
            return TargetType.TAB;
          default:
            return TargetType.OTHER;
        }
      }
      _targetManager() {
        if (!this.#targetManager) {
          throw new Error("targetManager is not initialized");
        }
        return this.#targetManager;
      }
      _getTargetInfo() {
        return this.#targetInfo;
      }
      browser() {
        if (!this.#browserContext) {
          throw new Error("browserContext is not initialized");
        }
        return this.#browserContext.browser();
      }
      browserContext() {
        if (!this.#browserContext) {
          throw new Error("browserContext is not initialized");
        }
        return this.#browserContext;
      }
      opener() {
        const { openerId } = this.#targetInfo;
        if (!openerId) {
          return;
        }
        return this.browser().targets().find((target) => {
          return target._targetId === openerId;
        });
      }
      _targetInfoChanged(targetInfo) {
        this.#targetInfo = targetInfo;
        this._checkIfInitialized();
      }
      _initialize() {
        this._initializedDeferred.resolve(InitializationStatus.SUCCESS);
      }
      _isTargetExposed() {
        return this.type() !== TargetType.TAB && !this._subtype();
      }
      _checkIfInitialized() {
        if (!this._initializedDeferred.resolved()) {
          this._initializedDeferred.resolve(InitializationStatus.SUCCESS);
        }
      }
    };
    PageTarget = class _PageTarget extends CdpTarget {
      #defaultViewport;
      pagePromise;
      constructor(targetInfo, session, browserContext, targetManager, sessionFactory, defaultViewport) {
        super(targetInfo, session, browserContext, targetManager, sessionFactory);
        this.#defaultViewport = defaultViewport ?? void 0;
      }
      _initialize() {
        this._initializedDeferred.valueOrThrow().then(async (result) => {
          if (result === InitializationStatus.ABORTED) {
            return;
          }
          const opener = this.opener();
          if (!(opener instanceof _PageTarget)) {
            return;
          }
          if (!opener || !opener.pagePromise || this.type() !== "page") {
            return true;
          }
          const openerPage = await opener.pagePromise;
          if (!openerPage.listenerCount("popup")) {
            return true;
          }
          const popupPage = await this.page();
          openerPage.emit("popup", popupPage);
          return true;
        }).catch(debugError);
        this._checkIfInitialized();
      }
      async page() {
        if (!this.pagePromise) {
          const session = this._session();
          this.pagePromise = (session ? Promise.resolve(session) : this._sessionFactory()(false)).then((client) => {
            return CdpPage._create(client, this, this.#defaultViewport ?? null);
          });
        }
        return await this.pagePromise ?? null;
      }
      _checkIfInitialized() {
        if (this._initializedDeferred.resolved()) {
          return;
        }
        if (this._getTargetInfo().url !== "") {
          this._initializedDeferred.resolve(InitializationStatus.SUCCESS);
        }
      }
    };
    DevToolsTarget = class extends PageTarget {
    };
    WorkerTarget = class extends CdpTarget {
      #workerPromise;
      async worker() {
        if (!this.#workerPromise) {
          const session = this._session();
          this.#workerPromise = (session ? Promise.resolve(session) : this._sessionFactory()(false)).then((client) => {
            return new CdpWebWorker(client, this._getTargetInfo().url, this._targetId, this.type(), () => {
            }, () => {
            }, void 0);
          });
        }
        return await this.#workerPromise;
      }
    };
    OtherTarget = class extends CdpTarget {
    };
    TargetManager$1 = class TargetManager2 extends EventEmitter6 {
      #connection;
      #discoveredTargetsByTargetId = /* @__PURE__ */ new Map();
      #attachedTargetsByTargetId = /* @__PURE__ */ new Map();
      #attachedTargetsBySessionId = /* @__PURE__ */ new Map();
      #ignoredTargets = /* @__PURE__ */ new Set();
      #targetFilterCallback;
      #targetFactory;
      #attachedToTargetListenersBySession = /* @__PURE__ */ new WeakMap();
      #detachedFromTargetListenersBySession = /* @__PURE__ */ new WeakMap();
      #initializeDeferred = Deferred.create();
      #waitForInitiallyDiscoveredTargets = true;
      #discoveryFilter = [{}];
      #targetsIdsForInit = /* @__PURE__ */ new Set();
      #initialAttachDone = false;
      constructor(connection, targetFactory, targetFilterCallback, waitForInitiallyDiscoveredTargets = true) {
        super();
        this.#connection = connection;
        this.#targetFilterCallback = targetFilterCallback;
        this.#targetFactory = targetFactory;
        this.#waitForInitiallyDiscoveredTargets = waitForInitiallyDiscoveredTargets;
        this.#connection.on("Target.targetCreated", this.#onTargetCreated);
        this.#connection.on("Target.targetDestroyed", this.#onTargetDestroyed);
        this.#connection.on("Target.targetInfoChanged", this.#onTargetInfoChanged);
        this.#connection.on(CDPSessionEvent.SessionDetached, this.#onSessionDetached);
        this.#setupAttachmentListeners(this.#connection);
      }
      async initialize() {
        await this.#connection.send("Target.setDiscoverTargets", {
          discover: true,
          filter: this.#discoveryFilter
        });
        await this.#connection.send("Target.setAutoAttach", {
          waitForDebuggerOnStart: true,
          flatten: true,
          autoAttach: true,
          filter: [
            {
              type: "page",
              exclude: true
            },
            ...this.#discoveryFilter
          ]
        });
        this.#initialAttachDone = true;
        this.#finishInitializationIfReady();
        await this.#initializeDeferred.valueOrThrow();
      }
      getChildTargets(target) {
        return target._childTargets();
      }
      dispose() {
        this.#connection.off("Target.targetCreated", this.#onTargetCreated);
        this.#connection.off("Target.targetDestroyed", this.#onTargetDestroyed);
        this.#connection.off("Target.targetInfoChanged", this.#onTargetInfoChanged);
        this.#connection.off(CDPSessionEvent.SessionDetached, this.#onSessionDetached);
        this.#removeAttachmentListeners(this.#connection);
      }
      getAvailableTargets() {
        return this.#attachedTargetsByTargetId;
      }
      #setupAttachmentListeners(session) {
        const listener = (event) => {
          void this.#onAttachedToTarget(session, event);
        };
        assert(!this.#attachedToTargetListenersBySession.has(session));
        this.#attachedToTargetListenersBySession.set(session, listener);
        session.on("Target.attachedToTarget", listener);
        const detachedListener = (event) => {
          return this.#onDetachedFromTarget(session, event);
        };
        assert(!this.#detachedFromTargetListenersBySession.has(session));
        this.#detachedFromTargetListenersBySession.set(session, detachedListener);
        session.on("Target.detachedFromTarget", detachedListener);
      }
      #removeAttachmentListeners(session) {
        const listener = this.#attachedToTargetListenersBySession.get(session);
        if (listener) {
          session.off("Target.attachedToTarget", listener);
          this.#attachedToTargetListenersBySession.delete(session);
        }
        const detachedListener = this.#detachedFromTargetListenersBySession.get(session);
        if (detachedListener) {
          session.off("Target.detachedFromTarget", detachedListener);
          this.#detachedFromTargetListenersBySession.delete(session);
        }
      }
      #silentDetach = async (session, parentSession) => {
        await session.send("Runtime.runIfWaitingForDebugger").catch(debugError);
        await parentSession.send("Target.detachFromTarget", {
          sessionId: session.id()
        }).catch(debugError);
      };
      #getParentTarget = (parentSession) => {
        return parentSession instanceof CdpCDPSession ? parentSession.target() : null;
      };
      #onSessionDetached = (session) => {
        this.#removeAttachmentListeners(session);
      };
      #onTargetCreated = async (event) => {
        this.#discoveredTargetsByTargetId.set(event.targetInfo.targetId, event.targetInfo);
        this.emit("targetDiscovered", event.targetInfo);
        if (event.targetInfo.type === "browser" && event.targetInfo.attached) {
          if (this.#attachedTargetsByTargetId.has(event.targetInfo.targetId)) {
            return;
          }
          const target = this.#targetFactory(event.targetInfo, void 0);
          target._initialize();
          this.#attachedTargetsByTargetId.set(event.targetInfo.targetId, target);
        }
      };
      #onTargetDestroyed = (event) => {
        const targetInfo = this.#discoveredTargetsByTargetId.get(event.targetId);
        this.#discoveredTargetsByTargetId.delete(event.targetId);
        this.#finishInitializationIfReady(event.targetId);
        if (targetInfo?.type === "service_worker") {
          const target = this.#attachedTargetsByTargetId.get(event.targetId);
          if (target) {
            this.emit("targetGone", target);
            this.#attachedTargetsByTargetId.delete(event.targetId);
          }
        }
      };
      #onTargetInfoChanged = (event) => {
        this.#discoveredTargetsByTargetId.set(event.targetInfo.targetId, event.targetInfo);
        if (this.#ignoredTargets.has(event.targetInfo.targetId) || !event.targetInfo.attached) {
          return;
        }
        const target = this.#attachedTargetsByTargetId.get(event.targetInfo.targetId);
        if (!target) {
          return;
        }
        const previousURL = target.url();
        const wasInitialized = target._initializedDeferred.value() === InitializationStatus.SUCCESS;
        if (isPageTargetBecomingPrimary(target, event.targetInfo)) {
          const session = target._session();
          assert(session, "Target that is being activated is missing a CDPSession.");
          session.parentSession()?.emit(CDPSessionEvent.Swapped, session);
        }
        target._targetInfoChanged(event.targetInfo);
        if (wasInitialized && previousURL !== target.url()) {
          this.emit("targetChanged", {
            target,
            wasInitialized,
            previousURL
          });
        }
      };
      #onAttachedToTarget = async (parentSession, event) => {
        const targetInfo = event.targetInfo;
        const session = this.#connection._session(event.sessionId);
        if (!session) {
          throw new Error(`Session ${event.sessionId} was not created.`);
        }
        if (!this.#connection.isAutoAttached(targetInfo.targetId)) {
          return;
        }
        if (targetInfo.type === "service_worker") {
          await this.#silentDetach(session, parentSession);
          if (this.#attachedTargetsByTargetId.has(targetInfo.targetId)) {
            return;
          }
          const target2 = this.#targetFactory(targetInfo);
          target2._initialize();
          this.#attachedTargetsByTargetId.set(targetInfo.targetId, target2);
          this.emit("targetAvailable", target2);
          return;
        }
        let target = this.#attachedTargetsByTargetId.get(targetInfo.targetId);
        const isExistingTarget = target !== void 0;
        if (!target) {
          target = this.#targetFactory(targetInfo, session, parentSession instanceof CdpCDPSession ? parentSession : void 0);
        }
        const parentTarget = this.#getParentTarget(parentSession);
        if (this.#targetFilterCallback && !this.#targetFilterCallback(target)) {
          this.#ignoredTargets.add(targetInfo.targetId);
          if (parentTarget?.type() === "tab") {
            this.#finishInitializationIfReady(parentTarget._targetId);
          }
          await this.#silentDetach(session, parentSession);
          return;
        }
        if (this.#waitForInitiallyDiscoveredTargets && event.targetInfo.type === "tab" && !this.#initialAttachDone) {
          this.#targetsIdsForInit.add(event.targetInfo.targetId);
        }
        this.#setupAttachmentListeners(session);
        if (isExistingTarget) {
          session.setTarget(target);
          this.#attachedTargetsBySessionId.set(session.id(), target);
        } else {
          target._initialize();
          this.#attachedTargetsByTargetId.set(targetInfo.targetId, target);
          this.#attachedTargetsBySessionId.set(session.id(), target);
        }
        parentTarget?._addChildTarget(target);
        parentSession.emit(CDPSessionEvent.Ready, session);
        if (!isExistingTarget) {
          this.emit("targetAvailable", target);
        }
        if (parentTarget?.type() === "tab") {
          this.#finishInitializationIfReady(parentTarget._targetId);
        }
        await Promise.all([
          session.send("Target.setAutoAttach", {
            waitForDebuggerOnStart: true,
            flatten: true,
            autoAttach: true,
            filter: this.#discoveryFilter
          }),
          session.send("Runtime.runIfWaitingForDebugger")
        ]).catch(debugError);
      };
      #finishInitializationIfReady(targetId) {
        if (targetId !== void 0) {
          this.#targetsIdsForInit.delete(targetId);
        }
        if (!this.#initialAttachDone) {
          return;
        }
        if (this.#targetsIdsForInit.size === 0) {
          this.#initializeDeferred.resolve();
        }
      }
      #onDetachedFromTarget = (parentSession, event) => {
        const target = this.#attachedTargetsBySessionId.get(event.sessionId);
        this.#attachedTargetsBySessionId.delete(event.sessionId);
        if (!target) {
          return;
        }
        if (parentSession instanceof CdpCDPSession) {
          parentSession.target()._removeChildTarget(target);
        }
        this.#attachedTargetsByTargetId.delete(target._targetId);
        this.emit("targetGone", target);
      };
    };
    CdpBrowser = class _CdpBrowser extends Browser$1 {
      protocol = "cdp";
      static async _create(connection, contextIds, acceptInsecureCerts, defaultViewport, downloadBehavior, process8, closeCallback, targetFilterCallback, isPageTargetCallback, waitForInitiallyDiscoveredTargets = true, networkEnabled = true, handleDevToolsAsPage = false) {
        const browser3 = new _CdpBrowser(connection, contextIds, defaultViewport, process8, closeCallback, targetFilterCallback, isPageTargetCallback, waitForInitiallyDiscoveredTargets, networkEnabled, handleDevToolsAsPage);
        if (acceptInsecureCerts) {
          await connection.send("Security.setIgnoreCertificateErrors", {
            ignore: true
          });
        }
        await browser3._attach(downloadBehavior);
        return browser3;
      }
      #defaultViewport;
      #process;
      #connection;
      #closeCallback;
      #targetFilterCallback;
      #isPageTargetCallback;
      #defaultContext;
      #contexts = /* @__PURE__ */ new Map();
      #networkEnabled = true;
      #targetManager;
      #handleDevToolsAsPage = false;
      constructor(connection, contextIds, defaultViewport, process8, closeCallback, targetFilterCallback, isPageTargetCallback, waitForInitiallyDiscoveredTargets = true, networkEnabled = true, handleDevToolsAsPage = false) {
        super();
        this.#networkEnabled = networkEnabled;
        this.#defaultViewport = defaultViewport;
        this.#process = process8;
        this.#connection = connection;
        this.#closeCallback = closeCallback || (() => {
        });
        this.#targetFilterCallback = targetFilterCallback || (() => {
          return true;
        });
        this.#handleDevToolsAsPage = handleDevToolsAsPage;
        this.#setIsPageTargetCallback(isPageTargetCallback);
        this.#targetManager = new TargetManager$1(connection, this.#createTarget, this.#targetFilterCallback, waitForInitiallyDiscoveredTargets);
        this.#defaultContext = new CdpBrowserContext(this.#connection, this);
        for (const contextId of contextIds) {
          this.#contexts.set(contextId, new CdpBrowserContext(this.#connection, this, contextId));
        }
      }
      #emitDisconnected = () => {
        this.emit("disconnected", void 0);
      };
      async _attach(downloadBehavior) {
        this.#connection.on(CDPSessionEvent.Disconnected, this.#emitDisconnected);
        if (downloadBehavior) {
          await this.#defaultContext.setDownloadBehavior(downloadBehavior);
        }
        this.#targetManager.on("targetAvailable", this.#onAttachedToTarget);
        this.#targetManager.on("targetGone", this.#onDetachedFromTarget);
        this.#targetManager.on("targetChanged", this.#onTargetChanged);
        this.#targetManager.on("targetDiscovered", this.#onTargetDiscovered);
        await this.#targetManager.initialize();
      }
      _detach() {
        this.#connection.off(CDPSessionEvent.Disconnected, this.#emitDisconnected);
        this.#targetManager.off("targetAvailable", this.#onAttachedToTarget);
        this.#targetManager.off("targetGone", this.#onDetachedFromTarget);
        this.#targetManager.off("targetChanged", this.#onTargetChanged);
        this.#targetManager.off("targetDiscovered", this.#onTargetDiscovered);
      }
      process() {
        return this.#process ?? null;
      }
      _targetManager() {
        return this.#targetManager;
      }
      #setIsPageTargetCallback(isPageTargetCallback) {
        this.#isPageTargetCallback = isPageTargetCallback || ((target) => {
          return target.type() === "page" || target.type() === "background_page" || target.type() === "webview" || this.#handleDevToolsAsPage && target.type() === "other" && isDevToolsPageTarget(target.url());
        });
      }
      _getIsPageTargetCallback() {
        return this.#isPageTargetCallback;
      }
      async createBrowserContext(options2 = {}) {
        const { proxyServer, proxyBypassList, downloadBehavior } = options2;
        const { browserContextId } = await this.#connection.send("Target.createBrowserContext", {
          proxyServer,
          proxyBypassList: proxyBypassList && proxyBypassList.join(",")
        });
        const context2 = new CdpBrowserContext(this.#connection, this, browserContextId);
        if (downloadBehavior) {
          await context2.setDownloadBehavior(downloadBehavior);
        }
        this.#contexts.set(browserContextId, context2);
        return context2;
      }
      browserContexts() {
        return [this.#defaultContext, ...Array.from(this.#contexts.values())];
      }
      defaultBrowserContext() {
        return this.#defaultContext;
      }
      async _disposeContext(contextId) {
        if (!contextId) {
          return;
        }
        await this.#connection.send("Target.disposeBrowserContext", {
          browserContextId: contextId
        });
        this.#contexts.delete(contextId);
      }
      #createTarget = (targetInfo, session) => {
        const { browserContextId } = targetInfo;
        const context2 = browserContextId && this.#contexts.has(browserContextId) ? this.#contexts.get(browserContextId) : this.#defaultContext;
        if (!context2) {
          throw new Error("Missing browser context");
        }
        const createSession = (isAutoAttachEmulated) => {
          return this.#connection._createSession(targetInfo, isAutoAttachEmulated);
        };
        const otherTarget = new OtherTarget(targetInfo, session, context2, this.#targetManager, createSession);
        if (targetInfo.url && isDevToolsPageTarget(targetInfo.url)) {
          return new DevToolsTarget(targetInfo, session, context2, this.#targetManager, createSession, this.#defaultViewport ?? null);
        }
        if (this.#isPageTargetCallback(otherTarget)) {
          return new PageTarget(targetInfo, session, context2, this.#targetManager, createSession, this.#defaultViewport ?? null);
        }
        if (targetInfo.type === "service_worker" || targetInfo.type === "shared_worker") {
          return new WorkerTarget(targetInfo, session, context2, this.#targetManager, createSession);
        }
        return otherTarget;
      };
      #onAttachedToTarget = async (target) => {
        if (target._isTargetExposed() && await target._initializedDeferred.valueOrThrow() === InitializationStatus.SUCCESS) {
          this.emit("targetcreated", target);
          target.browserContext().emit("targetcreated", target);
        }
      };
      #onDetachedFromTarget = async (target) => {
        target._initializedDeferred.resolve(InitializationStatus.ABORTED);
        target._isClosedDeferred.resolve();
        if (target._isTargetExposed() && await target._initializedDeferred.valueOrThrow() === InitializationStatus.SUCCESS) {
          this.emit("targetdestroyed", target);
          target.browserContext().emit("targetdestroyed", target);
        }
      };
      #onTargetChanged = ({ target }) => {
        this.emit("targetchanged", target);
        target.browserContext().emit("targetchanged", target);
      };
      #onTargetDiscovered = (targetInfo) => {
        this.emit("targetdiscovered", targetInfo);
      };
      wsEndpoint() {
        return this.#connection.url();
      }
      async newPage(options2) {
        return await this.#defaultContext.newPage(options2);
      }
      async _createPageInContext(contextId, options2) {
        const hasTargets = this.targets().filter((t) => {
          return t.browserContext().id === contextId;
        }).length > 0;
        const windowBounds = options2?.type === "window" ? options2.windowBounds : void 0;
        const { targetId } = await this.#connection.send("Target.createTarget", {
          url: "about:blank",
          browserContextId: contextId || void 0,
          left: windowBounds?.left,
          top: windowBounds?.top,
          width: windowBounds?.width,
          height: windowBounds?.height,
          windowState: windowBounds?.windowState,
          newWindow: hasTargets && options2?.type === "window" ? true : void 0,
          background: options2?.background
        });
        const target = await this.waitForTarget((t) => {
          return t._targetId === targetId;
        });
        if (!target) {
          throw new Error(`Missing target for page (id = ${targetId})`);
        }
        const initialized = await target._initializedDeferred.valueOrThrow() === InitializationStatus.SUCCESS;
        if (!initialized) {
          throw new Error(`Failed to create target for page (id = ${targetId})`);
        }
        const page = await target.page();
        if (!page) {
          throw new Error(`Failed to create a page for context (id = ${contextId})`);
        }
        return page;
      }
      async _createDevToolsPage(pageTargetId) {
        const openDevToolsResponse = await this.#connection.send("Target.openDevTools", {
          targetId: pageTargetId
        });
        const target = await this.waitForTarget((t) => {
          return t._targetId === openDevToolsResponse.targetId;
        });
        if (!target) {
          throw new Error(`Missing target for DevTools page (id = ${pageTargetId})`);
        }
        const initialized = await target._initializedDeferred.valueOrThrow() === InitializationStatus.SUCCESS;
        if (!initialized) {
          throw new Error(`Failed to create target for DevTools page (id = ${pageTargetId})`);
        }
        const page = await target.page();
        if (!page) {
          throw new Error(`Failed to create a DevTools Page for target (id = ${pageTargetId})`);
        }
        return page;
      }
      async installExtension(path14) {
        const { id: id2 } = await this.#connection.send("Extensions.loadUnpacked", { path: path14 });
        return id2;
      }
      uninstallExtension(id2) {
        return this.#connection.send("Extensions.uninstall", { id: id2 });
      }
      async screens() {
        const { screenInfos } = await this.#connection.send("Emulation.getScreenInfos");
        return screenInfos;
      }
      async addScreen(params) {
        const { screenInfo } = await this.#connection.send("Emulation.addScreen", params);
        return screenInfo;
      }
      async removeScreen(screenId) {
        return await this.#connection.send("Emulation.removeScreen", { screenId });
      }
      async getWindowBounds(windowId) {
        const { bounds } = await this.#connection.send("Browser.getWindowBounds", {
          windowId: Number(windowId)
        });
        return bounds;
      }
      async setWindowBounds(windowId, windowBounds) {
        await this.#connection.send("Browser.setWindowBounds", {
          windowId: Number(windowId),
          bounds: windowBounds
        });
      }
      targets() {
        return Array.from(this.#targetManager.getAvailableTargets().values()).filter((target) => {
          return target._isTargetExposed() && target._initializedDeferred.value() === InitializationStatus.SUCCESS;
        });
      }
      target() {
        const browserTarget = this.targets().find((target) => {
          return target.type() === "browser";
        });
        if (!browserTarget) {
          throw new Error("Browser target is not found");
        }
        return browserTarget;
      }
      async version() {
        const version3 = await this.#getVersion();
        return version3.product;
      }
      async userAgent() {
        const version3 = await this.#getVersion();
        return version3.userAgent;
      }
      async close() {
        await this.#closeCallback.call(null);
        await this.disconnect();
      }
      disconnect() {
        this.#targetManager.dispose();
        this.#connection.dispose();
        this._detach();
        return Promise.resolve();
      }
      get connected() {
        return !this.#connection._closed;
      }
      #getVersion() {
        return this.#connection.send("Browser.getVersion");
      }
      get debugInfo() {
        return {
          pendingProtocolErrors: this.#connection.getPendingProtocolErrors()
        };
      }
      isNetworkEnabled() {
        return this.#networkEnabled;
      }
    };
    PredefinedNetworkConditions = Object.freeze({
      "Slow 3G": {
        download: 500 * 1e3 / 8 * 0.8,
        upload: 500 * 1e3 / 8 * 0.8,
        latency: 400 * 5
      },
      "Fast 3G": {
        download: 1.6 * 1e3 * 1e3 / 8 * 0.9,
        upload: 750 * 1e3 / 8 * 0.9,
        latency: 150 * 3.75
      },
      "Slow 4G": {
        download: 1.6 * 1e3 * 1e3 / 8 * 0.9,
        upload: 750 * 1e3 / 8 * 0.9,
        latency: 150 * 3.75
      },
      "Fast 4G": {
        download: 9 * 1e3 * 1e3 / 8 * 0.9,
        upload: 1.5 * 1e3 * 1e3 / 8 * 0.9,
        latency: 60 * 2.75
      }
    });
    BrowserWebSocketTransport = class _BrowserWebSocketTransport {
      static create(url) {
        return new Promise((resolve2, reject) => {
          const ws = new WebSocket(url);
          ws.addEventListener("open", () => {
            return resolve2(new _BrowserWebSocketTransport(ws));
          });
          ws.addEventListener("error", reject);
        });
      }
      #ws;
      onmessage;
      onclose;
      constructor(ws) {
        this.#ws = ws;
        this.#ws.addEventListener("message", (event) => {
          if (this.onmessage) {
            this.onmessage.call(null, event.data);
          }
        });
        this.#ws.addEventListener("close", () => {
          if (this.onclose) {
            this.onclose.call(null);
          }
        });
        this.#ws.addEventListener("error", () => {
        });
      }
      send(message) {
        this.#ws.send(message);
      }
      close() {
        this.#ws.close();
      }
    };
    BrowserWebSocketTransport$1 = /* @__PURE__ */ Object.freeze({
      __proto__: null,
      BrowserWebSocketTransport
    });
    knownDevices = [
      {
        name: "Blackberry PlayBook",
        userAgent: "Mozilla/5.0 (PlayBook; U; RIM Tablet OS 2.1.0; en-US) AppleWebKit/536.2+ (KHTML like Gecko) Version/7.2.1.0 Safari/536.2+",
        viewport: {
          width: 600,
          height: 1024,
          deviceScaleFactor: 1,
          isMobile: true,
          hasTouch: true,
          isLandscape: false
        }
      },
      {
        name: "Blackberry PlayBook landscape",
        userAgent: "Mozilla/5.0 (PlayBook; U; RIM Tablet OS 2.1.0; en-US) AppleWebKit/536.2+ (KHTML like Gecko) Version/7.2.1.0 Safari/536.2+",
        viewport: {
          width: 1024,
          height: 600,
          deviceScaleFactor: 1,
          isMobile: true,
          hasTouch: true,
          isLandscape: true
        }
      },
      {
        name: "BlackBerry Z30",
        userAgent: "Mozilla/5.0 (BB10; Touch) AppleWebKit/537.10+ (KHTML, like Gecko) Version/10.0.9.2372 Mobile Safari/537.10+",
        viewport: {
          width: 360,
          height: 640,
          deviceScaleFactor: 2,
          isMobile: true,
          hasTouch: true,
          isLandscape: false
        }
      },
      {
        name: "BlackBerry Z30 landscape",
        userAgent: "Mozilla/5.0 (BB10; Touch) AppleWebKit/537.10+ (KHTML, like Gecko) Version/10.0.9.2372 Mobile Safari/537.10+",
        viewport: {
          width: 640,
          height: 360,
          deviceScaleFactor: 2,
          isMobile: true,
          hasTouch: true,
          isLandscape: true
        }
      },
      {
        name: "Galaxy Note 3",
        userAgent: "Mozilla/5.0 (Linux; U; Android 4.3; en-us; SM-N900T Build/JSS15J) AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Mobile Safari/534.30",
        viewport: {
          width: 360,
          height: 640,
          deviceScaleFactor: 3,
          isMobile: true,
          hasTouch: true,
          isLandscape: false
        }
      },
      {
        name: "Galaxy Note 3 landscape",
        userAgent: "Mozilla/5.0 (Linux; U; Android 4.3; en-us; SM-N900T Build/JSS15J) AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Mobile Safari/534.30",
        viewport: {
          width: 640,
          height: 360,
          deviceScaleFactor: 3,
          isMobile: true,
          hasTouch: true,
          isLandscape: true
        }
      },
      {
        name: "Galaxy Note II",
        userAgent: "Mozilla/5.0 (Linux; U; Android 4.1; en-us; GT-N7100 Build/JRO03C) AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Mobile Safari/534.30",
        viewport: {
          width: 360,
          height: 640,
          deviceScaleFactor: 2,
          isMobile: true,
          hasTouch: true,
          isLandscape: false
        }
      },
      {
        name: "Galaxy Note II landscape",
        userAgent: "Mozilla/5.0 (Linux; U; Android 4.1; en-us; GT-N7100 Build/JRO03C) AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Mobile Safari/534.30",
        viewport: {
          width: 640,
          height: 360,
          deviceScaleFactor: 2,
          isMobile: true,
          hasTouch: true,
          isLandscape: true
        }
      },
      {
        name: "Galaxy S III",
        userAgent: "Mozilla/5.0 (Linux; U; Android 4.0; en-us; GT-I9300 Build/IMM76D) AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Mobile Safari/534.30",
        viewport: {
          width: 360,
          height: 640,
          deviceScaleFactor: 2,
          isMobile: true,
          hasTouch: true,
          isLandscape: false
        }
      },
      {
        name: "Galaxy S III landscape",
        userAgent: "Mozilla/5.0 (Linux; U; Android 4.0; en-us; GT-I9300 Build/IMM76D) AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Mobile Safari/534.30",
        viewport: {
          width: 640,
          height: 360,
          deviceScaleFactor: 2,
          isMobile: true,
          hasTouch: true,
          isLandscape: true
        }
      },
      {
        name: "Galaxy S5",
        userAgent: "Mozilla/5.0 (Linux; Android 5.0; SM-G900P Build/LRX21T) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3765.0 Mobile Safari/537.36",
        viewport: {
          width: 360,
          height: 640,
          deviceScaleFactor: 3,
          isMobile: true,
          hasTouch: true,
          isLandscape: false
        }
      },
      {
        name: "Galaxy S5 landscape",
        userAgent: "Mozilla/5.0 (Linux; Android 5.0; SM-G900P Build/LRX21T) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3765.0 Mobile Safari/537.36",
        viewport: {
          width: 640,
          height: 360,
          deviceScaleFactor: 3,
          isMobile: true,
          hasTouch: true,
          isLandscape: true
        }
      },
      {
        name: "Galaxy S8",
        userAgent: "Mozilla/5.0 (Linux; Android 7.0; SM-G950U Build/NRD90M) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/62.0.3202.84 Mobile Safari/537.36",
        viewport: {
          width: 360,
          height: 740,
          deviceScaleFactor: 3,
          isMobile: true,
          hasTouch: true,
          isLandscape: false
        }
      },
      {
        name: "Galaxy S8 landscape",
        userAgent: "Mozilla/5.0 (Linux; Android 7.0; SM-G950U Build/NRD90M) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/62.0.3202.84 Mobile Safari/537.36",
        viewport: {
          width: 740,
          height: 360,
          deviceScaleFactor: 3,
          isMobile: true,
          hasTouch: true,
          isLandscape: true
        }
      },
      {
        name: "Galaxy S9+",
        userAgent: "Mozilla/5.0 (Linux; Android 8.0.0; SM-G965U Build/R16NW) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.111 Mobile Safari/537.36",
        viewport: {
          width: 320,
          height: 658,
          deviceScaleFactor: 4.5,
          isMobile: true,
          hasTouch: true,
          isLandscape: false
        }
      },
      {
        name: "Galaxy S9+ landscape",
        userAgent: "Mozilla/5.0 (Linux; Android 8.0.0; SM-G965U Build/R16NW) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.111 Mobile Safari/537.36",
        viewport: {
          width: 658,
          height: 320,
          deviceScaleFactor: 4.5,
          isMobile: true,
          hasTouch: true,
          isLandscape: true
        }
      },
      {
        name: "Galaxy Tab S4",
        userAgent: "Mozilla/5.0 (Linux; Android 8.1.0; SM-T837A) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.80 Safari/537.36",
        viewport: {
          width: 712,
          height: 1138,
          deviceScaleFactor: 2.25,
          isMobile: true,
          hasTouch: true,
          isLandscape: false
        }
      },
      {
        name: "Galaxy Tab S4 landscape",
        userAgent: "Mozilla/5.0 (Linux; Android 8.1.0; SM-T837A) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.80 Safari/537.36",
        viewport: {
          width: 1138,
          height: 712,
          deviceScaleFactor: 2.25,
          isMobile: true,
          hasTouch: true,
          isLandscape: true
        }
      },
      {
        name: "iPad",
        userAgent: "Mozilla/5.0 (iPad; CPU OS 11_0 like Mac OS X) AppleWebKit/604.1.34 (KHTML, like Gecko) Version/11.0 Mobile/15A5341f Safari/604.1",
        viewport: {
          width: 768,
          height: 1024,
          deviceScaleFactor: 2,
          isMobile: true,
          hasTouch: true,
          isLandscape: false
        }
      },
      {
        name: "iPad landscape",
        userAgent: "Mozilla/5.0 (iPad; CPU OS 11_0 like Mac OS X) AppleWebKit/604.1.34 (KHTML, like Gecko) Version/11.0 Mobile/15A5341f Safari/604.1",
        viewport: {
          width: 1024,
          height: 768,
          deviceScaleFactor: 2,
          isMobile: true,
          hasTouch: true,
          isLandscape: true
        }
      },
      {
        name: "iPad (gen 6)",
        userAgent: "Mozilla/5.0 (iPad; CPU OS 12_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/15.4 Mobile/15E148 Safari/604.1",
        viewport: {
          width: 768,
          height: 1024,
          deviceScaleFactor: 2,
          isMobile: true,
          hasTouch: true,
          isLandscape: false
        }
      },
      {
        name: "iPad (gen 6) landscape",
        userAgent: "Mozilla/5.0 (iPad; CPU OS 12_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/15.4 Mobile/15E148 Safari/604.1",
        viewport: {
          width: 1024,
          height: 768,
          deviceScaleFactor: 2,
          isMobile: true,
          hasTouch: true,
          isLandscape: true
        }
      },
      {
        name: "iPad (gen 7)",
        userAgent: "Mozilla/5.0 (iPad; CPU OS 12_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/15.4 Mobile/15E148 Safari/604.1",
        viewport: {
          width: 810,
          height: 1080,
          deviceScaleFactor: 2,
          isMobile: true,
          hasTouch: true,
          isLandscape: false
        }
      },
      {
        name: "iPad (gen 7) landscape",
        userAgent: "Mozilla/5.0 (iPad; CPU OS 12_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/15.4 Mobile/15E148 Safari/604.1",
        viewport: {
          width: 1080,
          height: 810,
          deviceScaleFactor: 2,
          isMobile: true,
          hasTouch: true,
          isLandscape: true
        }
      },
      {
        name: "iPad Mini",
        userAgent: "Mozilla/5.0 (iPad; CPU OS 11_0 like Mac OS X) AppleWebKit/604.1.34 (KHTML, like Gecko) Version/11.0 Mobile/15A5341f Safari/604.1",
        viewport: {
          width: 768,
          height: 1024,
          deviceScaleFactor: 2,
          isMobile: true,
          hasTouch: true,
          isLandscape: false
        }
      },
      {
        name: "iPad Mini landscape",
        userAgent: "Mozilla/5.0 (iPad; CPU OS 11_0 like Mac OS X) AppleWebKit/604.1.34 (KHTML, like Gecko) Version/11.0 Mobile/15A5341f Safari/604.1",
        viewport: {
          width: 1024,
          height: 768,
          deviceScaleFactor: 2,
          isMobile: true,
          hasTouch: true,
          isLandscape: true
        }
      },
      {
        name: "iPad Pro",
        userAgent: "Mozilla/5.0 (iPad; CPU OS 11_0 like Mac OS X) AppleWebKit/604.1.34 (KHTML, like Gecko) Version/11.0 Mobile/15A5341f Safari/604.1",
        viewport: {
          width: 1024,
          height: 1366,
          deviceScaleFactor: 2,
          isMobile: true,
          hasTouch: true,
          isLandscape: false
        }
      },
      {
        name: "iPad Pro landscape",
        userAgent: "Mozilla/5.0 (iPad; CPU OS 11_0 like Mac OS X) AppleWebKit/604.1.34 (KHTML, like Gecko) Version/11.0 Mobile/15A5341f Safari/604.1",
        viewport: {
          width: 1366,
          height: 1024,
          deviceScaleFactor: 2,
          isMobile: true,
          hasTouch: true,
          isLandscape: true
        }
      },
      {
        name: "iPad Pro 11",
        userAgent: "Mozilla/5.0 (iPad; CPU OS 12_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/15.4 Mobile/15E148 Safari/604.1",
        viewport: {
          width: 834,
          height: 1194,
          deviceScaleFactor: 2,
          isMobile: true,
          hasTouch: true,
          isLandscape: false
        }
      },
      {
        name: "iPad Pro 11 landscape",
        userAgent: "Mozilla/5.0 (iPad; CPU OS 12_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/15.4 Mobile/15E148 Safari/604.1",
        viewport: {
          width: 1194,
          height: 834,
          deviceScaleFactor: 2,
          isMobile: true,
          hasTouch: true,
          isLandscape: true
        }
      },
      {
        name: "iPhone 4",
        userAgent: "Mozilla/5.0 (iPhone; CPU iPhone OS 7_1_2 like Mac OS X) AppleWebKit/537.51.2 (KHTML, like Gecko) Version/7.0 Mobile/11D257 Safari/9537.53",
        viewport: {
          width: 320,
          height: 480,
          deviceScaleFactor: 2,
          isMobile: true,
          hasTouch: true,
          isLandscape: false
        }
      },
      {
        name: "iPhone 4 landscape",
        userAgent: "Mozilla/5.0 (iPhone; CPU iPhone OS 7_1_2 like Mac OS X) AppleWebKit/537.51.2 (KHTML, like Gecko) Version/7.0 Mobile/11D257 Safari/9537.53",
        viewport: {
          width: 480,
          height: 320,
          deviceScaleFactor: 2,
          isMobile: true,
          hasTouch: true,
          isLandscape: true
        }
      },
      {
        name: "iPhone 5",
        userAgent: "Mozilla/5.0 (iPhone; CPU iPhone OS 10_3_1 like Mac OS X) AppleWebKit/603.1.30 (KHTML, like Gecko) Version/10.0 Mobile/14E304 Safari/602.1",
        viewport: {
          width: 320,
          height: 568,
          deviceScaleFactor: 2,
          isMobile: true,
          hasTouch: true,
          isLandscape: false
        }
      },
      {
        name: "iPhone 5 landscape",
        userAgent: "Mozilla/5.0 (iPhone; CPU iPhone OS 10_3_1 like Mac OS X) AppleWebKit/603.1.30 (KHTML, like Gecko) Version/10.0 Mobile/14E304 Safari/602.1",
        viewport: {
          width: 568,
          height: 320,
          deviceScaleFactor: 2,
          isMobile: true,
          hasTouch: true,
          isLandscape: true
        }
      },
      {
        name: "iPhone 6",
        userAgent: "Mozilla/5.0 (iPhone; CPU iPhone OS 11_0 like Mac OS X) AppleWebKit/604.1.38 (KHTML, like Gecko) Version/11.0 Mobile/15A372 Safari/604.1",
        viewport: {
          width: 375,
          height: 667,
          deviceScaleFactor: 2,
          isMobile: true,
          hasTouch: true,
          isLandscape: false
        }
      },
      {
        name: "iPhone 6 landscape",
        userAgent: "Mozilla/5.0 (iPhone; CPU iPhone OS 11_0 like Mac OS X) AppleWebKit/604.1.38 (KHTML, like Gecko) Version/11.0 Mobile/15A372 Safari/604.1",
        viewport: {
          width: 667,
          height: 375,
          deviceScaleFactor: 2,
          isMobile: true,
          hasTouch: true,
          isLandscape: true
        }
      },
      {
        name: "iPhone 6 Plus",
        userAgent: "Mozilla/5.0 (iPhone; CPU iPhone OS 11_0 like Mac OS X) AppleWebKit/604.1.38 (KHTML, like Gecko) Version/11.0 Mobile/15A372 Safari/604.1",
        viewport: {
          width: 414,
          height: 736,
          deviceScaleFactor: 3,
          isMobile: true,
          hasTouch: true,
          isLandscape: false
        }
      },
      {
        name: "iPhone 6 Plus landscape",
        userAgent: "Mozilla/5.0 (iPhone; CPU iPhone OS 11_0 like Mac OS X) AppleWebKit/604.1.38 (KHTML, like Gecko) Version/11.0 Mobile/15A372 Safari/604.1",
        viewport: {
          width: 736,
          height: 414,
          deviceScaleFactor: 3,
          isMobile: true,
          hasTouch: true,
          isLandscape: true
        }
      },
      {
        name: "iPhone 7",
        userAgent: "Mozilla/5.0 (iPhone; CPU iPhone OS 11_0 like Mac OS X) AppleWebKit/604.1.38 (KHTML, like Gecko) Version/11.0 Mobile/15A372 Safari/604.1",
        viewport: {
          width: 375,
          height: 667,
          deviceScaleFactor: 2,
          isMobile: true,
          hasTouch: true,
          isLandscape: false
        }
      },
      {
        name: "iPhone 7 landscape",
        userAgent: "Mozilla/5.0 (iPhone; CPU iPhone OS 11_0 like Mac OS X) AppleWebKit/604.1.38 (KHTML, like Gecko) Version/11.0 Mobile/15A372 Safari/604.1",
        viewport: {
          width: 667,
          height: 375,
          deviceScaleFactor: 2,
          isMobile: true,
          hasTouch: true,
          isLandscape: true
        }
      },
      {
        name: "iPhone 7 Plus",
        userAgent: "Mozilla/5.0 (iPhone; CPU iPhone OS 11_0 like Mac OS X) AppleWebKit/604.1.38 (KHTML, like Gecko) Version/11.0 Mobile/15A372 Safari/604.1",
        viewport: {
          width: 414,
          height: 736,
          deviceScaleFactor: 3,
          isMobile: true,
          hasTouch: true,
          isLandscape: false
        }
      },
      {
        name: "iPhone 7 Plus landscape",
        userAgent: "Mozilla/5.0 (iPhone; CPU iPhone OS 11_0 like Mac OS X) AppleWebKit/604.1.38 (KHTML, like Gecko) Version/11.0 Mobile/15A372 Safari/604.1",
        viewport: {
          width: 736,
          height: 414,
          deviceScaleFactor: 3,
          isMobile: true,
          hasTouch: true,
          isLandscape: true
        }
      },
      {
        name: "iPhone 8",
        userAgent: "Mozilla/5.0 (iPhone; CPU iPhone OS 11_0 like Mac OS X) AppleWebKit/604.1.38 (KHTML, like Gecko) Version/11.0 Mobile/15A372 Safari/604.1",
        viewport: {
          width: 375,
          height: 667,
          deviceScaleFactor: 2,
          isMobile: true,
          hasTouch: true,
          isLandscape: false
        }
      },
      {
        name: "iPhone 8 landscape",
        userAgent: "Mozilla/5.0 (iPhone; CPU iPhone OS 11_0 like Mac OS X) AppleWebKit/604.1.38 (KHTML, like Gecko) Version/11.0 Mobile/15A372 Safari/604.1",
        viewport: {
          width: 667,
          height: 375,
          deviceScaleFactor: 2,
          isMobile: true,
          hasTouch: true,
          isLandscape: true
        }
      },
      {
        name: "iPhone 8 Plus",
        userAgent: "Mozilla/5.0 (iPhone; CPU iPhone OS 11_0 like Mac OS X) AppleWebKit/604.1.38 (KHTML, like Gecko) Version/11.0 Mobile/15A372 Safari/604.1",
        viewport: {
          width: 414,
          height: 736,
          deviceScaleFactor: 3,
          isMobile: true,
          hasTouch: true,
          isLandscape: false
        }
      },
      {
        name: "iPhone 8 Plus landscape",
        userAgent: "Mozilla/5.0 (iPhone; CPU iPhone OS 11_0 like Mac OS X) AppleWebKit/604.1.38 (KHTML, like Gecko) Version/11.0 Mobile/15A372 Safari/604.1",
        viewport: {
          width: 736,
          height: 414,
          deviceScaleFactor: 3,
          isMobile: true,
          hasTouch: true,
          isLandscape: true
        }
      },
      {
        name: "iPhone SE",
        userAgent: "Mozilla/5.0 (iPhone; CPU iPhone OS 10_3_1 like Mac OS X) AppleWebKit/603.1.30 (KHTML, like Gecko) Version/10.0 Mobile/14E304 Safari/602.1",
        viewport: {
          width: 320,
          height: 568,
          deviceScaleFactor: 2,
          isMobile: true,
          hasTouch: true,
          isLandscape: false
        }
      },
      {
        name: "iPhone SE landscape",
        userAgent: "Mozilla/5.0 (iPhone; CPU iPhone OS 10_3_1 like Mac OS X) AppleWebKit/603.1.30 (KHTML, like Gecko) Version/10.0 Mobile/14E304 Safari/602.1",
        viewport: {
          width: 568,
          height: 320,
          deviceScaleFactor: 2,
          isMobile: true,
          hasTouch: true,
          isLandscape: true
        }
      },
      {
        name: "iPhone X",
        userAgent: "Mozilla/5.0 (iPhone; CPU iPhone OS 11_0 like Mac OS X) AppleWebKit/604.1.38 (KHTML, like Gecko) Version/11.0 Mobile/15A372 Safari/604.1",
        viewport: {
          width: 375,
          height: 812,
          deviceScaleFactor: 3,
          isMobile: true,
          hasTouch: true,
          isLandscape: false
        }
      },
      {
        name: "iPhone X landscape",
        userAgent: "Mozilla/5.0 (iPhone; CPU iPhone OS 11_0 like Mac OS X) AppleWebKit/604.1.38 (KHTML, like Gecko) Version/11.0 Mobile/15A372 Safari/604.1",
        viewport: {
          width: 812,
          height: 375,
          deviceScaleFactor: 3,
          isMobile: true,
          hasTouch: true,
          isLandscape: true
        }
      },
      {
        name: "iPhone XR",
        userAgent: "Mozilla/5.0 (iPhone; CPU iPhone OS 12_0 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/12.0 Mobile/15E148 Safari/604.1",
        viewport: {
          width: 414,
          height: 896,
          deviceScaleFactor: 3,
          isMobile: true,
          hasTouch: true,
          isLandscape: false
        }
      },
      {
        name: "iPhone XR landscape",
        userAgent: "Mozilla/5.0 (iPhone; CPU iPhone OS 12_0 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/12.0 Mobile/15E148 Safari/604.1",
        viewport: {
          width: 896,
          height: 414,
          deviceScaleFactor: 3,
          isMobile: true,
          hasTouch: true,
          isLandscape: true
        }
      },
      {
        name: "iPhone 11",
        userAgent: "Mozilla/5.0 (iPhone; CPU iPhone OS 13_7 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.1 Mobile/15E148 Safari/604.1",
        viewport: {
          width: 414,
          height: 828,
          deviceScaleFactor: 2,
          isMobile: true,
          hasTouch: true,
          isLandscape: false
        }
      },
      {
        name: "iPhone 11 landscape",
        userAgent: "Mozilla/5.0 (iPhone; CPU iPhone OS 13_7 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.1 Mobile/15E148 Safari/604.1",
        viewport: {
          width: 828,
          height: 414,
          deviceScaleFactor: 2,
          isMobile: true,
          hasTouch: true,
          isLandscape: true
        }
      },
      {
        name: "iPhone 11 Pro",
        userAgent: "Mozilla/5.0 (iPhone; CPU iPhone OS 13_7 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.1 Mobile/15E148 Safari/604.1",
        viewport: {
          width: 375,
          height: 812,
          deviceScaleFactor: 3,
          isMobile: true,
          hasTouch: true,
          isLandscape: false
        }
      },
      {
        name: "iPhone 11 Pro landscape",
        userAgent: "Mozilla/5.0 (iPhone; CPU iPhone OS 13_7 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.1 Mobile/15E148 Safari/604.1",
        viewport: {
          width: 812,
          height: 375,
          deviceScaleFactor: 3,
          isMobile: true,
          hasTouch: true,
          isLandscape: true
        }
      },
      {
        name: "iPhone 11 Pro Max",
        userAgent: "Mozilla/5.0 (iPhone; CPU iPhone OS 13_7 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.1 Mobile/15E148 Safari/604.1",
        viewport: {
          width: 414,
          height: 896,
          deviceScaleFactor: 3,
          isMobile: true,
          hasTouch: true,
          isLandscape: false
        }
      },
      {
        name: "iPhone 11 Pro Max landscape",
        userAgent: "Mozilla/5.0 (iPhone; CPU iPhone OS 13_7 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.1 Mobile/15E148 Safari/604.1",
        viewport: {
          width: 896,
          height: 414,
          deviceScaleFactor: 3,
          isMobile: true,
          hasTouch: true,
          isLandscape: true
        }
      },
      {
        name: "iPhone 12",
        userAgent: "Mozilla/5.0 (iPhone; CPU iPhone OS 14_4 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/15.4 Mobile/15E148 Safari/604.1",
        viewport: {
          width: 390,
          height: 844,
          deviceScaleFactor: 3,
          isMobile: true,
          hasTouch: true,
          isLandscape: false
        }
      },
      {
        name: "iPhone 12 landscape",
        userAgent: "Mozilla/5.0 (iPhone; CPU iPhone OS 14_4 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/15.4 Mobile/15E148 Safari/604.1",
        viewport: {
          width: 844,
          height: 390,
          deviceScaleFactor: 3,
          isMobile: true,
          hasTouch: true,
          isLandscape: true
        }
      },
      {
        name: "iPhone 12 Pro",
        userAgent: "Mozilla/5.0 (iPhone; CPU iPhone OS 14_4 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/15.4 Mobile/15E148 Safari/604.1",
        viewport: {
          width: 390,
          height: 844,
          deviceScaleFactor: 3,
          isMobile: true,
          hasTouch: true,
          isLandscape: false
        }
      },
      {
        name: "iPhone 12 Pro landscape",
        userAgent: "Mozilla/5.0 (iPhone; CPU iPhone OS 14_4 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/15.4 Mobile/15E148 Safari/604.1",
        viewport: {
          width: 844,
          height: 390,
          deviceScaleFactor: 3,
          isMobile: true,
          hasTouch: true,
          isLandscape: true
        }
      },
      {
        name: "iPhone 12 Pro Max",
        userAgent: "Mozilla/5.0 (iPhone; CPU iPhone OS 14_4 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/15.4 Mobile/15E148 Safari/604.1",
        viewport: {
          width: 428,
          height: 926,
          deviceScaleFactor: 3,
          isMobile: true,
          hasTouch: true,
          isLandscape: false
        }
      },
      {
        name: "iPhone 12 Pro Max landscape",
        userAgent: "Mozilla/5.0 (iPhone; CPU iPhone OS 14_4 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/15.4 Mobile/15E148 Safari/604.1",
        viewport: {
          width: 926,
          height: 428,
          deviceScaleFactor: 3,
          isMobile: true,
          hasTouch: true,
          isLandscape: true
        }
      },
      {
        name: "iPhone 12 Mini",
        userAgent: "Mozilla/5.0 (iPhone; CPU iPhone OS 14_4 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/15.4 Mobile/15E148 Safari/604.1",
        viewport: {
          width: 375,
          height: 812,
          deviceScaleFactor: 3,
          isMobile: true,
          hasTouch: true,
          isLandscape: false
        }
      },
      {
        name: "iPhone 12 Mini landscape",
        userAgent: "Mozilla/5.0 (iPhone; CPU iPhone OS 14_4 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/15.4 Mobile/15E148 Safari/604.1",
        viewport: {
          width: 812,
          height: 375,
          deviceScaleFactor: 3,
          isMobile: true,
          hasTouch: true,
          isLandscape: true
        }
      },
      {
        name: "iPhone 13",
        userAgent: "Mozilla/5.0 (iPhone; CPU iPhone OS 15_0 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/15.4 Mobile/15E148 Safari/604.1",
        viewport: {
          width: 390,
          height: 844,
          deviceScaleFactor: 3,
          isMobile: true,
          hasTouch: true,
          isLandscape: false
        }
      },
      {
        name: "iPhone 13 landscape",
        userAgent: "Mozilla/5.0 (iPhone; CPU iPhone OS 15_0 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/15.4 Mobile/15E148 Safari/604.1",
        viewport: {
          width: 844,
          height: 390,
          deviceScaleFactor: 3,
          isMobile: true,
          hasTouch: true,
          isLandscape: true
        }
      },
      {
        name: "iPhone 13 Pro",
        userAgent: "Mozilla/5.0 (iPhone; CPU iPhone OS 15_0 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/15.4 Mobile/15E148 Safari/604.1",
        viewport: {
          width: 390,
          height: 844,
          deviceScaleFactor: 3,
          isMobile: true,
          hasTouch: true,
          isLandscape: false
        }
      },
      {
        name: "iPhone 13 Pro landscape",
        userAgent: "Mozilla/5.0 (iPhone; CPU iPhone OS 15_0 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/15.4 Mobile/15E148 Safari/604.1",
        viewport: {
          width: 844,
          height: 390,
          deviceScaleFactor: 3,
          isMobile: true,
          hasTouch: true,
          isLandscape: true
        }
      },
      {
        name: "iPhone 13 Pro Max",
        userAgent: "Mozilla/5.0 (iPhone; CPU iPhone OS 15_0 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/15.4 Mobile/15E148 Safari/604.1",
        viewport: {
          width: 428,
          height: 926,
          deviceScaleFactor: 3,
          isMobile: true,
          hasTouch: true,
          isLandscape: false
        }
      },
      {
        name: "iPhone 13 Pro Max landscape",
        userAgent: "Mozilla/5.0 (iPhone; CPU iPhone OS 15_0 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/15.4 Mobile/15E148 Safari/604.1",
        viewport: {
          width: 926,
          height: 428,
          deviceScaleFactor: 3,
          isMobile: true,
          hasTouch: true,
          isLandscape: true
        }
      },
      {
        name: "iPhone 13 Mini",
        userAgent: "Mozilla/5.0 (iPhone; CPU iPhone OS 15_0 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/15.4 Mobile/15E148 Safari/604.1",
        viewport: {
          width: 375,
          height: 812,
          deviceScaleFactor: 3,
          isMobile: true,
          hasTouch: true,
          isLandscape: false
        }
      },
      {
        name: "iPhone 13 Mini landscape",
        userAgent: "Mozilla/5.0 (iPhone; CPU iPhone OS 15_0 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/15.4 Mobile/15E148 Safari/604.1",
        viewport: {
          width: 812,
          height: 375,
          deviceScaleFactor: 3,
          isMobile: true,
          hasTouch: true,
          isLandscape: true
        }
      },
      {
        name: "iPhone 14",
        userAgent: "Mozilla/5.0 (iPhone; CPU iPhone OS 16_6 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.6 Mobile/15E148 Safari/604.1",
        viewport: {
          width: 390,
          height: 663,
          deviceScaleFactor: 3,
          isMobile: true,
          hasTouch: true,
          isLandscape: false
        }
      },
      {
        name: "iPhone 14 landscape",
        userAgent: "Mozilla/5.0 (iPhone; CPU iPhone OS 16_6 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.6 Mobile/15E148 Safari/604.1",
        viewport: {
          width: 750,
          height: 340,
          deviceScaleFactor: 3,
          isMobile: true,
          hasTouch: true,
          isLandscape: true
        }
      },
      {
        name: "iPhone 14 Plus",
        userAgent: "Mozilla/5.0 (iPhone; CPU iPhone OS 16_6 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.6 Mobile/15E148 Safari/604.1",
        viewport: {
          width: 428,
          height: 745,
          deviceScaleFactor: 3,
          isMobile: true,
          hasTouch: true,
          isLandscape: false
        }
      },
      {
        name: "iPhone 14 Plus landscape",
        userAgent: "Mozilla/5.0 (iPhone; CPU iPhone OS 16_6 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.6 Mobile/15E148 Safari/604.1",
        viewport: {
          width: 832,
          height: 378,
          deviceScaleFactor: 3,
          isMobile: true,
          hasTouch: true,
          isLandscape: true
        }
      },
      {
        name: "iPhone 14 Pro",
        userAgent: "Mozilla/5.0 (iPhone; CPU iPhone OS 16_6 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.6 Mobile/15E148 Safari/604.1",
        viewport: {
          width: 393,
          height: 659,
          deviceScaleFactor: 3,
          isMobile: true,
          hasTouch: true,
          isLandscape: false
        }
      },
      {
        name: "iPhone 14 Pro landscape",
        userAgent: "Mozilla/5.0 (iPhone; CPU iPhone OS 16_6 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.6 Mobile/15E148 Safari/604.1",
        viewport: {
          width: 734,
          height: 343,
          deviceScaleFactor: 3,
          isMobile: true,
          hasTouch: true,
          isLandscape: true
        }
      },
      {
        name: "iPhone 14 Pro Max",
        userAgent: "Mozilla/5.0 (iPhone; CPU iPhone OS 16_6 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.6 Mobile/15E148 Safari/604.1",
        viewport: {
          width: 430,
          height: 739,
          deviceScaleFactor: 3,
          isMobile: true,
          hasTouch: true,
          isLandscape: false
        }
      },
      {
        name: "iPhone 14 Pro Max landscape",
        userAgent: "Mozilla/5.0 (iPhone; CPU iPhone OS 16_6 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.6 Mobile/15E148 Safari/604.1",
        viewport: {
          width: 814,
          height: 380,
          deviceScaleFactor: 3,
          isMobile: true,
          hasTouch: true,
          isLandscape: true
        }
      },
      {
        name: "iPhone 15",
        userAgent: "Mozilla/5.0 (iPhone; CPU iPhone OS 17_5 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.5 Mobile/15E148 Safari/604.1",
        viewport: {
          width: 393,
          height: 659,
          deviceScaleFactor: 3,
          isMobile: true,
          hasTouch: true,
          isLandscape: false
        }
      },
      {
        name: "iPhone 15 landscape",
        userAgent: "Mozilla/5.0 (iPhone; CPU iPhone OS 17_5 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.5 Mobile/15E148 Safari/604.1",
        viewport: {
          width: 734,
          height: 343,
          deviceScaleFactor: 3,
          isMobile: true,
          hasTouch: true,
          isLandscape: true
        }
      },
      {
        name: "iPhone 15 Plus",
        userAgent: "Mozilla/5.0 (iPhone; CPU iPhone OS 17_5 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.5 Mobile/15E148 Safari/604.1",
        viewport: {
          width: 430,
          height: 739,
          deviceScaleFactor: 3,
          isMobile: true,
          hasTouch: true,
          isLandscape: false
        }
      },
      {
        name: "iPhone 15 Plus landscape",
        userAgent: "Mozilla/5.0 (iPhone; CPU iPhone OS 17_5 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.5 Mobile/15E148 Safari/604.1",
        viewport: {
          width: 814,
          height: 380,
          deviceScaleFactor: 3,
          isMobile: true,
          hasTouch: true,
          isLandscape: true
        }
      },
      {
        name: "iPhone 15 Pro",
        userAgent: "Mozilla/5.0 (iPhone; CPU iPhone OS 17_5 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.5 Mobile/15E148 Safari/604.1",
        viewport: {
          width: 393,
          height: 659,
          deviceScaleFactor: 3,
          isMobile: true,
          hasTouch: true,
          isLandscape: false
        }
      },
      {
        name: "iPhone 15 Pro landscape",
        userAgent: "Mozilla/5.0 (iPhone; CPU iPhone OS 17_5 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.5 Mobile/15E148 Safari/604.1",
        viewport: {
          width: 734,
          height: 343,
          deviceScaleFactor: 3,
          isMobile: true,
          hasTouch: true,
          isLandscape: true
        }
      },
      {
        name: "iPhone 15 Pro Max",
        userAgent: "Mozilla/5.0 (iPhone; CPU iPhone OS 17_5 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.5 Mobile/15E148 Safari/604.1",
        viewport: {
          width: 430,
          height: 739,
          deviceScaleFactor: 3,
          isMobile: true,
          hasTouch: true,
          isLandscape: false
        }
      },
      {
        name: "iPhone 15 Pro Max landscape",
        userAgent: "Mozilla/5.0 (iPhone; CPU iPhone OS 17_5 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.5 Mobile/15E148 Safari/604.1",
        viewport: {
          width: 814,
          height: 380,
          deviceScaleFactor: 3,
          isMobile: true,
          hasTouch: true,
          isLandscape: true
        }
      },
      {
        name: "JioPhone 2",
        userAgent: "Mozilla/5.0 (Mobile; LYF/F300B/LYF-F300B-001-01-15-130718-i;Android; rv:48.0) Gecko/48.0 Firefox/48.0 KAIOS/2.5",
        viewport: {
          width: 240,
          height: 320,
          deviceScaleFactor: 1,
          isMobile: true,
          hasTouch: true,
          isLandscape: false
        }
      },
      {
        name: "JioPhone 2 landscape",
        userAgent: "Mozilla/5.0 (Mobile; LYF/F300B/LYF-F300B-001-01-15-130718-i;Android; rv:48.0) Gecko/48.0 Firefox/48.0 KAIOS/2.5",
        viewport: {
          width: 320,
          height: 240,
          deviceScaleFactor: 1,
          isMobile: true,
          hasTouch: true,
          isLandscape: true
        }
      },
      {
        name: "Kindle Fire HDX",
        userAgent: "Mozilla/5.0 (Linux; U; en-us; KFAPWI Build/JDQ39) AppleWebKit/535.19 (KHTML, like Gecko) Silk/3.13 Safari/535.19 Silk-Accelerated=true",
        viewport: {
          width: 800,
          height: 1280,
          deviceScaleFactor: 2,
          isMobile: true,
          hasTouch: true,
          isLandscape: false
        }
      },
      {
        name: "Kindle Fire HDX landscape",
        userAgent: "Mozilla/5.0 (Linux; U; en-us; KFAPWI Build/JDQ39) AppleWebKit/535.19 (KHTML, like Gecko) Silk/3.13 Safari/535.19 Silk-Accelerated=true",
        viewport: {
          width: 1280,
          height: 800,
          deviceScaleFactor: 2,
          isMobile: true,
          hasTouch: true,
          isLandscape: true
        }
      },
      {
        name: "LG Optimus L70",
        userAgent: "Mozilla/5.0 (Linux; U; Android 4.4.2; en-us; LGMS323 Build/KOT49I.MS32310c) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/75.0.3765.0 Mobile Safari/537.36",
        viewport: {
          width: 384,
          height: 640,
          deviceScaleFactor: 1.25,
          isMobile: true,
          hasTouch: true,
          isLandscape: false
        }
      },
      {
        name: "LG Optimus L70 landscape",
        userAgent: "Mozilla/5.0 (Linux; U; Android 4.4.2; en-us; LGMS323 Build/KOT49I.MS32310c) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/75.0.3765.0 Mobile Safari/537.36",
        viewport: {
          width: 640,
          height: 384,
          deviceScaleFactor: 1.25,
          isMobile: true,
          hasTouch: true,
          isLandscape: true
        }
      },
      {
        name: "Microsoft Lumia 550",
        userAgent: "Mozilla/5.0 (Windows Phone 10.0; Android 4.2.1; Microsoft; Lumia 550) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2486.0 Mobile Safari/537.36 Edge/14.14263",
        viewport: {
          width: 640,
          height: 360,
          deviceScaleFactor: 2,
          isMobile: true,
          hasTouch: true,
          isLandscape: false
        }
      },
      {
        name: "Microsoft Lumia 950",
        userAgent: "Mozilla/5.0 (Windows Phone 10.0; Android 4.2.1; Microsoft; Lumia 950) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2486.0 Mobile Safari/537.36 Edge/14.14263",
        viewport: {
          width: 360,
          height: 640,
          deviceScaleFactor: 4,
          isMobile: true,
          hasTouch: true,
          isLandscape: false
        }
      },
      {
        name: "Microsoft Lumia 950 landscape",
        userAgent: "Mozilla/5.0 (Windows Phone 10.0; Android 4.2.1; Microsoft; Lumia 950) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2486.0 Mobile Safari/537.36 Edge/14.14263",
        viewport: {
          width: 640,
          height: 360,
          deviceScaleFactor: 4,
          isMobile: true,
          hasTouch: true,
          isLandscape: true
        }
      },
      {
        name: "Nexus 10",
        userAgent: "Mozilla/5.0 (Linux; Android 6.0.1; Nexus 10 Build/MOB31T) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3765.0 Safari/537.36",
        viewport: {
          width: 800,
          height: 1280,
          deviceScaleFactor: 2,
          isMobile: true,
          hasTouch: true,
          isLandscape: false
        }
      },
      {
        name: "Nexus 10 landscape",
        userAgent: "Mozilla/5.0 (Linux; Android 6.0.1; Nexus 10 Build/MOB31T) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3765.0 Safari/537.36",
        viewport: {
          width: 1280,
          height: 800,
          deviceScaleFactor: 2,
          isMobile: true,
          hasTouch: true,
          isLandscape: true
        }
      },
      {
        name: "Nexus 4",
        userAgent: "Mozilla/5.0 (Linux; Android 4.4.2; Nexus 4 Build/KOT49H) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3765.0 Mobile Safari/537.36",
        viewport: {
          width: 384,
          height: 640,
          deviceScaleFactor: 2,
          isMobile: true,
          hasTouch: true,
          isLandscape: false
        }
      },
      {
        name: "Nexus 4 landscape",
        userAgent: "Mozilla/5.0 (Linux; Android 4.4.2; Nexus 4 Build/KOT49H) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3765.0 Mobile Safari/537.36",
        viewport: {
          width: 640,
          height: 384,
          deviceScaleFactor: 2,
          isMobile: true,
          hasTouch: true,
          isLandscape: true
        }
      },
      {
        name: "Nexus 5",
        userAgent: "Mozilla/5.0 (Linux; Android 6.0; Nexus 5 Build/MRA58N) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3765.0 Mobile Safari/537.36",
        viewport: {
          width: 360,
          height: 640,
          deviceScaleFactor: 3,
          isMobile: true,
          hasTouch: true,
          isLandscape: false
        }
      },
      {
        name: "Nexus 5 landscape",
        userAgent: "Mozilla/5.0 (Linux; Android 6.0; Nexus 5 Build/MRA58N) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3765.0 Mobile Safari/537.36",
        viewport: {
          width: 640,
          height: 360,
          deviceScaleFactor: 3,
          isMobile: true,
          hasTouch: true,
          isLandscape: true
        }
      },
      {
        name: "Nexus 5X",
        userAgent: "Mozilla/5.0 (Linux; Android 8.0.0; Nexus 5X Build/OPR4.170623.006) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3765.0 Mobile Safari/537.36",
        viewport: {
          width: 412,
          height: 732,
          deviceScaleFactor: 2.625,
          isMobile: true,
          hasTouch: true,
          isLandscape: false
        }
      },
      {
        name: "Nexus 5X landscape",
        userAgent: "Mozilla/5.0 (Linux; Android 8.0.0; Nexus 5X Build/OPR4.170623.006) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3765.0 Mobile Safari/537.36",
        viewport: {
          width: 732,
          height: 412,
          deviceScaleFactor: 2.625,
          isMobile: true,
          hasTouch: true,
          isLandscape: true
        }
      },
      {
        name: "Nexus 6",
        userAgent: "Mozilla/5.0 (Linux; Android 7.1.1; Nexus 6 Build/N6F26U) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3765.0 Mobile Safari/537.36",
        viewport: {
          width: 412,
          height: 732,
          deviceScaleFactor: 3.5,
          isMobile: true,
          hasTouch: true,
          isLandscape: false
        }
      },
      {
        name: "Nexus 6 landscape",
        userAgent: "Mozilla/5.0 (Linux; Android 7.1.1; Nexus 6 Build/N6F26U) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3765.0 Mobile Safari/537.36",
        viewport: {
          width: 732,
          height: 412,
          deviceScaleFactor: 3.5,
          isMobile: true,
          hasTouch: true,
          isLandscape: true
        }
      },
      {
        name: "Nexus 6P",
        userAgent: "Mozilla/5.0 (Linux; Android 8.0.0; Nexus 6P Build/OPP3.170518.006) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3765.0 Mobile Safari/537.36",
        viewport: {
          width: 412,
          height: 732,
          deviceScaleFactor: 3.5,
          isMobile: true,
          hasTouch: true,
          isLandscape: false
        }
      },
      {
        name: "Nexus 6P landscape",
        userAgent: "Mozilla/5.0 (Linux; Android 8.0.0; Nexus 6P Build/OPP3.170518.006) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3765.0 Mobile Safari/537.36",
        viewport: {
          width: 732,
          height: 412,
          deviceScaleFactor: 3.5,
          isMobile: true,
          hasTouch: true,
          isLandscape: true
        }
      },
      {
        name: "Nexus 7",
        userAgent: "Mozilla/5.0 (Linux; Android 6.0.1; Nexus 7 Build/MOB30X) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3765.0 Safari/537.36",
        viewport: {
          width: 600,
          height: 960,
          deviceScaleFactor: 2,
          isMobile: true,
          hasTouch: true,
          isLandscape: false
        }
      },
      {
        name: "Nexus 7 landscape",
        userAgent: "Mozilla/5.0 (Linux; Android 6.0.1; Nexus 7 Build/MOB30X) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3765.0 Safari/537.36",
        viewport: {
          width: 960,
          height: 600,
          deviceScaleFactor: 2,
          isMobile: true,
          hasTouch: true,
          isLandscape: true
        }
      },
      {
        name: "Nokia Lumia 520",
        userAgent: "Mozilla/5.0 (compatible; MSIE 10.0; Windows Phone 8.0; Trident/6.0; IEMobile/10.0; ARM; Touch; NOKIA; Lumia 520)",
        viewport: {
          width: 320,
          height: 533,
          deviceScaleFactor: 1.5,
          isMobile: true,
          hasTouch: true,
          isLandscape: false
        }
      },
      {
        name: "Nokia Lumia 520 landscape",
        userAgent: "Mozilla/5.0 (compatible; MSIE 10.0; Windows Phone 8.0; Trident/6.0; IEMobile/10.0; ARM; Touch; NOKIA; Lumia 520)",
        viewport: {
          width: 533,
          height: 320,
          deviceScaleFactor: 1.5,
          isMobile: true,
          hasTouch: true,
          isLandscape: true
        }
      },
      {
        name: "Nokia N9",
        userAgent: "Mozilla/5.0 (MeeGo; NokiaN9) AppleWebKit/534.13 (KHTML, like Gecko) NokiaBrowser/8.5.0 Mobile Safari/534.13",
        viewport: {
          width: 480,
          height: 854,
          deviceScaleFactor: 1,
          isMobile: true,
          hasTouch: true,
          isLandscape: false
        }
      },
      {
        name: "Nokia N9 landscape",
        userAgent: "Mozilla/5.0 (MeeGo; NokiaN9) AppleWebKit/534.13 (KHTML, like Gecko) NokiaBrowser/8.5.0 Mobile Safari/534.13",
        viewport: {
          width: 854,
          height: 480,
          deviceScaleFactor: 1,
          isMobile: true,
          hasTouch: true,
          isLandscape: true
        }
      },
      {
        name: "Pixel 2",
        userAgent: "Mozilla/5.0 (Linux; Android 8.0; Pixel 2 Build/OPD3.170816.012) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3765.0 Mobile Safari/537.36",
        viewport: {
          width: 411,
          height: 731,
          deviceScaleFactor: 2.625,
          isMobile: true,
          hasTouch: true,
          isLandscape: false
        }
      },
      {
        name: "Pixel 2 landscape",
        userAgent: "Mozilla/5.0 (Linux; Android 8.0; Pixel 2 Build/OPD3.170816.012) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3765.0 Mobile Safari/537.36",
        viewport: {
          width: 731,
          height: 411,
          deviceScaleFactor: 2.625,
          isMobile: true,
          hasTouch: true,
          isLandscape: true
        }
      },
      {
        name: "Pixel 2 XL",
        userAgent: "Mozilla/5.0 (Linux; Android 8.0.0; Pixel 2 XL Build/OPD1.170816.004) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3765.0 Mobile Safari/537.36",
        viewport: {
          width: 411,
          height: 823,
          deviceScaleFactor: 3.5,
          isMobile: true,
          hasTouch: true,
          isLandscape: false
        }
      },
      {
        name: "Pixel 2 XL landscape",
        userAgent: "Mozilla/5.0 (Linux; Android 8.0.0; Pixel 2 XL Build/OPD1.170816.004) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3765.0 Mobile Safari/537.36",
        viewport: {
          width: 823,
          height: 411,
          deviceScaleFactor: 3.5,
          isMobile: true,
          hasTouch: true,
          isLandscape: true
        }
      },
      {
        name: "Pixel 3",
        userAgent: "Mozilla/5.0 (Linux; Android 9; Pixel 3 Build/PQ1A.181105.017.A1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/66.0.3359.158 Mobile Safari/537.36",
        viewport: {
          width: 393,
          height: 786,
          deviceScaleFactor: 2.75,
          isMobile: true,
          hasTouch: true,
          isLandscape: false
        }
      },
      {
        name: "Pixel 3 landscape",
        userAgent: "Mozilla/5.0 (Linux; Android 9; Pixel 3 Build/PQ1A.181105.017.A1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/66.0.3359.158 Mobile Safari/537.36",
        viewport: {
          width: 786,
          height: 393,
          deviceScaleFactor: 2.75,
          isMobile: true,
          hasTouch: true,
          isLandscape: true
        }
      },
      {
        name: "Pixel 4",
        userAgent: "Mozilla/5.0 (Linux; Android 10; Pixel 4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/81.0.4044.138 Mobile Safari/537.36",
        viewport: {
          width: 353,
          height: 745,
          deviceScaleFactor: 3,
          isMobile: true,
          hasTouch: true,
          isLandscape: false
        }
      },
      {
        name: "Pixel 4 landscape",
        userAgent: "Mozilla/5.0 (Linux; Android 10; Pixel 4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/81.0.4044.138 Mobile Safari/537.36",
        viewport: {
          width: 745,
          height: 353,
          deviceScaleFactor: 3,
          isMobile: true,
          hasTouch: true,
          isLandscape: true
        }
      },
      {
        name: "Pixel 4a (5G)",
        userAgent: "Mozilla/5.0 (Linux; Android 11; Pixel 4a (5G)) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/99.0.4812.0 Mobile Safari/537.36",
        viewport: {
          width: 353,
          height: 745,
          deviceScaleFactor: 3,
          isMobile: true,
          hasTouch: true,
          isLandscape: false
        }
      },
      {
        name: "Pixel 4a (5G) landscape",
        userAgent: "Mozilla/5.0 (Linux; Android 11; Pixel 4a (5G)) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/99.0.4812.0 Mobile Safari/537.36",
        viewport: {
          width: 745,
          height: 353,
          deviceScaleFactor: 3,
          isMobile: true,
          hasTouch: true,
          isLandscape: true
        }
      },
      {
        name: "Pixel 5",
        userAgent: "Mozilla/5.0 (Linux; Android 11; Pixel 5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/99.0.4812.0 Mobile Safari/537.36",
        viewport: {
          width: 393,
          height: 851,
          deviceScaleFactor: 3,
          isMobile: true,
          hasTouch: true,
          isLandscape: false
        }
      },
      {
        name: "Pixel 5 landscape",
        userAgent: "Mozilla/5.0 (Linux; Android 11; Pixel 5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/99.0.4812.0 Mobile Safari/537.36",
        viewport: {
          width: 851,
          height: 393,
          deviceScaleFactor: 3,
          isMobile: true,
          hasTouch: true,
          isLandscape: true
        }
      },
      {
        name: "Moto G4",
        userAgent: "Mozilla/5.0 (Linux; Android 7.0; Moto G (4)) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/99.0.4812.0 Mobile Safari/537.36",
        viewport: {
          width: 360,
          height: 640,
          deviceScaleFactor: 3,
          isMobile: true,
          hasTouch: true,
          isLandscape: false
        }
      },
      {
        name: "Moto G4 landscape",
        userAgent: "Mozilla/5.0 (Linux; Android 7.0; Moto G (4)) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/99.0.4812.0 Mobile Safari/537.36",
        viewport: {
          width: 640,
          height: 360,
          deviceScaleFactor: 3,
          isMobile: true,
          hasTouch: true,
          isLandscape: true
        }
      }
    ];
    knownDevicesByName = {};
    for (const device of knownDevices) {
      knownDevicesByName[device.name] = device;
    }
    KnownDevices = Object.freeze(knownDevicesByName);
    getWebSocketTransportClass = async () => {
      return isNode ? (await Promise.resolve().then(function() {
        return NodeWebSocketTransport$1;
      })).NodeWebSocketTransport : (await Promise.resolve().then(function() {
        return BrowserWebSocketTransport$1;
      })).BrowserWebSocketTransport;
    };
    Puppeteer = class {
      static customQueryHandlers = customQueryHandlers;
      static registerCustomQueryHandler(name, queryHandler) {
        return this.customQueryHandlers.register(name, queryHandler);
      }
      static unregisterCustomQueryHandler(name) {
        return this.customQueryHandlers.unregister(name);
      }
      static customQueryHandlerNames() {
        return this.customQueryHandlers.names();
      }
      static clearCustomQueryHandlers() {
        return this.customQueryHandlers.clear();
      }
      _isPuppeteerCore;
      _changedBrowsers = false;
      constructor(settings) {
        this._isPuppeteerCore = settings.isPuppeteerCore;
        this.connect = this.connect.bind(this);
      }
      connect(options2) {
        return _connectToBrowser(options2);
      }
    };
    PUPPETEER_REVISIONS = Object.freeze({
      chrome: "146.0.7680.31",
      "chrome-headless-shell": "146.0.7680.31",
      firefox: "stable_148.0"
    });
    (function(Browser3) {
      Browser3["CHROME"] = "chrome";
      Browser3["CHROMEHEADLESSSHELL"] = "chrome-headless-shell";
      Browser3["CHROMIUM"] = "chromium";
      Browser3["FIREFOX"] = "firefox";
      Browser3["CHROMEDRIVER"] = "chromedriver";
    })(Browser2 || (Browser2 = {}));
    (function(BrowserPlatform2) {
      BrowserPlatform2["LINUX"] = "linux";
      BrowserPlatform2["LINUX_ARM"] = "linux_arm";
      BrowserPlatform2["MAC"] = "mac";
      BrowserPlatform2["MAC_ARM"] = "mac_arm";
      BrowserPlatform2["WIN32"] = "win32";
      BrowserPlatform2["WIN64"] = "win64";
    })(BrowserPlatform || (BrowserPlatform = {}));
    (function(BrowserTag2) {
      BrowserTag2["CANARY"] = "canary";
      BrowserTag2["NIGHTLY"] = "nightly";
      BrowserTag2["BETA"] = "beta";
      BrowserTag2["DEV"] = "dev";
      BrowserTag2["DEVEDITION"] = "devedition";
      BrowserTag2["STABLE"] = "stable";
      BrowserTag2["ESR"] = "esr";
      BrowserTag2["LATEST"] = "latest";
    })(BrowserTag || (BrowserTag = {}));
    (function(ChromeReleaseChannel2) {
      ChromeReleaseChannel2["STABLE"] = "stable";
      ChromeReleaseChannel2["DEV"] = "dev";
      ChromeReleaseChannel2["CANARY"] = "canary";
      ChromeReleaseChannel2["BETA"] = "beta";
    })(ChromeReleaseChannel || (ChromeReleaseChannel = {}));
    re$1 = { exports: {} };
    semverExports = requireSemver();
    semver = /* @__PURE__ */ getDefaultExportFromCjs(semverExports);
    dist$b = {};
    dist$a = {};
    helpers$4 = {};
    proxyFromEnv = {};
    dist$9 = {};
    dist$8 = {};
    parseProxyResponse = {};
    dist$7 = {};
    build = {};
    socksclient = {};
    smartbuffer = {};
    utils$1 = {};
    constants$3 = {};
    helpers$3 = {};
    util$2 = {};
    ipAddress = {};
    ipv4 = {};
    common$2 = {};
    constants$2 = {};
    addressError = {};
    ipv6 = {};
    constants$1 = {};
    helpers$2 = {};
    regularExpressions = {};
    receivebuffer = {};
    dist$6 = {};
    dist$5 = {};
    data$u = {};
    dist$4 = {};
    common$1 = {};
    notmodified = {};
    file = {};
    notfound = {};
    ftp = {};
    dist$3 = {};
    Client = {};
    FtpContext = {};
    parseControlResponse = {};
    parseList = {};
    parseListDOS = {};
    FileInfo = {};
    parseListUnix = {};
    parseListMLSD = {};
    ProgressTracker = {};
    StringWriter = {};
    netUtils = {};
    transfer = {};
    StringEncoding = {};
    http = {};
    httpError = {};
    https = {};
    dist$2 = {};
    dist$1 = {};
    degenerator = {};
    escodegen = {};
    estraverse = {};
    utils = {};
    ast = { exports: {} };
    code = { exports: {} };
    keyword = { exports: {} };
    sourceMap = {};
    sourceMapGenerator = {};
    base64Vlq = {};
    base64 = {};
    util$1 = {};
    arraySet = {};
    mappingList = {};
    sourceMapConsumer = {};
    binarySearch = {};
    quickSort = {};
    sourceNode = {};
    version = "2.1.0";
    require$$3 = {
      version
    };
    esprima$2 = { exports: {} };
    esprima$1 = esprima$2.exports;
    main$1 = {};
    extendStatics4 = function(d, b) {
      extendStatics4 = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d2, b2) {
        d2.__proto__ = b2;
      } || function(d2, b2) {
        for (var p in b2) if (Object.prototype.hasOwnProperty.call(b2, p)) d2[p] = b2[p];
      };
      return extendStatics4(d, b);
    };
    __assign$1 = function() {
      __assign$1 = Object.assign || function __assign5(t) {
        for (var s, i = 1, n = arguments.length; i < n; i++) {
          s = arguments[i];
          for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
        }
        return t;
      };
      return __assign$1.apply(this, arguments);
    };
    __createBinding4 = Object.create ? function(o, m, k, k2) {
      if (k2 === void 0) k2 = k;
      var desc = Object.getOwnPropertyDescriptor(m, k);
      if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
        desc = { enumerable: true, get: function() {
          return m[k];
        } };
      }
      Object.defineProperty(o, k2, desc);
    } : function(o, m, k, k2) {
      if (k2 === void 0) k2 = k;
      o[k2] = m[k];
    };
    __setModuleDefault4 = Object.create ? function(o, v) {
      Object.defineProperty(o, "default", { enumerable: true, value: v });
    } : function(o, v) {
      o["default"] = v;
    };
    ownKeys = function(o) {
      ownKeys = Object.getOwnPropertyNames || function(o2) {
        var ar = [];
        for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k;
        return ar;
      };
      return ownKeys(o);
    };
    _SuppressedError4 = typeof SuppressedError === "function" ? SuppressedError : function(error, suppressed, message) {
      var e = new Error(message);
      return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
    };
    tslib_es6 = {
      __extends: __extends4,
      __assign: __assign$1,
      __rest: __rest4,
      __decorate: __decorate4,
      __param: __param4,
      __esDecorate: __esDecorate$1,
      __runInitializers: __runInitializers$1,
      __propKey: __propKey4,
      __setFunctionName: __setFunctionName$1,
      __metadata: __metadata4,
      __awaiter: __awaiter4,
      __generator: __generator4,
      __createBinding: __createBinding4,
      __exportStar: __exportStar4,
      __values: __values4,
      __read: __read4,
      __spread: __spread4,
      __spreadArrays: __spreadArrays4,
      __spreadArray: __spreadArray4,
      __await: __await4,
      __asyncGenerator: __asyncGenerator4,
      __asyncDelegator: __asyncDelegator4,
      __asyncValues: __asyncValues4,
      __makeTemplateObject: __makeTemplateObject4,
      __importStar: __importStar4,
      __importDefault: __importDefault4,
      __classPrivateFieldGet: __classPrivateFieldGet4,
      __classPrivateFieldSet: __classPrivateFieldSet4,
      __classPrivateFieldIn: __classPrivateFieldIn4,
      __addDisposableResource: __addDisposableResource4,
      __disposeResources: __disposeResources4,
      __rewriteRelativeImportExtension
    };
    tslib_es6$1 = /* @__PURE__ */ Object.freeze({
      __proto__: null,
      __addDisposableResource: __addDisposableResource4,
      get __assign() {
        return __assign$1;
      },
      __asyncDelegator: __asyncDelegator4,
      __asyncGenerator: __asyncGenerator4,
      __asyncValues: __asyncValues4,
      __await: __await4,
      __awaiter: __awaiter4,
      __classPrivateFieldGet: __classPrivateFieldGet4,
      __classPrivateFieldIn: __classPrivateFieldIn4,
      __classPrivateFieldSet: __classPrivateFieldSet4,
      __createBinding: __createBinding4,
      __decorate: __decorate4,
      __disposeResources: __disposeResources4,
      __esDecorate: __esDecorate$1,
      __exportStar: __exportStar4,
      __extends: __extends4,
      __generator: __generator4,
      __importDefault: __importDefault4,
      __importStar: __importStar4,
      __makeTemplateObject: __makeTemplateObject4,
      __metadata: __metadata4,
      __param: __param4,
      __propKey: __propKey4,
      __read: __read4,
      __rest: __rest4,
      __rewriteRelativeImportExtension,
      __runInitializers: __runInitializers$1,
      __setFunctionName: __setFunctionName$1,
      __spread: __spread4,
      __spreadArray: __spreadArray4,
      __spreadArrays: __spreadArrays4,
      __values: __values4,
      default: tslib_es6
    });
    require$$0 = /* @__PURE__ */ getAugmentedNamespace(tslib_es6$1);
    fork = { exports: {} };
    types$5 = {};
    pathVisitor = { exports: {} };
    nodePath = { exports: {} };
    path7 = { exports: {} };
    scope = { exports: {} };
    equiv = { exports: {} };
    core$1 = { exports: {} };
    shared = { exports: {} };
    es6 = { exports: {} };
    es7 = { exports: {} };
    es2020 = { exports: {} };
    jsx = { exports: {} };
    flow = { exports: {} };
    typeAnnotations = { exports: {} };
    esprima = { exports: {} };
    babel = { exports: {} };
    babelCore = { exports: {} };
    typescript = { exports: {} };
    esProposals = { exports: {} };
    namedTypes = {};
    compile = {};
    dateRange = {};
    dnsDomainIs = {};
    dnsDomainLevels = {};
    dnsResolve = {};
    util = {};
    isInNet = {};
    netmask = {};
    isPlainHostName = {};
    isResolvable = {};
    localHostOrDomainIs = {};
    myIpAddress = {};
    ip = {};
    shExpMatch = {};
    timeRange = {};
    weekdayRange = {};
    dist = {};
    variants = {};
    esmHelpers = {};
    module$1 = {};
    debug = {};
    errors = {};
    lifetime = {};
    asyncifyHelpers = {};
    runtime = {};
    context = {};
    deferredPromise = {};
    memory = {};
    types$4 = {};
    typesFfi = {};
    moduleAsyncify = {};
    runtimeAsyncify = {};
    contextAsyncify = {};
    ffi_WASM_RELEASE_SYNC = {};
    emscriptenModule_WASM_RELEASE_SYNC = { exports: {} };
    vmInterface = {};
    moduleTest = {};
    distExports = requireDist();
    baseVersionUrl$1 = "https://googlechromelabs.github.io/chrome-for-testing";
    WINDOWS_ENV_PARAM_NAMES = [
      "PROGRAMFILES",
      "ProgramW6432",
      "ProgramFiles(x86)",
      "LOCALAPPDATA"
    ];
    (function(FirefoxChannel2) {
      FirefoxChannel2["STABLE"] = "stable";
      FirefoxChannel2["ESR"] = "esr";
      FirefoxChannel2["DEVEDITION"] = "devedition";
      FirefoxChannel2["BETA"] = "beta";
      FirefoxChannel2["NIGHTLY"] = "nightly";
    })(FirefoxChannel || (FirefoxChannel = {}));
    baseVersionUrl = "https://product-details.mozilla.org/1.0";
    ({
      [Browser2.CHROMEDRIVER]: resolveDownloadUrl$2,
      [Browser2.CHROMEHEADLESSSHELL]: resolveDownloadUrl$3,
      [Browser2.CHROME]: resolveDownloadUrl$4,
      [Browser2.CHROMIUM]: resolveDownloadUrl$1,
      [Browser2.FIREFOX]: resolveDownloadUrl
    });
    ({
      [Browser2.CHROMEDRIVER]: resolveDownloadPath$2,
      [Browser2.CHROMEHEADLESSSHELL]: resolveDownloadPath$3,
      [Browser2.CHROME]: resolveDownloadPath$4,
      [Browser2.CHROMIUM]: resolveDownloadPath$1,
      [Browser2.FIREFOX]: resolveDownloadPath
    });
    executablePathByBrowser = {
      [Browser2.CHROMEDRIVER]: relativeExecutablePath$2,
      [Browser2.CHROMEHEADLESSSHELL]: relativeExecutablePath$3,
      [Browser2.CHROME]: relativeExecutablePath$4,
      [Browser2.CHROMIUM]: relativeExecutablePath$1,
      [Browser2.FIREFOX]: relativeExecutablePath
    };
    versionComparators = {
      [Browser2.CHROMEDRIVER]: compareVersions$2,
      [Browser2.CHROMEHEADLESSSHELL]: compareVersions$2,
      [Browser2.CHROME]: compareVersions$2,
      [Browser2.CHROMIUM]: compareVersions$1,
      [Browser2.FIREFOX]: compareVersions
    };
    debugCache = debug$2("puppeteer:browsers:cache");
    InstalledBrowser = class {
      browser;
      buildId;
      platform;
      executablePath;
      #cache;
      constructor(cache, browser3, buildId, platform) {
        this.#cache = cache;
        this.browser = browser3;
        this.buildId = buildId;
        this.platform = platform;
        this.executablePath = cache.computeExecutablePath({
          browser: browser3,
          buildId,
          platform
        });
      }
      get path() {
        return this.#cache.installationDir(this.browser, this.platform, this.buildId);
      }
      readMetadata() {
        return this.#cache.readMetadata(this.browser);
      }
      writeMetadata(metadata2) {
        this.#cache.writeMetadata(this.browser, metadata2);
      }
    };
    Cache$2 = class Cache {
      #rootDir;
      constructor(rootDir) {
        this.#rootDir = rootDir;
      }
      get rootDir() {
        return this.#rootDir;
      }
      browserRoot(browser3) {
        return path$1.join(this.#rootDir, browser3);
      }
      metadataFile(browser3) {
        return path$1.join(this.browserRoot(browser3), ".metadata");
      }
      readMetadata(browser3) {
        const metatadaPath = this.metadataFile(browser3);
        if (!fs2.existsSync(metatadaPath)) {
          return { aliases: {} };
        }
        const data32 = JSON.parse(fs2.readFileSync(metatadaPath, "utf8"));
        if (typeof data32 !== "object") {
          throw new Error(".metadata is not an object");
        }
        return data32;
      }
      writeMetadata(browser3, metadata2) {
        const metatadaPath = this.metadataFile(browser3);
        fs2.mkdirSync(path$1.dirname(metatadaPath), { recursive: true });
        fs2.writeFileSync(metatadaPath, JSON.stringify(metadata2, null, 2));
      }
      readExecutablePath(browser3, platform, buildId) {
        const metadata2 = this.readMetadata(browser3);
        const key = `${platform}-${buildId}`;
        return metadata2.executablePaths?.[key] ?? null;
      }
      writeExecutablePath(browser3, platform, buildId, executablePath2) {
        const metadata2 = this.readMetadata(browser3);
        if (!metadata2.executablePaths) {
          metadata2.executablePaths = {};
        }
        const key = `${platform}-${buildId}`;
        metadata2.executablePaths[key] = executablePath2;
        this.writeMetadata(browser3, metadata2);
      }
      resolveAlias(browser3, alias) {
        const metadata2 = this.readMetadata(browser3);
        if (alias === "latest") {
          return Object.values(metadata2.aliases || {}).sort(getVersionComparator(browser3)).at(-1);
        }
        return metadata2.aliases[alias];
      }
      installationDir(browser3, platform, buildId) {
        return path$1.join(this.browserRoot(browser3), `${platform}-${buildId}`);
      }
      clear() {
        fs2.rmSync(this.#rootDir, {
          force: true,
          recursive: true,
          maxRetries: 10,
          retryDelay: 500
        });
      }
      uninstall(browser3, platform, buildId) {
        const metadata2 = this.readMetadata(browser3);
        for (const alias of Object.keys(metadata2.aliases)) {
          if (metadata2.aliases[alias] === buildId) {
            delete metadata2.aliases[alias];
          }
        }
        const key = `${platform}-${buildId}`;
        if (metadata2.executablePaths?.[key]) {
          delete metadata2.executablePaths[key];
          this.writeMetadata(browser3, metadata2);
        }
        fs2.rmSync(this.installationDir(browser3, platform, buildId), {
          force: true,
          recursive: true,
          maxRetries: 10,
          retryDelay: 500
        });
      }
      getInstalledBrowsers() {
        if (!fs2.existsSync(this.#rootDir)) {
          return [];
        }
        const types2 = fs2.readdirSync(this.#rootDir);
        const browsers = types2.filter((t) => {
          return Object.values(Browser2).includes(t);
        });
        return browsers.flatMap((browser3) => {
          const files = fs2.readdirSync(this.browserRoot(browser3));
          return files.map((file2) => {
            const result = parseFolderPath(path$1.join(this.browserRoot(browser3), file2));
            if (!result) {
              return null;
            }
            return new InstalledBrowser(this, browser3, result.buildId, result.platform);
          }).filter((item) => {
            return item !== null;
          });
        });
      }
      computeExecutablePath(options2) {
        options2.platform ??= detectBrowserPlatform();
        if (!options2.platform) {
          throw new Error(`Cannot download a binary for the provided platform: ${os.platform()} (${os.arch()})`);
        }
        try {
          options2.buildId = this.resolveAlias(options2.browser, options2.buildId) ?? options2.buildId;
        } catch {
          debugCache("could not read .metadata file for the browser");
        }
        const installationDir = this.installationDir(options2.browser, options2.platform, options2.buildId);
        const storedExecutablePath = this.readExecutablePath(options2.browser, options2.platform, options2.buildId);
        if (storedExecutablePath) {
          return path$1.join(installationDir, storedExecutablePath);
        }
        return path$1.join(installationDir, executablePathByBrowser[options2.browser](options2.platform, options2.buildId));
      }
    };
    debugLaunch = debug$2("puppeteer:browsers:launcher");
    CDP_WEBSOCKET_ENDPOINT_REGEX = /^DevTools listening on (ws:\/\/.*)$/;
    WEBDRIVER_BIDI_WEBSOCKET_ENDPOINT_REGEX = /^WebDriver BiDi listening on (ws:\/\/.*)$/;
    processListeners = /* @__PURE__ */ new Map();
    dispatchers = {
      exit: (...args2) => {
        processListeners.get("exit")?.forEach((handler) => {
          return handler(...args2);
        });
      },
      SIGINT: (...args2) => {
        processListeners.get("SIGINT")?.forEach((handler) => {
          return handler(...args2);
        });
      },
      SIGHUP: (...args2) => {
        processListeners.get("SIGHUP")?.forEach((handler) => {
          return handler(...args2);
        });
      },
      SIGTERM: (...args2) => {
        processListeners.get("SIGTERM")?.forEach((handler) => {
          return handler(...args2);
        });
      }
    };
    Process = class {
      #executablePath;
      #args;
      #browserProcess;
      #exited = false;
      #hooksRan = false;
      #onExitHook = async () => {
      };
      #browserProcessExiting;
      #logs = [];
      #maxLogLinesSize = 1e3;
      #lineEmitter = new EventEmitter$1();
      #onAbort = () => {
        this.kill();
      };
      #signal;
      constructor(opts) {
        this.#executablePath = opts.executablePath;
        this.#args = opts.args ?? [];
        this.#signal = opts.signal;
        if (this.#signal?.aborted) {
          throw new Error(this.#signal.reason ? this.#signal.reason : "Launch aborted");
        }
        this.#signal?.addEventListener("abort", this.#onAbort, { once: true });
        opts.pipe ??= false;
        opts.dumpio ??= false;
        opts.handleSIGINT ??= true;
        opts.handleSIGTERM ??= true;
        opts.handleSIGHUP ??= true;
        opts.detached ??= process.platform !== "win32";
        const stdio = this.#configureStdio({
          pipe: opts.pipe
        });
        const env2 = opts.env || {};
        debugLaunch(`Launching ${this.#executablePath} ${this.#args.join(" ")}`, {
          detached: opts.detached,
          env: Object.keys(env2).reduce((res, key) => {
            if (key.toLowerCase().startsWith("puppeteer_")) {
              res[key] = env2[key];
            }
            return res;
          }, {}),
          stdio
        });
        this.#browserProcess = childProcess.spawn(this.#executablePath, this.#args, {
          detached: opts.detached,
          env: env2,
          stdio
        });
        this.#recordStream(this.#browserProcess.stderr);
        this.#recordStream(this.#browserProcess.stdout);
        debugLaunch(`Launched ${this.#browserProcess.pid}`);
        if (opts.dumpio) {
          this.#browserProcess.stderr?.pipe(process.stderr);
          this.#browserProcess.stdout?.pipe(process.stdout);
        }
        subscribeToProcessEvent("exit", this.#onDriverProcessExit);
        if (opts.handleSIGINT) {
          subscribeToProcessEvent("SIGINT", this.#onDriverProcessSignal);
        }
        if (opts.handleSIGTERM) {
          subscribeToProcessEvent("SIGTERM", this.#onDriverProcessSignal);
        }
        if (opts.handleSIGHUP) {
          subscribeToProcessEvent("SIGHUP", this.#onDriverProcessSignal);
        }
        if (opts.onExit) {
          this.#onExitHook = opts.onExit;
        }
        this.#browserProcessExiting = new Promise((resolve2, reject) => {
          this.#browserProcess.once("exit", async () => {
            debugLaunch(`Browser process ${this.#browserProcess.pid} onExit`);
            this.#clearListeners();
            this.#exited = true;
            try {
              await this.#runHooks();
            } catch (err) {
              reject(err);
              return;
            }
            resolve2();
          });
        });
      }
      async #runHooks() {
        if (this.#hooksRan) {
          return;
        }
        this.#hooksRan = true;
        await this.#onExitHook();
      }
      get nodeProcess() {
        return this.#browserProcess;
      }
      #configureStdio(opts) {
        if (opts.pipe) {
          return ["pipe", "pipe", "pipe", "pipe", "pipe"];
        } else {
          return ["pipe", "pipe", "pipe"];
        }
      }
      #clearListeners() {
        unsubscribeFromProcessEvent("exit", this.#onDriverProcessExit);
        unsubscribeFromProcessEvent("SIGINT", this.#onDriverProcessSignal);
        unsubscribeFromProcessEvent("SIGTERM", this.#onDriverProcessSignal);
        unsubscribeFromProcessEvent("SIGHUP", this.#onDriverProcessSignal);
        this.#signal?.removeEventListener("abort", this.#onAbort);
      }
      #onDriverProcessExit = (_code) => {
        this.kill();
      };
      #onDriverProcessSignal = (signal) => {
        switch (signal) {
          case "SIGINT":
            this.kill();
            process.exit(130);
          case "SIGTERM":
          case "SIGHUP":
            void this.close();
            break;
        }
      };
      async close() {
        await this.#runHooks();
        if (!this.#exited) {
          this.kill();
        }
        return await this.#browserProcessExiting;
      }
      hasClosed() {
        return this.#browserProcessExiting;
      }
      kill() {
        debugLaunch(`Trying to kill ${this.#browserProcess.pid}`);
        if (this.#browserProcess && this.#browserProcess.pid && pidExists(this.#browserProcess.pid)) {
          try {
            debugLaunch(`Browser process ${this.#browserProcess.pid} exists`);
            if (process.platform === "win32") {
              try {
                childProcess.execSync(`taskkill /pid ${this.#browserProcess.pid} /T /F`);
              } catch (error) {
                debugLaunch(`Killing ${this.#browserProcess.pid} using taskkill failed`, error);
                this.#browserProcess.kill();
              }
            } else {
              const processGroupId = -this.#browserProcess.pid;
              try {
                process.kill(processGroupId, "SIGKILL");
              } catch (error) {
                debugLaunch(`Killing ${this.#browserProcess.pid} using process.kill failed`, error);
                this.#browserProcess.kill("SIGKILL");
              }
            }
          } catch (error) {
            throw new Error(`${PROCESS_ERROR_EXPLANATION}
Error cause: ${isErrorLike(error) ? error.stack : error}`);
          }
        }
        this.#clearListeners();
      }
      #recordStream(stream3) {
        const rl = readline.createInterface(stream3);
        const cleanup = () => {
          rl.off("line", onLine);
          rl.off("close", onClose);
          try {
            rl.close();
          } catch {
          }
        };
        const onLine = (line) => {
          if (line.trim() === "") {
            return;
          }
          this.#logs.push(line);
          const delta = this.#logs.length - this.#maxLogLinesSize;
          if (delta) {
            this.#logs.splice(0, delta);
          }
          this.#lineEmitter.emit("line", line);
        };
        const onClose = () => {
          cleanup();
        };
        rl.on("line", onLine);
        rl.on("close", onClose);
      }
      getRecentLogs() {
        return [...this.#logs];
      }
      waitForLineOutput(regex2, timeout2 = 0) {
        return new Promise((resolve2, reject) => {
          const onClose = (errorOrCode) => {
            cleanup();
            reject(new Error([
              `Failed to launch the browser process: ${errorOrCode instanceof Error ? ` ${errorOrCode.message}` : ` Code: ${errorOrCode}`}`,
              "",
              `stderr:`,
              this.getRecentLogs().join("\n"),
              "",
              "TROUBLESHOOTING: https://pptr.dev/troubleshooting",
              ""
            ].join("\n")));
          };
          this.#browserProcess.on("exit", onClose);
          this.#browserProcess.on("error", onClose);
          const timeoutId = timeout2 > 0 ? setTimeout(onTimeout, timeout2) : void 0;
          this.#lineEmitter.on("line", onLine);
          const cleanup = () => {
            clearTimeout(timeoutId);
            this.#lineEmitter.off("line", onLine);
            this.#browserProcess.off("exit", onClose);
            this.#browserProcess.off("error", onClose);
          };
          function onTimeout() {
            cleanup();
            reject(new TimeoutError2(`Timed out after ${timeout2} ms while waiting for the WS endpoint URL to appear in stdout!`));
          }
          for (const line of this.#logs) {
            onLine(line);
          }
          function onLine(line) {
            const match = line.match(regex2);
            if (!match) {
              return;
            }
            cleanup();
            resolve2(match[1]);
          }
        });
      }
    };
    PROCESS_ERROR_EXPLANATION = `Puppeteer was unable to kill the process which ran the browser binary.
This means that, on future Puppeteer launches, Puppeteer might not be able to launch the browser.
Please check your open processes and ensure that the browser processes that Puppeteer launched have been killed.
If you think this is a bug, please report it on the Puppeteer issue tracker.`;
    TimeoutError2 = class extends Error {
      constructor(message) {
        super(message);
        this.name = this.constructor.name;
        Error.captureStackTrace(this, this.constructor);
      }
    };
    nodeProgress = { exports: {} };
    requireProgress();
    debug$2("puppeteer:browsers:fileUtil");
    debug$2("puppeteer:browsers:install");
    main = /* @__PURE__ */ Object.freeze({
      __proto__: null,
      get Browser() {
        return Browser2;
      },
      get BrowserPlatform() {
        return BrowserPlatform;
      },
      get BrowserTag() {
        return BrowserTag;
      },
      CDP_WEBSOCKET_ENDPOINT_REGEX,
      Cache: Cache$2,
      get ChromeReleaseChannel() {
        return ChromeReleaseChannel;
      },
      InstalledBrowser,
      Process,
      TimeoutError: TimeoutError2,
      WEBDRIVER_BIDI_WEBSOCKET_ENDPOINT_REGEX,
      computeExecutablePath,
      computeSystemExecutablePath,
      createProfile,
      detectBrowserPlatform,
      getInstalledBrowsers,
      getVersionComparator,
      launch: launch$1,
      resolveBuildId,
      resolveDefaultUserDataDir,
      uninstall
    });
    bufferUtil = { exports: {} };
    validation = { exports: {} };
    requireStream();
    requireReceiver();
    requireSender();
    websocketExports = requireWebsocket();
    WebSocket$1 = /* @__PURE__ */ getDefaultExportFromCjs(websocketExports);
    requireWebsocketServer();
    NodeWebSocketTransport = class _NodeWebSocketTransport {
      static create(url, headers) {
        return new Promise((resolve2, reject) => {
          const ws = new WebSocket$1(url, [], {
            followRedirects: true,
            perMessageDeflate: false,
            allowSynchronousEvents: false,
            maxPayload: 256 * 1024 * 1024,
            headers: {
              "User-Agent": `Puppeteer ${packageVersion}`,
              ...headers
            }
          });
          ws.addEventListener("open", () => {
            return resolve2(new _NodeWebSocketTransport(ws));
          });
          ws.addEventListener("error", reject);
        });
      }
      #ws;
      onmessage;
      onclose;
      constructor(ws) {
        this.#ws = ws;
        this.#ws.addEventListener("message", (event) => {
          if (this.onmessage) {
            this.onmessage.call(null, event.data);
          }
        });
        this.#ws.addEventListener("close", () => {
          if (this.onclose) {
            this.onclose.call(null);
          }
        });
        this.#ws.addEventListener("error", () => {
        });
      }
      send(message) {
        this.#ws.send(message);
      }
      close() {
        this.#ws.close();
      }
    };
    NodeWebSocketTransport$1 = /* @__PURE__ */ Object.freeze({
      __proto__: null,
      NodeWebSocketTransport
    });
    PipeTransport = class {
      #pipeWrite;
      #subscriptions = new DisposableStack();
      #isClosed = false;
      #pendingMessage = [];
      onclose;
      onmessage;
      constructor(pipeWrite, pipeRead) {
        this.#pipeWrite = pipeWrite;
        const pipeReadEmitter = this.#subscriptions.use(
          new EventEmitter6(pipeRead)
        );
        pipeReadEmitter.on("data", (buffer) => {
          return this.#dispatch(buffer);
        });
        pipeReadEmitter.on("close", () => {
          if (this.onclose) {
            this.onclose.call(null);
          }
        });
        pipeReadEmitter.on("error", debugError);
        const pipeWriteEmitter = this.#subscriptions.use(
          new EventEmitter6(pipeWrite)
        );
        pipeWriteEmitter.on("error", debugError);
      }
      send(message) {
        assert(!this.#isClosed, "`PipeTransport` is closed.");
        this.#pipeWrite.write(message);
        this.#pipeWrite.write("\0");
      }
      #dispatch(buffer) {
        assert(!this.#isClosed, "`PipeTransport` is closed.");
        this.#pendingMessage.push(buffer);
        if (buffer.indexOf("\0") === -1) {
          return;
        }
        const concatBuffer = Buffer.concat(this.#pendingMessage);
        let start = 0;
        let end = concatBuffer.indexOf("\0");
        while (end !== -1) {
          const message = concatBuffer.toString(void 0, start, end);
          setImmediate(() => {
            if (this.onmessage) {
              this.onmessage.call(null, message);
            }
          });
          start = end + 1;
          end = concatBuffer.indexOf("\0", start);
        }
        if (start >= concatBuffer.length) {
          this.#pendingMessage = [];
        } else {
          this.#pendingMessage = [concatBuffer.subarray(start)];
        }
      }
      close() {
        this.#isClosed = true;
        this.#subscriptions.dispose();
      }
    };
    BrowserLauncher = class {
      #browser;
      puppeteer;
      constructor(puppeteer2, browser3) {
        this.puppeteer = puppeteer2;
        this.#browser = browser3;
      }
      get browser() {
        return this.#browser;
      }
      async launch(options2 = {}) {
        const { dumpio = false, enableExtensions = false, env: env2 = process.env, handleSIGINT = true, handleSIGTERM = true, handleSIGHUP = true, acceptInsecureCerts = false, networkEnabled = true, defaultViewport = DEFAULT_VIEWPORT, downloadBehavior, slowMo = 0, timeout: timeout2 = 3e4, waitForInitialPage = true, protocolTimeout, handleDevToolsAsPage, idGenerator = createIncrementalIdGenerator() } = options2;
        let { protocol: protocol2 } = options2;
        if (this.#browser === "firefox" && protocol2 === void 0) {
          protocol2 = "webDriverBiDi";
        }
        if (this.#browser === "firefox" && protocol2 === "cdp") {
          throw new Error("Connecting to Firefox using CDP is no longer supported");
        }
        const launchArgs = await this.computeLaunchArguments({
          ...options2,
          protocol: protocol2
        });
        if (!existsSync(launchArgs.executablePath)) {
          throw new Error(`Browser was not found at the configured executablePath (${launchArgs.executablePath})`);
        }
        const usePipe = launchArgs.args.includes("--remote-debugging-pipe");
        const onProcessExit = async () => {
          await this.cleanUserDataDir(launchArgs.userDataDir, {
            isTemp: launchArgs.isTempUserDataDir
          });
        };
        if (this.#browser === "firefox" && protocol2 === "webDriverBiDi" && usePipe) {
          throw new Error("Pipe connections are not supported with Firefox and WebDriver BiDi");
        }
        const browserProcess = launch$1({
          executablePath: launchArgs.executablePath,
          args: launchArgs.args,
          handleSIGHUP,
          handleSIGTERM,
          handleSIGINT,
          dumpio,
          env: env2,
          pipe: usePipe,
          onExit: onProcessExit,
          signal: options2.signal
        });
        let browser3;
        let cdpConnection;
        let closing = false;
        const browserCloseCallback = async () => {
          if (closing) {
            return;
          }
          closing = true;
          await this.closeBrowser(browserProcess, cdpConnection);
        };
        try {
          if (this.#browser === "firefox") {
            browser3 = await this.createBiDiBrowser(browserProcess, browserCloseCallback, {
              timeout: timeout2,
              protocolTimeout,
              slowMo,
              defaultViewport,
              acceptInsecureCerts,
              networkEnabled,
              idGenerator
            });
          } else {
            if (usePipe) {
              cdpConnection = await this.createCdpPipeConnection(browserProcess, {
                timeout: timeout2,
                protocolTimeout,
                slowMo,
                idGenerator
              });
            } else {
              cdpConnection = await this.createCdpSocketConnection(browserProcess, {
                timeout: timeout2,
                protocolTimeout,
                slowMo,
                idGenerator
              });
            }
            if (protocol2 === "webDriverBiDi") {
              browser3 = await this.createBiDiOverCdpBrowser(browserProcess, cdpConnection, browserCloseCallback, {
                defaultViewport,
                acceptInsecureCerts,
                networkEnabled
              });
            } else {
              browser3 = await CdpBrowser._create(cdpConnection, [], acceptInsecureCerts, defaultViewport, downloadBehavior, browserProcess.nodeProcess, browserCloseCallback, options2.targetFilter, void 0, void 0, networkEnabled, handleDevToolsAsPage);
            }
          }
        } catch (error) {
          void browserCloseCallback();
          const logs = browserProcess.getRecentLogs().join("\n");
          if (logs.includes("Failed to create a ProcessSingleton for your profile directory") || process.platform === "win32" && existsSync(join$1(launchArgs.userDataDir, "lockfile"))) {
            throw new Error(`The browser is already running for ${launchArgs.userDataDir}. Use a different \`userDataDir\` or stop the running browser first.`);
          }
          if (logs.includes("Missing X server") && options2.headless === false) {
            throw new Error(`Missing X server to start the headful browser. Either set headless to true or use xvfb-run to run your Puppeteer script.`);
          }
          if (error instanceof TimeoutError2) {
            throw new TimeoutError$1(error.message);
          }
          throw error;
        }
        if (Array.isArray(enableExtensions)) {
          if (this.#browser === "chrome" && !usePipe) {
            throw new Error("To use `enableExtensions` with a list of paths in Chrome, you must be connected with `--remote-debugging-pipe` (`pipe: true`).");
          }
          await Promise.all([
            enableExtensions.map((path14) => {
              return browser3.installExtension(path14);
            })
          ]);
        }
        if (waitForInitialPage) {
          await this.waitForPageTarget(browser3, timeout2);
        }
        return browser3;
      }
      async closeBrowser(browserProcess, cdpConnection) {
        if (cdpConnection) {
          try {
            await cdpConnection.closeBrowser();
            await browserProcess.hasClosed();
          } catch (error) {
            debugError(error);
            await browserProcess.close();
          }
        } else {
          await firstValueFrom(race(from(browserProcess.hasClosed()), timer(5e3).pipe(map(() => {
            return from(browserProcess.close());
          }))));
        }
      }
      async waitForPageTarget(browser3, timeout2) {
        try {
          await browser3.waitForTarget((t) => {
            return t.type() === "page";
          }, { timeout: timeout2 });
        } catch (error) {
          await browser3.close();
          throw error;
        }
      }
      async createCdpSocketConnection(browserProcess, opts) {
        const browserWSEndpoint = await browserProcess.waitForLineOutput(CDP_WEBSOCKET_ENDPOINT_REGEX, opts.timeout);
        const transport2 = await NodeWebSocketTransport.create(browserWSEndpoint);
        return new Connection(
          browserWSEndpoint,
          transport2,
          opts.slowMo,
          opts.protocolTimeout,
          false,
          opts.idGenerator
        );
      }
      async createCdpPipeConnection(browserProcess, opts) {
        const { 3: pipeWrite, 4: pipeRead } = browserProcess.nodeProcess.stdio;
        const transport2 = new PipeTransport(pipeWrite, pipeRead);
        return new Connection(
          "",
          transport2,
          opts.slowMo,
          opts.protocolTimeout,
          false,
          opts.idGenerator
        );
      }
      async createBiDiOverCdpBrowser(browserProcess, cdpConnection, closeCallback, opts) {
        const bidiOnly = process.env["PUPPETEER_WEBDRIVER_BIDI_ONLY"] === "true";
        const BiDi = await import("../../../node_modules/puppeteer-core/lib/esm/puppeteer/bidi/bidi.js");
        const bidiConnection = await BiDi.connectBidiOverCdp(cdpConnection);
        return await BiDi.BidiBrowser.create({
          connection: bidiConnection,
          cdpConnection: bidiOnly ? void 0 : cdpConnection,
          closeCallback,
          process: browserProcess.nodeProcess,
          defaultViewport: opts.defaultViewport,
          acceptInsecureCerts: opts.acceptInsecureCerts,
          networkEnabled: opts.networkEnabled
        });
      }
      async createBiDiBrowser(browserProcess, closeCallback, opts) {
        const browserWSEndpoint = await browserProcess.waitForLineOutput(WEBDRIVER_BIDI_WEBSOCKET_ENDPOINT_REGEX, opts.timeout) + "/session";
        const transport2 = await NodeWebSocketTransport.create(browserWSEndpoint);
        const BiDi = await import("../../../node_modules/puppeteer-core/lib/esm/puppeteer/bidi/bidi.js");
        const bidiConnection = new BiDi.BidiConnection(browserWSEndpoint, transport2, opts.idGenerator, opts.slowMo, opts.protocolTimeout);
        return await BiDi.BidiBrowser.create({
          connection: bidiConnection,
          closeCallback,
          process: browserProcess.nodeProcess,
          defaultViewport: opts.defaultViewport,
          acceptInsecureCerts: opts.acceptInsecureCerts,
          networkEnabled: opts.networkEnabled ?? true
        });
      }
      getProfilePath() {
        return join$1(this.puppeteer.configuration.temporaryDirectory ?? tmpdir(), `puppeteer_dev_${this.browser}_profile-`);
      }
      resolveExecutablePath(headless, validatePath = true) {
        let executablePath2 = this.puppeteer.configuration.executablePath;
        if (executablePath2) {
          if (validatePath && !existsSync(executablePath2)) {
            throw new Error(`Tried to find the browser at the configured path (${executablePath2}), but no executable was found.`);
          }
          return executablePath2;
        }
        function puppeteerBrowserToInstalledBrowser(browser3, headless2) {
          switch (browser3) {
            case "chrome":
              if (headless2 === "shell") {
                return Browser2.CHROMEHEADLESSSHELL;
              }
              return Browser2.CHROME;
            case "firefox":
              return Browser2.FIREFOX;
          }
          return Browser2.CHROME;
        }
        const browserType = puppeteerBrowserToInstalledBrowser(this.browser, headless);
        executablePath2 = computeExecutablePath({
          cacheDir: this.puppeteer.defaultDownloadPath,
          browser: browserType,
          buildId: this.puppeteer.browserVersion
        });
        if (validatePath && !existsSync(executablePath2)) {
          const configVersion = this.puppeteer.configuration?.[this.browser]?.version;
          if (configVersion) {
            throw new Error(`Tried to find the browser at the configured path (${executablePath2}) for version ${configVersion}, but no executable was found.`);
          }
          switch (this.browser) {
            case "chrome":
              throw new Error(`Could not find Chrome (ver. ${this.puppeteer.browserVersion}). This can occur if either
 1. you did not perform an installation before running the script (e.g. \`npx puppeteer browsers install ${browserType}\`) or
 2. your cache path is incorrectly configured (which is: ${this.puppeteer.configuration.cacheDirectory}).
For (2), check out our guide on configuring puppeteer at https://pptr.dev/guides/configuration.`);
            case "firefox":
              throw new Error(`Could not find Firefox (rev. ${this.puppeteer.browserVersion}). This can occur if either
 1. you did not perform an installation for Firefox before running the script (e.g. \`npx puppeteer browsers install firefox\`) or
 2. your cache path is incorrectly configured (which is: ${this.puppeteer.configuration.cacheDirectory}).
For (2), check out our guide on configuring puppeteer at https://pptr.dev/guides/configuration.`);
          }
        }
        return executablePath2;
      }
    };
    LaunchOptions = /* @__PURE__ */ Object.freeze({
      __proto__: null,
      convertPuppeteerChannelToBrowsersChannel
    });
    rmOptions = {
      force: true,
      recursive: true,
      maxRetries: 5
    };
    ChromeLauncher = class extends BrowserLauncher {
      constructor(puppeteer2) {
        super(puppeteer2, "chrome");
      }
      launch(options2 = {}) {
        if (this.puppeteer.configuration.logLevel === "warn" && process.platform === "darwin" && process.arch === "x64") {
          const cpus = os.cpus();
          if (cpus[0]?.model.includes("Apple")) {
            console.warn([
              "\x1B[1m\x1B[43m\x1B[30m",
              "Degraded performance warning:\x1B[0m\x1B[33m",
              "Launching Chrome on Mac Silicon (arm64) from an x64 Node installation results in",
              "Rosetta translating the Chrome binary, even if Chrome is already arm64. This would",
              "result in huge performance issues. To resolve this, you must run Puppeteer with",
              "a version of Node built for arm64."
            ].join("\n  "));
          }
        }
        return super.launch(options2);
      }
      async computeLaunchArguments(options2 = {}) {
        const { ignoreDefaultArgs = false, args: args2 = [], pipe: pipe2 = false, debuggingPort, channel, executablePath: executablePath2 } = options2;
        const chromeArguments = [];
        if (!ignoreDefaultArgs) {
          chromeArguments.push(...this.defaultArgs(options2));
        } else if (Array.isArray(ignoreDefaultArgs)) {
          chromeArguments.push(...this.defaultArgs(options2).filter((arg) => {
            return !ignoreDefaultArgs.includes(arg);
          }));
        } else {
          chromeArguments.push(...args2);
        }
        if (!chromeArguments.some((argument) => {
          return argument.startsWith("--remote-debugging-");
        })) {
          if (pipe2) {
            assert(!debuggingPort, "Browser should be launched with either pipe or debugging port - not both.");
            chromeArguments.push("--remote-debugging-pipe");
          } else {
            chromeArguments.push(`--remote-debugging-port=${debuggingPort || 0}`);
          }
        }
        let isTempUserDataDir = false;
        let userDataDirIndex = chromeArguments.findIndex((arg) => {
          return arg.startsWith("--user-data-dir");
        });
        if (userDataDirIndex < 0) {
          isTempUserDataDir = true;
          chromeArguments.push(`--user-data-dir=${await mkdtemp(this.getProfilePath())}`);
          userDataDirIndex = chromeArguments.length - 1;
        }
        const userDataDir = chromeArguments[userDataDirIndex].split("=", 2)[1];
        assert(typeof userDataDir === "string", "`--user-data-dir` is malformed");
        let chromeExecutable = executablePath2;
        if (!chromeExecutable) {
          assert(channel || !this.puppeteer._isPuppeteerCore, `An \`executablePath\` or \`channel\` must be specified for \`puppeteer-core\``);
          chromeExecutable = channel ? this.executablePath(channel) : this.resolveExecutablePath(options2.headless ?? true);
        }
        return {
          executablePath: chromeExecutable,
          args: chromeArguments,
          isTempUserDataDir,
          userDataDir
        };
      }
      async cleanUserDataDir(path14, opts) {
        if (opts.isTemp) {
          try {
            await rm(path14);
          } catch (error) {
            debugError(error);
            throw error;
          }
        }
      }
      defaultArgs(options2 = {}) {
        const userDisabledFeatures = getFeatures("--disable-features", options2.args);
        if (options2.args && userDisabledFeatures.length > 0) {
          removeMatchingFlags(options2.args, "--disable-features");
        }
        const turnOnExperimentalFeaturesForTesting = process.env["PUPPETEER_TEST_EXPERIMENTAL_CHROME_FEATURES"] === "true";
        const disabledFeatures = [
          "Translate",
          "AcceptCHFrame",
          "MediaRouter",
          "OptimizationHints",
          "RenderDocument",
          "PartitionAllocSchedulerLoopQuarantineTaskControlledPurge",
          ...turnOnExperimentalFeaturesForTesting ? [] : [
            "ProcessPerSiteUpToMainFrameThreshold",
            "IsolateSandboxedIframes"
          ],
          ...userDisabledFeatures
        ].filter((feature) => {
          return feature !== "";
        });
        const userEnabledFeatures = getFeatures("--enable-features", options2.args);
        if (options2.args && userEnabledFeatures.length > 0) {
          removeMatchingFlags(options2.args, "--enable-features");
        }
        const enabledFeatures = [
          "PdfOopif",
          ...userEnabledFeatures
        ].filter((feature) => {
          return feature !== "";
        });
        const chromeArguments = [
          "--allow-pre-commit-input",
          "--disable-background-networking",
          "--disable-background-timer-throttling",
          "--disable-backgrounding-occluded-windows",
          "--disable-breakpad",
          "--disable-client-side-phishing-detection",
          "--disable-component-extensions-with-background-pages",
          "--disable-crash-reporter",
          "--disable-default-apps",
          "--disable-dev-shm-usage",
          "--disable-hang-monitor",
          "--disable-infobars",
          "--disable-ipc-flooding-protection",
          "--disable-popup-blocking",
          "--disable-prompt-on-repost",
          "--disable-renderer-backgrounding",
          "--disable-search-engine-choice-screen",
          "--disable-sync",
          "--enable-automation",
          "--export-tagged-pdf",
          "--force-color-profile=srgb",
          "--generate-pdf-document-outline",
          "--metrics-recording-only",
          "--no-first-run",
          "--password-store=basic",
          "--use-mock-keychain",
          `--disable-features=${disabledFeatures.join(",")}`,
          `--enable-features=${enabledFeatures.join(",")}`
        ].filter((arg) => {
          return arg !== "";
        });
        const { devtools = false, headless = !devtools, args: args2 = [], userDataDir, enableExtensions = false } = options2;
        if (userDataDir) {
          chromeArguments.push(`--user-data-dir=${path$1.posix.isAbsolute(userDataDir) || path$1.win32.isAbsolute(userDataDir) ? userDataDir : path$1.resolve(userDataDir)}`);
        }
        if (devtools) {
          chromeArguments.push("--auto-open-devtools-for-tabs");
        }
        if (headless) {
          chromeArguments.push(headless === "shell" ? "--headless" : "--headless=new", "--hide-scrollbars", "--mute-audio");
        }
        chromeArguments.push(enableExtensions ? "--enable-unsafe-extension-debugging" : "--disable-extensions");
        if (args2.every((arg) => {
          return arg.startsWith("-");
        })) {
          chromeArguments.push("about:blank");
        }
        chromeArguments.push(...args2);
        return chromeArguments;
      }
      executablePath(channel, validatePath = true) {
        if (channel) {
          return computeSystemExecutablePath({
            browser: Browser2.CHROME,
            channel: convertPuppeteerChannelToBrowsersChannel(channel)
          });
        } else {
          return this.resolveExecutablePath(void 0, validatePath);
        }
      }
    };
    FirefoxLauncher = class _FirefoxLauncher extends BrowserLauncher {
      constructor(puppeteer2) {
        super(puppeteer2, "firefox");
      }
      static getPreferences(extraPrefsFirefox) {
        return {
          ...extraPrefsFirefox,
          "fission.webContentIsolationStrategy": 0
        };
      }
      async computeLaunchArguments(options2 = {}) {
        const { ignoreDefaultArgs = false, args: args2 = [], executablePath: executablePath2, pipe: pipe2 = false, extraPrefsFirefox = {}, debuggingPort = null } = options2;
        const firefoxArguments = [];
        if (!ignoreDefaultArgs) {
          firefoxArguments.push(...this.defaultArgs(options2));
        } else if (Array.isArray(ignoreDefaultArgs)) {
          firefoxArguments.push(...this.defaultArgs(options2).filter((arg) => {
            return !ignoreDefaultArgs.includes(arg);
          }));
        } else {
          firefoxArguments.push(...args2);
        }
        if (!firefoxArguments.some((argument) => {
          return argument.startsWith("--remote-debugging-");
        })) {
          if (pipe2) {
            assert(debuggingPort === null, "Browser should be launched with either pipe or debugging port - not both.");
          }
          firefoxArguments.push(`--remote-debugging-port=${debuggingPort || 0}`);
        }
        let userDataDir;
        let isTempUserDataDir = true;
        const profileArgIndex = firefoxArguments.findIndex((arg) => {
          return ["-profile", "--profile"].includes(arg);
        });
        if (profileArgIndex !== -1) {
          userDataDir = firefoxArguments[profileArgIndex + 1];
          if (!userDataDir) {
            throw new Error(`Missing value for profile command line argument`);
          }
          isTempUserDataDir = false;
        } else {
          userDataDir = await mkdtemp(this.getProfilePath());
          firefoxArguments.push("--profile");
          firefoxArguments.push(userDataDir);
        }
        await createProfile(Browser2.FIREFOX, {
          path: userDataDir,
          preferences: _FirefoxLauncher.getPreferences(extraPrefsFirefox)
        });
        let firefoxExecutable;
        if (this.puppeteer._isPuppeteerCore || executablePath2) {
          assert(executablePath2, `An \`executablePath\` must be specified for \`puppeteer-core\``);
          firefoxExecutable = executablePath2;
        } else {
          firefoxExecutable = this.executablePath(void 0);
        }
        return {
          isTempUserDataDir,
          userDataDir,
          args: firefoxArguments,
          executablePath: firefoxExecutable
        };
      }
      async cleanUserDataDir(userDataDir, opts) {
        if (opts.isTemp) {
          try {
            await rm(userDataDir);
          } catch (error) {
            debugError(error);
            throw error;
          }
        } else {
          try {
            const backupSuffix = ".puppeteer";
            const backupFiles = ["prefs.js", "user.js"];
            const results = await Promise.allSettled(backupFiles.map(async (file2) => {
              const prefsBackupPath = path$1.join(userDataDir, file2 + backupSuffix);
              if (fs2.existsSync(prefsBackupPath)) {
                const prefsPath = path$1.join(userDataDir, file2);
                await unlink(prefsPath);
                await rename(prefsBackupPath, prefsPath);
              }
            }));
            for (const result of results) {
              if (result.status === "rejected") {
                throw result.reason;
              }
            }
          } catch (error) {
            debugError(error);
          }
        }
      }
      executablePath(_, validatePath = true) {
        return this.resolveExecutablePath(
          void 0,
          validatePath
        );
      }
      defaultArgs(options2 = {}) {
        const { devtools = false, headless = !devtools, args: args2 = [], userDataDir = null } = options2;
        const firefoxArguments = [];
        switch (os.platform()) {
          case "darwin":
            firefoxArguments.push("--foreground");
            break;
          case "win32":
            firefoxArguments.push("--wait-for-browser");
            break;
        }
        if (userDataDir) {
          firefoxArguments.push("--profile");
          firefoxArguments.push(userDataDir);
        }
        if (headless) {
          firefoxArguments.push("--headless");
        }
        if (devtools) {
          firefoxArguments.push("--devtools");
        }
        if (args2.every((arg) => {
          return arg.startsWith("-");
        })) {
          firefoxArguments.push("about:blank");
        }
        firefoxArguments.push(...args2);
        return firefoxArguments;
      }
    };
    PuppeteerNode = class extends Puppeteer {
      #launcher;
      #lastLaunchedBrowser;
      defaultBrowserRevision;
      configuration = {};
      constructor(settings) {
        const { configuration, ...commonSettings } = settings;
        super(commonSettings);
        if (configuration) {
          this.configuration = configuration;
        }
        switch (this.configuration.defaultBrowser) {
          case "firefox":
            this.defaultBrowserRevision = PUPPETEER_REVISIONS.firefox;
            break;
          default:
            this.configuration.defaultBrowser = "chrome";
            this.defaultBrowserRevision = PUPPETEER_REVISIONS.chrome;
            break;
        }
        this.connect = this.connect.bind(this);
        this.launch = this.launch.bind(this);
        this.executablePath = this.executablePath.bind(this);
        this.defaultArgs = this.defaultArgs.bind(this);
        this.trimCache = this.trimCache.bind(this);
      }
      connect(options2) {
        return super.connect(options2);
      }
      launch(options2 = {}) {
        const { browser: browser3 = this.defaultBrowser } = options2;
        this.#lastLaunchedBrowser = browser3;
        switch (browser3) {
          case "chrome":
            this.defaultBrowserRevision = PUPPETEER_REVISIONS.chrome;
            break;
          case "firefox":
            this.defaultBrowserRevision = PUPPETEER_REVISIONS.firefox;
            break;
          default:
            throw new Error(`Unknown product: ${browser3}`);
        }
        this.#launcher = this.#getLauncher(browser3);
        return this.#launcher.launch(options2);
      }
      #getLauncher(browser3) {
        if (this.#launcher && this.#launcher.browser === browser3) {
          return this.#launcher;
        }
        switch (browser3) {
          case "chrome":
            return new ChromeLauncher(this);
          case "firefox":
            return new FirefoxLauncher(this);
          default:
            throw new Error(`Unknown product: ${browser3}`);
        }
      }
      executablePath(optsOrChannel) {
        if (optsOrChannel === void 0) {
          return this.#getLauncher(this.lastLaunchedBrowser).executablePath(
            void 0,
            false
          );
        }
        if (typeof optsOrChannel === "string") {
          return this.#getLauncher("chrome").executablePath(
            optsOrChannel,
            false
          );
        }
        return this.#getLauncher(optsOrChannel.browser ?? this.lastLaunchedBrowser).resolveExecutablePath(optsOrChannel.headless, false);
      }
      get browserVersion() {
        return this.configuration?.[this.lastLaunchedBrowser]?.version ?? this.defaultBrowserRevision;
      }
      get defaultDownloadPath() {
        return this.configuration.cacheDirectory;
      }
      get lastLaunchedBrowser() {
        return this.#lastLaunchedBrowser ?? this.defaultBrowser;
      }
      get defaultBrowser() {
        return this.configuration.defaultBrowser ?? "chrome";
      }
      get product() {
        return this.lastLaunchedBrowser;
      }
      defaultArgs(options2 = {}) {
        return this.#getLauncher(options2.browser ?? this.lastLaunchedBrowser).defaultArgs(options2);
      }
      async trimCache() {
        const platform = detectBrowserPlatform();
        if (!platform) {
          throw new Error("The current platform is not supported.");
        }
        const cacheDir = this.configuration.cacheDirectory;
        const installedBrowsers = await getInstalledBrowsers({
          cacheDir
        });
        const puppeteerBrowsers = [
          {
            product: "chrome",
            browser: Browser2.CHROME,
            currentBuildId: ""
          },
          {
            product: "firefox",
            browser: Browser2.FIREFOX,
            currentBuildId: ""
          }
        ];
        await Promise.all(puppeteerBrowsers.map(async (item) => {
          const tag2 = this.configuration?.[item.product]?.version ?? PUPPETEER_REVISIONS[item.product];
          item.currentBuildId = await resolveBuildId(item.browser, platform, tag2);
        }));
        const currentBrowserBuilds = new Set(puppeteerBrowsers.map((browser3) => {
          return `${browser3.browser}_${browser3.currentBuildId}`;
        }));
        const currentBrowsers = new Set(puppeteerBrowsers.map((browser3) => {
          return browser3.browser;
        }));
        for (const installedBrowser of installedBrowsers) {
          if (!currentBrowsers.has(installedBrowser.browser)) {
            continue;
          }
          if (currentBrowserBuilds.has(`${installedBrowser.browser}_${installedBrowser.buildId}`)) {
            continue;
          }
          await uninstall({
            browser: installedBrowser.browser,
            platform,
            cacheDir,
            buildId: installedBrowser.buildId
          });
        }
      }
    };
    __runInitializers4 = function(thisArg, initializers, value) {
      var useValue = arguments.length > 2;
      for (var i = 0; i < initializers.length; i++) {
        value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);
      }
      return useValue ? value : void 0;
    };
    __esDecorate4 = function(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {
      function accept(f) {
        if (f !== void 0 && typeof f !== "function") throw new TypeError("Function expected");
        return f;
      }
      var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value";
      var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null;
      var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});
      var _, done = false;
      for (var i = decorators.length - 1; i >= 0; i--) {
        var context2 = {};
        for (var p in contextIn) context2[p] = p === "access" ? {} : contextIn[p];
        for (var p in contextIn.access) context2.access[p] = contextIn.access[p];
        context2.addInitializer = function(f) {
          if (done) throw new TypeError("Cannot add initializers after decoration has completed");
          extraInitializers.push(accept(f || null));
        };
        var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context2);
        if (kind === "accessor") {
          if (result === void 0) continue;
          if (result === null || typeof result !== "object") throw new TypeError("Object expected");
          if (_ = accept(result.get)) descriptor.get = _;
          if (_ = accept(result.set)) descriptor.set = _;
          if (_ = accept(result.init)) initializers.unshift(_);
        } else if (_ = accept(result)) {
          if (kind === "field") initializers.unshift(_);
          else descriptor[key] = _;
        }
      }
      if (target) Object.defineProperty(target, contextIn.name, descriptor);
      done = true;
    };
    __setFunctionName4 = function(f, name, prefix) {
      if (typeof name === "symbol") name = name.description ? "[".concat(name.description, "]") : "";
      return Object.defineProperty(f, "name", { configurable: true, value: prefix ? "".concat(prefix, " ", name) : name });
    };
    CRF_VALUE = 30;
    DEFAULT_FPS = 30;
    debugFfmpeg = debug$2("puppeteer:ffmpeg");
    ScreenRecorder = (() => {
      let _classSuper = PassThrough;
      let _instanceExtraInitializers = [];
      let _private_writeFrame_decorators;
      let _private_writeFrame_descriptor;
      let _stop_decorators;
      return class ScreenRecorder extends _classSuper {
        static {
          const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
          __esDecorate4(this, _private_writeFrame_descriptor = { value: __setFunctionName4(async function(buffer) {
            const error = await new Promise((resolve2) => {
              this.#process.stdin.write(buffer, resolve2);
            });
            if (error) {
              console.log(`ffmpeg failed to write: ${error.message}.`);
            }
          }, "#writeFrame") }, _private_writeFrame_decorators, { kind: "method", name: "#writeFrame", static: false, private: true, access: { has: (obj) => #writeFrame in obj, get: (obj) => obj.#writeFrame }, metadata: _metadata }, null, _instanceExtraInitializers);
          __esDecorate4(this, null, _stop_decorators, { kind: "method", name: "stop", static: false, private: false, access: { has: (obj) => "stop" in obj, get: (obj) => obj.stop }, metadata: _metadata }, null, _instanceExtraInitializers);
          if (_metadata) Object.defineProperty(this, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
        }
        #page = __runInitializers4(this, _instanceExtraInitializers);
        #process;
        #controller = new AbortController();
        #lastFrame;
        #fps;
        constructor(page, width, height, { ffmpegPath, speed, scale, crop, format: format2, fps, loop, delay, quality, colors: colors2, path: path14, overwrite } = {}) {
          super({ allowHalfOpen: false });
          ffmpegPath ??= "ffmpeg";
          format2 ??= "webm";
          fps ??= DEFAULT_FPS;
          loop ||= -1;
          delay ??= -1;
          quality ??= CRF_VALUE;
          colors2 ??= 256;
          overwrite ??= true;
          this.#fps = fps;
          const { error } = spawnSync(ffmpegPath);
          if (error) {
            throw error;
          }
          const filters = [
            `crop='min(${width},iw):min(${height},ih):0:0'`,
            `pad=${width}:${height}:0:0`
          ];
          if (speed) {
            filters.push(`setpts=${1 / speed}*PTS`);
          }
          if (crop) {
            filters.push(`crop=${crop.width}:${crop.height}:${crop.x}:${crop.y}`);
          }
          if (scale) {
            filters.push(`scale=iw*${scale}:-1:flags=lanczos`);
          }
          const formatArgs2 = this.#getFormatArgs(format2, fps, loop, delay, quality, colors2);
          const vf = formatArgs2.indexOf("-vf");
          if (vf !== -1) {
            filters.push(formatArgs2.splice(vf, 2).at(-1) ?? "");
          }
          if (path14) {
            fs2.mkdirSync(dirname$1(path14), { recursive: overwrite });
          }
          this.#process = spawn$1(
            ffmpegPath,
            [
              ["-loglevel", "error"],
              ["-avioflags", "direct"],
              [
                "-fpsprobesize",
                "0",
                "-probesize",
                "32",
                "-analyzeduration",
                "0",
                "-fflags",
                "nobuffer"
              ],
              ["-f", "image2pipe", "-vcodec", "png", "-i", "pipe:0"],
              ["-an"],
              ["-threads", "1"],
              ["-framerate", `${fps}`],
              ["-b:v", "0"],
              formatArgs2,
              ["-vf", filters.join()],
              [overwrite ? "-y" : "-n"],
              "pipe:1"
            ].flat(),
            { stdio: ["pipe", "pipe", "pipe"] }
          );
          this.#process.stdout.pipe(this);
          this.#process.stderr.on("data", (data32) => {
            debugFfmpeg(data32.toString("utf8"));
          });
          this.#page = page;
          const { client } = this.#page.mainFrame();
          client.once(CDPSessionEvent.Disconnected, () => {
            void this.stop().catch(debugError);
          });
          this.#lastFrame = lastValueFrom(fromEmitterEvent(client, "Page.screencastFrame").pipe(tap((event) => {
            void client.send("Page.screencastFrameAck", {
              sessionId: event.sessionId
            });
          }), filter((event) => {
            return event.metadata.timestamp !== void 0;
          }), map((event) => {
            return {
              buffer: Buffer.from(event.data, "base64"),
              timestamp: event.metadata.timestamp
            };
          }), bufferCount(2, 1), concatMap(([{ timestamp: previousTimestamp, buffer }, { timestamp }]) => {
            return from(Array(Math.round(fps * Math.max(timestamp - previousTimestamp, 0))).fill(buffer));
          }), map((buffer) => {
            void this.#writeFrame(buffer);
            return [buffer, performance.now()];
          }), takeUntil(fromEvent(this.#controller.signal, "abort"))), { defaultValue: [Buffer.from([]), performance.now()] });
        }
        #getFormatArgs(format2, fps, loop, delay, quality, colors2) {
          const libvpx = [
            ["-vcodec", "vp9"],
            ["-crf", `${quality}`],
            [
              "-deadline",
              "realtime",
              "-cpu-used",
              `${Math.min(os.cpus().length / 2, 8)}`
            ]
          ];
          switch (format2) {
            case "webm":
              return [
                ...libvpx,
                ["-f", "webm"]
              ].flat();
            case "gif":
              fps = DEFAULT_FPS === fps ? 20 : "source_fps";
              if (loop === Infinity) {
                loop = 0;
              }
              if (delay !== -1) {
                delay /= 10;
              }
              return [
                [
                  "-vf",
                  `fps=${fps},split[s0][s1];[s0]palettegen=stats_mode=diff:max_colors=${colors2}[p];[s1][p]paletteuse=dither=bayer`
                ],
                ["-loop", `${loop}`],
                ["-final_delay", `${delay}`],
                ["-f", "gif"]
              ].flat();
            case "mp4":
              return [
                ...libvpx,
                ["-movflags", "hybrid_fragmented"],
                ["-f", "mp4"]
              ].flat();
          }
        }
        get #writeFrame() {
          return _private_writeFrame_descriptor.value;
        }
        async stop() {
          if (this.#controller.signal.aborted) {
            return;
          }
          await this.#page._stopScreencast().catch(debugError);
          this.#controller.abort();
          const [buffer, timestamp] = await this.#lastFrame;
          await Promise.all(Array(Math.max(1, Math.round(this.#fps * (performance.now() - timestamp) / 1e3))).fill(buffer).map(this.#writeFrame.bind(this)));
          this.#process.stdin.end();
          await new Promise((resolve2) => {
            this.#process.once("close", resolve2);
          });
        }
        async [(_private_writeFrame_decorators = [guarded()], _stop_decorators = [guarded()], asyncDisposeSymbol)]() {
          await this.stop();
        }
      };
    })();
    environment.value = {
      fs: fs2,
      path: path$1,
      ScreenRecorder
    };
    puppeteer = new PuppeteerNode({
      isPuppeteerCore: true
    });
    ({
      connect,
      defaultArgs,
      executablePath,
      launch
    } = puppeteer);
    App = /* @__PURE__ */ Object.freeze({
      __proto__: null
    });
    DevToolsContext = class {
      #instances = /* @__PURE__ */ new Map();
      get(ctor) {
        const instance2 = this.#instances.get(ctor);
        if (!instance2) {
          throw new Error(`No instance for ${ctor.name}. Ensure the bootstrapper creates it.`);
        }
        return instance2;
      }
      has(ctor) {
        return this.#instances.has(ctor);
      }
      set(ctor, instance2) {
        this.#instances.set(ctor, instance2);
      }
      delete(ctor) {
        this.#instances.delete(ctor);
      }
    };
    gInstance = null;
    (function(ExperimentName2) {
      ExperimentName2["ALL"] = "*";
      ExperimentName2["CAPTURE_NODE_CREATION_STACKS"] = "capture-node-creation-stacks";
      ExperimentName2["LIVE_HEAP_PROFILE"] = "live-heap-profile";
      ExperimentName2["PROTOCOL_MONITOR"] = "protocol-monitor";
      ExperimentName2["SAMPLING_HEAP_PROFILER_TIMELINE"] = "sampling-heap-profiler-timeline";
      ExperimentName2["SHOW_OPTION_TO_EXPOSE_INTERNALS_IN_HEAP_SNAPSHOT"] = "show-option-to-expose-internals-in-heap-snapshot";
      ExperimentName2["TIMELINE_INVALIDATION_TRACKING"] = "timeline-invalidation-tracking";
      ExperimentName2["TIMELINE_SHOW_ALL_EVENTS"] = "timeline-show-all-events";
      ExperimentName2["TIMELINE_V8_RUNTIME_CALL_STATS"] = "timeline-v8-runtime-call-stats";
      ExperimentName2["APCA"] = "apca";
      ExperimentName2["FONT_EDITOR"] = "font-editor";
      ExperimentName2["FULL_ACCESSIBILITY_TREE"] = "full-accessibility-tree";
      ExperimentName2["CONTRAST_ISSUES"] = "contrast-issues";
      ExperimentName2["EXPERIMENTAL_COOKIE_FEATURES"] = "experimental-cookie-features";
      ExperimentName2["INSTRUMENTATION_BREAKPOINTS"] = "instrumentation-breakpoints";
      ExperimentName2["AUTHORED_DEPLOYED_GROUPING"] = "authored-deployed-grouping";
      ExperimentName2["JUST_MY_CODE"] = "just-my-code";
      ExperimentName2["USE_SOURCE_MAP_SCOPES"] = "use-source-map-scopes";
      ExperimentName2["TIMELINE_SHOW_POST_MESSAGE_EVENTS"] = "timeline-show-postmessage-events";
      ExperimentName2["TIMELINE_DEBUG_MODE"] = "timeline-debug-mode";
      ExperimentName2["DURABLE_MESSAGES"] = "durable-messages";
      ExperimentName2["JPEG_XL"] = "jpeg-xl";
    })(ExperimentName || (ExperimentName = {}));
    hostConfig = {};
    Runtime = {
      isDescriptorEnabled: () => true,
      queryParam: () => null
    };
    experiments = {
      isEnabled: () => false
    };
    registeredAppProvider = [];
    AppProvider = /* @__PURE__ */ Object.freeze({
      __proto__: null,
      getRegisteredAppProviders,
      registerAppProvider
    });
    BASE64_CHARS$1 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
    BASE64_CODES$1 = new Uint8Array(123);
    for (let index2 = 0; index2 < BASE64_CHARS$1.length; ++index2) {
      BASE64_CODES$1[BASE64_CHARS$1.charCodeAt(index2)] = index2;
    }
    Base64 = /* @__PURE__ */ Object.freeze({
      __proto__: null,
      BASE64_CHARS: BASE64_CHARS$1,
      BASE64_CODES: BASE64_CODES$1,
      decode: decode$1,
      encode
    });
    CharacterIdMap = class {
      #elementToCharacter = /* @__PURE__ */ new Map();
      #characterToElement = /* @__PURE__ */ new Map();
      #charCode = 33;
      toChar(object2) {
        let character = this.#elementToCharacter.get(object2);
        if (!character) {
          if (this.#charCode >= 65535) {
            throw new Error("CharacterIdMap ran out of capacity!");
          }
          character = String.fromCharCode(this.#charCode++);
          this.#elementToCharacter.set(object2, character);
          this.#characterToElement.set(character, object2);
        }
        return character;
      }
      fromChar(character) {
        const object2 = this.#characterToElement.get(character);
        if (object2 === void 0) {
          return null;
        }
        return object2;
      }
    };
    CharacterIdMap$1 = /* @__PURE__ */ Object.freeze({
      __proto__: null,
      CharacterIdMap
    });
    removeElement2 = (array2, element, firstOnly) => {
      let index2 = array2.indexOf(element);
      if (index2 === -1) {
        return false;
      }
      for (let i = index2 + 1, n = array2.length; i < n; ++i) {
        if (array2[i] !== element) {
          array2[index2++] = array2[i];
        }
      }
      array2.length = index2;
      return true;
    };
    mergeOrdered2 = (array1, array2, comparator2) => {
      return mergeOrIntersect2(array1, array2, comparator2);
    };
    DEFAULT_COMPARATOR2 = (a, b) => {
      return a < b ? -1 : a > b ? 1 : 0;
    };
    isValid = (date2) => {
      return !isNaN(date2.getTime());
    };
    EmptyUrlString = "";
    NodeWorkerScope = class {
      postMessage(message) {
        WorkerThreads.parentPort?.postMessage(message);
      }
      set onmessage(listener) {
        WorkerThreads.parentPort?.on("message", (data32) => {
          listener({ data: data32 });
        });
      }
    };
    NodeWorker = class {
      #workerPromise;
      #disposed = false;
      #rejectWorkerPromise;
      constructor(url) {
        this.#workerPromise = new Promise((resolve2, reject) => {
          this.#rejectWorkerPromise = reject;
          const worker = new WorkerThreads.Worker(new URL(url));
          worker.once("message", (message) => {
            if (message === "workerReady") {
              resolve2(worker);
            }
          });
          worker.on("error", reject);
        });
      }
      postMessage(message) {
        void this.#workerPromise.then((worker) => {
          if (!this.#disposed) {
            worker.postMessage(message);
          }
        });
      }
      dispose() {
        this.#disposed = true;
        void this.#workerPromise.then((worker) => worker.terminate());
      }
      terminate(immediately) {
        if (immediately) {
          this.#rejectWorkerPromise?.(new Error("Worker terminated"));
        }
        this.dispose();
      }
      set onmessage(listener) {
        void this.#workerPromise.then((worker) => {
          worker.on("message", (data32) => {
            if (!this.#disposed) {
              listener({ data: data32 });
            }
          });
        });
      }
      set onerror(listener) {
        void this.#workerPromise.then((worker) => {
          worker.on("error", (error) => {
            if (!this.#disposed) {
              listener({ type: "error", ...error });
            }
          });
        });
      }
    };
    HOST_RUNTIME$2 = {
      createWorker(url) {
        return new NodeWorker(url);
      },
      workerScope: new NodeWorkerScope()
    };
    HostRuntime$1 = /* @__PURE__ */ Object.freeze({
      __proto__: null,
      HOST_RUNTIME: HOST_RUNTIME$2
    });
    node = /* @__PURE__ */ Object.freeze({
      __proto__: null,
      HostRuntime: HostRuntime$1
    });
    WebWorkerScope = class {
      postMessage(message) {
        self.postMessage(message);
      }
      set onmessage(listener) {
        self.onmessage = listener;
      }
    };
    WebWorker2 = class {
      #workerPromise;
      #disposed;
      #rejectWorkerPromise;
      constructor(workerLocation) {
        this.#workerPromise = new Promise((fulfill, reject) => {
          this.#rejectWorkerPromise = reject;
          const worker = new Worker(new URL(workerLocation), { type: "module" });
          worker.onerror = (event) => {
            console.error(`Failed to load worker for ${workerLocation}:`, event);
          };
          worker.onmessage = (event) => {
            console.assert(event.data === "workerReady");
            worker.onmessage = null;
            fulfill(worker);
          };
        });
      }
      postMessage(message, transfer2) {
        void this.#workerPromise.then((worker) => {
          if (!this.#disposed) {
            worker.postMessage(message, transfer2 ?? []);
          }
        });
      }
      dispose() {
        this.#disposed = true;
        void this.#workerPromise.then((worker) => worker.terminate());
      }
      terminate(immediately = false) {
        if (immediately) {
          this.#rejectWorkerPromise?.(new Error("Worker terminated"));
        }
        this.dispose();
      }
      set onmessage(listener) {
        void this.#workerPromise.then((worker) => {
          worker.onmessage = listener;
        });
      }
      set onerror(listener) {
        void this.#workerPromise.then((worker) => {
          worker.onerror = listener;
        });
      }
    };
    HOST_RUNTIME$1 = {
      createWorker(url) {
        return new WebWorker2(url);
      },
      workerScope: new WebWorkerScope()
    };
    HostRuntime = /* @__PURE__ */ Object.freeze({
      __proto__: null,
      HOST_RUNTIME: HOST_RUNTIME$1
    });
    browser = /* @__PURE__ */ Object.freeze({
      __proto__: null,
      HostRuntime
    });
    IS_NODE = typeof process !== "undefined" && process.versions?.node !== null;
    IS_BROWSER = typeof window !== "undefined" || typeof self !== "undefined" && typeof self.postMessage === "function";
    HOST_RUNTIME = await (async () => {
      if (IS_NODE) {
        return (await Promise.resolve().then(function() {
          return node;
        })).HostRuntime.HOST_RUNTIME;
      }
      if (IS_BROWSER) {
        return (await Promise.resolve().then(function() {
          return browser;
        })).HostRuntime.HOST_RUNTIME;
      }
      throw new Error("Unknown runtime!");
    })();
    Multimap2 = class {
      map = /* @__PURE__ */ new Map();
      set(key, value) {
        let set = this.map.get(key);
        if (!set) {
          set = /* @__PURE__ */ new Set();
          this.map.set(key, set);
        }
        set.add(value);
      }
      get(key) {
        return this.map.get(key) || /* @__PURE__ */ new Set();
      }
      has(key) {
        return this.map.has(key);
      }
      hasValue(key, value) {
        const set = this.map.get(key);
        if (!set) {
          return false;
        }
        return set.has(value);
      }
      get size() {
        return this.map.size;
      }
      delete(key, value) {
        const values = this.get(key);
        if (!values) {
          return false;
        }
        const result = values.delete(value);
        if (!values.size) {
          this.map.delete(key);
        }
        return result;
      }
      deleteAll(key) {
        this.map.delete(key);
      }
      keysArray() {
        return [...this.map.keys()];
      }
      keys() {
        return this.map.keys();
      }
      valuesArray() {
        const result = [];
        for (const set of this.map.values()) {
          result.push(...set.values());
        }
        return result;
      }
      clear() {
        this.map.clear();
      }
    };
    ADDITIONAL_TEXT_MIME_TYPES = /* @__PURE__ */ new Set([
      "application/ecmascript",
      "application/javascript",
      "application/json",
      "application/json+protobuf",
      "application/mpegurl",
      "application/vnd.apple.mpegurl",
      "application/vnd.dart",
      "application/xml",
      "application/x-aspx",
      "application/x-javascript",
      "application/x-jsp",
      "application/x-httpd-php",
      "application/x-mpegurl",
      "audio/mpegurl",
      "audio/x-mpegurl"
    ]);
    clamp$1 = (num, min, max) => {
      let clampedNumber = num;
      if (num < min) {
        clampedNumber = min;
      } else if (num > max) {
        clampedNumber = max;
      }
      return clampedNumber;
    };
    floor2 = (value, precision = 0) => {
      if (precision > 0 && precision < 1) {
        precision = 1 / precision;
        return Math.floor(value / precision) * precision;
      }
      const mult = Math.pow(10, precision);
      return Math.floor(value * mult) / mult;
    };
    escapeCharacters = (inputString, charsToEscape) => {
      let foundChar = false;
      for (let i = 0; i < charsToEscape.length; ++i) {
        if (inputString.indexOf(charsToEscape.charAt(i)) !== -1) {
          foundChar = true;
          break;
        }
      }
      if (!foundChar) {
        return String(inputString);
      }
      let result = "";
      for (let i = 0; i < inputString.length; ++i) {
        if (charsToEscape.indexOf(inputString.charAt(i)) !== -1) {
          result += "\\";
        }
        result += inputString.charAt(i);
      }
      return result;
    };
    sprintf = (fmt, ...args2) => {
      let argIndex = 0;
      const RE2 = /%(?:(\d+)\$)?(?:\.(\d*))?([%dfs])/g;
      return fmt.replaceAll(RE2, (_, index2, precision, specifier) => {
        if (specifier === "%") {
          return "%";
        }
        if (index2 !== void 0) {
          argIndex = parseInt(index2, 10) - 1;
          if (argIndex < 0) {
            throw new RangeError(`Invalid parameter index ${argIndex + 1}`);
          }
        }
        if (argIndex >= args2.length) {
          throw new RangeError(`Expected at least ${argIndex + 1} format parameters, but only ${args2.length} where given.`);
        }
        if (specifier === "s") {
          const argValue2 = String(args2[argIndex++]);
          if (precision !== void 0) {
            return argValue2.substring(0, Number(precision));
          }
          return argValue2;
        }
        let argValue = Number(args2[argIndex++]);
        if (isNaN(argValue)) {
          argValue = 0;
        }
        if (specifier === "d") {
          return String(Math.floor(argValue)).padStart(Number(precision), "0");
        }
        if (precision !== void 0) {
          return argValue.toFixed(Number(precision));
        }
        return String(argValue);
      });
    };
    findIndexesOfSubString = (inputString, searchString) => {
      const matches = [];
      let i = inputString.indexOf(searchString);
      while (i !== -1) {
        matches.push(i);
        i = inputString.indexOf(searchString, i + searchString.length);
      }
      return matches;
    };
    findLineEndingIndexes = (inputString) => {
      const endings = findIndexesOfSubString(inputString, "\n");
      endings.push(inputString.length);
      return endings;
    };
    trimURL = (url, baseURLDomain) => {
      let result = url.replace(/^(https|http|file):\/\//i, "");
      if (baseURLDomain) {
        if (result.toLowerCase().startsWith(baseURLDomain.toLowerCase())) {
          result = result.substr(baseURLDomain.length);
        }
      }
      return result;
    };
    removeURLFragment = (inputStr) => {
      const url = new URL(inputStr);
      url.hash = "";
      return url.toString();
    };
    SPECIAL_REGEX_CHARACTERS = "^[]{}()\\.^$*+?|-,";
    regexSpecialCharacters = function() {
      return SPECIAL_REGEX_CHARACTERS;
    };
    createSearchRegex = function(query, caseSensitive, isRegex, matchWholeWord = false) {
      const regexFlags = caseSensitive ? "g" : "gi";
      let regexObject;
      if (isRegex) {
        try {
          regexObject = new RegExp(query, regexFlags);
        } catch {
        }
      }
      if (!regexObject) {
        regexObject = createPlainTextSearchRegex(query, regexFlags);
      }
      if (matchWholeWord && regexObject) {
        regexObject = new RegExp(`\\b${regexObject.source}\\b`, regexFlags);
      }
      return regexObject;
    };
    hashCode = function(string2) {
      if (!string2) {
        return 0;
      }
      const p = (1 << 30) * 4 - 5;
      const z2 = 1345575271;
      const z22 = 1506996573;
      let s = 0;
      let zi = 1;
      for (let i = 0; i < string2.length; i++) {
        const xi = string2.charCodeAt(i) * z22;
        s = (s + zi * xi) % p;
        zi = zi * z2 % p;
      }
      s = (s + zi * (p - 1)) % p;
      return Math.abs(s | 0);
    };
    compare = (a, b) => {
      if (a > b) {
        return 1;
      }
      if (a < b) {
        return -1;
      }
      return 0;
    };
    trimEndWithMaxLength = (str, maxLength) => {
      if (str.length <= maxLength) {
        return str;
      }
      const ellipsis = "\u2026";
      const ellipsisLength = 1;
      const segmenter2 = new Intl.Segmenter(void 0, { granularity: "grapheme" });
      const iterator2 = segmenter2.segment(str)[Symbol.iterator]();
      let lastSegmentIndex = 0;
      for (let i = 0; i <= maxLength - ellipsisLength; i++) {
        const result = iterator2.next();
        if (result.done) {
          return str;
        }
        lastSegmentIndex = result.value.index;
      }
      for (let i = 0; i < ellipsisLength; i++) {
        if (iterator2.next().done) {
          return str;
        }
      }
      return str.slice(0, lastSegmentIndex) + ellipsis;
    };
    escapeForRegExp = (str) => {
      return escapeCharacters(str, SPECIAL_REGEX_CHARACTERS);
    };
    createPlainTextSearchRegex = function(query, flags) {
      let regex2 = "";
      for (let i = 0; i < query.length; ++i) {
        const c = query.charAt(i);
        if (regexSpecialCharacters().indexOf(c) !== -1) {
          regex2 += "\\";
        }
        regex2 += c;
      }
      return new RegExp(regex2, flags);
    };
    WORD = /[A-Z]{2,}(?=[A-Z0-9][a-z0-9]+|\b|_)|[A-Za-z][0-9]+[a-z]?|[A-Z]?[a-z]+|[0-9][A-Za-z]+|[A-Z]|[0-9]+|[.]/g;
    toKebabCase = function(input) {
      return input.match?.(WORD)?.map((w) => w.toLowerCase()).join("-").replaceAll("-.-", ".") || input;
    };
    stringifyWithPrecision = function stringifyWithPrecision2(s, precision = 2) {
      if (precision === 0) {
        return s.toFixed(0);
      }
      const string2 = s.toFixed(precision).replace(/\.?0*$/, "");
      return string2 === "-0" ? "0" : string2;
    };
    concatBase64 = function(lhs, rhs) {
      if (lhs.length === 0 || !lhs.endsWith("=")) {
        return lhs + rhs;
      }
      const lhsLeaveAsIs = lhs.substring(0, lhs.length - 4);
      const lhsToDecode = lhs.substring(lhs.length - 4);
      return lhsLeaveAsIs + globalThis.btoa(globalThis.atob(lhsToDecode) + globalThis.atob(rhs));
    };
    LocalizedEmptyString = "";
    UIString = /* @__PURE__ */ Object.freeze({
      __proto__: null,
      LocalizedEmptyString
    });
    D50_X = 0.9642;
    D50_Y = 1;
    D50_Z = 0.8251;
    Vector3 = class {
      values = [0, 0, 0];
      constructor(values) {
        if (values) {
          this.values = values;
        }
      }
    };
    Matrix3x3 = class {
      values = [
        [0, 0, 0],
        [0, 0, 0],
        [0, 0, 0]
      ];
      constructor(values) {
        if (values) {
          this.values = values;
        }
      }
      multiply(other) {
        const dst = new Vector3();
        for (let row = 0; row < 3; ++row) {
          dst.values[row] = this.values[row][0] * other.values[0] + this.values[row][1] * other.values[1] + this.values[row][2] * other.values[2];
        }
        return dst;
      }
    };
    TransferFunction = class {
      g;
      a;
      b;
      c;
      d;
      e;
      f;
      constructor(g, a, b = 0, c = 0, d = 0, e = 0, f = 0) {
        this.g = g;
        this.a = a;
        this.b = b;
        this.c = c;
        this.d = d;
        this.e = e;
        this.f = f;
      }
      eval(val) {
        const sign = val < 0 ? -1 : 1;
        const abs = val * sign;
        if (abs < this.d) {
          return sign * (this.c * abs + this.f);
        }
        return sign * (Math.pow(this.a * abs + this.b, this.g) + this.e);
      }
    };
    NAMED_TRANSFER_FN = {
      sRGB: new TransferFunction(2.4, 1 / 1.055, 0.055 / 1.055, 1 / 12.92, 0.04045, 0, 0),
      sRGB_INVERSE: new TransferFunction(0.416667, 1.13728, -0, 12.92, 31308e-7, -0.0549698, -0),
      proPhotoRGB: new TransferFunction(1.8, 1),
      proPhotoRGB_INVERSE: new TransferFunction(0.555556, 1, -0, 0, 0, 0, 0),
      k2Dot2: new TransferFunction(2.2, 1),
      k2Dot2_INVERSE: new TransferFunction(0.454545, 1),
      rec2020: new TransferFunction(2.22222, 0.909672, 0.0903276, 0.222222, 0.0812429, 0, 0),
      rec2020_INVERSE: new TransferFunction(0.45, 1.23439, -0, 4.5, 0.018054, -0.0993195, -0)
    };
    NAMED_GAMUTS = {
      sRGB: new Matrix3x3([
        [0.436065674, 0.385147095, 0.143066406],
        [0.222488403, 0.716873169, 0.06060791],
        [0.013916016, 0.097076416, 0.714096069]
      ]),
      sRGB_INVERSE: new Matrix3x3([
        [3.134112151374599, -1.6173924597114966, -0.4906334036481285],
        [-0.9787872938826594, 1.9162795854799963, 0.0334547139520088],
        [0.07198304248352326, -0.2289858493321844, 1.4053851325241447]
      ]),
      displayP3: new Matrix3x3([
        [0.515102, 0.291965, 0.157153],
        [0.241182, 0.692236, 0.0665819],
        [-104941e-8, 0.0418818, 0.784378]
      ]),
      displayP3_INVERSE: new Matrix3x3([
        [2.404045155982687, -0.9898986932663839, -0.3976317191366333],
        [-0.8422283799266768, 1.7988505115115485, 0.016048170293157416],
        [0.04818705979712955, -0.09737385156228891, 1.2735066448052303]
      ]),
      adobeRGB: new Matrix3x3([
        [0.60974, 0.20528, 0.14919],
        [0.31111, 0.62567, 0.06322],
        [0.01947, 0.06087, 0.74457]
      ]),
      adobeRGB_INVERSE: new Matrix3x3([
        [1.9625385510109137, -0.6106892546501431, -0.3413827467482388],
        [-0.9787580455521, 1.9161624707082339, 0.03341676594241408],
        [0.028696263137883395, -0.1406807819331586, 1.349252109991369]
      ]),
      rec2020: new Matrix3x3([
        [0.673459, 0.165661, 0.1251],
        [0.279033, 0.675338, 0.0456288],
        [-193139e-8, 0.0299794, 0.797162]
      ]),
      rec2020_INVERSE: new Matrix3x3([
        [1.647275201661012, -0.3936024771460771, -0.23598028884792507],
        [-0.6826176165196962, 1.647617775014935, 0.01281626807852422],
        [0.029662725298529837, -0.06291668721366285, 1.2533964313435522]
      ])
    };
    OKLAB_TO_LMS_MATRIX = new Matrix3x3([
      [0.9999999984505198, 0.39633779217376786, 0.2158037580607588],
      [1.0000000088817609, -0.10556134232365635, -0.06385417477170591],
      [1.0000000546724108, -0.08948418209496575, -1.2914855378640917]
    ]);
    LMS_TO_OKLAB_MATRIX = new Matrix3x3([
      [0.2104542553, 0.7936177849999999, -0.0040720468],
      [1.9779984951000003, -2.4285922049999997, 0.4505937099000001],
      [0.025904037099999982, 0.7827717662, -0.8086757660000001]
    ]);
    XYZ_TO_LMS_MATRIX = new Matrix3x3([
      [0.8190224432164319, 0.3619062562801221, -0.12887378261216414],
      [0.0329836671980271, 0.9292868468965546, 0.03614466816999844],
      [0.048177199566046255, 0.26423952494422764, 0.6335478258136937]
    ]);
    LMS_TO_XYZ_MATRIX = new Matrix3x3([
      [1.226879873374156, -0.5578149965554814, 0.2813910501772159],
      [-0.040575762624313734, 1.1122868293970596, -0.07171106666151703],
      [-0.07637294974672144, -0.4214933239627915, 1.586924024427242]
    ]);
    PRO_PHOTO_TO_XYZD50_MATRIX = new Matrix3x3([
      [0.7976700747153241, 0.13519395152800417, 0.03135596341127167],
      [0.28803902352472205, 0.7118744007923554, 8661179538844252e-20],
      [2739876695467402e-22, -14405226518969991e-22, 0.825211112593861]
    ]);
    XYZD50_TO_PRO_PHOTO_MATRIX = new Matrix3x3([
      [1.3459533710138858, -0.25561367037652133, -0.051116041522131374],
      [-0.544600415668951, 1.5081687311475767, 0.020535163968720935],
      [-13975622054109725e-22, 2717590904589903e-21, 1.2118111696814942]
    ]);
    XYZD65_TO_XYZD50_MATRIX = new Matrix3x3([
      [1.0478573189120088, 0.022907374491829943, -0.050162247377152525],
      [0.029570500050499514, 0.9904755577034089, -0.017061518194840468],
      [-0.00924047197558879, 0.015052921526981566, 0.7519708530777581]
    ]);
    XYZD50_TO_XYZD65_MATRIX = new Matrix3x3([
      [0.9555366447632887, -0.02306009252137888, 0.06321844147263304],
      [-0.028315378228764922, 1.009951351591575, 0.021026001591792402],
      [0.012308773293784308, -0.02050053471777469, 1.3301947294775631]
    ]);
    ColorConverter = class _ColorConverter {
      static labToXyzd50(l, a, b) {
        let y = (l + 16) / 116;
        let x = y + a / 500;
        let z2 = y - b / 200;
        function labInverseTransferFunction(t) {
          const delta = 24 / 116;
          if (t <= delta) {
            return 108 / 841 * (t - 16 / 116);
          }
          return t * t * t;
        }
        x = labInverseTransferFunction(x) * D50_X;
        y = labInverseTransferFunction(y) * D50_Y;
        z2 = labInverseTransferFunction(z2) * D50_Z;
        return [x, y, z2];
      }
      static xyzd50ToLab(x, y, z2) {
        function labTransferFunction(t) {
          const deltaLimit = 24 / 116 * (24 / 116) * (24 / 116);
          if (t <= deltaLimit) {
            return 841 / 108 * t + 16 / 116;
          }
          return Math.pow(t, 1 / 3);
        }
        x = labTransferFunction(x / D50_X);
        y = labTransferFunction(y / D50_Y);
        z2 = labTransferFunction(z2 / D50_Z);
        const l = 116 * y - 16;
        const a = 500 * (x - y);
        const b = 200 * (y - z2);
        return [l, a, b];
      }
      static oklabToXyzd65(l, a, b) {
        const labInput = new Vector3([l, a, b]);
        const lmsIntermediate = OKLAB_TO_LMS_MATRIX.multiply(labInput);
        lmsIntermediate.values[0] = lmsIntermediate.values[0] * lmsIntermediate.values[0] * lmsIntermediate.values[0];
        lmsIntermediate.values[1] = lmsIntermediate.values[1] * lmsIntermediate.values[1] * lmsIntermediate.values[1];
        lmsIntermediate.values[2] = lmsIntermediate.values[2] * lmsIntermediate.values[2] * lmsIntermediate.values[2];
        const xyzOutput = LMS_TO_XYZ_MATRIX.multiply(lmsIntermediate);
        return xyzOutput.values;
      }
      static xyzd65ToOklab(x, y, z2) {
        const xyzInput = new Vector3([x, y, z2]);
        const lmsIntermediate = XYZ_TO_LMS_MATRIX.multiply(xyzInput);
        lmsIntermediate.values[0] = Math.pow(lmsIntermediate.values[0], 1 / 3);
        lmsIntermediate.values[1] = Math.pow(lmsIntermediate.values[1], 1 / 3);
        lmsIntermediate.values[2] = Math.pow(lmsIntermediate.values[2], 1 / 3);
        const labOutput = LMS_TO_OKLAB_MATRIX.multiply(lmsIntermediate);
        return [labOutput.values[0], labOutput.values[1], labOutput.values[2]];
      }
      static lchToLab(l, c, h) {
        if (h === void 0) {
          return [l, 0, 0];
        }
        return [l, c * Math.cos(degToRad(h)), c * Math.sin(degToRad(h))];
      }
      static labToLch(l, a, b) {
        return [l, Math.sqrt(a * a + b * b), radToDeg(Math.atan2(b, a))];
      }
      static displayP3ToXyzd50(r, g, b) {
        const [mappedR, mappedG, mappedB] = applyTransferFns(NAMED_TRANSFER_FN.sRGB, r, g, b);
        const rgbInput = new Vector3([mappedR, mappedG, mappedB]);
        const xyzOutput = NAMED_GAMUTS.displayP3.multiply(rgbInput);
        return xyzOutput.values;
      }
      static xyzd50ToDisplayP3(x, y, z2) {
        const xyzInput = new Vector3([x, y, z2]);
        const rgbOutput = NAMED_GAMUTS.displayP3_INVERSE.multiply(xyzInput);
        return applyTransferFns(NAMED_TRANSFER_FN.sRGB_INVERSE, rgbOutput.values[0], rgbOutput.values[1], rgbOutput.values[2]);
      }
      static proPhotoToXyzd50(r, g, b) {
        const [mappedR, mappedG, mappedB] = applyTransferFns(NAMED_TRANSFER_FN.proPhotoRGB, r, g, b);
        const rgbInput = new Vector3([mappedR, mappedG, mappedB]);
        const xyzOutput = PRO_PHOTO_TO_XYZD50_MATRIX.multiply(rgbInput);
        return xyzOutput.values;
      }
      static xyzd50ToProPhoto(x, y, z2) {
        const xyzInput = new Vector3([x, y, z2]);
        const rgbOutput = XYZD50_TO_PRO_PHOTO_MATRIX.multiply(xyzInput);
        return applyTransferFns(NAMED_TRANSFER_FN.proPhotoRGB_INVERSE, rgbOutput.values[0], rgbOutput.values[1], rgbOutput.values[2]);
      }
      static adobeRGBToXyzd50(r, g, b) {
        const [mappedR, mappedG, mappedB] = applyTransferFns(NAMED_TRANSFER_FN.k2Dot2, r, g, b);
        const rgbInput = new Vector3([mappedR, mappedG, mappedB]);
        const xyzOutput = NAMED_GAMUTS.adobeRGB.multiply(rgbInput);
        return xyzOutput.values;
      }
      static xyzd50ToAdobeRGB(x, y, z2) {
        const xyzInput = new Vector3([x, y, z2]);
        const rgbOutput = NAMED_GAMUTS.adobeRGB_INVERSE.multiply(xyzInput);
        return applyTransferFns(NAMED_TRANSFER_FN.k2Dot2_INVERSE, rgbOutput.values[0], rgbOutput.values[1], rgbOutput.values[2]);
      }
      static rec2020ToXyzd50(r, g, b) {
        const [mappedR, mappedG, mappedB] = applyTransferFns(NAMED_TRANSFER_FN.rec2020, r, g, b);
        const rgbInput = new Vector3([mappedR, mappedG, mappedB]);
        const xyzOutput = NAMED_GAMUTS.rec2020.multiply(rgbInput);
        return xyzOutput.values;
      }
      static xyzd50ToRec2020(x, y, z2) {
        const xyzInput = new Vector3([x, y, z2]);
        const rgbOutput = NAMED_GAMUTS.rec2020_INVERSE.multiply(xyzInput);
        return applyTransferFns(NAMED_TRANSFER_FN.rec2020_INVERSE, rgbOutput.values[0], rgbOutput.values[1], rgbOutput.values[2]);
      }
      static xyzd50ToD65(x, y, z2) {
        const xyzInput = new Vector3([x, y, z2]);
        const xyzOutput = XYZD50_TO_XYZD65_MATRIX.multiply(xyzInput);
        return xyzOutput.values;
      }
      static xyzd65ToD50(x, y, z2) {
        const xyzInput = new Vector3([x, y, z2]);
        const xyzOutput = XYZD65_TO_XYZD50_MATRIX.multiply(xyzInput);
        return xyzOutput.values;
      }
      static xyzd50TosRGBLinear(x, y, z2) {
        const xyzInput = new Vector3([x, y, z2]);
        const rgbResult = NAMED_GAMUTS.sRGB_INVERSE.multiply(xyzInput);
        return rgbResult.values;
      }
      static srgbLinearToXyzd50(r, g, b) {
        const rgbInput = new Vector3([r, g, b]);
        const xyzOutput = NAMED_GAMUTS.sRGB.multiply(rgbInput);
        return xyzOutput.values;
      }
      static srgbToXyzd50(r, g, b) {
        const [mappedR, mappedG, mappedB] = applyTransferFns(NAMED_TRANSFER_FN.sRGB, r, g, b);
        const rgbInput = new Vector3([mappedR, mappedG, mappedB]);
        const xyzOutput = NAMED_GAMUTS.sRGB.multiply(rgbInput);
        return xyzOutput.values;
      }
      static xyzd50ToSrgb(x, y, z2) {
        const xyzInput = new Vector3([x, y, z2]);
        const rgbOutput = NAMED_GAMUTS.sRGB_INVERSE.multiply(xyzInput);
        return applyTransferFns(NAMED_TRANSFER_FN.sRGB_INVERSE, rgbOutput.values[0], rgbOutput.values[1], rgbOutput.values[2]);
      }
      static oklchToXyzd50(lInput, c, h) {
        const [l, a, b] = _ColorConverter.lchToLab(lInput, c, h);
        const [x65, y65, z65] = _ColorConverter.oklabToXyzd65(l, a, b);
        return _ColorConverter.xyzd65ToD50(x65, y65, z65);
      }
      static xyzd50ToOklch(x, y, z2) {
        const [x65, y65, z65] = _ColorConverter.xyzd50ToD65(x, y, z2);
        const [l, a, b] = _ColorConverter.xyzd65ToOklab(x65, y65, z65);
        return _ColorConverter.labToLch(l, a, b);
      }
    };
    ColorConverter$1 = /* @__PURE__ */ Object.freeze({
      __proto__: null,
      ColorConverter
    });
    mainTRC = 2.4;
    normBgExp = 0.56;
    normFgExp = 0.57;
    revBgExp = 0.65;
    revFgExp = 0.62;
    blkThrs = 0.022;
    blkClmp = 1.414;
    scaleBoW = 1.14;
    scaleWoB = 1.14;
    loConOffset = 0.027;
    loClip = 0.1;
    deltaLuminanceMin = 5e-4;
    contrastAPCALookupTable = [
      [12, -1, -1, -1, -1, 100, 90, 80, -1, -1],
      [14, -1, -1, -1, 100, 90, 80, 60, 60, -1],
      [16, -1, -1, 100, 90, 80, 60, 55, 50, 50],
      [18, -1, -1, 90, 80, 60, 55, 50, 40, 40],
      [24, -1, 100, 80, 60, 55, 50, 40, 38, 35],
      [30, -1, 90, 70, 55, 50, 40, 38, 35, 40],
      [36, -1, 80, 60, 50, 40, 38, 35, 30, 25],
      [48, 100, 70, 55, 40, 38, 35, 30, 25, 20],
      [60, 90, 60, 50, 38, 35, 30, 25, 20, 20],
      [72, 80, 55, 40, 35, 30, 25, 20, 20, 20],
      [96, 70, 50, 35, 30, 25, 20, 20, 20, 20],
      [120, 60, 40, 30, 25, 20, 20, 20, 20, 20]
    ];
    contrastAPCALookupTable.reverse();
    contrastThresholds = {
      largeFont: { aa: 3, aaa: 4.5 },
      normalFont: { aa: 4.5, aaa: 7 }
    };
    ColorUtils = /* @__PURE__ */ Object.freeze({
      __proto__: null,
      blendColors,
      contrastRatio,
      contrastRatioAPCA,
      contrastRatioByLuminanceAPCA,
      desiredLuminanceAPCA,
      getAPCAThreshold,
      getContrastThreshold,
      isLargeFont,
      luminance,
      luminanceAPCA,
      rgbToHsl,
      rgbToHwb,
      rgbaToHsla,
      rgbaToHwba
    });
    EPSILON = 0.01;
    WIDE_RANGE_EPSILON = 1;
    Lab = class _Lab {
      l;
      a;
      b;
      alpha;
      #authoredText;
      #rawParams;
      channels = ["l", "a", "b", "alpha"];
      static #conversions = {
        ["hex"]: (self2) => new Legacy(self2.#getRGBArray(false), "hex"),
        ["hexa"]: (self2) => new Legacy(self2.#getRGBArray(true), "hexa"),
        ["rgb"]: (self2) => new Legacy(self2.#getRGBArray(false), "rgb"),
        ["rgba"]: (self2) => new Legacy(self2.#getRGBArray(true), "rgba"),
        ["hsl"]: (self2) => new HSL(...rgbToHsl(self2.#getRGBArray(false)), self2.alpha),
        ["hsla"]: (self2) => new HSL(...rgbToHsl(self2.#getRGBArray(false)), self2.alpha),
        ["hwb"]: (self2) => new HWB(...rgbToHwb(self2.#getRGBArray(false)), self2.alpha),
        ["hwba"]: (self2) => new HWB(...rgbToHwb(self2.#getRGBArray(false)), self2.alpha),
        ["lch"]: (self2) => new LCH(...ColorConverter.labToLch(self2.l, self2.a, self2.b), self2.alpha),
        ["oklch"]: (self2) => new Oklch(...ColorConverter.xyzd50ToOklch(...self2.#toXyzd50()), self2.alpha),
        ["lab"]: (self2) => self2,
        ["oklab"]: (self2) => new Oklab(...ColorConverter.xyzd65ToOklab(...ColorConverter.xyzd50ToD65(...self2.#toXyzd50())), self2.alpha),
        ["srgb"]: (self2) => new ColorFunction("srgb", ...ColorConverter.xyzd50ToSrgb(...self2.#toXyzd50()), self2.alpha),
        ["srgb-linear"]: (self2) => new ColorFunction("srgb-linear", ...ColorConverter.xyzd50TosRGBLinear(...self2.#toXyzd50()), self2.alpha),
        ["display-p3"]: (self2) => new ColorFunction("display-p3", ...ColorConverter.xyzd50ToDisplayP3(...self2.#toXyzd50()), self2.alpha),
        ["a98-rgb"]: (self2) => new ColorFunction("a98-rgb", ...ColorConverter.xyzd50ToAdobeRGB(...self2.#toXyzd50()), self2.alpha),
        ["prophoto-rgb"]: (self2) => new ColorFunction("prophoto-rgb", ...ColorConverter.xyzd50ToProPhoto(...self2.#toXyzd50()), self2.alpha),
        ["rec2020"]: (self2) => new ColorFunction("rec2020", ...ColorConverter.xyzd50ToRec2020(...self2.#toXyzd50()), self2.alpha),
        ["xyz"]: (self2) => new ColorFunction("xyz", ...ColorConverter.xyzd50ToD65(...self2.#toXyzd50()), self2.alpha),
        ["xyz-d50"]: (self2) => new ColorFunction("xyz-d50", ...self2.#toXyzd50(), self2.alpha),
        ["xyz-d65"]: (self2) => new ColorFunction("xyz-d65", ...ColorConverter.xyzd50ToD65(...self2.#toXyzd50()), self2.alpha)
      };
      #toXyzd50() {
        return ColorConverter.labToXyzd50(this.l, this.a, this.b);
      }
      #getRGBArray(withAlpha = true) {
        const params = ColorConverter.xyzd50ToSrgb(...this.#toXyzd50());
        if (withAlpha) {
          return [...params, this.alpha ?? void 0];
        }
        return params;
      }
      constructor(l, a, b, alpha, authoredText) {
        this.#rawParams = [l, a, b];
        this.l = clamp2(l, { min: 0, max: 100 });
        if (equals(this.l, 0, WIDE_RANGE_EPSILON) || equals(this.l, 100, WIDE_RANGE_EPSILON)) {
          a = b = 0;
        }
        this.a = a;
        this.b = b;
        this.alpha = clamp2(alpha, { min: 0, max: 1 });
        this.#authoredText = authoredText;
      }
      is(format2) {
        return format2 === this.format();
      }
      as(format2) {
        return _Lab.#conversions[format2](this);
      }
      asLegacyColor() {
        return this.as("rgba");
      }
      equal(color) {
        const lab = color.as("lab");
        return equals(lab.l, this.l, WIDE_RANGE_EPSILON) && equals(lab.a, this.a) && equals(lab.b, this.b) && equals(lab.alpha, this.alpha);
      }
      format() {
        return "lab";
      }
      setAlpha(alpha) {
        return new _Lab(this.l, this.a, this.b, alpha, void 0);
      }
      asString(format2) {
        if (format2) {
          return this.as(format2).asString();
        }
        return this.#stringify(this.l, this.a, this.b);
      }
      #stringify(l, a, b) {
        const alpha = this.alpha === null || equals(this.alpha, 1) ? "" : ` / ${stringifyWithPrecision(this.alpha)}`;
        return `lab(${stringifyWithPrecision(l, 0)} ${stringifyWithPrecision(a)} ${stringifyWithPrecision(b)}${alpha})`;
      }
      getAuthoredText() {
        return this.#authoredText ?? null;
      }
      getRawParameters() {
        return [...this.#rawParams];
      }
      getAsRawString(format2) {
        if (format2) {
          return this.as(format2).getAsRawString();
        }
        return this.#stringify(...this.#rawParams);
      }
      isGamutClipped() {
        return false;
      }
      static fromSpec(spec, text) {
        const L = parsePercentage(spec[0], [0, 100]) ?? parseNumber(spec[0]);
        if (L === null) {
          return null;
        }
        const a = parsePercentage(spec[1], [0, 125]) ?? parseNumber(spec[1]);
        if (a === null) {
          return null;
        }
        const b = parsePercentage(spec[2], [0, 125]) ?? parseNumber(spec[2]);
        if (b === null) {
          return null;
        }
        const alpha = parseAlpha(spec[3]);
        return new _Lab(L, a, b, alpha, text);
      }
    };
    LCH = class _LCH {
      #rawParams;
      l;
      c;
      h;
      alpha;
      #authoredText;
      channels = ["l", "c", "h", "alpha"];
      static #conversions = {
        ["hex"]: (self2) => new Legacy(self2.#getRGBArray(false), "hex"),
        ["hexa"]: (self2) => new Legacy(self2.#getRGBArray(true), "hexa"),
        ["rgb"]: (self2) => new Legacy(self2.#getRGBArray(false), "rgb"),
        ["rgba"]: (self2) => new Legacy(self2.#getRGBArray(true), "rgba"),
        ["hsl"]: (self2) => new HSL(...rgbToHsl(self2.#getRGBArray(false)), self2.alpha),
        ["hsla"]: (self2) => new HSL(...rgbToHsl(self2.#getRGBArray(false)), self2.alpha),
        ["hwb"]: (self2) => new HWB(...rgbToHwb(self2.#getRGBArray(false)), self2.alpha),
        ["hwba"]: (self2) => new HWB(...rgbToHwb(self2.#getRGBArray(false)), self2.alpha),
        ["lch"]: (self2) => self2,
        ["oklch"]: (self2) => new Oklch(...ColorConverter.xyzd50ToOklch(...self2.#toXyzd50()), self2.alpha),
        ["lab"]: (self2) => new Lab(...ColorConverter.lchToLab(self2.l, self2.c, self2.h), self2.alpha),
        ["oklab"]: (self2) => new Oklab(...ColorConverter.xyzd65ToOklab(...ColorConverter.xyzd50ToD65(...self2.#toXyzd50())), self2.alpha),
        ["srgb"]: (self2) => new ColorFunction("srgb", ...ColorConverter.xyzd50ToSrgb(...self2.#toXyzd50()), self2.alpha),
        ["srgb-linear"]: (self2) => new ColorFunction("srgb-linear", ...ColorConverter.xyzd50TosRGBLinear(...self2.#toXyzd50()), self2.alpha),
        ["display-p3"]: (self2) => new ColorFunction("display-p3", ...ColorConverter.xyzd50ToDisplayP3(...self2.#toXyzd50()), self2.alpha),
        ["a98-rgb"]: (self2) => new ColorFunction("a98-rgb", ...ColorConverter.xyzd50ToAdobeRGB(...self2.#toXyzd50()), self2.alpha),
        ["prophoto-rgb"]: (self2) => new ColorFunction("prophoto-rgb", ...ColorConverter.xyzd50ToProPhoto(...self2.#toXyzd50()), self2.alpha),
        ["rec2020"]: (self2) => new ColorFunction("rec2020", ...ColorConverter.xyzd50ToRec2020(...self2.#toXyzd50()), self2.alpha),
        ["xyz"]: (self2) => new ColorFunction("xyz", ...ColorConverter.xyzd50ToD65(...self2.#toXyzd50()), self2.alpha),
        ["xyz-d50"]: (self2) => new ColorFunction("xyz-d50", ...self2.#toXyzd50(), self2.alpha),
        ["xyz-d65"]: (self2) => new ColorFunction("xyz-d65", ...ColorConverter.xyzd50ToD65(...self2.#toXyzd50()), self2.alpha)
      };
      #toXyzd50() {
        return ColorConverter.labToXyzd50(...ColorConverter.lchToLab(this.l, this.c, this.h));
      }
      #getRGBArray(withAlpha = true) {
        const params = ColorConverter.xyzd50ToSrgb(...this.#toXyzd50());
        if (withAlpha) {
          return [...params, this.alpha ?? void 0];
        }
        return params;
      }
      constructor(l, c, h, alpha, authoredText) {
        this.#rawParams = [l, c, h];
        this.l = clamp2(l, { min: 0, max: 100 });
        c = equals(this.l, 0, WIDE_RANGE_EPSILON) || equals(this.l, 100, WIDE_RANGE_EPSILON) ? 0 : c;
        this.c = clamp2(c, { min: 0 });
        h = equals(c, 0) ? 0 : h;
        this.h = normalizeHue(h);
        this.alpha = clamp2(alpha, { min: 0, max: 1 });
        this.#authoredText = authoredText;
      }
      asLegacyColor() {
        return this.as("rgba");
      }
      is(format2) {
        return format2 === this.format();
      }
      as(format2) {
        return _LCH.#conversions[format2](this);
      }
      equal(color) {
        const lch = color.as("lch");
        return equals(lch.l, this.l, WIDE_RANGE_EPSILON) && equals(lch.c, this.c) && equals(lch.h, this.h) && equals(lch.alpha, this.alpha);
      }
      format() {
        return "lch";
      }
      setAlpha(alpha) {
        return new _LCH(this.l, this.c, this.h, alpha);
      }
      asString(format2) {
        if (format2) {
          return this.as(format2).asString();
        }
        return this.#stringify(this.l, this.c, this.h);
      }
      #stringify(l, c, h) {
        const alpha = this.alpha === null || equals(this.alpha, 1) ? "" : ` / ${stringifyWithPrecision(this.alpha)}`;
        return `lch(${stringifyWithPrecision(l, 0)} ${stringifyWithPrecision(c)} ${stringifyWithPrecision(h)}${alpha})`;
      }
      getAuthoredText() {
        return this.#authoredText ?? null;
      }
      getRawParameters() {
        return [...this.#rawParams];
      }
      getAsRawString(format2) {
        if (format2) {
          return this.as(format2).getAsRawString();
        }
        return this.#stringify(...this.#rawParams);
      }
      isGamutClipped() {
        return false;
      }
      isHuePowerless() {
        return equals(this.c, 0);
      }
      static fromSpec(spec, text) {
        const L = parsePercentage(spec[0], [0, 100]) ?? parseNumber(spec[0]);
        if (L === null) {
          return null;
        }
        const c = parsePercentage(spec[1], [0, 150]) ?? parseNumber(spec[1]);
        if (c === null) {
          return null;
        }
        const h = parseAngle(spec[2]);
        if (h === null) {
          return null;
        }
        const alpha = parseAlpha(spec[3]);
        return new _LCH(L, c, h, alpha, text);
      }
    };
    Oklab = class _Oklab {
      #rawParams;
      l;
      a;
      b;
      alpha;
      #authoredText;
      channels = ["l", "a", "b", "alpha"];
      static #conversions = {
        ["hex"]: (self2) => new Legacy(self2.#getRGBArray(false), "hex"),
        ["hexa"]: (self2) => new Legacy(self2.#getRGBArray(true), "hexa"),
        ["rgb"]: (self2) => new Legacy(self2.#getRGBArray(false), "rgb"),
        ["rgba"]: (self2) => new Legacy(self2.#getRGBArray(true), "rgba"),
        ["hsl"]: (self2) => new HSL(...rgbToHsl(self2.#getRGBArray(false)), self2.alpha),
        ["hsla"]: (self2) => new HSL(...rgbToHsl(self2.#getRGBArray(false)), self2.alpha),
        ["hwb"]: (self2) => new HWB(...rgbToHwb(self2.#getRGBArray(false)), self2.alpha),
        ["hwba"]: (self2) => new HWB(...rgbToHwb(self2.#getRGBArray(false)), self2.alpha),
        ["lch"]: (self2) => new LCH(...ColorConverter.labToLch(...ColorConverter.xyzd50ToLab(...self2.#toXyzd50())), self2.alpha),
        ["oklch"]: (self2) => new Oklch(...ColorConverter.xyzd50ToOklch(...self2.#toXyzd50()), self2.alpha),
        ["lab"]: (self2) => new Lab(...ColorConverter.xyzd50ToLab(...self2.#toXyzd50()), self2.alpha),
        ["oklab"]: (self2) => self2,
        ["srgb"]: (self2) => new ColorFunction("srgb", ...ColorConverter.xyzd50ToSrgb(...self2.#toXyzd50()), self2.alpha),
        ["srgb-linear"]: (self2) => new ColorFunction("srgb-linear", ...ColorConverter.xyzd50TosRGBLinear(...self2.#toXyzd50()), self2.alpha),
        ["display-p3"]: (self2) => new ColorFunction("display-p3", ...ColorConverter.xyzd50ToDisplayP3(...self2.#toXyzd50()), self2.alpha),
        ["a98-rgb"]: (self2) => new ColorFunction("a98-rgb", ...ColorConverter.xyzd50ToAdobeRGB(...self2.#toXyzd50()), self2.alpha),
        ["prophoto-rgb"]: (self2) => new ColorFunction("prophoto-rgb", ...ColorConverter.xyzd50ToProPhoto(...self2.#toXyzd50()), self2.alpha),
        ["rec2020"]: (self2) => new ColorFunction("rec2020", ...ColorConverter.xyzd50ToRec2020(...self2.#toXyzd50()), self2.alpha),
        ["xyz"]: (self2) => new ColorFunction("xyz", ...ColorConverter.xyzd50ToD65(...self2.#toXyzd50()), self2.alpha),
        ["xyz-d50"]: (self2) => new ColorFunction("xyz-d50", ...self2.#toXyzd50(), self2.alpha),
        ["xyz-d65"]: (self2) => new ColorFunction("xyz-d65", ...ColorConverter.xyzd50ToD65(...self2.#toXyzd50()), self2.alpha)
      };
      #toXyzd50() {
        return ColorConverter.xyzd65ToD50(...ColorConverter.oklabToXyzd65(this.l, this.a, this.b));
      }
      #getRGBArray(withAlpha = true) {
        const params = ColorConverter.xyzd50ToSrgb(...this.#toXyzd50());
        if (withAlpha) {
          return [...params, this.alpha ?? void 0];
        }
        return params;
      }
      constructor(l, a, b, alpha, authoredText) {
        this.#rawParams = [l, a, b];
        this.l = clamp2(l, { min: 0, max: 1 });
        if (equals(this.l, 0) || equals(this.l, 1)) {
          a = b = 0;
        }
        this.a = a;
        this.b = b;
        this.alpha = clamp2(alpha, { min: 0, max: 1 });
        this.#authoredText = authoredText;
      }
      asLegacyColor() {
        return this.as("rgba");
      }
      is(format2) {
        return format2 === this.format();
      }
      as(format2) {
        return _Oklab.#conversions[format2](this);
      }
      equal(color) {
        const oklab = color.as("oklab");
        return equals(oklab.l, this.l) && equals(oklab.a, this.a) && equals(oklab.b, this.b) && equals(oklab.alpha, this.alpha);
      }
      format() {
        return "oklab";
      }
      setAlpha(alpha) {
        return new _Oklab(this.l, this.a, this.b, alpha);
      }
      asString(format2) {
        if (format2) {
          return this.as(format2).asString();
        }
        return this.#stringify(this.l, this.a, this.b);
      }
      #stringify(l, a, b) {
        const alpha = this.alpha === null || equals(this.alpha, 1) ? "" : ` / ${stringifyWithPrecision(this.alpha)}`;
        return `oklab(${stringifyWithPrecision(l)} ${stringifyWithPrecision(a)} ${stringifyWithPrecision(b)}${alpha})`;
      }
      getAuthoredText() {
        return this.#authoredText ?? null;
      }
      getRawParameters() {
        return [...this.#rawParams];
      }
      getAsRawString(format2) {
        if (format2) {
          return this.as(format2).getAsRawString();
        }
        return this.#stringify(...this.#rawParams);
      }
      isGamutClipped() {
        return false;
      }
      static fromSpec(spec, text) {
        const L = parsePercentage(spec[0], [0, 1]) ?? parseNumber(spec[0]);
        if (L === null) {
          return null;
        }
        const a = parsePercentage(spec[1], [0, 0.4]) ?? parseNumber(spec[1]);
        if (a === null) {
          return null;
        }
        const b = parsePercentage(spec[2], [0, 0.4]) ?? parseNumber(spec[2]);
        if (b === null) {
          return null;
        }
        const alpha = parseAlpha(spec[3]);
        return new _Oklab(L, a, b, alpha, text);
      }
    };
    Oklch = class _Oklch {
      #rawParams;
      l;
      c;
      h;
      alpha;
      #authoredText;
      channels = ["l", "c", "h", "alpha"];
      static #conversions = {
        ["hex"]: (self2) => new Legacy(self2.#getRGBArray(false), "hex"),
        ["hexa"]: (self2) => new Legacy(self2.#getRGBArray(true), "hexa"),
        ["rgb"]: (self2) => new Legacy(self2.#getRGBArray(false), "rgb"),
        ["rgba"]: (self2) => new Legacy(self2.#getRGBArray(true), "rgba"),
        ["hsl"]: (self2) => new HSL(...rgbToHsl(self2.#getRGBArray(false)), self2.alpha),
        ["hsla"]: (self2) => new HSL(...rgbToHsl(self2.#getRGBArray(false)), self2.alpha),
        ["hwb"]: (self2) => new HWB(...rgbToHwb(self2.#getRGBArray(false)), self2.alpha),
        ["hwba"]: (self2) => new HWB(...rgbToHwb(self2.#getRGBArray(false)), self2.alpha),
        ["lch"]: (self2) => new LCH(...ColorConverter.labToLch(...ColorConverter.xyzd50ToLab(...self2.#toXyzd50())), self2.alpha),
        ["oklch"]: (self2) => self2,
        ["lab"]: (self2) => new Lab(...ColorConverter.xyzd50ToLab(...self2.#toXyzd50()), self2.alpha),
        ["oklab"]: (self2) => new Oklab(...ColorConverter.xyzd65ToOklab(...ColorConverter.xyzd50ToD65(...self2.#toXyzd50())), self2.alpha),
        ["srgb"]: (self2) => new ColorFunction("srgb", ...ColorConverter.xyzd50ToSrgb(...self2.#toXyzd50()), self2.alpha),
        ["srgb-linear"]: (self2) => new ColorFunction("srgb-linear", ...ColorConverter.xyzd50TosRGBLinear(...self2.#toXyzd50()), self2.alpha),
        ["display-p3"]: (self2) => new ColorFunction("display-p3", ...ColorConverter.xyzd50ToDisplayP3(...self2.#toXyzd50()), self2.alpha),
        ["a98-rgb"]: (self2) => new ColorFunction("a98-rgb", ...ColorConverter.xyzd50ToAdobeRGB(...self2.#toXyzd50()), self2.alpha),
        ["prophoto-rgb"]: (self2) => new ColorFunction("prophoto-rgb", ...ColorConverter.xyzd50ToProPhoto(...self2.#toXyzd50()), self2.alpha),
        ["rec2020"]: (self2) => new ColorFunction("rec2020", ...ColorConverter.xyzd50ToRec2020(...self2.#toXyzd50()), self2.alpha),
        ["xyz"]: (self2) => new ColorFunction("xyz", ...ColorConverter.xyzd50ToD65(...self2.#toXyzd50()), self2.alpha),
        ["xyz-d50"]: (self2) => new ColorFunction("xyz-d50", ...self2.#toXyzd50(), self2.alpha),
        ["xyz-d65"]: (self2) => new ColorFunction("xyz-d65", ...ColorConverter.xyzd50ToD65(...self2.#toXyzd50()), self2.alpha)
      };
      #toXyzd50() {
        return ColorConverter.oklchToXyzd50(this.l, this.c, this.h);
      }
      #getRGBArray(withAlpha = true) {
        const params = ColorConverter.xyzd50ToSrgb(...this.#toXyzd50());
        if (withAlpha) {
          return [...params, this.alpha ?? void 0];
        }
        return params;
      }
      constructor(l, c, h, alpha, authoredText) {
        this.#rawParams = [l, c, h];
        this.l = clamp2(l, { min: 0, max: 1 });
        c = equals(this.l, 0) || equals(this.l, 1) ? 0 : c;
        this.c = clamp2(c, { min: 0 });
        h = equals(c, 0) ? 0 : h;
        this.h = normalizeHue(h);
        this.alpha = clamp2(alpha, { min: 0, max: 1 });
        this.#authoredText = authoredText;
      }
      asLegacyColor() {
        return this.as("rgba");
      }
      is(format2) {
        return format2 === this.format();
      }
      as(format2) {
        return _Oklch.#conversions[format2](this);
      }
      equal(color) {
        const oklch = color.as("oklch");
        return equals(oklch.l, this.l) && equals(oklch.c, this.c) && equals(oklch.h, this.h) && equals(oklch.alpha, this.alpha);
      }
      format() {
        return "oklch";
      }
      setAlpha(alpha) {
        return new _Oklch(this.l, this.c, this.h, alpha);
      }
      asString(format2) {
        if (format2) {
          return this.as(format2).asString();
        }
        return this.#stringify(this.l, this.c, this.h);
      }
      #stringify(l, c, h) {
        const alpha = this.alpha === null || equals(this.alpha, 1) ? "" : ` / ${stringifyWithPrecision(this.alpha)}`;
        return `oklch(${stringifyWithPrecision(l)} ${stringifyWithPrecision(c)} ${stringifyWithPrecision(h)}${alpha})`;
      }
      getAuthoredText() {
        return this.#authoredText ?? null;
      }
      getRawParameters() {
        return [...this.#rawParams];
      }
      getAsRawString(format2) {
        if (format2) {
          return this.as(format2).getAsRawString();
        }
        return this.#stringify(...this.#rawParams);
      }
      isGamutClipped() {
        return false;
      }
      static fromSpec(spec, text) {
        const L = parsePercentage(spec[0], [0, 1]) ?? parseNumber(spec[0]);
        if (L === null) {
          return null;
        }
        const c = parsePercentage(spec[1], [0, 0.4]) ?? parseNumber(spec[1]);
        if (c === null) {
          return null;
        }
        const h = parseAngle(spec[2]);
        if (h === null) {
          return null;
        }
        const alpha = parseAlpha(spec[3]);
        return new _Oklch(L, c, h, alpha, text);
      }
    };
    ColorFunction = class _ColorFunction {
      #rawParams;
      p0;
      p1;
      p2;
      alpha;
      colorSpace;
      #authoredText;
      get channels() {
        return this.isXYZ() ? ["x", "y", "z", "alpha"] : ["r", "g", "b", "alpha"];
      }
      static #conversions = {
        ["hex"]: (self2) => new Legacy(self2.#getRGBArray(false), "hex"),
        ["hexa"]: (self2) => new Legacy(self2.#getRGBArray(true), "hexa"),
        ["rgb"]: (self2) => new Legacy(self2.#getRGBArray(false), "rgb"),
        ["rgba"]: (self2) => new Legacy(self2.#getRGBArray(true), "rgba"),
        ["hsl"]: (self2) => new HSL(...rgbToHsl(self2.#getRGBArray(false)), self2.alpha),
        ["hsla"]: (self2) => new HSL(...rgbToHsl(self2.#getRGBArray(false)), self2.alpha),
        ["hwb"]: (self2) => new HWB(...rgbToHwb(self2.#getRGBArray(false)), self2.alpha),
        ["hwba"]: (self2) => new HWB(...rgbToHwb(self2.#getRGBArray(false)), self2.alpha),
        ["lch"]: (self2) => new LCH(...ColorConverter.labToLch(...ColorConverter.xyzd50ToLab(...self2.#toXyzd50())), self2.alpha),
        ["oklch"]: (self2) => new Oklch(...ColorConverter.xyzd50ToOklch(...self2.#toXyzd50()), self2.alpha),
        ["lab"]: (self2) => new Lab(...ColorConverter.xyzd50ToLab(...self2.#toXyzd50()), self2.alpha),
        ["oklab"]: (self2) => new Oklab(...ColorConverter.xyzd65ToOklab(...ColorConverter.xyzd50ToD65(...self2.#toXyzd50())), self2.alpha),
        ["srgb"]: (self2) => new _ColorFunction("srgb", ...ColorConverter.xyzd50ToSrgb(...self2.#toXyzd50()), self2.alpha),
        ["srgb-linear"]: (self2) => new _ColorFunction("srgb-linear", ...ColorConverter.xyzd50TosRGBLinear(...self2.#toXyzd50()), self2.alpha),
        ["display-p3"]: (self2) => new _ColorFunction("display-p3", ...ColorConverter.xyzd50ToDisplayP3(...self2.#toXyzd50()), self2.alpha),
        ["a98-rgb"]: (self2) => new _ColorFunction("a98-rgb", ...ColorConverter.xyzd50ToAdobeRGB(...self2.#toXyzd50()), self2.alpha),
        ["prophoto-rgb"]: (self2) => new _ColorFunction("prophoto-rgb", ...ColorConverter.xyzd50ToProPhoto(...self2.#toXyzd50()), self2.alpha),
        ["rec2020"]: (self2) => new _ColorFunction("rec2020", ...ColorConverter.xyzd50ToRec2020(...self2.#toXyzd50()), self2.alpha),
        ["xyz"]: (self2) => new _ColorFunction("xyz", ...ColorConverter.xyzd50ToD65(...self2.#toXyzd50()), self2.alpha),
        ["xyz-d50"]: (self2) => new _ColorFunction("xyz-d50", ...self2.#toXyzd50(), self2.alpha),
        ["xyz-d65"]: (self2) => new _ColorFunction("xyz-d65", ...ColorConverter.xyzd50ToD65(...self2.#toXyzd50()), self2.alpha)
      };
      #toXyzd50() {
        const [p0, p1, p2] = this.#rawParams;
        switch (this.colorSpace) {
          case "srgb":
            return ColorConverter.srgbToXyzd50(p0, p1, p2);
          case "srgb-linear":
            return ColorConverter.srgbLinearToXyzd50(p0, p1, p2);
          case "display-p3":
            return ColorConverter.displayP3ToXyzd50(p0, p1, p2);
          case "a98-rgb":
            return ColorConverter.adobeRGBToXyzd50(p0, p1, p2);
          case "prophoto-rgb":
            return ColorConverter.proPhotoToXyzd50(p0, p1, p2);
          case "rec2020":
            return ColorConverter.rec2020ToXyzd50(p0, p1, p2);
          case "xyz-d50":
            return [p0, p1, p2];
          case "xyz":
          case "xyz-d65":
            return ColorConverter.xyzd65ToD50(p0, p1, p2);
        }
        throw new Error("Invalid color space");
      }
      #getRGBArray(withAlpha = true) {
        const [p0, p1, p2] = this.#rawParams;
        const params = this.colorSpace === "srgb" ? [p0, p1, p2] : [...ColorConverter.xyzd50ToSrgb(...this.#toXyzd50())];
        if (withAlpha) {
          return [...params, this.alpha ?? void 0];
        }
        return params;
      }
      constructor(colorSpace, p0, p1, p2, alpha, authoredText) {
        this.#rawParams = [p0, p1, p2];
        this.colorSpace = colorSpace;
        this.#authoredText = authoredText;
        if (this.colorSpace !== "xyz-d50" && this.colorSpace !== "xyz-d65" && this.colorSpace !== "xyz") {
          p0 = clamp2(p0, { min: 0, max: 1 });
          p1 = clamp2(p1, { min: 0, max: 1 });
          p2 = clamp2(p2, { min: 0, max: 1 });
        }
        this.p0 = p0;
        this.p1 = p1;
        this.p2 = p2;
        this.alpha = clamp2(alpha, { min: 0, max: 1 });
      }
      asLegacyColor() {
        return this.as("rgba");
      }
      is(format2) {
        return format2 === this.format();
      }
      as(format2) {
        if (this.colorSpace === format2) {
          return this;
        }
        return _ColorFunction.#conversions[format2](this);
      }
      equal(color) {
        const space = color.as(this.colorSpace);
        return equals(this.p0, space.p0) && equals(this.p1, space.p1) && equals(this.p2, space.p2) && equals(this.alpha, space.alpha);
      }
      format() {
        return this.colorSpace;
      }
      setAlpha(alpha) {
        return new _ColorFunction(this.colorSpace, this.p0, this.p1, this.p2, alpha);
      }
      asString(format2) {
        if (format2) {
          return this.as(format2).asString();
        }
        return this.#stringify(this.p0, this.p1, this.p2);
      }
      #stringify(p0, p1, p2) {
        const alpha = this.alpha === null || equals(this.alpha, 1) ? "" : ` / ${stringifyWithPrecision(this.alpha)}`;
        return `color(${this.colorSpace} ${stringifyWithPrecision(p0)} ${stringifyWithPrecision(p1)} ${stringifyWithPrecision(p2)}${alpha})`;
      }
      getAuthoredText() {
        return this.#authoredText ?? null;
      }
      getRawParameters() {
        return [...this.#rawParams];
      }
      getAsRawString(format2) {
        if (format2) {
          return this.as(format2).getAsRawString();
        }
        return this.#stringify(...this.#rawParams);
      }
      isGamutClipped() {
        if (this.colorSpace !== "xyz-d50" && this.colorSpace !== "xyz-d65" && this.colorSpace !== "xyz") {
          return !equals(this.#rawParams, [this.p0, this.p1, this.p2]);
        }
        return false;
      }
      isXYZ() {
        switch (this.colorSpace) {
          case "xyz":
          case "xyz-d50":
          case "xyz-d65":
            return true;
        }
        return false;
      }
      static fromSpec(authoredText, parametersWithAlphaText) {
        const [parametersText, alphaText] = parametersWithAlphaText.split("/", 2);
        const parameters = parametersText.trim().split(/\s+/);
        const [colorSpaceText, ...remainingParams] = parameters;
        const colorSpace = getColorSpace(colorSpaceText);
        if (!colorSpace) {
          return null;
        }
        if (remainingParams.length === 0 && alphaText === void 0) {
          return new _ColorFunction(colorSpace, 0, 0, 0, null, authoredText);
        }
        if (remainingParams.length === 0 && alphaText !== void 0 && alphaText.trim().split(/\s+/).length > 1) {
          return null;
        }
        if (remainingParams.length > 3) {
          return null;
        }
        const nonesReplacedParams = remainingParams.map((param) => param === "none" ? "0" : param);
        const values = nonesReplacedParams.map((param) => parsePercentOrNumber(param, [0, 1]));
        const containsNull = values.includes(null);
        if (containsNull) {
          return null;
        }
        const alphaValue = alphaText ? parsePercentOrNumber(alphaText, [0, 1]) ?? 1 : 1;
        const rgbOrXyza = [
          values[0] ?? 0,
          values[1] ?? 0,
          values[2] ?? 0,
          alphaValue
        ];
        return new _ColorFunction(colorSpace, ...rgbOrXyza, authoredText);
      }
    };
    HSL = class _HSL {
      h;
      s;
      l;
      alpha;
      #rawParams;
      #authoredText;
      channels = ["h", "s", "l", "alpha"];
      static #conversions = {
        ["hex"]: (self2) => new Legacy(self2.#getRGBArray(false), "hex"),
        ["hexa"]: (self2) => new Legacy(self2.#getRGBArray(true), "hexa"),
        ["rgb"]: (self2) => new Legacy(self2.#getRGBArray(false), "rgb"),
        ["rgba"]: (self2) => new Legacy(self2.#getRGBArray(true), "rgba"),
        ["hsl"]: (self2) => self2,
        ["hsla"]: (self2) => self2,
        ["hwb"]: (self2) => new HWB(...rgbToHwb(self2.#getRGBArray(false)), self2.alpha),
        ["hwba"]: (self2) => new HWB(...rgbToHwb(self2.#getRGBArray(false)), self2.alpha),
        ["lch"]: (self2) => new LCH(...ColorConverter.labToLch(...ColorConverter.xyzd50ToLab(...self2.#toXyzd50())), self2.alpha),
        ["oklch"]: (self2) => new Oklch(...ColorConverter.xyzd50ToOklch(...self2.#toXyzd50()), self2.alpha),
        ["lab"]: (self2) => new Lab(...ColorConverter.xyzd50ToLab(...self2.#toXyzd50()), self2.alpha),
        ["oklab"]: (self2) => new Oklab(...ColorConverter.xyzd65ToOklab(...ColorConverter.xyzd50ToD65(...self2.#toXyzd50())), self2.alpha),
        ["srgb"]: (self2) => new ColorFunction("srgb", ...ColorConverter.xyzd50ToSrgb(...self2.#toXyzd50()), self2.alpha),
        ["srgb-linear"]: (self2) => new ColorFunction("srgb-linear", ...ColorConverter.xyzd50TosRGBLinear(...self2.#toXyzd50()), self2.alpha),
        ["display-p3"]: (self2) => new ColorFunction("display-p3", ...ColorConverter.xyzd50ToDisplayP3(...self2.#toXyzd50()), self2.alpha),
        ["a98-rgb"]: (self2) => new ColorFunction("a98-rgb", ...ColorConverter.xyzd50ToAdobeRGB(...self2.#toXyzd50()), self2.alpha),
        ["prophoto-rgb"]: (self2) => new ColorFunction("prophoto-rgb", ...ColorConverter.xyzd50ToProPhoto(...self2.#toXyzd50()), self2.alpha),
        ["rec2020"]: (self2) => new ColorFunction("rec2020", ...ColorConverter.xyzd50ToRec2020(...self2.#toXyzd50()), self2.alpha),
        ["xyz"]: (self2) => new ColorFunction("xyz", ...ColorConverter.xyzd50ToD65(...self2.#toXyzd50()), self2.alpha),
        ["xyz-d50"]: (self2) => new ColorFunction("xyz-d50", ...self2.#toXyzd50(), self2.alpha),
        ["xyz-d65"]: (self2) => new ColorFunction("xyz-d65", ...ColorConverter.xyzd50ToD65(...self2.#toXyzd50()), self2.alpha)
      };
      #getRGBArray(withAlpha = true) {
        const rgb = hsl2rgb([this.h, this.s, this.l, 0]);
        if (withAlpha) {
          return [rgb[0], rgb[1], rgb[2], this.alpha ?? void 0];
        }
        return [rgb[0], rgb[1], rgb[2]];
      }
      #toXyzd50() {
        const rgb = this.#getRGBArray(false);
        return ColorConverter.srgbToXyzd50(rgb[0], rgb[1], rgb[2]);
      }
      constructor(h, s, l, alpha, authoredText) {
        this.#rawParams = [h, s, l];
        this.l = clamp2(l, { min: 0, max: 1 });
        s = equals(this.l, 0) || equals(this.l, 1) ? 0 : s;
        this.s = clamp2(s, { min: 0, max: 1 });
        h = equals(this.s, 0) ? 0 : h;
        this.h = normalizeHue(h * 360) / 360;
        this.alpha = clamp2(alpha ?? null, { min: 0, max: 1 });
        this.#authoredText = authoredText;
      }
      equal(color) {
        const hsl = color.as("hsl");
        return equals(this.h, hsl.h) && equals(this.s, hsl.s) && equals(this.l, hsl.l) && equals(this.alpha, hsl.alpha);
      }
      asString(format2) {
        if (format2) {
          return this.as(format2).asString();
        }
        return this.#stringify(this.h, this.s, this.l);
      }
      #stringify(h, s, l) {
        const start = sprintf("hsl(%sdeg %s% %s%", stringifyWithPrecision(h * 360), stringifyWithPrecision(s * 100), stringifyWithPrecision(l * 100));
        if (this.alpha !== null && this.alpha !== 1) {
          return start + sprintf(" / %s%)", stringifyWithPrecision(this.alpha * 100));
        }
        return start + ")";
      }
      setAlpha(alpha) {
        return new _HSL(this.h, this.s, this.l, alpha);
      }
      format() {
        return this.alpha === null || this.alpha === 1 ? "hsl" : "hsla";
      }
      is(format2) {
        return format2 === this.format();
      }
      as(format2) {
        if (format2 === this.format()) {
          return this;
        }
        return _HSL.#conversions[format2](this);
      }
      asLegacyColor() {
        return this.as("rgba");
      }
      getAuthoredText() {
        return this.#authoredText ?? null;
      }
      getRawParameters() {
        return [...this.#rawParams];
      }
      getAsRawString(format2) {
        if (format2) {
          return this.as(format2).getAsRawString();
        }
        return this.#stringify(...this.#rawParams);
      }
      isGamutClipped() {
        return !lessOrEquals(this.#rawParams[1], 1) || !lessOrEquals(0, this.#rawParams[1]);
      }
      static fromSpec(spec, text) {
        const h = parseHueNumeric(spec[0]);
        if (h === null) {
          return null;
        }
        const s = parseSatLightNumeric(spec[1]);
        if (s === null) {
          return null;
        }
        const l = parseSatLightNumeric(spec[2]);
        if (l === null) {
          return null;
        }
        const alpha = parseAlpha(spec[3]);
        return new _HSL(h, s, l, alpha, text);
      }
      hsva() {
        const s = this.s * (this.l < 0.5 ? this.l : 1 - this.l);
        return [this.h, s !== 0 ? 2 * s / (this.l + s) : 0, this.l + s, this.alpha ?? 1];
      }
      canonicalHSLA() {
        return [Math.round(this.h * 360), Math.round(this.s * 100), Math.round(this.l * 100), this.alpha ?? 1];
      }
    };
    HWB = class _HWB {
      h;
      w;
      b;
      alpha;
      #rawParams;
      #authoredText;
      channels = ["h", "w", "b", "alpha"];
      static #conversions = {
        ["hex"]: (self2) => new Legacy(self2.#getRGBArray(false), "hex"),
        ["hexa"]: (self2) => new Legacy(self2.#getRGBArray(true), "hexa"),
        ["rgb"]: (self2) => new Legacy(self2.#getRGBArray(false), "rgb"),
        ["rgba"]: (self2) => new Legacy(self2.#getRGBArray(true), "rgba"),
        ["hsl"]: (self2) => new HSL(...rgbToHsl(self2.#getRGBArray(false)), self2.alpha),
        ["hsla"]: (self2) => new HSL(...rgbToHsl(self2.#getRGBArray(false)), self2.alpha),
        ["hwb"]: (self2) => self2,
        ["hwba"]: (self2) => self2,
        ["lch"]: (self2) => new LCH(...ColorConverter.labToLch(...ColorConverter.xyzd50ToLab(...self2.#toXyzd50())), self2.alpha),
        ["oklch"]: (self2) => new Oklch(...ColorConverter.xyzd50ToOklch(...self2.#toXyzd50()), self2.alpha),
        ["lab"]: (self2) => new Lab(...ColorConverter.xyzd50ToLab(...self2.#toXyzd50()), self2.alpha),
        ["oklab"]: (self2) => new Oklab(...ColorConverter.xyzd65ToOklab(...ColorConverter.xyzd50ToD65(...self2.#toXyzd50())), self2.alpha),
        ["srgb"]: (self2) => new ColorFunction("srgb", ...ColorConverter.xyzd50ToSrgb(...self2.#toXyzd50()), self2.alpha),
        ["srgb-linear"]: (self2) => new ColorFunction("srgb-linear", ...ColorConverter.xyzd50TosRGBLinear(...self2.#toXyzd50()), self2.alpha),
        ["display-p3"]: (self2) => new ColorFunction("display-p3", ...ColorConverter.xyzd50ToDisplayP3(...self2.#toXyzd50()), self2.alpha),
        ["a98-rgb"]: (self2) => new ColorFunction("a98-rgb", ...ColorConverter.xyzd50ToAdobeRGB(...self2.#toXyzd50()), self2.alpha),
        ["prophoto-rgb"]: (self2) => new ColorFunction("prophoto-rgb", ...ColorConverter.xyzd50ToProPhoto(...self2.#toXyzd50()), self2.alpha),
        ["rec2020"]: (self2) => new ColorFunction("rec2020", ...ColorConverter.xyzd50ToRec2020(...self2.#toXyzd50()), self2.alpha),
        ["xyz"]: (self2) => new ColorFunction("xyz", ...ColorConverter.xyzd50ToD65(...self2.#toXyzd50()), self2.alpha),
        ["xyz-d50"]: (self2) => new ColorFunction("xyz-d50", ...self2.#toXyzd50(), self2.alpha),
        ["xyz-d65"]: (self2) => new ColorFunction("xyz-d65", ...ColorConverter.xyzd50ToD65(...self2.#toXyzd50()), self2.alpha)
      };
      #getRGBArray(withAlpha = true) {
        const rgb = hwb2rgb([this.h, this.w, this.b, 0]);
        if (withAlpha) {
          return [rgb[0], rgb[1], rgb[2], this.alpha ?? void 0];
        }
        return [rgb[0], rgb[1], rgb[2]];
      }
      #toXyzd50() {
        const rgb = this.#getRGBArray(false);
        return ColorConverter.srgbToXyzd50(rgb[0], rgb[1], rgb[2]);
      }
      constructor(h, w, b, alpha, authoredText) {
        this.#rawParams = [h, w, b];
        this.w = clamp2(w, { min: 0, max: 1 });
        this.b = clamp2(b, { min: 0, max: 1 });
        h = lessOrEquals(1, this.w + this.b) ? 0 : h;
        this.h = normalizeHue(h * 360) / 360;
        this.alpha = clamp2(alpha, { min: 0, max: 1 });
        if (lessOrEquals(1, this.w + this.b)) {
          const ratio = this.w / this.b;
          this.b = 1 / (1 + ratio);
          this.w = 1 - this.b;
        }
        this.#authoredText = authoredText;
      }
      equal(color) {
        const hwb = color.as("hwb");
        return equals(this.h, hwb.h) && equals(this.w, hwb.w) && equals(this.b, hwb.b) && equals(this.alpha, hwb.alpha);
      }
      asString(format2) {
        if (format2) {
          return this.as(format2).asString();
        }
        return this.#stringify(this.h, this.w, this.b);
      }
      #stringify(h, w, b) {
        const start = sprintf("hwb(%sdeg %s% %s%", stringifyWithPrecision(h * 360), stringifyWithPrecision(w * 100), stringifyWithPrecision(b * 100));
        if (this.alpha !== null && this.alpha !== 1) {
          return start + sprintf(" / %s%)", stringifyWithPrecision(this.alpha * 100));
        }
        return start + ")";
      }
      setAlpha(alpha) {
        return new _HWB(this.h, this.w, this.b, alpha, this.#authoredText);
      }
      format() {
        return this.alpha !== null && !equals(this.alpha, 1) ? "hwba" : "hwb";
      }
      is(format2) {
        return format2 === this.format();
      }
      as(format2) {
        if (format2 === this.format()) {
          return this;
        }
        return _HWB.#conversions[format2](this);
      }
      asLegacyColor() {
        return this.as("rgba");
      }
      getAuthoredText() {
        return this.#authoredText ?? null;
      }
      canonicalHWBA() {
        return [
          Math.round(this.h * 360),
          Math.round(this.w * 100),
          Math.round(this.b * 100),
          this.alpha ?? 1
        ];
      }
      getRawParameters() {
        return [...this.#rawParams];
      }
      getAsRawString(format2) {
        if (format2) {
          return this.as(format2).getAsRawString();
        }
        return this.#stringify(...this.#rawParams);
      }
      isGamutClipped() {
        return !lessOrEquals(this.#rawParams[1], 1) || !lessOrEquals(0, this.#rawParams[1]) || !lessOrEquals(this.#rawParams[2], 1) || !lessOrEquals(0, this.#rawParams[2]);
      }
      static fromSpec(spec, text) {
        const h = parseHueNumeric(spec[0]);
        if (h === null) {
          return null;
        }
        const w = parseSatLightNumeric(spec[1]);
        if (w === null) {
          return null;
        }
        const b = parseSatLightNumeric(spec[2]);
        if (b === null) {
          return null;
        }
        const alpha = parseAlpha(spec[3]);
        return new _HWB(h, w, b, alpha, text);
      }
    };
    ShortFormatColorBase = class {
      color;
      channels = ["r", "g", "b", "alpha"];
      constructor(color) {
        this.color = color;
      }
      get alpha() {
        return this.color.alpha;
      }
      rgba() {
        return this.color.rgba();
      }
      equal(color) {
        return this.color.equal(color);
      }
      setAlpha(alpha) {
        return this.color.setAlpha(alpha);
      }
      format() {
        return (this.alpha ?? 1) !== 1 ? "hexa" : "hex";
      }
      as(format2) {
        return this.color.as(format2);
      }
      is(format2) {
        return this.color.is(format2);
      }
      asLegacyColor() {
        return this.color.asLegacyColor();
      }
      getAuthoredText() {
        return this.color.getAuthoredText();
      }
      getRawParameters() {
        return this.color.getRawParameters();
      }
      isGamutClipped() {
        return this.color.isGamutClipped();
      }
      asString(format2) {
        if (format2) {
          return this.as(format2).asString();
        }
        const [r, g, b] = this.color.rgba();
        return this.stringify(r, g, b);
      }
      getAsRawString(format2) {
        if (format2) {
          return this.as(format2).getAsRawString();
        }
        const [r, g, b] = this.getRawParameters();
        return this.stringify(r, g, b);
      }
    };
    ShortHex = class _ShortHex extends ShortFormatColorBase {
      setAlpha(alpha) {
        return new _ShortHex(this.color.setAlpha(alpha));
      }
      asString(format2) {
        return format2 && format2 !== this.format() ? super.as(format2).asString() : super.asString();
      }
      stringify(r, g, b) {
        function toShortHexValue(value) {
          return (Math.round(value * 255) / 17).toString(16);
        }
        if (this.color.hasAlpha()) {
          return sprintf("#%s%s%s%s", toShortHexValue(r), toShortHexValue(g), toShortHexValue(b), toShortHexValue(this.alpha ?? 1)).toLowerCase();
        }
        return sprintf("#%s%s%s", toShortHexValue(r), toShortHexValue(g), toShortHexValue(b)).toLowerCase();
      }
    };
    Nickname = class _Nickname extends ShortFormatColorBase {
      nickname;
      constructor(nickname, color) {
        super(color);
        this.nickname = nickname;
      }
      static fromName(name, text) {
        const nickname = name.toLowerCase();
        const rgba = Nicknames.get(nickname);
        if (rgba !== void 0) {
          return new _Nickname(nickname, Legacy.fromRGBA(rgba, text));
        }
        return null;
      }
      stringify() {
        return this.nickname;
      }
      getAsRawString(format2) {
        return this.color.getAsRawString(format2);
      }
    };
    Legacy = class _Legacy {
      #rawParams;
      #rgba;
      #authoredText;
      #format;
      channels = ["r", "g", "b", "alpha"];
      static #conversions = {
        ["hex"]: (self2) => new _Legacy(self2.#rgba, "hex"),
        ["hexa"]: (self2) => new _Legacy(self2.#rgba, "hexa"),
        ["rgb"]: (self2) => new _Legacy(self2.#rgba, "rgb"),
        ["rgba"]: (self2) => new _Legacy(self2.#rgba, "rgba"),
        ["hsl"]: (self2) => new HSL(...rgbToHsl([self2.#rgba[0], self2.#rgba[1], self2.#rgba[2]]), self2.alpha),
        ["hsla"]: (self2) => new HSL(...rgbToHsl([self2.#rgba[0], self2.#rgba[1], self2.#rgba[2]]), self2.alpha),
        ["hwb"]: (self2) => new HWB(...rgbToHwb([self2.#rgba[0], self2.#rgba[1], self2.#rgba[2]]), self2.alpha),
        ["hwba"]: (self2) => new HWB(...rgbToHwb([self2.#rgba[0], self2.#rgba[1], self2.#rgba[2]]), self2.alpha),
        ["lch"]: (self2) => new LCH(...ColorConverter.labToLch(...ColorConverter.xyzd50ToLab(...self2.#toXyzd50())), self2.alpha),
        ["oklch"]: (self2) => new Oklch(...ColorConverter.xyzd50ToOklch(...self2.#toXyzd50()), self2.alpha),
        ["lab"]: (self2) => new Lab(...ColorConverter.xyzd50ToLab(...self2.#toXyzd50()), self2.alpha),
        ["oklab"]: (self2) => new Oklab(...ColorConverter.xyzd65ToOklab(...ColorConverter.xyzd50ToD65(...self2.#toXyzd50())), self2.alpha),
        ["srgb"]: (self2) => new ColorFunction("srgb", ...ColorConverter.xyzd50ToSrgb(...self2.#toXyzd50()), self2.alpha),
        ["srgb-linear"]: (self2) => new ColorFunction("srgb-linear", ...ColorConverter.xyzd50TosRGBLinear(...self2.#toXyzd50()), self2.alpha),
        ["display-p3"]: (self2) => new ColorFunction("display-p3", ...ColorConverter.xyzd50ToDisplayP3(...self2.#toXyzd50()), self2.alpha),
        ["a98-rgb"]: (self2) => new ColorFunction("a98-rgb", ...ColorConverter.xyzd50ToAdobeRGB(...self2.#toXyzd50()), self2.alpha),
        ["prophoto-rgb"]: (self2) => new ColorFunction("prophoto-rgb", ...ColorConverter.xyzd50ToProPhoto(...self2.#toXyzd50()), self2.alpha),
        ["rec2020"]: (self2) => new ColorFunction("rec2020", ...ColorConverter.xyzd50ToRec2020(...self2.#toXyzd50()), self2.alpha),
        ["xyz"]: (self2) => new ColorFunction("xyz", ...ColorConverter.xyzd50ToD65(...self2.#toXyzd50()), self2.alpha),
        ["xyz-d50"]: (self2) => new ColorFunction("xyz-d50", ...self2.#toXyzd50(), self2.alpha),
        ["xyz-d65"]: (self2) => new ColorFunction("xyz-d65", ...ColorConverter.xyzd50ToD65(...self2.#toXyzd50()), self2.alpha)
      };
      #toXyzd50() {
        const [r, g, b] = this.#rgba;
        return ColorConverter.srgbToXyzd50(r, g, b);
      }
      get alpha() {
        switch (this.format()) {
          case "hexa":
          case "rgba":
            return this.#rgba[3];
          default:
            return null;
        }
      }
      asLegacyColor() {
        return this;
      }
      nickname() {
        const nickname = RGBAToNickname.get(String(this.canonicalRGBA()));
        return nickname ? new Nickname(nickname, this) : null;
      }
      shortHex() {
        for (let i = 0; i < 4; ++i) {
          const c = Math.round(this.#rgba[i] * 255);
          if (c % 17) {
            return null;
          }
        }
        return new ShortHex(this);
      }
      constructor(rgba, format2, authoredText) {
        this.#authoredText = authoredText || null;
        this.#format = format2;
        this.#rawParams = [rgba[0], rgba[1], rgba[2]];
        this.#rgba = [
          clamp2(rgba[0], { min: 0, max: 1 }),
          clamp2(rgba[1], { min: 0, max: 1 }),
          clamp2(rgba[2], { min: 0, max: 1 }),
          clamp2(rgba[3] ?? 1, { min: 0, max: 1 })
        ];
      }
      static fromHex(hex, text) {
        hex = hex.toLowerCase();
        const hasAlpha = hex.length === 4 || hex.length === 8;
        const format2 = hasAlpha ? "hexa" : "hex";
        const isShort = hex.length <= 4;
        if (isShort) {
          hex = hex.charAt(0) + hex.charAt(0) + hex.charAt(1) + hex.charAt(1) + hex.charAt(2) + hex.charAt(2) + hex.charAt(3) + hex.charAt(3);
        }
        const r = parseInt(hex.substring(0, 2), 16);
        const g = parseInt(hex.substring(2, 4), 16);
        const b = parseInt(hex.substring(4, 6), 16);
        let a = 1;
        if (hex.length === 8) {
          a = parseInt(hex.substring(6, 8), 16) / 255;
        }
        const color = new _Legacy([r / 255, g / 255, b / 255, a], format2, text);
        return isShort ? new ShortHex(color) : color;
      }
      static fromRGBAFunction(r, g, b, alpha, text) {
        const rgba = [
          parseRgbNumeric(r),
          parseRgbNumeric(g),
          parseRgbNumeric(b),
          alpha ? parseAlphaNumeric(alpha) : 1
        ];
        if (!arrayDoesNotContainNullOrUndefined2(rgba)) {
          return null;
        }
        return new _Legacy(rgba, alpha ? "rgba" : "rgb", text);
      }
      static fromRGBA(rgba, authoredText) {
        return new _Legacy([rgba[0] / 255, rgba[1] / 255, rgba[2] / 255, rgba[3]], "rgba", authoredText);
      }
      static fromHSVA(hsva) {
        const rgba = hsva2rgba(hsva);
        return new _Legacy(rgba, "rgba");
      }
      is(format2) {
        return format2 === this.format();
      }
      as(format2) {
        if (format2 === this.format()) {
          return this;
        }
        return _Legacy.#conversions[format2](this);
      }
      format() {
        return this.#format;
      }
      hasAlpha() {
        return this.#rgba[3] !== 1;
      }
      detectHEXFormat() {
        const hasAlpha = this.hasAlpha();
        return hasAlpha ? "hexa" : "hex";
      }
      asString(format2) {
        if (format2) {
          return this.as(format2).asString();
        }
        return this.#stringify(format2, this.#rgba[0], this.#rgba[1], this.#rgba[2]);
      }
      #stringify(format2, r, g, b) {
        if (!format2) {
          format2 = this.#format;
        }
        function toHexValue(value) {
          const hex = Math.round(value * 255).toString(16);
          return hex.length === 1 ? "0" + hex : hex;
        }
        switch (format2) {
          case "rgb":
          case "rgba": {
            const start = sprintf("rgb(%d %d %d", toRgbValue(r), toRgbValue(g), toRgbValue(b));
            if (this.hasAlpha()) {
              return start + sprintf(" / %d%)", Math.round(this.#rgba[3] * 100));
            }
            return start + ")";
          }
          case "hex":
          case "hexa": {
            if (this.hasAlpha()) {
              return sprintf("#%s%s%s%s", toHexValue(r), toHexValue(g), toHexValue(b), toHexValue(this.#rgba[3])).toLowerCase();
            }
            return sprintf("#%s%s%s", toHexValue(r), toHexValue(g), toHexValue(b)).toLowerCase();
          }
        }
      }
      getAuthoredText() {
        return this.#authoredText ?? null;
      }
      getRawParameters() {
        return [...this.#rawParams];
      }
      getAsRawString(format2) {
        if (format2) {
          return this.as(format2).getAsRawString();
        }
        return this.#stringify(format2, ...this.#rawParams);
      }
      isGamutClipped() {
        return !equals(this.#rawParams.map(toRgbValue), [this.#rgba[0], this.#rgba[1], this.#rgba[2]].map(toRgbValue), WIDE_RANGE_EPSILON);
      }
      rgba() {
        return [...this.#rgba];
      }
      canonicalRGBA() {
        const rgba = new Array(4);
        for (let i = 0; i < 3; ++i) {
          rgba[i] = Math.round(this.#rgba[i] * 255);
        }
        rgba[3] = this.#rgba[3];
        return rgba;
      }
      toProtocolRGBA() {
        const rgba = this.canonicalRGBA();
        const result = { r: rgba[0], g: rgba[1], b: rgba[2] };
        if (rgba[3] !== 1) {
          result.a = rgba[3];
        }
        return result;
      }
      invert() {
        const rgba = [0, 0, 0, 0];
        rgba[0] = 1 - this.#rgba[0];
        rgba[1] = 1 - this.#rgba[1];
        rgba[2] = 1 - this.#rgba[2];
        rgba[3] = this.#rgba[3];
        return new _Legacy(rgba, "rgba");
      }
      grayscale() {
        const [r, g, b] = this.#rgba;
        const gray = r * 0.299 + g * 0.587 + b * 0.114;
        return new _Legacy([gray, gray, gray, 0.5], "rgba");
      }
      setAlpha(alpha) {
        const rgba = [...this.#rgba];
        rgba[3] = alpha;
        return new _Legacy(rgba, "rgba");
      }
      blendWith(fgColor) {
        const rgba = blendColors(fgColor.#rgba, this.#rgba);
        return new _Legacy(rgba, "rgba");
      }
      blendWithAlpha(alpha) {
        const rgba = [...this.#rgba];
        rgba[3] *= alpha;
        return new _Legacy(rgba, "rgba");
      }
      setFormat(format2) {
        this.#format = format2;
      }
      equal(other) {
        const legacy = other.as(this.#format);
        return equals(toRgbValue(this.#rgba[0]), toRgbValue(legacy.#rgba[0]), WIDE_RANGE_EPSILON) && equals(toRgbValue(this.#rgba[1]), toRgbValue(legacy.#rgba[1]), WIDE_RANGE_EPSILON) && equals(toRgbValue(this.#rgba[2]), toRgbValue(legacy.#rgba[2]), WIDE_RANGE_EPSILON) && equals(this.#rgba[3], legacy.#rgba[3]);
      }
    };
    Regex = /((?:rgba?|hsla?|hwba?|lab|lch|oklab|oklch|color)\([^)]+\)|#[0-9a-fA-F]{8}|#[0-9a-fA-F]{6}|#[0-9a-fA-F]{3,4}|\b[a-zA-Z]+\b(?!-))/g;
    ColorMixRegex = /color-mix\(.*,\s*(?<firstColor>.+)\s*,\s*(?<secondColor>.+)\s*\)/g;
    COLOR_TO_RGBA_ENTRIES = [
      ["aliceblue", [240, 248, 255]],
      ["antiquewhite", [250, 235, 215]],
      ["aqua", [0, 255, 255]],
      ["aquamarine", [127, 255, 212]],
      ["azure", [240, 255, 255]],
      ["beige", [245, 245, 220]],
      ["bisque", [255, 228, 196]],
      ["black", [0, 0, 0]],
      ["blanchedalmond", [255, 235, 205]],
      ["blue", [0, 0, 255]],
      ["blueviolet", [138, 43, 226]],
      ["brown", [165, 42, 42]],
      ["burlywood", [222, 184, 135]],
      ["cadetblue", [95, 158, 160]],
      ["chartreuse", [127, 255, 0]],
      ["chocolate", [210, 105, 30]],
      ["coral", [255, 127, 80]],
      ["cornflowerblue", [100, 149, 237]],
      ["cornsilk", [255, 248, 220]],
      ["crimson", [237, 20, 61]],
      ["cyan", [0, 255, 255]],
      ["darkblue", [0, 0, 139]],
      ["darkcyan", [0, 139, 139]],
      ["darkgoldenrod", [184, 134, 11]],
      ["darkgray", [169, 169, 169]],
      ["darkgrey", [169, 169, 169]],
      ["darkgreen", [0, 100, 0]],
      ["darkkhaki", [189, 183, 107]],
      ["darkmagenta", [139, 0, 139]],
      ["darkolivegreen", [85, 107, 47]],
      ["darkorange", [255, 140, 0]],
      ["darkorchid", [153, 50, 204]],
      ["darkred", [139, 0, 0]],
      ["darksalmon", [233, 150, 122]],
      ["darkseagreen", [143, 188, 143]],
      ["darkslateblue", [72, 61, 139]],
      ["darkslategray", [47, 79, 79]],
      ["darkslategrey", [47, 79, 79]],
      ["darkturquoise", [0, 206, 209]],
      ["darkviolet", [148, 0, 211]],
      ["deeppink", [255, 20, 147]],
      ["deepskyblue", [0, 191, 255]],
      ["dimgray", [105, 105, 105]],
      ["dimgrey", [105, 105, 105]],
      ["dodgerblue", [30, 144, 255]],
      ["firebrick", [178, 34, 34]],
      ["floralwhite", [255, 250, 240]],
      ["forestgreen", [34, 139, 34]],
      ["fuchsia", [255, 0, 255]],
      ["gainsboro", [220, 220, 220]],
      ["ghostwhite", [248, 248, 255]],
      ["gold", [255, 215, 0]],
      ["goldenrod", [218, 165, 32]],
      ["gray", [128, 128, 128]],
      ["grey", [128, 128, 128]],
      ["green", [0, 128, 0]],
      ["greenyellow", [173, 255, 47]],
      ["honeydew", [240, 255, 240]],
      ["hotpink", [255, 105, 180]],
      ["indianred", [205, 92, 92]],
      ["indigo", [75, 0, 130]],
      ["ivory", [255, 255, 240]],
      ["khaki", [240, 230, 140]],
      ["lavender", [230, 230, 250]],
      ["lavenderblush", [255, 240, 245]],
      ["lawngreen", [124, 252, 0]],
      ["lemonchiffon", [255, 250, 205]],
      ["lightblue", [173, 216, 230]],
      ["lightcoral", [240, 128, 128]],
      ["lightcyan", [224, 255, 255]],
      ["lightgoldenrodyellow", [250, 250, 210]],
      ["lightgreen", [144, 238, 144]],
      ["lightgray", [211, 211, 211]],
      ["lightgrey", [211, 211, 211]],
      ["lightpink", [255, 182, 193]],
      ["lightsalmon", [255, 160, 122]],
      ["lightseagreen", [32, 178, 170]],
      ["lightskyblue", [135, 206, 250]],
      ["lightslategray", [119, 136, 153]],
      ["lightslategrey", [119, 136, 153]],
      ["lightsteelblue", [176, 196, 222]],
      ["lightyellow", [255, 255, 224]],
      ["lime", [0, 255, 0]],
      ["limegreen", [50, 205, 50]],
      ["linen", [250, 240, 230]],
      ["magenta", [255, 0, 255]],
      ["maroon", [128, 0, 0]],
      ["mediumaquamarine", [102, 205, 170]],
      ["mediumblue", [0, 0, 205]],
      ["mediumorchid", [186, 85, 211]],
      ["mediumpurple", [147, 112, 219]],
      ["mediumseagreen", [60, 179, 113]],
      ["mediumslateblue", [123, 104, 238]],
      ["mediumspringgreen", [0, 250, 154]],
      ["mediumturquoise", [72, 209, 204]],
      ["mediumvioletred", [199, 21, 133]],
      ["midnightblue", [25, 25, 112]],
      ["mintcream", [245, 255, 250]],
      ["mistyrose", [255, 228, 225]],
      ["moccasin", [255, 228, 181]],
      ["navajowhite", [255, 222, 173]],
      ["navy", [0, 0, 128]],
      ["oldlace", [253, 245, 230]],
      ["olive", [128, 128, 0]],
      ["olivedrab", [107, 142, 35]],
      ["orange", [255, 165, 0]],
      ["orangered", [255, 69, 0]],
      ["orchid", [218, 112, 214]],
      ["palegoldenrod", [238, 232, 170]],
      ["palegreen", [152, 251, 152]],
      ["paleturquoise", [175, 238, 238]],
      ["palevioletred", [219, 112, 147]],
      ["papayawhip", [255, 239, 213]],
      ["peachpuff", [255, 218, 185]],
      ["peru", [205, 133, 63]],
      ["pink", [255, 192, 203]],
      ["plum", [221, 160, 221]],
      ["powderblue", [176, 224, 230]],
      ["purple", [128, 0, 128]],
      ["rebeccapurple", [102, 51, 153]],
      ["red", [255, 0, 0]],
      ["rosybrown", [188, 143, 143]],
      ["royalblue", [65, 105, 225]],
      ["saddlebrown", [139, 69, 19]],
      ["salmon", [250, 128, 114]],
      ["sandybrown", [244, 164, 96]],
      ["seagreen", [46, 139, 87]],
      ["seashell", [255, 245, 238]],
      ["sienna", [160, 82, 45]],
      ["silver", [192, 192, 192]],
      ["skyblue", [135, 206, 235]],
      ["slateblue", [106, 90, 205]],
      ["slategray", [112, 128, 144]],
      ["slategrey", [112, 128, 144]],
      ["snow", [255, 250, 250]],
      ["springgreen", [0, 255, 127]],
      ["steelblue", [70, 130, 180]],
      ["tan", [210, 180, 140]],
      ["teal", [0, 128, 128]],
      ["thistle", [216, 191, 216]],
      ["tomato", [255, 99, 71]],
      ["turquoise", [64, 224, 208]],
      ["violet", [238, 130, 238]],
      ["wheat", [245, 222, 179]],
      ["white", [255, 255, 255]],
      ["whitesmoke", [245, 245, 245]],
      ["yellow", [255, 255, 0]],
      ["yellowgreen", [154, 205, 50]],
      ["transparent", [0, 0, 0, 0]]
    ];
    console.assert(COLOR_TO_RGBA_ENTRIES.every(([nickname]) => nickname.toLowerCase() === nickname), "All color nicknames must be lowercase.");
    Nicknames = new Map(COLOR_TO_RGBA_ENTRIES);
    RGBAToNickname = new Map(
      COLOR_TO_RGBA_ENTRIES.map(([nickname, [r, g, b, a = 1]]) => {
        return [String([r, g, b, a]), nickname];
      })
    );
    LAYOUT_LINES_HIGHLIGHT_COLOR = [127, 32, 210];
    PageHighlight = {
      Content: Legacy.fromRGBA([111, 168, 220, 0.66]),
      ContentLight: Legacy.fromRGBA([111, 168, 220, 0.5]),
      ContentOutline: Legacy.fromRGBA([9, 83, 148]),
      Padding: Legacy.fromRGBA([147, 196, 125, 0.55]),
      PaddingLight: Legacy.fromRGBA([147, 196, 125, 0.4]),
      Border: Legacy.fromRGBA([255, 229, 153, 0.66]),
      BorderLight: Legacy.fromRGBA([255, 229, 153, 0.5]),
      Margin: Legacy.fromRGBA([246, 178, 107, 0.66]),
      MarginLight: Legacy.fromRGBA([246, 178, 107, 0.5]),
      EventTarget: Legacy.fromRGBA([255, 196, 196, 0.66]),
      Shape: Legacy.fromRGBA([96, 82, 177, 0.8]),
      ShapeMargin: Legacy.fromRGBA([96, 82, 127, 0.6]),
      CssGrid: Legacy.fromRGBA([75, 0, 130, 1]),
      LayoutLine: Legacy.fromRGBA([...LAYOUT_LINES_HIGHLIGHT_COLOR, 1]),
      GridBorder: Legacy.fromRGBA([...LAYOUT_LINES_HIGHLIGHT_COLOR, 1]),
      GapBackground: Legacy.fromRGBA([...LAYOUT_LINES_HIGHLIGHT_COLOR, 0.3]),
      GapHatch: Legacy.fromRGBA([...LAYOUT_LINES_HIGHLIGHT_COLOR, 0.8]),
      GridAreaBorder: Legacy.fromRGBA([26, 115, 232, 1])
    };
    SourceOrderHighlight = {
      ParentOutline: Legacy.fromRGBA([224, 90, 183, 1]),
      ChildOutline: Legacy.fromRGBA([0, 120, 212, 1])
    };
    IsolationModeHighlight = {
      Resizer: Legacy.fromRGBA([222, 225, 230, 1]),
      ResizerHandle: Legacy.fromRGBA([166, 166, 166, 1]),
      Mask: Legacy.fromRGBA([248, 249, 249, 1])
    };
    Generator = class {
      #hueSpace;
      #satSpace;
      #lightnessSpace;
      #alphaSpace;
      #colors = /* @__PURE__ */ new Map();
      constructor(hueSpace, satSpace, lightnessSpace, alphaSpace) {
        this.#hueSpace = hueSpace || { min: 0, max: 360 };
        this.#satSpace = satSpace || 67;
        this.#lightnessSpace = lightnessSpace || 80;
        this.#alphaSpace = alphaSpace || 1;
      }
      setColorForID(id2, color) {
        this.#colors.set(id2, color);
      }
      colorForID(id2) {
        let color = this.#colors.get(id2);
        if (!color) {
          color = this.generateColorForID(id2);
          this.#colors.set(id2, color);
        }
        return color;
      }
      generateColorForID(id2) {
        const hash = hashCode(id2);
        const h = this.indexToValueInSpace(hash, this.#hueSpace);
        const s = this.indexToValueInSpace(hash >> 8, this.#satSpace);
        const l = this.indexToValueInSpace(hash >> 16, this.#lightnessSpace);
        const a = this.indexToValueInSpace(hash >> 24, this.#alphaSpace);
        const start = `hsl(${h}deg ${s}% ${l}%`;
        if (a !== 1) {
          return `${start} / ${Math.floor(a * 100)}%)`;
        }
        return `${start})`;
      }
      indexToValueInSpace(index2, space) {
        if (typeof space === "number") {
          return space;
        }
        const count = space.count || space.max - space.min;
        index2 %= count;
        return space.min + Math.floor(index2 / (count - 1) * (space.max - space.min));
      }
    };
    Color = /* @__PURE__ */ Object.freeze({
      __proto__: null,
      ColorFunction,
      ColorMixRegex,
      Generator,
      HSL,
      HWB,
      IsolationModeHighlight,
      LCH,
      Lab,
      Legacy,
      Nickname,
      Nicknames,
      Oklab,
      Oklch,
      PageHighlight,
      Regex,
      ShortHex,
      SourceOrderHighlight,
      approachColorValue,
      desiredLuminance,
      findFgColorForContrast,
      findFgColorForContrastAPCA,
      getFormat,
      hsl2rgb,
      hsva2rgba,
      parse: parse$2,
      parseHueNumeric,
      rgb2hsv
    });
    ObjectWrapper = class {
      listeners;
      addEventListener(eventType, listener, thisObject) {
        if (!this.listeners) {
          this.listeners = /* @__PURE__ */ new Map();
        }
        let listenersForEventType = this.listeners.get(eventType);
        if (!listenersForEventType) {
          listenersForEventType = /* @__PURE__ */ new Set();
          this.listeners.set(eventType, listenersForEventType);
        }
        listenersForEventType.add({ thisObject, listener });
        return { eventTarget: this, eventType, thisObject, listener };
      }
      once(eventType) {
        return new Promise((resolve2) => {
          const descriptor = this.addEventListener(eventType, (event) => {
            this.removeEventListener(eventType, descriptor.listener);
            resolve2(event.data);
          });
        });
      }
      removeEventListener(eventType, listener, thisObject) {
        const listeners = this.listeners?.get(eventType);
        if (!listeners) {
          return;
        }
        for (const listenerTuple of listeners) {
          if (listenerTuple.listener === listener && listenerTuple.thisObject === thisObject) {
            listenerTuple.disposed = true;
            listeners.delete(listenerTuple);
          }
        }
        if (!listeners.size) {
          this.listeners?.delete(eventType);
        }
      }
      hasEventListeners(eventType) {
        return Boolean(this.listeners?.has(eventType));
      }
      dispatchEventToListeners(eventType, ...[eventData]) {
        const listeners = this.listeners?.get(eventType);
        if (!listeners) {
          return;
        }
        const event = { data: eventData, source: this };
        for (const listener of [...listeners]) {
          if (!listener.disposed) {
            try {
              listener.listener.call(listener.thisObject, event);
            } catch (err) {
              console.error(`Event listener for ${String(eventType)} throw an error:`, err);
            }
          }
        }
      }
    };
    Object$1 = /* @__PURE__ */ Object.freeze({
      __proto__: null,
      ObjectWrapper,
      eventMixin
    });
    devToolsLocaleInstance = null;
    DevToolsLocale = class _DevToolsLocale {
      locale;
      lookupClosestDevToolsLocale;
      constructor(data32) {
        this.lookupClosestDevToolsLocale = data32.lookupClosestDevToolsLocale;
        if (data32.settingLanguage === "browserLanguage") {
          this.locale = data32.navigatorLanguage || "en-US";
        } else {
          this.locale = data32.settingLanguage;
        }
        this.locale = this.lookupClosestDevToolsLocale(this.locale);
      }
      static instance(opts = { create: false }) {
        if (!devToolsLocaleInstance && !opts.create) {
          throw new Error("No LanguageSelector instance exists yet.");
        }
        if (opts.create) {
          devToolsLocaleInstance = new _DevToolsLocale(opts.data);
        }
        return devToolsLocaleInstance;
      }
      static removeInstance() {
        devToolsLocaleInstance = null;
      }
      forceFallbackLocale() {
        this.locale = "en-US";
      }
      languageIsSupportedByDevTools(localeString) {
        return localeLanguagesMatch(localeString, this.lookupClosestDevToolsLocale(localeString));
      }
    };
    DevToolsLocale$1 = /* @__PURE__ */ Object.freeze({
      __proto__: null,
      DevToolsLocale,
      localeLanguagesMatch
    });
    NumberFormatter = /* @__PURE__ */ Object.freeze({
      __proto__: null,
      defineFormatter
    });
    narrowBytes = defineFormatter({
      style: "unit",
      unit: "byte",
      unitDisplay: "narrow",
      minimumFractionDigits: 0,
      maximumFractionDigits: 0
    });
    narrowKilobytesDecimal = defineFormatter({
      style: "unit",
      unit: "kilobyte",
      unitDisplay: "narrow",
      minimumFractionDigits: 1,
      maximumFractionDigits: 1
    });
    narrowKilobytesInteger = defineFormatter({
      style: "unit",
      unit: "kilobyte",
      unitDisplay: "narrow",
      minimumFractionDigits: 0,
      maximumFractionDigits: 0
    });
    narrowMegabytesDecimal = defineFormatter({
      style: "unit",
      unit: "megabyte",
      unitDisplay: "narrow",
      minimumFractionDigits: 1,
      maximumFractionDigits: 1
    });
    narrowMegabytesInteger = defineFormatter({
      style: "unit",
      unit: "megabyte",
      unitDisplay: "narrow",
      minimumFractionDigits: 0,
      maximumFractionDigits: 0
    });
    bytesToString = (bytes2) => {
      if (bytes2 < 1e3) {
        return narrowBytes.format(bytes2);
      }
      const kilobytes = bytes2 / 1e3;
      if (kilobytes < 100) {
        return narrowKilobytesDecimal.format(kilobytes);
      }
      if (kilobytes < 1e3) {
        return narrowKilobytesInteger.format(kilobytes);
      }
      const megabytes = kilobytes / 1e3;
      if (megabytes < 100) {
        return narrowMegabytesDecimal.format(megabytes);
      }
      return narrowMegabytesInteger.format(megabytes);
    };
    formatBytesToKb = (bytes2) => {
      const kilobytes = bytes2 / 1e3;
      if (kilobytes < 100) {
        return narrowKilobytesDecimal.format(kilobytes);
      }
      return narrowKilobytesInteger.format(kilobytes);
    };
    ByteUtilities = /* @__PURE__ */ Object.freeze({
      __proto__: null,
      bytesToString,
      formatBytesToKb
    });
    __assign4 = function() {
      __assign4 = Object.assign || function __assign22(t) {
        for (var s, i = 1, n = arguments.length; i < n; i++) {
          s = arguments[i];
          for (var p in s)
            if (Object.prototype.hasOwnProperty.call(s, p))
              t[p] = s[p];
        }
        return t;
      };
      return __assign4.apply(this, arguments);
    };
    (function(ErrorKind2) {
      ErrorKind2[ErrorKind2["EXPECT_ARGUMENT_CLOSING_BRACE"] = 1] = "EXPECT_ARGUMENT_CLOSING_BRACE";
      ErrorKind2[ErrorKind2["EMPTY_ARGUMENT"] = 2] = "EMPTY_ARGUMENT";
      ErrorKind2[ErrorKind2["MALFORMED_ARGUMENT"] = 3] = "MALFORMED_ARGUMENT";
      ErrorKind2[ErrorKind2["EXPECT_ARGUMENT_TYPE"] = 4] = "EXPECT_ARGUMENT_TYPE";
      ErrorKind2[ErrorKind2["INVALID_ARGUMENT_TYPE"] = 5] = "INVALID_ARGUMENT_TYPE";
      ErrorKind2[ErrorKind2["EXPECT_ARGUMENT_STYLE"] = 6] = "EXPECT_ARGUMENT_STYLE";
      ErrorKind2[ErrorKind2["INVALID_NUMBER_SKELETON"] = 7] = "INVALID_NUMBER_SKELETON";
      ErrorKind2[ErrorKind2["INVALID_DATE_TIME_SKELETON"] = 8] = "INVALID_DATE_TIME_SKELETON";
      ErrorKind2[ErrorKind2["EXPECT_NUMBER_SKELETON"] = 9] = "EXPECT_NUMBER_SKELETON";
      ErrorKind2[ErrorKind2["EXPECT_DATE_TIME_SKELETON"] = 10] = "EXPECT_DATE_TIME_SKELETON";
      ErrorKind2[ErrorKind2["UNCLOSED_QUOTE_IN_ARGUMENT_STYLE"] = 11] = "UNCLOSED_QUOTE_IN_ARGUMENT_STYLE";
      ErrorKind2[ErrorKind2["EXPECT_SELECT_ARGUMENT_OPTIONS"] = 12] = "EXPECT_SELECT_ARGUMENT_OPTIONS";
      ErrorKind2[ErrorKind2["EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE"] = 13] = "EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE";
      ErrorKind2[ErrorKind2["INVALID_PLURAL_ARGUMENT_OFFSET_VALUE"] = 14] = "INVALID_PLURAL_ARGUMENT_OFFSET_VALUE";
      ErrorKind2[ErrorKind2["EXPECT_SELECT_ARGUMENT_SELECTOR"] = 15] = "EXPECT_SELECT_ARGUMENT_SELECTOR";
      ErrorKind2[ErrorKind2["EXPECT_PLURAL_ARGUMENT_SELECTOR"] = 16] = "EXPECT_PLURAL_ARGUMENT_SELECTOR";
      ErrorKind2[ErrorKind2["EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT"] = 17] = "EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT";
      ErrorKind2[ErrorKind2["EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT"] = 18] = "EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT";
      ErrorKind2[ErrorKind2["INVALID_PLURAL_ARGUMENT_SELECTOR"] = 19] = "INVALID_PLURAL_ARGUMENT_SELECTOR";
      ErrorKind2[ErrorKind2["DUPLICATE_PLURAL_ARGUMENT_SELECTOR"] = 20] = "DUPLICATE_PLURAL_ARGUMENT_SELECTOR";
      ErrorKind2[ErrorKind2["DUPLICATE_SELECT_ARGUMENT_SELECTOR"] = 21] = "DUPLICATE_SELECT_ARGUMENT_SELECTOR";
      ErrorKind2[ErrorKind2["MISSING_OTHER_CLAUSE"] = 22] = "MISSING_OTHER_CLAUSE";
      ErrorKind2[ErrorKind2["INVALID_TAG"] = 23] = "INVALID_TAG";
      ErrorKind2[ErrorKind2["INVALID_TAG_NAME"] = 25] = "INVALID_TAG_NAME";
      ErrorKind2[ErrorKind2["UNMATCHED_CLOSING_TAG"] = 26] = "UNMATCHED_CLOSING_TAG";
      ErrorKind2[ErrorKind2["UNCLOSED_TAG"] = 27] = "UNCLOSED_TAG";
    })(ErrorKind || (ErrorKind = {}));
    (function(TYPE22) {
      TYPE22[TYPE22["literal"] = 0] = "literal";
      TYPE22[TYPE22["argument"] = 1] = "argument";
      TYPE22[TYPE22["number"] = 2] = "number";
      TYPE22[TYPE22["date"] = 3] = "date";
      TYPE22[TYPE22["time"] = 4] = "time";
      TYPE22[TYPE22["select"] = 5] = "select";
      TYPE22[TYPE22["plural"] = 6] = "plural";
      TYPE22[TYPE22["pound"] = 7] = "pound";
      TYPE22[TYPE22["tag"] = 8] = "tag";
    })(TYPE2 || (TYPE2 = {}));
    (function(SKELETON_TYPE2) {
      SKELETON_TYPE2[SKELETON_TYPE2["number"] = 0] = "number";
      SKELETON_TYPE2[SKELETON_TYPE2["dateTime"] = 1] = "dateTime";
    })(SKELETON_TYPE || (SKELETON_TYPE = {}));
    SPACE_SEPARATOR_REGEX = /[ \xA0\u1680\u2000-\u200A\u202F\u205F\u3000]/;
    DATE_TIME_REGEX = /(?:[Eec]{1,6}|G{1,5}|[Qq]{1,5}|(?:[yYur]+|U{1,5})|[ML]{1,5}|d{1,2}|D{1,3}|F{1}|[abB]{1,5}|[hkHK]{1,2}|w{1,2}|W{1}|m{1,2}|s{1,2}|[zZOvVxX]{1,4})(?=([^']*'[^']*')*[^']*$)/g;
    WHITE_SPACE_REGEX = /[\t-\r \x85\u200E\u200F\u2028\u2029]/i;
    FRACTION_PRECISION_REGEX = /^\.(?:(0+)(\*)?|(#+)|(0+)(#+))$/g;
    SIGNIFICANT_PRECISION_REGEX = /^(@+)?(\+|#+)?$/g;
    INTEGER_WIDTH_REGEX = /(\*)(0+)|(#+)(0+)|(0+)/g;
    CONCISE_INTEGER_WIDTH_REGEX = /^(0+)$/;
    SPACE_SEPARATOR_START_REGEX = new RegExp("^" + SPACE_SEPARATOR_REGEX.source + "*");
    SPACE_SEPARATOR_END_REGEX = new RegExp(SPACE_SEPARATOR_REGEX.source + "*$");
    hasNativeStartsWith = !!String.prototype.startsWith;
    hasNativeFromCodePoint = !!String.fromCodePoint;
    hasNativeFromEntries = !!Object.fromEntries;
    hasNativeCodePointAt = !!String.prototype.codePointAt;
    hasTrimStart = !!String.prototype.trimStart;
    hasTrimEnd = !!String.prototype.trimEnd;
    hasNativeIsSafeInteger = !!Number.isSafeInteger;
    isSafeInteger = hasNativeIsSafeInteger ? Number.isSafeInteger : function(n) {
      return typeof n === "number" && isFinite(n) && Math.floor(n) === n && Math.abs(n) <= 9007199254740991;
    };
    REGEX_SUPPORTS_U_AND_Y = true;
    try {
      re = RE("([^\\p{White_Space}\\p{Pattern_Syntax}]*)", "yu");
      REGEX_SUPPORTS_U_AND_Y = ((_a$6 = re.exec("a")) === null || _a$6 === void 0 ? void 0 : _a$6[0]) === "a";
    } catch (_) {
      REGEX_SUPPORTS_U_AND_Y = false;
    }
    startsWith = hasNativeStartsWith ? function startsWith2(s, search, position) {
      return s.startsWith(search, position);
    } : function startsWith3(s, search, position) {
      return s.slice(position, position + search.length) === search;
    };
    fromCodePoint = hasNativeFromCodePoint ? String.fromCodePoint : function fromCodePoint2() {
      var codePoints = [];
      for (var _i = 0; _i < arguments.length; _i++) {
        codePoints[_i] = arguments[_i];
      }
      var elements = "";
      var length = codePoints.length;
      var i = 0;
      var code2;
      while (length > i) {
        code2 = codePoints[i++];
        if (code2 > 1114111)
          throw RangeError(code2 + " is not a valid code point");
        elements += code2 < 65536 ? String.fromCharCode(code2) : String.fromCharCode(((code2 -= 65536) >> 10) + 55296, code2 % 1024 + 56320);
      }
      return elements;
    };
    fromEntries = hasNativeFromEntries ? Object.fromEntries : function fromEntries2(entries) {
      var obj = {};
      for (var _i = 0, entries_1 = entries; _i < entries_1.length; _i++) {
        var _a22 = entries_1[_i], k = _a22[0], v = _a22[1];
        obj[k] = v;
      }
      return obj;
    };
    codePointAt = hasNativeCodePointAt ? function codePointAt2(s, index2) {
      return s.codePointAt(index2);
    } : function codePointAt3(s, index2) {
      var size = s.length;
      if (index2 < 0 || index2 >= size) {
        return void 0;
      }
      var first2 = s.charCodeAt(index2);
      var second;
      return first2 < 55296 || first2 > 56319 || index2 + 1 === size || (second = s.charCodeAt(index2 + 1)) < 56320 || second > 57343 ? first2 : (first2 - 55296 << 10) + (second - 56320) + 65536;
    };
    trimStart = hasTrimStart ? function trimStart2(s) {
      return s.trimStart();
    } : function trimStart3(s) {
      return s.replace(SPACE_SEPARATOR_START_REGEX, "");
    };
    trimEnd = hasTrimEnd ? function trimEnd2(s) {
      return s.trimEnd();
    } : function trimEnd3(s) {
      return s.replace(SPACE_SEPARATOR_END_REGEX, "");
    };
    if (REGEX_SUPPORTS_U_AND_Y) {
      IDENTIFIER_PREFIX_RE_1 = RE("([^\\p{White_Space}\\p{Pattern_Syntax}]*)", "yu");
      matchIdentifierAtIndex = function matchIdentifierAtIndex2(s, index2) {
        var _a22;
        IDENTIFIER_PREFIX_RE_1.lastIndex = index2;
        var match = IDENTIFIER_PREFIX_RE_1.exec(s);
        return (_a22 = match[1]) !== null && _a22 !== void 0 ? _a22 : "";
      };
    } else {
      matchIdentifierAtIndex = function matchIdentifierAtIndex2(s, index2) {
        var match = [];
        while (true) {
          var c = codePointAt(s, index2);
          if (c === void 0 || _isWhiteSpace(c) || _isPatternSyntax(c)) {
            break;
          }
          match.push(c);
          index2 += c >= 65536 ? 2 : 1;
        }
        return fromCodePoint.apply(void 0, match);
      };
    }
    Parser2 = function() {
      function Parser22(message, options2) {
        if (options2 === void 0) {
          options2 = {};
        }
        this.message = message;
        this.position = { offset: 0, line: 1, column: 1 };
        this.ignoreTag = !!options2.ignoreTag;
        this.requiresOtherClause = !!options2.requiresOtherClause;
        this.shouldParseSkeletons = !!options2.shouldParseSkeletons;
      }
      Parser22.prototype.parse = function() {
        if (this.offset() !== 0) {
          throw Error("parser can only be used once");
        }
        return this.parseMessage(0, "", false);
      };
      Parser22.prototype.parseMessage = function(nestingLevel, parentArgType, expectingCloseTag) {
        var elements = [];
        while (!this.isEOF()) {
          var char = this.char();
          if (char === 123) {
            var result = this.parseArgument(nestingLevel, expectingCloseTag);
            if (result.err) {
              return result;
            }
            elements.push(result.val);
          } else if (char === 125 && nestingLevel > 0) {
            break;
          } else if (char === 35 && (parentArgType === "plural" || parentArgType === "selectordinal")) {
            var position = this.clonePosition();
            this.bump();
            elements.push({
              type: TYPE2.pound,
              location: createLocation(position, this.clonePosition())
            });
          } else if (char === 60 && !this.ignoreTag && this.peek() === 47) {
            if (expectingCloseTag) {
              break;
            } else {
              return this.error(ErrorKind.UNMATCHED_CLOSING_TAG, createLocation(this.clonePosition(), this.clonePosition()));
            }
          } else if (char === 60 && !this.ignoreTag && _isAlpha(this.peek() || 0)) {
            var result = this.parseTag(nestingLevel, parentArgType);
            if (result.err) {
              return result;
            }
            elements.push(result.val);
          } else {
            var result = this.parseLiteral(nestingLevel, parentArgType);
            if (result.err) {
              return result;
            }
            elements.push(result.val);
          }
        }
        return { val: elements, err: null };
      };
      Parser22.prototype.parseTag = function(nestingLevel, parentArgType) {
        var startPosition = this.clonePosition();
        this.bump();
        var tagName = this.parseTagName();
        this.bumpSpace();
        if (this.bumpIf("/>")) {
          return {
            val: {
              type: TYPE2.literal,
              value: "<" + tagName + "/>",
              location: createLocation(startPosition, this.clonePosition())
            },
            err: null
          };
        } else if (this.bumpIf(">")) {
          var childrenResult = this.parseMessage(nestingLevel + 1, parentArgType, true);
          if (childrenResult.err) {
            return childrenResult;
          }
          var children = childrenResult.val;
          var endTagStartPosition = this.clonePosition();
          if (this.bumpIf("</")) {
            if (this.isEOF() || !_isAlpha(this.char())) {
              return this.error(ErrorKind.INVALID_TAG, createLocation(endTagStartPosition, this.clonePosition()));
            }
            var closingTagNameStartPosition = this.clonePosition();
            var closingTagName = this.parseTagName();
            if (tagName !== closingTagName) {
              return this.error(ErrorKind.UNMATCHED_CLOSING_TAG, createLocation(closingTagNameStartPosition, this.clonePosition()));
            }
            this.bumpSpace();
            if (!this.bumpIf(">")) {
              return this.error(ErrorKind.INVALID_TAG, createLocation(endTagStartPosition, this.clonePosition()));
            }
            return {
              val: {
                type: TYPE2.tag,
                value: tagName,
                children,
                location: createLocation(startPosition, this.clonePosition())
              },
              err: null
            };
          } else {
            return this.error(ErrorKind.UNCLOSED_TAG, createLocation(startPosition, this.clonePosition()));
          }
        } else {
          return this.error(ErrorKind.INVALID_TAG, createLocation(startPosition, this.clonePosition()));
        }
      };
      Parser22.prototype.parseTagName = function() {
        var startOffset = this.offset();
        this.bump();
        while (!this.isEOF() && _isPotentialElementNameChar(this.char())) {
          this.bump();
        }
        return this.message.slice(startOffset, this.offset());
      };
      Parser22.prototype.parseLiteral = function(nestingLevel, parentArgType) {
        var start = this.clonePosition();
        var value = "";
        while (true) {
          var parseQuoteResult = this.tryParseQuote(parentArgType);
          if (parseQuoteResult) {
            value += parseQuoteResult;
            continue;
          }
          var parseUnquotedResult = this.tryParseUnquoted(nestingLevel, parentArgType);
          if (parseUnquotedResult) {
            value += parseUnquotedResult;
            continue;
          }
          var parseLeftAngleResult = this.tryParseLeftAngleBracket();
          if (parseLeftAngleResult) {
            value += parseLeftAngleResult;
            continue;
          }
          break;
        }
        var location = createLocation(start, this.clonePosition());
        return {
          val: { type: TYPE2.literal, value, location },
          err: null
        };
      };
      Parser22.prototype.tryParseLeftAngleBracket = function() {
        if (!this.isEOF() && this.char() === 60 && (this.ignoreTag || !_isAlphaOrSlash(this.peek() || 0))) {
          this.bump();
          return "<";
        }
        return null;
      };
      Parser22.prototype.tryParseQuote = function(parentArgType) {
        if (this.isEOF() || this.char() !== 39) {
          return null;
        }
        switch (this.peek()) {
          case 39:
            this.bump();
            this.bump();
            return "'";
          case 123:
          case 60:
          case 62:
          case 125:
            break;
          case 35:
            if (parentArgType === "plural" || parentArgType === "selectordinal") {
              break;
            }
            return null;
          default:
            return null;
        }
        this.bump();
        var codePoints = [this.char()];
        this.bump();
        while (!this.isEOF()) {
          var ch = this.char();
          if (ch === 39) {
            if (this.peek() === 39) {
              codePoints.push(39);
              this.bump();
            } else {
              this.bump();
              break;
            }
          } else {
            codePoints.push(ch);
          }
          this.bump();
        }
        return fromCodePoint.apply(void 0, codePoints);
      };
      Parser22.prototype.tryParseUnquoted = function(nestingLevel, parentArgType) {
        if (this.isEOF()) {
          return null;
        }
        var ch = this.char();
        if (ch === 60 || ch === 123 || ch === 35 && (parentArgType === "plural" || parentArgType === "selectordinal") || ch === 125 && nestingLevel > 0) {
          return null;
        } else {
          this.bump();
          return fromCodePoint(ch);
        }
      };
      Parser22.prototype.parseArgument = function(nestingLevel, expectingCloseTag) {
        var openingBracePosition = this.clonePosition();
        this.bump();
        this.bumpSpace();
        if (this.isEOF()) {
          return this.error(ErrorKind.EXPECT_ARGUMENT_CLOSING_BRACE, createLocation(openingBracePosition, this.clonePosition()));
        }
        if (this.char() === 125) {
          this.bump();
          return this.error(ErrorKind.EMPTY_ARGUMENT, createLocation(openingBracePosition, this.clonePosition()));
        }
        var value = this.parseIdentifierIfPossible().value;
        if (!value) {
          return this.error(ErrorKind.MALFORMED_ARGUMENT, createLocation(openingBracePosition, this.clonePosition()));
        }
        this.bumpSpace();
        if (this.isEOF()) {
          return this.error(ErrorKind.EXPECT_ARGUMENT_CLOSING_BRACE, createLocation(openingBracePosition, this.clonePosition()));
        }
        switch (this.char()) {
          case 125: {
            this.bump();
            return {
              val: {
                type: TYPE2.argument,
                value,
                location: createLocation(openingBracePosition, this.clonePosition())
              },
              err: null
            };
          }
          case 44: {
            this.bump();
            this.bumpSpace();
            if (this.isEOF()) {
              return this.error(ErrorKind.EXPECT_ARGUMENT_CLOSING_BRACE, createLocation(openingBracePosition, this.clonePosition()));
            }
            return this.parseArgumentOptions(nestingLevel, expectingCloseTag, value, openingBracePosition);
          }
          default:
            return this.error(ErrorKind.MALFORMED_ARGUMENT, createLocation(openingBracePosition, this.clonePosition()));
        }
      };
      Parser22.prototype.parseIdentifierIfPossible = function() {
        var startingPosition = this.clonePosition();
        var startOffset = this.offset();
        var value = matchIdentifierAtIndex(this.message, startOffset);
        var endOffset = startOffset + value.length;
        this.bumpTo(endOffset);
        var endPosition = this.clonePosition();
        var location = createLocation(startingPosition, endPosition);
        return { value, location };
      };
      Parser22.prototype.parseArgumentOptions = function(nestingLevel, expectingCloseTag, value, openingBracePosition) {
        var _a22;
        var typeStartPosition = this.clonePosition();
        var argType = this.parseIdentifierIfPossible().value;
        var typeEndPosition = this.clonePosition();
        switch (argType) {
          case "":
            return this.error(ErrorKind.EXPECT_ARGUMENT_TYPE, createLocation(typeStartPosition, typeEndPosition));
          case "number":
          case "date":
          case "time": {
            this.bumpSpace();
            var styleAndLocation = null;
            if (this.bumpIf(",")) {
              this.bumpSpace();
              var styleStartPosition = this.clonePosition();
              var result = this.parseSimpleArgStyleIfPossible();
              if (result.err) {
                return result;
              }
              var style = trimEnd(result.val);
              if (style.length === 0) {
                return this.error(ErrorKind.EXPECT_ARGUMENT_STYLE, createLocation(this.clonePosition(), this.clonePosition()));
              }
              var styleLocation = createLocation(styleStartPosition, this.clonePosition());
              styleAndLocation = { style, styleLocation };
            }
            var argCloseResult = this.tryParseArgumentClose(openingBracePosition);
            if (argCloseResult.err) {
              return argCloseResult;
            }
            var location_1 = createLocation(openingBracePosition, this.clonePosition());
            if (styleAndLocation && startsWith(styleAndLocation === null || styleAndLocation === void 0 ? void 0 : styleAndLocation.style, "::", 0)) {
              var skeleton = trimStart(styleAndLocation.style.slice(2));
              if (argType === "number") {
                var result = this.parseNumberSkeletonFromString(skeleton, styleAndLocation.styleLocation);
                if (result.err) {
                  return result;
                }
                return {
                  val: { type: TYPE2.number, value, location: location_1, style: result.val },
                  err: null
                };
              } else {
                if (skeleton.length === 0) {
                  return this.error(ErrorKind.EXPECT_DATE_TIME_SKELETON, location_1);
                }
                var style = {
                  type: SKELETON_TYPE.dateTime,
                  pattern: skeleton,
                  location: styleAndLocation.styleLocation,
                  parsedOptions: this.shouldParseSkeletons ? parseDateTimeSkeleton(skeleton) : {}
                };
                var type2 = argType === "date" ? TYPE2.date : TYPE2.time;
                return {
                  val: { type: type2, value, location: location_1, style },
                  err: null
                };
              }
            }
            return {
              val: {
                type: argType === "number" ? TYPE2.number : argType === "date" ? TYPE2.date : TYPE2.time,
                value,
                location: location_1,
                style: (_a22 = styleAndLocation === null || styleAndLocation === void 0 ? void 0 : styleAndLocation.style) !== null && _a22 !== void 0 ? _a22 : null
              },
              err: null
            };
          }
          case "plural":
          case "selectordinal":
          case "select": {
            var typeEndPosition_1 = this.clonePosition();
            this.bumpSpace();
            if (!this.bumpIf(",")) {
              return this.error(ErrorKind.EXPECT_SELECT_ARGUMENT_OPTIONS, createLocation(typeEndPosition_1, __assign4({}, typeEndPosition_1)));
            }
            this.bumpSpace();
            var identifierAndLocation = this.parseIdentifierIfPossible();
            var pluralOffset = 0;
            if (argType !== "select" && identifierAndLocation.value === "offset") {
              if (!this.bumpIf(":")) {
                return this.error(ErrorKind.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE, createLocation(this.clonePosition(), this.clonePosition()));
              }
              this.bumpSpace();
              var result = this.tryParseDecimalInteger(ErrorKind.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE, ErrorKind.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE);
              if (result.err) {
                return result;
              }
              this.bumpSpace();
              identifierAndLocation = this.parseIdentifierIfPossible();
              pluralOffset = result.val;
            }
            var optionsResult = this.tryParsePluralOrSelectOptions(nestingLevel, argType, expectingCloseTag, identifierAndLocation);
            if (optionsResult.err) {
              return optionsResult;
            }
            var argCloseResult = this.tryParseArgumentClose(openingBracePosition);
            if (argCloseResult.err) {
              return argCloseResult;
            }
            var location_2 = createLocation(openingBracePosition, this.clonePosition());
            if (argType === "select") {
              return {
                val: {
                  type: TYPE2.select,
                  value,
                  options: fromEntries(optionsResult.val),
                  location: location_2
                },
                err: null
              };
            } else {
              return {
                val: {
                  type: TYPE2.plural,
                  value,
                  options: fromEntries(optionsResult.val),
                  offset: pluralOffset,
                  pluralType: argType === "plural" ? "cardinal" : "ordinal",
                  location: location_2
                },
                err: null
              };
            }
          }
          default:
            return this.error(ErrorKind.INVALID_ARGUMENT_TYPE, createLocation(typeStartPosition, typeEndPosition));
        }
      };
      Parser22.prototype.tryParseArgumentClose = function(openingBracePosition) {
        if (this.isEOF() || this.char() !== 125) {
          return this.error(ErrorKind.EXPECT_ARGUMENT_CLOSING_BRACE, createLocation(openingBracePosition, this.clonePosition()));
        }
        this.bump();
        return { val: true, err: null };
      };
      Parser22.prototype.parseSimpleArgStyleIfPossible = function() {
        var nestedBraces = 0;
        var startPosition = this.clonePosition();
        while (!this.isEOF()) {
          var ch = this.char();
          switch (ch) {
            case 39: {
              this.bump();
              var apostrophePosition = this.clonePosition();
              if (!this.bumpUntil("'")) {
                return this.error(ErrorKind.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE, createLocation(apostrophePosition, this.clonePosition()));
              }
              this.bump();
              break;
            }
            case 123: {
              nestedBraces += 1;
              this.bump();
              break;
            }
            case 125: {
              if (nestedBraces > 0) {
                nestedBraces -= 1;
              } else {
                return {
                  val: this.message.slice(startPosition.offset, this.offset()),
                  err: null
                };
              }
              break;
            }
            default:
              this.bump();
              break;
          }
        }
        return {
          val: this.message.slice(startPosition.offset, this.offset()),
          err: null
        };
      };
      Parser22.prototype.parseNumberSkeletonFromString = function(skeleton, location) {
        var tokens = [];
        try {
          tokens = parseNumberSkeletonFromString(skeleton);
        } catch (e) {
          return this.error(ErrorKind.INVALID_NUMBER_SKELETON, location);
        }
        return {
          val: {
            type: SKELETON_TYPE.number,
            tokens,
            location,
            parsedOptions: this.shouldParseSkeletons ? parseNumberSkeleton(tokens) : {}
          },
          err: null
        };
      };
      Parser22.prototype.tryParsePluralOrSelectOptions = function(nestingLevel, parentArgType, expectCloseTag, parsedFirstIdentifier) {
        var _a22;
        var hasOtherClause = false;
        var options2 = [];
        var parsedSelectors = /* @__PURE__ */ new Set();
        var selector = parsedFirstIdentifier.value, selectorLocation = parsedFirstIdentifier.location;
        while (true) {
          if (selector.length === 0) {
            var startPosition = this.clonePosition();
            if (parentArgType !== "select" && this.bumpIf("=")) {
              var result = this.tryParseDecimalInteger(ErrorKind.EXPECT_PLURAL_ARGUMENT_SELECTOR, ErrorKind.INVALID_PLURAL_ARGUMENT_SELECTOR);
              if (result.err) {
                return result;
              }
              selectorLocation = createLocation(startPosition, this.clonePosition());
              selector = this.message.slice(startPosition.offset, this.offset());
            } else {
              break;
            }
          }
          if (parsedSelectors.has(selector)) {
            return this.error(parentArgType === "select" ? ErrorKind.DUPLICATE_SELECT_ARGUMENT_SELECTOR : ErrorKind.DUPLICATE_PLURAL_ARGUMENT_SELECTOR, selectorLocation);
          }
          if (selector === "other") {
            hasOtherClause = true;
          }
          this.bumpSpace();
          var openingBracePosition = this.clonePosition();
          if (!this.bumpIf("{")) {
            return this.error(parentArgType === "select" ? ErrorKind.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT : ErrorKind.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT, createLocation(this.clonePosition(), this.clonePosition()));
          }
          var fragmentResult = this.parseMessage(nestingLevel + 1, parentArgType, expectCloseTag);
          if (fragmentResult.err) {
            return fragmentResult;
          }
          var argCloseResult = this.tryParseArgumentClose(openingBracePosition);
          if (argCloseResult.err) {
            return argCloseResult;
          }
          options2.push([
            selector,
            {
              value: fragmentResult.val,
              location: createLocation(openingBracePosition, this.clonePosition())
            }
          ]);
          parsedSelectors.add(selector);
          this.bumpSpace();
          _a22 = this.parseIdentifierIfPossible(), selector = _a22.value, selectorLocation = _a22.location;
        }
        if (options2.length === 0) {
          return this.error(parentArgType === "select" ? ErrorKind.EXPECT_SELECT_ARGUMENT_SELECTOR : ErrorKind.EXPECT_PLURAL_ARGUMENT_SELECTOR, createLocation(this.clonePosition(), this.clonePosition()));
        }
        if (this.requiresOtherClause && !hasOtherClause) {
          return this.error(ErrorKind.MISSING_OTHER_CLAUSE, createLocation(this.clonePosition(), this.clonePosition()));
        }
        return { val: options2, err: null };
      };
      Parser22.prototype.tryParseDecimalInteger = function(expectNumberError, invalidNumberError) {
        var sign = 1;
        var startingPosition = this.clonePosition();
        if (this.bumpIf("+")) ;
        else if (this.bumpIf("-")) {
          sign = -1;
        }
        var hasDigits = false;
        var decimal = 0;
        while (!this.isEOF()) {
          var ch = this.char();
          if (ch >= 48 && ch <= 57) {
            hasDigits = true;
            decimal = decimal * 10 + (ch - 48);
            this.bump();
          } else {
            break;
          }
        }
        var location = createLocation(startingPosition, this.clonePosition());
        if (!hasDigits) {
          return this.error(expectNumberError, location);
        }
        decimal *= sign;
        if (!isSafeInteger(decimal)) {
          return this.error(invalidNumberError, location);
        }
        return { val: decimal, err: null };
      };
      Parser22.prototype.offset = function() {
        return this.position.offset;
      };
      Parser22.prototype.isEOF = function() {
        return this.offset() === this.message.length;
      };
      Parser22.prototype.clonePosition = function() {
        return {
          offset: this.position.offset,
          line: this.position.line,
          column: this.position.column
        };
      };
      Parser22.prototype.char = function() {
        var offset = this.position.offset;
        if (offset >= this.message.length) {
          throw Error("out of bound");
        }
        var code2 = codePointAt(this.message, offset);
        if (code2 === void 0) {
          throw Error("Offset " + offset + " is at invalid UTF-16 code unit boundary");
        }
        return code2;
      };
      Parser22.prototype.error = function(kind, location) {
        return {
          val: null,
          err: {
            kind,
            message: this.message,
            location
          }
        };
      };
      Parser22.prototype.bump = function() {
        if (this.isEOF()) {
          return;
        }
        var code2 = this.char();
        if (code2 === 10) {
          this.position.line += 1;
          this.position.column = 1;
          this.position.offset += 1;
        } else {
          this.position.column += 1;
          this.position.offset += code2 < 65536 ? 1 : 2;
        }
      };
      Parser22.prototype.bumpIf = function(prefix) {
        if (startsWith(this.message, prefix, this.offset())) {
          for (var i = 0; i < prefix.length; i++) {
            this.bump();
          }
          return true;
        }
        return false;
      };
      Parser22.prototype.bumpUntil = function(pattern2) {
        var currentOffset = this.offset();
        var index2 = this.message.indexOf(pattern2, currentOffset);
        if (index2 >= 0) {
          this.bumpTo(index2);
          return true;
        } else {
          this.bumpTo(this.message.length);
          return false;
        }
      };
      Parser22.prototype.bumpTo = function(targetOffset) {
        if (this.offset() > targetOffset) {
          throw Error("targetOffset " + targetOffset + " must be greater than or equal to the current offset " + this.offset());
        }
        targetOffset = Math.min(targetOffset, this.message.length);
        while (true) {
          var offset = this.offset();
          if (offset === targetOffset) {
            break;
          }
          if (offset > targetOffset) {
            throw Error("targetOffset " + targetOffset + " is at invalid UTF-16 code unit boundary");
          }
          this.bump();
          if (this.isEOF()) {
            break;
          }
        }
      };
      Parser22.prototype.bumpSpace = function() {
        while (!this.isEOF() && _isWhiteSpace(this.char())) {
          this.bump();
        }
      };
      Parser22.prototype.peek = function() {
        if (this.isEOF()) {
          return null;
        }
        var code2 = this.char();
        var offset = this.offset();
        var nextCode = this.message.charCodeAt(offset + (code2 >= 65536 ? 2 : 1));
        return nextCode !== null && nextCode !== void 0 ? nextCode : null;
      };
      return Parser22;
    }();
    serializerDefault = function() {
      return JSON.stringify(arguments);
    };
    ObjectWithoutPrototypeCache.prototype.has = function(key) {
      return key in this.cache;
    };
    ObjectWithoutPrototypeCache.prototype.get = function(key) {
      return this.cache[key];
    };
    ObjectWithoutPrototypeCache.prototype.set = function(key, value) {
      this.cache[key] = value;
    };
    cacheDefault = {
      create: function create() {
        return new ObjectWithoutPrototypeCache();
      }
    };
    strategies = {
      variadic: strategyVariadic
    };
    (function(ErrorCode2) {
      ErrorCode2["MISSING_VALUE"] = "MISSING_VALUE";
      ErrorCode2["INVALID_VALUE"] = "INVALID_VALUE";
      ErrorCode2["MISSING_INTL_API"] = "MISSING_INTL_API";
    })(ErrorCode || (ErrorCode = {}));
    FormatError = class extends Error {
      constructor(msg, code2, originalMessage) {
        super(msg);
        this.code = code2;
        this.originalMessage = originalMessage;
      }
      toString() {
        return `[formatjs Error: ${this.code}] ${this.message}`;
      }
    };
    InvalidValueError = class extends FormatError {
      constructor(variableId, value, options2, originalMessage) {
        super(`Invalid values for "${variableId}": "${value}". Options are "${Object.keys(options2).join('", "')}"`, ErrorCode.INVALID_VALUE, originalMessage);
      }
    };
    InvalidValueTypeError = class extends FormatError {
      constructor(value, type2, originalMessage) {
        super(`Value for "${value}" must be of type ${type2}`, ErrorCode.INVALID_VALUE, originalMessage);
      }
    };
    MissingValueError = class extends FormatError {
      constructor(variableId, originalMessage) {
        super(`The intl string context variable "${variableId}" was not provided to the string "${originalMessage}"`, ErrorCode.MISSING_VALUE, originalMessage);
      }
    };
    (function(PART_TYPE2) {
      PART_TYPE2[PART_TYPE2["literal"] = 0] = "literal";
      PART_TYPE2[PART_TYPE2["object"] = 1] = "object";
    })(PART_TYPE || (PART_TYPE = {}));
    IntlMessageFormat = class {
      constructor(message, locales2 = IntlMessageFormat.defaultLocale, overrideFormats, opts) {
        this.formatterCache = {
          number: {},
          dateTime: {},
          pluralRules: {}
        };
        this.format = (values) => {
          const parts = this.formatToParts(values);
          if (parts.length === 1) {
            return parts[0].value;
          }
          const result = parts.reduce((all, part) => {
            if (!all.length || part.type !== PART_TYPE.literal || typeof all[all.length - 1] !== "string") {
              all.push(part.value);
            } else {
              all[all.length - 1] += part.value;
            }
            return all;
          }, []);
          if (result.length <= 1) {
            return result[0] || "";
          }
          return result;
        };
        this.formatToParts = (values) => formatToParts(this.ast, this.locales, this.formatters, this.formats, values, void 0, this.message);
        this.resolvedOptions = () => ({
          locale: Intl.NumberFormat.supportedLocalesOf(this.locales)[0]
        });
        this.getAst = () => this.ast;
        if (typeof message === "string") {
          this.message = message;
          if (!IntlMessageFormat.__parse) {
            throw new TypeError("IntlMessageFormat.__parse must be set to process `message` of type `string`");
          }
          this.ast = IntlMessageFormat.__parse(message, {
            ignoreTag: opts?.ignoreTag
          });
        } else {
          this.ast = message;
        }
        if (!Array.isArray(this.ast)) {
          throw new TypeError("A message must be provided as a String or AST.");
        }
        this.formats = mergeConfigs(IntlMessageFormat.formats, overrideFormats);
        this.locales = locales2;
        this.formatters = opts && opts.formatters || createDefaultFormatters(this.formatterCache);
      }
      static get defaultLocale() {
        if (!IntlMessageFormat.memoizedDefaultLocale) {
          IntlMessageFormat.memoizedDefaultLocale = new Intl.NumberFormat().resolvedOptions().locale;
        }
        return IntlMessageFormat.memoizedDefaultLocale;
      }
    };
    IntlMessageFormat.memoizedDefaultLocale = null;
    IntlMessageFormat.__parse = parse$1;
    IntlMessageFormat.formats = {
      number: {
        integer: {
          maximumFractionDigits: 0
        },
        currency: {
          style: "currency"
        },
        percent: {
          style: "percent"
        }
      },
      date: {
        short: {
          month: "numeric",
          day: "numeric",
          year: "2-digit"
        },
        medium: {
          month: "short",
          day: "numeric",
          year: "numeric"
        },
        long: {
          month: "long",
          day: "numeric",
          year: "numeric"
        },
        full: {
          weekday: "long",
          month: "long",
          day: "numeric",
          year: "numeric"
        }
      },
      time: {
        short: {
          hour: "numeric",
          minute: "numeric"
        },
        medium: {
          hour: "numeric",
          minute: "numeric",
          second: "numeric"
        },
        long: {
          hour: "numeric",
          minute: "numeric",
          second: "numeric",
          timeZoneName: "short"
        },
        full: {
          hour: "numeric",
          minute: "numeric",
          second: "numeric",
          timeZoneName: "short"
        }
      }
    };
    lib_esnext_default = IntlMessageFormat;
    EMPTY_VALUES_OBJECT = {};
    RegisteredFileStrings = class {
      filename;
      stringStructure;
      localizedMessages;
      localizedStringSet;
      constructor(filename, stringStructure, localizedMessages) {
        this.filename = filename;
        this.stringStructure = stringStructure;
        this.localizedMessages = localizedMessages;
      }
      getLocalizedStringSetFor(locale) {
        if (this.localizedStringSet) {
          return this.localizedStringSet;
        }
        const localeData = this.localizedMessages.get(locale);
        if (!localeData) {
          throw new Error(`No locale data registered for '${locale}'`);
        }
        this.localizedStringSet = new LocalizedStringSet(this.filename, this.stringStructure, locale, localeData);
        return this.localizedStringSet;
      }
    };
    LocalizedStringSet = class {
      filename;
      stringStructure;
      localizedMessages;
      cachedSimpleStrings = /* @__PURE__ */ new Map();
      cachedMessageFormatters = /* @__PURE__ */ new Map();
      localeForFormatter;
      constructor(filename, stringStructure, locale, localizedMessages) {
        this.filename = filename;
        this.stringStructure = stringStructure;
        this.localizedMessages = localizedMessages;
        this.localeForFormatter = locale === "en-XA" || locale === "en-XL" ? "de-DE" : locale;
      }
      getLocalizedString(message, values = EMPTY_VALUES_OBJECT) {
        if (values === EMPTY_VALUES_OBJECT || Object.keys(values).length === 0) {
          return this.getSimpleLocalizedString(message);
        }
        return this.getFormattedLocalizedString(message, values);
      }
      getMessageFormatterFor(message) {
        const keyname = Object.keys(this.stringStructure).find((key) => this.stringStructure[key] === message);
        if (!keyname) {
          throw new Error(`Unable to locate '${message}' in UIStrings object`);
        }
        const i18nId = `${this.filename} | ${keyname}`;
        const localeMessage = this.localizedMessages[i18nId];
        const messageToTranslate = localeMessage ? localeMessage.message : message;
        return new lib_esnext_default(messageToTranslate, this.localeForFormatter, void 0, { ignoreTag: true });
      }
      getSimpleLocalizedString(message) {
        const cachedSimpleString = this.cachedSimpleStrings.get(message);
        if (cachedSimpleString) {
          return cachedSimpleString;
        }
        const formatter2 = this.getMessageFormatterFor(message);
        try {
          const translatedString = formatter2.format();
          this.cachedSimpleStrings.set(message, translatedString);
          return translatedString;
        } catch {
          const formatter3 = new lib_esnext_default(message, this.localeForFormatter, void 0, { ignoreTag: true });
          const translatedString = formatter3.format();
          this.cachedSimpleStrings.set(message, translatedString);
          return translatedString;
        }
      }
      getFormattedLocalizedString(message, values) {
        let formatter2 = this.cachedMessageFormatters.get(message);
        if (!formatter2) {
          formatter2 = this.getMessageFormatterFor(message);
          this.cachedMessageFormatters.set(message, formatter2);
        }
        try {
          return formatter2.format(values);
        } catch {
          const formatter3 = new lib_esnext_default(message, this.localeForFormatter, void 0, { ignoreTag: true });
          return formatter3.format(values);
        }
      }
    };
    I18n = class {
      supportedLocales;
      localeData = /* @__PURE__ */ new Map();
      defaultLocale;
      constructor(supportedLocales, defaultLocale) {
        this.defaultLocale = defaultLocale;
        this.supportedLocales = new Set(supportedLocales);
      }
      registerLocaleData(locale, messages) {
        this.localeData.set(locale, messages);
      }
      hasLocaleDataForTest(locale) {
        return this.localeData.has(locale);
      }
      resetLocaleDataForTest() {
        this.localeData.clear();
      }
      registerFileStrings(filename, stringStructure) {
        return new RegisteredFileStrings(filename, stringStructure, this.localeData);
      }
      lookupClosestSupportedLocale(locale) {
        const canonicalLocale = Intl.getCanonicalLocales(locale)[0];
        const localeParts = canonicalLocale.split("-");
        while (localeParts.length) {
          const candidate = localeParts.join("-");
          if (this.supportedLocales.has(candidate)) {
            return candidate;
          }
          localeParts.pop();
        }
        return this.defaultLocale;
      }
    };
    LOCALES = [
      "en-US"
    ];
    DEFAULT_LOCALE2 = "en-US";
    LOCAL_FETCH_PATTERN = "./locales/@LOCALE@.json";
    i18nInstance = new I18n(LOCALES, DEFAULT_LOCALE2);
    i18nImpl = /* @__PURE__ */ Object.freeze({
      __proto__: null,
      deserializeUIString,
      fetchAndRegisterLocaleData,
      getAllSupportedDevToolsLocales,
      getLazilyComputedLocalizedString,
      getLocalizedLanguageRegion,
      getLocalizedString,
      hasLocaleDataForTest,
      lockedLazyString,
      lockedString,
      lookupClosestSupportedDevToolsLocale,
      registerLocaleDataForTest,
      registerUIStrings,
      resetLocaleDataForTest,
      serializeUIString
    });
    narrowMillisecondsInteger = defineFormatter({
      style: "unit",
      unit: "millisecond",
      unitDisplay: "narrow",
      minimumFractionDigits: 0,
      maximumFractionDigits: 0
    });
    longMilliseconds = defineFormatter({
      style: "unit",
      unit: "millisecond",
      unitDisplay: "long",
      minimumFractionDigits: 0,
      maximumFractionDigits: 0
    });
    narrowMicrosecondsInteger = defineFormatter({
      style: "unit",
      unit: "microsecond",
      unitDisplay: "narrow",
      minimumFractionDigits: 0,
      maximumFractionDigits: 0
    });
    narrowMillisecondsDecimal = defineFormatter({
      style: "unit",
      unit: "millisecond",
      unitDisplay: "narrow",
      minimumFractionDigits: 2,
      maximumFractionDigits: 2
    });
    narrowSecondsDecimal = defineFormatter({
      style: "unit",
      unit: "second",
      unitDisplay: "narrow",
      minimumFractionDigits: 2,
      maximumFractionDigits: 2
    });
    shortMinutesDecimal = defineFormatter({
      style: "unit",
      unit: "minute",
      unitDisplay: "short",
      minimumFractionDigits: 0,
      maximumFractionDigits: 1
    });
    shortHoursDecimal = defineFormatter({
      style: "unit",
      unit: "hour",
      unitDisplay: "short",
      minimumFractionDigits: 0,
      maximumFractionDigits: 1
    });
    longDaysDecimal = defineFormatter({
      style: "unit",
      unit: "day",
      unitDisplay: "long",
      minimumFractionDigits: 0,
      maximumFractionDigits: 1
    });
    preciseMillisToStringFormattersCache = /* @__PURE__ */ new Map();
    preciseSecondsToStringFormattersCache = /* @__PURE__ */ new Map();
    timeUtilities = /* @__PURE__ */ Object.freeze({
      __proto__: null,
      formatMicroSecondsAsMillisFixed,
      formatMicroSecondsAsMillisFixedExpanded,
      formatMicroSecondsAsSeconds,
      formatMicroSecondsTime,
      millisToString,
      preciseMillisToString,
      preciseSecondsToString,
      secondsToString
    });
    i18n = /* @__PURE__ */ Object.freeze({
      __proto__: null,
      ByteUtilities,
      DevToolsLocale: DevToolsLocale$1,
      NumberFormatter,
      TimeUtilities: timeUtilities,
      i18n: i18nImpl
    });
    UIStrings$1b = {
      elementsPanel: "Elements panel",
      stylesSidebar: "styles sidebar",
      changesDrawer: "Changes drawer",
      issuesView: "Issues view",
      networkPanel: "Network panel",
      requestConditionsDrawer: "Request conditions drawer",
      applicationPanel: "Application panel",
      sourcesPanel: "Sources panel",
      timelinePanel: "Performance panel",
      memoryInspectorPanel: "Memory inspector panel",
      developerResourcesPanel: "Developer Resources panel",
      animationsPanel: "Animations panel"
    };
    str_$1a = registerUIStrings("core/common/Revealer.ts", UIStrings$1b);
    i18nLazyString$h = getLazilyComputedLocalizedString.bind(void 0, str_$1a);
    RevealerRegistry = class _RevealerRegistry {
      registeredRevealers = [];
      static instance() {
        if (revealerRegistry === void 0) {
          revealerRegistry = new _RevealerRegistry();
        }
        return revealerRegistry;
      }
      static removeInstance() {
        revealerRegistry = void 0;
      }
      register(registration) {
        this.registeredRevealers.push(registration);
      }
      async reveal(revealable, omitFocus) {
        const revealers = await Promise.all(this.getApplicableRegisteredRevealers(revealable).map((registration) => registration.loadRevealer()));
        if (revealers.length < 1) {
          throw new Error(`No revealers found for ${revealable}`);
        }
        if (revealers.length > 1) {
          throw new Error(`Conflicting reveals found for ${revealable}`);
        }
        return await revealers[0].reveal(revealable, omitFocus);
      }
      getApplicableRegisteredRevealers(revealable) {
        return this.registeredRevealers.filter((registration) => {
          for (const contextType of registration.contextTypes()) {
            if (revealable instanceof contextType) {
              return true;
            }
          }
          return false;
        });
      }
    };
    RevealerDestination = {
      DEVELOPER_RESOURCES_PANEL: i18nLazyString$h(UIStrings$1b.developerResourcesPanel),
      ELEMENTS_PANEL: i18nLazyString$h(UIStrings$1b.elementsPanel),
      STYLES_SIDEBAR: i18nLazyString$h(UIStrings$1b.stylesSidebar),
      CHANGES_DRAWER: i18nLazyString$h(UIStrings$1b.changesDrawer),
      ISSUES_VIEW: i18nLazyString$h(UIStrings$1b.issuesView),
      NETWORK_PANEL: i18nLazyString$h(UIStrings$1b.networkPanel),
      REQUEST_CONDITIONS_DRAWER: i18nLazyString$h(UIStrings$1b.requestConditionsDrawer),
      TIMELINE_PANEL: i18nLazyString$h(UIStrings$1b.timelinePanel),
      APPLICATION_PANEL: i18nLazyString$h(UIStrings$1b.applicationPanel),
      SOURCES_PANEL: i18nLazyString$h(UIStrings$1b.sourcesPanel),
      MEMORY_INSPECTOR_PANEL: i18nLazyString$h(UIStrings$1b.memoryInspectorPanel),
      ANIMATIONS_PANEL: i18nLazyString$h(UIStrings$1b.animationsPanel)
    };
    Revealer = /* @__PURE__ */ Object.freeze({
      __proto__: null,
      RevealerDestination,
      RevealerRegistry,
      registerRevealer,
      reveal,
      revealDestination
    });
    Console = class _Console extends ObjectWrapper {
      #messages = [];
      static instance(opts) {
        if (!consoleInstance || opts?.forceNew) {
          consoleInstance = new _Console();
        }
        return consoleInstance;
      }
      static removeInstance() {
        consoleInstance = void 0;
      }
      addMessage(text, level = "info", show = false, source2) {
        const message = new Message$1(text, level, Date.now(), show, source2);
        this.#messages.push(message);
        this.dispatchEventToListeners("messageAdded", message);
      }
      log(text) {
        this.addMessage(text, "info");
      }
      warn(text, source2) {
        this.addMessage(text, "warning", void 0, source2);
      }
      error(text, show = true) {
        this.addMessage(text, "error", show);
      }
      messages() {
        return this.#messages;
      }
      show() {
        void this.showPromise();
      }
      showPromise() {
        return reveal(this);
      }
    };
    (function(FrontendMessageSource2) {
      FrontendMessageSource2["CSS"] = "css";
      FrontendMessageSource2["ConsoleAPI"] = "console-api";
      FrontendMessageSource2["ISSUE_PANEL"] = "issue-panel";
      FrontendMessageSource2["SELF_XSS"] = "self-xss";
    })(FrontendMessageSource || (FrontendMessageSource = {}));
    Message$1 = class Message {
      text;
      level;
      timestamp;
      show;
      source;
      constructor(text, level, timestamp, show, source2) {
        this.text = text;
        this.level = level;
        this.timestamp = typeof timestamp === "number" ? timestamp : Date.now();
        this.show = show;
        if (source2) {
          this.source = source2;
        }
      }
    };
    Console$1 = /* @__PURE__ */ Object.freeze({
      __proto__: null,
      Console,
      get FrontendMessageSource() {
        return FrontendMessageSource;
      },
      Message: Message$1
    });
    debounce = function(func, delay) {
      let timer2;
      const debounced = (...args2) => {
        clearTimeout(timer2);
        timer2 = setTimeout(() => func(...args2), testDebounceOverride ? 0 : delay);
      };
      return debounced;
    };
    testDebounceOverride = false;
    Debouncer = /* @__PURE__ */ Object.freeze({
      __proto__: null,
      debounce,
      disableTestOverride,
      enableTestOverride
    });
    EventTarget$1 = /* @__PURE__ */ Object.freeze({
      __proto__: null,
      fireEvent,
      removeEventListeners
    });
    Gzip = /* @__PURE__ */ Object.freeze({
      __proto__: null,
      arrayBufferToString,
      compress,
      compressStream,
      createMonitoredStream,
      decompress,
      decompressDeflate,
      decompressStream,
      fileToString,
      isGzip
    });
    JavaScriptMetaData = /* @__PURE__ */ Object.freeze({
      __proto__: null
    });
    UNINITIALIZED = Symbol("uninitialized");
    ERROR_STATE = Symbol("error");
    Lazy = /* @__PURE__ */ Object.freeze({
      __proto__: null,
      lazy
    });
    MapWithDefault = class extends Map {
      getOrInsert(key, defaultValue) {
        if (!this.has(key)) {
          this.set(key, defaultValue);
        }
        return this.get(key);
      }
      getOrInsertComputed(key, callbackFunction) {
        if (!this.has(key)) {
          this.set(key, callbackFunction(key));
        }
        return this.get(key);
      }
    };
    MapWithDefault$1 = /* @__PURE__ */ Object.freeze({
      __proto__: null,
      MapWithDefault
    });
    Mutex2 = class {
      #locked = false;
      #acquirers = [];
      acquire() {
        const state = { resolved: false };
        if (this.#locked) {
          return new Promise((resolve2) => {
            this.#acquirers.push(() => resolve2(this.#release.bind(this, state)));
          });
        }
        this.#locked = true;
        return Promise.resolve(this.#release.bind(this, state));
      }
      #release(state) {
        if (state.resolved) {
          throw new Error("Cannot release more than once.");
        }
        state.resolved = true;
        const resolve2 = this.#acquirers.shift();
        if (!resolve2) {
          this.#locked = false;
          return;
        }
        resolve2();
      }
      async run(action) {
        const release = await this.acquire();
        try {
          const result = await action();
          return result;
        } finally {
          release();
        }
      }
    };
    Mutex$1 = /* @__PURE__ */ Object.freeze({
      __proto__: null,
      Mutex: Mutex2
    });
    ParsedURL2 = class _ParsedURL {
      isValid = false;
      url;
      scheme = "";
      user = "";
      host = "";
      port = "";
      path = "";
      queryParams = "";
      fragment = "";
      folderPathComponents = "";
      lastPathComponent = "";
      blobInnerScheme;
      #displayName;
      #dataURLDisplayName;
      constructor(url) {
        this.url = url;
        const isBlobUrl = this.url.startsWith("blob:");
        const urlToMatch = isBlobUrl ? url.substring(5) : url;
        const match = urlToMatch.match(_ParsedURL.urlRegex());
        if (match) {
          this.isValid = true;
          if (isBlobUrl) {
            this.blobInnerScheme = match[2].toLowerCase();
            this.scheme = "blob";
          } else {
            this.scheme = match[2].toLowerCase();
          }
          this.user = match[3] ?? "";
          this.host = match[4] ?? "";
          this.port = match[5] ?? "";
          this.path = match[6] ?? "/";
          this.queryParams = match[7] ?? "";
          this.fragment = match[8] ?? "";
        } else {
          if (this.url.startsWith("data:")) {
            this.scheme = "data";
            return;
          }
          if (this.url.startsWith("blob:")) {
            this.scheme = "blob";
            return;
          }
          if (this.url === "about:blank") {
            this.scheme = "about";
            return;
          }
          this.path = this.url;
        }
        const lastSlashExceptTrailingIndex = this.path.lastIndexOf("/", this.path.length - 2);
        if (lastSlashExceptTrailingIndex !== -1) {
          this.lastPathComponent = this.path.substring(lastSlashExceptTrailingIndex + 1);
        } else {
          this.lastPathComponent = this.path;
        }
        const lastSlashIndex = this.path.lastIndexOf("/");
        if (lastSlashIndex !== -1) {
          this.folderPathComponents = this.path.substring(0, lastSlashIndex);
        }
      }
      static fromString(string2) {
        const parsedURL = new _ParsedURL(string2.toString());
        if (parsedURL.isValid) {
          return parsedURL;
        }
        return null;
      }
      static preEncodeSpecialCharactersInPath(path14) {
        for (const specialChar of ["%", ";", "#", "?", " "]) {
          path14 = path14.replaceAll(specialChar, encodeURIComponent(specialChar));
        }
        return path14;
      }
      static rawPathToEncodedPathString(path14) {
        const partiallyEncoded = _ParsedURL.preEncodeSpecialCharactersInPath(path14);
        if (path14.startsWith("/")) {
          return new URL(partiallyEncoded, "file:///").pathname;
        }
        return new URL("/" + partiallyEncoded, "file:///").pathname.substr(1);
      }
      static encodedFromParentPathAndName(parentPath, name) {
        return _ParsedURL.concatenate(parentPath, "/", _ParsedURL.preEncodeSpecialCharactersInPath(name));
      }
      static urlFromParentUrlAndName(parentUrl, name) {
        return _ParsedURL.concatenate(parentUrl, "/", _ParsedURL.preEncodeSpecialCharactersInPath(name));
      }
      static encodedPathToRawPathString(encPath) {
        return decodeURIComponent(encPath);
      }
      static rawPathToUrlString(fileSystemPath) {
        let preEncodedPath = _ParsedURL.preEncodeSpecialCharactersInPath(fileSystemPath.replace(/\\/g, "/"));
        preEncodedPath = preEncodedPath.replace(/\\/g, "/");
        if (!preEncodedPath.startsWith("file://")) {
          if (preEncodedPath.startsWith("/")) {
            preEncodedPath = "file://" + preEncodedPath;
          } else {
            preEncodedPath = "file:///" + preEncodedPath;
          }
        }
        return new URL(preEncodedPath).toString();
      }
      static relativePathToUrlString(relativePath, baseURL) {
        const preEncodedPath = _ParsedURL.preEncodeSpecialCharactersInPath(relativePath.replace(/\\/g, "/"));
        return new URL(preEncodedPath, baseURL).toString();
      }
      static urlToRawPathString(fileURL, isWindows2) {
        console.assert(fileURL.startsWith("file://"), "This must be a file URL.");
        const decodedFileURL = decodeURIComponent(fileURL);
        if (isWindows2) {
          return decodedFileURL.substr("file:///".length).replace(/\//g, "\\");
        }
        return decodedFileURL.substr("file://".length);
      }
      static sliceUrlToEncodedPathString(url, start) {
        return url.substring(start);
      }
      static substr(devToolsPath, from2, length) {
        return devToolsPath.substr(from2, length);
      }
      static substring(devToolsPath, start, end) {
        return devToolsPath.substring(start, end);
      }
      static prepend(prefix, devToolsPath) {
        return prefix + devToolsPath;
      }
      static concatenate(devToolsPath, ...appendage) {
        return devToolsPath.concat(...appendage);
      }
      static trim(devToolsPath) {
        return devToolsPath.trim();
      }
      static slice(devToolsPath, start, end) {
        return devToolsPath.slice(start, end);
      }
      static join(devToolsPaths, separator) {
        return devToolsPaths.join(separator);
      }
      static split(devToolsPath, separator, limit2) {
        return devToolsPath.split(separator, limit2);
      }
      static toLowerCase(devToolsPath) {
        return devToolsPath.toLowerCase();
      }
      static isValidUrlString(str) {
        return new _ParsedURL(str).isValid;
      }
      static urlWithoutHash(url) {
        const hashIndex = url.indexOf("#");
        if (hashIndex !== -1) {
          return url.substr(0, hashIndex);
        }
        return url;
      }
      static urlRegex() {
        if (_ParsedURL.urlRegexInstance) {
          return _ParsedURL.urlRegexInstance;
        }
        const schemeRegex = /([A-Za-z][A-Za-z0-9+.-]*):\/\//;
        const userRegex = /(?:([A-Za-z0-9\-._~%!$&'()*+,;=:]*)@)?/;
        const hostRegex = /((?:\[::\d?\])|(?:[^\s\/:]*))/;
        const portRegex = /(?::([\d]+))?/;
        const pathRegex = /(\/[^#?]*)?/;
        const queryRegex = /(?:\?([^#]*))?/;
        const fragmentRegex = /(?:#(.*))?/;
        _ParsedURL.urlRegexInstance = new RegExp("^(" + schemeRegex.source + userRegex.source + hostRegex.source + portRegex.source + ")" + pathRegex.source + queryRegex.source + fragmentRegex.source + "$");
        return _ParsedURL.urlRegexInstance;
      }
      static extractPath(url) {
        const parsedURL = this.fromString(url);
        return parsedURL ? parsedURL.path : "";
      }
      static extractOrigin(url) {
        const parsedURL = this.fromString(url);
        return parsedURL ? parsedURL.securityOrigin() : EmptyUrlString;
      }
      static extractExtension(url) {
        url = _ParsedURL.urlWithoutHash(url);
        const indexOfQuestionMark = url.indexOf("?");
        if (indexOfQuestionMark !== -1) {
          url = url.substr(0, indexOfQuestionMark);
        }
        const lastIndexOfSlash = url.lastIndexOf("/");
        if (lastIndexOfSlash !== -1) {
          url = url.substr(lastIndexOfSlash + 1);
        }
        const lastIndexOfDot = url.lastIndexOf(".");
        if (lastIndexOfDot !== -1) {
          url = url.substr(lastIndexOfDot + 1);
          const lastIndexOfPercent = url.indexOf("%");
          if (lastIndexOfPercent !== -1) {
            return url.substr(0, lastIndexOfPercent);
          }
          return url;
        }
        return "";
      }
      static extractName(url) {
        if (url.endsWith("/")) {
          url = url.slice(0, -1);
        }
        let index2 = url.lastIndexOf("/");
        const pathAndQuery = index2 !== -1 ? url.substr(index2 + 1) : url;
        index2 = pathAndQuery.indexOf("?");
        return index2 < 0 ? pathAndQuery : pathAndQuery.substr(0, index2);
      }
      static completeURL(baseURL, href) {
        if (href.startsWith("data:") || href.startsWith("blob:") || href.startsWith("javascript:") || href.startsWith("mailto:")) {
          return href;
        }
        const trimmedHref = href.trim();
        const parsedHref = this.fromString(trimmedHref);
        if (parsedHref?.scheme) {
          const securityOrigin2 = parsedHref.securityOrigin();
          const pathText2 = normalizePath2(parsedHref.path);
          const queryText2 = parsedHref.queryParams && `?${parsedHref.queryParams}`;
          const fragmentText = parsedHref.fragment && `#${parsedHref.fragment}`;
          return securityOrigin2 + pathText2 + queryText2 + fragmentText;
        }
        const parsedURL = this.fromString(baseURL);
        if (!parsedURL) {
          return null;
        }
        if (parsedURL.isDataURL()) {
          return href;
        }
        if (href.length > 1 && href.charAt(0) === "/" && href.charAt(1) === "/") {
          return parsedURL.scheme + ":" + href;
        }
        const securityOrigin = parsedURL.securityOrigin();
        const pathText = parsedURL.path;
        const queryText = parsedURL.queryParams ? "?" + parsedURL.queryParams : "";
        if (!href.length) {
          return securityOrigin + pathText + queryText;
        }
        if (href.charAt(0) === "#") {
          return securityOrigin + pathText + queryText + href;
        }
        if (href.charAt(0) === "?") {
          return securityOrigin + pathText + href;
        }
        const hrefMatches = href.match(/^[^#?]*/);
        if (!hrefMatches || !href.length) {
          throw new Error("Invalid href");
        }
        let hrefPath = hrefMatches[0];
        const hrefSuffix = href.substring(hrefPath.length);
        if (hrefPath.charAt(0) !== "/") {
          hrefPath = parsedURL.folderPathComponents + "/" + hrefPath;
        }
        return securityOrigin + normalizePath2(hrefPath) + hrefSuffix;
      }
      static splitLineAndColumn(string2) {
        const beforePathMatch = string2.match(_ParsedURL.urlRegex());
        let beforePath = "";
        let pathAndAfter = string2;
        if (beforePathMatch) {
          beforePath = beforePathMatch[1];
          pathAndAfter = string2.substring(beforePathMatch[1].length);
        }
        const lineColumnRegEx = /(?::(\d+))?(?::(\d+))?$/;
        const lineColumnMatch = lineColumnRegEx.exec(pathAndAfter);
        let lineNumber;
        let columnNumber;
        console.assert(Boolean(lineColumnMatch));
        if (!lineColumnMatch) {
          return { url: string2, lineNumber: 0, columnNumber: 0 };
        }
        if (typeof lineColumnMatch[1] === "string") {
          lineNumber = parseInt(lineColumnMatch[1], 10);
          lineNumber = isNaN(lineNumber) ? void 0 : lineNumber - 1;
        }
        if (typeof lineColumnMatch[2] === "string") {
          columnNumber = parseInt(lineColumnMatch[2], 10);
          columnNumber = isNaN(columnNumber) ? void 0 : columnNumber - 1;
        }
        let url = beforePath + pathAndAfter.substring(0, pathAndAfter.length - lineColumnMatch[0].length);
        if (lineColumnMatch[1] === void 0 && lineColumnMatch[2] === void 0) {
          const wasmCodeOffsetRegex = /wasm-function\[\d+\]:0x([a-z0-9]+)$/g;
          const wasmCodeOffsetMatch = wasmCodeOffsetRegex.exec(pathAndAfter);
          if (wasmCodeOffsetMatch && typeof wasmCodeOffsetMatch[1] === "string") {
            url = _ParsedURL.removeWasmFunctionInfoFromURL(url);
            columnNumber = parseInt(wasmCodeOffsetMatch[1], 16);
            columnNumber = isNaN(columnNumber) ? void 0 : columnNumber;
          }
        }
        return { url, lineNumber, columnNumber };
      }
      static removeWasmFunctionInfoFromURL(url) {
        const wasmFunctionRegEx = /:wasm-function\[\d+\]/;
        const wasmFunctionIndex = url.search(wasmFunctionRegEx);
        if (wasmFunctionIndex === -1) {
          return url;
        }
        return _ParsedURL.substring(url, 0, wasmFunctionIndex);
      }
      static beginsWithWindowsDriveLetter(url) {
        return /^[A-Za-z]:/.test(url);
      }
      static beginsWithScheme(url) {
        return /^[A-Za-z][A-Za-z0-9+.-]*:/.test(url);
      }
      static isRelativeURL(url) {
        return !this.beginsWithScheme(url) || this.beginsWithWindowsDriveLetter(url);
      }
      get displayName() {
        if (this.#displayName) {
          return this.#displayName;
        }
        if (this.isDataURL()) {
          return this.dataURLDisplayName();
        }
        if (this.isBlobURL()) {
          return this.url;
        }
        if (this.isAboutBlank()) {
          return this.url;
        }
        this.#displayName = this.lastPathComponent;
        if (!this.#displayName) {
          this.#displayName = (this.host || "") + "/";
        }
        if (this.#displayName === "/") {
          this.#displayName = this.url;
        }
        return this.#displayName;
      }
      dataURLDisplayName() {
        if (this.#dataURLDisplayName) {
          return this.#dataURLDisplayName;
        }
        if (!this.isDataURL()) {
          return "";
        }
        this.#dataURLDisplayName = trimEndWithMaxLength(this.url, 20);
        return this.#dataURLDisplayName;
      }
      isAboutBlank() {
        return this.url === "about:blank";
      }
      isDataURL() {
        return this.scheme === "data";
      }
      extractDataUrlMimeType() {
        const regexp = /^data:((?<type>\w+)\/(?<subtype>\w+))?(;base64)?,/;
        const match = this.url.match(regexp);
        return {
          type: match?.groups?.type,
          subtype: match?.groups?.subtype
        };
      }
      isBlobURL() {
        return this.url.startsWith("blob:");
      }
      lastPathComponentWithFragment() {
        return this.lastPathComponent + (this.fragment ? "#" + this.fragment : "");
      }
      domain() {
        if (this.isDataURL()) {
          return "data:";
        }
        return this.host + (this.port ? ":" + this.port : "");
      }
      securityOrigin() {
        if (this.isDataURL()) {
          return "data:";
        }
        const scheme = this.isBlobURL() ? this.blobInnerScheme : this.scheme;
        return scheme + "://" + this.domain();
      }
      urlWithoutScheme() {
        if (this.scheme && this.url.startsWith(this.scheme + "://")) {
          return this.url.substring(this.scheme.length + 3);
        }
        return this.url;
      }
      static urlRegexInstance = null;
    };
    ParsedURL$1 = /* @__PURE__ */ Object.freeze({
      __proto__: null,
      ParsedURL: ParsedURL2,
      normalizePath: normalizePath2,
      schemeIs: schemeIs2
    });
    Progress = class {
      totalWork = 0;
      worked = 0;
      title;
      canceled = false;
      done = false;
    };
    CompositeProgress = class {
      parent;
      #children;
      #childrenDone;
      constructor(parent) {
        this.parent = parent;
        this.#children = [];
        this.#childrenDone = 0;
        this.parent.totalWork = 1;
        this.parent.worked = 0;
      }
      childDone() {
        if (++this.#childrenDone !== this.#children.length) {
          return;
        }
        this.parent.done = true;
      }
      createSubProgress(weight) {
        const child = new SubProgress(this, weight);
        this.#children.push(child);
        return child;
      }
      update() {
        let totalWeights = 0;
        let done = 0;
        for (let i = 0; i < this.#children.length; ++i) {
          const child = this.#children[i];
          if (child.totalWork) {
            done += child.weight * child.worked / child.totalWork;
          }
          totalWeights += child.weight;
        }
        this.parent.worked = done / totalWeights;
      }
    };
    SubProgress = class {
      #composite;
      #weight;
      #worked;
      #totalWork;
      constructor(composite, weight) {
        this.#composite = composite;
        this.#weight = weight || 1;
        this.#worked = 0;
        this.#totalWork = 0;
      }
      get canceled() {
        return this.#composite.parent.canceled;
      }
      set title(title2) {
        this.#composite.parent.title = title2;
      }
      set done(done) {
        if (!done) {
          return;
        }
        this.worked = this.#totalWork;
        this.#composite.childDone();
      }
      set totalWork(totalWork) {
        this.#totalWork = totalWork;
        this.#composite.update();
      }
      set worked(worked) {
        this.#worked = worked;
        this.#composite.update();
      }
      get weight() {
        return this.#weight;
      }
      get worked() {
        return this.#worked;
      }
      get totalWork() {
        return this.#totalWork;
      }
    };
    ProgressProxy = class {
      #delegate;
      #doneCallback;
      #updateCallback;
      constructor(delegate, doneCallback, updateCallback) {
        this.#delegate = delegate;
        this.#doneCallback = doneCallback;
        this.#updateCallback = updateCallback;
      }
      get canceled() {
        return this.#delegate ? this.#delegate.canceled : false;
      }
      set title(title2) {
        if (this.#delegate) {
          this.#delegate.title = title2;
        }
        if (this.#updateCallback) {
          this.#updateCallback();
        }
      }
      get title() {
        return this.#delegate?.title ?? "";
      }
      set done(done) {
        if (this.#delegate) {
          this.#delegate.done = done;
        }
        if (done && this.#doneCallback) {
          this.#doneCallback();
        }
      }
      get done() {
        return this.#delegate ? this.#delegate.done : false;
      }
      set totalWork(totalWork) {
        if (this.#delegate) {
          this.#delegate.totalWork = totalWork;
        }
        if (this.#updateCallback) {
          this.#updateCallback();
        }
      }
      get totalWork() {
        return this.#delegate ? this.#delegate.totalWork : 0;
      }
      set worked(worked) {
        if (this.#delegate) {
          this.#delegate.worked = worked;
        }
        if (this.#updateCallback) {
          this.#updateCallback?.();
        }
      }
      get worked() {
        return this.#delegate ? this.#delegate.worked : 0;
      }
    };
    Progress$1 = /* @__PURE__ */ Object.freeze({
      __proto__: null,
      CompositeProgress,
      Progress,
      ProgressProxy,
      SubProgress
    });
    ResolverBase = class {
      #unresolvedIds = /* @__PURE__ */ new Map();
      async waitFor(id2) {
        const obj = this.getForId(id2);
        if (!obj) {
          return await this.getOrCreatePromise(id2);
        }
        return obj;
      }
      tryGet(id2, callback) {
        const obj = this.getForId(id2);
        if (!obj) {
          const swallowTheError = () => {
          };
          void this.getOrCreatePromise(id2).catch(swallowTheError).then((obj2) => {
            if (obj2) {
              callback(obj2);
            }
          });
          return null;
        }
        return obj;
      }
      clear() {
        this.stopListening();
        for (const [id2, { reject }] of this.#unresolvedIds.entries()) {
          reject(new Error(`Object with ${id2} never resolved.`));
        }
        this.#unresolvedIds.clear();
      }
      getOrCreatePromise(id2) {
        const promiseInfo = this.#unresolvedIds.get(id2);
        if (promiseInfo) {
          return promiseInfo.promise;
        }
        const { resolve: resolve2, reject, promise } = Promise.withResolvers();
        this.#unresolvedIds.set(id2, { promise, resolve: resolve2, reject });
        this.startListening();
        return promise;
      }
      onResolve(id2, t) {
        const promiseInfo = this.#unresolvedIds.get(id2);
        this.#unresolvedIds.delete(id2);
        if (this.#unresolvedIds.size === 0) {
          this.stopListening();
        }
        promiseInfo?.resolve(t);
      }
    };
    ResolverBase$1 = /* @__PURE__ */ Object.freeze({
      __proto__: null,
      ResolverBase
    });
    UIStrings$1a = {
      fetchAndXHR: "`Fetch` and `XHR`",
      javascript: "JavaScript",
      js: "JS",
      css: "CSS",
      img: "Img",
      media: "Media",
      font: "Font",
      doc: "Doc",
      socketShort: "Socket",
      webassembly: "WebAssembly",
      wasm: "Wasm",
      manifest: "Manifest",
      other: "Other",
      document: "Document",
      stylesheet: "Stylesheet",
      image: "Image",
      script: "Script",
      texttrack: "TextTrack",
      fetch: "Fetch",
      eventsource: "EventSource",
      websocket: "WebSocket",
      webtransport: "WebTransport",
      directsocket: "DirectSocket",
      signedexchange: "SignedExchange",
      ping: "Ping",
      cspviolationreport: "CSPViolationReport",
      preflight: "Preflight",
      fedcm: "FedCM"
    };
    str_$19 = registerUIStrings("core/common/ResourceType.ts", UIStrings$1a);
    i18nLazyString$g = getLazilyComputedLocalizedString.bind(void 0, str_$19);
    ResourceType = class {
      #name;
      #title;
      #category;
      #isTextType;
      constructor(name, title2, category, isTextType2) {
        this.#name = name;
        this.#title = title2;
        this.#category = category;
        this.#isTextType = isTextType2;
      }
      static fromMimeType(mimeType) {
        if (!mimeType) {
          return resourceTypes.Other;
        }
        if (mimeType.startsWith("text/html")) {
          return resourceTypes.Document;
        }
        if (mimeType.startsWith("text/css")) {
          return resourceTypes.Stylesheet;
        }
        if (mimeType.startsWith("image/")) {
          return resourceTypes.Image;
        }
        if (mimeType.startsWith("text/")) {
          return resourceTypes.Script;
        }
        if (mimeType.includes("font")) {
          return resourceTypes.Font;
        }
        if (mimeType.includes("script")) {
          return resourceTypes.Script;
        }
        if (mimeType.includes("octet")) {
          return resourceTypes.Other;
        }
        if (mimeType.includes("application")) {
          return resourceTypes.Script;
        }
        return resourceTypes.Other;
      }
      static fromMimeTypeOverride(mimeType) {
        if (mimeType === "application/manifest+json") {
          return resourceTypes.Manifest;
        }
        if (mimeType === "application/wasm") {
          return resourceTypes.Wasm;
        }
        return null;
      }
      static fromURL(url) {
        return resourceTypeByExtension.get(ParsedURL2.extractExtension(url)) || null;
      }
      static fromName(name) {
        for (const resourceType of Object.values(resourceTypes)) {
          if (resourceType.name() === name) {
            return resourceType;
          }
        }
        return null;
      }
      static mimeFromURL(url) {
        if (url.startsWith("snippet://") || url.startsWith("debugger://")) {
          return "text/javascript";
        }
        const name = ParsedURL2.extractName(url);
        if (mimeTypeByName.has(name)) {
          return mimeTypeByName.get(name);
        }
        let ext = ParsedURL2.extractExtension(url).toLowerCase();
        if (ext === "html" && name.endsWith(".component.html")) {
          ext = "component.html";
        }
        return mimeTypeByExtension.get(ext);
      }
      static mimeFromExtension(ext) {
        return mimeTypeByExtension.get(ext);
      }
      static simplifyContentType(contentType) {
        const regex2 = new RegExp("^application(.*json$|/json+.*)");
        return regex2.test(contentType) ? "application/json" : contentType;
      }
      static isJavaScriptMimeType(mimeType) {
        return mimeType === "application/javascript" || mimeType === "text/javascript";
      }
      static mediaTypeForMetrics(mimeType, isFromSourceMap, isMinified, isSnippet, isDebugger) {
        if (mimeType !== "text/javascript") {
          return mimeType;
        }
        if (isFromSourceMap) {
          return "text/javascript+sourcemapped";
        }
        if (isMinified) {
          return "text/javascript+minified";
        }
        if (isSnippet) {
          return "text/javascript+snippet";
        }
        if (isDebugger) {
          return "text/javascript+eval";
        }
        return "text/javascript+plain";
      }
      name() {
        return this.#name;
      }
      title() {
        return this.#title();
      }
      category() {
        return this.#category;
      }
      isTextType() {
        return this.#isTextType;
      }
      isScript() {
        return this.#name === "script" || this.#name === "sm-script";
      }
      hasScripts() {
        return this.isScript() || this.isDocument();
      }
      isStyleSheet() {
        return this.#name === "stylesheet" || this.#name === "sm-stylesheet";
      }
      hasStyleSheets() {
        return this.isStyleSheet() || this.isDocument();
      }
      isDocument() {
        return this.#name === "document";
      }
      isDocumentOrScriptOrStyleSheet() {
        return this.isDocument() || this.isScript() || this.isStyleSheet();
      }
      isFont() {
        return this.#name === "font";
      }
      isImage() {
        return this.#name === "image";
      }
      isFromSourceMap() {
        return this.#name.startsWith("sm-");
      }
      toString() {
        return this.#name;
      }
      canonicalMimeType() {
        if (this.isDocument()) {
          return "text/html";
        }
        if (this.isScript()) {
          return "text/javascript";
        }
        if (this.isStyleSheet()) {
          return "text/css";
        }
        return "";
      }
    };
    ResourceCategory = class {
      name;
      title;
      shortTitle;
      constructor(name, title2, shortTitle) {
        this.name = name;
        this.title = title2;
        this.shortTitle = shortTitle;
      }
    };
    resourceCategories = {
      XHR: new ResourceCategory("Fetch and XHR", i18nLazyString$g(UIStrings$1a.fetchAndXHR), lockedLazyString("Fetch/XHR")),
      Document: new ResourceCategory(UIStrings$1a.document, i18nLazyString$g(UIStrings$1a.document), i18nLazyString$g(UIStrings$1a.doc)),
      Stylesheet: new ResourceCategory(UIStrings$1a.css, i18nLazyString$g(UIStrings$1a.css), i18nLazyString$g(UIStrings$1a.css)),
      Script: new ResourceCategory(UIStrings$1a.javascript, i18nLazyString$g(UIStrings$1a.javascript), i18nLazyString$g(UIStrings$1a.js)),
      Font: new ResourceCategory(UIStrings$1a.font, i18nLazyString$g(UIStrings$1a.font), i18nLazyString$g(UIStrings$1a.font)),
      Image: new ResourceCategory(UIStrings$1a.image, i18nLazyString$g(UIStrings$1a.image), i18nLazyString$g(UIStrings$1a.img)),
      Media: new ResourceCategory(UIStrings$1a.media, i18nLazyString$g(UIStrings$1a.media), i18nLazyString$g(UIStrings$1a.media)),
      Manifest: new ResourceCategory(UIStrings$1a.manifest, i18nLazyString$g(UIStrings$1a.manifest), i18nLazyString$g(UIStrings$1a.manifest)),
      Socket: new ResourceCategory("Socket", lockedLazyString("WebSocket | WebTransport | DirectSocket"), i18nLazyString$g(UIStrings$1a.socketShort)),
      Wasm: new ResourceCategory(UIStrings$1a.webassembly, i18nLazyString$g(UIStrings$1a.webassembly), i18nLazyString$g(UIStrings$1a.wasm)),
      Other: new ResourceCategory(UIStrings$1a.other, i18nLazyString$g(UIStrings$1a.other), i18nLazyString$g(UIStrings$1a.other))
    };
    resourceTypes = {
      Document: new ResourceType("document", i18nLazyString$g(UIStrings$1a.document), resourceCategories.Document, true),
      Stylesheet: new ResourceType("stylesheet", i18nLazyString$g(UIStrings$1a.stylesheet), resourceCategories.Stylesheet, true),
      Image: new ResourceType("image", i18nLazyString$g(UIStrings$1a.image), resourceCategories.Image, false),
      Media: new ResourceType("media", i18nLazyString$g(UIStrings$1a.media), resourceCategories.Media, false),
      Font: new ResourceType("font", i18nLazyString$g(UIStrings$1a.font), resourceCategories.Font, false),
      Script: new ResourceType("script", i18nLazyString$g(UIStrings$1a.script), resourceCategories.Script, true),
      TextTrack: new ResourceType("texttrack", i18nLazyString$g(UIStrings$1a.texttrack), resourceCategories.Other, true),
      XHR: new ResourceType("xhr", lockedLazyString("XHR"), resourceCategories.XHR, true),
      Fetch: new ResourceType("fetch", i18nLazyString$g(UIStrings$1a.fetch), resourceCategories.XHR, true),
      Prefetch: new ResourceType("prefetch", lockedLazyString("Prefetch"), resourceCategories.Document, true),
      EventSource: new ResourceType("eventsource", i18nLazyString$g(UIStrings$1a.eventsource), resourceCategories.XHR, true),
      WebSocket: new ResourceType("websocket", i18nLazyString$g(UIStrings$1a.websocket), resourceCategories.Socket, false),
      WebTransport: new ResourceType("webtransport", i18nLazyString$g(UIStrings$1a.webtransport), resourceCategories.Socket, false),
      DirectSocket: new ResourceType("directsocket", i18nLazyString$g(UIStrings$1a.directsocket), resourceCategories.Socket, false),
      Wasm: new ResourceType("wasm", i18nLazyString$g(UIStrings$1a.wasm), resourceCategories.Wasm, false),
      Manifest: new ResourceType("manifest", i18nLazyString$g(UIStrings$1a.manifest), resourceCategories.Manifest, true),
      SignedExchange: new ResourceType("signed-exchange", i18nLazyString$g(UIStrings$1a.signedexchange), resourceCategories.Other, false),
      Ping: new ResourceType("ping", i18nLazyString$g(UIStrings$1a.ping), resourceCategories.Other, false),
      CSPViolationReport: new ResourceType("csp-violation-report", i18nLazyString$g(UIStrings$1a.cspviolationreport), resourceCategories.Other, false),
      Other: new ResourceType("other", i18nLazyString$g(UIStrings$1a.other), resourceCategories.Other, false),
      Preflight: new ResourceType("preflight", i18nLazyString$g(UIStrings$1a.preflight), resourceCategories.Other, true),
      SourceMapScript: new ResourceType("sm-script", i18nLazyString$g(UIStrings$1a.script), resourceCategories.Script, true),
      SourceMapStyleSheet: new ResourceType("sm-stylesheet", i18nLazyString$g(UIStrings$1a.stylesheet), resourceCategories.Stylesheet, true),
      FedCM: new ResourceType("fedcm", i18nLazyString$g(UIStrings$1a.fedcm), resourceCategories.Other, false)
    };
    mimeTypeByName = /* @__PURE__ */ new Map([
      ["Cakefile", "text/x-coffeescript"]
    ]);
    resourceTypeByExtension = /* @__PURE__ */ new Map([
      ["js", resourceTypes.Script],
      ["mjs", resourceTypes.Script],
      ["css", resourceTypes.Stylesheet],
      ["xsl", resourceTypes.Stylesheet],
      ["avif", resourceTypes.Image],
      ["bmp", resourceTypes.Image],
      ["gif", resourceTypes.Image],
      ["ico", resourceTypes.Image],
      ["jpeg", resourceTypes.Image],
      ["jpg", resourceTypes.Image],
      ["jxl", resourceTypes.Image],
      ["png", resourceTypes.Image],
      ["svg", resourceTypes.Image],
      ["tif", resourceTypes.Image],
      ["tiff", resourceTypes.Image],
      ["vue", resourceTypes.Document],
      ["webmanifest", resourceTypes.Manifest],
      ["webp", resourceTypes.Media],
      ["otf", resourceTypes.Font],
      ["ttc", resourceTypes.Font],
      ["ttf", resourceTypes.Font],
      ["woff", resourceTypes.Font],
      ["woff2", resourceTypes.Font],
      ["wasm", resourceTypes.Wasm]
    ]);
    mimeTypeByExtension = /* @__PURE__ */ new Map([
      ["js", "text/javascript"],
      ["mjs", "text/javascript"],
      ["css", "text/css"],
      ["html", "text/html"],
      ["htm", "text/html"],
      ["xml", "application/xml"],
      ["xsl", "application/xml"],
      ["wasm", "application/wasm"],
      ["webmanifest", "application/manifest+json"],
      ["asp", "application/x-aspx"],
      ["aspx", "application/x-aspx"],
      ["jsp", "application/x-jsp"],
      ["c", "text/x-c++src"],
      ["cc", "text/x-c++src"],
      ["cpp", "text/x-c++src"],
      ["h", "text/x-c++src"],
      ["m", "text/x-c++src"],
      ["mm", "text/x-c++src"],
      ["coffee", "text/x-coffeescript"],
      ["dart", "application/vnd.dart"],
      ["ts", "text/typescript"],
      ["tsx", "text/typescript-jsx"],
      ["json", "application/json"],
      ["gyp", "application/json"],
      ["gypi", "application/json"],
      ["map", "application/json"],
      ["cs", "text/x-csharp"],
      ["go", "text/x-go"],
      ["java", "text/x-java"],
      ["kt", "text/x-kotlin"],
      ["scala", "text/x-scala"],
      ["less", "text/x-less"],
      ["php", "application/x-httpd-php"],
      ["phtml", "application/x-httpd-php"],
      ["py", "text/x-python"],
      ["sh", "text/x-sh"],
      ["gss", "text/x-gss"],
      ["sass", "text/x-sass"],
      ["scss", "text/x-scss"],
      ["vtt", "text/vtt"],
      ["ls", "text/x-livescript"],
      ["md", "text/markdown"],
      ["cljs", "text/x-clojure"],
      ["cljc", "text/x-clojure"],
      ["cljx", "text/x-clojure"],
      ["styl", "text/x-styl"],
      ["jsx", "text/jsx"],
      ["avif", "image/avif"],
      ["bmp", "image/bmp"],
      ["gif", "image/gif"],
      ["ico", "image/ico"],
      ["jpeg", "image/jpeg"],
      ["jpg", "image/jpeg"],
      ["jxl", "image/jxl"],
      ["png", "image/png"],
      ["svg", "image/svg+xml"],
      ["tif", "image/tif"],
      ["tiff", "image/tiff"],
      ["webp", "image/webp"],
      ["otf", "font/otf"],
      ["ttc", "font/collection"],
      ["ttf", "font/ttf"],
      ["woff", "font/woff"],
      ["woff2", "font/woff2"],
      ["component.html", "text/x.angular"],
      ["svelte", "text/x.svelte"],
      ["vue", "text/x.vue"]
    ]);
    ResourceType$1 = /* @__PURE__ */ Object.freeze({
      __proto__: null,
      ResourceCategory,
      ResourceType,
      mimeTypeByExtension,
      resourceCategories,
      resourceTypeByExtension,
      resourceTypes
    });
    ReturnToPanelFlavor = class {
      viewId;
      constructor(viewId) {
        this.viewId = viewId;
      }
    };
    ReturnToPanel = /* @__PURE__ */ Object.freeze({
      __proto__: null,
      ReturnToPanelFlavor
    });
    registeredLateInitializationRunnables = /* @__PURE__ */ new Map();
    registeredEarlyInitializationRunnables = [];
    Runnable = /* @__PURE__ */ Object.freeze({
      __proto__: null,
      earlyInitializationRunnables,
      lateInitializationRunnables,
      maybeRemoveLateInitializationRunnable,
      registerEarlyInitializationRunnable,
      registerLateInitializationRunnable
    });
    Segment = class {
      begin;
      end;
      data;
      constructor(begin, end, data32) {
        if (begin > end) {
          throw new Error("Invalid segment");
        }
        this.begin = begin;
        this.end = end;
        this.data = data32;
      }
      intersects(that) {
        return this.begin < that.end && that.begin < this.end;
      }
    };
    SegmentedRange = class {
      #segments = [];
      #mergeCallback;
      constructor(mergeCallback) {
        this.#mergeCallback = mergeCallback;
      }
      append(newSegment) {
        let startIndex = lowerBound2(this.#segments, newSegment, (a, b) => a.begin - b.begin);
        let endIndex = startIndex;
        let merged = null;
        if (startIndex > 0) {
          const precedingSegment = this.#segments[startIndex - 1];
          merged = this.tryMerge(precedingSegment, newSegment);
          if (merged) {
            --startIndex;
            newSegment = merged;
          } else if (this.#segments[startIndex - 1].end >= newSegment.begin) {
            if (newSegment.end < precedingSegment.end) {
              this.#segments.splice(startIndex, 0, new Segment(newSegment.end, precedingSegment.end, precedingSegment.data));
            }
            precedingSegment.end = newSegment.begin;
          }
        }
        while (endIndex < this.#segments.length && this.#segments[endIndex].end <= newSegment.end) {
          ++endIndex;
        }
        if (endIndex < this.#segments.length) {
          merged = this.tryMerge(newSegment, this.#segments[endIndex]);
          if (merged) {
            endIndex++;
            newSegment = merged;
          } else if (newSegment.intersects(this.#segments[endIndex])) {
            this.#segments[endIndex].begin = newSegment.end;
          }
        }
        this.#segments.splice(startIndex, endIndex - startIndex, newSegment);
      }
      segments() {
        return this.#segments;
      }
      tryMerge(first2, second) {
        const merged = this.#mergeCallback && this.#mergeCallback(first2, second);
        if (!merged) {
          return null;
        }
        merged.begin = first2.begin;
        merged.end = Math.max(first2.end, second.end);
        return merged;
      }
    };
    SegmentedRange$1 = /* @__PURE__ */ Object.freeze({
      __proto__: null,
      Segment,
      SegmentedRange
    });
    UIStrings$19 = {
      elements: "Elements",
      ai: "AI",
      appearance: "Appearance",
      sources: "Sources",
      network: "Network",
      performance: "Performance",
      console: "Console",
      persistence: "Persistence",
      debugger: "Debugger",
      global: "Global",
      rendering: "Rendering",
      grid: "Grid",
      mobile: "Mobile",
      memory: "Memory",
      extension: "Extension",
      adorner: "Adorner",
      account: "Account",
      privacy: "Privacy"
    };
    str_$18 = registerUIStrings("core/common/SettingRegistration.ts", UIStrings$19);
    i18nString$R = getLocalizedString.bind(void 0, str_$18);
    registeredSettings = [];
    settingNameSet = /* @__PURE__ */ new Set();
    SettingRegistration = /* @__PURE__ */ Object.freeze({
      __proto__: null,
      getLocalizedSettingsCategory,
      getRegisteredSettings,
      maybeRemoveSettingExtension,
      registerSettingExtension,
      registerSettingsForTest,
      resetSettings
    });
    Settings = class _Settings {
      syncedStorage;
      globalStorage;
      localStorage;
      #settingRegistrations;
      #sessionStorage = new SettingsStorage({});
      settingNameSet = /* @__PURE__ */ new Set();
      orderValuesBySettingCategory = /* @__PURE__ */ new Map();
      #eventSupport = new ObjectWrapper();
      #registry = /* @__PURE__ */ new Map();
      moduleSettings = /* @__PURE__ */ new Map();
      #logSettingAccess;
      constructor({ syncedStorage, globalStorage, localStorage: localStorage2, settingRegistrations, logSettingAccess, runSettingsMigration }) {
        this.syncedStorage = syncedStorage;
        this.globalStorage = globalStorage;
        this.localStorage = localStorage2;
        this.#settingRegistrations = settingRegistrations;
        this.#logSettingAccess = logSettingAccess;
        for (const registration of this.#settingRegistrations) {
          const { settingName, defaultValue, storageType } = registration;
          const isRegex = registration.settingType === "regex";
          const evaluatedDefaultValue = typeof defaultValue === "function" ? defaultValue(hostConfig) : defaultValue;
          const setting = isRegex && typeof evaluatedDefaultValue === "string" ? this.createRegExpSetting(settingName, evaluatedDefaultValue, void 0, storageType) : this.createSetting(settingName, evaluatedDefaultValue, storageType);
          setting.setTitleFunction(registration.title);
          if (registration.userActionCondition) {
            setting.setRequiresUserAction(Boolean(Runtime.queryParam(registration.userActionCondition)));
          }
          setting.setRegistration(registration);
          this.registerModuleSetting(setting);
        }
        if (runSettingsMigration) {
          new VersionController(this).updateVersion();
        }
      }
      getRegisteredSettings() {
        return this.#settingRegistrations;
      }
      static hasInstance() {
        return typeof settingsInstance !== "undefined";
      }
      static instance(opts = { forceNew: null, syncedStorage: null, globalStorage: null, localStorage: null, settingRegistrations: null }) {
        const { forceNew, syncedStorage, globalStorage, localStorage: localStorage2, settingRegistrations, logSettingAccess, runSettingsMigration } = opts;
        if (!settingsInstance || forceNew) {
          if (!syncedStorage || !globalStorage || !localStorage2 || !settingRegistrations) {
            throw new Error(`Unable to create settings: global and local storage must be provided: ${new Error().stack}`);
          }
          settingsInstance = new _Settings({ syncedStorage, globalStorage, localStorage: localStorage2, settingRegistrations, logSettingAccess, runSettingsMigration });
        }
        return settingsInstance;
      }
      static removeInstance() {
        settingsInstance = void 0;
      }
      registerModuleSetting(setting) {
        const settingName = setting.name;
        const category = setting.category();
        const order = setting.order();
        if (this.settingNameSet.has(settingName)) {
          throw new Error(`Duplicate Setting name '${settingName}'`);
        }
        if (category && order) {
          const orderValues = this.orderValuesBySettingCategory.get(category) || /* @__PURE__ */ new Set();
          if (orderValues.has(order)) {
            throw new Error(`Duplicate order value '${order}' for settings category '${category}'`);
          }
          orderValues.add(order);
          this.orderValuesBySettingCategory.set(category, orderValues);
        }
        this.settingNameSet.add(settingName);
        this.moduleSettings.set(setting.name, setting);
      }
      static normalizeSettingName(name) {
        if ([
          VersionController.GLOBAL_VERSION_SETTING_NAME,
          VersionController.SYNCED_VERSION_SETTING_NAME,
          VersionController.LOCAL_VERSION_SETTING_NAME,
          "currentDockState",
          "isUnderTest"
        ].includes(name)) {
          return name;
        }
        return toKebabCase(name);
      }
      moduleSetting(settingName) {
        const setting = this.moduleSettings.get(settingName);
        if (!setting) {
          throw new Error("No setting registered: " + settingName);
        }
        return setting;
      }
      settingForTest(settingName) {
        const setting = this.#registry.get(settingName);
        if (!setting) {
          throw new Error("No setting registered: " + settingName);
        }
        return setting;
      }
      createSetting(key, defaultValue, storageType) {
        const storage = this.storageFromType(storageType);
        let setting = this.#registry.get(key);
        if (!setting) {
          setting = new Setting(key, defaultValue, this.#eventSupport, storage, this.#logSettingAccess);
          this.#registry.set(key, setting);
        }
        return setting;
      }
      createLocalSetting(key, defaultValue) {
        return this.createSetting(key, defaultValue, "Local");
      }
      createRegExpSetting(key, defaultValue, regexFlags, storageType) {
        if (!this.#registry.get(key)) {
          this.#registry.set(key, new RegExpSetting(key, defaultValue, this.#eventSupport, this.storageFromType(storageType), regexFlags, this.#logSettingAccess));
        }
        return this.#registry.get(key);
      }
      clearAll() {
        this.globalStorage.removeAll();
        this.syncedStorage.removeAll();
        this.localStorage.removeAll();
        new VersionController(this).resetToCurrent();
      }
      storageFromType(storageType) {
        switch (storageType) {
          case "Local":
            return this.localStorage;
          case "Session":
            return this.#sessionStorage;
          case "Global":
            return this.globalStorage;
          case "Synced":
            return this.syncedStorage;
        }
        return this.globalStorage;
      }
      getRegistry() {
        return this.#registry;
      }
    };
    InMemoryStorage = class {
      #store = /* @__PURE__ */ new Map();
      register(_setting) {
      }
      set(key, value) {
        this.#store.set(key, value);
      }
      get(key) {
        return this.#store.get(key);
      }
      remove(key) {
        this.#store.delete(key);
      }
      clear() {
        this.#store.clear();
      }
    };
    SettingsStorage = class {
      object;
      backingStore;
      storagePrefix;
      constructor(object2, backingStore = new InMemoryStorage(), storagePrefix = "") {
        this.object = object2;
        this.backingStore = backingStore;
        this.storagePrefix = storagePrefix;
      }
      register(name) {
        name = this.storagePrefix + name;
        this.backingStore.register(name);
      }
      set(name, value) {
        name = this.storagePrefix + name;
        this.object[name] = value;
        this.backingStore.set(name, value);
      }
      has(name) {
        name = this.storagePrefix + name;
        return name in this.object;
      }
      get(name) {
        name = this.storagePrefix + name;
        return this.object[name];
      }
      async forceGet(originalName) {
        const name = this.storagePrefix + originalName;
        const value = await this.backingStore.get(name);
        if (value && value !== this.object[name]) {
          this.set(originalName, value);
        } else if (!value) {
          this.remove(originalName);
        }
        return value;
      }
      remove(name) {
        name = this.storagePrefix + name;
        delete this.object[name];
        this.backingStore.remove(name);
      }
      removeAll() {
        this.object = {};
        this.backingStore.clear();
      }
      keys() {
        return Object.keys(this.object);
      }
      dumpSizes() {
        Console.instance().log("Ten largest settings: ");
        const sizes = { __proto__: null };
        for (const key in this.object) {
          sizes[key] = this.object[key].length;
        }
        const keys2 = Object.keys(sizes);
        function comparator2(key1, key2) {
          return sizes[key2] - sizes[key1];
        }
        keys2.sort(comparator2);
        for (let i = 0; i < 10 && i < keys2.length; ++i) {
          Console.instance().log("Setting: '" + keys2[i] + "', size: " + sizes[keys2[i]]);
        }
      }
    };
    Deprecation = class {
      disabled;
      warning;
      experiment;
      constructor({ deprecationNotice }) {
        if (!deprecationNotice) {
          throw new Error("Cannot create deprecation info for a non-deprecated setting");
        }
        this.disabled = deprecationNotice.disabled;
        this.warning = deprecationNotice.warning();
        this.experiment = deprecationNotice.experiment ? experiments.allConfigurableExperiments().find((e) => e.name === deprecationNotice.experiment) : void 0;
      }
    };
    Setting = class {
      name;
      defaultValue;
      eventSupport;
      storage;
      #titleFunction;
      #title;
      #registration = null;
      #requiresUserAction;
      #value;
      #serializer = JSON;
      #hadUserAction;
      #disabled;
      #deprecation = null;
      #loggedInitialAccess = false;
      #logSettingAccess;
      constructor(name, defaultValue, eventSupport, storage, logSettingAccess) {
        this.name = name;
        this.defaultValue = defaultValue;
        this.eventSupport = eventSupport;
        this.storage = storage;
        storage.register(this.name);
        this.#logSettingAccess = logSettingAccess;
      }
      setSerializer(serializer) {
        this.#serializer = serializer;
      }
      addChangeListener(listener, thisObject) {
        return this.eventSupport.addEventListener(this.name, listener, thisObject);
      }
      removeChangeListener(listener, thisObject) {
        this.eventSupport.removeEventListener(this.name, listener, thisObject);
      }
      title() {
        if (this.#title) {
          return this.#title;
        }
        if (this.#titleFunction) {
          return this.#titleFunction();
        }
        return "";
      }
      setTitleFunction(titleFunction) {
        if (titleFunction) {
          this.#titleFunction = titleFunction;
        }
      }
      setTitle(title2) {
        this.#title = title2;
      }
      setRequiresUserAction(requiresUserAction) {
        this.#requiresUserAction = requiresUserAction;
      }
      disabled() {
        if (this.#registration?.disabledCondition) {
          const { disabled } = this.#registration.disabledCondition(hostConfig);
          if (disabled) {
            return true;
          }
        }
        return this.#disabled || false;
      }
      disabledReasons() {
        if (this.#registration?.disabledCondition) {
          const result = this.#registration.disabledCondition(hostConfig);
          if (result.disabled) {
            return result.reasons;
          }
        }
        return [];
      }
      setDisabled(disabled) {
        this.#disabled = disabled;
        this.eventSupport.dispatchEventToListeners(this.name);
      }
      #maybeLogAccess(value) {
        try {
          const valueToLog = typeof value === "string" || typeof value === "number" || typeof value === "boolean" ? value : this.#serializer?.stringify(value);
          if (valueToLog !== void 0 && this.#logSettingAccess) {
            void this.#logSettingAccess(this.name, valueToLog);
          }
        } catch {
        }
      }
      #maybeLogInitialAccess(value) {
        if (!this.#loggedInitialAccess) {
          this.#maybeLogAccess(value);
          this.#loggedInitialAccess = true;
        }
      }
      get() {
        if (this.#requiresUserAction && !this.#hadUserAction) {
          this.#maybeLogInitialAccess(this.defaultValue);
          return this.defaultValue;
        }
        if (typeof this.#value !== "undefined") {
          this.#maybeLogInitialAccess(this.#value);
          return this.#value;
        }
        this.#value = this.defaultValue;
        if (this.storage.has(this.name)) {
          try {
            this.#value = this.#serializer.parse(this.storage.get(this.name));
          } catch {
            this.storage.remove(this.name);
          }
        }
        this.#maybeLogInitialAccess(this.#value);
        return this.#value;
      }
      getIfNotDisabled() {
        if (this.disabled()) {
          return;
        }
        return this.get();
      }
      async forceGet() {
        const name = this.name;
        const oldValue = this.storage.get(name);
        const value = await this.storage.forceGet(name);
        this.#value = this.defaultValue;
        if (value) {
          try {
            this.#value = this.#serializer.parse(value);
          } catch {
            this.storage.remove(this.name);
          }
        }
        if (oldValue !== value) {
          this.eventSupport.dispatchEventToListeners(this.name, this.#value);
        }
        this.#maybeLogInitialAccess(this.#value);
        return this.#value;
      }
      set(value) {
        this.#maybeLogAccess(value);
        this.#hadUserAction = true;
        this.#value = value;
        try {
          const settingString = this.#serializer.stringify(value);
          try {
            this.storage.set(this.name, settingString);
          } catch (e) {
            this.printSettingsSavingError(e.message, settingString);
          }
        } catch (e) {
          Console.instance().error("Cannot stringify setting with name: " + this.name + ", error: " + e.message);
        }
        this.eventSupport.dispatchEventToListeners(this.name, value);
      }
      setRegistration(registration) {
        this.#registration = registration;
        const { deprecationNotice } = registration;
        if (deprecationNotice?.disabled) {
          const experiment = deprecationNotice.experiment ? experiments.allConfigurableExperiments().find((e) => e.name === deprecationNotice.experiment) : void 0;
          if (!experiment || experiment.isEnabled()) {
            this.set(this.defaultValue);
            this.setDisabled(true);
          }
        }
      }
      type() {
        if (this.#registration) {
          return this.#registration.settingType;
        }
        return null;
      }
      options() {
        if (this.#registration && this.#registration.options) {
          return this.#registration.options.map((opt) => {
            const { value, title: title2, text, raw } = opt;
            return {
              value,
              title: title2(),
              text: typeof text === "function" ? text() : text,
              raw
            };
          });
        }
        return [];
      }
      reloadRequired() {
        if (this.#registration) {
          return this.#registration.reloadRequired || null;
        }
        return null;
      }
      category() {
        if (this.#registration) {
          return this.#registration.category || null;
        }
        return null;
      }
      tags() {
        if (this.#registration && this.#registration.tags) {
          return this.#registration.tags.map((tag2) => tag2()).join("\0");
        }
        return null;
      }
      order() {
        if (this.#registration) {
          return this.#registration.order || null;
        }
        return null;
      }
      learnMore() {
        return this.#registration?.learnMore ?? null;
      }
      get deprecation() {
        if (!this.#registration || !this.#registration.deprecationNotice) {
          return null;
        }
        if (!this.#deprecation) {
          this.#deprecation = new Deprecation(this.#registration);
        }
        return this.#deprecation;
      }
      printSettingsSavingError(message, value) {
        const errorMessage = "Error saving setting with name: " + this.name + ", value length: " + value.length + ". Error: " + message;
        console.error(errorMessage);
        Console.instance().error(errorMessage);
        this.storage.dumpSizes();
      }
    };
    RegExpSetting = class extends Setting {
      #regexFlags;
      #regex;
      constructor(name, defaultValue, eventSupport, storage, regexFlags, logSettingAccess) {
        super(name, defaultValue ? [{ pattern: defaultValue }] : [], eventSupport, storage, logSettingAccess);
        this.#regexFlags = regexFlags;
      }
      get() {
        const result = [];
        const items2 = this.getAsArray();
        for (let i = 0; i < items2.length; ++i) {
          const item = items2[i];
          if (item.pattern && !item.disabled) {
            result.push(item.pattern);
          }
        }
        return result.join("|");
      }
      getAsArray() {
        return super.get();
      }
      set(value) {
        this.setAsArray([{ pattern: value, disabled: false }]);
      }
      setAsArray(value) {
        this.#regex = void 0;
        super.set(value);
      }
      asRegExp() {
        if (typeof this.#regex !== "undefined") {
          return this.#regex;
        }
        this.#regex = null;
        try {
          const pattern2 = this.get();
          if (pattern2) {
            this.#regex = new RegExp(pattern2, this.#regexFlags || "");
          }
        } catch {
        }
        return this.#regex;
      }
    };
    VersionController = class _VersionController {
      static GLOBAL_VERSION_SETTING_NAME = "inspectorVersion";
      static SYNCED_VERSION_SETTING_NAME = "syncedInspectorVersion";
      static LOCAL_VERSION_SETTING_NAME = "localInspectorVersion";
      static CURRENT_VERSION = 41;
      #settings;
      #globalVersionSetting;
      #syncedVersionSetting;
      #localVersionSetting;
      constructor(settings) {
        this.#settings = settings;
        this.#globalVersionSetting = this.#settings.createSetting(_VersionController.GLOBAL_VERSION_SETTING_NAME, _VersionController.CURRENT_VERSION, "Global");
        this.#syncedVersionSetting = this.#settings.createSetting(_VersionController.SYNCED_VERSION_SETTING_NAME, _VersionController.CURRENT_VERSION, "Synced");
        this.#localVersionSetting = this.#settings.createSetting(_VersionController.LOCAL_VERSION_SETTING_NAME, _VersionController.CURRENT_VERSION, "Local");
      }
      resetToCurrent() {
        this.#globalVersionSetting.set(_VersionController.CURRENT_VERSION);
        this.#syncedVersionSetting.set(_VersionController.CURRENT_VERSION);
        this.#localVersionSetting.set(_VersionController.CURRENT_VERSION);
      }
      #removeSetting(setting) {
        const name = setting.name;
        this.#settings.getRegistry().delete(name);
        this.#settings.moduleSettings.delete(name);
        setting.storage.remove(name);
      }
      updateVersion() {
        const currentVersion = _VersionController.CURRENT_VERSION;
        const minimumVersion = Math.min(this.#globalVersionSetting.get(), this.#syncedVersionSetting.get(), this.#localVersionSetting.get());
        const methodsToRun = this.methodsToRunToUpdateVersion(minimumVersion, currentVersion);
        console.assert(
          this[`updateVersionFrom${currentVersion}To${currentVersion + 1}`] === void 0,
          "Unexpected migration method found. Increment CURRENT_VERSION or remove the method."
        );
        for (const method of methodsToRun) {
          this[method].call(this);
        }
        this.resetToCurrent();
      }
      methodsToRunToUpdateVersion(oldVersion, currentVersion) {
        const result = [];
        for (let i = oldVersion; i < currentVersion; ++i) {
          result.push("updateVersionFrom" + i + "To" + (i + 1));
        }
        return result;
      }
      updateVersionFrom0To1() {
        this.clearBreakpointsWhenTooMany(this.#settings.createLocalSetting("breakpoints", []), 5e5);
      }
      updateVersionFrom1To2() {
        this.#settings.createSetting("previouslyViewedFiles", []).set([]);
      }
      updateVersionFrom2To3() {
        this.#settings.createSetting("fileSystemMapping", {}).set({});
        this.#removeSetting(this.#settings.createSetting("fileMappingEntries", []));
      }
      updateVersionFrom3To4() {
        const advancedMode = this.#settings.createSetting("showHeaSnapshotObjectsHiddenProperties", false);
        this.#settings.moduleSetting("showAdvancedHeapSnapshotProperties").set(advancedMode.get());
        this.#removeSetting(advancedMode);
      }
      updateVersionFrom4To5() {
        const settingNames = {
          FileSystemViewSidebarWidth: "fileSystemViewSplitViewState",
          elementsSidebarWidth: "elementsPanelSplitViewState",
          StylesPaneSplitRatio: "stylesPaneSplitViewState",
          heapSnapshotRetainersViewSize: "heapSnapshotSplitViewState",
          "InspectorView.splitView": "InspectorView.splitViewState",
          "InspectorView.screencastSplitView": "InspectorView.screencastSplitViewState",
          "Inspector.drawerSplitView": "Inspector.drawerSplitViewState",
          layerDetailsSplitView: "layerDetailsSplitViewState",
          networkSidebarWidth: "networkPanelSplitViewState",
          sourcesSidebarWidth: "sourcesPanelSplitViewState",
          scriptsPanelNavigatorSidebarWidth: "sourcesPanelNavigatorSplitViewState",
          sourcesPanelSplitSidebarRatio: "sourcesPanelDebuggerSidebarSplitViewState",
          "timeline-details": "timelinePanelDetailsSplitViewState",
          "timeline-split": "timelinePanelRecorsSplitViewState",
          "timeline-view": "timelinePanelTimelineStackSplitViewState",
          auditsSidebarWidth: "auditsPanelSplitViewState",
          layersSidebarWidth: "layersPanelSplitViewState",
          profilesSidebarWidth: "profilesPanelSplitViewState",
          resourcesSidebarWidth: "resourcesPanelSplitViewState"
        };
        const empty = {};
        for (const oldName in settingNames) {
          const newName = settingNames[oldName];
          const oldNameH = oldName + "H";
          let newValue = null;
          const oldSetting = this.#settings.createSetting(oldName, empty);
          if (oldSetting.get() !== empty) {
            newValue = newValue || {};
            newValue.vertical = {};
            newValue.vertical.size = oldSetting.get();
            this.#removeSetting(oldSetting);
          }
          const oldSettingH = this.#settings.createSetting(oldNameH, empty);
          if (oldSettingH.get() !== empty) {
            newValue = newValue || {};
            newValue.horizontal = {};
            newValue.horizontal.size = oldSettingH.get();
            this.#removeSetting(oldSettingH);
          }
          if (newValue) {
            this.#settings.createSetting(newName, {}).set(newValue);
          }
        }
      }
      updateVersionFrom5To6() {
        const settingNames = {
          debuggerSidebarHidden: "sourcesPanelSplitViewState",
          navigatorHidden: "sourcesPanelNavigatorSplitViewState",
          "WebInspector.Drawer.showOnLoad": "Inspector.drawerSplitViewState"
        };
        for (const oldName in settingNames) {
          const oldSetting = this.#settings.createSetting(oldName, null);
          if (oldSetting.get() === null) {
            this.#removeSetting(oldSetting);
            continue;
          }
          const newName = settingNames[oldName];
          const invert = oldName === "WebInspector.Drawer.showOnLoad";
          const hidden = oldSetting.get() !== invert;
          this.#removeSetting(oldSetting);
          const showMode = hidden ? "OnlyMain" : "Both";
          const newSetting = this.#settings.createSetting(newName, {});
          const newValue = newSetting.get() || {};
          newValue.vertical = newValue.vertical || {};
          newValue.vertical.showMode = showMode;
          newValue.horizontal = newValue.horizontal || {};
          newValue.horizontal.showMode = showMode;
          newSetting.set(newValue);
        }
      }
      updateVersionFrom6To7() {
        const settingNames = {
          sourcesPanelNavigatorSplitViewState: "sourcesPanelNavigatorSplitViewState",
          elementsPanelSplitViewState: "elementsPanelSplitViewState",
          stylesPaneSplitViewState: "stylesPaneSplitViewState",
          sourcesPanelDebuggerSidebarSplitViewState: "sourcesPanelDebuggerSidebarSplitViewState"
        };
        const empty = {};
        for (const name in settingNames) {
          const setting = this.#settings.createSetting(name, empty);
          const value = setting.get();
          if (value === empty) {
            continue;
          }
          if (value.vertical?.size && value.vertical.size < 1) {
            value.vertical.size = 0;
          }
          if (value.horizontal?.size && value.horizontal.size < 1) {
            value.horizontal.size = 0;
          }
          setting.set(value);
        }
      }
      updateVersionFrom7To8() {
      }
      updateVersionFrom8To9() {
        const settingNames = ["skipStackFramesPattern", "workspaceFolderExcludePattern"];
        for (let i = 0; i < settingNames.length; ++i) {
          const setting = this.#settings.createSetting(settingNames[i], "");
          let value = setting.get();
          if (!value) {
            return;
          }
          if (typeof value === "string") {
            value = [value];
          }
          for (let j = 0; j < value.length; ++j) {
            if (typeof value[j] === "string") {
              value[j] = { pattern: value[j] };
            }
          }
          setting.set(value);
        }
      }
      updateVersionFrom9To10() {
        if (!window.localStorage) {
          return;
        }
        for (const key in window.localStorage) {
          if (key.startsWith("revision-history")) {
            window.localStorage.removeItem(key);
          }
        }
      }
      updateVersionFrom10To11() {
        const oldSettingName = "customDevicePresets";
        const newSettingName = "customEmulatedDeviceList";
        const oldSetting = this.#settings.createSetting(oldSettingName, void 0);
        const list2 = oldSetting.get();
        if (!Array.isArray(list2)) {
          return;
        }
        const newList = [];
        for (let i = 0; i < list2.length; ++i) {
          const value = list2[i];
          const device = {};
          device["title"] = value["title"];
          device["type"] = "unknown";
          device["user-agent"] = value["userAgent"];
          device["capabilities"] = [];
          if (value["touch"]) {
            device["capabilities"].push("touch");
          }
          if (value["mobile"]) {
            device["capabilities"].push("mobile");
          }
          device["screen"] = {};
          device["screen"]["vertical"] = { width: value["width"], height: value["height"] };
          device["screen"]["horizontal"] = { width: value["height"], height: value["width"] };
          device["screen"]["device-pixel-ratio"] = value["deviceScaleFactor"];
          device["modes"] = [];
          device["show-by-default"] = true;
          device["show"] = "Default";
          newList.push(device);
        }
        if (newList.length) {
          this.#settings.createSetting(newSettingName, []).set(newList);
        }
        this.#removeSetting(oldSetting);
      }
      updateVersionFrom11To12() {
        this.migrateSettingsFromLocalStorage();
      }
      updateVersionFrom12To13() {
        this.migrateSettingsFromLocalStorage();
        this.#removeSetting(this.#settings.createSetting("timelineOverviewMode", ""));
      }
      updateVersionFrom13To14() {
        const defaultValue = { throughput: -1, latency: 0 };
        this.#settings.createSetting("networkConditions", defaultValue).set(defaultValue);
      }
      updateVersionFrom14To15() {
        const setting = this.#settings.createLocalSetting("workspaceExcludedFolders", {});
        const oldValue = setting.get();
        const newValue = {};
        for (const fileSystemPath in oldValue) {
          newValue[fileSystemPath] = [];
          for (const entry of oldValue[fileSystemPath]) {
            newValue[fileSystemPath].push(entry.path);
          }
        }
        setting.set(newValue);
      }
      updateVersionFrom15To16() {
        const setting = this.#settings.createSetting("InspectorView.panelOrder", {});
        const tabOrders = setting.get();
        for (const key of Object.keys(tabOrders)) {
          tabOrders[key] = (tabOrders[key] + 1) * 10;
        }
        setting.set(tabOrders);
      }
      updateVersionFrom16To17() {
        const setting = this.#settings.createSetting("networkConditionsCustomProfiles", []);
        const oldValue = setting.get();
        const newValue = [];
        if (Array.isArray(oldValue)) {
          for (const preset of oldValue) {
            if (typeof preset.title === "string" && typeof preset.value === "object" && typeof preset.value.throughput === "number" && typeof preset.value.latency === "number") {
              newValue.push({
                title: preset.title,
                value: { download: preset.value.throughput, upload: preset.value.throughput, latency: preset.value.latency }
              });
            }
          }
        }
        setting.set(newValue);
      }
      updateVersionFrom17To18() {
        const setting = this.#settings.createLocalSetting("workspaceExcludedFolders", {});
        const oldValue = setting.get();
        const newValue = {};
        for (const oldKey in oldValue) {
          let newKey = oldKey.replace(/\\/g, "/");
          if (!newKey.startsWith("file://")) {
            if (newKey.startsWith("/")) {
              newKey = "file://" + newKey;
            } else {
              newKey = "file:///" + newKey;
            }
          }
          newValue[newKey] = oldValue[oldKey];
        }
        setting.set(newValue);
      }
      updateVersionFrom18To19() {
        const defaultColumns = { status: true, type: true, initiator: true, size: true, time: true };
        const visibleColumnSettings = this.#settings.createSetting("networkLogColumnsVisibility", defaultColumns);
        const visibleColumns = visibleColumnSettings.get();
        visibleColumns.name = true;
        visibleColumns.timeline = true;
        const configs = {};
        for (const columnId in visibleColumns) {
          if (!visibleColumns.hasOwnProperty(columnId)) {
            continue;
          }
          configs[columnId.toLowerCase()] = { visible: visibleColumns[columnId] };
        }
        const newSetting = this.#settings.createSetting("networkLogColumns", {});
        newSetting.set(configs);
        this.#removeSetting(visibleColumnSettings);
      }
      updateVersionFrom19To20() {
        const oldSetting = this.#settings.createSetting("InspectorView.panelOrder", {});
        const newSetting = this.#settings.createSetting("panel-tabOrder", {});
        newSetting.set(oldSetting.get());
        this.#removeSetting(oldSetting);
      }
      updateVersionFrom20To21() {
        const networkColumns = this.#settings.createSetting("networkLogColumns", {});
        const columns = networkColumns.get();
        delete columns["timeline"];
        delete columns["waterfall"];
        networkColumns.set(columns);
      }
      updateVersionFrom21To22() {
        const breakpointsSetting = this.#settings.createLocalSetting("breakpoints", []);
        const breakpoints = breakpointsSetting.get();
        for (const breakpoint of breakpoints) {
          breakpoint["url"] = breakpoint["sourceFileId"];
          delete breakpoint["sourceFileId"];
        }
        breakpointsSetting.set(breakpoints);
      }
      updateVersionFrom22To23() {
      }
      updateVersionFrom23To24() {
        const oldSetting = this.#settings.createSetting("searchInContentScripts", false);
        const newSetting = this.#settings.createSetting("searchInAnonymousAndContentScripts", false);
        newSetting.set(oldSetting.get());
        this.#removeSetting(oldSetting);
      }
      updateVersionFrom24To25() {
        const defaultColumns = { status: true, type: true, initiator: true, size: true, time: true };
        const networkLogColumnsSetting = this.#settings.createSetting("networkLogColumns", defaultColumns);
        const columns = networkLogColumnsSetting.get();
        delete columns.product;
        networkLogColumnsSetting.set(columns);
      }
      updateVersionFrom25To26() {
        const oldSetting = this.#settings.createSetting("messageURLFilters", {});
        const urls = Object.keys(oldSetting.get());
        const textFilter = urls.map((url) => `-url:${url}`).join(" ");
        if (textFilter) {
          const textFilterSetting = this.#settings.createSetting("console.textFilter", "");
          const suffix = textFilterSetting.get() ? ` ${textFilterSetting.get()}` : "";
          textFilterSetting.set(`${textFilter}${suffix}`);
        }
        this.#removeSetting(oldSetting);
      }
      updateVersionFrom26To27() {
        const settings = this.#settings;
        function renameKeyInObjectSetting(settingName, from2, to) {
          const setting = settings.createSetting(settingName, {});
          const value = setting.get();
          if (from2 in value) {
            value[to] = value[from2];
            delete value[from2];
            setting.set(value);
          }
        }
        function renameInStringSetting(settingName, from2, to) {
          const setting = settings.createSetting(settingName, "");
          const value = setting.get();
          if (value === from2) {
            setting.set(to);
          }
        }
        renameKeyInObjectSetting("panel-tabOrder", "audits2", "audits");
        renameKeyInObjectSetting("panel-closeableTabs", "audits2", "audits");
        renameInStringSetting("panel-selectedTab", "audits2", "audits");
      }
      updateVersionFrom27To28() {
        const setting = this.#settings.createSetting("uiTheme", "systemPreferred");
        if (setting.get() === "default") {
          setting.set("systemPreferred");
        }
      }
      updateVersionFrom28To29() {
        const settings = this.#settings;
        function renameKeyInObjectSetting(settingName, from2, to) {
          const setting = settings.createSetting(settingName, {});
          const value = setting.get();
          if (from2 in value) {
            value[to] = value[from2];
            delete value[from2];
            setting.set(value);
          }
        }
        function renameInStringSetting(settingName, from2, to) {
          const setting = settings.createSetting(settingName, "");
          const value = setting.get();
          if (value === from2) {
            setting.set(to);
          }
        }
        renameKeyInObjectSetting("panel-tabOrder", "audits", "lighthouse");
        renameKeyInObjectSetting("panel-closeableTabs", "audits", "lighthouse");
        renameInStringSetting("panel-selectedTab", "audits", "lighthouse");
      }
      updateVersionFrom29To30() {
        const closeableTabSetting = this.#settings.createSetting("closeableTabs", {});
        const panelCloseableTabSetting = this.#settings.createSetting("panel-closeableTabs", {});
        const drawerCloseableTabSetting = this.#settings.createSetting("drawer-view-closeableTabs", {});
        const openTabsInPanel = panelCloseableTabSetting.get();
        const openTabsInDrawer = panelCloseableTabSetting.get();
        const newValue = Object.assign(openTabsInDrawer, openTabsInPanel);
        closeableTabSetting.set(newValue);
        this.#removeSetting(panelCloseableTabSetting);
        this.#removeSetting(drawerCloseableTabSetting);
      }
      updateVersionFrom30To31() {
        const recordingsSetting = this.#settings.createSetting("recorder_recordings", []);
        this.#removeSetting(recordingsSetting);
      }
      updateVersionFrom31To32() {
        const breakpointsSetting = this.#settings.createLocalSetting("breakpoints", []);
        const breakpoints = breakpointsSetting.get();
        for (const breakpoint of breakpoints) {
          breakpoint["resourceTypeName"] = "script";
        }
        breakpointsSetting.set(breakpoints);
      }
      updateVersionFrom32To33() {
        const previouslyViewedFilesSetting = this.#settings.createLocalSetting("previouslyViewedFiles", []);
        let previouslyViewedFiles = previouslyViewedFilesSetting.get();
        previouslyViewedFiles = previouslyViewedFiles.filter((previouslyViewedFile) => "url" in previouslyViewedFile);
        for (const previouslyViewedFile of previouslyViewedFiles) {
          previouslyViewedFile["resourceTypeName"] = "script";
        }
        previouslyViewedFilesSetting.set(previouslyViewedFiles);
      }
      updateVersionFrom33To34() {
        const logpointPrefix = "/** DEVTOOLS_LOGPOINT */ console.log(";
        const logpointSuffix = ")";
        const breakpointsSetting = this.#settings.createLocalSetting("breakpoints", []);
        const breakpoints = breakpointsSetting.get();
        for (const breakpoint of breakpoints) {
          const isLogpoint = breakpoint.condition.startsWith(logpointPrefix) && breakpoint.condition.endsWith(logpointSuffix);
          breakpoint["isLogpoint"] = isLogpoint;
        }
        breakpointsSetting.set(breakpoints);
      }
      updateVersionFrom34To35() {
        const logpointPrefix = "/** DEVTOOLS_LOGPOINT */ console.log(";
        const logpointSuffix = ")";
        const breakpointsSetting = this.#settings.createLocalSetting("breakpoints", []);
        const breakpoints = breakpointsSetting.get();
        for (const breakpoint of breakpoints) {
          const { condition, isLogpoint } = breakpoint;
          if (isLogpoint) {
            breakpoint.condition = condition.slice(logpointPrefix.length, condition.length - logpointSuffix.length);
          }
        }
        breakpointsSetting.set(breakpoints);
      }
      updateVersionFrom35To36() {
        this.#settings.createSetting("showThirdPartyIssues", true).set(true);
      }
      updateVersionFrom36To37() {
        const updateStorage = (storage) => {
          for (const key of storage.keys()) {
            const normalizedKey = Settings.normalizeSettingName(key);
            if (normalizedKey !== key) {
              const value = storage.get(key);
              this.#removeSetting({ name: key, storage });
              storage.set(normalizedKey, value);
            }
          }
        };
        updateStorage(this.#settings.globalStorage);
        updateStorage(this.#settings.syncedStorage);
        updateStorage(this.#settings.localStorage);
        for (const key of this.#settings.globalStorage.keys()) {
          if (key.startsWith("data-grid-") && key.endsWith("-column-weights") || key.endsWith("-tab-order") || key === "views-location-override" || key === "closeable-tabs") {
            const setting = this.#settings.createSetting(key, {});
            setting.set(toKebabCaseKeys(setting.get()));
          }
          if (key.endsWith("-selected-tab")) {
            const setting = this.#settings.createSetting(key, "");
            setting.set(toKebabCase(setting.get()));
          }
        }
      }
      updateVersionFrom37To38() {
        const getConsoleInsightsEnabledSetting = () => {
          try {
            return this.#settings.moduleSetting("console-insights-enabled");
          } catch {
            return;
          }
        };
        const consoleInsightsEnabled = getConsoleInsightsEnabledSetting();
        const onboardingFinished = this.#settings.createLocalSetting("console-insights-onboarding-finished", false);
        if (consoleInsightsEnabled && consoleInsightsEnabled.get() === true && onboardingFinished.get() === false) {
          consoleInsightsEnabled.set(false);
        }
        if (consoleInsightsEnabled && consoleInsightsEnabled.get() === false) {
          onboardingFinished.set(false);
        }
      }
      updateVersionFrom38To39() {
        const PREFERRED_NETWORK_COND = "preferred-network-condition";
        const setting = this.#settings.globalStorage.get(PREFERRED_NETWORK_COND);
        if (!setting) {
          return;
        }
        try {
          const networkSetting = JSON.parse(setting);
          if (networkSetting.title === "Slow 3G") {
            networkSetting.title = "3G";
            networkSetting.i18nTitleKey = "3G";
            this.#settings.globalStorage.set(PREFERRED_NETWORK_COND, JSON.stringify(networkSetting));
          } else if (networkSetting.title === "Fast 3G") {
            networkSetting.title = "Slow 4G";
            networkSetting.i18nTitleKey = "Slow 4G";
            this.#settings.globalStorage.set(PREFERRED_NETWORK_COND, JSON.stringify(networkSetting));
          }
        } catch {
          this.#settings.globalStorage.remove(PREFERRED_NETWORK_COND);
        }
      }
      updateVersionFrom39To40() {
        const hasCustomNetworkConditionsSetting = () => {
          try {
            this.#settings.moduleSetting("custom-network-conditions");
            return true;
          } catch {
            return false;
          }
        };
        if (hasCustomNetworkConditionsSetting()) {
          const conditionsSetting = this.#settings.moduleSetting("custom-network-conditions");
          const customConditions = conditionsSetting.get();
          if (customConditions?.length > 0) {
            customConditions.forEach((condition, i) => {
              if (condition.key) {
                return;
              }
              condition.key = `USER_CUSTOM_SETTING_${i + 1}`;
            });
            conditionsSetting.set(customConditions);
          }
        }
        const PREFERRED_NETWORK_COND_SETTING = "preferred-network-condition";
        const setting = this.#settings.globalStorage.get(PREFERRED_NETWORK_COND_SETTING);
        if (!setting) {
          return;
        }
        const UI_STRING_TO_NEW_KEY = {
          "Fast 4G": "SPEED_FAST_4G",
          "Slow 4G": "SPEED_SLOW_4G",
          "3G": "SPEED_3G",
          "No throttling": "NO_THROTTLING",
          Offline: "OFFLINE"
        };
        try {
          const networkSetting = JSON.parse(setting);
          if (networkSetting.i18nTitleKey && UI_STRING_TO_NEW_KEY.hasOwnProperty(networkSetting.i18nTitleKey)) {
            const key = UI_STRING_TO_NEW_KEY[networkSetting.i18nTitleKey];
            const newSetting = this.#settings.createSetting("active-network-condition-key", "NO_THROTTLING");
            newSetting.set(key);
          }
        } finally {
          this.#settings.globalStorage.remove(PREFERRED_NETWORK_COND_SETTING);
        }
      }
      updateVersionFrom40To41() {
        if (this.#settings.syncedStorage.has("hide-network-messages")) {
          const oldNetworkSetting = this.#settings.createSetting("hide-network-messages", false, "Synced");
          if (!this.#settings.syncedStorage.has("network-messages")) {
            const newNetworkSetting = this.#settings.createSetting("network-messages", true, "Synced");
            newNetworkSetting.set(!oldNetworkSetting.get());
          }
          this.#removeSetting(oldNetworkSetting);
        }
        if (this.#settings.syncedStorage.has("frame-viewer-hide-chrome-window")) {
          const oldChromeFrameSetting = this.#settings.createSetting("frame-viewer-hide-chrome-window", false, "Synced");
          if (!this.#settings.syncedStorage.has("frame-viewer-chrome-window")) {
            const newChromeFrameSetting = this.#settings.createSetting("frame-viewer-chrome-window", true, "Synced");
            newChromeFrameSetting.set(!oldChromeFrameSetting.get());
          }
          this.#removeSetting(oldChromeFrameSetting);
        }
      }
      migrateSettingsFromLocalStorage() {
        const localSettings = /* @__PURE__ */ new Set([
          "advancedSearchConfig",
          "breakpoints",
          "consoleHistory",
          "domBreakpoints",
          "eventListenerBreakpoints",
          "fileSystemMapping",
          "lastSelectedSourcesSidebarPaneTab",
          "previouslyViewedFiles",
          "savedURLs",
          "watchExpressions",
          "workspaceExcludedFolders",
          "xhrBreakpoints"
        ]);
        if (!window.localStorage) {
          return;
        }
        for (const key in window.localStorage) {
          if (localSettings.has(key)) {
            continue;
          }
          const value = window.localStorage[key];
          window.localStorage.removeItem(key);
          this.#settings.globalStorage.set(key, value);
        }
      }
      clearBreakpointsWhenTooMany(breakpointsSetting, maxBreakpointsCount) {
        if (breakpointsSetting.get().length > maxBreakpointsCount) {
          breakpointsSetting.set([]);
        }
      }
    };
    Settings$1 = /* @__PURE__ */ Object.freeze({
      __proto__: null,
      Deprecation,
      InMemoryStorage,
      RegExpSetting,
      Setting,
      Settings,
      SettingsStorage,
      VersionController,
      getLocalizedSettingsCategory,
      maybeRemoveSettingExtension,
      moduleSetting,
      registerSettingExtension,
      registerSettingsForTest,
      resetSettings,
      settingForTest
    });
    SimpleHistoryManager = class {
      #entries;
      #activeEntryIndex;
      #coalescingReadonly;
      #historyDepth;
      constructor(historyDepth) {
        this.#entries = [];
        this.#activeEntryIndex = -1;
        this.#coalescingReadonly = 0;
        this.#historyDepth = historyDepth;
      }
      readOnlyLock() {
        ++this.#coalescingReadonly;
      }
      releaseReadOnlyLock() {
        --this.#coalescingReadonly;
      }
      getPreviousValidIndex() {
        if (this.empty()) {
          return -1;
        }
        let revealIndex = this.#activeEntryIndex - 1;
        while (revealIndex >= 0 && !this.#entries[revealIndex].valid()) {
          --revealIndex;
        }
        if (revealIndex < 0) {
          return -1;
        }
        return revealIndex;
      }
      getNextValidIndex() {
        let revealIndex = this.#activeEntryIndex + 1;
        while (revealIndex < this.#entries.length && !this.#entries[revealIndex].valid()) {
          ++revealIndex;
        }
        if (revealIndex >= this.#entries.length) {
          return -1;
        }
        return revealIndex;
      }
      readOnly() {
        return Boolean(this.#coalescingReadonly);
      }
      empty() {
        return !this.#entries.length;
      }
      active() {
        return this.empty() ? null : this.#entries[this.#activeEntryIndex];
      }
      push(entry) {
        if (this.readOnly()) {
          return;
        }
        if (!this.empty()) {
          this.#entries.splice(this.#activeEntryIndex + 1);
        }
        this.#entries.push(entry);
        if (this.#entries.length > this.#historyDepth) {
          this.#entries.shift();
        }
        this.#activeEntryIndex = this.#entries.length - 1;
      }
      canRollback() {
        return this.getPreviousValidIndex() >= 0;
      }
      canRollover() {
        return this.getNextValidIndex() >= 0;
      }
      rollback() {
        const revealIndex = this.getPreviousValidIndex();
        if (revealIndex === -1) {
          return false;
        }
        this.readOnlyLock();
        this.#activeEntryIndex = revealIndex;
        this.#entries[revealIndex].reveal();
        this.releaseReadOnlyLock();
        return true;
      }
      rollover() {
        const revealIndex = this.getNextValidIndex();
        if (revealIndex === -1) {
          return false;
        }
        this.readOnlyLock();
        this.#activeEntryIndex = revealIndex;
        this.#entries[revealIndex].reveal();
        this.releaseReadOnlyLock();
        return true;
      }
    };
    SimpleHistoryManager$1 = /* @__PURE__ */ Object.freeze({
      __proto__: null,
      SimpleHistoryManager
    });
    Srcset = /* @__PURE__ */ Object.freeze({
      __proto__: null,
      parseSrcset
    });
    StringOutputStream = class {
      #data = "";
      async write(chunk) {
        this.#data += chunk;
      }
      async close() {
      }
      data() {
        return this.#data;
      }
    };
    StringOutputStream$1 = /* @__PURE__ */ Object.freeze({
      __proto__: null,
      StringOutputStream
    });
    Trie$1 = class Trie {
      #size;
      #root;
      #edges;
      #isWord;
      #wordsInSubtree;
      #freeNodes;
      #traitImpl;
      constructor(traitImpl) {
        this.#root = 0;
        this.#traitImpl = traitImpl;
        this.clear();
      }
      static newStringTrie() {
        return new Trie({
          empty: () => "",
          append: (base, appendage) => base + appendage,
          slice: (base, start, end) => base.slice(start, end)
        });
      }
      static newArrayTrie() {
        return new Trie({
          empty: () => [],
          append: (base, appendage) => base.concat([appendage]),
          slice: (base, start, end) => base.slice(start, end)
        });
      }
      add(word) {
        let node2 = this.#root;
        ++this.#wordsInSubtree[this.#root];
        for (let i = 0; i < word.length; ++i) {
          const edge = word[i];
          let next = this.#edges[node2].get(edge);
          if (!next) {
            if (this.#freeNodes.length) {
              next = this.#freeNodes.pop();
            } else {
              next = this.#size++;
              this.#isWord.push(false);
              this.#wordsInSubtree.push(0);
              this.#edges.push(/* @__PURE__ */ new Map());
            }
            this.#edges[node2].set(edge, next);
          }
          ++this.#wordsInSubtree[next];
          node2 = next;
        }
        this.#isWord[node2] = true;
      }
      remove(word) {
        if (!this.has(word)) {
          return false;
        }
        let node2 = this.#root;
        --this.#wordsInSubtree[this.#root];
        for (let i = 0; i < word.length; ++i) {
          const edge = word[i];
          const next = this.#edges[node2].get(edge);
          if (!--this.#wordsInSubtree[next]) {
            this.#edges[node2].delete(edge);
            this.#freeNodes.push(next);
          }
          node2 = next;
        }
        this.#isWord[node2] = false;
        return true;
      }
      has(word) {
        let node2 = this.#root;
        for (let i = 0; i < word.length; ++i) {
          node2 = this.#edges[node2].get(word[i]);
          if (!node2) {
            return false;
          }
        }
        return this.#isWord[node2];
      }
      words(prefix) {
        prefix = prefix ?? this.#traitImpl.empty();
        let node2 = this.#root;
        for (let i = 0; i < prefix.length; ++i) {
          node2 = this.#edges[node2].get(prefix[i]);
          if (!node2) {
            return [];
          }
        }
        const results = [];
        this.dfs(node2, prefix, results);
        return results;
      }
      dfs(node2, prefix, results) {
        if (this.#isWord[node2]) {
          results.push(prefix);
        }
        const edges = this.#edges[node2];
        for (const [edge, node3] of edges) {
          const newPrefix = this.#traitImpl.append(prefix, edge);
          this.dfs(node3, newPrefix, results);
        }
      }
      longestPrefix(word, fullWordOnly) {
        let node2 = this.#root;
        let wordIndex = 0;
        for (let i = 0; i < word.length; ++i) {
          node2 = this.#edges[node2].get(word[i]);
          if (!node2) {
            break;
          }
          if (!fullWordOnly || this.#isWord[node2]) {
            wordIndex = i + 1;
          }
        }
        return this.#traitImpl.slice(word, 0, wordIndex);
      }
      clear() {
        this.#size = 1;
        this.#root = 0;
        this.#edges = [/* @__PURE__ */ new Map()];
        this.#isWord = [false];
        this.#wordsInSubtree = [0];
        this.#freeNodes = [];
      }
    };
    Trie$2 = /* @__PURE__ */ Object.freeze({
      __proto__: null,
      Trie: Trie$1
    });
    TextDictionary = class {
      words = /* @__PURE__ */ new Map();
      index = Trie$1.newStringTrie();
      addWord(word) {
        let count = this.words.get(word) || 0;
        ++count;
        this.words.set(word, count);
        this.index.add(word);
      }
      removeWord(word) {
        let count = this.words.get(word) || 0;
        if (!count) {
          return;
        }
        if (count === 1) {
          this.words.delete(word);
          this.index.remove(word);
          return;
        }
        --count;
        this.words.set(word, count);
      }
      wordsWithPrefix(prefix) {
        return this.index.words(prefix);
      }
      hasWord(word) {
        return this.words.has(word);
      }
      wordCount(word) {
        return this.words.get(word) || 0;
      }
      reset() {
        this.words.clear();
        this.index.clear();
      }
    };
    TextDictionary$1 = /* @__PURE__ */ Object.freeze({
      __proto__: null,
      TextDictionary
    });
    Throttler = class {
      #timeout;
      #isRunningProcess;
      #asSoonAsPossible;
      #process;
      #lastCompleteTime;
      #scheduler = Promise.withResolvers();
      #processTimeout;
      constructor(timeout2) {
        this.#timeout = timeout2;
        this.#isRunningProcess = false;
        this.#asSoonAsPossible = false;
        this.#process = null;
        this.#lastCompleteTime = 0;
      }
      #processCompleted() {
        this.#lastCompleteTime = this.#getTime();
        this.#isRunningProcess = false;
        if (this.#process) {
          this.#schedule(false);
        }
      }
      get process() {
        return this.#process;
      }
      get processCompleted() {
        return this.#process ? this.#scheduler.promise : null;
      }
      #onTimeout() {
        this.#processTimeout = void 0;
        this.#asSoonAsPossible = false;
        this.#isRunningProcess = true;
        void Promise.resolve().then(this.#process).catch(console.error.bind(console)).then(this.#processCompleted.bind(this)).then(this.#scheduler.resolve);
        this.#scheduler = Promise.withResolvers();
        this.#process = null;
      }
      async schedule(process8, scheduling = "Default") {
        this.#process = process8;
        const hasScheduledTasks = Boolean(this.#processTimeout) || this.#isRunningProcess;
        const okToFire = this.#getTime() - this.#lastCompleteTime > this.#timeout;
        const asSoonAsPossible = scheduling === "AsSoonAsPossible" || scheduling === "Default" && !hasScheduledTasks && okToFire;
        const forceTimerUpdate = asSoonAsPossible && !this.#asSoonAsPossible;
        this.#asSoonAsPossible = this.#asSoonAsPossible || asSoonAsPossible;
        this.#schedule(forceTimerUpdate);
        await this.#scheduler.promise;
      }
      #schedule(forceTimerUpdate) {
        if (this.#isRunningProcess) {
          return;
        }
        if (this.#processTimeout && !forceTimerUpdate) {
          return;
        }
        clearTimeout(this.#processTimeout);
        const timeout2 = this.#asSoonAsPossible ? 0 : this.#timeout;
        this.#processTimeout = setTimeout(this.#onTimeout.bind(this), timeout2);
      }
      #getTime() {
        return performance.now();
      }
    };
    Throttler$1 = /* @__PURE__ */ Object.freeze({
      __proto__: null,
      Throttler
    });
    common = /* @__PURE__ */ Object.freeze({
      __proto__: null,
      App,
      AppProvider,
      Base64,
      CharacterIdMap: CharacterIdMap$1,
      Color,
      ColorConverter: ColorConverter$1,
      ColorUtils,
      Console: Console$1,
      Debouncer,
      EventTarget: EventTarget$1,
      Gzip,
      JavaScriptMetaData,
      Lazy,
      MapWithDefault: MapWithDefault$1,
      Mutex: Mutex$1,
      ObjectWrapper: Object$1,
      ParsedURL: ParsedURL$1,
      Progress: Progress$1,
      ResolverBase: ResolverBase$1,
      ResourceType: ResourceType$1,
      ReturnToPanel,
      Revealer,
      Runnable,
      SegmentedRange: SegmentedRange$1,
      SettingRegistration,
      Settings: Settings$1,
      SimpleHistoryManager: SimpleHistoryManager$1,
      Srcset,
      StringOutputStream: StringOutputStream$1,
      TextDictionary: TextDictionary$1,
      Throttler: Throttler$1,
      Trie: Trie$2,
      UIString
    });
    UIStrings$18 = {
      preserveLogUponNavigation: "Preserve log upon navigation",
      doNotPreserveLogUponNavigation: "Do not preserve log upon navigation",
      pauseOnExceptions: "Pause on exceptions",
      doNotPauseOnExceptions: "Do not pause on exceptions",
      disableJavascript: "Disable JavaScript",
      enableJavascript: "Enable JavaScript",
      disableAsyncStackTraces: "Disable async stack traces",
      doNotCaptureAsyncStackTraces: "Do not capture async stack traces",
      captureAsyncStackTraces: "Capture async stack traces",
      showRulersOnHover: "Show rulers on hover",
      doNotShowRulersOnHover: "Do not show rulers on hover",
      showAreaNames: "Show area names",
      showGridNamedAreas: "Show grid named areas",
      doNotShowGridNamedAreas: "Do not show grid named areas",
      showTrackSizes: "Show track sizes",
      showGridTrackSizes: "Show grid track sizes",
      doNotShowGridTrackSizes: "Do not show grid track sizes",
      extendGridLines: "Extend grid lines",
      doNotExtendGridLines: "Do not extend grid lines",
      showLineLabels: "Show line labels",
      hideLineLabels: "Hide line labels",
      showLineNumbers: "Show line numbers",
      showLineNames: "Show line names",
      showPaintFlashingRectangles: "Show paint flashing rectangles",
      hidePaintFlashingRectangles: "Hide paint flashing rectangles",
      showLayoutShiftRegions: "Show layout shift regions",
      hideLayoutShiftRegions: "Hide layout shift regions",
      highlightAdFrames: "Highlight ad frames",
      doNotHighlightAdFrames: "Do not highlight ad frames",
      showLayerBorders: "Show layer borders",
      hideLayerBorders: "Hide layer borders",
      showFramesPerSecondFpsMeter: "Show frames per second (FPS) meter",
      hideFramesPerSecondFpsMeter: "Hide frames per second (FPS) meter",
      showScrollPerformanceBottlenecks: "Show scroll performance bottlenecks",
      hideScrollPerformanceBottlenecks: "Hide scroll performance bottlenecks",
      emulateAFocusedPage: "Emulate a focused page",
      doNotEmulateAFocusedPage: "Do not emulate a focused page",
      doNotEmulateCssMediaType: "Do not emulate CSS media type",
      noEmulation: "No emulation",
      emulateCssPrintMediaType: "Emulate CSS print media type",
      print: "print",
      emulateCssScreenMediaType: "Emulate CSS screen media type",
      screen: "screen",
      query: "query",
      emulateCssMediaType: "Emulate CSS media type",
      doNotEmulateCss: "Do not emulate CSS {PH1}",
      emulateCss: "Emulate CSS {PH1}",
      emulateCssMediaFeature: "Emulate CSS media feature {PH1}",
      doNotEmulateAnyVisionDeficiency: "Do not emulate any vision deficiency",
      emulateBlurredVision: "Emulate blurred vision",
      emulateReducedContrast: "Emulate reduced contrast",
      blurredVision: "Blurred vision",
      reducedContrast: "Reduced contrast",
      emulateProtanopia: "Emulate protanopia (no red)",
      protanopia: "Protanopia (no red)",
      emulateDeuteranopia: "Emulate deuteranopia (no green)",
      deuteranopia: "Deuteranopia (no green)",
      emulateTritanopia: "Emulate tritanopia (no blue)",
      tritanopia: "Tritanopia (no blue)",
      emulateAchromatopsia: "Emulate achromatopsia (no color)",
      achromatopsia: "Achromatopsia (no color)",
      emulateVisionDeficiencies: "Emulate vision deficiencies",
      emulateOsTextScale: "Emulate OS text scale",
      doNotEmulateOsTextScale: "Do not emulate OS text scale",
      osTextScaleEmulationNone: "No emulation",
      osTextScaleEmulation85: "85%",
      osTextScaleEmulation100: "100% (default)",
      osTextScaleEmulation115: "115%",
      osTextScaleEmulation130: "130%",
      osTextScaleEmulation150: "150%",
      osTextScaleEmulation180: "180%",
      osTextScaleEmulation200: "200%",
      disableLocalFonts: "Disable local fonts",
      enableLocalFonts: "Enable local fonts",
      disableAvifFormat: "Disable `AVIF` format",
      enableAvifFormat: "Enable `AVIF` format",
      disableJpegXlFormat: "Disable `JPEG XL` format",
      enableJpegXlFormat: "Enable `JPEG XL` format",
      disableWebpFormat: "Disable `WebP` format",
      enableWebpFormat: "Enable `WebP` format",
      customFormatters: "Custom formatters",
      networkRequestBlocking: "Network request blocking",
      enableNetworkRequestBlocking: "Enable network request blocking",
      disableNetworkRequestBlocking: "Disable network request blocking",
      enableCache: "Enable cache",
      disableCache: "Disable cache while DevTools is open",
      emulateAutoDarkMode: "Emulate auto dark mode",
      enableRemoteFileLoading: "Allow loading remote file path resources in DevTools",
      remoteFileLoadingInfo: "Example resource are source maps. Disabled by default for security reasons.",
      networkCacheExplanation: "Disabling the network cache will simulate a network experience similar to a first time visitor.",
      javaScriptSourceMaps: "JavaScript source maps",
      enableJavaScriptSourceMaps: "Enable JavaScript source maps",
      disableJavaScriptSourceMaps: "Disable JavaScript source maps",
      cssSourceMaps: "CSS source maps",
      enableCssSourceMaps: "Enable CSS source maps",
      disableCssSourceMaps: "Disable CSS source maps",
      logXmlhttprequests: "Log XMLHttpRequests"
    };
    str_$17 = registerUIStrings("core/sdk/sdk-meta.ts", UIStrings$18);
    i18nLazyString$f = getLazilyComputedLocalizedString.bind(void 0, str_$17);
    registerSettingExtension({
      category: "CONSOLE",
      storageType: "Synced",
      title: i18nLazyString$f(UIStrings$18.preserveLogUponNavigation),
      settingName: "preserve-console-log",
      settingType: "boolean",
      defaultValue: false,
      options: [
        {
          value: true,
          title: i18nLazyString$f(UIStrings$18.preserveLogUponNavigation)
        },
        {
          value: false,
          title: i18nLazyString$f(UIStrings$18.doNotPreserveLogUponNavigation)
        }
      ]
    });
    registerSettingExtension({
      category: "DEBUGGER",
      settingName: "pause-on-exception-enabled",
      settingType: "boolean",
      defaultValue: false,
      options: [
        {
          value: true,
          title: i18nLazyString$f(UIStrings$18.pauseOnExceptions)
        },
        {
          value: false,
          title: i18nLazyString$f(UIStrings$18.doNotPauseOnExceptions)
        }
      ]
    });
    registerSettingExtension({
      settingName: "pause-on-caught-exception",
      settingType: "boolean",
      defaultValue: false
    });
    registerSettingExtension({
      settingName: "pause-on-uncaught-exception",
      settingType: "boolean",
      defaultValue: false
    });
    registerSettingExtension({
      category: "DEBUGGER",
      title: i18nLazyString$f(UIStrings$18.disableJavascript),
      settingName: "java-script-disabled",
      settingType: "boolean",
      storageType: "Session",
      order: 1,
      defaultValue: false,
      options: [
        {
          value: true,
          title: i18nLazyString$f(UIStrings$18.disableJavascript)
        },
        {
          value: false,
          title: i18nLazyString$f(UIStrings$18.enableJavascript)
        }
      ]
    });
    registerSettingExtension({
      category: "DEBUGGER",
      title: i18nLazyString$f(UIStrings$18.disableAsyncStackTraces),
      settingName: "disable-async-stack-traces",
      settingType: "boolean",
      defaultValue: false,
      order: 2,
      options: [
        {
          value: true,
          title: i18nLazyString$f(UIStrings$18.doNotCaptureAsyncStackTraces)
        },
        {
          value: false,
          title: i18nLazyString$f(UIStrings$18.captureAsyncStackTraces)
        }
      ]
    });
    registerSettingExtension({
      category: "DEBUGGER",
      settingName: "breakpoints-active",
      settingType: "boolean",
      storageType: "Session",
      defaultValue: true
    });
    registerSettingExtension({
      category: "ELEMENTS",
      storageType: "Synced",
      title: i18nLazyString$f(UIStrings$18.showRulersOnHover),
      settingName: "show-metrics-rulers",
      settingType: "boolean",
      options: [
        {
          value: true,
          title: i18nLazyString$f(UIStrings$18.showRulersOnHover)
        },
        {
          value: false,
          title: i18nLazyString$f(UIStrings$18.doNotShowRulersOnHover)
        }
      ],
      defaultValue: false
    });
    registerSettingExtension({
      category: "GRID",
      storageType: "Synced",
      title: i18nLazyString$f(UIStrings$18.showAreaNames),
      settingName: "show-grid-areas",
      settingType: "boolean",
      options: [
        {
          value: true,
          title: i18nLazyString$f(UIStrings$18.showGridNamedAreas)
        },
        {
          value: false,
          title: i18nLazyString$f(UIStrings$18.doNotShowGridNamedAreas)
        }
      ],
      defaultValue: false
    });
    registerSettingExtension({
      category: "GRID",
      storageType: "Synced",
      title: i18nLazyString$f(UIStrings$18.showTrackSizes),
      settingName: "show-grid-track-sizes",
      settingType: "boolean",
      options: [
        {
          value: true,
          title: i18nLazyString$f(UIStrings$18.showGridTrackSizes)
        },
        {
          value: false,
          title: i18nLazyString$f(UIStrings$18.doNotShowGridTrackSizes)
        }
      ],
      defaultValue: false
    });
    registerSettingExtension({
      category: "GRID",
      storageType: "Synced",
      title: i18nLazyString$f(UIStrings$18.extendGridLines),
      settingName: "extend-grid-lines",
      settingType: "boolean",
      options: [
        {
          value: true,
          title: i18nLazyString$f(UIStrings$18.extendGridLines)
        },
        {
          value: false,
          title: i18nLazyString$f(UIStrings$18.doNotExtendGridLines)
        }
      ],
      defaultValue: false
    });
    registerSettingExtension({
      category: "GRID",
      storageType: "Synced",
      title: i18nLazyString$f(UIStrings$18.showLineLabels),
      settingName: "show-grid-line-labels",
      settingType: "enum",
      options: [
        {
          title: i18nLazyString$f(UIStrings$18.hideLineLabels),
          text: i18nLazyString$f(UIStrings$18.hideLineLabels),
          value: "none"
        },
        {
          title: i18nLazyString$f(UIStrings$18.showLineNumbers),
          text: i18nLazyString$f(UIStrings$18.showLineNumbers),
          value: "lineNumbers"
        },
        {
          title: i18nLazyString$f(UIStrings$18.showLineNames),
          text: i18nLazyString$f(UIStrings$18.showLineNames),
          value: "lineNames"
        }
      ],
      defaultValue: "lineNumbers"
    });
    registerSettingExtension({
      category: "RENDERING",
      settingName: "show-paint-rects",
      settingType: "boolean",
      storageType: "Session",
      options: [
        {
          value: true,
          title: i18nLazyString$f(UIStrings$18.showPaintFlashingRectangles)
        },
        {
          value: false,
          title: i18nLazyString$f(UIStrings$18.hidePaintFlashingRectangles)
        }
      ],
      defaultValue: false
    });
    registerSettingExtension({
      category: "RENDERING",
      settingName: "show-layout-shift-regions",
      settingType: "boolean",
      storageType: "Session",
      options: [
        {
          value: true,
          title: i18nLazyString$f(UIStrings$18.showLayoutShiftRegions)
        },
        {
          value: false,
          title: i18nLazyString$f(UIStrings$18.hideLayoutShiftRegions)
        }
      ],
      defaultValue: false
    });
    registerSettingExtension({
      category: "RENDERING",
      settingName: "show-ad-highlights",
      settingType: "boolean",
      storageType: "Session",
      options: [
        {
          value: true,
          title: i18nLazyString$f(UIStrings$18.highlightAdFrames)
        },
        {
          value: false,
          title: i18nLazyString$f(UIStrings$18.doNotHighlightAdFrames)
        }
      ],
      defaultValue: false
    });
    registerSettingExtension({
      category: "RENDERING",
      settingName: "show-debug-borders",
      settingType: "boolean",
      storageType: "Session",
      options: [
        {
          value: true,
          title: i18nLazyString$f(UIStrings$18.showLayerBorders)
        },
        {
          value: false,
          title: i18nLazyString$f(UIStrings$18.hideLayerBorders)
        }
      ],
      defaultValue: false
    });
    registerSettingExtension({
      category: "RENDERING",
      settingName: "show-fps-counter",
      settingType: "boolean",
      storageType: "Session",
      options: [
        {
          value: true,
          title: i18nLazyString$f(UIStrings$18.showFramesPerSecondFpsMeter)
        },
        {
          value: false,
          title: i18nLazyString$f(UIStrings$18.hideFramesPerSecondFpsMeter)
        }
      ],
      defaultValue: false
    });
    registerSettingExtension({
      category: "RENDERING",
      settingName: "show-scroll-bottleneck-rects",
      settingType: "boolean",
      storageType: "Session",
      options: [
        {
          value: true,
          title: i18nLazyString$f(UIStrings$18.showScrollPerformanceBottlenecks)
        },
        {
          value: false,
          title: i18nLazyString$f(UIStrings$18.hideScrollPerformanceBottlenecks)
        }
      ],
      defaultValue: false
    });
    registerSettingExtension({
      category: "RENDERING",
      title: i18nLazyString$f(UIStrings$18.emulateAFocusedPage),
      settingName: "emulate-page-focus",
      settingType: "boolean",
      storageType: "Local",
      defaultValue: false,
      options: [
        {
          value: true,
          title: i18nLazyString$f(UIStrings$18.emulateAFocusedPage)
        },
        {
          value: false,
          title: i18nLazyString$f(UIStrings$18.doNotEmulateAFocusedPage)
        }
      ]
    });
    registerSettingExtension({
      category: "RENDERING",
      settingName: "emulated-css-media",
      settingType: "enum",
      storageType: "Session",
      defaultValue: "",
      options: [
        {
          title: i18nLazyString$f(UIStrings$18.doNotEmulateCssMediaType),
          text: i18nLazyString$f(UIStrings$18.noEmulation),
          value: ""
        },
        {
          title: i18nLazyString$f(UIStrings$18.emulateCssPrintMediaType),
          text: i18nLazyString$f(UIStrings$18.print),
          value: "print"
        },
        {
          title: i18nLazyString$f(UIStrings$18.emulateCssScreenMediaType),
          text: i18nLazyString$f(UIStrings$18.screen),
          value: "screen"
        }
      ],
      tags: [
        i18nLazyString$f(UIStrings$18.query)
      ],
      title: i18nLazyString$f(UIStrings$18.emulateCssMediaType)
    });
    registerSettingExtension({
      category: "RENDERING",
      settingName: "emulated-css-media-feature-prefers-color-scheme",
      settingType: "enum",
      storageType: "Session",
      defaultValue: "",
      options: [
        {
          title: i18nLazyString$f(UIStrings$18.doNotEmulateCss, { PH1: "prefers-color-scheme" }),
          text: i18nLazyString$f(UIStrings$18.noEmulation),
          value: ""
        },
        {
          title: i18nLazyString$f(UIStrings$18.emulateCss, { PH1: "prefers-color-scheme: light" }),
          text: lockedLazyString("prefers-color-scheme: light"),
          value: "light"
        },
        {
          title: i18nLazyString$f(UIStrings$18.emulateCss, { PH1: "prefers-color-scheme: dark" }),
          text: lockedLazyString("prefers-color-scheme: dark"),
          value: "dark"
        }
      ],
      tags: [
        i18nLazyString$f(UIStrings$18.query)
      ],
      title: i18nLazyString$f(UIStrings$18.emulateCssMediaFeature, { PH1: "prefers-color-scheme" })
    });
    registerSettingExtension({
      category: "RENDERING",
      settingName: "emulated-css-media-feature-forced-colors",
      settingType: "enum",
      storageType: "Session",
      defaultValue: "",
      options: [
        {
          title: i18nLazyString$f(UIStrings$18.doNotEmulateCss, { PH1: "forced-colors" }),
          text: i18nLazyString$f(UIStrings$18.noEmulation),
          value: ""
        },
        {
          title: i18nLazyString$f(UIStrings$18.emulateCss, { PH1: "forced-colors: active" }),
          text: lockedLazyString("forced-colors: active"),
          value: "active"
        },
        {
          title: i18nLazyString$f(UIStrings$18.emulateCss, { PH1: "forced-colors: none" }),
          text: lockedLazyString("forced-colors: none"),
          value: "none"
        }
      ],
      tags: [
        i18nLazyString$f(UIStrings$18.query)
      ],
      title: i18nLazyString$f(UIStrings$18.emulateCssMediaFeature, { PH1: "forced-colors" })
    });
    registerSettingExtension({
      category: "RENDERING",
      settingName: "emulated-css-media-feature-prefers-reduced-motion",
      settingType: "enum",
      storageType: "Session",
      defaultValue: "",
      options: [
        {
          title: i18nLazyString$f(UIStrings$18.doNotEmulateCss, { PH1: "prefers-reduced-motion" }),
          text: i18nLazyString$f(UIStrings$18.noEmulation),
          value: ""
        },
        {
          title: i18nLazyString$f(UIStrings$18.emulateCss, { PH1: "prefers-reduced-motion: reduce" }),
          text: lockedLazyString("prefers-reduced-motion: reduce"),
          value: "reduce"
        }
      ],
      tags: [
        i18nLazyString$f(UIStrings$18.query)
      ],
      title: i18nLazyString$f(UIStrings$18.emulateCssMediaFeature, { PH1: "prefers-reduced-motion" })
    });
    registerSettingExtension({
      settingName: "emulated-css-media-feature-prefers-contrast",
      settingType: "enum",
      storageType: "Session",
      defaultValue: "",
      options: [
        {
          title: i18nLazyString$f(UIStrings$18.doNotEmulateCss, { PH1: "prefers-contrast" }),
          text: i18nLazyString$f(UIStrings$18.noEmulation),
          value: ""
        },
        {
          title: i18nLazyString$f(UIStrings$18.emulateCss, { PH1: "prefers-contrast: more" }),
          text: lockedLazyString("prefers-contrast: more"),
          value: "more"
        },
        {
          title: i18nLazyString$f(UIStrings$18.emulateCss, { PH1: "prefers-contrast: less" }),
          text: lockedLazyString("prefers-contrast: less"),
          value: "less"
        },
        {
          title: i18nLazyString$f(UIStrings$18.emulateCss, { PH1: "prefers-contrast: custom" }),
          text: lockedLazyString("prefers-contrast: custom"),
          value: "custom"
        }
      ],
      tags: [
        i18nLazyString$f(UIStrings$18.query)
      ],
      title: i18nLazyString$f(UIStrings$18.emulateCssMediaFeature, { PH1: "prefers-contrast" })
    });
    registerSettingExtension({
      settingName: "emulated-css-media-feature-prefers-reduced-data",
      settingType: "enum",
      storageType: "Session",
      defaultValue: "",
      options: [
        {
          title: i18nLazyString$f(UIStrings$18.doNotEmulateCss, { PH1: "prefers-reduced-data" }),
          text: i18nLazyString$f(UIStrings$18.noEmulation),
          value: ""
        },
        {
          title: i18nLazyString$f(UIStrings$18.emulateCss, { PH1: "prefers-reduced-data: reduce" }),
          text: lockedLazyString("prefers-reduced-data: reduce"),
          value: "reduce"
        }
      ],
      title: i18nLazyString$f(UIStrings$18.emulateCssMediaFeature, { PH1: "prefers-reduced-data" })
    });
    registerSettingExtension({
      settingName: "emulated-css-media-feature-prefers-reduced-transparency",
      settingType: "enum",
      storageType: "Session",
      defaultValue: "",
      options: [
        {
          title: i18nLazyString$f(UIStrings$18.doNotEmulateCss, { PH1: "prefers-reduced-transparency" }),
          text: i18nLazyString$f(UIStrings$18.noEmulation),
          value: ""
        },
        {
          title: i18nLazyString$f(UIStrings$18.emulateCss, { PH1: "prefers-reduced-transparency: reduce" }),
          text: lockedLazyString("prefers-reduced-transparency: reduce"),
          value: "reduce"
        }
      ],
      title: i18nLazyString$f(UIStrings$18.emulateCssMediaFeature, { PH1: "prefers-reduced-transparency" })
    });
    registerSettingExtension({
      settingName: "emulated-css-media-feature-color-gamut",
      settingType: "enum",
      storageType: "Session",
      defaultValue: "",
      options: [
        {
          title: i18nLazyString$f(UIStrings$18.doNotEmulateCss, { PH1: "color-gamut" }),
          text: i18nLazyString$f(UIStrings$18.noEmulation),
          value: ""
        },
        {
          title: i18nLazyString$f(UIStrings$18.emulateCss, { PH1: "color-gamut: srgb" }),
          text: lockedLazyString("color-gamut: srgb"),
          value: "srgb"
        },
        {
          title: i18nLazyString$f(UIStrings$18.emulateCss, { PH1: "color-gamut: p3" }),
          text: lockedLazyString("color-gamut: p3"),
          value: "p3"
        },
        {
          title: i18nLazyString$f(UIStrings$18.emulateCss, { PH1: "color-gamut: rec2020" }),
          text: lockedLazyString("color-gamut: rec2020"),
          value: "rec2020"
        }
      ],
      title: i18nLazyString$f(UIStrings$18.emulateCssMediaFeature, { PH1: "color-gamut" })
    });
    registerSettingExtension({
      category: "RENDERING",
      settingName: "emulated-vision-deficiency",
      settingType: "enum",
      storageType: "Session",
      defaultValue: "none",
      options: [
        {
          title: i18nLazyString$f(UIStrings$18.doNotEmulateAnyVisionDeficiency),
          text: i18nLazyString$f(UIStrings$18.noEmulation),
          value: "none"
        },
        {
          title: i18nLazyString$f(UIStrings$18.emulateBlurredVision),
          text: i18nLazyString$f(UIStrings$18.blurredVision),
          value: "blurredVision"
        },
        {
          title: i18nLazyString$f(UIStrings$18.emulateReducedContrast),
          text: i18nLazyString$f(UIStrings$18.reducedContrast),
          value: "reducedContrast"
        },
        {
          title: i18nLazyString$f(UIStrings$18.emulateProtanopia),
          text: i18nLazyString$f(UIStrings$18.protanopia),
          value: "protanopia"
        },
        {
          title: i18nLazyString$f(UIStrings$18.emulateDeuteranopia),
          text: i18nLazyString$f(UIStrings$18.deuteranopia),
          value: "deuteranopia"
        },
        {
          title: i18nLazyString$f(UIStrings$18.emulateTritanopia),
          text: i18nLazyString$f(UIStrings$18.tritanopia),
          value: "tritanopia"
        },
        {
          title: i18nLazyString$f(UIStrings$18.emulateAchromatopsia),
          text: i18nLazyString$f(UIStrings$18.achromatopsia),
          value: "achromatopsia"
        }
      ],
      tags: [
        i18nLazyString$f(UIStrings$18.query)
      ],
      title: i18nLazyString$f(UIStrings$18.emulateVisionDeficiencies)
    });
    registerSettingExtension({
      category: "RENDERING",
      settingName: "emulated-os-text-scale",
      settingType: "enum",
      storageType: "Session",
      defaultValue: "",
      options: [
        {
          title: i18nLazyString$f(UIStrings$18.doNotEmulateOsTextScale),
          text: i18nLazyString$f(UIStrings$18.osTextScaleEmulationNone),
          value: ""
        },
        {
          title: i18nLazyString$f(UIStrings$18.osTextScaleEmulation85),
          text: i18nLazyString$f(UIStrings$18.osTextScaleEmulation85),
          value: "0.85"
        },
        {
          title: i18nLazyString$f(UIStrings$18.osTextScaleEmulation100),
          text: i18nLazyString$f(UIStrings$18.osTextScaleEmulation100),
          value: "1"
        },
        {
          title: i18nLazyString$f(UIStrings$18.osTextScaleEmulation115),
          text: i18nLazyString$f(UIStrings$18.osTextScaleEmulation115),
          value: "1.15"
        },
        {
          title: i18nLazyString$f(UIStrings$18.osTextScaleEmulation130),
          text: i18nLazyString$f(UIStrings$18.osTextScaleEmulation130),
          value: "1.3"
        },
        {
          title: i18nLazyString$f(UIStrings$18.osTextScaleEmulation150),
          text: i18nLazyString$f(UIStrings$18.osTextScaleEmulation150),
          value: "1.5"
        },
        {
          title: i18nLazyString$f(UIStrings$18.osTextScaleEmulation180),
          text: i18nLazyString$f(UIStrings$18.osTextScaleEmulation180),
          value: "1.8"
        },
        {
          title: i18nLazyString$f(UIStrings$18.osTextScaleEmulation200),
          text: i18nLazyString$f(UIStrings$18.osTextScaleEmulation200),
          value: "2"
        }
      ],
      tags: [
        i18nLazyString$f(UIStrings$18.query)
      ],
      title: i18nLazyString$f(UIStrings$18.emulateOsTextScale)
    });
    registerSettingExtension({
      category: "RENDERING",
      settingName: "local-fonts-disabled",
      settingType: "boolean",
      storageType: "Session",
      options: [
        {
          value: true,
          title: i18nLazyString$f(UIStrings$18.disableLocalFonts)
        },
        {
          value: false,
          title: i18nLazyString$f(UIStrings$18.enableLocalFonts)
        }
      ],
      defaultValue: false
    });
    registerSettingExtension({
      category: "RENDERING",
      settingName: "avif-format-disabled",
      settingType: "boolean",
      storageType: "Session",
      options: [
        {
          value: true,
          title: i18nLazyString$f(UIStrings$18.disableAvifFormat)
        },
        {
          value: false,
          title: i18nLazyString$f(UIStrings$18.enableAvifFormat)
        }
      ],
      defaultValue: false
    });
    registerSettingExtension({
      category: "RENDERING",
      settingName: "jpeg-xl-format-disabled",
      settingType: "boolean",
      storageType: "Session",
      options: [
        {
          value: true,
          title: i18nLazyString$f(UIStrings$18.disableJpegXlFormat)
        },
        {
          value: false,
          title: i18nLazyString$f(UIStrings$18.enableJpegXlFormat)
        }
      ],
      defaultValue: false
    });
    registerSettingExtension({
      category: "RENDERING",
      settingName: "webp-format-disabled",
      settingType: "boolean",
      storageType: "Session",
      options: [
        {
          value: true,
          title: i18nLazyString$f(UIStrings$18.disableWebpFormat)
        },
        {
          value: false,
          title: i18nLazyString$f(UIStrings$18.enableWebpFormat)
        }
      ],
      defaultValue: false
    });
    registerSettingExtension({
      category: "CONSOLE",
      title: i18nLazyString$f(UIStrings$18.customFormatters),
      settingName: "custom-formatters",
      settingType: "boolean",
      defaultValue: false
    });
    registerSettingExtension({
      category: "NETWORK",
      title: i18nLazyString$f(UIStrings$18.networkRequestBlocking),
      settingName: "request-blocking-enabled",
      settingType: "boolean",
      storageType: "Local",
      defaultValue: false,
      options: [
        {
          value: true,
          title: i18nLazyString$f(UIStrings$18.enableNetworkRequestBlocking)
        },
        {
          value: false,
          title: i18nLazyString$f(UIStrings$18.disableNetworkRequestBlocking)
        }
      ]
    });
    registerSettingExtension({
      category: "NETWORK",
      title: i18nLazyString$f(UIStrings$18.disableCache),
      settingName: "cache-disabled",
      settingType: "boolean",
      order: 0,
      defaultValue: false,
      userActionCondition: "hasOtherClients",
      options: [
        {
          value: true,
          title: i18nLazyString$f(UIStrings$18.disableCache)
        },
        {
          value: false,
          title: i18nLazyString$f(UIStrings$18.enableCache)
        }
      ],
      learnMore: {
        tooltip: i18nLazyString$f(UIStrings$18.networkCacheExplanation)
      }
    });
    registerSettingExtension({
      category: "RENDERING",
      title: i18nLazyString$f(UIStrings$18.emulateAutoDarkMode),
      settingName: "emulate-auto-dark-mode",
      settingType: "boolean",
      storageType: "Session",
      defaultValue: false
    });
    registerSettingExtension({
      category: "SOURCES",
      storageType: "Synced",
      title: i18nLazyString$f(UIStrings$18.enableRemoteFileLoading),
      settingName: "network.enable-remote-file-loading",
      settingType: "boolean",
      defaultValue: false,
      learnMore: {
        tooltip: i18nLazyString$f(UIStrings$18.remoteFileLoadingInfo)
      }
    });
    registerSettingExtension({
      category: "SOURCES",
      storageType: "Synced",
      title: i18nLazyString$f(UIStrings$18.javaScriptSourceMaps),
      settingName: "js-source-maps-enabled",
      settingType: "boolean",
      defaultValue: true,
      options: [
        {
          value: true,
          title: i18nLazyString$f(UIStrings$18.enableJavaScriptSourceMaps)
        },
        {
          value: false,
          title: i18nLazyString$f(UIStrings$18.disableJavaScriptSourceMaps)
        }
      ]
    });
    registerSettingExtension({
      category: "SOURCES",
      storageType: "Synced",
      title: i18nLazyString$f(UIStrings$18.cssSourceMaps),
      settingName: "css-source-maps-enabled",
      settingType: "boolean",
      defaultValue: true,
      options: [
        {
          value: true,
          title: i18nLazyString$f(UIStrings$18.enableCssSourceMaps)
        },
        {
          value: false,
          title: i18nLazyString$f(UIStrings$18.disableCssSourceMaps)
        }
      ]
    });
    registerSettingExtension({
      category: "CONSOLE",
      storageType: "Synced",
      title: i18nLazyString$f(UIStrings$18.logXmlhttprequests),
      settingName: "monitoring-xhr-enabled",
      settingType: "boolean",
      defaultValue: false
    });
    registerSettingExtension({
      storageType: "Synced",
      settingName: "skip-stack-frames-pattern",
      settingType: "regex",
      defaultValue: "/node_modules/|^node:"
    });
    registerSettingExtension({
      storageType: "Synced",
      settingName: "skip-content-scripts",
      settingType: "boolean",
      defaultValue: true
    });
    registerSettingExtension({
      storageType: "Synced",
      settingName: "automatically-ignore-list-known-third-party-scripts",
      settingType: "boolean",
      defaultValue: true
    });
    registerSettingExtension({
      storageType: "Synced",
      settingName: "skip-anonymous-scripts",
      settingType: "boolean",
      defaultValue: false
    });
    registerSettingExtension({
      storageType: "Synced",
      settingName: "enable-ignore-listing",
      settingType: "boolean",
      defaultValue: true
    });
    (function(Events2) {
      Events2["AppendedToURL"] = "appendedToURL";
      Events2["CanceledSaveURL"] = "canceledSaveURL";
      Events2["ColorThemeChanged"] = "colorThemeChanged";
      Events2["ContextMenuCleared"] = "contextMenuCleared";
      Events2["ContextMenuItemSelected"] = "contextMenuItemSelected";
      Events2["DeviceCountUpdated"] = "deviceCountUpdated";
      Events2["DevicesDiscoveryConfigChanged"] = "devicesDiscoveryConfigChanged";
      Events2["DevicesPortForwardingStatusChanged"] = "devicesPortForwardingStatusChanged";
      Events2["DevicesUpdated"] = "devicesUpdated";
      Events2["DispatchMessage"] = "dispatchMessage";
      Events2["DispatchMessageChunk"] = "dispatchMessageChunk";
      Events2["EnterInspectElementMode"] = "enterInspectElementMode";
      Events2["EyeDropperPickedColor"] = "eyeDropperPickedColor";
      Events2["FileSystemsLoaded"] = "fileSystemsLoaded";
      Events2["FileSystemRemoved"] = "fileSystemRemoved";
      Events2["FileSystemAdded"] = "fileSystemAdded";
      Events2["FileSystemFilesChangedAddedRemoved"] = "fileSystemFilesChangedAddedRemoved";
      Events2["IndexingTotalWorkCalculated"] = "indexingTotalWorkCalculated";
      Events2["IndexingWorked"] = "indexingWorked";
      Events2["IndexingDone"] = "indexingDone";
      Events2["KeyEventUnhandled"] = "keyEventUnhandled";
      Events2["ReloadInspectedPage"] = "reloadInspectedPage";
      Events2["RevealSourceLine"] = "revealSourceLine";
      Events2["SavedURL"] = "savedURL";
      Events2["SearchCompleted"] = "searchCompleted";
      Events2["SetInspectedTabId"] = "setInspectedTabId";
      Events2["SetUseSoftMenu"] = "setUseSoftMenu";
      Events2["ShowPanel"] = "showPanel";
    })(Events$e || (Events$e = {}));
    EventDescriptors = [
      [Events$e.AppendedToURL, ["url"]],
      [Events$e.CanceledSaveURL, ["url"]],
      [Events$e.ColorThemeChanged, []],
      [Events$e.ContextMenuCleared, []],
      [Events$e.ContextMenuItemSelected, ["id"]],
      [Events$e.DeviceCountUpdated, ["count"]],
      [Events$e.DevicesDiscoveryConfigChanged, ["config"]],
      [Events$e.DevicesPortForwardingStatusChanged, ["status"]],
      [Events$e.DevicesUpdated, ["devices"]],
      [Events$e.DispatchMessage, ["messageObject"]],
      [Events$e.DispatchMessageChunk, ["messageChunk", "messageSize"]],
      [Events$e.EnterInspectElementMode, []],
      [Events$e.EyeDropperPickedColor, ["color"]],
      [Events$e.FileSystemsLoaded, ["fileSystems"]],
      [Events$e.FileSystemRemoved, ["fileSystemPath"]],
      [Events$e.FileSystemAdded, ["errorMessage", "fileSystem"]],
      [Events$e.FileSystemFilesChangedAddedRemoved, ["changed", "added", "removed"]],
      [Events$e.IndexingTotalWorkCalculated, , ["requestId", "fileSystemPath", "totalWork"]],
      [Events$e.IndexingWorked, ["requestId", "fileSystemPath", "worked"]],
      [Events$e.IndexingDone, ["requestId", "fileSystemPath"]],
      [Events$e.KeyEventUnhandled, ["event"]],
      [Events$e.ReloadInspectedPage, ["hard"]],
      [Events$e.RevealSourceLine, ["url", "lineNumber", "columnNumber"]],
      [Events$e.SavedURL, ["url", "fileSystemPath"]],
      [Events$e.SearchCompleted, ["requestId", "fileSystemPath", "files"]],
      [Events$e.SetInspectedTabId, ["tabId"]],
      [Events$e.SetUseSoftMenu, ["useSoftMenu"]],
      [Events$e.ShowPanel, ["panelName"]]
    ];
    UIStrings$17 = {
      systemError: "System error",
      connectionError: "Connection error",
      certificateError: "Certificate error",
      httpError: "HTTP error",
      cacheError: "Cache error",
      signedExchangeError: "Signed Exchange error",
      ftpError: "FTP error",
      certificateManagerError: "Certificate manager error",
      dnsResolverError: "DNS resolver error",
      unknownError: "Unknown error",
      httpErrorStatusCodeSS: "HTTP error: status code {PH1}, {PH2}",
      invalidUrl: "Invalid URL",
      decodingDataUrlFailed: "Decoding Data URL failed"
    };
    str_$16 = registerUIStrings("core/host/ResourceLoader.ts", UIStrings$17);
    i18nString$Q = getLocalizedString.bind(void 0, str_$16);
    _lastStreamId = 0;
    _boundStreams = {};
    bindOutputStream = function(stream3) {
      _boundStreams[++_lastStreamId] = stream3;
      return _lastStreamId;
    };
    discardOutputStream = function(id2) {
      void _boundStreams[id2].close();
      delete _boundStreams[id2];
    };
    streamWrite = function(id2, chunk) {
      void _boundStreams[id2].write(chunk);
    };
    load = function(url, headers, callback, allowRemoteFilePaths) {
      const stream3 = new StringOutputStream();
      loadAsStream(url, headers, stream3, mycallback, allowRemoteFilePaths);
      function mycallback(success, headers2, errorDescription) {
        callback(success, headers2, stream3.data(), errorDescription);
      }
    };
    loadAsStream = function(url, headers, stream3, callback, allowRemoteFilePaths) {
      const streamId = bindOutputStream(stream3);
      const parsedURL = new ParsedURL2(url);
      if (parsedURL.isDataURL()) {
        fetchToString(url).then(dataURLDecodeSuccessful).catch(dataURLDecodeFailed);
        return;
      }
      if (!allowRemoteFilePaths && canBeRemoteFilePath(url)) {
        if (callback) {
          callback(false, {}, {
            statusCode: 400,
            netError: -20,
            netErrorName: "net::BLOCKED_BY_CLIENT",
            message: "Loading from a remote file path is prohibited for security reasons."
          });
        }
        return;
      }
      const rawHeaders = [];
      if (headers) {
        for (const key in headers) {
          rawHeaders.push(key + ": " + headers[key]);
        }
      }
      InspectorFrontendHostInstance.loadNetworkResource(url, rawHeaders.join("\r\n"), streamId, finishedCallback);
      function finishedCallback(response) {
        if (callback) {
          const { success, description: description2 } = createErrorMessageFromResponse(response);
          callback(success, response.headers || {}, description2);
        }
        discardOutputStream(streamId);
      }
      function dataURLDecodeSuccessful(text) {
        streamWrite(streamId, text);
        finishedCallback({ statusCode: 200 });
      }
      function dataURLDecodeFailed(_xhrStatus) {
        const messageOverride = i18nString$Q(UIStrings$17.decodingDataUrlFailed);
        finishedCallback({ statusCode: 404, messageOverride });
      }
    };
    UIStrings$16 = {
      devtoolsS: "DevTools - {PH1}"
    };
    str_$15 = registerUIStrings("core/host/InspectorFrontendHostStub.ts", UIStrings$16);
    i18nString$P = getLocalizedString.bind(void 0, str_$15);
    MAX_RECORDED_HISTOGRAMS_SIZE = 100;
    OVERRIDES_FILE_SYSTEM_PATH = "/overrides";
    InspectorFrontendHostStub = class {
      #urlsBeingSaved = /* @__PURE__ */ new Map();
      #fileSystem = null;
      recordedCountHistograms = [];
      recordedEnumeratedHistograms = [];
      recordedPerformanceHistograms = [];
      constructor() {
        if (typeof document === "undefined") {
          return;
        }
        function stopEventPropagation(event) {
          const zoomModifier = this.platform() === "mac" ? event.metaKey : event.ctrlKey;
          if (zoomModifier && (event.key === "+" || event.key === "-")) {
            event.stopPropagation();
          }
        }
        document.addEventListener("keydown", (event) => {
          stopEventPropagation.call(this, event);
        }, true);
      }
      platform() {
        const userAgent = navigator.userAgent;
        if (userAgent.includes("Windows NT")) {
          return "windows";
        }
        if (userAgent.includes("Mac OS X")) {
          return "mac";
        }
        return "linux";
      }
      loadCompleted() {
      }
      bringToFront() {
      }
      closeWindow() {
      }
      setIsDocked(_isDocked, callback) {
        window.setTimeout(callback, 0);
      }
      showSurvey(_trigger, callback) {
        window.setTimeout(() => callback({ surveyShown: false }), 0);
      }
      canShowSurvey(_trigger, callback) {
        window.setTimeout(() => callback({ canShowSurvey: false }), 0);
      }
      setInspectedPageBounds(_bounds) {
      }
      inspectElementCompleted() {
      }
      setInjectedScriptForOrigin(_origin, _script) {
      }
      inspectedURLChanged(url) {
        if (!("document" in globalThis)) {
          return;
        }
        document.title = i18nString$P(UIStrings$16.devtoolsS, { PH1: url.replace(/^https?:\/\//, "") });
      }
      copyText(text) {
        if (text === void 0 || text === null) {
          return;
        }
        void navigator.clipboard.writeText(text);
      }
      openInNewTab(url) {
        if (schemeIs2(url, "javascript:")) {
          return;
        }
        window.open(url, "_blank");
      }
      openSearchResultsInNewTab(_query) {
        Console.instance().error("Search is not enabled in hosted mode. Please inspect using chrome://inspect");
      }
      showItemInFolder(_fileSystemPath) {
        Console.instance().error("Show item in folder is not enabled in hosted mode. Please inspect using chrome://inspect");
      }
      save(url, content, _forceSaveAs, isBase64) {
        let buffer = this.#urlsBeingSaved.get(url)?.buffer;
        if (!buffer) {
          buffer = [];
          this.#urlsBeingSaved.set(url, { isBase64, buffer });
        }
        buffer.push(content);
        this.events.dispatchEventToListeners(Events$e.SavedURL, { url, fileSystemPath: url });
      }
      append(url, content) {
        const buffer = this.#urlsBeingSaved.get(url)?.buffer;
        if (buffer) {
          buffer.push(content);
          this.events.dispatchEventToListeners(Events$e.AppendedToURL, url);
        }
      }
      close(url) {
        const { isBase64, buffer } = this.#urlsBeingSaved.get(url) || { isBase64: false, buffer: [] };
        this.#urlsBeingSaved.delete(url);
        let fileName = "";
        if (url) {
          try {
            const trimmed = trimURL(url);
            fileName = removeURLFragment(trimmed);
          } catch {
            fileName = url;
          }
        }
        const link2 = document.createElement("a");
        link2.download = fileName;
        let blob;
        if (isBase64) {
          const bytes2 = decode$1(buffer.join(""));
          blob = new Blob([bytes2], { type: "application/gzip" });
        } else {
          blob = new Blob(buffer, { type: "text/plain" });
        }
        const blobUrl = URL.createObjectURL(blob);
        link2.href = blobUrl;
        link2.click();
        URL.revokeObjectURL(blobUrl);
      }
      sendMessageToBackend(_message) {
      }
      recordCountHistogram(histogramName, sample, min, exclusiveMax, bucketSize) {
        if (this.recordedCountHistograms.length >= MAX_RECORDED_HISTOGRAMS_SIZE) {
          this.recordedCountHistograms.shift();
        }
        this.recordedCountHistograms.push({ histogramName, sample, min, exclusiveMax, bucketSize });
      }
      recordEnumeratedHistogram(actionName, actionCode, _bucketSize) {
        if (this.recordedEnumeratedHistograms.length >= MAX_RECORDED_HISTOGRAMS_SIZE) {
          this.recordedEnumeratedHistograms.shift();
        }
        this.recordedEnumeratedHistograms.push({ actionName, actionCode });
      }
      recordPerformanceHistogram(histogramName, duration2) {
        if (this.recordedPerformanceHistograms.length >= MAX_RECORDED_HISTOGRAMS_SIZE) {
          this.recordedPerformanceHistograms.shift();
        }
        this.recordedPerformanceHistograms.push({ histogramName, duration: duration2 });
      }
      recordPerformanceHistogramMedium(histogramName, duration2) {
        if (this.recordedPerformanceHistograms.length >= MAX_RECORDED_HISTOGRAMS_SIZE) {
          this.recordedPerformanceHistograms.shift();
        }
        this.recordedPerformanceHistograms.push({ histogramName, duration: duration2 });
      }
      recordUserMetricsAction(_umaName) {
      }
      recordNewBadgeUsage(_featureName) {
      }
      connectAutomaticFileSystem(_fileSystemPath, _fileSystemUUID, _addIfMissing, callback) {
        queueMicrotask(() => callback({ success: false }));
      }
      disconnectAutomaticFileSystem(_fileSystemPath) {
      }
      requestFileSystems() {
        this.events.dispatchEventToListeners(Events$e.FileSystemsLoaded, []);
      }
      addFileSystem(_type) {
        const onFileSystem = (fs10) => {
          this.#fileSystem = fs10;
          const fileSystem = {
            fileSystemName: "sandboxedRequestedFileSystem",
            fileSystemPath: OVERRIDES_FILE_SYSTEM_PATH,
            rootURL: "filesystem:devtools://devtools/isolated/",
            type: "overrides"
          };
          this.events.dispatchEventToListeners(Events$e.FileSystemAdded, { fileSystem });
        };
        window.webkitRequestFileSystem(window.TEMPORARY, 1024 * 1024, onFileSystem);
      }
      removeFileSystem(_fileSystemPath) {
        const removalCallback = (entries) => {
          entries.forEach((entry) => {
            if (entry.isDirectory) {
              entry.removeRecursively(() => {
              });
            } else if (entry.isFile) {
              entry.remove(() => {
              });
            }
          });
        };
        if (this.#fileSystem) {
          this.#fileSystem.root.createReader().readEntries(removalCallback);
        }
        this.#fileSystem = null;
        this.events.dispatchEventToListeners(Events$e.FileSystemRemoved, OVERRIDES_FILE_SYSTEM_PATH);
      }
      isolatedFileSystem(_fileSystemId, _registeredName) {
        return this.#fileSystem;
      }
      loadNetworkResource(url, _headers, streamId, callback) {
        fetch(url).then(async (result) => {
          const respBuffer = await result.arrayBuffer();
          const text = await arrayBufferToString(respBuffer);
          return text;
        }).then(function(text) {
          streamWrite(streamId, text);
          callback({
            statusCode: 200
          });
        }).catch(function() {
          callback({
            statusCode: 404
          });
        });
      }
      registerPreference(_name, _options) {
      }
      getPreferences(callback) {
        const prefs = {};
        for (const name in window.localStorage) {
          prefs[name] = window.localStorage[name];
        }
        callback(prefs);
      }
      getPreference(name, callback) {
        callback(window.localStorage[name]);
      }
      setPreference(name, value) {
        window.localStorage[name] = value;
      }
      removePreference(name) {
        delete window.localStorage[name];
      }
      clearPreferences() {
        window.localStorage.clear();
      }
      getSyncInformation(callback) {
        if ("getSyncInformationForTesting" in globalThis) {
          return callback(globalThis.getSyncInformationForTesting());
        }
        callback({
          isSyncActive: false,
          arePreferencesSynced: false
        });
      }
      getHostConfig(callback) {
        const hostConfigForHostedMode = {
          devToolsVeLogging: {
            enabled: true
          },
          thirdPartyCookieControls: {
            thirdPartyCookieMetadataEnabled: true,
            thirdPartyCookieHeuristicsEnabled: true,
            managedBlockThirdPartyCookies: "Unset"
          },
          devToolsFlexibleLayout: {
            verticalDrawerEnabled: true
          }
        };
        if ("hostConfigForTesting" in globalThis) {
          const { hostConfigForTesting } = globalThis;
          for (const key of Object.keys(hostConfigForTesting)) {
            const mergeEntry = (key2) => {
              if (typeof hostConfigForHostedMode[key2] === "object" && typeof hostConfigForTesting[key2] === "object") {
                hostConfigForHostedMode[key2] = { ...hostConfigForHostedMode[key2], ...hostConfigForTesting[key2] };
              } else {
                hostConfigForHostedMode[key2] = hostConfigForTesting[key2] ?? hostConfigForHostedMode[key2];
              }
            };
            mergeEntry(key);
          }
        }
        callback(hostConfigForHostedMode);
      }
      upgradeDraggedFileSystemPermissions(_fileSystem) {
      }
      indexPath(_requestId, _fileSystemPath, _excludedFolders) {
      }
      stopIndexing(_requestId) {
      }
      searchInPath(_requestId, _fileSystemPath, _query) {
      }
      zoomFactor() {
        return 1;
      }
      zoomIn() {
      }
      zoomOut() {
      }
      resetZoom() {
      }
      setWhitelistedShortcuts(_shortcuts) {
      }
      setEyeDropperActive(_active) {
      }
      showCertificateViewer(_certChain) {
      }
      reattach(_callback) {
      }
      readyForTest() {
      }
      connectionReady() {
      }
      setOpenNewWindowForPopups(_value) {
      }
      setDevicesDiscoveryConfig(_config) {
      }
      setDevicesUpdatesEnabled(_enabled) {
      }
      openRemotePage(_browserId, _url2) {
      }
      openNodeFrontend() {
      }
      showContextMenuAtPoint(_x, _y, _items, _document) {
        throw new Error("Soft context menu should be used");
      }
      isHostedMode() {
        return true;
      }
      setAddExtensionCallback(_callback) {
      }
      async initialTargetId() {
        return null;
      }
      doAidaConversation(_request, _streamId, callback) {
        callback({
          error: "Not implemented"
        });
      }
      registerAidaClientEvent(_request, callback) {
        callback({
          error: "Not implemented"
        });
      }
      aidaCodeComplete(_request, callback) {
        callback({
          error: "Not implemented"
        });
      }
      dispatchHttpRequest(_request, callback) {
        callback({ error: "Not implemented" });
      }
      recordImpression(_event) {
      }
      recordResize(_event) {
      }
      recordClick(_event) {
      }
      recordHover(_event) {
      }
      recordDrag(_event) {
      }
      recordChange(_event) {
      }
      recordKeyDown(_event) {
      }
      recordSettingAccess(_event) {
      }
      recordFunctionCall(_event) {
      }
      setChromeFlag(_flagName, _value) {
      }
      requestRestart() {
      }
    };
    InspectorFrontendAPIImpl = class {
      constructor() {
        for (const descriptor of EventDescriptors) {
          this[descriptor[0]] = this.dispatch.bind(this, descriptor[0], descriptor[1], descriptor[2]);
        }
      }
      dispatch(name, signature, _runOnceLoaded, ...params) {
        if (signature.length < 2) {
          try {
            InspectorFrontendHostInstance.events.dispatchEventToListeners(name, params[0]);
          } catch (error) {
            console.error(error + " " + error.stack);
          }
          return;
        }
        const data32 = {};
        for (let i = 0; i < signature.length; ++i) {
          data32[signature[i]] = params[i];
        }
        try {
          InspectorFrontendHostInstance.events.dispatchEventToListeners(name, data32);
        } catch (error) {
          console.error(error + " " + error.stack);
        }
      }
      streamWrite(id2, chunk) {
        streamWrite(id2, chunk);
      }
    };
    (function() {
      installInspectorFrontendHost(globalThis.InspectorFrontendHost ?? new InspectorFrontendHostStub());
      globalThis.InspectorFrontendAPI = new InspectorFrontendAPIImpl();
    })();
    McpHostBindings = class {
      connectAutomaticFileSystem() {
      }
      disconnectAutomaticFileSystem() {
      }
      addFileSystem() {
      }
      loadCompleted() {
      }
      indexPath() {
      }
      setInspectedPageBounds() {
      }
      showCertificateViewer() {
      }
      setWhitelistedShortcuts() {
      }
      setEyeDropperActive() {
      }
      inspectElementCompleted() {
      }
      openInNewTab() {
      }
      openSearchResultsInNewTab() {
      }
      showItemInFolder() {
      }
      removeFileSystem() {
      }
      requestFileSystems() {
      }
      save() {
      }
      append() {
      }
      close() {
      }
      searchInPath() {
      }
      stopIndexing() {
      }
      bringToFront() {
      }
      closeWindow() {
      }
      copyText() {
      }
      inspectedURLChanged() {
      }
      isolatedFileSystem() {
        return null;
      }
      loadNetworkResource(urlString, _headers, streamId, callback) {
        let url;
        try {
          url = new URL$1(urlString);
        } catch {
          callback({
            statusCode: 404,
            urlValid: false
          });
          return;
        }
        let contentPromise;
        if (url.protocol === "file:") {
          contentPromise = readFile(url, { encoding: "utf8" });
        } else if (url.protocol === "http:" || url.protocol === "https:") {
          contentPromise = fetch(url).then((response) => {
            if (!response.ok) {
              throw new Error("Fetch failed");
            }
            return response.text();
          });
        } else {
          callback({
            statusCode: 404,
            urlValid: false
          });
          return;
        }
        contentPromise.then((content) => {
          streamWrite(streamId, content);
          callback({ statusCode: 200 });
        }).catch(() => {
          callback({ statusCode: 404 });
        });
      }
      registerPreference() {
      }
      getPreferences() {
      }
      getPreference() {
      }
      setPreference() {
      }
      removePreference() {
      }
      clearPreferences() {
      }
      getSyncInformation() {
      }
      getHostConfig() {
      }
      upgradeDraggedFileSystemPermissions() {
      }
      platform() {
        switch (process.platform) {
          case "darwin":
            return "mac";
          case "win32":
            return "windows";
          default:
            return "linux";
        }
      }
      recordCountHistogram() {
      }
      recordEnumeratedHistogram() {
      }
      recordPerformanceHistogram() {
      }
      recordPerformanceHistogramMedium() {
      }
      recordUserMetricsAction() {
      }
      recordNewBadgeUsage() {
      }
      sendMessageToBackend() {
      }
      setDevicesDiscoveryConfig() {
      }
      setDevicesUpdatesEnabled() {
      }
      openRemotePage() {
      }
      openNodeFrontend() {
      }
      setInjectedScriptForOrigin() {
      }
      setIsDocked() {
      }
      showSurvey() {
      }
      canShowSurvey() {
      }
      zoomFactor() {
        return 1;
      }
      zoomIn() {
      }
      zoomOut() {
      }
      resetZoom() {
      }
      showContextMenuAtPoint() {
      }
      reattach() {
      }
      readyForTest() {
      }
      connectionReady() {
      }
      setOpenNewWindowForPopups() {
      }
      isHostedMode() {
        return true;
      }
      setAddExtensionCallback() {
      }
      initialTargetId() {
        return Promise.resolve(null);
      }
      doAidaConversation(_request, _streamId, cb) {
        cb({
          error: "Not implemented"
        });
      }
      registerAidaClientEvent(_request, cb) {
        cb({
          error: "Not implemented"
        });
      }
      aidaCodeComplete(_request, cb) {
        cb({
          error: "Not implemented"
        });
      }
      dispatchHttpRequest(_request, cb) {
        cb({
          error: "Not implemented"
        });
      }
      recordImpression() {
      }
      recordResize() {
      }
      recordClick() {
      }
      recordHover() {
      }
      recordDrag() {
      }
      recordChange() {
      }
      recordKeyDown() {
      }
      recordSettingAccess() {
      }
      recordFunctionCall() {
      }
      setChromeFlag() {
      }
      requestRestart() {
      }
    };
    ConnectionTransport = class {
      static setFactory(factory) {
        connectionFactory = factory;
      }
      static getFactory() {
        return connectionFactory;
      }
    };
    ConnectionTransport$1 = /* @__PURE__ */ Object.freeze({
      __proto__: null,
      ConnectionTransport
    });
    (function(CDPErrorStatus2) {
      CDPErrorStatus2[CDPErrorStatus2["PARSE_ERROR"] = -32700] = "PARSE_ERROR";
      CDPErrorStatus2[CDPErrorStatus2["INVALID_REQUEST"] = -32600] = "INVALID_REQUEST";
      CDPErrorStatus2[CDPErrorStatus2["METHOD_NOT_FOUND"] = -32601] = "METHOD_NOT_FOUND";
      CDPErrorStatus2[CDPErrorStatus2["INVALID_PARAMS"] = -32602] = "INVALID_PARAMS";
      CDPErrorStatus2[CDPErrorStatus2["INTERNAL_ERROR"] = -32603] = "INTERNAL_ERROR";
      CDPErrorStatus2[CDPErrorStatus2["SERVER_ERROR"] = -32e3] = "SERVER_ERROR";
      CDPErrorStatus2[CDPErrorStatus2["SESSION_NOT_FOUND"] = -32001] = "SESSION_NOT_FOUND";
      CDPErrorStatus2[CDPErrorStatus2["DEVTOOLS_STUB_ERROR"] = -32015] = "DEVTOOLS_STUB_ERROR";
      CDPErrorStatus2[CDPErrorStatus2["DEVTOOLS_REHYDRATION_ERROR"] = -32016] = "DEVTOOLS_REHYDRATION_ERROR";
    })(CDPErrorStatus || (CDPErrorStatus = {}));
    CDPConnection = /* @__PURE__ */ Object.freeze({
      __proto__: null,
      get CDPErrorStatus() {
        return CDPErrorStatus;
      }
    });
    splitQualifiedName = (string2) => {
      const [domain, eventName] = string2.split(".");
      return [domain, eventName];
    };
    qualifyName = (domain, name) => {
      return `${domain}.${name}`;
    };
    InspectorBackend = class {
      agentPrototypes = /* @__PURE__ */ new Map();
      #eventParameterNamesForDomain = /* @__PURE__ */ new Map();
      typeMap = /* @__PURE__ */ new Map();
      enumMap = /* @__PURE__ */ new Map();
      constructor() {
        globalThis.Protocol ||= {};
        registerCommands(this);
      }
      getOrCreateEventParameterNamesForDomain(domain) {
        let map2 = this.#eventParameterNamesForDomain.get(domain);
        if (!map2) {
          map2 = /* @__PURE__ */ new Map();
          this.#eventParameterNamesForDomain.set(domain, map2);
        }
        return map2;
      }
      getOrCreateEventParameterNamesForDomainForTesting(domain) {
        return this.getOrCreateEventParameterNamesForDomain(domain);
      }
      getEventParameterNames() {
        return this.#eventParameterNamesForDomain;
      }
      static reportProtocolError(error, messageObject) {
        console.error(error + ": " + JSON.stringify(messageObject));
      }
      static reportProtocolWarning(error, messageObject) {
        console.warn(error + ": " + JSON.stringify(messageObject));
      }
      agentPrototype(domain) {
        let prototype = this.agentPrototypes.get(domain);
        if (!prototype) {
          prototype = new AgentPrototype(domain);
          this.agentPrototypes.set(domain, prototype);
        }
        return prototype;
      }
      registerCommand(method, parameters, replyArgs, description2) {
        const [domain, command2] = splitQualifiedName(method);
        this.agentPrototype(domain).registerCommand(command2, parameters, replyArgs, description2);
      }
      registerEnum(type2, values) {
        const [domain, name] = splitQualifiedName(type2);
        if (!globalThis.Protocol[domain]) {
          globalThis.Protocol[domain] = {};
        }
        globalThis.Protocol[domain][name] = values;
        this.enumMap.set(type2, values);
      }
      registerType(method, parameters) {
        this.typeMap.set(method, parameters);
      }
      registerEvent(eventName, params) {
        const domain = eventName.split(".")[0];
        const eventParameterNames = this.getOrCreateEventParameterNamesForDomain(domain);
        eventParameterNames.set(eventName, params);
      }
    };
    test = {
      dumpProtocol: null,
      deprecatedRunAfterPendingDispatches: null,
      sendRawMessage: null,
      suppressRequestErrors: false,
      onMessageSent: null,
      onMessageReceived: null
    };
    SessionRouter = class {
      #connection;
      #sessions = /* @__PURE__ */ new Map();
      constructor(connection) {
        this.#connection = connection;
        this.#connection.observe(this);
      }
      registerSession(target, sessionId) {
        this.#sessions.set(sessionId, { target });
      }
      unregisterSession(sessionId) {
        const session = this.#sessions.get(sessionId);
        if (!session) {
          return;
        }
        if (this.#connection instanceof DevToolsCDPConnection) {
          this.#connection.resolvePendingCalls(sessionId);
        }
        this.#sessions.delete(sessionId);
      }
      onDisconnect(reason) {
        const session = this.#sessions.get("");
        if (session) {
          session.target.dispose(reason);
        }
      }
      onEvent(event) {
        const sessionId = event.sessionId || "";
        const session = this.#sessions.get(sessionId);
        session?.target.dispatch(event);
      }
      get connection() {
        return this.#connection;
      }
    };
    TargetBase = class {
      sessionId;
      #router;
      #agents = /* @__PURE__ */ new Map();
      #dispatchers = /* @__PURE__ */ new Map();
      constructor(parentTarget, sessionId, connection) {
        this.sessionId = sessionId;
        if (parentTarget && !sessionId) {
          throw new Error("Specifying a parent target requires a session ID");
        }
        let router;
        if (parentTarget && parentTarget.#router) {
          router = parentTarget.#router;
        } else if (connection) {
          router = new SessionRouter(connection);
        } else {
          router = new SessionRouter(new DevToolsCDPConnection(ConnectionTransport.getFactory()()));
        }
        this.#router = router;
        router.registerSession(this, this.sessionId);
        for (const [domain, agentPrototype] of inspectorBackend.agentPrototypes) {
          const agent = Object.create(agentPrototype);
          agent.target = this;
          this.#agents.set(domain, agent);
        }
        for (const [domain, eventParameterNames] of inspectorBackend.getEventParameterNames().entries()) {
          this.#dispatchers.set(domain, new DispatcherManager(eventParameterNames));
        }
      }
      dispatch(eventMessage) {
        const [domainName, method] = splitQualifiedName(eventMessage.method);
        const dispatcher = this.#dispatchers.get(domainName);
        if (!dispatcher) {
          InspectorBackend.reportProtocolError(`Protocol Error: the message ${eventMessage.method} is for non-existing domain '${domainName}'`, eventMessage);
          return;
        }
        dispatcher.dispatch(method, eventMessage);
      }
      dispose(_reason) {
        if (!this.#router) {
          return;
        }
        this.#router.unregisterSession(this.sessionId);
        this.#router = null;
      }
      isDisposed() {
        return !this.#router;
      }
      router() {
        return this.#router;
      }
      getAgent(domain) {
        const agent = this.#agents.get(domain);
        if (!agent) {
          throw new Error("Accessing undefined agent");
        }
        return agent;
      }
      accessibilityAgent() {
        return this.getAgent("Accessibility");
      }
      animationAgent() {
        return this.getAgent("Animation");
      }
      auditsAgent() {
        return this.getAgent("Audits");
      }
      autofillAgent() {
        return this.getAgent("Autofill");
      }
      browserAgent() {
        return this.getAgent("Browser");
      }
      backgroundServiceAgent() {
        return this.getAgent("BackgroundService");
      }
      cacheStorageAgent() {
        return this.getAgent("CacheStorage");
      }
      cssAgent() {
        return this.getAgent("CSS");
      }
      debuggerAgent() {
        return this.getAgent("Debugger");
      }
      deviceOrientationAgent() {
        return this.getAgent("DeviceOrientation");
      }
      domAgent() {
        return this.getAgent("DOM");
      }
      domdebuggerAgent() {
        return this.getAgent("DOMDebugger");
      }
      domsnapshotAgent() {
        return this.getAgent("DOMSnapshot");
      }
      domstorageAgent() {
        return this.getAgent("DOMStorage");
      }
      emulationAgent() {
        return this.getAgent("Emulation");
      }
      eventBreakpointsAgent() {
        return this.getAgent("EventBreakpoints");
      }
      extensionsAgent() {
        return this.getAgent("Extensions");
      }
      fetchAgent() {
        return this.getAgent("Fetch");
      }
      heapProfilerAgent() {
        return this.getAgent("HeapProfiler");
      }
      indexedDBAgent() {
        return this.getAgent("IndexedDB");
      }
      inputAgent() {
        return this.getAgent("Input");
      }
      ioAgent() {
        return this.getAgent("IO");
      }
      inspectorAgent() {
        return this.getAgent("Inspector");
      }
      layerTreeAgent() {
        return this.getAgent("LayerTree");
      }
      logAgent() {
        return this.getAgent("Log");
      }
      mediaAgent() {
        return this.getAgent("Media");
      }
      memoryAgent() {
        return this.getAgent("Memory");
      }
      networkAgent() {
        return this.getAgent("Network");
      }
      overlayAgent() {
        return this.getAgent("Overlay");
      }
      pageAgent() {
        return this.getAgent("Page");
      }
      preloadAgent() {
        return this.getAgent("Preload");
      }
      profilerAgent() {
        return this.getAgent("Profiler");
      }
      performanceAgent() {
        return this.getAgent("Performance");
      }
      runtimeAgent() {
        return this.getAgent("Runtime");
      }
      securityAgent() {
        return this.getAgent("Security");
      }
      serviceWorkerAgent() {
        return this.getAgent("ServiceWorker");
      }
      storageAgent() {
        return this.getAgent("Storage");
      }
      systemInfo() {
        return this.getAgent("SystemInfo");
      }
      targetAgent() {
        return this.getAgent("Target");
      }
      tracingAgent() {
        return this.getAgent("Tracing");
      }
      webAudioAgent() {
        return this.getAgent("WebAudio");
      }
      webAuthnAgent() {
        return this.getAgent("WebAuthn");
      }
      registerDispatcher(domain, dispatcher) {
        const manager = this.#dispatchers.get(domain);
        if (!manager) {
          return;
        }
        manager.addDomainDispatcher(dispatcher);
      }
      unregisterDispatcher(domain, dispatcher) {
        const manager = this.#dispatchers.get(domain);
        if (!manager) {
          return;
        }
        manager.removeDomainDispatcher(dispatcher);
      }
      registerAccessibilityDispatcher(dispatcher) {
        this.registerDispatcher("Accessibility", dispatcher);
      }
      registerAutofillDispatcher(dispatcher) {
        this.registerDispatcher("Autofill", dispatcher);
      }
      registerAnimationDispatcher(dispatcher) {
        this.registerDispatcher("Animation", dispatcher);
      }
      registerAuditsDispatcher(dispatcher) {
        this.registerDispatcher("Audits", dispatcher);
      }
      registerCSSDispatcher(dispatcher) {
        this.registerDispatcher("CSS", dispatcher);
      }
      registerBackgroundServiceDispatcher(dispatcher) {
        this.registerDispatcher("BackgroundService", dispatcher);
      }
      registerDebuggerDispatcher(dispatcher) {
        this.registerDispatcher("Debugger", dispatcher);
      }
      unregisterDebuggerDispatcher(dispatcher) {
        this.unregisterDispatcher("Debugger", dispatcher);
      }
      registerDOMDispatcher(dispatcher) {
        this.registerDispatcher("DOM", dispatcher);
      }
      registerDOMStorageDispatcher(dispatcher) {
        this.registerDispatcher("DOMStorage", dispatcher);
      }
      registerEmulationDispatcher(dispatcher) {
        this.registerDispatcher("Emulation", dispatcher);
      }
      registerFetchDispatcher(dispatcher) {
        this.registerDispatcher("Fetch", dispatcher);
      }
      registerHeapProfilerDispatcher(dispatcher) {
        this.registerDispatcher("HeapProfiler", dispatcher);
      }
      registerInspectorDispatcher(dispatcher) {
        this.registerDispatcher("Inspector", dispatcher);
      }
      registerLayerTreeDispatcher(dispatcher) {
        this.registerDispatcher("LayerTree", dispatcher);
      }
      registerLogDispatcher(dispatcher) {
        this.registerDispatcher("Log", dispatcher);
      }
      registerMediaDispatcher(dispatcher) {
        this.registerDispatcher("Media", dispatcher);
      }
      registerNetworkDispatcher(dispatcher) {
        this.registerDispatcher("Network", dispatcher);
      }
      registerOverlayDispatcher(dispatcher) {
        this.registerDispatcher("Overlay", dispatcher);
      }
      registerPageDispatcher(dispatcher) {
        this.registerDispatcher("Page", dispatcher);
      }
      registerPreloadDispatcher(dispatcher) {
        this.registerDispatcher("Preload", dispatcher);
      }
      registerProfilerDispatcher(dispatcher) {
        this.registerDispatcher("Profiler", dispatcher);
      }
      registerRuntimeDispatcher(dispatcher) {
        this.registerDispatcher("Runtime", dispatcher);
      }
      registerSecurityDispatcher(dispatcher) {
        this.registerDispatcher("Security", dispatcher);
      }
      registerServiceWorkerDispatcher(dispatcher) {
        this.registerDispatcher("ServiceWorker", dispatcher);
      }
      registerStorageDispatcher(dispatcher) {
        this.registerDispatcher("Storage", dispatcher);
      }
      registerTargetDispatcher(dispatcher) {
        this.registerDispatcher("Target", dispatcher);
      }
      registerTracingDispatcher(dispatcher) {
        this.registerDispatcher("Tracing", dispatcher);
      }
      registerWebAudioDispatcher(dispatcher) {
        this.registerDispatcher("WebAudio", dispatcher);
      }
      registerWebAuthnDispatcher(dispatcher) {
        this.registerDispatcher("WebAuthn", dispatcher);
      }
    };
    IGNORED_ERRORS = /* @__PURE__ */ new Set([
      CDPErrorStatus.DEVTOOLS_REHYDRATION_ERROR,
      CDPErrorStatus.DEVTOOLS_STUB_ERROR,
      CDPErrorStatus.SERVER_ERROR,
      CDPErrorStatus.SESSION_NOT_FOUND
    ]);
    AgentPrototype = class {
      description = "";
      metadata;
      domain;
      target;
      constructor(domain) {
        this.domain = domain;
        this.metadata = {};
      }
      registerCommand(methodName, parameters, replyArgs, description2) {
        const domainAndMethod = qualifyName(this.domain, methodName);
        this.metadata[domainAndMethod] = { parameters, description: description2, replyArgs };
        function invoke(request3 = {}) {
          return this.invoke(domainAndMethod, request3);
        }
        this["invoke_" + methodName] = invoke;
      }
      invoke(method, request3) {
        const connection = this.target.router()?.connection;
        if (!connection) {
          return Promise.resolve({ result: null, getError: () => `Connection is closed, can't dispatch pending call to ${method}` });
        }
        return connection.send(method, request3, this.target.sessionId).then((response) => {
          if ("error" in response && response.error) {
            if (!test.suppressRequestErrors && !IGNORED_ERRORS.has(response.error.code)) {
              console.error("Request " + method + " failed. " + JSON.stringify(response.error));
            }
            return { getError: () => response.error.message };
          }
          if ("result" in response) {
            return { ...response.result, getError: () => void 0 };
          }
          return {
            getError: () => `Command ${method} returned neither result nor an error, params: ${JSON.stringify(request3, void 0, 2)}`
          };
        });
      }
    };
    DispatcherManager = class {
      #eventArgs;
      #dispatchers = [];
      constructor(eventArgs) {
        this.#eventArgs = eventArgs;
      }
      addDomainDispatcher(dispatcher) {
        this.#dispatchers.push(dispatcher);
      }
      removeDomainDispatcher(dispatcher) {
        const index2 = this.#dispatchers.indexOf(dispatcher);
        if (index2 === -1) {
          return;
        }
        this.#dispatchers.splice(index2, 1);
      }
      dispatch(event, messageObject) {
        if (!this.#dispatchers.length) {
          return;
        }
        if (!this.#eventArgs.has(messageObject.method)) {
          InspectorBackend.reportProtocolWarning(`Protocol Warning: Attempted to dispatch an unspecified event '${messageObject.method}'`, messageObject);
          return;
        }
        for (let index2 = 0; index2 < this.#dispatchers.length; ++index2) {
          const dispatcher = this.#dispatchers[index2];
          if (event in dispatcher) {
            const f = dispatcher[event];
            f.call(dispatcher, messageObject.params);
          }
        }
      }
    };
    inspectorBackend = new InspectorBackend();
    InspectorBackend$1 = /* @__PURE__ */ Object.freeze({
      __proto__: null,
      InspectorBackend,
      SessionRouter,
      TargetBase,
      inspectorBackend,
      qualifyName,
      splitQualifiedName,
      test
    });
    LongPollingMethods = /* @__PURE__ */ new Set(["CSS.takeComputedStyleUpdates"]);
    DevToolsCDPConnection = class {
      #transport;
      #lastMessageId = 1;
      #pendingResponsesCount = 0;
      #pendingLongPollingMessageIds = /* @__PURE__ */ new Set();
      #pendingScripts = [];
      #callbacks = /* @__PURE__ */ new Map();
      #observers = /* @__PURE__ */ new Set();
      constructor(transport2) {
        this.#transport = transport2;
        test.deprecatedRunAfterPendingDispatches = this.deprecatedRunAfterPendingDispatches.bind(this);
        test.sendRawMessage = this.sendRawMessageForTesting.bind(this);
        this.#transport.setOnMessage(this.onMessage.bind(this));
        this.#transport.setOnDisconnect((reason) => {
          this.#observers.forEach((observer) => observer.onDisconnect(reason));
        });
      }
      observe(observer) {
        this.#observers.add(observer);
      }
      unobserve(observer) {
        this.#observers.delete(observer);
      }
      send(method, params, sessionId) {
        const messageId = ++this.#lastMessageId;
        const messageObject = {
          id: messageId,
          method
        };
        if (params) {
          messageObject.params = params;
        }
        if (sessionId) {
          messageObject.sessionId = sessionId;
        }
        if (test.dumpProtocol) {
          test.dumpProtocol("frontend: " + JSON.stringify(messageObject));
        }
        if (test.onMessageSent) {
          const domain = method.split(".")[0];
          const paramsObject = JSON.parse(JSON.stringify(params || {}));
          test.onMessageSent({ domain, method, params: paramsObject, id: messageId, sessionId });
        }
        ++this.#pendingResponsesCount;
        if (LongPollingMethods.has(method)) {
          this.#pendingLongPollingMessageIds.add(messageId);
        }
        return new Promise((resolve2) => {
          this.#callbacks.set(messageId, { resolve: resolve2, method, sessionId });
          this.#transport.sendRawMessage(JSON.stringify(messageObject));
        });
      }
      resolvePendingCalls(sessionId) {
        for (const { resolve: resolve2, method, sessionId: callbackSessionId } of this.#callbacks.values()) {
          if (sessionId !== callbackSessionId) {
            continue;
          }
          resolve2({
            error: {
              message: `Session is unregistering, can't dispatch pending call to ${method}`,
              code: CDPErrorStatus.SESSION_NOT_FOUND
            }
          });
        }
      }
      sendRawMessageForTesting(method, params, callback, sessionId = "") {
        void this.send(method, params, sessionId).then((response) => {
          if ("error" in response && response.error) {
            callback?.(response.error, null);
          } else if ("result" in response) {
            callback?.(null, response.result);
          }
        });
      }
      onMessage(message) {
        if (test.dumpProtocol) {
          test.dumpProtocol("backend: " + (typeof message === "string" ? message : JSON.stringify(message)));
        }
        if (test.onMessageReceived) {
          const messageObjectCopy = JSON.parse(typeof message === "string" ? message : JSON.stringify(message));
          test.onMessageReceived(messageObjectCopy);
        }
        const messageObject = typeof message === "string" ? JSON.parse(message) : message;
        if ("id" in messageObject && messageObject.id !== void 0) {
          const callback = this.#callbacks.get(messageObject.id);
          this.#callbacks.delete(messageObject.id);
          if (!callback) {
            return;
          }
          callback.resolve(messageObject);
          --this.#pendingResponsesCount;
          this.#pendingLongPollingMessageIds.delete(messageObject.id);
          if (this.#pendingScripts.length && !this.hasOutstandingNonLongPollingRequests()) {
            this.deprecatedRunAfterPendingDispatches();
          }
        } else if ("method" in messageObject) {
          this.#observers.forEach((observer) => observer.onEvent(messageObject));
        } else {
          InspectorBackend.reportProtocolError("Protocol Error: the message without method", messageObject);
        }
      }
      hasOutstandingNonLongPollingRequests() {
        return this.#pendingResponsesCount - this.#pendingLongPollingMessageIds.size > 0;
      }
      deprecatedRunAfterPendingDispatches(script) {
        if (script) {
          this.#pendingScripts.push(script);
        }
        setTimeout(() => {
          if (!this.hasOutstandingNonLongPollingRequests()) {
            this.executeAfterPendingDispatches();
          } else {
            this.deprecatedRunAfterPendingDispatches();
          }
        }, 0);
      }
      executeAfterPendingDispatches() {
        if (!this.hasOutstandingNonLongPollingRequests()) {
          const scripts = this.#pendingScripts;
          this.#pendingScripts = [];
          for (let id2 = 0; id2 < scripts.length; ++id2) {
            scripts[id2]();
          }
        }
      }
    };
    DevToolsCDPConnection$1 = /* @__PURE__ */ Object.freeze({
      __proto__: null,
      DevToolsCDPConnection
    });
    protocol_client = /* @__PURE__ */ Object.freeze({
      __proto__: null,
      CDPConnection,
      ConnectionTransport: ConnectionTransport$1,
      DevToolsCDPConnection: DevToolsCDPConnection$1,
      InspectorBackend: InspectorBackend$1
    });
    RemoteObject$1 = class RemoteObject {
      static fromLocalObject(value) {
        return new LocalJSONObject(value);
      }
      static type(remoteObject) {
        if (remoteObject === null) {
          return "null";
        }
        const type2 = typeof remoteObject;
        if (type2 !== "object" && type2 !== "function") {
          return type2;
        }
        return remoteObject.type;
      }
      static isNullOrUndefined(remoteObject) {
        if (remoteObject === void 0) {
          return true;
        }
        switch (remoteObject.type) {
          case "object":
            return remoteObject.subtype === "null";
          case "undefined":
            return true;
          default:
            return false;
        }
      }
      static arrayNameFromDescription(description2) {
        return description2.replace(descriptionLengthParenRegex, "").replace(descriptionLengthSquareRegex, "");
      }
      static arrayLength(object2) {
        if (object2.subtype !== "array" && object2.subtype !== "typedarray") {
          return 0;
        }
        const parenMatches = object2.description?.match(descriptionLengthParenRegex);
        const squareMatches = object2.description?.match(descriptionLengthSquareRegex);
        return parenMatches ? parseInt(parenMatches[1], 10) : squareMatches ? parseInt(squareMatches[1], 10) : 0;
      }
      static arrayBufferByteLength(object2) {
        if (object2.subtype !== "arraybuffer") {
          return 0;
        }
        const matches = object2.description?.match(descriptionLengthParenRegex);
        return matches ? parseInt(matches[1], 10) : 0;
      }
      static isEmptyArray(object2) {
        const matches = object2.description?.match(descriptionLengthParenRegex);
        return Boolean(matches?.[1] === "0");
      }
      static unserializableDescription(object2) {
        if (typeof object2 === "number") {
          const description2 = String(object2);
          if (object2 === 0 && 1 / object2 < 0) {
            return "-0";
          }
          if (description2 === "NaN" || description2 === "Infinity" || description2 === "-Infinity") {
            return description2;
          }
        }
        if (typeof object2 === "bigint") {
          return object2 + "n";
        }
        return null;
      }
      static toCallArgument(object2) {
        const type2 = typeof object2;
        if (type2 === "undefined") {
          return {};
        }
        const unserializableDescription = RemoteObject.unserializableDescription(object2);
        if (type2 === "number") {
          if (unserializableDescription !== null) {
            return { unserializableValue: unserializableDescription };
          }
          return { value: object2 };
        }
        if (type2 === "bigint") {
          return { unserializableValue: unserializableDescription ?? void 0 };
        }
        if (type2 === "string" || type2 === "boolean") {
          return { value: object2 };
        }
        if (!object2) {
          return { value: null };
        }
        const objectAsProtocolRemoteObject = object2;
        if (object2 instanceof RemoteObject) {
          const unserializableValue = object2.unserializableValue();
          if (unserializableValue !== void 0) {
            return { unserializableValue };
          }
        } else if (objectAsProtocolRemoteObject.unserializableValue !== void 0) {
          return { unserializableValue: objectAsProtocolRemoteObject.unserializableValue };
        }
        if (typeof objectAsProtocolRemoteObject.objectId !== "undefined") {
          return { objectId: objectAsProtocolRemoteObject.objectId };
        }
        return { value: objectAsProtocolRemoteObject.value };
      }
      static async loadFromObjectPerProto(object2, generatePreview, nonIndexedPropertiesOnly = false) {
        const result = await Promise.all([
          object2.getAllProperties(true, generatePreview, nonIndexedPropertiesOnly),
          object2.getOwnProperties(generatePreview, nonIndexedPropertiesOnly)
        ]);
        const accessorProperties = result[0].properties;
        const ownProperties = result[1].properties;
        const internalProperties = result[1].internalProperties;
        if (!ownProperties || !accessorProperties) {
          return { properties: null, internalProperties: null };
        }
        const propertiesMap = /* @__PURE__ */ new Map();
        const propertySymbols = [];
        for (let i = 0; i < accessorProperties.length; i++) {
          const property = accessorProperties[i];
          if (property.symbol) {
            propertySymbols.push(property);
          } else if (property.isOwn || property.name !== "__proto__") {
            propertiesMap.set(property.name, property);
          }
        }
        for (let i = 0; i < ownProperties.length; i++) {
          const property = ownProperties[i];
          if (property.isAccessorProperty()) {
            continue;
          }
          if (property.private || property.symbol) {
            propertySymbols.push(property);
          } else {
            propertiesMap.set(property.name, property);
          }
        }
        return {
          properties: [...propertiesMap.values()].concat(propertySymbols),
          internalProperties: internalProperties ? internalProperties : null
        };
      }
      customPreview() {
        return null;
      }
      unserializableValue() {
        throw new Error("Not implemented");
      }
      get preview() {
        return void 0;
      }
      get className() {
        return null;
      }
      callFunction(_functionDeclaration, _args) {
        throw new Error("Not implemented");
      }
      callFunctionJSON(_functionDeclaration, _args) {
        throw new Error("Not implemented");
      }
      arrayBufferByteLength() {
        throw new Error("Not implemented");
      }
      deleteProperty(_name) {
        throw new Error("Not implemented");
      }
      setPropertyValue(_name, _value) {
        throw new Error("Not implemented");
      }
      release() {
      }
      debuggerModel() {
        throw new Error("DebuggerModel-less object");
      }
      runtimeModel() {
        throw new Error("RuntimeModel-less object");
      }
      isNode() {
        return false;
      }
      isLinearMemoryInspectable() {
        return false;
      }
      webIdl;
    };
    RemoteObjectImpl = class extends RemoteObject$1 {
      #runtimeModel;
      #runtimeAgent;
      #type;
      #subtype;
      #objectId;
      #description;
      #hasChildren;
      #preview;
      #unserializableValue;
      #value;
      #customPreview;
      #className;
      constructor(runtimeModel, objectId, type2, subtype, value, unserializableValue, description2, preview, customPreview, className) {
        super();
        this.#runtimeModel = runtimeModel;
        this.#runtimeAgent = runtimeModel.target().runtimeAgent();
        this.#type = type2;
        this.#subtype = subtype;
        if (objectId) {
          this.#objectId = objectId;
          this.#description = description2;
          this.#hasChildren = type2 !== "symbol";
          this.#preview = preview;
        } else {
          this.#description = description2;
          if (!this.description && unserializableValue) {
            this.#description = unserializableValue;
          }
          if (!this.#description && (typeof value !== "object" || value === null)) {
            this.#description = String(value);
          }
          this.#hasChildren = false;
          if (typeof unserializableValue === "string") {
            this.#unserializableValue = unserializableValue;
            if (unserializableValue === "Infinity" || unserializableValue === "-Infinity" || unserializableValue === "-0" || unserializableValue === "NaN") {
              this.#value = Number(unserializableValue);
            } else if (type2 === "bigint" && unserializableValue.endsWith("n")) {
              this.#value = BigInt(unserializableValue.substring(0, unserializableValue.length - 1));
            } else {
              this.#value = unserializableValue;
            }
          } else {
            this.#value = value;
          }
        }
        this.#customPreview = customPreview || null;
        this.#className = typeof className === "string" ? className : null;
      }
      customPreview() {
        return this.#customPreview;
      }
      get objectId() {
        return this.#objectId;
      }
      get type() {
        return this.#type;
      }
      get subtype() {
        return this.#subtype;
      }
      get value() {
        return this.#value;
      }
      unserializableValue() {
        return this.#unserializableValue;
      }
      get description() {
        return this.#description;
      }
      set description(description2) {
        this.#description = description2;
      }
      get hasChildren() {
        return this.#hasChildren;
      }
      get preview() {
        return this.#preview;
      }
      get className() {
        return this.#className;
      }
      getOwnProperties(generatePreview, nonIndexedPropertiesOnly = false) {
        return this.doGetProperties(true, false, nonIndexedPropertiesOnly, generatePreview);
      }
      getAllProperties(accessorPropertiesOnly, generatePreview, nonIndexedPropertiesOnly = false) {
        return this.doGetProperties(false, accessorPropertiesOnly, nonIndexedPropertiesOnly, generatePreview);
      }
      async createRemoteObject(object2) {
        return this.#runtimeModel.createRemoteObject(object2);
      }
      async doGetProperties(ownProperties, accessorPropertiesOnly, nonIndexedPropertiesOnly, generatePreview) {
        if (!this.#objectId) {
          return { properties: null, internalProperties: null };
        }
        const response = await this.#runtimeAgent.invoke_getProperties({
          objectId: this.#objectId,
          ownProperties,
          accessorPropertiesOnly,
          nonIndexedPropertiesOnly,
          generatePreview
        });
        if (response.getError()) {
          return { properties: null, internalProperties: null };
        }
        if (response.exceptionDetails) {
          this.#runtimeModel.exceptionThrown(Date.now(), response.exceptionDetails);
          return { properties: null, internalProperties: null };
        }
        const { result: properties2 = [], internalProperties = [], privateProperties = [] } = response;
        const result = [];
        for (const property of properties2) {
          const propertyValue = property.value ? await this.createRemoteObject(property.value) : null;
          const propertySymbol = property.symbol ? this.#runtimeModel.createRemoteObject(property.symbol) : null;
          const remoteProperty = new RemoteObjectProperty(property.name, propertyValue, Boolean(property.enumerable), Boolean(property.writable), Boolean(property.isOwn), Boolean(property.wasThrown), propertySymbol);
          if (typeof property.value === "undefined") {
            if (property.get && property.get.type !== "undefined") {
              remoteProperty.getter = this.#runtimeModel.createRemoteObject(property.get);
            }
            if (property.set && property.set.type !== "undefined") {
              remoteProperty.setter = this.#runtimeModel.createRemoteObject(property.set);
            }
          }
          result.push(remoteProperty);
        }
        for (const property of privateProperties) {
          const propertyValue = property.value ? this.#runtimeModel.createRemoteObject(property.value) : null;
          const remoteProperty = new RemoteObjectProperty(property.name, propertyValue, true, true, true, false, void 0, false, void 0, true);
          if (typeof property.value === "undefined") {
            if (property.get && property.get.type !== "undefined") {
              remoteProperty.getter = this.#runtimeModel.createRemoteObject(property.get);
            }
            if (property.set && property.set.type !== "undefined") {
              remoteProperty.setter = this.#runtimeModel.createRemoteObject(property.set);
            }
          }
          result.push(remoteProperty);
        }
        const internalPropertiesResult = [];
        for (const property of internalProperties) {
          if (!property.value) {
            continue;
          }
          const propertyValue = this.#runtimeModel.createRemoteObject(property.value);
          internalPropertiesResult.push(new RemoteObjectProperty(property.name, propertyValue, true, false, void 0, void 0, void 0, true));
        }
        return { properties: result, internalProperties: internalPropertiesResult };
      }
      async setPropertyValue(name, value) {
        if (!this.#objectId) {
          return "Can\u2019t set a property of non-object.";
        }
        const response = await this.#runtimeAgent.invoke_evaluate({ expression: value, silent: true });
        if (response.getError() || response.exceptionDetails) {
          return response.getError() || (response.result.type !== "string" ? response.result.description : response.result.value);
        }
        if (typeof name === "string") {
          name = RemoteObject$1.toCallArgument(name);
        }
        const resultPromise = this.doSetObjectPropertyValue(response.result, name);
        if (response.result.objectId) {
          void this.#runtimeAgent.invoke_releaseObject({ objectId: response.result.objectId });
        }
        return await resultPromise;
      }
      async doSetObjectPropertyValue(result, name) {
        const setPropertyValueFunction = "function(a, b) { this[a] = b; }";
        const argv = [name, RemoteObject$1.toCallArgument(result)];
        const response = await this.#runtimeAgent.invoke_callFunctionOn({
          objectId: this.#objectId,
          functionDeclaration: setPropertyValueFunction,
          arguments: argv,
          silent: true
        });
        const error = response.getError();
        return error || response.exceptionDetails ? error || response.result.description : void 0;
      }
      async deleteProperty(name) {
        if (!this.#objectId) {
          return "Can\u2019t delete a property of non-object.";
        }
        const deletePropertyFunction = "function(a) { delete this[a]; return !(a in this); }";
        const response = await this.#runtimeAgent.invoke_callFunctionOn({
          objectId: this.#objectId,
          functionDeclaration: deletePropertyFunction,
          arguments: [name],
          silent: true
        });
        if (response.getError() || response.exceptionDetails) {
          return response.getError() || response.result.description;
        }
        if (!response.result.value) {
          return "Failed to delete property.";
        }
        return void 0;
      }
      async callFunction(functionDeclaration, args2) {
        const response = await this.#runtimeAgent.invoke_callFunctionOn({
          objectId: this.#objectId,
          functionDeclaration: functionDeclaration.toString(),
          arguments: args2,
          silent: true
        });
        if (response.getError()) {
          return { object: null, wasThrown: false };
        }
        return {
          object: this.#runtimeModel.createRemoteObject(response.result),
          wasThrown: Boolean(response.exceptionDetails)
        };
      }
      async callFunctionJSON(functionDeclaration, args2) {
        const response = await this.#runtimeAgent.invoke_callFunctionOn({
          objectId: this.#objectId,
          functionDeclaration: functionDeclaration.toString(),
          arguments: args2,
          silent: true,
          returnByValue: true
        });
        if (response.getError() || response.exceptionDetails) {
          return null;
        }
        return response.result.value;
      }
      release() {
        if (!this.#objectId) {
          return;
        }
        void this.#runtimeAgent.invoke_releaseObject({ objectId: this.#objectId });
      }
      arrayLength() {
        return RemoteObject$1.arrayLength(this);
      }
      arrayBufferByteLength() {
        return RemoteObject$1.arrayBufferByteLength(this);
      }
      debuggerModel() {
        return this.#runtimeModel.debuggerModel();
      }
      runtimeModel() {
        return this.#runtimeModel;
      }
      isNode() {
        return Boolean(this.#objectId) && this.type === "object" && this.subtype === "node";
      }
      isLinearMemoryInspectable() {
        return this.type === "object" && this.subtype !== void 0 && ["webassemblymemory", "typedarray", "dataview", "arraybuffer"].includes(this.subtype) && !RemoteObject$1.isEmptyArray(this);
      }
    };
    ScopeRemoteObject = class extends RemoteObjectImpl {
      #scopeRef;
      #savedScopeProperties;
      constructor(runtimeModel, objectId, scopeRef, type2, subtype, value, unserializableValue, description2, preview) {
        super(runtimeModel, objectId, type2, subtype, value, unserializableValue, description2, preview);
        this.#scopeRef = scopeRef;
        this.#savedScopeProperties = void 0;
      }
      async doGetProperties(ownProperties, accessorPropertiesOnly, _generatePreview) {
        if (accessorPropertiesOnly) {
          return { properties: [], internalProperties: [] };
        }
        if (this.#savedScopeProperties) {
          return { properties: this.#savedScopeProperties.slice(), internalProperties: null };
        }
        const allProperties = await super.doGetProperties(ownProperties, accessorPropertiesOnly, false, true);
        if (Array.isArray(allProperties.properties)) {
          this.#savedScopeProperties = allProperties.properties.slice();
        }
        return allProperties;
      }
      async doSetObjectPropertyValue(result, argumentName) {
        const name = argumentName.value;
        const error = await this.debuggerModel().setVariableValue(this.#scopeRef.number, name, RemoteObject$1.toCallArgument(result), this.#scopeRef.callFrameId);
        if (error) {
          return error;
        }
        if (this.#savedScopeProperties) {
          for (const property of this.#savedScopeProperties) {
            if (property.name === name) {
              property.value = this.runtimeModel().createRemoteObject(result);
            }
          }
        }
        return;
      }
    };
    ScopeRef = class {
      number;
      callFrameId;
      constructor(number2, callFrameId) {
        this.number = number2;
        this.callFrameId = callFrameId;
      }
    };
    RemoteObjectProperty = class _RemoteObjectProperty {
      name;
      value;
      enumerable;
      writable;
      isOwn;
      wasThrown;
      symbol;
      synthetic;
      syntheticSetter;
      private;
      getter;
      setter;
      webIdl;
      constructor(name, value, enumerable, writable, isOwn, wasThrown, symbol, synthetic, syntheticSetter, isPrivate) {
        this.name = name;
        this.value = value !== null ? value : void 0;
        this.enumerable = typeof enumerable !== "undefined" ? enumerable : true;
        const isNonSyntheticOrSyntheticWritable = !synthetic || Boolean(syntheticSetter);
        this.writable = typeof writable !== "undefined" ? writable : isNonSyntheticOrSyntheticWritable;
        this.isOwn = Boolean(isOwn);
        this.wasThrown = Boolean(wasThrown);
        if (symbol) {
          this.symbol = symbol;
        }
        this.synthetic = Boolean(synthetic);
        if (syntheticSetter) {
          this.syntheticSetter = syntheticSetter;
        }
        this.private = Boolean(isPrivate);
      }
      async setSyntheticValue(expression) {
        if (!this.syntheticSetter) {
          return false;
        }
        const result = await this.syntheticSetter(expression);
        if (result) {
          this.value = result;
        }
        return Boolean(result);
      }
      isAccessorProperty() {
        return Boolean(this.getter || this.setter);
      }
      match({ includeNullOrUndefinedValues, regex: regex2 }) {
        if (regex2 !== null) {
          if (!regex2.test(this.name) && !regex2.test(this.value?.description ?? "")) {
            return false;
          }
        }
        if (!includeNullOrUndefinedValues) {
          if (!this.isAccessorProperty() && RemoteObject$1.isNullOrUndefined(this.value)) {
            return false;
          }
        }
        return true;
      }
      cloneWithNewName(newName) {
        const property = new _RemoteObjectProperty(newName, this.value ?? null, this.enumerable, this.writable, this.isOwn, this.wasThrown, this.symbol, this.synthetic, this.syntheticSetter, this.private);
        property.getter = this.getter;
        property.setter = this.setter;
        return property;
      }
    };
    LocalJSONObject = class extends RemoteObject$1 {
      #value;
      #cachedDescription;
      #cachedChildren;
      constructor(value) {
        super();
        this.#value = value;
      }
      get objectId() {
        return void 0;
      }
      get value() {
        return this.#value;
      }
      unserializableValue() {
        const unserializableDescription = RemoteObject$1.unserializableDescription(this.#value);
        return unserializableDescription || void 0;
      }
      get description() {
        if (this.#cachedDescription) {
          return this.#cachedDescription;
        }
        function formatArrayItem(property) {
          return this.formatValue(property.value || null);
        }
        function formatObjectItem(property) {
          let name = property.name;
          if (/^\s|\s$|^$|\n/.test(name)) {
            name = '"' + name.replace(/\n/g, "\u21B5") + '"';
          }
          return name + ": " + this.formatValue(property.value || null);
        }
        if (this.type === "object") {
          switch (this.subtype) {
            case "array":
              this.#cachedDescription = this.concatenate("[", "]", formatArrayItem.bind(this));
              break;
            case "date":
              this.#cachedDescription = String(this.#value);
              break;
            case "null":
              this.#cachedDescription = "null";
              break;
            default:
              this.#cachedDescription = this.concatenate("{", "}", formatObjectItem.bind(this));
          }
        } else {
          this.#cachedDescription = String(this.#value);
        }
        return this.#cachedDescription;
      }
      formatValue(value) {
        if (!value) {
          return "undefined";
        }
        const description2 = value.description || "";
        if (value.type === "string") {
          return '"' + description2.replace(/\n/g, "\u21B5") + '"';
        }
        return description2;
      }
      concatenate(prefix, suffix, formatProperty) {
        const previewChars = 100;
        let buffer = prefix;
        const children = this.children();
        for (let i = 0; i < children.length; ++i) {
          const itemDescription = formatProperty(children[i]);
          if (buffer.length + itemDescription.length > previewChars) {
            buffer += ",\u2026";
            break;
          }
          if (i) {
            buffer += ", ";
          }
          buffer += itemDescription;
        }
        buffer += suffix;
        return buffer;
      }
      get type() {
        return typeof this.#value;
      }
      get subtype() {
        if (this.#value === null) {
          return "null";
        }
        if (Array.isArray(this.#value)) {
          return "array";
        }
        if (this.#value instanceof Date) {
          return "date";
        }
        if (this.#value instanceof Error) {
          return "error";
        }
        return void 0;
      }
      get hasChildren() {
        if (typeof this.#value !== "object" || this.#value === null) {
          return false;
        }
        return Boolean(Object.keys(this.#value).length);
      }
      async getOwnProperties(_generatePreview, nonIndexedPropertiesOnly = false) {
        function isArrayIndex(name) {
          const index2 = Number(name) >>> 0;
          return String(index2) === name;
        }
        let properties2 = this.children();
        if (nonIndexedPropertiesOnly) {
          properties2 = properties2.filter((property) => !isArrayIndex(property.name));
        }
        return { properties: properties2, internalProperties: null };
      }
      async getAllProperties(accessorPropertiesOnly, generatePreview, nonIndexedPropertiesOnly = false) {
        if (accessorPropertiesOnly) {
          return { properties: [], internalProperties: null };
        }
        return await this.getOwnProperties(generatePreview, nonIndexedPropertiesOnly);
      }
      children() {
        if (!this.hasChildren) {
          return [];
        }
        if (!this.#cachedChildren) {
          this.#cachedChildren = Object.entries(this.#value).map(([name, value]) => {
            return new RemoteObjectProperty(name, value instanceof RemoteObject$1 ? value : RemoteObject$1.fromLocalObject(value));
          });
        }
        return this.#cachedChildren;
      }
      arrayLength() {
        return Array.isArray(this.#value) ? this.#value.length : 0;
      }
      async callFunction(functionDeclaration, args2) {
        const target = this.#value;
        const rawArgs = args2 ? args2.map((arg) => arg.value) : [];
        let result;
        let wasThrown = false;
        try {
          result = functionDeclaration.apply(target, rawArgs);
        } catch {
          wasThrown = true;
        }
        const object2 = RemoteObject$1.fromLocalObject(result);
        return { object: object2, wasThrown };
      }
      async callFunctionJSON(functionDeclaration, args2) {
        const target = this.#value;
        const rawArgs = args2 ? args2.map((arg) => arg.value) : [];
        let result;
        try {
          result = functionDeclaration.apply(target, rawArgs);
        } catch {
          result = null;
        }
        return result;
      }
    };
    RemoteFunction = class _RemoteFunction {
      #object;
      constructor(object2) {
        this.#object = object2;
      }
      static objectAsFunction(object2) {
        if (object2.type !== "function") {
          throw new Error("Object is empty or not a function");
        }
        return new _RemoteFunction(object2);
      }
      async targetFunction() {
        const ownProperties = await this.#object.getOwnProperties(false);
        const targetFunction = ownProperties.internalProperties?.find(({ name }) => name === "[[TargetFunction]]");
        return targetFunction?.value ?? this.#object;
      }
      async targetFunctionDetails() {
        const targetFunction = await this.targetFunction();
        const functionDetails = await targetFunction.debuggerModel().functionDetailsPromise(targetFunction);
        if (this.#object !== targetFunction) {
          targetFunction.release();
        }
        return functionDetails;
      }
    };
    descriptionLengthParenRegex = /\(([0-9]+)\)/;
    descriptionLengthSquareRegex = /\[([0-9]+)\]/;
    SearchMatch = class {
      lineNumber;
      lineContent;
      columnNumber;
      matchLength;
      constructor(lineNumber, lineContent, columnNumber, matchLength) {
        this.lineNumber = lineNumber;
        this.lineContent = lineContent;
        this.columnNumber = columnNumber;
        this.matchLength = matchLength;
      }
      static comparator(a, b) {
        return a.lineNumber - b.lineNumber || a.columnNumber - b.columnNumber;
      }
    };
    contentAsDataURL = function(content, mimeType, contentEncoded, charset, limitSize = true) {
      const maxDataUrlSize = 1024 * 1024;
      if (content === void 0 || content === null || limitSize && content.length > maxDataUrlSize) {
        return null;
      }
      content = contentEncoded ? content : encodeURIComponent(content);
      return "data:" + mimeType + (charset ? ";charset=" + charset : "") + (contentEncoded ? ";base64" : "") + "," + content;
    };
    TextCursor = class {
      #lineEndings;
      #offset = 0;
      #lineNumber = 0;
      #columnNumber = 0;
      constructor(lineEndings) {
        this.#lineEndings = lineEndings;
      }
      advance(offset) {
        this.#offset = offset;
        while (this.#lineNumber < this.#lineEndings.length && this.#lineEndings[this.#lineNumber] < this.#offset) {
          ++this.#lineNumber;
        }
        this.#columnNumber = this.#lineNumber ? this.#offset - this.#lineEndings[this.#lineNumber - 1] - 1 : this.#offset;
      }
      offset() {
        return this.#offset;
      }
      resetTo(offset) {
        this.#offset = offset;
        this.#lineNumber = lowerBound2(this.#lineEndings, offset, DEFAULT_COMPARATOR2);
        this.#columnNumber = this.#lineNumber ? this.#offset - this.#lineEndings[this.#lineNumber - 1] - 1 : this.#offset;
      }
      lineNumber() {
        return this.#lineNumber;
      }
      columnNumber() {
        return this.#columnNumber;
      }
    };
    MAX_SAFE_INT32 = 2 ** 31 - 1;
    TextRange = class _TextRange {
      startLine;
      startColumn;
      endLine;
      endColumn;
      constructor(startLine, startColumn, endLine, endColumn) {
        this.startLine = startLine;
        this.startColumn = startColumn;
        this.endLine = endLine;
        this.endColumn = endColumn;
      }
      static createFromLocation(line, column) {
        return new _TextRange(line, column, line, column);
      }
      static createUnboundedFromLocation(line, column) {
        return new _TextRange(line, column, MAX_SAFE_INT32, MAX_SAFE_INT32);
      }
      static fromObject(serializedTextRange) {
        return new _TextRange(serializedTextRange.startLine, serializedTextRange.startColumn, serializedTextRange.endLine, serializedTextRange.endColumn);
      }
      static comparator(range1, range2) {
        return range1.compareTo(range2);
      }
      static fromEdit(oldRange, newText) {
        let endLine = oldRange.startLine;
        let endColumn = oldRange.startColumn + newText.length;
        const lineEndings = findLineEndingIndexes(newText);
        if (lineEndings.length > 1) {
          endLine = oldRange.startLine + lineEndings.length - 1;
          const len = lineEndings.length;
          endColumn = lineEndings[len - 1] - lineEndings[len - 2] - 1;
        }
        return new _TextRange(oldRange.startLine, oldRange.startColumn, endLine, endColumn);
      }
      isEmpty() {
        return this.startLine === this.endLine && this.startColumn === this.endColumn;
      }
      immediatelyPrecedes(range2) {
        if (!range2) {
          return false;
        }
        return this.endLine === range2.startLine && this.endColumn === range2.startColumn;
      }
      immediatelyFollows(range2) {
        if (!range2) {
          return false;
        }
        return range2.immediatelyPrecedes(this);
      }
      follows(range2) {
        return range2.endLine === this.startLine && range2.endColumn <= this.startColumn || range2.endLine < this.startLine;
      }
      get linesCount() {
        return this.endLine - this.startLine;
      }
      collapseToEnd() {
        return new _TextRange(this.endLine, this.endColumn, this.endLine, this.endColumn);
      }
      collapseToStart() {
        return new _TextRange(this.startLine, this.startColumn, this.startLine, this.startColumn);
      }
      normalize() {
        if (this.startLine > this.endLine || this.startLine === this.endLine && this.startColumn > this.endColumn) {
          return new _TextRange(this.endLine, this.endColumn, this.startLine, this.startColumn);
        }
        return this.clone();
      }
      clone() {
        return new _TextRange(this.startLine, this.startColumn, this.endLine, this.endColumn);
      }
      serializeToObject() {
        return {
          startLine: this.startLine,
          startColumn: this.startColumn,
          endLine: this.endLine,
          endColumn: this.endColumn
        };
      }
      compareTo(other) {
        if (this.startLine > other.startLine) {
          return 1;
        }
        if (this.startLine < other.startLine) {
          return -1;
        }
        if (this.startColumn > other.startColumn) {
          return 1;
        }
        if (this.startColumn < other.startColumn) {
          return -1;
        }
        return 0;
      }
      compareToPosition(lineNumber, columnNumber) {
        if (lineNumber < this.startLine || lineNumber === this.startLine && columnNumber < this.startColumn) {
          return -1;
        }
        if (lineNumber > this.endLine || lineNumber === this.endLine && columnNumber > this.endColumn) {
          return 1;
        }
        return 0;
      }
      equal(other) {
        return this.startLine === other.startLine && this.endLine === other.endLine && this.startColumn === other.startColumn && this.endColumn === other.endColumn;
      }
      relativeTo(line, column) {
        const relative2 = this.clone();
        if (this.startLine === line) {
          relative2.startColumn -= column;
        }
        if (this.endLine === line) {
          relative2.endColumn -= column;
        }
        relative2.startLine -= line;
        relative2.endLine -= line;
        return relative2;
      }
      relativeFrom(line, column) {
        const relative2 = this.clone();
        if (this.startLine === 0) {
          relative2.startColumn += column;
        }
        if (this.endLine === 0) {
          relative2.endColumn += column;
        }
        relative2.startLine += line;
        relative2.endLine += line;
        return relative2;
      }
      rebaseAfterTextEdit(originalRange, editedRange) {
        console.assert(originalRange.startLine === editedRange.startLine);
        console.assert(originalRange.startColumn === editedRange.startColumn);
        const rebase = this.clone();
        if (!this.follows(originalRange)) {
          return rebase;
        }
        const lineDelta = editedRange.endLine - originalRange.endLine;
        const columnDelta = editedRange.endColumn - originalRange.endColumn;
        rebase.startLine += lineDelta;
        rebase.endLine += lineDelta;
        if (rebase.startLine === editedRange.endLine) {
          rebase.startColumn += columnDelta;
        }
        if (rebase.endLine === editedRange.endLine) {
          rebase.endColumn += columnDelta;
        }
        return rebase;
      }
      toString() {
        return JSON.stringify(this);
      }
      containsLocation(lineNumber, columnNumber) {
        if (this.startLine === this.endLine) {
          return this.startLine === lineNumber && this.startColumn <= columnNumber && columnNumber < this.endColumn;
        }
        if (this.startLine === lineNumber) {
          return this.startColumn <= columnNumber;
        }
        if (this.endLine === lineNumber) {
          return columnNumber < this.endColumn;
        }
        return this.startLine < lineNumber && lineNumber < this.endLine;
      }
      get start() {
        return { lineNumber: this.startLine, columnNumber: this.startColumn };
      }
      get end() {
        return { lineNumber: this.endLine, columnNumber: this.endColumn };
      }
      intersection(that) {
        let { startLine, startColumn } = this;
        if (startLine < that.startLine) {
          startLine = that.startLine;
          startColumn = that.startColumn;
        } else if (startLine === that.startLine) {
          startColumn = Math.max(startColumn, that.startColumn);
        }
        let { endLine, endColumn } = this;
        if (endLine > that.endLine) {
          endLine = that.endLine;
          endColumn = that.endColumn;
        } else if (endLine === that.endLine) {
          endColumn = Math.min(endColumn, that.endColumn);
        }
        if (startLine > endLine || startLine === endLine && startColumn >= endColumn) {
          return new _TextRange(0, 0, 0, 0);
        }
        return new _TextRange(startLine, startColumn, endLine, endColumn);
      }
    };
    SourceRange = class {
      offset;
      length;
      constructor(offset, length) {
        this.offset = offset;
        this.length = length;
      }
    };
    Text = class {
      #value;
      #lineEndings;
      constructor(value) {
        this.#value = value;
      }
      lineEndings() {
        if (!this.#lineEndings) {
          this.#lineEndings = findLineEndingIndexes(this.#value);
        }
        return this.#lineEndings;
      }
      value() {
        return this.#value;
      }
      lineCount() {
        const lineEndings = this.lineEndings();
        return lineEndings.length;
      }
      offsetFromPosition(lineNumber, columnNumber) {
        return (lineNumber ? this.lineEndings()[lineNumber - 1] + 1 : 0) + columnNumber;
      }
      positionFromOffset(offset) {
        const lineEndings = this.lineEndings();
        const lineNumber = lowerBound2(lineEndings, offset, DEFAULT_COMPARATOR2);
        return { lineNumber, columnNumber: offset - (lineNumber && lineEndings[lineNumber - 1] + 1) };
      }
      lineAt(lineNumber) {
        const lineEndings = this.lineEndings();
        const lineStart = lineNumber > 0 ? lineEndings[lineNumber - 1] + 1 : 0;
        const lineEnd = lineEndings[lineNumber];
        let lineContent = this.#value.substring(lineStart, lineEnd);
        if (lineContent.length > 0 && lineContent.charAt(lineContent.length - 1) === "\r") {
          lineContent = lineContent.substring(0, lineContent.length - 1);
        }
        return lineContent;
      }
      toSourceRange(range2) {
        const start = this.offsetFromPosition(range2.startLine, range2.startColumn);
        const end = this.offsetFromPosition(range2.endLine, range2.endColumn);
        return new SourceRange(start, end - start);
      }
      toTextRange(sourceRange) {
        const cursor = new TextCursor(this.lineEndings());
        const result = TextRange.createFromLocation(0, 0);
        cursor.resetTo(sourceRange.offset);
        result.startLine = cursor.lineNumber();
        result.startColumn = cursor.columnNumber();
        cursor.advance(sourceRange.offset + sourceRange.length);
        result.endLine = cursor.lineNumber();
        result.endColumn = cursor.columnNumber();
        return result;
      }
      replaceRange(range2, replacement) {
        const sourceRange = this.toSourceRange(range2);
        return this.#value.substring(0, sourceRange.offset) + replacement + this.#value.substring(sourceRange.offset + sourceRange.length);
      }
      extract(range2) {
        const sourceRange = this.toSourceRange(range2);
        return this.#value.substr(sourceRange.offset, sourceRange.length);
      }
    };
    ContentData = class _ContentData {
      mimeType;
      charset;
      #contentAsBase64;
      #contentAsText;
      #contentAsTextObj;
      constructor(data32, isBase64, mimeType, charset) {
        this.charset = charset || "utf-8";
        if (isBase64) {
          this.#contentAsBase64 = data32;
        } else {
          this.#contentAsText = data32;
        }
        this.mimeType = mimeType;
        if (!this.mimeType) {
          this.mimeType = isBase64 ? "application/octet-stream" : "text/plain";
        }
      }
      get base64() {
        if (this.#contentAsBase64 === void 0) {
          throw new Error("Encoding text content as base64 is not supported");
        }
        return this.#contentAsBase64;
      }
      get text() {
        if (this.#contentAsText !== void 0) {
          return this.#contentAsText;
        }
        if (!this.isTextContent) {
          throw new Error("Cannot interpret binary data as text");
        }
        const binaryString = window.atob(this.#contentAsBase64);
        const len = binaryString.length;
        const bytes2 = new Uint8Array(len);
        for (let i = 0; i < len; i++) {
          bytes2[i] = binaryString.charCodeAt(i);
        }
        this.#contentAsText = new TextDecoder(this.charset).decode(bytes2);
        return this.#contentAsText;
      }
      get isTextContent() {
        return this.#createdFromText || isTextType(this.mimeType);
      }
      get isEmpty() {
        return !Boolean(this.#contentAsBase64) && !Boolean(this.#contentAsText);
      }
      get createdFromBase64() {
        return this.#contentAsBase64 !== void 0;
      }
      get #createdFromText() {
        return this.#contentAsBase64 === void 0;
      }
      get textObj() {
        if (this.#contentAsTextObj === void 0) {
          this.#contentAsTextObj = new Text(this.text);
        }
        return this.#contentAsTextObj;
      }
      contentEqualTo(other) {
        if (this.#contentAsBase64 !== void 0 && other.#contentAsBase64 !== void 0) {
          return this.#contentAsBase64 === other.#contentAsBase64;
        }
        if (this.#contentAsText !== void 0 && other.#contentAsText !== void 0) {
          return this.#contentAsText === other.#contentAsText;
        }
        if (this.isTextContent && other.isTextContent) {
          return this.text === other.text;
        }
        return false;
      }
      asDataUrl() {
        if (this.#contentAsBase64 !== void 0) {
          const charset = this.isTextContent ? this.charset : null;
          return contentAsDataURL(this.#contentAsBase64, this.mimeType ?? "", true, charset);
        }
        return contentAsDataURL(this.text, this.mimeType ?? "", false, "utf-8");
      }
      asDeferedContent() {
        if (this.isTextContent) {
          return { content: this.text, isEncoded: false };
        }
        if (this.#contentAsText !== void 0) {
          return { content: this.#contentAsText, isEncoded: false };
        }
        if (this.#contentAsBase64 !== void 0) {
          return { content: this.#contentAsBase64, isEncoded: true };
        }
        throw new Error("Unreachable");
      }
      static isError(contentDataOrError) {
        return "error" in contentDataOrError;
      }
      static textOr(contentDataOrError, value) {
        if (_ContentData.isError(contentDataOrError)) {
          return value;
        }
        return contentDataOrError.text;
      }
      static contentDataOrEmpty(contentDataOrError) {
        if (_ContentData.isError(contentDataOrError)) {
          return EMPTY_TEXT_CONTENT_DATA;
        }
        return contentDataOrError;
      }
      static asDeferredContent(contentDataOrError) {
        if (_ContentData.isError(contentDataOrError)) {
          return { error: contentDataOrError.error, content: null, isEncoded: false };
        }
        return contentDataOrError.asDeferedContent();
      }
    };
    EMPTY_TEXT_CONTENT_DATA = new ContentData("", false, "text/plain");
    SPACE_CHAR_REGEXP = /\s/;
    Utils = {
      isSpaceChar: function(char) {
        return SPACE_CHAR_REGEXP.test(char);
      },
      lineIndent: function(line) {
        let indentation = 0;
        while (indentation < line.length && Utils.isSpaceChar(line.charAt(indentation))) {
          ++indentation;
        }
        return line.substr(0, indentation);
      },
      splitStringByRegexes(text, regexes) {
        const matches = [];
        const globalRegexes = [];
        for (let i = 0; i < regexes.length; i++) {
          const regex2 = regexes[i];
          if (!regex2.global) {
            globalRegexes.push(new RegExp(regex2.source, regex2.flags ? regex2.flags + "g" : "g"));
          } else {
            globalRegexes.push(regex2);
          }
        }
        doSplit(text, 0, 0);
        return matches;
        function doSplit(text2, regexIndex, startIndex) {
          if (regexIndex >= globalRegexes.length) {
            matches.push({ value: text2, position: startIndex, regexIndex: -1, captureGroups: [] });
            return;
          }
          const regex2 = globalRegexes[regexIndex];
          let currentIndex = 0;
          let result;
          regex2.lastIndex = 0;
          while ((result = regex2.exec(text2)) !== null) {
            const stringBeforeMatch = text2.substring(currentIndex, result.index);
            if (stringBeforeMatch) {
              doSplit(stringBeforeMatch, regexIndex + 1, startIndex + currentIndex);
            }
            const match = result[0];
            matches.push({
              value: match,
              position: startIndex + result.index,
              regexIndex,
              captureGroups: result.slice(1)
            });
            currentIndex = result.index + match.length;
          }
          const stringAfterMatches = text2.substring(currentIndex);
          if (stringAfterMatches) {
            doSplit(stringAfterMatches, regexIndex + 1, startIndex + currentIndex);
          }
        }
      }
    };
    performSearchInContentData = function(contentData, query, caseSensitive, isRegex) {
      if (ContentData.isError(contentData) || !contentData.isTextContent) {
        return [];
      }
      return performSearchInContent(contentData.textObj, query, caseSensitive, isRegex);
    };
    performSearchInContent = function(text, query, caseSensitive, isRegex) {
      const regex2 = createSearchRegex(query, caseSensitive, isRegex);
      const result = [];
      for (let i = 0; i < text.lineCount(); ++i) {
        const lineContent = text.lineAt(i);
        const matches = lineContent.matchAll(regex2);
        for (const match of matches) {
          result.push(new SearchMatch(i, lineContent, match.index, match[0].length));
        }
      }
      return result;
    };
    performSearchInSearchMatches = function(matches, query, caseSensitive, isRegex) {
      const regex2 = createSearchRegex(query, caseSensitive, isRegex);
      const result = [];
      for (const { lineNumber, lineContent } of matches) {
        const matches2 = lineContent.matchAll(regex2);
        for (const match of matches2) {
          result.push(new SearchMatch(lineNumber, lineContent, match.index, match[0].length));
        }
      }
      return result;
    };
    StaticContentProvider = class _StaticContentProvider {
      #contentURL;
      #contentType;
      #lazyContent;
      constructor(contentURL, contentType, lazyContent) {
        this.#contentURL = contentURL;
        this.#contentType = contentType;
        this.#lazyContent = lazyContent;
      }
      static fromString(contentURL, contentType, content) {
        const lazyContent = () => Promise.resolve(new ContentData(content, false, contentType.canonicalMimeType()));
        return new _StaticContentProvider(contentURL, contentType, lazyContent);
      }
      contentURL() {
        return this.#contentURL;
      }
      contentType() {
        return this.#contentType;
      }
      requestContentData() {
        return this.#lazyContent();
      }
      async searchInContent(query, caseSensitive, isRegex) {
        const contentData = await this.requestContentData();
        return performSearchInContentData(contentData, query, caseSensitive, isRegex);
      }
    };
    StreamingContentData = class _StreamingContentData extends ObjectWrapper {
      mimeType;
      #charset;
      #disallowStreaming;
      #chunks = [];
      #contentData;
      constructor(mimeType, charset, initialContent) {
        super();
        this.mimeType = mimeType;
        this.#charset = charset;
        this.#disallowStreaming = Boolean(initialContent && !initialContent.createdFromBase64);
        this.#contentData = initialContent;
      }
      static create(mimeType, charset) {
        return new _StreamingContentData(mimeType, charset);
      }
      static from(content) {
        return new _StreamingContentData(content.mimeType, content.charset, content);
      }
      get isTextContent() {
        if (this.#contentData) {
          return this.#contentData.isTextContent;
        }
        return isTextType(this.mimeType);
      }
      addChunk(chunk) {
        if (this.#disallowStreaming) {
          throw new Error("Cannot add base64 data to a text-only ContentData.");
        }
        this.#chunks.push(chunk);
        this.dispatchEventToListeners("ChunkAdded", { content: this, chunk });
      }
      content() {
        if (this.#contentData && this.#chunks.length === 0) {
          return this.#contentData;
        }
        const initialBase64 = this.#contentData?.base64 ?? "";
        const base64Content = this.#chunks.reduce((acc, chunk) => concatBase64(acc, chunk), initialBase64);
        this.#contentData = new ContentData(base64Content, true, this.mimeType, this.#charset);
        this.#chunks = [];
        return this.#contentData;
      }
    };
    isError = function(contentDataOrError) {
      return "error" in contentDataOrError;
    };
    WasmDisassembly = class extends ContentData {
      lines;
      #offsets;
      #functionBodyOffsets;
      #cachedText;
      constructor(lines, offsets, functionBodyOffsets) {
        super("", false, "text/x-wast", "utf-8");
        if (lines.length !== offsets.length) {
          throw new Error("Lines and offsets don't match");
        }
        this.lines = lines;
        this.#offsets = offsets;
        this.#functionBodyOffsets = functionBodyOffsets;
      }
      get text() {
        if (typeof this.#cachedText === "undefined") {
          this.#cachedText = this.lines.join("\n");
        }
        return this.#cachedText;
      }
      get isEmpty() {
        return this.lines.length === 0 || this.lines.length === 1 && this.lines[0].length === 0;
      }
      get lineNumbers() {
        return this.#offsets.length;
      }
      bytecodeOffsetToLineNumber(bytecodeOffset) {
        return upperBound2(this.#offsets, bytecodeOffset, DEFAULT_COMPARATOR2) - 1;
      }
      lineNumberToBytecodeOffset(lineNumber) {
        return this.#offsets[lineNumber];
      }
      *nonBreakableLineNumbers() {
        let lineNumber = 0;
        let functionIndex = 0;
        while (lineNumber < this.lineNumbers) {
          if (functionIndex < this.#functionBodyOffsets.length) {
            const offset = this.lineNumberToBytecodeOffset(lineNumber);
            if (offset >= this.#functionBodyOffsets[functionIndex].start) {
              lineNumber = this.bytecodeOffsetToLineNumber(this.#functionBodyOffsets[functionIndex++].end) + 1;
              continue;
            }
          }
          yield lineNumber++;
        }
      }
      asDeferedContent() {
        return { content: "", isEncoded: false, wasmDisassemblyInfo: this };
      }
    };
    (function(ErrorType2) {
      ErrorType2["HTTP_RESPONSE_UNAVAILABLE"] = "HTTP_RESPONSE_UNAVAILABLE";
      ErrorType2["NOT_FOUND"] = "NOT_FOUND";
      ErrorType2["ABORT"] = "ABORT";
    })(ErrorType || (ErrorType = {}));
    globalThis.setDebugDispatchHttpRequestEnabled = setDebugDispatchHttpRequestEnabled;
    (function(Role2) {
      Role2[Role2["ROLE_UNSPECIFIED"] = 0] = "ROLE_UNSPECIFIED";
      Role2[Role2["USER"] = 1] = "USER";
      Role2[Role2["MODEL"] = 2] = "MODEL";
    })(Role || (Role = {}));
    (function(FunctionalityType2) {
      FunctionalityType2[FunctionalityType2["FUNCTIONALITY_TYPE_UNSPECIFIED"] = 0] = "FUNCTIONALITY_TYPE_UNSPECIFIED";
      FunctionalityType2[FunctionalityType2["CHAT"] = 1] = "CHAT";
      FunctionalityType2[FunctionalityType2["EXPLAIN_ERROR"] = 2] = "EXPLAIN_ERROR";
      FunctionalityType2[FunctionalityType2["AGENTIC_CHAT"] = 5] = "AGENTIC_CHAT";
    })(FunctionalityType || (FunctionalityType = {}));
    (function(ClientFeature2) {
      ClientFeature2[ClientFeature2["CLIENT_FEATURE_UNSPECIFIED"] = 0] = "CLIENT_FEATURE_UNSPECIFIED";
      ClientFeature2[ClientFeature2["CHROME_CONSOLE_INSIGHTS"] = 1] = "CHROME_CONSOLE_INSIGHTS";
      ClientFeature2[ClientFeature2["CHROME_STYLING_AGENT"] = 2] = "CHROME_STYLING_AGENT";
      ClientFeature2[ClientFeature2["CHROME_NETWORK_AGENT"] = 7] = "CHROME_NETWORK_AGENT";
      ClientFeature2[ClientFeature2["CHROME_PERFORMANCE_ANNOTATIONS_AGENT"] = 20] = "CHROME_PERFORMANCE_ANNOTATIONS_AGENT";
      ClientFeature2[ClientFeature2["CHROME_FILE_AGENT"] = 9] = "CHROME_FILE_AGENT";
      ClientFeature2[ClientFeature2["CHROME_PATCH_AGENT"] = 12] = "CHROME_PATCH_AGENT";
      ClientFeature2[ClientFeature2["CHROME_PERFORMANCE_FULL_AGENT"] = 24] = "CHROME_PERFORMANCE_FULL_AGENT";
    })(ClientFeature || (ClientFeature = {}));
    (function(UserTier2) {
      UserTier2[UserTier2["USER_TIER_UNSPECIFIED"] = 0] = "USER_TIER_UNSPECIFIED";
      UserTier2[UserTier2["TESTERS"] = 1] = "TESTERS";
      UserTier2[UserTier2["BETA"] = 2] = "BETA";
      UserTier2[UserTier2["PUBLIC"] = 3] = "PUBLIC";
    })(UserTier || (UserTier = {}));
    (function(EditType2) {
      EditType2[EditType2["EDIT_TYPE_UNSPECIFIED"] = 0] = "EDIT_TYPE_UNSPECIFIED";
      EditType2[EditType2["ADD"] = 1] = "ADD";
      EditType2[EditType2["DELETE"] = 2] = "DELETE";
      EditType2[EditType2["PASTE"] = 3] = "PASTE";
      EditType2[EditType2["UNDO"] = 4] = "UNDO";
      EditType2[EditType2["REDO"] = 5] = "REDO";
      EditType2[EditType2["ACCEPT_COMPLETION"] = 6] = "ACCEPT_COMPLETION";
    })(EditType || (EditType = {}));
    (function(Reason2) {
      Reason2[Reason2["UNKNOWN"] = 0] = "UNKNOWN";
      Reason2[Reason2["CURRENTLY_OPEN"] = 1] = "CURRENTLY_OPEN";
      Reason2[Reason2["RECENTLY_OPENED"] = 2] = "RECENTLY_OPENED";
      Reason2[Reason2["RECENTLY_EDITED"] = 3] = "RECENTLY_EDITED";
      Reason2[Reason2["COLOCATED"] = 4] = "COLOCATED";
      Reason2[Reason2["RELATED_FILE"] = 5] = "RELATED_FILE";
    })(Reason || (Reason = {}));
    (function(UseCase2) {
      UseCase2[UseCase2["USE_CASE_UNSPECIFIED"] = 0] = "USE_CASE_UNSPECIFIED";
      UseCase2[UseCase2["CODE_GENERATION"] = 1] = "CODE_GENERATION";
    })(UseCase || (UseCase = {}));
    (function(RecitationAction2) {
      RecitationAction2["ACTION_UNSPECIFIED"] = "ACTION_UNSPECIFIED";
      RecitationAction2["CITE"] = "CITE";
      RecitationAction2["BLOCK"] = "BLOCK";
      RecitationAction2["NO_ACTION"] = "NO_ACTION";
      RecitationAction2["EXEMPT_FOUND_IN_PROMPT"] = "EXEMPT_FOUND_IN_PROMPT";
    })(RecitationAction || (RecitationAction = {}));
    (function(CitationSourceType2) {
      CitationSourceType2["CITATION_SOURCE_TYPE_UNSPECIFIED"] = "CITATION_SOURCE_TYPE_UNSPECIFIED";
      CitationSourceType2["TRAINING_DATA"] = "TRAINING_DATA";
      CitationSourceType2["WORLD_FACTS"] = "WORLD_FACTS";
      CitationSourceType2["LOCAL_FACTS"] = "LOCAL_FACTS";
      CitationSourceType2["INDIRECT"] = "INDIRECT";
    })(CitationSourceType || (CitationSourceType = {}));
    (function(SubscriptionStatus2) {
      SubscriptionStatus2["ENABLED"] = "SUBSCRIPTION_STATE_ENABLED";
      SubscriptionStatus2["PENDING"] = "SUBSCRIPTION_STATE_PENDING";
      SubscriptionStatus2["CANCELED"] = "SUBSCRIPTION_STATE_CANCELED";
      SubscriptionStatus2["REFUNDED"] = "SUBSCRIPTION_STATE_REFUNDED";
      SubscriptionStatus2["AWAITING_FIX"] = "SUBSCRIPTION_STATE_AWAITING_FIX";
      SubscriptionStatus2["ON_HOLD"] = "SUBSCRIPTION_STATE_ACCOUNT_ON_HOLD";
    })(SubscriptionStatus || (SubscriptionStatus = {}));
    (function(SubscriptionTier2) {
      SubscriptionTier2["PREMIUM_ANNUAL"] = "SUBSCRIPTION_TIER_PREMIUM_ANNUAL";
      SubscriptionTier2["PREMIUM_MONTHLY"] = "SUBSCRIPTION_TIER_PREMIUM_MONTHLY";
      SubscriptionTier2["PRO_ANNUAL"] = "SUBSCRIPTION_TIER_PRO_ANNUAL";
      SubscriptionTier2["PRO_MONTHLY"] = "SUBSCRIPTION_TIER_PRO_MONTHLY";
    })(SubscriptionTier || (SubscriptionTier = {}));
    (function(EligibilityStatus2) {
      EligibilityStatus2["ELIGIBLE"] = "ELIGIBLE";
      EligibilityStatus2["NOT_ELIGIBLE"] = "NOT_ELIGIBLE";
    })(EligibilityStatus || (EligibilityStatus = {}));
    (function(EmailPreference2) {
      EmailPreference2["ENABLED"] = "ENABLED";
      EmailPreference2["DISABLED"] = "DISABLED";
    })(EmailPreference || (EmailPreference = {}));
    UserMetrics = class {
      #panelChangedSinceLaunch;
      #firedLaunchHistogram;
      #launchPanelName;
      constructor() {
        this.#panelChangedSinceLaunch = false;
        this.#firedLaunchHistogram = false;
        this.#launchPanelName = "";
      }
      panelShown(panelName, isLaunching) {
        const code2 = PanelCodes[panelName] || 0;
        InspectorFrontendHostInstance.recordEnumeratedHistogram("DevTools.PanelShown", code2, PanelCodes.MAX_VALUE);
        InspectorFrontendHostInstance.recordUserMetricsAction("DevTools_PanelShown_" + panelName);
        if (!isLaunching) {
          this.#panelChangedSinceLaunch = true;
        }
      }
      settingsPanelShown(settingsViewId) {
        this.panelShown("settings-" + settingsViewId);
      }
      sourcesPanelFileDebugged(mediaType) {
        const code2 = mediaType && MediaTypes[mediaType] || MediaTypes.Unknown;
        InspectorFrontendHostInstance.recordEnumeratedHistogram("DevTools.SourcesPanelFileDebugged", code2, MediaTypes.MAX_VALUE);
      }
      sourcesPanelFileOpened(mediaType) {
        const code2 = mediaType && MediaTypes[mediaType] || MediaTypes.Unknown;
        InspectorFrontendHostInstance.recordEnumeratedHistogram("DevTools.SourcesPanelFileOpened", code2, MediaTypes.MAX_VALUE);
      }
      networkPanelResponsePreviewOpened(mediaType) {
        const code2 = mediaType && MediaTypes[mediaType] || MediaTypes.Unknown;
        InspectorFrontendHostInstance.recordEnumeratedHistogram("DevTools.NetworkPanelResponsePreviewOpened", code2, MediaTypes.MAX_VALUE);
      }
      actionTaken(action) {
        InspectorFrontendHostInstance.recordEnumeratedHistogram("DevTools.ActionTaken", action, Action.MAX_VALUE);
      }
      panelLoaded(panelName, histogramName) {
        if (this.#firedLaunchHistogram || panelName !== this.#launchPanelName) {
          return;
        }
        this.#firedLaunchHistogram = true;
        requestAnimationFrame(() => {
          window.setTimeout(() => {
            performance.mark(histogramName);
            if (this.#panelChangedSinceLaunch) {
              return;
            }
            InspectorFrontendHostInstance.recordPerformanceHistogram(histogramName, performance.now());
          }, 0);
        });
      }
      setLaunchPanel(panelName) {
        this.#launchPanelName = panelName;
      }
      performanceTraceLoad(measure) {
        InspectorFrontendHostInstance.recordPerformanceHistogram("DevTools.TraceLoad", measure.duration);
      }
      keybindSetSettingChanged(keybindSet) {
        const value = KeybindSetSettings[keybindSet] || 0;
        InspectorFrontendHostInstance.recordEnumeratedHistogram("DevTools.KeybindSetSettingChanged", value, KeybindSetSettings.MAX_VALUE);
      }
      keyboardShortcutFired(actionId) {
        const action = KeyboardShortcutAction[actionId] || KeyboardShortcutAction.OtherShortcut;
        InspectorFrontendHostInstance.recordEnumeratedHistogram("DevTools.KeyboardShortcutFired", action, KeyboardShortcutAction.MAX_VALUE);
      }
      issuesPanelOpenedFrom(issueOpener) {
        InspectorFrontendHostInstance.recordEnumeratedHistogram("DevTools.IssuesPanelOpenedFrom", issueOpener, 6);
      }
      issuesPanelIssueExpanded(issueExpandedCategory) {
        if (issueExpandedCategory === void 0) {
          return;
        }
        const issueExpanded = IssueExpanded[issueExpandedCategory];
        if (issueExpanded === void 0) {
          return;
        }
        InspectorFrontendHostInstance.recordEnumeratedHistogram("DevTools.IssuesPanelIssueExpanded", issueExpanded, IssueExpanded.MAX_VALUE);
      }
      issuesPanelResourceOpened(issueCategory, type2) {
        const key = issueCategory + type2;
        const value = IssueResourceOpened[key];
        if (value === void 0) {
          return;
        }
        InspectorFrontendHostInstance.recordEnumeratedHistogram("DevTools.IssuesPanelResourceOpened", value, IssueResourceOpened.MAX_VALUE);
      }
      issueCreated(code2) {
        const issueCreated = IssueCreated[code2];
        if (issueCreated === void 0) {
          return;
        }
        InspectorFrontendHostInstance.recordEnumeratedHistogram("DevTools.IssueCreated", issueCreated, IssueCreated.MAX_VALUE);
      }
      experimentEnabledAtLaunch(experimentId) {
        const experiment = DevtoolsExperiments[experimentId];
        if (experiment === void 0) {
          return;
        }
        InspectorFrontendHostInstance.recordEnumeratedHistogram("DevTools.ExperimentEnabledAtLaunch", experiment, DevtoolsExperiments.MAX_VALUE);
      }
      navigationSettingAtFirstTimelineLoad(state) {
        InspectorFrontendHostInstance.recordEnumeratedHistogram("DevTools.TimelineNavigationSettingState", state, 4);
      }
      experimentDisabledAtLaunch(experimentId) {
        const experiment = DevtoolsExperiments[experimentId];
        if (experiment === void 0) {
          return;
        }
        InspectorFrontendHostInstance.recordEnumeratedHistogram("DevTools.ExperimentDisabledAtLaunch", experiment, DevtoolsExperiments.MAX_VALUE);
      }
      experimentChanged(experimentId, isEnabled3) {
        const experiment = DevtoolsExperiments[experimentId];
        if (experiment === void 0) {
          return;
        }
        const actionName = isEnabled3 ? "DevTools.ExperimentEnabled" : "DevTools.ExperimentDisabled";
        InspectorFrontendHostInstance.recordEnumeratedHistogram(actionName, experiment, DevtoolsExperiments.MAX_VALUE);
      }
      developerResourceLoaded(developerResourceLoaded) {
        if (developerResourceLoaded >= 8) {
          return;
        }
        InspectorFrontendHostInstance.recordEnumeratedHistogram("DevTools.DeveloperResourceLoaded", developerResourceLoaded, 8);
      }
      developerResourceScheme(developerResourceScheme) {
        if (developerResourceScheme >= 9) {
          return;
        }
        InspectorFrontendHostInstance.recordEnumeratedHistogram("DevTools.DeveloperResourceScheme", developerResourceScheme, 9);
      }
      language(language) {
        const languageCode = Language[language];
        if (languageCode === void 0) {
          return;
        }
        InspectorFrontendHostInstance.recordEnumeratedHistogram("DevTools.Language", languageCode, Language.MAX_VALUE);
      }
      syncSetting(devtoolsSyncSettingEnabled) {
        InspectorFrontendHostInstance.getSyncInformation((syncInfo) => {
          let settingValue = 1;
          if (syncInfo.isSyncActive && !syncInfo.arePreferencesSynced) {
            settingValue = 2;
          } else if (syncInfo.isSyncActive && syncInfo.arePreferencesSynced) {
            settingValue = devtoolsSyncSettingEnabled ? 4 : 3;
          }
          InspectorFrontendHostInstance.recordEnumeratedHistogram("DevTools.SyncSetting", settingValue, 5);
        });
      }
      recordingToggled(value) {
        InspectorFrontendHostInstance.recordEnumeratedHistogram("DevTools.RecordingToggled", value, 3);
      }
      recordingReplayFinished(value) {
        InspectorFrontendHostInstance.recordEnumeratedHistogram("DevTools.RecordingReplayFinished", value, 5);
      }
      recordingReplayStarted(value) {
        InspectorFrontendHostInstance.recordEnumeratedHistogram("DevTools.RecordingReplayStarted", value, 4);
      }
      lighthouseModeRun(type2) {
        InspectorFrontendHostInstance.recordEnumeratedHistogram("DevTools.LighthouseModeRun", type2, 4);
      }
      lighthouseCategoryUsed(type2) {
        InspectorFrontendHostInstance.recordEnumeratedHistogram("DevTools.LighthouseCategoryUsed", type2, 6);
      }
      swatchActivated(swatch) {
        InspectorFrontendHostInstance.recordEnumeratedHistogram("DevTools.SwatchActivated", swatch, 13);
      }
      workspacesPopulated(wallClockTimeInMilliseconds) {
        InspectorFrontendHostInstance.recordPerformanceHistogram("DevTools.Workspaces.PopulateWallClocktime", wallClockTimeInMilliseconds);
      }
      visualLoggingProcessingDone(timeInMilliseconds) {
        InspectorFrontendHostInstance.recordPerformanceHistogram("DevTools.VisualLogging.ProcessingTime", timeInMilliseconds);
      }
      freestylerQueryLength(numberOfCharacters) {
        InspectorFrontendHostInstance.recordCountHistogram("DevTools.Freestyler.QueryLength", numberOfCharacters, 0, 1e5, 100);
      }
      freestylerEvalResponseSize(bytes2) {
        InspectorFrontendHostInstance.recordCountHistogram("DevTools.Freestyler.EvalResponseSize", bytes2, 0, 1e5, 100);
      }
      performanceAINetworkSummaryResponseSize(bytes2) {
        InspectorFrontendHostInstance.recordCountHistogram("DevTools.PerformanceAI.NetworkSummaryResponseSize", bytes2, 0, 1e5, 100);
      }
      performanceAINetworkRequestDetailResponseSize(bytes2) {
        InspectorFrontendHostInstance.recordCountHistogram("DevTools.PerformanceAI.NetworkRequestDetailResponseSize", bytes2, 0, 1e5, 100);
      }
      performanceAIMainThreadActivityResponseSize(bytes2) {
        InspectorFrontendHostInstance.recordCountHistogram("DevTools.PerformanceAI.MainThreadActivityResponseSize", bytes2, 0, 1e5, 100);
      }
      builtInAiAvailability(availability) {
        InspectorFrontendHostInstance.recordEnumeratedHistogram("DevTools.BuiltInAiAvailability", availability, 10);
      }
      consoleInsightTeaserGenerated(timeInMilliseconds) {
        InspectorFrontendHostInstance.recordPerformanceHistogram("DevTools.Insights.TeaserGenerationTime", timeInMilliseconds);
      }
      consoleInsightTeaserGeneratedMedium(timeInMilliseconds) {
        InspectorFrontendHostInstance.recordPerformanceHistogramMedium("DevTools.Insights.TeaserGenerationTimeMedium", timeInMilliseconds);
      }
      consoleInsightTeaserFirstChunkGenerated(timeInMilliseconds) {
        InspectorFrontendHostInstance.recordPerformanceHistogram("DevTools.Insights.TeaserFirstChunkGenerationTime", timeInMilliseconds);
      }
      consoleInsightTeaserFirstChunkGeneratedMedium(timeInMilliseconds) {
        InspectorFrontendHostInstance.recordPerformanceHistogramMedium("DevTools.Insights.TeaserFirstChunkGenerationTimeMedium", timeInMilliseconds);
      }
      consoleInsightTeaserChunkToEndMedium(timeInMilliseconds) {
        InspectorFrontendHostInstance.recordPerformanceHistogramMedium("DevTools.Insights.TeaserChunkToEndMedium", timeInMilliseconds);
      }
      consoleInsightTeaserAbortedAfterFirstCharacter(timeInMilliseconds) {
        InspectorFrontendHostInstance.recordPerformanceHistogram("DevTools.Insights.TeaserAfterFirstCharacterAbortionTime", timeInMilliseconds);
      }
      consoleInsightTeaserAbortedBeforeFirstCharacter(timeInMilliseconds) {
        InspectorFrontendHostInstance.recordPerformanceHistogram("DevTools.Insights.TeaserBeforeFirstCharacterAbortionTime", timeInMilliseconds);
      }
      consoleInsightLongTeaserGenerated(timeInMilliseconds) {
        InspectorFrontendHostInstance.recordPerformanceHistogram("DevTools.Insights.LongTeaserGenerationTime", timeInMilliseconds);
      }
      consoleInsightShortTeaserGenerated(timeInMilliseconds) {
        InspectorFrontendHostInstance.recordPerformanceHistogram("DevTools.Insights.ShortTeaserGenerationTime", timeInMilliseconds);
      }
    };
    (function(Action2) {
      Action2[Action2["WindowDocked"] = 1] = "WindowDocked";
      Action2[Action2["WindowUndocked"] = 2] = "WindowUndocked";
      Action2[Action2["ScriptsBreakpointSet"] = 3] = "ScriptsBreakpointSet";
      Action2[Action2["TimelineStarted"] = 4] = "TimelineStarted";
      Action2[Action2["ProfilesCPUProfileTaken"] = 5] = "ProfilesCPUProfileTaken";
      Action2[Action2["ProfilesHeapProfileTaken"] = 6] = "ProfilesHeapProfileTaken";
      Action2[Action2["ConsoleEvaluated"] = 8] = "ConsoleEvaluated";
      Action2[Action2["FileSavedInWorkspace"] = 9] = "FileSavedInWorkspace";
      Action2[Action2["DeviceModeEnabled"] = 10] = "DeviceModeEnabled";
      Action2[Action2["AnimationsPlaybackRateChanged"] = 11] = "AnimationsPlaybackRateChanged";
      Action2[Action2["RevisionApplied"] = 12] = "RevisionApplied";
      Action2[Action2["FileSystemDirectoryContentReceived"] = 13] = "FileSystemDirectoryContentReceived";
      Action2[Action2["StyleRuleEdited"] = 14] = "StyleRuleEdited";
      Action2[Action2["CommandEvaluatedInConsolePanel"] = 15] = "CommandEvaluatedInConsolePanel";
      Action2[Action2["DOMPropertiesExpanded"] = 16] = "DOMPropertiesExpanded";
      Action2[Action2["ResizedViewInResponsiveMode"] = 17] = "ResizedViewInResponsiveMode";
      Action2[Action2["TimelinePageReloadStarted"] = 18] = "TimelinePageReloadStarted";
      Action2[Action2["ConnectToNodeJSFromFrontend"] = 19] = "ConnectToNodeJSFromFrontend";
      Action2[Action2["ConnectToNodeJSDirectly"] = 20] = "ConnectToNodeJSDirectly";
      Action2[Action2["CpuThrottlingEnabled"] = 21] = "CpuThrottlingEnabled";
      Action2[Action2["CpuProfileNodeFocused"] = 22] = "CpuProfileNodeFocused";
      Action2[Action2["CpuProfileNodeExcluded"] = 23] = "CpuProfileNodeExcluded";
      Action2[Action2["SelectFileFromFilePicker"] = 24] = "SelectFileFromFilePicker";
      Action2[Action2["SelectCommandFromCommandMenu"] = 25] = "SelectCommandFromCommandMenu";
      Action2[Action2["ChangeInspectedNodeInElementsPanel"] = 26] = "ChangeInspectedNodeInElementsPanel";
      Action2[Action2["StyleRuleCopied"] = 27] = "StyleRuleCopied";
      Action2[Action2["CoverageStarted"] = 28] = "CoverageStarted";
      Action2[Action2["LighthouseStarted"] = 29] = "LighthouseStarted";
      Action2[Action2["LighthouseFinished"] = 30] = "LighthouseFinished";
      Action2[Action2["ShowedThirdPartyBadges"] = 31] = "ShowedThirdPartyBadges";
      Action2[Action2["LighthouseViewTrace"] = 32] = "LighthouseViewTrace";
      Action2[Action2["FilmStripStartedRecording"] = 33] = "FilmStripStartedRecording";
      Action2[Action2["CoverageReportFiltered"] = 34] = "CoverageReportFiltered";
      Action2[Action2["CoverageStartedPerBlock"] = 35] = "CoverageStartedPerBlock";
      Action2[Action2["SettingsOpenedFromGear-deprecated"] = 36] = "SettingsOpenedFromGear-deprecated";
      Action2[Action2["SettingsOpenedFromMenu-deprecated"] = 37] = "SettingsOpenedFromMenu-deprecated";
      Action2[Action2["SettingsOpenedFromCommandMenu-deprecated"] = 38] = "SettingsOpenedFromCommandMenu-deprecated";
      Action2[Action2["TabMovedToDrawer"] = 39] = "TabMovedToDrawer";
      Action2[Action2["TabMovedToMainPanel"] = 40] = "TabMovedToMainPanel";
      Action2[Action2["CaptureCssOverviewClicked"] = 41] = "CaptureCssOverviewClicked";
      Action2[Action2["VirtualAuthenticatorEnvironmentEnabled"] = 42] = "VirtualAuthenticatorEnvironmentEnabled";
      Action2[Action2["SourceOrderViewActivated"] = 43] = "SourceOrderViewActivated";
      Action2[Action2["UserShortcutAdded"] = 44] = "UserShortcutAdded";
      Action2[Action2["ShortcutRemoved"] = 45] = "ShortcutRemoved";
      Action2[Action2["ShortcutModified"] = 46] = "ShortcutModified";
      Action2[Action2["CustomPropertyLinkClicked"] = 47] = "CustomPropertyLinkClicked";
      Action2[Action2["CustomPropertyEdited"] = 48] = "CustomPropertyEdited";
      Action2[Action2["ServiceWorkerNetworkRequestClicked"] = 49] = "ServiceWorkerNetworkRequestClicked";
      Action2[Action2["ServiceWorkerNetworkRequestClosedQuickly"] = 50] = "ServiceWorkerNetworkRequestClosedQuickly";
      Action2[Action2["NetworkPanelServiceWorkerRespondWith"] = 51] = "NetworkPanelServiceWorkerRespondWith";
      Action2[Action2["NetworkPanelCopyValue"] = 52] = "NetworkPanelCopyValue";
      Action2[Action2["ConsoleSidebarOpened"] = 53] = "ConsoleSidebarOpened";
      Action2[Action2["PerfPanelTraceImported"] = 54] = "PerfPanelTraceImported";
      Action2[Action2["PerfPanelTraceExported"] = 55] = "PerfPanelTraceExported";
      Action2[Action2["StackFrameRestarted"] = 56] = "StackFrameRestarted";
      Action2[Action2["CaptureTestProtocolClicked"] = 57] = "CaptureTestProtocolClicked";
      Action2[Action2["BreakpointRemovedFromRemoveButton"] = 58] = "BreakpointRemovedFromRemoveButton";
      Action2[Action2["BreakpointGroupExpandedStateChanged"] = 59] = "BreakpointGroupExpandedStateChanged";
      Action2[Action2["HeaderOverrideFileCreated"] = 60] = "HeaderOverrideFileCreated";
      Action2[Action2["HeaderOverrideEnableEditingClicked"] = 61] = "HeaderOverrideEnableEditingClicked";
      Action2[Action2["HeaderOverrideHeaderAdded"] = 62] = "HeaderOverrideHeaderAdded";
      Action2[Action2["HeaderOverrideHeaderEdited"] = 63] = "HeaderOverrideHeaderEdited";
      Action2[Action2["HeaderOverrideHeaderRemoved"] = 64] = "HeaderOverrideHeaderRemoved";
      Action2[Action2["HeaderOverrideHeadersFileEdited"] = 65] = "HeaderOverrideHeadersFileEdited";
      Action2[Action2["PersistenceNetworkOverridesEnabled"] = 66] = "PersistenceNetworkOverridesEnabled";
      Action2[Action2["PersistenceNetworkOverridesDisabled"] = 67] = "PersistenceNetworkOverridesDisabled";
      Action2[Action2["BreakpointRemovedFromContextMenu"] = 68] = "BreakpointRemovedFromContextMenu";
      Action2[Action2["BreakpointsInFileRemovedFromRemoveButton"] = 69] = "BreakpointsInFileRemovedFromRemoveButton";
      Action2[Action2["BreakpointsInFileRemovedFromContextMenu"] = 70] = "BreakpointsInFileRemovedFromContextMenu";
      Action2[Action2["BreakpointsInFileCheckboxToggled"] = 71] = "BreakpointsInFileCheckboxToggled";
      Action2[Action2["BreakpointsInFileEnabledDisabledFromContextMenu"] = 72] = "BreakpointsInFileEnabledDisabledFromContextMenu";
      Action2[Action2["BreakpointConditionEditedFromSidebar"] = 73] = "BreakpointConditionEditedFromSidebar";
      Action2[Action2["WorkspaceTabAddFolder"] = 74] = "WorkspaceTabAddFolder";
      Action2[Action2["WorkspaceTabRemoveFolder"] = 75] = "WorkspaceTabRemoveFolder";
      Action2[Action2["OverrideTabAddFolder"] = 76] = "OverrideTabAddFolder";
      Action2[Action2["OverrideTabRemoveFolder"] = 77] = "OverrideTabRemoveFolder";
      Action2[Action2["WorkspaceSourceSelected"] = 78] = "WorkspaceSourceSelected";
      Action2[Action2["OverridesSourceSelected"] = 79] = "OverridesSourceSelected";
      Action2[Action2["StyleSheetInitiatorLinkClicked"] = 80] = "StyleSheetInitiatorLinkClicked";
      Action2[Action2["BreakpointRemovedFromGutterContextMenu"] = 81] = "BreakpointRemovedFromGutterContextMenu";
      Action2[Action2["BreakpointRemovedFromGutterToggle"] = 82] = "BreakpointRemovedFromGutterToggle";
      Action2[Action2["StylePropertyInsideKeyframeEdited"] = 83] = "StylePropertyInsideKeyframeEdited";
      Action2[Action2["OverrideContentFromSourcesContextMenu"] = 84] = "OverrideContentFromSourcesContextMenu";
      Action2[Action2["OverrideContentFromNetworkContextMenu"] = 85] = "OverrideContentFromNetworkContextMenu";
      Action2[Action2["OverrideScript"] = 86] = "OverrideScript";
      Action2[Action2["OverrideStyleSheet"] = 87] = "OverrideStyleSheet";
      Action2[Action2["OverrideDocument"] = 88] = "OverrideDocument";
      Action2[Action2["OverrideFetchXHR"] = 89] = "OverrideFetchXHR";
      Action2[Action2["OverrideImage"] = 90] = "OverrideImage";
      Action2[Action2["OverrideFont"] = 91] = "OverrideFont";
      Action2[Action2["OverrideContentContextMenuSetup"] = 92] = "OverrideContentContextMenuSetup";
      Action2[Action2["OverrideContentContextMenuAbandonSetup"] = 93] = "OverrideContentContextMenuAbandonSetup";
      Action2[Action2["OverrideContentContextMenuActivateDisabled"] = 94] = "OverrideContentContextMenuActivateDisabled";
      Action2[Action2["OverrideContentContextMenuOpenExistingFile"] = 95] = "OverrideContentContextMenuOpenExistingFile";
      Action2[Action2["OverrideContentContextMenuSaveNewFile"] = 96] = "OverrideContentContextMenuSaveNewFile";
      Action2[Action2["ShowAllOverridesFromSourcesContextMenu"] = 97] = "ShowAllOverridesFromSourcesContextMenu";
      Action2[Action2["ShowAllOverridesFromNetworkContextMenu"] = 98] = "ShowAllOverridesFromNetworkContextMenu";
      Action2[Action2["AnimationGroupsCleared"] = 99] = "AnimationGroupsCleared";
      Action2[Action2["AnimationsPaused"] = 100] = "AnimationsPaused";
      Action2[Action2["AnimationsResumed"] = 101] = "AnimationsResumed";
      Action2[Action2["AnimatedNodeDescriptionClicked"] = 102] = "AnimatedNodeDescriptionClicked";
      Action2[Action2["AnimationGroupScrubbed"] = 103] = "AnimationGroupScrubbed";
      Action2[Action2["AnimationGroupReplayed"] = 104] = "AnimationGroupReplayed";
      Action2[Action2["OverrideTabDeleteFolderContextMenu"] = 105] = "OverrideTabDeleteFolderContextMenu";
      Action2[Action2["WorkspaceDropFolder"] = 107] = "WorkspaceDropFolder";
      Action2[Action2["WorkspaceSelectFolder"] = 108] = "WorkspaceSelectFolder";
      Action2[Action2["OverrideContentContextMenuSourceMappedWarning"] = 109] = "OverrideContentContextMenuSourceMappedWarning";
      Action2[Action2["OverrideContentContextMenuRedirectToDeployed"] = 110] = "OverrideContentContextMenuRedirectToDeployed";
      Action2[Action2["NewStyleRuleAdded"] = 111] = "NewStyleRuleAdded";
      Action2[Action2["TraceExpanded"] = 112] = "TraceExpanded";
      Action2[Action2["InsightConsoleMessageShown"] = 113] = "InsightConsoleMessageShown";
      Action2[Action2["InsightRequestedViaContextMenu"] = 114] = "InsightRequestedViaContextMenu";
      Action2[Action2["InsightRequestedViaHoverButton"] = 115] = "InsightRequestedViaHoverButton";
      Action2[Action2["InsightRatedPositive"] = 117] = "InsightRatedPositive";
      Action2[Action2["InsightRatedNegative"] = 118] = "InsightRatedNegative";
      Action2[Action2["InsightClosed"] = 119] = "InsightClosed";
      Action2[Action2["InsightErrored"] = 120] = "InsightErrored";
      Action2[Action2["InsightHoverButtonShown"] = 121] = "InsightHoverButtonShown";
      Action2[Action2["SelfXssWarningConsoleMessageShown"] = 122] = "SelfXssWarningConsoleMessageShown";
      Action2[Action2["SelfXssWarningDialogShown"] = 123] = "SelfXssWarningDialogShown";
      Action2[Action2["SelfXssAllowPastingInConsole"] = 124] = "SelfXssAllowPastingInConsole";
      Action2[Action2["SelfXssAllowPastingInDialog"] = 125] = "SelfXssAllowPastingInDialog";
      Action2[Action2["ToggleEmulateFocusedPageFromStylesPaneOn"] = 126] = "ToggleEmulateFocusedPageFromStylesPaneOn";
      Action2[Action2["ToggleEmulateFocusedPageFromStylesPaneOff"] = 127] = "ToggleEmulateFocusedPageFromStylesPaneOff";
      Action2[Action2["ToggleEmulateFocusedPageFromRenderingTab"] = 128] = "ToggleEmulateFocusedPageFromRenderingTab";
      Action2[Action2["ToggleEmulateFocusedPageFromCommandMenu"] = 129] = "ToggleEmulateFocusedPageFromCommandMenu";
      Action2[Action2["InsightGenerated"] = 130] = "InsightGenerated";
      Action2[Action2["InsightErroredApi"] = 131] = "InsightErroredApi";
      Action2[Action2["InsightErroredMarkdown"] = 132] = "InsightErroredMarkdown";
      Action2[Action2["ToggleShowWebVitals"] = 133] = "ToggleShowWebVitals";
      Action2[Action2["InsightErroredPermissionDenied"] = 134] = "InsightErroredPermissionDenied";
      Action2[Action2["InsightErroredCannotSend"] = 135] = "InsightErroredCannotSend";
      Action2[Action2["InsightErroredRequestFailed"] = 136] = "InsightErroredRequestFailed";
      Action2[Action2["InsightErroredCannotParseChunk"] = 137] = "InsightErroredCannotParseChunk";
      Action2[Action2["InsightErroredUnknownChunk"] = 138] = "InsightErroredUnknownChunk";
      Action2[Action2["InsightErroredOther"] = 139] = "InsightErroredOther";
      Action2[Action2["AutofillReceived"] = 140] = "AutofillReceived";
      Action2[Action2["AutofillReceivedAndTabAutoOpened"] = 141] = "AutofillReceivedAndTabAutoOpened";
      Action2[Action2["AnimationGroupSelected"] = 142] = "AnimationGroupSelected";
      Action2[Action2["ScrollDrivenAnimationGroupSelected"] = 143] = "ScrollDrivenAnimationGroupSelected";
      Action2[Action2["ScrollDrivenAnimationGroupScrubbed"] = 144] = "ScrollDrivenAnimationGroupScrubbed";
      Action2[Action2["AiAssistanceOpenedFromElementsPanel"] = 145] = "AiAssistanceOpenedFromElementsPanel";
      Action2[Action2["AiAssistanceOpenedFromStylesTab"] = 146] = "AiAssistanceOpenedFromStylesTab";
      Action2[Action2["ConsoleFilterByContext"] = 147] = "ConsoleFilterByContext";
      Action2[Action2["ConsoleFilterBySource"] = 148] = "ConsoleFilterBySource";
      Action2[Action2["ConsoleFilterByUrl"] = 149] = "ConsoleFilterByUrl";
      Action2[Action2["InsightConsentReminderShown"] = 150] = "InsightConsentReminderShown";
      Action2[Action2["InsightConsentReminderCanceled"] = 151] = "InsightConsentReminderCanceled";
      Action2[Action2["InsightConsentReminderConfirmed"] = 152] = "InsightConsentReminderConfirmed";
      Action2[Action2["InsightsOnboardingShown"] = 153] = "InsightsOnboardingShown";
      Action2[Action2["InsightsOnboardingCanceledOnPage1"] = 154] = "InsightsOnboardingCanceledOnPage1";
      Action2[Action2["InsightsOnboardingCanceledOnPage2"] = 155] = "InsightsOnboardingCanceledOnPage2";
      Action2[Action2["InsightsOnboardingConfirmed"] = 156] = "InsightsOnboardingConfirmed";
      Action2[Action2["InsightsOnboardingNextPage"] = 157] = "InsightsOnboardingNextPage";
      Action2[Action2["InsightsOnboardingPrevPage"] = 158] = "InsightsOnboardingPrevPage";
      Action2[Action2["InsightsOnboardingFeatureDisabled"] = 159] = "InsightsOnboardingFeatureDisabled";
      Action2[Action2["InsightsOptInTeaserShown"] = 160] = "InsightsOptInTeaserShown";
      Action2[Action2["InsightsOptInTeaserSettingsLinkClicked"] = 161] = "InsightsOptInTeaserSettingsLinkClicked";
      Action2[Action2["InsightsOptInTeaserConfirmedInSettings"] = 162] = "InsightsOptInTeaserConfirmedInSettings";
      Action2[Action2["InsightsReminderTeaserShown"] = 163] = "InsightsReminderTeaserShown";
      Action2[Action2["InsightsReminderTeaserConfirmed"] = 164] = "InsightsReminderTeaserConfirmed";
      Action2[Action2["InsightsReminderTeaserCanceled"] = 165] = "InsightsReminderTeaserCanceled";
      Action2[Action2["InsightsReminderTeaserSettingsLinkClicked"] = 166] = "InsightsReminderTeaserSettingsLinkClicked";
      Action2[Action2["InsightsReminderTeaserAbortedInSettings"] = 167] = "InsightsReminderTeaserAbortedInSettings";
      Action2[Action2["GeneratingInsightWithoutDisclaimer"] = 168] = "GeneratingInsightWithoutDisclaimer";
      Action2[Action2["AiAssistanceOpenedFromElementsPanelFloatingButton"] = 169] = "AiAssistanceOpenedFromElementsPanelFloatingButton";
      Action2[Action2["AiAssistanceOpenedFromNetworkPanel"] = 170] = "AiAssistanceOpenedFromNetworkPanel";
      Action2[Action2["AiAssistanceOpenedFromSourcesPanel"] = 171] = "AiAssistanceOpenedFromSourcesPanel";
      Action2[Action2["AiAssistanceOpenedFromSourcesPanelFloatingButton"] = 172] = "AiAssistanceOpenedFromSourcesPanelFloatingButton";
      Action2[Action2["AiAssistanceOpenedFromPerformancePanelCallTree"] = 173] = "AiAssistanceOpenedFromPerformancePanelCallTree";
      Action2[Action2["AiAssistanceOpenedFromNetworkPanelFloatingButton"] = 174] = "AiAssistanceOpenedFromNetworkPanelFloatingButton";
      Action2[Action2["AiAssistancePanelOpened"] = 175] = "AiAssistancePanelOpened";
      Action2[Action2["AiAssistanceQuerySubmitted"] = 176] = "AiAssistanceQuerySubmitted";
      Action2[Action2["AiAssistanceAnswerReceived"] = 177] = "AiAssistanceAnswerReceived";
      Action2[Action2["AiAssistanceDynamicSuggestionClicked"] = 178] = "AiAssistanceDynamicSuggestionClicked";
      Action2[Action2["AiAssistanceSideEffectConfirmed"] = 179] = "AiAssistanceSideEffectConfirmed";
      Action2[Action2["AiAssistanceSideEffectRejected"] = 180] = "AiAssistanceSideEffectRejected";
      Action2[Action2["AiAssistanceError"] = 181] = "AiAssistanceError";
      Action2[Action2["AiCodeCompletionResponseServedFromCache"] = 184] = "AiCodeCompletionResponseServedFromCache";
      Action2[Action2["AiCodeCompletionRequestTriggered"] = 185] = "AiCodeCompletionRequestTriggered";
      Action2[Action2["AiCodeCompletionSuggestionDisplayed"] = 186] = "AiCodeCompletionSuggestionDisplayed";
      Action2[Action2["AiCodeCompletionSuggestionAccepted"] = 187] = "AiCodeCompletionSuggestionAccepted";
      Action2[Action2["AiCodeCompletionError"] = 188] = "AiCodeCompletionError";
      Action2[Action2["AttributeLinkClicked"] = 189] = "AttributeLinkClicked";
      Action2[Action2["InsightRequestedViaTeaser"] = 190] = "InsightRequestedViaTeaser";
      Action2[Action2["InsightTeaserGenerationStarted"] = 191] = "InsightTeaserGenerationStarted";
      Action2[Action2["InsightTeaserGenerationCompleted"] = 192] = "InsightTeaserGenerationCompleted";
      Action2[Action2["InsightTeaserGenerationAborted"] = 193] = "InsightTeaserGenerationAborted";
      Action2[Action2["InsightTeaserGenerationErrored"] = 194] = "InsightTeaserGenerationErrored";
      Action2[Action2["AiCodeGenerationSuggestionDisplayed"] = 195] = "AiCodeGenerationSuggestionDisplayed";
      Action2[Action2["AiCodeGenerationSuggestionAccepted"] = 196] = "AiCodeGenerationSuggestionAccepted";
      Action2[Action2["InsightTeaserModelDownloadStarted"] = 197] = "InsightTeaserModelDownloadStarted";
      Action2[Action2["InsightTeaserModelDownloadCompleted"] = 198] = "InsightTeaserModelDownloadCompleted";
      Action2[Action2["AiCodeGenerationError"] = 199] = "AiCodeGenerationError";
      Action2[Action2["AiCodeGenerationRequestTriggered"] = 200] = "AiCodeGenerationRequestTriggered";
      Action2[Action2["MAX_VALUE"] = 201] = "MAX_VALUE";
    })(Action || (Action = {}));
    (function(PanelCodes2) {
      PanelCodes2[PanelCodes2["elements"] = 1] = "elements";
      PanelCodes2[PanelCodes2["resources"] = 2] = "resources";
      PanelCodes2[PanelCodes2["network"] = 3] = "network";
      PanelCodes2[PanelCodes2["sources"] = 4] = "sources";
      PanelCodes2[PanelCodes2["timeline"] = 5] = "timeline";
      PanelCodes2[PanelCodes2["heap-profiler"] = 6] = "heap-profiler";
      PanelCodes2[PanelCodes2["console"] = 8] = "console";
      PanelCodes2[PanelCodes2["layers"] = 9] = "layers";
      PanelCodes2[PanelCodes2["console-view"] = 10] = "console-view";
      PanelCodes2[PanelCodes2["animations"] = 11] = "animations";
      PanelCodes2[PanelCodes2["network.config"] = 12] = "network.config";
      PanelCodes2[PanelCodes2["rendering"] = 13] = "rendering";
      PanelCodes2[PanelCodes2["sensors"] = 14] = "sensors";
      PanelCodes2[PanelCodes2["sources.search"] = 15] = "sources.search";
      PanelCodes2[PanelCodes2["security"] = 16] = "security";
      PanelCodes2[PanelCodes2["js-profiler"] = 17] = "js-profiler";
      PanelCodes2[PanelCodes2["lighthouse"] = 18] = "lighthouse";
      PanelCodes2[PanelCodes2["coverage"] = 19] = "coverage";
      PanelCodes2[PanelCodes2["protocol-monitor"] = 20] = "protocol-monitor";
      PanelCodes2[PanelCodes2["remote-devices"] = 21] = "remote-devices";
      PanelCodes2[PanelCodes2["web-audio"] = 22] = "web-audio";
      PanelCodes2[PanelCodes2["changes.changes"] = 23] = "changes.changes";
      PanelCodes2[PanelCodes2["performance.monitor"] = 24] = "performance.monitor";
      PanelCodes2[PanelCodes2["release-note"] = 25] = "release-note";
      PanelCodes2[PanelCodes2["live-heap-profile"] = 26] = "live-heap-profile";
      PanelCodes2[PanelCodes2["sources.quick"] = 27] = "sources.quick";
      PanelCodes2[PanelCodes2["network.blocked-urls"] = 28] = "network.blocked-urls";
      PanelCodes2[PanelCodes2["settings-preferences"] = 29] = "settings-preferences";
      PanelCodes2[PanelCodes2["settings-workspace"] = 30] = "settings-workspace";
      PanelCodes2[PanelCodes2["settings-experiments"] = 31] = "settings-experiments";
      PanelCodes2[PanelCodes2["settings-blackbox"] = 32] = "settings-blackbox";
      PanelCodes2[PanelCodes2["settings-devices"] = 33] = "settings-devices";
      PanelCodes2[PanelCodes2["settings-throttling-conditions"] = 34] = "settings-throttling-conditions";
      PanelCodes2[PanelCodes2["settings-emulation-locations"] = 35] = "settings-emulation-locations";
      PanelCodes2[PanelCodes2["settings-shortcuts"] = 36] = "settings-shortcuts";
      PanelCodes2[PanelCodes2["issues-pane"] = 37] = "issues-pane";
      PanelCodes2[PanelCodes2["settings-keybinds"] = 38] = "settings-keybinds";
      PanelCodes2[PanelCodes2["cssoverview"] = 39] = "cssoverview";
      PanelCodes2[PanelCodes2["chrome-recorder"] = 40] = "chrome-recorder";
      PanelCodes2[PanelCodes2["trust-tokens"] = 41] = "trust-tokens";
      PanelCodes2[PanelCodes2["reporting-api"] = 42] = "reporting-api";
      PanelCodes2[PanelCodes2["interest-groups"] = 43] = "interest-groups";
      PanelCodes2[PanelCodes2["back-forward-cache"] = 44] = "back-forward-cache";
      PanelCodes2[PanelCodes2["service-worker-cache"] = 45] = "service-worker-cache";
      PanelCodes2[PanelCodes2["background-service-background-fetch"] = 46] = "background-service-background-fetch";
      PanelCodes2[PanelCodes2["background-service-background-sync"] = 47] = "background-service-background-sync";
      PanelCodes2[PanelCodes2["background-service-push-messaging"] = 48] = "background-service-push-messaging";
      PanelCodes2[PanelCodes2["background-service-notifications"] = 49] = "background-service-notifications";
      PanelCodes2[PanelCodes2["background-service-payment-handler"] = 50] = "background-service-payment-handler";
      PanelCodes2[PanelCodes2["background-service-periodic-background-sync"] = 51] = "background-service-periodic-background-sync";
      PanelCodes2[PanelCodes2["service-workers"] = 52] = "service-workers";
      PanelCodes2[PanelCodes2["app-manifest"] = 53] = "app-manifest";
      PanelCodes2[PanelCodes2["storage"] = 54] = "storage";
      PanelCodes2[PanelCodes2["cookies"] = 55] = "cookies";
      PanelCodes2[PanelCodes2["frame-details"] = 56] = "frame-details";
      PanelCodes2[PanelCodes2["frame-resource"] = 57] = "frame-resource";
      PanelCodes2[PanelCodes2["frame-window"] = 58] = "frame-window";
      PanelCodes2[PanelCodes2["frame-worker"] = 59] = "frame-worker";
      PanelCodes2[PanelCodes2["dom-storage"] = 60] = "dom-storage";
      PanelCodes2[PanelCodes2["indexed-db"] = 61] = "indexed-db";
      PanelCodes2[PanelCodes2["web-sql"] = 62] = "web-sql";
      PanelCodes2[PanelCodes2["performance-insights"] = 63] = "performance-insights";
      PanelCodes2[PanelCodes2["preloading"] = 64] = "preloading";
      PanelCodes2[PanelCodes2["bounce-tracking-mitigations"] = 65] = "bounce-tracking-mitigations";
      PanelCodes2[PanelCodes2["developer-resources"] = 66] = "developer-resources";
      PanelCodes2[PanelCodes2["autofill-view"] = 67] = "autofill-view";
      PanelCodes2[PanelCodes2["freestyler"] = 68] = "freestyler";
      PanelCodes2[PanelCodes2["MAX_VALUE"] = 69] = "MAX_VALUE";
    })(PanelCodes || (PanelCodes = {}));
    (function(MediaTypes2) {
      MediaTypes2[MediaTypes2["Unknown"] = 0] = "Unknown";
      MediaTypes2[MediaTypes2["text/css"] = 2] = "text/css";
      MediaTypes2[MediaTypes2["text/html"] = 3] = "text/html";
      MediaTypes2[MediaTypes2["application/xml"] = 4] = "application/xml";
      MediaTypes2[MediaTypes2["application/wasm"] = 5] = "application/wasm";
      MediaTypes2[MediaTypes2["application/manifest+json"] = 6] = "application/manifest+json";
      MediaTypes2[MediaTypes2["application/x-aspx"] = 7] = "application/x-aspx";
      MediaTypes2[MediaTypes2["application/jsp"] = 8] = "application/jsp";
      MediaTypes2[MediaTypes2["text/x-c++src"] = 9] = "text/x-c++src";
      MediaTypes2[MediaTypes2["text/x-coffeescript"] = 10] = "text/x-coffeescript";
      MediaTypes2[MediaTypes2["application/vnd.dart"] = 11] = "application/vnd.dart";
      MediaTypes2[MediaTypes2["text/typescript"] = 12] = "text/typescript";
      MediaTypes2[MediaTypes2["text/typescript-jsx"] = 13] = "text/typescript-jsx";
      MediaTypes2[MediaTypes2["application/json"] = 14] = "application/json";
      MediaTypes2[MediaTypes2["text/x-csharp"] = 15] = "text/x-csharp";
      MediaTypes2[MediaTypes2["text/x-java"] = 16] = "text/x-java";
      MediaTypes2[MediaTypes2["text/x-less"] = 17] = "text/x-less";
      MediaTypes2[MediaTypes2["application/x-httpd-php"] = 18] = "application/x-httpd-php";
      MediaTypes2[MediaTypes2["text/x-python"] = 19] = "text/x-python";
      MediaTypes2[MediaTypes2["text/x-sh"] = 20] = "text/x-sh";
      MediaTypes2[MediaTypes2["text/x-gss"] = 21] = "text/x-gss";
      MediaTypes2[MediaTypes2["text/x-sass"] = 22] = "text/x-sass";
      MediaTypes2[MediaTypes2["text/x-scss"] = 23] = "text/x-scss";
      MediaTypes2[MediaTypes2["text/markdown"] = 24] = "text/markdown";
      MediaTypes2[MediaTypes2["text/x-clojure"] = 25] = "text/x-clojure";
      MediaTypes2[MediaTypes2["text/jsx"] = 26] = "text/jsx";
      MediaTypes2[MediaTypes2["text/x-go"] = 27] = "text/x-go";
      MediaTypes2[MediaTypes2["text/x-kotlin"] = 28] = "text/x-kotlin";
      MediaTypes2[MediaTypes2["text/x-scala"] = 29] = "text/x-scala";
      MediaTypes2[MediaTypes2["text/x.svelte"] = 30] = "text/x.svelte";
      MediaTypes2[MediaTypes2["text/javascript+plain"] = 31] = "text/javascript+plain";
      MediaTypes2[MediaTypes2["text/javascript+minified"] = 32] = "text/javascript+minified";
      MediaTypes2[MediaTypes2["text/javascript+sourcemapped"] = 33] = "text/javascript+sourcemapped";
      MediaTypes2[MediaTypes2["text/x.angular"] = 34] = "text/x.angular";
      MediaTypes2[MediaTypes2["text/x.vue"] = 35] = "text/x.vue";
      MediaTypes2[MediaTypes2["text/javascript+snippet"] = 36] = "text/javascript+snippet";
      MediaTypes2[MediaTypes2["text/javascript+eval"] = 37] = "text/javascript+eval";
      MediaTypes2[MediaTypes2["MAX_VALUE"] = 38] = "MAX_VALUE";
    })(MediaTypes || (MediaTypes = {}));
    (function(KeybindSetSettings2) {
      KeybindSetSettings2[KeybindSetSettings2["devToolsDefault"] = 0] = "devToolsDefault";
      KeybindSetSettings2[KeybindSetSettings2["vsCode"] = 1] = "vsCode";
      KeybindSetSettings2[KeybindSetSettings2["MAX_VALUE"] = 2] = "MAX_VALUE";
    })(KeybindSetSettings || (KeybindSetSettings = {}));
    (function(KeyboardShortcutAction2) {
      KeyboardShortcutAction2[KeyboardShortcutAction2["OtherShortcut"] = 0] = "OtherShortcut";
      KeyboardShortcutAction2[KeyboardShortcutAction2["quick-open.show-command-menu"] = 1] = "quick-open.show-command-menu";
      KeyboardShortcutAction2[KeyboardShortcutAction2["console.clear"] = 2] = "console.clear";
      KeyboardShortcutAction2[KeyboardShortcutAction2["console.toggle"] = 3] = "console.toggle";
      KeyboardShortcutAction2[KeyboardShortcutAction2["debugger.step"] = 4] = "debugger.step";
      KeyboardShortcutAction2[KeyboardShortcutAction2["debugger.step-into"] = 5] = "debugger.step-into";
      KeyboardShortcutAction2[KeyboardShortcutAction2["debugger.step-out"] = 6] = "debugger.step-out";
      KeyboardShortcutAction2[KeyboardShortcutAction2["debugger.step-over"] = 7] = "debugger.step-over";
      KeyboardShortcutAction2[KeyboardShortcutAction2["debugger.toggle-breakpoint"] = 8] = "debugger.toggle-breakpoint";
      KeyboardShortcutAction2[KeyboardShortcutAction2["debugger.toggle-breakpoint-enabled"] = 9] = "debugger.toggle-breakpoint-enabled";
      KeyboardShortcutAction2[KeyboardShortcutAction2["debugger.toggle-pause"] = 10] = "debugger.toggle-pause";
      KeyboardShortcutAction2[KeyboardShortcutAction2["elements.edit-as-html"] = 11] = "elements.edit-as-html";
      KeyboardShortcutAction2[KeyboardShortcutAction2["elements.hide-element"] = 12] = "elements.hide-element";
      KeyboardShortcutAction2[KeyboardShortcutAction2["elements.redo"] = 13] = "elements.redo";
      KeyboardShortcutAction2[KeyboardShortcutAction2["elements.toggle-element-search"] = 14] = "elements.toggle-element-search";
      KeyboardShortcutAction2[KeyboardShortcutAction2["elements.undo"] = 15] = "elements.undo";
      KeyboardShortcutAction2[KeyboardShortcutAction2["main.search-in-panel.find"] = 16] = "main.search-in-panel.find";
      KeyboardShortcutAction2[KeyboardShortcutAction2["main.toggle-drawer"] = 17] = "main.toggle-drawer";
      KeyboardShortcutAction2[KeyboardShortcutAction2["network.hide-request-details"] = 18] = "network.hide-request-details";
      KeyboardShortcutAction2[KeyboardShortcutAction2["network.search"] = 19] = "network.search";
      KeyboardShortcutAction2[KeyboardShortcutAction2["network.toggle-recording"] = 20] = "network.toggle-recording";
      KeyboardShortcutAction2[KeyboardShortcutAction2["quick-open.show"] = 21] = "quick-open.show";
      KeyboardShortcutAction2[KeyboardShortcutAction2["settings.show"] = 22] = "settings.show";
      KeyboardShortcutAction2[KeyboardShortcutAction2["sources.search"] = 23] = "sources.search";
      KeyboardShortcutAction2[KeyboardShortcutAction2["background-service.toggle-recording"] = 24] = "background-service.toggle-recording";
      KeyboardShortcutAction2[KeyboardShortcutAction2["components.collect-garbage"] = 25] = "components.collect-garbage";
      KeyboardShortcutAction2[KeyboardShortcutAction2["console.clear.history"] = 26] = "console.clear.history";
      KeyboardShortcutAction2[KeyboardShortcutAction2["console.create-pin"] = 27] = "console.create-pin";
      KeyboardShortcutAction2[KeyboardShortcutAction2["coverage.start-with-reload"] = 28] = "coverage.start-with-reload";
      KeyboardShortcutAction2[KeyboardShortcutAction2["coverage.toggle-recording"] = 29] = "coverage.toggle-recording";
      KeyboardShortcutAction2[KeyboardShortcutAction2["debugger.breakpoint-input-window"] = 30] = "debugger.breakpoint-input-window";
      KeyboardShortcutAction2[KeyboardShortcutAction2["debugger.evaluate-selection"] = 31] = "debugger.evaluate-selection";
      KeyboardShortcutAction2[KeyboardShortcutAction2["debugger.next-call-frame"] = 32] = "debugger.next-call-frame";
      KeyboardShortcutAction2[KeyboardShortcutAction2["debugger.previous-call-frame"] = 33] = "debugger.previous-call-frame";
      KeyboardShortcutAction2[KeyboardShortcutAction2["debugger.run-snippet"] = 34] = "debugger.run-snippet";
      KeyboardShortcutAction2[KeyboardShortcutAction2["debugger.toggle-breakpoints-active"] = 35] = "debugger.toggle-breakpoints-active";
      KeyboardShortcutAction2[KeyboardShortcutAction2["elements.capture-area-screenshot"] = 36] = "elements.capture-area-screenshot";
      KeyboardShortcutAction2[KeyboardShortcutAction2["emulation.capture-full-height-screenshot"] = 37] = "emulation.capture-full-height-screenshot";
      KeyboardShortcutAction2[KeyboardShortcutAction2["emulation.capture-node-screenshot"] = 38] = "emulation.capture-node-screenshot";
      KeyboardShortcutAction2[KeyboardShortcutAction2["emulation.capture-screenshot"] = 39] = "emulation.capture-screenshot";
      KeyboardShortcutAction2[KeyboardShortcutAction2["emulation.show-sensors"] = 40] = "emulation.show-sensors";
      KeyboardShortcutAction2[KeyboardShortcutAction2["emulation.toggle-device-mode"] = 41] = "emulation.toggle-device-mode";
      KeyboardShortcutAction2[KeyboardShortcutAction2["help.release-notes"] = 42] = "help.release-notes";
      KeyboardShortcutAction2[KeyboardShortcutAction2["help.report-issue"] = 43] = "help.report-issue";
      KeyboardShortcutAction2[KeyboardShortcutAction2["input.start-replaying"] = 44] = "input.start-replaying";
      KeyboardShortcutAction2[KeyboardShortcutAction2["input.toggle-pause"] = 45] = "input.toggle-pause";
      KeyboardShortcutAction2[KeyboardShortcutAction2["input.toggle-recording"] = 46] = "input.toggle-recording";
      KeyboardShortcutAction2[KeyboardShortcutAction2["inspector-main.focus-debuggee"] = 47] = "inspector-main.focus-debuggee";
      KeyboardShortcutAction2[KeyboardShortcutAction2["inspector-main.hard-reload"] = 48] = "inspector-main.hard-reload";
      KeyboardShortcutAction2[KeyboardShortcutAction2["inspector-main.reload"] = 49] = "inspector-main.reload";
      KeyboardShortcutAction2[KeyboardShortcutAction2["live-heap-profile.start-with-reload"] = 50] = "live-heap-profile.start-with-reload";
      KeyboardShortcutAction2[KeyboardShortcutAction2["live-heap-profile.toggle-recording"] = 51] = "live-heap-profile.toggle-recording";
      KeyboardShortcutAction2[KeyboardShortcutAction2["main.debug-reload"] = 52] = "main.debug-reload";
      KeyboardShortcutAction2[KeyboardShortcutAction2["main.next-tab"] = 53] = "main.next-tab";
      KeyboardShortcutAction2[KeyboardShortcutAction2["main.previous-tab"] = 54] = "main.previous-tab";
      KeyboardShortcutAction2[KeyboardShortcutAction2["main.search-in-panel.cancel"] = 55] = "main.search-in-panel.cancel";
      KeyboardShortcutAction2[KeyboardShortcutAction2["main.search-in-panel.find-next"] = 56] = "main.search-in-panel.find-next";
      KeyboardShortcutAction2[KeyboardShortcutAction2["main.search-in-panel.find-previous"] = 57] = "main.search-in-panel.find-previous";
      KeyboardShortcutAction2[KeyboardShortcutAction2["main.toggle-dock"] = 58] = "main.toggle-dock";
      KeyboardShortcutAction2[KeyboardShortcutAction2["main.zoom-in"] = 59] = "main.zoom-in";
      KeyboardShortcutAction2[KeyboardShortcutAction2["main.zoom-out"] = 60] = "main.zoom-out";
      KeyboardShortcutAction2[KeyboardShortcutAction2["main.zoom-reset"] = 61] = "main.zoom-reset";
      KeyboardShortcutAction2[KeyboardShortcutAction2["network-conditions.network-low-end-mobile"] = 62] = "network-conditions.network-low-end-mobile";
      KeyboardShortcutAction2[KeyboardShortcutAction2["network-conditions.network-mid-tier-mobile"] = 63] = "network-conditions.network-mid-tier-mobile";
      KeyboardShortcutAction2[KeyboardShortcutAction2["network-conditions.network-offline"] = 64] = "network-conditions.network-offline";
      KeyboardShortcutAction2[KeyboardShortcutAction2["network-conditions.network-online"] = 65] = "network-conditions.network-online";
      KeyboardShortcutAction2[KeyboardShortcutAction2["profiler.heap-toggle-recording"] = 66] = "profiler.heap-toggle-recording";
      KeyboardShortcutAction2[KeyboardShortcutAction2["profiler.js-toggle-recording"] = 67] = "profiler.js-toggle-recording";
      KeyboardShortcutAction2[KeyboardShortcutAction2["resources.clear"] = 68] = "resources.clear";
      KeyboardShortcutAction2[KeyboardShortcutAction2["settings.documentation"] = 69] = "settings.documentation";
      KeyboardShortcutAction2[KeyboardShortcutAction2["settings.shortcuts"] = 70] = "settings.shortcuts";
      KeyboardShortcutAction2[KeyboardShortcutAction2["sources.add-folder-to-workspace"] = 71] = "sources.add-folder-to-workspace";
      KeyboardShortcutAction2[KeyboardShortcutAction2["sources.add-to-watch"] = 72] = "sources.add-to-watch";
      KeyboardShortcutAction2[KeyboardShortcutAction2["sources.close-all"] = 73] = "sources.close-all";
      KeyboardShortcutAction2[KeyboardShortcutAction2["sources.close-editor-tab"] = 74] = "sources.close-editor-tab";
      KeyboardShortcutAction2[KeyboardShortcutAction2["sources.create-snippet"] = 75] = "sources.create-snippet";
      KeyboardShortcutAction2[KeyboardShortcutAction2["sources.go-to-line"] = 76] = "sources.go-to-line";
      KeyboardShortcutAction2[KeyboardShortcutAction2["sources.go-to-member"] = 77] = "sources.go-to-member";
      KeyboardShortcutAction2[KeyboardShortcutAction2["sources.jump-to-next-location"] = 78] = "sources.jump-to-next-location";
      KeyboardShortcutAction2[KeyboardShortcutAction2["sources.jump-to-previous-location"] = 79] = "sources.jump-to-previous-location";
      KeyboardShortcutAction2[KeyboardShortcutAction2["sources.rename"] = 80] = "sources.rename";
      KeyboardShortcutAction2[KeyboardShortcutAction2["sources.save"] = 81] = "sources.save";
      KeyboardShortcutAction2[KeyboardShortcutAction2["sources.save-all"] = 82] = "sources.save-all";
      KeyboardShortcutAction2[KeyboardShortcutAction2["sources.switch-file"] = 83] = "sources.switch-file";
      KeyboardShortcutAction2[KeyboardShortcutAction2["timeline.jump-to-next-frame"] = 84] = "timeline.jump-to-next-frame";
      KeyboardShortcutAction2[KeyboardShortcutAction2["timeline.jump-to-previous-frame"] = 85] = "timeline.jump-to-previous-frame";
      KeyboardShortcutAction2[KeyboardShortcutAction2["timeline.load-from-file"] = 86] = "timeline.load-from-file";
      KeyboardShortcutAction2[KeyboardShortcutAction2["timeline.next-recording"] = 87] = "timeline.next-recording";
      KeyboardShortcutAction2[KeyboardShortcutAction2["timeline.previous-recording"] = 88] = "timeline.previous-recording";
      KeyboardShortcutAction2[KeyboardShortcutAction2["timeline.record-reload"] = 89] = "timeline.record-reload";
      KeyboardShortcutAction2[KeyboardShortcutAction2["timeline.save-to-file"] = 90] = "timeline.save-to-file";
      KeyboardShortcutAction2[KeyboardShortcutAction2["timeline.show-history"] = 91] = "timeline.show-history";
      KeyboardShortcutAction2[KeyboardShortcutAction2["timeline.toggle-recording"] = 92] = "timeline.toggle-recording";
      KeyboardShortcutAction2[KeyboardShortcutAction2["sources.increment-css"] = 93] = "sources.increment-css";
      KeyboardShortcutAction2[KeyboardShortcutAction2["sources.increment-css-by-ten"] = 94] = "sources.increment-css-by-ten";
      KeyboardShortcutAction2[KeyboardShortcutAction2["sources.decrement-css"] = 95] = "sources.decrement-css";
      KeyboardShortcutAction2[KeyboardShortcutAction2["sources.decrement-css-by-ten"] = 96] = "sources.decrement-css-by-ten";
      KeyboardShortcutAction2[KeyboardShortcutAction2["layers.reset-view"] = 97] = "layers.reset-view";
      KeyboardShortcutAction2[KeyboardShortcutAction2["layers.pan-mode"] = 98] = "layers.pan-mode";
      KeyboardShortcutAction2[KeyboardShortcutAction2["layers.rotate-mode"] = 99] = "layers.rotate-mode";
      KeyboardShortcutAction2[KeyboardShortcutAction2["layers.zoom-in"] = 100] = "layers.zoom-in";
      KeyboardShortcutAction2[KeyboardShortcutAction2["layers.zoom-out"] = 101] = "layers.zoom-out";
      KeyboardShortcutAction2[KeyboardShortcutAction2["layers.up"] = 102] = "layers.up";
      KeyboardShortcutAction2[KeyboardShortcutAction2["layers.down"] = 103] = "layers.down";
      KeyboardShortcutAction2[KeyboardShortcutAction2["layers.left"] = 104] = "layers.left";
      KeyboardShortcutAction2[KeyboardShortcutAction2["layers.right"] = 105] = "layers.right";
      KeyboardShortcutAction2[KeyboardShortcutAction2["help.report-translation-issue"] = 106] = "help.report-translation-issue";
      KeyboardShortcutAction2[KeyboardShortcutAction2["rendering.toggle-prefers-color-scheme"] = 107] = "rendering.toggle-prefers-color-scheme";
      KeyboardShortcutAction2[KeyboardShortcutAction2["chrome-recorder.start-recording"] = 108] = "chrome-recorder.start-recording";
      KeyboardShortcutAction2[KeyboardShortcutAction2["chrome-recorder.replay-recording"] = 109] = "chrome-recorder.replay-recording";
      KeyboardShortcutAction2[KeyboardShortcutAction2["chrome-recorder.toggle-code-view"] = 110] = "chrome-recorder.toggle-code-view";
      KeyboardShortcutAction2[KeyboardShortcutAction2["chrome-recorder.copy-recording-or-step"] = 111] = "chrome-recorder.copy-recording-or-step";
      KeyboardShortcutAction2[KeyboardShortcutAction2["elements.new-style-rule"] = 114] = "elements.new-style-rule";
      KeyboardShortcutAction2[KeyboardShortcutAction2["elements.refresh-event-listeners"] = 115] = "elements.refresh-event-listeners";
      KeyboardShortcutAction2[KeyboardShortcutAction2["coverage.clear"] = 116] = "coverage.clear";
      KeyboardShortcutAction2[KeyboardShortcutAction2["coverage.export"] = 117] = "coverage.export";
      KeyboardShortcutAction2[KeyboardShortcutAction2["timeline.dim-third-parties"] = 118] = "timeline.dim-third-parties";
      KeyboardShortcutAction2[KeyboardShortcutAction2["main.toggle-drawer-orientation"] = 119] = "main.toggle-drawer-orientation";
      KeyboardShortcutAction2[KeyboardShortcutAction2["MAX_VALUE"] = 120] = "MAX_VALUE";
    })(KeyboardShortcutAction || (KeyboardShortcutAction = {}));
    (function(DevtoolsExperiments2) {
      DevtoolsExperiments2[DevtoolsExperiments2["capture-node-creation-stacks"] = 1] = "capture-node-creation-stacks";
      DevtoolsExperiments2[DevtoolsExperiments2["live-heap-profile"] = 11] = "live-heap-profile";
      DevtoolsExperiments2[DevtoolsExperiments2["protocol-monitor"] = 13] = "protocol-monitor";
      DevtoolsExperiments2[DevtoolsExperiments2["sampling-heap-profiler-timeline"] = 17] = "sampling-heap-profiler-timeline";
      DevtoolsExperiments2[DevtoolsExperiments2["show-option-to-expose-internals-in-heap-snapshot"] = 18] = "show-option-to-expose-internals-in-heap-snapshot";
      DevtoolsExperiments2[DevtoolsExperiments2["timeline-invalidation-tracking"] = 26] = "timeline-invalidation-tracking";
      DevtoolsExperiments2[DevtoolsExperiments2["timeline-show-all-events"] = 27] = "timeline-show-all-events";
      DevtoolsExperiments2[DevtoolsExperiments2["timeline-v8-runtime-call-stats"] = 28] = "timeline-v8-runtime-call-stats";
      DevtoolsExperiments2[DevtoolsExperiments2["apca"] = 39] = "apca";
      DevtoolsExperiments2[DevtoolsExperiments2["font-editor"] = 41] = "font-editor";
      DevtoolsExperiments2[DevtoolsExperiments2["full-accessibility-tree"] = 42] = "full-accessibility-tree";
      DevtoolsExperiments2[DevtoolsExperiments2["contrast-issues"] = 44] = "contrast-issues";
      DevtoolsExperiments2[DevtoolsExperiments2["experimental-cookie-features"] = 45] = "experimental-cookie-features";
      DevtoolsExperiments2[DevtoolsExperiments2["instrumentation-breakpoints"] = 61] = "instrumentation-breakpoints";
      DevtoolsExperiments2[DevtoolsExperiments2["authored-deployed-grouping"] = 63] = "authored-deployed-grouping";
      DevtoolsExperiments2[DevtoolsExperiments2["just-my-code"] = 65] = "just-my-code";
      DevtoolsExperiments2[DevtoolsExperiments2["use-source-map-scopes"] = 76] = "use-source-map-scopes";
      DevtoolsExperiments2[DevtoolsExperiments2["timeline-show-postmessage-events"] = 86] = "timeline-show-postmessage-events";
      DevtoolsExperiments2[DevtoolsExperiments2["timeline-debug-mode"] = 93] = "timeline-debug-mode";
      DevtoolsExperiments2[DevtoolsExperiments2["durable-messages"] = 110] = "durable-messages";
      DevtoolsExperiments2[DevtoolsExperiments2["jpeg-xl"] = 111] = "jpeg-xl";
      DevtoolsExperiments2[DevtoolsExperiments2["MAX_VALUE"] = 112] = "MAX_VALUE";
    })(DevtoolsExperiments || (DevtoolsExperiments = {}));
    (function(IssueExpanded2) {
      IssueExpanded2[IssueExpanded2["CrossOriginEmbedderPolicy"] = 0] = "CrossOriginEmbedderPolicy";
      IssueExpanded2[IssueExpanded2["MixedContent"] = 1] = "MixedContent";
      IssueExpanded2[IssueExpanded2["SameSiteCookie"] = 2] = "SameSiteCookie";
      IssueExpanded2[IssueExpanded2["HeavyAd"] = 3] = "HeavyAd";
      IssueExpanded2[IssueExpanded2["ContentSecurityPolicy"] = 4] = "ContentSecurityPolicy";
      IssueExpanded2[IssueExpanded2["Other"] = 5] = "Other";
      IssueExpanded2[IssueExpanded2["Generic"] = 6] = "Generic";
      IssueExpanded2[IssueExpanded2["ThirdPartyPhaseoutCookie"] = 7] = "ThirdPartyPhaseoutCookie";
      IssueExpanded2[IssueExpanded2["GenericCookie"] = 8] = "GenericCookie";
      IssueExpanded2[IssueExpanded2["MAX_VALUE"] = 9] = "MAX_VALUE";
    })(IssueExpanded || (IssueExpanded = {}));
    (function(IssueResourceOpened2) {
      IssueResourceOpened2[IssueResourceOpened2["CrossOriginEmbedderPolicyRequest"] = 0] = "CrossOriginEmbedderPolicyRequest";
      IssueResourceOpened2[IssueResourceOpened2["CrossOriginEmbedderPolicyElement"] = 1] = "CrossOriginEmbedderPolicyElement";
      IssueResourceOpened2[IssueResourceOpened2["MixedContentRequest"] = 2] = "MixedContentRequest";
      IssueResourceOpened2[IssueResourceOpened2["SameSiteCookieCookie"] = 3] = "SameSiteCookieCookie";
      IssueResourceOpened2[IssueResourceOpened2["SameSiteCookieRequest"] = 4] = "SameSiteCookieRequest";
      IssueResourceOpened2[IssueResourceOpened2["HeavyAdElement"] = 5] = "HeavyAdElement";
      IssueResourceOpened2[IssueResourceOpened2["ContentSecurityPolicyDirective"] = 6] = "ContentSecurityPolicyDirective";
      IssueResourceOpened2[IssueResourceOpened2["ContentSecurityPolicyElement"] = 7] = "ContentSecurityPolicyElement";
      IssueResourceOpened2[IssueResourceOpened2["MAX_VALUE"] = 13] = "MAX_VALUE";
    })(IssueResourceOpened || (IssueResourceOpened = {}));
    (function(IssueCreated2) {
      IssueCreated2[IssueCreated2["MixedContentIssue"] = 0] = "MixedContentIssue";
      IssueCreated2[IssueCreated2["ContentSecurityPolicyIssue::kInlineViolation"] = 1] = "ContentSecurityPolicyIssue::kInlineViolation";
      IssueCreated2[IssueCreated2["ContentSecurityPolicyIssue::kEvalViolation"] = 2] = "ContentSecurityPolicyIssue::kEvalViolation";
      IssueCreated2[IssueCreated2["ContentSecurityPolicyIssue::kURLViolation"] = 3] = "ContentSecurityPolicyIssue::kURLViolation";
      IssueCreated2[IssueCreated2["ContentSecurityPolicyIssue::kTrustedTypesSinkViolation"] = 4] = "ContentSecurityPolicyIssue::kTrustedTypesSinkViolation";
      IssueCreated2[IssueCreated2["ContentSecurityPolicyIssue::kTrustedTypesPolicyViolation"] = 5] = "ContentSecurityPolicyIssue::kTrustedTypesPolicyViolation";
      IssueCreated2[IssueCreated2["HeavyAdIssue::NetworkTotalLimit"] = 6] = "HeavyAdIssue::NetworkTotalLimit";
      IssueCreated2[IssueCreated2["HeavyAdIssue::CpuTotalLimit"] = 7] = "HeavyAdIssue::CpuTotalLimit";
      IssueCreated2[IssueCreated2["HeavyAdIssue::CpuPeakLimit"] = 8] = "HeavyAdIssue::CpuPeakLimit";
      IssueCreated2[IssueCreated2["CrossOriginEmbedderPolicyIssue::CoepFrameResourceNeedsCoepHeader"] = 9] = "CrossOriginEmbedderPolicyIssue::CoepFrameResourceNeedsCoepHeader";
      IssueCreated2[IssueCreated2["CrossOriginEmbedderPolicyIssue::CoopSandboxedIFrameCannotNavigateToCoopPage"] = 10] = "CrossOriginEmbedderPolicyIssue::CoopSandboxedIFrameCannotNavigateToCoopPage";
      IssueCreated2[IssueCreated2["CrossOriginEmbedderPolicyIssue::CorpNotSameOrigin"] = 11] = "CrossOriginEmbedderPolicyIssue::CorpNotSameOrigin";
      IssueCreated2[IssueCreated2["CrossOriginEmbedderPolicyIssue::CorpNotSameOriginAfterDefaultedToSameOriginByCoep"] = 12] = "CrossOriginEmbedderPolicyIssue::CorpNotSameOriginAfterDefaultedToSameOriginByCoep";
      IssueCreated2[IssueCreated2["CrossOriginEmbedderPolicyIssue::CorpNotSameSite"] = 13] = "CrossOriginEmbedderPolicyIssue::CorpNotSameSite";
      IssueCreated2[IssueCreated2["CookieIssue::ExcludeSameSiteNoneInsecure::ReadCookie"] = 14] = "CookieIssue::ExcludeSameSiteNoneInsecure::ReadCookie";
      IssueCreated2[IssueCreated2["CookieIssue::ExcludeSameSiteNoneInsecure::SetCookie"] = 15] = "CookieIssue::ExcludeSameSiteNoneInsecure::SetCookie";
      IssueCreated2[IssueCreated2["CookieIssue::WarnSameSiteNoneInsecure::ReadCookie"] = 16] = "CookieIssue::WarnSameSiteNoneInsecure::ReadCookie";
      IssueCreated2[IssueCreated2["CookieIssue::WarnSameSiteNoneInsecure::SetCookie"] = 17] = "CookieIssue::WarnSameSiteNoneInsecure::SetCookie";
      IssueCreated2[IssueCreated2["CookieIssue::WarnSameSiteStrictLaxDowngradeStrict::Secure"] = 18] = "CookieIssue::WarnSameSiteStrictLaxDowngradeStrict::Secure";
      IssueCreated2[IssueCreated2["CookieIssue::WarnSameSiteStrictLaxDowngradeStrict::Insecure"] = 19] = "CookieIssue::WarnSameSiteStrictLaxDowngradeStrict::Insecure";
      IssueCreated2[IssueCreated2["CookieIssue::WarnCrossDowngrade::ReadCookie::Secure"] = 20] = "CookieIssue::WarnCrossDowngrade::ReadCookie::Secure";
      IssueCreated2[IssueCreated2["CookieIssue::WarnCrossDowngrade::ReadCookie::Insecure"] = 21] = "CookieIssue::WarnCrossDowngrade::ReadCookie::Insecure";
      IssueCreated2[IssueCreated2["CookieIssue::WarnCrossDowngrade::SetCookie::Secure"] = 22] = "CookieIssue::WarnCrossDowngrade::SetCookie::Secure";
      IssueCreated2[IssueCreated2["CookieIssue::WarnCrossDowngrade::SetCookie::Insecure"] = 23] = "CookieIssue::WarnCrossDowngrade::SetCookie::Insecure";
      IssueCreated2[IssueCreated2["CookieIssue::ExcludeNavigationContextDowngrade::Secure"] = 24] = "CookieIssue::ExcludeNavigationContextDowngrade::Secure";
      IssueCreated2[IssueCreated2["CookieIssue::ExcludeNavigationContextDowngrade::Insecure"] = 25] = "CookieIssue::ExcludeNavigationContextDowngrade::Insecure";
      IssueCreated2[IssueCreated2["CookieIssue::ExcludeContextDowngrade::ReadCookie::Secure"] = 26] = "CookieIssue::ExcludeContextDowngrade::ReadCookie::Secure";
      IssueCreated2[IssueCreated2["CookieIssue::ExcludeContextDowngrade::ReadCookie::Insecure"] = 27] = "CookieIssue::ExcludeContextDowngrade::ReadCookie::Insecure";
      IssueCreated2[IssueCreated2["CookieIssue::ExcludeContextDowngrade::SetCookie::Secure"] = 28] = "CookieIssue::ExcludeContextDowngrade::SetCookie::Secure";
      IssueCreated2[IssueCreated2["CookieIssue::ExcludeContextDowngrade::SetCookie::Insecure"] = 29] = "CookieIssue::ExcludeContextDowngrade::SetCookie::Insecure";
      IssueCreated2[IssueCreated2["CookieIssue::ExcludeSameSiteUnspecifiedTreatedAsLax::ReadCookie"] = 30] = "CookieIssue::ExcludeSameSiteUnspecifiedTreatedAsLax::ReadCookie";
      IssueCreated2[IssueCreated2["CookieIssue::ExcludeSameSiteUnspecifiedTreatedAsLax::SetCookie"] = 31] = "CookieIssue::ExcludeSameSiteUnspecifiedTreatedAsLax::SetCookie";
      IssueCreated2[IssueCreated2["CookieIssue::WarnSameSiteUnspecifiedLaxAllowUnsafe::ReadCookie"] = 32] = "CookieIssue::WarnSameSiteUnspecifiedLaxAllowUnsafe::ReadCookie";
      IssueCreated2[IssueCreated2["CookieIssue::WarnSameSiteUnspecifiedLaxAllowUnsafe::SetCookie"] = 33] = "CookieIssue::WarnSameSiteUnspecifiedLaxAllowUnsafe::SetCookie";
      IssueCreated2[IssueCreated2["CookieIssue::WarnSameSiteUnspecifiedCrossSiteContext::ReadCookie"] = 34] = "CookieIssue::WarnSameSiteUnspecifiedCrossSiteContext::ReadCookie";
      IssueCreated2[IssueCreated2["CookieIssue::WarnSameSiteUnspecifiedCrossSiteContext::SetCookie"] = 35] = "CookieIssue::WarnSameSiteUnspecifiedCrossSiteContext::SetCookie";
      IssueCreated2[IssueCreated2["SharedArrayBufferIssue::TransferIssue"] = 36] = "SharedArrayBufferIssue::TransferIssue";
      IssueCreated2[IssueCreated2["SharedArrayBufferIssue::CreationIssue"] = 37] = "SharedArrayBufferIssue::CreationIssue";
      IssueCreated2[IssueCreated2["LowTextContrastIssue"] = 41] = "LowTextContrastIssue";
      IssueCreated2[IssueCreated2["CorsIssue::InsecureLocalNetwork"] = 42] = "CorsIssue::InsecureLocalNetwork";
      IssueCreated2[IssueCreated2["CorsIssue::InvalidHeaders"] = 44] = "CorsIssue::InvalidHeaders";
      IssueCreated2[IssueCreated2["CorsIssue::WildcardOriginWithCredentials"] = 45] = "CorsIssue::WildcardOriginWithCredentials";
      IssueCreated2[IssueCreated2["CorsIssue::PreflightResponseInvalid"] = 46] = "CorsIssue::PreflightResponseInvalid";
      IssueCreated2[IssueCreated2["CorsIssue::OriginMismatch"] = 47] = "CorsIssue::OriginMismatch";
      IssueCreated2[IssueCreated2["CorsIssue::AllowCredentialsRequired"] = 48] = "CorsIssue::AllowCredentialsRequired";
      IssueCreated2[IssueCreated2["CorsIssue::MethodDisallowedByPreflightResponse"] = 49] = "CorsIssue::MethodDisallowedByPreflightResponse";
      IssueCreated2[IssueCreated2["CorsIssue::HeaderDisallowedByPreflightResponse"] = 50] = "CorsIssue::HeaderDisallowedByPreflightResponse";
      IssueCreated2[IssueCreated2["CorsIssue::RedirectContainsCredentials"] = 51] = "CorsIssue::RedirectContainsCredentials";
      IssueCreated2[IssueCreated2["CorsIssue::DisallowedByMode"] = 52] = "CorsIssue::DisallowedByMode";
      IssueCreated2[IssueCreated2["CorsIssue::CorsDisabledScheme"] = 53] = "CorsIssue::CorsDisabledScheme";
      IssueCreated2[IssueCreated2["CorsIssue::PreflightMissingAllowExternal"] = 54] = "CorsIssue::PreflightMissingAllowExternal";
      IssueCreated2[IssueCreated2["CorsIssue::PreflightInvalidAllowExternal"] = 55] = "CorsIssue::PreflightInvalidAllowExternal";
      IssueCreated2[IssueCreated2["CorsIssue::NoCorsRedirectModeNotFollow"] = 57] = "CorsIssue::NoCorsRedirectModeNotFollow";
      IssueCreated2[IssueCreated2["QuirksModeIssue::QuirksMode"] = 58] = "QuirksModeIssue::QuirksMode";
      IssueCreated2[IssueCreated2["QuirksModeIssue::LimitedQuirksMode"] = 59] = "QuirksModeIssue::LimitedQuirksMode";
      IssueCreated2[IssueCreated2["DeprecationIssue"] = 60] = "DeprecationIssue";
      IssueCreated2[IssueCreated2["ClientHintIssue::MetaTagAllowListInvalidOrigin"] = 61] = "ClientHintIssue::MetaTagAllowListInvalidOrigin";
      IssueCreated2[IssueCreated2["ClientHintIssue::MetaTagModifiedHTML"] = 62] = "ClientHintIssue::MetaTagModifiedHTML";
      IssueCreated2[IssueCreated2["GenericIssue::CrossOriginPortalPostMessageError"] = 64] = "GenericIssue::CrossOriginPortalPostMessageError";
      IssueCreated2[IssueCreated2["GenericIssue::FormLabelForNameError"] = 65] = "GenericIssue::FormLabelForNameError";
      IssueCreated2[IssueCreated2["GenericIssue::FormDuplicateIdForInputError"] = 66] = "GenericIssue::FormDuplicateIdForInputError";
      IssueCreated2[IssueCreated2["GenericIssue::FormInputWithNoLabelError"] = 67] = "GenericIssue::FormInputWithNoLabelError";
      IssueCreated2[IssueCreated2["GenericIssue::FormAutocompleteAttributeEmptyError"] = 68] = "GenericIssue::FormAutocompleteAttributeEmptyError";
      IssueCreated2[IssueCreated2["GenericIssue::FormEmptyIdAndNameAttributesForInputError"] = 69] = "GenericIssue::FormEmptyIdAndNameAttributesForInputError";
      IssueCreated2[IssueCreated2["GenericIssue::FormAriaLabelledByToNonExistingIdError"] = 70] = "GenericIssue::FormAriaLabelledByToNonExistingIdError";
      IssueCreated2[IssueCreated2["GenericIssue::FormInputAssignedAutocompleteValueToIdOrNameAttributeError"] = 71] = "GenericIssue::FormInputAssignedAutocompleteValueToIdOrNameAttributeError";
      IssueCreated2[IssueCreated2["GenericIssue::FormLabelHasNeitherForNorNestedInputError"] = 72] = "GenericIssue::FormLabelHasNeitherForNorNestedInputError";
      IssueCreated2[IssueCreated2["GenericIssue::FormLabelForMatchesNonExistingIdError"] = 73] = "GenericIssue::FormLabelForMatchesNonExistingIdError";
      IssueCreated2[IssueCreated2["GenericIssue::FormHasPasswordFieldWithoutUsernameFieldError"] = 74] = "GenericIssue::FormHasPasswordFieldWithoutUsernameFieldError";
      IssueCreated2[IssueCreated2["GenericIssue::FormInputHasWrongButWellIntendedAutocompleteValueError"] = 75] = "GenericIssue::FormInputHasWrongButWellIntendedAutocompleteValueError";
      IssueCreated2[IssueCreated2["StylesheetLoadingIssue::LateImportRule"] = 76] = "StylesheetLoadingIssue::LateImportRule";
      IssueCreated2[IssueCreated2["StylesheetLoadingIssue::RequestFailed"] = 77] = "StylesheetLoadingIssue::RequestFailed";
      IssueCreated2[IssueCreated2["CookieIssue::WarnThirdPartyPhaseout::ReadCookie"] = 82] = "CookieIssue::WarnThirdPartyPhaseout::ReadCookie";
      IssueCreated2[IssueCreated2["CookieIssue::WarnThirdPartyPhaseout::SetCookie"] = 83] = "CookieIssue::WarnThirdPartyPhaseout::SetCookie";
      IssueCreated2[IssueCreated2["CookieIssue::ExcludeThirdPartyPhaseout::ReadCookie"] = 84] = "CookieIssue::ExcludeThirdPartyPhaseout::ReadCookie";
      IssueCreated2[IssueCreated2["CookieIssue::ExcludeThirdPartyPhaseout::SetCookie"] = 85] = "CookieIssue::ExcludeThirdPartyPhaseout::SetCookie";
      IssueCreated2[IssueCreated2["ElementAccessibilityIssue::DisallowedSelectChild"] = 86] = "ElementAccessibilityIssue::DisallowedSelectChild";
      IssueCreated2[IssueCreated2["ElementAccessibilityIssue::DisallowedOptGroupChild"] = 87] = "ElementAccessibilityIssue::DisallowedOptGroupChild";
      IssueCreated2[IssueCreated2["ElementAccessibilityIssue::NonPhrasingContentOptionChild"] = 88] = "ElementAccessibilityIssue::NonPhrasingContentOptionChild";
      IssueCreated2[IssueCreated2["ElementAccessibilityIssue::InteractiveContentOptionChild"] = 89] = "ElementAccessibilityIssue::InteractiveContentOptionChild";
      IssueCreated2[IssueCreated2["ElementAccessibilityIssue::InteractiveContentLegendChild"] = 90] = "ElementAccessibilityIssue::InteractiveContentLegendChild";
      IssueCreated2[IssueCreated2["SRIMessageSignatureIssue::MissingSignatureHeader"] = 91] = "SRIMessageSignatureIssue::MissingSignatureHeader";
      IssueCreated2[IssueCreated2["SRIMessageSignatureIssue::MissingSignatureInputHeader"] = 92] = "SRIMessageSignatureIssue::MissingSignatureInputHeader";
      IssueCreated2[IssueCreated2["SRIMessageSignatureIssue::InvalidSignatureHeader"] = 93] = "SRIMessageSignatureIssue::InvalidSignatureHeader";
      IssueCreated2[IssueCreated2["SRIMessageSignatureIssue::InvalidSignatureInputHeader"] = 94] = "SRIMessageSignatureIssue::InvalidSignatureInputHeader";
      IssueCreated2[IssueCreated2["SRIMessageSignatureIssue::SignatureHeaderValueIsNotByteSequence"] = 95] = "SRIMessageSignatureIssue::SignatureHeaderValueIsNotByteSequence";
      IssueCreated2[IssueCreated2["SRIMessageSignatureIssue::SignatureHeaderValueIsParameterized"] = 96] = "SRIMessageSignatureIssue::SignatureHeaderValueIsParameterized";
      IssueCreated2[IssueCreated2["SRIMessageSignatureIssue::SignatureHeaderValueIsIncorrectLength"] = 97] = "SRIMessageSignatureIssue::SignatureHeaderValueIsIncorrectLength";
      IssueCreated2[IssueCreated2["SRIMessageSignatureIssue::SignatureInputHeaderMissingLabel"] = 98] = "SRIMessageSignatureIssue::SignatureInputHeaderMissingLabel";
      IssueCreated2[IssueCreated2["SRIMessageSignatureIssue::SignatureInputHeaderValueNotInnerList"] = 99] = "SRIMessageSignatureIssue::SignatureInputHeaderValueNotInnerList";
      IssueCreated2[IssueCreated2["SRIMessageSignatureIssue::SignatureInputHeaderValueMissingComponents"] = 100] = "SRIMessageSignatureIssue::SignatureInputHeaderValueMissingComponents";
      IssueCreated2[IssueCreated2["SRIMessageSignatureIssue::SignatureInputHeaderInvalidComponentType"] = 101] = "SRIMessageSignatureIssue::SignatureInputHeaderInvalidComponentType";
      IssueCreated2[IssueCreated2["SRIMessageSignatureIssue::SignatureInputHeaderInvalidComponentName"] = 102] = "SRIMessageSignatureIssue::SignatureInputHeaderInvalidComponentName";
      IssueCreated2[IssueCreated2["SRIMessageSignatureIssue::SignatureInputHeaderInvalidHeaderComponentParameter"] = 103] = "SRIMessageSignatureIssue::SignatureInputHeaderInvalidHeaderComponentParameter";
      IssueCreated2[IssueCreated2["SRIMessageSignatureIssue::SignatureInputHeaderInvalidDerivedComponentParameter"] = 104] = "SRIMessageSignatureIssue::SignatureInputHeaderInvalidDerivedComponentParameter";
      IssueCreated2[IssueCreated2["SRIMessageSignatureIssue::SignatureInputHeaderKeyIdLength"] = 105] = "SRIMessageSignatureIssue::SignatureInputHeaderKeyIdLength";
      IssueCreated2[IssueCreated2["SRIMessageSignatureIssue::SignatureInputHeaderInvalidParameter"] = 106] = "SRIMessageSignatureIssue::SignatureInputHeaderInvalidParameter";
      IssueCreated2[IssueCreated2["SRIMessageSignatureIssue::SignatureInputHeaderMissingRequiredParameters"] = 107] = "SRIMessageSignatureIssue::SignatureInputHeaderMissingRequiredParameters";
      IssueCreated2[IssueCreated2["SRIMessageSignatureIssue::ValidationFailedSignatureExpired"] = 108] = "SRIMessageSignatureIssue::ValidationFailedSignatureExpired";
      IssueCreated2[IssueCreated2["SRIMessageSignatureIssue::ValidationFailedInvalidLength"] = 109] = "SRIMessageSignatureIssue::ValidationFailedInvalidLength";
      IssueCreated2[IssueCreated2["SRIMessageSignatureIssue::ValidationFailedSignatureMismatch"] = 110] = "SRIMessageSignatureIssue::ValidationFailedSignatureMismatch";
      IssueCreated2[IssueCreated2["CorsIssue::LocalNetworkAccessPermissionDenied"] = 111] = "CorsIssue::LocalNetworkAccessPermissionDenied";
      IssueCreated2[IssueCreated2["SRIMessageSignatureIssue::ValidationFailedIntegrityMismatch"] = 112] = "SRIMessageSignatureIssue::ValidationFailedIntegrityMismatch";
      IssueCreated2[IssueCreated2["ElementAccessibilityIssue::InteractiveContentSummaryDescendant"] = 113] = "ElementAccessibilityIssue::InteractiveContentSummaryDescendant";
      IssueCreated2[IssueCreated2["CorsIssue::InvalidLocalNetworkAccess"] = 114] = "CorsIssue::InvalidLocalNetworkAccess";
      IssueCreated2[IssueCreated2["MAX_VALUE"] = 115] = "MAX_VALUE";
    })(IssueCreated || (IssueCreated = {}));
    (function(Language2) {
      Language2[Language2["af"] = 1] = "af";
      Language2[Language2["am"] = 2] = "am";
      Language2[Language2["ar"] = 3] = "ar";
      Language2[Language2["as"] = 4] = "as";
      Language2[Language2["az"] = 5] = "az";
      Language2[Language2["be"] = 6] = "be";
      Language2[Language2["bg"] = 7] = "bg";
      Language2[Language2["bn"] = 8] = "bn";
      Language2[Language2["bs"] = 9] = "bs";
      Language2[Language2["ca"] = 10] = "ca";
      Language2[Language2["cs"] = 11] = "cs";
      Language2[Language2["cy"] = 12] = "cy";
      Language2[Language2["da"] = 13] = "da";
      Language2[Language2["de"] = 14] = "de";
      Language2[Language2["el"] = 15] = "el";
      Language2[Language2["en-GB"] = 16] = "en-GB";
      Language2[Language2["en-US"] = 17] = "en-US";
      Language2[Language2["es-419"] = 18] = "es-419";
      Language2[Language2["es"] = 19] = "es";
      Language2[Language2["et"] = 20] = "et";
      Language2[Language2["eu"] = 21] = "eu";
      Language2[Language2["fa"] = 22] = "fa";
      Language2[Language2["fi"] = 23] = "fi";
      Language2[Language2["fil"] = 24] = "fil";
      Language2[Language2["fr-CA"] = 25] = "fr-CA";
      Language2[Language2["fr"] = 26] = "fr";
      Language2[Language2["gl"] = 27] = "gl";
      Language2[Language2["gu"] = 28] = "gu";
      Language2[Language2["he"] = 29] = "he";
      Language2[Language2["hi"] = 30] = "hi";
      Language2[Language2["hr"] = 31] = "hr";
      Language2[Language2["hu"] = 32] = "hu";
      Language2[Language2["hy"] = 33] = "hy";
      Language2[Language2["id"] = 34] = "id";
      Language2[Language2["is"] = 35] = "is";
      Language2[Language2["it"] = 36] = "it";
      Language2[Language2["ja"] = 37] = "ja";
      Language2[Language2["ka"] = 38] = "ka";
      Language2[Language2["kk"] = 39] = "kk";
      Language2[Language2["km"] = 40] = "km";
      Language2[Language2["kn"] = 41] = "kn";
      Language2[Language2["ko"] = 42] = "ko";
      Language2[Language2["ky"] = 43] = "ky";
      Language2[Language2["lo"] = 44] = "lo";
      Language2[Language2["lt"] = 45] = "lt";
      Language2[Language2["lv"] = 46] = "lv";
      Language2[Language2["mk"] = 47] = "mk";
      Language2[Language2["ml"] = 48] = "ml";
      Language2[Language2["mn"] = 49] = "mn";
      Language2[Language2["mr"] = 50] = "mr";
      Language2[Language2["ms"] = 51] = "ms";
      Language2[Language2["my"] = 52] = "my";
      Language2[Language2["ne"] = 53] = "ne";
      Language2[Language2["nl"] = 54] = "nl";
      Language2[Language2["no"] = 55] = "no";
      Language2[Language2["or"] = 56] = "or";
      Language2[Language2["pa"] = 57] = "pa";
      Language2[Language2["pl"] = 58] = "pl";
      Language2[Language2["pt-PT"] = 59] = "pt-PT";
      Language2[Language2["pt"] = 60] = "pt";
      Language2[Language2["ro"] = 61] = "ro";
      Language2[Language2["ru"] = 62] = "ru";
      Language2[Language2["si"] = 63] = "si";
      Language2[Language2["sk"] = 64] = "sk";
      Language2[Language2["sl"] = 65] = "sl";
      Language2[Language2["sq"] = 66] = "sq";
      Language2[Language2["sr-Latn"] = 67] = "sr-Latn";
      Language2[Language2["sr"] = 68] = "sr";
      Language2[Language2["sv"] = 69] = "sv";
      Language2[Language2["sw"] = 70] = "sw";
      Language2[Language2["ta"] = 71] = "ta";
      Language2[Language2["te"] = 72] = "te";
      Language2[Language2["th"] = 73] = "th";
      Language2[Language2["tr"] = 74] = "tr";
      Language2[Language2["uk"] = 75] = "uk";
      Language2[Language2["ur"] = 76] = "ur";
      Language2[Language2["uz"] = 77] = "uz";
      Language2[Language2["vi"] = 78] = "vi";
      Language2[Language2["zh"] = 79] = "zh";
      Language2[Language2["zh-HK"] = 80] = "zh-HK";
      Language2[Language2["zh-TW"] = 81] = "zh-TW";
      Language2[Language2["zu"] = 82] = "zu";
      Language2[Language2["MAX_VALUE"] = 83] = "MAX_VALUE";
    })(Language || (Language = {}));
    (function(ManifestSectionCodes2) {
      ManifestSectionCodes2[ManifestSectionCodes2["OtherSection"] = 0] = "OtherSection";
      ManifestSectionCodes2[ManifestSectionCodes2["Identity"] = 1] = "Identity";
      ManifestSectionCodes2[ManifestSectionCodes2["Presentation"] = 2] = "Presentation";
      ManifestSectionCodes2[ManifestSectionCodes2["Protocol Handlers"] = 3] = "Protocol Handlers";
      ManifestSectionCodes2[ManifestSectionCodes2["Icons"] = 4] = "Icons";
      ManifestSectionCodes2[ManifestSectionCodes2["Window Controls Overlay"] = 5] = "Window Controls Overlay";
      ManifestSectionCodes2[ManifestSectionCodes2["MAX_VALUE"] = 6] = "MAX_VALUE";
    })(ManifestSectionCodes || (ManifestSectionCodes = {}));
    userMetrics = new UserMetrics();
    CSSFontFace = class {
      #fontFamily;
      #fontVariationAxes;
      #fontVariationAxesByTag = /* @__PURE__ */ new Map();
      #src;
      #fontDisplay;
      constructor(payload) {
        this.#fontFamily = payload.fontFamily;
        this.#fontVariationAxes = payload.fontVariationAxes || [];
        this.#src = payload.src;
        this.#fontDisplay = payload.fontDisplay;
        for (const axis of this.#fontVariationAxes) {
          this.#fontVariationAxesByTag.set(axis.tag, axis);
        }
      }
      getFontFamily() {
        return this.#fontFamily;
      }
      getSrc() {
        return this.#src;
      }
      getFontDisplay() {
        return this.#fontDisplay;
      }
      getVariationAxisByTag(tag2) {
        return this.#fontVariationAxesByTag.get(tag2);
      }
    };
    generatedProperties = [
      {
        "longhands": [
          "max-lines",
          "block-ellipsis",
          "continue"
        ],
        "name": "-alternative-webkit-line-clamp"
      },
      {
        "inherited": true,
        "name": "-webkit-border-horizontal-spacing"
      },
      {
        "name": "-webkit-border-image"
      },
      {
        "inherited": true,
        "name": "-webkit-border-vertical-spacing"
      },
      {
        "keywords": [
          "stretch",
          "start",
          "center",
          "end",
          "baseline"
        ],
        "name": "-webkit-box-align"
      },
      {
        "keywords": [
          "slice",
          "clone"
        ],
        "name": "-webkit-box-decoration-break"
      },
      {
        "keywords": [
          "normal",
          "reverse"
        ],
        "name": "-webkit-box-direction"
      },
      {
        "name": "-webkit-box-flex"
      },
      {
        "name": "-webkit-box-ordinal-group"
      },
      {
        "keywords": [
          "horizontal",
          "vertical"
        ],
        "name": "-webkit-box-orient"
      },
      {
        "keywords": [
          "start",
          "center",
          "end",
          "justify"
        ],
        "name": "-webkit-box-pack"
      },
      {
        "name": "-webkit-box-reflect"
      },
      {
        "longhands": [
          "break-after"
        ],
        "name": "-webkit-column-break-after"
      },
      {
        "longhands": [
          "break-before"
        ],
        "name": "-webkit-column-break-before"
      },
      {
        "longhands": [
          "break-inside"
        ],
        "name": "-webkit-column-break-inside"
      },
      {
        "inherited": true,
        "name": "-webkit-font-smoothing"
      },
      {
        "keywords": [
          "auto",
          "loose",
          "normal",
          "strict",
          "after-white-space"
        ],
        "name": "-webkit-line-break"
      },
      {
        "keywords": [
          "none"
        ],
        "name": "-webkit-line-clamp"
      },
      {
        "inherited": true,
        "name": "-webkit-locale"
      },
      {
        "longhands": [
          "-webkit-mask-box-image-source",
          "-webkit-mask-box-image-slice",
          "-webkit-mask-box-image-width",
          "-webkit-mask-box-image-outset",
          "-webkit-mask-box-image-repeat"
        ],
        "name": "-webkit-mask-box-image"
      },
      {
        "name": "-webkit-mask-box-image-outset"
      },
      {
        "name": "-webkit-mask-box-image-repeat"
      },
      {
        "name": "-webkit-mask-box-image-slice"
      },
      {
        "name": "-webkit-mask-box-image-source"
      },
      {
        "name": "-webkit-mask-box-image-width"
      },
      {
        "name": "-webkit-mask-position-x"
      },
      {
        "name": "-webkit-mask-position-y"
      },
      {
        "name": "-webkit-perspective-origin-x"
      },
      {
        "name": "-webkit-perspective-origin-y"
      },
      {
        "inherited": true,
        "keywords": [
          "logical",
          "visual"
        ],
        "name": "-webkit-rtl-ordering"
      },
      {
        "inherited": true,
        "name": "-webkit-ruby-position"
      },
      {
        "inherited": true,
        "name": "-webkit-tap-highlight-color"
      },
      {
        "inherited": true,
        "name": "-webkit-text-combine"
      },
      {
        "inherited": true,
        "name": "-webkit-text-decorations-in-effect"
      },
      {
        "inherited": true,
        "name": "-webkit-text-fill-color"
      },
      {
        "inherited": true,
        "name": "-webkit-text-orientation"
      },
      {
        "inherited": true,
        "keywords": [
          "none",
          "disc",
          "circle",
          "square"
        ],
        "name": "-webkit-text-security"
      },
      {
        "inherited": true,
        "longhands": [
          "-webkit-text-stroke-width",
          "-webkit-text-stroke-color"
        ],
        "name": "-webkit-text-stroke"
      },
      {
        "inherited": true,
        "name": "-webkit-text-stroke-color"
      },
      {
        "inherited": true,
        "name": "-webkit-text-stroke-width"
      },
      {
        "name": "-webkit-transform-origin-x"
      },
      {
        "name": "-webkit-transform-origin-y"
      },
      {
        "name": "-webkit-transform-origin-z"
      },
      {
        "keywords": [
          "auto",
          "none",
          "element"
        ],
        "name": "-webkit-user-drag"
      },
      {
        "inherited": true,
        "keywords": [
          "read-only",
          "read-write",
          "read-write-plaintext-only"
        ],
        "name": "-webkit-user-modify"
      },
      {
        "inherited": true,
        "name": "-webkit-writing-mode"
      },
      {
        "inherited": true,
        "keywords": [
          "auto",
          "currentcolor"
        ],
        "name": "accent-color"
      },
      {
        "name": "additive-symbols"
      },
      {
        "name": "align-content"
      },
      {
        "name": "align-items"
      },
      {
        "name": "align-self"
      },
      {
        "keywords": [
          "auto",
          "baseline",
          "alphabetic",
          "ideographic",
          "middle",
          "central",
          "mathematical",
          "before-edge",
          "text-before-edge",
          "after-edge",
          "text-after-edge",
          "hanging"
        ],
        "name": "alignment-baseline"
      },
      {
        "longhands": [
          "-webkit-border-horizontal-spacing",
          "-webkit-border-vertical-spacing",
          "-webkit-box-align",
          "-webkit-box-decoration-break",
          "-webkit-box-direction",
          "-webkit-box-flex",
          "-webkit-box-ordinal-group",
          "-webkit-box-orient",
          "-webkit-box-pack",
          "-webkit-box-reflect",
          "-webkit-font-smoothing",
          "-webkit-line-break",
          "-webkit-line-clamp",
          "-webkit-locale",
          "-webkit-mask-box-image-outset",
          "-webkit-mask-box-image-repeat",
          "-webkit-mask-box-image-slice",
          "-webkit-mask-box-image-source",
          "-webkit-mask-box-image-width",
          "-webkit-mask-position-x",
          "-webkit-mask-position-y",
          "-webkit-rtl-ordering",
          "-webkit-ruby-position",
          "-webkit-tap-highlight-color",
          "-webkit-text-combine",
          "-webkit-text-decorations-in-effect",
          "-webkit-text-fill-color",
          "-webkit-text-orientation",
          "-webkit-text-security",
          "-webkit-text-stroke-color",
          "-webkit-text-stroke-width",
          "-webkit-user-drag",
          "-webkit-writing-mode",
          "accent-color",
          "additive-symbols",
          "align-content",
          "align-items",
          "align-self",
          "alignment-baseline",
          "anchor-name",
          "anchor-scope",
          "animation-composition",
          "animation-delay",
          "animation-direction",
          "animation-duration",
          "animation-fill-mode",
          "animation-iteration-count",
          "animation-name",
          "animation-play-state",
          "animation-range-end",
          "animation-range-start",
          "animation-timeline",
          "animation-timing-function",
          "animation-trigger",
          "app-region",
          "appearance",
          "ascent-override",
          "aspect-ratio",
          "backdrop-filter",
          "backface-visibility",
          "background-attachment",
          "background-blend-mode",
          "background-clip",
          "background-color",
          "background-image",
          "background-origin",
          "background-position-x",
          "background-position-y",
          "background-repeat",
          "background-size",
          "base-palette",
          "base-url",
          "baseline-shift",
          "baseline-source",
          "block-ellipsis",
          "block-size",
          "border-block-end-color",
          "border-block-end-style",
          "border-block-end-width",
          "border-block-start-color",
          "border-block-start-style",
          "border-block-start-width",
          "border-bottom-color",
          "border-bottom-left-radius",
          "border-bottom-right-radius",
          "border-bottom-style",
          "border-bottom-width",
          "border-collapse",
          "border-end-end-radius",
          "border-end-start-radius",
          "border-image-outset",
          "border-image-repeat",
          "border-image-slice",
          "border-image-source",
          "border-image-width",
          "border-inline-end-color",
          "border-inline-end-style",
          "border-inline-end-width",
          "border-inline-start-color",
          "border-inline-start-style",
          "border-inline-start-width",
          "border-left-color",
          "border-left-style",
          "border-left-width",
          "border-right-color",
          "border-right-style",
          "border-right-width",
          "border-shape",
          "border-start-end-radius",
          "border-start-start-radius",
          "border-top-color",
          "border-top-left-radius",
          "border-top-right-radius",
          "border-top-style",
          "border-top-width",
          "bottom",
          "box-decoration-break",
          "box-shadow",
          "box-sizing",
          "break-after",
          "break-before",
          "break-inside",
          "buffered-rendering",
          "caption-side",
          "caret-animation",
          "caret-color",
          "caret-shape",
          "clear",
          "clip",
          "clip-path",
          "clip-rule",
          "color",
          "color-interpolation",
          "color-interpolation-filters",
          "color-rendering",
          "color-scheme",
          "column-count",
          "column-fill",
          "column-gap",
          "column-height",
          "column-rule-break",
          "column-rule-color",
          "column-rule-edge-inset-end",
          "column-rule-edge-inset-start",
          "column-rule-interior-inset-end",
          "column-rule-interior-inset-start",
          "column-rule-style",
          "column-rule-visibility-items",
          "column-rule-width",
          "column-span",
          "column-width",
          "column-wrap",
          "contain",
          "contain-intrinsic-block-size",
          "contain-intrinsic-height",
          "contain-intrinsic-inline-size",
          "contain-intrinsic-width",
          "container-name",
          "container-type",
          "content",
          "content-visibility",
          "continue",
          "corner-bottom-left-shape",
          "corner-bottom-right-shape",
          "corner-end-end-shape",
          "corner-end-start-shape",
          "corner-start-end-shape",
          "corner-start-start-shape",
          "corner-top-left-shape",
          "corner-top-right-shape",
          "counter-increment",
          "counter-reset",
          "counter-set",
          "cursor",
          "cx",
          "cy",
          "d",
          "descent-override",
          "display",
          "dominant-baseline",
          "dynamic-range-limit",
          "empty-cells",
          "fallback",
          "field-sizing",
          "fill",
          "fill-opacity",
          "fill-rule",
          "filter",
          "flex-basis",
          "flex-direction",
          "flex-grow",
          "flex-shrink",
          "flex-wrap",
          "float",
          "flood-color",
          "flood-opacity",
          "flow-tolerance",
          "font-display",
          "font-family",
          "font-feature-settings",
          "font-kerning",
          "font-language-override",
          "font-optical-sizing",
          "font-palette",
          "font-size",
          "font-size-adjust",
          "font-stretch",
          "font-style",
          "font-synthesis-small-caps",
          "font-synthesis-style",
          "font-synthesis-weight",
          "font-variant-alternates",
          "font-variant-caps",
          "font-variant-east-asian",
          "font-variant-emoji",
          "font-variant-ligatures",
          "font-variant-numeric",
          "font-variant-position",
          "font-variation-settings",
          "font-weight",
          "forced-color-adjust",
          "frame-sizing",
          "grid-auto-columns",
          "grid-auto-flow",
          "grid-auto-rows",
          "grid-column-end",
          "grid-column-start",
          "grid-lanes-direction",
          "grid-lanes-pack",
          "grid-row-end",
          "grid-row-start",
          "grid-template-areas",
          "grid-template-columns",
          "grid-template-rows",
          "hash",
          "height",
          "hostname",
          "hyphenate-character",
          "hyphenate-limit-chars",
          "hyphens",
          "image-animation",
          "image-orientation",
          "image-rendering",
          "inherits",
          "initial-letter",
          "initial-value",
          "inline-size",
          "inset-block-end",
          "inset-block-start",
          "inset-inline-end",
          "inset-inline-start",
          "interactivity",
          "interest-delay-end",
          "interest-delay-start",
          "interpolate-size",
          "isolation",
          "justify-content",
          "justify-items",
          "justify-self",
          "left",
          "letter-spacing",
          "lighting-color",
          "line-break",
          "line-gap-override",
          "line-height",
          "list-style-image",
          "list-style-position",
          "list-style-type",
          "margin-block-end",
          "margin-block-start",
          "margin-bottom",
          "margin-inline-end",
          "margin-inline-start",
          "margin-left",
          "margin-right",
          "margin-top",
          "margin-trim",
          "marker-end",
          "marker-mid",
          "marker-start",
          "mask-clip",
          "mask-composite",
          "mask-image",
          "mask-mode",
          "mask-origin",
          "mask-repeat",
          "mask-size",
          "mask-type",
          "math-depth",
          "math-shift",
          "math-style",
          "max-block-size",
          "max-height",
          "max-inline-size",
          "max-lines",
          "max-width",
          "min-block-size",
          "min-height",
          "min-inline-size",
          "min-width",
          "mix-blend-mode",
          "navigation",
          "negative",
          "object-fit",
          "object-position",
          "object-view-box",
          "offset-anchor",
          "offset-distance",
          "offset-path",
          "offset-position",
          "offset-rotate",
          "opacity",
          "order",
          "origin-trial-test-property",
          "orphans",
          "outline-color",
          "outline-offset",
          "outline-style",
          "outline-width",
          "overflow-anchor",
          "overflow-block",
          "overflow-clip-margin",
          "overflow-inline",
          "overflow-wrap",
          "overflow-x",
          "overflow-y",
          "overlay",
          "override-colors",
          "overscroll-behavior-block",
          "overscroll-behavior-inline",
          "overscroll-behavior-x",
          "overscroll-behavior-y",
          "pad",
          "padding-block-end",
          "padding-block-start",
          "padding-bottom",
          "padding-inline-end",
          "padding-inline-start",
          "padding-left",
          "padding-right",
          "padding-top",
          "page",
          "page-margin-safety",
          "page-orientation",
          "paint-order",
          "pathname",
          "pattern",
          "perspective",
          "perspective-origin",
          "pointer-events",
          "port",
          "position",
          "position-anchor",
          "position-area",
          "position-try-fallbacks",
          "position-try-order",
          "position-visibility",
          "prefix",
          "print-color-adjust",
          "protocol",
          "quotes",
          "r",
          "range",
          "reading-flow",
          "reading-order",
          "resize",
          "result",
          "right",
          "rotate",
          "row-gap",
          "row-rule-break",
          "row-rule-color",
          "row-rule-edge-inset-end",
          "row-rule-edge-inset-start",
          "row-rule-interior-inset-end",
          "row-rule-interior-inset-start",
          "row-rule-style",
          "row-rule-visibility-items",
          "row-rule-width",
          "ruby-align",
          "ruby-overhang",
          "ruby-position",
          "rule-overlap",
          "rx",
          "ry",
          "scale",
          "scroll-behavior",
          "scroll-initial-target",
          "scroll-margin-block-end",
          "scroll-margin-block-start",
          "scroll-margin-bottom",
          "scroll-margin-inline-end",
          "scroll-margin-inline-start",
          "scroll-margin-left",
          "scroll-margin-right",
          "scroll-margin-top",
          "scroll-marker-group",
          "scroll-padding-block-end",
          "scroll-padding-block-start",
          "scroll-padding-bottom",
          "scroll-padding-inline-end",
          "scroll-padding-inline-start",
          "scroll-padding-left",
          "scroll-padding-right",
          "scroll-padding-top",
          "scroll-snap-align",
          "scroll-snap-stop",
          "scroll-snap-type",
          "scroll-target-group",
          "scroll-timeline-axis",
          "scroll-timeline-name",
          "scrollbar-color",
          "scrollbar-gutter",
          "scrollbar-width",
          "search",
          "shape-image-threshold",
          "shape-margin",
          "shape-outside",
          "shape-rendering",
          "size",
          "size-adjust",
          "speak",
          "speak-as",
          "src",
          "stop-color",
          "stop-opacity",
          "stroke",
          "stroke-dasharray",
          "stroke-dashoffset",
          "stroke-linecap",
          "stroke-linejoin",
          "stroke-miterlimit",
          "stroke-opacity",
          "stroke-width",
          "suffix",
          "symbols",
          "syntax",
          "system",
          "tab-size",
          "table-layout",
          "text-align",
          "text-align-last",
          "text-anchor",
          "text-autospace",
          "text-box-edge",
          "text-box-trim",
          "text-combine-upright",
          "text-decoration-color",
          "text-decoration-line",
          "text-decoration-skip-ink",
          "text-decoration-style",
          "text-decoration-thickness",
          "text-emphasis-color",
          "text-emphasis-position",
          "text-emphasis-style",
          "text-fit",
          "text-indent",
          "text-justify",
          "text-orientation",
          "text-overflow",
          "text-rendering",
          "text-shadow",
          "text-size-adjust",
          "text-spacing-trim",
          "text-transform",
          "text-underline-offset",
          "text-underline-position",
          "text-wrap-mode",
          "text-wrap-style",
          "timeline-scope",
          "timeline-trigger-activation-range-end",
          "timeline-trigger-activation-range-start",
          "timeline-trigger-active-range-end",
          "timeline-trigger-active-range-start",
          "timeline-trigger-name",
          "timeline-trigger-source",
          "top",
          "touch-action",
          "transform",
          "transform-box",
          "transform-origin",
          "transform-style",
          "transition-behavior",
          "transition-delay",
          "transition-duration",
          "transition-property",
          "transition-timing-function",
          "translate",
          "trigger-scope",
          "types",
          "unicode-range",
          "user-select",
          "vector-effect",
          "vertical-align",
          "view-timeline-axis",
          "view-timeline-inset",
          "view-timeline-name",
          "view-transition-class",
          "view-transition-group",
          "view-transition-name",
          "view-transition-scope",
          "visibility",
          "white-space-collapse",
          "widows",
          "width",
          "will-change",
          "word-break",
          "word-spacing",
          "writing-mode",
          "x",
          "y",
          "z-index",
          "zoom"
        ],
        "name": "all"
      },
      {
        "keywords": [
          "none"
        ],
        "name": "anchor-name"
      },
      {
        "keywords": [
          "none",
          "all"
        ],
        "name": "anchor-scope"
      },
      {
        "longhands": [
          "animation-duration",
          "animation-timing-function",
          "animation-delay",
          "animation-iteration-count",
          "animation-direction",
          "animation-fill-mode",
          "animation-play-state",
          "animation-name",
          "animation-timeline",
          "animation-range-start",
          "animation-range-end"
        ],
        "name": "animation"
      },
      {
        "keywords": [
          "replace",
          "add",
          "accumulate"
        ],
        "name": "animation-composition"
      },
      {
        "name": "animation-delay"
      },
      {
        "keywords": [
          "normal",
          "reverse",
          "alternate",
          "alternate-reverse"
        ],
        "name": "animation-direction"
      },
      {
        "name": "animation-duration"
      },
      {
        "keywords": [
          "none",
          "forwards",
          "backwards",
          "both"
        ],
        "name": "animation-fill-mode"
      },
      {
        "keywords": [
          "infinite"
        ],
        "name": "animation-iteration-count"
      },
      {
        "keywords": [
          "none"
        ],
        "name": "animation-name"
      },
      {
        "keywords": [
          "running",
          "paused"
        ],
        "name": "animation-play-state"
      },
      {
        "longhands": [
          "animation-range-start",
          "animation-range-end"
        ],
        "name": "animation-range"
      },
      {
        "name": "animation-range-end"
      },
      {
        "name": "animation-range-start"
      },
      {
        "keywords": [
          "none",
          "auto"
        ],
        "name": "animation-timeline"
      },
      {
        "keywords": [
          "linear",
          "ease",
          "ease-in",
          "ease-out",
          "ease-in-out",
          "jump-both",
          "jump-end",
          "jump-none",
          "jump-start",
          "step-start",
          "step-end"
        ],
        "name": "animation-timing-function"
      },
      {
        "keywords": [
          "none"
        ],
        "name": "animation-trigger"
      },
      {
        "keywords": [
          "none",
          "drag",
          "no-drag"
        ],
        "name": "app-region"
      },
      {
        "name": "appearance"
      },
      {
        "name": "ascent-override"
      },
      {
        "keywords": [
          "auto"
        ],
        "name": "aspect-ratio"
      },
      {
        "keywords": [
          "none"
        ],
        "name": "backdrop-filter"
      },
      {
        "keywords": [
          "visible",
          "hidden"
        ],
        "name": "backface-visibility"
      },
      {
        "longhands": [
          "background-image",
          "background-position-x",
          "background-position-y",
          "background-size",
          "background-repeat",
          "background-attachment",
          "background-origin",
          "background-clip",
          "background-color"
        ],
        "name": "background"
      },
      {
        "keywords": [
          "scroll",
          "fixed",
          "local"
        ],
        "name": "background-attachment"
      },
      {
        "keywords": [
          "normal",
          "multiply",
          "screen",
          "overlay",
          "darken",
          "lighten",
          "color-dodge",
          "color-burn",
          "hard-light",
          "soft-light",
          "difference",
          "exclusion",
          "hue",
          "saturation",
          "color",
          "luminosity"
        ],
        "name": "background-blend-mode"
      },
      {
        "keywords": [
          "border-box",
          "padding-box",
          "content-box",
          "text"
        ],
        "name": "background-clip"
      },
      {
        "keywords": [
          "currentcolor"
        ],
        "name": "background-color"
      },
      {
        "keywords": [
          "auto",
          "none"
        ],
        "name": "background-image"
      },
      {
        "keywords": [
          "border-box",
          "padding-box",
          "content-box"
        ],
        "name": "background-origin"
      },
      {
        "longhands": [
          "background-position-x",
          "background-position-y"
        ],
        "name": "background-position"
      },
      {
        "name": "background-position-x"
      },
      {
        "name": "background-position-y"
      },
      {
        "name": "background-repeat"
      },
      {
        "keywords": [
          "auto",
          "cover",
          "contain"
        ],
        "name": "background-size"
      },
      {
        "name": "base-palette"
      },
      {
        "name": "base-url"
      },
      {
        "keywords": [
          "baseline",
          "sub",
          "super"
        ],
        "name": "baseline-shift"
      },
      {
        "keywords": [
          "auto",
          "first",
          "last"
        ],
        "name": "baseline-source"
      },
      {
        "inherited": true,
        "keywords": [
          "auto",
          "no-ellipsis"
        ],
        "name": "block-ellipsis"
      },
      {
        "keywords": [
          "auto"
        ],
        "name": "block-size"
      },
      {
        "longhands": [
          "border-top-color",
          "border-top-style",
          "border-top-width",
          "border-right-color",
          "border-right-style",
          "border-right-width",
          "border-bottom-color",
          "border-bottom-style",
          "border-bottom-width",
          "border-left-color",
          "border-left-style",
          "border-left-width",
          "border-image-source",
          "border-image-slice",
          "border-image-width",
          "border-image-outset",
          "border-image-repeat"
        ],
        "name": "border"
      },
      {
        "longhands": [
          "border-block-start-color",
          "border-block-start-style",
          "border-block-start-width",
          "border-block-end-color",
          "border-block-end-style",
          "border-block-end-width"
        ],
        "name": "border-block"
      },
      {
        "longhands": [
          "border-block-start-color",
          "border-block-end-color"
        ],
        "name": "border-block-color"
      },
      {
        "longhands": [
          "border-block-end-width",
          "border-block-end-style",
          "border-block-end-color"
        ],
        "name": "border-block-end"
      },
      {
        "name": "border-block-end-color"
      },
      {
        "name": "border-block-end-style"
      },
      {
        "name": "border-block-end-width"
      },
      {
        "longhands": [
          "border-block-start-width",
          "border-block-start-style",
          "border-block-start-color"
        ],
        "name": "border-block-start"
      },
      {
        "name": "border-block-start-color"
      },
      {
        "name": "border-block-start-style"
      },
      {
        "name": "border-block-start-width"
      },
      {
        "longhands": [
          "border-block-start-style",
          "border-block-end-style"
        ],
        "name": "border-block-style"
      },
      {
        "longhands": [
          "border-block-start-width",
          "border-block-end-width"
        ],
        "name": "border-block-width"
      },
      {
        "longhands": [
          "border-bottom-width",
          "border-bottom-style",
          "border-bottom-color"
        ],
        "name": "border-bottom"
      },
      {
        "keywords": [
          "currentcolor"
        ],
        "name": "border-bottom-color"
      },
      {
        "name": "border-bottom-left-radius"
      },
      {
        "name": "border-bottom-right-radius"
      },
      {
        "keywords": [
          "none",
          "hidden",
          "inset",
          "groove",
          "outset",
          "ridge",
          "dotted",
          "dashed",
          "solid",
          "double"
        ],
        "name": "border-bottom-style"
      },
      {
        "keywords": [
          "thin",
          "medium",
          "thick"
        ],
        "name": "border-bottom-width"
      },
      {
        "inherited": true,
        "keywords": [
          "separate",
          "collapse"
        ],
        "name": "border-collapse"
      },
      {
        "longhands": [
          "border-top-color",
          "border-right-color",
          "border-bottom-color",
          "border-left-color"
        ],
        "name": "border-color"
      },
      {
        "name": "border-end-end-radius"
      },
      {
        "name": "border-end-start-radius"
      },
      {
        "longhands": [
          "border-image-source",
          "border-image-slice",
          "border-image-width",
          "border-image-outset",
          "border-image-repeat"
        ],
        "name": "border-image"
      },
      {
        "name": "border-image-outset"
      },
      {
        "keywords": [
          "stretch",
          "repeat",
          "round",
          "space"
        ],
        "name": "border-image-repeat"
      },
      {
        "name": "border-image-slice"
      },
      {
        "keywords": [
          "none"
        ],
        "name": "border-image-source"
      },
      {
        "keywords": [
          "auto"
        ],
        "name": "border-image-width"
      },
      {
        "longhands": [
          "border-inline-start-color",
          "border-inline-start-style",
          "border-inline-start-width",
          "border-inline-end-color",
          "border-inline-end-style",
          "border-inline-end-width"
        ],
        "name": "border-inline"
      },
      {
        "longhands": [
          "border-inline-start-color",
          "border-inline-end-color"
        ],
        "name": "border-inline-color"
      },
      {
        "longhands": [
          "border-inline-end-width",
          "border-inline-end-style",
          "border-inline-end-color"
        ],
        "name": "border-inline-end"
      },
      {
        "name": "border-inline-end-color"
      },
      {
        "name": "border-inline-end-style"
      },
      {
        "name": "border-inline-end-width"
      },
      {
        "longhands": [
          "border-inline-start-width",
          "border-inline-start-style",
          "border-inline-start-color"
        ],
        "name": "border-inline-start"
      },
      {
        "name": "border-inline-start-color"
      },
      {
        "name": "border-inline-start-style"
      },
      {
        "name": "border-inline-start-width"
      },
      {
        "longhands": [
          "border-inline-start-style",
          "border-inline-end-style"
        ],
        "name": "border-inline-style"
      },
      {
        "longhands": [
          "border-inline-start-width",
          "border-inline-end-width"
        ],
        "name": "border-inline-width"
      },
      {
        "longhands": [
          "border-left-width",
          "border-left-style",
          "border-left-color"
        ],
        "name": "border-left"
      },
      {
        "keywords": [
          "currentcolor"
        ],
        "name": "border-left-color"
      },
      {
        "keywords": [
          "none",
          "hidden",
          "inset",
          "groove",
          "outset",
          "ridge",
          "dotted",
          "dashed",
          "solid",
          "double"
        ],
        "name": "border-left-style"
      },
      {
        "keywords": [
          "thin",
          "medium",
          "thick"
        ],
        "name": "border-left-width"
      },
      {
        "longhands": [
          "border-top-left-radius",
          "border-top-right-radius",
          "border-bottom-right-radius",
          "border-bottom-left-radius"
        ],
        "name": "border-radius"
      },
      {
        "longhands": [
          "border-right-width",
          "border-right-style",
          "border-right-color"
        ],
        "name": "border-right"
      },
      {
        "keywords": [
          "currentcolor"
        ],
        "name": "border-right-color"
      },
      {
        "keywords": [
          "none",
          "hidden",
          "inset",
          "groove",
          "outset",
          "ridge",
          "dotted",
          "dashed",
          "solid",
          "double"
        ],
        "name": "border-right-style"
      },
      {
        "keywords": [
          "thin",
          "medium",
          "thick"
        ],
        "name": "border-right-width"
      },
      {
        "keywords": [
          "none"
        ],
        "name": "border-shape"
      },
      {
        "inherited": true,
        "longhands": [
          "-webkit-border-horizontal-spacing",
          "-webkit-border-vertical-spacing"
        ],
        "name": "border-spacing"
      },
      {
        "name": "border-start-end-radius"
      },
      {
        "name": "border-start-start-radius"
      },
      {
        "keywords": [
          "none"
        ],
        "longhands": [
          "border-top-style",
          "border-right-style",
          "border-bottom-style",
          "border-left-style"
        ],
        "name": "border-style"
      },
      {
        "longhands": [
          "border-top-width",
          "border-top-style",
          "border-top-color"
        ],
        "name": "border-top"
      },
      {
        "keywords": [
          "currentcolor"
        ],
        "name": "border-top-color"
      },
      {
        "name": "border-top-left-radius"
      },
      {
        "name": "border-top-right-radius"
      },
      {
        "keywords": [
          "none",
          "hidden",
          "inset",
          "groove",
          "outset",
          "ridge",
          "dotted",
          "dashed",
          "solid",
          "double"
        ],
        "name": "border-top-style"
      },
      {
        "keywords": [
          "thin",
          "medium",
          "thick"
        ],
        "name": "border-top-width"
      },
      {
        "longhands": [
          "border-top-width",
          "border-right-width",
          "border-bottom-width",
          "border-left-width"
        ],
        "name": "border-width"
      },
      {
        "keywords": [
          "auto"
        ],
        "name": "bottom"
      },
      {
        "keywords": [
          "slice",
          "clone"
        ],
        "name": "box-decoration-break"
      },
      {
        "keywords": [
          "none"
        ],
        "name": "box-shadow"
      },
      {
        "keywords": [
          "content-box",
          "border-box"
        ],
        "name": "box-sizing"
      },
      {
        "keywords": [
          "auto",
          "avoid",
          "avoid-column",
          "avoid-page",
          "column",
          "left",
          "page",
          "recto",
          "right",
          "verso"
        ],
        "name": "break-after"
      },
      {
        "keywords": [
          "auto",
          "avoid",
          "avoid-column",
          "avoid-page",
          "column",
          "left",
          "page",
          "recto",
          "right",
          "verso"
        ],
        "name": "break-before"
      },
      {
        "keywords": [
          "auto",
          "avoid",
          "avoid-column",
          "avoid-page"
        ],
        "name": "break-inside"
      },
      {
        "keywords": [
          "auto",
          "dynamic",
          "static"
        ],
        "name": "buffered-rendering"
      },
      {
        "inherited": true,
        "keywords": [
          "top",
          "bottom"
        ],
        "name": "caption-side"
      },
      {
        "inherited": true,
        "keywords": [
          "auto",
          "manual"
        ],
        "name": "caret-animation"
      },
      {
        "inherited": true,
        "keywords": [
          "auto",
          "currentcolor"
        ],
        "name": "caret-color"
      },
      {
        "inherited": true,
        "keywords": [
          "auto",
          "bar",
          "block",
          "underscore"
        ],
        "name": "caret-shape"
      },
      {
        "keywords": [
          "none",
          "left",
          "right",
          "both",
          "inline-start",
          "inline-end"
        ],
        "name": "clear"
      },
      {
        "keywords": [
          "auto"
        ],
        "name": "clip"
      },
      {
        "keywords": [
          "border-box",
          "padding-box",
          "content-box",
          "margin-box",
          "fill-box",
          "stroke-box",
          "view-box",
          "none"
        ],
        "name": "clip-path"
      },
      {
        "inherited": true,
        "keywords": [
          "nonzero",
          "evenodd"
        ],
        "name": "clip-rule"
      },
      {
        "inherited": true,
        "keywords": [
          "currentcolor"
        ],
        "name": "color"
      },
      {
        "inherited": true,
        "keywords": [
          "auto",
          "srgb",
          "linearrgb"
        ],
        "name": "color-interpolation"
      },
      {
        "inherited": true,
        "keywords": [
          "auto",
          "srgb",
          "linearrgb"
        ],
        "name": "color-interpolation-filters"
      },
      {
        "inherited": true,
        "keywords": [
          "auto",
          "optimizespeed",
          "optimizequality"
        ],
        "name": "color-rendering"
      },
      {
        "inherited": true,
        "name": "color-scheme"
      },
      {
        "keywords": [
          "auto"
        ],
        "name": "column-count"
      },
      {
        "keywords": [
          "balance",
          "auto"
        ],
        "name": "column-fill"
      },
      {
        "keywords": [
          "normal"
        ],
        "name": "column-gap"
      },
      {
        "keywords": [
          "auto"
        ],
        "name": "column-height"
      },
      {
        "longhands": [
          "column-rule-width",
          "column-rule-style",
          "column-rule-color"
        ],
        "name": "column-rule"
      },
      {
        "inherited": false,
        "keywords": [
          "none",
          "normal",
          "intersection"
        ],
        "name": "column-rule-break"
      },
      {
        "keywords": [
          "currentcolor"
        ],
        "name": "column-rule-color"
      },
      {
        "longhands": [
          "column-rule-edge-inset-start",
          "column-rule-edge-inset-end"
        ],
        "name": "column-rule-edge-inset"
      },
      {
        "inherited": false,
        "name": "column-rule-edge-inset-end"
      },
      {
        "inherited": false,
        "name": "column-rule-edge-inset-start"
      },
      {
        "longhands": [
          "column-rule-edge-inset-start",
          "column-rule-edge-inset-end",
          "column-rule-interior-inset-start",
          "column-rule-interior-inset-end"
        ],
        "name": "column-rule-inset"
      },
      {
        "longhands": [
          "column-rule-edge-inset-end",
          "column-rule-interior-inset-end"
        ],
        "name": "column-rule-inset-end"
      },
      {
        "longhands": [
          "column-rule-edge-inset-start",
          "column-rule-interior-inset-start"
        ],
        "name": "column-rule-inset-start"
      },
      {
        "longhands": [
          "column-rule-interior-inset-start",
          "column-rule-interior-inset-end"
        ],
        "name": "column-rule-interior-inset"
      },
      {
        "inherited": false,
        "name": "column-rule-interior-inset-end"
      },
      {
        "inherited": false,
        "name": "column-rule-interior-inset-start"
      },
      {
        "keywords": [
          "none",
          "hidden",
          "inset",
          "groove",
          "outset",
          "ridge",
          "dotted",
          "dashed",
          "solid",
          "double"
        ],
        "name": "column-rule-style"
      },
      {
        "inherited": false,
        "keywords": [
          "all",
          "auto",
          "around",
          "between"
        ],
        "name": "column-rule-visibility-items"
      },
      {
        "keywords": [
          "thin",
          "medium",
          "thick"
        ],
        "name": "column-rule-width"
      },
      {
        "keywords": [
          "none",
          "all"
        ],
        "name": "column-span"
      },
      {
        "keywords": [
          "auto"
        ],
        "name": "column-width"
      },
      {
        "keywords": [
          "auto",
          "nowrap",
          "wrap"
        ],
        "name": "column-wrap"
      },
      {
        "longhands": [
          "column-width",
          "column-count",
          "column-height",
          "column-wrap"
        ],
        "name": "columns"
      },
      {
        "keywords": [
          "none",
          "strict",
          "content",
          "size",
          "layout",
          "style",
          "paint",
          "inline-size",
          "block-size"
        ],
        "name": "contain"
      },
      {
        "name": "contain-intrinsic-block-size"
      },
      {
        "keywords": [
          "none"
        ],
        "name": "contain-intrinsic-height"
      },
      {
        "name": "contain-intrinsic-inline-size"
      },
      {
        "longhands": [
          "contain-intrinsic-width",
          "contain-intrinsic-height"
        ],
        "name": "contain-intrinsic-size"
      },
      {
        "keywords": [
          "none"
        ],
        "name": "contain-intrinsic-width"
      },
      {
        "longhands": [
          "container-name",
          "container-type"
        ],
        "name": "container"
      },
      {
        "keywords": [
          "none"
        ],
        "name": "container-name"
      },
      {
        "keywords": [
          "normal",
          "inline-size",
          "size",
          "scroll-state",
          "anchored"
        ],
        "name": "container-type"
      },
      {
        "name": "content"
      },
      {
        "keywords": [
          "visible",
          "auto",
          "hidden"
        ],
        "name": "content-visibility"
      },
      {
        "keywords": [
          "auto",
          "collapse",
          "-webkit-legacy"
        ],
        "name": "continue"
      },
      {
        "longhands": [
          "corner-end-start-shape",
          "corner-end-end-shape"
        ],
        "name": "corner-block-end-shape"
      },
      {
        "longhands": [
          "corner-start-start-shape",
          "corner-start-end-shape"
        ],
        "name": "corner-block-start-shape"
      },
      {
        "keywords": [
          "notch",
          "scoop",
          "bevel",
          "round",
          "squircle",
          "square"
        ],
        "name": "corner-bottom-left-shape"
      },
      {
        "keywords": [
          "notch",
          "scoop",
          "bevel",
          "round",
          "squircle",
          "square"
        ],
        "name": "corner-bottom-right-shape"
      },
      {
        "longhands": [
          "corner-bottom-left-shape",
          "corner-bottom-right-shape"
        ],
        "name": "corner-bottom-shape"
      },
      {
        "name": "corner-end-end-shape"
      },
      {
        "name": "corner-end-start-shape"
      },
      {
        "longhands": [
          "corner-start-end-shape",
          "corner-end-end-shape"
        ],
        "name": "corner-inline-end-shape"
      },
      {
        "longhands": [
          "corner-start-start-shape",
          "corner-end-start-shape"
        ],
        "name": "corner-inline-start-shape"
      },
      {
        "longhands": [
          "corner-top-left-shape",
          "corner-bottom-left-shape"
        ],
        "name": "corner-left-shape"
      },
      {
        "longhands": [
          "corner-top-right-shape",
          "corner-bottom-right-shape"
        ],
        "name": "corner-right-shape"
      },
      {
        "longhands": [
          "corner-top-left-shape",
          "corner-top-right-shape",
          "corner-bottom-right-shape",
          "corner-bottom-left-shape"
        ],
        "name": "corner-shape"
      },
      {
        "name": "corner-start-end-shape"
      },
      {
        "name": "corner-start-start-shape"
      },
      {
        "keywords": [
          "notch",
          "scoop",
          "bevel",
          "round",
          "squircle",
          "square"
        ],
        "name": "corner-top-left-shape"
      },
      {
        "keywords": [
          "notch",
          "scoop",
          "bevel",
          "round",
          "squircle",
          "square"
        ],
        "name": "corner-top-right-shape"
      },
      {
        "longhands": [
          "corner-top-left-shape",
          "corner-top-right-shape"
        ],
        "name": "corner-top-shape"
      },
      {
        "keywords": [
          "normal"
        ],
        "longhands": [
          "border-top-left-radius",
          "corner-top-left-shape",
          "border-top-right-radius",
          "corner-top-right-shape",
          "border-bottom-right-radius",
          "corner-bottom-right-shape",
          "border-bottom-left-radius",
          "corner-bottom-left-shape"
        ],
        "name": "corners"
      },
      {
        "keywords": [
          "none"
        ],
        "name": "counter-increment"
      },
      {
        "keywords": [
          "none"
        ],
        "name": "counter-reset"
      },
      {
        "keywords": [
          "none"
        ],
        "name": "counter-set"
      },
      {
        "inherited": true,
        "keywords": [
          "auto",
          "default",
          "none",
          "context-menu",
          "help",
          "pointer",
          "progress",
          "wait",
          "cell",
          "crosshair",
          "text",
          "vertical-text",
          "alias",
          "copy",
          "move",
          "no-drop",
          "not-allowed",
          "e-resize",
          "n-resize",
          "ne-resize",
          "nw-resize",
          "s-resize",
          "se-resize",
          "sw-resize",
          "w-resize",
          "ew-resize",
          "ns-resize",
          "nesw-resize",
          "nwse-resize",
          "col-resize",
          "row-resize",
          "all-scroll",
          "zoom-in",
          "zoom-out",
          "grab",
          "grabbing"
        ],
        "name": "cursor"
      },
      {
        "name": "cx"
      },
      {
        "name": "cy"
      },
      {
        "keywords": [
          "none"
        ],
        "name": "d"
      },
      {
        "name": "descent-override"
      },
      {
        "inherited": true,
        "keywords": [
          "ltr",
          "rtl"
        ],
        "name": "direction"
      },
      {
        "keywords": [
          "inline",
          "block",
          "list-item",
          "inline-block",
          "table",
          "inline-table",
          "table-row-group",
          "table-header-group",
          "table-footer-group",
          "table-row",
          "table-column-group",
          "table-column",
          "table-cell",
          "table-caption",
          "-webkit-box",
          "-webkit-inline-box",
          "flex",
          "inline-flex",
          "grid",
          "inline-grid",
          "contents",
          "flow-root",
          "none",
          "flow",
          "math",
          "ruby",
          "ruby-text",
          "grid-lanes",
          "inline-grid-lanes"
        ],
        "name": "display"
      },
      {
        "inherited": true,
        "keywords": [
          "auto",
          "alphabetic",
          "ideographic",
          "middle",
          "central",
          "mathematical",
          "hanging",
          "use-script",
          "no-change",
          "reset-size",
          "text-after-edge",
          "text-before-edge"
        ],
        "name": "dominant-baseline"
      },
      {
        "inherited": true,
        "keywords": [
          "standard",
          "no-limit",
          "constrained"
        ],
        "name": "dynamic-range-limit"
      },
      {
        "inherited": true,
        "keywords": [
          "show",
          "hide"
        ],
        "name": "empty-cells"
      },
      {
        "name": "fallback"
      },
      {
        "keywords": [
          "fixed",
          "content"
        ],
        "name": "field-sizing"
      },
      {
        "inherited": true,
        "name": "fill"
      },
      {
        "inherited": true,
        "name": "fill-opacity"
      },
      {
        "inherited": true,
        "keywords": [
          "nonzero",
          "evenodd"
        ],
        "name": "fill-rule"
      },
      {
        "keywords": [
          "none"
        ],
        "name": "filter"
      },
      {
        "longhands": [
          "flex-grow",
          "flex-shrink",
          "flex-basis"
        ],
        "name": "flex"
      },
      {
        "keywords": [
          "auto",
          "fit-content",
          "min-content",
          "max-content",
          "content"
        ],
        "name": "flex-basis"
      },
      {
        "keywords": [
          "row",
          "row-reverse",
          "column",
          "column-reverse"
        ],
        "name": "flex-direction"
      },
      {
        "longhands": [
          "flex-direction",
          "flex-wrap"
        ],
        "name": "flex-flow"
      },
      {
        "name": "flex-grow"
      },
      {
        "name": "flex-shrink"
      },
      {
        "keywords": [
          "nowrap",
          "wrap",
          "wrap-reverse",
          "balance"
        ],
        "name": "flex-wrap"
      },
      {
        "keywords": [
          "none",
          "left",
          "right",
          "inline-start",
          "inline-end"
        ],
        "name": "float"
      },
      {
        "keywords": [
          "currentcolor"
        ],
        "name": "flood-color"
      },
      {
        "name": "flood-opacity"
      },
      {
        "keywords": [
          "normal",
          "infinite"
        ],
        "name": "flow-tolerance"
      },
      {
        "inherited": true,
        "longhands": [
          "font-style",
          "font-variant-ligatures",
          "font-variant-caps",
          "font-variant-numeric",
          "font-variant-east-asian",
          "font-variant-alternates",
          "font-variant-position",
          "font-variant-emoji",
          "font-weight",
          "font-stretch",
          "font-size",
          "line-height",
          "font-family",
          "font-optical-sizing",
          "font-size-adjust",
          "font-kerning",
          "font-feature-settings",
          "font-variation-settings",
          "font-language-override"
        ],
        "name": "font"
      },
      {
        "name": "font-display"
      },
      {
        "inherited": true,
        "name": "font-family"
      },
      {
        "inherited": true,
        "keywords": [
          "normal"
        ],
        "name": "font-feature-settings"
      },
      {
        "inherited": true,
        "keywords": [
          "auto",
          "normal",
          "none"
        ],
        "name": "font-kerning"
      },
      {
        "inherited": true,
        "keywords": [
          "normal"
        ],
        "name": "font-language-override"
      },
      {
        "inherited": true,
        "keywords": [
          "auto",
          "none"
        ],
        "name": "font-optical-sizing"
      },
      {
        "inherited": true,
        "keywords": [
          "normal",
          "light",
          "dark"
        ],
        "name": "font-palette"
      },
      {
        "inherited": true,
        "keywords": [
          "xx-small",
          "x-small",
          "small",
          "medium",
          "large",
          "x-large",
          "xx-large",
          "xxx-large",
          "larger",
          "smaller",
          "-webkit-xxx-large"
        ],
        "name": "font-size"
      },
      {
        "inherited": true,
        "keywords": [
          "none",
          "ex-height",
          "cap-height",
          "ch-width",
          "ic-width",
          "ic-height",
          "from-font"
        ],
        "name": "font-size-adjust"
      },
      {
        "inherited": true,
        "keywords": [
          "normal",
          "ultra-condensed",
          "extra-condensed",
          "condensed",
          "semi-condensed",
          "semi-expanded",
          "expanded",
          "extra-expanded",
          "ultra-expanded"
        ],
        "name": "font-stretch"
      },
      {
        "inherited": true,
        "keywords": [
          "normal",
          "italic",
          "oblique"
        ],
        "name": "font-style"
      },
      {
        "inherited": true,
        "longhands": [
          "font-synthesis-weight",
          "font-synthesis-style",
          "font-synthesis-small-caps"
        ],
        "name": "font-synthesis"
      },
      {
        "inherited": true,
        "keywords": [
          "auto",
          "none"
        ],
        "name": "font-synthesis-small-caps"
      },
      {
        "inherited": true,
        "keywords": [
          "auto",
          "none"
        ],
        "name": "font-synthesis-style"
      },
      {
        "inherited": true,
        "keywords": [
          "auto",
          "none"
        ],
        "name": "font-synthesis-weight"
      },
      {
        "inherited": true,
        "longhands": [
          "font-variant-ligatures",
          "font-variant-caps",
          "font-variant-alternates",
          "font-variant-numeric",
          "font-variant-east-asian",
          "font-variant-position",
          "font-variant-emoji"
        ],
        "name": "font-variant"
      },
      {
        "inherited": true,
        "keywords": [
          "normal"
        ],
        "name": "font-variant-alternates"
      },
      {
        "inherited": true,
        "keywords": [
          "normal",
          "small-caps",
          "all-small-caps",
          "petite-caps",
          "all-petite-caps",
          "unicase",
          "titling-caps"
        ],
        "name": "font-variant-caps"
      },
      {
        "inherited": true,
        "keywords": [
          "normal",
          "jis78",
          "jis83",
          "jis90",
          "jis04",
          "simplified",
          "traditional",
          "full-width",
          "proportional-width",
          "ruby"
        ],
        "name": "font-variant-east-asian"
      },
      {
        "inherited": true,
        "keywords": [
          "normal",
          "text",
          "emoji",
          "unicode"
        ],
        "name": "font-variant-emoji"
      },
      {
        "inherited": true,
        "keywords": [
          "normal",
          "none",
          "common-ligatures",
          "no-common-ligatures",
          "discretionary-ligatures",
          "no-discretionary-ligatures",
          "historical-ligatures",
          "no-historical-ligatures",
          "contextual",
          "no-contextual"
        ],
        "name": "font-variant-ligatures"
      },
      {
        "inherited": true,
        "keywords": [
          "normal",
          "lining-nums",
          "oldstyle-nums",
          "proportional-nums",
          "tabular-nums",
          "diagonal-fractions",
          "stacked-fractions",
          "ordinal",
          "slashed-zero"
        ],
        "name": "font-variant-numeric"
      },
      {
        "inherited": true,
        "keywords": [
          "normal",
          "sub",
          "super"
        ],
        "name": "font-variant-position"
      },
      {
        "inherited": true,
        "keywords": [
          "normal"
        ],
        "name": "font-variation-settings"
      },
      {
        "inherited": true,
        "keywords": [
          "normal",
          "bold",
          "bolder",
          "lighter"
        ],
        "name": "font-weight"
      },
      {
        "inherited": true,
        "keywords": [
          "auto",
          "none",
          "preserve-parent-color"
        ],
        "name": "forced-color-adjust"
      },
      {
        "keywords": [
          "auto",
          "content-width",
          "content-height",
          "content-block-size",
          "content-inline-size"
        ],
        "name": "frame-sizing"
      },
      {
        "longhands": [
          "row-gap",
          "column-gap"
        ],
        "name": "gap"
      },
      {
        "longhands": [
          "grid-template-rows",
          "grid-template-columns",
          "grid-template-areas",
          "grid-auto-flow",
          "grid-auto-rows",
          "grid-auto-columns"
        ],
        "name": "grid"
      },
      {
        "longhands": [
          "grid-row-start",
          "grid-column-start",
          "grid-row-end",
          "grid-column-end"
        ],
        "name": "grid-area"
      },
      {
        "keywords": [
          "auto",
          "min-content",
          "max-content"
        ],
        "name": "grid-auto-columns"
      },
      {
        "keywords": [
          "row",
          "column"
        ],
        "name": "grid-auto-flow"
      },
      {
        "keywords": [
          "auto",
          "min-content",
          "max-content"
        ],
        "name": "grid-auto-rows"
      },
      {
        "longhands": [
          "grid-column-start",
          "grid-column-end"
        ],
        "name": "grid-column"
      },
      {
        "keywords": [
          "auto"
        ],
        "name": "grid-column-end"
      },
      {
        "keywords": [
          "auto"
        ],
        "name": "grid-column-start"
      },
      {
        "longhands": [
          "grid-template-areas",
          "grid-template-columns",
          "grid-template-rows",
          "grid-lanes-direction"
        ],
        "name": "grid-lanes"
      },
      {
        "keywords": [
          "normal",
          "row",
          "column",
          "fill-reverse",
          "track-reverse"
        ],
        "name": "grid-lanes-direction"
      },
      {
        "keywords": [
          "normal",
          "dense"
        ],
        "name": "grid-lanes-pack"
      },
      {
        "longhands": [
          "grid-row-start",
          "grid-row-end"
        ],
        "name": "grid-row"
      },
      {
        "keywords": [
          "auto"
        ],
        "name": "grid-row-end"
      },
      {
        "keywords": [
          "auto"
        ],
        "name": "grid-row-start"
      },
      {
        "longhands": [
          "grid-template-rows",
          "grid-template-columns",
          "grid-template-areas"
        ],
        "name": "grid-template"
      },
      {
        "keywords": [
          "none"
        ],
        "name": "grid-template-areas"
      },
      {
        "keywords": [
          "none"
        ],
        "name": "grid-template-columns"
      },
      {
        "keywords": [
          "none"
        ],
        "name": "grid-template-rows"
      },
      {
        "name": "hash"
      },
      {
        "keywords": [
          "auto",
          "fit-content",
          "min-content",
          "max-content"
        ],
        "name": "height"
      },
      {
        "name": "hostname"
      },
      {
        "inherited": true,
        "name": "hyphenate-character"
      },
      {
        "inherited": true,
        "keywords": [
          "auto"
        ],
        "name": "hyphenate-limit-chars"
      },
      {
        "inherited": true,
        "keywords": [
          "none",
          "manual",
          "auto"
        ],
        "name": "hyphens"
      },
      {
        "inherited": true,
        "keywords": [
          "normal",
          "running",
          "paused"
        ],
        "name": "image-animation"
      },
      {
        "inherited": true,
        "name": "image-orientation"
      },
      {
        "inherited": true,
        "keywords": [
          "auto",
          "optimizespeed",
          "optimizequality",
          "-webkit-optimize-contrast",
          "pixelated"
        ],
        "name": "image-rendering"
      },
      {
        "name": "inherits"
      },
      {
        "inherited": false,
        "keywords": [
          "drop",
          "normal",
          "raise"
        ],
        "name": "initial-letter"
      },
      {
        "name": "initial-value"
      },
      {
        "keywords": [
          "auto"
        ],
        "name": "inline-size"
      },
      {
        "longhands": [
          "top",
          "right",
          "bottom",
          "left"
        ],
        "name": "inset"
      },
      {
        "longhands": [
          "inset-block-start",
          "inset-block-end"
        ],
        "name": "inset-block"
      },
      {
        "name": "inset-block-end"
      },
      {
        "name": "inset-block-start"
      },
      {
        "longhands": [
          "inset-inline-start",
          "inset-inline-end"
        ],
        "name": "inset-inline"
      },
      {
        "name": "inset-inline-end"
      },
      {
        "name": "inset-inline-start"
      },
      {
        "inherited": true,
        "keywords": [
          "auto",
          "inert"
        ],
        "name": "interactivity"
      },
      {
        "longhands": [
          "interest-delay-start",
          "interest-delay-end"
        ],
        "name": "interest-delay"
      },
      {
        "name": "interest-delay-end"
      },
      {
        "name": "interest-delay-start"
      },
      {
        "inherited": true,
        "keywords": [
          "numeric-only",
          "allow-keywords"
        ],
        "name": "interpolate-size"
      },
      {
        "keywords": [
          "auto",
          "isolate"
        ],
        "name": "isolation"
      },
      {
        "name": "justify-content"
      },
      {
        "name": "justify-items"
      },
      {
        "name": "justify-self"
      },
      {
        "keywords": [
          "auto"
        ],
        "name": "left"
      },
      {
        "inherited": true,
        "keywords": [
          "normal"
        ],
        "name": "letter-spacing"
      },
      {
        "keywords": [
          "currentcolor"
        ],
        "name": "lighting-color"
      },
      {
        "inherited": true,
        "keywords": [
          "auto",
          "loose",
          "normal",
          "strict",
          "anywhere",
          "after-white-space"
        ],
        "name": "line-break"
      },
      {
        "longhands": [
          "max-lines",
          "block-ellipsis",
          "continue"
        ],
        "name": "line-clamp"
      },
      {
        "name": "line-gap-override"
      },
      {
        "inherited": true,
        "keywords": [
          "normal"
        ],
        "name": "line-height"
      },
      {
        "inherited": true,
        "longhands": [
          "list-style-position",
          "list-style-image",
          "list-style-type"
        ],
        "name": "list-style"
      },
      {
        "inherited": true,
        "keywords": [
          "none"
        ],
        "name": "list-style-image"
      },
      {
        "inherited": true,
        "keywords": [
          "outside",
          "inside"
        ],
        "name": "list-style-position"
      },
      {
        "inherited": true,
        "keywords": [
          "disc",
          "circle",
          "square",
          "disclosure-open",
          "disclosure-closed",
          "decimal",
          "none"
        ],
        "name": "list-style-type"
      },
      {
        "longhands": [
          "margin-top",
          "margin-right",
          "margin-bottom",
          "margin-left"
        ],
        "name": "margin"
      },
      {
        "longhands": [
          "margin-block-start",
          "margin-block-end"
        ],
        "name": "margin-block"
      },
      {
        "keywords": [
          "auto"
        ],
        "name": "margin-block-end"
      },
      {
        "keywords": [
          "auto"
        ],
        "name": "margin-block-start"
      },
      {
        "keywords": [
          "auto"
        ],
        "name": "margin-bottom"
      },
      {
        "longhands": [
          "margin-inline-start",
          "margin-inline-end"
        ],
        "name": "margin-inline"
      },
      {
        "keywords": [
          "auto"
        ],
        "name": "margin-inline-end"
      },
      {
        "keywords": [
          "auto"
        ],
        "name": "margin-inline-start"
      },
      {
        "keywords": [
          "auto"
        ],
        "name": "margin-left"
      },
      {
        "keywords": [
          "auto"
        ],
        "name": "margin-right"
      },
      {
        "keywords": [
          "auto"
        ],
        "name": "margin-top"
      },
      {
        "name": "margin-trim"
      },
      {
        "inherited": true,
        "longhands": [
          "marker-start",
          "marker-mid",
          "marker-end"
        ],
        "name": "marker"
      },
      {
        "inherited": true,
        "keywords": [
          "none"
        ],
        "name": "marker-end"
      },
      {
        "inherited": true,
        "keywords": [
          "none"
        ],
        "name": "marker-mid"
      },
      {
        "inherited": true,
        "keywords": [
          "none"
        ],
        "name": "marker-start"
      },
      {
        "longhands": [
          "mask-image",
          "-webkit-mask-position-x",
          "-webkit-mask-position-y",
          "mask-size",
          "mask-repeat",
          "mask-origin",
          "mask-clip",
          "mask-composite",
          "mask-mode"
        ],
        "name": "mask"
      },
      {
        "name": "mask-clip"
      },
      {
        "keywords": [
          "add",
          "subtract",
          "intersect",
          "exclude"
        ],
        "name": "mask-composite"
      },
      {
        "name": "mask-image"
      },
      {
        "keywords": [
          "alpha",
          "luminance",
          "match-source"
        ],
        "name": "mask-mode"
      },
      {
        "name": "mask-origin"
      },
      {
        "longhands": [
          "-webkit-mask-position-x",
          "-webkit-mask-position-y"
        ],
        "name": "mask-position"
      },
      {
        "name": "mask-repeat"
      },
      {
        "name": "mask-size"
      },
      {
        "keywords": [
          "luminance",
          "alpha"
        ],
        "name": "mask-type"
      },
      {
        "inherited": true,
        "name": "math-depth"
      },
      {
        "inherited": true,
        "keywords": [
          "normal",
          "compact"
        ],
        "name": "math-shift"
      },
      {
        "inherited": true,
        "keywords": [
          "normal",
          "compact"
        ],
        "name": "math-style"
      },
      {
        "keywords": [
          "none"
        ],
        "name": "max-block-size"
      },
      {
        "keywords": [
          "none"
        ],
        "name": "max-height"
      },
      {
        "keywords": [
          "none"
        ],
        "name": "max-inline-size"
      },
      {
        "keywords": [
          "none"
        ],
        "name": "max-lines"
      },
      {
        "keywords": [
          "none"
        ],
        "name": "max-width"
      },
      {
        "name": "min-block-size"
      },
      {
        "name": "min-height"
      },
      {
        "name": "min-inline-size"
      },
      {
        "name": "min-width"
      },
      {
        "keywords": [
          "normal",
          "multiply",
          "screen",
          "overlay",
          "darken",
          "lighten",
          "color-dodge",
          "color-burn",
          "hard-light",
          "soft-light",
          "difference",
          "exclusion",
          "hue",
          "saturation",
          "color",
          "luminosity",
          "plus-lighter"
        ],
        "name": "mix-blend-mode"
      },
      {
        "name": "navigation"
      },
      {
        "name": "negative"
      },
      {
        "keywords": [
          "fill",
          "contain",
          "cover",
          "none",
          "scale-down"
        ],
        "name": "object-fit"
      },
      {
        "name": "object-position"
      },
      {
        "keywords": [
          "none"
        ],
        "name": "object-view-box"
      },
      {
        "longhands": [
          "offset-position",
          "offset-path",
          "offset-distance",
          "offset-rotate",
          "offset-anchor"
        ],
        "name": "offset"
      },
      {
        "keywords": [
          "auto"
        ],
        "name": "offset-anchor"
      },
      {
        "name": "offset-distance"
      },
      {
        "keywords": [
          "none"
        ],
        "name": "offset-path"
      },
      {
        "keywords": [
          "auto",
          "normal"
        ],
        "name": "offset-position"
      },
      {
        "keywords": [
          "auto",
          "reverse"
        ],
        "name": "offset-rotate"
      },
      {
        "name": "opacity"
      },
      {
        "name": "order"
      },
      {
        "keywords": [
          "normal",
          "none"
        ],
        "name": "origin-trial-test-property"
      },
      {
        "inherited": true,
        "name": "orphans"
      },
      {
        "longhands": [
          "outline-color",
          "outline-style",
          "outline-width"
        ],
        "name": "outline"
      },
      {
        "keywords": [
          "currentcolor"
        ],
        "name": "outline-color"
      },
      {
        "name": "outline-offset"
      },
      {
        "keywords": [
          "none",
          "hidden",
          "inset",
          "groove",
          "outset",
          "ridge",
          "dotted",
          "dashed",
          "solid",
          "double"
        ],
        "name": "outline-style"
      },
      {
        "keywords": [
          "thin",
          "medium",
          "thick"
        ],
        "name": "outline-width"
      },
      {
        "longhands": [
          "overflow-x",
          "overflow-y"
        ],
        "name": "overflow"
      },
      {
        "inherited": false,
        "keywords": [
          "visible",
          "none",
          "auto"
        ],
        "name": "overflow-anchor"
      },
      {
        "name": "overflow-block"
      },
      {
        "keywords": [
          "border-box",
          "content-box",
          "padding-box"
        ],
        "name": "overflow-clip-margin"
      },
      {
        "name": "overflow-inline"
      },
      {
        "inherited": true,
        "keywords": [
          "normal",
          "break-word",
          "anywhere"
        ],
        "name": "overflow-wrap"
      },
      {
        "keywords": [
          "visible",
          "hidden",
          "scroll",
          "auto",
          "overlay",
          "clip"
        ],
        "name": "overflow-x"
      },
      {
        "keywords": [
          "visible",
          "hidden",
          "scroll",
          "auto",
          "overlay",
          "clip"
        ],
        "name": "overflow-y"
      },
      {
        "keywords": [
          "none",
          "auto"
        ],
        "name": "overlay"
      },
      {
        "name": "override-colors"
      },
      {
        "longhands": [
          "overscroll-behavior-x",
          "overscroll-behavior-y"
        ],
        "name": "overscroll-behavior"
      },
      {
        "name": "overscroll-behavior-block"
      },
      {
        "name": "overscroll-behavior-inline"
      },
      {
        "keywords": [
          "auto",
          "contain",
          "none"
        ],
        "name": "overscroll-behavior-x"
      },
      {
        "keywords": [
          "auto",
          "contain",
          "none"
        ],
        "name": "overscroll-behavior-y"
      },
      {
        "name": "pad"
      },
      {
        "longhands": [
          "padding-top",
          "padding-right",
          "padding-bottom",
          "padding-left"
        ],
        "name": "padding"
      },
      {
        "longhands": [
          "padding-block-start",
          "padding-block-end"
        ],
        "name": "padding-block"
      },
      {
        "name": "padding-block-end"
      },
      {
        "name": "padding-block-start"
      },
      {
        "name": "padding-bottom"
      },
      {
        "longhands": [
          "padding-inline-start",
          "padding-inline-end"
        ],
        "name": "padding-inline"
      },
      {
        "name": "padding-inline-end"
      },
      {
        "name": "padding-inline-start"
      },
      {
        "name": "padding-left"
      },
      {
        "name": "padding-right"
      },
      {
        "name": "padding-top"
      },
      {
        "keywords": [
          "auto"
        ],
        "name": "page"
      },
      {
        "longhands": [
          "break-after"
        ],
        "name": "page-break-after"
      },
      {
        "longhands": [
          "break-before"
        ],
        "name": "page-break-before"
      },
      {
        "longhands": [
          "break-inside"
        ],
        "name": "page-break-inside"
      },
      {
        "keywords": [
          "none",
          "clamp",
          "add"
        ],
        "name": "page-margin-safety"
      },
      {
        "name": "page-orientation"
      },
      {
        "inherited": true,
        "keywords": [
          "normal",
          "fill",
          "stroke",
          "markers"
        ],
        "name": "paint-order"
      },
      {
        "name": "pathname"
      },
      {
        "name": "pattern"
      },
      {
        "keywords": [
          "none"
        ],
        "name": "perspective"
      },
      {
        "name": "perspective-origin"
      },
      {
        "longhands": [
          "align-content",
          "justify-content"
        ],
        "name": "place-content"
      },
      {
        "longhands": [
          "align-items",
          "justify-items"
        ],
        "name": "place-items"
      },
      {
        "longhands": [
          "align-self",
          "justify-self"
        ],
        "name": "place-self"
      },
      {
        "inherited": true,
        "keywords": [
          "none",
          "auto",
          "stroke",
          "fill",
          "painted",
          "visible",
          "visiblestroke",
          "visiblefill",
          "visiblepainted",
          "bounding-box",
          "all"
        ],
        "name": "pointer-events"
      },
      {
        "name": "port"
      },
      {
        "keywords": [
          "static",
          "relative",
          "absolute",
          "fixed",
          "sticky"
        ],
        "name": "position"
      },
      {
        "keywords": [
          "auto",
          "none"
        ],
        "name": "position-anchor"
      },
      {
        "keywords": [
          "none",
          "top",
          "bottom",
          "center",
          "left",
          "right",
          "x-start",
          "x-end",
          "y-start",
          "y-end",
          "start",
          "end",
          "self-start",
          "self-end",
          "all"
        ],
        "name": "position-area"
      },
      {
        "longhands": [
          "position-try-order",
          "position-try-fallbacks"
        ],
        "name": "position-try"
      },
      {
        "keywords": [
          "none",
          "flip-block",
          "flip-inline",
          "flip-start",
          "flip-x",
          "flip-y"
        ],
        "name": "position-try-fallbacks"
      },
      {
        "keywords": [
          "normal",
          "most-width",
          "most-height",
          "most-block-size",
          "most-inline-size"
        ],
        "name": "position-try-order"
      },
      {
        "keywords": [
          "always",
          "anchors-visible",
          "no-overflow"
        ],
        "name": "position-visibility"
      },
      {
        "name": "prefix"
      },
      {
        "inherited": true,
        "keywords": [
          "economy",
          "exact"
        ],
        "name": "print-color-adjust"
      },
      {
        "name": "protocol"
      },
      {
        "inherited": true,
        "keywords": [
          "auto",
          "none"
        ],
        "name": "quotes"
      },
      {
        "name": "r"
      },
      {
        "name": "range"
      },
      {
        "keywords": [
          "normal",
          "flex-visual",
          "flex-flow",
          "grid-rows",
          "grid-columns",
          "grid-order",
          "source-order"
        ],
        "name": "reading-flow"
      },
      {
        "name": "reading-order"
      },
      {
        "keywords": [
          "none",
          "both",
          "horizontal",
          "vertical",
          "block",
          "inline"
        ],
        "name": "resize"
      },
      {
        "name": "result"
      },
      {
        "keywords": [
          "auto"
        ],
        "name": "right"
      },
      {
        "name": "rotate"
      },
      {
        "keywords": [
          "normal"
        ],
        "name": "row-gap"
      },
      {
        "longhands": [
          "row-rule-width",
          "row-rule-style",
          "row-rule-color"
        ],
        "name": "row-rule"
      },
      {
        "inherited": false,
        "keywords": [
          "none",
          "normal",
          "intersection"
        ],
        "name": "row-rule-break"
      },
      {
        "keywords": [
          "currentcolor"
        ],
        "name": "row-rule-color"
      },
      {
        "longhands": [
          "row-rule-edge-inset-start",
          "row-rule-edge-inset-end"
        ],
        "name": "row-rule-edge-inset"
      },
      {
        "inherited": false,
        "name": "row-rule-edge-inset-end"
      },
      {
        "inherited": false,
        "name": "row-rule-edge-inset-start"
      },
      {
        "longhands": [
          "row-rule-edge-inset-start",
          "row-rule-edge-inset-end",
          "row-rule-interior-inset-start",
          "row-rule-interior-inset-end"
        ],
        "name": "row-rule-inset"
      },
      {
        "longhands": [
          "row-rule-edge-inset-end",
          "row-rule-interior-inset-end"
        ],
        "name": "row-rule-inset-end"
      },
      {
        "longhands": [
          "row-rule-edge-inset-start",
          "row-rule-interior-inset-start"
        ],
        "name": "row-rule-inset-start"
      },
      {
        "longhands": [
          "row-rule-interior-inset-start",
          "row-rule-interior-inset-end"
        ],
        "name": "row-rule-interior-inset"
      },
      {
        "inherited": false,
        "name": "row-rule-interior-inset-end"
      },
      {
        "inherited": false,
        "name": "row-rule-interior-inset-start"
      },
      {
        "keywords": [
          "none",
          "hidden",
          "inset",
          "groove",
          "outset",
          "ridge",
          "dotted",
          "dashed",
          "solid",
          "double"
        ],
        "name": "row-rule-style"
      },
      {
        "inherited": false,
        "keywords": [
          "all",
          "auto",
          "around",
          "between"
        ],
        "name": "row-rule-visibility-items"
      },
      {
        "keywords": [
          "thin",
          "medium",
          "thick"
        ],
        "name": "row-rule-width"
      },
      {
        "inherited": true,
        "keywords": [
          "space-around",
          "start",
          "center",
          "space-between"
        ],
        "name": "ruby-align"
      },
      {
        "inherited": true,
        "keywords": [
          "auto",
          "none"
        ],
        "name": "ruby-overhang"
      },
      {
        "inherited": true,
        "keywords": [
          "over",
          "under"
        ],
        "name": "ruby-position"
      },
      {
        "longhands": [
          "column-rule-width",
          "column-rule-style",
          "column-rule-color",
          "row-rule-width",
          "row-rule-style",
          "row-rule-color"
        ],
        "name": "rule"
      },
      {
        "longhands": [
          "row-rule-break",
          "column-rule-break"
        ],
        "name": "rule-break"
      },
      {
        "longhands": [
          "column-rule-color",
          "row-rule-color"
        ],
        "name": "rule-color"
      },
      {
        "longhands": [
          "row-rule-edge-inset-start",
          "row-rule-edge-inset-end",
          "column-rule-edge-inset-start",
          "column-rule-edge-inset-end"
        ],
        "name": "rule-edge-inset"
      },
      {
        "longhands": [
          "row-rule-edge-inset-start",
          "row-rule-edge-inset-end",
          "row-rule-interior-inset-start",
          "row-rule-interior-inset-end",
          "column-rule-edge-inset-start",
          "column-rule-edge-inset-end",
          "column-rule-interior-inset-start",
          "column-rule-interior-inset-end"
        ],
        "name": "rule-inset"
      },
      {
        "longhands": [
          "column-rule-edge-inset-end",
          "column-rule-interior-inset-end",
          "row-rule-edge-inset-end",
          "row-rule-interior-inset-end"
        ],
        "name": "rule-inset-end"
      },
      {
        "longhands": [
          "column-rule-edge-inset-start",
          "column-rule-interior-inset-start",
          "row-rule-edge-inset-start",
          "row-rule-interior-inset-start"
        ],
        "name": "rule-inset-start"
      },
      {
        "longhands": [
          "row-rule-interior-inset-start",
          "row-rule-interior-inset-end",
          "column-rule-interior-inset-start",
          "column-rule-interior-inset-end"
        ],
        "name": "rule-interior-inset"
      },
      {
        "inherited": false,
        "keywords": [
          "row-over-column",
          "column-over-row"
        ],
        "name": "rule-overlap"
      },
      {
        "longhands": [
          "column-rule-style",
          "row-rule-style"
        ],
        "name": "rule-style"
      },
      {
        "longhands": [
          "column-rule-visibility-items",
          "row-rule-visibility-items"
        ],
        "name": "rule-visibility-items"
      },
      {
        "longhands": [
          "column-rule-width",
          "row-rule-width"
        ],
        "name": "rule-width"
      },
      {
        "keywords": [
          "auto"
        ],
        "name": "rx"
      },
      {
        "keywords": [
          "auto"
        ],
        "name": "ry"
      },
      {
        "name": "scale"
      },
      {
        "keywords": [
          "auto",
          "smooth"
        ],
        "name": "scroll-behavior"
      },
      {
        "keywords": [
          "none",
          "nearest"
        ],
        "name": "scroll-initial-target"
      },
      {
        "longhands": [
          "scroll-margin-top",
          "scroll-margin-right",
          "scroll-margin-bottom",
          "scroll-margin-left"
        ],
        "name": "scroll-margin"
      },
      {
        "longhands": [
          "scroll-margin-block-start",
          "scroll-margin-block-end"
        ],
        "name": "scroll-margin-block"
      },
      {
        "name": "scroll-margin-block-end"
      },
      {
        "name": "scroll-margin-block-start"
      },
      {
        "name": "scroll-margin-bottom"
      },
      {
        "longhands": [
          "scroll-margin-inline-start",
          "scroll-margin-inline-end"
        ],
        "name": "scroll-margin-inline"
      },
      {
        "name": "scroll-margin-inline-end"
      },
      {
        "name": "scroll-margin-inline-start"
      },
      {
        "name": "scroll-margin-left"
      },
      {
        "name": "scroll-margin-right"
      },
      {
        "name": "scroll-margin-top"
      },
      {
        "name": "scroll-marker-group"
      },
      {
        "longhands": [
          "scroll-padding-top",
          "scroll-padding-right",
          "scroll-padding-bottom",
          "scroll-padding-left"
        ],
        "name": "scroll-padding"
      },
      {
        "longhands": [
          "scroll-padding-block-start",
          "scroll-padding-block-end"
        ],
        "name": "scroll-padding-block"
      },
      {
        "keywords": [
          "auto"
        ],
        "name": "scroll-padding-block-end"
      },
      {
        "keywords": [
          "auto"
        ],
        "name": "scroll-padding-block-start"
      },
      {
        "keywords": [
          "auto"
        ],
        "name": "scroll-padding-bottom"
      },
      {
        "longhands": [
          "scroll-padding-inline-start",
          "scroll-padding-inline-end"
        ],
        "name": "scroll-padding-inline"
      },
      {
        "keywords": [
          "auto"
        ],
        "name": "scroll-padding-inline-end"
      },
      {
        "keywords": [
          "auto"
        ],
        "name": "scroll-padding-inline-start"
      },
      {
        "keywords": [
          "auto"
        ],
        "name": "scroll-padding-left"
      },
      {
        "keywords": [
          "auto"
        ],
        "name": "scroll-padding-right"
      },
      {
        "keywords": [
          "auto"
        ],
        "name": "scroll-padding-top"
      },
      {
        "keywords": [
          "none",
          "start",
          "end",
          "center"
        ],
        "name": "scroll-snap-align"
      },
      {
        "keywords": [
          "normal",
          "always"
        ],
        "name": "scroll-snap-stop"
      },
      {
        "keywords": [
          "none",
          "x",
          "y",
          "block",
          "inline",
          "both",
          "mandatory",
          "proximity"
        ],
        "name": "scroll-snap-type"
      },
      {
        "keywords": [
          "none",
          "auto"
        ],
        "name": "scroll-target-group"
      },
      {
        "longhands": [
          "scroll-timeline-name",
          "scroll-timeline-axis"
        ],
        "name": "scroll-timeline"
      },
      {
        "name": "scroll-timeline-axis"
      },
      {
        "name": "scroll-timeline-name"
      },
      {
        "inherited": true,
        "keywords": [
          "auto"
        ],
        "name": "scrollbar-color"
      },
      {
        "inherited": false,
        "keywords": [
          "auto",
          "stable",
          "both-edges"
        ],
        "name": "scrollbar-gutter"
      },
      {
        "inherited": false,
        "keywords": [
          "auto",
          "thin",
          "none"
        ],
        "name": "scrollbar-width"
      },
      {
        "name": "search"
      },
      {
        "name": "shape-image-threshold"
      },
      {
        "keywords": [
          "none"
        ],
        "name": "shape-margin"
      },
      {
        "keywords": [
          "none"
        ],
        "name": "shape-outside"
      },
      {
        "inherited": true,
        "keywords": [
          "auto",
          "optimizespeed",
          "crispedges",
          "geometricprecision"
        ],
        "name": "shape-rendering"
      },
      {
        "name": "size"
      },
      {
        "name": "size-adjust"
      },
      {
        "inherited": true,
        "keywords": [
          "none",
          "normal",
          "spell-out",
          "digits",
          "literal-punctuation",
          "no-punctuation"
        ],
        "name": "speak"
      },
      {
        "name": "speak-as"
      },
      {
        "name": "src"
      },
      {
        "keywords": [
          "currentcolor"
        ],
        "name": "stop-color"
      },
      {
        "name": "stop-opacity"
      },
      {
        "inherited": true,
        "name": "stroke"
      },
      {
        "inherited": true,
        "keywords": [
          "none"
        ],
        "name": "stroke-dasharray"
      },
      {
        "inherited": true,
        "name": "stroke-dashoffset"
      },
      {
        "inherited": true,
        "keywords": [
          "butt",
          "round",
          "square"
        ],
        "name": "stroke-linecap"
      },
      {
        "inherited": true,
        "keywords": [
          "miter",
          "bevel",
          "round"
        ],
        "name": "stroke-linejoin"
      },
      {
        "inherited": true,
        "name": "stroke-miterlimit"
      },
      {
        "inherited": true,
        "name": "stroke-opacity"
      },
      {
        "inherited": true,
        "name": "stroke-width"
      },
      {
        "name": "suffix"
      },
      {
        "name": "symbols"
      },
      {
        "name": "syntax"
      },
      {
        "name": "system"
      },
      {
        "inherited": true,
        "name": "tab-size"
      },
      {
        "keywords": [
          "auto",
          "fixed"
        ],
        "name": "table-layout"
      },
      {
        "inherited": true,
        "keywords": [
          "left",
          "right",
          "center",
          "justify",
          "-webkit-left",
          "-webkit-right",
          "-webkit-center",
          "start",
          "end",
          "match-parent"
        ],
        "name": "text-align"
      },
      {
        "inherited": true,
        "keywords": [
          "auto",
          "start",
          "end",
          "left",
          "right",
          "center",
          "justify",
          "match-parent"
        ],
        "name": "text-align-last"
      },
      {
        "inherited": true,
        "keywords": [
          "start",
          "middle",
          "end"
        ],
        "name": "text-anchor"
      },
      {
        "inherited": true,
        "keywords": [
          "no-autospace",
          "normal"
        ],
        "name": "text-autospace"
      },
      {
        "longhands": [
          "text-box-trim",
          "text-box-edge"
        ],
        "name": "text-box"
      },
      {
        "inherited": true,
        "name": "text-box-edge"
      },
      {
        "keywords": [
          "none",
          "trim-start",
          "trim-end",
          "trim-both"
        ],
        "name": "text-box-trim"
      },
      {
        "inherited": true,
        "keywords": [
          "none",
          "all"
        ],
        "name": "text-combine-upright"
      },
      {
        "longhands": [
          "text-decoration-line",
          "text-decoration-thickness",
          "text-decoration-style",
          "text-decoration-color"
        ],
        "name": "text-decoration"
      },
      {
        "keywords": [
          "currentcolor"
        ],
        "name": "text-decoration-color"
      },
      {
        "keywords": [
          "none",
          "underline",
          "overline",
          "line-through",
          "blink",
          "spelling-error",
          "grammar-error"
        ],
        "name": "text-decoration-line"
      },
      {
        "inherited": true,
        "keywords": [
          "none",
          "auto",
          "all"
        ],
        "name": "text-decoration-skip-ink"
      },
      {
        "keywords": [
          "solid",
          "double",
          "dotted",
          "dashed",
          "wavy"
        ],
        "name": "text-decoration-style"
      },
      {
        "inherited": false,
        "keywords": [
          "auto",
          "from-font"
        ],
        "name": "text-decoration-thickness"
      },
      {
        "inherited": true,
        "longhands": [
          "text-emphasis-style",
          "text-emphasis-color"
        ],
        "name": "text-emphasis"
      },
      {
        "inherited": true,
        "keywords": [
          "currentcolor"
        ],
        "name": "text-emphasis-color"
      },
      {
        "inherited": true,
        "name": "text-emphasis-position"
      },
      {
        "inherited": true,
        "name": "text-emphasis-style"
      },
      {
        "name": "text-fit"
      },
      {
        "inherited": true,
        "name": "text-indent"
      },
      {
        "inherited": true,
        "keywords": [
          "auto",
          "none",
          "inter-word",
          "inter-character"
        ],
        "name": "text-justify"
      },
      {
        "inherited": true,
        "keywords": [
          "sideways",
          "mixed",
          "upright"
        ],
        "name": "text-orientation"
      },
      {
        "keywords": [
          "clip",
          "ellipsis"
        ],
        "name": "text-overflow"
      },
      {
        "inherited": true,
        "keywords": [
          "auto",
          "optimizespeed",
          "optimizelegibility",
          "geometricprecision"
        ],
        "name": "text-rendering"
      },
      {
        "inherited": true,
        "keywords": [
          "none"
        ],
        "name": "text-shadow"
      },
      {
        "inherited": true,
        "keywords": [
          "none",
          "auto"
        ],
        "name": "text-size-adjust"
      },
      {
        "inherited": true,
        "longhands": [
          "text-autospace",
          "text-spacing-trim"
        ],
        "name": "text-spacing"
      },
      {
        "inherited": true,
        "keywords": [
          "normal",
          "space-all",
          "space-first",
          "trim-start"
        ],
        "name": "text-spacing-trim"
      },
      {
        "inherited": true,
        "keywords": [
          "none",
          "capitalize",
          "uppercase",
          "lowercase",
          "full-width",
          "full-size-kana",
          "math-auto"
        ],
        "name": "text-transform"
      },
      {
        "inherited": true,
        "keywords": [
          "auto"
        ],
        "name": "text-underline-offset"
      },
      {
        "inherited": true,
        "keywords": [
          "auto",
          "from-font",
          "under",
          "left",
          "right"
        ],
        "name": "text-underline-position"
      },
      {
        "inherited": true,
        "longhands": [
          "text-wrap-mode",
          "text-wrap-style"
        ],
        "name": "text-wrap"
      },
      {
        "inherited": true,
        "keywords": [
          "wrap",
          "nowrap"
        ],
        "name": "text-wrap-mode"
      },
      {
        "inherited": true,
        "keywords": [
          "auto",
          "balance",
          "pretty",
          "stable"
        ],
        "name": "text-wrap-style"
      },
      {
        "name": "timeline-scope"
      },
      {
        "longhands": [
          "timeline-trigger-name",
          "timeline-trigger-source",
          "timeline-trigger-activation-range-start",
          "timeline-trigger-activation-range-end",
          "timeline-trigger-active-range-start",
          "timeline-trigger-active-range-end"
        ],
        "name": "timeline-trigger"
      },
      {
        "longhands": [
          "timeline-trigger-activation-range-start",
          "timeline-trigger-activation-range-end"
        ],
        "name": "timeline-trigger-activation-range"
      },
      {
        "name": "timeline-trigger-activation-range-end"
      },
      {
        "name": "timeline-trigger-activation-range-start"
      },
      {
        "longhands": [
          "timeline-trigger-active-range-start",
          "timeline-trigger-active-range-end"
        ],
        "name": "timeline-trigger-active-range"
      },
      {
        "name": "timeline-trigger-active-range-end"
      },
      {
        "name": "timeline-trigger-active-range-start"
      },
      {
        "name": "timeline-trigger-name"
      },
      {
        "keywords": [
          "none",
          "auto"
        ],
        "name": "timeline-trigger-source"
      },
      {
        "keywords": [
          "auto"
        ],
        "name": "top"
      },
      {
        "keywords": [
          "auto",
          "none",
          "pan-x",
          "pan-left",
          "pan-right",
          "pan-y",
          "pan-up",
          "pan-down",
          "pinch-zoom",
          "manipulation"
        ],
        "name": "touch-action"
      },
      {
        "keywords": [
          "none"
        ],
        "name": "transform"
      },
      {
        "keywords": [
          "content-box",
          "border-box",
          "fill-box",
          "stroke-box",
          "view-box"
        ],
        "name": "transform-box"
      },
      {
        "name": "transform-origin"
      },
      {
        "keywords": [
          "flat",
          "preserve-3d"
        ],
        "name": "transform-style"
      },
      {
        "longhands": [
          "transition-property",
          "transition-duration",
          "transition-timing-function",
          "transition-delay",
          "transition-behavior"
        ],
        "name": "transition"
      },
      {
        "keywords": [
          "normal",
          "allow-discrete"
        ],
        "name": "transition-behavior"
      },
      {
        "name": "transition-delay"
      },
      {
        "name": "transition-duration"
      },
      {
        "keywords": [
          "none"
        ],
        "name": "transition-property"
      },
      {
        "keywords": [
          "linear",
          "ease",
          "ease-in",
          "ease-out",
          "ease-in-out",
          "jump-both",
          "jump-end",
          "jump-none",
          "jump-start",
          "step-start",
          "step-end"
        ],
        "name": "transition-timing-function"
      },
      {
        "name": "translate"
      },
      {
        "keywords": [
          "none",
          "all"
        ],
        "name": "trigger-scope"
      },
      {
        "name": "types"
      },
      {
        "keywords": [
          "normal",
          "embed",
          "bidi-override",
          "isolate",
          "plaintext",
          "isolate-override"
        ],
        "name": "unicode-bidi"
      },
      {
        "name": "unicode-range"
      },
      {
        "inherited": true,
        "keywords": [
          "auto",
          "none",
          "text",
          "all",
          "contain"
        ],
        "name": "user-select"
      },
      {
        "keywords": [
          "none",
          "non-scaling-stroke"
        ],
        "name": "vector-effect"
      },
      {
        "keywords": [
          "baseline",
          "sub",
          "super",
          "text-top",
          "text-bottom",
          "middle"
        ],
        "name": "vertical-align"
      },
      {
        "longhands": [
          "view-timeline-name",
          "view-timeline-axis",
          "view-timeline-inset"
        ],
        "name": "view-timeline"
      },
      {
        "name": "view-timeline-axis"
      },
      {
        "name": "view-timeline-inset"
      },
      {
        "name": "view-timeline-name"
      },
      {
        "keywords": [
          "none"
        ],
        "name": "view-transition-class"
      },
      {
        "keywords": [
          "normal",
          "contain",
          "nearest"
        ],
        "name": "view-transition-group"
      },
      {
        "keywords": [
          "none",
          "auto"
        ],
        "name": "view-transition-name"
      },
      {
        "inherited": false,
        "keywords": [
          "none",
          "auto"
        ],
        "name": "view-transition-scope"
      },
      {
        "inherited": true,
        "keywords": [
          "visible",
          "hidden",
          "collapse"
        ],
        "name": "visibility"
      },
      {
        "inherited": true,
        "longhands": [
          "white-space-collapse",
          "text-wrap-mode"
        ],
        "name": "white-space"
      },
      {
        "inherited": true,
        "keywords": [
          "collapse",
          "preserve",
          "preserve-breaks",
          "break-spaces"
        ],
        "name": "white-space-collapse"
      },
      {
        "inherited": true,
        "name": "widows"
      },
      {
        "keywords": [
          "auto",
          "fit-content",
          "min-content",
          "max-content"
        ],
        "name": "width"
      },
      {
        "keywords": [
          "auto"
        ],
        "name": "will-change"
      },
      {
        "inherited": true,
        "keywords": [
          "normal",
          "break-all",
          "keep-all",
          "break-word",
          "auto-phrase"
        ],
        "name": "word-break"
      },
      {
        "inherited": true,
        "keywords": [
          "normal"
        ],
        "name": "word-spacing"
      },
      {
        "inherited": true,
        "keywords": [
          "horizontal-tb",
          "vertical-rl",
          "vertical-lr",
          "sideways-rl",
          "sideways-lr"
        ],
        "name": "writing-mode"
      },
      {
        "name": "x"
      },
      {
        "name": "y"
      },
      {
        "keywords": [
          "auto"
        ],
        "name": "z-index"
      },
      {
        "name": "zoom"
      }
    ];
    generatedPropertyValues = {
      "-webkit-box-align": {
        "values": [
          "stretch",
          "start",
          "center",
          "end",
          "baseline"
        ]
      },
      "-webkit-box-decoration-break": {
        "values": [
          "slice",
          "clone"
        ]
      },
      "-webkit-box-direction": {
        "values": [
          "normal",
          "reverse"
        ]
      },
      "-webkit-box-orient": {
        "values": [
          "horizontal",
          "vertical"
        ]
      },
      "-webkit-box-pack": {
        "values": [
          "start",
          "center",
          "end",
          "justify"
        ]
      },
      "-webkit-line-break": {
        "values": [
          "auto",
          "loose",
          "normal",
          "strict",
          "after-white-space"
        ]
      },
      "-webkit-line-clamp": {
        "values": [
          "none"
        ]
      },
      "-webkit-rtl-ordering": {
        "values": [
          "logical",
          "visual"
        ]
      },
      "-webkit-text-security": {
        "values": [
          "none",
          "disc",
          "circle",
          "square"
        ]
      },
      "-webkit-user-drag": {
        "values": [
          "auto",
          "none",
          "element"
        ]
      },
      "-webkit-user-modify": {
        "values": [
          "read-only",
          "read-write",
          "read-write-plaintext-only"
        ]
      },
      "accent-color": {
        "values": [
          "auto",
          "currentcolor"
        ]
      },
      "alignment-baseline": {
        "values": [
          "auto",
          "baseline",
          "alphabetic",
          "ideographic",
          "middle",
          "central",
          "mathematical",
          "before-edge",
          "text-before-edge",
          "after-edge",
          "text-after-edge",
          "hanging"
        ]
      },
      "anchor-name": {
        "values": [
          "none"
        ]
      },
      "anchor-scope": {
        "values": [
          "none",
          "all"
        ]
      },
      "animation-composition": {
        "values": [
          "replace",
          "add",
          "accumulate"
        ]
      },
      "animation-direction": {
        "values": [
          "normal",
          "reverse",
          "alternate",
          "alternate-reverse"
        ]
      },
      "animation-fill-mode": {
        "values": [
          "none",
          "forwards",
          "backwards",
          "both"
        ]
      },
      "animation-iteration-count": {
        "values": [
          "infinite"
        ]
      },
      "animation-name": {
        "values": [
          "none"
        ]
      },
      "animation-play-state": {
        "values": [
          "running",
          "paused"
        ]
      },
      "animation-timeline": {
        "values": [
          "none",
          "auto"
        ]
      },
      "animation-timing-function": {
        "values": [
          "linear",
          "ease",
          "ease-in",
          "ease-out",
          "ease-in-out",
          "jump-both",
          "jump-end",
          "jump-none",
          "jump-start",
          "step-start",
          "step-end"
        ]
      },
      "animation-trigger": {
        "values": [
          "none"
        ]
      },
      "app-region": {
        "values": [
          "none",
          "drag",
          "no-drag"
        ]
      },
      "aspect-ratio": {
        "values": [
          "auto"
        ]
      },
      "backdrop-filter": {
        "values": [
          "none"
        ]
      },
      "backface-visibility": {
        "values": [
          "visible",
          "hidden"
        ]
      },
      "background-attachment": {
        "values": [
          "scroll",
          "fixed",
          "local"
        ]
      },
      "background-blend-mode": {
        "values": [
          "normal",
          "multiply",
          "screen",
          "overlay",
          "darken",
          "lighten",
          "color-dodge",
          "color-burn",
          "hard-light",
          "soft-light",
          "difference",
          "exclusion",
          "hue",
          "saturation",
          "color",
          "luminosity"
        ]
      },
      "background-clip": {
        "values": [
          "border-box",
          "padding-box",
          "content-box",
          "text"
        ]
      },
      "background-color": {
        "values": [
          "currentcolor"
        ]
      },
      "background-image": {
        "values": [
          "auto",
          "none"
        ]
      },
      "background-origin": {
        "values": [
          "border-box",
          "padding-box",
          "content-box"
        ]
      },
      "background-size": {
        "values": [
          "auto",
          "cover",
          "contain"
        ]
      },
      "baseline-shift": {
        "values": [
          "baseline",
          "sub",
          "super"
        ]
      },
      "baseline-source": {
        "values": [
          "auto",
          "first",
          "last"
        ]
      },
      "block-ellipsis": {
        "values": [
          "auto",
          "no-ellipsis"
        ]
      },
      "block-size": {
        "values": [
          "auto"
        ]
      },
      "border-bottom-color": {
        "values": [
          "currentcolor"
        ]
      },
      "border-bottom-style": {
        "values": [
          "none",
          "hidden",
          "inset",
          "groove",
          "outset",
          "ridge",
          "dotted",
          "dashed",
          "solid",
          "double"
        ]
      },
      "border-bottom-width": {
        "values": [
          "thin",
          "medium",
          "thick"
        ]
      },
      "border-collapse": {
        "values": [
          "separate",
          "collapse"
        ]
      },
      "border-image-repeat": {
        "values": [
          "stretch",
          "repeat",
          "round",
          "space"
        ]
      },
      "border-image-source": {
        "values": [
          "none"
        ]
      },
      "border-image-width": {
        "values": [
          "auto"
        ]
      },
      "border-left-color": {
        "values": [
          "currentcolor"
        ]
      },
      "border-left-style": {
        "values": [
          "none",
          "hidden",
          "inset",
          "groove",
          "outset",
          "ridge",
          "dotted",
          "dashed",
          "solid",
          "double"
        ]
      },
      "border-left-width": {
        "values": [
          "thin",
          "medium",
          "thick"
        ]
      },
      "border-right-color": {
        "values": [
          "currentcolor"
        ]
      },
      "border-right-style": {
        "values": [
          "none",
          "hidden",
          "inset",
          "groove",
          "outset",
          "ridge",
          "dotted",
          "dashed",
          "solid",
          "double"
        ]
      },
      "border-right-width": {
        "values": [
          "thin",
          "medium",
          "thick"
        ]
      },
      "border-shape": {
        "values": [
          "none"
        ]
      },
      "border-style": {
        "values": [
          "none"
        ]
      },
      "border-top-color": {
        "values": [
          "currentcolor"
        ]
      },
      "border-top-style": {
        "values": [
          "none",
          "hidden",
          "inset",
          "groove",
          "outset",
          "ridge",
          "dotted",
          "dashed",
          "solid",
          "double"
        ]
      },
      "border-top-width": {
        "values": [
          "thin",
          "medium",
          "thick"
        ]
      },
      "bottom": {
        "values": [
          "auto"
        ]
      },
      "box-decoration-break": {
        "values": [
          "slice",
          "clone"
        ]
      },
      "box-shadow": {
        "values": [
          "none"
        ]
      },
      "box-sizing": {
        "values": [
          "content-box",
          "border-box"
        ]
      },
      "break-after": {
        "values": [
          "auto",
          "avoid",
          "avoid-column",
          "avoid-page",
          "column",
          "left",
          "page",
          "recto",
          "right",
          "verso"
        ]
      },
      "break-before": {
        "values": [
          "auto",
          "avoid",
          "avoid-column",
          "avoid-page",
          "column",
          "left",
          "page",
          "recto",
          "right",
          "verso"
        ]
      },
      "break-inside": {
        "values": [
          "auto",
          "avoid",
          "avoid-column",
          "avoid-page"
        ]
      },
      "buffered-rendering": {
        "values": [
          "auto",
          "dynamic",
          "static"
        ]
      },
      "caption-side": {
        "values": [
          "top",
          "bottom"
        ]
      },
      "caret-animation": {
        "values": [
          "auto",
          "manual"
        ]
      },
      "caret-color": {
        "values": [
          "auto",
          "currentcolor"
        ]
      },
      "caret-shape": {
        "values": [
          "auto",
          "bar",
          "block",
          "underscore"
        ]
      },
      "clear": {
        "values": [
          "none",
          "left",
          "right",
          "both",
          "inline-start",
          "inline-end"
        ]
      },
      "clip": {
        "values": [
          "auto"
        ]
      },
      "clip-path": {
        "values": [
          "border-box",
          "padding-box",
          "content-box",
          "margin-box",
          "fill-box",
          "stroke-box",
          "view-box",
          "none"
        ]
      },
      "clip-rule": {
        "values": [
          "nonzero",
          "evenodd"
        ]
      },
      "color": {
        "values": [
          "currentcolor"
        ]
      },
      "color-interpolation": {
        "values": [
          "auto",
          "srgb",
          "linearrgb"
        ]
      },
      "color-interpolation-filters": {
        "values": [
          "auto",
          "srgb",
          "linearrgb"
        ]
      },
      "color-rendering": {
        "values": [
          "auto",
          "optimizespeed",
          "optimizequality"
        ]
      },
      "column-count": {
        "values": [
          "auto"
        ]
      },
      "column-fill": {
        "values": [
          "balance",
          "auto"
        ]
      },
      "column-gap": {
        "values": [
          "normal"
        ]
      },
      "column-height": {
        "values": [
          "auto"
        ]
      },
      "column-rule-break": {
        "values": [
          "none",
          "normal",
          "intersection"
        ]
      },
      "column-rule-color": {
        "values": [
          "currentcolor"
        ]
      },
      "column-rule-style": {
        "values": [
          "none",
          "hidden",
          "inset",
          "groove",
          "outset",
          "ridge",
          "dotted",
          "dashed",
          "solid",
          "double"
        ]
      },
      "column-rule-visibility-items": {
        "values": [
          "all",
          "auto",
          "around",
          "between"
        ]
      },
      "column-rule-width": {
        "values": [
          "thin",
          "medium",
          "thick"
        ]
      },
      "column-span": {
        "values": [
          "none",
          "all"
        ]
      },
      "column-width": {
        "values": [
          "auto"
        ]
      },
      "column-wrap": {
        "values": [
          "auto",
          "nowrap",
          "wrap"
        ]
      },
      "contain": {
        "values": [
          "none",
          "strict",
          "content",
          "size",
          "layout",
          "style",
          "paint",
          "inline-size",
          "block-size"
        ]
      },
      "contain-intrinsic-height": {
        "values": [
          "none"
        ]
      },
      "contain-intrinsic-width": {
        "values": [
          "none"
        ]
      },
      "container-name": {
        "values": [
          "none"
        ]
      },
      "container-type": {
        "values": [
          "normal",
          "inline-size",
          "size",
          "scroll-state",
          "anchored"
        ]
      },
      "content-visibility": {
        "values": [
          "visible",
          "auto",
          "hidden"
        ]
      },
      "continue": {
        "values": [
          "auto",
          "collapse",
          "-webkit-legacy"
        ]
      },
      "corner-bottom-left-shape": {
        "values": [
          "notch",
          "scoop",
          "bevel",
          "round",
          "squircle",
          "square"
        ]
      },
      "corner-bottom-right-shape": {
        "values": [
          "notch",
          "scoop",
          "bevel",
          "round",
          "squircle",
          "square"
        ]
      },
      "corner-top-left-shape": {
        "values": [
          "notch",
          "scoop",
          "bevel",
          "round",
          "squircle",
          "square"
        ]
      },
      "corner-top-right-shape": {
        "values": [
          "notch",
          "scoop",
          "bevel",
          "round",
          "squircle",
          "square"
        ]
      },
      "corners": {
        "values": [
          "normal"
        ]
      },
      "counter-increment": {
        "values": [
          "none"
        ]
      },
      "counter-reset": {
        "values": [
          "none"
        ]
      },
      "counter-set": {
        "values": [
          "none"
        ]
      },
      "cursor": {
        "values": [
          "auto",
          "default",
          "none",
          "context-menu",
          "help",
          "pointer",
          "progress",
          "wait",
          "cell",
          "crosshair",
          "text",
          "vertical-text",
          "alias",
          "copy",
          "move",
          "no-drop",
          "not-allowed",
          "e-resize",
          "n-resize",
          "ne-resize",
          "nw-resize",
          "s-resize",
          "se-resize",
          "sw-resize",
          "w-resize",
          "ew-resize",
          "ns-resize",
          "nesw-resize",
          "nwse-resize",
          "col-resize",
          "row-resize",
          "all-scroll",
          "zoom-in",
          "zoom-out",
          "grab",
          "grabbing"
        ]
      },
      "d": {
        "values": [
          "none"
        ]
      },
      "direction": {
        "values": [
          "ltr",
          "rtl"
        ]
      },
      "display": {
        "values": [
          "inline",
          "block",
          "list-item",
          "inline-block",
          "table",
          "inline-table",
          "table-row-group",
          "table-header-group",
          "table-footer-group",
          "table-row",
          "table-column-group",
          "table-column",
          "table-cell",
          "table-caption",
          "-webkit-box",
          "-webkit-inline-box",
          "flex",
          "inline-flex",
          "grid",
          "inline-grid",
          "contents",
          "flow-root",
          "none",
          "flow",
          "math",
          "ruby",
          "ruby-text",
          "grid-lanes",
          "inline-grid-lanes"
        ]
      },
      "dominant-baseline": {
        "values": [
          "auto",
          "alphabetic",
          "ideographic",
          "middle",
          "central",
          "mathematical",
          "hanging",
          "use-script",
          "no-change",
          "reset-size",
          "text-after-edge",
          "text-before-edge"
        ]
      },
      "dynamic-range-limit": {
        "values": [
          "standard",
          "no-limit",
          "constrained"
        ]
      },
      "empty-cells": {
        "values": [
          "show",
          "hide"
        ]
      },
      "field-sizing": {
        "values": [
          "fixed",
          "content"
        ]
      },
      "fill-rule": {
        "values": [
          "nonzero",
          "evenodd"
        ]
      },
      "filter": {
        "values": [
          "none"
        ]
      },
      "flex-basis": {
        "values": [
          "auto",
          "fit-content",
          "min-content",
          "max-content",
          "content"
        ]
      },
      "flex-direction": {
        "values": [
          "row",
          "row-reverse",
          "column",
          "column-reverse"
        ]
      },
      "flex-wrap": {
        "values": [
          "nowrap",
          "wrap",
          "wrap-reverse",
          "balance"
        ]
      },
      "float": {
        "values": [
          "none",
          "left",
          "right",
          "inline-start",
          "inline-end"
        ]
      },
      "flood-color": {
        "values": [
          "currentcolor"
        ]
      },
      "flow-tolerance": {
        "values": [
          "normal",
          "infinite"
        ]
      },
      "font-feature-settings": {
        "values": [
          "normal"
        ]
      },
      "font-kerning": {
        "values": [
          "auto",
          "normal",
          "none"
        ]
      },
      "font-language-override": {
        "values": [
          "normal"
        ]
      },
      "font-optical-sizing": {
        "values": [
          "auto",
          "none"
        ]
      },
      "font-palette": {
        "values": [
          "normal",
          "light",
          "dark"
        ]
      },
      "font-size": {
        "values": [
          "xx-small",
          "x-small",
          "small",
          "medium",
          "large",
          "x-large",
          "xx-large",
          "xxx-large",
          "larger",
          "smaller",
          "-webkit-xxx-large"
        ]
      },
      "font-size-adjust": {
        "values": [
          "none",
          "ex-height",
          "cap-height",
          "ch-width",
          "ic-width",
          "ic-height",
          "from-font"
        ]
      },
      "font-stretch": {
        "values": [
          "normal",
          "ultra-condensed",
          "extra-condensed",
          "condensed",
          "semi-condensed",
          "semi-expanded",
          "expanded",
          "extra-expanded",
          "ultra-expanded"
        ]
      },
      "font-style": {
        "values": [
          "normal",
          "italic",
          "oblique"
        ]
      },
      "font-synthesis-small-caps": {
        "values": [
          "auto",
          "none"
        ]
      },
      "font-synthesis-style": {
        "values": [
          "auto",
          "none"
        ]
      },
      "font-synthesis-weight": {
        "values": [
          "auto",
          "none"
        ]
      },
      "font-variant-alternates": {
        "values": [
          "normal"
        ]
      },
      "font-variant-caps": {
        "values": [
          "normal",
          "small-caps",
          "all-small-caps",
          "petite-caps",
          "all-petite-caps",
          "unicase",
          "titling-caps"
        ]
      },
      "font-variant-east-asian": {
        "values": [
          "normal",
          "jis78",
          "jis83",
          "jis90",
          "jis04",
          "simplified",
          "traditional",
          "full-width",
          "proportional-width",
          "ruby"
        ]
      },
      "font-variant-emoji": {
        "values": [
          "normal",
          "text",
          "emoji",
          "unicode"
        ]
      },
      "font-variant-ligatures": {
        "values": [
          "normal",
          "none",
          "common-ligatures",
          "no-common-ligatures",
          "discretionary-ligatures",
          "no-discretionary-ligatures",
          "historical-ligatures",
          "no-historical-ligatures",
          "contextual",
          "no-contextual"
        ]
      },
      "font-variant-numeric": {
        "values": [
          "normal",
          "lining-nums",
          "oldstyle-nums",
          "proportional-nums",
          "tabular-nums",
          "diagonal-fractions",
          "stacked-fractions",
          "ordinal",
          "slashed-zero"
        ]
      },
      "font-variant-position": {
        "values": [
          "normal",
          "sub",
          "super"
        ]
      },
      "font-variation-settings": {
        "values": [
          "normal"
        ]
      },
      "font-weight": {
        "values": [
          "normal",
          "bold",
          "bolder",
          "lighter"
        ]
      },
      "forced-color-adjust": {
        "values": [
          "auto",
          "none",
          "preserve-parent-color"
        ]
      },
      "frame-sizing": {
        "values": [
          "auto",
          "content-width",
          "content-height",
          "content-block-size",
          "content-inline-size"
        ]
      },
      "grid-auto-columns": {
        "values": [
          "auto",
          "min-content",
          "max-content"
        ]
      },
      "grid-auto-flow": {
        "values": [
          "row",
          "column"
        ]
      },
      "grid-auto-rows": {
        "values": [
          "auto",
          "min-content",
          "max-content"
        ]
      },
      "grid-column-end": {
        "values": [
          "auto"
        ]
      },
      "grid-column-start": {
        "values": [
          "auto"
        ]
      },
      "grid-lanes-direction": {
        "values": [
          "normal",
          "row",
          "column",
          "fill-reverse",
          "track-reverse"
        ]
      },
      "grid-lanes-pack": {
        "values": [
          "normal",
          "dense"
        ]
      },
      "grid-row-end": {
        "values": [
          "auto"
        ]
      },
      "grid-row-start": {
        "values": [
          "auto"
        ]
      },
      "grid-template-areas": {
        "values": [
          "none"
        ]
      },
      "grid-template-columns": {
        "values": [
          "none"
        ]
      },
      "grid-template-rows": {
        "values": [
          "none"
        ]
      },
      "height": {
        "values": [
          "auto",
          "fit-content",
          "min-content",
          "max-content"
        ]
      },
      "hyphenate-limit-chars": {
        "values": [
          "auto"
        ]
      },
      "hyphens": {
        "values": [
          "none",
          "manual",
          "auto"
        ]
      },
      "image-animation": {
        "values": [
          "normal",
          "running",
          "paused"
        ]
      },
      "image-rendering": {
        "values": [
          "auto",
          "optimizespeed",
          "optimizequality",
          "-webkit-optimize-contrast",
          "pixelated"
        ]
      },
      "initial-letter": {
        "values": [
          "drop",
          "normal",
          "raise"
        ]
      },
      "inline-size": {
        "values": [
          "auto"
        ]
      },
      "interactivity": {
        "values": [
          "auto",
          "inert"
        ]
      },
      "interpolate-size": {
        "values": [
          "numeric-only",
          "allow-keywords"
        ]
      },
      "isolation": {
        "values": [
          "auto",
          "isolate"
        ]
      },
      "left": {
        "values": [
          "auto"
        ]
      },
      "letter-spacing": {
        "values": [
          "normal"
        ]
      },
      "lighting-color": {
        "values": [
          "currentcolor"
        ]
      },
      "line-break": {
        "values": [
          "auto",
          "loose",
          "normal",
          "strict",
          "anywhere",
          "after-white-space"
        ]
      },
      "line-height": {
        "values": [
          "normal"
        ]
      },
      "list-style-image": {
        "values": [
          "none"
        ]
      },
      "list-style-position": {
        "values": [
          "outside",
          "inside"
        ]
      },
      "list-style-type": {
        "values": [
          "disc",
          "circle",
          "square",
          "disclosure-open",
          "disclosure-closed",
          "decimal",
          "none"
        ]
      },
      "margin-block-end": {
        "values": [
          "auto"
        ]
      },
      "margin-block-start": {
        "values": [
          "auto"
        ]
      },
      "margin-bottom": {
        "values": [
          "auto"
        ]
      },
      "margin-inline-end": {
        "values": [
          "auto"
        ]
      },
      "margin-inline-start": {
        "values": [
          "auto"
        ]
      },
      "margin-left": {
        "values": [
          "auto"
        ]
      },
      "margin-right": {
        "values": [
          "auto"
        ]
      },
      "margin-top": {
        "values": [
          "auto"
        ]
      },
      "marker-end": {
        "values": [
          "none"
        ]
      },
      "marker-mid": {
        "values": [
          "none"
        ]
      },
      "marker-start": {
        "values": [
          "none"
        ]
      },
      "mask-composite": {
        "values": [
          "add",
          "subtract",
          "intersect",
          "exclude"
        ]
      },
      "mask-mode": {
        "values": [
          "alpha",
          "luminance",
          "match-source"
        ]
      },
      "mask-type": {
        "values": [
          "luminance",
          "alpha"
        ]
      },
      "math-shift": {
        "values": [
          "normal",
          "compact"
        ]
      },
      "math-style": {
        "values": [
          "normal",
          "compact"
        ]
      },
      "max-block-size": {
        "values": [
          "none"
        ]
      },
      "max-height": {
        "values": [
          "none"
        ]
      },
      "max-inline-size": {
        "values": [
          "none"
        ]
      },
      "max-lines": {
        "values": [
          "none"
        ]
      },
      "max-width": {
        "values": [
          "none"
        ]
      },
      "mix-blend-mode": {
        "values": [
          "normal",
          "multiply",
          "screen",
          "overlay",
          "darken",
          "lighten",
          "color-dodge",
          "color-burn",
          "hard-light",
          "soft-light",
          "difference",
          "exclusion",
          "hue",
          "saturation",
          "color",
          "luminosity",
          "plus-lighter"
        ]
      },
      "object-fit": {
        "values": [
          "fill",
          "contain",
          "cover",
          "none",
          "scale-down"
        ]
      },
      "object-view-box": {
        "values": [
          "none"
        ]
      },
      "offset-anchor": {
        "values": [
          "auto"
        ]
      },
      "offset-path": {
        "values": [
          "none"
        ]
      },
      "offset-position": {
        "values": [
          "auto",
          "normal"
        ]
      },
      "offset-rotate": {
        "values": [
          "auto",
          "reverse"
        ]
      },
      "origin-trial-test-property": {
        "values": [
          "normal",
          "none"
        ]
      },
      "outline-color": {
        "values": [
          "currentcolor"
        ]
      },
      "outline-style": {
        "values": [
          "none",
          "hidden",
          "inset",
          "groove",
          "outset",
          "ridge",
          "dotted",
          "dashed",
          "solid",
          "double"
        ]
      },
      "outline-width": {
        "values": [
          "thin",
          "medium",
          "thick"
        ]
      },
      "overflow-anchor": {
        "values": [
          "visible",
          "none",
          "auto"
        ]
      },
      "overflow-clip-margin": {
        "values": [
          "border-box",
          "content-box",
          "padding-box"
        ]
      },
      "overflow-wrap": {
        "values": [
          "normal",
          "break-word",
          "anywhere"
        ]
      },
      "overflow-x": {
        "values": [
          "visible",
          "hidden",
          "scroll",
          "auto",
          "overlay",
          "clip"
        ]
      },
      "overflow-y": {
        "values": [
          "visible",
          "hidden",
          "scroll",
          "auto",
          "overlay",
          "clip"
        ]
      },
      "overlay": {
        "values": [
          "none",
          "auto"
        ]
      },
      "overscroll-behavior-x": {
        "values": [
          "auto",
          "contain",
          "none"
        ]
      },
      "overscroll-behavior-y": {
        "values": [
          "auto",
          "contain",
          "none"
        ]
      },
      "page": {
        "values": [
          "auto"
        ]
      },
      "page-margin-safety": {
        "values": [
          "none",
          "clamp",
          "add"
        ]
      },
      "paint-order": {
        "values": [
          "normal",
          "fill",
          "stroke",
          "markers"
        ]
      },
      "perspective": {
        "values": [
          "none"
        ]
      },
      "pointer-events": {
        "values": [
          "none",
          "auto",
          "stroke",
          "fill",
          "painted",
          "visible",
          "visiblestroke",
          "visiblefill",
          "visiblepainted",
          "bounding-box",
          "all"
        ]
      },
      "position": {
        "values": [
          "static",
          "relative",
          "absolute",
          "fixed",
          "sticky"
        ]
      },
      "position-anchor": {
        "values": [
          "auto",
          "none"
        ]
      },
      "position-area": {
        "values": [
          "none",
          "top",
          "bottom",
          "center",
          "left",
          "right",
          "x-start",
          "x-end",
          "y-start",
          "y-end",
          "start",
          "end",
          "self-start",
          "self-end",
          "all"
        ]
      },
      "position-try-fallbacks": {
        "values": [
          "none",
          "flip-block",
          "flip-inline",
          "flip-start",
          "flip-x",
          "flip-y"
        ]
      },
      "position-try-order": {
        "values": [
          "normal",
          "most-width",
          "most-height",
          "most-block-size",
          "most-inline-size"
        ]
      },
      "position-visibility": {
        "values": [
          "always",
          "anchors-visible",
          "no-overflow"
        ]
      },
      "print-color-adjust": {
        "values": [
          "economy",
          "exact"
        ]
      },
      "quotes": {
        "values": [
          "auto",
          "none"
        ]
      },
      "reading-flow": {
        "values": [
          "normal",
          "flex-visual",
          "flex-flow",
          "grid-rows",
          "grid-columns",
          "grid-order",
          "source-order"
        ]
      },
      "resize": {
        "values": [
          "none",
          "both",
          "horizontal",
          "vertical",
          "block",
          "inline"
        ]
      },
      "right": {
        "values": [
          "auto"
        ]
      },
      "row-gap": {
        "values": [
          "normal"
        ]
      },
      "row-rule-break": {
        "values": [
          "none",
          "normal",
          "intersection"
        ]
      },
      "row-rule-color": {
        "values": [
          "currentcolor"
        ]
      },
      "row-rule-style": {
        "values": [
          "none",
          "hidden",
          "inset",
          "groove",
          "outset",
          "ridge",
          "dotted",
          "dashed",
          "solid",
          "double"
        ]
      },
      "row-rule-visibility-items": {
        "values": [
          "all",
          "auto",
          "around",
          "between"
        ]
      },
      "row-rule-width": {
        "values": [
          "thin",
          "medium",
          "thick"
        ]
      },
      "ruby-align": {
        "values": [
          "space-around",
          "start",
          "center",
          "space-between"
        ]
      },
      "ruby-overhang": {
        "values": [
          "auto",
          "none"
        ]
      },
      "ruby-position": {
        "values": [
          "over",
          "under"
        ]
      },
      "rule-overlap": {
        "values": [
          "row-over-column",
          "column-over-row"
        ]
      },
      "rx": {
        "values": [
          "auto"
        ]
      },
      "ry": {
        "values": [
          "auto"
        ]
      },
      "scroll-behavior": {
        "values": [
          "auto",
          "smooth"
        ]
      },
      "scroll-initial-target": {
        "values": [
          "none",
          "nearest"
        ]
      },
      "scroll-padding-block-end": {
        "values": [
          "auto"
        ]
      },
      "scroll-padding-block-start": {
        "values": [
          "auto"
        ]
      },
      "scroll-padding-bottom": {
        "values": [
          "auto"
        ]
      },
      "scroll-padding-inline-end": {
        "values": [
          "auto"
        ]
      },
      "scroll-padding-inline-start": {
        "values": [
          "auto"
        ]
      },
      "scroll-padding-left": {
        "values": [
          "auto"
        ]
      },
      "scroll-padding-right": {
        "values": [
          "auto"
        ]
      },
      "scroll-padding-top": {
        "values": [
          "auto"
        ]
      },
      "scroll-snap-align": {
        "values": [
          "none",
          "start",
          "end",
          "center"
        ]
      },
      "scroll-snap-stop": {
        "values": [
          "normal",
          "always"
        ]
      },
      "scroll-snap-type": {
        "values": [
          "none",
          "x",
          "y",
          "block",
          "inline",
          "both",
          "mandatory",
          "proximity"
        ]
      },
      "scroll-target-group": {
        "values": [
          "none",
          "auto"
        ]
      },
      "scrollbar-color": {
        "values": [
          "auto"
        ]
      },
      "scrollbar-gutter": {
        "values": [
          "auto",
          "stable",
          "both-edges"
        ]
      },
      "scrollbar-width": {
        "values": [
          "auto",
          "thin",
          "none"
        ]
      },
      "shape-margin": {
        "values": [
          "none"
        ]
      },
      "shape-outside": {
        "values": [
          "none"
        ]
      },
      "shape-rendering": {
        "values": [
          "auto",
          "optimizespeed",
          "crispedges",
          "geometricprecision"
        ]
      },
      "speak": {
        "values": [
          "none",
          "normal",
          "spell-out",
          "digits",
          "literal-punctuation",
          "no-punctuation"
        ]
      },
      "stop-color": {
        "values": [
          "currentcolor"
        ]
      },
      "stroke-dasharray": {
        "values": [
          "none"
        ]
      },
      "stroke-linecap": {
        "values": [
          "butt",
          "round",
          "square"
        ]
      },
      "stroke-linejoin": {
        "values": [
          "miter",
          "bevel",
          "round"
        ]
      },
      "table-layout": {
        "values": [
          "auto",
          "fixed"
        ]
      },
      "text-align": {
        "values": [
          "left",
          "right",
          "center",
          "justify",
          "-webkit-left",
          "-webkit-right",
          "-webkit-center",
          "start",
          "end",
          "match-parent"
        ]
      },
      "text-align-last": {
        "values": [
          "auto",
          "start",
          "end",
          "left",
          "right",
          "center",
          "justify",
          "match-parent"
        ]
      },
      "text-anchor": {
        "values": [
          "start",
          "middle",
          "end"
        ]
      },
      "text-autospace": {
        "values": [
          "no-autospace",
          "normal"
        ]
      },
      "text-box-trim": {
        "values": [
          "none",
          "trim-start",
          "trim-end",
          "trim-both"
        ]
      },
      "text-combine-upright": {
        "values": [
          "none",
          "all"
        ]
      },
      "text-decoration-color": {
        "values": [
          "currentcolor"
        ]
      },
      "text-decoration-line": {
        "values": [
          "none",
          "underline",
          "overline",
          "line-through",
          "blink",
          "spelling-error",
          "grammar-error"
        ]
      },
      "text-decoration-skip-ink": {
        "values": [
          "none",
          "auto",
          "all"
        ]
      },
      "text-decoration-style": {
        "values": [
          "solid",
          "double",
          "dotted",
          "dashed",
          "wavy"
        ]
      },
      "text-decoration-thickness": {
        "values": [
          "auto",
          "from-font"
        ]
      },
      "text-emphasis-color": {
        "values": [
          "currentcolor"
        ]
      },
      "text-justify": {
        "values": [
          "auto",
          "none",
          "inter-word",
          "inter-character"
        ]
      },
      "text-orientation": {
        "values": [
          "sideways",
          "mixed",
          "upright"
        ]
      },
      "text-overflow": {
        "values": [
          "clip",
          "ellipsis"
        ]
      },
      "text-rendering": {
        "values": [
          "auto",
          "optimizespeed",
          "optimizelegibility",
          "geometricprecision"
        ]
      },
      "text-shadow": {
        "values": [
          "none"
        ]
      },
      "text-size-adjust": {
        "values": [
          "none",
          "auto"
        ]
      },
      "text-spacing-trim": {
        "values": [
          "normal",
          "space-all",
          "space-first",
          "trim-start"
        ]
      },
      "text-transform": {
        "values": [
          "none",
          "capitalize",
          "uppercase",
          "lowercase",
          "full-width",
          "full-size-kana",
          "math-auto"
        ]
      },
      "text-underline-offset": {
        "values": [
          "auto"
        ]
      },
      "text-underline-position": {
        "values": [
          "auto",
          "from-font",
          "under",
          "left",
          "right"
        ]
      },
      "text-wrap-mode": {
        "values": [
          "wrap",
          "nowrap"
        ]
      },
      "text-wrap-style": {
        "values": [
          "auto",
          "balance",
          "pretty",
          "stable"
        ]
      },
      "timeline-trigger-source": {
        "values": [
          "none",
          "auto"
        ]
      },
      "top": {
        "values": [
          "auto"
        ]
      },
      "touch-action": {
        "values": [
          "auto",
          "none",
          "pan-x",
          "pan-left",
          "pan-right",
          "pan-y",
          "pan-up",
          "pan-down",
          "pinch-zoom",
          "manipulation"
        ]
      },
      "transform": {
        "values": [
          "none"
        ]
      },
      "transform-box": {
        "values": [
          "content-box",
          "border-box",
          "fill-box",
          "stroke-box",
          "view-box"
        ]
      },
      "transform-style": {
        "values": [
          "flat",
          "preserve-3d"
        ]
      },
      "transition-behavior": {
        "values": [
          "normal",
          "allow-discrete"
        ]
      },
      "transition-property": {
        "values": [
          "none"
        ]
      },
      "transition-timing-function": {
        "values": [
          "linear",
          "ease",
          "ease-in",
          "ease-out",
          "ease-in-out",
          "jump-both",
          "jump-end",
          "jump-none",
          "jump-start",
          "step-start",
          "step-end"
        ]
      },
      "trigger-scope": {
        "values": [
          "none",
          "all"
        ]
      },
      "unicode-bidi": {
        "values": [
          "normal",
          "embed",
          "bidi-override",
          "isolate",
          "plaintext",
          "isolate-override"
        ]
      },
      "user-select": {
        "values": [
          "auto",
          "none",
          "text",
          "all",
          "contain"
        ]
      },
      "vector-effect": {
        "values": [
          "none",
          "non-scaling-stroke"
        ]
      },
      "vertical-align": {
        "values": [
          "baseline",
          "sub",
          "super",
          "text-top",
          "text-bottom",
          "middle"
        ]
      },
      "view-transition-class": {
        "values": [
          "none"
        ]
      },
      "view-transition-group": {
        "values": [
          "normal",
          "contain",
          "nearest"
        ]
      },
      "view-transition-name": {
        "values": [
          "none",
          "auto"
        ]
      },
      "view-transition-scope": {
        "values": [
          "none",
          "auto"
        ]
      },
      "visibility": {
        "values": [
          "visible",
          "hidden",
          "collapse"
        ]
      },
      "white-space-collapse": {
        "values": [
          "collapse",
          "preserve",
          "preserve-breaks",
          "break-spaces"
        ]
      },
      "width": {
        "values": [
          "auto",
          "fit-content",
          "min-content",
          "max-content"
        ]
      },
      "will-change": {
        "values": [
          "auto"
        ]
      },
      "word-break": {
        "values": [
          "normal",
          "break-all",
          "keep-all",
          "break-word",
          "auto-phrase"
        ]
      },
      "word-spacing": {
        "values": [
          "normal"
        ]
      },
      "writing-mode": {
        "values": [
          "horizontal-tb",
          "vertical-rl",
          "vertical-lr",
          "sideways-rl",
          "sideways-lr"
        ]
      },
      "z-index": {
        "values": [
          "auto"
        ]
      }
    };
    generatedAliasesFor = /* @__PURE__ */ new Map([
      [
        "-epub-caption-side",
        "caption-side"
      ],
      [
        "-epub-text-combine",
        "-webkit-text-combine"
      ],
      [
        "-epub-text-emphasis",
        "text-emphasis"
      ],
      [
        "-epub-text-emphasis-color",
        "text-emphasis-color"
      ],
      [
        "-epub-text-emphasis-style",
        "text-emphasis-style"
      ],
      [
        "-epub-text-orientation",
        "-webkit-text-orientation"
      ],
      [
        "-epub-text-transform",
        "text-transform"
      ],
      [
        "-epub-word-break",
        "word-break"
      ],
      [
        "-epub-writing-mode",
        "-webkit-writing-mode"
      ],
      [
        "-webkit-align-content",
        "align-content"
      ],
      [
        "-webkit-align-items",
        "align-items"
      ],
      [
        "-webkit-align-self",
        "align-self"
      ],
      [
        "-webkit-animation",
        "animation"
      ],
      [
        "-webkit-animation-delay",
        "animation-delay"
      ],
      [
        "-webkit-animation-direction",
        "animation-direction"
      ],
      [
        "-webkit-animation-duration",
        "animation-duration"
      ],
      [
        "-webkit-animation-fill-mode",
        "animation-fill-mode"
      ],
      [
        "-webkit-animation-iteration-count",
        "animation-iteration-count"
      ],
      [
        "-webkit-animation-name",
        "animation-name"
      ],
      [
        "-webkit-animation-play-state",
        "animation-play-state"
      ],
      [
        "-webkit-animation-timing-function",
        "animation-timing-function"
      ],
      [
        "-webkit-app-region",
        "app-region"
      ],
      [
        "-webkit-appearance",
        "appearance"
      ],
      [
        "-webkit-backface-visibility",
        "backface-visibility"
      ],
      [
        "-webkit-background-clip",
        "background-clip"
      ],
      [
        "-webkit-background-origin",
        "background-origin"
      ],
      [
        "-webkit-background-size",
        "background-size"
      ],
      [
        "-webkit-border-after",
        "border-block-end"
      ],
      [
        "-webkit-border-after-color",
        "border-block-end-color"
      ],
      [
        "-webkit-border-after-style",
        "border-block-end-style"
      ],
      [
        "-webkit-border-after-width",
        "border-block-end-width"
      ],
      [
        "-webkit-border-before",
        "border-block-start"
      ],
      [
        "-webkit-border-before-color",
        "border-block-start-color"
      ],
      [
        "-webkit-border-before-style",
        "border-block-start-style"
      ],
      [
        "-webkit-border-before-width",
        "border-block-start-width"
      ],
      [
        "-webkit-border-bottom-left-radius",
        "border-bottom-left-radius"
      ],
      [
        "-webkit-border-bottom-right-radius",
        "border-bottom-right-radius"
      ],
      [
        "-webkit-border-end",
        "border-inline-end"
      ],
      [
        "-webkit-border-end-color",
        "border-inline-end-color"
      ],
      [
        "-webkit-border-end-style",
        "border-inline-end-style"
      ],
      [
        "-webkit-border-end-width",
        "border-inline-end-width"
      ],
      [
        "-webkit-border-radius",
        "border-radius"
      ],
      [
        "-webkit-border-start",
        "border-inline-start"
      ],
      [
        "-webkit-border-start-color",
        "border-inline-start-color"
      ],
      [
        "-webkit-border-start-style",
        "border-inline-start-style"
      ],
      [
        "-webkit-border-start-width",
        "border-inline-start-width"
      ],
      [
        "-webkit-border-top-left-radius",
        "border-top-left-radius"
      ],
      [
        "-webkit-border-top-right-radius",
        "border-top-right-radius"
      ],
      [
        "-webkit-box-shadow",
        "box-shadow"
      ],
      [
        "-webkit-box-sizing",
        "box-sizing"
      ],
      [
        "-webkit-clip-path",
        "clip-path"
      ],
      [
        "-webkit-column-count",
        "column-count"
      ],
      [
        "-webkit-column-gap",
        "column-gap"
      ],
      [
        "-webkit-column-rule",
        "column-rule"
      ],
      [
        "-webkit-column-rule-color",
        "column-rule-color"
      ],
      [
        "-webkit-column-rule-style",
        "column-rule-style"
      ],
      [
        "-webkit-column-rule-width",
        "column-rule-width"
      ],
      [
        "-webkit-column-span",
        "column-span"
      ],
      [
        "-webkit-column-width",
        "column-width"
      ],
      [
        "-webkit-columns",
        "columns"
      ],
      [
        "-webkit-filter",
        "filter"
      ],
      [
        "-webkit-flex",
        "flex"
      ],
      [
        "-webkit-flex-basis",
        "flex-basis"
      ],
      [
        "-webkit-flex-direction",
        "flex-direction"
      ],
      [
        "-webkit-flex-flow",
        "flex-flow"
      ],
      [
        "-webkit-flex-grow",
        "flex-grow"
      ],
      [
        "-webkit-flex-shrink",
        "flex-shrink"
      ],
      [
        "-webkit-flex-wrap",
        "flex-wrap"
      ],
      [
        "-webkit-font-feature-settings",
        "font-feature-settings"
      ],
      [
        "-webkit-hyphenate-character",
        "hyphenate-character"
      ],
      [
        "-webkit-justify-content",
        "justify-content"
      ],
      [
        "-webkit-logical-height",
        "block-size"
      ],
      [
        "-webkit-logical-width",
        "inline-size"
      ],
      [
        "-webkit-margin-after",
        "margin-block-end"
      ],
      [
        "-webkit-margin-before",
        "margin-block-start"
      ],
      [
        "-webkit-margin-end",
        "margin-inline-end"
      ],
      [
        "-webkit-margin-start",
        "margin-inline-start"
      ],
      [
        "-webkit-mask",
        "mask"
      ],
      [
        "-webkit-mask-clip",
        "mask-clip"
      ],
      [
        "-webkit-mask-composite",
        "mask-composite"
      ],
      [
        "-webkit-mask-image",
        "mask-image"
      ],
      [
        "-webkit-mask-origin",
        "mask-origin"
      ],
      [
        "-webkit-mask-position",
        "mask-position"
      ],
      [
        "-webkit-mask-repeat",
        "mask-repeat"
      ],
      [
        "-webkit-mask-size",
        "mask-size"
      ],
      [
        "-webkit-max-logical-height",
        "max-block-size"
      ],
      [
        "-webkit-max-logical-width",
        "max-inline-size"
      ],
      [
        "-webkit-min-logical-height",
        "min-block-size"
      ],
      [
        "-webkit-min-logical-width",
        "min-inline-size"
      ],
      [
        "-webkit-opacity",
        "opacity"
      ],
      [
        "-webkit-order",
        "order"
      ],
      [
        "-webkit-padding-after",
        "padding-block-end"
      ],
      [
        "-webkit-padding-before",
        "padding-block-start"
      ],
      [
        "-webkit-padding-end",
        "padding-inline-end"
      ],
      [
        "-webkit-padding-start",
        "padding-inline-start"
      ],
      [
        "-webkit-perspective",
        "perspective"
      ],
      [
        "-webkit-perspective-origin",
        "perspective-origin"
      ],
      [
        "-webkit-print-color-adjust",
        "print-color-adjust"
      ],
      [
        "-webkit-shape-image-threshold",
        "shape-image-threshold"
      ],
      [
        "-webkit-shape-margin",
        "shape-margin"
      ],
      [
        "-webkit-shape-outside",
        "shape-outside"
      ],
      [
        "-webkit-text-emphasis",
        "text-emphasis"
      ],
      [
        "-webkit-text-emphasis-color",
        "text-emphasis-color"
      ],
      [
        "-webkit-text-emphasis-position",
        "text-emphasis-position"
      ],
      [
        "-webkit-text-emphasis-style",
        "text-emphasis-style"
      ],
      [
        "-webkit-text-size-adjust",
        "text-size-adjust"
      ],
      [
        "-webkit-transform",
        "transform"
      ],
      [
        "-webkit-transform-origin",
        "transform-origin"
      ],
      [
        "-webkit-transform-style",
        "transform-style"
      ],
      [
        "-webkit-transition",
        "transition"
      ],
      [
        "-webkit-transition-delay",
        "transition-delay"
      ],
      [
        "-webkit-transition-duration",
        "transition-duration"
      ],
      [
        "-webkit-transition-property",
        "transition-property"
      ],
      [
        "-webkit-transition-timing-function",
        "transition-timing-function"
      ],
      [
        "-webkit-user-select",
        "user-select"
      ],
      [
        "grid-column-gap",
        "column-gap"
      ],
      [
        "grid-gap",
        "gap"
      ],
      [
        "grid-row-gap",
        "row-gap"
      ],
      [
        "word-wrap",
        "overflow-wrap"
      ]
    ]);
    CSSMetadata = class _CSSMetadata {
      #values = [];
      #longhands = /* @__PURE__ */ new Map();
      #shorthands = /* @__PURE__ */ new Map();
      #inherited = /* @__PURE__ */ new Set();
      #svgProperties = /* @__PURE__ */ new Set();
      #propertyValues = /* @__PURE__ */ new Map();
      #aliasesFor = /* @__PURE__ */ new Map();
      #nameValuePresets = [];
      #nameValuePresetsIncludingSVG = [];
      #valuesSet;
      constructor(properties2, aliasesFor) {
        this.#aliasesFor = aliasesFor;
        for (let i = 0; i < properties2.length; ++i) {
          const property = properties2[i];
          const propertyName = property.name;
          if (!CSS.supports(propertyName, "initial")) {
            continue;
          }
          this.#values.push(propertyName);
          if (property.inherited) {
            this.#inherited.add(propertyName);
          }
          if (property.svg) {
            this.#svgProperties.add(propertyName);
          }
          const longhands = properties2[i].longhands;
          if (longhands) {
            this.#longhands.set(propertyName, longhands);
            for (let j = 0; j < longhands.length; ++j) {
              const longhandName = longhands[j];
              let shorthands = this.#shorthands.get(longhandName);
              if (!shorthands) {
                shorthands = [];
                this.#shorthands.set(longhandName, shorthands);
              }
              shorthands.push(propertyName);
            }
          }
        }
        this.#values.sort(_CSSMetadata.sortPrefixesAndCSSWideKeywordsToEnd);
        this.#valuesSet = new Set(this.#values);
        const propertyValueSets = /* @__PURE__ */ new Map();
        for (const [propertyName, basisValueObj] of Object.entries(generatedPropertyValues)) {
          propertyValueSets.set(propertyName, new Set(basisValueObj.values));
        }
        for (const [propertyName, extraValues] of extraPropertyValues) {
          const propertyValueSet = propertyValueSets.get(propertyName);
          if (propertyValueSet) {
            propertyValueSets.set(propertyName, propertyValueSet.union(extraValues));
          } else {
            propertyValueSets.set(propertyName, extraValues);
          }
        }
        for (const [propertyName, values] of propertyValueSets) {
          for (const commonKeyword of CommonKeywords) {
            if (!values.has(commonKeyword) && CSS.supports(propertyName, commonKeyword)) {
              values.add(commonKeyword);
            }
          }
          this.#propertyValues.set(propertyName, [...values]);
        }
        for (const name of this.#valuesSet) {
          const values = this.specificPropertyValues(name).filter((value) => CSS.supports(name, value)).sort(_CSSMetadata.sortPrefixesAndCSSWideKeywordsToEnd);
          const presets = values.map((value) => `${name}: ${value}`);
          if (!this.isSVGProperty(name)) {
            this.#nameValuePresets.push(...presets);
          }
          this.#nameValuePresetsIncludingSVG.push(...presets);
        }
      }
      static isCSSWideKeyword(a) {
        return CSSWideKeywords.includes(a);
      }
      static isPositionTryOrderKeyword(a) {
        return PositionTryOrderKeywords.includes(a);
      }
      static sortPrefixesAndCSSWideKeywordsToEnd(a, b) {
        const aIsCSSWideKeyword = _CSSMetadata.isCSSWideKeyword(a);
        const bIsCSSWideKeyword = _CSSMetadata.isCSSWideKeyword(b);
        if (aIsCSSWideKeyword && !bIsCSSWideKeyword) {
          return 1;
        }
        if (!aIsCSSWideKeyword && bIsCSSWideKeyword) {
          return -1;
        }
        const aIsPrefixed = a.startsWith("-webkit-");
        const bIsPrefixed = b.startsWith("-webkit-");
        if (aIsPrefixed && !bIsPrefixed) {
          return 1;
        }
        if (!aIsPrefixed && bIsPrefixed) {
          return -1;
        }
        return a < b ? -1 : a > b ? 1 : 0;
      }
      allProperties() {
        return this.#values;
      }
      aliasesFor() {
        return this.#aliasesFor;
      }
      nameValuePresets(includeSVG) {
        return includeSVG ? this.#nameValuePresetsIncludingSVG : this.#nameValuePresets;
      }
      isSVGProperty(name) {
        name = name.toLowerCase();
        return this.#svgProperties.has(name);
      }
      getLonghands(shorthand) {
        return this.#longhands.get(shorthand) || null;
      }
      getShorthands(longhand) {
        return this.#shorthands.get(longhand) || null;
      }
      isColorAwareProperty(propertyName) {
        return colorAwareProperties.has(propertyName.toLowerCase()) || this.isCustomProperty(propertyName.toLowerCase());
      }
      isFontFamilyProperty(propertyName) {
        return propertyName.toLowerCase() === "font-family";
      }
      isAngleAwareProperty(propertyName) {
        const lowerCasedName = propertyName.toLowerCase();
        return colorAwareProperties.has(lowerCasedName) || angleAwareProperties.has(lowerCasedName);
      }
      isGridAreaDefiningProperty(propertyName) {
        propertyName = propertyName.toLowerCase();
        return propertyName === "grid" || propertyName === "grid-template" || propertyName === "grid-template-areas";
      }
      isGridColumnNameAwareProperty(propertyName) {
        propertyName = propertyName.toLowerCase();
        return ["grid-column", "grid-column-start", "grid-column-end"].includes(propertyName);
      }
      isGridRowNameAwareProperty(propertyName) {
        propertyName = propertyName.toLowerCase();
        return ["grid-row", "grid-row-start", "grid-row-end"].includes(propertyName);
      }
      isGridAreaNameAwareProperty(propertyName) {
        propertyName = propertyName.toLowerCase();
        return propertyName === "grid-area";
      }
      isGridNameAwareProperty(propertyName) {
        return this.isGridAreaNameAwareProperty(propertyName) || this.isGridColumnNameAwareProperty(propertyName) || this.isGridRowNameAwareProperty(propertyName);
      }
      isLengthProperty(propertyName) {
        propertyName = propertyName.toLowerCase();
        if (propertyName === "line-height") {
          return false;
        }
        return distanceProperties.has(propertyName) || propertyName.startsWith("margin") || propertyName.startsWith("padding") || propertyName.indexOf("width") !== -1 || propertyName.indexOf("height") !== -1;
      }
      isBezierAwareProperty(propertyName) {
        propertyName = propertyName.toLowerCase();
        return bezierAwareProperties.has(propertyName) || this.isCustomProperty(propertyName);
      }
      isFontAwareProperty(propertyName) {
        propertyName = propertyName.toLowerCase();
        return fontAwareProperties.has(propertyName) || this.isCustomProperty(propertyName);
      }
      isCustomProperty(propertyName) {
        return propertyName.startsWith("--");
      }
      isShadowProperty(propertyName) {
        propertyName = propertyName.toLowerCase();
        return propertyName === "box-shadow" || propertyName === "text-shadow" || propertyName === "-webkit-box-shadow";
      }
      isStringProperty(propertyName) {
        propertyName = propertyName.toLowerCase();
        return propertyName === "content";
      }
      canonicalPropertyName(name) {
        if (this.isCustomProperty(name)) {
          return name;
        }
        name = name.toLowerCase();
        const aliasFor = this.#aliasesFor.get(name);
        if (aliasFor) {
          return aliasFor;
        }
        if (!name || name.length < 9 || name.charAt(0) !== "-") {
          return name;
        }
        const match = name.match(/(?:-webkit-)(.+)/);
        if (!match || !this.#valuesSet.has(match[1])) {
          return name;
        }
        return match[1];
      }
      isCSSPropertyName(propertyName) {
        propertyName = propertyName.toLowerCase();
        if (propertyName.startsWith("--") && propertyName.length > 2 || propertyName.startsWith("-moz-") || propertyName.startsWith("-ms-") || propertyName.startsWith("-o-") || propertyName.startsWith("-webkit-")) {
          return true;
        }
        return this.#valuesSet.has(propertyName);
      }
      isPropertyInherited(propertyName) {
        propertyName = propertyName.toLowerCase();
        return propertyName.startsWith("--") || this.#inherited.has(this.canonicalPropertyName(propertyName)) || this.#inherited.has(propertyName);
      }
      specificPropertyValues(propertyName) {
        const unprefixedName = propertyName.replace(/^-webkit-/, "");
        const propertyValues = this.#propertyValues;
        let keywords = propertyValues.get(propertyName) || propertyValues.get(unprefixedName);
        if (!keywords) {
          keywords = [];
          for (const commonKeyword of CommonKeywords) {
            if (CSS.supports(propertyName, commonKeyword)) {
              keywords.push(commonKeyword);
            }
          }
          propertyValues.set(propertyName, keywords);
        }
        return keywords;
      }
      getPropertyValues(propertyName) {
        propertyName = propertyName.toLowerCase();
        const acceptedKeywords = [...this.specificPropertyValues(propertyName), ...CSSWideKeywords];
        if (this.isColorAwareProperty(propertyName)) {
          acceptedKeywords.push("currentColor");
          for (const color of Nicknames.keys()) {
            acceptedKeywords.push(color);
          }
        }
        return acceptedKeywords.sort(_CSSMetadata.sortPrefixesAndCSSWideKeywordsToEnd);
      }
      propertyUsageWeight(property) {
        return Weight.get(property) || Weight.get(this.canonicalPropertyName(property)) || 0;
      }
      getValuePreset(key, value) {
        const values = valuePresets.get(key);
        let text = values ? values.get(value) : null;
        if (!text) {
          return null;
        }
        let startColumn = text.length;
        let endColumn = text.length;
        if (text) {
          startColumn = text.indexOf("|");
          endColumn = text.lastIndexOf("|");
          endColumn = startColumn === endColumn ? endColumn : endColumn - 1;
          text = text.replace(/\|/g, "");
        }
        return { text, startColumn, endColumn };
      }
      isHighlightPseudoType(pseudoType) {
        return pseudoType === "highlight" || pseudoType === "selection" || pseudoType === "target-text" || pseudoType === "grammar-error" || pseudoType === "spelling-error";
      }
    };
    CubicBezierKeywordValues = /* @__PURE__ */ new Map([
      ["linear", "cubic-bezier(0, 0, 1, 1)"],
      ["ease", "cubic-bezier(0.25, 0.1, 0.25, 1)"],
      ["ease-in", "cubic-bezier(0.42, 0, 1, 1)"],
      ["ease-in-out", "cubic-bezier(0.42, 0, 0.58, 1)"],
      ["ease-out", "cubic-bezier(0, 0, 0.58, 1)"]
    ]);
    CSSWideKeywords = [
      "inherit",
      "initial",
      "revert",
      "revert-layer",
      "revert-rule",
      "unset"
    ];
    PositionTryOrderKeywords = [
      "normal",
      "most-height",
      "most-width",
      "most-block-size",
      "most-inline-size"
    ];
    GridAreaRowRegex = /((?:\[[\w\- ]+\]\s*)*(?:"[^"]+"|'[^']+'))[^'"\[]*\[?[^'"\[]*/;
    cssMetadataInstance = null;
    imageValuePresetMap = /* @__PURE__ */ new Map([
      ["linear-gradient", "linear-gradient(|45deg, black, transparent|)"],
      ["radial-gradient", "radial-gradient(|black, transparent|)"],
      ["repeating-linear-gradient", "repeating-linear-gradient(|45deg, black, transparent 100px|)"],
      ["repeating-radial-gradient", "repeating-radial-gradient(|black, transparent 100px|)"],
      ["url", "url(||)"]
    ]);
    filterValuePresetMap = /* @__PURE__ */ new Map([
      ["blur", "blur(|1px|)"],
      ["brightness", "brightness(|0.5|)"],
      ["contrast", "contrast(|0.5|)"],
      ["drop-shadow", "drop-shadow(|2px 4px 6px black|)"],
      ["grayscale", "grayscale(|1|)"],
      ["hue-rotate", "hue-rotate(|45deg|)"],
      ["invert", "invert(|1|)"],
      ["opacity", "opacity(|0.5|)"],
      ["saturate", "saturate(|0.5|)"],
      ["sepia", "sepia(|1|)"],
      ["url", "url(||)"]
    ]);
    cornerShapeValuePresetMap = /* @__PURE__ */ new Map([
      ["superellipse(0.5)", "superellipse(|0.5|)"],
      ["superellipse(infinity)", "superellipse(|infinity|)"]
    ]);
    valuePresets = /* @__PURE__ */ new Map([
      ["filter", filterValuePresetMap],
      ["backdrop-filter", filterValuePresetMap],
      ["background", imageValuePresetMap],
      ["background-image", imageValuePresetMap],
      ["-webkit-mask-image", imageValuePresetMap],
      [
        "transform",
        /* @__PURE__ */ new Map([
          ["scale", "scale(|1.5|)"],
          ["scaleX", "scaleX(|1.5|)"],
          ["scaleY", "scaleY(|1.5|)"],
          ["scale3d", "scale3d(|1.5, 1.5, 1.5|)"],
          ["rotate", "rotate(|45deg|)"],
          ["rotateX", "rotateX(|45deg|)"],
          ["rotateY", "rotateY(|45deg|)"],
          ["rotateZ", "rotateZ(|45deg|)"],
          ["rotate3d", "rotate3d(|1, 1, 1, 45deg|)"],
          ["skew", "skew(|10deg, 10deg|)"],
          ["skewX", "skewX(|10deg|)"],
          ["skewY", "skewY(|10deg|)"],
          ["translate", "translate(|10px, 10px|)"],
          ["translateX", "translateX(|10px|)"],
          ["translateY", "translateY(|10px|)"],
          ["translateZ", "translateZ(|10px|)"],
          ["translate3d", "translate3d(|10px, 10px, 10px|)"],
          ["matrix", "matrix(|1, 0, 0, 1, 0, 0|)"],
          ["matrix3d", "matrix3d(|1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1|)"],
          ["perspective", "perspective(|10px|)"]
        ])
      ],
      ["corner-shape", cornerShapeValuePresetMap],
      [
        "font-variant-alternates",
        /* @__PURE__ */ new Map([
          ["stylistic", "stylistic(||)"],
          ["styleset", "styleset(||)"],
          ["character-variant", "character-variant(||)"],
          ["swash", "swash(||)"],
          ["ornaments", "ornaments(||)"],
          ["annotation", "annotation(||)"]
        ])
      ]
    ]);
    distanceProperties = /* @__PURE__ */ new Set([
      "background-position",
      "border-spacing",
      "bottom",
      "font-size",
      "height",
      "left",
      "letter-spacing",
      "max-height",
      "max-width",
      "min-height",
      "min-width",
      "right",
      "text-indent",
      "top",
      "width",
      "word-spacing",
      "grid-row-gap",
      "grid-column-gap",
      "row-gap"
    ]);
    bezierAwareProperties = /* @__PURE__ */ new Set([
      "animation",
      "animation-timing-function",
      "transition",
      "transition-timing-function",
      "-webkit-animation",
      "-webkit-animation-timing-function",
      "-webkit-transition",
      "-webkit-transition-timing-function"
    ]);
    fontAwareProperties = /* @__PURE__ */ new Set(["font-size", "line-height", "font-weight", "font-family", "letter-spacing"]);
    colorAwareProperties = /* @__PURE__ */ new Set([
      "accent-color",
      "background",
      "background-color",
      "background-image",
      "border",
      "border-color",
      "border-image",
      "border-image-source",
      "border-bottom",
      "border-bottom-color",
      "border-left",
      "border-left-color",
      "border-right",
      "border-right-color",
      "border-top",
      "border-top-color",
      "border-block",
      "border-block-color",
      "border-block-end",
      "border-block-end-color",
      "border-block-start",
      "border-block-start-color",
      "border-inline",
      "border-inline-color",
      "border-inline-end",
      "border-inline-end-color",
      "border-inline-start",
      "border-inline-start-color",
      "box-shadow",
      "caret-color",
      "color",
      "column-rule",
      "column-rule-color",
      "content",
      "fill",
      "list-style-image",
      "mask",
      "mask-image",
      "mask-border",
      "mask-border-source",
      "outline",
      "outline-color",
      "scrollbar-color",
      "stop-color",
      "stroke",
      "text-decoration-color",
      "text-shadow",
      "text-emphasis",
      "text-emphasis-color",
      "-webkit-border-after",
      "-webkit-border-after-color",
      "-webkit-border-before",
      "-webkit-border-before-color",
      "-webkit-border-end",
      "-webkit-border-end-color",
      "-webkit-border-start",
      "-webkit-border-start-color",
      "-webkit-box-reflect",
      "-webkit-box-shadow",
      "-webkit-column-rule-color",
      "-webkit-mask",
      "-webkit-mask-box-image",
      "-webkit-mask-box-image-source",
      "-webkit-mask-image",
      "-webkit-tap-highlight-color",
      "-webkit-text-emphasis",
      "-webkit-text-emphasis-color",
      "-webkit-text-fill-color",
      "-webkit-text-stroke",
      "-webkit-text-stroke-color",
      "flood-color",
      "lighting-color",
      "stop-color"
    ]);
    angleAwareProperties = /* @__PURE__ */ new Set([
      "-webkit-border-image",
      "transform",
      "-webkit-transform",
      "rotate",
      "filter",
      "-webkit-filter",
      "backdrop-filter",
      "offset",
      "offset-rotate",
      "font-style"
    ]);
    textEmphasisPosition = /* @__PURE__ */ new Set([
      "over",
      "under",
      "over right",
      "over left",
      "under right",
      "under left"
    ]);
    textEmphasisStyle = /* @__PURE__ */ new Set([
      "none",
      "dot",
      "circle",
      "double-circle",
      "triangle",
      "sesame",
      "filled",
      "open",
      "dot open",
      "circle open",
      "double-circle open",
      "triangle open",
      "sesame open",
      '"\u2764\uFE0F"'
    ]);
    extraPropertyValues = /* @__PURE__ */ new Map([
      ["background-repeat", /* @__PURE__ */ new Set(["repeat", "repeat-x", "repeat-y", "no-repeat", "space", "round"])],
      ["content", /* @__PURE__ */ new Set(["normal", "close-quote", "no-close-quote", "no-open-quote", "open-quote"])],
      ["baseline-shift", /* @__PURE__ */ new Set(["baseline"])],
      ["max-height", /* @__PURE__ */ new Set(["min-content", "max-content", "-webkit-fill-available", "fit-content", "stretch"])],
      ["color", /* @__PURE__ */ new Set(["black"])],
      ["background-color", /* @__PURE__ */ new Set(["white"])],
      ["box-shadow", /* @__PURE__ */ new Set(["inset"])],
      ["text-shadow", /* @__PURE__ */ new Set(["0 0 black"])],
      ["-webkit-writing-mode", /* @__PURE__ */ new Set(["horizontal-tb", "vertical-rl", "vertical-lr"])],
      ["writing-mode", /* @__PURE__ */ new Set(["lr", "rl", "tb", "lr-tb", "rl-tb", "tb-rl"])],
      ["page-break-inside", /* @__PURE__ */ new Set(["avoid"])],
      ["cursor", /* @__PURE__ */ new Set(["-webkit-zoom-in", "-webkit-zoom-out", "-webkit-grab", "-webkit-grabbing"])],
      ["border-width", /* @__PURE__ */ new Set(["medium", "thick", "thin"])],
      ["border-style", /* @__PURE__ */ new Set(["hidden", "inset", "groove", "ridge", "outset", "dotted", "dashed", "solid", "double"])],
      ["size", /* @__PURE__ */ new Set(["a3", "a4", "a5", "b4", "b5", "landscape", "ledger", "legal", "letter", "portrait"])],
      ["overflow", /* @__PURE__ */ new Set(["hidden", "visible", "overlay", "scroll", "clip"])],
      ["overscroll-behavior", /* @__PURE__ */ new Set(["contain"])],
      ["text-rendering", /* @__PURE__ */ new Set(["optimizeSpeed", "optimizeLegibility", "geometricPrecision"])],
      ["text-align", /* @__PURE__ */ new Set(["-webkit-auto", "-webkit-match-parent"])],
      ["clip-path", /* @__PURE__ */ new Set(["circle", "ellipse", "inset", "polygon", "url"])],
      ["color-interpolation", /* @__PURE__ */ new Set(["sRGB", "linearRGB"])],
      ["word-wrap", /* @__PURE__ */ new Set(["normal", "break-word"])],
      ["font-weight", /* @__PURE__ */ new Set(["100", "200", "300", "400", "500", "600", "700", "800", "900"])],
      ["text-emphasis", textEmphasisStyle],
      ["-webkit-text-emphasis", textEmphasisStyle],
      ["color-rendering", /* @__PURE__ */ new Set(["optimizeSpeed", "optimizeQuality"])],
      ["-webkit-text-combine", /* @__PURE__ */ new Set(["horizontal"])],
      ["text-orientation", /* @__PURE__ */ new Set(["sideways-right"])],
      [
        "outline",
        /* @__PURE__ */ new Set(["inset", "groove", "ridge", "outset", "dotted", "dashed", "solid", "double", "medium", "thick", "thin"])
      ],
      [
        "font",
        /* @__PURE__ */ new Set([
          "caption",
          "icon",
          "menu",
          "message-box",
          "small-caption",
          "-webkit-mini-control",
          "-webkit-small-control",
          "-webkit-control",
          "status-bar"
        ])
      ],
      ["dominant-baseline", /* @__PURE__ */ new Set(["text-before-edge", "text-after-edge", "use-script", "no-change", "reset-size"])],
      ["text-emphasis-position", textEmphasisPosition],
      ["-webkit-text-emphasis-position", textEmphasisPosition],
      ["alignment-baseline", /* @__PURE__ */ new Set(["before-edge", "after-edge", "text-before-edge", "text-after-edge", "hanging"])],
      ["page-break-before", /* @__PURE__ */ new Set(["left", "right", "always", "avoid"])],
      ["border-image", /* @__PURE__ */ new Set(["repeat", "stretch", "space", "round"])],
      [
        "text-decoration",
        /* @__PURE__ */ new Set(["blink", "line-through", "overline", "underline", "wavy", "double", "solid", "dashed", "dotted"])
      ],
      [
        "font-family",
        /* @__PURE__ */ new Set([
          "serif",
          "sans-serif",
          "cursive",
          "fantasy",
          "monospace",
          "system-ui",
          "emoji",
          "math",
          "fangsong",
          "ui-serif",
          "ui-sans-serif",
          "ui-monospace",
          "ui-rounded",
          "-webkit-body"
        ])
      ],
      ["zoom", /* @__PURE__ */ new Set(["normal"])],
      ["max-width", /* @__PURE__ */ new Set(["min-content", "max-content", "-webkit-fill-available", "fit-content", "stretch"])],
      ["-webkit-font-smoothing", /* @__PURE__ */ new Set(["antialiased", "subpixel-antialiased"])],
      [
        "border",
        /* @__PURE__ */ new Set([
          "hidden",
          "inset",
          "groove",
          "ridge",
          "outset",
          "dotted",
          "dashed",
          "solid",
          "double",
          "medium",
          "thick",
          "thin"
        ])
      ],
      [
        "font-variant",
        /* @__PURE__ */ new Set([
          "small-caps",
          "normal",
          "common-ligatures",
          "no-common-ligatures",
          "discretionary-ligatures",
          "no-discretionary-ligatures",
          "historical-ligatures",
          "no-historical-ligatures",
          "contextual",
          "no-contextual",
          "all-small-caps",
          "petite-caps",
          "all-petite-caps",
          "unicase",
          "titling-caps",
          "lining-nums",
          "oldstyle-nums",
          "proportional-nums",
          "tabular-nums",
          "diagonal-fractions",
          "stacked-fractions",
          "ordinal",
          "slashed-zero",
          "jis78",
          "jis83",
          "jis90",
          "jis04",
          "simplified",
          "traditional",
          "full-width",
          "proportional-width",
          "ruby"
        ])
      ],
      [
        "font-variant-alternates",
        /* @__PURE__ */ new Set(["historical-forms", "stylistic", "styleset", "character-variant", "swash", "ornaments", "annotation"])
      ],
      ["vertical-align", /* @__PURE__ */ new Set(["top", "bottom", "-webkit-baseline-middle"])],
      ["page-break-after", /* @__PURE__ */ new Set(["left", "right", "always", "avoid"])],
      ["text-emphasis-style", textEmphasisStyle],
      ["-webkit-text-emphasis-style", textEmphasisStyle],
      [
        "transform",
        /* @__PURE__ */ new Set([
          "scale",
          "scaleX",
          "scaleY",
          "scale3d",
          "rotate",
          "rotateX",
          "rotateY",
          "rotateZ",
          "rotate3d",
          "skew",
          "skewX",
          "skewY",
          "translate",
          "translateX",
          "translateY",
          "translateZ",
          "translate3d",
          "matrix",
          "matrix3d",
          "perspective"
        ])
      ],
      [
        "align-content",
        /* @__PURE__ */ new Set([
          "normal",
          "baseline",
          "space-between",
          "space-around",
          "space-evenly",
          "stretch",
          "center",
          "start",
          "end",
          "flex-start",
          "flex-end"
        ])
      ],
      [
        "justify-content",
        /* @__PURE__ */ new Set([
          "normal",
          "space-between",
          "space-around",
          "space-evenly",
          "stretch",
          "center",
          "start",
          "end",
          "flex-start",
          "flex-end",
          "left",
          "right"
        ])
      ],
      [
        "place-content",
        /* @__PURE__ */ new Set([
          "normal",
          "space-between",
          "space-around",
          "space-evenly",
          "stretch",
          "center",
          "start",
          "end",
          "flex-start",
          "flex-end",
          "baseline"
        ])
      ],
      [
        "align-items",
        /* @__PURE__ */ new Set([
          "normal",
          "stretch",
          "baseline",
          "center",
          "start",
          "end",
          "self-start",
          "self-end",
          "flex-start",
          "flex-end",
          "anchor-center"
        ])
      ],
      [
        "justify-items",
        /* @__PURE__ */ new Set([
          "normal",
          "stretch",
          "baseline",
          "center",
          "start",
          "end",
          "self-start",
          "self-end",
          "flex-start",
          "flex-end",
          "left",
          "right",
          "legacy",
          "anchor-center"
        ])
      ],
      [
        "place-items",
        /* @__PURE__ */ new Set([
          "normal",
          "stretch",
          "baseline",
          "center",
          "start",
          "end",
          "self-start",
          "self-end",
          "flex-start",
          "flex-end",
          "anchor-center"
        ])
      ],
      [
        "align-self",
        /* @__PURE__ */ new Set([
          "normal",
          "stretch",
          "baseline",
          "center",
          "start",
          "end",
          "self-start",
          "self-end",
          "flex-start",
          "flex-end",
          "anchor-center"
        ])
      ],
      [
        "justify-self",
        /* @__PURE__ */ new Set([
          "normal",
          "stretch",
          "baseline",
          "center",
          "start",
          "end",
          "self-start",
          "self-end",
          "flex-start",
          "flex-end",
          "left",
          "right",
          "anchor-center"
        ])
      ],
      [
        "place-self",
        /* @__PURE__ */ new Set([
          "normal",
          "stretch",
          "baseline",
          "center",
          "start",
          "end",
          "self-start",
          "self-end",
          "flex-start",
          "flex-end",
          "anchor-center"
        ])
      ],
      ["perspective-origin", /* @__PURE__ */ new Set(["left", "center", "right", "top", "bottom"])],
      ["transform-origin", /* @__PURE__ */ new Set(["left", "center", "right", "top", "bottom"])],
      ["transition-timing-function", /* @__PURE__ */ new Set(["cubic-bezier", "steps"])],
      ["animation-timing-function", /* @__PURE__ */ new Set(["cubic-bezier", "steps"])],
      ["-webkit-backface-visibility", /* @__PURE__ */ new Set(["visible", "hidden"])],
      ["-webkit-column-break-after", /* @__PURE__ */ new Set(["always", "avoid"])],
      ["-webkit-column-break-before", /* @__PURE__ */ new Set(["always", "avoid"])],
      ["-webkit-column-break-inside", /* @__PURE__ */ new Set(["avoid"])],
      ["-webkit-column-span", /* @__PURE__ */ new Set(["all"])],
      ["-webkit-column-gap", /* @__PURE__ */ new Set(["normal"])],
      [
        "filter",
        /* @__PURE__ */ new Set([
          "url",
          "blur",
          "brightness",
          "contrast",
          "drop-shadow",
          "grayscale",
          "hue-rotate",
          "invert",
          "opacity",
          "saturate",
          "sepia"
        ])
      ],
      [
        "backdrop-filter",
        /* @__PURE__ */ new Set([
          "url",
          "blur",
          "brightness",
          "contrast",
          "drop-shadow",
          "grayscale",
          "hue-rotate",
          "invert",
          "opacity",
          "saturate",
          "sepia"
        ])
      ],
      ["grid-template-columns", /* @__PURE__ */ new Set(["min-content", "max-content"])],
      ["grid-template-rows", /* @__PURE__ */ new Set(["min-content", "max-content"])],
      ["grid-auto-flow", /* @__PURE__ */ new Set(["dense"])],
      [
        "background",
        /* @__PURE__ */ new Set([
          "repeat",
          "repeat-x",
          "repeat-y",
          "no-repeat",
          "top",
          "bottom",
          "left",
          "right",
          "center",
          "fixed",
          "local",
          "scroll",
          "space",
          "round",
          "border-box",
          "content-box",
          "padding-box",
          "linear-gradient",
          "radial-gradient",
          "repeating-linear-gradient",
          "repeating-radial-gradient",
          "url"
        ])
      ],
      [
        "background-image",
        /* @__PURE__ */ new Set(["linear-gradient", "radial-gradient", "repeating-linear-gradient", "repeating-radial-gradient", "url"])
      ],
      ["background-position", /* @__PURE__ */ new Set(["top", "bottom", "left", "right", "center"])],
      ["background-position-x", /* @__PURE__ */ new Set(["left", "right", "center"])],
      ["background-position-y", /* @__PURE__ */ new Set(["top", "bottom", "center"])],
      ["background-repeat-x", /* @__PURE__ */ new Set(["repeat", "no-repeat"])],
      ["background-repeat-y", /* @__PURE__ */ new Set(["repeat", "no-repeat"])],
      [
        "border-bottom",
        /* @__PURE__ */ new Set([
          "hidden",
          "inset",
          "groove",
          "outset",
          "ridge",
          "dotted",
          "dashed",
          "solid",
          "double",
          "medium",
          "thick",
          "thin"
        ])
      ],
      [
        "border-left",
        /* @__PURE__ */ new Set([
          "hidden",
          "inset",
          "groove",
          "outset",
          "ridge",
          "dotted",
          "dashed",
          "solid",
          "double",
          "medium",
          "thick",
          "thin"
        ])
      ],
      [
        "border-right",
        /* @__PURE__ */ new Set([
          "hidden",
          "inset",
          "groove",
          "outset",
          "ridge",
          "dotted",
          "dashed",
          "solid",
          "double",
          "medium",
          "thick",
          "thin"
        ])
      ],
      [
        "border-top",
        /* @__PURE__ */ new Set([
          "hidden",
          "inset",
          "groove",
          "outset",
          "ridge",
          "dotted",
          "dashed",
          "solid",
          "double",
          "medium",
          "thick",
          "thin"
        ])
      ],
      ["buffered-rendering", /* @__PURE__ */ new Set(["static", "dynamic"])],
      ["color-interpolation-filters", /* @__PURE__ */ new Set(["srgb", "linearrgb"])],
      [
        "column-rule",
        /* @__PURE__ */ new Set([
          "hidden",
          "inset",
          "groove",
          "outset",
          "ridge",
          "dotted",
          "dashed",
          "solid",
          "double",
          "medium",
          "thick",
          "thin"
        ])
      ],
      ["flex-flow", /* @__PURE__ */ new Set(["nowrap", "row", "row-reverse", "column", "column-reverse", "wrap", "wrap-reverse"])],
      ["height", /* @__PURE__ */ new Set(["-webkit-fill-available", "stretch"])],
      ["inline-size", /* @__PURE__ */ new Set(["-webkit-fill-available", "min-content", "max-content", "fit-content"])],
      [
        "list-style",
        /* @__PURE__ */ new Set([
          "outside",
          "inside",
          "disc",
          "circle",
          "square",
          "decimal",
          "decimal-leading-zero",
          "arabic-indic",
          "bengali",
          "cambodian",
          "khmer",
          "devanagari",
          "gujarati",
          "gurmukhi",
          "kannada",
          "lao",
          "malayalam",
          "mongolian",
          "myanmar",
          "oriya",
          "persian",
          "urdu",
          "telugu",
          "tibetan",
          "thai",
          "lower-roman",
          "upper-roman",
          "lower-greek",
          "lower-alpha",
          "lower-latin",
          "upper-alpha",
          "upper-latin",
          "cjk-earthly-branch",
          "cjk-heavenly-stem",
          "ethiopic-halehame",
          "ethiopic-halehame-am",
          "ethiopic-halehame-ti-er",
          "ethiopic-halehame-ti-et",
          "hangul",
          "hangul-consonant",
          "korean-hangul-formal",
          "korean-hanja-formal",
          "korean-hanja-informal",
          "hebrew",
          "armenian",
          "lower-armenian",
          "upper-armenian",
          "georgian",
          "cjk-ideographic",
          "simp-chinese-formal",
          "simp-chinese-informal",
          "trad-chinese-formal",
          "trad-chinese-informal",
          "hiragana",
          "katakana",
          "hiragana-iroha",
          "katakana-iroha"
        ])
      ],
      ["max-block-size", /* @__PURE__ */ new Set(["-webkit-fill-available", "min-content", "max-content", "fit-content"])],
      ["max-inline-size", /* @__PURE__ */ new Set(["-webkit-fill-available", "min-content", "max-content", "fit-content"])],
      ["min-block-size", /* @__PURE__ */ new Set(["-webkit-fill-available", "min-content", "max-content", "fit-content"])],
      ["min-height", /* @__PURE__ */ new Set(["-webkit-fill-available", "min-content", "max-content", "fit-content", "stretch"])],
      ["min-inline-size", /* @__PURE__ */ new Set(["-webkit-fill-available", "min-content", "max-content", "fit-content"])],
      ["min-width", /* @__PURE__ */ new Set(["-webkit-fill-available", "min-content", "max-content", "fit-content", "stretch"])],
      ["object-position", /* @__PURE__ */ new Set(["top", "bottom", "left", "right", "center"])],
      ["shape-outside", /* @__PURE__ */ new Set(["border-box", "content-box", "padding-box", "margin-box"])],
      [
        "-webkit-appearance",
        /* @__PURE__ */ new Set([
          "checkbox",
          "radio",
          "push-button",
          "square-button",
          "button",
          "inner-spin-button",
          "listbox",
          "media-slider",
          "media-sliderthumb",
          "media-volume-slider",
          "media-volume-sliderthumb",
          "menulist",
          "menulist-button",
          "meter",
          "progress-bar",
          "slider-horizontal",
          "slider-vertical",
          "sliderthumb-horizontal",
          "sliderthumb-vertical",
          "searchfield",
          "searchfield-cancel-button",
          "textfield",
          "textarea"
        ])
      ],
      [
        "-webkit-border-after",
        /* @__PURE__ */ new Set([
          "hidden",
          "inset",
          "groove",
          "outset",
          "ridge",
          "dotted",
          "dashed",
          "solid",
          "double",
          "medium",
          "thick",
          "thin"
        ])
      ],
      [
        "-webkit-border-after-style",
        /* @__PURE__ */ new Set(["hidden", "inset", "groove", "outset", "ridge", "dotted", "dashed", "solid", "double"])
      ],
      ["-webkit-border-after-width", /* @__PURE__ */ new Set(["medium", "thick", "thin"])],
      [
        "-webkit-border-before",
        /* @__PURE__ */ new Set([
          "hidden",
          "inset",
          "groove",
          "outset",
          "ridge",
          "dotted",
          "dashed",
          "solid",
          "double",
          "medium",
          "thick",
          "thin"
        ])
      ],
      [
        "-webkit-border-before-style",
        /* @__PURE__ */ new Set(["hidden", "inset", "groove", "outset", "ridge", "dotted", "dashed", "solid", "double"])
      ],
      ["-webkit-border-before-width", /* @__PURE__ */ new Set(["medium", "thick", "thin"])],
      [
        "-webkit-border-end",
        /* @__PURE__ */ new Set([
          "hidden",
          "inset",
          "groove",
          "outset",
          "ridge",
          "dotted",
          "dashed",
          "solid",
          "double",
          "medium",
          "thick",
          "thin"
        ])
      ],
      [
        "-webkit-border-end-style",
        /* @__PURE__ */ new Set(["hidden", "inset", "groove", "outset", "ridge", "dotted", "dashed", "solid", "double"])
      ],
      ["-webkit-border-end-width", /* @__PURE__ */ new Set(["medium", "thick", "thin"])],
      [
        "-webkit-border-start",
        /* @__PURE__ */ new Set([
          "hidden",
          "inset",
          "groove",
          "outset",
          "ridge",
          "dotted",
          "dashed",
          "solid",
          "double",
          "medium",
          "thick",
          "thin"
        ])
      ],
      [
        "-webkit-border-start-style",
        /* @__PURE__ */ new Set(["hidden", "inset", "groove", "outset", "ridge", "dotted", "dashed", "solid", "double"])
      ],
      ["-webkit-border-start-width", /* @__PURE__ */ new Set(["medium", "thick", "thin"])],
      ["-webkit-logical-height", /* @__PURE__ */ new Set(["-webkit-fill-available", "min-content", "max-content", "fit-content"])],
      ["-webkit-logical-width", /* @__PURE__ */ new Set(["-webkit-fill-available", "min-content", "max-content", "fit-content"])],
      ["-webkit-mask-box-image", /* @__PURE__ */ new Set(["repeat", "stretch", "space", "round"])],
      ["-webkit-mask-box-image-repeat", /* @__PURE__ */ new Set(["repeat", "stretch", "space", "round"])],
      ["-webkit-mask-clip", /* @__PURE__ */ new Set(["text", "border", "border-box", "content", "content-box", "padding", "padding-box"])],
      [
        "-webkit-mask-composite",
        /* @__PURE__ */ new Set([
          "clear",
          "copy",
          "source-over",
          "source-in",
          "source-out",
          "source-atop",
          "destination-over",
          "destination-in",
          "destination-out",
          "destination-atop",
          "xor",
          "plus-lighter"
        ])
      ],
      [
        "-webkit-mask-image",
        /* @__PURE__ */ new Set(["linear-gradient", "radial-gradient", "repeating-linear-gradient", "repeating-radial-gradient", "url"])
      ],
      ["-webkit-mask-origin", /* @__PURE__ */ new Set(["border", "border-box", "content", "content-box", "padding", "padding-box"])],
      ["-webkit-mask-position", /* @__PURE__ */ new Set(["top", "bottom", "left", "right", "center"])],
      ["-webkit-mask-position-x", /* @__PURE__ */ new Set(["left", "right", "center"])],
      ["-webkit-mask-position-y", /* @__PURE__ */ new Set(["top", "bottom", "center"])],
      ["-webkit-mask-repeat", /* @__PURE__ */ new Set(["repeat", "repeat-x", "repeat-y", "no-repeat", "space", "round"])],
      ["-webkit-mask-size", /* @__PURE__ */ new Set(["contain", "cover"])],
      ["-webkit-max-logical-height", /* @__PURE__ */ new Set(["-webkit-fill-available", "min-content", "max-content", "fit-content"])],
      ["-webkit-max-logical-width", /* @__PURE__ */ new Set(["-webkit-fill-available", "min-content", "max-content", "fit-content"])],
      ["-webkit-min-logical-height", /* @__PURE__ */ new Set(["-webkit-fill-available", "min-content", "max-content", "fit-content"])],
      ["-webkit-min-logical-width", /* @__PURE__ */ new Set(["-webkit-fill-available", "min-content", "max-content", "fit-content"])],
      ["-webkit-perspective-origin-x", /* @__PURE__ */ new Set(["left", "right", "center"])],
      ["-webkit-perspective-origin-y", /* @__PURE__ */ new Set(["top", "bottom", "center"])],
      ["-webkit-text-decorations-in-effect", /* @__PURE__ */ new Set(["blink", "line-through", "overline", "underline"])],
      ["-webkit-text-stroke", /* @__PURE__ */ new Set(["medium", "thick", "thin"])],
      ["-webkit-text-stroke-width", /* @__PURE__ */ new Set(["medium", "thick", "thin"])],
      ["-webkit-transform-origin-x", /* @__PURE__ */ new Set(["left", "right", "center"])],
      ["-webkit-transform-origin-y", /* @__PURE__ */ new Set(["top", "bottom", "center"])],
      ["width", /* @__PURE__ */ new Set(["-webkit-fill-available", "stretch"])],
      [
        "animation-trigger",
        /* @__PURE__ */ new Set([
          "play",
          "pause",
          "play-once",
          "play-alternate",
          "play-forwards",
          "play-backwards",
          "play-pause",
          "replay"
        ])
      ],
      ["timeline-trigger-activation-range-start", /* @__PURE__ */ new Set(["normal"])],
      ["timeline-trigger-activation-range-end", /* @__PURE__ */ new Set(["normal"])],
      ["timeline-trigger-active-range-start", /* @__PURE__ */ new Set(["normal"])],
      ["timeline-trigger-active-range-end", /* @__PURE__ */ new Set(["normal"])],
      ["contain-intrinsic-width", /* @__PURE__ */ new Set(["auto none", "auto 100px"])],
      ["contain-intrinsic-height", /* @__PURE__ */ new Set(["auto none", "auto 100px"])],
      ["contain-intrinsic-size", /* @__PURE__ */ new Set(["auto none", "auto 100px"])],
      ["contain-intrinsic-inline-size", /* @__PURE__ */ new Set(["auto none", "auto 100px"])],
      ["contain-intrinsic-block-size", /* @__PURE__ */ new Set(["auto none", "auto 100px"])],
      [
        "white-space",
        /* @__PURE__ */ new Set([
          "normal",
          "pre",
          "pre-wrap",
          "pre-line",
          "nowrap",
          "break-spaces"
        ])
      ],
      [
        "text-box-edge",
        /* @__PURE__ */ new Set([
          "auto",
          "text",
          "cap",
          "ex",
          "text alphabetic",
          "cap alphabetic",
          "ex alphabetic"
        ])
      ],
      [
        "corner-shape",
        /* @__PURE__ */ new Set([
          "round",
          "scoop",
          "bevel",
          "notch",
          "square",
          "squircle",
          "superellipse(0.5)",
          "superellipse(infinity)"
        ])
      ]
    ]);
    Weight = /* @__PURE__ */ new Map([
      ["align-content", 57],
      ["align-items", 129],
      ["align-self", 55],
      ["animation", 175],
      ["animation-delay", 114],
      ["animation-direction", 113],
      ["animation-duration", 137],
      ["animation-fill-mode", 132],
      ["animation-iteration-count", 124],
      ["animation-name", 139],
      ["animation-play-state", 104],
      ["animation-timing-function", 141],
      ["backface-visibility", 123],
      ["background", 260],
      ["background-attachment", 119],
      ["background-clip", 165],
      ["background-color", 259],
      ["background-image", 246],
      ["background-origin", 107],
      ["background-position", 237],
      ["background-position-x", 108],
      ["background-position-y", 93],
      ["background-repeat", 234],
      ["background-size", 203],
      ["border", 263],
      ["border-bottom", 233],
      ["border-bottom-color", 190],
      ["border-bottom-left-radius", 186],
      ["border-bottom-right-radius", 185],
      ["border-bottom-style", 150],
      ["border-bottom-width", 179],
      ["border-collapse", 209],
      ["border-color", 226],
      ["border-image", 89],
      ["border-image-outset", 50],
      ["border-image-repeat", 49],
      ["border-image-slice", 58],
      ["border-image-source", 32],
      ["border-image-width", 52],
      ["border-left", 221],
      ["border-left-color", 174],
      ["border-left-style", 142],
      ["border-left-width", 172],
      ["border-radius", 224],
      ["border-right", 223],
      ["border-right-color", 182],
      ["border-right-style", 130],
      ["border-right-width", 178],
      ["border-spacing", 198],
      ["border-style", 206],
      ["border-top", 231],
      ["border-top-color", 192],
      ["border-top-left-radius", 187],
      ["border-top-right-radius", 189],
      ["border-top-style", 152],
      ["border-top-width", 180],
      ["border-width", 214],
      ["bottom", 227],
      ["box-shadow", 213],
      ["box-sizing", 216],
      ["caption-side", 96],
      ["clear", 229],
      ["clip", 173],
      ["clip-rule", 5],
      ["color", 256],
      ["content", 219],
      ["counter-increment", 111],
      ["counter-reset", 110],
      ["cursor", 250],
      ["direction", 176],
      ["display", 262],
      ["empty-cells", 99],
      ["fill", 140],
      ["fill-opacity", 82],
      ["fill-rule", 22],
      ["filter", 160],
      ["flex", 133],
      ["flex-basis", 66],
      ["flex-direction", 85],
      ["flex-flow", 94],
      ["flex-grow", 112],
      ["flex-shrink", 61],
      ["flex-wrap", 68],
      ["float", 252],
      ["font", 211],
      ["font-family", 254],
      ["font-kerning", 18],
      ["font-size", 264],
      ["font-stretch", 77],
      ["font-style", 220],
      ["font-variant", 161],
      ["font-weight", 257],
      ["height", 266],
      ["image-rendering", 90],
      ["justify-content", 127],
      ["left", 248],
      ["letter-spacing", 188],
      ["line-height", 244],
      ["list-style", 215],
      ["list-style-image", 145],
      ["list-style-position", 149],
      ["list-style-type", 199],
      ["margin", 267],
      ["margin-bottom", 241],
      ["margin-left", 243],
      ["margin-right", 238],
      ["margin-top", 253],
      ["mask", 20],
      ["max-height", 205],
      ["max-width", 225],
      ["min-height", 217],
      ["min-width", 218],
      ["object-fit", 33],
      ["opacity", 251],
      ["order", 117],
      ["orphans", 146],
      ["outline", 222],
      ["outline-color", 153],
      ["outline-offset", 147],
      ["outline-style", 151],
      ["outline-width", 148],
      ["overflow", 255],
      ["overflow-wrap", 105],
      ["overflow-x", 184],
      ["overflow-y", 196],
      ["padding", 265],
      ["padding-bottom", 230],
      ["padding-left", 235],
      ["padding-right", 232],
      ["padding-top", 240],
      ["page", 8],
      ["page-break-after", 120],
      ["page-break-before", 69],
      ["page-break-inside", 121],
      ["perspective", 92],
      ["perspective-origin", 103],
      ["pointer-events", 183],
      ["position", 261],
      ["quotes", 158],
      ["resize", 168],
      ["right", 245],
      ["shape-rendering", 38],
      ["size", 64],
      ["speak", 118],
      ["src", 170],
      ["stop-color", 42],
      ["stop-opacity", 31],
      ["stroke", 98],
      ["stroke-dasharray", 36],
      ["stroke-dashoffset", 3],
      ["stroke-linecap", 30],
      ["stroke-linejoin", 21],
      ["stroke-miterlimit", 12],
      ["stroke-opacity", 34],
      ["stroke-width", 87],
      ["table-layout", 171],
      ["tab-size", 46],
      ["text-align", 260],
      ["text-anchor", 35],
      ["text-decoration", 247],
      ["text-indent", 207],
      ["text-overflow", 204],
      ["text-rendering", 155],
      ["text-shadow", 208],
      ["text-transform", 202],
      ["top", 258],
      ["touch-action", 80],
      ["transform", 181],
      ["transform-origin", 162],
      ["transform-style", 86],
      ["transition", 193],
      ["transition-delay", 134],
      ["transition-duration", 135],
      ["transition-property", 131],
      ["transition-timing-function", 122],
      ["unicode-bidi", 156],
      ["unicode-range", 136],
      ["vertical-align", 236],
      ["visibility", 242],
      ["-webkit-appearance", 191],
      ["-webkit-backface-visibility", 154],
      ["-webkit-background-clip", 164],
      ["-webkit-background-origin", 40],
      ["-webkit-background-size", 163],
      ["-webkit-border-end", 9],
      ["-webkit-border-horizontal-spacing", 81],
      ["-webkit-border-image", 75],
      ["-webkit-border-radius", 212],
      ["-webkit-border-start", 10],
      ["-webkit-border-start-color", 16],
      ["-webkit-border-start-width", 13],
      ["-webkit-border-vertical-spacing", 43],
      ["-webkit-box-align", 101],
      ["-webkit-box-direction", 51],
      ["-webkit-box-flex", 128],
      ["-webkit-box-ordinal-group", 91],
      ["-webkit-box-orient", 144],
      ["-webkit-box-pack", 106],
      ["-webkit-box-reflect", 39],
      ["-webkit-box-shadow", 210],
      ["-webkit-column-break-inside", 60],
      ["-webkit-column-count", 84],
      ["-webkit-column-gap", 76],
      ["-webkit-column-rule", 25],
      ["-webkit-column-rule-color", 23],
      ["-webkit-columns", 44],
      ["-webkit-column-span", 29],
      ["-webkit-column-width", 47],
      ["-webkit-filter", 159],
      ["-webkit-font-feature-settings", 59],
      ["-webkit-font-smoothing", 177],
      ["-webkit-line-break", 45],
      ["-webkit-line-clamp", 126],
      ["-webkit-margin-after", 67],
      ["-webkit-margin-before", 70],
      ["-webkit-margin-collapse", 14],
      ["-webkit-margin-end", 65],
      ["-webkit-margin-start", 100],
      ["-webkit-mask", 19],
      ["-webkit-mask-box-image", 72],
      ["-webkit-mask-image", 88],
      ["-webkit-mask-position", 54],
      ["-webkit-mask-repeat", 63],
      ["-webkit-mask-size", 79],
      ["-webkit-padding-after", 15],
      ["-webkit-padding-before", 28],
      ["-webkit-padding-end", 48],
      ["-webkit-padding-start", 73],
      ["-webkit-print-color-adjust", 83],
      ["-webkit-rtl-ordering", 7],
      ["-webkit-tap-highlight-color", 169],
      ["-webkit-text-emphasis-color", 11],
      ["-webkit-text-fill-color", 71],
      ["-webkit-text-security", 17],
      ["-webkit-text-stroke", 56],
      ["-webkit-text-stroke-color", 37],
      ["-webkit-text-stroke-width", 53],
      ["-webkit-user-drag", 95],
      ["-webkit-user-modify", 62],
      ["-webkit-user-select", 194],
      ["-webkit-writing-mode", 4],
      ["white-space", 228],
      ["widows", 115],
      ["width", 268],
      ["will-change", 74],
      ["word-break", 166],
      ["word-spacing", 157],
      ["word-wrap", 197],
      ["writing-mode", 41],
      ["z-index", 239],
      ["zoom", 200]
    ]);
    CommonKeywords = ["auto", "none"];
    BaseVariableMatch = class {
      text;
      node;
      name;
      fallback;
      matching;
      computedTextCallback;
      constructor(text, node2, name, fallback, matching, computedTextCallback) {
        this.text = text;
        this.node = node2;
        this.name = name;
        this.fallback = fallback;
        this.matching = matching;
        this.computedTextCallback = computedTextCallback;
      }
      computedText() {
        return this.computedTextCallback(this, this.matching);
      }
      fallbackValue() {
        if (!this.fallback) {
          return null;
        }
        if (this.fallback.length === 0) {
          return "";
        }
        if (this.matching.hasUnresolvedSubstitutionsRange(this.fallback[0], this.fallback[this.fallback.length - 1])) {
          return null;
        }
        return this.matching.getComputedTextRange(this.fallback[0], this.fallback[this.fallback.length - 1]);
      }
    };
    BaseVariableMatcher = class extends matcherBase(BaseVariableMatch) {
      #computedTextCallback;
      constructor(computedTextCallback) {
        super();
        this.#computedTextCallback = computedTextCallback;
      }
      matches(node2, matching) {
        const callee = node2.getChild("Callee");
        if (node2.name !== "CallExpression" || !callee || matching.ast.text(callee) !== "var") {
          return null;
        }
        const args2 = ASTUtils.callArgs(node2).map((args3) => Array.from(ASTUtils.stripComments(args3)));
        if (args2.length < 1 || args2[0].length !== 1) {
          return null;
        }
        const nameNode = args2[0][0];
        const fallback = args2.length === 2 ? args2[1] : void 0;
        if (nameNode?.name !== "VariableName") {
          return null;
        }
        const varName = matching.ast.text(nameNode);
        if (!varName.startsWith("--")) {
          return null;
        }
        return new BaseVariableMatch(matching.ast.text(node2), node2, varName, fallback, matching, this.#computedTextCallback);
      }
    };
    VariableMatch = class extends BaseVariableMatch {
      matchedStyles;
      style;
      constructor(text, node2, name, fallback, matching, matchedStyles, style) {
        super(text, node2, name, fallback, matching, () => this.resolveVariable()?.value ?? this.fallbackValue());
        this.matchedStyles = matchedStyles;
        this.style = style;
      }
      resolveVariable() {
        return this.matchedStyles.computeCSSVariable(this.style, this.name);
      }
    };
    VariableMatcher = class extends matcherBase(VariableMatch) {
      matchedStyles;
      style;
      constructor(matchedStyles, style) {
        super();
        this.matchedStyles = matchedStyles;
        this.style = style;
      }
      matches(node2, matching) {
        const match = new BaseVariableMatcher(() => null).matches(node2, matching);
        return match ? new VariableMatch(match.text, match.node, match.name, match.fallback, match.matching, this.matchedStyles, this.style) : null;
      }
    };
    AttributeMatch = class extends BaseVariableMatch {
      type;
      isCSSTokens;
      isValidType;
      rawValue;
      substitutionText;
      matchedStyles;
      style;
      constructor(text, node2, name, fallback, matching, type2, isCSSTokens, isValidType, rawValue, substitutionText, matchedStyles, style, computedTextCallback) {
        super(text, node2, name, fallback, matching, (_, matching2) => computedTextCallback(this, matching2));
        this.type = type2;
        this.isCSSTokens = isCSSTokens;
        this.isValidType = isValidType;
        this.rawValue = rawValue;
        this.substitutionText = substitutionText;
        this.matchedStyles = matchedStyles;
        this.style = style;
      }
      rawAttributeValue() {
        return this.rawValue;
      }
      cssType() {
        return this.type ?? RAW_STRING_TYPE;
      }
      resolveAttributeValue() {
        return this.matchedStyles.computeAttribute(this.style, this.name, { type: this.cssType(), isCSSTokens: this.isCSSTokens });
      }
    };
    cssEvaluationElement = null;
    RAW_STRING_TYPE = "raw-string";
    AttributeMatcher = class extends matcherBase(AttributeMatch) {
      matchedStyles;
      style;
      computedTextCallback;
      constructor(matchedStyles, style, computedTextCallback) {
        super();
        this.matchedStyles = matchedStyles;
        this.style = style;
        this.computedTextCallback = computedTextCallback;
      }
      matches(node2, matching) {
        const callee = node2.getChild("Callee");
        if (node2.name !== "CallExpression" || !callee || matching.ast.text(callee) !== "attr") {
          return null;
        }
        const args2 = ASTUtils.callArgs(node2).map((args3) => Array.from(ASTUtils.stripComments(args3)));
        if (args2.length < 1) {
          return null;
        }
        const nameNode = args2[0][0];
        if (args2[0].length < 1 || args2[0].length > 2 || nameNode?.name !== "ValueName") {
          return null;
        }
        const fallback = args2.length === 2 ? args2[1] : void 0;
        let type2 = null;
        let isCSSTokens = false;
        if (args2[0].length === 2) {
          const typeNode = args2[0][1];
          type2 = matching.ast.text(typeNode);
          if (typeNode.name === "CallExpression") {
            if (matching.ast.text(typeNode.getChild("Callee")) !== "type") {
              return null;
            }
            isCSSTokens = true;
          } else if (typeNode.name !== "ValueName" && type2 !== "%") {
            return null;
          }
        }
        const isValidType = type2 === null || isValidCSSType(type2);
        isCSSTokens = isCSSTokens && isValidType;
        const attrName = matching.ast.text(nameNode);
        const rawValue = this.matchedStyles.rawAttributeValueFromStyle(this.style, attrName);
        let substitutionText = null;
        if (rawValue !== null) {
          substitutionText = isCSSTokens ? rawValue : localEvalCSS(rawValue, type2 ?? RAW_STRING_TYPE);
        } else if (!fallback) {
          substitutionText = defaultValueForCSSType(type2);
        }
        return new AttributeMatch(matching.ast.text(node2), node2, attrName, fallback, matching, type2, isCSSTokens, isValidType, rawValue, substitutionText, this.matchedStyles, this.style, this.computedTextCallback ?? defaultComputeText);
        function defaultComputeText(match, _matching) {
          return match.resolveAttributeValue() ?? (isValidType ? match.fallbackValue() : defaultValueForCSSType(match.type));
        }
      }
    };
    BinOpMatch = class {
      text;
      node;
      constructor(text, node2) {
        this.text = text;
        this.node = node2;
      }
    };
    BinOpMatcher = class extends matcherBase(BinOpMatch) {
      accepts() {
        return true;
      }
      matches(node2, matching) {
        return node2.name === "BinaryExpression" ? new BinOpMatch(matching.ast.text(node2), node2) : null;
      }
    };
    TextMatch = class {
      text;
      node;
      computedText;
      constructor(text, node2) {
        this.text = text;
        this.node = node2;
        if (node2.name === "Comment") {
          this.computedText = () => "";
        }
      }
      render() {
        const span = document.createElement("span");
        span.appendChild(document.createTextNode(this.text));
        return [span];
      }
    };
    TextMatcher = class extends matcherBase(TextMatch) {
      accepts() {
        return true;
      }
      matches(node2, matching) {
        if (!node2.firstChild || node2.name === "NumberLiteral") {
          const text = matching.ast.text(node2);
          if (text.length) {
            return new TextMatch(text, node2);
          }
        }
        return null;
      }
    };
    AngleMatch = class {
      text;
      node;
      constructor(text, node2) {
        this.text = text;
        this.node = node2;
      }
      computedText() {
        return this.text;
      }
    };
    AngleMatcher = class extends matcherBase(AngleMatch) {
      accepts(propertyName) {
        return cssMetadata().isAngleAwareProperty(propertyName);
      }
      matches(node2, matching) {
        if (node2.name !== "NumberLiteral") {
          return null;
        }
        const unit = node2.getChild("Unit");
        if (!unit || !["deg", "grad", "rad", "turn"].includes(matching.ast.text(unit))) {
          return null;
        }
        return new AngleMatch(matching.ast.text(node2), node2);
      }
    };
    ColorMixMatch = class {
      text;
      node;
      space;
      color1;
      color2;
      constructor(text, node2, space, color1, color2) {
        this.text = text;
        this.node = node2;
        this.space = space;
        this.color1 = color1;
        this.color2 = color2;
      }
    };
    ColorMixMatcher = class extends matcherBase(ColorMixMatch) {
      accepts(propertyName) {
        return cssMetadata().isColorAwareProperty(propertyName);
      }
      matches(node2, matching) {
        if (node2.name !== "CallExpression" || matching.ast.text(node2.getChild("Callee")) !== "color-mix") {
          return null;
        }
        const computedValueTree = tokenizeDeclaration("--property", matching.getComputedText(node2));
        if (!computedValueTree) {
          return null;
        }
        const value = ASTUtils.declValue(computedValueTree.tree);
        if (!value) {
          return null;
        }
        const computedValueArgs = ASTUtils.callArgs(value);
        if (computedValueArgs.length !== 3) {
          return null;
        }
        const [space, color1, color2] = computedValueArgs;
        if (space.length < 2 || computedValueTree.text(ASTUtils.stripComments(space).next().value) !== "in" || color1.length < 1 || color2.length < 1) {
          return null;
        }
        const p1 = color1.filter((n) => n.type.name === "NumberLiteral" && computedValueTree.text(n.getChild("Unit")) === "%");
        const p2 = color2.filter((n) => n.type.name === "NumberLiteral" && computedValueTree.text(n.getChild("Unit")) === "%");
        if (p1.length > 1 || p2.length > 1) {
          return null;
        }
        if (p1[0] && p2[0] && (literalToNumber(p1[0], computedValueTree) ?? 0) === 0 && (literalToNumber(p2[0], computedValueTree) ?? 0) === 0) {
          return null;
        }
        const args2 = ASTUtils.callArgs(node2);
        if (args2.length !== 3) {
          return null;
        }
        return new ColorMixMatch(matching.ast.text(node2), node2, args2[0], args2[1], args2[2]);
      }
    };
    URLMatch = class {
      url;
      text;
      node;
      constructor(url, text, node2) {
        this.url = url;
        this.text = text;
        this.node = node2;
      }
    };
    URLMatcher = class extends matcherBase(URLMatch) {
      matches(node2, matching) {
        if (node2.name !== "CallLiteral") {
          return null;
        }
        const callee = node2.getChild("CallTag");
        if (!callee || matching.ast.text(callee) !== "url") {
          return null;
        }
        const [, lparenNode, urlNode, rparenNode] = ASTUtils.siblings(callee);
        if (matching.ast.text(lparenNode) !== "(" || urlNode.name !== "ParenthesizedContent" && urlNode.name !== "StringLiteral" || matching.ast.text(rparenNode) !== ")") {
          return null;
        }
        const text = matching.ast.text(urlNode);
        const url = urlNode.name === "StringLiteral" ? text.substr(1, text.length - 2) : text.trim();
        return new URLMatch(url, matching.ast.text(node2), node2);
      }
    };
    LinearGradientMatch = class {
      text;
      node;
      constructor(text, node2) {
        this.text = text;
        this.node = node2;
      }
    };
    LinearGradientMatcher = class extends matcherBase(LinearGradientMatch) {
      matches(node2, matching) {
        const text = matching.ast.text(node2);
        if (node2.name === "CallExpression" && matching.ast.text(node2.getChild("Callee")) === "linear-gradient") {
          return new LinearGradientMatch(text, node2);
        }
        return null;
      }
      accepts(propertyName) {
        return ["background", "background-image", "-webkit-mask-image"].includes(propertyName);
      }
    };
    ColorMatch = class {
      text;
      node;
      currentColorCallback;
      relativeColor;
      computedText;
      constructor(text, node2, currentColorCallback, relativeColor) {
        this.text = text;
        this.node = node2;
        this.currentColorCallback = currentColorCallback;
        this.relativeColor = relativeColor;
        this.computedText = currentColorCallback;
      }
    };
    ColorMatcher = class _ColorMatcher extends matcherBase(ColorMatch) {
      currentColorCallback;
      constructor(currentColorCallback) {
        super();
        this.currentColorCallback = currentColorCallback;
      }
      accepts(propertyName) {
        return cssMetadata().isColorAwareProperty(propertyName);
      }
      matches(node2, matching) {
        const text = matching.ast.text(node2);
        if (node2.name === "ColorLiteral") {
          return new ColorMatch(text, node2);
        }
        if (node2.name === "ValueName") {
          if (Nicknames.has(text)) {
            return new ColorMatch(text, node2);
          }
          if (text.toLowerCase() === "currentcolor" && this.currentColorCallback) {
            const callback = this.currentColorCallback;
            return new ColorMatch(text, node2, () => callback() ?? text);
          }
        }
        if (node2.name === "CallExpression") {
          const callee = node2.getChild("Callee");
          const colorFunc = matching.ast.text(callee).toLowerCase();
          if (callee && colorFunc.match(/^(rgba?|hsla?|hwba?|lab|lch|oklab|oklch|color)$/)) {
            const args2 = ASTUtils.children(node2.getChild("ArgList"));
            const colorText = args2.length >= 2 ? matching.getComputedTextRange(args2[0], args2[args2.length - 1]) : "";
            const isRelativeColorSyntax = Boolean(colorText.match(/^[^)]*\(\W*from\W+/) && !matching.hasUnresolvedSubstitutions(node2) && CSS.supports("color", colorFunc + colorText));
            if (!isRelativeColorSyntax) {
              return new ColorMatch(text, node2);
            }
            const tokenized = matchDeclaration("--color", "--colorFunc" + colorText, [new _ColorMatcher()]);
            if (!tokenized) {
              return null;
            }
            const [colorArgs] = ASTUtils.callArgs(ASTUtils.declValue(tokenized.ast.tree));
            if (colorArgs.length !== (colorFunc === "color" ? 6 : 5)) {
              return null;
            }
            const colorSpace = getFormat(colorFunc !== "color" ? colorFunc : matching.ast.text(colorArgs[2]));
            if (!colorSpace) {
              return null;
            }
            const baseColor = tokenized.getMatch(colorArgs[1]);
            if (tokenized.ast.text(colorArgs[0]) !== "from" || !(baseColor instanceof ColorMatch)) {
              return null;
            }
            return new ColorMatch(text, node2, void 0, { colorSpace, baseColor });
          }
        }
        return null;
      }
    };
    RelativeColorChannelMatch = class {
      text;
      node;
      constructor(text, node2) {
        this.text = text;
        this.node = node2;
      }
      getColorChannelValue(relativeColor) {
        const color = parse$2(relativeColor.baseColor.text)?.as(relativeColor.colorSpace);
        if (color instanceof ColorFunction) {
          switch (this.text) {
            case "r":
              return color.isXYZ() ? null : color.p0;
            case "g":
              return color.isXYZ() ? null : color.p1;
            case "b":
              return color.isXYZ() ? null : color.p2;
            case "x":
              return color.isXYZ() ? color.p0 : null;
            case "y":
              return color.isXYZ() ? color.p1 : null;
            case "z":
              return color.isXYZ() ? color.p2 : null;
            case "alpha":
              return color.alpha;
          }
        } else if (color instanceof Legacy) {
          switch (this.text) {
            case "r":
              return color.rgba()[0];
            case "g":
              return color.rgba()[1];
            case "b":
              return color.rgba()[2];
            case "alpha":
              return color.rgba()[3];
          }
        } else if (color && this.text in color) {
          return color[this.text];
        }
        return null;
      }
      computedText() {
        return this.text;
      }
    };
    RelativeColorChannelMatcher = class extends matcherBase(RelativeColorChannelMatch) {
      accepts(propertyName) {
        return cssMetadata().isColorAwareProperty(propertyName);
      }
      matches(node2, matching) {
        const text = matching.ast.text(node2);
        if (node2.name === "ValueName" && isRelativeColorChannelName(text)) {
          return new RelativeColorChannelMatch(text, node2);
        }
        return null;
      }
    };
    LightDarkColorMatch = class {
      text;
      node;
      light;
      dark;
      style;
      constructor(text, node2, light, dark, style) {
        this.text = text;
        this.node = node2;
        this.light = light;
        this.dark = dark;
        this.style = style;
      }
    };
    LightDarkColorMatcher = class extends matcherBase(LightDarkColorMatch) {
      style;
      constructor(style) {
        super();
        this.style = style;
      }
      accepts(propertyName) {
        return cssMetadata().isColorAwareProperty(propertyName);
      }
      matches(node2, matching) {
        if (node2.name !== "CallExpression" || matching.ast.text(node2.getChild("Callee")) !== "light-dark") {
          return null;
        }
        const args2 = ASTUtils.callArgs(node2);
        if (args2.length !== 2 || args2[0].length === 0 || args2[1].length === 0) {
          return null;
        }
        return new LightDarkColorMatch(matching.ast.text(node2), node2, args2[0], args2[1], this.style);
      }
    };
    AutoBaseMatch = class {
      text;
      node;
      auto;
      base;
      constructor(text, node2, auto, base) {
        this.text = text;
        this.node = node2;
        this.auto = auto;
        this.base = base;
      }
    };
    AutoBaseMatcher = class extends matcherBase(AutoBaseMatch) {
      matches(node2, matching) {
        if (node2.name !== "CallExpression" || matching.ast.text(node2.getChild("Callee")) !== "-internal-auto-base") {
          return null;
        }
        const args2 = ASTUtils.callArgs(node2);
        if (args2.length !== 2 || args2[0].length === 0 || args2[1].length === 0) {
          return null;
        }
        return new AutoBaseMatch(matching.ast.text(node2), node2, args2[0], args2[1]);
      }
    };
    LinkableNameMatch = class {
      text;
      node;
      propertyName;
      constructor(text, node2, propertyName) {
        this.text = text;
        this.node = node2;
        this.propertyName = propertyName;
      }
    };
    LinkableNameMatcher = class _LinkableNameMatcher extends matcherBase(LinkableNameMatch) {
      static isLinkableNameProperty(propertyName) {
        const names3 = [
          "animation",
          "animation-name",
          "font-palette",
          "position-try-fallbacks",
          "position-try"
        ];
        return names3.includes(propertyName);
      }
      static identifierAnimationLonghandMap = new Map(Object.entries({
        normal: "direction",
        alternate: "direction",
        reverse: "direction",
        "alternate-reverse": "direction",
        none: "fill-mode",
        forwards: "fill-mode",
        backwards: "fill-mode",
        both: "fill-mode",
        running: "play-state",
        paused: "play-state",
        infinite: "iteration-count",
        linear: "easing-function",
        ease: "easing-function",
        "ease-in": "easing-function",
        "ease-out": "easing-function",
        "ease-in-out": "easing-function",
        steps: "easing-function",
        "step-start": "easing-function",
        "step-end": "easing-function"
      }));
      matchAnimationNameInShorthand(node2, matching) {
        const text = matching.ast.text(node2);
        if (!_LinkableNameMatcher.identifierAnimationLonghandMap.has(text)) {
          return new LinkableNameMatch(text, node2, "animation");
        }
        const declarations = ASTUtils.split(ASTUtils.siblings(ASTUtils.declValue(matching.ast.tree)));
        const currentDeclarationNodes = declarations.find((declaration2) => declaration2[0].from <= node2.from && declaration2[declaration2.length - 1].to >= node2.to);
        if (!currentDeclarationNodes) {
          return null;
        }
        const computedText = matching.getComputedTextRange(currentDeclarationNodes[0], node2);
        const tokenized = tokenizeDeclaration("--p", computedText);
        if (!tokenized) {
          return null;
        }
        const identifierCategory = _LinkableNameMatcher.identifierAnimationLonghandMap.get(text);
        for (let itNode = ASTUtils.declValue(tokenized.tree); itNode?.nextSibling; itNode = itNode.nextSibling) {
          if (itNode.name === "ValueName") {
            const categoryValue = _LinkableNameMatcher.identifierAnimationLonghandMap.get(tokenized.text(itNode));
            if (categoryValue && categoryValue === identifierCategory) {
              return new LinkableNameMatch(text, node2, "animation");
            }
          }
        }
        return null;
      }
      matches(node2, matching) {
        const { propertyName } = matching.ast;
        const text = matching.ast.text(node2);
        const parentNode = node2.parent;
        if (!parentNode) {
          return null;
        }
        if (!(propertyName && _LinkableNameMatcher.isLinkableNameProperty(propertyName))) {
          return null;
        }
        const isParentADeclaration = parentNode.name === "Declaration";
        const isInsideVarCall = parentNode.name === "ArgList" && parentNode.prevSibling?.name === "Callee" && matching.ast.text(parentNode.prevSibling) === "var";
        const isAParentDeclarationOrVarCall = isParentADeclaration || isInsideVarCall;
        const shouldMatchOnlyVariableName = propertyName === "position-try" || propertyName === "position-try-fallbacks";
        if (!propertyName || node2.name !== "ValueName" && node2.name !== "VariableName" || !isAParentDeclarationOrVarCall || node2.name === "ValueName" && shouldMatchOnlyVariableName) {
          return null;
        }
        if (propertyName === "animation") {
          return this.matchAnimationNameInShorthand(node2, matching);
        }
        return new LinkableNameMatch(text, node2, propertyName);
      }
    };
    BezierMatch = class {
      text;
      node;
      constructor(text, node2) {
        this.text = text;
        this.node = node2;
      }
    };
    BezierMatcher = class extends matcherBase(BezierMatch) {
      accepts(propertyName) {
        return cssMetadata().isBezierAwareProperty(propertyName);
      }
      matches(node2, matching) {
        const text = matching.ast.text(node2);
        const isCubicBezierKeyword = node2.name === "ValueName" && CubicBezierKeywordValues.has(text);
        const isCubicBezierOrLinearFunction = node2.name === "CallExpression" && ["cubic-bezier", "linear"].includes(matching.ast.text(node2.getChild("Callee")));
        if (!isCubicBezierKeyword && !isCubicBezierOrLinearFunction) {
          return null;
        }
        return new BezierMatch(text, node2);
      }
    };
    StringMatch = class {
      text;
      node;
      constructor(text, node2) {
        this.text = text;
        this.node = node2;
      }
    };
    StringMatcher = class extends matcherBase(StringMatch) {
      matches(node2, matching) {
        return node2.name === "StringLiteral" ? new StringMatch(matching.ast.text(node2), node2) : null;
      }
    };
    ShadowMatch = class {
      text;
      node;
      shadowType;
      constructor(text, node2, shadowType) {
        this.text = text;
        this.node = node2;
        this.shadowType = shadowType;
      }
    };
    ShadowMatcher = class extends matcherBase(ShadowMatch) {
      accepts(propertyName) {
        return cssMetadata().isShadowProperty(propertyName);
      }
      matches(node2, matching) {
        if (node2.name !== "Declaration") {
          return null;
        }
        const valueNodes = ASTUtils.siblings(ASTUtils.declValue(node2));
        if (valueNodes.length === 0) {
          return null;
        }
        const valueText = matching.ast.textRange(valueNodes[0], valueNodes[valueNodes.length - 1]);
        return new ShadowMatch(valueText, node2, matching.ast.propertyName === "text-shadow" ? "textShadow" : "boxShadow");
      }
    };
    FontMatch = class {
      text;
      node;
      constructor(text, node2) {
        this.text = text;
        this.node = node2;
      }
    };
    FontMatcher = class extends matcherBase(FontMatch) {
      accepts(propertyName) {
        return cssMetadata().isFontAwareProperty(propertyName);
      }
      matches(node2, matching) {
        if (node2.name !== "Declaration") {
          return null;
        }
        const valueNodes = ASTUtils.siblings(ASTUtils.declValue(node2));
        if (valueNodes.length === 0) {
          return null;
        }
        const validNodes = matching.ast.propertyName === "font-family" ? ["ValueName", "StringLiteral", "Comment", ","] : ["Comment", "ValueName", "NumberLiteral"];
        if (valueNodes.some((node3) => !validNodes.includes(node3.name))) {
          return null;
        }
        const valueText = matching.ast.textRange(valueNodes[0], valueNodes[valueNodes.length - 1]);
        return new FontMatch(valueText, node2);
      }
    };
    LengthMatch = class {
      text;
      node;
      unit;
      constructor(text, node2, unit) {
        this.text = text;
        this.node = node2;
        this.unit = unit;
      }
    };
    LengthMatcher = class _LengthMatcher extends matcherBase(LengthMatch) {
      static LENGTH_UNITS = /* @__PURE__ */ new Set([
        "em",
        "ex",
        "ch",
        "cap",
        "ic",
        "lh",
        "rem",
        "rex",
        "rch",
        "rlh",
        "ric",
        "rcap",
        "pt",
        "pc",
        "in",
        "cm",
        "mm",
        "Q",
        "vw",
        "vh",
        "vi",
        "vb",
        "vmin",
        "vmax",
        "dvw",
        "dvh",
        "dvi",
        "dvb",
        "dvmin",
        "dvmax",
        "svw",
        "svh",
        "svi",
        "svb",
        "svmin",
        "svmax",
        "lvw",
        "lvh",
        "lvi",
        "lvb",
        "lvmin",
        "lvmax",
        "cqw",
        "cqh",
        "cqi",
        "cqb",
        "cqmin",
        "cqmax",
        "cqem",
        "cqlh",
        "cqex",
        "cqch",
        "%"
      ]);
      matches(node2, matching) {
        if (node2.name !== "NumberLiteral") {
          return null;
        }
        const unit = matching.ast.text(node2.getChild("Unit"));
        if (!_LengthMatcher.LENGTH_UNITS.has(unit)) {
          return null;
        }
        const text = matching.ast.text(node2);
        return new LengthMatch(text, node2, unit);
      }
    };
    BaseFunctionMatch = class {
      text;
      node;
      func;
      args;
      constructor(text, node2, func, args2) {
        this.text = text;
        this.node = node2;
        this.func = func;
        this.args = args2;
      }
    };
    MathFunctionMatch = class extends BaseFunctionMatch {
      isArithmeticFunctionCall() {
        const func = this.func;
        switch (func) {
          case "calc":
          case "sibling-count":
          case "sibling-index":
          case "round":
          case "mod":
          case "rem":
            return true;
        }
        return false;
      }
    };
    MathFunctionMatcher = class _MathFunctionMatcher extends matcherBase(MathFunctionMatch) {
      static getFunctionType(callee) {
        const maybeFunc = callee;
        switch (maybeFunc) {
          case null:
          case "min":
          case "max":
          case "clamp":
          case "calc":
          case "sibling-count":
          case "sibling-index":
          case "round":
          case "mod":
          case "rem":
            return maybeFunc;
        }
        return null;
      }
      matches(node2, matching) {
        if (node2.name !== "CallExpression") {
          return null;
        }
        const callee = _MathFunctionMatcher.getFunctionType(matching.ast.text(node2.getChild("Callee")));
        if (!callee) {
          return null;
        }
        const args2 = ASTUtils.callArgs(node2);
        if (args2.some((arg) => arg.length === 0 || matching.hasUnresolvedSubstitutionsRange(arg[0], arg[arg.length - 1]))) {
          return null;
        }
        const text = matching.ast.text(node2);
        const match = new MathFunctionMatch(text, node2, callee, args2);
        if (!match.isArithmeticFunctionCall() && args2.length === 0) {
          return null;
        }
        return match;
      }
    };
    CustomFunctionMatch = class extends BaseFunctionMatch {
    };
    CustomFunctionMatcher = class extends matcherBase(CustomFunctionMatch) {
      matches(node2, matching) {
        if (node2.name !== "CallExpression") {
          return null;
        }
        const callee = matching.ast.text(node2.getChild("VariableName"));
        if (!callee?.startsWith("--")) {
          return null;
        }
        const args2 = ASTUtils.callArgs(node2);
        if (args2.some((arg) => arg.length === 0 || matching.hasUnresolvedSubstitutionsRange(arg[0], arg[arg.length - 1]))) {
          return null;
        }
        const text = matching.ast.text(node2);
        return new CustomFunctionMatch(text, node2, callee, args2);
      }
    };
    FlexGridGridLanesMatch = class {
      text;
      node;
      layoutType;
      constructor(text, node2, layoutType) {
        this.text = text;
        this.node = node2;
        this.layoutType = layoutType;
      }
    };
    FlexGridGridLanesMatcher = class _FlexGridGridLanesMatcher extends matcherBase(FlexGridGridLanesMatch) {
      static FLEX = ["flex", "inline-flex", "block flex", "inline flex"];
      static GRID = ["grid", "inline-grid", "block grid", "inline grid"];
      static GRID_LANES = ["grid-lanes", "inline-grid-lanes", "block grid-lanes", "inline grid-lanes"];
      accepts(propertyName) {
        return propertyName === "display";
      }
      matches(node2, matching) {
        if (node2.name !== "Declaration") {
          return null;
        }
        const valueNodes = ASTUtils.siblings(ASTUtils.declValue(node2));
        if (valueNodes.length < 1) {
          return null;
        }
        const values = valueNodes.filter((node3) => node3.name !== "Important").map((node3) => matching.getComputedText(node3).trim()).filter((value) => value);
        const text = values.join(" ");
        if (_FlexGridGridLanesMatcher.FLEX.includes(text)) {
          return new FlexGridGridLanesMatch(matching.ast.text(node2), node2, "flex");
        }
        if (_FlexGridGridLanesMatcher.GRID.includes(text)) {
          return new FlexGridGridLanesMatch(matching.ast.text(node2), node2, "grid");
        }
        if (_FlexGridGridLanesMatcher.GRID_LANES.includes(text)) {
          return new FlexGridGridLanesMatch(matching.ast.text(node2), node2, "grid-lanes");
        }
        return null;
      }
    };
    GridTemplateMatch = class {
      text;
      node;
      lines;
      constructor(text, node2, lines) {
        this.text = text;
        this.node = node2;
        this.lines = lines;
      }
    };
    GridTemplateMatcher = class extends matcherBase(GridTemplateMatch) {
      accepts(propertyName) {
        return cssMetadata().isGridAreaDefiningProperty(propertyName);
      }
      matches(node2, matching) {
        if (node2.name !== "Declaration" || matching.hasUnresolvedSubstitutions(node2)) {
          return null;
        }
        const lines = [];
        let curLine = [];
        let hasLeadingLineNames = false;
        let needClosingLineNames = false;
        function parseNodes(nodes, varParsingMode = false) {
          for (const curNode of nodes) {
            if (matching.getMatch(curNode) instanceof BaseVariableMatch) {
              const computedValueTree = tokenizeDeclaration("--property", matching.getComputedText(curNode));
              if (!computedValueTree) {
                continue;
              }
              const varNodes = ASTUtils.siblings(ASTUtils.declValue(computedValueTree.tree));
              if (varNodes.length === 0) {
                continue;
              }
              if (varNodes[0].name === "StringLiteral" && !hasLeadingLineNames || varNodes[0].name === "BracketedValue" && !needClosingLineNames) {
                lines.push(curLine);
                curLine = [curNode];
              } else {
                curLine.push(curNode);
              }
              parseNodes(varNodes, true);
            } else if (curNode.name === "BinaryExpression") {
              parseNodes(ASTUtils.siblings(curNode.firstChild));
            } else if (curNode.name === "StringLiteral") {
              if (!varParsingMode) {
                if (hasLeadingLineNames) {
                  curLine.push(curNode);
                } else {
                  lines.push(curLine);
                  curLine = [curNode];
                }
              }
              needClosingLineNames = true;
              hasLeadingLineNames = false;
            } else if (curNode.name === "BracketedValue") {
              if (!varParsingMode) {
                if (needClosingLineNames) {
                  curLine.push(curNode);
                } else {
                  lines.push(curLine);
                  curLine = [curNode];
                }
              }
              hasLeadingLineNames = !needClosingLineNames;
              needClosingLineNames = !needClosingLineNames;
            } else if (!varParsingMode) {
              curLine.push(curNode);
            }
          }
        }
        const valueNodes = ASTUtils.siblings(ASTUtils.declValue(node2));
        if (valueNodes.length === 0) {
          return null;
        }
        parseNodes(valueNodes);
        lines.push(curLine);
        const valueText = matching.ast.textRange(valueNodes[0], valueNodes[valueNodes.length - 1]);
        return new GridTemplateMatch(valueText, node2, lines.filter((line) => line.length > 0));
      }
    };
    AnchorFunctionMatch = class {
      text;
      node;
      functionName;
      constructor(text, node2, functionName2) {
        this.text = text;
        this.node = node2;
        this.functionName = functionName2;
      }
    };
    AnchorFunctionMatcher = class extends matcherBase(AnchorFunctionMatch) {
      anchorFunction(node2, matching) {
        if (node2.name !== "CallExpression") {
          return null;
        }
        const calleeText = matching.ast.text(node2.getChild("Callee"));
        if (calleeText === "anchor" || calleeText === "anchor-size") {
          return calleeText;
        }
        return null;
      }
      matches(node2, matching) {
        if (node2.name === "VariableName") {
          let parent = node2.parent;
          if (parent?.name !== "ArgList") {
            return null;
          }
          parent = parent.parent;
          if (!parent || !this.anchorFunction(parent, matching)) {
            return null;
          }
          return new AnchorFunctionMatch(matching.ast.text(node2), node2, null);
        }
        const calleeText = this.anchorFunction(node2, matching);
        if (!calleeText) {
          return null;
        }
        const args2 = ASTUtils.children(node2.getChild("ArgList"));
        if (calleeText === "anchor" && args2.length <= 2) {
          return null;
        }
        if (args2.find((arg) => arg.name === "VariableName")) {
          return null;
        }
        return new AnchorFunctionMatch(matching.ast.text(node2), node2, calleeText);
      }
    };
    PositionAnchorMatch = class {
      text;
      matching;
      node;
      constructor(text, matching, node2) {
        this.text = text;
        this.matching = matching;
        this.node = node2;
      }
    };
    PositionAnchorMatcher = class extends matcherBase(PositionAnchorMatch) {
      accepts(propertyName) {
        return propertyName === "position-anchor";
      }
      matches(node2, matching) {
        if (node2.name !== "VariableName") {
          return null;
        }
        const dashedIdentifier = matching.ast.text(node2);
        return new PositionAnchorMatch(dashedIdentifier, matching, node2);
      }
    };
    CSSWideKeywordMatch = class {
      text;
      node;
      property;
      matchedStyles;
      constructor(text, node2, property, matchedStyles) {
        this.text = text;
        this.node = node2;
        this.property = property;
        this.matchedStyles = matchedStyles;
      }
      resolveProperty() {
        return this.matchedStyles.resolveGlobalKeyword(this.property, this.text);
      }
      computedText() {
        return this.resolveProperty()?.value ?? null;
      }
    };
    CSSWideKeywordMatcher = class extends matcherBase(CSSWideKeywordMatch) {
      property;
      matchedStyles;
      constructor(property, matchedStyles) {
        super();
        this.property = property;
        this.matchedStyles = matchedStyles;
      }
      matches(node2, matching) {
        const parentNode = node2.parent;
        if (node2.name !== "ValueName" || parentNode?.name !== "Declaration") {
          return null;
        }
        if (Array.from(ASTUtils.stripComments(ASTUtils.siblings(ASTUtils.declValue(parentNode)))).some((child) => !ASTUtils.equals(child, node2))) {
          return null;
        }
        const text = matching.ast.text(node2);
        if (!CSSMetadata.isCSSWideKeyword(text)) {
          return null;
        }
        return new CSSWideKeywordMatch(text, node2, this.property, this.matchedStyles);
      }
    };
    PositionTryMatch = class {
      text;
      node;
      preamble;
      fallbacks;
      constructor(text, node2, preamble, fallbacks) {
        this.text = text;
        this.node = node2;
        this.preamble = preamble;
        this.fallbacks = fallbacks;
      }
    };
    PositionTryMatcher = class extends matcherBase(PositionTryMatch) {
      accepts(propertyName) {
        return propertyName === "position-try" || propertyName === "position-try-fallbacks";
      }
      matches(node2, matching) {
        if (node2.name !== "Declaration") {
          return null;
        }
        let preamble = [];
        const valueNodes = ASTUtils.siblings(ASTUtils.declValue(node2));
        const fallbacks = ASTUtils.split(valueNodes);
        if (matching.ast.propertyName === "position-try") {
          for (const [i, n] of fallbacks[0].entries()) {
            const computedText = matching.getComputedText(n);
            if (CSSMetadata.isCSSWideKeyword(computedText)) {
              return null;
            }
            if (CSSMetadata.isPositionTryOrderKeyword(computedText)) {
              preamble = fallbacks[0].splice(0, i + 1);
              break;
            }
          }
        }
        const valueText = matching.ast.textRange(valueNodes[0], valueNodes[valueNodes.length - 1]);
        return new PositionTryMatch(valueText, node2, preamble, fallbacks);
      }
    };
    EnvFunctionMatch = class {
      text;
      node;
      varName;
      value;
      varNameIsValid;
      constructor(text, node2, varName, value, varNameIsValid) {
        this.text = text;
        this.node = node2;
        this.varName = varName;
        this.value = value;
        this.varNameIsValid = varNameIsValid;
      }
      computedText() {
        return this.value;
      }
    };
    EnvFunctionMatcher = class extends matcherBase(EnvFunctionMatch) {
      matchedStyles;
      constructor(matchedStyles) {
        super();
        this.matchedStyles = matchedStyles;
      }
      matches(node2, matching) {
        if (node2.name !== "CallExpression" || matching.ast.text(node2.getChild("Callee")) !== "env") {
          return null;
        }
        const [valueNodes, ...fallbackNodes] = ASTUtils.callArgs(node2);
        if (!valueNodes?.length) {
          return null;
        }
        const fallbackValue = fallbackNodes.length > 0 ? matching.getComputedTextRange(...ASTUtils.range(fallbackNodes.flat())) : void 0;
        const varName = matching.getComputedTextRange(...ASTUtils.range(valueNodes)).trim();
        const value = this.matchedStyles.environmentVariable(varName);
        return new EnvFunctionMatch(matching.ast.text(node2), node2, varName, value ?? fallbackValue ?? null, Boolean(value));
      }
    };
    SyntaxTree = class _SyntaxTree {
      propertyValue;
      rule;
      tree;
      trailingNodes;
      propertyName;
      constructor(propertyValue, rule, tree, propertyName, trailingNodes = []) {
        this.propertyName = propertyName;
        this.propertyValue = propertyValue;
        this.rule = rule;
        this.tree = tree;
        this.trailingNodes = trailingNodes;
      }
      text(node2) {
        if (node2 === null) {
          return "";
        }
        return nodeText(node2 ?? this.tree, this.rule);
      }
      textRange(from2, to) {
        if (!from2 || !to) {
          return "";
        }
        return nodeTextRange(from2, to, this.rule);
      }
      subtree(node2) {
        return new _SyntaxTree(this.propertyValue, this.rule, node2);
      }
    };
    TreeWalker = class {
      ast;
      constructor(ast2) {
        this.ast = ast2;
      }
      static walkExcludingSuccessors(propertyValue, ...args2) {
        const instance2 = new this(propertyValue, ...args2);
        if (propertyValue.tree.name === "Declaration") {
          instance2.iterateDeclaration(propertyValue.tree);
        } else {
          instance2.iterateExcludingSuccessors(propertyValue.tree);
        }
        return instance2;
      }
      static walk(propertyValue, ...args2) {
        const instance2 = new this(propertyValue, ...args2);
        if (propertyValue.tree.name === "Declaration") {
          instance2.iterateDeclaration(propertyValue.tree);
        } else {
          instance2.iterate(propertyValue.tree);
        }
        return instance2;
      }
      iterateDeclaration(tree) {
        if (tree.name !== "Declaration") {
          return;
        }
        if (this.enter(tree)) {
          for (const sibling of ASTUtils.siblings(ASTUtils.declValue(tree))) {
            sibling.cursor().iterate(this.enter.bind(this), this.leave.bind(this));
          }
        }
        this.leave(tree);
      }
      iterate(tree) {
        for (const sibling of ASTUtils.siblings(tree)) {
          sibling.cursor().iterate(this.enter.bind(this), this.leave.bind(this));
        }
      }
      iterateExcludingSuccessors(tree) {
        tree.cursor().iterate(this.enter.bind(this), this.leave.bind(this));
      }
      enter(_node) {
        return true;
      }
      leave(_node) {
      }
    };
    BottomUpTreeMatching = class extends TreeWalker {
      #matchers = [];
      #matchedNodes = /* @__PURE__ */ new Map();
      computedText;
      #key(node2) {
        return `${node2.from}:${node2.to}`;
      }
      constructor(ast2, matchers) {
        super(ast2);
        this.computedText = new ComputedText(ast2.rule.substring(ast2.tree.from));
        this.#matchers.push(...matchers.filter((m) => !ast2.propertyName || m.accepts(ast2.propertyName)));
        this.#matchers.push(new TextMatcher());
      }
      leave({ node: node2 }) {
        for (const matcher3 of this.#matchers) {
          const match = matcher3.matches(node2, this);
          if (match) {
            this.computedText.push(match, node2.from - this.ast.tree.from);
            this.#matchedNodes.set(this.#key(node2), match);
            break;
          }
        }
      }
      matchText(node2) {
        const matchers = this.#matchers.splice(0);
        this.#matchers.push(new TextMatcher());
        this.iterateExcludingSuccessors(node2);
        this.#matchers.push(...matchers);
      }
      hasMatches(...matchTypes) {
        return Boolean(this.#matchedNodes.values().find((match) => matchTypes.some((matchType) => match instanceof matchType)));
      }
      getMatch(node2) {
        return this.#matchedNodes.get(this.#key(node2));
      }
      hasUnresolvedSubstitutions(node2) {
        return this.hasUnresolvedSubstitutionsRange(node2, node2);
      }
      hasUnresolvedSubstitutionsRange(from2, to) {
        return this.computedText.hasUnresolvedSubstitutions(from2.from - this.ast.tree.from, to.to - this.ast.tree.from);
      }
      getComputedText(node2, substitutionHook) {
        return this.getComputedTextRange(node2, node2, substitutionHook);
      }
      getLonghandValuesCount() {
        const [from2, to] = ASTUtils.range(ASTUtils.siblings(ASTUtils.declValue(this.ast.tree)));
        if (!from2 || !to) {
          return 0;
        }
        return this.computedText.countTopLevelValues(from2.from - this.ast.tree.from, to.to - this.ast.tree.from);
      }
      getComputedLonghandName(to) {
        const from2 = ASTUtils.declValue(this.ast.tree) ?? this.ast.tree;
        return this.computedText.countTopLevelValues(from2.from - this.ast.tree.from, to.from - this.ast.tree.from);
      }
      getComputedPropertyValueText(substitutionHook) {
        const [from2, to] = ASTUtils.range(ASTUtils.siblings(ASTUtils.declValue(this.ast.tree)));
        return this.getComputedTextRange(from2 ?? this.ast.tree, to ?? this.ast.tree, substitutionHook);
      }
      getComputedTextRange(from2, to, substitutionHook) {
        if (!from2 || !to) {
          return "";
        }
        return this.computedText.get(from2.from - this.ast.tree.from, to.to - this.ast.tree.from, substitutionHook);
      }
    };
    ComputedTextChunk = class {
      match;
      offset;
      #cachedComputedText = null;
      #topLevelValueCount = null;
      constructor(match, offset) {
        this.match = match;
        this.offset = offset;
      }
      get end() {
        return this.offset + this.length;
      }
      get length() {
        return this.match.text.length;
      }
      get computedText() {
        if (this.#cachedComputedText === null) {
          this.#cachedComputedText = this.match.computedText();
        }
        return this.#cachedComputedText;
      }
      get topLevelValueCount() {
        if (this.match.node.parent?.name !== "Declaration") {
          return 0;
        }
        const computedText = this.computedText;
        if (computedText === "") {
          return 0;
        }
        if (this.#topLevelValueCount === null) {
          this.#topLevelValueCount = ASTUtils.siblings(ASTUtils.declValue(tokenizeDeclaration("--p", computedText ?? this.match.text)?.tree ?? null)).length;
        }
        return this.#topLevelValueCount;
      }
    };
    ComputedText = class {
      #chunks = [];
      text;
      #topLevelValueCounts = /* @__PURE__ */ new Map();
      #sorted = true;
      constructor(text) {
        this.text = text;
      }
      clear() {
        this.#chunks.splice(0);
        this.#topLevelValueCounts.clear();
      }
      get chunkCount() {
        return this.#chunks.length;
      }
      #sortIfNecessary() {
        if (this.#sorted) {
          return;
        }
        this.#chunks.sort((a, b) => {
          if (a.offset < b.offset) {
            return -1;
          }
          if (b.offset < a.offset) {
            return 1;
          }
          if (a.end > b.end) {
            return -1;
          }
          if (a.end < b.end) {
            return 1;
          }
          return 0;
        });
        this.#sorted = true;
      }
      push(match, offset) {
        function hasComputedText(match2) {
          return Boolean(match2.computedText);
        }
        if (!hasComputedText(match) || offset < 0 || offset >= this.text.length) {
          return;
        }
        const chunk = new ComputedTextChunk(match, offset);
        if (chunk.end > this.text.length) {
          return;
        }
        this.#sorted = false;
        this.#chunks.push(chunk);
      }
      *#range(begin, end) {
        this.#sortIfNecessary();
        let i = this.#chunks.findIndex((c) => c.offset >= begin);
        while (i >= 0 && i < this.#chunks.length && this.#chunks[i].end > begin && begin < end) {
          if (this.#chunks[i].end > end) {
            i++;
            continue;
          }
          yield this.#chunks[i];
          begin = this.#chunks[i].end;
          while (begin < end && i < this.#chunks.length && this.#chunks[i].offset < begin) {
            i++;
          }
        }
      }
      hasUnresolvedSubstitutions(begin, end) {
        for (const chunk of this.#range(begin, end)) {
          if (chunk.computedText === null) {
            return true;
          }
        }
        return false;
      }
      *#getPieces(begin, end) {
        for (const chunk of this.#range(begin, end)) {
          const piece = this.text.substring(begin, Math.min(chunk.offset, end));
          yield piece;
          if (end >= chunk.end) {
            yield chunk;
          }
          begin = chunk.end;
        }
        if (begin < end) {
          const piece = this.text.substring(begin, end);
          yield piece;
        }
      }
      get(begin, end, substitutionHook) {
        const pieces = [];
        const getText2 = (piece) => {
          if (typeof piece === "string") {
            return piece;
          }
          const substitution = substitutionHook?.(piece.match) ?? null;
          if (substitution !== null) {
            return getText2(substitution);
          }
          return piece.computedText ?? piece.match.text;
        };
        for (const piece of this.#getPieces(begin, end)) {
          const text = getText2(piece);
          if (text.length === 0) {
            continue;
          }
          if (pieces.length > 0 && requiresSpace(pieces[pieces.length - 1], text)) {
            pieces.push(" ");
          }
          pieces.push(text);
        }
        return pieces.join("");
      }
      #countTopLevelValuesInStringPiece(piece) {
        let count = this.#topLevelValueCounts.get(piece);
        if (count === void 0) {
          count = ASTUtils.siblings(ASTUtils.declValue(tokenizeDeclaration("--p", piece)?.tree ?? null)).length;
          this.#topLevelValueCounts.set(piece, count);
        }
        return count;
      }
      countTopLevelValues(begin, end) {
        const pieces = Array.from(this.#getPieces(begin, end));
        const counts = pieces.map((chunk) => chunk instanceof ComputedTextChunk ? chunk.topLevelValueCount : this.#countTopLevelValuesInStringPiece(chunk));
        const count = counts.reduce((sum, v) => sum + v, 0);
        return count;
      }
    };
    (function(ASTUtils2) {
      function siblings(node2) {
        const result = [];
        while (node2) {
          result.push(node2);
          node2 = node2.nextSibling;
        }
        return result;
      }
      ASTUtils2.siblings = siblings;
      function children(node2) {
        return siblings(node2?.firstChild ?? null);
      }
      ASTUtils2.children = children;
      function range2(node2) {
        return [node2[0], node2[node2.length - 1]];
      }
      ASTUtils2.range = range2;
      function declValue(node2) {
        if (node2?.name !== "Declaration") {
          return null;
        }
        return children(node2).find((node3) => node3.name === ":")?.nextSibling ?? null;
      }
      ASTUtils2.declValue = declValue;
      function* stripComments2(nodes) {
        for (const node2 of nodes) {
          if (node2.type.name !== "Comment") {
            yield node2;
          }
        }
      }
      ASTUtils2.stripComments = stripComments2;
      function split(nodes) {
        const result = [];
        let current = [];
        for (const node2 of nodes) {
          if (node2.name === ",") {
            result.push(current);
            current = [];
          } else {
            current.push(node2);
          }
        }
        if (nodes.length > 0) {
          result.push(current);
        }
        return result;
      }
      ASTUtils2.split = split;
      function callArgs(node2) {
        const args2 = children(node2?.getChild("ArgList") ?? null);
        const openParen = args2.splice(0, 1)[0];
        const closingParen = args2.pop();
        if (openParen?.name !== "(" || closingParen?.name !== ")") {
          return [];
        }
        return split(args2);
      }
      ASTUtils2.callArgs = callArgs;
      function equals2(a, b) {
        return a.name === b.name && a.from === b.from && a.to === b.to;
      }
      ASTUtils2.equals = equals2;
    })(ASTUtils || (ASTUtils = {}));
    CSSProperty = class _CSSProperty extends ObjectWrapper {
      ownerStyle;
      index;
      name;
      value;
      important;
      disabled;
      parsedOk;
      implicit;
      text;
      range;
      #active = true;
      #nameRange = null;
      #valueRange = null;
      #invalidString;
      #longhandProperties = [];
      constructor(ownerStyle, index2, name, value, important, disabled, parsedOk, implicit, text, range2, longhandProperties) {
        super();
        this.ownerStyle = ownerStyle;
        this.index = index2;
        this.name = name;
        this.value = value;
        this.important = important;
        this.disabled = disabled;
        this.parsedOk = parsedOk;
        this.implicit = implicit;
        this.text = text;
        this.range = range2 ? TextRange.fromObject(range2) : null;
        if (longhandProperties && longhandProperties.length > 0) {
          for (const property of longhandProperties) {
            this.#longhandProperties.push(new _CSSProperty(ownerStyle, ++index2, property.name, property.value, important, disabled, parsedOk, true));
          }
        } else {
          const longhandNames = cssMetadata().getLonghands(name);
          for (const longhandName of longhandNames || []) {
            this.#longhandProperties.push(new _CSSProperty(ownerStyle, ++index2, longhandName, "", important, disabled, parsedOk, true));
          }
        }
      }
      static parsePayload(ownerStyle, index2, payload) {
        const result = new _CSSProperty(ownerStyle, index2, payload.name, payload.value, payload.important || false, payload.disabled || false, "parsedOk" in payload ? Boolean(payload.parsedOk) : true, Boolean(payload.implicit), payload.text, payload.range, payload.longhandProperties);
        return result;
      }
      parseExpression(expression, matchedStyles, computedStyles) {
        if (!this.parsedOk) {
          return null;
        }
        return matchDeclaration(this.name, expression, this.#matchers(matchedStyles, computedStyles));
      }
      parseValue(matchedStyles, computedStyles) {
        if (!this.parsedOk) {
          return null;
        }
        return matchDeclaration(this.name, this.value, this.#matchers(matchedStyles, computedStyles));
      }
      #matchers(matchedStyles, computedStyles) {
        const matchers = matchedStyles.propertyMatchers(this.ownerStyle, computedStyles);
        matchers.push(new CSSWideKeywordMatcher(this, matchedStyles));
        if (experiments.isEnabled(ExperimentName.FONT_EDITOR)) {
          matchers.push(new FontMatcher());
        }
        return matchers;
      }
      ensureRanges() {
        if (this.#nameRange && this.#valueRange) {
          return;
        }
        const range2 = this.range;
        const text = this.text ? new Text(this.text) : null;
        if (!range2 || !text) {
          return;
        }
        const nameIndex = text.value().indexOf(this.name);
        const valueIndex = text.value().lastIndexOf(this.value);
        if (nameIndex === -1 || valueIndex === -1 || nameIndex > valueIndex) {
          return;
        }
        const nameSourceRange = new SourceRange(nameIndex, this.name.length);
        const valueSourceRange = new SourceRange(valueIndex, this.value.length);
        this.#nameRange = rebase(text.toTextRange(nameSourceRange), range2.startLine, range2.startColumn);
        this.#valueRange = rebase(text.toTextRange(valueSourceRange), range2.startLine, range2.startColumn);
        function rebase(oneLineRange, lineOffset, columnOffset) {
          if (oneLineRange.startLine === 0) {
            oneLineRange.startColumn += columnOffset;
            oneLineRange.endColumn += columnOffset;
          }
          oneLineRange.startLine += lineOffset;
          oneLineRange.endLine += lineOffset;
          return oneLineRange;
        }
      }
      nameRange() {
        this.ensureRanges();
        return this.#nameRange;
      }
      valueRange() {
        this.ensureRanges();
        return this.#valueRange;
      }
      rebase(edit2) {
        if (this.ownerStyle.styleSheetId !== edit2.styleSheetId) {
          return;
        }
        if (this.range) {
          this.range = this.range.rebaseAfterTextEdit(edit2.oldRange, edit2.newRange);
        }
      }
      setActive(active) {
        this.#active = active;
      }
      get propertyText() {
        if (this.text !== void 0) {
          return this.text;
        }
        if (this.name === "") {
          return "";
        }
        return this.name + ": " + this.value + (this.important ? " !important" : "") + ";";
      }
      activeInStyle() {
        return this.#active;
      }
      async setText(propertyText, majorChange, overwrite) {
        if (!this.ownerStyle) {
          throw new Error("No ownerStyle for property");
        }
        if (!this.ownerStyle.styleSheetId) {
          throw new Error("No owner style id");
        }
        if (!this.range || !this.ownerStyle.range) {
          throw new Error("Style not editable");
        }
        if (majorChange) {
          userMetrics.actionTaken(Action.StyleRuleEdited);
          if (this.ownerStyle.parentRule?.isKeyframeRule()) {
            userMetrics.actionTaken(Action.StylePropertyInsideKeyframeEdited);
          }
          if (this.name.startsWith("--")) {
            userMetrics.actionTaken(Action.CustomPropertyEdited);
          }
        }
        if (overwrite && propertyText === this.propertyText) {
          this.ownerStyle.cssModel().domModel().markUndoableState(!majorChange);
          return true;
        }
        const range2 = this.range.relativeTo(this.ownerStyle.range.startLine, this.ownerStyle.range.startColumn);
        const indentation = this.ownerStyle.cssText ? this.detectIndentation(this.ownerStyle.cssText) : Settings.instance().moduleSetting("text-editor-indent").get();
        const endIndentation = this.ownerStyle.cssText ? indentation.substring(0, this.ownerStyle.range.endColumn) : "";
        const text = new Text(this.ownerStyle.cssText || "");
        const newStyleText = text.replaceRange(range2, sprintf(";%s;", propertyText));
        const styleText = await _CSSProperty.formatStyle(newStyleText, indentation, endIndentation);
        return await this.ownerStyle.setText(styleText, majorChange);
      }
      static async formatStyle(styleText, indentation, endIndentation) {
        const doubleIndent = indentation.substring(endIndentation.length) + indentation;
        if (indentation) {
          indentation = "\n" + indentation;
        }
        let result = "";
        let propertyName = "";
        let propertyText = "";
        let insideProperty = false;
        let needsSemi = false;
        const tokenize2 = createCssTokenizer();
        await tokenize2("*{" + styleText + "}", processToken);
        if (insideProperty) {
          result += propertyText;
        }
        result = result.substring(2, result.length - 1).trimEnd();
        return result + (indentation ? "\n" + endIndentation : "");
        function processToken(token, tokenType) {
          if (!insideProperty) {
            const disabledProperty = tokenType?.includes("comment") && isDisabledProperty(token);
            const isPropertyStart = tokenType?.includes("def") || tokenType?.includes("string") || tokenType?.includes("meta") || tokenType?.includes("property") || tokenType?.includes("variableName") && tokenType !== "variableName.function";
            if (disabledProperty) {
              result = result.trimEnd() + indentation + token;
            } else if (isPropertyStart) {
              insideProperty = true;
              propertyText = token;
            } else if (token !== ";" || needsSemi) {
              result += token;
              if (token.trim() && !tokenType?.includes("comment")) {
                needsSemi = token !== ";";
              }
            }
            if (token === "{" && !tokenType) {
              needsSemi = false;
            }
            return;
          }
          if (token === "}" || token === ";") {
            const trimmedPropertyText = propertyText.trim();
            result = result.trimEnd() + indentation + trimmedPropertyText + (trimmedPropertyText.endsWith(":") ? " " : "") + token;
            needsSemi = false;
            insideProperty = false;
            propertyName = "";
            return;
          }
          if (cssMetadata().isGridAreaDefiningProperty(propertyName)) {
            const rowResult = GridAreaRowRegex.exec(token);
            if (rowResult?.index === 0 && !propertyText.trimEnd().endsWith("]")) {
              propertyText = propertyText.trimEnd() + "\n" + doubleIndent;
            }
          }
          if (!propertyName && token === ":") {
            propertyName = propertyText;
          }
          propertyText += token;
        }
        function isDisabledProperty(text) {
          const colon = text.indexOf(":");
          if (colon === -1) {
            return false;
          }
          const propertyName2 = text.substring(2, colon).trim();
          return cssMetadata().isCSSPropertyName(propertyName2);
        }
      }
      detectIndentation(text) {
        const lines = text.split("\n");
        if (lines.length < 2) {
          return "";
        }
        return Utils.lineIndent(lines[1]);
      }
      setValue(newValue, majorChange, overwrite, userCallback) {
        const text = this.name + ": " + newValue + (this.important ? " !important" : "") + ";";
        void this.setText(text, majorChange, overwrite).then(userCallback);
      }
      setLocalValue(value) {
        this.value = value;
        this.dispatchEventToListeners("localValueUpdated");
      }
      async setDisabled(disabled) {
        if (!this.ownerStyle) {
          return false;
        }
        if (disabled === this.disabled) {
          return true;
        }
        if (!this.text) {
          return true;
        }
        const propertyText = this.text.trim();
        const appendSemicolonIfMissing = (propertyText2) => propertyText2 + (propertyText2.endsWith(";") ? "" : ";");
        let text;
        if (disabled) {
          text = "/* " + appendSemicolonIfMissing(stripComments(propertyText)) + " */";
        } else {
          text = appendSemicolonIfMissing(this.text.substring(2, propertyText.length - 2).trim());
        }
        return await this.setText(text, true, true);
      }
      setDisplayedStringForInvalidProperty(invalidString) {
        this.#invalidString = invalidString;
      }
      getInvalidStringForInvalidProperty() {
        return this.#invalidString;
      }
      getLonghandProperties() {
        return this.#longhandProperties;
      }
      ignoreErrors() {
        function hasUnknownVendorPrefix(string2) {
          return !string2.startsWith("-webkit-") && /^[-_][\w\d]+-\w/.test(string2);
        }
        const name = this.name.toLowerCase();
        if (name.charAt(0) === "_") {
          return true;
        }
        if (name === "filter") {
          return true;
        }
        if (name.startsWith("scrollbar-")) {
          return true;
        }
        if (hasUnknownVendorPrefix(name)) {
          return true;
        }
        const value = this.value.toLowerCase();
        if (value.endsWith("\\9")) {
          return true;
        }
        if (hasUnknownVendorPrefix(value)) {
          return true;
        }
        return false;
      }
    };
    CSSQuery = class {
      text = "";
      range;
      styleSheetId;
      cssModel;
      constructor(cssModel) {
        this.cssModel = cssModel;
      }
      rebase(edit2) {
        if (this.styleSheetId !== edit2.styleSheetId || !this.range) {
          return;
        }
        if (edit2.oldRange.equal(this.range)) {
          this.reinitialize(edit2.payload);
        } else {
          this.range = this.range.rebaseAfterTextEdit(edit2.oldRange, edit2.newRange);
        }
      }
      equal(other) {
        if (!this.styleSheetId || !this.range || !other.range) {
          return false;
        }
        return this.styleSheetId === other.styleSheetId && this.range.equal(other.range);
      }
      lineNumberInSource() {
        if (!this.range) {
          return void 0;
        }
        return this.header()?.lineNumberInSource(this.range.startLine);
      }
      columnNumberInSource() {
        if (!this.range) {
          return void 0;
        }
        return this.header()?.columnNumberInSource(this.range.startLine, this.range.startColumn);
      }
      header() {
        return this.styleSheetId ? this.cssModel.styleSheetHeaderForId(this.styleSheetId) : null;
      }
      rawLocation() {
        const header = this.header();
        if (!header || this.lineNumberInSource() === void 0) {
          return null;
        }
        const lineNumber = Number(this.lineNumberInSource());
        return new CSSLocation(header, lineNumber, this.columnNumberInSource());
      }
    };
    CSSContainerQuery = class _CSSContainerQuery extends CSSQuery {
      name;
      physicalAxes;
      logicalAxes;
      queriesScrollState;
      queriesAnchored;
      static parseContainerQueriesPayload(cssModel, payload) {
        return payload.map((cq) => new _CSSContainerQuery(cssModel, cq));
      }
      constructor(cssModel, payload) {
        super(cssModel);
        this.reinitialize(payload);
      }
      reinitialize(payload) {
        this.text = payload.text;
        this.range = payload.range ? TextRange.fromObject(payload.range) : null;
        this.styleSheetId = payload.styleSheetId;
        this.name = payload.name;
        this.physicalAxes = payload.physicalAxes;
        this.logicalAxes = payload.logicalAxes;
        this.queriesScrollState = payload.queriesScrollState;
        this.queriesAnchored = payload.queriesAnchored;
      }
      active() {
        return true;
      }
      async getContainerForNode(nodeId) {
        const containerNode = await this.cssModel.domModel().getContainerForNode(nodeId, this.name, this.physicalAxes, this.logicalAxes, this.queriesScrollState, this.queriesAnchored);
        if (!containerNode) {
          return;
        }
        return new CSSContainerQueryContainer(containerNode);
      }
    };
    CSSContainerQueryContainer = class {
      containerNode;
      constructor(containerNode) {
        this.containerNode = containerNode;
      }
      async getContainerSizeDetails() {
        const styles2 = await this.containerNode.domModel().cssModel().getComputedStyle(this.containerNode.id);
        if (!styles2) {
          return;
        }
        const containerType = styles2.get("container-type");
        const writingMode = styles2.get("writing-mode");
        if (!containerType || !writingMode) {
          return;
        }
        const queryAxis = getQueryAxisFromContainerType(`${containerType}`);
        const physicalAxis = getPhysicalAxisFromQueryAxis(queryAxis, writingMode);
        let width, height;
        if (physicalAxis === "Both" || physicalAxis === "Horizontal") {
          width = styles2.get("width");
        }
        if (physicalAxis === "Both" || physicalAxis === "Vertical") {
          height = styles2.get("height");
        }
        return {
          queryAxis,
          physicalAxis,
          width,
          height
        };
      }
    };
    getQueryAxisFromContainerType = (propertyValue) => {
      const segments = propertyValue.split(" ");
      let isInline = false;
      for (const segment of segments) {
        if (segment === "size") {
          return "size";
        }
        isInline = isInline || segment === "inline-size";
      }
      if (isInline) {
        return "inline-size";
      }
      return "";
    };
    getPhysicalAxisFromQueryAxis = (queryAxis, writingMode) => {
      const isVerticalWritingMode = writingMode.startsWith("vertical");
      switch (queryAxis) {
        case "":
          return "";
        case "size":
          return "Both";
        case "inline-size":
          return isVerticalWritingMode ? "Vertical" : "Horizontal";
        case "block-size":
          return isVerticalWritingMode ? "Horizontal" : "Vertical";
      }
    };
    CSSLayer = class _CSSLayer extends CSSQuery {
      static parseLayerPayload(cssModel, payload) {
        return payload.map((supports) => new _CSSLayer(cssModel, supports));
      }
      constructor(cssModel, payload) {
        super(cssModel);
        this.reinitialize(payload);
      }
      reinitialize(payload) {
        this.text = payload.text;
        this.range = payload.range ? TextRange.fromObject(payload.range) : null;
        this.styleSheetId = payload.styleSheetId;
      }
      active() {
        return true;
      }
    };
    CSSMediaQuery = class _CSSMediaQuery {
      #active;
      #expressions;
      constructor(payload) {
        this.#active = payload.active;
        this.#expressions = [];
        for (let j = 0; j < payload.expressions.length; ++j) {
          this.#expressions.push(CSSMediaQueryExpression.parsePayload(payload.expressions[j]));
        }
      }
      static parsePayload(payload) {
        return new _CSSMediaQuery(payload);
      }
      active() {
        return this.#active;
      }
      expressions() {
        return this.#expressions;
      }
    };
    CSSMediaQueryExpression = class _CSSMediaQueryExpression {
      #value;
      #unit;
      #feature;
      #valueRange;
      #computedLength;
      constructor(payload) {
        this.#value = payload.value;
        this.#unit = payload.unit;
        this.#feature = payload.feature;
        this.#valueRange = payload.valueRange ? TextRange.fromObject(payload.valueRange) : null;
        this.#computedLength = payload.computedLength || null;
      }
      static parsePayload(payload) {
        return new _CSSMediaQueryExpression(payload);
      }
      value() {
        return this.#value;
      }
      unit() {
        return this.#unit;
      }
      feature() {
        return this.#feature;
      }
      valueRange() {
        return this.#valueRange;
      }
      computedLength() {
        return this.#computedLength;
      }
    };
    CSSMedia = class _CSSMedia extends CSSQuery {
      source;
      sourceURL;
      mediaList;
      static parseMediaArrayPayload(cssModel, payload) {
        return payload.map((mq) => new _CSSMedia(cssModel, mq));
      }
      constructor(cssModel, payload) {
        super(cssModel);
        this.reinitialize(payload);
      }
      reinitialize(payload) {
        this.text = payload.text;
        this.source = payload.source;
        this.sourceURL = payload.sourceURL || "";
        this.range = payload.range ? TextRange.fromObject(payload.range) : null;
        this.styleSheetId = payload.styleSheetId;
        this.mediaList = null;
        if (payload.mediaList) {
          this.mediaList = [];
          for (let i = 0; i < payload.mediaList.length; ++i) {
            this.mediaList.push(CSSMediaQuery.parsePayload(payload.mediaList[i]));
          }
        }
      }
      active() {
        if (!this.mediaList) {
          return true;
        }
        for (let i = 0; i < this.mediaList.length; ++i) {
          if (this.mediaList[i].active()) {
            return true;
          }
        }
        return false;
      }
    };
    CSSScope = class _CSSScope extends CSSQuery {
      static parseScopesPayload(cssModel, payload) {
        return payload.map((scope2) => new _CSSScope(cssModel, scope2));
      }
      constructor(cssModel, payload) {
        super(cssModel);
        this.reinitialize(payload);
      }
      reinitialize(payload) {
        this.text = payload.text;
        this.range = payload.range ? TextRange.fromObject(payload.range) : null;
        this.styleSheetId = payload.styleSheetId;
      }
      active() {
        return true;
      }
    };
    CSSStartingStyle = class _CSSStartingStyle extends CSSQuery {
      static parseStartingStylePayload(cssModel, payload) {
        return payload.map((p) => new _CSSStartingStyle(cssModel, p));
      }
      constructor(cssModel, payload) {
        super(cssModel);
        this.reinitialize(payload);
      }
      reinitialize(payload) {
        this.range = payload.range ? TextRange.fromObject(payload.range) : null;
        this.styleSheetId = payload.styleSheetId;
      }
      active() {
        return true;
      }
    };
    CSSStyleDeclaration = class {
      #cssModel;
      parentRule;
      #allProperties = [];
      styleSheetId;
      range = null;
      cssText;
      #shorthandValues = /* @__PURE__ */ new Map();
      #shorthandIsImportant = /* @__PURE__ */ new Set();
      #activePropertyMap = /* @__PURE__ */ new Map();
      #leadingProperties = null;
      type;
      #animationName;
      constructor(cssModel, parentRule, payload, type2, animationName) {
        this.#cssModel = cssModel;
        this.parentRule = parentRule;
        this.#reinitialize(payload);
        this.type = type2;
        this.#animationName = animationName;
      }
      rebase(edit2) {
        if (this.styleSheetId !== edit2.styleSheetId || !this.range) {
          return;
        }
        if (edit2.oldRange.equal(this.range)) {
          this.#reinitialize(edit2.payload);
        } else {
          this.range = this.range.rebaseAfterTextEdit(edit2.oldRange, edit2.newRange);
          for (let i = 0; i < this.#allProperties.length; ++i) {
            this.#allProperties[i].rebase(edit2);
          }
        }
      }
      animationName() {
        return this.#animationName;
      }
      #reinitialize(payload) {
        this.styleSheetId = payload.styleSheetId;
        this.range = payload.range ? TextRange.fromObject(payload.range) : null;
        const shorthandEntries = payload.shorthandEntries;
        this.#shorthandValues = /* @__PURE__ */ new Map();
        this.#shorthandIsImportant = /* @__PURE__ */ new Set();
        for (let i = 0; i < shorthandEntries.length; ++i) {
          this.#shorthandValues.set(shorthandEntries[i].name, shorthandEntries[i].value);
          if (shorthandEntries[i].important) {
            this.#shorthandIsImportant.add(shorthandEntries[i].name);
          }
        }
        this.#allProperties = [];
        if (payload.cssText && this.range) {
          const longhands = [];
          for (const cssProperty of payload.cssProperties) {
            const range2 = cssProperty.range;
            if (!range2) {
              continue;
            }
            const parsedProperty = CSSProperty.parsePayload(this, this.#allProperties.length, cssProperty);
            this.#allProperties.push(parsedProperty);
            for (const longhand of parsedProperty.getLonghandProperties()) {
              longhands.push(longhand);
            }
          }
          for (const longhand of longhands) {
            longhand.index = this.#allProperties.length;
            this.#allProperties.push(longhand);
          }
        } else {
          for (const cssProperty of payload.cssProperties) {
            this.#allProperties.push(CSSProperty.parsePayload(this, this.#allProperties.length, cssProperty));
          }
        }
        this.#generateSyntheticPropertiesIfNeeded();
        this.#computeInactiveProperties();
        this.#activePropertyMap = /* @__PURE__ */ new Map();
        for (const property of this.#allProperties) {
          if (!property.activeInStyle()) {
            continue;
          }
          this.#activePropertyMap.set(property.name, property);
        }
        this.cssText = payload.cssText;
        this.#leadingProperties = null;
      }
      #generateSyntheticPropertiesIfNeeded() {
        if (this.range) {
          return;
        }
        if (!this.#shorthandValues.size) {
          return;
        }
        const propertiesSet = /* @__PURE__ */ new Set();
        for (const property of this.#allProperties) {
          propertiesSet.add(property.name);
        }
        const generatedProperties2 = [];
        for (const property of this.#allProperties) {
          const shorthands = cssMetadata().getShorthands(property.name) || [];
          for (const shorthand of shorthands) {
            if (propertiesSet.has(shorthand)) {
              continue;
            }
            const shorthandValue = this.#shorthandValues.get(shorthand);
            if (!shorthandValue) {
              continue;
            }
            const shorthandImportance = Boolean(this.#shorthandIsImportant.has(shorthand));
            const shorthandProperty = new CSSProperty(this, this.allProperties().length, shorthand, shorthandValue, shorthandImportance, false, true, false);
            generatedProperties2.push(shorthandProperty);
            propertiesSet.add(shorthand);
          }
        }
        this.#allProperties = this.#allProperties.concat(generatedProperties2);
      }
      #computeLeadingProperties() {
        function propertyHasRange(property) {
          return Boolean(property.range);
        }
        if (this.range) {
          return this.#allProperties.filter(propertyHasRange);
        }
        const leadingProperties = [];
        for (const property of this.#allProperties) {
          const shorthands = cssMetadata().getShorthands(property.name) || [];
          let belongToAnyShorthand = false;
          for (const shorthand of shorthands) {
            if (this.#shorthandValues.get(shorthand)) {
              belongToAnyShorthand = true;
              break;
            }
          }
          if (!belongToAnyShorthand) {
            leadingProperties.push(property);
          }
        }
        return leadingProperties;
      }
      leadingProperties() {
        if (!this.#leadingProperties) {
          this.#leadingProperties = this.#computeLeadingProperties();
        }
        return this.#leadingProperties;
      }
      target() {
        return this.#cssModel.target();
      }
      cssModel() {
        return this.#cssModel;
      }
      #computeInactiveProperties() {
        const activeProperties = /* @__PURE__ */ new Map();
        const processedLonghands = /* @__PURE__ */ new Set();
        for (const property of this.#allProperties) {
          const metadata2 = cssMetadata();
          const canonicalName = metadata2.canonicalPropertyName(property.name);
          if (property.disabled || !property.parsedOk) {
            if (!property.disabled && metadata2.isCustomProperty(property.name)) {
              activeProperties.get(canonicalName)?.setActive(false);
              activeProperties.delete(canonicalName);
            }
            property.setActive(false);
            continue;
          }
          if (processedLonghands.has(property)) {
            continue;
          }
          for (const longhand of property.getLonghandProperties()) {
            const activeLonghand = activeProperties.get(longhand.name);
            if (!activeLonghand) {
              activeProperties.set(longhand.name, longhand);
            } else if (!activeLonghand.important || longhand.important) {
              activeLonghand.setActive(false);
              activeProperties.set(longhand.name, longhand);
            } else {
              longhand.setActive(false);
            }
            processedLonghands.add(longhand);
          }
          const activeProperty = activeProperties.get(canonicalName);
          if (!activeProperty) {
            activeProperties.set(canonicalName, property);
          } else if (!activeProperty.important || property.important) {
            activeProperty.setActive(false);
            activeProperties.set(canonicalName, property);
          } else {
            property.setActive(false);
          }
        }
      }
      allProperties() {
        return this.#allProperties;
      }
      hasActiveProperty(name) {
        return this.#activePropertyMap.has(name);
      }
      getPropertyValue(name) {
        const property = this.#activePropertyMap.get(name);
        return property ? property.value : "";
      }
      isPropertyImplicit(name) {
        const property = this.#activePropertyMap.get(name);
        return property ? property.implicit : false;
      }
      propertyAt(index2) {
        return index2 < this.allProperties().length ? this.allProperties()[index2] : null;
      }
      pastLastSourcePropertyIndex() {
        for (let i = this.allProperties().length - 1; i >= 0; --i) {
          if (this.allProperties()[i].range) {
            return i + 1;
          }
        }
        return 0;
      }
      #insertionRange(index2) {
        const property = this.propertyAt(index2);
        if (property?.range) {
          return property.range.collapseToStart();
        }
        if (!this.range) {
          throw new Error("CSSStyleDeclaration.range is null");
        }
        return this.range.collapseToEnd();
      }
      newBlankProperty(index2) {
        index2 = typeof index2 === "undefined" ? this.pastLastSourcePropertyIndex() : index2;
        const property = new CSSProperty(this, index2, "", "", false, false, true, false, "", this.#insertionRange(index2));
        return property;
      }
      setText(text, majorChange) {
        if (!this.range || !this.styleSheetId) {
          return Promise.resolve(false);
        }
        return this.#cssModel.setStyleText(this.styleSheetId, this.range, text, majorChange);
      }
      insertPropertyAt(index2, name, value, userCallback) {
        void this.newBlankProperty(index2).setText(name + ": " + value + ";", false, true).then(userCallback);
      }
      appendProperty(name, value, userCallback) {
        this.insertPropertyAt(this.allProperties().length, name, value, userCallback);
      }
    };
    (function(Type2) {
      Type2["Regular"] = "Regular";
      Type2["Inline"] = "Inline";
      Type2["Attributes"] = "Attributes";
      Type2["Pseudo"] = "Pseudo";
      Type2["Transition"] = "Transition";
      Type2["Animation"] = "Animation";
    })(Type$3 || (Type$3 = {}));
    CSSSupports = class _CSSSupports extends CSSQuery {
      static parseSupportsPayload(cssModel, payload) {
        return payload.map((supports) => new _CSSSupports(cssModel, supports));
      }
      #active = true;
      constructor(cssModel, payload) {
        super(cssModel);
        this.reinitialize(payload);
      }
      reinitialize(payload) {
        this.text = payload.text;
        this.range = payload.range ? TextRange.fromObject(payload.range) : null;
        this.styleSheetId = payload.styleSheetId;
        this.#active = payload.active;
      }
      active() {
        return this.#active;
      }
    };
    CSSRule = class {
      cssModelInternal;
      origin;
      style;
      header;
      treeScope;
      constructor(cssModel, payload) {
        this.header = payload.header;
        this.cssModelInternal = cssModel;
        this.origin = payload.origin;
        this.treeScope = payload.originTreeScopeNodeId;
        this.style = new CSSStyleDeclaration(this.cssModelInternal, this, payload.style, Type$3.Regular);
      }
      get sourceURL() {
        return this.header?.sourceURL;
      }
      rebase(edit2) {
        if (this.header?.id !== edit2.styleSheetId) {
          return;
        }
        this.style.rebase(edit2);
      }
      resourceURL() {
        return this.header?.resourceURL() ?? EmptyUrlString;
      }
      isUserAgent() {
        return this.origin === "user-agent";
      }
      isInjected() {
        return this.origin === "injected";
      }
      isViaInspector() {
        return this.origin === "inspector";
      }
      isRegular() {
        return this.origin === "regular";
      }
      isKeyframeRule() {
        return false;
      }
      cssModel() {
        return this.cssModelInternal;
      }
    };
    CSSValue = class {
      text;
      range;
      specificity;
      constructor(payload) {
        this.text = payload.text;
        if (payload.range) {
          this.range = TextRange.fromObject(payload.range);
        }
        if (payload.specificity) {
          this.specificity = payload.specificity;
        }
      }
      rebase(edit2) {
        if (!this.range) {
          return;
        }
        this.range = this.range.rebaseAfterTextEdit(edit2.oldRange, edit2.newRange);
      }
    };
    CSSStyleRule = class _CSSStyleRule extends CSSRule {
      selectors;
      nestingSelectors;
      media;
      containerQueries;
      supports;
      scopes;
      layers;
      ruleTypes;
      startingStyles;
      wasUsed;
      constructor(cssModel, payload, wasUsed) {
        super(cssModel, {
          origin: payload.origin,
          style: payload.style,
          header: styleSheetHeaderForRule(cssModel, payload),
          originTreeScopeNodeId: payload.originTreeScopeNodeId
        });
        this.reinitializeSelectors(payload.selectorList);
        this.nestingSelectors = payload.nestingSelectors;
        this.media = payload.media ? CSSMedia.parseMediaArrayPayload(cssModel, payload.media) : [];
        this.containerQueries = payload.containerQueries ? CSSContainerQuery.parseContainerQueriesPayload(cssModel, payload.containerQueries) : [];
        this.scopes = payload.scopes ? CSSScope.parseScopesPayload(cssModel, payload.scopes) : [];
        this.supports = payload.supports ? CSSSupports.parseSupportsPayload(cssModel, payload.supports) : [];
        this.layers = payload.layers ? CSSLayer.parseLayerPayload(cssModel, payload.layers) : [];
        this.startingStyles = payload.startingStyles ? CSSStartingStyle.parseStartingStylePayload(cssModel, payload.startingStyles) : [];
        this.ruleTypes = payload.ruleTypes || [];
        this.wasUsed = wasUsed || false;
      }
      static createDummyRule(cssModel, selectorText) {
        const dummyPayload = {
          selectorList: {
            text: "",
            selectors: [{ text: selectorText }]
          },
          style: {
            styleSheetId: "0",
            range: new TextRange(0, 0, 0, 0),
            shorthandEntries: [],
            cssProperties: []
          },
          origin: "inspector"
        };
        return new _CSSStyleRule(cssModel, dummyPayload);
      }
      reinitializeSelectors(selectorList) {
        this.selectors = [];
        for (let i = 0; i < selectorList.selectors.length; ++i) {
          this.selectors.push(new CSSValue(selectorList.selectors[i]));
        }
      }
      setSelectorText(newSelector) {
        const styleSheetId = this.header?.id;
        if (!styleSheetId) {
          throw new Error("No rule stylesheet id");
        }
        const range2 = this.selectorRange();
        if (!range2) {
          throw new Error("Rule selector is not editable");
        }
        return this.cssModelInternal.setSelectorText(styleSheetId, range2, newSelector);
      }
      selectorText() {
        return this.selectors.map((selector) => selector.text).join(", ");
      }
      selectorRange() {
        if (this.selectors.length === 0) {
          return null;
        }
        const firstRange = this.selectors[0].range;
        const lastRange = this.selectors[this.selectors.length - 1].range;
        if (!firstRange || !lastRange) {
          return null;
        }
        return new TextRange(firstRange.startLine, firstRange.startColumn, lastRange.endLine, lastRange.endColumn);
      }
      lineNumberInSource(selectorIndex) {
        const selector = this.selectors[selectorIndex];
        if (!selector?.range || !this.header) {
          return 0;
        }
        return this.header.lineNumberInSource(selector.range.startLine);
      }
      columnNumberInSource(selectorIndex) {
        const selector = this.selectors[selectorIndex];
        if (!selector?.range || !this.header) {
          return void 0;
        }
        return this.header.columnNumberInSource(selector.range.startLine, selector.range.startColumn);
      }
      rebase(edit2) {
        if (this.header?.id !== edit2.styleSheetId) {
          return;
        }
        const range2 = this.selectorRange();
        if (range2?.equal(edit2.oldRange)) {
          this.reinitializeSelectors(edit2.payload);
        } else {
          for (let i = 0; i < this.selectors.length; ++i) {
            this.selectors[i].rebase(edit2);
          }
        }
        this.media.forEach((media) => media.rebase(edit2));
        this.containerQueries.forEach((cq) => cq.rebase(edit2));
        this.scopes.forEach((scope2) => scope2.rebase(edit2));
        this.supports.forEach((supports) => supports.rebase(edit2));
        super.rebase(edit2);
      }
    };
    CSSPropertyRule = class extends CSSRule {
      #name;
      constructor(cssModel, payload) {
        super(cssModel, {
          origin: payload.origin,
          style: payload.style,
          header: styleSheetHeaderForRule(cssModel, payload)
        });
        this.#name = new CSSValue(payload.propertyName);
      }
      propertyName() {
        return this.#name;
      }
      initialValue() {
        return this.style.hasActiveProperty("initial-value") ? this.style.getPropertyValue("initial-value") : null;
      }
      syntax() {
        return this.style.getPropertyValue("syntax");
      }
      inherits() {
        return this.style.getPropertyValue("inherits") === "true";
      }
      setPropertyName(newPropertyName) {
        const styleSheetId = this.header?.id;
        if (!styleSheetId) {
          throw new Error("No rule stylesheet id");
        }
        const range2 = this.#name.range;
        if (!range2) {
          throw new Error("Property name is not editable");
        }
        return this.cssModelInternal.setPropertyRulePropertyName(styleSheetId, range2, newPropertyName);
      }
    };
    CSSAtRule = class extends CSSRule {
      #name;
      #type;
      #subsection;
      constructor(cssModel, payload) {
        super(cssModel, {
          origin: payload.origin,
          style: payload.style,
          header: styleSheetHeaderForRule(cssModel, payload)
        });
        this.#name = payload.name ? new CSSValue(payload.name) : null;
        this.#type = payload.type;
        this.#subsection = payload.subsection ?? null;
      }
      name() {
        return this.#name;
      }
      type() {
        return this.#type;
      }
      subsection() {
        return this.#subsection;
      }
    };
    CSSKeyframesRule = class {
      #animationName;
      #keyframes;
      constructor(cssModel, payload) {
        this.#animationName = new CSSValue(payload.animationName);
        this.#keyframes = payload.keyframes.map((keyframeRule) => new CSSKeyframeRule(cssModel, keyframeRule, this.#animationName.text));
      }
      name() {
        return this.#animationName;
      }
      keyframes() {
        return this.#keyframes;
      }
    };
    CSSKeyframeRule = class extends CSSRule {
      #keyText;
      #parentRuleName;
      constructor(cssModel, payload, parentRuleName) {
        super(cssModel, {
          origin: payload.origin,
          style: payload.style,
          header: styleSheetHeaderForRule(cssModel, payload)
        });
        this.reinitializeKey(payload.keyText);
        this.#parentRuleName = parentRuleName;
      }
      parentRuleName() {
        return this.#parentRuleName;
      }
      key() {
        return this.#keyText;
      }
      reinitializeKey(payload) {
        this.#keyText = new CSSValue(payload);
      }
      rebase(edit2) {
        if (this.header?.id !== edit2.styleSheetId || !this.#keyText.range) {
          return;
        }
        if (edit2.oldRange.equal(this.#keyText.range)) {
          this.reinitializeKey(edit2.payload);
        } else {
          this.#keyText.rebase(edit2);
        }
        super.rebase(edit2);
      }
      isKeyframeRule() {
        return true;
      }
      setKeyText(newKeyText) {
        const styleSheetId = this.header?.id;
        if (!styleSheetId) {
          throw new Error("No rule stylesheet id");
        }
        const range2 = this.#keyText.range;
        if (!range2) {
          throw new Error("Keyframe key is not editable");
        }
        return this.cssModelInternal.setKeyframeKey(styleSheetId, range2, newKeyText);
      }
    };
    CSSPositionTryRule = class extends CSSRule {
      #name;
      #active;
      constructor(cssModel, payload) {
        super(cssModel, {
          origin: payload.origin,
          style: payload.style,
          header: styleSheetHeaderForRule(cssModel, payload)
        });
        this.#name = new CSSValue(payload.name);
        this.#active = payload.active;
      }
      name() {
        return this.#name;
      }
      active() {
        return this.#active;
      }
    };
    CSSFunctionRule = class extends CSSRule {
      #name;
      #parameters;
      #children;
      constructor(cssModel, payload) {
        super(cssModel, {
          origin: payload.origin,
          style: { cssProperties: [], shorthandEntries: [] },
          header: styleSheetHeaderForRule(cssModel, payload)
        });
        this.#name = new CSSValue(payload.name);
        this.#parameters = payload.parameters.map(({ name }) => name);
        this.#children = this.protocolNodesToNestedStyles(payload.children);
      }
      functionName() {
        return this.#name;
      }
      parameters() {
        return this.#parameters;
      }
      children() {
        return this.#children;
      }
      nameWithParameters() {
        return `${this.functionName().text}(${this.parameters().join(", ")})`;
      }
      protocolNodesToNestedStyles(nodes) {
        const result = [];
        for (const node2 of nodes) {
          const nestedStyle = this.protocolNodeToNestedStyle(node2);
          if (nestedStyle) {
            result.push(nestedStyle);
          }
        }
        return result;
      }
      protocolNodeToNestedStyle(node2) {
        if (node2.style) {
          return { style: new CSSStyleDeclaration(this.cssModelInternal, this, node2.style, Type$3.Regular) };
        }
        if (node2.condition) {
          const children = this.protocolNodesToNestedStyles(node2.condition.children);
          if (node2.condition.media) {
            return { children, media: new CSSMedia(this.cssModelInternal, node2.condition.media) };
          }
          if (node2.condition.containerQueries) {
            return {
              children,
              container: new CSSContainerQuery(this.cssModelInternal, node2.condition.containerQueries)
            };
          }
          if (node2.condition.supports) {
            return {
              children,
              supports: new CSSSupports(this.cssModelInternal, node2.condition.supports)
            };
          }
          console.error("A function rule condition must have a media, container, or supports");
          return;
        }
        console.error("A function rule node must have a style or condition");
        return;
      }
    };
    CSSRegisteredProperty = class {
      #registration;
      #cssModel;
      #style;
      constructor(cssModel, registration) {
        this.#cssModel = cssModel;
        this.#registration = registration;
      }
      propertyName() {
        return this.#registration instanceof CSSPropertyRule ? this.#registration.propertyName().text : this.#registration.propertyName;
      }
      initialValue() {
        return this.#registration instanceof CSSPropertyRule ? this.#registration.initialValue() : this.#registration.initialValue?.text ?? null;
      }
      inherits() {
        return this.#registration instanceof CSSPropertyRule ? this.#registration.inherits() : this.#registration.inherits;
      }
      syntax() {
        return this.#registration instanceof CSSPropertyRule ? this.#registration.syntax() : `"${this.#registration.syntax}"`;
      }
      parseValue(matchedStyles, computedStyles) {
        const value = this.initialValue();
        if (!value) {
          return null;
        }
        return matchDeclaration(this.propertyName(), value, matchedStyles.propertyMatchers(this.style(), computedStyles));
      }
      #asCSSProperties() {
        if (this.#registration instanceof CSSPropertyRule) {
          return [];
        }
        const { inherits, initialValue, syntax } = this.#registration;
        const properties2 = [
          { name: "inherits", value: `${inherits}` },
          { name: "syntax", value: `"${syntax}"` }
        ];
        if (initialValue !== void 0) {
          properties2.push({ name: "initial-value", value: initialValue.text });
        }
        return properties2;
      }
      style() {
        if (!this.#style) {
          this.#style = this.#registration instanceof CSSPropertyRule ? this.#registration.style : new CSSStyleDeclaration(this.#cssModel, null, { cssProperties: this.#asCSSProperties(), shorthandEntries: [] }, Type$3.Pseudo);
        }
        return this.#style;
      }
    };
    CSSMatchedStyles = class _CSSMatchedStyles {
      #cssModel;
      #node;
      #addedStyles = /* @__PURE__ */ new Map();
      #matchingSelectors = /* @__PURE__ */ new Map();
      #keyframes = [];
      #registeredProperties;
      #registeredPropertyMap = /* @__PURE__ */ new Map();
      #nodeForStyle = /* @__PURE__ */ new Map();
      #inheritedStyles = /* @__PURE__ */ new Set();
      #styleToDOMCascade = /* @__PURE__ */ new Map();
      #parentLayoutNodeId;
      #positionTryRules;
      #activePositionFallbackIndex;
      #mainDOMCascade;
      #pseudoDOMCascades;
      #customHighlightPseudoDOMCascades;
      #functionRules;
      #atRules;
      #functionRuleMap = /* @__PURE__ */ new Map();
      #environmentVariables = {};
      static async create(payload) {
        const cssMatchedStyles = new _CSSMatchedStyles(payload);
        await cssMatchedStyles.init(payload);
        return cssMatchedStyles;
      }
      constructor({ cssModel, node: node2, animationsPayload, parentLayoutNodeId, positionTryRules, propertyRules, cssPropertyRegistrations, activePositionFallbackIndex, functionRules, atRules }) {
        this.#cssModel = cssModel;
        this.#node = node2;
        this.#registeredProperties = [
          ...propertyRules.map((rule) => new CSSPropertyRule(cssModel, rule)),
          ...cssPropertyRegistrations
        ].map((r) => new CSSRegisteredProperty(cssModel, r));
        if (animationsPayload) {
          this.#keyframes = animationsPayload.map((rule) => new CSSKeyframesRule(cssModel, rule));
        }
        this.#positionTryRules = positionTryRules.map((rule) => new CSSPositionTryRule(cssModel, rule));
        this.#parentLayoutNodeId = parentLayoutNodeId;
        this.#activePositionFallbackIndex = activePositionFallbackIndex;
        this.#functionRules = functionRules.map((rule) => new CSSFunctionRule(cssModel, rule));
        this.#atRules = atRules.map((rule) => new CSSAtRule(cssModel, rule));
      }
      async init({ matchedPayload, inheritedPayload, inlinePayload, attributesPayload, pseudoPayload, inheritedPseudoPayload, animationStylesPayload, transitionsStylePayload, inheritedAnimatedPayload }) {
        matchedPayload = cleanUserAgentPayload(matchedPayload);
        for (const inheritedResult of inheritedPayload) {
          inheritedResult.matchedCSSRules = cleanUserAgentPayload(inheritedResult.matchedCSSRules);
        }
        this.#environmentVariables = await this.cssModel().getEnvironmentVariables();
        this.#mainDOMCascade = await this.buildMainCascade(inlinePayload, attributesPayload, matchedPayload, inheritedPayload, animationStylesPayload, transitionsStylePayload, inheritedAnimatedPayload);
        [this.#pseudoDOMCascades, this.#customHighlightPseudoDOMCascades] = this.buildPseudoCascades(pseudoPayload, inheritedPseudoPayload);
        for (const domCascade of Array.from(this.#customHighlightPseudoDOMCascades.values()).concat(Array.from(this.#pseudoDOMCascades.values())).concat(this.#mainDOMCascade)) {
          for (const style of domCascade.styles()) {
            this.#styleToDOMCascade.set(style, domCascade);
          }
        }
        for (const prop of this.#registeredProperties) {
          this.#registeredPropertyMap.set(prop.propertyName(), prop);
        }
        for (const rule of this.#functionRules) {
          this.#functionRuleMap.set(rule.functionName().text, rule);
        }
      }
      async buildMainCascade(inlinePayload, attributesPayload, matchedPayload, inheritedPayload, animationStylesPayload, transitionsStylePayload, inheritedAnimatedPayload) {
        const nodeCascades = [];
        const nodeStyles = [];
        function addAttributesStyle() {
          if (!attributesPayload) {
            return;
          }
          const style = new CSSStyleDeclaration(this.#cssModel, null, attributesPayload, Type$3.Attributes);
          this.#nodeForStyle.set(style, this.#node);
          nodeStyles.push(style);
        }
        if (transitionsStylePayload) {
          const style = new CSSStyleDeclaration(this.#cssModel, null, transitionsStylePayload, Type$3.Transition);
          this.#nodeForStyle.set(style, this.#node);
          nodeStyles.push(style);
        }
        for (const animationsStyle of animationStylesPayload) {
          const style = new CSSStyleDeclaration(this.#cssModel, null, animationsStyle.style, Type$3.Animation, animationsStyle.name);
          this.#nodeForStyle.set(style, this.#node);
          nodeStyles.push(style);
        }
        if (inlinePayload && this.#node.nodeType() === Node.ELEMENT_NODE) {
          const style = new CSSStyleDeclaration(this.#cssModel, null, inlinePayload, Type$3.Inline);
          this.#nodeForStyle.set(style, this.#node);
          nodeStyles.push(style);
        }
        let addedAttributesStyle;
        for (let i = matchedPayload.length - 1; i >= 0; --i) {
          const rule = new CSSStyleRule(this.#cssModel, matchedPayload[i].rule);
          if ((rule.isInjected() || rule.isUserAgent()) && !addedAttributesStyle) {
            addedAttributesStyle = true;
            addAttributesStyle.call(this);
          }
          this.#nodeForStyle.set(rule.style, this.#node);
          nodeStyles.push(rule.style);
          this.addMatchingSelectors(this.#node, rule, matchedPayload[i].matchingSelectors);
        }
        if (!addedAttributesStyle) {
          addAttributesStyle.call(this);
        }
        nodeCascades.push(new NodeCascade(this, nodeStyles, this.#node, false));
        let parentNode = this.#node.parentNode;
        const traverseParentInFlatTree = async (node2) => {
          if (node2.hasAssignedSlot()) {
            return await node2.assignedSlot?.deferredNode.resolvePromise() ?? null;
          }
          return node2.parentNode;
        };
        for (let i = 0; parentNode && inheritedPayload && i < inheritedPayload.length; ++i) {
          const inheritedStyles = [];
          const entryPayload = inheritedPayload[i];
          const inheritedAnimatedEntryPayload = inheritedAnimatedPayload[i];
          const inheritedInlineStyle = entryPayload.inlineStyle ? new CSSStyleDeclaration(this.#cssModel, null, entryPayload.inlineStyle, Type$3.Inline) : null;
          const inheritedTransitionsStyle = inheritedAnimatedEntryPayload?.transitionsStyle ? new CSSStyleDeclaration(this.#cssModel, null, inheritedAnimatedEntryPayload?.transitionsStyle, Type$3.Transition) : null;
          const inheritedAnimationStyles = inheritedAnimatedEntryPayload?.animationStyles?.map((animationStyle) => new CSSStyleDeclaration(this.#cssModel, null, animationStyle.style, Type$3.Animation, animationStyle.name)) ?? [];
          if (inheritedTransitionsStyle && containsInherited(inheritedTransitionsStyle)) {
            this.#nodeForStyle.set(inheritedTransitionsStyle, parentNode);
            inheritedStyles.push(inheritedTransitionsStyle);
            this.#inheritedStyles.add(inheritedTransitionsStyle);
          }
          for (const inheritedAnimationsStyle of inheritedAnimationStyles) {
            if (!containsInherited(inheritedAnimationsStyle)) {
              continue;
            }
            this.#nodeForStyle.set(inheritedAnimationsStyle, parentNode);
            inheritedStyles.push(inheritedAnimationsStyle);
            this.#inheritedStyles.add(inheritedAnimationsStyle);
          }
          if (inheritedInlineStyle && containsInherited(inheritedInlineStyle)) {
            this.#nodeForStyle.set(inheritedInlineStyle, parentNode);
            inheritedStyles.push(inheritedInlineStyle);
            this.#inheritedStyles.add(inheritedInlineStyle);
          }
          const inheritedMatchedCSSRules = entryPayload.matchedCSSRules || [];
          for (let j = inheritedMatchedCSSRules.length - 1; j >= 0; --j) {
            const inheritedRule = new CSSStyleRule(this.#cssModel, inheritedMatchedCSSRules[j].rule);
            this.addMatchingSelectors(parentNode, inheritedRule, inheritedMatchedCSSRules[j].matchingSelectors);
            if (!containsInherited(inheritedRule.style)) {
              continue;
            }
            if (!containsCustomProperties(inheritedRule.style)) {
              if (containsStyle(nodeStyles, inheritedRule.style) || containsStyle(this.#inheritedStyles, inheritedRule.style)) {
                continue;
              }
            }
            this.#nodeForStyle.set(inheritedRule.style, parentNode);
            inheritedStyles.push(inheritedRule.style);
            this.#inheritedStyles.add(inheritedRule.style);
          }
          const node2 = parentNode;
          parentNode = await traverseParentInFlatTree(parentNode);
          nodeCascades.push(new NodeCascade(this, inheritedStyles, node2, true));
        }
        return new DOMInheritanceCascade(this, nodeCascades, this.#registeredProperties);
      }
      buildSplitCustomHighlightCascades(rules2, node2, isInherited, pseudoCascades) {
        const splitHighlightRules = /* @__PURE__ */ new Map();
        for (let j = rules2.length - 1; j >= 0; --j) {
          const highlightNamesToMatchingSelectorIndices = customHighlightNamesToMatchingSelectorIndices(rules2[j]);
          for (const [highlightName, matchingSelectors] of highlightNamesToMatchingSelectorIndices) {
            const pseudoRule = new CSSStyleRule(this.#cssModel, rules2[j].rule);
            this.#nodeForStyle.set(pseudoRule.style, node2);
            if (isInherited) {
              this.#inheritedStyles.add(pseudoRule.style);
            }
            this.addMatchingSelectors(node2, pseudoRule, matchingSelectors);
            const ruleListForHighlightName = splitHighlightRules.get(highlightName);
            if (ruleListForHighlightName) {
              ruleListForHighlightName.push(pseudoRule.style);
            } else {
              splitHighlightRules.set(highlightName, [pseudoRule.style]);
            }
          }
        }
        for (const [highlightName, highlightStyles] of splitHighlightRules) {
          const nodeCascade = new NodeCascade(this, highlightStyles, node2, isInherited, true);
          const cascadeListForHighlightName = pseudoCascades.get(highlightName);
          if (cascadeListForHighlightName) {
            cascadeListForHighlightName.push(nodeCascade);
          } else {
            pseudoCascades.set(highlightName, [nodeCascade]);
          }
        }
      }
      buildPseudoCascades(pseudoPayload, inheritedPseudoPayload) {
        const pseudoInheritanceCascades = /* @__PURE__ */ new Map();
        const customHighlightPseudoInheritanceCascades = /* @__PURE__ */ new Map();
        if (!pseudoPayload) {
          return [pseudoInheritanceCascades, customHighlightPseudoInheritanceCascades];
        }
        const pseudoCascades = /* @__PURE__ */ new Map();
        const customHighlightPseudoCascades = /* @__PURE__ */ new Map();
        for (let i = 0; i < pseudoPayload.length; ++i) {
          const entryPayload = pseudoPayload[i];
          const pseudoElement = this.#node.pseudoElements().get(entryPayload.pseudoType)?.at(-1) || null;
          const pseudoStyles = [];
          const rules2 = entryPayload.matches || [];
          if (entryPayload.pseudoType === "highlight") {
            this.buildSplitCustomHighlightCascades(rules2, this.#node, false, customHighlightPseudoCascades);
          } else {
            for (let j = rules2.length - 1; j >= 0; --j) {
              const pseudoRule = new CSSStyleRule(this.#cssModel, rules2[j].rule);
              pseudoStyles.push(pseudoRule.style);
              const nodeForStyle = cssMetadata().isHighlightPseudoType(entryPayload.pseudoType) ? this.#node : pseudoElement;
              this.#nodeForStyle.set(pseudoRule.style, nodeForStyle);
              if (nodeForStyle) {
                this.addMatchingSelectors(nodeForStyle, pseudoRule, rules2[j].matchingSelectors);
              }
            }
            const isHighlightPseudoCascade = cssMetadata().isHighlightPseudoType(entryPayload.pseudoType);
            const nodeCascade = new NodeCascade(this, pseudoStyles, this.#node, false, isHighlightPseudoCascade);
            pseudoCascades.set(entryPayload.pseudoType, [nodeCascade]);
          }
        }
        if (inheritedPseudoPayload) {
          let parentNode = this.#node.parentNode;
          for (let i = 0; parentNode && i < inheritedPseudoPayload.length; ++i) {
            const inheritedPseudoMatches = inheritedPseudoPayload[i].pseudoElements;
            for (let j = 0; j < inheritedPseudoMatches.length; ++j) {
              const inheritedEntryPayload = inheritedPseudoMatches[j];
              const rules2 = inheritedEntryPayload.matches || [];
              if (inheritedEntryPayload.pseudoType === "highlight") {
                this.buildSplitCustomHighlightCascades(rules2, parentNode, true, customHighlightPseudoCascades);
              } else {
                const pseudoStyles = [];
                for (let k = rules2.length - 1; k >= 0; --k) {
                  const pseudoRule = new CSSStyleRule(this.#cssModel, rules2[k].rule);
                  pseudoStyles.push(pseudoRule.style);
                  this.#nodeForStyle.set(pseudoRule.style, parentNode);
                  this.#inheritedStyles.add(pseudoRule.style);
                  this.addMatchingSelectors(parentNode, pseudoRule, rules2[k].matchingSelectors);
                }
                const isHighlightPseudoCascade = cssMetadata().isHighlightPseudoType(inheritedEntryPayload.pseudoType);
                const nodeCascade = new NodeCascade(this, pseudoStyles, parentNode, true, isHighlightPseudoCascade);
                const cascadeListForPseudoType = pseudoCascades.get(inheritedEntryPayload.pseudoType);
                if (cascadeListForPseudoType) {
                  cascadeListForPseudoType.push(nodeCascade);
                } else {
                  pseudoCascades.set(inheritedEntryPayload.pseudoType, [nodeCascade]);
                }
              }
            }
            parentNode = parentNode.parentNode;
          }
        }
        for (const [pseudoType, nodeCascade] of pseudoCascades.entries()) {
          pseudoInheritanceCascades.set(pseudoType, new DOMInheritanceCascade(this, nodeCascade, this.#registeredProperties, this.#mainDOMCascade));
        }
        for (const [highlightName, nodeCascade] of customHighlightPseudoCascades.entries()) {
          customHighlightPseudoInheritanceCascades.set(highlightName, new DOMInheritanceCascade(this, nodeCascade, this.#registeredProperties, this.#mainDOMCascade));
        }
        return [pseudoInheritanceCascades, customHighlightPseudoInheritanceCascades];
      }
      addMatchingSelectors(node2, rule, matchingSelectorIndices) {
        for (const matchingSelectorIndex of matchingSelectorIndices) {
          const selector = rule.selectors[matchingSelectorIndex];
          if (selector) {
            this.setSelectorMatches(node2, selector.text, true);
          }
        }
      }
      node() {
        return this.#node;
      }
      cssModel() {
        return this.#cssModel;
      }
      hasMatchingSelectors(rule) {
        return (rule.selectors.length === 0 || this.getMatchingSelectors(rule).length > 0) && queryMatches(rule.style);
      }
      getParentLayoutNodeId() {
        return this.#parentLayoutNodeId;
      }
      getMatchingSelectors(rule) {
        const node2 = this.nodeForStyle(rule.style);
        if (!node2 || typeof node2.id !== "number") {
          return [];
        }
        const map2 = this.#matchingSelectors.get(node2.id);
        if (!map2) {
          return [];
        }
        const result = [];
        for (let i = 0; i < rule.selectors.length; ++i) {
          if (map2.get(rule.selectors[i].text)) {
            result.push(i);
          }
        }
        return result;
      }
      async recomputeMatchingSelectors(rule) {
        const node2 = this.nodeForStyle(rule.style);
        if (!node2) {
          return;
        }
        const promises2 = [];
        for (const selector of rule.selectors) {
          promises2.push(querySelector.call(this, node2, selector.text));
        }
        await Promise.all(promises2);
        async function querySelector(node3, selectorText) {
          const ownerDocument = node3.ownerDocument;
          if (!ownerDocument) {
            return;
          }
          if (typeof node3.id === "number") {
            const map2 = this.#matchingSelectors.get(node3.id);
            if (map2?.has(selectorText)) {
              return;
            }
          }
          if (typeof ownerDocument.id !== "number") {
            return;
          }
          const matchingNodeIds = await this.#node.domModel().querySelectorAll(ownerDocument.id, selectorText);
          if (matchingNodeIds) {
            if (typeof node3.id === "number") {
              this.setSelectorMatches(node3, selectorText, matchingNodeIds.indexOf(node3.id) !== -1);
            } else {
              this.setSelectorMatches(node3, selectorText, false);
            }
          }
        }
      }
      addNewRule(rule, node2) {
        this.#addedStyles.set(rule.style, node2);
        return this.recomputeMatchingSelectors(rule);
      }
      setSelectorMatches(node2, selectorText, value) {
        if (typeof node2.id !== "number") {
          return;
        }
        let map2 = this.#matchingSelectors.get(node2.id);
        if (!map2) {
          map2 = /* @__PURE__ */ new Map();
          this.#matchingSelectors.set(node2.id, map2);
        }
        map2.set(selectorText, value);
      }
      nodeStyles() {
        assertNotNullOrUndefined2(this.#mainDOMCascade);
        return this.#mainDOMCascade.styles();
      }
      inheritedStyles() {
        return this.#mainDOMCascade?.styles().filter((style) => this.isInherited(style)) ?? [];
      }
      animationStyles() {
        return this.#mainDOMCascade?.styles().filter((style) => !this.isInherited(style) && style.type === Type$3.Animation) ?? [];
      }
      transitionsStyle() {
        return this.#mainDOMCascade?.styles().find((style) => !this.isInherited(style) && style.type === Type$3.Transition) ?? null;
      }
      registeredProperties() {
        return this.#registeredProperties;
      }
      getRegisteredProperty(name) {
        return this.#registeredPropertyMap.get(name);
      }
      getRegisteredFunction(name) {
        const functionRule = this.#functionRuleMap.get(name);
        return functionRule ? functionRule.nameWithParameters() : void 0;
      }
      functionRules() {
        return this.#functionRules;
      }
      atRules() {
        return this.#atRules;
      }
      keyframes() {
        return this.#keyframes;
      }
      positionTryRules() {
        return this.#positionTryRules;
      }
      activePositionFallbackIndex() {
        return this.#activePositionFallbackIndex;
      }
      pseudoStyles(pseudoType) {
        assertNotNullOrUndefined2(this.#pseudoDOMCascades);
        const domCascade = this.#pseudoDOMCascades.get(pseudoType);
        return domCascade ? domCascade.styles() : [];
      }
      pseudoTypes() {
        assertNotNullOrUndefined2(this.#pseudoDOMCascades);
        return new Set(this.#pseudoDOMCascades.keys());
      }
      customHighlightPseudoStyles(highlightName) {
        assertNotNullOrUndefined2(this.#customHighlightPseudoDOMCascades);
        const domCascade = this.#customHighlightPseudoDOMCascades.get(highlightName);
        return domCascade ? domCascade.styles() : [];
      }
      customHighlightPseudoNames() {
        assertNotNullOrUndefined2(this.#customHighlightPseudoDOMCascades);
        return new Set(this.#customHighlightPseudoDOMCascades.keys());
      }
      nodeForStyle(style) {
        return this.#addedStyles.get(style) || this.#nodeForStyle.get(style) || null;
      }
      availableCSSVariables(style) {
        const domCascade = this.#styleToDOMCascade.get(style);
        return domCascade ? domCascade.findAvailableCSSVariables(style) : [];
      }
      computeCSSVariable(style, variableName) {
        if (style.parentRule instanceof CSSKeyframeRule) {
          const keyframeName = style.parentRule.parentRuleName();
          const activeStyle = this.#mainDOMCascade?.styles().find((searchStyle) => {
            return searchStyle.allProperties().some((property) => property.name === "animation-name" && property.value === keyframeName && this.#mainDOMCascade?.propertyState(property) === "Active");
          });
          if (!activeStyle) {
            return null;
          }
          style = activeStyle;
        }
        const domCascade = this.#styleToDOMCascade.get(style);
        return domCascade ? domCascade.computeCSSVariable(style, variableName) : null;
      }
      computeAttribute(style, attributeName, type2) {
        const domCascade = this.#styleToDOMCascade.get(style);
        return domCascade ? domCascade.computeAttribute(style, attributeName, type2) : null;
      }
      originatingNodeForStyle(style) {
        let node2 = this.nodeForStyle(style) ?? this.node();
        while (node2?.pseudoType()) {
          node2 = node2.parentNode;
        }
        return node2;
      }
      rawAttributeValueFromStyle(style, attributeName) {
        const node2 = this.originatingNodeForStyle(style);
        if (!node2) {
          return null;
        }
        return node2.getAttribute(attributeName) ?? null;
      }
      resolveProperty(name, ownerStyle) {
        return this.#styleToDOMCascade.get(ownerStyle)?.resolveProperty(name, ownerStyle) ?? null;
      }
      resolveGlobalKeyword(property, keyword2) {
        const resolved = this.#styleToDOMCascade.get(property.ownerStyle)?.resolveGlobalKeyword(property, keyword2);
        return resolved ? new CSSValueSource(resolved) : null;
      }
      isInherited(style) {
        return this.#inheritedStyles.has(style);
      }
      propertyState(property) {
        const domCascade = this.#styleToDOMCascade.get(property.ownerStyle);
        return domCascade ? domCascade.propertyState(property) : null;
      }
      isPropertyOverriddenByAnimation(property) {
        const domCascade = this.#styleToDOMCascade.get(property.ownerStyle);
        return domCascade?.isPropertyOverriddenByAnimation(property) ?? false;
      }
      resetActiveProperties() {
        assertNotNullOrUndefined2(this.#mainDOMCascade);
        assertNotNullOrUndefined2(this.#pseudoDOMCascades);
        assertNotNullOrUndefined2(this.#customHighlightPseudoDOMCascades);
        this.#mainDOMCascade.reset();
        for (const domCascade of this.#pseudoDOMCascades.values()) {
          domCascade.reset();
        }
        for (const domCascade of this.#customHighlightPseudoDOMCascades.values()) {
          domCascade.reset();
        }
      }
      propertyMatchers(style, computedStyles) {
        return [
          new VariableMatcher(this, style),
          new ColorMatcher(() => computedStyles?.get("color") ?? null),
          new ColorMixMatcher(),
          new URLMatcher(),
          new AngleMatcher(),
          new LinkableNameMatcher(),
          new BezierMatcher(),
          new StringMatcher(),
          new ShadowMatcher(),
          new LightDarkColorMatcher(style),
          new GridTemplateMatcher(),
          new LinearGradientMatcher(),
          new AnchorFunctionMatcher(),
          new PositionAnchorMatcher(),
          new FlexGridGridLanesMatcher(),
          new PositionTryMatcher(),
          new LengthMatcher(),
          new MathFunctionMatcher(),
          new CustomFunctionMatcher(),
          new AutoBaseMatcher(),
          new BinOpMatcher(),
          new RelativeColorChannelMatcher(),
          new AttributeMatcher(this, style),
          new EnvFunctionMatcher(this)
        ];
      }
      environmentVariable(name) {
        return this.#environmentVariables[name];
      }
    };
    NodeCascade = class {
      isHighlightPseudoCascade;
      #matchedStyles;
      styles;
      #isInherited;
      propertiesState = /* @__PURE__ */ new Map();
      propertiesOverriddenByAnimation = /* @__PURE__ */ new Set();
      activeProperties = /* @__PURE__ */ new Map();
      #node;
      constructor(matchedStyles, styles2, node2, isInherited, isHighlightPseudoCascade = false) {
        this.isHighlightPseudoCascade = isHighlightPseudoCascade;
        this.#matchedStyles = matchedStyles;
        this.styles = styles2;
        this.#isInherited = isInherited;
        this.#node = node2;
      }
      computeActiveProperties() {
        this.propertiesState.clear();
        this.propertiesOverriddenByAnimation.clear();
        this.activeProperties.clear();
        for (let i = this.styles.length - 1; i >= 0; i--) {
          const style = this.styles[i];
          const rule = style.parentRule;
          if (rule && !(rule instanceof CSSStyleRule)) {
            continue;
          }
          if (rule && !this.#matchedStyles.hasMatchingSelectors(rule)) {
            continue;
          }
          for (const property of style.allProperties()) {
            const metadata2 = cssMetadata();
            if (this.#isInherited) {
              if (this.isHighlightPseudoCascade) {
                if (property.name.startsWith("--")) {
                  continue;
                }
              } else if (!metadata2.isPropertyInherited(property.name)) {
                continue;
              }
            }
            if (style.range && !property.range) {
              continue;
            }
            if (!property.activeInStyle()) {
              this.propertiesState.set(property, "Overloaded");
              continue;
            }
            if (this.#isInherited) {
              const registration = this.#matchedStyles.getRegisteredProperty(property.name);
              if (registration && !registration.inherits()) {
                this.propertiesState.set(property, "Overloaded");
                continue;
              }
            }
            const canonicalName = metadata2.canonicalPropertyName(property.name);
            this.updatePropertyState(property, canonicalName);
            for (const longhand of property.getLonghandProperties()) {
              if (metadata2.isCSSPropertyName(longhand.name)) {
                this.updatePropertyState(longhand, longhand.name);
              }
            }
          }
        }
      }
      #treeScopeDistance(property) {
        if (!property.ownerStyle.parentRule && property.ownerStyle.type !== Type$3.Inline) {
          return -1;
        }
        const root2 = this.#node.getTreeRoot();
        const nodeId = property.ownerStyle.parentRule?.treeScope ?? root2?.backendNodeId();
        if (nodeId === void 0) {
          return -1;
        }
        let distance = 0;
        for (let ancestor = this.#node; ancestor; ancestor = ancestor.parentNode) {
          if (ancestor.backendNodeId() === nodeId) {
            return distance;
          }
          distance++;
        }
        return -1;
      }
      #needsCascadeContextStep() {
        if (!this.#node.isInShadowTree()) {
          return false;
        }
        if (this.#node.ancestorShadowRoot()?.shadowRootType() === "user-agent") {
          const pseudoElement = this.#node.getAttribute("pseudo");
          return !pseudoElement?.startsWith("-webkit-") && !pseudoElement?.startsWith("-internal-");
        }
        return true;
      }
      updatePropertyState(propertyWithHigherSpecificity, canonicalName) {
        const activeProperty = this.activeProperties.get(canonicalName);
        if (activeProperty?.important && !propertyWithHigherSpecificity.important || activeProperty && this.#needsCascadeContextStep() && this.#treeScopeDistance(activeProperty) > this.#treeScopeDistance(propertyWithHigherSpecificity)) {
          this.propertiesState.set(propertyWithHigherSpecificity, "Overloaded");
          return;
        }
        if (activeProperty) {
          this.propertiesState.set(activeProperty, "Overloaded");
          if (propertyWithHigherSpecificity.ownerStyle.type === Type$3.Animation || propertyWithHigherSpecificity.ownerStyle.type === Type$3.Transition) {
            this.propertiesOverriddenByAnimation.add(activeProperty);
          }
        }
        this.propertiesState.set(propertyWithHigherSpecificity, "Active");
        this.activeProperties.set(canonicalName, propertyWithHigherSpecificity);
      }
    };
    CSSValueSource = class {
      declaration;
      constructor(declaration2) {
        this.declaration = declaration2;
      }
      get value() {
        return isRegular(this.declaration) ? this.declaration.value : this.declaration.initialValue();
      }
      get style() {
        return isRegular(this.declaration) ? this.declaration.ownerStyle : this.declaration.style();
      }
      get name() {
        return isRegular(this.declaration) ? this.declaration.name : this.declaration.propertyName();
      }
    };
    SCCRecordEntry = class {
      nodeCascade;
      name;
      discoveryTime;
      rootDiscoveryTime;
      get isRootEntry() {
        return this.rootDiscoveryTime === this.discoveryTime;
      }
      updateRoot(neighbor) {
        this.rootDiscoveryTime = Math.min(this.rootDiscoveryTime, neighbor.rootDiscoveryTime);
      }
      constructor(nodeCascade, name, discoveryTime) {
        this.nodeCascade = nodeCascade;
        this.name = name;
        this.discoveryTime = discoveryTime;
        this.rootDiscoveryTime = discoveryTime;
      }
    };
    SCCRecord = class {
      #time = 0;
      #stack = [];
      #entries = /* @__PURE__ */ new Map();
      get(nodeCascade, variable) {
        return this.#entries.get(nodeCascade)?.get(variable);
      }
      add(nodeCascade, variable) {
        const existing = this.get(nodeCascade, variable);
        if (existing) {
          return existing;
        }
        const entry = new SCCRecordEntry(nodeCascade, variable, this.#time++);
        this.#stack.push(entry);
        let map2 = this.#entries.get(nodeCascade);
        if (!map2) {
          map2 = /* @__PURE__ */ new Map();
          this.#entries.set(nodeCascade, map2);
        }
        map2.set(variable, entry);
        return entry;
      }
      isInInProgressSCC(childRecord) {
        return this.#stack.includes(childRecord);
      }
      finishSCC(root2) {
        const startIndex = this.#stack.lastIndexOf(root2);
        console.assert(startIndex >= 0, "Root is not an in-progress scc");
        return this.#stack.splice(startIndex);
      }
    };
    DOMInheritanceCascade = class {
      #propertiesState = /* @__PURE__ */ new Map();
      #propertiesOverriddenByAnimation = /* @__PURE__ */ new Set();
      #availableCSSVariables = /* @__PURE__ */ new Map();
      #computedCSSVariables = /* @__PURE__ */ new Map();
      #styleToNodeCascade = /* @__PURE__ */ new Map();
      #initialized = false;
      #nodeCascades;
      #registeredProperties;
      #matchedStyles;
      #fallbackCascade = null;
      #styles = [];
      constructor(matchedStyles, nodeCascades, registeredProperties, fallbackCascade = null) {
        this.#nodeCascades = nodeCascades;
        this.#matchedStyles = matchedStyles;
        this.#registeredProperties = registeredProperties;
        this.#fallbackCascade = fallbackCascade;
        for (const nodeCascade of nodeCascades) {
          for (const style of nodeCascade.styles) {
            this.#styleToNodeCascade.set(style, nodeCascade);
            this.#styles.push(style);
          }
        }
        if (fallbackCascade) {
          for (const [style, nodeCascade] of fallbackCascade.#styleToNodeCascade) {
            if (!this.#styles.includes(style)) {
              this.#styleToNodeCascade.set(style, nodeCascade);
            }
          }
        }
      }
      findAvailableCSSVariables(style) {
        const nodeCascade = this.#styleToNodeCascade.get(style);
        if (!nodeCascade) {
          return [];
        }
        this.ensureInitialized();
        const availableCSSVariables = this.#availableCSSVariables.get(nodeCascade);
        if (!availableCSSVariables) {
          return [];
        }
        return Array.from(availableCSSVariables.keys());
      }
      #findPropertyInPreviousStyle(property, filter2) {
        const cascade = this.#styleToNodeCascade.get(property.ownerStyle);
        if (!cascade) {
          return null;
        }
        for (const style of forEach(cascade.styles, property.ownerStyle)) {
          const candidate = style.allProperties().findLast((candidate2) => candidate2.name === property.name && filter2(candidate2));
          if (candidate) {
            return candidate;
          }
        }
        return null;
      }
      resolveProperty(name, ownerStyle) {
        const cascade = this.#styleToNodeCascade.get(ownerStyle);
        if (!cascade) {
          return null;
        }
        for (const style of cascade.styles) {
          const candidate = style.allProperties().findLast((candidate2) => candidate2.name === name);
          if (candidate) {
            return candidate;
          }
        }
        return this.#findPropertyInParentCascadeIfInherited({ name, ownerStyle });
      }
      #findPropertyInParentCascade(property) {
        const nodeCascade = this.#styleToNodeCascade.get(property.ownerStyle);
        if (!nodeCascade) {
          return null;
        }
        for (const cascade of forEach(this.#nodeCascades, nodeCascade)) {
          for (const style of cascade.styles) {
            const inheritedProperty = style.allProperties().findLast((inheritedProperty2) => inheritedProperty2.name === property.name);
            if (inheritedProperty) {
              return inheritedProperty;
            }
          }
        }
        if (this.#fallbackCascade && (!nodeCascade.isHighlightPseudoCascade || property.name.startsWith("--"))) {
          return this.#fallbackCascade.resolveProperty(property.name, property.ownerStyle);
        }
        return null;
      }
      #findPropertyInParentCascadeIfInherited(property) {
        if (!cssMetadata().isPropertyInherited(property.name) || !(this.#findCustomPropertyRegistration(property.name)?.inherits() ?? true)) {
          return null;
        }
        return this.#findPropertyInParentCascade(property);
      }
      #findCustomPropertyRegistration(property) {
        const registration = this.#registeredProperties.find((registration2) => registration2.propertyName() === property);
        return registration ? registration : null;
      }
      resolveGlobalKeyword(property, keyword2) {
        const isPreviousLayer = (other) => {
          if (!(other.ownerStyle.parentRule instanceof CSSStyleRule)) {
            return false;
          }
          if (property.ownerStyle.type === Type$3.Inline) {
            return true;
          }
          if (property.ownerStyle.parentRule instanceof CSSStyleRule && other.ownerStyle.parentRule?.origin === "regular") {
            return JSON.stringify(other.ownerStyle.parentRule.layers) !== JSON.stringify(property.ownerStyle.parentRule.layers);
          }
          return false;
        };
        switch (keyword2) {
          case "initial":
            return this.#findCustomPropertyRegistration(property.name);
          case "inherit":
            return this.#findPropertyInParentCascade(property) ?? this.#findCustomPropertyRegistration(property.name);
          case "revert":
            return this.#findPropertyInPreviousStyle(property, (other) => other.ownerStyle.parentRule !== null && other.ownerStyle.parentRule.origin !== (property.ownerStyle.parentRule?.origin ?? "regular")) ?? this.resolveGlobalKeyword(property, "unset");
          case "revert-layer":
            return this.#findPropertyInPreviousStyle(property, isPreviousLayer) ?? this.resolveGlobalKeyword(property, "revert");
          case "revert-rule":
            return this.#findPropertyInPreviousStyle(property, () => true) ?? this.resolveGlobalKeyword(property, "unset");
          case "unset":
            return this.#findPropertyInParentCascadeIfInherited(property) ?? this.#findCustomPropertyRegistration(property.name);
        }
      }
      computeCSSVariable(style, variableName) {
        this.ensureInitialized();
        const nodeCascade = this.#styleToNodeCascade.get(style);
        if (!nodeCascade) {
          return null;
        }
        return this.#computeCSSVariable(nodeCascade, variableName);
      }
      #computeCSSVariable(nodeCascade, variableName, sccRecord = new SCCRecord()) {
        const availableCSSVariables = this.#availableCSSVariables.get(nodeCascade);
        const computedCSSVariables = this.#computedCSSVariables.get(nodeCascade);
        if (!computedCSSVariables || !availableCSSVariables?.has(variableName)) {
          return null;
        }
        if (computedCSSVariables?.has(variableName)) {
          return computedCSSVariables.get(variableName) || null;
        }
        let definedValue = availableCSSVariables.get(variableName);
        if (definedValue === void 0 || definedValue === null) {
          return null;
        }
        if (definedValue.declaration.declaration instanceof CSSProperty && definedValue.declaration.value && CSSMetadata.isCSSWideKeyword(definedValue.declaration.value)) {
          const resolvedProperty = this.resolveGlobalKeyword(definedValue.declaration.declaration, definedValue.declaration.value);
          if (!resolvedProperty) {
            return definedValue;
          }
          const declaration2 = new CSSValueSource(resolvedProperty);
          const { value } = declaration2;
          if (!value) {
            return definedValue;
          }
          definedValue = { declaration: declaration2, value };
        }
        const ast2 = tokenizeDeclaration(`--${variableName}`, definedValue.value);
        if (!ast2) {
          return null;
        }
        return this.#walkTree(nodeCascade, ast2, definedValue.declaration.style, variableName, sccRecord, definedValue.declaration);
      }
      computeAttribute(style, attributeName, type2) {
        this.ensureInitialized();
        const nodeCascade = this.#styleToNodeCascade.get(style);
        if (!nodeCascade) {
          return null;
        }
        return this.#computeAttribute(nodeCascade, style, attributeName, type2, new SCCRecord());
      }
      attributeValueAsType(style, attributeName, type2) {
        const rawValue = this.#matchedStyles.rawAttributeValueFromStyle(style, attributeName);
        if (rawValue === null) {
          return null;
        }
        return localEvalCSS(rawValue, type2);
      }
      attributeValueWithSubstitutions(nodeCascade, style, attributeName, sccRecord) {
        const rawValue = this.#matchedStyles.rawAttributeValueFromStyle(style, attributeName);
        if (rawValue === null) {
          return null;
        }
        const ast2 = tokenizeDeclaration("--property", rawValue);
        if (!ast2) {
          return null;
        }
        return this.#walkTree(nodeCascade, ast2, style, `attr(${attributeName})`, sccRecord)?.value ?? null;
      }
      #computeAttribute(nodeCascade, style, attributeName, type2, sccRecord = new SCCRecord()) {
        if (type2.isCSSTokens) {
          const value = this.attributeValueWithSubstitutions(nodeCascade, style, attributeName, sccRecord);
          if (value !== null && localEvalCSS(value, type2.type) !== null) {
            return value;
          }
          return null;
        }
        return this.attributeValueAsType(style, attributeName, type2.type);
      }
      #walkTree(outerNodeCascade, ast2, parentStyle, substitutionName, sccRecord, declaration2) {
        const record2 = sccRecord.add(outerNodeCascade, substitutionName);
        const computedCSSVariablesMap = this.#computedCSSVariables;
        const innerNodeCascade = this.#styleToNodeCascade.get(parentStyle);
        const matching = BottomUpTreeMatching.walk(ast2, [
          new BaseVariableMatcher((match) => {
            const { value, mayFallback } = recurseWithCycleDetection(match.name, (nodeCascade) => this.#computeCSSVariable(nodeCascade, match.name, sccRecord)?.value ?? null);
            if (!mayFallback || value !== null) {
              return value;
            }
            if (!match.fallback) {
              return null;
            }
            return evaluateFallback(match.fallback, match.matching);
          }),
          new EnvFunctionMatcher(this.#matchedStyles),
          new AttributeMatcher(this.#matchedStyles, parentStyle, (match) => {
            const recordName = `attr(${match.name})`;
            let attributeValue = null;
            if (!match.isCSSTokens) {
              const { value, mayFallback } = recurseWithCycleDetection(recordName, () => this.attributeValueAsType(parentStyle, match.name, match.cssType()));
              if (value === null && !mayFallback) {
                return null;
              }
              attributeValue = value;
            } else {
              const { value, mayFallback } = recurseWithCycleDetection(recordName, (nodeCascade) => this.attributeValueWithSubstitutions(nodeCascade, parentStyle, match.name, sccRecord));
              if (value === null && !mayFallback) {
                return null;
              }
              if (value !== null && localEvalCSS(value, match.cssType()) !== null) {
                attributeValue = value;
              }
            }
            if (attributeValue !== null) {
              return attributeValue;
            }
            if (!match.fallback || !match.isValidType) {
              return defaultValueForCSSType(match.type);
            }
            return evaluateFallback(match.fallback, match.matching);
          })
        ]);
        const decl = ASTUtils.siblings(ASTUtils.declValue(matching.ast.tree));
        const declText = decl.length > 0 ? matching.getComputedTextRange(decl[0], decl[decl.length - 1]) : "";
        const hasUnresolvedSubstitutions = decl.length > 0 && matching.hasUnresolvedSubstitutionsRange(decl[0], decl[decl.length - 1]);
        const computedText = hasUnresolvedSubstitutions ? null : declText;
        const outerComputedCSSVariables = computedCSSVariablesMap.get(outerNodeCascade);
        if (!outerComputedCSSVariables) {
          return null;
        }
        if (record2.isRootEntry) {
          const scc = sccRecord.finishSCC(record2);
          if (scc.length > 1) {
            for (const entry of scc) {
              console.assert(entry.nodeCascade === outerNodeCascade, "Circles should be within the cascade");
              outerComputedCSSVariables.set(entry.name, null);
            }
            return null;
          }
        }
        if (computedText === null) {
          outerComputedCSSVariables.set(substitutionName, null);
          return null;
        }
        const cssVariableValue = { value: computedText, declaration: declaration2 };
        outerComputedCSSVariables.set(substitutionName, cssVariableValue);
        return cssVariableValue;
        function recurseWithCycleDetection(recordName, func) {
          if (!innerNodeCascade) {
            return { value: null, mayFallback: false };
          }
          const childRecord = sccRecord.get(innerNodeCascade, recordName);
          if (childRecord) {
            if (sccRecord.isInInProgressSCC(childRecord)) {
              record2.updateRoot(childRecord);
              return { value: null, mayFallback: false };
            }
            return {
              value: computedCSSVariablesMap.get(innerNodeCascade)?.get(recordName)?.value ?? null,
              mayFallback: false
            };
          }
          const value = func(innerNodeCascade);
          const newChildRecord = sccRecord.get(innerNodeCascade, recordName);
          newChildRecord && record2.updateRoot(newChildRecord);
          return { value, mayFallback: true };
        }
        function evaluateFallback(fallback, matching2) {
          if (fallback.length === 0) {
            return "";
          }
          if (matching2.hasUnresolvedSubstitutionsRange(fallback[0], fallback[fallback.length - 1])) {
            return null;
          }
          return matching2.getComputedTextRange(fallback[0], fallback[fallback.length - 1]);
        }
      }
      styles() {
        return this.#styles;
      }
      propertyState(property) {
        this.ensureInitialized();
        return this.#propertiesState.get(property) || null;
      }
      isPropertyOverriddenByAnimation(property) {
        this.ensureInitialized();
        return this.#propertiesOverriddenByAnimation.has(property);
      }
      reset() {
        this.#initialized = false;
        this.#propertiesState.clear();
        this.#propertiesOverriddenByAnimation.clear();
        this.#availableCSSVariables.clear();
        this.#computedCSSVariables.clear();
      }
      ensureInitialized() {
        if (this.#initialized) {
          return;
        }
        this.#initialized = true;
        const activeProperties = /* @__PURE__ */ new Map();
        for (const nodeCascade of this.#nodeCascades) {
          nodeCascade.computeActiveProperties();
          for (const [property, state] of nodeCascade.propertiesState) {
            if (state === "Overloaded") {
              this.#propertiesState.set(property, "Overloaded");
              if (nodeCascade.propertiesOverriddenByAnimation.has(property)) {
                this.#propertiesOverriddenByAnimation.add(property);
              }
              continue;
            }
            const canonicalName = cssMetadata().canonicalPropertyName(property.name);
            if (activeProperties.has(canonicalName)) {
              this.#propertiesState.set(property, "Overloaded");
              const activeProperty = activeProperties.get(canonicalName);
              if (activeProperty && (activeProperty.ownerStyle.type === Type$3.Animation || activeProperty.ownerStyle.type === Type$3.Transition)) {
                this.#propertiesOverriddenByAnimation.add(property);
              }
              continue;
            }
            activeProperties.set(canonicalName, property);
            this.#propertiesState.set(property, "Active");
          }
        }
        for (const [canonicalName, shorthandProperty] of activeProperties) {
          const shorthandStyle = shorthandProperty.ownerStyle;
          const longhands = shorthandProperty.getLonghandProperties();
          if (!longhands.length) {
            continue;
          }
          let hasActiveLonghands = false;
          for (const longhand of longhands) {
            const longhandCanonicalName = cssMetadata().canonicalPropertyName(longhand.name);
            const longhandActiveProperty = activeProperties.get(longhandCanonicalName);
            if (!longhandActiveProperty) {
              continue;
            }
            if (longhandActiveProperty.ownerStyle === shorthandStyle) {
              hasActiveLonghands = true;
              break;
            }
          }
          if (hasActiveLonghands) {
            continue;
          }
          activeProperties.delete(canonicalName);
          this.#propertiesState.set(shorthandProperty, "Overloaded");
        }
        const accumulatedCSSVariables = /* @__PURE__ */ new Map();
        for (const rule of this.#registeredProperties) {
          const initialValue = rule.initialValue();
          accumulatedCSSVariables.set(rule.propertyName(), initialValue !== null ? { value: initialValue, declaration: new CSSValueSource(rule) } : null);
        }
        if (this.#fallbackCascade) {
          this.#fallbackCascade.ensureInitialized();
          for (const [cascade, available] of this.#fallbackCascade.#availableCSSVariables) {
            this.#availableCSSVariables.set(cascade, available);
          }
          for (const [cascade, computed] of this.#fallbackCascade.#computedCSSVariables) {
            this.#computedCSSVariables.set(cascade, computed);
          }
          for (const [key, value] of this.#fallbackCascade.#availableCSSVariables.get(this.#fallbackCascade.#nodeCascades[0]) ?? []) {
            accumulatedCSSVariables.set(key, value);
          }
        }
        for (let i = this.#nodeCascades.length - 1; i >= 0; --i) {
          const nodeCascade = this.#nodeCascades[i];
          const variableNames = [];
          for (const entry of nodeCascade.activeProperties.entries()) {
            const propertyName = entry[0];
            const property = entry[1];
            if (propertyName.startsWith("--")) {
              accumulatedCSSVariables.set(propertyName, { value: property.value, declaration: new CSSValueSource(property) });
              variableNames.push(propertyName);
            }
          }
          const availableCSSVariablesMap = new Map(accumulatedCSSVariables);
          const computedVariablesMap = /* @__PURE__ */ new Map();
          this.#availableCSSVariables.set(nodeCascade, availableCSSVariablesMap);
          this.#computedCSSVariables.set(nodeCascade, computedVariablesMap);
          for (const variableName of variableNames) {
            const prevValue = accumulatedCSSVariables.get(variableName);
            accumulatedCSSVariables.delete(variableName);
            const computedValue = this.#computeCSSVariable(nodeCascade, variableName);
            if (prevValue && computedValue?.value === prevValue.value) {
              computedValue.declaration = prevValue.declaration;
            }
            accumulatedCSSVariables.set(variableName, computedValue);
          }
        }
      }
    };
    UIStrings$15 = {
      couldNotFindTheOriginalStyle: "Could not find the original style sheet.",
      thereWasAnErrorRetrievingThe: "There was an error retrieving the source styles."
    };
    str_$14 = registerUIStrings("core/sdk/CSSStyleSheetHeader.ts", UIStrings$15);
    i18nString$O = getLocalizedString.bind(void 0, str_$14);
    CSSStyleSheetHeader = class {
      #cssModel;
      id;
      frameId;
      sourceURL;
      hasSourceURL;
      origin;
      title;
      disabled;
      isInline;
      isMutable;
      isConstructed;
      startLine;
      startColumn;
      endLine;
      endColumn;
      contentLength;
      ownerNode;
      sourceMapURL;
      loadingFailed;
      #originalContentProvider;
      constructor(cssModel, payload) {
        this.#cssModel = cssModel;
        this.id = payload.styleSheetId;
        this.frameId = payload.frameId;
        this.sourceURL = payload.sourceURL;
        this.hasSourceURL = Boolean(payload.hasSourceURL);
        this.origin = payload.origin;
        this.title = payload.title;
        this.disabled = payload.disabled;
        this.isInline = payload.isInline;
        this.isMutable = payload.isMutable;
        this.isConstructed = payload.isConstructed;
        this.startLine = payload.startLine;
        this.startColumn = payload.startColumn;
        this.endLine = payload.endLine;
        this.endColumn = payload.endColumn;
        this.contentLength = payload.length;
        if (payload.ownerNode) {
          this.ownerNode = new DeferredDOMNode(cssModel.target(), payload.ownerNode);
        }
        this.sourceMapURL = payload.sourceMapURL;
        this.loadingFailed = payload.loadingFailed ?? false;
        this.#originalContentProvider = null;
      }
      originalContentProvider() {
        if (!this.#originalContentProvider) {
          const lazyContent = async () => {
            const originalText = await this.#cssModel.originalStyleSheetText(this);
            if (originalText === null) {
              return { error: i18nString$O(UIStrings$15.couldNotFindTheOriginalStyle) };
            }
            return new ContentData(originalText, false, "text/css");
          };
          this.#originalContentProvider = new StaticContentProvider(this.contentURL(), this.contentType(), lazyContent);
        }
        return this.#originalContentProvider;
      }
      setSourceMapURL(sourceMapURL) {
        this.sourceMapURL = sourceMapURL;
      }
      cssModel() {
        return this.#cssModel;
      }
      isAnonymousInlineStyleSheet() {
        return !this.resourceURL() && !this.#cssModel.sourceMapManager().sourceMapForClient(this);
      }
      isConstructedByNew() {
        return this.isConstructed && this.sourceURL.length === 0;
      }
      resourceURL() {
        return this.isViaInspector() ? this.viaInspectorResourceURL() : this.sourceURL;
      }
      getFrameURLPath() {
        const model3 = this.#cssModel.target().model(ResourceTreeModel);
        console.assert(Boolean(model3));
        if (!model3) {
          return "";
        }
        const frame = model3.frameForId(this.frameId);
        if (!frame) {
          return "";
        }
        console.assert(Boolean(frame));
        const parsedURL = new ParsedURL2(frame.url);
        let urlPath = parsedURL.host;
        if (parsedURL.port) {
          urlPath += ":" + parsedURL.port;
        }
        urlPath += parsedURL.folderPathComponents;
        if (!urlPath.endsWith("/")) {
          urlPath += "/";
        }
        return urlPath;
      }
      viaInspectorResourceURL() {
        return `inspector://${this.getFrameURLPath()}inspector-stylesheet#${this.id}`;
      }
      lineNumberInSource(lineNumberInStyleSheet) {
        return this.startLine + lineNumberInStyleSheet;
      }
      columnNumberInSource(lineNumberInStyleSheet, columnNumberInStyleSheet) {
        return (lineNumberInStyleSheet ? 0 : this.startColumn) + columnNumberInStyleSheet;
      }
      containsLocation(lineNumber, columnNumber) {
        const afterStart = lineNumber === this.startLine && columnNumber >= this.startColumn || lineNumber > this.startLine;
        const beforeEnd = lineNumber < this.endLine || lineNumber === this.endLine && columnNumber <= this.endColumn;
        return afterStart && beforeEnd;
      }
      contentURL() {
        return this.resourceURL();
      }
      contentType() {
        return resourceTypes.Stylesheet;
      }
      async requestContentData() {
        const cssText = await this.#cssModel.getStyleSheetText(this.id);
        if (cssText === null) {
          return { error: i18nString$O(UIStrings$15.thereWasAnErrorRetrievingThe) };
        }
        return new ContentData(cssText, false, "text/css");
      }
      async searchInContent(query, caseSensitive, isRegex) {
        const contentData = await this.requestContentData();
        return performSearchInContentData(contentData, query, caseSensitive, isRegex);
      }
      isViaInspector() {
        return this.origin === "inspector";
      }
      createPageResourceLoadInitiator() {
        return {
          target: this.#cssModel.target(),
          frameId: this.frameId,
          initiatorUrl: this.hasSourceURL ? EmptyUrlString : this.sourceURL
        };
      }
      debugId() {
        return null;
      }
    };
    registeredModels = /* @__PURE__ */ new Map();
    SDKModel = class extends ObjectWrapper {
      #target;
      constructor(target) {
        super();
        this.#target = target;
      }
      target() {
        return this.#target;
      }
      async preSuspendModel(_reason) {
      }
      async suspendModel(_reason) {
      }
      async resumeModel() {
      }
      async postResumeModel() {
      }
      dispose() {
      }
      static register(modelClass, registrationInfo) {
        if (registrationInfo.early && !registrationInfo.autostart) {
          throw new Error(`Error registering model ${modelClass.name}: early models must be autostarted.`);
        }
        registeredModels.set(modelClass, registrationInfo);
      }
      static get registeredModels() {
        return registeredModels;
      }
    };
    IOModel = class extends SDKModel {
      async read(handle, size, offset) {
        const result = await this.target().ioAgent().invoke_read({ handle, offset, size });
        if (result.getError()) {
          throw new Error(result.getError());
        }
        if (result.eof) {
          return null;
        }
        if (result.base64Encoded) {
          return decode$1(result.data);
        }
        return result.data;
      }
      async close(handle) {
        await this.target().ioAgent().invoke_close({ handle });
      }
      async resolveBlob(objectOrObjectId) {
        const objectId = objectOrObjectId instanceof RemoteObject$1 ? objectOrObjectId.objectId : objectOrObjectId;
        if (!objectId) {
          throw new Error("Remote object has undefined objectId");
        }
        const result = await this.target().ioAgent().invoke_resolveBlob({ objectId });
        if (result.getError()) {
          throw new Error(result.getError());
        }
        return `blob:${result.uuid}`;
      }
      async readToString(handle) {
        const strings = [];
        const decoder = new TextDecoder();
        for (; ; ) {
          const data32 = await this.read(handle, 1024 * 1024);
          if (data32 === null) {
            strings.push(decoder.decode());
            break;
          }
          if (data32 instanceof Uint8Array) {
            strings.push(decoder.decode(data32, { stream: true }));
          } else {
            strings.push(data32);
          }
        }
        return strings.join("");
      }
      async readToBuffer(handle) {
        const items2 = [];
        for (; ; ) {
          const data32 = await this.read(handle, 1024 * 1024);
          if (data32 === null) {
            break;
          }
          if (data32 instanceof Uint8Array) {
            items2.push(data32);
          } else {
            throw new Error("Unexpected stream data type: expected binary, got a string");
          }
        }
        let length = 0;
        for (const item of items2) {
          length += item.length;
        }
        const result = new Uint8Array(length);
        let offset = 0;
        for (const item of items2) {
          result.set(item, offset);
          offset += item.length;
        }
        return result;
      }
    };
    SDKModel.register(IOModel, { capabilities: 131072, autostart: true });
    OPAQUE_PARTITION_KEY = "<opaque>";
    Cookie = class _Cookie {
      #name;
      #value;
      #type;
      #attributes = /* @__PURE__ */ new Map();
      #size = 0;
      #priority;
      #cookieLine = null;
      #partitionKey;
      constructor(name, value, type2, priority, partitionKey) {
        this.#name = name;
        this.#value = value;
        this.#type = type2;
        this.#priority = priority || "Medium";
        this.#partitionKey = partitionKey;
      }
      static fromProtocolCookie(protocolCookie) {
        const cookie = new _Cookie(protocolCookie.name, protocolCookie.value, null, protocolCookie.priority);
        cookie.addAttribute("domain", protocolCookie["domain"]);
        cookie.addAttribute("path", protocolCookie["path"]);
        if (protocolCookie["expires"]) {
          cookie.addAttribute("expires", protocolCookie["expires"] * 1e3);
        }
        if (protocolCookie["httpOnly"]) {
          cookie.addAttribute("http-only");
        }
        if (protocolCookie["secure"]) {
          cookie.addAttribute("secure");
        }
        if (protocolCookie["sameSite"]) {
          cookie.addAttribute("same-site", protocolCookie["sameSite"]);
        }
        if ("sourcePort" in protocolCookie) {
          cookie.addAttribute("source-port", protocolCookie.sourcePort);
        }
        if ("sourceScheme" in protocolCookie) {
          cookie.addAttribute("source-scheme", protocolCookie.sourceScheme);
        }
        if ("partitionKey" in protocolCookie) {
          if (protocolCookie.partitionKey) {
            cookie.setPartitionKey(protocolCookie.partitionKey.topLevelSite, protocolCookie.partitionKey.hasCrossSiteAncestor);
          }
        }
        if ("partitionKeyOpaque" in protocolCookie && protocolCookie.partitionKeyOpaque) {
          cookie.addAttribute("partition-key", OPAQUE_PARTITION_KEY);
        }
        cookie.setSize(protocolCookie["size"]);
        return cookie;
      }
      key() {
        return (this.domain() || "-") + " " + this.name() + " " + (this.path() || "-") + " " + (this.partitionKey() ? this.topLevelSite() + " " + (this.hasCrossSiteAncestor() ? "cross_site" : "same_site") : "-");
      }
      name() {
        return this.#name;
      }
      value() {
        return this.#value;
      }
      type() {
        return this.#type;
      }
      httpOnly() {
        return this.#attributes.has("http-only");
      }
      secure() {
        return this.#attributes.has("secure");
      }
      partitioned() {
        return this.#attributes.has("partitioned") || Boolean(this.partitionKey()) || this.partitionKeyOpaque();
      }
      sameSite() {
        return this.#attributes.get("same-site");
      }
      partitionKey() {
        return this.#partitionKey;
      }
      setPartitionKey(topLevelSite, hasCrossSiteAncestor) {
        this.#partitionKey = { topLevelSite, hasCrossSiteAncestor };
        if (!this.#attributes.has("partitioned")) {
          this.addAttribute("partitioned");
        }
      }
      topLevelSite() {
        if (!this.#partitionKey) {
          return "";
        }
        return this.#partitionKey?.topLevelSite;
      }
      setTopLevelSite(topLevelSite, hasCrossSiteAncestor) {
        this.setPartitionKey(topLevelSite, hasCrossSiteAncestor);
      }
      hasCrossSiteAncestor() {
        if (!this.#partitionKey) {
          return false;
        }
        return this.#partitionKey?.hasCrossSiteAncestor;
      }
      setHasCrossSiteAncestor(hasCrossSiteAncestor) {
        if (!this.partitionKey() || !Boolean(this.topLevelSite())) {
          return;
        }
        this.setPartitionKey(this.topLevelSite(), hasCrossSiteAncestor);
      }
      partitionKeyOpaque() {
        if (!this.#partitionKey) {
          return false;
        }
        return this.topLevelSite() === OPAQUE_PARTITION_KEY;
      }
      setPartitionKeyOpaque() {
        this.addAttribute("partition-key", OPAQUE_PARTITION_KEY);
        this.setPartitionKey(OPAQUE_PARTITION_KEY, false);
      }
      priority() {
        return this.#priority;
      }
      session() {
        return !(this.#attributes.has("expires") || this.#attributes.has("max-age"));
      }
      path() {
        return this.#attributes.get("path");
      }
      domain() {
        return this.#attributes.get("domain");
      }
      expires() {
        return this.#attributes.get("expires");
      }
      maxAge() {
        return this.#attributes.get("max-age");
      }
      sourcePort() {
        return this.#attributes.get("source-port");
      }
      sourceScheme() {
        return this.#attributes.get("source-scheme");
      }
      size() {
        return this.#size;
      }
      url() {
        if (!this.domain() || !this.path()) {
          return null;
        }
        let port = "";
        const sourcePort = this.sourcePort();
        if (sourcePort && sourcePort !== 80 && sourcePort !== 443) {
          port = `:${this.sourcePort()}`;
        }
        return (this.secure() ? "https://" : "http://") + this.domain() + port + this.path();
      }
      setSize(size) {
        this.#size = size;
      }
      expiresDate(requestDate) {
        if (this.maxAge()) {
          return new Date(requestDate.getTime() + 1e3 * this.maxAge());
        }
        if (this.expires()) {
          return new Date(this.expires());
        }
        return null;
      }
      addAttribute(key, value) {
        if (!key) {
          return;
        }
        switch (key) {
          case "priority":
            this.#priority = value;
            break;
          default:
            this.#attributes.set(key, value);
        }
      }
      hasAttribute(key) {
        return this.#attributes.has(key);
      }
      getAttribute(key) {
        return this.#attributes.get(key);
      }
      setCookieLine(cookieLine) {
        this.#cookieLine = cookieLine;
      }
      getCookieLine() {
        return this.#cookieLine;
      }
      matchesSecurityOrigin(securityOrigin) {
        const hostname2 = new URL(securityOrigin).hostname;
        return _Cookie.isDomainMatch(this.domain(), hostname2);
      }
      static isDomainMatch(domain, hostname2) {
        if (hostname2 === domain) {
          return true;
        }
        if (domain?.[0] !== ".") {
          return false;
        }
        if (domain.substr(1) === hostname2) {
          return true;
        }
        return hostname2.length > domain.length && hostname2.endsWith(domain);
      }
    };
    CookieModel = class extends SDKModel {
      #blockedCookies = /* @__PURE__ */ new Map();
      #cookieToBlockedReasons = /* @__PURE__ */ new Map();
      #refreshThrottler = new Throttler(300);
      #cookies = /* @__PURE__ */ new Map();
      constructor(target) {
        super(target);
        target.model(ResourceTreeModel)?.addEventListener(Events$6.PrimaryPageChanged, this.#onPrimaryPageChanged, this);
        target.model(NetworkManager2)?.addEventListener(Events$c.ResponseReceived, this.#onResponseReceived, this);
        target.model(NetworkManager2)?.addEventListener(Events$c.LoadingFinished, this.#onLoadingFinished, this);
      }
      addBlockedCookie(cookie, blockedReasons) {
        const key = cookie.key();
        const previousCookie = this.#blockedCookies.get(key);
        this.#blockedCookies.set(key, cookie);
        if (blockedReasons) {
          this.#cookieToBlockedReasons.set(cookie, blockedReasons);
        } else {
          this.#cookieToBlockedReasons.delete(cookie);
        }
        if (previousCookie) {
          this.#cookieToBlockedReasons.delete(previousCookie);
        }
      }
      removeBlockedCookie(cookie) {
        this.#blockedCookies.delete(cookie.key());
      }
      async #onPrimaryPageChanged() {
        this.#blockedCookies.clear();
        this.#cookieToBlockedReasons.clear();
        await this.#refresh();
      }
      getCookieToBlockedReasonsMap() {
        return this.#cookieToBlockedReasons;
      }
      async #getCookies(urls) {
        const networkAgent = this.target().networkAgent();
        const newCookies = new Map(await Promise.all(urls.keysArray().map((domain) => networkAgent.invoke_getCookies({ urls: [...urls.get(domain).values()] }).then(({ cookies }) => [domain, cookies.map(Cookie.fromProtocolCookie)]))));
        const updated = this.#isUpdated(newCookies);
        this.#cookies = newCookies;
        if (updated) {
          this.dispatchEventToListeners("CookieListUpdated");
        }
      }
      async deleteCookie(cookie) {
        await this.deleteCookies([cookie]);
      }
      async clear(domain, securityOrigin) {
        if (!this.#isRefreshing()) {
          await this.#refreshThrottled();
        }
        const cookies = domain ? this.#cookies.get(domain) || [] : [...this.#cookies.values()].flat();
        cookies.push(...this.#blockedCookies.values());
        if (securityOrigin) {
          const cookiesToDelete = cookies.filter((cookie) => {
            return cookie.matchesSecurityOrigin(securityOrigin);
          });
          await this.deleteCookies(cookiesToDelete);
        } else {
          await this.deleteCookies(cookies);
        }
      }
      async saveCookie(cookie) {
        let domain = cookie.domain();
        if (!domain.startsWith(".")) {
          domain = "";
        }
        let expires = void 0;
        if (cookie.expires()) {
          expires = Math.floor(Date.parse(`${cookie.expires()}`) / 1e3);
        }
        const enabled = experiments.isEnabled(ExperimentName.EXPERIMENTAL_COOKIE_FEATURES);
        const preserveUnset = (scheme) => scheme === "Unset" ? scheme : void 0;
        const protocolCookie = {
          name: cookie.name(),
          value: cookie.value(),
          url: cookie.url() || void 0,
          domain,
          path: cookie.path(),
          secure: cookie.secure(),
          httpOnly: cookie.httpOnly(),
          sameSite: cookie.sameSite(),
          expires,
          priority: cookie.priority(),
          partitionKey: cookie.partitionKey(),
          sourceScheme: enabled ? cookie.sourceScheme() : preserveUnset(cookie.sourceScheme()),
          sourcePort: enabled ? cookie.sourcePort() : void 0
        };
        const response = await this.target().networkAgent().invoke_setCookie(protocolCookie);
        const error = response.getError();
        if (error || !response.success) {
          return false;
        }
        await this.#refreshThrottled();
        return response.success;
      }
      async getCookiesForDomain(domain, forceUpdate) {
        if (!this.#isRefreshing() || forceUpdate) {
          await this.#refreshThrottled();
        }
        const normalCookies = this.#cookies.get(domain) || [];
        return normalCookies.concat(Array.from(this.#blockedCookies.values()));
      }
      async deleteCookies(cookies) {
        const networkAgent = this.target().networkAgent();
        this.#blockedCookies.clear();
        this.#cookieToBlockedReasons.clear();
        await Promise.all(cookies.map((cookie) => networkAgent.invoke_deleteCookies({
          name: cookie.name(),
          domain: cookie.domain(),
          path: cookie.path(),
          partitionKey: cookie.partitionKey()
        })));
        await this.#refreshThrottled();
      }
      #isRefreshing() {
        return Boolean(this.listeners?.size);
      }
      #isUpdated(newCookies) {
        if (newCookies.size !== this.#cookies.size) {
          return true;
        }
        for (const [domain, newDomainCookies] of newCookies) {
          if (!this.#cookies.has(domain)) {
            return true;
          }
          const oldDomainCookies = this.#cookies.get(domain) || [];
          if (newDomainCookies.length !== oldDomainCookies.length) {
            return true;
          }
          const comparisonKey = (c) => c.key() + " " + c.value();
          const oldDomainCookieKeys = new Set(oldDomainCookies.map(comparisonKey));
          for (const newCookie of newDomainCookies) {
            if (!oldDomainCookieKeys.has(comparisonKey(newCookie))) {
              return true;
            }
          }
        }
        return false;
      }
      #refreshThrottled() {
        return this.#refreshThrottler.schedule(() => this.#refresh());
      }
      #refresh() {
        const resourceURLs = new Multimap2();
        function populateResourceURLs(resource) {
          const documentURL = ParsedURL2.fromString(resource.documentURL);
          if (documentURL) {
            resourceURLs.set(documentURL.securityOrigin(), resource.url);
          }
          return false;
        }
        const resourceTreeModel = this.target().model(ResourceTreeModel);
        if (resourceTreeModel) {
          const unreachableUrl = resourceTreeModel.mainFrame?.unreachableUrl();
          if (unreachableUrl) {
            const documentURL = ParsedURL2.fromString(unreachableUrl);
            if (documentURL) {
              resourceURLs.set(documentURL.securityOrigin(), unreachableUrl);
            }
          }
          resourceTreeModel.forAllResources(populateResourceURLs);
        }
        return this.#getCookies(resourceURLs);
      }
      #onResponseReceived() {
        if (this.#isRefreshing()) {
          void this.#refreshThrottled();
        }
      }
      #onLoadingFinished() {
        if (this.#isRefreshing()) {
          void this.#refreshThrottled();
        }
      }
    };
    SDKModel.register(CookieModel, { capabilities: 16, autostart: false });
    CookieParser = class _CookieParser {
      #domain;
      #cookies;
      #input;
      #originalInputLength;
      #lastCookie;
      #lastCookieLine;
      #lastCookiePosition;
      constructor(domain) {
        if (domain) {
          this.#domain = domain.toLowerCase().replace(/^\./, "");
        }
        this.#cookies = [];
        this.#originalInputLength = 0;
      }
      static parseSetCookie(header, domain) {
        return new _CookieParser(domain).parseSetCookie(header);
      }
      getCookieAttribute(header) {
        if (!header) {
          return null;
        }
        switch (header.toLowerCase()) {
          case "domain":
            return "domain";
          case "expires":
            return "expires";
          case "max-age":
            return "max-age";
          case "httponly":
            return "http-only";
          case "name":
            return "name";
          case "path":
            return "path";
          case "samesite":
            return "same-site";
          case "secure":
            return "secure";
          case "value":
            return "value";
          case "priority":
            return "priority";
          case "sourceport":
            return "source-port";
          case "sourcescheme":
            return "source-scheme";
          case "partitioned":
            return "partitioned";
          default:
            console.error("Failed getting cookie attribute: " + header);
            return null;
        }
      }
      cookies() {
        return this.#cookies;
      }
      parseSetCookie(setCookieHeader) {
        if (!this.initialize(setCookieHeader)) {
          return null;
        }
        for (let kv = this.extractKeyValue(); kv; kv = this.extractKeyValue()) {
          if (this.#lastCookie) {
            this.#lastCookie.addAttribute(this.getCookieAttribute(kv.key), kv.value);
          } else {
            this.addCookie(kv, 1);
          }
          if (this.advanceAndCheckCookieDelimiter()) {
            this.flushCookie();
          }
        }
        this.flushCookie();
        return this.#cookies;
      }
      initialize(headerValue) {
        this.#input = headerValue;
        if (typeof headerValue !== "string") {
          return false;
        }
        this.#cookies = [];
        this.#lastCookie = null;
        this.#lastCookieLine = "";
        this.#originalInputLength = this.#input.length;
        return true;
      }
      flushCookie() {
        if (this.#lastCookie) {
          this.#lastCookie.setSize(this.#originalInputLength - this.#input.length - this.#lastCookiePosition);
          this.#lastCookie.setCookieLine(this.#lastCookieLine.replace("\n", ""));
        }
        this.#lastCookie = null;
        this.#lastCookieLine = "";
      }
      extractKeyValue() {
        if (!this.#input || !this.#input.length) {
          return null;
        }
        const keyValueMatch = /^[ \t]*([^=;\n]+)[ \t]*(?:=[ \t]*([^;\n]*))?/.exec(this.#input);
        if (!keyValueMatch) {
          console.error("Failed parsing cookie header before: " + this.#input);
          return null;
        }
        const result = new KeyValue(keyValueMatch[1]?.trim(), keyValueMatch[2]?.trim(), this.#originalInputLength - this.#input.length);
        this.#lastCookieLine += keyValueMatch[0];
        this.#input = this.#input.slice(keyValueMatch[0].length);
        return result;
      }
      advanceAndCheckCookieDelimiter() {
        if (!this.#input) {
          return false;
        }
        const match = /^\s*[\n;]\s*/.exec(this.#input);
        if (!match) {
          return false;
        }
        this.#lastCookieLine += match[0];
        this.#input = this.#input.slice(match[0].length);
        return match[0].match("\n") !== null;
      }
      addCookie(keyValue, type2) {
        if (this.#lastCookie) {
          this.#lastCookie.setSize(keyValue.position - this.#lastCookiePosition);
        }
        this.#lastCookie = typeof keyValue.value === "string" ? new Cookie(keyValue.key, keyValue.value, type2) : new Cookie("", keyValue.key, type2);
        if (this.#domain) {
          this.#lastCookie.addAttribute("domain", this.#domain);
        }
        this.#lastCookiePosition = keyValue.position;
        this.#cookies.push(this.#lastCookie);
      }
    };
    KeyValue = class {
      key;
      value;
      position;
      constructor(key, value, position) {
        this.key = key;
        this.value = value;
        this.position = position;
      }
    };
    ServerSentEventsParser = class {
      #onEventCallback;
      #decoder;
      #isRecognizingCrLf = false;
      #line = "";
      #id = "";
      #data = "";
      #eventType = "";
      constructor(callback, encodingLabel) {
        this.#onEventCallback = callback;
        this.#decoder = new Base64TextDecoder(this.#onTextChunk.bind(this), encodingLabel);
      }
      async addBase64Chunk(raw) {
        await this.#decoder.addBase64Chunk(raw);
      }
      addTextChunk(chunk) {
        this.#onTextChunk(chunk);
      }
      #onTextChunk(chunk) {
        let start = 0;
        for (let i = 0; i < chunk.length; ++i) {
          if (this.#isRecognizingCrLf && chunk[i] === "\n") {
            this.#isRecognizingCrLf = false;
            ++start;
            continue;
          }
          this.#isRecognizingCrLf = false;
          if (chunk[i] === "\r" || chunk[i] === "\n") {
            this.#line += chunk.substring(start, i);
            this.#parseLine();
            this.#line = "";
            start = i + 1;
            this.#isRecognizingCrLf = chunk[i] === "\r";
          }
        }
        this.#line += chunk.substring(start);
      }
      #parseLine() {
        if (this.#line.length === 0) {
          if (this.#data.length > 0) {
            const data32 = this.#data.slice(0, -1);
            this.#onEventCallback(this.#eventType || "message", data32, this.#id);
            this.#data = "";
          }
          this.#eventType = "";
          return;
        }
        let fieldNameEnd = this.#line.indexOf(":");
        let fieldValueStart;
        if (fieldNameEnd < 0) {
          fieldNameEnd = this.#line.length;
          fieldValueStart = fieldNameEnd;
        } else {
          fieldValueStart = fieldNameEnd + 1;
          if (fieldValueStart < this.#line.length && this.#line[fieldValueStart] === " ") {
            ++fieldValueStart;
          }
        }
        const fieldName = this.#line.substring(0, fieldNameEnd);
        if (fieldName === "event") {
          this.#eventType = this.#line.substring(fieldValueStart);
          return;
        }
        if (fieldName === "data") {
          this.#data += this.#line.substring(fieldValueStart);
          this.#data += "\n";
        }
        if (fieldName === "id") {
          this.#id = this.#line.substring(fieldValueStart);
        }
      }
    };
    Base64TextDecoder = class {
      #decoder;
      #writer;
      constructor(onTextChunk, encodingLabel) {
        this.#decoder = new TextDecoderStream(encodingLabel);
        this.#writer = this.#decoder.writable.getWriter();
        void this.#decoder.readable.pipeTo(new WritableStream({ write: onTextChunk }));
      }
      async addBase64Chunk(chunk) {
        const binString = window.atob(chunk);
        const bytes2 = Uint8Array.from(binString, (m) => m.codePointAt(0));
        await this.#writer.ready;
        await this.#writer.write(bytes2);
      }
    };
    ServerSentEvents = class {
      #request;
      #parser;
      #lastDataReceivedTime = 0;
      #eventSourceMessages = [];
      constructor(request3, parseFromStreamedData) {
        this.#request = request3;
        if (parseFromStreamedData) {
          this.#lastDataReceivedTime = request3.pseudoWallTime(request3.startTime);
          this.#parser = new ServerSentEventsParser(this.#onParserEvent.bind(this), request3.charset() ?? void 0);
          void this.#request.requestStreamingContent().then((streamingContentData) => {
            if (!isError(streamingContentData)) {
              void this.#parser?.addBase64Chunk(streamingContentData.content().base64);
              streamingContentData.addEventListener("ChunkAdded", ({ data: { chunk } }) => {
                this.#lastDataReceivedTime = request3.pseudoWallTime(request3.endTime);
                void this.#parser?.addBase64Chunk(chunk);
              });
            }
          });
        }
      }
      get eventSourceMessages() {
        return this.#eventSourceMessages;
      }
      onProtocolEventSourceMessageReceived(eventName, data32, eventId, time2) {
        this.#recordMessageAndDispatchEvent({
          eventName,
          eventId,
          data: data32,
          time: time2
        });
      }
      #onParserEvent(eventName, data32, eventId) {
        this.#recordMessageAndDispatchEvent({
          eventName,
          eventId,
          data: data32,
          time: this.#lastDataReceivedTime
        });
      }
      #recordMessageAndDispatchEvent(message) {
        this.#eventSourceMessages.push(message);
        this.#request.dispatchEventToListeners(Events$d.EVENT_SOURCE_MESSAGE_ADDED, message);
      }
    };
    UIStrings$14 = {
      deprecatedSyntaxFoundPleaseUse: 'Deprecated syntax found for metric "{PH1}". Please use: <name>;dur=<duration>;desc=<description>',
      duplicateParameterSIgnored: 'Duplicate parameter "{PH1}" ignored.',
      noValueFoundForParameterS: 'No value found for parameter "{PH1}".',
      unrecognizedParameterS: 'Unrecognized parameter "{PH1}".',
      extraneousTrailingCharacters: "Extraneous trailing characters.",
      unableToParseSValueS: 'Unable to parse "{PH1}" value "{PH2}".'
    };
    str_$13 = registerUIStrings("core/sdk/ServerTiming.ts", UIStrings$14);
    i18nString$N = getLocalizedString.bind(void 0, str_$13);
    cloudflarePrefix = "(cf) ";
    cloudinaryPrefix = "(cld) ";
    ServerTiming = class _ServerTiming {
      metric;
      value;
      description;
      constructor(metric, value, description2) {
        this.metric = metric;
        this.value = value;
        this.description = description2;
      }
      static parseHeaders(headers) {
        const rawServerTimingHeaders = headers.filter((item) => item.name.toLowerCase() === "server-timing");
        if (!rawServerTimingHeaders.length) {
          return null;
        }
        const serverTimings = rawServerTimingHeaders.reduce((timings, header) => {
          const timing = this.createFromHeaderValue(header.value);
          timings.push(...timing.map(function(entry) {
            return new _ServerTiming(entry.name, entry.dur ?? null, entry.desc ?? "");
          }));
          return timings;
        }, []);
        return serverTimings;
      }
      static createFromHeaderValue(valueString) {
        function trimLeadingWhiteSpace() {
          valueString = valueString.replace(/^\s*/, "");
        }
        function consumeDelimiter(char) {
          console.assert(char.length === 1);
          trimLeadingWhiteSpace();
          if (valueString.charAt(0) !== char) {
            return false;
          }
          valueString = valueString.substring(1);
          return true;
        }
        function consumeToken() {
          const result2 = /^(?:\s*)([\w!#$%&'*+\-.^`|~]+)(?:\s*)(.*)/.exec(valueString);
          if (!result2) {
            return null;
          }
          valueString = result2[2];
          return result2[1];
        }
        function consumeTokenOrQuotedString() {
          trimLeadingWhiteSpace();
          if (valueString.charAt(0) === '"') {
            return consumeQuotedString();
          }
          return consumeToken();
        }
        function consumeQuotedString() {
          console.assert(valueString.charAt(0) === '"');
          valueString = valueString.substring(1);
          let value = "";
          while (valueString.length) {
            const result2 = /^([^"\\]*)(.*)/.exec(valueString);
            if (!result2) {
              return null;
            }
            value += result2[1];
            if (result2[2].charAt(0) === '"') {
              valueString = result2[2].substring(1);
              return value;
            }
            console.assert(result2[2].charAt(0) === "\\");
            value += result2[2].charAt(1);
            valueString = result2[2].substring(2);
          }
          return null;
        }
        function consumeExtraneous() {
          const result2 = /([,;].*)/.exec(valueString);
          if (result2) {
            valueString = result2[1];
          }
        }
        const result = [];
        let name;
        while ((name = consumeToken()) !== null) {
          const entry = { name };
          if (valueString.charAt(0) === "=") {
            this.showWarning(i18nString$N(UIStrings$14.deprecatedSyntaxFoundPleaseUse, { PH1: name }));
          }
          while (consumeDelimiter(";")) {
            let paramName;
            if ((paramName = consumeToken()) === null) {
              continue;
            }
            paramName = paramName.toLowerCase();
            const parseParameter = this.getParserForParameter(paramName);
            let paramValue = null;
            if (consumeDelimiter("=")) {
              paramValue = consumeTokenOrQuotedString();
              consumeExtraneous();
            }
            if (parseParameter) {
              if (entry.hasOwnProperty(paramName)) {
                this.showWarning(i18nString$N(UIStrings$14.duplicateParameterSIgnored, { PH1: paramName }));
                continue;
              }
              if (paramValue === null) {
                this.showWarning(i18nString$N(UIStrings$14.noValueFoundForParameterS, { PH1: paramName }));
              }
              parseParameter.call(this, entry, paramValue);
            } else {
              this.showWarning(i18nString$N(UIStrings$14.unrecognizedParameterS, { PH1: paramName }));
            }
          }
          result.push(entry);
          if (entry.name === "cfL4" && entry.desc) {
            new URLSearchParams(entry.desc).entries().forEach(([key, val]) => {
              result.push({ name: `${cloudflarePrefix}${key}`, desc: val });
            });
          }
          if (entry.name === "content-info" && entry.desc) {
            new URLSearchParams(entry.desc.replace(/,/g, "&")).entries().forEach(([key, val]) => {
              result.push({ name: `${cloudinaryPrefix}${key}`, desc: val });
            });
          }
          if (!consumeDelimiter(",")) {
            break;
          }
        }
        if (valueString.length) {
          this.showWarning(i18nString$N(UIStrings$14.extraneousTrailingCharacters));
        }
        return result;
      }
      static getParserForParameter(paramName) {
        switch (paramName) {
          case "dur": {
            let durParser = function(entry, paramValue) {
              entry.dur = 0;
              if (paramValue !== null) {
                const duration2 = parseFloat(paramValue);
                if (isNaN(duration2)) {
                  _ServerTiming.showWarning(i18nString$N(UIStrings$14.unableToParseSValueS, { PH1: paramName, PH2: paramValue }));
                  return;
                }
                entry.dur = duration2;
              }
            };
            return durParser;
          }
          case "desc": {
            let descParser = function(entry, paramValue) {
              entry.desc = paramValue || "";
            };
            return descParser;
          }
          default: {
            return null;
          }
        }
      }
      static showWarning(msg) {
        Console.instance().warn(`ServerTiming: ${msg}`);
      }
    };
    Target2 = class extends TargetBase {
      #targetManager;
      #name;
      #inspectedURL = EmptyUrlString;
      #inspectedURLName = "";
      #capabilitiesMask;
      #type;
      #parentTarget;
      #id;
      #modelByConstructor = /* @__PURE__ */ new Map();
      #isSuspended;
      #hasCrashed = false;
      #targetInfo;
      #creatingModels;
      constructor(targetManager, id2, name, type2, parentTarget, sessionId, suspended, connection, targetInfo) {
        super(parentTarget, sessionId, connection);
        this.#targetManager = targetManager;
        this.#name = name;
        this.#capabilitiesMask = 0;
        switch (type2) {
          case Type$2.FRAME:
            this.#capabilitiesMask = 1 | 8192 | 2 | 4 | 8 | 16 | 32 | 128 | 256 | 1024 | 2048 | 32768 | 65536 | 131072 | 262144 | 524288 | 1048576;
            if (parentTarget?.type() !== Type$2.FRAME) {
              this.#capabilitiesMask |= 4096 | 64 | 512 | 16384;
              if (schemeIs2(targetInfo?.url, "chrome-extension:")) {
                this.#capabilitiesMask &= -513;
              }
            }
            break;
          case Type$2.ServiceWorker:
            this.#capabilitiesMask = 4 | 8 | 16 | 32 | 2048 | 131072 | 524288;
            if (parentTarget?.type() !== Type$2.FRAME) {
              this.#capabilitiesMask |= 1;
            }
            break;
          case Type$2.SHARED_WORKER:
            this.#capabilitiesMask = 4 | 8 | 16 | 32 | 131072 | 262144 | 2048 | 524288;
            if (parentTarget?.type() !== Type$2.FRAME) {
              this.#capabilitiesMask |= 8192;
            }
            break;
          case Type$2.SHARED_STORAGE_WORKLET:
            this.#capabilitiesMask = 4 | 8 | 2048 | 524288;
            break;
          case Type$2.Worker:
            this.#capabilitiesMask = 4 | 8 | 16 | 32 | 131072 | 262144 | 256 | 524288;
            if (parentTarget?.type() !== Type$2.FRAME) {
              this.#capabilitiesMask |= 8192;
            }
            break;
          case Type$2.WORKLET:
            this.#capabilitiesMask = 4 | 8 | 524288 | 16;
            break;
          case Type$2.NODE:
            this.#capabilitiesMask = 4 | 16 | 32 | 131072 | 1048576;
            break;
          case Type$2.AUCTION_WORKLET:
            this.#capabilitiesMask = 4 | 524288;
            break;
          case Type$2.BROWSER:
            this.#capabilitiesMask = 32 | 131072;
            break;
          case Type$2.TAB:
            this.#capabilitiesMask = 32 | 128;
            break;
          case Type$2.NODE_WORKER:
            this.#capabilitiesMask = 4 | 16 | 32 | 131072;
        }
        this.#type = type2;
        this.#parentTarget = parentTarget;
        this.#id = id2;
        this.#isSuspended = suspended;
        this.#targetInfo = targetInfo;
      }
      createModels(models) {
        this.#creatingModels = true;
        for (const model3 of models) {
          this.model(model3);
        }
        this.#creatingModels = false;
      }
      id() {
        return this.#id;
      }
      name() {
        return this.#name || this.#inspectedURLName;
      }
      setName(name) {
        if (this.#name === name) {
          return;
        }
        this.#name = name;
        this.#targetManager.onNameChange(this);
      }
      type() {
        return this.#type;
      }
      markAsNodeJSForTest() {
        this.#type = Type$2.NODE;
      }
      targetManager() {
        return this.#targetManager;
      }
      hasAllCapabilities(capabilitiesMask) {
        return (this.#capabilitiesMask & capabilitiesMask) === capabilitiesMask;
      }
      decorateLabel(label) {
        return this.#type === Type$2.Worker || this.#type === Type$2.ServiceWorker ? "\u2699 " + label : label;
      }
      parentTarget() {
        return this.#parentTarget;
      }
      outermostTarget() {
        let lastTarget = null;
        let currentTarget = this;
        do {
          if (currentTarget.type() !== Type$2.TAB && currentTarget.type() !== Type$2.BROWSER) {
            lastTarget = currentTarget;
          }
          currentTarget = currentTarget.parentTarget();
        } while (currentTarget);
        return lastTarget;
      }
      dispose(reason) {
        super.dispose(reason);
        this.#targetManager.removeTarget(this);
        for (const model3 of this.#modelByConstructor.values()) {
          model3.dispose();
        }
      }
      model(modelClass) {
        if (!this.#modelByConstructor.get(modelClass)) {
          const info = SDKModel.registeredModels.get(modelClass);
          if (info === void 0) {
            throw new Error("Model class is not registered");
          }
          if ((this.#capabilitiesMask & info.capabilities) === info.capabilities) {
            const model3 = new modelClass(this);
            this.#modelByConstructor.set(modelClass, model3);
            if (!this.#creatingModels) {
              this.#targetManager.modelAdded(modelClass, model3, this.#targetManager.isInScope(this));
            }
          }
        }
        return this.#modelByConstructor.get(modelClass) || null;
      }
      models() {
        return this.#modelByConstructor;
      }
      inspectedURL() {
        return this.#inspectedURL;
      }
      setInspectedURL(inspectedURL) {
        this.#inspectedURL = inspectedURL;
        const parsedURL = ParsedURL2.fromString(inspectedURL);
        this.#inspectedURLName = parsedURL ? parsedURL.lastPathComponentWithFragment() : "#" + this.#id;
        this.#targetManager.onInspectedURLChange(this);
        if (!this.#name) {
          this.#targetManager.onNameChange(this);
        }
      }
      hasCrashed() {
        return this.#hasCrashed;
      }
      setHasCrashed(isCrashed) {
        const wasCrashed = this.#hasCrashed;
        this.#hasCrashed = isCrashed;
        if (wasCrashed && !isCrashed) {
          void this.resume();
        }
      }
      async suspend(reason) {
        if (this.#isSuspended) {
          return;
        }
        this.#isSuspended = true;
        if (this.#hasCrashed) {
          return;
        }
        await Promise.all(Array.from(this.models().values(), (m) => m.preSuspendModel(reason)));
        await Promise.all(Array.from(this.models().values(), (m) => m.suspendModel(reason)));
      }
      async resume() {
        if (!this.#isSuspended) {
          return;
        }
        this.#isSuspended = false;
        if (this.#hasCrashed) {
          return;
        }
        await Promise.all(Array.from(this.models().values(), (m) => m.resumeModel()));
        await Promise.all(Array.from(this.models().values(), (m) => m.postResumeModel()));
      }
      suspended() {
        return this.#isSuspended;
      }
      updateTargetInfo(targetInfo) {
        this.#targetInfo = targetInfo;
      }
      targetInfo() {
        return this.#targetInfo;
      }
    };
    (function(Type2) {
      Type2["FRAME"] = "frame";
      Type2["ServiceWorker"] = "service-worker";
      Type2["Worker"] = "worker";
      Type2["SHARED_WORKER"] = "shared-worker";
      Type2["SHARED_STORAGE_WORKLET"] = "shared-storage-worklet";
      Type2["NODE"] = "node";
      Type2["BROWSER"] = "browser";
      Type2["AUCTION_WORKLET"] = "auction-worklet";
      Type2["WORKLET"] = "worklet";
      Type2["TAB"] = "tab";
      Type2["NODE_WORKER"] = "node-worker";
    })(Type$2 || (Type$2 = {}));
    UIStrings$13 = {
      binary: "(binary)",
      secureOnly: 'This cookie was blocked because it had the "`Secure`" attribute and the connection was not secure.',
      notOnPath: "This cookie was blocked because its path was not an exact match for or a superdirectory of the request url's path.",
      domainMismatch: "This cookie was blocked because neither did the request URL's domain exactly match the cookie's domain, nor was the request URL's domain a subdomain of the cookie's Domain attribute value.",
      sameSiteStrict: 'This cookie was blocked because it had the "`SameSite=Strict`" attribute and the request was made from a different site. This includes top-level navigation requests initiated by other sites.',
      sameSiteLax: 'This cookie was blocked because it had the "`SameSite=Lax`" attribute and the request was made from a different site and was not initiated by a top-level navigation.',
      sameSiteUnspecifiedTreatedAsLax: 'This cookie didn\'t specify a "`SameSite`" attribute when it was stored and was defaulted to "SameSite=Lax," and was blocked because the request was made from a different site and was not initiated by a top-level navigation. The cookie had to have been set with "`SameSite=None`" to enable cross-site usage.',
      sameSiteNoneInsecure: 'This cookie was blocked because it had the "`SameSite=None`" attribute but was not marked "Secure". Cookies without SameSite restrictions must be marked "Secure" and sent over a secure connection.',
      userPreferences: "This cookie was blocked due to user preferences.",
      thirdPartyPhaseout: "This cookie was blocked either because of Chrome flags or browser configuration. Learn more in the Issues panel.",
      unknownError: "An unknown error was encountered when trying to send this cookie.",
      schemefulSameSiteStrict: 'This cookie was blocked because it had the "`SameSite=Strict`" attribute but the request was cross-site. This includes top-level navigation requests initiated by other sites. This request is considered cross-site because the URL has a different scheme than the current site.',
      schemefulSameSiteLax: 'This cookie was blocked because it had the "`SameSite=Lax`" attribute but the request was cross-site and was not initiated by a top-level navigation. This request is considered cross-site because the URL has a different scheme than the current site.',
      schemefulSameSiteUnspecifiedTreatedAsLax: 'This cookie didn\'t specify a "`SameSite`" attribute when it was stored, was defaulted to "`SameSite=Lax"`, and was blocked because the request was cross-site and was not initiated by a top-level navigation. This request is considered cross-site because the URL has a different scheme than the current site.',
      nameValuePairExceedsMaxSize: "This cookie was blocked because it was too large. The combined size of the name and value must be less than or equal to 4096 characters.",
      thisSetcookieWasBlockedDueToUser: "This attempt to set a cookie via a `Set-Cookie` header was blocked due to user preferences.",
      thisSetcookieWasBlockedDueThirdPartyPhaseout: "Setting this cookie was blocked either because of Chrome flags or browser configuration. Learn more in the Issues panel.",
      thisSetcookieHadInvalidSyntax: "This `Set-Cookie` header had invalid syntax.",
      thisSetcookieHadADisallowedCharacter: "This `Set-Cookie` header contained a disallowed character (a forbidden ASCII control character, or the tab character if it appears in the middle of the cookie name, value, an attribute name, or an attribute value).",
      theSchemeOfThisConnectionIsNot: "The scheme of this connection is not allowed to store cookies.",
      anUnknownErrorWasEncounteredWhenTrying: "An unknown error was encountered when trying to store this cookie.",
      thisSetcookieWasBlockedBecauseItHadTheSamesiteStrictLax: 'This attempt to set a cookie via a `Set-Cookie` header was blocked because it had the "{PH1}" attribute but came from a cross-site response which was not the response to a top-level navigation. This response is considered cross-site because the URL has a different scheme than the current site.',
      thisSetcookieDidntSpecifyASamesite: 'This `Set-Cookie` header didn\'t specify a "`SameSite`" attribute, was defaulted to "`SameSite=Lax"`, and was blocked because it came from a cross-site response which was not the response to a top-level navigation. This response is considered cross-site because the URL has a different scheme than the current site.',
      blockedReasonSecureOnly: 'This attempt to set a cookie via a `Set-Cookie` header was blocked because it had the "Secure" attribute but was not received over a secure connection.',
      blockedReasonSameSiteStrictLax: 'This attempt to set a cookie via a `Set-Cookie` header was blocked because it had the "{PH1}" attribute but came from a cross-site response which was not the response to a top-level navigation.',
      blockedReasonSameSiteUnspecifiedTreatedAsLax: 'This `Set-Cookie` header didn\'t specify a "`SameSite`" attribute and was defaulted to "`SameSite=Lax,`" and was blocked because it came from a cross-site response which was not the response to a top-level navigation. The `Set-Cookie` had to have been set with "`SameSite=None`" to enable cross-site usage.',
      blockedReasonSameSiteNoneInsecure: 'This attempt to set a cookie via a `Set-Cookie` header was blocked because it had the "`SameSite=None`" attribute but did not have the "Secure" attribute, which is required in order to use "`SameSite=None`".',
      blockedReasonOverwriteSecure: "This attempt to set a cookie via a `Set-Cookie` header was blocked because it was not sent over a secure connection and would have overwritten a cookie with the Secure attribute.",
      blockedReasonInvalidDomain: "This attempt to set a cookie via a `Set-Cookie` header was blocked because its Domain attribute was invalid with regards to the current host url.",
      blockedReasonInvalidPrefix: 'This attempt to set a cookie via a `Set-Cookie` header was blocked because it used the "`__Secure-`" or "`__Host-`" prefix in its name and broke the additional rules applied to cookies with these prefixes as defined in `https://tools.ietf.org/html/draft-west-cookie-prefixes-05`.',
      thisSetcookieWasBlockedBecauseTheNameValuePairExceedsMaxSize: "This attempt to set a cookie via a `Set-Cookie` header was blocked because the cookie was too large. The combined size of the name and value must be less than or equal to 4096 characters.",
      setcookieHeaderIsIgnoredIn: "Set-Cookie header is ignored in response from url: {PH1}. The combined size of the name and value must be less than or equal to 4096 characters.",
      exemptionReasonUserSetting: "This cookie is allowed by user preference.",
      exemptionReasonTPCDMetadata: "This cookie is allowed by a third-party cookie deprecation trial grace period. Learn more: goo.gle/dt-grace.",
      exemptionReasonTPCDDeprecationTrial: "This cookie is allowed by third-party cookie deprecation trial. Learn more: goo.gle/ps-dt.",
      exemptionReasonTopLevelTPCDDeprecationTrial: "This cookie is allowed by top-level third-party cookie deprecation trial. Learn more: goo.gle/ps-dt.",
      exemptionReasonTPCDHeuristics: "This cookie is allowed by third-party cookie heuristics. Learn more: goo.gle/hbe",
      exemptionReasonEnterprisePolicy: "This cookie is allowed by Chrome Enterprise policy. Learn more: goo.gle/ce-3pc",
      exemptionReasonStorageAccessAPI: "This cookie is allowed by the Storage Access API. Learn more: goo.gle/saa",
      exemptionReasonTopLevelStorageAccessAPI: "This cookie is allowed by the top-level Storage Access API. Learn more: goo.gle/saa-top",
      exemptionReasonScheme: "This cookie is allowed by the top-level url scheme"
    };
    str_$12 = registerUIStrings("core/sdk/NetworkRequest.ts", UIStrings$13);
    i18nString$M = getLocalizedString.bind(void 0, str_$12);
    NetworkRequest2 = class _NetworkRequest extends ObjectWrapper {
      #requestId;
      #backendRequestId;
      #documentURL;
      #frameId;
      #loaderId;
      #hasUserGesture;
      #initiator;
      #redirectSource = null;
      #preflightRequest = null;
      #preflightInitiatorRequest = null;
      #isRedirect = false;
      #redirectDestination = null;
      #issueTime = -1;
      #startTime = -1;
      #endTime = -1;
      #blockedReason = void 0;
      #renderBlockingBehavior;
      #corsErrorStatus = void 0;
      statusCode = 0;
      statusText = "";
      requestMethod = "";
      requestTime = 0;
      protocol = "";
      alternateProtocolUsage = void 0;
      mixedContentType = "none";
      #initialPriority = null;
      #currentPriority = null;
      #signedExchangeInfo = null;
      #resourceType = resourceTypes.Other;
      #contentData = null;
      #streamingContentData = null;
      #frames = [];
      #responseHeaderValues = {};
      #responseHeadersText = "";
      #originalResponseHeaders = [];
      #sortedOriginalResponseHeaders;
      #setCookieHeaders = [];
      #requestHeaders = [];
      #requestHeaderValues = {};
      #remoteAddress = "";
      #remoteAddressSpace = "Unknown";
      #referrerPolicy = null;
      #securityState = "unknown";
      #securityDetails = null;
      connectionId = "0";
      connectionReused = false;
      hasNetworkData = false;
      #formParametersPromise = null;
      #requestFormDataPromise = Promise.resolve(null);
      #hasExtraRequestInfo = false;
      #hasExtraResponseInfo = false;
      #blockedRequestCookies = [];
      #includedRequestCookies = [];
      #blockedResponseCookies = [];
      #exemptedResponseCookies = [];
      #responseCookiesPartitionKey = null;
      #responseCookiesPartitionKeyOpaque = null;
      #deviceBoundSessionUsages = [];
      #siteHasCookieInOtherPartition = false;
      localizedFailDescription = null;
      #url;
      #responseReceivedTime;
      #transferSize;
      #finished;
      #failed;
      #canceled;
      #preserved;
      #mimeType;
      #charset;
      #parsedURL;
      #name;
      #path;
      #clientSecurityState;
      #trustTokenParams;
      #trustTokenOperationDoneEvent;
      #responseCacheStorageCacheName;
      #serviceWorkerResponseSource;
      #wallIssueTime;
      #responseRetrievalTime;
      #resourceSize;
      #fromMemoryCache;
      #fromDiskCache;
      #fromPrefetchCache;
      #fromEarlyHints;
      #fetchedViaServiceWorker;
      #serviceWorkerRouterInfo;
      #timing;
      #requestHeadersText;
      #responseHeaders;
      #earlyHintsHeaders;
      #sortedResponseHeaders;
      #responseCookies;
      #serverTimings;
      #queryString;
      #parsedQueryParameters;
      #contentDataProvider;
      #isSameSite = null;
      #wasIntercepted = false;
      #associatedData = /* @__PURE__ */ new Map();
      #hasOverriddenContent = false;
      #hasThirdPartyCookiePhaseoutIssue = false;
      #serverSentEvents;
      responseReceivedPromise;
      responseReceivedPromiseResolve;
      directSocketInfo;
      #directSocketChunks = [];
      #isAdRelated;
      #appliedNetworkConditionsId;
      constructor(requestId, backendRequestId, url, documentURL, frameId, loaderId, initiator, hasUserGesture) {
        super();
        this.#requestId = requestId;
        this.#backendRequestId = backendRequestId;
        this.setUrl(url);
        this.#documentURL = documentURL;
        this.#frameId = frameId;
        this.#loaderId = loaderId;
        this.#initiator = initiator;
        this.#hasUserGesture = hasUserGesture;
        this.#isAdRelated = false;
      }
      static create(backendRequestId, url, documentURL, frameId, loaderId, initiator, hasUserGesture) {
        return new _NetworkRequest(backendRequestId, backendRequestId, url, documentURL, frameId, loaderId, initiator, hasUserGesture);
      }
      static createForSocket(backendRequestId, requestURL, initiator) {
        return new _NetworkRequest(backendRequestId, backendRequestId, requestURL, EmptyUrlString, null, null, initiator || null);
      }
      static createWithoutBackendRequest(requestId, url, documentURL, initiator) {
        return new _NetworkRequest(requestId, void 0, url, documentURL, null, null, initiator);
      }
      identityCompare(other) {
        const thisId = this.requestId();
        const thatId = other.requestId();
        if (thisId > thatId) {
          return 1;
        }
        if (thisId < thatId) {
          return -1;
        }
        return 0;
      }
      requestId() {
        return this.#requestId;
      }
      backendRequestId() {
        return this.#backendRequestId;
      }
      url() {
        return this.#url;
      }
      isBlobRequest() {
        return schemeIs2(this.#url, "blob:");
      }
      setUrl(x) {
        if (this.#url === x) {
          return;
        }
        this.#url = x;
        this.#parsedURL = new ParsedURL2(x);
        this.#queryString = void 0;
        this.#parsedQueryParameters = void 0;
        this.#name = void 0;
        this.#path = void 0;
      }
      get documentURL() {
        return this.#documentURL;
      }
      get parsedURL() {
        return this.#parsedURL;
      }
      get frameId() {
        return this.#frameId;
      }
      get loaderId() {
        return this.#loaderId;
      }
      get appliedNetworkConditionsId() {
        return this.#appliedNetworkConditionsId;
      }
      setRemoteAddress(ip2, port) {
        this.#remoteAddress = ip2 + ":" + port;
        this.dispatchEventToListeners(Events$d.REMOTE_ADDRESS_CHANGED, this);
      }
      remoteAddress() {
        return this.#remoteAddress;
      }
      remoteAddressSpace() {
        return this.#remoteAddressSpace;
      }
      getResponseCacheStorageCacheName() {
        return this.#responseCacheStorageCacheName;
      }
      setResponseCacheStorageCacheName(x) {
        this.#responseCacheStorageCacheName = x;
      }
      serviceWorkerResponseSource() {
        return this.#serviceWorkerResponseSource;
      }
      setServiceWorkerResponseSource(serviceWorkerResponseSource) {
        this.#serviceWorkerResponseSource = serviceWorkerResponseSource;
      }
      setReferrerPolicy(referrerPolicy) {
        this.#referrerPolicy = referrerPolicy;
      }
      referrerPolicy() {
        return this.#referrerPolicy;
      }
      securityState() {
        return this.#securityState;
      }
      setSecurityState(securityState) {
        this.#securityState = securityState;
      }
      securityDetails() {
        return this.#securityDetails;
      }
      securityOrigin() {
        return this.#parsedURL.securityOrigin();
      }
      setSecurityDetails(securityDetails) {
        this.#securityDetails = securityDetails;
      }
      get startTime() {
        return this.#startTime || -1;
      }
      setIssueTime(monotonicTime, wallTime) {
        this.#issueTime = monotonicTime;
        this.#wallIssueTime = wallTime;
        this.#startTime = monotonicTime;
      }
      issueTime() {
        return this.#issueTime;
      }
      pseudoWallTime(monotonicTime) {
        return this.#wallIssueTime ? this.#wallIssueTime - this.#issueTime + monotonicTime : monotonicTime;
      }
      get responseReceivedTime() {
        return this.#responseReceivedTime || -1;
      }
      set responseReceivedTime(x) {
        this.#responseReceivedTime = x;
      }
      getResponseRetrievalTime() {
        return this.#responseRetrievalTime;
      }
      setResponseRetrievalTime(x) {
        this.#responseRetrievalTime = x;
      }
      get endTime() {
        return this.#endTime || -1;
      }
      set endTime(x) {
        if (this.timing?.requestTime) {
          this.#endTime = Math.max(x, this.responseReceivedTime);
        } else {
          this.#endTime = x;
          if (this.#responseReceivedTime > x) {
            this.#responseReceivedTime = x;
          }
        }
        this.dispatchEventToListeners(Events$d.TIMING_CHANGED, this);
      }
      get duration() {
        if (this.#endTime === -1 || this.#startTime === -1) {
          return -1;
        }
        return this.#endTime - this.#startTime;
      }
      get latency() {
        if (this.#responseReceivedTime === -1 || this.#startTime === -1) {
          return -1;
        }
        return this.#responseReceivedTime - this.#startTime;
      }
      get resourceSize() {
        return this.#resourceSize || 0;
      }
      set resourceSize(x) {
        this.#resourceSize = x;
      }
      get transferSize() {
        return this.#transferSize || 0;
      }
      increaseTransferSize(x) {
        this.#transferSize = (this.#transferSize || 0) + x;
      }
      setTransferSize(x) {
        this.#transferSize = x;
      }
      get finished() {
        return this.#finished;
      }
      set finished(x) {
        if (this.#finished === x) {
          return;
        }
        this.#finished = x;
        if (x) {
          this.dispatchEventToListeners(Events$d.FINISHED_LOADING, this);
        }
      }
      get failed() {
        return this.#failed;
      }
      set failed(x) {
        this.#failed = x;
      }
      get canceled() {
        return this.#canceled;
      }
      set canceled(x) {
        this.#canceled = x;
      }
      get preserved() {
        return this.#preserved;
      }
      set preserved(x) {
        this.#preserved = x;
      }
      blockedReason() {
        return this.#blockedReason;
      }
      setBlockedReason(reason) {
        this.#blockedReason = reason;
      }
      setRenderBlockingBehavior(renderBlocking) {
        this.#renderBlockingBehavior = renderBlocking;
      }
      renderBlockingBehavior() {
        return this.#renderBlockingBehavior;
      }
      corsErrorStatus() {
        return this.#corsErrorStatus;
      }
      setCorsErrorStatus(corsErrorStatus) {
        this.#corsErrorStatus = corsErrorStatus;
      }
      wasBlocked() {
        return Boolean(this.#blockedReason);
      }
      cached() {
        return (Boolean(this.#fromMemoryCache) || Boolean(this.#fromDiskCache)) && !this.#transferSize;
      }
      cachedInMemory() {
        return Boolean(this.#fromMemoryCache) && !this.#transferSize;
      }
      fromPrefetchCache() {
        return Boolean(this.#fromPrefetchCache);
      }
      setFromMemoryCache() {
        this.#fromMemoryCache = true;
        this.#timing = void 0;
      }
      get fromDiskCache() {
        return this.#fromDiskCache;
      }
      setFromDiskCache() {
        this.#fromDiskCache = true;
      }
      setFromPrefetchCache() {
        this.#fromPrefetchCache = true;
      }
      fromEarlyHints() {
        return Boolean(this.#fromEarlyHints);
      }
      setFromEarlyHints() {
        this.#fromEarlyHints = true;
      }
      get fetchedViaServiceWorker() {
        return Boolean(this.#fetchedViaServiceWorker);
      }
      set fetchedViaServiceWorker(x) {
        this.#fetchedViaServiceWorker = x;
      }
      get serviceWorkerRouterInfo() {
        return this.#serviceWorkerRouterInfo;
      }
      set serviceWorkerRouterInfo(x) {
        this.#serviceWorkerRouterInfo = x;
      }
      hasMatchingServiceWorkerRouter() {
        return this.#serviceWorkerRouterInfo !== void 0 && this.serviceWorkerRouterInfo?.matchedSourceType !== void 0;
      }
      initiatedByServiceWorker() {
        const networkManager = NetworkManager2.forRequest(this);
        if (!networkManager) {
          return false;
        }
        return networkManager.target().type() === Type$2.ServiceWorker;
      }
      get timing() {
        return this.#timing;
      }
      set timing(timingInfo) {
        if (!timingInfo || this.#fromMemoryCache) {
          return;
        }
        this.#startTime = timingInfo.requestTime;
        const headersReceivedTime = timingInfo.requestTime + timingInfo.receiveHeadersEnd / 1e3;
        if ((this.#responseReceivedTime || -1) < 0 || this.#responseReceivedTime > headersReceivedTime) {
          this.#responseReceivedTime = headersReceivedTime;
        }
        if (this.#startTime > this.#responseReceivedTime) {
          this.#responseReceivedTime = this.#startTime;
        }
        this.#timing = timingInfo;
        this.dispatchEventToListeners(Events$d.TIMING_CHANGED, this);
      }
      setConnectTimingFromExtraInfo(connectTiming) {
        this.#startTime = connectTiming.requestTime;
        this.dispatchEventToListeners(Events$d.TIMING_CHANGED, this);
      }
      get mimeType() {
        return this.#mimeType;
      }
      set mimeType(x) {
        this.#mimeType = x;
        if (x === "text/event-stream" && !this.#serverSentEvents) {
          const parseFromStreamedData = this.resourceType() !== resourceTypes.EventSource;
          this.#serverSentEvents = new ServerSentEvents(this, parseFromStreamedData);
        }
      }
      get displayName() {
        return this.#parsedURL.displayName;
      }
      name() {
        if (this.#name) {
          return this.#name;
        }
        this.parseNameAndPathFromURL();
        return this.#name;
      }
      path() {
        if (this.#path) {
          return this.#path;
        }
        this.parseNameAndPathFromURL();
        return this.#path;
      }
      parseNameAndPathFromURL() {
        if (this.#parsedURL.isDataURL()) {
          this.#name = this.#parsedURL.dataURLDisplayName();
          this.#path = "";
        } else if (this.#parsedURL.isBlobURL()) {
          this.#name = this.#parsedURL.url;
          this.#path = "";
        } else if (this.#parsedURL.isAboutBlank()) {
          this.#name = this.#parsedURL.url;
          this.#path = "";
        } else {
          this.#path = this.#parsedURL.host + this.#parsedURL.folderPathComponents;
          const networkManager = NetworkManager2.forRequest(this);
          const inspectedURL = networkManager ? ParsedURL2.fromString(networkManager.target().inspectedURL()) : null;
          this.#path = trimURL(this.#path, inspectedURL ? inspectedURL.host : "");
          if (this.#parsedURL.lastPathComponent || this.#parsedURL.queryParams) {
            this.#name = this.#parsedURL.lastPathComponent + (this.#parsedURL.queryParams ? "?" + this.#parsedURL.queryParams : "");
          } else if (this.#parsedURL.folderPathComponents) {
            this.#name = this.#parsedURL.folderPathComponents.substring(this.#parsedURL.folderPathComponents.lastIndexOf("/") + 1) + "/";
            this.#path = this.#path.substring(0, this.#path.lastIndexOf("/"));
          } else {
            this.#name = this.#parsedURL.host;
            this.#path = "";
          }
        }
      }
      get folder() {
        let path14 = this.#parsedURL.path;
        const indexOfQuery = path14.indexOf("?");
        if (indexOfQuery !== -1) {
          path14 = path14.substring(0, indexOfQuery);
        }
        const lastSlashIndex = path14.lastIndexOf("/");
        return lastSlashIndex !== -1 ? path14.substring(0, lastSlashIndex) : "";
      }
      get pathname() {
        return this.#parsedURL.path;
      }
      resourceType() {
        return this.#resourceType;
      }
      setResourceType(resourceType) {
        this.#resourceType = resourceType;
      }
      get domain() {
        return this.#parsedURL.host;
      }
      get scheme() {
        return this.#parsedURL.scheme;
      }
      getInferredStatusText() {
        return this.statusText || getStatusText(this.statusCode);
      }
      redirectSource() {
        return this.#redirectSource;
      }
      setRedirectSource(originatingRequest) {
        this.#redirectSource = originatingRequest;
      }
      preflightRequest() {
        return this.#preflightRequest;
      }
      setPreflightRequest(preflightRequest) {
        this.#preflightRequest = preflightRequest;
      }
      preflightInitiatorRequest() {
        return this.#preflightInitiatorRequest;
      }
      setPreflightInitiatorRequest(preflightInitiatorRequest) {
        this.#preflightInitiatorRequest = preflightInitiatorRequest;
      }
      isPreflightRequest() {
        return this.#initiator !== null && this.#initiator !== void 0 && this.#initiator.type === "preflight";
      }
      redirectDestination() {
        return this.#redirectDestination;
      }
      setRedirectDestination(redirectDestination) {
        this.#redirectDestination = redirectDestination;
      }
      requestHeaders() {
        return this.#requestHeaders;
      }
      setRequestHeaders(headers) {
        this.#requestHeaders = headers;
        this.dispatchEventToListeners(Events$d.REQUEST_HEADERS_CHANGED);
      }
      requestHeadersText() {
        return this.#requestHeadersText;
      }
      setRequestHeadersText(text) {
        this.#requestHeadersText = text;
        this.dispatchEventToListeners(Events$d.REQUEST_HEADERS_CHANGED);
      }
      requestHeaderValue(headerName) {
        if (this.#requestHeaderValues[headerName]) {
          return this.#requestHeaderValues[headerName];
        }
        this.#requestHeaderValues[headerName] = this.computeHeaderValue(this.requestHeaders(), headerName);
        return this.#requestHeaderValues[headerName];
      }
      requestFormData() {
        if (!this.#requestFormDataPromise) {
          this.#requestFormDataPromise = NetworkManager2.requestPostData(this);
        }
        return this.#requestFormDataPromise;
      }
      setRequestFormData(hasData, data32) {
        this.#requestFormDataPromise = hasData && data32 === null ? null : Promise.resolve(data32);
        this.#formParametersPromise = null;
      }
      filteredProtocolName() {
        const protocol2 = this.protocol.toLowerCase();
        if (protocol2 === "h2") {
          return "http/2.0";
        }
        return protocol2.replace(/^http\/2(\.0)?\+/, "http/2.0+");
      }
      requestHttpVersion() {
        const headersText = this.requestHeadersText();
        if (!headersText) {
          const version3 = this.requestHeaderValue("version") || this.requestHeaderValue(":version");
          if (version3) {
            return version3;
          }
          return this.filteredProtocolName();
        }
        const firstLine = headersText.split(/\r\n/)[0];
        const match = firstLine.match(/(HTTP\/\d+\.\d+)$/);
        return match ? match[1] : "HTTP/0.9";
      }
      get responseHeaders() {
        return this.#responseHeaders || [];
      }
      set responseHeaders(x) {
        this.#responseHeaders = x;
        this.#sortedResponseHeaders = void 0;
        this.#serverTimings = void 0;
        this.#responseCookies = void 0;
        this.#responseHeaderValues = {};
        this.dispatchEventToListeners(Events$d.RESPONSE_HEADERS_CHANGED);
      }
      get earlyHintsHeaders() {
        return this.#earlyHintsHeaders || [];
      }
      set earlyHintsHeaders(x) {
        this.#earlyHintsHeaders = x;
      }
      get originalResponseHeaders() {
        return this.#originalResponseHeaders;
      }
      set originalResponseHeaders(headers) {
        this.#originalResponseHeaders = headers;
        this.#sortedOriginalResponseHeaders = void 0;
      }
      get setCookieHeaders() {
        return this.#setCookieHeaders;
      }
      set setCookieHeaders(headers) {
        this.#setCookieHeaders = headers;
      }
      get responseHeadersText() {
        return this.#responseHeadersText;
      }
      set responseHeadersText(x) {
        this.#responseHeadersText = x;
        this.dispatchEventToListeners(Events$d.RESPONSE_HEADERS_CHANGED);
      }
      get sortedResponseHeaders() {
        if (this.#sortedResponseHeaders !== void 0) {
          return this.#sortedResponseHeaders;
        }
        this.#sortedResponseHeaders = this.responseHeaders.slice();
        return this.#sortedResponseHeaders.sort(function(a, b) {
          return compare(a.name.toLowerCase(), b.name.toLowerCase());
        });
      }
      get sortedOriginalResponseHeaders() {
        if (this.#sortedOriginalResponseHeaders !== void 0) {
          return this.#sortedOriginalResponseHeaders;
        }
        this.#sortedOriginalResponseHeaders = this.originalResponseHeaders.slice();
        return this.#sortedOriginalResponseHeaders.sort(function(a, b) {
          return compare(a.name.toLowerCase(), b.name.toLowerCase());
        });
      }
      get overrideTypes() {
        const types2 = [];
        if (this.hasOverriddenContent) {
          types2.push("content");
        }
        if (this.hasOverriddenHeaders()) {
          types2.push("headers");
        }
        return types2;
      }
      get hasOverriddenContent() {
        return this.#hasOverriddenContent;
      }
      set hasOverriddenContent(value) {
        this.#hasOverriddenContent = value;
      }
      #deduplicateHeaders(sortedHeaders) {
        const dedupedHeaders = [];
        for (const header of sortedHeaders) {
          if (dedupedHeaders.length && dedupedHeaders[dedupedHeaders.length - 1].name === header.name) {
            dedupedHeaders[dedupedHeaders.length - 1].value += `, ${header.value}`;
          } else {
            dedupedHeaders.push({ name: header.name, value: header.value });
          }
        }
        return dedupedHeaders;
      }
      hasOverriddenHeaders() {
        if (!this.#originalResponseHeaders.length) {
          return false;
        }
        const responseHeaders = this.#deduplicateHeaders(this.sortedResponseHeaders);
        const originalResponseHeaders = this.#deduplicateHeaders(this.sortedOriginalResponseHeaders);
        if (responseHeaders.length !== originalResponseHeaders.length) {
          return true;
        }
        for (let i = 0; i < responseHeaders.length; i++) {
          if (responseHeaders[i].name.toLowerCase() !== originalResponseHeaders[i].name.toLowerCase()) {
            return true;
          }
          if (responseHeaders[i].value !== originalResponseHeaders[i].value) {
            return true;
          }
        }
        return false;
      }
      responseHeaderValue(headerName) {
        if (headerName in this.#responseHeaderValues) {
          return this.#responseHeaderValues[headerName];
        }
        this.#responseHeaderValues[headerName] = this.computeHeaderValue(this.responseHeaders, headerName);
        return this.#responseHeaderValues[headerName];
      }
      wasIntercepted() {
        return this.#wasIntercepted;
      }
      setWasIntercepted(wasIntercepted) {
        this.#wasIntercepted = wasIntercepted;
      }
      setEarlyHintsHeaders(headers) {
        this.earlyHintsHeaders = headers;
      }
      get responseCookies() {
        if (!this.#responseCookies) {
          this.#responseCookies = CookieParser.parseSetCookie(this.responseHeaderValue("Set-Cookie"), this.domain) || [];
          if (this.#responseCookiesPartitionKey) {
            for (const cookie of this.#responseCookies) {
              if (cookie.partitioned()) {
                cookie.setPartitionKey(this.#responseCookiesPartitionKey.topLevelSite, this.#responseCookiesPartitionKey.hasCrossSiteAncestor);
              }
            }
          } else if (this.#responseCookiesPartitionKeyOpaque) {
            for (const cookie of this.#responseCookies) {
              cookie.setPartitionKeyOpaque();
            }
          }
        }
        return this.#responseCookies;
      }
      set responseCookies(responseCookies) {
        this.#responseCookies = responseCookies;
      }
      responseLastModified() {
        return this.responseHeaderValue("last-modified");
      }
      allCookiesIncludingBlockedOnes() {
        return [
          ...this.includedRequestCookies().map((includedRequestCookie) => includedRequestCookie.cookie),
          ...this.responseCookies,
          ...this.blockedRequestCookies().map((blockedRequestCookie) => blockedRequestCookie.cookie),
          ...this.blockedResponseCookies().map((blockedResponseCookie) => blockedResponseCookie.cookie)
        ].filter((v) => !!v);
      }
      get serverTimings() {
        if (typeof this.#serverTimings === "undefined") {
          this.#serverTimings = ServerTiming.parseHeaders(this.responseHeaders);
        }
        return this.#serverTimings;
      }
      queryString() {
        if (this.#queryString !== void 0) {
          return this.#queryString;
        }
        let queryString = null;
        const url = this.url();
        const questionMarkPosition = url.indexOf("?");
        if (questionMarkPosition !== -1) {
          queryString = url.substring(questionMarkPosition + 1);
          const hashSignPosition = queryString.indexOf("#");
          if (hashSignPosition !== -1) {
            queryString = queryString.substring(0, hashSignPosition);
          }
        }
        this.#queryString = queryString;
        return this.#queryString;
      }
      get queryParameters() {
        if (this.#parsedQueryParameters) {
          return this.#parsedQueryParameters;
        }
        const queryString = this.queryString();
        if (!queryString) {
          return null;
        }
        this.#parsedQueryParameters = this.parseParameters(queryString);
        return this.#parsedQueryParameters;
      }
      async parseFormParameters() {
        const requestContentType = this.requestContentType();
        if (!requestContentType) {
          return null;
        }
        if (requestContentType.match(/^application\/x-www-form-urlencoded\s*(;.*)?$/i)) {
          const formData2 = await this.requestFormData();
          if (!formData2) {
            return null;
          }
          return this.parseParameters(formData2);
        }
        const multipartDetails = requestContentType.match(/^multipart\/form-data\s*;\s*boundary\s*=\s*(\S+)\s*$/);
        if (!multipartDetails) {
          return null;
        }
        const boundary = multipartDetails[1];
        if (!boundary) {
          return null;
        }
        const formData = await this.requestFormData();
        if (!formData) {
          return null;
        }
        return this.parseMultipartFormDataParameters(formData, boundary);
      }
      formParameters() {
        if (!this.#formParametersPromise) {
          this.#formParametersPromise = this.parseFormParameters();
        }
        return this.#formParametersPromise;
      }
      responseHttpVersion() {
        const headersText = this.#responseHeadersText;
        if (!headersText) {
          const version3 = this.responseHeaderValue("version") || this.responseHeaderValue(":version");
          if (version3) {
            return version3;
          }
          return this.filteredProtocolName();
        }
        const firstLine = headersText.split(/\r\n/)[0];
        const match = firstLine.match(/^(HTTP\/\d+\.\d+)/);
        return match ? match[1] : "HTTP/0.9";
      }
      parseParameters(queryString) {
        function parseNameValue(pair) {
          const position = pair.indexOf("=");
          if (position === -1) {
            return { name: pair, value: "" };
          }
          return {
            name: pair.substring(0, position),
            value: pair.substring(position + 1)
          };
        }
        return queryString.split("&").map(parseNameValue);
      }
      parseMultipartFormDataParameters(data32, boundary) {
        const sanitizedBoundary = escapeForRegExp(boundary);
        const keyValuePattern = new RegExp(
          '^\\r\\ncontent-disposition\\s*:\\s*form-data\\s*;\\s*name="([^"]*)"(?:\\s*;\\s*filename="([^"]*)")?(?:\\r\\ncontent-type\\s*:\\s*([^\\r\\n]*))?\\r\\n\\r\\n(.*)\\r\\n$',
          "is"
        );
        const fields = data32.split(new RegExp(`--${sanitizedBoundary}(?:--s*$)?`, "g"));
        return fields.reduce(parseMultipartField, []);
        function parseMultipartField(result, field) {
          const [match, name, filename, contentType, value] = field.match(keyValuePattern) || [];
          if (!match) {
            return result;
          }
          const processedValue = filename || contentType ? i18nString$M(UIStrings$13.binary) : value;
          result.push({ name, value: processedValue });
          return result;
        }
      }
      computeHeaderValue(headers, headerName) {
        headerName = headerName.toLowerCase();
        const values = [];
        for (let i = 0; i < headers.length; ++i) {
          if (headers[i].name.toLowerCase() === headerName) {
            values.push(headers[i].value);
          }
        }
        if (!values.length) {
          return void 0;
        }
        if (headerName === "set-cookie") {
          return values.join("\n");
        }
        return values.join(", ");
      }
      requestContentData() {
        if (this.#contentData) {
          return this.#contentData;
        }
        if (this.#contentDataProvider) {
          this.#contentData = this.#contentDataProvider();
        } else {
          this.#contentData = NetworkManager2.requestContentData(this);
        }
        return this.#contentData;
      }
      setContentDataProvider(dataProvider) {
        console.assert(!this.#contentData, "contentData can only be set once.");
        this.#contentDataProvider = dataProvider;
      }
      requestStreamingContent() {
        if (this.#streamingContentData) {
          return this.#streamingContentData;
        }
        const contentPromise = this.finished ? this.requestContentData() : NetworkManager2.streamResponseBody(this);
        this.#streamingContentData = contentPromise.then((contentData) => {
          if (ContentData.isError(contentData)) {
            return contentData;
          }
          return StreamingContentData.from(contentData);
        });
        return this.#streamingContentData;
      }
      contentURL() {
        return this.#url;
      }
      contentType() {
        return this.#resourceType;
      }
      async searchInContent(query, caseSensitive, isRegex) {
        if (!this.#contentDataProvider) {
          return await NetworkManager2.searchInRequest(this, query, caseSensitive, isRegex);
        }
        const contentData = await this.requestContentData();
        if (ContentData.isError(contentData) || !contentData.isTextContent) {
          return [];
        }
        return performSearchInContentData(contentData, query, caseSensitive, isRegex);
      }
      requestContentType() {
        return this.requestHeaderValue("Content-Type");
      }
      requestContentEncoding() {
        return this.requestHeaderValue("Content-Encoding");
      }
      hasErrorStatusCode() {
        return this.statusCode >= 400;
      }
      setInitialPriority(priority) {
        this.#initialPriority = priority;
      }
      initialPriority() {
        return this.#initialPriority;
      }
      setPriority(priority) {
        this.#currentPriority = priority;
      }
      priority() {
        return this.#currentPriority || this.#initialPriority || null;
      }
      setSignedExchangeInfo(info) {
        this.#signedExchangeInfo = info;
      }
      signedExchangeInfo() {
        return this.#signedExchangeInfo;
      }
      async populateImageSource(image) {
        const contentData = await this.requestContentData();
        if (ContentData.isError(contentData)) {
          return;
        }
        let imageSrc = contentData.asDataUrl();
        if (imageSrc === null && !this.#failed) {
          const cacheControl = this.responseHeaderValue("cache-control") || "";
          if (!cacheControl.includes("no-cache")) {
            imageSrc = this.#url;
          }
        }
        if (imageSrc !== null) {
          image.src = imageSrc;
        }
      }
      initiator() {
        return this.#initiator || null;
      }
      hasUserGesture() {
        return this.#hasUserGesture ?? null;
      }
      frames() {
        return this.#frames;
      }
      addProtocolFrameError(errorMessage, time2) {
        this.addFrame({
          type: WebSocketFrameType.Error,
          text: errorMessage,
          time: this.pseudoWallTime(time2),
          opCode: -1,
          mask: false
        });
      }
      addProtocolFrame(response, time2, sent) {
        const type2 = sent ? WebSocketFrameType.Send : WebSocketFrameType.Receive;
        this.addFrame({
          type: type2,
          text: response.payloadData,
          time: this.pseudoWallTime(time2),
          opCode: response.opcode,
          mask: response.mask
        });
      }
      addFrame(frame) {
        this.#frames.push(frame);
        this.dispatchEventToListeners(Events$d.WEBSOCKET_FRAME_ADDED, frame);
      }
      directSocketChunks() {
        return this.#directSocketChunks;
      }
      addDirectSocketChunk(chunk) {
        this.#directSocketChunks.push(chunk);
        this.dispatchEventToListeners(Events$d.DIRECTSOCKET_CHUNK_ADDED, chunk);
      }
      eventSourceMessages() {
        return this.#serverSentEvents?.eventSourceMessages ?? [];
      }
      addEventSourceMessage(time2, eventName, eventId, data32) {
        this.#serverSentEvents?.onProtocolEventSourceMessageReceived(eventName, data32, eventId, this.pseudoWallTime(time2));
      }
      markAsRedirect(redirectCount) {
        this.#isRedirect = true;
        this.#requestId = `${this.#backendRequestId}:redirected.${redirectCount}`;
      }
      isRedirect() {
        return this.#isRedirect;
      }
      setRequestIdForTest(requestId) {
        this.#backendRequestId = requestId;
        this.#requestId = requestId;
      }
      charset() {
        return this.#charset ?? null;
      }
      setCharset(charset) {
        this.#charset = charset;
      }
      addExtraRequestInfo(extraRequestInfo) {
        this.#blockedRequestCookies = extraRequestInfo.blockedRequestCookies;
        this.setIncludedRequestCookies(extraRequestInfo.includedRequestCookies);
        this.setRequestHeaders(extraRequestInfo.requestHeaders);
        this.#hasExtraRequestInfo = true;
        this.setRequestHeadersText("");
        this.#deviceBoundSessionUsages = extraRequestInfo.deviceBoundSessionUsages || [];
        this.#clientSecurityState = extraRequestInfo.clientSecurityState;
        this.#appliedNetworkConditionsId = extraRequestInfo.appliedNetworkConditionsId;
        if (extraRequestInfo.connectTiming) {
          this.setConnectTimingFromExtraInfo(extraRequestInfo.connectTiming);
        }
        this.#siteHasCookieInOtherPartition = extraRequestInfo.siteHasCookieInOtherPartition ?? false;
        this.#hasThirdPartyCookiePhaseoutIssue = this.#blockedRequestCookies.some((item) => item.blockedReasons.includes("ThirdPartyPhaseout"));
      }
      setAppliedNetworkConditions(appliedNetworkConditionsId) {
        this.#appliedNetworkConditionsId = appliedNetworkConditionsId;
      }
      getDeviceBoundSessionUsages() {
        return this.#deviceBoundSessionUsages;
      }
      hasExtraRequestInfo() {
        return this.#hasExtraRequestInfo;
      }
      blockedRequestCookies() {
        return this.#blockedRequestCookies;
      }
      setIncludedRequestCookies(includedRequestCookies) {
        this.#includedRequestCookies = includedRequestCookies;
      }
      includedRequestCookies() {
        return this.#includedRequestCookies;
      }
      hasRequestCookies() {
        return this.#includedRequestCookies.length > 0 || this.#blockedRequestCookies.length > 0;
      }
      siteHasCookieInOtherPartition() {
        return this.#siteHasCookieInOtherPartition;
      }
      static parseStatusTextFromResponseHeadersText(responseHeadersText) {
        const firstLineParts = responseHeadersText.split("\r")[0].split(" ");
        return firstLineParts.slice(2).join(" ");
      }
      addExtraResponseInfo(extraResponseInfo) {
        this.#blockedResponseCookies = extraResponseInfo.blockedResponseCookies;
        if (extraResponseInfo.exemptedResponseCookies) {
          this.#exemptedResponseCookies = extraResponseInfo.exemptedResponseCookies;
        }
        this.#responseCookiesPartitionKey = extraResponseInfo.cookiePartitionKey ? extraResponseInfo.cookiePartitionKey : null;
        this.#responseCookiesPartitionKeyOpaque = extraResponseInfo.cookiePartitionKeyOpaque || null;
        this.responseHeaders = extraResponseInfo.responseHeaders;
        this.originalResponseHeaders = extraResponseInfo.responseHeaders.map((headerEntry) => ({ ...headerEntry }));
        if (extraResponseInfo.responseHeadersText) {
          this.responseHeadersText = extraResponseInfo.responseHeadersText;
          if (!this.requestHeadersText()) {
            let requestHeadersText = `${this.requestMethod} ${this.parsedURL.path}`;
            if (this.parsedURL.queryParams) {
              requestHeadersText += `?${this.parsedURL.queryParams}`;
            }
            requestHeadersText += " HTTP/1.1\r\n";
            for (const { name, value } of this.requestHeaders()) {
              requestHeadersText += `${name}: ${value}\r
`;
            }
            this.setRequestHeadersText(requestHeadersText);
          }
          this.statusText = _NetworkRequest.parseStatusTextFromResponseHeadersText(extraResponseInfo.responseHeadersText);
        }
        this.#remoteAddressSpace = extraResponseInfo.resourceIPAddressSpace;
        if (extraResponseInfo.statusCode) {
          this.statusCode = extraResponseInfo.statusCode;
        }
        this.#hasExtraResponseInfo = true;
        const networkManager = NetworkManager2.forRequest(this);
        if (!networkManager) {
          return;
        }
        for (const blockedCookie of this.#blockedResponseCookies) {
          if (blockedCookie.blockedReasons.includes("NameValuePairExceedsMaxSize")) {
            const message = i18nString$M(UIStrings$13.setcookieHeaderIsIgnoredIn, {
              PH1: this.url()
            });
            networkManager.dispatchEventToListeners(Events$c.MessageGenerated, { message, requestId: this.#requestId, warning: true });
          }
        }
        const cookieModel = networkManager.target().model(CookieModel);
        if (!cookieModel) {
          return;
        }
        for (const exemptedCookie of this.#exemptedResponseCookies) {
          cookieModel.removeBlockedCookie(exemptedCookie.cookie);
        }
        for (const blockedCookie of this.#blockedResponseCookies) {
          const cookie = blockedCookie.cookie;
          if (!cookie) {
            continue;
          }
          if (blockedCookie.blockedReasons.includes("ThirdPartyPhaseout")) {
            this.#hasThirdPartyCookiePhaseoutIssue = true;
          }
          cookieModel.addBlockedCookie(cookie, blockedCookie.blockedReasons.map((blockedReason) => ({
            attribute: setCookieBlockedReasonToAttribute(blockedReason),
            uiString: setCookieBlockedReasonToUiString(blockedReason)
          })));
        }
      }
      hasExtraResponseInfo() {
        return this.#hasExtraResponseInfo;
      }
      blockedResponseCookies() {
        return this.#blockedResponseCookies;
      }
      exemptedResponseCookies() {
        return this.#exemptedResponseCookies;
      }
      nonBlockedResponseCookies() {
        const blockedCookieLines = this.blockedResponseCookies().map((blockedCookie) => blockedCookie.cookieLine);
        const responseCookies = this.responseCookies.filter((cookie) => {
          const index2 = blockedCookieLines.indexOf(cookie.getCookieLine());
          if (index2 !== -1) {
            blockedCookieLines[index2] = null;
            return false;
          }
          return true;
        });
        return responseCookies;
      }
      responseCookiesPartitionKey() {
        return this.#responseCookiesPartitionKey;
      }
      responseCookiesPartitionKeyOpaque() {
        return this.#responseCookiesPartitionKeyOpaque;
      }
      redirectSourceSignedExchangeInfoHasNoErrors() {
        return this.#redirectSource !== null && this.#redirectSource.#signedExchangeInfo !== null && !this.#redirectSource.#signedExchangeInfo.errors;
      }
      clientSecurityState() {
        return this.#clientSecurityState;
      }
      setTrustTokenParams(trustTokenParams) {
        this.#trustTokenParams = trustTokenParams;
      }
      trustTokenParams() {
        return this.#trustTokenParams;
      }
      setTrustTokenOperationDoneEvent(doneEvent) {
        this.#trustTokenOperationDoneEvent = doneEvent;
        this.dispatchEventToListeners(Events$d.TRUST_TOKEN_RESULT_ADDED);
      }
      trustTokenOperationDoneEvent() {
        return this.#trustTokenOperationDoneEvent;
      }
      setIsSameSite(isSameSite) {
        this.#isSameSite = isSameSite;
      }
      isSameSite() {
        return this.#isSameSite;
      }
      setIsAdRelated(isAdRelated) {
        this.#isAdRelated = isAdRelated;
      }
      isAdRelated() {
        return this.#isAdRelated;
      }
      getAssociatedData(key) {
        return this.#associatedData.get(key) || null;
      }
      setAssociatedData(key, data32) {
        this.#associatedData.set(key, data32);
      }
      deleteAssociatedData(key) {
        this.#associatedData.delete(key);
      }
      hasThirdPartyCookiePhaseoutIssue() {
        return this.#hasThirdPartyCookiePhaseoutIssue;
      }
      addDataReceivedEvent({ timestamp, dataLength, encodedDataLength, data: data32 }) {
        this.resourceSize += dataLength;
        if (encodedDataLength !== -1) {
          this.increaseTransferSize(encodedDataLength);
        }
        this.endTime = timestamp;
        if (data32) {
          void this.#streamingContentData?.then((contentData) => {
            if (!isError(contentData)) {
              contentData.addChunk(data32);
            }
          });
        }
      }
      waitForResponseReceived() {
        if (this.responseReceivedPromise) {
          return this.responseReceivedPromise;
        }
        const { promise, resolve: resolve2 } = Promise.withResolvers();
        this.responseReceivedPromise = promise;
        this.responseReceivedPromiseResolve = resolve2;
        return this.responseReceivedPromise;
      }
    };
    (function(Events2) {
      Events2["FINISHED_LOADING"] = "FinishedLoading";
      Events2["TIMING_CHANGED"] = "TimingChanged";
      Events2["REMOTE_ADDRESS_CHANGED"] = "RemoteAddressChanged";
      Events2["REQUEST_HEADERS_CHANGED"] = "RequestHeadersChanged";
      Events2["RESPONSE_HEADERS_CHANGED"] = "ResponseHeadersChanged";
      Events2["WEBSOCKET_FRAME_ADDED"] = "WebsocketFrameAdded";
      Events2["DIRECTSOCKET_CHUNK_ADDED"] = "DirectsocketChunkAdded";
      Events2["EVENT_SOURCE_MESSAGE_ADDED"] = "EventSourceMessageAdded";
      Events2["TRUST_TOKEN_RESULT_ADDED"] = "TrustTokenResultAdded";
    })(Events$d || (Events$d = {}));
    (function(WebSocketFrameType2) {
      WebSocketFrameType2["Send"] = "send";
      WebSocketFrameType2["Receive"] = "receive";
      WebSocketFrameType2["Error"] = "error";
    })(WebSocketFrameType || (WebSocketFrameType = {}));
    setCookieBlockedReasonToUiString = function(blockedReason) {
      switch (blockedReason) {
        case "SecureOnly":
          return i18nString$M(UIStrings$13.blockedReasonSecureOnly);
        case "SameSiteStrict":
          return i18nString$M(UIStrings$13.blockedReasonSameSiteStrictLax, {
            PH1: "SameSite=Strict"
          });
        case "SameSiteLax":
          return i18nString$M(UIStrings$13.blockedReasonSameSiteStrictLax, {
            PH1: "SameSite=Lax"
          });
        case "SameSiteUnspecifiedTreatedAsLax":
          return i18nString$M(UIStrings$13.blockedReasonSameSiteUnspecifiedTreatedAsLax);
        case "SameSiteNoneInsecure":
          return i18nString$M(UIStrings$13.blockedReasonSameSiteNoneInsecure);
        case "UserPreferences":
          return i18nString$M(UIStrings$13.thisSetcookieWasBlockedDueToUser);
        case "SyntaxError":
          return i18nString$M(UIStrings$13.thisSetcookieHadInvalidSyntax);
        case "SchemeNotSupported":
          return i18nString$M(UIStrings$13.theSchemeOfThisConnectionIsNot);
        case "OverwriteSecure":
          return i18nString$M(UIStrings$13.blockedReasonOverwriteSecure);
        case "InvalidDomain":
          return i18nString$M(UIStrings$13.blockedReasonInvalidDomain);
        case "InvalidPrefix":
          return i18nString$M(UIStrings$13.blockedReasonInvalidPrefix);
        case "UnknownError":
          return i18nString$M(UIStrings$13.anUnknownErrorWasEncounteredWhenTrying);
        case "SchemefulSameSiteStrict":
          return i18nString$M(UIStrings$13.thisSetcookieWasBlockedBecauseItHadTheSamesiteStrictLax, { PH1: "SameSite=Strict" });
        case "SchemefulSameSiteLax":
          return i18nString$M(UIStrings$13.thisSetcookieWasBlockedBecauseItHadTheSamesiteStrictLax, { PH1: "SameSite=Lax" });
        case "SchemefulSameSiteUnspecifiedTreatedAsLax":
          return i18nString$M(UIStrings$13.thisSetcookieDidntSpecifyASamesite);
        case "NameValuePairExceedsMaxSize":
          return i18nString$M(UIStrings$13.thisSetcookieWasBlockedBecauseTheNameValuePairExceedsMaxSize);
        case "DisallowedCharacter":
          return i18nString$M(UIStrings$13.thisSetcookieHadADisallowedCharacter);
        case "ThirdPartyPhaseout":
          return i18nString$M(UIStrings$13.thisSetcookieWasBlockedDueThirdPartyPhaseout);
      }
      return "";
    };
    setCookieBlockedReasonToAttribute = function(blockedReason) {
      switch (blockedReason) {
        case "SecureOnly":
        case "OverwriteSecure":
          return "secure";
        case "SameSiteStrict":
        case "SameSiteLax":
        case "SameSiteUnspecifiedTreatedAsLax":
        case "SameSiteNoneInsecure":
        case "SchemefulSameSiteStrict":
        case "SchemefulSameSiteLax":
        case "SchemefulSameSiteUnspecifiedTreatedAsLax":
          return "same-site";
        case "InvalidDomain":
          return "domain";
        case "InvalidPrefix":
          return "name";
        case "NameValuePairExceedsMaxSize":
        case "UserPreferences":
        case "ThirdPartyPhaseout":
        case "SyntaxError":
        case "SchemeNotSupported":
        case "UnknownError":
        case "DisallowedCharacter":
          return null;
      }
      return null;
    };
    (function(DirectSocketType2) {
      DirectSocketType2[DirectSocketType2["TCP"] = 1] = "TCP";
      DirectSocketType2[DirectSocketType2["UDP_BOUND"] = 2] = "UDP_BOUND";
      DirectSocketType2[DirectSocketType2["UDP_CONNECTED"] = 3] = "UDP_CONNECTED";
    })(DirectSocketType || (DirectSocketType = {}));
    (function(DirectSocketStatus2) {
      DirectSocketStatus2[DirectSocketStatus2["OPENING"] = 1] = "OPENING";
      DirectSocketStatus2[DirectSocketStatus2["OPEN"] = 2] = "OPEN";
      DirectSocketStatus2[DirectSocketStatus2["CLOSED"] = 3] = "CLOSED";
      DirectSocketStatus2[DirectSocketStatus2["ABORTED"] = 4] = "ABORTED";
    })(DirectSocketStatus || (DirectSocketStatus = {}));
    (function(DirectSocketChunkType2) {
      DirectSocketChunkType2["SEND"] = "send";
      DirectSocketChunkType2["RECEIVE"] = "receive";
    })(DirectSocketChunkType || (DirectSocketChunkType = {}));
    TargetManager3 = class _TargetManager extends ObjectWrapper {
      context;
      #targets;
      #observers;
      #modelListeners;
      #modelObservers;
      #scopedObservers;
      #isSuspended;
      #browserTarget;
      #scopeTarget;
      #defaultScopeSet;
      #scopeChangeListeners;
      #overrideAutoStartModels;
      constructor(context2, overrideAutoStartModels) {
        super();
        this.context = context2;
        this.#targets = /* @__PURE__ */ new Set();
        this.#observers = /* @__PURE__ */ new Set();
        this.#modelListeners = new Multimap2();
        this.#modelObservers = new Multimap2();
        this.#isSuspended = false;
        this.#browserTarget = null;
        this.#scopeTarget = null;
        this.#scopedObservers = /* @__PURE__ */ new WeakSet();
        this.#defaultScopeSet = false;
        this.#scopeChangeListeners = /* @__PURE__ */ new Set();
        this.#overrideAutoStartModels = overrideAutoStartModels;
      }
      static instance({ forceNew } = { forceNew: false }) {
        if (!globalInstance().has(_TargetManager) || forceNew) {
          globalInstance().set(_TargetManager, new _TargetManager(globalInstance()));
        }
        return globalInstance().get(_TargetManager);
      }
      static removeInstance() {
        globalInstance().delete(_TargetManager);
      }
      onInspectedURLChange(target) {
        if (target !== this.#scopeTarget) {
          return;
        }
        InspectorFrontendHostInstance.inspectedURLChanged(target.inspectedURL() || EmptyUrlString);
        this.dispatchEventToListeners("InspectedURLChanged", target);
      }
      onNameChange(target) {
        this.dispatchEventToListeners("NameChanged", target);
      }
      async suspendAllTargets(reason) {
        if (this.#isSuspended) {
          return;
        }
        this.#isSuspended = true;
        this.dispatchEventToListeners("SuspendStateChanged");
        const suspendPromises = Array.from(this.#targets.values(), (target) => target.suspend(reason));
        await Promise.all(suspendPromises);
      }
      async resumeAllTargets() {
        if (!this.#isSuspended) {
          return;
        }
        this.#isSuspended = false;
        this.dispatchEventToListeners("SuspendStateChanged");
        const resumePromises = Array.from(this.#targets.values(), (target) => target.resume());
        await Promise.all(resumePromises);
      }
      allTargetsSuspended() {
        return this.#isSuspended;
      }
      models(modelClass, opts) {
        const result = [];
        for (const target of this.#targets) {
          if (opts?.scoped && !this.isInScope(target)) {
            continue;
          }
          const model3 = target.model(modelClass);
          if (!model3) {
            continue;
          }
          result.push(model3);
        }
        return result;
      }
      inspectedURL() {
        const mainTarget = this.primaryPageTarget();
        return mainTarget ? mainTarget.inspectedURL() : "";
      }
      observeModels(modelClass, observer, opts) {
        const models = this.models(modelClass, opts);
        this.#modelObservers.set(modelClass, observer);
        if (opts?.scoped) {
          this.#scopedObservers.add(observer);
        }
        for (const model3 of models) {
          observer.modelAdded(model3);
        }
      }
      unobserveModels(modelClass, observer) {
        this.#modelObservers.delete(modelClass, observer);
        this.#scopedObservers.delete(observer);
      }
      modelAdded(modelClass, model3, inScope) {
        for (const observer of this.#modelObservers.get(modelClass).values()) {
          if (!this.#scopedObservers.has(observer) || inScope) {
            observer.modelAdded(model3);
          }
        }
      }
      modelRemoved(modelClass, model3, inScope) {
        for (const observer of this.#modelObservers.get(modelClass).values()) {
          if (!this.#scopedObservers.has(observer) || inScope) {
            observer.modelRemoved(model3);
          }
        }
      }
      addModelListener(modelClass, eventType, listener, thisObject, opts) {
        const wrappedListener = (event) => {
          if (!opts?.scoped || this.isInScope(event)) {
            listener.call(thisObject, event);
          }
        };
        for (const model3 of this.models(modelClass)) {
          model3.addEventListener(eventType, wrappedListener);
        }
        this.#modelListeners.set(eventType, { modelClass, thisObject, listener, wrappedListener });
      }
      removeModelListener(modelClass, eventType, listener, thisObject) {
        if (!this.#modelListeners.has(eventType)) {
          return;
        }
        let wrappedListener = null;
        for (const info of this.#modelListeners.get(eventType)) {
          if (info.modelClass === modelClass && info.listener === listener && info.thisObject === thisObject) {
            wrappedListener = info.wrappedListener;
            this.#modelListeners.delete(eventType, info);
          }
        }
        if (wrappedListener) {
          for (const model3 of this.models(modelClass)) {
            model3.removeEventListener(eventType, wrappedListener);
          }
        }
      }
      observeTargets(targetObserver, opts) {
        if (this.#observers.has(targetObserver)) {
          throw new Error("Observer can only be registered once");
        }
        if (opts?.scoped) {
          this.#scopedObservers.add(targetObserver);
        }
        for (const target of this.#targets) {
          if (!opts?.scoped || this.isInScope(target)) {
            targetObserver.targetAdded(target);
          }
        }
        this.#observers.add(targetObserver);
      }
      unobserveTargets(targetObserver) {
        this.#observers.delete(targetObserver);
        this.#scopedObservers.delete(targetObserver);
      }
      #autoStartModels() {
        const earlyModels = /* @__PURE__ */ new Set();
        const models = /* @__PURE__ */ new Set();
        const shouldAutostart = (model3, info) => this.#overrideAutoStartModels ? this.#overrideAutoStartModels.has(model3) : info.autostart;
        for (const [model3, info] of SDKModel.registeredModels) {
          if (info.early) {
            earlyModels.add(model3);
          } else if (shouldAutostart(model3, info) || this.#modelObservers.has(model3)) {
            models.add(model3);
          }
        }
        return [...earlyModels, ...models];
      }
      createTarget(id2, name, type2, parentTarget, sessionId, waitForDebuggerInPage, connection, targetInfo) {
        const target = new Target2(this, id2, name, type2, parentTarget, sessionId || "", this.#isSuspended, connection || null, targetInfo);
        if (waitForDebuggerInPage) {
          void target.pageAgent().invoke_waitForDebugger();
        }
        target.createModels(this.#autoStartModels());
        this.#targets.add(target);
        const inScope = this.isInScope(target);
        for (const observer of [...this.#observers]) {
          if (!this.#scopedObservers.has(observer) || inScope) {
            observer.targetAdded(target);
          }
        }
        for (const [modelClass, model3] of target.models().entries()) {
          this.modelAdded(modelClass, model3, inScope);
        }
        for (const key of this.#modelListeners.keysArray()) {
          for (const info of this.#modelListeners.get(key)) {
            const model3 = target.model(info.modelClass);
            if (model3) {
              model3.addEventListener(key, info.wrappedListener);
            }
          }
        }
        if (target === target.outermostTarget() && (target.type() !== Type$2.FRAME || target === this.primaryPageTarget()) && !this.#defaultScopeSet) {
          this.setScopeTarget(target);
        }
        return target;
      }
      removeTarget(target) {
        if (!this.#targets.has(target)) {
          return;
        }
        const inScope = this.isInScope(target);
        this.#targets.delete(target);
        for (const modelClass of target.models().keys()) {
          const model3 = target.models().get(modelClass);
          assertNotNullOrUndefined2(model3);
          this.modelRemoved(modelClass, model3, inScope);
        }
        for (const observer of [...this.#observers]) {
          if (!this.#scopedObservers.has(observer) || inScope) {
            observer.targetRemoved(target);
          }
        }
        for (const key of this.#modelListeners.keysArray()) {
          for (const info of this.#modelListeners.get(key)) {
            const model3 = target.model(info.modelClass);
            if (model3) {
              model3.removeEventListener(key, info.wrappedListener);
            }
          }
        }
      }
      targets() {
        return [...this.#targets];
      }
      targetById(id2) {
        return this.targets().find((target) => target.id() === id2) || null;
      }
      rootTarget() {
        if (this.#targets.size === 0) {
          return null;
        }
        return this.#targets.values().next().value ?? null;
      }
      primaryPageTarget() {
        let target = this.rootTarget();
        if (target?.type() === Type$2.TAB) {
          target = this.targets().find((t) => t.parentTarget() === target && t.type() === Type$2.FRAME && !t.targetInfo()?.subtype?.length) || null;
        }
        return target;
      }
      browserTarget() {
        return this.#browserTarget;
      }
      async maybeAttachInitialTarget() {
        if (!Boolean(Runtime.queryParam("browserConnection"))) {
          return false;
        }
        if (!this.#browserTarget) {
          this.#browserTarget = new Target2(
            this,
            "main",
            "browser",
            Type$2.BROWSER,
            null,
            "",
            false,
            null,
            void 0
          );
          this.#browserTarget.createModels(this.#autoStartModels());
        }
        const targetId = await InspectorFrontendHostInstance.initialTargetId();
        void this.#browserTarget.targetAgent().invoke_autoAttachRelated({
          targetId,
          waitForDebuggerOnStart: true
        });
        return true;
      }
      clearAllTargetsForTest() {
        this.#targets.clear();
      }
      isInScope(arg) {
        if (!arg) {
          return false;
        }
        if (isSDKModelEvent(arg)) {
          arg = arg.source;
        }
        if (arg instanceof SDKModel) {
          arg = arg.target();
        }
        while (arg && arg !== this.#scopeTarget) {
          arg = arg.parentTarget();
        }
        return Boolean(arg) && arg === this.#scopeTarget;
      }
      setScopeTarget(scopeTarget) {
        if (scopeTarget === this.#scopeTarget) {
          return;
        }
        for (const target of this.targets()) {
          if (!this.isInScope(target)) {
            continue;
          }
          for (const modelClass of this.#modelObservers.keysArray()) {
            const model3 = target.models().get(modelClass);
            if (!model3) {
              continue;
            }
            for (const observer of [...this.#modelObservers.get(modelClass)].filter((o) => this.#scopedObservers.has(o))) {
              observer.modelRemoved(model3);
            }
          }
          for (const observer of [...this.#observers].filter((o) => this.#scopedObservers.has(o))) {
            observer.targetRemoved(target);
          }
        }
        this.#scopeTarget = scopeTarget;
        for (const target of this.targets()) {
          if (!this.isInScope(target)) {
            continue;
          }
          for (const observer of [...this.#observers].filter((o) => this.#scopedObservers.has(o))) {
            observer.targetAdded(target);
          }
          for (const [modelClass, model3] of target.models().entries()) {
            for (const observer of [...this.#modelObservers.get(modelClass)].filter((o) => this.#scopedObservers.has(o))) {
              observer.modelAdded(model3);
            }
          }
        }
        for (const scopeChangeListener of this.#scopeChangeListeners) {
          scopeChangeListener();
        }
        if (scopeTarget?.inspectedURL()) {
          this.onInspectedURLChange(scopeTarget);
        }
      }
      addScopeChangeListener(listener) {
        this.#scopeChangeListeners.add(listener);
      }
      scopeTarget() {
        return this.#scopeTarget;
      }
    };
    UIStrings$12 = {
      noContentForWebSocket: "Content for WebSockets is currently not supported",
      noContentForRedirect: "No content available because this request was redirected",
      noContentForPreflight: "No content available for preflight request",
      noThrottling: "No throttling",
      offline: "Offline",
      slowG: "3G",
      fastG: "Slow 4G",
      fast4G: "Fast 4G",
      block: "Block",
      requestWasBlockedByDevtoolsS: 'Request was blocked by DevTools: "{PH1}"',
      sFailedLoadingSS: '{PH1} failed loading: {PH2} "{PH3}".',
      sFinishedLoadingSS: '{PH1} finished loading: {PH2} "{PH3}".',
      directSocketStatusOpening: "Opening",
      directSocketStatusOpen: "Open",
      directSocketStatusClosed: "Closed",
      directSocketStatusAborted: "Aborted"
    };
    str_$11 = registerUIStrings("core/sdk/NetworkManager.ts", UIStrings$12);
    i18nString$L = getLocalizedString.bind(void 0, str_$11);
    i18nLazyString$e = getLazilyComputedLocalizedString.bind(void 0, str_$11);
    requestToManagerMap = /* @__PURE__ */ new WeakMap();
    CONNECTION_TYPES = /* @__PURE__ */ new Map([
      ["2g", "cellular2g"],
      ["3g", "cellular3g"],
      ["4g", "cellular4g"],
      ["bluetooth", "bluetooth"],
      ["wifi", "wifi"],
      ["wimax", "wimax"]
    ]);
    NetworkManager2 = class _NetworkManager extends SDKModel {
      dispatcher;
      fetchDispatcher;
      #networkAgent;
      #bypassServiceWorkerSetting;
      activeNetworkThrottlingKey = activeNetworkThrottlingKeySetting();
      constructor(target) {
        super(target);
        this.dispatcher = new NetworkDispatcher(this);
        this.fetchDispatcher = new FetchDispatcher(target.fetchAgent(), this);
        this.#networkAgent = target.networkAgent();
        target.registerNetworkDispatcher(this.dispatcher);
        target.registerFetchDispatcher(this.fetchDispatcher);
        if (Settings.instance().moduleSetting("cache-disabled").get()) {
          void this.#networkAgent.invoke_setCacheDisabled({ cacheDisabled: true });
        }
        void this.#networkAgent.invoke_enable({
          maxPostDataSize: MAX_EAGER_POST_REQUEST_BODY_LENGTH,
          enableDurableMessages: hostConfig.devToolsEnableDurableMessages?.enabled,
          maxTotalBufferSize: MAX_RESPONSE_BODY_TOTAL_BUFFER_LENGTH,
          reportDirectSocketTraffic: true
        });
        void this.#networkAgent.invoke_setAttachDebugStack({ enabled: true });
        this.#bypassServiceWorkerSetting = Settings.instance().createSetting("bypass-service-worker", false);
        if (this.#bypassServiceWorkerSetting.get()) {
          this.bypassServiceWorkerChanged();
        }
        this.#bypassServiceWorkerSetting.addChangeListener(this.bypassServiceWorkerChanged, this);
        Settings.instance().moduleSetting("cache-disabled").addChangeListener(this.cacheDisabledSettingChanged, this);
      }
      static forRequest(request3) {
        return requestToManagerMap.get(request3) || null;
      }
      static canReplayRequest(request3) {
        return Boolean(requestToManagerMap.get(request3)) && Boolean(request3.backendRequestId()) && !request3.isRedirect() && request3.resourceType() === resourceTypes.XHR;
      }
      static replayRequest(request3) {
        const manager = requestToManagerMap.get(request3);
        const requestId = request3.backendRequestId();
        if (!manager || !requestId || request3.isRedirect()) {
          return;
        }
        void manager.#networkAgent.invoke_replayXHR({ requestId });
      }
      static async searchInRequest(request3, query, caseSensitive, isRegex) {
        const manager = _NetworkManager.forRequest(request3);
        const requestId = request3.backendRequestId();
        if (!manager || !requestId || request3.isRedirect()) {
          return [];
        }
        const response = await manager.#networkAgent.invoke_searchInResponseBody({ requestId, query, caseSensitive, isRegex });
        return performSearchInSearchMatches(response.result || [], query, caseSensitive, isRegex);
      }
      static async requestContentData(request3) {
        if (request3.resourceType() === resourceTypes.WebSocket) {
          return { error: i18nString$L(UIStrings$12.noContentForWebSocket) };
        }
        if (!request3.finished) {
          await request3.once(Events$d.FINISHED_LOADING);
        }
        if (request3.isRedirect()) {
          return { error: i18nString$L(UIStrings$12.noContentForRedirect) };
        }
        if (request3.isPreflightRequest()) {
          return { error: i18nString$L(UIStrings$12.noContentForPreflight) };
        }
        const manager = _NetworkManager.forRequest(request3);
        if (!manager) {
          return { error: "No network manager for request" };
        }
        const requestId = request3.backendRequestId();
        if (!requestId) {
          return { error: "No backend request id for request" };
        }
        const response = await manager.#networkAgent.invoke_getResponseBody({ requestId });
        const error = response.getError();
        if (error) {
          return { error };
        }
        return new ContentData(response.body, response.base64Encoded, request3.mimeType, request3.charset() ?? void 0);
      }
      static async streamResponseBody(request3) {
        if (request3.finished) {
          return { error: "Streaming the response body is only available for in-flight requests." };
        }
        const manager = _NetworkManager.forRequest(request3);
        if (!manager) {
          return { error: "No network manager for request" };
        }
        const requestId = request3.backendRequestId();
        if (!requestId) {
          return { error: "No backend request id for request" };
        }
        const response = await manager.#networkAgent.invoke_streamResourceContent({ requestId });
        const error = response.getError();
        if (error) {
          return { error };
        }
        await request3.waitForResponseReceived();
        return new ContentData(response.bufferedData, true, request3.mimeType, request3.charset() ?? void 0);
      }
      static async requestPostData(request3) {
        const manager = _NetworkManager.forRequest(request3);
        if (!manager) {
          console.error("No network manager for request");
          return null;
        }
        const requestId = request3.backendRequestId();
        if (!requestId) {
          console.error("No backend request id for request");
          return null;
        }
        try {
          const { postData, base64Encoded } = await manager.#networkAgent.invoke_getRequestPostData({ requestId });
          if (base64Encoded && postData) {
            const binaryString = window.atob(postData);
            const bytes2 = new Uint8Array(binaryString.length);
            for (let i = 0; i < binaryString.length; i++) {
              bytes2[i] = binaryString.charCodeAt(i);
            }
            const requestContentType = request3.requestContentType();
            const charset = requestContentType ? parseContentType(requestContentType).charset ?? "utf-8" : "utf-8";
            const contentEncoding = request3.requestContentEncoding()?.toLowerCase();
            if (contentEncoding) {
              const decompressed = await _NetworkManager.#tryDecompressBody(bytes2.buffer, contentEncoding, charset);
              if (decompressed !== null) {
                return decompressed;
              }
            }
            return new TextDecoder(charset).decode(bytes2);
          }
          return postData;
        } catch (e) {
          return e.message;
        }
      }
      static async #tryDecompressBody(buffer, encoding, charset) {
        try {
          if (encoding.includes("gzip") && isGzip(buffer)) {
            return await decompress(buffer, charset);
          }
          if (encoding.includes("deflate")) {
            return await decompressDeflate(buffer, charset);
          }
        } catch (e) {
          console.warn("Failed to decompress request body:", e);
        }
        return null;
      }
      static connectionType(conditions) {
        if (!conditions.download && !conditions.upload) {
          return "none";
        }
        try {
          const title2 = typeof conditions.title === "function" ? conditions.title().toLowerCase() : conditions.title.toLowerCase();
          for (const [name, protocolType] of CONNECTION_TYPES) {
            if (title2.includes(name)) {
              return protocolType;
            }
          }
        } catch {
          return "none";
        }
        return "other";
      }
      static lowercaseHeaders(headers) {
        const newHeaders = {};
        for (const headerName in headers) {
          newHeaders[headerName.toLowerCase()] = headers[headerName];
        }
        return newHeaders;
      }
      requestForURL(url) {
        return this.dispatcher.requestForURL(url);
      }
      requestForId(id2) {
        return this.dispatcher.requestForId(id2);
      }
      requestForLoaderId(loaderId) {
        return this.dispatcher.requestForLoaderId(loaderId);
      }
      cacheDisabledSettingChanged({ data: enabled }) {
        void this.#networkAgent.invoke_setCacheDisabled({ cacheDisabled: enabled });
      }
      dispose() {
        Settings.instance().moduleSetting("cache-disabled").removeChangeListener(this.cacheDisabledSettingChanged, this);
      }
      bypassServiceWorkerChanged() {
        void this.#networkAgent.invoke_setBypassServiceWorker({ bypass: this.#bypassServiceWorkerSetting.get() });
      }
      async getSecurityIsolationStatus(frameId) {
        const result = await this.#networkAgent.invoke_getSecurityIsolationStatus({ frameId: frameId ?? void 0 });
        if (result.getError()) {
          return null;
        }
        return result.status;
      }
      async enableReportingApi(enable = true) {
        return await this.#networkAgent.invoke_enableReportingApi({ enable });
      }
      async enableDeviceBoundSessions(enable = true) {
        return await this.#networkAgent.invoke_enableDeviceBoundSessions({ enable });
      }
      async loadNetworkResource(frameId, url, options2) {
        const result = await this.#networkAgent.invoke_loadNetworkResource({ frameId: frameId ?? void 0, url, options: options2 });
        if (result.getError()) {
          throw new Error(result.getError());
        }
        return result.resource;
      }
      clearRequests() {
        this.dispatcher.clearRequests();
      }
    };
    (function(Events2) {
      Events2["RequestStarted"] = "RequestStarted";
      Events2["RequestUpdated"] = "RequestUpdated";
      Events2["RequestFinished"] = "RequestFinished";
      Events2["RequestUpdateDropped"] = "RequestUpdateDropped";
      Events2["ResponseReceived"] = "ResponseReceived";
      Events2["MessageGenerated"] = "MessageGenerated";
      Events2["RequestRedirected"] = "RequestRedirected";
      Events2["LoadingFinished"] = "LoadingFinished";
      Events2["ReportingApiReportAdded"] = "ReportingApiReportAdded";
      Events2["ReportingApiReportUpdated"] = "ReportingApiReportUpdated";
      Events2["ReportingApiEndpointsChangedForOrigin"] = "ReportingApiEndpointsChangedForOrigin";
      Events2["DeviceBoundSessionsAdded"] = "DeviceBoundSessionsAdded";
      Events2["DeviceBoundSessionEventOccurred"] = "DeviceBoundSessionEventOccurred";
    })(Events$c || (Events$c = {}));
    BlockingConditions = {
      key: "BLOCKING",
      block: true,
      title: i18nLazyString$e(UIStrings$12.block)
    };
    NoThrottlingConditions = {
      key: "NO_THROTTLING",
      title: i18nLazyString$e(UIStrings$12.noThrottling),
      i18nTitleKey: UIStrings$12.noThrottling,
      download: -1,
      upload: -1,
      latency: 0
    };
    OfflineConditions = {
      key: "OFFLINE",
      title: i18nLazyString$e(UIStrings$12.offline),
      i18nTitleKey: UIStrings$12.offline,
      download: 0,
      upload: 0,
      latency: 0
    };
    slow3GTargetLatency = 400;
    Slow3GConditions = {
      key: "SPEED_3G",
      title: i18nLazyString$e(UIStrings$12.slowG),
      i18nTitleKey: UIStrings$12.slowG,
      download: 500 * 1e3 / 8 * 0.8,
      upload: 500 * 1e3 / 8 * 0.8,
      latency: slow3GTargetLatency * 5,
      targetLatency: slow3GTargetLatency
    };
    slow4GTargetLatency = 150;
    Slow4GConditions = {
      key: "SPEED_SLOW_4G",
      title: i18nLazyString$e(UIStrings$12.fastG),
      i18nTitleKey: UIStrings$12.fastG,
      download: 1.6 * 1e3 * 1e3 / 8 * 0.9,
      upload: 750 * 1e3 / 8 * 0.9,
      latency: slow4GTargetLatency * 3.75,
      targetLatency: slow4GTargetLatency
    };
    fast4GTargetLatency = 60;
    Fast4GConditions = {
      key: "SPEED_FAST_4G",
      title: i18nLazyString$e(UIStrings$12.fast4G),
      i18nTitleKey: UIStrings$12.fast4G,
      download: 9 * 1e3 * 1e3 / 8 * 0.9,
      upload: 1.5 * 1e3 * 1e3 / 8 * 0.9,
      latency: fast4GTargetLatency * 2.75,
      targetLatency: fast4GTargetLatency
    };
    MAX_EAGER_POST_REQUEST_BODY_LENGTH = 64 * 1024;
    MAX_RESPONSE_BODY_TOTAL_BUFFER_LENGTH = 250 * 1024 * 1024;
    FetchDispatcher = class {
      #fetchAgent;
      #manager;
      constructor(agent, manager) {
        this.#fetchAgent = agent;
        this.#manager = manager;
      }
      requestPaused({ requestId, request: request3, resourceType, responseStatusCode, responseHeaders, networkId }) {
        const networkRequest = networkId ? this.#manager.requestForId(networkId) : null;
        if (networkRequest?.originalResponseHeaders.length === 0 && responseHeaders) {
          networkRequest.originalResponseHeaders = responseHeaders;
        }
        void MultitargetNetworkManager.instance().requestIntercepted(new InterceptedRequest(this.#fetchAgent, request3, resourceType, requestId, networkRequest, responseStatusCode, responseHeaders));
      }
      authRequired({}) {
      }
    };
    NetworkDispatcher = class {
      #manager;
      #requestsById = /* @__PURE__ */ new Map();
      #requestsByURL = /* @__PURE__ */ new Map();
      #requestsByLoaderId = /* @__PURE__ */ new Map();
      #requestIdToExtraInfoBuilder = /* @__PURE__ */ new Map();
      #requestIdToTrustTokenEvent = /* @__PURE__ */ new Map();
      constructor(manager) {
        this.#manager = manager;
        MultitargetNetworkManager.instance().addEventListener("RequestIntercepted", this.#markAsIntercepted.bind(this));
      }
      #markAsIntercepted(event) {
        const request3 = this.requestForId(event.data);
        if (request3) {
          request3.setWasIntercepted(true);
        }
      }
      headersMapToHeadersArray(headersMap) {
        const result = [];
        for (const name in headersMap) {
          const values = headersMap[name].split("\n");
          for (let i = 0; i < values.length; ++i) {
            result.push({ name, value: values[i] });
          }
        }
        return result;
      }
      updateNetworkRequestWithRequest(networkRequest, request3) {
        networkRequest.requestMethod = request3.method;
        networkRequest.setRequestHeaders(this.headersMapToHeadersArray(request3.headers));
        const isCompressed = Boolean(networkRequest.requestContentEncoding());
        networkRequest.setRequestFormData(Boolean(request3.hasPostData), isCompressed ? null : request3.postData || null);
        networkRequest.setInitialPriority(request3.initialPriority);
        networkRequest.mixedContentType = request3.mixedContentType || "none";
        networkRequest.setReferrerPolicy(request3.referrerPolicy);
        networkRequest.setIsSameSite(request3.isSameSite || false);
        networkRequest.setIsAdRelated(request3.isAdRelated || false);
      }
      updateNetworkRequestWithResponse(networkRequest, response) {
        if (response.url && networkRequest.url() !== response.url) {
          networkRequest.setUrl(response.url);
        }
        networkRequest.mimeType = response.mimeType;
        networkRequest.setCharset(response.charset);
        if (!networkRequest.statusCode || networkRequest.wasIntercepted()) {
          networkRequest.statusCode = response.status;
        }
        if (!networkRequest.statusText || networkRequest.wasIntercepted()) {
          networkRequest.statusText = response.statusText;
        }
        if (!networkRequest.hasExtraResponseInfo() || networkRequest.wasIntercepted()) {
          networkRequest.responseHeaders = this.headersMapToHeadersArray(response.headers);
        }
        if (response.encodedDataLength >= 0) {
          networkRequest.setTransferSize(response.encodedDataLength);
        }
        if (response.requestHeaders && !networkRequest.hasExtraRequestInfo()) {
          networkRequest.setRequestHeaders(this.headersMapToHeadersArray(response.requestHeaders));
          networkRequest.setRequestHeadersText(response.requestHeadersText || "");
        }
        networkRequest.connectionReused = response.connectionReused;
        networkRequest.connectionId = String(response.connectionId);
        if (response.remoteIPAddress) {
          networkRequest.setRemoteAddress(response.remoteIPAddress, response.remotePort || -1);
        }
        if (response.fromServiceWorker) {
          networkRequest.fetchedViaServiceWorker = true;
        }
        if (response.fromDiskCache) {
          networkRequest.setFromDiskCache();
        }
        if (response.fromPrefetchCache) {
          networkRequest.setFromPrefetchCache();
        }
        if (response.fromEarlyHints) {
          networkRequest.setFromEarlyHints();
        }
        if (response.cacheStorageCacheName) {
          networkRequest.setResponseCacheStorageCacheName(response.cacheStorageCacheName);
        }
        if (response.serviceWorkerRouterInfo) {
          networkRequest.serviceWorkerRouterInfo = response.serviceWorkerRouterInfo;
        }
        if (response.responseTime) {
          networkRequest.setResponseRetrievalTime(new Date(response.responseTime));
        }
        networkRequest.timing = response.timing;
        networkRequest.protocol = response.protocol || "";
        networkRequest.alternateProtocolUsage = response.alternateProtocolUsage;
        if (response.serviceWorkerResponseSource) {
          networkRequest.setServiceWorkerResponseSource(response.serviceWorkerResponseSource);
        }
        networkRequest.setSecurityState(response.securityState);
        if (response.securityDetails) {
          networkRequest.setSecurityDetails(response.securityDetails);
        }
        const newResourceType = ResourceType.fromMimeTypeOverride(networkRequest.mimeType);
        if (newResourceType) {
          networkRequest.setResourceType(newResourceType);
        }
        if (networkRequest.responseReceivedPromiseResolve) {
          networkRequest.responseReceivedPromiseResolve();
        } else {
          networkRequest.responseReceivedPromise = Promise.resolve();
        }
      }
      requestForId(id2) {
        return this.#requestsById.get(id2) || null;
      }
      requestForURL(url) {
        return this.#requestsByURL.get(url) || null;
      }
      requestForLoaderId(loaderId) {
        return this.#requestsByLoaderId.get(loaderId) || null;
      }
      resourceChangedPriority({ requestId, newPriority }) {
        const networkRequest = this.#requestsById.get(requestId);
        if (networkRequest) {
          networkRequest.setPriority(newPriority);
        }
      }
      signedExchangeReceived({ requestId, info }) {
        let networkRequest = this.#requestsById.get(requestId);
        if (!networkRequest) {
          networkRequest = this.#requestsByURL.get(info.outerResponse.url);
          if (!networkRequest) {
            return;
          }
          const backendRequestId = networkRequest.backendRequestId() || requestId;
          requestId = backendRequestId;
        }
        networkRequest.setSignedExchangeInfo(info);
        networkRequest.setResourceType(resourceTypes.SignedExchange);
        this.updateNetworkRequestWithResponse(networkRequest, info.outerResponse);
        this.updateNetworkRequest(networkRequest);
        this.getExtraInfoBuilder(requestId).addHasExtraInfo(info.hasExtraInfo);
        this.#manager.dispatchEventToListeners(Events$c.ResponseReceived, { request: networkRequest, response: info.outerResponse });
      }
      requestWillBeSent({ requestId, loaderId, documentURL, request: request3, timestamp, wallTime, initiator, redirectHasExtraInfo, redirectResponse, type: type2, frameId, hasUserGesture, renderBlockingBehavior }) {
        let networkRequest = this.#requestsById.get(requestId);
        if (networkRequest) {
          if (!redirectResponse) {
            return;
          }
          if (!networkRequest.signedExchangeInfo()) {
            this.responseReceived({
              requestId,
              loaderId,
              timestamp,
              type: type2 || "Other",
              response: redirectResponse,
              hasExtraInfo: redirectHasExtraInfo,
              frameId
            });
          }
          networkRequest = this.appendRedirect(requestId, timestamp, request3.url);
          this.#manager.dispatchEventToListeners(Events$c.RequestRedirected, networkRequest);
        } else {
          networkRequest = NetworkRequest2.create(requestId, request3.url, documentURL, frameId ?? null, loaderId, initiator, hasUserGesture);
          if (renderBlockingBehavior) {
            networkRequest.setRenderBlockingBehavior(renderBlockingBehavior);
          }
          requestToManagerMap.set(networkRequest, this.#manager);
        }
        networkRequest.hasNetworkData = true;
        this.updateNetworkRequestWithRequest(networkRequest, request3);
        networkRequest.setIssueTime(timestamp, wallTime);
        networkRequest.setResourceType(type2 ? resourceTypes[type2] : resourceTypes.Other);
        if (request3.trustTokenParams) {
          networkRequest.setTrustTokenParams(request3.trustTokenParams);
        }
        const maybeTrustTokenEvent = this.#requestIdToTrustTokenEvent.get(requestId);
        if (maybeTrustTokenEvent) {
          networkRequest.setTrustTokenOperationDoneEvent(maybeTrustTokenEvent);
          this.#requestIdToTrustTokenEvent.delete(requestId);
        }
        this.getExtraInfoBuilder(requestId).addRequest(networkRequest);
        this.startNetworkRequest(networkRequest, request3);
      }
      requestServedFromCache({ requestId }) {
        const networkRequest = this.#requestsById.get(requestId);
        if (!networkRequest) {
          return;
        }
        networkRequest.setFromMemoryCache();
      }
      responseReceived({ requestId, loaderId, timestamp, type: type2, response, hasExtraInfo, frameId }) {
        const networkRequest = this.#requestsById.get(requestId);
        const lowercaseHeaders = NetworkManager2.lowercaseHeaders(response.headers);
        if (!networkRequest) {
          const lastModifiedHeader = lowercaseHeaders["last-modified"];
          const eventData = {
            url: response.url,
            frameId: frameId ?? null,
            loaderId,
            resourceType: type2,
            mimeType: response.mimeType,
            lastModified: lastModifiedHeader ? new Date(lastModifiedHeader) : null
          };
          this.#manager.dispatchEventToListeners(Events$c.RequestUpdateDropped, eventData);
          return;
        }
        networkRequest.responseReceivedTime = timestamp;
        networkRequest.setResourceType(resourceTypes[type2]);
        this.updateNetworkRequestWithResponse(networkRequest, response);
        this.updateNetworkRequest(networkRequest);
        this.getExtraInfoBuilder(requestId).addHasExtraInfo(hasExtraInfo);
        this.#manager.dispatchEventToListeners(Events$c.ResponseReceived, { request: networkRequest, response });
      }
      dataReceived(event) {
        let networkRequest = this.#requestsById.get(event.requestId);
        if (!networkRequest) {
          networkRequest = this.maybeAdoptMainResourceRequest(event.requestId);
        }
        if (!networkRequest) {
          return;
        }
        networkRequest.addDataReceivedEvent(event);
        this.updateNetworkRequest(networkRequest);
      }
      loadingFinished({ requestId, timestamp: finishTime, encodedDataLength }) {
        let networkRequest = this.#requestsById.get(requestId);
        if (!networkRequest) {
          networkRequest = this.maybeAdoptMainResourceRequest(requestId);
        }
        if (!networkRequest) {
          return;
        }
        this.getExtraInfoBuilder(requestId).finished();
        this.finishNetworkRequest(networkRequest, finishTime, encodedDataLength);
        this.#manager.dispatchEventToListeners(Events$c.LoadingFinished, networkRequest);
      }
      loadingFailed({ requestId, timestamp: time2, type: resourceType, errorText: localizedDescription, canceled, blockedReason, corsErrorStatus }) {
        const networkRequest = this.#requestsById.get(requestId);
        if (!networkRequest) {
          return;
        }
        networkRequest.failed = true;
        networkRequest.setResourceType(resourceTypes[resourceType]);
        networkRequest.canceled = Boolean(canceled);
        if (blockedReason) {
          networkRequest.setBlockedReason(blockedReason);
          if (blockedReason === "inspector") {
            const message = i18nString$L(UIStrings$12.requestWasBlockedByDevtoolsS, { PH1: networkRequest.url() });
            this.#manager.dispatchEventToListeners(Events$c.MessageGenerated, { message, requestId, warning: true });
          }
        }
        if (corsErrorStatus) {
          networkRequest.setCorsErrorStatus(corsErrorStatus);
        }
        networkRequest.localizedFailDescription = localizedDescription;
        this.getExtraInfoBuilder(requestId).finished();
        this.finishNetworkRequest(networkRequest, time2, -1);
      }
      webSocketCreated({ requestId, url: requestURL, initiator }) {
        const networkRequest = NetworkRequest2.createForSocket(requestId, requestURL, initiator);
        requestToManagerMap.set(networkRequest, this.#manager);
        networkRequest.setResourceType(resourceTypes.WebSocket);
        this.startNetworkRequest(networkRequest, null);
      }
      webSocketWillSendHandshakeRequest({ requestId, timestamp: time2, wallTime, request: request3 }) {
        const networkRequest = this.#requestsById.get(requestId);
        if (!networkRequest) {
          return;
        }
        networkRequest.requestMethod = "GET";
        networkRequest.setRequestHeaders(this.headersMapToHeadersArray(request3.headers));
        networkRequest.setIssueTime(time2, wallTime);
        this.updateNetworkRequest(networkRequest);
      }
      webSocketHandshakeResponseReceived({ requestId, timestamp: time2, response }) {
        const networkRequest = this.#requestsById.get(requestId);
        if (!networkRequest) {
          return;
        }
        networkRequest.statusCode = response.status;
        networkRequest.statusText = response.statusText;
        networkRequest.responseHeaders = this.headersMapToHeadersArray(response.headers);
        networkRequest.responseHeadersText = response.headersText || "";
        if (response.requestHeaders) {
          networkRequest.setRequestHeaders(this.headersMapToHeadersArray(response.requestHeaders));
        }
        if (response.requestHeadersText) {
          networkRequest.setRequestHeadersText(response.requestHeadersText);
        }
        networkRequest.responseReceivedTime = time2;
        networkRequest.protocol = "websocket";
        this.updateNetworkRequest(networkRequest);
      }
      webSocketFrameReceived({ requestId, timestamp: time2, response }) {
        const networkRequest = this.#requestsById.get(requestId);
        if (!networkRequest) {
          return;
        }
        networkRequest.addProtocolFrame(response, time2, false);
        networkRequest.responseReceivedTime = time2;
        this.updateNetworkRequest(networkRequest);
      }
      webSocketFrameSent({ requestId, timestamp: time2, response }) {
        const networkRequest = this.#requestsById.get(requestId);
        if (!networkRequest) {
          return;
        }
        networkRequest.addProtocolFrame(response, time2, true);
        networkRequest.responseReceivedTime = time2;
        this.updateNetworkRequest(networkRequest);
      }
      webSocketFrameError({ requestId, timestamp: time2, errorMessage }) {
        const networkRequest = this.#requestsById.get(requestId);
        if (!networkRequest) {
          return;
        }
        networkRequest.addProtocolFrameError(errorMessage, time2);
        networkRequest.responseReceivedTime = time2;
        this.updateNetworkRequest(networkRequest);
      }
      webSocketClosed({ requestId, timestamp: time2 }) {
        const networkRequest = this.#requestsById.get(requestId);
        if (!networkRequest) {
          return;
        }
        this.finishNetworkRequest(networkRequest, time2, -1);
      }
      eventSourceMessageReceived({ requestId, timestamp: time2, eventName, eventId, data: data32 }) {
        const networkRequest = this.#requestsById.get(requestId);
        if (!networkRequest) {
          return;
        }
        networkRequest.addEventSourceMessage(time2, eventName, eventId, data32);
      }
      requestIntercepted({}) {
      }
      requestWillBeSentExtraInfo({ requestId, associatedCookies, headers, deviceBoundSessionUsages, clientSecurityState, connectTiming, siteHasCookieInOtherPartition, appliedNetworkConditionsId }) {
        const blockedRequestCookies = [];
        const includedRequestCookies = [];
        for (const { blockedReasons, exemptionReason, cookie } of associatedCookies) {
          if (blockedReasons.length === 0) {
            includedRequestCookies.push({ exemptionReason, cookie: Cookie.fromProtocolCookie(cookie) });
          } else {
            blockedRequestCookies.push({ blockedReasons, cookie: Cookie.fromProtocolCookie(cookie) });
          }
        }
        const extraRequestInfo = {
          blockedRequestCookies,
          includedRequestCookies,
          requestHeaders: this.headersMapToHeadersArray(headers),
          deviceBoundSessionUsages,
          clientSecurityState,
          connectTiming,
          siteHasCookieInOtherPartition,
          appliedNetworkConditionsId
        };
        this.getExtraInfoBuilder(requestId).addRequestExtraInfo(extraRequestInfo);
        const networkRequest = this.#requestsById.get(requestId);
        if (appliedNetworkConditionsId && networkRequest) {
          networkRequest.setAppliedNetworkConditions(appliedNetworkConditionsId);
          this.updateNetworkRequest(networkRequest);
        }
      }
      responseReceivedEarlyHints({ requestId, headers }) {
        this.getExtraInfoBuilder(requestId).setEarlyHintsHeaders(this.headersMapToHeadersArray(headers));
      }
      responseReceivedExtraInfo({ requestId, blockedCookies, headers, headersText, resourceIPAddressSpace, statusCode, cookiePartitionKey, cookiePartitionKeyOpaque, exemptedCookies }) {
        const extraResponseInfo = {
          blockedResponseCookies: blockedCookies.map((blockedCookie) => ({
            blockedReasons: blockedCookie.blockedReasons,
            cookieLine: blockedCookie.cookieLine,
            cookie: blockedCookie.cookie ? Cookie.fromProtocolCookie(blockedCookie.cookie) : null
          })),
          responseHeaders: this.headersMapToHeadersArray(headers),
          responseHeadersText: headersText,
          resourceIPAddressSpace,
          statusCode,
          cookiePartitionKey,
          cookiePartitionKeyOpaque,
          exemptedResponseCookies: exemptedCookies?.map((exemptedCookie) => ({
            cookie: Cookie.fromProtocolCookie(exemptedCookie.cookie),
            cookieLine: exemptedCookie.cookieLine,
            exemptionReason: exemptedCookie.exemptionReason
          }))
        };
        this.getExtraInfoBuilder(requestId).addResponseExtraInfo(extraResponseInfo);
      }
      getExtraInfoBuilder(requestId) {
        let builder;
        if (!this.#requestIdToExtraInfoBuilder.has(requestId)) {
          builder = new ExtraInfoBuilder();
          this.#requestIdToExtraInfoBuilder.set(requestId, builder);
        } else {
          builder = this.#requestIdToExtraInfoBuilder.get(requestId);
        }
        return builder;
      }
      appendRedirect(requestId, time2, redirectURL) {
        const originalNetworkRequest = this.#requestsById.get(requestId);
        if (!originalNetworkRequest) {
          throw new Error(`Could not find original network request for ${requestId}`);
        }
        let redirectCount = 0;
        for (let redirect = originalNetworkRequest.redirectSource(); redirect; redirect = redirect.redirectSource()) {
          redirectCount++;
        }
        originalNetworkRequest.markAsRedirect(redirectCount);
        this.finishNetworkRequest(originalNetworkRequest, time2, -1);
        const newNetworkRequest = NetworkRequest2.create(requestId, redirectURL, originalNetworkRequest.documentURL, originalNetworkRequest.frameId, originalNetworkRequest.loaderId, originalNetworkRequest.initiator(), originalNetworkRequest.hasUserGesture() ?? void 0);
        requestToManagerMap.set(newNetworkRequest, this.#manager);
        newNetworkRequest.setRedirectSource(originalNetworkRequest);
        originalNetworkRequest.setRedirectDestination(newNetworkRequest);
        return newNetworkRequest;
      }
      maybeAdoptMainResourceRequest(requestId) {
        const request3 = MultitargetNetworkManager.instance().inflightMainResourceRequests.get(requestId);
        if (!request3) {
          return null;
        }
        const oldDispatcher = NetworkManager2.forRequest(request3).dispatcher;
        oldDispatcher.#requestsById.delete(requestId);
        oldDispatcher.#requestsByURL.delete(request3.url());
        const loaderId = request3.loaderId;
        if (loaderId) {
          oldDispatcher.#requestsByLoaderId.delete(loaderId);
        }
        const builder = oldDispatcher.#requestIdToExtraInfoBuilder.get(requestId);
        oldDispatcher.#requestIdToExtraInfoBuilder.delete(requestId);
        this.#requestsById.set(requestId, request3);
        this.#requestsByURL.set(request3.url(), request3);
        if (loaderId) {
          this.#requestsByLoaderId.set(loaderId, request3);
        }
        if (builder) {
          this.#requestIdToExtraInfoBuilder.set(requestId, builder);
        }
        requestToManagerMap.set(request3, this.#manager);
        return request3;
      }
      startNetworkRequest(networkRequest, originalRequest) {
        this.#requestsById.set(networkRequest.requestId(), networkRequest);
        this.#requestsByURL.set(networkRequest.url(), networkRequest);
        const loaderId = networkRequest.loaderId;
        if (loaderId) {
          this.#requestsByLoaderId.set(loaderId, networkRequest);
        }
        if (networkRequest.loaderId === networkRequest.requestId() || networkRequest.loaderId === "") {
          MultitargetNetworkManager.instance().inflightMainResourceRequests.set(networkRequest.requestId(), networkRequest);
        }
        this.#manager.dispatchEventToListeners(Events$c.RequestStarted, { request: networkRequest, originalRequest });
      }
      updateNetworkRequest(networkRequest) {
        this.#manager.dispatchEventToListeners(Events$c.RequestUpdated, networkRequest);
      }
      finishNetworkRequest(networkRequest, finishTime, encodedDataLength) {
        networkRequest.endTime = finishTime;
        networkRequest.finished = true;
        if (encodedDataLength >= 0) {
          const redirectSource = networkRequest.redirectSource();
          if (redirectSource?.signedExchangeInfo()) {
            networkRequest.setTransferSize(0);
            redirectSource.setTransferSize(encodedDataLength);
            this.updateNetworkRequest(redirectSource);
          } else {
            networkRequest.setTransferSize(encodedDataLength);
          }
        }
        this.#manager.dispatchEventToListeners(Events$c.RequestFinished, networkRequest);
        MultitargetNetworkManager.instance().inflightMainResourceRequests.delete(networkRequest.requestId());
        if (Settings.instance().moduleSetting("monitoring-xhr-enabled").get() && networkRequest.resourceType().category() === resourceCategories.XHR) {
          let message;
          const failedToLoad = networkRequest.failed || networkRequest.hasErrorStatusCode();
          if (failedToLoad) {
            message = i18nString$L(UIStrings$12.sFailedLoadingSS, { PH1: networkRequest.resourceType().title(), PH2: networkRequest.requestMethod, PH3: networkRequest.url() });
          } else {
            message = i18nString$L(UIStrings$12.sFinishedLoadingSS, { PH1: networkRequest.resourceType().title(), PH2: networkRequest.requestMethod, PH3: networkRequest.url() });
          }
          this.#manager.dispatchEventToListeners(Events$c.MessageGenerated, { message, requestId: networkRequest.requestId(), warning: false });
        }
      }
      clearRequests() {
        for (const [requestId, request3] of this.#requestsById) {
          if (request3.finished) {
            this.#requestsById.delete(requestId);
          }
        }
        for (const [requestURL, request3] of this.#requestsByURL) {
          if (request3.finished) {
            this.#requestsByURL.delete(requestURL);
          }
        }
        for (const [requestLoaderId, request3] of this.#requestsByLoaderId) {
          if (request3.finished) {
            this.#requestsByLoaderId.delete(requestLoaderId);
          }
        }
        for (const [requestId, builder] of this.#requestIdToExtraInfoBuilder) {
          if (builder.isFinished()) {
            this.#requestIdToExtraInfoBuilder.delete(requestId);
          }
        }
      }
      webTransportCreated({ transportId, url: requestURL, timestamp: time2, initiator }) {
        const networkRequest = NetworkRequest2.createForSocket(transportId, requestURL, initiator);
        networkRequest.hasNetworkData = true;
        requestToManagerMap.set(networkRequest, this.#manager);
        networkRequest.setResourceType(resourceTypes.WebTransport);
        networkRequest.setIssueTime(time2, 0);
        this.startNetworkRequest(networkRequest, null);
      }
      webTransportConnectionEstablished({ transportId, timestamp: time2 }) {
        const networkRequest = this.#requestsById.get(transportId);
        if (!networkRequest) {
          return;
        }
        networkRequest.responseReceivedTime = time2;
        networkRequest.endTime = time2 + 1e-3;
        this.updateNetworkRequest(networkRequest);
      }
      webTransportClosed({ transportId, timestamp: time2 }) {
        const networkRequest = this.#requestsById.get(transportId);
        if (!networkRequest) {
          return;
        }
        networkRequest.endTime = time2;
        this.finishNetworkRequest(networkRequest, time2, 0);
      }
      directTCPSocketCreated(event) {
        const requestURL = this.concatHostPort(event.remoteAddr, event.remotePort);
        const networkRequest = NetworkRequest2.createForSocket(event.identifier, requestURL, event.initiator);
        networkRequest.hasNetworkData = true;
        networkRequest.setRemoteAddress(event.remoteAddr, event.remotePort);
        networkRequest.protocol = lockedString("tcp");
        networkRequest.statusText = i18nString$L(UIStrings$12.directSocketStatusOpening);
        networkRequest.directSocketInfo = {
          type: DirectSocketType.TCP,
          status: DirectSocketStatus.OPENING,
          createOptions: {
            remoteAddr: event.remoteAddr,
            remotePort: event.remotePort,
            noDelay: event.options.noDelay,
            keepAliveDelay: event.options.keepAliveDelay,
            sendBufferSize: event.options.sendBufferSize,
            receiveBufferSize: event.options.receiveBufferSize,
            dnsQueryType: event.options.dnsQueryType
          }
        };
        networkRequest.setResourceType(resourceTypes.DirectSocket);
        networkRequest.setIssueTime(event.timestamp, event.timestamp);
        requestToManagerMap.set(networkRequest, this.#manager);
        this.startNetworkRequest(networkRequest, null);
      }
      directTCPSocketOpened(event) {
        const networkRequest = this.#requestsById.get(event.identifier);
        if (!networkRequest?.directSocketInfo) {
          return;
        }
        networkRequest.responseReceivedTime = event.timestamp;
        networkRequest.directSocketInfo.status = DirectSocketStatus.OPEN;
        networkRequest.statusText = i18nString$L(UIStrings$12.directSocketStatusOpen);
        networkRequest.directSocketInfo.openInfo = {
          remoteAddr: event.remoteAddr,
          remotePort: event.remotePort,
          localAddr: event.localAddr,
          localPort: event.localPort
        };
        networkRequest.setRemoteAddress(event.remoteAddr, event.remotePort);
        const requestURL = this.concatHostPort(event.remoteAddr, event.remotePort);
        networkRequest.setUrl(requestURL);
        this.updateNetworkRequest(networkRequest);
      }
      directTCPSocketAborted(event) {
        const networkRequest = this.#requestsById.get(event.identifier);
        if (!networkRequest?.directSocketInfo) {
          return;
        }
        networkRequest.failed = true;
        networkRequest.directSocketInfo.status = DirectSocketStatus.ABORTED;
        networkRequest.statusText = i18nString$L(UIStrings$12.directSocketStatusAborted);
        networkRequest.directSocketInfo.errorMessage = event.errorMessage;
        this.finishNetworkRequest(networkRequest, event.timestamp, 0);
      }
      directTCPSocketClosed(event) {
        const networkRequest = this.#requestsById.get(event.identifier);
        if (!networkRequest?.directSocketInfo) {
          return;
        }
        networkRequest.statusText = i18nString$L(UIStrings$12.directSocketStatusClosed);
        networkRequest.directSocketInfo.status = DirectSocketStatus.CLOSED;
        this.finishNetworkRequest(networkRequest, event.timestamp, 0);
      }
      directTCPSocketChunkSent(event) {
        const networkRequest = this.#requestsById.get(event.identifier);
        if (!networkRequest) {
          return;
        }
        networkRequest.addDirectSocketChunk({
          data: event.data,
          type: DirectSocketChunkType.SEND,
          timestamp: event.timestamp
        });
        networkRequest.responseReceivedTime = event.timestamp;
        this.updateNetworkRequest(networkRequest);
      }
      directTCPSocketChunkReceived(event) {
        const networkRequest = this.#requestsById.get(event.identifier);
        if (!networkRequest) {
          return;
        }
        networkRequest.addDirectSocketChunk({
          data: event.data,
          type: DirectSocketChunkType.RECEIVE,
          timestamp: event.timestamp
        });
        networkRequest.responseReceivedTime = event.timestamp;
        this.updateNetworkRequest(networkRequest);
      }
      directUDPSocketCreated(event) {
        let requestURL = "";
        let type2;
        if (event.options.remoteAddr && event.options.remotePort) {
          requestURL = this.concatHostPort(event.options.remoteAddr, event.options.remotePort);
          type2 = DirectSocketType.UDP_CONNECTED;
        } else if (event.options.localAddr) {
          requestURL = this.concatHostPort(event.options.localAddr, event.options.localPort);
          type2 = DirectSocketType.UDP_BOUND;
        } else {
          return;
        }
        const networkRequest = NetworkRequest2.createForSocket(event.identifier, requestURL, event.initiator);
        networkRequest.hasNetworkData = true;
        if (event.options.remoteAddr && event.options.remotePort) {
          networkRequest.setRemoteAddress(event.options.remoteAddr, event.options.remotePort);
        }
        networkRequest.protocol = lockedString("udp");
        networkRequest.statusText = i18nString$L(UIStrings$12.directSocketStatusOpening);
        networkRequest.directSocketInfo = {
          type: type2,
          status: DirectSocketStatus.OPENING,
          createOptions: {
            remoteAddr: event.options.remoteAddr,
            remotePort: event.options.remotePort,
            localAddr: event.options.localAddr,
            localPort: event.options.localPort,
            sendBufferSize: event.options.sendBufferSize,
            receiveBufferSize: event.options.receiveBufferSize,
            dnsQueryType: event.options.dnsQueryType,
            multicastLoopback: event.options.multicastLoopback,
            multicastTimeToLive: event.options.multicastTimeToLive,
            multicastAllowAddressSharing: event.options.multicastAllowAddressSharing
          },
          joinedMulticastGroups: /* @__PURE__ */ new Set()
        };
        networkRequest.setResourceType(resourceTypes.DirectSocket);
        networkRequest.setIssueTime(event.timestamp, event.timestamp);
        requestToManagerMap.set(networkRequest, this.#manager);
        this.startNetworkRequest(networkRequest, null);
      }
      directUDPSocketOpened(event) {
        const networkRequest = this.#requestsById.get(event.identifier);
        if (!networkRequest?.directSocketInfo) {
          return;
        }
        let requestURL;
        if (networkRequest.directSocketInfo.type === DirectSocketType.UDP_CONNECTED) {
          if (!event.remoteAddr || !event.remotePort) {
            return;
          }
          networkRequest.setRemoteAddress(event.remoteAddr, event.remotePort);
          requestURL = this.concatHostPort(event.remoteAddr, event.remotePort);
        } else {
          requestURL = this.concatHostPort(event.localAddr, event.localPort);
        }
        networkRequest.setUrl(requestURL);
        networkRequest.responseReceivedTime = event.timestamp;
        networkRequest.directSocketInfo.status = DirectSocketStatus.OPEN;
        networkRequest.statusText = i18nString$L(UIStrings$12.directSocketStatusOpen);
        networkRequest.directSocketInfo.openInfo = {
          remoteAddr: event.remoteAddr,
          remotePort: event.remotePort,
          localAddr: event.localAddr,
          localPort: event.localPort
        };
        this.updateNetworkRequest(networkRequest);
      }
      directUDPSocketAborted(event) {
        const networkRequest = this.#requestsById.get(event.identifier);
        if (!networkRequest?.directSocketInfo) {
          return;
        }
        networkRequest.failed = true;
        networkRequest.directSocketInfo.status = DirectSocketStatus.ABORTED;
        networkRequest.statusText = i18nString$L(UIStrings$12.directSocketStatusAborted);
        networkRequest.directSocketInfo.errorMessage = event.errorMessage;
        this.finishNetworkRequest(networkRequest, event.timestamp, 0);
      }
      directUDPSocketClosed(event) {
        const networkRequest = this.#requestsById.get(event.identifier);
        if (!networkRequest?.directSocketInfo) {
          return;
        }
        networkRequest.statusText = i18nString$L(UIStrings$12.directSocketStatusClosed);
        networkRequest.directSocketInfo.status = DirectSocketStatus.CLOSED;
        this.finishNetworkRequest(networkRequest, event.timestamp, 0);
      }
      directUDPSocketChunkSent(event) {
        const networkRequest = this.#requestsById.get(event.identifier);
        if (!networkRequest) {
          return;
        }
        networkRequest.addDirectSocketChunk({
          data: event.message.data,
          type: DirectSocketChunkType.SEND,
          timestamp: event.timestamp,
          remoteAddress: event.message.remoteAddr,
          remotePort: event.message.remotePort
        });
        networkRequest.responseReceivedTime = event.timestamp;
        this.updateNetworkRequest(networkRequest);
      }
      directUDPSocketChunkReceived(event) {
        const networkRequest = this.#requestsById.get(event.identifier);
        if (!networkRequest) {
          return;
        }
        networkRequest.addDirectSocketChunk({
          data: event.message.data,
          type: DirectSocketChunkType.RECEIVE,
          timestamp: event.timestamp,
          remoteAddress: event.message.remoteAddr,
          remotePort: event.message.remotePort
        });
        networkRequest.responseReceivedTime = event.timestamp;
        this.updateNetworkRequest(networkRequest);
      }
      directUDPSocketJoinedMulticastGroup(event) {
        const networkRequest = this.#requestsById.get(event.identifier);
        if (!networkRequest?.directSocketInfo) {
          return;
        }
        if (!networkRequest.directSocketInfo.joinedMulticastGroups) {
          networkRequest.directSocketInfo.joinedMulticastGroups = /* @__PURE__ */ new Set();
        }
        if (!networkRequest.directSocketInfo.joinedMulticastGroups.has(event.IPAddress)) {
          networkRequest.directSocketInfo.joinedMulticastGroups.add(event.IPAddress);
          this.updateNetworkRequest(networkRequest);
        }
      }
      directUDPSocketLeftMulticastGroup(event) {
        const networkRequest = this.#requestsById.get(event.identifier);
        if (!networkRequest?.directSocketInfo?.joinedMulticastGroups) {
          return;
        }
        if (networkRequest.directSocketInfo.joinedMulticastGroups.delete(event.IPAddress)) {
          this.updateNetworkRequest(networkRequest);
        }
      }
      trustTokenOperationDone(event) {
        const request3 = this.#requestsById.get(event.requestId);
        if (!request3) {
          this.#requestIdToTrustTokenEvent.set(event.requestId, event);
          return;
        }
        request3.setTrustTokenOperationDoneEvent(event);
      }
      reportingApiReportAdded(data32) {
        this.#manager.dispatchEventToListeners(Events$c.ReportingApiReportAdded, data32.report);
      }
      reportingApiReportUpdated(data32) {
        this.#manager.dispatchEventToListeners(Events$c.ReportingApiReportUpdated, data32.report);
      }
      reportingApiEndpointsChangedForOrigin(data32) {
        this.#manager.dispatchEventToListeners(Events$c.ReportingApiEndpointsChangedForOrigin, data32);
      }
      deviceBoundSessionsAdded(_params) {
        this.#manager.dispatchEventToListeners(Events$c.DeviceBoundSessionsAdded, _params.sessions);
      }
      deviceBoundSessionEventOccurred(_params) {
        this.#manager.dispatchEventToListeners(Events$c.DeviceBoundSessionEventOccurred, _params);
      }
      policyUpdated() {
      }
      createNetworkRequest(requestId, frameId, loaderId, url, documentURL, initiator) {
        const request3 = NetworkRequest2.create(requestId, url, documentURL, frameId, loaderId, initiator);
        requestToManagerMap.set(request3, this.#manager);
        return request3;
      }
      concatHostPort(host, port) {
        if (!port || port === 0) {
          return host;
        }
        return `${host}:${port}`;
      }
    };
    RequestURLPattern = class _RequestURLPattern {
      constructorString;
      pattern;
      constructor(constructorString, pattern2) {
        this.constructorString = constructorString;
        this.pattern = pattern2;
        if (pattern2.hasRegExpGroups) {
          throw new Error("RegExp groups are not allowed");
        }
      }
      static isValidPattern(pattern2) {
        try {
          const urlPattern = new URLPattern(pattern2);
          return urlPattern.hasRegExpGroups ? "has-regexp-groups" : "valid";
        } catch {
          return "failed-to-parse";
        }
      }
      static create(constructorString) {
        try {
          const urlPattern = new URLPattern(constructorString);
          return urlPattern.hasRegExpGroups ? null : new _RequestURLPattern(constructorString, urlPattern);
        } catch {
          return null;
        }
      }
      static upgradeFromWildcard(pattern2) {
        const tryCreate = (constructorString) => {
          const result = this.create(constructorString);
          if (result?.pattern.protocol === "localhost" && result?.pattern.hostname === "") {
            return tryCreate(`*://${constructorString}`);
          }
          return result;
        };
        return tryCreate(pattern2) ?? tryCreate(`*://${pattern2}*`);
      }
    };
    RequestCondition = class extends ObjectWrapper {
      #pattern;
      #enabled;
      #conditions;
      #ruleIds = /* @__PURE__ */ new Set();
      static createFromSetting(setting) {
        if ("urlPattern" in setting) {
          const pattern3 = RequestURLPattern.create(setting.urlPattern) ?? {
            wildcardURL: setting.urlPattern,
            upgradedPattern: RequestURLPattern.upgradeFromWildcard(setting.urlPattern) ?? void 0
          };
          const conditions = getPredefinedOrBlockingCondition(setting.conditions) ?? customUserNetworkConditionsSetting().get().find((condition) => condition.key === setting.conditions) ?? NoThrottlingConditions;
          return new this(pattern3, setting.enabled, conditions);
        }
        const pattern2 = {
          wildcardURL: setting.url,
          upgradedPattern: RequestURLPattern.upgradeFromWildcard(setting.url) ?? void 0
        };
        return new this(pattern2, setting.enabled, BlockingConditions);
      }
      static create(pattern2, conditions) {
        return new this(pattern2, true, conditions);
      }
      constructor(pattern2, enabled, conditions) {
        super();
        this.#pattern = pattern2;
        this.#enabled = enabled;
        this.#conditions = conditions;
      }
      get isBlocking() {
        return this.conditions === BlockingConditions;
      }
      get ruleIds() {
        return this.#ruleIds;
      }
      get constructorString() {
        return this.#pattern instanceof RequestURLPattern ? this.#pattern.constructorString : this.#pattern.upgradedPattern?.constructorString;
      }
      get wildcardURL() {
        return "wildcardURL" in this.#pattern ? this.#pattern.wildcardURL : void 0;
      }
      get constructorStringOrWildcardURL() {
        return this.#pattern instanceof RequestURLPattern ? this.#pattern.constructorString : this.#pattern.upgradedPattern?.constructorString ?? this.#pattern.wildcardURL;
      }
      set pattern(pattern2) {
        this.#pattern = pattern2;
        this.dispatchEventToListeners("request-condition-changed");
      }
      get enabled() {
        return this.#enabled;
      }
      set enabled(enabled) {
        this.#enabled = enabled;
        this.dispatchEventToListeners("request-condition-changed");
      }
      get conditions() {
        return this.#conditions;
      }
      set conditions(conditions) {
        this.#conditions = conditions;
        this.#ruleIds = /* @__PURE__ */ new Set();
        this.dispatchEventToListeners("request-condition-changed");
      }
      toSetting() {
        const enabled = this.enabled;
        if (this.#pattern instanceof RequestURLPattern) {
          return { enabled, urlPattern: this.#pattern.constructorString, conditions: this.#conditions.key };
        }
        if (this.#conditions !== BlockingConditions && this.#pattern.upgradedPattern) {
          return { enabled, urlPattern: this.#pattern.upgradedPattern.constructorString, conditions: this.#conditions.key };
        }
        return { enabled, url: this.#pattern.wildcardURL };
      }
      get originalOrUpgradedURLPattern() {
        return this.#pattern instanceof RequestURLPattern ? this.#pattern.pattern : this.#pattern.upgradedPattern?.pattern;
      }
    };
    RequestConditions = class extends ObjectWrapper {
      #setting = Settings.instance().createSetting("network-blocked-patterns", []);
      #conditionsEnabledSetting = Settings.instance().moduleSetting("request-blocking-enabled");
      #conditions = [];
      #requestConditionsById = /* @__PURE__ */ new Map();
      #conditionsAppliedForTestPromise = Promise.resolve();
      constructor() {
        super();
        for (const condition of this.#setting.get()) {
          try {
            this.#conditions.push(RequestCondition.createFromSetting(condition));
          } catch (e) {
            console.error("Error loading throttling settings: ", e);
          }
        }
        for (const condition of this.#conditions) {
          condition.addEventListener("request-condition-changed", this.#conditionsChanged, this);
        }
        this.#conditionsEnabledSetting.addChangeListener(() => this.dispatchEventToListeners("request-conditions-changed"));
      }
      get count() {
        return this.#conditions.length;
      }
      get conditionsEnabled() {
        return this.#conditionsEnabledSetting.get();
      }
      set conditionsEnabled(enabled) {
        if (this.#conditionsEnabledSetting.get() === enabled) {
          return;
        }
        this.#conditionsEnabledSetting.set(enabled);
      }
      findCondition(pattern2) {
        return this.#conditions.find((condition) => condition.constructorString === pattern2);
      }
      has(url) {
        return Boolean(this.findCondition(url));
      }
      add(...conditions) {
        this.#conditions.push(...conditions);
        for (const condition of conditions) {
          condition.addEventListener("request-condition-changed", this.#conditionsChanged, this);
        }
        this.#conditionsChanged();
      }
      decreasePriority(condition) {
        const index2 = this.#conditions.indexOf(condition);
        if (index2 < 0 || index2 >= this.#conditions.length - 1) {
          return;
        }
        swap2(this.#conditions, index2, index2 + 1);
        this.#conditionsChanged();
      }
      increasePriority(condition) {
        const index2 = this.#conditions.indexOf(condition);
        if (index2 <= 0) {
          return;
        }
        swap2(this.#conditions, index2 - 1, index2);
        this.#conditionsChanged();
      }
      delete(condition) {
        const index2 = this.#conditions.indexOf(condition);
        if (index2 < 0) {
          return;
        }
        condition.removeEventListener("request-condition-changed", this.#conditionsChanged, this);
        this.#conditions.splice(index2, 1);
        this.#conditionsChanged();
      }
      clear() {
        this.#conditions.splice(0);
        this.#conditionsChanged();
        for (const condition of this.#conditions) {
          condition.removeEventListener("request-condition-changed", this.#conditionsChanged, this);
        }
      }
      #conditionsChanged() {
        this.#setting.set(this.#conditions.map((condition) => condition.toSetting()));
        this.dispatchEventToListeners("request-conditions-changed");
      }
      get conditions() {
        return this.#conditions.values();
      }
      applyConditions(offline, globalConditions, ...agents) {
        function isNonBlockingCondition(condition) {
          return !("block" in condition);
        }
        const urlPatterns = [];
        const matchedNetworkConditions = [];
        if (this.conditionsEnabled) {
          for (const condition of this.#conditions) {
            const urlPattern = condition.constructorString;
            const conditions = condition.conditions;
            if (!condition.enabled || !urlPattern || conditions === NoThrottlingConditions) {
              continue;
            }
            const block2 = !isNonBlockingCondition(conditions);
            urlPatterns.push({ urlPattern, block: block2 });
            if (!block2) {
              const { ruleIds } = condition;
              matchedNetworkConditions.push({ ruleIds, urlPattern, conditions });
            }
          }
        }
        if (globalConditions) {
          matchedNetworkConditions.push({ conditions: globalConditions });
        }
        const promises2 = [];
        for (const agent of agents) {
          promises2.push(agent.invoke_setBlockedURLs({ urlPatterns }));
          promises2.push(agent.invoke_emulateNetworkConditionsByRule({
            offline,
            matchedNetworkConditions: matchedNetworkConditions.map(({ urlPattern, conditions }) => ({
              urlPattern: urlPattern ?? "",
              latency: conditions.latency,
              downloadThroughput: conditions.download < 0 ? 0 : conditions.download,
              uploadThroughput: conditions.upload < 0 ? 0 : conditions.upload,
              packetLoss: (conditions.packetLoss ?? 0) < 0 ? 0 : conditions.packetLoss,
              packetQueueLength: conditions.packetQueueLength,
              packetReordering: conditions.packetReordering,
              connectionType: NetworkManager2.connectionType(conditions)
            }))
          }).then((response) => {
            if (!response.getError()) {
              for (let i = 0; i < response.ruleIds.length; ++i) {
                const ruleId = response.ruleIds[i];
                const { ruleIds, conditions, urlPattern } = matchedNetworkConditions[i];
                if (ruleIds) {
                  this.#requestConditionsById.set(ruleId, { urlPattern, conditions });
                  matchedNetworkConditions[i].ruleIds?.add(ruleId);
                }
              }
            }
          }));
          promises2.push(agent.invoke_overrideNetworkState({
            offline,
            latency: globalConditions?.latency ?? 0,
            downloadThroughput: globalConditions?.download ?? -1,
            uploadThroughput: globalConditions?.upload ?? -1,
            connectionType: globalConditions ? NetworkManager2.connectionType(globalConditions) : "none"
          }));
        }
        this.#conditionsAppliedForTestPromise = this.#conditionsAppliedForTestPromise.then(() => Promise.all(promises2));
        return urlPatterns.length > 0;
      }
      conditionsAppliedForTest() {
        return this.#conditionsAppliedForTestPromise;
      }
      conditionsForId(appliedNetworkConditionsId) {
        const requestConditions = this.#requestConditionsById.get(appliedNetworkConditionsId);
        if (!requestConditions) {
          return void 0;
        }
        const { conditions, urlPattern } = requestConditions;
        return new AppliedNetworkConditions(conditions, appliedNetworkConditionsId, urlPattern);
      }
    };
    AppliedNetworkConditions = class {
      conditions;
      appliedNetworkConditionsId;
      urlPattern;
      constructor(conditions, appliedNetworkConditionsId, urlPattern) {
        this.conditions = conditions;
        this.appliedNetworkConditionsId = appliedNetworkConditionsId;
        this.urlPattern = urlPattern;
      }
    };
    MultitargetNetworkManager = class _MultitargetNetworkManager extends ObjectWrapper {
      #targetManager;
      #userAgentOverride = "";
      #userAgentMetadataOverride = null;
      #customAcceptedEncodings = null;
      #networkAgents = /* @__PURE__ */ new Set();
      #fetchAgents = /* @__PURE__ */ new Set();
      inflightMainResourceRequests = /* @__PURE__ */ new Map();
      #networkConditions = NoThrottlingConditions;
      #updatingInterceptionPatternsPromise = null;
      #requestConditions = new RequestConditions();
      #urlsForRequestInterceptor = new Multimap2();
      #extraHeaders;
      #customUserAgent;
      #isBlocking = false;
      constructor(targetManager) {
        super();
        this.#targetManager = targetManager;
        const blockedPatternChanged = () => {
          this.updateBlockedPatterns();
          this.dispatchEventToListeners("BlockedPatternsChanged");
        };
        this.#requestConditions.addEventListener("request-conditions-changed", blockedPatternChanged);
        this.updateBlockedPatterns();
        this.#targetManager.observeModels(NetworkManager2, this);
      }
      static instance(opts = { forceNew: null }) {
        const { forceNew, targetManager } = opts;
        if (!globalInstance().has(_MultitargetNetworkManager) || forceNew) {
          globalInstance().set(_MultitargetNetworkManager, new _MultitargetNetworkManager(targetManager ?? TargetManager3.instance()));
        }
        return globalInstance().get(_MultitargetNetworkManager);
      }
      static dispose() {
        globalInstance().delete(_MultitargetNetworkManager);
      }
      static patchUserAgentWithChromeVersion(uaString) {
        const chromeVersion = getChromeVersion();
        if (chromeVersion.length > 0) {
          const additionalAppVersion = chromeVersion.split(".", 1)[0] + ".0.100.0";
          return sprintf(uaString, chromeVersion, additionalAppVersion);
        }
        return uaString;
      }
      static patchUserAgentMetadataWithChromeVersion(userAgentMetadata) {
        if (!userAgentMetadata.brands) {
          return;
        }
        const chromeVersion = getChromeVersion();
        if (chromeVersion.length === 0) {
          return;
        }
        const majorVersion = chromeVersion.split(".", 1)[0];
        for (const brand of userAgentMetadata.brands) {
          if (brand.version.includes("%s")) {
            brand.version = sprintf(brand.version, majorVersion);
          }
        }
        if (userAgentMetadata.fullVersion) {
          if (userAgentMetadata.fullVersion.includes("%s")) {
            userAgentMetadata.fullVersion = sprintf(userAgentMetadata.fullVersion, chromeVersion);
          }
        }
      }
      modelAdded(networkManager) {
        const networkAgent = networkManager.target().networkAgent();
        const fetchAgent = networkManager.target().fetchAgent();
        if (this.#extraHeaders) {
          void networkAgent.invoke_setExtraHTTPHeaders({ headers: this.#extraHeaders });
        }
        if (this.currentUserAgent()) {
          void networkAgent.invoke_setUserAgentOverride({ userAgent: this.currentUserAgent(), userAgentMetadata: this.#userAgentMetadataOverride || void 0 });
        }
        this.#requestConditions.applyConditions(this.isOffline(), this.isThrottling() ? this.#networkConditions : null, networkAgent);
        if (this.isIntercepting()) {
          void fetchAgent.invoke_enable({ patterns: this.#urlsForRequestInterceptor.valuesArray() });
        }
        if (this.#customAcceptedEncodings === null) {
          void networkAgent.invoke_clearAcceptedEncodingsOverride();
        } else {
          void networkAgent.invoke_setAcceptedEncodings({ encodings: this.#customAcceptedEncodings });
        }
        this.#networkAgents.add(networkAgent);
        this.#fetchAgents.add(fetchAgent);
      }
      modelRemoved(networkManager) {
        for (const entry of this.inflightMainResourceRequests) {
          const manager = NetworkManager2.forRequest(entry[1]);
          if (manager !== networkManager) {
            continue;
          }
          this.inflightMainResourceRequests.delete(entry[0]);
        }
        this.#networkAgents.delete(networkManager.target().networkAgent());
        this.#fetchAgents.delete(networkManager.target().fetchAgent());
      }
      isThrottling() {
        return this.#networkConditions.download >= 0 || this.#networkConditions.upload >= 0 || this.#networkConditions.latency > 0;
      }
      isOffline() {
        return !this.#networkConditions.download && !this.#networkConditions.upload;
      }
      setNetworkConditions(conditions) {
        this.#networkConditions = conditions;
        this.#requestConditions.applyConditions(this.isOffline(), this.isThrottling() ? this.#networkConditions : null, ...this.#networkAgents);
        this.dispatchEventToListeners("ConditionsChanged");
      }
      networkConditions() {
        return this.#networkConditions;
      }
      updateNetworkConditions(networkAgent) {
        const conditions = this.#networkConditions;
        if (!this.isThrottling()) {
          void networkAgent.invoke_emulateNetworkConditions({
            offline: false,
            latency: 0,
            downloadThroughput: 0,
            uploadThroughput: 0
          });
        } else {
          void networkAgent.invoke_emulateNetworkConditions({
            offline: this.isOffline(),
            latency: conditions.latency,
            downloadThroughput: conditions.download < 0 ? 0 : conditions.download,
            uploadThroughput: conditions.upload < 0 ? 0 : conditions.upload,
            packetLoss: (conditions.packetLoss ?? 0) < 0 ? 0 : conditions.packetLoss,
            packetQueueLength: conditions.packetQueueLength,
            packetReordering: conditions.packetReordering,
            connectionType: NetworkManager2.connectionType(conditions)
          });
        }
      }
      setExtraHTTPHeaders(headers) {
        this.#extraHeaders = headers;
        for (const agent of this.#networkAgents) {
          void agent.invoke_setExtraHTTPHeaders({ headers: this.#extraHeaders });
        }
      }
      currentUserAgent() {
        return this.#customUserAgent ? this.#customUserAgent : this.#userAgentOverride;
      }
      updateUserAgentOverride() {
        const userAgent = this.currentUserAgent();
        for (const agent of this.#networkAgents) {
          void agent.invoke_setUserAgentOverride({ userAgent, userAgentMetadata: this.#userAgentMetadataOverride || void 0 });
        }
      }
      setUserAgentOverride(userAgent, userAgentMetadataOverride) {
        const uaChanged = this.#userAgentOverride !== userAgent;
        this.#userAgentOverride = userAgent;
        if (!this.#customUserAgent) {
          this.#userAgentMetadataOverride = userAgentMetadataOverride;
          this.updateUserAgentOverride();
        } else {
          this.#userAgentMetadataOverride = null;
        }
        if (uaChanged) {
          this.dispatchEventToListeners("UserAgentChanged");
        }
      }
      setCustomUserAgentOverride(userAgent, userAgentMetadataOverride = null) {
        this.#customUserAgent = userAgent;
        this.#userAgentMetadataOverride = userAgentMetadataOverride;
        this.updateUserAgentOverride();
      }
      setCustomAcceptedEncodingsOverride(acceptedEncodings) {
        this.#customAcceptedEncodings = acceptedEncodings;
        this.updateAcceptedEncodingsOverride();
        this.dispatchEventToListeners("AcceptedEncodingsChanged");
      }
      clearCustomAcceptedEncodingsOverride() {
        this.#customAcceptedEncodings = null;
        this.updateAcceptedEncodingsOverride();
        this.dispatchEventToListeners("AcceptedEncodingsChanged");
      }
      isAcceptedEncodingOverrideSet() {
        return this.#customAcceptedEncodings !== null;
      }
      updateAcceptedEncodingsOverride() {
        const customAcceptedEncodings = this.#customAcceptedEncodings;
        for (const agent of this.#networkAgents) {
          if (customAcceptedEncodings === null) {
            void agent.invoke_clearAcceptedEncodingsOverride();
          } else {
            void agent.invoke_setAcceptedEncodings({ encodings: customAcceptedEncodings });
          }
        }
      }
      get requestConditions() {
        return this.#requestConditions;
      }
      isBlocking() {
        return this.#isBlocking && this.requestConditions.conditionsEnabled;
      }
      updateBlockedPatterns() {
        this.#isBlocking = this.#requestConditions.applyConditions(this.isOffline(), this.isThrottling() ? this.#networkConditions : null, ...this.#networkAgents);
      }
      isIntercepting() {
        return Boolean(this.#urlsForRequestInterceptor.size);
      }
      setInterceptionHandlerForPatterns(patterns, requestInterceptor) {
        this.#urlsForRequestInterceptor.deleteAll(requestInterceptor);
        for (const newPattern of patterns) {
          this.#urlsForRequestInterceptor.set(requestInterceptor, newPattern);
        }
        return this.updateInterceptionPatternsOnNextTick();
      }
      updateInterceptionPatternsOnNextTick() {
        if (!this.#updatingInterceptionPatternsPromise) {
          this.#updatingInterceptionPatternsPromise = Promise.resolve().then(this.updateInterceptionPatterns.bind(this));
        }
        return this.#updatingInterceptionPatternsPromise;
      }
      async updateInterceptionPatterns() {
        if (!Settings.instance().moduleSetting("cache-disabled").get()) {
          Settings.instance().moduleSetting("cache-disabled").set(true);
        }
        this.#updatingInterceptionPatternsPromise = null;
        const promises2 = [];
        for (const agent of this.#fetchAgents) {
          promises2.push(agent.invoke_enable({ patterns: this.#urlsForRequestInterceptor.valuesArray() }));
        }
        this.dispatchEventToListeners("InterceptorsChanged");
        await Promise.all(promises2);
      }
      async requestIntercepted(interceptedRequest) {
        for (const requestInterceptor of this.#urlsForRequestInterceptor.keysArray()) {
          await requestInterceptor(interceptedRequest);
          if (interceptedRequest.hasResponded() && interceptedRequest.networkRequest) {
            this.dispatchEventToListeners("RequestIntercepted", interceptedRequest.networkRequest.requestId());
            return;
          }
        }
        if (!interceptedRequest.hasResponded()) {
          interceptedRequest.continueRequestWithoutChange();
        }
      }
      clearBrowserCache() {
        for (const agent of this.#networkAgents) {
          void agent.invoke_clearBrowserCache();
        }
      }
      clearBrowserCookies() {
        for (const agent of this.#networkAgents) {
          void agent.invoke_clearBrowserCookies();
        }
      }
      async getCertificate(origin) {
        const target = this.#targetManager.primaryPageTarget();
        if (!target) {
          return [];
        }
        const certificate = await target.networkAgent().invoke_getCertificate({ origin });
        if (!certificate) {
          return [];
        }
        return certificate.tableNames;
      }
      appliedRequestConditions(requestInternal) {
        if (!requestInternal.appliedNetworkConditionsId) {
          return void 0;
        }
        return this.requestConditions.conditionsForId(requestInternal.appliedNetworkConditionsId);
      }
    };
    InterceptedRequest = class _InterceptedRequest {
      #fetchAgent;
      #hasResponded = false;
      request;
      resourceType;
      responseStatusCode;
      responseHeaders;
      requestId;
      networkRequest;
      constructor(fetchAgent, request3, resourceType, requestId, networkRequest, responseStatusCode, responseHeaders) {
        this.#fetchAgent = fetchAgent;
        this.request = request3;
        this.resourceType = resourceType;
        this.responseStatusCode = responseStatusCode;
        this.responseHeaders = responseHeaders;
        this.requestId = requestId;
        this.networkRequest = networkRequest;
      }
      hasResponded() {
        return this.#hasResponded;
      }
      static mergeSetCookieHeaders(originalSetCookieHeaders, setCookieHeadersFromOverrides) {
        const generateHeaderMap = (headers) => {
          const result = /* @__PURE__ */ new Map();
          for (const header of headers) {
            const match = header.value.match(/^([a-zA-Z0-9!#$%&'*+.^_`|~-]+=)(.*)$/);
            if (match) {
              if (result.has(match[1])) {
                result.get(match[1])?.push(header.value);
              } else {
                result.set(match[1], [header.value]);
              }
            } else if (result.has(header.value)) {
              result.get(header.value)?.push(header.value);
            } else {
              result.set(header.value, [header.value]);
            }
          }
          return result;
        };
        const originalHeadersMap = generateHeaderMap(originalSetCookieHeaders);
        const overridesHeaderMap = generateHeaderMap(setCookieHeadersFromOverrides);
        const mergedHeaders = [];
        for (const [key, headerValues] of originalHeadersMap) {
          if (overridesHeaderMap.has(key)) {
            for (const headerValue of overridesHeaderMap.get(key) || []) {
              mergedHeaders.push({ name: "set-cookie", value: headerValue });
            }
          } else {
            for (const headerValue of headerValues) {
              mergedHeaders.push({ name: "set-cookie", value: headerValue });
            }
          }
        }
        for (const [key, headerValues] of overridesHeaderMap) {
          if (originalHeadersMap.has(key)) {
            continue;
          }
          for (const headerValue of headerValues) {
            mergedHeaders.push({ name: "set-cookie", value: headerValue });
          }
        }
        return mergedHeaders;
      }
      async continueRequestWithContent(contentBlob, encoded, responseHeaders, isBodyOverridden) {
        this.#hasResponded = true;
        const body = encoded ? await contentBlob.text() : await encode(contentBlob).catch((err) => {
          console.error(err);
          return "";
        });
        const responseCode = isBodyOverridden ? 200 : this.responseStatusCode || 200;
        if (this.networkRequest) {
          const originalSetCookieHeaders = this.networkRequest?.originalResponseHeaders.filter((header) => header.name === "set-cookie") || [];
          const setCookieHeadersFromOverrides = responseHeaders.filter((header) => header.name === "set-cookie");
          this.networkRequest.setCookieHeaders = _InterceptedRequest.mergeSetCookieHeaders(originalSetCookieHeaders, setCookieHeadersFromOverrides);
          this.networkRequest.hasOverriddenContent = isBodyOverridden;
        }
        void this.#fetchAgent.invoke_fulfillRequest({ requestId: this.requestId, responseCode, body, responseHeaders });
        MultitargetNetworkManager.instance().dispatchEventToListeners("RequestFulfilled", this.request.url);
      }
      continueRequestWithoutChange() {
        console.assert(!this.#hasResponded);
        this.#hasResponded = true;
        void this.#fetchAgent.invoke_continueRequest({ requestId: this.requestId });
      }
      async responseBody() {
        const response = await this.#fetchAgent.invoke_getResponseBody({ requestId: this.requestId });
        const error = response.getError();
        if (error) {
          return { error };
        }
        const { mimeType, charset } = this.getMimeTypeAndCharset();
        return new ContentData(response.body, response.base64Encoded, mimeType ?? "application/octet-stream", charset ?? void 0);
      }
      isRedirect() {
        return this.responseStatusCode !== void 0 && this.responseStatusCode >= 300 && this.responseStatusCode < 400;
      }
      getMimeTypeAndCharset() {
        for (const header of this.responseHeaders ?? []) {
          if (header.name.toLowerCase() === "content-type") {
            return parseContentType(header.value);
          }
        }
        const mimeType = this.networkRequest?.mimeType ?? null;
        const charset = this.networkRequest?.charset() ?? null;
        return { mimeType, charset };
      }
    };
    ExtraInfoBuilder = class {
      #requests = [];
      #responseExtraInfoFlag = [];
      #requestExtraInfos = [];
      #responseExtraInfos = [];
      #responseEarlyHintsHeaders = [];
      #finished = false;
      addRequest(req) {
        this.#requests.push(req);
        this.sync(this.#requests.length - 1);
      }
      addHasExtraInfo(hasExtraInfo) {
        this.#responseExtraInfoFlag.push(hasExtraInfo);
        console.assert(this.#requests.length === this.#responseExtraInfoFlag.length, "request/response count mismatch");
        if (!hasExtraInfo) {
          this.#requestExtraInfos.splice(this.#requests.length - 1, 0, null);
          this.#responseExtraInfos.splice(this.#requests.length - 1, 0, null);
        }
        this.sync(this.#requests.length - 1);
      }
      addRequestExtraInfo(info) {
        this.#requestExtraInfos.push(info);
        this.sync(this.#requestExtraInfos.length - 1);
      }
      addResponseExtraInfo(info) {
        this.#responseExtraInfos.push(info);
        this.sync(this.#responseExtraInfos.length - 1);
      }
      setEarlyHintsHeaders(earlyHintsHeaders) {
        this.#responseEarlyHintsHeaders = earlyHintsHeaders;
        this.updateFinalRequest();
      }
      finished() {
        this.#finished = true;
        if (this.#responseExtraInfoFlag.length < this.#requests.length) {
          this.#responseExtraInfoFlag.push(true);
          this.sync(this.#responseExtraInfoFlag.length - 1);
        }
        console.assert(this.#requests.length === this.#responseExtraInfoFlag.length, "request/response count mismatch when request finished");
        this.updateFinalRequest();
      }
      isFinished() {
        return this.#finished;
      }
      sync(index2) {
        const req = this.#requests[index2];
        if (!req) {
          return;
        }
        if (index2 >= this.#responseExtraInfoFlag.length) {
          return;
        }
        if (!this.#responseExtraInfoFlag[index2]) {
          return;
        }
        const requestExtraInfo = this.#requestExtraInfos[index2];
        if (requestExtraInfo) {
          req.addExtraRequestInfo(requestExtraInfo);
          this.#requestExtraInfos[index2] = null;
        }
        const responseExtraInfo = this.#responseExtraInfos[index2];
        if (responseExtraInfo) {
          req.addExtraResponseInfo(responseExtraInfo);
          this.#responseExtraInfos[index2] = null;
        }
      }
      finalRequest() {
        if (!this.#finished) {
          return null;
        }
        return this.#requests[this.#requests.length - 1] || null;
      }
      updateFinalRequest() {
        if (!this.#finished) {
          return;
        }
        const finalRequest = this.finalRequest();
        finalRequest?.setEarlyHintsHeaders(this.#responseEarlyHintsHeaders);
      }
    };
    SDKModel.register(NetworkManager2, { capabilities: 16, autostart: true });
    THROTTLING_CONDITIONS_LOOKUP = /* @__PURE__ */ new Map([
      ["NO_THROTTLING", NoThrottlingConditions],
      ["OFFLINE", OfflineConditions],
      ["SPEED_3G", Slow3GConditions],
      ["SPEED_SLOW_4G", Slow4GConditions],
      ["SPEED_FAST_4G", Fast4GConditions]
    ]);
    UIStrings$11 = {
      loadCanceledDueToReloadOf: "Load canceled due to reload of inspected page"
    };
    str_$10 = registerUIStrings("core/sdk/PageResourceLoader.ts", UIStrings$11);
    i18nString$K = getLocalizedString.bind(void 0, str_$10);
    PageResourceLoader = class _PageResourceLoader extends ObjectWrapper {
      #targetManager;
      #settings;
      #userAgentProvider;
      #currentlyLoading = 0;
      #currentlyLoadingPerTarget = /* @__PURE__ */ new Map();
      #maxConcurrentLoads;
      #pageResources = /* @__PURE__ */ new Map();
      #queuedLoads = [];
      #loadOverride;
      constructor(targetManager, settings, userAgentProvider, loadOverride, maxConcurrentLoads = 500) {
        super();
        this.#targetManager = targetManager;
        this.#settings = settings;
        this.#userAgentProvider = userAgentProvider;
        this.#maxConcurrentLoads = maxConcurrentLoads;
        this.#targetManager.addModelListener(ResourceTreeModel, Events$6.PrimaryPageChanged, this.onPrimaryPageChanged, this);
        this.#loadOverride = loadOverride;
      }
      static instance({ forceNew, targetManager, settings, userAgentProvider, loadOverride, maxConcurrentLoads } = {
        forceNew: false,
        loadOverride: null
      }) {
        if (forceNew) {
          globalInstance().set(_PageResourceLoader, new _PageResourceLoader(targetManager ?? TargetManager3.instance(), settings ?? Settings.instance(), userAgentProvider ?? MultitargetNetworkManager.instance(), loadOverride, maxConcurrentLoads));
        }
        return globalInstance().get(_PageResourceLoader);
      }
      static removeInstance() {
        globalInstance().delete(_PageResourceLoader);
      }
      onPrimaryPageChanged(event) {
        const { frame: mainFrame, type: type2 } = event.data;
        if (!mainFrame.isOutermostFrame()) {
          return;
        }
        for (const { reject } of this.#queuedLoads) {
          reject(new Error(i18nString$K(UIStrings$11.loadCanceledDueToReloadOf)));
        }
        this.#queuedLoads = [];
        const mainFrameTarget = mainFrame.resourceTreeModel().target();
        const keptResources = /* @__PURE__ */ new Map();
        for (const [key, pageResource] of this.#pageResources.entries()) {
          if (type2 === "Activation" && mainFrameTarget === pageResource.initiator.target) {
            keptResources.set(key, pageResource);
          }
        }
        this.#pageResources = keptResources;
        this.dispatchEventToListeners("Update");
      }
      getResourcesLoaded() {
        return this.#pageResources;
      }
      getScopedResourcesLoaded() {
        return new Map([...this.#pageResources].filter(([_, pageResource]) => this.#targetManager.isInScope(pageResource.initiator.target) || isExtensionInitiator(pageResource.initiator)));
      }
      getNumberOfResources() {
        return { loading: this.#currentlyLoading, queued: this.#queuedLoads.length, resources: this.#pageResources.size };
      }
      getScopedNumberOfResources() {
        let loadingCount = 0;
        for (const [targetId, count] of this.#currentlyLoadingPerTarget) {
          const target = this.#targetManager.targetById(targetId);
          if (this.#targetManager.isInScope(target)) {
            loadingCount += count;
          }
        }
        return { loading: loadingCount, resources: this.getScopedResourcesLoaded().size };
      }
      async acquireLoadSlot(target) {
        this.#currentlyLoading++;
        if (target) {
          const currentCount = this.#currentlyLoadingPerTarget.get(target.id()) || 0;
          this.#currentlyLoadingPerTarget.set(target.id(), currentCount + 1);
        }
        if (this.#currentlyLoading > this.#maxConcurrentLoads) {
          const { promise: waitForCapacity, resolve: resolve2, reject } = Promise.withResolvers();
          this.#queuedLoads.push({ resolve: resolve2, reject });
          await waitForCapacity;
        }
      }
      releaseLoadSlot(target) {
        this.#currentlyLoading--;
        if (target) {
          const currentCount = this.#currentlyLoadingPerTarget.get(target.id());
          if (currentCount) {
            this.#currentlyLoadingPerTarget.set(target.id(), currentCount - 1);
          }
        }
        const entry = this.#queuedLoads.shift();
        if (entry) {
          entry.resolve();
        }
      }
      static makeExtensionKey(url, initiator) {
        if (isExtensionInitiator(initiator) && initiator.extensionId) {
          return `${url}-${initiator.extensionId}`;
        }
        throw new Error("Invalid initiator");
      }
      static makeKey(url, initiator) {
        if (initiator.frameId) {
          return `${url}-${initiator.frameId}`;
        }
        if (initiator.target) {
          return `${url}-${initiator.target.id()}`;
        }
        throw new Error("Invalid initiator");
      }
      resourceLoadedThroughExtension(pageResource) {
        const key = _PageResourceLoader.makeExtensionKey(pageResource.url, pageResource.initiator);
        this.#pageResources.set(key, pageResource);
        this.dispatchEventToListeners("Update");
      }
      async loadResource(url, initiator, isBinary = false) {
        if (isExtensionInitiator(initiator)) {
          throw new Error("Invalid initiator");
        }
        const key = _PageResourceLoader.makeKey(url, initiator);
        const pageResource = {
          success: null,
          size: null,
          duration: null,
          url,
          initiator
        };
        this.#pageResources.set(key, pageResource);
        this.dispatchEventToListeners("Update");
        const startTime = performance.now();
        try {
          await this.acquireLoadSlot(initiator.target);
          const resultPromise = this.dispatchLoad(url, initiator, isBinary);
          const result = await resultPromise;
          pageResource.errorMessage = result.errorDescription.message;
          pageResource.success = result.success;
          if (result.success) {
            pageResource.size = result.content.length;
            return { content: result.content };
          }
          throw new Error(result.errorDescription.message);
        } catch (e) {
          if (pageResource.errorMessage === void 0) {
            pageResource.errorMessage = e.message;
          }
          if (pageResource.success === null) {
            pageResource.success = false;
          }
          throw e;
        } finally {
          pageResource.duration = performance.now() - startTime;
          this.releaseLoadSlot(initiator.target);
          this.dispatchEventToListeners("Update");
        }
      }
      async dispatchLoad(url, initiator, isBinary) {
        if (isExtensionInitiator(initiator)) {
          throw new Error("Invalid initiator");
        }
        if (this.#loadOverride) {
          return await this.#loadOverride(url);
        }
        const parsedURL = new ParsedURL2(url);
        const eligibleForLoadFromTarget = this.getLoadThroughTargetSetting().get() && parsedURL && parsedURL.scheme !== "file" && parsedURL.scheme !== "data" && parsedURL.scheme !== "devtools" && initiator.target;
        userMetrics.developerResourceScheme(this.getDeveloperResourceScheme(parsedURL));
        if (eligibleForLoadFromTarget) {
          try {
            userMetrics.developerResourceLoaded(0);
            const result2 = await this.loadFromTarget(initiator.target, initiator.frameId, url, isBinary);
            return result2;
          } catch (e) {
            if (e instanceof Error) {
              userMetrics.developerResourceLoaded(2);
              if (e.message.includes("CSP violation")) {
                return {
                  success: false,
                  content: "",
                  errorDescription: {
                    statusCode: 0,
                    message: e.message
                  }
                };
              }
            }
          }
          userMetrics.developerResourceLoaded(3);
        } else {
          const code2 = this.getLoadThroughTargetSetting().get() ? 6 : 5;
          userMetrics.developerResourceLoaded(code2);
        }
        const result = await this.loadFromHostBindings(url);
        if (eligibleForLoadFromTarget && !result.success) {
          userMetrics.developerResourceLoaded(7);
        }
        return result;
      }
      getDeveloperResourceScheme(parsedURL) {
        if (!parsedURL || parsedURL.scheme === "") {
          return 1;
        }
        const isLocalhost = parsedURL.host === "localhost" || parsedURL.host.endsWith(".localhost");
        switch (parsedURL.scheme) {
          case "file":
            return 7;
          case "data":
            return 6;
          case "blob":
            return 8;
          case "http":
            return isLocalhost ? 4 : 2;
          case "https":
            return isLocalhost ? 5 : 3;
        }
        return 0;
      }
      async loadFromTarget(target, frameId, url, isBinary) {
        const networkManager = target.model(NetworkManager2);
        const ioModel = target.model(IOModel);
        const disableCache = this.#settings.moduleSetting("cache-disabled").get();
        const resource = await networkManager.loadNetworkResource(frameId, url, { disableCache, includeCredentials: true });
        try {
          const content = resource.stream ? isBinary ? await ioModel.readToBuffer(resource.stream) : await ioModel.readToString(resource.stream) : "";
          return {
            success: resource.success,
            content,
            errorDescription: {
              statusCode: resource.httpStatusCode || 0,
              netError: resource.netError,
              netErrorName: resource.netErrorName,
              message: netErrorToMessage(resource.netError, resource.httpStatusCode, resource.netErrorName) || ""
            }
          };
        } finally {
          if (resource.stream) {
            void ioModel.close(resource.stream);
          }
        }
      }
      async loadFromHostBindings(url) {
        const headers = {};
        const currentUserAgent = this.#userAgentProvider.currentUserAgent();
        if (currentUserAgent) {
          headers["User-Agent"] = currentUserAgent;
        }
        if (this.#settings.moduleSetting("cache-disabled").get()) {
          headers["Cache-Control"] = "no-cache";
        }
        const allowRemoteFilePaths = this.#settings.moduleSetting("network.enable-remote-file-loading").get();
        return await new Promise((resolve2) => load(url, headers, (success, _responseHeaders, content, errorDescription) => {
          resolve2({ success, content, errorDescription });
        }, allowRemoteFilePaths));
      }
      getLoadThroughTargetSetting() {
        return this.#settings.createSetting("load-through-target", true);
      }
    };
    BASE64_CHARS = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
    BASE64_CODES = new Uint8Array(123);
    for (let index2 = 0; index2 < BASE64_CHARS.length; ++index2) {
      BASE64_CODES[BASE64_CHARS.charCodeAt(index2)] = index2;
    }
    VLQ_BASE_SHIFT$1 = 5;
    VLQ_BASE_MASK$1 = (1 << 5) - 1;
    VLQ_CONTINUATION_MASK$1 = 1 << 5;
    TokenIterator$1 = class TokenIterator {
      #string;
      #position;
      constructor(string2) {
        this.#string = string2;
        this.#position = 0;
      }
      nextChar() {
        return this.#string.charAt(this.#position++);
      }
      nextCharCode() {
        return this.#string.charCodeAt(this.#position++);
      }
      peek() {
        return this.#string.charAt(this.#position);
      }
      hasNext() {
        return this.#position < this.#string.length;
      }
      nextSignedVLQ() {
        let result = this.nextUnsignedVLQ();
        const negative = result & 1;
        result >>>= 1;
        return negative ? -result : result;
      }
      nextUnsignedVLQ() {
        let result = 0;
        let shift = 0;
        let digit = 0;
        do {
          const charCode = this.nextCharCode();
          digit = BASE64_CODES[charCode];
          result += (digit & VLQ_BASE_MASK$1) << shift;
          shift += VLQ_BASE_SHIFT$1;
        } while (digit & VLQ_CONTINUATION_MASK$1);
        return result;
      }
      currentChar() {
        return this.#string.charAt(this.#position - 1);
      }
    };
    DEFAULT_DECODE_OPTIONS = {
      mode: 2,
      generatedOffset: { line: 0, column: 0 }
    };
    DEFAULT_SCOPE_STATE = {
      line: 0,
      column: 0,
      name: 0,
      kind: 0,
      variable: 0
    };
    DEFAULT_RANGE_STATE = {
      line: 0,
      column: 0,
      defScopeIdx: 0
    };
    Decoder = class {
      #encodedScopes;
      #names;
      #mode;
      #scopes = [];
      #ranges = [];
      #scopeState = { ...DEFAULT_SCOPE_STATE };
      #rangeState = { ...DEFAULT_RANGE_STATE };
      #scopeStack = [];
      #rangeStack = [];
      #flatOriginalScopes = [];
      #subRangeBindingsForRange = /* @__PURE__ */ new Map();
      #seenOriginalScopeVariables = false;
      #seenGeneratedRangeBindings = false;
      constructor(scopes, names3, options2) {
        this.#encodedScopes = scopes;
        this.#names = names3;
        this.#mode = options2.mode;
        this.#rangeState.line = options2.generatedOffset.line;
        this.#rangeState.column = options2.generatedOffset.column;
      }
      decode() {
        const iter = new TokenIterator$1(this.#encodedScopes);
        while (iter.hasNext()) {
          const tag2 = iter.nextUnsignedVLQ();
          switch (tag2) {
            case 0: {
              this.#scopes.push(null);
              break;
            }
            case 1: {
              const item = {
                flags: iter.nextUnsignedVLQ(),
                line: iter.nextUnsignedVLQ(),
                column: iter.nextUnsignedVLQ()
              };
              if (item.flags & 1) {
                item.nameIdx = iter.nextSignedVLQ();
              }
              if (item.flags & 2) {
                item.kindIdx = iter.nextSignedVLQ();
              }
              this.#handleOriginalScopeStartItem(item);
              break;
            }
            case 3: {
              const variableIdxs = [];
              while (iter.hasNext() && iter.peek() !== ",") {
                variableIdxs.push(iter.nextSignedVLQ());
              }
              this.#handleOriginalScopeVariablesItem(variableIdxs);
              this.#seenOriginalScopeVariables = true;
              break;
            }
            case 2: {
              this.#handleOriginalScopeEndItem(iter.nextUnsignedVLQ(), iter.nextUnsignedVLQ());
              break;
            }
            case 4: {
              const flags = iter.nextUnsignedVLQ();
              const line = flags & 1 ? iter.nextUnsignedVLQ() : void 0;
              const column = iter.nextUnsignedVLQ();
              const definitionIdx = flags & 2 ? iter.nextSignedVLQ() : void 0;
              this.#handleGeneratedRangeStartItem({
                flags,
                line,
                column,
                definitionIdx
              });
              break;
            }
            case 5: {
              const lineOrColumn = iter.nextUnsignedVLQ();
              const maybeColumn = iter.hasNext() && iter.peek() !== "," ? iter.nextUnsignedVLQ() : void 0;
              if (maybeColumn !== void 0) {
                this.#handleGeneratedRangeEndItem(lineOrColumn, maybeColumn);
              } else {
                this.#handleGeneratedRangeEndItem(0, lineOrColumn);
              }
              break;
            }
            case 6: {
              const valueIdxs = [];
              while (iter.hasNext() && iter.peek() !== ",") {
                valueIdxs.push(iter.nextUnsignedVLQ());
              }
              this.#handleGeneratedRangeBindingsItem(valueIdxs);
              this.#seenGeneratedRangeBindings = true;
              break;
            }
            case 7: {
              const variableIndex = iter.nextUnsignedVLQ();
              const bindings = [];
              while (iter.hasNext() && iter.peek() !== ",") {
                bindings.push([
                  iter.nextUnsignedVLQ(),
                  iter.nextUnsignedVLQ(),
                  iter.nextUnsignedVLQ()
                ]);
              }
              this.#recordGeneratedSubRangeBindingItem(variableIndex, bindings);
              this.#seenGeneratedRangeBindings = true;
              break;
            }
            case 8: {
              this.#handleGeneratedRangeCallSite(iter.nextUnsignedVLQ(), iter.nextUnsignedVLQ(), iter.nextUnsignedVLQ());
              break;
            }
            case 99: {
              iter.nextUnsignedVLQ();
              break;
            }
            default: {
              this.#throwInStrictMode(`Encountered illegal item tag ${tag2}`);
              break;
            }
          }
          while (iter.hasNext() && iter.peek() !== ",")
            iter.nextUnsignedVLQ();
          if (iter.hasNext())
            iter.nextChar();
        }
        if (this.#scopeStack.length > 0) {
          this.#throwInStrictMode("Encountered ORIGINAL_SCOPE_START without matching END!");
        }
        if (this.#rangeStack.length > 0) {
          this.#throwInStrictMode("Encountered GENERATED_RANGE_START without matching END!");
        }
        const info = {
          scopes: this.#scopes,
          ranges: this.#ranges,
          hasVariableAndBindingInfo: this.#seenOriginalScopeVariables && this.#seenGeneratedRangeBindings
        };
        this.#scopes = [];
        this.#ranges = [];
        this.#flatOriginalScopes = [];
        this.#seenOriginalScopeVariables = false;
        this.#seenGeneratedRangeBindings = false;
        return info;
      }
      #throwInStrictMode(message) {
        if (this.#mode === 1)
          throw new Error(message);
      }
      #handleOriginalScopeStartItem(item) {
        this.#scopeState.line += item.line;
        if (item.line === 0) {
          this.#scopeState.column += item.column;
        } else {
          this.#scopeState.column = item.column;
        }
        const scope2 = {
          start: { line: this.#scopeState.line, column: this.#scopeState.column },
          end: { line: this.#scopeState.line, column: this.#scopeState.column },
          isStackFrame: false,
          variables: [],
          children: []
        };
        if (item.nameIdx !== void 0) {
          this.#scopeState.name += item.nameIdx;
          scope2.name = this.#resolveName(this.#scopeState.name);
        }
        if (item.kindIdx !== void 0) {
          this.#scopeState.kind += item.kindIdx;
          scope2.kind = this.#resolveName(this.#scopeState.kind);
        }
        scope2.isStackFrame = Boolean(item.flags & 4);
        this.#scopeStack.push(scope2);
        this.#flatOriginalScopes.push(scope2);
      }
      #handleOriginalScopeVariablesItem(variableIdxs) {
        const scope2 = this.#scopeStack.at(-1);
        if (!scope2) {
          this.#throwInStrictMode("Encountered ORIGINAL_SCOPE_VARIABLES without surrounding ORIGINAL_SCOPE_START");
          return;
        }
        for (const variableIdx of variableIdxs) {
          this.#scopeState.variable += variableIdx;
          scope2.variables.push(this.#resolveName(this.#scopeState.variable));
        }
      }
      #handleOriginalScopeEndItem(line, column) {
        this.#scopeState.line += line;
        if (line === 0) {
          this.#scopeState.column += column;
        } else {
          this.#scopeState.column = column;
        }
        const scope2 = this.#scopeStack.pop();
        if (!scope2) {
          this.#throwInStrictMode("Encountered ORIGINAL_SCOPE_END without matching ORIGINAL_SCOPE_START!");
          return;
        }
        scope2.end = {
          line: this.#scopeState.line,
          column: this.#scopeState.column
        };
        if (this.#scopeStack.length > 0) {
          const parent = this.#scopeStack.at(-1);
          scope2.parent = parent;
          parent.children.push(scope2);
        } else {
          this.#scopes.push(scope2);
          this.#scopeState.line = 0;
          this.#scopeState.column = 0;
        }
      }
      #handleGeneratedRangeStartItem(item) {
        if (item.line !== void 0) {
          this.#rangeState.line += item.line;
          this.#rangeState.column = item.column;
        } else {
          this.#rangeState.column += item.column;
        }
        const range2 = {
          start: {
            line: this.#rangeState.line,
            column: this.#rangeState.column
          },
          end: {
            line: this.#rangeState.line,
            column: this.#rangeState.column
          },
          isStackFrame: Boolean(item.flags & 4),
          isHidden: Boolean(item.flags & 8),
          values: [],
          children: []
        };
        if (item.definitionIdx !== void 0) {
          this.#rangeState.defScopeIdx += item.definitionIdx;
          if (this.#rangeState.defScopeIdx < 0 || this.#rangeState.defScopeIdx >= this.#flatOriginalScopes.length) {
            this.#throwInStrictMode("Invalid definition scope index");
          } else {
            range2.originalScope = this.#flatOriginalScopes[this.#rangeState.defScopeIdx];
          }
        }
        this.#rangeStack.push(range2);
      }
      #handleGeneratedRangeBindingsItem(valueIdxs) {
        const range2 = this.#rangeStack.at(-1);
        if (!range2) {
          this.#throwInStrictMode("Encountered GENERATED_RANGE_BINDINGS without surrounding GENERATED_RANGE_START");
          return;
        }
        for (const valueIdx of valueIdxs) {
          if (valueIdx === 0) {
            range2.values.push(null);
          } else {
            range2.values.push(this.#resolveName(valueIdx - 1));
          }
        }
      }
      #recordGeneratedSubRangeBindingItem(variableIndex, bindings) {
        const range2 = this.#rangeStack.at(-1);
        if (!range2) {
          this.#throwInStrictMode("Encountered GENERATED_RANGE_SUBRANGE_BINDING without surrounding GENERATED_RANGE_START");
          return;
        }
        let subRangeBindings = this.#subRangeBindingsForRange.get(range2);
        if (!subRangeBindings) {
          subRangeBindings = /* @__PURE__ */ new Map();
          this.#subRangeBindingsForRange.set(range2, subRangeBindings);
        }
        if (subRangeBindings.has(variableIndex)) {
          this.#throwInStrictMode("Encountered multiple GENERATED_RANGE_SUBRANGE_BINDING items for the same variable");
          return;
        }
        subRangeBindings.set(variableIndex, bindings);
      }
      #handleGeneratedRangeCallSite(sourceIndex, line, column) {
        const range2 = this.#rangeStack.at(-1);
        if (!range2) {
          this.#throwInStrictMode("Encountered GENERATED_RANGE_CALL_SITE without surrounding GENERATED_RANGE_START");
          return;
        }
        range2.callSite = {
          sourceIndex,
          line,
          column
        };
      }
      #handleGeneratedRangeEndItem(line, column) {
        if (line !== 0) {
          this.#rangeState.line += line;
          this.#rangeState.column = column;
        } else {
          this.#rangeState.column += column;
        }
        const range2 = this.#rangeStack.pop();
        if (!range2) {
          this.#throwInStrictMode("Encountered GENERATED_RANGE_END without matching GENERATED_RANGE_START!");
          return;
        }
        range2.end = {
          line: this.#rangeState.line,
          column: this.#rangeState.column
        };
        this.#handleGeneratedRangeSubRangeBindings(range2);
        if (this.#rangeStack.length > 0) {
          const parent = this.#rangeStack.at(-1);
          range2.parent = parent;
          parent.children.push(range2);
        } else {
          this.#ranges.push(range2);
        }
      }
      #handleGeneratedRangeSubRangeBindings(range2) {
        const subRangeBindings = this.#subRangeBindingsForRange.get(range2);
        if (!subRangeBindings)
          return;
        for (const [variableIndex, bindings] of subRangeBindings) {
          const value = range2.values[variableIndex];
          const subRanges = [];
          range2.values[variableIndex] = subRanges;
          let lastLine = range2.start.line;
          let lastColumn = range2.start.column;
          subRanges.push({
            from: { line: lastLine, column: lastColumn },
            to: { line: 0, column: 0 },
            value
          });
          for (const [binding, line, column] of bindings) {
            lastLine += line;
            if (line === 0) {
              lastColumn += column;
            } else {
              lastColumn = column;
            }
            subRanges.push({
              from: { line: lastLine, column: lastColumn },
              to: { line: 0, column: 0 },
              value: binding === 0 ? void 0 : this.#resolveName(binding - 1)
            });
          }
        }
        for (const value of range2.values) {
          if (Array.isArray(value)) {
            const subRanges = value;
            for (let i = 0; i < subRanges.length - 1; ++i) {
              subRanges[i].to = subRanges[i + 1].from;
            }
            subRanges[subRanges.length - 1].to = range2.end;
          }
        }
      }
      #resolveName(index2) {
        if (index2 < 0 || index2 >= this.#names.length) {
          this.#throwInStrictMode("Illegal index into the 'names' array");
        }
        return this.#names[index2] ?? "";
      }
    };
    FormatterWorkerPool = class _FormatterWorkerPool {
      taskQueue;
      workerTasks;
      entrypointURL;
      constructor(entrypointURL) {
        this.taskQueue = [];
        this.workerTasks = /* @__PURE__ */ new Map();
        this.entrypointURL = entrypointURL ?? import.meta.resolve("../../entrypoints/formatter_worker/formatter_worker-entrypoint.js");
      }
      static instance(opts) {
        if (!formatterWorkerPoolInstance || opts?.forceNew) {
          formatterWorkerPoolInstance = new _FormatterWorkerPool(opts?.entrypointURL);
        }
        return formatterWorkerPoolInstance;
      }
      dispose() {
        for (const task of this.taskQueue) {
          console.error("rejecting task");
          task.errorCallback(new Event("Worker terminated"));
        }
        for (const [worker, task] of this.workerTasks.entries()) {
          task?.errorCallback(new Event("Worker terminated"));
          worker.terminate(true);
        }
      }
      static removeInstance() {
        formatterWorkerPoolInstance?.dispose();
        formatterWorkerPoolInstance = void 0;
      }
      createWorker() {
        const worker = HOST_RUNTIME.createWorker(this.entrypointURL);
        worker.onmessage = this.onWorkerMessage.bind(this, worker);
        worker.onerror = this.onWorkerError.bind(this, worker);
        return worker;
      }
      processNextTask() {
        const maxWorkers = Math.max(2, navigator.hardwareConcurrency - 1);
        if (!this.taskQueue.length) {
          return;
        }
        let freeWorker = [...this.workerTasks.keys()].find((worker) => !this.workerTasks.get(worker));
        if (!freeWorker && this.workerTasks.size < maxWorkers) {
          freeWorker = this.createWorker();
        }
        if (!freeWorker) {
          return;
        }
        const task = this.taskQueue.shift();
        if (task) {
          this.workerTasks.set(freeWorker, task);
          freeWorker.postMessage({ method: task.method, params: task.params });
        }
      }
      onWorkerMessage(worker, event) {
        const task = this.workerTasks.get(worker);
        if (!task) {
          return;
        }
        if (task.isChunked && event.data && !event.data["isLastChunk"]) {
          task.callback(event.data);
          return;
        }
        this.workerTasks.set(worker, null);
        this.processNextTask();
        task.callback(event.data ? event.data : null);
      }
      onWorkerError(worker, event) {
        console.error(event);
        const task = this.workerTasks.get(worker);
        worker.terminate();
        this.workerTasks.delete(worker);
        const newWorker = this.createWorker();
        this.workerTasks.set(newWorker, null);
        this.processNextTask();
        if (task) {
          task.errorCallback(event);
        }
      }
      runChunkedTask(methodName, params, callback) {
        const task = new Task(methodName, params, onData, () => onData(null), true);
        this.taskQueue.push(task);
        this.processNextTask();
        function onData(data32) {
          if (!data32) {
            callback(true, null);
            return;
          }
          const isLastChunk = "isLastChunk" in data32 && Boolean(data32["isLastChunk"]);
          const chunk = "chunk" in data32 && data32["chunk"];
          callback(isLastChunk, chunk);
        }
      }
      runTask(methodName, params) {
        return new Promise((resolve2, reject) => {
          const task = new Task(methodName, params, resolve2, reject, false);
          this.taskQueue.push(task);
          this.processNextTask();
        });
      }
      format(mimeType, content, indentString) {
        const parameters = { mimeType, content, indentString };
        return this.runTask("format", parameters);
      }
      javaScriptSubstitute(expression, mapping) {
        if (mapping.size === 0) {
          return Promise.resolve(expression);
        }
        return this.runTask("javaScriptSubstitute", { content: expression, mapping }).then((result) => result || "");
      }
      javaScriptScopeTree(expression, sourceType = "script") {
        return this.runTask("javaScriptScopeTree", { content: expression, sourceType }).then((result) => result || null);
      }
      parseCSS(content, callback) {
        this.runChunkedTask("parseCSS", { content }, onDataChunk);
        function onDataChunk(isLastChunk, data32) {
          const rules2 = data32 || [];
          callback(isLastChunk, rules2);
        }
      }
    };
    Task = class {
      method;
      params;
      callback;
      errorCallback;
      isChunked;
      constructor(method, params, callback, errorCallback, isChunked) {
        this.method = method;
        this.params = params;
        this.callback = callback;
        this.errorCallback = errorCallback;
        this.isChunked = isChunked;
      }
    };
    FormatterWorkerPool$1 = /* @__PURE__ */ Object.freeze({
      __proto__: null,
      FormatterWorkerPool,
      formatterWorkerPool
    });
    IdentityFormatterSourceMapping = class {
      originalToFormatted(lineNumber, columnNumber = 0) {
        return [lineNumber, columnNumber];
      }
      formattedToOriginal(lineNumber, columnNumber = 0) {
        return [lineNumber, columnNumber];
      }
    };
    FormatterSourceMappingImpl = class {
      originalLineEndings;
      formattedLineEndings;
      mapping;
      constructor(originalLineEndings, formattedLineEndings, mapping) {
        this.originalLineEndings = originalLineEndings;
        this.formattedLineEndings = formattedLineEndings;
        this.mapping = mapping;
      }
      originalToFormatted(lineNumber, columnNumber) {
        const originalPosition = locationToPosition(this.originalLineEndings, lineNumber, columnNumber || 0);
        const formattedPosition = this.convertPosition(this.mapping.original, this.mapping.formatted, originalPosition);
        return positionToLocation(this.formattedLineEndings, formattedPosition);
      }
      formattedToOriginal(lineNumber, columnNumber) {
        const formattedPosition = locationToPosition(this.formattedLineEndings, lineNumber, columnNumber || 0);
        const originalPosition = this.convertPosition(this.mapping.formatted, this.mapping.original, formattedPosition);
        return positionToLocation(this.originalLineEndings, originalPosition);
      }
      convertPosition(positions1, positions2, position) {
        const index2 = upperBound2(positions1, position, DEFAULT_COMPARATOR2) - 1;
        let convertedPosition = positions2[index2] + position - positions1[index2];
        if (index2 < positions2.length - 1 && convertedPosition > positions2[index2 + 1]) {
          convertedPosition = positions2[index2 + 1];
        }
        return convertedPosition;
      }
    };
    ScriptFormatter = /* @__PURE__ */ Object.freeze({
      __proto__: null,
      format,
      formatScriptContent
    });
    formatter = /* @__PURE__ */ Object.freeze({
      __proto__: null,
      FormatterWorkerPool: FormatterWorkerPool$1,
      ScriptFormatter
    });
    scopeTrees = /* @__PURE__ */ new WeakMap();
    UIStrings$10 = {
      local: "Local",
      closure: "Closure",
      block: "Block",
      global: "Global",
      returnValue: "Return value"
    };
    str_$$ = registerUIStrings("core/sdk/SourceMapScopeChainEntry.ts", UIStrings$10);
    i18nString$J = getLocalizedString.bind(void 0, str_$$);
    SourceMapScopeChainEntry = class {
      #callFrame;
      #scope;
      #range;
      #isInnerMostFunction;
      #returnValue;
      constructor(callFrame, scope2, range2, isInnerMostFunction, returnValue) {
        this.#callFrame = callFrame;
        this.#scope = scope2;
        this.#range = range2;
        this.#isInnerMostFunction = isInnerMostFunction;
        this.#returnValue = returnValue;
      }
      extraProperties() {
        if (this.#returnValue) {
          return [new RemoteObjectProperty(
            i18nString$J(UIStrings$10.returnValue),
            this.#returnValue,
            void 0,
            void 0,
            void 0,
            void 0,
            void 0,
            true
          )];
        }
        return [];
      }
      callFrame() {
        return this.#callFrame;
      }
      type() {
        switch (this.#scope.kind) {
          case "global":
            return "global";
          case "function":
            return this.#isInnerMostFunction ? "local" : "closure";
          case "block":
            return "block";
        }
        return this.#scope.kind ?? "";
      }
      typeName() {
        switch (this.#scope.kind) {
          case "global":
            return i18nString$J(UIStrings$10.global);
          case "function":
            return this.#isInnerMostFunction ? i18nString$J(UIStrings$10.local) : i18nString$J(UIStrings$10.closure);
          case "block":
            return i18nString$J(UIStrings$10.block);
        }
        return this.#scope.kind ?? "";
      }
      name() {
        return this.#scope.name;
      }
      range() {
        return null;
      }
      object() {
        return new SourceMapScopeRemoteObject(this.#callFrame, this.#scope, this.#range);
      }
      description() {
        return "";
      }
      icon() {
        return void 0;
      }
    };
    SourceMapScopeRemoteObject = class _SourceMapScopeRemoteObject extends RemoteObjectImpl {
      #callFrame;
      #scope;
      #range;
      constructor(callFrame, scope2, range2) {
        super(
          callFrame.debuggerModel.runtimeModel(),
          void 0,
          "object",
          void 0,
          null
        );
        this.#callFrame = callFrame;
        this.#scope = scope2;
        this.#range = range2;
      }
      async doGetProperties(_ownProperties, accessorPropertiesOnly, generatePreview) {
        if (accessorPropertiesOnly) {
          return { properties: [], internalProperties: [] };
        }
        const properties2 = [];
        for (const [index2, variable] of this.#scope.variables.entries()) {
          const expression = this.#findExpression(index2);
          if (expression === null) {
            properties2.push(_SourceMapScopeRemoteObject.#unavailableProperty(variable));
            continue;
          }
          const result = await this.#callFrame.evaluate({ expression, generatePreview });
          if ("error" in result || result.exceptionDetails) {
            properties2.push(_SourceMapScopeRemoteObject.#unavailableProperty(variable));
          } else {
            properties2.push(new RemoteObjectProperty(
              variable,
              result.object,
              false,
              false,
              true,
              false
            ));
          }
        }
        return { properties: properties2, internalProperties: [] };
      }
      #findExpression(index2) {
        if (!this.#range) {
          return null;
        }
        const expressionOrSubRanges = this.#range.values[index2];
        if (typeof expressionOrSubRanges === "string") {
          return expressionOrSubRanges;
        }
        if (expressionOrSubRanges === null) {
          return null;
        }
        const pausedPosition = this.#callFrame.location();
        for (const range2 of expressionOrSubRanges) {
          if (contains({ start: range2.from, end: range2.to }, pausedPosition.lineNumber, pausedPosition.columnNumber)) {
            return range2.value ?? null;
          }
        }
        return null;
      }
      static #unavailableProperty(name) {
        return new RemoteObjectProperty(name, null, false, false, true, false);
      }
    };
    SourceMapScopesInfo = class _SourceMapScopesInfo {
      #sourceMap;
      #originalScopes;
      #generatedRanges;
      #cachedVariablesAndBindingsPresent = null;
      constructor(sourceMap2, scopeInfo) {
        this.#sourceMap = sourceMap2;
        this.#originalScopes = scopeInfo.scopes;
        this.#generatedRanges = scopeInfo.ranges;
      }
      static createFromAst(sourceMap2, scopeTree, text) {
        const numSourceUrls = sourceMap2.sourceURLs().length;
        const scopeBySourceUrl = [];
        for (let i = 0; i < numSourceUrls; i++) {
          const scope2 = {
            start: { line: 0, column: 0 },
            end: { line: Number.POSITIVE_INFINITY, column: Number.POSITIVE_INFINITY },
            isStackFrame: false,
            variables: [],
            children: []
          };
          scopeBySourceUrl.push(scope2);
        }
        const { range: range2 } = convertScope(scopeTree, void 0);
        return new _SourceMapScopesInfo(sourceMap2, { scopes: scopeBySourceUrl, ranges: [range2] });
        function insertInScope(parent, newScope) {
          for (const child of parent.children) {
            if (contains2(child, newScope)) {
              insertInScope(child, newScope);
              return;
            }
          }
          const childrenToKeep = [];
          for (const child of parent.children) {
            if (contains2(newScope, child)) {
              newScope.children.push(child);
              child.parent = newScope;
            } else {
              childrenToKeep.push(child);
            }
          }
          const insertIndex = childrenToKeep.findIndex((child) => compareScopes(newScope, child) < 0);
          if (insertIndex === -1) {
            childrenToKeep.push(newScope);
          } else {
            childrenToKeep.splice(insertIndex, 0, newScope);
          }
          parent.children = childrenToKeep;
          newScope.parent = parent;
        }
        function contains2(outer, inner) {
          return comparePositions2(outer.start, inner.start) <= 0 && comparePositions2(outer.end, inner.end) >= 0;
        }
        function compareScopes(a, b) {
          return comparePositions2(a.start, b.start);
        }
        function comparePositions2(a, b) {
          if (a.line !== b.line) {
            return a.line - b.line;
          }
          return a.column - b.column;
        }
        function convertScope(node2, parentRange) {
          const start = positionFromOffset(node2.start);
          const end = positionFromOffset(node2.end);
          const startEntry = sourceMap2.findEntry(start.line, start.column);
          const endEntry = sourceMap2.findEntry(end.line, end.column);
          const sourceIndex = startEntry?.sourceIndex;
          const canMapOriginalPosition = startEntry && endEntry && sourceIndex !== void 0 && startEntry.sourceIndex === endEntry.sourceIndex && startEntry.sourceIndex !== void 0 && sourceIndex >= 0 && sourceIndex < numSourceUrls;
          const isStackFrame = node2.kind === 2 || node2.kind === 4;
          let name = void 0;
          for (const offset of node2.nameMappingLocations ?? []) {
            const position = positionFromOffset(offset);
            const entry = sourceMap2.findEntryExact(position.line, position.column);
            if (entry?.name !== void 0) {
              name = entry.name;
              break;
            }
          }
          let scope2;
          if (canMapOriginalPosition) {
            scope2 = {
              start: { line: startEntry.sourceLineNumber, column: startEntry.sourceColumnNumber },
              end: { line: endEntry.sourceLineNumber, column: endEntry.sourceColumnNumber },
              name: name ?? node2.name,
              isStackFrame,
              variables: [],
              children: []
            };
          }
          const range3 = {
            start,
            end,
            originalScope: scope2,
            isStackFrame,
            isHidden: false,
            values: [],
            children: []
          };
          parentRange?.children.push(range3);
          if (canMapOriginalPosition && scope2) {
            const rootScope = scopeBySourceUrl[sourceIndex];
            insertInScope(rootScope, scope2);
          }
          node2.children.forEach((child) => convertScope(child, range3));
          return { range: range3 };
        }
        function positionFromOffset(offset) {
          const location = text.positionFromOffset(offset);
          return { line: location.lineNumber, column: location.columnNumber };
        }
      }
      addOriginalScopes(scopes) {
        for (const scope2 of scopes) {
          this.#originalScopes.push(scope2);
        }
      }
      addGeneratedRanges(ranges) {
        for (const range2 of ranges) {
          this.#generatedRanges.push(range2);
        }
      }
      hasOriginalScopes(sourceIdx) {
        return Boolean(this.#originalScopes[sourceIdx]);
      }
      isEmpty() {
        const noScopes = this.#originalScopes.every((scope2) => scope2 === null);
        return noScopes && !this.#generatedRanges.length;
      }
      addOriginalScopesAtIndex(sourceIdx, scope2) {
        if (!this.#originalScopes[sourceIdx]) {
          this.#originalScopes[sourceIdx] = scope2;
        } else {
          throw new Error(`Trying to re-augment existing scopes for source at index: ${sourceIdx}`);
        }
      }
      isOutlinedFrame(generatedLine, generatedColumn) {
        const rangeChain = this.#findGeneratedRangeChain(generatedLine, generatedColumn);
        return this.#isOutlinedFrame(rangeChain);
      }
      #isOutlinedFrame(rangeChain) {
        for (let i = rangeChain.length - 1; i >= 0; --i) {
          if (rangeChain[i].isStackFrame) {
            return rangeChain[i].isHidden;
          }
        }
        return false;
      }
      hasInlinedFrames(generatedLine, generatedColumn) {
        const rangeChain = this.#findGeneratedRangeChain(generatedLine, generatedColumn);
        for (let i = rangeChain.length - 1; i >= 0; --i) {
          if (rangeChain[i].isStackFrame) {
            return false;
          }
          if (rangeChain[i].callSite) {
            return true;
          }
        }
        return false;
      }
      findInlinedFunctions(generatedLine, generatedColumn) {
        const rangeChain = this.#findGeneratedRangeChain(generatedLine, generatedColumn);
        const result = {
          inlinedFunctions: [],
          originalFunctionName: ""
        };
        for (let i = rangeChain.length - 1; i >= 0; --i) {
          const range2 = rangeChain[i];
          if (range2.callSite) {
            result.inlinedFunctions.push({
              name: range2.originalScope?.name ?? "",
              callsite: { ...range2.callSite, sourceURL: this.#sourceMap.sourceURLForSourceIndex(range2.callSite.sourceIndex) }
            });
          }
          if (range2.isStackFrame) {
            result.originalFunctionName = range2.originalScope?.name ?? "";
            break;
          }
        }
        return result;
      }
      #findGeneratedRangeChain(line, column) {
        const result = [];
        (function walkRanges(ranges) {
          for (const range2 of ranges) {
            if (!contains(range2, line, column)) {
              continue;
            }
            result.push(range2);
            walkRanges(range2.children);
          }
        })(this.#generatedRanges);
        return result;
      }
      hasVariablesAndBindings() {
        if (this.#cachedVariablesAndBindingsPresent === null) {
          this.#cachedVariablesAndBindingsPresent = this.#areVariablesAndBindingsPresent();
        }
        return this.#cachedVariablesAndBindingsPresent;
      }
      #areVariablesAndBindingsPresent() {
        function walkTree(nodes) {
          for (const node2 of nodes) {
            if (!node2) {
              continue;
            }
            if ("variables" in node2 && node2.variables.length > 0) {
              return true;
            }
            if ("values" in node2 && node2.values.some((v) => v !== null)) {
              return true;
            }
            if (walkTree(node2.children)) {
              return true;
            }
          }
          return false;
        }
        return walkTree(this.#originalScopes) && walkTree(this.#generatedRanges);
      }
      resolveMappedScopeChain(callFrame) {
        const rangeChain = this.#findGeneratedRangeChainForFrame(callFrame);
        const innerMostOriginalScope = rangeChain.at(-1)?.originalScope;
        if (innerMostOriginalScope === void 0) {
          return null;
        }
        let seenFunctionScope = false;
        const result = [];
        for (let originalScope = rangeChain.at(-1)?.originalScope; originalScope; originalScope = originalScope.parent) {
          const range2 = rangeChain.findLast((r) => r.originalScope === originalScope);
          const isFunctionScope = originalScope.kind === "function";
          const isInnerMostFunction = isFunctionScope && !seenFunctionScope;
          const returnValue = isInnerMostFunction ? callFrame.returnValue() : null;
          result.push(new SourceMapScopeChainEntry(callFrame, originalScope, range2, isInnerMostFunction, returnValue ?? void 0));
          seenFunctionScope ||= isFunctionScope;
        }
        if (callFrame.returnValue() !== null) {
          while (result.length && result[0].type() !== "local") {
            result.shift();
          }
        }
        return result;
      }
      #findGeneratedRangeChainForFrame(callFrame) {
        const rangeChain = this.#findGeneratedRangeChain(callFrame.location().lineNumber, callFrame.location().columnNumber);
        if (callFrame.inlineFrameIndex === 0) {
          return rangeChain;
        }
        for (let inlineIndex = 0; inlineIndex < callFrame.inlineFrameIndex; ) {
          const range2 = rangeChain.pop();
          if (range2?.callSite) {
            ++inlineIndex;
          }
        }
        return rangeChain;
      }
      findOriginalFunctionName(position) {
        const originalInnerMostScope = this.findOriginalFunctionScope(position)?.scope ?? void 0;
        return this.#findFunctionNameInOriginalScopeChain(originalInnerMostScope);
      }
      findOriginalFunctionScope({ line, column }) {
        let originalInnerMostScope;
        if (this.#generatedRanges.length > 0) {
          const rangeChain = this.#findGeneratedRangeChain(line, column);
          originalInnerMostScope = rangeChain.at(-1)?.originalScope;
        } else {
          const entry = this.#sourceMap.findEntry(line, column);
          if (entry?.sourceIndex === void 0) {
            return null;
          }
          originalInnerMostScope = this.#findOriginalScopeChain({ sourceIndex: entry.sourceIndex, line: entry.sourceLineNumber, column: entry.sourceColumnNumber }).at(-1);
        }
        if (!originalInnerMostScope) {
          return null;
        }
        const functionScope = this.#findFunctionScopeInOriginalScopeChain(originalInnerMostScope);
        if (!functionScope) {
          return null;
        }
        let rootScope = functionScope;
        while (rootScope.parent) {
          rootScope = rootScope.parent;
        }
        const sourceIndex = this.#originalScopes.indexOf(rootScope);
        const url = sourceIndex !== -1 ? this.#sourceMap.sourceURLForSourceIndex(sourceIndex) : void 0;
        return functionScope ? { scope: functionScope, url } : null;
      }
      #findOriginalScopeChain({ sourceIndex, line, column }) {
        const scope2 = this.#originalScopes[sourceIndex];
        if (!scope2) {
          return [];
        }
        const result = [];
        (function walkScopes(scopes) {
          for (const scope3 of scopes) {
            if (!contains(scope3, line, column)) {
              continue;
            }
            result.push(scope3);
            walkScopes(scope3.children);
          }
        })([scope2]);
        return result;
      }
      #findFunctionScopeInOriginalScopeChain(innerOriginalScope) {
        for (let originalScope = innerOriginalScope; originalScope; originalScope = originalScope.parent) {
          if (originalScope.isStackFrame) {
            return originalScope;
          }
        }
        return null;
      }
      #findFunctionNameInOriginalScopeChain(innerOriginalScope) {
        const functionScope = this.#findFunctionScopeInOriginalScopeChain(innerOriginalScope);
        if (!functionScope) {
          return null;
        }
        return functionScope.name ?? "";
      }
      translateCallSite(generatedLine, generatedColumn) {
        const rangeChain = this.#findGeneratedRangeChain(generatedLine, generatedColumn);
        if (this.#isOutlinedFrame(rangeChain)) {
          throw new Error("SourceMapScopesInfo is unable to translate an outlined function by itself");
        }
        const mapping = this.#sourceMap.findEntry(generatedLine, generatedColumn);
        if (mapping?.sourceIndex === void 0) {
          return [];
        }
        const result = [{
          line: mapping.sourceLineNumber,
          column: mapping.sourceColumnNumber,
          name: this.findOriginalFunctionName({ line: generatedLine, column: generatedColumn }) ?? void 0,
          url: mapping.sourceURL
        }];
        for (let i = rangeChain.length - 1; i >= 0 && !rangeChain[i].isStackFrame; --i) {
          const range2 = rangeChain[i];
          if (!range2.callSite) {
            continue;
          }
          const originalScopeChain = this.#findOriginalScopeChain(range2.callSite);
          result.push({
            line: range2.callSite.line,
            column: range2.callSite.column,
            name: this.#findFunctionNameInOriginalScopeChain(originalScopeChain.at(-1)) ?? void 0,
            url: this.#sourceMap.sourceURLForSourceIndex(range2.callSite.sourceIndex)
          });
        }
        return result;
      }
    };
    SourceMapEntry = class {
      lineNumber;
      columnNumber;
      sourceIndex;
      sourceURL;
      sourceLineNumber;
      sourceColumnNumber;
      name;
      constructor(lineNumber, columnNumber, sourceIndex, sourceURL, sourceLineNumber, sourceColumnNumber, name) {
        this.lineNumber = lineNumber;
        this.columnNumber = columnNumber;
        this.sourceIndex = sourceIndex;
        this.sourceURL = sourceURL;
        this.sourceLineNumber = sourceLineNumber;
        this.sourceColumnNumber = sourceColumnNumber;
        this.name = name;
      }
      static compare(entry1, entry2) {
        if (entry1.lineNumber !== entry2.lineNumber) {
          return entry1.lineNumber - entry2.lineNumber;
        }
        return entry1.columnNumber - entry2.columnNumber;
      }
    };
    SourceMap = class {
      static retainRawSourceMaps = false;
      #json;
      #compiledURL;
      #sourceMappingURL;
      #baseURL;
      #mappings = null;
      #sourceInfos = [];
      #sourceInfoByURL = /* @__PURE__ */ new Map();
      #script;
      #scopesInfo = null;
      #debugId;
      #scopesFallbackPromise;
      constructor(compiledURL, sourceMappingURL, payload, script) {
        this.#json = payload;
        this.#script = script;
        this.#compiledURL = compiledURL;
        this.#sourceMappingURL = sourceMappingURL;
        this.#baseURL = schemeIs2(sourceMappingURL, "data:") ? compiledURL : sourceMappingURL;
        this.#debugId = "debugId" in payload ? payload.debugId : void 0;
        if ("sections" in this.#json) {
          if (this.#json.sections.find((section) => "url" in section)) {
            Console.instance().warn(`SourceMap "${sourceMappingURL}" contains unsupported "URL" field in one of its sections.`);
          }
        }
        this.eachSection(this.parseSources.bind(this));
      }
      json() {
        return this.#json;
      }
      augmentWithScopes(scriptUrl, ranges) {
        this.#ensureSourceMapProcessed();
        if (this.#json && this.#json.version > 3) {
          throw new Error("Only support augmenting source maps up to version 3.");
        }
        const sourceIdx = this.#sourceIndex(scriptUrl);
        if (sourceIdx >= 0) {
          if (!this.#scopesInfo) {
            this.#scopesInfo = new SourceMapScopesInfo(this, { scopes: [], ranges: [] });
          }
          if (!this.#scopesInfo.hasOriginalScopes(sourceIdx)) {
            const originalScopes = buildOriginalScopes(ranges);
            this.#scopesInfo.addOriginalScopesAtIndex(sourceIdx, originalScopes);
          }
        } else {
          throw new Error(`Could not find sourceURL ${scriptUrl} in sourceMap`);
        }
      }
      #sourceIndex(sourceURL) {
        return this.#sourceInfos.findIndex((info) => info.sourceURL === sourceURL);
      }
      compiledURL() {
        return this.#compiledURL;
      }
      url() {
        return this.#sourceMappingURL;
      }
      debugId() {
        return this.#debugId ?? null;
      }
      sourceURLForSourceIndex(index2) {
        return this.#sourceInfos[index2]?.sourceURL;
      }
      sourceURLs() {
        return [...this.#sourceInfoByURL.keys()];
      }
      embeddedContentByURL(sourceURL) {
        const entry = this.#sourceInfoByURL.get(sourceURL);
        if (!entry) {
          return null;
        }
        return entry.content;
      }
      hasScopeInfo() {
        this.#ensureSourceMapProcessed();
        return this.#scopesInfo !== null && !this.#scopesInfo.isEmpty();
      }
      waitForScopeInfo() {
        this.#ensureSourceMapProcessed();
        return this.#scopesFallbackPromise ?? Promise.resolve();
      }
      findEntry(lineNumber, columnNumber, inlineFrameIndex) {
        this.#ensureSourceMapProcessed();
        if (inlineFrameIndex && this.#scopesInfo !== null) {
          const { inlinedFunctions } = this.#scopesInfo.findInlinedFunctions(lineNumber, columnNumber);
          const { callsite } = inlinedFunctions[inlineFrameIndex - 1];
          if (!callsite) {
            console.error("Malformed source map. Expected to have a callsite info for index", inlineFrameIndex);
            return null;
          }
          return {
            lineNumber,
            columnNumber,
            sourceIndex: callsite.sourceIndex,
            sourceURL: this.sourceURLs()[callsite.sourceIndex],
            sourceLineNumber: callsite.line,
            sourceColumnNumber: callsite.column
          };
        }
        const mappings = this.mappings();
        const index2 = upperBound2(mappings, void 0, (_, entry) => lineNumber - entry.lineNumber || columnNumber - entry.columnNumber);
        return index2 ? mappings[index2 - 1] : null;
      }
      findEntryExact(lineNumber, columnNumber) {
        const entry = this.findEntry(lineNumber, columnNumber);
        if (entry?.lineNumber === lineNumber && entry.columnNumber === columnNumber) {
          return entry;
        }
        return null;
      }
      findEntryRanges(lineNumber, columnNumber) {
        const mappings = this.mappings();
        const endIndex = upperBound2(mappings, void 0, (_, entry) => lineNumber - entry.lineNumber || columnNumber - entry.columnNumber);
        if (!endIndex) {
          return null;
        }
        const startIndex = endIndex - 1;
        const sourceURL = mappings[startIndex].sourceURL;
        if (!sourceURL) {
          return null;
        }
        const endLine = endIndex < mappings.length ? mappings[endIndex].lineNumber : 2 ** 31 - 1;
        const endColumn = endIndex < mappings.length ? mappings[endIndex].columnNumber : 2 ** 31 - 1;
        const range2 = new TextRange(mappings[startIndex].lineNumber, mappings[startIndex].columnNumber, endLine, endColumn);
        const reverseMappings = this.reversedMappings(sourceURL);
        const startSourceLine = mappings[startIndex].sourceLineNumber;
        const startSourceColumn = mappings[startIndex].sourceColumnNumber;
        const endReverseIndex = upperBound2(reverseMappings, void 0, (_, i) => startSourceLine - mappings[i].sourceLineNumber || startSourceColumn - mappings[i].sourceColumnNumber);
        if (!endReverseIndex) {
          return null;
        }
        const endSourceLine = endReverseIndex < reverseMappings.length ? mappings[reverseMappings[endReverseIndex]].sourceLineNumber : 2 ** 31 - 1;
        const endSourceColumn = endReverseIndex < reverseMappings.length ? mappings[reverseMappings[endReverseIndex]].sourceColumnNumber : 2 ** 31 - 1;
        const sourceRange = new TextRange(startSourceLine, startSourceColumn, endSourceLine, endSourceColumn);
        return { range: range2, sourceRange, sourceURL };
      }
      sourceLineMapping(sourceURL, lineNumber, columnNumber) {
        const mappings = this.mappings();
        const reverseMappings = this.reversedMappings(sourceURL);
        const first2 = lowerBound2(reverseMappings, lineNumber, lineComparator);
        const last2 = upperBound2(reverseMappings, lineNumber, lineComparator);
        if (first2 >= reverseMappings.length || mappings[reverseMappings[first2]].sourceLineNumber !== lineNumber) {
          return null;
        }
        const columnMappings = reverseMappings.slice(first2, last2);
        if (!columnMappings.length) {
          return null;
        }
        const index2 = lowerBound2(columnMappings, columnNumber, (columnNumber2, i) => columnNumber2 - mappings[i].sourceColumnNumber);
        return index2 >= columnMappings.length ? mappings[columnMappings[columnMappings.length - 1]] : mappings[columnMappings[index2]];
        function lineComparator(lineNumber2, i) {
          return lineNumber2 - mappings[i].sourceLineNumber;
        }
      }
      findReverseIndices(sourceURL, lineNumber, columnNumber) {
        const mappings = this.mappings();
        const reverseMappings = this.reversedMappings(sourceURL);
        const endIndex = upperBound2(reverseMappings, void 0, (_, i) => lineNumber - mappings[i].sourceLineNumber || columnNumber - mappings[i].sourceColumnNumber);
        let startIndex = endIndex;
        while (startIndex > 0 && mappings[reverseMappings[startIndex - 1]].sourceLineNumber === mappings[reverseMappings[endIndex - 1]].sourceLineNumber && mappings[reverseMappings[startIndex - 1]].sourceColumnNumber === mappings[reverseMappings[endIndex - 1]].sourceColumnNumber) {
          --startIndex;
        }
        return reverseMappings.slice(startIndex, endIndex);
      }
      findReverseEntries(sourceURL, lineNumber, columnNumber) {
        const mappings = this.mappings();
        return this.findReverseIndices(sourceURL, lineNumber, columnNumber).map((i) => mappings[i]);
      }
      findReverseRanges(sourceURL, lineNumber, columnNumber) {
        const mappings = this.mappings();
        const indices = this.findReverseIndices(sourceURL, lineNumber, columnNumber);
        const ranges = [];
        for (let i = 0; i < indices.length; ++i) {
          const startIndex = indices[i];
          let endIndex = startIndex + 1;
          while (i + 1 < indices.length && endIndex === indices[i + 1]) {
            ++endIndex;
            ++i;
          }
          const startLine = mappings[startIndex].lineNumber;
          const startColumn = mappings[startIndex].columnNumber;
          const endLine = endIndex < mappings.length ? mappings[endIndex].lineNumber : 2 ** 31 - 1;
          const endColumn = endIndex < mappings.length ? mappings[endIndex].columnNumber : 2 ** 31 - 1;
          ranges.push(new TextRange(startLine, startColumn, endLine, endColumn));
        }
        return ranges;
      }
      mappings() {
        this.#ensureSourceMapProcessed();
        return this.#mappings ?? [];
      }
      async #buildScopesFallback() {
        const scopeTreeAndText = this.#script ? await scopeTreeForScript(this.#script) : null;
        if (!scopeTreeAndText) {
          return null;
        }
        const { scopeTree, text } = scopeTreeAndText;
        return SourceMapScopesInfo.createFromAst(this, scopeTree, text);
      }
      reversedMappings(sourceURL) {
        this.#ensureSourceMapProcessed();
        return this.#sourceInfoByURL.get(sourceURL)?.reverseMappings ?? [];
      }
      #ensureSourceMapProcessed() {
        if (this.#mappings === null) {
          this.#mappings = [];
          try {
            this.eachSection(this.parseMap.bind(this));
            if (!this.hasScopeInfo()) {
              this.#scopesFallbackPromise = this.#buildScopesFallback().then((info) => {
                this.#scopesInfo = info;
              });
            }
          } catch (e) {
            console.error("Failed to parse source map", e);
            this.#mappings = [];
          }
          this.mappings().sort(SourceMapEntry.compare);
          this.#computeReverseMappings(this.#mappings);
        }
        if (!_a$5.retainRawSourceMaps) {
          this.#json = null;
        }
      }
      #computeReverseMappings(mappings) {
        const reverseMappingsPerUrl = /* @__PURE__ */ new Map();
        for (let i = 0; i < mappings.length; i++) {
          const entryUrl = mappings[i]?.sourceURL;
          if (!entryUrl) {
            continue;
          }
          let reverseMap = reverseMappingsPerUrl.get(entryUrl);
          if (!reverseMap) {
            reverseMap = [];
            reverseMappingsPerUrl.set(entryUrl, reverseMap);
          }
          reverseMap.push(i);
        }
        for (const [url, reverseMap] of reverseMappingsPerUrl.entries()) {
          const info = this.#sourceInfoByURL.get(url);
          if (!info) {
            continue;
          }
          reverseMap.sort(sourceMappingComparator);
          info.reverseMappings = reverseMap;
        }
        function sourceMappingComparator(indexA, indexB) {
          const a = mappings[indexA];
          const b = mappings[indexB];
          return a.sourceLineNumber - b.sourceLineNumber || a.sourceColumnNumber - b.sourceColumnNumber || a.lineNumber - b.lineNumber || a.columnNumber - b.columnNumber;
        }
      }
      eachSection(callback) {
        if (!this.#json) {
          return;
        }
        if ("sections" in this.#json) {
          let sourcesIndex = 0;
          for (const section of this.#json.sections) {
            if ("map" in section) {
              callback(section.map, sourcesIndex, section.offset.line, section.offset.column);
              sourcesIndex += section.map.sources.length;
            }
          }
        } else {
          callback(this.#json, 0, 0, 0);
        }
      }
      parseSources(sourceMap2) {
        const sourceRoot = sourceMap2.sourceRoot ?? "";
        const ignoreList = new Set(sourceMap2.ignoreList ?? sourceMap2.x_google_ignoreList);
        for (let i = 0; i < sourceMap2.sources.length; ++i) {
          let href = sourceMap2.sources[i];
          if (ParsedURL2.isRelativeURL(href)) {
            if (sourceRoot && !sourceRoot.endsWith("/") && href && !href.startsWith("/")) {
              href = sourceRoot.concat("/", href);
            } else {
              href = sourceRoot.concat(href);
            }
          }
          const url = ParsedURL2.completeURL(this.#baseURL, href) || href;
          const source2 = sourceMap2.sourcesContent?.[i];
          const sourceInfo = {
            sourceURL: url,
            content: source2 ?? null,
            ignoreListHint: ignoreList.has(i),
            reverseMappings: null
          };
          this.#sourceInfos.push(sourceInfo);
          if (!this.#sourceInfoByURL.has(url)) {
            this.#sourceInfoByURL.set(url, sourceInfo);
          }
        }
      }
      parseMap(map2, baseSourceIndex, baseLineNumber, baseColumnNumber) {
        let sourceIndex = baseSourceIndex;
        let lineNumber = baseLineNumber;
        let columnNumber = baseColumnNumber;
        let sourceLineNumber = 0;
        let sourceColumnNumber = 0;
        let nameIndex = 0;
        const names3 = map2.names ?? [];
        const tokenIter = new TokenIterator2(map2.mappings);
        let sourceURL = this.#sourceInfos[sourceIndex]?.sourceURL;
        while (true) {
          if (tokenIter.peek() === ",") {
            tokenIter.next();
          } else {
            while (tokenIter.peek() === ";") {
              lineNumber += 1;
              columnNumber = 0;
              tokenIter.next();
            }
            if (!tokenIter.hasNext()) {
              break;
            }
          }
          columnNumber += tokenIter.nextVLQ();
          if (!tokenIter.hasNext() || this.isSeparator(tokenIter.peek())) {
            this.mappings().push(new SourceMapEntry(lineNumber, columnNumber));
            continue;
          }
          const sourceIndexDelta = tokenIter.nextVLQ();
          if (sourceIndexDelta) {
            sourceIndex += sourceIndexDelta;
            sourceURL = this.#sourceInfos[sourceIndex]?.sourceURL;
          }
          sourceLineNumber += tokenIter.nextVLQ();
          sourceColumnNumber += tokenIter.nextVLQ();
          if (!tokenIter.hasNext() || this.isSeparator(tokenIter.peek())) {
            this.mappings().push(new SourceMapEntry(lineNumber, columnNumber, sourceIndex, sourceURL, sourceLineNumber, sourceColumnNumber));
            continue;
          }
          nameIndex += tokenIter.nextVLQ();
          this.mappings().push(new SourceMapEntry(lineNumber, columnNumber, sourceIndex, sourceURL, sourceLineNumber, sourceColumnNumber, names3[nameIndex]));
        }
        if (experiments.isEnabled(ExperimentName.USE_SOURCE_MAP_SCOPES)) {
          if (!this.#scopesInfo) {
            this.#scopesInfo = new SourceMapScopesInfo(this, { scopes: [], ranges: [] });
          }
          if (map2.scopes) {
            const { scopes, ranges } = decode(map2, { mode: 2, generatedOffset: { line: baseLineNumber, column: baseColumnNumber } });
            this.#scopesInfo.addOriginalScopes(scopes);
            this.#scopesInfo.addGeneratedRanges(ranges);
          } else if (map2.x_com_bloomberg_sourcesFunctionMappings) {
            const originalScopes = this.parseBloombergScopes(map2);
            this.#scopesInfo.addOriginalScopes(originalScopes);
          } else {
            this.#scopesInfo.addOriginalScopes(new Array(map2.sources.length).fill(null));
          }
        }
      }
      parseBloombergScopes(map2) {
        const scopeList = map2.x_com_bloomberg_sourcesFunctionMappings;
        if (!scopeList) {
          throw new Error("Cant decode pasta scopes without x_com_bloomberg_sourcesFunctionMappings field");
        } else if (scopeList.length !== map2.sources.length) {
          throw new Error(`x_com_bloomberg_sourcesFunctionMappings must have ${map2.sources.length} scope trees`);
        }
        const names3 = map2.names ?? [];
        return scopeList.map((rawScopes) => {
          if (!rawScopes) {
            return null;
          }
          const ranges = decodePastaRanges(rawScopes, names3);
          return buildOriginalScopes(ranges);
        });
      }
      isSeparator(char) {
        return char === "," || char === ";";
      }
      reverseMapTextRanges(url, textRange) {
        const reverseMappings = this.reversedMappings(url);
        const mappings = this.mappings();
        if (reverseMappings.length === 0) {
          return [];
        }
        let startReverseIndex = lowerBound2(reverseMappings, textRange, ({ startLine, startColumn }, index2) => {
          const { sourceLineNumber, sourceColumnNumber } = mappings[index2];
          return startLine - sourceLineNumber || startColumn - sourceColumnNumber;
        });
        while (startReverseIndex === reverseMappings.length || startReverseIndex > 0 && (mappings[reverseMappings[startReverseIndex]].sourceLineNumber > textRange.startLine || mappings[reverseMappings[startReverseIndex]].sourceColumnNumber > textRange.startColumn)) {
          startReverseIndex--;
        }
        let endReverseIndex = startReverseIndex + 1;
        for (; endReverseIndex < reverseMappings.length; ++endReverseIndex) {
          const { sourceLineNumber, sourceColumnNumber } = mappings[reverseMappings[endReverseIndex]];
          if (sourceLineNumber < textRange.endLine || sourceLineNumber === textRange.endLine && sourceColumnNumber < textRange.endColumn) {
            continue;
          }
          break;
        }
        const ranges = [];
        for (let reverseIndex = startReverseIndex; reverseIndex < endReverseIndex; ++reverseIndex) {
          const startIndex = reverseMappings[reverseIndex], endIndex = startIndex + 1;
          const range2 = TextRange.createUnboundedFromLocation(mappings[startIndex].lineNumber, mappings[startIndex].columnNumber);
          if (endIndex < mappings.length) {
            range2.endLine = mappings[endIndex].lineNumber;
            range2.endColumn = mappings[endIndex].columnNumber;
          }
          ranges.push(range2);
        }
        ranges.sort(TextRange.comparator);
        let j = 0;
        for (let i = 1; i < ranges.length; ++i) {
          if (ranges[j].immediatelyPrecedes(ranges[i])) {
            ranges[j].endLine = ranges[i].endLine;
            ranges[j].endColumn = ranges[i].endColumn;
          } else {
            ranges[++j] = ranges[i];
          }
        }
        ranges.length = j + 1;
        return ranges;
      }
      mapsOrigin() {
        const mappings = this.mappings();
        if (mappings.length > 0) {
          const firstEntry = mappings[0];
          return firstEntry?.lineNumber === 0 || firstEntry.columnNumber === 0;
        }
        return false;
      }
      hasIgnoreListHint(sourceURL) {
        return this.#sourceInfoByURL.get(sourceURL)?.ignoreListHint ?? false;
      }
      findRanges(predicate, options2) {
        const mappings = this.mappings();
        const ranges = [];
        if (!mappings.length) {
          return [];
        }
        let current = null;
        if ((mappings[0].lineNumber !== 0 || mappings[0].columnNumber !== 0) && options2?.isStartMatching) {
          current = TextRange.createUnboundedFromLocation(0, 0);
          ranges.push(current);
        }
        for (const { sourceURL, lineNumber, columnNumber } of mappings) {
          const ignoreListHint = sourceURL && predicate(sourceURL);
          if (!current && ignoreListHint) {
            current = TextRange.createUnboundedFromLocation(lineNumber, columnNumber);
            ranges.push(current);
            continue;
          }
          if (current && !ignoreListHint) {
            current.endLine = lineNumber;
            current.endColumn = columnNumber;
            current = null;
          }
        }
        return ranges;
      }
      compatibleForURL(sourceURL, other) {
        return this.embeddedContentByURL(sourceURL) === other.embeddedContentByURL(sourceURL) && this.hasIgnoreListHint(sourceURL) === other.hasIgnoreListHint(sourceURL);
      }
      resolveScopeChain(frame) {
        this.#ensureSourceMapProcessed();
        if (this.#scopesInfo === null) {
          return null;
        }
        return this.#scopesInfo.resolveMappedScopeChain(frame);
      }
      findOriginalFunctionName(position) {
        this.#ensureSourceMapProcessed();
        return this.#scopesInfo?.findOriginalFunctionName(position) ?? null;
      }
      findOriginalFunctionScope(position) {
        this.#ensureSourceMapProcessed();
        return this.#scopesInfo?.findOriginalFunctionScope(position) ?? null;
      }
      isOutlinedFrame(generatedLine, generatedColumn) {
        this.#ensureSourceMapProcessed();
        return this.#scopesInfo?.isOutlinedFrame(generatedLine, generatedColumn) ?? false;
      }
      hasInlinedFrames(generatedLine, generatedColumn) {
        this.#ensureSourceMapProcessed();
        return this.#scopesInfo?.hasInlinedFrames(generatedLine, generatedColumn) ?? false;
      }
      translateCallSite(generatedLine, generatedColumn) {
        this.#ensureSourceMapProcessed();
        return this.#scopesInfo?.translateCallSite(generatedLine, generatedColumn) ?? [];
      }
    };
    _a$5 = SourceMap;
    VLQ_BASE_SHIFT = 5;
    VLQ_BASE_MASK = (1 << 5) - 1;
    VLQ_CONTINUATION_MASK = 1 << 5;
    TokenIterator2 = class {
      #string;
      #position;
      constructor(string2) {
        this.#string = string2;
        this.#position = 0;
      }
      next() {
        return this.#string.charAt(this.#position++);
      }
      nextCharCode() {
        return this.#string.charCodeAt(this.#position++);
      }
      peek() {
        return this.#string.charAt(this.#position);
      }
      hasNext() {
        return this.#position < this.#string.length;
      }
      nextVLQ() {
        let result = 0;
        let shift = 0;
        let digit = VLQ_CONTINUATION_MASK;
        while (digit & VLQ_CONTINUATION_MASK) {
          if (!this.hasNext()) {
            throw new Error("Unexpected end of input while decodling VLQ number!");
          }
          const charCode = this.nextCharCode();
          digit = BASE64_CODES$1[charCode];
          if (charCode !== 65 && digit === 0) {
            throw new Error(`Unexpected char '${String.fromCharCode(charCode)}' encountered while decoding`);
          }
          result += (digit & VLQ_BASE_MASK) << shift;
          shift += VLQ_BASE_SHIFT;
        }
        const negative = result & 1;
        result >>= 1;
        return negative ? -result : result;
      }
      peekVLQ() {
        const pos = this.#position;
        try {
          return this.nextVLQ();
        } catch {
          return null;
        } finally {
          this.#position = pos;
        }
      }
    };
    SourceMapCache = class _SourceMapCache {
      static #INSTANCE = new _SourceMapCache("devtools-source-map-cache");
      static instance() {
        if (typeof window === "undefined") {
          return IN_MEMORY_INSTANCE;
        }
        return this.#INSTANCE;
      }
      static createForTest(name) {
        return new _SourceMapCache(name);
      }
      #name;
      #cachePromise;
      constructor(name) {
        this.#name = name;
      }
      async set(debugId, sourceMap2) {
        const cache = await this.#cache();
        await cache.put(_SourceMapCache.#urlForDebugId(debugId), new Response(JSON.stringify(sourceMap2)));
      }
      async get(debugId) {
        const cache = await this.#cache();
        const response = await cache.match(_SourceMapCache.#urlForDebugId(debugId));
        return await response?.json() ?? null;
      }
      async #cache() {
        if (this.#cachePromise) {
          return await this.#cachePromise;
        }
        this.#cachePromise = window.caches.open(this.#name);
        return await this.#cachePromise;
      }
      static #urlForDebugId(debugId) {
        return "http://debug.id/" + encodeURIComponent(debugId);
      }
      async disposeForTest() {
        await window.caches.delete(this.#name);
      }
    };
    IN_MEMORY_INSTANCE = new class {
      #cache = /* @__PURE__ */ new Map();
      async set(debugId, sourceMap2) {
        this.#cache.set(debugId, sourceMap2);
      }
      async get(debugId) {
        return this.#cache.get(debugId) ?? null;
      }
      async disposeForTest() {
      }
    }();
    SourceMapManager = class _SourceMapManager extends ObjectWrapper {
      #target;
      #factory;
      #isEnabled = true;
      #clientData = /* @__PURE__ */ new Map();
      #sourceMaps = /* @__PURE__ */ new Map();
      #attachingClient = null;
      constructor(target, factory) {
        super();
        this.#target = target;
        this.#factory = factory ?? ((compiledURL, sourceMappingURL, payload) => new SourceMap(compiledURL, sourceMappingURL, payload));
      }
      setEnabled(isEnabled3) {
        if (isEnabled3 === this.#isEnabled) {
          return;
        }
        const clientData = [...this.#clientData.entries()];
        for (const [client] of clientData) {
          this.detachSourceMap(client);
        }
        this.#isEnabled = isEnabled3;
        for (const [client, { relativeSourceURL, relativeSourceMapURL }] of clientData) {
          this.attachSourceMap(client, relativeSourceURL, relativeSourceMapURL);
        }
      }
      static getBaseUrl(target) {
        while (target && target.type() !== Type$2.FRAME) {
          target = target.parentTarget();
        }
        return target?.inspectedURL() ?? EmptyUrlString;
      }
      static resolveRelativeSourceURL(target, url) {
        url = ParsedURL2.completeURL(_SourceMapManager.getBaseUrl(target), url) ?? url;
        return url;
      }
      sourceMapForClient(client) {
        return this.#clientData.get(client)?.sourceMap;
      }
      sourceMapForClientPromise(client) {
        const clientData = this.#clientData.get(client);
        if (!clientData) {
          return Promise.resolve(void 0);
        }
        return clientData.sourceMapPromise;
      }
      clientForSourceMap(sourceMap2) {
        return this.#sourceMaps.get(sourceMap2);
      }
      attachSourceMap(client, relativeSourceURL, relativeSourceMapURL) {
        if (this.#clientData.has(client)) {
          throw new Error("SourceMap is already attached or being attached to client");
        }
        if (!relativeSourceMapURL) {
          return;
        }
        let clientData = {
          relativeSourceURL,
          relativeSourceMapURL,
          sourceMapPromise: Promise.resolve(void 0)
        };
        if (this.#isEnabled) {
          const sourceURL = _SourceMapManager.resolveRelativeSourceURL(this.#target, relativeSourceURL);
          const sourceMapURL = ParsedURL2.completeURL(sourceURL, relativeSourceMapURL);
          if (sourceMapURL) {
            if (this.#attachingClient) {
              console.error("Attaching source map may cancel previously attaching source map");
            }
            this.#attachingClient = client;
            this.dispatchEventToListeners(Events$b.SourceMapWillAttach, { client });
            if (this.#attachingClient === client) {
              this.#attachingClient = null;
              const initiator = client.createPageResourceLoadInitiator();
              const resourceLoader = this.#target.targetManager().context.get(PageResourceLoader);
              clientData.sourceMapPromise = loadSourceMap(resourceLoader, sourceMapURL, client.debugId(), initiator).then((payload) => {
                const sourceMap2 = this.#factory(sourceURL, sourceMapURL, payload, client);
                if (this.#clientData.get(client) === clientData) {
                  clientData.sourceMap = sourceMap2;
                  this.#sourceMaps.set(sourceMap2, client);
                  this.dispatchEventToListeners(Events$b.SourceMapAttached, { client, sourceMap: sourceMap2 });
                }
                return sourceMap2;
              }, () => {
                if (this.#clientData.get(client) === clientData) {
                  this.dispatchEventToListeners(Events$b.SourceMapFailedToAttach, { client });
                }
                return void 0;
              });
            } else {
              if (this.#attachingClient) {
                console.error("Cancelling source map attach because another source map is attaching");
              }
              clientData = null;
              this.dispatchEventToListeners(Events$b.SourceMapFailedToAttach, { client });
            }
          }
        }
        if (clientData) {
          this.#clientData.set(client, clientData);
        }
      }
      cancelAttachSourceMap(client) {
        if (client === this.#attachingClient) {
          this.#attachingClient = null;
        } else if (this.#attachingClient) {
          console.error("cancel attach source map requested but a different source map was being attached");
        } else {
          console.error("cancel attach source map requested but no source map was being attached");
        }
      }
      detachSourceMap(client) {
        const clientData = this.#clientData.get(client);
        if (!clientData) {
          return;
        }
        this.#clientData.delete(client);
        if (!this.#isEnabled) {
          return;
        }
        const { sourceMap: sourceMap2 } = clientData;
        if (sourceMap2) {
          this.#sourceMaps.delete(sourceMap2);
          this.dispatchEventToListeners(Events$b.SourceMapDetached, { client, sourceMap: sourceMap2 });
        } else {
          this.dispatchEventToListeners(Events$b.SourceMapFailedToAttach, { client });
        }
      }
      waitForSourceMapsProcessedForTest() {
        return Promise.all(this.#sourceMaps.keys().map((sourceMap2) => sourceMap2.waitForScopeInfo()));
      }
    };
    (function(Events2) {
      Events2["SourceMapWillAttach"] = "SourceMapWillAttach";
      Events2["SourceMapFailedToAttach"] = "SourceMapFailedToAttach";
      Events2["SourceMapAttached"] = "SourceMapAttached";
      Events2["SourceMapDetached"] = "SourceMapDetached";
    })(Events$b || (Events$b = {}));
    CSSModel = class _CSSModel extends SDKModel {
      agent;
      #domModel;
      #fontFaces = /* @__PURE__ */ new Map();
      #originalStyleSheetText = /* @__PURE__ */ new Map();
      #resourceTreeModel;
      #sourceMapManager;
      #styleLoader;
      #stylePollingThrottler = new Throttler(StylePollingInterval);
      #styleSheetIdsForURL = /* @__PURE__ */ new Map();
      #styleSheetIdToHeader = /* @__PURE__ */ new Map();
      #cachedMatchedCascadeNode = null;
      #cachedMatchedCascadePromise = null;
      #cssPropertyTracker = null;
      #isCSSPropertyTrackingEnabled = false;
      #isEnabled = false;
      #isRuleUsageTrackingEnabled = false;
      #isTrackingRequestPending = false;
      #colorScheme;
      constructor(target) {
        super(target);
        this.#domModel = target.model(DOMModel);
        this.#sourceMapManager = new SourceMapManager(target);
        this.agent = target.cssAgent();
        this.#styleLoader = new ComputedStyleLoader(this);
        this.#resourceTreeModel = target.model(ResourceTreeModel);
        if (this.#resourceTreeModel) {
          this.#resourceTreeModel.addEventListener(Events$6.PrimaryPageChanged, this.onPrimaryPageChanged, this);
        }
        target.registerCSSDispatcher(new CSSDispatcher(this));
        if (!target.suspended()) {
          void this.enable();
        }
        this.#sourceMapManager.setEnabled(Settings.instance().moduleSetting("css-source-maps-enabled").get());
        Settings.instance().moduleSetting("css-source-maps-enabled").addChangeListener((event) => this.#sourceMapManager.setEnabled(event.data));
      }
      async colorScheme() {
        if (!this.#colorScheme) {
          const colorSchemeResponse = await this.domModel()?.target().runtimeAgent().invoke_evaluate({ expression: 'window.matchMedia && window.matchMedia("(prefers-color-scheme: dark)").matches' });
          if (colorSchemeResponse && !colorSchemeResponse.exceptionDetails && !colorSchemeResponse.getError()) {
            this.#colorScheme = colorSchemeResponse.result.value ? "dark" : "light";
          }
        }
        return this.#colorScheme;
      }
      async resolveValues(propertyName, nodeId, ...values) {
        if (propertyName && cssMetadata().getLonghands(propertyName)?.length) {
          return null;
        }
        const response = await this.agent.invoke_resolveValues({ values, nodeId, propertyName });
        if (response.getError()) {
          return null;
        }
        return response.results;
      }
      headersForSourceURL(sourceURL) {
        const headers = [];
        for (const headerId of this.getStyleSheetIdsForURL(sourceURL)) {
          const header = this.styleSheetHeaderForId(headerId);
          if (header) {
            headers.push(header);
          }
        }
        return headers;
      }
      createRawLocationsByURL(sourceURL, lineNumber, columnNumber = 0) {
        const headers = this.headersForSourceURL(sourceURL);
        headers.sort(stylesheetComparator);
        const endIndex = upperBound2(headers, void 0, (_, header) => lineNumber - header.startLine || columnNumber - header.startColumn);
        if (!endIndex) {
          return [];
        }
        const locations = [];
        const last2 = headers[endIndex - 1];
        for (let index2 = endIndex - 1; index2 >= 0 && headers[index2].startLine === last2.startLine && headers[index2].startColumn === last2.startColumn; --index2) {
          if (headers[index2].containsLocation(lineNumber, columnNumber)) {
            locations.push(new CSSLocation(headers[index2], lineNumber, columnNumber));
          }
        }
        return locations;
        function stylesheetComparator(a, b) {
          return a.startLine - b.startLine || a.startColumn - b.startColumn || a.id.localeCompare(b.id);
        }
      }
      sourceMapManager() {
        return this.#sourceMapManager;
      }
      static readableLayerName(text) {
        return text || "<anonymous>";
      }
      static trimSourceURL(text) {
        let sourceURLIndex = text.lastIndexOf("/*# sourceURL=");
        if (sourceURLIndex === -1) {
          sourceURLIndex = text.lastIndexOf("/*@ sourceURL=");
          if (sourceURLIndex === -1) {
            return text;
          }
        }
        const sourceURLLineIndex = text.lastIndexOf("\n", sourceURLIndex);
        if (sourceURLLineIndex === -1) {
          return text;
        }
        const sourceURLLine = text.substr(sourceURLLineIndex + 1).split("\n", 1)[0];
        const sourceURLRegex2 = /[\x20\t]*\/\*[#@] sourceURL=[\x20\t]*([^\s]*)[\x20\t]*\*\/[\x20\t]*$/;
        if (sourceURLLine.search(sourceURLRegex2) === -1) {
          return text;
        }
        return text.substr(0, sourceURLLineIndex) + text.substr(sourceURLLineIndex + sourceURLLine.length + 1);
      }
      domModel() {
        return this.#domModel;
      }
      async trackComputedStyleUpdatesForNode(nodeId) {
        await this.agent.invoke_trackComputedStyleUpdatesForNode({ nodeId });
      }
      async setStyleText(styleSheetId, range2, text, majorChange) {
        try {
          await this.ensureOriginalStyleSheetText(styleSheetId);
          const { styles: styles2 } = await this.agent.invoke_setStyleTexts({ edits: [{ styleSheetId, range: range2.serializeToObject(), text }] });
          if (styles2?.length !== 1) {
            return false;
          }
          this.#domModel.markUndoableState(!majorChange);
          const edit2 = new Edit(styleSheetId, range2, text, styles2[0]);
          this.fireStyleSheetChanged(styleSheetId, edit2);
          return true;
        } catch (e) {
          console.error(e);
          return false;
        }
      }
      async setSelectorText(styleSheetId, range2, text) {
        userMetrics.actionTaken(Action.StyleRuleEdited);
        try {
          await this.ensureOriginalStyleSheetText(styleSheetId);
          const { selectorList } = await this.agent.invoke_setRuleSelector({ styleSheetId, range: range2, selector: text });
          if (!selectorList) {
            return false;
          }
          this.#domModel.markUndoableState();
          const edit2 = new Edit(styleSheetId, range2, text, selectorList);
          this.fireStyleSheetChanged(styleSheetId, edit2);
          return true;
        } catch (e) {
          console.error(e);
          return false;
        }
      }
      async setPropertyRulePropertyName(styleSheetId, range2, text) {
        userMetrics.actionTaken(Action.StyleRuleEdited);
        try {
          await this.ensureOriginalStyleSheetText(styleSheetId);
          const { propertyName } = await this.agent.invoke_setPropertyRulePropertyName({ styleSheetId, range: range2, propertyName: text });
          if (!propertyName) {
            return false;
          }
          this.#domModel.markUndoableState();
          const edit2 = new Edit(styleSheetId, range2, text, propertyName);
          this.fireStyleSheetChanged(styleSheetId, edit2);
          return true;
        } catch (e) {
          console.error(e);
          return false;
        }
      }
      async setKeyframeKey(styleSheetId, range2, text) {
        userMetrics.actionTaken(Action.StyleRuleEdited);
        try {
          await this.ensureOriginalStyleSheetText(styleSheetId);
          const { keyText } = await this.agent.invoke_setKeyframeKey({ styleSheetId, range: range2, keyText: text });
          if (!keyText) {
            return false;
          }
          this.#domModel.markUndoableState();
          const edit2 = new Edit(styleSheetId, range2, text, keyText);
          this.fireStyleSheetChanged(styleSheetId, edit2);
          return true;
        } catch (e) {
          console.error(e);
          return false;
        }
      }
      startCoverage() {
        this.#isRuleUsageTrackingEnabled = true;
        return this.agent.invoke_startRuleUsageTracking();
      }
      async takeCoverageDelta() {
        const r = await this.agent.invoke_takeCoverageDelta();
        const timestamp = r?.timestamp || 0;
        const coverage = r?.coverage || [];
        return { timestamp, coverage };
      }
      setLocalFontsEnabled(enabled) {
        return this.agent.invoke_setLocalFontsEnabled({
          enabled
        });
      }
      async stopCoverage() {
        this.#isRuleUsageTrackingEnabled = false;
        await this.agent.invoke_stopRuleUsageTracking();
      }
      async getMediaQueries() {
        const { medias } = await this.agent.invoke_getMediaQueries();
        return medias ? CSSMedia.parseMediaArrayPayload(this, medias) : [];
      }
      async getRootLayer(nodeId) {
        const { rootLayer } = await this.agent.invoke_getLayersForNode({ nodeId });
        return rootLayer;
      }
      isEnabled() {
        return this.#isEnabled;
      }
      async enable() {
        await this.agent.invoke_enable();
        this.#isEnabled = true;
        if (this.#isRuleUsageTrackingEnabled) {
          await this.startCoverage();
        }
        this.dispatchEventToListeners(Events$a.ModelWasEnabled);
      }
      async getAnimatedStylesForNode(nodeId) {
        const response = await this.agent.invoke_getAnimatedStylesForNode({ nodeId });
        if (response.getError()) {
          return null;
        }
        return response;
      }
      async getMatchedStyles(nodeId) {
        const node2 = this.#domModel.nodeForId(nodeId);
        if (!node2) {
          return null;
        }
        const shouldGetAnimatedStyles = hostConfig.devToolsAnimationStylesInStylesTab?.enabled;
        const [matchedStylesResponse, animatedStylesResponse] = await Promise.all([
          this.agent.invoke_getMatchedStylesForNode({ nodeId }),
          shouldGetAnimatedStyles ? this.agent.invoke_getAnimatedStylesForNode({ nodeId }) : void 0
        ]);
        if (matchedStylesResponse.getError()) {
          return null;
        }
        const payload = {
          cssModel: this,
          node: node2,
          inlinePayload: matchedStylesResponse.inlineStyle || null,
          attributesPayload: matchedStylesResponse.attributesStyle || null,
          matchedPayload: matchedStylesResponse.matchedCSSRules || [],
          pseudoPayload: matchedStylesResponse.pseudoElements || [],
          inheritedPayload: matchedStylesResponse.inherited || [],
          inheritedPseudoPayload: matchedStylesResponse.inheritedPseudoElements || [],
          animationsPayload: matchedStylesResponse.cssKeyframesRules || [],
          parentLayoutNodeId: matchedStylesResponse.parentLayoutNodeId,
          positionTryRules: matchedStylesResponse.cssPositionTryRules || [],
          propertyRules: matchedStylesResponse.cssPropertyRules ?? [],
          functionRules: matchedStylesResponse.cssFunctionRules ?? [],
          cssPropertyRegistrations: matchedStylesResponse.cssPropertyRegistrations ?? [],
          atRules: matchedStylesResponse.cssAtRules ?? [],
          activePositionFallbackIndex: matchedStylesResponse.activePositionFallbackIndex ?? -1,
          animationStylesPayload: animatedStylesResponse?.animationStyles || [],
          inheritedAnimatedPayload: animatedStylesResponse?.inherited || [],
          transitionsStylePayload: animatedStylesResponse?.transitionsStyle || null
        };
        return await CSSMatchedStyles.create(payload);
      }
      async getClassNames(styleSheetId) {
        const { classNames } = await this.agent.invoke_collectClassNames({ styleSheetId });
        return classNames || [];
      }
      async getComputedStyle(nodeId) {
        if (!this.isEnabled()) {
          await this.enable();
        }
        return await this.#styleLoader.computedStylePromise(nodeId);
      }
      async getComputedStyleExtraFields(nodeId) {
        if (!this.isEnabled()) {
          await this.enable();
        }
        return await this.#styleLoader.extraFieldsPromise(nodeId);
      }
      async getLayoutPropertiesFromComputedStyle(nodeId) {
        const styles2 = await this.getComputedStyle(nodeId);
        if (!styles2) {
          return null;
        }
        const display = styles2.get("display");
        const isFlex = display === "flex" || display === "inline-flex";
        const isGrid = display === "grid" || display === "inline-grid";
        const isSubgrid = (isGrid && (styles2.get("grid-template-columns")?.startsWith("subgrid") || styles2.get("grid-template-rows")?.startsWith("subgrid"))) ?? false;
        const isGridLanes = display === "grid-lanes" || display === "inline-grid-lanes";
        const containerType = styles2.get("container-type");
        const isContainer = Boolean(containerType) && containerType !== "" && containerType !== "normal";
        const hasScroll = Boolean(styles2.get("scroll-snap-type")) && styles2.get("scroll-snap-type") !== "none";
        return {
          isFlex,
          isGrid,
          isSubgrid,
          isGridLanes,
          containerType: isContainer ? containerType : void 0,
          hasScroll
        };
      }
      async getEnvironmentVariables() {
        const response = await this.agent.invoke_getEnvironmentVariables();
        if (response.getError()) {
          return {};
        }
        return response.environmentVariables;
      }
      async getBackgroundColors(nodeId) {
        const response = await this.agent.invoke_getBackgroundColors({ nodeId });
        if (response.getError()) {
          return null;
        }
        return {
          backgroundColors: response.backgroundColors || null,
          computedFontSize: response.computedFontSize || "",
          computedFontWeight: response.computedFontWeight || ""
        };
      }
      async getPlatformFonts(nodeId) {
        const { fonts } = await this.agent.invoke_getPlatformFontsForNode({ nodeId });
        return fonts;
      }
      allStyleSheets() {
        const values = [...this.#styleSheetIdToHeader.values()];
        function styleSheetComparator(a, b) {
          if (a.sourceURL < b.sourceURL) {
            return -1;
          }
          if (a.sourceURL > b.sourceURL) {
            return 1;
          }
          return a.startLine - b.startLine || a.startColumn - b.startColumn;
        }
        values.sort(styleSheetComparator);
        return values;
      }
      async getInlineStyles(nodeId) {
        const response = await this.agent.invoke_getInlineStylesForNode({ nodeId });
        if (response.getError() || !response.inlineStyle) {
          return null;
        }
        const inlineStyle = new CSSStyleDeclaration(this, null, response.inlineStyle, Type$3.Inline);
        const attributesStyle = response.attributesStyle ? new CSSStyleDeclaration(this, null, response.attributesStyle, Type$3.Attributes) : null;
        return new InlineStyleResult(inlineStyle, attributesStyle);
      }
      forceStartingStyle(node2, forced) {
        void this.agent.invoke_forceStartingStyle({ nodeId: node2.id, forced });
        this.dispatchEventToListeners(Events$a.StartingStylesStateForced, node2);
        return true;
      }
      forcePseudoState(node2, pseudoClass, enable) {
        const forcedPseudoClasses = node2.marker(PseudoStateMarker) || [];
        const hasPseudoClass = forcedPseudoClasses.includes(pseudoClass);
        if (enable) {
          if (hasPseudoClass) {
            return false;
          }
          forcedPseudoClasses.push(pseudoClass);
          node2.setMarker(PseudoStateMarker, forcedPseudoClasses);
        } else {
          if (!hasPseudoClass) {
            return false;
          }
          removeElement2(forcedPseudoClasses, pseudoClass);
          if (forcedPseudoClasses.length) {
            node2.setMarker(PseudoStateMarker, forcedPseudoClasses);
          } else {
            node2.setMarker(PseudoStateMarker, null);
          }
        }
        if (node2.id === void 0) {
          return false;
        }
        void this.agent.invoke_forcePseudoState({ nodeId: node2.id, forcedPseudoClasses });
        this.dispatchEventToListeners(Events$a.PseudoStateForced, { node: node2, pseudoClass, enable });
        return true;
      }
      pseudoState(node2) {
        return node2.marker(PseudoStateMarker) || [];
      }
      async setMediaText(styleSheetId, range2, newMediaText) {
        userMetrics.actionTaken(Action.StyleRuleEdited);
        try {
          await this.ensureOriginalStyleSheetText(styleSheetId);
          const { media } = await this.agent.invoke_setMediaText({ styleSheetId, range: range2, text: newMediaText });
          if (!media) {
            return false;
          }
          this.#domModel.markUndoableState();
          const edit2 = new Edit(styleSheetId, range2, newMediaText, media);
          this.fireStyleSheetChanged(styleSheetId, edit2);
          return true;
        } catch (e) {
          console.error(e);
          return false;
        }
      }
      async setContainerQueryText(styleSheetId, range2, newContainerQueryText) {
        userMetrics.actionTaken(Action.StyleRuleEdited);
        try {
          await this.ensureOriginalStyleSheetText(styleSheetId);
          const { containerQuery } = await this.agent.invoke_setContainerQueryText({ styleSheetId, range: range2, text: newContainerQueryText });
          if (!containerQuery) {
            return false;
          }
          this.#domModel.markUndoableState();
          const edit2 = new Edit(styleSheetId, range2, newContainerQueryText, containerQuery);
          this.fireStyleSheetChanged(styleSheetId, edit2);
          return true;
        } catch (e) {
          console.error(e);
          return false;
        }
      }
      async setSupportsText(styleSheetId, range2, newSupportsText) {
        userMetrics.actionTaken(Action.StyleRuleEdited);
        try {
          await this.ensureOriginalStyleSheetText(styleSheetId);
          const { supports } = await this.agent.invoke_setSupportsText({ styleSheetId, range: range2, text: newSupportsText });
          if (!supports) {
            return false;
          }
          this.#domModel.markUndoableState();
          const edit2 = new Edit(styleSheetId, range2, newSupportsText, supports);
          this.fireStyleSheetChanged(styleSheetId, edit2);
          return true;
        } catch (e) {
          console.error(e);
          return false;
        }
      }
      async setScopeText(styleSheetId, range2, newScopeText) {
        userMetrics.actionTaken(Action.StyleRuleEdited);
        try {
          await this.ensureOriginalStyleSheetText(styleSheetId);
          const { scope: scope2 } = await this.agent.invoke_setScopeText({ styleSheetId, range: range2, text: newScopeText });
          if (!scope2) {
            return false;
          }
          this.#domModel.markUndoableState();
          const edit2 = new Edit(styleSheetId, range2, newScopeText, scope2);
          this.fireStyleSheetChanged(styleSheetId, edit2);
          return true;
        } catch (e) {
          console.error(e);
          return false;
        }
      }
      async addRule(styleSheetId, ruleText, ruleLocation) {
        try {
          await this.ensureOriginalStyleSheetText(styleSheetId);
          const { rule } = await this.agent.invoke_addRule({ styleSheetId, ruleText, location: ruleLocation });
          if (!rule) {
            return null;
          }
          this.#domModel.markUndoableState();
          const edit2 = new Edit(styleSheetId, ruleLocation, ruleText, rule);
          this.fireStyleSheetChanged(styleSheetId, edit2);
          return new CSSStyleRule(this, rule);
        } catch (e) {
          console.error(e);
          return null;
        }
      }
      async requestViaInspectorStylesheet(maybeFrameId) {
        const frameId = maybeFrameId || (this.#resourceTreeModel && this.#resourceTreeModel.mainFrame ? this.#resourceTreeModel.mainFrame.id : null);
        const headers = [...this.#styleSheetIdToHeader.values()];
        const styleSheetHeader = headers.find((header) => header.frameId === frameId && header.isViaInspector());
        if (styleSheetHeader) {
          return styleSheetHeader;
        }
        if (!frameId) {
          return null;
        }
        try {
          return await this.createInspectorStylesheet(frameId);
        } catch (e) {
          console.error(e);
          return null;
        }
      }
      async createInspectorStylesheet(frameId, force = false) {
        const result = await this.agent.invoke_createStyleSheet({ frameId, force });
        if (result.getError()) {
          throw new Error(result.getError());
        }
        return this.#styleSheetIdToHeader.get(result.styleSheetId) || null;
      }
      mediaQueryResultChanged() {
        this.#colorScheme = void 0;
        this.dispatchEventToListeners(Events$a.MediaQueryResultChanged);
      }
      fontsUpdated(fontFace) {
        if (fontFace) {
          this.#fontFaces.set(fontFace.src, new CSSFontFace(fontFace));
        }
        this.dispatchEventToListeners(Events$a.FontsUpdated);
      }
      fontFaces() {
        return [...this.#fontFaces.values()];
      }
      fontFaceForSource(src2) {
        return this.#fontFaces.get(src2);
      }
      styleSheetHeaderForId(id2) {
        return this.#styleSheetIdToHeader.get(id2) || null;
      }
      styleSheetHeaders() {
        return [...this.#styleSheetIdToHeader.values()];
      }
      fireStyleSheetChanged(styleSheetId, edit2) {
        this.dispatchEventToListeners(Events$a.StyleSheetChanged, { styleSheetId, edit: edit2 });
      }
      ensureOriginalStyleSheetText(styleSheetId) {
        const header = this.styleSheetHeaderForId(styleSheetId);
        if (!header) {
          return Promise.resolve(null);
        }
        let promise = this.#originalStyleSheetText.get(header);
        if (!promise) {
          promise = this.getStyleSheetText(header.id);
          this.#originalStyleSheetText.set(header, promise);
          this.originalContentRequestedForTest(header);
        }
        return promise;
      }
      originalContentRequestedForTest(_header) {
      }
      originalStyleSheetText(header) {
        return this.ensureOriginalStyleSheetText(header.id);
      }
      getAllStyleSheetHeaders() {
        return this.#styleSheetIdToHeader.values();
      }
      computedStyleUpdated(nodeId) {
        this.dispatchEventToListeners(Events$a.ComputedStyleUpdated, { nodeId });
      }
      styleSheetAdded(header) {
        console.assert(!this.#styleSheetIdToHeader.get(header.styleSheetId));
        if (header.loadingFailed) {
          header.hasSourceURL = false;
          header.isConstructed = true;
          header.isInline = false;
          header.isMutable = false;
          header.sourceURL = "";
          header.sourceMapURL = void 0;
        }
        const styleSheetHeader = new CSSStyleSheetHeader(this, header);
        this.#styleSheetIdToHeader.set(header.styleSheetId, styleSheetHeader);
        const url = styleSheetHeader.resourceURL();
        let frameIdToStyleSheetIds = this.#styleSheetIdsForURL.get(url);
        if (!frameIdToStyleSheetIds) {
          frameIdToStyleSheetIds = /* @__PURE__ */ new Map();
          this.#styleSheetIdsForURL.set(url, frameIdToStyleSheetIds);
        }
        if (frameIdToStyleSheetIds) {
          let styleSheetIds = frameIdToStyleSheetIds.get(styleSheetHeader.frameId);
          if (!styleSheetIds) {
            styleSheetIds = /* @__PURE__ */ new Set();
            frameIdToStyleSheetIds.set(styleSheetHeader.frameId, styleSheetIds);
          }
          styleSheetIds.add(styleSheetHeader.id);
        }
        this.#sourceMapManager.attachSourceMap(styleSheetHeader, styleSheetHeader.sourceURL, styleSheetHeader.sourceMapURL);
        this.dispatchEventToListeners(Events$a.StyleSheetAdded, styleSheetHeader);
      }
      styleSheetRemoved(id2) {
        const header = this.#styleSheetIdToHeader.get(id2);
        console.assert(Boolean(header));
        if (!header) {
          return;
        }
        this.#styleSheetIdToHeader.delete(id2);
        const url = header.resourceURL();
        const frameIdToStyleSheetIds = this.#styleSheetIdsForURL.get(url);
        console.assert(Boolean(frameIdToStyleSheetIds), "No frameId to styleSheetId map is available for given style sheet URL.");
        if (frameIdToStyleSheetIds) {
          const stylesheetIds = frameIdToStyleSheetIds.get(header.frameId);
          if (stylesheetIds) {
            stylesheetIds.delete(id2);
            if (!stylesheetIds.size) {
              frameIdToStyleSheetIds.delete(header.frameId);
              if (!frameIdToStyleSheetIds.size) {
                this.#styleSheetIdsForURL.delete(url);
              }
            }
          }
        }
        this.#originalStyleSheetText.delete(header);
        this.#sourceMapManager.detachSourceMap(header);
        this.dispatchEventToListeners(Events$a.StyleSheetRemoved, header);
      }
      getStyleSheetIdsForURL(url) {
        const frameIdToStyleSheetIds = this.#styleSheetIdsForURL.get(url);
        if (!frameIdToStyleSheetIds) {
          return [];
        }
        const result = [];
        for (const styleSheetIds of frameIdToStyleSheetIds.values()) {
          result.push(...styleSheetIds);
        }
        return result;
      }
      async setStyleSheetText(styleSheetId, newText, majorChange) {
        const header = this.#styleSheetIdToHeader.get(styleSheetId);
        if (!header) {
          return "Unknown stylesheet in CSS.setStyleSheetText";
        }
        newText = _CSSModel.trimSourceURL(newText);
        if (header.hasSourceURL) {
          newText += "\n/*# sourceURL=" + header.sourceURL + " */";
        }
        await this.ensureOriginalStyleSheetText(styleSheetId);
        const response = await this.agent.invoke_setStyleSheetText({ styleSheetId: header.id, text: newText });
        const sourceMapURL = response.sourceMapURL;
        this.#sourceMapManager.detachSourceMap(header);
        header.setSourceMapURL(sourceMapURL);
        this.#sourceMapManager.attachSourceMap(header, header.sourceURL, header.sourceMapURL);
        if (sourceMapURL === null) {
          return "Error in CSS.setStyleSheetText";
        }
        this.#domModel.markUndoableState(!majorChange);
        this.fireStyleSheetChanged(styleSheetId);
        return null;
      }
      async getStyleSheetText(styleSheetId) {
        const response = await this.agent.invoke_getStyleSheetText({ styleSheetId });
        if (response.getError()) {
          return null;
        }
        const { text } = response;
        return text && _CSSModel.trimSourceURL(text);
      }
      async onPrimaryPageChanged(event) {
        if (event.data.frame.backForwardCacheDetails.restoredFromCache) {
          await this.suspendModel();
          await this.resumeModel();
        } else if (event.data.type !== "Activation") {
          this.resetStyleSheets();
          this.resetFontFaces();
        }
      }
      resetStyleSheets() {
        const headers = [...this.#styleSheetIdToHeader.values()];
        this.#styleSheetIdsForURL.clear();
        this.#styleSheetIdToHeader.clear();
        for (const header of headers) {
          this.#sourceMapManager.detachSourceMap(header);
          this.dispatchEventToListeners(Events$a.StyleSheetRemoved, header);
        }
      }
      resetFontFaces() {
        this.#fontFaces.clear();
      }
      async suspendModel() {
        this.#isEnabled = false;
        await this.agent.invoke_disable();
        this.resetStyleSheets();
        this.resetFontFaces();
      }
      async resumeModel() {
        return await this.enable();
      }
      setEffectivePropertyValueForNode(nodeId, propertyName, value) {
        void this.agent.invoke_setEffectivePropertyValueForNode({ nodeId, propertyName, value });
      }
      cachedMatchedCascadeForNode(node2) {
        if (this.#cachedMatchedCascadeNode !== node2) {
          this.discardCachedMatchedCascade();
        }
        this.#cachedMatchedCascadeNode = node2;
        if (!this.#cachedMatchedCascadePromise) {
          if (node2.id) {
            this.#cachedMatchedCascadePromise = this.getMatchedStyles(node2.id);
          } else {
            return Promise.resolve(null);
          }
        }
        return this.#cachedMatchedCascadePromise;
      }
      discardCachedMatchedCascade() {
        this.#cachedMatchedCascadeNode = null;
        this.#cachedMatchedCascadePromise = null;
      }
      createCSSPropertyTracker(propertiesToTrack) {
        const cssPropertyTracker = new CSSPropertyTracker(this, propertiesToTrack);
        return cssPropertyTracker;
      }
      enableCSSPropertyTracker(cssPropertyTracker) {
        const propertiesToTrack = cssPropertyTracker.getTrackedProperties();
        if (propertiesToTrack.length === 0) {
          return;
        }
        void this.agent.invoke_trackComputedStyleUpdates({ propertiesToTrack });
        this.#isCSSPropertyTrackingEnabled = true;
        this.#cssPropertyTracker = cssPropertyTracker;
        void this.pollComputedStyleUpdates();
      }
      disableCSSPropertyTracker() {
        this.#isCSSPropertyTrackingEnabled = false;
        this.#cssPropertyTracker = null;
        void this.agent.invoke_trackComputedStyleUpdates({ propertiesToTrack: [] });
      }
      async pollComputedStyleUpdates() {
        if (this.#isTrackingRequestPending) {
          return;
        }
        if (this.#isCSSPropertyTrackingEnabled) {
          this.#isTrackingRequestPending = true;
          const result = await this.agent.invoke_takeComputedStyleUpdates();
          this.#isTrackingRequestPending = false;
          if (result.getError() || !result.nodeIds || !this.#isCSSPropertyTrackingEnabled) {
            return;
          }
          if (this.#cssPropertyTracker) {
            this.#cssPropertyTracker.dispatchEventToListeners("TrackedCSSPropertiesUpdated", result.nodeIds.map((nodeId) => this.#domModel.nodeForId(nodeId)));
          }
        }
        if (this.#isCSSPropertyTrackingEnabled) {
          void this.#stylePollingThrottler.schedule(this.pollComputedStyleUpdates.bind(this));
        }
      }
      dispose() {
        this.disableCSSPropertyTracker();
        super.dispose();
        this.dispatchEventToListeners(Events$a.ModelDisposed, this);
      }
      getAgent() {
        return this.agent;
      }
    };
    (function(Events2) {
      Events2["FontsUpdated"] = "FontsUpdated";
      Events2["MediaQueryResultChanged"] = "MediaQueryResultChanged";
      Events2["ModelWasEnabled"] = "ModelWasEnabled";
      Events2["ModelDisposed"] = "ModelDisposed";
      Events2["PseudoStateForced"] = "PseudoStateForced";
      Events2["StartingStylesStateForced"] = "StartingStylesStateForced";
      Events2["StyleSheetAdded"] = "StyleSheetAdded";
      Events2["StyleSheetChanged"] = "StyleSheetChanged";
      Events2["StyleSheetRemoved"] = "StyleSheetRemoved";
      Events2["ComputedStyleUpdated"] = "ComputedStyleUpdated";
    })(Events$a || (Events$a = {}));
    PseudoStateMarker = "pseudo-state-marker";
    Edit = class {
      styleSheetId;
      oldRange;
      newRange;
      newText;
      payload;
      constructor(styleSheetId, oldRange, newText, payload) {
        this.styleSheetId = styleSheetId;
        this.oldRange = oldRange;
        this.newRange = TextRange.fromEdit(oldRange, newText);
        this.newText = newText;
        this.payload = payload;
      }
    };
    CSSLocation = class {
      #cssModel;
      styleSheetId;
      url;
      lineNumber;
      columnNumber;
      constructor(header, lineNumber, columnNumber) {
        this.#cssModel = header.cssModel();
        this.styleSheetId = header.id;
        this.url = header.resourceURL();
        this.lineNumber = lineNumber;
        this.columnNumber = columnNumber || 0;
      }
      cssModel() {
        return this.#cssModel;
      }
      header() {
        return this.#cssModel.styleSheetHeaderForId(this.styleSheetId);
      }
    };
    CSSDispatcher = class {
      #cssModel;
      constructor(cssModel) {
        this.#cssModel = cssModel;
      }
      mediaQueryResultChanged() {
        this.#cssModel.mediaQueryResultChanged();
      }
      fontsUpdated({ font }) {
        this.#cssModel.fontsUpdated(font);
      }
      styleSheetChanged({ styleSheetId }) {
        this.#cssModel.fireStyleSheetChanged(styleSheetId);
      }
      styleSheetAdded({ header }) {
        this.#cssModel.styleSheetAdded(header);
      }
      styleSheetRemoved({ styleSheetId }) {
        this.#cssModel.styleSheetRemoved(styleSheetId);
      }
      computedStyleUpdated({ nodeId }) {
        this.#cssModel.computedStyleUpdated(nodeId);
      }
    };
    ComputedStyleLoader = class {
      #cssModel;
      #nodeIdToPromise = /* @__PURE__ */ new Map();
      constructor(cssModel) {
        this.#cssModel = cssModel;
      }
      #getResponsePromise(nodeId) {
        let promise = this.#nodeIdToPromise.get(nodeId);
        if (promise) {
          return promise;
        }
        promise = this.#cssModel.getAgent().invoke_getComputedStyleForNode({ nodeId }).then(({ computedStyle, extraFields }) => {
          this.#nodeIdToPromise.delete(nodeId);
          if (!computedStyle?.length) {
            return { style: null, extraFields };
          }
          const result = /* @__PURE__ */ new Map();
          for (const property of computedStyle) {
            result.set(property.name, property.value);
          }
          return { style: result, extraFields };
        });
        this.#nodeIdToPromise.set(nodeId, promise);
        return promise;
      }
      async computedStylePromise(nodeId) {
        const computedStyleWithExtraFields = await this.#getResponsePromise(nodeId);
        return computedStyleWithExtraFields.style;
      }
      async extraFieldsPromise(nodeId) {
        const computedStyleWithExtraFields = await this.#getResponsePromise(nodeId);
        return computedStyleWithExtraFields.extraFields;
      }
    };
    InlineStyleResult = class {
      inlineStyle;
      attributesStyle;
      constructor(inlineStyle, attributesStyle) {
        this.inlineStyle = inlineStyle;
        this.attributesStyle = attributesStyle;
      }
    };
    CSSPropertyTracker = class extends ObjectWrapper {
      #cssModel;
      #properties;
      constructor(cssModel, propertiesToTrack) {
        super();
        this.#cssModel = cssModel;
        this.#properties = propertiesToTrack;
      }
      start() {
        this.#cssModel.enableCSSPropertyTracker(this);
      }
      stop() {
        this.#cssModel.disableCSSPropertyTracker();
      }
      getTrackedProperties() {
        return this.#properties;
      }
    };
    StylePollingInterval = 1e3;
    SDKModel.register(CSSModel, { capabilities: 2, autostart: true });
    frameManagerInstance = null;
    FrameManager2 = class _FrameManager extends ObjectWrapper {
      #eventListeners = /* @__PURE__ */ new WeakMap();
      #frames = /* @__PURE__ */ new Map();
      #framesForTarget = /* @__PURE__ */ new Map();
      #outermostFrame = null;
      #transferringFramesDataCache = /* @__PURE__ */ new Map();
      #awaitedFrames = /* @__PURE__ */ new Map();
      constructor() {
        super();
        TargetManager3.instance().observeModels(ResourceTreeModel, this);
      }
      static instance({ forceNew } = { forceNew: false }) {
        if (!frameManagerInstance || forceNew) {
          frameManagerInstance = new _FrameManager();
        }
        return frameManagerInstance;
      }
      static removeInstance() {
        frameManagerInstance = null;
      }
      modelAdded(resourceTreeModel) {
        const addListener = resourceTreeModel.addEventListener(Events$6.FrameAdded, this.frameAdded, this);
        const detachListener = resourceTreeModel.addEventListener(Events$6.FrameDetached, this.frameDetached, this);
        const navigatedListener = resourceTreeModel.addEventListener(Events$6.FrameNavigated, this.frameNavigated, this);
        const resourceAddedListener = resourceTreeModel.addEventListener(Events$6.ResourceAdded, this.resourceAdded, this);
        this.#eventListeners.set(resourceTreeModel, [addListener, detachListener, navigatedListener, resourceAddedListener]);
        this.#framesForTarget.set(resourceTreeModel.target().id(), /* @__PURE__ */ new Set());
      }
      modelRemoved(resourceTreeModel) {
        const listeners = this.#eventListeners.get(resourceTreeModel);
        if (listeners) {
          removeEventListeners(listeners);
        }
        const frameSet = this.#framesForTarget.get(resourceTreeModel.target().id());
        if (frameSet) {
          for (const frameId of frameSet) {
            this.decreaseOrRemoveFrame(frameId);
          }
        }
        this.#framesForTarget.delete(resourceTreeModel.target().id());
      }
      frameAdded(event) {
        const frame = event.data;
        const frameData = this.#frames.get(frame.id);
        if (frameData) {
          frame.setCreationStackTrace(frameData.frame.getCreationStackTraceData());
          this.#frames.set(frame.id, { frame, count: frameData.count + 1 });
        } else {
          const cachedFrameAttributes = this.#transferringFramesDataCache.get(frame.id);
          if (cachedFrameAttributes?.creationStackTrace && cachedFrameAttributes?.creationStackTraceTarget) {
            frame.setCreationStackTrace({
              creationStackTrace: cachedFrameAttributes.creationStackTrace,
              creationStackTraceTarget: cachedFrameAttributes.creationStackTraceTarget
            });
          }
          this.#frames.set(frame.id, { frame, count: 1 });
          this.#transferringFramesDataCache.delete(frame.id);
        }
        this.resetOutermostFrame();
        const frameSet = this.#framesForTarget.get(frame.resourceTreeModel().target().id());
        if (frameSet) {
          frameSet.add(frame.id);
        }
        this.dispatchEventToListeners("FrameAddedToTarget", { frame });
        this.resolveAwaitedFrame(frame);
      }
      frameDetached(event) {
        const { frame, isSwap } = event.data;
        this.decreaseOrRemoveFrame(frame.id);
        if (isSwap && !this.#frames.get(frame.id)) {
          const traceData = frame.getCreationStackTraceData();
          const cachedFrameAttributes = {
            ...traceData.creationStackTrace && { creationStackTrace: traceData.creationStackTrace },
            ...traceData.creationStackTrace && { creationStackTraceTarget: traceData.creationStackTraceTarget }
          };
          this.#transferringFramesDataCache.set(frame.id, cachedFrameAttributes);
        }
        const frameSet = this.#framesForTarget.get(frame.resourceTreeModel().target().id());
        if (frameSet) {
          frameSet.delete(frame.id);
        }
      }
      frameNavigated(event) {
        const frame = event.data;
        this.dispatchEventToListeners("FrameNavigated", { frame });
        if (frame.isOutermostFrame()) {
          this.dispatchEventToListeners("OutermostFrameNavigated", { frame });
        }
      }
      resourceAdded(event) {
        this.dispatchEventToListeners("ResourceAdded", { resource: event.data });
      }
      decreaseOrRemoveFrame(frameId) {
        const frameData = this.#frames.get(frameId);
        if (frameData) {
          if (frameData.count === 1) {
            this.#frames.delete(frameId);
            this.resetOutermostFrame();
            this.dispatchEventToListeners("FrameRemoved", { frameId });
          } else {
            frameData.count--;
          }
        }
      }
      resetOutermostFrame() {
        const outermostFrames = this.getAllFrames().filter((frame) => frame.isOutermostFrame());
        this.#outermostFrame = outermostFrames.length > 0 ? outermostFrames[0] : null;
      }
      getFrame(frameId) {
        const frameData = this.#frames.get(frameId);
        if (frameData) {
          return frameData.frame;
        }
        return null;
      }
      getAllFrames() {
        return Array.from(this.#frames.values(), (frameData) => frameData.frame);
      }
      getOutermostFrame() {
        return this.#outermostFrame;
      }
      async getOrWaitForFrame(frameId, notInTarget) {
        const frame = this.getFrame(frameId);
        if (frame && (!notInTarget || notInTarget !== frame.resourceTreeModel().target())) {
          return frame;
        }
        return await new Promise((resolve2) => {
          const waiting = this.#awaitedFrames.get(frameId);
          if (waiting) {
            waiting.push({ notInTarget, resolve: resolve2 });
          } else {
            this.#awaitedFrames.set(frameId, [{ notInTarget, resolve: resolve2 }]);
          }
        });
      }
      resolveAwaitedFrame(frame) {
        const waiting = this.#awaitedFrames.get(frame.id);
        if (!waiting) {
          return;
        }
        const newWaiting = waiting.filter(({ notInTarget, resolve: resolve2 }) => {
          if (!notInTarget || notInTarget !== frame.resourceTreeModel().target()) {
            resolve2(frame);
            return false;
          }
          return true;
        });
        if (newWaiting.length > 0) {
          this.#awaitedFrames.set(frame.id, newWaiting);
        } else {
          this.#awaitedFrames.delete(frame.id);
        }
      }
    };
    OverlayColorGenerator = class {
      #colors;
      #index;
      constructor() {
        const format2 = "rgba";
        this.#colors = [
          new Legacy([0.9607843137254902, 0.592156862745098, 0.5803921568627451, 1], format2),
          new Legacy([0.9411764705882353, 0.7490196078431373, 0.2980392156862745, 1], format2),
          new Legacy([0.8313725490196079, 0.9294117647058824, 0.19215686274509805, 1], format2),
          new Legacy([0.6196078431372549, 0.9215686274509803, 0.2784313725490196, 1], format2),
          new Legacy([0.3568627450980392, 0.8196078431372549, 0.8431372549019608, 1], format2),
          new Legacy([0.7372549019607844, 0.807843137254902, 0.984313725490196, 1], format2),
          new Legacy([0.7764705882352941, 0.7450980392156863, 0.9333333333333333, 1], format2),
          new Legacy([0.8156862745098039, 0.5803921568627451, 0.9176470588235294, 1], format2),
          new Legacy([0.9215686274509803, 0.5803921568627451, 0.8117647058823529, 1], format2)
        ];
        this.#index = 0;
      }
      next() {
        const color = this.#colors[this.#index];
        this.#index++;
        if (this.#index >= this.#colors.length) {
          this.#index = 0;
        }
        return color;
      }
    };
    OverlayPersistentHighlighter = class {
      #model;
      #colors = /* @__PURE__ */ new Map();
      #persistentHighlightSetting = Settings.instance().createLocalSetting("persistent-highlight-setting", []);
      #gridHighlights = /* @__PURE__ */ new Map();
      #scrollSnapHighlights = /* @__PURE__ */ new Map();
      #flexHighlights = /* @__PURE__ */ new Map();
      #containerQueryHighlights = /* @__PURE__ */ new Map();
      #isolatedElementHighlights = /* @__PURE__ */ new Map();
      #gridColorGenerator = new OverlayColorGenerator();
      #flexColorGenerator = new OverlayColorGenerator();
      #showGridLineLabelsSetting = Settings.instance().moduleSetting("show-grid-line-labels");
      #extendGridLinesSetting = Settings.instance().moduleSetting("extend-grid-lines");
      #showGridAreasSetting = Settings.instance().moduleSetting("show-grid-areas");
      #showGridTrackSizesSetting = Settings.instance().moduleSetting("show-grid-track-sizes");
      #callbacks;
      constructor(model3, callbacks) {
        this.#model = model3;
        this.#callbacks = callbacks;
        this.#showGridLineLabelsSetting.addChangeListener(this.onSettingChange, this);
        this.#extendGridLinesSetting.addChangeListener(this.onSettingChange, this);
        this.#showGridAreasSetting.addChangeListener(this.onSettingChange, this);
        this.#showGridTrackSizesSetting.addChangeListener(this.onSettingChange, this);
      }
      onSettingChange() {
        this.resetOverlay();
      }
      buildGridHighlightConfig(nodeId) {
        const mainColor = this.colorOfGrid(nodeId).asLegacyColor();
        const background = mainColor.setAlpha(0.1).asLegacyColor();
        const gapBackground = mainColor.setAlpha(0.3).asLegacyColor();
        const gapHatch = mainColor.setAlpha(0.8).asLegacyColor();
        const showGridExtensionLines = this.#extendGridLinesSetting.get();
        const showPositiveLineNumbers = this.#showGridLineLabelsSetting.get() === "lineNumbers";
        const showNegativeLineNumbers = showPositiveLineNumbers;
        const showLineNames = this.#showGridLineLabelsSetting.get() === "lineNames";
        return {
          rowGapColor: gapBackground.toProtocolRGBA(),
          rowHatchColor: gapHatch.toProtocolRGBA(),
          columnGapColor: gapBackground.toProtocolRGBA(),
          columnHatchColor: gapHatch.toProtocolRGBA(),
          gridBorderColor: mainColor.toProtocolRGBA(),
          gridBorderDash: false,
          rowLineColor: mainColor.toProtocolRGBA(),
          columnLineColor: mainColor.toProtocolRGBA(),
          rowLineDash: true,
          columnLineDash: true,
          showGridExtensionLines,
          showPositiveLineNumbers,
          showNegativeLineNumbers,
          showLineNames,
          showAreaNames: this.#showGridAreasSetting.get(),
          showTrackSizes: this.#showGridTrackSizesSetting.get(),
          areaBorderColor: mainColor.toProtocolRGBA(),
          gridBackgroundColor: background.toProtocolRGBA()
        };
      }
      buildFlexContainerHighlightConfig(nodeId) {
        const mainColor = this.colorOfFlex(nodeId).asLegacyColor();
        return {
          containerBorder: { color: mainColor.toProtocolRGBA(), pattern: "dashed" },
          itemSeparator: { color: mainColor.toProtocolRGBA(), pattern: "dotted" },
          lineSeparator: { color: mainColor.toProtocolRGBA(), pattern: "dashed" },
          mainDistributedSpace: { hatchColor: mainColor.toProtocolRGBA() },
          crossDistributedSpace: { hatchColor: mainColor.toProtocolRGBA() }
        };
      }
      buildScrollSnapContainerHighlightConfig(_nodeId) {
        return {
          snapAreaBorder: {
            color: PageHighlight.GridBorder.toProtocolRGBA(),
            pattern: "dashed"
          },
          snapportBorder: { color: PageHighlight.GridBorder.toProtocolRGBA() },
          scrollMarginColor: PageHighlight.Margin.toProtocolRGBA(),
          scrollPaddingColor: PageHighlight.Padding.toProtocolRGBA()
        };
      }
      highlightGridInOverlay(nodeId) {
        this.#gridHighlights.set(nodeId, this.buildGridHighlightConfig(nodeId));
        this.updateHighlightsInOverlay();
        this.savePersistentHighlightSetting();
        this.#callbacks.onGridOverlayStateChanged({ nodeId, enabled: true });
      }
      isGridHighlighted(nodeId) {
        return this.#gridHighlights.has(nodeId);
      }
      colorOfGrid(nodeId) {
        let color = this.#colors.get(nodeId);
        if (!color) {
          color = this.#gridColorGenerator.next();
          this.#colors.set(nodeId, color);
        }
        return color;
      }
      setColorOfGrid(nodeId, color) {
        this.#colors.set(nodeId, color);
      }
      hideGridInOverlay(nodeId) {
        if (this.#gridHighlights.has(nodeId)) {
          this.#gridHighlights.delete(nodeId);
          this.updateHighlightsInOverlay();
          this.savePersistentHighlightSetting();
          this.#callbacks.onGridOverlayStateChanged({ nodeId, enabled: false });
        }
      }
      highlightScrollSnapInOverlay(nodeId) {
        this.#scrollSnapHighlights.set(nodeId, this.buildScrollSnapContainerHighlightConfig(nodeId));
        this.updateHighlightsInOverlay();
        this.#callbacks.onScrollSnapOverlayStateChanged({ nodeId, enabled: true });
        this.savePersistentHighlightSetting();
      }
      isScrollSnapHighlighted(nodeId) {
        return this.#scrollSnapHighlights.has(nodeId);
      }
      hideScrollSnapInOverlay(nodeId) {
        if (this.#scrollSnapHighlights.has(nodeId)) {
          this.#scrollSnapHighlights.delete(nodeId);
          this.updateHighlightsInOverlay();
          this.#callbacks.onScrollSnapOverlayStateChanged({ nodeId, enabled: false });
          this.savePersistentHighlightSetting();
        }
      }
      highlightFlexInOverlay(nodeId) {
        this.#flexHighlights.set(nodeId, this.buildFlexContainerHighlightConfig(nodeId));
        this.updateHighlightsInOverlay();
        this.savePersistentHighlightSetting();
        this.#callbacks.onFlexOverlayStateChanged({ nodeId, enabled: true });
      }
      isFlexHighlighted(nodeId) {
        return this.#flexHighlights.has(nodeId);
      }
      colorOfFlex(nodeId) {
        let color = this.#colors.get(nodeId);
        if (!color) {
          color = this.#flexColorGenerator.next();
          this.#colors.set(nodeId, color);
        }
        return color;
      }
      setColorOfFlex(nodeId, color) {
        this.#colors.set(nodeId, color);
      }
      hideFlexInOverlay(nodeId) {
        if (this.#flexHighlights.has(nodeId)) {
          this.#flexHighlights.delete(nodeId);
          this.updateHighlightsInOverlay();
          this.savePersistentHighlightSetting();
          this.#callbacks.onFlexOverlayStateChanged({ nodeId, enabled: false });
        }
      }
      highlightContainerQueryInOverlay(nodeId) {
        this.#containerQueryHighlights.set(nodeId, this.buildContainerQueryContainerHighlightConfig());
        this.updateHighlightsInOverlay();
        this.savePersistentHighlightSetting();
        this.#callbacks.onContainerQueryOverlayStateChanged({ nodeId, enabled: true });
      }
      hideContainerQueryInOverlay(nodeId) {
        if (this.#containerQueryHighlights.has(nodeId)) {
          this.#containerQueryHighlights.delete(nodeId);
          this.updateHighlightsInOverlay();
          this.savePersistentHighlightSetting();
          this.#callbacks.onContainerQueryOverlayStateChanged({ nodeId, enabled: false });
        }
      }
      isContainerQueryHighlighted(nodeId) {
        return this.#containerQueryHighlights.has(nodeId);
      }
      buildContainerQueryContainerHighlightConfig() {
        return {
          containerBorder: {
            color: PageHighlight.LayoutLine.toProtocolRGBA(),
            pattern: "dashed"
          },
          descendantBorder: {
            color: PageHighlight.LayoutLine.toProtocolRGBA(),
            pattern: "dashed"
          }
        };
      }
      highlightIsolatedElementInOverlay(nodeId) {
        this.#isolatedElementHighlights.set(nodeId, this.buildIsolationModeHighlightConfig());
        this.updateHighlightsInOverlay();
        this.savePersistentHighlightSetting();
      }
      hideIsolatedElementInOverlay(nodeId) {
        if (this.#isolatedElementHighlights.has(nodeId)) {
          this.#isolatedElementHighlights.delete(nodeId);
          this.updateHighlightsInOverlay();
          this.savePersistentHighlightSetting();
        }
      }
      isIsolatedElementHighlighted(nodeId) {
        return this.#isolatedElementHighlights.has(nodeId);
      }
      buildIsolationModeHighlightConfig() {
        return {
          resizerColor: IsolationModeHighlight.Resizer.toProtocolRGBA(),
          resizerHandleColor: IsolationModeHighlight.ResizerHandle.toProtocolRGBA(),
          maskColor: IsolationModeHighlight.Mask.toProtocolRGBA()
        };
      }
      hideAllInOverlayWithoutSave() {
        this.#flexHighlights.clear();
        this.#gridHighlights.clear();
        this.#scrollSnapHighlights.clear();
        this.#containerQueryHighlights.clear();
        this.#isolatedElementHighlights.clear();
        this.updateHighlightsInOverlay();
      }
      refreshHighlights() {
        const gridsNeedUpdate = this.updateHighlightsForDeletedNodes(this.#gridHighlights);
        const flexboxesNeedUpdate = this.updateHighlightsForDeletedNodes(this.#flexHighlights);
        const scrollSnapsNeedUpdate = this.updateHighlightsForDeletedNodes(this.#scrollSnapHighlights);
        const containerQueriesNeedUpdate = this.updateHighlightsForDeletedNodes(this.#containerQueryHighlights);
        const isolatedElementsNeedUpdate = this.updateHighlightsForDeletedNodes(this.#isolatedElementHighlights);
        if (flexboxesNeedUpdate || gridsNeedUpdate || scrollSnapsNeedUpdate || containerQueriesNeedUpdate || isolatedElementsNeedUpdate) {
          this.updateHighlightsInOverlay();
          this.savePersistentHighlightSetting();
        }
      }
      updateHighlightsForDeletedNodes(highlights) {
        let needsUpdate = false;
        for (const nodeId of highlights.keys()) {
          if (this.#model.getDOMModel().nodeForId(nodeId) === null) {
            highlights.delete(nodeId);
            needsUpdate = true;
          }
        }
        return needsUpdate;
      }
      resetOverlay() {
        for (const nodeId of this.#gridHighlights.keys()) {
          this.#gridHighlights.set(nodeId, this.buildGridHighlightConfig(nodeId));
        }
        for (const nodeId of this.#flexHighlights.keys()) {
          this.#flexHighlights.set(nodeId, this.buildFlexContainerHighlightConfig(nodeId));
        }
        for (const nodeId of this.#scrollSnapHighlights.keys()) {
          this.#scrollSnapHighlights.set(nodeId, this.buildScrollSnapContainerHighlightConfig(nodeId));
        }
        for (const nodeId of this.#containerQueryHighlights.keys()) {
          this.#containerQueryHighlights.set(nodeId, this.buildContainerQueryContainerHighlightConfig());
        }
        for (const nodeId of this.#isolatedElementHighlights.keys()) {
          this.#isolatedElementHighlights.set(nodeId, this.buildIsolationModeHighlightConfig());
        }
        this.updateHighlightsInOverlay();
      }
      updateHighlightsInOverlay() {
        const hasNodesToHighlight = this.#gridHighlights.size > 0 || this.#flexHighlights.size > 0 || this.#containerQueryHighlights.size > 0 || this.#isolatedElementHighlights.size > 0;
        this.#model.setShowViewportSizeOnResize(!hasNodesToHighlight);
        this.updateGridHighlightsInOverlay();
        this.updateFlexHighlightsInOverlay();
        this.updateScrollSnapHighlightsInOverlay();
        this.updateContainerQueryHighlightsInOverlay();
        this.updateIsolatedElementHighlightsInOverlay();
      }
      updateGridHighlightsInOverlay() {
        const overlayModel = this.#model;
        const gridNodeHighlightConfigs = [];
        for (const [nodeId, gridHighlightConfig] of this.#gridHighlights.entries()) {
          gridNodeHighlightConfigs.push({ nodeId, gridHighlightConfig });
        }
        overlayModel.target().overlayAgent().invoke_setShowGridOverlays({ gridNodeHighlightConfigs });
      }
      updateFlexHighlightsInOverlay() {
        const overlayModel = this.#model;
        const flexNodeHighlightConfigs = [];
        for (const [nodeId, flexContainerHighlightConfig] of this.#flexHighlights.entries()) {
          flexNodeHighlightConfigs.push({ nodeId, flexContainerHighlightConfig });
        }
        overlayModel.target().overlayAgent().invoke_setShowFlexOverlays({ flexNodeHighlightConfigs });
      }
      updateScrollSnapHighlightsInOverlay() {
        const overlayModel = this.#model;
        const scrollSnapHighlightConfigs = [];
        for (const [nodeId, scrollSnapContainerHighlightConfig] of this.#scrollSnapHighlights.entries()) {
          scrollSnapHighlightConfigs.push({ nodeId, scrollSnapContainerHighlightConfig });
        }
        overlayModel.target().overlayAgent().invoke_setShowScrollSnapOverlays({ scrollSnapHighlightConfigs });
      }
      updateContainerQueryHighlightsInOverlay() {
        const overlayModel = this.#model;
        const containerQueryHighlightConfigs = [];
        for (const [nodeId, containerQueryContainerHighlightConfig] of this.#containerQueryHighlights.entries()) {
          containerQueryHighlightConfigs.push({ nodeId, containerQueryContainerHighlightConfig });
        }
        overlayModel.target().overlayAgent().invoke_setShowContainerQueryOverlays({ containerQueryHighlightConfigs });
      }
      updateIsolatedElementHighlightsInOverlay() {
        const overlayModel = this.#model;
        const isolatedElementHighlightConfigs = [];
        for (const [nodeId, isolationModeHighlightConfig] of this.#isolatedElementHighlights.entries()) {
          isolatedElementHighlightConfigs.push({ nodeId, isolationModeHighlightConfig });
        }
        overlayModel.target().overlayAgent().invoke_setShowIsolatedElements({ isolatedElementHighlightConfigs });
      }
      async restoreHighlightsForDocument() {
        this.#flexHighlights = /* @__PURE__ */ new Map();
        this.#gridHighlights = /* @__PURE__ */ new Map();
        this.#scrollSnapHighlights = /* @__PURE__ */ new Map();
        this.#containerQueryHighlights = /* @__PURE__ */ new Map();
        this.#isolatedElementHighlights = /* @__PURE__ */ new Map();
        const document2 = await this.#model.getDOMModel().requestDocument();
        const currentURL = document2 ? document2.documentURL : EmptyUrlString;
        await Promise.all(this.#persistentHighlightSetting.get().map(async (persistentHighlight) => {
          if (persistentHighlight.url === currentURL) {
            return await this.#model.getDOMModel().pushNodeByPathToFrontend(persistentHighlight.path).then((nodeId) => {
              const node2 = this.#model.getDOMModel().nodeForId(nodeId);
              if (!node2) {
                return;
              }
              switch (persistentHighlight.type) {
                case "GRID":
                  this.#gridHighlights.set(node2.id, this.buildGridHighlightConfig(node2.id));
                  this.#callbacks.onGridOverlayStateChanged({ nodeId: node2.id, enabled: true });
                  break;
                case "FLEX":
                  this.#flexHighlights.set(node2.id, this.buildFlexContainerHighlightConfig(node2.id));
                  this.#callbacks.onFlexOverlayStateChanged({ nodeId: node2.id, enabled: true });
                  break;
                case "CONTAINER_QUERY":
                  this.#containerQueryHighlights.set(node2.id, this.buildContainerQueryContainerHighlightConfig());
                  this.#callbacks.onContainerQueryOverlayStateChanged({ nodeId: node2.id, enabled: true });
                  break;
                case "SCROLL_SNAP":
                  this.#scrollSnapHighlights.set(node2.id, this.buildScrollSnapContainerHighlightConfig(node2.id));
                  this.#callbacks.onScrollSnapOverlayStateChanged({ nodeId: node2.id, enabled: true });
                  break;
                case "ISOLATED_ELEMENT":
                  this.#isolatedElementHighlights.set(node2.id, this.buildIsolationModeHighlightConfig());
                  break;
              }
            });
          }
        }));
        this.updateHighlightsInOverlay();
      }
      currentUrl() {
        const domDocument = this.#model.getDOMModel().existingDocument();
        return domDocument ? domDocument.documentURL : EmptyUrlString;
      }
      getPersistentHighlightSettingForOneType(highlights, type2) {
        const persistentHighlights = [];
        for (const nodeId of highlights.keys()) {
          const node2 = this.#model.getDOMModel().nodeForId(nodeId);
          if (node2) {
            persistentHighlights.push({ url: this.currentUrl(), path: node2.path(), type: type2 });
          }
        }
        return persistentHighlights;
      }
      savePersistentHighlightSetting() {
        const currentURL = this.currentUrl();
        const highlightsInOtherDocuments = this.#persistentHighlightSetting.get().filter((persistentSetting) => persistentSetting.url !== currentURL);
        const persistentHighlights = [
          ...highlightsInOtherDocuments,
          ...this.getPersistentHighlightSettingForOneType(this.#gridHighlights, "GRID"),
          ...this.getPersistentHighlightSettingForOneType(this.#flexHighlights, "FLEX"),
          ...this.getPersistentHighlightSettingForOneType(this.#containerQueryHighlights, "CONTAINER_QUERY"),
          ...this.getPersistentHighlightSettingForOneType(this.#scrollSnapHighlights, "SCROLL_SNAP"),
          ...this.getPersistentHighlightSettingForOneType(this.#isolatedElementHighlights, "ISOLATED_ELEMENT")
        ];
        this.#persistentHighlightSetting.set(persistentHighlights);
      }
    };
    UIStrings$$ = {
      pausedInDebugger: "Paused in debugger"
    };
    str_$_ = registerUIStrings("core/sdk/OverlayModel.ts", UIStrings$$);
    i18nString$I = getLocalizedString.bind(void 0, str_$_);
    platformOverlayDimensions = {
      mac: { x: 85, y: 0, width: 185, height: 40 },
      linux: { x: 0, y: 0, width: 196, height: 34 },
      windows: { x: 0, y: 0, width: 238, height: 33 }
    };
    OverlayModel = class _OverlayModel extends SDKModel {
      #domModel;
      overlayAgent;
      #debuggerModel;
      #inspectModeEnabled = false;
      #hideHighlightTimeout = null;
      #defaultHighlighter;
      #highlighter;
      #showPaintRectsSetting;
      #showLayoutShiftRegionsSetting;
      #showAdHighlightsSetting;
      #showDebugBordersSetting;
      #showFPSCounterSetting;
      #showScrollBottleneckRectsSetting;
      #registeredListeners = [];
      #showViewportSizeOnResize = true;
      #persistentHighlighter;
      #sourceOrderHighlighter;
      #sourceOrderModeActive = false;
      #windowControls;
      constructor(target) {
        super(target);
        this.#domModel = target.model(DOMModel);
        target.registerOverlayDispatcher(this);
        this.overlayAgent = target.overlayAgent();
        this.#debuggerModel = target.model(DebuggerModel);
        if (this.#debuggerModel) {
          Settings.instance().moduleSetting("disable-paused-state-overlay").addChangeListener(this.updatePausedInDebuggerMessage, this);
          this.#debuggerModel.addEventListener(Events$5.DebuggerPaused, this.updatePausedInDebuggerMessage, this);
          this.#debuggerModel.addEventListener(Events$5.DebuggerResumed, this.updatePausedInDebuggerMessage, this);
          this.#debuggerModel.addEventListener(Events$5.GlobalObjectCleared, this.updatePausedInDebuggerMessage, this);
        }
        this.#defaultHighlighter = new DefaultHighlighter(this);
        this.#highlighter = this.#defaultHighlighter;
        this.#showPaintRectsSetting = Settings.instance().moduleSetting("show-paint-rects");
        this.#showLayoutShiftRegionsSetting = Settings.instance().moduleSetting("show-layout-shift-regions");
        this.#showAdHighlightsSetting = Settings.instance().moduleSetting("show-ad-highlights");
        this.#showDebugBordersSetting = Settings.instance().moduleSetting("show-debug-borders");
        this.#showFPSCounterSetting = Settings.instance().moduleSetting("show-fps-counter");
        this.#showScrollBottleneckRectsSetting = Settings.instance().moduleSetting("show-scroll-bottleneck-rects");
        if (!target.suspended()) {
          void this.overlayAgent.invoke_enable();
          void this.wireAgentToSettings();
        }
        this.#persistentHighlighter = new OverlayPersistentHighlighter(this, {
          onGridOverlayStateChanged: ({ nodeId, enabled }) => {
            this.#domModel.nodeForId(nodeId)?.dispatchEventToListeners(DOMNodeEvents.GRID_OVERLAY_STATE_CHANGED, { enabled });
            this.dispatchEventToListeners("PersistentGridOverlayStateChanged", { nodeId, enabled });
          },
          onFlexOverlayStateChanged: ({ nodeId, enabled }) => {
            this.#domModel.nodeForId(nodeId)?.dispatchEventToListeners(DOMNodeEvents.FLEX_CONTAINER_OVERLAY_STATE_CHANGED, { enabled });
            this.dispatchEventToListeners("PersistentFlexContainerOverlayStateChanged", { nodeId, enabled });
          },
          onContainerQueryOverlayStateChanged: ({ nodeId, enabled }) => {
            this.#domModel.nodeForId(nodeId)?.dispatchEventToListeners(DOMNodeEvents.CONTAINER_QUERY_OVERLAY_STATE_CHANGED, { enabled });
            this.dispatchEventToListeners("PersistentContainerQueryOverlayStateChanged", { nodeId, enabled });
          },
          onScrollSnapOverlayStateChanged: ({ nodeId, enabled }) => {
            this.#domModel.nodeForId(nodeId)?.dispatchEventToListeners(DOMNodeEvents.SCROLL_SNAP_OVERLAY_STATE_CHANGED, { enabled });
            this.dispatchEventToListeners("PersistentScrollSnapOverlayStateChanged", { nodeId, enabled });
          }
        });
        this.#domModel.addEventListener(Events$8.NodeRemoved, () => {
          if (!this.#persistentHighlighter) {
            return;
          }
          this.#persistentHighlighter.refreshHighlights();
        });
        this.#domModel.addEventListener(Events$8.DocumentUpdated, () => {
          if (!this.#persistentHighlighter) {
            return;
          }
          this.#persistentHighlighter.hideAllInOverlayWithoutSave();
          if (!target.suspended()) {
            void this.#persistentHighlighter.restoreHighlightsForDocument();
          }
        });
        this.#sourceOrderHighlighter = new SourceOrderHighlighter(this);
        this.#windowControls = new WindowControls(this.#domModel.cssModel());
      }
      static highlightObjectAsDOMNode(object2) {
        const domModel = object2.runtimeModel().target().model(DOMModel);
        if (domModel) {
          domModel.overlayModel().highlightInOverlay({ object: object2, selectorList: void 0 });
        }
      }
      static hideDOMNodeHighlight() {
        for (const overlayModel of TargetManager3.instance().models(_OverlayModel)) {
          overlayModel.delayedHideHighlight(0);
        }
      }
      static async muteHighlight() {
        return await Promise.all(TargetManager3.instance().models(_OverlayModel).map((model3) => model3.suspendModel()));
      }
      static async unmuteHighlight() {
        return await Promise.all(TargetManager3.instance().models(_OverlayModel).map((model3) => model3.resumeModel()));
      }
      static highlightRect(rect) {
        for (const overlayModel of TargetManager3.instance().models(_OverlayModel)) {
          void overlayModel.highlightRect(rect);
        }
      }
      static clearHighlight() {
        for (const overlayModel of TargetManager3.instance().models(_OverlayModel)) {
          void overlayModel.clearHighlight();
        }
      }
      getDOMModel() {
        return this.#domModel;
      }
      highlightRect({ x, y, width, height, color, outlineColor }) {
        const highlightColor = color || { r: 255, g: 0, b: 255, a: 0.3 };
        const highlightOutlineColor = outlineColor || { r: 255, g: 0, b: 255, a: 0.5 };
        return this.overlayAgent.invoke_highlightRect({ x, y, width, height, color: highlightColor, outlineColor: highlightOutlineColor });
      }
      clearHighlight() {
        return this.overlayAgent.invoke_hideHighlight();
      }
      async wireAgentToSettings() {
        this.#registeredListeners = [
          this.#showPaintRectsSetting.addChangeListener(() => this.overlayAgent.invoke_setShowPaintRects({ result: this.#showPaintRectsSetting.get() })),
          this.#showLayoutShiftRegionsSetting.addChangeListener(() => this.overlayAgent.invoke_setShowLayoutShiftRegions({ result: this.#showLayoutShiftRegionsSetting.get() })),
          this.#showAdHighlightsSetting.addChangeListener(() => this.overlayAgent.invoke_setShowAdHighlights({ show: this.#showAdHighlightsSetting.get() })),
          this.#showDebugBordersSetting.addChangeListener(() => this.overlayAgent.invoke_setShowDebugBorders({ show: this.#showDebugBordersSetting.get() })),
          this.#showFPSCounterSetting.addChangeListener(() => this.overlayAgent.invoke_setShowFPSCounter({ show: this.#showFPSCounterSetting.get() })),
          this.#showScrollBottleneckRectsSetting.addChangeListener(() => this.overlayAgent.invoke_setShowScrollBottleneckRects({ show: this.#showScrollBottleneckRectsSetting.get() }))
        ];
        if (this.#showPaintRectsSetting.get()) {
          void this.overlayAgent.invoke_setShowPaintRects({ result: true });
        }
        if (this.#showLayoutShiftRegionsSetting.get()) {
          void this.overlayAgent.invoke_setShowLayoutShiftRegions({ result: true });
        }
        if (this.#showAdHighlightsSetting.get()) {
          void this.overlayAgent.invoke_setShowAdHighlights({ show: true });
        }
        if (this.#showDebugBordersSetting.get()) {
          void this.overlayAgent.invoke_setShowDebugBorders({ show: true });
        }
        if (this.#showFPSCounterSetting.get()) {
          void this.overlayAgent.invoke_setShowFPSCounter({ show: true });
        }
        if (this.#showScrollBottleneckRectsSetting.get()) {
          void this.overlayAgent.invoke_setShowScrollBottleneckRects({ show: true });
        }
        if (this.#debuggerModel && this.#debuggerModel.isPaused()) {
          this.updatePausedInDebuggerMessage();
        }
        await this.overlayAgent.invoke_setShowViewportSizeOnResize({ show: this.#showViewportSizeOnResize });
        this.#persistentHighlighter?.resetOverlay();
      }
      async suspendModel() {
        removeEventListeners(this.#registeredListeners);
        await this.overlayAgent.invoke_disable();
      }
      async resumeModel() {
        await Promise.all([this.overlayAgent.invoke_enable(), this.wireAgentToSettings()]);
      }
      setShowViewportSizeOnResize(show) {
        if (this.#showViewportSizeOnResize === show) {
          return;
        }
        this.#showViewportSizeOnResize = show;
        if (this.target().suspended()) {
          return;
        }
        void this.overlayAgent.invoke_setShowViewportSizeOnResize({ show });
      }
      updatePausedInDebuggerMessage() {
        if (this.target().suspended()) {
          return;
        }
        const message = this.#debuggerModel && this.#debuggerModel.isPaused() && !Settings.instance().moduleSetting("disable-paused-state-overlay").get() ? i18nString$I(UIStrings$$.pausedInDebugger) : void 0;
        void this.overlayAgent.invoke_setPausedInDebuggerMessage({ message });
      }
      setHighlighter(highlighter) {
        this.#highlighter = highlighter || this.#defaultHighlighter;
      }
      async setInspectMode(mode2, showDetailedTooltip = true) {
        await this.#domModel.requestDocument();
        this.#inspectModeEnabled = mode2 !== "none";
        this.dispatchEventToListeners("InspectModeWillBeToggled", this);
        void this.#highlighter.setInspectMode(mode2, this.buildHighlightConfig("all", showDetailedTooltip));
      }
      inspectModeEnabled() {
        return this.#inspectModeEnabled;
      }
      highlightInOverlay(data32, mode2, showInfo) {
        if (this.#sourceOrderModeActive) {
          return;
        }
        if (this.#hideHighlightTimeout) {
          clearTimeout(this.#hideHighlightTimeout);
          this.#hideHighlightTimeout = null;
        }
        const highlightConfig = this.buildHighlightConfig(mode2);
        if (typeof showInfo !== "undefined") {
          highlightConfig.showInfo = showInfo;
        }
        this.#highlighter.highlightInOverlay(data32, highlightConfig);
      }
      highlightInOverlayForTwoSeconds(data32) {
        this.highlightInOverlay(data32);
        this.delayedHideHighlight(2e3);
      }
      highlightGridInPersistentOverlay(nodeId) {
        if (!this.#persistentHighlighter) {
          return;
        }
        this.#persistentHighlighter.highlightGridInOverlay(nodeId);
      }
      isHighlightedGridInPersistentOverlay(nodeId) {
        if (!this.#persistentHighlighter) {
          return false;
        }
        return this.#persistentHighlighter.isGridHighlighted(nodeId);
      }
      hideGridInPersistentOverlay(nodeId) {
        if (!this.#persistentHighlighter) {
          return;
        }
        this.#persistentHighlighter.hideGridInOverlay(nodeId);
      }
      highlightScrollSnapInPersistentOverlay(nodeId) {
        if (!this.#persistentHighlighter) {
          return;
        }
        this.#persistentHighlighter.highlightScrollSnapInOverlay(nodeId);
      }
      isHighlightedScrollSnapInPersistentOverlay(nodeId) {
        if (!this.#persistentHighlighter) {
          return false;
        }
        return this.#persistentHighlighter.isScrollSnapHighlighted(nodeId);
      }
      hideScrollSnapInPersistentOverlay(nodeId) {
        if (!this.#persistentHighlighter) {
          return;
        }
        this.#persistentHighlighter.hideScrollSnapInOverlay(nodeId);
      }
      highlightFlexContainerInPersistentOverlay(nodeId) {
        if (!this.#persistentHighlighter) {
          return;
        }
        this.#persistentHighlighter.highlightFlexInOverlay(nodeId);
      }
      isHighlightedFlexContainerInPersistentOverlay(nodeId) {
        if (!this.#persistentHighlighter) {
          return false;
        }
        return this.#persistentHighlighter.isFlexHighlighted(nodeId);
      }
      hideFlexContainerInPersistentOverlay(nodeId) {
        if (!this.#persistentHighlighter) {
          return;
        }
        this.#persistentHighlighter.hideFlexInOverlay(nodeId);
      }
      highlightContainerQueryInPersistentOverlay(nodeId) {
        if (!this.#persistentHighlighter) {
          return;
        }
        this.#persistentHighlighter.highlightContainerQueryInOverlay(nodeId);
      }
      isHighlightedContainerQueryInPersistentOverlay(nodeId) {
        if (!this.#persistentHighlighter) {
          return false;
        }
        return this.#persistentHighlighter.isContainerQueryHighlighted(nodeId);
      }
      hideContainerQueryInPersistentOverlay(nodeId) {
        if (!this.#persistentHighlighter) {
          return;
        }
        this.#persistentHighlighter.hideContainerQueryInOverlay(nodeId);
      }
      highlightSourceOrderInOverlay(node2) {
        const sourceOrderConfig = {
          parentOutlineColor: SourceOrderHighlight.ParentOutline.toProtocolRGBA(),
          childOutlineColor: SourceOrderHighlight.ChildOutline.toProtocolRGBA()
        };
        this.#sourceOrderHighlighter.highlightSourceOrderInOverlay(node2, sourceOrderConfig);
      }
      colorOfGridInPersistentOverlay(nodeId) {
        if (!this.#persistentHighlighter) {
          return null;
        }
        return this.#persistentHighlighter.colorOfGrid(nodeId).asString("hex");
      }
      setColorOfGridInPersistentOverlay(nodeId, colorStr) {
        if (!this.#persistentHighlighter) {
          return;
        }
        const color = parse$2(colorStr);
        if (!color) {
          return;
        }
        this.#persistentHighlighter.setColorOfGrid(nodeId, color);
        this.#persistentHighlighter.resetOverlay();
      }
      colorOfFlexInPersistentOverlay(nodeId) {
        if (!this.#persistentHighlighter) {
          return null;
        }
        return this.#persistentHighlighter.colorOfFlex(nodeId).asString("hex");
      }
      setColorOfFlexInPersistentOverlay(nodeId, colorStr) {
        if (!this.#persistentHighlighter) {
          return;
        }
        const color = parse$2(colorStr);
        if (!color) {
          return;
        }
        this.#persistentHighlighter.setColorOfFlex(nodeId, color);
        this.#persistentHighlighter.resetOverlay();
      }
      hideSourceOrderInOverlay() {
        this.#sourceOrderHighlighter.hideSourceOrderHighlight();
      }
      setSourceOrderActive(isActive) {
        this.#sourceOrderModeActive = isActive;
      }
      delayedHideHighlight(delay) {
        if (this.#hideHighlightTimeout === null) {
          this.#hideHighlightTimeout = window.setTimeout(() => this.highlightInOverlay({ clear: true }), delay);
        }
      }
      highlightFrame(frameId) {
        if (this.#hideHighlightTimeout) {
          clearTimeout(this.#hideHighlightTimeout);
          this.#hideHighlightTimeout = null;
        }
        this.#highlighter.highlightFrame(frameId);
      }
      showHingeForDualScreen(hinge) {
        if (hinge) {
          const { x, y, width, height, contentColor, outlineColor } = hinge;
          void this.overlayAgent.invoke_setShowHinge({
            hingeConfig: { rect: { x, y, width, height }, contentColor, outlineColor }
          });
        } else {
          void this.overlayAgent.invoke_setShowHinge({});
        }
      }
      setWindowControlsPlatform(selectedPlatform) {
        this.#windowControls.selectedPlatform = selectedPlatform;
      }
      setWindowControlsThemeColor(themeColor) {
        this.#windowControls.themeColor = themeColor;
      }
      getWindowControlsConfig() {
        return this.#windowControls.config;
      }
      async toggleWindowControlsToolbar(show) {
        const wcoConfigObj = show ? { windowControlsOverlayConfig: this.#windowControls.config } : {};
        const setWindowControlsOverlayOperation = this.overlayAgent.invoke_setShowWindowControlsOverlay(wcoConfigObj);
        const toggleStylesheetOperation = this.#windowControls.toggleEmulatedOverlay(show);
        await Promise.all([setWindowControlsOverlayOperation, toggleStylesheetOperation]);
        this.setShowViewportSizeOnResize(!show);
      }
      buildHighlightConfig(mode2 = "all", showDetailedToolip = false) {
        const showRulers = Settings.instance().moduleSetting("show-metrics-rulers").get();
        const highlightConfig = {
          showInfo: mode2 === "all" || mode2 === "container-outline",
          showRulers,
          showStyles: showDetailedToolip,
          showAccessibilityInfo: showDetailedToolip,
          showExtensionLines: showRulers,
          gridHighlightConfig: {},
          flexContainerHighlightConfig: {},
          flexItemHighlightConfig: {},
          contrastAlgorithm: experiments.isEnabled(ExperimentName.APCA) ? "apca" : "aa"
        };
        if (mode2 === "all" || mode2 === "content") {
          highlightConfig.contentColor = PageHighlight.Content.toProtocolRGBA();
        }
        if (mode2 === "all" || mode2 === "padding") {
          highlightConfig.paddingColor = PageHighlight.Padding.toProtocolRGBA();
        }
        if (mode2 === "all" || mode2 === "border") {
          highlightConfig.borderColor = PageHighlight.Border.toProtocolRGBA();
        }
        if (mode2 === "all" || mode2 === "margin") {
          highlightConfig.marginColor = PageHighlight.Margin.toProtocolRGBA();
        }
        if (mode2 === "all") {
          highlightConfig.eventTargetColor = PageHighlight.EventTarget.toProtocolRGBA();
          highlightConfig.shapeColor = PageHighlight.Shape.toProtocolRGBA();
          highlightConfig.shapeMarginColor = PageHighlight.ShapeMargin.toProtocolRGBA();
          highlightConfig.gridHighlightConfig = {
            rowGapColor: PageHighlight.GapBackground.toProtocolRGBA(),
            rowHatchColor: PageHighlight.GapHatch.toProtocolRGBA(),
            columnGapColor: PageHighlight.GapBackground.toProtocolRGBA(),
            columnHatchColor: PageHighlight.GapHatch.toProtocolRGBA(),
            rowLineColor: PageHighlight.LayoutLine.toProtocolRGBA(),
            columnLineColor: PageHighlight.LayoutLine.toProtocolRGBA(),
            rowLineDash: true,
            columnLineDash: true
          };
          highlightConfig.flexContainerHighlightConfig = {
            containerBorder: {
              color: PageHighlight.LayoutLine.toProtocolRGBA(),
              pattern: "dashed"
            },
            itemSeparator: {
              color: PageHighlight.LayoutLine.toProtocolRGBA(),
              pattern: "dotted"
            },
            lineSeparator: {
              color: PageHighlight.LayoutLine.toProtocolRGBA(),
              pattern: "dashed"
            },
            mainDistributedSpace: {
              hatchColor: PageHighlight.GapHatch.toProtocolRGBA(),
              fillColor: PageHighlight.GapBackground.toProtocolRGBA()
            },
            crossDistributedSpace: {
              hatchColor: PageHighlight.GapHatch.toProtocolRGBA(),
              fillColor: PageHighlight.GapBackground.toProtocolRGBA()
            },
            rowGapSpace: {
              hatchColor: PageHighlight.GapHatch.toProtocolRGBA(),
              fillColor: PageHighlight.GapBackground.toProtocolRGBA()
            },
            columnGapSpace: {
              hatchColor: PageHighlight.GapHatch.toProtocolRGBA(),
              fillColor: PageHighlight.GapBackground.toProtocolRGBA()
            }
          };
          highlightConfig.flexItemHighlightConfig = {
            baseSizeBox: {
              hatchColor: PageHighlight.GapHatch.toProtocolRGBA()
            },
            baseSizeBorder: {
              color: PageHighlight.LayoutLine.toProtocolRGBA(),
              pattern: "dotted"
            },
            flexibilityArrow: {
              color: PageHighlight.LayoutLine.toProtocolRGBA()
            }
          };
        }
        if (mode2.endsWith("gap")) {
          highlightConfig.gridHighlightConfig = {
            gridBorderColor: PageHighlight.GridBorder.toProtocolRGBA(),
            gridBorderDash: true
          };
          if (mode2 === "gap" || mode2 === "row-gap") {
            highlightConfig.gridHighlightConfig.rowGapColor = PageHighlight.GapBackground.toProtocolRGBA();
            highlightConfig.gridHighlightConfig.rowHatchColor = PageHighlight.GapHatch.toProtocolRGBA();
          }
          if (mode2 === "gap" || mode2 === "column-gap") {
            highlightConfig.gridHighlightConfig.columnGapColor = PageHighlight.GapBackground.toProtocolRGBA();
            highlightConfig.gridHighlightConfig.columnHatchColor = PageHighlight.GapHatch.toProtocolRGBA();
          }
        }
        if (mode2.endsWith("gap")) {
          highlightConfig.flexContainerHighlightConfig = {
            containerBorder: {
              color: PageHighlight.LayoutLine.toProtocolRGBA(),
              pattern: "dashed"
            }
          };
          if (mode2 === "gap" || mode2 === "row-gap") {
            highlightConfig.flexContainerHighlightConfig.rowGapSpace = {
              hatchColor: PageHighlight.GapHatch.toProtocolRGBA(),
              fillColor: PageHighlight.GapBackground.toProtocolRGBA()
            };
          }
          if (mode2 === "gap" || mode2 === "column-gap") {
            highlightConfig.flexContainerHighlightConfig.columnGapSpace = {
              hatchColor: PageHighlight.GapHatch.toProtocolRGBA(),
              fillColor: PageHighlight.GapBackground.toProtocolRGBA()
            };
          }
        }
        if (mode2 === "grid-areas") {
          highlightConfig.gridHighlightConfig = {
            rowLineColor: PageHighlight.LayoutLine.toProtocolRGBA(),
            columnLineColor: PageHighlight.LayoutLine.toProtocolRGBA(),
            rowLineDash: true,
            columnLineDash: true,
            showAreaNames: true,
            areaBorderColor: PageHighlight.GridAreaBorder.toProtocolRGBA()
          };
        }
        if (mode2 === "grid-template-columns") {
          highlightConfig.contentColor = PageHighlight.Content.toProtocolRGBA();
          highlightConfig.gridHighlightConfig = {
            columnLineColor: PageHighlight.LayoutLine.toProtocolRGBA(),
            columnLineDash: true
          };
        }
        if (mode2 === "grid-template-rows") {
          highlightConfig.contentColor = PageHighlight.Content.toProtocolRGBA();
          highlightConfig.gridHighlightConfig = {
            rowLineColor: PageHighlight.LayoutLine.toProtocolRGBA(),
            rowLineDash: true
          };
        }
        if (mode2 === "justify-content") {
          highlightConfig.flexContainerHighlightConfig = {
            containerBorder: {
              color: PageHighlight.LayoutLine.toProtocolRGBA(),
              pattern: "dashed"
            },
            mainDistributedSpace: {
              hatchColor: PageHighlight.GapHatch.toProtocolRGBA(),
              fillColor: PageHighlight.GapBackground.toProtocolRGBA()
            }
          };
        }
        if (mode2 === "align-content") {
          highlightConfig.flexContainerHighlightConfig = {
            containerBorder: {
              color: PageHighlight.LayoutLine.toProtocolRGBA(),
              pattern: "dashed"
            },
            crossDistributedSpace: {
              hatchColor: PageHighlight.GapHatch.toProtocolRGBA(),
              fillColor: PageHighlight.GapBackground.toProtocolRGBA()
            }
          };
        }
        if (mode2 === "align-items") {
          highlightConfig.flexContainerHighlightConfig = {
            containerBorder: {
              color: PageHighlight.LayoutLine.toProtocolRGBA(),
              pattern: "dashed"
            },
            lineSeparator: {
              color: PageHighlight.LayoutLine.toProtocolRGBA(),
              pattern: "dashed"
            },
            crossAlignment: { color: PageHighlight.LayoutLine.toProtocolRGBA() }
          };
        }
        if (mode2 === "flexibility") {
          highlightConfig.flexItemHighlightConfig = {
            baseSizeBox: {
              hatchColor: PageHighlight.GapHatch.toProtocolRGBA()
            },
            baseSizeBorder: {
              color: PageHighlight.LayoutLine.toProtocolRGBA(),
              pattern: "dotted"
            },
            flexibilityArrow: {
              color: PageHighlight.LayoutLine.toProtocolRGBA()
            }
          };
        }
        if (mode2 === "container-outline") {
          highlightConfig.containerQueryContainerHighlightConfig = {
            containerBorder: {
              color: PageHighlight.LayoutLine.toProtocolRGBA(),
              pattern: "dashed"
            }
          };
        }
        return highlightConfig;
      }
      nodeHighlightRequested({ nodeId }) {
        const node2 = this.#domModel.nodeForId(nodeId);
        if (node2) {
          this.dispatchEventToListeners("HighlightNodeRequested", node2);
        }
      }
      static setInspectNodeHandler(handler) {
        _OverlayModel.inspectNodeHandler = handler;
      }
      inspectNodeRequested({ backendNodeId }) {
        const deferredNode = new DeferredDOMNode(this.target(), backendNodeId);
        if (_OverlayModel.inspectNodeHandler) {
          void deferredNode.resolvePromise().then((node2) => {
            if (node2 && _OverlayModel.inspectNodeHandler) {
              void _OverlayModel.inspectNodeHandler(node2);
            }
          });
        } else {
          void reveal(deferredNode);
        }
        this.dispatchEventToListeners("InspectModeExited");
      }
      screenshotRequested({ viewport }) {
        this.dispatchEventToListeners("ScreenshotRequested", viewport);
        this.dispatchEventToListeners("InspectModeExited");
      }
      inspectModeCanceled() {
        this.dispatchEventToListeners("InspectModeExited");
      }
      static inspectNodeHandler = null;
      getOverlayAgent() {
        return this.overlayAgent;
      }
      async hasStyleSheetText(url) {
        return await this.#windowControls.initializeStyleSheetText(url);
      }
      inspectPanelShowRequested({ backendNodeId }) {
        this.dispatchEventToListeners("InspectPanelShowRequested", backendNodeId);
      }
      inspectedElementWindowRestored({ backendNodeId }) {
        this.dispatchEventToListeners("InspectedElementWindowRestored", backendNodeId);
      }
    };
    WindowControls = class _WindowControls {
      #cssModel;
      #originalStylesheetText;
      #stylesheetId;
      #currentUrl;
      #config = {
        showCSS: false,
        selectedPlatform: "Windows",
        themeColor: "#ffffff"
      };
      constructor(cssModel) {
        this.#cssModel = cssModel;
      }
      get selectedPlatform() {
        return this.#config.selectedPlatform;
      }
      set selectedPlatform(osType) {
        this.#config.selectedPlatform = osType;
      }
      get themeColor() {
        return this.#config.themeColor;
      }
      set themeColor(color) {
        this.#config.themeColor = color;
      }
      get config() {
        return this.#config;
      }
      async initializeStyleSheetText(url) {
        if (this.#originalStylesheetText && url === this.#currentUrl) {
          return true;
        }
        const cssSourceUrl = this.#fetchCssSourceUrl(url);
        if (!cssSourceUrl) {
          return false;
        }
        this.#stylesheetId = this.#fetchCurrentStyleSheet(cssSourceUrl);
        if (!this.#stylesheetId) {
          return false;
        }
        const stylesheetText = await this.#cssModel.getStyleSheetText(this.#stylesheetId);
        if (!stylesheetText) {
          return false;
        }
        this.#originalStylesheetText = stylesheetText;
        this.#currentUrl = url;
        return true;
      }
      async toggleEmulatedOverlay(showOverlay) {
        if (!this.#stylesheetId || !this.#originalStylesheetText) {
          return;
        }
        if (showOverlay) {
          const styleSheetText = _WindowControls.#getStyleSheetForPlatform(this.#config.selectedPlatform.toLowerCase(), this.#originalStylesheetText);
          if (styleSheetText) {
            await this.#cssModel.setStyleSheetText(this.#stylesheetId, styleSheetText, false);
          }
        } else {
          await this.#cssModel.setStyleSheetText(this.#stylesheetId, this.#originalStylesheetText, false);
        }
      }
      static #getStyleSheetForPlatform(platform, originalStyleSheet) {
        const overlayDimensions = platformOverlayDimensions[platform];
        return _WindowControls.#transformStyleSheet(overlayDimensions.x, overlayDimensions.y, overlayDimensions.width, overlayDimensions.height, originalStyleSheet);
      }
      #fetchCssSourceUrl(url) {
        const parentURL = ParsedURL2.extractOrigin(url);
        const cssHeaders = this.#cssModel.styleSheetHeaders();
        const header = cssHeaders.find((header2) => header2.sourceURL && header2.sourceURL.includes(parentURL));
        return header?.sourceURL;
      }
      #fetchCurrentStyleSheet(cssSourceUrl) {
        const stylesheetIds = this.#cssModel.getStyleSheetIdsForURL(cssSourceUrl);
        return stylesheetIds.length > 0 ? stylesheetIds[0] : void 0;
      }
      static #transformStyleSheet(x, y, width, height, originalStyleSheet) {
        if (!originalStyleSheet) {
          return void 0;
        }
        const stylesheetText = originalStyleSheet;
        const updatedStylesheet = stylesheetText.replace(/: env\(titlebar-area-x(?:,[^)]*)?\);/g, `: env(titlebar-area-x, ${x}px);`).replace(/: env\(titlebar-area-y(?:,[^)]*)?\);/g, `: env(titlebar-area-y, ${y}px);`).replace(/: env\(titlebar-area-width(?:,[^)]*)?\);/g, `: env(titlebar-area-width, calc(100% - ${width}px));`).replace(/: env\(titlebar-area-height(?:,[^)]*)?\);/g, `: env(titlebar-area-height, ${height}px);`);
        return updatedStylesheet;
      }
      transformStyleSheetforTesting(x, y, width, height, originalStyleSheet) {
        return _WindowControls.#transformStyleSheet(x, y, width, height, originalStyleSheet);
      }
    };
    DefaultHighlighter = class {
      #model;
      constructor(model3) {
        this.#model = model3;
      }
      highlightInOverlay(data32, highlightConfig) {
        const { node: node2, deferredNode, object: object2, selectorList } = { node: void 0, deferredNode: void 0, object: void 0, selectorList: void 0, ...data32 };
        const nodeId = node2 ? node2.id : void 0;
        const backendNodeId = deferredNode ? deferredNode.backendNodeId() : void 0;
        const objectId = object2 ? object2.objectId : void 0;
        if (nodeId || backendNodeId || objectId) {
          void this.#model.target().overlayAgent().invoke_highlightNode({ highlightConfig, nodeId, backendNodeId, objectId, selector: selectorList });
        } else {
          void this.#model.target().overlayAgent().invoke_hideHighlight();
        }
      }
      async setInspectMode(mode2, highlightConfig) {
        await this.#model.target().overlayAgent().invoke_setInspectMode({ mode: mode2, highlightConfig });
      }
      highlightFrame(frameId) {
        void this.#model.target().overlayAgent().invoke_highlightFrame({
          frameId,
          contentColor: PageHighlight.Content.toProtocolRGBA(),
          contentOutlineColor: PageHighlight.ContentOutline.toProtocolRGBA()
        });
      }
    };
    SourceOrderHighlighter = class {
      #model;
      constructor(model3) {
        this.#model = model3;
      }
      highlightSourceOrderInOverlay(node2, sourceOrderConfig) {
        this.#model.setSourceOrderActive(true);
        this.#model.setShowViewportSizeOnResize(false);
        void this.#model.getOverlayAgent().invoke_highlightSourceOrder({ sourceOrderConfig, nodeId: node2.id });
      }
      hideSourceOrderHighlight() {
        this.#model.setSourceOrderActive(false);
        this.#model.setShowViewportSizeOnResize(true);
        void this.#model.clearHighlight();
      }
    };
    SDKModel.register(OverlayModel, { capabilities: 2, autostart: true });
    HeapProfilerModel = class extends SDKModel {
      #enabled;
      #heapProfilerAgent;
      #runtimeModel;
      #samplingProfilerDepth;
      constructor(target) {
        super(target);
        target.registerHeapProfilerDispatcher(new HeapProfilerDispatcher(this));
        this.#enabled = false;
        this.#heapProfilerAgent = target.heapProfilerAgent();
        this.#runtimeModel = target.model(RuntimeModel);
        this.#samplingProfilerDepth = 0;
      }
      debuggerModel() {
        return this.#runtimeModel.debuggerModel();
      }
      runtimeModel() {
        return this.#runtimeModel;
      }
      async enable() {
        if (this.#enabled) {
          return;
        }
        this.#enabled = true;
        await this.#heapProfilerAgent.invoke_enable();
      }
      async startSampling(samplingRateInBytes) {
        if (this.#samplingProfilerDepth++) {
          return false;
        }
        const defaultSamplingIntervalInBytes = 16384;
        const response = await this.#heapProfilerAgent.invoke_startSampling({ samplingInterval: samplingRateInBytes || defaultSamplingIntervalInBytes });
        return Boolean(response.getError());
      }
      async stopSampling() {
        if (!this.#samplingProfilerDepth) {
          throw new Error("Sampling profiler is not running.");
        }
        if (--this.#samplingProfilerDepth) {
          return await this.getSamplingProfile();
        }
        const response = await this.#heapProfilerAgent.invoke_stopSampling();
        if (response.getError()) {
          return null;
        }
        return response.profile;
      }
      async getSamplingProfile() {
        const response = await this.#heapProfilerAgent.invoke_getSamplingProfile();
        if (response.getError()) {
          return null;
        }
        return response.profile;
      }
      async collectGarbage() {
        const response = await this.#heapProfilerAgent.invoke_collectGarbage();
        return Boolean(response.getError());
      }
      async snapshotObjectIdForObjectId(objectId) {
        const response = await this.#heapProfilerAgent.invoke_getHeapObjectId({ objectId });
        if (response.getError()) {
          return null;
        }
        return response.heapSnapshotObjectId;
      }
      async objectForSnapshotObjectId(snapshotObjectId, objectGroupName) {
        const result = await this.#heapProfilerAgent.invoke_getObjectByHeapObjectId({ objectId: snapshotObjectId, objectGroup: objectGroupName });
        if (result.getError()) {
          return null;
        }
        return this.#runtimeModel.createRemoteObject(result.result);
      }
      async addInspectedHeapObject(snapshotObjectId) {
        const response = await this.#heapProfilerAgent.invoke_addInspectedHeapObject({ heapObjectId: snapshotObjectId });
        return Boolean(response.getError());
      }
      async takeHeapSnapshot(heapSnapshotOptions) {
        await TargetManager3.instance().suspendAllTargets("heap-snapshot");
        try {
          await this.#heapProfilerAgent.invoke_takeHeapSnapshot(heapSnapshotOptions);
        } finally {
          await TargetManager3.instance().resumeAllTargets();
        }
      }
      async startTrackingHeapObjects(recordAllocationStacks) {
        const response = await this.#heapProfilerAgent.invoke_startTrackingHeapObjects({ trackAllocations: recordAllocationStacks });
        return Boolean(response.getError());
      }
      async stopTrackingHeapObjects(reportProgress) {
        const response = await this.#heapProfilerAgent.invoke_stopTrackingHeapObjects({ reportProgress });
        return Boolean(response.getError());
      }
      heapStatsUpdate(samples) {
        this.dispatchEventToListeners("HeapStatsUpdate", samples);
      }
      lastSeenObjectId(lastSeenObjectId, timestamp) {
        this.dispatchEventToListeners("LastSeenObjectId", { lastSeenObjectId, timestamp });
      }
      addHeapSnapshotChunk(chunk) {
        this.dispatchEventToListeners("AddHeapSnapshotChunk", chunk);
      }
      reportHeapSnapshotProgress(done, total, finished) {
        this.dispatchEventToListeners("ReportHeapSnapshotProgress", { done, total, finished });
      }
      resetProfiles() {
        this.dispatchEventToListeners("ResetProfiles", this);
      }
    };
    HeapProfilerDispatcher = class {
      #heapProfilerModel;
      constructor(model3) {
        this.#heapProfilerModel = model3;
      }
      heapStatsUpdate({ statsUpdate }) {
        this.#heapProfilerModel.heapStatsUpdate(statsUpdate);
      }
      lastSeenObjectId({ lastSeenObjectId, timestamp }) {
        this.#heapProfilerModel.lastSeenObjectId(lastSeenObjectId, timestamp);
      }
      addHeapSnapshotChunk({ chunk }) {
        this.#heapProfilerModel.addHeapSnapshotChunk(chunk);
      }
      reportHeapSnapshotProgress({ done, total, finished }) {
        this.#heapProfilerModel.reportHeapSnapshotProgress(done, total, finished);
      }
      resetProfiles() {
        this.#heapProfilerModel.resetProfiles();
      }
    };
    SDKModel.register(HeapProfilerModel, { capabilities: 4, autostart: false });
    RuntimeModel = class extends SDKModel {
      agent;
      #executionContextById = /* @__PURE__ */ new Map();
      #executionContextComparator = ExecutionContext3.comparator;
      constructor(target) {
        super(target);
        this.agent = target.runtimeAgent();
        this.target().registerRuntimeDispatcher(new RuntimeDispatcher(this));
        void this.agent.invoke_enable();
        if (Settings.instance().moduleSetting("custom-formatters").get()) {
          void this.agent.invoke_setCustomObjectFormatterEnabled({ enabled: true });
        }
        Settings.instance().moduleSetting("custom-formatters").addChangeListener(this.customFormattersStateChanged.bind(this));
      }
      static isSideEffectFailure(response) {
        const exceptionDetails = "exceptionDetails" in response && response.exceptionDetails;
        return Boolean(exceptionDetails && exceptionDetails.exception?.description?.startsWith("EvalError: Possible side-effect in debug-evaluate"));
      }
      debuggerModel() {
        return this.target().model(DebuggerModel);
      }
      heapProfilerModel() {
        return this.target().model(HeapProfilerModel);
      }
      executionContexts() {
        return [...this.#executionContextById.values()].sort(this.executionContextComparator());
      }
      setExecutionContextComparator(comparator2) {
        this.#executionContextComparator = comparator2;
      }
      executionContextComparator() {
        return this.#executionContextComparator;
      }
      defaultExecutionContext() {
        for (const context2 of this.executionContexts()) {
          if (context2.isDefault) {
            return context2;
          }
        }
        return null;
      }
      executionContext(id2) {
        return this.#executionContextById.get(id2) || null;
      }
      executionContextCreated(context2) {
        const data32 = context2.auxData || { isDefault: true };
        const executionContext = new ExecutionContext3(this, context2.id, context2.uniqueId, context2.name, context2.origin, data32["isDefault"], data32["frameId"]);
        this.#executionContextById.set(executionContext.id, executionContext);
        this.dispatchEventToListeners(Events$9.ExecutionContextCreated, executionContext);
      }
      executionContextDestroyed(executionContextId) {
        const executionContext = this.#executionContextById.get(executionContextId);
        if (!executionContext) {
          return;
        }
        this.debuggerModel().executionContextDestroyed(executionContext);
        this.#executionContextById.delete(executionContextId);
        this.dispatchEventToListeners(Events$9.ExecutionContextDestroyed, executionContext);
      }
      fireExecutionContextOrderChanged() {
        this.dispatchEventToListeners(Events$9.ExecutionContextOrderChanged, this);
      }
      executionContextsCleared() {
        this.debuggerModel().globalObjectCleared();
        const contexts = this.executionContexts();
        this.#executionContextById.clear();
        for (let i = 0; i < contexts.length; ++i) {
          this.dispatchEventToListeners(Events$9.ExecutionContextDestroyed, contexts[i]);
        }
      }
      createRemoteObject(payload) {
        console.assert(typeof payload === "object", "Remote object payload should only be an object");
        return new RemoteObjectImpl(this, payload.objectId, payload.type, payload.subtype, payload.value, payload.unserializableValue, payload.description, payload.preview, payload.customPreview, payload.className);
      }
      createScopeRemoteObject(payload, scopeRef) {
        return new ScopeRemoteObject(this, payload.objectId, scopeRef, payload.type, payload.subtype, payload.value, payload.unserializableValue, payload.description, payload.preview);
      }
      createRemoteObjectFromPrimitiveValue(value) {
        const type2 = typeof value;
        let unserializableValue = void 0;
        const unserializableDescription = RemoteObject$1.unserializableDescription(value);
        if (unserializableDescription !== null) {
          unserializableValue = unserializableDescription;
        }
        if (typeof unserializableValue !== "undefined") {
          value = void 0;
        }
        return new RemoteObjectImpl(this, void 0, type2, void 0, value, unserializableValue);
      }
      createRemotePropertyFromPrimitiveValue(name, value) {
        return new RemoteObjectProperty(name, this.createRemoteObjectFromPrimitiveValue(value));
      }
      discardConsoleEntries() {
        void this.agent.invoke_discardConsoleEntries();
      }
      releaseObjectGroup(objectGroup) {
        void this.agent.invoke_releaseObjectGroup({ objectGroup });
      }
      releaseEvaluationResult(result) {
        if ("object" in result && result.object) {
          result.object.release();
        }
        if ("exceptionDetails" in result && result.exceptionDetails?.exception) {
          const exception = result.exceptionDetails.exception;
          const exceptionObject = this.createRemoteObject({ type: exception.type, objectId: exception.objectId });
          exceptionObject.release();
        }
      }
      runIfWaitingForDebugger() {
        void this.agent.invoke_runIfWaitingForDebugger();
      }
      customFormattersStateChanged({ data: enabled }) {
        void this.agent.invoke_setCustomObjectFormatterEnabled({ enabled });
      }
      async compileScript(expression, sourceURL, persistScript, executionContextId) {
        const response = await this.agent.invoke_compileScript({
          expression,
          sourceURL,
          persistScript,
          executionContextId
        });
        if (response.getError()) {
          console.error(response.getError());
          return null;
        }
        return { scriptId: response.scriptId, exceptionDetails: response.exceptionDetails };
      }
      async runScript(scriptId, executionContextId, objectGroup, silent, includeCommandLineAPI, returnByValue, generatePreview, awaitPromise) {
        const response = await this.agent.invoke_runScript({
          scriptId,
          executionContextId,
          objectGroup,
          silent,
          includeCommandLineAPI,
          returnByValue,
          generatePreview,
          awaitPromise
        });
        const error = response.getError();
        if (error) {
          console.error(error);
          return { error };
        }
        return { object: this.createRemoteObject(response.result), exceptionDetails: response.exceptionDetails };
      }
      async queryObjects(prototype) {
        if (!prototype.objectId) {
          return { error: "Prototype should be an Object." };
        }
        const response = await this.agent.invoke_queryObjects({ prototypeObjectId: prototype.objectId, objectGroup: "console" });
        const error = response.getError();
        if (error) {
          console.error(error);
          return { error };
        }
        return { objects: this.createRemoteObject(response.objects) };
      }
      async isolateId() {
        const response = await this.agent.invoke_getIsolateId();
        if (response.getError() || !response.id) {
          return this.target().id();
        }
        return response.id;
      }
      async heapUsage() {
        const result = await this.agent.invoke_getHeapUsage();
        return result.getError() ? null : result;
      }
      inspectRequested(payload, hints, executionContextId) {
        const object2 = this.createRemoteObject(payload);
        if (hints !== null && typeof hints === "object") {
          if ("copyToClipboard" in hints && Boolean(hints.copyToClipboard)) {
            this.copyRequested(object2);
            return;
          }
          if ("queryObjects" in hints && hints.queryObjects) {
            void this.queryObjectsRequested(object2, executionContextId);
            return;
          }
        }
        if (object2.isNode()) {
          const omitFocus = hints !== null && typeof hints === "object" && "omitFocus" in hints && Boolean(hints.omitFocus);
          void reveal(object2, omitFocus).then(object2.release.bind(object2));
          return;
        }
        if (object2.type === "function") {
          void RemoteFunction.objectAsFunction(object2).targetFunctionDetails().then(didGetDetails);
          return;
        }
        function didGetDetails(response) {
          object2.release();
          if (!response?.location) {
            return;
          }
          void reveal(response.location);
        }
        object2.release();
      }
      async addBinding(event) {
        return await this.agent.invoke_addBinding(event);
      }
      async removeBinding(request3) {
        return await this.agent.invoke_removeBinding(request3);
      }
      bindingCalled(event) {
        this.dispatchEventToListeners(Events$9.BindingCalled, event);
      }
      copyRequested(object2) {
        if (!object2.objectId) {
          InspectorFrontendHostInstance.copyText(object2.unserializableValue() || object2.value);
          return;
        }
        const indent = Settings.instance().moduleSetting("text-editor-indent").get();
        void object2.callFunctionJSON(toStringForClipboard, [{
          value: {
            subtype: object2.subtype,
            indent
          }
        }]).then(InspectorFrontendHostInstance.copyText.bind(InspectorFrontendHostInstance));
        function toStringForClipboard(data32) {
          const subtype = data32.subtype;
          const indent2 = data32.indent;
          if (subtype === "node") {
            return this instanceof Element ? this.outerHTML : void 0;
          }
          if (subtype && typeof this === "undefined") {
            return String(subtype);
          }
          try {
            return JSON.stringify(this, null, indent2);
          } catch {
            return String(this);
          }
        }
      }
      async queryObjectsRequested(object2, executionContextId) {
        const result = await this.queryObjects(object2);
        object2.release();
        if ("error" in result) {
          Console.instance().error(result.error);
          return;
        }
        this.dispatchEventToListeners(Events$9.QueryObjectRequested, { objects: result.objects, executionContextId });
      }
      static simpleTextFromException(exceptionDetails) {
        let text = exceptionDetails.text;
        if (exceptionDetails.exception?.description) {
          let description2 = exceptionDetails.exception.description;
          if (description2.indexOf("\n") !== -1) {
            description2 = description2.substring(0, description2.indexOf("\n"));
          }
          text += " " + description2;
        }
        return text;
      }
      exceptionThrown(timestamp, exceptionDetails) {
        const exceptionWithTimestamp = { timestamp, details: exceptionDetails };
        this.dispatchEventToListeners(Events$9.ExceptionThrown, exceptionWithTimestamp);
      }
      exceptionRevoked(exceptionId) {
        this.dispatchEventToListeners(Events$9.ExceptionRevoked, exceptionId);
      }
      consoleAPICalled(type2, args2, executionContextId, timestamp, stackTrace, context2) {
        const consoleAPICall = {
          type: type2,
          args: args2,
          executionContextId,
          timestamp,
          stackTrace,
          context: context2
        };
        this.dispatchEventToListeners(Events$9.ConsoleAPICalled, consoleAPICall);
      }
      executionContextIdForScriptId(scriptId) {
        const script = this.debuggerModel().scriptForId(scriptId);
        return script ? script.executionContextId : 0;
      }
      executionContextForStackTrace(stackTrace) {
        let currentStackTrace = stackTrace;
        while (currentStackTrace && !currentStackTrace.callFrames.length) {
          currentStackTrace = currentStackTrace.parent || null;
        }
        if (!currentStackTrace?.callFrames.length) {
          return 0;
        }
        return this.executionContextIdForScriptId(currentStackTrace.callFrames[0].scriptId);
      }
      terminateExecution() {
        return this.agent.invoke_terminateExecution();
      }
      async getExceptionDetails(errorObjectId) {
        const response = await this.agent.invoke_getExceptionDetails({ errorObjectId });
        if (response.getError()) {
          return void 0;
        }
        return response.exceptionDetails;
      }
    };
    (function(Events2) {
      Events2["BindingCalled"] = "BindingCalled";
      Events2["ExecutionContextCreated"] = "ExecutionContextCreated";
      Events2["ExecutionContextDestroyed"] = "ExecutionContextDestroyed";
      Events2["ExecutionContextChanged"] = "ExecutionContextChanged";
      Events2["ExecutionContextOrderChanged"] = "ExecutionContextOrderChanged";
      Events2["ExceptionThrown"] = "ExceptionThrown";
      Events2["ExceptionRevoked"] = "ExceptionRevoked";
      Events2["ConsoleAPICalled"] = "ConsoleAPICalled";
      Events2["QueryObjectRequested"] = "QueryObjectRequested";
    })(Events$9 || (Events$9 = {}));
    RuntimeDispatcher = class {
      #runtimeModel;
      constructor(runtimeModel) {
        this.#runtimeModel = runtimeModel;
      }
      executionContextCreated({ context: context2 }) {
        this.#runtimeModel.executionContextCreated(context2);
      }
      executionContextDestroyed({ executionContextId }) {
        this.#runtimeModel.executionContextDestroyed(executionContextId);
      }
      executionContextsCleared() {
        this.#runtimeModel.executionContextsCleared();
      }
      exceptionThrown({ timestamp, exceptionDetails }) {
        this.#runtimeModel.exceptionThrown(timestamp, exceptionDetails);
      }
      exceptionRevoked({ exceptionId }) {
        this.#runtimeModel.exceptionRevoked(exceptionId);
      }
      consoleAPICalled({ type: type2, args: args2, executionContextId, timestamp, stackTrace, context: context2 }) {
        this.#runtimeModel.consoleAPICalled(type2, args2, executionContextId, timestamp, stackTrace, context2);
      }
      inspectRequested({ object: object2, hints, executionContextId }) {
        this.#runtimeModel.inspectRequested(object2, hints, executionContextId);
      }
      bindingCalled(event) {
        this.#runtimeModel.bindingCalled(event);
      }
    };
    ExecutionContext3 = class {
      id;
      uniqueId;
      name;
      #label;
      origin;
      isDefault;
      runtimeModel;
      debuggerModel;
      frameId;
      constructor(runtimeModel, id2, uniqueId, name, origin, isDefault, frameId) {
        this.id = id2;
        this.uniqueId = uniqueId;
        this.name = name;
        this.#label = null;
        this.origin = origin;
        this.isDefault = isDefault;
        this.runtimeModel = runtimeModel;
        this.debuggerModel = runtimeModel.debuggerModel();
        this.frameId = frameId;
        this.#setLabel("");
      }
      target() {
        return this.runtimeModel.target();
      }
      static comparator(a, b) {
        function targetWeight(target) {
          if (target.parentTarget()?.type() !== Type$2.FRAME) {
            return 5;
          }
          if (target.type() === Type$2.FRAME) {
            return 4;
          }
          if (target.type() === Type$2.ServiceWorker) {
            return 3;
          }
          if (target.type() === Type$2.Worker || target.type() === Type$2.SHARED_WORKER) {
            return 2;
          }
          return 1;
        }
        function targetPath(target) {
          let currentTarget = target;
          const parents = [];
          while (currentTarget) {
            parents.push(currentTarget);
            currentTarget = currentTarget.parentTarget();
          }
          return parents.reverse();
        }
        const tagetsA = targetPath(a.target());
        const targetsB = targetPath(b.target());
        let targetA;
        let targetB;
        for (let i = 0; ; i++) {
          if (!tagetsA[i] || !targetsB[i] || tagetsA[i] !== targetsB[i]) {
            targetA = tagetsA[i];
            targetB = targetsB[i];
            break;
          }
        }
        if (!targetA && targetB) {
          return -1;
        }
        if (!targetB && targetA) {
          return 1;
        }
        if (targetA && targetB) {
          const weightDiff = targetWeight(targetA) - targetWeight(targetB);
          if (weightDiff) {
            return -weightDiff;
          }
          return targetA.id().localeCompare(targetB.id());
        }
        if (a.isDefault) {
          return -1;
        }
        if (b.isDefault) {
          return 1;
        }
        return a.name.localeCompare(b.name);
      }
      async evaluate(options2, userGesture, awaitPromise) {
        if (this.debuggerModel.selectedCallFrame()) {
          return await this.debuggerModel.evaluateOnSelectedCallFrame(options2);
        }
        return await this.evaluateGlobal(options2, userGesture, awaitPromise);
      }
      globalObject(objectGroup, generatePreview) {
        const evaluationOptions = {
          expression: "this",
          objectGroup,
          includeCommandLineAPI: false,
          silent: true,
          returnByValue: false,
          generatePreview
        };
        return this.evaluateGlobal(evaluationOptions, false, false);
      }
      async callFunctionOn(options2) {
        const response = await this.runtimeModel.agent.invoke_callFunctionOn({
          functionDeclaration: options2.functionDeclaration,
          returnByValue: options2.returnByValue,
          userGesture: options2.userGesture,
          awaitPromise: options2.awaitPromise,
          throwOnSideEffect: options2.throwOnSideEffect,
          arguments: options2.arguments,
          ...this.uniqueId ? { uniqueContextId: this.uniqueId } : { contextId: this.id }
        });
        const error = response.getError();
        if (error) {
          return { error };
        }
        return { object: this.runtimeModel.createRemoteObject(response.result), exceptionDetails: response.exceptionDetails };
      }
      async evaluateGlobal(options2, userGesture, awaitPromise) {
        if (!options2.expression) {
          options2.expression = "this";
        }
        const response = await this.runtimeModel.agent.invoke_evaluate({
          expression: options2.expression,
          objectGroup: options2.objectGroup,
          includeCommandLineAPI: options2.includeCommandLineAPI,
          silent: options2.silent,
          returnByValue: options2.returnByValue,
          generatePreview: options2.generatePreview,
          userGesture,
          awaitPromise,
          throwOnSideEffect: options2.throwOnSideEffect,
          timeout: options2.timeout,
          disableBreaks: options2.disableBreaks,
          replMode: options2.replMode,
          allowUnsafeEvalBlockedByCSP: options2.allowUnsafeEvalBlockedByCSP,
          ...this.uniqueId ? { uniqueContextId: this.uniqueId } : { contextId: this.id }
        });
        const error = response.getError();
        if (error) {
          console.error(error);
          return { error };
        }
        return { object: this.runtimeModel.createRemoteObject(response.result), exceptionDetails: response.exceptionDetails };
      }
      async globalLexicalScopeNames() {
        const response = await this.runtimeModel.agent.invoke_globalLexicalScopeNames({ executionContextId: this.id });
        return response.getError() ? [] : response.names;
      }
      label() {
        return this.#label;
      }
      setLabel(label) {
        this.#setLabel(label);
        this.runtimeModel.dispatchEventToListeners(Events$9.ExecutionContextChanged, this);
      }
      #setLabel(label) {
        if (label) {
          this.#label = label;
          return;
        }
        if (this.name) {
          this.#label = this.name;
          return;
        }
        const parsedUrl = ParsedURL2.fromString(this.origin);
        this.#label = parsedUrl ? parsedUrl.lastPathComponentWithFragment() : "";
      }
    };
    SDKModel.register(RuntimeModel, { capabilities: 4, autostart: true });
    (function(DOMNodeEvents2) {
      DOMNodeEvents2["TOP_LAYER_INDEX_CHANGED"] = "TopLayerIndexChanged";
      DOMNodeEvents2["SCROLLABLE_FLAG_UPDATED"] = "ScrollableFlagUpdated";
      DOMNodeEvents2["AD_RELATED_STATE_UPDATED"] = "AdRelatedStateUpdated";
      DOMNodeEvents2["GRID_OVERLAY_STATE_CHANGED"] = "GridOverlayStateChanged";
      DOMNodeEvents2["FLEX_CONTAINER_OVERLAY_STATE_CHANGED"] = "FlexContainerOverlayStateChanged";
      DOMNodeEvents2["SCROLL_SNAP_OVERLAY_STATE_CHANGED"] = "ScrollSnapOverlayStateChanged";
      DOMNodeEvents2["CONTAINER_QUERY_OVERLAY_STATE_CHANGED"] = "ContainerQueryOverlayStateChanged";
    })(DOMNodeEvents || (DOMNodeEvents = {}));
    DOMNode = class _DOMNode extends ObjectWrapper {
      #domModel;
      #agent;
      ownerDocument;
      #isInShadowTree;
      id;
      index = void 0;
      #backendNodeId;
      #nodeType;
      #nodeName;
      #localName;
      nodeValueInternal;
      #pseudoType;
      #pseudoIdentifier;
      #shadowRootType;
      #frameOwnerFrameId;
      #xmlVersion;
      #isSVGNode;
      #isScrollable;
      #affectedByStartingStyles;
      #creationStackTrace = null;
      #pseudoElements = /* @__PURE__ */ new Map();
      #distributedNodes = [];
      assignedSlot = null;
      shadowRootsInternal = [];
      #attributes = /* @__PURE__ */ new Map();
      #markers = /* @__PURE__ */ new Map();
      #subtreeMarkerCount = 0;
      childNodeCountInternal;
      childrenInternal = null;
      nextSibling = null;
      previousSibling = null;
      firstChild = null;
      lastChild = null;
      parentNode = null;
      templateContentInternal;
      contentDocumentInternal;
      childDocumentPromiseForTesting;
      #importedDocument;
      publicId;
      systemId;
      internalSubset;
      name;
      value;
      retained = false;
      detached = false;
      #retainedNodes;
      #adoptedStyleSheets = [];
      #topLayerIndex = -1;
      #isAdRelatedInternal = false;
      constructor(domModel) {
        super();
        this.#domModel = domModel;
        this.#agent = this.#domModel.getAgent();
      }
      static create(domModel, doc, isInShadowTree, payload, retainedNodes) {
        const node2 = new _DOMNode(domModel);
        node2.init(doc, isInShadowTree, payload, retainedNodes);
        return node2;
      }
      init(doc, isInShadowTree, payload, retainedNodes) {
        this.#agent = this.#domModel.getAgent();
        this.ownerDocument = doc;
        this.#isInShadowTree = isInShadowTree;
        this.id = payload.nodeId;
        this.#backendNodeId = payload.backendNodeId;
        this.#frameOwnerFrameId = payload.frameId || null;
        this.#domModel.registerNode(this);
        this.#nodeType = payload.nodeType;
        this.#nodeName = payload.nodeName;
        this.#localName = payload.localName;
        this.nodeValueInternal = payload.nodeValue;
        this.#pseudoType = payload.pseudoType;
        this.#pseudoIdentifier = payload.pseudoIdentifier;
        this.#shadowRootType = payload.shadowRootType;
        this.#xmlVersion = payload.xmlVersion;
        this.#isSVGNode = Boolean(payload.isSVG);
        this.#isScrollable = Boolean(payload.isScrollable);
        this.#affectedByStartingStyles = Boolean(payload.affectedByStartingStyles);
        this.#retainedNodes = retainedNodes;
        if (this.#retainedNodes?.has(this.backendNodeId())) {
          this.retained = true;
        }
        if (payload.attributes) {
          this.setAttributesPayload(payload.attributes);
        }
        if (payload.adoptedStyleSheets) {
          this.#adoptedStyleSheets = this.toAdoptedStyleSheets(payload.adoptedStyleSheets);
        }
        this.childNodeCountInternal = payload.childNodeCount || 0;
        if (payload.shadowRoots) {
          for (let i = 0; i < payload.shadowRoots.length; ++i) {
            const root2 = payload.shadowRoots[i];
            const node2 = _DOMNode.create(this.#domModel, this.ownerDocument, true, root2, retainedNodes);
            this.shadowRootsInternal.push(node2);
            node2.parentNode = this;
          }
        }
        if (payload.templateContent) {
          this.templateContentInternal = _DOMNode.create(this.#domModel, this.ownerDocument, true, payload.templateContent, retainedNodes);
          this.templateContentInternal.parentNode = this;
          this.childrenInternal = [];
        }
        const frameOwnerTags = /* @__PURE__ */ new Set(["EMBED", "IFRAME", "OBJECT", "FENCEDFRAME"]);
        if (payload.contentDocument) {
          this.contentDocumentInternal = new DOMDocument(this.#domModel, payload.contentDocument);
          this.contentDocumentInternal.parentNode = this;
          this.childrenInternal = [];
        } else if (payload.frameId && frameOwnerTags.has(payload.nodeName)) {
          this.childDocumentPromiseForTesting = this.requestChildDocument(payload.frameId, this.#domModel.target());
          this.childrenInternal = [];
        }
        if (payload.importedDocument) {
          this.#importedDocument = _DOMNode.create(this.#domModel, this.ownerDocument, true, payload.importedDocument, retainedNodes);
          this.#importedDocument.parentNode = this;
          this.childrenInternal = [];
        }
        if (payload.distributedNodes) {
          this.setDistributedNodePayloads(payload.distributedNodes);
        }
        if (payload.assignedSlot) {
          this.setAssignedSlot(payload.assignedSlot);
        }
        if (payload.children) {
          this.setChildrenPayload(payload.children);
        }
        this.setPseudoElements(payload.pseudoElements);
        if (payload.isAdRelated) {
          this.#isAdRelatedInternal = true;
        }
        if (this.#nodeType === Node.ELEMENT_NODE) {
          if (this.ownerDocument && !this.ownerDocument.documentElement && this.#nodeName === "HTML") {
            this.ownerDocument.documentElement = this;
          }
          if (this.ownerDocument && !this.ownerDocument.body && this.#nodeName === "BODY") {
            this.ownerDocument.body = this;
          }
        } else if (this.#nodeType === Node.DOCUMENT_TYPE_NODE) {
          this.publicId = payload.publicId;
          this.systemId = payload.systemId;
          this.internalSubset = payload.internalSubset;
        } else if (this.#nodeType === Node.ATTRIBUTE_NODE) {
          this.name = payload.name;
          this.value = payload.value;
        }
      }
      async requestChildDocument(frameId, notInTarget) {
        const frame = await FrameManager2.instance().getOrWaitForFrame(frameId, notInTarget);
        const childModel = frame.resourceTreeModel()?.target().model(DOMModel);
        return await (childModel?.requestDocument() || null);
      }
      setTopLayerIndex(idx) {
        const oldIndex = this.#topLayerIndex;
        this.#topLayerIndex = idx;
        if (oldIndex !== idx) {
          this.dispatchEventToListeners(DOMNodeEvents.TOP_LAYER_INDEX_CHANGED);
        }
      }
      topLayerIndex() {
        return this.#topLayerIndex;
      }
      isAdRelatedNode() {
        if (this.isIframe() && this.#frameOwnerFrameId) {
          const frame = FrameManager2.instance().getFrame(this.#frameOwnerFrameId);
          if (!frame) {
            return false;
          }
          return frame.adFrameType() !== "none";
        }
        return this.#isAdRelatedInternal;
      }
      isRootNode() {
        if (this.nodeType() === Node.ELEMENT_NODE && this.nodeName() === "HTML") {
          return true;
        }
        return false;
      }
      isSVGNode() {
        return this.#isSVGNode;
      }
      isScrollable() {
        return this.#isScrollable;
      }
      affectedByStartingStyles() {
        return this.#affectedByStartingStyles;
      }
      isMediaNode() {
        return this.#nodeName === "AUDIO" || this.#nodeName === "VIDEO";
      }
      isViewTransitionPseudoNode() {
        if (!this.#pseudoType) {
          return false;
        }
        return [
          "view-transition",
          "view-transition-group",
          "view-transition-group-children",
          "view-transition-image-pair",
          "view-transition-old",
          "view-transition-new"
        ].includes(this.#pseudoType);
      }
      creationStackTrace() {
        if (this.#creationStackTrace) {
          return this.#creationStackTrace;
        }
        const stackTracesPromise = this.#agent.invoke_getNodeStackTraces({ nodeId: this.id });
        this.#creationStackTrace = stackTracesPromise.then((res) => res.creation || null);
        return this.#creationStackTrace;
      }
      get subtreeMarkerCount() {
        return this.#subtreeMarkerCount;
      }
      domModel() {
        return this.#domModel;
      }
      backendNodeId() {
        return this.#backendNodeId;
      }
      children() {
        return this.childrenInternal ? this.childrenInternal.slice() : null;
      }
      setChildren(children) {
        this.childrenInternal = children;
      }
      setIsScrollable(isScrollable) {
        this.#isScrollable = isScrollable;
        this.dispatchEventToListeners(DOMNodeEvents.SCROLLABLE_FLAG_UPDATED);
        if (this.nodeName() === "#document") {
          this.ownerDocument?.documentElement?.setIsScrollable(isScrollable);
        }
      }
      setIsAdRelated(isAdRelated) {
        this.#isAdRelatedInternal = isAdRelated;
        this.dispatchEventToListeners(DOMNodeEvents.AD_RELATED_STATE_UPDATED);
      }
      setAffectedByStartingStyles(affectedByStartingStyles) {
        this.#affectedByStartingStyles = affectedByStartingStyles;
      }
      hasAttributes() {
        return this.#attributes.size > 0;
      }
      childNodeCount() {
        return this.childNodeCountInternal;
      }
      setChildNodeCount(childNodeCount) {
        this.childNodeCountInternal = childNodeCount;
      }
      shadowRoots() {
        return this.shadowRootsInternal.slice();
      }
      templateContent() {
        return this.templateContentInternal || null;
      }
      contentDocument() {
        return this.contentDocumentInternal || null;
      }
      setContentDocument(node2) {
        this.contentDocumentInternal = node2;
      }
      isIframe() {
        return this.#nodeName === "IFRAME";
      }
      importedDocument() {
        return this.#importedDocument || null;
      }
      nodeType() {
        return this.#nodeType;
      }
      nodeName() {
        return this.#nodeName;
      }
      pseudoType() {
        return this.#pseudoType;
      }
      pseudoIdentifier() {
        return this.#pseudoIdentifier;
      }
      hasPseudoElements() {
        return this.#pseudoElements.size > 0;
      }
      pseudoElements() {
        return this.#pseudoElements;
      }
      checkmarkPseudoElement() {
        return this.#pseudoElements.get("checkmark")?.at(-1);
      }
      beforePseudoElement() {
        return this.#pseudoElements.get("before")?.at(-1);
      }
      afterPseudoElement() {
        return this.#pseudoElements.get("after")?.at(-1);
      }
      pickerIconPseudoElement() {
        return this.#pseudoElements.get("picker-icon")?.at(-1);
      }
      markerPseudoElement() {
        return this.#pseudoElements.get("marker")?.at(-1);
      }
      backdropPseudoElement() {
        return this.#pseudoElements.get("backdrop")?.at(-1);
      }
      viewTransitionPseudoElements() {
        return [
          ...this.#pseudoElements.get("view-transition") || [],
          ...this.#pseudoElements.get("view-transition-group") || [],
          ...this.#pseudoElements.get("view-transition-group-children") || [],
          ...this.#pseudoElements.get("view-transition-image-pair") || [],
          ...this.#pseudoElements.get("view-transition-old") || [],
          ...this.#pseudoElements.get("view-transition-new") || []
        ];
      }
      carouselPseudoElements() {
        return [
          ...this.#pseudoElements.get("scroll-button") || [],
          ...this.#pseudoElements.get("column") || [],
          ...this.#pseudoElements.get("scroll-marker") || [],
          ...this.#pseudoElements.get("scroll-marker-group") || []
        ];
      }
      hasAssignedSlot() {
        return this.assignedSlot !== null;
      }
      isInsertionPoint() {
        return !this.isXMLNode() && (this.#nodeName === "SHADOW" || this.#nodeName === "CONTENT" || this.#nodeName === "SLOT");
      }
      distributedNodes() {
        return this.#distributedNodes;
      }
      isInShadowTree() {
        return this.#isInShadowTree;
      }
      getTreeRoot() {
        return this.isShadowRoot() ? this : this.ancestorShadowRoot() ?? this.ownerDocument ?? this;
      }
      ancestorShadowHost() {
        const ancestorShadowRoot = this.ancestorShadowRoot();
        return ancestorShadowRoot ? ancestorShadowRoot.parentNode : null;
      }
      ancestorShadowRoot() {
        if (!this.#isInShadowTree) {
          return null;
        }
        let current = this;
        while (current && !current.isShadowRoot()) {
          current = current.parentNode;
        }
        return current;
      }
      ancestorUserAgentShadowRoot() {
        const ancestorShadowRoot = this.ancestorShadowRoot();
        if (!ancestorShadowRoot) {
          return null;
        }
        return ancestorShadowRoot.shadowRootType() === _DOMNode.ShadowRootTypes.UserAgent ? ancestorShadowRoot : null;
      }
      isShadowRoot() {
        return Boolean(this.#shadowRootType);
      }
      shadowRootType() {
        return this.#shadowRootType || null;
      }
      nodeNameInCorrectCase() {
        const shadowRootType = this.shadowRootType();
        if (shadowRootType) {
          return "#shadow-root (" + shadowRootType + ")";
        }
        if (!this.localName()) {
          return this.nodeName();
        }
        if (this.localName().length !== this.nodeName().length) {
          return this.nodeName();
        }
        return this.localName();
      }
      setNodeName(name, callback) {
        void this.#agent.invoke_setNodeName({ nodeId: this.id, name }).then((response) => {
          if (!response.getError()) {
            this.#domModel.markUndoableState();
          }
          if (callback) {
            callback(response.getError() || null, this.#domModel.nodeForId(response.nodeId));
          }
        });
      }
      localName() {
        return this.#localName;
      }
      nodeValue() {
        return this.nodeValueInternal;
      }
      setNodeValueInternal(nodeValue) {
        this.nodeValueInternal = nodeValue;
      }
      setNodeValue(value, callback) {
        void this.#agent.invoke_setNodeValue({ nodeId: this.id, value }).then((response) => {
          if (!response.getError()) {
            this.#domModel.markUndoableState();
          }
          if (callback) {
            callback(response.getError() || null);
          }
        });
      }
      getAttribute(name) {
        const attr = this.#attributes.get(name);
        return attr ? attr.value : void 0;
      }
      setAttribute(name, text, callback) {
        void this.#agent.invoke_setAttributesAsText({ nodeId: this.id, text, name }).then((response) => {
          if (!response.getError()) {
            this.#domModel.markUndoableState();
          }
          if (callback) {
            callback(response.getError() || null);
          }
        });
      }
      setAttributeValue(name, value, callback) {
        void this.#agent.invoke_setAttributeValue({ nodeId: this.id, name, value }).then((response) => {
          if (!response.getError()) {
            this.#domModel.markUndoableState();
          }
          if (callback) {
            callback(response.getError() || null);
          }
        });
      }
      setAttributeValuePromise(name, value) {
        return new Promise((fulfill) => this.setAttributeValue(name, value, fulfill));
      }
      attributes() {
        return [...this.#attributes.values()];
      }
      async removeAttribute(name) {
        const response = await this.#agent.invoke_removeAttribute({ nodeId: this.id, name });
        if (response.getError()) {
          return;
        }
        this.#attributes.delete(name);
        this.#domModel.markUndoableState();
      }
      getChildNodesPromise() {
        return new Promise((resolve2) => {
          return this.getChildNodes((childNodes) => resolve2(childNodes));
        });
      }
      getChildNodes(callback) {
        if (this.childrenInternal) {
          callback(this.children());
          return;
        }
        void this.#agent.invoke_requestChildNodes({ nodeId: this.id }).then((response) => {
          callback(response.getError() ? null : this.children());
        });
      }
      async getSubtree(depth, pierce) {
        console.assert(depth > 0, "Do not fetch an infinite subtree to avoid crashing the renderer for large documents");
        const response = await this.#agent.invoke_requestChildNodes({ nodeId: this.id, depth, pierce });
        return response.getError() ? null : this.childrenInternal;
      }
      async getOuterHTML(includeShadowDOM = false) {
        const { outerHTML } = await this.#agent.invoke_getOuterHTML({ nodeId: this.id, includeShadowDOM });
        return outerHTML;
      }
      setOuterHTML(html2, callback) {
        void this.#agent.invoke_setOuterHTML({ nodeId: this.id, outerHTML: html2 }).then((response) => {
          if (!response.getError()) {
            this.#domModel.markUndoableState();
          }
          if (callback) {
            callback(response.getError() || null);
          }
        });
      }
      removeNode(callback) {
        return this.#agent.invoke_removeNode({ nodeId: this.id }).then((response) => {
          if (!response.getError()) {
            this.#domModel.markUndoableState();
          }
          if (callback) {
            callback(response.getError() || null);
          }
        });
      }
      path() {
        function getNodeKey(node3) {
          if (!node3.#nodeName.length) {
            return null;
          }
          if (node3.index !== void 0) {
            return node3.index;
          }
          if (!node3.parentNode) {
            return null;
          }
          if (node3.isShadowRoot()) {
            return node3.shadowRootType() === _DOMNode.ShadowRootTypes.UserAgent ? "u" : "a";
          }
          if (node3.nodeType() === Node.DOCUMENT_NODE) {
            return "d";
          }
          return null;
        }
        const path14 = [];
        let node2 = this;
        while (node2) {
          const key = getNodeKey(node2);
          if (key === null) {
            break;
          }
          path14.push([key, node2.#nodeName]);
          node2 = node2.parentNode;
        }
        path14.reverse();
        return path14.join(",");
      }
      isAncestor(node2) {
        if (!node2) {
          return false;
        }
        let currentNode = node2.parentNode;
        while (currentNode) {
          if (this === currentNode) {
            return true;
          }
          currentNode = currentNode.parentNode;
        }
        return false;
      }
      isDescendant(descendant) {
        return descendant.isAncestor(this);
      }
      frameOwnerFrameId() {
        return this.#frameOwnerFrameId;
      }
      frameId() {
        let node2 = this.parentNode || this;
        while (!node2.#frameOwnerFrameId && node2.parentNode) {
          node2 = node2.parentNode;
        }
        return node2.#frameOwnerFrameId;
      }
      setAttributesPayload(attrs) {
        let attributesChanged = !this.#attributes || attrs.length !== this.#attributes.size * 2;
        const oldAttributesMap = this.#attributes || /* @__PURE__ */ new Map();
        this.#attributes = /* @__PURE__ */ new Map();
        for (let i = 0; i < attrs.length; i += 2) {
          const name = attrs[i];
          const value = attrs[i + 1];
          this.addAttribute(name, value);
          if (attributesChanged) {
            continue;
          }
          const oldAttribute = oldAttributesMap.get(name);
          if (oldAttribute?.value !== value) {
            attributesChanged = true;
          }
        }
        return attributesChanged;
      }
      insertChild(prev, payload) {
        if (!this.childrenInternal) {
          throw new Error("DOMNode._children is expected to not be null.");
        }
        const node2 = _DOMNode.create(this.#domModel, this.ownerDocument, this.#isInShadowTree, payload, this.#retainedNodes);
        this.childrenInternal.splice(prev ? this.childrenInternal.indexOf(prev) + 1 : 0, 0, node2);
        this.renumber();
        return node2;
      }
      removeChild(node2) {
        const pseudoType = node2.pseudoType();
        if (pseudoType) {
          const updatedPseudoElements = this.#pseudoElements.get(pseudoType)?.filter((element) => element !== node2);
          if (updatedPseudoElements && updatedPseudoElements.length > 0) {
            this.#pseudoElements.set(pseudoType, updatedPseudoElements);
          } else {
            this.#pseudoElements.delete(pseudoType);
          }
        } else {
          const shadowRootIndex = this.shadowRootsInternal.indexOf(node2);
          if (shadowRootIndex !== -1) {
            this.shadowRootsInternal.splice(shadowRootIndex, 1);
          } else {
            if (!this.childrenInternal) {
              throw new Error("DOMNode._children is expected to not be null.");
            }
            if (this.childrenInternal.indexOf(node2) === -1) {
              throw new Error("DOMNode._children is expected to contain the node to be removed.");
            }
            this.childrenInternal.splice(this.childrenInternal.indexOf(node2), 1);
          }
        }
        node2.parentNode = null;
        this.#subtreeMarkerCount -= node2.#subtreeMarkerCount;
        if (node2.#subtreeMarkerCount) {
          this.#domModel.dispatchEventToListeners(Events$8.MarkersChanged, this);
        }
        this.renumber();
      }
      setChildrenPayload(payloads) {
        this.childrenInternal = [];
        for (let i = 0; i < payloads.length; ++i) {
          const payload = payloads[i];
          const node2 = _DOMNode.create(this.#domModel, this.ownerDocument, this.#isInShadowTree, payload, this.#retainedNodes);
          this.childrenInternal.push(node2);
        }
        this.renumber();
      }
      setPseudoElements(payloads) {
        if (!payloads) {
          return;
        }
        for (let i = 0; i < payloads.length; ++i) {
          const node2 = _DOMNode.create(this.#domModel, this.ownerDocument, this.#isInShadowTree, payloads[i], this.#retainedNodes);
          node2.parentNode = this;
          const pseudoType = node2.pseudoType();
          if (!pseudoType) {
            throw new Error("DOMNode.pseudoType() is expected to be defined.");
          }
          const currentPseudoElements = this.#pseudoElements.get(pseudoType);
          if (currentPseudoElements) {
            currentPseudoElements.push(node2);
          } else {
            this.#pseudoElements.set(pseudoType, [node2]);
          }
        }
      }
      toAdoptedStyleSheets(ids) {
        return ids.map((id2) => new AdoptedStyleSheet(id2, this));
      }
      setAdoptedStyleSheets(ids) {
        this.#adoptedStyleSheets = this.toAdoptedStyleSheets(ids);
        this.#domModel.dispatchEventToListeners(Events$8.AdoptedStyleSheetsModified, this);
      }
      get adoptedStyleSheetsForNode() {
        return this.#adoptedStyleSheets;
      }
      setDistributedNodePayloads(payloads) {
        this.#distributedNodes = [];
        for (const payload of payloads) {
          this.#distributedNodes.push(new DOMNodeShortcut(this.#domModel.target(), payload.backendNodeId, payload.nodeType, payload.nodeName));
        }
      }
      setAssignedSlot(payload) {
        this.assignedSlot = new DOMNodeShortcut(this.#domModel.target(), payload.backendNodeId, payload.nodeType, payload.nodeName);
      }
      renumber() {
        if (!this.childrenInternal) {
          throw new Error("DOMNode._children is expected to not be null.");
        }
        this.childNodeCountInternal = this.childrenInternal.length;
        if (this.childNodeCountInternal === 0) {
          this.firstChild = null;
          this.lastChild = null;
          return;
        }
        this.firstChild = this.childrenInternal[0];
        this.lastChild = this.childrenInternal[this.childNodeCountInternal - 1];
        for (let i = 0; i < this.childNodeCountInternal; ++i) {
          const child = this.childrenInternal[i];
          child.index = i;
          child.nextSibling = i + 1 < this.childNodeCountInternal ? this.childrenInternal[i + 1] : null;
          child.previousSibling = i - 1 >= 0 ? this.childrenInternal[i - 1] : null;
          child.parentNode = this;
        }
      }
      addAttribute(name, value) {
        const attr = { name, value, _node: this };
        this.#attributes.set(name, attr);
      }
      setAttributeInternal(name, value) {
        const attr = this.#attributes.get(name);
        if (attr) {
          attr.value = value;
        } else {
          this.addAttribute(name, value);
        }
      }
      removeAttributeInternal(name) {
        this.#attributes.delete(name);
      }
      copyTo(targetNode, anchorNode, callback) {
        void this.#agent.invoke_copyTo({ nodeId: this.id, targetNodeId: targetNode.id, insertBeforeNodeId: anchorNode ? anchorNode.id : void 0 }).then((response) => {
          if (!response.getError()) {
            this.#domModel.markUndoableState();
          }
          const pastedNode = this.#domModel.nodeForId(response.nodeId);
          if (pastedNode) {
            for (const [name, value] of this.#markers) {
              pastedNode.setMarker(name, value);
            }
          }
          if (callback) {
            callback(response.getError() || null, pastedNode);
          }
        });
      }
      moveTo(targetNode, anchorNode, callback) {
        void this.#agent.invoke_moveTo({ nodeId: this.id, targetNodeId: targetNode.id, insertBeforeNodeId: anchorNode ? anchorNode.id : void 0 }).then((response) => {
          if (!response.getError()) {
            this.#domModel.markUndoableState();
          }
          if (callback) {
            callback(response.getError() || null, this.#domModel.nodeForId(response.nodeId));
          }
        });
      }
      isXMLNode() {
        return Boolean(this.#xmlVersion);
      }
      setMarker(name, value) {
        if (value === null) {
          if (!this.#markers.has(name)) {
            return;
          }
          this.#markers.delete(name);
          for (let node2 = this; node2; node2 = node2.parentNode) {
            --node2.#subtreeMarkerCount;
          }
          for (let node2 = this; node2; node2 = node2.parentNode) {
            this.#domModel.dispatchEventToListeners(Events$8.MarkersChanged, node2);
          }
          return;
        }
        if (this.parentNode && !this.#markers.has(name)) {
          for (let node2 = this; node2; node2 = node2.parentNode) {
            ++node2.#subtreeMarkerCount;
          }
        }
        this.#markers.set(name, value);
        for (let node2 = this; node2; node2 = node2.parentNode) {
          this.#domModel.dispatchEventToListeners(Events$8.MarkersChanged, node2);
        }
      }
      marker(name) {
        return this.#markers.get(name) || null;
      }
      getMarkerKeysForTest() {
        return [...this.#markers.keys()];
      }
      traverseMarkers(visitor) {
        function traverse(node2) {
          if (!node2.#subtreeMarkerCount) {
            return;
          }
          for (const marker of node2.#markers.keys()) {
            visitor(node2, marker);
          }
          if (!node2.childrenInternal) {
            return;
          }
          for (const child of node2.childrenInternal) {
            traverse(child);
          }
        }
        traverse(this);
      }
      resolveURL(url) {
        if (!url) {
          return url;
        }
        for (let frameOwnerCandidate = this; frameOwnerCandidate; frameOwnerCandidate = frameOwnerCandidate.parentNode) {
          if (frameOwnerCandidate instanceof DOMDocument && frameOwnerCandidate.baseURL) {
            return ParsedURL2.completeURL(frameOwnerCandidate.baseURL, url);
          }
        }
        return null;
      }
      highlight(mode2) {
        this.#domModel.overlayModel().highlightInOverlay({ node: this }, mode2);
      }
      highlightForTwoSeconds() {
        this.#domModel.overlayModel().highlightInOverlayForTwoSeconds({ node: this });
      }
      async resolveToObject(objectGroup, executionContextId) {
        const { object: object2 } = await this.#agent.invoke_resolveNode({
          nodeId: this.id,
          executionContextId,
          objectGroup
        });
        return object2 && this.#domModel.runtimeModelInternal.createRemoteObject(object2) || null;
      }
      async boxModel() {
        const { model: model3 } = await this.#agent.invoke_getBoxModel({ nodeId: this.id });
        return model3;
      }
      async setAsInspectedNode() {
        let node2 = this;
        if (node2?.pseudoType()) {
          node2 = node2.parentNode;
        }
        while (node2) {
          let ancestor = node2.ancestorUserAgentShadowRoot();
          if (!ancestor) {
            break;
          }
          ancestor = node2.ancestorShadowHost();
          if (!ancestor) {
            break;
          }
          node2 = ancestor;
        }
        if (!node2) {
          throw new Error("In DOMNode.setAsInspectedNode: node is expected to not be null.");
        }
        await this.#agent.invoke_setInspectedNode({ nodeId: node2.id });
      }
      enclosingElementOrSelf() {
        let node2 = this;
        if (node2 && node2.nodeType() === Node.TEXT_NODE && node2.parentNode) {
          node2 = node2.parentNode;
        }
        if (node2 && node2.nodeType() !== Node.ELEMENT_NODE) {
          node2 = null;
        }
        return node2;
      }
      async callFunction(fn, args2 = []) {
        const object2 = await this.resolveToObject();
        if (!object2) {
          return null;
        }
        const result = await object2.callFunction(fn, args2.map((arg) => RemoteObject$1.toCallArgument(arg)));
        object2.release();
        if (result.wasThrown || !result.object) {
          return null;
        }
        return {
          value: result.object.value
        };
      }
      async scrollIntoView() {
        const node2 = this.enclosingElementOrSelf();
        if (!node2) {
          return;
        }
        const result = await node2.callFunction(scrollIntoViewInPage);
        if (!result) {
          return;
        }
        node2.highlightForTwoSeconds();
        function scrollIntoViewInPage() {
          this.scrollIntoViewIfNeeded(true);
        }
      }
      async focus() {
        const node2 = this.enclosingElementOrSelf();
        if (!node2) {
          throw new Error("DOMNode.focus expects node to not be null.");
        }
        const result = await node2.callFunction(focusInPage);
        if (!result) {
          return;
        }
        node2.highlightForTwoSeconds();
        await this.#domModel.target().pageAgent().invoke_bringToFront();
        function focusInPage() {
          this.focus();
        }
      }
      simpleSelector() {
        const lowerCaseName = this.localName() || this.nodeName().toLowerCase();
        if (this.nodeType() !== Node.ELEMENT_NODE) {
          return lowerCaseName;
        }
        const type2 = this.getAttribute("type");
        const id2 = this.getAttribute("id");
        const classes = this.getAttribute("class");
        if (lowerCaseName === "input" && type2 && !id2 && !classes) {
          return lowerCaseName + '[type="' + CSS.escape(type2) + '"]';
        }
        if (id2) {
          return lowerCaseName + "#" + CSS.escape(id2);
        }
        if (classes) {
          const classList = classes.trim().split(/\s+/g);
          return (lowerCaseName === "div" ? "" : lowerCaseName) + "." + classList.map((cls) => CSS.escape(cls)).join(".");
        }
        if (this.pseudoIdentifier()) {
          return `${lowerCaseName}(${this.pseudoIdentifier()})`;
        }
        return lowerCaseName;
      }
      async getAnchorBySpecifier(specifier) {
        const response = await this.#agent.invoke_getAnchorElement({
          nodeId: this.id,
          anchorSpecifier: specifier
        });
        if (response.getError()) {
          return null;
        }
        return this.domModel().nodeForId(response.nodeId);
      }
      classNames() {
        const classes = this.getAttribute("class");
        return classes ? classes.split(/\s+/) : [];
      }
    };
    (function(DOMNode2) {
      (function(ShadowRootTypes) {
        ShadowRootTypes["UserAgent"] = "user-agent";
        ShadowRootTypes["Open"] = "open";
        ShadowRootTypes["Closed"] = "closed";
      })(DOMNode2.ShadowRootTypes || (DOMNode2.ShadowRootTypes = {}));
    })(DOMNode || (DOMNode = {}));
    DeferredDOMNode = class {
      #domModelInternal;
      #backendNodeIdInternal;
      constructor(target, backendNodeId) {
        this.#domModelInternal = target.model(DOMModel);
        this.#backendNodeIdInternal = backendNodeId;
      }
      resolve(callback) {
        void this.resolvePromise().then(callback);
      }
      async resolvePromise() {
        const nodeIds = await this.#domModelInternal.pushNodesByBackendIdsToFrontend(/* @__PURE__ */ new Set([this.#backendNodeIdInternal]));
        return nodeIds?.get(this.#backendNodeIdInternal) || null;
      }
      backendNodeId() {
        return this.#backendNodeIdInternal;
      }
      domModel() {
        return this.#domModelInternal;
      }
      highlight() {
        this.#domModelInternal.overlayModel().highlightInOverlay({ deferredNode: this, selectorList: void 0 });
      }
    };
    DOMNodeShortcut = class {
      nodeType;
      nodeName;
      deferredNode;
      childShortcuts = [];
      constructor(target, backendNodeId, nodeType, nodeName, childShortcuts = []) {
        this.nodeType = nodeType;
        this.nodeName = nodeName;
        this.deferredNode = new DeferredDOMNode(target, backendNodeId);
        this.childShortcuts = childShortcuts;
      }
    };
    DOMDocument = class extends DOMNode {
      body;
      documentElement;
      documentURL;
      baseURL;
      constructor(domModel, payload) {
        super(domModel);
        this.body = null;
        this.documentElement = null;
        this.init(this, false, payload);
        this.documentURL = payload.documentURL || "";
        this.baseURL = payload.baseURL || "";
      }
    };
    AdoptedStyleSheet = class {
      id;
      parent;
      constructor(id2, parent) {
        this.id = id2;
        this.parent = parent;
      }
      get cssModel() {
        return this.parent.domModel().cssModel();
      }
    };
    DOMModel = class _DOMModel extends SDKModel {
      agent;
      idToDOMNode = /* @__PURE__ */ new Map();
      frameIdToOwnerNode = /* @__PURE__ */ new Map();
      #document = null;
      #attributeLoadNodeIds = /* @__PURE__ */ new Set();
      runtimeModelInternal;
      #lastMutationId;
      #pendingDocumentRequestPromise = null;
      #frameOwnerNode;
      #loadNodeAttributesTimeout;
      #searchId;
      #topLayerThrottler = new Throttler(100);
      #topLayerNodes = [];
      #resourceTreeModel = null;
      constructor(target) {
        super(target);
        this.agent = target.domAgent();
        target.registerDOMDispatcher(new DOMDispatcher(this));
        this.runtimeModelInternal = target.model(RuntimeModel);
        this.#resourceTreeModel = target.model(ResourceTreeModel);
        this.#resourceTreeModel?.addEventListener(Events$6.DocumentOpened, this.onDocumentOpened, this);
        if (!target.suspended()) {
          void this.agent.invoke_enable({});
        }
        if (experiments.isEnabled(ExperimentName.CAPTURE_NODE_CREATION_STACKS)) {
          void this.agent.invoke_setNodeStackTracesEnabled({ enable: true });
        }
      }
      runtimeModel() {
        return this.runtimeModelInternal;
      }
      cssModel() {
        return this.target().model(CSSModel);
      }
      overlayModel() {
        return this.target().model(OverlayModel);
      }
      static cancelSearch() {
        for (const domModel of TargetManager3.instance().models(_DOMModel)) {
          domModel.cancelSearch();
        }
      }
      scheduleMutationEvent(node2) {
        if (!this.hasEventListeners(Events$8.DOMMutated)) {
          return;
        }
        this.#lastMutationId = (this.#lastMutationId || 0) + 1;
        void Promise.resolve().then(callObserve.bind(this, node2, this.#lastMutationId));
        function callObserve(node3, mutationId) {
          if (!this.hasEventListeners(Events$8.DOMMutated) || this.#lastMutationId !== mutationId) {
            return;
          }
          this.dispatchEventToListeners(Events$8.DOMMutated, node3);
        }
      }
      onDocumentOpened(event) {
        const frame = event.data;
        const node2 = this.frameIdToOwnerNode.get(frame.id);
        if (node2) {
          const contentDocument = node2.contentDocument();
          if (contentDocument && contentDocument.documentURL !== frame.url) {
            contentDocument.documentURL = frame.url;
            contentDocument.baseURL = frame.url;
            this.dispatchEventToListeners(Events$8.DocumentURLChanged, contentDocument);
          }
        }
      }
      requestDocument() {
        if (this.#document) {
          return Promise.resolve(this.#document);
        }
        if (!this.#pendingDocumentRequestPromise) {
          this.#pendingDocumentRequestPromise = this.requestDocumentInternal();
        }
        return this.#pendingDocumentRequestPromise;
      }
      async getOwnerNodeForFrame(frameId) {
        const response = await this.agent.invoke_getFrameOwner({ frameId });
        if (response.getError()) {
          return null;
        }
        return new DeferredDOMNode(this.target(), response.backendNodeId);
      }
      async requestDocumentInternal() {
        const response = await this.agent.invoke_getDocument({});
        if (response.getError()) {
          return null;
        }
        const { root: documentPayload } = response;
        this.#pendingDocumentRequestPromise = null;
        if (documentPayload) {
          this.setDocument(documentPayload);
        }
        if (!this.#document) {
          console.error("No document");
          return null;
        }
        const parentModel = this.parentModel();
        if (parentModel && !this.#frameOwnerNode) {
          await parentModel.requestDocument();
          const mainFrame = this.target().model(ResourceTreeModel)?.mainFrame;
          if (mainFrame) {
            const response2 = await parentModel.agent.invoke_getFrameOwner({ frameId: mainFrame.id });
            if (!response2.getError() && response2.nodeId) {
              this.#frameOwnerNode = parentModel.nodeForId(response2.nodeId);
            }
          }
        }
        if (this.#frameOwnerNode) {
          const oldDocument = this.#frameOwnerNode.contentDocument();
          this.#frameOwnerNode.setContentDocument(this.#document);
          this.#frameOwnerNode.setChildren([]);
          if (this.#document) {
            this.#document.parentNode = this.#frameOwnerNode;
            this.dispatchEventToListeners(Events$8.NodeInserted, this.#document);
          } else if (oldDocument) {
            this.dispatchEventToListeners(Events$8.NodeRemoved, { node: oldDocument, parent: this.#frameOwnerNode });
          }
        }
        return this.#document;
      }
      existingDocument() {
        return this.#document;
      }
      async pushNodeToFrontend(objectId) {
        await this.requestDocument();
        const { nodeId } = await this.agent.invoke_requestNode({ objectId });
        return this.nodeForId(nodeId);
      }
      pushNodeByPathToFrontend(path14) {
        return this.requestDocument().then(() => this.agent.invoke_pushNodeByPathToFrontend({ path: path14 })).then(({ nodeId }) => nodeId);
      }
      async pushNodesByBackendIdsToFrontend(backendNodeIds3) {
        await this.requestDocument();
        const backendNodeIdsArray = [...backendNodeIds3];
        const { nodeIds } = await this.agent.invoke_pushNodesByBackendIdsToFrontend({ backendNodeIds: backendNodeIdsArray });
        if (!nodeIds) {
          return null;
        }
        const map2 = /* @__PURE__ */ new Map();
        for (let i = 0; i < nodeIds.length; ++i) {
          if (nodeIds[i]) {
            map2.set(backendNodeIdsArray[i], this.nodeForId(nodeIds[i]));
          }
        }
        return map2;
      }
      attributeModified(nodeId, name, value) {
        const node2 = this.idToDOMNode.get(nodeId);
        if (!node2) {
          return;
        }
        node2.setAttributeInternal(name, value);
        this.dispatchEventToListeners(Events$8.AttrModified, { node: node2, name });
        this.scheduleMutationEvent(node2);
      }
      attributeRemoved(nodeId, name) {
        const node2 = this.idToDOMNode.get(nodeId);
        if (!node2) {
          return;
        }
        node2.removeAttributeInternal(name);
        this.dispatchEventToListeners(Events$8.AttrRemoved, { node: node2, name });
        this.scheduleMutationEvent(node2);
      }
      inlineStyleInvalidated(nodeIds) {
        nodeIds.forEach((nodeId) => this.#attributeLoadNodeIds.add(nodeId));
        if (!this.#loadNodeAttributesTimeout) {
          this.#loadNodeAttributesTimeout = window.setTimeout(this.loadNodeAttributes.bind(this), 20);
        }
      }
      loadNodeAttributes() {
        this.#loadNodeAttributesTimeout = void 0;
        for (const nodeId of this.#attributeLoadNodeIds) {
          void this.agent.invoke_getAttributes({ nodeId }).then(({ attributes }) => {
            if (!attributes) {
              return;
            }
            const node2 = this.idToDOMNode.get(nodeId);
            if (!node2) {
              return;
            }
            if (node2.setAttributesPayload(attributes)) {
              this.dispatchEventToListeners(Events$8.AttrModified, { node: node2, name: "style" });
              this.scheduleMutationEvent(node2);
            }
          });
        }
        this.#attributeLoadNodeIds.clear();
      }
      characterDataModified(nodeId, newValue) {
        const node2 = this.idToDOMNode.get(nodeId);
        if (!node2) {
          console.error("nodeId could not be resolved to a node");
          return;
        }
        node2.setNodeValueInternal(newValue);
        this.dispatchEventToListeners(Events$8.CharacterDataModified, node2);
        this.scheduleMutationEvent(node2);
      }
      nodeForId(nodeId) {
        return nodeId ? this.idToDOMNode.get(nodeId) || null : null;
      }
      documentUpdated() {
        const alreadyHasDocument = Boolean(this.#document);
        this.setDocument(null);
        if (this.parentModel() && alreadyHasDocument && !this.#pendingDocumentRequestPromise) {
          void this.requestDocument();
        }
      }
      setDocument(payload) {
        this.idToDOMNode = /* @__PURE__ */ new Map();
        this.frameIdToOwnerNode = /* @__PURE__ */ new Map();
        if (payload && "nodeId" in payload) {
          this.#document = new DOMDocument(this, payload);
        } else {
          this.#document = null;
        }
        DOMModelUndoStack.instance().dispose(this);
        if (!this.parentModel()) {
          this.dispatchEventToListeners(Events$8.DocumentUpdated, this);
        }
      }
      setDocumentForTest(document2) {
        this.setDocument(document2);
      }
      setDetachedRoot(payload) {
        if (payload.nodeName === "#document") {
          new DOMDocument(this, payload);
        } else {
          DOMNode.create(this, null, false, payload);
        }
      }
      setChildNodes(parentId, payloads) {
        if (!parentId && payloads.length) {
          this.setDetachedRoot(payloads[0]);
          return;
        }
        const parent = this.idToDOMNode.get(parentId);
        parent?.setChildrenPayload(payloads);
      }
      childNodeCountUpdated(nodeId, newValue) {
        const node2 = this.idToDOMNode.get(nodeId);
        if (!node2) {
          console.error("nodeId could not be resolved to a node");
          return;
        }
        node2.setChildNodeCount(newValue);
        this.dispatchEventToListeners(Events$8.ChildNodeCountUpdated, node2);
        this.scheduleMutationEvent(node2);
      }
      childNodeInserted(parentId, prevId, payload) {
        const parent = this.idToDOMNode.get(parentId);
        const prev = this.idToDOMNode.get(prevId);
        if (!parent) {
          console.error("parentId could not be resolved to a node");
          return;
        }
        const node2 = parent.insertChild(prev, payload);
        this.idToDOMNode.set(node2.id, node2);
        this.dispatchEventToListeners(Events$8.NodeInserted, node2);
        this.scheduleMutationEvent(node2);
      }
      childNodeRemoved(parentId, nodeId) {
        const parent = this.idToDOMNode.get(parentId);
        const node2 = this.idToDOMNode.get(nodeId);
        if (!parent || !node2) {
          console.error("parentId or nodeId could not be resolved to a node");
          return;
        }
        parent.removeChild(node2);
        this.unbind(node2);
        this.dispatchEventToListeners(Events$8.NodeRemoved, { node: node2, parent });
        this.scheduleMutationEvent(node2);
      }
      shadowRootPushed(hostId, root2) {
        const host = this.idToDOMNode.get(hostId);
        if (!host) {
          return;
        }
        const node2 = DOMNode.create(this, host.ownerDocument, true, root2);
        node2.parentNode = host;
        this.idToDOMNode.set(node2.id, node2);
        host.shadowRootsInternal.unshift(node2);
        this.dispatchEventToListeners(Events$8.NodeInserted, node2);
        this.scheduleMutationEvent(node2);
      }
      shadowRootPopped(hostId, rootId) {
        const host = this.idToDOMNode.get(hostId);
        if (!host) {
          return;
        }
        const root2 = this.idToDOMNode.get(rootId);
        if (!root2) {
          return;
        }
        host.removeChild(root2);
        this.unbind(root2);
        this.dispatchEventToListeners(Events$8.NodeRemoved, { node: root2, parent: host });
        this.scheduleMutationEvent(root2);
      }
      pseudoElementAdded(parentId, pseudoElement) {
        const parent = this.idToDOMNode.get(parentId);
        if (!parent) {
          return;
        }
        const node2 = DOMNode.create(this, parent.ownerDocument, false, pseudoElement);
        node2.parentNode = parent;
        this.idToDOMNode.set(node2.id, node2);
        const pseudoType = node2.pseudoType();
        if (!pseudoType) {
          throw new Error("DOMModel._pseudoElementAdded expects pseudoType to be defined.");
        }
        const currentPseudoElements = parent.pseudoElements().get(pseudoType);
        if (currentPseudoElements && currentPseudoElements.length > 0) {
          if (!(pseudoType.startsWith("view-transition") || pseudoType.startsWith("scroll-") || pseudoType === "column")) {
            throw new Error(`DOMModel.pseudoElementAdded expects parent to not already have this pseudo type added; only view-transition* and scrolling pseudo elements can coexist under the same parent. ${currentPseudoElements.length} elements of type ${pseudoType} already exist on parent.`);
          }
          currentPseudoElements.push(node2);
        } else {
          parent.pseudoElements().set(pseudoType, [node2]);
        }
        this.dispatchEventToListeners(Events$8.NodeInserted, node2);
        this.scheduleMutationEvent(node2);
      }
      adoptedStyleSheetsModified(parentId, styleSheets) {
        const parent = this.idToDOMNode.get(parentId);
        if (!parent) {
          return;
        }
        parent.setAdoptedStyleSheets(styleSheets);
      }
      scrollableFlagUpdated(nodeId, isScrollable) {
        const node2 = this.nodeForId(nodeId);
        if (!node2 || node2.isScrollable() === isScrollable) {
          return;
        }
        node2.setIsScrollable(isScrollable);
      }
      adRelatedStateUpdated(nodeId, isAdRelated) {
        const node2 = this.nodeForId(nodeId);
        if (!node2 || node2.isAdRelatedNode() === isAdRelated) {
          return;
        }
        node2.setIsAdRelated(isAdRelated);
      }
      affectedByStartingStylesFlagUpdated(nodeId, affectedByStartingStyles) {
        const node2 = this.nodeForId(nodeId);
        if (!node2 || node2.affectedByStartingStyles() === affectedByStartingStyles) {
          return;
        }
        node2.setAffectedByStartingStyles(affectedByStartingStyles);
        this.dispatchEventToListeners(Events$8.AffectedByStartingStylesFlagUpdated, { node: node2 });
      }
      pseudoElementRemoved(parentId, pseudoElementId) {
        const parent = this.idToDOMNode.get(parentId);
        if (!parent) {
          return;
        }
        const pseudoElement = this.idToDOMNode.get(pseudoElementId);
        if (!pseudoElement) {
          return;
        }
        parent.removeChild(pseudoElement);
        this.unbind(pseudoElement);
        this.dispatchEventToListeners(Events$8.NodeRemoved, { node: pseudoElement, parent });
        this.scheduleMutationEvent(pseudoElement);
      }
      distributedNodesUpdated(insertionPointId, distributedNodes) {
        const insertionPoint = this.idToDOMNode.get(insertionPointId);
        if (!insertionPoint) {
          return;
        }
        insertionPoint.setDistributedNodePayloads(distributedNodes);
        this.dispatchEventToListeners(Events$8.DistributedNodesChanged, insertionPoint);
        this.scheduleMutationEvent(insertionPoint);
      }
      unbind(node2) {
        this.idToDOMNode.delete(node2.id);
        const frameId = node2.frameOwnerFrameId();
        if (frameId) {
          this.frameIdToOwnerNode.delete(frameId);
        }
        const children = node2.children();
        for (let i = 0; children && i < children.length; ++i) {
          this.unbind(children[i]);
        }
        for (let i = 0; i < node2.shadowRootsInternal.length; ++i) {
          this.unbind(node2.shadowRootsInternal[i]);
        }
        const pseudoElements = node2.pseudoElements();
        for (const value of pseudoElements.values()) {
          for (const pseudoElement of value) {
            this.unbind(pseudoElement);
          }
        }
        const templateContent = node2.templateContent();
        if (templateContent) {
          this.unbind(templateContent);
        }
      }
      async getNodesByStyle(computedStyles, pierce = false) {
        await this.requestDocument();
        if (!this.#document) {
          throw new Error("DOMModel.getNodesByStyle expects to have a document.");
        }
        const response = await this.agent.invoke_getNodesForSubtreeByStyle({ nodeId: this.#document.id, computedStyles, pierce });
        if (response.getError()) {
          throw new Error(response.getError());
        }
        return response.nodeIds;
      }
      async performSearch(query, includeUserAgentShadowDOM) {
        const response = await this.agent.invoke_performSearch({ query, includeUserAgentShadowDOM });
        if (!response.getError()) {
          this.#searchId = response.searchId;
        }
        return response.getError() ? 0 : response.resultCount;
      }
      async searchResult(index2) {
        if (!this.#searchId) {
          return null;
        }
        const { nodeIds } = await this.agent.invoke_getSearchResults({ searchId: this.#searchId, fromIndex: index2, toIndex: index2 + 1 });
        return nodeIds?.length === 1 ? this.nodeForId(nodeIds[0]) : null;
      }
      cancelSearch() {
        if (!this.#searchId) {
          return;
        }
        void this.agent.invoke_discardSearchResults({ searchId: this.#searchId });
        this.#searchId = void 0;
      }
      classNamesPromise(nodeId) {
        return this.agent.invoke_collectClassNamesFromSubtree({ nodeId }).then(({ classNames }) => classNames || []);
      }
      querySelector(nodeId, selector) {
        return this.agent.invoke_querySelector({ nodeId, selector }).then(({ nodeId: nodeId2 }) => nodeId2);
      }
      querySelectorAll(nodeId, selector) {
        return this.agent.invoke_querySelectorAll({ nodeId, selector }).then(({ nodeIds }) => nodeIds);
      }
      getTopLayerElements() {
        return this.agent.invoke_getTopLayerElements().then(({ nodeIds }) => nodeIds);
      }
      topLayerElementsUpdated() {
        void this.#topLayerThrottler.schedule(async () => {
          const result = await this.agent.invoke_getTopLayerElements();
          if (result.getError()) {
            return;
          }
          const previousDocs = /* @__PURE__ */ new Set();
          for (const node2 of this.#topLayerNodes) {
            node2.setTopLayerIndex(-1);
            if (node2.ownerDocument) {
              previousDocs.add(node2.ownerDocument);
            }
          }
          this.#topLayerNodes.splice(0);
          const nodes = result.nodeIds.map((id2) => this.idToDOMNode.get(id2)).filter((node2) => Boolean(node2));
          const nodesByDocument = /* @__PURE__ */ new Map();
          for (const node2 of nodes) {
            const document2 = node2.ownerDocument;
            if (!document2) {
              continue;
            }
            if (!nodesByDocument.has(document2)) {
              nodesByDocument.set(document2, []);
            }
            nodesByDocument.get(document2)?.push(node2);
          }
          for (const [document2, nodes2] of nodesByDocument) {
            let topLayerIdx = 1;
            const documentShortcuts = [];
            for (const [idx, node2] of nodes2.entries()) {
              if (node2.nodeName() === "::backdrop") {
                continue;
              }
              const childShortcuts = [];
              const previousNode = result.nodeIds[idx - 1] ? this.idToDOMNode.get(result.nodeIds[idx - 1]) : null;
              if (previousNode && previousNode.nodeName() === "::backdrop") {
                childShortcuts.push(new DOMNodeShortcut(this.target(), previousNode.backendNodeId(), 0, previousNode.nodeName()));
              }
              const shortcut = new DOMNodeShortcut(this.target(), node2.backendNodeId(), 0, node2.nodeName(), childShortcuts);
              node2.setTopLayerIndex(topLayerIdx++);
              this.#topLayerNodes.push(node2);
              documentShortcuts.push(shortcut);
              previousDocs.delete(document2);
            }
            this.dispatchEventToListeners(Events$8.TopLayerElementsChanged, {
              document: document2,
              documentShortcuts
            });
          }
          for (const document2 of previousDocs) {
            this.dispatchEventToListeners(Events$8.TopLayerElementsChanged, {
              document: document2,
              documentShortcuts: []
            });
          }
        });
      }
      getDetachedDOMNodes() {
        return this.agent.invoke_getDetachedDomNodes().then(({ detachedNodes }) => detachedNodes);
      }
      getElementByRelation(nodeId, relation) {
        return this.agent.invoke_getElementByRelation({ nodeId, relation }).then(({ nodeId: nodeId2 }) => nodeId2);
      }
      markUndoableState(minorChange) {
        void DOMModelUndoStack.instance().markUndoableState(this, minorChange || false);
      }
      async nodeForLocation(x, y, includeUserAgentShadowDOM) {
        const response = await this.agent.invoke_getNodeForLocation({ x, y, includeUserAgentShadowDOM });
        if (response.getError() || !response.nodeId) {
          return null;
        }
        return this.nodeForId(response.nodeId);
      }
      async getContainerForNode(nodeId, containerName, physicalAxes, logicalAxes, queriesScrollState, queriesAnchored) {
        const { nodeId: containerNodeId } = await this.agent.invoke_getContainerForNode({ nodeId, containerName, physicalAxes, logicalAxes, queriesScrollState, queriesAnchored });
        if (!containerNodeId) {
          return null;
        }
        return this.nodeForId(containerNodeId);
      }
      pushObjectAsNodeToFrontend(object2) {
        return object2.isNode() && object2.objectId ? this.pushNodeToFrontend(object2.objectId) : Promise.resolve(null);
      }
      suspendModel() {
        return this.agent.invoke_disable().then(() => this.setDocument(null));
      }
      async resumeModel() {
        await this.agent.invoke_enable({});
      }
      dispose() {
        this.#resourceTreeModel?.removeEventListener(Events$6.DocumentOpened, this.onDocumentOpened, this);
        DOMModelUndoStack.instance().dispose(this);
      }
      parentModel() {
        const parentTarget = this.target().parentTarget();
        return parentTarget ? parentTarget.model(_DOMModel) : null;
      }
      getAgent() {
        return this.agent;
      }
      registerNode(node2) {
        this.idToDOMNode.set(node2.id, node2);
        const frameId = node2.frameOwnerFrameId();
        if (frameId) {
          this.frameIdToOwnerNode.set(frameId, node2);
        }
      }
    };
    (function(Events2) {
      Events2["AttrModified"] = "AttrModified";
      Events2["AttrRemoved"] = "AttrRemoved";
      Events2["CharacterDataModified"] = "CharacterDataModified";
      Events2["DOMMutated"] = "DOMMutated";
      Events2["DocumentURLChanged"] = "DocumentURLChanged";
      Events2["NodeInserted"] = "NodeInserted";
      Events2["NodeRemoved"] = "NodeRemoved";
      Events2["DocumentUpdated"] = "DocumentUpdated";
      Events2["ChildNodeCountUpdated"] = "ChildNodeCountUpdated";
      Events2["DistributedNodesChanged"] = "DistributedNodesChanged";
      Events2["MarkersChanged"] = "MarkersChanged";
      Events2["TopLayerElementsChanged"] = "TopLayerElementsChanged";
      Events2["AffectedByStartingStylesFlagUpdated"] = "AffectedByStartingStylesFlagUpdated";
      Events2["AdoptedStyleSheetsModified"] = "AdoptedStyleSheetsModified";
    })(Events$8 || (Events$8 = {}));
    DOMDispatcher = class {
      #domModel;
      constructor(domModel) {
        this.#domModel = domModel;
      }
      documentUpdated() {
        this.#domModel.documentUpdated();
      }
      attributeModified({ nodeId, name, value }) {
        this.#domModel.attributeModified(nodeId, name, value);
      }
      attributeRemoved({ nodeId, name }) {
        this.#domModel.attributeRemoved(nodeId, name);
      }
      adoptedStyleSheetsModified({ nodeId, adoptedStyleSheets }) {
        this.#domModel.adoptedStyleSheetsModified(nodeId, adoptedStyleSheets);
      }
      inlineStyleInvalidated({ nodeIds }) {
        this.#domModel.inlineStyleInvalidated(nodeIds);
      }
      characterDataModified({ nodeId, characterData }) {
        this.#domModel.characterDataModified(nodeId, characterData);
      }
      setChildNodes({ parentId, nodes }) {
        this.#domModel.setChildNodes(parentId, nodes);
      }
      childNodeCountUpdated({ nodeId, childNodeCount }) {
        this.#domModel.childNodeCountUpdated(nodeId, childNodeCount);
      }
      childNodeInserted({ parentNodeId, previousNodeId, node: node2 }) {
        this.#domModel.childNodeInserted(parentNodeId, previousNodeId, node2);
      }
      childNodeRemoved({ parentNodeId, nodeId }) {
        this.#domModel.childNodeRemoved(parentNodeId, nodeId);
      }
      shadowRootPushed({ hostId, root: root2 }) {
        this.#domModel.shadowRootPushed(hostId, root2);
      }
      shadowRootPopped({ hostId, rootId }) {
        this.#domModel.shadowRootPopped(hostId, rootId);
      }
      pseudoElementAdded({ parentId, pseudoElement }) {
        this.#domModel.pseudoElementAdded(parentId, pseudoElement);
      }
      pseudoElementRemoved({ parentId, pseudoElementId }) {
        this.#domModel.pseudoElementRemoved(parentId, pseudoElementId);
      }
      distributedNodesUpdated({ insertionPointId, distributedNodes }) {
        this.#domModel.distributedNodesUpdated(insertionPointId, distributedNodes);
      }
      topLayerElementsUpdated() {
        this.#domModel.topLayerElementsUpdated();
      }
      scrollableFlagUpdated({ nodeId, isScrollable }) {
        this.#domModel.scrollableFlagUpdated(nodeId, isScrollable);
      }
      affectedByStartingStylesFlagUpdated({ nodeId, affectedByStartingStyles }) {
        this.#domModel.affectedByStartingStylesFlagUpdated(nodeId, affectedByStartingStyles);
      }
      adRelatedStateUpdated({ nodeId, isAdRelated }) {
        this.#domModel.adRelatedStateUpdated(nodeId, isAdRelated);
      }
    };
    domModelUndoStackInstance = null;
    DOMModelUndoStack = class _DOMModelUndoStack {
      #stack;
      #index;
      #lastModelWithMinorChange;
      constructor() {
        this.#stack = [];
        this.#index = 0;
        this.#lastModelWithMinorChange = null;
      }
      static instance(opts = { forceNew: null }) {
        const { forceNew } = opts;
        if (!domModelUndoStackInstance || forceNew) {
          domModelUndoStackInstance = new _DOMModelUndoStack();
        }
        return domModelUndoStackInstance;
      }
      async markUndoableState(model3, minorChange) {
        if (this.#lastModelWithMinorChange && model3 !== this.#lastModelWithMinorChange) {
          this.#lastModelWithMinorChange.markUndoableState();
          this.#lastModelWithMinorChange = null;
        }
        if (minorChange && this.#lastModelWithMinorChange === model3) {
          return;
        }
        this.#stack = this.#stack.slice(0, this.#index);
        this.#stack.push(model3);
        this.#index = this.#stack.length;
        if (minorChange) {
          this.#lastModelWithMinorChange = model3;
        } else {
          await model3.getAgent().invoke_markUndoableState();
          this.#lastModelWithMinorChange = null;
        }
      }
      async undo() {
        if (this.#index === 0) {
          return await Promise.resolve();
        }
        --this.#index;
        this.#lastModelWithMinorChange = null;
        await this.#stack[this.#index].getAgent().invoke_undo();
      }
      async redo() {
        if (this.#index >= this.#stack.length) {
          return await Promise.resolve();
        }
        ++this.#index;
        this.#lastModelWithMinorChange = null;
        await this.#stack[this.#index - 1].getAgent().invoke_redo();
      }
      dispose(model3) {
        let shift = 0;
        for (let i = 0; i < this.#index; ++i) {
          if (this.#stack[i] === model3) {
            ++shift;
          }
        }
        removeElement2(this.#stack, model3);
        this.#index -= shift;
        if (this.#lastModelWithMinorChange === model3) {
          this.#lastModelWithMinorChange = null;
        }
      }
    };
    SDKModel.register(DOMModel, { capabilities: 2, autostart: true });
    Resource = class {
      #resourceTreeModel;
      #request;
      #url;
      #documentURL;
      #frameId;
      #loaderId;
      #type;
      #mimeType;
      #isGenerated;
      #lastModified;
      #contentSize;
      #parsedURL;
      #contentData = null;
      #pendingContentData = null;
      constructor(resourceTreeModel, request3, url, documentURL, frameId, loaderId, type2, mimeType, lastModified, contentSize) {
        this.#resourceTreeModel = resourceTreeModel;
        this.#request = request3;
        this.url = url;
        this.#documentURL = documentURL;
        this.#frameId = frameId;
        this.#loaderId = loaderId;
        this.#type = type2 || resourceTypes.Other;
        this.#mimeType = mimeType;
        this.#isGenerated = false;
        this.#lastModified = lastModified && isValid(lastModified) ? lastModified : null;
        this.#contentSize = contentSize;
      }
      lastModified() {
        if (this.#lastModified || !this.#request) {
          return this.#lastModified;
        }
        const lastModifiedHeader = this.#request.responseLastModified();
        const date2 = lastModifiedHeader ? new Date(lastModifiedHeader) : null;
        this.#lastModified = date2 && isValid(date2) ? date2 : null;
        return this.#lastModified;
      }
      contentSize() {
        if (typeof this.#contentSize === "number" || !this.#request) {
          return this.#contentSize;
        }
        return this.#request.resourceSize;
      }
      get request() {
        return this.#request;
      }
      get url() {
        return this.#url;
      }
      set url(x) {
        this.#url = x;
        this.#parsedURL = new ParsedURL2(x);
      }
      get parsedURL() {
        return this.#parsedURL;
      }
      get documentURL() {
        return this.#documentURL;
      }
      get frameId() {
        return this.#frameId;
      }
      get loaderId() {
        return this.#loaderId;
      }
      get displayName() {
        return this.#parsedURL ? this.#parsedURL.displayName : "";
      }
      resourceType() {
        return this.#request ? this.#request.resourceType() : this.#type;
      }
      get mimeType() {
        return this.#request ? this.#request.mimeType : this.#mimeType;
      }
      get content() {
        if (this.#contentData?.isTextContent) {
          return this.#contentData.text;
        }
        return this.#contentData?.base64 ?? null;
      }
      get isGenerated() {
        return this.#isGenerated;
      }
      set isGenerated(val) {
        this.#isGenerated = val;
      }
      contentURL() {
        return this.#url;
      }
      contentType() {
        if (this.resourceType() === resourceTypes.Document && this.mimeType.indexOf("javascript") !== -1) {
          return resourceTypes.Script;
        }
        return this.resourceType();
      }
      async requestContentData() {
        if (this.#contentData) {
          return this.#contentData;
        }
        if (this.#pendingContentData) {
          return await this.#pendingContentData;
        }
        this.#pendingContentData = this.innerRequestContent().then((contentData) => {
          if (!ContentData.isError(contentData)) {
            this.#contentData = contentData;
          }
          this.#pendingContentData = null;
          return contentData;
        });
        return await this.#pendingContentData;
      }
      canonicalMimeType() {
        return this.contentType().canonicalMimeType() || this.mimeType;
      }
      async searchInContent(query, caseSensitive, isRegex) {
        if (!this.frameId) {
          return [];
        }
        if (this.request) {
          return await this.request.searchInContent(query, caseSensitive, isRegex);
        }
        const result = await this.#resourceTreeModel.target().pageAgent().invoke_searchInResource({ frameId: this.frameId, url: this.url, query, caseSensitive, isRegex });
        return performSearchInSearchMatches(result.result || [], query, caseSensitive, isRegex);
      }
      async populateImageSource(image) {
        const contentData = await this.requestContentData();
        if (ContentData.isError(contentData)) {
          return;
        }
        image.src = contentData.asDataUrl() ?? this.#url;
      }
      async innerRequestContent() {
        if (this.request) {
          return await this.request.requestContentData();
        }
        const response = await this.#resourceTreeModel.target().pageAgent().invoke_getResourceContent({ frameId: this.frameId, url: this.url });
        const error = response.getError();
        if (error) {
          return { error };
        }
        return new ContentData(response.content, response.base64Encoded, this.mimeType);
      }
      frame() {
        return this.#frameId ? this.#resourceTreeModel.frameForId(this.#frameId) : null;
      }
      statusCode() {
        return this.#request ? this.#request.statusCode : 0;
      }
    };
    SecurityOriginManager = class extends SDKModel {
      #mainSecurityOrigin = "";
      #unreachableMainSecurityOrigin = "";
      #securityOrigins = /* @__PURE__ */ new Set();
      updateSecurityOrigins(securityOrigins) {
        const oldOrigins = this.#securityOrigins;
        this.#securityOrigins = securityOrigins;
        for (const origin of oldOrigins) {
          if (!this.#securityOrigins.has(origin)) {
            this.dispatchEventToListeners(Events$7.SecurityOriginRemoved, origin);
          }
        }
        for (const origin of this.#securityOrigins) {
          if (!oldOrigins.has(origin)) {
            this.dispatchEventToListeners(Events$7.SecurityOriginAdded, origin);
          }
        }
      }
      securityOrigins() {
        return [...this.#securityOrigins];
      }
      mainSecurityOrigin() {
        return this.#mainSecurityOrigin;
      }
      unreachableMainSecurityOrigin() {
        return this.#unreachableMainSecurityOrigin;
      }
      setMainSecurityOrigin(securityOrigin, unreachableSecurityOrigin) {
        this.#mainSecurityOrigin = securityOrigin;
        this.#unreachableMainSecurityOrigin = unreachableSecurityOrigin || null;
        this.dispatchEventToListeners(Events$7.MainSecurityOriginChanged, {
          mainSecurityOrigin: this.#mainSecurityOrigin,
          unreachableMainSecurityOrigin: this.#unreachableMainSecurityOrigin
        });
      }
    };
    (function(Events2) {
      Events2["SecurityOriginAdded"] = "SecurityOriginAdded";
      Events2["SecurityOriginRemoved"] = "SecurityOriginRemoved";
      Events2["MainSecurityOriginChanged"] = "MainSecurityOriginChanged";
    })(Events$7 || (Events$7 = {}));
    SDKModel.register(SecurityOriginManager, { capabilities: 0, autostart: false });
    StorageKeyManager = class extends SDKModel {
      #mainStorageKey;
      #storageKeys;
      constructor(target) {
        super(target);
        this.#mainStorageKey = "";
        this.#storageKeys = /* @__PURE__ */ new Set();
      }
      updateStorageKeys(storageKeys) {
        const oldStorageKeys = this.#storageKeys;
        this.#storageKeys = storageKeys;
        for (const storageKey of oldStorageKeys) {
          if (!this.#storageKeys.has(storageKey)) {
            this.dispatchEventToListeners("StorageKeyRemoved", storageKey);
          }
        }
        for (const storageKey of this.#storageKeys) {
          if (!oldStorageKeys.has(storageKey)) {
            this.dispatchEventToListeners("StorageKeyAdded", storageKey);
          }
        }
      }
      storageKeys() {
        return [...this.#storageKeys];
      }
      mainStorageKey() {
        return this.#mainStorageKey;
      }
      setMainStorageKey(storageKey) {
        this.#mainStorageKey = storageKey;
        this.dispatchEventToListeners("MainStorageKeyChanged", {
          mainStorageKey: this.#mainStorageKey
        });
      }
    };
    SDKModel.register(StorageKeyManager, { capabilities: 0, autostart: false });
    ResourceTreeModel = class _ResourceTreeModel extends SDKModel {
      agent;
      storageAgent;
      #securityOriginManager;
      #storageKeyManager;
      framesInternal = /* @__PURE__ */ new Map();
      #cachedResourcesProcessed = false;
      #pendingReloadOptions = null;
      #reloadSuspensionCount = 0;
      isInterstitialShowing = false;
      mainFrame = null;
      #pendingBackForwardCacheNotUsedEvents = /* @__PURE__ */ new Set();
      constructor(target) {
        super(target);
        const networkManager = target.model(NetworkManager2);
        if (networkManager) {
          networkManager.addEventListener(Events$c.RequestFinished, this.onRequestFinished, this);
          networkManager.addEventListener(Events$c.RequestUpdateDropped, this.onRequestUpdateDropped, this);
        }
        this.agent = target.pageAgent();
        this.storageAgent = target.storageAgent();
        void this.agent.invoke_enable({});
        this.#securityOriginManager = target.model(SecurityOriginManager);
        this.#storageKeyManager = target.model(StorageKeyManager);
        target.registerPageDispatcher(new PageDispatcher(this));
        void this.#buildResourceTree();
      }
      async #buildResourceTree() {
        return await this.agent.invoke_getResourceTree().then((event) => {
          this.processCachedResources(event.getError() ? null : event.frameTree);
          if (this.mainFrame) {
            this.processPendingEvents(this.mainFrame);
          }
        });
      }
      static frameForRequest(request3) {
        const networkManager = NetworkManager2.forRequest(request3);
        const resourceTreeModel = networkManager ? networkManager.target().model(_ResourceTreeModel) : null;
        if (!resourceTreeModel) {
          return null;
        }
        return request3.frameId ? resourceTreeModel.frameForId(request3.frameId) : null;
      }
      static frames() {
        const result = [];
        for (const resourceTreeModel of TargetManager3.instance().models(_ResourceTreeModel)) {
          result.push(...resourceTreeModel.frames());
        }
        return result;
      }
      static resourceForURL(url) {
        for (const resourceTreeModel of TargetManager3.instance().models(_ResourceTreeModel)) {
          const mainFrame = resourceTreeModel.mainFrame;
          const result = mainFrame ? mainFrame.resourceForURL(url) : null;
          if (result) {
            return result;
          }
        }
        return null;
      }
      static reloadAllPages(bypassCache, scriptToEvaluateOnLoad) {
        for (const resourceTreeModel of TargetManager3.instance().models(_ResourceTreeModel)) {
          if (resourceTreeModel.target().parentTarget()?.type() !== Type$2.FRAME) {
            resourceTreeModel.reloadPage(bypassCache, scriptToEvaluateOnLoad);
          }
        }
      }
      async storageKeyForFrame(frameId) {
        if (!this.framesInternal.has(frameId)) {
          return null;
        }
        const response = await this.storageAgent.invoke_getStorageKey({ frameId });
        if (response.getError() === "Frame tree node for given frame not found") {
          return null;
        }
        return response.storageKey;
      }
      domModel() {
        return this.target().model(DOMModel);
      }
      processCachedResources(mainFramePayload) {
        if (mainFramePayload && mainFramePayload.frame.url !== ":") {
          this.dispatchEventToListeners(Events$6.WillLoadCachedResources);
          this.addFramesRecursively(null, mainFramePayload);
          this.target().setInspectedURL(mainFramePayload.frame.url);
        }
        this.#cachedResourcesProcessed = true;
        const runtimeModel = this.target().model(RuntimeModel);
        if (runtimeModel) {
          runtimeModel.setExecutionContextComparator(this.executionContextComparator.bind(this));
          runtimeModel.fireExecutionContextOrderChanged();
        }
        this.dispatchEventToListeners(Events$6.CachedResourcesLoaded, this);
      }
      cachedResourcesLoaded() {
        return this.#cachedResourcesProcessed;
      }
      addFrame(frame, _aboutToNavigate) {
        this.framesInternal.set(frame.id, frame);
        if (frame.isMainFrame()) {
          this.mainFrame = frame;
        }
        this.dispatchEventToListeners(Events$6.FrameAdded, frame);
        this.updateSecurityOrigins();
        void this.updateStorageKeys();
      }
      frameAttached(frameId, parentFrameId, stackTrace) {
        const sameTargetParentFrame = parentFrameId ? this.framesInternal.get(parentFrameId) || null : null;
        if (!this.#cachedResourcesProcessed && sameTargetParentFrame) {
          return null;
        }
        if (this.framesInternal.has(frameId)) {
          return null;
        }
        const frame = new ResourceTreeFrame(this, sameTargetParentFrame, frameId, null, stackTrace || null);
        if (parentFrameId && !sameTargetParentFrame) {
          frame.crossTargetParentFrameId = parentFrameId;
        }
        if (frame.isMainFrame() && this.mainFrame) {
          this.frameDetached(this.mainFrame.id, false);
        }
        this.addFrame(frame, true);
        return frame;
      }
      frameNavigated(framePayload, type2) {
        const sameTargetParentFrame = framePayload.parentId ? this.framesInternal.get(framePayload.parentId) || null : null;
        if (!this.#cachedResourcesProcessed && sameTargetParentFrame) {
          return;
        }
        let frame = this.framesInternal.get(framePayload.id) || null;
        if (!frame) {
          frame = this.frameAttached(framePayload.id, framePayload.parentId || null);
          console.assert(Boolean(frame));
          if (!frame) {
            return;
          }
        }
        this.dispatchEventToListeners(Events$6.FrameWillNavigate, frame);
        frame.navigate(framePayload);
        if (type2) {
          frame.backForwardCacheDetails.restoredFromCache = type2 === "BackForwardCacheRestore";
        }
        if (frame.isMainFrame()) {
          this.target().setInspectedURL(frame.url);
        }
        this.dispatchEventToListeners(Events$6.FrameNavigated, frame);
        if (frame.isPrimaryFrame()) {
          this.primaryPageChanged(frame, "Navigation");
        }
        const resources = frame.resources();
        for (let i = 0; i < resources.length; ++i) {
          this.dispatchEventToListeners(Events$6.ResourceAdded, resources[i]);
        }
        this.updateSecurityOrigins();
        void this.updateStorageKeys();
        if (frame.backForwardCacheDetails.restoredFromCache) {
          FrameManager2.instance().modelRemoved(this);
          FrameManager2.instance().modelAdded(this);
          void this.#buildResourceTree();
        }
      }
      primaryPageChanged(frame, type2) {
        this.processPendingEvents(frame);
        this.dispatchEventToListeners(Events$6.PrimaryPageChanged, { frame, type: type2 });
        const networkManager = this.target().model(NetworkManager2);
        if (networkManager && frame.isOutermostFrame()) {
          networkManager.clearRequests();
        }
      }
      documentOpened(framePayload) {
        this.frameNavigated(framePayload, void 0);
        const frame = this.framesInternal.get(framePayload.id);
        if (frame) {
          this.dispatchEventToListeners(Events$6.DocumentOpened, frame);
          if (!frame.getResourcesMap().get(framePayload.url)) {
            const frameResource = this.createResourceFromFramePayload(framePayload, framePayload.url, resourceTypes.Document, framePayload.mimeType, null, null);
            frameResource.isGenerated = true;
            frame.addResource(frameResource);
          }
        }
      }
      frameDetached(frameId, isSwap) {
        if (!this.#cachedResourcesProcessed) {
          return;
        }
        const frame = this.framesInternal.get(frameId);
        if (!frame) {
          return;
        }
        const sameTargetParentFrame = frame.sameTargetParentFrame();
        if (sameTargetParentFrame) {
          sameTargetParentFrame.removeChildFrame(frame, isSwap);
        } else {
          frame.remove(isSwap);
        }
        this.updateSecurityOrigins();
        void this.updateStorageKeys();
      }
      onRequestFinished(event) {
        if (!this.#cachedResourcesProcessed) {
          return;
        }
        const request3 = event.data;
        if (request3.failed) {
          return;
        }
        const frame = request3.frameId ? this.framesInternal.get(request3.frameId) : null;
        if (frame) {
          frame.addRequest(request3);
        }
      }
      onRequestUpdateDropped(event) {
        if (!this.#cachedResourcesProcessed) {
          return;
        }
        const data32 = event.data;
        const frameId = data32.frameId;
        if (!frameId) {
          return;
        }
        const frame = this.framesInternal.get(frameId);
        if (!frame) {
          return;
        }
        const url = data32.url;
        if (frame.getResourcesMap().get(url)) {
          return;
        }
        const resource = new Resource(this, null, url, frame.url, frameId, data32.loaderId, resourceTypes[data32.resourceType], data32.mimeType, data32.lastModified, null);
        frame.addResource(resource);
      }
      frameForId(frameId) {
        return this.framesInternal.get(frameId) || null;
      }
      forAllResources(callback) {
        if (this.mainFrame) {
          return this.mainFrame.callForFrameResources(callback);
        }
        return false;
      }
      frames() {
        return [...this.framesInternal.values()];
      }
      addFramesRecursively(sameTargetParentFrame, frameTreePayload) {
        const framePayload = frameTreePayload.frame;
        let frame = this.framesInternal.get(framePayload.id);
        if (!frame) {
          frame = new ResourceTreeFrame(this, sameTargetParentFrame, framePayload.id, framePayload, null);
        }
        if (!sameTargetParentFrame && framePayload.parentId) {
          frame.crossTargetParentFrameId = framePayload.parentId;
        }
        this.addFrame(frame);
        for (const childFrame of frameTreePayload.childFrames || []) {
          this.addFramesRecursively(frame, childFrame);
        }
        for (let i = 0; i < frameTreePayload.resources.length; ++i) {
          const subresource = frameTreePayload.resources[i];
          const resource = this.createResourceFromFramePayload(framePayload, subresource.url, resourceTypes[subresource.type], subresource.mimeType, subresource.lastModified || null, subresource.contentSize || null);
          frame.addResource(resource);
        }
        if (!frame.getResourcesMap().get(framePayload.url)) {
          const frameResource = this.createResourceFromFramePayload(framePayload, framePayload.url, resourceTypes.Document, framePayload.mimeType, null, null);
          frame.addResource(frameResource);
        }
      }
      createResourceFromFramePayload(frame, url, type2, mimeType, lastModifiedTime, contentSize) {
        const lastModified = typeof lastModifiedTime === "number" ? new Date(lastModifiedTime * 1e3) : null;
        return new Resource(this, null, url, frame.url, frame.id, frame.loaderId, type2, mimeType, lastModified, contentSize);
      }
      suspendReload() {
        this.#reloadSuspensionCount++;
      }
      resumeReload() {
        this.#reloadSuspensionCount--;
        console.assert(this.#reloadSuspensionCount >= 0, "Unbalanced call to ResourceTreeModel.resumeReload()");
        if (!this.#reloadSuspensionCount && this.#pendingReloadOptions) {
          const { ignoreCache, scriptToEvaluateOnLoad } = this.#pendingReloadOptions;
          this.reloadPage(ignoreCache, scriptToEvaluateOnLoad);
        }
      }
      reloadPage(ignoreCache, scriptToEvaluateOnLoad) {
        const loaderId = this.mainFrame?.loaderId;
        if (!loaderId) {
          return;
        }
        if (!this.#pendingReloadOptions) {
          this.dispatchEventToListeners(Events$6.PageReloadRequested, this);
        }
        if (this.#reloadSuspensionCount) {
          this.#pendingReloadOptions = { ignoreCache, scriptToEvaluateOnLoad };
          return;
        }
        this.#pendingReloadOptions = null;
        const networkManager = this.target().model(NetworkManager2);
        if (networkManager) {
          networkManager.clearRequests();
        }
        this.dispatchEventToListeners(Events$6.WillReloadPage);
        void this.agent.invoke_reload({ ignoreCache, scriptToEvaluateOnLoad, loaderId });
      }
      navigate(url) {
        return this.agent.invoke_navigate({ url });
      }
      async navigationHistory() {
        const response = await this.agent.invoke_getNavigationHistory();
        if (response.getError()) {
          return null;
        }
        return { currentIndex: response.currentIndex, entries: response.entries };
      }
      navigateToHistoryEntry(entry) {
        void this.agent.invoke_navigateToHistoryEntry({ entryId: entry.id });
      }
      setLifecycleEventsEnabled(enabled) {
        return this.agent.invoke_setLifecycleEventsEnabled({ enabled });
      }
      async fetchAppManifest() {
        const response = await this.agent.invoke_getAppManifest({});
        if (response.getError()) {
          return { url: response.url, data: null, errors: [] };
        }
        return { url: response.url, data: response.data || null, errors: response.errors };
      }
      async getInstallabilityErrors() {
        const response = await this.agent.invoke_getInstallabilityErrors();
        return response.installabilityErrors || [];
      }
      async getAppId() {
        return await this.agent.invoke_getAppId();
      }
      executionContextComparator(a, b) {
        function framePath(frame) {
          let currentFrame = frame;
          const parents = [];
          while (currentFrame) {
            parents.push(currentFrame);
            currentFrame = currentFrame.sameTargetParentFrame();
          }
          return parents.reverse();
        }
        if (a.target() !== b.target()) {
          return ExecutionContext3.comparator(a, b);
        }
        const framesA = a.frameId ? framePath(this.frameForId(a.frameId)) : [];
        const framesB = b.frameId ? framePath(this.frameForId(b.frameId)) : [];
        let frameA;
        let frameB;
        for (let i = 0; ; i++) {
          if (!framesA[i] || !framesB[i] || framesA[i] !== framesB[i]) {
            frameA = framesA[i];
            frameB = framesB[i];
            break;
          }
        }
        if (!frameA && frameB) {
          return -1;
        }
        if (!frameB && frameA) {
          return 1;
        }
        if (frameA && frameB) {
          return frameA.id.localeCompare(frameB.id);
        }
        return ExecutionContext3.comparator(a, b);
      }
      getSecurityOriginData() {
        const securityOrigins = /* @__PURE__ */ new Set();
        let mainSecurityOrigin = null;
        let unreachableMainSecurityOrigin = null;
        for (const frame of this.framesInternal.values()) {
          const origin = frame.securityOrigin;
          if (!origin) {
            continue;
          }
          securityOrigins.add(origin);
          if (frame.isMainFrame()) {
            mainSecurityOrigin = origin;
            if (frame.unreachableUrl()) {
              const unreachableParsed = new ParsedURL2(frame.unreachableUrl());
              unreachableMainSecurityOrigin = unreachableParsed.securityOrigin();
            }
          }
        }
        return {
          securityOrigins,
          mainSecurityOrigin,
          unreachableMainSecurityOrigin
        };
      }
      async getStorageKeyData() {
        const storageKeys = /* @__PURE__ */ new Set();
        let mainStorageKey = null;
        for (const { isMainFrame, storageKey } of await Promise.all([...this.framesInternal.values()].map((f) => f.getStorageKey(false).then((k) => ({
          isMainFrame: f.isMainFrame(),
          storageKey: k
        }))))) {
          if (isMainFrame) {
            mainStorageKey = storageKey;
          }
          if (storageKey) {
            storageKeys.add(storageKey);
          }
        }
        return { storageKeys, mainStorageKey };
      }
      updateSecurityOrigins() {
        const data32 = this.getSecurityOriginData();
        this.#securityOriginManager.setMainSecurityOrigin(data32.mainSecurityOrigin || "", data32.unreachableMainSecurityOrigin || "");
        this.#securityOriginManager.updateSecurityOrigins(data32.securityOrigins);
      }
      async updateStorageKeys() {
        const data32 = await this.getStorageKeyData();
        this.#storageKeyManager.setMainStorageKey(data32.mainStorageKey || "");
        this.#storageKeyManager.updateStorageKeys(data32.storageKeys);
      }
      async getMainStorageKey() {
        return this.mainFrame ? await this.mainFrame.getStorageKey(false) : null;
      }
      getMainSecurityOrigin() {
        const data32 = this.getSecurityOriginData();
        return data32.mainSecurityOrigin || data32.unreachableMainSecurityOrigin;
      }
      onBackForwardCacheNotUsed(event) {
        if (this.mainFrame && this.mainFrame.id === event.frameId && this.mainFrame.loaderId === event.loaderId) {
          this.mainFrame.setBackForwardCacheDetails(event);
          this.dispatchEventToListeners(Events$6.BackForwardCacheDetailsUpdated, this.mainFrame);
        } else {
          this.#pendingBackForwardCacheNotUsedEvents.add(event);
        }
      }
      processPendingEvents(frame) {
        if (!frame.isMainFrame()) {
          return;
        }
        for (const event of this.#pendingBackForwardCacheNotUsedEvents) {
          if (frame.id === event.frameId && frame.loaderId === event.loaderId) {
            frame.setBackForwardCacheDetails(event);
            this.#pendingBackForwardCacheNotUsedEvents.delete(event);
            break;
          }
        }
      }
    };
    (function(Events2) {
      Events2["FrameAdded"] = "FrameAdded";
      Events2["FrameNavigated"] = "FrameNavigated";
      Events2["FrameDetached"] = "FrameDetached";
      Events2["FrameResized"] = "FrameResized";
      Events2["FrameWillNavigate"] = "FrameWillNavigate";
      Events2["DocumentOpened"] = "DocumentOpened";
      Events2["PrimaryPageChanged"] = "PrimaryPageChanged";
      Events2["ResourceAdded"] = "ResourceAdded";
      Events2["WillLoadCachedResources"] = "WillLoadCachedResources";
      Events2["CachedResourcesLoaded"] = "CachedResourcesLoaded";
      Events2["DOMContentLoaded"] = "DOMContentLoaded";
      Events2["LifecycleEvent"] = "LifecycleEvent";
      Events2["Load"] = "Load";
      Events2["PageReloadRequested"] = "PageReloadRequested";
      Events2["WillReloadPage"] = "WillReloadPage";
      Events2["InterstitialShown"] = "InterstitialShown";
      Events2["InterstitialHidden"] = "InterstitialHidden";
      Events2["BackForwardCacheDetailsUpdated"] = "BackForwardCacheDetailsUpdated";
      Events2["JavaScriptDialogOpening"] = "JavaScriptDialogOpening";
    })(Events$6 || (Events$6 = {}));
    ResourceTreeFrame = class {
      #model;
      #sameTargetParentFrame;
      #id;
      crossTargetParentFrameId = null;
      #loaderId;
      #name;
      #url;
      #domainAndRegistry;
      #securityOrigin;
      #securityOriginDetails;
      #storageKey;
      #unreachableUrl;
      #adFrameStatus;
      #secureContextType;
      #crossOriginIsolatedContextType;
      #gatedAPIFeatures;
      #creationStackTrace;
      #creationStackTraceTarget = null;
      #childFrames = /* @__PURE__ */ new Set();
      resourcesMap = /* @__PURE__ */ new Map();
      backForwardCacheDetails = {
        explanations: []
      };
      constructor(model3, parentFrame, frameId, payload, creationStackTrace) {
        this.#model = model3;
        this.#sameTargetParentFrame = parentFrame;
        this.#id = frameId;
        this.#loaderId = payload?.loaderId ?? "";
        this.#name = payload?.name;
        this.#url = payload && payload.url || EmptyUrlString;
        this.#domainAndRegistry = payload?.domainAndRegistry || "";
        this.#securityOrigin = payload?.securityOrigin ?? null;
        this.#securityOriginDetails = payload?.securityOriginDetails;
        this.#unreachableUrl = payload && payload.unreachableUrl || EmptyUrlString;
        this.#adFrameStatus = payload?.adFrameStatus;
        this.#secureContextType = payload?.secureContextType ?? null;
        this.#crossOriginIsolatedContextType = payload?.crossOriginIsolatedContextType ?? null;
        this.#gatedAPIFeatures = payload?.gatedAPIFeatures ?? null;
        this.#creationStackTrace = creationStackTrace;
        if (this.#sameTargetParentFrame) {
          this.#sameTargetParentFrame.#childFrames.add(this);
        }
      }
      isSecureContext() {
        return this.#secureContextType !== null && this.#secureContextType.startsWith("Secure");
      }
      getSecureContextType() {
        return this.#secureContextType;
      }
      isCrossOriginIsolated() {
        return this.#crossOriginIsolatedContextType !== null && this.#crossOriginIsolatedContextType.startsWith("Isolated");
      }
      getCrossOriginIsolatedContextType() {
        return this.#crossOriginIsolatedContextType;
      }
      getGatedAPIFeatures() {
        return this.#gatedAPIFeatures;
      }
      getCreationStackTraceData() {
        return {
          creationStackTrace: this.#creationStackTrace,
          creationStackTraceTarget: this.#creationStackTraceTarget || this.resourceTreeModel().target()
        };
      }
      navigate(framePayload) {
        this.#loaderId = framePayload.loaderId;
        this.#name = framePayload.name;
        this.#url = framePayload.url;
        this.#domainAndRegistry = framePayload.domainAndRegistry;
        this.#securityOrigin = framePayload.securityOrigin;
        this.#securityOriginDetails = framePayload.securityOriginDetails;
        void this.getStorageKey(true);
        this.#unreachableUrl = framePayload.unreachableUrl || EmptyUrlString;
        this.#adFrameStatus = framePayload?.adFrameStatus;
        this.#secureContextType = framePayload.secureContextType;
        this.#crossOriginIsolatedContextType = framePayload.crossOriginIsolatedContextType;
        this.#gatedAPIFeatures = framePayload.gatedAPIFeatures;
        this.backForwardCacheDetails = {
          explanations: []
        };
        const mainResource = this.resourcesMap.get(this.#url);
        this.resourcesMap.clear();
        this.removeChildFrames();
        if (mainResource && mainResource.loaderId === this.#loaderId) {
          this.addResource(mainResource);
        }
      }
      resourceTreeModel() {
        return this.#model;
      }
      get id() {
        return this.#id;
      }
      get name() {
        return this.#name || "";
      }
      get url() {
        return this.#url;
      }
      domainAndRegistry() {
        return this.#domainAndRegistry;
      }
      async getAdScriptAncestry(frameId) {
        const res = await this.#model.agent.invoke_getAdScriptAncestry({ frameId });
        return res.adScriptAncestry || null;
      }
      get securityOrigin() {
        return this.#securityOrigin;
      }
      get securityOriginDetails() {
        return this.#securityOriginDetails ?? null;
      }
      getStorageKey(forceFetch) {
        if (!this.#storageKey || forceFetch) {
          this.#storageKey = this.#model.storageKeyForFrame(this.#id);
        }
        return this.#storageKey;
      }
      unreachableUrl() {
        return this.#unreachableUrl;
      }
      get loaderId() {
        return this.#loaderId;
      }
      adFrameType() {
        return this.#adFrameStatus?.adFrameType || "none";
      }
      adFrameStatus() {
        return this.#adFrameStatus;
      }
      get childFrames() {
        return [...this.#childFrames];
      }
      sameTargetParentFrame() {
        return this.#sameTargetParentFrame;
      }
      crossTargetParentFrame() {
        if (!this.crossTargetParentFrameId) {
          return null;
        }
        const parentTarget = this.#model.target().parentTarget();
        if (parentTarget?.type() !== Type$2.FRAME) {
          return null;
        }
        const parentModel = parentTarget.model(ResourceTreeModel);
        if (!parentModel) {
          return null;
        }
        return parentModel.framesInternal.get(this.crossTargetParentFrameId) || null;
      }
      parentFrame() {
        return this.sameTargetParentFrame() || this.crossTargetParentFrame();
      }
      isMainFrame() {
        return !this.#sameTargetParentFrame;
      }
      isOutermostFrame() {
        return this.#model.target().parentTarget()?.type() !== Type$2.FRAME && !this.#sameTargetParentFrame && !this.crossTargetParentFrameId;
      }
      isPrimaryFrame() {
        return !this.#sameTargetParentFrame && this.#model.target() === TargetManager3.instance().primaryPageTarget();
      }
      removeChildFrame(frame, isSwap) {
        this.#childFrames.delete(frame);
        frame.remove(isSwap);
      }
      removeChildFrames() {
        const frames3 = this.#childFrames;
        this.#childFrames = /* @__PURE__ */ new Set();
        for (const frame of frames3) {
          frame.remove(false);
        }
      }
      remove(isSwap) {
        this.removeChildFrames();
        this.#model.framesInternal.delete(this.id);
        this.#model.dispatchEventToListeners(Events$6.FrameDetached, { frame: this, isSwap });
      }
      addResource(resource) {
        if (this.resourcesMap.get(resource.url) === resource) {
          return;
        }
        this.resourcesMap.set(resource.url, resource);
        this.#model.dispatchEventToListeners(Events$6.ResourceAdded, resource);
      }
      addRequest(request3) {
        let resource = this.resourcesMap.get(request3.url());
        if (resource?.request === request3) {
          return;
        }
        resource = new Resource(this.#model, request3, request3.url(), request3.documentURL, request3.frameId, request3.loaderId, request3.resourceType(), request3.mimeType, null, null);
        this.resourcesMap.set(resource.url, resource);
        this.#model.dispatchEventToListeners(Events$6.ResourceAdded, resource);
      }
      resources() {
        return Array.from(this.resourcesMap.values());
      }
      resourceForURL(url) {
        const resource = this.resourcesMap.get(url);
        if (resource) {
          return resource;
        }
        for (const frame of this.#childFrames) {
          const resource2 = frame.resourceForURL(url);
          if (resource2) {
            return resource2;
          }
        }
        return null;
      }
      callForFrameResources(callback) {
        for (const resource of this.resourcesMap.values()) {
          if (callback(resource)) {
            return true;
          }
        }
        for (const frame of this.#childFrames) {
          if (frame.callForFrameResources(callback)) {
            return true;
          }
        }
        return false;
      }
      displayName() {
        if (this.isOutermostFrame()) {
          return lockedString("top");
        }
        const subtitle = new ParsedURL2(this.#url).displayName;
        if (subtitle) {
          if (!this.#name) {
            return subtitle;
          }
          return this.#name + " (" + subtitle + ")";
        }
        return lockedString("iframe");
      }
      async getOwnerDeferredDOMNode() {
        const parentFrame = this.parentFrame();
        if (!parentFrame) {
          return null;
        }
        return await parentFrame.resourceTreeModel().domModel().getOwnerNodeForFrame(this.#id);
      }
      async getOwnerDOMNodeOrDocument() {
        const deferredNode = await this.getOwnerDeferredDOMNode();
        if (deferredNode) {
          return await deferredNode.resolvePromise();
        }
        if (this.isOutermostFrame()) {
          return await this.resourceTreeModel().domModel().requestDocument();
        }
        return null;
      }
      async highlight() {
        const parentFrame = this.parentFrame();
        const parentTarget = this.resourceTreeModel().target().parentTarget();
        const highlightFrameOwner = async (domModel) => {
          const deferredNode = await domModel.getOwnerNodeForFrame(this.#id);
          if (deferredNode) {
            domModel.overlayModel().highlightInOverlay({ deferredNode, selectorList: "" }, "all", true);
          }
        };
        if (parentFrame) {
          return await highlightFrameOwner(parentFrame.resourceTreeModel().domModel());
        }
        if (parentTarget?.type() === Type$2.FRAME) {
          const domModel = parentTarget.model(DOMModel);
          if (domModel) {
            return await highlightFrameOwner(domModel);
          }
        }
        const document2 = await this.resourceTreeModel().domModel().requestDocument();
        if (document2) {
          this.resourceTreeModel().domModel().overlayModel().highlightInOverlay({ node: document2, selectorList: "" }, "all", true);
        }
      }
      async getPermissionsPolicyState() {
        const response = await this.resourceTreeModel().target().pageAgent().invoke_getPermissionsPolicyState({ frameId: this.#id });
        if (response.getError()) {
          return null;
        }
        return response.states;
      }
      async getOriginTrials() {
        const response = await this.resourceTreeModel().target().pageAgent().invoke_getOriginTrials({ frameId: this.#id });
        if (response.getError()) {
          return [];
        }
        return response.originTrials;
      }
      setCreationStackTrace(creationStackTraceData) {
        this.#creationStackTrace = creationStackTraceData.creationStackTrace;
        this.#creationStackTraceTarget = creationStackTraceData.creationStackTraceTarget;
      }
      setBackForwardCacheDetails(event) {
        this.backForwardCacheDetails.restoredFromCache = false;
        this.backForwardCacheDetails.explanations = event.notRestoredExplanations;
        this.backForwardCacheDetails.explanationsTree = event.notRestoredExplanationsTree;
      }
      getResourcesMap() {
        return this.resourcesMap;
      }
    };
    PageDispatcher = class {
      #resourceTreeModel;
      constructor(resourceTreeModel) {
        this.#resourceTreeModel = resourceTreeModel;
      }
      backForwardCacheNotUsed(params) {
        this.#resourceTreeModel.onBackForwardCacheNotUsed(params);
      }
      domContentEventFired({ timestamp }) {
        this.#resourceTreeModel.dispatchEventToListeners(Events$6.DOMContentLoaded, timestamp);
      }
      loadEventFired({ timestamp }) {
        this.#resourceTreeModel.dispatchEventToListeners(Events$6.Load, { resourceTreeModel: this.#resourceTreeModel, loadTime: timestamp });
      }
      lifecycleEvent({ frameId, name }) {
        this.#resourceTreeModel.dispatchEventToListeners(Events$6.LifecycleEvent, { frameId, name });
      }
      frameAttached({ frameId, parentFrameId, stack }) {
        this.#resourceTreeModel.frameAttached(frameId, parentFrameId, stack);
      }
      frameNavigated({ frame, type: type2 }) {
        this.#resourceTreeModel.frameNavigated(frame, type2);
      }
      documentOpened({ frame }) {
        this.#resourceTreeModel.documentOpened(frame);
      }
      frameDetached({ frameId, reason }) {
        this.#resourceTreeModel.frameDetached(frameId, reason === "swap");
      }
      frameSubtreeWillBeDetached(_params) {
      }
      frameStartedLoading({}) {
      }
      frameStoppedLoading({}) {
      }
      frameRequestedNavigation({}) {
      }
      frameScheduledNavigation({}) {
      }
      frameClearedScheduledNavigation({}) {
      }
      frameStartedNavigating({}) {
      }
      navigatedWithinDocument({}) {
      }
      frameResized() {
        this.#resourceTreeModel.dispatchEventToListeners(Events$6.FrameResized);
      }
      javascriptDialogOpening(event) {
        this.#resourceTreeModel.dispatchEventToListeners(Events$6.JavaScriptDialogOpening, event);
        if (!event.hasBrowserHandler) {
          void this.#resourceTreeModel.agent.invoke_handleJavaScriptDialog({ accept: false });
        }
      }
      javascriptDialogClosed({}) {
      }
      screencastFrame({}) {
      }
      screencastVisibilityChanged({}) {
      }
      interstitialShown() {
        this.#resourceTreeModel.isInterstitialShowing = true;
        this.#resourceTreeModel.dispatchEventToListeners(Events$6.InterstitialShown);
      }
      interstitialHidden() {
        this.#resourceTreeModel.isInterstitialShowing = false;
        this.#resourceTreeModel.dispatchEventToListeners(Events$6.InterstitialHidden);
      }
      windowOpen({}) {
      }
      compilationCacheProduced({}) {
      }
      fileChooserOpened({}) {
      }
      downloadWillBegin({}) {
      }
      downloadProgress() {
      }
    };
    SDKModel.register(ResourceTreeModel, { capabilities: 2, autostart: true, early: true });
    UIStrings$_ = {
      scriptRemovedOrDeleted: "Script removed or deleted.",
      unableToFetchScriptSource: "Unable to fetch script source."
    };
    str_$Z = registerUIStrings("core/sdk/Script.ts", UIStrings$_);
    i18nString$H = getLocalizedString.bind(void 0, str_$Z);
    scriptCacheInstance = null;
    Script = class _Script {
      debuggerModel;
      scriptId;
      sourceURL;
      lineOffset;
      columnOffset;
      endLine;
      endColumn;
      executionContextId;
      hash;
      #isContentScript;
      #isLiveEdit;
      sourceMapURL;
      debugSymbols;
      hasSourceURL;
      contentLength;
      originStackTrace;
      #codeOffset;
      #language;
      #contentPromise;
      #embedderName;
      isModule;
      buildId;
      constructor(debuggerModel, scriptId, sourceURL, startLine, startColumn, endLine, endColumn, executionContextId, hash, isContentScript, isLiveEdit, sourceMapURL, hasSourceURL, length, isModule, originStackTrace, codeOffset, scriptLanguage, debugSymbols, embedderName, buildId) {
        this.debuggerModel = debuggerModel;
        this.scriptId = scriptId;
        this.sourceURL = sourceURL;
        this.lineOffset = startLine;
        this.columnOffset = startColumn;
        this.endLine = endLine;
        this.endColumn = endColumn;
        this.isModule = isModule;
        this.buildId = buildId;
        this.executionContextId = executionContextId;
        this.hash = hash;
        this.#isContentScript = isContentScript;
        this.#isLiveEdit = isLiveEdit;
        this.sourceMapURL = sourceMapURL;
        this.debugSymbols = debugSymbols;
        this.hasSourceURL = hasSourceURL;
        this.contentLength = length;
        this.originStackTrace = originStackTrace;
        this.#codeOffset = codeOffset;
        this.#language = scriptLanguage;
        this.#contentPromise = null;
        this.#embedderName = embedderName;
      }
      embedderName() {
        return this.#embedderName;
      }
      target() {
        return this.debuggerModel.target();
      }
      static trimSourceURLComment(source2) {
        let sourceURLIndex = source2.lastIndexOf("//# sourceURL=");
        if (sourceURLIndex === -1) {
          sourceURLIndex = source2.lastIndexOf("//@ sourceURL=");
          if (sourceURLIndex === -1) {
            return source2;
          }
        }
        const sourceURLLineIndex = source2.lastIndexOf("\n", sourceURLIndex);
        if (sourceURLLineIndex === -1) {
          return source2;
        }
        const sourceURLLine = source2.substr(sourceURLLineIndex + 1);
        if (!sourceURLLine.match(sourceURLRegex)) {
          return source2;
        }
        return source2.substr(0, sourceURLLineIndex);
      }
      isContentScript() {
        return this.#isContentScript;
      }
      codeOffset() {
        return this.#codeOffset;
      }
      isJavaScript() {
        return this.#language === "JavaScript";
      }
      isWasm() {
        return this.#language === "WebAssembly";
      }
      scriptLanguage() {
        return this.#language;
      }
      executionContext() {
        return this.debuggerModel.runtimeModel().executionContext(this.executionContextId);
      }
      isLiveEdit() {
        return this.#isLiveEdit;
      }
      contentURL() {
        return this.sourceURL;
      }
      contentType() {
        return resourceTypes.Script;
      }
      async loadTextContent() {
        const result = await this.debuggerModel.target().debuggerAgent().invoke_getScriptSource({ scriptId: this.scriptId });
        if (result.getError()) {
          throw new Error(result.getError());
        }
        const { scriptSource, bytecode } = result;
        if (bytecode) {
          return new ContentData(bytecode, true, "application/wasm");
        }
        let content = scriptSource || "";
        if (this.hasSourceURL && schemeIs2(this.sourceURL, "snippet:")) {
          content = _Script.trimSourceURLComment(content);
        }
        return new ContentData(content, false, "text/javascript");
      }
      async loadWasmContent() {
        if (!this.isWasm()) {
          throw new Error("Not a wasm script");
        }
        const result = await this.debuggerModel.target().debuggerAgent().invoke_disassembleWasmModule({ scriptId: this.scriptId });
        if (result.getError()) {
          const contentData = await this.loadTextContent();
          return await disassembleWasm(contentData.base64);
        }
        const { streamId, functionBodyOffsets, chunk: { lines, bytecodeOffsets } } = result;
        const lineChunks = [];
        const bytecodeOffsetChunks = [];
        let totalLength = lines.reduce((sum, line) => sum + line.length + 1, 0);
        const truncationMessage = "<truncated>";
        const cmSizeLimit = 1e9 - truncationMessage.length;
        if (streamId) {
          while (true) {
            const result2 = await this.debuggerModel.target().debuggerAgent().invoke_nextWasmDisassemblyChunk({ streamId });
            if (result2.getError()) {
              throw new Error(result2.getError());
            }
            const { chunk: { lines: linesChunk, bytecodeOffsets: bytecodeOffsetsChunk } } = result2;
            totalLength += linesChunk.reduce((sum, line) => sum + line.length + 1, 0);
            if (linesChunk.length === 0) {
              break;
            }
            if (totalLength >= cmSizeLimit) {
              lineChunks.push([truncationMessage]);
              bytecodeOffsetChunks.push([0]);
              break;
            }
            lineChunks.push(linesChunk);
            bytecodeOffsetChunks.push(bytecodeOffsetsChunk);
          }
        }
        const functionBodyRanges = [];
        for (let i = 0; i < functionBodyOffsets.length; i += 2) {
          functionBodyRanges.push({ start: functionBodyOffsets[i], end: functionBodyOffsets[i + 1] });
        }
        return new WasmDisassembly(lines.concat(...lineChunks), bytecodeOffsets.concat(...bytecodeOffsetChunks), functionBodyRanges);
      }
      requestContentData() {
        if (!this.#contentPromise) {
          const fileSizeToCache = 65535;
          if (this.hash && !this.#isLiveEdit && this.contentLength > fileSizeToCache) {
            if (!scriptCacheInstance) {
              scriptCacheInstance = {
                cache: /* @__PURE__ */ new Map(),
                registry: new FinalizationRegistry((hashCode2) => scriptCacheInstance?.cache.delete(hashCode2))
              };
            }
            const fullHash = [
              this.#language,
              this.contentLength,
              this.lineOffset,
              this.columnOffset,
              this.endLine,
              this.endColumn,
              this.#codeOffset,
              this.hash
            ].join(":");
            const cachedContentPromise = scriptCacheInstance.cache.get(fullHash)?.deref();
            if (cachedContentPromise) {
              this.#contentPromise = cachedContentPromise;
            } else {
              this.#contentPromise = this.#requestContent();
              scriptCacheInstance.cache.set(fullHash, new WeakRef(this.#contentPromise));
              scriptCacheInstance.registry.register(this.#contentPromise, fullHash);
            }
          } else {
            this.#contentPromise = this.#requestContent();
          }
        }
        return this.#contentPromise;
      }
      async #requestContent() {
        if (!this.scriptId) {
          return { error: i18nString$H(UIStrings$_.scriptRemovedOrDeleted) };
        }
        try {
          return this.isWasm() ? await this.loadWasmContent() : await this.loadTextContent();
        } catch {
          return { error: i18nString$H(UIStrings$_.unableToFetchScriptSource) };
        }
      }
      async getWasmBytecode() {
        const base642 = await this.debuggerModel.target().debuggerAgent().invoke_getWasmBytecode({ scriptId: this.scriptId });
        const response = await fetch(`data:application/wasm;base64,${base642.bytecode}`);
        return await response.arrayBuffer();
      }
      originalContentProvider() {
        return new StaticContentProvider(this.contentURL(), this.contentType(), () => this.requestContentData());
      }
      async searchInContent(query, caseSensitive, isRegex) {
        if (!this.scriptId) {
          return [];
        }
        const matches = await this.debuggerModel.target().debuggerAgent().invoke_searchInContent({ scriptId: this.scriptId, query, caseSensitive, isRegex });
        return performSearchInSearchMatches(matches.result || [], query, caseSensitive, isRegex);
      }
      appendSourceURLCommentIfNeeded(source2) {
        if (!this.hasSourceURL) {
          return source2;
        }
        return source2 + "\n //# sourceURL=" + this.sourceURL;
      }
      async editSource(newSource) {
        newSource = _Script.trimSourceURLComment(newSource);
        newSource = this.appendSourceURLCommentIfNeeded(newSource);
        const oldSource = ContentData.textOr(await this.requestContentData(), null);
        if (oldSource === newSource) {
          return { changed: false, status: "Ok" };
        }
        const response = await this.debuggerModel.target().debuggerAgent().invoke_setScriptSource({ scriptId: this.scriptId, scriptSource: newSource, allowTopFrameEditing: true });
        if (response.getError()) {
          throw new Error(`Script#editSource failed for script with id ${this.scriptId}: ${response.getError()}`);
        }
        if (!response.getError() && response.status === "Ok") {
          this.#contentPromise = Promise.resolve(new ContentData(newSource, false, "text/javascript"));
        }
        this.debuggerModel.dispatchEventToListeners(Events$5.ScriptSourceWasEdited, { script: this, status: response.status });
        return { changed: true, status: response.status, exceptionDetails: response.exceptionDetails };
      }
      rawLocation(lineNumber, columnNumber) {
        if (this.containsLocation(lineNumber, columnNumber)) {
          return new Location$1(this.debuggerModel, this.scriptId, lineNumber, columnNumber);
        }
        return null;
      }
      isInlineScript() {
        const startsAtZero = !this.lineOffset && !this.columnOffset;
        return !this.isWasm() && Boolean(this.sourceURL) && !startsAtZero;
      }
      isAnonymousScript() {
        return !this.sourceURL;
      }
      async setBlackboxedRanges(positions) {
        const response = await this.debuggerModel.target().debuggerAgent().invoke_setBlackboxedRanges({ scriptId: this.scriptId, positions });
        return !response.getError();
      }
      containsLocation(lineNumber, columnNumber) {
        const afterStart = lineNumber === this.lineOffset && columnNumber >= this.columnOffset || lineNumber > this.lineOffset;
        const beforeEnd = lineNumber < this.endLine || lineNumber === this.endLine && columnNumber <= this.endColumn;
        return afterStart && beforeEnd;
      }
      get frameId() {
        if (typeof this[frameIdSymbol] !== "string") {
          this[frameIdSymbol] = frameIdForScript(this);
        }
        return this[frameIdSymbol];
      }
      get isBreakpointCondition() {
        return [COND_BREAKPOINT_SOURCE_URL, LOGPOINT_SOURCE_URL].includes(this.sourceURL);
      }
      sourceMap() {
        return this.debuggerModel.sourceMapManager().sourceMapForClient(this);
      }
      createPageResourceLoadInitiator() {
        return { target: this.target(), frameId: this.frameId, initiatorUrl: this.embedderName() };
      }
      debugId() {
        return this.buildId;
      }
      rawLocationToRelativeLocation(rawLocation) {
        let { lineNumber, columnNumber } = rawLocation;
        if (!this.hasSourceURL && this.isInlineScript()) {
          lineNumber -= this.lineOffset;
          if (lineNumber === 0 && columnNumber !== void 0) {
            columnNumber -= this.columnOffset;
          }
        }
        return { lineNumber, columnNumber };
      }
      relativeLocationToRawLocation(relativeLocation) {
        let { lineNumber, columnNumber } = relativeLocation;
        if (!this.hasSourceURL && this.isInlineScript()) {
          if (lineNumber === 0 && columnNumber !== void 0) {
            columnNumber += this.columnOffset;
          }
          lineNumber += this.lineOffset;
        }
        return { lineNumber, columnNumber };
      }
    };
    frameIdSymbol = Symbol("frameid");
    sourceURLRegex = /^[\x20\t]*\/\/[@#] sourceURL=\s*(\S*?)\s*$/;
    UIStrings$Z = {
      local: "Local",
      closure: "Closure",
      block: "Block",
      script: "Script",
      withBlock: "`With` block",
      catchBlock: "`Catch` block",
      global: "Global",
      module: "Module",
      expression: "Expression",
      exception: "Exception",
      returnValue: "Return value"
    };
    str_$Y = registerUIStrings("core/sdk/DebuggerModel.ts", UIStrings$Z);
    i18nString$G = getLocalizedString.bind(void 0, str_$Y);
    WASM_SYMBOLS_PRIORITY = [
      "ExternalDWARF",
      "EmbeddedDWARF",
      "SourceMap"
    ];
    DebuggerModel = class _DebuggerModel extends SDKModel {
      agent;
      #runtimeModel;
      #sourceMapManager;
      #debuggerPausedDetails = null;
      #scripts = /* @__PURE__ */ new Map();
      #scriptsBySourceURL = /* @__PURE__ */ new Map();
      #discardableScripts = [];
      continueToLocationCallback = null;
      #selectedCallFrame = null;
      #debuggerEnabled = false;
      #debuggerId = null;
      #skipAllPausesTimeout = 0;
      #beforePausedCallback = null;
      #computeAutoStepRangesCallback = null;
      evaluateOnCallFrameCallback = null;
      #synchronizeBreakpointsCallback = null;
      #breakpointResolvedEventTarget = new ObjectWrapper();
      #autoSteppingContext = null;
      #isPausing = false;
      constructor(target) {
        super(target);
        target.registerDebuggerDispatcher(new DebuggerDispatcher(this));
        this.agent = target.debuggerAgent();
        this.#runtimeModel = target.model(RuntimeModel);
        this.#sourceMapManager = new SourceMapManager(target, (compiledURL, sourceMappingURL, payload, script) => new SourceMap(compiledURL, sourceMappingURL, payload, script));
        Settings.instance().moduleSetting("pause-on-exception-enabled").addChangeListener(this.pauseOnExceptionStateChanged, this);
        Settings.instance().moduleSetting("pause-on-caught-exception").addChangeListener(this.pauseOnExceptionStateChanged, this);
        Settings.instance().moduleSetting("pause-on-uncaught-exception").addChangeListener(this.pauseOnExceptionStateChanged, this);
        Settings.instance().moduleSetting("disable-async-stack-traces").addChangeListener(this.asyncStackTracesStateChanged, this);
        Settings.instance().moduleSetting("breakpoints-active").addChangeListener(this.breakpointsActiveChanged, this);
        if (!target.suspended()) {
          void this.enableDebugger();
        }
        this.#sourceMapManager.setEnabled(Settings.instance().moduleSetting("js-source-maps-enabled").get());
        Settings.instance().moduleSetting("js-source-maps-enabled").addChangeListener((event) => this.#sourceMapManager.setEnabled(event.data));
        const resourceTreeModel = target.model(ResourceTreeModel);
        if (resourceTreeModel) {
          resourceTreeModel.addEventListener(Events$6.FrameNavigated, this.onFrameNavigated, this);
        }
      }
      static selectSymbolSource(debugSymbols) {
        if (!debugSymbols || debugSymbols.length === 0) {
          return null;
        }
        if ("type" in debugSymbols) {
          if (debugSymbols.type === "None") {
            return null;
          }
          return debugSymbols;
        }
        let debugSymbolsSource = null;
        const symbolTypes = new Map(debugSymbols.map((symbol) => [symbol.type, symbol]));
        for (const symbol of WASM_SYMBOLS_PRIORITY) {
          if (symbolTypes.has(symbol)) {
            debugSymbolsSource = symbolTypes.get(symbol) || null;
            break;
          }
        }
        console.assert(debugSymbolsSource !== null, "Unknown symbol types. Front-end and back-end should be kept in sync regarding Protocol.Debugger.DebugSymbolTypes");
        if (debugSymbolsSource && debugSymbols.length > 1) {
          Console.instance().warn(`Multiple debug symbols for script were found. Using ${debugSymbolsSource.type}`);
        }
        return debugSymbolsSource;
      }
      sourceMapManager() {
        return this.#sourceMapManager;
      }
      runtimeModel() {
        return this.#runtimeModel;
      }
      debuggerEnabled() {
        return Boolean(this.#debuggerEnabled);
      }
      debuggerId() {
        return this.#debuggerId;
      }
      async enableDebugger() {
        if (this.#debuggerEnabled) {
          return;
        }
        this.#debuggerEnabled = true;
        const maxScriptsCacheSize = 1e8;
        const enablePromise = this.agent.invoke_enable({ maxScriptsCacheSize });
        let instrumentationPromise;
        if (experiments.isEnabled(ExperimentName.INSTRUMENTATION_BREAKPOINTS)) {
          instrumentationPromise = this.agent.invoke_setInstrumentationBreakpoint({
            instrumentation: "beforeScriptExecution"
          });
        }
        this.pauseOnExceptionStateChanged();
        void this.asyncStackTracesStateChanged();
        if (!Settings.instance().moduleSetting("breakpoints-active").get()) {
          this.breakpointsActiveChanged();
        }
        this.dispatchEventToListeners(Events$5.DebuggerWasEnabled, this);
        const [enableResult] = await Promise.all([enablePromise, instrumentationPromise]);
        this.registerDebugger(enableResult);
      }
      async syncDebuggerId() {
        const maxScriptsCacheSize = 1e8;
        const enablePromise = this.agent.invoke_enable({ maxScriptsCacheSize });
        void enablePromise.then(this.registerDebugger.bind(this));
        return await enablePromise;
      }
      onFrameNavigated() {
        if (_DebuggerModel.shouldResyncDebuggerId) {
          return;
        }
        _DebuggerModel.shouldResyncDebuggerId = true;
      }
      registerDebugger(response) {
        if (response.getError()) {
          this.#debuggerEnabled = false;
          return;
        }
        const { debuggerId } = response;
        debuggerIdToModel.set(debuggerId, this);
        this.#debuggerId = debuggerId;
        this.dispatchEventToListeners(Events$5.DebuggerIsReadyToPause, this);
      }
      isReadyToPause() {
        return Boolean(this.#debuggerId);
      }
      static async modelForDebuggerId(debuggerId) {
        if (_DebuggerModel.shouldResyncDebuggerId) {
          await _DebuggerModel.resyncDebuggerIdForModels();
          _DebuggerModel.shouldResyncDebuggerId = false;
        }
        return debuggerIdToModel.get(debuggerId) || null;
      }
      static async resyncDebuggerIdForModels() {
        const dbgModels = debuggerIdToModel.values();
        for (const dbgModel of dbgModels) {
          if (dbgModel.debuggerEnabled()) {
            await dbgModel.syncDebuggerId();
          }
        }
      }
      async disableDebugger() {
        if (!this.#debuggerEnabled) {
          return;
        }
        this.#debuggerEnabled = false;
        await this.asyncStackTracesStateChanged();
        await this.agent.invoke_disable();
        this.#isPausing = false;
        this.globalObjectCleared();
        this.dispatchEventToListeners(Events$5.DebuggerWasDisabled, this);
        if (typeof this.#debuggerId === "string") {
          debuggerIdToModel.delete(this.#debuggerId);
        }
        this.#debuggerId = null;
      }
      skipAllPauses(skip) {
        if (this.#skipAllPausesTimeout) {
          clearTimeout(this.#skipAllPausesTimeout);
          this.#skipAllPausesTimeout = 0;
        }
        void this.agent.invoke_setSkipAllPauses({ skip });
      }
      skipAllPausesUntilReloadOrTimeout(timeout2) {
        if (this.#skipAllPausesTimeout) {
          clearTimeout(this.#skipAllPausesTimeout);
        }
        void this.agent.invoke_setSkipAllPauses({ skip: true });
        this.#skipAllPausesTimeout = window.setTimeout(this.skipAllPauses.bind(this, false), timeout2);
      }
      pauseOnExceptionStateChanged() {
        const pauseOnCaughtEnabled = Settings.instance().moduleSetting("pause-on-caught-exception").get();
        let state;
        const pauseOnUncaughtEnabled = Settings.instance().moduleSetting("pause-on-uncaught-exception").get();
        if (pauseOnCaughtEnabled && pauseOnUncaughtEnabled) {
          state = "all";
        } else if (pauseOnCaughtEnabled) {
          state = "caught";
        } else if (pauseOnUncaughtEnabled) {
          state = "uncaught";
        } else {
          state = "none";
        }
        void this.agent.invoke_setPauseOnExceptions({ state });
      }
      asyncStackTracesStateChanged() {
        const maxAsyncStackChainDepth = 32;
        const enabled = !Settings.instance().moduleSetting("disable-async-stack-traces").get() && this.#debuggerEnabled;
        const maxDepth = enabled ? maxAsyncStackChainDepth : 0;
        return this.agent.invoke_setAsyncCallStackDepth({ maxDepth });
      }
      breakpointsActiveChanged() {
        void this.agent.invoke_setBreakpointsActive({ active: Settings.instance().moduleSetting("breakpoints-active").get() });
      }
      setComputeAutoStepRangesCallback(callback) {
        this.#computeAutoStepRangesCallback = callback;
      }
      async computeAutoStepSkipList(mode2) {
        let ranges = [];
        if (this.#computeAutoStepRangesCallback && this.#debuggerPausedDetails && this.#debuggerPausedDetails.callFrames.length > 0) {
          const [callFrame] = this.#debuggerPausedDetails.callFrames;
          ranges = await this.#computeAutoStepRangesCallback.call(null, mode2, callFrame);
        }
        const skipList = ranges.map(({ start, end }) => ({
          scriptId: start.scriptId,
          start: { lineNumber: start.lineNumber, columnNumber: start.columnNumber },
          end: { lineNumber: end.lineNumber, columnNumber: end.columnNumber }
        }));
        return sortAndMergeRanges(skipList);
      }
      async stepInto() {
        const skipList = await this.computeAutoStepSkipList("StepInto");
        void this.agent.invoke_stepInto({ breakOnAsyncCall: false, skipList });
      }
      async stepOver() {
        this.#autoSteppingContext = this.#debuggerPausedDetails?.callFrames[0]?.functionLocation() ?? null;
        const skipList = await this.computeAutoStepSkipList("StepOver");
        void this.agent.invoke_stepOver({ skipList });
      }
      async stepOut() {
        const skipList = await this.computeAutoStepSkipList("StepOut");
        if (skipList.length !== 0) {
          void this.agent.invoke_stepOver({ skipList });
        } else {
          void this.agent.invoke_stepOut();
        }
      }
      scheduleStepIntoAsync() {
        void this.computeAutoStepSkipList("StepInto").then((skipList) => {
          void this.agent.invoke_stepInto({ breakOnAsyncCall: true, skipList });
        });
      }
      resume() {
        void this.agent.invoke_resume({ terminateOnResume: false });
        this.#isPausing = false;
      }
      pause() {
        this.#isPausing = true;
        this.skipAllPauses(false);
        void this.agent.invoke_pause();
      }
      async setBreakpointByURL(url, lineNumber, columnNumber, condition) {
        let minColumnNumber = 0;
        const scripts = this.#scriptsBySourceURL.get(url) || [];
        for (let i = 0, l = scripts.length; i < l; ++i) {
          const script = scripts[i];
          if (lineNumber === script.lineOffset) {
            minColumnNumber = minColumnNumber ? Math.min(minColumnNumber, script.columnOffset) : script.columnOffset;
          }
        }
        columnNumber = Math.max(columnNumber || 0, minColumnNumber);
        const response = await this.agent.invoke_setBreakpointByUrl({
          lineNumber,
          url,
          columnNumber,
          condition
        });
        if (response.getError()) {
          return { locations: [], breakpointId: null };
        }
        let locations = [];
        if (response.locations) {
          locations = response.locations.map((payload) => Location$1.fromPayload(this, payload));
        }
        return { locations, breakpointId: response.breakpointId };
      }
      async setBreakpointInAnonymousScript(scriptHash, lineNumber, columnNumber, condition) {
        const response = await this.agent.invoke_setBreakpointByUrl({ lineNumber, scriptHash, columnNumber, condition });
        if (response.getError()) {
          return { locations: [], breakpointId: null };
        }
        let locations = [];
        if (response.locations) {
          locations = response.locations.map((payload) => Location$1.fromPayload(this, payload));
        }
        return { locations, breakpointId: response.breakpointId };
      }
      async removeBreakpoint(breakpointId) {
        await this.agent.invoke_removeBreakpoint({ breakpointId });
      }
      async getPossibleBreakpoints(startLocation, endLocation, restrictToFunction) {
        const response = await this.agent.invoke_getPossibleBreakpoints({
          start: startLocation.payload(),
          end: endLocation ? endLocation.payload() : void 0,
          restrictToFunction
        });
        if (response.getError() || !response.locations) {
          return [];
        }
        return response.locations.map((location) => BreakLocation.fromPayload(this, location));
      }
      async fetchAsyncStackTrace(stackId) {
        const response = await this.agent.invoke_getStackTrace({ stackTraceId: stackId });
        return response.getError() ? null : response.stackTrace;
      }
      breakpointResolved(breakpointId, location) {
        this.#breakpointResolvedEventTarget.dispatchEventToListeners(breakpointId, Location$1.fromPayload(this, location));
      }
      globalObjectCleared() {
        this.resetDebuggerPausedDetails();
        this.reset();
        this.dispatchEventToListeners(Events$5.GlobalObjectCleared, this);
      }
      reset() {
        for (const script of this.#scripts.values()) {
          this.#sourceMapManager.detachSourceMap(script);
        }
        this.#scripts.clear();
        this.#scriptsBySourceURL.clear();
        this.#discardableScripts = [];
        this.#autoSteppingContext = null;
      }
      scripts() {
        return Array.from(this.#scripts.values());
      }
      scriptForId(scriptId) {
        return this.#scripts.get(scriptId) || null;
      }
      scriptsForSourceURL(sourceURL) {
        return this.#scriptsBySourceURL.get(sourceURL) || [];
      }
      scriptsForExecutionContext(executionContext) {
        const result = [];
        for (const script of this.#scripts.values()) {
          if (script.executionContextId === executionContext.id) {
            result.push(script);
          }
        }
        return result;
      }
      get callFrames() {
        return this.#debuggerPausedDetails ? this.#debuggerPausedDetails.callFrames : null;
      }
      debuggerPausedDetails() {
        return this.#debuggerPausedDetails;
      }
      async setDebuggerPausedDetails(debuggerPausedDetails) {
        this.#isPausing = false;
        this.#debuggerPausedDetails = debuggerPausedDetails;
        if (this.#beforePausedCallback) {
          if (!await this.#beforePausedCallback.call(null, debuggerPausedDetails, this.#autoSteppingContext)) {
            return false;
          }
        }
        this.#autoSteppingContext = null;
        this.dispatchEventToListeners(Events$5.DebuggerPaused, this);
        this.setSelectedCallFrame(debuggerPausedDetails.callFrames[0]);
        return true;
      }
      resetDebuggerPausedDetails() {
        this.#isPausing = false;
        this.#debuggerPausedDetails = null;
        this.setSelectedCallFrame(null);
      }
      setBeforePausedCallback(callback) {
        this.#beforePausedCallback = callback;
      }
      setEvaluateOnCallFrameCallback(callback) {
        this.evaluateOnCallFrameCallback = callback;
      }
      setSynchronizeBreakpointsCallback(callback) {
        this.#synchronizeBreakpointsCallback = callback;
      }
      async pausedScript(callFrames, reason, auxData, breakpointIds, asyncStackTrace, asyncStackTraceId) {
        if (reason === "instrumentation") {
          const script = this.scriptForId(auxData.scriptId);
          if (this.#synchronizeBreakpointsCallback && script) {
            await this.#synchronizeBreakpointsCallback(script);
          }
          this.resume();
          return;
        }
        const pausedDetails = new DebuggerPausedDetails(this, callFrames, reason, auxData, breakpointIds, asyncStackTrace, asyncStackTraceId);
        if (this.continueToLocationCallback) {
          const callback = this.continueToLocationCallback;
          this.continueToLocationCallback = null;
          if (callback(pausedDetails)) {
            return;
          }
        }
        if (!await this.setDebuggerPausedDetails(pausedDetails)) {
          if (this.#autoSteppingContext) {
            void this.stepOver();
          } else {
            void this.stepInto();
          }
        } else {
          fireEvent("DevTools.DebuggerPaused");
        }
      }
      resumedScript() {
        this.resetDebuggerPausedDetails();
        this.dispatchEventToListeners(Events$5.DebuggerResumed, this);
      }
      parsedScriptSource(scriptId, sourceURL, startLine, startColumn, endLine, endColumn, executionContextId, hash, executionContextAuxData, isLiveEdit, sourceMapURL, hasSourceURLComment, hasSyntaxError, length, isModule, originStackTrace, codeOffset, scriptLanguage, debugSymbols, embedderName, buildId) {
        const knownScript = this.#scripts.get(scriptId);
        if (knownScript) {
          return knownScript;
        }
        let isContentScript = false;
        if (executionContextAuxData && "isDefault" in executionContextAuxData) {
          isContentScript = !executionContextAuxData["isDefault"];
        }
        const selectedDebugSymbol = _DebuggerModel.selectSymbolSource(debugSymbols);
        const script = new Script(this, scriptId, sourceURL, startLine, startColumn, endLine, endColumn, executionContextId, hash, isContentScript, isLiveEdit, sourceMapURL, hasSourceURLComment, length, isModule, originStackTrace, codeOffset, scriptLanguage, selectedDebugSymbol, embedderName, buildId);
        this.registerScript(script);
        this.dispatchEventToListeners(Events$5.ParsedScriptSource, script);
        if ((!selectedDebugSymbol || selectedDebugSymbol.type === "SourceMap") && script.sourceMapURL && !hasSyntaxError) {
          this.#sourceMapManager.attachSourceMap(script, script.sourceURL, script.sourceMapURL);
        }
        const isDiscardable = hasSyntaxError && script.isAnonymousScript();
        if (isDiscardable) {
          this.#discardableScripts.push(script);
          this.collectDiscardedScripts();
        }
        return script;
      }
      setSourceMapURL(script, newSourceMapURL) {
        this.#sourceMapManager.detachSourceMap(script);
        script.sourceMapURL = newSourceMapURL;
        this.#sourceMapManager.attachSourceMap(script, script.sourceURL, script.sourceMapURL);
      }
      async setDebugInfoURL(script, _externalURL) {
        this.dispatchEventToListeners(Events$5.DebugInfoAttached, script);
      }
      executionContextDestroyed(executionContext) {
        for (const script of this.#scripts.values()) {
          if (script.executionContextId === executionContext.id) {
            this.#sourceMapManager.detachSourceMap(script);
          }
        }
      }
      registerScript(script) {
        this.#scripts.set(script.scriptId, script);
        if (script.isAnonymousScript()) {
          return;
        }
        let scripts = this.#scriptsBySourceURL.get(script.sourceURL);
        if (!scripts) {
          scripts = [];
          this.#scriptsBySourceURL.set(script.sourceURL, scripts);
        }
        scripts.unshift(script);
      }
      unregisterScript(script) {
        console.assert(script.isAnonymousScript());
        this.#scripts.delete(script.scriptId);
      }
      collectDiscardedScripts() {
        if (this.#discardableScripts.length < 1e3) {
          return;
        }
        const scriptsToDiscard = this.#discardableScripts.splice(0, 100);
        for (const script of scriptsToDiscard) {
          this.unregisterScript(script);
          this.dispatchEventToListeners(Events$5.DiscardedAnonymousScriptSource, script);
        }
      }
      createRawLocation(script, lineNumber, columnNumber, inlineFrameIndex) {
        return this.createRawLocationByScriptId(script.scriptId, lineNumber, columnNumber, inlineFrameIndex);
      }
      createRawLocationByURL(sourceURL, lineNumber, columnNumber, inlineFrameIndex) {
        for (const script of this.#scriptsBySourceURL.get(sourceURL) || []) {
          if (script.lineOffset > lineNumber || script.lineOffset === lineNumber && columnNumber !== void 0 && script.columnOffset > columnNumber) {
            continue;
          }
          if (script.endLine < lineNumber || script.endLine === lineNumber && columnNumber !== void 0 && script.endColumn <= columnNumber) {
            continue;
          }
          return new Location$1(this, script.scriptId, lineNumber, columnNumber, inlineFrameIndex);
        }
        return null;
      }
      createRawLocationByScriptId(scriptId, lineNumber, columnNumber, inlineFrameIndex) {
        return new Location$1(this, scriptId, lineNumber, columnNumber, inlineFrameIndex);
      }
      createRawLocationsByStackTrace(stackTrace) {
        const rawLocations = [];
        for (let current = stackTrace; current; current = current.parent) {
          for (const { scriptId, lineNumber, columnNumber } of current.callFrames) {
            rawLocations.push(this.createRawLocationByScriptId(scriptId, lineNumber, columnNumber));
          }
        }
        return rawLocations;
      }
      isPaused() {
        return Boolean(this.debuggerPausedDetails());
      }
      isPausing() {
        return this.#isPausing;
      }
      setSelectedCallFrame(callFrame) {
        if (this.#selectedCallFrame === callFrame) {
          return;
        }
        this.#selectedCallFrame = callFrame;
        this.dispatchEventToListeners(Events$5.CallFrameSelected, this);
      }
      selectedCallFrame() {
        return this.#selectedCallFrame;
      }
      async evaluateOnSelectedCallFrame(options2) {
        const callFrame = this.selectedCallFrame();
        if (!callFrame) {
          throw new Error("No call frame selected");
        }
        return await callFrame.evaluate(options2);
      }
      functionDetailsPromise(remoteObject) {
        return remoteObject.getAllProperties(false, false).then(buildDetails.bind(this));
        function buildDetails(response) {
          if (!response) {
            return null;
          }
          let location = null;
          if (response.internalProperties) {
            for (const prop of response.internalProperties) {
              if (prop.name === "[[FunctionLocation]]") {
                location = prop.value;
              }
            }
          }
          let functionName2 = null;
          if (response.properties) {
            for (const prop of response.properties) {
              if (prop.name === "name" && prop.value?.type === "string") {
                functionName2 = prop.value;
              }
            }
          }
          let debuggerLocation = null;
          if (location) {
            debuggerLocation = this.createRawLocationByScriptId(location.value.scriptId, location.value.lineNumber, location.value.columnNumber);
          }
          return { location: debuggerLocation, functionName: functionName2 ? functionName2.value : "" };
        }
      }
      async setVariableValue(scopeNumber, variableName, newValue, callFrameId) {
        const response = await this.agent.invoke_setVariableValue({ scopeNumber, variableName, newValue, callFrameId });
        const error = response.getError();
        return error;
      }
      addBreakpointListener(breakpointId, listener, thisObject) {
        this.#breakpointResolvedEventTarget.addEventListener(breakpointId, listener, thisObject);
      }
      removeBreakpointListener(breakpointId, listener, thisObject) {
        this.#breakpointResolvedEventTarget.removeEventListener(breakpointId, listener, thisObject);
      }
      async setBlackboxPatterns(patterns, skipAnonymous) {
        const response = await this.agent.invoke_setBlackboxPatterns({ patterns, skipAnonymous });
        const error = response.getError();
        return !error;
      }
      async setBlackboxExecutionContexts(uniqueIds) {
        const response = await this.agent.invoke_setBlackboxExecutionContexts({ uniqueIds });
        const error = response.getError();
        return !error;
      }
      dispose() {
        if (this.#debuggerId) {
          debuggerIdToModel.delete(this.#debuggerId);
        }
        Settings.instance().moduleSetting("pause-on-exception-enabled").removeChangeListener(this.pauseOnExceptionStateChanged, this);
        Settings.instance().moduleSetting("pause-on-caught-exception").removeChangeListener(this.pauseOnExceptionStateChanged, this);
        Settings.instance().moduleSetting("disable-async-stack-traces").removeChangeListener(this.asyncStackTracesStateChanged, this);
      }
      async suspendModel() {
        await this.disableDebugger();
      }
      async resumeModel() {
        await this.enableDebugger();
      }
      static shouldResyncDebuggerId = false;
      getEvaluateOnCallFrameCallback() {
        return this.evaluateOnCallFrameCallback;
      }
      async *iterateAsyncParents(stackTraceOrPausedDetails) {
        const isPausedDetails = (details) => !("parent" in details) && !("parentId" in details);
        let stackTrace = isPausedDetails(stackTraceOrPausedDetails) ? {
          callFrames: [],
          parent: stackTraceOrPausedDetails.asyncStackTrace,
          parentId: stackTraceOrPausedDetails.asyncStackTraceId
        } : stackTraceOrPausedDetails;
        let target = this.target();
        while (true) {
          if (stackTrace.parent) {
            stackTrace = stackTrace.parent;
          } else if (stackTrace.parentId) {
            const model3 = stackTrace.parentId.debuggerId ? await _DebuggerModel.modelForDebuggerId(stackTrace.parentId.debuggerId) : this;
            if (!model3) {
              return;
            }
            const maybeStackTrace = await model3.fetchAsyncStackTrace(stackTrace.parentId);
            if (!maybeStackTrace) {
              return;
            }
            stackTrace = maybeStackTrace;
            target = model3.target();
          } else {
            return;
          }
          yield { stackTrace, target };
        }
      }
    };
    debuggerIdToModel = /* @__PURE__ */ new Map();
    (function(PauseOnExceptionsState2) {
      PauseOnExceptionsState2["DontPauseOnExceptions"] = "none";
      PauseOnExceptionsState2["PauseOnAllExceptions"] = "all";
      PauseOnExceptionsState2["PauseOnCaughtExceptions"] = "caught";
      PauseOnExceptionsState2["PauseOnUncaughtExceptions"] = "uncaught";
    })(PauseOnExceptionsState || (PauseOnExceptionsState = {}));
    (function(Events2) {
      Events2["DebuggerWasEnabled"] = "DebuggerWasEnabled";
      Events2["DebuggerWasDisabled"] = "DebuggerWasDisabled";
      Events2["DebuggerPaused"] = "DebuggerPaused";
      Events2["DebuggerResumed"] = "DebuggerResumed";
      Events2["DebugInfoAttached"] = "DebugInfoAttached";
      Events2["ParsedScriptSource"] = "ParsedScriptSource";
      Events2["DiscardedAnonymousScriptSource"] = "DiscardedAnonymousScriptSource";
      Events2["GlobalObjectCleared"] = "GlobalObjectCleared";
      Events2["CallFrameSelected"] = "CallFrameSelected";
      Events2["DebuggerIsReadyToPause"] = "DebuggerIsReadyToPause";
      Events2["ScriptSourceWasEdited"] = "ScriptSourceWasEdited";
    })(Events$5 || (Events$5 = {}));
    DebuggerDispatcher = class {
      #debuggerModel;
      constructor(debuggerModel) {
        this.#debuggerModel = debuggerModel;
      }
      paused({ callFrames, reason, data: data32, hitBreakpoints, asyncStackTrace, asyncStackTraceId }) {
        if (!this.#debuggerModel.debuggerEnabled()) {
          return;
        }
        void this.#debuggerModel.pausedScript(callFrames, reason, data32, hitBreakpoints || [], asyncStackTrace, asyncStackTraceId);
      }
      resumed() {
        if (!this.#debuggerModel.debuggerEnabled()) {
          return;
        }
        this.#debuggerModel.resumedScript();
      }
      scriptParsed({ scriptId, url, startLine, startColumn, endLine, endColumn, executionContextId, hash, executionContextAuxData, isLiveEdit, sourceMapURL, hasSourceURL, length, isModule, stackTrace, codeOffset, scriptLanguage, debugSymbols, embedderName, buildId }) {
        if (!this.#debuggerModel.debuggerEnabled()) {
          return;
        }
        this.#debuggerModel.parsedScriptSource(scriptId, url, startLine, startColumn, endLine, endColumn, executionContextId, hash, executionContextAuxData, Boolean(isLiveEdit), sourceMapURL, Boolean(hasSourceURL), false, length || 0, isModule || null, stackTrace || null, codeOffset || null, scriptLanguage || null, debugSymbols || null, embedderName || null, buildId || null);
      }
      scriptFailedToParse({ scriptId, url, startLine, startColumn, endLine, endColumn, executionContextId, hash, executionContextAuxData, sourceMapURL, hasSourceURL, length, isModule, stackTrace, codeOffset, scriptLanguage, embedderName, buildId }) {
        if (!this.#debuggerModel.debuggerEnabled()) {
          return;
        }
        this.#debuggerModel.parsedScriptSource(scriptId, url, startLine, startColumn, endLine, endColumn, executionContextId, hash, executionContextAuxData, false, sourceMapURL, Boolean(hasSourceURL), true, length || 0, isModule || null, stackTrace || null, codeOffset || null, scriptLanguage || null, null, embedderName || null, buildId || null);
      }
      breakpointResolved({ breakpointId, location }) {
        if (!this.#debuggerModel.debuggerEnabled()) {
          return;
        }
        this.#debuggerModel.breakpointResolved(breakpointId, location);
      }
    };
    Location$1 = class Location {
      debuggerModel;
      scriptId;
      lineNumber;
      columnNumber;
      inlineFrameIndex;
      constructor(debuggerModel, scriptId, lineNumber, columnNumber, inlineFrameIndex) {
        this.debuggerModel = debuggerModel;
        this.scriptId = scriptId;
        this.lineNumber = lineNumber;
        this.columnNumber = columnNumber || 0;
        this.inlineFrameIndex = inlineFrameIndex || 0;
      }
      static fromPayload(debuggerModel, payload, inlineFrameIndex) {
        return new Location(debuggerModel, payload.scriptId, payload.lineNumber, payload.columnNumber, inlineFrameIndex);
      }
      payload() {
        return { scriptId: this.scriptId, lineNumber: this.lineNumber, columnNumber: this.columnNumber };
      }
      script() {
        return this.debuggerModel.scriptForId(this.scriptId);
      }
      continueToLocation(pausedCallback) {
        if (pausedCallback) {
          this.debuggerModel.continueToLocationCallback = this.paused.bind(this, pausedCallback);
        }
        void this.debuggerModel.agent.invoke_continueToLocation({
          location: this.payload(),
          targetCallFrames: "current"
        });
      }
      paused(pausedCallback, debuggerPausedDetails) {
        const location = debuggerPausedDetails.callFrames[0].location();
        if (location.scriptId === this.scriptId && location.lineNumber === this.lineNumber && location.columnNumber === this.columnNumber) {
          pausedCallback();
          return true;
        }
        return false;
      }
      id() {
        return this.debuggerModel.target().id() + ":" + this.scriptId + ":" + this.lineNumber + ":" + this.columnNumber;
      }
    };
    BreakLocation = class _BreakLocation extends Location$1 {
      type;
      constructor(debuggerModel, scriptId, lineNumber, columnNumber, type2) {
        super(debuggerModel, scriptId, lineNumber, columnNumber);
        if (type2) {
          this.type = type2;
        }
      }
      static fromPayload(debuggerModel, payload) {
        return new _BreakLocation(debuggerModel, payload.scriptId, payload.lineNumber, payload.columnNumber, payload.type);
      }
    };
    CallFrame = class _CallFrame {
      debuggerModel;
      script;
      payload;
      #location;
      #scopeChain;
      #localScope;
      inlineFrameIndex;
      functionName;
      #functionLocation;
      #returnValue;
      exception;
      canBeRestarted;
      constructor(debuggerModel, script, payload, inlineFrameIndex, functionName2, exception = null) {
        this.debuggerModel = debuggerModel;
        this.script = script;
        this.payload = payload;
        this.#location = Location$1.fromPayload(debuggerModel, payload.location, inlineFrameIndex);
        this.#scopeChain = [];
        this.#localScope = null;
        this.inlineFrameIndex = inlineFrameIndex || 0;
        this.functionName = functionName2 ?? payload.functionName;
        this.canBeRestarted = Boolean(payload.canBeRestarted);
        this.exception = exception;
        for (let i = 0; i < payload.scopeChain.length; ++i) {
          const scope2 = new Scope2(this, i);
          this.#scopeChain.push(scope2);
          if (scope2.type() === "local") {
            this.#localScope = scope2;
          }
        }
        if (payload.functionLocation) {
          this.#functionLocation = Location$1.fromPayload(debuggerModel, payload.functionLocation);
        }
        this.#returnValue = payload.returnValue ? this.debuggerModel.runtimeModel().createRemoteObject(payload.returnValue) : null;
      }
      static fromPayloadArray(debuggerModel, callFrames, exception) {
        const result = [];
        for (let i = 0; i < callFrames.length; ++i) {
          const callFrame = callFrames[i];
          const script = debuggerModel.scriptForId(callFrame.location.scriptId);
          if (script) {
            const ex = i === 0 ? exception : null;
            result.push(new _CallFrame(debuggerModel, script, callFrame, void 0, void 0, ex));
          }
        }
        return result;
      }
      createVirtualCallFrame(inlineFrameIndex, name) {
        return new _CallFrame(this.debuggerModel, this.script, this.payload, inlineFrameIndex, name, this.exception);
      }
      get id() {
        return this.payload.callFrameId;
      }
      scopeChain() {
        return this.#scopeChain;
      }
      localScope() {
        return this.#localScope;
      }
      thisObject() {
        return this.payload.this ? this.debuggerModel.runtimeModel().createRemoteObject(this.payload.this) : null;
      }
      returnValue() {
        return this.#returnValue;
      }
      async setReturnValue(expression) {
        if (!this.#returnValue) {
          return null;
        }
        const evaluateResponse = await this.debuggerModel.agent.invoke_evaluateOnCallFrame({ callFrameId: this.id, expression, silent: true, objectGroup: "backtrace" });
        if (evaluateResponse.getError() || evaluateResponse.exceptionDetails) {
          return null;
        }
        const response = await this.debuggerModel.agent.invoke_setReturnValue({ newValue: evaluateResponse.result });
        if (response.getError()) {
          return null;
        }
        this.#returnValue = this.debuggerModel.runtimeModel().createRemoteObject(evaluateResponse.result);
        return this.#returnValue;
      }
      location() {
        return this.#location;
      }
      functionLocation() {
        return this.#functionLocation || null;
      }
      async evaluate(options2) {
        const debuggerModel = this.debuggerModel;
        const runtimeModel = debuggerModel.runtimeModel();
        const evaluateOnCallFrameCallback = debuggerModel.getEvaluateOnCallFrameCallback();
        if (evaluateOnCallFrameCallback) {
          const result = await evaluateOnCallFrameCallback(this, options2);
          if (result) {
            return result;
          }
        }
        const response = await this.debuggerModel.agent.invoke_evaluateOnCallFrame({
          callFrameId: this.id,
          expression: options2.expression,
          objectGroup: options2.objectGroup,
          includeCommandLineAPI: options2.includeCommandLineAPI,
          silent: options2.silent,
          returnByValue: options2.returnByValue,
          generatePreview: options2.generatePreview,
          throwOnSideEffect: options2.throwOnSideEffect,
          timeout: options2.timeout
        });
        const error = response.getError();
        if (error) {
          return { error };
        }
        return { object: runtimeModel.createRemoteObject(response.result), exceptionDetails: response.exceptionDetails };
      }
      async restart() {
        console.assert(this.canBeRestarted, "This frame can not be restarted.");
        await this.debuggerModel.agent.invoke_restartFrame({ callFrameId: this.id, mode: "StepInto" });
      }
      getPayload() {
        return this.payload;
      }
    };
    Scope2 = class {
      #callFrame;
      #payload;
      #type;
      #name;
      #ordinal;
      #locationRange;
      #object = null;
      constructor(callFrame, ordinal) {
        this.#callFrame = callFrame;
        this.#payload = callFrame.getPayload().scopeChain[ordinal];
        this.#type = this.#payload.type;
        this.#name = this.#payload.name;
        this.#ordinal = ordinal;
        const start = this.#payload.startLocation ? Location$1.fromPayload(callFrame.debuggerModel, this.#payload.startLocation) : null;
        const end = this.#payload.endLocation ? Location$1.fromPayload(callFrame.debuggerModel, this.#payload.endLocation) : null;
        if (start && end && start.scriptId === end.scriptId) {
          this.#locationRange = { start, end };
        } else {
          this.#locationRange = null;
        }
      }
      callFrame() {
        return this.#callFrame;
      }
      type() {
        return this.#type;
      }
      typeName() {
        switch (this.#type) {
          case "local":
            return i18nString$G(UIStrings$Z.local);
          case "closure":
            return i18nString$G(UIStrings$Z.closure);
          case "catch":
            return i18nString$G(UIStrings$Z.catchBlock);
          case "eval":
            return lockedString("Eval");
          case "block":
            return i18nString$G(UIStrings$Z.block);
          case "script":
            return i18nString$G(UIStrings$Z.script);
          case "with":
            return i18nString$G(UIStrings$Z.withBlock);
          case "global":
            return i18nString$G(UIStrings$Z.global);
          case "module":
            return i18nString$G(UIStrings$Z.module);
          case "wasm-expression-stack":
            return i18nString$G(UIStrings$Z.expression);
        }
        return "";
      }
      name() {
        return this.#name;
      }
      range() {
        return this.#locationRange;
      }
      object() {
        if (this.#object) {
          return this.#object;
        }
        const runtimeModel = this.#callFrame.debuggerModel.runtimeModel();
        const declarativeScope = this.#type !== "with" && this.#type !== "global";
        if (declarativeScope) {
          this.#object = runtimeModel.createScopeRemoteObject(this.#payload.object, new ScopeRef(this.#ordinal, this.#callFrame.id));
        } else {
          this.#object = runtimeModel.createRemoteObject(this.#payload.object);
        }
        return this.#object;
      }
      description() {
        const declarativeScope = this.#type !== "with" && this.#type !== "global";
        return declarativeScope ? "" : this.#payload.object.description || "";
      }
      icon() {
        return void 0;
      }
      extraProperties() {
        if (this.#ordinal !== 0 || this.#type !== "local" || this.#callFrame.script.isWasm()) {
          return [];
        }
        const extraProperties = [];
        const exception = this.#callFrame.exception;
        if (exception) {
          extraProperties.push(new RemoteObjectProperty(
            i18nString$G(UIStrings$Z.exception),
            exception,
            void 0,
            void 0,
            void 0,
            void 0,
            void 0,
            true
          ));
        }
        const returnValue = this.#callFrame.returnValue();
        if (returnValue) {
          extraProperties.push(new RemoteObjectProperty(
            i18nString$G(UIStrings$Z.returnValue),
            returnValue,
            void 0,
            void 0,
            void 0,
            void 0,
            void 0,
            true,
            this.#callFrame.setReturnValue.bind(this.#callFrame)
          ));
        }
        return extraProperties;
      }
    };
    DebuggerPausedDetails = class {
      debuggerModel;
      callFrames;
      reason;
      auxData;
      breakpointIds;
      asyncStackTrace;
      asyncStackTraceId;
      constructor(debuggerModel, callFrames, reason, auxData, breakpointIds, asyncStackTrace, asyncStackTraceId) {
        this.debuggerModel = debuggerModel;
        this.reason = reason;
        this.auxData = auxData;
        this.breakpointIds = breakpointIds;
        if (asyncStackTrace) {
          this.asyncStackTrace = this.cleanRedundantFrames(asyncStackTrace);
        }
        this.asyncStackTraceId = asyncStackTraceId;
        this.callFrames = CallFrame.fromPayloadArray(debuggerModel, callFrames, this.exception());
      }
      exception() {
        if (this.reason !== "exception" && this.reason !== "promiseRejection") {
          return null;
        }
        return this.debuggerModel.runtimeModel().createRemoteObject(this.auxData);
      }
      cleanRedundantFrames(asyncStackTrace) {
        let stack = asyncStackTrace;
        let previous = null;
        while (stack) {
          if (previous && !stack.callFrames.length) {
            previous.parent = stack.parent;
          } else {
            previous = stack;
          }
          stack = stack.parent;
        }
        return asyncStackTrace;
      }
    };
    SDKModel.register(DebuggerModel, { capabilities: 4, autostart: true });
    LOGPOINT_SOURCE_URL = "debugger://logpoint";
    COND_BREAKPOINT_SOURCE_URL = "debugger://breakpoint";
    AccessibilityNode = class {
      #accessibilityModel;
      #id;
      #backendDOMNodeId;
      #deferredDOMNode;
      #ignored;
      #ignoredReasons;
      #role;
      #name;
      #description;
      #value;
      #properties;
      #parentId;
      #frameId;
      #childIds;
      constructor(accessibilityModel, payload) {
        this.#accessibilityModel = accessibilityModel;
        this.#id = payload.nodeId;
        accessibilityModel.setAXNodeForAXId(this.#id, this);
        if (payload.backendDOMNodeId) {
          accessibilityModel.setAXNodeForBackendDOMNodeId(payload.backendDOMNodeId, this);
          this.#backendDOMNodeId = payload.backendDOMNodeId;
          this.#deferredDOMNode = new DeferredDOMNode(accessibilityModel.target(), payload.backendDOMNodeId);
        } else {
          this.#backendDOMNodeId = null;
          this.#deferredDOMNode = null;
        }
        this.#ignored = payload.ignored;
        if (this.#ignored && "ignoredReasons" in payload) {
          this.#ignoredReasons = payload.ignoredReasons;
        }
        this.#role = payload.role || null;
        this.#name = payload.name || null;
        this.#description = payload.description || null;
        this.#value = payload.value || null;
        this.#properties = payload.properties || null;
        this.#childIds = [...new Set(payload.childIds)];
        this.#parentId = payload.parentId || null;
        if (payload.frameId && !payload.parentId) {
          this.#frameId = payload.frameId;
          accessibilityModel.setRootAXNodeForFrameId(payload.frameId, this);
        } else {
          this.#frameId = null;
        }
      }
      id() {
        return this.#id;
      }
      accessibilityModel() {
        return this.#accessibilityModel;
      }
      ignored() {
        return this.#ignored;
      }
      ignoredReasons() {
        return this.#ignoredReasons || null;
      }
      role() {
        return this.#role || null;
      }
      coreProperties() {
        const properties2 = [];
        if (this.#name) {
          properties2.push({ name: "name", value: this.#name });
        }
        if (this.#description) {
          properties2.push({ name: "description", value: this.#description });
        }
        if (this.#value) {
          properties2.push({ name: "value", value: this.#value });
        }
        return properties2;
      }
      name() {
        return this.#name || null;
      }
      description() {
        return this.#description || null;
      }
      value() {
        return this.#value || null;
      }
      properties() {
        return this.#properties || null;
      }
      parentNode() {
        if (this.#parentId) {
          return this.#accessibilityModel.axNodeForId(this.#parentId);
        }
        return null;
      }
      isDOMNode() {
        return Boolean(this.#backendDOMNodeId);
      }
      backendDOMNodeId() {
        return this.#backendDOMNodeId;
      }
      deferredDOMNode() {
        return this.#deferredDOMNode;
      }
      highlightDOMNode() {
        const deferredNode = this.deferredDOMNode();
        if (!deferredNode) {
          return;
        }
        deferredNode.highlight();
      }
      children() {
        if (!this.#childIds) {
          return [];
        }
        const children = [];
        for (const childId of this.#childIds) {
          const child = this.#accessibilityModel.axNodeForId(childId);
          if (child) {
            children.push(child);
          }
        }
        return children;
      }
      numChildren() {
        if (!this.#childIds) {
          return 0;
        }
        return this.#childIds.length;
      }
      hasOnlyUnloadedChildren() {
        if (!this.#childIds || !this.#childIds.length) {
          return false;
        }
        return this.#childIds.every((id2) => this.#accessibilityModel.axNodeForId(id2) === null);
      }
      hasUnloadedChildren() {
        if (!this.#childIds || !this.#childIds.length) {
          return false;
        }
        return this.#childIds.some((id2) => this.#accessibilityModel.axNodeForId(id2) === null);
      }
      getFrameId() {
        return this.#frameId || this.parentNode()?.getFrameId() || null;
      }
    };
    AccessibilityModel = class extends SDKModel {
      agent;
      #axIdToAXNode = /* @__PURE__ */ new Map();
      #backendDOMNodeIdToAXNode = /* @__PURE__ */ new Map();
      #frameIdToAXNode = /* @__PURE__ */ new Map();
      #pendingChildRequests = /* @__PURE__ */ new Map();
      #root = null;
      constructor(target) {
        super(target);
        target.registerAccessibilityDispatcher(this);
        this.agent = target.accessibilityAgent();
        void this.resumeModel();
      }
      clear() {
        this.#root = null;
        this.#axIdToAXNode.clear();
        this.#backendDOMNodeIdToAXNode.clear();
        this.#frameIdToAXNode.clear();
      }
      async resumeModel() {
        await this.agent.invoke_enable();
      }
      async suspendModel() {
        await this.agent.invoke_disable();
      }
      async requestPartialAXTree(node2) {
        const { nodes } = await this.agent.invoke_getPartialAXTree({ nodeId: node2.id, fetchRelatives: true });
        if (!nodes) {
          return;
        }
        const axNodes = [];
        for (const payload of nodes) {
          axNodes.push(new AccessibilityNode(this, payload));
        }
      }
      loadComplete({ root: root2 }) {
        this.clear();
        this.#root = new AccessibilityNode(this, root2);
        this.dispatchEventToListeners("TreeUpdated", { root: this.#root });
      }
      nodesUpdated({ nodes }) {
        this.createNodesFromPayload(nodes);
        this.dispatchEventToListeners("TreeUpdated", {});
        return;
      }
      createNodesFromPayload(payloadNodes) {
        const accessibilityNodes = payloadNodes.map((node2) => {
          const sdkNode = new AccessibilityNode(this, node2);
          return sdkNode;
        });
        return accessibilityNodes;
      }
      async requestRootNode(frameId) {
        if (frameId && this.#frameIdToAXNode.has(frameId)) {
          return this.#frameIdToAXNode.get(frameId);
        }
        if (!frameId && this.#root) {
          return this.#root;
        }
        const { node: node2 } = await this.agent.invoke_getRootAXNode({ frameId });
        if (!node2) {
          return;
        }
        return this.createNodesFromPayload([node2])[0];
      }
      async requestAXChildren(nodeId, frameId) {
        const parent = this.#axIdToAXNode.get(nodeId);
        if (!parent) {
          throw new Error("Cannot request children before parent");
        }
        if (!parent.hasUnloadedChildren()) {
          return parent.children();
        }
        const request3 = this.#pendingChildRequests.get(nodeId);
        if (request3) {
          await request3;
        } else {
          const request4 = this.agent.invoke_getChildAXNodes({ id: nodeId, frameId });
          this.#pendingChildRequests.set(nodeId, request4);
          const result = await request4;
          if (!result.getError()) {
            this.createNodesFromPayload(result.nodes);
            this.#pendingChildRequests.delete(nodeId);
          }
        }
        return parent.children();
      }
      async requestAndLoadSubTreeToNode(node2) {
        const result = [];
        let ancestor = this.axNodeForDOMNode(node2);
        while (ancestor) {
          result.push(ancestor);
          const parent = ancestor.parentNode();
          if (!parent) {
            return result;
          }
          ancestor = parent;
        }
        const { nodes } = await this.agent.invoke_getAXNodeAndAncestors({ backendNodeId: node2.backendNodeId() });
        if (!nodes) {
          return null;
        }
        const ancestors = this.createNodesFromPayload(nodes);
        return ancestors;
      }
      axNodeForId(axId) {
        return this.#axIdToAXNode.get(axId) || null;
      }
      setRootAXNodeForFrameId(frameId, axNode) {
        this.#frameIdToAXNode.set(frameId, axNode);
      }
      setAXNodeForAXId(axId, axNode) {
        this.#axIdToAXNode.set(axId, axNode);
      }
      axNodeForDOMNode(domNode) {
        if (!domNode) {
          return null;
        }
        return this.#backendDOMNodeIdToAXNode.get(domNode.backendNodeId()) ?? null;
      }
      setAXNodeForBackendDOMNodeId(backendDOMNodeId, axNode) {
        this.#backendDOMNodeIdToAXNode.set(backendDOMNodeId, axNode);
      }
      getAgent() {
        return this.agent;
      }
    };
    SDKModel.register(AccessibilityModel, { capabilities: 2, autostart: false });
    DEVTOOLS_ANIMATIONS_WORLD_NAME = "devtools_animations";
    REPORT_SCROLL_POSITION_BINDING_NAME = "__devtools_report_scroll_position__";
    getScrollListenerNameInPage = (id2) => `__devtools_scroll_listener_${id2}__`;
    AnimationDOMNode = class _AnimationDOMNode {
      #domNode;
      #scrollListenersById = /* @__PURE__ */ new Map();
      #scrollBindingListener;
      static lastAddedListenerId = 0;
      constructor(domNode) {
        this.#domNode = domNode;
      }
      async #addReportScrollPositionBinding() {
        if (this.#scrollBindingListener) {
          return;
        }
        this.#scrollBindingListener = (ev) => {
          const { name, payload } = ev.data;
          if (name !== REPORT_SCROLL_POSITION_BINDING_NAME) {
            return;
          }
          const { scrollTop, scrollLeft, id: id2 } = JSON.parse(payload);
          const scrollListener = this.#scrollListenersById.get(id2);
          if (!scrollListener) {
            return;
          }
          scrollListener({ scrollTop, scrollLeft });
        };
        const runtimeModel = this.#domNode.domModel().target().model(RuntimeModel);
        await runtimeModel.addBinding({
          name: REPORT_SCROLL_POSITION_BINDING_NAME,
          executionContextName: DEVTOOLS_ANIMATIONS_WORLD_NAME
        });
        runtimeModel.addEventListener(Events$9.BindingCalled, this.#scrollBindingListener);
      }
      async #removeReportScrollPositionBinding() {
        if (!this.#scrollBindingListener) {
          return;
        }
        const runtimeModel = this.#domNode.domModel().target().model(RuntimeModel);
        await runtimeModel.removeBinding({
          name: REPORT_SCROLL_POSITION_BINDING_NAME
        });
        runtimeModel.removeEventListener(Events$9.BindingCalled, this.#scrollBindingListener);
        this.#scrollBindingListener = void 0;
      }
      async addScrollEventListener(onScroll) {
        _AnimationDOMNode.lastAddedListenerId++;
        const id2 = _AnimationDOMNode.lastAddedListenerId;
        this.#scrollListenersById.set(id2, onScroll);
        if (!this.#scrollBindingListener) {
          await this.#addReportScrollPositionBinding();
        }
        const object2 = await resolveToObjectInWorld(this.#domNode, DEVTOOLS_ANIMATIONS_WORLD_NAME);
        if (!object2) {
          return null;
        }
        await object2.callFunction(scrollListenerInPage, [
          id2,
          REPORT_SCROLL_POSITION_BINDING_NAME,
          getScrollListenerNameInPage(id2)
        ].map((arg) => RemoteObject$1.toCallArgument(arg)));
        object2.release();
        return id2;
        function scrollListenerInPage(id3, reportScrollPositionBindingName, scrollListenerNameInPage) {
          if ("scrollingElement" in this && !this.scrollingElement) {
            return;
          }
          const scrollingElement = "scrollingElement" in this ? this.scrollingElement : this;
          this[scrollListenerNameInPage] = () => {
            globalThis[reportScrollPositionBindingName](JSON.stringify({ scrollTop: scrollingElement.scrollTop, scrollLeft: scrollingElement.scrollLeft, id: id3 }));
          };
          this.addEventListener("scroll", this[scrollListenerNameInPage], true);
        }
      }
      async removeScrollEventListener(id2) {
        const object2 = await resolveToObjectInWorld(this.#domNode, DEVTOOLS_ANIMATIONS_WORLD_NAME);
        if (!object2) {
          return;
        }
        await object2.callFunction(removeScrollListenerInPage, [getScrollListenerNameInPage(id2)].map((arg) => RemoteObject$1.toCallArgument(arg)));
        object2.release();
        this.#scrollListenersById.delete(id2);
        if (this.#scrollListenersById.size === 0) {
          await this.#removeReportScrollPositionBinding();
        }
        function removeScrollListenerInPage(scrollListenerNameInPage) {
          this.removeEventListener("scroll", this[scrollListenerNameInPage]);
          delete this[scrollListenerNameInPage];
        }
      }
      async scrollTop() {
        return await this.#domNode.callFunction(scrollTopInPage).then((res) => res?.value ?? null);
        function scrollTopInPage() {
          if ("scrollingElement" in this) {
            if (!this.scrollingElement) {
              return 0;
            }
            return this.scrollingElement.scrollTop;
          }
          return this.scrollTop;
        }
      }
      async scrollLeft() {
        return await this.#domNode.callFunction(scrollLeftInPage).then((res) => res?.value ?? null);
        function scrollLeftInPage() {
          if ("scrollingElement" in this) {
            if (!this.scrollingElement) {
              return 0;
            }
            return this.scrollingElement.scrollLeft;
          }
          return this.scrollLeft;
        }
      }
      async setScrollTop(offset) {
        await this.#domNode.callFunction(setScrollTopInPage, [offset]);
        function setScrollTopInPage(offsetInPage) {
          if ("scrollingElement" in this) {
            if (!this.scrollingElement) {
              return;
            }
            this.scrollingElement.scrollTop = offsetInPage;
          } else {
            this.scrollTop = offsetInPage;
          }
        }
      }
      async setScrollLeft(offset) {
        await this.#domNode.callFunction(setScrollLeftInPage, [offset]);
        function setScrollLeftInPage(offsetInPage) {
          if ("scrollingElement" in this) {
            if (!this.scrollingElement) {
              return;
            }
            this.scrollingElement.scrollLeft = offsetInPage;
          } else {
            this.scrollLeft = offsetInPage;
          }
        }
      }
      async verticalScrollRange() {
        return await this.#domNode.callFunction(verticalScrollRangeInPage).then((res) => res?.value ?? null);
        function verticalScrollRangeInPage() {
          if ("scrollingElement" in this) {
            if (!this.scrollingElement) {
              return 0;
            }
            return this.scrollingElement.scrollHeight - this.scrollingElement.clientHeight;
          }
          return this.scrollHeight - this.clientHeight;
        }
      }
      async horizontalScrollRange() {
        return await this.#domNode.callFunction(horizontalScrollRangeInPage).then((res) => res?.value ?? null);
        function horizontalScrollRangeInPage() {
          if ("scrollingElement" in this) {
            if (!this.scrollingElement) {
              return 0;
            }
            return this.scrollingElement.scrollWidth - this.scrollingElement.clientWidth;
          }
          return this.scrollWidth - this.clientWidth;
        }
      }
    };
    AnimationModel = class extends SDKModel {
      runtimeModel;
      agent;
      #animationsById = /* @__PURE__ */ new Map();
      animationGroups = /* @__PURE__ */ new Map();
      #pendingAnimations = /* @__PURE__ */ new Set();
      playbackRate = 1;
      #flushPendingAnimations;
      constructor(target) {
        super(target);
        this.runtimeModel = target.model(RuntimeModel);
        this.agent = target.animationAgent();
        target.registerAnimationDispatcher(new AnimationDispatcher(this));
        if (!target.suspended()) {
          void this.agent.invoke_enable();
        }
        const resourceTreeModel = target.model(ResourceTreeModel);
        resourceTreeModel.addEventListener(Events$6.PrimaryPageChanged, this.reset, this);
        this.#flushPendingAnimations = debounce(() => {
          while (this.#pendingAnimations.size) {
            this.matchExistingGroups(this.createGroupFromPendingAnimations());
          }
        }, 100);
      }
      reset() {
        this.#animationsById.clear();
        this.animationGroups.clear();
        this.#pendingAnimations.clear();
        this.dispatchEventToListeners(Events$4.ModelReset);
      }
      async devicePixelRatio() {
        const evaluateResult = await this.target().runtimeAgent().invoke_evaluate({ expression: "window.devicePixelRatio" });
        if (evaluateResult?.result.type === "number") {
          return evaluateResult?.result.value ?? 1;
        }
        return 1;
      }
      async getAnimationGroupForAnimation(name, nodeId) {
        for (const animationGroup of this.animationGroups.values()) {
          for (const animation of animationGroup.animations()) {
            if (animation.name() === name) {
              const animationNode = await animation.source().node();
              if (animationNode?.id === nodeId) {
                return animationGroup;
              }
            }
          }
        }
        return null;
      }
      animationCanceled(id2) {
        this.#pendingAnimations.delete(id2);
      }
      async animationUpdated(payload) {
        let foundAnimationGroup;
        let foundAnimation;
        for (const animationGroup of this.animationGroups.values()) {
          foundAnimation = animationGroup.animations().find((animation) => animation.id() === payload.id);
          if (foundAnimation) {
            foundAnimationGroup = animationGroup;
            break;
          }
        }
        if (!foundAnimation || !foundAnimationGroup) {
          return;
        }
        await foundAnimation.setPayload(payload);
        this.dispatchEventToListeners(Events$4.AnimationGroupUpdated, foundAnimationGroup);
      }
      async animationStarted(payload) {
        if (!payload.source?.backendNodeId) {
          return;
        }
        const animation = await AnimationImpl.parsePayload(this, payload);
        const keyframesRule = animation.source().keyframesRule();
        if (animation.type() === "WebAnimation" && keyframesRule?.keyframes().length === 0) {
          this.#pendingAnimations.delete(animation.id());
        } else {
          this.#animationsById.set(animation.id(), animation);
          this.#pendingAnimations.add(animation.id());
        }
        this.#flushPendingAnimations();
      }
      matchExistingGroups(incomingGroup) {
        let matchedGroup = null;
        for (const group of this.animationGroups.values()) {
          if (group.matches(incomingGroup)) {
            matchedGroup = group;
            group.rebaseTo(incomingGroup);
            break;
          }
          if (group.shouldInclude(incomingGroup)) {
            matchedGroup = group;
            group.appendAnimations(incomingGroup.animations());
            break;
          }
        }
        if (!matchedGroup) {
          this.animationGroups.set(incomingGroup.id(), incomingGroup);
          this.dispatchEventToListeners(Events$4.AnimationGroupStarted, incomingGroup);
        } else {
          this.dispatchEventToListeners(Events$4.AnimationGroupUpdated, matchedGroup);
        }
        return Boolean(matchedGroup);
      }
      createGroupFromPendingAnimations() {
        console.assert(this.#pendingAnimations.size > 0);
        const firstAnimationId = this.#pendingAnimations.values().next().value;
        this.#pendingAnimations.delete(firstAnimationId);
        const firstAnimation = this.#animationsById.get(firstAnimationId);
        if (!firstAnimation) {
          throw new Error("Unable to locate first animation");
        }
        const groupedAnimations = [firstAnimation];
        const remainingAnimations = /* @__PURE__ */ new Set();
        for (const id2 of this.#pendingAnimations) {
          const anim = this.#animationsById.get(id2);
          if (shouldGroupAnimations(firstAnimation, anim)) {
            groupedAnimations.push(anim);
          } else {
            remainingAnimations.add(id2);
          }
        }
        this.#pendingAnimations = remainingAnimations;
        groupedAnimations.sort((anim1, anim2) => anim1.startTime() - anim2.startTime());
        return new AnimationGroup(this, firstAnimationId, groupedAnimations);
      }
      setPlaybackRate(playbackRate) {
        this.playbackRate = playbackRate;
        void this.agent.invoke_setPlaybackRate({ playbackRate });
      }
      releaseAnimations(animations3) {
        void this.agent.invoke_releaseAnimations({ animations: animations3 });
      }
      async suspendModel() {
        await this.agent.invoke_disable().then(() => this.reset());
      }
      async resumeModel() {
        await this.agent.invoke_enable();
      }
    };
    (function(Events2) {
      Events2["AnimationGroupStarted"] = "AnimationGroupStarted";
      Events2["AnimationGroupUpdated"] = "AnimationGroupUpdated";
      Events2["ModelReset"] = "ModelReset";
    })(Events$4 || (Events$4 = {}));
    AnimationImpl = class _AnimationImpl {
      #animationModel;
      #payload;
      #source;
      #playState;
      constructor(animationModel) {
        this.#animationModel = animationModel;
      }
      static async parsePayload(animationModel, payload) {
        const animation = new _AnimationImpl(animationModel);
        await animation.setPayload(payload);
        return animation;
      }
      async setPayload(payload) {
        if (payload.viewOrScrollTimeline) {
          const devicePixelRatio4 = await this.#animationModel.devicePixelRatio();
          if (payload.viewOrScrollTimeline.startOffset) {
            payload.viewOrScrollTimeline.startOffset /= devicePixelRatio4;
          }
          if (payload.viewOrScrollTimeline.endOffset) {
            payload.viewOrScrollTimeline.endOffset /= devicePixelRatio4;
          }
        }
        this.#payload = payload;
        if (this.#source && payload.source) {
          this.#source.setPayload(payload.source);
        } else if (!this.#source && payload.source) {
          this.#source = new AnimationEffect(this.#animationModel, payload.source);
        }
      }
      percentageToPixels(percentage, viewOrScrollTimeline) {
        const { startOffset, endOffset } = viewOrScrollTimeline;
        if (startOffset === void 0 || endOffset === void 0) {
          throw new Error("startOffset or endOffset does not exist in viewOrScrollTimeline");
        }
        return (endOffset - startOffset) * (percentage / 100);
      }
      viewOrScrollTimeline() {
        return this.#payload.viewOrScrollTimeline;
      }
      id() {
        return this.#payload.id;
      }
      name() {
        return this.#payload.name;
      }
      paused() {
        return this.#payload.pausedState;
      }
      playState() {
        return this.#playState || this.#payload.playState;
      }
      playbackRate() {
        return this.#payload.playbackRate;
      }
      startTime() {
        const viewOrScrollTimeline = this.viewOrScrollTimeline();
        if (viewOrScrollTimeline) {
          return this.percentageToPixels(this.playbackRate() > 0 ? this.#payload.startTime : 100 - this.#payload.startTime, viewOrScrollTimeline) + (this.viewOrScrollTimeline()?.startOffset ?? 0);
        }
        return this.#payload.startTime;
      }
      iterationDuration() {
        const viewOrScrollTimeline = this.viewOrScrollTimeline();
        if (viewOrScrollTimeline) {
          return this.percentageToPixels(this.source().duration(), viewOrScrollTimeline);
        }
        return this.source().duration();
      }
      endTime() {
        if (!this.source().iterations) {
          return Infinity;
        }
        if (this.viewOrScrollTimeline()) {
          return this.startTime() + this.iterationDuration() * this.source().iterations();
        }
        return this.startTime() + this.source().delay() + this.source().duration() * this.source().iterations() + this.source().endDelay();
      }
      finiteDuration() {
        const iterations = Math.min(this.source().iterations(), 3);
        if (this.viewOrScrollTimeline()) {
          return this.iterationDuration() * iterations;
        }
        return this.source().delay() + this.source().duration() * iterations;
      }
      currentTime() {
        const viewOrScrollTimeline = this.viewOrScrollTimeline();
        if (viewOrScrollTimeline) {
          return this.percentageToPixels(this.#payload.currentTime, viewOrScrollTimeline);
        }
        return this.#payload.currentTime;
      }
      source() {
        return this.#source;
      }
      type() {
        return this.#payload.type;
      }
      overlaps(animation) {
        if (!this.source().iterations() || !animation.source().iterations()) {
          return true;
        }
        const firstAnimation = this.startTime() < animation.startTime() ? this : animation;
        const secondAnimation = firstAnimation === this ? animation : this;
        return firstAnimation.endTime() >= secondAnimation.startTime();
      }
      delayOrStartTime() {
        if (this.viewOrScrollTimeline()) {
          return this.startTime();
        }
        return this.source().delay();
      }
      setTiming(duration2, delay) {
        void this.#source.node().then((node2) => {
          if (!node2) {
            throw new Error("Unable to find node");
          }
          this.updateNodeStyle(duration2, delay, node2);
        });
        this.#source.durationInternal = duration2;
        this.#source.delayInternal = delay;
        void this.#animationModel.agent.invoke_setTiming({ animationId: this.id(), duration: duration2, delay });
      }
      updateNodeStyle(duration2, delay, node2) {
        let animationPrefix;
        if (this.type() === "CSSTransition") {
          animationPrefix = "transition-";
        } else if (this.type() === "CSSAnimation") {
          animationPrefix = "animation-";
        } else {
          return;
        }
        if (!node2.id) {
          throw new Error("Node has no id");
        }
        const cssModel = node2.domModel().cssModel();
        cssModel.setEffectivePropertyValueForNode(node2.id, animationPrefix + "duration", duration2 + "ms");
        cssModel.setEffectivePropertyValueForNode(node2.id, animationPrefix + "delay", delay + "ms");
      }
      async remoteObjectPromise() {
        const payload = await this.#animationModel.agent.invoke_resolveAnimation({ animationId: this.id() });
        if (!payload) {
          return null;
        }
        return this.#animationModel.runtimeModel.createRemoteObject(payload.remoteObject);
      }
      cssId() {
        return this.#payload.cssId || "";
      }
    };
    AnimationEffect = class {
      #animationModel;
      #payload;
      delayInternal;
      durationInternal;
      #keyframesRule;
      #deferredNode;
      constructor(animationModel, payload) {
        this.#animationModel = animationModel;
        this.setPayload(payload);
      }
      setPayload(payload) {
        this.#payload = payload;
        if (!this.#keyframesRule && payload.keyframesRule) {
          this.#keyframesRule = new KeyframesRule(payload.keyframesRule);
        } else if (this.#keyframesRule && payload.keyframesRule) {
          this.#keyframesRule.setPayload(payload.keyframesRule);
        }
        this.delayInternal = payload.delay;
        this.durationInternal = payload.duration;
      }
      delay() {
        return this.delayInternal;
      }
      endDelay() {
        return this.#payload.endDelay;
      }
      iterations() {
        if (!this.delay() && !this.endDelay() && !this.duration()) {
          return 0;
        }
        return this.#payload.iterations || Infinity;
      }
      duration() {
        return this.durationInternal;
      }
      direction() {
        return this.#payload.direction;
      }
      fill() {
        return this.#payload.fill;
      }
      node() {
        if (!this.#deferredNode) {
          this.#deferredNode = new DeferredDOMNode(this.#animationModel.target(), this.backendNodeId());
        }
        return this.#deferredNode.resolvePromise();
      }
      deferredNode() {
        return new DeferredDOMNode(this.#animationModel.target(), this.backendNodeId());
      }
      backendNodeId() {
        return this.#payload.backendNodeId;
      }
      keyframesRule() {
        return this.#keyframesRule || null;
      }
      easing() {
        return this.#payload.easing;
      }
    };
    KeyframesRule = class {
      #payload;
      #keyframes;
      constructor(payload) {
        this.setPayload(payload);
      }
      setPayload(payload) {
        this.#payload = payload;
        if (!this.#keyframes) {
          this.#keyframes = this.#payload.keyframes.map((keyframeStyle) => new KeyframeStyle(keyframeStyle));
        } else {
          this.#payload.keyframes.forEach((keyframeStyle, index2) => {
            this.#keyframes[index2]?.setPayload(keyframeStyle);
          });
        }
      }
      name() {
        return this.#payload.name;
      }
      keyframes() {
        return this.#keyframes;
      }
    };
    KeyframeStyle = class {
      #payload;
      #offset;
      constructor(payload) {
        this.setPayload(payload);
      }
      setPayload(payload) {
        this.#payload = payload;
        this.#offset = payload.offset;
      }
      offset() {
        return this.#offset;
      }
      setOffset(offset) {
        this.#offset = offset * 100 + "%";
      }
      offsetAsNumber() {
        return parseFloat(this.#offset) / 100;
      }
      easing() {
        return this.#payload.easing;
      }
    };
    AnimationGroup = class {
      #animationModel;
      #id;
      #scrollNode;
      #animations;
      #paused = false;
      constructor(animationModel, id2, animations3) {
        this.#animationModel = animationModel;
        this.#id = id2;
        this.#animations = animations3;
      }
      isScrollDriven() {
        return Boolean(this.#animations[0]?.viewOrScrollTimeline());
      }
      id() {
        return this.#id;
      }
      animations() {
        return this.#animations;
      }
      release() {
        this.#animationModel.animationGroups.delete(this.id());
        this.#animationModel.releaseAnimations(this.animationIds());
      }
      animationIds() {
        function extractId3(animation) {
          return animation.id();
        }
        return this.#animations.map(extractId3);
      }
      startTime() {
        return this.#animations[0].startTime();
      }
      groupDuration() {
        let duration2 = 0;
        for (const anim of this.#animations) {
          duration2 = Math.max(duration2, anim.delayOrStartTime() + anim.iterationDuration());
        }
        return duration2;
      }
      finiteDuration() {
        let maxDuration = 0;
        for (let i = 0; i < this.#animations.length; ++i) {
          maxDuration = Math.max(maxDuration, this.#animations[i].finiteDuration());
        }
        return maxDuration;
      }
      scrollOrientation() {
        const timeline = this.#animations[0]?.viewOrScrollTimeline();
        if (!timeline) {
          return null;
        }
        return timeline.axis;
      }
      async scrollNode() {
        if (this.#scrollNode) {
          return this.#scrollNode;
        }
        if (!this.isScrollDriven()) {
          return null;
        }
        const sourceNodeId = this.#animations[0]?.viewOrScrollTimeline()?.sourceNodeId;
        if (!sourceNodeId) {
          return null;
        }
        const deferredScrollNode = new DeferredDOMNode(this.#animationModel.target(), sourceNodeId);
        const scrollNode = await deferredScrollNode.resolvePromise();
        if (!scrollNode) {
          return null;
        }
        this.#scrollNode = new AnimationDOMNode(scrollNode);
        return this.#scrollNode;
      }
      seekTo(currentTime) {
        void this.#animationModel.agent.invoke_seekAnimations({ animations: this.animationIds(), currentTime });
      }
      paused() {
        return this.#paused;
      }
      togglePause(paused) {
        if (paused === this.#paused) {
          return;
        }
        this.#paused = paused;
        void this.#animationModel.agent.invoke_setPaused({ animations: this.animationIds(), paused });
      }
      currentTimePromise() {
        let longestAnim = null;
        for (const anim of this.#animations) {
          if (!longestAnim || anim.endTime() > longestAnim.endTime()) {
            longestAnim = anim;
          }
        }
        if (!longestAnim) {
          throw new Error("No longest animation found");
        }
        return this.#animationModel.agent.invoke_getCurrentTime({ id: longestAnim.id() }).then(({ currentTime }) => currentTime || 0);
      }
      matches(group) {
        function extractId3(anim) {
          const timelineId = (anim.viewOrScrollTimeline()?.sourceNodeId ?? "") + (anim.viewOrScrollTimeline()?.axis ?? "");
          const regularId = anim.type() === "WebAnimation" ? anim.type() + anim.id() : anim.cssId();
          return regularId + timelineId;
        }
        if (this.#animations.length !== group.#animations.length) {
          return false;
        }
        const left2 = this.#animations.map(extractId3).sort();
        const right2 = group.#animations.map(extractId3).sort();
        for (let i = 0; i < left2.length; i++) {
          if (left2[i] !== right2[i]) {
            return false;
          }
        }
        return true;
      }
      shouldInclude(group) {
        const [firstIncomingAnimation] = group.#animations;
        const [firstAnimation] = this.#animations;
        return shouldGroupAnimations(firstAnimation, firstIncomingAnimation);
      }
      appendAnimations(animations3) {
        this.#animations.push(...animations3);
      }
      rebaseTo(group) {
        this.#animationModel.releaseAnimations(this.animationIds());
        this.#animations = group.#animations;
        this.#scrollNode = void 0;
      }
    };
    AnimationDispatcher = class {
      #animationModel;
      constructor(animationModel) {
        this.#animationModel = animationModel;
      }
      animationCreated(_event) {
      }
      animationCanceled({ id: id2 }) {
        this.#animationModel.animationCanceled(id2);
      }
      animationStarted({ animation }) {
        void this.#animationModel.animationStarted(animation);
      }
      animationUpdated({ animation }) {
        void this.#animationModel.animationUpdated(animation);
      }
    };
    SDKModel.register(AnimationModel, { capabilities: 2, autostart: true });
    AutofillModel = class extends SDKModel {
      agent;
      #enabled;
      #showTestAddressesInAutofillMenu;
      constructor(target) {
        super(target);
        this.agent = target.autofillAgent();
        this.#showTestAddressesInAutofillMenu = Settings.instance().createSetting("show-test-addresses-in-autofill-menu-on-event", false);
        this.#showTestAddressesInAutofillMenu.addChangeListener(this.#setTestAddresses, this);
        target.registerAutofillDispatcher(this);
        this.enable();
      }
      dispose() {
        this.#showTestAddressesInAutofillMenu.removeChangeListener(this.#setTestAddresses, this);
        super.dispose();
      }
      #setTestAddresses() {
        void this.agent.invoke_setAddresses({
          addresses: this.#showTestAddressesInAutofillMenu.get() ? [
            {
              fields: [
                { name: "ADDRESS_HOME_COUNTRY", value: "US" },
                { name: "NAME_FULL", value: "Jon Stewart Doe" },
                { name: "NAME_FIRST", value: "Jon" },
                { name: "NAME_MIDDLE", value: "Stewart" },
                { name: "NAME_LAST", value: "Doe" },
                { name: "COMPANY_NAME", value: "Fake Company" },
                { name: "ADDRESS_HOME_LINE1", value: "1600 Fake Street" },
                { name: "ADDRESS_HOME_LINE2", value: "Apartment 1" },
                { name: "ADDRESS_HOME_ZIP", value: "94043" },
                { name: "ADDRESS_HOME_CITY", value: "Mountain View" },
                { name: "ADDRESS_HOME_STATE", value: "CA" },
                { name: "EMAIL_ADDRESS", value: "test@example.us" },
                { name: "PHONE_HOME_WHOLE_NUMBER", value: "+16019521325" }
              ]
            },
            {
              fields: [
                { name: "ADDRESS_HOME_COUNTRY", value: "BR" },
                { name: "NAME_FULL", value: "Jo\xE3o Souza Silva" },
                { name: "NAME_FIRST", value: "Jo\xE3o" },
                { name: "NAME_LAST", value: "Souza Silva" },
                { name: "NAME_LAST_FIRST", value: "Souza" },
                { name: "NAME_LAST_SECOND", value: "Silva" },
                { name: "COMPANY_NAME", value: "Empresa Falsa" },
                { name: "ADDRESS_HOME_STREET_ADDRESS", value: "Rua Inexistente, 2000\nAndar 2, Apartamento 1" },
                { name: "ADDRESS_HOME_STREET_LOCATION", value: "Rua Inexistente, 2000" },
                { name: "ADDRESS_HOME_STREET_NAME", value: "Rua Inexistente" },
                { name: "ADDRESS_HOME_HOUSE_NUMBER", value: "2000" },
                { name: "ADDRESS_HOME_SUBPREMISE", value: "Andar 2, Apartamento 1" },
                { name: "ADDRESS_HOME_APT_NUM", value: "1" },
                { name: "ADDRESS_HOME_FLOOR", value: "2" },
                { name: "ADDRESS_HOME_APT", value: "Apartamento 1" },
                { name: "ADDRESS_HOME_APT_TYPE", value: "Apartamento" },
                { name: "ADDRESS_HOME_APT_NUM", value: "1" },
                { name: "ADDRESS_HOME_DEPENDENT_LOCALITY", value: "Santa Efig\xEAnia" },
                { name: "ADDRESS_HOME_LANDMARK", value: "Pr\xF3ximo \xE0 esta\xE7\xE3o Santa Efig\xEAnia" },
                { name: "ADDRESS_HOME_OVERFLOW", value: "Andar 2, Apartamento 1" },
                { name: "ADDRESS_HOME_ZIP", value: "30260-080" },
                { name: "ADDRESS_HOME_CITY", value: "Belo Horizonte" },
                { name: "ADDRESS_HOME_STATE", value: "MG" },
                { name: "EMAIL_ADDRESS", value: "teste@exemplo.us" },
                { name: "PHONE_HOME_WHOLE_NUMBER", value: "+553121286800" }
              ]
            },
            {
              fields: [
                { name: "ADDRESS_HOME_COUNTRY", value: "MX" },
                { name: "NAME_FULL", value: "Juan Francisco Garc\xEDa Flores" },
                { name: "NAME_FIRST", value: "Juan Francisco" },
                { name: "NAME_LAST", value: "Garc\xEDa Flores" },
                { name: "NAME_LAST_FIRST", value: "Garc\xEDa" },
                { name: "NAME_LAST_SECOND", value: "Flores" },
                { name: "COMPANY_NAME", value: "Empresa Falsa" },
                {
                  name: "ADDRESS_HOME_STREET_ADDRESS",
                  value: "C. Falsa 445\nPiso 2, Apartamento 1\nEntre calle Volc\xE1n y calle Montes Blancos, cerca de la estaci\xF3n de metro"
                },
                { name: "ADDRESS_HOME_STREET_LOCATION", value: "C. Falsa 445" },
                { name: "ADDRESS_HOME_STREET_NAME", value: "C. Falsa" },
                { name: "ADDRESS_HOME_HOUSE_NUMBER", value: "445" },
                { name: "ADDRESS_HOME_SUBPREMISE", value: "Piso 2, Apartamento 1" },
                { name: "ADDRESS_HOME_FLOOR", value: "2" },
                { name: "ADDRESS_HOME_APT", value: "Apartamento 1" },
                { name: "ADDRESS_HOME_APT_TYPE", value: "Apartamento" },
                { name: "ADDRESS_HOME_APT_NUM", value: "1" },
                { name: "ADDRESS_HOME_DEPENDENT_LOCALITY", value: "Lomas de Chapultepec" },
                {
                  name: "ADDRESS_HOME_OVERFLOW",
                  value: "Entre calle Volc\xE1n y calle Montes Celestes, cerca de la estaci\xF3n de metro"
                },
                {
                  name: "ADDRESS_HOME_BETWEEN_STREETS_OR_LANDMARK",
                  value: "Entre calle Volc\xE1n y calle Montes Blancos, cerca de la estaci\xF3n de metro"
                },
                { name: "ADDRESS_HOME_LANDMARK", value: "Cerca de la estaci\xF3n de metro" },
                { name: "ADDRESS_HOME_BETWEEN_STREETS", value: "Entre calle Volc\xE1n y calle Montes Blancos" },
                { name: "ADDRESS_HOME_BETWEEN_STREETS_1", value: "calle Volc\xE1n" },
                { name: "ADDRESS_HOME_BETWEEN_STREETS_2", value: "calle Montes Blancos" },
                { name: "ADDRESS_HOME_ADMIN_LEVEL2", value: "Miguel Hidalgo" },
                { name: "ADDRESS_HOME_ZIP", value: "11001" },
                { name: "ADDRESS_HOME_CITY", value: "Ciudad de M\xE9xico" },
                { name: "ADDRESS_HOME_STATE", value: "Distrito Federal" },
                { name: "EMAIL_ADDRESS", value: "ejemplo@ejemplo.mx" },
                { name: "PHONE_HOME_WHOLE_NUMBER", value: "+525553428400" }
              ]
            },
            {
              fields: [
                { name: "ADDRESS_HOME_COUNTRY", value: "DE" },
                { name: "NAME_FULL", value: "Gottfried Wilhelm Leibniz" },
                { name: "NAME_FIRST", value: "Gottfried" },
                { name: "NAME_MIDDLE", value: "Wilhelm" },
                { name: "NAME_LAST", value: "Leibniz" },
                { name: "COMPANY_NAME", value: "Erfundenes Unternehmen" },
                { name: "ADDRESS_HOME_LINE1", value: "Erfundene Stra\xDFe 33" },
                { name: "ADDRESS_HOME_LINE2", value: "Wohnung 1" },
                { name: "ADDRESS_HOME_ZIP", value: "80732" },
                { name: "ADDRESS_HOME_CITY", value: "M\xFCnchen" },
                { name: "EMAIL_ADDRESS", value: "test@beispiel.de" },
                { name: "PHONE_HOME_WHOLE_NUMBER", value: "+4930303986300" }
              ]
            }
          ] : []
        });
      }
      enable() {
        if (this.#enabled || isUnderTest2()) {
          return;
        }
        void this.agent.invoke_enable();
        this.#setTestAddresses();
        this.#enabled = true;
      }
      disable() {
        if (!this.#enabled || isUnderTest2()) {
          return;
        }
        this.#enabled = false;
        void this.agent.invoke_disable();
      }
      addressFormFilled(addressFormFilledEvent) {
        this.dispatchEventToListeners("AddressFormFilled", { autofillModel: this, event: addressFormFilledEvent });
      }
    };
    SDKModel.register(AutofillModel, { capabilities: 2, autostart: true });
    UIStrings$Y = {
      main: "Main"
    };
    str_$X = registerUIStrings("core/sdk/ChildTargetManager.ts", UIStrings$Y);
    getLocalizedString.bind(void 0, str_$X);
    UIStrings$X = {
      couldNotLoadContentForSS: "Could not load content for {PH1} ({PH2})"
    };
    str_$W = registerUIStrings("core/sdk/CompilerSourceMappingContentProvider.ts", UIStrings$X);
    i18nString$F = getLocalizedString.bind(void 0, str_$W);
    CompilerSourceMappingContentProvider = class {
      #sourceURL;
      #contentType;
      #initiator;
      constructor(sourceURL, contentType, initiator) {
        this.#sourceURL = sourceURL;
        this.#contentType = contentType;
        this.#initiator = initiator;
      }
      contentURL() {
        return this.#sourceURL;
      }
      contentType() {
        return this.#contentType;
      }
      async requestContentData() {
        try {
          const { content } = await PageResourceLoader.instance().loadResource(this.#sourceURL, this.#initiator);
          return new ContentData(content, false, this.#contentType.canonicalMimeType());
        } catch (e) {
          const error = i18nString$F(UIStrings$X.couldNotLoadContentForSS, { PH1: this.#sourceURL, PH2: e.message });
          console.error(error);
          return { error };
        }
      }
      async searchInContent(query, caseSensitive, isRegex) {
        const contentData = await this.requestContentData();
        return performSearchInContentData(contentData, query, caseSensitive, isRegex);
      }
    };
    UIStrings$W = {
      noSourceText: "No source text available",
      noHostWindow: "Can not find host window",
      errorLoadingLog: "Error loading log"
    };
    str_$V = registerUIStrings("core/sdk/RehydratingConnection.ts", UIStrings$W);
    getLocalizedString.bind(void 0, str_$V);
    UIStrings$V = {
      websocketDisconnected: "WebSocket disconnected"
    };
    str_$U = registerUIStrings("core/sdk/Connections.ts", UIStrings$V);
    getLocalizedString.bind(void 0, str_$U);
    (function(FrontendMessageType2) {
      FrontendMessageType2["Result"] = "result";
      FrontendMessageType2["Command"] = "command";
      FrontendMessageType2["System"] = "system";
      FrontendMessageType2["QueryObjectResult"] = "queryObjectResult";
    })(FrontendMessageType || (FrontendMessageType = {}));
    UIStrings$U = {
      profileD: "Profile {PH1}"
    };
    str_$T = registerUIStrings("core/sdk/CPUProfilerModel.ts", UIStrings$U);
    i18nString$E = getLocalizedString.bind(void 0, str_$T);
    CPUProfilerModel = class extends SDKModel {
      #nextAnonymousConsoleProfileNumber;
      #anonymousConsoleProfileIdToTitle;
      #profilerAgent;
      #preciseCoverageDeltaUpdateCallback;
      #debuggerModel;
      registeredConsoleProfileMessages = [];
      constructor(target) {
        super(target);
        this.#nextAnonymousConsoleProfileNumber = 1;
        this.#anonymousConsoleProfileIdToTitle = /* @__PURE__ */ new Map();
        this.#profilerAgent = target.profilerAgent();
        this.#preciseCoverageDeltaUpdateCallback = null;
        target.registerProfilerDispatcher(this);
        void this.#profilerAgent.invoke_enable();
        this.#debuggerModel = target.model(DebuggerModel);
      }
      runtimeModel() {
        return this.#debuggerModel.runtimeModel();
      }
      debuggerModel() {
        return this.#debuggerModel;
      }
      consoleProfileStarted({ id: id2, location, title: title2 }) {
        if (!title2) {
          title2 = i18nString$E(UIStrings$U.profileD, { PH1: this.#nextAnonymousConsoleProfileNumber++ });
          this.#anonymousConsoleProfileIdToTitle.set(id2, title2);
        }
        const eventData = this.createEventDataFrom(id2, location, title2);
        this.dispatchEventToListeners("ConsoleProfileStarted", eventData);
      }
      consoleProfileFinished({ id: id2, location, profile, title: title2 }) {
        if (!title2) {
          title2 = this.#anonymousConsoleProfileIdToTitle.get(id2);
          this.#anonymousConsoleProfileIdToTitle.delete(id2);
        }
        const eventData = {
          ...this.createEventDataFrom(id2, location, title2),
          cpuProfile: profile
        };
        this.registeredConsoleProfileMessages.push(eventData);
        this.dispatchEventToListeners("ConsoleProfileFinished", eventData);
      }
      createEventDataFrom(id2, scriptLocation, title2) {
        const debuggerLocation = Location$1.fromPayload(this.#debuggerModel, scriptLocation);
        const globalId = this.target().id() + "." + id2;
        return {
          id: globalId,
          scriptLocation: debuggerLocation,
          title: title2 || "",
          cpuProfilerModel: this
        };
      }
      startRecording() {
        const intervalUs = 100;
        void this.#profilerAgent.invoke_setSamplingInterval({ interval: intervalUs });
        return this.#profilerAgent.invoke_start();
      }
      stopRecording() {
        return this.#profilerAgent.invoke_stop().then((response) => response.profile || null);
      }
      startPreciseCoverage(jsCoveragePerBlock, preciseCoverageDeltaUpdateCallback) {
        const callCount = false;
        this.#preciseCoverageDeltaUpdateCallback = preciseCoverageDeltaUpdateCallback;
        const allowUpdatesTriggeredByBackend = true;
        return this.#profilerAgent.invoke_startPreciseCoverage({ callCount, detailed: jsCoveragePerBlock, allowTriggeredUpdates: allowUpdatesTriggeredByBackend });
      }
      async takePreciseCoverage() {
        const r = await this.#profilerAgent.invoke_takePreciseCoverage();
        const timestamp = r?.timestamp || 0;
        const coverage = r?.result || [];
        return { timestamp, coverage };
      }
      stopPreciseCoverage() {
        this.#preciseCoverageDeltaUpdateCallback = null;
        return this.#profilerAgent.invoke_stopPreciseCoverage();
      }
      preciseCoverageDeltaUpdate({ timestamp, result }) {
        if (this.#preciseCoverageDeltaUpdateCallback) {
          void this.#preciseCoverageDeltaUpdateCallback(timestamp, result);
        }
      }
    };
    SDKModel.register(CPUProfilerModel, { capabilities: 4, autostart: true });
    LogModel = class extends SDKModel {
      #logAgent;
      constructor(target) {
        super(target);
        target.registerLogDispatcher(this);
        this.#logAgent = target.logAgent();
        void this.#logAgent.invoke_enable();
        if (!isUnderTest2()) {
          void this.#logAgent.invoke_startViolationsReport({
            config: [
              { name: "longTask", threshold: 200 },
              { name: "longLayout", threshold: 30 },
              { name: "blockedEvent", threshold: 100 },
              { name: "blockedParser", threshold: -1 },
              { name: "handler", threshold: 150 },
              { name: "recurringHandler", threshold: 50 },
              { name: "discouragedAPIUse", threshold: -1 }
            ]
          });
        }
      }
      entryAdded({ entry }) {
        this.dispatchEventToListeners("EntryAdded", { logModel: this, entry });
      }
      requestClear() {
        void this.#logAgent.invoke_clear();
      }
    };
    SDKModel.register(LogModel, { capabilities: 8, autostart: true });
    UIStrings$T = {
      navigatedToS: "Navigated to {PH1}",
      bfcacheNavigation: "Navigation to {PH1} was restored from back/forward cache (see https://web.dev/bfcache/)",
      profileSStarted: "Profile ''{PH1}'' started.",
      profileSFinished: "Profile ''{PH1}'' finished.",
      failedToSaveToTempVariable: "Failed to save to temp variable."
    };
    str_$S = registerUIStrings("core/sdk/ConsoleModel.ts", UIStrings$T);
    i18nString$D = getLocalizedString.bind(void 0, str_$S);
    ConsoleModel = class _ConsoleModel extends SDKModel {
      #messages = [];
      #messagesByTimestamp = new Multimap2();
      #messageByExceptionId = /* @__PURE__ */ new Map();
      #warnings = 0;
      #errors = 0;
      #violations = 0;
      #pageLoadSequenceNumber = 0;
      #targetListeners = /* @__PURE__ */ new WeakMap();
      constructor(target) {
        super(target);
        const resourceTreeModel = target.model(ResourceTreeModel);
        if (!resourceTreeModel || resourceTreeModel.cachedResourcesLoaded()) {
          this.initTarget(target);
          return;
        }
        const eventListener = resourceTreeModel.addEventListener(Events$6.CachedResourcesLoaded, () => {
          removeEventListeners([eventListener]);
          this.initTarget(target);
        });
      }
      initTarget(target) {
        const eventListeners = [];
        const cpuProfilerModel = target.model(CPUProfilerModel);
        if (cpuProfilerModel) {
          eventListeners.push(cpuProfilerModel.addEventListener("ConsoleProfileStarted", this.consoleProfileStarted.bind(this, cpuProfilerModel)));
          eventListeners.push(cpuProfilerModel.addEventListener("ConsoleProfileFinished", this.consoleProfileFinished.bind(this, cpuProfilerModel)));
        }
        const resourceTreeModel = target.model(ResourceTreeModel);
        if (resourceTreeModel && target.parentTarget()?.type() !== Type$2.FRAME) {
          eventListeners.push(resourceTreeModel.addEventListener(Events$6.PrimaryPageChanged, this.primaryPageChanged, this));
        }
        const runtimeModel = target.model(RuntimeModel);
        if (runtimeModel) {
          eventListeners.push(runtimeModel.addEventListener(Events$9.ExceptionThrown, this.exceptionThrown.bind(this, runtimeModel)));
          eventListeners.push(runtimeModel.addEventListener(Events$9.ExceptionRevoked, this.exceptionRevoked.bind(this, runtimeModel)));
          eventListeners.push(runtimeModel.addEventListener(Events$9.ConsoleAPICalled, this.consoleAPICalled.bind(this, runtimeModel)));
          if (target.parentTarget()?.type() !== Type$2.FRAME) {
            eventListeners.push(runtimeModel.debuggerModel().addEventListener(Events$5.GlobalObjectCleared, this.clearIfNecessary, this));
          }
          eventListeners.push(runtimeModel.addEventListener(Events$9.QueryObjectRequested, this.queryObjectRequested.bind(this, runtimeModel)));
        }
        this.#targetListeners.set(target, eventListeners);
      }
      targetRemoved(target) {
        const runtimeModel = target.model(RuntimeModel);
        if (runtimeModel) {
          this.#messageByExceptionId.delete(runtimeModel);
        }
        removeEventListeners(this.#targetListeners.get(target) || []);
      }
      async evaluateCommandInConsole(executionContext, originatingMessage, expression, useCommandLineAPI) {
        const result = await executionContext.evaluate(
          {
            expression,
            objectGroup: "console",
            includeCommandLineAPI: useCommandLineAPI,
            silent: false,
            returnByValue: false,
            generatePreview: true,
            replMode: true,
            allowUnsafeEvalBlockedByCSP: false
          },
          Settings.instance().moduleSetting("console-user-activation-eval").get(),
          false
        );
        userMetrics.actionTaken(Action.ConsoleEvaluated);
        if ("error" in result) {
          return;
        }
        await Console.instance().showPromise();
        this.dispatchEventToListeners(Events$3.CommandEvaluated, { result: result.object, commandMessage: originatingMessage, exceptionDetails: result.exceptionDetails });
      }
      addCommandMessage(executionContext, text) {
        const commandMessage = new ConsoleMessage2(executionContext.runtimeModel, "javascript", null, text, { type: FrontendMessageType.Command });
        commandMessage.setExecutionContextId(executionContext.id);
        this.addMessage(commandMessage);
        return commandMessage;
      }
      addMessage(msg) {
        msg.setPageLoadSequenceNumber(this.#pageLoadSequenceNumber);
        if (msg.source === FrontendMessageSource.ConsoleAPI && msg.type === "clear") {
          this.clearIfNecessary();
        }
        this.#messages.push(msg);
        this.#messagesByTimestamp.set(msg.timestamp, msg);
        const runtimeModel = msg.runtimeModel();
        const exceptionId = msg.getExceptionId();
        if (exceptionId && runtimeModel) {
          let modelMap = this.#messageByExceptionId.get(runtimeModel);
          if (!modelMap) {
            modelMap = /* @__PURE__ */ new Map();
            this.#messageByExceptionId.set(runtimeModel, modelMap);
          }
          modelMap.set(exceptionId, msg);
        }
        this.incrementErrorWarningCount(msg);
        this.dispatchEventToListeners(Events$3.MessageAdded, msg);
      }
      exceptionThrown(runtimeModel, event) {
        const exceptionWithTimestamp = event.data;
        const affectedResources = extractExceptionMetaData(exceptionWithTimestamp.details.exceptionMetaData);
        const consoleMessage = ConsoleMessage2.fromException(runtimeModel, exceptionWithTimestamp.details, void 0, exceptionWithTimestamp.timestamp, void 0, affectedResources);
        consoleMessage.setExceptionId(exceptionWithTimestamp.details.exceptionId);
        this.addMessage(consoleMessage);
      }
      exceptionRevoked(runtimeModel, event) {
        const exceptionId = event.data;
        const modelMap = this.#messageByExceptionId.get(runtimeModel);
        const exceptionMessage = modelMap ? modelMap.get(exceptionId) : null;
        if (!exceptionMessage) {
          return;
        }
        this.#errors--;
        exceptionMessage.level = "verbose";
        this.dispatchEventToListeners(Events$3.MessageUpdated, exceptionMessage);
      }
      consoleAPICalled(runtimeModel, event) {
        const call = event.data;
        let level = "info";
        if (call.type === "debug") {
          level = "verbose";
        } else if (call.type === "error" || call.type === "assert") {
          level = "error";
        } else if (call.type === "warning") {
          level = "warning";
        } else if (call.type === "info" || call.type === "log") {
          level = "info";
        }
        let message = "";
        if (call.args.length && call.args[0].unserializableValue) {
          message = call.args[0].unserializableValue;
        } else if (call.args.length && (typeof call.args[0].value !== "object" && typeof call.args[0].value !== "undefined" || call.args[0].value === null)) {
          message = String(call.args[0].value);
        } else if (call.args.length && call.args[0].description) {
          message = call.args[0].description;
        }
        const callFrame = call.stackTrace?.callFrames.length ? call.stackTrace.callFrames[0] : null;
        const details = {
          type: call.type,
          url: callFrame?.url,
          line: callFrame?.lineNumber,
          column: callFrame?.columnNumber,
          parameters: call.args,
          stackTrace: call.stackTrace,
          timestamp: call.timestamp,
          executionContextId: call.executionContextId,
          context: call.context
        };
        const consoleMessage = new ConsoleMessage2(runtimeModel, FrontendMessageSource.ConsoleAPI, level, message, details);
        for (const msg of this.#messagesByTimestamp.get(consoleMessage.timestamp).values()) {
          if (consoleMessage.isEqual(msg)) {
            return;
          }
        }
        this.addMessage(consoleMessage);
      }
      queryObjectRequested(runtimeModel, event) {
        const { objects, executionContextId } = event.data;
        const details = {
          type: FrontendMessageType.QueryObjectResult,
          parameters: [objects],
          executionContextId
        };
        const consoleMessage = new ConsoleMessage2(runtimeModel, FrontendMessageSource.ConsoleAPI, "info", "", details);
        this.addMessage(consoleMessage);
      }
      clearIfNecessary() {
        if (!Settings.instance().moduleSetting("preserve-console-log").get()) {
          this.clear();
        }
        ++this.#pageLoadSequenceNumber;
      }
      primaryPageChanged(event) {
        if (Settings.instance().moduleSetting("preserve-console-log").get()) {
          const { frame } = event.data;
          if (frame.backForwardCacheDetails.restoredFromCache) {
            Console.instance().log(i18nString$D(UIStrings$T.bfcacheNavigation, { PH1: frame.url }));
          } else {
            Console.instance().log(i18nString$D(UIStrings$T.navigatedToS, { PH1: frame.url }));
          }
        }
      }
      consoleProfileStarted(cpuProfilerModel, event) {
        const { data: data32 } = event;
        this.addConsoleProfileMessage(cpuProfilerModel, "profile", data32.scriptLocation, i18nString$D(UIStrings$T.profileSStarted, { PH1: data32.title }));
      }
      consoleProfileFinished(cpuProfilerModel, event) {
        const { data: data32 } = event;
        this.addConsoleProfileMessage(cpuProfilerModel, "profileEnd", data32.scriptLocation, i18nString$D(UIStrings$T.profileSFinished, { PH1: data32.title }));
      }
      addConsoleProfileMessage(cpuProfilerModel, type2, scriptLocation, messageText) {
        const script = scriptLocation.script();
        const callFrames = [{
          functionName: "",
          scriptId: scriptLocation.scriptId,
          url: script ? script.contentURL() : "",
          lineNumber: scriptLocation.lineNumber,
          columnNumber: scriptLocation.columnNumber || 0
        }];
        this.addMessage(new ConsoleMessage2(cpuProfilerModel.runtimeModel(), FrontendMessageSource.ConsoleAPI, "info", messageText, { type: type2, stackTrace: { callFrames } }));
      }
      incrementErrorWarningCount(msg) {
        if (msg.source === "violation") {
          this.#violations++;
          return;
        }
        switch (msg.level) {
          case "warning":
            this.#warnings++;
            break;
          case "error":
            this.#errors++;
            break;
        }
      }
      messages() {
        return this.#messages;
      }
      static allMessagesUnordered() {
        const messages = [];
        for (const target of TargetManager3.instance().targets()) {
          const targetMessages = target.model(_ConsoleModel)?.messages() || [];
          messages.push(...targetMessages);
        }
        return messages;
      }
      static requestClearMessages() {
        for (const logModel of TargetManager3.instance().models(LogModel)) {
          logModel.requestClear();
        }
        for (const runtimeModel of TargetManager3.instance().models(RuntimeModel)) {
          runtimeModel.discardConsoleEntries();
          runtimeModel.releaseObjectGroup("live-expression");
        }
        for (const target of TargetManager3.instance().targets()) {
          target.model(_ConsoleModel)?.clear();
        }
      }
      clear() {
        this.#messages = [];
        this.#messagesByTimestamp.clear();
        this.#messageByExceptionId.clear();
        this.#errors = 0;
        this.#warnings = 0;
        this.#violations = 0;
        this.dispatchEventToListeners(Events$3.ConsoleCleared);
      }
      errors() {
        return this.#errors;
      }
      static allErrors() {
        let errors2 = 0;
        for (const target of TargetManager3.instance().targets()) {
          errors2 += target.model(_ConsoleModel)?.errors() || 0;
        }
        return errors2;
      }
      warnings() {
        return this.#warnings;
      }
      static allWarnings() {
        let warnings = 0;
        for (const target of TargetManager3.instance().targets()) {
          warnings += target.model(_ConsoleModel)?.warnings() || 0;
        }
        return warnings;
      }
      violations() {
        return this.#violations;
      }
      async saveToTempVariable(currentExecutionContext, remoteObject) {
        if (!remoteObject || !currentExecutionContext) {
          failedToSave(null);
          return;
        }
        const executionContext = currentExecutionContext;
        const result = await executionContext.globalObject("", false);
        if ("error" in result || Boolean(result.exceptionDetails) || !result.object) {
          failedToSave("object" in result && result.object || null);
          return;
        }
        const globalObject = result.object;
        const callFunctionResult = await globalObject.callFunction(saveVariable, [RemoteObject$1.toCallArgument(remoteObject)]);
        globalObject.release();
        if (callFunctionResult.wasThrown || callFunctionResult.object?.type !== "string") {
          failedToSave(callFunctionResult.object || null);
        } else {
          const text = callFunctionResult.object.value;
          const message = this.addCommandMessage(executionContext, text);
          void this.evaluateCommandInConsole(executionContext, message, text, false);
        }
        if (callFunctionResult.object) {
          callFunctionResult.object.release();
        }
        function saveVariable(value) {
          const prefix = "temp";
          let index2 = 1;
          while (prefix + index2 in this) {
            ++index2;
          }
          const name = prefix + index2;
          this[name] = value;
          return name;
        }
        function failedToSave(result2) {
          let message = i18nString$D(UIStrings$T.failedToSaveToTempVariable);
          if (result2) {
            message = message + " " + result2.description;
          }
          Console.instance().error(message);
        }
      }
    };
    (function(Events2) {
      Events2["ConsoleCleared"] = "ConsoleCleared";
      Events2["MessageAdded"] = "MessageAdded";
      Events2["MessageUpdated"] = "MessageUpdated";
      Events2["CommandEvaluated"] = "CommandEvaluated";
    })(Events$3 || (Events$3 = {}));
    ConsoleMessage2 = class _ConsoleMessage {
      #runtimeModel;
      source;
      level;
      messageText;
      type;
      url;
      line;
      column;
      parameters;
      stackTrace;
      timestamp;
      #executionContextId;
      scriptId;
      workerId;
      context;
      #originatingConsoleMessage = null;
      #pageLoadSequenceNumber = void 0;
      #exceptionId = void 0;
      #affectedResources;
      category;
      stackFrameWithBreakpoint = null;
      #originatingBreakpointType = null;
      constructor(runtimeModel, source2, level, messageText, details) {
        this.#runtimeModel = runtimeModel;
        this.source = source2;
        this.level = level;
        this.messageText = messageText;
        this.type = details?.type || "log";
        this.url = details?.url;
        this.line = details?.line || 0;
        this.column = details?.column || 0;
        this.parameters = details?.parameters;
        this.stackTrace = details?.stackTrace;
        this.timestamp = details?.timestamp || Date.now();
        this.#executionContextId = details?.executionContextId || 0;
        this.scriptId = details?.scriptId;
        this.workerId = details?.workerId;
        this.#affectedResources = details?.affectedResources;
        this.category = details?.category;
        if (!this.#executionContextId && this.#runtimeModel) {
          if (this.scriptId) {
            this.#executionContextId = this.#runtimeModel.executionContextIdForScriptId(this.scriptId);
          } else if (this.stackTrace) {
            this.#executionContextId = this.#runtimeModel.executionContextForStackTrace(this.stackTrace);
          }
        }
        if (details?.context) {
          const match = details?.context.match(/[^#]*/);
          this.context = match?.[0];
        }
        if (this.stackTrace) {
          const { callFrame, type: type2 } = _ConsoleMessage.#stackFrameWithBreakpoint(this.stackTrace);
          this.stackFrameWithBreakpoint = callFrame;
          this.#originatingBreakpointType = type2;
        }
      }
      getAffectedResources() {
        return this.#affectedResources;
      }
      setPageLoadSequenceNumber(pageLoadSequenceNumber) {
        this.#pageLoadSequenceNumber = pageLoadSequenceNumber;
      }
      static fromException(runtimeModel, exceptionDetails, messageType, timestamp, forceUrl, affectedResources) {
        const details = {
          type: messageType,
          url: forceUrl || exceptionDetails.url,
          line: exceptionDetails.lineNumber,
          column: exceptionDetails.columnNumber,
          parameters: exceptionDetails.exception ? [RemoteObject$1.fromLocalObject(exceptionDetails.text), exceptionDetails.exception] : void 0,
          stackTrace: exceptionDetails.stackTrace,
          timestamp,
          executionContextId: exceptionDetails.executionContextId,
          scriptId: exceptionDetails.scriptId,
          affectedResources
        };
        return new _ConsoleMessage(runtimeModel, "javascript", "error", RuntimeModel.simpleTextFromException(exceptionDetails), details);
      }
      runtimeModel() {
        return this.#runtimeModel;
      }
      target() {
        return this.#runtimeModel ? this.#runtimeModel.target() : null;
      }
      setOriginatingMessage(originatingMessage) {
        this.#originatingConsoleMessage = originatingMessage;
        this.#executionContextId = originatingMessage.#executionContextId;
      }
      originatingMessage() {
        return this.#originatingConsoleMessage;
      }
      setExecutionContextId(executionContextId) {
        this.#executionContextId = executionContextId;
      }
      getExecutionContextId() {
        return this.#executionContextId;
      }
      getExceptionId() {
        return this.#exceptionId;
      }
      setExceptionId(exceptionId) {
        this.#exceptionId = exceptionId;
      }
      isGroupMessage() {
        return this.type === "startGroup" || this.type === "startGroupCollapsed" || this.type === "endGroup";
      }
      isGroupStartMessage() {
        return this.type === "startGroup" || this.type === "startGroupCollapsed";
      }
      isErrorOrWarning() {
        return this.level === "warning" || this.level === "error";
      }
      isGroupable() {
        const isUngroupableError = this.level === "error" && (this.source === "javascript" || this.source === "network");
        return this.source !== FrontendMessageSource.ConsoleAPI && this.type !== FrontendMessageType.Command && this.type !== FrontendMessageType.Result && this.type !== FrontendMessageType.System && !isUngroupableError;
      }
      groupCategoryKey() {
        return [this.source, this.level, this.type, this.#pageLoadSequenceNumber].join(":");
      }
      isEqual(msg) {
        if (!msg) {
          return false;
        }
        if (this.parameters) {
          if (!msg.parameters || this.parameters.length !== msg.parameters.length) {
            return false;
          }
          for (let i = 0; i < msg.parameters.length; ++i) {
            const msgParam = msg.parameters[i];
            const param = this.parameters[i];
            if (typeof msgParam === "string" || typeof param === "string") {
              return false;
            }
            if (msgParam.type === "object" && msgParam.subtype !== "error") {
              if (!msgParam.objectId || msgParam.objectId !== param.objectId || msg.timestamp !== this.timestamp) {
                return false;
              }
            }
            if (param.type !== msgParam.type || param.value !== msgParam.value || param.description !== msgParam.description) {
              return false;
            }
          }
        }
        return this.runtimeModel() === msg.runtimeModel() && this.source === msg.source && this.type === msg.type && this.level === msg.level && this.line === msg.line && this.url === msg.url && this.scriptId === msg.scriptId && this.messageText === msg.messageText && this.#executionContextId === msg.#executionContextId && areAffectedResourcesEquivalent(this.#affectedResources, msg.#affectedResources) && areStackTracesEquivalent(this.stackTrace, msg.stackTrace);
      }
      get originatesFromLogpoint() {
        return this.#originatingBreakpointType === "LOGPOINT";
      }
      get originatesFromConditionalBreakpoint() {
        return this.#originatingBreakpointType === "CONDITIONAL_BREAKPOINT";
      }
      static #stackFrameWithBreakpoint({ callFrames }) {
        const markerSourceUrls = [COND_BREAKPOINT_SOURCE_URL, LOGPOINT_SOURCE_URL];
        const lastBreakpointFrameIndex = callFrames.findLastIndex(({ url }) => markerSourceUrls.includes(url));
        if (lastBreakpointFrameIndex === -1 || lastBreakpointFrameIndex === callFrames.length - 1) {
          return { callFrame: null, type: null };
        }
        const type2 = callFrames[lastBreakpointFrameIndex].url === LOGPOINT_SOURCE_URL ? "LOGPOINT" : "CONDITIONAL_BREAKPOINT";
        return { callFrame: callFrames[lastBreakpointFrameIndex + 1], type: type2 };
      }
    };
    SDKModel.register(ConsoleModel, { capabilities: 4, autostart: true });
    /* @__PURE__ */ new Map([
      ["xml", "xml"],
      ["javascript", "javascript"],
      ["network", "network"],
      [FrontendMessageSource.ConsoleAPI, "console-api"],
      ["storage", "storage"],
      ["appcache", "appcache"],
      ["rendering", "rendering"],
      [FrontendMessageSource.CSS, "css"],
      ["security", "security"],
      ["deprecation", "deprecation"],
      ["worker", "worker"],
      ["violation", "violation"],
      ["intervention", "intervention"],
      ["recommendation", "recommendation"],
      ["other", "other"],
      [FrontendMessageSource.ISSUE_PANEL, "issue-panel"]
    ]);
    EmulationModel = class extends SDKModel {
      #emulationAgent;
      #deviceOrientationAgent;
      #cssModel;
      #overlayModel;
      #mediaConfiguration;
      #cpuPressureEnabled;
      #touchEnabled;
      #touchMobile;
      #touchEmulationAllowed;
      #customTouchEnabled;
      #touchConfiguration;
      #screenOrientationLocked;
      #lockedOrientation;
      constructor(target) {
        super(target);
        this.#emulationAgent = target.emulationAgent();
        this.#deviceOrientationAgent = target.deviceOrientationAgent();
        this.#screenOrientationLocked = false;
        this.#lockedOrientation = null;
        this.#cssModel = target.model(CSSModel);
        this.#overlayModel = target.model(OverlayModel);
        if (this.#overlayModel) {
          this.#overlayModel.addEventListener("InspectModeWillBeToggled", () => {
            void this.updateTouch();
          }, this);
        }
        const disableJavascriptSetting = Settings.instance().moduleSetting("java-script-disabled");
        disableJavascriptSetting.addChangeListener(async () => await this.#emulationAgent.invoke_setScriptExecutionDisabled({ value: disableJavascriptSetting.get() }));
        if (disableJavascriptSetting.get()) {
          void this.#emulationAgent.invoke_setScriptExecutionDisabled({ value: true });
        }
        const touchSetting = Settings.instance().moduleSetting("emulation.touch");
        touchSetting.addChangeListener(() => {
          const settingValue = touchSetting.get();
          void this.overrideEmulateTouch(settingValue === "force");
        });
        const idleDetectionSetting = Settings.instance().moduleSetting("emulation.idle-detection");
        idleDetectionSetting.addChangeListener(async () => {
          const settingValue = idleDetectionSetting.get();
          if (settingValue === "none") {
            await this.clearIdleOverride();
            return;
          }
          const emulationParams = JSON.parse(settingValue);
          await this.setIdleOverride(emulationParams);
        });
        const cpuPressureDetectionSetting = Settings.instance().moduleSetting("emulation.cpu-pressure");
        cpuPressureDetectionSetting.addChangeListener(async () => {
          const settingValue = cpuPressureDetectionSetting.get();
          if (settingValue === "none") {
            await this.setPressureSourceOverrideEnabled(false);
            this.#cpuPressureEnabled = false;
            return;
          }
          if (!this.#cpuPressureEnabled) {
            this.#cpuPressureEnabled = true;
            await this.setPressureSourceOverrideEnabled(true);
          }
          await this.setPressureStateOverride(settingValue);
        });
        const mediaTypeSetting = Settings.instance().moduleSetting("emulated-css-media");
        const mediaFeatureColorGamutSetting = Settings.instance().moduleSetting("emulated-css-media-feature-color-gamut");
        const mediaFeaturePrefersColorSchemeSetting = Settings.instance().moduleSetting("emulated-css-media-feature-prefers-color-scheme");
        const mediaFeatureForcedColorsSetting = Settings.instance().moduleSetting("emulated-css-media-feature-forced-colors");
        const mediaFeaturePrefersContrastSetting = Settings.instance().moduleSetting("emulated-css-media-feature-prefers-contrast");
        const mediaFeaturePrefersReducedDataSetting = Settings.instance().moduleSetting("emulated-css-media-feature-prefers-reduced-data");
        const mediaFeaturePrefersReducedTransparencySetting = Settings.instance().moduleSetting("emulated-css-media-feature-prefers-reduced-transparency");
        const mediaFeaturePrefersReducedMotionSetting = Settings.instance().moduleSetting("emulated-css-media-feature-prefers-reduced-motion");
        this.#mediaConfiguration = /* @__PURE__ */ new Map([
          ["type", mediaTypeSetting.get()],
          ["color-gamut", mediaFeatureColorGamutSetting.get()],
          ["prefers-color-scheme", mediaFeaturePrefersColorSchemeSetting.get()],
          ["forced-colors", mediaFeatureForcedColorsSetting.get()],
          ["prefers-contrast", mediaFeaturePrefersContrastSetting.get()],
          ["prefers-reduced-data", mediaFeaturePrefersReducedDataSetting.get()],
          ["prefers-reduced-motion", mediaFeaturePrefersReducedMotionSetting.get()],
          ["prefers-reduced-transparency", mediaFeaturePrefersReducedTransparencySetting.get()]
        ]);
        mediaTypeSetting.addChangeListener(() => {
          this.#mediaConfiguration.set("type", mediaTypeSetting.get());
          void this.updateCssMedia();
        });
        mediaFeatureColorGamutSetting.addChangeListener(() => {
          this.#mediaConfiguration.set("color-gamut", mediaFeatureColorGamutSetting.get());
          void this.updateCssMedia();
        });
        mediaFeaturePrefersColorSchemeSetting.addChangeListener(() => {
          this.#mediaConfiguration.set("prefers-color-scheme", mediaFeaturePrefersColorSchemeSetting.get());
          void this.updateCssMedia();
        });
        mediaFeatureForcedColorsSetting.addChangeListener(() => {
          this.#mediaConfiguration.set("forced-colors", mediaFeatureForcedColorsSetting.get());
          void this.updateCssMedia();
        });
        mediaFeaturePrefersContrastSetting.addChangeListener(() => {
          this.#mediaConfiguration.set("prefers-contrast", mediaFeaturePrefersContrastSetting.get());
          void this.updateCssMedia();
        });
        mediaFeaturePrefersReducedDataSetting.addChangeListener(() => {
          this.#mediaConfiguration.set("prefers-reduced-data", mediaFeaturePrefersReducedDataSetting.get());
          void this.updateCssMedia();
        });
        mediaFeaturePrefersReducedMotionSetting.addChangeListener(() => {
          this.#mediaConfiguration.set("prefers-reduced-motion", mediaFeaturePrefersReducedMotionSetting.get());
          void this.updateCssMedia();
        });
        mediaFeaturePrefersReducedTransparencySetting.addChangeListener(() => {
          this.#mediaConfiguration.set("prefers-reduced-transparency", mediaFeaturePrefersReducedTransparencySetting.get());
          void this.updateCssMedia();
        });
        void this.updateCssMedia();
        const autoDarkModeSetting = Settings.instance().moduleSetting("emulate-auto-dark-mode");
        autoDarkModeSetting.addChangeListener(() => {
          const enabled = autoDarkModeSetting.get();
          mediaFeaturePrefersColorSchemeSetting.setDisabled(enabled);
          mediaFeaturePrefersColorSchemeSetting.set(enabled ? "dark" : "");
          void this.emulateAutoDarkMode(enabled);
        });
        if (autoDarkModeSetting.get()) {
          mediaFeaturePrefersColorSchemeSetting.setDisabled(true);
          mediaFeaturePrefersColorSchemeSetting.set("dark");
          void this.emulateAutoDarkMode(true);
        }
        const visionDeficiencySetting = Settings.instance().moduleSetting("emulated-vision-deficiency");
        visionDeficiencySetting.addChangeListener(() => this.emulateVisionDeficiency(visionDeficiencySetting.get()));
        if (visionDeficiencySetting.get()) {
          void this.emulateVisionDeficiency(visionDeficiencySetting.get());
        }
        const osTextScaleSetting = Settings.instance().moduleSetting("emulated-os-text-scale");
        osTextScaleSetting.addChangeListener(() => {
          void this.emulateOSTextScale(parseFloat(osTextScaleSetting.get()) || void 0);
        });
        if (osTextScaleSetting.get()) {
          void this.emulateOSTextScale(parseFloat(osTextScaleSetting.get()) || void 0);
        }
        const localFontsDisabledSetting = Settings.instance().moduleSetting("local-fonts-disabled");
        localFontsDisabledSetting.addChangeListener(() => this.setLocalFontsDisabled(localFontsDisabledSetting.get()));
        if (localFontsDisabledSetting.get()) {
          this.setLocalFontsDisabled(localFontsDisabledSetting.get());
        }
        const avifFormatDisabledSetting = Settings.instance().moduleSetting("avif-format-disabled");
        const jpegXlFormatDisabledSetting = Settings.instance().moduleSetting("jpeg-xl-format-disabled");
        const webpFormatDisabledSetting = Settings.instance().moduleSetting("webp-format-disabled");
        const updateDisabledImageFormats = () => {
          const types2 = [];
          if (avifFormatDisabledSetting.get()) {
            types2.push("avif");
          }
          if (jpegXlFormatDisabledSetting.get()) {
            types2.push("jxl");
          }
          if (webpFormatDisabledSetting.get()) {
            types2.push("webp");
          }
          this.setDisabledImageTypes(types2);
        };
        avifFormatDisabledSetting.addChangeListener(updateDisabledImageFormats);
        jpegXlFormatDisabledSetting.addChangeListener(updateDisabledImageFormats);
        webpFormatDisabledSetting.addChangeListener(updateDisabledImageFormats);
        if (avifFormatDisabledSetting.get() || jpegXlFormatDisabledSetting.get() || webpFormatDisabledSetting.get()) {
          updateDisabledImageFormats();
        }
        this.#cpuPressureEnabled = false;
        this.#touchEmulationAllowed = true;
        this.#touchEnabled = false;
        this.#touchMobile = false;
        this.#customTouchEnabled = false;
        this.#touchConfiguration = {
          enabled: false,
          configuration: "mobile"
        };
        target.registerEmulationDispatcher(this);
      }
      setTouchEmulationAllowed(touchEmulationAllowed) {
        this.#touchEmulationAllowed = touchEmulationAllowed;
      }
      supportsDeviceEmulation() {
        return this.target().hasAllCapabilities(4096);
      }
      async resetPageScaleFactor() {
        await this.#emulationAgent.invoke_resetPageScaleFactor();
      }
      async emulateDevice(metrics2) {
        if (metrics2) {
          await this.#emulationAgent.invoke_setDeviceMetricsOverride(metrics2);
        } else {
          await this.#emulationAgent.invoke_clearDeviceMetricsOverride();
        }
      }
      overlayModel() {
        return this.#overlayModel;
      }
      async setPressureSourceOverrideEnabled(enabled) {
        await this.#emulationAgent.invoke_setPressureSourceOverrideEnabled({ source: "cpu", enabled });
      }
      async setPressureStateOverride(pressureState) {
        await this.#emulationAgent.invoke_setPressureStateOverride({
          source: "cpu",
          state: pressureState
        });
      }
      async emulateLocation(location) {
        if (!location) {
          await Promise.all([
            this.#emulationAgent.invoke_clearGeolocationOverride(),
            this.#emulationAgent.invoke_setTimezoneOverride({ timezoneId: "" }),
            this.#emulationAgent.invoke_setLocaleOverride({ locale: "" }),
            this.#emulationAgent.invoke_setUserAgentOverride({ userAgent: MultitargetNetworkManager.instance().currentUserAgent() })
          ]);
        } else if (location.unavailable) {
          await Promise.all([
            this.#emulationAgent.invoke_setGeolocationOverride({}),
            this.#emulationAgent.invoke_setTimezoneOverride({ timezoneId: "" }),
            this.#emulationAgent.invoke_setLocaleOverride({ locale: "" }),
            this.#emulationAgent.invoke_setUserAgentOverride({ userAgent: MultitargetNetworkManager.instance().currentUserAgent() })
          ]);
        } else {
          let processEmulationResult = function(errorType, result) {
            const errorMessage = result.getError();
            if (errorMessage) {
              return Promise.reject({
                type: errorType,
                message: errorMessage
              });
            }
            return Promise.resolve();
          };
          await Promise.all([
            this.#emulationAgent.invoke_setGeolocationOverride({
              latitude: location.latitude,
              longitude: location.longitude,
              accuracy: location.accuracy
            }).then((result) => processEmulationResult("emulation-set-location", result)),
            this.#emulationAgent.invoke_setTimezoneOverride({
              timezoneId: location.timezoneId
            }).then((result) => processEmulationResult("emulation-set-timezone", result)),
            this.#emulationAgent.invoke_setLocaleOverride({
              locale: location.locale
            }).then((result) => processEmulationResult("emulation-set-locale", result)),
            this.#emulationAgent.invoke_setUserAgentOverride({
              userAgent: MultitargetNetworkManager.instance().currentUserAgent(),
              acceptLanguage: location.locale
            }).then((result) => processEmulationResult("emulation-set-user-agent", result))
          ]);
        }
      }
      async emulateDeviceOrientation(deviceOrientation) {
        if (deviceOrientation) {
          await this.#deviceOrientationAgent.invoke_setDeviceOrientationOverride({ alpha: deviceOrientation.alpha, beta: deviceOrientation.beta, gamma: deviceOrientation.gamma });
        } else {
          await this.#deviceOrientationAgent.invoke_clearDeviceOrientationOverride();
        }
      }
      async setIdleOverride(emulationParams) {
        await this.#emulationAgent.invoke_setIdleOverride(emulationParams);
      }
      async clearIdleOverride() {
        await this.#emulationAgent.invoke_clearIdleOverride();
      }
      async emulateCSSMedia(type2, features) {
        await this.#emulationAgent.invoke_setEmulatedMedia({ media: type2, features });
        if (this.#cssModel) {
          this.#cssModel.mediaQueryResultChanged();
        }
      }
      async emulateAutoDarkMode(enabled) {
        if (enabled) {
          this.#mediaConfiguration.set("prefers-color-scheme", "dark");
          await this.updateCssMedia();
        }
        await this.#emulationAgent.invoke_setAutoDarkModeOverride({ enabled: enabled || void 0 });
      }
      async emulateVisionDeficiency(type2) {
        await this.#emulationAgent.invoke_setEmulatedVisionDeficiency({ type: type2 });
      }
      async emulateOSTextScale(scale) {
        await this.#emulationAgent.invoke_setEmulatedOSTextScale({ scale: scale || void 0 });
      }
      setLocalFontsDisabled(disabled) {
        if (!this.#cssModel) {
          return;
        }
        void this.#cssModel.setLocalFontsEnabled(!disabled);
      }
      setDisabledImageTypes(imageTypes) {
        void this.#emulationAgent.invoke_setDisabledImageTypes({ imageTypes });
      }
      async setDataSaverOverride(dataSaverOverride) {
        const dataSaverEnabled = dataSaverOverride === "unset" ? void 0 : dataSaverOverride === "enabled" ? true : false;
        await this.#emulationAgent.invoke_setDataSaverOverride({ dataSaverEnabled });
      }
      async setCPUThrottlingRate(rate) {
        await this.#emulationAgent.invoke_setCPUThrottlingRate({ rate });
      }
      async setHardwareConcurrency(hardwareConcurrency) {
        if (hardwareConcurrency < 1) {
          throw new Error("hardwareConcurrency must be a positive value");
        }
        await this.#emulationAgent.invoke_setHardwareConcurrencyOverride({ hardwareConcurrency });
      }
      async emulateTouch(enabled, mobile) {
        this.#touchEnabled = enabled && this.#touchEmulationAllowed;
        this.#touchMobile = mobile && this.#touchEmulationAllowed;
        await this.updateTouch();
      }
      async overrideEmulateTouch(enabled) {
        this.#customTouchEnabled = enabled && this.#touchEmulationAllowed;
        await this.updateTouch();
      }
      async updateTouch() {
        let configuration = {
          enabled: this.#touchEnabled,
          configuration: this.#touchMobile ? "mobile" : "desktop"
        };
        if (this.#customTouchEnabled) {
          configuration = {
            enabled: true,
            configuration: "mobile"
          };
        }
        if (this.#overlayModel && this.#overlayModel.inspectModeEnabled()) {
          configuration = {
            enabled: false,
            configuration: "mobile"
          };
        }
        if (!this.#touchConfiguration.enabled && !configuration.enabled) {
          return;
        }
        if (this.#touchConfiguration.enabled && configuration.enabled && this.#touchConfiguration.configuration === configuration.configuration) {
          return;
        }
        this.#touchConfiguration = configuration;
        await this.#emulationAgent.invoke_setTouchEmulationEnabled({ enabled: configuration.enabled, maxTouchPoints: 1 });
        await this.#emulationAgent.invoke_setEmitTouchEventsForMouse({ enabled: configuration.enabled, configuration: configuration.configuration });
      }
      async updateCssMedia() {
        const type2 = this.#mediaConfiguration.get("type") ?? "";
        const features = [
          {
            name: "color-gamut",
            value: this.#mediaConfiguration.get("color-gamut") ?? ""
          },
          {
            name: "prefers-color-scheme",
            value: this.#mediaConfiguration.get("prefers-color-scheme") ?? ""
          },
          {
            name: "forced-colors",
            value: this.#mediaConfiguration.get("forced-colors") ?? ""
          },
          {
            name: "prefers-contrast",
            value: this.#mediaConfiguration.get("prefers-contrast") ?? ""
          },
          {
            name: "prefers-reduced-data",
            value: this.#mediaConfiguration.get("prefers-reduced-data") ?? ""
          },
          {
            name: "prefers-reduced-motion",
            value: this.#mediaConfiguration.get("prefers-reduced-motion") ?? ""
          },
          {
            name: "prefers-reduced-transparency",
            value: this.#mediaConfiguration.get("prefers-reduced-transparency") ?? ""
          }
        ];
        return await this.emulateCSSMedia(type2, features);
      }
      virtualTimeBudgetExpired() {
      }
      screenOrientationLockChanged(event) {
        this.#screenOrientationLocked = event.locked;
        this.#lockedOrientation = event.orientation ?? null;
        this.dispatchEventToListeners("ScreenOrientationLockChanged", { locked: event.locked, orientation: event.orientation ?? null });
      }
      isScreenOrientationLocked() {
        return this.#screenOrientationLocked;
      }
      lockedOrientation() {
        return this.#lockedOrientation;
      }
    };
    SDKModel.register(EmulationModel, { capabilities: 256, autostart: true });
    UIStrings$S = {
      noThrottling: "No throttling",
      dSlowdown: "{PH1}\xD7 slowdown",
      calibratedMidTierMobile: "Mid-tier mobile",
      calibratedLowTierMobile: "Low-tier mobile",
      calibrationErrorDeviceTooWeak: "Device is not powerful enough"
    };
    str_$R = registerUIStrings("core/sdk/CPUThrottlingManager.ts", UIStrings$S);
    getLocalizedString.bind(void 0, str_$R);
    i18nLazyString$d = getLazilyComputedLocalizedString.bind(void 0, str_$R);
    (function(CPUThrottlingRates2) {
      CPUThrottlingRates2[CPUThrottlingRates2["NO_THROTTLING"] = 1] = "NO_THROTTLING";
      CPUThrottlingRates2[CPUThrottlingRates2["MID_TIER_MOBILE"] = 4] = "MID_TIER_MOBILE";
      CPUThrottlingRates2[CPUThrottlingRates2["LOW_TIER_MOBILE"] = 6] = "LOW_TIER_MOBILE";
      CPUThrottlingRates2[CPUThrottlingRates2["EXTRA_SLOW"] = 20] = "EXTRA_SLOW";
      CPUThrottlingRates2[CPUThrottlingRates2["MidTierMobile"] = 4] = "MidTierMobile";
      CPUThrottlingRates2[CPUThrottlingRates2["LowEndMobile"] = 6] = "LowEndMobile";
    })(CPUThrottlingRates || (CPUThrottlingRates = {}));
    makeFixedPresetThrottlingOption(CPUThrottlingRates.NO_THROTTLING);
    makeFixedPresetThrottlingOption(CPUThrottlingRates.MID_TIER_MOBILE);
    makeFixedPresetThrottlingOption(CPUThrottlingRates.LOW_TIER_MOBILE);
    makeFixedPresetThrottlingOption(CPUThrottlingRates.EXTRA_SLOW);
    (function(CalibrationError2) {
      CalibrationError2["DEVICE_TOO_WEAK"] = "DEVICE_TOO_WEAK";
    })(CalibrationError || (CalibrationError = {}));
    DOMDebuggerModel = class extends SDKModel {
      agent;
      #runtimeModel;
      #domModel;
      #domBreakpoints;
      #domBreakpointsSetting;
      suspended = false;
      constructor(target) {
        super(target);
        this.agent = target.domdebuggerAgent();
        this.#runtimeModel = target.model(RuntimeModel);
        this.#domModel = target.model(DOMModel);
        this.#domModel.addEventListener(Events$8.DocumentUpdated, this.documentUpdated, this);
        this.#domModel.addEventListener(Events$8.NodeRemoved, this.nodeRemoved, this);
        this.#domBreakpoints = [];
        this.#domBreakpointsSetting = Settings.instance().createLocalSetting("dom-breakpoints", []);
        if (this.#domModel.existingDocument()) {
          void this.documentUpdated();
        }
      }
      runtimeModel() {
        return this.#runtimeModel;
      }
      async suspendModel() {
        this.suspended = true;
      }
      async resumeModel() {
        this.suspended = false;
      }
      async eventListeners(remoteObject) {
        console.assert(remoteObject.runtimeModel() === this.#runtimeModel);
        if (!remoteObject.objectId) {
          return [];
        }
        const listeners = await this.agent.invoke_getEventListeners({ objectId: remoteObject.objectId });
        const eventListeners = [];
        for (const payload of listeners.listeners || []) {
          const location = this.#runtimeModel.debuggerModel().createRawLocationByScriptId(payload.scriptId, payload.lineNumber, payload.columnNumber);
          if (!location) {
            continue;
          }
          eventListeners.push(new EventListener(this, remoteObject, payload.type, payload.useCapture, payload.passive, payload.once, payload.handler ? this.#runtimeModel.createRemoteObject(payload.handler) : null, payload.originalHandler ? this.#runtimeModel.createRemoteObject(payload.originalHandler) : null, location, null));
        }
        return eventListeners;
      }
      retrieveDOMBreakpoints() {
        void this.#domModel.requestDocument();
      }
      domBreakpoints() {
        return this.#domBreakpoints.slice();
      }
      hasDOMBreakpoint(node2, type2) {
        return this.#domBreakpoints.some((breakpoint) => breakpoint.node === node2 && breakpoint.type === type2);
      }
      setDOMBreakpoint(node2, type2) {
        for (const breakpoint2 of this.#domBreakpoints) {
          if (breakpoint2.node === node2 && breakpoint2.type === type2) {
            this.toggleDOMBreakpoint(breakpoint2, true);
            return breakpoint2;
          }
        }
        const breakpoint = new DOMBreakpoint(this, node2, type2, true);
        this.#domBreakpoints.push(breakpoint);
        this.enableDOMBreakpoint(breakpoint);
        this.saveDOMBreakpoints();
        this.dispatchEventToListeners("DOMBreakpointAdded", breakpoint);
        return breakpoint;
      }
      removeDOMBreakpoint(node2, type2) {
        this.removeDOMBreakpoints((breakpoint) => breakpoint.node === node2 && breakpoint.type === type2);
      }
      removeAllDOMBreakpoints() {
        this.removeDOMBreakpoints((_breakpoint) => true);
      }
      toggleDOMBreakpoint(breakpoint, enabled) {
        if (enabled === breakpoint.enabled) {
          return;
        }
        breakpoint.enabled = enabled;
        if (enabled) {
          this.enableDOMBreakpoint(breakpoint);
        } else {
          this.disableDOMBreakpoint(breakpoint);
        }
        this.saveDOMBreakpoints();
        this.dispatchEventToListeners("DOMBreakpointToggled", breakpoint);
      }
      enableDOMBreakpoint(breakpoint) {
        if (breakpoint.node.id) {
          void this.agent.invoke_setDOMBreakpoint({ nodeId: breakpoint.node.id, type: breakpoint.type });
          breakpoint.node.setMarker(Marker, true);
        }
      }
      disableDOMBreakpoint(breakpoint) {
        if (breakpoint.node.id) {
          void this.agent.invoke_removeDOMBreakpoint({ nodeId: breakpoint.node.id, type: breakpoint.type });
          breakpoint.node.setMarker(Marker, this.nodeHasBreakpoints(breakpoint.node) ? true : null);
        }
      }
      nodeHasBreakpoints(node2) {
        for (const breakpoint of this.#domBreakpoints) {
          if (breakpoint.node === node2 && breakpoint.enabled) {
            return true;
          }
        }
        return false;
      }
      resolveDOMBreakpointData(auxData) {
        const type2 = auxData["type"];
        const node2 = this.#domModel.nodeForId(auxData["nodeId"]);
        if (!type2 || !node2) {
          return null;
        }
        let targetNode = null;
        let insertion = false;
        if (type2 === "subtree-modified") {
          insertion = auxData["insertion"] || false;
          targetNode = this.#domModel.nodeForId(auxData["targetNodeId"]);
        }
        return { type: type2, node: node2, targetNode, insertion };
      }
      currentURL() {
        const domDocument = this.#domModel.existingDocument();
        return domDocument ? domDocument.documentURL : EmptyUrlString;
      }
      async documentUpdated() {
        if (this.suspended) {
          return;
        }
        const removed = this.#domBreakpoints;
        this.#domBreakpoints = [];
        this.dispatchEventToListeners("DOMBreakpointsRemoved", removed);
        const document2 = await this.#domModel.requestDocument();
        const currentURL = document2 ? document2.documentURL : EmptyUrlString;
        for (const breakpoint of this.#domBreakpointsSetting.get()) {
          if (breakpoint.url === currentURL) {
            void this.#domModel.pushNodeByPathToFrontend(breakpoint.path).then(appendBreakpoint.bind(this, breakpoint));
          }
        }
        function appendBreakpoint(breakpoint, nodeId) {
          const node2 = nodeId ? this.#domModel.nodeForId(nodeId) : null;
          if (!node2) {
            return;
          }
          for (const existingBreakpoint of this.#domBreakpoints) {
            if (existingBreakpoint.node === node2 && existingBreakpoint.type === breakpoint.type) {
              return;
            }
          }
          const domBreakpoint = new DOMBreakpoint(this, node2, breakpoint.type, breakpoint.enabled);
          this.#domBreakpoints.push(domBreakpoint);
          if (breakpoint.enabled) {
            this.enableDOMBreakpoint(domBreakpoint);
          }
          this.dispatchEventToListeners("DOMBreakpointAdded", domBreakpoint);
        }
      }
      removeDOMBreakpoints(filter2) {
        const removed = [];
        const left2 = [];
        for (const breakpoint of this.#domBreakpoints) {
          if (filter2(breakpoint)) {
            removed.push(breakpoint);
            if (breakpoint.enabled) {
              breakpoint.enabled = false;
              this.disableDOMBreakpoint(breakpoint);
            }
          } else {
            left2.push(breakpoint);
          }
        }
        if (!removed.length) {
          return;
        }
        this.#domBreakpoints = left2;
        this.saveDOMBreakpoints();
        this.dispatchEventToListeners("DOMBreakpointsRemoved", removed);
      }
      nodeRemoved(event) {
        if (this.suspended) {
          return;
        }
        const { node: node2 } = event.data;
        const children = node2.children() || [];
        this.removeDOMBreakpoints((breakpoint) => breakpoint.node === node2 || children.indexOf(breakpoint.node) !== -1);
      }
      saveDOMBreakpoints() {
        const currentURL = this.currentURL();
        const breakpoints = this.#domBreakpointsSetting.get().filter((breakpoint) => breakpoint.url !== currentURL);
        for (const breakpoint of this.#domBreakpoints) {
          breakpoints.push({ url: currentURL, path: breakpoint.node.path(), type: breakpoint.type, enabled: breakpoint.enabled });
        }
        this.#domBreakpointsSetting.set(breakpoints);
      }
    };
    Marker = "breakpoint-marker";
    DOMBreakpoint = class {
      domDebuggerModel;
      node;
      type;
      enabled;
      constructor(domDebuggerModel, node2, type2, enabled) {
        this.domDebuggerModel = domDebuggerModel;
        this.node = node2;
        this.type = type2;
        this.enabled = enabled;
      }
    };
    EventListener = class {
      #domDebuggerModel;
      #eventTarget;
      #type;
      #useCapture;
      #passive;
      #once;
      #handler;
      #originalHandler;
      #location;
      #sourceURL;
      #customRemoveFunction;
      #origin;
      constructor(domDebuggerModel, eventTarget2, type2, useCapture, passive, once, handler, originalHandler, location, customRemoveFunction, origin) {
        this.#domDebuggerModel = domDebuggerModel;
        this.#eventTarget = eventTarget2;
        this.#type = type2;
        this.#useCapture = useCapture;
        this.#passive = passive;
        this.#once = once;
        this.#handler = handler;
        this.#originalHandler = originalHandler || handler;
        this.#location = location;
        const script = location.script();
        this.#sourceURL = script ? script.contentURL() : EmptyUrlString;
        this.#customRemoveFunction = customRemoveFunction;
        this.#origin = origin || "Raw";
      }
      domDebuggerModel() {
        return this.#domDebuggerModel;
      }
      type() {
        return this.#type;
      }
      useCapture() {
        return this.#useCapture;
      }
      passive() {
        return this.#passive;
      }
      once() {
        return this.#once;
      }
      handler() {
        return this.#handler;
      }
      location() {
        return this.#location;
      }
      sourceURL() {
        return this.#sourceURL;
      }
      originalHandler() {
        return this.#originalHandler;
      }
      canRemove() {
        return Boolean(this.#customRemoveFunction) || this.#origin !== "FrameworkUser";
      }
      remove() {
        if (!this.canRemove()) {
          return Promise.resolve(void 0);
        }
        if (this.#origin !== "FrameworkUser") {
          let removeListener = function(type2, listener, useCapture) {
            this.removeEventListener(type2, listener, useCapture);
            if (this["on" + type2]) {
              this["on" + type2] = void 0;
            }
          };
          return this.#eventTarget.callFunction(removeListener, [
            RemoteObject$1.toCallArgument(this.#type),
            RemoteObject$1.toCallArgument(this.#originalHandler),
            RemoteObject$1.toCallArgument(this.#useCapture)
          ]).then(() => void 0);
        }
        if (this.#customRemoveFunction) {
          let callCustomRemove = function(type2, listener, useCapture, passive) {
            this.call(null, type2, listener, useCapture, passive);
          };
          return this.#customRemoveFunction.callFunction(callCustomRemove, [
            RemoteObject$1.toCallArgument(this.#type),
            RemoteObject$1.toCallArgument(this.#originalHandler),
            RemoteObject$1.toCallArgument(this.#useCapture),
            RemoteObject$1.toCallArgument(this.#passive)
          ]).then(() => void 0);
        }
        return Promise.resolve(void 0);
      }
      canTogglePassive() {
        return this.#origin !== "FrameworkUser";
      }
      togglePassive() {
        return this.#eventTarget.callFunction(callTogglePassive, [
          RemoteObject$1.toCallArgument(this.#type),
          RemoteObject$1.toCallArgument(this.#originalHandler),
          RemoteObject$1.toCallArgument(this.#useCapture),
          RemoteObject$1.toCallArgument(this.#passive)
        ]).then(() => void 0);
        function callTogglePassive(type2, listener, useCapture, passive) {
          this.removeEventListener(type2, listener, { capture: useCapture });
          this.addEventListener(type2, listener, { capture: useCapture, passive: !passive });
        }
      }
      origin() {
        return this.#origin;
      }
      markAsFramework() {
        this.#origin = "Framework";
      }
      isScrollBlockingType() {
        return this.#type === "touchstart" || this.#type === "touchmove" || this.#type === "mousewheel" || this.#type === "wheel";
      }
    };
    SDKModel.register(DOMDebuggerModel, { capabilities: 2, autostart: false });
    EventBreakpointsModel = class extends SDKModel {
      agent;
      constructor(target) {
        super(target);
        this.agent = target.eventBreakpointsAgent();
      }
    };
    SDKModel.register(EventBreakpointsModel, { capabilities: 524288, autostart: false });
    IssuesModel = class extends SDKModel {
      #disposed = false;
      #enabled = false;
      constructor(target) {
        super(target);
        void this.ensureEnabled();
      }
      async ensureEnabled() {
        if (this.#enabled) {
          return;
        }
        this.#enabled = true;
        this.target().registerAuditsDispatcher(this);
        const auditsAgent = this.target().auditsAgent();
        await auditsAgent.invoke_enable();
      }
      issueAdded(issueAddedEvent) {
        this.dispatchEventToListeners("IssueAdded", { issuesModel: this, inspectorIssue: issueAddedEvent.issue });
      }
      dispose() {
        super.dispose();
        this.#disposed = true;
      }
      getTargetIfNotDisposed() {
        if (!this.#disposed) {
          return this.target();
        }
        return null;
      }
    };
    SDKModel.register(IssuesModel, { capabilities: 32768, autostart: true });
    PageLoad = class _PageLoad {
      id;
      url;
      startTime;
      loadTime;
      contentLoadTime;
      mainRequest;
      constructor(mainRequest) {
        this.id = ++_PageLoad.lastIdentifier;
        this.url = mainRequest.url();
        this.startTime = mainRequest.startTime;
        this.mainRequest = mainRequest;
      }
      static forRequest(request3) {
        return pageLoadForRequest.get(request3) || null;
      }
      bindRequest(request3) {
        pageLoadForRequest.set(request3, this);
      }
      static lastIdentifier = 0;
    };
    pageLoadForRequest = /* @__PURE__ */ new WeakMap();
    PaintProfilerModel = class extends SDKModel {
      layerTreeAgent;
      constructor(target) {
        super(target);
        this.layerTreeAgent = target.layerTreeAgent();
      }
      async loadSnapshotFromFragments(tiles) {
        const { snapshotId } = await this.layerTreeAgent.invoke_loadSnapshot({ tiles });
        return snapshotId ? new PaintProfilerSnapshot(this, snapshotId) : null;
      }
      loadSnapshot(encodedPicture) {
        const fragment = { x: 0, y: 0, picture: encodedPicture };
        return this.loadSnapshotFromFragments([fragment]);
      }
      async makeSnapshot(layerId) {
        const { snapshotId } = await this.layerTreeAgent.invoke_makeSnapshot({ layerId });
        return snapshotId ? new PaintProfilerSnapshot(this, snapshotId) : null;
      }
    };
    PaintProfilerSnapshot = class {
      #paintProfilerModel;
      #id;
      #refCount;
      constructor(paintProfilerModel, snapshotId) {
        this.#paintProfilerModel = paintProfilerModel;
        this.#id = snapshotId;
        this.#refCount = 1;
      }
      release() {
        console.assert(this.#refCount > 0, "release is already called on the object");
        if (!--this.#refCount) {
          void this.#paintProfilerModel.layerTreeAgent.invoke_releaseSnapshot({ snapshotId: this.#id });
        }
      }
      addReference() {
        ++this.#refCount;
        console.assert(this.#refCount > 0, "Referencing a dead object");
      }
      async replay(scale, fromStep, toStep) {
        const response = await this.#paintProfilerModel.layerTreeAgent.invoke_replaySnapshot({ snapshotId: this.#id, fromStep, toStep, scale: scale || 1 });
        return response.dataURL;
      }
      async profile(clipRect) {
        const response = await this.#paintProfilerModel.layerTreeAgent.invoke_profileSnapshot({ snapshotId: this.#id, minRepeatCount: 5, minDuration: 1, clipRect: clipRect || void 0 });
        return response.timings;
      }
      async commandLog() {
        const response = await this.#paintProfilerModel.layerTreeAgent.invoke_snapshotCommandLog({ snapshotId: this.#id });
        return response.commandLog ? response.commandLog.map((entry, index2) => new PaintProfilerLogItem(entry, index2)) : null;
      }
    };
    PaintProfilerLogItem = class {
      method;
      params;
      commandIndex;
      constructor(rawEntry, commandIndex) {
        this.method = rawEntry.method;
        this.params = rawEntry.params;
        this.commandIndex = commandIndex;
      }
    };
    SDKModel.register(PaintProfilerModel, { capabilities: 2, autostart: false });
    PerformanceMetricsModel = class extends SDKModel {
      #agent;
      #metricModes = /* @__PURE__ */ new Map([
        ["TaskDuration", "CumulativeTime"],
        ["ScriptDuration", "CumulativeTime"],
        ["LayoutDuration", "CumulativeTime"],
        ["RecalcStyleDuration", "CumulativeTime"],
        ["LayoutCount", "CumulativeCount"],
        ["RecalcStyleCount", "CumulativeCount"]
      ]);
      #metricData = /* @__PURE__ */ new Map();
      constructor(target) {
        super(target);
        this.#agent = target.performanceAgent();
      }
      enable() {
        return this.#agent.invoke_enable({});
      }
      disable() {
        return this.#agent.invoke_disable();
      }
      async requestMetrics() {
        const rawMetrics = await this.#agent.invoke_getMetrics() || [];
        const metrics2 = /* @__PURE__ */ new Map();
        const timestamp = performance.now();
        for (const metric of rawMetrics.metrics) {
          let data32 = this.#metricData.get(metric.name);
          if (!data32) {
            data32 = { lastValue: void 0, lastTimestamp: void 0 };
            this.#metricData.set(metric.name, data32);
          }
          let value;
          switch (this.#metricModes.get(metric.name)) {
            case "CumulativeTime":
              value = data32.lastTimestamp && data32.lastValue ? clamp$1((metric.value - data32.lastValue) * 1e3 / (timestamp - data32.lastTimestamp), 0, 1) : 0;
              data32.lastValue = metric.value;
              data32.lastTimestamp = timestamp;
              break;
            case "CumulativeCount":
              value = data32.lastTimestamp && data32.lastValue ? Math.max(0, (metric.value - data32.lastValue) * 1e3 / (timestamp - data32.lastTimestamp)) : 0;
              data32.lastValue = metric.value;
              data32.lastTimestamp = timestamp;
              break;
            default:
              value = metric.value;
              break;
          }
          metrics2.set(metric.name, value);
        }
        return { metrics: metrics2, timestamp };
      }
    };
    SDKModel.register(PerformanceMetricsModel, { capabilities: 2, autostart: false });
    PreloadingModel = class _PreloadingModel extends SDKModel {
      agent;
      loaderIds = [];
      targetJustAttached = true;
      lastPrimaryPageModel = null;
      documents = /* @__PURE__ */ new Map();
      constructor(target) {
        super(target);
        target.registerPreloadDispatcher(new PreloadDispatcher(this));
        this.agent = target.preloadAgent();
        void this.agent.invoke_enable();
        const targetInfo = target.targetInfo();
        if (targetInfo?.subtype === "prerender") {
          this.lastPrimaryPageModel = TargetManager3.instance().primaryPageTarget()?.model(_PreloadingModel) || null;
        }
        TargetManager3.instance().addModelListener(ResourceTreeModel, Events$6.PrimaryPageChanged, this.onPrimaryPageChanged, this);
      }
      dispose() {
        super.dispose();
        TargetManager3.instance().removeModelListener(ResourceTreeModel, Events$6.PrimaryPageChanged, this.onPrimaryPageChanged, this);
        void this.agent.invoke_disable();
      }
      reset() {
        this.documents.clear();
        this.loaderIds = [];
        this.targetJustAttached = true;
        this.dispatchEventToListeners("ModelUpdated");
      }
      maybeInferLoaderId(loaderId) {
        if (this.currentLoaderId() === null) {
          this.loaderIds = [loaderId];
          this.targetJustAttached = false;
        }
      }
      ensureDocumentPreloadingData(loaderId) {
        if (this.documents.get(loaderId) === void 0) {
          this.documents.set(loaderId, new DocumentPreloadingData());
        }
      }
      currentLoaderId() {
        if (this.targetJustAttached) {
          return null;
        }
        if (this.loaderIds.length === 0) {
          throw new Error("unreachable");
        }
        return this.loaderIds[this.loaderIds.length - 1];
      }
      currentDocument() {
        const loaderId = this.currentLoaderId();
        return loaderId === null ? null : this.documents.get(loaderId) || null;
      }
      getRuleSetById(id2) {
        return this.currentDocument()?.ruleSets.getById(id2) || null;
      }
      getAllRuleSets() {
        return this.currentDocument()?.ruleSets.getAll() || [];
      }
      getPreloadCountsByRuleSetId() {
        const countsByRuleSetId = /* @__PURE__ */ new Map();
        for (const { value } of this.getRepresentativePreloadingAttempts(null)) {
          for (const ruleSetId of [null, ...value.ruleSetIds]) {
            if (countsByRuleSetId.get(ruleSetId) === void 0) {
              countsByRuleSetId.set(ruleSetId, /* @__PURE__ */ new Map());
            }
            const countsByStatus = countsByRuleSetId.get(ruleSetId);
            assertNotNullOrUndefined2(countsByStatus);
            const i = countsByStatus.get(value.status) || 0;
            countsByStatus.set(value.status, i + 1);
          }
        }
        return countsByRuleSetId;
      }
      getPreloadingAttemptById(id2) {
        const document2 = this.currentDocument();
        if (document2 === null) {
          return null;
        }
        return document2.preloadingAttempts.getById(id2, document2.sources) || null;
      }
      getRepresentativePreloadingAttempts(ruleSetId) {
        const document2 = this.currentDocument();
        if (document2 === null) {
          return [];
        }
        return document2.preloadingAttempts.getAllRepresentative(ruleSetId, document2.sources);
      }
      getRepresentativePreloadingAttemptsOfPreviousPage() {
        if (this.loaderIds.length <= 1) {
          return [];
        }
        const document2 = this.documents.get(this.loaderIds[this.loaderIds.length - 2]);
        if (document2 === void 0) {
          return [];
        }
        return document2.preloadingAttempts.getAllRepresentative(null, document2.sources);
      }
      getPipelineById(pipelineId) {
        const document2 = this.currentDocument();
        if (document2 === null) {
          return null;
        }
        return document2.preloadingAttempts.getPipeline(pipelineId, document2.sources);
      }
      getPipeline(attempt) {
        let pipelineNullable = null;
        if (attempt.pipelineId !== null) {
          pipelineNullable = this.getPipelineById(attempt.pipelineId);
        }
        if (pipelineNullable === null) {
          const pipeline = /* @__PURE__ */ new Map();
          pipeline.set(attempt.action, attempt);
          return new PreloadPipeline(pipeline);
        }
        return new PreloadPipeline(pipelineNullable);
      }
      onPrimaryPageChanged(event) {
        const { frame, type: type2 } = event.data;
        if (this.lastPrimaryPageModel === null && type2 === "Activation") {
          return;
        }
        if (this.lastPrimaryPageModel !== null && type2 !== "Activation") {
          return;
        }
        if (this.lastPrimaryPageModel !== null && type2 === "Activation") {
          this.loaderIds = this.lastPrimaryPageModel.loaderIds;
          for (const [loaderId, prev] of this.lastPrimaryPageModel.documents.entries()) {
            this.ensureDocumentPreloadingData(loaderId);
            this.documents.get(loaderId)?.mergePrevious(prev);
          }
        }
        this.lastPrimaryPageModel = null;
        const currentLoaderId = frame.loaderId;
        this.loaderIds.push(currentLoaderId);
        this.loaderIds = this.loaderIds.slice(-2);
        this.ensureDocumentPreloadingData(currentLoaderId);
        for (const loaderId of this.documents.keys()) {
          if (!this.loaderIds.includes(loaderId)) {
            this.documents.delete(loaderId);
          }
        }
        this.dispatchEventToListeners("ModelUpdated");
      }
      onRuleSetUpdated(event) {
        const ruleSet = event.ruleSet;
        const loaderId = ruleSet.loaderId;
        this.maybeInferLoaderId(loaderId);
        this.ensureDocumentPreloadingData(loaderId);
        this.documents.get(loaderId)?.ruleSets.upsert(ruleSet);
        this.dispatchEventToListeners("ModelUpdated");
      }
      onRuleSetRemoved(event) {
        const id2 = event.id;
        for (const document2 of this.documents.values()) {
          document2.ruleSets.delete(id2);
        }
        this.dispatchEventToListeners("ModelUpdated");
      }
      onPreloadingAttemptSourcesUpdated(event) {
        const loaderId = event.loaderId;
        this.ensureDocumentPreloadingData(loaderId);
        const document2 = this.documents.get(loaderId);
        if (document2 === void 0) {
          return;
        }
        document2.sources.update(event.preloadingAttemptSources);
        document2.preloadingAttempts.maybeRegisterNotTriggered(document2.sources);
        document2.preloadingAttempts.cleanUpRemovedAttempts(document2.sources);
        this.dispatchEventToListeners("ModelUpdated");
      }
      onPrefetchStatusUpdated(event) {
        if (event.prefetchStatus === "PrefetchEvictedAfterCandidateRemoved") {
          return;
        }
        const loaderId = event.key.loaderId;
        this.ensureDocumentPreloadingData(loaderId);
        const attempt = {
          action: "Prefetch",
          key: event.key,
          pipelineId: event.pipelineId,
          status: convertPreloadingStatus(event.status),
          prefetchStatus: event.prefetchStatus || null,
          requestId: event.requestId
        };
        this.documents.get(loaderId)?.preloadingAttempts.upsert(attempt);
        this.dispatchEventToListeners("ModelUpdated");
      }
      onPrerenderStatusUpdated(event) {
        const loaderId = event.key.loaderId;
        this.ensureDocumentPreloadingData(loaderId);
        let attempt;
        switch (event.key.action) {
          case "Prerender":
            attempt = {
              action: event.key.action,
              key: event.key,
              pipelineId: event.pipelineId,
              status: convertPreloadingStatus(event.status),
              prerenderStatus: event.prerenderStatus || null,
              disallowedMojoInterface: event.disallowedMojoInterface || null,
              mismatchedHeaders: event.mismatchedHeaders || null
            };
            break;
          case "PrerenderUntilScript":
            attempt = {
              action: event.key.action,
              key: event.key,
              pipelineId: event.pipelineId,
              status: convertPreloadingStatus(event.status),
              prerenderStatus: event.prerenderStatus || null,
              disallowedMojoInterface: event.disallowedMojoInterface || null,
              mismatchedHeaders: event.mismatchedHeaders || null
            };
            break;
          default:
            throw new Error(`unreachable: event.key.action: ${event.key.action}`);
        }
        this.documents.get(loaderId)?.preloadingAttempts.upsert(attempt);
        this.dispatchEventToListeners("ModelUpdated");
      }
      onPreloadEnabledStateUpdated(event) {
        this.dispatchEventToListeners("WarningsUpdated", event);
      }
    };
    SDKModel.register(PreloadingModel, { capabilities: 2, autostart: false });
    PreloadDispatcher = class {
      model;
      constructor(model3) {
        this.model = model3;
      }
      ruleSetUpdated(event) {
        this.model.onRuleSetUpdated(event);
      }
      ruleSetRemoved(event) {
        this.model.onRuleSetRemoved(event);
      }
      preloadingAttemptSourcesUpdated(event) {
        this.model.onPreloadingAttemptSourcesUpdated(event);
      }
      prefetchStatusUpdated(event) {
        this.model.onPrefetchStatusUpdated(event);
      }
      prerenderStatusUpdated(event) {
        this.model.onPrerenderStatusUpdated(event);
      }
      preloadEnabledStateUpdated(event) {
        void this.model.onPreloadEnabledStateUpdated(event);
      }
    };
    DocumentPreloadingData = class {
      ruleSets = new RuleSetRegistry();
      preloadingAttempts = new PreloadingAttemptRegistry();
      sources = new SourceRegistry();
      mergePrevious(prev) {
        if (!this.ruleSets.isEmpty() || !this.sources.isEmpty()) {
          throw new Error("unreachable");
        }
        this.ruleSets = prev.ruleSets;
        this.preloadingAttempts.mergePrevious(prev.preloadingAttempts);
        this.sources = prev.sources;
      }
    };
    RuleSetRegistry = class {
      map = /* @__PURE__ */ new Map();
      isEmpty() {
        return this.map.size === 0;
      }
      getById(id2) {
        return this.map.get(id2) || null;
      }
      getAll() {
        return Array.from(this.map.entries()).map(([id2, value]) => ({ id: id2, value }));
      }
      upsert(ruleSet) {
        this.map.set(ruleSet.id, ruleSet);
      }
      delete(id2) {
        this.map.delete(id2);
      }
    };
    PreloadPipeline = class _PreloadPipeline {
      inner;
      constructor(inner) {
        if (inner.size === 0) {
          throw new Error("unreachable");
        }
        this.inner = inner;
      }
      static newFromAttemptsForTesting(attempts) {
        const inner = /* @__PURE__ */ new Map();
        for (const attempt of attempts) {
          inner.set(attempt.action, attempt);
        }
        return new _PreloadPipeline(inner);
      }
      getOriginallyTriggered() {
        const attempt = this.getPrerender() || this.getPrerenderUntilScript() || this.getPrefetch();
        assertNotNullOrUndefined2(attempt);
        return attempt;
      }
      getPrefetch() {
        return this.inner.get("Prefetch") || null;
      }
      getPrerender() {
        return this.inner.get("Prerender") || null;
      }
      getPrerenderUntilScript() {
        return this.inner.get("PrerenderUntilScript") || null;
      }
      getAttempts() {
        const ret = [];
        const prefetch = this.getPrefetch();
        if (prefetch !== null) {
          ret.push(prefetch);
        }
        const prerender = this.getPrerender();
        if (prerender !== null) {
          ret.push(prerender);
        }
        const prerenderUntilScript = this.getPrerenderUntilScript();
        if (prerenderUntilScript !== null) {
          ret.push(prerenderUntilScript);
        }
        if (ret.length === 0) {
          throw new Error("unreachable");
        }
        return ret;
      }
    };
    PreloadingAttemptRegistry = class {
      map = /* @__PURE__ */ new Map();
      pipelines = new MapWithDefault();
      enrich(attempt, source2) {
        let ruleSetIds = [];
        let nodeIds = [];
        if (source2 !== null) {
          ruleSetIds = source2.ruleSetIds;
          nodeIds = source2.nodeIds;
        }
        return {
          ...attempt,
          ruleSetIds,
          nodeIds
        };
      }
      isAttemptRepresentative(attempt) {
        function getSortKey(action) {
          switch (action) {
            case "Prefetch":
              return 0;
            case "PrerenderUntilScript":
              return 1;
            case "Prerender":
              return 2;
          }
        }
        if (attempt.pipelineId === null) {
          return true;
        }
        const pipeline = this.pipelines.get(attempt.pipelineId);
        assertNotNullOrUndefined2(pipeline);
        if (pipeline.size === 0) {
          throw new Error("unreachable");
        }
        return [...pipeline.keys()].every((action) => getSortKey(action) <= getSortKey(attempt.action));
      }
      getById(id2, sources) {
        const attempt = this.map.get(id2) || null;
        if (attempt === null) {
          return null;
        }
        return this.enrich(attempt, sources.getById(id2));
      }
      getAllRepresentative(ruleSetId, sources) {
        return [...this.map.entries()].map(([id2, value]) => ({ id: id2, value: this.enrich(value, sources.getById(id2)) })).filter(({ value }) => !ruleSetId || value.ruleSetIds.includes(ruleSetId)).filter(({ value }) => this.isAttemptRepresentative(value));
      }
      getPipeline(pipelineId, sources) {
        const pipeline = this.pipelines.get(pipelineId);
        if (pipeline === void 0 || pipeline.size === 0) {
          return null;
        }
        for (const [id2, attempt] of this.map.entries()) {
        }
        return new Map(pipeline.entries().map(([action, id2]) => {
          const attempt = this.getById(id2, sources);
          assertNotNullOrUndefined2(attempt);
          return [action, attempt];
        }));
      }
      upsert(attempt) {
        const id2 = makePreloadingAttemptId(attempt.key);
        this.map.set(id2, attempt);
        if (attempt.pipelineId !== null) {
          this.pipelines.getOrInsertComputed(attempt.pipelineId, () => /* @__PURE__ */ new Map()).set(attempt.action, id2);
        }
      }
      reconstructPipelines() {
        this.pipelines.clear();
        for (const [id2, attempt] of this.map.entries()) {
          if (attempt.pipelineId === null) {
            continue;
          }
          const pipeline = this.pipelines.getOrInsertComputed(attempt.pipelineId, () => /* @__PURE__ */ new Map());
          pipeline.set(attempt.action, id2);
        }
      }
      maybeRegisterNotTriggered(sources) {
        for (const [id2, { key }] of sources.entries()) {
          if (this.map.get(id2) !== void 0) {
            continue;
          }
          let attempt;
          switch (key.action) {
            case "Prefetch":
              attempt = {
                action: "Prefetch",
                key,
                pipelineId: null,
                status: "NotTriggered",
                prefetchStatus: null,
                requestId: ""
              };
              break;
            case "Prerender":
              attempt = {
                action: "Prerender",
                key,
                pipelineId: null,
                status: "NotTriggered",
                prerenderStatus: null,
                disallowedMojoInterface: null,
                mismatchedHeaders: null
              };
              break;
            case "PrerenderUntilScript":
              attempt = {
                action: "PrerenderUntilScript",
                key,
                pipelineId: null,
                status: "NotTriggered",
                prerenderStatus: null,
                disallowedMojoInterface: null,
                mismatchedHeaders: null
              };
              break;
          }
          this.map.set(id2, attempt);
        }
      }
      cleanUpRemovedAttempts(sources) {
        const keysToRemove = Array.from(this.map.keys()).filter((key) => !sources.getById(key));
        for (const key of keysToRemove) {
          this.map.delete(key);
        }
        this.reconstructPipelines();
      }
      mergePrevious(prev) {
        for (const [id2, attempt] of this.map.entries()) {
          prev.map.set(id2, attempt);
        }
        this.map = prev.map;
        this.reconstructPipelines();
      }
    };
    SourceRegistry = class {
      map = /* @__PURE__ */ new Map();
      entries() {
        return this.map.entries();
      }
      isEmpty() {
        return this.map.size === 0;
      }
      getById(id2) {
        return this.map.get(id2) || null;
      }
      update(sources) {
        this.map = new Map(sources.map((s) => [makePreloadingAttemptId(s.key), s]));
      }
    };
    ScreenCaptureModel = class extends SDKModel {
      #agent;
      #nextScreencastOperationId = 1;
      #screencastOperations = [];
      constructor(target) {
        super(target);
        this.#agent = target.pageAgent();
        target.registerPageDispatcher(this);
      }
      async startScreencast(format2, quality, maxWidth, maxHeight, everyNthFrame, onFrame, onVisibilityChanged) {
        const currentRequest = this.#screencastOperations.at(-1);
        if (currentRequest) {
          await this.#agent.invoke_stopScreencast();
        }
        const operation = {
          id: this.#nextScreencastOperationId++,
          request: {
            format: format2,
            quality,
            maxWidth,
            maxHeight,
            everyNthFrame
          },
          callbacks: {
            onScreencastFrame: onFrame,
            onScreencastVisibilityChanged: onVisibilityChanged
          }
        };
        this.#screencastOperations.push(operation);
        void this.#agent.invoke_startScreencast({ format: format2, quality, maxWidth, maxHeight, everyNthFrame });
        return operation.id;
      }
      stopScreencast(id2) {
        const operationToStop = this.#screencastOperations.pop();
        if (!operationToStop) {
          throw new Error("There is no screencast operation to stop.");
        }
        if (operationToStop.id !== id2) {
          throw new Error("Trying to stop a screencast operation that is not being served right now.");
        }
        void this.#agent.invoke_stopScreencast();
        const nextOperation = this.#screencastOperations.at(-1);
        if (nextOperation) {
          void this.#agent.invoke_startScreencast({
            format: nextOperation.request.format,
            quality: nextOperation.request.quality,
            maxWidth: nextOperation.request.maxWidth,
            maxHeight: nextOperation.request.maxHeight,
            everyNthFrame: nextOperation.request.everyNthFrame
          });
        }
      }
      async captureScreenshot(format2, quality, mode2, clip) {
        const properties2 = {
          format: format2,
          quality,
          fromSurface: true
        };
        switch (mode2) {
          case "fromClip":
            properties2.captureBeyondViewport = true;
            properties2.clip = clip;
            break;
          case "fullpage":
            properties2.captureBeyondViewport = true;
            break;
          case "fromViewport":
            properties2.captureBeyondViewport = false;
            break;
          default:
            throw new Error("Unexpected or unspecified screnshotMode");
        }
        await OverlayModel.muteHighlight();
        const result = await this.#agent.invoke_captureScreenshot(properties2);
        await OverlayModel.unmuteHighlight();
        return result.data;
      }
      screencastFrame({ data: data32, metadata: metadata2, sessionId }) {
        void this.#agent.invoke_screencastFrameAck({ sessionId });
        const currentRequest = this.#screencastOperations.at(-1);
        if (currentRequest) {
          currentRequest.callbacks.onScreencastFrame.call(null, data32, metadata2);
        }
      }
      screencastVisibilityChanged({ visible }) {
        const currentRequest = this.#screencastOperations.at(-1);
        if (currentRequest) {
          currentRequest.callbacks.onScreencastVisibilityChanged.call(null, visible);
        }
      }
      backForwardCacheNotUsed(_params) {
      }
      domContentEventFired(_params) {
      }
      loadEventFired(_params) {
      }
      lifecycleEvent(_params) {
      }
      navigatedWithinDocument(_params) {
      }
      frameAttached(_params) {
      }
      frameNavigated(_params) {
      }
      documentOpened(_params) {
      }
      frameDetached(_params) {
      }
      frameStartedLoading(_params) {
      }
      frameStoppedLoading(_params) {
      }
      frameRequestedNavigation(_params) {
      }
      frameStartedNavigating(_params) {
      }
      frameSubtreeWillBeDetached(_params) {
      }
      frameScheduledNavigation(_params) {
      }
      frameClearedScheduledNavigation(_params) {
      }
      frameResized() {
      }
      javascriptDialogOpening(_params) {
      }
      javascriptDialogClosed(_params) {
      }
      interstitialShown() {
      }
      interstitialHidden() {
      }
      windowOpen(_params) {
      }
      fileChooserOpened(_params) {
      }
      compilationCacheProduced(_params) {
      }
      downloadWillBegin(_params) {
      }
      downloadProgress() {
      }
      prefetchStatusUpdated(_params) {
      }
      prerenderStatusUpdated(_params) {
      }
    };
    SDKModel.register(ScreenCaptureModel, { capabilities: 64, autostart: false });
    StorageBucketsModel = class extends SDKModel {
      enabled = false;
      storageAgent;
      storageKeyManager;
      bucketsById = /* @__PURE__ */ new Map();
      trackedStorageKeys = /* @__PURE__ */ new Set();
      constructor(target) {
        super(target);
        target.registerStorageDispatcher(this);
        this.storageAgent = target.storageAgent();
        this.storageKeyManager = target.model(StorageKeyManager);
      }
      getBuckets() {
        return new Set(this.bucketsById.values());
      }
      getBucketsForStorageKey(storageKey) {
        const buckets = [...this.bucketsById.values()];
        return new Set(buckets.filter(({ bucket }) => bucket.storageKey === storageKey));
      }
      getDefaultBucketForStorageKey(storageKey) {
        const buckets = [...this.bucketsById.values()];
        return buckets.find(({ bucket }) => bucket.storageKey === storageKey && bucket.name === void 0) ?? null;
      }
      getBucketById(bucketId) {
        return this.bucketsById.get(bucketId) ?? null;
      }
      getBucketByName(storageKey, bucketName) {
        if (!bucketName) {
          return this.getDefaultBucketForStorageKey(storageKey);
        }
        const buckets = [...this.bucketsById.values()];
        return buckets.find(({ bucket }) => bucket.storageKey === storageKey && bucket.name === bucketName) ?? null;
      }
      deleteBucket(bucket) {
        void this.storageAgent.invoke_deleteStorageBucket({ bucket });
      }
      enable() {
        if (this.enabled) {
          return;
        }
        if (this.storageKeyManager) {
          this.storageKeyManager.addEventListener("StorageKeyAdded", this.storageKeyAdded, this);
          this.storageKeyManager.addEventListener("StorageKeyRemoved", this.storageKeyRemoved, this);
          for (const storageKey of this.storageKeyManager.storageKeys()) {
            this.addStorageKey(storageKey);
          }
        }
        this.enabled = true;
      }
      storageKeyAdded(event) {
        this.addStorageKey(event.data);
      }
      storageKeyRemoved(event) {
        this.removeStorageKey(event.data);
      }
      addStorageKey(storageKey) {
        if (this.trackedStorageKeys.has(storageKey)) {
          throw new Error("Can't call addStorageKey for a storage key if it has already been added.");
        }
        this.trackedStorageKeys.add(storageKey);
        void this.storageAgent.invoke_setStorageBucketTracking({ storageKey, enable: true });
      }
      removeStorageKey(storageKey) {
        if (!this.trackedStorageKeys.has(storageKey)) {
          throw new Error("Can't call removeStorageKey for a storage key if it hasn't already been added.");
        }
        const bucketsForStorageKey = this.getBucketsForStorageKey(storageKey);
        for (const bucket of bucketsForStorageKey) {
          this.bucketRemoved(bucket);
        }
        this.trackedStorageKeys.delete(storageKey);
        void this.storageAgent.invoke_setStorageBucketTracking({ storageKey, enable: false });
      }
      bucketAdded(bucketInfo) {
        this.bucketsById.set(bucketInfo.id, bucketInfo);
        this.dispatchEventToListeners("BucketAdded", { model: this, bucketInfo });
      }
      bucketRemoved(bucketInfo) {
        this.bucketsById.delete(bucketInfo.id);
        this.dispatchEventToListeners("BucketRemoved", { model: this, bucketInfo });
      }
      bucketChanged(bucketInfo) {
        this.dispatchEventToListeners("BucketChanged", { model: this, bucketInfo });
      }
      bucketInfosAreEqual(bucketInfo1, bucketInfo2) {
        return bucketInfo1.bucket.storageKey === bucketInfo2.bucket.storageKey && bucketInfo1.id === bucketInfo2.id && bucketInfo1.bucket.name === bucketInfo2.bucket.name && bucketInfo1.expiration === bucketInfo2.expiration && bucketInfo1.quota === bucketInfo2.quota && bucketInfo1.persistent === bucketInfo2.persistent && bucketInfo1.durability === bucketInfo2.durability;
      }
      storageBucketCreatedOrUpdated({ bucketInfo }) {
        const curBucket = this.getBucketById(bucketInfo.id);
        if (curBucket) {
          if (!this.bucketInfosAreEqual(curBucket, bucketInfo)) {
            this.bucketChanged(bucketInfo);
          }
        } else {
          this.bucketAdded(bucketInfo);
        }
      }
      storageBucketDeleted({ bucketId }) {
        const curBucket = this.getBucketById(bucketId);
        if (curBucket) {
          this.bucketRemoved(curBucket);
        } else {
          throw new Error(`Received an event that Storage Bucket '${bucketId}' was deleted, but it wasn't in the StorageBucketsModel.`);
        }
      }
      attributionReportingTriggerRegistered(_event) {
      }
      interestGroupAccessed(_event) {
      }
      interestGroupAuctionEventOccurred(_event) {
      }
      interestGroupAuctionNetworkRequestCreated(_event) {
      }
      indexedDBListUpdated(_event) {
      }
      indexedDBContentUpdated(_event) {
      }
      cacheStorageListUpdated(_event) {
      }
      cacheStorageContentUpdated(_event) {
      }
      sharedStorageAccessed(_event) {
      }
      sharedStorageWorkletOperationExecutionFinished(_event) {
      }
      attributionReportingSourceRegistered(_event) {
      }
      attributionReportingReportSent(_event) {
      }
      attributionReportingVerboseDebugReportSent(_event) {
      }
    };
    SDKModel.register(StorageBucketsModel, { capabilities: 8192, autostart: false });
    UIStrings$R = {
      serviceworkercacheagentError: "`ServiceWorkerCacheAgent` error deleting cache entry {PH1} in cache: {PH2}"
    };
    str_$Q = registerUIStrings("core/sdk/ServiceWorkerCacheModel.ts", UIStrings$R);
    i18nString$C = getLocalizedString.bind(void 0, str_$Q);
    ServiceWorkerCacheModel = class extends SDKModel {
      cacheAgent;
      #storageAgent;
      #storageBucketModel;
      #caches = /* @__PURE__ */ new Map();
      #storageKeysTracked = /* @__PURE__ */ new Set();
      #storageBucketsUpdated = /* @__PURE__ */ new Set();
      #throttler = new Throttler(2e3);
      #enabled = false;
      #scheduleAsSoonAsPossible = false;
      constructor(target) {
        super(target);
        target.registerStorageDispatcher(this);
        this.cacheAgent = target.cacheStorageAgent();
        this.#storageAgent = target.storageAgent();
        this.#storageBucketModel = target.model(StorageBucketsModel);
      }
      enable() {
        if (this.#enabled) {
          return;
        }
        this.#storageBucketModel.addEventListener("BucketAdded", this.storageBucketAdded, this);
        this.#storageBucketModel.addEventListener("BucketRemoved", this.storageBucketRemoved, this);
        for (const storageBucket of this.#storageBucketModel.getBuckets()) {
          this.addStorageBucket(storageBucket.bucket);
        }
        this.#enabled = true;
      }
      clearForStorageKey(storageKey) {
        for (const [opaqueId, cache] of this.#caches.entries()) {
          if (cache.storageKey === storageKey) {
            this.#caches.delete(opaqueId);
            this.cacheRemoved(cache);
          }
        }
        for (const storageBucket of this.#storageBucketModel.getBucketsForStorageKey(storageKey)) {
          void this.loadCacheNames(storageBucket.bucket);
        }
      }
      refreshCacheNames() {
        for (const cache of this.#caches.values()) {
          this.cacheRemoved(cache);
        }
        this.#caches.clear();
        const storageBuckets = this.#storageBucketModel.getBuckets();
        for (const storageBucket of storageBuckets) {
          void this.loadCacheNames(storageBucket.bucket);
        }
      }
      async deleteCache(cache) {
        const response = await this.cacheAgent.invoke_deleteCache({ cacheId: cache.cacheId });
        if (response.getError()) {
          console.error(`ServiceWorkerCacheAgent error deleting cache ${cache.toString()}: ${response.getError()}`);
          return;
        }
        this.#caches.delete(cache.cacheId);
        this.cacheRemoved(cache);
      }
      async deleteCacheEntry(cache, request3) {
        const response = await this.cacheAgent.invoke_deleteEntry({ cacheId: cache.cacheId, request: request3 });
        if (response.getError()) {
          Console.instance().error(i18nString$C(UIStrings$R.serviceworkercacheagentError, { PH1: cache.toString(), PH2: String(response.getError()) }));
          return;
        }
      }
      loadCacheData(cache, skipCount, pageSize, pathFilter, callback) {
        void this.requestEntries(cache, skipCount, pageSize, pathFilter, callback);
      }
      loadAllCacheData(cache, pathFilter, callback) {
        void this.requestAllEntries(cache, pathFilter, callback);
      }
      caches() {
        return [...this.#caches.values()];
      }
      dispose() {
        for (const cache of this.#caches.values()) {
          this.cacheRemoved(cache);
        }
        this.#caches.clear();
        if (this.#enabled) {
          this.#storageBucketModel.removeEventListener("BucketAdded", this.storageBucketAdded, this);
          this.#storageBucketModel.removeEventListener("BucketRemoved", this.storageBucketRemoved, this);
        }
      }
      addStorageBucket(storageBucket) {
        void this.loadCacheNames(storageBucket);
        if (!this.#storageKeysTracked.has(storageBucket.storageKey)) {
          this.#storageKeysTracked.add(storageBucket.storageKey);
          void this.#storageAgent.invoke_trackCacheStorageForStorageKey({ storageKey: storageBucket.storageKey });
        }
      }
      removeStorageBucket(storageBucket) {
        let storageKeyCount = 0;
        for (const [opaqueId, cache] of this.#caches.entries()) {
          if (storageBucket.storageKey === cache.storageKey) {
            storageKeyCount++;
          }
          if (cache.inBucket(storageBucket)) {
            storageKeyCount--;
            this.#caches.delete(opaqueId);
            this.cacheRemoved(cache);
          }
        }
        if (storageKeyCount === 0) {
          this.#storageKeysTracked.delete(storageBucket.storageKey);
          void this.#storageAgent.invoke_untrackCacheStorageForStorageKey({ storageKey: storageBucket.storageKey });
        }
      }
      async loadCacheNames(storageBucket) {
        const response = await this.cacheAgent.invoke_requestCacheNames({ storageBucket });
        if (response.getError()) {
          return;
        }
        this.updateCacheNames(storageBucket, response.caches);
      }
      updateCacheNames(storageBucket, cachesJson) {
        function deleteAndSaveOldCaches(cache) {
          if (cache.inBucket(storageBucket) && !updatingCachesIds.has(cache.cacheId)) {
            oldCaches.set(cache.cacheId, cache);
            this.#caches.delete(cache.cacheId);
          }
        }
        const updatingCachesIds = /* @__PURE__ */ new Set();
        const newCaches = /* @__PURE__ */ new Map();
        const oldCaches = /* @__PURE__ */ new Map();
        for (const cacheJson of cachesJson) {
          const storageBucket2 = cacheJson.storageBucket ?? this.#storageBucketModel.getDefaultBucketForStorageKey(cacheJson.storageKey)?.bucket;
          if (!storageBucket2) {
            continue;
          }
          const cache = new Cache$1(this, storageBucket2, cacheJson.cacheName, cacheJson.cacheId);
          updatingCachesIds.add(cache.cacheId);
          if (this.#caches.has(cache.cacheId)) {
            continue;
          }
          newCaches.set(cache.cacheId, cache);
          this.#caches.set(cache.cacheId, cache);
        }
        this.#caches.forEach(deleteAndSaveOldCaches, this);
        newCaches.forEach(this.cacheAdded, this);
        oldCaches.forEach(this.cacheRemoved, this);
      }
      storageBucketAdded({ data: { bucketInfo: { bucket } } }) {
        this.addStorageBucket(bucket);
      }
      storageBucketRemoved({ data: { bucketInfo: { bucket } } }) {
        this.removeStorageBucket(bucket);
      }
      cacheAdded(cache) {
        this.dispatchEventToListeners("CacheAdded", { model: this, cache });
      }
      cacheRemoved(cache) {
        this.dispatchEventToListeners("CacheRemoved", { model: this, cache });
      }
      async requestEntries(cache, skipCount, pageSize, pathFilter, callback) {
        const response = await this.cacheAgent.invoke_requestEntries({ cacheId: cache.cacheId, skipCount, pageSize, pathFilter });
        if (response.getError()) {
          console.error("ServiceWorkerCacheAgent error while requesting entries: ", response.getError());
          return;
        }
        callback(response.cacheDataEntries, response.returnCount);
      }
      async requestAllEntries(cache, pathFilter, callback) {
        const response = await this.cacheAgent.invoke_requestEntries({ cacheId: cache.cacheId, pathFilter });
        if (response.getError()) {
          console.error("ServiceWorkerCacheAgent error while requesting entries: ", response.getError());
          return;
        }
        callback(response.cacheDataEntries, response.returnCount);
      }
      cacheStorageListUpdated({ bucketId }) {
        const storageBucket = this.#storageBucketModel.getBucketById(bucketId)?.bucket;
        if (storageBucket) {
          this.#storageBucketsUpdated.add(storageBucket);
          void this.#throttler.schedule(() => {
            const promises2 = Array.from(this.#storageBucketsUpdated, (storageBucket2) => this.loadCacheNames(storageBucket2));
            this.#storageBucketsUpdated.clear();
            return Promise.all(promises2);
          }, this.#scheduleAsSoonAsPossible ? "AsSoonAsPossible" : "Default");
        }
      }
      cacheStorageContentUpdated({ bucketId, cacheName }) {
        const storageBucket = this.#storageBucketModel.getBucketById(bucketId)?.bucket;
        if (storageBucket) {
          this.dispatchEventToListeners("CacheStorageContentUpdated", { storageBucket, cacheName });
        }
      }
      attributionReportingTriggerRegistered(_event) {
      }
      indexedDBListUpdated(_event) {
      }
      indexedDBContentUpdated(_event) {
      }
      interestGroupAuctionEventOccurred(_event) {
      }
      interestGroupAccessed(_event) {
      }
      interestGroupAuctionNetworkRequestCreated(_event) {
      }
      sharedStorageAccessed(_event) {
      }
      sharedStorageWorkletOperationExecutionFinished(_event) {
      }
      storageBucketCreatedOrUpdated(_event) {
      }
      storageBucketDeleted(_event) {
      }
      setThrottlerSchedulesAsSoonAsPossibleForTest() {
        this.#scheduleAsSoonAsPossible = true;
      }
      attributionReportingSourceRegistered(_event) {
      }
      attributionReportingReportSent(_event) {
      }
      attributionReportingVerboseDebugReportSent(_event) {
      }
    };
    Cache$1 = class Cache2 {
      #model;
      storageKey;
      storageBucket;
      cacheName;
      cacheId;
      constructor(model3, storageBucket, cacheName, cacheId) {
        this.#model = model3;
        this.storageBucket = storageBucket;
        this.storageKey = storageBucket.storageKey;
        this.cacheName = cacheName;
        this.cacheId = cacheId;
      }
      inBucket(storageBucket) {
        return this.storageKey === storageBucket.storageKey && this.storageBucket.name === storageBucket.name;
      }
      equals(cache) {
        return this.cacheId === cache.cacheId;
      }
      toString() {
        return this.storageKey + this.cacheName;
      }
      async requestCachedResponse(url, requestHeaders) {
        const response = await this.#model.cacheAgent.invoke_requestCachedResponse({ cacheId: this.cacheId, requestURL: url, requestHeaders });
        if (response.getError()) {
          return null;
        }
        return response.response;
      }
    };
    SDKModel.register(ServiceWorkerCacheModel, { capabilities: 8192, autostart: false });
    UIStrings$Q = {
      running: "running",
      starting: "starting",
      stopped: "stopped",
      stopping: "stopping",
      activated: "activated",
      activating: "activating",
      installed: "installed",
      installing: "installing",
      new: "new",
      redundant: "redundant",
      sSS: "{PH1} #{PH2} ({PH3})"
    };
    str_$P = registerUIStrings("core/sdk/ServiceWorkerManager.ts", UIStrings$Q);
    i18nString$B = getLocalizedString.bind(void 0, str_$P);
    i18nLazyString$c = getLazilyComputedLocalizedString.bind(void 0, str_$P);
    ServiceWorkerManager = class extends SDKModel {
      #agent;
      #registrations = /* @__PURE__ */ new Map();
      #enabled = false;
      #forceUpdateSetting;
      constructor(target) {
        super(target);
        target.registerServiceWorkerDispatcher(new ServiceWorkerDispatcher(this));
        this.#agent = target.serviceWorkerAgent();
        void this.enable();
        this.#forceUpdateSetting = Settings.instance().createSetting("service-worker-update-on-reload", false);
        if (this.#forceUpdateSetting.get()) {
          this.forceUpdateSettingChanged();
        }
        this.#forceUpdateSetting.addChangeListener(this.forceUpdateSettingChanged, this);
        new ServiceWorkerContextNamer(target, this);
      }
      async enable() {
        if (this.#enabled) {
          return;
        }
        this.#enabled = true;
        await this.#agent.invoke_enable();
      }
      async disable() {
        if (!this.#enabled) {
          return;
        }
        this.#enabled = false;
        this.#registrations.clear();
        await this.#agent.invoke_enable();
      }
      registrations() {
        return this.#registrations;
      }
      findVersion(versionId) {
        for (const registration of this.registrations().values()) {
          const version3 = registration.versions.get(versionId);
          if (version3) {
            return version3;
          }
        }
        return null;
      }
      deleteRegistration(registrationId) {
        const registration = this.#registrations.get(registrationId);
        if (!registration) {
          return;
        }
        if (registration.isRedundant()) {
          this.#registrations.delete(registrationId);
          this.dispatchEventToListeners("RegistrationDeleted", registration);
          return;
        }
        registration.deleting = true;
        for (const version3 of registration.versions.values()) {
          void this.stopWorker(version3.id);
        }
        void this.unregister(registration.scopeURL);
      }
      async updateRegistration(registrationId) {
        const registration = this.#registrations.get(registrationId);
        if (!registration) {
          return;
        }
        await this.#agent.invoke_updateRegistration({ scopeURL: registration.scopeURL });
      }
      async deliverPushMessage(registrationId, data32) {
        const registration = this.#registrations.get(registrationId);
        if (!registration) {
          return;
        }
        const origin = ParsedURL2.extractOrigin(registration.scopeURL);
        await this.#agent.invoke_deliverPushMessage({ origin, registrationId, data: data32 });
      }
      async dispatchSyncEvent(registrationId, tag2, lastChance) {
        const registration = this.#registrations.get(registrationId);
        if (!registration) {
          return;
        }
        const origin = ParsedURL2.extractOrigin(registration.scopeURL);
        await this.#agent.invoke_dispatchSyncEvent({ origin, registrationId, tag: tag2, lastChance });
      }
      async dispatchPeriodicSyncEvent(registrationId, tag2) {
        const registration = this.#registrations.get(registrationId);
        if (!registration) {
          return;
        }
        const origin = ParsedURL2.extractOrigin(registration.scopeURL);
        await this.#agent.invoke_dispatchPeriodicSyncEvent({ origin, registrationId, tag: tag2 });
      }
      async unregister(scopeURL) {
        await this.#agent.invoke_unregister({ scopeURL });
      }
      async startWorker(scopeURL) {
        await this.#agent.invoke_startWorker({ scopeURL });
      }
      async skipWaiting(scopeURL) {
        await this.#agent.invoke_skipWaiting({ scopeURL });
      }
      async stopWorker(versionId) {
        await this.#agent.invoke_stopWorker({ versionId });
      }
      workerRegistrationUpdated(registrations) {
        for (const payload of registrations) {
          let registration = this.#registrations.get(payload.registrationId);
          if (!registration) {
            registration = new ServiceWorkerRegistration(payload);
            this.#registrations.set(payload.registrationId, registration);
            this.dispatchEventToListeners("RegistrationUpdated", registration);
            continue;
          }
          registration.update(payload);
          if (registration.shouldBeRemoved()) {
            this.#registrations.delete(registration.id);
            this.dispatchEventToListeners("RegistrationDeleted", registration);
          } else {
            this.dispatchEventToListeners("RegistrationUpdated", registration);
          }
        }
      }
      workerVersionUpdated(versions) {
        const registrations = /* @__PURE__ */ new Set();
        for (const payload of versions) {
          const registration = this.#registrations.get(payload.registrationId);
          if (!registration) {
            continue;
          }
          registration.updateVersion(payload);
          registrations.add(registration);
        }
        for (const registration of registrations) {
          if (registration.shouldBeRemoved()) {
            this.#registrations.delete(registration.id);
            this.dispatchEventToListeners("RegistrationDeleted", registration);
          } else {
            this.dispatchEventToListeners("RegistrationUpdated", registration);
          }
        }
      }
      workerErrorReported(payload) {
        const registration = this.#registrations.get(payload.registrationId);
        if (!registration) {
          return;
        }
        registration.errors.push(payload);
        this.dispatchEventToListeners("RegistrationErrorAdded", { registration, error: payload });
      }
      forceUpdateSettingChanged() {
        const forceUpdateOnPageLoad = this.#forceUpdateSetting.get();
        void this.#agent.invoke_setForceUpdateOnPageLoad({ forceUpdateOnPageLoad });
      }
    };
    ServiceWorkerDispatcher = class {
      #manager;
      constructor(manager) {
        this.#manager = manager;
      }
      workerRegistrationUpdated({ registrations }) {
        this.#manager.workerRegistrationUpdated(registrations);
      }
      workerVersionUpdated({ versions }) {
        this.#manager.workerVersionUpdated(versions);
      }
      workerErrorReported({ errorMessage }) {
        this.#manager.workerErrorReported(errorMessage);
      }
    };
    ServiceWorkerVersionState = class {
      runningStatus;
      status;
      lastUpdatedTimestamp;
      previousState;
      constructor(runningStatus, status, previousState, timestamp) {
        this.runningStatus = runningStatus;
        this.status = status;
        this.lastUpdatedTimestamp = timestamp;
        this.previousState = previousState;
      }
    };
    ServiceWorkerRouterRule = class {
      condition;
      source;
      id;
      constructor(condition, source2, id2) {
        this.condition = condition;
        this.source = source2;
        this.id = id2;
      }
    };
    ServiceWorkerVersion = class {
      id;
      scriptURL;
      parsedURL;
      securityOrigin;
      scriptLastModified;
      scriptResponseTime;
      controlledClients;
      targetId;
      routerRules;
      currentState;
      registration;
      constructor(registration, payload) {
        this.registration = registration;
        this.update(payload);
      }
      update(payload) {
        this.id = payload.versionId;
        this.scriptURL = payload.scriptURL;
        const parsedURL = new ParsedURL2(payload.scriptURL);
        this.securityOrigin = parsedURL.securityOrigin();
        this.currentState = new ServiceWorkerVersionState(payload.runningStatus, payload.status, this.currentState, Date.now());
        this.scriptLastModified = payload.scriptLastModified;
        this.scriptResponseTime = payload.scriptResponseTime;
        if (payload.controlledClients) {
          this.controlledClients = payload.controlledClients.slice();
        } else {
          this.controlledClients = [];
        }
        this.targetId = payload.targetId || null;
        this.routerRules = null;
        if (payload.routerRules) {
          this.routerRules = this.parseJSONRules(payload.routerRules);
        }
      }
      isStartable() {
        return !this.registration.isDeleted && this.isActivated() && this.isStopped();
      }
      isStoppedAndRedundant() {
        return this.runningStatus === "stopped" && this.status === "redundant";
      }
      isStopped() {
        return this.runningStatus === "stopped";
      }
      isStarting() {
        return this.runningStatus === "starting";
      }
      isRunning() {
        return this.runningStatus === "running";
      }
      isStopping() {
        return this.runningStatus === "stopping";
      }
      isNew() {
        return this.status === "new";
      }
      isInstalling() {
        return this.status === "installing";
      }
      isInstalled() {
        return this.status === "installed";
      }
      isActivating() {
        return this.status === "activating";
      }
      isActivated() {
        return this.status === "activated";
      }
      isRedundant() {
        return this.status === "redundant";
      }
      get status() {
        return this.currentState.status;
      }
      get runningStatus() {
        return this.currentState.runningStatus;
      }
      mode() {
        if (this.isNew() || this.isInstalling()) {
          return "installing";
        }
        if (this.isInstalled()) {
          return "waiting";
        }
        if (this.isActivating() || this.isActivated()) {
          return "active";
        }
        return "redundant";
      }
      parseJSONRules(input) {
        try {
          const parsedObject = JSON.parse(input);
          if (!Array.isArray(parsedObject)) {
            console.error("Parse error: `routerRules` in ServiceWorkerVersion should be an array");
            return null;
          }
          const routerRules = [];
          for (const parsedRule of parsedObject) {
            const { condition, source: source2, id: id2 } = parsedRule;
            if (condition === void 0 || source2 === void 0 || id2 === void 0) {
              console.error("Parse error: Missing some fields of `routerRules` in ServiceWorkerVersion");
              return null;
            }
            routerRules.push(new ServiceWorkerRouterRule(JSON.stringify(condition), JSON.stringify(source2), id2));
          }
          return routerRules;
        } catch {
          console.error("Parse error: Invalid `routerRules` in ServiceWorkerVersion");
          return null;
        }
      }
    };
    (function(ServiceWorkerVersion2) {
      ServiceWorkerVersion2.RunningStatus = {
        ["running"]: i18nLazyString$c(UIStrings$Q.running),
        ["starting"]: i18nLazyString$c(UIStrings$Q.starting),
        ["stopped"]: i18nLazyString$c(UIStrings$Q.stopped),
        ["stopping"]: i18nLazyString$c(UIStrings$Q.stopping)
      };
      ServiceWorkerVersion2.Status = {
        ["activated"]: i18nLazyString$c(UIStrings$Q.activated),
        ["activating"]: i18nLazyString$c(UIStrings$Q.activating),
        ["installed"]: i18nLazyString$c(UIStrings$Q.installed),
        ["installing"]: i18nLazyString$c(UIStrings$Q.installing),
        ["new"]: i18nLazyString$c(UIStrings$Q.new),
        ["redundant"]: i18nLazyString$c(UIStrings$Q.redundant)
      };
    })(ServiceWorkerVersion || (ServiceWorkerVersion = {}));
    ServiceWorkerRegistration = class {
      #fingerprint;
      id;
      scopeURL;
      securityOrigin;
      isDeleted;
      versions = /* @__PURE__ */ new Map();
      deleting = false;
      errors = [];
      constructor(payload) {
        this.update(payload);
      }
      update(payload) {
        this.#fingerprint = Symbol("fingerprint");
        this.id = payload.registrationId;
        this.scopeURL = payload.scopeURL;
        const parsedURL = new ParsedURL2(payload.scopeURL);
        this.securityOrigin = parsedURL.securityOrigin();
        this.isDeleted = payload.isDeleted;
      }
      fingerprint() {
        return this.#fingerprint;
      }
      versionsByMode() {
        const result = /* @__PURE__ */ new Map();
        for (const version3 of this.versions.values()) {
          result.set(version3.mode(), version3);
        }
        return result;
      }
      updateVersion(payload) {
        this.#fingerprint = Symbol("fingerprint");
        let version3 = this.versions.get(payload.versionId);
        if (!version3) {
          version3 = new ServiceWorkerVersion(this, payload);
          this.versions.set(payload.versionId, version3);
          return version3;
        }
        version3.update(payload);
        return version3;
      }
      isRedundant() {
        for (const version3 of this.versions.values()) {
          if (!version3.isStoppedAndRedundant()) {
            return false;
          }
        }
        return true;
      }
      shouldBeRemoved() {
        return this.isRedundant() && (!this.errors.length || this.deleting);
      }
      canBeRemoved() {
        return this.isDeleted || this.deleting;
      }
    };
    ServiceWorkerContextNamer = class {
      #target;
      #serviceWorkerManager;
      #versionByTargetId = /* @__PURE__ */ new Map();
      constructor(target, serviceWorkerManager) {
        this.#target = target;
        this.#serviceWorkerManager = serviceWorkerManager;
        serviceWorkerManager.addEventListener("RegistrationUpdated", this.registrationsUpdated, this);
        serviceWorkerManager.addEventListener("RegistrationDeleted", this.registrationsUpdated, this);
        TargetManager3.instance().addModelListener(RuntimeModel, Events$9.ExecutionContextCreated, this.executionContextCreated, this);
      }
      registrationsUpdated() {
        this.#versionByTargetId.clear();
        const registrations = this.#serviceWorkerManager.registrations().values();
        for (const registration of registrations) {
          for (const version3 of registration.versions.values()) {
            if (version3.targetId) {
              this.#versionByTargetId.set(version3.targetId, version3);
            }
          }
        }
        this.updateAllContextLabels();
      }
      executionContextCreated(event) {
        const executionContext = event.data;
        const serviceWorkerTargetId = this.serviceWorkerTargetId(executionContext.target());
        if (!serviceWorkerTargetId) {
          return;
        }
        this.updateContextLabel(executionContext, this.#versionByTargetId.get(serviceWorkerTargetId) || null);
      }
      serviceWorkerTargetId(target) {
        if (target.parentTarget() !== this.#target || target.type() !== Type$2.ServiceWorker) {
          return null;
        }
        return target.id();
      }
      updateAllContextLabels() {
        for (const target of TargetManager3.instance().targets()) {
          const serviceWorkerTargetId = this.serviceWorkerTargetId(target);
          if (!serviceWorkerTargetId) {
            continue;
          }
          const version3 = this.#versionByTargetId.get(serviceWorkerTargetId) || null;
          const runtimeModel = target.model(RuntimeModel);
          const executionContexts = runtimeModel ? runtimeModel.executionContexts() : [];
          for (const context2 of executionContexts) {
            this.updateContextLabel(context2, version3);
          }
        }
      }
      updateContextLabel(context2, version3) {
        if (!version3) {
          context2.setLabel("");
          return;
        }
        const parsedUrl = ParsedURL2.fromString(context2.origin);
        const label = parsedUrl ? parsedUrl.lastPathComponentWithFragment() : context2.name;
        const localizedStatus = ServiceWorkerVersion.Status[version3.status];
        context2.setLabel(i18nString$B(UIStrings$Q.sSS, { PH1: label, PH2: version3.id, PH3: localizedStatus() }));
      }
    };
    SDKModel.register(ServiceWorkerManager, { capabilities: 16384, autostart: true });
    WebAuthnModel = class extends SDKModel {
      #agent;
      constructor(target) {
        super(target);
        this.#agent = target.webAuthnAgent();
        target.registerWebAuthnDispatcher(new WebAuthnDispatcher(this));
      }
      setVirtualAuthEnvEnabled(enable) {
        if (enable) {
          return this.#agent.invoke_enable({ enableUI: true });
        }
        return this.#agent.invoke_disable();
      }
      async addAuthenticator(options2) {
        const response = await this.#agent.invoke_addVirtualAuthenticator({ options: options2 });
        return response.authenticatorId;
      }
      async removeAuthenticator(authenticatorId) {
        await this.#agent.invoke_removeVirtualAuthenticator({ authenticatorId });
      }
      async setAutomaticPresenceSimulation(authenticatorId, enabled) {
        await this.#agent.invoke_setAutomaticPresenceSimulation({ authenticatorId, enabled });
      }
      async getCredentials(authenticatorId) {
        const response = await this.#agent.invoke_getCredentials({ authenticatorId });
        return response.credentials;
      }
      async removeCredential(authenticatorId, credentialId) {
        await this.#agent.invoke_removeCredential({ authenticatorId, credentialId });
      }
      credentialAdded(params) {
        this.dispatchEventToListeners("CredentialAdded", params);
      }
      credentialAsserted(params) {
        this.dispatchEventToListeners("CredentialAsserted", params);
      }
      credentialDeleted(params) {
        this.dispatchEventToListeners("CredentialDeleted", params);
      }
      credentialUpdated(params) {
        this.dispatchEventToListeners("CredentialUpdated", params);
      }
    };
    WebAuthnDispatcher = class {
      #model;
      constructor(model3) {
        this.#model = model3;
      }
      credentialAdded(params) {
        this.#model.credentialAdded(params);
      }
      credentialAsserted(params) {
        this.#model.credentialAsserted(params);
      }
      credentialDeleted(params) {
        this.#model.credentialDeleted(params);
      }
      credentialUpdated(params) {
        this.#model.credentialUpdated(params);
      }
    };
    SDKModel.register(WebAuthnModel, { capabilities: 65536, autostart: false });
    StackTraceImpl = class extends ObjectWrapper {
      syncFragment;
      asyncFragments;
      constructor(syncFragment, asyncFragments) {
        super();
        this.syncFragment = syncFragment;
        this.asyncFragments = asyncFragments;
        const fragment = syncFragment instanceof DebuggableFragmentImpl ? syncFragment.fragment : syncFragment;
        fragment.stackTraces.add(this);
        this.asyncFragments.forEach((asyncFragment) => asyncFragment.fragment.stackTraces.add(this));
      }
    };
    FragmentImpl = class _FragmentImpl {
      static EMPTY_FRAGMENT = new _FragmentImpl();
      node;
      stackTraces = /* @__PURE__ */ new Set();
      static getOrCreate(node2) {
        if (!node2.fragment) {
          node2.fragment = new _FragmentImpl(node2);
        }
        return node2.fragment;
      }
      constructor(node2) {
        this.node = node2;
      }
      get frames() {
        if (!this.node) {
          return [];
        }
        const frames3 = [];
        for (const node2 of this.node.getCallStack()) {
          frames3.push(...node2.frames);
        }
        return frames3;
      }
    };
    AsyncFragmentImpl = class {
      description;
      fragment;
      constructor(description2, fragment) {
        this.description = description2;
        this.fragment = fragment;
      }
      get frames() {
        return this.fragment.frames;
      }
    };
    FrameImpl = class {
      url;
      uiSourceCode;
      name;
      line;
      column;
      missingDebugInfo;
      constructor(url, uiSourceCode, name, line, column, missingDebugInfo) {
        this.url = url;
        this.uiSourceCode = uiSourceCode;
        this.name = name;
        this.line = line;
        this.column = column;
        this.missingDebugInfo = missingDebugInfo;
      }
    };
    DebuggableFragmentImpl = class {
      fragment;
      callFrames;
      constructor(fragment, callFrames) {
        this.fragment = fragment;
        this.callFrames = callFrames;
      }
      get frames() {
        if (!this.fragment.node) {
          return [];
        }
        const frames3 = [];
        let index2 = 0;
        for (const node2 of this.fragment.node.getCallStack()) {
          for (const [inlineIdx, frame] of node2.frames.entries()) {
            const sdkFrame = inlineIdx === 0 ? this.callFrames[index2] : this.callFrames[index2].createVirtualCallFrame(inlineIdx, frame.name ?? "");
            frames3.push(new DebuggableFrameImpl(frame, sdkFrame));
          }
          index2++;
        }
        return frames3;
      }
    };
    DebuggableFrameImpl = class {
      #frame;
      #sdkFrame;
      constructor(frame, sdkFrame) {
        this.#frame = frame;
        this.#sdkFrame = sdkFrame;
      }
      get url() {
        return this.#frame.url;
      }
      get uiSourceCode() {
        return this.#frame.uiSourceCode;
      }
      get name() {
        return this.#frame.name;
      }
      get line() {
        return this.#frame.line;
      }
      get column() {
        return this.#frame.column;
      }
      get missingDebugInfo() {
        return this.#frame.missingDebugInfo;
      }
      get sdkFrame() {
        return this.#sdkFrame;
      }
    };
    DebuggableFrameFlavor = class _DebuggableFrameFlavor {
      static #last;
      frame;
      constructor(frame) {
        this.frame = frame;
      }
      get sdkFrame() {
        return this.frame.sdkFrame;
      }
      static for(frame) {
        function equals2(a, b) {
          return a.url === b.url && a.uiSourceCode === b.uiSourceCode && a.name === b.name && a.line === b.line && a.column === b.column && a.sdkFrame === b.sdkFrame && JSON.stringify(a.missingDebugInfo) === JSON.stringify(b.missingDebugInfo);
        }
        if (!_DebuggableFrameFlavor.#last || !equals2(_DebuggableFrameFlavor.#last.frame, frame)) {
          _DebuggableFrameFlavor.#last = new _DebuggableFrameFlavor(frame);
        }
        return _DebuggableFrameFlavor.#last;
      }
    };
    StackTrace = /* @__PURE__ */ Object.freeze({
      __proto__: null,
      DebuggableFrameFlavor
    });
    stack_trace = /* @__PURE__ */ Object.freeze({
      __proto__: null,
      StackTrace
    });
    FrameNode = class {
      parent;
      children = [];
      rawFrame;
      frames = [];
      fragment;
      constructor(rawFrame, parent) {
        this.rawFrame = rawFrame;
        this.parent = parent;
      }
      *getCallStack() {
        for (let node2 = this; node2.parent; node2 = node2.parent) {
          yield node2;
        }
      }
    };
    Trie2 = class {
      #root = { parent: null, children: [] };
      insert(frames3) {
        if (frames3.length === 0) {
          throw new Error("Trie.insert called with an empty frames array.");
        }
        let currentNode = this.#root;
        for (let i = frames3.length - 1; i >= 0; --i) {
          currentNode = this.#insert(currentNode, frames3[i]);
        }
        return currentNode;
      }
      #insert(node2, rawFrame) {
        let i = 0;
        for (; i < node2.children.length; ++i) {
          const maybeChild = node2.children[i];
          const child = maybeChild instanceof WeakRef ? maybeChild.deref() : maybeChild;
          if (!child) {
            continue;
          }
          const compareResult = compareRawFrames(child.rawFrame, rawFrame);
          if (compareResult === 0) {
            return child;
          }
          if (compareResult > 0) {
            break;
          }
        }
        const newNode = new FrameNode(rawFrame, node2);
        if (node2.parent) {
          node2.children.splice(i, 0, newNode);
        } else {
          node2.children.splice(i, 0, new WeakRef(newNode));
        }
        return newNode;
      }
      walk(node2, visit) {
        const stack = node2 ? [node2] : [...this.#root.children].map((ref2) => ref2.deref()).filter((node3) => Boolean(node3));
        for (let node3 = stack.pop(); node3; node3 = stack.pop()) {
          const visitChildren = visit(node3);
          if (visitChildren) {
            for (let i = node3.children.length - 1; i >= 0; --i) {
              stack.push(node3.children[i]);
            }
          }
        }
      }
    };
    StackTraceModel = class extends SDKModel {
      #trie = new Trie2();
      #mutex = new Mutex2();
      static #modelForTarget(target) {
        const model3 = (target ?? TargetManager3.instance().primaryPageTarget())?.model(_a$4);
        if (!model3) {
          throw new Error("Unable to find StackTraceModel");
        }
        return model3;
      }
      async createFromProtocolRuntime(stackTrace, rawFramesToUIFrames) {
        const [syncFragment, asyncFragments] = await Promise.all([
          this.#createFragment(stackTrace.callFrames, rawFramesToUIFrames),
          this.#createAsyncFragments(stackTrace, rawFramesToUIFrames)
        ]);
        return new StackTraceImpl(syncFragment, asyncFragments);
      }
      async createFromDebuggerPaused(pausedDetails, rawFramesToUIFrames) {
        const [syncFragment, asyncFragments] = await Promise.all([
          this.#createDebuggableFragment(pausedDetails, rawFramesToUIFrames),
          this.#createAsyncFragments(pausedDetails, rawFramesToUIFrames)
        ]);
        return new StackTraceImpl(syncFragment, asyncFragments);
      }
      async scriptInfoChanged(script, translateRawFrames) {
        const release = await this.#mutex.acquire();
        try {
          const translatePromises = [];
          let stackTracesToUpdate = /* @__PURE__ */ new Set();
          for (const fragment of this.#affectedFragments(script)) {
            if (fragment.node?.children.length === 0) {
              translatePromises.push(this.#translateFragment(fragment, translateRawFrames));
            }
            stackTracesToUpdate = stackTracesToUpdate.union(fragment.stackTraces);
          }
          await Promise.all(translatePromises);
          for (const stackTrace of stackTracesToUpdate) {
            stackTrace.dispatchEventToListeners("UPDATED");
          }
        } finally {
          release();
        }
      }
      async #createDebuggableFragment(pausedDetails, rawFramesToUIFrames) {
        const fragment = await this.#createFragment(pausedDetails.callFrames.map((frame) => ({
          scriptId: frame.script.scriptId,
          url: frame.script.sourceURL,
          functionName: frame.functionName,
          lineNumber: frame.location().lineNumber,
          columnNumber: frame.location().columnNumber
        })), rawFramesToUIFrames);
        return new DebuggableFragmentImpl(fragment, pausedDetails.callFrames);
      }
      async #createAsyncFragments(stackTraceOrPausedEvent, rawFramesToUIFrames) {
        const asyncFragments = [];
        const debuggerModel = this.target().model(DebuggerModel);
        if (debuggerModel) {
          for await (const { stackTrace: asyncStackTrace, target } of debuggerModel.iterateAsyncParents(stackTraceOrPausedEvent)) {
            if (asyncStackTrace.callFrames.length === 0) {
              continue;
            }
            const model3 = _a$4.#modelForTarget(target);
            const asyncFragmentPromise = model3.#createFragment(asyncStackTrace.callFrames, rawFramesToUIFrames).then((fragment) => new AsyncFragmentImpl(asyncStackTrace.description ?? "", fragment));
            asyncFragments.push(asyncFragmentPromise);
          }
        }
        return await Promise.all(asyncFragments);
      }
      async #createFragment(frames3, rawFramesToUIFrames) {
        if (frames3.length === 0) {
          return FragmentImpl.EMPTY_FRAGMENT;
        }
        const release = await this.#mutex.acquire();
        try {
          const node2 = this.#trie.insert(frames3);
          const requiresTranslation = !Boolean(node2.fragment);
          const fragment = FragmentImpl.getOrCreate(node2);
          if (requiresTranslation) {
            await this.#translateFragment(fragment, rawFramesToUIFrames);
          }
          return fragment;
        } finally {
          release();
        }
      }
      async #translateFragment(fragment, rawFramesToUIFrames) {
        if (!fragment.node) {
          return;
        }
        const rawFrames = fragment.node.getCallStack().map((node2) => node2.rawFrame).toArray();
        const uiFrames = await rawFramesToUIFrames(rawFrames, this.target());
        console.assert(rawFrames.length === uiFrames.length, "Broken rawFramesToUIFrames implementation");
        let i = 0;
        for (const node2 of fragment.node.getCallStack()) {
          node2.frames = uiFrames[i++].map((frame) => new FrameImpl(frame.url, frame.uiSourceCode, frame.name, frame.line, frame.column, frame.missingDebugInfo));
        }
      }
      #affectedFragments(script) {
        const affectedBranches = /* @__PURE__ */ new Set();
        this.#trie.walk(null, (node2) => {
          if (node2.rawFrame.scriptId === script.scriptId || !node2.rawFrame.scriptId && node2.rawFrame.url === script.sourceURL) {
            affectedBranches.add(node2);
            return false;
          }
          return true;
        });
        const fragments = /* @__PURE__ */ new Set();
        for (const branch of affectedBranches) {
          this.#trie.walk(branch, (node2) => {
            if (node2.fragment) {
              fragments.add(node2.fragment);
            }
            return true;
          });
        }
        return fragments;
      }
    };
    _a$4 = StackTraceModel;
    SDKModel.register(StackTraceModel, { capabilities: 0, autostart: false });
    UIStrings$P = {
      index: "(index)",
      thisFileWasChangedExternally: "This file was changed externally. Would you like to reload it?"
    };
    str_$O = registerUIStrings("models/workspace/UISourceCode.ts", UIStrings$P);
    i18nString$A = getLocalizedString.bind(void 0, str_$O);
    UISourceCode = class extends ObjectWrapper {
      #origin;
      #parentURL;
      #project;
      #url;
      #name;
      #contentType;
      #requestContentPromise = null;
      #decorations = /* @__PURE__ */ new Map();
      #hasCommits = false;
      #messages = null;
      #content = null;
      #forceLoadOnCheckContent = false;
      #checkingContent = false;
      #lastAcceptedContent = null;
      #workingCopy = null;
      #workingCopyGetter = null;
      #disableEdit = false;
      #contentEncoded;
      #isKnownThirdParty = false;
      #isUnconditionallyIgnoreListed = false;
      #containsAiChanges = false;
      constructor(project, url, contentType) {
        super();
        this.#project = project;
        this.#url = url;
        const parsedURL = ParsedURL2.fromString(url);
        if (parsedURL) {
          this.#origin = parsedURL.securityOrigin();
          this.#parentURL = ParsedURL2.concatenate(this.#origin, parsedURL.folderPathComponents);
          if (parsedURL.queryParams && !(parsedURL.lastPathComponent && contentType.isFromSourceMap())) {
            this.#name = parsedURL.lastPathComponent + "?" + parsedURL.queryParams;
          } else {
            try {
              this.#name = decodeURIComponent(parsedURL.lastPathComponent);
            } catch {
              this.#name = parsedURL.lastPathComponent;
            }
          }
        } else {
          this.#origin = EmptyUrlString;
          this.#parentURL = EmptyUrlString;
          this.#name = url;
        }
        this.#contentType = contentType;
      }
      requestMetadata() {
        return this.#project.requestMetadata(this);
      }
      name() {
        return this.#name;
      }
      mimeType() {
        return this.#project.mimeType(this);
      }
      url() {
        return this.#url;
      }
      canonicalScriptId() {
        return `${this.#contentType.name()},${this.#url}`;
      }
      parentURL() {
        return this.#parentURL;
      }
      origin() {
        return this.#origin;
      }
      fullDisplayName() {
        return this.#project.fullDisplayName(this);
      }
      displayName(skipTrim) {
        if (!this.#name) {
          return i18nString$A(UIStrings$P.index);
        }
        const name = this.#name;
        return skipTrim ? name : trimEndWithMaxLength(name, 100);
      }
      canRename() {
        return this.#project.canRename();
      }
      rename(newName) {
        const { resolve: resolve2, promise } = Promise.withResolvers();
        this.#project.rename(this, newName, innerCallback.bind(this));
        return promise;
        function innerCallback(success, newName2, newURL, newContentType) {
          if (success) {
            this.#updateName(newName2, newURL, newContentType);
          }
          resolve2(success);
        }
      }
      remove() {
        this.#project.deleteFile(this);
      }
      #updateName(name, url, contentType) {
        const oldURL = this.#url;
        this.#name = name;
        if (url) {
          this.#url = url;
        } else {
          this.#url = ParsedURL2.relativePathToUrlString(name, oldURL);
        }
        if (contentType) {
          this.#contentType = contentType;
        }
        this.dispatchEventToListeners(Events$2.TitleChanged, this);
        this.project().workspace().dispatchEventToListeners(Events$1.UISourceCodeRenamed, { oldURL, uiSourceCode: this });
      }
      contentURL() {
        return this.url();
      }
      contentType() {
        return this.#contentType;
      }
      project() {
        return this.#project;
      }
      requestContentData({ cachedWasmOnly } = {}) {
        if (this.#requestContentPromise) {
          return this.#requestContentPromise;
        }
        if (this.#content) {
          return Promise.resolve(this.#content);
        }
        if (cachedWasmOnly && this.mimeType() === "application/wasm") {
          return Promise.resolve(new WasmDisassembly([], [], []));
        }
        this.#requestContentPromise = this.#requestContent();
        return this.#requestContentPromise;
      }
      async #requestContent() {
        if (this.#content) {
          throw new Error("Called UISourceCode#requestContentImpl even though content is available for " + this.#url);
        }
        try {
          this.#content = await this.#project.requestFileContent(this);
        } catch (err) {
          this.#content = { error: err ? String(err) : "" };
        }
        return this.#content;
      }
      #decodeContent(content) {
        if (!content) {
          return null;
        }
        return content.isEncoded && content.content ? window.atob(content.content) : content.content;
      }
      #unsafeDecodeContentData(content) {
        if (!content || ContentData.isError(content)) {
          return null;
        }
        return content.createdFromBase64 ? window.atob(content.base64) : content.text;
      }
      async checkContentUpdated() {
        if (!this.#content && !this.#forceLoadOnCheckContent) {
          return;
        }
        if (!this.#project.canSetFileContent() || this.#checkingContent) {
          return;
        }
        this.#checkingContent = true;
        const updatedContent = ContentData.asDeferredContent(await this.#project.requestFileContent(this));
        if ("error" in updatedContent) {
          return;
        }
        this.#checkingContent = false;
        if (updatedContent.content === null) {
          const workingCopy = this.workingCopy();
          this.#contentCommitted("", false);
          this.setWorkingCopy(workingCopy);
          return;
        }
        if (this.#lastAcceptedContent === updatedContent.content) {
          return;
        }
        if (this.#unsafeDecodeContentData(this.#content) === this.#decodeContent(updatedContent)) {
          this.#lastAcceptedContent = null;
          return;
        }
        if (!this.isDirty() || this.#workingCopy === updatedContent.content) {
          this.#contentCommitted(updatedContent.content, false);
          return;
        }
        await reveal(this);
        await new Promise((resolve2) => window.setTimeout(resolve2, 0));
        const shouldUpdate = window.confirm(i18nString$A(UIStrings$P.thisFileWasChangedExternally));
        if (shouldUpdate) {
          this.#contentCommitted(updatedContent.content, false);
        } else {
          this.#lastAcceptedContent = updatedContent.content;
        }
      }
      forceLoadOnCheckContent() {
        this.#forceLoadOnCheckContent = true;
      }
      #commitContent(content) {
        if (this.#project.canSetFileContent()) {
          void this.#project.setFileContent(this, content, false);
        }
        this.#contentCommitted(content, true);
      }
      #contentCommitted(content, committedByUser) {
        this.#lastAcceptedContent = null;
        this.#content = new ContentData(content, Boolean(this.#contentEncoded), this.mimeType());
        this.#requestContentPromise = null;
        this.#hasCommits = true;
        this.#resetWorkingCopy();
        const data32 = { uiSourceCode: this, content, encoded: this.#contentEncoded };
        this.dispatchEventToListeners(Events$2.WorkingCopyCommitted, data32);
        this.#project.workspace().dispatchEventToListeners(Events$1.WorkingCopyCommitted, data32);
        if (committedByUser) {
          this.#project.workspace().dispatchEventToListeners(Events$1.WorkingCopyCommittedByUser, data32);
        }
      }
      addRevision(content) {
        this.#commitContent(content);
      }
      hasCommits() {
        return this.#hasCommits;
      }
      workingCopy() {
        return this.workingCopyContent().content || "";
      }
      workingCopyContent() {
        return this.workingCopyContentData().asDeferedContent();
      }
      workingCopyContentData() {
        if (this.#workingCopyGetter) {
          this.#workingCopy = this.#workingCopyGetter();
          this.#workingCopyGetter = null;
        }
        const contentData = this.#content ? ContentData.contentDataOrEmpty(this.#content) : EMPTY_TEXT_CONTENT_DATA;
        if (this.#workingCopy !== null) {
          return new ContentData(this.#workingCopy, false, contentData.mimeType);
        }
        return contentData;
      }
      resetWorkingCopy() {
        this.#resetWorkingCopy();
        this.#workingCopyChanged();
      }
      #resetWorkingCopy() {
        this.#workingCopy = null;
        this.#workingCopyGetter = null;
        this.setContainsAiChanges(false);
      }
      setWorkingCopy(newWorkingCopy) {
        this.#workingCopy = newWorkingCopy;
        this.#workingCopyGetter = null;
        this.#workingCopyChanged();
      }
      setContainsAiChanges(containsAiChanges) {
        this.#containsAiChanges = containsAiChanges;
      }
      containsAiChanges() {
        return this.#containsAiChanges;
      }
      setContent(content, isBase64) {
        this.#contentEncoded = isBase64;
        if (this.#project.canSetFileContent()) {
          void this.#project.setFileContent(this, content, isBase64);
        }
        this.#contentCommitted(content, true);
      }
      setWorkingCopyGetter(workingCopyGetter) {
        this.#workingCopyGetter = workingCopyGetter;
        this.#workingCopyChanged();
      }
      #workingCopyChanged() {
        this.#removeAllMessages();
        this.dispatchEventToListeners(Events$2.WorkingCopyChanged, this);
        this.#project.workspace().dispatchEventToListeners(Events$1.WorkingCopyChanged, { uiSourceCode: this });
      }
      removeWorkingCopyGetter() {
        if (!this.#workingCopyGetter) {
          return;
        }
        this.#workingCopy = this.#workingCopyGetter();
        this.#workingCopyGetter = null;
      }
      commitWorkingCopy() {
        if (this.isDirty()) {
          this.#commitContent(this.workingCopy());
        }
      }
      isDirty() {
        return this.#workingCopy !== null || this.#workingCopyGetter !== null;
      }
      isKnownThirdParty() {
        return this.#isKnownThirdParty;
      }
      markKnownThirdParty() {
        this.#isKnownThirdParty = true;
      }
      isUnconditionallyIgnoreListed() {
        return this.#isUnconditionallyIgnoreListed;
      }
      isFetchXHR() {
        return [resourceTypes.XHR, resourceTypes.Fetch].includes(this.contentType());
      }
      markAsUnconditionallyIgnoreListed() {
        this.#isUnconditionallyIgnoreListed = true;
      }
      extension() {
        return ParsedURL2.extractExtension(this.#name);
      }
      content() {
        if (!this.#content || "error" in this.#content) {
          return "";
        }
        return this.#content.text;
      }
      loadError() {
        return this.#content && "error" in this.#content && this.#content.error || null;
      }
      searchInContent(query, caseSensitive, isRegex) {
        if (!this.#content || "error" in this.#content) {
          return this.#project.searchInFileContent(this, query, caseSensitive, isRegex);
        }
        return Promise.resolve(performSearchInContentData(this.#content, query, caseSensitive, isRegex));
      }
      contentLoaded() {
        return Boolean(this.#content);
      }
      uiLocation(lineNumber, columnNumber) {
        return new UILocation(this, lineNumber, columnNumber);
      }
      messages() {
        return this.#messages ? new Set(this.#messages) : /* @__PURE__ */ new Set();
      }
      addLineMessage(level, text, lineNumber, columnNumber, clickHandler) {
        const range2 = TextRange.createFromLocation(lineNumber, columnNumber || 0);
        const message = new Message2(level, text, clickHandler, range2);
        this.addMessage(message);
        return message;
      }
      addMessage(message) {
        if (!this.#messages) {
          this.#messages = /* @__PURE__ */ new Set();
        }
        this.#messages.add(message);
        this.dispatchEventToListeners(Events$2.MessageAdded, message);
      }
      removeMessage(message) {
        if (this.#messages?.delete(message)) {
          this.dispatchEventToListeners(Events$2.MessageRemoved, message);
        }
      }
      #removeAllMessages() {
        if (!this.#messages) {
          return;
        }
        for (const message of this.#messages) {
          this.dispatchEventToListeners(Events$2.MessageRemoved, message);
        }
        this.#messages = null;
      }
      setDecorationData(type2, data32) {
        if (data32 !== this.#decorations.get(type2)) {
          this.#decorations.set(type2, data32);
          this.dispatchEventToListeners(Events$2.DecorationChanged, type2);
        }
      }
      getDecorationData(type2) {
        return this.#decorations.get(type2);
      }
      disableEdit() {
        this.#disableEdit = true;
      }
      editDisabled() {
        return this.#disableEdit;
      }
      isIgnoreListed() {
        return IgnoreListManager.instance().isUserOrSourceMapIgnoreListedUISourceCode(this);
      }
    };
    (function(Events2) {
      Events2["WorkingCopyChanged"] = "WorkingCopyChanged";
      Events2["WorkingCopyCommitted"] = "WorkingCopyCommitted";
      Events2["TitleChanged"] = "TitleChanged";
      Events2["MessageAdded"] = "MessageAdded";
      Events2["MessageRemoved"] = "MessageRemoved";
      Events2["DecorationChanged"] = "DecorationChanged";
    })(Events$2 || (Events$2 = {}));
    UILocation = class {
      uiSourceCode;
      lineNumber;
      columnNumber;
      constructor(uiSourceCode, lineNumber, columnNumber) {
        this.uiSourceCode = uiSourceCode;
        this.lineNumber = lineNumber;
        this.columnNumber = columnNumber;
      }
      linkText(skipTrim = false, showColumnNumber = false) {
        const displayName = this.uiSourceCode.displayName(skipTrim);
        const lineAndColumnText = this.lineAndColumnText(showColumnNumber);
        let text = lineAndColumnText ? displayName + ":" + lineAndColumnText : displayName;
        if (this.uiSourceCode.isDirty()) {
          text = "*" + text;
        }
        return text;
      }
      lineAndColumnText(showColumnNumber = false) {
        let lineAndColumnText;
        if (this.uiSourceCode.mimeType() === "application/wasm") {
          if (typeof this.columnNumber === "number") {
            lineAndColumnText = `0x${this.columnNumber.toString(16)}`;
          }
        } else {
          lineAndColumnText = `${this.lineNumber + 1}`;
          if (showColumnNumber && typeof this.columnNumber === "number") {
            lineAndColumnText += ":" + (this.columnNumber + 1);
          }
        }
        return lineAndColumnText;
      }
      id() {
        if (typeof this.columnNumber === "number") {
          return this.uiSourceCode.project().id() + ":" + this.uiSourceCode.url() + ":" + this.lineNumber + ":" + this.columnNumber;
        }
        return this.lineId();
      }
      lineId() {
        return this.uiSourceCode.project().id() + ":" + this.uiSourceCode.url() + ":" + this.lineNumber;
      }
      static comparator(location1, location2) {
        return location1.compareTo(location2);
      }
      compareTo(other) {
        if (this.uiSourceCode.url() !== other.uiSourceCode.url()) {
          return this.uiSourceCode.url() > other.uiSourceCode.url() ? 1 : -1;
        }
        if (this.lineNumber !== other.lineNumber) {
          return this.lineNumber - other.lineNumber;
        }
        if (this.columnNumber === other.columnNumber) {
          return 0;
        }
        if (typeof this.columnNumber !== "number") {
          return -1;
        }
        if (typeof other.columnNumber !== "number") {
          return 1;
        }
        return this.columnNumber - other.columnNumber;
      }
      isIgnoreListed() {
        return this.uiSourceCode.isIgnoreListed();
      }
    };
    UIFunctionBounds = class {
      uiSourceCode;
      range;
      name;
      constructor(uiSourceCode, range2, name) {
        this.uiSourceCode = uiSourceCode;
        this.range = range2;
        this.name = name;
      }
    };
    Message2 = class {
      #level;
      #text;
      range;
      #clickHandler;
      constructor(level, text, clickHandler, range2) {
        this.#level = level;
        this.#text = text;
        this.range = range2 ?? new TextRange(0, 0, 0, 0);
        this.#clickHandler = clickHandler;
      }
      level() {
        return this.#level;
      }
      text() {
        return this.#text;
      }
      clickHandler() {
        return this.#clickHandler;
      }
      lineNumber() {
        return this.range.startLine;
      }
      columnNumber() {
        return this.range.startColumn;
      }
      isEqual(another) {
        return this.text() === another.text() && this.level() === another.level() && this.range.equal(another.range);
      }
    };
    UISourceCodeMetadata = class {
      modificationTime;
      contentSize;
      constructor(modificationTime, contentSize) {
        this.modificationTime = modificationTime;
        this.contentSize = contentSize;
      }
    };
    (function(projectTypes2) {
      projectTypes2["Debugger"] = "debugger";
      projectTypes2["Formatter"] = "formatter";
      projectTypes2["Network"] = "network";
      projectTypes2["FileSystem"] = "filesystem";
      projectTypes2["ConnectableFileSystem"] = "connectablefilesystem";
      projectTypes2["ContentScripts"] = "contentscripts";
      projectTypes2["Service"] = "service";
    })(projectTypes || (projectTypes = {}));
    ProjectStore = class {
      #workspace;
      #id;
      #type;
      #displayName;
      #uiSourceCodes = /* @__PURE__ */ new Map();
      constructor(workspace, id2, type2, displayName) {
        this.#workspace = workspace;
        this.#id = id2;
        this.#type = type2;
        this.#displayName = displayName;
      }
      id() {
        return this.#id;
      }
      type() {
        return this.#type;
      }
      displayName() {
        return this.#displayName;
      }
      workspace() {
        return this.#workspace;
      }
      createUISourceCode(url, contentType) {
        return new UISourceCode(this, url, contentType);
      }
      addUISourceCode(uiSourceCode) {
        const url = uiSourceCode.url();
        if (this.uiSourceCodeForURL(url)) {
          return false;
        }
        this.#uiSourceCodes.set(url, uiSourceCode);
        this.#workspace.dispatchEventToListeners(Events$1.UISourceCodeAdded, uiSourceCode);
        return true;
      }
      removeUISourceCode(url) {
        const uiSourceCode = this.#uiSourceCodes.get(url);
        if (uiSourceCode === void 0) {
          return;
        }
        this.#uiSourceCodes.delete(url);
        this.#workspace.dispatchEventToListeners(Events$1.UISourceCodeRemoved, uiSourceCode);
      }
      removeProject() {
        this.#workspace.removeProject(this);
        this.#uiSourceCodes.clear();
      }
      uiSourceCodeForURL(url) {
        return this.#uiSourceCodes.get(url) ?? null;
      }
      uiSourceCodes() {
        return this.#uiSourceCodes.values();
      }
      renameUISourceCode(uiSourceCode, newName) {
        const oldPath = uiSourceCode.url();
        const newPath = uiSourceCode.parentURL() ? ParsedURL2.urlFromParentUrlAndName(uiSourceCode.parentURL(), newName) : ParsedURL2.preEncodeSpecialCharactersInPath(newName);
        this.#uiSourceCodes.set(newPath, uiSourceCode);
        this.#uiSourceCodes.delete(oldPath);
      }
      rename(_uiSourceCode, _newName, _callback) {
      }
      excludeFolder(_path) {
      }
      deleteFile(_uiSourceCode) {
      }
      deleteDirectoryRecursively(_path) {
        return Promise.resolve(false);
      }
      remove() {
      }
      indexContent(_progress) {
      }
    };
    WorkspaceImpl = class _WorkspaceImpl extends ObjectWrapper {
      #projects = /* @__PURE__ */ new Map();
      #hasResourceContentTrackingExtensions = false;
      static instance(opts = { forceNew: null }) {
        const { forceNew } = opts;
        if (!globalInstance().has(_WorkspaceImpl) || forceNew) {
          globalInstance().set(_WorkspaceImpl, new _WorkspaceImpl());
        }
        return globalInstance().get(_WorkspaceImpl);
      }
      static removeInstance() {
        globalInstance().delete(_WorkspaceImpl);
      }
      uiSourceCode(projectId, url) {
        const project = this.#projects.get(projectId);
        return project ? project.uiSourceCodeForURL(url) : null;
      }
      uiSourceCodeForURL(url) {
        for (const project of this.#projects.values()) {
          const uiSourceCode = project.uiSourceCodeForURL(url);
          if (uiSourceCode) {
            return uiSourceCode;
          }
        }
        return null;
      }
      findCompatibleUISourceCodes(uiSourceCode) {
        const url = uiSourceCode.url();
        const contentType = uiSourceCode.contentType();
        const result = [];
        for (const project of this.#projects.values()) {
          if (uiSourceCode.project().type() !== project.type()) {
            continue;
          }
          const candidate = project.uiSourceCodeForURL(url);
          if (candidate && candidate.url() === url && candidate.contentType() === contentType) {
            result.push(candidate);
          }
        }
        return result;
      }
      uiSourceCodesForProjectType(type2) {
        const result = [];
        for (const project of this.#projects.values()) {
          if (project.type() === type2) {
            for (const uiSourceCode of project.uiSourceCodes()) {
              result.push(uiSourceCode);
            }
          }
        }
        return result;
      }
      addProject(project) {
        console.assert(!this.#projects.has(project.id()), `A project with id ${project.id()} already exists!`);
        this.#projects.set(project.id(), project);
        this.dispatchEventToListeners(Events$1.ProjectAdded, project);
      }
      removeProject(project) {
        this.#projects.delete(project.id());
        this.dispatchEventToListeners(Events$1.ProjectRemoved, project);
      }
      project(projectId) {
        return this.#projects.get(projectId) || null;
      }
      projectForFileSystemRoot(root2) {
        const projectId = ParsedURL2.rawPathToUrlString(root2);
        return this.project(projectId);
      }
      projects() {
        return [...this.#projects.values()];
      }
      projectsForType(type2) {
        function filterByType(project) {
          return project.type() === type2;
        }
        return this.projects().filter(filterByType);
      }
      uiSourceCodes() {
        const result = [];
        for (const project of this.#projects.values()) {
          for (const uiSourceCode of project.uiSourceCodes()) {
            result.push(uiSourceCode);
          }
        }
        return result;
      }
      setHasResourceContentTrackingExtensions(hasExtensions) {
        this.#hasResourceContentTrackingExtensions = hasExtensions;
      }
      hasResourceContentTrackingExtensions() {
        return this.#hasResourceContentTrackingExtensions;
      }
    };
    (function(Events2) {
      Events2["UISourceCodeAdded"] = "UISourceCodeAdded";
      Events2["UISourceCodeRemoved"] = "UISourceCodeRemoved";
      Events2["UISourceCodeRenamed"] = "UISourceCodeRenamed";
      Events2["WorkingCopyChanged"] = "WorkingCopyChanged";
      Events2["WorkingCopyCommitted"] = "WorkingCopyCommitted";
      Events2["WorkingCopyCommittedByUser"] = "WorkingCopyCommittedByUser";
      Events2["ProjectAdded"] = "ProjectAdded";
      Events2["ProjectRemoved"] = "ProjectRemoved";
    })(Events$1 || (Events$1 = {}));
    UIStrings$O = {
      removeFromIgnoreList: "Remove from ignore list",
      addScriptToIgnoreList: "Add script to ignore list",
      addDirectoryToIgnoreList: "Add directory to ignore list",
      addAllContentScriptsToIgnoreList: "Add all extension scripts to ignore list",
      addAllThirdPartyScriptsToIgnoreList: "Add all third-party scripts to ignore list",
      addAllAnonymousScriptsToIgnoreList: "Add all anonymous scripts to ignore list"
    };
    str_$N = registerUIStrings("models/workspace/IgnoreListManager.ts", UIStrings$O);
    i18nString$z = getLocalizedString.bind(void 0, str_$N);
    IgnoreListManager = class _IgnoreListManager extends ObjectWrapper {
      #settings;
      #targetManager;
      #listeners = /* @__PURE__ */ new Set();
      #isIgnoreListedURLCache = /* @__PURE__ */ new Map();
      #contentScriptExecutionContexts = /* @__PURE__ */ new Set();
      constructor(settings, targetManager) {
        super();
        this.#settings = settings;
        this.#targetManager = targetManager;
        this.#targetManager.addModelListener(DebuggerModel, Events$5.GlobalObjectCleared, this.clearCacheIfNeeded.bind(this), this);
        this.#targetManager.addModelListener(RuntimeModel, Events$9.ExecutionContextCreated, this.onExecutionContextCreated, this, { scoped: true });
        this.#targetManager.addModelListener(RuntimeModel, Events$9.ExecutionContextDestroyed, this.onExecutionContextDestroyed, this, { scoped: true });
        this.#settings.moduleSetting("skip-stack-frames-pattern").addChangeListener(this.patternChanged.bind(this));
        this.#settings.moduleSetting("skip-content-scripts").addChangeListener(this.patternChanged.bind(this));
        this.#settings.moduleSetting("automatically-ignore-list-known-third-party-scripts").addChangeListener(this.patternChanged.bind(this));
        this.#settings.moduleSetting("enable-ignore-listing").addChangeListener(this.patternChanged.bind(this));
        this.#settings.moduleSetting("skip-anonymous-scripts").addChangeListener(this.patternChanged.bind(this));
        this.#targetManager.observeModels(DebuggerModel, this);
      }
      static instance(opts = {
        forceNew: null
      }) {
        const { forceNew } = opts;
        if (forceNew) {
          globalInstance().set(_IgnoreListManager, new _IgnoreListManager(opts.settings ?? Settings.instance(), opts.targetManager ?? TargetManager3.instance()));
        }
        return globalInstance().get(_IgnoreListManager);
      }
      static removeInstance() {
        globalInstance().delete(_IgnoreListManager);
      }
      addChangeListener(listener) {
        this.#listeners.add(listener);
      }
      removeChangeListener(listener) {
        this.#listeners.delete(listener);
      }
      modelAdded(debuggerModel) {
        void this.setIgnoreListPatterns(debuggerModel);
        const sourceMapManager = debuggerModel.sourceMapManager();
        sourceMapManager.addEventListener(Events$b.SourceMapAttached, this.sourceMapAttached, this);
        sourceMapManager.addEventListener(Events$b.SourceMapDetached, this.sourceMapDetached, this);
      }
      modelRemoved(debuggerModel) {
        this.clearCacheIfNeeded();
        const sourceMapManager = debuggerModel.sourceMapManager();
        sourceMapManager.removeEventListener(Events$b.SourceMapAttached, this.sourceMapAttached, this);
        sourceMapManager.removeEventListener(Events$b.SourceMapDetached, this.sourceMapDetached, this);
      }
      isContentScript(executionContext) {
        return !executionContext.isDefault;
      }
      onExecutionContextCreated(event) {
        if (this.isContentScript(event.data)) {
          this.#contentScriptExecutionContexts.add(event.data.uniqueId);
          if (this.skipContentScripts) {
            for (const debuggerModel of this.#targetManager.models(DebuggerModel)) {
              void this.updateIgnoredExecutionContexts(debuggerModel);
            }
          }
        }
      }
      onExecutionContextDestroyed(event) {
        if (this.isContentScript(event.data)) {
          this.#contentScriptExecutionContexts.delete(event.data.uniqueId);
          if (this.skipContentScripts) {
            for (const debuggerModel of this.#targetManager.models(DebuggerModel)) {
              void this.updateIgnoredExecutionContexts(debuggerModel);
            }
          }
        }
      }
      clearCacheIfNeeded() {
        if (this.#isIgnoreListedURLCache.size > 1024) {
          this.#isIgnoreListedURLCache.clear();
        }
      }
      getSkipStackFramesPatternSetting() {
        return this.#settings.moduleSetting("skip-stack-frames-pattern");
      }
      setIgnoreListPatterns(debuggerModel) {
        const regexPatterns = this.enableIgnoreListing ? this.getSkipStackFramesPatternSetting().getAsArray() : [];
        const patterns = [];
        for (const item of regexPatterns) {
          if (!item.disabled && item.pattern) {
            patterns.push(item.pattern);
          }
        }
        return debuggerModel.setBlackboxPatterns(patterns, this.skipAnonymousScripts);
      }
      updateIgnoredExecutionContexts(debuggerModel) {
        return debuggerModel.setBlackboxExecutionContexts(this.skipContentScripts ? Array.from(this.#contentScriptExecutionContexts) : []);
      }
      getGeneralRulesForUISourceCode(uiSourceCode) {
        const projectType = uiSourceCode.project().type();
        const isContentScript = projectType === projectTypes.ContentScripts;
        const isKnownThirdParty = uiSourceCode.isKnownThirdParty();
        return { isContentScript, isKnownThirdParty };
      }
      isUserOrSourceMapIgnoreListedUISourceCode(uiSourceCode) {
        if (uiSourceCode.isUnconditionallyIgnoreListed()) {
          return true;
        }
        const url = this.uiSourceCodeURL(uiSourceCode);
        return this.isUserIgnoreListedURL(url, this.getGeneralRulesForUISourceCode(uiSourceCode));
      }
      isUserIgnoreListedURL(url, options2) {
        if (!this.enableIgnoreListing) {
          return false;
        }
        if (options2?.isContentScript && this.skipContentScripts) {
          return true;
        }
        if (options2?.isKnownThirdParty && this.automaticallyIgnoreListKnownThirdPartyScripts) {
          return true;
        }
        if (!url) {
          return this.skipAnonymousScripts;
        }
        if (this.#isIgnoreListedURLCache.has(url)) {
          return Boolean(this.#isIgnoreListedURLCache.get(url));
        }
        const isIgnoreListed = this.getFirstMatchedRegex(url) !== null;
        this.#isIgnoreListedURLCache.set(url, isIgnoreListed);
        return isIgnoreListed;
      }
      getFirstMatchedRegex(url) {
        if (!url) {
          return null;
        }
        const regexPatterns = this.getSkipStackFramesPatternSetting().getAsArray();
        const regexValue = this.urlToRegExpString(url);
        if (!regexValue) {
          return null;
        }
        for (let i = 0; i < regexPatterns.length; ++i) {
          const item = regexPatterns[i];
          if (item.disabled || item.disabledForUrl === url) {
            continue;
          }
          const regex2 = new RegExp(item.pattern);
          if (regex2.test(url)) {
            return regex2;
          }
        }
        return null;
      }
      sourceMapAttached(event) {
        const script = event.data.client;
        const sourceMap2 = event.data.sourceMap;
        void this.updateScriptRanges(script, sourceMap2);
      }
      sourceMapDetached(event) {
        const script = event.data.client;
        void this.updateScriptRanges(script, void 0);
      }
      async updateScriptRanges(script, sourceMap2) {
        let hasIgnoreListedMappings = false;
        if (!this.isUserIgnoreListedURL(script.sourceURL, { isContentScript: script.isContentScript() })) {
          hasIgnoreListedMappings = sourceMap2?.sourceURLs().some((url) => this.isUserIgnoreListedURL(url, { isKnownThirdParty: sourceMap2.hasIgnoreListHint(url) })) ?? false;
        }
        if (!hasIgnoreListedMappings) {
          if (scriptToRange.get(script) && await script.setBlackboxedRanges([])) {
            scriptToRange.delete(script);
          }
          this.dispatchEventToListeners("IGNORED_SCRIPT_RANGES_UPDATED", script);
          return;
        }
        if (!sourceMap2) {
          return;
        }
        const newRanges = sourceMap2.findRanges((srcURL) => this.isUserIgnoreListedURL(srcURL, { isKnownThirdParty: sourceMap2.hasIgnoreListHint(srcURL) }), { isStartMatching: true }).flatMap((range2) => [range2.start, range2.end]);
        const oldRanges = scriptToRange.get(script) || [];
        if (!isEqual2(oldRanges, newRanges) && await script.setBlackboxedRanges(newRanges)) {
          scriptToRange.set(script, newRanges);
        }
        this.dispatchEventToListeners("IGNORED_SCRIPT_RANGES_UPDATED", script);
        function isEqual2(rangesA, rangesB) {
          if (rangesA.length !== rangesB.length) {
            return false;
          }
          for (let i = 0; i < rangesA.length; ++i) {
            if (rangesA[i].lineNumber !== rangesB[i].lineNumber || rangesA[i].columnNumber !== rangesB[i].columnNumber) {
              return false;
            }
          }
          return true;
        }
      }
      uiSourceCodeURL(uiSourceCode) {
        return uiSourceCode.project().type() === projectTypes.Debugger ? null : uiSourceCode.url();
      }
      canIgnoreListUISourceCode(uiSourceCode) {
        const url = this.uiSourceCodeURL(uiSourceCode);
        return url ? Boolean(this.urlToRegExpString(url)) : false;
      }
      ignoreListUISourceCode(uiSourceCode) {
        const url = this.uiSourceCodeURL(uiSourceCode);
        if (url) {
          this.ignoreListURL(url);
        }
      }
      unIgnoreListUISourceCode(uiSourceCode) {
        this.unIgnoreListURL(this.uiSourceCodeURL(uiSourceCode), this.getGeneralRulesForUISourceCode(uiSourceCode));
      }
      get enableIgnoreListing() {
        return this.#settings.moduleSetting("enable-ignore-listing").get();
      }
      set enableIgnoreListing(value) {
        this.#settings.moduleSetting("enable-ignore-listing").set(value);
      }
      get skipContentScripts() {
        return this.enableIgnoreListing && this.#settings.moduleSetting("skip-content-scripts").get();
      }
      get skipAnonymousScripts() {
        return this.enableIgnoreListing && this.#settings.moduleSetting("skip-anonymous-scripts").get();
      }
      get automaticallyIgnoreListKnownThirdPartyScripts() {
        return this.enableIgnoreListing && this.#settings.moduleSetting("automatically-ignore-list-known-third-party-scripts").get();
      }
      ignoreListContentScripts() {
        if (!this.enableIgnoreListing) {
          this.enableIgnoreListing = true;
        }
        this.#settings.moduleSetting("skip-content-scripts").set(true);
      }
      unIgnoreListContentScripts() {
        this.#settings.moduleSetting("skip-content-scripts").set(false);
      }
      ignoreListAnonymousScripts() {
        if (!this.enableIgnoreListing) {
          this.enableIgnoreListing = true;
        }
        this.#settings.moduleSetting("skip-anonymous-scripts").set(true);
      }
      unIgnoreListAnonymousScripts() {
        this.#settings.moduleSetting("skip-anonymous-scripts").set(false);
      }
      ignoreListThirdParty() {
        if (!this.enableIgnoreListing) {
          this.enableIgnoreListing = true;
        }
        this.#settings.moduleSetting("automatically-ignore-list-known-third-party-scripts").set(true);
      }
      unIgnoreListThirdParty() {
        this.#settings.moduleSetting("automatically-ignore-list-known-third-party-scripts").set(false);
      }
      ignoreListURL(url) {
        const regexValue = this.urlToRegExpString(url);
        if (!regexValue) {
          return;
        }
        this.addRegexToIgnoreList(regexValue, url);
      }
      addRegexToIgnoreList(regexValue, disabledForUrl) {
        const regexPatterns = this.getSkipStackFramesPatternSetting().getAsArray();
        let found = false;
        for (let i = 0; i < regexPatterns.length; ++i) {
          const item = regexPatterns[i];
          if (item.pattern === regexValue || disabledForUrl && item.disabledForUrl === disabledForUrl) {
            item.disabled = false;
            item.disabledForUrl = void 0;
            found = true;
          }
        }
        if (!found) {
          regexPatterns.push({ pattern: regexValue, disabled: false });
        }
        if (!this.enableIgnoreListing) {
          this.enableIgnoreListing = true;
        }
        this.getSkipStackFramesPatternSetting().setAsArray(regexPatterns);
      }
      unIgnoreListURL(url, options2) {
        if (options2?.isContentScript) {
          this.unIgnoreListContentScripts();
        }
        if (options2?.isKnownThirdParty) {
          this.unIgnoreListThirdParty();
        }
        if (!url) {
          this.unIgnoreListAnonymousScripts();
          return;
        }
        let regexPatterns = this.getSkipStackFramesPatternSetting().getAsArray();
        const regexValue = _IgnoreListManager.instance().urlToRegExpString(url);
        if (!regexValue) {
          return;
        }
        regexPatterns = regexPatterns.filter(function(item) {
          return item.pattern !== regexValue;
        });
        for (let i = 0; i < regexPatterns.length; ++i) {
          const item = regexPatterns[i];
          if (item.disabled) {
            continue;
          }
          try {
            const regex2 = new RegExp(item.pattern);
            if (regex2.test(url)) {
              item.disabled = true;
              item.disabledForUrl = url;
            }
          } catch {
          }
        }
        this.getSkipStackFramesPatternSetting().setAsArray(regexPatterns);
      }
      removeIgnoreListPattern(regexValue) {
        let regexPatterns = this.getSkipStackFramesPatternSetting().getAsArray();
        regexPatterns = regexPatterns.filter(function(item) {
          return item.pattern !== regexValue;
        });
        this.getSkipStackFramesPatternSetting().setAsArray(regexPatterns);
      }
      ignoreListHasPattern(regexValue, enabledOnly) {
        const regexPatterns = this.getSkipStackFramesPatternSetting().getAsArray();
        return regexPatterns.some((item) => !(enabledOnly && item.disabled) && item.pattern === regexValue);
      }
      async patternChanged() {
        this.#isIgnoreListedURLCache.clear();
        const promises2 = [];
        for (const debuggerModel of this.#targetManager.models(DebuggerModel)) {
          promises2.push(this.setIgnoreListPatterns(debuggerModel));
          const sourceMapManager = debuggerModel.sourceMapManager();
          for (const script of debuggerModel.scripts()) {
            promises2.push(this.updateScriptRanges(script, sourceMapManager.sourceMapForClient(script)));
          }
          promises2.push(this.updateIgnoredExecutionContexts(debuggerModel));
        }
        await Promise.all(promises2);
        const listeners = Array.from(this.#listeners);
        for (const listener of listeners) {
          listener();
        }
        this.patternChangeFinishedForTests();
      }
      patternChangeFinishedForTests() {
      }
      urlToRegExpString(url) {
        const parsedURL = new ParsedURL2(url);
        if (parsedURL.isAboutBlank() || parsedURL.isDataURL()) {
          return "";
        }
        if (!parsedURL.isValid) {
          return "^" + escapeForRegExp(url) + "$";
        }
        let name = parsedURL.lastPathComponent;
        if (name) {
          name = "/" + name;
        } else if (parsedURL.folderPathComponents) {
          name = parsedURL.folderPathComponents + "/";
        }
        if (!name) {
          name = parsedURL.host;
        }
        if (!name) {
          return "";
        }
        const scheme = parsedURL.scheme;
        let prefix = "";
        if (scheme && scheme !== "http" && scheme !== "https") {
          prefix = "^" + scheme + "://";
          if (scheme === "chrome-extension") {
            prefix += parsedURL.host + "\\b";
          }
          prefix += ".*";
        }
        return prefix + escapeForRegExp(name) + (url.endsWith(name) ? "$" : "\\b");
      }
      getIgnoreListURLContextMenuItems(uiSourceCode) {
        if (uiSourceCode.project().type() === projectTypes.FileSystem) {
          return [];
        }
        const menuItems = [];
        const canIgnoreList = this.canIgnoreListUISourceCode(uiSourceCode);
        const isIgnoreListed = this.isUserOrSourceMapIgnoreListedUISourceCode(uiSourceCode);
        const isAnonymous = !this.uiSourceCodeURL(uiSourceCode);
        const { isContentScript, isKnownThirdParty } = this.getGeneralRulesForUISourceCode(uiSourceCode);
        if (isIgnoreListed) {
          if (canIgnoreList || isContentScript || isKnownThirdParty || isAnonymous) {
            menuItems.push({
              text: i18nString$z(UIStrings$O.removeFromIgnoreList),
              callback: this.unIgnoreListUISourceCode.bind(this, uiSourceCode),
              jslogContext: "remove-script-from-ignorelist"
            });
          }
        } else {
          if (canIgnoreList) {
            menuItems.push({
              text: i18nString$z(UIStrings$O.addScriptToIgnoreList),
              callback: this.ignoreListUISourceCode.bind(this, uiSourceCode),
              jslogContext: "add-script-to-ignorelist"
            });
          } else if (isAnonymous) {
            menuItems.push({
              text: i18nString$z(UIStrings$O.addAllAnonymousScriptsToIgnoreList),
              callback: this.ignoreListAnonymousScripts.bind(this),
              jslogContext: "add-anonymous-scripts-to-ignorelist"
            });
          }
          menuItems.push(...this.getIgnoreListGeneralContextMenuItems({ isContentScript, isKnownThirdParty }));
        }
        return menuItems;
      }
      getIgnoreListGeneralContextMenuItems(options2) {
        const menuItems = [];
        if (options2?.isContentScript) {
          menuItems.push({
            text: i18nString$z(UIStrings$O.addAllContentScriptsToIgnoreList),
            callback: this.ignoreListContentScripts.bind(this),
            jslogContext: "add-content-scripts-to-ignorelist"
          });
        }
        if (options2?.isKnownThirdParty) {
          menuItems.push({
            text: i18nString$z(UIStrings$O.addAllThirdPartyScriptsToIgnoreList),
            callback: this.ignoreListThirdParty.bind(this),
            jslogContext: "add-3p-scripts-to-ignorelist"
          });
        }
        return menuItems;
      }
      getIgnoreListFolderContextMenuItems(url, options2) {
        const menuItems = [];
        const regexValue = "^" + escapeForRegExp(url) + "/";
        if (this.ignoreListHasPattern(regexValue, true)) {
          menuItems.push({
            text: i18nString$z(UIStrings$O.removeFromIgnoreList),
            callback: this.removeIgnoreListPattern.bind(this, regexValue),
            jslogContext: "remove-from-ignore-list"
          });
        } else if (this.isUserIgnoreListedURL(url, options2)) {
          menuItems.push({
            text: i18nString$z(UIStrings$O.removeFromIgnoreList),
            callback: this.unIgnoreListURL.bind(this, url, options2),
            jslogContext: "remove-from-ignore-list"
          });
        } else if (!options2?.isCurrentlyIgnoreListed) {
          menuItems.push({
            text: i18nString$z(UIStrings$O.addDirectoryToIgnoreList),
            callback: this.addRegexToIgnoreList.bind(this, regexValue),
            jslogContext: "add-directory-to-ignore-list"
          });
          menuItems.push(...this.getIgnoreListGeneralContextMenuItems(options2));
        }
        return menuItems;
      }
    };
    scriptToRange = /* @__PURE__ */ new WeakMap();
    UIStrings$N = {
      unknownErrorLoadingFile: "Unknown error loading file"
    };
    str_$M = registerUIStrings("models/bindings/ContentProviderBasedProject.ts", UIStrings$N);
    i18nString$y = getLocalizedString.bind(void 0, str_$M);
    ContentProviderBasedProject = class extends ProjectStore {
      #isServiceProject;
      #uiSourceCodeToData = /* @__PURE__ */ new WeakMap();
      constructor(workspace, id2, type2, displayName, isServiceProject) {
        super(workspace, id2, type2, displayName);
        this.#isServiceProject = isServiceProject;
        workspace.addProject(this);
      }
      async requestFileContent(uiSourceCode) {
        const { contentProvider } = this.#uiSourceCodeToData.get(uiSourceCode);
        try {
          return await contentProvider.requestContentData();
        } catch (err) {
          return {
            error: err ? String(err) : i18nString$y(UIStrings$N.unknownErrorLoadingFile)
          };
        }
      }
      isServiceProject() {
        return this.#isServiceProject;
      }
      async requestMetadata(uiSourceCode) {
        const { metadata: metadata2 } = this.#uiSourceCodeToData.get(uiSourceCode);
        return metadata2;
      }
      canSetFileContent() {
        return false;
      }
      async setFileContent(_uiSourceCode, _newContent, _isBase64) {
      }
      fullDisplayName(uiSourceCode) {
        let parentPath = uiSourceCode.parentURL().replace(/^(?:https?|file)\:\/\//, "");
        try {
          parentPath = decodeURI(parentPath);
        } catch {
        }
        return parentPath + "/" + uiSourceCode.displayName(true);
      }
      mimeType(uiSourceCode) {
        const { mimeType } = this.#uiSourceCodeToData.get(uiSourceCode);
        return mimeType;
      }
      canRename() {
        return false;
      }
      rename(_uiSourceCode, _newName, callback) {
        callback(false);
      }
      excludeFolder(_path) {
      }
      canExcludeFolder(_path) {
        return false;
      }
      async createFile(_path, _name, _content, _isBase64) {
        return null;
      }
      canCreateFile() {
        return false;
      }
      deleteFile(_uiSourceCode) {
      }
      remove() {
      }
      searchInFileContent(uiSourceCode, query, caseSensitive, isRegex) {
        const { contentProvider } = this.#uiSourceCodeToData.get(uiSourceCode);
        return contentProvider.searchInContent(query, caseSensitive, isRegex);
      }
      async findFilesMatchingSearchRequest(searchConfig, filesMatchingFileQuery, progress2) {
        const result = /* @__PURE__ */ new Map();
        progress2.totalWork = filesMatchingFileQuery.length;
        await Promise.all(filesMatchingFileQuery.map(searchInContent.bind(this)));
        progress2.done = true;
        return result;
        async function searchInContent(uiSourceCode) {
          let allMatchesFound = true;
          let matches = [];
          for (const query of searchConfig.queries().slice()) {
            const searchMatches = await this.searchInFileContent(uiSourceCode, query, !searchConfig.ignoreCase(), searchConfig.isRegex());
            if (!searchMatches.length) {
              allMatchesFound = false;
              break;
            }
            matches = mergeOrdered2(matches, searchMatches, SearchMatch.comparator);
          }
          if (allMatchesFound) {
            result.set(uiSourceCode, matches);
          }
          ++progress2.worked;
        }
      }
      indexContent(progress2) {
        queueMicrotask(() => {
          progress2.done = true;
        });
      }
      addUISourceCodeWithProvider(uiSourceCode, contentProvider, metadata2, mimeType) {
        this.#uiSourceCodeToData.set(uiSourceCode, { mimeType, metadata: metadata2, contentProvider });
        this.addUISourceCode(uiSourceCode);
      }
      addContentProvider(url, contentProvider, mimeType) {
        const uiSourceCode = this.createUISourceCode(url, contentProvider.contentType());
        this.addUISourceCodeWithProvider(uiSourceCode, contentProvider, null, mimeType);
        return uiSourceCode;
      }
      reset() {
        this.removeProject();
        this.workspace().addProject(this);
      }
      dispose() {
        this.removeProject();
      }
    };
    uiSourceCodeToAttributionMap = /* @__PURE__ */ new WeakMap();
    projectToTargetMap = /* @__PURE__ */ new WeakMap();
    NetworkProjectManager = class _NetworkProjectManager extends ObjectWrapper {
      constructor() {
        super();
      }
      static instance({ forceNew } = { forceNew: false }) {
        if (!networkProjectManagerInstance || forceNew) {
          networkProjectManagerInstance = new _NetworkProjectManager();
        }
        return networkProjectManagerInstance;
      }
    };
    NetworkProject = class _NetworkProject {
      static resolveFrame(uiSourceCode, frameId) {
        const target = _NetworkProject.targetForUISourceCode(uiSourceCode);
        const resourceTreeModel = target?.model(ResourceTreeModel);
        return resourceTreeModel ? resourceTreeModel.frameForId(frameId) : null;
      }
      static setInitialFrameAttribution(uiSourceCode, frameId) {
        if (!frameId) {
          return;
        }
        const frame = _NetworkProject.resolveFrame(uiSourceCode, frameId);
        if (!frame) {
          return;
        }
        const attribution = /* @__PURE__ */ new Map();
        attribution.set(frameId, { frame, count: 1 });
        uiSourceCodeToAttributionMap.set(uiSourceCode, attribution);
      }
      static cloneInitialFrameAttribution(fromUISourceCode, toUISourceCode) {
        const fromAttribution = uiSourceCodeToAttributionMap.get(fromUISourceCode);
        if (!fromAttribution) {
          return;
        }
        const toAttribution = /* @__PURE__ */ new Map();
        for (const frameId of fromAttribution.keys()) {
          const value = fromAttribution.get(frameId);
          if (typeof value !== "undefined") {
            toAttribution.set(frameId, { frame: value.frame, count: value.count });
          }
        }
        uiSourceCodeToAttributionMap.set(toUISourceCode, toAttribution);
      }
      static addFrameAttribution(uiSourceCode, frameId) {
        const frame = _NetworkProject.resolveFrame(uiSourceCode, frameId);
        if (!frame) {
          return;
        }
        const frameAttribution = uiSourceCodeToAttributionMap.get(uiSourceCode);
        if (!frameAttribution) {
          return;
        }
        const attributionInfo = frameAttribution.get(frameId) || { frame, count: 0 };
        attributionInfo.count += 1;
        frameAttribution.set(frameId, attributionInfo);
        if (attributionInfo.count !== 1) {
          return;
        }
        const data32 = { uiSourceCode, frame };
        NetworkProjectManager.instance().dispatchEventToListeners("FrameAttributionAdded", data32);
      }
      static removeFrameAttribution(uiSourceCode, frameId) {
        const frameAttribution = uiSourceCodeToAttributionMap.get(uiSourceCode);
        if (!frameAttribution) {
          return;
        }
        const attributionInfo = frameAttribution.get(frameId);
        console.assert(Boolean(attributionInfo), "Failed to remove frame attribution for url: " + uiSourceCode.url());
        if (!attributionInfo) {
          return;
        }
        attributionInfo.count -= 1;
        if (attributionInfo.count > 0) {
          return;
        }
        frameAttribution.delete(frameId);
        const data32 = { uiSourceCode, frame: attributionInfo.frame };
        NetworkProjectManager.instance().dispatchEventToListeners("FrameAttributionRemoved", data32);
      }
      static targetForUISourceCode(uiSourceCode) {
        return projectToTargetMap.get(uiSourceCode.project()) || null;
      }
      static setTargetForProject(project, target) {
        projectToTargetMap.set(project, target);
      }
      static getTargetForProject(project) {
        return projectToTargetMap.get(project) || null;
      }
      static framesForUISourceCode(uiSourceCode) {
        const target = _NetworkProject.targetForUISourceCode(uiSourceCode);
        const resourceTreeModel = target?.model(ResourceTreeModel);
        const attribution = uiSourceCodeToAttributionMap.get(uiSourceCode);
        if (!resourceTreeModel || !attribution) {
          return [];
        }
        const frames3 = Array.from(attribution.keys()).map((frameId) => resourceTreeModel.frameForId(frameId));
        return frames3.filter((frame) => !!frame);
      }
    };
    CompilerScriptMapping = class {
      #sourceMapManager;
      #debuggerWorkspaceBinding;
      #stubUISourceCodes = /* @__PURE__ */ new Map();
      #stubProject;
      #eventListeners;
      #projects = /* @__PURE__ */ new Map();
      #sourceMapToProject = /* @__PURE__ */ new Map();
      #uiSourceCodeToSourceMaps = new Multimap2();
      #debuggerModel;
      #ignoreListManager;
      constructor(debuggerModel, workspace, debuggerWorkspaceBinding) {
        this.#sourceMapManager = debuggerModel.sourceMapManager();
        this.#debuggerWorkspaceBinding = debuggerWorkspaceBinding;
        this.#debuggerModel = debuggerModel;
        this.#ignoreListManager = debuggerWorkspaceBinding.ignoreListManager;
        this.#stubProject = new ContentProviderBasedProject(workspace, "jsSourceMaps:stub:" + debuggerModel.target().id(), projectTypes.Service, "", true);
        this.#eventListeners = [
          this.#sourceMapManager.addEventListener(Events$b.SourceMapWillAttach, this.sourceMapWillAttach, this),
          this.#sourceMapManager.addEventListener(Events$b.SourceMapFailedToAttach, this.sourceMapFailedToAttach, this),
          this.#sourceMapManager.addEventListener(Events$b.SourceMapAttached, this.sourceMapAttached, this),
          this.#sourceMapManager.addEventListener(Events$b.SourceMapDetached, this.sourceMapDetached, this)
        ];
      }
      setFunctionRanges(uiSourceCode, ranges) {
        for (const sourceMap2 of this.#uiSourceCodeToSourceMaps.get(uiSourceCode)) {
          sourceMap2.augmentWithScopes(uiSourceCode.url(), ranges);
        }
      }
      addStubUISourceCode(script) {
        const stubUISourceCode = this.#stubProject.addContentProvider(ParsedURL2.concatenate(script.sourceURL, ":sourcemap"), StaticContentProvider.fromString(script.sourceURL, resourceTypes.Script, "\n\n\n\n\n// Please wait a bit.\n// Compiled script is not shown while source map is being loaded!"), "text/javascript");
        this.#stubUISourceCodes.set(script, stubUISourceCode);
      }
      removeStubUISourceCode(script) {
        const uiSourceCode = this.#stubUISourceCodes.get(script);
        this.#stubUISourceCodes.delete(script);
        if (uiSourceCode) {
          this.#stubProject.removeUISourceCode(uiSourceCode.url());
        }
      }
      getLocationRangesForSameSourceLocation(rawLocation) {
        const debuggerModel = rawLocation.debuggerModel;
        const script = rawLocation.script();
        if (!script) {
          return [];
        }
        const sourceMap2 = this.#sourceMapManager.sourceMapForClient(script);
        if (!sourceMap2) {
          return [];
        }
        const { lineNumber, columnNumber } = script.rawLocationToRelativeLocation(rawLocation);
        const entry = sourceMap2.findEntry(lineNumber, columnNumber);
        if (!entry?.sourceURL) {
          return [];
        }
        const project = this.#sourceMapToProject.get(sourceMap2);
        if (!project) {
          return [];
        }
        const uiSourceCode = project.uiSourceCodeForURL(entry.sourceURL);
        if (!uiSourceCode) {
          return [];
        }
        if (!this.#uiSourceCodeToSourceMaps.hasValue(uiSourceCode, sourceMap2)) {
          return [];
        }
        const ranges = sourceMap2.findReverseRanges(entry.sourceURL, entry.sourceLineNumber, entry.sourceColumnNumber);
        return ranges.map(({ startLine, startColumn, endLine, endColumn }) => {
          const start = script.relativeLocationToRawLocation({ lineNumber: startLine, columnNumber: startColumn });
          const end = script.relativeLocationToRawLocation({ lineNumber: endLine, columnNumber: endColumn });
          return {
            start: debuggerModel.createRawLocation(script, start.lineNumber, start.columnNumber),
            end: debuggerModel.createRawLocation(script, end.lineNumber, end.columnNumber)
          };
        });
      }
      uiSourceCodeForURL(url, isContentScript) {
        const projectType = isContentScript ? projectTypes.ContentScripts : projectTypes.Network;
        for (const project of this.#projects.values()) {
          if (project.type() !== projectType) {
            continue;
          }
          const uiSourceCode = project.uiSourceCodeForURL(url);
          if (uiSourceCode) {
            return uiSourceCode;
          }
        }
        return null;
      }
      rawLocationToUILocation(rawLocation) {
        const script = rawLocation.script();
        if (!script) {
          return null;
        }
        const { lineNumber, columnNumber } = script.rawLocationToRelativeLocation(rawLocation);
        const stubUISourceCode = this.#stubUISourceCodes.get(script);
        if (stubUISourceCode) {
          return new UILocation(stubUISourceCode, lineNumber, columnNumber);
        }
        const sourceMap2 = this.#sourceMapManager.sourceMapForClient(script);
        if (!sourceMap2) {
          return null;
        }
        const project = this.#sourceMapToProject.get(sourceMap2);
        if (!project) {
          return null;
        }
        const entry = sourceMap2.findEntry(lineNumber, columnNumber, rawLocation.inlineFrameIndex);
        if (!entry?.sourceURL) {
          return null;
        }
        const uiSourceCode = project.uiSourceCodeForURL(entry.sourceURL);
        if (!uiSourceCode) {
          return null;
        }
        if (!this.#uiSourceCodeToSourceMaps.hasValue(uiSourceCode, sourceMap2)) {
          return null;
        }
        return uiSourceCode.uiLocation(entry.sourceLineNumber, entry.sourceColumnNumber);
      }
      uiLocationToRawLocations(uiSourceCode, lineNumber, columnNumber) {
        const locations = [];
        for (const sourceMap2 of this.#uiSourceCodeToSourceMaps.get(uiSourceCode)) {
          const entry = sourceMap2.sourceLineMapping(uiSourceCode.url(), lineNumber, columnNumber);
          if (!entry) {
            continue;
          }
          const script = this.#sourceMapManager.clientForSourceMap(sourceMap2);
          if (!script) {
            continue;
          }
          const location = script.relativeLocationToRawLocation(entry);
          locations.push(script.debuggerModel.createRawLocation(script, location.lineNumber, location.columnNumber));
        }
        return locations;
      }
      uiLocationRangeToRawLocationRanges(uiSourceCode, textRange) {
        if (!this.#uiSourceCodeToSourceMaps.has(uiSourceCode)) {
          return null;
        }
        const ranges = [];
        for (const sourceMap2 of this.#uiSourceCodeToSourceMaps.get(uiSourceCode)) {
          const script = this.#sourceMapManager.clientForSourceMap(sourceMap2);
          if (!script) {
            continue;
          }
          for (const scriptTextRange of sourceMap2.reverseMapTextRanges(uiSourceCode.url(), textRange)) {
            const startLocation = script.relativeLocationToRawLocation(scriptTextRange.start);
            const endLocation = script.relativeLocationToRawLocation(scriptTextRange.end);
            const start = script.debuggerModel.createRawLocation(script, startLocation.lineNumber, startLocation.columnNumber);
            const end = script.debuggerModel.createRawLocation(script, endLocation.lineNumber, endLocation.columnNumber);
            ranges.push({ start, end });
          }
        }
        return ranges;
      }
      async functionBoundsAtRawLocation(rawLocation) {
        const script = rawLocation.script();
        if (!script) {
          return null;
        }
        const sourceMap2 = this.#sourceMapManager.sourceMapForClient(script);
        if (!sourceMap2) {
          return null;
        }
        await sourceMap2.waitForScopeInfo();
        const { lineNumber, columnNumber } = script.rawLocationToRelativeLocation(rawLocation);
        const { url, scope: scope2 } = sourceMap2.findOriginalFunctionScope({ line: lineNumber, column: columnNumber }) ?? {};
        if (!scope2 || !url) {
          return null;
        }
        const project = this.#sourceMapToProject.get(sourceMap2);
        if (!project) {
          return null;
        }
        const uiSourceCode = project.uiSourceCodeForURL(url);
        if (!uiSourceCode) {
          return null;
        }
        const contentData = await uiSourceCode.requestContentData();
        if ("error" in contentData) {
          return null;
        }
        const name = scope2.name ?? "";
        const range2 = new TextRange(scope2.start.line, scope2.start.column, scope2.end.line, scope2.end.column);
        return new UIFunctionBounds(uiSourceCode, range2, name);
      }
      async translateRawFramesStep(rawFrames, translatedFrames) {
        const frame = rawFrames[0];
        if (isBuiltinFrame(frame)) {
          return false;
        }
        const sourceMapWithScopeInfoForFrame = async (rawFrame) => {
          const script2 = this.#debuggerModel.scriptForId(rawFrame.scriptId ?? "");
          if (!script2 || this.#stubUISourceCodes.has(script2)) {
            return null;
          }
          const sourceMap3 = script2.sourceMap();
          await sourceMap3?.waitForScopeInfo();
          return sourceMap3?.hasScopeInfo() ? { sourceMap: sourceMap3, script: script2 } : null;
        };
        const sourceMapAndScript = await sourceMapWithScopeInfoForFrame(frame);
        if (!sourceMapAndScript) {
          return false;
        }
        const { sourceMap: sourceMap2, script } = sourceMapAndScript;
        const { lineNumber, columnNumber } = script.relativeLocationToRawLocation(frame);
        if (!sourceMap2.isOutlinedFrame(lineNumber, columnNumber)) {
          const frames3 = sourceMap2.translateCallSite(lineNumber, columnNumber);
          if (!frames3.length) {
            return false;
          }
          rawFrames.shift();
          const result = [];
          translatedFrames.push(result);
          const project = this.#sourceMapToProject.get(sourceMap2);
          for (const frame2 of frames3) {
            const uiSourceCode = frame2.url ? project?.uiSourceCodeForURL(frame2.url) : void 0;
            result.push({
              ...frame2,
              url: uiSourceCode ? void 0 : frame2.url,
              uiSourceCode: uiSourceCode ?? void 0
            });
          }
          return true;
        }
        return false;
      }
      getMappedLines(uiSourceCode) {
        if (!this.#uiSourceCodeToSourceMaps.has(uiSourceCode)) {
          return null;
        }
        const mappedLines = /* @__PURE__ */ new Set();
        for (const sourceMap2 of this.#uiSourceCodeToSourceMaps.get(uiSourceCode)) {
          for (const entry of sourceMap2.mappings()) {
            if (entry.sourceURL !== uiSourceCode.url()) {
              continue;
            }
            mappedLines.add(entry.sourceLineNumber);
          }
        }
        return mappedLines;
      }
      sourceMapWillAttach(event) {
        const { client: script } = event.data;
        this.addStubUISourceCode(script);
        void this.#debuggerWorkspaceBinding.updateLocations(script);
        if (this.#ignoreListManager.isUserIgnoreListedURL(script.sourceURL, { isContentScript: script.isContentScript() })) {
          this.#sourceMapManager.cancelAttachSourceMap(script);
        }
      }
      sourceMapFailedToAttach(event) {
        const { client: script } = event.data;
        this.removeStubUISourceCode(script);
        void this.#debuggerWorkspaceBinding.updateLocations(script);
      }
      sourceMapAttached(event) {
        const { client: script, sourceMap: sourceMap2 } = event.data;
        const scripts = /* @__PURE__ */ new Set([script]);
        this.removeStubUISourceCode(script);
        const target = script.target();
        const projectId = `jsSourceMaps:${script.isContentScript() ? "extensions" : ""}:${target.id()}`;
        let project = this.#projects.get(projectId);
        if (!project) {
          const projectType = script.isContentScript() ? projectTypes.ContentScripts : projectTypes.Network;
          project = new ContentProviderBasedProject(this.#stubProject.workspace(), projectId, projectType, "", false);
          NetworkProject.setTargetForProject(project, target);
          this.#projects.set(projectId, project);
        }
        this.#sourceMapToProject.set(sourceMap2, project);
        for (const url of sourceMap2.sourceURLs()) {
          const contentType = resourceTypes.SourceMapScript;
          const uiSourceCode = project.createUISourceCode(url, contentType);
          if (sourceMap2.hasIgnoreListHint(url)) {
            uiSourceCode.markKnownThirdParty();
          }
          const content = sourceMap2.embeddedContentByURL(url);
          const contentProvider = content !== null ? StaticContentProvider.fromString(url, contentType, content) : new CompilerSourceMappingContentProvider(url, contentType, script.createPageResourceLoadInitiator());
          let metadata2 = null;
          if (content !== null) {
            const encoder = new TextEncoder();
            metadata2 = new UISourceCodeMetadata(null, encoder.encode(content).length);
          }
          const mimeType = ResourceType.mimeFromURL(url) ?? contentType.canonicalMimeType();
          this.#uiSourceCodeToSourceMaps.set(uiSourceCode, sourceMap2);
          NetworkProject.setInitialFrameAttribution(uiSourceCode, script.frameId);
          const otherUISourceCode = project.uiSourceCodeForURL(url);
          if (otherUISourceCode !== null) {
            for (const otherSourceMap of this.#uiSourceCodeToSourceMaps.get(otherUISourceCode)) {
              this.#uiSourceCodeToSourceMaps.delete(otherUISourceCode, otherSourceMap);
              const otherScript = this.#sourceMapManager.clientForSourceMap(otherSourceMap);
              if (!otherScript) {
                continue;
              }
              NetworkProject.removeFrameAttribution(otherUISourceCode, otherScript.frameId);
              if (sourceMap2.compatibleForURL(url, otherSourceMap)) {
                this.#uiSourceCodeToSourceMaps.set(uiSourceCode, otherSourceMap);
                NetworkProject.addFrameAttribution(uiSourceCode, otherScript.frameId);
              }
              scripts.add(otherScript);
            }
            project.removeUISourceCode(url);
          }
          project.addUISourceCodeWithProvider(uiSourceCode, contentProvider, metadata2, mimeType);
        }
        void Promise.all([...scripts].map((script2) => this.#debuggerWorkspaceBinding.updateLocations(script2))).then(() => this.sourceMapAttachedForTest(sourceMap2));
      }
      sourceMapDetached(event) {
        const { client: script, sourceMap: sourceMap2 } = event.data;
        const project = this.#sourceMapToProject.get(sourceMap2);
        if (!project) {
          return;
        }
        for (const uiSourceCode of project.uiSourceCodes()) {
          if (this.#uiSourceCodeToSourceMaps.delete(uiSourceCode, sourceMap2)) {
            NetworkProject.removeFrameAttribution(uiSourceCode, script.frameId);
            if (!this.#uiSourceCodeToSourceMaps.has(uiSourceCode)) {
              project.removeUISourceCode(uiSourceCode.url());
            }
          }
        }
        this.#sourceMapToProject.delete(sourceMap2);
        void this.#debuggerWorkspaceBinding.updateLocations(script);
      }
      scriptsForUISourceCode(uiSourceCode) {
        const scripts = [];
        for (const sourceMap2 of this.#uiSourceCodeToSourceMaps.get(uiSourceCode)) {
          const script = this.#sourceMapManager.clientForSourceMap(sourceMap2);
          if (script) {
            scripts.push(script);
          }
        }
        return scripts;
      }
      sourceMapAttachedForTest(_sourceMap) {
      }
      dispose() {
        removeEventListeners(this.#eventListeners);
        for (const project of this.#projects.values()) {
          project.dispose();
        }
        this.#stubProject.dispose();
      }
    };
    LiveLocationWithPool = class {
      #updateDelegate;
      #locationPool;
      #updatePromise;
      constructor(updateDelegate, locationPool) {
        this.#updateDelegate = updateDelegate;
        this.#locationPool = locationPool;
        this.#locationPool.add(this);
        this.#updatePromise = null;
      }
      async update() {
        if (!this.#updateDelegate) {
          return;
        }
        if (this.#updatePromise) {
          await this.#updatePromise.then(() => this.update());
        } else {
          this.#updatePromise = this.#updateDelegate(this);
          await this.#updatePromise;
          this.#updatePromise = null;
        }
      }
      async uiLocation() {
        throw new Error("Not implemented");
      }
      dispose() {
        this.#locationPool.delete(this);
        this.#updateDelegate = null;
      }
      isDisposed() {
        return !this.#locationPool.has(this);
      }
    };
    LiveLocationPool = class {
      #locations;
      constructor() {
        this.#locations = /* @__PURE__ */ new Set();
      }
      add(location) {
        this.#locations.add(location);
      }
      delete(location) {
        this.#locations.delete(location);
      }
      has(location) {
        return this.#locations.has(location);
      }
      disposeAll() {
        for (const location of this.#locations) {
          location.dispose();
        }
      }
    };
    SASSSourceMapping = class {
      #sourceMapManager;
      #project;
      #eventListeners;
      #bindings;
      #cssWorkspaceBinding;
      constructor(target, sourceMapManager, workspace, cssWorkspaceBinding) {
        this.#sourceMapManager = sourceMapManager;
        this.#cssWorkspaceBinding = cssWorkspaceBinding;
        this.#project = new ContentProviderBasedProject(workspace, "cssSourceMaps:" + target.id(), projectTypes.Network, "", false);
        NetworkProject.setTargetForProject(this.#project, target);
        this.#bindings = /* @__PURE__ */ new Map();
        this.#eventListeners = [
          this.#sourceMapManager.addEventListener(Events$b.SourceMapAttached, this.sourceMapAttached, this),
          this.#sourceMapManager.addEventListener(Events$b.SourceMapDetached, this.sourceMapDetached, this)
        ];
      }
      sourceMapAttachedForTest(_sourceMap) {
      }
      async sourceMapAttached(event) {
        const header = event.data.client;
        const sourceMap2 = event.data.sourceMap;
        const project = this.#project;
        const bindings = this.#bindings;
        for (const sourceURL of sourceMap2.sourceURLs()) {
          let binding = bindings.get(sourceURL);
          if (!binding) {
            binding = new Binding$1(project, sourceURL, header.createPageResourceLoadInitiator());
            bindings.set(sourceURL, binding);
          }
          binding.addSourceMap(sourceMap2, header.frameId);
        }
        await this.#cssWorkspaceBinding.updateLocations(header);
        this.sourceMapAttachedForTest(sourceMap2);
      }
      async sourceMapDetached(event) {
        const header = event.data.client;
        const sourceMap2 = event.data.sourceMap;
        const bindings = this.#bindings;
        for (const sourceURL of sourceMap2.sourceURLs()) {
          const binding = bindings.get(sourceURL);
          if (binding) {
            binding.removeSourceMap(sourceMap2, header.frameId);
            if (!binding.getUiSourceCode()) {
              bindings.delete(sourceURL);
            }
          }
        }
        await this.#cssWorkspaceBinding.updateLocations(header);
      }
      rawLocationToUILocation(rawLocation) {
        const header = rawLocation.header();
        if (!header) {
          return null;
        }
        const sourceMap2 = this.#sourceMapManager.sourceMapForClient(header);
        if (!sourceMap2) {
          return null;
        }
        let { lineNumber, columnNumber } = rawLocation;
        if (sourceMap2.mapsOrigin() && header.isInline) {
          lineNumber -= header.startLine;
          if (lineNumber === 0) {
            columnNumber -= header.startColumn;
          }
        }
        const entry = sourceMap2.findEntry(lineNumber, columnNumber);
        if (!entry?.sourceURL) {
          return null;
        }
        const uiSourceCode = this.#project.uiSourceCodeForURL(entry.sourceURL);
        if (!uiSourceCode) {
          return null;
        }
        return uiSourceCode.uiLocation(entry.sourceLineNumber, entry.sourceColumnNumber);
      }
      uiLocationToRawLocations(uiLocation) {
        const { uiSourceCode, lineNumber, columnNumber = 0 } = uiLocation;
        const binding = uiSourceCodeToBinding.get(uiSourceCode);
        if (!binding) {
          return [];
        }
        const locations = [];
        for (const sourceMap2 of binding.getReferringSourceMaps()) {
          const entries = sourceMap2.findReverseEntries(uiSourceCode.url(), lineNumber, columnNumber);
          const header = this.#sourceMapManager.clientForSourceMap(sourceMap2);
          if (header) {
            locations.push(...entries.map((entry) => new CSSLocation(header, entry.lineNumber, entry.columnNumber)));
          }
        }
        return locations;
      }
      static uiSourceOrigin(uiSourceCode) {
        const binding = uiSourceCodeToBinding.get(uiSourceCode);
        if (binding) {
          return binding.getReferringSourceMaps().map((sourceMap2) => sourceMap2.compiledURL());
        }
        return [];
      }
      dispose() {
        removeEventListeners(this.#eventListeners);
        this.#project.dispose();
      }
    };
    uiSourceCodeToBinding = /* @__PURE__ */ new WeakMap();
    Binding$1 = class Binding2 {
      #project;
      #url;
      #initiator;
      referringSourceMaps;
      uiSourceCode;
      constructor(project, url, initiator) {
        this.#project = project;
        this.#url = url;
        this.#initiator = initiator;
        this.referringSourceMaps = [];
        this.uiSourceCode = null;
      }
      recreateUISourceCodeIfNeeded(frameId) {
        const sourceMap2 = this.referringSourceMaps[this.referringSourceMaps.length - 1];
        const contentType = resourceTypes.SourceMapStyleSheet;
        const embeddedContent = sourceMap2.embeddedContentByURL(this.#url);
        const contentProvider = embeddedContent !== null ? StaticContentProvider.fromString(this.#url, contentType, embeddedContent) : new CompilerSourceMappingContentProvider(this.#url, contentType, this.#initiator);
        const newUISourceCode = this.#project.createUISourceCode(this.#url, contentType);
        uiSourceCodeToBinding.set(newUISourceCode, this);
        const mimeType = ResourceType.mimeFromURL(this.#url) || contentType.canonicalMimeType();
        const metadata2 = typeof embeddedContent === "string" ? new UISourceCodeMetadata(null, embeddedContent.length) : null;
        if (this.uiSourceCode) {
          NetworkProject.cloneInitialFrameAttribution(this.uiSourceCode, newUISourceCode);
          this.#project.removeUISourceCode(this.uiSourceCode.url());
        } else {
          NetworkProject.setInitialFrameAttribution(newUISourceCode, frameId);
        }
        this.uiSourceCode = newUISourceCode;
        this.#project.addUISourceCodeWithProvider(this.uiSourceCode, contentProvider, metadata2, mimeType);
      }
      addSourceMap(sourceMap2, frameId) {
        if (this.uiSourceCode) {
          NetworkProject.addFrameAttribution(this.uiSourceCode, frameId);
        }
        this.referringSourceMaps.push(sourceMap2);
        this.recreateUISourceCodeIfNeeded(frameId);
      }
      removeSourceMap(sourceMap2, frameId) {
        const uiSourceCode = this.uiSourceCode;
        NetworkProject.removeFrameAttribution(uiSourceCode, frameId);
        const lastIndex = this.referringSourceMaps.lastIndexOf(sourceMap2);
        if (lastIndex !== -1) {
          this.referringSourceMaps.splice(lastIndex, 1);
        }
        if (!this.referringSourceMaps.length) {
          this.#project.removeUISourceCode(uiSourceCode.url());
          this.uiSourceCode = null;
        } else {
          this.recreateUISourceCodeIfNeeded(frameId);
        }
      }
      getReferringSourceMaps() {
        return this.referringSourceMaps;
      }
      getUiSourceCode() {
        return this.uiSourceCode;
      }
    };
    uiSourceCodeToStyleMap = /* @__PURE__ */ new WeakMap();
    StylesSourceMapping = class {
      #cssModel;
      #project;
      #styleFiles = /* @__PURE__ */ new Map();
      #eventListeners;
      constructor(cssModel, workspace) {
        this.#cssModel = cssModel;
        const target = this.#cssModel.target();
        this.#project = new ContentProviderBasedProject(workspace, "css:" + target.id(), projectTypes.Network, "", false);
        NetworkProject.setTargetForProject(this.#project, target);
        this.#eventListeners = [
          this.#cssModel.addEventListener(Events$a.StyleSheetAdded, this.styleSheetAdded, this),
          this.#cssModel.addEventListener(Events$a.StyleSheetRemoved, this.styleSheetRemoved, this),
          this.#cssModel.addEventListener(Events$a.StyleSheetChanged, this.styleSheetChanged, this)
        ];
      }
      addSourceMap(sourceUrl, sourceMapUrl) {
        this.#styleFiles.get(sourceUrl)?.addSourceMap(sourceUrl, sourceMapUrl);
      }
      rawLocationToUILocation(rawLocation) {
        const header = rawLocation.header();
        if (!header || !this.acceptsHeader(header)) {
          return null;
        }
        const styleFile = this.#styleFiles.get(header.resourceURL());
        if (!styleFile) {
          return null;
        }
        let lineNumber = rawLocation.lineNumber;
        let columnNumber = rawLocation.columnNumber;
        if (header.isInline && header.hasSourceURL) {
          lineNumber -= header.lineNumberInSource(0);
          const headerColumnNumber = header.columnNumberInSource(lineNumber, 0);
          if (typeof headerColumnNumber === "undefined") {
            columnNumber = headerColumnNumber;
          } else {
            columnNumber -= headerColumnNumber;
          }
        }
        return styleFile.getUiSourceCode().uiLocation(lineNumber, columnNumber);
      }
      uiLocationToRawLocations(uiLocation) {
        const styleFile = uiSourceCodeToStyleMap.get(uiLocation.uiSourceCode);
        if (!styleFile) {
          return [];
        }
        const rawLocations = [];
        for (const header of styleFile.getHeaders()) {
          let lineNumber = uiLocation.lineNumber;
          let columnNumber = uiLocation.columnNumber;
          if (header.isInline && header.hasSourceURL) {
            columnNumber = header.columnNumberInSource(lineNumber, uiLocation.columnNumber || 0);
            lineNumber = header.lineNumberInSource(lineNumber);
          }
          rawLocations.push(new CSSLocation(header, lineNumber, columnNumber));
        }
        return rawLocations;
      }
      acceptsHeader(header) {
        if (header.isConstructedByNew()) {
          return false;
        }
        if (header.isInline && !header.hasSourceURL && header.origin !== "inspector") {
          return false;
        }
        if (!header.resourceURL()) {
          return false;
        }
        return true;
      }
      styleSheetAdded(event) {
        const header = event.data;
        if (!this.acceptsHeader(header)) {
          return;
        }
        const url = header.resourceURL();
        let styleFile = this.#styleFiles.get(url);
        if (!styleFile) {
          styleFile = new StyleFile(this.#cssModel, this.#project, header);
          this.#styleFiles.set(url, styleFile);
        } else {
          styleFile.addHeader(header);
        }
      }
      styleSheetRemoved(event) {
        const header = event.data;
        if (!this.acceptsHeader(header)) {
          return;
        }
        const url = header.resourceURL();
        const styleFile = this.#styleFiles.get(url);
        if (styleFile) {
          if (styleFile.getHeaders().size === 1) {
            styleFile.dispose();
            this.#styleFiles.delete(url);
          } else {
            styleFile.removeHeader(header);
          }
        }
      }
      styleSheetChanged(event) {
        const header = this.#cssModel.styleSheetHeaderForId(event.data.styleSheetId);
        if (!header || !this.acceptsHeader(header)) {
          return;
        }
        const styleFile = this.#styleFiles.get(header.resourceURL());
        if (styleFile) {
          styleFile.styleSheetChanged(header);
        }
      }
      dispose() {
        for (const styleFile of this.#styleFiles.values()) {
          styleFile.dispose();
        }
        this.#styleFiles.clear();
        removeEventListeners(this.#eventListeners);
        this.#project.removeProject();
      }
    };
    StyleFile = class {
      #cssModel;
      #project;
      headers;
      uiSourceCode;
      #eventListeners;
      #throttler = new Throttler(200);
      #terminated = false;
      #isAddingRevision;
      #isUpdatingHeaders;
      constructor(cssModel, project, header) {
        this.#cssModel = cssModel;
        this.#project = project;
        this.headers = /* @__PURE__ */ new Set([header]);
        const target = cssModel.target();
        const url = header.resourceURL();
        const metadata2 = metadataForURL(target, header.frameId, url);
        this.uiSourceCode = this.#project.createUISourceCode(url, header.contentType());
        uiSourceCodeToStyleMap.set(this.uiSourceCode, this);
        NetworkProject.setInitialFrameAttribution(this.uiSourceCode, header.frameId);
        this.#project.addUISourceCodeWithProvider(this.uiSourceCode, this, metadata2, "text/css");
        this.#eventListeners = [
          this.uiSourceCode.addEventListener(Events$2.WorkingCopyChanged, this.workingCopyChanged, this),
          this.uiSourceCode.addEventListener(Events$2.WorkingCopyCommitted, this.workingCopyCommitted, this)
        ];
      }
      addHeader(header) {
        this.headers.add(header);
        NetworkProject.addFrameAttribution(this.uiSourceCode, header.frameId);
      }
      removeHeader(header) {
        this.headers.delete(header);
        NetworkProject.removeFrameAttribution(this.uiSourceCode, header.frameId);
      }
      styleSheetChanged(header) {
        console.assert(this.headers.has(header));
        if (this.#isUpdatingHeaders || !this.headers.has(header)) {
          return;
        }
        const mirrorContentBound = this.mirrorContent.bind(this, header, true);
        void this.#throttler.schedule(mirrorContentBound, "Default");
      }
      workingCopyCommitted() {
        if (this.#isAddingRevision) {
          return;
        }
        const mirrorContentBound = this.mirrorContent.bind(this, this.uiSourceCode, true);
        void this.#throttler.schedule(mirrorContentBound, "AsSoonAsPossible");
      }
      workingCopyChanged() {
        if (this.#isAddingRevision) {
          return;
        }
        const mirrorContentBound = this.mirrorContent.bind(this, this.uiSourceCode, false);
        void this.#throttler.schedule(mirrorContentBound, "Default");
      }
      async mirrorContent(fromProvider, majorChange) {
        if (this.#terminated) {
          this.styleFileSyncedForTest();
          return;
        }
        let newContent = null;
        if (fromProvider === this.uiSourceCode) {
          newContent = this.uiSourceCode.workingCopy();
        } else {
          newContent = ContentData.textOr(await fromProvider.requestContentData(), null);
        }
        if (newContent === null || this.#terminated) {
          this.styleFileSyncedForTest();
          return;
        }
        if (fromProvider !== this.uiSourceCode) {
          this.#isAddingRevision = true;
          this.uiSourceCode.setWorkingCopy(newContent);
          this.#isAddingRevision = false;
        }
        this.#isUpdatingHeaders = true;
        const promises2 = [];
        for (const header of this.headers) {
          if (header === fromProvider) {
            continue;
          }
          promises2.push(this.#cssModel.setStyleSheetText(header.id, newContent, majorChange));
        }
        await Promise.all(promises2);
        this.#isUpdatingHeaders = false;
        this.styleFileSyncedForTest();
      }
      styleFileSyncedForTest() {
      }
      dispose() {
        if (this.#terminated) {
          return;
        }
        this.#terminated = true;
        this.#project.removeUISourceCode(this.uiSourceCode.url());
        removeEventListeners(this.#eventListeners);
      }
      contentURL() {
        console.assert(this.headers.size > 0);
        return this.#firstHeader().originalContentProvider().contentURL();
      }
      contentType() {
        console.assert(this.headers.size > 0);
        return this.#firstHeader().originalContentProvider().contentType();
      }
      requestContentData() {
        console.assert(this.headers.size > 0);
        return this.#firstHeader().originalContentProvider().requestContentData();
      }
      searchInContent(query, caseSensitive, isRegex) {
        console.assert(this.headers.size > 0);
        return this.#firstHeader().originalContentProvider().searchInContent(query, caseSensitive, isRegex);
      }
      #firstHeader() {
        console.assert(this.headers.size > 0);
        return this.headers.values().next().value;
      }
      getHeaders() {
        return this.headers;
      }
      getUiSourceCode() {
        return this.uiSourceCode;
      }
      addSourceMap(sourceUrl, sourceMapUrl) {
        const sourceMapManager = this.#cssModel.sourceMapManager();
        this.headers.forEach((header) => {
          sourceMapManager.detachSourceMap(header);
          sourceMapManager.attachSourceMap(header, sourceUrl, sourceMapUrl);
        });
      }
    };
    CSSWorkspaceBinding = class _CSSWorkspaceBinding {
      #resourceMapping;
      #modelToInfo;
      #liveLocationPromises;
      constructor(resourceMapping, targetManager) {
        this.#resourceMapping = resourceMapping;
        this.#resourceMapping.cssWorkspaceBinding = this;
        this.#modelToInfo = /* @__PURE__ */ new Map();
        targetManager.observeModels(CSSModel, this);
        this.#liveLocationPromises = /* @__PURE__ */ new Set();
      }
      static instance(opts = { forceNew: null, resourceMapping: null, targetManager: null }) {
        const { forceNew, resourceMapping, targetManager } = opts;
        if (forceNew) {
          if (!resourceMapping || !targetManager) {
            throw new Error(`Unable to create CSSWorkspaceBinding: resourceMapping and targetManager must be provided: ${new Error().stack}`);
          }
          globalInstance().set(_CSSWorkspaceBinding, new _CSSWorkspaceBinding(resourceMapping, targetManager));
        }
        return globalInstance().get(_CSSWorkspaceBinding);
      }
      static removeInstance() {
        globalInstance().delete(_CSSWorkspaceBinding);
      }
      get modelToInfo() {
        return this.#modelToInfo;
      }
      getCSSModelInfo(cssModel) {
        return this.#modelToInfo.get(cssModel);
      }
      modelAdded(cssModel) {
        this.#modelToInfo.set(cssModel, new ModelInfo$1(cssModel, this.#resourceMapping, this));
      }
      modelRemoved(cssModel) {
        this.getCSSModelInfo(cssModel).dispose();
        this.#modelToInfo.delete(cssModel);
      }
      async pendingLiveLocationChangesPromise() {
        await Promise.all(this.#liveLocationPromises);
      }
      recordLiveLocationChange(promise) {
        void promise.then(() => {
          this.#liveLocationPromises.delete(promise);
        });
        this.#liveLocationPromises.add(promise);
      }
      async updateLocations(header) {
        const updatePromise = this.getCSSModelInfo(header.cssModel()).updateLocations(header);
        this.recordLiveLocationChange(updatePromise);
        await updatePromise;
      }
      createLiveLocation(rawLocation, updateDelegate, locationPool) {
        const locationPromise = this.getCSSModelInfo(rawLocation.cssModel()).createLiveLocation(rawLocation, updateDelegate, locationPool);
        this.recordLiveLocationChange(locationPromise);
        return locationPromise;
      }
      propertyRawLocation(cssProperty, forName) {
        const style = cssProperty.ownerStyle;
        if (!style || style.type !== Type$3.Regular || !style.styleSheetId) {
          return null;
        }
        const header = style.cssModel().styleSheetHeaderForId(style.styleSheetId);
        if (!header) {
          return null;
        }
        const range2 = forName ? cssProperty.nameRange() : cssProperty.valueRange();
        if (!range2) {
          return null;
        }
        const lineNumber = range2.startLine;
        const columnNumber = range2.startColumn;
        return new CSSLocation(header, header.lineNumberInSource(lineNumber), header.columnNumberInSource(lineNumber, columnNumber));
      }
      propertyUILocation(cssProperty, forName) {
        const rawLocation = this.propertyRawLocation(cssProperty, forName);
        if (!rawLocation) {
          return null;
        }
        return this.rawLocationToUILocation(rawLocation);
      }
      rawLocationToUILocation(rawLocation) {
        return this.getCSSModelInfo(rawLocation.cssModel()).rawLocationToUILocation(rawLocation);
      }
      uiLocationToRawLocations(uiLocation) {
        const rawLocations = [];
        for (const modelInfo of this.#modelToInfo.values()) {
          rawLocations.push(...modelInfo.uiLocationToRawLocations(uiLocation));
        }
        return rawLocations;
      }
    };
    ModelInfo$1 = class ModelInfo {
      #eventListeners;
      #resourceMapping;
      #stylesSourceMapping;
      #sassSourceMapping;
      #locations;
      #unboundLocations;
      constructor(cssModel, resourceMapping, cssWorkspaceBinding) {
        this.#eventListeners = [
          cssModel.addEventListener(Events$a.StyleSheetAdded, (event) => {
            void this.styleSheetAdded(event);
          }, this),
          cssModel.addEventListener(Events$a.StyleSheetRemoved, (event) => {
            void this.styleSheetRemoved(event);
          }, this)
        ];
        this.#resourceMapping = resourceMapping;
        this.#stylesSourceMapping = new StylesSourceMapping(cssModel, resourceMapping.workspace);
        const sourceMapManager = cssModel.sourceMapManager();
        this.#sassSourceMapping = new SASSSourceMapping(cssModel.target(), sourceMapManager, resourceMapping.workspace, cssWorkspaceBinding);
        this.#locations = new Multimap2();
        this.#unboundLocations = new Multimap2();
      }
      get locations() {
        return this.#locations;
      }
      async createLiveLocation(rawLocation, updateDelegate, locationPool) {
        const location = new LiveLocation(rawLocation, this, updateDelegate, locationPool);
        const header = rawLocation.header();
        if (header) {
          location.setHeader(header);
          this.#locations.set(header, location);
          await location.update();
        } else {
          this.#unboundLocations.set(rawLocation.url, location);
        }
        return location;
      }
      disposeLocation(location) {
        const header = location.header();
        if (header) {
          this.#locations.delete(header, location);
        } else {
          this.#unboundLocations.delete(location.url, location);
        }
      }
      updateLocations(header) {
        const promises2 = [];
        for (const location of this.#locations.get(header)) {
          promises2.push(location.update());
        }
        return Promise.all(promises2);
      }
      async styleSheetAdded(event) {
        const header = event.data;
        if (!header.sourceURL) {
          return;
        }
        const promises2 = [];
        for (const location of this.#unboundLocations.get(header.sourceURL)) {
          location.setHeader(header);
          this.#locations.set(header, location);
          promises2.push(location.update());
        }
        await Promise.all(promises2);
        this.#unboundLocations.deleteAll(header.sourceURL);
      }
      async styleSheetRemoved(event) {
        const header = event.data;
        const promises2 = [];
        for (const location of this.#locations.get(header)) {
          location.setHeader(header);
          this.#unboundLocations.set(location.url, location);
          promises2.push(location.update());
        }
        await Promise.all(promises2);
        this.#locations.deleteAll(header);
      }
      addSourceMap(sourceUrl, sourceMapUrl) {
        this.#stylesSourceMapping.addSourceMap(sourceUrl, sourceMapUrl);
      }
      rawLocationToUILocation(rawLocation) {
        let uiLocation = null;
        uiLocation = uiLocation || this.#sassSourceMapping.rawLocationToUILocation(rawLocation);
        uiLocation = uiLocation || this.#stylesSourceMapping.rawLocationToUILocation(rawLocation);
        uiLocation = uiLocation || this.#resourceMapping.cssLocationToUILocation(rawLocation);
        return uiLocation;
      }
      uiLocationToRawLocations(uiLocation) {
        let rawLocations = this.#sassSourceMapping.uiLocationToRawLocations(uiLocation);
        if (rawLocations.length) {
          return rawLocations;
        }
        rawLocations = this.#stylesSourceMapping.uiLocationToRawLocations(uiLocation);
        if (rawLocations.length) {
          return rawLocations;
        }
        return this.#resourceMapping.uiLocationToCSSLocations(uiLocation);
      }
      dispose() {
        removeEventListeners(this.#eventListeners);
        this.#stylesSourceMapping.dispose();
        this.#sassSourceMapping.dispose();
      }
    };
    LiveLocation = class extends LiveLocationWithPool {
      url;
      #lineNumber;
      #columnNumber;
      #info;
      #header;
      constructor(rawLocation, info, updateDelegate, locationPool) {
        super(updateDelegate, locationPool);
        this.url = rawLocation.url;
        this.#lineNumber = rawLocation.lineNumber;
        this.#columnNumber = rawLocation.columnNumber;
        this.#info = info;
        this.#header = null;
      }
      header() {
        return this.#header;
      }
      setHeader(header) {
        this.#header = header;
      }
      async uiLocation() {
        if (!this.#header) {
          return null;
        }
        const rawLocation = new CSSLocation(this.#header, this.#lineNumber, this.#columnNumber);
        return CSSWorkspaceBinding.instance().rawLocationToUILocation(rawLocation);
      }
      dispose() {
        super.dispose();
        this.#info.disposeLocation(this);
      }
    };
    UIStrings$M = {
      errorInDebuggerLanguagePlugin: "Error in debugger language plugin: {PH1}",
      loadingDebugSymbolsForVia: "[{PH1}] Loading debug symbols for {PH2} (via {PH3})\u2026",
      loadingDebugSymbolsFor: "[{PH1}] Loading debug symbols for {PH2}\u2026",
      loadedDebugSymbolsForButDidnt: "[{PH1}] Loaded debug symbols for {PH2}, but didn't find any source files",
      loadedDebugSymbolsForFound: "[{PH1}] Loaded debug symbols for {PH2}, found {PH3} source file(s)",
      failedToLoadDebugSymbolsFor: "[{PH1}] Failed to load debug symbols for {PH2} ({PH3})"
    };
    str_$L = registerUIStrings("models/bindings/DebuggerLanguagePlugins.ts", UIStrings$M);
    i18nString$x = getLocalizedString.bind(void 0, str_$L);
    FormattingError = class _FormattingError extends Error {
      exception;
      exceptionDetails;
      constructor(exception, exceptionDetails) {
        const { description: description2 } = exceptionDetails.exception || {};
        super(description2 || exceptionDetails.text);
        this.exception = exception;
        this.exceptionDetails = exceptionDetails;
      }
      static makeLocal(callFrame, message) {
        const exception = {
          type: "object",
          subtype: "error",
          description: message
        };
        const exceptionDetails = { text: "Uncaught", exceptionId: -1, columnNumber: 0, lineNumber: 0, exception };
        const errorObject = callFrame.debuggerModel.runtimeModel().createRemoteObject(exception);
        return new _FormattingError(errorObject, exceptionDetails);
      }
    };
    NamespaceObject = class extends LocalJSONObject {
      get description() {
        return this.type;
      }
      get type() {
        return "namespace";
      }
    };
    SourceScopeRemoteObject = class extends RemoteObjectImpl {
      variables;
      #callFrame;
      #plugin;
      stopId;
      constructor(callFrame, stopId, plugin) {
        super(callFrame.debuggerModel.runtimeModel(), void 0, "object", void 0, null);
        this.variables = [];
        this.#callFrame = callFrame;
        this.#plugin = plugin;
        this.stopId = stopId;
      }
      async doGetProperties(_ownProperties, accessorPropertiesOnly, _generatePreview) {
        if (accessorPropertiesOnly) {
          return { properties: [], internalProperties: [] };
        }
        const properties2 = [];
        const namespaces = {};
        function makeProperty(name, obj) {
          return new RemoteObjectProperty(
            name,
            obj,
            false,
            false,
            true,
            false
          );
        }
        for (const variable of this.variables) {
          let sourceVar;
          try {
            const evalResult = await this.#plugin.evaluate(variable.name, getRawLocation(this.#callFrame), this.stopId);
            sourceVar = evalResult ? await wrapRemoteObject(this.#callFrame, evalResult, this.#plugin) : new LocalJSONObject(void 0);
          } catch (e) {
            console.warn(e);
            sourceVar = new LocalJSONObject(void 0);
          }
          if (variable.nestedName && variable.nestedName.length > 1) {
            let parent = namespaces;
            for (let index2 = 0; index2 < variable.nestedName.length - 1; index2++) {
              const nestedName = variable.nestedName[index2];
              let child = parent[nestedName];
              if (!child) {
                child = new NamespaceObject({});
                parent[nestedName] = child;
              }
              parent = child.value;
            }
            const name = variable.nestedName[variable.nestedName.length - 1];
            parent[name] = sourceVar;
          } else {
            properties2.push(makeProperty(variable.name, sourceVar));
          }
        }
        for (const namespace in namespaces) {
          properties2.push(makeProperty(namespace, namespaces[namespace]));
        }
        return { properties: properties2, internalProperties: [] };
      }
    };
    SourceScope = class {
      #callFrame;
      #type;
      #typeName;
      #icon;
      #object;
      constructor(callFrame, stopId, type2, typeName, icon, plugin) {
        if (icon && new URL(icon).protocol !== "data:") {
          throw new Error("The icon must be a data:-URL");
        }
        this.#callFrame = callFrame;
        this.#type = type2;
        this.#typeName = typeName;
        this.#icon = icon;
        this.#object = new SourceScopeRemoteObject(callFrame, stopId, plugin);
      }
      async getVariableValue(name) {
        for (let v = 0; v < this.#object.variables.length; ++v) {
          if (this.#object.variables[v].name !== name) {
            continue;
          }
          const properties2 = await this.#object.getAllProperties(false, false);
          if (!properties2.properties) {
            continue;
          }
          const { value } = properties2.properties[v];
          if (value) {
            return value;
          }
        }
        return null;
      }
      callFrame() {
        return this.#callFrame;
      }
      type() {
        return this.#type;
      }
      typeName() {
        return this.#typeName;
      }
      name() {
        return void 0;
      }
      range() {
        return null;
      }
      object() {
        return this.#object;
      }
      description() {
        return "";
      }
      icon() {
        return this.#icon;
      }
      extraProperties() {
        return [];
      }
    };
    ExtensionRemoteObject = class extends RemoteObject$1 {
      extensionObject;
      plugin;
      callFrame;
      constructor(callFrame, extensionObject, plugin) {
        super();
        this.extensionObject = extensionObject;
        this.plugin = plugin;
        this.callFrame = callFrame;
      }
      get linearMemoryAddress() {
        return this.extensionObject.linearMemoryAddress;
      }
      get linearMemorySize() {
        return this.extensionObject.linearMemorySize;
      }
      get objectId() {
        return this.extensionObject.objectId;
      }
      get type() {
        if (this.extensionObject.type === "array" || this.extensionObject.type === "null") {
          return "object";
        }
        return this.extensionObject.type;
      }
      get subtype() {
        if (this.extensionObject.type === "array" || this.extensionObject.type === "null") {
          return this.extensionObject.type;
        }
        return void 0;
      }
      get value() {
        return this.extensionObject.value;
      }
      unserializableValue() {
        return void 0;
      }
      get description() {
        return this.extensionObject.description;
      }
      set description(_description) {
      }
      get hasChildren() {
        return this.extensionObject.hasChildren;
      }
      get preview() {
        return void 0;
      }
      get className() {
        return this.extensionObject.className ?? null;
      }
      arrayLength() {
        return 0;
      }
      arrayBufferByteLength() {
        return 0;
      }
      getOwnProperties(_generatePreview, _nonIndexedPropertiesOnly) {
        return this.getAllProperties(false, _generatePreview, _nonIndexedPropertiesOnly);
      }
      async getAllProperties(_accessorPropertiesOnly, _generatePreview, _nonIndexedPropertiesOnly) {
        const { objectId } = this.extensionObject;
        if (objectId) {
          assertNotNullOrUndefined2(this.plugin.getProperties);
          const extensionObjectProperties = await this.plugin.getProperties(objectId);
          const properties2 = await Promise.all(extensionObjectProperties.map(async (p) => new RemoteObjectProperty(p.name, await wrapRemoteObject(this.callFrame, p.value, this.plugin))));
          return { properties: properties2, internalProperties: null };
        }
        return { properties: null, internalProperties: null };
      }
      release() {
        const { objectId } = this.extensionObject;
        if (objectId) {
          assertNotNullOrUndefined2(this.plugin.releaseObject);
          void this.plugin.releaseObject(objectId);
        }
      }
      debuggerModel() {
        return this.callFrame.debuggerModel;
      }
      runtimeModel() {
        return this.callFrame.debuggerModel.runtimeModel();
      }
      isLinearMemoryInspectable() {
        return this.extensionObject.linearMemoryAddress !== void 0;
      }
    };
    DebuggerLanguagePluginManager = class {
      #workspace;
      #debuggerWorkspaceBinding;
      #plugins;
      #debuggerModelToData;
      #rawModuleHandles;
      callFrameByStopId = /* @__PURE__ */ new Map();
      stopIdByCallFrame = /* @__PURE__ */ new Map();
      nextStopId = 0n;
      constructor(targetManager, workspace, debuggerWorkspaceBinding) {
        this.#workspace = workspace;
        this.#debuggerWorkspaceBinding = debuggerWorkspaceBinding;
        this.#plugins = [];
        this.#debuggerModelToData = /* @__PURE__ */ new Map();
        targetManager.observeModels(DebuggerModel, this);
        this.#rawModuleHandles = /* @__PURE__ */ new Map();
      }
      async evaluateOnCallFrame(callFrame, options2) {
        const { script } = callFrame;
        const { expression, returnByValue, throwOnSideEffect } = options2;
        const { plugin } = await this.rawModuleIdAndPluginForScript(script);
        if (!plugin) {
          return null;
        }
        const location = getRawLocation(callFrame);
        const sourceLocations = await plugin.rawLocationToSourceLocation(location);
        if (sourceLocations.length === 0) {
          return null;
        }
        if (returnByValue) {
          return { error: "Cannot return by value" };
        }
        if (throwOnSideEffect) {
          return { error: "Cannot guarantee side-effect freedom" };
        }
        try {
          const object2 = await plugin.evaluate(expression, location, this.stopIdForCallFrame(callFrame));
          if (object2) {
            return { object: await wrapRemoteObject(callFrame, object2, plugin) };
          }
          return { object: new LocalJSONObject(void 0) };
        } catch (error) {
          if (error instanceof FormattingError) {
            const { exception: object3, exceptionDetails: exceptionDetails2 } = error;
            return { object: object3, exceptionDetails: exceptionDetails2 };
          }
          const { exception: object2, exceptionDetails } = FormattingError.makeLocal(callFrame, error.message);
          return { object: object2, exceptionDetails };
        }
      }
      stopIdForCallFrame(callFrame) {
        let stopId = this.stopIdByCallFrame.get(callFrame);
        if (stopId !== void 0) {
          return stopId;
        }
        stopId = this.nextStopId++;
        this.stopIdByCallFrame.set(callFrame, stopId);
        this.callFrameByStopId.set(stopId, callFrame);
        return stopId;
      }
      callFrameForStopId(stopId) {
        return this.callFrameByStopId.get(stopId);
      }
      modelAdded(debuggerModel) {
        this.#debuggerModelToData.set(debuggerModel, new ModelData$1(debuggerModel, this.#workspace));
        debuggerModel.addEventListener(Events$5.GlobalObjectCleared, this.globalObjectCleared, this);
        debuggerModel.addEventListener(Events$5.ParsedScriptSource, this.parsedScriptSource, this);
        debuggerModel.addEventListener(Events$5.DebuggerResumed, this.debuggerResumed, this);
        debuggerModel.setEvaluateOnCallFrameCallback(this.evaluateOnCallFrame.bind(this));
      }
      modelRemoved(debuggerModel) {
        debuggerModel.removeEventListener(Events$5.GlobalObjectCleared, this.globalObjectCleared, this);
        debuggerModel.removeEventListener(Events$5.ParsedScriptSource, this.parsedScriptSource, this);
        debuggerModel.removeEventListener(Events$5.DebuggerResumed, this.debuggerResumed, this);
        debuggerModel.setEvaluateOnCallFrameCallback(null);
        const modelData = this.#debuggerModelToData.get(debuggerModel);
        if (modelData) {
          modelData.dispose();
          this.#debuggerModelToData.delete(debuggerModel);
        }
        this.#rawModuleHandles.forEach((rawModuleHandle, rawModuleId) => {
          const scripts = rawModuleHandle.scripts.filter((script) => script.debuggerModel !== debuggerModel);
          if (scripts.length === 0) {
            rawModuleHandle.plugin.removeRawModule(rawModuleId).catch((error) => {
              Console.instance().error(i18nString$x(UIStrings$M.errorInDebuggerLanguagePlugin, { PH1: error.message }), false);
            });
            this.#rawModuleHandles.delete(rawModuleId);
          } else {
            rawModuleHandle.scripts = scripts;
          }
        });
      }
      globalObjectCleared(event) {
        const debuggerModel = event.data;
        this.modelRemoved(debuggerModel);
        this.modelAdded(debuggerModel);
      }
      addPlugin(plugin) {
        this.#plugins.push(plugin);
        for (const debuggerModel of this.#debuggerModelToData.keys()) {
          for (const script of debuggerModel.scripts()) {
            if (this.hasPluginForScript(script)) {
              continue;
            }
            this.parsedScriptSource({ data: script });
          }
        }
      }
      removePlugin(plugin) {
        this.#plugins = this.#plugins.filter((p) => p !== plugin);
        const scripts = /* @__PURE__ */ new Set();
        this.#rawModuleHandles.forEach((rawModuleHandle, rawModuleId) => {
          if (rawModuleHandle.plugin !== plugin) {
            return;
          }
          rawModuleHandle.scripts.forEach((script) => scripts.add(script));
          this.#rawModuleHandles.delete(rawModuleId);
        });
        for (const script of scripts) {
          const modelData = this.#debuggerModelToData.get(script.debuggerModel);
          modelData.removeScript(script);
          this.parsedScriptSource({ data: script });
        }
      }
      hasPluginForScript(script) {
        const rawModuleId = rawModuleIdForScript(script);
        const rawModuleHandle = this.#rawModuleHandles.get(rawModuleId);
        return rawModuleHandle?.scripts.includes(script) ?? false;
      }
      async rawModuleIdAndPluginForScript(script) {
        const rawModuleId = rawModuleIdForScript(script);
        const rawModuleHandle = this.#rawModuleHandles.get(rawModuleId);
        if (rawModuleHandle) {
          await rawModuleHandle.addRawModulePromise;
          if (rawModuleHandle === this.#rawModuleHandles.get(rawModuleId)) {
            return { rawModuleId, plugin: rawModuleHandle.plugin };
          }
        }
        return { rawModuleId, plugin: null };
      }
      uiSourceCodeForURL(debuggerModel, url) {
        const modelData = this.#debuggerModelToData.get(debuggerModel);
        if (modelData) {
          return modelData.getProject().uiSourceCodeForURL(url);
        }
        return null;
      }
      async rawLocationToUILocation(rawLocation) {
        const script = rawLocation.script();
        if (!script) {
          return null;
        }
        const { rawModuleId, plugin } = await this.rawModuleIdAndPluginForScript(script);
        if (!plugin) {
          return null;
        }
        const pluginLocation = {
          rawModuleId,
          codeOffset: rawLocation.columnNumber - (script.codeOffset() || 0),
          inlineFrameIndex: rawLocation.inlineFrameIndex
        };
        try {
          const sourceLocations = await plugin.rawLocationToSourceLocation(pluginLocation);
          for (const sourceLocation of sourceLocations) {
            const uiSourceCode = this.uiSourceCodeForURL(script.debuggerModel, sourceLocation.sourceFileURL);
            if (!uiSourceCode) {
              continue;
            }
            return uiSourceCode.uiLocation(sourceLocation.lineNumber, sourceLocation.columnNumber >= 0 ? sourceLocation.columnNumber : void 0);
          }
        } catch (error) {
          Console.instance().error(i18nString$x(UIStrings$M.errorInDebuggerLanguagePlugin, { PH1: error.message }), false);
        }
        return null;
      }
      uiLocationToRawLocationRanges(uiSourceCode, lineNumber, columnNumber = -1) {
        const locationPromises = [];
        this.scriptsForUISourceCode(uiSourceCode).forEach((script) => {
          const rawModuleId = rawModuleIdForScript(script);
          const rawModuleHandle = this.#rawModuleHandles.get(rawModuleId);
          if (!rawModuleHandle) {
            return;
          }
          const { plugin } = rawModuleHandle;
          locationPromises.push(getLocations(rawModuleId, plugin, script));
        });
        if (locationPromises.length === 0) {
          return Promise.resolve(null);
        }
        return Promise.all(locationPromises).then((locations) => locations.flat()).catch((error) => {
          Console.instance().error(i18nString$x(UIStrings$M.errorInDebuggerLanguagePlugin, { PH1: error.message }), false);
          return null;
        });
        async function getLocations(rawModuleId, plugin, script) {
          const pluginLocation = { rawModuleId, sourceFileURL: uiSourceCode.url(), lineNumber, columnNumber };
          const rawLocations = await plugin.sourceLocationToRawLocation(pluginLocation);
          if (!rawLocations) {
            return [];
          }
          return rawLocations.map((m) => ({
            start: new Location$1(script.debuggerModel, script.scriptId, 0, Number(m.startOffset) + (script.codeOffset() || 0)),
            end: new Location$1(script.debuggerModel, script.scriptId, 0, Number(m.endOffset) + (script.codeOffset() || 0))
          }));
        }
      }
      async uiLocationToRawLocations(uiSourceCode, lineNumber, columnNumber) {
        const locationRanges = await this.uiLocationToRawLocationRanges(uiSourceCode, lineNumber, columnNumber);
        if (!locationRanges) {
          return null;
        }
        return locationRanges.map(({ start }) => start);
      }
      async uiLocationRangeToRawLocationRanges(uiSourceCode, textRange) {
        const locationRangesPromises = [];
        for (let line = textRange.startLine; line <= textRange.endLine; ++line) {
          locationRangesPromises.push(this.uiLocationToRawLocationRanges(uiSourceCode, line));
        }
        const ranges = [];
        for (const locationRanges of await Promise.all(locationRangesPromises)) {
          if (locationRanges === null) {
            return null;
          }
          for (const range2 of locationRanges) {
            const [startLocation, endLocation] = await Promise.all([
              this.rawLocationToUILocation(range2.start),
              this.rawLocationToUILocation(range2.end)
            ]);
            if (startLocation === null || endLocation === null) {
              continue;
            }
            const overlap = textRange.intersection(new TextRange(startLocation.lineNumber, startLocation.columnNumber ?? 0, endLocation.lineNumber, endLocation.columnNumber ?? Infinity));
            if (!overlap.isEmpty()) {
              ranges.push(range2);
            }
          }
        }
        return ranges;
      }
      async translateRawFramesStep(rawFrames, translatedFrames, target) {
        const frame = rawFrames[0];
        const script = target.model(DebuggerModel)?.scriptForId(frame.scriptId ?? "");
        if (!script) {
          return false;
        }
        const functionInfo = await this.getFunctionInfo(script, frame);
        if (!functionInfo) {
          return false;
        }
        rawFrames.shift();
        if ("frames" in functionInfo && functionInfo.frames.length) {
          const framePromises = functionInfo.frames.map(async ({ name }, index2) => {
            const rawLocation = new Location$1(script.debuggerModel, script.scriptId, frame.lineNumber, frame.columnNumber, index2);
            const uiLocation2 = await this.rawLocationToUILocation(rawLocation);
            return translatedFromUILocation(uiLocation2, name, frame);
          });
          translatedFrames.push(await Promise.all(framePromises));
          return true;
        }
        const uiLocation = await this.#debuggerWorkspaceBinding.rawLocationToUILocation(new Location$1(script.debuggerModel, script.scriptId, frame.lineNumber, frame.columnNumber));
        const mappedFrame = translatedFromUILocation(uiLocation, frame.functionName, frame);
        if ("missingSymbolFiles" in functionInfo && functionInfo.missingSymbolFiles.length) {
          translatedFrames.push([{
            ...mappedFrame,
            missingDebugInfo: {
              type: "PARTIAL_INFO",
              missingDebugFiles: functionInfo.missingSymbolFiles
            }
          }]);
        } else {
          translatedFrames.push([{
            ...mappedFrame,
            missingDebugInfo: {
              type: "NO_INFO"
            }
          }]);
        }
        return true;
        function translatedFromUILocation(uiLocation2, name, fallback) {
          if (uiLocation2) {
            return {
              uiSourceCode: uiLocation2.uiSourceCode,
              name,
              line: uiLocation2.lineNumber,
              column: uiLocation2.columnNumber ?? -1
            };
          }
          return {
            url: fallback.url,
            name: fallback.functionName,
            line: fallback.lineNumber,
            column: fallback.columnNumber
          };
        }
      }
      scriptsForUISourceCode(uiSourceCode) {
        for (const modelData of this.#debuggerModelToData.values()) {
          const scripts = modelData.uiSourceCodeToScripts.get(uiSourceCode);
          if (scripts) {
            return scripts;
          }
        }
        return [];
      }
      setDebugInfoURL(script, externalURL) {
        if (this.hasPluginForScript(script)) {
          return;
        }
        script.debugSymbols = { type: "ExternalDWARF", externalURL };
        this.parsedScriptSource({ data: script });
        void script.debuggerModel.setDebugInfoURL(script, externalURL);
      }
      parsedScriptSource(event) {
        const script = event.data;
        if (!script.sourceURL) {
          return;
        }
        for (const plugin of this.#plugins) {
          if (!plugin.handleScript(script)) {
            continue;
          }
          const rawModuleId = rawModuleIdForScript(script);
          let rawModuleHandle = this.#rawModuleHandles.get(rawModuleId);
          if (!rawModuleHandle) {
            const sourceFileURLsPromise = (async () => {
              const console2 = Console.instance();
              const url = script.sourceURL;
              const symbolsUrl = script.debugSymbols?.externalURL || "";
              if (symbolsUrl) {
                console2.log(i18nString$x(UIStrings$M.loadingDebugSymbolsForVia, { PH1: plugin.name, PH2: url, PH3: symbolsUrl }));
              } else {
                console2.log(i18nString$x(UIStrings$M.loadingDebugSymbolsFor, { PH1: plugin.name, PH2: url }));
              }
              try {
                const code2 = !symbolsUrl && schemeIs2(url, "wasm:") ? await script.getWasmBytecode() : void 0;
                const addModuleResult = await plugin.addRawModule(rawModuleId, symbolsUrl, { url, code: code2 });
                if (rawModuleHandle !== this.#rawModuleHandles.get(rawModuleId)) {
                  return [];
                }
                if ("missingSymbolFiles" in addModuleResult) {
                  const initiator = plugin.createPageResourceLoadInitiator();
                  const missingSymbolFiles = addModuleResult.missingSymbolFiles.map((resource) => {
                    const resourceUrl = resource;
                    return { resourceUrl, initiator };
                  });
                  return { missingSymbolFiles };
                }
                const sourceFileURLs = addModuleResult;
                if (sourceFileURLs.length === 0) {
                  console2.warn(i18nString$x(UIStrings$M.loadedDebugSymbolsForButDidnt, { PH1: plugin.name, PH2: url }));
                } else {
                  console2.log(i18nString$x(UIStrings$M.loadedDebugSymbolsForFound, { PH1: plugin.name, PH2: url, PH3: sourceFileURLs.length }));
                }
                return sourceFileURLs;
              } catch (error) {
                console2.error(
                  i18nString$x(UIStrings$M.failedToLoadDebugSymbolsFor, { PH1: plugin.name, PH2: url, PH3: error.message }),
                  false
                );
                this.#rawModuleHandles.delete(rawModuleId);
                return [];
              }
            })();
            rawModuleHandle = { rawModuleId, plugin, scripts: [script], addRawModulePromise: sourceFileURLsPromise };
            this.#rawModuleHandles.set(rawModuleId, rawModuleHandle);
          } else {
            rawModuleHandle.scripts.push(script);
          }
          void rawModuleHandle.addRawModulePromise.then((sourceFileURLs) => {
            if (script.debuggerModel.scriptForId(script.scriptId) === script) {
              const modelData = this.#debuggerModelToData.get(script.debuggerModel);
              if (modelData && Array.isArray(sourceFileURLs)) {
                modelData.addSourceFiles(script, sourceFileURLs);
              }
              void this.#debuggerWorkspaceBinding.updateLocations(script);
            }
          });
          return;
        }
      }
      debuggerResumed(event) {
        const resumedFrames = Array.from(this.callFrameByStopId.values()).filter((callFrame) => callFrame.debuggerModel === event.data);
        for (const callFrame of resumedFrames) {
          const stopId = this.stopIdByCallFrame.get(callFrame);
          assertNotNullOrUndefined2(stopId);
          this.stopIdByCallFrame.delete(callFrame);
          this.callFrameByStopId.delete(stopId);
        }
      }
      getSourcesForScript(script) {
        const rawModuleId = rawModuleIdForScript(script);
        const rawModuleHandle = this.#rawModuleHandles.get(rawModuleId);
        if (rawModuleHandle) {
          return rawModuleHandle.addRawModulePromise;
        }
        return Promise.resolve(void 0);
      }
      async resolveScopeChain(callFrame) {
        const script = callFrame.script;
        const { rawModuleId, plugin } = await this.rawModuleIdAndPluginForScript(script);
        if (!plugin) {
          return null;
        }
        const location = {
          rawModuleId,
          codeOffset: callFrame.location().columnNumber - (script.codeOffset() || 0),
          inlineFrameIndex: callFrame.inlineFrameIndex
        };
        const stopId = this.stopIdForCallFrame(callFrame);
        try {
          const sourceMapping = await plugin.rawLocationToSourceLocation(location);
          if (sourceMapping.length === 0) {
            return null;
          }
          const scopes = /* @__PURE__ */ new Map();
          const variables = await plugin.listVariablesInScope(location);
          for (const variable of variables || []) {
            let scope2 = scopes.get(variable.scope);
            if (!scope2) {
              const { type: type2, typeName, icon } = await plugin.getScopeInfo(variable.scope);
              scope2 = new SourceScope(callFrame, stopId, type2, typeName, icon, plugin);
              scopes.set(variable.scope, scope2);
            }
            scope2.object().variables.push(variable);
          }
          return Array.from(scopes.values());
        } catch (error) {
          Console.instance().error(i18nString$x(UIStrings$M.errorInDebuggerLanguagePlugin, { PH1: error.message }), false);
          return null;
        }
      }
      async getFunctionInfo(script, location) {
        const { rawModuleId, plugin } = await this.rawModuleIdAndPluginForScript(script);
        if (!plugin) {
          return null;
        }
        const rawLocation = {
          rawModuleId,
          codeOffset: location.columnNumber - (script.codeOffset() || 0),
          inlineFrameIndex: 0
        };
        try {
          const functionInfo = await plugin.getFunctionInfo(rawLocation);
          if ("missingSymbolFiles" in functionInfo) {
            const initiator = plugin.createPageResourceLoadInitiator();
            const missingSymbolFiles = functionInfo.missingSymbolFiles.map((resource) => {
              const resourceUrl = resource;
              return { resourceUrl, initiator };
            });
            return { missingSymbolFiles, ..."frames" in functionInfo && { frames: functionInfo.frames } };
          }
          return functionInfo;
        } catch (error) {
          Console.instance().warn(i18nString$x(UIStrings$M.errorInDebuggerLanguagePlugin, { PH1: error.message }));
          return { frames: [] };
        }
      }
      async getInlinedFunctionRanges(rawLocation) {
        const script = rawLocation.script();
        if (!script) {
          return [];
        }
        const { rawModuleId, plugin } = await this.rawModuleIdAndPluginForScript(script);
        if (!plugin) {
          return [];
        }
        const pluginLocation = {
          rawModuleId,
          codeOffset: rawLocation.columnNumber - (script.codeOffset() || 0)
        };
        try {
          const locations = await plugin.getInlinedFunctionRanges(pluginLocation);
          return locations.map((m) => ({
            start: new Location$1(script.debuggerModel, script.scriptId, 0, Number(m.startOffset) + (script.codeOffset() || 0)),
            end: new Location$1(script.debuggerModel, script.scriptId, 0, Number(m.endOffset) + (script.codeOffset() || 0))
          }));
        } catch (error) {
          Console.instance().warn(i18nString$x(UIStrings$M.errorInDebuggerLanguagePlugin, { PH1: error.message }));
          return [];
        }
      }
      async getInlinedCalleesRanges(rawLocation) {
        const script = rawLocation.script();
        if (!script) {
          return [];
        }
        const { rawModuleId, plugin } = await this.rawModuleIdAndPluginForScript(script);
        if (!plugin) {
          return [];
        }
        const pluginLocation = {
          rawModuleId,
          codeOffset: rawLocation.columnNumber - (script.codeOffset() || 0)
        };
        try {
          const locations = await plugin.getInlinedCalleesRanges(pluginLocation);
          return locations.map((m) => ({
            start: new Location$1(script.debuggerModel, script.scriptId, 0, Number(m.startOffset) + (script.codeOffset() || 0)),
            end: new Location$1(script.debuggerModel, script.scriptId, 0, Number(m.endOffset) + (script.codeOffset() || 0))
          }));
        } catch (error) {
          Console.instance().warn(i18nString$x(UIStrings$M.errorInDebuggerLanguagePlugin, { PH1: error.message }));
          return [];
        }
      }
      async getMappedLines(uiSourceCode) {
        const rawModuleIds = await Promise.all(this.scriptsForUISourceCode(uiSourceCode).map((s) => this.rawModuleIdAndPluginForScript(s)));
        let mappedLines = null;
        for (const { rawModuleId, plugin } of rawModuleIds) {
          if (!plugin) {
            continue;
          }
          const lines = await plugin.getMappedLines(rawModuleId, uiSourceCode.url());
          if (lines === void 0) {
            continue;
          }
          if (mappedLines === null) {
            mappedLines = new Set(lines);
          } else {
            lines.forEach((l) => mappedLines.add(l));
          }
        }
        return mappedLines;
      }
    };
    ModelData$1 = class ModelData {
      project;
      uiSourceCodeToScripts;
      constructor(debuggerModel, workspace) {
        this.project = new ContentProviderBasedProject(workspace, "language_plugins::" + debuggerModel.target().id(), projectTypes.Network, "", false);
        NetworkProject.setTargetForProject(this.project, debuggerModel.target());
        this.uiSourceCodeToScripts = /* @__PURE__ */ new Map();
      }
      addSourceFiles(script, urls) {
        const initiator = script.createPageResourceLoadInitiator();
        for (const url of urls) {
          let uiSourceCode = this.project.uiSourceCodeForURL(url);
          if (!uiSourceCode) {
            uiSourceCode = this.project.createUISourceCode(url, resourceTypes.SourceMapScript);
            NetworkProject.setInitialFrameAttribution(uiSourceCode, script.frameId);
            this.uiSourceCodeToScripts.set(uiSourceCode, [script]);
            const contentProvider = new CompilerSourceMappingContentProvider(url, resourceTypes.SourceMapScript, initiator);
            const mimeType = ResourceType.mimeFromURL(url) || "text/javascript";
            this.project.addUISourceCodeWithProvider(uiSourceCode, contentProvider, null, mimeType);
          } else {
            const scripts = this.uiSourceCodeToScripts.get(uiSourceCode);
            if (!scripts.includes(script)) {
              scripts.push(script);
            }
          }
        }
      }
      removeScript(script) {
        this.uiSourceCodeToScripts.forEach((scripts, uiSourceCode) => {
          scripts = scripts.filter((s) => s !== script);
          if (scripts.length === 0) {
            this.uiSourceCodeToScripts.delete(uiSourceCode);
            this.project.removeUISourceCode(uiSourceCode.url());
          } else {
            this.uiSourceCodeToScripts.set(uiSourceCode, scripts);
          }
        });
      }
      dispose() {
        this.project.dispose();
      }
      getProject() {
        return this.project;
      }
    };
    DefaultScriptMapping = class _DefaultScriptMapping {
      #debuggerWorkspaceBinding;
      #project;
      #eventListeners;
      #uiSourceCodeToScript;
      #scriptToUISourceCode;
      constructor(debuggerModel, workspace, debuggerWorkspaceBinding) {
        defaultScriptMappings.add(this);
        this.#debuggerWorkspaceBinding = debuggerWorkspaceBinding;
        this.#project = new ContentProviderBasedProject(workspace, "debugger:" + debuggerModel.target().id(), projectTypes.Debugger, "", true);
        this.#eventListeners = [
          debuggerModel.addEventListener(Events$5.GlobalObjectCleared, this.globalObjectCleared, this),
          debuggerModel.addEventListener(Events$5.ParsedScriptSource, this.parsedScriptSource, this),
          debuggerModel.addEventListener(Events$5.DiscardedAnonymousScriptSource, this.discardedScriptSource, this)
        ];
        this.#uiSourceCodeToScript = /* @__PURE__ */ new Map();
        this.#scriptToUISourceCode = /* @__PURE__ */ new Map();
      }
      static createV8ScriptURL(script) {
        const name = ParsedURL2.extractName(script.sourceURL);
        const url = "debugger:///VM" + script.scriptId + (name ? " " + name : "");
        return url;
      }
      static scriptForUISourceCode(uiSourceCode) {
        for (const defaultScriptMapping of defaultScriptMappings) {
          const script = defaultScriptMapping.#uiSourceCodeToScript.get(uiSourceCode);
          if (script !== void 0) {
            return script;
          }
        }
        return null;
      }
      uiSourceCodeForScript(script) {
        return this.#scriptToUISourceCode.get(script) ?? null;
      }
      rawLocationToUILocation(rawLocation) {
        const script = rawLocation.script();
        if (!script) {
          return null;
        }
        const uiSourceCode = this.#scriptToUISourceCode.get(script);
        if (!uiSourceCode) {
          return null;
        }
        const { lineNumber, columnNumber } = script.rawLocationToRelativeLocation(rawLocation);
        return uiSourceCode.uiLocation(lineNumber, columnNumber);
      }
      uiLocationToRawLocations(uiSourceCode, lineNumber, columnNumber) {
        const script = this.#uiSourceCodeToScript.get(uiSourceCode);
        if (!script) {
          return [];
        }
        ({ lineNumber, columnNumber } = script.relativeLocationToRawLocation({ lineNumber, columnNumber }));
        return [script.debuggerModel.createRawLocation(script, lineNumber, columnNumber ?? 0)];
      }
      uiLocationRangeToRawLocationRanges(uiSourceCode, { startLine, startColumn, endLine, endColumn }) {
        const script = this.#uiSourceCodeToScript.get(uiSourceCode);
        if (!script) {
          return [];
        }
        ({ lineNumber: startLine, columnNumber: startColumn } = script.relativeLocationToRawLocation({ lineNumber: startLine, columnNumber: startColumn }));
        ({ lineNumber: endLine, columnNumber: endColumn } = script.relativeLocationToRawLocation({ lineNumber: endLine, columnNumber: endColumn }));
        const start = script.debuggerModel.createRawLocation(script, startLine, startColumn);
        const end = script.debuggerModel.createRawLocation(script, endLine, endColumn);
        return [{ start, end }];
      }
      parsedScriptSource(event) {
        const script = event.data;
        const url = _DefaultScriptMapping.createV8ScriptURL(script);
        const uiSourceCode = this.#project.createUISourceCode(url, resourceTypes.Script);
        if (script.isBreakpointCondition) {
          uiSourceCode.markAsUnconditionallyIgnoreListed();
        }
        this.#uiSourceCodeToScript.set(uiSourceCode, script);
        this.#scriptToUISourceCode.set(script, uiSourceCode);
        this.#project.addUISourceCodeWithProvider(uiSourceCode, script, null, "text/javascript");
        void this.#debuggerWorkspaceBinding.updateLocations(script);
      }
      discardedScriptSource(event) {
        const script = event.data;
        const uiSourceCode = this.#scriptToUISourceCode.get(script);
        if (uiSourceCode === void 0) {
          return;
        }
        this.#scriptToUISourceCode.delete(script);
        this.#uiSourceCodeToScript.delete(uiSourceCode);
        this.#project.removeUISourceCode(uiSourceCode.url());
      }
      globalObjectCleared() {
        this.#scriptToUISourceCode.clear();
        this.#uiSourceCodeToScript.clear();
        this.#project.reset();
      }
      dispose() {
        defaultScriptMappings.delete(this);
        removeEventListeners(this.#eventListeners);
        this.globalObjectCleared();
        this.#project.dispose();
      }
    };
    defaultScriptMappings = /* @__PURE__ */ new Set();
    UIStrings$L = {
      liveEditFailed: "`LiveEdit` failed: {PH1}",
      liveEditCompileFailed: "`LiveEdit` compile failed: {PH1}"
    };
    str_$K = registerUIStrings("models/bindings/ResourceScriptMapping.ts", UIStrings$L);
    i18nString$w = getLocalizedString.bind(void 0, str_$K);
    ResourceScriptMapping = class {
      debuggerModel;
      #workspace;
      debuggerWorkspaceBinding;
      #uiSourceCodeToScriptFile;
      #projects;
      #scriptToUISourceCode;
      #eventListeners;
      constructor(debuggerModel, workspace, debuggerWorkspaceBinding) {
        this.debuggerModel = debuggerModel;
        this.#workspace = workspace;
        this.debuggerWorkspaceBinding = debuggerWorkspaceBinding;
        this.#uiSourceCodeToScriptFile = /* @__PURE__ */ new Map();
        this.#projects = /* @__PURE__ */ new Map();
        this.#scriptToUISourceCode = /* @__PURE__ */ new Map();
        const runtimeModel = debuggerModel.runtimeModel();
        this.#eventListeners = [
          this.debuggerModel.addEventListener(Events$5.ParsedScriptSource, (event) => this.addScript(event.data), this),
          this.debuggerModel.addEventListener(Events$5.GlobalObjectCleared, this.globalObjectCleared, this),
          runtimeModel.addEventListener(Events$9.ExecutionContextDestroyed, this.executionContextDestroyed, this),
          runtimeModel.target().targetManager().addEventListener("InspectedURLChanged", this.inspectedURLChanged, this)
        ];
      }
      project(script) {
        const prefix = script.isContentScript() ? "js:extensions:" : "js::";
        const projectId = prefix + this.debuggerModel.target().id() + ":" + script.frameId;
        let project = this.#projects.get(projectId);
        if (!project) {
          const projectType = script.isContentScript() ? projectTypes.ContentScripts : projectTypes.Network;
          project = new ContentProviderBasedProject(this.#workspace, projectId, projectType, "", false);
          NetworkProject.setTargetForProject(project, this.debuggerModel.target());
          this.#projects.set(projectId, project);
        }
        return project;
      }
      uiSourceCodeForScript(script) {
        return this.#scriptToUISourceCode.get(script) ?? null;
      }
      rawLocationToUILocation(rawLocation) {
        const script = rawLocation.script();
        if (!script) {
          return null;
        }
        const uiSourceCode = this.#scriptToUISourceCode.get(script);
        if (!uiSourceCode) {
          return null;
        }
        const scriptFile = this.#uiSourceCodeToScriptFile.get(uiSourceCode);
        if (!scriptFile) {
          return null;
        }
        if (scriptFile.hasDivergedFromVM() && !scriptFile.isMergingToVM() || scriptFile.isDivergingFromVM()) {
          return null;
        }
        if (scriptFile.script !== script) {
          return null;
        }
        const { lineNumber, columnNumber = 0 } = rawLocation;
        return uiSourceCode.uiLocation(lineNumber, columnNumber);
      }
      uiLocationToRawLocations(uiSourceCode, lineNumber, columnNumber) {
        const scriptFile = this.#uiSourceCodeToScriptFile.get(uiSourceCode);
        if (!scriptFile) {
          return [];
        }
        const { script } = scriptFile;
        if (!script) {
          return [];
        }
        return [this.debuggerModel.createRawLocation(script, lineNumber, columnNumber)];
      }
      uiLocationRangeToRawLocationRanges(uiSourceCode, { startLine, startColumn, endLine, endColumn }) {
        const scriptFile = this.#uiSourceCodeToScriptFile.get(uiSourceCode);
        if (!scriptFile) {
          return null;
        }
        const { script } = scriptFile;
        if (!script) {
          return null;
        }
        const start = this.debuggerModel.createRawLocation(script, startLine, startColumn);
        const end = this.debuggerModel.createRawLocation(script, endLine, endColumn);
        return [{ start, end }];
      }
      inspectedURLChanged(event) {
        for (let target = this.debuggerModel.target(); target !== event.data; target = target.parentTarget()) {
          if (target === null) {
            return;
          }
        }
        for (const script of Array.from(this.#scriptToUISourceCode.keys())) {
          this.removeScripts([script]);
          this.addScript(script);
        }
      }
      async functionBoundsAtRawLocation(rawLocation) {
        const script = rawLocation.script();
        if (!script) {
          return null;
        }
        const uiSourceCode = this.#scriptToUISourceCode.get(script);
        if (!uiSourceCode) {
          return null;
        }
        const scopeTreeAndText = script ? await scopeTreeForScript(script) : null;
        if (!scopeTreeAndText) {
          return null;
        }
        const offset = scopeTreeAndText.text.offsetFromPosition(rawLocation.lineNumber, rawLocation.columnNumber);
        const results = [];
        (function walk(nodes) {
          for (const node2 of nodes) {
            if (!(offset >= node2.start && offset < node2.end)) {
              continue;
            }
            results.push(node2);
            walk(node2.children);
          }
        })([scopeTreeAndText.scopeTree]);
        const result = results.findLast((node2) => node2.kind === 2 || node2.kind === 4);
        if (!result) {
          return null;
        }
        const startPosition = scopeTreeAndText.text.positionFromOffset(result.start);
        const endPosition = scopeTreeAndText.text.positionFromOffset(result.end);
        const name = "";
        const range2 = new TextRange(startPosition.lineNumber, startPosition.columnNumber, endPosition.lineNumber, endPosition.columnNumber);
        return new UIFunctionBounds(uiSourceCode, range2, name);
      }
      addScript(script) {
        if (script.isLiveEdit() || script.isBreakpointCondition) {
          return;
        }
        let url = script.sourceURL;
        if (!url) {
          return;
        }
        if (script.hasSourceURL) {
          url = SourceMapManager.resolveRelativeSourceURL(script.debuggerModel.target(), url);
        } else {
          if (script.isInlineScript()) {
            return;
          }
          if (script.isContentScript()) {
            const parsedURL = new ParsedURL2(url);
            if (!parsedURL.isValid) {
              return;
            }
          }
        }
        const project = this.project(script);
        const oldUISourceCode = project.uiSourceCodeForURL(url);
        if (oldUISourceCode) {
          const oldScriptFile = this.#uiSourceCodeToScriptFile.get(oldUISourceCode);
          if (oldScriptFile?.script) {
            this.removeScripts([oldScriptFile.script]);
          }
        }
        const originalContentProvider = script.originalContentProvider();
        const uiSourceCode = project.createUISourceCode(url, originalContentProvider.contentType());
        NetworkProject.setInitialFrameAttribution(uiSourceCode, script.frameId);
        const metadata2 = metadataForURL(this.debuggerModel.target(), script.frameId, url);
        const scriptFile = new ResourceScriptFile(this, uiSourceCode, script);
        this.#uiSourceCodeToScriptFile.set(uiSourceCode, scriptFile);
        this.#scriptToUISourceCode.set(script, uiSourceCode);
        const mimeType = script.isWasm() ? "application/wasm" : "text/javascript";
        project.addUISourceCodeWithProvider(uiSourceCode, originalContentProvider, metadata2, mimeType);
        void this.debuggerWorkspaceBinding.updateLocations(script);
      }
      scriptFile(uiSourceCode) {
        return this.#uiSourceCodeToScriptFile.get(uiSourceCode) || null;
      }
      removeScripts(scripts) {
        const uiSourceCodesByProject = new Multimap2();
        for (const script of scripts) {
          const uiSourceCode = this.#scriptToUISourceCode.get(script);
          if (!uiSourceCode) {
            continue;
          }
          const scriptFile = this.#uiSourceCodeToScriptFile.get(uiSourceCode);
          if (scriptFile) {
            scriptFile.dispose();
          }
          this.#uiSourceCodeToScriptFile.delete(uiSourceCode);
          this.#scriptToUISourceCode.delete(script);
          uiSourceCodesByProject.set(uiSourceCode.project(), uiSourceCode);
          void this.debuggerWorkspaceBinding.updateLocations(script);
        }
        for (const project of uiSourceCodesByProject.keysArray()) {
          const uiSourceCodes = uiSourceCodesByProject.get(project);
          let allInProjectRemoved = true;
          for (const projectSourceCode of project.uiSourceCodes()) {
            if (!uiSourceCodes.has(projectSourceCode)) {
              allInProjectRemoved = false;
              break;
            }
          }
          if (allInProjectRemoved) {
            this.#projects.delete(project.id());
            project.removeProject();
          } else {
            uiSourceCodes.forEach((c) => project.removeUISourceCode(c.url()));
          }
        }
      }
      executionContextDestroyed(event) {
        const executionContext = event.data;
        this.removeScripts(this.debuggerModel.scriptsForExecutionContext(executionContext));
      }
      globalObjectCleared() {
        const scripts = Array.from(this.#scriptToUISourceCode.keys());
        this.removeScripts(scripts);
      }
      resetForTest() {
        this.globalObjectCleared();
      }
      dispose() {
        removeEventListeners(this.#eventListeners);
        this.globalObjectCleared();
      }
    };
    ResourceScriptFile = class extends ObjectWrapper {
      #resourceScriptMapping;
      uiSourceCode;
      script;
      #scriptSource;
      #isDivergingFromVM;
      #hasDivergedFromVM;
      #isMergingToVM;
      #updateMutex = new Mutex2();
      constructor(resourceScriptMapping, uiSourceCode, script) {
        super();
        this.#resourceScriptMapping = resourceScriptMapping;
        this.uiSourceCode = uiSourceCode;
        this.script = this.uiSourceCode.contentType().isScript() ? script : null;
        this.uiSourceCode.addEventListener(Events$2.WorkingCopyChanged, this.workingCopyChanged, this);
        this.uiSourceCode.addEventListener(Events$2.WorkingCopyCommitted, this.workingCopyCommitted, this);
      }
      isDiverged() {
        if (this.uiSourceCode.isDirty()) {
          return true;
        }
        if (!this.script) {
          return false;
        }
        if (typeof this.#scriptSource === "undefined" || this.#scriptSource === null) {
          return false;
        }
        const workingCopy = this.uiSourceCode.workingCopy();
        if (!workingCopy) {
          return false;
        }
        if (!workingCopy.startsWith(this.#scriptSource.trimEnd())) {
          return true;
        }
        const suffix = this.uiSourceCode.workingCopy().substr(this.#scriptSource.length);
        return Boolean(suffix.length) && !suffix.match(sourceURLRegex);
      }
      workingCopyChanged() {
        void this.update();
      }
      workingCopyCommitted() {
        if (hostConfig.devToolsLiveEdit?.enabled === false) {
          return;
        }
        if (this.uiSourceCode.project().canSetFileContent()) {
          return;
        }
        if (!this.script) {
          return;
        }
        const source2 = this.uiSourceCode.workingCopy();
        void this.script.editSource(source2).then(({ status, exceptionDetails }) => {
          void this.scriptSourceWasSet(source2, status, exceptionDetails);
        });
      }
      async scriptSourceWasSet(source2, status, exceptionDetails) {
        if (status === "Ok") {
          this.#scriptSource = source2;
        }
        await this.update();
        if (status === "Ok") {
          return;
        }
        if (!exceptionDetails) {
          Console.instance().addMessage(i18nString$w(UIStrings$L.liveEditFailed, { PH1: getErrorText(status) }), "warning");
          return;
        }
        const messageText = i18nString$w(UIStrings$L.liveEditCompileFailed, { PH1: exceptionDetails.text });
        this.uiSourceCode.addLineMessage("Error", messageText, exceptionDetails.lineNumber, exceptionDetails.columnNumber);
        function getErrorText(status2) {
          switch (status2) {
            case "BlockedByActiveFunction":
              return "Functions that are on the stack (currently being executed) can not be edited";
            case "BlockedByActiveGenerator":
              return "Async functions/generators that are active can not be edited";
            case "BlockedByTopLevelEsModuleChange":
              return "The top-level of ES modules can not be edited";
            case "CompileError":
            case "Ok":
              throw new Error("Compile errors and Ok status must not be reported on the console");
          }
        }
      }
      async update() {
        const release = await this.#updateMutex.acquire();
        const diverged = this.isDiverged();
        if (diverged && !this.#hasDivergedFromVM) {
          await this.divergeFromVM();
        } else if (!diverged && this.#hasDivergedFromVM) {
          await this.mergeToVM();
        }
        release();
      }
      async divergeFromVM() {
        if (this.script) {
          this.#isDivergingFromVM = true;
          await this.#resourceScriptMapping.debuggerWorkspaceBinding.updateLocations(this.script);
          this.#isDivergingFromVM = void 0;
          this.#hasDivergedFromVM = true;
          this.dispatchEventToListeners("DidDivergeFromVM");
        }
      }
      async mergeToVM() {
        if (this.script) {
          this.#hasDivergedFromVM = void 0;
          this.#isMergingToVM = true;
          await this.#resourceScriptMapping.debuggerWorkspaceBinding.updateLocations(this.script);
          this.#isMergingToVM = void 0;
          this.dispatchEventToListeners("DidMergeToVM");
        }
      }
      hasDivergedFromVM() {
        return Boolean(this.#hasDivergedFromVM);
      }
      isDivergingFromVM() {
        return Boolean(this.#isDivergingFromVM);
      }
      isMergingToVM() {
        return Boolean(this.#isMergingToVM);
      }
      checkMapping() {
        if (!this.script || typeof this.#scriptSource !== "undefined") {
          this.mappingCheckedForTest();
          return;
        }
        void this.script.requestContentData().then((content) => {
          this.#scriptSource = ContentData.textOr(content, null);
          void this.update().then(() => this.mappingCheckedForTest());
        });
      }
      mappingCheckedForTest() {
      }
      dispose() {
        this.uiSourceCode.removeEventListener(Events$2.WorkingCopyChanged, this.workingCopyChanged, this);
        this.uiSourceCode.removeEventListener(Events$2.WorkingCopyCommitted, this.workingCopyCommitted, this);
      }
      addSourceMapURL(sourceMapURL) {
        if (!this.script) {
          return;
        }
        this.script.debuggerModel.setSourceMapURL(this.script, sourceMapURL);
      }
      addDebugInfoURL(debugInfoURL) {
        if (!this.script) {
          return;
        }
        const { pluginManager } = DebuggerWorkspaceBinding.instance();
        pluginManager.setDebugInfoURL(this.script, debugInfoURL);
      }
      hasSourceMapURL() {
        return Boolean(this.script?.sourceMapURL);
      }
      async missingSymbolFiles() {
        if (!this.script) {
          return null;
        }
        const { pluginManager } = this.#resourceScriptMapping.debuggerWorkspaceBinding;
        const sources = await pluginManager.getSourcesForScript(this.script);
        return sources && "missingSymbolFiles" in sources ? sources.missingSymbolFiles : null;
      }
    };
    DebuggerWorkspaceBinding = class _DebuggerWorkspaceBinding {
      resourceMapping;
      #debuggerModelToData;
      #liveLocationPromises;
      pluginManager;
      ignoreListManager;
      workspace;
      constructor(resourceMapping, targetManager, ignoreListManager, workspace) {
        this.resourceMapping = resourceMapping;
        this.resourceMapping.debuggerWorkspaceBinding = this;
        this.ignoreListManager = ignoreListManager;
        this.workspace = workspace;
        this.#debuggerModelToData = /* @__PURE__ */ new Map();
        targetManager.observeModels(DebuggerModel, this);
        this.ignoreListManager.addEventListener("IGNORED_SCRIPT_RANGES_UPDATED", (event) => this.updateLocations(event.data));
        this.#liveLocationPromises = /* @__PURE__ */ new Set();
        this.pluginManager = new DebuggerLanguagePluginManager(targetManager, resourceMapping.workspace, this);
      }
      setFunctionRanges(uiSourceCode, ranges) {
        for (const modelData of this.#debuggerModelToData.values()) {
          modelData.compilerMapping.setFunctionRanges(uiSourceCode, ranges);
        }
      }
      static instance(opts = { forceNew: null, resourceMapping: null, targetManager: null, ignoreListManager: null, workspace: null }) {
        const { forceNew, resourceMapping, targetManager, ignoreListManager, workspace } = opts;
        if (forceNew) {
          if (!resourceMapping || !targetManager || !ignoreListManager || !workspace) {
            throw new Error(`Unable to create DebuggerWorkspaceBinding: resourceMapping, targetManager and IgnoreLIstManager must be provided: ${new Error().stack}`);
          }
          globalInstance().set(_DebuggerWorkspaceBinding, new _DebuggerWorkspaceBinding(resourceMapping, targetManager, ignoreListManager, workspace));
        }
        return globalInstance().get(_DebuggerWorkspaceBinding);
      }
      static removeInstance() {
        globalInstance().delete(_DebuggerWorkspaceBinding);
      }
      async computeAutoStepRanges(mode2, callFrame) {
        function contained(location, range2) {
          const { start, end } = range2;
          if (start.scriptId !== location.scriptId) {
            return false;
          }
          if (location.lineNumber < start.lineNumber || location.lineNumber > end.lineNumber) {
            return false;
          }
          if (location.lineNumber === start.lineNumber && location.columnNumber < start.columnNumber) {
            return false;
          }
          if (location.lineNumber === end.lineNumber && location.columnNumber >= end.columnNumber) {
            return false;
          }
          return true;
        }
        const rawLocation = callFrame.location();
        if (!rawLocation) {
          return [];
        }
        const pluginManager = this.pluginManager;
        let ranges = [];
        if (mode2 === "StepOut") {
          return await pluginManager.getInlinedFunctionRanges(rawLocation);
        }
        const uiLocation = await pluginManager.rawLocationToUILocation(rawLocation);
        if (uiLocation) {
          ranges = await pluginManager.uiLocationToRawLocationRanges(uiLocation.uiSourceCode, uiLocation.lineNumber, uiLocation.columnNumber) || [];
          ranges = ranges.filter((range2) => contained(rawLocation, range2));
          if (mode2 === "StepOver") {
            ranges = ranges.concat(await pluginManager.getInlinedCalleesRanges(rawLocation));
          }
          return ranges;
        }
        const compilerMapping = this.#debuggerModelToData.get(rawLocation.debuggerModel)?.compilerMapping;
        if (!compilerMapping) {
          return [];
        }
        ranges = compilerMapping.getLocationRangesForSameSourceLocation(rawLocation);
        ranges = ranges.filter((range2) => contained(rawLocation, range2));
        return ranges;
      }
      modelAdded(debuggerModel) {
        debuggerModel.setBeforePausedCallback(this.shouldPause.bind(this));
        this.#debuggerModelToData.set(debuggerModel, new ModelData2(debuggerModel, this));
        debuggerModel.setComputeAutoStepRangesCallback(this.computeAutoStepRanges.bind(this));
      }
      modelRemoved(debuggerModel) {
        debuggerModel.setComputeAutoStepRangesCallback(null);
        const modelData = this.#debuggerModelToData.get(debuggerModel);
        if (modelData) {
          modelData.dispose();
          this.#debuggerModelToData.delete(debuggerModel);
        }
      }
      async pendingLiveLocationChangesPromise() {
        await Promise.all(this.#liveLocationPromises);
      }
      recordLiveLocationChange(promise) {
        void promise.then(() => {
          this.#liveLocationPromises.delete(promise);
        });
        this.#liveLocationPromises.add(promise);
      }
      async updateLocations(script) {
        const stackTraceUpdatePromise = script.target().model(StackTraceModel)?.scriptInfoChanged(script, this.#translateRawFrames.bind(this));
        if (stackTraceUpdatePromise) {
          this.recordLiveLocationChange(stackTraceUpdatePromise);
        }
        const updatePromises = [stackTraceUpdatePromise];
        const modelData = this.#debuggerModelToData.get(script.debuggerModel);
        if (modelData) {
          const updatePromise = modelData.updateLocations(script);
          this.recordLiveLocationChange(updatePromise);
          updatePromises.push(updatePromise);
        }
        await Promise.all(updatePromises);
      }
      async createStackTraceFromProtocolRuntime(stackTrace, target) {
        const model3 = target.model(StackTraceModel);
        const stackTracePromise = model3.createFromProtocolRuntime(stackTrace, this.#translateRawFrames.bind(this));
        this.recordLiveLocationChange(stackTracePromise);
        return await stackTracePromise;
      }
      async createStackTraceFromDebuggerPaused(pausedDetails, target) {
        const model3 = target.model(StackTraceModel);
        const stackTracePromise = model3.createFromDebuggerPaused(pausedDetails, this.#translateRawFrames.bind(this));
        this.recordLiveLocationChange(stackTracePromise);
        return await stackTracePromise;
      }
      async createLiveLocation(rawLocation, updateDelegate, locationPool) {
        const modelData = this.#debuggerModelToData.get(rawLocation.debuggerModel);
        if (!modelData) {
          return null;
        }
        const liveLocationPromise = modelData.createLiveLocation(rawLocation, updateDelegate, locationPool);
        this.recordLiveLocationChange(liveLocationPromise);
        return await liveLocationPromise;
      }
      async createStackTraceTopFrameLiveLocation(rawLocations, updateDelegate, locationPool) {
        console.assert(rawLocations.length > 0);
        const locationPromise = StackTraceTopFrameLocation.createStackTraceTopFrameLocation(rawLocations, this, updateDelegate, locationPool);
        this.recordLiveLocationChange(locationPromise);
        return await locationPromise;
      }
      async rawLocationToUILocation(rawLocation) {
        const uiLocation = await this.pluginManager.rawLocationToUILocation(rawLocation);
        if (uiLocation) {
          return uiLocation;
        }
        const modelData = this.#debuggerModelToData.get(rawLocation.debuggerModel);
        return modelData ? modelData.rawLocationToUILocation(rawLocation) : null;
      }
      uiSourceCodeForSourceMapSourceURL(debuggerModel, url, isContentScript) {
        const modelData = this.#debuggerModelToData.get(debuggerModel);
        if (!modelData) {
          return null;
        }
        return modelData.compilerMapping.uiSourceCodeForURL(url, isContentScript);
      }
      async uiSourceCodeForSourceMapSourceURLPromise(debuggerModel, url, isContentScript) {
        const uiSourceCode = this.uiSourceCodeForSourceMapSourceURL(debuggerModel, url, isContentScript);
        return await (uiSourceCode || this.waitForUISourceCodeAdded(url, debuggerModel.target()));
      }
      async uiSourceCodeForDebuggerLanguagePluginSourceURLPromise(debuggerModel, url) {
        const uiSourceCode = this.pluginManager.uiSourceCodeForURL(debuggerModel, url);
        return await (uiSourceCode || this.waitForUISourceCodeAdded(url, debuggerModel.target()));
      }
      uiSourceCodeForScript(script) {
        const modelData = this.#debuggerModelToData.get(script.debuggerModel);
        if (!modelData) {
          return null;
        }
        return modelData.uiSourceCodeForScript(script);
      }
      waitForUISourceCodeAdded(url, target) {
        return new Promise((resolve2) => {
          const descriptor = this.workspace.addEventListener(Events$1.UISourceCodeAdded, (event) => {
            const uiSourceCode = event.data;
            if (uiSourceCode.url() === url && NetworkProject.targetForUISourceCode(uiSourceCode) === target) {
              this.workspace.removeEventListener(Events$1.UISourceCodeAdded, descriptor.listener);
              resolve2(uiSourceCode);
            }
          });
        });
      }
      async uiLocationToRawLocations(uiSourceCode, lineNumber, columnNumber) {
        const locations = await this.pluginManager.uiLocationToRawLocations(uiSourceCode, lineNumber, columnNumber);
        if (locations) {
          return locations;
        }
        for (const modelData of this.#debuggerModelToData.values()) {
          const locations2 = modelData.uiLocationToRawLocations(uiSourceCode, lineNumber, columnNumber);
          if (locations2.length) {
            return locations2;
          }
        }
        return [];
      }
      async uiLocationRangeToRawLocationRanges(uiSourceCode, textRange) {
        const ranges = await this.pluginManager.uiLocationRangeToRawLocationRanges(uiSourceCode, textRange);
        if (ranges) {
          return ranges;
        }
        for (const modelData of this.#debuggerModelToData.values()) {
          const ranges2 = modelData.uiLocationRangeToRawLocationRanges(uiSourceCode, textRange);
          if (ranges2) {
            return ranges2;
          }
        }
        return [];
      }
      async functionBoundsAtRawLocation(rawLocation) {
        const modelData = this.#debuggerModelToData.get(rawLocation.debuggerModel);
        return modelData ? await modelData.functionBoundsAtRawLocation(rawLocation) : null;
      }
      async normalizeUILocation(uiLocation) {
        const rawLocations = await this.uiLocationToRawLocations(uiLocation.uiSourceCode, uiLocation.lineNumber, uiLocation.columnNumber);
        for (const location of rawLocations) {
          const uiLocationCandidate = await this.rawLocationToUILocation(location);
          if (uiLocationCandidate) {
            return uiLocationCandidate;
          }
        }
        return uiLocation;
      }
      async getMappedLines(uiSourceCode) {
        for (const modelData of this.#debuggerModelToData.values()) {
          const mappedLines = modelData.getMappedLines(uiSourceCode);
          if (mappedLines !== null) {
            return mappedLines;
          }
        }
        return await this.pluginManager.getMappedLines(uiSourceCode);
      }
      scriptFile(uiSourceCode, debuggerModel) {
        const modelData = this.#debuggerModelToData.get(debuggerModel);
        return modelData ? modelData.getResourceScriptMapping().scriptFile(uiSourceCode) : null;
      }
      scriptsForUISourceCode(uiSourceCode) {
        const scripts = /* @__PURE__ */ new Set();
        this.pluginManager.scriptsForUISourceCode(uiSourceCode).forEach((script) => scripts.add(script));
        for (const modelData of this.#debuggerModelToData.values()) {
          const resourceScriptFile = modelData.getResourceScriptMapping().scriptFile(uiSourceCode);
          if (resourceScriptFile?.script) {
            scripts.add(resourceScriptFile.script);
          }
          modelData.compilerMapping.scriptsForUISourceCode(uiSourceCode).forEach((script) => scripts.add(script));
        }
        return [...scripts];
      }
      supportsConditionalBreakpoints(uiSourceCode) {
        const scripts = this.pluginManager.scriptsForUISourceCode(uiSourceCode);
        return scripts.every((script) => script.isJavaScript());
      }
      resetForTest(target) {
        const debuggerModel = target.model(DebuggerModel);
        const modelData = this.#debuggerModelToData.get(debuggerModel);
        if (modelData) {
          modelData.getResourceScriptMapping().resetForTest();
        }
      }
      removeLiveLocation(location) {
        const modelData = this.#debuggerModelToData.get(location.rawLocation.debuggerModel);
        if (modelData) {
          modelData.disposeLocation(location);
        }
      }
      async shouldPause(debuggerPausedDetails, autoSteppingContext) {
        const { callFrames: [frame] } = debuggerPausedDetails;
        if (!frame) {
          return false;
        }
        const functionLocation = frame.functionLocation();
        if (!autoSteppingContext || debuggerPausedDetails.reason !== "step" || !functionLocation || !frame.script.isWasm() || !moduleSetting("wasm-auto-stepping").get() || !this.pluginManager.hasPluginForScript(frame.script)) {
          return true;
        }
        const uiLocation = await this.pluginManager.rawLocationToUILocation(frame.location());
        if (uiLocation) {
          return true;
        }
        return autoSteppingContext.script() !== functionLocation.script() || autoSteppingContext.columnNumber !== functionLocation.columnNumber || autoSteppingContext.lineNumber !== functionLocation.lineNumber;
      }
      async #translateRawFrames(frames3, target) {
        const rawFrames = frames3.slice(0);
        const translatedFrames = [];
        while (rawFrames.length) {
          await this.#translateRawFramesStep(rawFrames, translatedFrames, target);
        }
        return translatedFrames;
      }
      async #translateRawFramesStep(rawFrames, translatedFrames, target) {
        if (await this.pluginManager.translateRawFramesStep(rawFrames, translatedFrames, target)) {
          return;
        }
        const modelData = this.#debuggerModelToData.get(target.model(DebuggerModel));
        if (modelData) {
          await modelData.translateRawFramesStep(rawFrames, translatedFrames);
          return;
        }
        const frame = rawFrames.shift();
        const { url, lineNumber, columnNumber, functionName: functionName2 } = frame;
        translatedFrames.push([{ url, line: lineNumber, column: columnNumber, name: functionName2 }]);
      }
    };
    ModelData2 = class {
      #debuggerModel;
      #debuggerWorkspaceBinding;
      #defaultMapping;
      #resourceMapping;
      #resourceScriptMapping;
      compilerMapping;
      #locations;
      constructor(debuggerModel, debuggerWorkspaceBinding) {
        this.#debuggerModel = debuggerModel;
        this.#debuggerWorkspaceBinding = debuggerWorkspaceBinding;
        const { workspace } = debuggerWorkspaceBinding.resourceMapping;
        this.#defaultMapping = new DefaultScriptMapping(debuggerModel, workspace, debuggerWorkspaceBinding);
        this.#resourceMapping = debuggerWorkspaceBinding.resourceMapping;
        this.#resourceScriptMapping = new ResourceScriptMapping(debuggerModel, workspace, debuggerWorkspaceBinding);
        this.compilerMapping = new CompilerScriptMapping(debuggerModel, workspace, debuggerWorkspaceBinding);
        this.#locations = new Multimap2();
      }
      async createLiveLocation(rawLocation, updateDelegate, locationPool) {
        console.assert(rawLocation.scriptId !== "");
        const scriptId = rawLocation.scriptId;
        const location = new Location2(scriptId, rawLocation, this.#debuggerWorkspaceBinding, updateDelegate, locationPool);
        this.#locations.set(scriptId, location);
        await location.update();
        return location;
      }
      disposeLocation(location) {
        this.#locations.delete(location.scriptId, location);
      }
      async updateLocations(script) {
        const promises2 = [];
        for (const location of this.#locations.get(script.scriptId)) {
          promises2.push(location.update());
        }
        await Promise.all(promises2);
      }
      rawLocationToUILocation(rawLocation) {
        let uiLocation = this.compilerMapping.rawLocationToUILocation(rawLocation);
        uiLocation = uiLocation || this.#resourceScriptMapping.rawLocationToUILocation(rawLocation);
        uiLocation = uiLocation || this.#resourceMapping.jsLocationToUILocation(rawLocation);
        uiLocation = uiLocation || this.#defaultMapping.rawLocationToUILocation(rawLocation);
        return uiLocation;
      }
      uiSourceCodeForScript(script) {
        let uiSourceCode = null;
        uiSourceCode = uiSourceCode || this.#resourceScriptMapping.uiSourceCodeForScript(script);
        uiSourceCode = uiSourceCode || this.#resourceMapping.uiSourceCodeForScript(script);
        uiSourceCode = uiSourceCode || this.#defaultMapping.uiSourceCodeForScript(script);
        return uiSourceCode;
      }
      uiLocationToRawLocations(uiSourceCode, lineNumber, columnNumber = 0) {
        let locations = this.compilerMapping.uiLocationToRawLocations(uiSourceCode, lineNumber, columnNumber);
        locations = locations.length ? locations : this.#resourceScriptMapping.uiLocationToRawLocations(uiSourceCode, lineNumber, columnNumber);
        locations = locations.length ? locations : this.#resourceMapping.uiLocationToJSLocations(uiSourceCode, lineNumber, columnNumber);
        locations = locations.length ? locations : this.#defaultMapping.uiLocationToRawLocations(uiSourceCode, lineNumber, columnNumber);
        return locations;
      }
      uiLocationRangeToRawLocationRanges(uiSourceCode, textRange) {
        let ranges = this.compilerMapping.uiLocationRangeToRawLocationRanges(uiSourceCode, textRange);
        ranges ??= this.#resourceScriptMapping.uiLocationRangeToRawLocationRanges(uiSourceCode, textRange);
        ranges ??= this.#resourceMapping.uiLocationRangeToJSLocationRanges(uiSourceCode, textRange);
        ranges ??= this.#defaultMapping.uiLocationRangeToRawLocationRanges(uiSourceCode, textRange);
        return ranges;
      }
      async functionBoundsAtRawLocation(rawLocation) {
        let scope2 = null;
        scope2 = scope2 || await this.compilerMapping.functionBoundsAtRawLocation(rawLocation);
        scope2 = scope2 || await this.#resourceScriptMapping.functionBoundsAtRawLocation(rawLocation);
        scope2 = scope2 || await this.#resourceMapping.functionBoundsAtRawLocation(rawLocation);
        return scope2;
      }
      async translateRawFramesStep(rawFrames, translatedFrames) {
        if (!await this.compilerMapping.translateRawFramesStep(rawFrames, translatedFrames)) {
          this.#defaultTranslateRawFramesStep(rawFrames, translatedFrames);
        }
      }
      #defaultTranslateRawFramesStep(rawFrames, translatedFrames) {
        const frame = rawFrames.shift();
        const { scriptId, url, lineNumber, columnNumber, functionName: functionName2 } = frame;
        const rawLocation = scriptId ? this.#debuggerModel.createRawLocationByScriptId(scriptId, lineNumber, columnNumber) : url ? this.#debuggerModel.createRawLocationByURL(url, lineNumber, columnNumber) : null;
        if (rawLocation) {
          const uiLocation = this.rawLocationToUILocation(rawLocation);
          if (uiLocation) {
            translatedFrames.push([{
              uiSourceCode: uiLocation.uiSourceCode,
              name: functionName2,
              line: uiLocation.lineNumber,
              column: uiLocation.columnNumber ?? -1
            }]);
            return;
          }
        }
        translatedFrames.push([{ url, line: lineNumber, column: columnNumber, name: functionName2 }]);
      }
      getMappedLines(uiSourceCode) {
        const mappedLines = this.compilerMapping.getMappedLines(uiSourceCode);
        return mappedLines;
      }
      dispose() {
        this.#debuggerModel.setBeforePausedCallback(null);
        this.compilerMapping.dispose();
        this.#resourceScriptMapping.dispose();
        this.#defaultMapping.dispose();
      }
      getResourceScriptMapping() {
        return this.#resourceScriptMapping;
      }
    };
    Location2 = class extends LiveLocationWithPool {
      scriptId;
      rawLocation;
      #binding;
      constructor(scriptId, rawLocation, binding, updateDelegate, locationPool) {
        super(updateDelegate, locationPool);
        this.scriptId = scriptId;
        this.rawLocation = rawLocation;
        this.#binding = binding;
      }
      async uiLocation() {
        const debuggerModelLocation = this.rawLocation;
        return await this.#binding.rawLocationToUILocation(debuggerModelLocation);
      }
      dispose() {
        super.dispose();
        this.#binding.removeLiveLocation(this);
      }
    };
    StackTraceTopFrameLocation = class _StackTraceTopFrameLocation extends LiveLocationWithPool {
      #updateScheduled;
      #current;
      #locations;
      constructor(updateDelegate, locationPool) {
        super(updateDelegate, locationPool);
        this.#updateScheduled = true;
        this.#current = null;
        this.#locations = null;
      }
      static async createStackTraceTopFrameLocation(rawLocations, binding, updateDelegate, locationPool) {
        const location = new _StackTraceTopFrameLocation(updateDelegate, locationPool);
        const locationsPromises = rawLocations.map((rawLocation) => binding.createLiveLocation(rawLocation, location.scheduleUpdate.bind(location), locationPool));
        location.#locations = (await Promise.all(locationsPromises)).filter((l) => !!l);
        await location.updateLocation();
        return location;
      }
      async uiLocation() {
        return this.#current ? await this.#current.uiLocation() : null;
      }
      dispose() {
        super.dispose();
        if (this.#locations) {
          for (const location of this.#locations) {
            location.dispose();
          }
        }
        this.#locations = null;
        this.#current = null;
      }
      async scheduleUpdate() {
        if (this.#updateScheduled) {
          return;
        }
        this.#updateScheduled = true;
        queueMicrotask(() => {
          void this.updateLocation();
        });
      }
      async updateLocation() {
        this.#updateScheduled = false;
        if (!this.#locations || this.#locations.length === 0) {
          return;
        }
        this.#current = this.#locations[0];
        for (const location of this.#locations) {
          const uiLocation = await location.uiLocation();
          if (!uiLocation?.isIgnoreListed()) {
            this.#current = location;
            break;
          }
        }
        void this.update();
      }
    };
    PresentationSourceFrameMessageManager = class {
      #targetToMessageHelperMap = /* @__PURE__ */ new WeakMap();
      constructor() {
        TargetManager3.instance().observeModels(DebuggerModel, this);
        TargetManager3.instance().observeModels(CSSModel, this);
      }
      modelAdded(model3) {
        const target = model3.target();
        const helper = this.#targetToMessageHelperMap.get(target) ?? new PresentationSourceFrameMessageHelper();
        if (model3 instanceof DebuggerModel) {
          helper.setDebuggerModel(model3);
        } else {
          helper.setCSSModel(model3);
        }
        this.#targetToMessageHelperMap.set(target, helper);
      }
      modelRemoved(model3) {
        const target = model3.target();
        const helper = this.#targetToMessageHelperMap.get(target);
        helper?.clear();
      }
      addMessage(message, source2, target) {
        const helper = this.#targetToMessageHelperMap.get(target);
        void helper?.addMessage(message, source2);
      }
      clear() {
        for (const target of TargetManager3.instance().targets()) {
          const helper = this.#targetToMessageHelperMap.get(target);
          helper?.clear();
        }
      }
    };
    PresentationSourceFrameMessageHelper = class {
      #debuggerModel;
      #cssModel;
      #presentationMessages = /* @__PURE__ */ new Map();
      #locationPool;
      constructor() {
        this.#locationPool = new LiveLocationPool();
        WorkspaceImpl.instance().addEventListener(Events$1.UISourceCodeAdded, this.#uiSourceCodeAdded.bind(this));
      }
      setDebuggerModel(debuggerModel) {
        if (this.#debuggerModel) {
          throw new Error("Cannot set DebuggerModel twice");
        }
        this.#debuggerModel = debuggerModel;
        debuggerModel.addEventListener(Events$5.ParsedScriptSource, (event) => {
          queueMicrotask(() => {
            this.#parsedScriptSource(event);
          });
        });
        debuggerModel.addEventListener(Events$5.GlobalObjectCleared, this.#debuggerReset, this);
      }
      setCSSModel(cssModel) {
        if (this.#cssModel) {
          throw new Error("Cannot set CSSModel twice");
        }
        this.#cssModel = cssModel;
        cssModel.addEventListener(Events$a.StyleSheetAdded, (event) => queueMicrotask(() => this.#styleSheetAdded(event)));
      }
      async addMessage(message, source2) {
        const presentation = new PresentationSourceFrameMessage(message, this.#locationPool);
        const location = this.#rawLocation(source2) ?? this.#cssLocation(source2) ?? this.#uiLocation(source2);
        if (location) {
          await presentation.updateLocationSource(location);
        }
        if (source2.url) {
          let messages = this.#presentationMessages.get(source2.url);
          if (!messages) {
            messages = [];
            this.#presentationMessages.set(source2.url, messages);
          }
          messages.push({ source: source2, presentation });
        }
      }
      #uiLocation(source2) {
        if (!source2.url) {
          return null;
        }
        const uiSourceCode = WorkspaceImpl.instance().uiSourceCodeForURL(source2.url);
        if (!uiSourceCode) {
          return null;
        }
        return new UILocation(uiSourceCode, source2.line, source2.column);
      }
      #cssLocation(source2) {
        if (!this.#cssModel || !source2.url) {
          return null;
        }
        const locations = this.#cssModel.createRawLocationsByURL(source2.url, source2.line, source2.column);
        return locations[0] ?? null;
      }
      #rawLocation(source2) {
        if (!this.#debuggerModel) {
          return null;
        }
        if (source2.scriptId) {
          return this.#debuggerModel.createRawLocationByScriptId(source2.scriptId, source2.line, source2.column);
        }
        const callFrame = source2.stackTrace?.callFrames ? source2.stackTrace.callFrames[0] : null;
        if (callFrame) {
          return this.#debuggerModel.createRawLocationByScriptId(callFrame.scriptId, callFrame.lineNumber, callFrame.columnNumber);
        }
        if (source2.url) {
          return this.#debuggerModel.createRawLocationByURL(source2.url, source2.line, source2.column);
        }
        return null;
      }
      #parsedScriptSource(event) {
        const script = event.data;
        const messages = this.#presentationMessages.get(script.sourceURL);
        const promises2 = [];
        for (const { presentation, source: source2 } of messages ?? []) {
          const rawLocation = this.#rawLocation(source2);
          if (rawLocation && script.scriptId === rawLocation.scriptId) {
            promises2.push(presentation.updateLocationSource(rawLocation));
          }
        }
        void Promise.all(promises2).then(this.parsedScriptSourceForTest.bind(this));
      }
      parsedScriptSourceForTest() {
      }
      #uiSourceCodeAdded(event) {
        const uiSourceCode = event.data;
        const messages = this.#presentationMessages.get(uiSourceCode.url());
        const promises2 = [];
        for (const { presentation, source: source2 } of messages ?? []) {
          promises2.push(presentation.updateLocationSource(new UILocation(uiSourceCode, source2.line, source2.column)));
        }
        void Promise.all(promises2).then(this.uiSourceCodeAddedForTest.bind(this));
      }
      uiSourceCodeAddedForTest() {
      }
      #styleSheetAdded(event) {
        const header = event.data;
        const messages = this.#presentationMessages.get(header.sourceURL);
        const promises2 = [];
        for (const { source: source2, presentation } of messages ?? []) {
          if (header.containsLocation(source2.line, source2.column)) {
            promises2.push(presentation.updateLocationSource(new CSSLocation(header, source2.line, source2.column)));
          }
        }
        void Promise.all(promises2).then(this.styleSheetAddedForTest.bind(this));
      }
      styleSheetAddedForTest() {
      }
      clear() {
        this.#debuggerReset();
      }
      #debuggerReset() {
        const presentations = Array.from(this.#presentationMessages.values()).flat();
        for (const { presentation } of presentations) {
          presentation.dispose();
        }
        this.#presentationMessages.clear();
        this.#locationPool.disposeAll();
      }
    };
    FrozenLiveLocation = class extends LiveLocationWithPool {
      #uiLocation;
      constructor(uiLocation, updateDelegate, locationPool) {
        super(updateDelegate, locationPool);
        this.#uiLocation = uiLocation;
      }
      async uiLocation() {
        return this.#uiLocation;
      }
    };
    PresentationSourceFrameMessage = class {
      #uiSourceCode;
      #liveLocation;
      #locationPool;
      #message;
      constructor(message, locationPool) {
        this.#message = message;
        this.#locationPool = locationPool;
      }
      async updateLocationSource(source2) {
        if (source2 instanceof Location$1) {
          await DebuggerWorkspaceBinding.instance().createLiveLocation(source2, this.#updateLocation.bind(this), this.#locationPool);
        } else if (source2 instanceof CSSLocation) {
          await CSSWorkspaceBinding.instance().createLiveLocation(source2, this.#updateLocation.bind(this), this.#locationPool);
        } else if (source2 instanceof UILocation) {
          if (!this.#liveLocation) {
            this.#liveLocation = new FrozenLiveLocation(source2, this.#updateLocation.bind(this), this.#locationPool);
            await this.#liveLocation.update();
          }
        }
      }
      async #updateLocation(liveLocation) {
        if (this.#uiSourceCode) {
          this.#uiSourceCode.removeMessage(this.#message);
        }
        if (liveLocation !== this.#liveLocation) {
          this.#uiSourceCode?.removeMessage(this.#message);
          this.#liveLocation?.dispose();
          this.#liveLocation = liveLocation;
        }
        const uiLocation = await liveLocation.uiLocation();
        if (!uiLocation) {
          return;
        }
        this.#message.range = TextRange.createFromLocation(uiLocation.lineNumber, uiLocation.columnNumber || 0);
        this.#uiSourceCode = uiLocation.uiSourceCode;
        this.#uiSourceCode.addMessage(this.#message);
      }
      dispose() {
        this.#uiSourceCode?.removeMessage(this.#message);
        this.#liveLocation?.dispose();
      }
    };
    styleSheetRangeMap = /* @__PURE__ */ new WeakMap();
    scriptRangeMap = /* @__PURE__ */ new WeakMap();
    boundUISourceCodes = /* @__PURE__ */ new WeakSet();
    ResourceMapping = class {
      workspace;
      #modelToInfo = /* @__PURE__ */ new Map();
      #debuggerWorkspaceBinding = null;
      #cssWorkspaceBinding = null;
      constructor(targetManager, workspace) {
        this.workspace = workspace;
        targetManager.observeModels(ResourceTreeModel, this);
      }
      get debuggerWorkspaceBinding() {
        return this.#debuggerWorkspaceBinding;
      }
      set debuggerWorkspaceBinding(debuggerWorkspaceBinding) {
        if (this.#debuggerWorkspaceBinding) {
          throw new Error("DebuggerWorkspaceBinding already set");
        }
        this.#debuggerWorkspaceBinding = debuggerWorkspaceBinding;
      }
      get cssWorkspaceBinding() {
        return this.#cssWorkspaceBinding;
      }
      set cssWorkspaceBinding(cssWorkspaceBinding) {
        if (this.#cssWorkspaceBinding) {
          throw new Error("CSSWorkspaceBinding already set");
        }
        this.#cssWorkspaceBinding = cssWorkspaceBinding;
      }
      modelAdded(resourceTreeModel) {
        const info = new ModelInfo2(this, resourceTreeModel);
        this.#modelToInfo.set(resourceTreeModel, info);
      }
      modelRemoved(resourceTreeModel) {
        const info = this.#modelToInfo.get(resourceTreeModel);
        if (info) {
          info.dispose();
          this.#modelToInfo.delete(resourceTreeModel);
        }
      }
      infoForTarget(target) {
        const resourceTreeModel = target.model(ResourceTreeModel);
        return resourceTreeModel ? this.#modelToInfo.get(resourceTreeModel) || null : null;
      }
      uiSourceCodeForScript(script) {
        const info = this.infoForTarget(script.debuggerModel.target());
        if (!info) {
          return null;
        }
        const project = info.getProject();
        const uiSourceCode = project.uiSourceCodeForURL(script.sourceURL);
        return uiSourceCode;
      }
      cssLocationToUILocation(cssLocation) {
        const header = cssLocation.header();
        if (!header) {
          return null;
        }
        const info = this.infoForTarget(cssLocation.cssModel().target());
        if (!info) {
          return null;
        }
        const uiSourceCode = info.getProject().uiSourceCodeForURL(cssLocation.url);
        if (!uiSourceCode) {
          return null;
        }
        const offset = styleSheetRangeMap.get(header) ?? computeStyleSheetRange(header);
        const lineNumber = cssLocation.lineNumber + offset.startLine - header.startLine;
        let columnNumber = cssLocation.columnNumber;
        if (cssLocation.lineNumber === header.startLine) {
          columnNumber += offset.startColumn - header.startColumn;
        }
        return uiSourceCode.uiLocation(lineNumber, columnNumber);
      }
      jsLocationToUILocation(jsLocation) {
        const script = jsLocation.script();
        if (!script) {
          return null;
        }
        const info = this.infoForTarget(jsLocation.debuggerModel.target());
        if (!info) {
          return null;
        }
        const embedderName = script.embedderName();
        if (!embedderName) {
          return null;
        }
        const uiSourceCode = info.getProject().uiSourceCodeForURL(embedderName);
        if (!uiSourceCode) {
          return null;
        }
        const { startLine, startColumn } = scriptRangeMap.get(script) ?? computeScriptRange(script);
        let { lineNumber, columnNumber } = jsLocation;
        if (lineNumber === script.lineOffset) {
          columnNumber += startColumn - script.columnOffset;
        }
        lineNumber += startLine - script.lineOffset;
        if (script.hasSourceURL) {
          if (lineNumber === 0) {
            columnNumber += script.columnOffset;
          }
          lineNumber += script.lineOffset;
        }
        return uiSourceCode.uiLocation(lineNumber, columnNumber);
      }
      uiLocationToJSLocations(uiSourceCode, lineNumber, columnNumber) {
        if (!boundUISourceCodes.has(uiSourceCode)) {
          return [];
        }
        const target = NetworkProject.targetForUISourceCode(uiSourceCode);
        if (!target) {
          return [];
        }
        const debuggerModel = target.model(DebuggerModel);
        if (!debuggerModel) {
          return [];
        }
        const locations = [];
        for (const script of debuggerModel.scripts()) {
          if (script.embedderName() !== uiSourceCode.url()) {
            continue;
          }
          const range2 = scriptRangeMap.get(script) ?? computeScriptRange(script);
          if (!range2.containsLocation(lineNumber, columnNumber)) {
            continue;
          }
          let scriptLineNumber = lineNumber;
          let scriptColumnNumber = columnNumber;
          if (script.hasSourceURL) {
            scriptLineNumber -= range2.startLine;
            if (scriptLineNumber === 0) {
              scriptColumnNumber -= range2.startColumn;
            }
          }
          locations.push(debuggerModel.createRawLocation(script, scriptLineNumber, scriptColumnNumber));
        }
        return locations;
      }
      uiLocationRangeToJSLocationRanges(uiSourceCode, textRange) {
        if (!boundUISourceCodes.has(uiSourceCode)) {
          return null;
        }
        const target = NetworkProject.targetForUISourceCode(uiSourceCode);
        if (!target) {
          return null;
        }
        const debuggerModel = target.model(DebuggerModel);
        if (!debuggerModel) {
          return null;
        }
        const ranges = [];
        for (const script of debuggerModel.scripts()) {
          if (script.embedderName() !== uiSourceCode.url()) {
            continue;
          }
          const scriptTextRange = scriptRangeMap.get(script) ?? computeScriptRange(script);
          const range2 = scriptTextRange.intersection(textRange);
          if (range2.isEmpty()) {
            continue;
          }
          let { startLine, startColumn, endLine, endColumn } = range2;
          if (script.hasSourceURL) {
            startLine -= range2.startLine;
            if (startLine === 0) {
              startColumn -= range2.startColumn;
            }
            endLine -= range2.startLine;
            if (endLine === 0) {
              endColumn -= range2.startColumn;
            }
          }
          const start = debuggerModel.createRawLocation(script, startLine, startColumn);
          const end = debuggerModel.createRawLocation(script, endLine, endColumn);
          ranges.push({ start, end });
        }
        return ranges;
      }
      getMappedLines(uiSourceCode) {
        if (!boundUISourceCodes.has(uiSourceCode)) {
          return null;
        }
        const target = NetworkProject.targetForUISourceCode(uiSourceCode);
        if (!target) {
          return null;
        }
        const debuggerModel = target.model(DebuggerModel);
        if (!debuggerModel) {
          return null;
        }
        const mappedLines = /* @__PURE__ */ new Set();
        for (const script of debuggerModel.scripts()) {
          if (script.embedderName() !== uiSourceCode.url()) {
            continue;
          }
          const { startLine, endLine } = scriptRangeMap.get(script) ?? computeScriptRange(script);
          for (let line = startLine; line <= endLine; ++line) {
            mappedLines.add(line);
          }
        }
        return mappedLines;
      }
      uiLocationToCSSLocations(uiLocation) {
        if (!boundUISourceCodes.has(uiLocation.uiSourceCode)) {
          return [];
        }
        const target = NetworkProject.targetForUISourceCode(uiLocation.uiSourceCode);
        if (!target) {
          return [];
        }
        const cssModel = target.model(CSSModel);
        if (!cssModel) {
          return [];
        }
        return cssModel.createRawLocationsByURL(uiLocation.uiSourceCode.url(), uiLocation.lineNumber, uiLocation.columnNumber);
      }
      async functionBoundsAtRawLocation(rawLocation) {
        const script = rawLocation.script();
        if (!script) {
          return null;
        }
        const info = this.infoForTarget(script.debuggerModel.target());
        if (!info) {
          return null;
        }
        const embedderName = script.embedderName();
        if (!embedderName) {
          return null;
        }
        const uiSourceCode = info.getProject().uiSourceCodeForURL(embedderName);
        if (!uiSourceCode) {
          return null;
        }
        let { lineNumber, columnNumber } = rawLocation;
        lineNumber -= script.lineOffset;
        if (lineNumber === 0) {
          columnNumber -= script.columnOffset;
        }
        const scopeTreeAndText = script ? await scopeTreeForScript(script) : null;
        if (!scopeTreeAndText) {
          return null;
        }
        const offset = scopeTreeAndText.text.offsetFromPosition(lineNumber, columnNumber);
        const results = [];
        (function walk(nodes) {
          for (const node2 of nodes) {
            if (!(offset >= node2.start && offset < node2.end)) {
              continue;
            }
            results.push(node2);
            walk(node2.children);
          }
        })([scopeTreeAndText.scopeTree]);
        const result = results.findLast((node2) => node2.kind === 2 || node2.kind === 4);
        if (!result) {
          return null;
        }
        const startPosition = scopeTreeAndText.text.positionFromOffset(result.start);
        const endPosition = scopeTreeAndText.text.positionFromOffset(result.end);
        startPosition.lineNumber += script.lineOffset;
        if (startPosition.lineNumber === script.lineOffset) {
          startPosition.columnNumber += script.columnOffset;
        }
        endPosition.lineNumber += script.lineOffset;
        if (endPosition.lineNumber === script.lineOffset) {
          endPosition.columnNumber += script.columnOffset;
        }
        const name = "";
        const range2 = new TextRange(startPosition.lineNumber, startPosition.columnNumber, endPosition.lineNumber, endPosition.columnNumber);
        return new UIFunctionBounds(uiSourceCode, range2, name);
      }
      resetForTest(target) {
        const resourceTreeModel = target.model(ResourceTreeModel);
        const info = resourceTreeModel ? this.#modelToInfo.get(resourceTreeModel) : null;
        if (info) {
          info.resetForTest();
        }
      }
    };
    ModelInfo2 = class {
      project;
      #bindings = /* @__PURE__ */ new Map();
      #cssModel;
      #eventListeners;
      resourceMapping;
      constructor(resourceMapping, resourceTreeModel) {
        const target = resourceTreeModel.target();
        this.resourceMapping = resourceMapping;
        this.project = new ContentProviderBasedProject(resourceMapping.workspace, "resources:" + target.id(), projectTypes.Network, "", false);
        NetworkProject.setTargetForProject(this.project, target);
        const cssModel = target.model(CSSModel);
        console.assert(Boolean(cssModel));
        this.#cssModel = cssModel;
        for (const frame of resourceTreeModel.frames()) {
          for (const resource of frame.getResourcesMap().values()) {
            this.addResource(resource);
          }
        }
        this.#eventListeners = [
          resourceTreeModel.addEventListener(Events$6.ResourceAdded, this.resourceAdded, this),
          resourceTreeModel.addEventListener(Events$6.FrameWillNavigate, this.frameWillNavigate, this),
          resourceTreeModel.addEventListener(Events$6.FrameDetached, this.frameDetached, this),
          this.#cssModel.addEventListener(Events$a.StyleSheetChanged, (event) => {
            void this.styleSheetChanged(event);
          }, this)
        ];
      }
      async styleSheetChanged(event) {
        const header = this.#cssModel.styleSheetHeaderForId(event.data.styleSheetId);
        if (!header || !header.isInline || header.isInline && header.isMutable) {
          return;
        }
        const binding = this.#bindings.get(header.resourceURL());
        if (!binding) {
          return;
        }
        await binding.styleSheetChanged(header, event.data.edit || null);
      }
      acceptsResource(resource) {
        const resourceType = resource.resourceType();
        if (resourceType !== resourceTypes.Image && resourceType !== resourceTypes.Font && resourceType !== resourceTypes.Document && resourceType !== resourceTypes.Manifest && resourceType !== resourceTypes.Fetch && resourceType !== resourceTypes.XHR) {
          return false;
        }
        if (resourceType === resourceTypes.Image && resource.mimeType && !resource.mimeType.startsWith("image")) {
          return false;
        }
        if (resourceType === resourceTypes.Font && resource.mimeType && !resource.mimeType.includes("font")) {
          return false;
        }
        if ((resourceType === resourceTypes.Image || resourceType === resourceTypes.Font) && schemeIs2(resource.contentURL(), "data:")) {
          return false;
        }
        return true;
      }
      resourceAdded(event) {
        this.addResource(event.data);
      }
      addResource(resource) {
        if (!this.acceptsResource(resource)) {
          return;
        }
        let binding = this.#bindings.get(resource.url);
        if (!binding) {
          binding = new Binding3(this, resource);
          this.#bindings.set(resource.url, binding);
        } else {
          binding.addResource(resource);
        }
      }
      removeFrameResources(frame) {
        for (const resource of frame.resources()) {
          if (!this.acceptsResource(resource)) {
            continue;
          }
          const binding = this.#bindings.get(resource.url);
          if (!binding) {
            continue;
          }
          if (binding.resources.size === 1) {
            binding.dispose();
            this.#bindings.delete(resource.url);
          } else {
            binding.removeResource(resource);
          }
        }
      }
      frameWillNavigate(event) {
        this.removeFrameResources(event.data);
      }
      frameDetached(event) {
        this.removeFrameResources(event.data.frame);
      }
      resetForTest() {
        for (const binding of this.#bindings.values()) {
          binding.dispose();
        }
        this.#bindings.clear();
      }
      dispose() {
        removeEventListeners(this.#eventListeners);
        for (const binding of this.#bindings.values()) {
          binding.dispose();
        }
        this.#bindings.clear();
        this.project.removeProject();
      }
      getProject() {
        return this.project;
      }
    };
    Binding3 = class {
      resources;
      #project;
      #uiSourceCode;
      #edits = [];
      #debuggerWorkspaceBinding;
      #cssWorkspaceBinding;
      constructor(modelInfo, resource) {
        this.resources = /* @__PURE__ */ new Set([resource]);
        this.#project = modelInfo.project;
        this.#debuggerWorkspaceBinding = modelInfo.resourceMapping.debuggerWorkspaceBinding;
        this.#cssWorkspaceBinding = modelInfo.resourceMapping.cssWorkspaceBinding;
        this.#uiSourceCode = this.#project.createUISourceCode(resource.url, resource.contentType());
        boundUISourceCodes.add(this.#uiSourceCode);
        if (resource.frameId) {
          NetworkProject.setInitialFrameAttribution(this.#uiSourceCode, resource.frameId);
        }
        this.#project.addUISourceCodeWithProvider(this.#uiSourceCode, this, resourceMetadata(resource), resource.mimeType);
        void Promise.all([
          ...this.inlineScripts().map((script) => this.#debuggerWorkspaceBinding?.updateLocations(script)),
          ...this.inlineStyles().map((style) => this.#cssWorkspaceBinding?.updateLocations(style))
        ]);
      }
      inlineStyles() {
        const target = NetworkProject.targetForUISourceCode(this.#uiSourceCode);
        const stylesheets = [];
        if (!target) {
          return stylesheets;
        }
        const cssModel = target.model(CSSModel);
        if (cssModel) {
          for (const headerId of cssModel.getStyleSheetIdsForURL(this.#uiSourceCode.url())) {
            const header = cssModel.styleSheetHeaderForId(headerId);
            if (header) {
              stylesheets.push(header);
            }
          }
        }
        return stylesheets;
      }
      inlineScripts() {
        const target = NetworkProject.targetForUISourceCode(this.#uiSourceCode);
        if (!target) {
          return [];
        }
        const debuggerModel = target.model(DebuggerModel);
        if (!debuggerModel) {
          return [];
        }
        return debuggerModel.scripts().filter((script) => script.embedderName() === this.#uiSourceCode.url());
      }
      async styleSheetChanged(stylesheet, edit2) {
        this.#edits.push({ stylesheet, edit: edit2 });
        if (this.#edits.length > 1) {
          return;
        }
        const content = await this.#uiSourceCode.requestContentData();
        if (!ContentData.isError(content)) {
          await this.innerStyleSheetChanged(content.text);
        }
        this.#edits = [];
      }
      async innerStyleSheetChanged(content) {
        const scripts = this.inlineScripts();
        const styles2 = this.inlineStyles();
        let text = new Text(content);
        for (const data32 of this.#edits) {
          const edit2 = data32.edit;
          if (!edit2) {
            continue;
          }
          const stylesheet = data32.stylesheet;
          const startLocation = styleSheetRangeMap.get(stylesheet) ?? computeStyleSheetRange(stylesheet);
          const oldRange = edit2.oldRange.relativeFrom(startLocation.startLine, startLocation.startColumn);
          const newRange = edit2.newRange.relativeFrom(startLocation.startLine, startLocation.startColumn);
          text = new Text(text.replaceRange(oldRange, edit2.newText));
          const updatePromises = [];
          for (const script of scripts) {
            const range2 = scriptRangeMap.get(script) ?? computeScriptRange(script);
            if (!range2.follows(oldRange)) {
              continue;
            }
            scriptRangeMap.set(script, range2.rebaseAfterTextEdit(oldRange, newRange));
            updatePromises.push(this.#debuggerWorkspaceBinding?.updateLocations(script));
          }
          for (const style of styles2) {
            const range2 = styleSheetRangeMap.get(style) ?? computeStyleSheetRange(style);
            if (!range2.follows(oldRange)) {
              continue;
            }
            styleSheetRangeMap.set(style, range2.rebaseAfterTextEdit(oldRange, newRange));
            updatePromises.push(this.#cssWorkspaceBinding?.updateLocations(style));
          }
          await Promise.all(updatePromises);
        }
        this.#uiSourceCode.addRevision(text.value());
      }
      addResource(resource) {
        this.resources.add(resource);
        if (resource.frameId) {
          NetworkProject.addFrameAttribution(this.#uiSourceCode, resource.frameId);
        }
      }
      removeResource(resource) {
        this.resources.delete(resource);
        if (resource.frameId) {
          NetworkProject.removeFrameAttribution(this.#uiSourceCode, resource.frameId);
        }
      }
      dispose() {
        this.#project.removeUISourceCode(this.#uiSourceCode.url());
        void Promise.all([
          ...this.inlineScripts().map((script) => this.#debuggerWorkspaceBinding?.updateLocations(script)),
          ...this.inlineStyles().map((style) => this.#cssWorkspaceBinding?.updateLocations(style))
        ]);
      }
      firstResource() {
        console.assert(this.resources.size > 0);
        return this.resources.values().next().value;
      }
      contentURL() {
        return this.firstResource().contentURL();
      }
      contentType() {
        return this.firstResource().contentType();
      }
      requestContentData() {
        return this.firstResource().requestContentData();
      }
      searchInContent(query, caseSensitive, isRegex) {
        return this.firstResource().searchInContent(query, caseSensitive, isRegex);
      }
    };
    Universe = class {
      context = new DevToolsContext();
      constructor(options2) {
        const settings = Settings.instance({
          forceNew: true,
          ...options2.settingsCreationOptions
        });
        const targetManager = new TargetManager3(this.context, options2.overrideAutoStartModels);
        this.context.set(TargetManager3, targetManager);
        const multitargetNetworkManager = new MultitargetNetworkManager(targetManager);
        this.context.set(MultitargetNetworkManager, multitargetNetworkManager);
        const pageResourceLoader = new PageResourceLoader(targetManager, settings, multitargetNetworkManager, null);
        this.context.set(PageResourceLoader, pageResourceLoader);
        const workspace = new WorkspaceImpl();
        this.context.set(WorkspaceImpl, workspace);
        const ignoreListManager = new IgnoreListManager(settings, targetManager);
        this.context.set(IgnoreListManager, ignoreListManager);
        const resourceMapping = new ResourceMapping(targetManager, workspace);
        const cssWorkspaceBinding = new CSSWorkspaceBinding(resourceMapping, targetManager);
        this.context.set(CSSWorkspaceBinding, cssWorkspaceBinding);
        const debuggerWorkspaceBinding = new DebuggerWorkspaceBinding(resourceMapping, targetManager, ignoreListManager, workspace);
        this.context.set(DebuggerWorkspaceBinding, debuggerWorkspaceBinding);
      }
    };
    Universe$1 = /* @__PURE__ */ Object.freeze({
      __proto__: null,
      Universe
    });
    foundation = /* @__PURE__ */ Object.freeze({
      __proto__: null,
      Universe: Universe$1
    });
    protocol = /* @__PURE__ */ Object.freeze({
      __proto__: null
    });
    __getOwnPropNames3 = Object.getOwnPropertyNames;
    __commonJS2 = (cb, mod2) => function __require2() {
      return mod2 || (0, cb[__getOwnPropNames3(cb)[0]])((mod2 = { exports: {} }).exports, mod2), mod2.exports;
    };
    require_create_entity_finder_api2 = __commonJS2({
      "package/lib/create-entity-finder-api.js"(exports$1, module2) {
        var DOMAIN_IN_URL_REGEX = /:\/\/(\S*?)(:\d+)?(\/|$)/;
        var DOMAIN_CHARACTERS = /([a-z0-9.-]+\.[a-z0-9]+|localhost)/i;
        var IP_REGEX = /^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/;
        var ROOT_DOMAIN_REGEX = /[^.]+\.([^.]+|(gov|com|co|ne)\.\w{2})$/i;
        function getDomainFromOriginOrURL(originOrURL) {
          if (typeof originOrURL !== "string")
            return null;
          if (originOrURL.length > 1e4 || originOrURL.startsWith("data:"))
            return null;
          if (DOMAIN_IN_URL_REGEX.test(originOrURL))
            return originOrURL.match(DOMAIN_IN_URL_REGEX)[1];
          if (DOMAIN_CHARACTERS.test(originOrURL))
            return originOrURL.match(DOMAIN_CHARACTERS)[0];
          return null;
        }
        function getRootDomain(originOrURL) {
          const domain = getDomainFromOriginOrURL(originOrURL);
          if (!domain)
            return null;
          if (IP_REGEX.test(domain))
            return domain;
          const match = domain.match(ROOT_DOMAIN_REGEX);
          return match && match[0] || domain;
        }
        function sliceSubdomainFromDomain(domain, rootDomain) {
          if (domain.length <= rootDomain.length)
            return domain;
          return domain.split(".").slice(1).join(".");
        }
        function getEntityInDataset(entityByDomain, entityBySubDomain, entityByRootDomain, originOrURL) {
          const domain = getDomainFromOriginOrURL(originOrURL);
          const rootDomain = getRootDomain(domain);
          if (!domain || !rootDomain)
            return void 0;
          if (entityByDomain.has(domain))
            return entityByDomain.get(domain);
          for (let subdomain = domain; subdomain.length > rootDomain.length; subdomain = sliceSubdomainFromDomain(subdomain, rootDomain)) {
            if (entityBySubDomain.has(subdomain))
              return entityBySubDomain.get(subdomain);
          }
          if (entityByRootDomain.has(rootDomain))
            return entityByRootDomain.get(rootDomain);
          return void 0;
        }
        function getProductInDataset(entityByDomain, entityBySubDomain, entityByRootDomain, originOrURL) {
          const entity = getEntityInDataset(entityByDomain, entityBySubDomain, entityByRootDomain, originOrURL);
          const products = entity && entity.products;
          if (!products)
            return void 0;
          if (typeof originOrURL !== "string")
            return void 0;
          for (const product of products) {
            for (const pattern2 of product.urlPatterns) {
              if (pattern2 instanceof RegExp && pattern2.test(originOrURL))
                return product;
              if (typeof pattern2 === "string" && originOrURL.includes(pattern2))
                return product;
            }
          }
          return void 0;
        }
        function cloneEntities(entities) {
          return entities.map((entity_) => {
            const entity = {
              company: entity_.name,
              categories: [entity_.category],
              ...entity_
            };
            const products = (entity_.products || []).map((product) => ({
              company: entity.company,
              category: entity.category,
              categories: [entity.category],
              facades: [],
              ...product,
              urlPatterns: (product.urlPatterns || []).map((s) => s.startsWith("REGEXP:") ? new RegExp(s.slice("REGEXP:".length)) : s)
            }));
            entity.products = products;
            return entity;
          });
        }
        function createAPIFromDataset(entities_) {
          const entities = cloneEntities(entities_);
          const entityByDomain = /* @__PURE__ */ new Map();
          const entityByRootDomain = /* @__PURE__ */ new Map();
          const entityBySubDomain = /* @__PURE__ */ new Map();
          for (const entity of entities) {
            entity.totalExecutionTime = Number(entity.totalExecutionTime) || 0;
            entity.totalOccurrences = Number(entity.totalOccurrences) || 0;
            entity.averageExecutionTime = entity.totalExecutionTime / entity.totalOccurrences;
            for (const domain of entity.domains) {
              if (entityByDomain.has(domain)) {
                const duplicate = entityByDomain.get(domain);
                throw new Error(`Duplicate domain ${domain} (${entity.name} and ${duplicate.name})`);
              }
              entityByDomain.set(domain, entity);
              const rootDomain = getRootDomain(domain);
              if (domain.startsWith("*.")) {
                const wildcardDomain = domain.slice(2);
                if (wildcardDomain === rootDomain)
                  entityByRootDomain.set(rootDomain, entity);
                else
                  entityBySubDomain.set(wildcardDomain, entity);
              }
            }
          }
          for (const [rootDomain, entity] of entityByRootDomain.entries()) {
            if (!entity)
              entityByRootDomain.delete(rootDomain);
          }
          const getEntity = getEntityInDataset.bind(null, entityByDomain, entityBySubDomain, entityByRootDomain);
          const getProduct = getProductInDataset.bind(null, entityByDomain, entityBySubDomain, entityByRootDomain);
          return { getEntity, getProduct, getRootDomain, entities };
        }
        module2.exports = { createAPIFromDataset };
      }
    });
    require_entities_nostats = __commonJS2({
      "package/dist/entities-nostats.json"(exports$1, module2) {
        module2.exports = [{ name: "Google/Doubleclick Ads", company: "Google", homepage: "https://marketingplatform.google.com/about/enterprise/", category: "ad", domains: ["adservice.google.com", "adservice.google.com.au", "adservice.google.com.sg", "adservice.google.com.br", "adservice.google.com.ua", "adservice.google.co.uk", "adservice.google.co.jp", "adservice.google.co.in", "adservice.google.co.kr", "adservice.google.co.id", "adservice.google.co.nz", "adservice.google.ie", "adservice.google.se", "adservice.google.de", "adservice.google.ca", "adservice.google.be", "adservice.google.es", "adservice.google.ch", "adservice.google.fr", "adservice.google.nl", "*.googleadservices.com", "*.googlesyndication.com", "*.googletagservices.com", "*.2mdn.net", "*.doubleclick.net"] }, { name: "Facebook", homepage: "https://www.facebook.com", category: "social", domains: ["*.facebook.com", "*.atlassbx.com", "*.fbsbx.com", "fbcdn-photos-e-a.akamaihd.net", "*.facebook.net", "*.fbcdn.net"], products: [{ name: "Facebook Messenger Customer Chat", urlPatterns: ["REGEXP:connect\\.facebook\\.net\\/.*\\/sdk\\/xfbml\\.customerchat\\.js"], facades: [{ name: "React Live Chat Loader", repo: "https://github.com/calibreapp/react-live-chat-loader" }] }] }, { name: "Instagram", homepage: "https://www.instagram.com", category: "social", domains: ["*.cdninstagram.com", "*.instagram.com"] }, { name: "Google CDN", company: "Google", homepage: "https://developers.google.com/speed/libraries/", category: "cdn", domains: ["ajax.googleapis.com", "commondatastorage.googleapis.com", "www.gstatic.com", "ssl.gstatic.com"] }, { name: "Google Maps", company: "Google", homepage: "https://www.google.com/maps", category: "utility", domains: ["maps.google.com", "maps-api-ssl.google.com", "maps.googleapis.com", "mts.googleapis.com", "mt.googleapis.com", "mt0.googleapis.com", "mt1.googleapis.com", "mt2.googleapis.com", "mt3.googleapis.com", "khm0.googleapis.com", "khm1.googleapis.com", "khms.googleapis.com", "khms1.googleapis.com", "khms2.googleapis.com", "maps.gstatic.com"] }, { name: "Other Google APIs/SDKs", company: "Google", homepage: "https://developers.google.com/apis-explorer/#p/", category: "utility", domains: ["accounts.google.com", "apis.google.com", "calendar.google.com", "clients2.google.com", "cse.google.com", "news.google.com", "pay.google.com", "payments.google.com", "play.google.com", "smartlock.google.com", "www.google.com", "www.google.de", "www.google.co.jp", "www.google.com.au", "www.google.co.uk", "www.google.ie", "www.google.com.sg", "www.google.co.in", "www.google.com.br", "www.google.ca", "www.google.co.kr", "www.google.co.nz", "www.google.co.id", "www.google.fr", "www.google.be", "www.google.com.ua", "www.google.nl", "www.google.ru", "www.google.se", "www.googleapis.com", "imasdk.googleapis.com", "storage.googleapis.com", "translate.googleapis.com", "translate.google.com", "translate-pa.googleapis.com", "lh3.googleusercontent.com", "jnn-pa.googleapis.com", "csi.gstatic.com"] }, { name: "Firebase", homepage: "https://developers.google.com/apis-explorer/#p/", category: "utility", domains: ["firebasestorage.googleapis.com", "firestore.googleapis.com", "firebaseinstallations.googleapis.com", "firebase.googleapis.com", "firebaseremoteconfig.googleapis.com"] }, { name: "Google Analytics", company: "Google", homepage: "https://marketingplatform.google.com/about/analytics/", category: "analytics", domains: ["*.google-analytics.com", "*.urchin.com", "analytics.google.com"] }, { name: "Google Optimize", company: "Google", homepage: "https://marketingplatform.google.com/about/optimize/", category: "analytics", domains: ["www.googleoptimize.com"] }, { name: "Google AMP", company: "Google", homepage: "https://github.com/google/amp-client-id-library", category: "analytics", domains: ["ampcid.google.com"] }, { name: "Google Tag Manager", company: "Google", homepage: "https://marketingplatform.google.com/about/tag-manager/", category: "tag-manager", domains: ["*.googletagmanager.com"] }, { name: "Google Fonts", company: "Google", homepage: "https://fonts.google.com/", category: "cdn", domains: ["fonts.googleapis.com", "fonts.gstatic.com"] }, { name: "Adobe TypeKit", company: "Adobe", homepage: "https://fonts.adobe.com/", category: "cdn", domains: ["*.typekit.com", "*.typekit.net"] }, { name: "YouTube", homepage: "https://youtube.com", category: "video", domains: ["*.youtube.com", "*.ggpht.com", "*.youtube-nocookie.com", "*.ytimg.com"], products: [{ name: "YouTube Embedded Player", urlPatterns: ["youtube.com/embed/"], facades: [{ name: "Lite YouTube", repo: "https://github.com/paulirish/lite-youtube-embed" }, { name: "Ngx Lite Video", repo: "https://github.com/karim-mamdouh/ngx-lite-video" }] }] }, { name: "Twitter", homepage: "https://twitter.com", category: "social", domains: ["*.vine.co", "*.twimg.com", "*.twitpic.com", "platform.twitter.com", "syndication.twitter.com"] }, { name: "AddThis", homepage: "https://www.addthis.com/", category: "social", domains: ["*.addthis.com", "*.addthiscdn.com", "*.addthisedge.com"] }, { name: "AddToAny", homepage: "https://www.addtoany.com/", category: "social", domains: ["*.addtoany.com"] }, { name: "Akamai", homepage: "https://www.akamai.com/", category: "cdn", domains: ["23.62.3.183", "*.akamaitechnologies.com", "*.akamaitechnologies.fr", "*.akamai.net", "*.akamaiedge.net", "*.akamaihd.net", "*.akamaized.net", "*.edgefcs.net", "*.edgekey.net", "edgesuite.net", "*.srip.net"] }, { name: "Blogger", homepage: "https://www.blogger.com/", category: "hosting", domains: ["*.blogblog.com", "*.blogger.com", "*.blogspot.com", "images-blogger-opensocial.googleusercontent.com"] }, { name: "Gravatar", homepage: "https://en.gravatar.com/", category: "social", domains: ["*.gravatar.com"] }, { name: "Yandex Metrica", company: "Yandex", homepage: "https://metrica.yandex.com/about?", category: "analytics", domains: ["mc.yandex.ru", "mc.yandex.com", "d31j93rd8oukbv.cloudfront.net"] }, { name: "Hotjar", homepage: "https://www.hotjar.com/", category: "analytics", domains: ["*.hotjar.com", "*.hotjar.io"] }, { name: "Baidu Analytics", homepage: "https://tongji.baidu.com/web/welcome/login", category: "analytics", domains: ["hm.baidu.com", "hmcdn.baidu.com"] }, { name: "Insider", homepage: "", category: "analytics", domains: ["*.useinsider.com"] }, { name: "Adobe Experience Cloud", company: "Adobe", homepage: "", category: "analytics", domains: ["*.2o7.net", "du8783wkf05yr.cloudfront.net", "*.hitbox.com", "*.imageg.net", "*.nedstat.com", "*.omtrdc.net"] }, { name: "Adobe Tag Manager", company: "Adobe", homepage: "https://www.adobe.com/experience-platform/", category: "tag-manager", domains: ["*.adobedtm.com", "*.demdex.net", "*.everesttech.net", "sstats.adobe.com", "hbrt.adobe.com"] }, { name: "jQuery CDN", homepage: "https://code.jquery.com/", category: "cdn", domains: ["*.jquery.com"] }, { name: "Cloudflare CDN", homepage: "https://cdnjs.com/", category: "cdn", domains: ["cdnjs.cloudflare.com", "amp.cloudflare.com"] }, { name: "Cloudflare", homepage: "https://www.cloudflare.com/website-optimization/", category: "utility", domains: ["ajax.cloudflare.com", "*.nel.cloudflare.com", "static.cloudflareinsights.com"] }, { name: "WordPress", company: "Automattic", homepage: "https://wp.com/", category: "hosting", domains: ["*.wordpress.com", "s0.wp.com", "s2.wp.com", "*.w.org", "c0.wp.com", "s1.wp.com", "i0.wp.com", "i1.wp.com", "i2.wp.com", "widgets.wp.com"] }, { name: "WordPress Site Stats", company: "Automattic", homepage: "https://wp.com/", category: "analytics", domains: ["pixel.wp.com", "stats.wp.com"] }, { name: "Hatena Blog", homepage: "https://hatenablog.com/", category: "hosting", domains: ["*.st-hatena.com", "*.hatena.ne.jp"] }, { name: "Shopify", homepage: "https://www.shopify.com/", category: "hosting", domains: ["*.shopify.com", "*.shopifyapps.com", "*.shopifycdn.com", "*.shopifysvc.com"] }, { name: "Dealer", homepage: "https://www.dealer.com/", category: "hosting", domains: ["*.dealer.com"] }, { name: "PIXNET", homepage: "https://www.pixnet.net/", category: "social", domains: ["*.pixfs.net", "*.pixnet.net"] }, { name: "Moat", homepage: "https://moat.com/", category: "ad", domains: ["*.moatads.com", "*.moatpixel.com"] }, { name: "33 Across", homepage: "https://33across.com/", category: "ad", domains: ["*.33across.com"] }, { name: "OpenX", homepage: "https://www.openx.com/", category: "ad", domains: ["*.deliverimp.com", "*.openxadexchange.com", "*.servedbyopenx.com", "*.jump-time.net", "*.openx.net", "*.openxcdn.net"] }, { name: "Amazon Ads", homepage: "https://ad.amazon.com/", category: "ad", domains: ["*.amazon-adsystem.com"] }, { name: "Rubicon Project", homepage: "https://rubiconproject.com/", category: "ad", domains: ["*.rubiconproject.com", "*.chango.com", "*.fimserve.com"] }, { name: "The Trade Desk", homepage: "https://www.thetradedesk.com/", category: "ad", domains: ["*.adsrvr.org", "d1eoo1tco6rr5e.cloudfront.net"] }, { name: "Bidswitch", homepage: "https://www.bidswitch.com/", category: "ad", domains: ["*.bidswitch.net"] }, { name: "LiveRamp IdentityLink", homepage: "https://liveramp.com/discover-identitylink/", category: "analytics", domains: ["*.circulate.com", "*.rlcdn.com"] }, { name: "Drawbridge", homepage: "https://www.drawbridge.com/", category: "ad", domains: ["*.adsymptotic.com"] }, { name: "AOL / Oath / Verizon Media", homepage: "https://www.oath.com/", category: "ad", domains: ["*.advertising.com", "*.aol.com", "*.aolcdn.com", "*.blogsmithmedia.com", "*.oath.com", "*.aol.net", "*.tacoda.net", "*.aol.co.uk"] }, { name: "Xaxis", homepage: "https://www.xaxis.com/", category: "ad", domains: ["*.247realmedia.com", "*.mookie1.com", "*.gmads.net"] }, { name: "Freshdesk", company: "Freshworks", homepage: "https://freshdesk.com/", category: "customer-success", domains: ["d36mpcpuzc4ztk.cloudfront.net"] }, { name: "Help Scout", homepage: "https://www.helpscout.net/", category: "customer-success", domains: ["djtflbt20bdde.cloudfront.net", "*.helpscout.net"], products: [{ name: "Help Scout Beacon", urlPatterns: ["beacon-v2.helpscout.net"], facades: [{ name: "React Live Chat Loader", repo: "https://github.com/calibreapp/react-live-chat-loader" }] }] }, { name: "Alexa", homepage: "https://www.alexa.com/", category: "analytics", domains: ["*.alexametrics.com", "d31qbv1cthcecs.cloudfront.net"] }, { name: "OneSignal", homepage: "https://onesignal.com/", category: "utility", domains: ["*.onesignal.com"] }, { name: "Lucky Orange", homepage: "https://www.luckyorange.com/", category: "analytics", domains: ["*.luckyorange.com", "d10lpsik1i8c69.cloudfront.net", "*.luckyorange.net"] }, { name: "Crazy Egg", homepage: "https://www.crazyegg.com/", category: "analytics", domains: ["*.cetrk.com", "*.crazyegg.com", "dnn506yrbagrg.cloudfront.net"] }, { name: "Hello Bar", homepage: "https://www.hellobar.com/", category: "marketing", domains: ["*.hellobar.com"] }, { name: "Yandex Ads", company: "Yandex", homepage: "https://yandex.com/adv/", category: "ad", domains: ["an.yandex.ru"] }, { name: "Salesforce", homepage: "https://www.salesforce.com/products/marketing-cloud/", category: "analytics", domains: ["*.krxd.net"] }, { name: "Salesforce Commerce Cloud", homepage: "https://www.salesforce.com/products/commerce-cloud/overview/", category: "hosting", domains: ["*.cquotient.com", "*.demandware.net", "demandware.edgesuite.net"] }, { name: "Optimizely", homepage: "https://www.optimizely.com/", category: "analytics", domains: ["*.optimizely.com"] }, { name: "LiveChat", homepage: "https://www.livechat.com/", category: "customer-success", domains: ["*.livechatinc.com", "*.livechat.com", "*.livechat-static.com"] }, { name: "VK", homepage: "https://vk.com/", category: "social", domains: ["*.vk.com"] }, { name: "Tumblr", homepage: "https://tumblr.com/", category: "social", domains: ["*.tumblr.com"] }, { name: "Wistia", homepage: "https://wistia.com/", category: "video", domains: ["*.wistia.com", "embedwistia-a.akamaihd.net", "*.wistia.net"] }, { name: "Brightcove", homepage: "https://www.brightcove.com/en/", category: "video", domains: ["*.brightcove.com", "*.brightcove.net", "*.zencdn.net"] }, { name: "JSDelivr CDN", homepage: "https://www.jsdelivr.com/", category: "cdn", domains: ["*.jsdelivr.net"] }, { name: "Sumo", homepage: "https://sumo.com/", category: "marketing", domains: ["*.sumo.com", "*.sumome.com", "sumo.b-cdn.net"] }, { name: "Vimeo", homepage: "https://vimeo.com/", category: "video", domains: ["*.vimeo.com", "*.vimeocdn.com"], products: [{ name: "Vimeo Embedded Player", urlPatterns: ["player.vimeo.com/video/"], facades: [{ name: "Lite Vimeo", repo: "https://github.com/slightlyoff/lite-vimeo" }, { name: "Lite Vimeo Embed", repo: "https://github.com/luwes/lite-vimeo-embed" }, { name: "Ngx Lite Video", repo: "https://github.com/karim-mamdouh/ngx-lite-video" }] }] }, { name: "Disqus", homepage: "https://disqus.com/", category: "social", domains: ["*.disqus.com", "*.disquscdn.com"] }, { name: "Yandex APIs", company: "Yandex", homepage: "https://yandex.ru/", category: "utility", domains: ["api-maps.yandex.ru", "money.yandex.ru"] }, { name: "Yandex CDN", company: "Yandex", homepage: "https://yandex.ru/", category: "cdn", domains: ["*.yandex.st", "*.yastatic.net"] }, { name: "Integral Ad Science", homepage: "https://integralads.com/uk/", category: "ad", domains: ["*.adsafeprotected.com", "*.iasds01.com"] }, { name: "Tealium", homepage: "https://tealium.com/", category: "tag-manager", domains: ["*.aniview.com", "*.delvenetworks.com", "*.limelight.com", "*.tiqcdn.com", "*.llnwd.net", "*.tealiumiq.com"] }, { name: "Pubmatic", homepage: "https://pubmatic.com/", category: "ad", domains: ["*.pubmatic.com"] }, { name: "Olark", homepage: "https://www.olark.com/", category: "customer-success", domains: ["*.olark.com"] }, { name: "Tawk.to", homepage: "https://www.tawk.to/", category: "customer-success", domains: ["*.tawk.to"] }, { name: "OptinMonster", homepage: "https://optinmonster.com/", category: "marketing", domains: ["*.opmnstr.com", "*.optmnstr.com", "*.optmstr.com"] }, { name: "ZenDesk", homepage: "https://zendesk.com/", category: "customer-success", domains: ["*.zdassets.com", "*.zendesk.com", "*.zopim.com"] }, { name: "Pusher", homepage: "https://pusher.com/", category: "utility", domains: ["*.pusher.com", "*.pusherapp.com"] }, { name: "Drift", homepage: "https://www.drift.com/", category: "marketing", domains: ["*.drift.com", "*.driftt.com"], products: [{ name: "Drift Live Chat", urlPatterns: ["REGEXP:js\\.driftt\\.com\\/include\\/.*\\/.*\\.js"], facades: [{ name: "React Live Chat Loader", repo: "https://github.com/calibreapp/react-live-chat-loader" }] }] }, { name: "Sentry", homepage: "https://sentry.io/", category: "utility", domains: ["*.getsentry.com", "*.ravenjs.com", "*.sentry-cdn.com", "*.sentry.io"] }, { name: "Amazon Web Services", homepage: "https://aws.amazon.com/s3/", category: "other", domains: ["*.amazon.com", "*.amazonaws.com", "*.amazonwebapps.com", "*.amazonwebservices.com", "*.elasticbeanstalk.com", "*.images-amazon.com", "*.amazon.co.uk"] }, { name: "Amazon Pay", homepage: "https://pay.amazon.com", category: "utility", domains: ["payments.amazon.com", "*.payments-amazon.com"] }, { name: "Media.net", homepage: "https://www.media.net/", category: "ad", domains: ["*.media.net", "*.mnet-ad.net"] }, { name: "Yahoo!", homepage: "https://www.yahoo.com/", category: "ad", domains: ["*.bluelithium.com", "*.hostingprod.com", "*.lexity.com", "*.yahoo.com", "*.yahooapis.com", "*.yimg.com", "*.zenfs.com", "*.yahoo.net"] }, { name: "Adroll", homepage: "https://www.adroll.com/", category: "ad", domains: ["*.adroll.com"] }, { name: "Twitch", homepage: "https://twitch.tv/", category: "video", domains: ["*.twitch.tv"] }, { name: "Taboola", homepage: "https://www.taboola.com/", category: "ad", domains: ["*.taboola.com", "*.taboolasyndication.com"] }, { name: "Sizmek", homepage: "https://www.sizmek.com/", category: "ad", domains: ["*.serving-sys.com", "*.peer39.net"] }, { name: "Scorecard Research", homepage: "https://www.scorecardresearch.com/", category: "ad", domains: ["*.scorecardresearch.com"] }, { name: "Criteo", homepage: "https://www.criteo.com/", category: "ad", domains: ["*.criteo.com", "*.emailretargeting.com", "*.criteo.net"] }, { name: "Segment", homepage: "https://segment.com/", category: "analytics", domains: ["*.segment.com", "*.segment.io"] }, { name: "ShareThis", homepage: "https://www.sharethis.com/", category: "social", domains: ["*.sharethis.com"] }, { name: "Distil Networks", homepage: "https://www.distilnetworks.com/", category: "utility", domains: ["*.areyouahuman.com"] }, { name: "Connexity", homepage: "https://connexity.com/", category: "analytics", domains: ["*.connexity.net"] }, { name: "Popads", homepage: "https://www.popads.net/", category: "ad", domains: ["*.popads.net"] }, { name: "CreateJS CDN", homepage: "https://code.createjs.com/", category: "cdn", domains: ["*.createjs.com"] }, { name: "Squarespace", homepage: "https://www.squarespace.com/", category: "hosting", domains: ["*.squarespace.com"] }, { name: "Media Math", homepage: "https://www.mediamath.com/", category: "ad", domains: ["*.mathads.com", "*.mathtag.com"] }, { name: "Mixpanel", homepage: "https://mixpanel.com/", category: "analytics", domains: ["*.mixpanel.com", "*.mxpnl.com"] }, { name: "FontAwesome CDN", homepage: "https://fontawesome.com/", category: "cdn", domains: ["*.fontawesome.com"] }, { name: "Hubspot", homepage: "https://hubspot.com/", category: "marketing", domains: ["*.hs-scripts.com", "*.hubspot.com", "*.leadin.com", "*.hs-analytics.net", "*.hscollectedforms.net", "*.hscta.net", "*.hsforms.net", "*.hsleadflows.net", "*.hsstatic.net", "*.hubspot.net", "*.hsforms.com", "*.hs-banner.com", "*.hs-embed-reporting.com", "*.hs-growth-metrics.com", "*.hs-data.com", "*.hsadspixel.net", "*.hubapi.com"] }, { name: "Mailchimp", homepage: "https://mailchimp.com/", category: "marketing", domains: ["*.chimpstatic.com", "*.list-manage.com", "*.mailchimp.com"] }, { name: "MGID", homepage: "https://www.mgid.com/", category: "ad", domains: ["*.mgid.com", "*.dt07.net"] }, { name: "Stripe", homepage: "https://stripe.com", category: "utility", domains: ["*.stripe.com", "*.stripecdn.com", "*.stripe.network"] }, { name: "PayPal", homepage: "https://paypal.com", category: "utility", domains: ["*.paypal.com", "*.paypalobjects.com"] }, { name: "Market GID", homepage: "https://www.marketgid.com/", category: "ad", domains: ["*.marketgid.com"] }, { name: "Pinterest", homepage: "https://pinterest.com/", category: "social", domains: ["*.pinimg.com", "*.pinterest.com"] }, { name: "New Relic", homepage: "https://newrelic.com/", category: "utility", domains: ["*.newrelic.com", "*.nr-data.net"] }, { name: "AppDynamics", homepage: "https://www.appdynamics.com/", category: "utility", domains: ["*.appdynamics.com", "*.eum-appdynamics.com", "d3tjaysgumg9lf.cloudfront.net"] }, { name: "Parking Crew", homepage: "https://parkingcrew.net/", category: "other", domains: ["d1lxhc4jvstzrp.cloudfront.net", "*.parkingcrew.net"] }, { name: "WordAds", company: "Automattic", homepage: "https://wordads.co/", category: "ad", domains: ["*.pubmine.com"] }, { name: "AppNexus", homepage: "https://www.appnexus.com/", category: "ad", domains: ["*.adnxs.com", "*.ctasnet.com", "*.adrdgt.com"] }, { name: "Histats", homepage: "https://www.histats.com/", category: "analytics", domains: ["*.histats.com"] }, { name: "DoubleVerify", homepage: "https://www.doubleverify.com/", category: "ad", domains: ["*.doubleverify.com", "*.dvtps.com", "*.iqfp1.com"] }, { name: "Mediavine", homepage: "https://www.mediavine.com/", category: "ad", domains: ["*.mediavine.com"] }, { name: "Wix", homepage: "https://www.wix.com/", category: "hosting", domains: ["*.parastorage.com", "*.wix.com", "*.wixstatic.com", "*.wixapps.net"] }, { name: "Webflow", homepage: "https://webflow.com/", category: "hosting", domains: ["*.uploads-ssl.webflow.com", "*.assets-global.website-files.com", "*.assets.website-files.com"] }, { name: "Weebly", homepage: "https://www.weebly.com/", category: "hosting", domains: ["*.editmysite.com"] }, { name: "LinkedIn", homepage: "https://www.linkedin.com/", category: "social", domains: ["*.bizographics.com", "platform.linkedin.com", "*.slideshare.com", "*.slidesharecdn.com", "*.oribi.io"] }, { name: "LinkedIn Ads", category: "ad", domains: ["*.licdn.com", "*.ads.linkedin.com", "ads.linkedin.com", "www.linkedin.com"] }, { name: "Vox Media", homepage: "https://www.voxmedia.com/", category: "content", domains: ["*.vox-cdn.com", "*.voxmedia.com"] }, { name: "Hotmart", homepage: "https://www.hotmart.com/", category: "content", domains: ["*.hotmart.com"] }, { name: "SoundCloud", homepage: "https://www.soundcloud.com/", category: "content", domains: ["*.sndcdn.com", "*.soundcloud.com", "*.stratus.sc"] }, { name: "Spotify", homepage: "https://www.spotify.com/", category: "content", domains: ["*.scdn.co", "*.spotify.com"] }, { name: "AMP", homepage: "https://amp.dev/", category: "content", domains: ["*.ampproject.org"] }, { name: "Beeketing", homepage: "https://beeketing.com/", category: "marketing", domains: ["*.beeketing.com"] }, { name: "Albacross", homepage: "https://albacross.com/", category: "marketing", domains: ["*.albacross.com"] }, { name: "TrafficJunky", homepage: "https://www.trafficjunky.com/", category: "ad", domains: ["*.contentabc.com", "*.trafficjunky.net"] }, { name: "Bootstrap CDN", homepage: "https://www.bootstrapcdn.com/", category: "cdn", domains: ["*.bootstrapcdn.com"] }, { name: "Shareaholic", homepage: "https://www.shareaholic.com/", category: "social", domains: ["*.shareaholic.com", "dsms0mj1bbhn4.cloudfront.net"] }, { name: "Snowplow", homepage: "https://snowplowanalytics.com/", category: "analytics", domains: ["d32hwlnfiv2gyn.cloudfront.net"] }, { name: "RD Station", homepage: "https://www.rdstation.com/en/", category: "marketing", domains: ["d335luupugsy2.cloudfront.net"] }, { name: "Jivochat", homepage: "https://www.jivochat.com/", category: "customer-success", domains: ["*.jivosite.com"] }, { name: "Listrak", homepage: "https://www.listrak.com/", category: "marketing", domains: ["*.listrak.com", "*.listrakbi.com"] }, { name: "Ontame", homepage: "https://www.ontame.io", category: "analytics", domains: ["*.ontame.io"] }, { name: "Ipify", homepage: "https://www.ipify.org", category: "utility", domains: ["*.ipify.org"] }, { name: "Ensighten", homepage: "https://www.ensighten.com/", category: "tag-manager", domains: ["*.ensighten.com"] }, { name: "EpiServer", homepage: "https://www.episerver.com", category: "content", domains: ["*.episerver.net"] }, { name: "mPulse", homepage: "https://developer.akamai.com/akamai-mpulse", category: "analytics", domains: ["*.akstat.io", "*.go-mpulse.net", "*.mpulse.net", "*.mpstat.us"] }, { name: "Pingdom RUM", homepage: "https://www.pingdom.com/product/performance-monitoring/", category: "analytics", domains: ["*.pingdom.net"] }, { name: "SpeedCurve RUM", company: "SpeedCurve", homepage: "https://www.speedcurve.com/features/performance-monitoring/", category: "analytics", domains: ["*.speedcurve.com"] }, { name: "Radar", company: "Cedexis", homepage: "https://www.cedexis.com/radar/", category: "analytics", domains: ["*.cedexis-test.com", "*.cedexis.com", "*.cmdolb.com", "cedexis.leasewebcdn.com", "*.cedexis-radar.net", "*.cedexis.net", "cedexis-test01.insnw.net", "cedexisakamaitest.azureedge.net", "cedexispub.cdnetworks.net", "cs600.wac.alphacdn.net", "cs600.wpc.edgecastdns.net", "global2.cmdolb.com", "img-cedexis.mncdn.com", "a-cedexis.msedge.net", "zn3vgszfh.fastestcdn.net"] }, { name: "Byside", homepage: "https://byside.com", category: "analytics", domains: ["*.byside.com"] }, { name: "VWO", homepage: "https://vwo.com", category: "analytics", domains: ["*.vwo.com", "*.visualwebsiteoptimizer.com", "d5phz18u4wuww.cloudfront.net", "*.wingify.com"] }, { name: "Bing Ads", homepage: "https://bingads.microsoft.com", category: "ad", domains: ["*.bing.com", "*.microsoft.com", "*.msn.com", "*.s-msft.com", "*.s-msn.com", "*.msads.net", "*.msecnd.net"] }, { name: "GoSquared", homepage: "https://www.gosquared.com", category: "analytics", domains: ["*.gosquared.com", "d1l6p2sc9645hc.cloudfront.net"] }, { name: "Usabilla", homepage: "https://usabilla.com", category: "analytics", domains: ["*.usabilla.com", "d6tizftlrpuof.cloudfront.net"] }, { name: "Fastly Insights", homepage: "https://insights.fastlylabs.com", category: "analytics", domains: ["*.fastly-insights.com"] }, { name: "Visual IQ", homepage: "https://www.visualiq.com", category: "analytics", domains: ["*.myvisualiq.net"] }, { name: "Snapchat", homepage: "https://www.snapchat.com", category: "analytics", domains: ["*.snapchat.com", "*.sc-static.net"] }, { name: "Atlas Solutions", homepage: "https://atlassolutions.com", category: "analytics", domains: ["*.atdmt.com"] }, { name: "Quantcast", homepage: "https://www.quantcast.com", category: "analytics", domains: ["*.brtstats.com", "*.quantcount.com", "*.quantserve.com", "*.semantictec.com", "*.ntv.io"] }, { name: "Spiceworks", homepage: "https://www.spiceworks.com", category: "analytics", domains: ["*.spiceworks.com"] }, { name: "Marketo", homepage: "https://www.marketo.com", category: "analytics", domains: ["*.marketo.com", "*.mktoresp.com", "*.marketo.net"] }, { name: "Intercom", homepage: "https://www.intercom.com", category: "customer-success", domains: ["*.intercomcdn.com", "*.intercom.io"], products: [{ name: "Intercom Widget", urlPatterns: ["widget.intercom.io", "js.intercomcdn.com/shim.latest.js"], facades: [{ name: "React Live Chat Loader", repo: "https://github.com/calibreapp/react-live-chat-loader" }, { name: "Intercom Facade", repo: "https://github.com/danielbachhuber/intercom-facade/" }] }] }, { name: "Unpkg", homepage: "https://unpkg.com", category: "cdn", domains: ["*.unpkg.com", "*.npmcdn.com"] }, { name: "ReadSpeaker", homepage: "https://www.readspeaker.com", category: "other", domains: ["*.readspeaker.com"] }, { name: "Browsealoud", homepage: "https://www.texthelp.com/en-gb/products/browsealoud/", category: "other", domains: ["*.browsealoud.com", "*.texthelp.com"] }, { name: "15gifts", category: "customer-success", domains: ["*.15gifts.com", "*.primefuse.com"] }, { name: "1xRUN", category: "utility", domains: ["*.1xrun.com"] }, { name: "2AdPro Media Solutions", category: "ad", domains: ["*.2adpro.com"] }, { name: "301 Digital Media", category: "content", domains: ["*.301ads.com", "*.301network.com"] }, { name: "360 picnic platform", company: "MediaV", category: "ad", domains: ["*.mediav.com"] }, { name: "365 Media Group", category: "content", domains: ["*.365dm.com"] }, { name: "365 Tech Services", category: "hosting", domains: ["*.365webservices.co.uk"] }, { name: "3D Issue", category: "utility", domains: ["*.3dissue.com", "*.pressjack.com"] }, { name: "47Line Technologies", category: "other", domains: ["*.pejs.net"] }, { name: "4finance", category: "utility", domains: ["*.4finance.com"] }, { name: "5miles", category: "content", domains: ["*.5milesapp.com"] }, { name: "77Tool", company: "77Agency", category: "analytics", domains: ["*.77tracking.com"] }, { name: "9xb", category: "ad", domains: ["*.9xb.com"] }, { name: "@UK", category: "hosting", domains: ["*.uk-plc.net"] }, { name: "A Perfect Pocket", category: "hosting", domains: ["*.aperfectpocketdata.com"] }, { name: "A-FIS PTE", category: "analytics", domains: ["*.websta.me"] }, { name: "AB Tasty", homepage: "https://www.abtasty.com/", category: "analytics", domains: ["*.abtasty.com", "d1447tq2m68ekg.cloudfront.net"] }, { name: "ABA RESEARCH", category: "analytics", domains: ["*.abaresearch.uk", "qmodal.azurewebsites.net"] }, { name: "ADMIZED", category: "ad", domains: ["*.admized.com"] }, { name: "ADNOLOGIES", category: "ad", domains: ["*.heias.com"] }, { name: "ADventori", category: "ad", domains: ["*.adventori.com"] }, { name: "AI Media Group", category: "ad", domains: ["*.aimediagroup.com"] }, { name: "AIR.TV", category: "ad", domains: ["*.air.tv"] }, { name: "AKQA", category: "ad", domains: ["*.srtk.net"] }, { name: "AOL ad", company: "AOL", category: "ad", domains: ["*.atwola.com"] }, { name: "AOL On", company: "AOL", category: "content", domains: ["*.5min.com"] }, { name: "AOL Sponsored Listiings", company: "AOL", category: "ad", domains: ["*.adsonar.com"] }, { name: "APSIS Lead", company: "APSIS International AB", category: "ad", domains: ["*.prospecteye.com"] }, { name: "APSIS Profile Cloud", company: "APSIS", category: "analytics", domains: ["*.innomdc.com"] }, { name: "APSIS Forms", company: "APSIS", category: "other", domains: ["*.apsisforms.com"] }, { name: "ARENA", company: "Altitude", category: "ad", domains: ["*.altitude-arena.com"] }, { name: "ARM", category: "analytics", domains: ["*.tag4arm.com"] }, { name: "ASAPP", category: "other", domains: ["*.asapp.com"] }, { name: "ASP", category: "hosting", domains: ["*.goshowoff.com"] }, { name: "AT Internet", category: "analytics", domains: ["*.ati-host.net"] }, { name: "ATTRAQT", category: "utility", domains: ["*.attraqt.com", "*.locayta.com"] }, { name: "AVANSER", category: "analytics", domains: ["*.avanser.com.au"] }, { name: "AVG", company: "AVG Technologies", category: "utility", domains: ["*.avg.com"] }, { name: "AWeber", category: "ad", domains: ["*.aweber.com"] }, { name: "AXS", category: "content", domains: ["*.axs.com"] }, { name: "Accentuate", company: "Accentuate Digital", category: "utility", homepage: "https://www.accentuate.io/", domains: ["*.accentuate.io"] }, { name: "Accenture", category: "analytics", domains: ["*.tmvtp.com"] }, { name: "Accord Holdings", category: "ad", domains: ["*.agcdn.com"] }, { name: "Accordant Media", category: "ad", domains: ["*.a3cloud.net"] }, { name: "Account Kit", category: "other", domains: ["*.accountkit.com"] }, { name: "Accuen Media (Omnicom Media Group)", category: "content", domains: ["*.p-td.com"] }, { name: "Accuweather", category: "content", domains: ["*.accuweather.com"] }, { name: "Acquisio", category: "ad", domains: ["*.acq.io"] }, { name: "Act-On Software", category: "marketing", domains: ["*.actonsoftware.com"] }, { name: "ActBlue", category: "other", domains: ["*.actblue.com"] }, { name: "Active Agent", category: "ad", domains: ["*.active-agent.com"] }, { name: "ActiveCampaign", category: "ad", domains: ["*.trackcmp.net", "app-us1.com", "*.app-us1.com"] }, { name: "AcuityAds", category: "ad", domains: ["*.acuityplatform.com"] }, { name: "Acxiom", category: "ad", domains: ["*.acxiom-online.com", "*.acxiomapac.com", "*.delivery.net"] }, { name: "Ad4Screen", category: "ad", domains: ["*.a4.tl"] }, { name: "Ad6Media", category: "ad", domains: ["*.ad6media.fr"] }, { name: "AdCurve", category: "ad", domains: ["*.shop2market.com"] }, { name: "AdEasy", category: "ad", domains: ["*.adeasy.ru"] }, { name: "AdExtent", category: "ad", domains: ["*.adextent.com"] }, { name: "AdForge Edge", company: "AdForge", category: "ad", domains: ["*.adforgeinc.com"] }, { name: "AdGear", company: "Samsung Electronics", category: "ad", domains: ["*.adgear.com", "*.adgrx.com"] }, { name: "AdInMedia", category: "ad", domains: ["*.fastapi.net"] }, { name: "AdJug", category: "ad", domains: ["*.adjug.com"] }, { name: "AdMatic", category: "ad", domains: ["*.admatic.com.tr"] }, { name: "AdMedia", category: "ad", domains: ["*.admedia.com"] }, { name: "AdRecover", category: "ad", domains: ["*.adrecover.com"] }, { name: "AdRiver", category: "ad", domains: ["*.adriver.ru"] }, { name: "AdSniper", category: "ad", domains: ["*.adsniper.ru", "*.sniperlog.ru"] }, { name: "AdSpeed", category: "ad", domains: ["*.adspeed.net"] }, { name: "AdSpruce", category: "ad", domains: ["*.adspruce.com"] }, { name: "AdSupply", category: "ad", domains: ["*.doublepimp.com"] }, { name: "AdTheorent", category: "ad", domains: ["*.adentifi.com"] }, { name: "AdThink AudienceInsights", company: "AdThink Media", category: "analytics", domains: ["*.audienceinsights.net"] }, { name: "AdTrue", company: "FPT AdTrue", category: "ad", domains: ["*.adtrue.com"] }, { name: "AdYapper", category: "ad", domains: ["*.adyapper.com"] }, { name: "Adacado", category: "ad", domains: ["*.adacado.com"] }, { name: "Adap.tv", category: "ad", domains: ["*.adap.tv"] }, { name: "Adapt Services", category: "hosting", domains: ["*.adcmps.com"] }, { name: "Adaptive Web", category: "hosting", domains: ["*.adaptive.co.uk"] }, { name: "Adara Media", category: "ad", domains: ["*.yieldoptimizer.com"] }, { name: "Adblade", category: "ad", domains: ["*.adblade.com"] }, { name: "Adbrain", category: "ad", domains: ["*.adbrn.com"] }, { name: "AddEvent", category: "utility", domains: ["*.addevent.com"] }, { name: "AddShoppers", category: "social", domains: ["*.addshoppers.com", "d3rr3d0n31t48m.cloudfront.net", "*.shop.pe"] }, { name: "AddThisEvent", category: "hosting", domains: ["*.addthisevent.com"] }, { name: "Addoox MetaNetwork", company: "Addoox", category: "ad", domains: ["*.metanetwork.net"] }, { name: "Addvantage Media", category: "ad", domains: ["*.addvantagemedia.com", "*.simplytechnology.net"] }, { name: "AD EBis", category: "analytics", homepage: "https://www.ebis.ne.jp/", domains: ["*.ebis.ne.jp"] }, { name: "Adecs", category: "customer-success", domains: ["*.adecs.co.uk"] }, { name: "Adelphic", category: "ad", domains: ["*.ipredictive.com"] }, { name: "Adestra", category: "ad", domains: ["*.adestra.com", "*.msgfocus.com"] }, { name: "Adform", category: "ad", domains: ["*.adform.net", "*.adformdsp.net"] }, { name: "Adkontekst", category: "ad", domains: ["*.adkontekst.pl"] }, { name: "Adlead", category: "ad", domains: ["*.webelapp.com"] }, { name: "Adledge", category: "utility", domains: ["*.adledge.com"] }, { name: "Adloox", category: "ad", domains: ["*.adlooxtracking.com"] }, { name: "Adlux", category: "ad", domains: ["*.adlux.com"] }, { name: "Admedo", category: "ad", domains: ["*.a8723.com", "*.adizio.com", "*.admedo.com"] }, { name: "Admeta", company: "Wideorbit", category: "ad", domains: ["*.atemda.com"] }, { name: "Admetrics", company: "Next Tuesday", category: "analytics", domains: ["*.nt.vc"] }, { name: "Admiral", category: "ad", domains: ["*.unknowntray.com"] }, { name: "Admitad", category: "ad", domains: ["*.lenmit.com"] }, { name: "Admixer for Publishers", company: "Admixer", category: "ad", domains: ["*.admixer.net"] }, { name: "Adnium", category: "ad", domains: ["*.adnium.com"] }, { name: "Adnostic", company: "Dennis Publishing", category: "ad", domains: ["*.adnostic.co.uk"] }, { name: "Adobe Marketing Cloud", company: "Adobe Systems", category: "ad", domains: ["*.adobetag.com"] }, { name: "Adobe Scene7", company: "Adobe Systems", category: "content", domains: ["wwwimages.adobe.com", "*.scene7.com", "*.everestads.net", "*.everestjs.net"] }, { name: "Adobe Systems", category: "content", domains: ["adobe.com", "www.adobe.com"] }, { name: "Adobe Business Catalyst", homepage: "https://www.businesscatalyst.com/", category: "hosting", domains: ["*.businesscatalyst.com"] }, { name: "Adocean", company: "Gemius", category: "ad", domains: ["*.adocean.pl"] }, { name: "Adometry", company: "Google", category: "ad", domains: ["*.dmtry.com"] }, { name: "Adomik", category: "analytics", domains: ["*.adomik.com"] }, { name: "Adotmob", category: "ad", domains: ["*.adotmob.com"] }, { name: "Adrian Quevedo", category: "hosting", domains: ["*.adrianquevedo.com"] }, { name: "Adroit Digital Solutions", category: "ad", domains: ["*.imiclk.com", "*.abmr.net"] }, { name: "AdsNative", category: "ad", domains: ["*.adsnative.com"] }, { name: "AdsWizz", category: "ad", domains: ["*.adswizz.com"] }, { name: "Adscale", category: "ad", domains: ["*.adscale.de"] }, { name: "Adschoom", company: "JSWeb Production", category: "ad", domains: ["*.adschoom.com"] }, { name: "Adscience", category: "ad", domains: ["*.adscience.nl"] }, { name: "Adsiduous", category: "ad", domains: ["*.adsiduous.com"] }, { name: "Adsty", category: "ad", domains: ["*.adx1.com"] }, { name: "Adtech (AOL)", category: "ad", domains: ["*.adtechus.com"] }, { name: "Adtegrity", category: "ad", domains: ["*.adtpix.com"] }, { name: "Adthink", company: "Adthink Media", category: "ad", domains: ["*.adxcore.com", "*.dcoengine.com"] }, { name: "AdultWebmasterEmpire.Com", category: "ad", domains: ["*.awempire.com"] }, { name: "Adunity", category: "ad", domains: ["*.adunity.com"] }, { name: "Advance Magazine Group", category: "content", domains: ["*.condenastdigital.com", "*.condenet.com", "*.condenast.co.uk"] }, { name: "Adverline Board", company: "Adverline", category: "ad", domains: ["*.adverline.com", "*.adnext.fr"] }, { name: "AdvertServe", category: "ad", domains: ["*.advertserve.com"] }, { name: "Advolution", category: "utility", domains: ["*.advolution.de"] }, { name: "Adwise", category: "ad", domains: ["*.adwise.bg"] }, { name: "Adyen", category: "utility", domains: ["*.adyen.com"] }, { name: "Adyoulike", category: "ad", domains: ["*.adyoulike.com", "*.omnitagjs.com", "*.adyoulike.net"] }, { name: "Adzerk", category: "ad", domains: ["*.adzerk.net"] }, { name: "Adzip", company: "Adbox Digital", category: "ad", domains: ["*.adzip.co"] }, { name: "AerServ", category: "ad", domains: ["*.aerserv.com"] }, { name: "Affectv", category: "ad", domains: ["*.affectv.com", "*.affec.tv"] }, { name: "Affiliate Window", company: "Digital Window", category: "ad", domains: ["*.dwin1.com"] }, { name: "Affiliatly", category: "ad", domains: ["*.affiliatly.com"] }, { name: "Affino", category: "ad", domains: ["affino.com"] }, { name: "Affirm", category: "utility", domains: ["*.affirm.com"] }, { name: "Afterpay", company: "Block", category: "utility", homepage: "https://www.afterpay.com/", domains: ["*.afterpay.com"] }, { name: "Agenda Media", category: "ad", domains: ["*.agendamedia.co.uk"] }, { name: "Aggregate Knowledge", company: "Neustar", category: "ad", domains: ["*.agkn.com"] }, { name: "AgilOne", category: "marketing", domains: ["*.agilone.com"] }, { name: "Agility", category: "hosting", domains: ["*.agilitycms.com"] }, { name: "Ahalogy", category: "social", domains: ["*.ahalogy.com"] }, { name: "Aheadworks", category: "utility", domains: ["*.aheadworks.com"] }, { name: "AirPR", category: "analytics", domains: ["*.airpr.com"] }, { name: "Aira", category: "ad", domains: ["*.aira.net"] }, { name: "Airport Parking and Hotels", category: "content", domains: ["*.aph.com"] }, { name: "Akanoo", category: "analytics", domains: ["*.akanoo.com"] }, { name: "Alchemy", company: "AndBeyond.Media", category: "ad", domains: ["*.andbeyond.media"] }, { name: "AlephD", company: "AOL", category: "ad", domains: ["*.alephd.com"] }, { name: "AliveChat", company: "AYU Technology Solutions", category: "customer-success", domains: ["*.websitealive.com", "*.websitealive7.com"] }, { name: "All Access", category: "other", domains: ["*.allaccess.com.ph"] }, { name: "Alliance for Audited Media", category: "ad", domains: ["*.aamsitecertifier.com"] }, { name: "Allyde", category: "marketing", domains: ["*.mautic.com"] }, { name: "AlphaSSL", category: "utility", domains: ["*.alphassl.com"] }, { name: "Altitude", category: "ad", domains: ["*.altitudeplatform.com"] }, { name: "Altocloud", category: "analytics", domains: ["*.altocloud.com"] }, { name: "Amadeus", category: "content", domains: ["*.e-travel.com"] }, { name: "Amazon CloudFront", company: "Amazon", category: "utility", domains: ["cloudfront.net"] }, { name: "Ambassador", category: "ad", domains: ["*.getambassador.com"] }, { name: "Ambient", company: "Ericcson", category: "other", domains: ["*.adnetwork.vn", "*.ambientplatform.vn"] }, { name: "Amelia Communication", category: "hosting", domains: ["*.sara.media"] }, { name: "Amobee", category: "marketing", domains: ["*.amgdgt.com", "*.kontera.com"] }, { name: "Amplience", category: "marketing", domains: ["*.10cms.com", "*.amplience.com", "*.amplience.net", "*.bigcontent.io", "*.adis.ws"] }, { name: "Amplitude Mobile Analytics", company: "Amplitude", category: "analytics", domains: ["*.amplitude.com", "d24n15hnbwhuhn.cloudfront.net"] }, { name: "Anametrix", company: "Ensighten", category: "analytics", domains: ["*.anametrix.com"] }, { name: "Ancora Platform", company: "Ancora Media Solutions", category: "ad", domains: ["*.ancoraplatform.com"] }, { name: "Anedot", category: "other", domains: ["*.anedot.com"] }, { name: "AnimateJS", category: "utility", domains: ["*.animatedjs.com"] }, { name: "AnswerDash", category: "customer-success", domains: ["*.answerdash.com"] }, { name: "Answers", category: "analytics", domains: ["*.answcdn.com", "*.answers.com", "*.dsply.com"] }, { name: "Apester", category: "analytics", domains: ["*.apester.com", "*.qmerce.com"] }, { name: "Apligraf SmartWeb", company: "Apligraf", category: "utility", domains: ["*.apligraf.com.br"] }, { name: "Appier", category: "ad", domains: ["*.appier.net"] }, { name: "Appsolute", category: "utility", homepage: "https://appsolute.us/", domains: ["dropahint.love"] }, { name: "Apptus eSales", company: "Apptus", category: "analytics", domains: ["*.apptus.com"] }, { name: "Arbor", company: "LiveRamp", category: "other", domains: ["*.pippio.com"] }, { name: "Ardent Creative", category: "hosting", domains: ["*.ardentcreative.co.uk"] }, { name: "Arnold Clark Automobiles", category: "content", domains: ["*.arnoldclark.com"] }, { name: "Atom Content Marketing", category: "content", domains: ["*.atomvault.net"] }, { name: "Atom Data", category: "other", domains: ["*.atomdata.io"] }, { name: "Attribution", category: "ad", domains: ["*.attributionapp.com"] }, { name: "Audience 360", company: "Datapoint Media", category: "ad", domains: ["*.dpmsrv.com"] }, { name: "Audience Science", category: "ad", domains: ["*.revsci.net"] }, { name: "AudienceSearch", company: "Intimate Merger", category: "ad", domains: ["*.im-apps.net"] }, { name: "Auditorius", category: "ad", domains: ["*.audtd.com"] }, { name: "Augur", category: "analytics", domains: ["*.augur.io"] }, { name: "Auto Link Maker", company: "Apple", category: "ad", domains: ["*.apple.com"] }, { name: "Autopilot", category: "ad", domains: ["*.autopilothq.com"] }, { name: "Avail", company: "RichRelevance", category: "ad", domains: ["*.avail.net"] }, { name: "AvantLink", category: "ad", domains: ["*.avmws.com"] }, { name: "Avco Systems", category: "utility", domains: ["*.avcosystems.com"] }, { name: "Avid Media", category: "customer-success", domains: ["*.adspdbl.com", "*.metadsp.co.uk"] }, { name: "Avocet Systems", category: "ad", domains: ["*.avocet.io", "ads.avct.cloud"] }, { name: "Avora", category: "analytics", domains: ["*.truedash.com"] }, { name: "Azure Traffic Manager", company: "Microsoft", category: "other", domains: ["*.gateway.net", "*.trafficmanager.net"] }, { name: "Azure Web Services", company: "Microsoft", category: "cdn", domains: ["*.azurewebsites.net", "*.azureedge.net", "*.msedge.net", "*.windows.net"] }, { name: "BAM", category: "analytics", domains: ["*.bam-x.com"] }, { name: "Baifendian Technology", category: "marketing", domains: ["*.baifendian.com"] }, { name: "Bankrate", category: "utility", domains: ["*.bankrate.com"] }, { name: "BannerFlow", company: "Nordic Factory Solutions", category: "ad", domains: ["*.bannerflow.com"] }, { name: "Barclaycard SmartPay", company: "Barclaycard", category: "utility", domains: ["*.barclaycardsmartpay.com"] }, { name: "Barilliance", category: "analytics", domains: ["*.barilliance.net", "dn3y71tq7jf07.cloudfront.net"] }, { name: "Barnebys", category: "other", domains: ["*.barnebys.com"] }, { name: "Basis", company: "Basis Technologies", category: "ad", homepage: "https://basis.net/", domains: ["*.basis.net"] }, { name: "Batch Media", category: "ad", domains: ["*.t4ft.de"] }, { name: "Bauer Consumer Media", category: "content", domains: ["*.bauercdn.com", "*.greatmagazines.co.uk"] }, { name: "Baynote", category: "analytics", domains: ["*.baynote.net"] }, { name: "Bazaarvoice", category: "analytics", domains: ["*.bazaarvoice.com", "*.feedmagnet.com"] }, { name: "Beachfront Media", category: "ad", domains: ["*.bfmio.com"] }, { name: "BeamPulse", category: "analytics", domains: ["*.beampulse.com"] }, { name: "Beeswax", category: "ad", domains: ["*.bidr.io"] }, { name: "Beetailer", category: "social", domains: ["*.beetailer.com"] }, { name: "Best Of Media S.A.", category: "content", domains: ["*.servebom.com"] }, { name: "Bet365", category: "ad", domains: ["*.bet365affiliates.com"] }, { name: "Betfair", category: "other", domains: ["*.cdnbf.net"] }, { name: "Betgenius", company: "Genius Sports", category: "content", domains: ["*.connextra.com"] }, { name: "Better Banners", category: "ad", domains: ["*.betterbannerscloud.com"] }, { name: "Better Business Bureau", category: "analytics", domains: ["*.bbb.org"] }, { name: "Between Digital", category: "ad", domains: ["*.betweendigital.com"] }, { name: "BidTheatre", category: "ad", domains: ["*.bidtheatre.com"] }, { name: "Bidtellect", category: "ad", domains: ["*.bttrack.com"] }, { name: "Bigcommerce", category: "marketing", domains: ["*.bigcommerce.com"] }, { name: "BitGravity", company: "Tata Communications", category: "content", domains: ["*.bitgravity.com"] }, { name: "Bitly", category: "utility", domains: ["*.bitly.com", "*.lemde.fr", "*.bit.ly"] }, { name: "Bizible", category: "ad", domains: ["*.bizible.com", "*.bizibly.com"] }, { name: "Bizrate", category: "analytics", domains: ["*.bizrate.com"] }, { name: "BlastCasta", category: "social", domains: ["*.poweringnews.com"] }, { name: "Blindado", category: "utility", domains: ["*.siteblindado.com"] }, { name: "Blis", category: "ad", domains: ["*.blismedia.com"] }, { name: "Blogg.se", category: "hosting", domains: ["*.cdnme.se", "*.publishme.se"] }, { name: "BloomReach", category: "ad", domains: ["*.brcdn.com", "*.brsrvr.com", "*.brsvr.com"] }, { name: "Bloomberg", category: "content", domains: ["*.gotraffic.net"] }, { name: "Shop Logic", company: "BloomReach", category: "marketing", domains: ["*.goshoplogic.com"] }, { name: "Blue State Digital", category: "ad", domains: ["*.bsd.net"] }, { name: "Blue Triangle Technologies", category: "analytics", domains: ["*.btttag.com"] }, { name: "BlueCava", category: "ad", domains: ["*.bluecava.com"] }, { name: "BlueKai", company: "Oracle", category: "ad", domains: ["*.bkrtx.com", "*.bluekai.com"] }, { name: "Bluecore", category: "analytics", domains: ["*.bluecore.com"] }, { name: "Bluegg", category: "hosting", domains: ["d1va5oqn59yrvt.cloudfront.net"] }, { name: "Bold Commerce", category: "utility", domains: ["*.shappify-cdn.com", "*.shappify.com", "*.boldapps.net"] }, { name: "BoldChat", company: "LogMeIn", category: "customer-success", domains: ["*.boldchat.com"] }, { name: "Bombora", category: "ad", domains: ["*.mlno6.com"] }, { name: "Bonnier", category: "content", domains: ["*.bonniercorp.com"] }, { name: "Bookatable", category: "content", domains: ["*.bookatable.com", "*.livebookings.com"] }, { name: "Booking.com", category: "content", domains: ["*.bstatic.com"] }, { name: "Boomtrain", category: "ad", domains: ["*.boomtrain.com", "*.boomtrain.net"] }, { name: "BoostSuite", category: "ad", domains: ["*.poweredbyeden.com"] }, { name: "Boostable", category: "ad", domains: ["*.boostable.com"] }, { name: "Bootstrap Chinese network", category: "cdn", domains: ["*.bootcss.com"] }, { name: "Booxscale", category: "ad", domains: ["*.booxscale.com"] }, { name: "Borderfree", company: "pitney bowes", category: "utility", domains: ["*.borderfree.com", "*.fiftyone.com"] }, { name: "BowNow", category: "analytics", homepage: "https://bow-now.jp/", domains: ["*.bownow.jp"] }, { name: "Box", category: "hosting", domains: ["*.box.com"] }, { name: "Boxever", category: "analytics", domains: ["*.boxever.com"] }, { name: "Braintree Payments", company: "Paypal", category: "utility", domains: ["*.braintreegateway.com"] }, { name: "Branch Metrics", category: "ad", domains: ["*.branch.io", "*.app.link"] }, { name: "Brand Finance", category: "other", domains: ["*.brandirectory.com"] }, { name: "Brand View", category: "analytics", domains: ["*.brandview.com"] }, { name: "Brandscreen", category: "ad", domains: ["*.rtbidder.net"] }, { name: "BridgeTrack", company: "Sapient", category: "ad", domains: ["*.bridgetrack.com"] }, { name: "BrightRoll", company: "Yahoo!", category: "ad", domains: ["*.btrll.com"] }, { name: "BrightTag / Signal", company: "Signal", homepage: "https://www.signal.co", category: "tag-manager", domains: ["*.btstatic.com", "*.thebrighttag.com"] }, { name: "Brightcove ZenCoder", company: "Brightcove", category: "other", domains: ["*.zencoder.net"] }, { name: "Bronto Software", category: "marketing", domains: ["*.bm23.com", "*.bronto.com", "*.brontops.com"] }, { name: "Browser-Update.org", category: "other", domains: ["*.browser-update.org"] }, { name: "Buffer", category: "social", domains: ["*.bufferapp.com"] }, { name: "Bugsnag", category: "utility", domains: ["*.bugsnag.com", "d2wy8f7a9ursnm.cloudfront.net"] }, { name: "Burst Media", category: "ad", domains: ["*.burstnet.com", "*.1rx.io"] }, { name: "Burt", category: "analytics", domains: ["*.richmetrics.com", "*.burt.io"] }, { name: "Business Message", category: "ad", domains: ["*.message-business.com"] }, { name: "Business Week", company: "Bloomberg", category: "social", domains: ["*.bwbx.io"] }, { name: "Buto", company: "Big Button", category: "ad", domains: ["*.buto.tv"] }, { name: "Button", category: "ad", domains: ["*.btncdn.com"] }, { name: "BuySellAds", category: "ad", domains: ["*.buysellads.com", "*.buysellads.net"] }, { name: "BuySight (AOL)", category: "ad", domains: ["*.pulsemgr.com"] }, { name: "Buyapowa", category: "ad", domains: ["*.co-buying.com"] }, { name: "BuzzFeed", category: "social", domains: ["*.buzzfed.com", "*.buzzfeed.com"] }, { name: "C1X", category: "ad", domains: ["*.c1exchange.com"] }, { name: "C3 Metrics", category: "analytics", domains: ["*.c3tag.com"] }, { name: "CANDDi", company: "Campaign and Digital Intelligence", category: "ad", domains: ["*.canddi.com"] }, { name: "CCM benchmark Group", category: "social", domains: ["*.ccm2.net"] }, { name: "CD Networks", category: "utility", domains: ["*.gccdn.net"] }, { name: "CDN Planet", category: "analytics", domains: ["*.cdnplanet.com"] }, { name: "InAuth", category: "utility", homepage: "https://www.inauth.com/", domains: ["*.cdn-net.com"] }, { name: "CJ Affiliate", company: "Conversant", category: "ad", domains: ["*.cj.com", "*.dpbolvw.net"] }, { name: "CJ Affiliate by Conversant", company: "Conversant", category: "ad", domains: ["*.ftjcfx.com"] }, { name: "CNBC", category: "content", domains: ["*.cnbc.com"] }, { name: "CNET Content Solutions", company: "CBS Interactive", category: "content", domains: ["*.cnetcontent.com"] }, { name: "CPEx", category: "content", domains: ["*.cpex.cz"] }, { name: "CPXi", category: "ad", domains: ["*.cpxinteractive.com"] }, { name: "CUBED Attribution", company: "CUBED", category: "ad", domains: ["*.withcubed.com"] }, { name: "Cachefly", category: "utility", domains: ["*.cachefly.net"] }, { name: "Calendly", category: "other", domains: ["*.calendly.com"] }, { name: "CallRail", category: "analytics", domains: ["*.callrail.com"] }, { name: "CallTrackingMetrics", category: "analytics", domains: ["*.tctm.co"] }, { name: "Canned Banners", category: "ad", domains: ["*.cannedbanners.com"] }, { name: "Canopy Labs", category: "analytics", domains: ["*.canopylabs.com"] }, { name: "Capita", category: "utility", domains: ["*.crcom.co.uk"] }, { name: "Captify Media", category: "ad", domains: ["*.cpx.to"] }, { name: "Captiify", category: "ad", domains: ["*.captifymedia.com"] }, { name: "Captivate Ai", category: "ad", domains: ["*.captivate.ai"] }, { name: "Captora", category: "marketing", domains: ["*.captora.com"] }, { name: "Carcloud", category: "other", domains: ["*.carcloud.co.uk"] }, { name: "Cardlytics", category: "ad", domains: ["*.cardlytics.com"] }, { name: "Cardosa Enterprises", category: "analytics", domains: ["*.y-track.com"] }, { name: "Caspian Media", category: "ad", domains: ["*.caspianmedia.com"] }, { name: "Cast", category: "utility", domains: ["*.cast.rocks"] }, { name: "Catch", category: "other", domains: ["*.getcatch.com"] }, { name: "Cavisson", category: "analytics", domains: ["*.cavisson.com"] }, { name: "Cedato", category: "ad", domains: ["*.algovid.com", "*.vdoserv.com"] }, { name: "Celebrus Technologies", category: "analytics", domains: ["*.celebrus.com"] }, { name: "Celtra", category: "ad", domains: ["*.celtra.com"] }, { name: "Centro", category: "ad", domains: ["*.brand-server.com"] }, { name: "Ceros", category: "other", domains: ["ceros.com", "view.ceros.com"] }, { name: "Ceros Analytics", company: "Ceros", category: "analytics", domains: ["api.ceros.com"] }, { name: "Certona", category: "analytics", domains: ["*.certona.net"] }, { name: "Certum", category: "utility", domains: ["*.ocsp-certum.com", "*.certum.pl"] }, { name: "Cgrdirect", category: "other", domains: ["*.cgrdirect.co.uk"] }, { name: "Channel 5 Media", category: "ad", domains: ["*.five.tv"] }, { name: "Channel.me", category: "customer-success", domains: ["*.channel.me"] }, { name: "ChannelAdvisor", category: "ad", domains: ["*.channeladvisor.com", "*.searchmarketing.com"] }, { name: "ChannelApe", company: "ChannelApe", category: "other", homepage: "https://www.channelape.com/", domains: ["*.channelape.com"] }, { name: "Chargeads Oscar", company: "Chargeads", category: "ad", domains: ["*.chargeads.com"] }, { name: "Charities Aid Foundation", category: "utility", domains: ["*.cafonline.org"] }, { name: "Chartbeat", category: "analytics", domains: ["*.chartbeat.com", "*.chartbeat.net"] }, { name: "Cheapflights Media", company: "Momondo", category: "content", domains: ["*.momondo.net"] }, { name: "CheckM8", category: "ad", domains: ["*.checkm8.com"] }, { name: "CheckRate", company: "FreeStart", category: "utility", domains: ["*.checkrate.co.uk"] }, { name: "Checkfront", category: "other", domains: ["*.checkfront.com", "dcg3jth5savst.cloudfront.net"] }, { name: "CheetahMail", company: "Experian", category: "ad", domains: ["*.chtah.com"] }, { name: "Chitika", category: "ad", domains: ["*.chitika.net"] }, { name: "ChoiceStream", category: "ad", domains: ["*.choicestream.com"] }, { name: "Cint", category: "social", domains: ["*.cint.com"] }, { name: "Civic", category: "hosting", domains: ["*.civiccomputing.com"] }, { name: "ClearRise", category: "customer-success", domains: ["*.clearrise.com"] }, { name: "Clearstream", category: "ad", domains: ["*.clrstm.com"] }, { name: "Clerk.io ApS", category: "analytics", domains: ["*.clerk.io"] }, { name: "CleverDATA", category: "ad", domains: ["*.1dmp.io"] }, { name: "CleverTap", category: "analytics", domains: ["d2r1yp2w7bby2u.cloudfront.net"] }, { name: "Click Density", category: "analytics", domains: ["*.clickdensity.com"] }, { name: "Click4Assistance", category: "customer-success", domains: ["*.click4assistance.co.uk"] }, { name: "ClickDesk", category: "customer-success", domains: ["*.clickdesk.com", "d1gwclp1pmzk26.cloudfront.net"] }, { name: "ClickDimensions", category: "ad", domains: ["*.clickdimensions.com"] }, { name: "Clickadu (Winner Solutions)", category: "ad", domains: ["*.clickadu.com"] }, { name: "Clickagy Audience Lab", company: "Clickagy", category: "ad", domains: ["*.clickagy.com"] }, { name: "Clickio", category: "ad", domains: [] }, { name: "Clicktale", category: "analytics", domains: ["*.cdngc.net", "*.clicktale.net"] }, { name: "Clicktripz", category: "content", domains: ["*.clicktripz.com"] }, { name: "Clik.com Websites", category: "content", domains: ["*.clikpic.com"] }, { name: "Cloud Technologies", category: "ad", domains: ["*.behavioralengine.com", "*.behavioralmailing.com"] }, { name: "Cloud-A", category: "other", domains: ["*.bulkstorage.ca"] }, { name: "Cloud.typography", company: "Hoefler &amp; Co", category: "cdn", domains: ["*.typography.com"] }, { name: "CloudSponge", category: "ad", domains: ["*.cloudsponge.com"] }, { name: "CloudVPS", category: "other", domains: ["*.adoftheyear.com", "*.objectstore.eu"] }, { name: "Cloudinary", category: "content", domains: ["*.cloudinary.com"] }, { name: "Cloudqp", company: "Cloudwp", category: "other", domains: ["*.cloudwp.io"] }, { name: "Cludo", category: "utility", domains: ["*.cludo.com"] }, { name: "Cognesia", category: "marketing", domains: ["*.intelli-direct.com"] }, { name: "CogoCast", company: "Cogo Labs", category: "ad", domains: ["*.cogocast.net"] }, { name: "Colbenson", category: "utility", domains: ["*.colbenson.com"] }, { name: "Collective", category: "ad", domains: ["*.collective-media.net"] }, { name: "Com Laude", category: "other", domains: ["*.gdimg.net"] }, { name: "Comm100", category: "customer-success", domains: ["*.comm100.com"] }, { name: "CommerceHub", category: "marketing", domains: ["*.mercent.com"] }, { name: "Commission Factory", category: "ad", domains: ["*.cfjump.com"] }, { name: "Communicator", category: "ad", domains: ["*.communicatorcorp.com", "*.communicatoremail.com"] }, { name: "Comodo", category: "utility", domains: ["*.comodo.com", "*.trust-provider.com", "*.trustlogo.com", "*.usertrust.com", "*.comodo.net"] }, { name: "Comodo Certificate Authority", company: "Comodo", category: "utility", domains: ["crt.comodoca.com", "*.comodoca4.com", "ocsp.comodoca.com", "ocsp.usertrust.com", "crt.usertrust.com"] }, { name: "Compete", company: "Millwood Brown Digital", category: "analytics", domains: ["*.c-col.com", "*.compete.com"] }, { name: "Compuware", category: "analytics", domains: ["*.axf8.net"] }, { name: "Conductrics", category: "analytics", domains: ["*.conductrics.com"] }, { name: "Confirmit", category: "analytics", domains: ["*.confirmit.com"] }, { name: "Connatix", category: "ad", domains: ["*.connatix.com"] }, { name: "Connect Events", category: "hosting", domains: ["*.connectevents.com.au"] }, { name: "Constant Contact", category: "ad", domains: ["*.ctctcdn.com"] }, { name: "Constructor.io", category: "utility", domains: ["*.cnstrc.com"] }, { name: "Contabo", category: "hosting", domains: ["185.2.100.179"] }, { name: "Content Media Corporation", category: "content", domains: ["*.contentmedia.eu"] }, { name: "ContentSquare", category: "analytics", domains: ["d1m6l9dfulcyw7.cloudfront.net", "*.content-square.net", "*.contentsquare.net"] }, { name: "ContextWeb", category: "ad", domains: ["*.contextweb.com"] }, { name: "Continental Exchange Solutions", category: "utility", domains: ["*.hifx.com"] }, { name: "Converge-Digital", category: "ad", domains: ["*.converge-digital.com"] }, { name: "Conversant", category: "analytics", domains: ["*.dotomi.com", "*.dtmpub.com", "*.emjcd.com", "mediaplex.com", "*.tqlkg.com", "*.fastclick.net"] }, { name: "Conversant Ad Server", company: "Conversant", category: "ad", domains: ["adfarm.mediaplex.com", "*.mediaplex.com"] }, { name: "Conversant Tag Manager", company: "Conversant", category: "tag-manager", domains: ["*.mplxtms.com"] }, { name: "Conversio", category: "ad", domains: ["*.conversio.com"] }, { name: "Conversion Labs", category: "ad", domains: ["*.net.pl"] }, { name: "Conversion Logic", category: "ad", domains: ["*.conversionlogic.net"] }, { name: "Convert Insights", category: "analytics", domains: ["*.convertexperiments.com"] }, { name: "ConvertMedia", category: "ad", domains: ["*.admailtiser.com", "*.basebanner.com", "*.cmbestsrv.com", "*.vidfuture.com", "*.zorosrv.com"] }, { name: "Convertro", category: "ad", domains: ["*.convertro.com"] }, { name: "Conviva", category: "content", domains: ["*.conviva.com"] }, { name: "Cookie Reports", category: "utility", domains: ["*.cookiereports.com"] }, { name: "Cookie-Script.com", category: "utility", domains: ["*.cookie-script.com"] }, { name: "CookieQ", company: "Baycloud Systems", category: "utility", domains: ["*.cookieq.com"] }, { name: "CoolaData", category: "analytics", domains: ["*.cooladata.com"] }, { name: "CopperEgg", category: "analytics", domains: ["*.copperegg.com", "d2vig74li2resi.cloudfront.net"] }, { name: "Council ad Network", category: "ad", domains: ["*.counciladvertising.net"] }, { name: "Covert Pics", category: "content", domains: ["*.covet.pics"] }, { name: "Cox Digital Solutions", category: "ad", domains: ["*.afy11.net"] }, { name: "Creafi Online Media", category: "ad", domains: ["*.creafi-online-media.com"] }, { name: "Creators", category: "content", domains: ["*.creators.co"] }, { name: "Crimson Hexagon Analytics", company: "Crimson Hexagon", category: "analytics", domains: ["*.hexagon-analytics.com"] }, { name: "Crimtan", category: "ad", domains: ["*.ctnsnet.com"] }, { name: "Cross Pixel Media", category: "ad", domains: ["*.crsspxl.com"] }, { name: "Crosswise", category: "ad", domains: ["*.univide.com"] }, { name: "Crowd Control", company: "Lotame", category: "ad", domains: ["*.crwdcntrl.net"] }, { name: "Crowd Ignite", category: "ad", domains: ["*.crowdignite.com"] }, { name: "CrowdTwist", category: "ad", domains: ["*.crowdtwist.com"] }, { name: "Crowdskout", category: "ad", domains: ["*.crowdskout.com"] }, { name: "Crowdynews", category: "social", domains: ["*.breakingburner.com"] }, { name: "Curalate", category: "marketing", domains: ["*.curalate.com", "d116tqlcqfmz3v.cloudfront.net"] }, { name: "Customer Acquisition Cloud", company: "[24]7", category: "ad", domains: ["*.campanja.com"] }, { name: "Customer.io", category: "ad", domains: ["*.customer.io"] }, { name: "Custora", category: "analytics", domains: ["*.custora.com"] }, { name: "Cxense", category: "ad", domains: ["*.cxense.com", "*.cxpublic.com", "*.emediate.dk", "*.emediate.eu"] }, { name: "CyberKnight", company: "Namogoo", category: "utility", domains: ["*.namogoo.com"] }, { name: "CyberSource (Visa)", category: "utility", domains: ["*.authorize.net"] }, { name: "Cybernet Quest", category: "analytics", domains: ["*.cqcounter.com"] }, { name: "D.A. Consortium", category: "ad", domains: ["*.eff1.net"] }, { name: "D4t4 Solutions", category: "analytics", domains: ["*.u5e.com"] }, { name: "DCSL Software", category: "hosting", domains: ["*.dcslsoftware.com"] }, { name: "DMG Media", category: "content", domains: ["*.mol.im", "*.and.co.uk", "*.anm.co.uk", "*.dailymail.co.uk"] }, { name: "DTSCOUT", category: "ad", domains: ["*.dtscout.com"] }, { name: "Dailykarma", category: "utility", homepage: "https://www.dailykarma.com/", domains: ["*.dailykarma.io"] }, { name: "Dailymotion", category: "content", domains: ["*.dailymotion.com", "*.dmxleo.com", "*.dm.gg", "*.pxlad.io", "*.dmcdn.net", "*.sublimevideo.net"] }, { name: "Dash Hudson", company: "Dash Hudson", category: "content", domains: ["*.dashhudson.com"] }, { name: "Datacamp", category: "utility", domains: ["*.cdn77.org"] }, { name: "Datalicious", category: "tag-manager", domains: ["*.supert.ag", "*.optimahub.com"] }, { name: "Datalogix", category: "ad", domains: ["*.nexac.com"] }, { name: "Datawrapper", category: "utility", domains: ["*.datawrapper.de", "*.dwcdn.net"] }, { name: "Dataxu", category: "marketing", domains: ["*.w55c.net"] }, { name: "DatoCMS", homepage: "https://www.datocms.com/", category: "content", domains: ["*.datocms-assets.com"] }, { name: "Datonics", category: "ad", domains: ["*.pro-market.net"] }, { name: "Dealtime", category: "content", domains: ["*.dealtime.com"] }, { name: "Debenhams Geo Location", company: "Debenhams", category: "utility", domains: ["176.74.183.134"] }, { name: "Decibel Insight", category: "analytics", domains: ["*.decibelinsight.net"] }, { name: "Deep Forest Media", company: "Rakuten", category: "ad", domains: ["*.dpclk.com"] }, { name: "DeepIntent", category: "ad", domains: ["*.deepintent.com"] }, { name: "Delicious Media", category: "social", domains: ["*.delicious.com"] }, { name: "Delineo", category: "ad", domains: ["*.delineo.com"] }, { name: "Delta Projects AB", category: "ad", domains: ["*.de17a.com"] }, { name: "Demand Media", category: "content", domains: ["*.dmtracker.com"] }, { name: "DemandBase", category: "marketing", domains: ["*.demandbase.com"] }, { name: "DemandJump", category: "analytics", domains: ["*.demandjump.com"] }, { name: "Dennis Publishing", category: "content", domains: ["*.alphr.com"] }, { name: "Devatics", category: "analytics", domains: ["*.devatics.com", "*.devatics.io"] }, { name: "Developer Media", category: "ad", domains: ["*.developermedia.com"] }, { name: "DialogTech", category: "ad", domains: ["*.dialogtech.com"] }, { name: "DialogTech SourceTrak", company: "DialogTech", category: "ad", domains: ["d31y97ze264gaa.cloudfront.net"] }, { name: "DigiCert", category: "utility", domains: ["*.digicert.com"] }, { name: "Digioh", category: "ad", domains: ["*.lightboxcdn.com"] }, { name: "Digital Look", category: "content", domains: ["*.digitallook.com"] }, { name: "Digital Media Exchange", company: "NDN", category: "content", domains: ["*.newsinc.com"] }, { name: "Digital Millennium Copyright Act Services", category: "utility", domains: ["*.dmca.com"] }, { name: "Digital Ocean", category: "other", domains: ["95.85.62.56"] }, { name: "Digital Remedy", category: "ad", domains: ["*.consumedmedia.com"] }, { name: "Digital Window", category: "ad", domains: ["*.awin1.com", "*.zenaps.com"] }, { name: "DigitalScirocco", category: "analytics", domains: ["*.digitalscirocco.net"] }, { name: "Digitial Point", category: "utility", domains: ["*.dpstatic.com"] }, { name: "Diligent (Adnetik)", category: "ad", domains: ["*.wtp101.com"] }, { name: "Directed Edge", category: "social", domains: ["*.directededge.com"] }, { name: "Distribute Travel", category: "ad", domains: ["*.dtrck.net"] }, { name: "District M", category: "ad", domains: ["*.districtm.io"] }, { name: "DistroScale", category: "ad", domains: ["*.jsrdn.com"] }, { name: "Divido", category: "utility", domains: ["*.divido.com"] }, { name: "Dow Jones", category: "content", domains: ["*.dowjones.com", "*.dowjoneson.com"] }, { name: "Drifty Co", category: "utility", domains: ["*.onicframework.com"] }, { name: "Drip", company: "The Numa Group", category: "ad", domains: ["*.getdrip.com"] }, { name: "Dropbox", category: "utility", domains: ["*.dropboxusercontent.com"] }, { name: "Dyn Real User Monitoring", company: "Dyn", category: "analytics", domains: ["*.jisusaiche.biz", "*.dynapis.com", "*.jisusaiche.com", "*.dynapis.info"] }, { name: "DynAdmic", category: "ad", domains: ["*.dyntrk.com"] }, { name: "Dynamic Converter", category: "utility", domains: ["*.dynamicconverter.com"] }, { name: "Dynamic Dummy Image Generator", company: "Open Source", category: "utility", domains: ["*.dummyimage.com"] }, { name: "Dynamic Logic", category: "ad", domains: ["*.dl-rms.com", "*.questionmarket.com"] }, { name: "Dynamic Yield", category: "customer-success", domains: ["*.dynamicyield.com"] }, { name: "Dynatrace", category: "analytics", domains: ["*.ruxit.com", "js-cdn.dynatrace.com"] }, { name: "ec-concier", homepage: "https://ec-concier.com/", category: "marketing", domains: ["*.ec-concier.com"] }, { name: "ECT News Network", category: "content", domains: ["*.ectnews.com"] }, { name: "ELITechGroup", category: "analytics", domains: ["*.elitechnology.com"] }, { name: "EMAP", category: "content", domains: ["*.emap.com"] }, { name: "EMedia Solutions", category: "ad", domains: ["*.e-shots.eu"] }, { name: "EQ works", category: "ad", domains: ["*.eqads.com"] }, { name: "ESV Digital", category: "analytics", domains: ["*.esearchvision.com"] }, { name: "Ebiquity", category: "analytics", domains: ["*.ebiquitymedia.com"] }, { name: "Eco Rebates", category: "ad", domains: ["*.ecorebates.com"] }, { name: "Ecwid", category: "hosting", domains: ["*.ecwid.com", "*.shopsettings.com", "d3fi9i0jj23cau.cloudfront.net", "d3j0zfs7paavns.cloudfront.net"] }, { name: "Edge Web Fonts", company: "Adobe Systems", category: "cdn", domains: ["*.edgefonts.net"] }, { name: "Edition Digital", category: "ad", domains: ["*.editiondigital.com"] }, { name: "Edot Web Technologies", category: "hosting", domains: ["*.edot.co.za"] }, { name: "Effective Measure", category: "ad", domains: ["*.effectivemeasure.net"] }, { name: "Effiliation sa", category: "ad", domains: ["*.effiliation.com"] }, { name: "Ekm Systems", category: "analytics", domains: ["*.ekmsecure.com", "*.ekmpinpoint.co.uk"] }, { name: "Elastera", category: "hosting", domains: ["*.elastera.net"] }, { name: "Elastic Ad", category: "ad", domains: ["*.elasticad.net"] }, { name: "Elastic Load Balancing", company: "Amazon Web Services", category: "hosting", domains: ["*.105app.com"] }, { name: "Elecard StreamEye", company: "Elecard", category: "other", domains: ["*.streameye.net"] }, { name: "Elevate", company: "Elevate Technology Solutions", category: "utility", domains: ["*.elevaate.technology"] }, { name: "Elicit", category: "utility", domains: ["*.elicitapp.com"] }, { name: "Elogia", category: "ad", domains: ["*.elogia.net"] }, { name: "Email Attitude", company: "1000mercis", category: "ad", domains: ["*.email-attitude.com"] }, { name: "EmailCenter", category: "ad", domains: ["*.emailcenteruk.com"] }, { name: "Embedly", category: "content", domains: ["*.embedly.com", "*.embed.ly"] }, { name: "EmpathyBroker Site Search", company: "EmpathyBroker", category: "utility", domains: ["*.empathybroker.com"] }, { name: "Enfusen", category: "analytics", domains: ["*.enfusen.com"] }, { name: "Engadget", company: "Engadget (AOL)", category: "content", domains: ["*.gdgt.com"] }, { name: "Engagio", category: "marketing", domains: ["*.engagio.com"] }, { name: "Ensighten Manage", company: "Ensighten", category: "tag-manager", domains: ["*.levexis.com"] }, { name: "EntityLink", category: "other", domains: ["*.entitytag.co.uk"] }, { name: "Entrust Datacard", category: "utility", domains: ["*.entrust.com", "*.entrust.net"] }, { name: "Equiniti", category: "utility", domains: ["*.equiniti.com"] }, { name: "Errorception", category: "utility", domains: ["*.errorception.com"] }, { name: "Esri ArcGIS", company: "Esri", category: "utility", domains: ["*.arcgis.com", "*.arcgisonline.com"] }, { name: "Ethnio", category: "analytics", domains: ["*.ethn.io"] }, { name: "Eulerian Technologies", category: "ad", domains: ["*.eolcdn.com"] }, { name: "Euroland", category: "utility", domains: ["*.euroland.com"] }, { name: "European Interactive Digital ad Alli", category: "utility", domains: ["*.edaa.eu"] }, { name: "Eventbrite", category: "hosting", domains: ["*.evbuc.com", "*.eventbrite.co.uk"] }, { name: "Everflow", category: "analytics", domains: ["*.tp88trk.com"] }, { name: "Evergage", category: "analytics", domains: ["*.evergage.com", "*.evgnet.com"] }, { name: "Everquote", category: "content", domains: ["*.evq1.com"] }, { name: "Everyday Health", category: "ad", domains: ["*.agoramedia.com"] }, { name: "Evidon", category: "analytics", domains: ["*.evidon.com"] }, { name: "Evolve Media", category: "content", domains: ["*.evolvemediallc.com"] }, { name: "Exactag", category: "ad", domains: ["*.exactag.com"] }, { name: "ExoClick", category: "ad", domains: ["*.exoclick.com"] }, { name: "Expedia", category: "content", domains: ["*.travel-assets.com", "*.trvl-media.com", "*.trvl-px.com", "*.uciservice.com"] }, { name: "Expedia Australia", company: "Expedia", category: "content", domains: ["*.expedia.com.au"] }, { name: "Expedia Canada", company: "Expedia", category: "content", domains: ["*.expedia.ca"] }, { name: "Expedia France", company: "Expedia", category: "content", domains: ["*.expedia.fr"] }, { name: "Expedia Germany", company: "Expedia", category: "content", domains: ["*.expedia.de"] }, { name: "Expedia Italy", company: "Expedia", category: "content", domains: ["*.expedia.it"] }, { name: "Expedia Japan", company: "Expedia", category: "content", domains: ["*.expedia.co.jp"] }, { name: "Expedia USA", company: "Expedia", category: "content", domains: ["*.expedia.com"] }, { name: "Expedia United Kingdom", company: "Expedia", category: "content", domains: ["*.expedia.co.uk"] }, { name: "Experian", category: "utility", domains: ["*.audienceiq.com", "*.experian.com", "*.experianmarketingservices.digital"] }, { name: "Experian Cross-Channel Marketing Platform", company: "Experian", category: "marketing", domains: ["*.eccmp.com", "*.ccmp.eu"] }, { name: "Exponea", category: "analytics", domains: ["*.exponea.com"] }, { name: "Exponential Interactive", category: "ad", domains: ["*.exponential.com"] }, { name: "Extensis WebInk", category: "cdn", domains: ["*.webink.com"] }, { name: "Extole", category: "ad", domains: ["*.extole.com", "*.extole.io"] }, { name: "Ey-Seren", category: "analytics", domains: ["*.webabacus.com"] }, { name: "EyeView", category: "ad", domains: ["*.eyeviewads.com"] }, { name: "Eyeota", category: "ad", domains: ["*.eyeota.net"] }, { name: "Ezakus Pretargeting", company: "Ezakus", category: "ad", domains: ["*.ezakus.net"] }, { name: "Ezoic", category: "analytics", domains: ["*.ezoic.net"] }, { name: "FLXone", company: "Teradata", category: "ad", domains: ["*.pangolin.blue", "*.flx1.com", "d2hlpp31teaww3.cloudfront.net", "*.flxpxl.com"] }, { name: "Fairfax Media", category: "content", domains: ["ads.fairfax.com.au", "resources.fairfax.com.au"] }, { name: "Fairfax Media Analtics", company: "Fairfax Media", category: "analytics", domains: ["analytics.fairfax.com.au"] }, { name: "Falk Technologies", category: "ad", domains: ["*.angsrvr.com"] }, { name: "Fanplayr", category: "analytics", domains: ["*.fanplayr.com", "d38nbbai6u794i.cloudfront.net"] }, { name: "Fast Thinking", company: "NE Marketing", category: "marketing", domains: ["*.fast-thinking.co.uk"] }, { name: "Fastest Forward", category: "analytics", domains: ["*.gaug.es"] }, { name: "Fastly", category: "utility", domains: ["*.fastly.net"] }, { name: "Feedbackify", company: "InsideMetrics", category: "analytics", domains: ["*.feedbackify.com"] }, { name: "Feefo.com", company: "Feefo", category: "analytics", domains: ["*.feefo.com"] }, { name: "Fidelity Media", category: "ad", domains: ["*.fidelity-media.com"] }, { name: "Filestack", category: "content", domains: ["*.filepicker.io"] }, { name: "Finsbury Media", category: "ad", domains: ["*.finsburymedia.com"] }, { name: "Firepush", category: "utility", domains: ["*.firepush.io"] }, { name: "FirstImpression", category: "ad", domains: ["*.firstimpression.io"] }, { name: "Fit Analytics", category: "other", domains: ["*.fitanalytics.com"] }, { name: "Fits Me", category: "analytics", domains: ["*.fits.me"] }, { name: "Fivetran", category: "analytics", domains: ["*.fivetran.com"] }, { name: "FlexShopper", category: "utility", domains: ["*.flexshopper.com"] }, { name: "Flickr", category: "content", domains: ["*.flickr.com", "*.staticflickr.com"] }, { name: "Flipboard", category: "social", domains: ["*.flipboard.com"] }, { name: "Flipdesk", category: "customer-success", homepage: "https://flipdesk.jp/", domains: ["*.flipdesk.jp"] }, { name: "Flipp", category: "analytics", domains: ["*.wishabi.com", "d2e0sxz09bo7k2.cloudfront.net", "*.wishabi.net"] }, { name: "Flite", category: "ad", domains: ["*.flite.com"] }, { name: "Flixmedia", category: "analytics", domains: ["*.flix360.com", "*.flixcar.com", "*.flixfacts.com", "*.flixsyndication.net", "*.flixfacts.co.uk"] }, { name: "Flockler", category: "ad", domains: ["*.flockler.com"] }, { name: "Flowplayer", category: "content", domains: ["*.flowplayer.org"] }, { name: "Flowzymes Ky", category: "cdn", domains: ["*.jquerytools.org"] }, { name: "Fomo", category: "ad", domains: ["*.notifyapp.io"] }, { name: "Fonecall", category: "analytics", domains: ["*.web-call-analytics.com"] }, { name: "Fontdeck", category: "cdn", domains: ["*.fontdeck.com"] }, { name: "Foodity Technologies", category: "ad", domains: ["*.foodity.com"] }, { name: "Force24", category: "ad", domains: ["*.force24.co.uk"] }, { name: "ForeSee", company: "Answers", category: "analytics", domains: ["*.4seeresults.com", "*.answerscloud.com", "*.foresee.com", "*.foreseeresults.com"] }, { name: "Forensiq", category: "utility", domains: ["*.fqtag.com"] }, { name: "Fort Awesome", category: "cdn", domains: ["*.fortawesome.com"] }, { name: "Forter", category: "utility", domains: ["*.forter.com"] }, { name: "Forward Internet Group", category: "hosting", domains: ["*.f3d.io"] }, { name: "Forward3D", category: "ad", domains: ["*.forward3d.com"] }, { name: "Fospha", category: "analytics", domains: ["*.fospha.com"] }, { name: "Foursixty", category: "customer-success", domains: ["*.foursixty.com"] }, { name: "FoxyCart", category: "utility", domains: ["*.foxycart.com"] }, { name: "Fraudlogix", category: "utility", domains: ["*.yabidos.com"] }, { name: "FreakOut", category: "ad", domains: ["*.fout.jp"] }, { name: "Freespee", category: "customer-success", domains: ["*.freespee.com"] }, { name: "Freetobook", category: "content", domains: ["*.freetobook.com"] }, { name: "Fresh 8 Gaming", category: "ad", domains: ["*.fresh8.co"] }, { name: "Fresh Relevance", category: "analytics", domains: ["*.freshrelevance.com", "*.cloudfront.ne", "d1y9qtn9cuc3xw.cloudfront.net", "d81mfvml8p5ml.cloudfront.net", "dkpklk99llpj0.cloudfront.net"] }, { name: "Friendbuy", category: "ad", domains: ["*.friendbuy.com", "djnf6e5yyirys.cloudfront.net"] }, { name: "Frienefit", category: "ad", domains: ["*.frienefit.com"] }, { name: "FuelX", category: "ad", domains: ["*.fuelx.com"] }, { name: "Full Circle Studies", category: "analytics", domains: ["*.securestudies.com"] }, { name: "FullStory", category: "analytics", domains: ["*.fullstory.com"] }, { name: "Fyber", category: "ad", domains: ["*.fyber.com"] }, { name: "G-Forces Web Management", category: "hosting", domains: ["*.gforcesinternal.co.uk"] }, { name: "G4 Native", company: "Gravity4", category: "ad", domains: ["*.triggit.com"] }, { name: "GET ME IN!  (TicketMaster)", category: "content", domains: ["*.getmein.com"] }, { name: "GIPHY", category: "content", domains: ["*.giphy.com"] }, { name: "GainCloud", company: "GainCloud Systems", category: "other", domains: ["*.egaincloud.net"] }, { name: "Gath Adams", category: "content", domains: ["*.iwantthatflight.com.au"] }, { name: "Gecko Tribe", category: "social", domains: ["*.geckotribe.com"] }, { name: "Gemius", category: "ad", domains: ["*.gemius.pl"] }, { name: "Genesis Media", category: "ad", domains: ["*.bzgint.com", "*.genesismedia.com", "*.genesismediaus.com"] }, { name: "Genie Ventures", category: "ad", domains: ["*.genieventures.co.uk"] }, { name: "Geniee", category: "ad", domains: ["*.href.asia", "*.genieessp.jp", "*.genieesspv.jp", "*.gssprt.jp"] }, { name: "Geniuslink", category: "analytics", domains: ["*.geni.us"] }, { name: "GeoRiot", category: "other", domains: ["*.georiot.com"] }, { name: "GeoTrust", category: "utility", domains: ["*.geotrust.com"] }, { name: "Geoplugin", category: "utility", domains: ["*.geoplugin.com", "*.geoplugin.net"] }, { name: "Georeferencer", company: "Klokan Technologies", category: "utility", domains: ["*.georeferencer.com"] }, { name: "GetIntent RTBSuite", company: "GetIntent", category: "ad", domains: ["*.adhigh.net"] }, { name: "GetResponse", category: "ad", domains: ["*.getresponse.com"] }, { name: "GetSiteControl", company: "GetWebCraft", category: "utility", domains: ["*.getsitecontrol.com"] }, { name: "GetSocial", category: "social", domains: ["*.getsocial.io"] }, { name: "Getty Images", category: "content", domains: ["*.gettyimages.com", "*.gettyimages.co.uk"] }, { name: "Gfycat", company: "Gycat", category: "utility", domains: ["*.gfycat.com"] }, { name: "Ghostery Enterprise", company: "Ghostery", category: "marketing", domains: ["*.betrad.com"] }, { name: "Giant Media", category: "ad", domains: ["*.videostat.com"] }, { name: "Gigya", category: "analytics", domains: ["*.gigya.com"] }, { name: "GitHub", category: "utility", domains: ["*.github.com", "*.githubusercontent.com", "*.github.io", "*.rawgit.com"] }, { name: "Gladly", company: "Gladly", homepage: "https://www.gladly.com/", category: "customer-success", domains: ["*.gladly.com"] }, { name: "Glassdoor", category: "content", domains: ["*.glassdoor.com"] }, { name: "Gleam", category: "marketing", domains: ["*.gleam.io"] }, { name: "Global Digital Markets", category: "ad", domains: ["*.gdmdigital.com"] }, { name: "Global-e", category: "hosting", domains: ["*.global-e.com"] }, { name: "GlobalSign", category: "utility", domains: ["*.globalsign.com", "*.globalsign.net"] }, { name: "GlobalWebIndex", category: "analytics", domains: ["*.globalwebindex.net"] }, { name: "Globase International", category: "ad", domains: ["*.globase.com"] }, { name: "GoDataFeed", category: "other", domains: ["*.godatafeed.com"] }, { name: "Google APIs", company: "Google", category: "utility", domains: ["googleapis.com"] }, { name: "Google Ad Block Detection", company: "Google", category: "ad", domains: ["*.0emn.com", "*.0fmm.com"] }, { name: "Google Analytics Experiments", company: "Google", category: "analytics", domains: ["*.gexperiments1.com"] }, { name: "Google DoubleClick Ad Exchange", company: "Google", category: "ad", domains: ["*.admeld.com"] }, { name: "Google IPV6 Metrics", company: "Google", category: "analytics", domains: ["*.ipv6test.net"] }, { name: "Google Plus", company: "Google", category: "social", domains: ["plus.google.com"] }, { name: "Google Trusted Stores", company: "Google", category: "utility", domains: ["*.googlecommerce.com"] }, { name: "Google Video", company: "Google", category: "content", domains: ["*.googlevideo.com"] }, { name: "Google reCAPTCHA", company: "Google", category: "utility", domains: ["*.recaptcha.net"] }, { name: "GovMetric", company: "ROL Solutions", category: "analytics", domains: ["*.govmetric.com"] }, { name: "Granify", category: "analytics", domains: ["*.granify.com"] }, { name: "Grapeshot", category: "ad", domains: ["*.gscontxt.net", "*.grapeshot.co.uk"] }, { name: "Gravity (AOL)", category: "analytics", domains: ["*.grvcdn.com"] }, { name: "Groovy Gecko", category: "content", domains: ["*.ggwebcast.com", "*.groovygecko.net"] }, { name: "GroupM", category: "ad", domains: ["*.qservz.com"] }, { name: "Guardian Media", category: "ad", domains: ["*.theguardian.com", "*.guardian.co.uk"] }, { name: "GumGum", category: "ad", domains: ["*.gumgum.com"] }, { name: "Gumtree", category: "content", domains: ["*.gumtree.com"] }, { name: "H264 Codec", company: "Cisco", category: "other", domains: ["*.openh264.org"] }, { name: "HERE", category: "analytics", domains: ["*.medio.com"] }, { name: "HP Optimost", company: "Hewlett-Packard Development Company", category: "marketing", domains: ["*.hp.com", "d2uncb19xzxhzx.cloudfront.net"] }, { name: "Has Offers", company: "TUNE", category: "ad", domains: ["*.go2cloud.org"] }, { name: "Hawk Search", category: "utility", domains: ["*.hawksearch.com"] }, { name: "Haymarket Media Group", category: "content", domains: ["*.brandrepublic.com", "*.hbpl.co.uk"] }, { name: "Heap", category: "analytics", domains: ["*.heapanalytics.com"] }, { name: "Hearst Communications", category: "content", domains: ["*.h-cdn.co", "*.hearstdigital.com", "*.hearstlabs.com", "*.hearst.io", "*.cdnds.net"] }, { name: "Heatmap", category: "analytics", domains: ["*.heatmap.it"] }, { name: "Heroku", category: "other", domains: ["*.herokuapp.com"] }, { name: "Hexton", category: "utility", domains: ["*.hextom.com"] }, { name: "Hibernia Networks", category: "utility", domains: ["*.hiberniacdn.com"] }, { name: "High Impact Media", category: "ad", domains: ["*.reactx.com"] }, { name: "Highcharts", category: "utility", domains: ["*.highcharts.com"] }, { name: "Highwinds", category: "utility", domains: ["*.hwcdn.net"] }, { name: "HitsLink", category: "analytics", domains: ["*.hitslink.com"] }, { name: "Hola Networks", category: "other", domains: ["*.h-cdn.com"] }, { name: "Hootsuite", category: "analytics", domains: ["*.hootsuite.com"] }, { name: "HotUKDeals", category: "analytics", domains: ["*.hotukdeals.com"] }, { name: "HotWords", company: "Media Response Group", category: "ad", domains: ["*.hotwords.com.br"] }, { name: "HotelsCombined", category: "content", domains: ["*.datahc.com"] }, { name: "Hoverr", category: "ad", domains: ["*.hoverr.media"] }, { name: "Hull.js", category: "utility", domains: ["*.hull.io", "*.hullapp.io"] }, { name: "Hupso Website Analyzer", company: "Hupso", category: "analytics", domains: ["*.hupso.com"] }, { name: "I-Behavior", company: "WPP", category: "ad", domains: ["*.ib-ibi.com"] }, { name: "i-mobile", company: "i-mobile", category: "ad", domains: ["*.i-mobile.co.jp"] }, { name: "IBM Digital Analytics", company: "IBM", category: "analytics", domains: ["*.cmcore.com", "coremetrics.com", "data.coremetrics.com", "data.de.coremetrics.com", "libs.de.coremetrics.com", "tmscdn.de.coremetrics.com", "iocdn.coremetrics.com", "libs.coremetrics.com", "tmscdn.coremetrics.com", "*.s81c.com", "*.unica.com", "*.coremetrics.eu"] }, { name: "IBM Digital Data Exchange", company: "IBM", category: "tag-manager", domains: ["tagmanager.coremetrics.com"] }, { name: "IBM Tealeaf", company: "IBM", category: "analytics", domains: ["*.ibmcloud.com"] }, { name: "IBM Acoustic Campaign", company: "IBM", category: "analytics", domains: ["www.sc.pages01.net", "www.sc.pages02.net", "www.sc.pages03.net", "www.sc.pages04.net", "www.sc.pages05.net", "www.sc.pages06.net", "www.sc.pages07.net", "www.sc.pages08.net", "www.sc.pages09.net", "www.sc.pagesA.net"] }, { name: "ICF Technology", category: "content", domains: ["*.camads.net"] }, { name: "IFDNRG", category: "hosting", domains: ["*.ifdnrg.com"] }, { name: "IMRG", category: "analytics", domains: ["*.peermap.com", "*.imrg.org"] }, { name: "IPONWEB", category: "ad", domains: ["*.company-target.com", "*.liadm.com", "*.iponweb.net", "*.p161.net"] }, { name: "IQ Mobile", category: "utility", domains: ["*.iqm.cc"] }, { name: "IS Group", category: "hosting", domains: ["*.creative-serving.com"] }, { name: "IT Dienstleistungen Tim Prinzkosky", category: "utility", domains: ["*.flaticons.net"] }, { name: "IXI Digital", company: "Equifax", category: "ad", domains: ["*.ixiaa.com"] }, { name: "IcoMoon", category: "cdn", domains: ["d19ayerf5ehaab.cloudfront.net", "d1azc1qln24ryf.cloudfront.net"] }, { name: "IdenTrust", category: "utility", domains: ["*.identrust.com"] }, { name: "Ido", category: "customer-success", domains: ["*.idio.co"] }, { name: "Ignition One", category: "marketing", domains: ["*.searchignite.com"] }, { name: "ImageShack", category: "content", domains: ["*.yfrog.com"] }, { name: "Imagen Studio", category: "utility", domains: ["*.telephonesky.com"] }, { name: "Imagini Holdings", category: "ad", domains: ["*.vdna-assets.com"] }, { name: "Img Safe", category: "content", domains: ["*.imgsafe.org"] }, { name: "Imgur", category: "utility", domains: ["*.imgur.com"] }, { name: "Impact Radius", category: "ad", domains: ["*.impactradius-event.com", "*.impactradius-go.com", "*.7eer.net", "d3cxv97fi8q177.cloudfront.net", "*.evyy.net", "*.ojrq.net", "utt.impactcdn.com", "*.sjv.io"] }, { name: "Improve Digital", category: "ad", domains: ["*.360yield.com"] }, { name: "Improvely", category: "analytics", domains: ["*.iljmp.com"] }, { name: "InMobi", category: "ad", domains: ["*.inmobi.com"] }, { name: "InSkin Media", category: "ad", domains: ["*.inskinad.com", "*.inskinmedia.com"] }, { name: "Inbenta", category: "customer-success", domains: ["*.inbenta.com"] }, { name: "Incisive Media", category: "content", domains: ["*.incisivemedia.com"] }, { name: "Indeed", category: "content", domains: ["*.indeed.com"] }, { name: "Index Exchange", company: "WPP", category: "ad", domains: ["*.casalemedia.com", "*.indexww.com"] }, { name: "Indoona", category: "other", domains: ["*.indoona.com"] }, { name: "Infectious Media", category: "ad", domains: ["*.impdesk.com", "*.impressiondesk.com", "*.inmz.net"] }, { name: "Inference Mobile", category: "ad", domains: ["*.inferencemobile.com"] }, { name: "Infinity Tracking", category: "analytics", domains: ["*.infinity-tracking.net"] }, { name: "Infoline", category: "analytics", domains: ["*.ioam.de"] }, { name: "Infolinks", category: "ad", domains: ["*.infolinks.com"] }, { name: "Infopark", category: "hosting", domains: ["*.scrvt.com"] }, { name: "Infusionsoft", category: "ad", domains: ["*.infusionsoft.com"] }, { name: "Ink", category: "ad", domains: ["*.inktad.com"] }, { name: "Inktel Contact Center Solutions", company: "Inktel", category: "customer-success", domains: ["*.inktel.com"] }, { name: "Inneractive", category: "ad", domains: ["*.inner-active.mobi"] }, { name: "Innovid", category: "ad", homepage: "https://www.innovid.com/", domains: ["*.innovid.com"] }, { name: "Insight Express", category: "analytics", domains: ["*.insightexpressai.com"] }, { name: "Insipio", category: "other", domains: ["*.insipio.com"] }, { name: "Inspectlet", category: "analytics", domains: ["*.inspectlet.com"] }, { name: "Instansive", category: "utility", domains: ["*.instansive.com"] }, { name: "Instart", homepage: "https://www.instart.com/", category: "utility", domains: ["*.insnw.net"] }, { name: "Instembedder", category: "content", domains: ["*.instaembedder.com"] }, { name: "Instinctive", category: "ad", domains: ["*.instinctiveads.com"] }, { name: "Intelligent Reach", category: "ad", domains: ["*.ist-track.com"] }, { name: "Intent HQ", category: "analytics", domains: ["*.intenthq.com"] }, { name: "Intent IQ", category: "ad", domains: ["*.intentiq.com"] }, { name: "Intercept Interactive", category: "ad", domains: ["*.undertone.com"] }, { name: "Interest Graph", company: "AOL", category: "ad", domains: ["*.gravity.com"] }, { name: "Internet Brands", category: "content", domains: ["*.ibpxl.com"] }, { name: "Interpublic Group", category: "ad", domains: ["*.mbww.com"] }, { name: "Interstate", category: "analytics", domains: ["*.interstateanalytics.com"] }, { name: "Interview", category: "analytics", domains: ["*.efm.me"] }, { name: "Intilery", category: "customer-success", domains: ["*.intilery-analytics.com"] }, { name: "Investis", category: "utility", domains: ["*.investis.com"] }, { name: "Investis Flife", category: "hosting", domains: ["*.quartalflife.com"] }, { name: "Invodo", category: "ad", domains: ["*.invodo.com"] }, { name: "iSite", category: "analytics", domains: ["*.isitetv.com"] }, { name: "Issue", category: "content", domains: ["*.issue.by"] }, { name: "J.D. Williams & Co", category: "content", domains: ["*.drct2u.com"] }, { name: "Janrain", category: "analytics", domains: ["*.janrain.com", "*.janrainbackplane.com", "*.rpxnow.com", "d3hmp0045zy3cs.cloudfront.net"] }, { name: "Jellyfish", category: "ad", domains: ["*.jellyfish.net"] }, { name: "JetStream", category: "content", domains: ["*.xlcdn.com"] }, { name: "JingDong", category: "content", domains: ["*.3.com", "*.jd.com"] }, { name: "Jivox", category: "ad", domains: ["*.jivox.com"] }, { name: "Jobvite", category: "content", domains: ["*.jobvite.com"] }, { name: "Johnston Press", category: "content", domains: ["*.johnstonpress.co.uk", "*.jpress.co.uk"] }, { name: "Join the Dots (Research)", category: "social", domains: ["*.jtdiscuss.com"] }, { name: "JotForm", category: "utility", domains: ["*.jotformpro.com"] }, { name: "JuicyAds", category: "ad", domains: ["*.juicyads.com"] }, { name: "JustPremium", category: "ad", domains: ["*.net.net"] }, { name: "JustPremium Ads", company: "JustPremium", category: "ad", domains: ["*.justpremium.com"] }, { name: "JustUno", category: "ad", domains: ["*.justuno.com", "d2j3qa5nc37287.cloudfront.net"] }, { name: "KINX (Korea Internet Neutral eXchange)", category: "other", domains: ["*.kinxcdn.com"] }, { name: "KISSmetrics", category: "analytics", domains: ["*.kissmetrics.com", "doug1izaerwt3.cloudfront.net", "dsyszv14g9ymi.cloudfront.net"] }, { name: "Kaizen Platform", category: "analytics", domains: ["*.kaizenplatform.net"] }, { name: "Kakao", category: "social", domains: ["*.daum.net", "*.daumcdn.net"] }, { name: "Kaltura Video Platform", company: "Kaltura", category: "content", domains: ["*.kaltura.com"] }, { name: "Kameleoon", homepage: "https://www.kameleoon.com/", category: "analytics", domains: ["*.kameleoon.com", "*.kameleoon.eu", "*.kameleoon.io"] }, { name: "Kampyle", category: "analytics", domains: ["*.kampyle.com"] }, { name: "Kantar", category: "analytics", domains: ["*.sesamestats.com"] }, { name: "Kargo", category: "marketing", domains: ["*.kargo.com"] }, { name: "KARTE", company: "Plaid", homepage: "https://karte.io/", category: "marketing", domains: ["*.karte.io"] }, { name: "Kauli", category: "ad", domains: ["*.kau.li"] }, { name: "Keen", company: "Keen", homepage: "https://keen.io/", category: "analytics", domains: ["*.keen.io", "d26b395fwzu5fz.cloudfront.net"] }, { name: "Kelkoo", category: "hosting", domains: ["*.kelkoo.com"] }, { name: "Kenshoo", category: "marketing", domains: ["*.xg4ken.com"] }, { name: "Key CDN", category: "utility", domains: ["*.kxcdn.com"] }, { name: "Keynote", company: "Dynatrace", category: "analytics", domains: ["*.keynote.com"] }, { name: "Keywee", category: "ad", domains: ["*.keywee.co"] }, { name: "Kiosked", category: "ad", domains: ["*.kiosked.com"] }, { name: "Klarna", category: "utility", domains: ["*.klarna.com"] }, { name: "Klaviyo", category: "ad", domains: ["*.klaviyo.com"] }, { name: "Klevu Search", company: "Klevu", category: "utility", domains: ["*.klevu.com"] }, { name: "Klick2Contact", category: "customer-success", domains: ["*.klick2contact.com"] }, { name: "Knight Lab", company: "Northwestern University", category: "utility", domains: ["*.knightlab.com"] }, { name: "Kodajo", category: "other", domains: ["*.kodajo.com"] }, { name: "Komoona", category: "ad", domains: ["*.komoona.com"] }, { name: "Korrelate", company: "JD Power", category: "analytics", domains: ["*.korrelate.net"] }, { name: "LKQD", category: "ad", domains: ["*.lkqd.net"] }, { name: "Layer0", category: "cdn", domains: ["*.layer0.co"] }, { name: "Layershift", category: "hosting", domains: ["109.109.138.174"] }, { name: "Lead Forensics", category: "ad", domains: ["*.200summit.com", "*.baw5tracker.com", "*.business-path-55.com", "*.bux1le001.com", "*.central-core-7.com", "*.direct-azr-78.com", "*.explore-123.com", "*.forensics1000.com", "*.gldsta-02-or.com", "*.green-bloc9.com", "*.lansrv040.com", "*.lead-123.com", "*.leadforensics.com", "*.mavic852.com", "*.mon-com-net.com", "*.peak-ip-54.com", "*.snta0034.com", "*.svr-prc-01.com", "*.syntace-094.com", "*.tghbn12.com", "*.trail-web.com", "*.web-01-gbl.com", "*.web-cntr-07.com", "*.trackdiscovery.net"] }, { name: "Lead Intelligence", company: "Magnetise Solutions", category: "ad", domains: ["*.leadintelligence.co.uk"] }, { name: "LeadLander", category: "analytics", domains: ["*.formalyzer.com", "*.trackalyzer.com"] }, { name: "Leaflet", category: "utility", domains: ["*.leafletjs.com"] }, { name: "LeasdBoxer", company: "LeadBoxer", category: "ad", domains: ["*.leadboxer.com"] }, { name: "LeaseWeb", homepage: "https://www.leaseweb.com/", category: "cdn", domains: ["*.lswcdn.net", "*.leasewebcdn.com"] }, { name: "Leboncoin", category: "content", domains: ["*.leboncoin.fr"] }, { name: "Lengow", category: "hosting", domains: ["*.lengow.com"] }, { name: "Lessbuttons", category: "social", domains: ["*.lessbuttons.com"] }, { name: "Letter Press", category: "ad", domains: ["*.getletterpress.com"] }, { name: "Level 3 Communications", category: "utility", domains: ["footprint.net"] }, { name: "Level3", category: "other", domains: ["secure.footprint.net"] }, { name: "Lifestreet Media", category: "social", domains: ["*.lfstmedia.com"] }, { name: "LiftSuggest", category: "analytics", domains: ["d2blwevgjs7yom.cloudfront.net"] }, { name: "Ligatus", category: "ad", domains: ["*.ligadx.com"] }, { name: "LightStep", category: "analytics", domains: ["*.lightstep.com"] }, { name: "LightWidget", category: "utility", domains: ["*.lightwidget.com"] }, { name: "Likelihood", company: "LIkeihood", category: "hosting", domains: ["*.likelihood.com"] }, { name: "LikeShop", company: "Dash Hudson", category: "content", domains: ["likeshop.me"] }, { name: "LINE Corporation", category: "ad", domains: ["*.line-scdn.net", "*.line.me"] }, { name: "Linkcious", category: "analytics", domains: ["*.linkcious.com"] }, { name: "Linking Mobile", category: "ad", domains: ["*.linkingmobile.com"] }, { name: "LittleData", category: "analytics", homepage: "https://www.littledata.io/", domains: ["*.littledata.io"] }, { name: "LiveBurst", category: "ad", domains: ["*.liveburst.com"] }, { name: "LiveClicker", category: "ad", domains: ["*.liveclicker.net"] }, { name: "LiveHelpNow", category: "customer-success", domains: ["*.livehelpnow.net"] }, { name: "LiveInternet", category: "analytics", domains: ["*.yadro.ru"] }, { name: "LiveJournal", category: "social", domains: ["*.livejournal.com", "*.livejournal.net"] }, { name: "LivePerson", category: "customer-success", homepage: "https://www.liveperson.com/", domains: ["*.liveperson.com", "*.look.io", "*.liveperson.net", "*.lpsnmedia.net"] }, { name: "LiveRail", company: "Facebook", category: "ad", domains: ["*.liverail.com", "*.lrcdn.net"] }, { name: "LiveTex", category: "customer-success", domains: ["*.livetex.ru"] }, { name: "Livefyre", category: "content", domains: ["*.fyre.co", "*.livefyre.com"] }, { name: "Living Map Company", category: "utility", domains: ["*.livingmap.com"] }, { name: "Local World", category: "content", domains: ["*.thelocalpeople.co.uk"] }, { name: "LockerDome", category: "analytics", domains: ["*.lockerdome.com"] }, { name: "Logentries", company: "Rapid", category: "utility", domains: ["*.logentries.com"] }, { name: "Logicalis", category: "analytics", domains: ["*.trovus.co.uk"] }, { name: "LoginRadius", company: "LoginRadius", homepage: "https://www.loginradius.com/", category: "ad", domains: ["*.loginradius.com", "*.lrcontent.com"] }, { name: "LongTail Ad Solutions", category: "ad", domains: ["*.jwpcdn.com", "*.jwplatform.com", "*.jwplayer.com", "*.jwpltx.com", "*.jwpsrv.com", "*.longtailvideo.com"] }, { name: "Loop Commerce", category: "other", domains: ["*.loopassets.net"] }, { name: "Loop11", category: "analytics", domains: ["*.loop11.com"] }, { name: "LoopMe", category: "ad", domains: ["*.loopme.biz", "*.loopme.com", "*.vntsm.com", "*.loopme.me"] }, { name: "Looper", category: "content", domains: ["*.looper.com"] }, { name: "Loyalty Point", category: "ad", domains: ["*.loyaltypoint.pl"] }, { name: "LoyaltyLion", category: "ad", domains: ["*.loyaltylion.com", "*.loyaltylion.net", "dg1f2pfrgjxdq.cloudfront.net"] }, { name: "Luma Tag", category: "analytics", domains: ["*.lumatag.co.uk"] }, { name: "Lumesse", category: "content", domains: ["*.recruitmentplatform.com"] }, { name: "Luminate", category: "ad", domains: ["*.luminate.com"] }, { name: "Lynchpin Analytics", category: "analytics", domains: ["*.lypn.net"] }, { name: "Lyris", category: "ad", domains: ["*.clicktracks.com"] }, { name: "Lytics", category: "ad", domains: ["*.lytics.io"] }, { name: "MEC WebTrack", company: "MEC", category: "ad", domains: ["*.e-webtrack.net"] }, { name: "MECLABS Institute", category: "analytics", domains: ["*.meclabs.com", "*.meclabsdata.com"] }, { name: "MLveda", category: "utility", domains: ["*.mlveda.com"] }, { name: "Macromill", company: "Macromill", category: "analytics", homepage: "https://group.macromill.com/", domains: ["*.macromill.com"] }, { name: "Macropod BugHerd", company: "Macropod", category: "utility", domains: ["*.bugherd.com"] }, { name: "Madison Logic", category: "marketing", domains: ["*.ml314.com"] }, { name: "Madmetrics", company: "Keyade", category: "analytics", domains: ["*.keyade.com"] }, { name: "Magnetic", category: "ad", domains: ["*.domdex.com", "d3ezl4ajpp2zy8.cloudfront.net"] }, { name: "Magnetic Platform", company: "Magnetic", category: "ad", domains: ["*.magnetic.is"] }, { name: "MailMunch", category: "ad", domains: ["*.mailmunch.co"] }, { name: "MailPlus", category: "ad", domains: ["*.mailplus.nl"] }, { name: "Mapbox", category: "utility", domains: ["*.mapbox.com"] }, { name: "Maptive", category: "utility", domains: ["*.maptive.com"] }, { name: "Marcaria.com", category: "other", domains: ["*.gooo.al"] }, { name: "Marchex", category: "analytics", domains: ["*.voicestar.com", "*.marchex.io"] }, { name: "Mark and Mini", category: "ad", domains: ["*.markandmini.com"] }, { name: "Marker", category: "utility", domains: ["*.marker.io"] }, { name: "Marketing Dashboards", company: "GroupM", category: "analytics", domains: ["*.m-decision.com"] }, { name: "Marketizator", category: "analytics", domains: ["*.marketizator.com"] }, { name: "Marketplace Web Service", company: "Amazon", category: "other", domains: ["*.ssl-images-amazon.com"] }, { name: "Mashable", category: "social", domains: ["*.mshcdn.com"] }, { name: "MatchWork", category: "utility", domains: ["*.matchwork.com"] }, { name: "MathJax", category: "utility", domains: ["*.mathjax.org"] }, { name: "Mather Economics", category: "analytics", domains: ["*.matheranalytics.com"] }, { name: "MaxCDN Enterprise", company: "MaxCDN", category: "utility", domains: ["*.netdna-cdn.com", "*.netdna-ssl.com"] }, { name: "MaxMind", category: "utility", domains: ["*.maxmind.com"] }, { name: "MaxPoint Interactive", category: "ad", domains: ["*.mxptint.net"] }, { name: "Maxsi", category: "analytics", domains: ["*.evisitanalyst.com"] }, { name: "Maxymiser", category: "analytics", domains: ["*.maxymiser.net, maxymiser.hs.llnwd.net"] }, { name: "McAffee", category: "utility", domains: ["*.mcafeesecure.com", "*.scanalert.com"] }, { name: "Measured", category: "analytics", domains: ["*.measured.com"], homepage: "https://www.measured.com/" }, { name: "Media IQ", category: "analytics", domains: ["*.mediaiqdigital.com"] }, { name: "Media Management Technologies", category: "ad", domains: ["*.speedshiftmedia.com"] }, { name: "Media Temple", category: "hosting", domains: ["*.goodlayers2.com"] }, { name: "Mediabong", category: "ad", domains: ["*.mediabong.net"] }, { name: "Mediahawk", category: "analytics", domains: ["*.mediahawk.co.uk"] }, { name: "Mediahub", category: "ad", domains: ["*.hubverifyandoptimize.com", "*.projectwatchtower.com"] }, { name: "Mediasyndicator", category: "ad", domains: ["*.creativesyndicator.com"] }, { name: "Medium", category: "content", domains: ["*.medium.com"] }, { name: "Meetrics", category: "ad", domains: ["*.de.com", "*.meetrics.net", "*.mxcdn.net"] }, { name: "Mega", company: "Mega Information Technology", category: "other", domains: ["*.mgcdn.com"] }, { name: "Melt", category: "ad", domains: ["*.meltdsp.com", "*.mesp.com"] }, { name: "Meltwater Group", category: "customer-success", domains: ["*.meltwaternews.com"] }, { name: "Meme", category: "ad", domains: ["*.viewwonder.com"] }, { name: "MentAd", category: "ad", domains: ["*.mentad.com"] }, { name: "Mention Me", category: "ad", domains: ["*.mention-me.com"] }, { name: "Merchant Equipment Store", category: "utility", domains: ["*.merchantequip.com"] }, { name: "Merchenta", category: "customer-success", domains: ["*.merchenta.com"] }, { name: "Merkle Digital Data Exchange", company: "Merkle", category: "ad", domains: ["*.brilig.com"] }, { name: "Merkle Paid Search", company: "Merkle", category: "ad", domains: ["*.rkdms.com"] }, { name: "Met Office", category: "content", domains: ["*.metoffice.gov.uk"] }, { name: "Meta Broadcast", category: "social", domains: ["*.metabroadcast.com"] }, { name: "Michael Associates", category: "ad", domains: ["*.checktestsite.com"] }, { name: "Michelin", category: "content", domains: ["*.viamichelin.com"] }, { name: "Microad", category: "ad", domains: ["*.microad.jp"] }, { name: "Microsoft Certificate Services", company: "Microsoft", category: "utility", domains: ["*.msocsp.com"] }, { name: "Microsoft Hosted Libs", company: "Microsoft", category: "cdn", domains: ["*.aspnetcdn.com"] }, { name: "Microsoft XBox Live", company: "Microsoft", category: "marketing", domains: ["*.xboxlive.com"] }, { name: "Mightypop", category: "ad", domains: ["*.mightypop.ca"] }, { name: "Mika Tuupola", category: "utility", domains: ["*.appelsiini.net"] }, { name: "Millennial Media", category: "ad", domains: ["*.jumptap.com"] }, { name: "Mirror Image Internet", category: "utility", domains: ["*.miisolutions.net"] }, { name: "Mobify", category: "utility", domains: ["*.mobify.com", "*.mobify.net"] }, { name: "Mobile Nations", category: "social", domains: ["*.mobilenations.com"] }, { name: "Mobivate", category: "ad", domains: ["*.mobivatebulksms.com"] }, { name: "Momondo", category: "content", domains: ["*.momondo.dk"] }, { name: "Momondo Group", category: "content", domains: ["*.momondogrouo.com", "*.momondogroup.com"] }, { name: "Monarch Ads", category: "ad", domains: ["*.monarchads.com"] }, { name: "Monetate", category: "analytics", domains: ["*.monetate.net"] }, { name: "MonetizeMore", category: "ad", domains: ["*.m2.ai"] }, { name: "Monitor", company: "Econda", category: "analytics", domains: ["*.econda-monitor.de"] }, { name: "Monkey Frog Media", category: "content", domains: ["*.monkeyfrogmedia.com"] }, { name: "Monotype", category: "cdn", domains: ["*.fonts.com", "*.fonts.net"] }, { name: "Moore-Wilson", category: "ad", domains: ["*.mwdev.co.uk"] }, { name: "Moovweb", category: "utility", domains: ["*.moovweb.net"] }, { name: "Mopinion", category: "analytics", domains: ["*.mopinion.com"] }, { name: "MotionPoint", category: "other", domains: ["*.convertlanguage.com"] }, { name: "Mouse3K", category: "analytics", domains: ["*.mouse3k.com"] }, { name: "MouseStats", category: "analytics", domains: ["*.mousestats.com"] }, { name: "Mouseflow", homepage: "https://mouseflow.com/", category: "analytics", domains: ["*.mouseflow.com"] }, { name: "Movable Ink", category: "analytics", domains: ["*.micpn.com"] }, { name: "MovingIMAGE24", category: "content", domains: ["*.edge-cdn.net"] }, { name: "Moxielinks", category: "ad", domains: ["*.moxielinks.com"] }, { name: "Moz Recommended Companies", company: "Moz", category: "analytics", domains: ["d2eeipcrcdle6.cloudfront.net"] }, { name: "Mozilla", category: "utility", domains: ["*.mozilla.org"] }, { name: "Multiview", category: "content", domains: ["*.multiview.com", "*.track-mv.com"] }, { name: "Mux", category: "analytics", domains: ["*.litix.io"] }, { name: "MyAds", company: "MyBuys", category: "analytics", domains: ["*.veruta.com"] }, { name: "MyBuys", category: "analytics", domains: ["*.mybuys.com"] }, { name: "MyFonts", category: "cdn", domains: ["*.myfonts.net"] }, { name: "MyRegistry", category: "other", domains: ["*.myregistry.com"] }, { name: "MySpace", company: "Specific Media", category: "social", domains: ["*.myspace.com"] }, { name: "Mynewsdesk", category: "utility", domains: ["*.mynewsdesk.com"] }, { name: "NAVIS", category: "content", domains: ["*.navistechnologies.info"] }, { name: "NCC Group Real User Monitoring", company: "NCC Group", category: "analytics", domains: ["*.nccgroup-webperf.com"] }, { name: "NEORY Marketing Cloud", company: "NEORY", category: "marketing", domains: ["*.ad-srv.net"] }, { name: "Nanigans", category: "ad", domains: ["*.nanigans.com"] }, { name: "Nano Interactive", category: "ad", domains: ["*.audiencemanager.de"] }, { name: "Nanorep", company: "Nanorep Technologies", category: "customer-success", domains: ["*.nanorep.com"] }, { name: "Narrative", category: "ad", domains: ["*.narrative.io"] }, { name: "Native Ads", category: "ad", domains: ["*.nativeads.com"] }, { name: "Nativo", category: "ad", domains: ["*.postrelease.com"] }, { name: "Navegg", category: "ad", domains: ["*.navdmp.com"] }, { name: "NaviStone", category: "ad", domains: ["*.murdoog.com"] }, { name: "Naytev", category: "analytics", domains: ["*.naytev.com"] }, { name: "Needle", category: "analytics", domains: ["*.needle.com"] }, { name: "Neiman Marcus", category: "content", domains: ["*.ctscdn.com"] }, { name: "Nend", category: "ad", domains: ["*.nend.net"] }, { name: "Neodata", category: "ad", domains: ["*.neodatagroup.com"] }, { name: "Net Applications", category: "analytics", domains: ["*.hitsprocessor.com"] }, { name: "Net Reviews", category: "analytics", domains: ["*.avis-verifies.com"] }, { name: "NetAffiliation", company: "Kwanco", category: "ad", domains: ["*.metaffiliation.com"] }, { name: "NetDirector", company: "G-Forces Web Management", category: "other", domains: ["*.netdirector.co.uk"] }, { name: "NetFlix", category: "content", domains: ["*.nflxext.com", "*.nflximg.net"] }, { name: "Nielsen NetRatings SiteCensus", company: "The Nielsen Company", homepage: "http://www.nielsen-online.com/intlpage.html", category: "analytics", domains: ["*.imrworldwide.com"] }, { name: "NetSeer", category: "ad", domains: ["*.netseer.com", "*.ns-cdn.com"] }, { name: "NetShelter", company: "Ziff Davis Tech", category: "ad", domains: ["*.netshelter.net"] }, { name: "Netmining", company: "Ignition One", category: "ad", domains: ["*.netmng.com"] }, { name: "Netop", category: "customer-success", domains: ["*.netop.com"] }, { name: "Network Solutions", category: "utility", domains: ["*.netsolssl.com", "*.networksolutions.com"] }, { name: "Neustar AdAdvisor", company: "Neustar", category: "ad", domains: ["*.adadvisor.net"] }, { name: "New Approach Media", category: "ad", domains: ["*.newapproachmedia.co.uk"] }, { name: "NewShareCounts", category: "social", domains: ["*.newsharecounts.com"] }, { name: "News", category: "social", domains: ["*.news.com.au", "*.newsanalytics.com.au", "*.newsapi.com.au", "*.newscdn.com.au", "*.newsdata.com.au", "*.newsdiscover.com.au", "*.news-static.com"] }, { name: "Newsquest", category: "content", domains: ["*.newsquestdigital.co.uk"] }, { name: "Newzulu", category: "content", domains: ["*.filemobile.com", "*.projects.fm"] }, { name: "Nexcess.Net", category: "hosting", domains: ["*.nexcesscdn.net"] }, { name: "Nexstar Media Group", category: "ad", domains: ["*.yashi.com"] }, { name: "NextPerf", company: "Rakuten Marketing", category: "ad", domains: ["*.nxtck.com"] }, { name: "Nine.com.au", company: "Nine Digital", category: "content", domains: ["*.9msn.com.au"] }, { name: "NitroSell", category: "hosting", domains: ["*.nitrosell.com"] }, { name: "Nochex", category: "utility", domains: ["*.nochex.com"] }, { name: "Northern &amp; Shell Media Group", category: "content", domains: ["*.northernandshell.co.uk"] }, { name: "Nosto", category: "analytics", domains: ["*.nosto.com"] }, { name: "Now Interact", category: "analytics", domains: ["*.nowinteract.com"] }, { name: "Numberly", company: "1000mercis", category: "ad", domains: ["*.mmtro.com", "*.nzaza.com"] }, { name: "NyaConcepts", category: "analytics", domains: ["*.xclusive.ly"] }, { name: "O2", category: "other", domains: ["*.o2.co.uk"] }, { name: "GoDaddy", homepage: "https://www.godaddy.com/", category: "utility", domains: ["*.godaddy.com", "*.wsimg.com"] }, { name: "ObjectPlanet", category: "analytics", domains: ["*.easypolls.net"] }, { name: "OhMyAd", category: "ad", domains: ["*.ohmyad.co"] }, { name: "Okas Concepts", category: "utility", domains: ["*.okasconcepts.com"] }, { name: "Okta", category: "analytics", domains: ["*.okta.com"] }, { name: "Olapic", category: "content", domains: ["*.photorank.me"] }, { name: "Ometria", category: "analytics", domains: ["*.ometria.com"] }, { name: "Omniconvert", category: "analytics", domains: ["*.omniconvert.com", "d2tgfbvjf3q6hn.cloudfront.net", "d3vbj265bmdenw.cloudfront.net"] }, { name: "Omniroot", company: "Verizon", category: "utility", domains: ["*.omniroot.com"] }, { name: "OnAudience", company: "Cloud Technologies", category: "ad", domains: ["*.onaudience.com"] }, { name: "OnScroll", category: "ad", domains: ["*.onscroll.com"] }, { name: "OnState", category: "ad", domains: ["*.onstate.co.uk"] }, { name: "OnYourMap", category: "utility", domains: ["*.onyourmap.com"] }, { name: "One by AOL", company: "AOL", category: "ad", domains: ["*.adtechjp.com", "*.adtech.de"] }, { name: "One by AOL:Mobile", company: "AOL", category: "ad", domains: ["*.nexage.com"] }, { name: "OneAll", category: "analytics", domains: ["*.oneall.com"] }, { name: "OneSoon", category: "analytics", domains: ["*.adalyser.com"] }, { name: "OneTag", category: "ad", domains: ["*.onetag-sys.com"] }, { name: "Onet", category: "ad", domains: ["*.onet.pl"] }, { name: "Online Rewards", company: "Mastercard", category: "ad", domains: ["*.loyaltygateway.com"] }, { name: "Online republic", category: "content", domains: ["*.imallcdn.net"] }, { name: "Ooyala", category: "ad", domains: ["*.ooyala.com"] }, { name: "OpenTable", company: "Priceline Group", category: "content", domains: ["*.opentable.com", "*.opentable.co.uk", "*.toptable.co.uk"] }, { name: "OpenX Ad Exchange", company: "OpenX Technologies", category: "ad", domains: ["*.liftdna.com"] }, { name: "Opinion Stage", category: "analytics", domains: ["*.opinionstage.com"] }, { name: "OpinionBar", category: "analytics", domains: ["*.opinionbar.com"] }, { name: "Opta", company: "Perform Group", category: "content", domains: ["*.opta.net"] }, { name: "OptiMonk", category: "ad", domains: ["*.optimonk.com"] }, { name: "Optilead", category: "analytics", domains: ["*.dyn-img.com", "*.leadcall.co.uk", "*.optilead.co.uk"] }, { name: "Optimatic", category: "ad", domains: ["*.optimatic.com"] }, { name: "Optimise Media Group", category: "utility", domains: ["*.omguk.com"] }, { name: "Optimost", company: "OpenText", category: "ad", domains: ["*.optimost.com"] }, { name: "Optimove", company: "Mobius Solutions", category: "analytics", domains: ["*.optimove.net"] }, { name: "Optorb", category: "ad", domains: ["*.optorb.com"] }, { name: "Oracle", category: "marketing", domains: ["*.custhelp.com", "*.eloqua.com", "*.en25.com", "*.estara.com", "*.instantservice.com"] }, { name: "Oracle Recommendations On Demand", company: "Oracle", category: "analytics", domains: ["*.atgsvcs.com"] }, { name: "Oracle Responsys", company: "Oracle", category: "marketing", domains: ["*.adrsp.net", "*.responsys.net"] }, { name: "Order Security-VOID", company: "Order Security", category: "analytics", domains: ["*.order-security.com"] }, { name: "Oriel", category: "ad", domains: ["*.oriel.io"] }, { name: "Outbrain", homepage: "https://www.outbrain.com/", category: "ad", domains: ["*.outbrain.com", "*.outbrainimg.com", "*.visualrevenue.com"] }, { name: "OverStream", company: "Coull", category: "ad", domains: ["*.coull.com"] }, { name: "Overdrive", category: "content", domains: ["*.contentreserve.com"] }, { name: "Overstock", category: "utility", domains: ["*.ostkcdn.com"] }, { name: "OwnerIQ", category: "ad", domains: ["*.owneriq.net"] }, { name: "OzCart", category: "utility", domains: ["*.ozcart.com.au"] }, { name: "Ozone Media", category: "ad", domains: ["*.adadyn.com"] }, { name: "Loqate", company: "Loqate", category: "other", domains: ["*.pcapredict.com", "*.postcodeanywhere.co.uk"] }, { name: "PEER 1 Hosting", category: "hosting", domains: ["*.peer1.com"] }, { name: "PERFORM", category: "content", domains: ["*.performgroup.com"] }, { name: "PICnet", category: "hosting", domains: ["*.nonprofitsoapbox.com"] }, { name: "Pacnet", company: "Telstra", category: "other", domains: ["*.cdndelivery.net"] }, { name: "Pagefair", category: "ad", domains: ["*.pagefair.com", "*.pagefair.net"] }, { name: "Pagely", category: "other", domains: ["*.optnmstr.com"] }, { name: "Pagesuite", category: "ad", domains: ["*.pagesuite-professional.co.uk"] }, { name: "Pardot", category: "marketing", domains: ["*.pardot.com"] }, { name: "Parse.ly", category: "analytics", domains: ["*.parsely.com", "d1z2jf7jlzjs58.cloudfront.net"] }, { name: "Pay per Click", company: "Eysys", category: "ad", domains: ["*.eysys.com"] }, { name: "PayPal Ads", category: "ad", domains: ["*.where.com"] }, { name: "Peaks & Pies", category: "analytics", domains: ["*.bunchbox.co"] }, { name: "PebblePost", category: "ad", domains: ["*.pbbl.co"] }, { name: "Peerius", category: "analytics", domains: ["*.peerius.com"] }, { name: "Peermap", company: "IMRG", category: "analytics", domains: ["peermapcontent.affino.com"] }, { name: "Penske Media", category: "content", domains: ["*.pmc.com"] }, { name: "Penton", category: "utility", domains: ["*.pisces-penton.com"] }, { name: "Pepper", category: "ad", domains: ["*.peppercorp.com"] }, { name: "Perfect Audience", company: "Marin Software", category: "ad", domains: ["*.prfct.co", "*.marinsm.com", "*.perfectaudience.com"] }, { name: "Perfect Market", category: "ad", domains: ["*.perfectmarket.com"] }, { name: "Perfect Privacy", category: "other", domains: ["*.suitesmart.com"] }, { name: "Perform Group", category: "content", domains: ["*.performfeeds.com", "*.premiumtv.co.uk"] }, { name: "Performio", category: "ad", domains: ["*.performax.cz"] }, { name: "PerimeterX Bot Defender", company: "PerimeterX", category: "utility", domains: ["*.perimeterx.net", "*.pxi.pub"] }, { name: "Periscope", category: "content", domains: ["*.periscope.tv"] }, { name: "Permutive", category: "ad", domains: ["*.permutive.com", "d3alqb8vzo7fun.cloudfront.net"] }, { name: "Petametrics", category: "analytics", domains: ["*.petametrics.com"] }, { name: "PhotoBucket", category: "content", domains: ["*.photobucket.com"] }, { name: "Picreel", category: "analytics", domains: ["*.pcrl.co", "*.picreel.com"] }, { name: "Pictela (AOL)", category: "analytics", domains: ["*.pictela.net"] }, { name: "PistonHeads", category: "social", domains: ["*.pistonheads.com"] }, { name: "Piwik", category: "analytics", domains: ["*.drtvtracker.com", "*.piwikpro.com", "*.raac33.net"] }, { name: "Pixalate", category: "utility", domains: ["*.adrta.com"] }, { name: "Pixlee", category: "social", domains: ["*.pixlee.com"] }, { name: "Placed", category: "analytics", domains: ["*.placed.com"] }, { name: "Planning-inc", category: "analytics", domains: ["*.planning-inc.co.uk"] }, { name: "PlayAd Media Group", category: "ad", domains: ["*.youplay.se"] }, { name: "Playbuzz", category: "hosting", domains: ["*.playbuzz.com"] }, { name: "Pleenq", category: "ad", domains: ["*.pleenq.com"] }, { name: "Plentific", category: "content", domains: ["*.plentific.com"] }, { name: "PluginDetect", category: "other", domains: ["dtlilztwypawv.cloudfront.net"] }, { name: "Po.st", company: "RadiumOne", category: "utility", domains: ["*.po.st"] }, { name: "Pointpin", category: "utility", domains: ["*.pointp.in"] }, { name: "Pointroll (Garnett)", category: "ad", domains: ["*.pointroll.com"] }, { name: "Polar", homepage: "https://polar.me/", category: "ad", domains: ["*.polarmobile.ca", "*.mediaeverywhere.com", "*.mediavoice.com", "*.plrsrvcs.com", "*.polarcdn-engine.com", "*.polarcdn-meraxes.com", "*.polarcdn-pentos.com", "*.polarcdn-static.com", "*.polarcdn-terrax.com", "*.polarcdn.com", "*.polarmobile.com", "*.poweredbypolar.com", "*.mediaconductor.me", "*.polaracademy.me"] }, { name: "PollDaddy (Automattic)", category: "ad", domains: ["static.polldaddy.com", "*.poll.fm"] }, { name: "Polldaddy", company: "Automattic", category: "analytics", domains: ["polldaddy.com", "*.polldaddy.com"] }, { name: "Polyfill service", company: "Polyfill.io", category: "other", domains: ["*.polyfill.io"] }, { name: "MegaPopAds", category: "ad", domains: ["*.megapopads.com"] }, { name: "Populis", category: "ad", domains: ["*.populisengage.com"] }, { name: "Postimage.org", category: "content", domains: ["*.postimg.org"] }, { name: "PowerFront", category: "hosting", domains: ["*.inside-graph.com"] }, { name: "PowerReviews", category: "analytics", domains: ["*.powerreviews.com"] }, { name: "Powerlinks.com", category: "ad", domains: ["*.powerlinks.com"] }, { name: "Press+", category: "ad", domains: ["*.pipol.com", "*.ppjol.com", "*.ppjol.net"] }, { name: "PressArea", category: "utility", domains: ["*.pressarea.com"] }, { name: "Pretio Interactive", category: "ad", domains: ["*.pretio.in"] }, { name: "Prezi", category: "utility", domains: ["*.prezi.com"] }, { name: "PriceGrabber", category: "content", domains: ["*.pgcdn.com", "*.pricegrabber.com"] }, { name: "PriceRunner", category: "content", domains: ["*.pricerunner.com"] }, { name: "PrintFriendly", category: "utility", domains: ["*.printfriendly.com"] }, { name: "Privy", category: "ad", domains: ["*.privy.com", "*.privymktg.com"] }, { name: "Proclivity Media", category: "analytics", domains: ["*.pswec.com"] }, { name: "Profitshare", category: "ad", domains: ["*.profitshare.ro"] }, { name: "Programattik", category: "ad", domains: ["*.programattik.com"] }, { name: "Proper Media", category: "content", domains: ["*.proper.io"] }, { name: "Property Week", category: "content", domains: ["*.propertyweek.com"] }, { name: "Provide Support", category: "customer-success", domains: ["*.providesupport.com"] }, { name: "Proweb Uk", category: "hosting", domains: ["*.proweb.net"] }, { name: "Proximic (ComScore)", category: "ad", domains: ["*.proximic.com"] }, { name: "Psyma", category: "ad", domains: ["*.psyma.com"] }, { name: "PubFactory", company: "Safari Books Online", category: "content", domains: ["*.pubfactory.com"] }, { name: "PubNation", category: "ad", domains: ["*.pubnation.com"] }, { name: "Publicidad.net", category: "ad", domains: ["*.publicidad.tv"] }, { name: "PublishThis", company: "Ultra Unlimited", category: "ad", domains: ["*.publishthis.com"] }, { name: "Pulse Insights", category: "analytics", domains: ["*.pulseinsights.com"] }, { name: "Pulsepoint", category: "marketing", domains: ["*.displaymarketplace.com"] }, { name: "Purch", category: "ad", domains: ["*.bestofmedia.com", "*.purch.com"] }, { name: "Pure Chat", category: "customer-success", domains: ["*.purechat.com"] }, { name: "PushCrew", category: "ad", domains: ["*.pushcrew.com"] }, { name: "Q1Media", category: "ad", domains: ["*.q1media.com", "*.q1mediahydraplatform.com"] }, { name: "Qbase Software Development", category: "hosting", domains: ["*.smartwebportal.co.uk"] }, { name: "Qeryz", category: "analytics", domains: ["*.qeryz.com"] }, { name: "Qode Interactive", category: "hosting", domains: ["*.qodeinteractive.com"] }, { name: "Qrius", category: "social", domains: ["*.qrius.me"] }, { name: "Qualaroo", category: "analytics", domains: ["*.qualaroo.com"] }, { name: "Qualtrics", category: "analytics", domains: ["*.qualtrics.com"] }, { name: "Qubit", company: "Qubit", category: "analytics", domains: ["*.qubit.com", "*.qutics.com", "d3c3cq33003psk.cloudfront.net", "*.goqubit.com", "*.qubitproducts.com"] }, { name: "Qubit Deliver", company: "Qubit", category: "analytics", domains: ["d1m54pdnjzjnhe.cloudfront.net", "d22rutvoghj3db.cloudfront.net", "dd6zx4ibq538k.cloudfront.net"] }, { name: "QuestionPro", category: "analytics", domains: ["*.questionpro.com"] }, { name: "Queue-it", category: "other", domains: ["*.queue-it.net"] }, { name: "QuinStreet", category: "ad", domains: ["*.Quinstreet.com", "*.b2btechleadform.com", "*.qnsr.com", "*.qsstats.com"] }, { name: "QuoVadis", category: "utility", domains: ["*.quovadisglobal.com"] }, { name: "Qzzr", category: "analytics", domains: ["*.movementventures.com", "*.qzzr.com"] }, { name: "RapidAPI", category: "utility", domains: ["*.rapidapi.com"] }, { name: "RCS Media Group", category: "ad", domains: ["*.rcsadv.it"] }, { name: "REVIVVE", category: "ad", domains: ["*.revivve.com"] }, { name: "RSSinclude", category: "social", domains: ["*.rssinclude.com"] }, { name: "RTB House AdPilot", company: "RTB House", category: "ad", domains: ["*.erne.co", "*.creativecdn.com"] }, { name: "RTB Media", category: "ad", domains: ["*.rtb-media.me"] }, { name: "RUN", category: "ad", domains: ["*.runadtag.com", "*.rundsp.com"] }, { name: "Rackspace", category: "hosting", domains: ["*.rackcdn.com", "*.rackspacecloud.com", "*.raxcdn.com", "*.websitetestlink.com"] }, { name: "RadiumOne", category: "ad", domains: ["*.gwallet.com", "*.r1-cdn.net"] }, { name: "Rakuten DC Storm", company: "Rakuten", category: "analytics", domains: ["*.dc-storm.com", "*.h4k5.com", "*.stormiq.com"] }, { name: "Rakuten LinkShare", company: "Rakuten", category: "ad", domains: ["*.linksynergy.com"] }, { name: "Rakuten Marketing", company: "Rakuten", category: "ad", domains: ["*.rakuten-static.com", "*.rmtag.com", "tag.rmp.rakuten.com"] }, { name: "Rakuten MediaForge", company: "Rakuten", category: "ad", domains: ["*.mediaforge.com"] }, { name: "Rambler", company: "Rambler & Co", category: "utility", domains: ["*.rambler.ru"] }, { name: "Ranker", category: "content", domains: ["*.ranker.com", "*.rnkr-static.com"] }, { name: "Ravelin", category: "utility", domains: ["*.ravelin.com"] }, { name: "Raygun", category: "utility", domains: ["*.raygun.io", "*.rapidzebra.io"] }, { name: "ReCollect", category: "utility", domains: ["*.recollect.net"] }, { name: "ReSRC", category: "utility", domains: ["*.resrc.it"] }, { name: "ReTargeter", category: "ad", domains: ["*.retargeter.com"] }, { name: "Reach Group", category: "ad", domains: ["*.redintelligence.net"] }, { name: "ReachDynamics", category: "ad", domains: ["*.rdcdn.com"] }, { name: "ReachForce", category: "ad", domains: ["*.reachforce.com"] }, { name: "ReachLocal", category: "ad", domains: ["*.rtrk.co.nz"] }, { name: "ReachMee", category: "content", domains: ["*.reachmee.com"] }, { name: "Reactful", category: "analytics", domains: ["*.reactful.com"] }, { name: "Realtime", company: "internet business technologies", category: "utility", domains: ["*.realtime.co"] }, { name: "Realtime Media (Brian Communications)", category: "ad", domains: ["*.rtm.com"] }, { name: "Realtime Targeting", category: "ad", domains: ["*.idtargeting.com"] }, { name: "Realytics", category: "analytics", domains: ["dcniko1cv0rz.cloudfront.net", "*.realytics.net"] }, { name: "RebelMouse", category: "ad", domains: ["*.rebelmouse.com", "*.rbl.ms"] }, { name: "Receiptful", category: "utility", domains: ["*.receiptful.com"] }, { name: "Recite Me", category: "other", domains: ["*.reciteme.com"] }, { name: "RecoBell", category: "analytics", domains: ["*.recobell.io"] }, { name: "Recommend", category: "analytics", domains: ["*.recommend.pro"] }, { name: "Red Eye International", category: "ad", domains: ["*.pajmc.com"] }, { name: "Redfish Group", category: "ad", domains: ["*.wmps.com"] }, { name: "Reevoo", category: "analytics", domains: ["*.reevoo.com"] }, { name: "Refersion", category: "ad", domains: ["*.refersion.com"] }, { name: "Refined Ads", category: "ad", domains: ["*.refinedads.com"] }, { name: "Reflektion", category: "analytics", domains: ["*.reflektion.com", "d26opx5dl8t69i.cloudfront.net"] }, { name: "Reflow", company: "Scenestealer", category: "ad", domains: ["*.reflow.tv"] }, { name: "Reklama", category: "ad", domains: ["*.o2.pl", "*.wp.pl"] }, { name: "Relevad ReleStar", company: "Relevad", category: "ad", domains: ["*.relestar.com"] }, { name: "Remarketing Pixel", company: "Adsterra Network", category: "ad", domains: ["*.datadbs.com", "*.remarketingpixel.com"] }, { name: "Remintrex", company: "SmartUp Venture", category: "ad", domains: ["*.remintrex.com"] }, { name: "Republer", category: "ad", domains: ["*.republer.com"] }, { name: "Research Now", category: "analytics", domains: ["*.researchgnow.com", "*.researchnow.com"] }, { name: "Research Online", company: "Skills Development Scotland", category: "content", domains: ["*.researchonline.org.uk"] }, { name: "Resonance Insights", category: "analytics", domains: ["*.res-x.com"] }, { name: "Resonate Networks", category: "analytics", domains: ["*.reson8.com"] }, { name: "Response Team", category: "ad", domains: ["*.i-transactads.com"] }, { name: "ResponseTap", category: "analytics", domains: ["*.adinsight.com", "*.responsetap.com"] }, { name: "ResponsiveVoice", category: "other", domains: ["*.responsivevoice.org"] }, { name: "Retention Science", category: "ad", domains: ["*.retentionscience.com", "d1stxfv94hrhia.cloudfront.net"] }, { name: "Revcontent", category: "content", domains: ["*.revcontent.com"] }, { name: "Revee", category: "ad", domains: ["*.revee.com"] }, { name: "Revenue Conduit", category: "utility", domains: ["*.revenueconduit.com"] }, { name: "RevenueMantra", category: "ad", domains: ["*.revenuemantra.com"] }, { name: "Reviews.co.uk", category: "analytics", domains: ["*.reviews.co.uk"] }, { name: "Reviews.io", category: "analytics", domains: ["*.reviews.io"] }, { name: "Revolver Maps", category: "analytics", domains: ["*.revolvermaps.com"] }, { name: "Revv", category: "utility", domains: ["*.revv.co"] }, { name: "RichRelevance", category: "analytics", domains: ["*.richrelevance.com"] }, { name: "RightNow Service Cloud", company: "Oracle", category: "customer-success", domains: ["*.rightnowtech.com", "*.rnengage.com"] }, { name: "Rightster", category: "ad", domains: ["*.ads-creativesyndicator.com"] }, { name: "Riskified", category: "utility", domains: ["*.riskified.com"] }, { name: "Rockerbox", category: "analytics", homepage: "https://www.rockerbox.com/", domains: ["getrockerbox.com"] }, { name: "Rocket Fuel", category: "ad", domains: ["*.rfihub.com", "*.ru4.com", "*.rfihub.net", "*.ad1x.com"] }, { name: "Rollbar", category: "utility", domains: ["*.rollbar.com", "d37gvrvc0wt4s1.cloudfront.net"] }, { name: "RomanCart", category: "utility", domains: ["*.romancart.com"] }, { name: "Rondavu", category: "ad", domains: ["*.rondavu.com"] }, { name: "Roomkey", category: "content", domains: ["*.roomkey.com"] }, { name: "Roost", category: "utility", domains: ["*.goroost.com"] }, { name: "Roxot", category: "ad", domains: ["*.rxthdr.com"] }, { name: "Roxr Software", category: "analytics", domains: ["*.getclicky.com"] }, { name: "Rtoaster", company: "Brainpad", homepage: "https://www.brainpad.co.jp/rtoaster/", category: "marketing", domains: ["*.rtoaster.jp"] }, { name: "Rubikloud.com", category: "analytics", domains: ["*.rubikloud.com"] }, { name: "Ruler Analytics", company: "Ruler", category: "analytics", domains: ["*.nyltx.com", "*.ruleranalytics.com"] }, { name: "Runner", company: "Rambler & Co", category: "content", domains: ["*.begun.ru"] }, { name: "S4M", category: "ad", domains: ["*.sam4m.com"] }, { name: "SAP Hybris Marketing Convert", company: "SAP", category: "ad", domains: ["*.seewhy.com"] }, { name: "SAS Institute", category: "ad", domains: ["*.aimatch.com", "*.sas.com"] }, { name: "SATORI", homepage: "https://satori.marketing/", category: "marketing", domains: ["satori.segs.jp"] }, { name: "SC ShopMania Net SRL", category: "content", domains: ["*.shopmania.com"] }, { name: "SDL Media Manager", company: "SDL", category: "other", domains: ["*.sdlmedia.com"] }, { name: "SFR", category: "other", domains: ["*.sfr.fr"] }, { name: "SLI Systems", category: "utility", domains: ["*.resultslist.com", "*.resultspage.com", "*.sli-spark.com"] }, { name: "SMARTASSISTANT", company: "Smart Information Systems", category: "customer-success", domains: ["*.smartassistant.com"] }, { name: "SMARTSTREAM.TV", category: "ad", domains: ["*.smartstream.tv"] }, { name: "SPX", company: "Smaato", category: "ad", domains: ["*.smaato.net"] }, { name: "Sabio", category: "customer-success", domains: ["*.sabio.co.uk"] }, { name: "Sailthru", category: "analytics", domains: ["*.sail-horizon.com", "*.sail-personalize.com", "*.sail-track.com"] }, { name: "Sailthru Sightlines", company: "Sailthru", category: "marketing", domains: ["*.sailthru.com"] }, { name: "Sajari Pty", category: "utility", domains: ["*.sajari.com"] }, { name: "SaleCycle", category: "ad", domains: ["*.salecycle.com", "d16fk4ms6rqz1v.cloudfront.net", "d22j4fzzszoii2.cloudfront.net", "d30ke5tqu2tkyx.cloudfront.net", "dn1i8v75r669j.cloudfront.net"] }, { name: "Salesforce Live Agent", company: "Salesforce.com", category: "customer-success", domains: ["*.salesforceliveagent.com"] }, { name: "Salesforce.com", category: "ad", domains: ["*.force.com", "*.salesforce.com"] }, { name: "Samba TV", company: "Samba", category: "content", domains: ["*.samba.tv"] }, { name: "Samplicio.us", category: "analytics", domains: ["*.samplicio.us"] }, { name: "Say Media", category: "ad", domains: ["*.saymedia.com"] }, { name: "Scenario", category: "analytics", domains: ["*.getscenario.com"] }, { name: "Schuh (image shard)", company: "Schuh", category: "other", domains: ["d2ob0iztsaxy5v.cloudfront.net"] }, { name: "Science Rockstars", category: "analytics", domains: ["*.persuasionapi.com"] }, { name: "ScientiaMobile", category: "analytics", domains: ["*.wurflcloud.com", "*.wurfl.io"] }, { name: "Scoota", category: "ad", domains: ["*.rockabox.co", "*.scoota.co", "d31i2625d5nv27.cloudfront.net", "dyjnzf8evxrp2.cloudfront.net"] }, { name: "ScribbleLive", category: "ad", domains: ["*.scribblelive.com"] }, { name: "SearchForce", category: "ad", domains: ["*.searchforce.net"] }, { name: "SearchSpring", category: "utility", domains: ["*.searchspring.net"] }, { name: "Searchanise", category: "analytics", domains: ["*.searchanise.com"] }, { name: "Sears Holdings", category: "content", domains: ["*.shld.net"] }, { name: "Secomapp", category: "utility", domains: ["*.secomapp.com"] }, { name: "SecuredVisit", company: "4Cite Marketing", category: "ad", domains: ["*.securedvisit.com"] }, { name: "SecurityMetrics", category: "utility", domains: ["*.securitymetrics.com"] }, { name: "Segmento", category: "ad", domains: ["*.rutarget.ru"] }, { name: "Segmint", category: "analytics", domains: ["*.segmint.net"] }, { name: "Sekindo", category: "content", domains: ["*.sekindo.com"] }, { name: "Seldon", category: "analytics", domains: ["*.rummblelabs.com"] }, { name: "SelectMedia International", category: "content", domains: ["*.selectmedia.asia"] }, { name: "Selligent", category: "ad", domains: ["*.emsecure.net", "*.slgnt.eu", "targetemsecure.blob.core.windows.net"] }, { name: "Sellpoints", category: "analytics", domains: ["*.sellpoints.com"] }, { name: "Semantics3", category: "analytics", domains: ["*.hits.io"] }, { name: "Semasio", category: "analytics", domains: ["*.semasio.net"] }, { name: "Semcasting Site Visitor Attribution", company: "Semcasting", category: "ad", domains: ["*.smartzonessva.com"] }, { name: "Sentifi", category: "social", domains: ["*.sentifi.com"] }, { name: "ServMetric", category: "analytics", domains: ["*.servmetric.com"] }, { name: "ServiceSource International", category: "marketing", domains: ["*.scoutanalytics.net"] }, { name: "ServiceTick", category: "analytics", domains: ["*.servicetick.com"] }, { name: "Servo", company: "Xervo", category: "hosting", domains: ["*.onmodulus.net"] }, { name: "SessionCam", company: "ServiceTick", category: "analytics", domains: ["*.sessioncam.com", "d2oh4tlt9mrke9.cloudfront.net"] }, { name: "Seznam", category: "utility", domains: ["*.imedia.cz"] }, { name: "Sharethrough", category: "ad", domains: ["*.sharethrough.com"] }, { name: "SharpSpring", category: "marketing", domains: ["*.sharpspring.com", "*.marketingautomation.services"] }, { name: "ShopRunner", category: "content", domains: ["*.shoprunner.com", "*.s-9.us"] }, { name: "ShopStorm", category: "utility", domains: ["*.shopstorm.com"] }, { name: "Shopatron", category: "hosting", domains: ["*.shopatron.com"] }, { name: "Shopgate", category: "utility", domains: ["*.shopgate.com"] }, { name: "ShopiMind", company: "ShopIMind", category: "ad", domains: ["*.shopimind.com"] }, { name: "Shopkeeper Tools", category: "utility", domains: ["*.shopkeepertools.com"] }, { name: "Sidecar", category: "other", domains: ["*.getsidecar.com", "d3v27wwd40f0xu.cloudfront.net"] }, { name: "Sidereel", category: "analytics", domains: ["*.sidereel.com"] }, { name: "Sift Science", category: "utility", domains: ["*.siftscience.com"] }, { name: "Signal", category: "tag-manager", domains: ["*.sitetagger.co.uk"] }, { name: "Signyfyd", category: "utility", domains: ["*.signifyd.com"] }, { name: "Silktide", category: "hosting", domains: ["*.silktide.com"] }, { name: "Silverpop", company: "IBM", category: "ad", domains: ["*.mkt912.com", "*.mkt922.com", "*.mkt932.com", "*.mkt941.com", "*.mkt51.net", "*.mkt61.net", "*.pages01.net", "*.pages02.net", "*.pages03.net", "*.pages04.net", "*.pages05.net"] }, { name: "Simplaex", category: "marketing", domains: ["*.simplaex.net"] }, { name: "SimpleReach", category: "analytics", domains: ["*.simplereach.com", "d8rk54i4mohrb.cloudfront.net"] }, { name: "Simplestream", category: "content", domains: ["*.simplestream.com"] }, { name: "Simpli.fi", category: "ad", domains: ["*.simpli.fi"] }, { name: "Simplicity Marketing", category: "ad", domains: ["*.flashtalking.com"] }, { name: "SinnerSchrader Deutschland", category: "ad", domains: ["*.s2Betrieb.de"] }, { name: "Sirv", category: "other", domains: ["*.sirv.com"] }, { name: "Site Meter", category: "analytics", domains: ["*.sitemeter.com"] }, { name: "Site24x7 Real User Monitoring", company: "Site24x7", category: "analytics", domains: ["*.site24x7rum.com"] }, { name: "SiteGainer", category: "analytics", domains: ["*.sitegainer.com", "d191y0yd6d0jy4.cloudfront.net"] }, { name: "SiteScout", company: "Centro", category: "ad", domains: ["*.pixel.ad", "*.sitescout.com"] }, { name: "Siteimprove", category: "utility", domains: ["*.siteimprove.com", "*.siteimproveanalytics.com"] }, { name: "Six Degrees Group", category: "hosting", domains: ["*.fstech.co.uk"] }, { name: "Skimbit", category: "ad", domains: ["*.redirectingat.com", "*.skimresources.com", "*.skimresources.net"] }, { name: "Skimlinks", category: "ad", domains: ["*.skimlinks.com"] }, { name: "SkyGlue Technology", category: "analytics", domains: ["*.skyglue.com"] }, { name: "SkyScanner", category: "content", domains: ["*.skyscanner.net"] }, { name: "Skybet", company: "Bonne Terre t/a Sky Vegas (Sky)", category: "other", domains: ["*.skybet.com"] }, { name: "Skype", category: "other", domains: ["*.skype.com"] }, { name: "Slate Group", category: "content", domains: ["*.cdnslate.com"] }, { name: "SlimCut Media Outstream", company: "SlimCut Media", category: "ad", domains: ["*.freeskreen.com"] }, { name: "Smart Insight Tracking", company: "Emarsys", category: "analytics", domains: ["*.scarabresearch.com"] }, { name: "Smart AdServer", category: "ad", domains: ["*.01net.com", "*.sascdn.com", "*.sasqos.com", "*.smartadserver.com"] }, { name: "SmartFocus", category: "analytics", domains: ["*.emv2.com", "*.emv3.com", "*.predictiveintent.com", "*.smartfocus.com", "*.themessagecloud.com"] }, { name: "Smarter Click", category: "ad", domains: ["*.smct.co", "*.smarterclick.co.uk"] }, { name: "SmarterHQ", category: "analytics", domains: ["*.smarterhq.io", "d1n00d49gkbray.cloudfront.net", "*.smarterremarketer.net"] }, { name: "Smarttools", category: "customer-success", domains: ["*.smartertrack.com"] }, { name: "Smartzer", category: "ad", domains: ["*.smartzer.com"] }, { name: "Snack Media", category: "content", domains: ["*.snack-media.com"] }, { name: "Snacktools", category: "ad", domains: ["*.bannersnack.com"] }, { name: "SnapEngage", category: "customer-success", domains: ["*.snapengage.com"] }, { name: "SnapWidget", category: "content", domains: ["*.snapwidget.com"] }, { name: "Soasta", category: "analytics", domains: ["*.lognormal.net"] }, { name: "SociableLabs", category: "ad", domains: ["*.sociablelabs.net", "*.sociablelabs.com"] }, { name: "Social Annex", category: "customer-success", domains: ["*.socialannex.com"] }, { name: "SocialShopWave", category: "social", domains: ["*.socialshopwave.com"] }, { name: "Socialphotos", category: "social", domains: ["*.slpht.com"] }, { name: "Sociomantic Labs", company: "DunnHumby", category: "ad", domains: ["*.sociomantic.com"] }, { name: "SodaHead", category: "analytics", domains: ["*.sodahead.com"] }, { name: "Softwebzone", category: "hosting", domains: ["*.softwebzone.com"] }, { name: "Sojern", category: "marketing", domains: ["*.sojern.com"] }, { name: "Sokrati", category: "marketing", domains: ["*.sokrati.com"] }, { name: "Sonobi", category: "ad", domains: ["*.sonobi.com"] }, { name: "Sooqr Search", company: "Sooqr", category: "utility", domains: ["*.sooqr.com"] }, { name: "Sophus3", category: "analytics", domains: ["*.s3ae.com", "*.sophus3.com"] }, { name: "Sorenson Media", category: "content", domains: ["*.sorensonmedia.com"] }, { name: "Sortable", category: "ad", domains: ["*.deployads.com"] }, { name: "Sotic", category: "hosting", domains: ["*.sotic.net", "*.soticservers.net"] }, { name: "Soundest", category: "ad", domains: ["*.soundestlink.com", "*.soundest.net"] }, { name: "Sourcepoint", category: "ad", domains: ["*.decenthat.com", "*.fallingfalcon.com", "*.summerhamster.com", "d2lv4zbk7v5f93.cloudfront.net", "d3qxwzhswv93jk.cloudfront.net"] }, { name: "SourceKnowledge", homepage: "https://www.sourceknowledge.com", category: "ad", domains: ["*.provenpixel.com"] }, { name: "SpaceNet", category: "hosting", domains: ["*.nmm.de"] }, { name: "Sparkflow", company: "Intercept Interactive", category: "ad", domains: ["*.sparkflow.net"] }, { name: "Specific Media", category: "ad", domains: ["*.specificmedia.com", "*.adviva.net", "*.specificclick.net"] }, { name: "Spicy", company: "Data-Centric Alliance", category: "ad", domains: ["*.sspicy.ru"] }, { name: "Spoke", category: "customer-success", domains: ["*.121d8.com"] }, { name: "Spongecell", category: "ad", domains: ["*.spongecell.com"] }, { name: "Spot.IM", category: "social", domains: ["*.spot.im", "*.spotim.market"] }, { name: "SpotXchange", category: "ad", domains: ["*.spotxcdn.com", "*.spotxchange.com", "*.spotx.tv"] }, { name: "SpringServer", category: "ad", domains: ["*.springserve.com"] }, { name: "Spylight", category: "other", domains: ["*.spylight.com"] }, { name: "SreamAMG", company: "StreamAMG", category: "other", domains: ["*.streamamg.com"] }, { name: "StackAdapt", category: "ad", domains: ["*.stackadapt.com"] }, { name: "StackExchange", category: "social", domains: ["*.sstatic.net"] }, { name: "Stackla PTY", category: "social", domains: ["*.stackla.com"] }, { name: "Stailamedia", category: "ad", domains: ["*.stailamedia.com"] }, { name: "Stamped.io", category: "analytics", domains: ["*.stamped.io"] }, { name: "Starfield Services Root Certificate Authority", company: "Starfield Technologies", category: "utility", domains: ["*.starfieldtech.com", "ss2.us", "*.ss2.us"] }, { name: "Starfield Technologies", category: "utility", domains: ["*.websiteprotection.com"] }, { name: "StatCounter", category: "analytics", domains: ["*.statcounter.com"] }, { name: "Statful", category: "analytics", domains: ["*.statful.com"] }, { name: "Steelhouse", category: "ad", domains: ["*.steelhousemedia.com"] }, { name: "Steepto", category: "ad", domains: ["*.steepto.com"] }, { name: "StellaService", category: "analytics", domains: ["*.stellaservice.com"] }, { name: "StickyADS.tv", category: "ad", domains: ["*.stickyadstv.com"] }, { name: "STINGRAY", company: "FlexOne", category: "ad", domains: ["*.impact-ad.jp"] }, { name: "Storify", company: "Adobe Systems", category: "social", domains: ["*.storify.com"] }, { name: "Storm Tag Manager", company: "Rakuten", category: "tag-manager", domains: ["*.stormcontainertag.com"] }, { name: "Storygize", category: "ad", domains: ["*.storygize.net"] }, { name: "Strands", category: "utility", domains: ["*.strands.com"] }, { name: "StreamRail", category: "ad", domains: ["*.streamrail.com", "*.streamrail.net"] }, { name: "StrikeAd", category: "ad", domains: ["*.strikead.com"] }, { name: "Struq", company: "Quantcast", category: "ad", domains: ["*.struq.com"] }, { name: "Str\xC3\xB6er Digital Media", category: "ad", domains: ["*.stroeerdigitalmedia.de"] }, { name: "StumbleUpon", category: "content", domains: ["*.stumble-upon.com", "*.stumbleupon.com"] }, { name: "Sub2 Technologies", category: "analytics", domains: ["*.sub2tech.com"] }, { name: "SublimeSkinz", category: "ad", domains: ["*.ayads.co"] }, { name: "Sumo Logic", category: "utility", domains: ["*.sumologic.com"] }, { name: "Sunday Times Driving", category: "content", domains: ["*.driving.co.uk"] }, { name: "SundaySky", category: "ad", domains: ["*.sundaysky.com", "dds6m601du5ji.cloudfront.net"] }, { name: "Sunrise Integration", category: "utility", domains: ["*.sunriseintegration.com"] }, { name: "Supertool Network Technology", category: "analytics", domains: ["*.miaozhen.com"] }, { name: "Survata", category: "analytics", domains: ["*.survata.com"] }, { name: "SurveyGizmo", category: "analytics", domains: ["*.surveygizmo.eu"] }, { name: "SurveyMonkey", category: "analytics", domains: ["*.surveymonkey.com"] }, { name: "Survicate", category: "analytics", domains: ["*.survicate.com"] }, { name: "Sweet Tooth", category: "ad", domains: ["*.sweettooth.io"] }, { name: "Swiftype", category: "utility", domains: ["*.swiftype.com", "*.swiftypecdn.com"] }, { name: "Switch Concepts", category: "ad", domains: ["*.switchadhub.com"] }, { name: "SwitchAds", company: "Switch Concepts", category: "ad", domains: ["*.switchads.com"] }, { name: "Swogo", category: "analytics", domains: ["*.xsellapp.com"] }, { name: "Swoop", category: "ad", domains: ["*.swoop.com"] }, { name: "Symantec", category: "utility", domains: ["*.norton.com", "*.symantec.com", "*.symcb.com", "*.symcd.com"] }, { name: "Syncapse", category: "social", domains: ["*.clickable.net"] }, { name: "Synergetic", category: "ad", domains: ["*.synergetic.ag"] }, { name: "Synthetix", category: "customer-success", domains: ["*.syn-finity.com", "*.synthetix-ec1.com", "*.synthetix.com"] }, { name: "Syte", category: "other", domains: ["*.syteapi.com"] }, { name: "TINT", category: "content", domains: ["*.71n7.com", "d33w9bm0n1egwm.cloudfront.net", "d36hc0p18k1aoc.cloudfront.net", "d3l7tj34e9fc43.cloudfront.net"] }, { name: "TNS (Kantar Group)", category: "analytics", domains: ["*.tns-counter.ru"] }, { name: "TRUSTe", category: "utility", domains: ["*.truste.com"] }, { name: "TV Genius", company: "Ericcson Media Services", category: "content", domains: ["*.tvgenius.net"] }, { name: "TVSquared", category: "ad", domains: ["*.tvsquared.com"] }, { name: "TVTY", category: "ad", domains: ["*.distribeo.com", "*.ogigl.com"] }, { name: "Tactics bvba", category: "hosting", domains: ["*.influid.co"] }, { name: "Tag Inspector", company: "InfoTrust", category: "analytics", domains: ["d22xmn10vbouk4.cloudfront.net"] }, { name: "TagCommander", category: "tag-manager", domains: ["*.commander1.com", "*.tagcommander.com"] }, { name: "Tagboard", category: "social", domains: ["*.tagboard.com"] }, { name: "Taggstar", company: "Taggstar UK", category: "ad", domains: ["*.taggstar.com"] }, { name: "Tail Target", company: "Tail", category: "ad", domains: ["*.tailtarget.com"] }, { name: "Tailored", category: "other", domains: ["d24qm7bu56swjs.cloudfront.net", "dw3vahmen1rfy.cloudfront.net", "*.tailored.to"] }, { name: "Taleo Enterprise Cloud Service", company: "Oracle", category: "content", domains: ["*.taleo.net"] }, { name: "Talkable", category: "ad", domains: ["*.talkable.com", "d2jjzw81hqbuqv.cloudfront.net"] }, { name: "TapSense", category: "ad", domains: ["*.tapsense.com"] }, { name: "Tapad", category: "ad", domains: ["*.tapad.com"] }, { name: "Teads", category: "ad", domains: ["*.teads.tv"] }, { name: "Team Internet Tonic", company: "Team Internet", category: "ad", domains: ["*.dntrax.com"] }, { name: "TechTarget", category: "content", domains: ["*.techtarget.com", "*.ttgtmedia.com"] }, { name: "Technorati", company: "Synacor", category: "ad", domains: ["*.technoratimedia.com"] }, { name: "Teedhaze", category: "content", domains: ["*.fuel451.com"] }, { name: "Tell Apart", category: "analytics", domains: ["*.tellapart.com", "*.tellaparts.com"] }, { name: "Tencent", category: "content", domains: ["*.qq.com", "*.ywxi.net"] }, { name: "Thanx Media", category: "utility", domains: ["*.hawksearch.info"] }, { name: "Thawte", category: "utility", domains: ["*.thawte.com"] }, { name: "Thesis", category: "analytics", homepage: "https://www.thesistesting.com/", domains: ["*.ttsep.com"] }, { name: "The AA", category: "ad", domains: ["*.adstheaa.com"] }, { name: "The ADEX", category: "ad", domains: ["*.theadex.com"] }, { name: "The Best Day", category: "social", domains: ["*.thebestday.com"] }, { name: "The Filter", company: "Exabre", category: "analytics", domains: ["*.thefilter.com"] }, { name: "The Guardian", category: "analytics", domains: ["*.ophan.co.uk"] }, { name: "The Hut Group", category: "content", domains: ["*.thcdn.com"] }, { name: "The Numa Group", category: "other", domains: ["*.hittail.com"] }, { name: "The Publisher Desk", category: "ad", domains: ["*.206ads.com", "*.publisherdesk.com"] }, { name: "The Sydney Morning Herald", company: "Fairfax Media", category: "content", domains: ["*.smh.com.au"] }, { name: "The Wall Street Jounal", category: "content", domains: ["*.wsj.net"] }, { name: "The Wall Street Journal", category: "content", domains: ["*.marketwatch.com"] }, { name: "TheFind", category: "content", domains: ["*.thefind.com"] }, { name: "Thinglink", category: "utility", domains: ["*.thinglink.com"] }, { name: "Thirdpresence", category: "ad", domains: ["*.thirdpresence.com"] }, { name: "ThreatMetrix", category: "utility", domains: ["*.online-metrix.net"] }, { name: "Throtle", homepage: "https://throtle.io/", category: "analytics", domains: ["*.thrtle.com", "*.v12group.com"] }, { name: "TicketMaster", category: "content", domains: ["*.t-x.io", "*.tmcs.net"] }, { name: "TikTok", company: "ByteDance Ltd", homepage: "https://www.tiktok.com/en/", category: "social", domains: ["*.tiktok.com", "*.ipstatp.com"] }, { name: "Tidio Live Chat", company: "Tidio", homepage: "https://www.tidiochat.com/en/", category: "customer-success", domains: ["*.tidiochat.com"] }, { name: "Tiledesk Live Chat", company: "Tiledesk SRL", homepage: "https://www.tiledesk.com/", category: "customer-success", domains: ["*.tiledesk.com"] }, { name: "Time", category: "content", domains: ["*.timeinc.net"] }, { name: "Time2Perf", category: "ad", domains: ["*.time2perf.com"] }, { name: "TinyURL", category: "utility", domains: ["*.tinyurl.com"] }, { name: "Tivo", category: "analytics", domains: ["*.rovicorp.com"] }, { name: "Tom&Co", category: "hosting", domains: ["*.tomandco.uk"] }, { name: "Toms Native Ads", company: "Purch", category: "ad", domains: ["*.natoms.com"] }, { name: "ToneMedia", category: "ad", domains: ["*.clickfuse.com"] }, { name: "Tonic", company: "Team Internet", category: "ad", domains: ["*.dntx.com"] }, { name: "Touch Commerce", category: "customer-success", domains: ["*.inq.com", "*.touchcommerce.com"] }, { name: "ToutApp", category: "ad", domains: ["*.toutapp.com"] }, { name: "TraceView", company: "Solarwinds", category: "analytics", domains: ["*.tracelytics.com", "d2gfdmu30u15x7.cloudfront.net"] }, { name: "TrackJS", category: "analytics", domains: ["*.trackjs.com", "d2zah9y47r7bi2.cloudfront.net"] }, { name: "Tradedoubler", category: "ad", domains: ["*.pvnsolutions.com", "*.tradedoubler.com"] }, { name: "Tradelab", category: "ad", domains: ["*.tradelab.fr"] }, { name: "TrafficFactory", category: "ad", domains: ["*.trafficfactory.biz"] }, { name: "TrafficHunt", category: "ad", domains: ["*.traffichunt.com"] }, { name: "TrafficStars", category: "ad", domains: ["*.trafficstars.com", "*.tsyndicate.com"] }, { name: "Transifex", category: "utility", domains: ["*.transifex.com"] }, { name: "Travelex", category: "utility", domains: ["*.travelex.net", "*.travelex.co.uk"] }, { name: "Travelocity Canada", company: "Travelocity", category: "content", domains: ["*.travelocity.ca"] }, { name: "Travelocity USA", company: "Travelocity", category: "content", domains: ["*.travelocity.com"] }, { name: "Travelzoo", category: "content", domains: ["*.travelzoo.com"] }, { name: "Treasure Data", category: "analytics", domains: ["*.treasuredata.com"] }, { name: "Tremor Video", category: "ad", domains: ["*.tremorhub.com", "*.videohub.tv"] }, { name: "Trialfire", category: "analytics", domains: ["*.trialfire.com"] }, { name: "Tribal Fusion", company: "Exponential Interactive", category: "ad", domains: ["*.tribalfusion.com"] }, { name: "Triblio", category: "marketing", domains: ["*.tribl.io"] }, { name: "Triggered Messaging", company: "Fresh Relevance", category: "ad", domains: ["*.triggeredmessaging.com"] }, { name: "Trinity Mirror", category: "content", domains: ["*.mirror.co.uk"] }, { name: "Trinity Mirror Digital Media", category: "social", domains: ["*.tm-aws.com", "*.icnetwork.co.uk"] }, { name: "TripAdvisor", category: "content", domains: ["*.jscache.com", "*.tacdn.com", "*.tamgrt.com", "*.tripadvisor.com", "*.viator.com", "*.tripadvisor.co.uk"] }, { name: "TripleLift", category: "ad", domains: ["*.3lift.com"] }, { name: "Tru Optik", category: "ad", domains: ["*.truoptik.com"] }, { name: "TruConversion", category: "analytics", domains: ["*.truconversion.com"] }, { name: "Trueffect", category: "marketing", domains: ["*.adlegend.com"] }, { name: "Truefit", category: "analytics", domains: ["*.truefitcorp.com"] }, { name: "Trust Guard", category: "utility", domains: ["*.trust-guard.com"] }, { name: "Trust Pilot", category: "analytics", domains: ["*.trustpilot.com"] }, { name: "Amazon Trust Services", company: "Amazon", category: "utility", domains: ["*.amazontrust.com", "o.ss2.us"] }, { name: "Google Trust Services", company: "Google", category: "utility", domains: ["*.pki.goog"] }, { name: "Let's Encrypt", homepage: "https://letsencrypt.org/", category: "utility", domains: ["*.letsencrypt.org"] }, { name: "TrustX", category: "ad", domains: ["*.trustx.org"] }, { name: "Trusted Shops", category: "utility", domains: ["*.trustedshops.com"] }, { name: "Trustev", company: "TransUnion", category: "utility", domains: ["*.trustev.com"] }, { name: "Trustwave", category: "utility", domains: ["*.trustwave.com"] }, { name: "Tryzens TradeState", company: "Tryzens", category: "analytics", domains: ["*.tryzens-analytics.com"] }, { name: "TubeMogul", category: "ad", domains: ["*.tubemogul.com"] }, { name: "Turn", category: "ad", domains: ["*.turn.com"] }, { name: "Tutorialize", category: "customer-success", domains: ["*.tutorialize.me"] }, { name: "Twenga", category: "content", domains: ["*.twenga.fr", "*.c4tw.net", "*.twenga.co.uk"] }, { name: "Twitframe", company: "Superblock", category: "utility", domains: ["*.twitframe.com"] }, { name: "Twitter Online Conversion Tracking", company: "Twitter", category: "ad", domains: ["*.ads-twitter.com", "analytics.twitter.com"] }, { name: "Twitter Short URL", company: "Twitter", category: "social", domains: ["*.t.co"] }, { name: "Twyn Group", category: "ad", domains: ["*.twyn.com"] }, { name: "Tynt", company: "33 Across", category: "ad", domains: ["*.tynt.com"] }, { name: "Typepad", category: "hosting", domains: ["*.typepad.com"] }, { name: "TyrbooBytes", category: "utility", domains: ["*.turbobytes.net"] }, { name: "UPS i-parcel", company: "UPS", category: "other", domains: ["*.i-parcel.com"] }, { name: "US Media Consulting", category: "ad", domains: ["*.mediade.sk"] }, { name: "Ubertags", category: "tag-manager", domains: ["*.ubertags.com"] }, { name: "Umbel", category: "analytics", domains: ["*.umbel.com"] }, { name: "Unanimis", company: "Switch", category: "ad", domains: ["*.unanimis.co.uk"] }, { name: "Unbounce", category: "ad", domains: ["*.ubembed.com", "*.unbounce.com", "d2xxq4ijfwetlm.cloudfront.net", "d9hhrg4mnvzow.cloudfront.net"] }, { name: "Underdog Media", category: "ad", domains: ["*.underdog.media", "*.udmserve.net"] }, { name: "Understand Digital", category: "ad", domains: ["*.redirecting2.net"] }, { name: "Undertone", company: "Perion", category: "ad", domains: ["*.legolas-media.com"] }, { name: "Unidays", category: "ad", domains: ["*.myunidays.com", "*.unidays.world"] }, { name: "Uniqodo", category: "ad", domains: ["*.uniqodo.com"] }, { name: "Unite", category: "ad", domains: ["*.uadx.com"] }, { name: "United Card Services", category: "utility", domains: ["*.ucs.su"] }, { name: "United Internet", category: "hosting", domains: ["*.uicdn.com"] }, { name: "United Internet Media", category: "ad", domains: ["*.ui-portal.de"] }, { name: "United Internet Media AG", category: "hosting", domains: ["*.tifbs.net", "*.uicdn.net", "*.uimserv.net"] }, { name: "Unknown", category: "other", domains: [] }, { name: "Unruly Media", category: "ad", domains: ["*.unrulymedia.com"] }, { name: "UpBuild", category: "ad", domains: ["*.upbuild.io"] }, { name: "UpSellit", category: "analytics", domains: ["*.upsellit.com"] }, { name: "Upland Software", category: "hosting", domains: ["*.clickability.com"] }, { name: "Airship", category: "marketing", domains: ["*.urbanairship.com", "*.aswpsdkus.com"] }, { name: "UsabilityTools", category: "analytics", domains: ["*.usabilitytools.com"] }, { name: "Usablenet.net", category: "utility", domains: ["*.usablenet.net"] }, { name: "Use It Better", category: "analytics", domains: ["*.useitbetter.com"] }, { name: "User Replay", category: "analytics", domains: ["*.userreplay.net"] }, { name: "UserReport", category: "analytics", domains: ["*.userreport.com"] }, { name: "Userneeds", category: "analytics", domains: ["*.userneeds.dk"] }, { name: "Userzoom", category: "analytics", domains: ["*.userzoom.com"] }, { name: "V12 Retail Finance", category: "utility", domains: ["*.v12finance.com"] }, { name: "Vacaciones eDreams", category: "content", domains: ["*.odistatic.net"] }, { name: "Varick Media Management", category: "ad", domains: ["*.vmmpxl.com"] }, { name: "Vdopia Chocolate", company: "Vdopia", category: "ad", domains: ["*.vdopia.com"] }, { name: "Ve", company: "Ve", homepage: "https://www.ve.com/", category: "marketing", domains: ["*.veinteractive.com", "*.ve.com"] }, { name: "Ve Interactive", company: "Ve", category: "ad", domains: ["*.vepxl1.net", "*.adgenie.co.uk"] }, { name: "Vee24", category: "customer-success", domains: ["*.vee24.com"] }, { name: "Veeseo", category: "content", domains: ["*.veeseo.com"] }, { name: "Venatus Media", category: "marketing", domains: ["*.alcvid.com", "*.venatusmedia.com"] }, { name: "Veoxa", category: "ad", domains: ["*.veoxa.com"] }, { name: "Vergic AB", category: "customer-success", domains: ["*.psplugin.com"] }, { name: "Vergic Engage Platform", company: "Vergic", category: "customer-success", domains: ["*.vergic.com"] }, { name: "Verisign (Symantec)", category: "utility", domains: ["*.verisign.com"] }, { name: "Verizon", category: "utility", domains: ["*.public-trust.com"] }, { name: "Verizon Digital Media CDN", homepage: "https://www.verizondigitalmedia.com/", category: "cdn", domains: ["*.edgecastcdn.net", "*.edgecastdns.net"] }, { name: "Verizon Uplynk", company: "Verizon", category: "content", domains: ["*.uplynk.com"] }, { name: "Vero", company: "Semblance", category: "ad", domains: ["*.getvero.com", "d3qxef4rp70elm.cloudfront.net"] }, { name: "VertaMedia", category: "ad", domains: ["*.vertamedia.com"] }, { name: "Vertical Mass", category: "ad", domains: ["*.vmweb.net"] }, { name: "Vestorly", category: "ad", domains: ["*.oodalab.com"] }, { name: "Vextras", category: "other", domains: ["*.vextras.com"] }, { name: "Viacom", category: "content", domains: ["*.mtvnservices.com"] }, { name: "Vibrant Media", category: "ad", domains: ["*.intellitxt.com", "*.picadmedia.com"] }, { name: "VidPulse", category: "analytics", domains: ["*.vidpulse.com"] }, { name: "Video Media Groep", category: "ad", domains: ["*.vmg.host", "*.inpagevideo.nl"] }, { name: "VideoHub", company: "Tremor Video", category: "ad", domains: ["*.scanscout.com"] }, { name: "Videology", category: "ad", domains: ["*.tidaltv.com"] }, { name: "Vidible", category: "ad", domains: ["*.vidible.tv"] }, { name: "VigLink", category: "ad", domains: ["*.viglink.com"] }, { name: "Vindico", company: "Viant", category: "ad", domains: ["*.vindicosuite.com"] }, { name: "Viocorp International", category: "content", domains: ["*.vioapi.com"] }, { name: "ViralNinjas", category: "ad", domains: ["*.viralninjas.com"] }, { name: "Virool", category: "ad", domains: ["*.virool.com"] }, { name: "Virtual Earth", company: "Microsoft", category: "utility", domains: ["*.virtualearth.net"] }, { name: "Visely", company: "Visely", category: "other", homepage: "https://visely.io/", domains: ["*.visely.io"] }, { name: "VisScore", category: "analytics", domains: ["*.visscore.com", "d2hkbi3gan6yg6.cloudfront.net"] }, { name: "Visible Measures", category: "ad", domains: ["*.visiblemeasures.com"] }, { name: "Visual Studio", company: "Microsoft", category: "utility", domains: ["*.visualstudio.com"] }, { name: "VisualDNA", category: "ad", domains: ["*.visualdna.com"] }, { name: "VisualVisitor", category: "ad", domains: ["*.id-visitors.com"] }, { name: "Vivocha S.p.A", category: "customer-success", domains: ["*.vivocha.com"] }, { name: "Vizu (Nielsen)", category: "analytics", domains: ["*.vizu.com"] }, { name: "Vizury", category: "ad", domains: ["*.vizury.com"] }, { name: "VoiceFive", category: "analytics", domains: ["*.voicefive.com"] }, { name: "Volvelle", company: "Optomaton", category: "ad", domains: ["*.volvelle.tech"] }, { name: "VouchedFor", category: "analytics", domains: ["*.vouchedfor.co.uk"] }, { name: "WARPCACHE", category: "utility", domains: ["*.warpcache.net"] }, { name: "WISHLIST", company: "Shopapps", category: "social", domains: ["*.shopapps.in"] }, { name: "WP Engine", category: "hosting", domains: ["*.wpengine.com"] }, { name: "WalkMe", category: "customer-success", domains: ["*.walkme.com"] }, { name: "Watching That", category: "other", domains: ["*.watchingthat.com"] }, { name: "Wayfair", category: "analytics", domains: ["*.wayfair.com"] }, { name: "Web CEO", category: "other", domains: ["*.websiteceo.com"] }, { name: "Web Dissector", company: "Beijing Gridsum Technologies", category: "analytics", domains: ["*.gridsumdissector.com", "*.webdissector.com"] }, { name: "Web Forensics", category: "analytics", domains: ["*.webforensics.co.uk"] }, { name: "Web Security and Performance", company: "NCC Group", category: "utility", domains: ["*.nccgroup.trust"] }, { name: "WebEngage", category: "customer-success", domains: ["*.webengage.co", "*.webengage.com", "d23nd6ymopvz52.cloudfront.net", "d3701cc9l7v9a6.cloudfront.net"] }, { name: "WebInsight", company: "dotMailer", category: "analytics", domains: ["*.trackedlink.net", "*.trackedweb.net"] }, { name: "WebPageOne Solutions", category: "other", domains: ["*.webpageone.com"] }, { name: "WebSpectator", category: "ad", domains: ["*.webspectator.com"] }, { name: "WebTuna", company: "Application Performance", category: "analytics", domains: ["*.webtuna.com"] }, { name: "WebVideoCore", company: "StreamingVideoProvider", category: "content", domains: ["*.webvideocore.net"] }, { name: "WebWombat", category: "utility", domains: ["*.ic.com.au"] }, { name: "Webcollage", category: "customer-success", domains: ["*.webcollage.net"] }, { name: "Webcore", category: "ad", domains: ["*.onefeed.co.uk"] }, { name: "Webkul", company: "Webkul Software", category: "utility", domains: ["*.webkul.com"] }, { name: "Webmarked", category: "utility", domains: ["*.webmarked.net"] }, { name: "Weborama", category: "ad", domains: ["*.weborama.com", "*.weborama.fr"] }, { name: "WebpageFX", category: "ad", domains: ["*.leadmanagerfx.com"] }, { name: "Webphone", company: "IP WEB SERVICES", category: "customer-success", domains: ["*.webphone.net"] }, { name: "Webselect selectcommerce", company: "Webselect Internet", category: "hosting", domains: ["*.webselect.net"] }, { name: "Webthinking", category: "hosting", domains: ["*.webthinking.co.uk"] }, { name: "Webtrekk", category: "analytics", domains: ["*.wbtrk.net", "*.webtrekk-asia.net", "*.webtrekk.net", "*.wt-eu02.net", "*.wt-safetag.com"] }, { name: "Webtrends", category: "analytics", domains: ["*.webtrends.com", "*.webtrendslive.com", "d1q62gfb8siqnm.cloudfront.net"] }, { name: "Webtype", category: "cdn", domains: ["*.webtype.com"] }, { name: "White Ops", category: "utility", domains: ["*.acexedge.com", "*.tagsrvcs.com"] }, { name: "Whitespace", category: "ad", domains: ["*.whitespacers.com"] }, { name: "WhosOn Live Chat Software", category: "customer-success", domains: ["*.whoson.com"] }, { name: "Wibbitz", category: "other", domains: ["*.wibbitz.com"] }, { name: "Wide Area Communications", category: "hosting", domains: ["*.widearea.co.uk"] }, { name: "WideOrbit", category: "marketing", domains: ["*.admaym.com"] }, { name: "William Reed", category: "content", domains: ["*.wrbm.com"] }, { name: "WillyFogg.com", category: "content", domains: ["*.willyfogg.com"] }, { name: "Windows", company: "Microsoft", category: "utility", domains: ["*.windowsupdate.com"] }, { name: "WisePops", category: "utility", domains: ["*.wisepops.com"] }, { name: "Wishlist King", company: "Appmate", category: "other", homepage: "https://appmate.io/", domains: ["*.appmate.io"] }, { name: "Wishpond Technologies", category: "marketing", domains: ["*.wishpond.com", "*.wishpond.net"] }, { name: "WizRocket Technologies", category: "analytics", domains: ["*.wzrkt.com"] }, { name: "Woopra", category: "analytics", domains: ["*.woopra.com"] }, { name: "Woosmap", category: "utility", domains: ["*.woosmap.com"] }, { name: "WorkCast", category: "hosting", domains: ["*.workcast.net"] }, { name: "World News Media", category: "content", domains: ["*.wnmedia.co.uk"] }, { name: "Worldpay", category: "utility", domains: ["*.worldpay.com"] }, { name: "Wow Analytics", category: "analytics", domains: ["*.wowanalytics.co.uk"] }, { name: "Wowcher", category: "ad", domains: ["*.wowcher.co.uk"] }, { name: "Wufoo", category: "utility", domains: ["*.wufoo.com"] }, { name: "Wunderkind", category: "marketing", homepage: "https://www.wunderkind.co/", domains: ["*.bounceexchange.com", "*.bouncex.net", "*.wknd.ai", "*.cdnbasket.net", "*.cdnwidget.com"] }, { name: "Wyng", category: "ad", domains: ["*.offerpop.com"] }, { name: "XMLSHOP", category: "hosting", domains: ["*.xmlshop.biz"] }, { name: "XiTi", company: "AT Internet", category: "analytics", domains: ["*.xiti.com", "*.aticdn.net"], homepage: "https://www.atinternet.com/en/" }, { name: "YUDU", category: "content", domains: ["*.yudu.com"] }, { name: "Yahoo! Ad Exchange", company: "Yahoo!", category: "ad", domains: ["*.yieldmanager.com", "*.browsiprod.com"] }, { name: "Yahoo! JAPAN Ads", company: "Yahoo! JAPAN", category: "ad", homepage: "https://marketing.yahoo.co.jp/service/yahooads/", domains: ["yads.c.yimg.jp", "s.yimg.jp", "b92.yahoo.co.jp"] }, { name: "Yahoo! Tag Manager", company: "Yahoo! JAPAN", category: "tag-manager", homepage: "https://marketing.yahoo.co.jp/service/tagmanager/", domains: ["*.yjtag.jp"] }, { name: "Yahoo! Small Business", company: "Yahoo!", category: "hosting", domains: ["*.aabacosmallbusiness.com"] }, { name: "Yellow Robot", category: "ad", domains: ["*.backinstock.org"] }, { name: "YieldPartners", category: "ad", domains: ["*.yieldpartners.com"] }, { name: "Yieldbot", category: "ad", domains: ["*.yldbt.com"] }, { name: "Yieldify", category: "ad", domains: ["*.yieldify.com", "*.yieldifylabs.com", "d33wq5gej88ld6.cloudfront.net", "dwmvwp56lzq5t.cloudfront.net"] }, { name: "Yieldlab", category: "ad", domains: ["*.yieldlab.net"] }, { name: "Yieldmo", category: "ad", domains: ["*.yieldmo.com"] }, { name: "Yieldr", category: "ad", domains: ["*.254a.com"] }, { name: "Yo", category: "utility", domains: ["*.yopify.com"] }, { name: "YoYo", category: "utility", domains: ["*.goadservices.com"] }, { name: "Yotpo", homepage: "https://www.yotpo.com/", category: "marketing", domains: ["*.yotpo.com", "*.swellrewards.com"] }, { name: "Yottaa", category: "hosting", domains: ["*.yottaa.com", "*.yottaa.net"] }, { name: "YourAmigo", category: "utility", domains: ["*.youramigo.com"] }, { name: "YuMe", category: "ad", domains: ["*.yume.com", "*.yumenetworks.com"] }, { name: "Yummley", category: "other", domains: ["*.yummly.com"] }, { name: "ZEDO", category: "ad", domains: ["*.zedo.com"] }, { name: "Zafu", category: "analytics", domains: ["*.zafu.com"] }, { name: "Zaius", category: "ad", domains: ["*.zaius.com"] }, { name: "Zamplus ad", category: "ad", domains: ["*.zampda.net"] }, { name: "Zanox", category: "ad", domains: ["*.zanox.com", "*.zanox.ws"] }, { name: "Zapper", category: "utility", domains: ["*.zapper.com"] }, { name: "Zarget", category: "analytics", domains: ["*.zarget.com"] }, { name: "Zemanta", category: "ad", domains: ["*.zemanta.com"] }, { name: "Zen Internet", category: "other", domains: ["*.zyen.com"] }, { name: "Zenovia Digital Exchange", category: "ad", domains: ["*.rhythmxchange.com", "*.zenoviaexchange.com"] }, { name: "ZergNet", category: "content", domains: ["*.zergnet.com"] }, { name: "Zerogrey", category: "hosting", domains: ["*.zerogrey.com"] }, { name: "Ziff Davis Tech", category: "ad", domains: ["*.adziff.com", "*.zdbb.net"] }, { name: "Zmags", category: "marketing", domains: ["*.zmags.com"] }, { name: "Zolando", category: "content", domains: ["*.ztat.net"] }, { name: "Zoover", category: "analytics", domains: ["*.zoover.nl", "*.zoover.co.uk"] }, { name: "Zopim", category: "customer-success", domains: ["*.zopim.io"] }, { name: "[24]7", category: "customer-success", domains: ["*.247-inc.net", "*.247inc.net", "d1af033869koo7.cloudfront.net"] }, { name: "adKernel", category: "ad", domains: ["*.adkernel.com"] }, { name: "adMarketplace", company: "AMPexchange", category: "ad", domains: ["*.ampxchange.com", "*.admarketplace.net"] }, { name: "addtocalendar", category: "utility", domains: ["*.addtocalendar.com"] }, { name: "adnanny", category: "ad", domains: ["*.adserver01.de"] }, { name: "affilinet", category: "ad", domains: ["*.reussissonsensemble.fr", "*.successfultogether.co.uk"] }, { name: "audioBoom", category: "social", domains: ["*.audioboom.com", "*.audioboo.fm"] }, { name: "bPay by Barclaycard", company: "Barclays Bank", category: "utility", domains: ["*.bpay.co.uk"] }, { name: "bRealTime", category: "ad", domains: ["*.brealtime.com"] }, { name: "bd4travel", category: "analytics", domains: ["*.bd4travel.com"] }, { name: "bizinformation-VOID", company: "bizinformation", category: "analytics", domains: ["*.bizinformation.org"] }, { name: "carrot", category: "social", domains: ["*.sharebutton.co"] }, { name: "cloudIQ", category: "analytics", domains: ["*.cloud-iq.com"] }, { name: "comScore", category: "analytics", domains: ["*.adxpose.com", "*.comscore.com", "*.sitestat.com", "*.zqtk.net"] }, { name: "content.ad", category: "ad", domains: ["*.content.ad"] }, { name: "d3 Media", company: "d3 Technologies", category: "other", domains: ["*.d3sv.net"] }, { name: "dexiMEDIA", category: "ad", domains: ["*.deximedia.com"] }, { name: "dianomi", category: "ad", domains: ["*.dianomi.com", "*.dianomioffers.co.uk"] }, { name: "donReach", category: "social", domains: ["*.donreach.com"] }, { name: "dotMailer", category: "ad", domains: ["*.dmtrk.com", "*.dotmailer.com", "*.emlfiles.com"] }, { name: "dotMailer Surveys", company: "dotMailer", category: "analytics", domains: ["*.dotmailer-surveys.com"] }, { name: "dstillery", category: "ad", domains: ["*.dstillery.com", "*.media6degrees.com"] }, { name: "eBay", category: "ad", domains: ["*.ebay.com", "*.ebayimg.com", "*.fetchback.com"] }, { name: "eBay Enterprise", category: "hosting", domains: ["*.csdata1.com", "*.gsipartners.com"] }, { name: "eBuzzing", company: "Teads Managed Services", category: "ad", domains: ["*.ebz.io"] }, { name: "eDigital Research", category: "customer-success", domains: ["*.edigitalresearch.com", "*.edigitalsurvey.com", "*.edrcdn.com", "*.ecustomeropinions.com"] }, { name: "eGain", category: "analytics", domains: ["*.analytics-egain.com", "*.egain.com"] }, { name: "eHost", category: "hosting", domains: ["*.ehosts.net"] }, { name: "eKomi", category: "analytics", domains: ["*.ekomi.com", "*.ekomi.de"] }, { name: "eWAY", company: "Web Active Pty", category: "utility", domains: ["*.eway.com.au"] }, { name: "eXTReMe digital", category: "analytics", domains: ["*.extreme-dm.com"] }, { name: "eXelate", category: "ad", domains: ["*.exelator.com"] }, { name: "ecommercefeed.net", category: "marketing", domains: ["*.ecommercefeed.net"] }, { name: "engage:BDR", category: "ad", domains: ["*.bnmla.com", "*.ebdr3.com"] }, { name: "epago", category: "ad", domains: ["*.adaos-ads.net"] }, { name: "epoq internet services", category: "analytics", domains: ["*.epoq.de"] }, { name: "etouches", category: "hosting", domains: ["*.etouches.com"] }, { name: "etracker", category: "analytics", domains: ["*.etracker.com", "*.etracker.de"] }, { name: "everestads.com", category: "content", domains: ["*.verestads.net"] }, { name: "exebid.DCA", company: "Data-Centric Alliance", category: "ad", domains: ["*.exe.bid"] }, { name: "eyeReturn Marketing", category: "marketing", domains: ["*.eyereturn.com"] }, { name: "feedoptimise", category: "hosting", domains: ["*.feedoptimise.com", "d1w78njrm56n7g.cloudfront.net"] }, { name: "fifty-five", category: "ad", domains: ["*.55labs.com"] }, { name: "fluct", category: "ad", domains: ["*.adingo.jp"] }, { name: "freegeoip.net", company: "(community-funded)", category: "utility", domains: ["*.freegeoip.net"] }, { name: "freewheel.tv", category: "content", domains: ["*.fwmrm.net"] }, { name: "gnatta", category: "customer-success", domains: ["*.gnatta.com"] }, { name: "home.pl", category: "hosting", domains: ["*.nscontext.eu"] }, { name: "hyfn", category: "ad", domains: ["*.hyfn.com"] }, { name: "iAdvize SAS", category: "customer-success", domains: ["*.iadvize.com"] }, { name: "iBillboard", category: "ad", domains: ["*.ibillboard.com"] }, { name: "iCrossing", category: "ad", domains: ["*.ic-live.com"] }, { name: "iFactory", company: "RDW Group", category: "hosting", domains: ["*.ifactory.com"] }, { name: "iGoDigital", category: "analytics", domains: ["*.igodigital.com"] }, { name: "iJento", company: "Fopsha", category: "ad", domains: ["*.ijento.com"] }, { name: "iPage", category: "hosting", domains: ["*.ipage.com"] }, { name: "iPerceptions", category: "customer-success", domains: ["*.iperceptions.com"] }, { name: "iTunes", company: "Apple", category: "content", domains: ["*.mzstatic.com"] }, { name: "imgix", company: "Zebrafish Labs", category: "utility", domains: ["*.imgix.net"] }, { name: "infogr.am", category: "utility", domains: ["*.infogr.am", "*.jifo.co"] }, { name: "iotec", category: "analytics", domains: ["*.dsp.io"] }, { name: "iovation", category: "utility", domains: ["*.iesnare.com"] }, { name: "ipinfo.io", category: "utility", domains: ["*.ipinfo.io"] }, { name: "issuu", category: "content", domains: ["*.issuu.com", "*.isu.pub"] }, { name: "iubenda", category: "utility", domains: ["*.iubenda.com"] }, { name: "j2 Cloud Services", category: "ad", domains: ["*.campaigner.com"] }, { name: "jsonip.com", category: "analytics", domains: ["*.jsonip.com"] }, { name: "linkpulse", category: "analytics", domains: ["*.lp4.io"] }, { name: "loGo_net", category: "analytics", domains: ["*.logo-net.co.uk"] }, { name: "mainADV", category: "ad", domains: ["*.httptrack.com", "*.solocpm.com"] }, { name: "mbr targeting", category: "ad", domains: ["*.m6r.eu"] }, { name: "media.ventive", category: "ad", domains: ["*.contentspread.net"] }, { name: "metrigo", category: "ad", domains: ["*.metrigo.com"] }, { name: "minicabit.com", category: "content", domains: ["*.minicabit.com"] }, { name: "mobiManage", category: "hosting", domains: ["*.mobimanage.com"] }, { name: "moving-pictures", category: "other", domains: ["*.moving-pictures.biz", "*.v6-moving-pictures.com", "*.vtstat.com", "*.moving-pictures.de"] }, { name: "my6sense", category: "ad", domains: ["*.mynativeplatform.com"] }, { name: "myThings", category: "ad", domains: ["*.mythings.com", "*.mythingsmedia.net"] }, { name: "mymovies", category: "content", domains: ["*.mymovies.net"] }, { name: "nRelate-VOID", company: "nRelate", category: "content", domains: ["*.nrelate.com"] }, { name: "nToklo", category: "analytics", domains: ["*.ntoklo.com"] }, { name: "neXeps", category: "ad", domains: ["*.nexeps.com"] }, { name: "ninemsn Pty.", category: "utility", domains: ["*.ninemsn.com.au"] }, { name: "nugg.ad", category: "ad", domains: ["*.nuggad.net"] }, { name: "numero interactive", company: "numero", category: "ad", domains: ["*.numerointeractive.com"] }, { name: "optMD", company: "Optimax Media Delivery", category: "ad", domains: ["*.optmd.com"] }, { name: "otracking.com", category: "analytics", domains: ["*.otracking.com"] }, { name: "paysafecard", company: "Paysafe Group", category: "utility", domains: ["*.paysafecard.com"] }, { name: "piano", category: "ad", domains: ["*.npttech.com", "*.tinypass.com"] }, { name: "piclike", category: "ad", domains: ["*.piclike.us"] }, { name: "placehold.it", category: "utility", domains: ["*.placehold.it"] }, { name: "plista", category: "ad", domains: ["*.plista.com"] }, { name: "prebid.org", category: "utility", domains: ["*.prebid.org"] }, { name: "reEmbed", category: "other", domains: ["*.reembed.com"] }, { name: "reddit", category: "social", domains: ["*.reddit.com", "*.redditstatic.com"] }, { name: "rewardStyle.com", category: "ad", domains: ["*.rewardstyle.com"] }, { name: "rss2json", category: "utility", domains: ["*.rss2json.com"] }, { name: "sage Pay", company: "Sage Pay Europe", category: "utility", domains: ["*.sagepay.com"] }, { name: "section.io", category: "utility", domains: ["*.squixa.net"] }, { name: "smartclip", category: "ad", domains: ["*.smartclip.net"] }, { name: "sovrn", category: "ad", domains: ["*.lijit.com"] }, { name: "stackpile.io", company: "StackPile", category: "tag-manager", domains: ["*.stackpile.io"] }, { name: "template-help.com", category: "hosting", domains: ["*.template-help.com"] }, { name: "test", company: "test only", category: "other", domains: ["*.testtesttest.com"] }, { name: "trueAnthem", category: "social", domains: ["*.tru.am"] }, { name: "tweetmeme-VOID", company: "tweetmeme", category: "analytics", domains: ["*.tweetmeme.com"] }, { name: "uLogin", category: "other", domains: ["*.ulogin.ru"] }, { name: "uLogix", category: "ad", domains: ["*.ulogix.ru"] }, { name: "ucfunnel ucX", company: "ucfunnel", category: "ad", domains: ["*.aralego.com"] }, { name: "up-value", category: "ad", domains: ["*.up-value.de"] }, { name: "wywy", category: "ad", domains: ["*.wywy.com", "*.wywyuserservice.com"] }, { name: "CDK Dealer Management", company: "CDK Global", homepage: "https://www.cdkglobal.com/us", category: "hosting", domains: ["*.assets-cdk.com"] }, { name: "fam", company: "Fing Co Ltd.", homepage: "http://admin.fam-ad.com/report/", category: "ad", domains: ["*.fam-ad.com"] }, { name: "zypmedia", category: "ad", domains: ["*.extend.tv"] }, { name: "codigo", homepage: "https://www.codigo.se", category: "analytics", domains: ["*.codigo.se"] }, { name: "Playground", homepage: "https://playground.xyz", category: "ad", domains: ["*.playground.xyz"] }, { name: "RAM", homepage: "https://www2.rampanel.com/", category: "analytics", domains: ["*.rampanel.com"] }, { name: "Adition", homepage: "https://www.adition.com", category: "ad", domains: ["*.adition.com"] }, { name: "Widespace", homepage: "https://www.widespace.com", category: "ad", domains: ["*.widespace.com"] }, { name: "Colpirio", homepage: "https://www.widespace.com", category: "analytics", domains: ["*.colpirio.com"] }, { name: "Brandmetrics", homepage: "https://www.brandmetrics.com", category: "analytics", domains: ["*.brandmetrics.com"] }, { name: "EasyAd", homepage: "https://web.easy-ads.com/", category: "ad", domains: ["*.easy-ads.com"] }, { name: "Glimr", homepage: "https://glimr.io/", category: "analytics", domains: ["*.glimr.io"] }, { name: "Webtreck", homepage: "https://www.webtrekk.com/en/home/", category: "analytics", domains: ["*.wcfbc.net"] }, { name: "DigiTrust", homepage: "http://www.digitru.st/", category: "analytics", domains: ["*.digitru.st"] }, { name: "Kantar Sifo", homepage: "https://www.kantarsifo.se", category: "analytics", domains: ["*.research-int.se"] }, { name: "Concert", homepage: "https://concert.io/", category: "ad", domains: ["*.concert.io"] }, { name: "Emerse", homepage: "https://www.emerse.com/", category: "ad", domains: ["*.emerse.com"] }, { name: "Iterate", homepage: "https://iteratehq.com/", category: "analytics", domains: ["*.iteratehq.com"] }, { name: "Cookiebot", homepage: "https://www.cookiebot.com/", category: "utility", domains: ["*.cookiebot.com"] }, { name: "Netlify", homepage: "https://www.netlify.com/", category: "utility", domains: ["*.netlify.com", "*.netlifyusercontent.com"] }, { name: "Scroll", homepage: "https://scroll.com/", category: "utility", domains: ["*.scroll.com"] }, { name: "Consumable", homepage: "https://consumable.com/", category: "ad", domains: ["*.serverbid.com"] }, { name: "DMD Marketing", homepage: "https://www.dmdconnects.com/", category: "ad", domains: ["*.medtargetsystem.com"] }, { name: "Catchpoint", homepage: "https://www.catchpoint.com/", category: "analytics", domains: ["*.3gl.net", "*.3genlabs.net"] }, { name: "Terminus", homepage: "https://terminus.com/", category: "ad", domains: ["*.terminus.services"] }, { name: "Acceptable Ads", homepage: "https://acceptableads.com/", category: "ad", domains: ["*.aaxads.com", "*.aaxdetect.com"] }, { name: "ClearBrain", homepage: "https://www.clearbrain.com/", category: "analytics", domains: ["*.clearbrain.com"] }, { name: "Optanon", homepage: "https://www.cookielaw.org/", category: "consent-provider", domains: ["*.onetrust.com", "*.cookielaw.org"] }, { name: "TrustArc", homepage: "https://www.trustarc.com/", category: "utility", domains: ["*.trustarc.com"] }, { name: "iSpot.tv", homepage: "https://www.ispot.tv/", category: "ad", domains: ["*.ispot.tv"] }, { name: "RevJet", homepage: "https://www.revjet.com/", category: "ad", domains: ["*.revjet.com"] }, { name: "atlasRTX", homepage: "https://www.atlasrtx.com/", category: "customer-success", domains: ["*.atlasrtx.com"] }, { name: "ContactAtOnce", homepage: "https://www.contactatonce.com/", category: "customer-success", domains: ["*.contactatonce.com"] }, { name: "Algolia", homepage: "https://www.algolia.com/", category: "utility", domains: ["*.algolianet.com", "*.algolia.net", "*.algolia.io"] }, { name: "EMX Digital", homepage: "https://emxdigital.com", category: "ad", domains: ["*.emxdgt.com"] }, { name: "Moxie", homepage: "https://www.gomoxie.com/", category: "utility", domains: ["*.gomoxie.solutions"] }, { name: "Scripps Network Digital", homepage: "https://www.scrippsnetworksdigital.com/", category: "ad", domains: ["*.snidigital.com"] }, { name: "TurnTo", homepage: "https://www.turntonetworks.com/", category: "utility", domains: ["*.turnto.com"] }, { name: "Quantum Metric", homepage: "https://www.quantummetric.com/", category: "analytics", domains: ["*.quantummetric.com"] }, { name: "Carbon Ads", homepage: "https://www.carbonads.net/", category: "ad", domains: ["*.carbonads.net", "*.carbonads.com"] }, { name: "Ably", homepage: "https://www.ably.io/", category: "utility", domains: ["*.ably.io"] }, { name: "Sectigo", homepage: "https://sectigo.com/", category: "utility", domains: ["*.sectigo.com"] }, { name: "Specless", homepage: "https://gospecless.com/", category: "ad", domains: ["*.specless.tech"] }, { name: "Loggly", homepage: "https://www.loggly.com/", category: "analytics", domains: ["*.loggly.com", "d9jmv9u00p0mv.cloudfront.net"] }, { name: "Intent Media", homepage: "https://intent.com/", category: "ad", domains: ["*.intentmedia.net"] }, { name: "Supership", homepage: "https://supership.jp/", category: "ad", domains: ["*.socdm.com"] }, { name: "F@N Communications", homepage: "https://www.fancs.com/", category: "ad", domains: ["*.ladsp.com"] }, { name: "Vidyard", homepage: "https://www.vidyard.com/", category: "utility", domains: ["*.vidyard.com"] }, { name: "RapidSSL", homepage: "https://www.rapidssl.com/", category: "utility", domains: ["*.rapidssl.com"] }, { name: "Coherent Path", homepage: "https://coherentpath.com/", category: "utility", domains: ["*.coherentpath.com"] }, { name: "Attentive", homepage: "https://attentivemobile.com/", category: "ad", domains: ["*.attn.tv", "*.attentivemobile.com"] }, { name: "emetriq", homepage: "https://www.emetriq.com/", category: "ad", domains: ["*.emetriq.de", "*.xplosion.de"] }, { name: "Bonzai", homepage: "https://www.bonzai.co/", category: "ad", domains: ["*.bonzai.co"] }, { name: "Freshchat", homepage: "https://www.freshworks.com/live-chat-software/", category: "customer-success", domains: ["*.freshchat.com", "*.freshworksapi.com"], products: [{ name: "Freshdesk Messaging", urlPatterns: ["wchat.freshchat.com"], facades: [{ name: "Freshdesk Messaging (formerly Freshchat) Facade", repo: "https://github.com/coliff/freshdesk-messaging-facade/" }] }] }, { name: "Contentful", homepage: "https://www.contentful.com/", category: "utility", domains: ["*.contentful.com"] }, { name: "PureCars", homepage: "https://www.purecars.com/", category: "marketing", domains: ["*.purecars.com"] }, { name: "Tray Commerce", homepage: "https://www.tray.com.br/", category: "marketing", domains: ["*.tcdn.com.br"] }, { name: "AdScore", homepage: "https://www.adscore.com/", category: "ad", domains: ["*.adsco.re"] }, { name: "WebsiteBuilder.com", homepage: "https://www.websitebuilder.com", category: "hosting", domains: ["*.mywebsitebuilder.com"] }, { name: "mParticle", homepage: "https://www.mparticle.com/", category: "utility", domains: ["*.mparticle.com"] }, { name: "Ada", homepage: "https://www.ada.support/", category: "customer-success", domains: ["*.ada.support"] }, { name: "Quora Ads", homepage: "https://www.quora.com/business/", category: "ad", domains: ["*.quora.com"] }, { name: "Auth0", homepage: "https://auth0.com/", category: "utility", domains: ["*.auth0.com"] }, { name: "Bridgewell DSP", homepage: "https://www.bridgewell.com/", category: "ad", domains: ["*.scupio.com"] }, { name: "Wicked Reports", homepage: "https://www.wickedreports.com/", category: "marketing", domains: ["*.wickedreports.com"] }, { name: "Jaywing", homepage: "https://jaywing.com/", category: "marketing", domains: ["*.jaywing.com"] }, { name: "Holimetrix", homepage: "https://u360.d-bi.fr/", category: "marketing", domains: ["*.d-bi.fr"] }, { name: "iZooto", homepage: "https://www.izooto.com", category: "marketing", domains: ["*.izooto.com"] }, { name: "Ordergroove", homepage: "https://www.ordergroove.com/", category: "marketing", domains: ["*.ordergroove.com"] }, { name: "PageSense", homepage: "https://www.zoho.com/pagesense/", category: "analytics", domains: ["*.pagesense.io"] }, { name: "Vizzit", homepage: "https://www.vizzit.se", category: "analytics", domains: ["*.vizzit.se"] }, { name: "Click Guardian", homepage: "https://www.clickguardian.co.uk/", category: "ad", domains: ["*.clickguardian.app", "*.clickguardian.co.uk"] }, { name: "Smartsupp", company: "Smartsupp.com", homepage: "https://www.smartsupp.com", category: "customer-success", domains: ["*.smartsuppchat.com", "*.smartsupp.com", "smartsupp-widget-161959.c.cdn77.org", "*.smartsuppcdn.com"] }, { name: "Smartlook", company: "Smartsupp.com", homepage: "https://www.smartlook.com/", category: "analytics", domains: ["*.smartlook.com"] }, { name: "Luigis Box", company: "Luigis Box", homepage: "https://www.luigisbox.com/", category: "utility", domains: ["*.luigisbox.com"] }, { name: "Targito", company: "VIVmail.cz", homepage: "https://www.targito.com", category: "marketing", domains: ["*.targito.com"] }, { name: "Foxentry", company: "AVANTRO", homepage: "https://foxentry.cz/", category: "utility", domains: ["*.foxentry.cz"] }, { name: "Pendo", homepage: "https://www.pendo.io", category: "analytics", domains: ["*.pendo.io"] }, { name: "Braze", homepage: "https://www.braze.com", category: "analytics", domains: ["*.appboycdn.com"] }, { name: "Usersnap", homepage: "https://usersnap.com", category: "customer-success", domains: ["*.usersnap.com"] }, { name: "Rewardful", homepage: "https://www.getrewardful.com", category: "analytics", domains: ["*.wdfl.co"] }, { name: "Launch Darkly", homepage: "https://launchdarkly.com", category: "utility", domains: ["*.launchdarkly.com"] }, { name: "Statuspage", company: "Atlassian", homepage: "https://www.statuspage.io", category: "utility", domains: ["*.statuspage.io"] }, { name: "HyperInzerce", homepage: "https://hyperinzerce.cz", category: "ad", domains: ["*.hyperinzerce.cz"] }, { name: "POWr", homepage: "https://www.powr.io", category: "utility", domains: ["*.powr.io"] }, { name: "Coral", company: "Coral", homepage: "https://coralproject.net", category: "content", domains: ["*.coral.coralproject.net"] }, { name: "Bolt", homepage: "https://www.bolt.com/", category: "utility", domains: ["*.bolt.com"] }, { name: "Judge.me", homepage: "https://judge.me/", category: "marketing", domains: ["*.judge.me"] }, { name: "Tilda", homepage: "https://tilda.cc/", category: "hosting", domains: ["*.tildacdn.com"] }, { name: "SalesLoft", homepage: "https://salesloft.com/", category: "marketing", domains: ["*.salesloft.com"] }, { name: "Accessibe Accessibility Overlay", company: "Accessibe", homepage: "https://accessibe.com/", category: "utility", domains: ["*.accessibe.com", "*.acsbapp.com", "*.acsbap.com"] }, { name: "Builder", homepage: "https://www.builder.io/", category: "hosting", domains: ["*.builder.io"] }, { name: "Pepperjam", homepage: "https://www.pepperjam.com/", category: "marketing", domains: ["*.pepperjam.com", "*.affiliatetechnology.com"] }, { name: "Reach", homepage: "https://withreach.com/", category: "utility", domains: ["*.gointerpay.net"] }, { name: "Chameleon", homepage: "https://www.trychameleon.com/", category: "marketing", domains: ["*.trychameleon.com"] }, { name: "Matomo", company: "InnoCraft", homepage: "https://matomo.org/", category: "analytics", domains: ["*.matomo.cloud"] }, { name: "Segmanta", homepage: "https://segmanta.com/", category: "marketing", domains: ["*.segmanta.com"] }, { name: "Podsights", homepage: "https://podsights.com/", category: "marketing", domains: ["*.pdst.fm", "us-central1-adaptive-growth.cloudfunctions.net"] }, { name: "Chatwoot", homepage: "https://www.chatwoot.com/", category: "customer-success", domains: ["*.chatwoot.com"] }, { name: "Crisp", homepage: "https://crisp.chat/", category: "customer-success", domains: ["*.crisp.chat"] }, { name: "Admiral CMP", homepage: "https://www.getadmiral.com", category: "consent-provider", domains: ["admiral.mgr.consensu.org", "*.admiral.mgr.consensu.org"] }, { name: "Adnuntius CMP", homepage: "https://adnuntius.com", category: "consent-provider", domains: ["adnuntiusconsent.mgr.consensu.org", "*.adnuntiusconsent.mgr.consensu.org"] }, { name: "Clickio CMP", homepage: "https://clickio.com", category: "consent-provider", domains: ["clickio.mgr.consensu.org", "*.clickio.mgr.consensu.org"] }, { name: "AppConsent CMP", homepage: "https://appconsent.io/en", category: "consent-provider", domains: ["appconsent.mgr.consensu.org", "*.appconsent.mgr.consensu.org"] }, { name: "DMG Media CMP", homepage: "https://www.dmgmedia.co.uk", category: "consent-provider", domains: ["dmgmedia.mgr.consensu.org", "*.dmgmedia.mgr.consensu.org"] }, { name: "Axel Springer CMP", homepage: "https://www.axelspringer.com", category: "consent-provider", domains: ["axelspringer.mgr.consensu.org", "*.axelspringer.mgr.consensu.org"] }, { name: "Bedrock CMP", homepage: "https://www.bedrockstreaming.com", category: "consent-provider", domains: ["bedrock.mgr.consensu.org", "*.bedrock.mgr.consensu.org"] }, { name: "BMIND CMP", homepage: "https://www.bmind.es", category: "consent-provider", domains: ["bmind.mgr.consensu.org", "*.bmind.mgr.consensu.org"] }, { name: "Borlabs CMP", homepage: "https://borlabs.io", category: "consent-provider", domains: ["borlabs.mgr.consensu.org", "*.borlabs.mgr.consensu.org"] }, { name: "Civic CMP", homepage: "https://www.civicuk.com", category: "consent-provider", domains: ["cookiecontrol.mgr.consensu.org", "*.cookiecontrol.mgr.consensu.org"] }, { name: "Commanders Act CMP", homepage: "https://www.commandersact.com", category: "consent-provider", domains: ["commandersact.mgr.consensu.org", "*.commandersact.mgr.consensu.org"] }, { name: "Complianz CMP", homepage: "https://complianz.io/", category: "consent-provider", domains: ["complianz.mgr.consensu.org", "*.complianz.mgr.consensu.org"] }, { name: "Consent Desk CMP", homepage: "https://www.consentdesk.com/", category: "consent-provider", domains: ["consentdesk.mgr.consensu.org", "*.consentdesk.mgr.consensu.org"] }, { name: "Consent Manager CMP", homepage: "https://consentmanager.net", category: "consent-provider", domains: ["consentmanager.mgr.consensu.org", "*.consentmanager.mgr.consensu.org"] }, { name: "Conversant CMP", homepage: "https://www.conversantmedia.eu/", category: "consent-provider", domains: ["conversant.mgr.consensu.org", "*.conversant.mgr.consensu.org"] }, { name: "Cookie Information CMP", homepage: "https://www.cookieinformation.com/", category: "consent-provider", domains: ["cookieinformation.mgr.consensu.org", "*.cookieinformation.mgr.consensu.org"] }, { name: "Cookiebot CMP", homepage: "https://www.cookiebot.com", category: "consent-provider", domains: ["cookiebot.mgr.consensu.org", "*.cookiebot.mgr.consensu.org"] }, { name: "Truendo CMP", homepage: "https://truendo.com/", category: "consent-provider", domains: ["truendo.mgr.consensu.org", "*.truendo.mgr.consensu.org"] }, { name: "Dentsu CMP", homepage: "https://www.dentsuaegisnetwork.de/", category: "consent-provider", domains: ["dan.mgr.consensu.org", "*.dan.mgr.consensu.org"] }, { name: "Didomi CMP", homepage: "https://www.didomi.io/en/", category: "consent-provider", domains: ["didomi.mgr.consensu.org", "*.didomi.mgr.consensu.org"] }, { name: "Ensighten CMP", homepage: "https://www.ensighten.com/", category: "consent-provider", domains: ["ensighten.mgr.consensu.org", "*.ensighten.mgr.consensu.org"] }, { name: "Evidon CMP", homepage: "https://evidon.com", category: "consent-provider", domains: ["evidon.mgr.consensu.org", "*.evidon.mgr.consensu.org"] }, { name: "Ezoic CMP", homepage: "https://www.ezoic.com/", category: "consent-provider", domains: ["ezoic.mgr.consensu.org", "*.ezoic.mgr.consensu.org"] }, { name: "Gemius CMP", homepage: "https://www.gemius.com", category: "consent-provider", domains: ["gemius.mgr.consensu.org", "*.gemius.mgr.consensu.org"] }, { name: "NitroPay CMP", homepage: "https://nitropay.com/", category: "consent-provider", domains: ["nitropay.mgr.consensu.org", "*.nitropay.mgr.consensu.org"] }, { name: "Google FundingChoices", homepage: "https://fundingchoices.google.com/start/", category: "consent-provider", domains: ["fundingchoices.mgr.consensu.org", "*.fundingchoices.mgr.consensu.org", "fundingchoicesmessages.google.com", "*.fundingchoicesmessages.google.com"] }, { name: "Gravito CMP", homepage: "https://www.gravito.net/", category: "consent-provider", domains: ["gravito.mgr.consensu.org", "*.gravito.mgr.consensu.org"] }, { name: "ID Ward CMP", homepage: "https://id-ward.com/enterprise", category: "consent-provider", domains: ["idward.mgr.consensu.org", "*.idward.mgr.consensu.org"] }, { name: "iubenda CMP", homepage: "https://www.iubenda.com", category: "consent-provider", domains: ["iubenda.mgr.consensu.org", "*.iubenda.mgr.consensu.org"] }, { name: "Jump CMP", homepage: "https://jumpgroup.it/", category: "consent-provider", domains: ["avacy.mgr.consensu.org", "*.avacy.mgr.consensu.org"] }, { name: "LiveRamp CMP", homepage: "https://liveramp.com/", category: "consent-provider", domains: ["faktor.mgr.consensu.org", "*.faktor.mgr.consensu.org"] }, { name: "Madvertise CMP", homepage: "https://madvertise.com/en/", category: "consent-provider", domains: ["madvertise.mgr.consensu.org", "*.madvertise.mgr.consensu.org"] }, { name: "Mairdumont Netletic CMP", homepage: "https://www.mairdumont-netletix.com/", category: "consent-provider", domains: ["mdnxmp.mgr.consensu.org", "*.mdnxmp.mgr.consensu.org"] }, { name: "Marfeel CMP", homepage: "https://www.marfeel.com/", category: "consent-provider", domains: ["marfeel.mgr.consensu.org", "*.marfeel.mgr.consensu.org"] }, { name: "Mediavine CMP", homepage: "https://www.mediavine.com/", category: "consent-provider", domains: ["mediavine.mgr.consensu.org", "*.mediavine.mgr.consensu.org"] }, { name: "ConsentServe CMP", homepage: "https://www.consentserve.com/", category: "consent-provider", domains: ["consentserve.mgr.consensu.org", "*.consentserve.mgr.consensu.org"] }, { name: "Next14 CMP", homepage: "https://www.next14.com/", category: "consent-provider", domains: ["next14.mgr.consensu.org", "*.next14.mgr.consensu.org"] }, { name: "AdRoll CMP", homepage: "https://www.adroll.com/", category: "consent-provider", domains: ["adroll.mgr.consensu.org", "*.adroll.mgr.consensu.org"] }, { name: "Ogury CMP", homepage: "https://www.ogury.com/", category: "consent-provider", domains: ["ogury.mgr.consensu.org", "*.ogury.mgr.consensu.org"] }, { name: "OneTag CMP", homepage: "https://onetag.net", category: "consent-provider", domains: ["onetag.mgr.consensu.org", "*.onetag.mgr.consensu.org"] }, { name: "OneTrust CMP", homepage: "https://onetrust.com", category: "consent-provider", domains: ["onetrust.mgr.consensu.org", "*.onetrust.mgr.consensu.org"] }, { name: "optAd360 CMP", homepage: "https://www.optad360.com/", category: "consent-provider", domains: ["optad360.mgr.consensu.org", "*.optad360.mgr.consensu.org"] }, { name: "Osano CMP", homepage: "https://www.osano.com", category: "consent-provider", domains: ["osano.mgr.consensu.org", "*.osano.mgr.consensu.org"] }, { name: "Playwire CMP", homepage: "https://www.playwire.com", category: "consent-provider", domains: ["playwire.mgr.consensu.org", "*.playwire.mgr.consensu.org"] }, { name: "Pulselive CMP", homepage: "https://www.pulselive.com", category: "consent-provider", domains: ["pulselive.mgr.consensu.org", "*.pulselive.mgr.consensu.org"] }, { name: "Quantcast Choice", homepage: "https://quantcast.com", category: "consent-provider", domains: ["quantcast.mgr.consensu.org", "*.quantcast.mgr.consensu.org"] }, { name: "RCS Pubblicita CMP", homepage: "http://www.rcspubblicita.it/site/home.html", category: "consent-provider", domains: ["rcsmediagroup.mgr.consensu.org", "*.rcsmediagroup.mgr.consensu.org"] }, { name: "Rich Audience CMP", homepage: "https://richaudience.com", category: "consent-provider", domains: ["richaudience.mgr.consensu.org", "*.richaudience.mgr.consensu.org"] }, { name: "Ringier Axel Springer CMP", homepage: "https://www.ringieraxelspringer.pl/en/home/", category: "consent-provider", domains: ["rasp.mgr.consensu.org", "*.rasp.mgr.consensu.org"] }, { name: "Secure Privacy CMP", homepage: "https://secureprivacy.ai/", category: "consent-provider", domains: ["secureprivacy.mgr.consensu.org", "*.secureprivacy.mgr.consensu.org"] }, { name: "Securiti CMP", homepage: "https://securiti.ai/", category: "consent-provider", domains: ["securiti.mgr.consensu.org", "*.securiti.mgr.consensu.org"] }, { name: "Seznam.cz CMP", homepage: "https://www.seznam.cz/", category: "consent-provider", domains: ["seznam.mgr.consensu.org", "*.seznam.mgr.consensu.org"] }, { name: "ShareThis CMP", homepage: "https://sharethis.com", category: "consent-provider", domains: ["sharethis.mgr.consensu.org", "*.sharethis.mgr.consensu.org"] }, { name: "ShinyStat CMP", homepage: "https://www.shinystat.com", category: "consent-provider", domains: ["shinystat.mgr.consensu.org", "*.shinystat.mgr.consensu.org"] }, { name: "Sibbo CMP", homepage: "https://sibboventures.com/en/", category: "consent-provider", domains: ["sibboventures.mgr.consensu.org", "*.sibboventures.mgr.consensu.org"] }, { name: "Singlespot CMP", homepage: "https://www.singlespot.com/en", category: "consent-provider", domains: ["singlespot.mgr.consensu.org", "*.singlespot.mgr.consensu.org"] }, { name: "Sirdata CMP", homepage: "https://www.sirdata.com", category: "consent-provider", domains: ["sddan.mgr.consensu.org", "*.sddan.mgr.consensu.org"] }, { name: "Snigel CMP", homepage: "https://snigel.com", category: "consent-provider", domains: ["snigelweb.mgr.consensu.org", "*.snigelweb.mgr.consensu.org"] }, { name: "Sourcepoint CMP", homepage: "https://sourcepoint.com", category: "consent-provider", domains: ["sourcepoint.mgr.consensu.org", "*.sourcepoint.mgr.consensu.org"] }, { name: "Pubtech CMP", homepage: "https://www.pubtech.ai/", category: "consent-provider", domains: ["pubtech.mgr.consensu.org", "*.pubtech.mgr.consensu.org"] }, { name: "AdMetrics Pro CMP", homepage: "https://admetricspro.com", category: "consent-provider", domains: ["cmp.mgr.consensu.org", "*.cmp.mgr.consensu.org"] }, { name: "Traffective CMP", homepage: "https://traffective.com", category: "consent-provider", domains: ["traffective.mgr.consensu.org", "*.traffective.mgr.consensu.org"] }, { name: "UniConsent CMP", homepage: "https://www.uniconsent.com", category: "consent-provider", domains: ["uniconsent.mgr.consensu.org", "*.uniconsent.mgr.consensu.org", "cmp.uniconsent.com", "*.uniconsent.com"] }, { name: "TrustArc CMP", homepage: "https://trustarc.com/", category: "consent-provider", domains: ["trustarc.mgr.consensu.org", "*.trustarc.mgr.consensu.org"] }, { name: "Usercentrics CMP", homepage: "https://usercentrics.com", category: "consent-provider", domains: ["usercentrics.mgr.consensu.org", "*.usercentrics.mgr.consensu.org", "*.usercentrics.eu", "*.services.usercentrics.eu"] }, { name: "WebAds CMP", homepage: "https://www.webads.nl/", category: "consent-provider", domains: ["webads.mgr.consensu.org", "*.webads.mgr.consensu.org"] }, { name: "Trustcommander", company: "Commandersact", homepage: "https://www.commandersact.com", category: "consent-provider", domains: ["*.trustcommander.net"] }, { name: "Hubvisor", homepage: "https://www.hubvisor.io", category: "ad", domains: ["*.hubvisor.io"] }, { name: "Castle", homepage: "https://castle.io", category: "utility", domains: ["*.castle.io", "d2t77mnxyo7adj.cloudfront.net"] }, { name: "Wigzo", homepage: "https://www.wigzo.com/", category: "marketing", domains: ["*.wigzo.com", "*.wigzopush.com"] }, { name: "Convertful", homepage: "https://convertful.com/", category: "marketing", domains: ["*.convertful.com"] }, { name: "OpenLink", company: "MediaWallah", homepage: "https://www.mediawallah.com/", category: "ad", domains: ["*.mediawallahscript.com"] }, { name: "TPMN", company: "TPMN", homepage: "http://tpmn.io/", category: "ad", domains: ["*.tpmn.co.kr"] }, { name: "HERO", company: "Klarna", homepage: "https://www.usehero.com/", category: "customer-success", domains: ["*.usehero.com"] }, { name: "Zync", company: "Zeta Global", homepage: "https://zetaglobal.com/", category: "marketing", domains: ["*.rezync.com"] }, { name: "AdFuel Video", company: "AdFuel", homepage: "https://goadfuel.com/", category: "ad", domains: ["*.videoplayerhub.com"] }, { name: "Prefix Box AI Search", company: "Prefix Box", homepage: "https://www.prefixbox.com/", category: "utility", domains: ["*.prefixbox.com"] }, { name: "SpeedSize Service Worker", company: "SpeedSize", homepage: "https://speedsize.com/", category: "utility", domains: ["di6367dava8ow.cloudfront.net", "d2d22nphq0yz8t.cloudfront.net"] }, { name: "Vonage Video API", company: "Vonage", homepage: "https://www.vonage.com/communications-apis/video/", category: "video", domains: ["*.opentok.com"] }, { name: "Checkout.com", company: "Checkout.com", homepage: "https://www.checkout.com", category: "utility", domains: ["*.checkout.com"] }, { name: "Noibu", company: "Noibu", homepage: "https://www.noibu.com", category: "utility", domains: ["*.noibu.com"] }, { name: "Clarity", company: "Microsoft", homepage: "https://clarity.microsoft.com/", category: "utility", domains: ["*.clarity.ms"] }, { name: "goinstore", company: "Emplifi", homepage: "https://goinstore.com/", category: "customer-success", domains: ["*.goinstore.com"] }, { name: "SegmentStream", company: "SegmentStream", homepage: "https://segmentstream.com/", category: "marketing", domains: ["*.segmentstream.com"] }, { name: "Amazon Associates", company: "Amazon", homepage: "https://affiliate-program.amazon.co.uk/", category: "marketing", domains: ["*.associates-amazon.com"] }, { name: "DotMetrics", company: "Ipsos", homepage: "https://www.dotmetrics.net/", category: "analytics", domains: ["*.dotmetrics.net"] }, { name: "Truffle Bid", company: "Truffle", homepage: "https://truffle.bid/", category: "ad", domains: ["*.truffle.bid"] }, { name: "Hybrid", company: "Hybrid", homepage: "https://hybrid.ai/", category: "ad", domains: ["*.hybrid.ai"] }, { name: "AdMan Media", company: "AdMan", homepage: "https://admanmedia.com/", category: "video", domains: ["*.admanmedia.com"] }, { name: "ID5 Identity Cloud", company: "ID5", homepage: "https://id5.io/", category: "ad", domains: ["id5-sync.com", "*.id5-sync.com"] }, { name: "Audience Rate", company: "Audience Rate Limited", homepage: "https://www.audiencerate.com/", category: "ad", domains: ["*.audrte.com"] }, { name: "Seedtag", company: "Seedtag Advertising", homepage: "https://www.seedtag.com/", category: "ad", domains: ["*.seedtag.com"] }, { name: "IVI", company: "IVI Technologies", homepage: "http://ivitechnologies.com/", category: "ad", domains: ["*.ivitrack.com"] }, { name: "Sportradar", company: "Sportradar", homepage: "https://www.sportradar.com/", category: "ad", domains: ["*.sportradarserving.com"] }, { name: "ZEOTAP", company: "ZEOTAP", homepage: "https://zeotap.com/", category: "ad", domains: ["*.zeotap.com"] }, { name: "Web Content Assessor", company: "TMT Digital", homepage: "https://mediatrust.com/", category: "ad", domains: ["*.webcontentassessor.com"] }, { name: "Genie", company: "Media Force", homepage: "https://hellogenie.com/", category: "ad", domains: ["*.mfadsrvr.com"] }, { name: "mediarithmics", company: "mediarithmics", homepage: "https://www.mediarithmics.com/", category: "ad", domains: ["*.mediarithmics.com"] }, { name: "Ozone Project", company: "The Ozone Project", homepage: "https://www.ozoneproject.com/", category: "ad", domains: ["*.the-ozone-project.com"] }, { name: "FiftyAurora", company: "Fifty", homepage: "https://fifty.io/", category: "ad", domains: ["*.fiftyt.com"] }, { name: "smadex", company: "entravision", homepage: "https://smadex.com/", category: "ad", domains: ["*.smadex.com"] }, { name: "AWX", company: "Trinity Mirror", category: "ad", domains: ["*.tm-awx.com"] }, { name: "XPO", company: "Knorex", category: "ad", homepage: "https://www.knorex.com/", domains: ["*.brand-display.com"] }, { name: "Viafoura", company: "Viafoura", category: "ad", homepage: "https://viafoura.com/", domains: ["*.viafoura.co", "*.viafoura.net"] }, { name: "Adnami", company: "Adnami", category: "ad", homepage: "https://www.adnami.io/", domains: ["*.adnami.io"] }, { name: "LiveRamp Privacy Manager", company: "LiveRamp", category: "ad", homepage: "https://liveramp.com/privacy-legal-compliance/", domains: ["*.privacymanager.io"] }, { name: "Onfocus", company: "Onfocus SAS", category: "ad", domains: ["*.4dex.io"] }, { name: "viewTag", company: "Advanced Store", category: "ad", domains: ["*.ad4m.at"] }, { name: "MRP Prelytics", company: "Market Resource Partners", category: "ad", homepage: "https://www.mrpfd.com/", domains: ["*.mrpdata.net"] }, { name: "iPROM", company: "iPROM", category: "ad", homepage: "https://iprom.eu/", domains: ["*.iprom.net"] }, { name: "Plausible", company: "Plausible", homepage: "https://plausible.io/", category: "analytics", domains: ["*.plausible.io"] }, { name: "Micro Analytics", company: "Micro Analytics", homepage: "https://microanalytics.io/", category: "analytics", domains: ["padmin.microanalytics.io", "www.microanalytics.io", "dev.microanalytics.io", "status.microanalytics.io"] }, { name: "Scale8", company: "Scale8", homepage: "https://scale8.com/", category: "analytics", domains: ["www.scale8.com", "api-dev.scale8.com", "cdn.scale8.com", "ui.scale8.com"] }, { name: "Cabin", company: "Cabin", homepage: "https://withcabin.com/", category: "analytics", domains: ["*.withcabin.com"] }, { name: "Appcues", company: "Appcues", homepage: "https://www.appcues.com/", category: "analytics", domains: ["*.appcues.com"] }, { name: "Fathom Analytics", company: "Fathom", homepage: "https://usefathom.com/", category: "analytics", domains: ["*.usefathom.com"] }, { name: "Clearbit", company: "Clearbit", homepage: "https://clearbit.com/", category: "analytics", domains: ["*.clearbitjs.com", "*.clearbitscripts.com", "*.clearbit.com"] }, { name: "G2", company: "G2", homepage: "https://www.g2.com/", category: "utility", domains: ["*.g2.com", "*.g2crowd.com"] }, { name: "Navu", company: "Navu", homepage: "https://navu.co/", category: "ad", domains: ["*.navu.co"] }, { name: "InZynk", company: "InZynk", homepage: "https://inzynk.com/", category: "ad", domains: ["*.inzynk.com", "*.inzynk.io"] }, { name: "Integrate", company: "Integrate", homepage: "https://www.integrate.com/", category: "ad", domains: ["*.integrate.com", "*.listenloop.com"] }, { name: "Ad Lightning", company: "Boltive", homepage: "https://www.adlightning.com/", category: "ad", domains: ["*.adlightning.com"] }, { name: "GeoEdge", company: "GeoEdge", homepage: "https://www.geoedge.com/", category: "ad", domains: ["*.geoedge.com", "*.geoedge.be"] }, { name: "Doofinder", company: "Doofinder", homepage: "https://www.doofinder.com/", category: "utility", domains: ["cdn.doofinder.com"] }, { name: "Revlifter", company: "Revlifter", homepage: "https://www.revlifter.com/", category: "utility", domains: ["assets.revlifter.com"] }, { name: "Didomi", company: "Didomi", homepage: "https://www.didomi.io/", category: "consent-provider", domains: ["sdk.privacy-center.org", "api.privacy-center.org"] }, { name: "Pubperf Analytics", company: "Pubperf", homepage: "https://www.pubperf.com/", category: "analytics", domains: ["*.pubperf.com"] }];
      }
    });
    require_nostats = __commonJS2({
      "package/lib/subsets/nostats.js"(exports$1, module2) {
        var { createAPIFromDataset } = require_create_entity_finder_api2();
        var entities = require_entities_nostats();
        module2.exports = createAPIFromDataset(entities);
      }
    });
    require_nostats_subset = __commonJS2({
      "package/nostats-subset.js"(exports$1, module2) {
        module2.exports = require_nostats();
      }
    });
    nostatsSubset = require_nostats_subset();
    defaults2 = () => ({
      includeRuntimeCallStats: false,
      showAllEvents: false,
      debugMode: false,
      maxInvalidationEventsPerEvent: 20,
      enableAnimationsFrameHandler: false
    });
    Configuration = /* @__PURE__ */ Object.freeze({
      __proto__: null,
      configToCacheKey: configToCacheKey2,
      defaults: defaults2
    });
    extensionPalette2 = [
      "primary",
      "primary-light",
      "primary-dark",
      "secondary",
      "secondary-light",
      "secondary-dark",
      "tertiary",
      "tertiary-light",
      "tertiary-dark",
      "error",
      "warning"
    ];
    Extensions$1 = /* @__PURE__ */ Object.freeze({
      __proto__: null,
      extensionPalette: extensionPalette2,
      isConsoleTimestampPayloadTrackEntry: isConsoleTimestampPayloadTrackEntry2,
      isExtensionEntryObj: isExtensionEntryObj2,
      isExtensionPayloadMarker: isExtensionPayloadMarker2,
      isSyntheticExtensionEntry: isSyntheticExtensionEntry2,
      isValidExtensionPayload: isValidExtensionPayload2
    });
    File$1 = /* @__PURE__ */ Object.freeze({
      __proto__: null,
      isEntriesLinkAnnotation: isEntriesLinkAnnotation2,
      isEntryLabelAnnotation: isEntryLabelAnnotation2,
      isTimeRangeAnnotation: isTimeRangeAnnotation2,
      traceEventKeyToValues: traceEventKeyToValues2
    });
    Overlays = /* @__PURE__ */ Object.freeze({
      __proto__: null
    });
    Timing$1 = /* @__PURE__ */ Object.freeze({
      __proto__: null,
      Micro: Micro2,
      Milli: Milli2,
      Seconds: Seconds2
    });
    VALID_PROFILE_SOURCES = ["Inspector", "SelfProfiling", "Internal"];
    markerTypeGuards2 = [
      isMarkDOMContent2,
      isMarkLoad2,
      isFirstPaint2,
      isFirstContentfulPaint2,
      isAnyLargestContentfulPaintCandidate,
      isNavigationStart2,
      isSoftNavigationStart
    ];
    MarkerName2 = [
      "MarkDOMContent",
      "MarkLoad",
      "firstPaint",
      "firstContentfulPaint",
      "largestContentfulPaint::Candidate",
      "largestContentfulPaint::CandidateForSoftNavigation",
      "navigationStart",
      "SoftNavigationStart"
    ];
    pageLoadEventTypeGuards2 = [
      ...markerTypeGuards2,
      isInteractiveTime2
    ];
    NO_NAVIGATION2 = "NO_NAVIGATION";
    (function(SelectorTimingsKey3) {
      SelectorTimingsKey3["Elapsed"] = "elapsed (us)";
      SelectorTimingsKey3["RejectPercentage"] = "reject_percentage";
      SelectorTimingsKey3["FastRejectCount"] = "fast_reject_count";
      SelectorTimingsKey3["MatchAttempts"] = "match_attempts";
      SelectorTimingsKey3["MatchCount"] = "match_count";
      SelectorTimingsKey3["Selector"] = "selector";
      SelectorTimingsKey3["StyleSheetId"] = "style_sheet_id";
      SelectorTimingsKey3["InvalidationCount"] = "invalidation_count";
    })(SelectorTimingsKey2 || (SelectorTimingsKey2 = {}));
    Categories2 = {
      Console: "blink.console",
      UserTiming: "blink.user_timing",
      Loading: "loading"
    };
    TraceEvents = /* @__PURE__ */ Object.freeze({
      __proto__: null,
      CallFrameID: CallFrameID2,
      Categories: Categories2,
      MarkerName: MarkerName2,
      NO_NAVIGATION: NO_NAVIGATION2,
      ProcessID: ProcessID2,
      ProfileID: ProfileID2,
      SampleIndex: SampleIndex2,
      get SelectorTimingsKey() {
        return SelectorTimingsKey2;
      },
      ThreadID: ThreadID2,
      VALID_PROFILE_SOURCES,
      WorkerId: WorkerId2,
      eventIsPageLoadEvent: eventIsPageLoadEvent2,
      isAbortPostTaskCallback: isAbortPostTaskCallback2,
      isActivateLayerTree: isActivateLayerTree2,
      isAnimation: isAnimation2,
      isAnimationFrameAsyncEnd: isAnimationFrameAsyncEnd2,
      isAnimationFrameAsyncStart: isAnimationFrameAsyncStart2,
      isAnimationFramePresentation: isAnimationFramePresentation2,
      isAnyLargestContentfulPaintCandidate,
      isAnyScriptSourceEvent: isAnyScriptSourceEvent2,
      isAuctionWorkletDoneWithProcess: isAuctionWorkletDoneWithProcess2,
      isAuctionWorkletRunningInProcess: isAuctionWorkletRunningInProcess2,
      isBegin: isBegin2,
      isBeginCommitCompositorFrame: isBeginCommitCompositorFrame2,
      isBeginFrame: isBeginFrame2,
      isBeginMainThreadFrame: isBeginMainThreadFrame2,
      isBeginRemoteFontLoad: isBeginRemoteFontLoad2,
      isCommit: isCommit2,
      isCommitLoad: isCommitLoad2,
      isComplete: isComplete2,
      isCompositeLayers: isCompositeLayers2,
      isConsoleRunTask: isConsoleRunTask2,
      isConsoleTime: isConsoleTime2,
      isConsoleTimeStamp: isConsoleTimeStamp2,
      isDOMStats: isDOMStats2,
      isDebuggerAsyncTaskRun: isDebuggerAsyncTaskRun2,
      isDebuggerAsyncTaskScheduled: isDebuggerAsyncTaskScheduled2,
      isDecodeImage: isDecodeImage2,
      isDecodeLazyPixelRef: isDecodeLazyPixelRef2,
      isDidCommitSameDocumentNavigation: isDidCommitSameDocumentNavigation2,
      isDispatch: isDispatch2,
      isDisplayListItemListSnapshot: isDisplayListItemListSnapshot2,
      isDomLoading: isDomLoading2,
      isDrawFrame: isDrawFrame2,
      isDrawLazyPixelRef: isDrawLazyPixelRef2,
      isDroppedFrame: isDroppedFrame2,
      isEnd: isEnd2,
      isEventTiming: isEventTiming2,
      isEventTimingEnd: isEventTimingEnd2,
      isEventTimingStart: isEventTimingStart2,
      isFireAnimationFrame: isFireAnimationFrame2,
      isFireIdleCallback: isFireIdleCallback2,
      isFirstContentfulPaint: isFirstContentfulPaint2,
      isFirstPaint: isFirstPaint2,
      isFlowPhase: isFlowPhase2,
      isFlowPhaseEvent: isFlowPhaseEvent2,
      isFrameCommittedInBrowser: isFrameCommittedInBrowser2,
      isFunctionCall: isFunctionCall2,
      isGPUTask: isGPUTask2,
      isHandlePostMessage: isHandlePostMessage2,
      isInstant: isInstant2,
      isInteractiveTime: isInteractiveTime2,
      isInvalidateLayout: isInvalidateLayout2,
      isInvalidationTracking: isInvalidationTracking2,
      isJSInvocationEvent: isJSInvocationEvent2,
      isJSSample,
      isLargestImagePaintCandidate: isLargestImagePaintCandidate2,
      isLargestTextPaintCandidate: isLargestTextPaintCandidate2,
      isLayerTreeHostImplSnapshot: isLayerTreeHostImplSnapshot2,
      isLayout: isLayout2,
      isLayoutImageUnsized: isLayoutImageUnsized2,
      isLayoutInvalidationTracking: isLayoutInvalidationTracking2,
      isLayoutShift: isLayoutShift2,
      isLegacyScreenshot: isLegacyScreenshot2,
      isLegacySyntheticScreenshot: isLegacySyntheticScreenshot2,
      isLegacyTimelineFrame: isLegacyTimelineFrame2,
      isLinkPreconnect: isLinkPreconnect2,
      isMainFrameViewport: isMainFrameViewport2,
      isMarkDOMContent: isMarkDOMContent2,
      isMarkLoad: isMarkLoad2,
      isMarkerEvent: isMarkerEvent2,
      isNavigationStart: isNavigationStart2,
      isNeedsBeginFrameChanged: isNeedsBeginFrameChanged2,
      isNestableAsyncPhase: isNestableAsyncPhase2,
      isNetworkTrackEntry: isNetworkTrackEntry2,
      isPaint: isPaint2,
      isPaintImage: isPaintImage2,
      isPairableAsyncBegin: isPairableAsyncBegin2,
      isPairableAsyncEnd: isPairableAsyncEnd2,
      isPairableAsyncInstant: isPairableAsyncInstant2,
      isParseAuthorStyleSheetEvent: isParseAuthorStyleSheetEvent2,
      isParseHTML: isParseHTML2,
      isParseMetaViewport: isParseMetaViewport2,
      isPerformanceMark: isPerformanceMark2,
      isPerformanceMeasure: isPerformanceMeasure2,
      isPerformanceMeasureBegin: isPerformanceMeasureBegin2,
      isPhaseAsync: isPhaseAsync2,
      isPipelineReporter: isPipelineReporter2,
      isPrePaint: isPrePaint2,
      isPreloadRenderBlockingStatusChangeEvent,
      isProcessName: isProcessName2,
      isProfile: isProfile2,
      isProfileCall: isProfileCall2,
      isProfileChunk: isProfileChunk2,
      isRasterTask: isRasterTask2,
      isRecalcStyle: isRecalcStyle2,
      isReceivedDataEvent: isReceivedDataEvent2,
      isRemoteFontLoaded: isRemoteFontLoaded2,
      isRenderFrameImplCreateChildFrame: isRenderFrameImplCreateChildFrame2,
      isRendererEvent: isRendererEvent2,
      isRequestIdleCallback: isRequestIdleCallback2,
      isRequestMainThreadFrame: isRequestMainThreadFrame2,
      isResourceChangePriority: isResourceChangePriority2,
      isResourceFinish: isResourceFinish2,
      isResourceMarkAsCached: isResourceMarkAsCached2,
      isResourceReceiveResponse: isResourceReceiveResponse2,
      isResourceReceivedData: isResourceReceivedData2,
      isResourceSendRequest: isResourceSendRequest2,
      isResourceWillSendRequest: isResourceWillSendRequest2,
      isRunPostTaskCallback: isRunPostTaskCallback2,
      isRunTask: isRunTask2,
      isRundownScript: isRundownScript2,
      isRundownScriptCompiled: isRundownScriptCompiled2,
      isRundownScriptSource: isRundownScriptSource2,
      isRundownScriptSourceLarge: isRundownScriptSourceLarge2,
      isSchedulePostMessage: isSchedulePostMessage2,
      isSchedulePostTaskCallback: isSchedulePostTaskCallback2,
      isScheduleStyleInvalidationTracking: isScheduleStyleInvalidationTracking2,
      isScheduleStyleRecalculation: isScheduleStyleRecalculation2,
      isScreenshot: isScreenshot2,
      isScrollLayer: isScrollLayer2,
      isSelectorStats: isSelectorStats2,
      isSetLayerId: isSetLayerId2,
      isSoftLargestContentfulPaintCandidate,
      isSoftNavigationStart,
      isStyleInvalidatorInvalidationTracking: isStyleInvalidatorInvalidationTracking2,
      isStyleRecalcInvalidationTracking: isStyleRecalcInvalidationTracking2,
      isSyntheticAnimation: isSyntheticAnimation2,
      isSyntheticBased: isSyntheticBased2,
      isSyntheticConsoleTiming: isSyntheticConsoleTiming2,
      isSyntheticCpuProfile: isSyntheticCpuProfile2,
      isSyntheticInteraction: isSyntheticInteraction2,
      isSyntheticLayoutShift: isSyntheticLayoutShift2,
      isSyntheticLayoutShiftCluster: isSyntheticLayoutShiftCluster2,
      isSyntheticNetworkRequest: isSyntheticNetworkRequest2,
      isSyntheticUserTiming: isSyntheticUserTiming2,
      isSyntheticWebSocketConnection: isSyntheticWebSocketConnection2,
      isThreadName: isThreadName2,
      isTimerFire: isTimerFire2,
      isTimerInstall: isTimerInstall2,
      isTracingSessionIdForWorker: isTracingSessionIdForWorker2,
      isTracingStartedInBrowser: isTracingStartedInBrowser2,
      isUpdateCounters: isUpdateCounters2,
      isUpdateLayer: isUpdateLayer2,
      isUserTiming: isUserTiming2,
      isUserTimingMeasure: isUserTimingMeasure2,
      isV8Compile: isV8Compile2,
      isWebSocketCreate: isWebSocketCreate2,
      isWebSocketDestroy: isWebSocketDestroy2,
      isWebSocketEvent: isWebSocketEvent2,
      isWebSocketInfo: isWebSocketInfo2,
      isWebSocketReceiveHandshakeResponse: isWebSocketReceiveHandshakeResponse2,
      isWebSocketSendHandshakeRequest: isWebSocketSendHandshakeRequest2,
      isWebSocketTraceEvent: isWebSocketTraceEvent2,
      isWebSocketTransfer: isWebSocketTransfer2,
      objectIsCallFrame: objectIsCallFrame2,
      objectIsEvent
    });
    types$3 = /* @__PURE__ */ Object.freeze({
      __proto__: null,
      Configuration,
      Events: TraceEvents,
      Extensions: Extensions$1,
      File: File$1,
      Overlays,
      Timing: Timing$1
    });
    helpers$1 = /* @__PURE__ */ Object.freeze({
      __proto__: null,
      addEventToEntityMapping: addEventToEntityMapping2,
      addNetworkRequestToEntityMapping: addNetworkRequestToEntityMapping2,
      getEntityForEvent: getEntityForEvent2,
      getEntityForUrl: getEntityForUrl2,
      getNonResolvedURL: getNonResolvedURL2,
      makeUpEntity: makeUpEntity2
    });
    activeManager2 = null;
    SyntheticEventsManager2 = class _SyntheticEventsManager {
      #syntheticTraces = [];
      #rawTraceEvents = [];
      static activate(manager) {
        activeManager2 = manager;
      }
      static createAndActivate(rawEvents) {
        const manager = new _SyntheticEventsManager(rawEvents);
        _SyntheticEventsManager.activate(manager);
        return manager;
      }
      static getActiveManager() {
        if (!activeManager2) {
          throw new Error("Attempted to get a SyntheticEventsManager without initializing");
        }
        return activeManager2;
      }
      static reset() {
        activeManager2 = null;
      }
      static registerSyntheticEvent(syntheticEvent) {
        try {
          return _SyntheticEventsManager.getActiveManager().#registerSyntheticEvent(syntheticEvent);
        } catch {
          return syntheticEvent;
        }
      }
      constructor(rawEvents) {
        this.#rawTraceEvents = rawEvents;
      }
      #registerSyntheticEvent(syntheticEvent) {
        const rawIndex = this.#rawTraceEvents.indexOf(syntheticEvent.rawSourceEvent);
        if (rawIndex < 0) {
          throw new Error("Attempted to register a synthetic event paired to an unknown raw event.");
        }
        const eventAsSynthetic = syntheticEvent;
        this.#syntheticTraces[rawIndex] = eventAsSynthetic;
        return eventAsSynthetic;
      }
      syntheticEventForRawEventIndex(rawEventIndex) {
        const syntheticEvent = this.#syntheticTraces.at(rawEventIndex);
        if (!syntheticEvent) {
          throw new Error(`Attempted to get a synthetic event from an unknown raw event index: ${rawEventIndex}`);
        }
        return syntheticEvent;
      }
      getSyntheticTraces() {
        return this.#syntheticTraces;
      }
      getRawTraceEvents() {
        return this.#rawTraceEvents;
      }
    };
    SyntheticEvents = /* @__PURE__ */ Object.freeze({
      __proto__: null,
      SyntheticEventsManager: SyntheticEventsManager2
    });
    milliToMicro2 = (value) => Micro2(value * 1e3);
    secondsToMilli2 = (value) => Milli2(value * 1e3);
    secondsToMicro2 = (value) => milliToMicro2(secondsToMilli2(value));
    microToMilli2 = (value) => Milli2(value / 1e3);
    microToSeconds2 = (value) => Seconds2(value / 1e3 / 1e3);
    Timing = /* @__PURE__ */ Object.freeze({
      __proto__: null,
      boundsIncludeTimeRange: boundsIncludeTimeRange2,
      combineTraceWindowsMicro: combineTraceWindowsMicro2,
      eventIsInBounds: eventIsInBounds2,
      eventTimingsMicroSeconds: eventTimingsMicroSeconds2,
      eventTimingsMilliSeconds: eventTimingsMilliSeconds2,
      expandWindowByPercentOrToOneMillisecond: expandWindowByPercentOrToOneMillisecond2,
      microToMilli: microToMilli2,
      microToSeconds: microToSeconds2,
      milliToMicro: milliToMicro2,
      secondsToMicro: secondsToMicro2,
      secondsToMilli: secondsToMilli2,
      timeStampForEventAdjustedByClosestNavigation: timeStampForEventAdjustedByClosestNavigation2,
      timestampIsInBounds: timestampIsInBounds2,
      traceWindowFromEvent: traceWindowFromEvent2,
      traceWindowFromMicroSeconds: traceWindowFromMicroSeconds2,
      traceWindowFromMilliSeconds: traceWindowFromMilliSeconds2,
      traceWindowFromOverlay: traceWindowFromOverlay2,
      traceWindowMicroSecondsToMilliSeconds: traceWindowMicroSecondsToMilliSeconds2,
      traceWindowMilliSeconds: traceWindowMilliSeconds2,
      windowFitsInsideBounds: windowFitsInsideBounds2,
      windowsEqual: windowsEqual2
    });
    DevToolsTimelineEventCategory2 = "disabled-by-default-devtools.timeline";
    parsedCategories2 = /* @__PURE__ */ new Map();
    VISIBLE_TRACE_EVENT_TYPES2 = /* @__PURE__ */ new Set([
      "AbortPostTaskCallback",
      "Animation",
      "AsyncTask",
      "v8.deserializeOnBackground",
      "v8.produceModuleCache",
      "v8.produceCache",
      "CancelAnimationFrame",
      "CancelIdleCallback",
      "Commit",
      "V8.CompileCode",
      "V8.CompileModule",
      "v8.compile",
      "CompositeLayers",
      "ComputeIntersections",
      "ConsoleTime",
      "CppGC.IncrementalSweep",
      "DoDecryptReply",
      "DoDecrypt",
      "DoDigestReply",
      "DoDigest",
      "DoEncryptReply",
      "DoEncrypt",
      "DoSignReply",
      "DoSign",
      "DoVerifyReply",
      "DoVerify",
      "Decode Image",
      "EmbedderCallback",
      "v8.evaluateModule",
      "EvaluateScript",
      "EventDispatch",
      "EventTiming",
      "V8.FinalizeDeserialization",
      "FireAnimationFrame",
      "FireIdleCallback",
      "FunctionCall",
      "BlinkGC.AtomicPhase",
      "GCEvent",
      "GPUTask",
      "HandlePostMessage",
      "HitTest",
      "JSSample",
      "Layerize",
      "Layout",
      "MajorGC",
      "MinorGC",
      "V8.OptimizeCode",
      "PaintSetup",
      "Paint",
      "ParseAuthorStyleSheet",
      "ParseHTML",
      "PrePaint",
      "ProfileCall",
      "Program",
      "RasterTask",
      "RequestAnimationFrame",
      "RequestIdleCallback",
      "ResourceFinish",
      "ResourceReceivedData",
      "ResourceReceiveResponse",
      "ResourceSendRequest",
      "ResourceWillSendRequest",
      "RunMicrotasks",
      "RunPostTaskCallback",
      "RunTask",
      "SchedulePostMessage",
      "SchedulePostTaskCallback",
      "ScheduleStyleRecalculation",
      "ScrollLayer",
      "CpuProfiler::StartProfiling",
      "v8.parseOnBackgroundParsing",
      "v8.parseOnBackgroundWaiting",
      "v8.parseOnBackground",
      "SyntheticLayoutShiftCluster",
      "SyntheticLayoutShift",
      "TimeStamp",
      "TimerFire",
      "TimerInstall",
      "TimerRemove",
      "UpdateLayerTree",
      "UpdateLayoutTree",
      "UserTiming",
      "V8Console::runTask",
      "v8.wasm.cachedModule",
      "v8.wasm.compiledModule",
      "v8.wasm.moduleCacheHit",
      "v8.wasm.moduleCacheInvalid",
      "v8.wasm.streamFromResponseCallback",
      "WebSocketCreate",
      "WebSocketDestroy",
      "WebSocketReceiveHandshakeResponse",
      "WebSocketReceive",
      "WebSocketSendHandshakeRequest",
      "WebSocketSend",
      "XHRLoad",
      "XHRReadyStateChange"
    ]);
    Trace = /* @__PURE__ */ Object.freeze({
      __proto__: null,
      VISIBLE_TRACE_EVENT_TYPES: VISIBLE_TRACE_EVENT_TYPES2,
      activeURLForFrameAtTime: activeURLForFrameAtTime2,
      addEventToProcessThread: addEventToProcessThread2,
      compareBeginAndEnd: compareBeginAndEnd2,
      createMatchedSortedSyntheticEvents: createMatchedSortedSyntheticEvents2,
      eventContainsTimestamp: eventContainsTimestamp2,
      eventHasCategory: eventHasCategory2,
      eventTimeComparator: eventTimeComparator2,
      extractId: extractId2,
      extractOriginFromTrace: extractOriginFromTrace2,
      extractSampleTraceId: extractSampleTraceId2,
      findNextEventAfterTimestamp: findNextEventAfterTimestamp2,
      findPreviousEventBeforeTimestamp: findPreviousEventBeforeTimestamp2,
      findRecalcStyleEvents: findRecalcStyleEvents2,
      forEachEvent: forEachEvent2,
      frameIDForEvent: frameIDForEvent2,
      getNavigationForTraceEvent: getNavigationForTraceEvent2,
      getStackTraceTopCallFrameInEventPayload: getStackTraceTopCallFrameInEventPayload2,
      getSyntheticId: getSyntheticId2,
      getZeroIndexedLineAndColumnForEvent: getZeroIndexedLineAndColumnForEvent2,
      getZeroIndexedStackTraceInEventPayload: getZeroIndexedStackTraceInEventPayload2,
      isExtensionUrl: isExtensionUrl2,
      isMatchingCallFrame: isMatchingCallFrame2,
      isTopLevelEvent: isTopLevelEvent2,
      makeProfileCall: makeProfileCall2,
      makeZeroBasedCallFrame: makeZeroBasedCallFrame2,
      mergeEventsInOrder: mergeEventsInOrder2,
      parseDevtoolsDetails: parseDevtoolsDetails2,
      rawCallFrameForEntry,
      sortTraceEventsInPlace: sortTraceEventsInPlace2,
      stackTraceInEvent: stackTraceInEvent2
    });
    nodeIdCount2 = 0;
    makeTraceEntryNodeId2 = () => ++nodeIdCount2;
    makeEmptyTraceEntryTree2 = () => ({
      roots: /* @__PURE__ */ new Set(),
      maxDepth: 0
    });
    makeEmptyTraceEntryNode2 = (entry, id2) => ({
      entry,
      id: id2,
      parent: null,
      children: [],
      depth: 0
    });
    TreeHelpers = /* @__PURE__ */ Object.freeze({
      __proto__: null,
      canBuildTreesFromEvents: canBuildTreesFromEvents2,
      makeEmptyTraceEntryNode: makeEmptyTraceEntryNode2,
      makeEmptyTraceEntryTree: makeEmptyTraceEntryTree2,
      makeTraceEntryNodeId: makeTraceEntryNodeId2,
      treify: treify2,
      walkEntireTree: walkEntireTree2,
      walkTreeFromEntry: walkTreeFromEntry2
    });
    Extensions = /* @__PURE__ */ Object.freeze({
      __proto__: null,
      buildTrackDataFromExtensionEntries: buildTrackDataFromExtensionEntries2
    });
    NON_RENDER_BLOCKING_VALUES2 = /* @__PURE__ */ new Set([
      "non_blocking",
      "dynamically_injected_non_blocking",
      "potentially_blocking"
    ]);
    HIGH_NETWORK_PRIORITIES2 = /* @__PURE__ */ new Set([
      "VeryHigh",
      "High",
      "Medium"
    ]);
    CACHEABLE_STATUS_CODES2 = /* @__PURE__ */ new Set([200, 203, 206]);
    STATIC_RESOURCE_TYPES2 = /* @__PURE__ */ new Set([
      "Font",
      "Image",
      "Media",
      "Script",
      "Stylesheet"
    ]);
    NON_NETWORK_SCHEMES$1 = [
      "blob",
      "data",
      "intent",
      "file",
      "filesystem",
      "chrome-extension"
    ];
    SECURE_LOCALHOST_DOMAINS3 = ["localhost", "127.0.0.1"];
    Network = /* @__PURE__ */ Object.freeze({
      __proto__: null,
      CACHEABLE_STATUS_CODES: CACHEABLE_STATUS_CODES2,
      NON_NETWORK_SCHEMES: NON_NETWORK_SCHEMES$1,
      STATIC_RESOURCE_TYPES: STATIC_RESOURCE_TYPES2,
      isSyntheticNetworkRequestEventRenderBlocking: isSyntheticNetworkRequestEventRenderBlocking2,
      isSyntheticNetworkRequestHighPriority: isSyntheticNetworkRequestHighPriority2,
      isSyntheticNetworkRequestLocalhost: isSyntheticNetworkRequestLocalhost2,
      parseCacheControl: parseCacheControl2
    });
    SamplesIntegrator2 = class {
      #constructedProfileCalls = [];
      #currentJSStack = [];
      #processId;
      #threadId;
      #lockedJsStackDepth = [];
      #fakeJSInvocation = false;
      #profileModel;
      #nodeForGC = /* @__PURE__ */ new Map();
      #engineConfig;
      #profileId;
      jsSampleEvents = [];
      constructor(profileModel, profileId, pid, tid, configuration) {
        this.#profileModel = profileModel;
        this.#threadId = tid;
        this.#processId = pid;
        this.#engineConfig = configuration || defaults2();
        this.#profileId = profileId;
      }
      buildProfileCalls(traceEvents) {
        const mergedEvents = mergeEventsInOrder2(traceEvents, this.callsFromProfileSamples());
        const stack = [];
        for (let i = 0; i < mergedEvents.length; i++) {
          const event = mergedEvents[i];
          if (event.ph === "I" && !extractSampleTraceId2(event)) {
            continue;
          }
          if (stack.length === 0) {
            if (isProfileCall2(event)) {
              this.#onProfileCall(event);
              continue;
            }
            stack.push(event);
            this.#onTraceEventStart(event);
            continue;
          }
          const parentEvent = stack.at(-1);
          if (parentEvent === void 0) {
            continue;
          }
          const begin = event.ts;
          const parentBegin = parentEvent.ts;
          const parentDuration = parentEvent.dur || 0;
          const parentEnd = parentBegin + parentDuration;
          const startsAfterParent = begin >= parentEnd;
          if (startsAfterParent) {
            this.#onTraceEventEnd(parentEvent);
            stack.pop();
            i--;
            continue;
          }
          if (isProfileCall2(event)) {
            this.#onProfileCall(event, parentEvent);
            continue;
          }
          this.#onTraceEventStart(event);
          stack.push(event);
        }
        while (stack.length) {
          const last2 = stack.pop();
          if (last2) {
            this.#onTraceEventEnd(last2);
          }
        }
        sortTraceEventsInPlace2(this.jsSampleEvents);
        return this.#constructedProfileCalls;
      }
      #onTraceEventStart(event) {
        if (event.name === "RunMicrotasks" || event.name === "RunTask") {
          this.#lockedJsStackDepth = [];
          this.#truncateJSStack(0, event.ts);
          this.#fakeJSInvocation = false;
        }
        if (this.#fakeJSInvocation) {
          this.#truncateJSStack(this.#lockedJsStackDepth.pop() || 0, event.ts);
          this.#fakeJSInvocation = false;
        }
        this.#extractStackTrace(event);
        this.#lockedJsStackDepth.push(this.#currentJSStack.length);
      }
      #onProfileCall(event, parent) {
        if (parent && isJSInvocationEvent2(parent) || this.#fakeJSInvocation) {
          this.#extractStackTrace(event);
        } else if (isProfileCall2(event) && this.#currentJSStack.length === 0) {
          this.#fakeJSInvocation = true;
          const stackDepthBefore = this.#currentJSStack.length;
          this.#extractStackTrace(event);
          this.#lockedJsStackDepth.push(stackDepthBefore);
        }
      }
      #onTraceEventEnd(event) {
        const endTime = Micro2(event.ts + (event.dur ?? 0));
        this.#truncateJSStack(this.#lockedJsStackDepth.pop() || 0, endTime);
      }
      callsFromProfileSamples() {
        const samples = this.#profileModel.samples;
        const timestamps = this.#profileModel.timestamps;
        if (!samples) {
          return [];
        }
        const calls = [];
        let prevNode;
        for (let i = 0; i < samples.length; i++) {
          const node2 = this.#profileModel.nodeByIndex(i);
          const timestamp = milliToMicro2(Milli2(timestamps[i]));
          if (!node2) {
            continue;
          }
          const call = makeProfileCall2(node2, this.#profileId, i, timestamp, this.#processId, this.#threadId);
          calls.push(call);
          if (this.#engineConfig.debugMode) {
            const traceId = this.#profileModel.traceIds?.[i];
            this.jsSampleEvents.push(this.#makeJSSampleEvent(call, timestamp, traceId));
          }
          if (node2.id === this.#profileModel.gcNode?.id && prevNode) {
            this.#nodeForGC.set(call, prevNode);
            continue;
          }
          prevNode = node2;
        }
        return calls;
      }
      #makeProfileCallsForStack(profileCall, overrideTimeStamp) {
        let node2 = this.#profileModel.nodeById(profileCall.nodeId);
        const isGarbageCollection = node2?.id === this.#profileModel.gcNode?.id;
        if (isGarbageCollection) {
          node2 = this.#nodeForGC.get(profileCall) || null;
        }
        if (!node2) {
          return [];
        }
        const callFrames = new Array(node2.depth + 1 + Number(isGarbageCollection));
        let i = callFrames.length - 1;
        if (isGarbageCollection) {
          callFrames[i--] = profileCall;
        }
        while (node2) {
          callFrames[i--] = makeProfileCall2(node2, profileCall.profileId, profileCall.sampleIndex, overrideTimeStamp ?? profileCall.ts, this.#processId, this.#threadId);
          node2 = node2.parent;
        }
        return callFrames;
      }
      #getStackForSampleTraceId(traceId, timestamp) {
        const nodeId = this.#profileModel.traceIds?.[traceId];
        const node2 = nodeId && this.#profileModel.nodeById(nodeId);
        const maybeCallForTraceId = node2 && makeProfileCall2(node2, this.#profileId, -1, timestamp, this.#processId, this.#threadId);
        if (!maybeCallForTraceId) {
          return null;
        }
        if (this.#engineConfig.debugMode) {
          this.jsSampleEvents.push(this.#makeJSSampleEvent(maybeCallForTraceId, timestamp, traceId));
        }
        return this.#makeProfileCallsForStack(maybeCallForTraceId);
      }
      #extractStackTrace(event) {
        let stackTrace = this.#currentJSStack;
        if (isProfileCall2(event)) {
          stackTrace = this.#makeProfileCallsForStack(event);
        }
        const traceId = extractSampleTraceId2(event);
        const maybeCallForTraceId = traceId && this.#getStackForSampleTraceId(traceId, event.ts);
        if (maybeCallForTraceId) {
          stackTrace = maybeCallForTraceId;
        }
        _a$3.filterStackFrames(stackTrace, this.#engineConfig);
        const endTime = event.ts + (event.dur || 0);
        const minFrames = Math.min(stackTrace.length, this.#currentJSStack.length);
        let i;
        for (i = this.#lockedJsStackDepth.at(-1) || 0; i < minFrames; ++i) {
          const newFrame = stackTrace[i].callFrame;
          const oldFrame = this.#currentJSStack[i].callFrame;
          if (!_a$3.framesAreEqual(newFrame, oldFrame)) {
            break;
          }
          this.#currentJSStack[i].dur = Micro2(Math.max(this.#currentJSStack[i].dur || 0, endTime - this.#currentJSStack[i].ts));
        }
        this.#truncateJSStack(i, event.ts);
        for (; i < stackTrace.length; ++i) {
          const call = stackTrace[i];
          if (call.nodeId === this.#profileModel.programNode?.id || call.nodeId === this.#profileModel.root?.id || call.nodeId === this.#profileModel.idleNode?.id || call.nodeId === this.#profileModel.gcNode?.id) {
            continue;
          }
          this.#currentJSStack.push(call);
          this.#constructedProfileCalls.push(call);
        }
      }
      #truncateJSStack(depth, time2) {
        if (this.#lockedJsStackDepth.length) {
          const lockedDepth = this.#lockedJsStackDepth.at(-1);
          if (lockedDepth && depth < lockedDepth) {
            console.error(`Child stack is shallower (${depth}) than the parent stack (${lockedDepth}) at ${time2}`);
            depth = lockedDepth;
          }
        }
        if (this.#currentJSStack.length < depth) {
          console.error(`Trying to truncate higher than the current stack size at ${time2}`);
          depth = this.#currentJSStack.length;
        }
        for (let k = 0; k < this.#currentJSStack.length; ++k) {
          this.#currentJSStack[k].dur = Micro2(Math.max(time2 - this.#currentJSStack[k].ts, 0));
        }
        this.#currentJSStack.length = depth;
      }
      #makeJSSampleEvent(call, timestamp, traceId) {
        const JSSampleEvent = {
          name: "JSSample",
          cat: "devtools.timeline",
          args: {
            data: { traceId, stackTrace: this.#makeProfileCallsForStack(call).map((e) => e.callFrame) }
          },
          ph: "I",
          ts: timestamp,
          dur: Micro2(0),
          pid: this.#processId,
          tid: this.#threadId
        };
        return JSSampleEvent;
      }
      static framesAreEqual(frame1, frame2) {
        return frame1.scriptId === frame2.scriptId && frame1.functionName === frame2.functionName && frame1.lineNumber === frame2.lineNumber;
      }
      static showNativeName(name, runtimeCallStatsEnabled) {
        return runtimeCallStatsEnabled && Boolean(_a$3.nativeGroup(name));
      }
      static nativeGroup(nativeName) {
        if (nativeName.startsWith("Parse")) {
          return "Parse";
        }
        if (nativeName.startsWith("Compile") || nativeName.startsWith("Recompile")) {
          return "Compile";
        }
        return null;
      }
      static isNativeRuntimeFrame(frame) {
        return frame.url === "native V8Runtime";
      }
      static filterStackFrames(stack, engineConfig) {
        const showAllEvents = engineConfig.showAllEvents;
        if (showAllEvents) {
          return;
        }
        let previousNativeFrameName = null;
        let j = 0;
        for (let i = 0; i < stack.length; ++i) {
          const frame = stack[i].callFrame;
          const nativeRuntimeFrame = _a$3.isNativeRuntimeFrame(frame);
          if (nativeRuntimeFrame && !_a$3.showNativeName(frame.functionName, engineConfig.includeRuntimeCallStats)) {
            continue;
          }
          const nativeFrameName = nativeRuntimeFrame ? _a$3.nativeGroup(frame.functionName) : null;
          if (previousNativeFrameName && previousNativeFrameName === nativeFrameName) {
            continue;
          }
          previousNativeFrameName = nativeFrameName;
          stack[j++] = stack[i];
        }
        stack.length = j;
      }
      static createFakeTraceFromCpuProfile(profile, tid) {
        if (!profile) {
          return { traceEvents: [], metadata: {} };
        }
        const cpuProfileEvent = {
          cat: "disabled-by-default-devtools.timeline",
          name: "CpuProfile",
          ph: "X",
          pid: ProcessID2(1),
          tid,
          ts: Micro2(profile.startTime),
          dur: Micro2(profile.endTime - profile.startTime),
          args: { data: { cpuProfile: profile } },
          id: "0x1"
        };
        return {
          traceEvents: [cpuProfileEvent],
          metadata: {
            dataOrigin: "CPUProfile"
          }
        };
      }
      static extractCpuProfileFromFakeTrace(traceEvents) {
        const profileEvent = traceEvents.find((e) => isSyntheticCpuProfile2(e));
        const profile = profileEvent?.args.data.cpuProfile;
        if (!profile) {
          throw new Error("Missing cpuProfile data");
        }
        return profile;
      }
    };
    _a$3 = SamplesIntegrator2;
    SamplesIntegrator$1 = /* @__PURE__ */ Object.freeze({
      __proto__: null,
      SamplesIntegrator: SamplesIntegrator2
    });
    helpers = /* @__PURE__ */ Object.freeze({
      __proto__: null,
      Extensions,
      Network,
      SamplesIntegrator: SamplesIntegrator$1,
      SyntheticEvents,
      Timing,
      Trace,
      TreeHelpers
    });
    animationFrameStarts2 = /* @__PURE__ */ new Map();
    animationFrameEnds2 = /* @__PURE__ */ new Map();
    animationFramePresentations2 = /* @__PURE__ */ new Map();
    animationFrames2 = [];
    presentationForFrame2 = /* @__PURE__ */ new Map();
    isEnabled2 = false;
    AnimationFramesHandler = /* @__PURE__ */ Object.freeze({
      __proto__: null,
      data: data$t,
      deps: deps$f,
      finalize: finalize$L,
      handleEvent: handleEvent$t,
      handleUserConfig: handleUserConfig$2,
      reset: reset$t
    });
    animations2 = [];
    animationsSyntheticEvents2 = [];
    AnimationHandler = /* @__PURE__ */ Object.freeze({
      __proto__: null,
      data: data$s,
      finalize: finalize$K,
      handleEvent: handleEvent$s,
      reset: reset$s
    });
    flowDataByGroupToken2 = /* @__PURE__ */ new Map();
    boundFlowData2 = /* @__PURE__ */ new Map();
    flowsById2 = /* @__PURE__ */ new Map();
    flowEvents2 = [];
    nonFlowEvents2 = [];
    flows2 = [];
    ID_COMPONENT_SEPARATOR2 = "-$-";
    FlowsHandler = /* @__PURE__ */ Object.freeze({
      __proto__: null,
      data: data$r,
      finalize: finalize$J,
      handleEvent: handleEvent$r,
      reset: reset$r
    });
    runningInProcessEvents2 = /* @__PURE__ */ new Map();
    doneWithProcessEvents2 = /* @__PURE__ */ new Map();
    createdSyntheticEvents2 = /* @__PURE__ */ new Map();
    utilityThreads2 = /* @__PURE__ */ new Map();
    v8HelperThreads2 = /* @__PURE__ */ new Map();
    AuctionWorkletsHandler = /* @__PURE__ */ Object.freeze({
      __proto__: null,
      data: data$q,
      finalize: finalize$I,
      handleEvent: handleEvent$q,
      reset: reset$q
    });
    rendererProcessesByFrameId2 = /* @__PURE__ */ new Map();
    mainFrameId2 = "";
    mainFrameURL2 = "";
    framesByProcessId2 = /* @__PURE__ */ new Map();
    browserProcessId2 = ProcessID2(-1);
    browserThreadId2 = ThreadID2(-1);
    gpuProcessId2 = ProcessID2(-1);
    gpuThreadId2 = ThreadID2(-1);
    viewportRect2 = null;
    devicePixelRatio3 = null;
    processNames2 = /* @__PURE__ */ new Map();
    topLevelRendererIds2 = /* @__PURE__ */ new Set();
    traceBounds2 = makeNewTraceBounds2();
    navigationsByFrameId2 = /* @__PURE__ */ new Map();
    navigationsByNavigationId2 = /* @__PURE__ */ new Map();
    softNavigationsById = /* @__PURE__ */ new Map();
    finalDisplayUrlByNavigationId2 = /* @__PURE__ */ new Map();
    mainFrameNavigations2 = [];
    threadsInProcess2 = /* @__PURE__ */ new Map();
    traceStartedTimeFromTracingStartedEvent2 = Micro2(-1);
    eventPhasesOfInterestForTraceBounds2 = /* @__PURE__ */ new Set([
      "B",
      "E",
      "X",
      "I"
    ]);
    traceIsGeneric2 = true;
    CHROME_WEB_TRACE_EVENTS2 = /* @__PURE__ */ new Set([
      "TracingStartedInPage",
      "TracingSessionIdForWorker",
      "TracingStartedInBrowser",
      "CpuProfile"
    ]);
    MetaHandler = /* @__PURE__ */ Object.freeze({
      __proto__: null,
      data: data$p,
      finalize: finalize$H,
      handleEvent: handleEvent$p,
      reset: reset$p
    });
    MILLISECONDS_TO_MICROSECONDS2 = 1e3;
    SECONDS_TO_MICROSECONDS2 = 1e6;
    webSocketData2 = /* @__PURE__ */ new Map();
    linkPreconnectEvents2 = [];
    requestMap2 = /* @__PURE__ */ new Map();
    requestsById2 = /* @__PURE__ */ new Map();
    requestsByTime2 = [];
    requestIdsByURL = /* @__PURE__ */ new Map();
    networkRequestEventByInitiatorUrl2 = /* @__PURE__ */ new Map();
    eventToInitiatorMap$1 = /* @__PURE__ */ new Map();
    entityMappings$1 = {
      eventsByEntity: /* @__PURE__ */ new Map(),
      entityByEvent: /* @__PURE__ */ new Map(),
      createdEntityCache: /* @__PURE__ */ new Map(),
      entityByUrlCache: /* @__PURE__ */ new Map()
    };
    NetworkRequestsHandler = /* @__PURE__ */ Object.freeze({
      __proto__: null,
      data: data$o,
      deps: deps$e,
      finalize: finalize$G,
      handleEvent: handleEvent$o,
      reset: reset$o
    });
    ProfileNode2 = class {
      callFrame;
      callUID;
      self;
      total;
      id;
      parent;
      children;
      originalFunctionName = null;
      depth;
      deoptReason;
      constructor(callFrame) {
        this.callFrame = callFrame;
        this.callUID = `${callFrame.functionName}@${callFrame.scriptId}:${callFrame.lineNumber}:${callFrame.columnNumber}`;
        this.self = 0;
        this.total = 0;
        this.id = 0;
        this.parent = null;
        this.children = [];
      }
      get scriptId() {
        return String(this.callFrame.scriptId);
      }
      get url() {
        return this.callFrame.url;
      }
      get lineNumber() {
        return this.callFrame.lineNumber;
      }
      get columnNumber() {
        return this.callFrame.columnNumber;
      }
      get functionName() {
        return this.originalFunctionName ?? this.callFrame.functionName;
      }
      setOriginalFunctionName(name) {
        this.originalFunctionName = name;
      }
    };
    ProfileTreeModel2 = class {
      root;
      total;
      maxDepth;
      initialize(root2) {
        this.root = root2;
        this.assignDepthsAndParents();
        this.total = this.calculateTotals(this.root);
      }
      assignDepthsAndParents() {
        const root2 = this.root;
        root2.depth = -1;
        root2.parent = null;
        this.maxDepth = 0;
        const nodesToTraverse = [root2];
        while (nodesToTraverse.length) {
          const parent = nodesToTraverse.pop();
          const depth = parent.depth + 1;
          if (depth > this.maxDepth) {
            this.maxDepth = depth;
          }
          const children = parent.children;
          for (const child of children) {
            child.depth = depth;
            child.parent = parent;
            nodesToTraverse.push(child);
          }
        }
      }
      calculateTotals(root2) {
        const nodesToTraverse = [root2];
        const dfsList = [];
        while (nodesToTraverse.length) {
          const node2 = nodesToTraverse.pop();
          node2.total = node2.self;
          dfsList.push(node2);
          nodesToTraverse.push(...node2.children);
        }
        while (dfsList.length > 1) {
          const node2 = dfsList.pop();
          if (node2.parent) {
            node2.parent.total += node2.total;
          }
        }
        return root2.total;
      }
    };
    CPUProfileNode2 = class extends ProfileNode2 {
      id;
      self;
      positionTicks;
      deoptReason;
      constructor(node2, samplingInterval) {
        const callFrame = node2.callFrame || {
          functionName: node2["functionName"],
          scriptId: node2["scriptId"],
          url: node2["url"],
          lineNumber: node2["lineNumber"] - 1,
          columnNumber: node2["columnNumber"] - 1
        };
        super(callFrame);
        this.id = node2.id;
        this.self = (node2.hitCount || 0) * samplingInterval;
        this.positionTicks = node2.positionTicks;
        this.deoptReason = node2.deoptReason && node2.deoptReason !== "no reason" ? node2.deoptReason : null;
      }
    };
    CPUProfileDataModel2 = class extends ProfileTreeModel2 {
      profileStartTime;
      profileEndTime;
      timestamps;
      samples;
      traceIds;
      lines;
      columns;
      totalHitCount;
      profileHead;
      #idToParsedNode;
      gcNode;
      programNode;
      idleNode;
      #stackStartTimes;
      #stackChildrenDuration;
      constructor(profile) {
        super();
        const isLegacyFormat = Boolean(profile["head"]);
        if (isLegacyFormat) {
          this.profileStartTime = profile.startTime * 1e3;
          this.profileEndTime = profile.endTime * 1e3;
          this.timestamps = profile.timestamps;
          this.compatibilityConversionHeadToNodes(profile);
        } else {
          this.profileStartTime = profile.startTime / 1e3;
          this.profileEndTime = profile.endTime / 1e3;
          this.timestamps = this.convertTimeDeltas(profile);
        }
        this.traceIds = profile.traceIds;
        this.samples = profile.samples;
        this.lines = profile.lines;
        this.columns = profile.columns;
        this.totalHitCount = 0;
        this.profileHead = this.translateProfileTree(profile.nodes);
        this.initialize(this.profileHead);
        this.extractMetaNodes();
        if (this.samples?.length) {
          this.sortSamples();
          this.normalizeTimestamps();
          this.fixMissingSamples();
        }
      }
      compatibilityConversionHeadToNodes(profile) {
        if (!profile.head || profile.nodes) {
          return;
        }
        const nodes = [];
        convertNodesTree(profile.head);
        profile.nodes = nodes;
        delete profile.head;
        function convertNodesTree(node2) {
          nodes.push(node2);
          node2.children = node2.children.map(convertNodesTree);
          return node2.id;
        }
      }
      convertTimeDeltas(profile) {
        if (!profile.timeDeltas) {
          return [];
        }
        let lastTimeMicroSec = profile.startTime;
        const timestamps = new Array(profile.timeDeltas.length);
        for (let i = 0; i < profile.timeDeltas.length; ++i) {
          lastTimeMicroSec += profile.timeDeltas[i];
          timestamps[i] = lastTimeMicroSec;
        }
        return timestamps;
      }
      translateProfileTree(nodes) {
        function buildChildrenFromParents(nodes2) {
          if (nodes2[0].children) {
            return;
          }
          nodes2[0].children = [];
          for (let i = 1; i < nodes2.length; ++i) {
            const node2 = nodes2[i];
            const parentNode = protocolNodeById.get(node2.parent);
            if (!parentNode) {
              continue;
            }
            if (parentNode.children) {
              parentNode.children.push(node2.id);
            } else {
              parentNode.children = [node2.id];
            }
          }
        }
        function buildHitCountFromSamples(nodes2, samples) {
          if (typeof nodes2[0].hitCount === "number") {
            return;
          }
          if (!samples) {
            throw new Error("Error: Neither hitCount nor samples are present in profile.");
          }
          for (let i = 0; i < nodes2.length; ++i) {
            nodes2[i].hitCount = 0;
          }
          for (let i = 0; i < samples.length; ++i) {
            const node2 = protocolNodeById.get(samples[i]);
            if (node2?.hitCount === void 0) {
              continue;
            }
            node2.hitCount++;
          }
        }
        const protocolNodeById = /* @__PURE__ */ new Map();
        for (let i = 0; i < nodes.length; ++i) {
          const node2 = nodes[i];
          protocolNodeById.set(node2.id, node2);
        }
        buildHitCountFromSamples(nodes, this.samples);
        buildChildrenFromParents(nodes);
        this.totalHitCount = nodes.reduce((acc, node2) => acc + (node2.hitCount || 0), 0);
        const sampleTime = (this.profileEndTime - this.profileStartTime) / this.totalHitCount;
        const root2 = nodes[0];
        const idToUseForRemovedNode = /* @__PURE__ */ new Map([[root2.id, root2.id]]);
        this.#idToParsedNode = /* @__PURE__ */ new Map();
        const resultRoot = new CPUProfileNode2(root2, sampleTime);
        this.#idToParsedNode.set(root2.id, resultRoot);
        if (!root2.children) {
          throw new Error("Missing children for root");
        }
        const parentNodeStack = root2.children.map(() => resultRoot);
        const sourceNodeStack = root2.children.map((id2) => protocolNodeById.get(id2));
        while (sourceNodeStack.length) {
          let parentNode = parentNodeStack.pop();
          const sourceNode2 = sourceNodeStack.pop();
          if (!sourceNode2 || !parentNode) {
            continue;
          }
          if (!sourceNode2.children) {
            sourceNode2.children = [];
          }
          const targetNode = new CPUProfileNode2(sourceNode2, sampleTime);
          parentNode.children.push(targetNode);
          parentNode = targetNode;
          idToUseForRemovedNode.set(sourceNode2.id, parentNode.id);
          parentNodeStack.push.apply(parentNodeStack, sourceNode2.children.map(() => parentNode));
          sourceNodeStack.push.apply(sourceNodeStack, sourceNode2.children.map((id2) => protocolNodeById.get(id2)));
          this.#idToParsedNode.set(sourceNode2.id, targetNode);
        }
        if (this.samples) {
          this.samples = this.samples.map((id2) => idToUseForRemovedNode.get(id2));
        }
        return resultRoot;
      }
      sortSamples() {
        if (!this.timestamps || !this.samples) {
          return;
        }
        const timestamps = this.timestamps;
        const samples = this.samples;
        const orderedIndices = timestamps.map((_x, index2) => index2);
        orderedIndices.sort((a, b) => timestamps[a] - timestamps[b]);
        this.timestamps = [];
        this.samples = [];
        for (let i = 0; i < orderedIndices.length; i++) {
          const orderedIndex = orderedIndices[i];
          this.timestamps.push(timestamps[orderedIndex]);
          this.samples.push(samples[orderedIndex]);
        }
      }
      normalizeTimestamps() {
        if (!this.samples) {
          return;
        }
        let timestamps = this.timestamps;
        if (!timestamps) {
          const profileStartTime = this.profileStartTime;
          const interval = (this.profileEndTime - profileStartTime) / this.samples.length;
          timestamps = new Array(this.samples.length + 1);
          for (let i = 0; i < timestamps.length; ++i) {
            timestamps[i] = profileStartTime + i * interval;
          }
          this.timestamps = timestamps;
          return;
        }
        for (let i = 0; i < timestamps.length; ++i) {
          timestamps[i] /= 1e3;
        }
        if (this.samples.length === timestamps.length) {
          const lastTimestamp = timestamps.at(-1) || 0;
          const averageIntervalTime = (lastTimestamp - timestamps[0]) / (timestamps.length - 1);
          this.timestamps.push(lastTimestamp + averageIntervalTime);
        }
        this.profileStartTime = timestamps.at(0) || this.profileStartTime;
        this.profileEndTime = timestamps.at(-1) || this.profileEndTime;
      }
      extractMetaNodes() {
        const topLevelNodes = this.profileHead.children;
        for (let i = 0; i < topLevelNodes.length && !(this.gcNode && this.programNode && this.idleNode); i++) {
          const node2 = topLevelNodes[i];
          if (node2.functionName === "(garbage collector)") {
            this.gcNode = node2;
          } else if (node2.functionName === "(program)") {
            this.programNode = node2;
          } else if (node2.functionName === "(idle)") {
            this.idleNode = node2;
          }
        }
      }
      fixMissingSamples() {
        const samples = this.samples;
        if (!samples) {
          return;
        }
        const samplesCount = samples.length;
        if (!this.programNode || samplesCount < 3) {
          return;
        }
        const idToNode = this.#idToParsedNode;
        const programNodeId = this.programNode.id;
        const gcNodeId = this.gcNode ? this.gcNode.id : -1;
        const idleNodeId = this.idleNode ? this.idleNode.id : -1;
        let prevNodeId = samples[0];
        let nodeId = samples[1];
        for (let sampleIndex = 1; sampleIndex < samplesCount - 1; sampleIndex++) {
          const nextNodeId = samples[sampleIndex + 1];
          const prevNode = idToNode.get(prevNodeId);
          const nextNode = idToNode.get(nextNodeId);
          if (prevNodeId === void 0 || nextNodeId === void 0 || !prevNode || !nextNode) {
            console.error(`Unexpectedly found undefined nodes: ${prevNodeId} ${nextNodeId}`);
            continue;
          }
          if (nodeId === programNodeId && !isSystemNode(prevNodeId) && !isSystemNode(nextNodeId) && bottomNode(prevNode) === bottomNode(nextNode)) {
            samples[sampleIndex] = prevNodeId;
          }
          prevNodeId = nodeId;
          nodeId = nextNodeId;
        }
        function bottomNode(node2) {
          while (node2.parent?.parent) {
            node2 = node2.parent;
          }
          return node2;
        }
        function isSystemNode(nodeId2) {
          return nodeId2 === programNodeId || nodeId2 === gcNodeId || nodeId2 === idleNodeId;
        }
      }
      forEachFrame(openFrameCallback, closeFrameCallback, startTime, stopTime) {
        if (!this.profileHead || !this.samples) {
          return;
        }
        startTime = startTime || 0;
        stopTime = stopTime || Infinity;
        const samples = this.samples;
        const timestamps = this.timestamps;
        const idToNode = this.#idToParsedNode;
        const gcNode = this.gcNode;
        const samplesCount = samples.length;
        const startIndex = lowerBound2(timestamps, startTime, DEFAULT_COMPARATOR2);
        let stackTop = 0;
        const stackNodes = [];
        let prevId = this.profileHead.id;
        let sampleTime;
        let gcParentNode = null;
        const stackDepth = this.maxDepth + 3;
        if (!this.#stackStartTimes) {
          this.#stackStartTimes = new Array(stackDepth);
        }
        const stackStartTimes = this.#stackStartTimes;
        if (!this.#stackChildrenDuration) {
          this.#stackChildrenDuration = new Array(stackDepth);
        }
        const stackChildrenDuration = this.#stackChildrenDuration;
        let node2;
        let sampleIndex;
        for (sampleIndex = startIndex; sampleIndex < samplesCount; sampleIndex++) {
          sampleTime = timestamps[sampleIndex];
          if (sampleTime >= stopTime) {
            break;
          }
          const id2 = samples[sampleIndex];
          if (id2 === prevId) {
            continue;
          }
          node2 = idToNode.get(id2);
          let prevNode = idToNode.get(prevId) || null;
          if (!prevNode) {
            continue;
          }
          if (gcNode && node2 === gcNode) {
            gcParentNode = prevNode;
            openFrameCallback(gcParentNode.depth + 1, gcNode, sampleIndex, sampleTime);
            stackStartTimes[++stackTop] = sampleTime;
            stackChildrenDuration[stackTop] = 0;
            prevId = id2;
            continue;
          }
          if (gcNode && prevNode === gcNode && gcParentNode) {
            const start = stackStartTimes[stackTop];
            const duration2 = sampleTime - start;
            stackChildrenDuration[stackTop - 1] += duration2;
            closeFrameCallback(gcParentNode.depth + 1, gcNode, sampleIndex, start, duration2, duration2 - stackChildrenDuration[stackTop]);
            --stackTop;
            prevNode = gcParentNode;
            prevId = prevNode.id;
            gcParentNode = null;
          }
          while (node2 && node2.depth > prevNode.depth) {
            stackNodes.push(node2);
            node2 = node2.parent;
          }
          while (prevNode && prevNode !== node2) {
            const start = stackStartTimes[stackTop];
            const duration2 = sampleTime - start;
            stackChildrenDuration[stackTop - 1] += duration2;
            closeFrameCallback(prevNode.depth, prevNode, sampleIndex, start, duration2, duration2 - stackChildrenDuration[stackTop]);
            --stackTop;
            if (node2 && node2.depth === prevNode.depth) {
              stackNodes.push(node2);
              node2 = node2.parent;
            }
            prevNode = prevNode.parent;
          }
          while (stackNodes.length) {
            const currentNode = stackNodes.pop();
            if (!currentNode) {
              break;
            }
            node2 = currentNode;
            openFrameCallback(currentNode.depth, currentNode, sampleIndex, sampleTime);
            stackStartTimes[++stackTop] = sampleTime;
            stackChildrenDuration[stackTop] = 0;
          }
          prevId = id2;
        }
        sampleTime = timestamps[sampleIndex] || this.profileEndTime;
        if (node2 && gcParentNode && idToNode.get(prevId) === gcNode) {
          const start = stackStartTimes[stackTop];
          const duration2 = sampleTime - start;
          stackChildrenDuration[stackTop - 1] += duration2;
          closeFrameCallback(gcParentNode.depth + 1, node2, sampleIndex, start, duration2, duration2 - stackChildrenDuration[stackTop]);
          --stackTop;
          prevId = gcParentNode.id;
        }
        for (let node3 = idToNode.get(prevId); node3?.parent; node3 = node3.parent) {
          const start = stackStartTimes[stackTop];
          const duration2 = sampleTime - start;
          stackChildrenDuration[stackTop - 1] += duration2;
          closeFrameCallback(node3.depth, node3, sampleIndex, start, duration2, duration2 - stackChildrenDuration[stackTop]);
          --stackTop;
        }
      }
      nodeByIndex(index2) {
        return this.samples && this.#idToParsedNode.get(this.samples[index2]) || null;
      }
      nodeById(nodeId) {
        return this.#idToParsedNode.get(nodeId) || null;
      }
      nodes() {
        if (!this.#idToParsedNode) {
          return null;
        }
        return [...this.#idToParsedNode.values()];
      }
    };
    profilesInProcess2 = /* @__PURE__ */ new Map();
    entryToNode$2 = /* @__PURE__ */ new Map();
    preprocessedData2 = /* @__PURE__ */ new Map();
    PROFILE_SOURCES_BY_PRIORITY = {
      cpuProfile: ["Inspector"],
      performanceTrace: ["Internal", "Inspector"]
    };
    SamplesHandler = /* @__PURE__ */ Object.freeze({
      __proto__: null,
      data: data$n,
      finalize: finalize$F,
      getProfileCallFunctionName: getProfileCallFunctionName2,
      handleEvent: handleEvent$n,
      reset: reset$n
    });
    processes2 = /* @__PURE__ */ new Map();
    entityMappings3 = {
      eventsByEntity: /* @__PURE__ */ new Map(),
      entityByEvent: /* @__PURE__ */ new Map(),
      createdEntityCache: /* @__PURE__ */ new Map(),
      entityByUrlCache: /* @__PURE__ */ new Map()
    };
    compositorTileWorkers2 = Array();
    entryToNode$1 = /* @__PURE__ */ new Map();
    completeEventStack2 = [];
    config3 = defaults2();
    makeRendererProcess2 = () => ({
      url: null,
      isOnMainFrame: false,
      threads: /* @__PURE__ */ new Map()
    });
    makeRendererThread2 = () => ({
      name: null,
      entries: [],
      profileCalls: [],
      layoutEvents: [],
      recalcStyleEvents: []
    });
    getOrCreateRendererProcess2 = (processes3, pid) => {
      return getWithDefault2(processes3, pid, makeRendererProcess2);
    };
    getOrCreateRendererThread2 = (process8, tid) => {
      return getWithDefault2(process8.threads, tid, makeRendererThread2);
    };
    RendererHandler = /* @__PURE__ */ Object.freeze({
      __proto__: null,
      assignIsMainFrame: assignIsMainFrame2,
      assignMeta: assignMeta2,
      assignOrigin: assignOrigin2,
      assignThreadName: assignThreadName2,
      buildHierarchy: buildHierarchy2,
      data: data$m,
      deps: deps$d,
      finalize: finalize$E,
      handleEvent: handleEvent$m,
      handleUserConfig: handleUserConfig$1,
      makeCompleteEvent: makeCompleteEvent2,
      reset: reset$m,
      sanitizeProcesses: sanitizeProcesses2,
      sanitizeThreads: sanitizeThreads2
    });
    schedulerToRunEntryPoints2 = /* @__PURE__ */ new Map();
    taskScheduleForTaskRunEvent2 = /* @__PURE__ */ new Map();
    asyncCallToScheduler2 = /* @__PURE__ */ new Map();
    runEntryPointToScheduler2 = /* @__PURE__ */ new Map();
    AsyncJSCallsHandler = /* @__PURE__ */ Object.freeze({
      __proto__: null,
      data: data$l,
      deps: deps$c,
      finalize: finalize$D,
      handleEvent: handleEvent$l,
      reset: reset$l
    });
    domStatsByFrameId2 = /* @__PURE__ */ new Map();
    DOMStatsHandler = /* @__PURE__ */ Object.freeze({
      __proto__: null,
      data: data$k,
      finalize: finalize$C,
      handleEvent: handleEvent$k,
      reset: reset$k
    });
    syntheticEvents2 = [];
    measureTraceByTraceId2 = /* @__PURE__ */ new Map();
    performanceMeasureEvents2 = [];
    performanceMarkEvents2 = [];
    consoleTimings2 = [];
    timestampEvents2 = [];
    resourceTimingNames2 = [
      "workerStart",
      "redirectStart",
      "redirectEnd",
      "fetchStart",
      "domainLookupStart",
      "domainLookupEnd",
      "connectStart",
      "connectEnd",
      "secureConnectionStart",
      "requestStart",
      "responseStart",
      "responseEnd"
    ];
    navTimingNames2 = [
      "navigationStart",
      "unloadEventStart",
      "unloadEventEnd",
      "redirectStart",
      "redirectEnd",
      "fetchStart",
      "commitNavigationEnd",
      "domainLookupStart",
      "domainLookupEnd",
      "connectStart",
      "connectEnd",
      "secureConnectionStart",
      "requestStart",
      "responseStart",
      "responseEnd",
      "domLoading",
      "domInteractive",
      "domContentLoadedEventStart",
      "domContentLoadedEventEnd",
      "domComplete",
      "loadEventStart",
      "loadEventEnd"
    ];
    ignoredNames2 = [...resourceTimingNames2, ...navTimingNames2];
    UserTimingsHandler = /* @__PURE__ */ Object.freeze({
      __proto__: null,
      data: data$j,
      finalize: finalize$B,
      handleEvent: handleEvent$j,
      reset: reset$j,
      userTimingComparator: userTimingComparator2
    });
    extensionTrackEntries2 = [];
    extensionTrackData2 = [];
    extensionMarkers2 = [];
    entryToNode4 = /* @__PURE__ */ new Map();
    timeStampByName2 = /* @__PURE__ */ new Map();
    syntheticConsoleEntriesForTimingsTrack2 = [];
    ExtensionTraceDataHandler = /* @__PURE__ */ Object.freeze({
      __proto__: null,
      data: data$i,
      deps: deps$b,
      extensionDataInConsoleTimeStamp: extensionDataInConsoleTimeStamp2,
      extensionDataInPerformanceTiming: extensionDataInPerformanceTiming2,
      extractConsoleAPIExtensionEntries: extractConsoleAPIExtensionEntries2,
      extractPerformanceAPIExtensionEntries: extractPerformanceAPIExtensionEntries2,
      finalize: finalize$A,
      handleEvent: handleEvent$i,
      reset: reset$i
    });
    paintEvents2 = [];
    snapshotEvents2 = [];
    paintToSnapshotMap2 = /* @__PURE__ */ new Map();
    lastPaintForLayerId2 = {};
    currentMainFrameLayerTreeId2 = null;
    updateLayerEvents2 = [];
    relevantEvents2 = [];
    LayerTreeHandler = /* @__PURE__ */ Object.freeze({
      __proto__: null,
      data: data$h,
      deps: deps$a,
      finalize: finalize$z,
      handleEvent: handleEvent$h,
      reset: reset$h
    });
    threadsInHandlerDataCache2 = /* @__PURE__ */ new WeakMap();
    Threads = /* @__PURE__ */ Object.freeze({
      __proto__: null,
      threadsInRenderer: threadsInRenderer2,
      threadsInTrace: threadsInTrace2
    });
    model2 = null;
    relevantFrameEvents2 = [];
    MAIN_FRAME_MARKERS2 = /* @__PURE__ */ new Set([
      "ScheduleStyleRecalculation",
      "InvalidateLayout",
      "BeginMainThreadFrame",
      "ScrollLayer"
    ]);
    TimelineFrameModel2 = class {
      #frames = [];
      #frameById = {};
      #beginFrameQueue = new TimelineFrameBeginFrameQueue2();
      #lastFrame = null;
      #mainFrameCommitted = false;
      #mainFrameRequested = false;
      #lastLayerTree = null;
      #framePendingActivation = null;
      #framePendingCommit = null;
      #lastBeginFrame = null;
      #lastNeedsBeginFrame = null;
      #lastTaskBeginTime = null;
      #layerTreeId = null;
      #activeProcessId = null;
      #activeThreadId = null;
      #layerTreeData;
      constructor(allEvents, rendererData, auctionWorkletsData, metaData, layerTreeData) {
        const mainThreads = threadsInRenderer2(rendererData, auctionWorkletsData).filter((thread) => {
          return thread.type === "MAIN_THREAD" && thread.processIsOnMainFrame;
        });
        const threadData = mainThreads.map((thread) => {
          return {
            tid: thread.tid,
            pid: thread.pid,
            startTime: thread.entries[0].ts
          };
        });
        this.#layerTreeData = layerTreeData;
        this.#addTraceEvents(allEvents, threadData, metaData.mainFrameId);
      }
      framesById() {
        return this.#frameById;
      }
      frames() {
        return this.#frames;
      }
      #handleBeginFrame(startTime, seqId) {
        if (!this.#lastFrame) {
          this.#startFrame(startTime, seqId);
        }
        this.#lastBeginFrame = startTime;
        this.#beginFrameQueue.addFrameIfNotExists(seqId, startTime, false, false);
      }
      #handleDroppedFrame(startTime, seqId, isPartial) {
        if (!this.#lastFrame) {
          this.#startFrame(startTime, seqId);
        }
        this.#beginFrameQueue.addFrameIfNotExists(seqId, startTime, true, isPartial);
        this.#beginFrameQueue.setDropped(seqId, true);
        this.#beginFrameQueue.setPartial(seqId, isPartial);
      }
      #handleDrawFrame(startTime, seqId) {
        if (!this.#lastFrame) {
          this.#startFrame(startTime, seqId);
          return;
        }
        if (this.#mainFrameCommitted || !this.#mainFrameRequested) {
          if (this.#lastNeedsBeginFrame) {
            const idleTimeEnd = this.#framePendingActivation ? this.#framePendingActivation.triggerTime : this.#lastBeginFrame || this.#lastNeedsBeginFrame;
            if (idleTimeEnd > this.#lastFrame.startTime) {
              this.#lastFrame.idle = true;
              this.#lastBeginFrame = null;
            }
            this.#lastNeedsBeginFrame = null;
          }
          const framesToVisualize = this.#beginFrameQueue.processPendingBeginFramesOnDrawFrame(seqId);
          for (const frame of framesToVisualize) {
            const isLastFrameIdle = this.#lastFrame.idle;
            this.#startFrame(frame.startTime, seqId);
            if (isLastFrameIdle && this.#framePendingActivation) {
              this.#commitPendingFrame();
            }
            if (frame.isDropped) {
              this.#lastFrame.dropped = true;
            }
            if (frame.isPartial) {
              this.#lastFrame.isPartial = true;
            }
          }
        }
        this.#mainFrameCommitted = false;
      }
      #handleActivateLayerTree() {
        if (!this.#lastFrame) {
          return;
        }
        if (this.#framePendingActivation && !this.#lastNeedsBeginFrame) {
          this.#commitPendingFrame();
        }
      }
      #handleRequestMainThreadFrame() {
        if (!this.#lastFrame) {
          return;
        }
        this.#mainFrameRequested = true;
      }
      #handleCommit() {
        if (!this.#framePendingCommit) {
          return;
        }
        this.#framePendingActivation = this.#framePendingCommit;
        this.#framePendingCommit = null;
        this.#mainFrameRequested = false;
        this.#mainFrameCommitted = true;
      }
      #handleLayerTreeSnapshot(layerTree) {
        this.#lastLayerTree = layerTree;
      }
      #handleNeedFrameChanged(startTime, needsBeginFrame) {
        if (needsBeginFrame) {
          this.#lastNeedsBeginFrame = startTime;
        }
      }
      #startFrame(startTime, seqId) {
        if (this.#lastFrame) {
          this.#flushFrame(this.#lastFrame, startTime);
        }
        this.#lastFrame = new TimelineFrame2(seqId, startTime, Micro2(startTime - data$p().traceBounds.min));
      }
      #flushFrame(frame, endTime) {
        frame.setLayerTree(this.#lastLayerTree);
        frame.setEndTime(endTime);
        if (this.#lastLayerTree) {
          this.#lastLayerTree.paints = frame.paints;
        }
        const lastFrame = this.#frames[this.#frames.length - 1];
        if (this.#frames.length && lastFrame && (frame.startTime !== lastFrame.endTime || frame.startTime > frame.endTime)) {
          console.assert(false, `Inconsistent frame time for frame ${this.#frames.length} (${frame.startTime} - ${frame.endTime})`);
        }
        const newFramesLength = this.#frames.push(frame);
        frame.setIndex(newFramesLength - 1);
        if (typeof frame.mainFrameId === "number") {
          this.#frameById[frame.mainFrameId] = frame;
        }
      }
      #commitPendingFrame() {
        if (!this.#framePendingActivation || !this.#lastFrame) {
          return;
        }
        this.#lastFrame.paints = this.#framePendingActivation.paints;
        this.#lastFrame.mainFrameId = this.#framePendingActivation.mainFrameId;
        this.#framePendingActivation = null;
      }
      #addTraceEvents(events, threadData, mainFrameId3) {
        let j = 0;
        this.#activeThreadId = threadData.length && threadData[0].tid || null;
        this.#activeProcessId = threadData.length && threadData[0].pid || null;
        for (let i = 0; i < events.length; ++i) {
          while (j + 1 < threadData.length && threadData[j + 1].startTime <= events[i].ts) {
            this.#activeThreadId = threadData[++j].tid;
            this.#activeProcessId = threadData[j].pid;
          }
          this.#addTraceEvent(events[i], mainFrameId3);
        }
        this.#activeThreadId = null;
        this.#activeProcessId = null;
      }
      #addTraceEvent(event, mainFrameId3) {
        if (isSetLayerId2(event) && event.args.data.frame === mainFrameId3) {
          this.#layerTreeId = event.args.data.layerTreeId;
        } else if (isLayerTreeHostImplSnapshot2(event) && Number(event.id) === this.#layerTreeId) {
          this.#handleLayerTreeSnapshot({
            entry: event,
            paints: []
          });
        } else {
          if (isFrameEvent2(event)) {
            this.#processCompositorEvents(event);
          }
          if (event.tid === this.#activeThreadId && event.pid === this.#activeProcessId) {
            this.#addMainThreadTraceEvent(event);
          }
        }
      }
      #processCompositorEvents(entry) {
        if (entry.args["layerTreeId"] !== this.#layerTreeId) {
          return;
        }
        if (isBeginFrame2(entry)) {
          this.#handleBeginFrame(entry.ts, entry.args["frameSeqId"]);
        } else if (isDrawFrame2(entry)) {
          this.#handleDrawFrame(entry.ts, entry.args["frameSeqId"]);
        } else if (isActivateLayerTree2(entry)) {
          this.#handleActivateLayerTree();
        } else if (isRequestMainThreadFrame2(entry)) {
          this.#handleRequestMainThreadFrame();
        } else if (isNeedsBeginFrameChanged2(entry)) {
          this.#handleNeedFrameChanged(entry.ts, entry.args["data"] && Boolean(entry.args["data"]["needsBeginFrame"]));
        } else if (isDroppedFrame2(entry)) {
          this.#handleDroppedFrame(entry.ts, entry.args["frameSeqId"], Boolean(entry.args["hasPartialUpdate"]));
        }
      }
      #addMainThreadTraceEvent(entry) {
        if (entryIsTopLevel2(entry)) {
          this.#lastTaskBeginTime = entry.ts;
        }
        if (!this.#framePendingCommit && MAIN_FRAME_MARKERS2.has(entry.name)) {
          this.#framePendingCommit = new PendingFrame2(this.#lastTaskBeginTime || entry.ts);
        }
        if (!this.#framePendingCommit) {
          return;
        }
        if (isBeginMainThreadFrame2(entry) && entry.args.data.frameId) {
          this.#framePendingCommit.mainFrameId = entry.args.data.frameId;
        }
        if (isPaint2(entry)) {
          const snapshot2 = this.#layerTreeData.paintsToSnapshots.get(entry);
          if (snapshot2) {
            this.#framePendingCommit.paints.push(new LayerPaintEvent2(entry, snapshot2));
          }
        }
        if ((isCompositeLayers2(entry) || isCommit2(entry)) && entry.args["layerTreeId"] === this.#layerTreeId) {
          this.#handleCommit();
        }
      }
    };
    TimelineFrame2 = class {
      cat = "devtools.legacy_frame";
      name = "frame";
      ph = "X";
      ts;
      pid = ProcessID2(-1);
      tid = ThreadID2(-1);
      index = -1;
      startTime;
      startTimeOffset;
      endTime;
      duration;
      idle;
      dropped;
      isPartial;
      layerTree;
      paints;
      mainFrameId;
      seqId;
      constructor(seqId, startTime, startTimeOffset) {
        this.seqId = seqId;
        this.startTime = startTime;
        this.ts = startTime;
        this.startTimeOffset = startTimeOffset;
        this.endTime = this.startTime;
        this.duration = Micro2(0);
        this.idle = false;
        this.dropped = false;
        this.isPartial = false;
        this.layerTree = null;
        this.paints = [];
        this.mainFrameId = void 0;
      }
      setIndex(i) {
        this.index = i;
      }
      setEndTime(endTime) {
        this.endTime = endTime;
        this.duration = Micro2(this.endTime - this.startTime);
      }
      setLayerTree(layerTree) {
        this.layerTree = layerTree;
      }
      get dur() {
        return this.duration;
      }
    };
    LayerPaintEvent2 = class {
      #event;
      #snapshot;
      constructor(event, snapshot2) {
        this.#event = event;
        this.#snapshot = snapshot2;
      }
      layerId() {
        return this.#event.args.data.layerId;
      }
      event() {
        return this.#event;
      }
      picture() {
        const rect = this.#snapshot.args.snapshot.params?.layer_rect;
        const pictureData = this.#snapshot.args.snapshot.skp64;
        return rect && pictureData ? { rect, serializedPicture: pictureData } : null;
      }
    };
    PendingFrame2 = class {
      paints;
      mainFrameId;
      triggerTime;
      constructor(triggerTime) {
        this.paints = [];
        this.mainFrameId = void 0;
        this.triggerTime = triggerTime;
      }
    };
    BeginFrameInfo2 = class {
      seqId;
      startTime;
      isDropped;
      isPartial;
      constructor(seqId, startTime, isDropped, isPartial) {
        this.seqId = seqId;
        this.startTime = startTime;
        this.isDropped = isDropped;
        this.isPartial = isPartial;
      }
    };
    TimelineFrameBeginFrameQueue2 = class {
      queueFrames = [];
      mapFrames = {};
      addFrameIfNotExists(seqId, startTime, isDropped, isPartial) {
        if (!(seqId in this.mapFrames)) {
          this.mapFrames[seqId] = new BeginFrameInfo2(seqId, startTime, isDropped, isPartial);
          this.queueFrames.push(seqId);
        }
      }
      setDropped(seqId, isDropped) {
        if (seqId in this.mapFrames) {
          this.mapFrames[seqId].isDropped = isDropped;
        }
      }
      setPartial(seqId, isPartial) {
        if (seqId in this.mapFrames) {
          this.mapFrames[seqId].isPartial = isPartial;
        }
      }
      processPendingBeginFramesOnDrawFrame(seqId) {
        const framesToVisualize = [];
        if (seqId in this.mapFrames) {
          while (this.queueFrames[0] !== seqId) {
            const currentSeqId = this.queueFrames[0];
            if (this.mapFrames[currentSeqId].isDropped) {
              framesToVisualize.push(this.mapFrames[currentSeqId]);
            }
            delete this.mapFrames[currentSeqId];
            this.queueFrames.shift();
          }
          framesToVisualize.push(this.mapFrames[seqId]);
          delete this.mapFrames[seqId];
          this.queueFrames.shift();
        }
        return framesToVisualize;
      }
    };
    FramesHandler = /* @__PURE__ */ Object.freeze({
      __proto__: null,
      LayerPaintEvent: LayerPaintEvent2,
      PendingFrame: PendingFrame2,
      TimelineFrameBeginFrameQueue: TimelineFrameBeginFrameQueue2,
      TimelineFrameModel: TimelineFrameModel2,
      data: data$g,
      deps: deps$9,
      finalize: finalize$y,
      framesWithinWindow: framesWithinWindow2,
      handleEvent: handleEvent$g,
      reset: reset$g
    });
    eventsInProcessThread2 = /* @__PURE__ */ new Map();
    mainGPUThreadTasks2 = [];
    GPUHandler = /* @__PURE__ */ Object.freeze({
      __proto__: null,
      data: data$f,
      deps: deps$8,
      finalize: finalize$x,
      handleEvent: handleEvent$f,
      reset: reset$f
    });
    paintImageEvents$1 = /* @__PURE__ */ new Map();
    decodeLazyPixelRefEvents2 = /* @__PURE__ */ new Map();
    paintImageByLazyPixelRef2 = /* @__PURE__ */ new Map();
    eventToPaintImage2 = /* @__PURE__ */ new Map();
    urlToPaintImage2 = /* @__PURE__ */ new Map();
    paintEventToCorrectedDisplaySize2 = /* @__PURE__ */ new Map();
    didCorrectForHostDpr2 = false;
    ImagePaintingHandler = /* @__PURE__ */ Object.freeze({
      __proto__: null,
      data: data$e,
      finalize: finalize$w,
      handleEvent: handleEvent$e,
      reset: reset$e
    });
    lastScheduleStyleRecalcByFrame2 = /* @__PURE__ */ new Map();
    lastInvalidationEventForFrame2 = /* @__PURE__ */ new Map();
    lastRecalcByFrame2 = /* @__PURE__ */ new Map();
    eventToInitiatorMap3 = /* @__PURE__ */ new Map();
    initiatorToEventsMap2 = /* @__PURE__ */ new Map();
    timerInstallEventsById2 = /* @__PURE__ */ new Map();
    requestIdleCallbackEventsById2 = /* @__PURE__ */ new Map();
    webSocketCreateEventsById2 = /* @__PURE__ */ new Map();
    schedulePostTaskCallbackEventsById2 = /* @__PURE__ */ new Map();
    InitiatorsHandler = /* @__PURE__ */ Object.freeze({
      __proto__: null,
      data: data$d,
      deps: deps$7,
      finalize: finalize$v,
      handleEvent: handleEvent$d,
      reset: reset$d
    });
    frameStateByFrame2 = /* @__PURE__ */ new Map();
    maxInvalidationsPerEvent2 = null;
    InvalidationsHandler = /* @__PURE__ */ Object.freeze({
      __proto__: null,
      data: data$c,
      finalize: finalize$u,
      handleEvent: handleEvent$c,
      handleUserConfig: handleUserConfig4,
      reset: reset$c
    });
    metricScoresByFrameId2 = /* @__PURE__ */ new Map();
    allMarkerEvents2 = [];
    pageLoadEventsArray2 = [];
    selectedLCPCandidateEvents2 = /* @__PURE__ */ new Set();
    PageLoadMetricsHandler = /* @__PURE__ */ Object.freeze({
      __proto__: null,
      data: data$b,
      deps: deps$6,
      finalize: finalize$t,
      getFrameIdForPageLoadEvent: getFrameIdForPageLoadEvent2,
      handleEvent: handleEvent$b,
      metricIsLCP: metricIsLCP2,
      reset: reset$b,
      scoreClassificationForDOMContentLoaded: scoreClassificationForDOMContentLoaded2,
      scoreClassificationForFirstContentfulPaint: scoreClassificationForFirstContentfulPaint2,
      scoreClassificationForLargestContentfulPaint: scoreClassificationForLargestContentfulPaint2,
      scoreClassificationForTimeToInteractive: scoreClassificationForTimeToInteractive2,
      scoreClassificationForTotalBlockingTime: scoreClassificationForTotalBlockingTime2
    });
    imagePaintsByNodeIdAndProcess2 = /* @__PURE__ */ new Map();
    lcpRequestByNavigationId2 = /* @__PURE__ */ new Map();
    LargestImagePaintHandler = /* @__PURE__ */ Object.freeze({
      __proto__: null,
      data: data$a,
      deps: deps$5,
      finalize: finalize$s,
      handleEvent: handleEvent$a,
      reset: reset$a
    });
    textPaintByDOMNodeId2 = /* @__PURE__ */ new Map();
    LargestTextPaintHandler = /* @__PURE__ */ Object.freeze({
      __proto__: null,
      data: data$9,
      finalize: finalize$r,
      handleEvent: handleEvent$9,
      reset: reset$9
    });
    unpairedAsyncEvents2 = [];
    legacyScreenshotEvents2 = [];
    modernScreenshotEvents2 = [];
    syntheticScreenshots2 = [];
    ScreenshotsHandler = /* @__PURE__ */ Object.freeze({
      __proto__: null,
      data: data$8,
      deps: deps$4,
      finalize: finalize$q,
      handleEvent: handleEvent$8,
      reset: reset$8,
      screenshotImageDataUri: screenshotImageDataUri2
    });
    MAX_CLUSTER_DURATION2 = milliToMicro2(Milli2(5e3));
    MAX_SHIFT_TIME_DELTA2 = milliToMicro2(Milli2(1e3));
    layoutShiftEvents2 = [];
    layoutInvalidationEvents2 = [];
    scheduleStyleInvalidationEvents2 = [];
    styleRecalcInvalidationEvents2 = [];
    renderFrameImplCreateChildFrameEvents2 = [];
    domLoadingEvents2 = [];
    layoutImageUnsizedEvents2 = [];
    remoteFonts2 = [];
    backendNodeIds2 = /* @__PURE__ */ new Set();
    prePaintEvents2 = [];
    paintImageEvents3 = [];
    sessionMaxScore2 = 0;
    clsWindowID2 = -1;
    clusters2 = [];
    clustersByNavigationId2 = /* @__PURE__ */ new Map();
    scoreRecords2 = [];
    LayoutShiftsHandler = /* @__PURE__ */ Object.freeze({
      __proto__: null,
      MAX_CLUSTER_DURATION: MAX_CLUSTER_DURATION2,
      MAX_SHIFT_TIME_DELTA: MAX_SHIFT_TIME_DELTA2,
      data: data$7,
      deps: deps$3,
      finalize: finalize$p,
      handleEvent: handleEvent$7,
      reset: reset$7,
      scoreClassificationForLayoutShift: scoreClassificationForLayoutShift2
    });
    updateCountersByProcess2 = /* @__PURE__ */ new Map();
    MemoryHandler = /* @__PURE__ */ Object.freeze({
      __proto__: null,
      data: data$6,
      finalize: finalize$o,
      handleEvent: handleEvent$6,
      reset: reset$6
    });
    frames2 = /* @__PURE__ */ new Map();
    PageFramesHandler = /* @__PURE__ */ Object.freeze({
      __proto__: null,
      data: data$5,
      finalize: finalize$n,
      handleEvent: handleEvent$5,
      reset: reset$5
    });
    scriptById2 = /* @__PURE__ */ new Map();
    frameIdByIsolate = /* @__PURE__ */ new Map();
    ScriptsHandler = /* @__PURE__ */ Object.freeze({
      __proto__: null,
      data: data$4,
      deps: deps$2,
      finalize: finalize$m,
      getScriptGeneratedSizes: getScriptGeneratedSizes2,
      handleEvent: handleEvent$4,
      reset: reset$4
    });
    lastRecalcStyleEvent2 = null;
    lastInvalidatedNode2 = null;
    selectorDataForRecalcStyle2 = /* @__PURE__ */ new Map();
    invalidatedNodeList2 = new Array();
    SelectorStatsHandler = /* @__PURE__ */ Object.freeze({
      __proto__: null,
      data: data$3,
      finalize: finalize$l,
      handleEvent: handleEvent$3,
      reset: reset$3
    });
    beginCommitCompositorFrameEvents2 = [];
    parseMetaViewportEvents2 = [];
    LONG_INTERACTION_THRESHOLD2 = milliToMicro2(Milli2(200));
    INP_GOOD_TIMING2 = LONG_INTERACTION_THRESHOLD2;
    INP_MEDIUM_TIMING2 = milliToMicro2(Milli2(500));
    longestInteractionEvent2 = null;
    interactionEvents2 = [];
    interactionEventsWithNoNesting2 = [];
    eventTimingStartEventsForInteractions2 = [];
    eventTimingEndEventsForInteractions2 = [];
    pointerEventTypes2 = /* @__PURE__ */ new Set([
      "pointerdown",
      "touchstart",
      "pointerup",
      "touchend",
      "mousedown",
      "mouseup",
      "click"
    ]);
    keyboardEventTypes2 = /* @__PURE__ */ new Set([
      "keydown",
      "keypress",
      "keyup"
    ]);
    UserInteractionsHandler = /* @__PURE__ */ Object.freeze({
      __proto__: null,
      LONG_INTERACTION_THRESHOLD: LONG_INTERACTION_THRESHOLD2,
      categoryOfInteraction: categoryOfInteraction2,
      data: data$2,
      deps: deps$1,
      finalize: finalize$k,
      handleEvent: handleEvent$2,
      removeNestedInteractionsAndSetProcessingTime: removeNestedInteractionsAndSetProcessingTime2,
      reset: reset$2,
      scoreClassificationForInteractionToNextPaint: scoreClassificationForInteractionToNextPaint2
    });
    sessionIdEvents2 = [];
    workerIdByThread2 = /* @__PURE__ */ new Map();
    workerURLById2 = /* @__PURE__ */ new Map();
    WorkersHandler = /* @__PURE__ */ Object.freeze({
      __proto__: null,
      data: data$1,
      finalize: finalize$j,
      handleEvent: handleEvent$1,
      reset: reset$1
    });
    warningsPerEvent2 = /* @__PURE__ */ new Map();
    eventsPerWarning2 = /* @__PURE__ */ new Map();
    allEventsStack2 = [];
    jsInvokeStack2 = [];
    taskReflowEvents2 = [];
    longTaskEvents2 = [];
    FORCED_REFLOW_THRESHOLD2 = milliToMicro2(Milli2(30));
    LONG_MAIN_THREAD_TASK_THRESHOLD2 = milliToMicro2(Milli2(50));
    WarningsHandler = /* @__PURE__ */ Object.freeze({
      __proto__: null,
      FORCED_REFLOW_THRESHOLD: FORCED_REFLOW_THRESHOLD2,
      LONG_MAIN_THREAD_TASK_THRESHOLD: LONG_MAIN_THREAD_TASK_THRESHOLD2,
      data: data31,
      deps: deps17,
      finalize: finalize$i,
      handleEvent: handleEvent31,
      reset: reset31
    });
    ModelHandlers = /* @__PURE__ */ Object.freeze({
      __proto__: null,
      AnimationFrames: AnimationFramesHandler,
      Animations: AnimationHandler,
      AsyncJSCalls: AsyncJSCallsHandler,
      AuctionWorklets: AuctionWorkletsHandler,
      DOMStats: DOMStatsHandler,
      ExtensionTraceData: ExtensionTraceDataHandler,
      Flows: FlowsHandler,
      Frames: FramesHandler,
      GPU: GPUHandler,
      ImagePainting: ImagePaintingHandler,
      Initiators: InitiatorsHandler,
      Invalidations: InvalidationsHandler,
      LargestImagePaint: LargestImagePaintHandler,
      LargestTextPaint: LargestTextPaintHandler,
      LayerTree: LayerTreeHandler,
      LayoutShifts: LayoutShiftsHandler,
      Memory: MemoryHandler,
      Meta: MetaHandler,
      NetworkRequests: NetworkRequestsHandler,
      PageFrames: PageFramesHandler,
      PageLoadMetrics: PageLoadMetricsHandler,
      Renderer: RendererHandler,
      Samples: SamplesHandler,
      Screenshots: ScreenshotsHandler,
      Scripts: ScriptsHandler,
      SelectorStats: SelectorStatsHandler,
      UserInteractions: UserInteractionsHandler,
      UserTimings: UserTimingsHandler,
      Warnings: WarningsHandler,
      Workers: WorkersHandler
    });
    types$2 = /* @__PURE__ */ Object.freeze({
      __proto__: null
    });
    handlers = /* @__PURE__ */ Object.freeze({
      __proto__: null,
      Helpers: helpers$1,
      ModelHandlers,
      Threads,
      Types: types$2
    });
    EntityMapper = class {
      #parsedTrace;
      #entityMappings;
      #firstPartyEntity;
      #thirdPartyEvents = [];
      #resolvedCallFrames = /* @__PURE__ */ new Set();
      constructor(parsedTrace) {
        this.#parsedTrace = parsedTrace;
        this.#entityMappings = this.#parsedTrace.data.Renderer.entityMappings;
        this.#firstPartyEntity = this.#findFirstPartyEntity();
        this.#thirdPartyEvents = this.#getThirdPartyEvents();
      }
      #findFirstPartyEntity() {
        const nav = Array.from(this.#parsedTrace.data.Meta.navigationsByNavigationId.values()).sort((a, b) => a.ts - b.ts)[0];
        const firstPartyUrl = nav?.args.data?.documentLoaderURL ?? this.#parsedTrace.data.Meta.mainFrameURL;
        if (!firstPartyUrl) {
          return null;
        }
        return getEntityForUrl2(firstPartyUrl, this.#entityMappings) ?? null;
      }
      #getThirdPartyEvents() {
        const entries = Array.from(this.#entityMappings.eventsByEntity.entries());
        const thirdPartyEvents = entries.flatMap(([entity, events]) => {
          return entity !== this.#firstPartyEntity ? events : [];
        });
        return thirdPartyEvents;
      }
      entityForEvent(event) {
        return this.#entityMappings.entityByEvent.get(event) ?? null;
      }
      eventsForEntity(entity) {
        return this.#entityMappings.eventsByEntity.get(entity) ?? [];
      }
      firstPartyEntity() {
        return this.#firstPartyEntity;
      }
      thirdPartyEvents() {
        return this.#thirdPartyEvents;
      }
      mappings() {
        return this.#entityMappings;
      }
      updateSourceMapEntities(callFrame, sourceURL) {
        if (this.#resolvedCallFrames.has(callFrame)) {
          return;
        }
        const compiledURL = callFrame.url;
        const currentEntity = getEntityForUrl2(compiledURL, this.#entityMappings);
        const resolvedEntity = getEntityForUrl2(sourceURL, this.#entityMappings);
        if (resolvedEntity === currentEntity || (!currentEntity || !resolvedEntity)) {
          return;
        }
        const currentEntityEvents = (currentEntity && this.#entityMappings.eventsByEntity.get(currentEntity)) ?? [];
        const sourceLocationEvents = [];
        const unrelatedEvents = [];
        currentEntityEvents?.forEach((e) => {
          const cf = getStackTraceTopCallFrameInEventPayload2(e);
          const matchesCallFrame = cf && isMatchingCallFrame2(cf, callFrame);
          if (matchesCallFrame) {
            sourceLocationEvents.push(e);
          } else {
            unrelatedEvents.push(e);
          }
        });
        this.#entityMappings.eventsByEntity.set(currentEntity, unrelatedEvents);
        this.#entityMappings.eventsByEntity.set(resolvedEntity, sourceLocationEvents);
        sourceLocationEvents.forEach((e) => {
          this.#entityMappings.entityByEvent.set(e, resolvedEntity);
        });
        this.#resolvedCallFrames.add(callFrame);
      }
      updateExtensionEntitiesWithName(executionContextNamesByOrigin) {
        const entities = Array.from(this.#entityMappings.eventsByEntity.keys());
        for (const [origin, name] of executionContextNamesByOrigin) {
          const entity = entities.find((e) => e.domains[0] === origin);
          if (entity) {
            entity.name = entity.company = name;
          }
        }
      }
    };
    EntityMapper$1 = /* @__PURE__ */ Object.freeze({
      __proto__: null,
      EntityMapper
    });
    EventsSerializer = class _EventsSerializer {
      #modifiedProfileCallByKey = /* @__PURE__ */ new Map();
      keyForEvent(event) {
        if (isProfileCall2(event)) {
          return `${"p"}-${event.pid}-${event.tid}-${SampleIndex2(event.sampleIndex)}-${event.nodeId}`;
        }
        if (isLegacyTimelineFrame2(event)) {
          return `${"l"}-${event.index}`;
        }
        if (isJSSample(event)) {
          return null;
        }
        const rawEvents = SyntheticEventsManager2.getActiveManager().getRawTraceEvents();
        const isSynthetic = isSyntheticBased2(event);
        const index2 = rawEvents.indexOf(isSynthetic ? event.rawSourceEvent : event);
        if (index2 === -1) {
          return null;
        }
        const key = isSyntheticBased2(event) ? `${"s"}-${index2}` : `${"r"}-${index2}`;
        if (key.length < 3) {
          return null;
        }
        return key;
      }
      eventForKey(key, parsedTrace) {
        const eventValues = traceEventKeyToValues2(key);
        if (_EventsSerializer.isProfileCallKey(eventValues)) {
          return this.#getModifiedProfileCallByKeyValues(eventValues, parsedTrace);
        }
        if (_EventsSerializer.isLegacyTimelineFrameKey(eventValues)) {
          const event = parsedTrace.data.Frames.frames.at(eventValues.rawIndex);
          if (!event) {
            throw new Error(`Unknown trace event. Could not find frame with index ${eventValues.rawIndex}`);
          }
          return event;
        }
        if (_EventsSerializer.isSyntheticEventKey(eventValues)) {
          const syntheticEvents3 = SyntheticEventsManager2.getActiveManager().getSyntheticTraces();
          const syntheticEvent = syntheticEvents3.at(eventValues.rawIndex);
          if (!syntheticEvent) {
            throw new Error(`Unknown trace event. Attempted to get a synthetic event from an unknown raw event index: ${eventValues.rawIndex}`);
          }
          return syntheticEvent;
        }
        if (_EventsSerializer.isRawEventKey(eventValues)) {
          const rawEvents = SyntheticEventsManager2.getActiveManager().getRawTraceEvents();
          return rawEvents[eventValues.rawIndex];
        }
        throw new Error(`Unknown trace event. Serializable key values: ${eventValues.join("-")}`);
      }
      static isProfileCallKey(key) {
        return key.type === "p";
      }
      static isLegacyTimelineFrameKey(key) {
        return key.type === "l";
      }
      static isRawEventKey(key) {
        return key.type === "r";
      }
      static isSyntheticEventKey(key) {
        return key.type === "s";
      }
      #getModifiedProfileCallByKeyValues(key, parsedTrace) {
        const cacheResult = this.#modifiedProfileCallByKey.get(key);
        if (cacheResult) {
          return cacheResult;
        }
        const profileCallsInThread = parsedTrace.data.Renderer.processes.get(key.processID)?.threads.get(key.threadID)?.profileCalls;
        if (!profileCallsInThread) {
          throw new Error(`Unknown profile call serializable key: ${key}`);
        }
        const match = profileCallsInThread?.find((e) => {
          return e.sampleIndex === key.sampleIndex && e.nodeId === key.protocol;
        });
        if (!match) {
          throw new Error(`Unknown profile call serializable key: ${JSON.stringify(key)}`);
        }
        this.#modifiedProfileCallByKey.set(key, match);
        return match;
      }
    };
    EventsSerializer$1 = /* @__PURE__ */ Object.freeze({
      __proto__: null,
      EventsSerializer
    });
    filmStripCache = /* @__PURE__ */ new WeakMap();
    FilmStrip = /* @__PURE__ */ Object.freeze({
      __proto__: null,
      frameClosestToTimestamp,
      fromHandlerData
    });
    stackTraceForEventInTrace2 = /* @__PURE__ */ new Map();
    StackTraceForEvent = /* @__PURE__ */ Object.freeze({
      __proto__: null,
      clearCacheForTrace: clearCacheForTrace2,
      get: get2,
      stackTraceForEventInTrace: stackTraceForEventInTrace2
    });
    Initiators = /* @__PURE__ */ Object.freeze({
      __proto__: null,
      getNetworkInitiator
    });
    IDLE_FUNCTION_CALL_NAMES = /* @__PURE__ */ new Set([
      "(program)",
      "(idle)",
      "(root)"
    ]);
    MainThreadActivity = /* @__PURE__ */ Object.freeze({
      __proto__: null,
      calculateWindow
    });
    ABSOLUTE_SIZE_THRESHOLD_BYTES2 = 1024 * 0.5;
    RELATIVE_SIZE_THRESHOLD2 = 0.1;
    ScriptDuplication = /* @__PURE__ */ Object.freeze({
      __proto__: null,
      computeScriptDuplication: computeScriptDuplication2,
      getNodeModuleName: getNodeModuleName2,
      normalizeDuplication: normalizeDuplication2,
      normalizeSource: normalizeSource2
    });
    TraceFilter2 = class {
    };
    VisibleEventsFilter2 = class _VisibleEventsFilter extends TraceFilter2 {
      visibleTypes;
      constructor(visibleTypes2) {
        super();
        this.visibleTypes = new Set(visibleTypes2);
      }
      accept(event) {
        if (isSyntheticExtensionEntry2(event)) {
          return true;
        }
        return this.visibleTypes.has(_VisibleEventsFilter.eventType(event));
      }
      static eventType(event) {
        if (event.cat.includes("blink.console")) {
          return "ConsoleTime";
        }
        if (event.cat.includes("blink.user_timing")) {
          return "UserTiming";
        }
        return event.name;
      }
    };
    InvisibleEventsFilter = class extends TraceFilter2 {
      #invisibleTypes;
      constructor(invisibleTypes) {
        super();
        this.#invisibleTypes = new Set(invisibleTypes);
      }
      accept(event) {
        return !this.#invisibleTypes.has(VisibleEventsFilter2.eventType(event));
      }
    };
    ExclusiveNameFilter2 = class extends TraceFilter2 {
      #excludeNames;
      constructor(excludeNames) {
        super();
        this.#excludeNames = new Set(excludeNames);
      }
      accept(event) {
        return !this.#excludeNames.has(event.name);
      }
    };
    TraceFilter$1 = /* @__PURE__ */ Object.freeze({
      __proto__: null,
      ExclusiveNameFilter: ExclusiveNameFilter2,
      InvisibleEventsFilter,
      TraceFilter: TraceFilter2,
      VisibleEventsFilter: VisibleEventsFilter2
    });
    Node$1 = class Node3 {
      totalTime;
      selfTime;
      transferSize;
      id;
      event;
      events;
      parent;
      groupId;
      isGroupNodeInternal;
      depth;
      constructor(id2, event) {
        this.totalTime = 0;
        this.selfTime = 0;
        this.transferSize = 0;
        this.id = id2;
        this.event = event;
        this.events = [event];
        this.groupId = "";
        this.isGroupNodeInternal = false;
        this.depth = 0;
      }
      isGroupNode() {
        return this.isGroupNodeInternal;
      }
      hasChildren() {
        throw new Error("Not implemented");
      }
      setHasChildren(_value) {
        throw new Error("Not implemented");
      }
      children() {
        throw new Error("Not implemented");
      }
      searchTree(matchFunction, results) {
        results = results || [];
        if (this.event && matchFunction(this.event)) {
          results.push(this);
        }
        for (const child of this.children().values()) {
          child.searchTree(matchFunction, results);
        }
        return results;
      }
    };
    TopDownNode = class _TopDownNode extends Node$1 {
      root;
      hasChildrenInternal;
      childrenInternal;
      parent;
      constructor(id2, event, parent) {
        super(id2, event);
        this.root = parent?.root ?? null;
        this.hasChildrenInternal = false;
        this.childrenInternal = null;
        this.parent = parent;
      }
      hasChildren() {
        return this.hasChildrenInternal;
      }
      setHasChildren(value) {
        this.hasChildrenInternal = value;
      }
      children() {
        return this.childrenInternal || this.buildChildren();
      }
      buildChildren() {
        const path14 = [];
        for (let node2 = this; node2.parent && !node2.isGroupNode(); node2 = node2.parent) {
          path14.push(node2);
        }
        path14.reverse();
        const children = /* @__PURE__ */ new Map();
        const self2 = this;
        const root2 = this.root;
        if (!root2) {
          this.childrenInternal = children;
          return this.childrenInternal;
        }
        const startTime = root2.startTime;
        const endTime = root2.endTime;
        const instantEventCallback = root2.doNotAggregate || root2.includeInstantEvents ? onInstantEvent : void 0;
        const eventIdCallback = root2.doNotAggregate ? void 0 : generateEventID2;
        const eventGroupIdCallback = root2.getEventGroupIdCallback();
        let depth = 0;
        let matchedDepth = 0;
        let currentDirectChild = null;
        forEachEvent2(root2.events, {
          onStartEvent,
          onEndEvent,
          onInstantEvent: instantEventCallback,
          startTime: milliToMicro2(startTime),
          endTime: milliToMicro2(endTime),
          eventFilter: root2.filter,
          ignoreAsyncEvents: false
        });
        function onStartEvent(e) {
          const { startTime: currentStartTime, endTime: currentEndTime } = eventTimingsMilliSeconds2(e);
          ++depth;
          if (depth > path14.length + 2) {
            return;
          }
          if (!matchPath(e)) {
            return;
          }
          const actualEndTime = currentEndTime !== void 0 ? Math.min(currentEndTime, endTime) : endTime;
          const duration2 = actualEndTime - Math.max(startTime, currentStartTime);
          if (duration2 < 0) {
            console.error("Negative event duration");
          }
          processEvent(e, duration2);
        }
        function onInstantEvent(e) {
          ++depth;
          if (matchedDepth === path14.length && depth <= path14.length + 2) {
            processEvent(e, 0);
          }
          --depth;
        }
        function processEvent(e, duration2) {
          if (depth === path14.length + 2) {
            if (!currentDirectChild) {
              return;
            }
            currentDirectChild.setHasChildren(true);
            currentDirectChild.selfTime -= duration2;
            return;
          }
          let id2;
          let groupId = "";
          if (!eventIdCallback) {
            id2 = Symbol("uniqueId");
          } else {
            id2 = eventIdCallback(e);
            groupId = eventGroupIdCallback ? eventGroupIdCallback(e) : "";
            if (groupId) {
              id2 += "/" + groupId;
            }
          }
          let node2 = children.get(id2);
          if (!node2) {
            node2 = new _TopDownNode(id2, e, self2);
            node2.groupId = groupId;
            children.set(id2, node2);
          } else {
            node2.events.push(e);
          }
          node2.selfTime += duration2;
          node2.totalTime += duration2;
          if (isReceivedDataEvent2(e)) {
            node2.transferSize += e.args.data.encodedDataLength;
          }
          currentDirectChild = node2;
        }
        function matchPath(e) {
          const { endTime: endTime2 } = eventTimingsMilliSeconds2(e);
          if (matchedDepth === path14.length) {
            return true;
          }
          if (matchedDepth !== depth - 1) {
            return false;
          }
          if (!endTime2) {
            return false;
          }
          if (!eventIdCallback) {
            if (e === path14[matchedDepth].event) {
              ++matchedDepth;
            }
            return false;
          }
          let id2 = eventIdCallback(e);
          const groupId = eventGroupIdCallback ? eventGroupIdCallback(e) : "";
          if (groupId) {
            id2 += "/" + groupId;
          }
          if (id2 === path14[matchedDepth].id) {
            ++matchedDepth;
          }
          return false;
        }
        function onEndEvent() {
          --depth;
          if (matchedDepth > depth) {
            matchedDepth = depth;
          }
        }
        this.childrenInternal = children;
        return children;
      }
    };
    TopDownRootNode = class extends TopDownNode {
      filter;
      startTime;
      endTime;
      eventGroupIdCallback;
      doNotAggregate;
      includeInstantEvents;
      totalTime;
      selfTime;
      constructor(events, { filters, startTime, endTime, doNotAggregate, eventGroupIdCallback, includeInstantEvents }) {
        super("", events[0], null);
        this.event = events[0];
        this.root = this;
        this.events = events;
        this.filter = (e) => filters.every((f) => f.accept(e));
        this.startTime = startTime;
        this.endTime = endTime;
        this.eventGroupIdCallback = eventGroupIdCallback;
        this.doNotAggregate = doNotAggregate;
        this.includeInstantEvents = includeInstantEvents;
        this.totalTime = endTime - startTime;
        this.selfTime = this.totalTime;
      }
      children() {
        return this.childrenInternal || this.grouppedTopNodes();
      }
      grouppedTopNodes() {
        const flatNodes = super.children();
        for (const node2 of flatNodes.values()) {
          this.selfTime -= node2.totalTime;
        }
        if (!this.eventGroupIdCallback) {
          return flatNodes;
        }
        const groupNodes = /* @__PURE__ */ new Map();
        for (const node2 of flatNodes.values()) {
          const groupId = this.eventGroupIdCallback(node2.event);
          let groupNode = groupNodes.get(groupId);
          if (!groupNode) {
            groupNode = new GroupNode2(groupId, this, node2.events);
            groupNodes.set(groupId, groupNode);
          } else {
            groupNode.events.push(...node2.events);
          }
          groupNode.addChild(node2, node2.selfTime, node2.totalTime, node2.transferSize);
        }
        this.childrenInternal = groupNodes;
        return groupNodes;
      }
      getEventGroupIdCallback() {
        return this.eventGroupIdCallback;
      }
    };
    BottomUpRootNode2 = class extends Node$1 {
      childrenInternal;
      textFilter;
      filter;
      startTime;
      endTime;
      totalTime;
      eventGroupIdCallback;
      calculateTransferSize;
      forceGroupIdCallback;
      constructor(events, { textFilter, filters, startTime, endTime, eventGroupIdCallback, calculateTransferSize, forceGroupIdCallback }) {
        super("", events[0]);
        this.childrenInternal = null;
        this.events = events;
        this.textFilter = textFilter;
        this.filter = (e) => filters.every((f) => f.accept(e));
        this.startTime = startTime;
        this.endTime = endTime;
        this.eventGroupIdCallback = eventGroupIdCallback;
        this.totalTime = endTime - startTime;
        this.calculateTransferSize = calculateTransferSize;
        this.forceGroupIdCallback = forceGroupIdCallback;
      }
      hasChildren() {
        return true;
      }
      filterChildren(children) {
        for (const [id2, child] of children) {
          if (child.event && child.depth <= 1 && !this.textFilter.accept(child.event)) {
            children.delete(id2);
          }
        }
        return children;
      }
      children() {
        if (!this.childrenInternal) {
          this.childrenInternal = this.filterChildren(this.grouppedTopNodes());
        }
        return this.childrenInternal;
      }
      ungroupedTopNodes() {
        const root2 = this;
        const startTime = this.startTime;
        const endTime = this.endTime;
        const idStack = [];
        const nodeById = /* @__PURE__ */ new Map();
        const selfTimeStack = [endTime - startTime];
        const firstNodeStack = [];
        const totalTimeById = /* @__PURE__ */ new Map();
        const eventGroupIdCallback = this.eventGroupIdCallback;
        const forceGroupIdCallback = this.forceGroupIdCallback;
        const sumTransferSizeOfInstantEvent = (e) => {
          if (isReceivedDataEvent2(e)) {
            let id2 = generateEventID2(e);
            if (this.forceGroupIdCallback && this.eventGroupIdCallback) {
              id2 = `${id2}-${this.eventGroupIdCallback(e)}`;
            }
            let node2 = nodeById.get(id2);
            if (!node2) {
              node2 = new BottomUpNode2(root2, id2, e, false, root2);
              nodeById.set(id2, node2);
            } else {
              node2.events.push(e);
            }
            if (e.name === "ResourceReceivedData") {
              node2.transferSize += e.args.data.encodedDataLength;
            } else if (e.args.data.encodedDataLength > 0) {
              node2.transferSize = e.args.data.encodedDataLength;
            }
          }
        };
        forEachEvent2(this.events, {
          onStartEvent,
          onEndEvent,
          onInstantEvent: this.calculateTransferSize ? sumTransferSizeOfInstantEvent : void 0,
          startTime: milliToMicro2(this.startTime),
          endTime: milliToMicro2(this.endTime),
          eventFilter: this.filter,
          ignoreAsyncEvents: false
        });
        function onStartEvent(e) {
          const { startTime: currentStartTime, endTime: currentEndTime } = eventTimingsMilliSeconds2(e);
          const actualEndTime = currentEndTime !== void 0 ? Math.min(currentEndTime, endTime) : endTime;
          const duration2 = actualEndTime - Math.max(currentStartTime, startTime);
          selfTimeStack[selfTimeStack.length - 1] -= duration2;
          selfTimeStack.push(duration2);
          let id2 = generateEventID2(e);
          if (forceGroupIdCallback && eventGroupIdCallback) {
            id2 = `${id2}-${eventGroupIdCallback(e)}`;
          }
          idStack.push(id2);
          const noNodeOnStack = !totalTimeById.has(id2);
          if (noNodeOnStack) {
            totalTimeById.set(id2, duration2);
          }
          firstNodeStack.push(noNodeOnStack);
        }
        function onEndEvent(event) {
          const id2 = idStack.pop();
          if (!id2) {
            return;
          }
          let node2 = nodeById.get(id2);
          if (!node2) {
            node2 = new BottomUpNode2(root2, id2, event, false, root2);
            nodeById.set(id2, node2);
          } else {
            node2.events.push(event);
          }
          node2.selfTime += selfTimeStack.pop() || 0;
          if (firstNodeStack.pop()) {
            node2.totalTime += totalTimeById.get(id2) || 0;
            totalTimeById.delete(id2);
          }
          if (idStack.length > 0) {
            node2.setHasChildren(true);
          }
        }
        this.selfTime = selfTimeStack.pop() || 0;
        for (const pair of nodeById) {
          if (pair[1].selfTime <= 0 && (!this.calculateTransferSize || pair[1].transferSize <= 0)) {
            nodeById.delete(pair[0]);
          }
        }
        return nodeById;
      }
      grouppedTopNodes() {
        const flatNodes = this.ungroupedTopNodes();
        if (!this.eventGroupIdCallback) {
          return flatNodes;
        }
        const groupNodes = /* @__PURE__ */ new Map();
        for (const node2 of flatNodes.values()) {
          const groupId = this.eventGroupIdCallback(node2.event);
          let groupNode = groupNodes.get(groupId);
          if (!groupNode) {
            groupNode = new GroupNode2(groupId, this, node2.events);
            groupNodes.set(groupId, groupNode);
          } else {
            for (const e of node2.events) {
              groupNode.events.push(e);
            }
          }
          groupNode.addChild(node2, node2.selfTime, node2.selfTime, node2.transferSize);
        }
        return groupNodes;
      }
    };
    GroupNode2 = class extends Node$1 {
      childrenInternal;
      isGroupNodeInternal;
      events;
      constructor(id2, parent, events) {
        super(id2, events[0]);
        this.events = events;
        this.childrenInternal = /* @__PURE__ */ new Map();
        this.parent = parent;
        this.isGroupNodeInternal = true;
      }
      addChild(child, selfTime, totalTime, transferSize) {
        this.childrenInternal.set(child.id, child);
        this.selfTime += selfTime;
        this.totalTime += totalTime;
        this.transferSize += transferSize;
        child.parent = this;
      }
      hasChildren() {
        return true;
      }
      children() {
        return this.childrenInternal;
      }
    };
    BottomUpNode2 = class _BottomUpNode extends Node$1 {
      parent;
      root;
      depth;
      cachedChildren;
      hasChildrenInternal;
      constructor(root2, id2, event, hasChildren, parent) {
        super(id2, event);
        this.parent = parent;
        this.root = root2;
        this.depth = (parent.depth || 0) + 1;
        this.cachedChildren = null;
        this.hasChildrenInternal = hasChildren;
      }
      hasChildren() {
        return this.hasChildrenInternal;
      }
      setHasChildren(value) {
        this.hasChildrenInternal = value;
      }
      children() {
        if (this.cachedChildren) {
          return this.cachedChildren;
        }
        const selfTimeStack = [0];
        const eventIdStack = [];
        const eventStack = [];
        const nodeById = /* @__PURE__ */ new Map();
        const startTime = this.root.startTime;
        const endTime = this.root.endTime;
        let lastTimeMarker = startTime;
        const self2 = this;
        forEachEvent2(this.root.events, {
          onStartEvent,
          onEndEvent,
          startTime: milliToMicro2(startTime),
          endTime: milliToMicro2(endTime),
          eventFilter: this.root.filter,
          ignoreAsyncEvents: false
        });
        function onStartEvent(e) {
          const { startTime: currentStartTime, endTime: currentEndTime } = eventTimingsMilliSeconds2(e);
          const actualEndTime = currentEndTime !== void 0 ? Math.min(currentEndTime, endTime) : endTime;
          const duration2 = actualEndTime - Math.max(currentStartTime, startTime);
          if (duration2 < 0) {
            console.assert(false, "Negative duration of an event");
          }
          selfTimeStack[selfTimeStack.length - 1] -= duration2;
          selfTimeStack.push(duration2);
          const id2 = generateEventID2(e);
          eventIdStack.push(id2);
          eventStack.push(e);
        }
        function onEndEvent(e) {
          const { startTime: currentStartTime, endTime: currentEndTime } = eventTimingsMilliSeconds2(e);
          const selfTime = selfTimeStack.pop();
          const id2 = eventIdStack.pop();
          eventStack.pop();
          let node2;
          for (node2 = self2; node2.depth > 1; node2 = node2.parent) {
            if (node2.id !== eventIdStack[eventIdStack.length + 1 - node2.depth]) {
              return;
            }
          }
          if (node2.id !== id2 || eventIdStack.length < self2.depth) {
            return;
          }
          const childId = eventIdStack[eventIdStack.length - self2.depth];
          node2 = nodeById.get(childId);
          if (!node2) {
            const event = eventStack[eventStack.length - self2.depth];
            const hasChildren = eventStack.length > self2.depth;
            node2 = new _BottomUpNode(self2.root, childId, event, hasChildren, self2);
            nodeById.set(childId, node2);
          } else {
            node2.events.push(e);
          }
          const actualEndTime = currentEndTime !== void 0 ? Math.min(currentEndTime, endTime) : endTime;
          const totalTime = actualEndTime - Math.max(currentStartTime, lastTimeMarker);
          node2.selfTime += selfTime || 0;
          node2.totalTime += totalTime;
          lastTimeMarker = actualEndTime;
        }
        this.cachedChildren = this.root.filterChildren(nodeById);
        return this.cachedChildren;
      }
      searchTree(matchFunction, results) {
        results = results || [];
        if (this.event && matchFunction(this.event)) {
          results.push(this);
        }
        return results;
      }
    };
    TraceTree = /* @__PURE__ */ Object.freeze({
      __proto__: null,
      BottomUpNode: BottomUpNode2,
      BottomUpRootNode: BottomUpRootNode2,
      GroupNode: GroupNode2,
      Node: Node$1,
      TopDownNode,
      TopDownRootNode,
      eventStackFrame,
      generateEventID: generateEventID2
    });
    ThirdParties$1 = /* @__PURE__ */ Object.freeze({
      __proto__: null,
      summarizeByThirdParty: summarizeByThirdParty2,
      summarizeByURL: summarizeByURL2
    });
    extras = /* @__PURE__ */ Object.freeze({
      __proto__: null,
      FilmStrip,
      Initiators,
      MainThreadActivity,
      ScriptDuplication,
      StackTraceForEvent,
      ThirdParties: ThirdParties$1,
      TraceFilter: TraceFilter$1,
      TraceTree
    });
    MIN_PASSING_SCORE3 = 0.9;
    MAX_AVERAGE_SCORE3 = 0.8999999999999999;
    MIN_AVERAGE_SCORE3 = 0.5;
    MAX_FAILING_SCORE3 = 0.49999999999999994;
    Statistics = /* @__PURE__ */ Object.freeze({
      __proto__: null,
      getLogNormalScore: getLogNormalScore3,
      linearInterpolation: linearInterpolation2
    });
    GRAPH_SAVINGS_PRECISION2 = 50;
    Common = /* @__PURE__ */ Object.freeze({
      __proto__: null,
      calculateDocFirstByteTs: calculateDocFirstByteTs2,
      calculateMetricWeightsForSorting: calculateMetricWeightsForSorting2,
      estimateCompressedContentSize: estimateCompressedContentSize2,
      estimateCompressionRatioForScript: estimateCompressionRatioForScript2,
      evaluateCLSMetricScore: evaluateCLSMetricScore2,
      evaluateINPMetricScore: evaluateINPMetricScore2,
      evaluateLCPMetricScore: evaluateLCPMetricScore2,
      getCLS: getCLS2,
      getFieldMetricsForInsightSet: getFieldMetricsForInsightSet2,
      getINP: getINP2,
      getInsight: getInsight2,
      getLCP: getLCP2,
      insightBounds: insightBounds2,
      isRequestCompressed: isRequestCompressed2,
      isRequestServedFromBrowserCache: isRequestServedFromBrowserCache2,
      metricSavingsForWastedBytes: metricSavingsForWastedBytes2
    });
    (function(InsightWarning3) {
      InsightWarning3["NO_FP"] = "NO_FP";
      InsightWarning3["NO_LCP"] = "NO_LCP";
      InsightWarning3["NO_DOCUMENT_REQUEST"] = "NO_DOCUMENT_REQUEST";
      InsightWarning3["NO_LAYOUT"] = "NO_LAYOUT";
    })(InsightWarning2 || (InsightWarning2 = {}));
    (function(InsightCategory3) {
      InsightCategory3["ALL"] = "All";
      InsightCategory3["INP"] = "INP";
      InsightCategory3["LCP"] = "LCP";
      InsightCategory3["CLS"] = "CLS";
    })(InsightCategory2 || (InsightCategory2 = {}));
    types$1 = /* @__PURE__ */ Object.freeze({
      __proto__: null,
      get InsightCategory() {
        return InsightCategory2;
      },
      get InsightWarning() {
        return InsightWarning2;
      }
    });
    UIStrings$K = {
      title: "Use efficient cache lifetimes",
      description: "A long cache lifetime can speed up repeat visits to your page. [Learn more about caching](https://developer.chrome.com/docs/performance/insights/cache).",
      requestColumn: "Request",
      cacheTTL: "Cache TTL",
      noRequestsToCache: "No requests with inefficient cache policies",
      others: "{PH1} others"
    };
    str_$J = registerUIStrings("models/trace/insights/Cache.ts", UIStrings$K);
    i18nString$v = getLocalizedString.bind(void 0, str_$J);
    IGNORE_THRESHOLD_IN_PERCENT2 = 0.925;
    Cache3 = /* @__PURE__ */ Object.freeze({
      __proto__: null,
      UIStrings: UIStrings$K,
      cachingDisabled: cachingDisabled2,
      computeCacheLifetimeInSeconds: computeCacheLifetimeInSeconds2,
      createOverlayForRequest: createOverlayForRequest$3,
      createOverlays: createOverlays$h,
      generateInsight: generateInsight$h,
      getCombinedHeaders: getCombinedHeaders2,
      i18nString: i18nString$v,
      isCacheInsight: isCacheInsight2,
      isCacheable: isCacheable2
    });
    UIStrings$J = {
      title: "Layout shift culprits",
      description: "Layout shifts occur when elements move absent any user interaction. [Investigate the causes of layout shifts](https://developer.chrome.com/docs/performance/insights/cls-culprit), such as elements being added, removed, or their fonts changing as the page loads.",
      worstLayoutShiftCluster: "Worst layout shift cluster",
      worstCluster: "Worst cluster",
      layoutShiftCluster: "Layout shift cluster @ {PH1}",
      topCulprits: "Top layout shift culprits",
      injectedIframe: "Injected iframe",
      webFont: "Web font",
      animation: "Animation",
      unsizedImage: "Unsized image element",
      noLayoutShifts: "No layout shifts",
      noCulprits: "Could not detect any layout shift culprits"
    };
    str_$I = registerUIStrings("models/trace/insights/CLSCulprits.ts", UIStrings$J);
    i18nString$u = getLocalizedString.bind(void 0, str_$I);
    ACTIONABLE_FAILURE_REASONS2 = [
      {
        flag: 1 << 0,
        failure: "ACCELERATED_ANIMATIONS_DISABLED"
      },
      {
        flag: 1 << 1,
        failure: "EFFECT_SUPPRESSED_BY_DEVTOOLS"
      },
      {
        flag: 1 << 2,
        failure: "INVALID_ANIMATION_OR_EFFECT"
      },
      {
        flag: 1 << 3,
        failure: "EFFECT_HAS_UNSUPPORTED_TIMING_PARAMS"
      },
      {
        flag: 1 << 4,
        failure: "EFFECT_HAS_NON_REPLACE_COMPOSITE_MODE"
      },
      {
        flag: 1 << 5,
        failure: "TARGET_HAS_INVALID_COMPOSITING_STATE"
      },
      {
        flag: 1 << 6,
        failure: "TARGET_HAS_INCOMPATIBLE_ANIMATIONS"
      },
      {
        flag: 1 << 7,
        failure: "TARGET_HAS_CSS_OFFSET"
      },
      {
        flag: 1 << 9,
        failure: "ANIMATION_AFFECTS_NON_CSS_PROPERTIES"
      },
      {
        flag: 1 << 10,
        failure: "TRANSFORM_RELATED_PROPERTY_CANNOT_BE_ACCELERATED_ON_TARGET"
      },
      {
        flag: 1 << 11,
        failure: "TRANSFROM_BOX_SIZE_DEPENDENT"
      },
      {
        flag: 1 << 12,
        failure: "FILTER_RELATED_PROPERTY_MAY_MOVE_PIXELS"
      },
      {
        flag: 1 << 13,
        failure: "UNSUPPORTED_CSS_PROPERTY"
      },
      {
        flag: 1 << 15,
        failure: "MIXED_KEYFRAME_VALUE_TYPES"
      },
      {
        flag: 1 << 16,
        failure: "TIMELINE_SOURCE_HAS_INVALID_COMPOSITING_STATE"
      },
      {
        flag: 1 << 17,
        failure: "ANIMATION_HAS_NO_VISIBLE_CHANGE"
      },
      {
        flag: 1 << 18,
        failure: "AFFECTS_IMPORTANT_PROPERTY"
      },
      {
        flag: 1 << 19,
        failure: "SVG_TARGET_HAS_INDEPENDENT_TRANSFORM_PROPERTY"
      }
    ];
    ROOT_CAUSE_WINDOW2 = secondsToMicro2(Seconds2(0.5));
    CLSCulprits = /* @__PURE__ */ Object.freeze({
      __proto__: null,
      UIStrings: UIStrings$J,
      createOverlays: createOverlays$g,
      generateInsight: generateInsight$g,
      getNonCompositedFailure: getNonCompositedFailure2,
      i18nString: i18nString$u,
      isCLSCulpritsInsight: isCLSCulpritsInsight2
    });
    UIStrings$I = {
      title: "Document request latency",
      description: "Your first network request is the most important. [Reduce its latency](https://developer.chrome.com/docs/performance/insights/document-latency) by avoiding redirects, ensuring a fast server response, and enabling text compression.",
      passingRedirects: "Avoids redirects",
      failedRedirects: "Had redirects ({PH1} redirects, +{PH2})",
      passingServerResponseTime: "Server responds quickly (observed {PH1})",
      failedServerResponseTime: "Server responded slowly (observed {PH1})",
      passingTextCompression: "Applies text compression",
      failedTextCompression: "No compression applied",
      redirectsLabel: "Redirects",
      serverResponseTimeLabel: "Server response time",
      uncompressedDownload: "Uncompressed download"
    };
    str_$H = registerUIStrings("models/trace/insights/DocumentLatency.ts", UIStrings$I);
    i18nString$t = getLocalizedString.bind(void 0, str_$H);
    TOO_SLOW_THRESHOLD_MS2 = 600;
    TARGET_MS2 = 100;
    IGNORE_THRESHOLD_IN_BYTES2 = 1400;
    DocumentLatency = /* @__PURE__ */ Object.freeze({
      __proto__: null,
      UIStrings: UIStrings$I,
      createOverlays: createOverlays$f,
      generateInsight: generateInsight$f,
      i18nString: i18nString$t,
      isDocumentLatencyInsight: isDocumentLatencyInsight2
    });
    UIStrings$H = {
      title: "Optimize DOM size",
      description: "A large DOM can increase the duration of style calculations and layout reflows, impacting page responsiveness. A large DOM will also increase memory usage. [Learn how to avoid an excessive DOM size](https://developer.chrome.com/docs/performance/insights/dom-size).",
      statistic: "Statistic",
      value: "Value",
      element: "Element",
      totalElements: "Total elements",
      maxDOMDepth: "DOM depth",
      maxChildren: "Most children",
      topUpdatesDescription: "These are the largest layout and style recalculation events. Their performance impact may be reduced by making the DOM simpler.",
      duration: "Duration",
      largeLayout: "Layout ({PH1} objects)",
      largeStyleRecalc: "Style recalculation ({PH1} elements)"
    };
    str_$G = registerUIStrings("models/trace/insights/DOMSize.ts", UIStrings$H);
    i18nString$s = getLocalizedString.bind(void 0, str_$G);
    DOM_SIZE_DURATION_THRESHOLD2 = milliToMicro2(Milli2(40));
    LAYOUT_OBJECTS_THRESHOLD2 = 100;
    STYLE_RECALC_ELEMENTS_THRESHOLD2 = 300;
    DOMSize = /* @__PURE__ */ Object.freeze({
      __proto__: null,
      UIStrings: UIStrings$H,
      createOverlays: createOverlays$e,
      generateInsight: generateInsight$e,
      i18nString: i18nString$s,
      isDomSizeInsight: isDomSizeInsight2
    });
    UIStrings$G = {
      title: "Duplicated JavaScript",
      description: "Remove large, [duplicate JavaScript modules](https://developer.chrome.com/docs/performance/insights/duplicated-javascript) from bundles to reduce unnecessary bytes consumed by network activity.",
      columnSource: "Source",
      columnDuplicatedBytes: "Duplicated bytes"
    };
    str_$F = registerUIStrings("models/trace/insights/DuplicatedJavaScript.ts", UIStrings$G);
    i18nString$r = getLocalizedString.bind(void 0, str_$F);
    DuplicatedJavaScript = /* @__PURE__ */ Object.freeze({
      __proto__: null,
      UIStrings: UIStrings$G,
      createOverlays: createOverlays$d,
      generateInsight: generateInsight$d,
      i18nString: i18nString$r,
      isDuplicatedJavaScriptInsight: isDuplicatedJavaScriptInsight2
    });
    UIStrings$F = {
      title: "Font display",
      description: "Consider setting [`font-display`](https://developer.chrome.com/docs/performance/insights/font-display) to `swap` or `optional` to ensure text is consistently visible. `swap` can be further optimized to mitigate layout shifts with [font metric overrides](https://developer.chrome.com/blog/font-fallbacks).",
      fontColumn: "Font",
      wastedTimeColumn: "Wasted time"
    };
    str_$E = registerUIStrings("models/trace/insights/FontDisplay.ts", UIStrings$F);
    i18nString$q = getLocalizedString.bind(void 0, str_$E);
    FontDisplay = /* @__PURE__ */ Object.freeze({
      __proto__: null,
      UIStrings: UIStrings$F,
      createOverlays: createOverlays$c,
      generateInsight: generateInsight$c,
      i18nString: i18nString$q,
      isFontDisplayInsight: isFontDisplayInsight2
    });
    UIStrings$E = {
      title: "Forced reflow",
      description: "A forced reflow occurs when JavaScript queries geometric properties (such as `offsetWidth`) after styles have been invalidated by a change to the DOM state. This can result in poor performance. Learn more about [forced reflows](https://developer.chrome.com/docs/performance/insights/forced-reflow) and possible mitigations.",
      reflowCallFrames: "Call frames that trigger reflow",
      topTimeConsumingFunctionCall: "Top function call",
      totalReflowTime: "Total reflow time",
      unattributed: "[unattributed]",
      anonymous: "(anonymous)"
    };
    str_$D = registerUIStrings("models/trace/insights/ForcedReflow.ts", UIStrings$E);
    i18nString$p = getLocalizedString.bind(void 0, str_$D);
    ForcedReflow = /* @__PURE__ */ Object.freeze({
      __proto__: null,
      UIStrings: UIStrings$E,
      createOverlayForEvents: createOverlayForEvents2,
      createOverlays: createOverlays$b,
      generateInsight: generateInsight$b,
      i18nString: i18nString$p,
      isForcedReflowInsight: isForcedReflowInsight2
    });
    UIStrings$D = {
      title: "Improve image delivery",
      description: "Reducing the download time of images can improve the perceived load time of the page and LCP. [Learn more about optimizing image size](https://developer.chrome.com/docs/performance/insights/image-delivery)",
      useCompression: "Increasing the image compression factor could improve this image's download size.",
      useModernFormat: "Using a modern image format (WebP, AVIF) or increasing the image compression could improve this image's download size.",
      useVideoFormat: "Using video formats instead of GIFs can improve the download size of animated content.",
      useResponsiveSize: "This image file is larger than it needs to be ({PH1}) for its displayed dimensions ({PH2}). Use responsive images to reduce the image download size.",
      optimizeFile: "Optimize file size",
      others: "{PH1} others",
      noOptimizableImages: "No optimizable images",
      estimatedSavings: "{PH1} (Est {PH2})"
    };
    str_$C = registerUIStrings("models/trace/insights/ImageDelivery.ts", UIStrings$D);
    i18nString$o = getLocalizedString.bind(void 0, str_$C);
    TARGET_BYTES_PER_PIXEL_AVIF2 = 2 * 1 / 12;
    GIF_SIZE_THRESHOLD2 = 100 * 1024;
    BYTE_SAVINGS_THRESHOLD2 = 4096;
    BYTE_SAVINGS_THRESHOLD_RESPONSIVE_BREAKPOINTS2 = 12288;
    (function(ImageOptimizationType3) {
      ImageOptimizationType3["ADJUST_COMPRESSION"] = "ADJUST_COMPRESSION";
      ImageOptimizationType3["MODERN_FORMAT_OR_COMPRESSION"] = "MODERN_FORMAT_OR_COMPRESSION";
      ImageOptimizationType3["VIDEO_FORMAT"] = "VIDEO_FORMAT";
      ImageOptimizationType3["RESPONSIVE_SIZE"] = "RESPONSIVE_SIZE";
    })(ImageOptimizationType2 || (ImageOptimizationType2 = {}));
    ImageDelivery = /* @__PURE__ */ Object.freeze({
      __proto__: null,
      get ImageOptimizationType() {
        return ImageOptimizationType2;
      },
      UIStrings: UIStrings$D,
      createOverlayForRequest: createOverlayForRequest$2,
      createOverlays: createOverlays$a,
      generateInsight: generateInsight$a,
      getOptimizationMessage: getOptimizationMessage2,
      getOptimizationMessageWithBytes: getOptimizationMessageWithBytes2,
      i18nString: i18nString$o,
      isImageDeliveryInsight: isImageDeliveryInsight2
    });
    UIStrings$C = {
      description: "Start investigating [how to improve INP](https://developer.chrome.com/docs/performance/insights/inp-breakdown) by looking at the longest subpart.",
      title: "INP breakdown",
      subpart: "Subpart",
      duration: "Duration",
      inputDelay: "Input delay",
      processingDuration: "Processing duration",
      presentationDelay: "Presentation delay",
      noInteractions: "No interactions detected"
    };
    str_$B = registerUIStrings("models/trace/insights/INPBreakdown.ts", UIStrings$C);
    i18nString$n = getLocalizedString.bind(void 0, str_$B);
    INPBreakdown = /* @__PURE__ */ Object.freeze({
      __proto__: null,
      UIStrings: UIStrings$C,
      createOverlays: createOverlays$9,
      createOverlaysForSubpart: createOverlaysForSubpart2,
      generateInsight: generateInsight$9,
      i18nString: i18nString$n,
      isINPBreakdownInsight: isINPBreakdownInsight2
    });
    UIStrings$B = {
      title: "LCP breakdown",
      description: "Each [subpart has specific improvement strategies](https://developer.chrome.com/docs/performance/insights/lcp-breakdown). Ideally, most of the LCP time should be spent on loading the resources, not within delays.",
      timeToFirstByte: "Time to first byte",
      resourceLoadDelay: "Resource load delay",
      resourceLoadDuration: "Resource load duration",
      elementRenderDelay: "Element render delay",
      subpart: "Subpart",
      duration: "Duration",
      fieldDuration: "Field p75",
      noLcp: "No LCP detected"
    };
    str_$A = registerUIStrings("models/trace/insights/LCPBreakdown.ts", UIStrings$B);
    i18nString$m = getLocalizedString.bind(void 0, str_$A);
    LCPBreakdown = /* @__PURE__ */ Object.freeze({
      __proto__: null,
      UIStrings: UIStrings$B,
      createOverlays: createOverlays$8,
      generateInsight: generateInsight$8,
      i18nString: i18nString$m,
      isLCPBreakdownInsight: isLCPBreakdownInsight2
    });
    UIStrings$A = {
      title: "LCP request discovery",
      description: "[Optimize LCP](https://developer.chrome.com/docs/performance/insights/lcp-discovery) by making the LCP image discoverable from the HTML immediately, and avoiding lazy-loading",
      lcpLoadDelay: "LCP image loaded {PH1} after earliest start point.",
      fetchPriorityApplied: "fetchpriority=high applied",
      fetchPriorityShouldBeApplied: "fetchpriority=high should be applied",
      requestDiscoverable: "Request is discoverable in initial document",
      lazyLoadNotApplied: "lazy load not applied",
      noLcp: "No LCP detected",
      noLcpResource: "No LCP resource detected because the LCP is not an image"
    };
    str_$z = registerUIStrings("models/trace/insights/LCPDiscovery.ts", UIStrings$A);
    i18nString$l = getLocalizedString.bind(void 0, str_$z);
    LCPDiscovery = /* @__PURE__ */ Object.freeze({
      __proto__: null,
      UIStrings: UIStrings$A,
      createOverlays: createOverlays$7,
      generateInsight: generateInsight$7,
      getImageData: getImageData2,
      i18nString: i18nString$l,
      isLCPDiscoveryInsight: isLCPDiscoveryInsight2
    });
    polyfill_module_data_default2 = [
      {
        name: "focus-visible",
        modules: [
          "focus-visible"
        ]
      },
      {
        name: "Error.prototype.cause",
        modules: [
          "es.error.cause"
        ]
      },
      {
        name: "Array.prototype.at",
        modules: [
          "es.array.at",
          "esnext.array.at"
        ],
        corejs: true
      },
      {
        name: "Array.prototype.concat",
        modules: [
          "es.array.concat"
        ],
        corejs: true
      },
      {
        name: "Array.prototype.copyWithin",
        modules: [
          "es.array.copy-within"
        ],
        corejs: true
      },
      {
        name: "Array.prototype.every",
        modules: [
          "es.array.every"
        ],
        corejs: true
      },
      {
        name: "Array.prototype.fill",
        modules: [
          "es.array.fill"
        ],
        corejs: true
      },
      {
        name: "Array.prototype.filter",
        modules: [
          "es.array.filter"
        ],
        corejs: true
      },
      {
        name: "Array.prototype.find",
        modules: [
          "es.array.find"
        ],
        corejs: true
      },
      {
        name: "Array.prototype.findIndex",
        modules: [
          "es.array.find-index"
        ],
        corejs: true
      },
      {
        name: "Array.prototype.findLast",
        modules: [
          "es.array.find-last",
          "esnext.array.find-last"
        ],
        corejs: true
      },
      {
        name: "Array.prototype.findLastIndex",
        modules: [
          "es.array.find-last-index",
          "esnext.array.find-last-index"
        ],
        corejs: true
      },
      {
        name: "Array.prototype.flat",
        modules: [
          "es.array.flat"
        ],
        corejs: true
      },
      {
        name: "Array.prototype.flatMap",
        modules: [
          "es.array.flat-map"
        ],
        corejs: true
      },
      {
        name: "Array.prototype.forEach",
        modules: [
          "es.array.for-each"
        ],
        corejs: true
      },
      {
        name: "Array.from",
        modules: [
          "es.array.from"
        ],
        corejs: true
      },
      {
        name: "Array.prototype.includes",
        modules: [
          "es.array.includes"
        ],
        corejs: true
      },
      {
        name: "Array.prototype.indexOf",
        modules: [
          "es.array.index-of"
        ],
        corejs: true
      },
      {
        name: "Array.isArray",
        modules: [
          "es.array.is-array"
        ],
        corejs: true
      },
      {
        name: "Array.prototype.join",
        modules: [
          "es.array.join"
        ],
        corejs: true
      },
      {
        name: "Array.prototype.map",
        modules: [
          "es.array.map"
        ],
        corejs: true
      },
      {
        name: "Array.of",
        modules: [
          "es.array.of"
        ],
        corejs: true
      },
      {
        name: "Array.prototype.slice",
        modules: [
          "es.array.slice"
        ],
        corejs: true
      },
      {
        name: "Array.prototype.some",
        modules: [
          "es.array.some"
        ],
        corejs: true
      },
      {
        name: "Array.prototype.sort",
        modules: [
          "es.array.sort"
        ],
        corejs: true
      },
      {
        name: "Array.prototype.unshift",
        modules: [
          "es.array.unshift"
        ],
        corejs: true
      },
      {
        name: "Math.acosh",
        modules: [
          "es.math.acosh"
        ],
        corejs: true
      },
      {
        name: "Math.asinh",
        modules: [
          "es.math.asinh"
        ],
        corejs: true
      },
      {
        name: "Math.atanh",
        modules: [
          "es.math.atanh"
        ],
        corejs: true
      },
      {
        name: "Math.cbrt",
        modules: [
          "es.math.cbrt"
        ],
        corejs: true
      },
      {
        name: "Math.clz32",
        modules: [
          "es.math.clz32"
        ],
        corejs: true
      },
      {
        name: "Math.cosh",
        modules: [
          "es.math.cosh"
        ],
        corejs: true
      },
      {
        name: "Math.expm1",
        modules: [
          "es.math.expm1"
        ],
        corejs: true
      },
      {
        name: "Math.fround",
        modules: [
          "es.math.fround"
        ],
        corejs: true
      },
      {
        name: "Math.hypot",
        modules: [
          "es.math.hypot"
        ],
        corejs: true
      },
      {
        name: "Math.imul",
        modules: [
          "es.math.imul"
        ],
        corejs: true
      },
      {
        name: "Math.log10",
        modules: [
          "es.math.log10"
        ],
        corejs: true
      },
      {
        name: "Math.log1p",
        modules: [
          "es.math.log1p"
        ],
        corejs: true
      },
      {
        name: "Math.log2",
        modules: [
          "es.math.log2"
        ],
        corejs: true
      },
      {
        name: "Math.sign",
        modules: [
          "es.math.sign"
        ],
        corejs: true
      },
      {
        name: "Math.sinh",
        modules: [
          "es.math.sinh"
        ],
        corejs: true
      },
      {
        name: "Math.tanh",
        modules: [
          "es.math.tanh"
        ],
        corejs: true
      },
      {
        name: "Math.trunc",
        modules: [
          "es.math.trunc"
        ],
        corejs: true
      },
      {
        name: "Object.assign",
        modules: [
          "es.object.assign"
        ],
        corejs: true
      },
      {
        name: "Object.create",
        modules: [
          "es.object.create"
        ],
        corejs: true
      },
      {
        name: "Object.entries",
        modules: [
          "es.object.entries"
        ],
        corejs: true
      },
      {
        name: "Object.freeze",
        modules: [
          "es.object.freeze"
        ],
        corejs: true
      },
      {
        name: "Object.fromEntries",
        modules: [
          "es.object.from-entries"
        ],
        corejs: true
      },
      {
        name: "Object.getOwnPropertyDescriptor",
        modules: [
          "es.object.get-own-property-descriptor"
        ],
        corejs: true
      },
      {
        name: "Object.getOwnPropertyDescriptors",
        modules: [
          "es.object.get-own-property-descriptors"
        ],
        corejs: true
      },
      {
        name: "Object.getPrototypeOf",
        modules: [
          "es.object.get-prototype-of"
        ],
        corejs: true
      },
      {
        name: "Object.hasOwn",
        modules: [
          "es.object.has-own",
          "esnext.object.has-own"
        ],
        corejs: true
      },
      {
        name: "Object.is",
        modules: [
          "es.object.is"
        ],
        corejs: true
      },
      {
        name: "Object.isExtensible",
        modules: [
          "es.object.is-extensible"
        ],
        corejs: true
      },
      {
        name: "Object.isFrozen",
        modules: [
          "es.object.is-frozen"
        ],
        corejs: true
      },
      {
        name: "Object.isSealed",
        modules: [
          "es.object.is-sealed"
        ],
        corejs: true
      },
      {
        name: "Object.keys",
        modules: [
          "es.object.keys"
        ],
        corejs: true
      },
      {
        name: "Object.preventExtensions",
        modules: [
          "es.object.prevent-extensions"
        ],
        corejs: true
      },
      {
        name: "Object.seal",
        modules: [
          "es.object.seal"
        ],
        corejs: true
      },
      {
        name: "Object.setPrototypeOf",
        modules: [
          "es.object.set-prototype-of"
        ],
        corejs: true
      },
      {
        name: "Object.values",
        modules: [
          "es.object.values"
        ],
        corejs: true
      },
      {
        name: "Promise.any",
        modules: [
          "es.promise.any",
          "esnext.promise.any"
        ],
        corejs: true
      },
      {
        name: "Reflect.apply",
        modules: [
          "es.reflect.apply"
        ],
        corejs: true
      },
      {
        name: "Reflect.construct",
        modules: [
          "es.reflect.construct"
        ],
        corejs: true
      },
      {
        name: "Reflect.deleteProperty",
        modules: [
          "es.reflect.delete-property"
        ],
        corejs: true
      },
      {
        name: "Reflect.get",
        modules: [
          "es.reflect.get"
        ],
        corejs: true
      },
      {
        name: "Reflect.getOwnPropertyDescriptor",
        modules: [
          "es.reflect.get-own-property-descriptor"
        ],
        corejs: true
      },
      {
        name: "Reflect.getPrototypeOf",
        modules: [
          "es.reflect.get-prototype-of"
        ],
        corejs: true
      },
      {
        name: "Reflect.has",
        modules: [
          "es.reflect.has"
        ],
        corejs: true
      },
      {
        name: "Reflect.isExtensible",
        modules: [
          "es.reflect.is-extensible"
        ],
        corejs: true
      },
      {
        name: "Reflect.ownKeys",
        modules: [
          "es.reflect.own-keys"
        ],
        corejs: true
      },
      {
        name: "Reflect.preventExtensions",
        modules: [
          "es.reflect.prevent-extensions"
        ],
        corejs: true
      },
      {
        name: "Reflect.setPrototypeOf",
        modules: [
          "es.reflect.set-prototype-of"
        ],
        corejs: true
      },
      {
        name: "String.prototype.codePointAt",
        modules: [
          "es.string.code-point-at"
        ],
        corejs: true
      },
      {
        name: "String.prototype.endsWith",
        modules: [
          "es.string.ends-with"
        ],
        corejs: true
      },
      {
        name: "String.fromCodePoint",
        modules: [
          "es.string.from-code-point"
        ],
        corejs: true
      },
      {
        name: "String.prototype.includes",
        modules: [
          "es.string.includes"
        ],
        corejs: true
      },
      {
        name: "String.prototype.matchAll",
        modules: [
          "es.string.match-all",
          "esnext.string.match-all"
        ],
        corejs: true
      },
      {
        name: "String.raw",
        modules: [
          "es.string.raw"
        ],
        corejs: true
      },
      {
        name: "String.prototype.repeat",
        modules: [
          "es.string.repeat"
        ],
        corejs: true
      },
      {
        name: "String.prototype.replaceAll",
        modules: [
          "es.string.replace-all",
          "esnext.string.replace-all"
        ],
        corejs: true
      },
      {
        name: "String.prototype.startsWith",
        modules: [
          "es.string.starts-with"
        ],
        corejs: true
      },
      {
        name: "String.prototype.substr",
        modules: [
          "es.string.substr"
        ],
        corejs: true
      },
      {
        name: "String.prototype.trim",
        modules: [
          "es.string.trim"
        ],
        corejs: true
      },
      {
        name: "String.prototype.trimEnd",
        modules: [
          "es.string.trim-end"
        ],
        corejs: true
      },
      {
        name: "String.prototype.trimStart",
        modules: [
          "es.string.trim-start"
        ],
        corejs: true
      },
      {
        name: "String.prototype.link",
        modules: [
          "es.string.link"
        ],
        corejs: true
      },
      {
        name: "Promise.allSettled",
        modules: [
          "esnext.promise.all-settled"
        ],
        corejs: true
      }
    ];
    polyfill_graph_data_default2 = {
      moduleSizes: [26070, 498, 282, 294, 281, 467, 161, 236, 229, 765, 546, 339, 1608, 723, 729, 1545, 438, 214, 657, 111, 759, 537, 209, 281, 685, 217, 757, 631, 293, 182, 475, 79, 407, 140, 366, 792, 269, 222, 158, 280, 188, 137, 158, 105, 189, 543, 160, 742, 1436, 88, 904, 146, 314, 375, 183, 1083, 195, 503, 269, 208, 334, 350, 460, 568, 229, 1155, 334, 266, 30, 120, 309, 370, 358, 1952, 1638, 304, 153, 274, 1288, 192, 543, 74, 144, 137, 33, 336, 457, 2122, 535, 711, 1323, 117, 1961, 244, 557, 318, 119, 124, 108, 144, 96, 133, 441, 210, 1627, 1956, 693, 1426, 863, 637, 301, 51, 708, 583, 119, 600, 221, 370, 728, 1085, 552, 629, 125, 1746, 97, 441, 543, 2756, 371, 447, 548, 243, 266, 217, 99, 440, 183, 546, 137, 464, 207, 983, 503, 237, 382, 249, 675, 402, 254, 223, 164, 214, 191, 831, 218, 202, 232, 124, 249, 160, 251, 217, 717, 78, 561, 1627, 256, 386, 225, 432, 499, 394, 364, 445, 634, 667, 177, 346, 470, 663, 142, 588, 414, 617, 1559, 380, 2520, 1040, 417, 289, 238, 220, 214, 303, 163, 141, 510, 397, 137, 137, 133, 133, 390, 266, 137, 183, 215, 191, 485, 328, 575, 799, 533, 148, 215, 589, 589, 130, 362, 562, 471, 179, 186, 1266, 1456, 521, 1536, 427, 444, 406, 912, 150, 283, 144, 485, 470, 205, 1268, 796, 658, 306, 3751, 814, 146, 2328, 1226, 922, 237, 206, 198, 250, 283, 60, 3e3],
      dependencies: {
        "Array.prototype.at": [0, 5, 69, 105, 106, 116, 164],
        "Array.prototype.concat": [0, 16, 21, 22, 26, 34, 40, 76, 78, 155, 165],
        "Array.prototype.copyWithin": [0, 5, 9, 37, 69, 105, 106, 116, 166],
        "Array.prototype.every": [0, 15, 17, 21, 22, 26, 53, 59, 76, 78, 155, 167],
        "Array.prototype.fill": [0, 5, 10, 69, 105, 106, 116, 168],
        "Array.prototype.filter": [0, 15, 16, 21, 22, 26, 53, 59, 76, 78, 155, 169],
        "Array.prototype.find": [0, 5, 15, 21, 22, 26, 53, 59, 69, 76, 78, 105, 106, 116, 155, 173],
        "Array.prototype.findIndex": [0, 5, 15, 21, 22, 26, 53, 59, 69, 76, 78, 105, 106, 116, 155, 170],
        "Array.prototype.findLast": [0, 5, 14, 53, 59, 69, 105, 106, 116, 172],
        "Array.prototype.findLastIndex": [0, 5, 14, 53, 59, 69, 105, 106, 116, 171],
        "Array.prototype.flat": [0, 21, 22, 26, 40, 50, 53, 59, 76, 78, 155, 175],
        "Array.prototype.flatMap": [0, 21, 22, 26, 40, 50, 53, 59, 76, 78, 155, 174],
        "Array.prototype.forEach": [0, 11, 15, 17, 21, 22, 26, 53, 59, 76, 78, 155, 176],
        "Array.from": [0, 12, 23, 24, 26, 34, 53, 59, 62, 63, 75, 78, 88, 155, 177],
        "Array.prototype.includes": [0, 5, 69, 105, 106, 116, 178],
        "Array.prototype.indexOf": [0, 17, 59, 179],
        "Array.isArray": [0, 76, 180],
        "Array.prototype.join": [0, 17, 181],
        "Array.prototype.map": [0, 15, 16, 21, 22, 26, 53, 59, 76, 78, 155, 182],
        "Array.of": [0, 26, 34, 78, 155, 183],
        "Array.prototype.slice": [0, 16, 19, 26, 34, 76, 78, 155, 184],
        "Array.prototype.some": [0, 15, 17, 21, 22, 26, 53, 59, 76, 78, 155, 185],
        "Array.prototype.sort": [0, 17, 19, 20, 26, 37, 42, 43, 46, 155, 156, 186],
        "Array.prototype.unshift": [0, 18, 37, 40, 76, 187],
        "Math.acosh": [0, 97, 188],
        "Math.asinh": [0, 189],
        "Math.atanh": [0, 190],
        "Math.cbrt": [0, 100, 191],
        "Math.clz32": [0, 192],
        "Math.cosh": [0, 93, 193],
        "Math.expm1": [0, 93, 194],
        "Math.fround": [0, 94, 95, 99, 100, 195],
        "Math.hypot": [0, 196],
        "Math.imul": [0, 197],
        "Math.log10": [0, 96, 198],
        "Math.log1p": [0, 97, 199],
        "Math.log2": [0, 98, 200],
        "Math.sign": [0, 100, 201],
        "Math.sinh": [0, 93, 202],
        "Math.tanh": [0, 93, 203],
        "Math.trunc": [0, 204],
        "Object.assign": [0, 104, 116, 205],
        "Object.create": [0, 69, 105, 106, 116, 206],
        "Object.entries": [0, 29, 112, 116, 119, 207],
        "Object.freeze": [0, 8, 19, 51, 73, 109, 113, 208],
        "Object.fromEntries": [0, 26, 34, 53, 59, 62, 63, 75, 87, 88, 155, 209],
        "Object.getOwnPropertyDescriptor": [0, 210],
        "Object.getOwnPropertyDescriptors": [0, 34, 211],
        "Object.getPrototypeOf": [0, 29, 112, 212],
        "Object.hasOwn": [0, 213],
        "Object.is": [0, 134, 217],
        "Object.isExtensible": [0, 8, 113, 214],
        "Object.isFrozen": [0, 8, 215],
        "Object.isSealed": [0, 8, 216],
        "Object.keys": [0, 116, 218],
        "Object.preventExtensions": [0, 8, 19, 51, 73, 109, 113, 219],
        "Object.seal": [0, 8, 19, 51, 73, 109, 113, 220],
        "Object.setPrototypeOf": [0, 4, 58, 83, 118, 221],
        "Object.values": [0, 29, 112, 116, 119, 222],
        "Promise.any": [0, 24, 26, 47, 53, 59, 62, 63, 75, 87, 88, 102, 122, 123, 124, 125, 155, 224],
        "Reflect.apply": [0, 52, 225],
        "Reflect.construct": [0, 3, 19, 26, 52, 55, 69, 78, 105, 106, 116, 155, 226],
        "Reflect.deleteProperty": [0, 227],
        "Reflect.get": [0, 29, 79, 112, 230],
        "Reflect.getOwnPropertyDescriptor": [0, 228],
        "Reflect.getPrototypeOf": [0, 29, 112, 229],
        "Reflect.has": [0, 231],
        "Reflect.isExtensible": [0, 8, 113, 232],
        "Reflect.ownKeys": [0, 233],
        "Reflect.preventExtensions": [0, 51, 234],
        "Reflect.setPrototypeOf": [0, 4, 58, 83, 118, 235],
        "String.prototype.codePointAt": [0, 26, 141, 155, 156, 236],
        "String.prototype.endsWith": [0, 26, 28, 59, 85, 103, 155, 156, 237],
        "String.fromCodePoint": [0, 238],
        "String.prototype.includes": [0, 26, 28, 85, 103, 155, 156, 239],
        "String.prototype.matchAll": [0, 3, 6, 26, 29, 31, 59, 69, 78, 85, 89, 90, 105, 106, 112, 116, 126, 127, 128, 129, 130, 131, 132, 135, 139, 141, 155, 156, 241],
        "String.raw": [0, 26, 155, 156, 242],
        "String.prototype.repeat": [0, 26, 142, 155, 156, 243],
        "String.prototype.replaceAll": [0, 26, 65, 85, 128, 129, 155, 156, 244],
        "String.prototype.startsWith": [0, 26, 28, 59, 85, 103, 155, 156, 245],
        "String.prototype.substr": [0, 26, 155, 156, 246],
        "String.prototype.trim": [0, 26, 144, 146, 155, 156, 163, 251],
        "String.prototype.trimEnd": [0, 26, 143, 144, 146, 155, 156, 163, 247, 249],
        "String.prototype.trimStart": [0, 26, 144, 145, 146, 155, 156, 163, 248, 250],
        "String.prototype.link": [0, 26, 30, 140, 155, 156, 240],
        "Promise.allSettled": [0, 24, 26, 47, 53, 59, 62, 63, 75, 87, 88, 102, 122, 123, 124, 125, 155, 223, 252],
        "focus-visible": [253]
      },
      maxSize: 155835
    };
    polyfillModuleData2 = polyfill_module_data_default2;
    graph$1 = polyfill_graph_data_default2;
    CodePatternMatcher2 = class {
      constructor(patterns) {
        this.patterns = patterns;
      }
      match(code2) {
        if (!this.re) {
          const patternsExpression = this.patterns.map((pattern2) => `(${pattern2.expression})`).join("|");
          this.re = new RegExp(`(^\r
|\r|
)|${patternsExpression}`, "g");
        }
        this.re.lastIndex = 0;
        const seen = /* @__PURE__ */ new Set();
        const matches = [];
        let result;
        let line = 0;
        let lineBeginsAtIndex = 0;
        while ((result = this.re.exec(code2)) !== null) {
          const captureGroups = result.slice(1);
          const [isNewline, ...patternExpressionMatches] = captureGroups;
          if (isNewline) {
            line++;
            lineBeginsAtIndex = result.index + 1;
            continue;
          }
          const pattern2 = this.patterns[patternExpressionMatches.findIndex(Boolean)];
          if (seen.has(pattern2)) {
            continue;
          }
          seen.add(pattern2);
          matches.push({
            name: pattern2.name,
            line,
            column: result.index - lineBeginsAtIndex
          });
        }
        return matches;
      }
    };
    matcher2 = new CodePatternMatcher2([
      ...getPolyfillPatterns2(),
      ...getTransformPatterns2()
    ]);
    legacyJavascript = /* @__PURE__ */ Object.freeze({
      __proto__: null,
      detectLegacyJavaScript: detectLegacyJavaScript$1,
      getCoreJsPolyfillData: getCoreJsPolyfillData2,
      getTransformPatterns: getTransformPatterns2
    });
    ({ detectLegacyJavaScript: detectLegacyJavaScript3 } = legacyJavascript);
    UIStrings$z = {
      title: "Legacy JavaScript",
      description: "Polyfills and transforms enable older browsers to use new JavaScript features. However, many aren't necessary for modern browsers. Consider modifying your JavaScript build process to not transpile [Baseline](https://web.dev/articles/baseline-and-polyfills) features, unless you know you must support older browsers. [Learn why most sites can deploy ES6+ code without transpiling](https://developer.chrome.com/docs/performance/insights/legacy-javascript)",
      columnScript: "Script",
      columnWastedBytes: "Wasted bytes"
    };
    str_$y = registerUIStrings("models/trace/insights/LegacyJavaScript.ts", UIStrings$z);
    i18nString$k = getLocalizedString.bind(void 0, str_$y);
    BYTE_THRESHOLD2 = 5e3;
    LegacyJavaScript = /* @__PURE__ */ Object.freeze({
      __proto__: null,
      UIStrings: UIStrings$z,
      createOverlays: createOverlays$6,
      generateInsight: generateInsight$6,
      i18nString: i18nString$k,
      isLegacyJavaScript: isLegacyJavaScript2
    });
    UIStrings$y = {
      title: "Modern HTTP",
      description: "HTTP/2 and HTTP/3 offer many benefits over HTTP/1.1, such as multiplexing. [Learn more about using modern HTTP](https://developer.chrome.com/docs/performance/insights/modern-http).",
      request: "Request",
      protocol: "Protocol",
      noOldProtocolRequests: "No requests used HTTP/1.1, or its current use of HTTP/1.1 does not present a significant optimization opportunity. HTTP/1.1 requests are only flagged if six or more static assets originate from the same origin, and they are not served from a local development environment or a third-party source."
    };
    str_$x = registerUIStrings("models/trace/insights/ModernHTTP.ts", UIStrings$y);
    i18nString$j = getLocalizedString.bind(void 0, str_$x);
    ModernHTTP = /* @__PURE__ */ Object.freeze({
      __proto__: null,
      UIStrings: UIStrings$y,
      createOverlayForRequest: createOverlayForRequest$1,
      createOverlays: createOverlays$5,
      determineHttp1Requests: determineHttp1Requests2,
      generateInsight: generateInsight$5,
      i18nString: i18nString$j,
      isModernHTTPInsight: isModernHTTPInsight2
    });
    UIStrings$x = {
      title: "Network dependency tree",
      description: "[Avoid chaining critical requests](https://developer.chrome.com/docs/performance/insights/network-dependency-tree) by reducing the length of chains, reducing the download size of resources, or deferring the download of unnecessary resources to improve page load.",
      warningDescription: "Avoid chaining critical requests by reducing the length of chains, reducing the download size of resources, or deferring the download of unnecessary resources to improve page load.",
      noNetworkDependencyTree: "No rendering tasks impacted by network dependencies",
      maxCriticalPathLatency: "Max critical path latency:",
      columnRequest: "Request",
      columnTime: "Time",
      preconnectOriginsTableTitle: "Preconnected origins",
      preconnectOriginsTableDescription: "[preconnect](https://developer.chrome.com/docs/lighthouse/performance/uses-rel-preconnect/) hints help the browser establish a connection earlier in the page load, saving time when the first request for that origin is made. The following are the origins that the page preconnected to.",
      noPreconnectOrigins: "no origins were preconnected",
      tooManyPreconnectLinksWarning: "More than 4 `preconnect` connections were found. These should be used sparingly and only to the most important origins.",
      unusedWarning: "Unused preconnect. Only use `preconnect` for origins that the page is likely to request.",
      crossoriginWarning: "Unused preconnect. Check that the `crossorigin` attribute is used properly.",
      columnSource: "Source",
      noPreconnectCandidates: "No additional origins are good candidates for preconnecting",
      estSavingTableTitle: "Preconnect candidates",
      estSavingTableDescription: "Add [preconnect](https://developer.chrome.com/docs/lighthouse/performance/uses-rel-preconnect/) hints to your most important origins, but try to use no more than 4.",
      columnOrigin: "Origin",
      columnWastedMs: "Est LCP savings"
    };
    str_$w = registerUIStrings("models/trace/insights/NetworkDependencyTree.ts", UIStrings$x);
    i18nString$i = getLocalizedString.bind(void 0, str_$w);
    nonCriticalResourceTypes2 = /* @__PURE__ */ new Set([
      "Image",
      "XHR",
      "Fetch",
      "EventSource"
    ]);
    PRECONNECT_SOCKET_MAX_IDLE_IN_MS2 = Milli2(15e3);
    IGNORE_THRESHOLD_IN_MILLISECONDS2 = Milli2(50);
    TOO_MANY_PRECONNECTS_THRESHOLD2 = 4;
    NetworkDependencyTree = /* @__PURE__ */ Object.freeze({
      __proto__: null,
      TOO_MANY_PRECONNECTS_THRESHOLD: TOO_MANY_PRECONNECTS_THRESHOLD2,
      UIStrings: UIStrings$x,
      createOverlays: createOverlays$4,
      generateInsight: generateInsight$4,
      generatePreconnectCandidates: generatePreconnectCandidates2,
      generatePreconnectedOrigins: generatePreconnectedOrigins2,
      handleLinkResponseHeader: handleLinkResponseHeader2,
      i18nString: i18nString$i,
      isNetworkDependencyTreeInsight: isNetworkDependencyTreeInsight2
    });
    UIStrings$w = {
      title: "Render-blocking requests",
      description: "Requests are blocking the page's initial render, which may delay LCP. [Deferring or inlining](https://developer.chrome.com/docs/performance/insights/render-blocking) can move these network requests out of the critical path.",
      renderBlockingRequest: "Request",
      duration: "Duration",
      noRenderBlocking: "No render-blocking requests for this navigation"
    };
    str_$v = registerUIStrings("models/trace/insights/RenderBlocking.ts", UIStrings$w);
    i18nString$h = getLocalizedString.bind(void 0, str_$v);
    MINIMUM_WASTED_MS2 = 50;
    RenderBlocking = /* @__PURE__ */ Object.freeze({
      __proto__: null,
      UIStrings: UIStrings$w,
      createOverlayForRequest: createOverlayForRequest5,
      createOverlays: createOverlays$3,
      generateInsight: generateInsight$3,
      i18nString: i18nString$h,
      isRenderBlockingInsight: isRenderBlockingInsight2
    });
    UIStrings$v = {
      title: "CSS Selector costs",
      description: "If Recalculate Style costs remain high, selector optimization can reduce them. [Optimize the selectors](https://developer.chrome.com/docs/performance/insights/slow-css-selector) with both high elapsed time and high slow-path %. Simpler selectors, fewer selectors, a smaller DOM, and a shallower DOM will all reduce matching costs.",
      matchAttempts: "Match attempts",
      matchCount: "Match count",
      elapsed: "Elapsed time",
      topSelectors: "Top selectors",
      total: "Total",
      enableSelectorData: "No CSS selector data was found. CSS selector stats need to be enabled in the performance panel settings.",
      topSelectorElapsedTime: "Top selector elapsed time",
      topSelectorMatchAttempt: "Top selector match attempt"
    };
    str_$u = registerUIStrings("models/trace/insights/SlowCSSSelector.ts", UIStrings$v);
    i18nString$g = getLocalizedString.bind(void 0, str_$u);
    slowCSSSelectorThreshold2 = 500;
    SlowCSSSelector = /* @__PURE__ */ Object.freeze({
      __proto__: null,
      UIStrings: UIStrings$v,
      createOverlays: createOverlays$2,
      generateInsight: generateInsight$2,
      i18nString: i18nString$g,
      isSlowCSSSelectorInsight: isSlowCSSSelectorInsight2
    });
    UIStrings$u = {
      title: "3rd parties",
      description: "3rd party code can significantly impact load performance. [Reduce and defer loading of 3rd party code](https://developer.chrome.com/docs/performance/insights/third-parties) to prioritize your page's content.",
      columnThirdParty: "3rd party",
      columnTransferSize: "Transfer size",
      columnMainThreadTime: "Main thread time",
      noThirdParties: "No third parties found"
    };
    str_$t = registerUIStrings("models/trace/insights/ThirdParties.ts", UIStrings$u);
    i18nString$f = getLocalizedString.bind(void 0, str_$t);
    ThirdParties = /* @__PURE__ */ Object.freeze({
      __proto__: null,
      UIStrings: UIStrings$u,
      createOverlays: createOverlays$1,
      createOverlaysForSummary: createOverlaysForSummary2,
      generateInsight: generateInsight$1,
      i18nString: i18nString$f,
      isThirdPartyInsight: isThirdPartyInsight2
    });
    UIStrings$t = {
      title: "Optimize viewport for mobile",
      description: "Tap interactions may be [delayed by up to 300\xA0ms](https://developer.chrome.com/docs/performance/insights/viewport) if the viewport is not optimized for mobile.",
      mobileTapDelayLabel: "Mobile tap delay"
    };
    str_$s = registerUIStrings("models/trace/insights/Viewport.ts", UIStrings$t);
    i18nString$e = getLocalizedString.bind(void 0, str_$s);
    Viewport = /* @__PURE__ */ Object.freeze({
      __proto__: null,
      UIStrings: UIStrings$t,
      createOverlays: createOverlays19,
      generateInsight: generateInsight19,
      i18nString: i18nString$e,
      isViewportInsight: isViewportInsight2
    });
    Models = /* @__PURE__ */ Object.freeze({
      __proto__: null,
      CLSCulprits,
      Cache: Cache3,
      DOMSize,
      DocumentLatency,
      DuplicatedJavaScript,
      FontDisplay,
      ForcedReflow,
      INPBreakdown,
      ImageDelivery,
      LCPBreakdown,
      LCPDiscovery,
      LegacyJavaScript,
      ModernHTTP,
      NetworkDependencyTree,
      RenderBlocking,
      SlowCSSSelector,
      ThirdParties,
      Viewport
    });
    insights = /* @__PURE__ */ Object.freeze({
      __proto__: null,
      Cache: Cache3,
      Common,
      Models,
      ModernHTTP,
      Statistics,
      Types: types$1
    });
    LanternError2 = class extends Error {
    };
    UrlUtils3 = class {
      static rewriteChromeInternalUrl(url) {
        if (!url?.startsWith("chrome://")) {
          return url;
        }
        if (url.endsWith("/")) {
          url = url.replace(/\/$/, "");
        }
        return url.replace(/^chrome:\/\/chrome\//, "chrome://");
      }
      static equalWithExcludedFragments(url1, url2) {
        [url1, url2] = [url1, url2].map(this.rewriteChromeInternalUrl);
        try {
          const urla = new URL(url1);
          urla.hash = "";
          const urlb = new URL(url2);
          urlb.hash = "";
          return urla.href === urlb.href;
        } catch {
          return false;
        }
      }
    };
    INITIAL_CWD2 = 14 * 1024;
    DEFAULT_SERVER_RESPONSE_PERCENTAGE2 = 0.4;
    SERVER_RESPONSE_PERCENTAGE_OF_TTFB2 = {
      Document: 0.9,
      XHR: 0.9,
      Fetch: 0.9
    };
    NetworkAnalyzer2 = class _NetworkAnalyzer {
      static get summary() {
        return "__SUMMARY__";
      }
      static groupByOrigin(records) {
        const grouped = /* @__PURE__ */ new Map();
        records.forEach((item) => {
          const key = item.parsedURL.securityOrigin;
          const group = grouped.get(key) || [];
          group.push(item);
          grouped.set(key, group);
        });
        return grouped;
      }
      static getSummary(values) {
        values.sort((a, b) => a - b);
        let median;
        if (values.length === 0) {
          median = values[0];
        } else if (values.length % 2 === 0) {
          const a = values[Math.floor((values.length - 1) / 2)];
          const b = values[Math.floor((values.length - 1) / 2) + 1];
          median = (a + b) / 2;
        } else {
          median = values[Math.floor((values.length - 1) / 2)];
        }
        return {
          min: values[0],
          max: values[values.length - 1],
          avg: values.reduce((a, b) => a + b, 0) / values.length,
          median
        };
      }
      static summarize(values) {
        const summaryByKey = /* @__PURE__ */ new Map();
        const allEstimates = [];
        for (const [key, estimates] of values) {
          summaryByKey.set(key, _NetworkAnalyzer.getSummary(estimates));
          allEstimates.push(...estimates);
        }
        summaryByKey.set(_NetworkAnalyzer.summary, _NetworkAnalyzer.getSummary(allEstimates));
        return summaryByKey;
      }
      static estimateValueByOrigin(requests, iteratee) {
        const connectionWasReused = _NetworkAnalyzer.estimateIfConnectionWasReused(requests);
        const groupedByOrigin = _NetworkAnalyzer.groupByOrigin(requests);
        const estimates = /* @__PURE__ */ new Map();
        for (const [origin, originRequests] of groupedByOrigin.entries()) {
          let originEstimates = [];
          for (const request3 of originRequests) {
            const timing = request3.timing;
            if (!timing) {
              continue;
            }
            const value = iteratee({
              request: request3,
              timing,
              connectionReused: connectionWasReused.get(request3.requestId)
            });
            if (typeof value !== "undefined") {
              originEstimates = originEstimates.concat(value);
            }
          }
          if (!originEstimates.length) {
            continue;
          }
          estimates.set(origin, originEstimates);
        }
        return estimates;
      }
      static estimateRTTViaConnectionTiming(info) {
        const { timing, connectionReused, request: request3 } = info;
        if (connectionReused) {
          return;
        }
        const { connectStart, sslStart, sslEnd, connectEnd } = timing;
        if (connectEnd >= 0 && connectStart >= 0 && request3.protocol.startsWith("h3")) {
          return connectEnd - connectStart;
        }
        if (sslStart >= 0 && sslEnd >= 0 && sslStart !== connectStart) {
          return [connectEnd - sslStart, sslStart - connectStart];
        }
        if (connectStart >= 0 && connectEnd >= 0) {
          return connectEnd - connectStart;
        }
        return;
      }
      static estimateRTTViaDownloadTiming(info) {
        const { timing, connectionReused, request: request3 } = info;
        if (connectionReused) {
          return;
        }
        if (request3.transferSize <= INITIAL_CWD2) {
          return;
        }
        if (!Number.isFinite(timing.receiveHeadersEnd) || timing.receiveHeadersEnd < 0) {
          return;
        }
        const totalTime = request3.networkEndTime - request3.networkRequestTime;
        const downloadTimeAfterFirstByte = totalTime - timing.receiveHeadersEnd;
        const numberOfRoundTrips = Math.log2(request3.transferSize / INITIAL_CWD2);
        if (numberOfRoundTrips > 5) {
          return;
        }
        return downloadTimeAfterFirstByte / numberOfRoundTrips;
      }
      static estimateRTTViaSendStartTiming(info) {
        const { timing, connectionReused, request: request3 } = info;
        if (connectionReused) {
          return;
        }
        if (!Number.isFinite(timing.sendStart) || timing.sendStart < 0) {
          return;
        }
        let roundTrips = 1;
        if (!request3.protocol.startsWith("h3")) {
          roundTrips += 1;
        }
        if (request3.parsedURL.scheme === "https") {
          roundTrips += 1;
        }
        return timing.sendStart / roundTrips;
      }
      static estimateRTTViaHeadersEndTiming(info) {
        const { timing, connectionReused, request: request3 } = info;
        if (!Number.isFinite(timing.receiveHeadersEnd) || timing.receiveHeadersEnd < 0) {
          return;
        }
        if (!request3.resourceType) {
          return;
        }
        const serverResponseTimePercentage = SERVER_RESPONSE_PERCENTAGE_OF_TTFB2[request3.resourceType] || DEFAULT_SERVER_RESPONSE_PERCENTAGE2;
        const estimatedServerResponseTime = timing.receiveHeadersEnd * serverResponseTimePercentage;
        let roundTrips = 1;
        if (!connectionReused) {
          roundTrips += 1;
          if (!request3.protocol.startsWith("h3")) {
            roundTrips += 1;
          }
          if (request3.parsedURL.scheme === "https") {
            roundTrips += 1;
          }
        }
        return Math.max((timing.receiveHeadersEnd - estimatedServerResponseTime) / roundTrips, 3);
      }
      static estimateResponseTimeByOrigin(records, rttByOrigin) {
        return _NetworkAnalyzer.estimateValueByOrigin(records, ({ request: request3, timing }) => {
          if (request3.serverResponseTime !== void 0) {
            return request3.serverResponseTime;
          }
          if (!Number.isFinite(timing.receiveHeadersEnd) || timing.receiveHeadersEnd < 0) {
            return;
          }
          if (!Number.isFinite(timing.sendEnd) || timing.sendEnd < 0) {
            return;
          }
          const ttfb = timing.receiveHeadersEnd - timing.sendEnd;
          const origin = request3.parsedURL.securityOrigin;
          const rtt = rttByOrigin.get(origin) || rttByOrigin.get(_NetworkAnalyzer.summary) || 0;
          return Math.max(ttfb - rtt, 0);
        });
      }
      static canTrustConnectionInformation(requests) {
        const connectionIdWasStarted = /* @__PURE__ */ new Map();
        for (const request3 of requests) {
          const started = connectionIdWasStarted.get(request3.connectionId) || !request3.connectionReused;
          connectionIdWasStarted.set(request3.connectionId, started);
        }
        if (connectionIdWasStarted.size <= 1) {
          return false;
        }
        return Array.from(connectionIdWasStarted.values()).every((started) => started);
      }
      static estimateIfConnectionWasReused(records, options2) {
        const { forceCoarseEstimates = false } = options2 || {};
        if (!forceCoarseEstimates && _NetworkAnalyzer.canTrustConnectionInformation(records)) {
          return new Map(records.map((request3) => [request3.requestId, Boolean(request3.connectionReused)]));
        }
        const connectionWasReused = /* @__PURE__ */ new Map();
        const groupedByOrigin = _NetworkAnalyzer.groupByOrigin(records);
        for (const originRecords of groupedByOrigin.values()) {
          const earliestReusePossible = originRecords.map((request3) => request3.networkEndTime).reduce((a, b) => Math.min(a, b), Infinity);
          for (const request3 of originRecords) {
            connectionWasReused.set(request3.requestId, request3.networkRequestTime >= earliestReusePossible || request3.protocol === "h2");
          }
          const firstRecord = originRecords.reduce((a, b) => {
            return a.networkRequestTime > b.networkRequestTime ? b : a;
          });
          connectionWasReused.set(firstRecord.requestId, false);
        }
        return connectionWasReused;
      }
      static estimateRTTByOrigin(records, options2) {
        const {
          forceCoarseEstimates = false,
          coarseEstimateMultiplier = 0.3,
          useDownloadEstimates = true,
          useSendStartEstimates = true,
          useHeadersEndEstimates = true
        } = options2 || {};
        const connectionWasReused = _NetworkAnalyzer.estimateIfConnectionWasReused(records);
        const groupedByOrigin = _NetworkAnalyzer.groupByOrigin(records);
        const estimatesByOrigin = /* @__PURE__ */ new Map();
        for (const [origin, originRequests] of groupedByOrigin.entries()) {
          let collectEstimates = function(estimator, multiplier = 1) {
            for (const request3 of originRequests) {
              const timing = request3.timing;
              if (!timing || !request3.transferSize) {
                continue;
              }
              const estimates = estimator({
                request: request3,
                timing,
                connectionReused: connectionWasReused.get(request3.requestId)
              });
              if (estimates === void 0) {
                continue;
              }
              if (!Array.isArray(estimates)) {
                originEstimates.push(estimates * multiplier);
              } else {
                originEstimates.push(...estimates.map((e) => e * multiplier));
              }
            }
          };
          const originEstimates = [];
          if (!forceCoarseEstimates) {
            collectEstimates(this.estimateRTTViaConnectionTiming);
          }
          if (!originEstimates.length) {
            if (useDownloadEstimates) {
              collectEstimates(this.estimateRTTViaDownloadTiming, coarseEstimateMultiplier);
            }
            if (useSendStartEstimates) {
              collectEstimates(this.estimateRTTViaSendStartTiming, coarseEstimateMultiplier);
            }
            if (useHeadersEndEstimates) {
              collectEstimates(this.estimateRTTViaHeadersEndTiming, coarseEstimateMultiplier);
            }
          }
          if (originEstimates.length) {
            estimatesByOrigin.set(origin, originEstimates);
          }
        }
        if (!estimatesByOrigin.size) {
          throw new LanternError2("No timing information available");
        }
        return _NetworkAnalyzer.summarize(estimatesByOrigin);
      }
      static estimateServerResponseTimeByOrigin(records, options2) {
        let rttByOrigin = options2?.rttByOrigin;
        if (!rttByOrigin) {
          rttByOrigin = /* @__PURE__ */ new Map();
          const rttSummaryByOrigin = _NetworkAnalyzer.estimateRTTByOrigin(records, options2);
          for (const [origin, summary] of rttSummaryByOrigin.entries()) {
            rttByOrigin.set(origin, summary.min);
          }
        }
        const estimatesByOrigin = _NetworkAnalyzer.estimateResponseTimeByOrigin(records, rttByOrigin);
        return _NetworkAnalyzer.summarize(estimatesByOrigin);
      }
      static estimateThroughput(records) {
        let totalBytes = 0;
        const timeBoundaries = records.reduce((boundaries, request3) => {
          const scheme = request3.parsedURL?.scheme;
          if (scheme === "data" || request3.failed || !request3.finished || request3.statusCode > 300 || !request3.transferSize) {
            return boundaries;
          }
          totalBytes += request3.transferSize;
          boundaries.push({ time: request3.responseHeadersEndTime / 1e3, isStart: true });
          boundaries.push({ time: request3.networkEndTime / 1e3, isStart: false });
          return boundaries;
        }, []).sort((a, b) => a.time - b.time);
        if (!timeBoundaries.length) {
          return null;
        }
        let inflight = 0;
        let currentStart = 0;
        let totalDuration = 0;
        timeBoundaries.forEach((boundary) => {
          if (boundary.isStart) {
            if (inflight === 0) {
              currentStart = boundary.time;
            }
            inflight++;
          } else {
            inflight--;
            if (inflight === 0) {
              totalDuration += boundary.time - currentStart;
            }
          }
        });
        return totalBytes * 8 / totalDuration;
      }
      static computeRTTAndServerResponseTime(records) {
        const rttByOrigin = /* @__PURE__ */ new Map();
        for (const [origin, summary] of _NetworkAnalyzer.estimateRTTByOrigin(records).entries()) {
          rttByOrigin.set(origin, summary.min);
        }
        const minimumRtt = Math.min(...Array.from(rttByOrigin.values()));
        const responseTimeSummaries = _NetworkAnalyzer.estimateServerResponseTimeByOrigin(records, {
          rttByOrigin
        });
        const additionalRttByOrigin = /* @__PURE__ */ new Map();
        const serverResponseTimeByOrigin = /* @__PURE__ */ new Map();
        for (const [origin, summary] of responseTimeSummaries.entries()) {
          const rttForOrigin = rttByOrigin.get(origin) || minimumRtt;
          additionalRttByOrigin.set(origin, rttForOrigin - minimumRtt);
          serverResponseTimeByOrigin.set(origin, summary.median);
        }
        return {
          rtt: minimumRtt,
          additionalRttByOrigin,
          serverResponseTimeByOrigin
        };
      }
      static analyze(records) {
        const throughput = _NetworkAnalyzer.estimateThroughput(records);
        if (throughput === null) {
          return null;
        }
        return {
          throughput,
          ..._NetworkAnalyzer.computeRTTAndServerResponseTime(records)
        };
      }
      static findResourceForUrl(records, resourceUrl) {
        return records.find((request3) => resourceUrl.startsWith(request3.url) && UrlUtils3.equalWithExcludedFragments(request3.url, resourceUrl));
      }
      static findLastDocumentForUrl(records, resourceUrl) {
        const matchingRequests = records.filter((request3) => request3.resourceType === "Document" && !request3.failed && resourceUrl.startsWith(request3.url) && UrlUtils3.equalWithExcludedFragments(request3.url, resourceUrl));
        return matchingRequests[matchingRequests.length - 1];
      }
      static resolveRedirects(request3) {
        while (request3.redirectDestination) {
          request3 = request3.redirectDestination;
        }
        return request3;
      }
    };
    core = /* @__PURE__ */ Object.freeze({
      __proto__: null,
      LanternError: LanternError2,
      NetworkAnalyzer: NetworkAnalyzer2
    });
    BaseNode2 = class _BaseNode {
      static types = {
        NETWORK: "network",
        CPU: "cpu"
      };
      _id;
      _isMainDocument;
      dependents;
      dependencies;
      constructor(id2) {
        this._id = id2;
        this._isMainDocument = false;
        this.dependents = [];
        this.dependencies = [];
      }
      get id() {
        return this._id;
      }
      get type() {
        throw new LanternError2("Unimplemented");
      }
      get startTime() {
        throw new LanternError2("Unimplemented");
      }
      get endTime() {
        throw new LanternError2("Unimplemented");
      }
      setIsMainDocument(value) {
        this._isMainDocument = value;
      }
      isMainDocument() {
        return this._isMainDocument;
      }
      getDependents() {
        return this.dependents.slice();
      }
      getNumberOfDependents() {
        return this.dependents.length;
      }
      getDependencies() {
        return this.dependencies.slice();
      }
      getNumberOfDependencies() {
        return this.dependencies.length;
      }
      getRootNode() {
        let rootNode = this;
        while (rootNode.dependencies.length) {
          rootNode = rootNode.dependencies[0];
        }
        return rootNode;
      }
      addDependent(node2) {
        node2.addDependency(this);
      }
      addDependency(node2) {
        if (node2 === this) {
          throw new LanternError2("Cannot add dependency on itself");
        }
        if (this.dependencies.includes(node2)) {
          return;
        }
        node2.dependents.push(this);
        this.dependencies.push(node2);
      }
      removeDependent(node2) {
        node2.removeDependency(this);
      }
      removeDependency(node2) {
        if (!this.dependencies.includes(node2)) {
          return;
        }
        const thisIndex = node2.dependents.indexOf(this);
        node2.dependents.splice(thisIndex, 1);
        this.dependencies.splice(this.dependencies.indexOf(node2), 1);
      }
      removeAllDependencies() {
        for (const node2 of this.dependencies.slice()) {
          this.removeDependency(node2);
        }
      }
      isDependentOn(node2) {
        let isDependentOnNode = false;
        this.traverse((currentNode) => {
          if (isDependentOnNode) {
            return;
          }
          isDependentOnNode = currentNode === node2;
        }, (currentNode) => {
          if (isDependentOnNode) {
            return [];
          }
          return currentNode.getDependencies();
        });
        return isDependentOnNode;
      }
      cloneWithoutRelationships() {
        const node2 = new _BaseNode(this.id);
        node2.setIsMainDocument(this._isMainDocument);
        return node2;
      }
      cloneWithRelationships(predicate) {
        const rootNode = this.getRootNode();
        const idsToIncludedClones = /* @__PURE__ */ new Map();
        rootNode.traverse((node2) => {
          if (idsToIncludedClones.has(node2.id)) {
            return;
          }
          if (predicate === void 0) {
            idsToIncludedClones.set(node2.id, node2.cloneWithoutRelationships());
            return;
          }
          if (predicate(node2)) {
            node2.traverse(
              (node3) => idsToIncludedClones.set(node3.id, node3.cloneWithoutRelationships()),
              (node3) => node3.dependencies.filter((parent) => !idsToIncludedClones.has(parent.id))
            );
          }
        });
        rootNode.traverse((originalNode) => {
          const clonedNode = idsToIncludedClones.get(originalNode.id);
          if (!clonedNode) {
            return;
          }
          for (const dependency of originalNode.dependencies) {
            const clonedDependency = idsToIncludedClones.get(dependency.id);
            if (!clonedDependency) {
              throw new LanternError2("Dependency somehow not cloned");
            }
            clonedNode.addDependency(clonedDependency);
          }
        });
        const clonedThisNode = idsToIncludedClones.get(this.id);
        if (!clonedThisNode) {
          throw new LanternError2("Cloned graph missing node");
        }
        return clonedThisNode;
      }
      traverse(callback, getNextNodes) {
        for (const { node: node2, traversalPath } of this.traverseGenerator(getNextNodes)) {
          callback(node2, traversalPath);
        }
      }
      *traverseGenerator(getNextNodes) {
        if (!getNextNodes) {
          getNextNodes = (node2) => node2.getDependents();
        }
        const queue = [[this]];
        const visited = /* @__PURE__ */ new Set([this.id]);
        while (queue.length) {
          const traversalPath = queue.shift();
          const node2 = traversalPath[0];
          yield { node: node2, traversalPath };
          for (const nextNode of getNextNodes(node2)) {
            if (visited.has(nextNode.id)) {
              continue;
            }
            visited.add(nextNode.id);
            queue.push([nextNode, ...traversalPath]);
          }
        }
      }
      static findCycle(node2, direction = "both") {
        if (direction === "both") {
          return _BaseNode.findCycle(node2, "dependents") || _BaseNode.findCycle(node2, "dependencies");
        }
        const visited = /* @__PURE__ */ new Set();
        const currentPath = [];
        const toVisit = [node2];
        const depthAdded = /* @__PURE__ */ new Map([[node2, 0]]);
        while (toVisit.length) {
          const currentNode = toVisit.pop();
          if (currentPath.includes(currentNode)) {
            return currentPath;
          }
          if (visited.has(currentNode)) {
            continue;
          }
          while (currentPath.length > depthAdded.get(currentNode)) {
            currentPath.pop();
          }
          visited.add(currentNode);
          currentPath.push(currentNode);
          const nodesToExplore = direction === "dependents" ? currentNode.dependents : currentNode.dependencies;
          for (const nextNode of nodesToExplore) {
            if (toVisit.includes(nextNode)) {
              continue;
            }
            toVisit.push(nextNode);
            depthAdded.set(nextNode, currentPath.length);
          }
        }
        return null;
      }
      canDependOn(node2) {
        return node2.startTime <= this.startTime;
      }
    };
    CPUNode2 = class _CPUNode extends BaseNode2 {
      _event;
      _childEvents;
      correctedEndTs;
      constructor(parentEvent, childEvents = [], correctedEndTs) {
        const nodeId = `${parentEvent.tid}.${parentEvent.ts}`;
        super(nodeId);
        this._event = parentEvent;
        this._childEvents = childEvents;
        this.correctedEndTs = correctedEndTs;
      }
      get type() {
        return BaseNode2.types.CPU;
      }
      get startTime() {
        return this._event.ts;
      }
      get endTime() {
        if (this.correctedEndTs) {
          return this.correctedEndTs;
        }
        return this._event.ts + this._event.dur;
      }
      get duration() {
        return this.endTime - this.startTime;
      }
      get event() {
        return this._event;
      }
      get childEvents() {
        return this._childEvents;
      }
      didPerformLayout() {
        return this._childEvents.some((evt) => evt.name === "Layout");
      }
      getEvaluateScriptURLs() {
        const urls = /* @__PURE__ */ new Set();
        for (const event of this._childEvents) {
          if (event.name !== "EvaluateScript") {
            continue;
          }
          if (!event.args.data?.url) {
            continue;
          }
          urls.add(event.args.data.url);
        }
        return urls;
      }
      cloneWithoutRelationships() {
        return new _CPUNode(this._event, this._childEvents, this.correctedEndTs);
      }
    };
    NON_NETWORK_SCHEMES4 = [
      "blob",
      "data",
      "intent",
      "file",
      "filesystem",
      "chrome-extension"
    ];
    NetworkNode2 = class _NetworkNode extends BaseNode2 {
      _request;
      constructor(networkRequest) {
        super(networkRequest.requestId);
        this._request = networkRequest;
      }
      get type() {
        return BaseNode2.types.NETWORK;
      }
      get startTime() {
        return this._request.rendererStartTime * 1e3;
      }
      get endTime() {
        return this._request.networkEndTime * 1e3;
      }
      get rawRequest() {
        return this._request.rawRequest;
      }
      get request() {
        return this._request;
      }
      get initiatorType() {
        return this._request.initiator.type;
      }
      get fromDiskCache() {
        return Boolean(this._request.fromDiskCache);
      }
      get isNonNetworkProtocol() {
        return isNonNetworkProtocol2(this.request.protocol) || isNonNetworkProtocol2(this.request.parsedURL.scheme);
      }
      get isConnectionless() {
        return this.fromDiskCache || this.isNonNetworkProtocol;
      }
      hasRenderBlockingPriority() {
        const priority = this._request.priority;
        const isScript = this._request.resourceType === "Script";
        const isDocument = this._request.resourceType === "Document";
        const isBlockingScript = priority === "High" && isScript;
        const isBlockingHtmlImport = priority === "High" && isDocument;
        return priority === "VeryHigh" || isBlockingScript || isBlockingHtmlImport;
      }
      cloneWithoutRelationships() {
        const node2 = new _NetworkNode(this._request);
        node2.setIsMainDocument(this._isMainDocument);
        return node2;
      }
    };
    SCHEDULABLE_TASK_TITLE_LH3 = "RunTask";
    SCHEDULABLE_TASK_TITLE_ALT13 = "ThreadControllerImpl::RunTask";
    SCHEDULABLE_TASK_TITLE_ALT23 = "ThreadControllerImpl::DoWork";
    SCHEDULABLE_TASK_TITLE_ALT33 = "TaskQueueManager::ProcessTaskFromWorkQueue";
    SIGNIFICANT_DUR_THRESHOLD_MS2 = 10;
    IGNORED_MIME_TYPES_REGEX2 = /^video/;
    PageDependencyGraph2 = class _PageDependencyGraph {
      static getNetworkInitiators(request3) {
        if (!request3.initiator) {
          return [];
        }
        if (request3.initiator.url) {
          return [request3.initiator.url];
        }
        if (request3.initiator.type === "script") {
          const scriptURLs = /* @__PURE__ */ new Set();
          let stack = request3.initiator.stack;
          while (stack) {
            const callFrames = stack.callFrames || [];
            for (const frame of callFrames) {
              if (frame.url) {
                scriptURLs.add(frame.url);
              }
            }
            stack = stack.parent;
          }
          return Array.from(scriptURLs);
        }
        return [];
      }
      static getNetworkNodeOutput(networkRequests) {
        const nodes = [];
        const idToNodeMap = /* @__PURE__ */ new Map();
        const urlToNodeMap = /* @__PURE__ */ new Map();
        const frameIdToNodeMap = /* @__PURE__ */ new Map();
        networkRequests.forEach((request3) => {
          if (IGNORED_MIME_TYPES_REGEX2.test(request3.mimeType)) {
            return;
          }
          if (request3.fromWorker) {
            return;
          }
          while (idToNodeMap.has(request3.requestId)) {
            request3.requestId += ":duplicate";
          }
          const node2 = new NetworkNode2(request3);
          nodes.push(node2);
          const urlList = urlToNodeMap.get(request3.url) || [];
          urlList.push(node2);
          idToNodeMap.set(request3.requestId, node2);
          urlToNodeMap.set(request3.url, urlList);
          if (request3.frameId && request3.resourceType === "Document" && request3.documentURL === request3.url) {
            const value = frameIdToNodeMap.has(request3.frameId) ? null : node2;
            frameIdToNodeMap.set(request3.frameId, value);
          }
        });
        return { nodes, idToNodeMap, urlToNodeMap, frameIdToNodeMap };
      }
      static isScheduleableTask(evt) {
        return evt.name === SCHEDULABLE_TASK_TITLE_LH3 || evt.name === SCHEDULABLE_TASK_TITLE_ALT13 || evt.name === SCHEDULABLE_TASK_TITLE_ALT23 || evt.name === SCHEDULABLE_TASK_TITLE_ALT33;
      }
      static assertHasToplevelEvents(events) {
        const hasToplevelTask = events.some(this.isScheduleableTask);
        if (!hasToplevelTask) {
          throw new LanternError2("Could not find any top level events");
        }
      }
      static getCPUNodes(mainThreadEvents) {
        const nodes = [];
        let i = 0;
        _PageDependencyGraph.assertHasToplevelEvents(mainThreadEvents);
        while (i < mainThreadEvents.length) {
          const evt = mainThreadEvents[i];
          i++;
          if (!_PageDependencyGraph.isScheduleableTask(evt) || !evt.dur) {
            continue;
          }
          let correctedEndTs = void 0;
          const children = [];
          for (const endTime = evt.ts + evt.dur; i < mainThreadEvents.length && mainThreadEvents[i].ts < endTime; i++) {
            const event = mainThreadEvents[i];
            if (_PageDependencyGraph.isScheduleableTask(event) && event.dur) {
              correctedEndTs = event.ts - 1;
              break;
            }
            children.push(event);
          }
          nodes.push(new CPUNode2(evt, children, correctedEndTs));
        }
        return nodes;
      }
      static linkNetworkNodes(rootNode, networkNodeOutput) {
        networkNodeOutput.nodes.forEach((node2) => {
          const directInitiatorRequest = node2.request.initiatorRequest || rootNode.request;
          const directInitiatorNode = networkNodeOutput.idToNodeMap.get(directInitiatorRequest.requestId) || rootNode;
          const canDependOnInitiator = !directInitiatorNode.isDependentOn(node2) && node2.canDependOn(directInitiatorNode);
          const initiators = _PageDependencyGraph.getNetworkInitiators(node2.request);
          if (initiators.length) {
            initiators.forEach((initiator) => {
              const parentCandidates = networkNodeOutput.urlToNodeMap.get(initiator) || [];
              if (parentCandidates.length === 1 && parentCandidates[0].startTime <= node2.startTime && !parentCandidates[0].isDependentOn(node2)) {
                node2.addDependency(parentCandidates[0]);
              } else if (canDependOnInitiator) {
                directInitiatorNode.addDependent(node2);
              }
            });
          } else if (canDependOnInitiator) {
            directInitiatorNode.addDependent(node2);
          }
          if (node2 !== rootNode && node2.getDependencies().length === 0 && node2.canDependOn(rootNode)) {
            node2.addDependency(rootNode);
          }
          if (!node2.request.redirects) {
            return;
          }
          const redirects = [...node2.request.redirects, node2.request];
          for (let i = 1; i < redirects.length; i++) {
            const redirectNode = networkNodeOutput.idToNodeMap.get(redirects[i - 1].requestId);
            const actualNode = networkNodeOutput.idToNodeMap.get(redirects[i].requestId);
            if (actualNode && redirectNode) {
              actualNode.addDependency(redirectNode);
            }
          }
        });
      }
      static linkCPUNodes(rootNode, networkNodeOutput, cpuNodes) {
        const linkableResourceTypes = /* @__PURE__ */ new Set([
          "XHR",
          "Fetch",
          "Script"
        ]);
        function addDependentNetworkRequest(cpuNode, reqId) {
          const networkNode = networkNodeOutput.idToNodeMap.get(reqId);
          if (!networkNode || networkNode.startTime <= cpuNode.startTime) {
            return;
          }
          const { request: request3 } = networkNode;
          const resourceType = request3.resourceType || request3.redirectDestination?.resourceType;
          if (!linkableResourceTypes.has(resourceType)) {
            return;
          }
          cpuNode.addDependent(networkNode);
        }
        function addDependencyOnFrame(cpuNode, frameId) {
          if (!frameId) {
            return;
          }
          const networkNode = networkNodeOutput.frameIdToNodeMap.get(frameId);
          if (!networkNode) {
            return;
          }
          if (networkNode.startTime >= cpuNode.startTime) {
            return;
          }
          cpuNode.addDependency(networkNode);
        }
        function addDependencyOnUrl(cpuNode, url) {
          if (!url) {
            return;
          }
          const minimumAllowableTimeSinceNetworkNodeEnd = -100 * 1e3;
          const candidates = networkNodeOutput.urlToNodeMap.get(url) || [];
          let minCandidate = null;
          let minDistance = Infinity;
          for (const candidate of candidates) {
            if (cpuNode.startTime <= candidate.startTime) {
              return;
            }
            const distance = cpuNode.startTime - candidate.endTime;
            if (distance >= minimumAllowableTimeSinceNetworkNodeEnd && distance < minDistance) {
              minCandidate = candidate;
              minDistance = distance;
            }
          }
          if (!minCandidate) {
            return;
          }
          cpuNode.addDependency(minCandidate);
        }
        const timers = /* @__PURE__ */ new Map();
        for (const node2 of cpuNodes) {
          for (const evt of node2.childEvents) {
            if (!evt.args.data) {
              continue;
            }
            const argsUrl = evt.args.data.url;
            const stackTraceUrls = (evt.args.data.stackTrace || []).map((l) => l.url).filter(Boolean);
            switch (evt.name) {
              case "TimerInstall":
                timers.set(evt.args.data.timerId, node2);
                stackTraceUrls.forEach((url) => addDependencyOnUrl(node2, url));
                break;
              case "TimerFire": {
                const installer = timers.get(evt.args.data.timerId);
                if (!installer || installer.endTime > node2.startTime) {
                  break;
                }
                installer.addDependent(node2);
                break;
              }
              case "InvalidateLayout":
              case "ScheduleStyleRecalculation":
                addDependencyOnFrame(node2, evt.args.data.frame);
                stackTraceUrls.forEach((url) => addDependencyOnUrl(node2, url));
                break;
              case "EvaluateScript":
                addDependencyOnFrame(node2, evt.args.data.frame);
                addDependencyOnUrl(node2, argsUrl);
                stackTraceUrls.forEach((url) => addDependencyOnUrl(node2, url));
                break;
              case "XHRReadyStateChange":
                if (evt.args.data.readyState !== 4) {
                  break;
                }
                addDependencyOnUrl(node2, argsUrl);
                stackTraceUrls.forEach((url) => addDependencyOnUrl(node2, url));
                break;
              case "FunctionCall":
              case "v8.compile":
                addDependencyOnFrame(node2, evt.args.data.frame);
                addDependencyOnUrl(node2, argsUrl);
                break;
              case "ParseAuthorStyleSheet":
                addDependencyOnFrame(node2, evt.args.data.frame);
                addDependencyOnUrl(node2, evt.args.data.styleSheetUrl);
                break;
              case "ResourceSendRequest":
                addDependencyOnFrame(node2, evt.args.data.frame);
                addDependentNetworkRequest(node2, evt.args.data.requestId);
                stackTraceUrls.forEach((url) => addDependencyOnUrl(node2, url));
                break;
            }
          }
          if (node2.getNumberOfDependencies() === 0 && node2.canDependOn(rootNode)) {
            node2.addDependency(rootNode);
          }
        }
        const minimumEvtDur = SIGNIFICANT_DUR_THRESHOLD_MS2 * 1e3;
        let foundFirstLayout = false;
        let foundFirstPaint = false;
        let foundFirstParse = false;
        for (const node2 of cpuNodes) {
          let isFirst = false;
          if (!foundFirstLayout && node2.childEvents.some((evt) => evt.name === "Layout")) {
            isFirst = foundFirstLayout = true;
          }
          if (!foundFirstPaint && node2.childEvents.some((evt) => evt.name === "Paint")) {
            isFirst = foundFirstPaint = true;
          }
          if (!foundFirstParse && node2.childEvents.some((evt) => evt.name === "ParseHTML")) {
            isFirst = foundFirstParse = true;
          }
          if (isFirst || node2.duration >= minimumEvtDur) {
            continue;
          }
          if (node2.getNumberOfDependencies() === 1 || node2.getNumberOfDependents() <= 1) {
            _PageDependencyGraph.pruneNode(node2);
          }
        }
      }
      static pruneNode(node2) {
        const dependencies2 = node2.getDependencies();
        const dependents = node2.getDependents();
        for (const dependency of dependencies2) {
          node2.removeDependency(dependency);
          for (const dependent of dependents) {
            dependency.addDependent(dependent);
          }
        }
        for (const dependent of dependents) {
          node2.removeDependent(dependent);
        }
      }
      static debugNormalizeRequests(lanternRequests) {
        for (const request3 of lanternRequests) {
          request3.rendererStartTime = Math.round(request3.rendererStartTime * 1e3) / 1e3;
          request3.networkRequestTime = Math.round(request3.networkRequestTime * 1e3) / 1e3;
          request3.responseHeadersEndTime = Math.round(request3.responseHeadersEndTime * 1e3) / 1e3;
          request3.networkEndTime = Math.round(request3.networkEndTime * 1e3) / 1e3;
        }
        for (const r of lanternRequests) {
          delete r.rawRequest;
          if (r.initiatorRequest) {
            r.initiatorRequest = { id: r.initiatorRequest.requestId };
          }
          if (r.redirectDestination) {
            r.redirectDestination = { id: r.redirectDestination.requestId };
          }
          if (r.redirectSource) {
            r.redirectSource = { id: r.redirectSource.requestId };
          }
          if (r.redirects) {
            r.redirects = r.redirects.map((r2) => r2.requestId);
          }
        }
        const requests = lanternRequests.map((r) => ({
          requestId: r.requestId,
          connectionId: r.connectionId,
          connectionReused: r.connectionReused,
          url: r.url,
          protocol: r.protocol,
          parsedURL: r.parsedURL,
          documentURL: r.documentURL,
          rendererStartTime: r.rendererStartTime,
          networkRequestTime: r.networkRequestTime,
          responseHeadersEndTime: r.responseHeadersEndTime,
          networkEndTime: r.networkEndTime,
          transferSize: r.transferSize,
          resourceSize: r.resourceSize,
          fromDiskCache: r.fromDiskCache,
          fromMemoryCache: r.fromMemoryCache,
          finished: r.finished,
          statusCode: r.statusCode,
          redirectSource: r.redirectSource,
          redirectDestination: r.redirectDestination,
          redirects: r.redirects,
          failed: r.failed,
          initiator: r.initiator,
          timing: r.timing ? {
            requestTime: r.timing.requestTime,
            proxyStart: r.timing.proxyStart,
            proxyEnd: r.timing.proxyEnd,
            dnsStart: r.timing.dnsStart,
            dnsEnd: r.timing.dnsEnd,
            connectStart: r.timing.connectStart,
            connectEnd: r.timing.connectEnd,
            sslStart: r.timing.sslStart,
            sslEnd: r.timing.sslEnd,
            workerStart: r.timing.workerStart,
            workerReady: r.timing.workerReady,
            workerFetchStart: r.timing.workerFetchStart,
            workerRespondWithSettled: r.timing.workerRespondWithSettled,
            sendStart: r.timing.sendStart,
            sendEnd: r.timing.sendEnd,
            pushStart: r.timing.pushStart,
            pushEnd: r.timing.pushEnd,
            receiveHeadersStart: r.timing.receiveHeadersStart,
            receiveHeadersEnd: r.timing.receiveHeadersEnd
          } : r.timing,
          resourceType: r.resourceType,
          mimeType: r.mimeType,
          priority: r.priority,
          initiatorRequest: r.initiatorRequest,
          frameId: r.frameId,
          fromWorker: r.fromWorker,
          isLinkPreload: r.isLinkPreload,
          serverResponseTime: r.serverResponseTime
        })).filter((r) => !r.fromWorker);
        const debug2 = requests;
        console.log(debug2);
      }
      static createGraph(mainThreadEvents, networkRequests, url) {
        const networkNodeOutput = _PageDependencyGraph.getNetworkNodeOutput(networkRequests);
        const cpuNodes = _PageDependencyGraph.getCPUNodes(mainThreadEvents);
        const { requestedUrl, mainDocumentUrl } = url;
        if (!requestedUrl) {
          throw new LanternError2("requestedUrl is required to get the root request");
        }
        if (!mainDocumentUrl) {
          throw new LanternError2("mainDocumentUrl is required to get the main resource");
        }
        const rootRequest = NetworkAnalyzer2.findResourceForUrl(networkRequests, requestedUrl);
        if (!rootRequest) {
          throw new LanternError2("rootRequest not found");
        }
        const rootNode = networkNodeOutput.idToNodeMap.get(rootRequest.requestId);
        if (!rootNode) {
          throw new LanternError2("rootNode not found");
        }
        const mainDocumentRequest = NetworkAnalyzer2.findLastDocumentForUrl(networkRequests, mainDocumentUrl);
        if (!mainDocumentRequest) {
          throw new LanternError2("mainDocumentRequest not found");
        }
        const mainDocumentNode = networkNodeOutput.idToNodeMap.get(mainDocumentRequest.requestId);
        if (!mainDocumentNode) {
          throw new LanternError2("mainDocumentNode not found");
        }
        _PageDependencyGraph.linkNetworkNodes(rootNode, networkNodeOutput);
        _PageDependencyGraph.linkCPUNodes(rootNode, networkNodeOutput, cpuNodes);
        mainDocumentNode.setIsMainDocument(true);
        if (NetworkNode2.findCycle(rootNode)) {
          throw new LanternError2("Invalid dependency graph created, cycle detected");
        }
        return rootNode;
      }
      static printGraph(rootNode, widthInCharacters = 80) {
        function padRight(str, target, padChar = " ") {
          return str + padChar.repeat(Math.max(target - str.length, 0));
        }
        const nodes = [];
        rootNode.traverse((node2) => nodes.push(node2));
        nodes.sort((a, b) => a.startTime - b.startTime);
        const nodeToLabel = /* @__PURE__ */ new Map();
        rootNode.traverse((node2) => {
          const ascii = 65 + nodeToLabel.size;
          let label;
          if (ascii > 90) {
            label = `Z${ascii - 90}`;
          } else {
            label = String.fromCharCode(ascii);
          }
          nodeToLabel.set(node2, label);
        });
        const min = nodes[0].startTime;
        const max = nodes.reduce((max2, node2) => Math.max(max2, node2.endTime), 0);
        const totalTime = max - min;
        const timePerCharacter = totalTime / widthInCharacters;
        nodes.forEach((node2) => {
          const offset = Math.round((node2.startTime - min) / timePerCharacter);
          const length = Math.ceil((node2.endTime - node2.startTime) / timePerCharacter);
          const bar = padRight("", offset) + padRight("", length, "=");
          const displayName = node2.request ? node2.request.url : node2.type;
          console.log(padRight(bar, widthInCharacters), `| ${displayName.slice(0, 50)}`);
        });
        console.log();
        nodes.forEach((node2) => {
          const displayName = node2.request ? node2.request.url : node2.type;
          console.log(nodeToLabel.get(node2), displayName.slice(0, widthInCharacters - 5));
          for (const child of node2.dependents) {
            const displayName2 = child.request ? child.request.url : child.type;
            console.log("  ->", nodeToLabel.get(child), displayName2.slice(0, widthInCharacters - 10));
          }
          console.log();
        });
        const cyclePath = NetworkNode2.findCycle(rootNode);
        console.log("Cycle?", cyclePath ? "yes" : "no");
        if (cyclePath) {
          const path14 = [...cyclePath];
          path14.push(path14[0]);
          console.log(path14.map((node2) => nodeToLabel.get(node2)).join(" -> "));
        }
      }
    };
    graph2 = /* @__PURE__ */ Object.freeze({
      __proto__: null,
      BaseNode: BaseNode2,
      CPUNode: CPUNode2,
      NetworkNode: NetworkNode2,
      PageDependencyGraph: PageDependencyGraph2
    });
    Metric2 = class {
      static getScriptUrls(dependencyGraph, treatNodeAsRenderBlocking) {
        const scriptUrls = /* @__PURE__ */ new Set();
        dependencyGraph.traverse((node2) => {
          if (node2.type !== BaseNode2.types.NETWORK) {
            return;
          }
          if (node2.request.resourceType !== "Script") {
            return;
          }
          if (treatNodeAsRenderBlocking?.(node2)) {
            scriptUrls.add(node2.request.url);
          }
        });
        return scriptUrls;
      }
      static get coefficients() {
        throw new LanternError2("coefficients unimplemented!");
      }
      static getScaledCoefficients(_rttMs) {
        return this.coefficients;
      }
      static getOptimisticGraph(_dependencyGraph, _processedNavigation) {
        throw new LanternError2("Optimistic graph unimplemented!");
      }
      static getPessimisticGraph(_dependencyGraph, _processedNavigation) {
        throw new LanternError2("Pessmistic graph unimplemented!");
      }
      static getEstimateFromSimulation(simulationResult, _extras) {
        return simulationResult;
      }
      static compute(data32, extras2) {
        const { simulator, graph: graph3, processedNavigation } = data32;
        const metricName = this.name.replace("Lantern", "");
        const optimisticGraph = this.getOptimisticGraph(graph3, processedNavigation);
        const pessimisticGraph = this.getPessimisticGraph(graph3, processedNavigation);
        let simulateOptions = { label: `optimistic${metricName}` };
        const optimisticSimulation = simulator.simulate(optimisticGraph, simulateOptions);
        simulateOptions = { label: `pessimistic${metricName}` };
        const pessimisticSimulation = simulator.simulate(pessimisticGraph, simulateOptions);
        const optimisticEstimate = this.getEstimateFromSimulation(optimisticSimulation, { ...extras2, optimistic: true });
        const pessimisticEstimate = this.getEstimateFromSimulation(pessimisticSimulation, { ...extras2, optimistic: false });
        const coefficients = this.getScaledCoefficients(simulator.rtt);
        const interceptMultiplier = coefficients.intercept > 0 ? Math.min(1, optimisticEstimate.timeInMs / 1e3) : 1;
        const timing = coefficients.intercept * interceptMultiplier + coefficients.optimistic * optimisticEstimate.timeInMs + coefficients.pessimistic * pessimisticEstimate.timeInMs;
        return {
          timing,
          optimisticEstimate,
          pessimisticEstimate,
          optimisticGraph,
          pessimisticGraph
        };
      }
    };
    FirstContentfulPaint2 = class extends Metric2 {
      static get coefficients() {
        return {
          intercept: 0,
          optimistic: 0.5,
          pessimistic: 0.5
        };
      }
      static getRenderBlockingNodeData(graph$12, { cutoffTimestamp, treatNodeAsRenderBlocking, additionalCpuNodesToTreatAsRenderBlocking }) {
        const scriptUrlToNodeMap = /* @__PURE__ */ new Map();
        const cpuNodes = [];
        graph$12.traverse((node2) => {
          if (node2.type === BaseNode2.types.CPU) {
            if (node2.startTime <= cutoffTimestamp) {
              cpuNodes.push(node2);
            }
            const scriptUrls = node2.getEvaluateScriptURLs();
            for (const url of scriptUrls) {
              const existing = scriptUrlToNodeMap.get(url) || node2;
              scriptUrlToNodeMap.set(url, node2.startTime < existing.startTime ? node2 : existing);
            }
          }
        });
        cpuNodes.sort((a, b) => a.startTime - b.startTime);
        const possiblyRenderBlockingScriptUrls = Metric2.getScriptUrls(graph$12, (node2) => {
          return node2.endTime <= cutoffTimestamp && treatNodeAsRenderBlocking(node2);
        });
        const definitelyNotRenderBlockingScriptUrls = /* @__PURE__ */ new Set();
        const renderBlockingCpuNodeIds = /* @__PURE__ */ new Set();
        for (const url of possiblyRenderBlockingScriptUrls) {
          const cpuNodeForUrl = scriptUrlToNodeMap.get(url);
          if (!cpuNodeForUrl) {
            continue;
          }
          if (cpuNodes.includes(cpuNodeForUrl)) {
            renderBlockingCpuNodeIds.add(cpuNodeForUrl.id);
            continue;
          }
          definitelyNotRenderBlockingScriptUrls.add(url);
        }
        const firstLayout = cpuNodes.find((node2) => node2.didPerformLayout());
        if (firstLayout) {
          renderBlockingCpuNodeIds.add(firstLayout.id);
        }
        const firstPaint = cpuNodes.find((node2) => node2.childEvents.some((e) => e.name === "Paint"));
        if (firstPaint) {
          renderBlockingCpuNodeIds.add(firstPaint.id);
        }
        const firstParse = cpuNodes.find((node2) => node2.childEvents.some((e) => e.name === "ParseHTML"));
        if (firstParse) {
          renderBlockingCpuNodeIds.add(firstParse.id);
        }
        if (additionalCpuNodesToTreatAsRenderBlocking) {
          cpuNodes.filter(additionalCpuNodesToTreatAsRenderBlocking).forEach((node2) => renderBlockingCpuNodeIds.add(node2.id));
        }
        return {
          definitelyNotRenderBlockingScriptUrls,
          renderBlockingCpuNodeIds
        };
      }
      static getFirstPaintBasedGraph(dependencyGraph, { cutoffTimestamp, treatNodeAsRenderBlocking, additionalCpuNodesToTreatAsRenderBlocking }) {
        const rbData = this.getRenderBlockingNodeData(dependencyGraph, {
          cutoffTimestamp,
          treatNodeAsRenderBlocking,
          additionalCpuNodesToTreatAsRenderBlocking
        });
        const { definitelyNotRenderBlockingScriptUrls, renderBlockingCpuNodeIds } = rbData;
        return dependencyGraph.cloneWithRelationships((node2) => {
          if (node2.type === BaseNode2.types.NETWORK) {
            const endedAfterPaint = node2.endTime > cutoffTimestamp || node2.startTime > cutoffTimestamp;
            if (endedAfterPaint && !node2.isMainDocument()) {
              return false;
            }
            const url = node2.request.url;
            if (definitelyNotRenderBlockingScriptUrls.has(url)) {
              return false;
            }
            return treatNodeAsRenderBlocking(node2);
          }
          return renderBlockingCpuNodeIds.has(node2.id);
        });
      }
      static getOptimisticGraph(dependencyGraph, processedNavigation) {
        return this.getFirstPaintBasedGraph(dependencyGraph, {
          cutoffTimestamp: processedNavigation.timestamps.firstContentfulPaint,
          treatNodeAsRenderBlocking: (node2) => node2.hasRenderBlockingPriority() && node2.initiatorType !== "script"
        });
      }
      static getPessimisticGraph(dependencyGraph, processedNavigation) {
        return this.getFirstPaintBasedGraph(dependencyGraph, {
          cutoffTimestamp: processedNavigation.timestamps.firstContentfulPaint,
          treatNodeAsRenderBlocking: (node2) => node2.hasRenderBlockingPriority()
        });
      }
    };
    CRITICAL_LONG_TASK_THRESHOLD2 = 20;
    Interactive2 = class _Interactive extends Metric2 {
      static get coefficients() {
        return {
          intercept: 0,
          optimistic: 0.45,
          pessimistic: 0.55
        };
      }
      static getOptimisticGraph(dependencyGraph) {
        const minimumCpuTaskDuration = CRITICAL_LONG_TASK_THRESHOLD2 * 1e3;
        return dependencyGraph.cloneWithRelationships((node2) => {
          if (node2.type === BaseNode2.types.CPU) {
            return node2.duration > minimumCpuTaskDuration;
          }
          const isImage = node2.request.resourceType === "Image";
          const isScript = node2.request.resourceType === "Script";
          return !isImage && (isScript || node2.request.priority === "High" || node2.request.priority === "VeryHigh");
        });
      }
      static getPessimisticGraph(dependencyGraph) {
        return dependencyGraph;
      }
      static getEstimateFromSimulation(simulationResult, extras2) {
        if (!extras2.lcpResult) {
          throw new LanternError2("missing lcpResult");
        }
        const lastTaskAt = _Interactive.getLastLongTaskEndTime(simulationResult.nodeTimings);
        const minimumTime = extras2.optimistic ? extras2.lcpResult.optimisticEstimate.timeInMs : extras2.lcpResult.pessimisticEstimate.timeInMs;
        return {
          timeInMs: Math.max(minimumTime, lastTaskAt),
          nodeTimings: simulationResult.nodeTimings
        };
      }
      static compute(data32, extras2) {
        const lcpResult = extras2?.lcpResult;
        if (!lcpResult) {
          throw new LanternError2("LCP is required to calculate the Interactive metric");
        }
        const metricResult = super.compute(data32, extras2);
        metricResult.timing = Math.max(metricResult.timing, lcpResult.timing);
        return metricResult;
      }
      static getLastLongTaskEndTime(nodeTimings, duration2 = 50) {
        return Array.from(nodeTimings.entries()).filter(([node2, timing]) => {
          if (node2.type !== BaseNode2.types.CPU) {
            return false;
          }
          return timing.duration > duration2;
        }).map(([_, timing]) => timing.endTime).reduce((max, x) => Math.max(max || 0, x || 0), 0);
      }
    };
    LargestContentfulPaint2 = class _LargestContentfulPaint extends Metric2 {
      static get coefficients() {
        return {
          intercept: 0,
          optimistic: 0.5,
          pessimistic: 0.5
        };
      }
      static isNotLowPriorityImageNode(node2) {
        if (node2.type !== "network") {
          return true;
        }
        const isImage = node2.request.resourceType === "Image";
        const isLowPriority = node2.request.priority === "Low" || node2.request.priority === "VeryLow";
        return !isImage || !isLowPriority;
      }
      static getOptimisticGraph(dependencyGraph, processedNavigation) {
        const lcp = processedNavigation.timestamps.largestContentfulPaint;
        if (!lcp) {
          throw new LanternError2("NO_LCP");
        }
        return FirstContentfulPaint2.getFirstPaintBasedGraph(dependencyGraph, {
          cutoffTimestamp: lcp,
          treatNodeAsRenderBlocking: _LargestContentfulPaint.isNotLowPriorityImageNode
        });
      }
      static getPessimisticGraph(dependencyGraph, processedNavigation) {
        const lcp = processedNavigation.timestamps.largestContentfulPaint;
        if (!lcp) {
          throw new LanternError2("NO_LCP");
        }
        return FirstContentfulPaint2.getFirstPaintBasedGraph(dependencyGraph, {
          cutoffTimestamp: lcp,
          treatNodeAsRenderBlocking: (_) => true,
          additionalCpuNodesToTreatAsRenderBlocking: (node2) => node2.didPerformLayout()
        });
      }
      static getEstimateFromSimulation(simulationResult) {
        const nodeTimesNotOffscreenImages = Array.from(simulationResult.nodeTimings.entries()).filter((entry) => _LargestContentfulPaint.isNotLowPriorityImageNode(entry[0])).map((entry) => entry[1].endTime);
        return {
          timeInMs: Math.max(...nodeTimesNotOffscreenImages),
          nodeTimings: simulationResult.nodeTimings
        };
      }
      static compute(data32, extras2) {
        const fcpResult = extras2?.fcpResult;
        if (!fcpResult) {
          throw new LanternError2("FCP is required to calculate the LCP metric");
        }
        const metricResult = super.compute(data32, extras2);
        metricResult.timing = Math.max(metricResult.timing, fcpResult.timing);
        return metricResult;
      }
    };
    MaxPotentialFID2 = class _MaxPotentialFID extends Metric2 {
      static get coefficients() {
        return {
          intercept: 0,
          optimistic: 0.5,
          pessimistic: 0.5
        };
      }
      static getOptimisticGraph(dependencyGraph) {
        return dependencyGraph;
      }
      static getPessimisticGraph(dependencyGraph) {
        return dependencyGraph;
      }
      static getEstimateFromSimulation(simulation2, extras2) {
        if (!extras2.fcpResult) {
          throw new LanternError2("missing fcpResult");
        }
        const fcpTimeInMs = extras2.optimistic ? extras2.fcpResult.pessimisticEstimate.timeInMs : extras2.fcpResult.optimisticEstimate.timeInMs;
        const timings = _MaxPotentialFID.getTimingsAfterFCP(simulation2.nodeTimings, fcpTimeInMs);
        return {
          timeInMs: Math.max(...timings.map((timing) => timing.duration), 16),
          nodeTimings: simulation2.nodeTimings
        };
      }
      static compute(data32, extras2) {
        const fcpResult = extras2?.fcpResult;
        if (!fcpResult) {
          throw new LanternError2("FCP is required to calculate the Max Potential FID metric");
        }
        return super.compute(data32, extras2);
      }
      static getTimingsAfterFCP(nodeTimings, fcpTimeInMs) {
        return Array.from(nodeTimings.entries()).filter(([node2, timing]) => node2.type === BaseNode2.types.CPU && timing.endTime > fcpTimeInMs).map(([_, timing]) => timing);
      }
    };
    mobileSlow4GRtt2 = 150;
    SpeedIndex2 = class _SpeedIndex extends Metric2 {
      static get coefficients() {
        return {
          intercept: 0,
          optimistic: 1.4,
          pessimistic: 0.4
        };
      }
      static getScaledCoefficients(rttMs) {
        const defaultCoefficients = this.coefficients;
        const defaultRttExcess = mobileSlow4GRtt2 - 30;
        const multiplier = Math.max((rttMs - 30) / defaultRttExcess, 0);
        return {
          intercept: defaultCoefficients.intercept * multiplier,
          optimistic: 0.5 + (defaultCoefficients.optimistic - 0.5) * multiplier,
          pessimistic: 0.5 + (defaultCoefficients.pessimistic - 0.5) * multiplier
        };
      }
      static getOptimisticGraph(dependencyGraph) {
        return dependencyGraph;
      }
      static getPessimisticGraph(dependencyGraph) {
        return dependencyGraph;
      }
      static getEstimateFromSimulation(simulationResult, extras2) {
        if (!extras2.fcpResult) {
          throw new LanternError2("missing fcpResult");
        }
        if (extras2.observedSpeedIndex === void 0) {
          throw new LanternError2("missing observedSpeedIndex");
        }
        const fcpTimeInMs = extras2.fcpResult.pessimisticEstimate.timeInMs;
        const estimate = extras2.optimistic ? extras2.observedSpeedIndex : _SpeedIndex.computeLayoutBasedSpeedIndex(simulationResult.nodeTimings, fcpTimeInMs);
        return {
          timeInMs: estimate,
          nodeTimings: simulationResult.nodeTimings
        };
      }
      static compute(data32, extras2) {
        const fcpResult = extras2?.fcpResult;
        if (!fcpResult) {
          throw new LanternError2("FCP is required to calculate the SpeedIndex metric");
        }
        const metricResult = super.compute(data32, extras2);
        metricResult.timing = Math.max(metricResult.timing, fcpResult.timing);
        return metricResult;
      }
      static computeLayoutBasedSpeedIndex(nodeTimings, fcpTimeInMs) {
        const layoutWeights = [];
        for (const [node2, timing] of nodeTimings.entries()) {
          if (node2.type !== BaseNode2.types.CPU) {
            continue;
          }
          if (node2.childEvents.some((x) => x.name === "Layout")) {
            const timingWeight = Math.max(Math.log2(timing.endTime - timing.startTime), 0);
            layoutWeights.push({ time: timing.endTime, weight: timingWeight });
          }
        }
        const totalWeightedTime = layoutWeights.map((evt) => evt.weight * Math.max(evt.time, fcpTimeInMs)).reduce((a, b) => a + b, 0);
        const totalWeight = layoutWeights.map((evt) => evt.weight).reduce((a, b) => a + b, 0);
        if (!totalWeight) {
          return fcpTimeInMs;
        }
        return totalWeightedTime / totalWeight;
      }
    };
    BLOCKING_TIME_THRESHOLD2 = 50;
    TBTUtils = /* @__PURE__ */ Object.freeze({
      __proto__: null,
      BLOCKING_TIME_THRESHOLD: BLOCKING_TIME_THRESHOLD2,
      calculateSumOfBlockingTime: calculateSumOfBlockingTime2,
      calculateTbtImpactForEvent: calculateTbtImpactForEvent2
    });
    TotalBlockingTime2 = class _TotalBlockingTime extends Metric2 {
      static get coefficients() {
        return {
          intercept: 0,
          optimistic: 0.5,
          pessimistic: 0.5
        };
      }
      static getOptimisticGraph(dependencyGraph) {
        return dependencyGraph;
      }
      static getPessimisticGraph(dependencyGraph) {
        return dependencyGraph;
      }
      static getEstimateFromSimulation(simulation2, extras2) {
        if (!extras2.fcpResult) {
          throw new LanternError2("missing fcpResult");
        }
        if (!extras2.interactiveResult) {
          throw new LanternError2("missing interactiveResult");
        }
        const fcpTimeInMs = extras2.optimistic ? extras2.fcpResult.pessimisticEstimate.timeInMs : extras2.fcpResult.optimisticEstimate.timeInMs;
        const interactiveTimeMs = extras2.optimistic ? extras2.interactiveResult.optimisticEstimate.timeInMs : extras2.interactiveResult.pessimisticEstimate.timeInMs;
        const minDurationMs = BLOCKING_TIME_THRESHOLD2;
        const events = _TotalBlockingTime.getTopLevelEvents(simulation2.nodeTimings, minDurationMs);
        return {
          timeInMs: calculateSumOfBlockingTime2(events, fcpTimeInMs, interactiveTimeMs),
          nodeTimings: simulation2.nodeTimings
        };
      }
      static compute(data32, extras2) {
        const fcpResult = extras2?.fcpResult;
        if (!fcpResult) {
          throw new LanternError2("FCP is required to calculate the TBT metric");
        }
        const interactiveResult = extras2?.fcpResult;
        if (!interactiveResult) {
          throw new LanternError2("Interactive is required to calculate the TBT metric");
        }
        return super.compute(data32, extras2);
      }
      static getTopLevelEvents(nodeTimings, minDurationMs) {
        const events = [];
        for (const [node2, timing] of nodeTimings.entries()) {
          if (node2.type !== BaseNode2.types.CPU) {
            continue;
          }
          if (timing.duration < minDurationMs) {
            continue;
          }
          events.push({
            start: timing.startTime,
            end: timing.endTime,
            duration: timing.duration
          });
        }
        return events;
      }
    };
    metrics$1 = /* @__PURE__ */ Object.freeze({
      __proto__: null,
      FirstContentfulPaint: FirstContentfulPaint2,
      Interactive: Interactive2,
      LargestContentfulPaint: LargestContentfulPaint2,
      MaxPotentialFID: MaxPotentialFID2,
      Metric: Metric2,
      SpeedIndex: SpeedIndex2,
      TBTUtils,
      TotalBlockingTime: TotalBlockingTime2
    });
    INITIAL_CONGESTION_WINDOW2 = 10;
    TCP_SEGMENT_SIZE2 = 1460;
    TCPConnection2 = class _TCPConnection {
      warmed;
      ssl;
      h2;
      rtt;
      throughput;
      serverLatency;
      _congestionWindow;
      h2OverflowBytesDownloaded;
      constructor(rtt, throughput, serverLatency = 0, ssl = true, h2 = false) {
        this.warmed = false;
        this.ssl = ssl;
        this.h2 = h2;
        this.rtt = rtt;
        this.throughput = throughput;
        this.serverLatency = serverLatency;
        this._congestionWindow = INITIAL_CONGESTION_WINDOW2;
        this.h2OverflowBytesDownloaded = 0;
      }
      static maximumSaturatedConnections(rtt, availableThroughput) {
        const roundTripsPerSecond = 1e3 / rtt;
        const bytesPerRoundTrip = TCP_SEGMENT_SIZE2;
        const bytesPerSecond = roundTripsPerSecond * bytesPerRoundTrip;
        const minimumThroughputRequiredPerRequest = bytesPerSecond * 8;
        return Math.floor(availableThroughput / minimumThroughputRequiredPerRequest);
      }
      computeMaximumCongestionWindowInSegments() {
        const bytesPerSecond = this.throughput / 8;
        const secondsPerRoundTrip = this.rtt / 1e3;
        const bytesPerRoundTrip = bytesPerSecond * secondsPerRoundTrip;
        return Math.floor(bytesPerRoundTrip / TCP_SEGMENT_SIZE2);
      }
      setThroughput(throughput) {
        this.throughput = throughput;
      }
      setCongestionWindow(congestion) {
        this._congestionWindow = congestion;
      }
      setWarmed(warmed) {
        this.warmed = warmed;
      }
      isH2() {
        return this.h2;
      }
      get congestionWindow() {
        return this._congestionWindow;
      }
      setH2OverflowBytesDownloaded(bytes2) {
        if (!this.h2) {
          return;
        }
        this.h2OverflowBytesDownloaded = bytes2;
      }
      clone() {
        return Object.assign(new _TCPConnection(this.rtt, this.throughput), this);
      }
      simulateDownloadUntil(bytesToDownload, options2) {
        const { timeAlreadyElapsed = 0, maximumTimeToElapse = Infinity, dnsResolutionTime = 0 } = options2 || {};
        if (this.warmed && this.h2) {
          bytesToDownload -= this.h2OverflowBytesDownloaded;
        }
        const twoWayLatency = this.rtt;
        const oneWayLatency = twoWayLatency / 2;
        const maximumCongestionWindow = this.computeMaximumCongestionWindowInSegments();
        let handshakeAndRequest = oneWayLatency;
        if (!this.warmed) {
          handshakeAndRequest = dnsResolutionTime + oneWayLatency + oneWayLatency + oneWayLatency + (this.ssl ? twoWayLatency : 0);
        }
        let roundTrips = Math.ceil(handshakeAndRequest / twoWayLatency);
        let timeToFirstByte = handshakeAndRequest + this.serverLatency + oneWayLatency;
        if (this.warmed && this.h2) {
          timeToFirstByte = 0;
        }
        const timeElapsedForTTFB = Math.max(timeToFirstByte - timeAlreadyElapsed, 0);
        const maximumDownloadTimeToElapse = maximumTimeToElapse - timeElapsedForTTFB;
        let congestionWindow = Math.min(this._congestionWindow, maximumCongestionWindow);
        let totalBytesDownloaded = 0;
        if (timeElapsedForTTFB > 0) {
          totalBytesDownloaded = congestionWindow * TCP_SEGMENT_SIZE2;
        } else {
          roundTrips = 0;
        }
        let downloadTimeElapsed = 0;
        let bytesRemaining = bytesToDownload - totalBytesDownloaded;
        while (bytesRemaining > 0 && downloadTimeElapsed <= maximumDownloadTimeToElapse) {
          roundTrips++;
          downloadTimeElapsed += twoWayLatency;
          congestionWindow = Math.max(Math.min(maximumCongestionWindow, congestionWindow * 2), 1);
          const bytesDownloadedInWindow = congestionWindow * TCP_SEGMENT_SIZE2;
          totalBytesDownloaded += bytesDownloadedInWindow;
          bytesRemaining -= bytesDownloadedInWindow;
        }
        const timeElapsed = timeElapsedForTTFB + downloadTimeElapsed;
        const extraBytesDownloaded = this.h2 ? Math.max(totalBytesDownloaded - bytesToDownload, 0) : 0;
        const bytesDownloaded = Math.max(Math.min(totalBytesDownloaded, bytesToDownload), 0);
        let connectionTiming;
        if (!this.warmed) {
          connectionTiming = {
            dnsResolutionTime,
            connectionTime: handshakeAndRequest - dnsResolutionTime,
            sslTime: this.ssl ? twoWayLatency : void 0,
            timeToFirstByte
          };
        } else if (this.h2) {
          connectionTiming = {
            timeToFirstByte
          };
        } else {
          connectionTiming = {
            connectionTime: handshakeAndRequest,
            timeToFirstByte
          };
        }
        return {
          roundTrips,
          timeElapsed,
          bytesDownloaded,
          extraBytesDownloaded,
          congestionWindow,
          connectionTiming
        };
      }
    };
    DEFAULT_SERVER_RESPONSE_TIME2 = 30;
    TLS_SCHEMES2 = ["https", "wss"];
    CONNECTIONS_PER_ORIGIN2 = 6;
    ConnectionPool2 = class {
      options;
      records;
      connectionsByOrigin;
      connectionsByRequest;
      _connectionsInUse;
      connectionReusedByRequestId;
      constructor(records, options2) {
        this.options = options2;
        this.records = records;
        this.connectionsByOrigin = /* @__PURE__ */ new Map();
        this.connectionsByRequest = /* @__PURE__ */ new Map();
        this._connectionsInUse = /* @__PURE__ */ new Set();
        this.connectionReusedByRequestId = NetworkAnalyzer2.estimateIfConnectionWasReused(records, {
          forceCoarseEstimates: true
        });
        this.initializeConnections();
      }
      connectionsInUse() {
        return Array.from(this._connectionsInUse);
      }
      initializeConnections() {
        const connectionReused = this.connectionReusedByRequestId;
        const additionalRttByOrigin = this.options.additionalRttByOrigin;
        const serverResponseTimeByOrigin = this.options.serverResponseTimeByOrigin;
        const recordsByOrigin = NetworkAnalyzer2.groupByOrigin(this.records);
        for (const [origin, requests] of recordsByOrigin.entries()) {
          const connections = [];
          const additionalRtt = additionalRttByOrigin.get(origin) || 0;
          const responseTime = serverResponseTimeByOrigin.get(origin) || DEFAULT_SERVER_RESPONSE_TIME2;
          for (const request3 of requests) {
            if (connectionReused.get(request3.requestId)) {
              continue;
            }
            const isTLS = TLS_SCHEMES2.includes(request3.parsedURL.scheme);
            const isH2 = request3.protocol === "h2";
            const connection = new TCPConnection2(this.options.rtt + additionalRtt, this.options.throughput, responseTime, isTLS, isH2);
            connections.push(connection);
          }
          if (!connections.length) {
            throw new LanternError2(`Could not find a connection for origin: ${origin}`);
          }
          const minConnections = connections[0].isH2() ? 1 : CONNECTIONS_PER_ORIGIN2;
          while (connections.length < minConnections) {
            connections.push(connections[0].clone());
          }
          this.connectionsByOrigin.set(origin, connections);
        }
      }
      findAvailableConnectionWithLargestCongestionWindow(connections) {
        let maxConnection = null;
        for (let i = 0; i < connections.length; i++) {
          const connection = connections[i];
          if (this._connectionsInUse.has(connection)) {
            continue;
          }
          const currentMax = maxConnection?.congestionWindow || -Infinity;
          if (connection.congestionWindow > currentMax) {
            maxConnection = connection;
          }
        }
        return maxConnection;
      }
      acquire(request3) {
        if (this.connectionsByRequest.has(request3)) {
          throw new LanternError2("Record already has a connection");
        }
        const origin = request3.parsedURL.securityOrigin;
        const connections = this.connectionsByOrigin.get(origin) || [];
        const connectionToUse = this.findAvailableConnectionWithLargestCongestionWindow(connections);
        if (!connectionToUse) {
          return null;
        }
        this._connectionsInUse.add(connectionToUse);
        this.connectionsByRequest.set(request3, connectionToUse);
        return connectionToUse;
      }
      acquireActiveConnectionFromRequest(request3) {
        const activeConnection = this.connectionsByRequest.get(request3);
        if (!activeConnection) {
          throw new LanternError2("Could not find an active connection for request");
        }
        return activeConnection;
      }
      release(request3) {
        const connection = this.connectionsByRequest.get(request3);
        this.connectionsByRequest.delete(request3);
        if (connection) {
          this._connectionsInUse.delete(connection);
        }
      }
    };
    DEVTOOLS_RTT_ADJUSTMENT_FACTOR2 = 3.75;
    DEVTOOLS_THROUGHPUT_ADJUSTMENT_FACTOR2 = 0.9;
    throttling3 = {
      DEVTOOLS_RTT_ADJUSTMENT_FACTOR: DEVTOOLS_RTT_ADJUSTMENT_FACTOR2,
      DEVTOOLS_THROUGHPUT_ADJUSTMENT_FACTOR: DEVTOOLS_THROUGHPUT_ADJUSTMENT_FACTOR2,
      mobileSlow4G: {
        rttMs: 150,
        throughputKbps: 1.6 * 1024,
        requestLatencyMs: 150 * DEVTOOLS_RTT_ADJUSTMENT_FACTOR2,
        downloadThroughputKbps: 1.6 * 1024 * DEVTOOLS_THROUGHPUT_ADJUSTMENT_FACTOR2,
        uploadThroughputKbps: 750 * DEVTOOLS_THROUGHPUT_ADJUSTMENT_FACTOR2,
        cpuSlowdownMultiplier: 4
      },
      mobileRegular3G: {
        rttMs: 300,
        throughputKbps: 700,
        requestLatencyMs: 300 * DEVTOOLS_RTT_ADJUSTMENT_FACTOR2,
        downloadThroughputKbps: 700 * DEVTOOLS_THROUGHPUT_ADJUSTMENT_FACTOR2,
        uploadThroughputKbps: 700 * DEVTOOLS_THROUGHPUT_ADJUSTMENT_FACTOR2,
        cpuSlowdownMultiplier: 4
      },
      desktopDense4G: {
        rttMs: 40,
        throughputKbps: 10 * 1024,
        cpuSlowdownMultiplier: 1,
        requestLatencyMs: 0,
        downloadThroughputKbps: 0,
        uploadThroughputKbps: 0
      }
    };
    Constants2 = { throttling: throttling3 };
    DNS_RESOLUTION_RTT_MULTIPLIER2 = 2;
    DNSCache2 = class _DNSCache {
      static rttMultiplier = DNS_RESOLUTION_RTT_MULTIPLIER2;
      rtt;
      resolvedDomainNames;
      constructor({ rtt }) {
        this.rtt = rtt;
        this.resolvedDomainNames = /* @__PURE__ */ new Map();
      }
      getTimeUntilResolution(request3, options2) {
        const { requestedAt = 0, shouldUpdateCache = false } = options2 || {};
        const domain = request3.parsedURL.host;
        const cacheEntry = this.resolvedDomainNames.get(domain);
        let timeUntilResolved = this.rtt * _DNSCache.rttMultiplier;
        if (cacheEntry) {
          const timeUntilCachedIsResolved = Math.max(cacheEntry.resolvedAt - requestedAt, 0);
          timeUntilResolved = Math.min(timeUntilCachedIsResolved, timeUntilResolved);
        }
        const resolvedAt = requestedAt + timeUntilResolved;
        if (shouldUpdateCache) {
          this.updateCacheResolvedAtIfNeeded(request3, resolvedAt);
        }
        return timeUntilResolved;
      }
      updateCacheResolvedAtIfNeeded(request3, resolvedAt) {
        const domain = request3.parsedURL.host;
        const cacheEntry = this.resolvedDomainNames.get(domain) || { resolvedAt };
        cacheEntry.resolvedAt = Math.min(cacheEntry.resolvedAt, resolvedAt);
        this.resolvedDomainNames.set(domain, cacheEntry);
      }
      setResolvedAt(domain, resolvedAt) {
        this.resolvedDomainNames.set(domain, { resolvedAt });
      }
    };
    SimulatorTimingMap2 = class {
      nodeTimings;
      constructor() {
        this.nodeTimings = /* @__PURE__ */ new Map();
      }
      getNodes() {
        return Array.from(this.nodeTimings.keys());
      }
      setReadyToStart(node2, values) {
        this.nodeTimings.set(node2, values);
      }
      setInProgress(node2, values) {
        const nodeTiming = {
          ...this.getQueued(node2),
          startTime: values.startTime,
          timeElapsed: 0
        };
        this.nodeTimings.set(node2, node2.type === BaseNode2.types.NETWORK ? { ...nodeTiming, timeElapsedOvershoot: 0, bytesDownloaded: 0 } : nodeTiming);
      }
      setCompleted(node2, values) {
        const nodeTiming = {
          ...this.getInProgress(node2),
          endTime: values.endTime,
          connectionTiming: values.connectionTiming
        };
        this.nodeTimings.set(node2, nodeTiming);
      }
      setCpu(node2, values) {
        const nodeTiming = {
          ...this.getCpuStarted(node2),
          timeElapsed: values.timeElapsed
        };
        this.nodeTimings.set(node2, nodeTiming);
      }
      setCpuEstimated(node2, values) {
        const nodeTiming = {
          ...this.getCpuStarted(node2),
          estimatedTimeElapsed: values.estimatedTimeElapsed
        };
        this.nodeTimings.set(node2, nodeTiming);
      }
      setNetwork(node2, values) {
        const nodeTiming = {
          ...this.getNetworkStarted(node2),
          timeElapsed: values.timeElapsed,
          timeElapsedOvershoot: values.timeElapsedOvershoot,
          bytesDownloaded: values.bytesDownloaded
        };
        this.nodeTimings.set(node2, nodeTiming);
      }
      setNetworkEstimated(node2, values) {
        const nodeTiming = {
          ...this.getNetworkStarted(node2),
          estimatedTimeElapsed: values.estimatedTimeElapsed
        };
        this.nodeTimings.set(node2, nodeTiming);
      }
      getQueued(node2) {
        const timing = this.nodeTimings.get(node2);
        if (!timing) {
          throw new LanternError2(`Node ${node2.id} not yet queued`);
        }
        return timing;
      }
      getCpuStarted(node2) {
        const timing = this.nodeTimings.get(node2);
        if (!timing) {
          throw new LanternError2(`Node ${node2.id} not yet queued`);
        }
        if (!("startTime" in timing)) {
          throw new LanternError2(`Node ${node2.id} not yet started`);
        }
        if ("bytesDownloaded" in timing) {
          throw new LanternError2(`Node ${node2.id} timing not valid`);
        }
        return timing;
      }
      getNetworkStarted(node2) {
        const timing = this.nodeTimings.get(node2);
        if (!timing) {
          throw new LanternError2(`Node ${node2.id} not yet queued`);
        }
        if (!("startTime" in timing)) {
          throw new LanternError2(`Node ${node2.id} not yet started`);
        }
        if (!("bytesDownloaded" in timing)) {
          throw new LanternError2(`Node ${node2.id} timing not valid`);
        }
        return timing;
      }
      getInProgress(node2) {
        const timing = this.nodeTimings.get(node2);
        if (!timing) {
          throw new LanternError2(`Node ${node2.id} not yet queued`);
        }
        if (!("startTime" in timing)) {
          throw new LanternError2(`Node ${node2.id} not yet started`);
        }
        if (!("estimatedTimeElapsed" in timing)) {
          throw new LanternError2(`Node ${node2.id} not yet in progress`);
        }
        return timing;
      }
      getCompleted(node2) {
        const timing = this.nodeTimings.get(node2);
        if (!timing) {
          throw new LanternError2(`Node ${node2.id} not yet queued`);
        }
        if (!("startTime" in timing)) {
          throw new LanternError2(`Node ${node2.id} not yet started`);
        }
        if (!("estimatedTimeElapsed" in timing)) {
          throw new LanternError2(`Node ${node2.id} not yet in progress`);
        }
        if (!("endTime" in timing)) {
          throw new LanternError2(`Node ${node2.id} not yet completed`);
        }
        return timing;
      }
    };
    defaultThrottling2 = Constants2.throttling.mobileSlow4G;
    DEFAULT_MAXIMUM_CONCURRENT_REQUESTS2 = 10;
    DEFAULT_LAYOUT_TASK_MULTIPLIER2 = 0.5;
    DEFAULT_MAXIMUM_CPU_TASK_DURATION2 = 1e4;
    NodeState2 = {
      NotReadyToStart: 0,
      ReadyToStart: 1,
      InProgress: 2,
      Complete: 3
    };
    PriorityStartTimePenalty2 = {
      VeryHigh: 0,
      High: 0.25,
      Medium: 0.5,
      Low: 1,
      VeryLow: 2
    };
    ALL_SIMULATION_NODE_TIMINGS2 = /* @__PURE__ */ new Map();
    Simulator2 = class _Simulator {
      static createSimulator(settings) {
        const { throttlingMethod, throttling: throttling4, precomputedLanternData, networkAnalysis } = settings;
        const options2 = {
          additionalRttByOrigin: networkAnalysis.additionalRttByOrigin,
          serverResponseTimeByOrigin: networkAnalysis.serverResponseTimeByOrigin,
          observedThroughput: networkAnalysis.throughput
        };
        if (precomputedLanternData) {
          options2.additionalRttByOrigin = new Map(Object.entries(precomputedLanternData.additionalRttByOrigin));
          options2.serverResponseTimeByOrigin = new Map(Object.entries(precomputedLanternData.serverResponseTimeByOrigin));
        }
        switch (throttlingMethod) {
          case "provided":
            options2.rtt = networkAnalysis.rtt;
            options2.throughput = networkAnalysis.throughput;
            options2.cpuSlowdownMultiplier = 1;
            options2.layoutTaskMultiplier = 1;
            break;
          case "devtools":
            if (throttling4) {
              options2.rtt = throttling4.requestLatencyMs / Constants2.throttling.DEVTOOLS_RTT_ADJUSTMENT_FACTOR;
              options2.throughput = throttling4.downloadThroughputKbps * 1024 / Constants2.throttling.DEVTOOLS_THROUGHPUT_ADJUSTMENT_FACTOR;
            }
            options2.cpuSlowdownMultiplier = 1;
            options2.layoutTaskMultiplier = 1;
            break;
          case "simulate":
            if (throttling4) {
              options2.rtt = throttling4.rttMs;
              options2.throughput = throttling4.throughputKbps * 1024;
              options2.cpuSlowdownMultiplier = throttling4.cpuSlowdownMultiplier;
            }
            break;
        }
        return new _Simulator(options2);
      }
      options;
      _rtt;
      throughput;
      maximumConcurrentRequests;
      cpuSlowdownMultiplier;
      layoutTaskMultiplier;
      cachedNodeListByStartPosition;
      nodeTimings;
      numberInProgressByType;
      nodes;
      dns;
      connectionPool;
      constructor(options2) {
        this.options = Object.assign({
          rtt: defaultThrottling2.rttMs,
          throughput: defaultThrottling2.throughputKbps * 1024,
          maximumConcurrentRequests: DEFAULT_MAXIMUM_CONCURRENT_REQUESTS2,
          cpuSlowdownMultiplier: defaultThrottling2.cpuSlowdownMultiplier,
          layoutTaskMultiplier: DEFAULT_LAYOUT_TASK_MULTIPLIER2,
          additionalRttByOrigin: /* @__PURE__ */ new Map(),
          serverResponseTimeByOrigin: /* @__PURE__ */ new Map()
        }, options2);
        this._rtt = this.options.rtt;
        this.throughput = this.options.throughput;
        this.maximumConcurrentRequests = Math.max(Math.min(TCPConnection2.maximumSaturatedConnections(this._rtt, this.throughput), this.options.maximumConcurrentRequests), 1);
        this.cpuSlowdownMultiplier = this.options.cpuSlowdownMultiplier;
        this.layoutTaskMultiplier = this.cpuSlowdownMultiplier * this.options.layoutTaskMultiplier;
        this.cachedNodeListByStartPosition = [];
        this.nodeTimings = new SimulatorTimingMap2();
        this.numberInProgressByType = /* @__PURE__ */ new Map();
        this.nodes = {};
        this.dns = new DNSCache2({ rtt: this._rtt });
        this.connectionPool = null;
        if (!Number.isFinite(this._rtt)) {
          throw new LanternError2(`Invalid rtt ${this._rtt}`);
        }
        if (!Number.isFinite(this.throughput)) {
          throw new LanternError2(`Invalid throughput ${this.throughput}`);
        }
      }
      get rtt() {
        return this._rtt;
      }
      initializeConnectionPool(graph$12) {
        const records = [];
        graph$12.getRootNode().traverse((node2) => {
          if (node2.type === BaseNode2.types.NETWORK) {
            records.push(node2.request);
          }
        });
        this.connectionPool = new ConnectionPool2(records, this.options);
      }
      initializeAuxiliaryData() {
        this.nodeTimings = new SimulatorTimingMap2();
        this.numberInProgressByType = /* @__PURE__ */ new Map();
        this.nodes = {};
        this.cachedNodeListByStartPosition = [];
        for (const state of Object.values(NodeState2)) {
          this.nodes[state] = /* @__PURE__ */ new Set();
        }
      }
      numberInProgress(type2) {
        return this.numberInProgressByType.get(type2) || 0;
      }
      markNodeAsReadyToStart(node2, queuedTime) {
        const nodeStartPosition = _Simulator.computeNodeStartPosition(node2);
        const firstNodeIndexWithGreaterStartPosition = this.cachedNodeListByStartPosition.findIndex((candidate) => _Simulator.computeNodeStartPosition(candidate) > nodeStartPosition);
        const insertionIndex = firstNodeIndexWithGreaterStartPosition === -1 ? this.cachedNodeListByStartPosition.length : firstNodeIndexWithGreaterStartPosition;
        this.cachedNodeListByStartPosition.splice(insertionIndex, 0, node2);
        this.nodes[NodeState2.ReadyToStart].add(node2);
        this.nodes[NodeState2.NotReadyToStart].delete(node2);
        this.nodeTimings.setReadyToStart(node2, { queuedTime });
      }
      markNodeAsInProgress(node2, startTime) {
        const indexOfNodeToStart = this.cachedNodeListByStartPosition.indexOf(node2);
        this.cachedNodeListByStartPosition.splice(indexOfNodeToStart, 1);
        this.nodes[NodeState2.InProgress].add(node2);
        this.nodes[NodeState2.ReadyToStart].delete(node2);
        this.numberInProgressByType.set(node2.type, this.numberInProgress(node2.type) + 1);
        this.nodeTimings.setInProgress(node2, { startTime });
      }
      markNodeAsComplete(node2, endTime, connectionTiming) {
        this.nodes[NodeState2.Complete].add(node2);
        this.nodes[NodeState2.InProgress].delete(node2);
        this.numberInProgressByType.set(node2.type, this.numberInProgress(node2.type) - 1);
        this.nodeTimings.setCompleted(node2, { endTime, connectionTiming });
        for (const dependent of node2.getDependents()) {
          const dependencies2 = dependent.getDependencies();
          if (dependencies2.some((dep) => !this.nodes[NodeState2.Complete].has(dep))) {
            continue;
          }
          this.markNodeAsReadyToStart(dependent, endTime);
        }
      }
      acquireConnection(request3) {
        return this.connectionPool.acquire(request3);
      }
      getNodesSortedByStartPosition() {
        return Array.from(this.cachedNodeListByStartPosition);
      }
      startNodeIfPossible(node2, totalElapsedTime) {
        if (node2.type === BaseNode2.types.CPU) {
          if (this.numberInProgress(node2.type) === 0) {
            this.markNodeAsInProgress(node2, totalElapsedTime);
          }
          return;
        }
        if (node2.type !== BaseNode2.types.NETWORK) {
          throw new LanternError2("Unsupported");
        }
        if (!node2.isConnectionless) {
          const numberOfActiveRequests = this.numberInProgress(node2.type);
          if (numberOfActiveRequests >= this.maximumConcurrentRequests) {
            return;
          }
          const connection = this.acquireConnection(node2.request);
          if (!connection) {
            return;
          }
        }
        this.markNodeAsInProgress(node2, totalElapsedTime);
      }
      updateNetworkCapacity() {
        const inFlight = this.numberInProgress(BaseNode2.types.NETWORK);
        if (inFlight === 0) {
          return;
        }
        for (const connection of this.connectionPool.connectionsInUse()) {
          connection.setThroughput(this.throughput / inFlight);
        }
      }
      estimateTimeRemaining(node2) {
        if (node2.type === BaseNode2.types.CPU) {
          return this.estimateCPUTimeRemaining(node2);
        }
        if (node2.type === BaseNode2.types.NETWORK) {
          return this.estimateNetworkTimeRemaining(node2);
        }
        throw new LanternError2("Unsupported");
      }
      estimateCPUTimeRemaining(cpuNode) {
        const timingData = this.nodeTimings.getCpuStarted(cpuNode);
        const multiplier = cpuNode.didPerformLayout() ? this.layoutTaskMultiplier : this.cpuSlowdownMultiplier;
        const totalDuration = Math.min(Math.round(cpuNode.duration / 1e3 * multiplier), DEFAULT_MAXIMUM_CPU_TASK_DURATION2);
        const estimatedTimeElapsed = totalDuration - timingData.timeElapsed;
        this.nodeTimings.setCpuEstimated(cpuNode, { estimatedTimeElapsed });
        return estimatedTimeElapsed;
      }
      estimateNetworkTimeRemaining(networkNode) {
        const request3 = networkNode.request;
        const timingData = this.nodeTimings.getNetworkStarted(networkNode);
        let timeElapsed = 0;
        if (networkNode.fromDiskCache) {
          const sizeInMb = (request3.resourceSize || 0) / 1024 / 1024;
          timeElapsed = 8 + 20 * sizeInMb - timingData.timeElapsed;
        } else if (networkNode.isNonNetworkProtocol) {
          const sizeInMb = (request3.resourceSize || 0) / 1024 / 1024;
          timeElapsed = 2 + 10 * sizeInMb - timingData.timeElapsed;
        } else {
          const connection = this.connectionPool.acquireActiveConnectionFromRequest(request3);
          const dnsResolutionTime = this.dns.getTimeUntilResolution(request3, {
            requestedAt: timingData.startTime,
            shouldUpdateCache: true
          });
          const timeAlreadyElapsed = timingData.timeElapsed;
          const calculation = connection.simulateDownloadUntil(request3.transferSize - timingData.bytesDownloaded, { timeAlreadyElapsed, dnsResolutionTime, maximumTimeToElapse: Infinity });
          timeElapsed = calculation.timeElapsed;
        }
        const estimatedTimeElapsed = timeElapsed + timingData.timeElapsedOvershoot;
        this.nodeTimings.setNetworkEstimated(networkNode, { estimatedTimeElapsed });
        return estimatedTimeElapsed;
      }
      findNextNodeCompletionTime() {
        let minimumTime = Infinity;
        for (const node2 of this.nodes[NodeState2.InProgress]) {
          minimumTime = Math.min(minimumTime, this.estimateTimeRemaining(node2));
        }
        return minimumTime;
      }
      updateProgressMadeInTimePeriod(node2, timePeriodLength, totalElapsedTime) {
        const timingData = this.nodeTimings.getInProgress(node2);
        const isFinished = timingData.estimatedTimeElapsed === timePeriodLength;
        if (node2.type === BaseNode2.types.CPU || node2.isConnectionless) {
          if (isFinished) {
            this.markNodeAsComplete(node2, totalElapsedTime);
          } else {
            timingData.timeElapsed += timePeriodLength;
          }
          return;
        }
        if (node2.type !== BaseNode2.types.NETWORK) {
          throw new LanternError2("Unsupported");
        }
        if (!("bytesDownloaded" in timingData)) {
          throw new LanternError2("Invalid timing data");
        }
        const request3 = node2.request;
        const connection = this.connectionPool.acquireActiveConnectionFromRequest(request3);
        const dnsResolutionTime = this.dns.getTimeUntilResolution(request3, {
          requestedAt: timingData.startTime,
          shouldUpdateCache: true
        });
        const calculation = connection.simulateDownloadUntil(request3.transferSize - timingData.bytesDownloaded, {
          dnsResolutionTime,
          timeAlreadyElapsed: timingData.timeElapsed,
          maximumTimeToElapse: timePeriodLength - timingData.timeElapsedOvershoot
        });
        connection.setCongestionWindow(calculation.congestionWindow);
        connection.setH2OverflowBytesDownloaded(calculation.extraBytesDownloaded);
        if (isFinished) {
          connection.setWarmed(true);
          this.connectionPool.release(request3);
          this.markNodeAsComplete(node2, totalElapsedTime, calculation.connectionTiming);
        } else {
          timingData.timeElapsed += calculation.timeElapsed;
          timingData.timeElapsedOvershoot += calculation.timeElapsed - timePeriodLength;
          timingData.bytesDownloaded += calculation.bytesDownloaded;
        }
      }
      computeFinalNodeTimings() {
        const completeNodeTimingEntries = this.nodeTimings.getNodes().map((node2) => {
          return [node2, this.nodeTimings.getCompleted(node2)];
        });
        completeNodeTimingEntries.sort((a, b) => a[1].startTime - b[1].startTime);
        const nodeTimingEntries = completeNodeTimingEntries.map(([node2, timing]) => {
          return [
            node2,
            {
              startTime: timing.startTime,
              endTime: timing.endTime,
              duration: timing.endTime - timing.startTime
            }
          ];
        });
        return {
          nodeTimings: new Map(nodeTimingEntries),
          completeNodeTimings: new Map(completeNodeTimingEntries)
        };
      }
      getOptions() {
        return this.options;
      }
      simulate(graph$12, options2) {
        if (BaseNode2.findCycle(graph$12)) {
          throw new LanternError2("Cannot simulate graph with cycle");
        }
        options2 = Object.assign({
          label: void 0
        }, options2);
        this.dns = new DNSCache2({ rtt: this._rtt });
        this.initializeConnectionPool(graph$12);
        this.initializeAuxiliaryData();
        const nodesNotReadyToStart = this.nodes[NodeState2.NotReadyToStart];
        const nodesReadyToStart = this.nodes[NodeState2.ReadyToStart];
        const nodesInProgress = this.nodes[NodeState2.InProgress];
        const rootNode = graph$12.getRootNode();
        rootNode.traverse((node2) => nodesNotReadyToStart.add(node2));
        let totalElapsedTime = 0;
        let iteration = 0;
        this.markNodeAsReadyToStart(rootNode, totalElapsedTime);
        while (nodesReadyToStart.size || nodesInProgress.size) {
          for (const node2 of this.getNodesSortedByStartPosition()) {
            this.startNodeIfPossible(node2, totalElapsedTime);
          }
          if (!nodesInProgress.size) {
            throw new LanternError2("Failed to start a node");
          }
          this.updateNetworkCapacity();
          const minimumTime = this.findNextNodeCompletionTime();
          totalElapsedTime += minimumTime;
          if (!Number.isFinite(minimumTime) || iteration > 1e5) {
            throw new LanternError2("Simulation failed, depth exceeded");
          }
          iteration++;
          for (const node2 of nodesInProgress) {
            this.updateProgressMadeInTimePeriod(node2, minimumTime, totalElapsedTime);
          }
        }
        const { nodeTimings, completeNodeTimings } = this.computeFinalNodeTimings();
        ALL_SIMULATION_NODE_TIMINGS2.set(options2.label || "unlabeled", completeNodeTimings);
        return {
          timeInMs: totalElapsedTime,
          nodeTimings
        };
      }
      computeWastedMsFromWastedBytes(wastedBytes) {
        const { throughput, observedThroughput } = this.options;
        const bitsPerSecond = throughput === 0 ? observedThroughput : throughput;
        if (bitsPerSecond === 0) {
          return 0;
        }
        const wastedBits = wastedBytes * 8;
        const wastedMs = wastedBits / bitsPerSecond * 1e3;
        return Math.round(wastedMs / 10) * 10;
      }
      static get allNodeTimings() {
        return ALL_SIMULATION_NODE_TIMINGS2;
      }
      static computeNodeStartPosition(node2) {
        if (node2.type === "cpu") {
          return node2.startTime;
        }
        return node2.startTime + (PriorityStartTimePenalty2[node2.request.priority] * 1e3 * 1e3 || 0);
      }
    };
    simulation = /* @__PURE__ */ Object.freeze({
      __proto__: null,
      ConnectionPool: ConnectionPool2,
      Constants: Constants2,
      DNSCache: DNSCache2,
      Simulator: Simulator2,
      SimulatorTimingMap: SimulatorTimingMap2,
      TCPConnection: TCPConnection2
    });
    NetworkRequestTypes2 = {
      XHR: "XHR",
      Fetch: "Fetch",
      EventSource: "EventSource",
      Script: "Script",
      Stylesheet: "Stylesheet",
      Image: "Image",
      Media: "Media",
      Font: "Font",
      Document: "Document",
      TextTrack: "TextTrack",
      WebSocket: "WebSocket",
      Other: "Other",
      Manifest: "Manifest",
      SignedExchange: "SignedExchange",
      Ping: "Ping",
      Preflight: "Preflight",
      CSPViolationReport: "CSPViolationReport",
      Prefetch: "Prefetch",
      FedCM: "FedCM"
    };
    types = /* @__PURE__ */ Object.freeze({
      __proto__: null,
      NetworkRequestTypes: NetworkRequestTypes2
    });
    lantern = /* @__PURE__ */ Object.freeze({
      __proto__: null,
      Core: core,
      Graph: graph2,
      Metrics: metrics$1,
      Simulation: simulation,
      Types: types
    });
    LanternComputationData = /* @__PURE__ */ Object.freeze({
      __proto__: null,
      createGraph: createGraph2,
      createNetworkRequests: createNetworkRequests2,
      createProcessedNavigation: createProcessedNavigation2
    });
    TraceParseProgressEvent2 = class _TraceParseProgressEvent extends Event {
      data;
      static eventName = "traceparseprogress";
      constructor(data32, init2 = { bubbles: true }) {
        super(_TraceParseProgressEvent.eventName, init2);
        this.data = data32;
      }
    };
    TraceProcessor3 = class extends EventTarget {
      #traceHandlers;
      #status = "IDLE";
      #modelConfiguration = defaults2();
      #data = null;
      #insights = null;
      static createWithAllHandlers() {
        return new _a$2(ModelHandlers, defaults2());
      }
      static getInsightRunners() {
        return { ...Models };
      }
      constructor(traceHandlers, modelConfiguration) {
        super();
        this.#verifyHandlers(traceHandlers);
        this.#traceHandlers = {
          Meta: MetaHandler,
          ...traceHandlers
        };
        if (modelConfiguration) {
          this.#modelConfiguration = modelConfiguration;
        }
        this.#passConfigToHandlers();
      }
      #passConfigToHandlers() {
        for (const handler of Object.values(this.#traceHandlers)) {
          if ("handleUserConfig" in handler && handler.handleUserConfig) {
            handler.handleUserConfig(this.#modelConfiguration);
          }
        }
      }
      #verifyHandlers(providedHandlers) {
        if (Object.keys(providedHandlers).length === Object.keys(ModelHandlers).length) {
          return;
        }
        const requiredHandlerKeys = /* @__PURE__ */ new Set();
        for (const [handlerName, handler] of Object.entries(providedHandlers)) {
          requiredHandlerKeys.add(handlerName);
          const deps18 = "deps" in handler ? handler.deps() : [];
          for (const depName of deps18) {
            requiredHandlerKeys.add(depName);
          }
        }
        const providedHandlerKeys = new Set(Object.keys(providedHandlers));
        requiredHandlerKeys.delete("Meta");
        for (const requiredKey of requiredHandlerKeys) {
          if (!providedHandlerKeys.has(requiredKey)) {
            throw new Error(`Required handler ${requiredKey} not provided.`);
          }
        }
      }
      reset() {
        if (this.#status === "PARSING") {
          throw new Error("Trace processor can't reset while parsing.");
        }
        const handlers2 = Object.values(this.#traceHandlers);
        for (const handler of handlers2) {
          handler.reset();
        }
        this.#data = null;
        this.#insights = null;
        this.#status = "IDLE";
      }
      async parse(traceEvents, options2) {
        if (this.#status !== "IDLE") {
          throw new Error(`Trace processor can't start parsing when not idle. Current state: ${this.#status}`);
        }
        if (typeof options2.isCPUProfile === "undefined" && options2.metadata) {
          options2.isCPUProfile = options2.metadata.dataOrigin === "CPUProfile";
        }
        options2.logger?.start("total");
        try {
          this.#status = "PARSING";
          options2.logger?.start("parse");
          await this.#computeParsedTrace(traceEvents, options2);
          options2.logger?.end("parse");
          if (this.#data && !options2.isCPUProfile) {
            options2.logger?.start("insights");
            this.#computeInsights(this.#data, traceEvents, options2);
            options2.logger?.end("insights");
          }
          this.#status = "FINISHED_PARSING";
        } catch (e) {
          this.#status = "ERRORED_WHILE_PARSING";
          throw e;
        } finally {
          options2.logger?.end("total");
        }
      }
      async #computeParsedTrace(traceEvents, options2) {
        const eventsPerChunk = 5e4;
        const sortedHandlers = [...sortHandlers2(this.#traceHandlers).entries()];
        for (const [, handler] of sortedHandlers) {
          handler.reset();
        }
        options2.logger?.start("parse:handleEvent");
        for (let i = 0; i < traceEvents.length; ++i) {
          if (i % eventsPerChunk === 0 && i) {
            const percent = calculateProgress2(i / traceEvents.length, 0.2);
            this.dispatchEvent(new TraceParseProgressEvent2({ percent }));
            await new Promise((resolve2) => setTimeout(resolve2, 0));
          }
          const event = traceEvents[i];
          for (let j = 0; j < sortedHandlers.length; ++j) {
            const [, handler] = sortedHandlers[j];
            handler.handleEvent(event);
          }
        }
        options2.logger?.end("parse:handleEvent");
        const finalizeOptions = {
          ...options2,
          allTraceEvents: traceEvents
        };
        for (let i = 0; i < sortedHandlers.length; i++) {
          const [name, handler] = sortedHandlers[i];
          if (handler.finalize) {
            options2.logger?.start(`parse:${name}:finalize`);
            await new Promise((resolve2) => setTimeout(resolve2, 0));
            await handler.finalize(finalizeOptions);
            options2.logger?.end(`parse:${name}:finalize`);
          }
          const percent = calculateProgress2(i / sortedHandlers.length, 0.8);
          this.dispatchEvent(new TraceParseProgressEvent2({ percent }));
        }
        options2.logger?.start("parse:handler.data()");
        const parsedTrace = {};
        for (const [name, handler] of Object.entries(this.#traceHandlers)) {
          Object.assign(parsedTrace, { [name]: handler.data() });
        }
        options2.logger?.end("parse:handler.data()");
        this.dispatchEvent(new TraceParseProgressEvent2({ percent: 1 }));
        this.#data = parsedTrace;
      }
      get data() {
        if (this.#status !== "FINISHED_PARSING") {
          return null;
        }
        return this.#data;
      }
      get insights() {
        if (this.#status !== "FINISHED_PARSING") {
          return null;
        }
        return this.#insights;
      }
      #createLanternContext(data32, traceEvents, frameId, navigation2, options2) {
        if (!data32.NetworkRequests || !data32.Workers || !data32.PageLoadMetrics) {
          return;
        }
        if (!data32.NetworkRequests.byTime.length) {
          throw new LanternError2("No network requests found in trace");
        }
        const navStarts = data32.Meta.navigationsByFrameId.get(frameId);
        const navStartIndex = navStarts?.findIndex((n) => n === navigation2);
        if (!navStarts || navStartIndex === void 0 || navStartIndex === -1) {
          throw new LanternError2("Could not find navigation start");
        }
        const startTime = navStarts[navStartIndex].ts;
        const endTime = navStartIndex + 1 < navStarts.length ? navStarts[navStartIndex + 1].ts : Number.POSITIVE_INFINITY;
        const boundedTraceEvents = traceEvents.filter((e) => e.ts >= startTime && e.ts < endTime);
        const trace2 = {
          traceEvents: boundedTraceEvents
        };
        const requests = createNetworkRequests2(trace2, data32, startTime, endTime);
        const graph3 = createGraph2(requests, trace2, data32);
        const processedNavigation = createProcessedNavigation2(data32, frameId, navigation2);
        const networkAnalysis = NetworkAnalyzer2.analyze(requests);
        if (!networkAnalysis) {
          return;
        }
        const lanternSettings = {
          networkAnalysis,
          throttlingMethod: "provided",
          ...options2.lanternSettings
        };
        const simulator = Simulator2.createSimulator(lanternSettings);
        const computeData = { graph: graph3, simulator, processedNavigation };
        const fcpResult = FirstContentfulPaint2.compute(computeData);
        const lcpResult = LargestContentfulPaint2.compute(computeData, { fcpResult });
        const interactiveResult = Interactive2.compute(computeData, { lcpResult });
        const tbtResult = TotalBlockingTime2.compute(computeData, { fcpResult, interactiveResult });
        const metrics2 = {
          firstContentfulPaint: fcpResult,
          interactive: interactiveResult,
          largestContentfulPaint: lcpResult,
          totalBlockingTime: tbtResult
        };
        return { requests, graph: graph3, simulator, metrics: metrics2 };
      }
      sortInsightSet(insightSet, metadata2) {
        const baselineOrder = {
          INPBreakdown: null,
          LCPBreakdown: null,
          LCPDiscovery: null,
          CLSCulprits: null,
          RenderBlocking: null,
          NetworkDependencyTree: null,
          ImageDelivery: null,
          DocumentLatency: null,
          FontDisplay: null,
          Viewport: null,
          DOMSize: null,
          ThirdParties: null,
          DuplicatedJavaScript: null,
          SlowCSSSelector: null,
          ForcedReflow: null,
          Cache: null,
          ModernHTTP: null,
          LegacyJavaScript: null
        };
        const weights = calculateMetricWeightsForSorting2(insightSet, metadata2);
        const observedLcpMicro = getLCP2(insightSet)?.value;
        const observedLcp = observedLcpMicro ? microToMilli2(observedLcpMicro) : Milli2(0);
        const observedCls = getCLS2(insightSet).value;
        const observedInpMicro = getINP2(insightSet)?.value;
        const observedInp = observedInpMicro ? microToMilli2(observedInpMicro) : Milli2(200);
        const observedLcpScore = observedLcp !== void 0 ? evaluateLCPMetricScore2(observedLcp) : void 0;
        const observedInpScore = evaluateINPMetricScore2(observedInp);
        const observedClsScore = evaluateCLSMetricScore2(observedCls);
        const insightToSortingRank = /* @__PURE__ */ new Map();
        for (const [name, insight] of Object.entries(insightSet.model)) {
          const lcp = insight.metricSavings?.LCP ?? 0;
          const inp = insight.metricSavings?.INP ?? 0;
          const cls = insight.metricSavings?.CLS ?? 0;
          const lcpPostSavings = observedLcp !== void 0 ? Math.max(0, observedLcp - lcp) : void 0;
          const inpPostSavings = Math.max(0, observedInp - inp);
          const clsPostSavings = Math.max(0, observedCls - cls);
          let score = 0;
          if (weights.lcp && lcp && observedLcpScore !== void 0 && lcpPostSavings !== void 0) {
            score += weights.lcp * (evaluateLCPMetricScore2(lcpPostSavings) - observedLcpScore);
          }
          if (weights.inp && inp && observedInpScore !== void 0) {
            score += weights.inp * (evaluateINPMetricScore2(inpPostSavings) - observedInpScore);
          }
          if (weights.cls && cls && observedClsScore !== void 0) {
            score += weights.cls * (evaluateCLSMetricScore2(clsPostSavings) - observedClsScore);
          }
          insightToSortingRank.set(name, score);
        }
        const baselineOrderKeys = Object.keys(baselineOrder);
        const orderedKeys = Object.keys(insightSet.model);
        orderedKeys.sort((a, b) => {
          const a1 = baselineOrderKeys.indexOf(a);
          const b1 = baselineOrderKeys.indexOf(b);
          if (a1 >= 0 && b1 >= 0) {
            return a1 - b1;
          }
          if (a1 >= 0) {
            return -1;
          }
          if (b1 >= 0) {
            return 1;
          }
          return 0;
        });
        orderedKeys.sort((a, b) => (insightToSortingRank.get(b) ?? 0) - (insightToSortingRank.get(a) ?? 0));
        const newModel = {};
        for (const key of orderedKeys) {
          const model3 = insightSet.model[key];
          newModel[key] = model3;
        }
        insightSet.model = newModel;
      }
      #computeInsightSet(data32, context2) {
        const logger2 = context2.options.logger;
        if (!this.#insights) {
          this.#insights = /* @__PURE__ */ new Map();
        }
        let id2, urlString, navigation2;
        if (context2.navigation) {
          id2 = `NAVIGATION_${this.#insights.size}`;
          urlString = data32.Meta.finalDisplayUrlByNavigationId.get(context2.navigationId) ?? data32.Meta.mainFrameURL;
          navigation2 = context2.navigation;
        } else {
          id2 = NO_NAVIGATION2;
          urlString = data32.Meta.finalDisplayUrlByNavigationId.get("") ?? data32.Meta.mainFrameURL;
        }
        const insightSetModel = {};
        const insightSetModelErrors = {};
        for (const [name, insight] of Object.entries(_a$2.getInsightRunners())) {
          try {
            logger2?.start(`insights:${name}`);
            const model3 = insight.generateInsight(data32, context2);
            model3.frameId = context2.frameId;
            const navId = context2.navigation?.args.data?.navigationId;
            if (navId) {
              model3.navigation = context2.navigation;
            }
            model3.createOverlays = () => {
              return insight.createOverlays(model3);
            };
            Object.assign(insightSetModel, { [name]: model3 });
          } catch (err) {
            Object.assign(insightSetModelErrors, { [name]: err });
          } finally {
            logger2?.end(`insights:${name}`);
          }
        }
        const isNavigation = id2 === NO_NAVIGATION2;
        const trivialThreshold = milliToMicro2(Milli2(5e3));
        const everyInsightPasses = Object.values(insightSetModel).every((model3) => model3 && model3.state === "pass");
        const noLcp = !insightSetModel.LCPBreakdown?.lcpEvent;
        const noInp = !insightSetModel.INPBreakdown?.longestInteractionEvent;
        const noLayoutShifts = insightSetModel.CLSCulprits?.shifts?.size === 0;
        const shouldExclude = isNavigation && context2.bounds.range < trivialThreshold && everyInsightPasses && noLcp && noInp && noLayoutShifts;
        if (shouldExclude) {
          return;
        }
        let url;
        try {
          url = new URL(urlString);
        } catch {
          return;
        }
        const insightSet = {
          id: id2,
          url,
          navigation: navigation2,
          frameId: context2.frameId,
          bounds: context2.bounds,
          model: insightSetModel,
          modelErrors: insightSetModelErrors
        };
        this.#insights.set(insightSet.id, insightSet);
        this.sortInsightSet(insightSet, context2.options.metadata ?? null);
      }
      #computeInsights(data32, traceEvents, options2) {
        this.#insights = /* @__PURE__ */ new Map();
        const navigations = data32.Meta.mainFrameNavigations.filter((navigation2) => navigation2.args.frame && navigation2.args.data?.navigationId);
        this.#computeInsightsForInitialTracePeriod(data32, navigations, options2);
        for (const [index2, navigation2] of navigations.entries()) {
          const min = navigation2.ts;
          const max = index2 + 1 < navigations.length ? navigations[index2 + 1].ts : data32.Meta.traceBounds.max;
          const bounds = traceWindowFromMicroSeconds2(min, max);
          this.#computeInsightsForNavigation(navigation2, bounds, data32, traceEvents, options2);
        }
      }
      #computeInsightsForInitialTracePeriod(data32, navigations, options2) {
        const bounds = navigations.length > 0 ? traceWindowFromMicroSeconds2(data32.Meta.traceBounds.min, navigations[0].ts) : data32.Meta.traceBounds;
        const context2 = {
          options: options2,
          bounds,
          frameId: data32.Meta.mainFrameId
        };
        this.#computeInsightSet(data32, context2);
      }
      #computeInsightsForNavigation(navigation2, bounds, data32, traceEvents, options2) {
        const frameId = navigation2.args.frame;
        const navigationId = navigation2.args.data?.navigationId;
        let lantern$1;
        try {
          options2.logger?.start("insights:createLanternContext");
          lantern$1 = this.#createLanternContext(data32, traceEvents, frameId, navigation2, options2);
        } catch (e) {
          const expectedErrors = [
            "mainDocumentRequest not found",
            "missing metric scores for main frame",
            "missing metric: FCP",
            "missing metric: LCP",
            "No network requests found in trace",
            "Trace is too old"
          ];
          if (!(e instanceof LanternError2)) {
            console.error(e);
          } else if (!expectedErrors.some((err) => e.message === err)) {
            console.error(e);
          }
        } finally {
          options2.logger?.end("insights:createLanternContext");
        }
        const context2 = {
          options: options2,
          bounds,
          frameId,
          navigation: navigation2,
          navigationId,
          lantern: lantern$1
        };
        this.#computeInsightSet(data32, context2);
      }
    };
    _a$2 = TraceProcessor3;
    Processor = /* @__PURE__ */ Object.freeze({
      __proto__: null,
      TraceParseProgressEvent: TraceParseProgressEvent2,
      TraceProcessor: TraceProcessor3,
      sortHandlers: sortHandlers2
    });
    Model = class _Model extends EventTarget {
      #traces = [];
      #nextNumberByDomain = /* @__PURE__ */ new Map();
      #recordingsAvailable = [];
      #lastRecordingIndex = 0;
      #processor;
      #config = defaults2();
      static createWithAllHandlers(config4) {
        return new _Model(ModelHandlers, config4);
      }
      static createWithSubsetOfHandlers(traceHandlers, config4) {
        return new _Model(traceHandlers, config4);
      }
      constructor(handlers2, config4) {
        super();
        if (config4) {
          this.#config = config4;
        }
        this.#processor = new TraceProcessor3(handlers2, this.#config);
      }
      async parse(traceEvents, config4 = {}) {
        if (config4.showAllEvents === void 0) {
          config4.showAllEvents = this.#config.showAllEvents;
        }
        const metadata2 = config4.metadata || {};
        const onTraceUpdate = (event) => {
          const { data: data32 } = event;
          this.dispatchEvent(new ModelUpdateEvent({ type: "PROGRESS_UPDATE", data: data32 }));
        };
        this.#processor.addEventListener(TraceParseProgressEvent2.eventName, onTraceUpdate);
        const syntheticEventsManager = SyntheticEventsManager2.createAndActivate(traceEvents);
        try {
          await this.#processor.parse(traceEvents, config4);
          if (!this.#processor.data) {
            throw new Error("processor did not parse trace");
          }
          const file2 = this.#storeAndCreateParsedTraceFile(syntheticEventsManager, traceEvents, metadata2, this.#processor.data, this.#processor.insights);
          this.#traces.push(file2);
        } catch (e) {
          throw e;
        } finally {
          this.#processor.removeEventListener(TraceParseProgressEvent2.eventName, onTraceUpdate);
          this.dispatchEvent(new ModelUpdateEvent({ type: "COMPLETE", data: "done" }));
        }
      }
      #storeAndCreateParsedTraceFile(syntheticEventsManager, traceEvents, metadata2, data32, traceInsights) {
        this.#lastRecordingIndex++;
        let recordingName = `Trace ${this.#lastRecordingIndex}`;
        const origin = extractOriginFromTrace2(data32.Meta.mainFrameURL);
        if (origin) {
          const nextSequenceForDomain = getWithDefault2(this.#nextNumberByDomain, origin, () => 1);
          recordingName = `${origin} (${nextSequenceForDomain})`;
          this.#nextNumberByDomain.set(origin, nextSequenceForDomain + 1);
        }
        this.#recordingsAvailable.push(recordingName);
        return {
          traceEvents,
          metadata: metadata2,
          data: data32,
          insights: traceInsights,
          syntheticEventsManager
        };
      }
      lastTraceIndex() {
        return this.size() - 1;
      }
      parsedTrace(index2 = this.#traces.length - 1) {
        return this.#traces.at(index2) ?? null;
      }
      overrideModifications(index2, newModifications) {
        if (this.#traces[index2]) {
          this.#traces[index2].metadata.modifications = newModifications;
        }
      }
      syntheticTraceEventsManager(index2 = this.#traces.length - 1) {
        return this.#traces.at(index2)?.syntheticEventsManager ?? null;
      }
      size() {
        return this.#traces.length;
      }
      deleteTraceByIndex(recordingIndex) {
        this.#traces.splice(recordingIndex, 1);
        this.#recordingsAvailable.splice(recordingIndex, 1);
      }
      getRecordingsAvailable() {
        return this.#recordingsAvailable;
      }
      resetProcessor() {
        this.#processor.reset();
      }
    };
    ModelUpdateEvent = class _ModelUpdateEvent extends Event {
      data;
      static eventName = "modelupdate";
      constructor(data32) {
        super(_ModelUpdateEvent.eventName);
        this.data = data32;
      }
    };
    ModelImpl = /* @__PURE__ */ Object.freeze({
      __proto__: null,
      Model,
      ModelUpdateEvent,
      isModelUpdateDataComplete
    });
    UIStrings$s = {
      loading: "Loading",
      experience: "Experience",
      scripting: "Scripting",
      rendering: "Rendering",
      painting: "Painting",
      gpu: "GPU",
      async: "Async",
      system: "System",
      idle: "Idle",
      task: "Task",
      consoleTaskRun: "Run console task",
      other: "Other",
      animation: "Animation",
      event: "Event",
      requestMainThreadFrame: "Request main thread frame",
      frameStart: "Frame start",
      onMessage: "On message",
      schedulePostMessage: "Schedule postMessage",
      messaging: "Messaging",
      frameStartMainThread: "Frame start (main thread)",
      drawFrame: "Draw frame",
      profilingOverhead: "Profiling overhead",
      hitTest: "Hit test",
      scheduleStyleRecalculation: "Schedule style recalculation",
      recalculateStyle: "Recalculate style",
      invalidateLayout: "Invalidate Layout",
      layerize: "Layerize",
      layout: "Layout",
      paintSetup: "Paint setup",
      paintImage: "Paint image",
      prePaint: "Pre-paint",
      updateLayer: "Update layer",
      updateLayerTree: "Update layer tree",
      paint: "Paint",
      rasterizePaint: "Rasterize paint",
      scroll: "Scroll",
      commit: "Commit",
      compositeLayers: "Composite layers",
      computeIntersections: "Compute intersections",
      parseHtml: "Parse HTML",
      parseStylesheet: "Parse stylesheet",
      installTimer: "Install timer",
      removeTimer: "Remove timer",
      timerFired: "Timer fired",
      xhrReadyStateChange: "`XHR` `readyState` change",
      xhrLoad: "`XHR` load",
      compileScript: "Compile script",
      cacheScript: "Cache script code",
      compileCode: "Compile code",
      optimizeCode: "Optimize code",
      evaluateScript: "Evaluate script",
      compileModule: "Compile module",
      cacheModule: "Cache module code",
      evaluateModule: "Evaluate module",
      streamingCompileTask: "Streaming compile task",
      waitingForNetwork: "Waiting for network",
      parseAndCompile: "Parse and compile",
      deserializeCodeCache: "Deserialize code cache",
      streamingWasmResponse: "Streaming Wasm response",
      compiledWasmModule: "Compiled Wasm module",
      cachedWasmModule: "Cached Wasm module",
      wasmModuleCacheHit: "Wasm module cache hit",
      wasmModuleCacheInvalid: "Wasm module cache invalid",
      frameStartedLoading: "Frame started loading",
      onloadEvent: "Onload event",
      domcontentloadedEvent: "DOMContentLoaded event",
      firstPaint: "First Paint",
      firstContentfulPaint: "First Contentful Paint",
      largestContentfulPaint: "Largest Contentful Paint",
      softLargestContentfulPaint: "Soft Largest Contentful Paint",
      timestamp: "Timestamp",
      consoleTime: "Console time",
      userTiming: "User timing",
      willSendRequest: "Will send request",
      sendRequest: "Send request",
      receiveResponse: "Receive response",
      finishLoading: "Finish loading",
      receiveData: "Receive data",
      runMicrotasks: "Run microtasks",
      functionCall: "Function call",
      gcEvent: "GC event",
      majorGc: "Major GC",
      minorGc: "Minor GC",
      requestAnimationFrame: "Request animation frame",
      cancelAnimationFrame: "Cancel animation frame",
      animationFrameFired: "Animation frame fired",
      requestIdleCallback: "Request idle callback",
      cancelIdleCallback: "Cancel idle callback",
      fireIdleCallback: "Fire idle callback",
      createWebsocket: "Create WebSocket",
      sendWebsocketHandshake: "Send WebSocket handshake",
      receiveWebsocketHandshake: "Receive WebSocket handshake",
      wsMessageReceived: "Receive WebSocket message",
      wsMessageSent: "Send WebSocket message",
      destroyWebsocket: "Destroy WebSocket",
      embedderCallback: "Embedder callback",
      imageDecode: "Image decode",
      domGc: "DOM GC",
      cppGc: "C++ GC",
      encrypt: "Encrypt",
      encryptReply: "Encrypt reply",
      decrypt: "Decrypt",
      decryptReply: "Decrypt reply",
      digest: "Digest",
      digestReply: "Digest reply",
      sign: "Sign",
      signReply: "Sign reply",
      verify: "Verify",
      verifyReply: "Verify reply",
      asyncTask: "Async task",
      layoutShift: "Layout shift",
      layoutShiftCluster: "Layout shift cluster",
      eventTiming: "Event timing",
      jsFrame: "JS frame",
      rasterizing: "Rasterizing",
      drawing: "Drawing",
      schedulePostTaskCallback: "Schedule postTask",
      runPostTaskCallback: "Fire postTask",
      abortPostTaskCallback: "Cancel postTask"
    };
    (function(EventCategory3) {
      EventCategory3["DRAWING"] = "drawing";
      EventCategory3["RASTERIZING"] = "rasterizing";
      EventCategory3["LAYOUT"] = "layout";
      EventCategory3["LOADING"] = "loading";
      EventCategory3["EXPERIENCE"] = "experience";
      EventCategory3["SCRIPTING"] = "scripting";
      EventCategory3["MESSAGING"] = "messaging";
      EventCategory3["RENDERING"] = "rendering";
      EventCategory3["PAINTING"] = "painting";
      EventCategory3["GPU"] = "gpu";
      EventCategory3["ASYNC"] = "async";
      EventCategory3["OTHER"] = "other";
      EventCategory3["IDLE"] = "idle";
    })(EventCategory2 || (EventCategory2 = {}));
    str_$r = registerUIStrings("models/trace/Styles.ts", UIStrings$s);
    i18nString$d = getLocalizedString.bind(void 0, str_$r);
    TimelineRecordStyle = class {
      title;
      category;
      hidden;
      constructor(title2, category, hidden = false) {
        this.title = title2;
        this.category = category;
        this.hidden = hidden;
      }
    };
    TimelineCategory = class {
      name;
      title;
      visible;
      #hidden;
      #cssVariable;
      constructor(name, title2, visible, cssVariable) {
        this.name = name;
        this.title = title2;
        this.visible = visible;
        this.#cssVariable = cssVariable;
        this.hidden = false;
      }
      get hidden() {
        return Boolean(this.#hidden);
      }
      get cssVariable() {
        return this.#cssVariable;
      }
      getCSSValue() {
        return `var(${this.#cssVariable})`;
      }
      set hidden(hidden) {
        this.#hidden = hidden;
      }
    };
    Styles = /* @__PURE__ */ Object.freeze({
      __proto__: null,
      get EventCategory() {
        return EventCategory2;
      },
      TimelineCategory,
      TimelineRecordStyle,
      getCategoryStyles,
      getEventStyle,
      getTimelineMainEventCategories,
      markerDetailsForEvent,
      maybeInitSylesMap,
      setCategories,
      setEventStylesMap,
      setTimelineMainEventCategories,
      stringIsEventCategory,
      visibleTypes
    });
    UIStrings$r = {
      anonymous: "(anonymous)",
      eventDispatchS: "Event: {PH1}",
      frame: "Frame",
      wsConnectionOpened: "WebSocket opened",
      wsConnectionOpenedWithUrl: "WebSocket opened: {PH1}",
      wsConnectionClosed: "WebSocket closed",
      layoutShift: "Layout shift"
    };
    str_$q = registerUIStrings("models/trace/Name.ts", UIStrings$r);
    i18nString$c = getLocalizedString.bind(void 0, str_$q);
    Name2 = /* @__PURE__ */ Object.freeze({
      __proto__: null,
      forEntry
    });
    trace = /* @__PURE__ */ Object.freeze({
      __proto__: null,
      EntityMapper: EntityMapper$1,
      EventsSerializer: EventsSerializer$1,
      Extras: extras,
      Handlers: handlers,
      Helpers: helpers,
      Insights: insights,
      Lantern: lantern,
      LanternComputationData,
      Name: Name2,
      Processor,
      Styles,
      TraceModel: ModelImpl,
      Types: types$3
    });
    instance = null;
    Prototypes = class _Prototypes {
      constructor() {
      }
      static instance() {
        if (instance) {
          return instance;
        }
        instance = new _Prototypes();
        return instance;
      }
      isEnabled(setting) {
        const greendevFlagEnabled = Boolean(hostConfig.devToolsGreenDevUi?.enabled);
        return greendevFlagEnabled && this.settings()[setting].get();
      }
      settings() {
        const settings = Settings.instance();
        const aiAnnotations = settings.createSetting("greendev-ai-annotations-enabled", false, "Local");
        const copyToGemini = settings.createSetting("greendev-copy-to-gemini-enabled", false, "Local");
        const breakpointDebuggerAgent = settings.createSetting("greendev-breakpoint-debugger-agent-enabled", false, "Local");
        return { aiAnnotations, copyToGemini, breakpointDebuggerAgent };
      }
    };
    (function(AnnotationType2) {
      AnnotationType2[AnnotationType2["ELEMENT_NODE"] = 0] = "ELEMENT_NODE";
      AnnotationType2[AnnotationType2["STYLE_RULE"] = 1] = "STYLE_RULE";
      AnnotationType2[AnnotationType2["NETWORK_REQUEST"] = 2] = "NETWORK_REQUEST";
      AnnotationType2[AnnotationType2["NETWORK_REQUEST_SUBPANEL_HEADERS"] = 3] = "NETWORK_REQUEST_SUBPANEL_HEADERS";
    })(AnnotationType || (AnnotationType = {}));
    AnnotationRepository = class _AnnotationRepository {
      static #instance = null;
      static #hasRepliedGreenDevDisabled = false;
      static #hasShownFlagWarning = false;
      #events = new ObjectWrapper();
      #annotationData = [];
      #nextId = 0;
      static instance() {
        if (!_AnnotationRepository.#instance) {
          _AnnotationRepository.#instance = new _AnnotationRepository();
        }
        return _AnnotationRepository.#instance;
      }
      static annotationsEnabled() {
        const enabled = Prototypes.instance().isEnabled("aiAnnotations");
        if (!enabled) {
          this.#hasRepliedGreenDevDisabled = true;
        } else if (this.#hasRepliedGreenDevDisabled && !this.#hasShownFlagWarning) {
          console.warn("Flag controlling GreenDev has flipped from false to true. Only some callers will expect GreenDev to be enabled, which can lead to unexpected results.");
          this.#hasShownFlagWarning = true;
        }
        return Boolean(enabled);
      }
      addEventListener(eventType, listener, thisObject) {
        if (!_AnnotationRepository.annotationsEnabled()) {
          console.warn("Received request to add event listener with annotations disabled");
        }
        return this.#events.addEventListener(eventType, listener, thisObject);
      }
      getAnnotationDataByType(type2) {
        if (!_AnnotationRepository.annotationsEnabled()) {
          console.warn("Received query for annotation types with annotations disabled");
          return [];
        }
        const annotations = this.#annotationData.filter((annotation) => annotation.type === type2);
        return annotations;
      }
      getAnnotationDataById(id2) {
        if (!_AnnotationRepository.annotationsEnabled()) {
          console.warn("Received query for annotation type with annotations disabled");
          return void 0;
        }
        return this.#annotationData.find((annotation) => annotation.id === id2);
      }
      #getExistingAnnotation(type2, anchor) {
        const annotations = this.getAnnotationDataByType(type2);
        const annotation = annotations.find((annotation2) => {
          if (typeof anchor === "string") {
            return annotation2.lookupId === anchor;
          }
          switch (type2) {
            case AnnotationType.ELEMENT_NODE: {
              const elementAnnotation = annotation2;
              return elementAnnotation.anchor === anchor;
            }
            case AnnotationType.NETWORK_REQUEST_SUBPANEL_HEADERS: {
              const networkRequestDetailsAnnotation = annotation2;
              return networkRequestDetailsAnnotation.anchor === anchor;
            }
            default:
              console.warn("[AnnotationRepository] Unknown AnnotationType", type2);
              return false;
          }
        });
        return annotation;
      }
      #updateExistingAnnotationLabel(label, type2, anchor) {
        const annotation = this.#getExistingAnnotation(type2, anchor);
        if (annotation) {
          annotation.message = label;
          return true;
        }
        return false;
      }
      addElementsAnnotation(label, anchor, anchorToString) {
        if (!_AnnotationRepository.annotationsEnabled()) {
          console.warn("Received annotation registration with annotations disabled");
          return;
        }
        if (this.#updateExistingAnnotationLabel(label, AnnotationType.ELEMENT_NODE, anchor)) {
          return;
        }
        const annotationData = {
          id: this.#nextId++,
          type: AnnotationType.ELEMENT_NODE,
          message: label,
          lookupId: typeof anchor === "string" ? anchor : "",
          anchor: typeof anchor !== "string" ? anchor : void 0,
          anchorToString
        };
        this.#annotationData.push(annotationData);
        console.log("[AnnotationRepository] Added element annotation:", label, {
          annotationData,
          annotations: this.#annotationData.length
        });
        this.#events.dispatchEventToListeners("AnnotationAdded", annotationData);
      }
      addNetworkRequestAnnotation(label, anchor, anchorToString) {
        if (!_AnnotationRepository.annotationsEnabled()) {
          console.warn("Received annotation registration with annotations disabled");
          return;
        }
        if (this.#updateExistingAnnotationLabel(label, AnnotationType.NETWORK_REQUEST_SUBPANEL_HEADERS, anchor)) {
          return;
        }
        const annotationData = {
          id: this.#nextId++,
          type: AnnotationType.NETWORK_REQUEST,
          message: "",
          lookupId: typeof anchor === "string" ? anchor : "",
          anchor: typeof anchor !== "string" ? anchor : void 0,
          anchorToString
        };
        this.#annotationData.push(annotationData);
        console.log("[AnnotationRepository] Added annotation:", label, {
          annotationData,
          annotations: this.#annotationData.length
        });
        this.#events.dispatchEventToListeners("AnnotationAdded", annotationData);
        const annotationDetailsData = {
          id: this.#nextId++,
          type: AnnotationType.NETWORK_REQUEST_SUBPANEL_HEADERS,
          message: label,
          lookupId: typeof anchor === "string" ? anchor : "",
          anchor: typeof anchor !== "string" ? anchor : void 0,
          anchorToString
        };
        this.#annotationData.push(annotationDetailsData);
        this.#events.dispatchEventToListeners("AnnotationAdded", annotationDetailsData);
      }
      deleteAllAnnotations() {
        this.#annotationData = [];
        this.#events.dispatchEventToListeners("AllAnnotationsDeleted");
        console.log("[AnnotationRepository] Deleting all annotations");
      }
      deleteAnnotation(id2) {
        const index2 = this.#annotationData.findIndex((annotation) => annotation.id === id2);
        if (index2 === -1) {
          console.warn(`[AnnotationRepository] Could not find annotation with id ${id2}`);
          return;
        }
        this.#annotationData.splice(index2, 1);
        this.#events.dispatchEventToListeners("AnnotationDeleted", { id: id2 });
        console.log(`[AnnotationRepository] Deleted annotation with id ${id2}`);
      }
    };
    Size = class _Size {
      width;
      height;
      constructor(width, height) {
        this.width = width;
        this.height = height;
      }
      clipTo(size) {
        if (!size) {
          return this;
        }
        return new _Size(Math.min(this.width, size.width), Math.min(this.height, size.height));
      }
      scale(scale) {
        return new _Size(this.width * scale, this.height * scale);
      }
      isEqual(size) {
        return size !== null && this.width === size.width && this.height === size.height;
      }
      widthToMax(size) {
        return new _Size(Math.max(this.width, typeof size === "number" ? size : size.width), this.height);
      }
      addWidth(size) {
        return new _Size(this.width + (typeof size === "number" ? size : size.width), this.height);
      }
      heightToMax(size) {
        return new _Size(this.width, Math.max(this.height, typeof size === "number" ? size : size.height));
      }
      addHeight(size) {
        return new _Size(this.width, this.height + (typeof size === "number" ? size : size.height));
      }
    };
    UIStrings$q = {
      laptopWithTouch: "Laptop with touch",
      laptopWithHiDPIScreen: "Laptop with HiDPI screen",
      laptopWithMDPIScreen: "Laptop with MDPI screen"
    };
    str_$p = registerUIStrings("models/emulation/EmulatedDevices.ts", UIStrings$q);
    i18nLazyString$b = getLazilyComputedLocalizedString.bind(void 0, str_$p);
    Horizontal = "horizontal";
    Vertical = "vertical";
    HorizontalSpanned = "horizontal-spanned";
    VerticalSpanned = "vertical-spanned";
    (function(Type2) {
      Type2["Phone"] = "phone";
      Type2["Tablet"] = "tablet";
      Type2["Notebook"] = "notebook";
      Type2["Desktop"] = "desktop";
      Type2["Unknown"] = "unknown";
    })(Type$1 || (Type$1 = {}));
    (function(Show2) {
      Show2["Always"] = "Always";
      Show2["Default"] = "Default";
      Show2["Never"] = "Never";
    })(Show || (Show = {}));
    [
      {
        "order": 10,
        "show-by-default": true,
        "title": "iPhone SE",
        "screen": {
          "horizontal": {
            "width": 667,
            "height": 375
          },
          "device-pixel-ratio": 2,
          "vertical": {
            "width": 375,
            "height": 667
          }
        },
        "capabilities": ["touch", "mobile"],
        "user-agent": "Mozilla/5.0 (iPhone; CPU iPhone OS 18_5 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/18.5 Mobile/15E148 Safari/604.1",
        "user-agent-metadata": { "platform": "iOS", "platformVersion": "18.5", "architecture": "", "model": "iPhone", "mobile": true },
        "type": "phone"
      },
      {
        "order": 12,
        "show-by-default": true,
        "title": "iPhone XR",
        "screen": {
          "horizontal": {
            "width": 896,
            "height": 414
          },
          "device-pixel-ratio": 2,
          "vertical": {
            "width": 414,
            "height": 896
          }
        },
        "capabilities": ["touch", "mobile"],
        "user-agent": "Mozilla/5.0 (iPhone; CPU iPhone OS 18_5 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/18.5 Mobile/15E148 Safari/604.1",
        "user-agent-metadata": { "platform": "iOS", "platformVersion": "18.5", "architecture": "", "model": "iPhone", "mobile": true },
        "type": "phone"
      },
      {
        "order": 14,
        "show-by-default": true,
        "title": "iPhone 12 Pro",
        "screen": {
          "horizontal": {
            "width": 844,
            "height": 390
          },
          "device-pixel-ratio": 3,
          "vertical": {
            "width": 390,
            "height": 844
          }
        },
        "capabilities": ["touch", "mobile"],
        "user-agent": "Mozilla/5.0 (iPhone; CPU iPhone OS 18_5 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/18.5 Mobile/15E148 Safari/604.1",
        "user-agent-metadata": { "platform": "iOS", "platformVersion": "18.5", "architecture": "", "model": "iPhone", "mobile": true },
        "type": "phone"
      },
      {
        "order": 15,
        "show-by-default": true,
        "title": "iPhone 14 Pro Max",
        "screen": {
          "horizontal": {
            "width": 932,
            "height": 430
          },
          "device-pixel-ratio": 3,
          "vertical": {
            "width": 430,
            "height": 932
          }
        },
        "capabilities": ["touch", "mobile"],
        "user-agent": "Mozilla/5.0 (iPhone; CPU iPhone OS 18_5 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/18.5 Mobile/15E148 Safari/604.1",
        "user-agent-metadata": { "platform": "iOS", "platformVersion": "18.5", "architecture": "", "model": "iPhone", "mobile": true },
        "type": "phone"
      },
      {
        "order": 16,
        "show-by-default": false,
        "title": "Pixel 3 XL",
        "screen": {
          "horizontal": {
            "width": 786,
            "height": 393
          },
          "device-pixel-ratio": 2.75,
          "vertical": {
            "width": 393,
            "height": 786
          }
        },
        "capabilities": ["touch", "mobile"],
        "user-agent": "Mozilla/5.0 (Linux; Android 11; Pixel 3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/%s Mobile Safari/537.36",
        "user-agent-metadata": { "platform": "Android", "platformVersion": "11", "architecture": "", "model": "Pixel 3", "mobile": true },
        "type": "phone"
      },
      {
        "order": 18,
        "show-by-default": true,
        "title": "Pixel 7",
        "screen": {
          "horizontal": {
            "width": 915,
            "height": 412
          },
          "device-pixel-ratio": 2.625,
          "vertical": {
            "width": 412,
            "height": 915
          }
        },
        "capabilities": ["touch", "mobile"],
        "user-agent": "Mozilla/5.0 (Linux; Android 13; Pixel 7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/%s Mobile Safari/537.36",
        "user-agent-metadata": { "platform": "Android", "platformVersion": "13", "architecture": "", "model": "Pixel 5", "mobile": true },
        "type": "phone"
      },
      {
        "order": 20,
        "show-by-default": true,
        "title": "Samsung Galaxy S8+",
        "screen": {
          "horizontal": {
            "width": 740,
            "height": 360
          },
          "device-pixel-ratio": 4,
          "vertical": {
            "width": 360,
            "height": 740
          }
        },
        "capabilities": ["touch", "mobile"],
        "user-agent": "Mozilla/5.0 (Linux; Android 8.0.0; SM-G955U Build/R16NW) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/%s Mobile Safari/537.36",
        "user-agent-metadata": { "platform": "Android", "platformVersion": "8.0.0", "architecture": "", "model": "SM-G955U", "mobile": true },
        "type": "phone"
      },
      {
        "order": 24,
        "show-by-default": true,
        "title": "Samsung Galaxy S20 Ultra",
        "screen": {
          "horizontal": {
            "width": 915,
            "height": 412
          },
          "device-pixel-ratio": 3.5,
          "vertical": {
            "width": 412,
            "height": 915
          }
        },
        "capabilities": ["touch", "mobile"],
        "user-agent": "Mozilla/5.0 (Linux; Android 13; SM-G981B) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/%s Mobile Safari/537.36",
        "user-agent-metadata": { "platform": "Android", "platformVersion": "13", "architecture": "", "model": "SM-G981B", "mobile": true },
        "type": "phone"
      },
      {
        "order": 26,
        "show-by-default": true,
        "title": "iPad Mini",
        "screen": {
          "horizontal": {
            "width": 1024,
            "height": 768
          },
          "device-pixel-ratio": 2,
          "vertical": {
            "width": 768,
            "height": 1024
          }
        },
        "capabilities": ["touch", "mobile"],
        "user-agent": "Mozilla/5.0 (iPad; CPU OS 18_5 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/18.5 Mobile/15E148 Safari/604.1",
        "user-agent-metadata": { "platform": "iOS", "platformVersion": "18.5", "architecture": "", "model": "iPad", "mobile": true },
        "type": "tablet"
      },
      {
        "order": 28,
        "show-by-default": true,
        "title": "iPad Air",
        "screen": {
          "horizontal": {
            "width": 1180,
            "height": 820
          },
          "device-pixel-ratio": 2,
          "vertical": {
            "width": 820,
            "height": 1180
          }
        },
        "capabilities": ["touch", "mobile"],
        "user-agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/18.5 Safari/605.1.15",
        "user-agent-metadata": { "platform": "iOS", "platformVersion": "18.5", "architecture": "", "model": "iPad", "mobile": true },
        "type": "tablet"
      },
      {
        "order": 29,
        "show-by-default": true,
        "title": "iPad Pro",
        "screen": {
          "horizontal": {
            "width": 1366,
            "height": 1024
          },
          "device-pixel-ratio": 2,
          "vertical": {
            "width": 1024,
            "height": 1366
          }
        },
        "capabilities": ["touch", "mobile"],
        "user-agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/18.5 Safari/605.1.15",
        "user-agent-metadata": { "platform": "iOS", "platformVersion": "18.5", "architecture": "", "model": "iPad", "mobile": true },
        "type": "tablet"
      },
      {
        "order": 30,
        "show-by-default": true,
        "title": "Surface Pro 7",
        "screen": {
          "horizontal": {
            "width": 1368,
            "height": 912
          },
          "device-pixel-ratio": 2,
          "vertical": {
            "width": 912,
            "height": 1368
          }
        },
        "capabilities": ["touch", "mobile"],
        "user-agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/%s Safari/537.36",
        "type": "tablet"
      },
      {
        "order": 32,
        "show-by-default": true,
        "dual-screen": true,
        "title": "Surface Duo",
        "screen": {
          "horizontal": { "width": 720, "height": 540 },
          "device-pixel-ratio": 2.5,
          "vertical": { "width": 540, "height": 720 },
          "vertical-spanned": {
            "width": 1114,
            "height": 720,
            "hinge": { "width": 34, "height": 720, "x": 540, "y": 0, "contentColor": { "r": 38, "g": 38, "b": 38, "a": 1 } }
          },
          "horizontal-spanned": {
            "width": 720,
            "height": 1114,
            "hinge": { "width": 720, "height": 34, "x": 0, "y": 540, "contentColor": { "r": 38, "g": 38, "b": 38, "a": 1 } }
          }
        },
        "capabilities": ["touch", "mobile"],
        "user-agent": "Mozilla/5.0 (Linux; Android 11.0; Surface Duo) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/%s Mobile Safari/537.36",
        "user-agent-metadata": { "platform": "Android", "platformVersion": "11.0", "architecture": "", "model": "Surface Duo", "mobile": true },
        "type": "phone",
        "modes": [
          { "title": "default", "orientation": "vertical", "insets": { "left": 0, "top": 0, "right": 0, "bottom": 0 } },
          { "title": "default", "orientation": "horizontal", "insets": { "left": 0, "top": 0, "right": 0, "bottom": 0 } },
          { "title": "spanned", "orientation": "vertical-spanned", "insets": { "left": 0, "top": 0, "right": 0, "bottom": 0 } },
          {
            "title": "spanned",
            "orientation": "horizontal-spanned",
            "insets": { "left": 0, "top": 0, "right": 0, "bottom": 0 }
          }
        ]
      },
      {
        "order": 34,
        "show-by-default": true,
        "foldable-screen": true,
        "title": "Galaxy Z Fold 5",
        "screen": {
          "horizontal": { "width": 882, "height": 344 },
          "device-pixel-ratio": 2.625,
          "vertical": { "width": 344, "height": 882 },
          "vertical-spanned": {
            "width": 690,
            "height": 829,
            "hinge": {
              "width": 0,
              "height": 829,
              "x": 345,
              "y": 0,
              "contentColor": { "r": 38, "g": 38, "b": 38, "a": 0.2 },
              "outlineColor": { "r": 38, "g": 38, "b": 38, "a": 0.7 }
            }
          },
          "horizontal-spanned": {
            "width": 829,
            "height": 690,
            "hinge": {
              "width": 829,
              "height": 0,
              "x": 0,
              "y": 345,
              "contentColor": { "r": 38, "g": 38, "b": 38, "a": 0.2 },
              "outlineColor": { "r": 38, "g": 38, "b": 38, "a": 0.7 }
            }
          }
        },
        "capabilities": ["touch", "mobile"],
        "user-agent": "Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/%s Mobile Safari/537.36",
        "user-agent-metadata": { "platform": "Android", "platformVersion": "10.0", "architecture": "", "model": "SM-F946U", "mobile": true },
        "type": "phone",
        "modes": [
          { "title": "default", "orientation": "vertical", "insets": { "left": 0, "top": 0, "right": 0, "bottom": 0 } },
          { "title": "default", "orientation": "horizontal", "insets": { "left": 0, "top": 0, "right": 0, "bottom": 0 } },
          { "title": "spanned", "orientation": "vertical-spanned", "insets": { "left": 0, "top": 0, "right": 0, "bottom": 0 } },
          {
            "title": "spanned",
            "orientation": "horizontal-spanned",
            "insets": { "left": 0, "top": 0, "right": 0, "bottom": 0 }
          }
        ]
      },
      {
        "order": 35,
        "show-by-default": true,
        "foldable-screen": true,
        "title": "Asus Zenbook Fold",
        "screen": {
          "horizontal": { "width": 1280, "height": 853 },
          "device-pixel-ratio": 1.5,
          "vertical": { "width": 853, "height": 1280 },
          "vertical-spanned": {
            "width": 1706,
            "height": 1280,
            "hinge": {
              "width": 107,
              "height": 1280,
              "x": 800,
              "y": 0,
              "contentColor": { "r": 38, "g": 38, "b": 38, "a": 0.2 },
              "outlineColor": { "r": 38, "g": 38, "b": 38, "a": 0.7 }
            }
          },
          "horizontal-spanned": {
            "width": 1280,
            "height": 1706,
            "hinge": {
              "width": 1706,
              "height": 107,
              "x": 0,
              "y": 800,
              "contentColor": { "r": 38, "g": 38, "b": 38, "a": 0.2 },
              "outlineColor": { "r": 38, "g": 38, "b": 38, "a": 0.7 }
            }
          }
        },
        "capabilities": ["touch"],
        "user-agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/%s Safari/537.36",
        "user-agent-metadata": { "platform": "Windows", "platformVersion": "11.0", "architecture": "", "model": "UX9702AA", "mobile": false },
        "type": "tablet",
        "modes": [
          { "title": "default", "orientation": "vertical", "insets": { "left": 0, "top": 0, "right": 0, "bottom": 0 } },
          { "title": "default", "orientation": "horizontal", "insets": { "left": 0, "top": 0, "right": 0, "bottom": 0 } },
          {
            "title": "spanned",
            "orientation": "vertical-spanned",
            "insets": { "left": 0, "top": 0, "right": 0, "bottom": 0 }
          },
          {
            "title": "spanned",
            "orientation": "horizontal-spanned",
            "insets": { "left": 0, "top": 0, "right": 0, "bottom": 0 }
          }
        ]
      },
      {
        "order": 36,
        "show-by-default": true,
        "title": "Samsung Galaxy A51/71",
        "screen": {
          "horizontal": {
            "width": 914,
            "height": 412
          },
          "device-pixel-ratio": 2.625,
          "vertical": {
            "width": 412,
            "height": 914
          }
        },
        "capabilities": ["touch", "mobile"],
        "user-agent": "Mozilla/5.0 (Linux; Android 8.0.0; SM-G955U Build/R16NW) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/%s Mobile Safari/537.36",
        "user-agent-metadata": { "platform": "Android", "platformVersion": "8.0.0", "architecture": "", "model": "SM-G955U", "mobile": true },
        "type": "phone"
      },
      {
        "order": 52,
        "show-by-default": true,
        "title": "Nest Hub Max",
        "screen": {
          "horizontal": {
            "outline": {
              "image": "@url(optimized/google-nest-hub-max-horizontal.avif)",
              "insets": { "left": 92, "top": 96, "right": 91, "bottom": 248 }
            },
            "width": 1280,
            "height": 800
          },
          "device-pixel-ratio": 2,
          "vertical": {
            "width": 1280,
            "height": 800
          }
        },
        "capabilities": ["touch", "mobile"],
        "user-agent": "Mozilla/5.0 (X11; Linux aarch64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/%s Safari/537.36 CrKey/1.54.250320",
        "type": "tablet",
        "modes": [{ "title": "default", "orientation": "horizontal" }]
      },
      {
        "order": 50,
        "show-by-default": true,
        "title": "Nest Hub",
        "screen": {
          "horizontal": {
            "outline": {
              "image": "@url(optimized/google-nest-hub-horizontal.avif)",
              "insets": { "left": 82, "top": 74, "right": 83, "bottom": 222 }
            },
            "width": 1024,
            "height": 600
          },
          "device-pixel-ratio": 2,
          "vertical": {
            "width": 1024,
            "height": 600
          }
        },
        "capabilities": ["touch", "mobile"],
        "user-agent": "Mozilla/5.0 (Linux; Android) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/%s Safari/537.36 CrKey/1.54.248666",
        "user-agent-metadata": { "platform": "Android", "platformVersion": "", "architecture": "", "model": "", "mobile": false },
        "type": "tablet",
        "modes": [{ "title": "default", "orientation": "horizontal" }]
      },
      {
        "order": 129,
        "show-by-default": false,
        "title": "iPhone 4",
        "screen": {
          "horizontal": { "width": 480, "height": 320 },
          "device-pixel-ratio": 2,
          "vertical": { "width": 320, "height": 480 }
        },
        "capabilities": ["touch", "mobile"],
        "user-agent": "Mozilla/5.0 (iPhone; CPU iPhone OS 7_1_2 like Mac OS X) AppleWebKit/537.51.2 (KHTML, like Gecko) Version/7.0 Mobile/11D257 Safari/9537.53",
        "user-agent-metadata": { "platform": "iOS", "platformVersion": "7.1.2", "architecture": "", "model": "iPhone", "mobile": true },
        "type": "phone"
      },
      {
        "order": 130,
        "show-by-default": false,
        "title": "iPhone 5/SE",
        "screen": {
          "horizontal": {
            "outline": {
              "image": "@url(optimized/iPhone5-landscape.avif)",
              "insets": { "left": 115, "top": 25, "right": 115, "bottom": 28 }
            },
            "width": 568,
            "height": 320
          },
          "device-pixel-ratio": 2,
          "vertical": {
            "outline": {
              "image": "@url(optimized/iPhone5-portrait.avif)",
              "insets": { "left": 29, "top": 105, "right": 25, "bottom": 111 }
            },
            "width": 320,
            "height": 568
          }
        },
        "capabilities": ["touch", "mobile"],
        "user-agent": "Mozilla/5.0 (iPhone; CPU iPhone OS 10_3_1 like Mac OS X) AppleWebKit/603.1.30 (KHTML, like Gecko) Version/10.0 Mobile/14E304 Safari/602.1",
        "user-agent-metadata": { "platform": "iOS", "platformVersion": "10.3.1", "architecture": "", "model": "iPhone", "mobile": true },
        "type": "phone"
      },
      {
        "order": 131,
        "show-by-default": false,
        "title": "iPhone 6/7/8",
        "screen": {
          "horizontal": {
            "outline": {
              "image": "@url(optimized/iPhone6-landscape.avif)",
              "insets": { "left": 106, "top": 28, "right": 106, "bottom": 28 }
            },
            "width": 667,
            "height": 375
          },
          "device-pixel-ratio": 2,
          "vertical": {
            "outline": {
              "image": "@url(optimized/iPhone6-portrait.avif)",
              "insets": { "left": 28, "top": 105, "right": 28, "bottom": 105 }
            },
            "width": 375,
            "height": 667
          }
        },
        "capabilities": ["touch", "mobile"],
        "user-agent": "Mozilla/5.0 (iPhone; CPU iPhone OS 13_2_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0.3 Mobile/15E148 Safari/604.1",
        "user-agent-metadata": { "platform": "iOS", "platformVersion": "13.2.3", "architecture": "", "model": "iPhone", "mobile": true },
        "type": "phone"
      },
      {
        "order": 132,
        "show-by-default": false,
        "title": "iPhone 6/7/8 Plus",
        "screen": {
          "horizontal": {
            "outline": {
              "image": "@url(optimized/iPhone6Plus-landscape.avif)",
              "insets": { "left": 109, "top": 29, "right": 109, "bottom": 27 }
            },
            "width": 736,
            "height": 414
          },
          "device-pixel-ratio": 3,
          "vertical": {
            "outline": {
              "image": "@url(optimized/iPhone6Plus-portrait.avif)",
              "insets": { "left": 26, "top": 107, "right": 30, "bottom": 111 }
            },
            "width": 414,
            "height": 736
          }
        },
        "capabilities": ["touch", "mobile"],
        "user-agent": "Mozilla/5.0 (iPhone; CPU iPhone OS 13_2_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0.3 Mobile/15E148 Safari/604.1",
        "user-agent-metadata": { "platform": "iOS", "platformVersion": "13.2.3", "architecture": "", "model": "iPhone", "mobile": true },
        "type": "phone"
      },
      {
        "order": 133,
        "show-by-default": false,
        "title": "iPhone X",
        "screen": {
          "horizontal": { "width": 812, "height": 375 },
          "device-pixel-ratio": 3,
          "vertical": { "width": 375, "height": 812 }
        },
        "capabilities": ["touch", "mobile"],
        "user-agent": "Mozilla/5.0 (iPhone; CPU iPhone OS 13_2_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0.3 Mobile/15E148 Safari/604.1",
        "user-agent-metadata": { "platform": "iOS", "platformVersion": "13.2.3", "architecture": "", "model": "iPhone", "mobile": true },
        "type": "phone"
      },
      {
        "show-by-default": false,
        "title": "BlackBerry Z30",
        "screen": {
          "horizontal": { "width": 640, "height": 360 },
          "device-pixel-ratio": 2,
          "vertical": { "width": 360, "height": 640 }
        },
        "capabilities": ["touch", "mobile"],
        "user-agent": "Mozilla/5.0 (BB10; Touch) AppleWebKit/537.10+ (KHTML, like Gecko) Version/10.0.9.2372 Mobile Safari/537.10+",
        "type": "phone"
      },
      {
        "show-by-default": false,
        "title": "Nexus 4",
        "screen": {
          "horizontal": { "width": 640, "height": 384 },
          "device-pixel-ratio": 2,
          "vertical": { "width": 384, "height": 640 }
        },
        "capabilities": ["touch", "mobile"],
        "user-agent": "Mozilla/5.0 (Linux; Android 4.4.2; Nexus 4 Build/KOT49H) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/%s Mobile Safari/537.36",
        "user-agent-metadata": { "platform": "Android", "platformVersion": "4.4.2", "architecture": "", "model": "Nexus 4", "mobile": true },
        "type": "phone"
      },
      {
        "title": "Nexus 5",
        "type": "phone",
        "user-agent": "Mozilla/5.0 (Linux; Android 6.0; Nexus 5 Build/MRA58N) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/%s Mobile Safari/537.36",
        "user-agent-metadata": { "platform": "Android", "platformVersion": "6.0", "architecture": "", "model": "Nexus 5", "mobile": true },
        "capabilities": ["touch", "mobile"],
        "show-by-default": false,
        "screen": {
          "device-pixel-ratio": 3,
          "vertical": { "width": 360, "height": 640 },
          "horizontal": { "width": 640, "height": 360 }
        },
        "modes": [
          {
            "title": "default",
            "orientation": "vertical",
            "insets": { "left": 0, "top": 25, "right": 0, "bottom": 48 },
            "image": "@url(optimized/google-nexus-5-vertical-default-1x.avif) 1x, @url(optimized/google-nexus-5-vertical-default-2x.avif) 2x"
          },
          {
            "title": "navigation bar",
            "orientation": "vertical",
            "insets": { "left": 0, "top": 80, "right": 0, "bottom": 48 },
            "image": "@url(optimized/google-nexus-5-vertical-navigation-1x.avif) 1x, @url(optimized/google-nexus-5-vertical-navigation-2x.avif) 2x"
          },
          {
            "title": "keyboard",
            "orientation": "vertical",
            "insets": { "left": 0, "top": 80, "right": 0, "bottom": 312 },
            "image": "@url(optimized/google-nexus-5-vertical-keyboard-1x.avif) 1x, @url(optimized/google-nexus-5-vertical-keyboard-2x.avif) 2x"
          },
          {
            "title": "default",
            "orientation": "horizontal",
            "insets": { "left": 0, "top": 25, "right": 42, "bottom": 0 },
            "image": "@url(optimized/google-nexus-5-horizontal-default-1x.avif) 1x, @url(optimized/google-nexus-5-horizontal-default-2x.avif) 2x"
          },
          {
            "title": "navigation bar",
            "orientation": "horizontal",
            "insets": { "left": 0, "top": 80, "right": 42, "bottom": 0 },
            "image": "@url(optimized/google-nexus-5-horizontal-navigation-1x.avif) 1x, @url(optimized/google-nexus-5-horizontal-navigation-2x.avif) 2x"
          },
          {
            "title": "keyboard",
            "orientation": "horizontal",
            "insets": { "left": 0, "top": 80, "right": 42, "bottom": 202 },
            "image": "@url(optimized/google-nexus-5-horizontal-keyboard-1x.avif) 1x, @url(optimized/google-nexus-5-horizontal-keyboard-2x.avif) 2x"
          }
        ]
      },
      {
        "title": "Nexus 5X",
        "type": "phone",
        "user-agent": "Mozilla/5.0 (Linux; Android 8.0.0; Nexus 5X Build/OPR4.170623.006) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/%s Mobile Safari/537.36",
        "user-agent-metadata": { "platform": "Android", "platformVersion": "8.0.0", "architecture": "", "model": "Nexus 5X", "mobile": true },
        "capabilities": ["touch", "mobile"],
        "show-by-default": false,
        "screen": {
          "device-pixel-ratio": 2.625,
          "vertical": {
            "outline": {
              "image": "@url(optimized/Nexus5X-portrait.avif)",
              "insets": { "left": 18, "top": 88, "right": 22, "bottom": 98 }
            },
            "width": 412,
            "height": 732
          },
          "horizontal": {
            "outline": {
              "image": "@url(optimized/Nexus5X-landscape.avif)",
              "insets": { "left": 88, "top": 21, "right": 98, "bottom": 19 }
            },
            "width": 732,
            "height": 412
          }
        },
        "modes": [
          {
            "title": "default",
            "orientation": "vertical",
            "insets": { "left": 0, "top": 24, "right": 0, "bottom": 48 },
            "image": "@url(optimized/google-nexus-5x-vertical-default-1x.avif) 1x, @url(optimized/google-nexus-5x-vertical-default-2x.avif) 2x"
          },
          {
            "title": "navigation bar",
            "orientation": "vertical",
            "insets": { "left": 0, "top": 80, "right": 0, "bottom": 48 },
            "image": "@url(optimized/google-nexus-5x-vertical-navigation-1x.avif) 1x, @url(optimized/google-nexus-5x-vertical-navigation-2x.avif) 2x"
          },
          {
            "title": "keyboard",
            "orientation": "vertical",
            "insets": { "left": 0, "top": 80, "right": 0, "bottom": 342 },
            "image": "@url(optimized/google-nexus-5x-vertical-keyboard-1x.avif) 1x, @url(optimized/google-nexus-5x-vertical-keyboard-2x.avif) 2x"
          },
          {
            "title": "default",
            "orientation": "horizontal",
            "insets": { "left": 0, "top": 24, "right": 48, "bottom": 0 },
            "image": "@url(optimized/google-nexus-5x-horizontal-default-1x.avif) 1x, @url(optimized/google-nexus-5x-horizontal-default-2x.avif) 2x"
          },
          {
            "title": "navigation bar",
            "orientation": "horizontal",
            "insets": { "left": 0, "top": 80, "right": 48, "bottom": 0 },
            "image": "@url(optimized/google-nexus-5x-horizontal-navigation-1x.avif) 1x, @url(optimized/google-nexus-5x-horizontal-navigation-2x.avif) 2x"
          },
          {
            "title": "keyboard",
            "orientation": "horizontal",
            "insets": { "left": 0, "top": 80, "right": 48, "bottom": 222 },
            "image": "@url(optimized/google-nexus-5x-horizontal-keyboard-1x.avif) 1x, @url(optimized/google-nexus-5x-horizontal-keyboard-2x.avif) 2x"
          }
        ]
      },
      {
        "show-by-default": false,
        "title": "Nexus 6",
        "screen": {
          "horizontal": { "width": 732, "height": 412 },
          "device-pixel-ratio": 3.5,
          "vertical": { "width": 412, "height": 732 }
        },
        "capabilities": ["touch", "mobile"],
        "user-agent": "Mozilla/5.0 (Linux; Android 7.1.1; Nexus 6 Build/N6F26U) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/%s Mobile Safari/537.36",
        "user-agent-metadata": { "platform": "Android", "platformVersion": "7.1.1", "architecture": "", "model": "Nexus 6", "mobile": true },
        "type": "phone"
      },
      {
        "show-by-default": false,
        "title": "Nexus 6P",
        "screen": {
          "horizontal": {
            "outline": {
              "image": "@url(optimized/Nexus6P-landscape.avif)",
              "insets": { "left": 94, "top": 17, "right": 88, "bottom": 17 }
            },
            "width": 732,
            "height": 412
          },
          "device-pixel-ratio": 3.5,
          "vertical": {
            "outline": {
              "image": "@url(optimized/Nexus6P-portrait.avif)",
              "insets": { "left": 16, "top": 94, "right": 16, "bottom": 88 }
            },
            "width": 412,
            "height": 732
          }
        },
        "capabilities": ["touch", "mobile"],
        "user-agent": "Mozilla/5.0 (Linux; Android 8.0.0; Nexus 6P Build/OPP3.170518.006) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/%s Mobile Safari/537.36",
        "user-agent-metadata": { "platform": "Android", "platformVersion": "8.0.0", "architecture": "", "model": "Nexus 6P", "mobile": true },
        "type": "phone"
      },
      {
        "order": 120,
        "show-by-default": false,
        "title": "Pixel 2",
        "screen": {
          "horizontal": { "width": 731, "height": 411 },
          "device-pixel-ratio": 2.625,
          "vertical": { "width": 411, "height": 731 }
        },
        "capabilities": ["touch", "mobile"],
        "user-agent": "Mozilla/5.0 (Linux; Android 8.0; Pixel 2 Build/OPD3.170816.012) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/%s Mobile Safari/537.36",
        "user-agent-metadata": { "platform": "Android", "platformVersion": "8.0", "architecture": "", "model": "Pixel 2", "mobile": true },
        "type": "phone"
      },
      {
        "order": 121,
        "show-by-default": false,
        "title": "Pixel 2 XL",
        "screen": {
          "horizontal": { "width": 823, "height": 411 },
          "device-pixel-ratio": 3.5,
          "vertical": { "width": 411, "height": 823 }
        },
        "capabilities": ["touch", "mobile"],
        "user-agent": "Mozilla/5.0 (Linux; Android 8.0.0; Pixel 2 XL Build/OPD1.170816.004) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/%s Mobile Safari/537.36",
        "user-agent-metadata": { "platform": "Android", "platformVersion": "8.0.0", "architecture": "", "model": "Pixel 2 XL", "mobile": true },
        "type": "phone"
      },
      {
        "show-by-default": false,
        "title": "Pixel 3",
        "screen": {
          "horizontal": { "width": 786, "height": 393 },
          "device-pixel-ratio": 2.75,
          "vertical": { "width": 393, "height": 786 }
        },
        "capabilities": ["touch", "mobile"],
        "user-agent": "Mozilla/5.0 (Linux; Android 9; Pixel 3 Build/PQ1A.181105.017.A1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/%s Mobile Safari/537.36",
        "user-agent-metadata": { "platform": "Android", "platformVersion": "9", "architecture": "", "model": "Pixel 3", "mobile": true },
        "type": "phone"
      },
      {
        "show-by-default": false,
        "title": "Pixel 4",
        "screen": {
          "horizontal": { "width": 745, "height": 353 },
          "device-pixel-ratio": 3,
          "vertical": { "width": 353, "height": 745 }
        },
        "capabilities": ["touch", "mobile"],
        "user-agent": "Mozilla/5.0 (Linux; Android 10; Pixel 4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/%s Mobile Safari/537.36",
        "user-agent-metadata": { "platform": "Android", "platformVersion": "10", "architecture": "", "model": "Pixel 4", "mobile": true },
        "type": "phone"
      },
      {
        "show-by-default": false,
        "title": "LG Optimus L70",
        "screen": {
          "horizontal": { "width": 640, "height": 384 },
          "device-pixel-ratio": 1.25,
          "vertical": { "width": 384, "height": 640 }
        },
        "capabilities": ["touch", "mobile"],
        "user-agent": "Mozilla/5.0 (Linux; U; Android 4.4.2; en-us; LGMS323 Build/KOT49I.MS32310c) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/%s Mobile Safari/537.36",
        "user-agent-metadata": { "platform": "Android", "platformVersion": "4.4.2", "architecture": "", "model": "LGMS323", "mobile": true },
        "type": "phone"
      },
      {
        "show-by-default": false,
        "title": "Nokia N9",
        "screen": {
          "horizontal": { "width": 854, "height": 480 },
          "device-pixel-ratio": 1,
          "vertical": { "width": 480, "height": 854 }
        },
        "capabilities": ["touch", "mobile"],
        "user-agent": "Mozilla/5.0 (MeeGo; NokiaN9) AppleWebKit/534.13 (KHTML, like Gecko) NokiaBrowser/8.5.0 Mobile Safari/534.13",
        "type": "phone"
      },
      {
        "show-by-default": false,
        "title": "Nokia Lumia 520",
        "screen": {
          "horizontal": { "width": 533, "height": 320 },
          "device-pixel-ratio": 1.5,
          "vertical": { "width": 320, "height": 533 }
        },
        "capabilities": ["touch", "mobile"],
        "user-agent": "Mozilla/5.0 (compatible; MSIE 10.0; Windows Phone 8.0; Trident/6.0; IEMobile/10.0; ARM; Touch; NOKIA; Lumia 520)",
        "type": "phone"
      },
      {
        "show-by-default": false,
        "title": "Microsoft Lumia 550",
        "screen": {
          "horizontal": { "width": 640, "height": 360 },
          "device-pixel-ratio": 2,
          "vertical": { "width": 640, "height": 360 }
        },
        "capabilities": ["touch", "mobile"],
        "user-agent": "Mozilla/5.0 (Windows Phone 10.0; Android 4.2.1; Microsoft; Lumia 550) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/%s Mobile Safari/537.36 Edge/14.14263",
        "user-agent-metadata": { "platform": "Android", "platformVersion": "4.2.1", "architecture": "", "model": "Lumia 550", "mobile": true },
        "type": "phone"
      },
      {
        "show-by-default": false,
        "title": "Microsoft Lumia 950",
        "screen": {
          "horizontal": { "width": 640, "height": 360 },
          "device-pixel-ratio": 4,
          "vertical": { "width": 360, "height": 640 }
        },
        "capabilities": ["touch", "mobile"],
        "user-agent": "Mozilla/5.0 (Windows Phone 10.0; Android 4.2.1; Microsoft; Lumia 950) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/%s Mobile Safari/537.36 Edge/14.14263",
        "user-agent-metadata": { "platform": "Android", "platformVersion": "4.2.1", "architecture": "", "model": "Lumia 950", "mobile": true },
        "type": "phone"
      },
      {
        "show-by-default": false,
        "title": "Galaxy S III",
        "screen": {
          "horizontal": { "width": 640, "height": 360 },
          "device-pixel-ratio": 2,
          "vertical": { "width": 360, "height": 640 }
        },
        "capabilities": ["touch", "mobile"],
        "user-agent": "Mozilla/5.0 (Linux; U; Android 4.0; en-us; GT-I9300 Build/IMM76D) AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Mobile Safari/534.30",
        "user-agent-metadata": { "platform": "Android", "platformVersion": "4.0", "architecture": "", "model": "GT-I9300", "mobile": true },
        "type": "phone"
      },
      {
        "order": 110,
        "show-by-default": false,
        "title": "Galaxy S5",
        "screen": {
          "horizontal": { "width": 640, "height": 360 },
          "device-pixel-ratio": 3,
          "vertical": { "width": 360, "height": 640 }
        },
        "capabilities": ["touch", "mobile"],
        "user-agent": "Mozilla/5.0 (Linux; Android 5.0; SM-G900P Build/LRX21T) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/%s Mobile Safari/537.36",
        "user-agent-metadata": { "platform": "Android", "platformVersion": "5.0", "architecture": "", "model": "SM-G900P", "mobile": true },
        "type": "phone"
      },
      {
        "show-by-default": false,
        "title": "Galaxy S8",
        "screen": {
          "horizontal": { "width": 740, "height": 360 },
          "device-pixel-ratio": 3,
          "vertical": { "width": 360, "height": 740 }
        },
        "capabilities": ["touch", "mobile"],
        "user-agent": "Mozilla/5.0 (Linux; Android 7.0; SM-G950U Build/NRD90M) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/%s Mobile Safari/537.36",
        "user-agent-metadata": { "platform": "Android", "platformVersion": "7.0", "architecture": "", "model": "SM-G950U", "mobile": true },
        "type": "phone"
      },
      {
        "show-by-default": false,
        "title": "Galaxy S9+",
        "screen": {
          "horizontal": { "width": 658, "height": 320 },
          "device-pixel-ratio": 4.5,
          "vertical": { "width": 320, "height": 658 }
        },
        "capabilities": ["touch", "mobile"],
        "user-agent": "Mozilla/5.0 (Linux; Android 8.0.0; SM-G965U Build/R16NW) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/%s Mobile Safari/537.36",
        "user-agent-metadata": { "platform": "Android", "platformVersion": "8.0.0", "architecture": "", "model": "SM-G965U", "mobile": true },
        "type": "phone"
      },
      {
        "show-by-default": false,
        "title": "Galaxy Tab S4",
        "screen": {
          "horizontal": { "width": 1138, "height": 712 },
          "device-pixel-ratio": 2.25,
          "vertical": { "width": 712, "height": 1138 }
        },
        "capabilities": ["touch", "mobile"],
        "user-agent": "Mozilla/5.0 (Linux; Android 8.1.0; SM-T837A) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/%s Safari/537.36",
        "user-agent-metadata": { "platform": "Android", "platformVersion": "8.1.0", "architecture": "", "model": "SM-T837A", "mobile": false },
        "type": "phone"
      },
      {
        "order": 1,
        "show-by-default": false,
        "title": "JioPhone 2",
        "screen": {
          "horizontal": { "width": 320, "height": 240 },
          "device-pixel-ratio": 1,
          "vertical": { "width": 240, "height": 320 }
        },
        "capabilities": ["touch", "mobile"],
        "user-agent": "Mozilla/5.0 (Mobile; LYF/F300B/LYF-F300B-001-01-15-130718-i;Android; rv:48.0) Gecko/48.0 Firefox/48.0 KAIOS/2.5",
        "user-agent-metadata": {
          "platform": "Android",
          "platformVersion": "",
          "architecture": "",
          "model": "LYF/F300B/LYF-F300B-001-01-15-130718-i",
          "mobile": true
        },
        "type": "phone"
      },
      {
        "show-by-default": false,
        "title": "Kindle Fire HDX",
        "screen": {
          "horizontal": { "width": 1280, "height": 800 },
          "device-pixel-ratio": 2,
          "vertical": { "width": 800, "height": 1280 }
        },
        "capabilities": ["touch", "mobile"],
        "user-agent": "Mozilla/5.0 (Linux; U; en-us; KFAPWI Build/JDQ39) AppleWebKit/535.19 (KHTML, like Gecko) Silk/3.13 Safari/535.19 Silk-Accelerated=true",
        "type": "tablet"
      },
      {
        "order": 140,
        "show-by-default": false,
        "title": "iPad",
        "screen": {
          "horizontal": {
            "outline": {
              "image": "@url(optimized/iPad-landscape.avif)",
              "insets": { "left": 112, "top": 56, "right": 116, "bottom": 52 }
            },
            "width": 1024,
            "height": 768
          },
          "device-pixel-ratio": 2,
          "vertical": {
            "outline": {
              "image": "@url(optimized/iPad-portrait.avif)",
              "insets": { "left": 52, "top": 114, "right": 55, "bottom": 114 }
            },
            "width": 768,
            "height": 1024
          }
        },
        "capabilities": ["touch", "mobile"],
        "user-agent": "Mozilla/5.0 (iPad; CPU OS 11_0 like Mac OS X) AppleWebKit/604.1.34 (KHTML, like Gecko) Version/11.0 Mobile/15A5341f Safari/604.1",
        "user-agent-metadata": { "platform": "iOS", "platformVersion": "11.0", "architecture": "", "model": "iPad", "mobile": true },
        "type": "tablet"
      },
      {
        "order": 141,
        "show-by-default": false,
        "title": "iPad Pro",
        "screen": {
          "horizontal": { "width": 1366, "height": 1024 },
          "device-pixel-ratio": 2,
          "vertical": { "width": 1024, "height": 1366 }
        },
        "capabilities": ["touch", "mobile"],
        "user-agent": "Mozilla/5.0 (iPad; CPU OS 11_0 like Mac OS X) AppleWebKit/604.1.34 (KHTML, like Gecko) Version/11.0 Mobile/15A5341f Safari/604.1",
        "user-agent-metadata": { "platform": "iOS", "platformVersion": "11.0", "architecture": "", "model": "iPad", "mobile": true },
        "type": "tablet"
      },
      {
        "show-by-default": false,
        "title": "Blackberry PlayBook",
        "screen": {
          "horizontal": { "width": 1024, "height": 600 },
          "device-pixel-ratio": 1,
          "vertical": { "width": 600, "height": 1024 }
        },
        "capabilities": ["touch", "mobile"],
        "user-agent": "Mozilla/5.0 (PlayBook; U; RIM Tablet OS 2.1.0; en-US) AppleWebKit/536.2+ (KHTML like Gecko) Version/7.2.1.0 Safari/536.2+",
        "type": "tablet"
      },
      {
        "show-by-default": false,
        "title": "Nexus 10",
        "screen": {
          "horizontal": { "width": 1280, "height": 800 },
          "device-pixel-ratio": 2,
          "vertical": { "width": 800, "height": 1280 }
        },
        "capabilities": ["touch", "mobile"],
        "user-agent": "Mozilla/5.0 (Linux; Android 6.0.1; Nexus 10 Build/MOB31T) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/%s Safari/537.36",
        "user-agent-metadata": { "platform": "Android", "platformVersion": "6.0.1", "architecture": "", "model": "Nexus 10", "mobile": false },
        "type": "tablet"
      },
      {
        "show-by-default": false,
        "title": "Nexus 7",
        "screen": {
          "horizontal": { "width": 960, "height": 600 },
          "device-pixel-ratio": 2,
          "vertical": { "width": 600, "height": 960 }
        },
        "capabilities": ["touch", "mobile"],
        "user-agent": "Mozilla/5.0 (Linux; Android 6.0.1; Nexus 7 Build/MOB30X) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/%s Safari/537.36",
        "user-agent-metadata": { "platform": "Android", "platformVersion": "6.0.1", "architecture": "", "model": "Nexus 7", "mobile": false },
        "type": "tablet"
      },
      {
        "show-by-default": false,
        "title": "Galaxy Note 3",
        "screen": {
          "horizontal": { "width": 640, "height": 360 },
          "device-pixel-ratio": 3,
          "vertical": { "width": 360, "height": 640 }
        },
        "capabilities": ["touch", "mobile"],
        "user-agent": "Mozilla/5.0 (Linux; U; Android 4.3; en-us; SM-N900T Build/JSS15J) AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Mobile Safari/534.30",
        "user-agent-metadata": { "platform": "Android", "platformVersion": "4.3", "architecture": "", "model": "SM-N900T", "mobile": true },
        "type": "phone"
      },
      {
        "show-by-default": false,
        "title": "Galaxy Note II",
        "screen": {
          "horizontal": { "width": 640, "height": 360 },
          "device-pixel-ratio": 2,
          "vertical": { "width": 360, "height": 640 }
        },
        "capabilities": ["touch", "mobile"],
        "user-agent": "Mozilla/5.0 (Linux; U; Android 4.1; en-us; GT-N7100 Build/JRO03C) AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Mobile Safari/534.30",
        "user-agent-metadata": { "platform": "Android", "platformVersion": "4.1", "architecture": "", "model": "GT-N7100", "mobile": true },
        "type": "phone"
      },
      {
        "show-by-default": false,
        "title": i18nLazyString$b(UIStrings$q.laptopWithTouch),
        "screen": {
          "horizontal": { "width": 1280, "height": 950 },
          "device-pixel-ratio": 1,
          "vertical": { "width": 950, "height": 1280 }
        },
        "capabilities": ["touch"],
        "user-agent": "",
        "type": "notebook",
        "modes": [{ "title": "default", "orientation": "horizontal" }]
      },
      {
        "show-by-default": false,
        "title": i18nLazyString$b(UIStrings$q.laptopWithHiDPIScreen),
        "screen": {
          "horizontal": { "width": 1440, "height": 900 },
          "device-pixel-ratio": 2,
          "vertical": { "width": 900, "height": 1440 }
        },
        "capabilities": [],
        "user-agent": "",
        "type": "notebook",
        "modes": [{ "title": "default", "orientation": "horizontal" }]
      },
      {
        "show-by-default": false,
        "title": i18nLazyString$b(UIStrings$q.laptopWithMDPIScreen),
        "screen": {
          "horizontal": { "width": 1280, "height": 800 },
          "device-pixel-ratio": 1,
          "vertical": { "width": 800, "height": 1280 }
        },
        "capabilities": [],
        "user-agent": "",
        "type": "notebook",
        "modes": [{ "title": "default", "orientation": "horizontal" }]
      },
      {
        "show-by-default": false,
        "title": "Moto G4",
        "screen": {
          "horizontal": {
            "outline": {
              "image": "@url(optimized/MotoG4-landscape.avif)",
              "insets": { "left": 91, "top": 30, "right": 74, "bottom": 30 }
            },
            "width": 640,
            "height": 360
          },
          "device-pixel-ratio": 3,
          "vertical": {
            "outline": {
              "image": "@url(optimized/MotoG4-portrait.avif)",
              "insets": { "left": 30, "top": 91, "right": 30, "bottom": 74 }
            },
            "width": 360,
            "height": 640
          }
        },
        "capabilities": ["touch", "mobile"],
        "user-agent": "Mozilla/5.0 (Linux; Android 6.0.1; Moto G (4)) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/%s Mobile Safari/537.36",
        "user-agent-metadata": { "platform": "Android", "platformVersion": "6.0.1", "architecture": "", "model": "Moto G (4)", "mobile": true },
        "type": "phone"
      },
      {
        "show-by-default": false,
        "title": "Moto G Power",
        "screen": {
          "device-pixel-ratio": 1.75,
          "horizontal": {
            "width": 823,
            "height": 412
          },
          "vertical": {
            "width": 412,
            "height": 823
          }
        },
        "capabilities": ["touch", "mobile"],
        "user-agent": "Mozilla/5.0 (Linux; Android 11; moto g power (2022)) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/%s Mobile Safari/537.36",
        "user-agent-metadata": {
          "platform": "Android",
          "platformVersion": "11",
          "architecture": "",
          "model": "moto g power (2022)",
          "mobile": true
        },
        "type": "phone"
      },
      {
        "order": 200,
        "show-by-default": false,
        "title": "Facebook on Android",
        "screen": {
          "horizontal": {
            "width": 892,
            "height": 412
          },
          "device-pixel-ratio": 3.5,
          "vertical": {
            "width": 412,
            "height": 892
          }
        },
        "capabilities": ["touch", "mobile"],
        "user-agent": "Mozilla/5.0 (Linux; Android 12; Pixel 6 Build/SQ3A.220705.004; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/%s Mobile Safari/537.36 [FB_IAB/FB4A;FBAV/407.0.0.0.65;]",
        "user-agent-metadata": { "platform": "Android", "platformVersion": "12", "architecture": "", "model": "Pixel 6", "mobile": true },
        "type": "phone"
      }
    ];
    UIStrings$p = {
      widthCannotBeEmpty: "Width cannot be empty.",
      widthMustBeANumber: "Width must be a number.",
      widthMustBeLessThanOrEqualToS: "Width must be less than or equal to {PH1}.",
      widthMustBeGreaterThanOrEqualToS: "Width must be greater than or equal to {PH1}.",
      heightCannotBeEmpty: "Height cannot be empty.",
      heightMustBeANumber: "Height must be a number.",
      heightMustBeLessThanOrEqualToS: "Height must be less than or equal to {PH1}.",
      heightMustBeGreaterThanOrEqualTo: "Height must be greater than or equal to {PH1}.",
      devicePixelRatioMustBeANumberOr: "Device pixel ratio must be a number or blank.",
      devicePixelRatioMustBeLessThanOr: "Device pixel ratio must be less than or equal to {PH1}.",
      devicePixelRatioMustBeGreater: "Device pixel ratio must be greater than or equal to {PH1}."
    };
    str_$o = registerUIStrings("models/emulation/DeviceModeModel.ts", UIStrings$p);
    i18nString$b = getLocalizedString.bind(void 0, str_$o);
    DeviceModeModel = class _DeviceModeModel extends ObjectWrapper {
      #screenRect;
      #visiblePageRect;
      #availableSize;
      #preferredSize;
      #initialized;
      #appliedDeviceSize;
      #appliedDeviceScaleFactor;
      #appliedUserAgentType;
      #scaleSetting;
      #scale;
      #widthSetting;
      #heightSetting;
      #uaSetting;
      #deviceScaleFactorSetting;
      #deviceOutlineSetting;
      #toolbarControlsEnabledSetting;
      #type;
      #device;
      #mode;
      #fitScale;
      #touchEnabled;
      #touchMobile;
      #emulationModel;
      #onModelAvailable;
      #outlineRect;
      #screenOrientationLocked;
      constructor() {
        super();
        this.#screenRect = new Rect(0, 0, 1, 1);
        this.#visiblePageRect = new Rect(0, 0, 1, 1);
        this.#availableSize = new Size(1, 1);
        this.#preferredSize = new Size(1, 1);
        this.#initialized = false;
        this.#appliedDeviceSize = new Size(1, 1);
        this.#appliedDeviceScaleFactor = globalThis.devicePixelRatio;
        this.#appliedUserAgentType = "Desktop";
        this.#scaleSetting = Settings.instance().createSetting("emulation.device-scale", 1);
        if (!this.#scaleSetting.get()) {
          this.#scaleSetting.set(1);
        }
        this.#scaleSetting.addChangeListener(this.scaleSettingChanged, this);
        this.#scale = 1;
        this.#widthSetting = Settings.instance().createSetting("emulation.device-width", 400);
        if (this.#widthSetting.get() < MinDeviceSize) {
          this.#widthSetting.set(MinDeviceSize);
        }
        if (this.#widthSetting.get() > MaxDeviceSize) {
          this.#widthSetting.set(MaxDeviceSize);
        }
        this.#widthSetting.addChangeListener(this.widthSettingChanged, this);
        this.#heightSetting = Settings.instance().createSetting("emulation.device-height", 0);
        if (this.#heightSetting.get() && this.#heightSetting.get() < MinDeviceSize) {
          this.#heightSetting.set(MinDeviceSize);
        }
        if (this.#heightSetting.get() > MaxDeviceSize) {
          this.#heightSetting.set(MaxDeviceSize);
        }
        this.#heightSetting.addChangeListener(this.heightSettingChanged, this);
        this.#uaSetting = Settings.instance().createSetting("emulation.device-ua", "Mobile");
        this.#uaSetting.addChangeListener(this.uaSettingChanged, this);
        this.#deviceScaleFactorSetting = Settings.instance().createSetting("emulation.device-scale-factor", 0);
        this.#deviceScaleFactorSetting.addChangeListener(this.deviceScaleFactorSettingChanged, this);
        this.#deviceOutlineSetting = Settings.instance().moduleSetting("emulation.show-device-outline");
        this.#deviceOutlineSetting.addChangeListener(this.deviceOutlineSettingChanged, this);
        this.#toolbarControlsEnabledSetting = Settings.instance().createSetting("emulation.toolbar-controls-enabled", true, "Session");
        this.#type = Type.None;
        this.#device = null;
        this.#mode = null;
        this.#fitScale = 1;
        this.#touchEnabled = false;
        this.#touchMobile = false;
        this.#emulationModel = null;
        this.#onModelAvailable = null;
        this.#screenOrientationLocked = false;
        TargetManager3.instance().observeModels(EmulationModel, this);
      }
      static instance(opts) {
        if (!deviceModeModelInstance || opts?.forceNew) {
          deviceModeModelInstance = new _DeviceModeModel();
        }
        return deviceModeModelInstance;
      }
      static tryInstance(opts) {
        try {
          return this.instance(opts);
        } catch {
          return null;
        }
      }
      static widthValidator(value) {
        let valid2 = false;
        let errorMessage;
        if (!value) {
          errorMessage = i18nString$b(UIStrings$p.widthCannotBeEmpty);
        } else if (!/^[\d]+$/.test(value)) {
          errorMessage = i18nString$b(UIStrings$p.widthMustBeANumber);
        } else if (Number(value) > MaxDeviceSize) {
          errorMessage = i18nString$b(UIStrings$p.widthMustBeLessThanOrEqualToS, { PH1: MaxDeviceSize });
        } else if (Number(value) < MinDeviceSize) {
          errorMessage = i18nString$b(UIStrings$p.widthMustBeGreaterThanOrEqualToS, { PH1: MinDeviceSize });
        } else {
          valid2 = true;
        }
        return { valid: valid2, errorMessage };
      }
      static heightValidator(value) {
        let valid2 = false;
        let errorMessage;
        if (!value) {
          errorMessage = i18nString$b(UIStrings$p.heightCannotBeEmpty);
        } else if (!/^[\d]+$/.test(value)) {
          errorMessage = i18nString$b(UIStrings$p.heightMustBeANumber);
        } else if (Number(value) > MaxDeviceSize) {
          errorMessage = i18nString$b(UIStrings$p.heightMustBeLessThanOrEqualToS, { PH1: MaxDeviceSize });
        } else if (Number(value) < MinDeviceSize) {
          errorMessage = i18nString$b(UIStrings$p.heightMustBeGreaterThanOrEqualTo, { PH1: MinDeviceSize });
        } else {
          valid2 = true;
        }
        return { valid: valid2, errorMessage };
      }
      static scaleValidator(value) {
        let valid2 = false;
        let errorMessage;
        const parsedValue = Number(value.trim());
        if (!value) {
          valid2 = true;
        } else if (Number.isNaN(parsedValue)) {
          errorMessage = i18nString$b(UIStrings$p.devicePixelRatioMustBeANumberOr);
        } else if (Number(value) > MaxDeviceScaleFactor) {
          errorMessage = i18nString$b(UIStrings$p.devicePixelRatioMustBeLessThanOr, { PH1: MaxDeviceScaleFactor });
        } else if (Number(value) < MinDeviceScaleFactor) {
          errorMessage = i18nString$b(UIStrings$p.devicePixelRatioMustBeGreater, { PH1: MinDeviceScaleFactor });
        } else {
          valid2 = true;
        }
        return { valid: valid2, errorMessage };
      }
      get scaleSettingInternal() {
        return this.#scaleSetting;
      }
      setAvailableSize(availableSize, preferredSize) {
        this.#availableSize = availableSize;
        this.#preferredSize = preferredSize;
        this.#initialized = true;
        this.calculateAndEmulate(false);
      }
      emulate(type2, device, mode2, scale) {
        const resetPageScaleFactor = this.#type !== type2 || this.#device !== device || this.#mode !== mode2;
        this.#type = type2;
        if (type2 === Type.Device && device && mode2) {
          console.assert(Boolean(device) && Boolean(mode2), "Must pass device and mode for device emulation");
          this.#mode = mode2;
          this.#device = device;
          if (this.#initialized) {
            const orientation = device.orientationByName(mode2.orientation);
            this.#scaleSetting.set(scale || this.calculateFitScale(orientation.width, orientation.height, this.currentOutline(), this.currentInsets()));
          }
        } else {
          this.#device = null;
          this.#mode = null;
        }
        if (type2 !== Type.None) {
          userMetrics.actionTaken(Action.DeviceModeEnabled);
        }
        this.calculateAndEmulate(resetPageScaleFactor);
      }
      setWidth(width) {
        const max = Math.min(MaxDeviceSize, this.preferredScaledWidth());
        width = Math.max(Math.min(width, max), 1);
        this.#widthSetting.set(width);
      }
      setWidthAndScaleToFit(width) {
        width = Math.max(Math.min(width, MaxDeviceSize), 1);
        this.#scaleSetting.set(this.calculateFitScale(width, this.#heightSetting.get()));
        this.#widthSetting.set(width);
      }
      setHeight(height) {
        const max = Math.min(MaxDeviceSize, this.preferredScaledHeight());
        height = Math.max(Math.min(height, max), 0);
        if (height === this.preferredScaledHeight()) {
          height = 0;
        }
        this.#heightSetting.set(height);
      }
      setHeightAndScaleToFit(height) {
        height = Math.max(Math.min(height, MaxDeviceSize), 0);
        this.#scaleSetting.set(this.calculateFitScale(this.#widthSetting.get(), height));
        this.#heightSetting.set(height);
      }
      setScale(scale) {
        this.#scaleSetting.set(scale);
      }
      device() {
        return this.#device;
      }
      mode() {
        return this.#mode;
      }
      type() {
        return this.#type;
      }
      screenImage() {
        return this.#device && this.#mode ? this.#device.modeImage(this.#mode) : "";
      }
      outlineImage() {
        return this.#device && this.#mode && this.#deviceOutlineSetting.get() ? this.#device.outlineImage(this.#mode) : "";
      }
      outlineRect() {
        return this.#outlineRect || null;
      }
      screenRect() {
        return this.#screenRect;
      }
      visiblePageRect() {
        return this.#visiblePageRect;
      }
      scale() {
        return this.#scale;
      }
      fitScale() {
        return this.#fitScale;
      }
      appliedDeviceSize() {
        return this.#appliedDeviceSize;
      }
      appliedDeviceScaleFactor() {
        return this.#appliedDeviceScaleFactor;
      }
      appliedUserAgentType() {
        return this.#appliedUserAgentType;
      }
      isFullHeight() {
        return !this.#heightSetting.get();
      }
      isMobile() {
        switch (this.#type) {
          case Type.Device:
            return this.#device ? this.#device.mobile() : false;
          case Type.None:
            return false;
          case Type.Responsive:
            return this.#uaSetting.get() === "Mobile" || this.#uaSetting.get() === "Mobile (no touch)";
        }
        return false;
      }
      enabledSetting() {
        return Settings.instance().createSetting("emulation.show-device-mode", false);
      }
      scaleSetting() {
        return this.#scaleSetting;
      }
      uaSetting() {
        return this.#uaSetting;
      }
      deviceScaleFactorSetting() {
        return this.#deviceScaleFactorSetting;
      }
      deviceOutlineSetting() {
        return this.#deviceOutlineSetting;
      }
      toolbarControlsEnabledSetting() {
        return this.#toolbarControlsEnabledSetting;
      }
      reset() {
        this.#deviceScaleFactorSetting.set(0);
        this.#scaleSetting.set(1);
        this.setWidth(400);
        this.setHeight(0);
        this.#uaSetting.set("Mobile");
      }
      modelAdded(emulationModel) {
        if (emulationModel.target() === TargetManager3.instance().primaryPageTarget() && emulationModel.supportsDeviceEmulation()) {
          this.#emulationModel = emulationModel;
          if (this.#onModelAvailable) {
            const callback = this.#onModelAvailable;
            this.#onModelAvailable = null;
            callback();
          }
          emulationModel.addEventListener("ScreenOrientationLockChanged", this.onScreenOrientationLockChanged, this);
          const resourceTreeModel = emulationModel.target().model(ResourceTreeModel);
          if (resourceTreeModel) {
            resourceTreeModel.addEventListener(Events$6.FrameResized, this.onFrameChange, this);
            resourceTreeModel.addEventListener(Events$6.FrameNavigated, this.onFrameChange, this);
          }
        } else {
          void emulationModel.emulateTouch(this.#touchEnabled, this.#touchMobile);
        }
      }
      modelRemoved(emulationModel) {
        if (this.#emulationModel === emulationModel) {
          emulationModel.removeEventListener("ScreenOrientationLockChanged", this.onScreenOrientationLockChanged, this);
          this.#emulationModel = null;
          this.#screenOrientationLocked = false;
          this.dispatchEventToListeners("Updated");
        }
      }
      inspectedURL() {
        return this.#emulationModel ? this.#emulationModel.target().inspectedURL() : null;
      }
      onFrameChange() {
        const overlayModel = this.#emulationModel ? this.#emulationModel.overlayModel() : null;
        if (!overlayModel) {
          return;
        }
        this.showHingeIfApplicable(overlayModel);
      }
      onScreenOrientationLockChanged(event) {
        this.#screenOrientationLocked = event.data.locked;
        if (event.data.locked && event.data.orientation) {
          this.applyOrientationLock(event.data.orientation);
        }
        this.dispatchEventToListeners("Updated");
      }
      applyOrientationLock(orientation) {
        const wantsLandscape = orientation.type === "landscapePrimary" || orientation.type === "landscapeSecondary";
        if (this.#type === Type.Device && this.#device && this.#mode) {
          const isCurrentlyLandscape = this.#mode.orientation === Horizontal || this.#mode.orientation === HorizontalSpanned;
          if (wantsLandscape !== isCurrentlyLandscape) {
            const rotationPartner = this.#device.getRotationPartner(this.#mode);
            if (rotationPartner) {
              this.emulate(this.#type, this.#device, rotationPartner);
            }
          }
        } else if (this.#type === Type.Responsive) {
          const appliedSize = this.appliedDeviceSize();
          const isCurrentlyLandscape = appliedSize.width > appliedSize.height;
          if (wantsLandscape !== isCurrentlyLandscape) {
            this.setSizeAndScaleToFit(appliedSize.height, appliedSize.width);
          }
        }
      }
      isScreenOrientationLocked() {
        return this.#screenOrientationLocked;
      }
      scaleSettingChanged() {
        this.calculateAndEmulate(false);
      }
      widthSettingChanged() {
        this.calculateAndEmulate(false);
      }
      heightSettingChanged() {
        this.calculateAndEmulate(false);
      }
      uaSettingChanged() {
        this.calculateAndEmulate(true);
      }
      deviceScaleFactorSettingChanged() {
        this.calculateAndEmulate(false);
      }
      deviceOutlineSettingChanged() {
        this.calculateAndEmulate(false);
      }
      preferredScaledWidth() {
        return Math.floor(this.#preferredSize.width / (this.#scaleSetting.get() || 1));
      }
      preferredScaledHeight() {
        return Math.floor(this.#preferredSize.height / (this.#scaleSetting.get() || 1));
      }
      currentOutline() {
        let outline = new Insets(0, 0, 0, 0);
        if (this.#type !== Type.Device || !this.#device || !this.#mode) {
          return outline;
        }
        const orientation = this.#device.orientationByName(this.#mode.orientation);
        if (this.#deviceOutlineSetting.get()) {
          outline = orientation.outlineInsets || outline;
        }
        return outline;
      }
      currentInsets() {
        if (this.#type !== Type.Device || !this.#mode) {
          return new Insets(0, 0, 0, 0);
        }
        return this.#mode.insets;
      }
      getScreenOrientationType() {
        if (!this.#mode) {
          throw new Error("Mode required to get orientation type.");
        }
        switch (this.#mode.orientation) {
          case VerticalSpanned:
          case Vertical:
            return "portraitPrimary";
          case HorizontalSpanned:
          case Horizontal:
          default:
            return "landscapePrimary";
        }
      }
      calculateAndEmulate(resetPageScaleFactor) {
        if (!this.#emulationModel) {
          this.#onModelAvailable = this.calculateAndEmulate.bind(this, resetPageScaleFactor);
        }
        const mobile = this.isMobile();
        const overlayModel = this.#emulationModel ? this.#emulationModel.overlayModel() : null;
        if (overlayModel) {
          this.showHingeIfApplicable(overlayModel);
        }
        if (this.#type === Type.Device && this.#device && this.#mode) {
          const orientation = this.#device.orientationByName(this.#mode.orientation);
          const outline = this.currentOutline();
          const insets = this.currentInsets();
          this.#fitScale = this.calculateFitScale(orientation.width, orientation.height, outline, insets);
          if (mobile) {
            this.#appliedUserAgentType = this.#device.touch() ? "Mobile" : "Mobile (no touch)";
          } else {
            this.#appliedUserAgentType = this.#device.touch() ? "Desktop (touch)" : "Desktop";
          }
          this.applyDeviceMetrics(new Size(orientation.width, orientation.height), insets, outline, this.#scaleSetting.get(), this.#device.deviceScaleFactor, mobile, this.getScreenOrientationType(), resetPageScaleFactor);
          this.applyUserAgent(this.#device.userAgent, this.#device.userAgentMetadata);
          this.applyTouch(this.#device.touch(), mobile);
        } else if (this.#type === Type.None) {
          this.#fitScale = this.calculateFitScale(this.#availableSize.width, this.#availableSize.height);
          this.#appliedUserAgentType = "Desktop";
          this.applyDeviceMetrics(this.#availableSize, new Insets(0, 0, 0, 0), new Insets(0, 0, 0, 0), 1, 0, mobile, null, resetPageScaleFactor);
          this.applyUserAgent("", null);
          this.applyTouch(false, false);
        } else if (this.#type === Type.Responsive) {
          let screenWidth = this.#widthSetting.get();
          if (!screenWidth || screenWidth > this.preferredScaledWidth()) {
            screenWidth = this.preferredScaledWidth();
          }
          let screenHeight = this.#heightSetting.get();
          if (!screenHeight || screenHeight > this.preferredScaledHeight()) {
            screenHeight = this.preferredScaledHeight();
          }
          const defaultDeviceScaleFactor = mobile ? defaultMobileScaleFactor : 0;
          this.#fitScale = this.calculateFitScale(this.#widthSetting.get(), this.#heightSetting.get());
          this.#appliedUserAgentType = this.#uaSetting.get();
          this.applyDeviceMetrics(new Size(screenWidth, screenHeight), new Insets(0, 0, 0, 0), new Insets(0, 0, 0, 0), this.#scaleSetting.get(), this.#deviceScaleFactorSetting.get() || defaultDeviceScaleFactor, mobile, screenHeight >= screenWidth ? "portraitPrimary" : "landscapePrimary", resetPageScaleFactor);
          this.applyUserAgent(mobile ? defaultMobileUserAgent : "", mobile ? defaultMobileUserAgentMetadata : null);
          this.applyTouch(this.#uaSetting.get() === "Desktop (touch)" || this.#uaSetting.get() === "Mobile", this.#uaSetting.get() === "Mobile");
        }
        if (overlayModel) {
          overlayModel.setShowViewportSizeOnResize(this.#type === Type.None);
        }
        this.dispatchEventToListeners("Updated");
      }
      calculateFitScale(screenWidth, screenHeight, outline, insets) {
        const outlineWidth = outline ? outline.left + outline.right : 0;
        const outlineHeight = outline ? outline.top + outline.bottom : 0;
        const insetsWidth = insets ? insets.left + insets.right : 0;
        const insetsHeight = insets ? insets.top + insets.bottom : 0;
        let scale = Math.min(screenWidth ? this.#preferredSize.width / (screenWidth + outlineWidth) : 1, screenHeight ? this.#preferredSize.height / (screenHeight + outlineHeight) : 1);
        scale = Math.min(Math.floor(scale * 100), 100);
        let sharpScale = scale;
        while (sharpScale > scale * 0.7) {
          let sharp = true;
          if (screenWidth) {
            sharp = sharp && Number.isInteger((screenWidth - insetsWidth) * sharpScale / 100);
          }
          if (screenHeight) {
            sharp = sharp && Number.isInteger((screenHeight - insetsHeight) * sharpScale / 100);
          }
          if (sharp) {
            return sharpScale / 100;
          }
          sharpScale -= 1;
        }
        return scale / 100;
      }
      setSizeAndScaleToFit(width, height) {
        this.#scaleSetting.set(this.calculateFitScale(width, height));
        this.setWidth(width);
        this.setHeight(height);
      }
      applyUserAgent(userAgent, userAgentMetadata) {
        MultitargetNetworkManager.instance().setUserAgentOverride(userAgent, userAgentMetadata);
      }
      applyDeviceMetrics(screenSize, insets, outline, scale, deviceScaleFactor, mobile, screenOrientation, resetPageScaleFactor) {
        screenSize.width = Math.max(1, Math.floor(screenSize.width));
        screenSize.height = Math.max(1, Math.floor(screenSize.height));
        let pageWidth = screenSize.width - insets.left - insets.right;
        let pageHeight = screenSize.height - insets.top - insets.bottom;
        const positionX = insets.left;
        const positionY = insets.top;
        const screenOrientationAngle = screenOrientation === "landscapePrimary" ? 90 : 0;
        this.#appliedDeviceSize = screenSize;
        this.#appliedDeviceScaleFactor = deviceScaleFactor || window.devicePixelRatio;
        this.#screenRect = new Rect(Math.max(0, (this.#availableSize.width - screenSize.width * scale) / 2), outline.top * scale, screenSize.width * scale, screenSize.height * scale);
        this.#outlineRect = new Rect(this.#screenRect.left - outline.left * scale, 0, (outline.left + screenSize.width + outline.right) * scale, (outline.top + screenSize.height + outline.bottom) * scale);
        this.#visiblePageRect = new Rect(positionX * scale, positionY * scale, Math.min(pageWidth * scale, this.#availableSize.width - this.#screenRect.left - positionX * scale), Math.min(pageHeight * scale, this.#availableSize.height - this.#screenRect.top - positionY * scale));
        this.#scale = scale;
        const displayFeature = this.getDisplayFeature();
        if (!displayFeature) {
          if (scale === 1 && this.#availableSize.width >= screenSize.width && this.#availableSize.height >= screenSize.height) {
            pageWidth = 0;
            pageHeight = 0;
          }
          if (this.#visiblePageRect.width === pageWidth * scale && this.#visiblePageRect.height === pageHeight * scale && Number.isInteger(pageWidth * scale) && Number.isInteger(pageHeight * scale)) {
            pageWidth = 0;
            pageHeight = 0;
          }
        }
        if (!this.#emulationModel) {
          return;
        }
        if (resetPageScaleFactor) {
          void this.#emulationModel.resetPageScaleFactor();
        }
        if (pageWidth || pageHeight || mobile || deviceScaleFactor || scale !== 1 || screenOrientation || displayFeature) {
          const metrics2 = {
            width: pageWidth,
            height: pageHeight,
            deviceScaleFactor,
            mobile,
            scale,
            screenWidth: screenSize.width,
            screenHeight: screenSize.height,
            positionX,
            positionY,
            dontSetVisibleSize: true
          };
          if (displayFeature) {
            metrics2.displayFeature = displayFeature;
            metrics2.devicePosture = { type: "folded" };
          } else {
            metrics2.devicePosture = { type: "continuous" };
          }
          if (screenOrientation) {
            metrics2.screenOrientation = { type: screenOrientation, angle: screenOrientationAngle };
          }
          void this.#emulationModel.emulateDevice(metrics2);
        } else {
          void this.#emulationModel.emulateDevice(null);
        }
      }
      exitHingeMode() {
        const overlayModel = this.#emulationModel ? this.#emulationModel.overlayModel() : null;
        if (overlayModel) {
          overlayModel.showHingeForDualScreen(null);
        }
      }
      async captureScreenshot(fullSize, clip) {
        const screenCaptureModel = this.#emulationModel ? this.#emulationModel.target().model(ScreenCaptureModel) : null;
        if (!screenCaptureModel) {
          return null;
        }
        let screenshotMode;
        if (clip) {
          screenshotMode = "fromClip";
        } else if (fullSize) {
          screenshotMode = "fullpage";
        } else {
          screenshotMode = "fromViewport";
        }
        const overlayModel = this.#emulationModel ? this.#emulationModel.overlayModel() : null;
        if (overlayModel) {
          overlayModel.setShowViewportSizeOnResize(false);
        }
        const screenshot3 = await screenCaptureModel.captureScreenshot("png", 100, screenshotMode, clip);
        const deviceMetrics = {
          width: 0,
          height: 0,
          deviceScaleFactor: 0,
          mobile: false
        };
        if (fullSize && this.#emulationModel) {
          if (this.#device && this.#mode) {
            const orientation = this.#device.orientationByName(this.#mode.orientation);
            deviceMetrics.width = orientation.width;
            deviceMetrics.height = orientation.height;
            const dispFeature = this.getDisplayFeature();
            if (dispFeature) {
              deviceMetrics.displayFeature = dispFeature;
            }
          } else {
            deviceMetrics.width = 0;
            deviceMetrics.height = 0;
          }
          await this.#emulationModel.emulateDevice(deviceMetrics);
        }
        this.calculateAndEmulate(false);
        return screenshot3;
      }
      applyTouch(touchEnabled, mobile) {
        this.#touchEnabled = touchEnabled;
        this.#touchMobile = mobile;
        for (const emulationModel of TargetManager3.instance().models(EmulationModel)) {
          void emulationModel.emulateTouch(touchEnabled, mobile);
        }
      }
      showHingeIfApplicable(overlayModel) {
        const orientation = this.#device && this.#mode ? this.#device.orientationByName(this.#mode.orientation) : null;
        if (orientation?.hinge) {
          overlayModel.showHingeForDualScreen(orientation.hinge);
          return;
        }
        overlayModel.showHingeForDualScreen(null);
      }
      getDisplayFeatureOrientation() {
        if (!this.#mode) {
          throw new Error("Mode required to get display feature orientation.");
        }
        switch (this.#mode.orientation) {
          case VerticalSpanned:
          case Vertical:
            return "vertical";
          case HorizontalSpanned:
          case Horizontal:
          default:
            return "horizontal";
        }
      }
      getDisplayFeature() {
        if (!this.#device || !this.#mode || this.#mode.orientation !== VerticalSpanned && this.#mode.orientation !== HorizontalSpanned) {
          return null;
        }
        const orientation = this.#device.orientationByName(this.#mode.orientation);
        if (!orientation?.hinge) {
          return null;
        }
        const hinge = orientation.hinge;
        return {
          orientation: this.getDisplayFeatureOrientation(),
          offset: this.#mode.orientation === VerticalSpanned ? hinge.x : hinge.y,
          maskLength: this.#mode.orientation === VerticalSpanned ? hinge.width : hinge.height
        };
      }
    };
    Insets = class {
      left;
      top;
      right;
      bottom;
      constructor(left2, top2, right2, bottom2) {
        this.left = left2;
        this.top = top2;
        this.right = right2;
        this.bottom = bottom2;
      }
      isEqual(insets) {
        return insets !== null && this.left === insets.left && this.top === insets.top && this.right === insets.right && this.bottom === insets.bottom;
      }
    };
    Rect = class _Rect {
      left;
      top;
      width;
      height;
      constructor(left2, top2, width, height) {
        this.left = left2;
        this.top = top2;
        this.width = width;
        this.height = height;
      }
      isEqual(rect) {
        return rect !== null && this.left === rect.left && this.top === rect.top && this.width === rect.width && this.height === rect.height;
      }
      scale(scale) {
        return new _Rect(this.left * scale, this.top * scale, this.width * scale, this.height * scale);
      }
      relativeTo(origin) {
        return new _Rect(this.left - origin.left, this.top - origin.top, this.width, this.height);
      }
      rebaseTo(origin) {
        return new _Rect(this.left + origin.left, this.top + origin.top, this.width, this.height);
      }
    };
    (function(Type2) {
      Type2["None"] = "None";
      Type2["Responsive"] = "Responsive";
      Type2["Device"] = "Device";
    })(Type || (Type = {}));
    MinDeviceSize = 50;
    MaxDeviceSize = 9999;
    MinDeviceScaleFactor = 0;
    MaxDeviceScaleFactor = 10;
    mobileUserAgent = "Mozilla/5.0 (Linux; Android 6.0; Nexus 5 Build/MRA58N) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/%s Mobile Safari/537.36";
    defaultMobileUserAgent = MultitargetNetworkManager.patchUserAgentWithChromeVersion(mobileUserAgent);
    defaultMobileUserAgentMetadata = {
      platform: "Android",
      platformVersion: "6.0",
      architecture: "",
      model: "Nexus 5",
      mobile: true
    };
    defaultMobileScaleFactor = 2;
    UIStrings$o = {
      fieldOverrideWarning: "Field metrics are configured for a different URL than the current page."
    };
    str_$n = registerUIStrings("models/crux-manager/CrUXManager.ts", UIStrings$o);
    i18nString$a = getLocalizedString.bind(void 0, str_$n);
    CRUX_API_KEY = "AIzaSyCCSOx25vrb5z0tbedCB3_JRzzbVW6Uwgw";
    DEFAULT_ENDPOINT = `https://chromeuxreport.googleapis.com/v1/records:queryRecord?key=${CRUX_API_KEY}`;
    DEVICE_SCOPE_LIST = ["ALL", "DESKTOP", "PHONE"];
    pageScopeList = ["origin", "url"];
    metrics = [
      "first_contentful_paint",
      "largest_contentful_paint",
      "cumulative_layout_shift",
      "interaction_to_next_paint",
      "round_trip_time",
      "form_factors",
      "largest_contentful_paint_image_time_to_first_byte",
      "largest_contentful_paint_image_resource_load_delay",
      "largest_contentful_paint_image_resource_load_duration",
      "largest_contentful_paint_image_element_render_delay"
    ];
    CrUXManager = class _CrUXManager extends ObjectWrapper {
      #originCache = /* @__PURE__ */ new Map();
      #urlCache = /* @__PURE__ */ new Map();
      #mainDocumentUrl;
      #configSetting;
      #endpoint = DEFAULT_ENDPOINT;
      #pageResult;
      fieldDeviceOption = "AUTO";
      fieldPageScope = "url";
      constructor() {
        super();
        const useSessionStorage = hostConfig.isOffTheRecord === true;
        const storageTypeForConsent = useSessionStorage ? "Session" : "Global";
        this.#configSetting = Settings.instance().createSetting("field-data", { enabled: false, override: "", originMappings: [], overrideEnabled: false }, storageTypeForConsent);
        this.#configSetting.addChangeListener(() => {
          void this.refresh();
        });
        TargetManager3.instance().addModelListener(ResourceTreeModel, Events$6.FrameNavigated, this.#onFrameNavigated, this);
      }
      static instance(opts = { forceNew: null }) {
        const { forceNew } = opts;
        if (!cruxManagerInstance || forceNew) {
          cruxManagerInstance = new _CrUXManager();
        }
        return cruxManagerInstance;
      }
      get pageResult() {
        return this.#pageResult;
      }
      getConfigSetting() {
        return this.#configSetting;
      }
      isEnabled() {
        return this.#configSetting.get().enabled;
      }
      async getFieldDataForPage(pageUrl) {
        const pageResult = {
          "origin-ALL": null,
          "origin-DESKTOP": null,
          "origin-PHONE": null,
          "origin-TABLET": null,
          "url-ALL": null,
          "url-DESKTOP": null,
          "url-PHONE": null,
          "url-TABLET": null,
          warnings: [],
          normalizedUrl: ""
        };
        try {
          const normalizedUrl = this.#normalizeUrl(pageUrl);
          pageResult.normalizedUrl = normalizedUrl.href;
          const promises2 = [];
          for (const pageScope of pageScopeList) {
            for (const deviceScope of DEVICE_SCOPE_LIST) {
              const promise = this.#getScopedData(normalizedUrl, pageScope, deviceScope).then((response) => {
                pageResult[`${pageScope}-${deviceScope}`] = response;
              });
              promises2.push(promise);
            }
          }
          await Promise.all(promises2);
        } catch (err) {
          console.error(err);
        } finally {
          return pageResult;
        }
      }
      #getMappedUrl(unmappedUrl) {
        try {
          const unmapped = new URL(unmappedUrl);
          const mappings = this.#configSetting.get().originMappings || [];
          const mapping = mappings.find((m) => m.developmentOrigin === unmapped.origin);
          if (!mapping) {
            return unmappedUrl;
          }
          const mapped = new URL(mapping.productionOrigin);
          mapped.pathname = unmapped.pathname;
          return mapped.href;
        } catch {
          return unmappedUrl;
        }
      }
      async getFieldDataForCurrentPageForTesting() {
        return await this.#getFieldDataForCurrentPage();
      }
      async #getFieldDataForCurrentPage() {
        const currentUrl = this.#mainDocumentUrl || await this.#getInspectedURL();
        const normalizedUrl = this.#configSetting.get().overrideEnabled ? this.#configSetting.get().override || "" : this.#getMappedUrl(currentUrl);
        const result = await this.getFieldDataForPage(normalizedUrl);
        if (currentUrl !== normalizedUrl) {
          result.warnings.push(i18nString$a(UIStrings$o.fieldOverrideWarning));
        }
        return result;
      }
      async #getInspectedURL() {
        const targetManager = TargetManager3.instance();
        let inspectedURL = targetManager.inspectedURL();
        if (!inspectedURL) {
          inspectedURL = await new Promise((resolve2) => {
            function handler(event) {
              const newInspectedURL = event.data.inspectedURL();
              if (newInspectedURL) {
                resolve2(newInspectedURL);
                targetManager.removeEventListener("InspectedURLChanged", handler);
              }
            }
            targetManager.addEventListener("InspectedURLChanged", handler);
          });
        }
        return inspectedURL;
      }
      async #onFrameNavigated(event) {
        if (!event.data.isPrimaryFrame()) {
          return;
        }
        this.#mainDocumentUrl = event.data.url;
        await this.refresh();
      }
      async refresh() {
        this.#pageResult = void 0;
        this.dispatchEventToListeners("field-data-changed", void 0);
        if (!this.#configSetting.get().enabled) {
          return;
        }
        this.#pageResult = await this.#getFieldDataForCurrentPage();
        this.dispatchEventToListeners("field-data-changed", this.#pageResult);
      }
      #normalizeUrl(inputUrl) {
        const normalizedUrl = new URL(inputUrl);
        normalizedUrl.hash = "";
        normalizedUrl.search = "";
        return normalizedUrl;
      }
      async #getScopedData(normalizedUrl, pageScope, deviceScope) {
        const { origin, href: url, hostname: hostname2 } = normalizedUrl;
        if (hostname2 === "localhost" || hostname2 === "127.0.0.1" || !origin.startsWith("http")) {
          return null;
        }
        const cache = pageScope === "origin" ? this.#originCache : this.#urlCache;
        const cacheKey = pageScope === "origin" ? `${origin}-${deviceScope}` : `${url}-${deviceScope}`;
        const cachedResponse = cache.get(cacheKey);
        if (cachedResponse !== void 0) {
          return cachedResponse;
        }
        try {
          const formFactor = deviceScope === "ALL" ? void 0 : deviceScope;
          const result = pageScope === "origin" ? await this.#makeRequest({ origin, metrics, formFactor }) : await this.#makeRequest({ url, metrics, formFactor });
          cache.set(cacheKey, result);
          return result;
        } catch (err) {
          console.error(err);
          return null;
        }
      }
      async #makeRequest(request3) {
        const body = JSON.stringify(request3);
        const response = await fetch(this.#endpoint, {
          method: "POST",
          body
        });
        if (!response.ok && response.status !== 404) {
          throw new Error(`Failed to fetch data from CrUX server (Status code: ${response.status})`);
        }
        const responseData = await response.json();
        if (response.status === 404) {
          if (responseData?.error?.status === "NOT_FOUND") {
            return null;
          }
          throw new Error(`Failed to fetch data from CrUX server (Status code: ${response.status})`);
        }
        if (!("record" in responseData)) {
          throw new Error(`Failed to find data in CrUX response: ${JSON.stringify(responseData)}`);
        }
        return responseData;
      }
      #getAutoDeviceScope() {
        const emulationModel = DeviceModeModel.tryInstance();
        if (emulationModel === null) {
          return "ALL";
        }
        if (emulationModel.isMobile()) {
          if (this.#pageResult?.[`${this.fieldPageScope}-PHONE`]) {
            return "PHONE";
          }
          return "ALL";
        }
        if (this.#pageResult?.[`${this.fieldPageScope}-DESKTOP`]) {
          return "DESKTOP";
        }
        return "ALL";
      }
      resolveDeviceOptionToScope(option) {
        return option === "AUTO" ? this.#getAutoDeviceScope() : option;
      }
      getSelectedDeviceScope() {
        return this.resolveDeviceOptionToScope(this.fieldDeviceOption);
      }
      getSelectedScope() {
        return { pageScope: this.fieldPageScope, deviceScope: this.getSelectedDeviceScope() };
      }
      getSelectedFieldResponse() {
        const pageScope = this.fieldPageScope;
        const deviceScope = this.getSelectedDeviceScope();
        return this.getFieldResponse(pageScope, deviceScope);
      }
      getSelectedFieldMetricData(fieldMetric) {
        return this.getSelectedFieldResponse()?.record.metrics[fieldMetric];
      }
      getFieldResponse(pageScope, deviceScope) {
        return this.#pageResult?.[`${pageScope}-${deviceScope}`];
      }
      setEndpointForTesting(endpoint) {
        this.#endpoint = endpoint;
      }
    };
    SourceMappingsUpdated = class _SourceMappingsUpdated extends Event {
      static eventName = "sourcemappingsupdated";
      constructor() {
        super(_SourceMappingsUpdated.eventName, { composed: true, bubbles: true });
      }
    };
    resolvedCodeLocationDataNames = /* @__PURE__ */ new Map();
    SourceMapsResolver = class extends EventTarget {
      executionContextNamesByOrigin = /* @__PURE__ */ new Map();
      #parsedTrace;
      #entityMapper = null;
      #isResolving = false;
      #debuggerModelsToListen = /* @__PURE__ */ new Set();
      constructor(parsedTrace, entityMapper) {
        super();
        this.#parsedTrace = parsedTrace;
        this.#entityMapper = entityMapper ?? null;
      }
      static clearResolvedNodeNames() {
        resolvedCodeLocationDataNames.clear();
      }
      static keyForCodeLocation(callFrame) {
        return `${callFrame.url}$$$${callFrame.scriptId}$$$${callFrame.functionName}$$$${callFrame.lineNumber}$$$${callFrame.columnNumber}`;
      }
      static resolvedCodeLocationForCallFrame(callFrame) {
        const codeLocationKey = this.keyForCodeLocation(callFrame);
        return resolvedCodeLocationDataNames.get(codeLocationKey) ?? null;
      }
      static resolvedCodeLocationForEntry(entry) {
        let callFrame = null;
        if (isProfileCall2(entry)) {
          callFrame = entry.callFrame;
        } else {
          const topCallFrame = getStackTraceTopCallFrameInEventPayload2(entry);
          if (!topCallFrame) {
            return null;
          }
          callFrame = topCallFrame;
        }
        return _a$1.resolvedCodeLocationForCallFrame(callFrame);
      }
      static resolvedURLForEntry(parsedTrace, entry) {
        const resolvedCallFrameURL = _a$1.resolvedCodeLocationForEntry(entry)?.devtoolsLocation?.uiSourceCode.url();
        if (resolvedCallFrameURL) {
          return resolvedCallFrameURL;
        }
        const url = getNonResolvedURL2(entry, parsedTrace.data);
        if (url) {
          return WorkspaceImpl.instance().uiSourceCodeForURL(url)?.url() ?? url;
        }
        return null;
      }
      static codeLocationForEntry(parsedTrace, entry) {
        const uiLocation = _a$1.resolvedCodeLocationForEntry(entry)?.devtoolsLocation;
        if (uiLocation) {
          return { url: uiLocation.uiSourceCode.url(), line: uiLocation.lineNumber, column: uiLocation.columnNumber };
        }
        const rawCallFrame = rawCallFrameForEntry(entry);
        if (rawCallFrame) {
          const line = rawCallFrame.lineNumber >= 0 ? rawCallFrame.lineNumber : void 0;
          const column = rawCallFrame.columnNumber >= 0 ? rawCallFrame.columnNumber : void 0;
          return { url: rawCallFrame.url, line, column };
        }
        let url = getNonResolvedURL2(entry, parsedTrace.data);
        if (url) {
          url = WorkspaceImpl.instance().uiSourceCodeForURL(url)?.url() ?? url;
        }
        if (url) {
          return { url };
        }
        return null;
      }
      static storeResolvedCodeDataForCallFrame(callFrame, resolvedCodeLocationData) {
        const keyForCallFrame = this.keyForCodeLocation(callFrame);
        resolvedCodeLocationDataNames.set(keyForCallFrame, resolvedCodeLocationData);
      }
      async install() {
        for (const threadToProfileMap of this.#parsedTrace.data.Samples.profilesInProcess.values()) {
          for (const [tid, profile] of threadToProfileMap) {
            const nodes = profile.parsedProfile.nodes();
            if (!nodes || nodes.length === 0) {
              continue;
            }
            const target = this.#targetForThread(tid);
            const debuggerModel = target?.model(DebuggerModel);
            if (!debuggerModel) {
              continue;
            }
            for (const node2 of nodes) {
              const script = debuggerModel.scriptForId(String(node2.callFrame.scriptId));
              const shouldListenToSourceMap = !script || script.sourceMapURL;
              if (!shouldListenToSourceMap) {
                continue;
              }
              this.#debuggerModelsToListen.add(debuggerModel);
            }
          }
        }
        for (const debuggerModel of this.#debuggerModelsToListen) {
          debuggerModel.sourceMapManager().addEventListener(Events$b.SourceMapAttached, this.#onAttachedSourceMap, this);
        }
        this.#updateExtensionNames();
        await this.#resolveMappingsForProfileNodes();
      }
      uninstall() {
        for (const debuggerModel of this.#debuggerModelsToListen) {
          debuggerModel.sourceMapManager().removeEventListener(Events$b.SourceMapAttached, this.#onAttachedSourceMap, this);
        }
        this.#debuggerModelsToListen.clear();
      }
      async #resolveMappingsForProfileNodes() {
        let updatedMappings = false;
        for (const [, threadsInProcess3] of this.#parsedTrace.data.Samples.profilesInProcess) {
          for (const [tid, threadProfile] of threadsInProcess3) {
            const nodes = threadProfile.parsedProfile.nodes() ?? [];
            const target = this.#targetForThread(tid);
            if (!target) {
              continue;
            }
            for (const node2 of nodes) {
              const resolvedFunctionName = await resolveProfileFrameFunctionName(node2.callFrame, target);
              updatedMappings ||= Boolean(resolvedFunctionName);
              node2.setOriginalFunctionName(resolvedFunctionName);
              const debuggerModel = target.model(DebuggerModel);
              const script = debuggerModel?.scriptForId(node2.scriptId) || null;
              const location = debuggerModel && new Location$1(debuggerModel, node2.callFrame.scriptId, node2.callFrame.lineNumber, node2.callFrame.columnNumber);
              const uiLocation = location && await DebuggerWorkspaceBinding.instance().rawLocationToUILocation(location);
              updatedMappings ||= Boolean(uiLocation);
              if (uiLocation?.uiSourceCode.url() && this.#entityMapper) {
                this.#entityMapper.updateSourceMapEntities(node2.callFrame, uiLocation.uiSourceCode.url());
              }
              _a$1.storeResolvedCodeDataForCallFrame(node2.callFrame, { name: resolvedFunctionName, devtoolsLocation: uiLocation, script });
            }
          }
        }
        if (!updatedMappings) {
          return;
        }
        this.dispatchEvent(new SourceMappingsUpdated());
      }
      #onAttachedSourceMap() {
        if (this.#isResolving) {
          return;
        }
        this.#isResolving = true;
        setTimeout(async () => {
          this.#isResolving = false;
          await this.#resolveMappingsForProfileNodes();
        }, 500);
      }
      #targetForThread(tid) {
        const maybeWorkerId = this.#parsedTrace.data.Workers.workerIdByThread.get(tid);
        if (maybeWorkerId) {
          return TargetManager3.instance().targetById(maybeWorkerId);
        }
        return TargetManager3.instance().primaryPageTarget();
      }
      #updateExtensionNames() {
        for (const runtimeModel of TargetManager3.instance().models(RuntimeModel)) {
          for (const context2 of runtimeModel.executionContexts()) {
            this.executionContextNamesByOrigin.set(context2.origin, context2.name);
          }
        }
        this.#entityMapper?.updateExtensionEntitiesWithName(this.executionContextNamesByOrigin);
      }
    };
    _a$1 = SourceMapsResolver;
    AICallTree = class _AICallTree {
      selectedNode;
      rootNode;
      parsedTrace;
      #eventsSerializer = new EventsSerializer();
      constructor(selectedNode, rootNode, parsedTrace) {
        this.selectedNode = selectedNode;
        this.rootNode = rootNode;
        this.parsedTrace = parsedTrace;
      }
      static findEventsForThread({ thread, parsedTrace, bounds }) {
        const threadEvents = parsedTrace.data.Renderer.processes.get(thread.pid)?.threads.get(thread.tid)?.entries;
        if (!threadEvents) {
          return null;
        }
        return threadEvents.filter((e) => eventIsInBounds2(e, bounds));
      }
      static findMainThreadTasks({ thread, parsedTrace, bounds }) {
        const threadEvents = parsedTrace.data.Renderer.processes.get(thread.pid)?.threads.get(thread.tid)?.entries;
        if (!threadEvents) {
          return null;
        }
        return threadEvents.filter(isRunTask2).filter((e) => eventIsInBounds2(e, bounds));
      }
      static fromTimeOnThread({ thread, parsedTrace, bounds }) {
        const overlappingEvents = this.findEventsForThread({ thread, parsedTrace, bounds });
        if (!overlappingEvents) {
          return null;
        }
        const visibleEventsFilter = new VisibleEventsFilter2(visibleTypes());
        const minDuration = Micro2(bounds.range * 5e-3);
        const minDurationFilter = new MinDurationFilter(minDuration);
        const compileCodeFilter = new ExcludeCompileCodeFilter();
        const rootNode = new TopDownRootNode(overlappingEvents, {
          filters: [minDurationFilter, compileCodeFilter, visibleEventsFilter],
          startTime: microToMilli2(bounds.min),
          endTime: microToMilli2(bounds.max),
          doNotAggregate: true,
          includeInstantEvents: true
        });
        const instance2 = new _AICallTree(null, rootNode, parsedTrace);
        return instance2;
      }
      static fromEvent(selectedEvent, parsedTrace) {
        if (isPerformanceMark2(selectedEvent)) {
          return null;
        }
        const threads = threadsInTrace2(parsedTrace.data);
        const thread = threads.find((t) => t.pid === selectedEvent.pid && t.tid === selectedEvent.tid);
        if (!thread) {
          return null;
        }
        if (thread.type !== "MAIN_THREAD" && thread.type !== "CPU_PROFILE") {
          return null;
        }
        const data32 = parsedTrace.data;
        if (!data32.Renderer.entryToNode.has(selectedEvent) && !data32.Samples.entryToNode.has(selectedEvent)) {
          return null;
        }
        const showAllEvents = parsedTrace.data.Meta.config.showAllEvents;
        const { startTime, endTime } = eventTimingsMilliSeconds2(selectedEvent);
        const selectedEventBounds = traceWindowFromMicroSeconds2(milliToMicro2(startTime), milliToMicro2(endTime));
        let threadEvents = data32.Renderer.processes.get(selectedEvent.pid)?.threads.get(selectedEvent.tid)?.entries;
        if (!threadEvents) {
          threadEvents = data32.Samples.profilesInProcess.get(selectedEvent.pid)?.get(selectedEvent.tid)?.profileCalls;
        }
        if (!threadEvents) {
          console.warn(`AICallTree: could not find thread for selected entry: ${selectedEvent}`);
          return null;
        }
        const overlappingEvents = threadEvents.filter((e) => eventIsInBounds2(e, selectedEventBounds));
        const filters = [new SelectedEventDurationFilter(selectedEvent), new ExcludeCompileCodeFilter(selectedEvent)];
        if (!showAllEvents) {
          filters.push(new VisibleEventsFilter2(visibleTypes()));
        }
        const rootNode = new TopDownRootNode(overlappingEvents, {
          filters,
          startTime,
          endTime,
          includeInstantEvents: true
        });
        let selectedNode = null;
        depthFirstWalk([rootNode].values(), (node2) => {
          if (node2.event === selectedEvent) {
            selectedNode = node2;
            return true;
          }
          return;
        });
        if (selectedNode === null) {
          console.warn(`Selected event ${selectedEvent} not found within its own tree.`);
          return null;
        }
        const instance2 = new _AICallTree(selectedNode, rootNode, parsedTrace);
        return instance2;
      }
      breadthFirstWalk(nodes, serializeNodeCallback) {
        const queue = Array.from(nodes);
        let nodeIndex = 1;
        let nodesAddedToQueueCount = queue.length;
        let currentNode = queue.shift();
        while (currentNode) {
          if (currentNode.children().size > 0) {
            serializeNodeCallback(currentNode, nodeIndex, nodesAddedToQueueCount + 1);
          } else {
            serializeNodeCallback(currentNode, nodeIndex);
          }
          queue.push(...Array.from(currentNode.children().values()));
          nodesAddedToQueueCount += currentNode.children().size;
          currentNode = queue.shift();
          nodeIndex++;
        }
      }
      serialize(headerLevel = 1) {
        const header = "#".repeat(headerLevel);
        const allUrls = [];
        let nodesStr = "";
        this.breadthFirstWalk(this.rootNode.children().values(), (node2, nodeId, childStartingNode) => {
          nodesStr += "\n" + this.stringifyNode(node2, nodeId, this.parsedTrace, this.selectedNode, allUrls, childStartingNode);
        });
        let output = "";
        if (allUrls.length) {
          output += `
${header} All URLs:

` + allUrls.map((url, index2) => `  * ${index2}: ${url}`).join("\n");
        }
        output += `

${header} Call tree:
${nodesStr}`;
        return output;
      }
      stringifyNode(node2, nodeId, parsedTrace, selectedNode, allUrls, childStartingNodeIndex) {
        const event = node2.event;
        if (!event) {
          throw new Error("Event required");
        }
        const idStr = String(nodeId);
        const eventKey = this.#eventsSerializer.keyForEvent(node2.event);
        const name = forEntry(event, parsedTrace);
        const roundToTenths = (num) => {
          if (!num) {
            return "";
          }
          return String(Math.round(num * 10) / 10);
        };
        const durationStr = roundToTenths(node2.totalTime);
        const selfTimeStr = roundToTenths(node2.selfTime);
        const location = SourceMapsResolver.codeLocationForEntry(parsedTrace, event);
        const url = location?.url;
        let urlIndexStr = "";
        if (url) {
          const existingIndex = allUrls.indexOf(url);
          if (existingIndex === -1) {
            urlIndexStr = String(allUrls.push(url) - 1);
          } else {
            urlIndexStr = String(existingIndex);
          }
        }
        const children = Array.from(node2.children().values());
        let childRangeStr = "";
        if (childStartingNodeIndex) {
          childRangeStr = children.length === 1 ? String(childStartingNodeIndex) : `${childStartingNodeIndex}-${childStartingNodeIndex + children.length}`;
        }
        const selectedMarker = selectedNode?.event === node2.event ? "S" : "";
        let line = idStr;
        line += ";" + eventKey;
        line += ";" + name;
        line += ";" + durationStr;
        line += ";" + selfTimeStr;
        line += ";" + urlIndexStr;
        line += ";" + childRangeStr;
        line += ";" + (location?.line ?? "");
        line += ";" + (location?.column ?? "");
        if (selectedMarker) {
          line += ";" + selectedMarker;
        }
        return line;
      }
      topCallFramesBySelfTime(limit2) {
        const functionNodesByCallFrame = /* @__PURE__ */ new Map();
        this.breadthFirstWalk(this.rootNode.children().values(), (node2) => {
          if (isProfileCall2(node2.event)) {
            const callFrame = node2.event.callFrame;
            const callFrameKey = `${callFrame.scriptId}:${callFrame.lineNumber}:${callFrame.columnNumber}`;
            const array2 = functionNodesByCallFrame.get(callFrameKey) ?? [];
            array2.push(node2);
            functionNodesByCallFrame.set(callFrameKey, array2);
          }
        });
        return [...functionNodesByCallFrame.values()].map((nodes) => {
          return {
            callFrame: nodes[0].event.callFrame,
            selfTime: nodes.reduce((total, cur) => total + cur.selfTime, 0)
          };
        }).sort((a, b) => b.selfTime - a.selfTime).slice(0, limit2).map(({ callFrame }) => callFrame);
      }
      topCallFrameByTotalTime() {
        let topChild = null;
        let topProfileCallEvent = null;
        for (const child of this.rootNode.children().values()) {
          if (isProfileCall2(child.event)) {
            if (!topChild || child.totalTime > topChild.totalTime) {
              topChild = child;
              topProfileCallEvent = child.event;
            }
          }
        }
        return topProfileCallEvent?.callFrame ?? null;
      }
      logDebug() {
        const str = this.serialize();
        console.log("\u{1F386}", str);
        if (str.length > 45e3) {
          console.warn("Output will likely not fit in the context window. Expect an AIDA error.");
        }
      }
    };
    ExcludeCompileCodeFilter = class extends TraceFilter2 {
      #selectedEvent = null;
      constructor(selectedEvent) {
        super();
        this.#selectedEvent = selectedEvent ?? null;
      }
      accept(event) {
        if (this.#selectedEvent && event === this.#selectedEvent) {
          return true;
        }
        return event.name !== "V8.CompileCode";
      }
    };
    SelectedEventDurationFilter = class extends TraceFilter2 {
      #minDuration;
      #selectedEvent;
      constructor(selectedEvent) {
        super();
        this.#minDuration = Micro2((selectedEvent.dur ?? 1) * 5e-3);
        this.#selectedEvent = selectedEvent;
      }
      accept(event) {
        if (event === this.#selectedEvent) {
          return true;
        }
        return event.dur ? event.dur >= this.#minDuration : false;
      }
    };
    MinDurationFilter = class extends TraceFilter2 {
      #minDuration;
      constructor(minDuration) {
        super();
        this.#minDuration = minDuration;
      }
      accept(event) {
        return event.dur ? event.dur >= this.#minDuration : false;
      }
    };
    AIQueries = class {
      static findMainThread(navigationId, parsedTrace) {
        let mainThreadPID = null;
        let mainThreadTID = null;
        if (navigationId) {
          const navigation2 = parsedTrace.data.Meta.navigationsByNavigationId.get(navigationId);
          if (navigation2?.args.data?.isOutermostMainFrame) {
            mainThreadPID = navigation2.pid;
            mainThreadTID = navigation2.tid;
          }
        }
        const threads = threadsInTrace2(parsedTrace.data);
        const thread = threads.find((thread2) => {
          if (!thread2.processIsOnMainFrame) {
            return false;
          }
          if (mainThreadPID && mainThreadTID) {
            return thread2.pid === mainThreadPID && thread2.tid === mainThreadTID;
          }
          return thread2.type === "MAIN_THREAD";
        });
        return thread ?? null;
      }
      static mainThreadActivityBottomUpSingleNavigation(navigationId, bounds, parsedTrace) {
        const thread = this.findMainThread(navigationId, parsedTrace);
        if (!thread) {
          return null;
        }
        const events = AICallTree.findEventsForThread({ thread, parsedTrace, bounds });
        if (!events) {
          return null;
        }
        const visibleEvents = VISIBLE_TRACE_EVENT_TYPES2.values().toArray();
        const filter2 = new VisibleEventsFilter2(visibleEvents.concat(["SyntheticNetworkRequest"]));
        const startTime = microToMilli2(bounds.min);
        const endTime = microToMilli2(bounds.max);
        return new BottomUpRootNode2(events, {
          textFilter: new ExclusiveNameFilter2([]),
          filters: [filter2],
          startTime,
          endTime
        });
      }
      static mainThreadActivityBottomUp(bounds, parsedTrace) {
        const threads = [];
        if (parsedTrace.insights) {
          for (const insightSet of parsedTrace.insights?.values()) {
            const thread = this.findMainThread(insightSet.navigation?.args.data?.navigationId, parsedTrace);
            if (thread) {
              threads.push(thread);
            }
          }
        } else {
          const navigationId = parsedTrace.data.Meta.mainFrameNavigations[0].args.data?.navigationId;
          const thread = this.findMainThread(navigationId, parsedTrace);
          if (thread) {
            threads.push(thread);
          }
        }
        if (threads.length === 0) {
          return null;
        }
        const threadEvents = [...new Set(threads)].map((thread) => AICallTree.findEventsForThread({ thread, parsedTrace, bounds }) ?? []);
        const events = threadEvents.flat();
        if (events.length === 0) {
          return null;
        }
        const visibleEvents = VISIBLE_TRACE_EVENT_TYPES2.values().toArray();
        const filter2 = new VisibleEventsFilter2(visibleEvents.concat(["SyntheticNetworkRequest"]));
        const startTime = microToMilli2(bounds.min);
        const endTime = microToMilli2(bounds.max);
        return new BottomUpRootNode2(events, {
          textFilter: new ExclusiveNameFilter2([]),
          filters: [filter2],
          startTime,
          endTime
        });
      }
      static mainThreadActivityTopDown(navigationId, bounds, parsedTrace) {
        const thread = this.findMainThread(navigationId, parsedTrace);
        if (!thread) {
          return null;
        }
        return AICallTree.fromTimeOnThread({
          thread: {
            pid: thread.pid,
            tid: thread.tid
          },
          parsedTrace,
          bounds
        });
      }
      static longestTasks(navigationId, bounds, parsedTrace, limit2 = 3) {
        const thread = this.findMainThread(navigationId, parsedTrace);
        if (!thread) {
          return null;
        }
        const tasks = AICallTree.findMainThreadTasks({ thread, parsedTrace, bounds });
        if (!tasks) {
          return null;
        }
        const topTasks = tasks.filter((e) => e.name === "RunTask").sort((a, b) => b.dur - a.dur).slice(0, limit2);
        return topTasks.map((task) => {
          const tree = AICallTree.fromEvent(task, parsedTrace);
          if (tree) {
            tree.selectedNode = null;
          }
          return tree;
        }).filter((tree) => !!tree);
      }
    };
    UIStrings$n = {
      anonymous: "<anonymous>"
    };
    str_$m = registerUIStrings("models/logs/NetworkLog.ts", UIStrings$n);
    i18nString$9 = getLocalizedString.bind(void 0, str_$m);
    NetworkLog = class _NetworkLog extends ObjectWrapper {
      #requests = [];
      #sentNetworkRequests = [];
      #receivedNetworkResponses = [];
      #requestsSet = /* @__PURE__ */ new Set();
      #requestsMap = /* @__PURE__ */ new Map();
      #pageLoadForManager = /* @__PURE__ */ new Map();
      #unresolvedPreflightRequests = /* @__PURE__ */ new Map();
      #modelListeners = /* @__PURE__ */ new WeakMap();
      #initiatorData = /* @__PURE__ */ new WeakMap();
      #isRecording = true;
      constructor() {
        super();
        TargetManager3.instance().observeModels(NetworkManager2, this);
        const recordLogSetting = Settings.instance().moduleSetting("network-log.record-log");
        recordLogSetting.addChangeListener(() => {
          const preserveLogSetting = Settings.instance().moduleSetting("network-log.preserve-log");
          if (!preserveLogSetting.get() && recordLogSetting.get()) {
            this.reset(true);
          }
          this.setIsRecording(recordLogSetting.get());
        }, this);
      }
      static instance() {
        if (!networkLogInstance) {
          networkLogInstance = new _NetworkLog();
        }
        return networkLogInstance;
      }
      static removeInstance() {
        networkLogInstance = void 0;
      }
      modelAdded(networkManager) {
        const eventListeners = [];
        eventListeners.push(networkManager.addEventListener(Events$c.RequestStarted, this.onRequestStarted, this));
        eventListeners.push(networkManager.addEventListener(Events$c.RequestUpdated, this.onRequestUpdated, this));
        eventListeners.push(networkManager.addEventListener(Events$c.RequestRedirected, this.onRequestRedirect, this));
        eventListeners.push(networkManager.addEventListener(Events$c.RequestFinished, this.onRequestUpdated, this));
        eventListeners.push(networkManager.addEventListener(Events$c.MessageGenerated, this.networkMessageGenerated.bind(this, networkManager)));
        eventListeners.push(networkManager.addEventListener(Events$c.ResponseReceived, this.onResponseReceived, this));
        const resourceTreeModel = networkManager.target().model(ResourceTreeModel);
        if (resourceTreeModel) {
          eventListeners.push(resourceTreeModel.addEventListener(Events$6.WillReloadPage, this.willReloadPage, this));
          eventListeners.push(resourceTreeModel.addEventListener(Events$6.PrimaryPageChanged, this.onPrimaryPageChanged, this));
          eventListeners.push(resourceTreeModel.addEventListener(Events$6.Load, this.onLoad, this));
          eventListeners.push(resourceTreeModel.addEventListener(Events$6.DOMContentLoaded, this.onDOMContentLoaded.bind(this, resourceTreeModel)));
        }
        this.#modelListeners.set(networkManager, eventListeners);
      }
      modelRemoved(networkManager) {
        this.removeNetworkManagerListeners(networkManager);
      }
      removeNetworkManagerListeners(networkManager) {
        removeEventListeners(this.#modelListeners.get(networkManager) || []);
      }
      setIsRecording(enabled) {
        if (this.#isRecording === enabled) {
          return;
        }
        this.#isRecording = enabled;
        if (enabled) {
          TargetManager3.instance().observeModels(NetworkManager2, this);
        } else {
          TargetManager3.instance().unobserveModels(NetworkManager2, this);
          TargetManager3.instance().models(NetworkManager2).forEach(this.removeNetworkManagerListeners.bind(this));
        }
      }
      requestForURL(url) {
        return this.#requests.find((request3) => request3.url() === url) || null;
      }
      originalRequestForURL(url) {
        return this.#sentNetworkRequests.find((request3) => request3.url === url) || null;
      }
      originalResponseForURL(url) {
        return this.#receivedNetworkResponses.find((response) => response.url === url) || null;
      }
      requests() {
        return this.#requests;
      }
      requestByManagerAndId(networkManager, requestId) {
        for (let i = this.#requests.length - 1; i >= 0; i--) {
          const request3 = this.#requests[i];
          if (requestId === request3.requestId() && networkManager === NetworkManager2.forRequest(request3)) {
            return request3;
          }
        }
        return null;
      }
      requestByManagerAndURL(networkManager, url) {
        for (const request3 of this.#requests) {
          if (url === request3.url() && networkManager === NetworkManager2.forRequest(request3)) {
            return request3;
          }
        }
        return null;
      }
      initializeInitiatorSymbolIfNeeded(request3) {
        let initiatorInfo = this.#initiatorData.get(request3);
        if (initiatorInfo) {
          return initiatorInfo;
        }
        initiatorInfo = {
          info: null,
          chain: null
        };
        this.#initiatorData.set(request3, initiatorInfo);
        return initiatorInfo;
      }
      static initiatorInfoForRequest(request3, existingInitiatorData) {
        const initiatorInfo = existingInitiatorData || {
          info: null
        };
        let type2 = "other";
        let url = EmptyUrlString;
        let lineNumber = void 0;
        let columnNumber = void 0;
        let scriptId = null;
        let initiatorStack = null;
        let initiatorRequest = null;
        const initiator = request3.initiator();
        const redirectSource = request3.redirectSource();
        if (redirectSource) {
          type2 = "redirect";
          url = redirectSource.url();
        } else if (initiator) {
          if (initiator.type === "parser") {
            type2 = "parser";
            url = initiator.url ? initiator.url : url;
            lineNumber = initiator.lineNumber;
            columnNumber = initiator.columnNumber;
          } else if (initiator.type === "script") {
            for (let stack = initiator.stack; stack; ) {
              const topFrame = stack.callFrames.length ? stack.callFrames[0] : null;
              if (!topFrame) {
                stack = stack.parent;
                continue;
              }
              type2 = "script";
              url = topFrame.url || i18nString$9(UIStrings$n.anonymous);
              lineNumber = topFrame.lineNumber;
              columnNumber = topFrame.columnNumber;
              scriptId = topFrame.scriptId;
              break;
            }
            if (!initiator.stack && initiator.url) {
              type2 = "script";
              url = initiator.url;
              lineNumber = initiator.lineNumber;
            }
            if (initiator.stack?.callFrames?.length) {
              initiatorStack = initiator.stack;
            }
          } else if (initiator.type === "preload") {
            type2 = "preload";
          } else if (initiator.type === "preflight") {
            type2 = "preflight";
            initiatorRequest = request3.preflightInitiatorRequest();
          } else if (initiator.type === "SignedExchange") {
            type2 = "signedExchange";
            url = initiator.url || EmptyUrlString;
          }
        }
        initiatorInfo.info = { type: type2, url, lineNumber, columnNumber, scriptId, stack: initiatorStack, initiatorRequest };
        return initiatorInfo.info;
      }
      initiatorInfoForRequest(request3) {
        const initiatorInfo = this.initializeInitiatorSymbolIfNeeded(request3);
        if (initiatorInfo.info) {
          return initiatorInfo.info;
        }
        return _NetworkLog.initiatorInfoForRequest(request3, initiatorInfo);
      }
      initiatorGraphForRequest(request3) {
        const initiated = /* @__PURE__ */ new Map();
        const networkManager = NetworkManager2.forRequest(request3);
        for (const otherRequest of this.#requests) {
          const otherRequestManager = NetworkManager2.forRequest(otherRequest);
          if (networkManager === otherRequestManager && this.initiatorChain(otherRequest).has(request3)) {
            const initiatorRequest = this.initiatorRequest(otherRequest);
            if (initiatorRequest) {
              initiated.set(otherRequest, initiatorRequest);
            }
          }
        }
        return { initiators: this.initiatorChain(request3), initiated };
      }
      initiatorChain(request3) {
        const initiatorDataForRequest = this.initializeInitiatorSymbolIfNeeded(request3);
        let initiatorChainCache = initiatorDataForRequest.chain;
        if (initiatorChainCache) {
          return initiatorChainCache;
        }
        initiatorChainCache = /* @__PURE__ */ new Set();
        let checkRequest = request3;
        while (checkRequest) {
          const initiatorData = this.initializeInitiatorSymbolIfNeeded(checkRequest);
          if (initiatorData.chain) {
            initiatorChainCache = initiatorChainCache.union(initiatorData.chain);
            break;
          }
          if (initiatorChainCache.has(checkRequest)) {
            break;
          }
          initiatorChainCache.add(checkRequest);
          checkRequest = this.initiatorRequest(checkRequest);
        }
        initiatorDataForRequest.chain = initiatorChainCache;
        return initiatorChainCache;
      }
      initiatorRequest(request3) {
        const initiatorData = this.initializeInitiatorSymbolIfNeeded(request3);
        if (initiatorData.request !== void 0) {
          return initiatorData.request;
        }
        const url = this.initiatorInfoForRequest(request3).url;
        const networkManager = NetworkManager2.forRequest(request3);
        initiatorData.request = networkManager ? this.requestByManagerAndURL(networkManager, url) : null;
        return initiatorData.request;
      }
      willReloadPage() {
        if (!Settings.instance().moduleSetting("network-log.preserve-log").get()) {
          this.reset(true);
        }
      }
      onPrimaryPageChanged(event) {
        const mainFrame = event.data.frame;
        const manager = mainFrame.resourceTreeModel().target().model(NetworkManager2);
        if (!manager || mainFrame.resourceTreeModel().target().parentTarget()?.type() === Type$2.FRAME) {
          return;
        }
        if (mainFrame.url !== mainFrame.unreachableUrl() && schemeIs2(mainFrame.url, "chrome-error:")) {
          return;
        }
        const preserveLog = Settings.instance().moduleSetting("network-log.preserve-log").get();
        const oldRequests = this.#requests;
        const oldManagerRequests = this.#requests.filter((request3) => NetworkManager2.forRequest(request3) === manager);
        const oldRequestsSet = this.#requestsSet;
        this.#requests = [];
        this.#sentNetworkRequests = [];
        this.#receivedNetworkResponses = [];
        this.#requestsSet = /* @__PURE__ */ new Set();
        this.#requestsMap.clear();
        this.#unresolvedPreflightRequests.clear();
        this.dispatchEventToListeners(Events.Reset, { clearIfPreserved: !preserveLog });
        let currentPageLoad = null;
        const requestsToAdd = [];
        for (const request3 of oldManagerRequests) {
          if (event.data.type !== "Activation" && request3.loaderId !== mainFrame.loaderId) {
            continue;
          }
          if (!currentPageLoad) {
            currentPageLoad = new PageLoad(request3);
            let redirectSource = request3.redirectSource();
            while (redirectSource) {
              requestsToAdd.push(redirectSource);
              redirectSource = redirectSource.redirectSource();
            }
          }
          requestsToAdd.push(request3);
        }
        const serviceWorkerRequestsToAdd = [];
        for (const swRequest of oldRequests) {
          if (!swRequest.initiatedByServiceWorker()) {
            continue;
          }
          const keepRequest = requestsToAdd.some((request3) => request3.url() === swRequest.url() && request3.issueTime() <= swRequest.issueTime());
          if (keepRequest) {
            serviceWorkerRequestsToAdd.push(swRequest);
          }
        }
        requestsToAdd.push(...serviceWorkerRequestsToAdd);
        for (const request3 of requestsToAdd) {
          currentPageLoad?.bindRequest(request3);
          oldRequestsSet.delete(request3);
          this.addRequest(request3);
        }
        if (preserveLog) {
          for (const request3 of oldRequestsSet) {
            this.addRequest(request3, true);
            request3.preserved = true;
          }
        }
        if (currentPageLoad) {
          this.#pageLoadForManager.set(manager, currentPageLoad);
        }
      }
      addRequest(request3, preserveLog) {
        this.#requests.push(request3);
        this.#requestsSet.add(request3);
        const requestList = this.#requestsMap.get(request3.requestId());
        if (!requestList) {
          this.#requestsMap.set(request3.requestId(), [request3]);
        } else {
          requestList.push(request3);
        }
        this.tryResolvePreflightRequests(request3);
        this.dispatchEventToListeners(Events.RequestAdded, { request: request3, preserveLog });
      }
      removeRequest(request3) {
        const index2 = this.#requests.indexOf(request3);
        if (index2 > -1) {
          this.#requests.splice(index2, 1);
        }
        this.#requestsSet.delete(request3);
        this.#requestsMap.delete(request3.requestId());
        this.dispatchEventToListeners(Events.RequestRemoved, { request: request3 });
      }
      tryResolvePreflightRequests(request3) {
        if (request3.isPreflightRequest()) {
          const initiator = request3.initiator();
          if (initiator?.requestId) {
            const [initiatorRequest] = this.requestsForId(initiator.requestId);
            if (initiatorRequest) {
              request3.setPreflightInitiatorRequest(initiatorRequest);
              initiatorRequest.setPreflightRequest(request3);
            } else {
              this.#unresolvedPreflightRequests.set(initiator.requestId, request3);
            }
          }
        } else {
          const preflightRequest = this.#unresolvedPreflightRequests.get(request3.requestId());
          if (preflightRequest) {
            this.#unresolvedPreflightRequests.delete(request3.requestId());
            request3.setPreflightRequest(preflightRequest);
            preflightRequest.setPreflightInitiatorRequest(request3);
            const data32 = this.#initiatorData.get(preflightRequest);
            if (data32) {
              data32.info = null;
            }
            this.dispatchEventToListeners(Events.RequestUpdated, { request: preflightRequest });
          }
        }
      }
      importRequests(requests) {
        this.reset(true);
        this.#requests = [];
        this.#sentNetworkRequests = [];
        this.#receivedNetworkResponses = [];
        this.#requestsSet.clear();
        this.#requestsMap.clear();
        this.#unresolvedPreflightRequests.clear();
        for (const request3 of requests) {
          this.addRequest(request3);
        }
      }
      onRequestStarted(event) {
        const { request: request3, originalRequest } = event.data;
        if (originalRequest) {
          this.#sentNetworkRequests.push(originalRequest);
        }
        this.#requestsSet.add(request3);
        const manager = NetworkManager2.forRequest(request3);
        const pageLoad = manager ? this.#pageLoadForManager.get(manager) : null;
        if (pageLoad) {
          pageLoad.bindRequest(request3);
        }
        this.addRequest(request3);
      }
      onResponseReceived(event) {
        const response = event.data.response;
        this.#receivedNetworkResponses.push(response);
      }
      onRequestUpdated(event) {
        const request3 = event.data;
        if (!this.#requestsSet.has(request3)) {
          return;
        }
        this.dispatchEventToListeners(Events.RequestUpdated, { request: request3 });
      }
      onRequestRedirect(event) {
        this.#initiatorData.delete(event.data);
      }
      onDOMContentLoaded(resourceTreeModel, event) {
        const networkManager = resourceTreeModel.target().model(NetworkManager2);
        const pageLoad = networkManager ? this.#pageLoadForManager.get(networkManager) : null;
        if (pageLoad) {
          pageLoad.contentLoadTime = event.data;
        }
      }
      onLoad(event) {
        const networkManager = event.data.resourceTreeModel.target().model(NetworkManager2);
        const pageLoad = networkManager ? this.#pageLoadForManager.get(networkManager) : null;
        if (pageLoad) {
          pageLoad.loadTime = event.data.loadTime;
        }
      }
      reset(clearIfPreserved) {
        this.#requests = [];
        this.#sentNetworkRequests = [];
        this.#receivedNetworkResponses = [];
        this.#requestsSet.clear();
        this.#requestsMap.clear();
        this.#unresolvedPreflightRequests.clear();
        const managers = new Set(TargetManager3.instance().models(NetworkManager2));
        for (const manager of this.#pageLoadForManager.keys()) {
          if (!managers.has(manager)) {
            this.#pageLoadForManager.delete(manager);
          }
        }
        this.dispatchEventToListeners(Events.Reset, { clearIfPreserved });
      }
      networkMessageGenerated(networkManager, event) {
        const { message, warning, requestId } = event.data;
        const consoleMessage = new ConsoleMessage2(networkManager.target().model(RuntimeModel), "network", warning ? "warning" : "info", message);
        this.associateConsoleMessageWithRequest(consoleMessage, requestId);
        networkManager.target().model(ConsoleModel)?.addMessage(consoleMessage);
      }
      associateConsoleMessageWithRequest(consoleMessage, requestId) {
        const target = consoleMessage.target();
        const networkManager = target ? target.model(NetworkManager2) : null;
        if (!networkManager) {
          return;
        }
        const request3 = this.requestByManagerAndId(networkManager, requestId);
        if (!request3) {
          return;
        }
        consoleMessageToRequest.set(consoleMessage, request3);
        const initiator = request3.initiator();
        if (initiator) {
          consoleMessage.stackTrace = initiator.stack || void 0;
          if (initiator.url) {
            consoleMessage.url = initiator.url;
            consoleMessage.line = initiator.lineNumber || 0;
          }
        }
      }
      static requestForConsoleMessage(consoleMessage) {
        return consoleMessageToRequest.get(consoleMessage) || null;
      }
      requestsForId(requestId) {
        return this.#requestsMap.get(requestId) || [];
      }
    };
    consoleMessageToRequest = /* @__PURE__ */ new WeakMap();
    (function(Events2) {
      Events2["Reset"] = "Reset";
      Events2["RequestAdded"] = "RequestAdded";
      Events2["RequestUpdated"] = "RequestUpdated";
      Events2["RequestRemoved"] = "RequestRemoved";
    })(Events || (Events = {}));
    UIStrings$m = {
      sLatencySDownloadSTotal: "{PH1} latency, {PH2} download ({PH3} total)",
      sLatency: "{PH1} latency",
      sDownload: "{PH1} download",
      sFromServiceworker: "{PH1} (from `ServiceWorker`)",
      sFromCache: "{PH1} (from cache)"
    };
    str_$l = registerUIStrings("models/network_time_calculator/NetworkTimeCalculator.ts", UIStrings$m);
    getLocalizedString.bind(void 0, str_$l);
    defaultTimeFormatterOptions = {
      style: "unit",
      unitDisplay: "narrow",
      minimumFractionDigits: 0,
      maximumFractionDigits: 0
    };
    defaultByteFormatterOptions = {
      style: "unit",
      unitDisplay: "narrow",
      minimumFractionDigits: 0,
      maximumFractionDigits: 1
    };
    timeFormatters = {
      milli: new Intl.NumberFormat("en-US", {
        ...defaultTimeFormatterOptions,
        unit: "millisecond"
      }),
      milliWithPrecision: new Intl.NumberFormat("en-US", {
        ...defaultTimeFormatterOptions,
        maximumFractionDigits: 1,
        unit: "millisecond"
      }),
      second: new Intl.NumberFormat("en-US", {
        ...defaultTimeFormatterOptions,
        maximumFractionDigits: 1,
        unit: "second"
      }),
      micro: new Intl.NumberFormat("en-US", {
        ...defaultTimeFormatterOptions,
        unit: "microsecond"
      })
    };
    byteFormatters = {
      bytes: new Intl.NumberFormat("en-US", {
        ...defaultByteFormatterOptions,
        minimumFractionDigits: 0,
        maximumFractionDigits: 0,
        unit: "byte"
      }),
      kilobytes: new Intl.NumberFormat("en-US", {
        ...defaultByteFormatterOptions,
        unit: "kilobyte"
      }),
      megabytes: new Intl.NumberFormat("en-US", {
        ...defaultByteFormatterOptions,
        unit: "megabyte"
      })
    };
    MAX_HEADERS_SIZE = 1e3;
    MAX_BODY_SIZE = 1e4;
    NetworkRequestFormatter = class {
      #calculator;
      #request;
      static allowHeader(headerName) {
        return allowedHeaders.has(headerName.toLowerCase().trim());
      }
      static formatHeaders(title2, headers, addListPrefixToEachLine) {
        return formatLines(title2, sanitizeHeaders(headers).map((header) => {
          const prefix = addListPrefixToEachLine ? "- " : "";
          return prefix + header.name + ": " + header.value + "\n";
        }), MAX_HEADERS_SIZE);
      }
      static async formatBody(title2, request3, maxBodySize) {
        const data32 = await request3.requestContentData();
        if (ContentData.isError(data32)) {
          return "";
        }
        if (data32.isEmpty) {
          return `${title2}
<empty response>`;
        }
        if (data32.isTextContent) {
          const dataAsText = data32.text;
          if (dataAsText.length > maxBodySize) {
            return `${title2}
${dataAsText.substring(0, maxBodySize) + "... <truncated>"}`;
          }
          return `${title2}
${dataAsText}`;
        }
        return `${title2}
<binary data>`;
      }
      static formatInitiatorUrl(initiatorUrl, allowedOrigin) {
        const initiatorOrigin = new URL(initiatorUrl).origin;
        if (initiatorOrigin === allowedOrigin) {
          return initiatorUrl;
        }
        return "<redacted cross-origin initiator URL>";
      }
      static formatStatus(status) {
        let responseStatus = "";
        if (status.statusCode) {
          responseStatus = `Response status: ${status.statusCode} ${status.statusText}
`;
        }
        const flags = [];
        flags.push(status.finished ? "finished" : "pending");
        if (status.failed) {
          flags.push("failed");
        }
        if (status.canceled) {
          flags.push("canceled");
        }
        if (status.preserved) {
          flags.push("preserved");
        }
        const requestStatus = flags.length > 0 ? `Network request status: ${flags.join(", ")}
` : "";
        return `${responseStatus}${requestStatus}`;
      }
      static formatFailureReasons(reasons) {
        const lines = [];
        if (reasons.blockedReason) {
          lines.push(`Blocked reason: ${reasons.blockedReason}`);
        }
        if (reasons.corsErrorStatus) {
          lines.push(`CORS error: ${reasons.corsErrorStatus.corsError} ${reasons.corsErrorStatus.failedParameter}`);
        }
        if (reasons.localizedFailDescription) {
          lines.push(`Fail description: ${reasons.localizedFailDescription}`);
        }
        return lines.length > 0 ? `${lines.join("\n")}
` : "";
      }
      constructor(request3, calculator) {
        this.#request = request3;
        this.#calculator = calculator;
      }
      formatRequestHeaders() {
        return _a3.formatHeaders("Request headers:", this.#request.requestHeaders());
      }
      formatResponseHeaders() {
        return _a3.formatHeaders("Response headers:", this.#request.responseHeaders);
      }
      async formatResponseBody() {
        return await _a3.formatBody("Response body:", this.#request, MAX_BODY_SIZE);
      }
      async formatNetworkRequest() {
        let responseBody = await this.formatResponseBody();
        if (responseBody) {
          responseBody = `

${responseBody}`;
        }
        return `Request: ${this.#request.url()}
${AnnotationRepository.annotationsEnabled() ? `
Request ID: ${this.#request.requestId()}
` : ""}
${this.formatRequestHeaders()}

${this.formatResponseHeaders()}${responseBody}

${this.formatStatus()}${this.formatFailureReasons()}
Request timing:
${this.formatNetworkRequestTiming()}

Request initiator chain:
${this.formatRequestInitiatorChain()}`;
      }
      formatStatus() {
        return _a3.formatStatus({
          statusCode: this.#request.statusCode,
          statusText: this.#request.statusText,
          failed: this.#request.failed,
          canceled: this.#request.canceled,
          preserved: this.#request.preserved,
          finished: this.#request.finished
        });
      }
      formatFailureReasons() {
        return _a3.formatFailureReasons({
          blockedReason: this.#request.blockedReason(),
          corsErrorStatus: this.#request.corsErrorStatus(),
          localizedFailDescription: this.#request.localizedFailDescription
        });
      }
      formatRequestInitiatorChain() {
        const allowedOrigin = new URL(this.#request.url()).origin;
        let initiatorChain = "";
        let lineStart = "- URL: ";
        const graph3 = NetworkLog.instance().initiatorGraphForRequest(this.#request);
        for (const initiator of Array.from(graph3.initiators).reverse()) {
          initiatorChain = initiatorChain + lineStart + _a3.formatInitiatorUrl(initiator.url(), allowedOrigin) + "\n";
          lineStart = "	" + lineStart;
          if (initiator === this.#request) {
            initiatorChain = this.#formatRequestInitiated(graph3.initiated, this.#request, initiatorChain, lineStart, allowedOrigin);
          }
        }
        return initiatorChain.trim();
      }
      formatNetworkRequestTiming() {
        const results = calculateRequestTimeRanges(this.#request, this.#calculator.minimumBoundary());
        const getDuration = (name) => {
          const result = results.find((r) => r.name === name);
          if (!result) {
            return;
          }
          return seconds(result.end - result.start);
        };
        const labels2 = [
          {
            label: "Queued at (timestamp)",
            value: seconds(this.#request.issueTime() - this.#calculator.zeroTime())
          },
          {
            label: "Started at (timestamp)",
            value: seconds(this.#request.startTime - this.#calculator.zeroTime())
          },
          {
            label: "Queueing (duration)",
            value: getDuration("queueing")
          },
          {
            label: "Connection start (stalled) (duration)",
            value: getDuration("blocking")
          },
          {
            label: "Request sent (duration)",
            value: getDuration("sending")
          },
          {
            label: "Waiting for server response (duration)",
            value: getDuration("waiting")
          },
          {
            label: "Content download (duration)",
            value: getDuration("receiving")
          },
          {
            label: "Duration (duration)",
            value: getDuration("total")
          }
        ];
        return labels2.filter((label) => !!label.value).map((label) => `${label.label}: ${label.value}`).join("\n");
      }
      #formatRequestInitiated(initiated, parentRequest, initiatorChain, lineStart, allowedOrigin) {
        const visited = /* @__PURE__ */ new Set();
        visited.add(this.#request);
        for (const [keyRequest, initiatedRequest] of initiated.entries()) {
          if (initiatedRequest === parentRequest) {
            if (!visited.has(keyRequest)) {
              visited.add(keyRequest);
              initiatorChain = initiatorChain + lineStart + _a3.formatInitiatorUrl(keyRequest.url(), allowedOrigin) + "\n";
              initiatorChain = this.#formatRequestInitiated(initiated, keyRequest, initiatorChain, "	" + lineStart, allowedOrigin);
            }
          }
        }
        return initiatorChain;
      }
    };
    _a3 = NetworkRequestFormatter;
    allowedHeaders = /* @__PURE__ */ new Set([
      ":authority",
      ":method",
      ":path",
      ":scheme",
      "a-im",
      "accept-ch",
      "accept-charset",
      "accept-datetime",
      "accept-encoding",
      "accept-language",
      "accept-patch",
      "accept-ranges",
      "accept",
      "access-control-allow-credentials",
      "access-control-allow-headers",
      "access-control-allow-methods",
      "access-control-allow-origin",
      "access-control-expose-headers",
      "access-control-max-age",
      "access-control-request-headers",
      "access-control-request-method",
      "age",
      "allow",
      "alt-svc",
      "cache-control",
      "connection",
      "content-disposition",
      "content-encoding",
      "content-language",
      "content-location",
      "content-range",
      "content-security-policy",
      "content-type",
      "correlation-id",
      "date",
      "delta-base",
      "dnt",
      "expect-ct",
      "expect",
      "expires",
      "forwarded",
      "front-end-https",
      "host",
      "http2-settings",
      "if-modified-since",
      "if-range",
      "if-unmodified-source",
      "im",
      "last-modified",
      "link",
      "location",
      "max-forwards",
      "nel",
      "origin",
      "permissions-policy",
      "pragma",
      "preference-applied",
      "proxy-connection",
      "public-key-pins",
      "range",
      "referer",
      "refresh",
      "report-to",
      "retry-after",
      "save-data",
      "sec-gpc",
      "server",
      "status",
      "strict-transport-security",
      "te",
      "timing-allow-origin",
      "tk",
      "trailer",
      "transfer-encoding",
      "upgrade-insecure-requests",
      "upgrade",
      "user-agent",
      "vary",
      "via",
      "warning",
      "www-authenticate",
      "x-att-deviceid",
      "x-content-duration",
      "x-content-security-policy",
      "x-content-type-options",
      "x-correlation-id",
      "x-forwarded-for",
      "x-forwarded-host",
      "x-forwarded-proto",
      "x-frame-options",
      "x-http-method-override",
      "x-powered-by",
      "x-redirected-by",
      "x-request-id",
      "x-requested-with",
      "x-ua-compatible",
      "x-wap-profile",
      "x-webkit-csp",
      "x-xss-protection"
    ]);
    PerformanceTraceFormatter = class {
      #focus;
      #parsedTrace;
      #insightSet;
      #eventsSerializer;
      #formattedFunctionCodes = /* @__PURE__ */ new Set();
      resolveFunctionCode;
      constructor(focus) {
        this.#focus = focus;
        this.#parsedTrace = focus.parsedTrace;
        this.#insightSet = focus.primaryInsightSet;
        this.#eventsSerializer = focus.eventsSerializer;
      }
      serializeEvent(event) {
        const key = this.#eventsSerializer.keyForEvent(event);
        return `(eventKey: ${key}, ts: ${event.ts})`;
      }
      serializeBounds(bounds) {
        return `{min: ${bounds.min}, max: ${bounds.max}}`;
      }
      #getCruxTraceSummary(insightSet) {
        if (insightSet === null) {
          return [];
        }
        try {
          const cruxScope = CrUXManager.instance().getSelectedScope();
          const parts = [];
          const fieldMetrics = getFieldMetricsForInsightSet2(insightSet, this.#parsedTrace.metadata, cruxScope);
          const fieldLcp = fieldMetrics?.lcp;
          const fieldInp = fieldMetrics?.inp;
          const fieldCls = fieldMetrics?.cls;
          if (fieldLcp || fieldInp || fieldCls) {
            parts.push("Metrics (field / real users):");
            const serializeFieldMetricTimingResult = (fieldMetric) => {
              return `${Math.round(fieldMetric.value / 1e3)} ms (scope: ${fieldMetric.pageScope})`;
            };
            const serializeFieldMetricNumberResult = (fieldMetric) => {
              return `${fieldMetric.value.toFixed(2)} (scope: ${fieldMetric.pageScope})`;
            };
            if (fieldLcp) {
              parts.push(`  - LCP: ${serializeFieldMetricTimingResult(fieldLcp)}`);
              const fieldLcpBreakdown = fieldMetrics?.lcpBreakdown;
              if (fieldLcpBreakdown && (fieldLcpBreakdown.ttfb || fieldLcpBreakdown.loadDelay || fieldLcpBreakdown.loadDuration || fieldLcpBreakdown.renderDelay)) {
                parts.push("  - LCP breakdown:");
                if (fieldLcpBreakdown.ttfb) {
                  parts.push(`    - TTFB: ${serializeFieldMetricTimingResult(fieldLcpBreakdown.ttfb)}`);
                }
                if (fieldLcpBreakdown.loadDelay) {
                  parts.push(`    - Load delay: ${serializeFieldMetricTimingResult(fieldLcpBreakdown.loadDelay)}`);
                }
                if (fieldLcpBreakdown.loadDuration) {
                  parts.push(`    - Load duration: ${serializeFieldMetricTimingResult(fieldLcpBreakdown.loadDuration)}`);
                }
                if (fieldLcpBreakdown.renderDelay) {
                  parts.push(`    - Render delay: ${serializeFieldMetricTimingResult(fieldLcpBreakdown.renderDelay)}`);
                }
              }
            }
            if (fieldInp) {
              parts.push(`  - INP: ${serializeFieldMetricTimingResult(fieldInp)}`);
            }
            if (fieldCls) {
              parts.push(`  - CLS: ${serializeFieldMetricNumberResult(fieldCls)}`);
            }
            parts.push("  - The above data is from CrUX\u2013Chrome User Experience Report. It's how the page performs for real users.");
            parts.push("  - The values shown above are the p75 measure of all real Chrome users");
            parts.push("  - The scope indicates if the data came from the entire origin, or a specific url");
            parts.push("  - Lab metrics describe how this specific page load performed, while field metrics are an aggregation of results from real-world users. Best practice is to prioritize metrics that are bad in field data. Lab metrics may be better or worse than fields metrics depending on the developer's machine, network, or the actions performed while tracing.");
          }
          return parts;
        } catch {
          return [];
        }
      }
      formatTraceSummary() {
        const parsedTrace = this.#parsedTrace;
        const traceMetadata = this.#parsedTrace.metadata;
        const data32 = parsedTrace.data;
        const parts = [];
        parts.push(`URL: ${data32.Meta.mainFrameURL}`);
        parts.push(`Trace bounds: ${this.serializeBounds(data32.Meta.traceBounds)}`);
        parts.push("CPU throttling: " + (traceMetadata.cpuThrottling ? `${traceMetadata.cpuThrottling}x` : "none"));
        parts.push(`Network throttling: ${traceMetadata.networkThrottling ?? "none"}`);
        parts.push("\n# Available insight sets\n");
        parts.push("The following is a list of insight sets. An insight set covers a specific part of the trace, split by navigations. The insights within each insight set are specific to that part of the trace. Be sure to consider the insight set id and bounds when calling functions. If no specific insight set or navigation is mentioned, assume the user is referring to the first one.");
        for (const insightSet of parsedTrace.insights?.values() ?? []) {
          const lcp = getLCP2(insightSet);
          const cls = getCLS2(insightSet);
          const inp = getINP2(insightSet);
          parts.push(`
## insight set id: ${insightSet.id}
`);
          parts.push(`URL: ${insightSet.url}`);
          parts.push(`Bounds: ${this.serializeBounds(insightSet.bounds)}`);
          if (lcp || cls || inp) {
            parts.push("Metrics (lab / observed):");
            if (lcp) {
              const nodeId = insightSet.model.LCPBreakdown?.lcpEvent?.args.data?.nodeId;
              const nodeIdText = nodeId !== void 0 ? `, nodeId: ${nodeId}` : "";
              parts.push(`  - LCP: ${Math.round(lcp.value / 1e3)} ms, event: ${this.serializeEvent(lcp.event)}${nodeIdText}`);
              const subparts = insightSet.model.LCPBreakdown?.subparts;
              if (subparts) {
                const serializeSubpart = (subpart) => {
                  return `${micros(subpart.range)}, bounds: ${this.serializeBounds(subpart)}`;
                };
                parts.push("  - LCP breakdown:");
                parts.push(`    - TTFB: ${serializeSubpart(subparts.ttfb)}`);
                if (subparts.loadDelay !== void 0) {
                  parts.push(`    - Load delay: ${serializeSubpart(subparts.loadDelay)}`);
                }
                if (subparts.loadDuration !== void 0) {
                  parts.push(`    - Load duration: ${serializeSubpart(subparts.loadDuration)}`);
                }
                parts.push(`    - Render delay: ${serializeSubpart(subparts.renderDelay)}`);
              }
            }
            if (inp) {
              parts.push(`  - INP: ${Math.round(inp.value / 1e3)} ms, event: ${this.serializeEvent(inp.event)}`);
            }
            if (cls) {
              const eventText = cls.worstClusterEvent ? `, event: ${this.serializeEvent(cls.worstClusterEvent)}` : "";
              parts.push(`  - CLS: ${cls.value.toFixed(2)}${eventText}`);
              if (AnnotationRepository.annotationsEnabled()) {
                const worstClusterEvent = cls.worstClusterEvent;
                const layoutShiftData = worstClusterEvent?.worstShiftEvent?.args?.data;
                if (layoutShiftData?.impacted_nodes && layoutShiftData.impacted_nodes?.length > 0) {
                  AnnotationRepository.instance().addElementsAnnotation("This element is impacted by a layout shift", layoutShiftData.impacted_nodes[0].node_id.toString());
                }
              }
            }
          } else {
            parts.push("Metrics (lab / observed): n/a");
          }
          const cruxParts = insightSet && this.#getCruxTraceSummary(insightSet);
          if (cruxParts?.length) {
            parts.push(...cruxParts);
          } else {
            parts.push("Metrics (field / real users): n/a \u2013 no data for this page in CrUX");
          }
          parts.push("Available insights:");
          for (const [insightName, model3] of Object.entries(insightSet.model)) {
            if (model3.state === "pass") {
              continue;
            }
            const formatter2 = new PerformanceInsightFormatter(this.#focus, model3);
            if (!formatter2.insightIsSupported()) {
              continue;
            }
            const insightBounds$1 = insightBounds2(model3, insightSet.bounds);
            const insightParts = [
              `insight name: ${insightName}`,
              `description: ${model3.description}`,
              `relevant trace bounds: ${this.serializeBounds(insightBounds$1)}`
            ];
            const metricSavingsText = formatter2.estimatedSavings();
            if (metricSavingsText) {
              insightParts.push(`estimated metric savings: ${metricSavingsText}`);
            }
            if (model3.wastedBytes) {
              insightParts.push(`estimated wasted bytes: ${bytes(model3.wastedBytes)}`);
            }
            for (const suggestion of formatter2.getSuggestions()) {
              insightParts.push(`example question: ${suggestion.title}`);
            }
            const insightPartsText = insightParts.join("\n    ");
            parts.push(`  - ${insightPartsText}`);
          }
        }
        return parts.join("\n");
      }
      async #formatFactByInsightSet(options2) {
        const { insights: insights2, title: title2, description: description2, empty, cb } = options2;
        const lines = [`# ${title2}
`];
        if (description2) {
          lines.push(`${description2}
`);
        }
        if (insights2?.size) {
          const multipleInsightSets = insights2.size > 1;
          for (const insightSet of insights2.values()) {
            if (multipleInsightSets) {
              lines.push(`## insight set id: ${insightSet.id}
`);
            }
            lines.push((await cb(insightSet) ?? empty) + "\n");
          }
        } else {
          lines.push(empty + "\n");
        }
        return lines.join("\n");
      }
      formatCriticalRequests() {
        const parsedTrace = this.#parsedTrace;
        return this.#formatFactByInsightSet({
          insights: parsedTrace.insights,
          title: "Critical network requests",
          empty: "none",
          cb: async (insightSet) => {
            const criticalRequests = [];
            const walkRequest = (node2) => {
              criticalRequests.push(node2.request);
              node2.children.forEach(walkRequest);
            };
            insightSet.model.NetworkDependencyTree?.rootNodes.forEach(walkRequest);
            return criticalRequests.length ? this.formatNetworkRequests(criticalRequests, { verbose: false }) : null;
          }
        });
      }
      async #serializeBottomUpRootNode(rootNode, limit2) {
        const topNodes = [...rootNode.children().values()].filter((n) => n.totalTime >= 1).sort((a, b) => b.selfTime - a.selfTime).slice(0, limit2);
        const callFrames = [];
        function nodeToText(node2) {
          const event = node2.event;
          let frame;
          if (isProfileCall2(event)) {
            frame = event.callFrame;
            if (node2.selfTime >= 100 && callFrames.length < 3) {
              callFrames.push(frame);
            }
          } else {
            frame = getStackTraceTopCallFrameInEventPayload2(event);
          }
          let source2 = forEntry(event);
          if (frame?.url) {
            source2 += ` (url: ${frame.url}`;
            if (frame.lineNumber !== -1) {
              source2 += `, line: ${frame.lineNumber}`;
            }
            if (frame.columnNumber !== -1) {
              source2 += `, column: ${frame.columnNumber}`;
            }
            source2 += ")";
          }
          return `- self: ${millis(node2.selfTime)}, total: ${millis(node2.totalTime)}, source: ${source2}`;
        }
        return topNodes.map((node2) => nodeToText.call(this, node2)).join("\n") + await this.#serializeRelevantFunctions(callFrames);
      }
      #getSerializeBottomUpRootNodeFormat(limit2) {
        return `This is the bottom-up summary for the entire trace. Only the top ${limit2} activities (sorted by self time) are shown. An activity is all the aggregated time spent on the same type of work. For example, it can be all the time spent in a specific JavaScript function, or all the time spent in a specific browser rendering stage (like layout, v8 compile, parsing html). "Self time" represents the aggregated time spent directly in an activity, across all occurrences. "Total time" represents the aggregated time spent in an activity or any of its children.`;
      }
      formatMainThreadBottomUpSummary() {
        const parsedTrace = this.#parsedTrace;
        const limit2 = 10;
        return this.#formatFactByInsightSet({
          insights: parsedTrace.insights,
          title: "Main thread bottom-up summary",
          description: this.#getSerializeBottomUpRootNodeFormat(limit2),
          empty: "no activity",
          cb: async (insightSet) => {
            const rootNode = AIQueries.mainThreadActivityBottomUpSingleNavigation(insightSet.navigation?.args.data?.navigationId, insightSet.bounds, parsedTrace);
            return rootNode ? await this.#serializeBottomUpRootNode(rootNode, limit2) : null;
          }
        });
      }
      #formatThirdPartyEntitySummaries(summaries) {
        const topMainThreadTimeEntries = summaries.toSorted((a, b) => b.mainThreadTime - a.mainThreadTime).slice(0, 5);
        if (!topMainThreadTimeEntries.length) {
          return "";
        }
        const listText = topMainThreadTimeEntries.map((s) => {
          const transferSize = `${bytes(s.transferSize)}`;
          return `- name: ${s.entity.name}, main thread time: ${millis(s.mainThreadTime)}, network transfer size: ${transferSize}`;
        }).join("\n");
        return listText;
      }
      formatThirdPartySummary() {
        const parsedTrace = this.#parsedTrace;
        return this.#formatFactByInsightSet({
          insights: parsedTrace.insights,
          title: "3rd party summary",
          empty: "no 3rd parties",
          cb: async (insightSet) => {
            const thirdPartySummaries = summarizeByThirdParty2(parsedTrace.data, insightSet.bounds);
            return thirdPartySummaries.length ? this.#formatThirdPartyEntitySummaries(thirdPartySummaries) : null;
          }
        });
      }
      formatLongestTasks() {
        const parsedTrace = this.#parsedTrace;
        return this.#formatFactByInsightSet({
          insights: parsedTrace.insights,
          title: "Longest tasks",
          empty: "none",
          cb: async (insightSet) => {
            const longestTaskTrees = AIQueries.longestTasks(insightSet.navigation?.args.data?.navigationId, insightSet.bounds, parsedTrace, 3);
            if (!longestTaskTrees?.length) {
              return null;
            }
            return longestTaskTrees.map((tree) => {
              const time2 = millis(tree.rootNode.totalTime);
              return `- total time: ${time2}, event: ${this.serializeEvent(tree.rootNode.event)}`;
            }).join("\n");
          }
        });
      }
      #serializeRelatedInsightsForEvents(events) {
        if (!events.length) {
          return "";
        }
        const insightNameToRelatedEvents = /* @__PURE__ */ new Map();
        if (this.#insightSet) {
          for (const model3 of Object.values(this.#insightSet.model)) {
            if (!model3.relatedEvents) {
              continue;
            }
            const modeRelatedEvents = Array.isArray(model3.relatedEvents) ? model3.relatedEvents : [...model3.relatedEvents.keys()];
            if (!modeRelatedEvents.length) {
              continue;
            }
            const relatedEvents = modeRelatedEvents.filter((e) => events.includes(e));
            if (relatedEvents.length) {
              insightNameToRelatedEvents.set(model3.insightKey, relatedEvents);
            }
          }
        }
        if (!insightNameToRelatedEvents.size) {
          return "";
        }
        const results = [];
        for (const [insightKey, events2] of insightNameToRelatedEvents) {
          const eventsString = events2.slice(0, 5).map((e) => forEntry(e) + " " + this.serializeEvent(e)).join(", ");
          results.push(`- ${insightKey}: ${eventsString}`);
        }
        return results.join("\n");
      }
      async formatMainThreadTrackSummary(bounds) {
        if (!this.#parsedTrace.insights) {
          return "No main thread activity found";
        }
        const results = [];
        const insightSet = this.#parsedTrace.insights?.values().find((insightSet2) => boundsIncludeTimeRange2({ bounds, timeRange: insightSet2.bounds }));
        const topDownTree = AIQueries.mainThreadActivityTopDown(insightSet?.navigation?.args.data?.navigationId, bounds, this.#parsedTrace);
        if (topDownTree) {
          results.push("# Top-down main thread summary");
          results.push(await this.formatCallTree(topDownTree, 2));
        }
        const bottomUpRootNode = AIQueries.mainThreadActivityBottomUp(bounds, this.#parsedTrace);
        if (bottomUpRootNode) {
          results.push("# Bottom-up main thread summary");
          const limit2 = 20;
          results.push(this.#getSerializeBottomUpRootNodeFormat(limit2));
          results.push(await this.#serializeBottomUpRootNode(bottomUpRootNode, limit2));
        }
        const thirdPartySummaries = summarizeByThirdParty2(this.#parsedTrace.data, bounds);
        if (thirdPartySummaries.length) {
          results.push("# Third parties");
          results.push(this.#formatThirdPartyEntitySummaries(thirdPartySummaries));
        }
        const relatedInsightsText = this.#serializeRelatedInsightsForEvents([...topDownTree?.rootNode.events ?? [], ...bottomUpRootNode?.events ?? []]);
        if (relatedInsightsText) {
          results.push("# Related insights");
          results.push("Here are all the insights that contain some related event from the main thread in the given range.");
          results.push(relatedInsightsText);
        }
        if (!results.length) {
          return "No main thread activity found";
        }
        return results.join("\n\n");
      }
      formatNetworkTrackSummary(bounds) {
        const results = [];
        const requests = this.#parsedTrace.data.NetworkRequests.byTime.filter((request3) => eventIsInBounds2(request3, bounds));
        const requestsText = this.formatNetworkRequests(requests, { verbose: false });
        results.push("# Network requests summary");
        results.push(requestsText || "No requests in the given bounds");
        const relatedInsightsText = this.#serializeRelatedInsightsForEvents(requests);
        if (relatedInsightsText) {
          results.push("# Related insights");
          results.push("Here are all the insights that contain some related request from the given range.");
          results.push(relatedInsightsText);
        }
        return results.join("\n\n");
      }
      async formatCallTree(tree, headerLevel = 1) {
        let result = `${tree.serialize(headerLevel)}

IMPORTANT: Never show eventKey to the user.
`;
        const relevantCallFrames = [];
        if (tree.selectedNode && isProfileCall2(tree.selectedNode.event)) {
          relevantCallFrames.push(tree.selectedNode.event.callFrame);
        }
        const topCallFrameByTotalTime = tree.topCallFrameByTotalTime();
        if (topCallFrameByTotalTime) {
          relevantCallFrames.push(topCallFrameByTotalTime);
        }
        relevantCallFrames.push(...tree.topCallFramesBySelfTime(3));
        result += await this.#serializeRelevantFunctions(relevantCallFrames);
        return result;
      }
      formatNetworkRequests(requests, options2) {
        if (requests.length === 0) {
          return "";
        }
        let verbose;
        if (options2?.verbose !== void 0) {
          verbose = options2.verbose;
        } else {
          verbose = requests.length === 1;
        }
        if (verbose) {
          return requests.map((request3) => this.#networkRequestVerbosely(request3, options2)).join("\n");
        }
        return this.#networkRequestsArrayCompressed(requests);
      }
      #getOrAssignUrlIndex(urlIdToIndex, url) {
        let index2 = urlIdToIndex.get(url);
        if (index2 !== void 0) {
          return index2;
        }
        index2 = urlIdToIndex.size;
        urlIdToIndex.set(url, index2);
        return index2;
      }
      #getInitiatorChain(parsedTrace, request3) {
        const initiators = [];
        let cur = request3;
        while (cur) {
          const initiator = getNetworkInitiator(parsedTrace.data, cur);
          if (initiator) {
            if (initiators.includes(initiator)) {
              return [];
            }
            initiators.unshift(initiator);
          }
          cur = initiator;
        }
        return initiators;
      }
      #networkRequestVerbosely(request3, options2) {
        const { url, requestId, statusCode, initialPriority, priority, fromServiceWorker, mimeType, responseHeaders, syntheticData, protocol: protocol2 } = request3.args.data;
        const parsedTrace = this.#parsedTrace;
        const titlePrefix = `## ${options2?.customTitle ?? "Network request"}`;
        const navigationForEvent = getNavigationForTraceEvent2(request3, request3.args.data.frame, parsedTrace.data.Meta.navigationsByFrameId);
        const baseTime = navigationForEvent?.ts ?? parsedTrace.data.Meta.traceBounds.min;
        const startTimesForLifecycle = {
          queuedAt: request3.ts - baseTime,
          requestSentAt: syntheticData.sendStartTime - baseTime,
          downloadCompletedAt: syntheticData.finishTime - baseTime,
          processingCompletedAt: request3.ts + request3.dur - baseTime
        };
        const mainThreadProcessingDuration = startTimesForLifecycle.processingCompletedAt - startTimesForLifecycle.downloadCompletedAt;
        const downloadTime = syntheticData.finishTime - syntheticData.downloadStart;
        const renderBlocking = isSyntheticNetworkRequestEventRenderBlocking2(request3);
        const initiator = getNetworkInitiator(parsedTrace.data, request3);
        const priorityLines = [];
        if (initialPriority === priority) {
          priorityLines.push(`Priority: ${priority}`);
        } else {
          priorityLines.push(`Initial priority: ${initialPriority}`);
          priorityLines.push(`Final priority: ${priority}`);
        }
        const redirects = request3.args.data.redirects.map((redirect, index2) => {
          const startTime = redirect.ts - baseTime;
          return `#### Redirect ${index2 + 1}: ${redirect.url}
- Start time: ${micros(startTime)}
- Duration: ${micros(redirect.dur)}`;
        });
        const initiators = this.#getInitiatorChain(parsedTrace, request3);
        const initiatorUrls = initiators.map((initiator2) => initiator2.args.data.url);
        const eventKey = this.#eventsSerializer.keyForEvent(request3);
        const eventKeyLine = eventKey ? `eventKey: ${eventKey}
` : "";
        return `${titlePrefix}: ${url}${AnnotationRepository.annotationsEnabled() ? `
requestId: ${requestId}` : ""}
${eventKeyLine}Timings:
- Queued at: ${micros(startTimesForLifecycle.queuedAt)}
- Request sent at: ${micros(startTimesForLifecycle.requestSentAt)}
- Download complete at: ${micros(startTimesForLifecycle.downloadCompletedAt)}
- Main thread processing completed at: ${micros(startTimesForLifecycle.processingCompletedAt)}
Durations:
- Download time: ${micros(downloadTime)}
- Main thread processing time: ${micros(mainThreadProcessingDuration)}
- Total duration: ${micros(request3.dur)}${initiator ? `
Initiator: ${initiator.args.data.url}` : ""}
Redirects:${redirects.length ? "\n" + redirects.join("\n") : " no redirects"}
Status code: ${statusCode}
MIME Type: ${mimeType}
Protocol: ${protocol2}
${priorityLines.join("\n")}
Render-blocking: ${renderBlocking ? "Yes" : "No"}
From a service worker: ${fromServiceWorker ? "Yes" : "No"}
Initiators (root request to the request that directly loaded this one): ${initiatorUrls.join(", ") || "none"}
${NetworkRequestFormatter.formatHeaders("Response headers", responseHeaders ?? [], true)}`;
      }
      #networkRequestsArrayCompressed(requests) {
        const networkDataString = `
Network requests data:

`;
        const urlIdToIndex = /* @__PURE__ */ new Map();
        const allRequestsText = requests.map((request3) => {
          const urlIndex = this.#getOrAssignUrlIndex(urlIdToIndex, request3.args.data.url);
          return this.#networkRequestCompressedFormat(urlIndex, request3, urlIdToIndex);
        }).join("\n");
        const urlsMapString = `allUrls = [${Array.from(urlIdToIndex.entries()).map(([url, index2]) => {
          return `${index2}: ${url}`;
        }).join(", ")}]`;
        return networkDataString + "\n\n" + urlsMapString + "\n\n" + allRequestsText;
      }
      static callFrameDataFormatDescription = `Each call frame is presented in the following format:

'id;eventKey;name;duration;selfTime;urlIndex;childRange;[line];[column];[S]'

Key definitions:

* id: A unique numerical identifier for the call frame. Never mention this id in the output to the user.
* eventKey: String that uniquely identifies this event in the flame chart.
* name: A concise string describing the call frame (e.g., 'Evaluate Script', 'render', 'fetchData').
* duration: The total execution time of the call frame, including its children.
* selfTime: The time spent directly within the call frame, excluding its children's execution.
* urlIndex: Index referencing the "All URLs" list. Empty if no specific script URL is associated.
* childRange: Specifies the direct children of this node using their IDs. If empty ('' or 'S' at the end), the node has no children. If a single number (e.g., '4'), the node has one child with that ID. If in the format 'firstId-lastId' (e.g., '4-5'), it indicates a consecutive range of child IDs from 'firstId' to 'lastId', inclusive.
* line: An optional field for a call frame's line number. This is where the function is defined.
* column: An optional field for a call frame's column number. This is where the function is defined.
* S: _Optional_. The letter 'S' terminates the line if that call frame was selected by the user.

Example Call Tree:

1;r-123;main;500;100;0;1;;
2;r-124;update;200;50;;3;0;1;
3;p-49575-15428179-2834-374;animate;150;20;0;4-5;0;1;S
4;p-49575-15428179-3505-1162;calculatePosition;80;80;0;1;;
5;p-49575-15428179-5391-2767;applyStyles;50;50;0;1;;
`;
      static networkDataFormatDescription = `Network requests are formatted like this:
\`urlIndex;eventKey;queuedTime;requestSentTime;downloadCompleteTime;processingCompleteTime;totalDuration;downloadDuration;mainThreadProcessingDuration;statusCode;mimeType;priority;initialPriority;finalPriority;renderBlocking;protocol;fromServiceWorker;initiators;redirects:[[redirectUrlIndex|startTime|duration]];responseHeaders:[header1Value|header2Value|...]\`

- \`urlIndex\`: Numerical index for the request's URL, referencing the "All URLs" list.
- \`eventKey\`: String that uniquely identifies this request's trace event.
Timings (all in milliseconds, relative to navigation start):
- \`queuedTime\`: When the request was queued.
- \`requestSentTime\`: When the request was sent.
- \`downloadCompleteTime\`: When the download completed.
- \`processingCompleteTime\`: When main thread processing finished.
Durations (all in milliseconds):
- \`totalDuration\`: Total time from the request being queued until its main thread processing completed.
- \`downloadDuration\`: Time spent actively downloading the resource.
- \`mainThreadProcessingDuration\`: Time spent on the main thread after the download completed.
- \`statusCode\`: The HTTP status code of the response (e.g., 200, 404).
- \`mimeType\`: The MIME type of the resource (e.g., "text/html", "application/javascript").
- \`priority\`: The final network request priority (e.g., "VeryHigh", "Low").
- \`initialPriority\`: The initial network request priority.
- \`finalPriority\`: The final network request priority (redundant if \`priority\` is always final, but kept for clarity if \`initialPriority\` and \`priority\` differ).
- \`renderBlocking\`: 't' if the request was render-blocking, 'f' otherwise.
- \`protocol\`: The network protocol used (e.g., "h2", "http/1.1").
- \`fromServiceWorker\`: 't' if the request was served from a service worker, 'f' otherwise.
- \`initiators\`: A list (separated by ,) of URL indices for the initiator chain of this request. Listed in order starting from the root request to the request that directly loaded this one. This represents the network dependencies necessary to load this request. If there is no initiator, this is empty.
- \`redirects\`: A comma-separated list of redirects, enclosed in square brackets. Each redirect is formatted as
\`[redirectUrlIndex|startTime|duration]\`, where: \`redirectUrlIndex\`: Numerical index for the redirect's URL. \`startTime\`: The start time of the redirect in milliseconds, relative to navigation start. \`duration\`: The duration of the redirect in milliseconds.
- \`responseHeaders\`: A list (separated by '|') of values for specific, pre-defined response headers, enclosed in square brackets.
The order of headers corresponds to an internal fixed list. If a header is not present, its value will be empty.
`;
      #networkRequestCompressedFormat(urlIndex, request3, urlIdToIndex) {
        const { statusCode, initialPriority, priority, fromServiceWorker, mimeType, responseHeaders, syntheticData, protocol: protocol2 } = request3.args.data;
        const parsedTrace = this.#parsedTrace;
        const navigationForEvent = getNavigationForTraceEvent2(request3, request3.args.data.frame, parsedTrace.data.Meta.navigationsByFrameId);
        const baseTime = navigationForEvent?.ts ?? parsedTrace.data.Meta.traceBounds.min;
        const queuedTime = micros(request3.ts - baseTime);
        const requestSentTime = micros(syntheticData.sendStartTime - baseTime);
        const downloadCompleteTime = micros(syntheticData.finishTime - baseTime);
        const processingCompleteTime = micros(request3.ts + request3.dur - baseTime);
        const totalDuration = micros(request3.dur);
        const downloadDuration = micros(syntheticData.finishTime - syntheticData.downloadStart);
        const mainThreadProcessingDuration = micros(request3.ts + request3.dur - syntheticData.finishTime);
        const renderBlocking = isSyntheticNetworkRequestEventRenderBlocking2(request3) ? "t" : "f";
        const finalPriority = priority;
        const headerValues = responseHeaders?.map((header) => {
          const value = NetworkRequestFormatter.allowHeader(header.name) ? header.value : "<redacted>";
          return `${header.name}: ${value}`;
        }).join("|");
        const redirects = request3.args.data.redirects.map((redirect) => {
          const urlIndex2 = this.#getOrAssignUrlIndex(urlIdToIndex, redirect.url);
          const redirectStartTime = micros(redirect.ts - baseTime);
          const redirectDuration = micros(redirect.dur);
          return `[${urlIndex2}|${redirectStartTime}|${redirectDuration}]`;
        }).join(",");
        const initiators = this.#getInitiatorChain(parsedTrace, request3);
        const initiatorUrlIndices = initiators.map((initiator) => this.#getOrAssignUrlIndex(urlIdToIndex, initiator.args.data.url));
        const parts = [
          urlIndex,
          this.#eventsSerializer.keyForEvent(request3) ?? "",
          queuedTime,
          requestSentTime,
          downloadCompleteTime,
          processingCompleteTime,
          totalDuration,
          downloadDuration,
          mainThreadProcessingDuration,
          statusCode,
          mimeType,
          priority,
          initialPriority,
          finalPriority,
          renderBlocking,
          protocol2,
          fromServiceWorker ? "t" : "f",
          initiatorUrlIndices.join(","),
          `[${redirects}]`,
          `[${headerValues ?? ""}]`
        ];
        return parts.join(";");
      }
      resolveFunctionCodeAtLocation(url, line, column) {
        if (!this.resolveFunctionCode) {
          throw new Error("missing resolveFunctionCode");
        }
        return this.resolveFunctionCode(url, line, column);
      }
      formatFunctionCode(code2) {
        return this.#getFormattedFunctionCodeExplainer() + "\n\n" + this.#formatFunctionCode(code2);
      }
      #getFormattedFunctionCodeExplainer() {
        return "The following are markdown block(s) of code that ran in the page, each representing a separate function. <FUNCTION_START> and <FUNCTION_END> marks the exact function declaration, and everything outside that is provided for additional context. Comments at the end of each line indicate the runtime performance cost of that code. Do not show the user the function markers or the additional context.";
      }
      #functionCodeToKey(code2) {
        return code2.functionBounds.uiSourceCode.url() + ":" + code2.functionBounds.range.toString();
      }
      #hasFormattedFunctionCode(code2) {
        return this.#formattedFunctionCodes.has(this.#functionCodeToKey(code2));
      }
      #formatFunctionCode(code2) {
        this.#formattedFunctionCodes.add(this.#functionCodeToKey(code2));
        const { startLine, startColumn } = code2.range;
        const { startLine: contextStartLine, startColumn: contextStartColumn, endLine: contextEndLine, endColumn: contextEndColumn } = code2.rangeWithContext;
        const name = code2.functionBounds.name || "(anonymous)";
        const url = code2.functionBounds.uiSourceCode.url();
        const parts = [];
        parts.push(`${name} @ ${url}:${startLine}:${startColumn}. With added context, chunk is from ${contextStartLine}:${contextStartColumn} to ${contextEndLine}:${contextEndColumn}`);
        parts.push("```");
        parts.push(code2.codeWithContext);
        parts.push("```");
        return parts.join("\n");
      }
      async #serializeRelevantFunctions(callFrames) {
        const resolveFunctionCode = this.resolveFunctionCode;
        if (!resolveFunctionCode) {
          return "";
        }
        const functionCodeStrings = [];
        const functionCodes = await Promise.all(callFrames.map((frame) => resolveFunctionCode(frame.url, frame.lineNumber, frame.columnNumber)));
        for (const code2 of functionCodes) {
          if (code2 && !this.#hasFormattedFunctionCode(code2)) {
            functionCodeStrings.push(this.#formatFunctionCode(code2));
          }
        }
        if (!functionCodeStrings.length) {
          return "";
        }
        return "\n" + [
          this.#getFormattedFunctionCodeExplainer(),
          functionCodeStrings.length > 1 ? `Here are ${functionCodeStrings.length} relevant functions:` : `Here is a relevant function:`,
          ...functionCodeStrings
        ].join("\n\n");
      }
    };
    PerformanceInsightFormatter = class {
      #traceFormatter;
      #insight;
      #parsedTrace;
      constructor(focus, insight) {
        this.#traceFormatter = new PerformanceTraceFormatter(focus);
        this.#insight = insight;
        this.#parsedTrace = focus.parsedTrace;
      }
      #formatMilli(x) {
        if (x === void 0) {
          return "";
        }
        return millis(x);
      }
      #formatMicro(x) {
        if (x === void 0) {
          return "";
        }
        return this.#formatMilli(microToMilli2(x));
      }
      #formatRequestUrl(request3) {
        return `${request3.args.data.url} ${this.#traceFormatter.serializeEvent(request3)}`;
      }
      #formatScriptUrl(script) {
        if (script.request) {
          return this.#formatRequestUrl(script.request);
        }
        return script.url ?? script.sourceUrl ?? script.scriptId;
      }
      #formatUrl(url) {
        const request3 = this.#parsedTrace.data.NetworkRequests.byTime.find((request4) => request4.args.data.url === url);
        if (request3) {
          return this.#formatRequestUrl(request3);
        }
        return url;
      }
      #lcpMetricSharedContext() {
        if (!this.#insight.navigation) {
          return "";
        }
        if (!this.#insight.frameId || !this.#insight.navigation) {
          return "";
        }
        const data32 = getLCPData(this.#parsedTrace, this.#insight.frameId, this.#insight.navigation);
        if (!data32) {
          return "";
        }
        const { metricScore, lcpRequest, lcpEvent } = data32;
        const theLcpElement = lcpEvent.args.data?.nodeName ? `The LCP element (${lcpEvent.args.data.nodeName}, nodeId: ${lcpEvent.args.data.nodeId})` : "The LCP element";
        const parts = [
          `The Largest Contentful Paint (LCP) time for this navigation was ${this.#formatMicro(metricScore.timing)}.`
        ];
        if (lcpRequest) {
          parts.push(`${theLcpElement} is an image fetched from ${this.#formatRequestUrl(lcpRequest)}.`);
          const request3 = this.#traceFormatter.formatNetworkRequests([lcpRequest], { verbose: true, customTitle: "LCP resource network request" });
          parts.push(request3);
        } else {
          parts.push(`${theLcpElement} is text and was not fetched from the network.`);
        }
        return parts.join("\n");
      }
      insightIsSupported() {
        return this.#description().length > 0;
      }
      getSuggestions() {
        switch (this.#insight.insightKey) {
          case "CLSCulprits":
            return [
              { title: "Help me optimize my CLS score" },
              { title: "How can I prevent layout shifts on this page?" }
            ];
          case "DocumentLatency":
            return [
              { title: "How do I decrease the initial loading time of my page?" },
              { title: "Did anything slow down the request for this document?" }
            ];
          case "DOMSize":
            return [{ title: "How can I reduce the size of my DOM?" }];
          case "DuplicatedJavaScript":
            return [
              { title: "How do I deduplicate the identified scripts in my bundle?" },
              { title: "Which duplicated JavaScript modules are the most problematic?" }
            ];
          case "FontDisplay":
            return [
              { title: "How can I update my CSS to avoid layout shifts caused by incorrect `font-display` properties?" }
            ];
          case "ForcedReflow":
            return [
              { title: "How can I avoid forced reflows and layout thrashing?" },
              { title: "What is forced reflow and why is it problematic?" }
            ];
          case "ImageDelivery":
            return [
              { title: "What should I do to improve and optimize the time taken to fetch and display images on the page?" },
              { title: "Are all images on my site optimized?" }
            ];
          case "INPBreakdown":
            return [
              { title: "Suggest fixes for my longest interaction" },
              { title: "Why is a large INP score problematic?" },
              { title: "What's the biggest contributor to my longest interaction?" }
            ];
          case "LCPDiscovery":
            return [
              { title: "Suggest fixes to reduce my LCP" },
              { title: "What can I do to reduce my LCP discovery time?" },
              { title: "Why is LCP discovery time important?" }
            ];
          case "LCPBreakdown":
            return [
              { title: "Help me optimize my LCP score" },
              { title: "Which LCP phase was most problematic?" },
              { title: "What can I do to reduce the LCP time for this page load?" }
            ];
          case "NetworkDependencyTree":
            return [{ title: "How do I optimize my network dependency tree?" }];
          case "RenderBlocking":
            return [
              { title: "Show me the most impactful render-blocking requests that I should focus on" },
              { title: "How can I reduce the number of render-blocking requests?" }
            ];
          case "SlowCSSSelector":
            return [{ title: "How can I optimize my CSS to increase the performance of CSS selectors?" }];
          case "ThirdParties":
            return [{ title: "Which third parties are having the largest impact on my page performance?" }];
          case "Cache":
            return [{ title: "What caching strategies can I apply to improve my page performance?" }];
          case "Viewport":
            return [{ title: "How do I make sure my page is optimized for mobile viewing?" }];
          case "ModernHTTP":
            return [
              { title: "Is my site using the best HTTP practices?" },
              { title: "Which resources are not using a modern HTTP protocol?" }
            ];
          case "LegacyJavaScript":
            return [
              { title: "Is my site polyfilling modern JavaScript features?" },
              { title: "How can I reduce the amount of legacy JavaScript on my page?" }
            ];
          default:
            throw new Error(`Unknown insight key '${this.#insight.insightKey}'`);
        }
      }
      formatCacheInsight(insight) {
        if (insight.requests.length === 0) {
          return UIStrings$K.noRequestsToCache + ".";
        }
        let output = "The following resources were associated with ineffficient cache policies:\n";
        for (const entry of insight.requests) {
          output += `
- ${this.#formatRequestUrl(entry.request)}`;
          output += `
  - Cache Time to Live (TTL): ${entry.ttl} seconds`;
          output += `
  - Wasted bytes: ${bytes(entry.wastedBytes)}`;
        }
        output += "\n\n" + UIStrings$K.description;
        return output;
      }
      #formatLayoutShift(shift, index2, rootCauses) {
        const baseTime = this.#parsedTrace.data.Meta.traceBounds.min;
        const potentialRootCauses = [];
        if (rootCauses) {
          rootCauses.iframes.forEach((iframe) => potentialRootCauses.push(`- An iframe (id: ${iframe.frame}, url: ${iframe.url ?? "unknown"} was injected into the page)`));
          rootCauses.webFonts.forEach((req) => {
            potentialRootCauses.push(`- A font that was loaded over the network: ${this.#formatRequestUrl(req)}.`);
          });
          rootCauses.nonCompositedAnimations.forEach((nonCompositedFailure) => {
            potentialRootCauses.push("- A non-composited animation:");
            const animationInfoOutput = [];
            potentialRootCauses.push(`- non-composited animation: \`${nonCompositedFailure.name || "(unnamed)"}\``);
            if (nonCompositedFailure.name) {
              animationInfoOutput.push(`Animation name: ${nonCompositedFailure.name}`);
            }
            if (nonCompositedFailure.unsupportedProperties) {
              animationInfoOutput.push("Unsupported CSS properties:");
              animationInfoOutput.push("- " + nonCompositedFailure.unsupportedProperties.join(", "));
            }
            animationInfoOutput.push("Failure reasons:");
            animationInfoOutput.push("  - " + nonCompositedFailure.failureReasons.join(", "));
            potentialRootCauses.push(animationInfoOutput.map((l) => " ".repeat(4) + l).join("\n"));
          });
          rootCauses.unsizedImages.forEach((img) => {
            const url = img.paintImageEvent.args.data.url;
            const nodeName = img.paintImageEvent.args.data.nodeName;
            const extraText = url ? `url: ${this.#formatUrl(url)}` : `id: ${img.backendNodeId}`;
            potentialRootCauses.push(`- An unsized image (${nodeName}) (${extraText}).`);
          });
        }
        const rootCauseText = potentialRootCauses.length ? `- Potential root causes:
  ${potentialRootCauses.join("\n")}` : "- No potential root causes identified";
        const startTime = microToMilli2(Micro2(shift.ts - baseTime));
        const impactedNodeNames = shift.rawSourceEvent.args.data?.impacted_nodes?.map((n) => n.debug_name).filter((name) => name !== void 0) ?? [];
        const impactedNodeText = impactedNodeNames.length ? `
- Impacted elements:
  - ${impactedNodeNames.join("\n  - ")}
` : "";
        return `### Layout shift ${index2 + 1}:${impactedNodeText}
- Start time: ${millis(startTime)}
- Score: ${shift.args.data?.weighted_score_delta.toFixed(4)}
${rootCauseText}`;
      }
      formatClsCulpritsInsight(insight) {
        const { worstCluster, shifts } = insight;
        if (!worstCluster) {
          return "No layout shifts were found.";
        }
        const baseTime = this.#parsedTrace.data.Meta.traceBounds.min;
        const clusterTimes = {
          start: worstCluster.ts - baseTime,
          end: worstCluster.ts + worstCluster.dur - baseTime
        };
        const shiftsFormatted = worstCluster.events.map((layoutShift, index2) => {
          return this.#formatLayoutShift(layoutShift, index2, shifts.get(layoutShift));
        });
        return `The worst layout shift cluster was the cluster that started at ${this.#formatMicro(clusterTimes.start)} and ended at ${this.#formatMicro(clusterTimes.end)}, with a duration of ${this.#formatMicro(worstCluster.dur)}.
The score for this cluster is ${worstCluster.clusterCumulativeScore.toFixed(4)}.

Layout shifts in this cluster:
${shiftsFormatted.join("\n")}`;
      }
      formatDocumentLatencyInsight(insight) {
        if (!insight.data) {
          return "";
        }
        const { checklist, documentRequest } = insight.data;
        if (!documentRequest) {
          return "";
        }
        const checklistBulletPoints = [];
        checklistBulletPoints.push({
          name: "The request was not redirected",
          passed: checklist.noRedirects.value
        });
        checklistBulletPoints.push({
          name: "Server responded quickly",
          passed: checklist.serverResponseIsFast.value
        });
        checklistBulletPoints.push({
          name: "Compression was applied",
          passed: checklist.usesCompression.value
        });
        return `${this.#lcpMetricSharedContext()}

${this.#traceFormatter.formatNetworkRequests([documentRequest], {
          verbose: true,
          customTitle: "Document network request"
        })}

The result of the checks for this insight are:
${checklistBulletPoints.map((point) => `- ${point.name}: ${point.passed ? "PASSED" : "FAILED"}`).join("\n")}`;
      }
      formatDomSizeInsight(insight) {
        if (insight.state === "pass") {
          return "No DOM size issues were detected.";
        }
        let output = UIStrings$H.description + "\n";
        if (insight.maxDOMStats) {
          output += "\n" + UIStrings$H.statistic + ":\n\n";
          const maxDepthStats = insight.maxDOMStats.args.data.maxDepth;
          const maxChildrenStats = insight.maxDOMStats.args.data.maxChildren;
          output += UIStrings$H.totalElements + ": " + insight.maxDOMStats.args.data.totalElements + ".\n";
          if (maxDepthStats) {
            output += UIStrings$H.maxDOMDepth + ": " + maxDepthStats.depth + ` nodes, starting with element '${maxDepthStats.nodeName}' (node id: ` + maxDepthStats.nodeId + ").\n";
          }
          if (maxChildrenStats) {
            output += UIStrings$H.maxChildren + ": " + maxChildrenStats.numChildren + `, for parent '${maxChildrenStats.nodeName}' (node id: ` + maxChildrenStats.nodeId + ").\n";
          }
        }
        if (insight.largeLayoutUpdates.length > 0 || insight.largeStyleRecalcs.length > 0) {
          output += `
Large layout updates/style calculations:
`;
        }
        if (insight.largeLayoutUpdates.length > 0) {
          for (const update of insight.largeLayoutUpdates) {
            output += `
  - Layout update: Duration: ${this.#formatMicro(update.dur)},`;
            output += ` with ${update.args.beginData.dirtyObjects} of ${update.args.beginData.totalObjects} nodes needing layout.`;
          }
        }
        if (insight.largeStyleRecalcs.length > 0) {
          for (const recalc of insight.largeStyleRecalcs) {
            output += `
  - Style recalculation: Duration: ${this.#formatMicro(recalc.dur)}, `;
            output += `with ${recalc.args.elementCount} elements affected.`;
          }
        }
        return output;
      }
      formatDuplicatedJavaScriptInsight(insight) {
        const totalWastedBytes = insight.wastedBytes;
        const duplicatedScriptsByModule = insight.duplicationGroupedByNodeModules;
        if (duplicatedScriptsByModule.size === 0) {
          return "There is no duplicated JavaScript in the page modules";
        }
        const filesFormatted = Array.from(duplicatedScriptsByModule).map(([module2, duplication]) => `- Source: ${module2} - Duplicated bytes: ${duplication.estimatedDuplicateBytes} bytes`).join("\n");
        return `Total wasted bytes: ${totalWastedBytes} bytes.

Duplication grouped by Node modules: ${filesFormatted}`;
      }
      formatFontDisplayInsight(insight) {
        if (insight.fonts.length === 0) {
          return "No font display issues were detected.";
        }
        let output = "The following font display issues were found:\n";
        for (const font of insight.fonts) {
          let fontName = font.name;
          if (!fontName) {
            const url = new ParsedURL2(font.request.args.data.url);
            fontName = url.isValid ? url.lastPathComponent : "(not available)";
          }
          output += `
 - Font name: ${fontName}, URL: ${this.#formatRequestUrl(font.request)}, Property 'font-display' set to: '${font.display}', Wasted time: ${this.#formatMilli(font.wastedTime)}.`;
        }
        output += "\n\n" + UIStrings$F.description;
        return output;
      }
      formatForcedReflowInsight(insight) {
        let output = UIStrings$E.description + "\n\n";
        if (insight.topLevelFunctionCallData || insight.aggregatedBottomUpData.length > 0) {
          output += "The forced reflow checks revealed one or more problems.\n\n";
        } else {
          output += "The forced reflow checks revealed no problems.";
          return output;
        }
        function callFrameToString(frame) {
          if (frame === null) {
            return UIStrings$E.unattributed;
          }
          let result = `${frame.functionName || UIStrings$E.anonymous}`;
          if (frame.url) {
            result += ` @ ${frame.url}:${frame.lineNumber}:${frame.columnNumber}`;
          } else {
            result += " @ unknown location";
          }
          return result;
        }
        if (insight.topLevelFunctionCallData) {
          output += "The following is the top function call that caused forced reflow(s):\n\n";
          output += " - " + callFrameToString(insight.topLevelFunctionCallData.topLevelFunctionCall);
          output += `

${UIStrings$E.totalReflowTime}: ${this.#formatMicro(insight.topLevelFunctionCallData.totalReflowTime)}
`;
        } else {
          output += "No top-level functions causing forced reflows were identified.\n";
        }
        if (insight.aggregatedBottomUpData.length > 0) {
          output += "\n" + UIStrings$E.reflowCallFrames + " (including total time):\n";
          for (const data32 of insight.aggregatedBottomUpData) {
            output += `
 - ${this.#formatMicro(data32.totalTime)} in ${callFrameToString(data32.bottomUpData)}`;
          }
        } else {
          output += "\nNo aggregated bottom-up causes of forced reflows were identified.";
        }
        return output;
      }
      formatImageDeliveryInsight(insight) {
        const optimizableImages = insight.optimizableImages;
        if (optimizableImages.length === 0) {
          return "There are no unoptimized images on this page.";
        }
        const imageDetails = optimizableImages.map((image) => {
          const optimizations = image.optimizations.map((optimization) => {
            const message = getOptimizationMessage2(optimization);
            const byteSavings = bytes(optimization.byteSavings);
            return `${message} (Est ${byteSavings})`;
          }).join("\n");
          return `### ${this.#formatRequestUrl(image.request)}
- Potential savings: ${bytes(image.byteSavings)}
- Optimizations:
${optimizations}`;
        }).join("\n\n");
        return `Total potential savings: ${bytes(insight.wastedBytes)}

The following images could be optimized:

${imageDetails}`;
      }
      formatInpBreakdownInsight(insight) {
        const event = insight.longestInteractionEvent;
        if (!event) {
          return "";
        }
        const inpInfoForEvent = `The longest interaction on the page was a \`${event.type}\` which had a total duration of \`${this.#formatMicro(event.dur)}\`. The timings of each of the three phases were:

1. Input delay: ${this.#formatMicro(event.inputDelay)}
2. Processing duration: ${this.#formatMicro(event.mainThreadHandling)}
3. Presentation delay: ${this.#formatMicro(event.presentationDelay)}.`;
        return inpInfoForEvent;
      }
      formatLcpBreakdownInsight(insight) {
        const { subparts, lcpMs } = insight;
        if (!lcpMs || !subparts) {
          return "";
        }
        const phaseBulletPoints = [];
        Object.values(subparts).forEach((subpart) => {
          const phaseMilli = microToMilli2(subpart.range);
          const percentage = (phaseMilli / lcpMs * 100).toFixed(1);
          phaseBulletPoints.push({ name: subpart.label, value: this.#formatMilli(phaseMilli), percentage });
        });
        return `${this.#lcpMetricSharedContext()}

We can break this time down into the ${phaseBulletPoints.length} phases that combine to make the LCP time:

${phaseBulletPoints.map((phase) => `- ${phase.name}: ${phase.value} (${phase.percentage}% of total LCP time)`).join("\n")}`;
      }
      formatLcpDiscoveryInsight(insight) {
        const { checklist, lcpEvent, lcpRequest, earliestDiscoveryTimeTs } = insight;
        if (!checklist || !lcpEvent || !lcpRequest || !earliestDiscoveryTimeTs) {
          return "";
        }
        const checklistBulletPoints = [];
        checklistBulletPoints.push({
          name: checklist.priorityHinted.label,
          passed: checklist.priorityHinted.value
        });
        checklistBulletPoints.push({
          name: checklist.eagerlyLoaded.label,
          passed: checklist.eagerlyLoaded.value
        });
        checklistBulletPoints.push({
          name: checklist.requestDiscoverable.label,
          passed: checklist.requestDiscoverable.value
        });
        return `${this.#lcpMetricSharedContext()}

The result of the checks for this insight are:
${checklistBulletPoints.map((point) => `- ${point.name}: ${point.passed ? "PASSED" : "FAILED"}`).join("\n")}`;
      }
      formatLegacyJavaScriptInsight(insight) {
        const legacyJavaScriptResults = insight.legacyJavaScriptResults;
        if (legacyJavaScriptResults.size === 0) {
          return "There is no significant amount of legacy JavaScript on the page.";
        }
        const filesFormatted = Array.from(legacyJavaScriptResults).map(([script, result]) => `
- Script: ${this.#formatScriptUrl(script)} - Wasted bytes: ${result.estimatedByteSavings} bytes
Matches:
${result.matches.map((match) => `Line: ${match.line}, Column: ${match.column}, Name: ${match.name}`).join("\n")}`).join("\n");
        return `Total legacy JavaScript: ${legacyJavaScriptResults.size} files.

Legacy JavaScript by file:
${filesFormatted}`;
      }
      formatModernHttpInsight(insight) {
        const requestSummary = insight.http1Requests.length === 1 ? this.#traceFormatter.formatNetworkRequests(insight.http1Requests, { verbose: true }) : this.#traceFormatter.formatNetworkRequests(insight.http1Requests);
        if (requestSummary.length === 0) {
          return "There are no requests that were served over a legacy HTTP protocol.";
        }
        return `Here is a list of the network requests that were served over a legacy HTTP protocol:
${requestSummary}`;
      }
      formatNetworkDependencyTreeInsight(insight) {
        let output = insight.fail ? "The network dependency tree checks found one or more problems.\n\n" : "The network dependency tree checks revealed no problems, but optimization suggestions may be available.\n\n";
        const rootNodes = insight.rootNodes;
        if (rootNodes.length > 0) {
          let formatNode = function(node2, indent) {
            const url = this.#formatRequestUrl(node2.request);
            const time2 = this.#formatMicro(node2.timeFromInitialRequest);
            const isLongest = node2.isLongest ? " (longest chain)" : "";
            let nodeString = `${indent}- ${url} (${time2})${isLongest}
`;
            for (const child of node2.children) {
              nodeString += formatNode.call(this, child, indent + "  ");
            }
            return nodeString;
          };
          output += `Max critical path latency is ${this.#formatMicro(insight.maxTime)}

`;
          output += "The following is the critical request chain:\n";
          for (const rootNode of rootNodes) {
            output += formatNode.call(this, rootNode, "");
          }
          output += "\n";
        } else {
          output += `${UIStrings$x.noNetworkDependencyTree}.

`;
        }
        if (insight.preconnectedOrigins?.length > 0) {
          output += `${UIStrings$x.preconnectOriginsTableTitle}:
`;
          output += `${UIStrings$x.preconnectOriginsTableDescription}
`;
          for (const origin of insight.preconnectedOrigins) {
            const headerText = "headerText" in origin ? `'${origin.headerText}'` : ``;
            output += `
  - ${origin.url}
    - ${UIStrings$x.columnSource}: '${origin.source}'`;
            if (headerText) {
              output += `
   - Header: ${headerText}`;
            }
            if (origin.unused) {
              output += `
   - Warning: ${UIStrings$x.unusedWarning}`;
            }
            if (origin.crossorigin) {
              output += `
   - Warning: ${UIStrings$x.crossoriginWarning}`;
            }
          }
          if (insight.preconnectedOrigins.length > TOO_MANY_PRECONNECTS_THRESHOLD2) {
            output += `

**Warning**: ${UIStrings$x.tooManyPreconnectLinksWarning}`;
          }
        } else {
          output += `${UIStrings$x.noPreconnectOrigins}.`;
        }
        if (insight.preconnectCandidates.length > 0 && insight.preconnectedOrigins.length < TOO_MANY_PRECONNECTS_THRESHOLD2) {
          output += `

${UIStrings$x.estSavingTableTitle}:
${UIStrings$x.estSavingTableDescription}
`;
          for (const candidate of insight.preconnectCandidates) {
            output += `
Adding [preconnect] to origin '${candidate.origin}' would save ${this.#formatMilli(candidate.wastedMs)}.`;
          }
        }
        return output;
      }
      formatRenderBlockingInsight(insight) {
        const requestSummary = this.#traceFormatter.formatNetworkRequests(insight.renderBlockingRequests);
        if (requestSummary.length === 0) {
          return "There are no network requests that are render-blocking.";
        }
        return `Here is a list of the network requests that were render-blocking on this page and their duration:

${requestSummary}`;
      }
      formatSlowCssSelectorsInsight(insight) {
        let output = "";
        if (!insight.topSelectorElapsedMs && !insight.topSelectorMatchAttempts) {
          return UIStrings$v.enableSelectorData;
        }
        output += "One or more slow CSS selectors were identified as negatively affecting page performance:\n\n";
        if (insight.topSelectorElapsedMs) {
          output += `${UIStrings$v.topSelectorElapsedTime} (as ranked by elapsed time in ms):
`;
          output += `${this.#formatMicro(insight.topSelectorElapsedMs["elapsed (us)"])}: ${insight.topSelectorElapsedMs.selector}

`;
        }
        if (insight.topSelectorMatchAttempts) {
          output += UIStrings$v.topSelectorMatchAttempt + ":\n";
          output += `${insight.topSelectorMatchAttempts.match_attempts} attempts for selector: '${insight.topSelectorMatchAttempts.selector}'

`;
        }
        output += `${UIStrings$v.total}:
`;
        output += `${UIStrings$v.elapsed}: ${this.#formatMicro(insight.totalElapsedMs)}
`;
        output += `${UIStrings$v.matchAttempts}: ${insight.totalMatchAttempts}
`;
        output += `${UIStrings$v.matchCount}: ${insight.totalMatchCount}

`;
        output += UIStrings$v.description;
        return output;
      }
      formatThirdPartiesInsight(insight) {
        let output = "";
        const entitySummaries = insight.entitySummaries ?? [];
        const firstPartyEntity = insight.firstPartyEntity;
        const thirdPartyTransferSizeEntries = entitySummaries.filter((s) => s.entity !== firstPartyEntity).toSorted((a, b) => b.transferSize - a.transferSize);
        const thirdPartyMainThreadTimeEntries = entitySummaries.filter((s) => s.entity !== firstPartyEntity).toSorted((a, b) => b.mainThreadTime - a.mainThreadTime);
        if (!thirdPartyTransferSizeEntries.length && !thirdPartyMainThreadTimeEntries.length) {
          return `No 3rd party scripts were found on this page.`;
        }
        if (thirdPartyTransferSizeEntries.length) {
          output += `The following list contains the largest transfer sizes by a 3rd party script:

`;
          for (const entry of thirdPartyTransferSizeEntries) {
            if (entry.transferSize > 0) {
              output += `- ${entry.entity.name}: ${bytes(entry.transferSize)}
`;
            }
          }
          output += "\n";
        }
        if (thirdPartyMainThreadTimeEntries.length) {
          output += `The following list contains the largest amount spent by a 3rd party script on the main thread:

`;
          for (const entry of thirdPartyMainThreadTimeEntries) {
            if (entry.mainThreadTime > 0) {
              output += `- ${entry.entity.name}: ${this.#formatMilli(entry.mainThreadTime)}
`;
            }
          }
          output += "\n";
        }
        output += UIStrings$u.description;
        return output;
      }
      formatViewportInsight(insight) {
        let output = "";
        output += "The webpage is " + (insight.mobileOptimized ? "already" : "not") + " optimized for mobile viewing.\n";
        const hasMetaTag = insight.viewportEvent;
        if (hasMetaTag) {
          output += `
The viewport meta tag was found: \`${insight.viewportEvent?.args?.data.content}\`.`;
        } else {
          output += `
The viewport meta tag is missing.`;
        }
        if (!hasMetaTag) {
          output += "\n\n" + UIStrings$t.description;
        }
        return output;
      }
      formatInsight(opts = { headingLevel: 2 }) {
        const header = "#".repeat(opts.headingLevel);
        const { title: title2 } = this.#insight;
        return `${header} Insight Title: ${title2}

${header} Insight Summary:
${this.#description()}

${header} Detailed analysis:
${this.#details()}

${header} Estimated savings: ${this.estimatedSavings() || "none"}

${header} External resources:
${this.#links()}`;
      }
      #details() {
        if (isCacheInsight2(this.#insight)) {
          return this.formatCacheInsight(this.#insight);
        }
        if (isCLSCulpritsInsight2(this.#insight)) {
          return this.formatClsCulpritsInsight(this.#insight);
        }
        if (isDocumentLatencyInsight2(this.#insight)) {
          return this.formatDocumentLatencyInsight(this.#insight);
        }
        if (isDomSizeInsight2(this.#insight)) {
          return this.formatDomSizeInsight(this.#insight);
        }
        if (isDuplicatedJavaScriptInsight2(this.#insight)) {
          return this.formatDuplicatedJavaScriptInsight(this.#insight);
        }
        if (isFontDisplayInsight2(this.#insight)) {
          return this.formatFontDisplayInsight(this.#insight);
        }
        if (isForcedReflowInsight2(this.#insight)) {
          return this.formatForcedReflowInsight(this.#insight);
        }
        if (isImageDeliveryInsight2(this.#insight)) {
          return this.formatImageDeliveryInsight(this.#insight);
        }
        if (isINPBreakdownInsight2(this.#insight)) {
          return this.formatInpBreakdownInsight(this.#insight);
        }
        if (isLCPBreakdownInsight2(this.#insight)) {
          return this.formatLcpBreakdownInsight(this.#insight);
        }
        if (isLCPDiscoveryInsight2(this.#insight)) {
          return this.formatLcpDiscoveryInsight(this.#insight);
        }
        if (isLegacyJavaScript2(this.#insight)) {
          return this.formatLegacyJavaScriptInsight(this.#insight);
        }
        if (isModernHTTPInsight2(this.#insight)) {
          return this.formatModernHttpInsight(this.#insight);
        }
        if (isNetworkDependencyTreeInsight2(this.#insight)) {
          return this.formatNetworkDependencyTreeInsight(this.#insight);
        }
        if (isRenderBlockingInsight2(this.#insight)) {
          return this.formatRenderBlockingInsight(this.#insight);
        }
        if (isSlowCSSSelectorInsight2(this.#insight)) {
          return this.formatSlowCssSelectorsInsight(this.#insight);
        }
        if (isThirdPartyInsight2(this.#insight)) {
          return this.formatThirdPartiesInsight(this.#insight);
        }
        if (isViewportInsight2(this.#insight)) {
          return this.formatViewportInsight(this.#insight);
        }
        return "";
      }
      estimatedSavings() {
        return Object.entries(this.#insight.metricSavings ?? {}).map(([k, v]) => {
          if (k === "CLS") {
            return `${k} ${v.toFixed(2)}`;
          }
          return `${k} ${Math.round(v)} ms`;
        }).join(", ");
      }
      #links() {
        const links = [];
        if (this.#insight.docs) {
          links.push(this.#insight.docs);
        }
        switch (this.#insight.insightKey) {
          case "CLSCulprits":
            links.push("https://web.dev/articles/cls");
            links.push("https://web.dev/articles/optimize-cls");
            break;
          case "DocumentLatency":
            links.push("https://web.dev/articles/optimize-ttfb");
            break;
          case "DOMSize":
            links.push("https://developer.chrome.com/docs/lighthouse/performance/dom-size/");
            break;
          case "FontDisplay":
            links.push("https://web.dev/articles/preload-optional-fonts");
            links.push("https://fonts.google.com/knowledge/glossary/foit");
            links.push("https://developer.chrome.com/blog/font-fallbacks");
            break;
          case "ForcedReflow":
            links.push("https://developers.google.com/web/fundamentals/performance/rendering/avoid-large-complex-layouts-and-layout-thrashing#avoid-forced-synchronous-layouts");
            break;
          case "ImageDelivery":
            links.push("https://developer.chrome.com/docs/lighthouse/performance/uses-optimized-images/");
            break;
          case "INPBreakdown":
            links.push("https://web.dev/articles/inp");
            links.push("https://web.dev/explore/how-to-optimize-inp");
            links.push("https://web.dev/articles/optimize-long-tasks");
            links.push("https://web.dev/articles/avoid-large-complex-layouts-and-layout-thrashing");
            break;
          case "LCPBreakdown":
          case "LCPDiscovery":
          case "RenderBlocking":
            links.push("https://web.dev/articles/lcp");
            links.push("https://web.dev/articles/optimize-lcp");
            break;
          case "NetworkDependencyTree":
            links.push("https://web.dev/learn/performance/understanding-the-critical-path");
            links.push("https://developer.chrome.com/docs/lighthouse/performance/uses-rel-preconnect/");
            break;
          case "SlowCSSSelector":
            links.push("https://developer.chrome.com/docs/devtools/performance/selector-stats");
            break;
          case "ThirdParties":
            links.push("https://web.dev/articles/optimizing-content-efficiency-loading-third-party-javascript/");
            break;
          case "Viewport":
            links.push("https://developer.chrome.com/blog/300ms-tap-delay-gone-away/");
            break;
          case "Cache":
            links.push("https://web.dev/uses-long-cache-ttl/");
            break;
          case "ModernHTTP":
            links.push("https://developer.chrome.com/docs/lighthouse/best-practices/uses-http2");
            break;
          case "LegacyJavaScript":
            links.push("https://web.dev/articles/baseline-and-polyfills");
            links.push("https://philipwalton.com/articles/the-state-of-es5-on-the-web/");
            break;
        }
        return links.map((link2) => "- " + link2).join("\n");
      }
      #description() {
        switch (this.#insight.insightKey) {
          case "CLSCulprits":
            return `Cumulative Layout Shifts (CLS) is a measure of the largest burst of layout shifts for every unexpected layout shift that occurs during the lifecycle of a page. This is a Core Web Vital and the thresholds for categorizing a score are:
- Good: 0.1 or less
- Needs improvement: more than 0.1 and less than or equal to 0.25
- Bad: over 0.25`;
          case "DocumentLatency":
            return `This insight checks that the first request is responded to promptly. We use the following criteria to check this:
1. Was the initial request redirected?
2. Did the server respond in 600ms or less? We want developers to aim for as close to 100ms as possible, but our threshold for this insight is 600ms.
3. Was there compression applied to the response to minimize the transfer size?`;
          case "DOMSize":
            return `This insight evaluates some key metrics about the Document Object Model (DOM) and identifies excess in the DOM tree, for example:
- The maximum number of elements within the DOM.
- The maximum number of children for any given element.
- Excessive depth of the DOM structure.
- The largest layout and style recalculation events.`;
          case "DuplicatedJavaScript":
            return `This insight identifies large, duplicated JavaScript modules that are present in your application and create redundant code.
  This wastes network bandwidth and slows down your page, as the user's browser must download and process the same code multiple times.`;
          case "FontDisplay":
            return 'This insight identifies font issues when a webpage uses custom fonts, for example when font-display is not set to `swap`, `fallback` or `optional`, causing the "Flash of Invisible Text" problem (FOIT).';
          case "ForcedReflow":
            return `This insight identifies forced synchronous layouts (also known as forced reflows) and layout thrashing caused by JavaScript accessing layout properties at suboptimal points in time.`;
          case "ImageDelivery":
            return "This insight identifies unoptimized images that are downloaded at a much higher resolution than they are displayed. Properly sizing and compressing these assets will decrease their download time, directly improving the perceived page load time and LCP";
          case "INPBreakdown":
            return `Interaction to Next Paint (INP) is a metric that tracks the responsiveness of the page when the user interacts with it. INP is a Core Web Vital and the thresholds for how we categorize a score are:
- Good: 200 milliseconds or less.
- Needs improvement: more than 200 milliseconds and 500 milliseconds or less.
- Bad: over 500 milliseconds.

For a given slow interaction, we can break it down into 3 phases:
1. Input delay: starts when the user initiates an interaction with the page, and ends when the event callbacks for the interaction begin to run.
2. Processing duration: the time it takes for the event callbacks to run to completion.
3. Presentation delay: the time it takes for the browser to present the next frame which contains the visual result of the interaction.

The sum of these three phases is the total latency. It is important to optimize each of these phases to ensure interactions take as little time as possible. Focusing on the phase that has the largest score is a good way to start optimizing.`;
          case "LCPDiscovery":
            return `This insight analyzes the time taken to discover the LCP resource and request it on the network. It only applies if the LCP element was a resource like an image that has to be fetched over the network. There are 3 checks this insight makes:
1. Did the resource have \`fetchpriority=high\` applied?
2. Was the resource discoverable in the initial document, rather than injected from a script or stylesheet?
3. The resource was not lazy loaded as this can delay the browser loading the resource.

It is important that all of these checks pass to minimize the delay between the initial page load and the LCP resource being loaded.`;
          case "LCPBreakdown":
            return "This insight is used to analyze the time spent that contributed to the final LCP time and identify which of the 4 phases (or 2 if there was no LCP resource) are contributing most to the delay in rendering the LCP element.";
          case "NetworkDependencyTree":
            return `This insight analyzes the network dependency tree to identify:
- The maximum critical path latency (the longest chain of network requests that the browser must download before it can render the page).
- Whether current [preconnect] tags are appropriate, according to the following rules:
   1. They should all be in use (no unnecessary preconnects).
   2. All preconnects should specify cross-origin correctly.
   3. The maximum of 4 preconnects should be respected.
- Opportunities to add [preconnect] for a faster loading experience.`;
          case "RenderBlocking":
            return "This insight identifies network requests that were render-blocking. Render-blocking requests are impactful because they are deemed critical to the page and therefore the browser stops rendering the page until it has dealt with these resources. For this insight make sure you fully inspect the details of each render-blocking network request and prioritize your suggestions to the user based on the impact of each render-blocking request.";
          case "SlowCSSSelector":
            return `This insight identifies CSS selectors that are slowing down your page's rendering performance.`;
          case "ThirdParties":
            return "This insight analyzes the performance impact of resources loaded from third-party servers and aggregates the performance cost, in terms of download transfer sizes and total amount of time that third party scripts spent executing on the main thread.";
          case "Viewport":
            return "The insight identifies web pages that are not specifying the viewport meta tag for mobile devies, which avoids the artificial 300-350ms delay designed to help differentiate between tap and double-click.";
          case "Cache":
            return "This insight identifies static resources that are not cached effectively by the browser.";
          case "ModernHTTP":
            return `Modern HTTP protocols, such as HTTP/2, are more efficient than older versions like HTTP/1.1 because they allow for multiple requests and responses to be sent over a single network connection, significantly improving page load performance by reducing latency and overhead. This insight identifies requests that can be upgraded to a modern HTTP protocol.

We apply a conservative approach when flagging HTTP/1.1 usage. This insight will only flag requests that meet all of the following criteria:
1.  Were served over HTTP/1.1 or an earlier protocol.
2.  Originate from an origin that serves at least 6 static asset requests, as the benefits of multiplexing are less significant with fewer requests.
3.  Are not served from 'localhost' or coming from a third-party source, where developers have no control over the server's protocol.

To pass this insight, ensure your server supports and prioritizes a modern HTTP protocol (like HTTP/2) for static assets, especially when serving a substantial number of them.`;
          case "LegacyJavaScript":
            return `This insight identified legacy JavaScript in your application's modules that may be creating unnecessary code.

Polyfills and transforms enable older browsers to use new JavaScript features. However, many are not necessary for modern browsers. Consider modifying your JavaScript build process to not transpile Baseline features, unless you know you must support older browsers.`;
        }
      }
    };
    AgentFocus = class _AgentFocus {
      static fromParsedTrace(parsedTrace) {
        if (!parsedTrace.insights) {
          throw new Error("missing insights");
        }
        return new _AgentFocus({
          parsedTrace,
          event: null,
          callTree: null,
          insight: null
        });
      }
      static fromInsight(parsedTrace, insight) {
        if (!parsedTrace.insights) {
          throw new Error("missing insights");
        }
        return new _AgentFocus({
          parsedTrace,
          event: null,
          callTree: null,
          insight
        });
      }
      static fromEvent(parsedTrace, event) {
        if (!parsedTrace.insights) {
          throw new Error("missing insights");
        }
        const result = _AgentFocus.#getCallTreeOrEvent(parsedTrace, event);
        return new _AgentFocus({ parsedTrace, event: result.event, callTree: result.callTree, insight: null });
      }
      static fromCallTree(callTree) {
        return new _AgentFocus({ parsedTrace: callTree.parsedTrace, event: null, callTree, insight: null });
      }
      #data;
      #primaryInsightSet;
      eventsSerializer = new EventsSerializer();
      constructor(data32) {
        if (!data32.parsedTrace.insights) {
          throw new Error("missing insights");
        }
        this.#data = data32;
        this.#primaryInsightSet = getPrimaryInsightSet(data32.parsedTrace.insights);
      }
      get parsedTrace() {
        return this.#data.parsedTrace;
      }
      get primaryInsightSet() {
        return this.#primaryInsightSet;
      }
      get event() {
        return this.#data.event;
      }
      get callTree() {
        return this.#data.callTree;
      }
      get insight() {
        return this.#data.insight;
      }
      withInsight(insight) {
        const focus = new _AgentFocus(this.#data);
        focus.#data.insight = insight;
        return focus;
      }
      withEvent(event) {
        const focus = new _AgentFocus(this.#data);
        const result = _AgentFocus.#getCallTreeOrEvent(this.#data.parsedTrace, event);
        focus.#data.callTree = result.callTree;
        focus.#data.event = result.event;
        return focus;
      }
      lookupEvent(key) {
        try {
          return this.eventsSerializer.eventForKey(key, this.#data.parsedTrace);
        } catch (err) {
          if (err.toString().includes("Unknown trace event") || err.toString().includes("Unknown profile call")) {
            return null;
          }
          throw err;
        }
      }
      static #getCallTreeOrEvent(parsedTrace, event) {
        const callTree = event && AICallTree.fromEvent(event, parsedTrace);
        if (callTree) {
          return { callTree, event: null };
        }
        if (event && isSyntheticNetworkRequest2(event)) {
          return { callTree: null, event };
        }
        return { callTree: null, event: null };
      }
    };
    UIStrings$l = {
      improvements: "Improvements",
      pageErrors: "Page Errors",
      breakingChanges: "Breaking Changes",
      pageErrorIssue: "A page error issue: the page is not working correctly",
      breakingChangeIssue: "A breaking change issue: the page may stop working in an upcoming version of Chrome",
      improvementIssue: "An improvement issue: there is an opportunity to improve the page"
    };
    str_$k = registerUIStrings("models/issues_manager/Issue.ts", UIStrings$l);
    getLocalizedString.bind(void 0, str_$k);
    Issue = class {
      #issueCode;
      #issuesModel;
      issueId = void 0;
      #issueDetails;
      #hidden;
      constructor(code2, issueDetails, issuesModel = null, issueId) {
        this.#issueCode = typeof code2 === "object" ? code2.code : code2;
        this.#issueDetails = issueDetails;
        this.#issuesModel = issuesModel;
        this.issueId = issueId;
        userMetrics.issueCreated(typeof code2 === "string" ? code2 : code2.umaCode);
        this.#hidden = false;
      }
      code() {
        return this.#issueCode;
      }
      details() {
        return this.#issueDetails;
      }
      getBlockedByResponseDetails() {
        return [];
      }
      cookies() {
        return [];
      }
      rawCookieLines() {
        return [];
      }
      elements() {
        return [];
      }
      requests() {
        return [];
      }
      sources() {
        return [];
      }
      trackingSites() {
        return [];
      }
      isAssociatedWithRequestId(requestId) {
        for (const request3 of this.requests()) {
          if (request3.requestId === requestId) {
            return true;
          }
        }
        return false;
      }
      model() {
        return this.#issuesModel;
      }
      isCausedByThirdParty() {
        return false;
      }
      getIssueId() {
        return this.issueId;
      }
      isHidden() {
        return this.#hidden;
      }
      setHidden(hidden) {
        this.#hidden = hidden;
      }
      maybeCreateConsoleMessage() {
        return;
      }
    };
    structuredHeaderLink = {
      link: "https://tools.ietf.org/id/draft-ietf-httpbis-header-structure-15.html#rfc.section.4.2.2",
      linkTitle: "Structured Headers RFC"
    };
    AttributionReportingIssue = class _AttributionReportingIssue extends Issue {
      constructor(issueDetails, issuesModel) {
        super(getIssueCode$2(issueDetails), issueDetails, issuesModel);
      }
      getCategory() {
        return "AttributionReporting";
      }
      getHeaderValidatorLink(name) {
        const url = new URL("https://wicg.github.io/attribution-reporting-api/validate-headers");
        url.searchParams.set("header", name);
        const details = this.details();
        if (details.invalidParameter) {
          url.searchParams.set("json", details.invalidParameter);
        }
        return {
          link: url.toString(),
          linkTitle: "Header Validator"
        };
      }
      getDescription() {
        switch (this.code()) {
          case "AttributionReportingIssue::PermissionPolicyDisabled":
            return {
              file: "arPermissionPolicyDisabled.md",
              links: []
            };
          case "AttributionReportingIssue::UntrustworthyReportingOrigin":
            return {
              file: "arUntrustworthyReportingOrigin.md",
              links: []
            };
          case "AttributionReportingIssue::InsecureContext":
            return {
              file: "arInsecureContext.md",
              links: []
            };
          case "AttributionReportingIssue::InvalidRegisterSourceHeader":
            return {
              file: "arInvalidRegisterSourceHeader.md",
              links: [this.getHeaderValidatorLink("source")]
            };
          case "AttributionReportingIssue::InvalidRegisterTriggerHeader":
            return {
              file: "arInvalidRegisterTriggerHeader.md",
              links: [this.getHeaderValidatorLink("trigger")]
            };
          case "AttributionReportingIssue::InvalidRegisterOsSourceHeader":
            return {
              file: "arInvalidRegisterOsSourceHeader.md",
              links: [this.getHeaderValidatorLink("os-source")]
            };
          case "AttributionReportingIssue::InvalidRegisterOsTriggerHeader":
            return {
              file: "arInvalidRegisterOsTriggerHeader.md",
              links: [this.getHeaderValidatorLink("os-trigger")]
            };
          case "AttributionReportingIssue::SourceAndTriggerHeaders":
            return {
              file: "arSourceAndTriggerHeaders.md",
              links: []
            };
          case "AttributionReportingIssue::WebAndOsHeaders":
            return {
              file: "arWebAndOsHeaders.md",
              links: []
            };
          case "AttributionReportingIssue::SourceIgnored":
            return {
              file: "arSourceIgnored.md",
              links: [structuredHeaderLink]
            };
          case "AttributionReportingIssue::TriggerIgnored":
            return {
              file: "arTriggerIgnored.md",
              links: [structuredHeaderLink]
            };
          case "AttributionReportingIssue::OsSourceIgnored":
            return {
              file: "arOsSourceIgnored.md",
              links: [structuredHeaderLink]
            };
          case "AttributionReportingIssue::OsTriggerIgnored":
            return {
              file: "arOsTriggerIgnored.md",
              links: [structuredHeaderLink]
            };
          case "AttributionReportingIssue::NavigationRegistrationWithoutTransientUserActivation":
            return {
              file: "arNavigationRegistrationWithoutTransientUserActivation.md",
              links: []
            };
          case "AttributionReportingIssue::NoWebOrOsSupport":
            return {
              file: "arNoWebOrOsSupport.md",
              links: []
            };
          case "AttributionReportingIssue::InvalidInfoHeader":
            return {
              file: "arInvalidInfoHeader.md",
              links: []
            };
          case "AttributionReportingIssue::NoRegisterSourceHeader":
            return {
              file: "arNoRegisterSourceHeader.md",
              links: []
            };
          case "AttributionReportingIssue::NoRegisterTriggerHeader":
            return {
              file: "arNoRegisterTriggerHeader.md",
              links: []
            };
          case "AttributionReportingIssue::NoRegisterOsSourceHeader":
            return {
              file: "arNoRegisterOsSourceHeader.md",
              links: []
            };
          case "AttributionReportingIssue::NoRegisterOsTriggerHeader":
            return {
              file: "arNoRegisterOsTriggerHeader.md",
              links: []
            };
          case "AttributionReportingIssue::NavigationRegistrationUniqueScopeAlreadySet":
            return {
              file: "arNavigationRegistrationUniqueScopeAlreadySet.md",
              links: []
            };
          case "AttributionReportingIssue::Unknown":
            return null;
        }
      }
      primaryKey() {
        return JSON.stringify(this.details());
      }
      getKind() {
        return "PageError";
      }
      static fromInspectorIssue(issuesModel, inspectorIssue) {
        const { attributionReportingIssueDetails } = inspectorIssue.details;
        if (!attributionReportingIssueDetails) {
          console.warn("Attribution Reporting issue without details received.");
          return [];
        }
        return [new _AttributionReportingIssue(attributionReportingIssueDetails, issuesModel)];
      }
    };
    _defaults = _getDefaults();
    escapeTest = /[&<>"']/;
    escapeReplace = new RegExp(escapeTest.source, "g");
    escapeTestNoEncode = /[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/;
    escapeReplaceNoEncode = new RegExp(escapeTestNoEncode.source, "g");
    escapeReplacements = {
      "&": "&amp;",
      "<": "&lt;",
      ">": "&gt;",
      '"': "&quot;",
      "'": "&#39;"
    };
    getEscapeReplacement = (ch) => escapeReplacements[ch];
    unescapeTest = /&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;
    caret = /(^|[^\[])\^/g;
    noopTest = { exec: () => null };
    _Tokenizer = class {
      options;
      rules;
      lexer;
      constructor(options2) {
        this.options = options2 || _defaults;
      }
      space(src2) {
        const cap = this.rules.block.newline.exec(src2);
        if (cap && cap[0].length > 0) {
          return {
            type: "space",
            raw: cap[0]
          };
        }
      }
      code(src2) {
        const cap = this.rules.block.code.exec(src2);
        if (cap) {
          const text = cap[0].replace(/^ {1,4}/gm, "");
          return {
            type: "code",
            raw: cap[0],
            codeBlockStyle: "indented",
            text: !this.options.pedantic ? rtrim(text, "\n") : text
          };
        }
      }
      fences(src2) {
        const cap = this.rules.block.fences.exec(src2);
        if (cap) {
          const raw = cap[0];
          const text = indentCodeCompensation(raw, cap[3] || "");
          return {
            type: "code",
            raw,
            lang: cap[2] ? cap[2].trim().replace(this.rules.inline.anyPunctuation, "$1") : cap[2],
            text
          };
        }
      }
      heading(src2) {
        const cap = this.rules.block.heading.exec(src2);
        if (cap) {
          let text = cap[2].trim();
          if (/#$/.test(text)) {
            const trimmed = rtrim(text, "#");
            if (this.options.pedantic) {
              text = trimmed.trim();
            } else if (!trimmed || / $/.test(trimmed)) {
              text = trimmed.trim();
            }
          }
          return {
            type: "heading",
            raw: cap[0],
            depth: cap[1].length,
            text,
            tokens: this.lexer.inline(text)
          };
        }
      }
      hr(src2) {
        const cap = this.rules.block.hr.exec(src2);
        if (cap) {
          return {
            type: "hr",
            raw: rtrim(cap[0], "\n")
          };
        }
      }
      blockquote(src2) {
        const cap = this.rules.block.blockquote.exec(src2);
        if (cap) {
          let lines = rtrim(cap[0], "\n").split("\n");
          let raw = "";
          let text = "";
          const tokens = [];
          while (lines.length > 0) {
            let inBlockquote = false;
            const currentLines = [];
            let i;
            for (i = 0; i < lines.length; i++) {
              if (/^ {0,3}>/.test(lines[i])) {
                currentLines.push(lines[i]);
                inBlockquote = true;
              } else if (!inBlockquote) {
                currentLines.push(lines[i]);
              } else {
                break;
              }
            }
            lines = lines.slice(i);
            const currentRaw = currentLines.join("\n");
            const currentText = currentRaw.replace(/\n {0,3}((?:=+|-+) *)(?=\n|$)/g, "\n    $1").replace(/^ {0,3}>[ \t]?/gm, "");
            raw = raw ? `${raw}
${currentRaw}` : currentRaw;
            text = text ? `${text}
${currentText}` : currentText;
            const top2 = this.lexer.state.top;
            this.lexer.state.top = true;
            this.lexer.blockTokens(currentText, tokens, true);
            this.lexer.state.top = top2;
            if (lines.length === 0) {
              break;
            }
            const lastToken = tokens[tokens.length - 1];
            if (lastToken?.type === "code") {
              break;
            } else if (lastToken?.type === "blockquote") {
              const oldToken = lastToken;
              const newText = oldToken.raw + "\n" + lines.join("\n");
              const newToken = this.blockquote(newText);
              tokens[tokens.length - 1] = newToken;
              raw = raw.substring(0, raw.length - oldToken.raw.length) + newToken.raw;
              text = text.substring(0, text.length - oldToken.text.length) + newToken.text;
              break;
            } else if (lastToken?.type === "list") {
              const oldToken = lastToken;
              const newText = oldToken.raw + "\n" + lines.join("\n");
              const newToken = this.list(newText);
              tokens[tokens.length - 1] = newToken;
              raw = raw.substring(0, raw.length - lastToken.raw.length) + newToken.raw;
              text = text.substring(0, text.length - oldToken.raw.length) + newToken.raw;
              lines = newText.substring(tokens[tokens.length - 1].raw.length).split("\n");
              continue;
            }
          }
          return {
            type: "blockquote",
            raw,
            tokens,
            text
          };
        }
      }
      list(src2) {
        let cap = this.rules.block.list.exec(src2);
        if (cap) {
          let bull = cap[1].trim();
          const isordered = bull.length > 1;
          const list2 = {
            type: "list",
            raw: "",
            ordered: isordered,
            start: isordered ? +bull.slice(0, -1) : "",
            loose: false,
            items: []
          };
          bull = isordered ? `\\d{1,9}\\${bull.slice(-1)}` : `\\${bull}`;
          if (this.options.pedantic) {
            bull = isordered ? bull : "[*+-]";
          }
          const itemRegex = new RegExp(`^( {0,3}${bull})((?:[	 ][^\\n]*)?(?:\\n|$))`);
          let raw = "";
          let itemContents = "";
          let endsWithBlankLine = false;
          while (src2) {
            let endEarly = false;
            if (!(cap = itemRegex.exec(src2))) {
              break;
            }
            if (this.rules.block.hr.test(src2)) {
              break;
            }
            raw = cap[0];
            src2 = src2.substring(raw.length);
            let line = cap[2].split("\n", 1)[0].replace(/^\t+/, (t) => " ".repeat(3 * t.length));
            let nextLine = src2.split("\n", 1)[0];
            let indent = 0;
            if (this.options.pedantic) {
              indent = 2;
              itemContents = line.trimStart();
            } else {
              indent = cap[2].search(/[^ ]/);
              indent = indent > 4 ? 1 : indent;
              itemContents = line.slice(indent);
              indent += cap[1].length;
            }
            let blankLine = false;
            if (!line && /^ *$/.test(nextLine)) {
              raw += nextLine + "\n";
              src2 = src2.substring(nextLine.length + 1);
              endEarly = true;
            }
            if (!endEarly) {
              const nextBulletRegex = new RegExp(`^ {0,${Math.min(3, indent - 1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ 	][^\\n]*)?(?:\\n|$))`);
              const hrRegex = new RegExp(`^ {0,${Math.min(3, indent - 1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`);
              const fencesBeginRegex = new RegExp(`^ {0,${Math.min(3, indent - 1)}}(?:\`\`\`|~~~)`);
              const headingBeginRegex = new RegExp(`^ {0,${Math.min(3, indent - 1)}}#`);
              while (src2) {
                const rawLine = src2.split("\n", 1)[0];
                nextLine = rawLine;
                if (this.options.pedantic) {
                  nextLine = nextLine.replace(/^ {1,4}(?=( {4})*[^ ])/g, "  ");
                }
                if (fencesBeginRegex.test(nextLine)) {
                  break;
                }
                if (headingBeginRegex.test(nextLine)) {
                  break;
                }
                if (nextBulletRegex.test(nextLine)) {
                  break;
                }
                if (hrRegex.test(src2)) {
                  break;
                }
                if (nextLine.search(/[^ ]/) >= indent || !nextLine.trim()) {
                  itemContents += "\n" + nextLine.slice(indent);
                } else {
                  if (blankLine) {
                    break;
                  }
                  if (line.search(/[^ ]/) >= 4) {
                    break;
                  }
                  if (fencesBeginRegex.test(line)) {
                    break;
                  }
                  if (headingBeginRegex.test(line)) {
                    break;
                  }
                  if (hrRegex.test(line)) {
                    break;
                  }
                  itemContents += "\n" + nextLine;
                }
                if (!blankLine && !nextLine.trim()) {
                  blankLine = true;
                }
                raw += rawLine + "\n";
                src2 = src2.substring(rawLine.length + 1);
                line = nextLine.slice(indent);
              }
            }
            if (!list2.loose) {
              if (endsWithBlankLine) {
                list2.loose = true;
              } else if (/\n *\n *$/.test(raw)) {
                endsWithBlankLine = true;
              }
            }
            let istask = null;
            let ischecked;
            if (this.options.gfm) {
              istask = /^\[[ xX]\] /.exec(itemContents);
              if (istask) {
                ischecked = istask[0] !== "[ ] ";
                itemContents = itemContents.replace(/^\[[ xX]\] +/, "");
              }
            }
            list2.items.push({
              type: "list_item",
              raw,
              task: !!istask,
              checked: ischecked,
              loose: false,
              text: itemContents,
              tokens: []
            });
            list2.raw += raw;
          }
          list2.items[list2.items.length - 1].raw = raw.trimEnd();
          list2.items[list2.items.length - 1].text = itemContents.trimEnd();
          list2.raw = list2.raw.trimEnd();
          for (let i = 0; i < list2.items.length; i++) {
            this.lexer.state.top = false;
            list2.items[i].tokens = this.lexer.blockTokens(list2.items[i].text, []);
            if (!list2.loose) {
              const spacers = list2.items[i].tokens.filter((t) => t.type === "space");
              const hasMultipleLineBreaks = spacers.length > 0 && spacers.some((t) => /\n.*\n/.test(t.raw));
              list2.loose = hasMultipleLineBreaks;
            }
          }
          if (list2.loose) {
            for (let i = 0; i < list2.items.length; i++) {
              list2.items[i].loose = true;
            }
          }
          return list2;
        }
      }
      html(src2) {
        const cap = this.rules.block.html.exec(src2);
        if (cap) {
          const token = {
            type: "html",
            block: true,
            raw: cap[0],
            pre: cap[1] === "pre" || cap[1] === "script" || cap[1] === "style",
            text: cap[0]
          };
          return token;
        }
      }
      def(src2) {
        const cap = this.rules.block.def.exec(src2);
        if (cap) {
          const tag2 = cap[1].toLowerCase().replace(/\s+/g, " ");
          const href = cap[2] ? cap[2].replace(/^<(.*)>$/, "$1").replace(this.rules.inline.anyPunctuation, "$1") : "";
          const title2 = cap[3] ? cap[3].substring(1, cap[3].length - 1).replace(this.rules.inline.anyPunctuation, "$1") : cap[3];
          return {
            type: "def",
            tag: tag2,
            raw: cap[0],
            href,
            title: title2
          };
        }
      }
      table(src2) {
        const cap = this.rules.block.table.exec(src2);
        if (!cap) {
          return;
        }
        if (!/[:|]/.test(cap[2])) {
          return;
        }
        const headers = splitCells(cap[1]);
        const aligns = cap[2].replace(/^\||\| *$/g, "").split("|");
        const rows = cap[3] && cap[3].trim() ? cap[3].replace(/\n[ \t]*$/, "").split("\n") : [];
        const item = {
          type: "table",
          raw: cap[0],
          header: [],
          align: [],
          rows: []
        };
        if (headers.length !== aligns.length) {
          return;
        }
        for (const align2 of aligns) {
          if (/^ *-+: *$/.test(align2)) {
            item.align.push("right");
          } else if (/^ *:-+: *$/.test(align2)) {
            item.align.push("center");
          } else if (/^ *:-+ *$/.test(align2)) {
            item.align.push("left");
          } else {
            item.align.push(null);
          }
        }
        for (let i = 0; i < headers.length; i++) {
          item.header.push({
            text: headers[i],
            tokens: this.lexer.inline(headers[i]),
            header: true,
            align: item.align[i]
          });
        }
        for (const row of rows) {
          item.rows.push(splitCells(row, item.header.length).map((cell, i) => {
            return {
              text: cell,
              tokens: this.lexer.inline(cell),
              header: false,
              align: item.align[i]
            };
          }));
        }
        return item;
      }
      lheading(src2) {
        const cap = this.rules.block.lheading.exec(src2);
        if (cap) {
          return {
            type: "heading",
            raw: cap[0],
            depth: cap[2].charAt(0) === "=" ? 1 : 2,
            text: cap[1],
            tokens: this.lexer.inline(cap[1])
          };
        }
      }
      paragraph(src2) {
        const cap = this.rules.block.paragraph.exec(src2);
        if (cap) {
          const text = cap[1].charAt(cap[1].length - 1) === "\n" ? cap[1].slice(0, -1) : cap[1];
          return {
            type: "paragraph",
            raw: cap[0],
            text,
            tokens: this.lexer.inline(text)
          };
        }
      }
      text(src2) {
        const cap = this.rules.block.text.exec(src2);
        if (cap) {
          return {
            type: "text",
            raw: cap[0],
            text: cap[0],
            tokens: this.lexer.inline(cap[0])
          };
        }
      }
      escape(src2) {
        const cap = this.rules.inline.escape.exec(src2);
        if (cap) {
          return {
            type: "escape",
            raw: cap[0],
            text: escape$1(cap[1])
          };
        }
      }
      tag(src2) {
        const cap = this.rules.inline.tag.exec(src2);
        if (cap) {
          if (!this.lexer.state.inLink && /^<a /i.test(cap[0])) {
            this.lexer.state.inLink = true;
          } else if (this.lexer.state.inLink && /^<\/a>/i.test(cap[0])) {
            this.lexer.state.inLink = false;
          }
          if (!this.lexer.state.inRawBlock && /^<(pre|code|kbd|script)(\s|>)/i.test(cap[0])) {
            this.lexer.state.inRawBlock = true;
          } else if (this.lexer.state.inRawBlock && /^<\/(pre|code|kbd|script)(\s|>)/i.test(cap[0])) {
            this.lexer.state.inRawBlock = false;
          }
          return {
            type: "html",
            raw: cap[0],
            inLink: this.lexer.state.inLink,
            inRawBlock: this.lexer.state.inRawBlock,
            block: false,
            text: cap[0]
          };
        }
      }
      link(src2) {
        const cap = this.rules.inline.link.exec(src2);
        if (cap) {
          const trimmedUrl = cap[2].trim();
          if (!this.options.pedantic && /^</.test(trimmedUrl)) {
            if (!/>$/.test(trimmedUrl)) {
              return;
            }
            const rtrimSlash = rtrim(trimmedUrl.slice(0, -1), "\\");
            if ((trimmedUrl.length - rtrimSlash.length) % 2 === 0) {
              return;
            }
          } else {
            const lastParenIndex = findClosingBracket(cap[2], "()");
            if (lastParenIndex > -1) {
              const start = cap[0].indexOf("!") === 0 ? 5 : 4;
              const linkLen = start + cap[1].length + lastParenIndex;
              cap[2] = cap[2].substring(0, lastParenIndex);
              cap[0] = cap[0].substring(0, linkLen).trim();
              cap[3] = "";
            }
          }
          let href = cap[2];
          let title2 = "";
          if (this.options.pedantic) {
            const link2 = /^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(href);
            if (link2) {
              href = link2[1];
              title2 = link2[3];
            }
          } else {
            title2 = cap[3] ? cap[3].slice(1, -1) : "";
          }
          href = href.trim();
          if (/^</.test(href)) {
            if (this.options.pedantic && !/>$/.test(trimmedUrl)) {
              href = href.slice(1);
            } else {
              href = href.slice(1, -1);
            }
          }
          return outputLink(cap, {
            href: href ? href.replace(this.rules.inline.anyPunctuation, "$1") : href,
            title: title2 ? title2.replace(this.rules.inline.anyPunctuation, "$1") : title2
          }, cap[0], this.lexer);
        }
      }
      reflink(src2, links) {
        let cap;
        if ((cap = this.rules.inline.reflink.exec(src2)) || (cap = this.rules.inline.nolink.exec(src2))) {
          const linkString = (cap[2] || cap[1]).replace(/\s+/g, " ");
          const link2 = links[linkString.toLowerCase()];
          if (!link2) {
            const text = cap[0].charAt(0);
            return {
              type: "text",
              raw: text,
              text
            };
          }
          return outputLink(cap, link2, cap[0], this.lexer);
        }
      }
      emStrong(src2, maskedSrc, prevChar = "") {
        let match = this.rules.inline.emStrongLDelim.exec(src2);
        if (!match)
          return;
        if (match[3] && prevChar.match(/[\p{L}\p{N}]/u))
          return;
        const nextChar = match[1] || match[2] || "";
        if (!nextChar || !prevChar || this.rules.inline.punctuation.exec(prevChar)) {
          const lLength = [...match[0]].length - 1;
          let rDelim, rLength, delimTotal = lLength, midDelimTotal = 0;
          const endReg = match[0][0] === "*" ? this.rules.inline.emStrongRDelimAst : this.rules.inline.emStrongRDelimUnd;
          endReg.lastIndex = 0;
          maskedSrc = maskedSrc.slice(-1 * src2.length + lLength);
          while ((match = endReg.exec(maskedSrc)) != null) {
            rDelim = match[1] || match[2] || match[3] || match[4] || match[5] || match[6];
            if (!rDelim)
              continue;
            rLength = [...rDelim].length;
            if (match[3] || match[4]) {
              delimTotal += rLength;
              continue;
            } else if (match[5] || match[6]) {
              if (lLength % 3 && !((lLength + rLength) % 3)) {
                midDelimTotal += rLength;
                continue;
              }
            }
            delimTotal -= rLength;
            if (delimTotal > 0)
              continue;
            rLength = Math.min(rLength, rLength + delimTotal + midDelimTotal);
            const lastCharLength = [...match[0]][0].length;
            const raw = src2.slice(0, lLength + match.index + lastCharLength + rLength);
            if (Math.min(lLength, rLength) % 2) {
              const text2 = raw.slice(1, -1);
              return {
                type: "em",
                raw,
                text: text2,
                tokens: this.lexer.inlineTokens(text2)
              };
            }
            const text = raw.slice(2, -2);
            return {
              type: "strong",
              raw,
              text,
              tokens: this.lexer.inlineTokens(text)
            };
          }
        }
      }
      codespan(src2) {
        const cap = this.rules.inline.code.exec(src2);
        if (cap) {
          let text = cap[2].replace(/\n/g, " ");
          const hasNonSpaceChars = /[^ ]/.test(text);
          const hasSpaceCharsOnBothEnds = /^ /.test(text) && / $/.test(text);
          if (hasNonSpaceChars && hasSpaceCharsOnBothEnds) {
            text = text.substring(1, text.length - 1);
          }
          text = escape$1(text, true);
          return {
            type: "codespan",
            raw: cap[0],
            text
          };
        }
      }
      br(src2) {
        const cap = this.rules.inline.br.exec(src2);
        if (cap) {
          return {
            type: "br",
            raw: cap[0]
          };
        }
      }
      del(src2) {
        const cap = this.rules.inline.del.exec(src2);
        if (cap) {
          return {
            type: "del",
            raw: cap[0],
            text: cap[2],
            tokens: this.lexer.inlineTokens(cap[2])
          };
        }
      }
      autolink(src2) {
        const cap = this.rules.inline.autolink.exec(src2);
        if (cap) {
          let text, href;
          if (cap[2] === "@") {
            text = escape$1(cap[1]);
            href = "mailto:" + text;
          } else {
            text = escape$1(cap[1]);
            href = text;
          }
          return {
            type: "link",
            raw: cap[0],
            text,
            href,
            tokens: [
              {
                type: "text",
                raw: text,
                text
              }
            ]
          };
        }
      }
      url(src2) {
        let cap;
        if (cap = this.rules.inline.url.exec(src2)) {
          let text, href;
          if (cap[2] === "@") {
            text = escape$1(cap[0]);
            href = "mailto:" + text;
          } else {
            let prevCapZero;
            do {
              prevCapZero = cap[0];
              cap[0] = this.rules.inline._backpedal.exec(cap[0])?.[0] ?? "";
            } while (prevCapZero !== cap[0]);
            text = escape$1(cap[0]);
            if (cap[1] === "www.") {
              href = "http://" + cap[0];
            } else {
              href = cap[0];
            }
          }
          return {
            type: "link",
            raw: cap[0],
            text,
            href,
            tokens: [
              {
                type: "text",
                raw: text,
                text
              }
            ]
          };
        }
      }
      inlineText(src2) {
        const cap = this.rules.inline.text.exec(src2);
        if (cap) {
          let text;
          if (this.lexer.state.inRawBlock) {
            text = cap[0];
          } else {
            text = escape$1(cap[0]);
          }
          return {
            type: "text",
            raw: cap[0],
            text
          };
        }
      }
    };
    newline = /^(?: *(?:\n|$))+/;
    blockCode = /^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/;
    fences = /^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/;
    hr = /^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/;
    heading = /^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/;
    bullet = /(?:[*+-]|\d{1,9}[.)])/;
    lheading = edit(/^(?!bull |blockCode|fences|blockquote|heading|html)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html))+?)\n {0,3}(=+|-+) *(?:\n+|$)/).replace(/bull/g, bullet).replace(/blockCode/g, / {4}/).replace(/fences/g, / {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g, / {0,3}>/).replace(/heading/g, / {0,3}#{1,6}/).replace(/html/g, / {0,3}<[^\n>]+>\n/).getRegex();
    _paragraph = /^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/;
    blockText = /^[^\n]+/;
    _blockLabel = /(?!\s*\])(?:\\.|[^\[\]\\])+/;
    def = edit(/^ {0,3}\[(label)\]: *(?:\n *)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n *)?| *\n *)(title))? *(?:\n+|$)/).replace("label", _blockLabel).replace("title", /(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex();
    list = edit(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g, bullet).getRegex();
    _tag = "address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul";
    _comment = /<!--(?:-?>|[\s\S]*?(?:-->|$))/;
    html = edit("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n *)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$))", "i").replace("comment", _comment).replace("tag", _tag).replace("attribute", / +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex();
    paragraph = edit(_paragraph).replace("hr", hr).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("|table", "").replace("blockquote", " {0,3}>").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)]) ").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", _tag).getRegex();
    blockquote = edit(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph", paragraph).getRegex();
    blockNormal = {
      blockquote,
      code: blockCode,
      def,
      fences,
      heading,
      hr,
      html,
      lheading,
      list,
      newline,
      paragraph,
      table: noopTest,
      text: blockText
    };
    gfmTable = edit("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr", hr).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("blockquote", " {0,3}>").replace("code", " {4}[^\\n]").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)]) ").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", _tag).getRegex();
    blockGfm = {
      ...blockNormal,
      table: gfmTable,
      paragraph: edit(_paragraph).replace("hr", hr).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("table", gfmTable).replace("blockquote", " {0,3}>").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)]) ").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", _tag).getRegex()
    };
    blockPedantic = {
      ...blockNormal,
      html: edit(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment", _comment).replace(/tag/g, "(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),
      def: /^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,
      heading: /^(#{1,6})(.*)(?:\n+|$)/,
      fences: noopTest,
      lheading: /^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,
      paragraph: edit(_paragraph).replace("hr", hr).replace("heading", " *#{1,6} *[^\n]").replace("lheading", lheading).replace("|table", "").replace("blockquote", " {0,3}>").replace("|fences", "").replace("|list", "").replace("|html", "").replace("|tag", "").getRegex()
    };
    escape$2 = /^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/;
    inlineCode = /^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/;
    br = /^( {2,}|\\)\n(?!\s*$)/;
    inlineText = /^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/;
    _punctuation = "\\p{P}\\p{S}";
    punctuation = edit(/^((?![*_])[\spunctuation])/, "u").replace(/punctuation/g, _punctuation).getRegex();
    blockSkip = /\[[^[\]]*?\]\([^\(\)]*?\)|`[^`]*?`|<[^<>]*?>/g;
    emStrongLDelim = edit(/^(?:\*+(?:((?!\*)[punct])|[^\s*]))|^_+(?:((?!_)[punct])|([^\s_]))/, "u").replace(/punct/g, _punctuation).getRegex();
    emStrongRDelimAst = edit("^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)[punct](\\*+)(?=[\\s]|$)|[^punct\\s](\\*+)(?!\\*)(?=[punct\\s]|$)|(?!\\*)[punct\\s](\\*+)(?=[^punct\\s])|[\\s](\\*+)(?!\\*)(?=[punct])|(?!\\*)[punct](\\*+)(?!\\*)(?=[punct])|[^punct\\s](\\*+)(?=[^punct\\s])", "gu").replace(/punct/g, _punctuation).getRegex();
    emStrongRDelimUnd = edit("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)[punct](_+)(?=[\\s]|$)|[^punct\\s](_+)(?!_)(?=[punct\\s]|$)|(?!_)[punct\\s](_+)(?=[^punct\\s])|[\\s](_+)(?!_)(?=[punct])|(?!_)[punct](_+)(?!_)(?=[punct])", "gu").replace(/punct/g, _punctuation).getRegex();
    anyPunctuation = edit(/\\([punct])/, "gu").replace(/punct/g, _punctuation).getRegex();
    autolink = edit(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme", /[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email", /[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex();
    _inlineComment = edit(_comment).replace("(?:-->|$)", "-->").getRegex();
    tag = edit("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment", _inlineComment).replace("attribute", /\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex();
    _inlineLabel = /(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/;
    link = edit(/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/).replace("label", _inlineLabel).replace("href", /<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/).replace("title", /"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex();
    reflink = edit(/^!?\[(label)\]\[(ref)\]/).replace("label", _inlineLabel).replace("ref", _blockLabel).getRegex();
    nolink = edit(/^!?\[(ref)\](?:\[\])?/).replace("ref", _blockLabel).getRegex();
    reflinkSearch = edit("reflink|nolink(?!\\()", "g").replace("reflink", reflink).replace("nolink", nolink).getRegex();
    inlineNormal = {
      _backpedal: noopTest,
      anyPunctuation,
      autolink,
      blockSkip,
      br,
      code: inlineCode,
      del: noopTest,
      emStrongLDelim,
      emStrongRDelimAst,
      emStrongRDelimUnd,
      escape: escape$2,
      link,
      nolink,
      punctuation,
      reflink,
      reflinkSearch,
      tag,
      text: inlineText,
      url: noopTest
    };
    inlinePedantic = {
      ...inlineNormal,
      link: edit(/^!?\[(label)\]\((.*?)\)/).replace("label", _inlineLabel).getRegex(),
      reflink: edit(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label", _inlineLabel).getRegex()
    };
    inlineGfm = {
      ...inlineNormal,
      escape: edit(escape$2).replace("])", "~|])").getRegex(),
      url: edit(/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/, "i").replace("email", /[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),
      _backpedal: /(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,
      del: /^(~~?)(?=[^\s~])([\s\S]*?[^\s~])\1(?=[^~]|$)/,
      text: /^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/
    };
    inlineBreaks = {
      ...inlineGfm,
      br: edit(br).replace("{2,}", "*").getRegex(),
      text: edit(inlineGfm.text).replace("\\b_", "\\b_| {2,}\\n").replace(/\{2,\}/g, "*").getRegex()
    };
    block = {
      normal: blockNormal,
      gfm: blockGfm,
      pedantic: blockPedantic
    };
    inline = {
      normal: inlineNormal,
      gfm: inlineGfm,
      breaks: inlineBreaks,
      pedantic: inlinePedantic
    };
    _Lexer = class __Lexer {
      tokens;
      options;
      state;
      tokenizer;
      inlineQueue;
      constructor(options2) {
        this.tokens = [];
        this.tokens.links = /* @__PURE__ */ Object.create(null);
        this.options = options2 || _defaults;
        this.options.tokenizer = this.options.tokenizer || new _Tokenizer();
        this.tokenizer = this.options.tokenizer;
        this.tokenizer.options = this.options;
        this.tokenizer.lexer = this;
        this.inlineQueue = [];
        this.state = {
          inLink: false,
          inRawBlock: false,
          top: true
        };
        const rules2 = {
          block: block.normal,
          inline: inline.normal
        };
        if (this.options.pedantic) {
          rules2.block = block.pedantic;
          rules2.inline = inline.pedantic;
        } else if (this.options.gfm) {
          rules2.block = block.gfm;
          if (this.options.breaks) {
            rules2.inline = inline.breaks;
          } else {
            rules2.inline = inline.gfm;
          }
        }
        this.tokenizer.rules = rules2;
      }
      static get rules() {
        return {
          block,
          inline
        };
      }
      static lex(src2, options2) {
        const lexer2 = new __Lexer(options2);
        return lexer2.lex(src2);
      }
      static lexInline(src2, options2) {
        const lexer2 = new __Lexer(options2);
        return lexer2.inlineTokens(src2);
      }
      lex(src2) {
        src2 = src2.replace(/\r\n|\r/g, "\n");
        this.blockTokens(src2, this.tokens);
        for (let i = 0; i < this.inlineQueue.length; i++) {
          const next = this.inlineQueue[i];
          this.inlineTokens(next.src, next.tokens);
        }
        this.inlineQueue = [];
        return this.tokens;
      }
      blockTokens(src2, tokens = [], lastParagraphClipped = false) {
        if (this.options.pedantic) {
          src2 = src2.replace(/\t/g, "    ").replace(/^ +$/gm, "");
        } else {
          src2 = src2.replace(/^( *)(\t+)/gm, (_, leading, tabs) => {
            return leading + "    ".repeat(tabs.length);
          });
        }
        let token;
        let lastToken;
        let cutSrc;
        while (src2) {
          if (this.options.extensions && this.options.extensions.block && this.options.extensions.block.some((extTokenizer) => {
            if (token = extTokenizer.call({ lexer: this }, src2, tokens)) {
              src2 = src2.substring(token.raw.length);
              tokens.push(token);
              return true;
            }
            return false;
          })) {
            continue;
          }
          if (token = this.tokenizer.space(src2)) {
            src2 = src2.substring(token.raw.length);
            if (token.raw.length === 1 && tokens.length > 0) {
              tokens[tokens.length - 1].raw += "\n";
            } else {
              tokens.push(token);
            }
            continue;
          }
          if (token = this.tokenizer.code(src2)) {
            src2 = src2.substring(token.raw.length);
            lastToken = tokens[tokens.length - 1];
            if (lastToken && (lastToken.type === "paragraph" || lastToken.type === "text")) {
              lastToken.raw += "\n" + token.raw;
              lastToken.text += "\n" + token.text;
              this.inlineQueue[this.inlineQueue.length - 1].src = lastToken.text;
            } else {
              tokens.push(token);
            }
            continue;
          }
          if (token = this.tokenizer.fences(src2)) {
            src2 = src2.substring(token.raw.length);
            tokens.push(token);
            continue;
          }
          if (token = this.tokenizer.heading(src2)) {
            src2 = src2.substring(token.raw.length);
            tokens.push(token);
            continue;
          }
          if (token = this.tokenizer.hr(src2)) {
            src2 = src2.substring(token.raw.length);
            tokens.push(token);
            continue;
          }
          if (token = this.tokenizer.blockquote(src2)) {
            src2 = src2.substring(token.raw.length);
            tokens.push(token);
            continue;
          }
          if (token = this.tokenizer.list(src2)) {
            src2 = src2.substring(token.raw.length);
            tokens.push(token);
            continue;
          }
          if (token = this.tokenizer.html(src2)) {
            src2 = src2.substring(token.raw.length);
            tokens.push(token);
            continue;
          }
          if (token = this.tokenizer.def(src2)) {
            src2 = src2.substring(token.raw.length);
            lastToken = tokens[tokens.length - 1];
            if (lastToken && (lastToken.type === "paragraph" || lastToken.type === "text")) {
              lastToken.raw += "\n" + token.raw;
              lastToken.text += "\n" + token.raw;
              this.inlineQueue[this.inlineQueue.length - 1].src = lastToken.text;
            } else if (!this.tokens.links[token.tag]) {
              this.tokens.links[token.tag] = {
                href: token.href,
                title: token.title
              };
            }
            continue;
          }
          if (token = this.tokenizer.table(src2)) {
            src2 = src2.substring(token.raw.length);
            tokens.push(token);
            continue;
          }
          if (token = this.tokenizer.lheading(src2)) {
            src2 = src2.substring(token.raw.length);
            tokens.push(token);
            continue;
          }
          cutSrc = src2;
          if (this.options.extensions && this.options.extensions.startBlock) {
            let startIndex = Infinity;
            const tempSrc = src2.slice(1);
            let tempStart;
            this.options.extensions.startBlock.forEach((getStartIndex) => {
              tempStart = getStartIndex.call({ lexer: this }, tempSrc);
              if (typeof tempStart === "number" && tempStart >= 0) {
                startIndex = Math.min(startIndex, tempStart);
              }
            });
            if (startIndex < Infinity && startIndex >= 0) {
              cutSrc = src2.substring(0, startIndex + 1);
            }
          }
          if (this.state.top && (token = this.tokenizer.paragraph(cutSrc))) {
            lastToken = tokens[tokens.length - 1];
            if (lastParagraphClipped && lastToken?.type === "paragraph") {
              lastToken.raw += "\n" + token.raw;
              lastToken.text += "\n" + token.text;
              this.inlineQueue.pop();
              this.inlineQueue[this.inlineQueue.length - 1].src = lastToken.text;
            } else {
              tokens.push(token);
            }
            lastParagraphClipped = cutSrc.length !== src2.length;
            src2 = src2.substring(token.raw.length);
            continue;
          }
          if (token = this.tokenizer.text(src2)) {
            src2 = src2.substring(token.raw.length);
            lastToken = tokens[tokens.length - 1];
            if (lastToken && lastToken.type === "text") {
              lastToken.raw += "\n" + token.raw;
              lastToken.text += "\n" + token.text;
              this.inlineQueue.pop();
              this.inlineQueue[this.inlineQueue.length - 1].src = lastToken.text;
            } else {
              tokens.push(token);
            }
            continue;
          }
          if (src2) {
            const errMsg = "Infinite loop on byte: " + src2.charCodeAt(0);
            if (this.options.silent) {
              console.error(errMsg);
              break;
            } else {
              throw new Error(errMsg);
            }
          }
        }
        this.state.top = true;
        return tokens;
      }
      inline(src2, tokens = []) {
        this.inlineQueue.push({ src: src2, tokens });
        return tokens;
      }
      inlineTokens(src2, tokens = []) {
        let token, lastToken, cutSrc;
        let maskedSrc = src2;
        let match;
        let keepPrevChar, prevChar;
        if (this.tokens.links) {
          const links = Object.keys(this.tokens.links);
          if (links.length > 0) {
            while ((match = this.tokenizer.rules.inline.reflinkSearch.exec(maskedSrc)) != null) {
              if (links.includes(match[0].slice(match[0].lastIndexOf("[") + 1, -1))) {
                maskedSrc = maskedSrc.slice(0, match.index) + "[" + "a".repeat(match[0].length - 2) + "]" + maskedSrc.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex);
              }
            }
          }
        }
        while ((match = this.tokenizer.rules.inline.blockSkip.exec(maskedSrc)) != null) {
          maskedSrc = maskedSrc.slice(0, match.index) + "[" + "a".repeat(match[0].length - 2) + "]" + maskedSrc.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);
        }
        while ((match = this.tokenizer.rules.inline.anyPunctuation.exec(maskedSrc)) != null) {
          maskedSrc = maskedSrc.slice(0, match.index) + "++" + maskedSrc.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);
        }
        while (src2) {
          if (!keepPrevChar) {
            prevChar = "";
          }
          keepPrevChar = false;
          if (this.options.extensions && this.options.extensions.inline && this.options.extensions.inline.some((extTokenizer) => {
            if (token = extTokenizer.call({ lexer: this }, src2, tokens)) {
              src2 = src2.substring(token.raw.length);
              tokens.push(token);
              return true;
            }
            return false;
          })) {
            continue;
          }
          if (token = this.tokenizer.escape(src2)) {
            src2 = src2.substring(token.raw.length);
            tokens.push(token);
            continue;
          }
          if (token = this.tokenizer.tag(src2)) {
            src2 = src2.substring(token.raw.length);
            lastToken = tokens[tokens.length - 1];
            if (lastToken && token.type === "text" && lastToken.type === "text") {
              lastToken.raw += token.raw;
              lastToken.text += token.text;
            } else {
              tokens.push(token);
            }
            continue;
          }
          if (token = this.tokenizer.link(src2)) {
            src2 = src2.substring(token.raw.length);
            tokens.push(token);
            continue;
          }
          if (token = this.tokenizer.reflink(src2, this.tokens.links)) {
            src2 = src2.substring(token.raw.length);
            lastToken = tokens[tokens.length - 1];
            if (lastToken && token.type === "text" && lastToken.type === "text") {
              lastToken.raw += token.raw;
              lastToken.text += token.text;
            } else {
              tokens.push(token);
            }
            continue;
          }
          if (token = this.tokenizer.emStrong(src2, maskedSrc, prevChar)) {
            src2 = src2.substring(token.raw.length);
            tokens.push(token);
            continue;
          }
          if (token = this.tokenizer.codespan(src2)) {
            src2 = src2.substring(token.raw.length);
            tokens.push(token);
            continue;
          }
          if (token = this.tokenizer.br(src2)) {
            src2 = src2.substring(token.raw.length);
            tokens.push(token);
            continue;
          }
          if (token = this.tokenizer.del(src2)) {
            src2 = src2.substring(token.raw.length);
            tokens.push(token);
            continue;
          }
          if (token = this.tokenizer.autolink(src2)) {
            src2 = src2.substring(token.raw.length);
            tokens.push(token);
            continue;
          }
          if (!this.state.inLink && (token = this.tokenizer.url(src2))) {
            src2 = src2.substring(token.raw.length);
            tokens.push(token);
            continue;
          }
          cutSrc = src2;
          if (this.options.extensions && this.options.extensions.startInline) {
            let startIndex = Infinity;
            const tempSrc = src2.slice(1);
            let tempStart;
            this.options.extensions.startInline.forEach((getStartIndex) => {
              tempStart = getStartIndex.call({ lexer: this }, tempSrc);
              if (typeof tempStart === "number" && tempStart >= 0) {
                startIndex = Math.min(startIndex, tempStart);
              }
            });
            if (startIndex < Infinity && startIndex >= 0) {
              cutSrc = src2.substring(0, startIndex + 1);
            }
          }
          if (token = this.tokenizer.inlineText(cutSrc)) {
            src2 = src2.substring(token.raw.length);
            if (token.raw.slice(-1) !== "_") {
              prevChar = token.raw.slice(-1);
            }
            keepPrevChar = true;
            lastToken = tokens[tokens.length - 1];
            if (lastToken && lastToken.type === "text") {
              lastToken.raw += token.raw;
              lastToken.text += token.text;
            } else {
              tokens.push(token);
            }
            continue;
          }
          if (src2) {
            const errMsg = "Infinite loop on byte: " + src2.charCodeAt(0);
            if (this.options.silent) {
              console.error(errMsg);
              break;
            } else {
              throw new Error(errMsg);
            }
          }
        }
        return tokens;
      }
    };
    _Renderer = class {
      options;
      parser;
      constructor(options2) {
        this.options = options2 || _defaults;
      }
      space(token) {
        return "";
      }
      code({ text, lang, escaped }) {
        const langString = (lang || "").match(/^\S*/)?.[0];
        const code2 = text.replace(/\n$/, "") + "\n";
        if (!langString) {
          return "<pre><code>" + (escaped ? code2 : escape$1(code2, true)) + "</code></pre>\n";
        }
        return '<pre><code class="language-' + escape$1(langString) + '">' + (escaped ? code2 : escape$1(code2, true)) + "</code></pre>\n";
      }
      blockquote({ tokens }) {
        const body = this.parser.parse(tokens);
        return `<blockquote>
${body}</blockquote>
`;
      }
      html({ text }) {
        return text;
      }
      heading({ tokens, depth }) {
        return `<h${depth}>${this.parser.parseInline(tokens)}</h${depth}>
`;
      }
      hr(token) {
        return "<hr>\n";
      }
      list(token) {
        const ordered = token.ordered;
        const start = token.start;
        let body = "";
        for (let j = 0; j < token.items.length; j++) {
          const item = token.items[j];
          body += this.listitem(item);
        }
        const type2 = ordered ? "ol" : "ul";
        const startAttr = ordered && start !== 1 ? ' start="' + start + '"' : "";
        return "<" + type2 + startAttr + ">\n" + body + "</" + type2 + ">\n";
      }
      listitem(item) {
        let itemBody = "";
        if (item.task) {
          const checkbox = this.checkbox({ checked: !!item.checked });
          if (item.loose) {
            if (item.tokens.length > 0 && item.tokens[0].type === "paragraph") {
              item.tokens[0].text = checkbox + " " + item.tokens[0].text;
              if (item.tokens[0].tokens && item.tokens[0].tokens.length > 0 && item.tokens[0].tokens[0].type === "text") {
                item.tokens[0].tokens[0].text = checkbox + " " + item.tokens[0].tokens[0].text;
              }
            } else {
              item.tokens.unshift({
                type: "text",
                raw: checkbox + " ",
                text: checkbox + " "
              });
            }
          } else {
            itemBody += checkbox + " ";
          }
        }
        itemBody += this.parser.parse(item.tokens, !!item.loose);
        return `<li>${itemBody}</li>
`;
      }
      checkbox({ checked }) {
        return "<input " + (checked ? 'checked="" ' : "") + 'disabled="" type="checkbox">';
      }
      paragraph({ tokens }) {
        return `<p>${this.parser.parseInline(tokens)}</p>
`;
      }
      table(token) {
        let header = "";
        let cell = "";
        for (let j = 0; j < token.header.length; j++) {
          cell += this.tablecell(token.header[j]);
        }
        header += this.tablerow({ text: cell });
        let body = "";
        for (let j = 0; j < token.rows.length; j++) {
          const row = token.rows[j];
          cell = "";
          for (let k = 0; k < row.length; k++) {
            cell += this.tablecell(row[k]);
          }
          body += this.tablerow({ text: cell });
        }
        if (body)
          body = `<tbody>${body}</tbody>`;
        return "<table>\n<thead>\n" + header + "</thead>\n" + body + "</table>\n";
      }
      tablerow({ text }) {
        return `<tr>
${text}</tr>
`;
      }
      tablecell(token) {
        const content = this.parser.parseInline(token.tokens);
        const type2 = token.header ? "th" : "td";
        const tag2 = token.align ? `<${type2} align="${token.align}">` : `<${type2}>`;
        return tag2 + content + `</${type2}>
`;
      }
      strong({ tokens }) {
        return `<strong>${this.parser.parseInline(tokens)}</strong>`;
      }
      em({ tokens }) {
        return `<em>${this.parser.parseInline(tokens)}</em>`;
      }
      codespan({ text }) {
        return `<code>${text}</code>`;
      }
      br(token) {
        return "<br>";
      }
      del({ tokens }) {
        return `<del>${this.parser.parseInline(tokens)}</del>`;
      }
      link({ href, title: title2, tokens }) {
        const text = this.parser.parseInline(tokens);
        const cleanHref = cleanUrl(href);
        if (cleanHref === null) {
          return text;
        }
        href = cleanHref;
        let out = '<a href="' + href + '"';
        if (title2) {
          out += ' title="' + title2 + '"';
        }
        out += ">" + text + "</a>";
        return out;
      }
      image({ href, title: title2, text }) {
        const cleanHref = cleanUrl(href);
        if (cleanHref === null) {
          return text;
        }
        href = cleanHref;
        let out = `<img src="${href}" alt="${text}"`;
        if (title2) {
          out += ` title="${title2}"`;
        }
        out += ">";
        return out;
      }
      text(token) {
        return "tokens" in token && token.tokens ? this.parser.parseInline(token.tokens) : token.text;
      }
    };
    _TextRenderer = class {
      strong({ text }) {
        return text;
      }
      em({ text }) {
        return text;
      }
      codespan({ text }) {
        return text;
      }
      del({ text }) {
        return text;
      }
      html({ text }) {
        return text;
      }
      text({ text }) {
        return text;
      }
      link({ text }) {
        return "" + text;
      }
      image({ text }) {
        return "" + text;
      }
      br() {
        return "";
      }
    };
    _Parser = class __Parser {
      options;
      renderer;
      textRenderer;
      constructor(options2) {
        this.options = options2 || _defaults;
        this.options.renderer = this.options.renderer || new _Renderer();
        this.renderer = this.options.renderer;
        this.renderer.options = this.options;
        this.renderer.parser = this;
        this.textRenderer = new _TextRenderer();
      }
      static parse(tokens, options2) {
        const parser2 = new __Parser(options2);
        return parser2.parse(tokens);
      }
      static parseInline(tokens, options2) {
        const parser2 = new __Parser(options2);
        return parser2.parseInline(tokens);
      }
      parse(tokens, top2 = true) {
        let out = "";
        for (let i = 0; i < tokens.length; i++) {
          const anyToken = tokens[i];
          if (this.options.extensions && this.options.extensions.renderers && this.options.extensions.renderers[anyToken.type]) {
            const genericToken = anyToken;
            const ret = this.options.extensions.renderers[genericToken.type].call({ parser: this }, genericToken);
            if (ret !== false || !["space", "hr", "heading", "code", "table", "blockquote", "list", "html", "paragraph", "text"].includes(genericToken.type)) {
              out += ret || "";
              continue;
            }
          }
          const token = anyToken;
          switch (token.type) {
            case "space": {
              out += this.renderer.space(token);
              continue;
            }
            case "hr": {
              out += this.renderer.hr(token);
              continue;
            }
            case "heading": {
              out += this.renderer.heading(token);
              continue;
            }
            case "code": {
              out += this.renderer.code(token);
              continue;
            }
            case "table": {
              out += this.renderer.table(token);
              continue;
            }
            case "blockquote": {
              out += this.renderer.blockquote(token);
              continue;
            }
            case "list": {
              out += this.renderer.list(token);
              continue;
            }
            case "html": {
              out += this.renderer.html(token);
              continue;
            }
            case "paragraph": {
              out += this.renderer.paragraph(token);
              continue;
            }
            case "text": {
              let textToken = token;
              let body = this.renderer.text(textToken);
              while (i + 1 < tokens.length && tokens[i + 1].type === "text") {
                textToken = tokens[++i];
                body += "\n" + this.renderer.text(textToken);
              }
              if (top2) {
                out += this.renderer.paragraph({
                  type: "paragraph",
                  raw: body,
                  text: body,
                  tokens: [{ type: "text", raw: body, text: body }]
                });
              } else {
                out += body;
              }
              continue;
            }
            default: {
              const errMsg = 'Token with "' + token.type + '" type was not found.';
              if (this.options.silent) {
                console.error(errMsg);
                return "";
              } else {
                throw new Error(errMsg);
              }
            }
          }
        }
        return out;
      }
      parseInline(tokens, renderer) {
        renderer = renderer || this.renderer;
        let out = "";
        for (let i = 0; i < tokens.length; i++) {
          const anyToken = tokens[i];
          if (this.options.extensions && this.options.extensions.renderers && this.options.extensions.renderers[anyToken.type]) {
            const ret = this.options.extensions.renderers[anyToken.type].call({ parser: this }, anyToken);
            if (ret !== false || !["escape", "html", "link", "image", "strong", "em", "codespan", "br", "del", "text"].includes(anyToken.type)) {
              out += ret || "";
              continue;
            }
          }
          const token = anyToken;
          switch (token.type) {
            case "escape": {
              out += renderer.text(token);
              break;
            }
            case "html": {
              out += renderer.html(token);
              break;
            }
            case "link": {
              out += renderer.link(token);
              break;
            }
            case "image": {
              out += renderer.image(token);
              break;
            }
            case "strong": {
              out += renderer.strong(token);
              break;
            }
            case "em": {
              out += renderer.em(token);
              break;
            }
            case "codespan": {
              out += renderer.codespan(token);
              break;
            }
            case "br": {
              out += renderer.br(token);
              break;
            }
            case "del": {
              out += renderer.del(token);
              break;
            }
            case "text": {
              out += renderer.text(token);
              break;
            }
            default: {
              const errMsg = 'Token with "' + token.type + '" type was not found.';
              if (this.options.silent) {
                console.error(errMsg);
                return "";
              } else {
                throw new Error(errMsg);
              }
            }
          }
        }
        return out;
      }
    };
    _Hooks = class {
      options;
      constructor(options2) {
        this.options = options2 || _defaults;
      }
      static passThroughHooks = /* @__PURE__ */ new Set([
        "preprocess",
        "postprocess",
        "processAllTokens"
      ]);
      preprocess(markdown) {
        return markdown;
      }
      postprocess(html2) {
        return html2;
      }
      processAllTokens(tokens) {
        return tokens;
      }
    };
    Marked = class {
      defaults = _getDefaults();
      options = this.setOptions;
      parse = this.#parseMarkdown(_Lexer.lex, _Parser.parse);
      parseInline = this.#parseMarkdown(_Lexer.lexInline, _Parser.parseInline);
      Parser = _Parser;
      Renderer = _Renderer;
      TextRenderer = _TextRenderer;
      Lexer = _Lexer;
      Tokenizer = _Tokenizer;
      Hooks = _Hooks;
      constructor(...args2) {
        this.use(...args2);
      }
      walkTokens(tokens, callback) {
        let values = [];
        for (const token of tokens) {
          values = values.concat(callback.call(this, token));
          switch (token.type) {
            case "table": {
              const tableToken = token;
              for (const cell of tableToken.header) {
                values = values.concat(this.walkTokens(cell.tokens, callback));
              }
              for (const row of tableToken.rows) {
                for (const cell of row) {
                  values = values.concat(this.walkTokens(cell.tokens, callback));
                }
              }
              break;
            }
            case "list": {
              const listToken = token;
              values = values.concat(this.walkTokens(listToken.items, callback));
              break;
            }
            default: {
              const genericToken = token;
              if (this.defaults.extensions?.childTokens?.[genericToken.type]) {
                this.defaults.extensions.childTokens[genericToken.type].forEach((childTokens) => {
                  const tokens2 = genericToken[childTokens].flat(Infinity);
                  values = values.concat(this.walkTokens(tokens2, callback));
                });
              } else if (genericToken.tokens) {
                values = values.concat(this.walkTokens(genericToken.tokens, callback));
              }
            }
          }
        }
        return values;
      }
      use(...args2) {
        const extensions = this.defaults.extensions || { renderers: {}, childTokens: {} };
        args2.forEach((pack) => {
          const opts = { ...pack };
          opts.async = this.defaults.async || opts.async || false;
          if (pack.extensions) {
            pack.extensions.forEach((ext) => {
              if (!ext.name) {
                throw new Error("extension name required");
              }
              if ("renderer" in ext) {
                const prevRenderer = extensions.renderers[ext.name];
                if (prevRenderer) {
                  extensions.renderers[ext.name] = function(...args3) {
                    let ret = ext.renderer.apply(this, args3);
                    if (ret === false) {
                      ret = prevRenderer.apply(this, args3);
                    }
                    return ret;
                  };
                } else {
                  extensions.renderers[ext.name] = ext.renderer;
                }
              }
              if ("tokenizer" in ext) {
                if (!ext.level || ext.level !== "block" && ext.level !== "inline") {
                  throw new Error("extension level must be 'block' or 'inline'");
                }
                const extLevel = extensions[ext.level];
                if (extLevel) {
                  extLevel.unshift(ext.tokenizer);
                } else {
                  extensions[ext.level] = [ext.tokenizer];
                }
                if (ext.start) {
                  if (ext.level === "block") {
                    if (extensions.startBlock) {
                      extensions.startBlock.push(ext.start);
                    } else {
                      extensions.startBlock = [ext.start];
                    }
                  } else if (ext.level === "inline") {
                    if (extensions.startInline) {
                      extensions.startInline.push(ext.start);
                    } else {
                      extensions.startInline = [ext.start];
                    }
                  }
                }
              }
              if ("childTokens" in ext && ext.childTokens) {
                extensions.childTokens[ext.name] = ext.childTokens;
              }
            });
            opts.extensions = extensions;
          }
          if (pack.renderer) {
            const renderer = this.defaults.renderer || new _Renderer(this.defaults);
            for (const prop in pack.renderer) {
              if (!(prop in renderer)) {
                throw new Error(`renderer '${prop}' does not exist`);
              }
              if (["options", "parser"].includes(prop)) {
                continue;
              }
              const rendererProp = prop;
              let rendererFunc = pack.renderer[rendererProp];
              const prevRenderer = renderer[rendererProp];
              renderer[rendererProp] = (...args3) => {
                if (!pack.useNewRenderer) {
                  rendererFunc = this.#convertRendererFunction(rendererFunc, rendererProp, renderer);
                }
                let ret = rendererFunc.apply(renderer, args3);
                if (ret === false) {
                  ret = prevRenderer.apply(renderer, args3);
                }
                return ret || "";
              };
            }
            opts.renderer = renderer;
          }
          if (pack.tokenizer) {
            const tokenizer = this.defaults.tokenizer || new _Tokenizer(this.defaults);
            for (const prop in pack.tokenizer) {
              if (!(prop in tokenizer)) {
                throw new Error(`tokenizer '${prop}' does not exist`);
              }
              if (["options", "rules", "lexer"].includes(prop)) {
                continue;
              }
              const tokenizerProp = prop;
              const tokenizerFunc = pack.tokenizer[tokenizerProp];
              const prevTokenizer = tokenizer[tokenizerProp];
              tokenizer[tokenizerProp] = (...args3) => {
                let ret = tokenizerFunc.apply(tokenizer, args3);
                if (ret === false) {
                  ret = prevTokenizer.apply(tokenizer, args3);
                }
                return ret;
              };
            }
            opts.tokenizer = tokenizer;
          }
          if (pack.hooks) {
            const hooks = this.defaults.hooks || new _Hooks();
            for (const prop in pack.hooks) {
              if (!(prop in hooks)) {
                throw new Error(`hook '${prop}' does not exist`);
              }
              if (prop === "options") {
                continue;
              }
              const hooksProp = prop;
              const hooksFunc = pack.hooks[hooksProp];
              const prevHook = hooks[hooksProp];
              if (_Hooks.passThroughHooks.has(prop)) {
                hooks[hooksProp] = (arg) => {
                  if (this.defaults.async) {
                    return Promise.resolve(hooksFunc.call(hooks, arg)).then((ret2) => {
                      return prevHook.call(hooks, ret2);
                    });
                  }
                  const ret = hooksFunc.call(hooks, arg);
                  return prevHook.call(hooks, ret);
                };
              } else {
                hooks[hooksProp] = (...args3) => {
                  let ret = hooksFunc.apply(hooks, args3);
                  if (ret === false) {
                    ret = prevHook.apply(hooks, args3);
                  }
                  return ret;
                };
              }
            }
            opts.hooks = hooks;
          }
          if (pack.walkTokens) {
            const walkTokens2 = this.defaults.walkTokens;
            const packWalktokens = pack.walkTokens;
            opts.walkTokens = function(token) {
              let values = [];
              values.push(packWalktokens.call(this, token));
              if (walkTokens2) {
                values = values.concat(walkTokens2.call(this, token));
              }
              return values;
            };
          }
          this.defaults = { ...this.defaults, ...opts };
        });
        return this;
      }
      #convertRendererFunction(func, prop, renderer) {
        switch (prop) {
          case "heading":
            return function(token) {
              if (!token.type || token.type !== prop) {
                return func.apply(this, arguments);
              }
              return func.call(this, renderer.parser.parseInline(token.tokens), token.depth, unescape$1(renderer.parser.parseInline(token.tokens, renderer.parser.textRenderer)));
            };
          case "code":
            return function(token) {
              if (!token.type || token.type !== prop) {
                return func.apply(this, arguments);
              }
              return func.call(this, token.text, token.lang, !!token.escaped);
            };
          case "table":
            return function(token) {
              if (!token.type || token.type !== prop) {
                return func.apply(this, arguments);
              }
              let header = "";
              let cell = "";
              for (let j = 0; j < token.header.length; j++) {
                cell += this.tablecell({
                  text: token.header[j].text,
                  tokens: token.header[j].tokens,
                  header: true,
                  align: token.align[j]
                });
              }
              header += this.tablerow({ text: cell });
              let body = "";
              for (let j = 0; j < token.rows.length; j++) {
                const row = token.rows[j];
                cell = "";
                for (let k = 0; k < row.length; k++) {
                  cell += this.tablecell({
                    text: row[k].text,
                    tokens: row[k].tokens,
                    header: false,
                    align: token.align[k]
                  });
                }
                body += this.tablerow({ text: cell });
              }
              return func.call(this, header, body);
            };
          case "blockquote":
            return function(token) {
              if (!token.type || token.type !== prop) {
                return func.apply(this, arguments);
              }
              const body = this.parser.parse(token.tokens);
              return func.call(this, body);
            };
          case "list":
            return function(token) {
              if (!token.type || token.type !== prop) {
                return func.apply(this, arguments);
              }
              const ordered = token.ordered;
              const start = token.start;
              const loose = token.loose;
              let body = "";
              for (let j = 0; j < token.items.length; j++) {
                const item = token.items[j];
                const checked = item.checked;
                const task = item.task;
                let itemBody = "";
                if (item.task) {
                  const checkbox = this.checkbox({ checked: !!checked });
                  if (loose) {
                    if (item.tokens.length > 0 && item.tokens[0].type === "paragraph") {
                      item.tokens[0].text = checkbox + " " + item.tokens[0].text;
                      if (item.tokens[0].tokens && item.tokens[0].tokens.length > 0 && item.tokens[0].tokens[0].type === "text") {
                        item.tokens[0].tokens[0].text = checkbox + " " + item.tokens[0].tokens[0].text;
                      }
                    } else {
                      item.tokens.unshift({
                        type: "text",
                        text: checkbox + " "
                      });
                    }
                  } else {
                    itemBody += checkbox + " ";
                  }
                }
                itemBody += this.parser.parse(item.tokens, loose);
                body += this.listitem({
                  type: "list_item",
                  raw: itemBody,
                  text: itemBody,
                  task,
                  checked: !!checked,
                  loose,
                  tokens: item.tokens
                });
              }
              return func.call(this, body, ordered, start);
            };
          case "html":
            return function(token) {
              if (!token.type || token.type !== prop) {
                return func.apply(this, arguments);
              }
              return func.call(this, token.text, token.block);
            };
          case "paragraph":
            return function(token) {
              if (!token.type || token.type !== prop) {
                return func.apply(this, arguments);
              }
              return func.call(this, this.parser.parseInline(token.tokens));
            };
          case "escape":
            return function(token) {
              if (!token.type || token.type !== prop) {
                return func.apply(this, arguments);
              }
              return func.call(this, token.text);
            };
          case "link":
            return function(token) {
              if (!token.type || token.type !== prop) {
                return func.apply(this, arguments);
              }
              return func.call(this, token.href, token.title, this.parser.parseInline(token.tokens));
            };
          case "image":
            return function(token) {
              if (!token.type || token.type !== prop) {
                return func.apply(this, arguments);
              }
              return func.call(this, token.href, token.title, token.text);
            };
          case "strong":
            return function(token) {
              if (!token.type || token.type !== prop) {
                return func.apply(this, arguments);
              }
              return func.call(this, this.parser.parseInline(token.tokens));
            };
          case "em":
            return function(token) {
              if (!token.type || token.type !== prop) {
                return func.apply(this, arguments);
              }
              return func.call(this, this.parser.parseInline(token.tokens));
            };
          case "codespan":
            return function(token) {
              if (!token.type || token.type !== prop) {
                return func.apply(this, arguments);
              }
              return func.call(this, token.text);
            };
          case "del":
            return function(token) {
              if (!token.type || token.type !== prop) {
                return func.apply(this, arguments);
              }
              return func.call(this, this.parser.parseInline(token.tokens));
            };
          case "text":
            return function(token) {
              if (!token.type || token.type !== prop) {
                return func.apply(this, arguments);
              }
              return func.call(this, token.text);
            };
        }
        return func;
      }
      setOptions(opt) {
        this.defaults = { ...this.defaults, ...opt };
        return this;
      }
      lexer(src2, options2) {
        return _Lexer.lex(src2, options2 ?? this.defaults);
      }
      parser(tokens, options2) {
        return _Parser.parse(tokens, options2 ?? this.defaults);
      }
      #parseMarkdown(lexer2, parser2) {
        return (src2, options2) => {
          const origOpt = { ...options2 };
          const opt = { ...this.defaults, ...origOpt };
          if (this.defaults.async === true && origOpt.async === false) {
            if (!opt.silent) {
              console.warn("marked(): The async option was set to true by an extension. The async: false option sent to parse will be ignored.");
            }
            opt.async = true;
          }
          const throwError = this.#onError(!!opt.silent, !!opt.async);
          if (typeof src2 === "undefined" || src2 === null) {
            return throwError(new Error("marked(): input parameter is undefined or null"));
          }
          if (typeof src2 !== "string") {
            return throwError(new Error("marked(): input parameter is of type " + Object.prototype.toString.call(src2) + ", string expected"));
          }
          if (opt.hooks) {
            opt.hooks.options = opt;
          }
          if (opt.async) {
            return Promise.resolve(opt.hooks ? opt.hooks.preprocess(src2) : src2).then((src3) => lexer2(src3, opt)).then((tokens) => opt.hooks ? opt.hooks.processAllTokens(tokens) : tokens).then((tokens) => opt.walkTokens ? Promise.all(this.walkTokens(tokens, opt.walkTokens)).then(() => tokens) : tokens).then((tokens) => parser2(tokens, opt)).then((html2) => opt.hooks ? opt.hooks.postprocess(html2) : html2).catch(throwError);
          }
          try {
            if (opt.hooks) {
              src2 = opt.hooks.preprocess(src2);
            }
            let tokens = lexer2(src2, opt);
            if (opt.hooks) {
              tokens = opt.hooks.processAllTokens(tokens);
            }
            if (opt.walkTokens) {
              this.walkTokens(tokens, opt.walkTokens);
            }
            let html2 = parser2(tokens, opt);
            if (opt.hooks) {
              html2 = opt.hooks.postprocess(html2);
            }
            return html2;
          } catch (e) {
            return throwError(e);
          }
        };
      }
      #onError(silent, async2) {
        return (e) => {
          e.message += "\nPlease report this to https://github.com/markedjs/marked.";
          if (silent) {
            const msg = "<p>An error occurred:</p><pre>" + escape$1(e.message + "", true) + "</pre>";
            if (async2) {
              return Promise.resolve(msg);
            }
            return msg;
          }
          if (async2) {
            return Promise.reject(e);
          }
          throw e;
        };
      }
    };
    markedInstance = new Marked();
    marked$1.options = marked$1.setOptions = function(options2) {
      markedInstance.setOptions(options2);
      marked$1.defaults = markedInstance.defaults;
      changeDefaults(marked$1.defaults);
      return marked$1;
    };
    marked$1.getDefaults = _getDefaults;
    marked$1.defaults = _defaults;
    marked$1.use = function(...args2) {
      markedInstance.use(...args2);
      marked$1.defaults = markedInstance.defaults;
      changeDefaults(marked$1.defaults);
      return marked$1;
    };
    marked$1.walkTokens = function(tokens, callback) {
      return markedInstance.walkTokens(tokens, callback);
    };
    marked$1.parseInline = markedInstance.parseInline;
    marked$1.Parser = _Parser;
    marked$1.parser = _Parser.parse;
    marked$1.Renderer = _Renderer;
    marked$1.TextRenderer = _TextRenderer;
    marked$1.Lexer = _Lexer;
    marked$1.lexer = _Lexer.lex;
    marked$1.Tokenizer = _Tokenizer;
    marked$1.Hooks = _Hooks;
    marked$1.parse = marked$1;
    options = marked$1.options;
    setOptions = marked$1.setOptions;
    use = marked$1.use;
    walkTokens = marked$1.walkTokens;
    parseInline = marked$1.parseInline;
    parse = marked$1;
    parser = _Parser.parse;
    lexer = _Lexer.lex;
    marked_esm = /* @__PURE__ */ Object.freeze({
      __proto__: null,
      Hooks: _Hooks,
      Lexer: _Lexer,
      Marked,
      Parser: _Parser,
      Renderer: _Renderer,
      TextRenderer: _TextRenderer,
      Tokenizer: _Tokenizer,
      get defaults() {
        return _defaults;
      },
      getDefaults: _getDefaults,
      lexer,
      marked: marked$1,
      options,
      parse,
      parseInline,
      parser,
      setOptions,
      use,
      walkTokens
    });
    marked = /* @__PURE__ */ Object.freeze({
      __proto__: null,
      Marked: marked_esm
    });
    validPlaceholderMatchPattern = /\{(PLACEHOLDER_[a-zA-Z][a-zA-Z0-9]*)\}/g;
    validPlaceholderNamePattern = /PLACEHOLDER_[a-zA-Z][a-zA-Z0-9]*/;
    MarkdownIssueDescription = /* @__PURE__ */ Object.freeze({
      __proto__: null,
      createIssueDescriptionFromMarkdown,
      createIssueDescriptionFromRawMarkdown,
      findTitleFromMarkdownAst,
      getFileContent,
      getIssueTitleFromMarkdownDescription,
      getMarkdownFileContent,
      resolveLazyDescription,
      substitutePlaceholders
    });
    UIStrings$k = {
      contentSecurityPolicySource: "Content Security Policy - Source Allowlists",
      contentSecurityPolicyInlineCode: "Content Security Policy - Inline Code",
      contentSecurityPolicyEval: "Content Security Policy - Eval",
      trustedTypesFixViolations: "Trusted Types - Fix violations",
      trustedTypesPolicyViolation: "Trusted Types - Policy violation"
    };
    str_$j = registerUIStrings("models/issues_manager/ContentSecurityPolicyIssue.ts", UIStrings$k);
    i18nLazyString$a = getLazilyComputedLocalizedString.bind(void 0, str_$j);
    ContentSecurityPolicyIssue = class _ContentSecurityPolicyIssue extends Issue {
      constructor(issueDetails, issuesModel, issueId) {
        const issueCode = [
          "ContentSecurityPolicyIssue",
          issueDetails.contentSecurityPolicyViolationType
        ].join("::");
        super(issueCode, issueDetails, issuesModel, issueId);
      }
      getCategory() {
        return "ContentSecurityPolicy";
      }
      primaryKey() {
        return JSON.stringify(this.details(), [
          "blockedURL",
          "contentSecurityPolicyViolationType",
          "violatedDirective",
          "isReportOnly",
          "sourceCodeLocation",
          "url",
          "lineNumber",
          "columnNumber",
          "violatingNodeId"
        ]);
      }
      getDescription() {
        const description2 = issueDescriptions$7.get(this.details().contentSecurityPolicyViolationType);
        if (!description2) {
          return null;
        }
        return resolveLazyDescription(description2);
      }
      getKind() {
        if (this.details().isReportOnly) {
          return "Improvement";
        }
        return "PageError";
      }
      static fromInspectorIssue(issuesModel, inspectorIssue) {
        const cspDetails = inspectorIssue.details.contentSecurityPolicyIssueDetails;
        if (!cspDetails) {
          console.warn("Content security policy issue without details received.");
          return [];
        }
        return [new _ContentSecurityPolicyIssue(cspDetails, issuesModel, inspectorIssue.issueId)];
      }
    };
    cspURLViolation = {
      file: "cspURLViolation.md",
      links: [{
        link: "https://developers.google.com/web/fundamentals/security/csp#source_allowlists",
        linkTitle: i18nLazyString$a(UIStrings$k.contentSecurityPolicySource)
      }]
    };
    cspInlineViolation = {
      file: "cspInlineViolation.md",
      links: [{
        link: "https://developers.google.com/web/fundamentals/security/csp#inline_code_is_considered_harmful",
        linkTitle: i18nLazyString$a(UIStrings$k.contentSecurityPolicyInlineCode)
      }]
    };
    cspEvalViolation = {
      file: "cspEvalViolation.md",
      links: [{
        link: "https://developers.google.com/web/fundamentals/security/csp#eval_too",
        linkTitle: i18nLazyString$a(UIStrings$k.contentSecurityPolicyEval)
      }]
    };
    cspTrustedTypesSinkViolation = {
      file: "cspTrustedTypesSinkViolation.md",
      links: [{
        link: "https://web.dev/trusted-types/#fix-the-violations",
        linkTitle: i18nLazyString$a(UIStrings$k.trustedTypesFixViolations)
      }]
    };
    cspTrustedTypesPolicyViolation = {
      file: "cspTrustedTypesPolicyViolation.md",
      links: [{ link: "https://web.dev/trusted-types/", linkTitle: i18nLazyString$a(UIStrings$k.trustedTypesPolicyViolation) }]
    };
    trustedTypesSinkViolationCode = [
      "ContentSecurityPolicyIssue",
      "kTrustedTypesSinkViolation"
    ].join("::");
    trustedTypesPolicyViolationCode = [
      "ContentSecurityPolicyIssue",
      "kTrustedTypesPolicyViolation"
    ].join("::");
    issueDescriptions$7 = /* @__PURE__ */ new Map([
      ["kURLViolation", cspURLViolation],
      ["kInlineViolation", cspInlineViolation],
      ["kEvalViolation", cspEvalViolation],
      ["kTrustedTypesSinkViolation", cspTrustedTypesSinkViolation],
      ["kTrustedTypesPolicyViolation", cspTrustedTypesPolicyViolation]
    ]);
    UIStrings$j = {
      thirdPartyPhaseoutExplained: "Changes to Chrome's treatment of third-party cookies"
    };
    str_$i = registerUIStrings("models/issues_manager/CookieDeprecationMetadataIssue.ts", UIStrings$j);
    i18nString$8 = getLocalizedString.bind(void 0, str_$i);
    CookieDeprecationMetadataIssue = class _CookieDeprecationMetadataIssue extends Issue {
      constructor(issueDetails, issuesModel) {
        const issueCode = "CookieDeprecationMetadataIssue_" + issueDetails.operation;
        super(issueCode, issueDetails, issuesModel);
      }
      getCategory() {
        return "Other";
      }
      getDescription() {
        const fileName = this.details().operation === "SetCookie" ? "cookieWarnMetadataGrantSet.md" : "cookieWarnMetadataGrantRead.md";
        let optOutText = "";
        if (this.details().isOptOutTopLevel) {
          optOutText = "\n\n (Top level site opt-out: " + this.details().optOutPercentage + "% - [learn more](gracePeriodStagedControlExplainer))";
        }
        return {
          file: fileName,
          substitutions: /* @__PURE__ */ new Map([
            ["PLACEHOLDER_topleveloptout", optOutText]
          ]),
          links: [
            {
              link: "https://goo.gle/changes-to-chrome-browsing",
              linkTitle: i18nString$8(UIStrings$j.thirdPartyPhaseoutExplained)
            }
          ]
        };
      }
      getKind() {
        return "BreakingChange";
      }
      primaryKey() {
        return JSON.stringify(this.details());
      }
      static fromInspectorIssue(issuesModel, inspectorIssue) {
        const details = inspectorIssue.details.cookieDeprecationMetadataIssueDetails;
        if (!details) {
          console.warn("Cookie deprecation metadata issue without details received.");
          return [];
        }
        return [new _CookieDeprecationMetadataIssue(details, issuesModel)];
      }
    };
    UIStrings$i = {
      samesiteCookiesExplained: "SameSite cookies explained",
      howSchemefulSamesiteWorks: "How Schemeful Same-Site Works",
      fileCrosSiteRedirectBug: "File a bug",
      consoleTpcdErrorMessage: "Third-party cookie is blocked in Chrome either because of Chrome flags or browser configuration."
    };
    str_$h = registerUIStrings("models/issues_manager/CookieIssue.ts", UIStrings$i);
    i18nLazyString$9 = getLazilyComputedLocalizedString.bind(void 0, str_$h);
    CookieIssue = class _CookieIssue extends Issue {
      cookieId() {
        const details = this.details();
        if (details.cookie) {
          const { domain, path: path14, name } = details.cookie;
          const cookieId = `${domain};${path14};${name}`;
          return cookieId;
        }
        return this.details().rawCookieLine ?? "no-cookie-info";
      }
      primaryKey() {
        const details = this.details();
        const requestId = details.request ? details.request.requestId : "no-request";
        return `${this.code()}-(${this.cookieId()})-(${requestId})`;
      }
      static createIssuesFromCookieIssueDetails(cookieIssueDetails, issuesModel, issueId) {
        const issues = [];
        if (cookieIssueDetails.cookieExclusionReasons && cookieIssueDetails.cookieExclusionReasons.length > 0) {
          for (const exclusionReason of cookieIssueDetails.cookieExclusionReasons) {
            const code2 = _CookieIssue.codeForCookieIssueDetails(exclusionReason, cookieIssueDetails.cookieWarningReasons, cookieIssueDetails.operation, cookieIssueDetails.cookieUrl);
            if (code2) {
              issues.push(new _CookieIssue(code2, cookieIssueDetails, issuesModel, issueId));
            }
          }
          return issues;
        }
        if (cookieIssueDetails.cookieWarningReasons) {
          for (const warningReason of cookieIssueDetails.cookieWarningReasons) {
            const code2 = _CookieIssue.codeForCookieIssueDetails(warningReason, [], cookieIssueDetails.operation, cookieIssueDetails.cookieUrl);
            if (code2) {
              issues.push(new _CookieIssue(code2, cookieIssueDetails, issuesModel, issueId));
            }
          }
        }
        return issues;
      }
      static codeForCookieIssueDetails(reason, warningReasons, operation, cookieUrl) {
        const isURLSecure = cookieUrl && (schemeIs2(cookieUrl, "https:") || schemeIs2(cookieUrl, "wss:"));
        const secure = isURLSecure ? "Secure" : "Insecure";
        if (reason === "ExcludeSameSiteStrict" || reason === "ExcludeSameSiteLax" || reason === "ExcludeSameSiteUnspecifiedTreatedAsLax") {
          if (warningReasons && warningReasons.length > 0) {
            if (warningReasons.includes("WarnSameSiteStrictLaxDowngradeStrict")) {
              return [
                "CookieIssue",
                "ExcludeNavigationContextDowngrade",
                secure
              ].join("::");
            }
            if (warningReasons.includes("WarnSameSiteStrictCrossDowngradeStrict") || warningReasons.includes("WarnSameSiteStrictCrossDowngradeLax") || warningReasons.includes("WarnSameSiteLaxCrossDowngradeStrict") || warningReasons.includes("WarnSameSiteLaxCrossDowngradeLax")) {
              return [
                "CookieIssue",
                "ExcludeContextDowngrade",
                operation,
                secure
              ].join("::");
            }
          }
          if (warningReasons.includes("WarnCrossSiteRedirectDowngradeChangesInclusion")) {
            return [
              "CookieIssue",
              "CrossSiteRedirectDowngradeChangesInclusion"
            ].join("::");
          }
          if (reason === "ExcludeSameSiteUnspecifiedTreatedAsLax") {
            return ["CookieIssue", reason, operation].join("::");
          }
          return null;
        }
        if (reason === "WarnSameSiteStrictLaxDowngradeStrict") {
          return ["CookieIssue", reason, secure].join("::");
        }
        if (reason === "WarnSameSiteStrictCrossDowngradeStrict" || reason === "WarnSameSiteStrictCrossDowngradeLax" || reason === "WarnSameSiteLaxCrossDowngradeLax" || reason === "WarnSameSiteLaxCrossDowngradeStrict") {
          return ["CookieIssue", "WarnCrossDowngrade", operation, secure].join("::");
        }
        if (reason === "ExcludePortMismatch") {
          return ["CookieIssue", "ExcludePortMismatch"].join("::");
        }
        if (reason === "ExcludeSchemeMismatch") {
          return ["CookieIssue", "ExcludeSchemeMismatch"].join("::");
        }
        return ["CookieIssue", reason, operation].join("::");
      }
      cookies() {
        const details = this.details();
        if (details.cookie) {
          return [details.cookie];
        }
        return [];
      }
      rawCookieLines() {
        const details = this.details();
        if (details.rawCookieLine) {
          return [details.rawCookieLine];
        }
        return [];
      }
      requests() {
        const details = this.details();
        if (details.request) {
          return [details.request];
        }
        return [];
      }
      getCategory() {
        return "Cookie";
      }
      getDescription() {
        const description2 = issueDescriptions$6.get(this.code());
        if (!description2) {
          return null;
        }
        return resolveLazyDescription(description2);
      }
      isCausedByThirdParty() {
        const outermostFrame = FrameManager2.instance().getOutermostFrame();
        return isCausedByThirdParty(outermostFrame, this.details().cookieUrl, this.details().siteForCookies);
      }
      getKind() {
        if (this.details().cookieExclusionReasons?.length > 0) {
          return "PageError";
        }
        return "BreakingChange";
      }
      static getCookieStatus(cookieIssueDetails) {
        if (cookieIssueDetails.cookieExclusionReasons.includes("ExcludeThirdPartyPhaseout")) {
          return 0;
        }
        if (cookieIssueDetails.cookieWarningReasons.includes("WarnDeprecationTrialMetadata")) {
          return 2;
        }
        if (cookieIssueDetails.cookieWarningReasons.includes("WarnThirdPartyCookieHeuristic")) {
          return 3;
        }
        if (cookieIssueDetails.cookieWarningReasons.includes("WarnThirdPartyPhaseout")) {
          return 1;
        }
        return;
      }
      static fromInspectorIssue(issuesModel, inspectorIssue) {
        const cookieIssueDetails = inspectorIssue.details.cookieIssueDetails;
        if (!cookieIssueDetails) {
          console.warn("Cookie issue without details received.");
          return [];
        }
        return _CookieIssue.createIssuesFromCookieIssueDetails(cookieIssueDetails, issuesModel, inspectorIssue.issueId);
      }
      static getSubCategory(code2) {
        if (code2.includes("SameSite") || code2.includes("Downgrade")) {
          return "SameSiteCookie";
        }
        if (code2.includes("ThirdPartyPhaseout")) {
          return "ThirdPartyPhaseoutCookie";
        }
        return "GenericCookie";
      }
      static isThirdPartyCookiePhaseoutRelatedIssue(issue2) {
        const excludeFromAggregate = [
          "WarnThirdPartyCookieHeuristic",
          "WarnDeprecationTrialMetadata",
          "WarnThirdPartyPhaseout",
          "ExcludeThirdPartyPhaseout"
        ];
        return excludeFromAggregate.some((exclude) => issue2.code().includes(exclude));
      }
      maybeCreateConsoleMessage() {
        const issuesModel = this.model();
        if (issuesModel && this.code().includes("ExcludeThirdPartyPhaseout")) {
          return new ConsoleMessage2(issuesModel.target().model(RuntimeModel), FrontendMessageSource.ISSUE_PANEL, "warning", UIStrings$i.consoleTpcdErrorMessage, {
            url: this.details().request?.url,
            affectedResources: { requestId: this.details().request?.requestId, issueId: this.issueId }
          });
        }
        return;
      }
    };
    sameSiteUnspecifiedWarnRead = {
      file: "SameSiteUnspecifiedLaxAllowUnsafeRead.md",
      links: [
        {
          link: "https://web.dev/samesite-cookies-explained/",
          linkTitle: i18nLazyString$9(UIStrings$i.samesiteCookiesExplained)
        }
      ]
    };
    sameSiteUnspecifiedWarnSet = {
      file: "SameSiteUnspecifiedLaxAllowUnsafeSet.md",
      links: [
        {
          link: "https://web.dev/samesite-cookies-explained/",
          linkTitle: i18nLazyString$9(UIStrings$i.samesiteCookiesExplained)
        }
      ]
    };
    sameSiteNoneInsecureErrorRead = {
      file: "SameSiteNoneInsecureErrorRead.md",
      links: [
        {
          link: "https://web.dev/samesite-cookies-explained/",
          linkTitle: i18nLazyString$9(UIStrings$i.samesiteCookiesExplained)
        }
      ]
    };
    sameSiteNoneInsecureErrorSet = {
      file: "SameSiteNoneInsecureErrorSet.md",
      links: [
        {
          link: "https://web.dev/samesite-cookies-explained/",
          linkTitle: i18nLazyString$9(UIStrings$i.samesiteCookiesExplained)
        }
      ]
    };
    sameSiteNoneInsecureWarnRead = {
      file: "SameSiteNoneInsecureWarnRead.md",
      links: [
        {
          link: "https://web.dev/samesite-cookies-explained/",
          linkTitle: i18nLazyString$9(UIStrings$i.samesiteCookiesExplained)
        }
      ]
    };
    sameSiteNoneInsecureWarnSet = {
      file: "SameSiteNoneInsecureWarnSet.md",
      links: [
        {
          link: "https://web.dev/samesite-cookies-explained/",
          linkTitle: i18nLazyString$9(UIStrings$i.samesiteCookiesExplained)
        }
      ]
    };
    schemefulSameSiteArticles = [{ link: "https://web.dev/schemeful-samesite/", linkTitle: i18nLazyString$9(UIStrings$i.howSchemefulSamesiteWorks) }];
    attributeValueExceedsMaxSize = {
      file: "CookieAttributeValueExceedsMaxSize.md",
      links: []
    };
    warnDomainNonAscii = {
      file: "cookieWarnDomainNonAscii.md",
      links: []
    };
    excludeDomainNonAscii = {
      file: "cookieExcludeDomainNonAscii.md",
      links: []
    };
    excludeBlockedWithinRelatedWebsiteSet = {
      file: "cookieExcludeBlockedWithinRelatedWebsiteSet.md",
      links: []
    };
    cookieCrossSiteRedirectDowngrade = {
      file: "cookieCrossSiteRedirectDowngrade.md",
      links: [{
        link: "https://bugs.chromium.org/p/chromium/issues/entry?template=Defect%20report%20from%20user&summary=[Cross-Site Redirect Chain] <INSERT BUG SUMMARY HERE>&comment=Chrome Version: (copy from chrome://version)%0AChannel: (e.g. Canary, Dev, Beta, Stable)%0A%0AAffected URLs:%0A%0AWhat is the expected result?%0A%0AWhat happens instead?%0A%0AWhat is the purpose of the cross-site redirect?:%0A%0AWhat steps will reproduce the problem?:%0A(1)%0A(2)%0A(3)%0A%0APlease provide any additional information below.&components=Internals%3ENetwork%3ECookies",
        linkTitle: i18nLazyString$9(UIStrings$i.fileCrosSiteRedirectBug)
      }]
    };
    ExcludePortMismatch = {
      file: "cookieExcludePortMismatch.md",
      links: []
    };
    ExcludeSchemeMismatch = {
      file: "cookieExcludeSchemeMismatch.md",
      links: []
    };
    placeholderDescriptionForInvisibleIssues = {
      file: "placeholderDescriptionForInvisibleIssues.md",
      links: []
    };
    issueDescriptions$6 = /* @__PURE__ */ new Map([
      ["CookieIssue::WarnSameSiteUnspecifiedLaxAllowUnsafe::ReadCookie", sameSiteUnspecifiedWarnRead],
      ["CookieIssue::WarnSameSiteUnspecifiedLaxAllowUnsafe::SetCookie", sameSiteUnspecifiedWarnSet],
      ["CookieIssue::WarnSameSiteUnspecifiedCrossSiteContext::ReadCookie", sameSiteUnspecifiedWarnRead],
      ["CookieIssue::WarnSameSiteUnspecifiedCrossSiteContext::SetCookie", sameSiteUnspecifiedWarnSet],
      ["CookieIssue::ExcludeSameSiteNoneInsecure::ReadCookie", sameSiteNoneInsecureErrorRead],
      ["CookieIssue::ExcludeSameSiteNoneInsecure::SetCookie", sameSiteNoneInsecureErrorSet],
      ["CookieIssue::WarnSameSiteNoneInsecure::ReadCookie", sameSiteNoneInsecureWarnRead],
      ["CookieIssue::WarnSameSiteNoneInsecure::SetCookie", sameSiteNoneInsecureWarnSet],
      ["CookieIssue::WarnSameSiteStrictLaxDowngradeStrict::Secure", sameSiteWarnStrictLaxDowngradeStrict(true)],
      ["CookieIssue::WarnSameSiteStrictLaxDowngradeStrict::Insecure", sameSiteWarnStrictLaxDowngradeStrict(false)],
      ["CookieIssue::WarnCrossDowngrade::ReadCookie::Secure", sameSiteWarnCrossDowngradeRead(true)],
      ["CookieIssue::WarnCrossDowngrade::ReadCookie::Insecure", sameSiteWarnCrossDowngradeRead(false)],
      ["CookieIssue::WarnCrossDowngrade::SetCookie::Secure", sameSiteWarnCrossDowngradeSet(true)],
      ["CookieIssue::WarnCrossDowngrade::SetCookie::Insecure", sameSiteWarnCrossDowngradeSet(false)],
      ["CookieIssue::ExcludeNavigationContextDowngrade::Secure", sameSiteExcludeNavigationContextDowngrade(true)],
      [
        "CookieIssue::ExcludeNavigationContextDowngrade::Insecure",
        sameSiteExcludeNavigationContextDowngrade(false)
      ],
      ["CookieIssue::ExcludeContextDowngrade::ReadCookie::Secure", sameSiteExcludeContextDowngradeRead(true)],
      ["CookieIssue::ExcludeContextDowngrade::ReadCookie::Insecure", sameSiteExcludeContextDowngradeRead(false)],
      ["CookieIssue::ExcludeContextDowngrade::SetCookie::Secure", sameSiteExcludeContextDowngradeSet(true)],
      ["CookieIssue::ExcludeContextDowngrade::SetCookie::Insecure", sameSiteExcludeContextDowngradeSet(false)],
      ["CookieIssue::WarnAttributeValueExceedsMaxSize::ReadCookie", attributeValueExceedsMaxSize],
      ["CookieIssue::WarnAttributeValueExceedsMaxSize::SetCookie", attributeValueExceedsMaxSize],
      ["CookieIssue::WarnDomainNonASCII::ReadCookie", warnDomainNonAscii],
      ["CookieIssue::WarnDomainNonASCII::SetCookie", warnDomainNonAscii],
      ["CookieIssue::ExcludeDomainNonASCII::ReadCookie", excludeDomainNonAscii],
      ["CookieIssue::ExcludeDomainNonASCII::SetCookie", excludeDomainNonAscii],
      [
        "CookieIssue::ExcludeThirdPartyCookieBlockedInRelatedWebsiteSet::ReadCookie",
        excludeBlockedWithinRelatedWebsiteSet
      ],
      [
        "CookieIssue::ExcludeThirdPartyCookieBlockedInRelatedWebsiteSet::SetCookie",
        excludeBlockedWithinRelatedWebsiteSet
      ],
      ["CookieIssue::WarnThirdPartyPhaseout::ReadCookie", placeholderDescriptionForInvisibleIssues],
      ["CookieIssue::WarnThirdPartyPhaseout::SetCookie", placeholderDescriptionForInvisibleIssues],
      ["CookieIssue::WarnDeprecationTrialMetadata::ReadCookie", placeholderDescriptionForInvisibleIssues],
      ["CookieIssue::WarnDeprecationTrialMetadata::SetCookie", placeholderDescriptionForInvisibleIssues],
      ["CookieIssue::WarnThirdPartyCookieHeuristic::ReadCookie", placeholderDescriptionForInvisibleIssues],
      ["CookieIssue::WarnThirdPartyCookieHeuristic::SetCookie", placeholderDescriptionForInvisibleIssues],
      ["CookieIssue::ExcludeThirdPartyPhaseout::ReadCookie", placeholderDescriptionForInvisibleIssues],
      ["CookieIssue::ExcludeThirdPartyPhaseout::SetCookie", placeholderDescriptionForInvisibleIssues],
      ["CookieIssue::CrossSiteRedirectDowngradeChangesInclusion", cookieCrossSiteRedirectDowngrade],
      ["CookieIssue::ExcludePortMismatch", ExcludePortMismatch],
      ["CookieIssue::ExcludeSchemeMismatch", ExcludeSchemeMismatch]
    ]);
    UIStrings$h = {
      corsLocalNetworkAccess: "Local Network Access",
      CORS: "Cross-Origin Resource Sharing (`CORS`)"
    };
    str_$g = registerUIStrings("models/issues_manager/CorsIssue.ts", UIStrings$h);
    i18nString$7 = getLocalizedString.bind(void 0, str_$g);
    CorsIssue = class _CorsIssue extends Issue {
      constructor(issueDetails, issuesModel, issueId) {
        super(getIssueCode$1(issueDetails), issueDetails, issuesModel, issueId);
      }
      getCategory() {
        return "Cors";
      }
      getDescription() {
        switch (getIssueCode$1(this.details())) {
          case "CorsIssue::InvalidHeaders":
            return {
              file: "corsInvalidHeaderValues.md",
              links: [{
                link: "https://web.dev/cross-origin-resource-sharing",
                linkTitle: i18nString$7(UIStrings$h.CORS)
              }]
            };
          case "CorsIssue::WildcardOriginWithCredentials":
            return {
              file: "corsWildcardOriginNotAllowed.md",
              links: [{
                link: "https://web.dev/cross-origin-resource-sharing",
                linkTitle: i18nString$7(UIStrings$h.CORS)
              }]
            };
          case "CorsIssue::PreflightResponseInvalid":
            return {
              file: "corsPreflightResponseInvalid.md",
              links: [{
                link: "https://web.dev/cross-origin-resource-sharing",
                linkTitle: i18nString$7(UIStrings$h.CORS)
              }]
            };
          case "CorsIssue::OriginMismatch":
            return {
              file: "corsOriginMismatch.md",
              links: [{
                link: "https://web.dev/cross-origin-resource-sharing",
                linkTitle: i18nString$7(UIStrings$h.CORS)
              }]
            };
          case "CorsIssue::AllowCredentialsRequired":
            return {
              file: "corsAllowCredentialsRequired.md",
              links: [{
                link: "https://web.dev/cross-origin-resource-sharing",
                linkTitle: i18nString$7(UIStrings$h.CORS)
              }]
            };
          case "CorsIssue::MethodDisallowedByPreflightResponse":
            return {
              file: "corsMethodDisallowedByPreflightResponse.md",
              links: [{
                link: "https://web.dev/cross-origin-resource-sharing",
                linkTitle: i18nString$7(UIStrings$h.CORS)
              }]
            };
          case "CorsIssue::HeaderDisallowedByPreflightResponse":
            return {
              file: "corsHeaderDisallowedByPreflightResponse.md",
              links: [{
                link: "https://web.dev/cross-origin-resource-sharing",
                linkTitle: i18nString$7(UIStrings$h.CORS)
              }]
            };
          case "CorsIssue::RedirectContainsCredentials":
            return {
              file: "corsRedirectContainsCredentials.md",
              links: [{
                link: "https://web.dev/cross-origin-resource-sharing",
                linkTitle: i18nString$7(UIStrings$h.CORS)
              }]
            };
          case "CorsIssue::DisallowedByMode":
            return {
              file: "corsDisallowedByMode.md",
              links: [{
                link: "https://web.dev/cross-origin-resource-sharing",
                linkTitle: i18nString$7(UIStrings$h.CORS)
              }]
            };
          case "CorsIssue::CorsDisabledScheme":
            return {
              file: "corsDisabledScheme.md",
              links: [{
                link: "https://web.dev/cross-origin-resource-sharing",
                linkTitle: i18nString$7(UIStrings$h.CORS)
              }]
            };
          case "CorsIssue::NoCorsRedirectModeNotFollow":
            return {
              file: "corsNoCorsRedirectModeNotFollow.md",
              links: [{
                link: "https://web.dev/cross-origin-resource-sharing",
                linkTitle: i18nString$7(UIStrings$h.CORS)
              }]
            };
          case "CorsIssue::InsecureLocalNetwork":
          case "CorsIssue::LocalNetworkAccessPermissionDenied":
            return {
              file: "corsLocalNetworkAccessPermissionDenied.md",
              links: [{
                link: "https://developer.chrome.com/blog/local-network-access",
                linkTitle: i18nString$7(UIStrings$h.corsLocalNetworkAccess)
              }]
            };
          case "CorsIssue::PreflightMissingAllowExternal":
          case "CorsIssue::PreflightInvalidAllowExternal":
          case "CorsIssue::InvalidLocalNetworkAccess":
            return null;
        }
      }
      primaryKey() {
        return JSON.stringify(this.details());
      }
      getKind() {
        if (this.details().isWarning && this.details().corsErrorStatus.corsError === "InsecureLocalNetwork") {
          return "BreakingChange";
        }
        return "PageError";
      }
      static fromInspectorIssue(issuesModel, inspectorIssue) {
        const corsIssueDetails = inspectorIssue.details.corsIssueDetails;
        if (!corsIssueDetails) {
          console.warn("Cors issue without details received.");
          return [];
        }
        return [new _CorsIssue(corsIssueDetails, issuesModel, inspectorIssue.issueId)];
      }
    };
    UIStrings$g = {
      AttributionReporting: "Attribution Reporting is deprecated and will be removed. See https://goo.gle/ps-status for details.",
      AuthorizationCoveredByWildcard: "Authorization will not be covered by the wildcard symbol (*) in CORS `Access-Control-Allow-Headers` handling.",
      CanRequestURLHTTPContainingNewline: "Resource requests whose URLs contained both removed whitespace `\\(n|r|t)` characters and less-than characters (`<`) are blocked. Please remove newlines and encode less-than characters from places like element attribute values in order to load these resources.",
      ChromeLoadTimesConnectionInfo: "`chrome.loadTimes()` is deprecated, instead use standardized API: Navigation Timing 2.",
      ChromeLoadTimesFirstPaintAfterLoadTime: "`chrome.loadTimes()` is deprecated, instead use standardized API: Paint Timing.",
      ChromeLoadTimesWasAlternateProtocolAvailable: "`chrome.loadTimes()` is deprecated, instead use standardized API: `nextHopProtocol` in Navigation Timing 2.",
      CrossOriginAccessBasedOnDocumentDomain: "Relaxing the same-origin policy by setting `document.domain` is deprecated, and will be disabled by default. This deprecation warning is for a cross-origin access that was enabled by setting `document.domain`.",
      CrossOriginWindowAlert: "Triggering window.alert from cross origin iframes has been deprecated and will be removed in the future.",
      CrossOriginWindowConfirm: "Triggering window.confirm from cross origin iframes has been deprecated and will be removed in the future.",
      CSSSelectorInternalMediaControlsOverlayCastButton: "The `disableRemotePlayback` attribute should be used in order to disable the default Cast integration instead of using `-internal-media-controls-overlay-cast-button` selector.",
      CSSValueAppearanceSliderVertical: "CSS appearance value `slider-vertical` is not standardized and will be removed.",
      DataUrlInSvgUse: "Support for data: URLs in SVGUseElement is deprecated and it will be removed in the future.",
      ExampleBrowserProcessDeprecation: "This is an example for showing the code required for a browser process reported deprecation.",
      Fledge: "The Protected Audience API is deprecated and will be removed in a future release.",
      GeolocationInsecureOrigin: "`getCurrentPosition()` and `watchPosition()` no longer work on insecure origins. To use this feature, you should consider switching your application to a secure origin, such as HTTPS. See https://www.chromium.org/Home/chromium-security/deprecating-powerful-features-on-insecure-origins/ for more details.",
      GeolocationInsecureOriginDeprecatedNotRemoved: "`getCurrentPosition()` and `watchPosition()` are deprecated on insecure origins. To use this feature, you should consider switching your application to a secure origin, such as HTTPS. See https://www.chromium.org/Home/chromium-security/deprecating-powerful-features-on-insecure-origins/ for more details.",
      GetUserMediaInsecureOrigin: "`getUserMedia()` no longer works on insecure origins. To use this feature, you should consider switching your application to a secure origin, such as HTTPS. See https://www.chromium.org/Home/chromium-security/deprecating-powerful-features-on-insecure-origins/ for more details.",
      HostCandidateAttributeGetter: "`RTCPeerConnectionIceErrorEvent.hostCandidate` is deprecated. Please use `RTCPeerConnectionIceErrorEvent.address` or `RTCPeerConnectionIceErrorEvent.port` instead.",
      IdentityInCanMakePaymentEvent: "The merchant origin and arbitrary data from the `canmakepayment` service worker event are deprecated and will be removed: `topOrigin`, `paymentRequestOrigin`, `methodData`, `modifiers`.",
      InsecurePrivateNetworkSubresourceRequest: "The website requested a subresource from a network that it could only access because of its users' privileged network position. These requests expose non-public devices and servers to the internet, increasing the risk of a cross-site request forgery (CSRF) attack, and/or information leakage. To mitigate these risks, Chrome deprecates requests to non-public subresources when initiated from non-secure contexts, and will start blocking them.",
      InterestGroupDailyUpdateUrl: "The `dailyUpdateUrl` field of `InterestGroups` passed to `joinAdInterestGroup()` has been renamed to `updateUrl`, to more accurately reflect its behavior.",
      IntlV8BreakIterator: "`Intl.v8BreakIterator` is deprecated. Please use `Intl.Segmenter` instead.",
      LanguageModel_InputQuota: "LanguageModel.inputQuota is deprecated. Please use LanguageModel.contextWindow instead. This alias is only available in extensions.",
      LanguageModel_InputUsage: "LanguageModel.inputUsage is deprecated. Please use LanguageModel.contextUsage instead. This alias is only available in extensions.",
      LanguageModel_MeasureInputUsage: "LanguageModel.measureInputUsage() is deprecated. Please use LanguageModel.measureContextUsage() instead. This alias is only available in extensions.",
      LanguageModel_OnQuotaOverflow: "LanguageModel.onquotaoverflow is deprecated. Please use LanguageModel.oncontextoverflow instead. The LanguageModel.onquotaoverflow alias is only available in extensions.",
      LanguageModelParams: "LanguageModel.params() is deprecated and now only available in extension contexts. The topK and temperature related fields within its result are also deprecated.",
      LanguageModelTemperature: "The 'temperature' parameter/attribute for LanguageModel is deprecated. It is only functional within extensions and may be removed in the future.",
      LanguageModelTopK: "The 'topK' parameter/attribute for LanguageModel is deprecated. It is only functional within extensions and may be removed in the future.",
      LocalCSSFileExtensionRejected: "CSS cannot be loaded from `file:` URLs unless they end in a `.css` file extension.",
      NoSysexWebMIDIWithoutPermission: "Web MIDI will ask a permission to use even if the sysex is not specified in the `MIDIOptions`.",
      NotificationInsecureOrigin: "The Notification API may no longer be used from insecure origins. You should consider switching your application to a secure origin, such as HTTPS. See https://www.chromium.org/Home/chromium-security/deprecating-powerful-features-on-insecure-origins/ for more details.",
      NotificationPermissionRequestedIframe: "Permission for the Notification API may no longer be requested from a cross-origin iframe. You should consider requesting permission from a top-level frame or opening a new window instead.",
      ObsoleteCreateImageBitmapImageOrientationNone: "Option `imageOrientation: 'none'` in createImageBitmap is deprecated. Please use createImageBitmap with option '{imageOrientation: 'from-image'}' instead.",
      ObsoleteWebRtcCipherSuite: "Your partner is negotiating an obsolete (D)TLS version. Please check with your partner to have this fixed.",
      OverflowVisibleOnReplacedElement: "Specifying `overflow: visible` on img, video and canvas tags may cause them to produce visual content outside of the element bounds. See https://github.com/WICG/shared-element-transitions/blob/main/debugging_overflow_on_images.md.",
      OverrideFlashEmbedwithHTML: "Legacy flash video embed has been rewritten to HTML iframe. Flash is long gone, this rewriting hack is deprecated and may be removed in the future.",
      PaymentInstruments: "`paymentManager.instruments` is deprecated. Please use just-in-time install for payment handlers instead.",
      PaymentRequestCSPViolation: "Your `PaymentRequest` call bypassed Content-Security-Policy (CSP) `connect-src` directive. This bypass is deprecated. Please add the payment method identifier from the `PaymentRequest` API (in `supportedMethods` field) to your CSP `connect-src` directive.",
      PersistentQuotaType: "`StorageType.persistent` is deprecated. Please use standardized `navigator.storage` instead.",
      PictureSourceSrc: "`<source src>` with a `<picture>` parent is invalid and therefore ignored. Please use `<source srcset>` instead.",
      PrefixedCancelAnimationFrame: "webkitCancelAnimationFrame is vendor-specific. Please use the standard cancelAnimationFrame instead.",
      PrefixedRequestAnimationFrame: "webkitRequestAnimationFrame is vendor-specific. Please use the standard requestAnimationFrame instead.",
      PrefixedVideoDisplayingFullscreen: "HTMLVideoElement.webkitDisplayingFullscreen is deprecated. Please use Document.fullscreenElement instead.",
      PrefixedVideoEnterFullScreen: "HTMLVideoElement.webkitEnterFullScreen() is deprecated. Please use Element.requestFullscreen() instead.",
      PrefixedVideoEnterFullscreen: "HTMLVideoElement.webkitEnterFullscreen() is deprecated. Please use Element.requestFullscreen() instead.",
      PrefixedVideoExitFullScreen: "HTMLVideoElement.webkitExitFullScreen() is deprecated. Please use Document.exitFullscreen() instead.",
      PrefixedVideoExitFullscreen: "HTMLVideoElement.webkitExitFullscreen() is deprecated. Please use Document.exitFullscreen() instead.",
      PrefixedVideoSupportsFullscreen: "HTMLVideoElement.webkitSupportsFullscreen is deprecated. Please use Document.fullscreenEnabled instead.",
      RangeExpand: "Range.expand() is deprecated. Please use Selection.modify() instead.",
      RelatedWebsiteSets: "`Related Website Sets` is deprecated and will be removed. See https://privacysandbox.com/news/update-on-plans-for-privacy-sandbox-technologies/ for more details.",
      RequestedSubresourceWithEmbeddedCredentials: "Subresource requests whose URLs contain embedded credentials (e.g. `https://user:pass@host/`) are blocked.",
      RTCConstraintEnableDtlsSrtpFalse: "The constraint `DtlsSrtpKeyAgreement` is removed. You have specified a `false` value for this constraint, which is interpreted as an attempt to use the removed `SDES key negotiation` method. This functionality is removed; use a service that supports `DTLS key negotiation` instead.",
      RTCConstraintEnableDtlsSrtpTrue: "The constraint `DtlsSrtpKeyAgreement` is removed. You have specified a `true` value for this constraint, which had no effect, but you can remove this constraint for tidiness.",
      RTCPeerConnectionGetStatsLegacyNonCompliant: "The callback-based getStats() is deprecated and will be removed. Use the spec-compliant getStats() instead.",
      RtcpMuxPolicyNegotiate: "The `rtcpMuxPolicy` option is deprecated and will be removed.",
      SharedArrayBufferConstructedWithoutIsolation: "`SharedArrayBuffer` will require cross-origin isolation. See https://developer.chrome.com/blog/enabling-shared-array-buffer/ for more details.",
      SharedStorage: "The Shared Storage API is deprecated and will be removed in a future release.",
      StorageAccessAPI_requestStorageAccessFor_Method: "`document.requestStorageAccessFor` is deprecated and will be removed. See https://privacysandbox.com/news/update-on-plans-for-privacy-sandbox-technologies/ for more details.",
      TextToSpeech_DisallowedByAutoplay: "`speechSynthesis.speak()` without user activation is deprecated and will be removed.",
      Topics: "The Topics API is deprecated and will be removed in a future release.",
      UnloadHandler: "Unload event listeners are deprecated and will be removed.",
      V8SharedArrayBufferConstructedInExtensionWithoutIsolation: "Extensions should opt into cross-origin isolation to continue using `SharedArrayBuffer`. See https://developer.chrome.com/docs/extensions/mv3/cross-origin-isolation/.",
      WebBluetoothRemoteCharacteristicWriteValue: "`BluetoothRemoteGATTCharacteristic.writeValue()` is deprecated. Use `writeValueWithResponse()` or `writeValueWithoutResponse()` instead.",
      XHRJSONEncodingDetection: "UTF-16 is not supported by response json in `XMLHttpRequest`",
      XMLHttpRequestSynchronousInNonWorkerOutsideBeforeUnload: "Synchronous `XMLHttpRequest` on the main thread is deprecated because of its detrimental effects to the end user's experience. For more help, check https://xhr.spec.whatwg.org/.",
      XSLT: "XSLTProcessor and XSLT Processing Instructions have been deprecated by all browsers. These features will be removed from this browser soon."
    };
    DEPRECATIONS_METADATA2 = {
      "AttributionReporting": {
        "chromeStatusFeature": 6320639375966208
      },
      "AuthorizationCoveredByWildcard": {
        "milestone": 97
      },
      "CSSSelectorInternalMediaControlsOverlayCastButton": {
        "chromeStatusFeature": 5714245488476160
      },
      "CSSValueAppearanceSliderVertical": {
        "chromeStatusFeature": 6001359429566464
      },
      "CanRequestURLHTTPContainingNewline": {
        "chromeStatusFeature": 5735596811091968
      },
      "ChromeLoadTimesConnectionInfo": {
        "chromeStatusFeature": 5637885046816768
      },
      "ChromeLoadTimesFirstPaintAfterLoadTime": {
        "chromeStatusFeature": 5637885046816768
      },
      "ChromeLoadTimesWasAlternateProtocolAvailable": {
        "chromeStatusFeature": 5637885046816768
      },
      "CrossOriginAccessBasedOnDocumentDomain": {
        "milestone": 115
      },
      "DataUrlInSvgUse": {
        "chromeStatusFeature": 5128825141198848,
        "milestone": 119
      },
      "IdentityInCanMakePaymentEvent": {
        "chromeStatusFeature": 5190978431352832
      },
      "InsecurePrivateNetworkSubresourceRequest": {
        "chromeStatusFeature": 5436853517811712,
        "milestone": 92
      },
      "LanguageModelParams": {
        "chromeStatusFeature": 5134603979063296
      },
      "LanguageModelTemperature": {
        "chromeStatusFeature": 5134603979063296
      },
      "LanguageModelTopK": {
        "chromeStatusFeature": 5134603979063296
      },
      "LanguageModel_InputQuota": {
        "chromeStatusFeature": 5134603979063296
      },
      "LanguageModel_InputUsage": {
        "chromeStatusFeature": 5134603979063296
      },
      "LanguageModel_MeasureInputUsage": {
        "chromeStatusFeature": 5134603979063296
      },
      "LanguageModel_OnQuotaOverflow": {
        "chromeStatusFeature": 5134603979063296
      },
      "LocalCSSFileExtensionRejected": {
        "milestone": 64
      },
      "NoSysexWebMIDIWithoutPermission": {
        "chromeStatusFeature": 5138066234671104,
        "milestone": 82
      },
      "NotificationPermissionRequestedIframe": {
        "chromeStatusFeature": 6451284559265792
      },
      "ObsoleteCreateImageBitmapImageOrientationNone": {
        "milestone": 111
      },
      "ObsoleteWebRtcCipherSuite": {
        "milestone": 81
      },
      "OverflowVisibleOnReplacedElement": {
        "chromeStatusFeature": 5137515594383360,
        "milestone": 108
      },
      "OverrideFlashEmbedwithHTML": {
        "milestone": 140
      },
      "PaymentInstruments": {
        "chromeStatusFeature": 5099285054488576
      },
      "PaymentRequestCSPViolation": {
        "chromeStatusFeature": 6286595631087616
      },
      "PersistentQuotaType": {
        "chromeStatusFeature": 5176235376246784,
        "milestone": 106
      },
      "RTCConstraintEnableDtlsSrtpFalse": {
        "milestone": 97
      },
      "RTCConstraintEnableDtlsSrtpTrue": {
        "milestone": 97
      },
      "RTCPeerConnectionGetStatsLegacyNonCompliant": {
        "chromeStatusFeature": 4631626228695040,
        "milestone": 117
      },
      "RelatedWebsiteSets": {
        "chromeStatusFeature": 5194473869017088
      },
      "RequestedSubresourceWithEmbeddedCredentials": {
        "chromeStatusFeature": 5669008342777856
      },
      "RtcpMuxPolicyNegotiate": {
        "chromeStatusFeature": 5654810086866944,
        "milestone": 62
      },
      "SharedArrayBufferConstructedWithoutIsolation": {
        "milestone": 106
      },
      "SharedStorage": {
        "chromeStatusFeature": 5076349064708096
      },
      "StorageAccessAPI_requestStorageAccessFor_Method": {
        "chromeStatusFeature": 5162221567082496
      },
      "TextToSpeech_DisallowedByAutoplay": {
        "chromeStatusFeature": 5687444770914304,
        "milestone": 71
      },
      "UnloadHandler": {
        "chromeStatusFeature": 5579556305502208
      },
      "V8SharedArrayBufferConstructedInExtensionWithoutIsolation": {
        "milestone": 96
      },
      "WebBluetoothRemoteCharacteristicWriteValue": {
        "chromeStatusFeature": 5088568590598144
      },
      "XHRJSONEncodingDetection": {
        "milestone": 93
      },
      "XSLT": {
        "chromeStatusFeature": 4709671889534976,
        "milestone": 143
      }
    };
    UIStrings$f = {
      feature: "Check the feature status page for more details.",
      milestone: "This change will go into effect with milestone {milestone}.",
      title: "Deprecated feature used"
    };
    str_$f = registerUIStrings("models/issues_manager/DeprecationIssue.ts", UIStrings$f);
    i18nLazyString$8 = getLazilyComputedLocalizedString.bind(void 0, str_$f);
    strDeprecation = registerUIStrings("generated/Deprecation.ts", UIStrings$g);
    i18nLazyDeprecationString = getLazilyComputedLocalizedString.bind(void 0, strDeprecation);
    DeprecationIssue = class _DeprecationIssue extends Issue {
      constructor(issueDetails, issuesModel) {
        const issueCode = [
          "DeprecationIssue",
          issueDetails.type
        ].join("::");
        super({ code: issueCode, umaCode: "DeprecationIssue" }, issueDetails, issuesModel);
      }
      getCategory() {
        return "Other";
      }
      getDescription() {
        let messageFunction = () => "";
        const maybeEnglishMessage = UIStrings$g[this.details().type];
        if (maybeEnglishMessage) {
          messageFunction = i18nLazyDeprecationString(maybeEnglishMessage);
        }
        const links = [];
        const deprecationMeta = DEPRECATIONS_METADATA2[this.details().type];
        const feature = deprecationMeta?.chromeStatusFeature ?? 0;
        if (feature !== 0) {
          links.push({
            link: `https://chromestatus.com/feature/${feature}`,
            linkTitle: i18nLazyString$8(UIStrings$f.feature)
          });
        }
        const milestone = deprecationMeta?.milestone ?? 0;
        if (milestone !== 0) {
          links.push({
            link: "https://chromiumdash.appspot.com/schedule",
            linkTitle: i18nLazyString$8(UIStrings$f.milestone, { milestone })
          });
        }
        return resolveLazyDescription({
          file: "deprecation.md",
          substitutions: /* @__PURE__ */ new Map([
            ["PLACEHOLDER_title", i18nLazyString$8(UIStrings$f.title)],
            ["PLACEHOLDER_message", messageFunction]
          ]),
          links
        });
      }
      sources() {
        if (this.details().sourceCodeLocation) {
          return [this.details().sourceCodeLocation];
        }
        return [];
      }
      primaryKey() {
        return JSON.stringify(this.details());
      }
      getKind() {
        return "BreakingChange";
      }
      static fromInspectorIssue(issuesModel, inspectorIssue) {
        const details = inspectorIssue.details.deprecationIssueDetails;
        if (!details) {
          console.warn("Deprecation issue without details received.");
          return [];
        }
        return [new _DeprecationIssue(details, issuesModel)];
      }
    };
    ElementAccessibilityIssue = class _ElementAccessibilityIssue extends Issue {
      constructor(issueDetails, issuesModel, issueId) {
        const issueCode = [
          "ElementAccessibilityIssue",
          issueDetails.elementAccessibilityIssueReason
        ].join("::");
        super(issueCode, issueDetails, issuesModel, issueId);
      }
      primaryKey() {
        return JSON.stringify(this.details());
      }
      getDescription() {
        if (this.isInteractiveContentAttributesSelectDescendantIssue()) {
          return {
            file: "selectElementAccessibilityInteractiveContentAttributesSelectDescendant.md",
            links: []
          };
        }
        const description2 = issueDescriptions$5.get(this.details().elementAccessibilityIssueReason);
        if (!description2) {
          return null;
        }
        return resolveLazyDescription(description2);
      }
      getKind() {
        return "PageError";
      }
      getCategory() {
        return "Other";
      }
      isInteractiveContentAttributesSelectDescendantIssue() {
        return this.details().hasDisallowedAttributes && (this.details().elementAccessibilityIssueReason !== "InteractiveContentOptionChild" && this.details().elementAccessibilityIssueReason !== "InteractiveContentSummaryDescendant");
      }
      static fromInspectorIssue(issuesModel, inspectorIssue) {
        const elementAccessibilityIssueDetails = inspectorIssue.details.elementAccessibilityIssueDetails;
        if (!elementAccessibilityIssueDetails) {
          console.warn("Element Accessibility issue without details received.");
          return [];
        }
        return [new _ElementAccessibilityIssue(elementAccessibilityIssueDetails, issuesModel, inspectorIssue.issueId)];
      }
    };
    issueDescriptions$5 = /* @__PURE__ */ new Map([
      [
        "DisallowedSelectChild",
        {
          file: "selectElementAccessibilityDisallowedSelectChild.md",
          links: []
        }
      ],
      [
        "DisallowedOptGroupChild",
        {
          file: "selectElementAccessibilityDisallowedOptGroupChild.md",
          links: []
        }
      ],
      [
        "NonPhrasingContentOptionChild",
        {
          file: "selectElementAccessibilityNonPhrasingContentOptionChild.md",
          links: []
        }
      ],
      [
        "InteractiveContentOptionChild",
        {
          file: "selectElementAccessibilityInteractiveContentOptionChild.md",
          links: []
        }
      ],
      [
        "InteractiveContentLegendChild",
        {
          file: "selectElementAccessibilityInteractiveContentLegendChild.md",
          links: []
        }
      ],
      [
        "InteractiveContentSummaryDescendant",
        {
          file: "summaryElementAccessibilityInteractiveContentSummaryDescendant.md",
          links: []
        }
      ]
    ]);
    UIStrings$e = {
      howDoesAutofillWorkPageTitle: "How does autofill work?",
      labelFormlementsPageTitle: "The label elements",
      inputFormElementPageTitle: "The form input element",
      autocompleteAttributePageTitle: "HTML attribute: autocomplete",
      corbExplainerPageTitle: "CORB explainer",
      historyManipulationInterventionPageTitle: "History manipulation intervention explainer"
    };
    str_$e = registerUIStrings("models/issues_manager/GenericIssue.ts", UIStrings$e);
    i18nLazyString$7 = getLazilyComputedLocalizedString.bind(void 0, str_$e);
    GenericIssue = class _GenericIssue extends Issue {
      constructor(issueDetails, issuesModel, issueId) {
        const issueCode = [
          "GenericIssue",
          issueDetails.errorType
        ].join("::");
        super(issueCode, issueDetails, issuesModel, issueId);
      }
      requests() {
        const details = this.details();
        if (details.request) {
          return [details.request];
        }
        return [];
      }
      getCategory() {
        return "Generic";
      }
      primaryKey() {
        const details = this.details();
        const requestId = details.request ? details.request.requestId : "no-request";
        return `${this.code()}-(${details.frameId})-(${details.violatingNodeId})-(${details.violatingNodeAttribute})-(${requestId})`;
      }
      getDescription() {
        const description2 = issueDescriptions$4.get(this.details().errorType);
        if (!description2) {
          return null;
        }
        return resolveLazyDescription(description2);
      }
      getKind() {
        return issueTypes.get(this.details().errorType) || "Improvement";
      }
      static fromInspectorIssue(issuesModel, inspectorIssue) {
        const genericDetails = inspectorIssue.details.genericIssueDetails;
        if (!genericDetails) {
          console.warn("Generic issue without details received.");
          return [];
        }
        return [new _GenericIssue(genericDetails, issuesModel, inspectorIssue.issueId)];
      }
    };
    genericFormLabelForNameError = {
      file: "genericFormLabelForNameError.md",
      links: [{
        link: "https://html.spec.whatwg.org/multipage/forms.html#attr-label-for",
        linkTitle: lockedLazyString("HTML Standard")
      }]
    };
    genericFormInputWithNoLabelError = {
      file: "genericFormInputWithNoLabelError.md",
      links: []
    };
    genericFormAutocompleteAttributeEmptyError = {
      file: "genericFormAutocompleteAttributeEmptyError.md",
      links: []
    };
    genericFormDuplicateIdForInputError = {
      file: "genericFormDuplicateIdForInputError.md",
      links: [{
        link: "https://web.dev/learn/forms/autofill/#how-does-autofill-work",
        linkTitle: i18nLazyString$7(UIStrings$e.howDoesAutofillWorkPageTitle)
      }]
    };
    genericFormAriaLabelledByToNonExistingIdError = {
      file: "genericFormAriaLabelledByToNonExistingIdError.md",
      links: [{
        link: "https://developer.mozilla.org/en-US/docs/Web/HTML/Element/label",
        linkTitle: i18nLazyString$7(UIStrings$e.labelFormlementsPageTitle)
      }]
    };
    genericFormEmptyIdAndNameAttributesForInputError = {
      file: "genericFormEmptyIdAndNameAttributesForInputError.md",
      links: [{
        link: "https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input",
        linkTitle: i18nLazyString$7(UIStrings$e.inputFormElementPageTitle)
      }]
    };
    genericFormInputAssignedAutocompleteValueToIdOrNameAttributeError = {
      file: "genericFormInputAssignedAutocompleteValueToIdOrNameAttributeError.md",
      links: [{
        link: "https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/autocomplete#values",
        linkTitle: i18nLazyString$7(UIStrings$e.autocompleteAttributePageTitle)
      }]
    };
    genericFormInputHasWrongButWellIntendedAutocompleteValue = {
      file: "genericFormInputHasWrongButWellIntendedAutocompleteValueError.md",
      links: [{
        link: "https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/autocomplete#values",
        linkTitle: i18nLazyString$7(UIStrings$e.autocompleteAttributePageTitle)
      }]
    };
    genericFormLabelForMatchesNonExistingIdError = {
      file: "genericFormLabelForMatchesNonExistingIdError.md",
      links: [{
        link: "https://developer.mozilla.org/en-US/docs/Web/HTML/Element/label",
        linkTitle: i18nLazyString$7(UIStrings$e.labelFormlementsPageTitle)
      }]
    };
    genericFormLabelHasNeitherForNorNestedInputError = {
      file: "genericFormLabelHasNeitherForNorNestedInputError.md",
      links: [{
        link: "https://developer.mozilla.org/en-US/docs/Web/HTML/Element/label",
        linkTitle: i18nLazyString$7(UIStrings$e.labelFormlementsPageTitle)
      }]
    };
    genericResponseWasBlockedbyORB = {
      file: "genericResponseWasBlockedByORB.md",
      links: [{
        link: "https://www.chromium.org/Home/chromium-security/corb-for-developers/",
        linkTitle: i18nLazyString$7(UIStrings$e.corbExplainerPageTitle)
      }]
    };
    genericNavigationEntryMarkedSkippable = {
      file: "genericNavigationEntryMarkedSkippable.md",
      links: [{
        link: "https://chromium.googlesource.com/chromium/src/+/main/docs/history_manipulation_intervention.md",
        linkTitle: i18nLazyString$7(UIStrings$e.historyManipulationInterventionPageTitle)
      }]
    };
    issueDescriptions$4 = /* @__PURE__ */ new Map([
      ["FormLabelForNameError", genericFormLabelForNameError],
      ["FormInputWithNoLabelError", genericFormInputWithNoLabelError],
      [
        "FormAutocompleteAttributeEmptyError",
        genericFormAutocompleteAttributeEmptyError
      ],
      ["FormDuplicateIdForInputError", genericFormDuplicateIdForInputError],
      [
        "FormAriaLabelledByToNonExistingIdError",
        genericFormAriaLabelledByToNonExistingIdError
      ],
      [
        "FormEmptyIdAndNameAttributesForInputError",
        genericFormEmptyIdAndNameAttributesForInputError
      ],
      [
        "FormInputAssignedAutocompleteValueToIdOrNameAttributeError",
        genericFormInputAssignedAutocompleteValueToIdOrNameAttributeError
      ],
      [
        "FormLabelForMatchesNonExistingIdError",
        genericFormLabelForMatchesNonExistingIdError
      ],
      [
        "FormLabelHasNeitherForNorNestedInputError",
        genericFormLabelHasNeitherForNorNestedInputError
      ],
      [
        "FormInputHasWrongButWellIntendedAutocompleteValueError",
        genericFormInputHasWrongButWellIntendedAutocompleteValue
      ],
      [
        "ResponseWasBlockedByORB",
        genericResponseWasBlockedbyORB
      ],
      [
        "NavigationEntryMarkedSkippable",
        genericNavigationEntryMarkedSkippable
      ]
    ]);
    issueTypes = /* @__PURE__ */ new Map([
      ["FormLabelForNameError", "PageError"],
      ["FormInputWithNoLabelError", "Improvement"],
      ["FormAutocompleteAttributeEmptyError", "PageError"],
      ["FormDuplicateIdForInputError", "PageError"],
      ["FormAriaLabelledByToNonExistingIdError", "Improvement"],
      ["FormEmptyIdAndNameAttributesForInputError", "Improvement"],
      [
        "FormInputAssignedAutocompleteValueToIdOrNameAttributeError",
        "Improvement"
      ],
      ["FormLabelForMatchesNonExistingIdError", "PageError"],
      ["FormLabelHasNeitherForNorNestedInputError", "Improvement"],
      ["FormInputHasWrongButWellIntendedAutocompleteValueError", "Improvement"]
    ]);
    UIStrings$d = {
      handlingHeavyAdInterventions: "Handling Heavy Ad Interventions"
    };
    str_$d = registerUIStrings("models/issues_manager/HeavyAdIssue.ts", UIStrings$d);
    i18nString$6 = getLocalizedString.bind(void 0, str_$d);
    HeavyAdIssue = class _HeavyAdIssue extends Issue {
      constructor(issueDetails, issuesModel) {
        const umaCode = ["HeavyAdIssue", issueDetails.reason].join("::");
        super({ code: "HeavyAdIssue", umaCode }, issueDetails, issuesModel);
      }
      primaryKey() {
        return `${"HeavyAdIssue"}-${JSON.stringify(this.details())}`;
      }
      getDescription() {
        return {
          file: "heavyAd.md",
          links: [
            {
              link: "https://developers.google.com/web/updates/2020/05/heavy-ad-interventions",
              linkTitle: i18nString$6(UIStrings$d.handlingHeavyAdInterventions)
            }
          ]
        };
      }
      getCategory() {
        return "HeavyAd";
      }
      getKind() {
        switch (this.details().resolution) {
          case "HeavyAdBlocked":
            return "PageError";
          case "HeavyAdWarning":
            return "BreakingChange";
        }
      }
      static fromInspectorIssue(issuesModel, inspectorIssue) {
        const heavyAdIssueDetails = inspectorIssue.details.heavyAdIssueDetails;
        if (!heavyAdIssueDetails) {
          console.warn("Heavy Ad issue without details received.");
          return [];
        }
        return [new _HeavyAdIssue(heavyAdIssueDetails, issuesModel)];
      }
    };
    UIStrings$c = {
      colorAndContrastAccessibility: "Color and contrast accessibility"
    };
    str_$c = registerUIStrings("models/issues_manager/LowTextContrastIssue.ts", UIStrings$c);
    i18nString$5 = getLocalizedString.bind(void 0, str_$c);
    LowTextContrastIssue = class _LowTextContrastIssue extends Issue {
      constructor(issueDetails, issuesModel) {
        super("LowTextContrastIssue", issueDetails, issuesModel);
      }
      primaryKey() {
        return `${this.code()}-(${this.details().violatingNodeId})`;
      }
      getCategory() {
        return "LowTextContrast";
      }
      getDescription() {
        return {
          file: "LowTextContrast.md",
          links: [
            {
              link: "https://web.dev/color-and-contrast-accessibility/",
              linkTitle: i18nString$5(UIStrings$c.colorAndContrastAccessibility)
            }
          ]
        };
      }
      getKind() {
        return "Improvement";
      }
      static fromInspectorIssue(issuesModel, inspectorIssue) {
        const lowTextContrastIssueDetails = inspectorIssue.details.lowTextContrastIssueDetails;
        if (!lowTextContrastIssueDetails) {
          console.warn("LowTextContrast issue without details received.");
          return [];
        }
        return [new _LowTextContrastIssue(lowTextContrastIssueDetails, issuesModel)];
      }
    };
    UIStrings$b = {
      preventingMixedContent: "Preventing mixed content"
    };
    str_$b = registerUIStrings("models/issues_manager/MixedContentIssue.ts", UIStrings$b);
    i18nString$4 = getLocalizedString.bind(void 0, str_$b);
    MixedContentIssue = class _MixedContentIssue extends Issue {
      constructor(issueDetails, issuesModel) {
        super("MixedContentIssue", issueDetails, issuesModel);
      }
      requests() {
        const details = this.details();
        if (details.request) {
          return [details.request];
        }
        return [];
      }
      getCategory() {
        return "MixedContent";
      }
      getDescription() {
        return {
          file: "mixedContent.md",
          links: [{ link: "https://web.dev/what-is-mixed-content/", linkTitle: i18nString$4(UIStrings$b.preventingMixedContent) }]
        };
      }
      primaryKey() {
        return JSON.stringify(this.details());
      }
      getKind() {
        switch (this.details().resolutionStatus) {
          case "MixedContentAutomaticallyUpgraded":
            return "Improvement";
          case "MixedContentBlocked":
            return "PageError";
          case "MixedContentWarning":
            return "Improvement";
        }
      }
      static fromInspectorIssue(issuesModel, inspectorIssue) {
        const mixedContentDetails = inspectorIssue.details.mixedContentIssueDetails;
        if (!mixedContentDetails) {
          console.warn("Mixed content issue without details received.");
          return [];
        }
        return [new _MixedContentIssue(mixedContentDetails, issuesModel)];
      }
    };
    UIStrings$a = {
      partitioningBlobURL: "Partitioning BlobURL",
      chromeStatusEntry: "Chrome Status Entry"
    };
    str_$a = registerUIStrings("models/issues_manager/PartitioningBlobURLIssue.ts", UIStrings$a);
    i18nString$3 = getLocalizedString.bind(void 0, str_$a);
    PartitioningBlobURLIssue = class _PartitioningBlobURLIssue extends Issue {
      constructor(issueDetails, issuesModel) {
        super("PartitioningBlobURLIssue", issueDetails, issuesModel);
      }
      getCategory() {
        return "Other";
      }
      getDescription() {
        const fileName = this.details().partitioningBlobURLInfo === "BlockedCrossPartitionFetching" ? "fetchingPartitionedBlobURL.md" : "navigatingPartitionedBlobURL.md";
        return {
          file: fileName,
          links: [
            {
              link: "https://developers.google.com/privacy-sandbox/cookies/storage-partitioning",
              linkTitle: i18nString$3(UIStrings$a.partitioningBlobURL)
            },
            {
              link: "https://chromestatus.com/feature/5130361898795008",
              linkTitle: i18nString$3(UIStrings$a.chromeStatusEntry)
            }
          ]
        };
      }
      getKind() {
        return "BreakingChange";
      }
      primaryKey() {
        return JSON.stringify(this.details());
      }
      static fromInspectorIssue(issuesModel, inspectorIssue) {
        const details = inspectorIssue.details.partitioningBlobURLIssueDetails;
        if (!details) {
          console.warn("Partitioning BlobURL issue without details received.");
          return [];
        }
        return [new _PartitioningBlobURLIssue(details, issuesModel)];
      }
    };
    PermissionElementIssue = class _PermissionElementIssue extends Issue {
      #issueDetails;
      constructor(issueDetails, issuesModel) {
        const issueCode = [
          "PermissionElementIssue",
          issueDetails.issueType
        ].join("::");
        super(issueCode, issueDetails, issuesModel);
        this.#issueDetails = issueDetails;
      }
      getCategory() {
        return "PermissionElement";
      }
      getDescription() {
        const issueType = this.#issueDetails.issueType;
        switch (issueType) {
          case "InvalidType":
            return {
              file: "permissionElementInvalidType.md",
              substitutions: /* @__PURE__ */ new Map([
                ["PLACEHOLDER_Type", this.#issueDetails.type || ""]
              ]),
              links: []
            };
          case "FencedFrameDisallowed":
            return {
              file: "permissionElementFencedFrameDisallowed.md",
              substitutions: /* @__PURE__ */ new Map([
                ["PLACEHOLDER_Type", this.#issueDetails.type || ""]
              ]),
              links: []
            };
          case "CspFrameAncestorsMissing":
            return {
              file: "permissionElementCspFrameAncestorsMissing.md",
              substitutions: /* @__PURE__ */ new Map([
                ["PLACEHOLDER_Type", this.#issueDetails.type || ""]
              ]),
              links: []
            };
          case "PermissionsPolicyBlocked":
            return {
              file: "permissionElementPermissionsPolicyBlocked.md",
              substitutions: /* @__PURE__ */ new Map([
                ["PLACEHOLDER_Type", this.#issueDetails.type || ""],
                ["PLACEHOLDER_PermissionName", this.#issueDetails.permissionName || ""]
              ]),
              links: []
            };
          case "PaddingRightUnsupported":
            return {
              file: "permissionElementPaddingRightUnsupported.md",
              substitutions: /* @__PURE__ */ new Map([
                ["PLACEHOLDER_Type", this.#issueDetails.type || ""]
              ]),
              links: []
            };
          case "PaddingBottomUnsupported":
            return {
              file: "permissionElementPaddingBottomUnsupported.md",
              substitutions: /* @__PURE__ */ new Map([
                ["PLACEHOLDER_Type", this.#issueDetails.type || ""]
              ]),
              links: []
            };
          case "InsetBoxShadowUnsupported":
            return {
              file: "permissionElementInsetBoxShadowUnsupported.md",
              substitutions: /* @__PURE__ */ new Map([
                ["PLACEHOLDER_Type", this.#issueDetails.type || ""]
              ]),
              links: []
            };
          case "RequestInProgress":
            return {
              file: "permissionElementRequestInProgress.md",
              substitutions: /* @__PURE__ */ new Map([
                ["PLACEHOLDER_Type", this.#issueDetails.type || ""]
              ]),
              links: []
            };
          case "UntrustedEvent":
            return {
              file: "permissionElementUntrustedEvent.md",
              substitutions: /* @__PURE__ */ new Map([
                ["PLACEHOLDER_Type", this.#issueDetails.type || ""]
              ]),
              links: []
            };
          case "RegistrationFailed":
            return {
              file: "permissionElementRegistrationFailed.md",
              substitutions: /* @__PURE__ */ new Map([
                ["PLACEHOLDER_Type", this.#issueDetails.type || ""]
              ]),
              links: []
            };
          case "TypeNotSupported":
            return {
              file: "permissionElementTypeNotSupported.md",
              substitutions: /* @__PURE__ */ new Map([
                ["PLACEHOLDER_Type", this.#issueDetails.type || ""]
              ]),
              links: []
            };
          case "InvalidTypeActivation":
            return {
              file: "permissionElementInvalidTypeActivation.md",
              substitutions: /* @__PURE__ */ new Map([
                ["PLACEHOLDER_Type", this.#issueDetails.type || ""]
              ]),
              links: []
            };
          case "SecurityChecksFailed":
            return {
              file: "permissionElementSecurityChecksFailed.md",
              substitutions: /* @__PURE__ */ new Map([
                ["PLACEHOLDER_Type", this.#issueDetails.type || ""]
              ]),
              links: []
            };
          case "ActivationDisabled": {
            if (this.#issueDetails.occluderNodeInfo && this.#issueDetails.occluderParentNodeInfo) {
              return {
                file: "permissionElementActivationDisabledWithOccluderParent.md",
                substitutions: /* @__PURE__ */ new Map([
                  ["PLACEHOLDER_DisableReason", this.#issueDetails.disableReason || ""],
                  ["PLACEHOLDER_OccluderInfo", this.#issueDetails.occluderNodeInfo || ""],
                  ["PLACEHOLDER_Type", this.#issueDetails.type || ""],
                  ["PLACEHOLDER_OccluderParentInfo", this.#issueDetails.occluderParentNodeInfo || ""]
                ]),
                links: []
              };
            }
            if (this.#issueDetails.occluderNodeInfo) {
              return {
                file: "permissionElementActivationDisabledWithOccluder.md",
                substitutions: /* @__PURE__ */ new Map([
                  ["PLACEHOLDER_DisableReason", this.#issueDetails.disableReason || ""],
                  ["PLACEHOLDER_OccluderInfo", this.#issueDetails.occluderNodeInfo || ""],
                  ["PLACEHOLDER_Type", this.#issueDetails.type || ""]
                ]),
                links: []
              };
            }
            return {
              file: "permissionElementActivationDisabled.md",
              substitutions: /* @__PURE__ */ new Map([
                ["PLACEHOLDER_DisableReason", this.#issueDetails.disableReason || ""],
                ["PLACEHOLDER_Type", this.#issueDetails.type || ""]
              ]),
              links: []
            };
          }
          case "GeolocationDeprecated":
            return {
              file: "permissionElementGeolocationDeprecated.md",
              links: []
            };
          case "InvalidDisplayStyle":
            return {
              file: "permissionElementInvalidDisplayStyle.md",
              substitutions: /* @__PURE__ */ new Map([
                ["PLACEHOLDER_Type", this.#issueDetails.type || ""]
              ]),
              links: []
            };
          case "NonOpaqueColor":
            return {
              file: "permissionElementNonOpaqueColor.md",
              substitutions: /* @__PURE__ */ new Map([
                ["PLACEHOLDER_Type", this.#issueDetails.type || ""]
              ]),
              links: []
            };
          case "LowContrast":
            return {
              file: "permissionElementLowContrast.md",
              substitutions: /* @__PURE__ */ new Map([
                ["PLACEHOLDER_Type", this.#issueDetails.type || ""]
              ]),
              links: []
            };
          case "FontSizeTooSmall":
            return {
              file: "permissionElementFontSizeTooSmall.md",
              substitutions: /* @__PURE__ */ new Map([
                ["PLACEHOLDER_Type", this.#issueDetails.type || ""]
              ]),
              links: []
            };
          case "FontSizeTooLarge":
            return {
              file: "permissionElementFontSizeTooLarge.md",
              substitutions: /* @__PURE__ */ new Map([
                ["PLACEHOLDER_Type", this.#issueDetails.type || ""]
              ]),
              links: []
            };
          case "InvalidSizeValue":
            return {
              file: "permissionElementInvalidSizeValue.md",
              substitutions: /* @__PURE__ */ new Map([
                ["PLACEHOLDER_Type", this.#issueDetails.type || ""]
              ]),
              links: []
            };
          default:
            console.warn("Unknown PermissionElementIssueType:", issueType);
            return null;
        }
      }
      elements() {
        if (this.#issueDetails.nodeId) {
          const target = this.model()?.target();
          const result = [{
            backendNodeId: this.#issueDetails.nodeId,
            nodeName: this.#issueDetails.type || "Affected element",
            target: target || null
          }];
          return result;
        }
        return [];
      }
      getKind() {
        return this.#issueDetails.isWarning ? "Improvement" : "PageError";
      }
      primaryKey() {
        return `${"PermissionElementIssue"}-${JSON.stringify(this.#issueDetails)}`;
      }
      static fromInspectorIssue(issuesModel, inspectorIssue) {
        const permissionElementIssueDetails = inspectorIssue.details.permissionElementIssueDetails;
        if (!permissionElementIssueDetails) {
          console.warn("Permission element issue without details received.");
          return [];
        }
        return [new _PermissionElementIssue(permissionElementIssueDetails, issuesModel)];
      }
    };
    UIStrings$9 = {
      documentCompatibilityMode: "Document compatibility mode"
    };
    str_$9 = registerUIStrings("models/issues_manager/QuirksModeIssue.ts", UIStrings$9);
    i18nString$2 = getLocalizedString.bind(void 0, str_$9);
    QuirksModeIssue = class _QuirksModeIssue extends Issue {
      constructor(issueDetails, issuesModel) {
        const mode2 = issueDetails.isLimitedQuirksMode ? "LimitedQuirksMode" : "QuirksMode";
        const umaCode = ["QuirksModeIssue", mode2].join("::");
        super({ code: "QuirksModeIssue", umaCode }, issueDetails, issuesModel);
      }
      primaryKey() {
        return `${this.code()}-(${this.details().documentNodeId})-(${this.details().url})`;
      }
      getCategory() {
        return "QuirksMode";
      }
      getDescription() {
        return {
          file: "CompatibilityModeQuirks.md",
          links: [
            {
              link: "https://web.dev/doctype/",
              linkTitle: i18nString$2(UIStrings$9.documentCompatibilityMode)
            }
          ]
        };
      }
      getKind() {
        return "Improvement";
      }
      static fromInspectorIssue(issuesModel, inspectorIssue) {
        const quirksModeIssueDetails = inspectorIssue.details.quirksModeIssueDetails;
        if (!quirksModeIssueDetails) {
          console.warn("Quirks Mode issue without details received.");
          return [];
        }
        return [new _QuirksModeIssue(quirksModeIssueDetails, issuesModel)];
      }
    };
    UIStrings$8 = {
      enablingSharedArrayBuffer: "Enabling `SharedArrayBuffer`"
    };
    str_$8 = registerUIStrings("models/issues_manager/SharedArrayBufferIssue.ts", UIStrings$8);
    i18nString$1 = getLocalizedString.bind(void 0, str_$8);
    SharedArrayBufferIssue = class _SharedArrayBufferIssue extends Issue {
      constructor(issueDetails, issuesModel) {
        const umaCode = ["SharedArrayBufferIssue", issueDetails.type].join("::");
        super({ code: "SharedArrayBufferIssue", umaCode }, issueDetails, issuesModel);
      }
      getCategory() {
        return "Other";
      }
      getDescription() {
        return {
          file: "sharedArrayBuffer.md",
          links: [{
            link: "https://developer.chrome.com/blog/enabling-shared-array-buffer/",
            linkTitle: i18nString$1(UIStrings$8.enablingSharedArrayBuffer)
          }]
        };
      }
      primaryKey() {
        return JSON.stringify(this.details());
      }
      getKind() {
        if (this.details().isWarning) {
          return "BreakingChange";
        }
        return "PageError";
      }
      static fromInspectorIssue(issuesModel, inspectorIssue) {
        const sabIssueDetails = inspectorIssue.details.sharedArrayBufferIssueDetails;
        if (!sabIssueDetails) {
          console.warn("SAB transfer issue without details received.");
          return [];
        }
        return [new _SharedArrayBufferIssue(sabIssueDetails, issuesModel)];
      }
    };
    AggregatedIssue = class extends Issue {
      #allIssues = /* @__PURE__ */ new Set();
      #affectedCookies = /* @__PURE__ */ new Map();
      #affectedRawCookieLines = /* @__PURE__ */ new Map();
      #affectedRequests = [];
      #affectedRequestIds = /* @__PURE__ */ new Set();
      #affectedLocations = /* @__PURE__ */ new Map();
      #heavyAdIssues = /* @__PURE__ */ new Set();
      #blockedByResponseDetails = /* @__PURE__ */ new Map();
      #bounceTrackingSites = /* @__PURE__ */ new Set();
      #corsIssues = /* @__PURE__ */ new Set();
      #cspIssues = /* @__PURE__ */ new Set();
      #deprecationIssues = /* @__PURE__ */ new Set();
      #issueKind = "Improvement";
      #lowContrastIssues = /* @__PURE__ */ new Set();
      #cookieDeprecationMetadataIssues = /* @__PURE__ */ new Set();
      #mixedContentIssues = /* @__PURE__ */ new Set();
      #partitioningBlobURLIssues = /* @__PURE__ */ new Set();
      #permissionElementIssues = /* @__PURE__ */ new Set();
      #sharedArrayBufferIssues = /* @__PURE__ */ new Set();
      #quirksModeIssues = /* @__PURE__ */ new Set();
      #attributionReportingIssues = /* @__PURE__ */ new Set();
      #genericIssues = /* @__PURE__ */ new Set();
      #elementAccessibilityIssues = /* @__PURE__ */ new Set();
      #representative;
      #aggregatedIssuesCount = 0;
      #key;
      constructor(code2, aggregationKey) {
        super(code2, null);
        this.#key = aggregationKey;
      }
      primaryKey() {
        throw new Error("This should never be called");
      }
      aggregationKey() {
        return this.#key;
      }
      getBlockedByResponseDetails() {
        return this.#blockedByResponseDetails.values();
      }
      cookies() {
        return Array.from(this.#affectedCookies.values()).map((x) => x.cookie);
      }
      getRawCookieLines() {
        return this.#affectedRawCookieLines.values();
      }
      sources() {
        return this.#affectedLocations.values();
      }
      getBounceTrackingSites() {
        return this.#bounceTrackingSites.values();
      }
      cookiesWithRequestIndicator() {
        return this.#affectedCookies.values();
      }
      getHeavyAdIssues() {
        return this.#heavyAdIssues;
      }
      getCookieDeprecationMetadataIssues() {
        return this.#cookieDeprecationMetadataIssues;
      }
      getMixedContentIssues() {
        return this.#mixedContentIssues;
      }
      getCorsIssues() {
        return this.#corsIssues;
      }
      getCspIssues() {
        return this.#cspIssues;
      }
      getDeprecationIssues() {
        return this.#deprecationIssues;
      }
      getLowContrastIssues() {
        return this.#lowContrastIssues;
      }
      requests() {
        return this.#affectedRequests.values();
      }
      getSharedArrayBufferIssues() {
        return this.#sharedArrayBufferIssues;
      }
      getQuirksModeIssues() {
        return this.#quirksModeIssues;
      }
      getAttributionReportingIssues() {
        return this.#attributionReportingIssues;
      }
      getGenericIssues() {
        return this.#genericIssues;
      }
      getElementAccessibilityIssues() {
        return this.#elementAccessibilityIssues;
      }
      getDescription() {
        if (this.#representative) {
          return this.#representative.getDescription();
        }
        return null;
      }
      getCategory() {
        if (this.#representative) {
          return this.#representative.getCategory();
        }
        return "Other";
      }
      getAggregatedIssuesCount() {
        return this.#aggregatedIssuesCount;
      }
      getPartitioningBlobURLIssues() {
        return this.#partitioningBlobURLIssues;
      }
      getPermissionElementIssues() {
        return this.#permissionElementIssues;
      }
      #keyForCookie(cookie) {
        const { domain, path: path14, name } = cookie;
        return `${domain};${path14};${name}`;
      }
      addInstance(issue2) {
        this.#aggregatedIssuesCount++;
        if (!this.#representative) {
          this.#representative = issue2;
        }
        this.#allIssues.add(issue2);
        this.#issueKind = unionIssueKind(this.#issueKind, issue2.getKind());
        let hasRequest = false;
        for (const request3 of issue2.requests()) {
          const { requestId } = request3;
          hasRequest = true;
          if (requestId === void 0) {
            this.#affectedRequests.push(request3);
          } else if (!this.#affectedRequestIds.has(requestId)) {
            this.#affectedRequests.push(request3);
            this.#affectedRequestIds.add(requestId);
          }
        }
        for (const cookie of issue2.cookies()) {
          const key = this.#keyForCookie(cookie);
          if (!this.#affectedCookies.has(key)) {
            this.#affectedCookies.set(key, { cookie, hasRequest });
          }
        }
        for (const rawCookieLine of issue2.rawCookieLines()) {
          if (!this.#affectedRawCookieLines.has(rawCookieLine)) {
            this.#affectedRawCookieLines.set(rawCookieLine, { rawCookieLine, hasRequest });
          }
        }
        for (const site of issue2.trackingSites()) {
          if (!this.#bounceTrackingSites.has(site)) {
            this.#bounceTrackingSites.add(site);
          }
        }
        for (const location of issue2.sources()) {
          const key = JSON.stringify(location);
          if (!this.#affectedLocations.has(key)) {
            this.#affectedLocations.set(key, location);
          }
        }
        if (issue2 instanceof CookieDeprecationMetadataIssue) {
          this.#cookieDeprecationMetadataIssues.add(issue2);
        }
        if (issue2 instanceof MixedContentIssue) {
          this.#mixedContentIssues.add(issue2);
        }
        if (issue2 instanceof HeavyAdIssue) {
          this.#heavyAdIssues.add(issue2);
        }
        for (const details of issue2.getBlockedByResponseDetails()) {
          const key = JSON.stringify(details, ["parentFrame", "blockedFrame", "requestId", "frameId", "reason", "request"]);
          this.#blockedByResponseDetails.set(key, details);
        }
        if (issue2 instanceof ContentSecurityPolicyIssue) {
          this.#cspIssues.add(issue2);
        }
        if (issue2 instanceof DeprecationIssue) {
          this.#deprecationIssues.add(issue2);
        }
        if (issue2 instanceof SharedArrayBufferIssue) {
          this.#sharedArrayBufferIssues.add(issue2);
        }
        if (issue2 instanceof LowTextContrastIssue) {
          this.#lowContrastIssues.add(issue2);
        }
        if (issue2 instanceof CorsIssue) {
          this.#corsIssues.add(issue2);
        }
        if (issue2 instanceof QuirksModeIssue) {
          this.#quirksModeIssues.add(issue2);
        }
        if (issue2 instanceof AttributionReportingIssue) {
          this.#attributionReportingIssues.add(issue2);
        }
        if (issue2 instanceof GenericIssue) {
          this.#genericIssues.add(issue2);
        }
        if (issue2 instanceof ElementAccessibilityIssue) {
          this.#elementAccessibilityIssues.add(issue2);
        }
        if (issue2 instanceof PartitioningBlobURLIssue) {
          this.#partitioningBlobURLIssues.add(issue2);
        }
        if (issue2 instanceof PermissionElementIssue) {
          this.#permissionElementIssues.add(issue2);
        }
      }
      getKind() {
        return this.#issueKind;
      }
      getAllIssues() {
        return Array.from(this.#allIssues);
      }
      isHidden() {
        return this.#representative?.isHidden() || false;
      }
      setHidden(_value) {
        throw new Error("Should not call setHidden on aggregatedIssue");
      }
    };
    IssueAggregator = class extends ObjectWrapper {
      issuesManager;
      #aggregatedIssuesByKey = /* @__PURE__ */ new Map();
      #hiddenAggregatedIssuesByKey = /* @__PURE__ */ new Map();
      constructor(issuesManager) {
        super();
        this.issuesManager = issuesManager;
        this.issuesManager.addEventListener("IssueAdded", this.#onIssueAdded, this);
        this.issuesManager.addEventListener("FullUpdateRequired", this.#onFullUpdateRequired, this);
        for (const issue2 of this.issuesManager.issues()) {
          this.#aggregateIssue(issue2);
        }
      }
      #onIssueAdded(event) {
        this.#aggregateIssue(event.data.issue);
      }
      #onFullUpdateRequired() {
        this.#aggregatedIssuesByKey.clear();
        this.#hiddenAggregatedIssuesByKey.clear();
        for (const issue2 of this.issuesManager.issues()) {
          this.#aggregateIssue(issue2);
        }
        this.dispatchEventToListeners("FullUpdateRequired");
      }
      #aggregateIssue(issue2) {
        if (CookieIssue.isThirdPartyCookiePhaseoutRelatedIssue(issue2)) {
          return;
        }
        const map2 = issue2.isHidden() ? this.#hiddenAggregatedIssuesByKey : this.#aggregatedIssuesByKey;
        const aggregatedIssue = this.#aggregateIssueByStatus(map2, issue2);
        this.dispatchEventToListeners("AggregatedIssueUpdated", aggregatedIssue);
        return aggregatedIssue;
      }
      #aggregateIssueByStatus(aggregatedIssuesMap, issue2) {
        const key = issue2.code();
        let aggregatedIssue = aggregatedIssuesMap.get(key);
        if (!aggregatedIssue) {
          aggregatedIssue = new AggregatedIssue(issue2.code(), key);
          aggregatedIssuesMap.set(key, aggregatedIssue);
        }
        aggregatedIssue.addInstance(issue2);
        return aggregatedIssue;
      }
      aggregatedIssues() {
        return [...this.#aggregatedIssuesByKey.values(), ...this.#hiddenAggregatedIssuesByKey.values()];
      }
      aggregatedIssueCodes() {
        return /* @__PURE__ */ new Set([...this.#aggregatedIssuesByKey.keys(), ...this.#hiddenAggregatedIssuesByKey.keys()]);
      }
      aggregatedIssueCategories() {
        const result = /* @__PURE__ */ new Set();
        for (const issue2 of this.#aggregatedIssuesByKey.values()) {
          result.add(issue2.getCategory());
        }
        return result;
      }
      aggregatedIssueKinds() {
        const result = /* @__PURE__ */ new Set();
        for (const issue2 of this.#aggregatedIssuesByKey.values()) {
          result.add(issue2.getKind());
        }
        return result;
      }
      numberOfAggregatedIssues() {
        return this.#aggregatedIssuesByKey.size;
      }
      numberOfHiddenAggregatedIssues() {
        return this.#hiddenAggregatedIssuesByKey.size;
      }
      keyForIssue(issue2) {
        return issue2.code();
      }
    };
    UIStrings$7 = {
      bounceTrackingMitigations: "Bounce tracking mitigations"
    };
    str_$7 = registerUIStrings("models/issues_manager/BounceTrackingIssue.ts", UIStrings$7);
    i18nString19 = getLocalizedString.bind(void 0, str_$7);
    BounceTrackingIssue = class _BounceTrackingIssue extends Issue {
      constructor(issueDetails, issuesModel) {
        super("BounceTrackingIssue", issueDetails, issuesModel);
      }
      getCategory() {
        return "Other";
      }
      getDescription() {
        return {
          file: "bounceTrackingMitigations.md",
          links: [
            {
              link: "https://privacycg.github.io/nav-tracking-mitigations/#bounce-tracking-mitigations",
              linkTitle: i18nString19(UIStrings$7.bounceTrackingMitigations)
            }
          ]
        };
      }
      getKind() {
        return "BreakingChange";
      }
      primaryKey() {
        return JSON.stringify(this.details());
      }
      trackingSites() {
        return this.details().trackingSites;
      }
      static fromInspectorIssue(issuesModel, inspectorIssue) {
        const details = inspectorIssue.details.bounceTrackingIssueDetails;
        if (!details) {
          console.warn("Bounce tracking issue without details received.");
          return [];
        }
        return [new _BounceTrackingIssue(details, issuesModel)];
      }
    };
    UIStrings$6 = {
      clientHintsInfrastructure: "Client Hints Infrastructure"
    };
    str_$6 = registerUIStrings("models/issues_manager/ClientHintIssue.ts", UIStrings$6);
    i18nLazyString$6 = getLazilyComputedLocalizedString.bind(void 0, str_$6);
    ClientHintIssue = class _ClientHintIssue extends Issue {
      constructor(issueDetails, issuesModel) {
        super({
          code: "ClientHintIssue",
          umaCode: ["ClientHintIssue", issueDetails.clientHintIssueReason].join("::")
        }, issueDetails, issuesModel);
      }
      getCategory() {
        return "Other";
      }
      getDescription() {
        const description2 = issueDescriptions$3.get(this.details().clientHintIssueReason);
        if (!description2) {
          return null;
        }
        return resolveLazyDescription(description2);
      }
      sources() {
        return [this.details().sourceCodeLocation];
      }
      primaryKey() {
        return JSON.stringify(this.details());
      }
      getKind() {
        return "BreakingChange";
      }
      static fromInspectorIssue(issuesModel, inspectorIssue) {
        const details = inspectorIssue.details.clientHintIssueDetails;
        if (!details) {
          console.warn("Client Hint issue without details received.");
          return [];
        }
        return [new _ClientHintIssue(details, issuesModel)];
      }
    };
    issueDescriptions$3 = /* @__PURE__ */ new Map([
      [
        "MetaTagAllowListInvalidOrigin",
        {
          file: "clientHintMetaTagAllowListInvalidOrigin.md",
          links: [{
            link: "https://wicg.github.io/client-hints-infrastructure/",
            linkTitle: i18nLazyString$6(UIStrings$6.clientHintsInfrastructure)
          }]
        }
      ],
      [
        "MetaTagModifiedHTML",
        {
          file: "clientHintMetaTagModifiedHTML.md",
          links: [{
            link: "https://wicg.github.io/client-hints-infrastructure/",
            linkTitle: i18nLazyString$6(UIStrings$6.clientHintsInfrastructure)
          }]
        }
      ]
    ]);
    UIStrings$5 = {
      connectionAllowlistHeader: "Connection-Allowlist specification"
    };
    str_$5 = registerUIStrings("models/issues_manager/ConnectionAllowlistIssue.ts", UIStrings$5);
    i18nLazyString$5 = getLazilyComputedLocalizedString.bind(void 0, str_$5);
    ConnectionAllowlistIssue = class _ConnectionAllowlistIssue extends Issue {
      constructor(issueDetails, issuesModel) {
        super({
          code: `${"ConnectionAllowlistIssue"}::${issueDetails.error}`,
          umaCode: `${"ConnectionAllowlistIssue"}::${issueDetails.error}`
        }, issueDetails, issuesModel);
      }
      primaryKey() {
        return JSON.stringify(this.details());
      }
      getDescription() {
        const description2 = {
          file: `connectionAllowlist${this.details().error}.md`,
          links: [
            {
              link: "https://wicg.github.io/private-network-access/#connection-allowlist",
              linkTitle: i18nLazyString$5(UIStrings$5.connectionAllowlistHeader)
            }
          ]
        };
        return resolveLazyDescription(description2);
      }
      getCategory() {
        return "Other";
      }
      getKind() {
        return "PageError";
      }
      requests() {
        return this.details().request ? [this.details().request] : [];
      }
      static fromInspectorIssue(issuesModel, inspectorIssue) {
        const details = inspectorIssue.details.connectionAllowlistIssueDetails;
        if (!details) {
          console.warn("Connection-Allowlist issue without details received.");
          return [];
        }
        return [new _ConnectionAllowlistIssue(details, issuesModel)];
      }
    };
    UIStrings$4 = {
      coopAndCoep: "COOP and COEP",
      samesiteAndSameorigin: "Same-Site and Same-Origin"
    };
    str_$4 = registerUIStrings("models/issues_manager/CrossOriginEmbedderPolicyIssue.ts", UIStrings$4);
    i18nLazyString$4 = getLazilyComputedLocalizedString.bind(void 0, str_$4);
    CrossOriginEmbedderPolicyIssue = class extends Issue {
      constructor(issueDetails, issuesModel) {
        super(`CrossOriginEmbedderPolicyIssue::${issueDetails.reason}`, issueDetails, issuesModel);
      }
      primaryKey() {
        return `${this.code()}-(${this.details().request.requestId})`;
      }
      getBlockedByResponseDetails() {
        return [this.details()];
      }
      requests() {
        return [this.details().request];
      }
      getCategory() {
        return "CrossOriginEmbedderPolicy";
      }
      getDescription() {
        const description2 = issueDescriptions$2.get(this.code());
        if (!description2) {
          return null;
        }
        return resolveLazyDescription(description2);
      }
      getKind() {
        return "PageError";
      }
    };
    issueDescriptions$2 = /* @__PURE__ */ new Map([
      [
        "CrossOriginEmbedderPolicyIssue::CorpNotSameOriginAfterDefaultedToSameOriginByCoep",
        {
          file: "CoepCorpNotSameOriginAfterDefaultedToSameOriginByCoep.md",
          links: [
            { link: "https://web.dev/coop-coep/", linkTitle: i18nLazyString$4(UIStrings$4.coopAndCoep) },
            { link: "https://web.dev/same-site-same-origin/", linkTitle: i18nLazyString$4(UIStrings$4.samesiteAndSameorigin) }
          ]
        }
      ],
      [
        "CrossOriginEmbedderPolicyIssue::CoepFrameResourceNeedsCoepHeader",
        {
          file: "CoepFrameResourceNeedsCoepHeader.md",
          links: [
            { link: "https://web.dev/coop-coep/", linkTitle: i18nLazyString$4(UIStrings$4.coopAndCoep) }
          ]
        }
      ],
      [
        "CrossOriginEmbedderPolicyIssue::CoopSandboxedIframeCannotNavigateToCoopPage",
        {
          file: "CoepCoopSandboxedIframeCannotNavigateToCoopPage.md",
          links: [
            { link: "https://web.dev/coop-coep/", linkTitle: i18nLazyString$4(UIStrings$4.coopAndCoep) }
          ]
        }
      ],
      [
        "CrossOriginEmbedderPolicyIssue::CorpNotSameSite",
        {
          file: "CoepCorpNotSameSite.md",
          links: [
            { link: "https://web.dev/coop-coep/", linkTitle: i18nLazyString$4(UIStrings$4.coopAndCoep) },
            { link: "https://web.dev/same-site-same-origin/", linkTitle: i18nLazyString$4(UIStrings$4.samesiteAndSameorigin) }
          ]
        }
      ],
      [
        "CrossOriginEmbedderPolicyIssue::CorpNotSameOrigin",
        {
          file: "CoepCorpNotSameOrigin.md",
          links: [
            { link: "https://web.dev/coop-coep/", linkTitle: i18nLazyString$4(UIStrings$4.coopAndCoep) },
            { link: "https://web.dev/same-site-same-origin/", linkTitle: i18nLazyString$4(UIStrings$4.samesiteAndSameorigin) }
          ]
        }
      ]
    ]);
    UIStrings$3 = {
      fedCm: "Federated Credential Management API"
    };
    str_$3 = registerUIStrings("models/issues_manager/FederatedAuthRequestIssue.ts", UIStrings$3);
    i18nLazyString$3 = getLazilyComputedLocalizedString.bind(void 0, str_$3);
    FederatedAuthRequestIssue = class _FederatedAuthRequestIssue extends Issue {
      constructor(issueDetails, issuesModel) {
        super({
          code: "FederatedAuthRequestIssue",
          umaCode: [
            "FederatedAuthRequestIssue",
            issueDetails.federatedAuthRequestIssueReason
          ].join("::")
        }, issueDetails, issuesModel);
      }
      getCategory() {
        return "Other";
      }
      getDescription() {
        const description2 = issueDescriptions$1.get(this.details().federatedAuthRequestIssueReason);
        if (!description2) {
          return null;
        }
        return resolveLazyDescription(description2);
      }
      primaryKey() {
        return JSON.stringify(this.details());
      }
      getKind() {
        return "PageError";
      }
      static fromInspectorIssue(issuesModel, inspectorIssue) {
        const details = inspectorIssue.details.federatedAuthRequestIssueDetails;
        if (!details) {
          console.warn("Federated auth request issue without details received.");
          return [];
        }
        return [new _FederatedAuthRequestIssue(details, issuesModel)];
      }
    };
    issueDescriptions$1 = /* @__PURE__ */ new Map([
      [
        "TooManyRequests",
        {
          file: "federatedAuthRequestTooManyRequests.md",
          links: [{
            link: "https://fedidcg.github.io/FedCM/",
            linkTitle: i18nLazyString$3(UIStrings$3.fedCm)
          }]
        }
      ],
      [
        "ConfigHttpNotFound",
        {
          file: "federatedAuthRequestManifestHttpNotFound.md",
          links: [{
            link: "https://fedidcg.github.io/FedCM/",
            linkTitle: i18nLazyString$3(UIStrings$3.fedCm)
          }]
        }
      ],
      [
        "ConfigNoResponse",
        {
          file: "federatedAuthRequestManifestNoResponse.md",
          links: [{
            link: "https://fedidcg.github.io/FedCM/",
            linkTitle: i18nLazyString$3(UIStrings$3.fedCm)
          }]
        }
      ],
      [
        "ConfigInvalidResponse",
        {
          file: "federatedAuthRequestManifestInvalidResponse.md",
          links: [{
            link: "https://fedidcg.github.io/FedCM/",
            linkTitle: i18nLazyString$3(UIStrings$3.fedCm)
          }]
        }
      ],
      [
        "ErrorFetchingSignin",
        {
          file: "federatedAuthRequestErrorFetchingSignin.md",
          links: [{
            link: "https://fedidcg.github.io/FedCM/",
            linkTitle: i18nLazyString$3(UIStrings$3.fedCm)
          }]
        }
      ],
      [
        "InvalidSigninResponse",
        {
          file: "federatedAuthRequestInvalidSigninResponse.md",
          links: [{
            link: "https://fedidcg.github.io/FedCM/",
            linkTitle: i18nLazyString$3(UIStrings$3.fedCm)
          }]
        }
      ],
      [
        "AccountsHttpNotFound",
        {
          file: "federatedAuthRequestAccountsHttpNotFound.md",
          links: [{
            link: "https://fedidcg.github.io/FedCM/",
            linkTitle: i18nLazyString$3(UIStrings$3.fedCm)
          }]
        }
      ],
      [
        "AccountsNoResponse",
        {
          file: "federatedAuthRequestAccountsNoResponse.md",
          links: [{
            link: "https://fedidcg.github.io/FedCM/",
            linkTitle: i18nLazyString$3(UIStrings$3.fedCm)
          }]
        }
      ],
      [
        "AccountsInvalidResponse",
        {
          file: "federatedAuthRequestAccountsInvalidResponse.md",
          links: [{
            link: "https://fedidcg.github.io/FedCM/",
            linkTitle: i18nLazyString$3(UIStrings$3.fedCm)
          }]
        }
      ],
      [
        "IdTokenHttpNotFound",
        {
          file: "federatedAuthRequestIdTokenHttpNotFound.md",
          links: [{
            link: "https://fedidcg.github.io/FedCM/",
            linkTitle: i18nLazyString$3(UIStrings$3.fedCm)
          }]
        }
      ],
      [
        "IdTokenNoResponse",
        {
          file: "federatedAuthRequestIdTokenNoResponse.md",
          links: [{
            link: "https://fedidcg.github.io/FedCM/",
            linkTitle: i18nLazyString$3(UIStrings$3.fedCm)
          }]
        }
      ],
      [
        "IdTokenInvalidResponse",
        {
          file: "federatedAuthRequestIdTokenInvalidResponse.md",
          links: [{
            link: "https://fedidcg.github.io/FedCM/",
            linkTitle: i18nLazyString$3(UIStrings$3.fedCm)
          }]
        }
      ],
      [
        "IdTokenInvalidRequest",
        {
          file: "federatedAuthRequestIdTokenInvalidRequest.md",
          links: [{
            link: "https://fedidcg.github.io/FedCM/",
            linkTitle: i18nLazyString$3(UIStrings$3.fedCm)
          }]
        }
      ],
      [
        "ErrorIdToken",
        {
          file: "federatedAuthRequestErrorIdToken.md",
          links: [{
            link: "https://fedidcg.github.io/FedCM/",
            linkTitle: i18nLazyString$3(UIStrings$3.fedCm)
          }]
        }
      ],
      [
        "Canceled",
        {
          file: "federatedAuthRequestCanceled.md",
          links: [{
            link: "https://fedidcg.github.io/FedCM/",
            linkTitle: i18nLazyString$3(UIStrings$3.fedCm)
          }]
        }
      ]
    ]);
    PropertyRuleIssue = class _PropertyRuleIssue extends Issue {
      #primaryKey;
      constructor(issueDetails, issuesModel) {
        const code2 = JSON.stringify(issueDetails);
        super(code2, issueDetails, issuesModel);
        this.#primaryKey = code2;
      }
      sources() {
        return [this.details().sourceCodeLocation];
      }
      primaryKey() {
        return this.#primaryKey;
      }
      getPropertyName() {
        switch (this.details().propertyRuleIssueReason) {
          case "InvalidInherits":
            return "inherits";
          case "InvalidInitialValue":
            return "initial-value";
          case "InvalidSyntax":
            return "syntax";
        }
        return "";
      }
      getDescription() {
        if (this.details().propertyRuleIssueReason === "InvalidName") {
          return {
            file: "propertyRuleInvalidNameIssue.md",
            links: []
          };
        }
        const value = this.details().propertyValue ? `: ${this.details().propertyValue}` : "";
        const property = `${this.getPropertyName()}${value}`;
        return {
          file: "propertyRuleIssue.md",
          substitutions: /* @__PURE__ */ new Map([["PLACEHOLDER_property", property]]),
          links: []
        };
      }
      getCategory() {
        return "Other";
      }
      getKind() {
        return "PageError";
      }
      static fromInspectorIssue(issueModel, inspectorIssue) {
        const propertyRuleIssueDetails = inspectorIssue.details.propertyRuleIssueDetails;
        if (!propertyRuleIssueDetails) {
          console.warn("Property rule issue without details received");
          return [];
        }
        return [new _PropertyRuleIssue(propertyRuleIssueDetails, issueModel)];
      }
    };
    UIStrings$2 = {
      compressionDictionaryTransport: "Compression Dictionary Transport"
    };
    str_$2 = registerUIStrings("models/issues_manager/SharedDictionaryIssue.ts", UIStrings$2);
    i18nLazyString$2 = getLazilyComputedLocalizedString.bind(void 0, str_$2);
    SharedDictionaryIssue = class _SharedDictionaryIssue extends Issue {
      constructor(issueDetails, issuesModel) {
        super({
          code: getIssueCode(issueDetails),
          umaCode: [
            "SharedDictionaryIssue",
            issueDetails.sharedDictionaryError
          ].join("::")
        }, issueDetails, issuesModel);
      }
      requests() {
        if (this.details().request) {
          return [this.details().request];
        }
        return [];
      }
      getCategory() {
        return "Other";
      }
      getDescription() {
        const description2 = issueDescriptions.get(this.details().sharedDictionaryError);
        if (!description2) {
          return null;
        }
        return resolveLazyDescription(description2);
      }
      primaryKey() {
        return JSON.stringify(this.details());
      }
      getKind() {
        return "PageError";
      }
      static fromInspectorIssue(issuesModel, inspectorIssue) {
        const details = inspectorIssue.details.sharedDictionaryIssueDetails;
        if (!details) {
          console.warn("Shared Dictionary issue without details received.");
          return [];
        }
        return [new _SharedDictionaryIssue(details, issuesModel)];
      }
    };
    specLinks = [{
      link: "https://datatracker.ietf.org/doc/draft-ietf-httpbis-compression-dictionary/",
      linkTitle: i18nLazyString$2(UIStrings$2.compressionDictionaryTransport)
    }];
    issueDescriptions = /* @__PURE__ */ new Map([
      [
        "UseErrorCrossOriginNoCorsRequest",
        {
          file: "sharedDictionaryUseErrorCrossOriginNoCorsRequest.md",
          links: specLinks
        }
      ],
      [
        "UseErrorDictionaryLoadFailure",
        {
          file: "sharedDictionaryUseErrorDictionaryLoadFailure.md",
          links: specLinks
        }
      ],
      [
        "UseErrorMatchingDictionaryNotUsed",
        {
          file: "sharedDictionaryUseErrorMatchingDictionaryNotUsed.md",
          links: specLinks
        }
      ],
      [
        "UseErrorUnexpectedContentDictionaryHeader",
        {
          file: "sharedDictionaryUseErrorUnexpectedContentDictionaryHeader.md",
          links: specLinks
        }
      ],
      [
        "WriteErrorCossOriginNoCorsRequest",
        {
          file: "sharedDictionaryWriteErrorCossOriginNoCorsRequest.md",
          links: specLinks
        }
      ],
      [
        "WriteErrorDisallowedBySettings",
        {
          file: "sharedDictionaryWriteErrorDisallowedBySettings.md",
          links: specLinks
        }
      ],
      [
        "WriteErrorExpiredResponse",
        {
          file: "sharedDictionaryWriteErrorExpiredResponse.md",
          links: specLinks
        }
      ],
      [
        "WriteErrorFeatureDisabled",
        {
          file: "sharedDictionaryWriteErrorFeatureDisabled.md",
          links: specLinks
        }
      ],
      [
        "WriteErrorInsufficientResources",
        {
          file: "sharedDictionaryWriteErrorInsufficientResources.md",
          links: specLinks
        }
      ],
      [
        "WriteErrorInvalidMatchField",
        {
          file: "sharedDictionaryWriteErrorInvalidMatchField.md",
          links: specLinks
        }
      ],
      [
        "WriteErrorInvalidStructuredHeader",
        {
          file: "sharedDictionaryWriteErrorInvalidStructuredHeader.md",
          links: specLinks
        }
      ],
      [
        "WriteErrorInvalidTTLField",
        {
          file: "sharedDictionaryWriteErrorInvalidTTLField.md",
          links: specLinks
        }
      ],
      [
        "WriteErrorNavigationRequest",
        {
          file: "sharedDictionaryWriteErrorNavigationRequest.md",
          links: specLinks
        }
      ],
      [
        "WriteErrorNoMatchField",
        {
          file: "sharedDictionaryWriteErrorNoMatchField.md",
          links: specLinks
        }
      ],
      [
        "WriteErrorNonIntegerTTLField",
        {
          file: "sharedDictionaryWriteErrorNonIntegerTTLField.md",
          links: specLinks
        }
      ],
      [
        "WriteErrorNonListMatchDestField",
        {
          file: "sharedDictionaryWriteErrorNonListMatchDestField.md",
          links: specLinks
        }
      ],
      [
        "WriteErrorNonSecureContext",
        {
          file: "sharedDictionaryWriteErrorNonSecureContext.md",
          links: specLinks
        }
      ],
      [
        "WriteErrorNonStringIdField",
        {
          file: "sharedDictionaryWriteErrorNonStringIdField.md",
          links: specLinks
        }
      ],
      [
        "WriteErrorNonStringInMatchDestList",
        {
          file: "sharedDictionaryWriteErrorNonStringInMatchDestList.md",
          links: specLinks
        }
      ],
      [
        "WriteErrorNonStringMatchField",
        {
          file: "sharedDictionaryWriteErrorNonStringMatchField.md",
          links: specLinks
        }
      ],
      [
        "WriteErrorNonTokenTypeField",
        {
          file: "sharedDictionaryWriteErrorNonTokenTypeField.md",
          links: specLinks
        }
      ],
      [
        "WriteErrorRequestAborted",
        {
          file: "sharedDictionaryWriteErrorRequestAborted.md",
          links: specLinks
        }
      ],
      [
        "WriteErrorShuttingDown",
        {
          file: "sharedDictionaryWriteErrorShuttingDown.md",
          links: specLinks
        }
      ],
      [
        "WriteErrorTooLongIdField",
        {
          file: "sharedDictionaryWriteErrorTooLongIdField.md",
          links: specLinks
        }
      ],
      [
        "WriteErrorUnsupportedType",
        {
          file: "sharedDictionaryWriteErrorUnsupportedType.md",
          links: specLinks
        }
      ]
    ]);
    lateImportStylesheetLoadingCode = [
      "StylesheetLoadingIssue",
      "LateImportRule"
    ].join("::");
    StylesheetLoadingIssue = class _StylesheetLoadingIssue extends Issue {
      constructor(issueDetails, issuesModel) {
        const code2 = `${"StylesheetLoadingIssue"}::${issueDetails.styleSheetLoadingIssueReason}`;
        super(code2, issueDetails, issuesModel);
      }
      sources() {
        return [this.details().sourceCodeLocation];
      }
      requests() {
        const details = this.details();
        if (!details.failedRequestInfo) {
          return [];
        }
        const { url, requestId } = details.failedRequestInfo;
        if (!requestId) {
          return [];
        }
        return [{ url, requestId }];
      }
      primaryKey() {
        return JSON.stringify(this.details());
      }
      getDescription() {
        switch (this.details().styleSheetLoadingIssueReason) {
          case "LateImportRule":
            return {
              file: "stylesheetLateImport.md",
              links: []
            };
          case "RequestFailed":
            return {
              file: "stylesheetRequestFailed.md",
              links: []
            };
        }
      }
      getCategory() {
        return "Other";
      }
      getKind() {
        return "PageError";
      }
      static fromInspectorIssue(issueModel, inspectorIssue) {
        const stylesheetLoadingDetails = inspectorIssue.details.stylesheetLoadingIssueDetails;
        if (!stylesheetLoadingDetails) {
          console.warn("Stylesheet loading issue without details received");
          return [];
        }
        return [new _StylesheetLoadingIssue(stylesheetLoadingDetails, issueModel)];
      }
    };
    SourceFrameIssuesManager = class {
      issuesManager;
      #sourceFrameMessageManager = new PresentationSourceFrameMessageManager();
      constructor(issuesManager) {
        this.issuesManager = issuesManager;
        this.issuesManager.addEventListener("IssueAdded", this.#onIssueAdded, this);
        this.issuesManager.addEventListener("FullUpdateRequired", this.#onFullUpdateRequired, this);
      }
      #onIssueAdded(event) {
        const { issue: issue2 } = event.data;
        void this.#addIssue(issue2);
      }
      async #addIssue(issue2) {
        if (!this.#isTrustedTypeIssue(issue2) && !this.#isLateImportIssue(issue2) && !this.#isPropertyRuleIssue(issue2)) {
          return;
        }
        const issuesModel = issue2.model();
        if (!issuesModel) {
          return;
        }
        const srcLocation = toZeroBasedLocation(issue2.details().sourceCodeLocation);
        const description2 = issue2.getDescription();
        if (!description2 || !srcLocation) {
          return;
        }
        const messageText = await getIssueTitleFromMarkdownDescription(description2);
        if (!messageText) {
          return;
        }
        const clickHandler = () => {
          void reveal(issue2);
        };
        this.#sourceFrameMessageManager.addMessage(new IssueMessage(messageText, issue2.getKind(), clickHandler), {
          line: srcLocation.lineNumber,
          column: srcLocation.columnNumber ?? -1,
          url: srcLocation.url,
          scriptId: srcLocation.scriptId
        }, issuesModel.target());
      }
      #onFullUpdateRequired() {
        this.#resetMessages();
        const issues = this.issuesManager.issues();
        for (const issue2 of issues) {
          void this.#addIssue(issue2);
        }
      }
      #isTrustedTypeIssue(issue2) {
        return issue2 instanceof ContentSecurityPolicyIssue && issue2.code() === trustedTypesSinkViolationCode || issue2.code() === trustedTypesPolicyViolationCode;
      }
      #isPropertyRuleIssue(issue2) {
        return issue2 instanceof PropertyRuleIssue;
      }
      #isLateImportIssue(issue2) {
        return issue2.code() === lateImportStylesheetLoadingCode;
      }
      #resetMessages() {
        this.#sourceFrameMessageManager.clear();
      }
    };
    IssueMessage = class extends Message2 {
      #kind;
      constructor(title2, kind, clickHandler) {
        super("Issue", title2, clickHandler);
        this.#kind = kind;
      }
      getIssueKind() {
        return this.#kind;
      }
    };
    UIStrings$1 = {
      httpMessageSignatures: "HTTP Message Signatures (RFC9421)",
      signatureBasedIntegrity: "Signature-based Integrity"
    };
    str_$1 = registerUIStrings("models/issues_manager/SRIMessageSignatureIssue.ts", UIStrings$1);
    i18nLazyString$1 = getLazilyComputedLocalizedString.bind(void 0, str_$1);
    SRIMessageSignatureIssue = class _SRIMessageSignatureIssue extends Issue {
      constructor(issueDetails, issuesModel) {
        super({
          code: generateGroupingIssueCode(issueDetails),
          umaCode: `${"SRIMessageSignatureIssue"}::${issueDetails.error}`
        }, issueDetails, issuesModel);
      }
      primaryKey() {
        return JSON.stringify(this.details());
      }
      getDescription() {
        const details = this.details();
        const description2 = {
          file: `sri${details.error}.md`,
          links: [
            {
              link: "https://www.rfc-editor.org/rfc/rfc9421.html",
              linkTitle: i18nLazyString$1(UIStrings$1.httpMessageSignatures)
            },
            {
              link: "https://wicg.github.io/signature-based-sri/",
              linkTitle: i18nLazyString$1(UIStrings$1.signatureBasedIntegrity)
            }
          ],
          substitutions: /* @__PURE__ */ new Map()
        };
        if (details.error === "ValidationFailedSignatureMismatch") {
          description2.substitutions?.set("PLACEHOLDER_signatureBase", () => details.signatureBase);
        }
        if (details.error === "ValidationFailedIntegrityMismatch") {
          description2.substitutions?.set("PLACEHOLDER_integrityAssertions", () => {
            const prefix = "\n* ";
            return prefix + this.details().integrityAssertions.join(prefix);
          });
        }
        return resolveLazyDescription(description2);
      }
      getCategory() {
        return "Other";
      }
      getKind() {
        return "PageError";
      }
      requests() {
        return this.details().request ? [this.details().request] : [];
      }
      static fromInspectorIssue(issuesModel, inspectorIssue) {
        const details = inspectorIssue.details.sriMessageSignatureIssueDetails;
        if (!details) {
          console.warn("SRI Message Signature issue without details received.");
          return [];
        }
        return [new _SRIMessageSignatureIssue(details, issuesModel)];
      }
    };
    UIStrings125 = {
      unencodedDigestHeader: "HTTP Unencoded Digest specification",
      integrityIntegration: "Server-Initiated Integrity Checks"
    };
    str_105 = registerUIStrings("models/issues_manager/UnencodedDigestIssue.ts", UIStrings125);
    i18nLazyString = getLazilyComputedLocalizedString.bind(void 0, str_105);
    UnencodedDigestIssue = class _UnencodedDigestIssue extends Issue {
      constructor(issueDetails, issuesModel) {
        super({
          code: `${"UnencodedDigestIssue"}::${issueDetails.error}`,
          umaCode: `${"UnencodedDigestIssue"}::${issueDetails.error}`
        }, issueDetails, issuesModel);
      }
      primaryKey() {
        return JSON.stringify(this.details());
      }
      getDescription() {
        const description2 = {
          file: `unencodedDigest${this.details().error}.md`,
          links: [
            {
              link: "https://www.ietf.org/archive/id/draft-ietf-httpbis-unencoded-digest-01.html",
              linkTitle: i18nLazyString(UIStrings125.unencodedDigestHeader)
            },
            {
              link: "https://wicg.github.io/signature-based-sri/#unencoded-digest-validation",
              linkTitle: i18nLazyString(UIStrings125.integrityIntegration)
            }
          ]
        };
        return resolveLazyDescription(description2);
      }
      getCategory() {
        return "Other";
      }
      getKind() {
        return "PageError";
      }
      requests() {
        return this.details().request ? [this.details().request] : [];
      }
      static fromInspectorIssue(issuesModel, inspectorIssue) {
        const details = inspectorIssue.details.unencodedDigestIssueDetails;
        if (!details) {
          console.warn("Unencoded-Digest issue without details received.");
          return [];
        }
        return [new _UnencodedDigestIssue(details, issuesModel)];
      }
    };
    issuesManagerInstance = null;
    issueCodeHandlers = /* @__PURE__ */ new Map([
      [
        "CookieIssue",
        CookieIssue.fromInspectorIssue
      ],
      [
        "MixedContentIssue",
        MixedContentIssue.fromInspectorIssue
      ],
      [
        "HeavyAdIssue",
        HeavyAdIssue.fromInspectorIssue
      ],
      [
        "ContentSecurityPolicyIssue",
        ContentSecurityPolicyIssue.fromInspectorIssue
      ],
      ["BlockedByResponseIssue", createIssuesForBlockedByResponseIssue],
      [
        "SharedArrayBufferIssue",
        SharedArrayBufferIssue.fromInspectorIssue
      ],
      [
        "SharedDictionaryIssue",
        SharedDictionaryIssue.fromInspectorIssue
      ],
      [
        "LowTextContrastIssue",
        LowTextContrastIssue.fromInspectorIssue
      ],
      [
        "CorsIssue",
        CorsIssue.fromInspectorIssue
      ],
      [
        "QuirksModeIssue",
        QuirksModeIssue.fromInspectorIssue
      ],
      [
        "AttributionReportingIssue",
        AttributionReportingIssue.fromInspectorIssue
      ],
      [
        "GenericIssue",
        GenericIssue.fromInspectorIssue
      ],
      [
        "DeprecationIssue",
        DeprecationIssue.fromInspectorIssue
      ],
      [
        "ClientHintIssue",
        ClientHintIssue.fromInspectorIssue
      ],
      [
        "FederatedAuthRequestIssue",
        FederatedAuthRequestIssue.fromInspectorIssue
      ],
      [
        "BounceTrackingIssue",
        BounceTrackingIssue.fromInspectorIssue
      ],
      [
        "StylesheetLoadingIssue",
        StylesheetLoadingIssue.fromInspectorIssue
      ],
      [
        "PartitioningBlobURLIssue",
        PartitioningBlobURLIssue.fromInspectorIssue
      ],
      [
        "PropertyRuleIssue",
        PropertyRuleIssue.fromInspectorIssue
      ],
      [
        "CookieDeprecationMetadataIssue",
        CookieDeprecationMetadataIssue.fromInspectorIssue
      ],
      [
        "ElementAccessibilityIssue",
        ElementAccessibilityIssue.fromInspectorIssue
      ],
      [
        "SRIMessageSignatureIssue",
        SRIMessageSignatureIssue.fromInspectorIssue
      ],
      [
        "UnencodedDigestIssue",
        UnencodedDigestIssue.fromInspectorIssue
      ],
      [
        "ConnectionAllowlistIssue",
        ConnectionAllowlistIssue.fromInspectorIssue
      ],
      [
        "PermissionElementIssue",
        PermissionElementIssue.fromInspectorIssue
      ]
    ]);
    IssuesManager = class _IssuesManager extends ObjectWrapper {
      showThirdPartyIssuesSetting;
      hideIssueSetting;
      #eventListeners = /* @__PURE__ */ new WeakMap();
      #allIssues = /* @__PURE__ */ new Map();
      #filteredIssues = /* @__PURE__ */ new Map();
      #issueCounts = /* @__PURE__ */ new Map();
      #hiddenIssueCount = /* @__PURE__ */ new Map();
      #thirdPartyCookiePhaseoutIssueCount = /* @__PURE__ */ new Map();
      #issuesById = /* @__PURE__ */ new Map();
      #issuesByOutermostTarget = /* @__PURE__ */ new Map();
      constructor(showThirdPartyIssuesSetting, hideIssueSetting) {
        super();
        this.showThirdPartyIssuesSetting = showThirdPartyIssuesSetting;
        this.hideIssueSetting = hideIssueSetting;
        new SourceFrameIssuesManager(this);
        TargetManager3.instance().observeModels(IssuesModel, this);
        TargetManager3.instance().addModelListener(ResourceTreeModel, Events$6.PrimaryPageChanged, this.#onPrimaryPageChanged, this);
        FrameManager2.instance().addEventListener("FrameAddedToTarget", this.#onFrameAddedToTarget, this);
        this.showThirdPartyIssuesSetting?.addChangeListener(() => this.#updateFilteredIssues());
        this.hideIssueSetting?.addChangeListener(() => this.#updateFilteredIssues());
        TargetManager3.instance().observeTargets({
          targetAdded: (target) => {
            if (target.outermostTarget() === target) {
              this.#updateFilteredIssues();
            }
          },
          targetRemoved: (_) => {
          }
        }, { scoped: true });
      }
      static instance(opts = {
        forceNew: false,
        ensureFirst: false
      }) {
        if (issuesManagerInstance && opts.ensureFirst) {
          throw new Error('IssuesManager was already created. Either set "ensureFirst" to false or make sure that this invocation is really the first one.');
        }
        if (!issuesManagerInstance || opts.forceNew) {
          issuesManagerInstance = new _IssuesManager(opts.showThirdPartyIssuesSetting, opts.hideIssueSetting);
        }
        return issuesManagerInstance;
      }
      static removeInstance() {
        issuesManagerInstance = null;
      }
      #onPrimaryPageChanged(event) {
        const { frame, type: type2 } = event.data;
        const keptIssues = /* @__PURE__ */ new Map();
        for (const [key, issue2] of this.#allIssues.entries()) {
          if (issue2.isAssociatedWithRequestId(frame.loaderId)) {
            keptIssues.set(key, issue2);
          } else if (type2 === "Activation" && frame.resourceTreeModel().target() === issue2.model()?.target()) {
            keptIssues.set(key, issue2);
          } else if (issue2.code() === "BounceTrackingIssue" || issue2.code() === "CookieIssue") {
            const networkManager = frame.resourceTreeModel().target().model(NetworkManager2);
            if (networkManager?.requestForLoaderId(frame.loaderId)?.hasUserGesture() === false) {
              keptIssues.set(key, issue2);
            }
          }
        }
        this.#allIssues = keptIssues;
        this.#updateFilteredIssues();
      }
      #onFrameAddedToTarget(event) {
        const { frame } = event.data;
        if (frame.isOutermostFrame() && TargetManager3.instance().isInScope(frame.resourceTreeModel())) {
          this.#updateFilteredIssues();
        }
      }
      modelAdded(issuesModel) {
        const listener = issuesModel.addEventListener("IssueAdded", this.#onIssueAddedEvent, this);
        this.#eventListeners.set(issuesModel, listener);
      }
      modelRemoved(issuesModel) {
        const listener = this.#eventListeners.get(issuesModel);
        if (listener) {
          removeEventListeners([listener]);
        }
      }
      #onIssueAddedEvent(event) {
        const { issuesModel, inspectorIssue } = event.data;
        const issues = createIssuesFromProtocolIssue(issuesModel, inspectorIssue);
        for (const issue2 of issues) {
          this.addIssue(issuesModel, issue2);
          const message = issue2.maybeCreateConsoleMessage();
          if (!message) {
            continue;
          }
          issuesModel.target().model(ConsoleModel)?.addMessage(message);
        }
      }
      addIssue(issuesModel, issue2) {
        if (!issue2.getDescription()) {
          return;
        }
        const primaryKey = issue2.primaryKey();
        if (this.#allIssues.has(primaryKey)) {
          return;
        }
        this.#allIssues.set(primaryKey, issue2);
        const outermostTarget = issuesModel.target().outermostTarget();
        if (outermostTarget) {
          let issuesForTarget = this.#issuesByOutermostTarget.get(outermostTarget);
          if (!issuesForTarget) {
            issuesForTarget = /* @__PURE__ */ new Set();
            this.#issuesByOutermostTarget.set(outermostTarget, issuesForTarget);
          }
          issuesForTarget.add(issue2);
        }
        if (this.#issueFilter(issue2)) {
          this.#filteredIssues.set(primaryKey, issue2);
          this.#issueCounts.set(issue2.getKind(), 1 + (this.#issueCounts.get(issue2.getKind()) || 0));
          const issueId = issue2.getIssueId();
          if (issueId) {
            this.#issuesById.set(issueId, issue2);
          }
          const values = this.hideIssueSetting?.get();
          this.#updateIssueHiddenStatus(issue2, values);
          if (CookieIssue.isThirdPartyCookiePhaseoutRelatedIssue(issue2)) {
            this.#thirdPartyCookiePhaseoutIssueCount.set(issue2.getKind(), 1 + (this.#thirdPartyCookiePhaseoutIssueCount.get(issue2.getKind()) || 0));
          } else if (issue2.isHidden()) {
            this.#hiddenIssueCount.set(issue2.getKind(), 1 + (this.#hiddenIssueCount.get(issue2.getKind()) || 0));
          }
          this.dispatchEventToListeners("IssueAdded", { issuesModel, issue: issue2 });
        }
        this.dispatchEventToListeners("IssuesCountUpdated");
      }
      issues() {
        return this.#filteredIssues.values();
      }
      numberOfIssues(kind) {
        if (kind) {
          return (this.#issueCounts.get(kind) ?? 0) - this.numberOfHiddenIssues(kind) - this.numberOfThirdPartyCookiePhaseoutIssues(kind);
        }
        return this.#filteredIssues.size - this.numberOfHiddenIssues() - this.numberOfThirdPartyCookiePhaseoutIssues();
      }
      numberOfHiddenIssues(kind) {
        if (kind) {
          return this.#hiddenIssueCount.get(kind) ?? 0;
        }
        let count = 0;
        for (const num of this.#hiddenIssueCount.values()) {
          count += num;
        }
        return count;
      }
      numberOfThirdPartyCookiePhaseoutIssues(kind) {
        if (kind) {
          return this.#thirdPartyCookiePhaseoutIssueCount.get(kind) ?? 0;
        }
        let count = 0;
        for (const num of this.#thirdPartyCookiePhaseoutIssueCount.values()) {
          count += num;
        }
        return count;
      }
      numberOfAllStoredIssues() {
        return this.#allIssues.size;
      }
      #issueFilter(issue2) {
        const scopeTarget = TargetManager3.instance().scopeTarget();
        if (!scopeTarget) {
          return false;
        }
        if (!this.#issuesByOutermostTarget.get(scopeTarget)?.has(issue2)) {
          return false;
        }
        return this.showThirdPartyIssuesSetting?.get() || !issue2.isCausedByThirdParty();
      }
      #updateIssueHiddenStatus(issue2, values) {
        const code2 = issue2.code();
        if (values?.[code2]) {
          if (values[code2] === "Hidden") {
            issue2.setHidden(true);
            return;
          }
          issue2.setHidden(false);
          return;
        }
      }
      #updateFilteredIssues() {
        this.#filteredIssues.clear();
        this.#issueCounts.clear();
        this.#issuesById.clear();
        this.#hiddenIssueCount.clear();
        this.#thirdPartyCookiePhaseoutIssueCount.clear();
        const values = this.hideIssueSetting?.get();
        for (const [key, issue2] of this.#allIssues) {
          if (this.#issueFilter(issue2)) {
            this.#updateIssueHiddenStatus(issue2, values);
            this.#filteredIssues.set(key, issue2);
            this.#issueCounts.set(issue2.getKind(), 1 + (this.#issueCounts.get(issue2.getKind()) ?? 0));
            if (issue2.isHidden()) {
              this.#hiddenIssueCount.set(issue2.getKind(), 1 + (this.#hiddenIssueCount.get(issue2.getKind()) || 0));
            }
            const issueId = issue2.getIssueId();
            if (issueId) {
              this.#issuesById.set(issueId, issue2);
            }
          }
        }
        this.dispatchEventToListeners("FullUpdateRequired");
        this.dispatchEventToListeners("IssuesCountUpdated");
      }
      unhideAllIssues() {
        for (const issue2 of this.#allIssues.values()) {
          issue2.setHidden(false);
        }
        this.hideIssueSetting?.set(defaultHideIssueByCodeSetting());
      }
      getIssueById(id2) {
        return this.#issuesById.get(id2);
      }
    };
    globalThis.addIssueForTest = (issue2) => {
      const mainTarget = TargetManager3.instance().primaryPageTarget();
      const issuesModel = mainTarget?.model(IssuesModel);
      issuesModel?.issueAdded({ issue: issue2 });
    };
    installInspectorFrontendHost(new McpHostBindings());
    mcp = /* @__PURE__ */ Object.freeze({
      __proto__: null,
      AgentFocus,
      AggregatedIssue,
      Common: common,
      ConnectionTransport,
      CrUXManager,
      DebuggerModel,
      DebuggerWorkspaceBinding,
      Formatter: formatter,
      Foundation: foundation,
      I18n: i18n,
      IgnoreListManager,
      Issue,
      IssueAggregator,
      IssuesManager,
      MarkdownIssueDescription,
      Marked: marked,
      PerformanceInsightFormatter,
      PerformanceTraceFormatter,
      Protocol: protocol,
      ProtocolClient: protocol_client,
      RuntimeModel,
      StackTrace: stack_trace,
      Target: Target2,
      TargetManager: TargetManager3,
      TraceEngine: trace,
      createIssuesFromProtocolIssue
    });
  }
});

// ../../node_modules/chrome-devtools-mcp/build/src/polyfill.js
var init_polyfill = __esm({
  async "../../node_modules/chrome-devtools-mcp/build/src/polyfill.js"() {
    await init_third_party();
  }
});

// ../../node_modules/chrome-devtools-mcp/build/src/cli.js
function parseArguments(version3, argv = process.argv) {
  const yargsInstance = Yargs(hideBin(argv)).scriptName("npx chrome-devtools-mcp@latest").options(cliOptions).check((args2) => {
    if (!args2.channel && !args2.browserUrl && !args2.wsEndpoint && !args2.executablePath) {
      args2.channel = "stable";
    }
    return true;
  }).example([
    [
      "$0 --browserUrl http://127.0.0.1:9222",
      "Connect to an existing browser instance via HTTP"
    ],
    [
      "$0 --wsEndpoint ws://127.0.0.1:9222/devtools/browser/abc123",
      "Connect to an existing browser instance via WebSocket"
    ],
    [
      `$0 --wsEndpoint ws://127.0.0.1:9222/devtools/browser/abc123 --wsHeaders '{"Authorization":"Bearer token"}'`,
      "Connect via WebSocket with custom headers"
    ],
    ["$0 --channel beta", "Use Chrome Beta installed on this system"],
    ["$0 --channel canary", "Use Chrome Canary installed on this system"],
    ["$0 --channel dev", "Use Chrome Dev installed on this system"],
    ["$0 --channel stable", "Use stable Chrome installed on this system"],
    ["$0 --logFile /tmp/log.txt", "Save logs to a file"],
    ["$0 --help", "Print CLI options"],
    [
      "$0 --viewport 1280x720",
      "Launch Chrome with the initial viewport size of 1280x720px"
    ],
    [
      `$0 --chrome-arg='--no-sandbox' --chrome-arg='--disable-setuid-sandbox'`,
      "Launch Chrome without sandboxes. Use with caution."
    ],
    [
      `$0 --ignore-default-chrome-arg='--disable-extensions'`,
      "Disable the default arguments provided by Puppeteer. Use with caution."
    ],
    ["$0 --no-category-emulation", "Disable tools in the emulation category"],
    [
      "$0 --no-category-performance",
      "Disable tools in the performance category"
    ],
    ["$0 --no-category-network", "Disable tools in the network category"],
    [
      "$0 --user-data-dir=/tmp/user-data-dir",
      "Use a custom user data directory"
    ],
    [
      "$0 --auto-connect",
      "Connect to a stable Chrome instance (Chrome 144+) running instead of launching a new instance"
    ],
    [
      "$0 --auto-connect --channel=canary",
      "Connect to a canary Chrome instance (Chrome 144+) running instead of launching a new instance"
    ],
    [
      "$0 --no-usage-statistics",
      "Do not send usage statistics https://github.com/ChromeDevTools/chrome-devtools-mcp#usage-statistics."
    ],
    [
      "$0 --no-performance-crux",
      "Disable CrUX (field data) integration in performance tools."
    ],
    [
      "$0 --slim",
      "Only 3 tools: navigation, JavaScript execution and screenshot"
    ]
  ]);
  return yargsInstance.wrap(Math.min(120, yargsInstance.terminalWidth())).help().version(version3).parseSync();
}
var cliOptions;
var init_cli = __esm({
  async "../../node_modules/chrome-devtools-mcp/build/src/cli.js"() {
    await init_third_party();
    cliOptions = {
      autoConnect: {
        type: "boolean",
        description: "If specified, automatically connects to a browser (Chrome 144+) running locally from the user data directory identified by the channel param (default channel is stable). Requires the remoted debugging server to be started in the Chrome instance via chrome://inspect/#remote-debugging.",
        conflicts: ["isolated", "executablePath"],
        default: false,
        coerce: (value) => {
          if (!value) {
            return;
          }
          return value;
        }
      },
      browserUrl: {
        type: "string",
        description: "Connect to a running, debuggable Chrome instance (e.g. `http://127.0.0.1:9222`). For more details see: https://github.com/ChromeDevTools/chrome-devtools-mcp#connecting-to-a-running-chrome-instance.",
        alias: "u",
        conflicts: "wsEndpoint",
        coerce: (url) => {
          if (!url) {
            return;
          }
          try {
            new URL(url);
          } catch {
            throw new Error(`Provided browserUrl ${url} is not valid URL.`);
          }
          return url;
        }
      },
      wsEndpoint: {
        type: "string",
        description: "WebSocket endpoint to connect to a running Chrome instance (e.g., ws://127.0.0.1:9222/devtools/browser/<id>). Alternative to --browserUrl.",
        alias: "w",
        conflicts: "browserUrl",
        coerce: (url) => {
          if (!url) {
            return;
          }
          try {
            const parsed = new URL(url);
            if (parsed.protocol !== "ws:" && parsed.protocol !== "wss:") {
              throw new Error(`Provided wsEndpoint ${url} must use ws:// or wss:// protocol.`);
            }
            return url;
          } catch (error) {
            if (error.message.includes("ws://")) {
              throw error;
            }
            throw new Error(`Provided wsEndpoint ${url} is not valid URL.`);
          }
        }
      },
      wsHeaders: {
        type: "string",
        description: `Custom headers for WebSocket connection in JSON format (e.g., '{"Authorization":"Bearer token"}'). Only works with --wsEndpoint.`,
        implies: "wsEndpoint",
        coerce: (val) => {
          if (!val) {
            return;
          }
          try {
            const parsed = JSON.parse(val);
            if (typeof parsed !== "object" || Array.isArray(parsed)) {
              throw new Error("Headers must be a JSON object");
            }
            return parsed;
          } catch (error) {
            throw new Error(`Invalid JSON for wsHeaders: ${error.message}`);
          }
        }
      },
      headless: {
        type: "boolean",
        description: "Whether to run in headless (no UI) mode.",
        default: false
      },
      executablePath: {
        type: "string",
        description: "Path to custom Chrome executable.",
        conflicts: ["browserUrl", "wsEndpoint"],
        alias: "e"
      },
      isolated: {
        type: "boolean",
        description: "If specified, creates a temporary user-data-dir that is automatically cleaned up after the browser is closed. Defaults to false."
      },
      userDataDir: {
        type: "string",
        description: "Path to the user data directory for Chrome. Default is $HOME/.cache/chrome-devtools-mcp/chrome-profile$CHANNEL_SUFFIX_IF_NON_STABLE",
        conflicts: ["browserUrl", "wsEndpoint", "isolated"]
      },
      channel: {
        type: "string",
        description: "Specify a different Chrome channel that should be used. The default is the stable channel version.",
        choices: ["stable", "canary", "beta", "dev"],
        conflicts: ["browserUrl", "wsEndpoint", "executablePath"]
      },
      logFile: {
        type: "string",
        describe: "Path to a file to write debug logs to. Set the env variable `DEBUG` to `*` to enable verbose logs. Useful for submitting bug reports."
      },
      viewport: {
        type: "string",
        describe: "Initial viewport size for the Chrome instances started by the server. For example, `1280x720`. In headless mode, max size is 3840x2160px.",
        coerce: (arg) => {
          if (arg === void 0) {
            return;
          }
          const [width, height] = arg.split("x").map(Number);
          if (!width || !height || Number.isNaN(width) || Number.isNaN(height)) {
            throw new Error("Invalid viewport. Expected format is `1280x720`.");
          }
          return {
            width,
            height
          };
        }
      },
      proxyServer: {
        type: "string",
        description: `Proxy server configuration for Chrome passed as --proxy-server when launching the browser. See https://www.chromium.org/developers/design-documents/network-settings/ for details.`
      },
      acceptInsecureCerts: {
        type: "boolean",
        description: `If enabled, ignores errors relative to self-signed and expired certificates. Use with caution.`
      },
      experimentalPageIdRouting: {
        type: "boolean",
        describe: "Whether to expose pageId on page-scoped tools and route requests by page ID.",
        hidden: true
      },
      experimentalDevtools: {
        type: "boolean",
        describe: "Whether to enable automation over DevTools targets",
        hidden: true
      },
      experimentalVision: {
        type: "boolean",
        describe: "Whether to enable vision tools",
        hidden: true
      },
      experimentalStructuredContent: {
        type: "boolean",
        describe: "Whether to output structured formatted content.",
        hidden: true
      },
      experimentalIncludeAllPages: {
        type: "boolean",
        describe: "Whether to include all kinds of pages such as webviews or background pages as pages.",
        hidden: true
      },
      experimentalInteropTools: {
        type: "boolean",
        describe: "Whether to enable interoperability tools",
        hidden: true
      },
      experimentalScreencast: {
        type: "boolean",
        describe: "Exposes experimental screencast tools (requires ffmpeg). Install ffmpeg https://www.ffmpeg.org/download.html and ensure it is available in the MCP server PATH."
      },
      chromeArg: {
        type: "array",
        describe: "Additional arguments for Chrome. Only applies when Chrome is launched by chrome-devtools-mcp."
      },
      ignoreDefaultChromeArg: {
        type: "array",
        describe: "Explicitly disable default arguments for Chrome. Only applies when Chrome is launched by chrome-devtools-mcp."
      },
      categoryEmulation: {
        type: "boolean",
        default: true,
        describe: "Set to false to exclude tools related to emulation."
      },
      categoryPerformance: {
        type: "boolean",
        default: true,
        describe: "Set to false to exclude tools related to performance."
      },
      categoryNetwork: {
        type: "boolean",
        default: true,
        describe: "Set to false to exclude tools related to network."
      },
      categoryExtensions: {
        type: "boolean",
        default: false,
        hidden: true,
        describe: "Set to false to exclude tools related to extensions."
      },
      performanceCrux: {
        type: "boolean",
        default: true,
        describe: "Set to false to disable sending URLs from performance traces to CrUX API to get field performance data."
      },
      usageStatistics: {
        type: "boolean",
        default: true,
        describe: "Set to false to opt-out of usage statistics collection. Google collects usage data to improve the tool, handled under the Google Privacy Policy (https://policies.google.com/privacy). This is independent from Chrome browser metrics. Disabled if CHROME_DEVTOOLS_MCP_NO_USAGE_STATISTICS or CI env variables are set."
      },
      clearcutEndpoint: {
        type: "string",
        hidden: true,
        describe: "Endpoint for Clearcut telemetry."
      },
      clearcutForceFlushIntervalMs: {
        type: "number",
        hidden: true,
        describe: "Force flush interval in milliseconds (for testing)."
      },
      clearcutIncludePidHeader: {
        type: "boolean",
        hidden: true,
        describe: "Include watchdog PID in Clearcut request headers (for testing)."
      },
      slim: {
        type: "boolean",
        describe: 'Exposes a "slim" set of 3 tools covering navigation, script execution and screenshots only. Useful for basic browser tasks.'
      },
      viaCli: {
        type: "boolean",
        describe: "Set by Chrome DevTools CLI if the MCP server is started via the CLI client (this arg exists for usage stats)",
        hidden: true
      }
    };
  }
});

// ../../node_modules/chrome-devtools-mcp/build/src/logger.js
import fs3 from "node:fs";
function saveLogsToFile(fileName) {
  debug$2.enable(namespacesToEnable.join(","));
  const logFile2 = fs3.createWriteStream(fileName, { flags: "a+" });
  debug$2.log = function(...chunks) {
    logFile2.write(`${chunks.join(" ")}
`);
  };
  logFile2.on("error", function(error) {
    console.error(`Error when opening/writing to log file: ${error.message}`);
    logFile2.end();
    process.exit(1);
  });
  return logFile2;
}
var mcpDebugNamespace, namespacesToEnable, logger;
var init_logger = __esm({
  async "../../node_modules/chrome-devtools-mcp/build/src/logger.js"() {
    await init_third_party();
    mcpDebugNamespace = "mcp:log";
    namespacesToEnable = [
      mcpDebugNamespace,
      ...process.env["DEBUG"] ? [process.env["DEBUG"]] : []
    ];
    logger = debug$2(mcpDebugNamespace);
  }
});

// ../../node_modules/chrome-devtools-mcp/build/src/browser.js
import { execSync as execSync2 } from "node:child_process";
import fs4 from "node:fs";
import os2 from "node:os";
import path8 from "node:path";
function makeTargetFilter() {
  const ignoredPrefixes = /* @__PURE__ */ new Set([
    "chrome://",
    "chrome-extension://",
    "chrome-untrusted://"
  ]);
  return function targetFilter(target) {
    if (target.url() === "chrome://newtab/") {
      return true;
    }
    if (target.url().startsWith("chrome://inspect")) {
      return true;
    }
    for (const prefix of ignoredPrefixes) {
      if (target.url().startsWith(prefix)) {
        return false;
      }
    }
    return true;
  };
}
async function ensureBrowserConnected(options2) {
  const { channel } = options2;
  if (browser2?.connected) {
    return browser2;
  }
  const connectOptions = {
    targetFilter: makeTargetFilter(),
    defaultViewport: null,
    handleDevToolsAsPage: true
  };
  let autoConnect = false;
  if (options2.wsEndpoint) {
    connectOptions.browserWSEndpoint = options2.wsEndpoint;
    if (options2.wsHeaders) {
      connectOptions.headers = options2.wsHeaders;
    }
  } else if (options2.browserURL) {
    connectOptions.browserURL = options2.browserURL;
  } else if (channel || options2.userDataDir) {
    const userDataDir = options2.userDataDir;
    if (userDataDir) {
      autoConnect = true;
      const portPath = path8.join(userDataDir, "DevToolsActivePort");
      try {
        const fileContent = await fs4.promises.readFile(portPath, "utf8");
        const [rawPort, rawPath] = fileContent.split("\n").map((line) => {
          return line.trim();
        }).filter((line) => {
          return !!line;
        });
        if (!rawPort || !rawPath) {
          throw new Error(`Invalid DevToolsActivePort '${fileContent}' found`);
        }
        const port = parseInt(rawPort, 10);
        if (isNaN(port) || port <= 0 || port > 65535) {
          throw new Error(`Invalid port '${rawPort}' found`);
        }
        const browserWSEndpoint = `ws://127.0.0.1:${port}${rawPath}`;
        connectOptions.browserWSEndpoint = browserWSEndpoint;
      } catch (error) {
        throw new Error(`Could not connect to Chrome in ${userDataDir}. Check if Chrome is running and remote debugging is enabled by going to chrome://inspect/#remote-debugging.`, {
          cause: error
        });
      }
    } else {
      if (!channel) {
        throw new Error("Channel must be provided if userDataDir is missing");
      }
      connectOptions.channel = channel === "stable" ? "chrome" : `chrome-${channel}`;
    }
  } else {
    throw new Error("Either browserURL, wsEndpoint, channel or userDataDir must be provided");
  }
  logger("Connecting Puppeteer to ", JSON.stringify(connectOptions));
  try {
    browser2 = await puppeteer.connect(connectOptions);
  } catch (err) {
    throw new Error(`Could not connect to Chrome. ${autoConnect ? `Check if Chrome is running and remote debugging is enabled by going to chrome://inspect/#remote-debugging.` : `Check if Chrome is running.`}`, {
      cause: err
    });
  }
  logger("Connected Puppeteer");
  return browser2;
}
function detectDisplay() {
  if (os2.platform() === "win32" || os2.platform() === "darwin") {
    return;
  }
  if (!process.env["DISPLAY"]) {
    try {
      const result = execSync2(`ps -u $(id -u) -o pid= | xargs -I{} cat /proc/{}/environ 2>/dev/null | tr '\\0' '\\n' | grep -m1 '^DISPLAY=' | cut -d= -f2`);
      const display = result.toString("utf8").trim();
      process.env["DISPLAY"] = display;
    } catch {
    }
  }
}
async function launch2(options2) {
  const { channel, executablePath: executablePath2, headless, isolated } = options2;
  const profileDirName = channel && channel !== "stable" ? `chrome-profile-${channel}` : "chrome-profile";
  let userDataDir = options2.userDataDir;
  if (!isolated && !userDataDir) {
    userDataDir = path8.join(os2.homedir(), ".cache", options2.viaCli ? "chrome-devtools-mcp-cli" : "chrome-devtools-mcp", profileDirName);
    await fs4.promises.mkdir(userDataDir, {
      recursive: true
    });
  }
  const args2 = [
    ...options2.chromeArgs ?? [],
    "--hide-crash-restore-bubble"
  ];
  const ignoreDefaultArgs = options2.ignoreDefaultChromeArgs ?? false;
  if (headless) {
    args2.push("--screen-info={3840x2160}");
  }
  let puppeteerChannel;
  if (options2.devtools) {
    args2.push("--auto-open-devtools-for-tabs");
  }
  if (!executablePath2) {
    puppeteerChannel = channel && channel !== "stable" ? `chrome-${channel}` : "chrome";
  }
  if (!headless) {
    detectDisplay();
  }
  try {
    const browser3 = await puppeteer.launch({
      channel: puppeteerChannel,
      targetFilter: makeTargetFilter(),
      executablePath: executablePath2,
      defaultViewport: null,
      userDataDir,
      pipe: true,
      headless,
      args: args2,
      ignoreDefaultArgs,
      acceptInsecureCerts: options2.acceptInsecureCerts,
      handleDevToolsAsPage: true,
      enableExtensions: options2.enableExtensions
    });
    if (options2.logFile) {
      browser3.process()?.stderr?.pipe(options2.logFile);
      browser3.process()?.stdout?.pipe(options2.logFile);
    }
    if (options2.viewport) {
      const [page] = await browser3.pages();
      await page?.resize({
        contentWidth: options2.viewport.width,
        contentHeight: options2.viewport.height
      });
    }
    return browser3;
  } catch (error) {
    if (userDataDir && error.message.includes("The browser is already running")) {
      throw new Error(`The browser is already running for ${userDataDir}. Use --isolated to run multiple browser instances.`, {
        cause: error
      });
    }
    throw error;
  }
}
async function ensureBrowserLaunched(options2) {
  if (browser2?.connected) {
    return browser2;
  }
  browser2 = await launch2(options2);
  return browser2;
}
var browser2;
var init_browser = __esm({
  async "../../node_modules/chrome-devtools-mcp/build/src/browser.js"() {
    await init_logger();
    await init_third_party();
  }
});

// ../../node_modules/chrome-devtools-mcp/build/src/issue-descriptions.js
import * as fs5 from "node:fs";
import * as path9 from "node:path";
async function loadIssueDescriptions() {
  if (Object.keys(issueDescriptions2).length > 0) {
    return;
  }
  const files = await fs5.promises.readdir(DESCRIPTIONS_PATH);
  const descriptions = {};
  for (const file2 of files) {
    if (!file2.endsWith(".md")) {
      continue;
    }
    const content = await fs5.promises.readFile(path9.join(DESCRIPTIONS_PATH, file2), "utf-8");
    descriptions[file2] = content;
  }
  issueDescriptions2 = descriptions;
}
function getIssueDescription(fileName) {
  return issueDescriptions2[fileName] ?? null;
}
var DESCRIPTIONS_PATH, issueDescriptions2, ISSUE_UTILS;
var init_issue_descriptions = __esm({
  "../../node_modules/chrome-devtools-mcp/build/src/issue-descriptions.js"() {
    DESCRIPTIONS_PATH = path9.join(import.meta.dirname, "third_party/issue-descriptions");
    issueDescriptions2 = {};
    ISSUE_UTILS = {
      loadIssueDescriptions,
      getIssueDescription
    };
  }
});

// ../../node_modules/chrome-devtools-mcp/build/src/DevToolsConnectionAdapter.js
var PuppeteerDevToolsConnection;
var init_DevToolsConnectionAdapter = __esm({
  async "../../node_modules/chrome-devtools-mcp/build/src/DevToolsConnectionAdapter.js"() {
    await init_third_party();
    PuppeteerDevToolsConnection = class {
      #connection;
      #observers = /* @__PURE__ */ new Set();
      #sessionEventHandlers = /* @__PURE__ */ new Map();
      constructor(session) {
        this.#connection = session.connection();
        session.on(CDPSessionEvent.SessionAttached, this.#startForwardingCdpEvents.bind(this));
        session.on(CDPSessionEvent.SessionDetached, this.#stopForwardingCdpEvents.bind(this));
        this.#startForwardingCdpEvents(session);
      }
      send(method, params, sessionId) {
        if (sessionId === void 0) {
          throw new Error("Attempting to send on the root session. This must not happen");
        }
        const session = this.#connection.session(sessionId);
        if (!session) {
          throw new Error("Unknown session " + sessionId);
        }
        return session.send(method, params).then((result) => ({ result })).catch((error) => ({ error }));
      }
      observe(observer) {
        this.#observers.add(observer);
      }
      unobserve(observer) {
        this.#observers.delete(observer);
      }
      #startForwardingCdpEvents(session) {
        const handler = this.#handleEvent.bind(this, session.id());
        this.#sessionEventHandlers.set(session.id(), handler);
        session.on("*", handler);
      }
      #stopForwardingCdpEvents(session) {
        const handler = this.#sessionEventHandlers.get(session.id());
        if (handler) {
          session.off("*", handler);
        }
      }
      #handleEvent(sessionId, type2, event) {
        if (typeof type2 === "string" && type2 !== CDPSessionEvent.SessionAttached && type2 !== CDPSessionEvent.SessionDetached) {
          this.#observers.forEach((observer) => observer.onEvent({
            method: type2,
            sessionId,
            params: event
          }));
        }
      }
    };
  }
});

// ../../node_modules/chrome-devtools-mcp/build/src/Mutex.js
var Mutex3;
var init_Mutex = __esm({
  "../../node_modules/chrome-devtools-mcp/build/src/Mutex.js"() {
    Mutex3 = class _Mutex {
      static Guard = class Guard {
        #mutex;
        constructor(mutex) {
          this.#mutex = mutex;
        }
        dispose() {
          return this.#mutex.release();
        }
      };
      #locked = false;
      #acquirers = [];
      // This is FIFO.
      async acquire() {
        if (!this.#locked) {
          this.#locked = true;
          return new _Mutex.Guard(this);
        }
        const { resolve: resolve2, promise } = Promise.withResolvers();
        this.#acquirers.push(resolve2);
        await promise;
        return new _Mutex.Guard(this);
      }
      release() {
        const resolve2 = this.#acquirers.shift();
        if (!resolve2) {
          this.#locked = false;
          return;
        }
        resolve2();
      }
    };
  }
});

// ../../node_modules/chrome-devtools-mcp/build/src/DevtoolsUtils.js
function extractUrlLikeFromDevToolsTitle(title2) {
  const match = title2.match(new RegExp(`DevTools - (.*)`));
  return match?.[1] ?? void 0;
}
function urlsEqual(url1, url2) {
  const normalizedUrl1 = normalizeUrl(url1);
  const normalizedUrl2 = normalizeUrl(url2);
  return normalizedUrl1 === normalizedUrl2;
}
function normalizeUrl(url) {
  let result = url.trim();
  if (result.startsWith("https://")) {
    result = result.slice(8);
  } else if (result.startsWith("http://")) {
    result = result.slice(7);
  }
  if (result.startsWith("www.")) {
    result = result.slice(4);
  }
  const hashIdx = result.lastIndexOf("#");
  if (hashIdx !== -1) {
    result = result.slice(0, hashIdx);
  }
  if (result.endsWith("/")) {
    result = result.slice(0, -1);
  }
  return result;
}
async function createStackTraceForConsoleMessage(devTools, consoleMessage) {
  const message = consoleMessage;
  const rawStackTrace = message._rawStackTrace();
  if (rawStackTrace) {
    return createStackTrace(devTools, rawStackTrace, message._targetId());
  }
  return void 0;
}
async function createStackTrace(devTools, rawStackTrace, targetId) {
  const targetManager = devTools.universe.context.get(mcp.TargetManager);
  const target = targetId ? targetManager.targetById(targetId) || devTools.target : devTools.target;
  const model3 = target.model(mcp.DebuggerModel);
  const scriptIds = /* @__PURE__ */ new Set();
  for (const frame of rawStackTrace.callFrames) {
    scriptIds.add(frame.scriptId);
  }
  for (let asyncStack = rawStackTrace.parent; asyncStack; asyncStack = asyncStack.parent) {
    for (const frame of asyncStack.callFrames) {
      scriptIds.add(frame.scriptId);
    }
  }
  const signal = AbortSignal.timeout(1e3);
  await Promise.all([...scriptIds].map((id2) => waitForScript(model3, id2, signal).then((script) => model3.sourceMapManager().sourceMapForClientPromise(script)).catch()));
  const binding = devTools.universe.context.get(mcp.DebuggerWorkspaceBinding);
  return binding.createStackTraceFromProtocolRuntime(rawStackTrace, target);
}
async function waitForScript(model3, scriptId, signal) {
  while (true) {
    if (signal.aborted) {
      throw signal.reason;
    }
    const script = model3.scriptForId(scriptId);
    if (script) {
      return script;
    }
    await new Promise((resolve2, reject) => {
      signal.addEventListener("abort", () => reject(signal.reason), {
        once: true
      });
      void model3.once("ParsedScriptSource").then(resolve2);
    });
  }
}
var FakeIssuesManager, UniverseManager, DEFAULT_FACTORY, SKIP_ALL_PAUSES, SymbolizedError;
var init_DevtoolsUtils = __esm({
  async "../../node_modules/chrome-devtools-mcp/build/src/DevtoolsUtils.js"() {
    await init_DevToolsConnectionAdapter();
    init_Mutex();
    await init_third_party();
    FakeIssuesManager = class extends mcp.Common.ObjectWrapper.ObjectWrapper {
      issues() {
        return [];
      }
    };
    mcp.ProtocolClient.InspectorBackend.test.suppressRequestErrors = true;
    mcp.I18n.DevToolsLocale.DevToolsLocale.instance({
      create: true,
      data: {
        navigatorLanguage: "en-US",
        settingLanguage: "en-US",
        lookupClosestDevToolsLocale: (l) => l
      }
    });
    mcp.I18n.i18n.registerLocaleDataForTest("en-US", {});
    mcp.Formatter.FormatterWorkerPool.FormatterWorkerPool.instance({
      forceNew: true,
      entrypointURL: import.meta.resolve("./third_party/devtools-formatter-worker.js")
    });
    UniverseManager = class {
      #browser;
      #createUniverseFor;
      #universes = /* @__PURE__ */ new WeakMap();
      /** Guard access to #universes so we don't create unnecessary universes */
      #mutex = new Mutex3();
      constructor(browser3, factory = DEFAULT_FACTORY) {
        this.#browser = browser3;
        this.#createUniverseFor = factory;
      }
      async init(pages) {
        try {
          await this.#mutex.acquire();
          const promises2 = [];
          for (const page of pages) {
            promises2.push(this.#createUniverseFor(page).then((targetUniverse) => this.#universes.set(page, targetUniverse)));
          }
          this.#browser.on("targetcreated", this.#onTargetCreated);
          this.#browser.on("targetdestroyed", this.#onTargetDestroyed);
          await Promise.all(promises2);
        } finally {
          this.#mutex.release();
        }
      }
      get(page) {
        return this.#universes.get(page) ?? null;
      }
      dispose() {
        this.#browser.off("targetcreated", this.#onTargetCreated);
        this.#browser.off("targetdestroyed", this.#onTargetDestroyed);
      }
      #onTargetCreated = async (target) => {
        const page = await target.page();
        try {
          await this.#mutex.acquire();
          if (!page || this.#universes.has(page)) {
            return;
          }
          this.#universes.set(page, await this.#createUniverseFor(page));
        } finally {
          this.#mutex.release();
        }
      };
      #onTargetDestroyed = async (target) => {
        const page = await target.page();
        try {
          await this.#mutex.acquire();
          if (!page || !this.#universes.has(page)) {
            return;
          }
          this.#universes.delete(page);
        } finally {
          this.#mutex.release();
        }
      };
    };
    DEFAULT_FACTORY = async (page) => {
      const settingStorage = new mcp.Common.Settings.SettingsStorage({});
      const universe = new mcp.Foundation.Universe.Universe({
        settingsCreationOptions: {
          syncedStorage: settingStorage,
          globalStorage: settingStorage,
          localStorage: settingStorage,
          settingRegistrations: mcp.Common.SettingRegistration.getRegisteredSettings()
        },
        overrideAutoStartModels: /* @__PURE__ */ new Set([mcp.DebuggerModel])
      });
      const session = await page.createCDPSession();
      const connection = new PuppeteerDevToolsConnection(session);
      const targetManager = universe.context.get(mcp.TargetManager);
      targetManager.observeModels(mcp.DebuggerModel, SKIP_ALL_PAUSES);
      const target = targetManager.createTarget(
        "main",
        "",
        "frame",
        // eslint-disable-line @typescript-eslint/no-explicit-any
        /* parentTarget */
        null,
        session.id(),
        void 0,
        connection
      );
      return { target, universe };
    };
    SKIP_ALL_PAUSES = {
      modelAdded(model3) {
        void model3.agent.invoke_setSkipAllPauses({ skip: true });
      },
      modelRemoved() {
      }
    };
    SymbolizedError = class _SymbolizedError {
      message;
      stackTrace;
      cause;
      constructor(message, stackTrace, cause) {
        this.message = message;
        this.stackTrace = stackTrace;
        this.cause = cause;
      }
      static async fromDetails(opts) {
        const message = _SymbolizedError.#getMessage(opts.details);
        if (!opts.includeStackAndCause || !opts.devTools) {
          return new _SymbolizedError(message, opts.resolvedStackTraceForTesting, opts.resolvedCauseForTesting);
        }
        let stackTrace;
        if (opts.resolvedStackTraceForTesting) {
          stackTrace = opts.resolvedStackTraceForTesting;
        } else if (opts.details.stackTrace) {
          try {
            stackTrace = await createStackTrace(opts.devTools, opts.details.stackTrace, opts.targetId);
          } catch {
          }
        }
        let cause;
        if (opts.resolvedCauseForTesting) {
          cause = opts.resolvedCauseForTesting;
        } else if (opts.details.exception) {
          try {
            const causeRemoteObj = await _SymbolizedError.#lookupCause(opts.devTools, opts.details.exception, opts.targetId);
            if (causeRemoteObj) {
              cause = await _SymbolizedError.fromError({
                devTools: opts.devTools,
                error: causeRemoteObj,
                targetId: opts.targetId
              });
            }
          } catch {
          }
        }
        return new _SymbolizedError(message, stackTrace, cause);
      }
      static async fromError(opts) {
        const details = await _SymbolizedError.#getExceptionDetails(opts.devTools, opts.error, opts.targetId);
        if (details) {
          return _SymbolizedError.fromDetails({
            details,
            devTools: opts.devTools,
            targetId: opts.targetId,
            includeStackAndCause: true
          });
        }
        return new _SymbolizedError(_SymbolizedError.#getMessageFromException(opts.error));
      }
      static #getMessage(details) {
        if (details.text === "Uncaught" && details.exception) {
          return "Uncaught " + _SymbolizedError.#getMessageFromException(details.exception);
        }
        return details.text;
      }
      static #getMessageFromException(error) {
        const messageWithRest = error.description?.split("\n    at ", 2) ?? [];
        return messageWithRest[0] ?? "";
      }
      static async #getExceptionDetails(devTools, error, targetId) {
        if (!devTools || error.type !== "object" && error.subtype !== "error") {
          return null;
        }
        const targetManager = devTools.universe.context.get(mcp.TargetManager);
        const target = targetId ? targetManager.targetById(targetId) || devTools.target : devTools.target;
        const model3 = target.model(mcp.RuntimeModel);
        return await model3.getExceptionDetails(error.objectId) ?? null;
      }
      static async #lookupCause(devTools, error, targetId) {
        if (!devTools || error.type !== "object" && error.subtype !== "error") {
          return null;
        }
        const targetManager = devTools.universe.context.get(mcp.TargetManager);
        const target = targetId ? targetManager.targetById(targetId) || devTools.target : devTools.target;
        const properties2 = await target.runtimeAgent().invoke_getProperties({
          objectId: error.objectId
        });
        if (properties2.getError()) {
          return null;
        }
        return properties2.result.find((prop) => prop.name === "cause")?.value ?? null;
      }
      static createForTesting(message, stackTrace, cause) {
        return new _SymbolizedError(message, stackTrace, cause);
      }
    };
  }
});

// ../../node_modules/chrome-devtools-mcp/build/src/tools/categories.js
var ToolCategory, labels;
var init_categories = __esm({
  "../../node_modules/chrome-devtools-mcp/build/src/tools/categories.js"() {
    (function(ToolCategory2) {
      ToolCategory2["INPUT"] = "input";
      ToolCategory2["NAVIGATION"] = "navigation";
      ToolCategory2["EMULATION"] = "emulation";
      ToolCategory2["PERFORMANCE"] = "performance";
      ToolCategory2["NETWORK"] = "network";
      ToolCategory2["DEBUGGING"] = "debugging";
      ToolCategory2["EXTENSIONS"] = "extensions";
    })(ToolCategory || (ToolCategory = {}));
    labels = {
      [ToolCategory.INPUT]: "Input automation",
      [ToolCategory.NAVIGATION]: "Navigation automation",
      [ToolCategory.EMULATION]: "Emulation",
      [ToolCategory.PERFORMANCE]: "Performance",
      [ToolCategory.NETWORK]: "Network",
      [ToolCategory.DEBUGGING]: "Debugging",
      [ToolCategory.EXTENSIONS]: "Extensions"
    };
  }
});

// ../../node_modules/chrome-devtools-mcp/build/src/tools/ToolDefinition.js
function defineTool(definition) {
  if (typeof definition === "function") {
    const factory = definition;
    return (args2) => {
      return factory(args2);
    };
  }
  return definition;
}
function definePageTool(definition) {
  if (typeof definition === "function") {
    return (args2) => {
      const tool = definition(args2);
      return {
        ...tool,
        pageScoped: true
      };
    };
  }
  return {
    ...definition,
    pageScoped: true
  };
}
function viewportTransform(arg) {
  if (!arg) {
    return void 0;
  }
  const [dimensions, ...tags] = arg.split(",");
  const isMobile = tags.includes("mobile");
  const hasTouch = tags.includes("touch");
  const isLandscape = tags.includes("landscape");
  const [width, height, dpr] = dimensions.split("x").map(Number);
  return {
    width,
    height,
    deviceScaleFactor: dpr,
    isMobile,
    isLandscape,
    hasTouch
  };
}
function geolocationTransform(arg) {
  if (!arg) {
    return void 0;
  }
  const [latitude, longitude] = arg.split("x").map(Number);
  return {
    latitude,
    longitude
  };
}
var CLOSE_PAGE_ERROR, pageIdSchema, timeoutSchema;
var init_ToolDefinition = __esm({
  async "../../node_modules/chrome-devtools-mcp/build/src/tools/ToolDefinition.js"() {
    await init_third_party();
    CLOSE_PAGE_ERROR = "The last open page cannot be closed. It is fine to keep it open.";
    pageIdSchema = {
      pageId: z.number().optional().describe("Targets a specific page by ID.")
    };
    timeoutSchema = {
      timeout: z.number().int().optional().describe(`Maximum wait time in milliseconds. If set to 0, the default timeout will be used.`).transform((value) => {
        return value && value <= 0 ? void 0 : value;
      })
    };
  }
});

// ../../node_modules/chrome-devtools-mcp/build/src/tools/snapshot.js
var snapshot_exports = {};
__export(snapshot_exports, {
  takeSnapshot: () => takeSnapshot,
  waitFor: () => waitFor
});
var takeSnapshot, waitFor;
var init_snapshot = __esm({
  async "../../node_modules/chrome-devtools-mcp/build/src/tools/snapshot.js"() {
    await init_third_party();
    init_categories();
    await init_ToolDefinition();
    takeSnapshot = definePageTool({
      name: "take_snapshot",
      description: `Take a text snapshot of the currently selected page based on the a11y tree. The snapshot lists page elements along with a unique
identifier (uid). Always use the latest snapshot. Prefer taking a snapshot over taking a screenshot. The snapshot indicates the element selected
in the DevTools Elements panel (if any).`,
      annotations: {
        category: ToolCategory.DEBUGGING,
        // Not read-only due to filePath param.
        readOnlyHint: false
      },
      schema: {
        verbose: z.boolean().optional().describe("Whether to include all possible information available in the full a11y tree. Default is false."),
        filePath: z.string().optional().describe("The absolute path, or a path relative to the current working directory, to save the snapshot to instead of attaching it to the response.")
      },
      handler: async (request3, response) => {
        response.includeSnapshot({
          verbose: request3.params.verbose ?? false,
          filePath: request3.params.filePath
        });
      }
    });
    waitFor = definePageTool({
      name: "wait_for",
      description: `Wait for the specified text to appear on the selected page.`,
      annotations: {
        category: ToolCategory.NAVIGATION,
        readOnlyHint: true
      },
      schema: {
        text: z.array(z.string()).min(1).describe("Non-empty list of texts. Resolves when any value appears on the page."),
        ...timeoutSchema
      },
      handler: async (request3, response, context2) => {
        const page = request3.page;
        await context2.waitForTextOnPage(request3.params.text, request3.params.timeout, page.pptrPage);
        response.appendResponseLine(`Element matching one of ${JSON.stringify(request3.params.text)} found.`);
        response.includeSnapshot();
      }
    });
  }
});

// ../../node_modules/chrome-devtools-mcp/build/src/McpPage.js
var McpPage;
var init_McpPage = __esm({
  async "../../node_modules/chrome-devtools-mcp/build/src/McpPage.js"() {
    await init_snapshot();
    McpPage = class {
      pptrPage;
      id;
      // Snapshot
      textSnapshot = null;
      uniqueBackendNodeIdToMcpId = /* @__PURE__ */ new Map();
      // Emulation
      emulationSettings = {};
      // Metadata
      isolatedContextName;
      devToolsPage;
      // Dialog
      #dialog;
      #dialogHandler;
      constructor(page, id2) {
        this.pptrPage = page;
        this.id = id2;
        this.#dialogHandler = (dialog) => {
          this.#dialog = dialog;
        };
        page.on("dialog", this.#dialogHandler);
      }
      get dialog() {
        return this.#dialog;
      }
      getDialog() {
        return this.dialog;
      }
      clearDialog() {
        this.#dialog = void 0;
      }
      get networkConditions() {
        return this.emulationSettings.networkConditions ?? null;
      }
      get cpuThrottlingRate() {
        return this.emulationSettings.cpuThrottlingRate ?? 1;
      }
      get geolocation() {
        return this.emulationSettings.geolocation ?? null;
      }
      get viewport() {
        return this.emulationSettings.viewport ?? null;
      }
      get userAgent() {
        return this.emulationSettings.userAgent ?? null;
      }
      get colorScheme() {
        return this.emulationSettings.colorScheme ?? null;
      }
      dispose() {
        this.pptrPage.off("dialog", this.#dialogHandler);
      }
      async getElementByUid(uid2) {
        if (!this.textSnapshot) {
          throw new Error(`No snapshot found for page ${this.id ?? "?"}. Use ${takeSnapshot.name} to capture one.`);
        }
        const node2 = this.textSnapshot.idToNode.get(uid2);
        if (!node2) {
          throw new Error(`Element uid "${uid2}" not found on page ${this.id}.`);
        }
        return this.#resolveElementHandle(node2, uid2);
      }
      async #resolveElementHandle(node2, uid2) {
        const message = `Element with uid ${uid2} no longer exists on the page.`;
        try {
          const handle = await node2.elementHandle();
          if (!handle) {
            throw new Error(message);
          }
          return handle;
        } catch (error) {
          throw new Error(message, {
            cause: error
          });
        }
      }
      getAXNodeByUid(uid2) {
        return this.textSnapshot?.idToNode.get(uid2);
      }
    };
  }
});

// ../../node_modules/chrome-devtools-mcp/build/src/PageCollector.js
function createIdGenerator() {
  let i = 1;
  return () => {
    if (i === Number.MAX_SAFE_INTEGER) {
      i = 0;
    }
    return i++;
  };
}
var UncaughtError, stableIdSymbol, PageCollector, ConsoleCollector, PageEventSubscriber, NetworkCollector;
var init_PageCollector = __esm({
  async "../../node_modules/chrome-devtools-mcp/build/src/PageCollector.js"() {
    await init_DevtoolsUtils();
    await init_logger();
    await init_third_party();
    UncaughtError = class {
      details;
      targetId;
      constructor(details, targetId) {
        this.details = details;
        this.targetId = targetId;
      }
    };
    stableIdSymbol = Symbol("stableIdSymbol");
    PageCollector = class {
      #browser;
      #listenersInitializer;
      #listeners = /* @__PURE__ */ new WeakMap();
      #maxNavigationSaved = 3;
      /**
       * This maps a Page to a list of navigations with a sub-list
       * of all collected resources.
       * The newer navigations come first.
       */
      storage = /* @__PURE__ */ new WeakMap();
      constructor(browser3, listeners) {
        this.#browser = browser3;
        this.#listenersInitializer = listeners;
      }
      async init(pages) {
        for (const page of pages) {
          this.addPage(page);
        }
        this.#browser.on("targetcreated", this.#onTargetCreated);
        this.#browser.on("targetdestroyed", this.#onTargetDestroyed);
      }
      dispose() {
        this.#browser.off("targetcreated", this.#onTargetCreated);
        this.#browser.off("targetdestroyed", this.#onTargetDestroyed);
      }
      #onTargetCreated = async (target) => {
        try {
          const page = await target.page();
          if (!page) {
            return;
          }
          this.addPage(page);
        } catch (err) {
          logger("Error getting a page for a target onTargetCreated", err);
        }
      };
      #onTargetDestroyed = async (target) => {
        try {
          const page = await target.page();
          if (!page) {
            return;
          }
          this.cleanupPageDestroyed(page);
        } catch (err) {
          logger("Error getting a page for a target onTargetDestroyed", err);
        }
      };
      addPage(page) {
        this.#initializePage(page);
      }
      #initializePage(page) {
        if (this.storage.has(page)) {
          return;
        }
        const idGenerator = createIdGenerator();
        const storedLists = [[]];
        this.storage.set(page, storedLists);
        const listeners = this.#listenersInitializer((value) => {
          const withId = value;
          withId[stableIdSymbol] = idGenerator();
          const navigations = this.storage.get(page) ?? [[]];
          navigations[0].push(withId);
        });
        listeners["framenavigated"] = (frame) => {
          if (frame !== page.mainFrame()) {
            return;
          }
          this.splitAfterNavigation(page);
        };
        for (const [name, listener] of Object.entries(listeners)) {
          page.on(name, listener);
        }
        this.#listeners.set(page, listeners);
      }
      splitAfterNavigation(page) {
        const navigations = this.storage.get(page);
        if (!navigations) {
          return;
        }
        navigations.unshift([]);
        navigations.splice(this.#maxNavigationSaved);
      }
      cleanupPageDestroyed(page) {
        const listeners = this.#listeners.get(page);
        if (listeners) {
          for (const [name, listener] of Object.entries(listeners)) {
            page.off(name, listener);
          }
        }
        this.storage.delete(page);
      }
      getData(page, includePreservedData) {
        const navigations = this.storage.get(page);
        if (!navigations) {
          return [];
        }
        if (!includePreservedData) {
          return navigations[0];
        }
        const data32 = [];
        for (let index2 = this.#maxNavigationSaved; index2 >= 0; index2--) {
          if (navigations[index2]) {
            data32.push(...navigations[index2]);
          }
        }
        return data32;
      }
      getIdForResource(resource) {
        return resource[stableIdSymbol] ?? -1;
      }
      getById(page, stableId) {
        const navigations = this.storage.get(page);
        if (!navigations) {
          throw new Error("No requests found for selected page");
        }
        const item = this.find(page, (item2) => item2[stableIdSymbol] === stableId);
        if (item) {
          return item;
        }
        throw new Error("Request not found for selected page");
      }
      find(page, filter2) {
        const navigations = this.storage.get(page);
        if (!navigations) {
          return;
        }
        for (const navigation2 of navigations) {
          const item = navigation2.find(filter2);
          if (item) {
            return item;
          }
        }
        return;
      }
    };
    ConsoleCollector = class extends PageCollector {
      #subscribedPages = /* @__PURE__ */ new WeakMap();
      addPage(page) {
        super.addPage(page);
        if (!this.#subscribedPages.has(page)) {
          const subscriber = new PageEventSubscriber(page);
          this.#subscribedPages.set(page, subscriber);
          void subscriber.subscribe();
        }
      }
      cleanupPageDestroyed(page) {
        super.cleanupPageDestroyed(page);
        this.#subscribedPages.get(page)?.unsubscribe();
        this.#subscribedPages.delete(page);
      }
    };
    PageEventSubscriber = class {
      #issueManager = new FakeIssuesManager();
      #issueAggregator = new mcp.IssueAggregator(this.#issueManager);
      #seenKeys = /* @__PURE__ */ new Set();
      #seenIssues = /* @__PURE__ */ new Set();
      #page;
      #session;
      #targetId;
      constructor(page) {
        this.#page = page;
        this.#session = this.#page._client();
        this.#targetId = this.#session.target()._targetId;
      }
      #resetIssueAggregator() {
        this.#issueManager = new FakeIssuesManager();
        if (this.#issueAggregator) {
          this.#issueAggregator.removeEventListener("AggregatedIssueUpdated", this.#onAggregatedissue);
        }
        this.#issueAggregator = new mcp.IssueAggregator(this.#issueManager);
        this.#issueAggregator.addEventListener("AggregatedIssueUpdated", this.#onAggregatedissue);
      }
      async subscribe() {
        this.#resetIssueAggregator();
        this.#page.on("framenavigated", this.#onFrameNavigated);
        this.#session.on("Audits.issueAdded", this.#onIssueAdded);
        this.#session.on("Runtime.exceptionThrown", this.#onExceptionThrown);
        try {
          await this.#session.send("Audits.enable");
        } catch (error) {
          logger("Error subscribing to issues", error);
        }
      }
      unsubscribe() {
        this.#seenKeys.clear();
        this.#seenIssues.clear();
        this.#page.off("framenavigated", this.#onFrameNavigated);
        this.#session.off("Audits.issueAdded", this.#onIssueAdded);
        this.#session.off("Runtime.exceptionThrown", this.#onExceptionThrown);
        if (this.#issueAggregator) {
          this.#issueAggregator.removeEventListener("AggregatedIssueUpdated", this.#onAggregatedissue);
        }
        void this.#session.send("Audits.disable").catch(() => {
        });
      }
      #onAggregatedissue = (event) => {
        if (this.#seenIssues.has(event.data)) {
          return;
        }
        this.#seenIssues.add(event.data);
        this.#page.emit("issue", event.data);
      };
      #onExceptionThrown = (event) => {
        this.#page.emit("uncaughtError", new UncaughtError(event.exceptionDetails, this.#targetId));
      };
      // On navigation, we reset issue aggregation.
      #onFrameNavigated = (frame) => {
        if (frame !== frame.page().mainFrame()) {
          return;
        }
        this.#seenKeys.clear();
        this.#seenIssues.clear();
        this.#resetIssueAggregator();
      };
      #onIssueAdded = (data32) => {
        try {
          const inspectorIssue = data32.issue;
          const issue2 = mcp.createIssuesFromProtocolIssue(
            null,
            // @ts-expect-error Protocol types diverge.
            inspectorIssue
          )[0];
          if (!issue2) {
            logger("No issue mapping for for the issue: ", inspectorIssue.code);
            return;
          }
          const primaryKey = issue2.primaryKey();
          if (this.#seenKeys.has(primaryKey)) {
            return;
          }
          this.#seenKeys.add(primaryKey);
          this.#issueManager.dispatchEventToListeners("IssueAdded", {
            issue: issue2,
            // @ts-expect-error We don't care that issues model is null
            issuesModel: null
          });
        } catch (error) {
          logger("Error creating a new issue", error);
        }
      };
    };
    NetworkCollector = class extends PageCollector {
      constructor(browser3, listeners = (collect) => {
        return {
          request: (req) => {
            collect(req);
          }
        };
      }) {
        super(browser3, listeners);
      }
      splitAfterNavigation(page) {
        const navigations = this.storage.get(page) ?? [];
        if (!navigations) {
          return;
        }
        const requests = navigations[0];
        const lastRequestIdx = requests.findLastIndex((request3) => {
          return request3.frame() === page.mainFrame() ? request3.isNavigationRequest() : false;
        });
        if (lastRequestIdx !== -1) {
          const fromCurrentNavigation = requests.splice(lastRequestIdx);
          navigations.unshift(fromCurrentNavigation);
        } else {
          navigations.unshift([]);
        }
      }
    };
  }
});

// ../../node_modules/chrome-devtools-mcp/build/src/tools/pages.js
var pages_exports = {};
__export(pages_exports, {
  closePage: () => closePage,
  getTabId: () => getTabId,
  handleDialog: () => handleDialog,
  listPages: () => listPages,
  navigatePage: () => navigatePage,
  newPage: () => newPage,
  resizePage: () => resizePage,
  selectPage: () => selectPage
});
var listPages, selectPage, closePage, newPage, navigatePage, resizePage, handleDialog, getTabId;
var init_pages = __esm({
  async "../../node_modules/chrome-devtools-mcp/build/src/tools/pages.js"() {
    await init_logger();
    await init_third_party();
    init_categories();
    await init_ToolDefinition();
    listPages = definePageTool((args2) => {
      return {
        name: "list_pages",
        description: `Get a list of pages ${args2?.categoryExtensions ? "including extension service workers" : ""} open in the browser.`,
        annotations: {
          category: ToolCategory.NAVIGATION,
          readOnlyHint: true
        },
        schema: {},
        handler: async (_request, response) => {
          response.setIncludePages(true);
        }
      };
    });
    selectPage = defineTool({
      name: "select_page",
      description: `Select a page as a context for future tool calls.`,
      annotations: {
        category: ToolCategory.NAVIGATION,
        readOnlyHint: true
      },
      schema: {
        pageId: z.number().describe(`The ID of the page to select. Call ${listPages().name} to get available pages.`),
        bringToFront: z.boolean().optional().describe("Whether to focus the page and bring it to the top.")
      },
      handler: async (request3, response, context2) => {
        const page = context2.getPageById(request3.params.pageId);
        context2.selectPage(page);
        response.setIncludePages(true);
        if (request3.params.bringToFront) {
          await page.pptrPage.bringToFront();
        }
      }
    });
    closePage = defineTool({
      name: "close_page",
      description: `Closes the page by its index. The last open page cannot be closed.`,
      annotations: {
        category: ToolCategory.NAVIGATION,
        readOnlyHint: false
      },
      schema: {
        pageId: z.number().describe("The ID of the page to close. Call list_pages to list pages.")
      },
      handler: async (request3, response, context2) => {
        try {
          await context2.closePage(request3.params.pageId);
        } catch (err) {
          if (err.message === CLOSE_PAGE_ERROR) {
            response.appendResponseLine(err.message);
          } else {
            throw err;
          }
        }
        response.setIncludePages(true);
      }
    });
    newPage = defineTool({
      name: "new_page",
      description: `Open a new tab and load a URL. Use project URL if not specified otherwise.`,
      annotations: {
        category: ToolCategory.NAVIGATION,
        readOnlyHint: false
      },
      schema: {
        url: z.string().describe("URL to load in a new page."),
        background: z.boolean().optional().describe("Whether to open the page in the background without bringing it to the front. Default is false (foreground)."),
        isolatedContext: z.string().optional().describe("If specified, the page is created in an isolated browser context with the given name. Pages in the same browser context share cookies and storage. Pages in different browser contexts are fully isolated."),
        ...timeoutSchema
      },
      handler: async (request3, response, context2) => {
        const page = await context2.newPage(request3.params.background, request3.params.isolatedContext);
        await context2.waitForEventsAfterAction(async () => {
          await page.pptrPage.goto(request3.params.url, {
            timeout: request3.params.timeout
          });
        }, { timeout: request3.params.timeout });
        response.setIncludePages(true);
      }
    });
    navigatePage = definePageTool({
      name: "navigate_page",
      description: `Go to a URL, or back, forward, or reload. Use project URL if not specified otherwise.`,
      annotations: {
        category: ToolCategory.NAVIGATION,
        readOnlyHint: false
      },
      schema: {
        type: z.enum(["url", "back", "forward", "reload"]).optional().describe("Navigate the page by URL, back or forward in history, or reload."),
        url: z.string().optional().describe("Target URL (only type=url)"),
        ignoreCache: z.boolean().optional().describe("Whether to ignore cache on reload."),
        handleBeforeUnload: z.enum(["accept", "decline"]).optional().describe("Whether to auto accept or beforeunload dialogs triggered by this navigation. Default is accept."),
        initScript: z.string().optional().describe("A JavaScript script to be executed on each new document before any other scripts for the next navigation."),
        ...timeoutSchema
      },
      handler: async (request3, response, context2) => {
        const page = request3.page;
        const options2 = {
          timeout: request3.params.timeout
        };
        if (!request3.params.type && !request3.params.url) {
          throw new Error("Either URL or a type is required.");
        }
        if (!request3.params.type) {
          request3.params.type = "url";
        }
        const handleBeforeUnload = request3.params.handleBeforeUnload ?? "accept";
        const dialogHandler = (dialog) => {
          if (dialog.type() === "beforeunload") {
            if (handleBeforeUnload === "accept") {
              response.appendResponseLine(`Accepted a beforeunload dialog.`);
              void dialog.accept();
            } else {
              response.appendResponseLine(`Declined a beforeunload dialog.`);
              void dialog.dismiss();
            }
            page.clearDialog();
          }
        };
        let initScriptId;
        if (request3.params.initScript) {
          const { identifier } = await page.pptrPage.evaluateOnNewDocument(request3.params.initScript);
          initScriptId = identifier;
        }
        page.pptrPage.on("dialog", dialogHandler);
        try {
          await context2.waitForEventsAfterAction(async () => {
            switch (request3.params.type) {
              case "url":
                if (!request3.params.url) {
                  throw new Error("A URL is required for navigation of type=url.");
                }
                try {
                  await page.pptrPage.goto(request3.params.url, options2);
                  response.appendResponseLine(`Successfully navigated to ${request3.params.url}.`);
                } catch (error) {
                  response.appendResponseLine(`Unable to navigate in the  selected page: ${error.message}.`);
                }
                break;
              case "back":
                try {
                  await page.pptrPage.goBack(options2);
                  response.appendResponseLine(`Successfully navigated back to ${page.pptrPage.url()}.`);
                } catch (error) {
                  response.appendResponseLine(`Unable to navigate back in the selected page: ${error.message}.`);
                }
                break;
              case "forward":
                try {
                  await page.pptrPage.goForward(options2);
                  response.appendResponseLine(`Successfully navigated forward to ${page.pptrPage.url()}.`);
                } catch (error) {
                  response.appendResponseLine(`Unable to navigate forward in the selected page: ${error.message}.`);
                }
                break;
              case "reload":
                try {
                  await page.pptrPage.reload({
                    ...options2,
                    ignoreCache: request3.params.ignoreCache
                  });
                  response.appendResponseLine(`Successfully reloaded the page.`);
                } catch (error) {
                  response.appendResponseLine(`Unable to reload the selected page: ${error.message}.`);
                }
                break;
            }
          }, { timeout: request3.params.timeout });
        } finally {
          page.pptrPage.off("dialog", dialogHandler);
          if (initScriptId) {
            await page.pptrPage.removeScriptToEvaluateOnNewDocument(initScriptId).catch((error) => {
              logger(`Failed to remove init script`, error);
            });
          }
        }
        response.setIncludePages(true);
      }
    });
    resizePage = definePageTool({
      name: "resize_page",
      description: `Resizes the selected page's window so that the page has specified dimension`,
      annotations: {
        category: ToolCategory.EMULATION,
        readOnlyHint: false
      },
      schema: {
        width: z.number().describe("Page width"),
        height: z.number().describe("Page height")
      },
      handler: async (request3, response, _context) => {
        const page = request3.page;
        try {
          const browser3 = page.pptrPage.browser();
          const windowId = await page.pptrPage.windowId();
          const bounds = await browser3.getWindowBounds(windowId);
          if (bounds.windowState === "fullscreen") {
            await browser3.setWindowBounds(windowId, { windowState: "normal" });
            await browser3.setWindowBounds(windowId, { windowState: "normal" });
          } else if (bounds.windowState !== "normal") {
            await browser3.setWindowBounds(windowId, { windowState: "normal" });
          }
        } catch {
        }
        await page.pptrPage.resize({
          contentWidth: request3.params.width,
          contentHeight: request3.params.height
        });
        response.setIncludePages(true);
      }
    });
    handleDialog = definePageTool({
      name: "handle_dialog",
      description: `If a browser dialog was opened, use this command to handle it`,
      annotations: {
        category: ToolCategory.INPUT,
        readOnlyHint: false
      },
      schema: {
        action: z.enum(["accept", "dismiss"]).describe("Whether to dismiss or accept the dialog"),
        promptText: z.string().optional().describe("Optional prompt text to enter into the dialog.")
      },
      handler: async (request3, response, _context) => {
        const page = request3.page;
        const dialog = page.getDialog();
        if (!dialog) {
          throw new Error("No open dialog found");
        }
        switch (request3.params.action) {
          case "accept": {
            try {
              await dialog.accept(request3.params.promptText);
            } catch (err) {
              logger(err);
            }
            response.appendResponseLine("Successfully accepted the dialog");
            break;
          }
          case "dismiss": {
            try {
              await dialog.dismiss();
            } catch (err) {
              logger(err);
            }
            response.appendResponseLine("Successfully dismissed the dialog");
            break;
          }
        }
        page.clearDialog();
        response.setIncludePages(true);
      }
    });
    getTabId = definePageTool({
      name: "get_tab_id",
      description: `Get the tab ID of the page`,
      annotations: {
        category: ToolCategory.NAVIGATION,
        readOnlyHint: true,
        conditions: ["experimentalInteropTools"]
      },
      schema: {
        pageId: z.number().describe(`The ID of the page to get the tab ID for. Call ${listPages().name} to get available pages.`)
      },
      handler: async (request3, response, context2) => {
        const page = context2.getPageById(request3.params.pageId);
        const tabId = page.pptrPage._tabId;
        response.setTabId(tabId);
      }
    });
  }
});

// ../../node_modules/chrome-devtools-mcp/build/src/utils/ExtensionRegistry.js
import fs6 from "node:fs/promises";
import path10 from "node:path";
var ExtensionRegistry;
var init_ExtensionRegistry = __esm({
  "../../node_modules/chrome-devtools-mcp/build/src/utils/ExtensionRegistry.js"() {
    ExtensionRegistry = class {
      #extensions = /* @__PURE__ */ new Map();
      async registerExtension(id2, extensionPath) {
        const manifestPath = path10.join(extensionPath, "manifest.json");
        const manifestContent = await fs6.readFile(manifestPath, "utf-8");
        const manifest = JSON.parse(manifestContent);
        const name = manifest.name ?? "Unknown";
        const version3 = manifest.version ?? "Unknown";
        const extension2 = {
          id: id2,
          name,
          version: version3,
          isEnabled: true,
          path: extensionPath
        };
        this.#extensions.set(extension2.id, extension2);
        return extension2;
      }
      remove(id2) {
        this.#extensions.delete(id2);
      }
      list() {
        return Array.from(this.#extensions.values());
      }
      getById(id2) {
        return this.#extensions.get(id2);
      }
    };
  }
});

// ../../node_modules/chrome-devtools-mcp/build/src/utils/files.js
import fs7 from "node:fs/promises";
import os3 from "node:os";
import path11 from "node:path";
async function saveTemporaryFile(data32, filename) {
  try {
    const dir = await fs7.mkdtemp(path11.join(os3.tmpdir(), "chrome-devtools-mcp-"));
    const filepath = path11.join(dir, filename);
    await fs7.writeFile(filepath, data32);
    return { filepath };
  } catch (err) {
    throw new Error("Could not save a file", { cause: err });
  }
}
var init_files = __esm({
  "../../node_modules/chrome-devtools-mcp/build/src/utils/files.js"() {
  }
});

// ../../node_modules/chrome-devtools-mcp/build/src/WaitForHelper.js
var WaitForHelper;
var init_WaitForHelper = __esm({
  async "../../node_modules/chrome-devtools-mcp/build/src/WaitForHelper.js"() {
    await init_logger();
    WaitForHelper = class {
      #abortController = new AbortController();
      #page;
      #stableDomTimeout;
      #stableDomFor;
      #expectNavigationIn;
      #navigationTimeout;
      constructor(page, cpuTimeoutMultiplier, networkTimeoutMultiplier) {
        this.#stableDomTimeout = 3e3 * cpuTimeoutMultiplier;
        this.#stableDomFor = 100 * cpuTimeoutMultiplier;
        this.#expectNavigationIn = 100 * cpuTimeoutMultiplier;
        this.#navigationTimeout = 3e3 * networkTimeoutMultiplier;
        this.#page = page;
      }
      /**
       * A wrapper that executes a action and waits for
       * a potential navigation, after which it waits
       * for the DOM to be stable before returning.
       */
      async waitForStableDom() {
        const stableDomObserver = await this.#page.evaluateHandle((timeout2) => {
          let timeoutId;
          function callback() {
            clearTimeout(timeoutId);
            timeoutId = setTimeout(() => {
              domObserver.resolver.resolve();
              domObserver.observer.disconnect();
            }, timeout2);
          }
          const domObserver = {
            resolver: Promise.withResolvers(),
            observer: new MutationObserver(callback)
          };
          callback();
          domObserver.observer.observe(document.body, {
            childList: true,
            subtree: true,
            attributes: true
          });
          return domObserver;
        }, this.#stableDomFor);
        this.#abortController.signal.addEventListener("abort", async () => {
          try {
            await stableDomObserver.evaluate((observer) => {
              observer.observer.disconnect();
              observer.resolver.resolve();
            });
            await stableDomObserver.dispose();
          } catch {
          }
        });
        return Promise.race([
          stableDomObserver.evaluate(async (observer) => {
            return await observer.resolver.promise;
          }),
          this.timeout(this.#stableDomTimeout).then(() => {
            throw new Error("Timeout");
          })
        ]);
      }
      async waitForNavigationStarted() {
        const navigationStartedPromise = new Promise((resolve2) => {
          const listener = (event) => {
            if ([
              "historySameDocument",
              "historyDifferentDocument",
              "sameDocument"
            ].includes(event.navigationType)) {
              resolve2(false);
              return;
            }
            resolve2(true);
          };
          this.#page._client().on("Page.frameStartedNavigating", listener);
          this.#abortController.signal.addEventListener("abort", () => {
            resolve2(false);
            this.#page._client().off("Page.frameStartedNavigating", listener);
          });
        });
        return await Promise.race([
          navigationStartedPromise,
          this.timeout(this.#expectNavigationIn).then(() => false)
        ]);
      }
      timeout(time2) {
        return new Promise((res) => {
          const id2 = setTimeout(res, time2);
          this.#abortController.signal.addEventListener("abort", () => {
            res();
            clearTimeout(id2);
          });
        });
      }
      async waitForEventsAfterAction(action, options2) {
        const navigationFinished = this.waitForNavigationStarted().then((navigationStated) => {
          if (navigationStated) {
            return this.#page.waitForNavigation({
              timeout: options2?.timeout ?? this.#navigationTimeout,
              signal: this.#abortController.signal
            });
          }
          return;
        }).catch((error) => logger(error));
        try {
          await action();
        } catch (error) {
          this.#abortController.abort();
          throw error;
        }
        try {
          await navigationFinished;
          await this.waitForStableDom();
        } catch (error) {
          logger(error);
        } finally {
          this.#abortController.abort();
        }
      }
    };
  }
});

// ../../node_modules/chrome-devtools-mcp/build/src/McpContext.js
import fs8 from "node:fs/promises";
import path12 from "node:path";
function getNetworkMultiplierFromString(condition) {
  const puppeteerCondition = condition;
  switch (puppeteerCondition) {
    case "Fast 4G":
      return 1;
    case "Slow 4G":
      return 2.5;
    case "Fast 3G":
      return 5;
    case "Slow 3G":
      return 10;
  }
  return 1;
}
var DEFAULT_TIMEOUT2, NAVIGATION_TIMEOUT, McpContext;
var init_McpContext = __esm({
  async "../../node_modules/chrome-devtools-mcp/build/src/McpContext.js"() {
    await init_DevtoolsUtils();
    await init_McpPage();
    await init_PageCollector();
    await init_third_party();
    await init_third_party();
    await init_pages();
    await init_ToolDefinition();
    init_ExtensionRegistry();
    init_files();
    await init_WaitForHelper();
    DEFAULT_TIMEOUT2 = 5e3;
    NAVIGATION_TIMEOUT = 1e4;
    McpContext = class _McpContext {
      browser;
      logger;
      // Maps LLM-provided isolatedContext name → Puppeteer BrowserContext.
      #isolatedContexts = /* @__PURE__ */ new Map();
      // Auto-generated name counter for when no name is provided.
      #nextIsolatedContextId = 1;
      #pages = [];
      #extensionServiceWorkers = [];
      #mcpPages = /* @__PURE__ */ new Map();
      #selectedPage;
      #networkCollector;
      #consoleCollector;
      #devtoolsUniverseManager;
      #extensionRegistry = new ExtensionRegistry();
      #isRunningTrace = false;
      #screenRecorderData = null;
      #nextPageId = 1;
      #extensionServiceWorkerMap = /* @__PURE__ */ new WeakMap();
      #nextExtensionServiceWorkerId = 1;
      #nextSnapshotId = 1;
      #traceResults = [];
      #locatorClass;
      #options;
      constructor(browser3, logger2, options2, locatorClass) {
        this.browser = browser3;
        this.logger = logger2;
        this.#locatorClass = locatorClass;
        this.#options = options2;
        this.#networkCollector = new NetworkCollector(this.browser);
        this.#consoleCollector = new ConsoleCollector(this.browser, (collect) => {
          return {
            console: (event) => {
              collect(event);
            },
            uncaughtError: (event) => {
              collect(event);
            },
            issue: (event) => {
              collect(event);
            }
          };
        });
        this.#devtoolsUniverseManager = new UniverseManager(this.browser);
      }
      async #init() {
        const pages = await this.createPagesSnapshot();
        await this.createExtensionServiceWorkersSnapshot();
        await this.#networkCollector.init(pages);
        await this.#consoleCollector.init(pages);
        await this.#devtoolsUniverseManager.init(pages);
      }
      dispose() {
        this.#networkCollector.dispose();
        this.#consoleCollector.dispose();
        this.#devtoolsUniverseManager.dispose();
        for (const mcpPage of this.#mcpPages.values()) {
          mcpPage.dispose();
        }
        this.#mcpPages.clear();
        this.#isolatedContexts.clear();
      }
      static async from(browser3, logger2, opts, locatorClass = Locator) {
        const context2 = new _McpContext(browser3, logger2, opts, locatorClass);
        await context2.#init();
        return context2;
      }
      resolveCdpRequestId(page, cdpRequestId) {
        if (!cdpRequestId) {
          this.logger("no network request");
          return;
        }
        const request3 = this.#networkCollector.find(page.pptrPage, (request4) => {
          return request4.id === cdpRequestId;
        });
        if (!request3) {
          this.logger("no network request for " + cdpRequestId);
          return;
        }
        return this.#networkCollector.getIdForResource(request3);
      }
      resolveCdpElementId(page, cdpBackendNodeId) {
        if (!cdpBackendNodeId) {
          this.logger("no cdpBackendNodeId");
          return;
        }
        const snapshot2 = page.textSnapshot;
        if (!snapshot2) {
          this.logger("no text snapshot");
          return;
        }
        const queue = [snapshot2.root];
        while (queue.length) {
          const current = queue.pop();
          if (current.backendNodeId === cdpBackendNodeId) {
            return current.id;
          }
          for (const child of current.children) {
            queue.push(child);
          }
        }
        return;
      }
      getNetworkRequests(page, includePreservedRequests) {
        return this.#networkCollector.getData(page.pptrPage, includePreservedRequests);
      }
      getConsoleData(page, includePreservedMessages) {
        return this.#consoleCollector.getData(page.pptrPage, includePreservedMessages);
      }
      getDevToolsUniverse(page) {
        return this.#devtoolsUniverseManager.get(page.pptrPage);
      }
      getConsoleMessageStableId(message) {
        return this.#consoleCollector.getIdForResource(message);
      }
      getConsoleMessageById(page, id2) {
        return this.#consoleCollector.getById(page.pptrPage, id2);
      }
      async newPage(background, isolatedContextName) {
        let page;
        if (isolatedContextName !== void 0) {
          let ctx = this.#isolatedContexts.get(isolatedContextName);
          if (!ctx) {
            ctx = await this.browser.createBrowserContext();
            this.#isolatedContexts.set(isolatedContextName, ctx);
          }
          page = await ctx.newPage();
        } else {
          page = await this.browser.newPage({ background });
        }
        await this.createPagesSnapshot();
        this.selectPage(this.#getMcpPage(page));
        this.#networkCollector.addPage(page);
        this.#consoleCollector.addPage(page);
        return this.#getMcpPage(page);
      }
      async closePage(pageId) {
        if (this.#pages.length === 1) {
          throw new Error(CLOSE_PAGE_ERROR);
        }
        const page = this.getPageById(pageId);
        if (page) {
          page.dispose();
          this.#mcpPages.delete(page.pptrPage);
        }
        await page.pptrPage.close({ runBeforeUnload: false });
      }
      getNetworkRequestById(page, reqid) {
        return this.#networkCollector.getById(page.pptrPage, reqid);
      }
      async restoreEmulation(page) {
        const currentSetting = page.emulationSettings;
        await this.emulate(currentSetting, page.pptrPage);
      }
      async emulate(options2, targetPage) {
        const page = targetPage ?? this.getSelectedPptrPage();
        const mcpPage = this.#getMcpPage(page);
        const newSettings = { ...mcpPage.emulationSettings };
        if (!options2.networkConditions) {
          await page.emulateNetworkConditions(null);
          delete newSettings.networkConditions;
        } else if (options2.networkConditions === "Offline") {
          await page.emulateNetworkConditions({
            offline: true,
            download: 0,
            upload: 0,
            latency: 0
          });
          newSettings.networkConditions = "Offline";
        } else if (options2.networkConditions in PredefinedNetworkConditions) {
          const networkCondition = PredefinedNetworkConditions[options2.networkConditions];
          await page.emulateNetworkConditions(networkCondition);
          newSettings.networkConditions = options2.networkConditions;
        }
        if (!options2.cpuThrottlingRate) {
          await page.emulateCPUThrottling(1);
          delete newSettings.cpuThrottlingRate;
        } else {
          await page.emulateCPUThrottling(options2.cpuThrottlingRate);
          newSettings.cpuThrottlingRate = options2.cpuThrottlingRate;
        }
        if (!options2.geolocation) {
          await page.setGeolocation({ latitude: 0, longitude: 0 });
          delete newSettings.geolocation;
        } else {
          await page.setGeolocation(options2.geolocation);
          newSettings.geolocation = options2.geolocation;
        }
        if (!options2.userAgent) {
          await page.setUserAgent({ userAgent: void 0 });
          delete newSettings.userAgent;
        } else {
          await page.setUserAgent({ userAgent: options2.userAgent });
          newSettings.userAgent = options2.userAgent;
        }
        if (!options2.colorScheme || options2.colorScheme === "auto") {
          await page.emulateMediaFeatures([
            { name: "prefers-color-scheme", value: "" }
          ]);
          delete newSettings.colorScheme;
        } else {
          await page.emulateMediaFeatures([
            { name: "prefers-color-scheme", value: options2.colorScheme }
          ]);
          newSettings.colorScheme = options2.colorScheme;
        }
        if (!options2.viewport) {
          await page.setViewport(null);
          delete newSettings.viewport;
        } else {
          const defaults3 = {
            deviceScaleFactor: 1,
            isMobile: false,
            hasTouch: false,
            isLandscape: false
          };
          const viewport = { ...defaults3, ...options2.viewport };
          await page.setViewport(viewport);
          newSettings.viewport = viewport;
        }
        mcpPage.emulationSettings = Object.keys(newSettings).length ? newSettings : {};
        this.#updateSelectedPageTimeouts();
      }
      setIsRunningPerformanceTrace(x) {
        this.#isRunningTrace = x;
      }
      isRunningPerformanceTrace() {
        return this.#isRunningTrace;
      }
      getScreenRecorder() {
        return this.#screenRecorderData;
      }
      setScreenRecorder(data32) {
        this.#screenRecorderData = data32;
      }
      isCruxEnabled() {
        return this.#options.performanceCrux;
      }
      getSelectedPptrPage() {
        const page = this.#selectedPage;
        if (!page) {
          throw new Error("No page selected");
        }
        if (page.pptrPage.isClosed()) {
          throw new Error(`The selected page has been closed. Call ${listPages().name} to see open pages.`);
        }
        return page.pptrPage;
      }
      getSelectedMcpPage() {
        const page = this.getSelectedPptrPage();
        return this.#getMcpPage(page);
      }
      getPageById(pageId) {
        const page = this.#mcpPages.values().find((mcpPage) => mcpPage.id === pageId);
        if (!page) {
          throw new Error("No page found");
        }
        return page;
      }
      getPageId(page) {
        return this.#mcpPages.get(page)?.id;
      }
      #getMcpPage(page) {
        const mcpPage = this.#mcpPages.get(page);
        if (!mcpPage) {
          throw new Error("No McpPage found for the given page.");
        }
        return mcpPage;
      }
      #getSelectedMcpPage() {
        return this.#getMcpPage(this.getSelectedPptrPage());
      }
      isPageSelected(page) {
        return this.#selectedPage?.pptrPage === page;
      }
      selectPage(newPage2) {
        this.#selectedPage = newPage2;
        this.#updateSelectedPageTimeouts();
      }
      #updateSelectedPageTimeouts() {
        const page = this.#getSelectedMcpPage();
        const cpuMultiplier = page.cpuThrottlingRate;
        page.pptrPage.setDefaultTimeout(DEFAULT_TIMEOUT2 * cpuMultiplier);
        const networkMultiplier = getNetworkMultiplierFromString(page.networkConditions);
        page.pptrPage.setDefaultNavigationTimeout(NAVIGATION_TIMEOUT * networkMultiplier);
      }
      // Linear scan over per-page snapshots. The page count is small (typically
      // 2-10) so a reverse index isn't worthwhile given the uid-reuse lifecycle
      // complexity it would introduce.
      getAXNodeByUid(uid2) {
        for (const mcpPage of this.#mcpPages.values()) {
          const node2 = mcpPage.textSnapshot?.idToNode.get(uid2);
          if (node2) {
            return node2;
          }
        }
        return void 0;
      }
      /**
       * Creates a snapshot of the extension service workers.
       */
      async createExtensionServiceWorkersSnapshot() {
        const allTargets = await this.browser.targets();
        const serviceWorkers = allTargets.filter((target) => {
          return target.type() === "service_worker" && target.url().includes("chrome-extension://");
        });
        for (const serviceWorker of serviceWorkers) {
          if (!this.#extensionServiceWorkerMap.has(serviceWorker)) {
            this.#extensionServiceWorkerMap.set(serviceWorker, "sw-" + this.#nextExtensionServiceWorkerId++);
          }
        }
        this.#extensionServiceWorkers = serviceWorkers.map((serviceWorker) => {
          return {
            target: serviceWorker,
            id: this.#extensionServiceWorkerMap.get(serviceWorker),
            url: serviceWorker.url()
          };
        });
        return this.#extensionServiceWorkers;
      }
      async createPagesSnapshot() {
        const { pages: allPages, isolatedContextNames } = await this.#getAllPages();
        for (const page of allPages) {
          let mcpPage = this.#mcpPages.get(page);
          if (!mcpPage) {
            mcpPage = new McpPage(page, this.#nextPageId++);
            this.#mcpPages.set(page, mcpPage);
            void page.emulateFocusedPage(true).catch((error) => {
              this.logger("Error turning on focused page emulation", error);
            });
          }
          mcpPage.isolatedContextName = isolatedContextNames.get(page);
        }
        const currentPages = new Set(allPages);
        for (const [page, mcpPage] of this.#mcpPages) {
          if (!currentPages.has(page)) {
            mcpPage.dispose();
            this.#mcpPages.delete(page);
          }
        }
        this.#pages = allPages.filter((page) => {
          return this.#options.experimentalDevToolsDebugging || !page.url().startsWith("devtools://");
        });
        if ((!this.#selectedPage || this.#pages.indexOf(this.#selectedPage.pptrPage) === -1) && this.#pages[0]) {
          this.selectPage(this.#getMcpPage(this.#pages[0]));
        }
        await this.detectOpenDevToolsWindows();
        return this.#pages;
      }
      async #getAllPages() {
        const defaultCtx = this.browser.defaultBrowserContext();
        const allPages = await this.browser.pages(this.#options.experimentalIncludeAllPages);
        const contextToName = /* @__PURE__ */ new Map();
        for (const [name, ctx] of this.#isolatedContexts) {
          contextToName.set(ctx, name);
        }
        const knownContexts = new Set(this.#isolatedContexts.values());
        for (const ctx of this.browser.browserContexts()) {
          if (ctx !== defaultCtx && !ctx.closed && !knownContexts.has(ctx)) {
            const name = `isolated-context-${this.#nextIsolatedContextId++}`;
            this.#isolatedContexts.set(name, ctx);
            contextToName.set(ctx, name);
          }
        }
        const isolatedContextNames = /* @__PURE__ */ new Map();
        for (const page of allPages) {
          const ctx = page.browserContext();
          const name = contextToName.get(ctx);
          if (name) {
            isolatedContextNames.set(page, name);
          }
        }
        return { pages: allPages, isolatedContextNames };
      }
      async detectOpenDevToolsWindows() {
        this.logger("Detecting open DevTools windows");
        const { pages } = await this.#getAllPages();
        for (const mcpPage of this.#mcpPages.values()) {
          mcpPage.devToolsPage = void 0;
        }
        for (const devToolsPage of pages) {
          if (devToolsPage.url().startsWith("devtools://")) {
            try {
              this.logger("Calling getTargetInfo for " + devToolsPage.url());
              const data32 = await devToolsPage._client().send("Target.getTargetInfo");
              const devtoolsPageTitle = data32.targetInfo.title;
              const urlLike = extractUrlLikeFromDevToolsTitle(devtoolsPageTitle);
              if (!urlLike) {
                continue;
              }
              for (const page of this.#pages) {
                if (urlsEqual(page.url(), urlLike)) {
                  const mcpPage = this.#mcpPages.get(page);
                  if (mcpPage) {
                    mcpPage.devToolsPage = devToolsPage;
                  }
                }
              }
            } catch (error) {
              this.logger("Issue occurred while trying to find DevTools", error);
            }
          }
        }
      }
      getExtensionServiceWorkers() {
        return this.#extensionServiceWorkers;
      }
      getExtensionServiceWorkerId(extensionServiceWorker) {
        return this.#extensionServiceWorkerMap.get(extensionServiceWorker.target);
      }
      getPages() {
        return this.#pages;
      }
      getIsolatedContextName(page) {
        return this.#mcpPages.get(page)?.isolatedContextName;
      }
      getDevToolsPage(page) {
        return this.#mcpPages.get(page)?.devToolsPage;
      }
      async getDevToolsData(page) {
        try {
          this.logger("Getting DevTools UI data");
          const devtoolsPage = this.getDevToolsPage(page.pptrPage);
          if (!devtoolsPage) {
            this.logger("No DevTools page detected");
            return {};
          }
          const { cdpRequestId, cdpBackendNodeId } = await devtoolsPage.evaluate(async () => {
            const UI2 = await import("/bundled/ui/legacy/legacy.js");
            const SDK = await import("/bundled/core/sdk/sdk.js");
            const request3 = UI2.Context.Context.instance().flavor(SDK.NetworkRequest.NetworkRequest);
            const node2 = UI2.Context.Context.instance().flavor(SDK.DOMModel.DOMNode);
            return {
              cdpRequestId: request3?.requestId(),
              cdpBackendNodeId: node2?.backendNodeId()
            };
          });
          return { cdpBackendNodeId, cdpRequestId };
        } catch (err) {
          this.logger("error getting devtools data", err);
        }
        return {};
      }
      /**
       * Creates a text snapshot of a page.
       */
      async createTextSnapshot(page, verbose = false, devtoolsData = void 0) {
        const rootNode = await page.pptrPage.accessibility.snapshot({
          includeIframes: true,
          interestingOnly: !verbose
        });
        if (!rootNode) {
          return;
        }
        const { uniqueBackendNodeIdToMcpId } = page;
        const snapshotId = this.#nextSnapshotId++;
        let idCounter = 0;
        const idToNode = /* @__PURE__ */ new Map();
        const seenUniqueIds = /* @__PURE__ */ new Set();
        const assignIds = (node2) => {
          let id2 = "";
          const uniqueBackendId = `${node2.loaderId}_${node2.backendNodeId}`;
          if (uniqueBackendNodeIdToMcpId.has(uniqueBackendId)) {
            id2 = uniqueBackendNodeIdToMcpId.get(uniqueBackendId);
          } else {
            id2 = `${snapshotId}_${idCounter++}`;
            uniqueBackendNodeIdToMcpId.set(uniqueBackendId, id2);
          }
          seenUniqueIds.add(uniqueBackendId);
          const nodeWithId = {
            ...node2,
            id: id2,
            children: node2.children ? node2.children.map((child) => assignIds(child)) : []
          };
          if (node2.role === "option") {
            const optionText = node2.name;
            if (optionText) {
              nodeWithId.value = optionText.toString();
            }
          }
          idToNode.set(nodeWithId.id, nodeWithId);
          return nodeWithId;
        };
        const rootNodeWithId = assignIds(rootNode);
        const snapshot2 = {
          root: rootNodeWithId,
          snapshotId: String(snapshotId),
          idToNode,
          hasSelectedElement: false,
          verbose
        };
        page.textSnapshot = snapshot2;
        const data32 = devtoolsData ?? await this.getDevToolsData(page);
        if (data32?.cdpBackendNodeId) {
          snapshot2.hasSelectedElement = true;
          snapshot2.selectedElementUid = this.resolveCdpElementId(page, data32?.cdpBackendNodeId);
        }
        for (const key of uniqueBackendNodeIdToMcpId.keys()) {
          if (!seenUniqueIds.has(key)) {
            uniqueBackendNodeIdToMcpId.delete(key);
          }
        }
      }
      async saveTemporaryFile(data32, filename) {
        return await saveTemporaryFile(data32, filename);
      }
      async saveFile(data32, filename) {
        try {
          const filePath = path12.resolve(filename);
          await fs8.mkdir(path12.dirname(filePath), { recursive: true });
          await fs8.writeFile(filePath, data32);
          return { filename: filePath };
        } catch (err) {
          this.logger(err);
          throw new Error("Could not save a file", { cause: err });
        }
      }
      storeTraceRecording(result) {
        this.#traceResults = [];
        this.#traceResults.push(result);
      }
      recordedTraces() {
        return this.#traceResults;
      }
      getWaitForHelper(page, cpuMultiplier, networkMultiplier) {
        return new WaitForHelper(page, cpuMultiplier, networkMultiplier);
      }
      waitForEventsAfterAction(action, options2) {
        const page = this.#getSelectedMcpPage();
        const cpuMultiplier = page.cpuThrottlingRate;
        const networkMultiplier = getNetworkMultiplierFromString(page.networkConditions);
        const waitForHelper = this.getWaitForHelper(page.pptrPage, cpuMultiplier, networkMultiplier);
        return waitForHelper.waitForEventsAfterAction(action, options2);
      }
      getNetworkRequestStableId(request3) {
        return this.#networkCollector.getIdForResource(request3);
      }
      waitForTextOnPage(text, timeout2, targetPage) {
        const page = targetPage ?? this.getSelectedPptrPage();
        const frames3 = page.frames();
        let locator = this.#locatorClass.race(frames3.flatMap((frame) => text.flatMap((value) => [
          frame.locator(`aria/${value}`),
          frame.locator(`text/${value}`)
        ])));
        if (timeout2) {
          locator = locator.setTimeout(timeout2);
        }
        return locator.wait();
      }
      /**
       * We need to ignore favicon request as they make our test flaky
       */
      async setUpNetworkCollectorForTesting() {
        this.#networkCollector = new NetworkCollector(this.browser, (collect) => {
          return {
            request: (req) => {
              if (req.url().includes("favicon.ico")) {
                return;
              }
              collect(req);
            }
          };
        });
        const { pages } = await this.#getAllPages();
        await this.#networkCollector.init(pages);
      }
      async installExtension(extensionPath) {
        const id2 = await this.browser.installExtension(extensionPath);
        await this.#extensionRegistry.registerExtension(id2, extensionPath);
        return id2;
      }
      async uninstallExtension(id2) {
        await this.browser.uninstallExtension(id2);
        this.#extensionRegistry.remove(id2);
      }
      async triggerExtensionAction(id2) {
        const page = this.getSelectedPptrPage();
        const theTarget = page._tabId;
        const session = await this.browser.target().createCDPSession();
        try {
          await session.send("Extensions.triggerAction", {
            id: id2,
            targetId: theTarget
          });
        } finally {
          await session.detach();
        }
      }
      listExtensions() {
        return this.#extensionRegistry.list();
      }
      getExtension(id2) {
        return this.#extensionRegistry.getById(id2);
      }
    };
  }
});

// ../../node_modules/chrome-devtools-mcp/build/src/formatters/ConsoleFormatter.js
function convertConsoleMessageConciseToString(msg) {
  return `msgid=${msg.id} [${msg.type}] ${msg.text} (${msg.argsCount} args)`;
}
function convertConsoleMessageConciseDetailedToString(msg) {
  const result = [
    `ID: ${msg.id}`,
    `Message: ${msg.type}> ${msg.text}`,
    formatArgs(msg),
    ...msg.stackTrace ? ["### Stack trace", msg.stackTrace] : []
  ].filter((line) => !!line);
  return result.join("\n");
}
function formatArgs(msg) {
  const args2 = msg.args;
  if (!args2.length) {
    return "";
  }
  const result = ["### Arguments"];
  for (const [key, arg] of args2.entries()) {
    result.push(`Arg #${key}: ${arg}`);
  }
  return result.join("\n");
}
function formatArg(arg, formatter2) {
  if (arg instanceof SymbolizedError) {
    return [
      arg.message,
      arg.stackTrace ? formatStackTrace(arg.stackTrace, arg.cause, formatter2) : void 0
    ].filter((line) => !!line).join("\n");
  }
  return typeof arg === "object" ? JSON.stringify(arg) : String(arg);
}
function formatStackTrace(stackTrace, cause, formatter2) {
  const lines = formatStackTraceInner(stackTrace, cause, formatter2);
  const includedLines = lines.slice(0, STACK_TRACE_MAX_LINES);
  const reminderCount = lines.length - includedLines.length;
  return [
    ...includedLines,
    reminderCount > 0 ? `... and ${reminderCount} more frames` : "",
    "Note: line and column numbers use 1-based indexing"
  ].filter((line) => !!line).join("\n");
}
function formatStackTraceInner(stackTrace, cause, formatter2) {
  if (!stackTrace) {
    return [];
  }
  return [
    ...formatFragment(stackTrace.syncFragment, formatter2),
    ...stackTrace.asyncFragments.map((item) => formatAsyncFragment(item, formatter2)).flat(),
    ...formatCause(cause, formatter2)
  ];
}
function formatFragment(fragment, formatter2) {
  const frames3 = fragment.frames.filter((frame) => !formatter2.isIgnored(frame));
  return frames3.map(formatFrame);
}
function formatAsyncFragment(fragment, formatter2) {
  const formattedFrames = formatFragment(fragment, formatter2);
  if (formattedFrames.length === 0) {
    return [];
  }
  const separatorLineLength = 40;
  const prefix = `--- ${fragment.description || "async"} `;
  const separator = prefix + "-".repeat(separatorLineLength - prefix.length);
  return [separator, ...formattedFrames];
}
function formatFrame(frame) {
  let result = `at ${frame.name ?? "<anonymous>"}`;
  if (frame.uiSourceCode) {
    const location = frame.uiSourceCode.uiLocation(frame.line, frame.column);
    result += ` (${location.linkText(
      /* skipTrim */
      false,
      /* showColumnNumber */
      true
    )})`;
  } else if (frame.url) {
    result += ` (${frame.url}:${frame.line}:${frame.column})`;
  }
  return result;
}
function formatCause(cause, formatter2) {
  if (!cause) {
    return [];
  }
  return [
    `Caused by: ${cause.message}`,
    ...formatStackTraceInner(cause.stackTrace, cause.cause, formatter2)
  ];
}
var ConsoleFormatter, STACK_TRACE_MAX_LINES;
var init_ConsoleFormatter = __esm({
  async "../../node_modules/chrome-devtools-mcp/build/src/formatters/ConsoleFormatter.js"() {
    await init_DevtoolsUtils();
    await init_PageCollector();
    await init_third_party();
    ConsoleFormatter = class _ConsoleFormatter {
      #id;
      #type;
      #text;
      #argCount;
      #resolvedArgs;
      #stack;
      #cause;
      isIgnored;
      constructor(params) {
        this.#id = params.id;
        this.#type = params.type;
        this.#text = params.text;
        this.#argCount = params.argCount ?? 0;
        this.#resolvedArgs = params.resolvedArgs ?? [];
        this.#stack = params.stack;
        this.#cause = params.cause;
        this.isIgnored = params.isIgnored;
      }
      static async from(msg, options2) {
        const ignoreListManager = options2?.devTools?.universe.context.get(mcp.IgnoreListManager);
        const isIgnored = options2.isIgnoredForTesting || ((frame) => {
          if (!ignoreListManager) {
            return false;
          }
          if (frame.uiSourceCode) {
            return ignoreListManager.isUserOrSourceMapIgnoreListedUISourceCode(frame.uiSourceCode);
          }
          if (frame.url) {
            return ignoreListManager.isUserIgnoreListedURL(frame.url);
          }
          return false;
        });
        if (msg instanceof UncaughtError) {
          const error = await SymbolizedError.fromDetails({
            devTools: options2?.devTools,
            details: msg.details,
            targetId: msg.targetId,
            includeStackAndCause: options2?.fetchDetailedData,
            resolvedStackTraceForTesting: options2?.resolvedStackTraceForTesting,
            resolvedCauseForTesting: options2?.resolvedCauseForTesting
          });
          return new _ConsoleFormatter({
            id: options2.id,
            type: "error",
            text: error.message,
            stack: error.stackTrace,
            cause: error.cause,
            isIgnored
          });
        }
        let resolvedArgs = [];
        if (options2.resolvedArgsForTesting) {
          resolvedArgs = options2.resolvedArgsForTesting;
        } else if (options2.fetchDetailedData) {
          resolvedArgs = await Promise.all(msg.args().map(async (arg, i) => {
            try {
              const remoteObject = arg.remoteObject();
              if (remoteObject.type === "object" && remoteObject.subtype === "error") {
                return await SymbolizedError.fromError({
                  devTools: options2.devTools,
                  error: remoteObject,
                  // @ts-expect-error Internal ConsoleMessage API
                  targetId: msg._targetId()
                });
              }
              return await arg.jsonValue();
            } catch {
              return `<error: Argument ${i} is no longer available>`;
            }
          }));
        }
        let stack;
        if (options2.resolvedStackTraceForTesting) {
          stack = options2.resolvedStackTraceForTesting;
        } else if (options2.fetchDetailedData && options2.devTools) {
          try {
            stack = await createStackTraceForConsoleMessage(options2.devTools, msg);
          } catch {
          }
        }
        return new _ConsoleFormatter({
          id: options2.id,
          type: msg.type(),
          text: msg.text(),
          argCount: resolvedArgs.length || msg.args().length,
          resolvedArgs,
          stack,
          isIgnored
        });
      }
      // The short format for a console message.
      toString() {
        return convertConsoleMessageConciseToString(this.toJSON());
      }
      // The verbose format for a console message, including all details.
      toStringDetailed() {
        return convertConsoleMessageConciseDetailedToString(this.toJSONDetailed());
      }
      #getArgs() {
        if (this.#resolvedArgs.length > 0) {
          const args2 = [...this.#resolvedArgs];
          if (!this.#text) {
            args2.shift();
          }
          return args2;
        }
        return [];
      }
      toJSON() {
        return {
          type: this.#type,
          text: this.#text,
          argsCount: this.#argCount,
          id: this.#id
        };
      }
      toJSONDetailed() {
        return {
          id: this.#id,
          type: this.#type,
          text: this.#text,
          argsCount: this.#argCount,
          args: this.#getArgs().map((arg) => formatArg(arg, this)),
          stackTrace: this.#stack ? formatStackTrace(this.#stack, this.#cause, this) : void 0
        };
      }
    };
    STACK_TRACE_MAX_LINES = 50;
  }
});

// ../../node_modules/chrome-devtools-mcp/build/src/formatters/IssueFormatter.js
function convertIssueConciseToString(issue2) {
  return `msgid=${issue2.id} [issue] ${issue2.title} (count: ${issue2.count})`;
}
function convertIssueDetailedToString(issue2) {
  const result = [];
  result.push(`ID: ${issue2.id}`);
  const bodyParts = [];
  const description2 = issue2.description;
  let processedMarkdown = description2?.trim();
  if (processedMarkdown?.startsWith("# ")) {
    processedMarkdown = processedMarkdown.substring(2).trimStart();
  }
  if (processedMarkdown) {
    bodyParts.push(processedMarkdown);
  } else {
    bodyParts.push(issue2.title ?? "Unknown Issue");
  }
  const links = issue2.links;
  if (links && links.length > 0) {
    bodyParts.push("Learn more:");
    for (const link2 of links) {
      bodyParts.push(`[${link2.linkTitle}](${link2.link})`);
    }
  }
  const affectedResources = issue2.affectedResources;
  if (affectedResources.length) {
    bodyParts.push("### Affected resources");
    bodyParts.push(...affectedResources.map((item) => {
      const details = [];
      if (item.uid) {
        details.push(`uid=${item.uid}`);
      }
      if (item.request) {
        details.push((typeof item.request === "number" ? `reqid=` : "url=") + item.request);
      }
      if (item.data) {
        details.push(`data=${JSON.stringify(item.data)}`);
      }
      return details.join(" ");
    }));
  }
  result.push(`Message: issue> ${bodyParts.join("\n")}`);
  return result.join("\n");
}
var IssueFormatter;
var init_IssueFormatter = __esm({
  async "../../node_modules/chrome-devtools-mcp/build/src/formatters/IssueFormatter.js"() {
    init_issue_descriptions();
    await init_logger();
    await init_third_party();
    IssueFormatter = class {
      #issue;
      #options;
      constructor(issue2, options2) {
        this.#issue = issue2;
        this.#options = options2;
      }
      toString() {
        return convertIssueConciseToString(this.toJSON());
      }
      toStringDetailed() {
        return convertIssueDetailedToString(this.toJSONDetailed());
      }
      toJSON() {
        return {
          type: "issue",
          title: this.#getTitle(),
          count: this.#issue.getAggregatedIssuesCount(),
          id: this.#options.id
        };
      }
      toJSONDetailed() {
        return {
          id: this.#options.id,
          type: "issue",
          count: this.#issue.getAggregatedIssuesCount(),
          title: this.#getTitle(),
          description: this.#getDescription(),
          links: this.#issue.getDescription()?.links,
          affectedResources: this.#getAffectedResources()
        };
      }
      #getAffectedResources() {
        const issues = this.#issue.getAllIssues();
        const affectedResources = [];
        for (const singleIssue of issues) {
          const details = singleIssue.details();
          if (!details) {
            continue;
          }
          const data32 = structuredClone(details);
          let uid2;
          let request3;
          if ("violatingNodeId" in details && details.violatingNodeId && this.#options.elementIdResolver) {
            uid2 = this.#options.elementIdResolver(details.violatingNodeId);
            delete data32.violatingNodeId;
          }
          if ("nodeId" in details && details.nodeId && this.#options.elementIdResolver) {
            uid2 = this.#options.elementIdResolver(details.nodeId);
            delete data32.nodeId;
          }
          if ("documentNodeId" in details && details.documentNodeId && this.#options.elementIdResolver) {
            uid2 = this.#options.elementIdResolver(details.documentNodeId);
            delete data32.documentNodeId;
          }
          if ("request" in details && details.request) {
            request3 = details.request.url;
            if (details.request.requestId && this.#options.requestIdResolver) {
              const resolvedId = this.#options.requestIdResolver(details.request.requestId);
              if (resolvedId) {
                request3 = resolvedId;
                const requestData = data32.request;
                delete requestData.requestId;
              }
            }
          }
          delete data32.errorType;
          delete data32.frameId;
          affectedResources.push({
            uid: uid2,
            data: data32,
            request: request3
          });
        }
        return affectedResources;
      }
      isValid() {
        return this.#getTitle() !== void 0;
      }
      // Helper to extract title
      #getTitle() {
        const markdownDescription = this.#issue.getDescription();
        const filename = markdownDescription?.file;
        if (!filename) {
          logger(`no description found for issue:` + this.#issue.code());
          return void 0;
        }
        const rawMarkdown = ISSUE_UTILS.getIssueDescription(filename);
        if (!rawMarkdown) {
          logger(`no markdown ${filename} found for issue:` + this.#issue.code());
          return void 0;
        }
        try {
          const processedMarkdown = mcp.MarkdownIssueDescription.substitutePlaceholders(rawMarkdown, markdownDescription?.substitutions);
          const markdownAst = mcp.Marked.Marked.lexer(processedMarkdown);
          const title2 = mcp.MarkdownIssueDescription.findTitleFromMarkdownAst(markdownAst);
          if (!title2) {
            logger("cannot read issue title from " + filename);
            return void 0;
          }
          return title2;
        } catch {
          logger("error parsing markdown for issue " + this.#issue.code());
          return void 0;
        }
      }
      #getDescription() {
        const markdownDescription = this.#issue.getDescription();
        const filename = markdownDescription?.file;
        if (!filename) {
          return void 0;
        }
        const rawMarkdown = ISSUE_UTILS.getIssueDescription(filename);
        if (!rawMarkdown) {
          return void 0;
        }
        try {
          return mcp.MarkdownIssueDescription.substitutePlaceholders(rawMarkdown, markdownDescription?.substitutions);
        } catch {
          return void 0;
        }
      }
    };
  }
});

// ../../node_modules/chrome-devtools-mcp/build/src/formatters/NetworkFormatter.js
import { isUtf8 } from "node:buffer";
function getSizeLimitedString(text, sizeLimit) {
  if (text.length > sizeLimit) {
    return text.substring(0, sizeLimit) + "... <truncated>";
  }
  return text;
}
function convertNetworkRequestConciseToString(data32) {
  return `reqid=${data32.requestId} ${data32.method} ${data32.url} [${data32.status}]${data32.selectedInDevToolsUI ? ` [selected in the DevTools Network panel]` : ""}`;
}
function formatHeadlers(headers) {
  const response = [];
  for (const [name, value] of Object.entries(headers)) {
    response.push(`- ${name}:${value}`);
  }
  return response;
}
function converNetworkRequestDetailedToStringDetailed(data32) {
  const response = [];
  response.push(`## Request ${data32.url}`);
  response.push(`Status: ${data32.status}`);
  response.push(`### Request Headers`);
  for (const line of formatHeadlers(data32.requestHeaders)) {
    response.push(line);
  }
  if (data32.requestBody) {
    response.push(`### Request Body`);
    response.push(data32.requestBody);
  } else if (data32.requestBodyFilePath) {
    response.push(`### Request Body`);
    response.push(`Saved to ${data32.requestBodyFilePath}.`);
  }
  if (data32.responseHeaders) {
    response.push(`### Response Headers`);
    for (const line of formatHeadlers(data32.responseHeaders)) {
      response.push(line);
    }
  }
  if (data32.responseBody) {
    response.push(`### Response Body`);
    response.push(data32.responseBody);
  } else if (data32.responseBodyFilePath) {
    response.push(`### Response Body`);
    response.push(`Saved to ${data32.responseBodyFilePath}.`);
  }
  if (data32.failure) {
    response.push(`### Request failed with`);
    response.push(data32.failure);
  }
  const redirectChain = data32.redirectChain;
  if (redirectChain?.length) {
    response.push(`### Redirect chain`);
    let indent = 0;
    for (const request3 of redirectChain.reverse()) {
      response.push(`${"  ".repeat(indent)}${convertNetworkRequestConciseToString(request3)})}`);
      indent++;
    }
  }
  return response.join("\n");
}
var BODY_CONTEXT_SIZE_LIMIT, NetworkFormatter;
var init_NetworkFormatter = __esm({
  "../../node_modules/chrome-devtools-mcp/build/src/formatters/NetworkFormatter.js"() {
    BODY_CONTEXT_SIZE_LIMIT = 1e4;
    NetworkFormatter = class _NetworkFormatter {
      #request;
      #options;
      #requestBody;
      #responseBody;
      #requestBodyFilePath;
      #responseBodyFilePath;
      constructor(request3, options2) {
        this.#request = request3;
        this.#options = options2;
      }
      static async from(request3, options2) {
        const instance2 = new _NetworkFormatter(request3, options2);
        if (options2.fetchData) {
          await instance2.#loadDetailedData();
        }
        return instance2;
      }
      async #loadDetailedData() {
        if (this.#request.hasPostData()) {
          let data32;
          try {
            data32 = this.#request.postData() ?? await this.#request.fetchPostData();
          } catch {
          }
          const requestBodyNotAvailableMessage = "<Request body not available anymore>";
          if (this.#options.requestFilePath) {
            if (!this.#options.saveFile) {
              throw new Error("saveFile is not provided");
            }
            if (data32) {
              await this.#options.saveFile(Buffer.from(data32), this.#options.requestFilePath);
              this.#requestBodyFilePath = this.#options.requestFilePath;
            } else {
              this.#requestBody = requestBodyNotAvailableMessage;
            }
          } else {
            if (data32) {
              this.#requestBody = getSizeLimitedString(data32, BODY_CONTEXT_SIZE_LIMIT);
            } else {
              this.#requestBody = requestBodyNotAvailableMessage;
            }
          }
        }
        const response = this.#request.response();
        if (response) {
          const responseBodyNotAvailableMessage = "<Response body not available anymore>";
          if (this.#options.responseFilePath) {
            try {
              const buffer = await response.buffer();
              if (!this.#options.saveFile) {
                throw new Error("saveFile is not provided");
              }
              await this.#options.saveFile(buffer, this.#options.responseFilePath);
              this.#responseBodyFilePath = this.#options.responseFilePath;
            } catch {
            }
            if (!this.#responseBodyFilePath) {
              this.#responseBody = responseBodyNotAvailableMessage;
            }
          } else {
            this.#responseBody = await this.#getFormattedResponseBody(response, BODY_CONTEXT_SIZE_LIMIT);
          }
        }
      }
      toString() {
        return convertNetworkRequestConciseToString(this.toJSON());
      }
      toStringDetailed() {
        return converNetworkRequestDetailedToStringDetailed(this.toJSONDetailed());
      }
      toJSON() {
        return {
          requestId: this.#options.requestId,
          method: this.#request.method(),
          url: this.#request.url(),
          status: this.#getStatusFromRequest(this.#request),
          selectedInDevToolsUI: this.#options.selectedInDevToolsUI
        };
      }
      toJSONDetailed() {
        const redirectChain = this.#request.redirectChain();
        const formattedRedirectChain = redirectChain.reverse().map((request3) => {
          const id2 = this.#options.requestIdResolver ? this.#options.requestIdResolver(request3) : void 0;
          const formatter2 = new _NetworkFormatter(request3, {
            requestId: id2,
            saveFile: this.#options.saveFile
          });
          return formatter2.toJSON();
        });
        return {
          ...this.toJSON(),
          requestHeaders: this.#request.headers(),
          requestBody: this.#requestBody,
          requestBodyFilePath: this.#requestBodyFilePath,
          responseHeaders: this.#request.response()?.headers(),
          responseBody: this.#responseBody,
          responseBodyFilePath: this.#responseBodyFilePath,
          failure: this.#request.failure()?.errorText,
          redirectChain: formattedRedirectChain.length ? formattedRedirectChain : void 0
        };
      }
      #getStatusFromRequest(request3) {
        const httpResponse = request3.response();
        const failure = request3.failure();
        let status;
        if (httpResponse) {
          status = httpResponse.status().toString();
        } else if (failure) {
          status = failure.errorText;
        } else {
          status = "pending";
        }
        return status;
      }
      async #getFormattedResponseBody(httpResponse, sizeLimit = BODY_CONTEXT_SIZE_LIMIT) {
        try {
          const responseBuffer = await httpResponse.buffer();
          if (isUtf8(responseBuffer)) {
            const responseAsTest = responseBuffer.toString("utf-8");
            if (responseAsTest.length === 0) {
              return "<empty response>";
            }
            return getSizeLimitedString(responseAsTest, sizeLimit);
          }
          return "<binary data>";
        } catch {
          return "<not available anymore>";
        }
      }
    };
  }
});

// ../../node_modules/chrome-devtools-mcp/build/src/formatters/SnapshotFormatter.js
var SnapshotFormatter, booleanPropertyMap, excludedAttributes;
var init_SnapshotFormatter = __esm({
  "../../node_modules/chrome-devtools-mcp/build/src/formatters/SnapshotFormatter.js"() {
    SnapshotFormatter = class {
      #snapshot;
      constructor(snapshot2) {
        this.#snapshot = snapshot2;
      }
      toString() {
        const chunks = [];
        const root2 = this.#snapshot.root;
        if (this.#snapshot.verbose && this.#snapshot.hasSelectedElement && !this.#snapshot.selectedElementUid) {
          chunks.push(`Note: there is a selected element in the DevTools Elements panel but it is not included into the current a11y tree snapshot.
Get a verbose snapshot to include all elements if you are interested in the selected element.

`);
        }
        chunks.push(this.#formatNode(root2, 0));
        return chunks.join("");
      }
      toJSON() {
        return this.#nodeToJSON(this.#snapshot.root);
      }
      #formatNode(node2, depth = 0) {
        const chunks = [];
        const attributes = this.#getAttributes(node2);
        const line = " ".repeat(depth * 2) + attributes.join(" ") + (node2.id === this.#snapshot.selectedElementUid ? " [selected in the DevTools Elements panel]" : "") + "\n";
        chunks.push(line);
        for (const child of node2.children) {
          chunks.push(this.#formatNode(child, depth + 1));
        }
        return chunks.join("");
      }
      #nodeToJSON(node2) {
        const rawAttrs = this.#getAttributesMap(node2);
        const children = node2.children.map((child) => this.#nodeToJSON(child));
        const result = structuredClone(rawAttrs);
        if (children.length > 0) {
          result.children = children;
        }
        return result;
      }
      #getAttributes(serializedAXNodeRoot) {
        const attributes = [`uid=${serializedAXNodeRoot.id}`];
        if (serializedAXNodeRoot.role) {
          attributes.push(serializedAXNodeRoot.role === "none" ? "ignored" : serializedAXNodeRoot.role);
        }
        if (serializedAXNodeRoot.name) {
          attributes.push(`"${serializedAXNodeRoot.name}"`);
        }
        const simpleAttrs = this.#getAttributesMap(
          serializedAXNodeRoot,
          /* excludeSpecial */
          true
        );
        for (const attr of Object.keys(serializedAXNodeRoot).sort()) {
          if (excludedAttributes.has(attr)) {
            continue;
          }
          const mapped = booleanPropertyMap[attr];
          if (mapped && simpleAttrs[mapped]) {
            attributes.push(mapped);
          }
          const val = simpleAttrs[attr];
          if (val === true) {
            attributes.push(attr);
          } else if (typeof val === "string" || typeof val === "number") {
            attributes.push(`${attr}="${val}"`);
          }
        }
        return attributes;
      }
      #getAttributesMap(node2, excludeSpecial = false) {
        const result = {};
        if (!excludeSpecial) {
          result.id = node2.id;
          if (node2.role) {
            result.role = node2.role;
          }
          if (node2.name) {
            result.name = node2.name;
          }
        }
        return {
          ...result,
          ...this.#extractedAttributes(node2)
        };
      }
      #extractedAttributes(node2) {
        const result = {};
        for (const attr of Object.keys(node2).sort()) {
          if (excludedAttributes.has(attr)) {
            continue;
          }
          const value = node2[attr];
          if (typeof value === "boolean") {
            if (booleanPropertyMap[attr]) {
              result[booleanPropertyMap[attr]] = true;
            }
            if (value) {
              result[attr] = true;
            }
          } else if (typeof value === "string" || typeof value === "number") {
            result[attr] = value;
          }
        }
        return result;
      }
    };
    booleanPropertyMap = {
      disabled: "disableable",
      expanded: "expandable",
      focused: "focusable",
      selected: "selectable"
    };
    excludedAttributes = /* @__PURE__ */ new Set([
      "id",
      "role",
      "name",
      "elementHandle",
      "children",
      "backendNodeId",
      "loaderId"
    ]);
  }
});

// ../../node_modules/chrome-devtools-mcp/build/src/trace-processing/parse.js
function getTraceSummary(result) {
  const focus = mcp.AgentFocus.fromParsedTrace(result.parsedTrace);
  const formatter2 = new mcp.PerformanceTraceFormatter(focus);
  const summaryText = formatter2.formatTraceSummary();
  return `## Summary of Performance trace findings:
${summaryText}

## Details on call tree & network request formats:
${extraFormatDescriptions}`;
}
function getInsightOutput(result, insightSetId, insightName) {
  if (!result.insights) {
    return {
      error: "No Performance insights are available for this trace."
    };
  }
  const insightSet = result.insights.get(insightSetId);
  if (!insightSet) {
    return {
      error: 'No Performance Insights for the given insight set id. Only use ids given in the "Available insight sets" list.'
    };
  }
  const matchingInsight = insightName in insightSet.model ? insightSet.model[insightName] : null;
  if (!matchingInsight) {
    return {
      error: `No Insight with the name ${insightName} found. Double check the name you provided is accurate and try again.`
    };
  }
  const formatter2 = new mcp.PerformanceInsightFormatter(mcp.AgentFocus.fromParsedTrace(result.parsedTrace), matchingInsight);
  return { output: formatter2.formatInsight() };
}
var engine, extraFormatDescriptions;
var init_parse = __esm({
  async "../../node_modules/chrome-devtools-mcp/build/src/trace-processing/parse.js"() {
    await init_logger();
    await init_third_party();
    engine = mcp.TraceEngine.TraceModel.Model.createWithAllHandlers();
    extraFormatDescriptions = `Information on performance traces may contain main thread activity represented as call frames and network requests.

${mcp.PerformanceTraceFormatter.callFrameDataFormatDescription}

${mcp.PerformanceTraceFormatter.networkDataFormatDescription}`;
  }
});

// ../../node_modules/chrome-devtools-mcp/build/src/utils/pagination.js
function paginate(items2, options2) {
  const total = items2.length;
  if (!options2 || noPaginationOptions(options2)) {
    return {
      items: items2,
      currentPage: 0,
      totalPages: 1,
      hasNextPage: false,
      hasPreviousPage: false,
      startIndex: 0,
      endIndex: total,
      invalidPage: false
    };
  }
  const pageSize = options2.pageSize ?? DEFAULT_PAGE_SIZE;
  const totalPages = Math.max(1, Math.ceil(total / pageSize));
  const { currentPage, invalidPage } = resolvePageIndex(options2.pageIdx, totalPages);
  const startIndex = currentPage * pageSize;
  const pageItems = items2.slice(startIndex, startIndex + pageSize);
  const endIndex = startIndex + pageItems.length;
  return {
    items: pageItems,
    currentPage,
    totalPages,
    hasNextPage: currentPage < totalPages - 1,
    hasPreviousPage: currentPage > 0,
    startIndex,
    endIndex,
    invalidPage
  };
}
function noPaginationOptions(options2) {
  return options2.pageSize === void 0 && options2.pageIdx === void 0;
}
function resolvePageIndex(pageIdx, totalPages) {
  if (pageIdx === void 0) {
    return { currentPage: 0, invalidPage: false };
  }
  if (pageIdx < 0 || pageIdx >= totalPages) {
    return { currentPage: 0, invalidPage: true };
  }
  return { currentPage: pageIdx, invalidPage: false };
}
var DEFAULT_PAGE_SIZE;
var init_pagination = __esm({
  "../../node_modules/chrome-devtools-mcp/build/src/utils/pagination.js"() {
    DEFAULT_PAGE_SIZE = 20;
  }
});

// ../../node_modules/chrome-devtools-mcp/build/src/McpResponse.js
var McpResponse;
var init_McpResponse = __esm({
  async "../../node_modules/chrome-devtools-mcp/build/src/McpResponse.js"() {
    await init_ConsoleFormatter();
    await init_IssueFormatter();
    init_NetworkFormatter();
    init_SnapshotFormatter();
    await init_PageCollector();
    await init_third_party();
    await init_pages();
    await init_parse();
    init_pagination();
    McpResponse = class {
      #includePages = false;
      #includeExtensionServiceWorkers = false;
      #snapshotParams;
      #attachedNetworkRequestId;
      #attachedNetworkRequestOptions;
      #attachedConsoleMessageId;
      #attachedTraceSummary;
      #attachedTraceInsight;
      #attachedLighthouseResult;
      #textResponseLines = [];
      #images = [];
      #networkRequestsOptions;
      #consoleDataOptions;
      #listExtensions;
      #devToolsData;
      #tabId;
      #args;
      #page;
      constructor(args2) {
        this.#args = args2;
      }
      setPage(page) {
        this.#page = page;
      }
      attachDevToolsData(data32) {
        this.#devToolsData = data32;
      }
      setTabId(tabId) {
        this.#tabId = tabId;
      }
      setIncludePages(value) {
        this.#includePages = value;
        if (this.#args.categoryExtensions) {
          this.#includeExtensionServiceWorkers = value;
        }
      }
      includeSnapshot(params) {
        this.#snapshotParams = params ?? {
          verbose: false
        };
      }
      setListExtensions() {
        this.#listExtensions = true;
      }
      setIncludeNetworkRequests(value, options2) {
        if (!value) {
          this.#networkRequestsOptions = void 0;
          return;
        }
        this.#networkRequestsOptions = {
          include: value,
          pagination: options2?.pageSize || options2?.pageIdx ? {
            pageSize: options2.pageSize,
            pageIdx: options2.pageIdx
          } : void 0,
          resourceTypes: options2?.resourceTypes,
          includePreservedRequests: options2?.includePreservedRequests,
          networkRequestIdInDevToolsUI: options2?.networkRequestIdInDevToolsUI
        };
      }
      setIncludeConsoleData(value, options2) {
        if (!value) {
          this.#consoleDataOptions = void 0;
          return;
        }
        this.#consoleDataOptions = {
          include: value,
          pagination: options2?.pageSize || options2?.pageIdx ? {
            pageSize: options2.pageSize,
            pageIdx: options2.pageIdx
          } : void 0,
          types: options2?.types,
          includePreservedMessages: options2?.includePreservedMessages
        };
      }
      attachNetworkRequest(reqid, options2) {
        this.#attachedNetworkRequestId = reqid;
        this.#attachedNetworkRequestOptions = options2;
      }
      attachConsoleMessage(msgid) {
        this.#attachedConsoleMessageId = msgid;
      }
      attachTraceSummary(result) {
        this.#attachedTraceSummary = result;
      }
      attachTraceInsight(trace2, insightSetId, insightName) {
        this.#attachedTraceInsight = {
          trace: trace2,
          insightSetId,
          insightName
        };
      }
      attachLighthouseResult(result) {
        this.#attachedLighthouseResult = result;
      }
      get includePages() {
        return this.#includePages;
      }
      get attachedTraceSummary() {
        return this.#attachedTraceSummary;
      }
      get attachedTracedInsight() {
        return this.#attachedTraceInsight;
      }
      get attachedLighthouseResult() {
        return this.#attachedLighthouseResult;
      }
      get includeNetworkRequests() {
        return this.#networkRequestsOptions?.include ?? false;
      }
      get includeConsoleData() {
        return this.#consoleDataOptions?.include ?? false;
      }
      get attachedNetworkRequestId() {
        return this.#attachedNetworkRequestId;
      }
      get networkRequestsPageIdx() {
        return this.#networkRequestsOptions?.pagination?.pageIdx;
      }
      get consoleMessagesPageIdx() {
        return this.#consoleDataOptions?.pagination?.pageIdx;
      }
      get consoleMessagesTypes() {
        return this.#consoleDataOptions?.types;
      }
      appendResponseLine(value) {
        this.#textResponseLines.push(value);
      }
      attachImage(value) {
        this.#images.push(value);
      }
      get responseLines() {
        return this.#textResponseLines;
      }
      get images() {
        return this.#images;
      }
      get snapshotParams() {
        return this.#snapshotParams;
      }
      async handle(toolName, context2) {
        if (this.#includePages) {
          await context2.createPagesSnapshot();
        }
        if (this.#includeExtensionServiceWorkers) {
          await context2.createExtensionServiceWorkersSnapshot();
        }
        let snapshot2;
        if (this.#snapshotParams) {
          if (!this.#page) {
            throw new Error("Response must have a page");
          }
          await context2.createTextSnapshot(this.#page, this.#snapshotParams.verbose, this.#devToolsData);
          const textSnapshot = this.#page.textSnapshot;
          if (textSnapshot) {
            const formatter2 = new SnapshotFormatter(textSnapshot);
            if (this.#snapshotParams.filePath) {
              await context2.saveFile(new TextEncoder().encode(formatter2.toString()), this.#snapshotParams.filePath);
              snapshot2 = this.#snapshotParams.filePath;
            } else {
              snapshot2 = formatter2;
            }
          }
        }
        let detailedNetworkRequest;
        if (this.#attachedNetworkRequestId) {
          if (!this.#page) {
            throw new Error(`Response must have an McpPage`);
          }
          const request3 = context2.getNetworkRequestById(this.#page, this.#attachedNetworkRequestId);
          const formatter2 = await NetworkFormatter.from(request3, {
            requestId: this.#attachedNetworkRequestId,
            requestIdResolver: (req) => context2.getNetworkRequestStableId(req),
            fetchData: true,
            requestFilePath: this.#attachedNetworkRequestOptions?.requestFilePath,
            responseFilePath: this.#attachedNetworkRequestOptions?.responseFilePath,
            saveFile: (data32, filename) => context2.saveFile(data32, filename)
          });
          detailedNetworkRequest = formatter2;
        }
        let detailedConsoleMessage;
        if (this.#attachedConsoleMessageId) {
          if (!this.#page) {
            throw new Error(`Response must have an McpPage`);
          }
          const message = context2.getConsoleMessageById(this.#page, this.#attachedConsoleMessageId);
          const consoleMessageStableId = this.#attachedConsoleMessageId;
          if ("args" in message || message instanceof UncaughtError) {
            const consoleMessage = message;
            const devTools = context2.getDevToolsUniverse(this.#page);
            detailedConsoleMessage = await ConsoleFormatter.from(consoleMessage, {
              id: consoleMessageStableId,
              fetchDetailedData: true,
              devTools: devTools ?? void 0
            });
          } else if (message instanceof mcp.AggregatedIssue) {
            const formatter2 = new IssueFormatter(message, {
              id: consoleMessageStableId,
              requestIdResolver: context2.resolveCdpRequestId.bind(context2, this.#page),
              elementIdResolver: context2.resolveCdpElementId.bind(context2, this.#page)
            });
            if (!formatter2.isValid()) {
              throw new Error("Can't provide detals for the msgid " + consoleMessageStableId);
            }
            detailedConsoleMessage = formatter2;
          }
        }
        let extensions;
        if (this.#listExtensions) {
          extensions = context2.listExtensions();
        }
        let consoleMessages;
        if (this.#consoleDataOptions?.include) {
          if (!this.#page) {
            throw new Error(`Response must have an McpPage`);
          }
          const page = this.#page;
          let messages = context2.getConsoleData(this.#page, this.#consoleDataOptions.includePreservedMessages);
          if (this.#consoleDataOptions.types?.length) {
            const normalizedTypes = new Set(this.#consoleDataOptions.types);
            messages = messages.filter((message) => {
              if ("type" in message) {
                return normalizedTypes.has(message.type());
              }
              if (message instanceof mcp.AggregatedIssue) {
                return normalizedTypes.has("issue");
              }
              return normalizedTypes.has("error");
            });
          }
          consoleMessages = (await Promise.all(messages.map(async (item) => {
            const consoleMessageStableId = context2.getConsoleMessageStableId(item);
            if ("args" in item || item instanceof UncaughtError) {
              const consoleMessage = item;
              const devTools = context2.getDevToolsUniverse(page);
              return await ConsoleFormatter.from(consoleMessage, {
                id: consoleMessageStableId,
                fetchDetailedData: false,
                devTools: devTools ?? void 0
              });
            }
            if (item instanceof mcp.AggregatedIssue) {
              const formatter2 = new IssueFormatter(item, {
                id: consoleMessageStableId
              });
              if (!formatter2.isValid()) {
                return null;
              }
              return formatter2;
            }
            return null;
          }))).filter((item) => item !== null);
        }
        let networkRequests;
        if (this.#networkRequestsOptions?.include) {
          if (!this.#page) {
            throw new Error(`Response must have an McpPage`);
          }
          let requests = context2.getNetworkRequests(this.#page, this.#networkRequestsOptions?.includePreservedRequests);
          if (this.#networkRequestsOptions.resourceTypes?.length) {
            const normalizedTypes = new Set(this.#networkRequestsOptions.resourceTypes);
            requests = requests.filter((request3) => {
              const type2 = request3.resourceType();
              return normalizedTypes.has(type2);
            });
          }
          if (requests.length) {
            networkRequests = await Promise.all(requests.map((request3) => NetworkFormatter.from(request3, {
              requestId: context2.getNetworkRequestStableId(request3),
              selectedInDevToolsUI: context2.getNetworkRequestStableId(request3) === this.#networkRequestsOptions?.networkRequestIdInDevToolsUI,
              fetchData: false,
              saveFile: (data32, filename) => context2.saveFile(data32, filename)
            })));
          }
        }
        return this.format(toolName, context2, {
          detailedConsoleMessage,
          consoleMessages,
          snapshot: snapshot2,
          detailedNetworkRequest,
          networkRequests,
          traceInsight: this.#attachedTraceInsight,
          traceSummary: this.#attachedTraceSummary,
          extensions,
          lighthouseResult: this.#attachedLighthouseResult
        });
      }
      format(toolName, context2, data32) {
        const structuredContent = {};
        const response = [];
        if (this.#textResponseLines.length) {
          structuredContent.message = this.#textResponseLines.join("\n");
          response.push(...this.#textResponseLines);
        }
        const networkConditions = this.#page?.networkConditions;
        if (networkConditions) {
          const timeout2 = this.#page.pptrPage.getDefaultNavigationTimeout();
          response.push(`Emulating network conditions: ${networkConditions}`);
          response.push(`Default navigation timeout set to ${timeout2} ms`);
          structuredContent.networkConditions = networkConditions;
          structuredContent.navigationTimeout = timeout2;
        }
        const viewport = this.#page?.viewport;
        if (viewport) {
          response.push(`Emulating viewport: ${JSON.stringify(viewport)}`);
          structuredContent.viewport = viewport;
        }
        const userAgent = this.#page?.userAgent;
        if (userAgent) {
          response.push(`Emulating user agent: ${userAgent}`);
          structuredContent.userAgent = userAgent;
        }
        const cpuThrottlingRate = this.#page?.cpuThrottlingRate ?? 1;
        if (cpuThrottlingRate > 1) {
          response.push(`Emulating CPU throttling: ${cpuThrottlingRate}x slowdown`);
          structuredContent.cpuThrottlingRate = cpuThrottlingRate;
        }
        const colorScheme = this.#page?.colorScheme;
        if (colorScheme) {
          response.push(`Emulating color scheme: ${colorScheme}`);
          structuredContent.colorScheme = colorScheme;
        }
        const dialog = this.#page?.getDialog();
        if (dialog) {
          const defaultValueIfNeeded = dialog.type() === "prompt" ? ` (default value: "${dialog.defaultValue()}")` : "";
          response.push(`# Open dialog
${dialog.type()}: ${dialog.message()}${defaultValueIfNeeded}.
Call ${handleDialog.name} to handle it before continuing.`);
          structuredContent.dialog = {
            type: dialog.type(),
            message: dialog.message(),
            defaultValue: dialog.defaultValue()
          };
        }
        if (this.#includePages) {
          const parts = [`## Pages`];
          for (const page of context2.getPages()) {
            const isolatedContextName = context2.getIsolatedContextName(page);
            const contextLabel = isolatedContextName ? ` isolatedContext=${isolatedContextName}` : "";
            parts.push(`${context2.getPageId(page)}: ${page.url()}${context2.isPageSelected(page) ? " [selected]" : ""}${contextLabel}`);
          }
          response.push(...parts);
          structuredContent.pages = context2.getPages().map((page) => {
            const isolatedContextName = context2.getIsolatedContextName(page);
            const entry = {
              id: context2.getPageId(page),
              url: page.url(),
              selected: context2.isPageSelected(page)
            };
            if (isolatedContextName) {
              entry.isolatedContext = isolatedContextName;
            }
            return entry;
          });
        }
        if (this.#includeExtensionServiceWorkers) {
          if (context2.getExtensionServiceWorkers().length) {
            response.push(`## Extension Service Workers`);
          }
          for (const extensionServiceWorker of context2.getExtensionServiceWorkers()) {
            response.push(`${extensionServiceWorker.id}: ${extensionServiceWorker.url}`);
          }
          structuredContent.extensionServiceWorkers = context2.getExtensionServiceWorkers().map((extensionServiceWorker) => {
            return {
              id: extensionServiceWorker.id,
              url: extensionServiceWorker.url
            };
          });
        }
        if (this.#tabId) {
          structuredContent.tabId = this.#tabId;
        }
        if (data32.traceSummary) {
          const summary = getTraceSummary(data32.traceSummary);
          response.push(summary);
          structuredContent.traceSummary = summary;
          structuredContent.traceInsights = [];
          for (const insightSet of data32.traceSummary.insights?.values() ?? []) {
            for (const [insightName, model3] of Object.entries(insightSet.model)) {
              structuredContent.traceInsights.push({
                insightName,
                insightKey: model3.insightKey
              });
            }
          }
        }
        if (data32.traceInsight) {
          const insightOutput = getInsightOutput(data32.traceInsight.trace, data32.traceInsight.insightSetId, data32.traceInsight.insightName);
          if ("error" in insightOutput) {
            response.push(insightOutput.error);
          } else {
            response.push(insightOutput.output);
          }
        }
        if (data32.lighthouseResult) {
          structuredContent.lighthouseResult = data32.lighthouseResult;
          const { summary, reports } = data32.lighthouseResult;
          response.push("## Lighthouse Audit Results");
          response.push(`Mode: ${summary.mode}`);
          response.push(`Device: ${summary.device}`);
          response.push(`URL: ${summary.url}`);
          response.push("### Category Scores");
          for (const score of summary.scores) {
            response.push(`- ${score.title}: ${(score.score ?? 0) * 100} (${score.id})`);
          }
          response.push("### Audit Summary");
          response.push(`Passed: ${summary.audits.passed}`);
          response.push(`Failed: ${summary.audits.failed}`);
          response.push(`Total Timing: ${summary.timing.total}ms`);
          response.push("### Reports");
          for (const report of reports) {
            response.push(`- ${report}`);
          }
        }
        if (data32.snapshot) {
          if (typeof data32.snapshot === "string") {
            response.push(`Saved snapshot to ${data32.snapshot}.`);
            structuredContent.snapshotFilePath = data32.snapshot;
          } else {
            response.push("## Latest page snapshot");
            response.push(data32.snapshot.toString());
            structuredContent.snapshot = data32.snapshot.toJSON();
          }
        }
        if (data32.detailedNetworkRequest) {
          response.push(data32.detailedNetworkRequest.toStringDetailed());
          structuredContent.networkRequest = data32.detailedNetworkRequest.toJSONDetailed();
        }
        if (data32.detailedConsoleMessage) {
          response.push(data32.detailedConsoleMessage.toStringDetailed());
          structuredContent.consoleMessage = data32.detailedConsoleMessage.toJSONDetailed();
        }
        if (data32.extensions) {
          structuredContent.extensions = data32.extensions;
          response.push("## Extensions");
          if (data32.extensions.length === 0) {
            response.push("No extensions installed.");
          } else {
            const extensionsMessage = data32.extensions.map((extension2) => {
              return `id=${extension2.id} "${extension2.name}" v${extension2.version} ${extension2.isEnabled ? "Enabled" : "Disabled"}`;
            }).join("\n");
            response.push(extensionsMessage);
          }
        }
        if (this.#networkRequestsOptions?.include && data32.networkRequests) {
          const requests = data32.networkRequests;
          response.push("## Network requests");
          if (requests.length) {
            const paginationData = this.#dataWithPagination(requests, this.#networkRequestsOptions.pagination);
            structuredContent.pagination = paginationData.pagination;
            response.push(...paginationData.info);
            if (data32.networkRequests) {
              structuredContent.networkRequests = [];
              for (const formatter2 of paginationData.items) {
                response.push(formatter2.toString());
                structuredContent.networkRequests.push(formatter2.toJSON());
              }
            }
          } else {
            response.push("No requests found.");
          }
        }
        if (this.#consoleDataOptions?.include) {
          const messages = data32.consoleMessages ?? [];
          response.push("## Console messages");
          if (messages.length) {
            const paginationData = this.#dataWithPagination(messages, this.#consoleDataOptions.pagination);
            structuredContent.pagination = paginationData.pagination;
            response.push(...paginationData.info);
            response.push(...paginationData.items.map((message) => message.toString()));
            structuredContent.consoleMessages = paginationData.items.map((message) => message.toJSON());
          } else {
            response.push("<no console messages found>");
          }
        }
        const text = {
          type: "text",
          text: response.join("\n")
        };
        const images = this.#images.map((imageData) => {
          return {
            type: "image",
            ...imageData
          };
        });
        return {
          content: [text, ...images],
          structuredContent
        };
      }
      #dataWithPagination(data32, pagination) {
        const response = [];
        const paginationResult = paginate(data32, pagination);
        if (paginationResult.invalidPage) {
          response.push("Invalid page number provided. Showing first page.");
        }
        const { startIndex, endIndex, currentPage, totalPages } = paginationResult;
        response.push(`Showing ${startIndex + 1}-${endIndex} of ${data32.length} (Page ${currentPage + 1} of ${totalPages}).`);
        if (pagination) {
          if (paginationResult.hasNextPage) {
            response.push(`Next page: ${currentPage + 1}`);
          }
          if (paginationResult.hasPreviousPage) {
            response.push(`Previous page: ${currentPage - 1}`);
          }
        }
        return {
          info: response,
          items: paginationResult.items,
          pagination: {
            currentPage: paginationResult.currentPage,
            totalPages: paginationResult.totalPages,
            hasNextPage: paginationResult.hasNextPage,
            hasPreviousPage: paginationResult.hasPreviousPage,
            startIndex: paginationResult.startIndex,
            endIndex: paginationResult.endIndex,
            invalidPage: paginationResult.invalidPage
          }
        };
      }
      resetResponseLineForTesting() {
        this.#textResponseLines = [];
      }
    };
  }
});

// ../../node_modules/chrome-devtools-mcp/build/src/SlimMcpResponse.js
var SlimMcpResponse;
var init_SlimMcpResponse = __esm({
  async "../../node_modules/chrome-devtools-mcp/build/src/SlimMcpResponse.js"() {
    await init_McpResponse();
    SlimMcpResponse = class extends McpResponse {
      async handle(_toolName, _context) {
        const text = {
          type: "text",
          text: this.responseLines.join("\n")
        };
        return {
          content: [text],
          structuredContent: text
        };
      }
    };
  }
});

// ../../node_modules/chrome-devtools-mcp/build/src/telemetry/persistence.js
import fs9 from "node:fs/promises";
import os4 from "node:os";
import path13 from "node:path";
import process5 from "node:process";
function getDataFolder() {
  const homedir = os4.homedir();
  const { env: env2 } = process5;
  const name = "chrome-devtools-mcp";
  if (process5.platform === "darwin") {
    return path13.join(homedir, "Library", "Application Support", name);
  }
  if (process5.platform === "win32") {
    const localAppData = env2.LOCALAPPDATA || path13.join(homedir, "AppData", "Local");
    return path13.join(localAppData, name, "Data");
  }
  return path13.join(env2.XDG_DATA_HOME || path13.join(homedir, ".local", "share"), name);
}
var STATE_FILE_NAME, FilePersistence;
var init_persistence = __esm({
  async "../../node_modules/chrome-devtools-mcp/build/src/telemetry/persistence.js"() {
    await init_logger();
    STATE_FILE_NAME = "telemetry_state.json";
    FilePersistence = class {
      #dataFolder;
      constructor(dataFolderOverride) {
        this.#dataFolder = dataFolderOverride ?? getDataFolder();
      }
      async loadState() {
        try {
          const filePath = path13.join(this.#dataFolder, STATE_FILE_NAME);
          const content = await fs9.readFile(filePath, "utf-8");
          return JSON.parse(content);
        } catch {
          return {
            lastActive: ""
          };
        }
      }
      async saveState(state) {
        const filePath = path13.join(this.#dataFolder, STATE_FILE_NAME);
        try {
          await fs9.mkdir(this.#dataFolder, { recursive: true });
          await fs9.writeFile(filePath, JSON.stringify(state, null, 2), "utf-8");
        } catch (error) {
          logger(`Failed to save telemetry state to ${filePath}:`, error);
        }
      }
    };
  }
});

// ../../node_modules/chrome-devtools-mcp/build/src/telemetry/types.js
var OsType, ChromeChannel, McpClient, WatchdogMessageType;
var init_types5 = __esm({
  "../../node_modules/chrome-devtools-mcp/build/src/telemetry/types.js"() {
    (function(OsType2) {
      OsType2[OsType2["OS_TYPE_UNSPECIFIED"] = 0] = "OS_TYPE_UNSPECIFIED";
      OsType2[OsType2["OS_TYPE_WINDOWS"] = 1] = "OS_TYPE_WINDOWS";
      OsType2[OsType2["OS_TYPE_MACOS"] = 2] = "OS_TYPE_MACOS";
      OsType2[OsType2["OS_TYPE_LINUX"] = 3] = "OS_TYPE_LINUX";
    })(OsType || (OsType = {}));
    (function(ChromeChannel2) {
      ChromeChannel2[ChromeChannel2["CHROME_CHANNEL_UNSPECIFIED"] = 0] = "CHROME_CHANNEL_UNSPECIFIED";
      ChromeChannel2[ChromeChannel2["CHROME_CHANNEL_CANARY"] = 1] = "CHROME_CHANNEL_CANARY";
      ChromeChannel2[ChromeChannel2["CHROME_CHANNEL_DEV"] = 2] = "CHROME_CHANNEL_DEV";
      ChromeChannel2[ChromeChannel2["CHROME_CHANNEL_BETA"] = 3] = "CHROME_CHANNEL_BETA";
      ChromeChannel2[ChromeChannel2["CHROME_CHANNEL_STABLE"] = 4] = "CHROME_CHANNEL_STABLE";
    })(ChromeChannel || (ChromeChannel = {}));
    (function(McpClient2) {
      McpClient2[McpClient2["MCP_CLIENT_UNSPECIFIED"] = 0] = "MCP_CLIENT_UNSPECIFIED";
      McpClient2[McpClient2["MCP_CLIENT_CLAUDE_CODE"] = 1] = "MCP_CLIENT_CLAUDE_CODE";
      McpClient2[McpClient2["MCP_CLIENT_GEMINI_CLI"] = 2] = "MCP_CLIENT_GEMINI_CLI";
    })(McpClient || (McpClient = {}));
    (function(WatchdogMessageType2) {
      WatchdogMessageType2["LOG_EVENT"] = "log-event";
    })(WatchdogMessageType || (WatchdogMessageType = {}));
  }
});

// ../../node_modules/chrome-devtools-mcp/build/src/telemetry/WatchdogClient.js
import { spawn } from "node:child_process";
import { fileURLToPath as fileURLToPath3 } from "node:url";
var WatchdogClient;
var init_WatchdogClient = __esm({
  async "../../node_modules/chrome-devtools-mcp/build/src/telemetry/WatchdogClient.js"() {
    await init_logger();
    WatchdogClient = class {
      #childProcess;
      constructor(config4, options2) {
        const watchdogPath = fileURLToPath3(new URL("./watchdog/main.js", import.meta.url));
        const args2 = [
          watchdogPath,
          `--parent-pid=${config4.parentPid}`,
          `--app-version=${config4.appVersion}`,
          `--os-type=${config4.osType}`
        ];
        if (config4.logFile) {
          args2.push(`--log-file=${config4.logFile}`);
        }
        if (config4.clearcutEndpoint) {
          args2.push(`--clearcut-endpoint=${config4.clearcutEndpoint}`);
        }
        if (config4.clearcutForceFlushIntervalMs) {
          args2.push(`--clearcut-force-flush-interval-ms=${config4.clearcutForceFlushIntervalMs}`);
        }
        if (config4.clearcutIncludePidHeader) {
          args2.push("--clearcut-include-pid-header");
        }
        const spawner = options2?.spawn ?? spawn;
        this.#childProcess = spawner(process.execPath, args2, {
          stdio: ["pipe", "ignore", "ignore"],
          detached: true
        });
        this.#childProcess.unref();
        this.#childProcess.on("error", (err) => {
          logger("Watchdog process error:", err);
        });
        this.#childProcess.on("exit", (code2, signal) => {
          logger(`Watchdog exited with code ${code2} and signal ${signal}`);
        });
      }
      send(message) {
        if (this.#childProcess.stdin && !this.#childProcess.stdin.destroyed && this.#childProcess.pid) {
          try {
            const line = JSON.stringify(message) + "\n";
            this.#childProcess.stdin.write(line);
          } catch (err) {
            logger("Failed to write to watchdog stdin", err);
          }
        } else {
          logger("Watchdog stdin not available, dropping message");
        }
      }
    };
  }
});

// ../../node_modules/chrome-devtools-mcp/build/src/telemetry/ClearcutLogger.js
import process6 from "node:process";
function detectOsType() {
  switch (process6.platform) {
    case "win32":
      return OsType.OS_TYPE_WINDOWS;
    case "darwin":
      return OsType.OS_TYPE_MACOS;
    case "linux":
      return OsType.OS_TYPE_LINUX;
    default:
      return OsType.OS_TYPE_UNSPECIFIED;
  }
}
var MS_PER_DAY, ClearcutLogger;
var init_ClearcutLogger = __esm({
  async "../../node_modules/chrome-devtools-mcp/build/src/telemetry/ClearcutLogger.js"() {
    await init_logger();
    await init_persistence();
    init_types5();
    await init_WatchdogClient();
    MS_PER_DAY = 24 * 60 * 60 * 1e3;
    ClearcutLogger = class {
      #persistence;
      #watchdog;
      constructor(options2) {
        this.#persistence = options2.persistence ?? new FilePersistence();
        this.#watchdog = options2.watchdogClient ?? new WatchdogClient({
          parentPid: process6.pid,
          appVersion: options2.appVersion,
          osType: detectOsType(),
          logFile: options2.logFile,
          clearcutEndpoint: options2.clearcutEndpoint,
          clearcutForceFlushIntervalMs: options2.clearcutForceFlushIntervalMs,
          clearcutIncludePidHeader: options2.clearcutIncludePidHeader
        });
      }
      async logToolInvocation(args2) {
        this.#watchdog.send({
          type: WatchdogMessageType.LOG_EVENT,
          payload: {
            tool_invocation: {
              tool_name: args2.toolName,
              success: args2.success,
              latency_ms: args2.latencyMs
            }
          }
        });
      }
      async logServerStart(flagUsage) {
        this.#watchdog.send({
          type: WatchdogMessageType.LOG_EVENT,
          payload: {
            server_start: {
              flag_usage: flagUsage
            }
          }
        });
      }
      async logDailyActiveIfNeeded() {
        try {
          const state = await this.#persistence.loadState();
          if (this.#shouldLogDailyActive(state)) {
            let daysSince = -1;
            if (state.lastActive) {
              const lastActiveDate = new Date(state.lastActive);
              const now = /* @__PURE__ */ new Date();
              const diffTime = Math.abs(now.getTime() - lastActiveDate.getTime());
              daysSince = Math.ceil(diffTime / MS_PER_DAY);
            }
            this.#watchdog.send({
              type: WatchdogMessageType.LOG_EVENT,
              payload: {
                daily_active: {
                  days_since_last_active: daysSince
                }
              }
            });
            state.lastActive = (/* @__PURE__ */ new Date()).toISOString();
            await this.#persistence.saveState(state);
          }
        } catch (err) {
          logger("Error in logDailyActiveIfNeeded:", err);
        }
      }
      #shouldLogDailyActive(state) {
        if (!state.lastActive) {
          return true;
        }
        const lastActiveDate = new Date(state.lastActive);
        const now = /* @__PURE__ */ new Date();
        const isSameDay = lastActiveDate.getUTCFullYear() === now.getUTCFullYear() && lastActiveDate.getUTCMonth() === now.getUTCMonth() && lastActiveDate.getUTCDate() === now.getUTCDate();
        return !isSameDay;
      }
    };
  }
});

// ../../node_modules/chrome-devtools-mcp/build/src/telemetry/metricUtils.js
function bucketizeLatency(latencyMs) {
  for (const bucket of LATENCY_BUCKETS) {
    if (latencyMs <= bucket) {
      return bucket;
    }
  }
  return LATENCY_BUCKETS[LATENCY_BUCKETS.length - 1];
}
var LATENCY_BUCKETS;
var init_metricUtils = __esm({
  "../../node_modules/chrome-devtools-mcp/build/src/telemetry/metricUtils.js"() {
    LATENCY_BUCKETS = [50, 100, 250, 500, 1e3, 2500, 5e3, 1e4];
  }
});

// ../../node_modules/chrome-devtools-mcp/build/src/tools/console.js
var console_exports = {};
__export(console_exports, {
  getConsoleMessage: () => getConsoleMessage,
  listConsoleMessages: () => listConsoleMessages
});
var FILTERABLE_MESSAGE_TYPES, listConsoleMessages, getConsoleMessage;
var init_console = __esm({
  async "../../node_modules/chrome-devtools-mcp/build/src/tools/console.js"() {
    await init_third_party();
    init_categories();
    await init_ToolDefinition();
    FILTERABLE_MESSAGE_TYPES = [
      "log",
      "debug",
      "info",
      "error",
      "warn",
      "dir",
      "dirxml",
      "table",
      "trace",
      "clear",
      "startGroup",
      "startGroupCollapsed",
      "endGroup",
      "assert",
      "profile",
      "profileEnd",
      "count",
      "timeEnd",
      "verbose",
      "issue"
    ];
    listConsoleMessages = definePageTool({
      name: "list_console_messages",
      description: "List all console messages for the currently selected page since the last navigation.",
      annotations: {
        category: ToolCategory.DEBUGGING,
        readOnlyHint: true
      },
      schema: {
        pageSize: z.number().int().positive().optional().describe("Maximum number of messages to return. When omitted, returns all requests."),
        pageIdx: z.number().int().min(0).optional().describe("Page number to return (0-based). When omitted, returns the first page."),
        types: z.array(z.enum(FILTERABLE_MESSAGE_TYPES)).optional().describe("Filter messages to only return messages of the specified resource types. When omitted or empty, returns all messages."),
        includePreservedMessages: z.boolean().default(false).optional().describe("Set to true to return the preserved messages over the last 3 navigations.")
      },
      handler: async (request3, response) => {
        response.setIncludeConsoleData(true, {
          pageSize: request3.params.pageSize,
          pageIdx: request3.params.pageIdx,
          types: request3.params.types,
          includePreservedMessages: request3.params.includePreservedMessages
        });
      }
    });
    getConsoleMessage = definePageTool({
      name: "get_console_message",
      description: `Gets a console message by its ID. You can get all messages by calling ${listConsoleMessages.name}.`,
      annotations: {
        category: ToolCategory.DEBUGGING,
        readOnlyHint: true
      },
      schema: {
        msgid: z.number().describe("The msgid of a console message on the page from the listed console messages")
      },
      handler: async (request3, response) => {
        response.attachConsoleMessage(request3.params.msgid);
      }
    });
  }
});

// ../../node_modules/chrome-devtools-mcp/build/src/tools/emulation.js
var emulation_exports = {};
__export(emulation_exports, {
  emulate: () => emulate2
});
var throttlingOptions, emulate2;
var init_emulation = __esm({
  async "../../node_modules/chrome-devtools-mcp/build/src/tools/emulation.js"() {
    await init_third_party();
    init_categories();
    await init_ToolDefinition();
    throttlingOptions = [
      "Offline",
      ...Object.keys(PredefinedNetworkConditions)
    ];
    emulate2 = definePageTool({
      name: "emulate",
      description: `Emulates various features on the selected page.`,
      annotations: {
        category: ToolCategory.EMULATION,
        readOnlyHint: false
      },
      schema: {
        networkConditions: z.enum(throttlingOptions).optional().describe(`Throttle network. Omit to disable throttling.`),
        cpuThrottlingRate: z.number().min(1).max(20).optional().describe("Represents the CPU slowdown factor. Omit or set the rate to 1 to disable throttling"),
        geolocation: z.string().optional().transform(geolocationTransform).describe("Geolocation (`<latitude>x<longitude>`) to emulate. Latitude between -90 and 90. Longitude between -180 and 180. Omit clear the geolocation override."),
        userAgent: z.string().optional().describe("User agent to emulate. Set to empty string to clear the user agent override."),
        colorScheme: z.enum(["dark", "light", "auto"]).optional().describe('Emulate the dark or the light mode. Set to "auto" to reset to the default.'),
        viewport: z.string().optional().transform(viewportTransform).describe(`Emulate device viewports '<width>x<height>x<devicePixelRatio>[,mobile][,touch][,landscape]'. 'touch' and 'mobile' to emulate mobile devices. 'landscape' to emulate landscape mode.`)
      },
      handler: async (request3, _response, context2) => {
        const page = request3.page;
        await context2.emulate(request3.params, page.pptrPage);
      }
    });
  }
});

// empty:./extensions.js
var extensions_exports = {};
var init_extensions = __esm({
  "empty:./extensions.js"() {
  }
});

// ../../node_modules/chrome-devtools-mcp/build/src/utils/keyboard.js
function throwIfInvalidKey(key) {
  if (validKeys.has(key)) {
    return key;
  }
  throw new Error(`${key} is invalid. Valid keys are: ${Array.from(validKeys.values()).join(",")}.`);
}
function parseKey(keyInput) {
  let key = "";
  const result = [];
  for (const ch of keyInput) {
    if (ch === "+" && key) {
      result.push(throwIfInvalidKey(key));
      key = "";
    } else {
      key += ch;
    }
  }
  if (key) {
    result.push(throwIfInvalidKey(key));
  }
  if (result.length === 0) {
    throw new Error(`Key ${keyInput} could not be parsed.`);
  }
  if (new Set(result).size !== result.length) {
    throw new Error(`Key ${keyInput} contains duplicate keys.`);
  }
  return [result.at(-1), ...result.slice(0, -1)];
}
var validKeys;
var init_keyboard = __esm({
  "../../node_modules/chrome-devtools-mcp/build/src/utils/keyboard.js"() {
    validKeys = /* @__PURE__ */ new Set([
      "0",
      "1",
      "2",
      "3",
      "4",
      "5",
      "6",
      "7",
      "8",
      "9",
      "Power",
      "Eject",
      "Abort",
      "Help",
      "Backspace",
      "Tab",
      "Numpad5",
      "NumpadEnter",
      "Enter",
      "\r",
      "\n",
      "ShiftLeft",
      "ShiftRight",
      "ControlLeft",
      "ControlRight",
      "AltLeft",
      "AltRight",
      "Pause",
      "CapsLock",
      "Escape",
      "Convert",
      "NonConvert",
      "Space",
      "Numpad9",
      "PageUp",
      "Numpad3",
      "PageDown",
      "End",
      "Numpad1",
      "Home",
      "Numpad7",
      "ArrowLeft",
      "Numpad4",
      "Numpad8",
      "ArrowUp",
      "ArrowRight",
      "Numpad6",
      "Numpad2",
      "ArrowDown",
      "Select",
      "Open",
      "PrintScreen",
      "Insert",
      "Numpad0",
      "Delete",
      "NumpadDecimal",
      "Digit0",
      "Digit1",
      "Digit2",
      "Digit3",
      "Digit4",
      "Digit5",
      "Digit6",
      "Digit7",
      "Digit8",
      "Digit9",
      "KeyA",
      "KeyB",
      "KeyC",
      "KeyD",
      "KeyE",
      "KeyF",
      "KeyG",
      "KeyH",
      "KeyI",
      "KeyJ",
      "KeyK",
      "KeyL",
      "KeyM",
      "KeyN",
      "KeyO",
      "KeyP",
      "KeyQ",
      "KeyR",
      "KeyS",
      "KeyT",
      "KeyU",
      "KeyV",
      "KeyW",
      "KeyX",
      "KeyY",
      "KeyZ",
      "MetaLeft",
      "MetaRight",
      "ContextMenu",
      "NumpadMultiply",
      "NumpadAdd",
      "NumpadSubtract",
      "NumpadDivide",
      "F1",
      "F2",
      "F3",
      "F4",
      "F5",
      "F6",
      "F7",
      "F8",
      "F9",
      "F10",
      "F11",
      "F12",
      "F13",
      "F14",
      "F15",
      "F16",
      "F17",
      "F18",
      "F19",
      "F20",
      "F21",
      "F22",
      "F23",
      "F24",
      "NumLock",
      "ScrollLock",
      "AudioVolumeMute",
      "AudioVolumeDown",
      "AudioVolumeUp",
      "MediaTrackNext",
      "MediaTrackPrevious",
      "MediaStop",
      "MediaPlayPause",
      "Semicolon",
      "Equal",
      "NumpadEqual",
      "Comma",
      "Minus",
      "Period",
      "Slash",
      "Backquote",
      "BracketLeft",
      "Backslash",
      "BracketRight",
      "Quote",
      "AltGraph",
      "Props",
      "Cancel",
      "Clear",
      "Shift",
      "Control",
      "Alt",
      "Accept",
      "ModeChange",
      " ",
      "Print",
      "Execute",
      "\0",
      "a",
      "b",
      "c",
      "d",
      "e",
      "f",
      "g",
      "h",
      "i",
      "j",
      "k",
      "l",
      "m",
      "n",
      "o",
      "p",
      "q",
      "r",
      "s",
      "t",
      "u",
      "v",
      "w",
      "x",
      "y",
      "z",
      "Meta",
      "*",
      "+",
      "-",
      "/",
      ";",
      "=",
      ",",
      ".",
      "`",
      "[",
      "\\",
      "]",
      "'",
      "Attn",
      "CrSel",
      "ExSel",
      "EraseEof",
      "Play",
      "ZoomOut",
      ")",
      "!",
      "@",
      "#",
      "$",
      "%",
      "^",
      "&",
      "(",
      "A",
      "B",
      "C",
      "D",
      "E",
      "F",
      "G",
      "H",
      "I",
      "J",
      "K",
      "L",
      "M",
      "N",
      "O",
      "P",
      "Q",
      "R",
      "S",
      "T",
      "U",
      "V",
      "W",
      "X",
      "Y",
      "Z",
      ":",
      "<",
      "_",
      ">",
      "?",
      "~",
      "{",
      "|",
      "}",
      '"',
      "SoftLeft",
      "SoftRight",
      "Camera",
      "Call",
      "EndCall",
      "VolumeDown",
      "VolumeUp"
    ]);
  }
});

// ../../node_modules/chrome-devtools-mcp/build/src/tools/input.js
var input_exports = {};
__export(input_exports, {
  click: () => click,
  clickAt: () => clickAt,
  drag: () => drag,
  fill: () => fill,
  fillForm: () => fillForm,
  hover: () => hover,
  pressKey: () => pressKey,
  typeText: () => typeText,
  uploadFile: () => uploadFile
});
function handleActionError(error, uid2) {
  logger("failed to act using a locator", error);
  throw new Error(`Failed to interact with the element with uid ${uid2}. The element did not become interactive within the configured timeout.`, {
    cause: error
  });
}
async function selectOption(handle, aXNode, value) {
  let optionFound = false;
  for (const child of aXNode.children) {
    if (child.role === "option" && child.name === value && child.value) {
      optionFound = true;
      const childHandle = await child.elementHandle();
      if (childHandle) {
        try {
          const childValueHandle = await childHandle.getProperty("value");
          try {
            const childValue = await childValueHandle.jsonValue();
            if (childValue) {
              await handle.asLocator().fill(childValue.toString());
            }
          } finally {
            void childValueHandle.dispose();
          }
          break;
        } finally {
          void childHandle.dispose();
        }
      }
    }
  }
  if (!optionFound) {
    throw new Error(`Could not find option with text "${value}"`);
  }
}
function hasOptionChildren(aXNode) {
  return aXNode.children.some((child) => child.role === "option");
}
async function fillFormElement(uid2, value, context2, page) {
  const handle = await page.getElementByUid(uid2);
  try {
    const aXNode = context2.getAXNodeByUid(uid2);
    if (aXNode && aXNode.role === "combobox" && hasOptionChildren(aXNode)) {
      await selectOption(handle, aXNode, value);
    } else {
      const timeoutPerChar = 10;
      const fillTimeout = page.pptrPage.getDefaultTimeout() + value.length * timeoutPerChar;
      await handle.asLocator().setTimeout(fillTimeout).fill(value);
    }
  } catch (error) {
    handleActionError(error, uid2);
  } finally {
    void handle.dispose();
  }
}
var dblClickSchema, includeSnapshotSchema, submitKeySchema, click, clickAt, hover, fill, typeText, drag, fillForm, uploadFile, pressKey;
var init_input = __esm({
  async "../../node_modules/chrome-devtools-mcp/build/src/tools/input.js"() {
    await init_logger();
    await init_third_party();
    init_keyboard();
    init_categories();
    await init_ToolDefinition();
    dblClickSchema = z.boolean().optional().describe("Set to true for double clicks. Default is false.");
    includeSnapshotSchema = z.boolean().optional().describe("Whether to include a snapshot in the response. Default is false.");
    submitKeySchema = z.string().optional().describe('Optional key to press after typing. E.g., "Enter", "Tab", "Escape"');
    click = definePageTool({
      name: "click",
      description: `Clicks on the provided element`,
      annotations: {
        category: ToolCategory.INPUT,
        readOnlyHint: false
      },
      schema: {
        uid: z.string().describe("The uid of an element on the page from the page content snapshot"),
        dblClick: dblClickSchema,
        includeSnapshot: includeSnapshotSchema
      },
      handler: async (request3, response, context2) => {
        const uid2 = request3.params.uid;
        const handle = await request3.page.getElementByUid(uid2);
        try {
          await context2.waitForEventsAfterAction(async () => {
            await handle.asLocator().click({
              count: request3.params.dblClick ? 2 : 1
            });
          });
          response.appendResponseLine(request3.params.dblClick ? `Successfully double clicked on the element` : `Successfully clicked on the element`);
          if (request3.params.includeSnapshot) {
            response.includeSnapshot();
          }
        } catch (error) {
          handleActionError(error, uid2);
        } finally {
          void handle.dispose();
        }
      }
    });
    clickAt = definePageTool({
      name: "click_at",
      description: `Clicks at the provided coordinates`,
      annotations: {
        category: ToolCategory.INPUT,
        readOnlyHint: false,
        conditions: ["computerVision"]
      },
      schema: {
        x: z.number().describe("The x coordinate"),
        y: z.number().describe("The y coordinate"),
        dblClick: dblClickSchema,
        includeSnapshot: includeSnapshotSchema
      },
      handler: async (request3, response, context2) => {
        const page = request3.page;
        await context2.waitForEventsAfterAction(async () => {
          await page.pptrPage.mouse.click(request3.params.x, request3.params.y, {
            clickCount: request3.params.dblClick ? 2 : 1
          });
        });
        response.appendResponseLine(request3.params.dblClick ? `Successfully double clicked at the coordinates` : `Successfully clicked at the coordinates`);
        if (request3.params.includeSnapshot) {
          response.includeSnapshot();
        }
      }
    });
    hover = definePageTool({
      name: "hover",
      description: `Hover over the provided element`,
      annotations: {
        category: ToolCategory.INPUT,
        readOnlyHint: false
      },
      schema: {
        uid: z.string().describe("The uid of an element on the page from the page content snapshot"),
        includeSnapshot: includeSnapshotSchema
      },
      handler: async (request3, response, context2) => {
        const uid2 = request3.params.uid;
        const handle = await request3.page.getElementByUid(uid2);
        try {
          await context2.waitForEventsAfterAction(async () => {
            await handle.asLocator().hover();
          });
          response.appendResponseLine(`Successfully hovered over the element`);
          if (request3.params.includeSnapshot) {
            response.includeSnapshot();
          }
        } catch (error) {
          handleActionError(error, uid2);
        } finally {
          void handle.dispose();
        }
      }
    });
    fill = definePageTool({
      name: "fill",
      description: `Type text into a input, text area or select an option from a <select> element.`,
      annotations: {
        category: ToolCategory.INPUT,
        readOnlyHint: false
      },
      schema: {
        uid: z.string().describe("The uid of an element on the page from the page content snapshot"),
        value: z.string().describe("The value to fill in"),
        includeSnapshot: includeSnapshotSchema
      },
      handler: async (request3, response, context2) => {
        const page = request3.page;
        await context2.waitForEventsAfterAction(async () => {
          await fillFormElement(request3.params.uid, request3.params.value, context2, page);
        });
        response.appendResponseLine(`Successfully filled out the element`);
        if (request3.params.includeSnapshot) {
          response.includeSnapshot();
        }
      }
    });
    typeText = definePageTool({
      name: "type_text",
      description: `Type text using keyboard into a previously focused input`,
      annotations: {
        category: ToolCategory.INPUT,
        readOnlyHint: false
      },
      schema: {
        text: z.string().describe("The text to type"),
        submitKey: submitKeySchema
      },
      handler: async (request3, response, context2) => {
        const page = request3.page;
        await context2.waitForEventsAfterAction(async () => {
          await page.pptrPage.keyboard.type(request3.params.text);
          if (request3.params.submitKey) {
            await page.pptrPage.keyboard.press(request3.params.submitKey);
          }
        });
        response.appendResponseLine(`Typed text "${request3.params.text}${request3.params.submitKey ? ` + ${request3.params.submitKey}` : ""}"`);
      }
    });
    drag = definePageTool({
      name: "drag",
      description: `Drag an element onto another element`,
      annotations: {
        category: ToolCategory.INPUT,
        readOnlyHint: false
      },
      schema: {
        from_uid: z.string().describe("The uid of the element to drag"),
        to_uid: z.string().describe("The uid of the element to drop into"),
        includeSnapshot: includeSnapshotSchema
      },
      handler: async (request3, response, context2) => {
        const fromHandle = await request3.page.getElementByUid(request3.params.from_uid);
        const toHandle = await request3.page.getElementByUid(request3.params.to_uid);
        try {
          await context2.waitForEventsAfterAction(async () => {
            await fromHandle.drag(toHandle);
            await new Promise((resolve2) => setTimeout(resolve2, 50));
            await toHandle.drop(fromHandle);
          });
          response.appendResponseLine(`Successfully dragged an element`);
          if (request3.params.includeSnapshot) {
            response.includeSnapshot();
          }
        } finally {
          void fromHandle.dispose();
          void toHandle.dispose();
        }
      }
    });
    fillForm = definePageTool({
      name: "fill_form",
      description: `Fill out multiple form elements at once`,
      annotations: {
        category: ToolCategory.INPUT,
        readOnlyHint: false
      },
      schema: {
        elements: z.array(z.object({
          uid: z.string().describe("The uid of the element to fill out"),
          value: z.string().describe("Value for the element")
        })).describe("Elements from snapshot to fill out."),
        includeSnapshot: includeSnapshotSchema
      },
      handler: async (request3, response, context2) => {
        const page = request3.page;
        for (const element of request3.params.elements) {
          await context2.waitForEventsAfterAction(async () => {
            await fillFormElement(element.uid, element.value, context2, page);
          });
        }
        response.appendResponseLine(`Successfully filled out the form`);
        if (request3.params.includeSnapshot) {
          response.includeSnapshot();
        }
      }
    });
    uploadFile = definePageTool({
      name: "upload_file",
      description: "Upload a file through a provided element.",
      annotations: {
        category: ToolCategory.INPUT,
        readOnlyHint: false
      },
      schema: {
        uid: z.string().describe("The uid of the file input element or an element that will open file chooser on the page from the page content snapshot"),
        filePath: z.string().describe("The local path of the file to upload"),
        includeSnapshot: includeSnapshotSchema
      },
      handler: async (request3, response) => {
        const { uid: uid2, filePath } = request3.params;
        const handle = await request3.page.getElementByUid(uid2);
        try {
          try {
            await handle.uploadFile(filePath);
          } catch {
            try {
              const [fileChooser] = await Promise.all([
                request3.page.pptrPage.waitForFileChooser({ timeout: 3e3 }),
                handle.asLocator().click()
              ]);
              await fileChooser.accept([filePath]);
            } catch {
              throw new Error(`Failed to upload file. The element could not accept the file directly, and clicking it did not trigger a file chooser.`);
            }
          }
          if (request3.params.includeSnapshot) {
            response.includeSnapshot();
          }
          response.appendResponseLine(`File uploaded from ${filePath}.`);
        } finally {
          void handle.dispose();
        }
      }
    });
    pressKey = definePageTool({
      name: "press_key",
      description: `Press a key or key combination. Use this when other input methods like fill() cannot be used (e.g., keyboard shortcuts, navigation keys, or special key combinations).`,
      annotations: {
        category: ToolCategory.INPUT,
        readOnlyHint: false
      },
      schema: {
        key: z.string().describe('A key or a combination (e.g., "Enter", "Control+A", "Control++", "Control+Shift+R"). Modifiers: Control, Shift, Alt, Meta'),
        includeSnapshot: includeSnapshotSchema
      },
      handler: async (request3, response, context2) => {
        const page = request3.page;
        const tokens = parseKey(request3.params.key);
        const [key, ...modifiers] = tokens;
        await context2.waitForEventsAfterAction(async () => {
          for (const modifier of modifiers) {
            await page.pptrPage.keyboard.down(modifier);
          }
          await page.pptrPage.keyboard.press(key);
          for (const modifier of modifiers.toReversed()) {
            await page.pptrPage.keyboard.up(modifier);
          }
        });
        response.appendResponseLine(`Successfully pressed key: ${request3.params.key}`);
        if (request3.params.includeSnapshot) {
          response.includeSnapshot();
        }
      }
    });
  }
});

// empty:./lighthouse.js
var lighthouse_exports = {};
var init_lighthouse = __esm({
  "empty:./lighthouse.js"() {
  }
});

// ../../node_modules/chrome-devtools-mcp/build/src/tools/memory.js
var memory_exports = {};
__export(memory_exports, {
  takeMemorySnapshot: () => takeMemorySnapshot
});
var takeMemorySnapshot;
var init_memory = __esm({
  async "../../node_modules/chrome-devtools-mcp/build/src/tools/memory.js"() {
    await init_third_party();
    init_categories();
    await init_ToolDefinition();
    takeMemorySnapshot = definePageTool({
      name: "take_memory_snapshot",
      description: `Capture a memory heapsnapshot of the currently selected page to memory leak debugging`,
      annotations: {
        category: ToolCategory.PERFORMANCE,
        readOnlyHint: true
      },
      schema: {
        filePath: z.string().describe("A path to a .heapsnapshot file to save the heapsnapshot to.")
      },
      handler: async (request3, response, _context) => {
        const page = request3.page;
        await page.pptrPage.captureHeapSnapshot({
          path: request3.params.filePath
        });
        response.appendResponseLine(`Heap snapshot saved to ${request3.params.filePath}`);
      }
    });
  }
});

// ../../node_modules/chrome-devtools-mcp/build/src/tools/network.js
var network_exports = {};
__export(network_exports, {
  getNetworkRequest: () => getNetworkRequest,
  listNetworkRequests: () => listNetworkRequests
});
var FILTERABLE_RESOURCE_TYPES, listNetworkRequests, getNetworkRequest;
var init_network2 = __esm({
  async "../../node_modules/chrome-devtools-mcp/build/src/tools/network.js"() {
    await init_third_party();
    init_categories();
    await init_ToolDefinition();
    FILTERABLE_RESOURCE_TYPES = [
      "document",
      "stylesheet",
      "image",
      "media",
      "font",
      "script",
      "texttrack",
      "xhr",
      "fetch",
      "prefetch",
      "eventsource",
      "websocket",
      "manifest",
      "signedexchange",
      "ping",
      "cspviolationreport",
      "preflight",
      "fedcm",
      "other"
    ];
    listNetworkRequests = definePageTool({
      name: "list_network_requests",
      description: `List all requests for the currently selected page since the last navigation.`,
      annotations: {
        category: ToolCategory.NETWORK,
        readOnlyHint: true
      },
      schema: {
        pageSize: z.number().int().positive().optional().describe("Maximum number of requests to return. When omitted, returns all requests."),
        pageIdx: z.number().int().min(0).optional().describe("Page number to return (0-based). When omitted, returns the first page."),
        resourceTypes: z.array(z.enum(FILTERABLE_RESOURCE_TYPES)).optional().describe("Filter requests to only return requests of the specified resource types. When omitted or empty, returns all requests."),
        includePreservedRequests: z.boolean().default(false).optional().describe("Set to true to return the preserved requests over the last 3 navigations.")
      },
      handler: async (request3, response, context2) => {
        const data32 = await context2.getDevToolsData(request3.page);
        response.attachDevToolsData(data32);
        const reqid = data32?.cdpRequestId ? context2.resolveCdpRequestId(request3.page, data32.cdpRequestId) : void 0;
        response.setIncludeNetworkRequests(true, {
          pageSize: request3.params.pageSize,
          pageIdx: request3.params.pageIdx,
          resourceTypes: request3.params.resourceTypes,
          includePreservedRequests: request3.params.includePreservedRequests,
          networkRequestIdInDevToolsUI: reqid
        });
      }
    });
    getNetworkRequest = definePageTool({
      name: "get_network_request",
      description: `Gets a network request by an optional reqid, if omitted returns the currently selected request in the DevTools Network panel.`,
      annotations: {
        category: ToolCategory.NETWORK,
        readOnlyHint: false
      },
      schema: {
        reqid: z.number().optional().describe("The reqid of the network request. If omitted returns the currently selected request in the DevTools Network panel."),
        requestFilePath: z.string().optional().describe("The absolute or relative path to save the request body to. If omitted, the body is returned inline."),
        responseFilePath: z.string().optional().describe("The absolute or relative path to save the response body to. If omitted, the body is returned inline.")
      },
      handler: async (request3, response, context2) => {
        if (request3.params.reqid) {
          response.attachNetworkRequest(request3.params.reqid, {
            requestFilePath: request3.params.requestFilePath,
            responseFilePath: request3.params.responseFilePath
          });
        } else {
          const data32 = await context2.getDevToolsData(request3.page);
          response.attachDevToolsData(data32);
          const reqid = data32?.cdpRequestId ? context2.resolveCdpRequestId(request3.page, data32.cdpRequestId) : void 0;
          if (reqid) {
            response.attachNetworkRequest(reqid, {
              requestFilePath: request3.params.requestFilePath,
              responseFilePath: request3.params.responseFilePath
            });
          } else {
            response.appendResponseLine(`Nothing is currently selected in the DevTools Network panel.`);
          }
        }
      }
    });
  }
});

// empty:./performance.js
var performance_exports = {};
var init_performance = __esm({
  "empty:./performance.js"() {
  }
});

// empty:./screencast.js
var screencast_exports = {};
var init_screencast = __esm({
  "empty:./screencast.js"() {
  }
});

// ../../node_modules/chrome-devtools-mcp/build/src/tools/screenshot.js
var screenshot_exports = {};
__export(screenshot_exports, {
  screenshot: () => screenshot
});
var screenshot;
var init_screenshot = __esm({
  async "../../node_modules/chrome-devtools-mcp/build/src/tools/screenshot.js"() {
    await init_third_party();
    init_categories();
    await init_ToolDefinition();
    screenshot = definePageTool({
      name: "take_screenshot",
      description: `Take a screenshot of the page or element.`,
      annotations: {
        category: ToolCategory.DEBUGGING,
        // Not read-only due to filePath param.
        readOnlyHint: false
      },
      schema: {
        format: z.enum(["png", "jpeg", "webp"]).default("png").describe('Type of format to save the screenshot as. Default is "png"'),
        quality: z.number().min(0).max(100).optional().describe("Compression quality for JPEG and WebP formats (0-100). Higher values mean better quality but larger file sizes. Ignored for PNG format."),
        uid: z.string().optional().describe("The uid of an element on the page from the page content snapshot. If omitted takes a pages screenshot."),
        fullPage: z.boolean().optional().describe("If set to true takes a screenshot of the full page instead of the currently visible viewport. Incompatible with uid."),
        filePath: z.string().optional().describe("The absolute path, or a path relative to the current working directory, to save the screenshot to instead of attaching it to the response.")
      },
      handler: async (request3, response, context2) => {
        if (request3.params.uid && request3.params.fullPage) {
          throw new Error('Providing both "uid" and "fullPage" is not allowed.');
        }
        let pageOrHandle;
        if (request3.params.uid) {
          pageOrHandle = await request3.page.getElementByUid(request3.params.uid);
        } else {
          pageOrHandle = request3.page.pptrPage;
        }
        const format2 = request3.params.format;
        const quality = format2 === "png" ? void 0 : request3.params.quality;
        const screenshot3 = await pageOrHandle.screenshot({
          type: format2,
          fullPage: request3.params.fullPage,
          quality,
          optimizeForSpeed: true
          // Bonus: optimize encoding for speed
        });
        if (request3.params.uid) {
          response.appendResponseLine(`Took a screenshot of node with uid "${request3.params.uid}".`);
        } else if (request3.params.fullPage) {
          response.appendResponseLine("Took a screenshot of the full current page.");
        } else {
          response.appendResponseLine("Took a screenshot of the current page's viewport.");
        }
        if (request3.params.filePath) {
          const file2 = await context2.saveFile(screenshot3, request3.params.filePath);
          response.appendResponseLine(`Saved screenshot to ${file2.filename}.`);
        } else if (screenshot3.length >= 2e6) {
          const { filepath } = await context2.saveTemporaryFile(screenshot3, `screenshot.${request3.params.format}`);
          response.appendResponseLine(`Saved screenshot to ${filepath}.`);
        } else {
          response.attachImage({
            mimeType: `image/${request3.params.format}`,
            data: Buffer.from(screenshot3).toString("base64")
          });
        }
      }
    });
  }
});

// ../../node_modules/chrome-devtools-mcp/build/src/tools/script.js
var script_exports = {};
__export(script_exports, {
  evaluateScript: () => evaluateScript
});
var evaluateScript, performEvaluation, getPageOrFrame, getWebWorker;
var init_script = __esm({
  async "../../node_modules/chrome-devtools-mcp/build/src/tools/script.js"() {
    await init_third_party();
    init_categories();
    await init_ToolDefinition();
    evaluateScript = defineTool((cliArgs) => {
      return {
        name: "evaluate_script",
        description: `Evaluate a JavaScript function inside the currently selected page. Returns the response as JSON,
so returned values have to be JSON-serializable.`,
        annotations: {
          category: ToolCategory.DEBUGGING,
          readOnlyHint: false
        },
        schema: {
          function: z.string().describe(`A JavaScript function declaration to be executed by the tool in the currently selected page.
Example without arguments: \`() => {
  return document.title
}\` or \`async () => {
  return await fetch("example.com")
}\`.
Example with arguments: \`(el) => {
  return el.innerText;
}\`
`),
          args: z.array(z.string().describe("The uid of an element on the page from the page content snapshot")).optional().describe(`An optional list of arguments to pass to the function.`),
          ...cliArgs?.experimentalPageIdRouting ? pageIdSchema : {},
          ...cliArgs?.categoryExtensions ? {
            serviceWorkerId: z.string().optional().describe(`An optional service worker id to evaluate the script in.`)
          } : {}
        },
        handler: async (request3, response, context2) => {
          const { serviceWorkerId, args: uidArgs, function: fnString, pageId } = request3.params;
          if (cliArgs?.categoryExtensions && serviceWorkerId) {
            if (uidArgs && uidArgs.length > 0) {
              throw new Error("args (element uids) cannot be used when evaluating in a service worker.");
            }
            if (pageId) {
              throw new Error("specify either a pageId or a serviceWorkerId.");
            }
            const worker = await getWebWorker(context2, serviceWorkerId);
            await performEvaluation(worker, fnString, [], response, context2);
            return;
          }
          const mcpPage = cliArgs?.experimentalPageIdRouting ? context2.getPageById(request3.params.pageId) : context2.getSelectedMcpPage();
          const page = mcpPage.pptrPage;
          const args2 = [];
          try {
            const frames3 = /* @__PURE__ */ new Set();
            for (const uid2 of uidArgs ?? []) {
              const handle = await mcpPage.getElementByUid(uid2);
              frames3.add(handle.frame);
              args2.push(handle);
            }
            const evaluatable = await getPageOrFrame(page, frames3);
            await performEvaluation(evaluatable, fnString, args2, response, context2);
          } finally {
            void Promise.allSettled(args2.map((arg) => arg.dispose()));
          }
        }
      };
    });
    performEvaluation = async (evaluatable, fnString, args2, response, context2) => {
      const fn = await evaluatable.evaluateHandle(`(${fnString})`);
      try {
        await context2.waitForEventsAfterAction(async () => {
          const result = await evaluatable.evaluate(async (fn2, ...args3) => {
            return JSON.stringify(await fn2(...args3));
          }, fn, ...args2);
          response.appendResponseLine("Script ran on page and returned:");
          response.appendResponseLine("```json");
          response.appendResponseLine(`${result}`);
          response.appendResponseLine("```");
        });
      } finally {
        void fn.dispose();
      }
    };
    getPageOrFrame = async (page, frames3) => {
      let pageOrFrame;
      if (frames3.size > 1) {
        throw new Error("Elements from different frames can't be evaluated together.");
      } else {
        pageOrFrame = [...frames3.values()][0] ?? page;
      }
      return pageOrFrame;
    };
    getWebWorker = async (context2, serviceWorkerId) => {
      const serviceWorkers = context2.getExtensionServiceWorkers();
      const serviceWorker = serviceWorkers.find((sw) => context2.getExtensionServiceWorkerId(sw) === serviceWorkerId);
      if (serviceWorker && serviceWorker.target) {
        const worker = await serviceWorker.target.worker();
        if (!worker) {
          throw new Error("Service worker target not found.");
        }
        return worker;
      } else {
        throw new Error("Service worker not found.");
      }
    };
  }
});

// ../../node_modules/chrome-devtools-mcp/build/src/tools/slim/tools.js
var tools_exports = {};
__export(tools_exports, {
  evaluate: () => evaluate,
  navigate: () => navigate,
  screenshot: () => screenshot2
});
var screenshot2, navigate, evaluate;
var init_tools = __esm({
  async "../../node_modules/chrome-devtools-mcp/build/src/tools/slim/tools.js"() {
    await init_third_party();
    init_categories();
    await init_ToolDefinition();
    screenshot2 = definePageTool({
      name: "screenshot",
      description: `Takes a screenshot`,
      annotations: {
        category: ToolCategory.DEBUGGING,
        // Not read-only due to filePath param.
        readOnlyHint: false
      },
      schema: {},
      handler: async (request3, response, context2) => {
        const page = request3.page;
        const screenshot3 = await page.pptrPage.screenshot({
          type: "png",
          optimizeForSpeed: true
        });
        const { filepath } = await context2.saveTemporaryFile(screenshot3, `screenshot.png`);
        response.appendResponseLine(filepath);
      }
    });
    navigate = definePageTool({
      name: "navigate",
      description: `Loads a URL`,
      annotations: {
        category: ToolCategory.NAVIGATION,
        readOnlyHint: false
      },
      schema: {
        url: z.string().describe("URL to navigate to")
      },
      handler: async (request3, response) => {
        const page = request3.page;
        const options2 = {
          timeout: 3e4
        };
        const dialogHandler = (dialog) => {
          if (dialog.type() === "beforeunload") {
            response.appendResponseLine(`Accepted a beforeunload dialog.`);
            void dialog.accept();
            page.clearDialog();
          }
        };
        page.pptrPage.on("dialog", dialogHandler);
        try {
          await page.pptrPage.goto(request3.params.url, options2);
          response.appendResponseLine(`Navigated to ${page.pptrPage.url()}.`);
        } finally {
          page.pptrPage.off("dialog", dialogHandler);
        }
      }
    });
    evaluate = definePageTool({
      name: "evaluate",
      description: `Evaluates a JavaScript script`,
      annotations: {
        category: ToolCategory.DEBUGGING,
        readOnlyHint: false
      },
      schema: {
        script: z.string().describe(`JS script to run on the page`)
      },
      handler: async (request3, response) => {
        const page = request3.page;
        try {
          const result = await page.pptrPage.evaluate(request3.params.script);
          response.appendResponseLine(JSON.stringify(result));
        } catch (err) {
          response.appendResponseLine(String(err.message));
        }
      }
    });
  }
});

// ../../node_modules/chrome-devtools-mcp/build/src/tools/tools.js
var createTools;
var init_tools2 = __esm({
  async "../../node_modules/chrome-devtools-mcp/build/src/tools/tools.js"() {
    await init_console();
    await init_emulation();
    init_extensions();
    await init_input();
    init_lighthouse();
    await init_memory();
    await init_network2();
    await init_pages();
    init_performance();
    init_screencast();
    await init_screenshot();
    await init_script();
    await init_tools();
    await init_snapshot();
    createTools = (args2) => {
      const rawTools = args2.slim ? Object.values(tools_exports) : [
        ...Object.values(console_exports),
        ...Object.values(emulation_exports),
        ...Object.values(extensions_exports),
        ...Object.values(input_exports),
        ...Object.values(lighthouse_exports),
        ...Object.values(memory_exports),
        ...Object.values(network_exports),
        ...Object.values(pages_exports),
        ...Object.values(performance_exports),
        ...Object.values(screencast_exports),
        ...Object.values(screenshot_exports),
        ...Object.values(script_exports),
        ...Object.values(snapshot_exports)
      ];
      const tools = [];
      for (const tool of rawTools) {
        if (typeof tool === "function") {
          tools.push(tool(args2));
        } else {
          tools.push(tool);
        }
      }
      tools.sort((a, b) => {
        return a.name.localeCompare(b.name);
      });
      return tools;
    };
  }
});

// ../../node_modules/chrome-devtools-mcp/build/src/version.js
var VERSION;
var init_version = __esm({
  "../../node_modules/chrome-devtools-mcp/build/src/version.js"() {
    VERSION = "0.19.0";
  }
});

// ../../node_modules/chrome-devtools-mcp/build/src/server.js
async function createMcpServer(serverArgs, options2) {
  let clearcutLogger2;
  if (serverArgs.usageStatistics) {
    clearcutLogger2 = new ClearcutLogger({
      logFile: serverArgs.logFile,
      appVersion: VERSION,
      clearcutEndpoint: serverArgs.clearcutEndpoint,
      clearcutForceFlushIntervalMs: serverArgs.clearcutForceFlushIntervalMs,
      clearcutIncludePidHeader: serverArgs.clearcutIncludePidHeader
    });
  }
  const server2 = new McpServer({
    name: "chrome_devtools",
    title: "Chrome DevTools MCP server",
    version: VERSION
  }, { capabilities: { logging: {} } });
  server2.server.setRequestHandler(SetLevelRequestSchema, () => {
    return {};
  });
  let context2;
  async function getContext() {
    const chromeArgs = (serverArgs.chromeArg ?? []).map(String);
    const ignoreDefaultChromeArgs = (serverArgs.ignoreDefaultChromeArg ?? []).map(String);
    if (serverArgs.proxyServer) {
      chromeArgs.push(`--proxy-server=${serverArgs.proxyServer}`);
    }
    const devtools = serverArgs.experimentalDevtools ?? false;
    const browser3 = serverArgs.browserUrl || serverArgs.wsEndpoint || serverArgs.autoConnect ? await ensureBrowserConnected({
      browserURL: serverArgs.browserUrl,
      wsEndpoint: serverArgs.wsEndpoint,
      wsHeaders: serverArgs.wsHeaders,
      // Important: only pass channel, if autoConnect is true.
      channel: serverArgs.autoConnect ? serverArgs.channel : void 0,
      userDataDir: serverArgs.userDataDir,
      devtools
    }) : await ensureBrowserLaunched({
      headless: serverArgs.headless,
      executablePath: serverArgs.executablePath,
      channel: serverArgs.channel,
      isolated: serverArgs.isolated ?? false,
      userDataDir: serverArgs.userDataDir,
      logFile: options2.logFile,
      viewport: serverArgs.viewport,
      chromeArgs,
      ignoreDefaultChromeArgs,
      acceptInsecureCerts: serverArgs.acceptInsecureCerts,
      devtools,
      enableExtensions: serverArgs.categoryExtensions,
      viaCli: serverArgs.viaCli
    });
    if (context2?.browser !== browser3) {
      context2 = await McpContext.from(browser3, logger, {
        experimentalDevToolsDebugging: devtools,
        experimentalIncludeAllPages: serverArgs.experimentalIncludeAllPages,
        performanceCrux: serverArgs.performanceCrux
      });
    }
    return context2;
  }
  const toolMutex = new Mutex3();
  function registerTool(tool) {
    if (tool.annotations.category === ToolCategory.EMULATION && serverArgs.categoryEmulation === false) {
      return;
    }
    if (tool.annotations.category === ToolCategory.PERFORMANCE && serverArgs.categoryPerformance === false) {
      return;
    }
    if (tool.annotations.category === ToolCategory.NETWORK && serverArgs.categoryNetwork === false) {
      return;
    }
    if (tool.annotations.category === ToolCategory.EXTENSIONS && serverArgs.categoryExtensions === false) {
      return;
    }
    if (tool.annotations.conditions?.includes("computerVision") && !serverArgs.experimentalVision) {
      return;
    }
    if (tool.annotations.conditions?.includes("experimentalInteropTools") && !serverArgs.experimentalInteropTools) {
      return;
    }
    if (tool.annotations.conditions?.includes("screencast") && !serverArgs.experimentalScreencast) {
      return;
    }
    const schema = "pageScoped" in tool && tool.pageScoped && serverArgs.experimentalPageIdRouting && !serverArgs.slim ? { ...tool.schema, ...pageIdSchema } : tool.schema;
    server2.registerTool(tool.name, {
      description: tool.description,
      inputSchema: schema,
      annotations: tool.annotations
    }, async (params) => {
      const guard = await toolMutex.acquire();
      const startTime = Date.now();
      let success = false;
      try {
        logger(`${tool.name} request: ${JSON.stringify(params, null, "  ")}`);
        const context3 = await getContext();
        logger(`${tool.name} context: resolved`);
        await context3.detectOpenDevToolsWindows();
        const response = serverArgs.slim ? new SlimMcpResponse(serverArgs) : new McpResponse(serverArgs);
        if ("pageScoped" in tool && tool.pageScoped) {
          const page = serverArgs.experimentalPageIdRouting && params.pageId && !serverArgs.slim ? context3.getPageById(params.pageId) : context3.getSelectedMcpPage();
          response.setPage(page);
          await tool.handler({
            params,
            page
          }, response, context3);
        } else {
          await tool.handler(
            // @ts-expect-error types do not match.
            {
              params
            },
            response,
            context3
          );
        }
        const { content, structuredContent } = await response.handle(tool.name, context3);
        const result = {
          content
        };
        success = true;
        if (serverArgs.experimentalStructuredContent) {
          result.structuredContent = structuredContent;
        }
        return result;
      } catch (err) {
        logger(`${tool.name} error:`, err, err?.stack);
        let errorText = err && "message" in err ? err.message : String(err);
        if ("cause" in err && err.cause) {
          errorText += `
Cause: ${err.cause.message}`;
        }
        return {
          content: [
            {
              type: "text",
              text: errorText
            }
          ],
          isError: true
        };
      } finally {
        void clearcutLogger2?.logToolInvocation({
          toolName: tool.name,
          success,
          latencyMs: bucketizeLatency(Date.now() - startTime)
        });
        guard.dispose();
      }
    });
  }
  const tools = createTools(serverArgs);
  for (const tool of tools) {
    registerTool(tool);
  }
  await loadIssueDescriptions();
  return { server: server2, clearcutLogger: clearcutLogger2 };
}
var logDisclaimers;
var init_server = __esm({
  async "../../node_modules/chrome-devtools-mcp/build/src/server.js"() {
    await init_browser();
    init_issue_descriptions();
    await init_logger();
    await init_McpContext();
    await init_McpResponse();
    init_Mutex();
    await init_SlimMcpResponse();
    await init_ClearcutLogger();
    init_metricUtils();
    await init_third_party();
    init_categories();
    await init_ToolDefinition();
    await init_tools2();
    init_version();
    logDisclaimers = (args2) => {
      console.error(`chrome-devtools-mcp exposes content of the browser instance to the MCP clients allowing them to inspect,
debug, and modify any data in the browser or DevTools.
Avoid sharing sensitive or personal information that you do not want to share with MCP clients.`);
      if (!args2.slim && args2.performanceCrux) {
        console.error(`Performance tools may send trace URLs to the Google CrUX API to fetch real-user experience data. To disable, run with --no-performance-crux.`);
      }
      if (!args2.slim && args2.usageStatistics) {
        console.error(`
Google collects usage statistics to improve Chrome DevTools MCP. To opt-out, run with --no-usage-statistics.
For more details, visit: https://github.com/ChromeDevTools/chrome-devtools-mcp#usage-statistics`);
      }
    };
  }
});

// ../../node_modules/chrome-devtools-mcp/build/src/utils/string.js
function toSnakeCase(text) {
  if (!text) {
    return "";
  }
  const result = text.replace(/(\p{L})(\p{N})/gu, "$1_$2").replace(/(\p{Lu}+)(\p{Lu}\p{Ll})/gu, "$1_$2").replace(/(\p{Ll}|\p{N})(\p{Lu})/gu, "$1_$2").toLowerCase().replace(/[^\p{L}\p{N}]+/gu, "_").replace(/^_|_$/g, "");
  return result;
}
var init_string = __esm({
  "../../node_modules/chrome-devtools-mcp/build/src/utils/string.js"() {
  }
});

// ../../node_modules/chrome-devtools-mcp/build/src/telemetry/flagUtils.js
function computeFlagUsage(args2, options2) {
  const usage2 = {};
  for (const [flagName, config4] of Object.entries(options2)) {
    const value = args2[flagName];
    const snakeCaseName = toSnakeCase(flagName);
    if (!("default" in config4) || value !== config4.default) {
      usage2[`${snakeCaseName}_present`] = value !== void 0 && value !== null;
    }
    if (config4.type === "boolean" && typeof value === "boolean") {
      usage2[snakeCaseName] = value;
    } else if (config4.type === "string" && typeof value === "string" && "choices" in config4 && config4.choices) {
      usage2[snakeCaseName] = `${snakeCaseName}_${value}`.toUpperCase();
    }
  }
  return usage2;
}
var init_flagUtils = __esm({
  "../../node_modules/chrome-devtools-mcp/build/src/telemetry/flagUtils.js"() {
    init_string();
  }
});

// ../../node_modules/chrome-devtools-mcp/build/src/main.js
var main_exports = {};
__export(main_exports, {
  args: () => args
});
import process7 from "node:process";
var args, logFile, server, clearcutLogger, transport;
var init_main = __esm({
  async "../../node_modules/chrome-devtools-mcp/build/src/main.js"() {
    await init_polyfill();
    await init_cli();
    await init_logger();
    await init_server();
    init_flagUtils();
    await init_third_party();
    init_version();
    args = parseArguments(VERSION);
    logFile = args.logFile ? saveLogsToFile(args.logFile) : void 0;
    if (process7.env["CI"] || process7.env["CHROME_DEVTOOLS_MCP_NO_USAGE_STATISTICS"]) {
      console.error("turning off usage statistics. process.env['CI'] || process.env['CHROME_DEVTOOLS_MCP_NO_USAGE_STATISTICS'] is set.");
      args.usageStatistics = false;
    }
    if (process7.env["CHROME_DEVTOOLS_MCP_CRASH_ON_UNCAUGHT"] !== "true") {
      process7.on("unhandledRejection", (reason, promise) => {
        logger("Unhandled promise rejection", promise, reason);
      });
    }
    logger(`Starting Chrome DevTools MCP Server v${VERSION}`);
    ({ server, clearcutLogger } = await createMcpServer(args, {
      logFile
    }));
    transport = new StdioServerTransport();
    await server.connect(transport);
    logger("Chrome DevTools MCP Server connected");
    logDisclaimers(args);
    void clearcutLogger?.logDailyActiveIfNeeded();
    void clearcutLogger?.logServerStart(computeFlagUsage(args, cliOptions));
  }
});

// ../../node_modules/chrome-devtools-mcp/build/src/index.js
import { version as version2 } from "node:process";
var [major, minor] = version2.substring(1).split(".").map(Number);
if (major === 20 && minor < 19) {
  console.error(`ERROR: \`chrome-devtools-mcp\` does not support Node ${process.version}. Please upgrade to Node 20.19.0 LTS or a newer LTS.`);
  process.exit(1);
}
if (major === 22 && minor < 12) {
  console.error(`ERROR: \`chrome-devtools-mcp\` does not support Node ${process.version}. Please upgrade to Node 22.12.0 LTS or a newer LTS.`);
  process.exit(1);
}
if (major < 20) {
  console.error(`ERROR: \`chrome-devtools-mcp\` does not support Node ${process.version}. Please upgrade to Node 20.19.0 LTS or a newer LTS.`);
  process.exit(1);
}
await init_main().then(() => main_exports);
/*! Bundled license information:

chrome-devtools-mcp/build/src/third_party/lighthouse-devtools-mcp-bundle.js:
  (**
   * Lighthouse v13.0.3-4-gd6e2a8e40 (Mar 04 2026)
   *
   * Automated auditing, performance metrics, and best practices for the web.
   *
   * @homepage https://github.com/GoogleChrome/lighthouse#readme
   * @author   Copyright 2026 Google LLC
   * @license  Apache-2.0
   *
   * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
   * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
   *)
  (**
   * @license
   * Copyright 2023 Google LLC
   * SPDX-License-Identifier: Apache-2.0
   *)
  (**
   * @license
   * Copyright 2021 Google LLC
   * SPDX-License-Identifier: Apache-2.0
   *)
  (**
   * @license
   * Copyright 2016 Google LLC
   * SPDX-License-Identifier: Apache-2.0
   *)
  (**
   * @license
   * Lodash (Custom Build) <https://lodash.com/>
   * Build: `lodash modularize exports="es" -o ./`
   * Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
   * Released under MIT license <https://lodash.com/license>
   * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
   * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
   *)
  (**
   * @license
   * Copyright 2020 Google LLC
   * SPDX-License-Identifier: Apache-2.0
   *)
  (**
   * @license
   * Copyright 2017 Google LLC
   * SPDX-License-Identifier: Apache-2.0
   *)
  (**
   * @license Copyright 2020 The Lighthouse Authors. All Rights Reserved.
   * Licensed under the Apache License, Version 2.0 (the 'License'); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
   * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an 'AS IS' BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
   *)
  (**
   * @license
   * Copyright 2018 Google LLC
   * SPDX-License-Identifier: Apache-2.0
   *)
  (**
   * @license
   * Copyright 2025 Google LLC
   * SPDX-License-Identifier: Apache-2.0
   *)
  (**
   * @license
   * Copyright 2024 Google LLC
   * SPDX-License-Identifier: Apache-2.0
   *)
  (**
   * @license
   * Copyright 2019 Google LLC
   * SPDX-License-Identifier: Apache-2.0
   *)
  (**
   * @license
   * Copyright 2022 Google LLC
   * SPDX-License-Identifier: Apache-2.0
   *)
  (**
   * @license Copyright 2024 The Lighthouse Authors. All Rights Reserved.
   * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
   * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
   *)
  (**
   * @license Copyright 2020 Google LLC
   * SPDX-License-Identifier: Apache-2.0
   *)
  (**
   * @license
   * Copyright 2026 Google LLC
   * SPDX-License-Identifier: Apache-2.0
   *)

chrome-devtools-mcp/build/src/third_party/index.js:
  (**
   * @license
   * Copyright (c) 2016, Contributors
   * SPDX-License-Identifier: ISC
   *)
  (**
   * @fileoverview Main entrypoint for libraries using yargs-parser in Node.js
   *
   * @license
   * Copyright (c) 2016, Contributors
   * SPDX-License-Identifier: ISC
   *)
  (**
   * @license
   * Copyright 2023 Google Inc.
   * SPDX-License-Identifier: Apache-2.0
   *)
  (**
   * @license
   * Copyright 2022 Google Inc.
   * SPDX-License-Identifier: Apache-2.0
   *)
  (**
   * @license
   * Copyright 2020 Google Inc.
   * SPDX-License-Identifier: Apache-2.0
   *)
  (**
   * @license
   * Copyright 2024 Google Inc.
   * SPDX-License-Identifier: Apache-2.0
   *)
  (**
   * @license
   * Copyright 2025 Google Inc.
   * SPDX-License-Identifier: Apache-2.0
   *)
  (**
   * @license
   * Copyright 2018 Google Inc.
   * SPDX-License-Identifier: Apache-2.0
   *)
  (**
   * @license
   * Copyright 2017 Google Inc.
   * SPDX-License-Identifier: Apache-2.0
   *)
  (**
   * @license
   * Copyright 2019 Google Inc.
   * SPDX-License-Identifier: Apache-2.0
   *)
  (**
   * @license
   * Copyright 2021 Google Inc.
   * SPDX-License-Identifier: Apache-2.0
   *)
  (*!
   * node-progress
   * Copyright(c) 2011 TJ Holowaychuk <tj@vision-media.ca>
   * MIT Licensed
   *)
  (*! *****************************************************************************
  Copyright (c) Microsoft Corporation.
  Permission to use, copy, modify, and/or distribute this software for any
  purpose with or without fee is hereby granted.
  THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
  REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
  AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
  INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
  LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
  OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
  PERFORMANCE OF THIS SOFTWARE.
  ***************************************************************************** *)
  (**
   * @license
   * Copyright 2017 Google LLC
   * SPDX-License-Identifier: Apache-2.0
   *)
  (**
   * @license
   * Copyright 2025 Google LLC
   * SPDX-License-Identifier: Apache-2.0
   *)

chrome-devtools-mcp/build/src/polyfill.js:
  (**
   * @license
   * Copyright 2025 Google Inc.
   * SPDX-License-Identifier: Apache-2.0
   *)

chrome-devtools-mcp/build/src/cli.js:
  (**
   * @license
   * Copyright 2025 Google LLC
   * SPDX-License-Identifier: Apache-2.0
   *)

chrome-devtools-mcp/build/src/logger.js:
  (**
   * @license
   * Copyright 2025 Google LLC
   * SPDX-License-Identifier: Apache-2.0
   *)

chrome-devtools-mcp/build/src/browser.js:
  (**
   * @license
   * Copyright 2025 Google LLC
   * SPDX-License-Identifier: Apache-2.0
   *)

chrome-devtools-mcp/build/src/issue-descriptions.js:
  (**
   * @license
   * Copyright 2025 Google LLC
   * SPDX-License-Identifier: Apache-2.0
   *)

chrome-devtools-mcp/build/src/DevToolsConnectionAdapter.js:
  (**
   * @license
   * Copyright 2025 Google LLC
   * SPDX-License-Identifier: Apache-2.0
   *)

chrome-devtools-mcp/build/src/Mutex.js:
  (**
   * @license
   * Copyright 2025 Google Inc.
   * SPDX-License-Identifier: Apache-2.0
   *)

chrome-devtools-mcp/build/src/DevtoolsUtils.js:
  (**
   * @license
   * Copyright 2025 Google LLC
   * SPDX-License-Identifier: Apache-2.0
   *)

chrome-devtools-mcp/build/src/tools/categories.js:
  (**
   * @license
   * Copyright 2025 Google LLC
   * SPDX-License-Identifier: Apache-2.0
   *)

chrome-devtools-mcp/build/src/tools/ToolDefinition.js:
  (**
   * @license
   * Copyright 2025 Google LLC
   * SPDX-License-Identifier: Apache-2.0
   *)

chrome-devtools-mcp/build/src/tools/snapshot.js:
  (**
   * @license
   * Copyright 2025 Google LLC
   * SPDX-License-Identifier: Apache-2.0
   *)

chrome-devtools-mcp/build/src/McpPage.js:
  (**
   * @license
   * Copyright 2025 Google LLC
   * SPDX-License-Identifier: Apache-2.0
   *)

chrome-devtools-mcp/build/src/PageCollector.js:
  (**
   * @license
   * Copyright 2025 Google LLC
   * SPDX-License-Identifier: Apache-2.0
   *)

chrome-devtools-mcp/build/src/tools/pages.js:
  (**
   * @license
   * Copyright 2025 Google LLC
   * SPDX-License-Identifier: Apache-2.0
   *)

chrome-devtools-mcp/build/src/utils/ExtensionRegistry.js:
  (**
   * @license
   * Copyright 2026 Google LLC
   * SPDX-License-Identifier: Apache-2.0
   *)

chrome-devtools-mcp/build/src/utils/files.js:
  (**
   * @license
   * Copyright 2025 Google LLC
   * SPDX-License-Identifier: Apache-2.0
   *)

chrome-devtools-mcp/build/src/WaitForHelper.js:
  (**
   * @license
   * Copyright 2025 Google LLC
   * SPDX-License-Identifier: Apache-2.0
   *)

chrome-devtools-mcp/build/src/McpContext.js:
  (**
   * @license
   * Copyright 2025 Google LLC
   * SPDX-License-Identifier: Apache-2.0
   *)

chrome-devtools-mcp/build/src/formatters/ConsoleFormatter.js:
  (**
   * @license
   * Copyright 2026 Google LLC
   * SPDX-License-Identifier: Apache-2.0
   *)

chrome-devtools-mcp/build/src/formatters/IssueFormatter.js:
  (**
   * @license
   * Copyright 2026 Google LLC
   * SPDX-License-Identifier: Apache-2.0
   *)

chrome-devtools-mcp/build/src/formatters/NetworkFormatter.js:
  (**
   * @license
   * Copyright 2025 Google LLC
   * SPDX-License-Identifier: Apache-2.0
   * *)

chrome-devtools-mcp/build/src/formatters/SnapshotFormatter.js:
  (**
   * @license
   * Copyright 2025 Google LLC
   * SPDX-License-Identifier: Apache-2.0
   *)

chrome-devtools-mcp/build/src/trace-processing/parse.js:
  (**
   * @license
   * Copyright 2025 Google LLC
   * SPDX-License-Identifier: Apache-2.0
   *)

chrome-devtools-mcp/build/src/utils/pagination.js:
  (**
   * @license
   * Copyright 2025 Google LLC
   * SPDX-License-Identifier: Apache-2.0
   *)

chrome-devtools-mcp/build/src/McpResponse.js:
  (**
   * @license
   * Copyright 2025 Google LLC
   * SPDX-License-Identifier: Apache-2.0
   *)

chrome-devtools-mcp/build/src/SlimMcpResponse.js:
  (**
   * @license
   * Copyright 2026 Google LLC
   * SPDX-License-Identifier: Apache-2.0
   *)

chrome-devtools-mcp/build/src/telemetry/persistence.js:
  (**
   * @license
   * Copyright 2026 Google LLC
   * SPDX-License-Identifier: Apache-2.0
   *)

chrome-devtools-mcp/build/src/telemetry/types.js:
  (**
   * @license
   * Copyright 2026 Google LLC
   * SPDX-License-Identifier: Apache-2.0
   *)

chrome-devtools-mcp/build/src/telemetry/WatchdogClient.js:
  (**
   * @license
   * Copyright 2026 Google LLC
   * SPDX-License-Identifier: Apache-2.0
   *)

chrome-devtools-mcp/build/src/telemetry/ClearcutLogger.js:
  (**
   * @license
   * Copyright 2026 Google LLC
   * SPDX-License-Identifier: Apache-2.0
   *)

chrome-devtools-mcp/build/src/telemetry/metricUtils.js:
  (**
   * @license
   * Copyright 2026 Google LLC
   * SPDX-License-Identifier: Apache-2.0
   *)

chrome-devtools-mcp/build/src/tools/console.js:
  (**
   * @license
   * Copyright 2025 Google LLC
   * SPDX-License-Identifier: Apache-2.0
   *)

chrome-devtools-mcp/build/src/tools/emulation.js:
  (**
   * @license
   * Copyright 2025 Google LLC
   * SPDX-License-Identifier: Apache-2.0
   *
   *)

chrome-devtools-mcp/build/src/utils/keyboard.js:
  (**
   * @license
   * Copyright 2025 Google LLC
   * SPDX-License-Identifier: Apache-2.0
   *)

chrome-devtools-mcp/build/src/tools/input.js:
  (**
   * @license
   * Copyright 2025 Google LLC
   * SPDX-License-Identifier: Apache-2.0
   *)

chrome-devtools-mcp/build/src/tools/memory.js:
  (**
   * @license
   * Copyright 2025 Google LLC
   * SPDX-License-Identifier: Apache-2.0
   *)

chrome-devtools-mcp/build/src/tools/network.js:
  (**
   * @license
   * Copyright 2025 Google LLC
   * SPDX-License-Identifier: Apache-2.0
   *)

chrome-devtools-mcp/build/src/tools/screenshot.js:
  (**
   * @license
   * Copyright 2025 Google LLC
   * SPDX-License-Identifier: Apache-2.0
   *)

chrome-devtools-mcp/build/src/tools/script.js:
  (**
   * @license
   * Copyright 2025 Google LLC
   * SPDX-License-Identifier: Apache-2.0
   *)

chrome-devtools-mcp/build/src/tools/slim/tools.js:
  (**
   * @license
   * Copyright 2026 Google LLC
   * SPDX-License-Identifier: Apache-2.0
   *)

chrome-devtools-mcp/build/src/tools/tools.js:
  (**
   * @license
   * Copyright 2025 Google LLC
   * SPDX-License-Identifier: Apache-2.0
   *)

chrome-devtools-mcp/build/src/version.js:
  (**
   * @license
   * Copyright 2026 Google LLC
   * SPDX-License-Identifier: Apache-2.0
   *)

chrome-devtools-mcp/build/src/server.js:
  (**
   * @license
   * Copyright 2026 Google LLC
   * SPDX-License-Identifier: Apache-2.0
   *)

chrome-devtools-mcp/build/src/utils/string.js:
  (**
   * @license
   * Copyright 2026 Google LLC
   * SPDX-License-Identifier: Apache-2.0
   *)

chrome-devtools-mcp/build/src/telemetry/flagUtils.js:
  (**
   * @license
   * Copyright 2026 Google LLC
   * SPDX-License-Identifier: Apache-2.0
   *)

chrome-devtools-mcp/build/src/main.js:
  (**
   * @license
   * Copyright 2025 Google LLC
   * SPDX-License-Identifier: Apache-2.0
   *)

chrome-devtools-mcp/build/src/index.js:
  (**
   * @license
   * Copyright 2025 Google LLC
   * SPDX-License-Identifier: Apache-2.0
   *)
*/
